Tcl Library Source Code

Check-in Differences
Login
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Difference From trunk To mjanssen-changes

2021-03-08
14:29
Fix inconsistent profiler pkgIndex.tcl Leaf check-in: f9ee8b1b48 user: mpcjanssen tags: trunk
2021-03-07
14:21
Add various [package require] statements to expose the proper requirements check-in: 20bad8fa14 user: arjenmarkus tags: trunk
2017-03-30
20:01
Fix bug in tcc4tcl md5 implementation Leaf check-in: e255c39fbf user: Mark tags: mjanssen-changes
15:33
Merged tcc4tcl changes check-in: dfe89741cf user: Mark tags: mjanssen-changes

Deleted .fossil-settings/binary-glob.

1
2
3
4
5
*.tiff *.png *.jpg *.JPG *.JPG.thumb
*.fossil *.sqlite *.ckout *.global
*.torrent
*.pdf
*/yencode.test.data */yencode.test.out
<
<
<
<
<










Deleted .fossil-settings/crlf-glob.

1
2
3
modules/pt/tests/data/ok/peg_serial-canonical/3_peg_itself
modules/fumagic/fumagic.testsupport
*.bat
<
<
<






Deleted .fossil-settings/encoding-glob.

1
2
3
4
modules/mime/mime.test
modules/base64/yencode.test.out
modules/fileutil/test-assets/pdf4tcl_01.pdf
modules/png/test-assets/xlfn0g04.png
<
<
<
<








Deleted .fossil-settings/ignore-glob.

1
2
3
4
5
M
MSG*
X.*
_work
modules/tcllibc
<
<
<
<
<










Changes to .github/CONTRIBUTING.md.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Hello. __Attention please__

You are currently using the github __mirror__ of the Tcllib sources.

This is __not__ the location where Tcllib development takes place.

We are __not tracking issues entered here__. With the exception of the
maintainer of the mirroring setup nobody will even see such issues.

Please go to the
[official location of the sources](https://core.tcl-lang.org/tcllib)
and enter your ticket into the
[official ticket tracker](https://core.tcl-lang.org/tcllib/reportlist)
instead.

Thank you for your consideration.

|



|

|



|

|



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Hello.

You are currently using the github __mirror__ of the Tcllib sources.

This is __not__ the location where development takes place.

We are not tracking issues entered here.  With the exception of the
maintainer of the mirroring setup nobody will even see such issues.

Please go to the
[official location of the sources](https://core.tcl.tk/tcllib)
and enter your ticket into the
[official ticket tracker](https://core.tcl.tk/tcllib/reportlist)
instead.

Thank you for your consideration.

Changes to .github/ISSUE_TEMPLATE.md.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Hello. __Attention please__

You are currently using the github __mirror__ of the Tcllib sources.

This is __not__ the location where Tcllib development takes place.

We are __not tracking issues entered here__. With the exception of the
maintainer of the mirroring setup nobody will even see such issues.

Please go to the
[official location of the sources](https://core.tcl-lang.org/tcllib)
and enter your ticket into the
[official ticket tracker](https://core.tcl-lang.org/tcllib/reportlist)
instead.

Thank you for your consideration.

|



|

|



|

|



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Hello.

You are currently using the github __mirror__ of the Tcllib sources.

This is __not__ the location where development takes place.

We are not tracking issues entered here.  With the exception of the
maintainer of the mirroring setup nobody will even see such issues.

Please go to the
[official location of the sources](https://core.tcl.tk/tcllib)
and enter your ticket into the
[official ticket tracker](https://core.tcl.tk/tcllib/reportlist)
instead.

Thank you for your consideration.

Changes to .github/PULL_REQUEST_TEMPLATE.md.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Hello. __Attention please__

You are currently using the github __mirror__ of the Tcllib sources.

This is __not__ the location where Tcllib development takes place.

We are __not tracking issues entered here__. With the exception of the
maintainer of the mirroring setup nobody will even see such issues.

Please go to the
[official location of the sources](https://core.tcl-lang.org/tcllib)
and enter your ticket into the
[official ticket tracker](https://core.tcl-lang.org/tcllib/reportlist)
instead.

Thank you for your consideration.

|



|

|



|

|



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Hello.

You are currently using the github __mirror__ of the Tcllib sources.

This is __not__ the location where development takes place.

We are not tracking issues entered here.  With the exception of the
maintainer of the mirroring setup nobody will even see such issues.

Please go to the
[official location of the sources](https://core.tcl.tk/tcllib)
and enter your ticket into the
[official ticket tracker](https://core.tcl.tk/tcllib/reportlist)
instead.

Thank you for your consideration.

Changes to DESCRIPTION.txt.

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
Identifier: tcllib
Title:  Tcl Standard Library
Description: This package is intended to be a collection of
    Tcl packages that provide utility functions useful to a
    large collection of Tcl programmers.
Rights: BSD
Version: 1.20
URL: http://core.tcl.tk/tcllib
Architecture: tcl
Contributor:  <jeffh at activestate dot com>
Contributor: Aaron Faupell <afaupell at users dot sourceforge dot net>
Contributor: Andreas Kupries <andreas_kupries at users dot sourceforge dot net>
Contributor: Arjen Markus <arjenmarkus at users dot sourceforge dot net>
Contributor: Benjamin Riefenstahl <b dot riefenstahl at turtle-trading dot net>
Contributor: Bob Techentin <techentin at users dot sourceforge dot net>
Contributor: Brent Welch <welch at scriptics dot com>
Contributor: Brett Schwarz <schwarzkopf at users dot sourceforge dot net>
Contributor: Colin McCormack <coldstore at users dot sourceforge dot net>
Contributor: Dan Kuchler <kuchler at ajubasolutions dot com>
Contributor: David N. Welton <davidw at dedasys dot com>
Contributor: Don Porter <dgp at users dot sourceforge dot net>
Contributor: Donal K. Fellows <fellowsd at cs dot man dot ac dot uk>
Contributor: Elchonon Edelson <eee at users dot sourceforge dot net>
Contributor: Emmanuel Frecon <efrecon at gmail dot com>
Contributor: Eric Melski <ericm at ajubasolutions dot com>
Contributor: Gerald Lester <gwlester at users dot sourceforge dot net>
Contributor: Gerhard Reithofer <gerhard dot rithofer at tech-edv dot co dot at>
Contributor: Harald Oehlmann <oehhar at users dot sourceforge dot net>
Contributor: Jeff Hobbs <jeffh at ActiveState dot com>
Contributor: Joe English <jenglish at users dot sourceforge dot net>
Contributor: Johannes-Heinrich Vogeler <vogeler at users dot sourceforge dot net>
Contributor: KATO Kanryu <kanryu6 at users dot sourceforge dot net>
Contributor: Kevin B, Kenny <kennykb at acm dot org>
Contributor: Kevin B. Kenny <kennykb at acm dot org>
Contributor: Kevin Kenny <kennykb at users dot sourceforge dot net>






|




















<







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
Identifier: tcllib
Title:  Tcl Standard Library
Description: This package is intended to be a collection of
    Tcl packages that provide utility functions useful to a
    large collection of Tcl programmers.
Rights: BSD
Version: 1.18
URL: http://core.tcl.tk/tcllib
Architecture: tcl
Contributor:  <jeffh at activestate dot com>
Contributor: Aaron Faupell <afaupell at users dot sourceforge dot net>
Contributor: Andreas Kupries <andreas_kupries at users dot sourceforge dot net>
Contributor: Arjen Markus <arjenmarkus at users dot sourceforge dot net>
Contributor: Benjamin Riefenstahl <b dot riefenstahl at turtle-trading dot net>
Contributor: Bob Techentin <techentin at users dot sourceforge dot net>
Contributor: Brent Welch <welch at scriptics dot com>
Contributor: Brett Schwarz <schwarzkopf at users dot sourceforge dot net>
Contributor: Colin McCormack <coldstore at users dot sourceforge dot net>
Contributor: Dan Kuchler <kuchler at ajubasolutions dot com>
Contributor: David N. Welton <davidw at dedasys dot com>
Contributor: Don Porter <dgp at users dot sourceforge dot net>
Contributor: Donal K. Fellows <fellowsd at cs dot man dot ac dot uk>
Contributor: Elchonon Edelson <eee at users dot sourceforge dot net>
Contributor: Emmanuel Frecon <efrecon at gmail dot com>
Contributor: Eric Melski <ericm at ajubasolutions dot com>
Contributor: Gerald Lester <gwlester at users dot sourceforge dot net>
Contributor: Gerhard Reithofer <gerhard dot rithofer at tech-edv dot co dot at>

Contributor: Jeff Hobbs <jeffh at ActiveState dot com>
Contributor: Joe English <jenglish at users dot sourceforge dot net>
Contributor: Johannes-Heinrich Vogeler <vogeler at users dot sourceforge dot net>
Contributor: KATO Kanryu <kanryu6 at users dot sourceforge dot net>
Contributor: Kevin B, Kenny <kennykb at acm dot org>
Contributor: Kevin B. Kenny <kennykb at acm dot org>
Contributor: Kevin Kenny <kennykb at users dot sourceforge dot net>

Added INSTALL.txt.



























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
How to install Tcllib
=====================

Introduction
------------

The tcllib distribution, whether a snapshot directly from CVS, or
officially released, offers a single method for installing tcllib,
based on Tcl itself.

This is based on the assumption that for tcllib to be of use Tcl has
to be present, and therefore can be used.

This single method however can be used in a variety of ways.

0	For an unwrapped (= directory) distribution or CVS snapshot

	a.	either call the application 'installer.tcl' directly,
	b	or use

			% configure ; make install

		The latter is provided for people which are used to
		this method and more comfortable with it. In end this
		boils down into a call of 'installer.tcl' too.

1.	A starpack distribution (window-only) is a self-extracting
	installer which internally uses the aforementioned installer.

2.	A starkit distribution is very much like a starpack, but
	required an external interpreyter to run. This can be any tcl
	interpreter which has all the packages to support starkits
	(tclvfs, memchan, trf).

3.	A distribution in a tarball has to be unpacked first, then any
	of the methods described in (0) can be used.


Usage of the installer
----------------------

The installer selects automatically either a gui based mode, or a
command line based mode. If the package Tk is present and can be
loaded, then the GUI mode is entered, else the system falls back to
the command line.

Note that it is possible to specify options on the command line even
if the installer ultimatively selects a gui mode. In that case the
hardwired defaults and the options determine the data presented to the
user for editing.

Command line help can be asked for by using the option -help when
running the installer (3) or the distribution itself in the case of
(1) or (2).

The installer will select a number of defaults for the locations of
packages, examples, and documentation, and also the format of the
documentation. The user can overide these defaults in the GUI, or by
specifying additional options.

The defaults depend on the platform detected (unix/windows) and the
executable used to run the installer. In the case of a starpack
distribution (1) this means that _no defaults_ are possible for the
various locations as the executable is part of the distribution and
has no knowledge of its environment.

In all other cases the intepreter executable is outside of the
distribution, which means that its location can be used to determine
sensible defaults.

Notes
-----

The installer will overwrite an existing installation of tcllib 1.6
without asking back after the initial confirmation is given. And if
the user chooses the same directory as for tcllib 1.4, or 1.3, etc.
then the installer will overwrite that too.

Added README.

































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
RCS: @(#) $Id: README,v 1.9 2007/08/30 17:24:13 andreas_kupries Exp $

Welcome to the Tcllib, the Tcl Standard Library.  This package is
intended to be a collection of Tcl packages that provide utility
functions useful to a large collection of Tcl programmers.

The home web site for this code is http://core.tcl.tk/tcllib/ .
At this web site, you will find mailing lists, web forums, databases
for bug reports and feature requests, the CVS repository (browsable on
the web, or read-only accessible via CVS ), and more.

The structure of the tcllib source hierarchy is:

tcllib
 +- modules
     +- <module1>
     +- <module2>
     +- ...


The install hierarchy is:

.../lib/tcllib
        +- <module1>
        +- <module2>
        +- ...

There are some base requirements that a module must meet before it
will be added to tcllib:

* the module must be a proper Tcl package
* the module must use a namespace for its commands and variables
* the name of the package must be the same as the name of the
  namespace
* the module must reside in a subdirectory of the modules directory in
  the source hierarchy, and that subdirectory must have the same name
  as the package and namespace
* the module must be released under the BSD License, the terms of
  which can be found in the toplevel tcllib source directory in the file
  license.terms
* the module should have both documentation ([*]) and a test suite
  (in the form of a group of *.test files in the module directory).

  [*] Possible forms: doctools, TMML/XML, nroff (man), or HTML.
      The first format is the most preferred as it can be processed with
      tools provided by tcllib itself (See module doctools). The first
      two are preferred in general as they are semantic markup and thus
      easier to convert into other formats.

* the module must have either documentation or a test suite.  It can
  not have neither.
* the module should adhere to Tcl coding standards

When adding a module to tcllib, be sure to add it to the files listed below.

* installed_modules.tcl

  contains a table listing all modules to be installed, modules
  excluded, and names the actions to be taken during installation
  of each module. Add a line to this table naming your module and
  its actions.

  Three actions have to be specified, for the package itself, its
  documentation, and the examples demonstrating it.

  The _null action can be used everywhere and signals that there is
  nothing to do. Although it is possible to use it for the package
  action it does make no sense there, as that means that no package
  code is installed.

  Other package actions are _tcl, _tci, and _text. The first causes
  the installer to copy all .tcl files from the source directory for
  the module into the appropriate module directory. _tci does all that
  and also expects a tclIndex file to copy. _tex is like _tcl, however
  it also copies all .tex files found in the source directory for the
  module.

  There is currently only one true documentation action. This action
  is _doc. It converts all documentation in doctools format into the
  format chosen by the user for installation and copies the result
  into the appropriate directory.

  There is currently one true action for examples, _exa. It copies all
  files in the source directory for examples into the directory chosen
  by the user as destination for examples.

Each module source directory should have no subdirectories (other than
the CVS directory), and should contain the following files:

* source code		*.tcl
* package index		pkgIndex.tcl
* tests			*.test
* documentation		*.man, *.n, *.xml

If you do not follow this directory structure, the tcllib Makefile
will fail to locate the files from the new module.

Added README.developer.

























































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
RCS: @(#) $Id: README.developer,v 1.6 2009/06/02 22:49:55 andreas_kupries Exp $

Welcome to the tcllib, the Tcl Standard Library.
================================================

Introduction
------------

This README is intended to be a guide to the tools available to a

	Developer

working on Tcllib to help him with his tasks, i.e. making the tasks easier
to perform. It is our hope that this will improve the quality of even
non-released revisions of Tcllib, and make the work of the release
manager easier as well.

Audience
--------

The intended audience are, first and foremost, developers beginning to
work on Tcllib. To an experienced developer this document will be less
of a guide and more of a reference. Anybody else interested in working
on Tcllib is invited as well.


Directory hierarchy and file basics
------------------------------------

The main directories under the tcllib top directory are

	modules/
	examples/
and	apps/

Each directory FOO under modules/ represents one package, sometimes
more. In the case of the latter the packages are usually related in
some way. Examples are the base64, math, and struct modules, with
loose (base64) to strong (math) relations between the packages.

Examples associated with a module FOO, if there are any, are placed
into the directory

	examples/FOO

Any type of distributable application can be found under apps/,
together with their documentation, if any. Note that the apps/
directory is currently not split into sub-directories.

Regarding the files in Tcllib, the most common types found are

	.tcl	Tcl code for a package.

	.man	Documentation for a package, in doctools format.

	.test	Test suite for a package, or part of. Based on tcltest.

	.bench	Performance benchmarks for a package, or part of.
		Based on modules/bench

	.pcx	Syntax rules for TclDevKit's tclchecker. Using these
		rules allows tclchecker to check the use of commands
		of a Tcllib package X without having to scan the
		implementation of X, i.e. its .tcl files.


Adding a new module
-------------------

Assuming that FOO is the name of the new module, and T is the toplevel
directory of the Tcllib sources

(1)	Create the directory T/modules/FOO and put all the files of
	the module into it. Note:

	* The file 'pkgIndex.tcl' is required.

	* Implementation files should have the extension '.tcl',
	  naturally.

	* If available, documentation should be in doctools format,
          and the files should have the extension '.man' for SAK to
          recognize them.

	* If available the testsuite(s) should use 'tcltest' and the
	  general format as used by the other modules in Tcllib
	  (declaration of minimally needed Tcl, tcltest, supporting
	  packages, etc.). The file(s) should have the extension
	  '.test' for SAK to recognize them.

	  Note that an empty testsuite, or a testsuite which does not
	  perform any tests is less than useful and will not be
	  accepted.

	* If available the benchmark(s) should use 'bench' and the
          general format as used by the other modules in Tcllib. The
          file(s) should have the extension '.bench' for SAK to
          recognize them.

	* Other files can be named and placed as the module sees fit.

(2)	If the new module has an example application A which is
	polished enough for general use, put this application into the
	file "T/apps/A.tcl", and its documentation into the file
	"T/apps/A.man". While documentation for the application is
	optional, it is preferred.

	For examples which are not full-fledged applications, a
	skeleton, or not really polished for use, etc., create the
	directory T/examples/FOO/ and put them there.

	A key difference is what happens to them on installation, and
	what the target audience is.

	The examples are for developers using packages in Tcllib,
	whereas the applications are also for users of Tcllib which do
	not have an interest in developing for and with it. As such,
	they are installed as regular commands, accessible through the
	PATH, and example files are not installed.

(3)	To make Tcllib's installer aware of FOO, edit the file

		T/support/installation/modules.tcl

	Add a line 'Module FOO $impaction $docaction $exaction'. The
	various actions describe to the installer how to install the
	implementation files, the documentation, and the examples.

	Add a line 'Application A' for any application A which was
	added to T/apps for FOO.

	The following actions are available:

	Implementation

		_tcl - Copy all .tcl files in T/modules/FOO into the installation.
		_tcr - See above, does it for .tcl files in subdirectories as well.
		_tci - _tcl + Copying of a tclIndex - special to modules 'math', 'control'.
		_msg - _tcl + Copying of subdir 'msgs' - special to modules 'dns', 'log'.
		_doc - _tcl + Copying of subdir 'mpformats' - special to module 'doctools'.
		_tex - _tcl + Copying of .tex files - special to module 'textutil'.

		The _null action, see below, is available in principle
		too, but a module without implementation does not make
		sense.

	Documentation

		_null - Module has no documentation, do nothing.
		_man  - Process the .man files in T/modules/FOO and
			install the results (nroff and/or HTML) in the
			proper location, as given to the installer.

	Examples

		_null - Module has no examples, do nothing
		_exa  - Copy the directory T/examples/FOO
			(recursively) to the install location for
			examples.


Testing modules
---------------

To run the testsuite of a module FOO in tcllib use the 'test run'
argument of sak.tcl, like so:

	% pwd
	/the/tcllib/toplevel/directory

	% ./sak.tcl test run FOO
or	% ./sak.tcl test run modules/FOO

To run the testsuites of all modules either invoke 'test run' without a
module name, or use 'make test'. The latter assumes that configure was
run for Tcllib before, i.e.:

	% ./sak.tcl test run
or	% ./sak.tcl test run
	% make test

In all of the above cases the result will be a combination of progress
display and testsuite log, showing for each module the tests that pass
or failed and how many of each in a summary at the end.

To get a detailed log, it is necessary to invoke 'test run' with
additional options.

First example:
	% ./sak.tcl test run -l LOG FOO

This shows the same short log on the terminal, and writes a detailed
log to the file LOG.log, and excerpts to other files (LOG.summary,
LOG.failures, etc.).

Second example:
	% ./sak.tcl test run -v FOO
	% make test > LOG

This writes the detailed log to stdout, or to the file LOG, instead of
the short log. In all cases, the detailed log contains a list of all
test cases executed, which failed, and how they failed (expected
versus actual results).

Note:
The commands
	% make test
and	% make test > LOG

are able to generate different output (short vs long log) because the
Makefile target contains code which detects that stdout has been
redirected to a file and acts accordingly.

Non-developers should reports problems in Tcllib's bug tracker.
Information about its location and the relevant category can be found
in the section 'BUGS, IDEAS, FEEDBACK' of the manpage of the module
and/or package.

Module documentation
--------------------

The main format used for the documentation of packages in Tcllib is
'doctools', the support packages of which are part of Tcllib, see the
module 'doctools'.

To convert this documentation to HTML or nroff manpages, or some other
format use the 'doc' argument of sak.tcl, like so:

	% pwd
	/the/tcllib/toplevel/directory

	% ./sak.tcl doc html FOO
or	% ./sak.tcl doc html modules/FOO

The result of the conversion can be found in the newly-created 'doc'
directory in the current working directory.

The set of formats the documentation can be converted into can be
queried via

	% ./sak.tcl help doc


To convert the documentation of all modules either invoke 'test run'
without a module name, or use 'make html-doc', etc.. The latter
assumes that configure was run for Tcllib before, i.e.:

	% ./sak.tcl doc html
	% make html-doc

Note the special format 'validate'. Using this format does not convert
the documentation to anything (and the sub-directory 'doc' will not be
created), it just checks that the documentation is syntactically
correct. I.e.

	% ./sak.tcldoc validate modules/FOO
	% ./sak.tcldoc validate


Validating modules
------------------

Running the testsuite of a module, or checking the syntax of its
documentation (see the previous sections) are two forms of validation.

The 'validate' command of sak.tcl provides a few more. The online
documentation of this command is available via

	% ./sak.tcl help validate

The validated parts are man pages, testsuites, version information,
and syntax. The latter only if various static syntax checkers are
available on the PATH, like TclDevKit's tclchecker.

Note that testsuite validation is not the execution of the testsuites,
only if a package has a testsuite or not.

It is strongly recommended to validate a module before committing any
type of change made to it.

It is recommended to validate all modules before committing any type
of change made to one of them. We have package inter-dependencies
between packages in Tcllib, thus changing one package may break
others, and just validating the changed package will not catch such
problems.


Writing Tests
-------------

While a previous section talked about running the testsuite for a
module and the packages therein this has no meaning if the module in
question has no testsuites at all.

This section gives a very basic overview on methodologies for writing
tests and testsuites.

First there are "drudgery" tests. Written to check absolutely basic
assumptions which should never fail.

Example:

	For a command FOO taking two arguments, three tests calling it
	with zero, one, and three arguments. The basic checks that the
	command fails if it has not enough arguments, or too many.

After that come the tests checking things based on our knowledge of
the command, about its properties and assumptions. Some examples based
on the graph operations added during Google's Summer of Code 2009.

**	The BellmanFord command in struct::graph::ops takes a
	_startnode_ as argument, and this node should be a node of the
	graph. equals one test case checking the behavior when the
	specified node is not a node a graph.

	This often gives rise to code in the implementation which
	explicitly checks the assumption and throws a nice error.
	Instead of letting the algorithm fails later in some weird
	non-deterministic way.

	Such checks cannot be done always. The graph argument for
	example is just a command in itself, and while we expect it to
	exhibit a certain interface, i.e. set of sub-commands aka
	methods, we cannot check that it has them, except by actually
	trying to use them. That is done by the algorithm anyway, so
	an explicit check is just overhead we can get by without.

**	IIRC one of the distinguishing characteristic of either
	BellmanFord and/or Johnson is that they are able to handle
	negative weights. Whereas Dijkstra requires positive weights.

	This induces (at least) three testcases ... Graph with all
	positive weights, all negative, and a mix of positive and
	negative weights.

	Thinking further does the algorithm handle the weight '0' as
	well ? Another test case, or several, if we mix zero with
	positive and negative weights.

**	The two algorithms we are currently thinking about are about
	distances between nodes, and distance can be 'Inf'inity,
	i.e. nodes may not be connected. This means that good test
	cases are

	(1)	Strongly connected graph
	(2)	Connected graph
	(3)	Disconnected graph.

	At the extremes of (1) and (3) we have the fully connected
	graphs and graphs without edges, only nodes, i.e. completely
	disconnected.

**	IIRC both of the algorithms take weighted arcs, and fill in a
	default if arcs are left unweighted in the input graph.

	This also induces three test cases:

	(1)	Graph will all arcs with explicit weights.
	(2)	Graph without weights at all.
	(3)	Graph with mixture of weighted and unweighted graphs.


What was described above via examples is called 'black-box' testing.
Test cases are designed and written based on our knowledge of the
properties of the algorithm and its inputs, without referencing a
particular implementation.

Going further, a complement to 'black-box' testing is 'white-box'. For
this we know the implementation of the algorithm, we look at it and
design our tests cases so that they force the code through all
possible paths in the implementation. Wherever a decision is made we
have a test cases forcing a specific direction of the decision, for
all possible directions.

In practice I often hope that the black-box tests I have made are
enough to cover all the paths, obviating the need for white-box tests.

So, if you, dear reader, now believe that writing tests for an
algorithm takes at least as much time as coding the algorithm, and
often more time, then you are completely right. It does. Much more
time. See for example also http://sqlite.org/testing.html, a writeup
on how the Sqlite database engine is tested.



An interesting connection is to documentation. In one direction, the
properties you are checking with black-box testing are properties
which should be documented in the algorithm man page. And conversely,
if you have documentation of properties of an algorithm then this is a
good reference to base black-box tests on.

In practice test cases and documentation often get written together,
cross-influencing each other. And the actual writing of test cases is
a mix of black and white box, possibly influencing the implementation
while writing the tests. Like writing test for 'startnode not in input
graph' serving as reminder to put in a check for this into the code.

Changes to README.md.

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
# Attention




:warning: 

This repository is mirrored to [github](https://github.com/tcltk/tcllib).



We are __not tracking issues at github__.  With the exeception of the
maintainer of the mirroring setup nobody will even see issues created
at github.

Please use the
[official ticket tracker](https://core.tcl-lang.org/tcllib/reportlist)
instead.

# Welcome

Welcome to Tcllib, the Tcl Standard Library. Note that Tcllib is not a
package itself. It is a collection of (semi-independent) Tcl packages
that provide utility functions useful to a large collection of Tcl
programmers.

At our [home site](http://core.tcl-lang.org/tcllib) you will find the
official fossil repository used to manage our sources, together with
the bug tracker. This is also the main location for releases to
download from.

We have a
[secondary download location](https://sourceforge.net/projects/tcllib/files)
where the Tcllib sources were hosted in the past. SourceForge is also
where our [mailing lists](https://sourceforge.net/p/tcllib/mailman)
are (still) hosted.

Another location to find these sources at is the
[github mirror](https://github.com/tcltk/tcllib).

Please note the :warning: at the top.

# Guides To Tcllib

   * [Tcl Community - Kind Communication](embedded/www/tcllib/files/devdoc/tcl_community_communication.html)
   * [License](embedded/www/tcllib/files/devdoc/tcllib_license.html)
   * [How To Get The Sources](embedded/www/tcllib/files/devdoc/tcllib_sources.html)
   * [How To Build And Install Tcllib](embedded/www/tcllib/files/devdoc/tcllib_installer.html)
   * [The Developer's Guide](embedded/www/tcllib/files/devdoc/tcllib_devguide.html)
   * [The Release Manager's Guide](embedded/www/tcllib/files/devdoc/tcllib_releasemgr.html)
|
>

>
>
|
>
|
>

>
|
|
<


|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17

































Hello.

If you are reading this then you are very likely at the github
__mirror__ of the Tcllib sources.

This means that the
[official location of the sources](https://core.tcl.tk/tcllib)
is somewhere else, just follow the link.

This is also where our issue tracking is done.  We are not tracking
issues at github.  With the exeception of the maintainer of the
mirroring setup nobody will even see issues created at github.


Please use the
[official ticket tracker](https://core.tcl.tk/tcllib/reportlist)
instead.
































Added README.releasemgr.



































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
RCS: @(#) $Id: README.releasemgr,v 1.2 2009/07/10 16:33:31 andreas_kupries Exp $

Welcome to the tcllib, the Tcl Standard Library.
================================================

Introduction
------------

This README is intended to be a guide to the tools available to a

	Release manager

working on the creation of a release of Tcllib.

Audience
--------

The intended audience is the release manager of Tcllib, his deputies,
and anybody else interested in the task.

Basics
------

< Flesh this out >

	sak.tcl validate
	sak.tcl test run
	sak.tcl review
	sak.tcl readme
	sak.tcl localdoc
	sak.tcl release (change to include rpmspec+gentip55+yml)

< Tasks, and how to perform them >

  	 Making a release (candidate) branch.
	 Readying the release in the branch.
	 Make the release official, merging the branch back.

Uploading and releasing files
--------------------------------------------

(1) Create a proper fossil event for the release, via

      http://core.tcl.tk/tcllib/eventedit

    See existing events (*) for a template

    (Ad *) http://core.tcl.tk/tcllib/event/dac0ddcd2e990234143196b4dc438fe01e7b9817

(2) Update the following web locations

    (a) Home page:	http://core.tcl.tk/tcllib/home
    (b) Downloads:	http://core.tcl.tk/tcllib/wiki?name=Downloads 
    (c) Past Releases:	http://core.tcl.tk/tcllib/wiki?name=Past+Releases

    Admin access to the fossil repository required

    (d) http://www.tcl.tk/home/release.txt
    (e) http://www.tcl.tk/software/tcllib/*.tml

    ssh access to tcl.activestate.com
    aka        	  www.tcl.tk
    required.

    (f) http://wiki.tcl.tk/1246

Changes to apps/dtplite.man.

439
440
441
442
443
444
445
446
447

They are left in place, i.e. not deleted, to serve as demonstrations
of doctoc and docidx markup.

[list_end]

[vset CATEGORY doctools]
[include ../modules/common-text/feedback.inc]
[manpage_end]







|

439
440
441
442
443
444
445
446
447

They are left in place, i.e. not deleted, to serve as demonstrations
of doctoc and docidx markup.

[list_end]

[vset CATEGORY doctools]
[include ../modules/doctools2base/include/feedback.inc]
[manpage_end]

Changes to apps/nns.man.

135
136
137
138
139
140
141
142
143
If this option is not specified it defaults to [const 38573]. It
specifies the TCP port the name service to talk to is listening on for
requests.

[list_end]

[vset CATEGORY nameserv]
[include ../modules/common-text/feedback.inc]
[manpage_end]







|

135
136
137
138
139
140
141
142
143
If this option is not specified it defaults to [const 38573]. It
specifies the TCP port the name service to talk to is listening on for
requests.

[list_end]

[vset CATEGORY nameserv]
[include ../modules/doctools2base/include/feedback.inc]
[manpage_end]

Changes to apps/nnsd.man.

83
84
85
86
87
88
89
90
91

If this option is not specified it defaults to [const 38573]. It
specifies the TCP port the server has to listen on for requests.

[list_end]

[vset CATEGORY nameserv]
[include ../modules/common-text/feedback.inc]
[manpage_end]







|

83
84
85
86
87
88
89
90
91

If this option is not specified it defaults to [const 38573]. It
specifies the TCP port the server has to listen on for requests.

[list_end]

[vset CATEGORY nameserv]
[include ../modules/doctools2base/include/feedback.inc]
[manpage_end]

Changes to apps/nnslog.man.

85
86
87
88
89
90
91
92
93
If this option is not specified it defaults to [const 38573]. It
specifies the TCP port the name service to talk to is listening on for
requests.

[list_end]

[vset CATEGORY nameserv]
[include ../modules/common-text/feedback.inc]
[manpage_end]







|

85
86
87
88
89
90
91
92
93
If this option is not specified it defaults to [const 38573]. It
specifies the TCP port the name service to talk to is listening on for
requests.

[list_end]

[vset CATEGORY nameserv]
[include ../modules/doctools2base/include/feedback.inc]
[manpage_end]

Changes to apps/page.man.

459
460
461
462
463
464
465
466
467
[para]

The contents of both environment variables and registry entries are
interpreted as a list of paths, with the elements separated by either
colon (Unix), or semicolon (Windows).

[vset CATEGORY page]
[include ../modules/common-text/feedback.inc]
[manpage_end]







|

459
460
461
462
463
464
465
466
467
[para]

The contents of both environment variables and registry entries are
interpreted as a list of paths, with the elements separated by either
colon (Unix), or semicolon (Windows).

[vset CATEGORY page]
[include ../modules/doctools2base/include/feedback.inc]
[manpage_end]

Changes to apps/tcldocstrip.man.

189
190
191
192
193
194
195
196
197
Preambles, when active, are written before the actual content of a
generated file. In the same manner postambles are, when active,
written after the actual content of a generated file.

[list_end]

[vset CATEGORY docstrip]
[include ../modules/common-text/feedback.inc]
[manpage_end]







|

189
190
191
192
193
194
195
196
197
Preambles, when active, are written before the actual content of a
generated file. In the same manner postambles are, when active,
written after the actual content of a generated file.

[list_end]

[vset CATEGORY docstrip]
[include ../modules/doctools2base/include/feedback.inc]
[manpage_end]

Deleted devdoc/README.developer.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
RCS: @(#) $Id: README.developer,v 1.6 2009/06/02 22:49:55 andreas_kupries Exp $

Welcome to the tcllib, the Tcl Standard Library.
================================================

Introduction
------------

This README is intended to be a guide to the tools available to a

	Developer

working on Tcllib to help him with his tasks, i.e. making the tasks easier
to perform. It is our hope that this will improve the quality of even
non-released revisions of Tcllib, and make the work of the release
manager easier as well.

Audience
--------

The intended audience are, first and foremost, developers beginning to
work on Tcllib. To an experienced developer this document will be less
of a guide and more of a reference. Anybody else interested in working
on Tcllib is invited as well.


Directory hierarchy and file basics
------------------------------------

The main directories under the tcllib top directory are

	modules/
	examples/
and	apps/

Each directory FOO under modules/ represents one package, sometimes
more. In the case of the latter the packages are usually related in
some way. Examples are the base64, math, and struct modules, with
loose (base64) to strong (math) relations between the packages.

Examples associated with a module FOO, if there are any, are placed
into the directory

	examples/FOO

Any type of distributable application can be found under apps/,
together with their documentation, if any. Note that the apps/
directory is currently not split into sub-directories.

Regarding the files in Tcllib, the most common types found are

	.tcl	Tcl code for a package.

	.man	Documentation for a package, in doctools format.

	.test	Test suite for a package, or part of. Based on tcltest.

	.bench	Performance benchmarks for a package, or part of.
		Based on modules/bench

	.pcx	Syntax rules for TclDevKit's tclchecker. Using these
		rules allows tclchecker to check the use of commands
		of a Tcllib package X without having to scan the
		implementation of X, i.e. its .tcl files.


Adding a new module
-------------------

Assuming that FOO is the name of the new module, and T is the toplevel
directory of the Tcllib sources

(1)	Create the directory T/modules/FOO and put all the files of
	the module into it. Note:

	* The file 'pkgIndex.tcl' is required.

	* Implementation files should have the extension '.tcl',
	  naturally.

	* If available, documentation should be in doctools format,
          and the files should have the extension '.man' for SAK to
          recognize them.

	* If available the testsuite(s) should use 'tcltest' and the
	  general format as used by the other modules in Tcllib
	  (declaration of minimally needed Tcl, tcltest, supporting
	  packages, etc.). The file(s) should have the extension
	  '.test' for SAK to recognize them.

	  Note that an empty testsuite, or a testsuite which does not
	  perform any tests is less than useful and will not be
	  accepted.

	* If available the benchmark(s) should use 'bench' and the
          general format as used by the other modules in Tcllib. The
          file(s) should have the extension '.bench' for SAK to
          recognize them.

	* Other files can be named and placed as the module sees fit.

(2)	If the new module has an example application A which is
	polished enough for general use, put this application into the
	file "T/apps/A.tcl", and its documentation into the file
	"T/apps/A.man". While documentation for the application is
	optional, it is preferred.

	For examples which are not full-fledged applications, a
	skeleton, or not really polished for use, etc., create the
	directory T/examples/FOO/ and put them there.

	A key difference is what happens to them on installation, and
	what the target audience is.

	The examples are for developers using packages in Tcllib,
	whereas the applications are also for users of Tcllib which do
	not have an interest in developing for and with it. As such,
	they are installed as regular commands, accessible through the
	PATH, and example files are not installed.

(3)	To make Tcllib's installer aware of FOO, edit the file

		T/support/installation/modules.tcl

	Add a line 'Module FOO $impaction $docaction $exaction'. The
	various actions describe to the installer how to install the
	implementation files, the documentation, and the examples.

	Add a line 'Application A' for any application A which was
	added to T/apps for FOO.

	The following actions are available:

	Implementation

		_tcl - Copy all .tcl files in T/modules/FOO into the installation.
		_tcr - See above, does it for .tcl files in subdirectories as well.
		_tci - _tcl + Copying of a tclIndex - special to modules 'math', 'control'.
		_msg - _tcl + Copying of subdir 'msgs' - special to modules 'dns', 'log'.
		_doc - _tcl + Copying of subdir 'mpformats' - special to module 'doctools'.
		_tex - _tcl + Copying of .tex files - special to module 'textutil'.

		The _null action, see below, is available in principle
		too, but a module without implementation does not make
		sense.

	Documentation

		_null - Module has no documentation, do nothing.
		_man  - Process the .man files in T/modules/FOO and
			install the results (nroff and/or HTML) in the
			proper location, as given to the installer.

	Examples

		_null - Module has no examples, do nothing
		_exa  - Copy the directory T/examples/FOO
			(recursively) to the install location for
			examples.


Testing modules
---------------

To run the testsuite of a module FOO in tcllib use the 'test run'
argument of sak.tcl, like so:

	% pwd
	/the/tcllib/toplevel/directory

	% ./sak.tcl test run FOO
or	% ./sak.tcl test run modules/FOO

To run the testsuites of all modules either invoke 'test run' without a
module name, or use 'make test'. The latter assumes that configure was
run for Tcllib before, i.e.:

	% ./sak.tcl test run
or	% ./sak.tcl test run
	% make test

In all of the above cases the result will be a combination of progress
display and testsuite log, showing for each module the tests that pass
or failed and how many of each in a summary at the end.

To get a detailed log, it is necessary to invoke 'test run' with
additional options.

First example:
	% ./sak.tcl test run -l LOG FOO

This shows the same short log on the terminal, and writes a detailed
log to the file LOG.log, and excerpts to other files (LOG.summary,
LOG.failures, etc.).

Second example:
	% ./sak.tcl test run -v FOO
	% make test > LOG

This writes the detailed log to stdout, or to the file LOG, instead of
the short log. In all cases, the detailed log contains a list of all
test cases executed, which failed, and how they failed (expected
versus actual results).

Note:
The commands
	% make test
and	% make test > LOG

are able to generate different output (short vs long log) because the
Makefile target contains code which detects that stdout has been
redirected to a file and acts accordingly.

Non-developers should reports problems in Tcllib's bug tracker.
Information about its location and the relevant category can be found
in the section 'BUGS, IDEAS, FEEDBACK' of the manpage of the module
and/or package.

Module documentation
--------------------

The main format used for the documentation of packages in Tcllib is
'doctools', the support packages of which are part of Tcllib, see the
module 'doctools'.

To convert this documentation to HTML or nroff manpages, or some other
format use the 'doc' argument of sak.tcl, like so:

	% pwd
	/the/tcllib/toplevel/directory

	% ./sak.tcl doc html FOO
or	% ./sak.tcl doc html modules/FOO

The result of the conversion can be found in the newly-created 'doc'
directory in the current working directory.

The set of formats the documentation can be converted into can be
queried via

	% ./sak.tcl help doc


To convert the documentation of all modules either invoke 'test run'
without a module name, or use 'make html-doc', etc.. The latter
assumes that configure was run for Tcllib before, i.e.:

	% ./sak.tcl doc html
	% make html-doc

Note the special format 'validate'. Using this format does not convert
the documentation to anything (and the sub-directory 'doc' will not be
created), it just checks that the documentation is syntactically
correct. I.e.

	% ./sak.tcldoc validate modules/FOO
	% ./sak.tcldoc validate


Validating modules
------------------

Running the testsuite of a module, or checking the syntax of its
documentation (see the previous sections) are two forms of validation.

The 'validate' command of sak.tcl provides a few more. The online
documentation of this command is available via

	% ./sak.tcl help validate

The validated parts are man pages, testsuites, version information,
and syntax. The latter only if various static syntax checkers are
available on the PATH, like TclDevKit's tclchecker.

Note that testsuite validation is not the execution of the testsuites,
only if a package has a testsuite or not.

It is strongly recommended to validate a module before committing any
type of change made to it.

It is recommended to validate all modules before committing any type
of change made to one of them. We have package inter-dependencies
between packages in Tcllib, thus changing one package may break
others, and just validating the changed package will not catch such
problems.


Writing Tests
-------------

While a previous section talked about running the testsuite for a
module and the packages therein this has no meaning if the module in
question has no testsuites at all.

This section gives a very basic overview on methodologies for writing
tests and testsuites.

First there are "drudgery" tests. Written to check absolutely basic
assumptions which should never fail.

Example:

	For a command FOO taking two arguments, three tests calling it
	with zero, one, and three arguments. The basic checks that the
	command fails if it has not enough arguments, or too many.

After that come the tests checking things based on our knowledge of
the command, about its properties and assumptions. Some examples based
on the graph operations added during Google's Summer of Code 2009.

**	The BellmanFord command in struct::graph::ops takes a
	_startnode_ as argument, and this node should be a node of the
	graph. equals one test case checking the behavior when the
	specified node is not a node a graph.

	This often gives rise to code in the implementation which
	explicitly checks the assumption and throws a nice error.
	Instead of letting the algorithm fails later in some weird
	non-deterministic way.

	Such checks cannot be done always. The graph argument for
	example is just a command in itself, and while we expect it to
	exhibit a certain interface, i.e. set of sub-commands aka
	methods, we cannot check that it has them, except by actually
	trying to use them. That is done by the algorithm anyway, so
	an explicit check is just overhead we can get by without.

**	IIRC one of the distinguishing characteristic of either
	BellmanFord and/or Johnson is that they are able to handle
	negative weights. Whereas Dijkstra requires positive weights.

	This induces (at least) three testcases ... Graph with all
	positive weights, all negative, and a mix of positive and
	negative weights.

	Thinking further does the algorithm handle the weight '0' as
	well ? Another test case, or several, if we mix zero with
	positive and negative weights.

**	The two algorithms we are currently thinking about are about
	distances between nodes, and distance can be 'Inf'inity,
	i.e. nodes may not be connected. This means that good test
	cases are

	(1)	Strongly connected graph
	(2)	Connected graph
	(3)	Disconnected graph.

	At the extremes of (1) and (3) we have the fully connected
	graphs and graphs without edges, only nodes, i.e. completely
	disconnected.

**	IIRC both of the algorithms take weighted arcs, and fill in a
	default if arcs are left unweighted in the input graph.

	This also induces three test cases:

	(1)	Graph will all arcs with explicit weights.
	(2)	Graph without weights at all.
	(3)	Graph with mixture of weighted and unweighted graphs.


What was described above via examples is called 'black-box' testing.
Test cases are designed and written based on our knowledge of the
properties of the algorithm and its inputs, without referencing a
particular implementation.

Going further, a complement to 'black-box' testing is 'white-box'. For
this we know the implementation of the algorithm, we look at it and
design our tests cases so that they force the code through all
possible paths in the implementation. Wherever a decision is made we
have a test cases forcing a specific direction of the decision, for
all possible directions.

In practice I often hope that the black-box tests I have made are
enough to cover all the paths, obviating the need for white-box tests.

So, if you, dear reader, now believe that writing tests for an
algorithm takes at least as much time as coding the algorithm, and
often more time, then you are completely right. It does. Much more
time. See for example also http://sqlite.org/testing.html, a writeup
on how the Sqlite database engine is tested.



An interesting connection is to documentation. In one direction, the
properties you are checking with black-box testing are properties
which should be documented in the algorithm man page. And conversely,
if you have documentation of properties of an algorithm then this is a
good reference to base black-box tests on.

In practice test cases and documentation often get written together,
cross-influencing each other. And the actual writing of test cases is
a mix of black and white box, possibly influencing the implementation
while writing the tests. Like writing test for 'startnode not in input
graph' serving as reminder to put in a check for this into the code.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































































Added devdoc/cvs.branches.fig.

































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#FIG 3.2
Landscape
Center
Inches
Letter  
100.00
Single
-2
1200 2
6 3000 2025 5400 2400
4 0 12 50 0 0 14 0.0000 4 150 2385 3000 2175 Point releases are branched\001
4 0 12 50 0 0 14 0.0000 4 150 1530 3000 2370 from RELEASES\001
-6
6 2400 750 5700 1200
4 0 1 50 0 0 14 0.0000 4 195 3225 2400 900 Developer performs internal releases,\001
4 0 1 50 0 0 14 0.0000 4 195 3285 2400 1095 merging from HEAD into RELEASES\001
-6
2 1 0 4 0 7 50 0 -1 0.000 0 0 7 1 0 2
	2 1 4.00 240.00 480.00
	 300 600 5700 600
2 1 0 2 1 7 50 0 -1 0.000 0 0 -1 1 0 2
	2 1 2.00 120.00 240.00
	 2100 600 2400 1800
2 1 0 5 12 7 50 0 -1 0.000 0 0 -1 1 0 3
	2 1 5.00 300.00 600.00
	 2700 1800 3000 3000 5700 3000
2 1 0 4 17 7 50 0 -1 0.000 0 0 7 1 0 3
	2 1 4.00 240.00 480.00
	 1200 600 1500 1800 5700 1800
4 0 0 50 0 0 14 0.0000 4 195 2835 3150 1575 Staging for release : RELEASES\001
4 0 0 50 0 0 14 0.0000 4 195 1905 3900 300 Development : HEAD\001
4 0 0 50 0 0 14 0.0000 4 150 930 4800 2700 Tcllib 1.2.0\001

Added devdoc/devguide.html.





































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<!- Guide for Tcllib developers -->

<h1>Guide for Tcllib developers.
</h1>
<hr>

<h2>CVS Repository
</h2>
<table><tr><td valign=top>
      <!-- The local source of this image is
		tcllib/devel/cvs.branches.*
	-->
      <img src="http://sourceforge.net/dbimage.php?id=2221">
</td><td valign=top><p>

The CVS repository for Tcllib contains two main branches, the HEAD for
development, and RELEASES as the staging area for official
releases. At RELEASES the minor branches containing the various
official releases are anchored at.
</p></td></tr></table>

<p>All the branches are of interest to the developers for
      Tcllib. Ongoing development happens in HEAD, which can be
      unstable or may not work at all. Whenever a developer considers
      a piece of code, or module, he is responsible for as
      sufficiently stable she has to perform an internal release which
      merges this part from HEAD into RELEASES. Tools to help with
      this will be provided.
</p>

<p>The branches for the official releases of tcllib are of interest to
      a developer because it is expected that fixes for important bugs
      not only go into the HEAD branch but also into the release
      branches for the release they were found in and all releases
      following that one. This is to allow the release manager to
      create patch releases of existing releases distributing important
      bugfixes as well.
</p>

<p>Version numbers for modules are handled as described below. This
      way of handling them was chosen so that the modules in the
      development branch always uses version numbers different from
      the version numbers in the official releases made so far.
</p>
<ul>
<li>Whenever an internal release of a module FOO is done, the
	developer performing this internal release has to increment
	the version number of the module <b>after</b> the release was
	executed.
</ul>

Added devdoc/installation.txt.











































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
Tcllib installation directory layout
====================================

This document describes the possible layouts for an installed tcllib,
discusses their pro and contra and makes a choice for Tcllib 1.4. A
roadmap of changes in the future is made available as appendix.

[L1/D] Deep layout
------------------

	This is the layout of Tcllib 1.3 (and versions before that).

	A single directory tcllib<version> is created, and all
	subdirectories of the 'modules' subdirectory in the
	distribution is copied into it. This is restricted at large to
	*.tcl files, with exception made for some modules with special
	needs.

	Pro:
	Contra:
		Makes the handling of the various package indices,
		well, not difficult, but uncomfortable.


[L2/Fa] Flat layout 1
---------------------

	A directory is created for each module of tcllib.

	Pro:
		Handling of package indices is easier than for L1/D, a
		toplevel index file with all its problems is not
		required anymore.

	Contra:
		Directories should be versioned to avoid conflicts
		between multiple releases. modules have no
		version. This can be faked for modules containing one
		package, but not for the modules with more.


[L2/Fb] Flat layout 2
---------------------

	A directory is created for each package in tcllib.

	Pro
		Handling of package indices is easy, one per package.

	Contra:
		Modules containing more than one package are difficult
		to handle. The system has to split them into the
		individual packages. This rendered very difficult
		because of shared package index files.
	
		This can be solved by moving tcllib (back) towards of
		one package per module. When that goal is reached
		L2/Fa and L2/Fb become the same, and the contra for
		L2/Fa vanishes too as an exact version number can be
		associated with each directory.

Chosen layout for Tcllib 1.4
----------------------------

	L2/D

	Despite the problems with package indices the contras against
	the flat structures are too strong at this point in
	time. Automatic solutions are not really possible, or require
	a very high effort.

Roadmap
-------
	Change the module directories of tcllib to contain exactly one
	package per directory, with appropriate index (and meta data).

	This not only makes sense for easier handling of installation
	and package indices, but also in the greater context of
	wrapping code for deployment.


-----------------------------------
This document is in the public domain.

			Andreas Kupries	<andreas_kupries@users.sf.net>

Deleted devdoc/parts/b_critcl.inc.

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

While the majority of Tcllib consists of packages written in pure Tcl
a number of packages also have [term accelerators] associated with them.

These are [syscmd critcl]-based C packages whose use will boost the
performance of the packages using them.

These accelerators are optional, and they are not built by default.
If they are built according to the instructions below then they will
also be installed as well.

[para] To build the accelerators the normally optional dependency on
       [syscmd critcl] becomes required.

[para] To build and install Tcllib with the accelerators in a
       Unix-like environment invoke:

[example {
  ./configure
  make critcl  # Builds the shared library and package holding
               # the accelerators, tcllibc
  make install # Installs all packages, including the new tcllibc.
}]

[para] The underlying tool is [file sak.tcl] in the toplevel directory
of Tcllib and the command [cmd {make critcl}] is just a wrapper around

[example {
  ./sak.tcl critcl
}]

[para] Therefore in a Windows environment instead invoke

[example {
  ./sak.tcl critcl
  ./installer.tcl
}]

from within a DOS window, i.e. [syscmd cmd.exe].
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted devdoc/parts/b_tooling.inc.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109

The core of Tcllib's build system is the script [file installer.tcl]
found in the toplevel directory of a checkout or release.

[para] The
       [example {
         configure ; make install
       }]
       setup available to
       developers on Unix-like systems is just a wrapper around it.

       To go beyond the standard embodied in the wrapper it is
       necessary to directly invoke this script.

[para] On Windows system using it directly is the only way to invoke
       it.

[para] For basic help invoke it as

       [example {
         ./installer.tcl -help
       }]

       This will print a short list of all the available options to
       the standard output channel.

[para] The commands associated with the various [term install] targets
       in the [term Makefile.in] for Unix can be used as additional
       examples on how to use this tool as well.

[para] The installer can operate in GUI and CLI modes.

       By default it chooses the mode automatically, based on if the
       Tcl package [package Tk] can be used or not.

       The option [option -no-gui] can be used to force CLI mode.

[para] Note that it is possible to specify options on the command line
       even if the installer ultimatively selects GUI mode. In that
       case the hardwired defaults and the options determine the data
       presented to the user for editing.

[para] The installer will select a number of defaults for the
       locations of packages, examples, and documentation, and also
       the format of the documentation. The user can overide these
       defaults in the GUI, or by specifying additional options.

       The defaults depend on the platform detected (Unix/Windows) and
       on the [syscmd tclsh] executable used to run the installer.

[para][emph Options]

[list_begin options]
[opt_def -help]

Show the list of options explained here on the standard output channel
and exit.

[opt_def +excluded]

Include deprecated packages in the installation.

[opt_def -no-gui]

Force command line operation of the installer

[opt_def -no-wait]

In CLI mode the installer will by default ask the user to confirm that
the chosen configuration (destination paths, things to install) is
correct before performing any action. Using this option causes the
installer to skip this query and immediately jump to installation.

[opt_def -app-path [arg path]]
[opt_def -example-path [arg path]]
[opt_def -html-path [arg path]]
[opt_def -nroff-path [arg path]]
[opt_def -pkg-path [arg path]]

Declare the destination paths for the applications, examples, html
documentation, nroff manpages, and packages. The defaults are derived
from the location of the [syscmd tclsh] used to run the installer.

[opt_def -dry-run]
[opt_def -simulate]

Run the installer without modifying the destination directories.

[opt_def -apps]
[opt_def -no-apps]
[opt_def -examples]
[opt_def -no-examples]
[opt_def -pkgs]
[opt_def -no-pkgs]
[opt_def -html]
[opt_def -no-html]
[opt_def -nroff]
[opt_def -no-nroff]

(De)activate the installation of applications, examples, packages,
html documentation, and nroff manpages.

[para] Applications, examples, and packages are installed by default.

[para] On Windows the html documentation is installed by default.

[para] On Unix the nroff manpages are installed by default.

[list_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































Deleted devdoc/parts/b_unix.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

For [term Unix]-like environments Tcllib comes with the standard set
of files to make

[example {
  ./configure
  make install
}]

a suitable way of installing it.

This is a standard non-interactive install automatically figuring out
where to place everything, i.e. packages, applications, and the
manpages.

[para] To get a graphical installer invoke

[example {
  ./installer.tcl
}]

instead.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































Deleted devdoc/parts/b_windows.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

In a Windows environment we have the [cmd installer.tcl] script to
perform installation.

[para] If the desired [syscmd tclsh] is associated [file .tcl] files
       then double-clicking / opening the [cmd installer.tcl] is
       enough to invoke it in graphical mode.

       This assumes that [term Tk] is installed and available as well.

[para] Without [term Tk] the only way to invoke the installer are to
       open a DOS window, i.e. [syscmd cmd.exe], and then to invoke
      
[example {
  ./installer.tcl
}]

inside it.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted devdoc/parts/d_bf_branchcmds.inc.

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

In the hope of engendering good work practices now a few example
operations which will come up with branches, and their associated
fossil command (sequences).

[list_begin definitions]

[comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]
[def [emph Awareness]]
[include d_op_aware.inc]

[comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]
[def [emph {Clean checkouts}]]
[include d_op_clean.inc]

[comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]
[def [emph {Starting a new branch}]]
[include d_op_branch_open.inc]

[comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]
[def [emph {Merging a branch into trunk}]]
[include d_op_branch_close.inc]

[comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]
[def [emph {Merging from trunk}]]
[include d_op_branch_import.inc]

[list_end]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted devdoc/parts/d_bf_branches.inc.

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

Given the constraints placed on the [term trunk] branch of the
repository it is (strongly) recommended to perform any development
going beyond trivial changes on a non-trunk branch.

[para] Outside of the trunk developers are allowed to commit
       intermediate broken states of their work.

       Only at the end of a development cycle, when the relevant
       branch is considered ready for merging, will it be necessary to
       perform full the set of validations ensuring that the merge to
       come will create a good commit on trunk.

[para] Note that while a review from a second developer is not a
       required condition for merging a branch it is recommended to
       seek out such an independent opinion as a means of
       cross-checking the work.

[para] It also recommended to give any new branch a name which aids in
       determining additional details about it. Examples of good
       things to stick into a branch name would be

[list_begin itemized]
[item]	Developer (nick)name
[item]	Ticket hash/reference
[item]	One or two keywords applicable to the work
[item]	...
[list_end]

[para] Further, while most development branches are likely quite
       short-lived, no prohibitions exist against making longer-lived
       branches.

       Creators should however be mindful that the longer such a
       branch exists without merges the more divergent they will tend
       to be, with an associated increase in the effort which will
       have to be spent on either merging from and merging to trunk.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































Deleted devdoc/parts/d_bf_dependencies.inc.

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

Regarding packages and dependencies between them Tcllib occupies a
middle position between two extremes:

[list_begin enumerated]

[enum] On one side a strongly interdependent set of packages, usually
       by a single author, for a single project. Looking at my
       (Andreas Kupries) own work examples of such are
       [uri https://core.tcl.tk/akupries/marpa/index Marpa],
       [uri https://core.tcl.tk/akupries/crimp/index CRIMP],
       [uri https://core.tcl.tk/akupries/kinetcl/index Kinetcl], etc.

[para] For every change the author of the project handles all the
       modifications cascading from any incompatibilities it
       introduced to the system.

[enum] On the other side, the world of semi-independent projects by
       many different authors where authors know what packages their
       own creations depend on, yet usually do not know who else
       depends on them.

[para] The best thing an author making an (incompatible) change to
       their project can do is to for one announce such changes in
       some way, and for two use versioning to distinguish the code
       before and after the change.

[para] The world is then responsible for adapting, be it by updating
       their own projects to the new version, or by sticking to the
       old.

[list_end]

As mentioned already, Tcllib lives in the middle of that.

[para] While we as maintainers cannot be aware of all users of
       Tcllib's packages, and thus have to rely on the mechanisms
       touched on in point 2 above for that, the dependencies between
       the packages contained in Tcllib are a different matter.

[para] As we are collectively responsible for the usability of Tcllib
       in toto to the outside world, it behooves us to be individually
       mindful even of Tcllib packages we are not directly
       maintaining, when they depend on packages under our
       maintainership.

       This may be as simple as coordinating with the maintainers of
       the affected packages.

       It may also require us to choose how to adapt affected packages
       which do not have maintainers, i.e. modify them to use our
       changed package properly, or modify them to properly depend on
       the unchanged version of our package.

[para] Note that the above is not only a chore but an opportunity as
       well.

       Additional insight can be had by forcing ourselves to look at
       our package and the planned change(s) from an outside
       perspective, to consider the ramifications of our actions on
       others in general, and on dependent packages in particular.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































Deleted devdoc/parts/d_bf_trunk.inc.

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

The management and use of branches is an important part of working
with a [term {Distributed Version Control System}] ([term DVCS]) like
[uri https://www.fossil-scm.org/ fossil].

[para] For Tcllib the main branch of the collection is
       [term trunk]. In [term git] this branch would be called
       [term master], and this is exactly the case in the
       [uri https://github.com/tcltk/tcllib/ {github mirror}] of
       Tcllib.

[para] To properly support debugging [emph {each commit}] on this
       branch [emph {has to pass the entire testsuite}] of the
       collection. Using bisection to determine when an issue appeared
       is an example of an action made easier by this constraint.

[para] This is part of our collective responsibility for the usability
       of Tcllib in toto to the outside world.

       As [term fossil] has no mechanism to enforce this condition
       this is handled on the honor system for developers and maintainers.

[para] To make the task easier Tcllib comes with a tool
       ([file sak.tcl]) providing a number of commands in
       support. These commands are explained in the following sections
       of this guide.

[para] While it is possible and allowed to commit directly to trunk
       remember the above constraint regarding the testsuite, and the
       coming notes about other possible issues with a commit.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































Deleted devdoc/parts/d_bf_versions.inc.

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
In Tcllib all changes to a package have to come with an increment of
its version number. What part is incremented (patchlevel, minor, major
version) depends on the kind of change made. With multiple changes in
a commit the highest "wins".

[para] When working in a development branch the version change can be
       deferred until it is time to merge, and then has to cover all
       the changes in the branch.

[para] Below a list of the kinds of changes and their associated
       version increments:

[list_begin definitions]
[def [term {D - documentation}]] No increment
[def [term {T - testsuite}]] No increment
[def [term {B - bugfix}]] Patchlevel
[def [term {I - implementation tweak}]] Patchlevel
[def [term {P - performance tweak}]] Patchlevel
[def [term {E - backward-compatible extension}]] Minor
[def [term {API - incompatible change}]] Major
[list_end]

[para] Note that a commit containing a version increment has to
       mention the new version number in its commit message, as well
       as the kind of change which caused it.

[para] Note further that the version number of a package currently
       exists in three places. An increment has to update all of them:

[list_begin enumerated]
[enum] The package implementation.
[enum] The package index ([file pkgIndex.tcl])
[enum] The package documentation.
[list_end]

[para] The [file sak.tcl] command [cmd {validate version}] helps
       finding discrepancies between the first two.

       All the other [cmd validate] methods are also of interest to
       any developer. Invoke it with

       [example { sak.tcl help validate }]

       to see their documentation.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































Deleted devdoc/parts/d_branchflow.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[comment {===================================================================}]
[subsection {Package Dependencies}]
[include d_bf_dependencies.inc]

[comment {===================================================================}]
[subsection Trunk]
[include d_bf_trunk.inc]

[comment {===================================================================}]
[subsection Branches]
[include d_bf_branches.inc]

[comment {===================================================================}]
[subsection {Working with Branches}]
[include d_bf_branchcmds.inc]

[comment {===================================================================}]
[subsection {Version numbers}]
[include d_bf_versions.inc]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Deleted devdoc/parts/d_contrib.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

As a contributor to Tcllib you are committing yourself to:

[list_begin enumerated]

[enum] keep the guidelines written down in
       [term {Tcl Community - Kind Communication}] in your mind.
       The main point to take away from there is
       [emph {to be kind to each other}].

[enum] Your contributions getting distributed under a BSD/MIT license.
       For the details see [term {Tcllib - License}]

[list_end]

Contributions are made by entering tickets into our tracker, providing
patches, bundles or branches of code for inclusion, or posting to the
Tcllib related mailing lists.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted devdoc/parts/d_dirlayout.inc.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

[subsection {Main Directories}]

The main directories in the Tcllib toplevel directory and of interest
to a developer are:

[list_begin definitions]

[def [file modules]]

Each child directory represents one or more packages.

In the case of the latter the packages are usually related in some
way. Examples are [file base64], [file math], and [file struct], with
loose (base64) to strong (math) relations between the packages in the
directory.

[def [file apps]]

This directory contains all the installable applications, with their
documentation. Note that this directory is currently [emph not] split
into sub-directories.

[def [file examples]]

Each child directory [file foo] contains one or more example
application for the packages in [file modules/foo]. These examples are
generally not polished enough to be considered for installation.

[list_end]

[subsection {More Directories}]

[list_begin definitions]

[def [file config]]

This directory contains files supporting the Unix build system,
i.e. [file configure] and [file Makefile.in].

[def [file devdoc]]

This directories contains the doctools sources for the global
documentation, like this document and its sibling guides.

[def [file embedded]]

This directory contains the entire documentation formatted for
[term HTML] and styled to properly mix into the web site generated by
fossil for the repository.

[para] This is the documentation accessible from the Tcllib home
directory, represented in the repository as [file embedded/index.md].

[def [file idoc]]

This directory contains the entire documentation formatted for
[term nroff] and [term HTML], the latter without any styling.
This is the documentation which will be installed.

[def [file support]]

This directory contains the sources of internal packages and utilities
used in the implementation of the [file installer.tcl] and
[file sak.tcl] scripts/tools.

[list_end]

[subsection {Top Files}]

[list_begin definitions]
[def [file aclocal.m4]]
[def [file configure]]
[def [file configure.in]]
[def [file Makefile.in]]

These four files comprise the Unix build system layered on top of the
[file installer.tcl] script.

[def [file installer.tcl]]

The Tcl-based installation script/tool.

[def [file project.shed]]

Configuration file for [term {Sean Wood}]'s [syscmd PracTcl]
buildsystem.

[def [file sak.tcl]]
This is the main tool for developers and release managers, the
[term {Swiss Army Knife}] of management operations on the collection.

[def [file ChangeLog]]

The log of changes to the global support, when the sources were held
in [term CVS]. Not relevant any longer with the switch to the
[term fossil] SCM.

[def [file license.terms]]

The license in plain ASCII. See also [term {Tcllib - License}] for the
nicely formatted form. The text is identical.

[def [file README.md]]
[def [file .github/CONTRIBUTING.md]]
[def [file .github/ISSUE_TEMPLATE.md]]
[def [file .github/PULL_REQUEST_TEMPLATE.md]]

These markdown-formatted documents are used and shown by the github
mirror of these sources, pointing people back to the official location
and issue trackers.

[def [file DESCRIPTION.txt]]
[def [file STATUS]]
[def [file tcllib.spec]]
[def [file tcllib.tap]]
[def [file tcllib.yml]]

????

[list_end]

[subsection {File Types}]

The most common file types, by file extension, are:

[list_begin definitions]

[def [file .tcl]]
Tcl code for a package, application, or example.

[def [file .man]]
Doctools-formatted documentation, usually for a package.

[def [file .test]]
Test suite for a package, or part of.
Based on [package tcltest].

[def [file .bench]]
Performance benchmarks for a package, or part of.
Based on [file modules/bench].

[def [file .pcx]]
Syntax rules for [term TclDevKit]'s [syscmd tclchecker]. Using these
rules allows the checker to validate the use of commands of a Tcllib
package [package foo] without having to scan the [file .tcl] files
implementing it.

[list_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































Deleted devdoc/parts/d_documentation.inc.

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

The standard format used for documentation of packages and other
things in Tcllib is [term doctools].

Its supporting packages are a part of Tcllib, see the directories
[file modules/doctools] and [file modules/dtplite]. The latter is
an application package, with the actual application
[file apps/dtplite] a light wrapper around it.

[para] Tcllib developers gain access to these through the [cmd doc]
method of the [file sak.tcl] tool, another (internal) wrapper around
the [file modules/dtplite] application package.

[comment {===================================================================}]
[subsection {Generate documentation for a specific module}]

Invoke either

[example {  ./sak.tcl doc html foo }]

or

[example {  ./sak.tcl doc html modules/foo }]

to generate HTML for the documentation found in the module [file foo].

Instead of [const html] any other supported format can be used here,
of course.

[para] The generated formatted documentation will be placed into a
directory [file doc] in the current working directory.

[comment {===================================================================}]
[subsection {Generate documentation for all modules}]

Invoke the tool without a module name, i.e.

[example {  ./sak.tcl doc html }]

to generate HTML for the documentation found in all modules.

Instead of [const html] any other supported format can be used here,
of course.

[para] The generated formatted documentation will be placed into a
directory [file doc] in the current working directory.

[comment {===================================================================}]
[subsection {Available output formats, help}]

Invoke the tool as

[example {  ./sak.tcl help doc }]

to see the entire set of supported output formats which can be
generated.

[comment {===================================================================}]
[subsection {Validation without output}]

Note the special format [const validate].

[para] Using this value as the name of the format to generate forces
the tool to simply check that the documentation is syntactically
correct, without generating actual output.

[para] Invoke it as either

[example {  ./sak.tcl doc validate (modules/)foo }]

or

[example {  ./sak.tcl doc validate }]

to either check the packages of a specific module or check all of
them.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































Deleted devdoc/parts/d_installation.inc.

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
89
90
91
92
93
94
A last thing to consider when adding a new package to the collection
is installation.

[para] How to [emph use] the [file installer.tcl] script is documented
in [term {Tcllib - The Installer's Guide}].

[para] Here we document how to extend said installer so that it may
install new package(s) and/or application(s).

[para] In most cases only a single file has to be modified, the
[file support/installation/modules.tcl] holding one command per module
and application to install.

[para] The relevant commands are:

[list_begin definitions]

[call [cmd Module] [arg name] \
      	   [arg code-action] \
      	   [arg doc-action] \
	   [arg example-action]]

Install the packages of module [arg name], found in
[file modules/[arg name]].

[para] The [arg code-action] is responsible for installing the
packages and their index. The system currently provides

[list_begin definitions]

[def [cmd _tcl]] Copy all [file .tcl] files found in
[file modules/[arg name]] into the installation.

[def [cmd _tcr]] As [cmd _tcl], copy the [file .tcl] files found in
the subdirectories of [file modules/[arg name]] as well.

[def [cmd _tci]] As [cmd _tcl], and copy the [file tclIndex.tcl] file
as well.

[def [cmd _msg]] As [cmd _tcl], and copy the subdirectory [file msgs]
as well.

[def [cmd _doc]] As [cmd _tcl], and copy the subdirectory
[file mpformats] as well.

[def [cmd _tex]] As [cmd _tcl], and copy [file .tex] files as well.

[list_end]

[para] The [arg doc-action] is responsible for installing the package
documentation. The system currently provides

[list_begin definitions]
[def [cmd _null]] No documentation available, do nothing.

[def [cmd _man]] Process the [file .man] files found in
[file modules/[arg name]] and install the results (nroff and/or HTML)
in the proper location, as given to the installer.

[para] This is actually a fallback, normally the installer uses the
pre-made formatted documentation found under [file idoc].

[list_end]

[para] The [arg example-action] is responsible for installing the
examples. The system currently provides

[list_begin definitions]
[def [cmd _null]] No examples available, do nothing.

[def [cmd _exa]] Copy the the directory [file examples/[arg name]]
recursively to the install location for examples.

[list_end]

[call [cmd Application] [arg name]]

Install the application with [arg name], found in [file apps].


[call [cmd Exclude] [arg name]]

This command signals to the installer which of the listed modules to
[emph not] install. I.e. they name the deprecated modules of Tcllib.

[list_end]

[para] If, and only if the above actions are not suitable for the new
module then a second file has to be modified,
[file support/installation/actions.tcl].

[para] This file contains the implementations of the available
actions, and is the place where any custom action needed to handle the
special circumstances of module has to be added.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































Deleted devdoc/parts/d_maintain.inc.

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

When contributing one or more packages for full inclusion into Tcllib
you are committing yourself to

[list_begin enumerated]

[enum] Keep the guidelines written down in
       [term {Tcl Community - Kind Communication}]
       (as any contributor) in your mind. The main point to take away
       from there is [emph {to be kind to each other}].

[enum] Your packages getting distributed under a BSD/MIT license.  For
       the details see [term {Tcllib - License}]

[enum] Maintenance of the new packages for a period of two years under
       the following rules, and responsibilities:

       [list_begin enumerated]

       [enum] A maintainer may step down after the mandatory period as
       	      they see fit.

       [enum] A maintainer may step down before the end of the
      	      mandatory period, under the condition that a replacement
      	      maintainer is immediately available and has agreed to
      	      serve the remainder of the period, plus their own
      	      mandatory period (see below).

       [enum] When stepping down without a replacement maintainer
      	      taking over the relevant packages have to be flagged as
      	      [const unmaintained].

       [enum] When a replacement mantainer is brought in for a package
      	      it is (kept) marked as [const maintained] (again).

       [para] A replacement maintainer is bound by the same rules as
	      the original maintainer, except that the mandatory
	      period of maintenance is shortened to one year.

       [enum] For any [const unmaintained] package a contributor
       	      interested in becoming its maintainer can become so by
       	      flagging them as [const maintained] with their name and
       	      contact information, committing themselves to the rules
       	      of a replacement maintainer (see previous point).

       [enum] For any already [const maintained] package a contributor
       	      interested in becoming a co-maintainer can become so
       	      with the agreement of the existing maintainer(s),
       	      committing themselves to the rules of a replacement
       	      maintainer (see two points previous).

       [list_end]

       [para] The responsibilities as a maintainer include:

       [list_begin enumerated]

       [enum] Watching Tcllib's ticket tracker for bugs, bug fixes,
       	      and feature requests related to the new packages.

       [enum] Reviewing the aforementioned tickets, rejecting or
       	      applying them

       [enum] Coordination and discussion with ticket submitter during
       	      the development and/or application of bug fixes.

       [list_end]

[enum] Follow the [sectref {Branching and Workflow}] of this guide.

[list_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































Deleted devdoc/parts/d_op_aware.inc.

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

When developing we have to keep ourselves aware of the context of our
work. On what branch are we ? What files have we changed ? What new
files are not yet known to the repository ? What has happened remotely
since we used our checkout ?

The answers to these questions become especially important when using
a long-lived checkout and coming back to it after some time away.

[para] Commands to answer questions like the above are:

[list_begin definitions]

[def [cmd {fossil pull}]]

       Get all changes done on the remote since the last pull or sync
       from it. This has to be done first, before any of the commands
       below.

[para] Even if the commit in our checkout refers to the branch we want
       right now control operations committed to the remote may have
       changed that from underneath us.

[def [cmd {fossil info | grep tags}]]
[def [cmd {fossil branch list | grep '\*'}]]

       Two different ways of determining the branch our checkout is
       on.

[def [cmd {fossil timeline}]]

       What have we (and others) done recently ?

[para] [emph Attention], this information is very likely outdated, the
       more the longer we did not use this checkout.

       Run [cmd {fossil pull}] first to get latest information from
       the remote repository of the project.

[def [cmd {fossil timeline current}]]

       Place the commit our checkout is based on at the top of the
       timeline.

[def [cmd {fossil changes}]]

       Lists the files we have changed compared to the commit the
       checkout is based on.

[def [cmd {fossil extra}]]

       Lists the files we have in the checkout the repository does not
       know about. This may be leftover chaff from our work, or
       something we have forgotten to [cmd {fossil add}] to the
       repository yet.

[list_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































Deleted devdoc/parts/d_op_branch_close.inc.

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

Be aware of where you are (see first definition).

[para] Ensure that you have clean checkout (see second definition).

       In the full-blown sequence (zig-zag) it is [emph required], due
       to the merging from trunk. In the shorter sequence it is only
       desired. That said, keeping the checkout clean before
       any major operations is a good habit to have, in my opinion.

[para] The full-blown sequencing with checks all the way is to

[list_begin enumerated]

[enum] Validate the checkout, i.e. last commit on your branch. Run the
       full test suite and other validations, fix all the issues which
       have cropped up.

[enum] Merge the latest state of the [term trunk] (see next definition).

[enum] Validate the checkout again. The incoming trunk changes may
       have broken something now. Do any required fixes.

[enum] Now merge to the trunk using

[example {
    fossil update trunk
    fossil merge --integrate YOUR_BRANCH
}]

[enum] At this point the checkout should be in the same state as at
       the end of point (3) above, because we resolved any issues with
       the trunk already. Thus a simple

[example {
    fossil commit ...
}]

       should be sufficient now to commit the merge back and close the
       branch (due to the [option --integrate] we used on the merge).

[para] The more paranoid may validate the checkout a third time before
       commiting.
[list_end]

[para] I call this a [term {zig-zag merge}] because of how the arrows
       look in the timeline, from trunk to feature branch for the
       first merge, and then back for the final merge.

[para] A less paranoid can do what I call a [term {simple merge}],
       which moves step (2) after step (4) and skips step (3)
       entirely. The resulting shorter sequence is

[list_begin enumerated]
[enum] Validate
[enum] Merge to trunk
[enum] Validate again
[enum] Commit to trunk
[list_end]

The last step after either zig-zag or plain merge is to

[example {
    fossil sync
}]

This saves our work to the remote side, and further gives us any other
work done while we were doing our merge. It especially allows us to
check if we raced somebody else, resulting in a split trunk.

[para] When that happens we should coordinate with the other developer
       on who fixes the split, to ensure that we do not race each
       other again.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































Deleted devdoc/parts/d_op_branch_import.inc.

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

Be aware of where you are (see first definition).

[para] Ensure that you have clean checkout (see second definition).
       It is [emph required].
       
[para] In most situations you want to import the latest commit of
       branch [term trunk] (or other origin). To get it use

[example {
    fossil pull
}]

[para] With that done we can now import this commit into our current
       branch with

[example {
    fossil merge trunk
}]

[para] Even if [syscmd fossil] does not report any conflicts it is a
       good idea to check that the operation has not broken the new
       and/or changed functionality we are working on.

[para] With the establishment of a good merge we then save the state
       with

[example {
    fossil commit ...
}]

before continuing development.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted devdoc/parts/d_op_branch_open.inc.

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

Be aware of where you are (see first definition).

[para] Ensure that you have clean checkout (see second definition).
       It is [emph required].

[para] In most situations you want to be on branch [term trunk], and
       you want to be on the latest commit for it. To get there use

[example {
    fossil pull
    fossil update trunk
}]

If some other branch is desired as the starting point for the coming
work replace [term trunk] in the commands above with the name of that
branch.

[para] With the base line established we now have two ways of creating
       the new branch, with differing (dis)advantages.

       The simpler way is to

[example {
    fossil branch new NAME_OF_NEW_BRANCH
}]

and start developing. The advantage here is that you cannot forget to
create the branch. The disadvantages are that we have a branch commit
unchanged from where we branched from, and that we have to use
high-handed techniques like hiding or shunning to get rid of the
commit should we decide to abandon the work before the first actual
commit on the branch.

[para] The other way of creating the branch is to start developing,
and then on the first commit use the option [option --branch] to tell
[syscmd fossil] that we are starting a branch now. I.e. run

[example {
    fossil commit --branch NAME_OF_NEW_BRANCH ...
}]

where [term ...] are any other options used to supply the commit
message, files to commit, etc.

[para] The (dis)advantages are now reversed.

[para] We have no superflous commit, only what is actually
       developed. The work is hidden until we commit to make our first
       commit.

[para] We may forget to use [option {--branch NAME_OF_NEW_BRANCH}] and
       then have to correct that oversight via the fossil web
       interface (I am currently unaware of ways of doing such from
       the command line, although some magic incantantion of
       [cmd {fossil tag create}] may work).

[para] It helps to keep awareness, like checking before any commit
       that we are on the desired branch.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































Deleted devdoc/parts/d_op_clean.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14

Be aware of where you are (see first definition).

[para] For pretty much all the operation recipes below a clean
       checkout is at least desired, often required.
       To check that a checkout is clean invoke

[example {
    fossil changes
    fossil extra
}]

How to clean up when uncommitted changes of all sorts are found is
context-specific and outside of the scope of this guide.
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Deleted devdoc/parts/d_testing.inc.

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
89
90

Testsuites in Tcllib are based on Tcl's standard test package
[package tcltest], plus utilities found in the directory
[file modules/devtools]

[para] Tcllib developers invoke the suites through the
[cmd {test run}] method of the [file sak.tcl] tool, with other methods
of [cmd test] providing management operations, for example setting a
list of standard Tcl shells to use.

[comment {===================================================================}]
[subsection {Invoke the testsuites of a specific module}]

Invoke either

[example {  ./sak.tcl test run foo }]

or

[example {  ./sak.tcl test run modules/foo }]

to invoke the testsuites found in a specific module [file foo].

[comment {===================================================================}]
[subsection {Invoke the testsuites of all modules}]

Invoke the tool without a module name, i.e.

[example {  ./sak.tcl test run }]

to invoke the testsuites of all modules.

[comment {===================================================================}]
[subsection {Detailed Test Logs}]

In all the previous examples the test runner will write a combination
of progress display and testsuite log to the standard output, showing
for each module only the tests that passed or failed and how many of
each in a summary at the end.

[para] To get a detailed log, it is necessary to invoke the test
runner with additional options.

[para] For one:

[example {
   ./sak.tcl test run --log LOG foo
}]

While this shows the same short log on the terminal as before, it also
writes a detailed log to the file [file LOG.log], and excerpts to
other files ([file LOG.summary], [file LOG.failures], etc.).

[para] For two:

[example {
  ./sak.tcl test run -v foo
}]

This writes the detailed log to the standard output, instead of the
short log.

[para] Regardless of form, the detailed log contains a list of all test
cases executed, which failed, and how they failed (expected versus
actual results).

[comment {===================================================================}]
[subsection {Shell Selection}]

By default the test runner will use all the Tcl shells specified via
[cmd {test add}] to invoke the specified testsuites, if any. If no
such are specified it will fall back to the Tcl shell used to run the
tool itself.

[para] Use option [option --shell] to explicitly specify the Tcl shell
to use, like

[example {
  ./sak.tcl test run --shell /path/to/tclsh ...
}]

[comment {===================================================================}]
[subsection Help]

Invoke the tool as

[example {  ./sak.tcl help test }]

to see the detailed help for all methods of [cmd test], and the
associated options.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































Deleted devdoc/parts/d_testwrite.inc.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

While previous sections talked about running the testsuites for a
module and the packages therein, this has no meaning if the module in
question has no testsuites at all.

[para] This section gives a very basic overview on possible
methodologies for writing tests and testsuites.

[para] First there are "drudgery" tests. Written to check absolutely
basic assumptions which should never fail.

[para] For example for a command FOO taking two arguments, three tests
calling it with zero, one, and three arguments. The basic checks that
the command fails if it has not enough arguments, or too many.

[para] After that come the tests checking things based on our
knowledge of the command, about its properties and assumptions. Some
examples based on the graph operations added during Google's Summer of
Code 2009 are:

[list_begin itemized]

[item]	The BellmanFord command in struct::graph::ops takes a
	[arg startnode] as argument, and this node should be a node of
	the graph. This equals one test case checking the behavior when the
	specified node is not a node of the graph.

[para]  This often gives rise to code in the implementation which
	explicitly checks the assumption and throws an understandable error,
	instead of letting the algorithm fail later in some weird
	non-deterministic way.

[para]  It is not always possible to do such checks. The graph argument
	for example is just a command in itself, and while we expect
	it to exhibit a certain interface, i.e. a set of sub-commands
	aka methods, we cannot check that it has them, except by
	actually trying to use them. That is done by the algorithm
	anyway, so an explicit check is just overhead we can get by
	without.

[item]  IIRC one of the distinguishing characteristic of either
	BellmanFord and/or Johnson is that they are able to handle
	negative weights. Whereas Dijkstra requires positive weights.

[para]	This induces (at least) three testcases ... Graph with all
	positive weights, all negative, and a mix of positive and
	negative weights.

	Thinking further does the algorithm handle the weight
	[const 0] as well ? Another test case, or several, if we mix
	zero with positive and negative weights.

[item]	The two algorithms we are currently thinking about are about
	distances between nodes, and distance can be 'Inf'inity,
	i.e. nodes may not be connected. This means that good test
	cases are

	[list_begin enumerated]
	[enum]	Strongly connected graph
	[enum]	Connected graph
	[enum]	Disconnected graph.
	[list_end]

	[para] At the extremes of strongly connected and disconnected
	we have the fully connected graphs and graphs without edges,
	only nodes, i.e. completely disconnected.

[item]	IIRC both of the algorithms take weighted arcs, and fill in a
	default if arcs are left unweighted in the input graph.

	[para] This also induces three test cases:

	[list_begin enumerated]
	[enum]	Graph will all arcs with explicit weights.
	[enum]	Graph without weights at all.
	[enum]	Graph with mixture of weighted and unweighted graphs.
	[list_end]
[list_end]

[para] What was described above via examples is called
[term black-box] testing. Test cases are designed and written based on
the developer's knowledge of the properties of the algorithm and its
inputs, without referencing a particular implementation.

[para] Going further, a complement to [term black-box] testing is
[term white-box]. For this we know the implementation of the
algorithm, we look at it and design our tests cases so that they force
the code through all possible paths in the implementation. Wherever a
decision is made we have a test case forcing a specific direction of
the decision, for all possible combinations and directions. It is easy
to get a combinatorial explosion in the number of needed test-cases.

[para] In practice I often hope that the black-box tests I have made
are enough to cover all the paths, obviating the need for white-box
tests.

[para] The above should be enough to make it clear that writing tests
for an algorithm takes at least as much time as coding the algorithm,
and often more time. Much more time.

See for example also [uri http://sqlite.org/testing.html], a writeup
on how the Sqlite database engine is tested. Another article of
interest might be [uri https://www.researchgate.net/publication/298896236].
While geared to a particular numerical algorithm it still shows that
even a simple-looking algorithm can lead to an incredible number of
test cases.

[para] An interesting connection is to documentation. In one
direction, the properties checked with black-box testing are exactly
the properties which should be documented in the algorithm's man
page. And conversely, the documentation of the properties of an
algorithm makes a good reference to base the black-box tests on.

[para] In practice test cases and documentation often get written
together, cross-influencing each other. And the actual writing of test
cases is a mix of black and white box, possibly influencing the
implementation while writing the tests. Like writing a test for a
condition like [term {startnode not in input graph}] serving as
reminder to put a check for this condition into the code.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































Deleted devdoc/parts/rm_distribute.inc.

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

With the release made it has to be published and the world notified of
its existence.

[list_begin enumerated]

[enum]	    Create a proper fossil event for the release, via
	    [uri http://core.tcl-lang.org/tcllib/eventedit].

[para]	    An [uri http://core.tcl-lang.org/tcllib/event/dac0ddcd2e990234143196b4dc438fe01e7b9817 {existing event}] should be used as template.

[enum]	    Update a number of web locations:

[list_begin enumerated]
[enum]	    [uri http://core.tcl-lang.org/tcllib/doc/trunk/embedded/index.md {Home page}]
[enum]	    [uri http://core.tcl-lang.org/tcllib/wiki?name=Downloads     Downloads]
[enum]	    [uri http://core.tcl-lang.org/tcllib/wiki?name=Past+Releases {Past Releases}]
[enum]	    [uri http://www.tcl-lang.org/home/release.txt     ]
[enum]	    [uri http://www.tcl-lang.org/software/tcllib/*.tml]
[enum]	    [uri http://wiki.tcl-lang.org/page/Tcllib]
[list_end]

The first location maps to the file [file embedded/index.md] in the
repository itself, as such it can edited as part of the release
process. This is where reference to the new fossil event is added, as
the new current release.

[para] The next two locations are in the fossil tcllib wiki and
require admin or wiki write permissions for
[uri http://core.tcl-lang.org/tcllib].

[para] The last two locations require ssh access to
[uri http://www.tcl-lang.org] and permission to edit
files in the web area.


[enum]	***TODO*** mailing lists and other places to send notes to.

[list_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted devdoc/parts/rm_final.inc.

1
todo: finalize release, make candidate official
<


Deleted devdoc/parts/rm_start.inc.

1
todo: open a candidate for release
<


Deleted devdoc/parts/rm_tooling.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

The [file sak.tcl] script in the toplevel directory of a Tcllib
checkout is the one tool used by the release manager to perform its
[sectref Tasks].

[para] The main commands to be used are

[example {
    sak.tcl validate
    sak.tcl test run
    sak.tcl review
    sak.tcl readme
    sak.tcl localdoc
    sak.tcl release
}]

More detail will be provided in the explanations of the various
[sectref Tasks].
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted devdoc/parts/rm_work.inc.

1
2
3
4
5
6
7
todo: test, validate and check that the candidate is worthy of release
fix testsuites, possibly fix packages, documentation
regenerate docs
coordinate with package maintainers wrt fixes

big thing: going over the packages, classify changes since last
release to generate a nice readme.
<
<
<
<
<
<
<














Deleted devdoc/parts/rq_critcl.inc.

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

[subsection Critcl]

The [syscmd critcl] tool is an [emph optional] dependency.

[para] It is only required when trying to build the C-based
[term accelerators] for a number of packages, as explained in
[sectref {Critcl & Accelerators}]

[para] Tcllib's build system looks for it in the [variable PATH],
using the name [syscmd critcl]. This is for Unix.

On Windows on the other hand the search is more complex. First we look
for a proper application [syscmd critcl.exe]. When that is not found
we look for a combination of interpreter ([syscmd tclkitsh.exe],
[syscmd tclsh.exe]) and starkit ([syscmd critcl.kit], [syscmd critcl])
instead. [emph Note] that the choice of starkit can be overriden via
the environment variable [variable CRITCL].

[para] Tcllib requires Critcl version 2 or higher.

[para] The github repository providing releases of version 2 and
higher, and the associated sources, can be found at
[uri http://andreas-kupries.github.com/critcl].

[para] Any branch of the repository can be used (if not using the
prebuild starkit or starpack), although the use of the stable branch
[emph master] is recommended.

[para] At the above url is also an explanation on how to build and
install Critcl, including a list of its dependencies.

[para] Its instructions will not be repeated here. If there are
problems with these directions please file a ticket against the
[term Critcl] project, and not Tcllib.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































Deleted devdoc/parts/rq_tcl.inc.

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

[subsection Tcl]

As we are installing a number of Tcl packages and applications it
should be pretty much obvious that a working installation of Tcl
itself is needed, and I will not belabor the point.

[para] Out of the many possibilities use whatever you are comfortable
with, as long as it provides at the very least Tcl 8.2, or higher.

This may be a Tcl installation provided by your operating system
distribution, from a distribution-independent vendor, or built by
yourself.

[para] [emph Note] that the packages in Tcllib have begun to require
8.4, 8.5, and even 8.6. Older versions of Tcl will not be able to use
such packages. Trying to use them will result in
[emph {package not found}] errors, as their package index files will
not register them in versions of the core unable to use them.

[para] Myself, I used (and still use)
[uri http://www.activestate.com ActiveState's]
ActiveTcl 8.5 distribution during development, as I am most familiar
with it.

[para] [emph {(Disclosure: I, Andreas Kupries, worked for ActiveState until 2016, maintaining ActiveTcl and TclDevKit for them).}].
I am currently working for SUSE Software Canada ULC, although not in
Tcl-related areas.

[para] This distribution can be found at
[uri http://www.activestate.com/activetcl]. Retrieve the archive of
ActiveTcl 8.5 (or higher) for your platform and install it as directed
by ActiveState.

[para] For those wishing to build and install Tcl on their own, the
relevant sources can be found at

[list_begin definitions]
[def Tcl] [uri http://core.tcl-lang.org/tcl/]
[list_end]

together with the necessary instructions on how to build it.

[para] If there are problems with building, installing, or using Tcl,
please file a ticket against [term Tcl], or the vendor of your
distribution, and [emph not] [term Tcllib].
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































Deleted devdoc/parts/welcome.inc.

1
2
3
4
5
6

Welcome to Tcllib, the Tcl Standard Library. Note that Tcllib is not a
package itself. It is a collection of (semi-independent) [term Tcl]
packages that provide utility functions useful to a large collection
of Tcl programmers.

<
<
<
<
<
<












Added devdoc/releaseguide.html.

















































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<!- Guide to the creation of source releases for Tcllib -->

<h1>Guide to the creation of source releases for Tcllib
</h1>
<hr>

<h2>Recap
</h2>
<table><tr><td valign=top>
      <!-- The local source of this image is
		tcllib/devel/cvs.branches.*
	-->
      <img src="http://sourceforge.net/dbimage.php?id=2221">
</td><td valign=top><p>
The CVS repository for Tcllib contains two main branches,
      the HEAD for development, and RELEASES as the staging area for
      official releases.
</p></td></tr></table>

<h2>Dependencies
</h2>

<h2>Creation of a new official release
</h2>

<p>To create a new official release of Tcllib the release manager has
      to perform the steps described below:
</p>


<ol>
<li> Retrieve the sources at the current head
	from the CVS repository, using a command like
<pre>
	  CVSROOT=:pserver:anonymous@cvs.tcllib.sourceforge.net:/cvsroot/tcllib
	  cvs -d${CVSROOT} co tcllib
</pre>
	Vary this command according to taste as long as the overall
	meaning is not changed. Compression options and the like.

<li> Tag these sources with a new branch tag for the new release of
	  tcllib, like
<pre>
	  cvs -d${CVSROOT} rtag tcllib
</pre>

<li> Commit the changes, then update the working directory.

<li> Use a tclsh to run the <b>sak</b> tool with the argument <i>gendist</i>, like
<pre>
    tclsh /path/to/tcllib/sak.tcl gendist
</pre>

<li> This results in the creation of a <i>tcllib-VERSION</i> directory
in the current working directory, and of two archives, <i>.zip</i>,
and <i>.tar.gz</i>. A starkit will be created if <b>sdx</b> is present
in the PATH. If additionally a file named <b>tclkit</b> is present in
the current working directory a starpack will be created too, using
this tclkit as the runtime.


<li> Now follow the instructions in the Sourceforge site documentation
		    for uploading the archives generated by the last
		    step to
		    <b>ftp://upload.sourceforge.net/incoming</b>, and
		    follow the procedures for creating packages and
		    releases at Sourceforge.
</ol>

<p>At last notify the relevant persons in other communities like
Debian (See list of contacts) about the new release.
</p>

Deleted devdoc/tcl_community_communication.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcl_community_communication n 1]
[titledesc {Tcl Community - Kind Communication}]
[description]

The Tcl Community encourages contributions from anyone who wishes to
advance the development of:

[list_begin itemized]
[item] The Tcl Language
[item] Tcl derived languages
[item] Tcl related libraries
[item] Tcl extensions
[item] External Projects that Integrate Tcl
[list_end]

[para] We welcome those contributions from anyone. We are blind to
gender, race, religion, cultural background, cybernetic nature, and
any other demographic characteristics, as well as personal political
views.

[para] A community lives and dies by communications. And occasionally
our communications are peppered with patterns that are harsh,
unfriendly, unwelcoming and/or otherwise unkind. As a volunteer
community, we need all of the help we can get. Therefore, we ask all
contributors to make a conscious effort, in Tcl Community discussions,
to communicate in ways that are welcoming. Ways that are
friendly. Ways that are, in a word: kind.

[para] These guidelines suggest specific ways to accomplish that goal.

[para] Please note: for the balance of this document any reference to
"People", "Persons", "anybody" or "somebody" can refer to any sentient
being, not merely corporeal members of the species Homo Sapien.

[list_begin definitions]

[def {We are a Sanctuary not a Clubhouse}]

The Tcl Community is a collective of amateurs and professionals who
code, test, and use tools. Our community is open to all. There is no
velvet rope. There is no bouncer at the door. There are no secret
handshakes. Any sentient being who enters our midst is welcome. If
someone is ever asked to leave, it is only because they are being
disruptive to the functioning of the community.

[def {We Merit Ideas, Not People}]

A good idea can come from anyone, regardless of how little time they
have been with us. A bad idea can come from anyone, regardless of how
much time or how little time they have been with us. We judge a
concept by how it stands up to scrutiny of logic, implementation, and
regression testing. We don’t judge ideas based on who had the idea
first, who agrees with the idea, or who disagrees with it.

[def {Treat Everyone with Respect}]

Everyone is deserving of respect and courtesy at all times.

[def {Refer to people by the names they use.}]

If grammar requires you to state a gender for a person, honor their
preferences about their gender identity. If you are unsure as to the
gender of an individual, ask. If someone had to guess about your
gender and got it wrong, please correct them and do not take it
personally.

[def {Do not take a harsh tone towards other participants.}]

Do not make personal attacks against anyone (participant or not.)

[para] Criticize statements and actions, never people.

[def {Don’t Take Things Personally}]

When in doubt, assume the best in people. A criticism of your
statements is not a personal attack on you.

[def {Persons, not People}]

Stereotypes are an unhelpful tool on many accounts. They are generally
oversimplified. They are usually flat out wrong. And even if "right"
they are of absolutely no utility in determining the capabilities,
motivations, or fitness of an individual.

[para] Don’t use them in Tcl Community communications.

[def {Mistakes Happen}]

The human condition is a series of trials and errors. Progress is when
we get one more trial than error. Being wrong or making a mistake is
the default state of humanity. Accept the errors of your fellow
sentient beings, and be aware that you are also fallible.

[def {Keep it Real}]

Please respond to what people actually say. We are all amazing
individuals, but none among us are mind readers. If you find yourself
responding to what you imagine someone is thinking, odds are you are
going to be wrong.

[para] If you must criticize someone, stick to things they have
actually done. Never criticize for something you speculate they have
done. Or imagine they have done. Or something someone who shares some
attribute with them has done in the past.

[para] Keep discussions about any non-Tcl subjects to what can be
stated factually and without emotion or judgement.

[def {When Trouble Arises, Don’t Escalate}]

If you feel you are being personally attacked or offended, take the
high road. Punching back in a public forum will only makes things
worse. Address the matter in a private correspondence. Be
polite. Express your feelings, but note that you are expressing your
feelings. When writing, look for a way to calm matters down. And when
in doubt, sleep on your letter before pressing send. And when not in
doubt, sleep on it for another day after that.

[para] If you are a spectator to a fight in progress, politely request
the two parties take the matter to a more private forum.

[def {Always get the Last Word: I’m Sorry}]

If an personal argument does arise, be the first to apologize. An
apology does not concede a logical point. It merely acknowledges that
at some point the discussion left either logic, community decency, or
both. Return to the topic when cooler heads can prevail.

[def {Nobody is Keeping Score}]

There is no prize for being right. There is no cost for being wrong. A
hard sell is not going to advance your idea along any more than a
logical argument. You aren’t running for office. This isn’t debate
club. If you find yourself continuing a discussion beyond where a
topic can be logically discussed, stop.

[def {No Evangelizing}]

The Tcl Community is not the place to promote your chosen operating
system, political outlook, religion, marketing scheme, or economic
model. Period.

[para] (And if you do bring it up, be prepared to have your chosen
topic discussed logically. And odds are, not favorably.)

[def {Respect the Community}]

If the Community has come to a decision on a course of action, please
stop arguing.

[para] If someone complains about how you are expressing your ideas,
listen.

[para] If your words are hurting people, stop. There is no amount of
being "right" that makes up for someone leaving our midst because they
felt insulted, threatened, or ignored.

[list_end]

By following these guidelines, we will build our community, encourage
more contribution to our projects, and our discussions will be
friendlier and reach conclusions more easily.

[para] Thank You.

[section Signatories]
[list_begin itemized]
[item] Sean "the Hypnotoad" Woods
[item] Andreas Kupries
[list_end]

[section Authors]
[list_begin definitions]
[def Primary] Sean "the Hypnotoad" Woods
[def {Light editing}] Andreas Kupries
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































Deleted devdoc/tcllib_devguide.man.

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
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcllib_devguide n 1]
[titledesc {Tcllib - The Developer's Guide}]
[description]
[include parts/welcome.inc]

[para]

This document is a guide for developers working on Tcllib,
i.e. maintainers fixing bugs, extending the collection's
functionality, etc.

[para]

Please read

[list_begin enum]
[enum] [term {Tcllib - How To Get The Sources}] and
[enum] [term {Tcllib - The Installer's Guide}]
[list_end]

first, if that was not done already.

[para] Here we assume that the sources are already available in a
directory of your choice, and that you not only know how to build and
install them, but also have all the necessary requisites to actually
do so. The guide to the sources in particular also explains which
source code management system is used, where to find it, how to set it
up, etc.

[comment {===================================================================}]
[section Commitments]
[subsection Contributor][include parts/d_contrib.inc]
[subsection Maintainer][include parts/d_maintain.inc]

[comment {===================================================================}]
[section {Branching and Workflow}]
[include parts/d_branchflow.inc]

[comment {===================================================================}]
[section {Structural Overview}]
[include parts/d_dirlayout.inc]

[comment {===================================================================}]
[section {Testsuite Tooling}]
[include parts/d_testing.inc]

[comment {===================================================================}]
[section {Documentation Tooling}]
[include parts/d_documentation.inc]

[comment {===================================================================}]
[section {Notes On Writing A Testsuite}]
[include parts/d_testwrite.inc]

[comment {===================================================================}]
[section {Installation Tooling}]
[include parts/d_installation.inc]

[comment {===================================================================}]
[manpage_end]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































Deleted devdoc/tcllib_installer.man.

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
89
90
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcllib_install_guide n 1]
[titledesc {Tcllib - The Installer's Guide}]
[description]
[include parts/welcome.inc]

[para]

The audience of this document is anyone wishing to build and install
the packages found in Tcllib, for either themselves, or others.

[para]

For developers intending to work on the packages themselves we
additionally provide

[list_begin enum]
[enum] [term {Tcllib - The Developer's Guide}].
[list_end]

[para]

Please read [term {Tcllib - How To Get The Sources}] first, if that
was not done already. Here we assume that the sources are already
available in a directory of your choice.

[para]

[comment {===================================================================}]
[section Requisites]

Before Tcllib can be build and used a number of requisites must be installed.

These are:

[list_begin enumerated]
[enum] The scripting language Tcl.
       For details see [sectref Tcl].
[enum] Optionally, the [package critcl] package (C embedding) for [syscmd Tcl].
       For details see [sectref CriTcl].
[list_end]

This list assumes that the machine where Tcllib is to be installed is
essentially clean. Of course, if parts of the dependencies listed
below are already installed the associated steps can be skipped. It is
still recommended to read their sections though, to validate that the
dependencies they talk about are indeed installed.

[include parts/rq_tcl.inc]
[include parts/rq_critcl.inc]

[comment {= build instructions ==============================================}]
[section {Build & Installation Instructions}]

As Tcllib is mainly a bundle of packages written in pure Tcl building
it is the same as installing it. The exceptions to this have their own
subsection, [sectref {Critcl & Accelerators}], later on.

[para] Before that however comes the standard case, differentiated by
       the platforms with material differences in the instruction, i.e.
       [term Unix]-like, versus [term Windows].

[para] Regarding the latter it should also be noted that it is
       possible set up an [term Unix]-like environment using projects
       like [term MSYS], [term Cygwin], and others. In that case the
       user has the choice of which instructions to follow.

[para] Regardless of environment or platform, a suitable [term Tcl]
       has to be installed, and its [syscmd tclsh] should be placed on
       the [variable PATH] ([term Unix]) or associated with
       [file .tcl] files ([term Windows]).

[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
[subsection {Installing on Unix}]
[include parts/b_unix.inc]

[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
[subsection {Installing on Windows}]
[include parts/b_windows.inc]

[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
[subsection {Critcl & Accelerators}]
[include parts/b_critcl.inc]

[comment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
[subsection Tooling]
[include parts/b_tooling.inc]

[manpage_end]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































Deleted devdoc/tcllib_license.man.

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
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcllib_license n 1]
[titledesc {Tcllib - License}]
[description]
[include parts/welcome.inc]

[para] The collection is under the BSD license.

[section License]

[para]

This software is copyrighted by Ajuba Solutions and other parties.
The following terms apply to all files associated with the software
unless explicitly disclaimed in individual files.

[para]

The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose,
provided that existing copyright notices are retained in all copies
and that this notice is included verbatim in any distributions. No
written agreement, license, or royalty fee is required for any of the
authorized uses.  Modifications to this software may be copyrighted by
their authors and need not follow the licensing terms described here,
provided that the new terms are clearly indicated on the first page of
each file where they apply.

[para]

IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

[para]

THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND
THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

[para]

GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights" in
the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
Government shall have only "Restricted Rights" as defined in Clause
252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license.

[manpage_end]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































Deleted devdoc/tcllib_releasemgr.man.

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
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcllib_releasemgr n 1]
[titledesc {Tcllib - The Release Manager's Guide}]
[description]
[include parts/welcome.inc]

[para]

The audience of this document is the release manager for Tcllib, their
deputies, and anybody else interested in the task of creating
an official release of Tcllib for distribution.

[para]

Please read [term {Tcllib - How To Get The Sources}] first, if that
was not done already. Here we assume that the sources are already
available in a directory of your choice.

[para]

[comment {===================================================================}]
[section Tools]
[include parts/rm_tooling.inc]

[comment {===================================================================}]
[section Tasks]

[comment {===================================================================}]
[subsection {Start a release candidate}]
[include parts/rm_start.inc]

[comment {===================================================================}]
[subsection {Ready the candidate}]
[include parts/rm_work.inc]

[comment {===================================================================}]
[subsection {Make it official}]
[include parts/rm_final.inc]

[comment {===================================================================}]
[subsection {Distribute the release}]
[include parts/rm_distribute.inc]

[manpage_end]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































Deleted devdoc/tcllib_sources.man.

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
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcllib_sources n 1]
[titledesc {Tcllib - How To Get The Sources}]
[description]
[include parts/welcome.inc]

[para]

The audience of this document is anyone wishing to either have just a
look at Tcllib's source code, or build the packages, or to extend and
modify them.

[para] For builders and developers we additionally provide

[list_begin enum]
[enum] [term {Tcllib - The Installer's Guide}].
[enum] [term {Tcllib - The Developer's Guide}].
[list_end]

respectively.

[section {Source Location}]

The official repository for Tcllib can be found at
[uri http://core.tcl-lang.org/tcllib]

[section Retrieval]

Assuming that you simply wish to look at the sources, or build a
specific revision, the easiest way of retrieving it is to:

[list_begin enum]
[enum] Log into this site, as "anonymous", using the semi-random password in the captcha.
[enum] Go to the "Timeline".
[enum] Choose the revision you wish to have.
[enum] Follow its link to its detailed information page.
[enum] On that page, choose either the "ZIP" or "Tarball" link to get
a copy of this revision in the format of your choice.
[list_end]

[section {Source Code Management}]

For the curious (or a developer-to-be), the sources are managed by the
[uri http://www.fossil-scm.org {Fossil SCM}].

Binaries for popular platforms can be found directly at its
[uri http://www.fossil-scm.org/download.html {download page}].

[para]

With that tool available the full history can be retrieved via:

[example {
    fossil clone \
	http://core.tcl-lang.org/tcllib \
        tcllib.fossil
}]

followed by

[example {
    mkdir tcllib
    cd tcllib
    fossil open ../tcllib.fossil
}]

to get a checkout of the head of the trunk.

[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































Added embedded/index.html.























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<div class='fossil-doc' data-title='Tcl Library Source Code'>

<h1 align="center">Tcl Library Source Code</h1>

<center>
<form action='../../../docsrch' method='GET'>
<input type="text" name="s" size="40" autofocus>
<input type="submit" value="Search Docs">
</form>
<p><a href="www/toc.html">
Table Of Contents</a>
&nbsp;&nbsp;&nbsp;
<a href="www/index.html">
Keyword Index</a>
</center>

<h2>Discussion &amp; Contact</h2>
<ul>
<p>Tcllib has two <a href="https://sourceforge.net/p/tcllib/mailman/">mailing lists</a>,
one for notifications, the other for general discussion. These are managed at SourceForge,
at the aforementioned link. A few direct links for various topics:
<table>
<tr><td>tcllib-bugs: </td>
<td><a href="https://lists.sourceforge.net/lists/listinfo/tcllib-bugs">Subscribe</a></td>
<td><a href="https://sourceforge.net/p/tcllib/mailman/tcllib-bugs">Archive</a></td>
<td><a href="https://sourceforge.net/p/tcllib/mailman/search/?mail_list=tcllib-bugs">Search</a></td></tr>
<tr><td>tcllib-devel:</td>
<td><a href="https://lists.sourceforge.net/lists/listinfo/tcllib-devel">Subscribe</a></td>
<td><a href="https://sourceforge.net/p/tcllib/mailman/tcllib-devel">Archive</a></td>
<td><a href="https://sourceforge.net/p/tcllib/mailman/search/?mail_list=tcllib-devel">Search</a></td></tr>
</table>

</ul></p>
</ul>

<h2>Feedback</h2>
<ul>
<p>Please go to and use our
<a href="../../../reportlist">
Local Trackers</a>. They are for
<ul>
<li>Bugs,</li>
<li>Patches, and </li>
<li>Ideas &amp; Feature Requests.</li>
</ul></p>
</ul>

<h2>Releases</h2>

<ul>
<p>Current:
<b>1.18 (Feb 3, 2016)</b>
<a href="../../../technote/0bcd06266284a9997e69001e245ecc231a2a4ebd">Details</a>

</p>
<p><a href='../../../wiki?name=Past+Releases'>[Past Releases]</a></p>
<p><a href='../../../wiki?name=Development+Snapshots'>[Development Snapshots]</a></p>
<p><a href="https://sourceforge.net/projects/tcllib/files/">@ SourceForge</a></p>
</ul>

<h2>Related Repositories</h2>
<ul>
<li><a href="../../../../tklib">Tklib</a></li>
<li><a href="../../../../tclapps">Tcl Apps</a></li>
<li><a href="../../../../tclbench">Tcl Bench</a></li>
<li><a href="../../../../mclistbox">Multicolumn Listbox</a></li>
<li><a href="../../../../widget">Widget</a></li>
<li><a href="../../../../bwidget">BWidget</a></li>
</ul>


<h2>See also</h2>
<ul>
<li><a href="http://www.tcl.tk/software/tcllib/">Landing page for this package at the Tcl Developer eXchange</a></li>
</ul>

Deleted embedded/index.md.

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
<div class='fossil-doc' data-title='Tcl Library Source Code'>

<h1 align="center">Tcl Library Source Code</h1>

<center>
Packages - [Table Of Contents](md/toc.md)
&nbsp;&nbsp;&nbsp;
[Keyword Index](md/index.md)
</center>

<center>
	<form action='../../../docsrch' method='GET'>
	<input type="text" name="s" size="40" autofocus>
	<input type="submit" value="Search Package Documentation">
	</form>
</center>

## Guides to Tcllib

   * [Tcl Community - Kind Communication](md/tcllib/files/devdoc/tcl_community_communication.md)
   * [License](md/tcllib/files/devdoc/tcllib_license.md)
   * [How To Get The Sources](md/tcllib/files/devdoc/tcllib_sources.md)
   * [How To Build And Install Tcllib](md/tcllib/files/devdoc/tcllib_installer.md)
   * [The Developer's Guide](md/tcllib/files/devdoc/tcllib_devguide.md)
   * [The Release Manager's Guide](md/tcllib/files/devdoc/tcllib_releasemgr.md)

## Discussion & Contact

Tcllib has two
[mailing lists](https://sourceforge.net/p/tcllib/mailman/).

One for notifications (commits, ticket changes), the other for general
discussion. These are managed at SourceForge, at the aforementioned
link. A few direct links for various topics:

|tcllib-bugs| : |[Subscribe](https://lists.sourceforge.net/lists/listinfo/tcllib-bugs) [Archive](https://sourceforge.net/p/tcllib/mailman/tcllib-bugs) [Search](https://sourceforge.net/p/tcllib/mailman/search/?mail_list=tcllib-bugs)|
|tcllib-devel| : |[Subscribe](https://lists.sourceforge.net/lists/listinfo/tcllib-devel) [Archive](https://sourceforge.net/p/tcllib/mailman/tcllib-devel) [Search](https://sourceforge.net/p/tcllib/mailman/search/?mail_list=tcllib-devel)|

## Feedback

Please go to and use our
[Local Trackers](../../../reportlist).
They are for

   * Bugs,
   * Patches, and	 
   * Ideas & Feature Requests.

## Releases

   * [Current](../../../technote/cd3a11c3065120d491009e64a19f7676176045cd) __1.20 (Dec 1, 2019)__
   * [Past Releases](../../../wiki?name=Past+Releases)
   * [Development Snapshots](../../../wiki?name=Development+Snapshots)
   * [@ SourceForge](https://sourceforge.net/projects/tcllib/files/)

## Related Repositories

   * [Tklib](../../../../tklib)
   * [Tcl Apps](../../../../tclapps)
   * [Tcl Bench](../../../../tclbench)
   * [Multicolumn Listbox](../../../../mclistbox)
   * [Widget](../../../../widget)
   * [BWidget](../../../../bwidget)


## See also

   * [Landing page for this package at the Tcl Developer eXchange](http://www.tcl.tk/software/tcllib/)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































Deleted embedded/md/image/arch_core_container.png.

cannot compute difference between binary files

Deleted embedded/md/image/arch_core_eplugins.png.

cannot compute difference between binary files

Deleted embedded/md/image/arch_core_export.png.

cannot compute difference between binary files

Deleted embedded/md/image/arch_core_import.png.

cannot compute difference between binary files

Deleted embedded/md/image/arch_core_iplugins.png.

cannot compute difference between binary files

Deleted embedded/md/image/arch_core_support.png.

cannot compute difference between binary files

Deleted embedded/md/image/arch_core_transform.png.

cannot compute difference between binary files

Deleted embedded/md/image/arch_user_app.png.

cannot compute difference between binary files

Deleted embedded/md/image/arch_user_pkg.png.

cannot compute difference between binary files

Deleted embedded/md/image/architecture.png.

cannot compute difference between binary files

Deleted embedded/md/image/expr_ast.png.

cannot compute difference between binary files

Deleted embedded/md/image/flow.png.

cannot compute difference between binary files

Deleted embedded/md/image/gen_options.png.

cannot compute difference between binary files

Deleted embedded/md/index.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034

[//000000001]: # (Index generated by tcllib/doctools/idx with format 'markdown')

# Keyword Index

----

[3](#c3) &#183; [A](#cA) &#183; [B](#cB) &#183; [C](#cC) &#183; [D](#cD) &#183; [E](#cE) &#183; [F](#cF) &#183; [G](#cG) &#183; [H](#cH) &#183; [I](#cI) &#183; [J](#cJ) &#183; [K](#cK) &#183; [L](#cL) &#183; [M](#cM) &#183; [N](#cN) &#183; [O](#cO) &#183; [P](#cP) &#183; [Q](#cQ) &#183; [R](#cR) &#183; [S](#cS) &#183; [T](#cT) &#183; [U](#cU) &#183; [V](#cV) &#183; [W](#cW) &#183; [X](#cX) &#183; [Y](#cY) &#183; [Z](#cZ)

----

#### <a name='c3'></a>Keywords: 3

|||
|---|---|
|<a name='3des'></a>3DES|[des](tcllib/files/modules/des/des\.md) &#183; [tclDES](tcllib/files/modules/des/tcldes\.md) &#183; [tclDESjr](tcllib/files/modules/des/tcldesjr\.md)|


#### <a name='cA'></a>Keywords: A

|||
|---|---|
|<a name='abstract\_syntax\_tree'></a>abstract syntax tree|[grammar::me::util](tcllib/files/modules/grammar\_me/me\_util\.md) &#183; [grammar::me\_ast](tcllib/files/modules/grammar\_me/me\_ast\.md)|
|<a name='acceptance'></a>acceptance|[grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md)|
|<a name='acceptor'></a>acceptor|[grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md)|
|<a name='active'></a>active|[transfer::connect](tcllib/files/modules/transfer/connect\.md)|
|<a name='adaptors'></a>adaptors|[snit](tcllib/files/modules/snit/snit\.md) &#183; [snitfaq](tcllib/files/modules/snit/snitfaq\.md)|
|<a name='adjacency\_list'></a>adjacency list|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='adjacency\_matrix'></a>adjacency matrix|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='adjacent'></a>adjacent|[struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='adjusting'></a>adjusting|[textutil::adjust](tcllib/files/modules/textutil/adjust\.md)|
|<a name='adler32'></a>adler32|[tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md)|
|<a name='aes'></a>aes|[aes](tcllib/files/modules/aes/aes\.md)|
|<a name='after'></a>after|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md)|
|<a name='alias'></a>alias|[interp](tcllib/files/modules/interp/tcllib\_interp\.md)|
|<a name='amazon'></a>amazon|[S3](tcllib/files/modules/amazon\-s3/S3\.md)|
|<a name='ambiguous'></a>ambiguous|[grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md)|
|<a name='american\_express'></a>American Express|[valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md)|
|<a name='amex'></a>AMEX|[valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md)|
|<a name='angle'></a>angle|[math::geometry](tcllib/files/modules/math/math\_geometry\.md) &#183; [units](tcllib/files/modules/units/units\.md)|
|<a name='anonymous\_procedure'></a>anonymous procedure|[lambda](tcllib/files/modules/lambda/lambda\.md)|
|<a name='ansi'></a>ansi|[term::ansi::code::attr](tcllib/files/modules/term/ansi\_cattr\.md) &#183; [term::ansi::code::ctrl](tcllib/files/modules/term/ansi\_cctrl\.md) &#183; [term::ansi::code::macros](tcllib/files/modules/term/ansi\_cmacros\.md) &#183; [term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md)|
|<a name='appender'></a>appender|[logger::appender](tcllib/files/modules/log/loggerAppender\.md) &#183; [logger::utils](tcllib/files/modules/log/loggerUtils\.md)|
|<a name='application'></a>application|[nns](tcllib/files/apps/nns\.md) &#183; [nnsd](tcllib/files/apps/nnsd\.md) &#183; [nnslog](tcllib/files/apps/nnslog\.md)|
|<a name='approximation\_algorithm'></a>approximation algorithm|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='arc'></a>arc|[struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='arcfour'></a>arcfour|[rc4](tcllib/files/modules/rc4/rc4\.md)|
|<a name='archive'></a>archive|[tar](tcllib/files/modules/tar/tar\.md)|
|<a name='argument\_integrity'></a>argument integrity|[tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) &#183; [tepam::procedure](tcllib/files/modules/tepam/tepam\_procedure\.md)|
|<a name='argument\_processing'></a>argument processing|[cmdline](tcllib/files/modules/cmdline/cmdline\.md)|
|<a name='argument\_validation'></a>argument validation|[tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) &#183; [tepam::procedure](tcllib/files/modules/tepam/tepam\_procedure\.md)|
|<a name='arguments'></a>arguments|[tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) &#183; [tepam::procedure](tcllib/files/modules/tepam/tepam\_procedure\.md)|
|<a name='argv'></a>argv|[cmdline](tcllib/files/modules/cmdline/cmdline\.md)|
|<a name='argv0'></a>argv0|[cmdline](tcllib/files/modules/cmdline/cmdline\.md)|
|<a name='array'></a>array|[tie](tcllib/files/modules/tie/tie\_std\.md) &#183; [tie](tcllib/files/modules/tie/tie\.md)|
|<a name='articulation\_point'></a>articulation point|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='ascii85'></a>ascii85|[ascii85](tcllib/files/modules/base64/ascii85\.md)|
|<a name='asn'></a>asn|[asn](tcllib/files/modules/asn/asn\.md)|
|<a name='assembler'></a>assembler|[grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md)|
|<a name='assert'></a>assert|[control](tcllib/files/modules/control/control\.md)|
|<a name='assign'></a>assign|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='ast'></a>AST|[grammar::me\_ast](tcllib/files/modules/grammar\_me/me\_ast\.md)|
|<a name='asynchronous'></a>asynchronous|[cache::async](tcllib/files/modules/cache/async\.md)|
|<a name='attribute\_control'></a>attribute control|[term::ansi::code::attr](tcllib/files/modules/term/ansi\_cattr\.md) &#183; [term::ansi::code::ctrl](tcllib/files/modules/term/ansi\_cctrl\.md)|
|<a name='augmenting\_network'></a>augmenting network|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='augmenting\_path'></a>augmenting path|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='authentication'></a>authentication|[autoproxy](tcllib/files/modules/http/autoproxy\.md) &#183; [SASL](tcllib/files/modules/sasl/sasl\.md) &#183; [SASL::NTLM](tcllib/files/modules/sasl/ntlm\.md) &#183; [SASL::SCRAM](tcllib/files/modules/sasl/scram\.md) &#183; [SASL::XGoogleToken](tcllib/files/modules/sasl/gtoken\.md)|
|<a name='automatic'></a>automatic|[nameserv::auto](tcllib/files/modules/nns/nns\_auto\.md)|
|<a name='automatic\_documentation'></a>automatic documentation|[tepam::doc\_gen](tcllib/files/modules/tepam/tepam\_doc\_gen\.md)|
|<a name='automaton'></a>automaton|[grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) &#183; [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) &#183; [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) &#183; [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md)|
|<a name='aycock'></a>aycock|[grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md)|


#### <a name='cB'></a>Keywords: B

|||
|---|---|
|<a name='bank'></a>bank|[valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) &#183; [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) &#183; [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) &#183; [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) &#183; [valtype::iban](tcllib/files/modules/valtype/iban\.md)|
|<a name='base32'></a>base32|[base32](tcllib/files/modules/base32/base32\.md) &#183; [base32::core](tcllib/files/modules/base32/base32core\.md) &#183; [base32::hex](tcllib/files/modules/base32/base32hex\.md)|
|<a name='base64'></a>base64|[base64](tcllib/files/modules/base64/base64\.md) &#183; [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md)|
|<a name='bash'></a>bash|[string::token::shell](tcllib/files/modules/string/token\_shell\.md)|
|<a name='bee'></a>bee|[bee](tcllib/files/modules/bee/bee\.md)|
|<a name='bench\_language'></a>bench language|[bench\_intro](tcllib/files/modules/bench/bench\_intro\.md) &#183; [bench\_lang\_intro](tcllib/files/modules/bench/bench\_lang\_intro\.md) &#183; [bench\_lang\_spec](tcllib/files/modules/bench/bench\_lang\_spec\.md)|
|<a name='benchmark'></a>benchmark|[bench](tcllib/files/modules/bench/bench\.md) &#183; [bench::in](tcllib/files/modules/bench/bench\_read\.md) &#183; [bench::out::csv](tcllib/files/modules/bench/bench\_wcsv\.md) &#183; [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md) &#183; [bench\_intro](tcllib/files/modules/bench/bench\_intro\.md) &#183; [bench\_lang\_intro](tcllib/files/modules/bench/bench\_lang\_intro\.md) &#183; [bench\_lang\_spec](tcllib/files/modules/bench/bench\_lang\_spec\.md)|
|<a name='ber'></a>ber|[asn](tcllib/files/modules/asn/asn\.md)|
|<a name='bessel\_functions'></a>Bessel functions|[math::special](tcllib/files/modules/math/special\.md)|
|<a name='bfs'></a>bfs|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='bibliography'></a>bibliography|[bibtex](tcllib/files/modules/bibtex/bibtex\.md)|
|<a name='bibtex'></a>bibtex|[bibtex](tcllib/files/modules/bibtex/bibtex\.md)|
|<a name='bignums'></a>bignums|[math::bignum](tcllib/files/modules/math/bignum\.md)|
|<a name='bind'></a>bind|[uevent](tcllib/files/modules/uev/uevent\.md)|
|<a name='bipartite'></a>bipartite|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='bittorrent'></a>BitTorrent|[bee](tcllib/files/modules/bee/bee\.md)|
|<a name='bittorrent'></a>bittorrent|[bee](tcllib/files/modules/bee/bee\.md)|
|<a name='blanks'></a>blanks|[textutil::repeat](tcllib/files/modules/textutil/repeat\.md)|
|<a name='block\_cipher'></a>block cipher|[aes](tcllib/files/modules/aes/aes\.md) &#183; [blowfish](tcllib/files/modules/blowfish/blowfish\.md) &#183; [des](tcllib/files/modules/des/des\.md) &#183; [tclDES](tcllib/files/modules/des/tcldes\.md) &#183; [tclDESjr](tcllib/files/modules/des/tcldesjr\.md)|
|<a name='blocking\_flow'></a>blocking flow|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='blowfish'></a>blowfish|[blowfish](tcllib/files/modules/blowfish/blowfish\.md)|
|<a name='book\_number'></a>Book Number|[valtype::isbn](tcllib/files/modules/valtype/isbn\.md)|
|<a name='breadth\_first'></a>breadth\-first|[struct::tree](tcllib/files/modules/struct/struct\_tree\.md)|
|<a name='bridge'></a>bridge|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='bwidget'></a>BWidget|[snit](tcllib/files/modules/snit/snit\.md) &#183; [snitfaq](tcllib/files/modules/snit/snitfaq\.md)|


#### <a name='cC'></a>Keywords: C

|||
|---|---|
|<a name='c'></a>C|[doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) &#183; [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md)|
|<a name='c\_'></a>C\+\+|[snit](tcllib/files/modules/snit/snit\.md) &#183; [snitfaq](tcllib/files/modules/snit/snitfaq\.md) &#183; [stooop](tcllib/files/modules/stooop/stooop\.md) &#183; [switched](tcllib/files/modules/stooop/switched\.md)|
|<a name='cache'></a>cache|[cache::async](tcllib/files/modules/cache/async\.md) &#183; [map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md)|
|<a name='caesar\_cipher'></a>caesar cipher|[tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md)|
|<a name='calculus'></a>calculus|[math::calculus](tcllib/files/modules/math/calculus\.md)|
|<a name='callback'></a>callback|[cache::async](tcllib/files/modules/cache/async\.md) &#183; [hook](tcllib/files/modules/hook/hook\.md) &#183; [lambda](tcllib/files/modules/lambda/lambda\.md) &#183; [oo::util](tcllib/files/modules/tool/meta\.md) &#183; [oo::util](tcllib/files/modules/ooutil/ooutil\.md) &#183; [uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md)|
|<a name='callbacks'></a>callbacks|[tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md)|
|<a name='capitalize'></a>capitalize|[textutil::string](tcllib/files/modules/textutil/textutil\_string\.md)|
|<a name='card\_for\_credit'></a>card for credit|[valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) &#183; [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) &#183; [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) &#183; [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md)|
|<a name='cardinality'></a>cardinality|[struct::set](tcllib/files/modules/struct/struct\_set\.md)|
|<a name='cat'></a>cat|[fileutil](tcllib/files/modules/fileutil/fileutil\.md)|
|<a name='catalog\_package'></a>catalog package|[doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) &#183; [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) &#183; [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) &#183; [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) &#183; [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) &#183; [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) &#183; [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) &#183; [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) &#183; [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md)|
|<a name='catalogue'></a>catalogue|[docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md)|
|<a name='cell\_phone'></a>cell\-phone|[valtype::imei](tcllib/files/modules/valtype/imei\.md)|
|<a name='cer'></a>cer|[asn](tcllib/files/modules/asn/asn\.md)|
|<a name='cfg'></a>CFG|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md)|
|<a name='cfl'></a>CFL|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md)|
|<a name='cgi'></a>CGI|[ncgi](tcllib/files/modules/ncgi/ncgi\.md)|
|<a name='cgraph'></a>cgraph|[struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph\_v1](tcllib/files/modules/struct/graph1\.md)|
|<a name='changelog'></a>changelog|[doctools::changelog](tcllib/files/modules/doctools/changelog\.md) &#183; [doctools::cvs](tcllib/files/modules/doctools/cvs\.md)|
|<a name='channel'></a>channel|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md) &#183; [transfer::connect](tcllib/files/modules/transfer/connect\.md) &#183; [transfer::copy](tcllib/files/modules/transfer/copyops\.md) &#183; [transfer::copy::queue](tcllib/files/modules/transfer/tqueue\.md) &#183; [transfer::data::destination](tcllib/files/modules/transfer/ddest\.md) &#183; [transfer::data::source](tcllib/files/modules/transfer/dsource\.md) &#183; [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) &#183; [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md)|
|<a name='channel\_transformation'></a>channel transformation|[tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) &#183; [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md) &#183; [tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md) &#183; [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md) &#183; [tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md) &#183; [tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md) &#183; [tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md) &#183; [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md) &#183; [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) &#183; [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) &#183; [tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md) &#183; [tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md)|
|<a name='character\_input'></a>character input|[term::receive](tcllib/files/modules/term/receive\.md) &#183; [term::receive::bind](tcllib/files/modules/term/term\_bind\.md)|
|<a name='character\_output'></a>character output|[term::ansi::send](tcllib/files/modules/term/ansi\_send\.md) &#183; [term::send](tcllib/files/modules/term/term\_send\.md)|
|<a name='chat'></a>chat|[irc](tcllib/files/modules/irc/irc\.md) &#183; [multiplexer](tcllib/files/modules/multiplexer/multiplexer\.md) &#183; [picoirc](tcllib/files/modules/irc/picoirc\.md)|
|<a name='checkbox'></a>checkbox|[html](tcllib/files/modules/html/html\.md) &#183; [javascript](tcllib/files/modules/javascript/javascript\.md)|
|<a name='checkbutton'></a>checkbutton|[html](tcllib/files/modules/html/html\.md)|
|<a name='checking'></a>Checking|[valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) &#183; [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) &#183; [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) &#183; [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) &#183; [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) &#183; [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) &#183; [valtype::iban](tcllib/files/modules/valtype/iban\.md) &#183; [valtype::imei](tcllib/files/modules/valtype/imei\.md) &#183; [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) &#183; [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) &#183; [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) &#183; [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) &#183; [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md)|
|<a name='checksum'></a>checksum|[cksum](tcllib/files/modules/crc/cksum\.md) &#183; [crc16](tcllib/files/modules/crc/crc16\.md) &#183; [crc32](tcllib/files/modules/crc/crc32\.md) &#183; [sum](tcllib/files/modules/crc/sum\.md) &#183; [tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) &#183; [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md)|
|<a name='chop'></a>chop|[textutil::string](tcllib/files/modules/textutil/textutil\_string\.md)|
|<a name='cipher'></a>cipher|[pki](tcllib/files/modules/pki/pki\.md) &#183; [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) &#183; [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md)|
|<a name='cksum'></a>cksum|[cksum](tcllib/files/modules/crc/cksum\.md) &#183; [crc16](tcllib/files/modules/crc/crc16\.md) &#183; [crc32](tcllib/files/modules/crc/crc32\.md) &#183; [sum](tcllib/files/modules/crc/sum\.md)|
|<a name='class'></a>class|[snit](tcllib/files/modules/snit/snit\.md) &#183; [snitfaq](tcllib/files/modules/snit/snitfaq\.md) &#183; [stooop](tcllib/files/modules/stooop/stooop\.md) &#183; [switched](tcllib/files/modules/stooop/switched\.md)|
|<a name='class\_methods'></a>class methods|[oo::util](tcllib/files/modules/tool/meta\.md) &#183; [oo::util](tcllib/files/modules/ooutil/ooutil\.md)|
|<a name='class\_variables'></a>class variables|[oo::util](tcllib/files/modules/tool/meta\.md) &#183; [oo::util](tcllib/files/modules/ooutil/ooutil\.md)|
|<a name='cleanup'></a>cleanup|[defer](tcllib/files/modules/defer/defer\.md) &#183; [try](tcllib/files/modules/try/tcllib\_try\.md)|
|<a name='client'></a>client|[nameserv](tcllib/files/modules/nns/nns\_client\.md) &#183; [nameserv::auto](tcllib/files/modules/nns/nns\_auto\.md) &#183; [nameserv::common](tcllib/files/modules/nns/nns\_common\.md) &#183; [nns](tcllib/files/apps/nns\.md) &#183; [nns\_intro](tcllib/files/modules/nns/nns\_intro\.md) &#183; [nnslog](tcllib/files/apps/nnslog\.md)|
|<a name='cloud'></a>cloud|[S3](tcllib/files/modules/amazon\-s3/S3\.md)|
|<a name='cmdline\_processing'></a>cmdline processing|[cmdline](tcllib/files/modules/cmdline/cmdline\.md)|
|<a name='color\_control'></a>color control|[term::ansi::code::attr](tcllib/files/modules/term/ansi\_cattr\.md) &#183; [term::ansi::code::ctrl](tcllib/files/modules/term/ansi\_cctrl\.md)|
|<a name='columns'></a>columns|[term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md)|
|<a name='comm'></a>comm|[comm](tcllib/files/modules/comm/comm\.md) &#183; [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md) &#183; [deleg\_method](tcllib/files/modules/interp/deleg\_method\.md) &#183; [deleg\_proc](tcllib/files/modules/interp/deleg\_proc\.md) &#183; [nameserv::protocol](tcllib/files/modules/nns/nns\_protocol\.md)|
|<a name='command'></a>command|[doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md)|
|<a name='command\_line\_processing'></a>command line processing|[cmdline](tcllib/files/modules/cmdline/cmdline\.md)|
|<a name='command\_prefix'></a>command prefix|[lambda](tcllib/files/modules/lambda/lambda\.md) &#183; [oo::util](tcllib/files/modules/tool/meta\.md) &#183; [oo::util](tcllib/files/modules/ooutil/ooutil\.md)|
|<a name='comment'></a>comment|[jpeg](tcllib/files/modules/jpeg/jpeg\.md) &#183; [png](tcllib/files/modules/png/png\.md)|
|<a name='common'></a>common|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='common\_prefix'></a>common prefix|[textutil::string](tcllib/files/modules/textutil/textutil\_string\.md)|
|<a name='communication'></a>communication|[comm](tcllib/files/modules/comm/comm\.md) &#183; [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md)|
|<a name='comparison'></a>comparison|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='complete\_graph'></a>complete graph|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='complex\_numbers'></a>complex numbers|[math::complexnumbers](tcllib/files/modules/math/qcomplex\.md) &#183; [math::fourier](tcllib/files/modules/math/fourier\.md)|
|<a name='compression'></a>compression|[tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md) &#183; [zipfile::encode](tcllib/files/modules/zip/encode\.md)|
|<a name='computations'></a>computations|[math::bigfloat](tcllib/files/modules/math/bigfloat\.md)|
|<a name='concatenation\_channel'></a>concatenation channel|[tcl::chan::cat](tcllib/files/modules/virtchannel\_base/cat\.md) &#183; [tcl::chan::facade](tcllib/files/modules/virtchannel\_base/facade\.md)|
|<a name='connected\_component'></a>connected component|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='connected\_fifos'></a>connected fifos|[tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md)|
|<a name='connection'></a>connection|[transfer::connect](tcllib/files/modules/transfer/connect\.md)|
|<a name='constants'></a>constants|[math::constants](tcllib/files/modules/math/constants\.md) &#183; [units](tcllib/files/modules/units/units\.md)|
|<a name='container'></a>CONTAINER|[pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md)|
|<a name='contents'></a>contents|[doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md)|
|<a name='context\_free\_grammar'></a>context\-free grammar|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md)|
|<a name='context\_free\_languages'></a>context\-free languages|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='control'></a>control|[control](tcllib/files/modules/control/control\.md) &#183; [math::changepoint](tcllib/files/modules/math/changepoint\.md) &#183; [term](tcllib/files/modules/term/term\.md) &#183; [term::ansi::code](tcllib/files/modules/term/ansi\_code\.md) &#183; [term::ansi::code::attr](tcllib/files/modules/term/ansi\_cattr\.md) &#183; [term::ansi::code::ctrl](tcllib/files/modules/term/ansi\_cctrl\.md) &#183; [term::ansi::code::macros](tcllib/files/modules/term/ansi\_cmacros\.md) &#183; [term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md) &#183; [term::ansi::send](tcllib/files/modules/term/ansi\_send\.md) &#183; [term::interact::menu](tcllib/files/modules/term/imenu\.md) &#183; [term::interact::pager](tcllib/files/modules/term/ipager\.md) &#183; [term::receive](tcllib/files/modules/term/receive\.md) &#183; [term::receive::bind](tcllib/files/modules/term/term\_bind\.md) &#183; [term::send](tcllib/files/modules/term/term\_send\.md)|
|<a name='control\_structure'></a>control structure|[generator](tcllib/files/modules/generator/generator\.md)|
|<a name='conversion'></a>conversion|[doctools](tcllib/files/modules/doctools/doctools\.md) &#183; [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) &#183; [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) &#183; [doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) &#183; [dtplite](tcllib/files/apps/dtplite\.md) &#183; [math::roman](tcllib/files/modules/math/roman\.md) &#183; [mpexpand](tcllib/files/modules/doctools/mpexpand\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [tcldocstrip](tcllib/files/apps/tcldocstrip\.md) &#183; [units](tcllib/files/modules/units/units\.md)|
|<a name='cooked'></a>cooked|[term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md)|
|<a name='cookie'></a>cookie|[ncgi](tcllib/files/modules/ncgi/ncgi\.md)|
|<a name='copy'></a>copy|[fileutil::multi](tcllib/files/modules/fileutil/multi\.md) &#183; [fileutil::multi::op](tcllib/files/modules/fileutil/multiop\.md) &#183; [transfer::copy](tcllib/files/modules/transfer/copyops\.md) &#183; [transfer::copy::queue](tcllib/files/modules/transfer/tqueue\.md) &#183; [transfer::data::destination](tcllib/files/modules/transfer/ddest\.md) &#183; [transfer::data::source](tcllib/files/modules/transfer/dsource\.md) &#183; [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) &#183; [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md)|
|<a name='coroutine'></a>coroutine|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md) &#183; [generator](tcllib/files/modules/generator/generator\.md)|
|<a name='cost'></a>Cost|[treeql](tcllib/files/modules/treeql/treeql\.md)|
|<a name='counter'></a>counter|[tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md)|
|<a name='counting'></a>counting|[counter](tcllib/files/modules/counter/counter\.md)|
|<a name='cparam'></a>CPARAM|[pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md)|
|<a name='crc'></a>crc|[cksum](tcllib/files/modules/crc/cksum\.md) &#183; [crc16](tcllib/files/modules/crc/crc16\.md) &#183; [crc32](tcllib/files/modules/crc/crc32\.md) &#183; [sum](tcllib/files/modules/crc/sum\.md)|
|<a name='crc16'></a>crc16|[crc16](tcllib/files/modules/crc/crc16\.md)|
|<a name='crc32'></a>crc32|[cksum](tcllib/files/modules/crc/cksum\.md) &#183; [crc16](tcllib/files/modules/crc/crc16\.md) &#183; [crc32](tcllib/files/modules/crc/crc32\.md) &#183; [sum](tcllib/files/modules/crc/sum\.md) &#183; [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md)|
|<a name='credit\_card'></a>credit card|[valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) &#183; [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) &#183; [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) &#183; [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md)|
|<a name='cron'></a>cron|[cron](tcllib/files/modules/cron/cron\.md)|
|<a name='cryptography'></a>cryptography|[blowfish](tcllib/files/modules/blowfish/blowfish\.md)|
|<a name='css'></a>CSS|[doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md)|
|<a name='csv'></a>csv|[bench::in](tcllib/files/modules/bench/bench\_read\.md) &#183; [bench::out::csv](tcllib/files/modules/bench/bench\_wcsv\.md) &#183; [csv](tcllib/files/modules/csv/csv\.md)|
|<a name='currying'></a>currying|[lambda](tcllib/files/modules/lambda/lambda\.md) &#183; [oo::util](tcllib/files/modules/tool/meta\.md) &#183; [oo::util](tcllib/files/modules/ooutil/ooutil\.md)|
|<a name='cut\_edge'></a>cut edge|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='cut\_vertex'></a>cut vertex|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='cvs'></a>CVS|[rcs](tcllib/files/modules/rcs/rcs\.md)|
|<a name='cvs'></a>cvs|[doctools::cvs](tcllib/files/modules/doctools/cvs\.md)|
|<a name='cvs\_log'></a>cvs log|[doctools::cvs](tcllib/files/modules/doctools/cvs\.md)|
|<a name='cyclic\_redundancy\_check'></a>cyclic redundancy check|[cksum](tcllib/files/modules/crc/cksum\.md) &#183; [crc16](tcllib/files/modules/crc/crc16\.md) &#183; [crc32](tcllib/files/modules/crc/crc32\.md) &#183; [sum](tcllib/files/modules/crc/sum\.md)|


#### <a name='cD'></a>Keywords: D

|||
|---|---|
|<a name='data\_analysis'></a>data analysis|[math::statistics](tcllib/files/modules/math/statistics\.md)|
|<a name='data\_destination'></a>data destination|[transfer::data::destination](tcllib/files/modules/transfer/ddest\.md) &#183; [transfer::receiver](tcllib/files/modules/transfer/receiver\.md)|
|<a name='data\_entry\_form'></a>data entry form|[tepam::argument\_dialogbox](tcllib/files/modules/tepam/tepam\_argument\_dialogbox\.md)|
|<a name='data\_exchange'></a>data exchange|[huddle](tcllib/files/modules/yaml/huddle\.md) &#183; [json](tcllib/files/modules/json/json\.md) &#183; [json::write](tcllib/files/modules/json/json\_write\.md) &#183; [yaml](tcllib/files/modules/yaml/yaml\.md)|
|<a name='data\_integrity'></a>data integrity|[aes](tcllib/files/modules/aes/aes\.md) &#183; [cksum](tcllib/files/modules/crc/cksum\.md) &#183; [crc16](tcllib/files/modules/crc/crc16\.md) &#183; [crc32](tcllib/files/modules/crc/crc32\.md) &#183; [des](tcllib/files/modules/des/des\.md) &#183; [pki](tcllib/files/modules/pki/pki\.md) &#183; [rc4](tcllib/files/modules/rc4/rc4\.md) &#183; [sum](tcllib/files/modules/crc/sum\.md) &#183; [tclDES](tcllib/files/modules/des/tcldes\.md) &#183; [tclDESjr](tcllib/files/modules/des/tcldesjr\.md)|
|<a name='data\_source'></a>data source|[transfer::data::source](tcllib/files/modules/transfer/dsource\.md) &#183; [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md)|
|<a name='data\_structures'></a>data structures|[struct::record](tcllib/files/modules/struct/record\.md)|
|<a name='database'></a>database|[tie](tcllib/files/modules/tie/tie\_std\.md) &#183; [tie](tcllib/files/modules/tie/tie\.md)|
|<a name='dataflow'></a>dataflow|[page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md)|
|<a name='\_ddt'></a>\.ddt|[docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md)|
|<a name='de'></a>DE|[doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) &#183; [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md)|
|<a name='debug'></a>debug|[debug](tcllib/files/modules/debug/debug\.md) &#183; [debug::caller](tcllib/files/modules/debug/debug\_caller\.md) &#183; [debug::heartbeat](tcllib/files/modules/debug/debug\_heartbeat\.md) &#183; [debug::timestamp](tcllib/files/modules/debug/debug\_timestamp\.md)|
|<a name='decimal'></a>decimal|[math::decimal](tcllib/files/modules/math/decimal\.md)|
|<a name='declare'></a>declare|[term::ansi::code](tcllib/files/modules/term/ansi\_code\.md)|
|<a name='decompression'></a>decompression|[tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md) &#183; [zipfile::decode](tcllib/files/modules/zip/decode\.md) &#183; [zipfile::mkzip](tcllib/files/modules/zip/mkzip\.md)|
|<a name='decryption'></a>decryption|[tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) &#183; [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md)|
|<a name='deferal'></a>deferal|[uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md)|
|<a name='define'></a>define|[term::ansi::code](tcllib/files/modules/term/ansi\_code\.md)|
|<a name='degree'></a>degree|[struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='degree\_constrained\_spanning\_tree'></a>degree constrained spanning tree|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='degrees'></a>degrees|[math::constants](tcllib/files/modules/math/constants\.md)|
|<a name='delegation'></a>delegation|[deleg\_method](tcllib/files/modules/interp/deleg\_method\.md) &#183; [deleg\_proc](tcllib/files/modules/interp/deleg\_proc\.md)|
|<a name='depth\_first'></a>depth\-first|[struct::tree](tcllib/files/modules/struct/struct\_tree\.md)|
|<a name='der'></a>der|[asn](tcllib/files/modules/asn/asn\.md)|
|<a name='des'></a>DES|[des](tcllib/files/modules/des/des\.md) &#183; [tclDES](tcllib/files/modules/des/tcldes\.md) &#183; [tclDESjr](tcllib/files/modules/des/tcldesjr\.md)|
|<a name='deserialization'></a>deserialization|[doctools::idx::import::docidx](tcllib/files/modules/doctools2idx/import\_docidx\.md) &#183; [doctools::idx::import::json](tcllib/files/modules/doctools2idx/idx\_import\_json\.md) &#183; [doctools::idx::structure](tcllib/files/modules/doctools2idx/idx\_structure\.md) &#183; [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) &#183; [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md) &#183; [doctools::toc::structure](tcllib/files/modules/doctools2toc/toc\_structure\.md)|
|<a name='\_dev\_null'></a>/dev/null|[tcl::chan::null](tcllib/files/modules/virtchannel\_base/tcllib\_null\.md) &#183; [tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md)|
|<a name='\_dev\_random'></a>/dev/random|[tcl::chan::random](tcllib/files/modules/virtchannel\_base/tcllib\_random\.md) &#183; [tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md)|
|<a name='\_dev\_zero'></a>/dev/zero|[tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md) &#183; [tcl::chan::zero](tcllib/files/modules/virtchannel\_base/tcllib\_zero\.md)|
|<a name='diameter'></a>diameter|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='dict'></a>dict|[dicttool](tcllib/files/modules/dicttool/dicttool\.md)|
|<a name='diff'></a>diff|[docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) &#183; [struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='diff\_n\_format'></a>diff \-n format|[rcs](tcllib/files/modules/rcs/rcs\.md)|
|<a name='diff\_run'></a>diff \-ruN|[textutil::patch](tcllib/files/modules/textutil/patch\.md)|
|<a name='diff\_unified\_format'></a>diff, unified format|[textutil::patch](tcllib/files/modules/textutil/patch\.md)|
|<a name='difference'></a>difference|[struct::set](tcllib/files/modules/struct/struct\_set\.md)|
|<a name='differential'></a>differential|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='differential\_equations'></a>differential equations|[math::calculus](tcllib/files/modules/math/calculus\.md)|
|<a name='digital'></a>digital|[math::filters](tcllib/files/modules/math/filtergen\.md)|
|<a name='dijkstra'></a>dijkstra|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='directory\_access'></a>directory access|[ldap](tcllib/files/modules/ldap/ldap\.md) &#183; [ldapx](tcllib/files/modules/ldap/ldapx\.md)|
|<a name='directory\_traversal'></a>directory traversal|[fileutil\_traverse](tcllib/files/modules/fileutil/traverse\.md)|
|<a name='discover'></a>Discover|[valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md)|
|<a name='discrete\_items'></a>discrete items|[struct::pool](tcllib/files/modules/struct/pool\.md)|
|<a name='disjoint\_set'></a>disjoint set|[struct::disjointset](tcllib/files/modules/struct/disjointset\.md)|
|<a name='dispatcher'></a>dispatcher|[term::receive::bind](tcllib/files/modules/term/term\_bind\.md)|
|<a name='distance'></a>distance|[math::geometry](tcllib/files/modules/math/math\_geometry\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md) &#183; [units](tcllib/files/modules/units/units\.md)|
|<a name='dns'></a>DNS|[dns](tcllib/files/modules/dns/tcllib\_dns\.md)|
|<a name='do'></a>do|[control](tcllib/files/modules/control/control\.md)|
|<a name='docidx'></a>docidx|[doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::export::docidx](tcllib/files/modules/doctools2idx/export\_docidx\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::idx::import::docidx](tcllib/files/modules/doctools2idx/import\_docidx\.md) &#183; [doctools::idx::parse](tcllib/files/modules/doctools2idx/idx\_parse\.md) &#183; [doctools::idx::structure](tcllib/files/modules/doctools2idx/idx\_structure\.md) &#183; [doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) &#183; [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) &#183; [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) &#183; [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) &#183; [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) &#183; [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) &#183; [dtplite](tcllib/files/apps/dtplite\.md)|
|<a name='docidx\_commands'></a>docidx commands|[docidx\_lang\_cmdref](tcllib/files/modules/doctools/docidx\_lang\_cmdref\.md) &#183; [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) &#183; [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) &#183; [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md)|
|<a name='docidx\_language'></a>docidx language|[docidx\_lang\_cmdref](tcllib/files/modules/doctools/docidx\_lang\_cmdref\.md) &#183; [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) &#183; [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) &#183; [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md)|
|<a name='docidx\_markup'></a>docidx markup|[docidx\_lang\_cmdref](tcllib/files/modules/doctools/docidx\_lang\_cmdref\.md) &#183; [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) &#183; [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) &#183; [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md)|
|<a name='docidx\_syntax'></a>docidx syntax|[docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) &#183; [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) &#183; [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md)|
|<a name='docstrip'></a>docstrip|[docstrip](tcllib/files/modules/docstrip/docstrip\.md) &#183; [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) &#183; [tcldocstrip](tcllib/files/apps/tcldocstrip\.md)|
|<a name='doctoc'></a>doctoc|[doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) &#183; [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) &#183; [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) &#183; [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) &#183; [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) &#183; [doctools::toc::parse](tcllib/files/modules/doctools2toc/toc\_parse\.md) &#183; [doctools::toc::structure](tcllib/files/modules/doctools2toc/toc\_structure\.md) &#183; [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) &#183; [dtplite](tcllib/files/apps/dtplite\.md)|
|<a name='doctoc\_commands'></a>doctoc commands|[doctoc\_lang\_cmdref](tcllib/files/modules/doctools/doctoc\_lang\_cmdref\.md) &#183; [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) &#183; [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) &#183; [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md)|
|<a name='doctoc\_language'></a>doctoc language|[doctoc\_lang\_cmdref](tcllib/files/modules/doctools/doctoc\_lang\_cmdref\.md) &#183; [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) &#183; [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) &#183; [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md)|
|<a name='doctoc\_markup'></a>doctoc markup|[doctoc\_lang\_cmdref](tcllib/files/modules/doctools/doctoc\_lang\_cmdref\.md) &#183; [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) &#183; [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) &#183; [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md)|
|<a name='doctoc\_syntax'></a>doctoc syntax|[doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) &#183; [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) &#183; [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md)|
|<a name='doctools'></a>doctools|[docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) &#183; [doctools::changelog](tcllib/files/modules/doctools/changelog\.md) &#183; [doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md) &#183; [doctools::idx::export::docidx](tcllib/files/modules/doctools2idx/export\_docidx\.md) &#183; [doctools::idx::export::html](tcllib/files/modules/doctools2idx/idx\_export\_html\.md) &#183; [doctools::idx::export::json](tcllib/files/modules/doctools2idx/idx\_export\_json\.md) &#183; [doctools::idx::export::nroff](tcllib/files/modules/doctools2idx/idx\_export\_nroff\.md) &#183; [doctools::idx::export::text](tcllib/files/modules/doctools2idx/idx\_export\_text\.md) &#183; [doctools::idx::export::wiki](tcllib/files/modules/doctools2idx/idx\_export\_wiki\.md) &#183; [doctools::idx::import::docidx](tcllib/files/modules/doctools2idx/import\_docidx\.md) &#183; [doctools::idx::import::json](tcllib/files/modules/doctools2idx/idx\_import\_json\.md) &#183; [doctools::idx::parse](tcllib/files/modules/doctools2idx/idx\_parse\.md) &#183; [doctools::idx::structure](tcllib/files/modules/doctools2idx/idx\_structure\.md) &#183; [doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) &#183; [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) &#183; [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) &#183; [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) &#183; [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) &#183; [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) &#183; [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) &#183; [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) &#183; [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md) &#183; [doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md) &#183; [doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md) &#183; [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) &#183; [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) &#183; [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) &#183; [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) &#183; [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md) &#183; [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md) &#183; [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) &#183; [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md) &#183; [doctools::toc::parse](tcllib/files/modules/doctools2toc/toc\_parse\.md) &#183; [doctools::toc::structure](tcllib/files/modules/doctools2toc/toc\_structure\.md) &#183; [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) &#183; [dtplite](tcllib/files/apps/dtplite\.md)|
|<a name='doctools\_commands'></a>doctools commands|[doctools\_lang\_cmdref](tcllib/files/modules/doctools/doctools\_lang\_cmdref\.md) &#183; [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) &#183; [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) &#183; [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md)|
|<a name='doctools\_language'></a>doctools language|[doctools\_lang\_cmdref](tcllib/files/modules/doctools/doctools\_lang\_cmdref\.md) &#183; [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) &#183; [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) &#183; [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md)|
|<a name='doctools\_markup'></a>doctools markup|[doctools\_lang\_cmdref](tcllib/files/modules/doctools/doctools\_lang\_cmdref\.md) &#183; [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) &#183; [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) &#183; [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md)|
|<a name='doctools\_syntax'></a>doctools syntax|[doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) &#183; [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) &#183; [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md)|
|<a name='document'></a>document|[doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md)|
|<a name='documentation'></a>documentation|[docstrip](tcllib/files/modules/docstrip/docstrip\.md) &#183; [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) &#183; [doctools](tcllib/files/modules/doctools/doctools\.md) &#183; [doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [tcldocstrip](tcllib/files/apps/tcldocstrip\.md) &#183; [tepam::doc\_gen](tcllib/files/modules/tepam/tepam\_doc\_gen\.md)|
|<a name='dom'></a>DOM|[treeql](tcllib/files/modules/treeql/treeql\.md)|
|<a name='dom'></a>dom|[xsxp](tcllib/files/modules/amazon\-s3/xsxp\.md)|
|<a name='domain\_name\_service'></a>domain name service|[dns](tcllib/files/modules/dns/tcllib\_dns\.md)|
|<a name='\_dtx'></a>\.dtx|[docstrip](tcllib/files/modules/docstrip/docstrip\.md) &#183; [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) &#183; [tcldocstrip](tcllib/files/apps/tcldocstrip\.md)|


#### <a name='cE'></a>Keywords: E

|||
|---|---|
|<a name='e'></a>e|[math::constants](tcllib/files/modules/math/constants\.md)|
|<a name='ean'></a>EAN|[valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) &#183; [valtype::isbn](tcllib/files/modules/valtype/isbn\.md)|
|<a name='ean13'></a>EAN13|[valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) &#183; [valtype::isbn](tcllib/files/modules/valtype/isbn\.md)|
|<a name='earley'></a>earley|[grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md)|
|<a name='ebnf'></a>EBNF|[pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='eccentricity'></a>eccentricity|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='edge'></a>edge|[struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='emacs'></a>emacs|[doctools::changelog](tcllib/files/modules/doctools/changelog\.md) &#183; [doctools::cvs](tcllib/files/modules/doctools/cvs\.md)|
|<a name='email'></a>email|[imap4](tcllib/files/modules/imap4/imap4\.md) &#183; [mime](tcllib/files/modules/mime/mime\.md) &#183; [pop3](tcllib/files/modules/pop3/pop3\.md) &#183; [smtp](tcllib/files/modules/mime/smtp\.md)|
|<a name='emptiness'></a>emptiness|[struct::set](tcllib/files/modules/struct/struct\_set\.md)|
|<a name='empty\_interpreter'></a>empty interpreter|[interp](tcllib/files/modules/interp/tcllib\_interp\.md)|
|<a name='en'></a>EN|[doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) &#183; [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md)|
|<a name='encoding'></a>encoding|[ascii85](tcllib/files/modules/base64/ascii85\.md) &#183; [base64](tcllib/files/modules/base64/base64\.md) &#183; [uuencode](tcllib/files/modules/base64/uuencode\.md) &#183; [yencode](tcllib/files/modules/base64/yencode\.md)|
|<a name='encryption'></a>encryption|[aes](tcllib/files/modules/aes/aes\.md) &#183; [blowfish](tcllib/files/modules/blowfish/blowfish\.md) &#183; [des](tcllib/files/modules/des/des\.md) &#183; [pki](tcllib/files/modules/pki/pki\.md) &#183; [rc4](tcllib/files/modules/rc4/rc4\.md) &#183; [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) &#183; [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) &#183; [tclDES](tcllib/files/modules/des/tcldes\.md) &#183; [tclDESjr](tcllib/files/modules/des/tcldesjr\.md)|
|<a name='entry\_mask'></a>entry mask|[tepam](tcllib/files/modules/tepam/tepam\_introduction\.md)|
|<a name='equal'></a>equal|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='equality'></a>equality|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='equivalence\_class'></a>equivalence class|[struct::disjointset](tcllib/files/modules/struct/disjointset\.md)|
|<a name='error'></a>error|[throw](tcllib/files/modules/try/tcllib\_throw\.md) &#183; [try](tcllib/files/modules/try/tcllib\_try\.md)|
|<a name='error\_function'></a>error function|[math::special](tcllib/files/modules/math/special\.md)|
|<a name='european\_article\_number'></a>European Article Number|[valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) &#183; [valtype::isbn](tcllib/files/modules/valtype/isbn\.md)|
|<a name='event'></a>event|[hook](tcllib/files/modules/hook/hook\.md) &#183; [uevent](tcllib/files/modules/uev/uevent\.md) &#183; [uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md)|
|<a name='event\_management'></a>event management|[tcl::chan::events](tcllib/files/modules/virtchannel\_core/events\.md)|
|<a name='events'></a>events|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md)|
|<a name='examples'></a>examples|[bench\_lang\_intro](tcllib/files/modules/bench/bench\_lang\_intro\.md) &#183; [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) &#183; [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) &#183; [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md)|
|<a name='exception'></a>exception|[try](tcllib/files/modules/try/tcllib\_try\.md)|
|<a name='exchange\_format'></a>exchange format|[huddle](tcllib/files/modules/yaml/huddle\.md) &#183; [json](tcllib/files/modules/json/json\.md) &#183; [json::write](tcllib/files/modules/json/json\_write\.md)|
|<a name='exclusion'></a>exclusion|[struct::set](tcllib/files/modules/struct/struct\_set\.md)|
|<a name='execution'></a>execution|[grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md)|
|<a name='exif'></a>exif|[jpeg](tcllib/files/modules/jpeg/jpeg\.md)|
|<a name='exit'></a>exit|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md)|
|<a name='export'></a>export|[doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::export::docidx](tcllib/files/modules/doctools2idx/export\_docidx\.md) &#183; [doctools::idx::export::html](tcllib/files/modules/doctools2idx/idx\_export\_html\.md) &#183; [doctools::idx::export::json](tcllib/files/modules/doctools2idx/idx\_export\_json\.md) &#183; [doctools::idx::export::nroff](tcllib/files/modules/doctools2idx/idx\_export\_nroff\.md) &#183; [doctools::idx::export::text](tcllib/files/modules/doctools2idx/idx\_export\_text\.md) &#183; [doctools::idx::export::wiki](tcllib/files/modules/doctools2idx/idx\_export\_wiki\.md) &#183; [doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) &#183; [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) &#183; [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) &#183; [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) &#183; [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md) &#183; [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md)|
|<a name='expression'></a>expression|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='extended\_namespace'></a>extended namespace|[namespacex](tcllib/files/modules/namespacex/namespacex\.md)|


#### <a name='cF'></a>Keywords: F

|||
|---|---|
|<a name='faq'></a>faq|[docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) &#183; [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) &#183; [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md)|
|<a name='fetching\_information'></a>fetching information|[uri](tcllib/files/modules/uri/uri\.md)|
|<a name='fft'></a>FFT|[math::fourier](tcllib/files/modules/math/fourier\.md)|
|<a name='fifo'></a>fifo|[tcl::chan::fifo](tcllib/files/modules/virtchannel\_base/tcllib\_fifo\.md) &#183; [tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md) &#183; [tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md)|
|<a name='file'></a>file|[tie](tcllib/files/modules/tie/tie\_std\.md) &#183; [tie](tcllib/files/modules/tie/tie\.md) &#183; [uri](tcllib/files/modules/uri/uri\.md)|
|<a name='file\_recognition'></a>file recognition|[fileutil::magic::cfront](tcllib/files/modules/fumagic/cfront\.md) &#183; [fileutil::magic::cgen](tcllib/files/modules/fumagic/cgen\.md) &#183; [fileutil::magic::filetype](tcllib/files/modules/fumagic/filetypes\.md) &#183; [fileutil::magic::rt](tcllib/files/modules/fumagic/rtcore\.md)|
|<a name='file\_type'></a>file type|[fileutil::magic::cfront](tcllib/files/modules/fumagic/cfront\.md) &#183; [fileutil::magic::cgen](tcllib/files/modules/fumagic/cgen\.md) &#183; [fileutil::magic::filetype](tcllib/files/modules/fumagic/filetypes\.md) &#183; [fileutil::magic::rt](tcllib/files/modules/fumagic/rtcore\.md)|
|<a name='file\_utilities'></a>file utilities|[fileutil](tcllib/files/modules/fileutil/fileutil\.md) &#183; [fileutil::magic::cfront](tcllib/files/modules/fumagic/cfront\.md) &#183; [fileutil::magic::cgen](tcllib/files/modules/fumagic/cgen\.md) &#183; [fileutil::magic::filetype](tcllib/files/modules/fumagic/filetypes\.md) &#183; [fileutil::magic::rt](tcllib/files/modules/fumagic/rtcore\.md) &#183; [fileutil::multi](tcllib/files/modules/fileutil/multi\.md) &#183; [fileutil::multi::op](tcllib/files/modules/fileutil/multiop\.md)|
|<a name='filesystem'></a>filesystem|[map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md)|
|<a name='filter'></a>filter|[generator](tcllib/files/modules/generator/generator\.md) &#183; [struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='filtering'></a>filtering|[math::filters](tcllib/files/modules/math/filtergen\.md)|
|<a name='final'></a>final|[try](tcllib/files/modules/try/tcllib\_try\.md)|
|<a name='finance'></a>finance|[valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) &#183; [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) &#183; [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) &#183; [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) &#183; [valtype::iban](tcllib/files/modules/valtype/iban\.md)|
|<a name='find'></a>find|[struct::disjointset](tcllib/files/modules/struct/disjointset\.md)|
|<a name='finite'></a>finite|[struct::pool](tcllib/files/modules/struct/pool\.md)|
|<a name='finite\_automaton'></a>finite automaton|[grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) &#183; [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) &#183; [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) &#183; [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md)|
|<a name='fips\_180\_1'></a>FIPS 180\-1|[sha1](tcllib/files/modules/sha1/sha1\.md) &#183; [sha256](tcllib/files/modules/sha1/sha256\.md)|
|<a name='first\_permutation'></a>first permutation|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='fisher\_yates'></a>Fisher\-Yates|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='flatten'></a>flatten|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='floating\_point'></a>floating\-point|[math::bigfloat](tcllib/files/modules/math/bigfloat\.md) &#183; [math::fuzzy](tcllib/files/modules/math/fuzzy\.md)|
|<a name='flow'></a>flow|[control](tcllib/files/modules/control/control\.md)|
|<a name='flow\_network'></a>flow network|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='folding'></a>folding|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='foldl'></a>foldl|[generator](tcllib/files/modules/generator/generator\.md)|
|<a name='foldr'></a>foldr|[generator](tcllib/files/modules/generator/generator\.md)|
|<a name='foreach'></a>foreach|[generator](tcllib/files/modules/generator/generator\.md)|
|<a name='form'></a>form|[html](tcllib/files/modules/html/html\.md) &#183; [ncgi](tcllib/files/modules/ncgi/ncgi\.md)|
|<a name='format\_conversion'></a>format conversion|[pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md)|
|<a name='formatter'></a>formatter|[doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md)|
|<a name='formatting'></a>formatting|[bench::in](tcllib/files/modules/bench/bench\_read\.md) &#183; [bench::out::csv](tcllib/files/modules/bench/bench\_wcsv\.md) &#183; [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md) &#183; [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) &#183; [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [textutil](tcllib/files/modules/textutil/textutil\.md) &#183; [textutil::adjust](tcllib/files/modules/textutil/adjust\.md) &#183; [textutil::string](tcllib/files/modules/textutil/textutil\_string\.md) &#183; [textutil::tabify](tcllib/files/modules/textutil/tabify\.md)|
|<a name='formatting\_engine'></a>formatting engine|[docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md) &#183; [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) &#183; [doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md)|
|<a name='fossil'></a>fossil|[textutil::patch](tcllib/files/modules/textutil/patch\.md)|
|<a name='fourier\_transform'></a>Fourier transform|[math::fourier](tcllib/files/modules/math/fourier\.md)|
|<a name='fr'></a>FR|[doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) &#183; [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md)|
|<a name='frame'></a>frame|[term::ansi::code::macros](tcllib/files/modules/term/ansi\_cmacros\.md)|
|<a name='framework'></a>framework|[tool](tcllib/files/modules/tool/tool\.md)|
|<a name='ftp'></a>ftp|[ftp](tcllib/files/modules/ftp/ftp\.md) &#183; [ftp::geturl](tcllib/files/modules/ftp/ftp\_geturl\.md) &#183; [ftpd](tcllib/files/modules/ftpd/ftpd\.md) &#183; [uri](tcllib/files/modules/uri/uri\.md)|
|<a name='ftpd'></a>ftpd|[ftpd](tcllib/files/modules/ftpd/ftpd\.md)|
|<a name='ftpserver'></a>ftpserver|[ftpd](tcllib/files/modules/ftpd/ftpd\.md)|
|<a name='full\_outer\_join'></a>full outer join|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|


#### <a name='cG'></a>Keywords: G

|||
|---|---|
|<a name='generate\_event'></a>generate event|[uevent](tcllib/files/modules/uev/uevent\.md)|
|<a name='generate\_permutations'></a>generate permutations|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='generation'></a>generation|[doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md)|
|<a name='generator'></a>generator|[generator](tcllib/files/modules/generator/generator\.md)|
|<a name='geocoding'></a>geocoding|[map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md)|
|<a name='geodesy'></a>geodesy|[map::slippy](tcllib/files/modules/map/map\_slippy\.md) &#183; [mapproj](tcllib/files/modules/mapproj/mapproj\.md)|
|<a name='geography'></a>geography|[map::slippy](tcllib/files/modules/map/map\_slippy\.md)|
|<a name='get\_character'></a>get character|[term::receive](tcllib/files/modules/term/receive\.md)|
|<a name='gets'></a>gets|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md)|
|<a name='git'></a>git|[textutil::patch](tcllib/files/modules/textutil/patch\.md)|
|<a name='global'></a>global|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md)|
|<a name='golang'></a>golang|[defer](tcllib/files/modules/defer/defer\.md)|
|<a name='gopher'></a>gopher|[uri](tcllib/files/modules/uri/uri\.md)|
|<a name='gps'></a>gps|[gpx](tcllib/files/modules/gpx/gpx\.md) &#183; [nmea](tcllib/files/modules/nmea/nmea\.md)|
|<a name='gpx'></a>gpx|[gpx](tcllib/files/modules/gpx/gpx\.md)|
|<a name='grammar'></a>grammar|[grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md) &#183; [grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) &#183; [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) &#183; [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) &#183; [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md) &#183; [grammar::me::cpu](tcllib/files/modules/grammar\_me/me\_cpu\.md) &#183; [grammar::me::cpu::core](tcllib/files/modules/grammar\_me/me\_cpucore\.md) &#183; [grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md) &#183; [grammar::me::tcl](tcllib/files/modules/grammar\_me/me\_tcl\.md) &#183; [grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::me\_vm](tcllib/files/modules/grammar\_me/me\_vm\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='graph'></a>graph|[grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md) &#183; [struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md) &#183; [struct::graph\_v1](tcllib/files/modules/struct/graph1\.md) &#183; [struct::queue](tcllib/files/modules/struct/queue\.md) &#183; [struct::stack](tcllib/files/modules/struct/stack\.md)|
|<a name='graph\_walking'></a>graph walking|[page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md) &#183; [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) &#183; [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md)|
|<a name='green\_threads'></a>green threads|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md)|
|<a name='grep'></a>grep|[fileutil](tcllib/files/modules/fileutil/fileutil\.md)|
|<a name='guid'></a>GUID|[uuid](tcllib/files/modules/uuid/uuid\.md)|


#### <a name='cH'></a>Keywords: H

|||
|---|---|
|<a name='hashing'></a>hashing|[md4](tcllib/files/modules/md4/md4\.md) &#183; [md5](tcllib/files/modules/md5/md5\.md) &#183; [md5crypt](tcllib/files/modules/md5crypt/md5crypt\.md) &#183; [otp](tcllib/files/modules/otp/otp\.md) &#183; [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) &#183; [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md) &#183; [sha1](tcllib/files/modules/sha1/sha1\.md) &#183; [sha256](tcllib/files/modules/sha1/sha256\.md)|
|<a name='heartbeat'></a>heartbeat|[debug::heartbeat](tcllib/files/modules/debug/debug\_heartbeat\.md)|
|<a name='heuristic'></a>heuristic|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='hex'></a>hex|[base32::hex](tcllib/files/modules/base32/base32hex\.md)|
|<a name='hexadecimal'></a>hexadecimal|[tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md)|
|<a name='histogram'></a>histogram|[counter](tcllib/files/modules/counter/counter\.md)|
|<a name='hook'></a>hook|[hook](tcllib/files/modules/hook/hook\.md) &#183; [uevent](tcllib/files/modules/uev/uevent\.md)|
|<a name='horspool'></a>horspool|[grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md)|
|<a name='html'></a>HTML|[doctools](tcllib/files/modules/doctools/doctools\.md) &#183; [doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md) &#183; [doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::export::html](tcllib/files/modules/doctools2idx/idx\_export\_html\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) &#183; [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) &#183; [dtplite](tcllib/files/apps/dtplite\.md) &#183; [mpexpand](tcllib/files/modules/doctools/mpexpand\.md)|
|<a name='html'></a>html|[html](tcllib/files/modules/html/html\.md) &#183; [htmlparse](tcllib/files/modules/htmlparse/htmlparse\.md) &#183; [javascript](tcllib/files/modules/javascript/javascript\.md) &#183; [ncgi](tcllib/files/modules/ncgi/ncgi\.md)|
|<a name='http'></a>http|[autoproxy](tcllib/files/modules/http/autoproxy\.md) &#183; [httpd](tcllib/files/modules/httpd/httpd\.md) &#183; [map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md) &#183; [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md) &#183; [uri](tcllib/files/modules/uri/uri\.md) &#183; [websocket](tcllib/files/modules/websocket/websocket\.md)|
|<a name='httpd'></a>httpd|[httpd](tcllib/files/modules/httpd/httpd\.md)|
|<a name='https'></a>https|[uri](tcllib/files/modules/uri/uri\.md)|
|<a name='httpserver'></a>httpserver|[httpd](tcllib/files/modules/httpd/httpd\.md)|
|<a name='huddle'></a>huddle|[huddle](tcllib/files/modules/yaml/huddle\.md) &#183; [yaml](tcllib/files/modules/yaml/yaml\.md)|
|<a name='human\_readable'></a>human readable|[bench::in](tcllib/files/modules/bench/bench\_read\.md) &#183; [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md)|
|<a name='hyphenation'></a>hyphenation|[textutil](tcllib/files/modules/textutil/textutil\.md) &#183; [textutil::adjust](tcllib/files/modules/textutil/adjust\.md)|


#### <a name='cI'></a>Keywords: I

|||
|---|---|
|<a name='i18n'></a>i18n|[doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) &#183; [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) &#183; [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) &#183; [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) &#183; [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) &#183; [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) &#183; [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) &#183; [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) &#183; [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md)|
|<a name='iban'></a>IBAN|[valtype::iban](tcllib/files/modules/valtype/iban\.md)|
|<a name='ident'></a>ident|[ident](tcllib/files/modules/ident/ident\.md)|
|<a name='identification'></a>identification|[ident](tcllib/files/modules/ident/ident\.md)|
|<a name='identity'></a>identity|[tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md)|
|<a name='idle'></a>idle|[uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md)|
|<a name='image'></a>image|[jpeg](tcllib/files/modules/jpeg/jpeg\.md) &#183; [png](tcllib/files/modules/png/png\.md) &#183; [tiff](tcllib/files/modules/tiff/tiff\.md)|
|<a name='imap'></a>imap|[imap4](tcllib/files/modules/imap4/imap4\.md)|
|<a name='imei'></a>IMEI|[valtype::imei](tcllib/files/modules/valtype/imei\.md)|
|<a name='import'></a>import|[doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::idx::import::docidx](tcllib/files/modules/doctools2idx/import\_docidx\.md) &#183; [doctools::idx::import::json](tcllib/files/modules/doctools2idx/idx\_import\_json\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) &#183; [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md)|
|<a name='in\_memory\_channel'></a>in\-memory channel|[tcl::chan::fifo](tcllib/files/modules/virtchannel\_base/tcllib\_fifo\.md) &#183; [tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md) &#183; [tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md) &#183; [tcl::chan::memchan](tcllib/files/modules/virtchannel\_base/tcllib\_memchan\.md) &#183; [tcl::chan::string](tcllib/files/modules/virtchannel\_base/tcllib\_string\.md) &#183; [tcl::chan::variable](tcllib/files/modules/virtchannel\_base/tcllib\_variable\.md)|
|<a name='in\_order'></a>in\-order|[struct::tree](tcllib/files/modules/struct/struct\_tree\.md)|
|<a name='inclusion'></a>inclusion|[struct::set](tcllib/files/modules/struct/struct\_set\.md)|
|<a name='incr\_tcl'></a>Incr Tcl|[snit](tcllib/files/modules/snit/snit\.md) &#183; [snitfaq](tcllib/files/modules/snit/snitfaq\.md)|
|<a name='indenting'></a>indenting|[textutil](tcllib/files/modules/textutil/textutil\.md) &#183; [textutil::adjust](tcllib/files/modules/textutil/adjust\.md)|
|<a name='independent\_set'></a>independent set|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='index'></a>index|[docidx\_intro](tcllib/files/modules/doctools/docidx\_intro\.md) &#183; [docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md) &#183; [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) &#183; [doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::export::docidx](tcllib/files/modules/doctools2idx/export\_docidx\.md) &#183; [doctools::idx::export::html](tcllib/files/modules/doctools2idx/idx\_export\_html\.md) &#183; [doctools::idx::export::json](tcllib/files/modules/doctools2idx/idx\_export\_json\.md) &#183; [doctools::idx::export::nroff](tcllib/files/modules/doctools2idx/idx\_export\_nroff\.md) &#183; [doctools::idx::export::text](tcllib/files/modules/doctools2idx/idx\_export\_text\.md) &#183; [doctools::idx::export::wiki](tcllib/files/modules/doctools2idx/idx\_export\_wiki\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::idx::import::docidx](tcllib/files/modules/doctools2idx/import\_docidx\.md) &#183; [doctools::idx::import::json](tcllib/files/modules/doctools2idx/idx\_import\_json\.md)|
|<a name='index\_formatter'></a>index formatter|[docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md)|
|<a name='info'></a>info|[namespacex](tcllib/files/modules/namespacex/namespacex\.md)|
|<a name='inner\_join'></a>inner join|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='input\_mode'></a>input mode|[term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md)|
|<a name='integer'></a>integer|[math::roman](tcllib/files/modules/math/roman\.md)|
|<a name='integration'></a>integration|[math::calculus](tcllib/files/modules/math/calculus\.md)|
|<a name='inter\_thread\_communication'></a>inter\-thread communication|[tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md)|
|<a name='international\_article\_number'></a>International Article Number|[valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) &#183; [valtype::isbn](tcllib/files/modules/valtype/isbn\.md)|
|<a name='international\_bank\_account\_number'></a>International Bank Account Number|[valtype::iban](tcllib/files/modules/valtype/iban\.md)|
|<a name='international\_mobile\_equipment\_identity'></a>International Mobile Equipment Identity|[valtype::imei](tcllib/files/modules/valtype/imei\.md)|
|<a name='international\_standard\_book\_number'></a>International Standard Book Number|[valtype::isbn](tcllib/files/modules/valtype/isbn\.md)|
|<a name='internationalization'></a>internationalization|[doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) &#183; [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) &#183; [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) &#183; [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) &#183; [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) &#183; [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) &#183; [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) &#183; [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) &#183; [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md)|
|<a name='internet'></a>internet|[asn](tcllib/files/modules/asn/asn\.md) &#183; [ftp](tcllib/files/modules/ftp/ftp\.md) &#183; [ftp::geturl](tcllib/files/modules/ftp/ftp\_geturl\.md) &#183; [imap4](tcllib/files/modules/imap4/imap4\.md) &#183; [ldap](tcllib/files/modules/ldap/ldap\.md) &#183; [ldapx](tcllib/files/modules/ldap/ldapx\.md) &#183; [mime](tcllib/files/modules/mime/mime\.md) &#183; [pop3d](tcllib/files/modules/pop3d/pop3d\.md) &#183; [pop3d::dbox](tcllib/files/modules/pop3d/pop3d\_dbox\.md) &#183; [pop3d::udb](tcllib/files/modules/pop3d/pop3d\_udb\.md) &#183; [smtp](tcllib/files/modules/mime/smtp\.md) &#183; [websocket](tcllib/files/modules/websocket/websocket\.md)|
|<a name='internet\_address'></a>internet address|[tcllib\_ip](tcllib/files/modules/dns/tcllib\_ip\.md)|
|<a name='interpolation'></a>interpolation|[math::interpolate](tcllib/files/modules/math/interpolate\.md)|
|<a name='interpreter'></a>interpreter|[deleg\_method](tcllib/files/modules/interp/deleg\_method\.md) &#183; [deleg\_proc](tcllib/files/modules/interp/deleg\_proc\.md) &#183; [interp](tcllib/files/modules/interp/tcllib\_interp\.md) &#183; [wip](tcllib/files/modules/wip/wip\.md)|
|<a name='intersection'></a>intersection|[struct::set](tcllib/files/modules/struct/struct\_set\.md)|
|<a name='interval'></a>interval|[math::bigfloat](tcllib/files/modules/math/bigfloat\.md)|
|<a name='ip'></a>ip|[tcllib\_ip](tcllib/files/modules/dns/tcllib\_ip\.md)|
|<a name='ipc'></a>ipc|[comm](tcllib/files/modules/comm/comm\.md) &#183; [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md)|
|<a name='ipv4'></a>ipv4|[tcllib\_ip](tcllib/files/modules/dns/tcllib\_ip\.md)|
|<a name='ipv6'></a>ipv6|[tcllib\_ip](tcllib/files/modules/dns/tcllib\_ip\.md)|
|<a name='irc'></a>irc|[irc](tcllib/files/modules/irc/irc\.md) &#183; [picoirc](tcllib/files/modules/irc/picoirc\.md)|
|<a name='isa'></a>isA|[valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) &#183; [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) &#183; [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) &#183; [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) &#183; [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) &#183; [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) &#183; [valtype::iban](tcllib/files/modules/valtype/iban\.md) &#183; [valtype::imei](tcllib/files/modules/valtype/imei\.md) &#183; [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) &#183; [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) &#183; [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) &#183; [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) &#183; [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md)|
|<a name='isbn'></a>ISBN|[valtype::isbn](tcllib/files/modules/valtype/isbn\.md)|
|<a name='isthmus'></a>isthmus|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='iterator'></a>iterator|[generator](tcllib/files/modules/generator/generator\.md)|


#### <a name='cJ'></a>Keywords: J

|||
|---|---|
|<a name='javascript'></a>javascript|[javascript](tcllib/files/modules/javascript/javascript\.md) &#183; [json](tcllib/files/modules/json/json\.md) &#183; [json::write](tcllib/files/modules/json/json\_write\.md)|
|<a name='jfif'></a>jfif|[jpeg](tcllib/files/modules/jpeg/jpeg\.md)|
|<a name='join'></a>join|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='jpeg'></a>jpeg|[jpeg](tcllib/files/modules/jpeg/jpeg\.md)|
|<a name='json'></a>JSON|[doctools::idx::export::json](tcllib/files/modules/doctools2idx/idx\_export\_json\.md) &#183; [doctools::idx::import::json](tcllib/files/modules/doctools2idx/idx\_import\_json\.md) &#183; [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) &#183; [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md)|
|<a name='json'></a>json|[doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [huddle](tcllib/files/modules/yaml/huddle\.md) &#183; [json](tcllib/files/modules/json/json\.md) &#183; [json::write](tcllib/files/modules/json/json\_write\.md)|
|<a name='justification'></a>justification|[textutil::adjust](tcllib/files/modules/textutil/adjust\.md)|


#### <a name='cK'></a>Keywords: K

|||
|---|---|
|<a name='keyword\_index'></a>keyword index|[docidx\_intro](tcllib/files/modules/doctools/docidx\_intro\.md) &#183; [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) &#183; [doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md)|
|<a name='keywords'></a>keywords|[docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md)|
|<a name='knuth'></a>knuth|[soundex](tcllib/files/modules/soundex/soundex\.md)|


#### <a name='cL'></a>Keywords: L

|||
|---|---|
|<a name='l10n'></a>l10n|[doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) &#183; [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) &#183; [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) &#183; [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) &#183; [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) &#183; [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) &#183; [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) &#183; [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) &#183; [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md)|
|<a name='lambda'></a>lambda|[lambda](tcllib/files/modules/lambda/lambda\.md)|
|<a name='latex'></a>LaTeX|[docstrip](tcllib/files/modules/docstrip/docstrip\.md) &#183; [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) &#183; [tcldocstrip](tcllib/files/apps/tcldocstrip\.md)|
|<a name='latex'></a>latex|[doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md)|
|<a name='latitute'></a>latitute|[map::slippy](tcllib/files/modules/map/map\_slippy\.md)|
|<a name='ldap'></a>ldap|[ldap](tcllib/files/modules/ldap/ldap\.md) &#183; [ldapx](tcllib/files/modules/ldap/ldapx\.md) &#183; [uri](tcllib/files/modules/uri/uri\.md)|
|<a name='ldap\_client'></a>ldap client|[ldap](tcllib/files/modules/ldap/ldap\.md) &#183; [ldapx](tcllib/files/modules/ldap/ldapx\.md)|
|<a name='ldif'></a>ldif|[ldapx](tcllib/files/modules/ldap/ldapx\.md)|
|<a name='least\_squares'></a>least squares|[math::linearalgebra](tcllib/files/modules/math/linalg\.md)|
|<a name='left\_outer\_join'></a>left outer join|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='lemon'></a>lemon|[page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md)|
|<a name='level\_graph'></a>level graph|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='lexer'></a>lexer|[doctools::idx::parse](tcllib/files/modules/doctools2idx/idx\_parse\.md) &#183; [doctools::toc::parse](tcllib/files/modules/doctools2toc/toc\_parse\.md)|
|<a name='lexing'></a>lexing|[string::token](tcllib/files/modules/string/token\.md) &#183; [string::token::shell](tcllib/files/modules/string/token\_shell\.md)|
|<a name='limitsize'></a>limitsize|[tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md)|
|<a name='line'></a>line|[math::geometry](tcllib/files/modules/math/math\_geometry\.md)|
|<a name='linear\_algebra'></a>linear algebra|[math::linearalgebra](tcllib/files/modules/math/linalg\.md)|
|<a name='linear\_equations'></a>linear equations|[math::linearalgebra](tcllib/files/modules/math/linalg\.md)|
|<a name='linear\_program'></a>linear program|[math::optimize](tcllib/files/modules/math/optimize\.md)|
|<a name='lines'></a>lines|[term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md)|
|<a name='list'></a>list|[struct::list](tcllib/files/modules/struct/struct\_list\.md) &#183; [struct::queue](tcllib/files/modules/struct/queue\.md) &#183; [wip](tcllib/files/modules/wip/wip\.md)|
|<a name='listener'></a>listener|[term::receive](tcllib/files/modules/term/receive\.md) &#183; [term::receive::bind](tcllib/files/modules/term/term\_bind\.md)|
|<a name='literate\_programming'></a>literate programming|[docstrip](tcllib/files/modules/docstrip/docstrip\.md) &#183; [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) &#183; [tcldocstrip](tcllib/files/apps/tcldocstrip\.md)|
|<a name='ll\_k\_'></a>LL\(k\)|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='local\_searching'></a>local searching|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='localization'></a>localization|[doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) &#183; [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) &#183; [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) &#183; [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) &#183; [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) &#183; [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) &#183; [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) &#183; [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) &#183; [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md)|
|<a name='location'></a>location|[map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md) &#183; [map::slippy](tcllib/files/modules/map/map\_slippy\.md) &#183; [map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md) &#183; [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md)|
|<a name='log'></a>log|[debug](tcllib/files/modules/debug/debug\.md) &#183; [debug::caller](tcllib/files/modules/debug/debug\_caller\.md) &#183; [debug::heartbeat](tcllib/files/modules/debug/debug\_heartbeat\.md) &#183; [debug::timestamp](tcllib/files/modules/debug/debug\_timestamp\.md) &#183; [doctools::cvs](tcllib/files/modules/doctools/cvs\.md) &#183; [log](tcllib/files/modules/log/log\.md) &#183; [logger](tcllib/files/modules/log/logger\.md)|
|<a name='log\_level'></a>log level|[log](tcllib/files/modules/log/log\.md) &#183; [logger](tcllib/files/modules/log/logger\.md)|
|<a name='logger'></a>logger|[logger](tcllib/files/modules/log/logger\.md) &#183; [logger::appender](tcllib/files/modules/log/loggerAppender\.md) &#183; [logger::utils](tcllib/files/modules/log/loggerUtils\.md)|
|<a name='longest\_common\_subsequence'></a>longest common subsequence|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='longitude'></a>longitude|[map::slippy](tcllib/files/modules/map/map\_slippy\.md)|
|<a name='loop'></a>loop|[struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='luhn'></a>luhn|[valtype::luhn](tcllib/files/modules/valtype/luhn\.md) &#183; [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md)|
|<a name='luhn\_5'></a>luhn\-5|[valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md)|


#### <a name='cM'></a>Keywords: M

|||
|---|---|
|<a name='macros'></a>macros|[doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md)|
|<a name='mail'></a>mail|[imap4](tcllib/files/modules/imap4/imap4\.md) &#183; [mime](tcllib/files/modules/mime/mime\.md) &#183; [pop3](tcllib/files/modules/pop3/pop3\.md) &#183; [smtp](tcllib/files/modules/mime/smtp\.md)|
|<a name='mailto'></a>mailto|[uri](tcllib/files/modules/uri/uri\.md)|
|<a name='man\_macros'></a>man\_macros|[doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md)|
|<a name='manpage'></a>manpage|[doctools](tcllib/files/modules/doctools/doctools\.md) &#183; [doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md) &#183; [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) &#183; [dtplite](tcllib/files/apps/dtplite\.md) &#183; [mpexpand](tcllib/files/modules/doctools/mpexpand\.md)|
|<a name='map'></a>map|[generator](tcllib/files/modules/generator/generator\.md) &#183; [map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md) &#183; [map::slippy](tcllib/files/modules/map/map\_slippy\.md) &#183; [map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md) &#183; [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md) &#183; [mapproj](tcllib/files/modules/mapproj/mapproj\.md) &#183; [struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='markdown'></a>markdown|[doctools](tcllib/files/modules/doctools/doctools\.md) &#183; [doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md)|
|<a name='markup'></a>markup|[docidx\_intro](tcllib/files/modules/doctools/docidx\_intro\.md) &#183; [docidx\_lang\_cmdref](tcllib/files/modules/doctools/docidx\_lang\_cmdref\.md) &#183; [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) &#183; [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) &#183; [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md) &#183; [docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md) &#183; [doctoc\_intro](tcllib/files/modules/doctools/doctoc\_intro\.md) &#183; [doctoc\_lang\_cmdref](tcllib/files/modules/doctools/doctoc\_lang\_cmdref\.md) &#183; [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) &#183; [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) &#183; [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md) &#183; [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) &#183; [doctools](tcllib/files/modules/doctools/doctools\.md) &#183; [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) &#183; [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) &#183; [doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [doctools\_intro](tcllib/files/modules/doctools/doctools\_intro\.md) &#183; [doctools\_lang\_cmdref](tcllib/files/modules/doctools/doctools\_lang\_cmdref\.md) &#183; [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) &#183; [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) &#183; [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md) &#183; [doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md) &#183; [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) &#183; [dtplite](tcllib/files/apps/dtplite\.md) &#183; [mpexpand](tcllib/files/modules/doctools/mpexpand\.md) &#183; [tcldocstrip](tcllib/files/apps/tcldocstrip\.md)|
|<a name='mastercard'></a>MasterCard|[valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md)|
|<a name='matching'></a>matching|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='math'></a>math|[math](tcllib/files/modules/math/math\.md) &#183; [math::bigfloat](tcllib/files/modules/math/bigfloat\.md) &#183; [math::bignum](tcllib/files/modules/math/bignum\.md) &#183; [math::calculus](tcllib/files/modules/math/calculus\.md) &#183; [math::complexnumbers](tcllib/files/modules/math/qcomplex\.md) &#183; [math::constants](tcllib/files/modules/math/constants\.md) &#183; [math::decimal](tcllib/files/modules/math/decimal\.md) &#183; [math::fuzzy](tcllib/files/modules/math/fuzzy\.md) &#183; [math::geometry](tcllib/files/modules/math/math\_geometry\.md) &#183; [math::interpolate](tcllib/files/modules/math/interpolate\.md) &#183; [math::linearalgebra](tcllib/files/modules/math/linalg\.md) &#183; [math::optimize](tcllib/files/modules/math/optimize\.md) &#183; [math::PCA](tcllib/files/modules/math/pca\.md) &#183; [math::polynomials](tcllib/files/modules/math/polynomials\.md) &#183; [math::rationalfunctions](tcllib/files/modules/math/rational\_funcs\.md) &#183; [math::special](tcllib/files/modules/math/special\.md) &#183; [math::trig](tcllib/files/modules/math/trig\.md) &#183; [simulation::annealing](tcllib/files/modules/simulation/annealing\.md) &#183; [simulation::montecarlo](tcllib/files/modules/simulation/montecarlo\.md) &#183; [simulation::random](tcllib/files/modules/simulation/simulation\_random\.md)|
|<a name='mathematics'></a>mathematics|[math::fourier](tcllib/files/modules/math/fourier\.md) &#183; [math::probopt](tcllib/files/modules/math/probopt\.md) &#183; [math::quasirandom](tcllib/files/modules/math/quasirandom\.md) &#183; [math::statistics](tcllib/files/modules/math/statistics\.md)|
|<a name='matrices'></a>matrices|[math::linearalgebra](tcllib/files/modules/math/linalg\.md)|
|<a name='matrix'></a>matrix|[csv](tcllib/files/modules/csv/csv\.md) &#183; [math::linearalgebra](tcllib/files/modules/math/linalg\.md) &#183; [report](tcllib/files/modules/report/report\.md) &#183; [struct::matrix](tcllib/files/modules/struct/matrix\.md) &#183; [struct::matrix\_v1](tcllib/files/modules/struct/matrix1\.md) &#183; [struct::queue](tcllib/files/modules/struct/queue\.md) &#183; [struct::stack](tcllib/files/modules/struct/stack\.md)|
|<a name='max\_cut'></a>max cut|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='maximum'></a>maximum|[math::optimize](tcllib/files/modules/math/optimize\.md)|
|<a name='maximum\_flow'></a>maximum flow|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='md4'></a>md4|[md4](tcllib/files/modules/md4/md4\.md) &#183; [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) &#183; [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md)|
|<a name='md5'></a>md5|[md5](tcllib/files/modules/md5/md5\.md) &#183; [md5crypt](tcllib/files/modules/md5crypt/md5crypt\.md)|
|<a name='md5crypt'></a>md5crypt|[md5crypt](tcllib/files/modules/md5crypt/md5crypt\.md)|
|<a name='medicare'></a>medicare|[valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md)|
|<a name='mega\_widget'></a>mega widget|[snit](tcllib/files/modules/snit/snit\.md) &#183; [snitfaq](tcllib/files/modules/snit/snitfaq\.md)|
|<a name='membership'></a>membership|[struct::set](tcllib/files/modules/struct/struct\_set\.md)|
|<a name='menu'></a>menu|[term::ansi::code::macros](tcllib/files/modules/term/ansi\_cmacros\.md) &#183; [term::interact::menu](tcllib/files/modules/term/imenu\.md)|
|<a name='merge'></a>merge|[tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md) &#183; [uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md)|
|<a name='merge\_find'></a>merge find|[struct::disjointset](tcllib/files/modules/struct/disjointset\.md)|
|<a name='merging'></a>merging|[bench](tcllib/files/modules/bench/bench\.md)|
|<a name='message'></a>message|[comm](tcllib/files/modules/comm/comm\.md) &#183; [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md) &#183; [log](tcllib/files/modules/log/log\.md)|
|<a name='message\_catalog'></a>message catalog|[doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) &#183; [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) &#183; [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) &#183; [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) &#183; [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) &#183; [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) &#183; [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) &#183; [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) &#183; [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md)|
|<a name='message\_level'></a>message level|[log](tcllib/files/modules/log/log\.md)|
|<a name='message\_package'></a>message package|[doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) &#183; [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) &#183; [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) &#183; [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) &#183; [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) &#183; [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) &#183; [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) &#183; [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) &#183; [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md)|
|<a name='message\_digest'></a>message\-digest|[md4](tcllib/files/modules/md4/md4\.md) &#183; [md5](tcllib/files/modules/md5/md5\.md) &#183; [md5crypt](tcllib/files/modules/md5crypt/md5crypt\.md) &#183; [otp](tcllib/files/modules/otp/otp\.md) &#183; [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) &#183; [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md) &#183; [sha1](tcllib/files/modules/sha1/sha1\.md) &#183; [sha256](tcllib/files/modules/sha1/sha256\.md)|
|<a name='metakit'></a>metakit|[tie](tcllib/files/modules/tie/tie\_std\.md) &#183; [tie](tcllib/files/modules/tie/tie\.md)|
|<a name='method'></a>method|[deleg\_method](tcllib/files/modules/interp/deleg\_method\.md) &#183; [interp](tcllib/files/modules/interp/tcllib\_interp\.md)|
|<a name='method\_reference'></a>method reference|[oo::util](tcllib/files/modules/tool/meta\.md) &#183; [oo::util](tcllib/files/modules/ooutil/ooutil\.md)|
|<a name='mime'></a>mime|[fileutil::magic::cfront](tcllib/files/modules/fumagic/cfront\.md) &#183; [fileutil::magic::cgen](tcllib/files/modules/fumagic/cgen\.md) &#183; [fileutil::magic::rt](tcllib/files/modules/fumagic/rtcore\.md) &#183; [mime](tcllib/files/modules/mime/mime\.md) &#183; [smtp](tcllib/files/modules/mime/smtp\.md)|
|<a name='minimal\_spanning\_tree'></a>minimal spanning tree|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='minimum'></a>minimum|[math::optimize](tcllib/files/modules/math/optimize\.md)|
|<a name='minimum\_cost\_flow'></a>minimum cost flow|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='minimum\_degree\_spanning\_tree'></a>minimum degree spanning tree|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='minimum\_diameter\_spanning\_tree'></a>minimum diameter spanning tree|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='mobile\_phone'></a>mobile phone|[valtype::imei](tcllib/files/modules/valtype/imei\.md)|
|<a name='module'></a>module|[docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md)|
|<a name='montecarlo\_simulation'></a>montecarlo simulation|[simulation::montecarlo](tcllib/files/modules/simulation/montecarlo\.md)|
|<a name='move'></a>move|[fileutil::multi](tcllib/files/modules/fileutil/multi\.md) &#183; [fileutil::multi::op](tcllib/files/modules/fileutil/multiop\.md)|
|<a name='multi\_file'></a>multi\-file|[fileutil::multi](tcllib/files/modules/fileutil/multi\.md) &#183; [fileutil::multi::op](tcllib/files/modules/fileutil/multiop\.md)|
|<a name='multiplexer'></a>multiplexer|[multiplexer](tcllib/files/modules/multiplexer/multiplexer\.md)|
|<a name='multiprecision'></a>multiprecision|[math::bigfloat](tcllib/files/modules/math/bigfloat\.md) &#183; [math::bignum](tcllib/files/modules/math/bignum\.md)|
|<a name='my\_method'></a>my method|[oo::util](tcllib/files/modules/tool/meta\.md) &#183; [oo::util](tcllib/files/modules/ooutil/ooutil\.md)|


#### <a name='cN'></a>Keywords: N

|||
|---|---|
|<a name='name\_service'></a>name service|[nameserv](tcllib/files/modules/nns/nns\_client\.md) &#183; [nameserv::auto](tcllib/files/modules/nns/nns\_auto\.md) &#183; [nameserv::common](tcllib/files/modules/nns/nns\_common\.md) &#183; [nameserv::protocol](tcllib/files/modules/nns/nns\_protocol\.md) &#183; [nameserv::server](tcllib/files/modules/nns/nns\_server\.md) &#183; [nns](tcllib/files/apps/nns\.md) &#183; [nns\_intro](tcllib/files/modules/nns/nns\_intro\.md) &#183; [nnsd](tcllib/files/apps/nnsd\.md) &#183; [nnslog](tcllib/files/apps/nnslog\.md) &#183; [udpcluster](tcllib/files/modules/udpcluster/udpcluster\.md)|
|<a name='namespace\_unknown'></a>namespace unknown|[namespacex](tcllib/files/modules/namespacex/namespacex\.md)|
|<a name='namespace\_utilities'></a>namespace utilities|[namespacex](tcllib/files/modules/namespacex/namespacex\.md)|
|<a name='narrative'></a>narrative|[debug](tcllib/files/modules/debug/debug\.md) &#183; [debug::caller](tcllib/files/modules/debug/debug\_caller\.md) &#183; [debug::heartbeat](tcllib/files/modules/debug/debug\_heartbeat\.md) &#183; [debug::timestamp](tcllib/files/modules/debug/debug\_timestamp\.md)|
|<a name='national\_provider\_identifier'></a>National Provider Identifier|[valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md)|
|<a name='neighbour'></a>neighbour|[struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='net'></a>net|[ftp](tcllib/files/modules/ftp/ftp\.md) &#183; [ftp::geturl](tcllib/files/modules/ftp/ftp\_geturl\.md) &#183; [imap4](tcllib/files/modules/imap4/imap4\.md) &#183; [mime](tcllib/files/modules/mime/mime\.md) &#183; [smtp](tcllib/files/modules/mime/smtp\.md) &#183; [websocket](tcllib/files/modules/websocket/websocket\.md)|
|<a name='nettool'></a>nettool|[nettool](tcllib/files/modules/nettool/nettool\.md)|
|<a name='network'></a>network|[pop3d](tcllib/files/modules/pop3d/pop3d\.md) &#183; [pop3d::dbox](tcllib/files/modules/pop3d/pop3d\_dbox\.md) &#183; [pop3d::udb](tcllib/files/modules/pop3d/pop3d\_udb\.md)|
|<a name='news'></a>news|[nntp](tcllib/files/modules/nntp/nntp\.md) &#183; [uri](tcllib/files/modules/uri/uri\.md)|
|<a name='next\_permutation'></a>next permutation|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='nmea'></a>nmea|[nmea](tcllib/files/modules/nmea/nmea\.md)|
|<a name='nntp'></a>nntp|[nntp](tcllib/files/modules/nntp/nntp\.md)|
|<a name='nntpclient'></a>nntpclient|[nntp](tcllib/files/modules/nntp/nntp\.md)|
|<a name='no\_op'></a>no\-op|[control](tcllib/files/modules/control/control\.md)|
|<a name='node'></a>node|[struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md) &#183; [struct::tree](tcllib/files/modules/struct/struct\_tree\.md)|
|<a name='nominatim'></a>nominatim|[map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md)|
|<a name='normalization'></a>normalization|[bench](tcllib/files/modules/bench/bench\.md) &#183; [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) &#183; [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md) &#183; [unicode](tcllib/files/modules/stringprep/unicode\.md)|
|<a name='npi'></a>NPI|[valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md)|
|<a name='nroff'></a>nroff|[doctools](tcllib/files/modules/doctools/doctools\.md) &#183; [doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::export::nroff](tcllib/files/modules/doctools2idx/idx\_export\_nroff\.md) &#183; [doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) &#183; [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) &#183; [dtplite](tcllib/files/apps/dtplite\.md) &#183; [mpexpand](tcllib/files/modules/doctools/mpexpand\.md)|
|<a name='ntlm'></a>NTLM|[SASL::NTLM](tcllib/files/modules/sasl/ntlm\.md)|
|<a name='ntp'></a>NTP|[ntp\_time](tcllib/files/modules/ntp/ntp\_time\.md)|
|<a name='null'></a>null|[tcl::chan::null](tcllib/files/modules/virtchannel\_base/tcllib\_null\.md) &#183; [tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md)|
|<a name='number\_theory'></a>number theory|[math::numtheory](tcllib/files/modules/math/numtheory\.md)|


#### <a name='cO'></a>Keywords: O

|||
|---|---|
|<a name='oauth'></a>oauth|[oauth](tcllib/files/modules/oauth/oauth\.md)|
|<a name='object'></a>object|[snit](tcllib/files/modules/snit/snit\.md) &#183; [snitfaq](tcllib/files/modules/snit/snitfaq\.md) &#183; [stooop](tcllib/files/modules/stooop/stooop\.md) &#183; [switched](tcllib/files/modules/stooop/switched\.md)|
|<a name='object\_oriented'></a>object oriented|[snit](tcllib/files/modules/snit/snit\.md) &#183; [snitfaq](tcllib/files/modules/snit/snitfaq\.md) &#183; [stooop](tcllib/files/modules/stooop/stooop\.md) &#183; [switched](tcllib/files/modules/stooop/switched\.md)|
|<a name='observer'></a>observer|[hook](tcllib/files/modules/hook/hook\.md) &#183; [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md)|
|<a name='odie'></a>odie|[cron](tcllib/files/modules/cron/cron\.md) &#183; [nettool](tcllib/files/modules/nettool/nettool\.md) &#183; [processman](tcllib/files/modules/processman/processman\.md)|
|<a name='on\_idle'></a>on\-idle|[uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md)|
|<a name='one\_time\_pad'></a>one time pad|[tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md)|
|<a name='oo'></a>oo|[clay](tcllib/files/modules/clay/clay\.md)|
|<a name='optimisation'></a>optimisation|[math::probopt](tcllib/files/modules/math/probopt\.md)|
|<a name='optimization'></a>optimization|[math::optimize](tcllib/files/modules/math/optimize\.md) &#183; [simulation::annealing](tcllib/files/modules/simulation/annealing\.md)|
|<a name='ordered\_list'></a>ordered list|[struct::prioqueue](tcllib/files/modules/struct/prioqueue\.md)|
|<a name='otp'></a>otp|[tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md)|
|<a name='outer\_join'></a>outer join|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|


#### <a name='cP'></a>Keywords: P

|||
|---|---|
|<a name='package'></a>package|[csv](tcllib/files/modules/csv/csv\.md)|
|<a name='package\_indexing'></a>package indexing|[docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md)|
|<a name='page'></a>page|[page\_intro](tcllib/files/modules/page/page\_intro\.md) &#183; [page\_pluginmgr](tcllib/files/modules/page/page\_pluginmgr\.md) &#183; [page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md) &#183; [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) &#183; [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md) &#183; [page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) &#183; [page\_util\_quote](tcllib/files/modules/page/page\_util\_quote\.md)|
|<a name='pager'></a>pager|[term::interact::pager](tcllib/files/modules/term/ipager\.md)|
|<a name='paragraph'></a>paragraph|[textutil](tcllib/files/modules/textutil/textutil\.md) &#183; [textutil::adjust](tcllib/files/modules/textutil/adjust\.md)|
|<a name='param'></a>PARAM|[pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md)|
|<a name='parameter\_entry\_form'></a>parameter entry form|[tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) &#183; [tepam::argument\_dialogbox](tcllib/files/modules/tepam/tepam\_argument\_dialogbox\.md)|
|<a name='parser'></a>parser|[doctools::idx::parse](tcllib/files/modules/doctools2idx/idx\_parse\.md) &#183; [doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md) &#183; [doctools::toc::parse](tcllib/files/modules/doctools2toc/toc\_parse\.md) &#183; [grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md) &#183; [xsxp](tcllib/files/modules/amazon\-s3/xsxp\.md)|
|<a name='parser\_generator'></a>parser generator|[page](tcllib/files/apps/page\.md) &#183; [page\_intro](tcllib/files/modules/page/page\_intro\.md) &#183; [page\_pluginmgr](tcllib/files/modules/page/page\_pluginmgr\.md) &#183; [page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md) &#183; [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) &#183; [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md) &#183; [page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) &#183; [page\_util\_quote](tcllib/files/modules/page/page\_util\_quote\.md)|
|<a name='parsing'></a>parsing|[bench::in](tcllib/files/modules/bench/bench\_read\.md) &#183; [bibtex](tcllib/files/modules/bibtex/bibtex\.md) &#183; [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) &#183; [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md) &#183; [grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) &#183; [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) &#183; [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) &#183; [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md) &#183; [grammar::me::cpu](tcllib/files/modules/grammar\_me/me\_cpu\.md) &#183; [grammar::me::cpu::core](tcllib/files/modules/grammar\_me/me\_cpucore\.md) &#183; [grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md) &#183; [grammar::me::tcl](tcllib/files/modules/grammar\_me/me\_tcl\.md) &#183; [grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::me\_vm](tcllib/files/modules/grammar\_me/me\_vm\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [htmlparse](tcllib/files/modules/htmlparse/htmlparse\.md) &#183; [huddle](tcllib/files/modules/yaml/huddle\.md) &#183; [string::token::shell](tcllib/files/modules/string/token\_shell\.md) &#183; [yaml](tcllib/files/modules/yaml/yaml\.md)|
|<a name='parsing\_expression'></a>parsing expression|[grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='parsing\_expression\_grammar'></a>parsing expression grammar|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='partial\_application'></a>partial application|[lambda](tcllib/files/modules/lambda/lambda\.md)|
|<a name='partition'></a>partition|[struct::disjointset](tcllib/files/modules/struct/disjointset\.md)|
|<a name='partitioned\_set'></a>partitioned set|[struct::disjointset](tcllib/files/modules/struct/disjointset\.md)|
|<a name='passive'></a>passive|[transfer::connect](tcllib/files/modules/transfer/connect\.md)|
|<a name='password'></a>password|[otp](tcllib/files/modules/otp/otp\.md)|
|<a name='patch'></a>patch|[docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) &#183; [textutil::patch](tcllib/files/modules/textutil/patch\.md)|
|<a name='patching'></a>patching|[rcs](tcllib/files/modules/rcs/rcs\.md)|
|<a name='pca'></a>PCA|[math::PCA](tcllib/files/modules/math/pca\.md)|
|<a name='peg'></a>PEG|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md) &#183; [page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='performance'></a>performance|[bench](tcllib/files/modules/bench/bench\.md) &#183; [bench::in](tcllib/files/modules/bench/bench\_read\.md) &#183; [bench::out::csv](tcllib/files/modules/bench/bench\_wcsv\.md) &#183; [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md) &#183; [bench\_intro](tcllib/files/modules/bench/bench\_intro\.md) &#183; [bench\_lang\_intro](tcllib/files/modules/bench/bench\_lang\_intro\.md) &#183; [bench\_lang\_spec](tcllib/files/modules/bench/bench\_lang\_spec\.md) &#183; [profiler](tcllib/files/modules/profiler/profiler\.md)|
|<a name='permutation'></a>permutation|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='persistence'></a>persistence|[tie](tcllib/files/modules/tie/tie\_std\.md) &#183; [tie](tcllib/files/modules/tie/tie\.md)|
|<a name='phone'></a>phone|[valtype::imei](tcllib/files/modules/valtype/imei\.md)|
|<a name='pi'></a>pi|[math::constants](tcllib/files/modules/math/constants\.md)|
|<a name='plain\_text'></a>plain text|[doctools::idx::export::text](tcllib/files/modules/doctools2idx/idx\_export\_text\.md) &#183; [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md)|
|<a name='plane\_geometry'></a>plane geometry|[math::geometry](tcllib/files/modules/math/math\_geometry\.md)|
|<a name='plugin'></a>plugin|[docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md) &#183; [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) &#183; [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) &#183; [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) &#183; [doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md)|
|<a name='plugin\_management'></a>plugin management|[pluginmgr](tcllib/files/modules/pluginmgr/pluginmgr\.md)|
|<a name='plugin\_search'></a>plugin search|[pluginmgr](tcllib/files/modules/pluginmgr/pluginmgr\.md)|
|<a name='png'></a>png|[png](tcllib/files/modules/png/png\.md)|
|<a name='point'></a>point|[math::geometry](tcllib/files/modules/math/math\_geometry\.md)|
|<a name='polynomial\_functions'></a>polynomial functions|[math::polynomials](tcllib/files/modules/math/polynomials\.md)|
|<a name='pool'></a>pool|[struct::pool](tcllib/files/modules/struct/pool\.md) &#183; [struct::queue](tcllib/files/modules/struct/queue\.md)|
|<a name='pop'></a>pop|[pop3](tcllib/files/modules/pop3/pop3\.md)|
|<a name='pop3'></a>pop3|[pop3](tcllib/files/modules/pop3/pop3\.md) &#183; [pop3d](tcllib/files/modules/pop3d/pop3d\.md) &#183; [pop3d::dbox](tcllib/files/modules/pop3d/pop3d\_dbox\.md) &#183; [pop3d::udb](tcllib/files/modules/pop3d/pop3d\_udb\.md)|
|<a name='post\_order'></a>post\-order|[struct::tree](tcllib/files/modules/struct/struct\_tree\.md)|
|<a name='practcl'></a>practcl|[practcl](tcllib/files/modules/practcl/practcl\.md)|
|<a name='pre\_order'></a>pre\-order|[struct::tree](tcllib/files/modules/struct/struct\_tree\.md)|
|<a name='prefix'></a>prefix|[textutil::string](tcllib/files/modules/textutil/textutil\_string\.md) &#183; [textutil::trim](tcllib/files/modules/textutil/trim\.md)|
|<a name='prime'></a>prime|[math::numtheory](tcllib/files/modules/math/numtheory\.md)|
|<a name='prioqueue'></a>prioqueue|[struct::prioqueue](tcllib/files/modules/struct/prioqueue\.md) &#183; [struct::queue](tcllib/files/modules/struct/queue\.md)|
|<a name='priority\_queue'></a>priority queue|[struct::prioqueue](tcllib/files/modules/struct/prioqueue\.md)|
|<a name='probabilistic\_calculations'></a>probabilistic calculations|[math::probopt](tcllib/files/modules/math/probopt\.md)|
|<a name='proc'></a>proc|[lambda](tcllib/files/modules/lambda/lambda\.md)|
|<a name='procedure'></a>procedure|[deleg\_proc](tcllib/files/modules/interp/deleg\_proc\.md) &#183; [tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) &#183; [tepam::procedure](tcllib/files/modules/tepam/tepam\_procedure\.md)|
|<a name='procedure\_documentation'></a>procedure documentation|[tepam::doc\_gen](tcllib/files/modules/tepam/tepam\_doc\_gen\.md)|
|<a name='processman'></a>processman|[processman](tcllib/files/modules/processman/processman\.md)|
|<a name='producer'></a>producer|[hook](tcllib/files/modules/hook/hook\.md)|
|<a name='profile'></a>profile|[profiler](tcllib/files/modules/profiler/profiler\.md)|
|<a name='projection'></a>projection|[mapproj](tcllib/files/modules/mapproj/mapproj\.md)|
|<a name='prospero'></a>prospero|[uri](tcllib/files/modules/uri/uri\.md)|
|<a name='protocol'></a>protocol|[asn](tcllib/files/modules/asn/asn\.md) &#183; [ldap](tcllib/files/modules/ldap/ldap\.md) &#183; [ldapx](tcllib/files/modules/ldap/ldapx\.md) &#183; [nameserv::protocol](tcllib/files/modules/nns/nns\_protocol\.md) &#183; [pop3d](tcllib/files/modules/pop3d/pop3d\.md) &#183; [pop3d::dbox](tcllib/files/modules/pop3d/pop3d\_dbox\.md) &#183; [pop3d::udb](tcllib/files/modules/pop3d/pop3d\_udb\.md)|
|<a name='proxy'></a>proxy|[autoproxy](tcllib/files/modules/http/autoproxy\.md)|
|<a name='public\_key\_cipher'></a>public key cipher|[pki](tcllib/files/modules/pki/pki\.md)|
|<a name='publisher'></a>publisher|[hook](tcllib/files/modules/hook/hook\.md)|
|<a name='push\_down\_automaton'></a>push down automaton|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|


#### <a name='cQ'></a>Keywords: Q

|||
|---|---|
|<a name='quasi\_random'></a>quasi\-random|[math::quasirandom](tcllib/files/modules/math/quasirandom\.md)|
|<a name='queue'></a>queue|[csv](tcllib/files/modules/csv/csv\.md) &#183; [htmlparse](tcllib/files/modules/htmlparse/htmlparse\.md) &#183; [struct::stack](tcllib/files/modules/struct/stack\.md) &#183; [transfer::copy::queue](tcllib/files/modules/transfer/tqueue\.md)|
|<a name='quoting'></a>quoting|[page\_util\_quote](tcllib/files/modules/page/page\_util\_quote\.md)|


#### <a name='cR'></a>Keywords: R

|||
|---|---|
|<a name='radians'></a>radians|[math::constants](tcllib/files/modules/math/constants\.md) &#183; [units](tcllib/files/modules/units/units\.md)|
|<a name='radiobutton'></a>radiobutton|[html](tcllib/files/modules/html/html\.md)|
|<a name='radius'></a>radius|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='random'></a>random|[tcl::chan::random](tcllib/files/modules/virtchannel\_base/tcllib\_random\.md) &#183; [tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md)|
|<a name='random\_numbers'></a>random numbers|[simulation::random](tcllib/files/modules/simulation/simulation\_random\.md)|
|<a name='rational\_functions'></a>rational functions|[math::rationalfunctions](tcllib/files/modules/math/rational\_funcs\.md)|
|<a name='raw'></a>raw|[term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md)|
|<a name='rc4'></a>rc4|[rc4](tcllib/files/modules/rc4/rc4\.md)|
|<a name='rcs'></a>RCS|[rcs](tcllib/files/modules/rcs/rcs\.md)|
|<a name='rcs\_patch'></a>RCS patch|[rcs](tcllib/files/modules/rcs/rcs\.md)|
|<a name='read'></a>read|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md)|
|<a name='reading'></a>reading|[bench::in](tcllib/files/modules/bench/bench\_read\.md)|
|<a name='receiver'></a>receiver|[term::receive](tcllib/files/modules/term/receive\.md) &#183; [term::receive::bind](tcllib/files/modules/term/term\_bind\.md) &#183; [transfer::receiver](tcllib/files/modules/transfer/receiver\.md)|
|<a name='reconnect'></a>reconnect|[nameserv::auto](tcllib/files/modules/nns/nns\_auto\.md)|
|<a name='record'></a>record|[struct::queue](tcllib/files/modules/struct/queue\.md) &#183; [struct::record](tcllib/files/modules/struct/record\.md)|
|<a name='recursive\_descent'></a>recursive descent|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='reduce'></a>reduce|[generator](tcllib/files/modules/generator/generator\.md) &#183; [struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='reference'></a>reference|[doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md)|
|<a name='reflected\_channel'></a>reflected channel|[tcl::chan::cat](tcllib/files/modules/virtchannel\_base/cat\.md) &#183; [tcl::chan::core](tcllib/files/modules/virtchannel\_core/core\.md) &#183; [tcl::chan::events](tcllib/files/modules/virtchannel\_core/events\.md) &#183; [tcl::chan::facade](tcllib/files/modules/virtchannel\_base/facade\.md) &#183; [tcl::chan::fifo](tcllib/files/modules/virtchannel\_base/tcllib\_fifo\.md) &#183; [tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md) &#183; [tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md) &#183; [tcl::chan::memchan](tcllib/files/modules/virtchannel\_base/tcllib\_memchan\.md) &#183; [tcl::chan::null](tcllib/files/modules/virtchannel\_base/tcllib\_null\.md) &#183; [tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md) &#183; [tcl::chan::random](tcllib/files/modules/virtchannel\_base/tcllib\_random\.md) &#183; [tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md) &#183; [tcl::chan::string](tcllib/files/modules/virtchannel\_base/tcllib\_string\.md) &#183; [tcl::chan::textwindow](tcllib/files/modules/virtchannel\_base/textwindow\.md) &#183; [tcl::chan::variable](tcllib/files/modules/virtchannel\_base/tcllib\_variable\.md) &#183; [tcl::chan::zero](tcllib/files/modules/virtchannel\_base/tcllib\_zero\.md) &#183; [tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md) &#183; [tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) &#183; [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md) &#183; [tcl::transform::core](tcllib/files/modules/virtchannel\_core/transformcore\.md) &#183; [tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md) &#183; [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md) &#183; [tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md) &#183; [tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md) &#183; [tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md) &#183; [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md) &#183; [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) &#183; [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) &#183; [tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md) &#183; [tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md)|
|<a name='regex'></a>regex|[string::token](tcllib/files/modules/string/token\.md)|
|<a name='regular\_expression'></a>regular expression|[grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) &#183; [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) &#183; [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) &#183; [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md) &#183; [textutil](tcllib/files/modules/textutil/textutil\.md) &#183; [textutil::split](tcllib/files/modules/textutil/textutil\_split\.md) &#183; [textutil::trim](tcllib/files/modules/textutil/trim\.md)|
|<a name='regular\_grammar'></a>regular grammar|[grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) &#183; [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) &#183; [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) &#183; [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md)|
|<a name='regular\_languages'></a>regular languages|[grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) &#183; [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) &#183; [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) &#183; [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md)|
|<a name='remote\_communication'></a>remote communication|[comm](tcllib/files/modules/comm/comm\.md) &#183; [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md)|
|<a name='remote\_execution'></a>remote execution|[comm](tcllib/files/modules/comm/comm\.md) &#183; [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md)|
|<a name='remove'></a>remove|[fileutil::multi](tcllib/files/modules/fileutil/multi\.md) &#183; [fileutil::multi::op](tcllib/files/modules/fileutil/multiop\.md)|
|<a name='repeating'></a>repeating|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='repetition'></a>repetition|[struct::list](tcllib/files/modules/struct/struct\_list\.md) &#183; [textutil::repeat](tcllib/files/modules/textutil/repeat\.md)|
|<a name='report'></a>report|[report](tcllib/files/modules/report/report\.md)|
|<a name='reshuffle'></a>reshuffle|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='residual\_graph'></a>residual graph|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='resolver'></a>resolver|[dns](tcllib/files/modules/dns/tcllib\_dns\.md)|
|<a name='resource\_management'></a>resource management|[try](tcllib/files/modules/try/tcllib\_try\.md)|
|<a name='restore'></a>restore|[nameserv::auto](tcllib/files/modules/nns/nns\_auto\.md)|
|<a name='return'></a>return|[throw](tcllib/files/modules/try/tcllib\_throw\.md)|
|<a name='reverse'></a>reverse|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='rfc\_821'></a>rfc 821|[mime](tcllib/files/modules/mime/mime\.md) &#183; [smtp](tcllib/files/modules/mime/smtp\.md) &#183; [smtpd](tcllib/files/modules/smtpd/smtpd\.md)|
|<a name='rfc\_822'></a>rfc 822|[mime](tcllib/files/modules/mime/mime\.md) &#183; [pop3d::dbox](tcllib/files/modules/pop3d/pop3d\_dbox\.md) &#183; [smtp](tcllib/files/modules/mime/smtp\.md)|
|<a name='rfc\_868'></a>rfc 868|[ntp\_time](tcllib/files/modules/ntp/ntp\_time\.md)|
|<a name='rfc\_959'></a>rfc 959|[ftp](tcllib/files/modules/ftp/ftp\.md) &#183; [ftp::geturl](tcllib/files/modules/ftp/ftp\_geturl\.md) &#183; [ftpd](tcllib/files/modules/ftpd/ftpd\.md)|
|<a name='rfc\_977'></a>rfc 977|[nntp](tcllib/files/modules/nntp/nntp\.md)|
|<a name='rfc\_1034'></a>rfc 1034|[dns](tcllib/files/modules/dns/tcllib\_dns\.md)|
|<a name='rfc\_1035'></a>rfc 1035|[dns](tcllib/files/modules/dns/tcllib\_dns\.md)|
|<a name='rfc\_1036'></a>rfc 1036|[nntp](tcllib/files/modules/nntp/nntp\.md)|
|<a name='rfc\_1320'></a>rfc 1320|[md4](tcllib/files/modules/md4/md4\.md) &#183; [md5](tcllib/files/modules/md5/md5\.md) &#183; [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) &#183; [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md)|
|<a name='rfc\_1321'></a>rfc 1321|[md4](tcllib/files/modules/md4/md4\.md) &#183; [md5](tcllib/files/modules/md5/md5\.md) &#183; [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) &#183; [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md)|
|<a name='rfc\_1413'></a>rfc 1413|[ident](tcllib/files/modules/ident/ident\.md)|
|<a name='rfc\_1630'></a>rfc 1630|[uri](tcllib/files/modules/uri/uri\.md)|
|<a name='rfc\_1886'></a>rfc 1886|[dns](tcllib/files/modules/dns/tcllib\_dns\.md)|
|<a name='rfc\_1939'></a>rfc 1939|[pop3](tcllib/files/modules/pop3/pop3\.md) &#183; [pop3d](tcllib/files/modules/pop3d/pop3d\.md)|
|<a name='rfc\_2030'></a>rfc 2030|[ntp\_time](tcllib/files/modules/ntp/ntp\_time\.md)|
|<a name='rfc\_2045'></a>rfc 2045|[mime](tcllib/files/modules/mime/mime\.md)|
|<a name='rfc\_2046'></a>rfc 2046|[mime](tcllib/files/modules/mime/mime\.md)|
|<a name='rfc\_2049'></a>rfc 2049|[mime](tcllib/files/modules/mime/mime\.md)|
|<a name='rfc\_2104'></a>rfc 2104|[md4](tcllib/files/modules/md4/md4\.md) &#183; [md5](tcllib/files/modules/md5/md5\.md) &#183; [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) &#183; [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md) &#183; [sha1](tcllib/files/modules/sha1/sha1\.md) &#183; [sha256](tcllib/files/modules/sha1/sha256\.md)|
|<a name='rfc\_2141'></a>rfc 2141|[uri\_urn](tcllib/files/modules/uri/urn\-scheme\.md)|
|<a name='rfc\_2251'></a>rfc 2251|[ldap](tcllib/files/modules/ldap/ldap\.md) &#183; [ldapx](tcllib/files/modules/ldap/ldapx\.md)|
|<a name='rfc\_2255'></a>rfc 2255|[uri](tcllib/files/modules/uri/uri\.md)|
|<a name='rfc\_2289'></a>rfc 2289|[otp](tcllib/files/modules/otp/otp\.md)|
|<a name='rfc\_2396'></a>rfc 2396|[uri](tcllib/files/modules/uri/uri\.md)|
|<a name='rfc\_2554'></a>rfc 2554|[smtp](tcllib/files/modules/mime/smtp\.md)|
|<a name='rfc\_2718'></a>RFC 2718|[oauth](tcllib/files/modules/oauth/oauth\.md)|
|<a name='rfc\_2821'></a>rfc 2821|[smtp](tcllib/files/modules/mime/smtp\.md) &#183; [smtpd](tcllib/files/modules/smtpd/smtpd\.md)|
|<a name='rfc\_2849'></a>rfc 2849|[ldapx](tcllib/files/modules/ldap/ldapx\.md)|
|<a name='rfc\_3207'></a>rfc 3207|[smtp](tcllib/files/modules/mime/smtp\.md)|
|<a name='rfc\_3513'></a>rfc 3513|[tcllib\_ip](tcllib/files/modules/dns/tcllib\_ip\.md)|
|<a name='rfc\_3986'></a>rfc 3986|[uri](tcllib/files/modules/uri/uri\.md)|
|<a name='rfc\_4511'></a>rfc 4511|[ldap](tcllib/files/modules/ldap/ldap\.md)|
|<a name='rfc\_5849'></a>RFC 5849|[oauth](tcllib/files/modules/oauth/oauth\.md)|
|<a name='rfc\_6455'></a>rfc 6455|[websocket](tcllib/files/modules/websocket/websocket\.md)|
|<a name='rfc\_7858'></a>rfc 7858|[dns](tcllib/files/modules/dns/tcllib\_dns\.md)|
|<a name='rfc3501'></a>rfc3501|[imap4](tcllib/files/modules/imap4/imap4\.md)|
|<a name='rfc3548'></a>rfc3548|[base32](tcllib/files/modules/base32/base32\.md) &#183; [base32::hex](tcllib/files/modules/base32/base32hex\.md)|
|<a name='right\_outer\_join'></a>right outer join|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='ripemd'></a>RIPEMD|[ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) &#183; [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md)|
|<a name='roman\_numeral'></a>roman numeral|[math::roman](tcllib/files/modules/math/roman\.md)|
|<a name='roots'></a>roots|[math::calculus](tcllib/files/modules/math/calculus\.md)|
|<a name='rot'></a>rot|[tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md)|
|<a name='rot13'></a>rot13|[tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md)|
|<a name='rounding'></a>rounding|[math::fuzzy](tcllib/files/modules/math/fuzzy\.md)|
|<a name='rows'></a>rows|[term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md)|
|<a name='rpc'></a>rpc|[comm](tcllib/files/modules/comm/comm\.md) &#183; [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md)|
|<a name='rsa'></a>rsa|[pki](tcllib/files/modules/pki/pki\.md)|
|<a name='running'></a>running|[grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md)|


#### <a name='cS'></a>Keywords: S

|||
|---|---|
|<a name='s3'></a>s3|[S3](tcllib/files/modules/amazon\-s3/S3\.md)|
|<a name='sasl'></a>SASL|[SASL](tcllib/files/modules/sasl/sasl\.md) &#183; [SASL::NTLM](tcllib/files/modules/sasl/ntlm\.md) &#183; [SASL::SCRAM](tcllib/files/modules/sasl/scram\.md) &#183; [SASL::XGoogleToken](tcllib/files/modules/sasl/gtoken\.md)|
|<a name='scanl'></a>scanl|[generator](tcllib/files/modules/generator/generator\.md)|
|<a name='sccs'></a>SCCS|[rcs](tcllib/files/modules/rcs/rcs\.md)|
|<a name='scram'></a>SCRAM|[SASL::SCRAM](tcllib/files/modules/sasl/scram\.md)|
|<a name='secure'></a>secure|[comm](tcllib/files/modules/comm/comm\.md) &#183; [pop3](tcllib/files/modules/pop3/pop3\.md) &#183; [pop3d](tcllib/files/modules/pop3d/pop3d\.md) &#183; [transfer::connect](tcllib/files/modules/transfer/connect\.md) &#183; [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) &#183; [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md)|
|<a name='security'></a>security|[aes](tcllib/files/modules/aes/aes\.md) &#183; [blowfish](tcllib/files/modules/blowfish/blowfish\.md) &#183; [cksum](tcllib/files/modules/crc/cksum\.md) &#183; [crc16](tcllib/files/modules/crc/crc16\.md) &#183; [crc32](tcllib/files/modules/crc/crc32\.md) &#183; [des](tcllib/files/modules/des/des\.md) &#183; [md4](tcllib/files/modules/md4/md4\.md) &#183; [md5](tcllib/files/modules/md5/md5\.md) &#183; [md5crypt](tcllib/files/modules/md5crypt/md5crypt\.md) &#183; [otp](tcllib/files/modules/otp/otp\.md) &#183; [pki](tcllib/files/modules/pki/pki\.md) &#183; [rc4](tcllib/files/modules/rc4/rc4\.md) &#183; [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) &#183; [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md) &#183; [sha1](tcllib/files/modules/sha1/sha1\.md) &#183; [sha256](tcllib/files/modules/sha1/sha256\.md) &#183; [sum](tcllib/files/modules/crc/sum\.md) &#183; [tclDES](tcllib/files/modules/des/tcldes\.md) &#183; [tclDESjr](tcllib/files/modules/des/tcldesjr\.md)|
|<a name='seed'></a>seed|[tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md)|
|<a name='selectionbox'></a>selectionbox|[javascript](tcllib/files/modules/javascript/javascript\.md)|
|<a name='semantic\_markup'></a>semantic markup|[docidx\_intro](tcllib/files/modules/doctools/docidx\_intro\.md) &#183; [docidx\_lang\_cmdref](tcllib/files/modules/doctools/docidx\_lang\_cmdref\.md) &#183; [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) &#183; [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) &#183; [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md) &#183; [docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md) &#183; [doctoc\_intro](tcllib/files/modules/doctools/doctoc\_intro\.md) &#183; [doctoc\_lang\_cmdref](tcllib/files/modules/doctools/doctoc\_lang\_cmdref\.md) &#183; [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) &#183; [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) &#183; [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md) &#183; [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) &#183; [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) &#183; [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) &#183; [doctools\_intro](tcllib/files/modules/doctools/doctools\_intro\.md) &#183; [doctools\_lang\_cmdref](tcllib/files/modules/doctools/doctools\_lang\_cmdref\.md) &#183; [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) &#183; [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) &#183; [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md) &#183; [doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md)|
|<a name='send'></a>send|[comm](tcllib/files/modules/comm/comm\.md)|
|<a name='serialization'></a>serialization|[bee](tcllib/files/modules/bee/bee\.md) &#183; [doctools::idx::export::docidx](tcllib/files/modules/doctools2idx/export\_docidx\.md) &#183; [doctools::idx::export::html](tcllib/files/modules/doctools2idx/idx\_export\_html\.md) &#183; [doctools::idx::export::json](tcllib/files/modules/doctools2idx/idx\_export\_json\.md) &#183; [doctools::idx::export::nroff](tcllib/files/modules/doctools2idx/idx\_export\_nroff\.md) &#183; [doctools::idx::export::text](tcllib/files/modules/doctools2idx/idx\_export\_text\.md) &#183; [doctools::idx::export::wiki](tcllib/files/modules/doctools2idx/idx\_export\_wiki\.md) &#183; [doctools::idx::structure](tcllib/files/modules/doctools2idx/idx\_structure\.md) &#183; [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) &#183; [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) &#183; [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) &#183; [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) &#183; [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md) &#183; [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md) &#183; [doctools::toc::structure](tcllib/files/modules/doctools2toc/toc\_structure\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::tree](tcllib/files/modules/struct/struct\_tree\.md)|
|<a name='server'></a>server|[map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md) &#183; [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md) &#183; [nameserv::common](tcllib/files/modules/nns/nns\_common\.md) &#183; [nameserv::server](tcllib/files/modules/nns/nns\_server\.md) &#183; [nns\_intro](tcllib/files/modules/nns/nns\_intro\.md) &#183; [nnsd](tcllib/files/apps/nnsd\.md) &#183; [udpcluster](tcllib/files/modules/udpcluster/udpcluster\.md)|
|<a name='service'></a>service|[logger](tcllib/files/modules/log/logger\.md)|
|<a name='services'></a>services|[ftpd](tcllib/files/modules/ftpd/ftpd\.md) &#183; [httpd](tcllib/files/modules/httpd/httpd\.md) &#183; [smtpd](tcllib/files/modules/smtpd/smtpd\.md)|
|<a name='set'></a>set|[struct::queue](tcllib/files/modules/struct/queue\.md) &#183; [struct::set](tcllib/files/modules/struct/struct\_set\.md)|
|<a name='sha1'></a>sha1|[sha1](tcllib/files/modules/sha1/sha1\.md)|
|<a name='sha256'></a>sha256|[sha256](tcllib/files/modules/sha1/sha256\.md)|
|<a name='shell'></a>shell|[string::token::shell](tcllib/files/modules/string/token\_shell\.md)|
|<a name='shortest\_path'></a>shortest path|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='shuffle'></a>shuffle|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='simulated\_annealing'></a>simulated annealing|[simulation::annealing](tcllib/files/modules/simulation/annealing\.md)|
|<a name='simulation'></a>simulation|[simulation::random](tcllib/files/modules/simulation/simulation\_random\.md)|
|<a name='singleton'></a>singleton|[oo::util](tcllib/files/modules/tool/meta\.md) &#183; [oo::util](tcllib/files/modules/ooutil/ooutil\.md)|
|<a name='size\_limit'></a>size limit|[tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md)|
|<a name='skiplist'></a>skiplist|[struct::queue](tcllib/files/modules/struct/queue\.md) &#183; [struct::skiplist](tcllib/files/modules/struct/skiplist\.md)|
|<a name='slippy'></a>slippy|[map::slippy](tcllib/files/modules/map/map\_slippy\.md) &#183; [map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md) &#183; [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md)|
|<a name='smtp'></a>smtp|[mime](tcllib/files/modules/mime/mime\.md) &#183; [smtp](tcllib/files/modules/mime/smtp\.md) &#183; [smtpd](tcllib/files/modules/smtpd/smtpd\.md)|
|<a name='smtpd'></a>smtpd|[smtpd](tcllib/files/modules/smtpd/smtpd\.md)|
|<a name='snit'></a>Snit|[snit](tcllib/files/modules/snit/snit\.md)|
|<a name='snit'></a>snit|[deleg\_method](tcllib/files/modules/interp/deleg\_method\.md) &#183; [interp](tcllib/files/modules/interp/tcllib\_interp\.md)|
|<a name='sntp'></a>SNTP|[ntp\_time](tcllib/files/modules/ntp/ntp\_time\.md)|
|<a name='socket'></a>socket|[comm](tcllib/files/modules/comm/comm\.md) &#183; [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md) &#183; [smtpd](tcllib/files/modules/smtpd/smtpd\.md)|
|<a name='soundex'></a>soundex|[soundex](tcllib/files/modules/soundex/soundex\.md)|
|<a name='source'></a>source|[docstrip](tcllib/files/modules/docstrip/docstrip\.md) &#183; [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) &#183; [tcldocstrip](tcllib/files/apps/tcldocstrip\.md)|
|<a name='spacing'></a>spacing|[tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md)|
|<a name='spatial\_interpolation'></a>spatial interpolation|[math::interpolate](tcllib/files/modules/math/interpolate\.md)|
|<a name='special\_functions'></a>special functions|[math::special](tcllib/files/modules/math/special\.md)|
|<a name='specification'></a>specification|[bench\_lang\_spec](tcllib/files/modules/bench/bench\_lang\_spec\.md)|
|<a name='speed'></a>speed|[profiler](tcllib/files/modules/profiler/profiler\.md)|
|<a name='split'></a>split|[textutil::split](tcllib/files/modules/textutil/textutil\_split\.md)|
|<a name='squared\_graph'></a>squared graph|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='ssl'></a>ssl|[comm](tcllib/files/modules/comm/comm\.md) &#183; [imap4](tcllib/files/modules/imap4/imap4\.md) &#183; [pop3](tcllib/files/modules/pop3/pop3\.md) &#183; [pop3d](tcllib/files/modules/pop3d/pop3d\.md) &#183; [transfer::connect](tcllib/files/modules/transfer/connect\.md) &#183; [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) &#183; [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md)|
|<a name='stack'></a>stack|[struct::queue](tcllib/files/modules/struct/queue\.md)|
|<a name='standard\_io'></a>standard io|[tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md)|
|<a name='state'></a>state|[grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) &#183; [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) &#183; [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) &#183; [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='state\_de\_serialization'></a>state \(de\)serialization|[namespacex](tcllib/files/modules/namespacex/namespacex\.md)|
|<a name='statistical\_distribution'></a>statistical distribution|[simulation::random](tcllib/files/modules/simulation/simulation\_random\.md)|
|<a name='statistics'></a>statistics|[counter](tcllib/files/modules/counter/counter\.md) &#183; [math](tcllib/files/modules/math/math\.md) &#183; [math::changepoint](tcllib/files/modules/math/changepoint\.md) &#183; [math::PCA](tcllib/files/modules/math/pca\.md) &#183; [math::statistics](tcllib/files/modules/math/statistics\.md)|
|<a name='stdin'></a>stdin|[tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md)|
|<a name='stdout'></a>stdout|[tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md)|
|<a name='stochastic\_modelling'></a>stochastic modelling|[simulation::montecarlo](tcllib/files/modules/simulation/montecarlo\.md)|
|<a name='stream\_cipher'></a>stream cipher|[rc4](tcllib/files/modules/rc4/rc4\.md)|
|<a name='stream\_copy'></a>stream copy|[tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md)|
|<a name='string'></a>string|[string::token](tcllib/files/modules/string/token\.md) &#183; [string::token::shell](tcllib/files/modules/string/token\_shell\.md) &#183; [textutil](tcllib/files/modules/textutil/textutil\.md) &#183; [textutil::adjust](tcllib/files/modules/textutil/adjust\.md) &#183; [textutil::expander](tcllib/files/modules/textutil/expander\.md) &#183; [textutil::repeat](tcllib/files/modules/textutil/repeat\.md) &#183; [textutil::split](tcllib/files/modules/textutil/textutil\_split\.md) &#183; [textutil::string](tcllib/files/modules/textutil/textutil\_string\.md) &#183; [textutil::tabify](tcllib/files/modules/textutil/tabify\.md) &#183; [textutil::trim](tcllib/files/modules/textutil/trim\.md)|
|<a name='stringprep'></a>stringprep|[stringprep](tcllib/files/modules/stringprep/stringprep\.md) &#183; [stringprep::data](tcllib/files/modules/stringprep/stringprep\_data\.md) &#183; [unicode::data](tcllib/files/modules/stringprep/unicode\_data\.md)|
|<a name='strongly\_connected\_component'></a>strongly connected component|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='struct'></a>struct|[struct::pool](tcllib/files/modules/struct/pool\.md) &#183; [struct::record](tcllib/files/modules/struct/record\.md)|
|<a name='structure'></a>structure|[control](tcllib/files/modules/control/control\.md)|
|<a name='structured\_queries'></a>structured queries|[treeql](tcllib/files/modules/treeql/treeql\.md)|
|<a name='style'></a>style|[doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md)|
|<a name='subcommand'></a>subcommand|[tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) &#183; [tepam::procedure](tcllib/files/modules/tepam/tepam\_procedure\.md)|
|<a name='subgraph'></a>subgraph|[struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='subject'></a>subject|[hook](tcllib/files/modules/hook/hook\.md)|
|<a name='submitbutton'></a>submitbutton|[javascript](tcllib/files/modules/javascript/javascript\.md)|
|<a name='subscriber'></a>subscriber|[hook](tcllib/files/modules/hook/hook\.md)|
|<a name='subsequence'></a>subsequence|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='subst'></a>subst|[doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md)|
|<a name='sum'></a>sum|[sum](tcllib/files/modules/crc/sum\.md)|
|<a name='swapping'></a>swapping|[struct::list](tcllib/files/modules/struct/struct\_list\.md)|
|<a name='symmetric\_difference'></a>symmetric difference|[struct::set](tcllib/files/modules/struct/struct\_set\.md)|
|<a name='synchronous'></a>synchronous|[cache::async](tcllib/files/modules/cache/async\.md)|
|<a name='syntax\_tree'></a>syntax tree|[grammar::me::util](tcllib/files/modules/grammar\_me/me\_util\.md)|


#### <a name='cT'></a>Keywords: T

|||
|---|---|
|<a name='table'></a>table|[doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [html](tcllib/files/modules/html/html\.md) &#183; [report](tcllib/files/modules/report/report\.md)|
|<a name='table\_of\_contents'></a>table of contents|[doctoc\_intro](tcllib/files/modules/doctools/doctoc\_intro\.md) &#183; [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) &#183; [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) &#183; [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) &#183; [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) &#183; [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) &#183; [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md) &#183; [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) &#183; [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md)|
|<a name='tabstops'></a>tabstops|[textutil::tabify](tcllib/files/modules/textutil/tabify\.md)|
|<a name='tallying'></a>tallying|[counter](tcllib/files/modules/counter/counter\.md)|
|<a name='tape\_archive'></a>tape archive|[tar](tcllib/files/modules/tar/tar\.md)|
|<a name='tar'></a>tar|[tar](tcllib/files/modules/tar/tar\.md)|
|<a name='tcl'></a>tcl|[math::bigfloat](tcllib/files/modules/math/bigfloat\.md) &#183; [math::bignum](tcllib/files/modules/math/bignum\.md) &#183; [math::decimal](tcllib/files/modules/math/decimal\.md) &#183; [math::PCA](tcllib/files/modules/math/pca\.md)|
|<a name='tcl\_module'></a>Tcl module|[docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md)|
|<a name='tcl\_syntax'></a>Tcl syntax|[doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md)|
|<a name='tcler\_s\_wiki'></a>tcler's wiki|[doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md)|
|<a name='tcllib'></a>tcllib|[csv](tcllib/files/modules/csv/csv\.md)|
|<a name='tcloo'></a>TclOO|[clay](tcllib/files/modules/clay/clay\.md) &#183; [httpd](tcllib/files/modules/httpd/httpd\.md) &#183; [oo::util](tcllib/files/modules/tool/meta\.md) &#183; [oo::util](tcllib/files/modules/ooutil/ooutil\.md) &#183; [oometa](tcllib/files/modules/oometa/oometa\.md) &#183; [tool](tcllib/files/modules/tool/tool\.md) &#183; [tool::dict\_ensemble](tcllib/files/modules/tool/tool\_dict\_ensemble\.md)|
|<a name='tclparam'></a>TCLPARAM|[pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md)|
|<a name='tdpl'></a>TDPL|[grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='temp\_file'></a>temp file|[fileutil](tcllib/files/modules/fileutil/fileutil\.md)|
|<a name='template\_processing'></a>template processing|[textutil::expander](tcllib/files/modules/textutil/expander\.md)|
|<a name='terminal'></a>terminal|[term](tcllib/files/modules/term/term\.md) &#183; [term::ansi::code](tcllib/files/modules/term/ansi\_code\.md) &#183; [term::ansi::code::attr](tcllib/files/modules/term/ansi\_cattr\.md) &#183; [term::ansi::code::ctrl](tcllib/files/modules/term/ansi\_cctrl\.md) &#183; [term::ansi::code::macros](tcllib/files/modules/term/ansi\_cmacros\.md) &#183; [term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md) &#183; [term::ansi::send](tcllib/files/modules/term/ansi\_send\.md) &#183; [term::interact::menu](tcllib/files/modules/term/imenu\.md) &#183; [term::interact::pager](tcllib/files/modules/term/ipager\.md) &#183; [term::receive](tcllib/files/modules/term/receive\.md) &#183; [term::receive::bind](tcllib/files/modules/term/term\_bind\.md) &#183; [term::send](tcllib/files/modules/term/term\_send\.md)|
|<a name='test'></a>test|[fileutil](tcllib/files/modules/fileutil/fileutil\.md)|
|<a name='testing'></a>Testing|[valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) &#183; [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) &#183; [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) &#183; [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) &#183; [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) &#183; [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) &#183; [valtype::iban](tcllib/files/modules/valtype/iban\.md) &#183; [valtype::imei](tcllib/files/modules/valtype/imei\.md) &#183; [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) &#183; [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) &#183; [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) &#183; [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) &#183; [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md)|
|<a name='testing'></a>testing|[bench](tcllib/files/modules/bench/bench\.md) &#183; [bench::in](tcllib/files/modules/bench/bench\_read\.md) &#183; [bench::out::csv](tcllib/files/modules/bench/bench\_wcsv\.md) &#183; [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md) &#183; [bench\_intro](tcllib/files/modules/bench/bench\_intro\.md) &#183; [bench\_lang\_intro](tcllib/files/modules/bench/bench\_lang\_intro\.md) &#183; [bench\_lang\_spec](tcllib/files/modules/bench/bench\_lang\_spec\.md)|
|<a name='tex'></a>TeX|[textutil](tcllib/files/modules/textutil/textutil\.md) &#183; [textutil::adjust](tcllib/files/modules/textutil/adjust\.md)|
|<a name='text'></a>text|[bench::in](tcllib/files/modules/bench/bench\_read\.md) &#183; [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md)|
|<a name='text\_comparison'></a>text comparison|[soundex](tcllib/files/modules/soundex/soundex\.md)|
|<a name='text\_conversion'></a>text conversion|[rcs](tcllib/files/modules/rcs/rcs\.md)|
|<a name='text\_differences'></a>text differences|[rcs](tcllib/files/modules/rcs/rcs\.md)|
|<a name='text\_display'></a>text display|[term::interact::menu](tcllib/files/modules/term/imenu\.md) &#183; [term::interact::pager](tcllib/files/modules/term/ipager\.md)|
|<a name='text\_expansion'></a>text expansion|[textutil::expander](tcllib/files/modules/textutil/expander\.md)|
|<a name='text\_likeness'></a>text likeness|[soundex](tcllib/files/modules/soundex/soundex\.md)|
|<a name='text\_processing'></a>text processing|[bibtex](tcllib/files/modules/bibtex/bibtex\.md) &#183; [huddle](tcllib/files/modules/yaml/huddle\.md) &#183; [page](tcllib/files/apps/page\.md) &#183; [page\_intro](tcllib/files/modules/page/page\_intro\.md) &#183; [page\_pluginmgr](tcllib/files/modules/page/page\_pluginmgr\.md) &#183; [page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md) &#183; [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) &#183; [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md) &#183; [page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) &#183; [page\_util\_quote](tcllib/files/modules/page/page\_util\_quote\.md) &#183; [yaml](tcllib/files/modules/yaml/yaml\.md)|
|<a name='text\_widget'></a>text widget|[tcl::chan::textwindow](tcllib/files/modules/virtchannel\_base/textwindow\.md)|
|<a name='threads'></a>threads|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md)|
|<a name='throw'></a>throw|[throw](tcllib/files/modules/try/tcllib\_throw\.md)|
|<a name='thumbnail'></a>thumbnail|[jpeg](tcllib/files/modules/jpeg/jpeg\.md)|
|<a name='tie'></a>tie|[tie](tcllib/files/modules/tie/tie\_std\.md) &#183; [tie](tcllib/files/modules/tie/tie\.md)|
|<a name='tif'></a>tif|[tiff](tcllib/files/modules/tiff/tiff\.md)|
|<a name='tiff'></a>tiff|[tiff](tcllib/files/modules/tiff/tiff\.md)|
|<a name='tile'></a>tile|[map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md) &#183; [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md)|
|<a name='time'></a>time|[ntp\_time](tcllib/files/modules/ntp/ntp\_time\.md)|
|<a name='timestamp'></a>timestamp|[png](tcllib/files/modules/png/png\.md)|
|<a name='timestamps'></a>timestamps|[debug::timestamp](tcllib/files/modules/debug/debug\_timestamp\.md)|
|<a name='tip\_219'></a>tip 219|[tcl::chan::cat](tcllib/files/modules/virtchannel\_base/cat\.md) &#183; [tcl::chan::core](tcllib/files/modules/virtchannel\_core/core\.md) &#183; [tcl::chan::events](tcllib/files/modules/virtchannel\_core/events\.md) &#183; [tcl::chan::facade](tcllib/files/modules/virtchannel\_base/facade\.md) &#183; [tcl::chan::fifo](tcllib/files/modules/virtchannel\_base/tcllib\_fifo\.md) &#183; [tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md) &#183; [tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md) &#183; [tcl::chan::memchan](tcllib/files/modules/virtchannel\_base/tcllib\_memchan\.md) &#183; [tcl::chan::null](tcllib/files/modules/virtchannel\_base/tcllib\_null\.md) &#183; [tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md) &#183; [tcl::chan::random](tcllib/files/modules/virtchannel\_base/tcllib\_random\.md) &#183; [tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md) &#183; [tcl::chan::string](tcllib/files/modules/virtchannel\_base/tcllib\_string\.md) &#183; [tcl::chan::textwindow](tcllib/files/modules/virtchannel\_base/textwindow\.md) &#183; [tcl::chan::variable](tcllib/files/modules/virtchannel\_base/tcllib\_variable\.md) &#183; [tcl::chan::zero](tcllib/files/modules/virtchannel\_base/tcllib\_zero\.md) &#183; [tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md) &#183; [tcl::transform::core](tcllib/files/modules/virtchannel\_core/transformcore\.md)|
|<a name='tip\_230'></a>tip 230|[tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) &#183; [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md) &#183; [tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md) &#183; [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md) &#183; [tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md) &#183; [tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md) &#183; [tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md) &#183; [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md) &#183; [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) &#183; [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) &#183; [tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md) &#183; [tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md)|
|<a name='tip\_234'></a>tip 234|[tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md)|
|<a name='tip\_317'></a>tip 317|[tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md)|
|<a name='tk'></a>Tk|[tcl::chan::textwindow](tcllib/files/modules/virtchannel\_base/textwindow\.md)|
|<a name='tls'></a>tls|[comm](tcllib/files/modules/comm/comm\.md) &#183; [imap4](tcllib/files/modules/imap4/imap4\.md) &#183; [pop3](tcllib/files/modules/pop3/pop3\.md) &#183; [pop3d](tcllib/files/modules/pop3d/pop3d\.md) &#183; [smtp](tcllib/files/modules/mime/smtp\.md) &#183; [transfer::connect](tcllib/files/modules/transfer/connect\.md) &#183; [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) &#183; [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md)|
|<a name='tmml'></a>TMML|[doctools](tcllib/files/modules/doctools/doctools\.md) &#183; [doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) &#183; [dtplite](tcllib/files/apps/dtplite\.md) &#183; [mpexpand](tcllib/files/modules/doctools/mpexpand\.md)|
|<a name='toc'></a>toc|[doctoc\_intro](tcllib/files/modules/doctools/doctoc\_intro\.md) &#183; [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) &#183; [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) &#183; [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) &#183; [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) &#183; [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md) &#183; [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md) &#183; [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) &#183; [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md)|
|<a name='toc\_formatter'></a>toc formatter|[doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md)|
|<a name='tokenization'></a>tokenization|[string::token](tcllib/files/modules/string/token\.md) &#183; [string::token::shell](tcllib/files/modules/string/token\_shell\.md)|
|<a name='tool'></a>TOOL|[oometa](tcllib/files/modules/oometa/oometa\.md) &#183; [tool](tcllib/files/modules/tool/tool\.md) &#183; [tool::dict\_ensemble](tcllib/files/modules/tool/tool\_dict\_ensemble\.md)|
|<a name='top\_down\_parsing\_languages'></a>top\-down parsing languages|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='torrent'></a>torrent|[bee](tcllib/files/modules/bee/bee\.md)|
|<a name='touch'></a>touch|[fileutil](tcllib/files/modules/fileutil/fileutil\.md)|
|<a name='tpdl'></a>TPDL|[grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md)|
|<a name='trace'></a>trace|[debug](tcllib/files/modules/debug/debug\.md) &#183; [debug::caller](tcllib/files/modules/debug/debug\_caller\.md) &#183; [debug::heartbeat](tcllib/files/modules/debug/debug\_heartbeat\.md) &#183; [debug::timestamp](tcllib/files/modules/debug/debug\_timestamp\.md)|
|<a name='transducer'></a>transducer|[grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md) &#183; [grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) &#183; [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) &#183; [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) &#183; [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md) &#183; [grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt](tcllib/files/apps/pt\.md) &#183; [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) &#183; [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) &#183; [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) &#183; [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md) &#183; [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) &#183; [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) &#183; [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) &#183; [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) &#183; [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) &#183; [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) &#183; [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) &#183; [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) &#183; [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) &#183; [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) &#183; [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) &#183; [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) &#183; [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) &#183; [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) &#183; [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) &#183; [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) &#183; [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) &#183; [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) &#183; [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) &#183; [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) &#183; [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) &#183; [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) &#183; [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) &#183; [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) &#183; [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) &#183; [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) &#183; [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) &#183; [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) &#183; [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) &#183; [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) &#183; [pt::util](tcllib/files/modules/pt/pt\_util\.md) &#183; [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) &#183; [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) &#183; [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) &#183; [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) &#183; [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) &#183; [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md)|
|<a name='transfer'></a>transfer|[transfer::connect](tcllib/files/modules/transfer/connect\.md) &#183; [transfer::copy](tcllib/files/modules/transfer/copyops\.md) &#183; [transfer::copy::queue](tcllib/files/modules/transfer/tqueue\.md) &#183; [transfer::data::destination](tcllib/files/modules/transfer/ddest\.md) &#183; [transfer::data::source](tcllib/files/modules/transfer/dsource\.md) &#183; [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) &#183; [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md)|
|<a name='transformation'></a>transformation|[page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) &#183; [tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) &#183; [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md) &#183; [tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md) &#183; [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md) &#183; [tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md) &#183; [tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md) &#183; [tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md) &#183; [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md) &#183; [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) &#183; [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) &#183; [tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md) &#183; [tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md)|
|<a name='transmitter'></a>transmitter|[transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md)|
|<a name='travelling\_salesman'></a>travelling salesman|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='traversal'></a>traversal|[fileutil\_traverse](tcllib/files/modules/fileutil/traverse\.md)|
|<a name='tree'></a>tree|[grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md) &#183; [grammar::me::util](tcllib/files/modules/grammar\_me/me\_util\.md) &#183; [htmlparse](tcllib/files/modules/htmlparse/htmlparse\.md) &#183; [struct::queue](tcllib/files/modules/struct/queue\.md) &#183; [struct::stack](tcllib/files/modules/struct/stack\.md) &#183; [struct::tree](tcllib/files/modules/struct/struct\_tree\.md) &#183; [struct::tree\_v1](tcllib/files/modules/struct/struct\_tree1\.md) &#183; [treeql](tcllib/files/modules/treeql/treeql\.md)|
|<a name='tree\_query\_language'></a>tree query language|[treeql](tcllib/files/modules/treeql/treeql\.md)|
|<a name='tree\_walking'></a>tree walking|[page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md) &#183; [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) &#183; [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md)|
|<a name='treeql'></a>TreeQL|[treeql](tcllib/files/modules/treeql/treeql\.md)|
|<a name='trigonometry'></a>trigonometry|[math::trig](tcllib/files/modules/math/trig\.md)|
|<a name='trimming'></a>trimming|[textutil](tcllib/files/modules/textutil/textutil\.md) &#183; [textutil::trim](tcllib/files/modules/textutil/trim\.md)|
|<a name='twitter'></a>twitter|[oauth](tcllib/files/modules/oauth/oauth\.md)|
|<a name='type'></a>type|[fileutil](tcllib/files/modules/fileutil/fileutil\.md) &#183; [fileutil::magic::cfront](tcllib/files/modules/fumagic/cfront\.md) &#183; [fileutil::magic::cgen](tcllib/files/modules/fumagic/cgen\.md) &#183; [fileutil::magic::filetype](tcllib/files/modules/fumagic/filetypes\.md) &#183; [fileutil::magic::rt](tcllib/files/modules/fumagic/rtcore\.md) &#183; [snit](tcllib/files/modules/snit/snit\.md)|
|<a name='type\_checking'></a>Type checking|[valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) &#183; [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) &#183; [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) &#183; [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) &#183; [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) &#183; [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) &#183; [valtype::iban](tcllib/files/modules/valtype/iban\.md) &#183; [valtype::imei](tcllib/files/modules/valtype/imei\.md) &#183; [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) &#183; [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) &#183; [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) &#183; [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) &#183; [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md)|


#### <a name='cU'></a>Keywords: U

|||
|---|---|
|<a name='uevent'></a>uevent|[hook](tcllib/files/modules/hook/hook\.md)|
|<a name='unbind'></a>unbind|[uevent](tcllib/files/modules/uev/uevent\.md)|
|<a name='uncapitalize'></a>uncapitalize|[textutil::string](tcllib/files/modules/textutil/textutil\_string\.md)|
|<a name='undenting'></a>undenting|[textutil::adjust](tcllib/files/modules/textutil/adjust\.md)|
|<a name='unicode'></a>unicode|[stringprep](tcllib/files/modules/stringprep/stringprep\.md) &#183; [stringprep::data](tcllib/files/modules/stringprep/stringprep\_data\.md) &#183; [unicode](tcllib/files/modules/stringprep/unicode\.md) &#183; [unicode::data](tcllib/files/modules/stringprep/unicode\_data\.md)|
|<a name='unified\_format\_diff'></a>unified format diff|[textutil::patch](tcllib/files/modules/textutil/patch\.md)|
|<a name='union'></a>union|[struct::disjointset](tcllib/files/modules/struct/disjointset\.md) &#183; [struct::set](tcllib/files/modules/struct/struct\_set\.md)|
|<a name='unit'></a>unit|[units](tcllib/files/modules/units/units\.md)|
|<a name='unknown\_hooking'></a>unknown hooking|[namespacex](tcllib/files/modules/namespacex/namespacex\.md)|
|<a name='untie'></a>untie|[tie](tcllib/files/modules/tie/tie\_std\.md) &#183; [tie](tcllib/files/modules/tie/tie\.md)|
|<a name='update'></a>update|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md)|
|<a name='uri'></a>uri|[uri](tcllib/files/modules/uri/uri\.md) &#183; [uri\_urn](tcllib/files/modules/uri/urn\-scheme\.md)|
|<a name='url'></a>url|[doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) &#183; [map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md) &#183; [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md) &#183; [uri](tcllib/files/modules/uri/uri\.md) &#183; [uri\_urn](tcllib/files/modules/uri/urn\-scheme\.md)|
|<a name='urn'></a>urn|[uri\_urn](tcllib/files/modules/uri/urn\-scheme\.md)|
|<a name='us\_npi'></a>US\-NPI|[valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md)|
|<a name='utilities'></a>utilities|[namespacex](tcllib/files/modules/namespacex/namespacex\.md)|
|<a name='uuencode'></a>uuencode|[uuencode](tcllib/files/modules/base64/uuencode\.md)|
|<a name='uuid'></a>UUID|[uuid](tcllib/files/modules/uuid/uuid\.md)|


#### <a name='cV'></a>Keywords: V

|||
|---|---|
|<a name='validation'></a>Validation|[valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) &#183; [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) &#183; [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) &#183; [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) &#183; [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) &#183; [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) &#183; [valtype::iban](tcllib/files/modules/valtype/iban\.md) &#183; [valtype::imei](tcllib/files/modules/valtype/imei\.md) &#183; [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) &#183; [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) &#183; [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) &#183; [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) &#183; [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md)|
|<a name='value\_checking'></a>Value checking|[valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) &#183; [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) &#183; [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) &#183; [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) &#183; [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) &#183; [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) &#183; [valtype::iban](tcllib/files/modules/valtype/iban\.md) &#183; [valtype::imei](tcllib/files/modules/valtype/imei\.md) &#183; [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) &#183; [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) &#183; [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) &#183; [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) &#183; [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md)|
|<a name='vectors'></a>vectors|[math::linearalgebra](tcllib/files/modules/math/linalg\.md)|
|<a name='verhoeff'></a>verhoeff|[valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md)|
|<a name='vertex'></a>vertex|[struct::graph](tcllib/files/modules/struct/graph\.md) &#183; [struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='vertex\_cover'></a>vertex cover|[struct::graph::op](tcllib/files/modules/struct/graphops\.md)|
|<a name='virtual\_channel'></a>virtual channel|[tcl::chan::cat](tcllib/files/modules/virtchannel\_base/cat\.md) &#183; [tcl::chan::core](tcllib/files/modules/virtchannel\_core/core\.md) &#183; [tcl::chan::events](tcllib/files/modules/virtchannel\_core/events\.md) &#183; [tcl::chan::facade](tcllib/files/modules/virtchannel\_base/facade\.md) &#183; [tcl::chan::fifo](tcllib/files/modules/virtchannel\_base/tcllib\_fifo\.md) &#183; [tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md) &#183; [tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md) &#183; [tcl::chan::memchan](tcllib/files/modules/virtchannel\_base/tcllib\_memchan\.md) &#183; [tcl::chan::null](tcllib/files/modules/virtchannel\_base/tcllib\_null\.md) &#183; [tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md) &#183; [tcl::chan::random](tcllib/files/modules/virtchannel\_base/tcllib\_random\.md) &#183; [tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md) &#183; [tcl::chan::string](tcllib/files/modules/virtchannel\_base/tcllib\_string\.md) &#183; [tcl::chan::textwindow](tcllib/files/modules/virtchannel\_base/textwindow\.md) &#183; [tcl::chan::variable](tcllib/files/modules/virtchannel\_base/tcllib\_variable\.md) &#183; [tcl::chan::zero](tcllib/files/modules/virtchannel\_base/tcllib\_zero\.md) &#183; [tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md) &#183; [tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) &#183; [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md) &#183; [tcl::transform::core](tcllib/files/modules/virtchannel\_core/transformcore\.md) &#183; [tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md) &#183; [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md) &#183; [tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md) &#183; [tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md) &#183; [tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md) &#183; [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md) &#183; [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) &#183; [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) &#183; [tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md) &#183; [tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md)|
|<a name='virtual\_machine'></a>virtual machine|[grammar::me::cpu](tcllib/files/modules/grammar\_me/me\_cpu\.md) &#183; [grammar::me::cpu::core](tcllib/files/modules/grammar\_me/me\_cpucore\.md) &#183; [grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md) &#183; [grammar::me::tcl](tcllib/files/modules/grammar\_me/me\_tcl\.md) &#183; [grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) &#183; [grammar::me\_vm](tcllib/files/modules/grammar\_me/me\_vm\.md) &#183; [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) &#183; [pt::param](tcllib/files/modules/pt/pt\_param\.md)|
|<a name='visa'></a>VISA|[valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md)|
|<a name='vwait'></a>vwait|[coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) &#183; [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md) &#183; [smtpd](tcllib/files/modules/smtpd/smtpd\.md)|


#### <a name='cW'></a>Keywords: W

|||
|---|---|
|<a name='wais'></a>wais|[uri](tcllib/files/modules/uri/uri\.md)|
|<a name='widget'></a>widget|[snit](tcllib/files/modules/snit/snit\.md) &#183; [snitfaq](tcllib/files/modules/snit/snitfaq\.md)|
|<a name='widget\_adaptors'></a>widget adaptors|[snit](tcllib/files/modules/snit/snit\.md) &#183; [snitfaq](tcllib/files/modules/snit/snitfaq\.md)|
|<a name='wiki'></a>wiki|[doctools::idx](tcllib/files/modules/doctools/docidx\.md) &#183; [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) &#183; [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) &#183; [doctools::idx::export::wiki](tcllib/files/modules/doctools2idx/idx\_export\_wiki\.md) &#183; [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) &#183; [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) &#183; [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) &#183; [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md)|
|<a name='word'></a>word|[doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md) &#183; [wip](tcllib/files/modules/wip/wip\.md)|
|<a name='www'></a>WWW|[httpd](tcllib/files/modules/httpd/httpd\.md)|
|<a name='www'></a>www|[uri](tcllib/files/modules/uri/uri\.md)|


#### <a name='cX'></a>Keywords: X

|||
|---|---|
|<a name='x\_208'></a>x\.208|[asn](tcllib/files/modules/asn/asn\.md)|
|<a name='x\_209'></a>x\.209|[asn](tcllib/files/modules/asn/asn\.md)|
|<a name='x\_500'></a>x\.500|[ldap](tcllib/files/modules/ldap/ldap\.md)|
|<a name='xgoogletoken'></a>XGoogleToken|[SASL::XGoogleToken](tcllib/files/modules/sasl/gtoken\.md)|
|<a name='xml'></a>xml|[xsxp](tcllib/files/modules/amazon\-s3/xsxp\.md)|
|<a name='xor'></a>xor|[tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md)|
|<a name='xpath'></a>XPath|[treeql](tcllib/files/modules/treeql/treeql\.md)|
|<a name='xslt'></a>XSLT|[treeql](tcllib/files/modules/treeql/treeql\.md)|


#### <a name='cY'></a>Keywords: Y

|||
|---|---|
|<a name='yaml'></a>yaml|[huddle](tcllib/files/modules/yaml/huddle\.md) &#183; [yaml](tcllib/files/modules/yaml/yaml\.md)|
|<a name='ydecode'></a>ydecode|[yencode](tcllib/files/modules/base64/yencode\.md)|
|<a name='yenc'></a>yEnc|[yencode](tcllib/files/modules/base64/yencode\.md)|
|<a name='yencode'></a>yencode|[yencode](tcllib/files/modules/base64/yencode\.md)|


#### <a name='cZ'></a>Keywords: Z

|||
|---|---|
|<a name='zero'></a>zero|[tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md) &#183; [tcl::chan::zero](tcllib/files/modules/virtchannel\_base/tcllib\_zero\.md)|
|<a name='zip'></a>zip|[zipfile::decode](tcllib/files/modules/zip/decode\.md) &#183; [zipfile::encode](tcllib/files/modules/zip/encode\.md) &#183; [zipfile::mkzip](tcllib/files/modules/zip/mkzip\.md)|
|<a name='zlib'></a>zlib|[tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md)|
|<a name='zoom'></a>zoom|[map::slippy](tcllib/files/modules/map/map\_slippy\.md) &#183; [map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md) &#183; [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md)|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/apps/dtplite.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408

[//000000001]: # (dtplite \- Documentation toolbox)
[//000000002]: # (Generated from file 'dtplite\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004\-2013 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (dtplite\(n\) 1\.0\.5 tcllib "Documentation toolbox")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

dtplite \- Lightweight DocTools Markup Processor

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [USE CASES](#subsection1)

      - [COMMAND LINE](#subsection2)

      - [OPTIONS](#subsection3)

      - [FORMATS](#subsection4)

      - [DIRECTORY STRUCTURES](#subsection5)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__dtplite__ __\-o__ *output* ?options? *format* *inputfile*](#1)  
[__dtplite__ __validate__ *inputfile*](#2)  
[__dtplite__ __\-o__ *output* ?options? *format* *inputdirectory*](#3)  
[__dtplite__ __\-merge__ __\-o__ *output* ?options? *format* *inputdirectory*](#4)  

# <a name='description'></a>DESCRIPTION

The application described by this document, __dtplite__, is the successor to
the extremely simple __[mpexpand](\.\./modules/doctools/mpexpand\.md)__\.
Influenced in its functionality by the __dtp__ doctools processor it is much
more powerful than __[mpexpand](\.\./modules/doctools/mpexpand\.md)__, yet
still as easy to use; definitely easier than __dtp__ with its myriad of
subcommands and options\.

__dtplite__ is based upon the package
__[doctools](\.\./modules/doctools/doctools\.md)__, like the other two
processors\.

## <a name='subsection1'></a>USE CASES

__dtplite__ was written with the following three use cases in mind\.

  1. Validation of a single document, i\.e\. checking that it was written in valid
     doctools format\. This mode can also be used to get a preliminary version of
     the formatted output for a single document, for display in a browser,
     nroff, etc\., allowing proofreading of the formatting\.

  1. Generation of the formatted documentation for a single package, i\.e\. all
     the manpages, plus a table of contents and an index of keywords\.

  1. An extension of the previous mode of operation, a method for the easy
     generation of one documentation tree for several packages, and especially
     of a unified table of contents and keyword index\.

Beyond the above we also want to make use of the customization features provided
by the HTML formatter\. It is not the only format the application should be able
to generate, but we anticipiate it to be the most commonly used, and it is one
of the few which do provide customization hooks\.

We allow the caller to specify a header string, footer string, a stylesheet, and
data for a bar of navigation links at the top of the generated document\. While
all can be set as long as the formatting engine provides an appropriate engine
parameter \(See section [OPTIONS](#subsection3)\) the last two have internal
processing which make them specific to HTML\.

## <a name='subsection2'></a>COMMAND LINE

  - <a name='1'></a>__dtplite__ __\-o__ *output* ?options? *format* *inputfile*

    This is the form for use case \[1\]\. The *options* will be explained later,
    in section [OPTIONS](#subsection3)\.

      * path *output* \(in\)

        This argument specifies where to write the generated document\. It can be
        the path to a file or directory, or __\-__\. The last value causes the
        application to write the generated documented to __stdout__\.

        If the *output* does not exist then \[file dirname $output\] has to
        exist and must be a writable directory\. The generated document will be
        written to a file in that directory, and the name of that file will be
        derived from the *inputfile*, the *format*, and the value given to
        option __\-ext__ \(if present\)\.

      * \(path&#124;handle\) *format* \(in\)

        This argument specifies the formatting engine to use when processing the
        input, and thus the format of the generated document\. See section
        [FORMATS](#subsection4) for the possibilities recognized by the
        application\.

      * path *inputfile* \(in\)

        This argument specifies the path to the file to process\. It has to
        exist, must be readable, and written in
        *[doctools](\.\./\.\./\.\./index\.md\#doctools)* format\.

  - <a name='2'></a>__dtplite__ __validate__ *inputfile*

    This is a simpler form for use case \[1\]\. The "validate" format generates no
    output at all, only syntax checks are performed\. As such the specification
    of an output file or other options is not necessary and left out\.

  - <a name='3'></a>__dtplite__ __\-o__ *output* ?options? *format* *inputdirectory*

    This is the form for use case \[2\]\. It differs from the form for use case \[1\]
    by having the input documents specified through a directory instead of a
    file\. The other arguments are identical, except for *output*, which now
    has to be the path to an existing and writable directory\.

    The input documents are all files in *inputdirectory* or any of its
    subdirectories which were recognized by __fileutil::fileType__ as
    containing text in *[doctools](\.\./\.\./\.\./index\.md\#doctools)* format\.

  - <a name='4'></a>__dtplite__ __\-merge__ __\-o__ *output* ?options? *format* *inputdirectory*

    This is the form for use case \[3\]\. The only difference to the form for use
    case \[2\] is the additional option __\-merge__\.

    Each such call will merge the generated documents coming from processing the
    input documents under *inputdirectory* or any of its subdirectories to the
    files under *output*\. In this manner it is possible to incrementally build
    the unified documentation for any number of packages\. Note that it is
    necessary to run through all the packages twice to get fully correct
    cross\-references \(for formats supporting them\)\.

## <a name='subsection3'></a>OPTIONS

This section describes all the options available to the user of the application,
with the exception of the options __\-o__ and __\-merge__\. These two were
described already, in section [COMMAND LINE](#subsection2)\.

  - __\-exclude__ string

    This option specifies an exclude \(glob\) pattern\. Any files identified as
    manpages to process which match the exclude pattern are ignored\. The option
    can be provided multiple times, each usage adding an additional pattern to
    the list of exclusions\.

  - __\-ext__ string

    If the name of an output file has to be derived from the name of an input
    file it will use the name of the *format* as the extension by default\.
    This option here will override this however, forcing it to use *string* as
    the file extension\. This option is ignored if the name of the output file is
    fully specified through option __\-o__\.

    When used multiple times only the last definition is relevant\.

  - __\-header__ file

    This option can be used if and only if the selected *format* provides an
    engine parameter named "header"\. It takes the contents of the specified file
    and assign them to that parameter, for whatever use by the engine\. The HTML
    engine will insert the text just after the tag __<body>__\. If navigation
    buttons are present \(see option __\-nav__ below\), then the HTML generated
    for them is appended to the header data originating here before the final
    assignment to the parameter\.

    When used multiple times only the last definition is relevant\.

  - __\-footer__ file

    Like __\-header__, except that: Any navigation buttons are ignored, the
    corresponding required engine parameter is named "footer", and the data is
    inserted just before the tag __</body>__\.

    When used multiple times only the last definition is relevant\.

  - __\-style__ file

    This option can be used if and only if the selected *format* provides an
    engine parameter named "meta"\. When specified it will generate a piece of
    HTML code declaring the *file* as the stylesheet for the generated
    document and assign that to the parameter\. The HTML engine will insert this
    inot the document, just after the tag __<head>__\.

    When processing an input directory the stylesheet file is copied into the
    output directory and the generated HTML will refer to the copy, to make the
    result more self\-contained\. When processing an input file we have no
    location to copy the stylesheet to and so just reference it as specified\.

    When used multiple times only the last definition is relevant\.

  - __\-toc__ path

    This option specifies a doctoc file to use for the table of contents instead
    of generating our own\.

    When used multiple times only the last definition is relevant\.

  - __\-pre\+toc__ label path&#124;text

  - __\-post\+toc__ label path&#124;text

    This option specifies additional doctoc files \(or texts\) to use in the
    navigation bar\.

    Positioning and handling of multiple uses is like for options
    __\-prenav__ and __\-postnav__, see below\.

  - __\-nav__ label url

  - __\-prenav__ label url

    Use this option to specify a navigation button with *label* to display and
    the *url* to link to\. This option can be used if and only if the selected
    *format* provides an engine parameter named "header"\. The HTML generated
    for this is appended to whatever data we got from option __\-header__
    before it is inserted into the generated documents\.

    When used multiple times all definitions are collected and a navigation bar
    is created, with the first definition shown at the left edge and the last
    definition to the right\.

    The url can be relative\. In that case it is assumed to be relative to the
    main files \(TOC and Keyword index\), and will be transformed for all others
    to still link properly\.

  - __\-postnav__ label url

    Use this option to specify a navigation button with *label* to display and
    the *url* to link to\. This option can be used if and only if the selected
    *format* provides an engine parameter named "header"\. The HTML generated
    for this is appended to whatever data we got from option __\-header__
    before it is inserted into the generated documents\.

    When used multiple times all definitions are collected and a navigation bar
    is created, with the last definition shown at the right edge and the first
    definition to the left\.

    The url can be relative\. In that case it is assumed to be relative to the
    main files \(TOC and Keyword index\), and will be transformed for all others
    to still link properly\.

## <a name='subsection4'></a>FORMATS

At first the *format* argument will be treated as a path to a tcl file
containing the code for the requested formatting engine\. The argument will be
treated as the name of one of the predefined formats listed below if and only if
the path does not exist\.

*Note a limitation*: If treating the format as path to the tcl script
implementing the engine was sucessful, then this script has to implement not
only the engine API for doctools, i\.e\. *doctools\_api*, but for *doctoc\_api*
and *docidx\_api* as well\. Otherwise the generation of a table of contents and
of a keyword index will fail\.

List of predefined formats, i\.e\. as provided by the package
__[doctools](\.\./modules/doctools/doctools\.md)__:

  - __nroff__

    The processor generates \*roff output, the standard format for unix manpages\.

  - __html__

    The processor generates HTML output, for usage in and display by web
    browsers\. This engine is currently the only one providing the various engine
    parameters required for the additional customaization of the output\.

  - __tmml__

    The processor generates TMML output, the Tcl Manpage Markup Language, a
    derivative of XML\.

  - __latex__

    The processor generates LaTeX output\.

  - __wiki__

    The processor generates Wiki markup as understood by __wikit__\.

  - __list__

    The processor extracts the information provided by __manpage\_begin__\.
    This format is used internally to extract the meta data from which both
    table of contents and keyword index are derived from\.

  - __null__

    The processor does not generate any output\. This is equivalent to
    __validate__\.

## <a name='subsection5'></a>DIRECTORY STRUCTURES

In this section we describe the directory structures generated by the
application under *output* when processing all documents in an
*inputdirectory*\. In other words, this is only relevant to the use cases \[2\]
and \[3\]\.

  - \[2\]

    The following directory structure is created when processing a single set of
    input documents\. The file extension used is for output in HTML, but that is
    not relevant to the structure and was just used to have proper file names\.

        output/
            toc.html
            index.html
            files/
                path/to/FOO.html

    The last line in the example shows the document generated for a file FOO
    located at

        inputdirectory/path/to/FOO

  - \[3\]

    When merging many packages into a unified set of documents the generated
    directory structure is a bit deeper:

        output
            .toc
            .idx
            .tocdoc
            .idxdoc
            .xrf
            toc.html
            index.html
            FOO1/
                ...
            FOO2/
                toc.html
                files/
                    path/to/BAR.html

    Each of the directories FOO1, \.\.\. contains the documents generated for the
    package FOO1, \.\.\. and follows the structure shown for use case \[2\]\. The only
    exception is that there is no per\-package index\.

    The files "\.toc", "\.idx", and "\.xrf" contain the internal status of the
    whole output and will be read and updated by the next invokation\. Their
    contents will not be documented\. Remove these files when all packages wanted
    for the output have been processed, i\.e\. when the output is complete\.

    The files "\.tocdoc", and "\.idxdoc", are intermediate files in doctoc and
    docidx markup, respectively, containing the main table of contents and
    keyword index for the set of documents before their conversion to the chosen
    output format\. They are left in place, i\.e\. not deleted, to serve as
    demonstrations of doctoc and docidx markup\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx introduction](\.\./modules/doctools/docidx\_intro\.md), [doctoc
introduction](\.\./modules/doctools/doctoc\_intro\.md), [doctools
introduction](\.\./modules/doctools/doctools\_intro\.md)

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./index\.md\#html), [TMML](\.\./\.\./\.\./index\.md\#tmml),
[conversion](\.\./\.\./\.\./index\.md\#conversion),
[docidx](\.\./\.\./\.\./index\.md\#docidx), [doctoc](\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./index\.md\#doctools),
[manpage](\.\./\.\./\.\./index\.md\#manpage),
[markup](\.\./\.\./\.\./index\.md\#markup), [nroff](\.\./\.\./\.\./index\.md\#nroff)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004\-2013 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/apps/nns.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169

[//000000001]: # (nns \- Name service facility)
[//000000002]: # (Generated from file 'nns\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (nns\(n\) 1\.1 tcllib "Name service facility")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

nns \- Name service facility, Commandline Client Application

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [USE CASES](#subsection1)

      - [COMMAND LINE](#subsection2)

      - [OPTIONS](#subsection3)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__nns__ __bind__ ?__\-host__ *host*? ?__\-port__ *port*? *name* *data*](#1)  
[__nns__ __search__ ?__\-host__ *host*? ?__\-port__ *port*? ?__\-continuous__? ?*pattern*?](#2)  
[__nns__ __ident__ ?__\-host__ *host*? ?__\-port__ *port*?](#3)  
[__nns__ __who__](#4)  

# <a name='description'></a>DESCRIPTION

Please read *[Name service facility,
introduction](\.\./modules/nns/nns\_intro\.md)* first\.

The application described by this document, __nns__, is a simple command
line client for the nano name service facility provided by the Tcllib packages
__[nameserv](\.\./modules/nns/nns\_client\.md)__, and
__[nameserv::server](\.\./modules/nns/nns\_server\.md)__\. Beyond that the
application's sources also serve as an example of how to use the client package
__[nameserv](\.\./modules/nns/nns\_client\.md)__\. All abilities of a client
are covered, from configuration to registration of names to searching\.

This name service facility has nothing to do with the Internet's *Domain Name
System*, otherwise known as *[DNS](\.\./\.\./\.\./index\.md\#dns)*\. If the reader
is looking for a package dealing with that please see either of the packages
__[dns](\.\./modules/dns/tcllib\_dns\.md)__ and __resolv__, both found
in Tcllib too\.

## <a name='subsection1'></a>USE CASES

__nns__ was written with the following two main use cases in mind\.

  1. Registration of a name/data pair in the name service\.

  1. Searching the name service for entries matching a glob pattern\.

Beyond the above we also want to be able to identify the client, and get
information about the name service\.

## <a name='subsection2'></a>COMMAND LINE

  - <a name='1'></a>__nns__ __bind__ ?__\-host__ *host*? ?__\-port__ *port*? *name* *data*

    This form registers the *name*/*data* pair in the specified name
    service\. In this form the command will *not* exit to keep the registration
    alive\. The user has to kill it explicitly, either by sending a signal, or
    through the job\-control facilities of the shell in use\. It will especially
    survive the loss of the connection to the name service and reestablish the
    *name*/*data* pair when the connection is restored\.

    The options to specify the name service will be explained later, in section
    [OPTIONS](#subsection3)\.

  - <a name='2'></a>__nns__ __search__ ?__\-host__ *host*? ?__\-port__ *port*? ?__\-continuous__? ?*pattern*?

    This form searches the specified name service for entries matching the
    glob\-*pattern* and prints them to stdout, with each entry on its own line\.
    If no pattern is specified it defaults to __\*__, matching everything\.

    The options to specify the name service will be explained later, in section
    [OPTIONS](#subsection3)\.

    If the option __\-continuous__ is specified the client will not exit
    after performing the search, but start to continuously monitor the service
    for changes to the set of matching entries, appropriately updating the
    display as changes arrive\. In that form it will especially also survive the
    loss of the connection to the name service and reestablish the search when
    the connection is restored\.

  - <a name='3'></a>__nns__ __ident__ ?__\-host__ *host*? ?__\-port__ *port*?

    This form asks the specified name service for the version and features of
    the name service protocol it supports and prints the results to stdout\.

    The options to specify the name service will be explained later, in section
    [OPTIONS](#subsection3)\.

  - <a name='4'></a>__nns__ __who__

    This form prints name, version, and protocol version of the application to
    stdout\.

## <a name='subsection3'></a>OPTIONS

This section describes all the options available to the user of the application

  - __\-host__ name&#124;ipaddress

    If this option is not specified it defaults to __localhost__\. It
    specifies the name or ip\-address of the host the name service to talk to is
    running on\.

  - __\-port__ number

    If this option is not specified it defaults to __38573__\. It specifies
    the TCP port the name service to talk to is listening on for requests\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nameserv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[nameserv\(n\)](\.\./modules/nns/nns\_client\.md),
[nameserv::common\(n\)](\.\./modules/nns/nns\_common\.md)

# <a name='keywords'></a>KEYWORDS

[application](\.\./\.\./\.\./index\.md\#application),
[client](\.\./\.\./\.\./index\.md\#client), [name
service](\.\./\.\./\.\./index\.md\#name\_service)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































Deleted embedded/md/tcllib/files/apps/nnsd.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

[//000000001]: # (nnsd \- Name service facility)
[//000000002]: # (Generated from file 'nnsd\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (nnsd\(n\) 1\.0\.1 tcllib "Name service facility")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

nnsd \- Name service facility, Commandline Server Application

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [USE CASES](#subsection1)

      - [COMMAND LINE](#subsection2)

      - [OPTIONS](#subsection3)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__nnsd__ ?__\-localonly__ *flag*? ?__\-port__ *port*?](#1)  

# <a name='description'></a>DESCRIPTION

Please read *[Name service facility,
introduction](\.\./modules/nns/nns\_intro\.md)* first\.

The application described by this document, __[nns](nns\.md)__, is a
simple command line server for the nano name service facility provided by the
Tcllib packages __[nameserv](\.\./modules/nns/nns\_client\.md)__, and
__[nameserv::server](\.\./modules/nns/nns\_server\.md)__\. Beyond that the
application's sources also serve as an example of how to use the server package
__[nameserv::server](\.\./modules/nns/nns\_server\.md)__\.

This name service facility has nothing to do with the Internet's *Domain Name
System*, otherwise known as *[DNS](\.\./\.\./\.\./index\.md\#dns)*\. If the reader
is looking for a package dealing with that please see either of the packages
__[dns](\.\./modules/dns/tcllib\_dns\.md)__ and __resolv__, both found
in Tcllib too\.

## <a name='subsection1'></a>USE CASES

__nnsd__ was written with the following main use case in mind\.

  1. Run a nano name service on some host\.

## <a name='subsection2'></a>COMMAND LINE

  - <a name='1'></a>__nnsd__ ?__\-localonly__ *flag*? ?__\-port__ *port*?

    The command configures a server per the specified options and starts it\. The
    command will not exit on its own, as it keeps the name service database
    wholly in memory\. The user has to kill it explicitly, either by sending a a
    signal, or through the job\-control facilities of the shell in use\.

    The options to configure the name service are explained in section
    [OPTIONS](#subsection3)\.

## <a name='subsection3'></a>OPTIONS

This section describes all the options available to the user of the application

  - __\-localonly__ bool

    If this option is not specified it defaults to __true__, i\.e\. acceptance
    of only local connections\. The server will accept remote connections, i\.e\.
    connections from other hosts, if and only if this option is configured to
    __false__\.

  - __\-port__ number

    If this option is not specified it defaults to __38573__\. It specifies
    the TCP port the server has to listen on for requests\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nameserv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[nameserv::common\(n\)](\.\./modules/nns/nns\_common\.md),
[nameserv::server\(n\)](\.\./modules/nns/nns\_server\.md)

# <a name='keywords'></a>KEYWORDS

[application](\.\./\.\./\.\./index\.md\#application), [name
service](\.\./\.\./\.\./index\.md\#name\_service),
[server](\.\./\.\./\.\./index\.md\#server)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































Deleted embedded/md/tcllib/files/apps/nnslog.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134

[//000000001]: # (nnslog \- Name service facility)
[//000000002]: # (Generated from file 'nnslog\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (nnslog\(n\) 1\.0 tcllib "Name service facility")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

nnslog \- Name service facility, Commandline Logging Client Application

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [USE CASES](#subsection1)

      - [COMMAND LINE](#subsection2)

      - [OPTIONS](#subsection3)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__nnslog__ ?__\-host__ *host*? ?__\-port__ *port*?](#1)  

# <a name='description'></a>DESCRIPTION

Please read *[Name service facility,
introduction](\.\./modules/nns/nns\_intro\.md)* first\.

The application described by this document, __nnslog__, is a simple command
line client for the nano name service facility provided by the Tcllib packages
__[nameserv](\.\./modules/nns/nns\_client\.md)__, and
__[nameserv::server](\.\./modules/nns/nns\_server\.md)__\.

It essentially implements "__[nns](nns\.md)__ search \-continuous \*", but
uses a different output formatting\. Instead of continuously showing the current
contents of the server in the terminal it simply logs all received add/remove
events to __stdout__\.

This name service facility has nothing to do with the Internet's *Domain Name
System*, otherwise known as *[DNS](\.\./\.\./\.\./index\.md\#dns)*\. If the reader
is looking for a package dealing with that please see either of the packages
__[dns](\.\./modules/dns/tcllib\_dns\.md)__ and __resolv__, both found
in Tcllib too\.

## <a name='subsection1'></a>USE CASES

__nnslog__ was written with the following main use case in mind\.

  1. Monitoring the name service for all changes and logging them in a text
     terminal\.

## <a name='subsection2'></a>COMMAND LINE

  - <a name='1'></a>__nnslog__ ?__\-host__ *host*? ?__\-port__ *port*?

    The command connects to the specified name service, sets up a search for all
    changes and then prints all received events to stdout, with each events on
    its own line\. The command will not exit until it is explicitly terminated by
    the user\. It will especially survive the loss of the connection to the name
    service and reestablish the search and log when the connection is restored\.

    The options to specify the name service will be explained later, in section
    [OPTIONS](#subsection3)\.

## <a name='subsection3'></a>OPTIONS

This section describes all the options available to the user of the application

  - __\-host__ name&#124;ipaddress

    If this option is not specified it defaults to __localhost__\. It
    specifies the name or ip\-address of the host the name service to talk to is
    running on\.

  - __\-port__ number

    If this option is not specified it defaults to __38573__\. It specifies
    the TCP port the name service to talk to is listening on for requests\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nameserv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[nameserv\(n\)](\.\./modules/nns/nns\_client\.md),
[nameserv::common\(n\)](\.\./modules/nns/nns\_common\.md)

# <a name='keywords'></a>KEYWORDS

[application](\.\./\.\./\.\./index\.md\#application),
[client](\.\./\.\./\.\./index\.md\#client), [name
service](\.\./\.\./\.\./index\.md\#name\_service)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































Deleted embedded/md/tcllib/files/apps/page.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474

[//000000001]: # (page \- Development Tools)
[//000000002]: # (Generated from file 'page\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (page\(n\) 1\.0 tcllib "Development Tools")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

page \- Parser Generator

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [COMMAND LINE](#subsection1)

      - [OPERATION](#subsection2)

      - [OPTIONS](#subsection3)

      - [PLUGINS](#subsection4)

      - [PLUGIN LOCATIONS](#subsection5)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__page__ ?*options*\.\.\.? ?*input* ?*output*??](#1)  

# <a name='description'></a>DESCRIPTION

The application described by this document, __page__, is actually not just a
parser generator, as the name implies, but a generic tool for the execution of
arbitrary transformations on texts\.

Its genericity comes through the use of *plugins* for reading, transforming,
and writing data, and the predefined set of plugins provided by Tcllib is for
the generation of memoizing recursive descent parsers \(aka *packrat parsers*\)
from grammar specifications \(*Parsing Expression Grammars*\)\.

__page__ is written on top of the package __page::pluginmgr__, wrapping
its functionality into a command line based application\. All the other
__page::\*__ packages are plugin and/or supporting packages for the
generation of parsers\. The parsers themselves are based on the packages
__[grammar::peg](\.\./modules/grammar\_peg/peg\.md)__,
__[grammar::peg::interp](\.\./modules/grammar\_peg/peg\_interp\.md)__, and
__grammar::mengine__\.

## <a name='subsection1'></a>COMMAND LINE

  - <a name='1'></a>__page__ ?*options*\.\.\.? ?*input* ?*output*??

    This is general form for calling __page__\. The application will read the
    contents of the file *input*, process them under the control of the
    specified *options*, and then write the result to the file *output*\.

    If *input* is the string __\-__ the data to process will be read from
    __stdin__ instead of a file\. Analogously the result will be written to
    __stdout__ instead of a file if *output* is the string __\-__\. A
    missing output or input specification causes the application to assume
    __\-__\.

    The detailed specifications of the recognized *options* are provided in
    section [OPTIONS](#subsection3)\.

      * path *input* \(in\)

        This argument specifies the path to the file to be processed by the
        application, or __\-__\. The last value causes the application to read
        the text from __stdin__\. Otherwise it has to exist, and be readable\.
        If the argument is missing __\-__ is assumed\.

      * path *output* \(in\)

        This argument specifies where to write the generated text\. It can be the
        path to a file, or __\-__\. The last value causes the application to
        write the generated documented to __stdout__\.

        If the file *output* does not exist then \[file dirname $output\] has to
        exist and must be a writable directory, as the application will create
        the fileto write to\.

        If the argument is missing __\-__ is assumed\.

## <a name='subsection2'></a>OPERATION

\.\.\. reading \.\.\. transforming \.\.\. writing \- plugins \- pipeline \.\.\.

## <a name='subsection3'></a>OPTIONS

This section describes all the options available to the user of the application\.
Options are always processed in order\. I\.e\. of both __\-\-help__ and
__\-\-version__ are specified the option encountered first has precedence\.

Unknown options specified before any of the options __\-rd__, __\-wr__, or
__\-tr__ will cause processing to abort with an error\. Unknown options coming
in between these options, or after the last of them are assumed to always take a
single argument and are associated with the last plugin option coming before
them\. They will be checked after all the relevant plugins, and thus the options
they understand, are known\. I\.e\. such unknown options cause error if and only if
the plugin option they are associated with does not understand them, and was not
superceded by a plugin option coming after\.

Default options are used if and only if the command line did not contain any
options at all\. They will set the application up as a PEG\-based parser
generator\. The exact list of options is

    -c peg

And now the recognized options and their arguments, if they have any:

  - __\-\-help__

  - __\-h__

  - __\-?__

    When one of these options is found on the command line all arguments coming
    before or after are ignored\. The application will print a short description
    of the recognized options and exit\.

  - __\-\-version__

  - __\-V__

    When one of these options is found on the command line all arguments coming
    before or after are ignored\. The application will print its own revision and
    exit\.

  - __\-P__

    This option signals the application to activate visual feedback while
    reading the input\.

  - __\-T__

    This option signals the application to collect statistics while reading the
    input and to print them after reading has completed, before processing
    started\.

  - __\-D__

    This option signals the application to activate logging in the Safe base,
    for the debugging of problems with plugins\.

  - __\-r__ parser

  - __\-rd__ parser

  - __\-\-reader__ parser

    These options specify the plugin the application has to use for reading the
    *input*\. If the options are used multiple times the last one will be used\.

  - __\-w__ generator

  - __\-wr__ generator

  - __\-\-writer__ generator

    These options specify the plugin the application has to use for generating
    and writing the final *output*\. If the options are used multiple times the
    last one will be used\.

  - __\-t__ process

  - __\-tr__ process

  - __\-\-transform__ process

    These options specify a plugin to run on the input\. In contrast to readers
    and writers each use will *not* supersede previous uses, but add each
    chosen plugin to a list of transformations, either at the front, or the end,
    per the last seen use of either option __\-p__ or __\-a__\. The initial
    default is to append the new transformations\.

  - __\-a__

  - __\-\-append__

    These options signal the application that all following transformations
    should be added at the end of the list of transformations\.

  - __\-p__

  - __\-\-prepend__

    These options signal the application that all following transformations
    should be added at the beginning of the list of transformations\.

  - __\-\-reset__

    This option signals the application to clear the list of transformations\.
    This is necessary to wipe out the default transformations used\.

  - __\-c__ file

  - __\-\-configuration__ file

    This option causes the application to load a configuration file and/or
    plugin\. This is a plugin which in essence provides a pre\-defined set of
    commandline options\. They are processed exactly as if they have been
    specified in place of the option and its arguments\. This means that unknown
    options found at the beginning of the configuration file are associated with
    the last plugin, even if that plugin was specified before the configuration
    file itself\. Conversely, unknown options coming after the configuration file
    can be associated with a plugin specified in the file\.

    If the argument is a file which cannot be loaded as a plugin the application
    will assume that its contents are a list of options and their arguments,
    separated by space, tabs, and newlines\. Options and argumentes containing
    spaces can be quoted via double\-quotes \("\) and quotes \('\)\. The quote
    character can be specified within in a quoted string by doubling it\.
    Newlines in a quoted string are accepted as is\.

## <a name='subsection4'></a>PLUGINS

__page__ makes use of four different types of plugins, namely: readers,
writers, transformations, and configurations\. Here we provide only a basic
introduction on how to use them from __page__\. The exact APIs provided to
and expected from the plugins can be found in the documentation for
__page::pluginmgr__, for those who wish to write their own plugins\.

Plugins are specified as arguments to the options __\-r__, __\-w__,
__\-t__, __\-c__, and their equivalent longer forms\. See the section
[OPTIONS](#subsection3) for reference\.

Each such argument will be first treated as the name of a file and this file is
loaded as the plugin\. If however there is no file with that name, then it will
be translated into the name of a package, and this package is then loaded\. For
each type of plugins the package management searches not only the regular paths,
but a set application\- and type\-specific paths as well\. Please see the section
[PLUGIN LOCATIONS](#subsection5) for a listing of all paths and their
sources\.

  - __\-c__ *name*

    Configurations\. The name of the package for the plugin *name* is
    "page::config::*name*"\.

    We have one predefined plugin:

      * *peg*

        It sets the application up as a parser generator accepting parsing
        expression grammars and writing a packrat parser in Tcl\. The actual
        arguments it specifies are:

    --reset
    --append
    --reader    peg
    --transform reach
    --transform use
    --writer    me

  - __\-r__ *name*

    Readers\. The name of the package for the plugin *name* is
    "page::reader::*name*"\.

    We have five predefined plugins:

      * *peg*

        Interprets the input as a parsing expression grammar
        \(*[PEG](\.\./\.\./\.\./index\.md\#peg)*\) and generates a tree
        representation for it\. Both the syntax of PEGs and the structure of the
        tree representation are explained in their own manpages\.

      * *hb*

        Interprets the input as Tcl code as generated by the writer plugin
        *hb* and generates its tree representation\.

      * *ser*

        Interprets the input as the serialization of a PEG, as generated by the
        writer plugin *ser*, using the package
        __[grammar::peg](\.\./modules/grammar\_peg/peg\.md)__\.

      * *lemon*

        Interprets the input as a grammar specification as understood by Richard
        Hipp's *[LEMON](\.\./\.\./\.\./index\.md\#lemon)* parser generator and
        generates a tree representation for it\. Both the input syntax and the
        structure of the tree representation are explained in their own
        manpages\.

      * *treeser*

        Interprets the input as the serialization of a
        __[struct::tree](\.\./modules/struct/struct\_tree\.md)__\. It is
        validated as such, but nothing else\. It is *not* assumed to be the
        tree representation of a grammar\.

  - __\-w__ *name*

    Writers\. The name of the package for the plugin *name* is
    "page::writer::*name*"\.

    We have eight predefined plugins:

      * *identity*

        Simply writes the incoming data as it is, without making any changes\.
        This is good for inspecting the raw result of a reader or
        transformation\.

      * *null*

        Generates nothing, and ignores the incoming data structure\.

      * *tree*

        Assumes that the incoming data structure is a
        __[struct::tree](\.\./modules/struct/struct\_tree\.md)__ and
        generates an indented textual representation of all nodes, their
        parental relationships, and their attribute information\.

      * *peg*

        Assumes that the incoming data structure is a tree representation of a
        *[PEG](\.\./\.\./\.\./index\.md\#peg)* or other other grammar and writes
        it out as a PEG\. The result is nicely formatted and partially simplified
        \(strings as sequences of characters\)\. A pretty printer in essence, but
        can also be used to obtain a canonical representation of the input
        grammar\.

      * *tpc*

        Assumes that the incoming data structure is a tree representation of a
        *[PEG](\.\./\.\./\.\./index\.md\#peg)* or other other grammar and writes
        out Tcl code defining a package which defines a
        __[grammar::peg](\.\./modules/grammar\_peg/peg\.md)__ object
        containing the grammar when it is loaded into an interpreter\.

      * *hb*

        This is like the writer plugin *tpc*, but it writes only the
        statements which define stat expression and grammar rules\. The code
        making the result a package is left out\.

      * *ser*

        Assumes that the incoming data structure is a tree representation of a
        *[PEG](\.\./\.\./\.\./index\.md\#peg)* or other other grammar, transforms
        it internally into a
        __[grammar::peg](\.\./modules/grammar\_peg/peg\.md)__ object and
        writes out its serialization\.

      * *me*

        Assumes that the incoming data structure is a tree representation of a
        *[PEG](\.\./\.\./\.\./index\.md\#peg)* or other other grammar and writes
        out Tcl code defining a package which implements a memoizing recursive
        descent parser based on the match engine \(ME\) provided by the package
        __grammar::mengine__\.

  - __\-t__ *name*

    Transformers\. The name of the package for the plugin *name* is
    "page::transform::*name*"\.

    We have two predefined plugins:

      * *reach*

        Assumes that the incoming data structure is a tree representation of a
        *[PEG](\.\./\.\./\.\./index\.md\#peg)* or other other grammar\. It
        determines which nonterminal symbols and rules are reachable from
        start\-symbol/expression\. All nonterminal symbols which were not reached
        are removed\.

      * *use*

        Assumes that the incoming data structure is a tree representation of a
        *[PEG](\.\./\.\./\.\./index\.md\#peg)* or other other grammar\. It
        determines which nonterminal symbols and rules are able to generate a
        *finite* sequences of terminal symbols \(in the sense for a Context
        Free Grammar\)\. All nonterminal symbols which were not deemed useful in
        this sense are removed\.

## <a name='subsection5'></a>PLUGIN LOCATIONS

The application\-specific paths searched by __page__ either are, or come
from:

  1. The directory "~/\.page/plugin"

  1. The environment variable *PAGE\_PLUGINS*

  1. The registry entry *HKEY\_LOCAL\_MACHINE\\SOFTWARE\\PAGE\\PLUGINS*

  1. The registry entry *HKEY\_CURRENT\_USER\\SOFTWARE\\PAGE\\PLUGINS*

The type\-specific paths searched by __page__ either are, or come from:

  1. The directory "~/\.page/plugin/<TYPE>"

  1. The environment variable *PAGE\_<TYPE>\_PLUGINS*

  1. The registry entry *HKEY\_LOCAL\_MACHINE\\SOFTWARE\\PAGE\\<TYPE>\\PLUGINS*

  1. The registry entry *HKEY\_CURRENT\_USER\\SOFTWARE\\PAGE\\<TYPE>\\PLUGINS*

Where the placeholder *<TYPE>* is always one of the values below, properly
capitalized\.

  1. reader

  1. writer

  1. transform

  1. config

The registry entries are specific to the Windows\(tm\) platform, all other
platforms will ignore them\.

The contents of both environment variables and registry entries are interpreted
as a list of paths, with the elements separated by either colon \(Unix\), or
semicolon \(Windows\)\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *page* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

page::pluginmgr

# <a name='keywords'></a>KEYWORDS

[parser generator](\.\./\.\./\.\./index\.md\#parser\_generator), [text
processing](\.\./\.\./\.\./index\.md\#text\_processing)

# <a name='category'></a>CATEGORY

Page Parser Generator

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/apps/pt.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799

[//000000001]: # (pt \- Parser Tools)
[//000000002]: # (Generated from file 'pt\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

pt \- Parser Tools Application

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Command Line](#section2)

  - [PEG Specification Language](#section3)

  - [JSON Grammar Exchange](#section4)

  - [C Parser Embedded In Tcl](#section5)

  - [C Parser](#section6)

  - [Snit Parser](#section7)

  - [TclOO Parser](#section8)

  - [Grammar Container](#section9)

  - [Example](#section10)

  - [Internals](#section11)

  - [Bugs, Ideas, Feedback](#section12)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

[__pt__ __generate__ *resultformat* ?*options\.\.\.*? *resultfile* *inputformat* *inputfile*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](\.\./modules/pt/pt\_introduction\.md)*\. This document is the entrypoint
to the whole system the current package is a part of\.

This document describes __pt__, the main application of the module, a
*[parser generator](\.\./\.\./\.\./index\.md\#parser\_generator)*\. Its intended
audience are people who wish to create a parser for some language of theirs\.
Should you wish to modify the application instead, please see the section about
the application's [Internals](#section11) for the basic references\.

It resides in the User Application Layer of Parser Tools\.

![](\.\./\.\./\.\./image/arch\_user\_app\.png)

# <a name='section2'></a>Command Line

  - <a name='1'></a>__pt__ __generate__ *resultformat* ?*options\.\.\.*? *resultfile* *inputformat* *inputfile*

    This sub\-command of the application reads the parsing expression grammar
    stored in the *inputfile* in the format *inputformat*, converts it to
    the *resultformat* under the direction of the \(format\-specific\) set of
    options specified by the user and stores the result in the *resultfile*\.

    The *inputfile* has to exist, while the *resultfile* may be created,
    overwriting any pre\-existing content of the file\. Any missing directory in
    the path to the *resultfile* will be created as well\.

    The exact form of the result for, and the set of options supported by the
    known result\-formats, are explained in the upcoming sections of this
    document, with the list below providing an index mapping between format name
    and its associated section\. In alphabetical order:

      * __c__

        A *resultformat*\. See section [C Parser](#section6)\.

      * __container__

        A *resultformat*\. See section [Grammar Container](#section9)\.

      * __critcl__

        A *resultformat*\. See section [C Parser Embedded In
        Tcl](#section5)\.

      * __json__

        A *input*\- and *resultformat*\. See section [JSON Grammar
        Exchange](#section4)\.

      * __oo__

        A *resultformat*\. See section [TclOO Parser](#section8)\.

      * __peg__

        A *input*\- and *resultformat*\. See section [PEG Specification
        Language](#section3)\.

      * __snit__

        A *resultformat*\. See section [Snit Parser](#section7)\.

Of the seven possible results four are parsers outright \(__c__,
__critcl__, __oo__, and __snit__\), one \(__container__\) provides
code which can be used in conjunction with a generic parser \(also known as a
grammar interpreter\), and the last two \(__json__ and __peg__\) are doing
double\-duty as input formats, allowing the transformation of grammars for
exchange, reformatting, and the like\.

The created parsers fall into three categories:

![](\.\./\.\./\.\./image/gen\_options\.png)

  - __Specialized parsers implemented in C__

    The fastest parsers are created when using the result formats __c__ and
    __critcl__\. The first returns the raw C code for the parser, while the
    latter wraps it into a Tcl package using *CriTcl*\.

    This makes the latter much easier to use than the former\. On the other hand,
    the former can be adapted to the users' requirements through a multitude of
    options, allowing for things like usage of the parser outside of a Tcl
    environment, something the __critcl__ format doesn't support\. As such
    the __c__ format is meant for more advanced users, or users with special
    needs\.

    A disadvantage of all the parsers in this section is the need to run them
    through a C compiler to make them actually executable\. This is not something
    everyone has the necessary tools for\. The parsers in the next section are
    for people under such restrictions\.

  - __Specialized parsers implemented in Tcl__

    As the parsers in this section are implemented in Tcl they are quite a bit
    slower than anything from the previous section\. On the other hand this
    allows them to be used in pure\-Tcl environments, or in environments which
    allow only a limited set of binary packages\. In the latter case it will be
    advantageous to lobby for the inclusion of the C\-based runtime support
    \(notes below\) into the environment to reduce the impact of Tcl's on the
    speed of these parsers\.

    The relevant formats are __snit__ and __oo__\. Both place their
    result into a Tcl package containing a __snit::type__, or TclOO
    __[class](\.\./\.\./\.\./index\.md\#class)__ respectively\.

    Of the supporting runtime, which is the package
    __[pt::rde](\.\./modules/pt/pt\_rdengine\.md)__, the user has to know
    nothing but that it does exist and that the parsers are dependent on it\.
    Knowledge of the API exported by the runtime for the parsers' consumption is
    *not* required by the parsers' users\.

  - __Interpreted parsing implemented in Tcl__

    The last category, grammar interpretation\. This means that an interpreter
    for parsing expression grammars takes the description of the grammar to
    parse input for, and uses it guide the parsing process\. This is the slowest
    of the available options, as the interpreter has to continually run through
    the configured grammar, whereas the specialized parsers of the previous
    sections have the relevant knowledge about the grammar baked into them\.

    The only places where using interpretation make sense is where the grammar
    for some input may be changed interactively by the user, as the
    interpretation allows for quick turnaround after each change, whereas the
    previous methods require the generation of a whole new parser, which is not
    as fast\. On the other hand, wherever the grammar to use is fixed, the
    previous methods are much more advantageous as the time to generate the
    parser is minuscule compared to the time the parser code is in use\.

    The relevant result format is __container__\. It \(quickly\) generates
    grammar descriptions \(instead of a full parser\) which match the API expected
    by ParserTools' grammar interpreter\. The latter is provided by the package
    __[pt::peg::interp](\.\./modules/pt/pt\_peg\_interp\.md)__\.

All the parsers generated by __critcl__, __snit__, and __oo__, and
the grammar interpreter share a common API for access to the actual parsing
functionality, making them all plug\-compatible\. It is described in the
*[Parser API](\.\./modules/pt/pt\_parser\_api\.md)* specification document\.

# <a name='section3'></a>PEG Specification Language

__peg__, a language for the specification of parsing expression grammars is
meant to be human readable, and writable as well, yet strict enough to allow its
processing by machine\. Like any computer language\. It was defined to make
writing the specification of a grammar easy, something the other formats found
in the Parser Tools do not lend themselves too\.

For either an introduction to or the formal specification of the language,
please go and read the *[PEG Language
Tutorial](\.\./modules/pt/pt\_peg\_language\.md)*\.

When used as a result\-format this format supports the following options:

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-template__ string

    The value of this option is a string into which to put the generated text
    and the values of the other options\. The various locations for user\-data are
    expected to be specified with the placeholders listed below\. The default
    value is "__@code@__"\.

      * __@user@__

        To be replaced with the value of the option __\-user__\.

      * __@format@__

        To be replaced with the the constant __PEG__\.

      * __@file@__

        To be replaced with the value of the option __\-file__\.

      * __@name@__

        To be replaced with the value of the option __\-name__\.

      * __@code@__

        To be replaced with the generated text\.

# <a name='section4'></a>JSON Grammar Exchange

The __json__ format for parsing expression grammars was written as a data
exchange format not bound to Tcl\. It was defined to allow the exchange of
grammars with PackRat/PEG based parser generators for other languages\.

For the formal specification of the JSON grammar exchange format, please go and
read *[The JSON Grammar Exchange
Format](\.\./modules/pt/pt\_json\_language\.md)*\.

When used as a result\-format this format supports the following options:

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-indented__ boolean

    If this option is set the system will break the generated JSON across lines
    and indent it according to its inner structure, with each key of a
    dictionary on a separate line\.

    If the option is not set \(the default\), the whole JSON object will be
    written on a single line, with minimum spacing between all elements\.

  - __\-aligned__ boolean

    If this option is set the system will ensure that the values for the keys in
    a dictionary are vertically aligned with each other, for a nice table
    effect\. To make this work this also implies that __\-indented__ is set\.

    If the option is not set \(the default\), the output is formatted as per the
    value of __indented__, without trying to align the values for dictionary
    keys\.

# <a name='section5'></a>C Parser Embedded In Tcl

The __critcl__ format is executable code, a parser for the grammar\. It is a
Tcl package with the actual parser implementation written in C and embedded in
Tcl via the __critcl__ package\.

This result\-format supports the following options:

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-class__ string

    The value of this option is the name of the class to generate, without
    leading colons\. The default value is __CLASS__\.

    For a simple value __X__ without colons, like CLASS, the parser command
    will be __X__::__X__\. Whereas for a namespaced value __X::Y__
    the parser command will be __X::Y__\.

  - __\-package__ string

    The value of this option is the name of the package to generate\. The default
    value is __PACKAGE__\.

  - __\-version__ string

    The value of this option is the version of the package to generate\. The
    default value is __1__\.

# <a name='section6'></a>C Parser

The __c__ format is executable code, a parser for the grammar\. The parser
implementation is written in C and can be tweaked to the users' needs through a
multitude of options\.

The __critcl__ format, for example, is implemented as a canned configuration
of these options on top of the generator for __c__\.

This result\-format supports the following options:

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-template__ string

    The value of this option is a string into which to put the generated text
    and the other configuration settings\. The various locations for user\-data
    are expected to be specified with the placeholders listed below\. The default
    value is "__@code@__"\.

      * __@user@__

        To be replaced with the value of the option __\-user__\.

      * __@format@__

        To be replaced with the the constant __C/PARAM__\.

      * __@file@__

        To be replaced with the value of the option __\-file__\.

      * __@name@__

        To be replaced with the value of the option __\-name__\.

      * __@code@__

        To be replaced with the generated Tcl code\.

    The following options are special, in that they will occur within the
    generated code, and are replaced there as well\.

      * __@statedecl@__

        To be replaced with the value of the option __state\-decl__\.

      * __@stateref@__

        To be replaced with the value of the option __state\-ref__\.

      * __@strings@__

        To be replaced with the value of the option __string\-varname__\.

      * __@self@__

        To be replaced with the value of the option __self\-command__\.

      * __@def@__

        To be replaced with the value of the option __fun\-qualifier__\.

      * __@ns@__

        To be replaced with the value of the option __namespace__\.

      * __@main@__

        To be replaced with the value of the option __main__\.

      * __@prelude@__

        To be replaced with the value of the option __prelude__\.

  - __\-state\-decl__ string

    A C string representing the argument declaration to use in the generated
    parsing functions to refer to the parsing state\. In essence type and
    argument name\. The default value is the string __RDE\_PARAM p__\.

  - __\-state\-ref__ string

    A C string representing the argument named used in the generated parsing
    functions to refer to the parsing state\. The default value is the string
    __p__\.

  - __\-self\-command__ string

    A C string representing the reference needed to call the generated parser
    function \(methods \.\.\.\) from another parser fonction, per the chosen
    framework \(template\)\. The default value is the empty string\.

  - __\-fun\-qualifier__ string

    A C string containing the attributes to give to the generated functions
    \(methods \.\.\.\), per the chosen framework \(template\)\. The default value is
    __static__\.

  - __\-namespace__ string

    The name of the C namespace the parser functions \(methods, \.\.\.\) shall reside
    in, or a general prefix to add to the function names\. The default value is
    the empty string\.

  - __\-main__ string

    The name of the main function \(method, \.\.\.\) to be called by the chosen
    framework \(template\) to start parsing input\. The default value is
    __\_\_main__\.

  - __\-string\-varname__ string

    The name of the variable used for the table of strings used by the generated
    parser, i\.e\. error messages, symbol names, etc\. The default value is
    __p\_string__\.

  - __\-prelude__ string

    A snippet of code to be inserted at the head of each generated parsing
    function\. The default value is the empty string\.

  - __\-indent__ integer

    The number of characters to indent each line of the generated code by\. The
    default value is __0__\.

  - __\-comments__ boolean

    A flag controlling the generation of code comments containing the original
    parsing expression a parsing function is for\. The default value is
    __on__\.

# <a name='section7'></a>Snit Parser

The __snit__ format is executable code, a parser for the grammar\. It is a
Tcl package holding a __snit::type__, i\.e\. a class, whose instances are
parsers for the input grammar\.

This result\-format supports the following options:

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-class__ string

    The value of this option is the name of the class to generate, without
    leading colons\. Note, it serves double\-duty as the name of the package to
    generate too, if option __\-package__ is not specified, see below\. The
    default value is __CLASS__, applying if neither option __\-class__
    nor __\-package__ were specified\.

  - __\-package__ string

    The value of this option is the name of the package to generate, without
    leading colons\. Note, it serves double\-duty as the name of the class to
    generate too, if option __\-class__ is not specified, see above\. The
    default value is __PACKAGE__, applying if neither option
    __\-package__ nor __\-class__ were specified\.

  - __\-version__ string

    The value of this option is the version of the package to generate\. The
    default value is __1__\.

# <a name='section8'></a>TclOO Parser

The __oo__ format is executable code, a parser for the grammar\. It is a Tcl
package holding a __[TclOO](\.\./\.\./\.\./index\.md\#tcloo)__ class, whose
instances are parsers for the input grammar\.

This result\-format supports the following options:

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-class__ string

    The value of this option is the name of the class to generate, without
    leading colons\. Note, it serves double\-duty as the name of the package to
    generate too, if option __\-package__ is not specified, see below\. The
    default value is __CLASS__, applying if neither option __\-class__
    nor __\-package__ were specified\.

  - __\-package__ string

    The value of this option is the name of the package to generate, without
    leading colons\. Note, it serves double\-duty as the name of the class to
    generate too, if option __\-class__ is not specified, see above\. The
    default value is __PACKAGE__, applying if neither option
    __\-package__ nor __\-class__ were specified\.

  - __\-version__ string

    The value of this option is the version of the package to generate\. The
    default value is __1__\.

# <a name='section9'></a>Grammar Container

The __container__ format is another form of describing parsing expression
grammars\. While data in this format is executable it does not constitute a
parser for the grammar\. It always has to be used in conjunction with the package
__[pt::peg::interp](\.\./modules/pt/pt\_peg\_interp\.md)__, a grammar
interpreter\.

The format represents grammars by a __snit::type__, i\.e\. class, whose
instances are API\-compatible to the instances of the
__[pt::peg::container](\.\./modules/pt/pt\_peg\_container\.md)__ package, and
which are preloaded with the grammar in question\.

This result\-format supports the following options:

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-mode__ __bulk__&#124;__incremental__

    The value of this option controls which methods of
    __[pt::peg::container](\.\./modules/pt/pt\_peg\_container\.md)__
    instances are used to specify the grammar, i\.e\. preload it into the
    container\. There are two legal values, as listed below\. The default is
    __bulk__\.

      * __bulk__

        In this mode the methods __start__, __add__, __modes__, and
        __rules__ are used to specify the grammar in a bulk manner, i\.e\. as
        a set of nonterminal symbols, and two dictionaries mapping from the
        symbols to their semantic modes and parsing expressions\.

        This mode is the default\.

      * __incremental__

        In this mode the methods __start__, __add__, __mode__, and
        __rule__ are used to specify the grammar piecemal, with each
        nonterminal having its own block of defining commands\.

  - __\-template__ string

    The value of this option is a string into which to put the generated code
    and the other configuration settings\. The various locations for user\-data
    are expected to be specified with the placeholders listed below\. The default
    value is "__@code@__"\.

      * __@user@__

        To be replaced with the value of the option __\-user__\.

      * __@format@__

        To be replaced with the the constant __CONTAINER__\.

      * __@file@__

        To be replaced with the value of the option __\-file__\.

      * __@name@__

        To be replaced with the value of the option __\-name__\.

      * __@mode@__

        To be replaced with the value of the option __\-mode__\.

      * __@code@__

        To be replaced with the generated code\.

# <a name='section10'></a>Example

In this section we are working a complete example, starting with a PEG grammar
and ending with running the parser generated from it over some input, following
the outline shown in the figure below:

![](\.\./\.\./\.\./image/flow\.png) Our grammar, assumed to the stored in the file
"calculator\.peg" is

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

From this we create a snit\-based parser via

    pt generate snit calculator.tcl -class calculator -name calculator peg calculator.peg

which leaves us with the parser package and class written to the file
"calculator\.tcl"\. Assuming that this package is then properly installed in a
place where Tcl can find it we can now use this class via a script like

    package require calculator

    lassign $argv input
    set channel [open $input r]

    set parser [calculator]
    set ast [$parser parse $channel]
    $parser destroy
    close $channel

    ... now process the returned abstract syntax tree ...

where the abstract syntax tree stored in the variable will look like

    set ast {Expression 0 4
        {Factor 0 4
            {Term 0 2
                {Number 0 2
                    {Digit 0 0}
                    {Digit 1 1}
                    {Digit 2 2}
                }
            }
            {AddOp 3 3}
            {Term 4 4
                {Number 4 4
                    {Digit 4 4}
                }
            }
        }
    }

assuming that the input file and channel contained the text

    120+5

A more graphical representation of the tree would be

![](\.\./\.\./\.\./image/expr\_ast\.png) Regardless, at this point it is the user's
responsibility to work with the tree to reach whatever goal she desires\. I\.e\.
analyze it, transform it, etc\. The package
__[pt::ast](\.\./modules/pt/pt\_astree\.md)__ should be of help here,
providing commands to walk such ASTs structures in various ways\.

One important thing to note is that the parsers used here return a data
structure representing the structure of the input per the grammar underlying the
parser\. There are *no* callbacks during the parsing process, i\.e\. no *parsing
actions*, as most other parsers will have\.

Going back to the last snippet of code, the execution of the parser for some
input, note how the parser instance follows the specified *[Parser
API](\.\./modules/pt/pt\_parser\_api\.md)*\.

# <a name='section11'></a>Internals

This section is intended for users of the application which wish to modify or
extend it\. Users only interested in the generation of parsers can ignore it\.

The main functionality of the application is encapsulated in the package
__[pt::pgen](\.\./modules/pt/pt\_pgen\.md)__\. Please read it for more
information\.

# <a name='section12'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/apps/tcldocstrip.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

[//000000001]: # (tcldocstrip \- Textprocessing toolbox)
[//000000002]: # (Generated from file 'tcldocstrip\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcldocstrip\(n\) 1\.0 tcllib "Textprocessing toolbox")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

tcldocstrip \- Tcl\-based Docstrip Processor

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [USE CASES](#subsection1)

      - [COMMAND LINE](#subsection2)

      - [OPTIONS](#subsection3)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__tcldocstrip__ *output* ?options? *input* ?*guards*?](#1)  
[__tcldocstrip__ ?options? *output* \(?options? *input* *guards*\)\.\.\.](#2)  
[__tcldocstrip__ __\-guards__ *input*](#3)  

# <a name='description'></a>DESCRIPTION

The application described by this document, __tcldocstrip__, is a relative
of __[docstrip](\.\./modules/docstrip/docstrip\.md)__, a simple literate
programming tool for LaTeX\.

__tcldocstrip__ is based upon the package
__[docstrip](\.\./modules/docstrip/docstrip\.md)__\.

## <a name='subsection1'></a>USE CASES

__tcldocstrip__ was written with the following three use cases in mind\.

  1. Conversion of a single input file according to the listed guards into the
     stripped output\. This handles the most simple case of a set of guards
     specifying a single document found in a single input file\.

  1. Stitching, or the assembly of an output from several sets of guards, in a
     specific order, and possibly from different files\. This is the second
     common case\. One document spread over several inputs, and/or spread over
     different guard sets\.

  1. Extraction and listing of all the unique guard expressions and guards used
     within a document to help a person which did not author the document in
     question in familiarizing itself with it\.

## <a name='subsection2'></a>COMMAND LINE

  - <a name='1'></a>__tcldocstrip__ *output* ?options? *input* ?*guards*?

    This is the form for use case \[1\]\. It converts the *input* file according
    to the specified *guards* and options\. The result is written to the named
    *output* file\. Usage of the string __\-__ as the name of the output
    signals that the result should be written to __stdout__\. The guards are
    document\-specific and have to be known to the caller\. The *options* will
    be explained later, in section [OPTIONS](#subsection3)\.

      * path *output* \(in\)

        This argument specifies where to write the generated document\. It can be
        the path to a file or directory, or __\-__\. The last value causes the
        application to write the generated documented to __stdout__\.

        If the *output* does not exist then \[file dirname $output\] has to
        exist and must be a writable directory\.

      * path *inputfile* \(in\)

        This argument specifies the path to the file to process\. It has to
        exist, must be readable, and written in
        *[docstrip](\.\./\.\./\.\./index\.md\#docstrip)* format\.

  - <a name='2'></a>__tcldocstrip__ ?options? *output* \(?options? *input* *guards*\)\.\.\.

    This is the form for use case \[2\]\. It differs from the form for use case \[1\]
    by the possibility of having options before the output file, which apply in
    general, and specifying more than one inputfile, each with its own set of
    input specific options and guards\.

    It extracts data from the various *input* files, according to the
    specified *options* and *guards*, and writes the result to the given
    *output*, in the order of their specification on the command line\. Options
    specified before the output are global settings, whereas the options
    specified before each input are valid only just for this input file\.
    Unspecified values are taken from the global settings, or defaults\. As for
    form \[1\] using the string __\-__ as output causes the application to
    write to stdout\. Using the string __\.__ for an input file signals that
    the last input file should be used again\. This enables the assembly of the
    output from one input file using multiple and different sets of guards,
    without having to specify the full name of the file every time\.

  - <a name='3'></a>__tcldocstrip__ __\-guards__ *input*

    This is the form for use case \[3\]\. It determines the guards, and unique
    guard expressions used within the provided *input* document\. The found
    strings are written to stdout, one string per line\.

## <a name='subsection3'></a>OPTIONS

This section describes all the options available to the user of the application,
with the exception of the option __\-guards__\. This option was described
already, in section [COMMAND LINE](#subsection2)\.

  - __\-metaprefix__ string

    This option is inherited from the command __docstrip::extract__ provided
    by the package __[docstrip](\.\./modules/docstrip/docstrip\.md)__\.

    It specifies the string by which the '%%' prefix of a metacomment line will
    be replaced\. Defaults to '%%'\. For Tcl code this would typically be '\#'\.

  - __\-onerror__ mode

    This option is inherited from the command __docstrip::extract__ provided
    by the package __[docstrip](\.\./modules/docstrip/docstrip\.md)__\.

    It controls what will be done when a format error in the *text* being
    processed is detected\. The settings are:

      * __ignore__

        Just ignore the error; continue as if nothing happened\.

      * __puts__

        Write an error message to __stderr__, then continue processing\.

      * __throw__

        Throw an error\. __::errorCode__ is set to a list whose first element
        is __DOCSTRIP__, second element is the type of error, and third
        element is the line number where the error is detected\. This is the
        default\.

  - __\-trimlines__ bool

    This option is inherited from the command __docstrip::extract__ provided
    by the package __[docstrip](\.\./modules/docstrip/docstrip\.md)__\.

    Controls whether *spaces* at the end of a line should be trimmed away
    before the line is processed\. Defaults to __true__\.

  - __\-preamble__ text

  - __\-postamble__ text

  - __\-nopreamble__

  - __\-nopostamble__

    The \-no\*amble options deactivate file pre\- and postambles altogether,
    whereas the \-\*amble options specify the *user* part of the file pre\- and
    postambles\. This part can be empty, in that case only the standard parts are
    shown\. This is the default\.

    Preambles, when active, are written before the actual content of a generated
    file\. In the same manner postambles are, when active, written after the
    actual content of a generated file\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *docstrip* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docstrip](\.\./modules/docstrip/docstrip\.md)

# <a name='keywords'></a>KEYWORDS

[\.dtx](\.\./\.\./\.\./index\.md\#\_dtx), [LaTeX](\.\./\.\./\.\./index\.md\#latex),
[conversion](\.\./\.\./\.\./index\.md\#conversion),
[docstrip](\.\./\.\./\.\./index\.md\#docstrip),
[documentation](\.\./\.\./\.\./index\.md\#documentation), [literate
programming](\.\./\.\./\.\./index\.md\#literate\_programming),
[markup](\.\./\.\./\.\./index\.md\#markup), [source](\.\./\.\./\.\./index\.md\#source)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/devdoc/tcl_community_communication.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

[//000000001]: # (tcl\_community\_communication \- )
[//000000002]: # (Generated from file 'tcl\_community\_communication\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (tcl\_community\_communication\(n\) 1 tcllib "")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl\_community\_communication \- Tcl Community \- Kind Communication

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Signatories](#section2)

  - [Authors](#section3)

# <a name='description'></a>DESCRIPTION

The Tcl Community encourages contributions from anyone who wishes to advance the
development of:

  - The Tcl Language

  - Tcl derived languages

  - Tcl related libraries

  - Tcl extensions

  - External Projects that Integrate Tcl

We welcome those contributions from anyone\. We are blind to gender, race,
religion, cultural background, cybernetic nature, and any other demographic
characteristics, as well as personal political views\.

A community lives and dies by communications\. And occasionally our
communications are peppered with patterns that are harsh, unfriendly,
unwelcoming and/or otherwise unkind\. As a volunteer community, we need all of
the help we can get\. Therefore, we ask all contributors to make a conscious
effort, in Tcl Community discussions, to communicate in ways that are welcoming\.
Ways that are friendly\. Ways that are, in a word: kind\.

These guidelines suggest specific ways to accomplish that goal\.

Please note: for the balance of this document any reference to "People",
"Persons", "anybody" or "somebody" can refer to any sentient being, not merely
corporeal members of the species Homo Sapien\.

  - We are a Sanctuary not a Clubhouse

    The Tcl Community is a collective of amateurs and professionals who code,
    test, and use tools\. Our community is open to all\. There is no velvet rope\.
    There is no bouncer at the door\. There are no secret handshakes\. Any
    sentient being who enters our midst is welcome\. If someone is ever asked to
    leave, it is only because they are being disruptive to the functioning of
    the community\.

  - We Merit Ideas, Not People

    A good idea can come from anyone, regardless of how little time they have
    been with us\. A bad idea can come from anyone, regardless of how much time
    or how little time they have been with us\. We judge a concept by how it
    stands up to scrutiny of logic, implementation, and regression testing\. We
    don’t judge ideas based on who had the idea first, who agrees with the idea,
    or who disagrees with it\.

  - Treat Everyone with Respect

    Everyone is deserving of respect and courtesy at all times\.

  - Refer to people by the names they use\.

    If grammar requires you to state a gender for a person, honor their
    preferences about their gender identity\. If you are unsure as to the gender
    of an individual, ask\. If someone had to guess about your gender and got it
    wrong, please correct them and do not take it personally\.

  - Do not take a harsh tone towards other participants\.

    Do not make personal attacks against anyone \(participant or not\.\)

    Criticize statements and actions, never people\.

  - Don’t Take Things Personally

    When in doubt, assume the best in people\. A criticism of your statements is
    not a personal attack on you\.

  - Persons, not People

    Stereotypes are an unhelpful tool on many accounts\. They are generally
    oversimplified\. They are usually flat out wrong\. And even if "right" they
    are of absolutely no utility in determining the capabilities, motivations,
    or fitness of an individual\.

    Don’t use them in Tcl Community communications\.

  - Mistakes Happen

    The human condition is a series of trials and errors\. Progress is when we
    get one more trial than error\. Being wrong or making a mistake is the
    default state of humanity\. Accept the errors of your fellow sentient beings,
    and be aware that you are also fallible\.

  - Keep it Real

    Please respond to what people actually say\. We are all amazing individuals,
    but none among us are mind readers\. If you find yourself responding to what
    you imagine someone is thinking, odds are you are going to be wrong\.

    If you must criticize someone, stick to things they have actually done\.
    Never criticize for something you speculate they have done\. Or imagine they
    have done\. Or something someone who shares some attribute with them has done
    in the past\.

    Keep discussions about any non\-Tcl subjects to what can be stated factually
    and without emotion or judgement\.

  - When Trouble Arises, Don’t Escalate

    If you feel you are being personally attacked or offended, take the high
    road\. Punching back in a public forum will only makes things worse\. Address
    the matter in a private correspondence\. Be polite\. Express your feelings,
    but note that you are expressing your feelings\. When writing, look for a way
    to calm matters down\. And when in doubt, sleep on your letter before
    pressing send\. And when not in doubt, sleep on it for another day after
    that\.

    If you are a spectator to a fight in progress, politely request the two
    parties take the matter to a more private forum\.

  - Always get the Last Word: I’m Sorry

    If an personal argument does arise, be the first to apologize\. An apology
    does not concede a logical point\. It merely acknowledges that at some point
    the discussion left either logic, community decency, or both\. Return to the
    topic when cooler heads can prevail\.

  - Nobody is Keeping Score

    There is no prize for being right\. There is no cost for being wrong\. A hard
    sell is not going to advance your idea along any more than a logical
    argument\. You aren’t running for office\. This isn’t debate club\. If you find
    yourself continuing a discussion beyond where a topic can be logically
    discussed, stop\.

  - No Evangelizing

    The Tcl Community is not the place to promote your chosen operating system,
    political outlook, religion, marketing scheme, or economic model\. Period\.

    \(And if you do bring it up, be prepared to have your chosen topic discussed
    logically\. And odds are, not favorably\.\)

  - Respect the Community

    If the Community has come to a decision on a course of action, please stop
    arguing\.

    If someone complains about how you are expressing your ideas, listen\.

    If your words are hurting people, stop\. There is no amount of being "right"
    that makes up for someone leaving our midst because they felt insulted,
    threatened, or ignored\.

By following these guidelines, we will build our community, encourage more
contribution to our projects, and our discussions will be friendlier and reach
conclusions more easily\.

Thank You\.

# <a name='section2'></a>Signatories

  - Sean "the Hypnotoad" Woods

  - Andreas Kupries

# <a name='section3'></a>Authors

  - Primary

    Sean "the Hypnotoad" Woods

  - Light editing

    Andreas Kupries
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































Deleted embedded/md/tcllib/files/devdoc/tcllib_devguide.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046

[//000000001]: # (tcllib\_devguide \- )
[//000000002]: # (Generated from file 'tcllib\_devguide\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (tcllib\_devguide\(n\) 1 tcllib "")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

tcllib\_devguide \- Tcllib \- The Developer's Guide

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commitments](#section2)

      - [Contributor](#subsection1)

      - [Maintainer](#subsection2)

  - [Branching and Workflow](#section3)

      - [Package Dependencies](#subsection3)

      - [Trunk](#subsection4)

      - [Branches](#subsection5)

      - [Working with Branches](#subsection6)

      - [Version numbers](#subsection7)

  - [Structural Overview](#section4)

      - [Main Directories](#subsection8)

      - [More Directories](#subsection9)

      - [Top Files](#subsection10)

      - [File Types](#subsection11)

  - [Testsuite Tooling](#section5)

      - [Invoke the testsuites of a specific module](#subsection12)

      - [Invoke the testsuites of all modules](#subsection13)

      - [Detailed Test Logs](#subsection14)

      - [Shell Selection](#subsection15)

      - [Help](#subsection16)

  - [Documentation Tooling](#section6)

      - [Generate documentation for a specific module](#subsection17)

      - [Generate documentation for all modules](#subsection18)

      - [Available output formats, help](#subsection19)

      - [Validation without output](#subsection20)

  - [Notes On Writing A Testsuite](#section7)

  - [Installation Tooling](#section8)

# <a name='synopsis'></a>SYNOPSIS

[__[Module](\.\./\.\./\.\./index\.md\#module)__ *name* *code\-action* *doc\-action* *example\-action*](#1)  
[__[Application](\.\./\.\./\.\./index\.md\#application)__ *name*](#2)  
[__Exclude__ *name*](#3)  

# <a name='description'></a>DESCRIPTION

Welcome to Tcllib, the Tcl Standard Library\. Note that Tcllib is not a package
itself\. It is a collection of \(semi\-independent\)
*[Tcl](\.\./\.\./\.\./index\.md\#tcl)* packages that provide utility functions
useful to a large collection of Tcl programmers\.

This document is a guide for developers working on Tcllib, i\.e\. maintainers
fixing bugs, extending the collection's functionality, etc\.

Please read

  1. *[Tcllib \- How To Get The Sources](tcllib\_sources\.md)* and

  1. *[Tcllib \- The Installer's Guide](tcllib\_installer\.md)*

first, if that was not done already\.

Here we assume that the sources are already available in a directory of your
choice, and that you not only know how to build and install them, but also have
all the necessary requisites to actually do so\. The guide to the sources in
particular also explains which source code management system is used, where to
find it, how to set it up, etc\.

# <a name='section2'></a>Commitments

## <a name='subsection1'></a>Contributor

As a contributor to Tcllib you are committing yourself to:

  1. keep the guidelines written down in *[Tcl Community \- Kind
     Communication](tcl\_community\_communication\.md)* in your mind\. The main
     point to take away from there is *to be kind to each other*\.

  1. Your contributions getting distributed under a BSD/MIT license\. For the
     details see *[Tcllib \- License](tcllib\_license\.md)*

Contributions are made by entering tickets into our tracker, providing patches,
bundles or branches of code for inclusion, or posting to the Tcllib related
mailing lists\.

## <a name='subsection2'></a>Maintainer

When contributing one or more packages for full inclusion into Tcllib you are
committing yourself to

  1. Keep the guidelines written down in *[Tcl Community \- Kind
     Communication](tcl\_community\_communication\.md)* \(as any contributor\) in
     your mind\. The main point to take away from there is *to be kind to each
     other*\.

  1. Your packages getting distributed under a BSD/MIT license\. For the details
     see *[Tcllib \- License](tcllib\_license\.md)*

  1. Maintenance of the new packages for a period of two years under the
     following rules, and responsibilities:

       1) A maintainer may step down after the mandatory period as they see fit\.

       1) A maintainer may step down before the end of the mandatory period,
          under the condition that a replacement maintainer is immediately
          available and has agreed to serve the remainder of the period, plus
          their own mandatory period \(see below\)\.

       1) When stepping down without a replacement maintainer taking over the
          relevant packages have to be flagged as __unmaintained__\.

       1) When a replacement mantainer is brought in for a package it is \(kept\)
          marked as __maintained__ \(again\)\.

          A replacement maintainer is bound by the same rules as the original
          maintainer, except that the mandatory period of maintenance is
          shortened to one year\.

       1) For any __unmaintained__ package a contributor interested in
          becoming its maintainer can become so by flagging them as
          __maintained__ with their name and contact information, committing
          themselves to the rules of a replacement maintainer \(see previous
          point\)\.

       1) For any already __maintained__ package a contributor interested in
          becoming a co\-maintainer can become so with the agreement of the
          existing maintainer\(s\), committing themselves to the rules of a
          replacement maintainer \(see two points previous\)\.

     The responsibilities as a maintainer include:

       1) Watching Tcllib's ticket tracker for bugs, bug fixes, and feature
          requests related to the new packages\.

       1) Reviewing the aforementioned tickets, rejecting or applying them

       1) Coordination and discussion with ticket submitter during the
          development and/or application of bug fixes\.

  1. Follow the [Branching and Workflow](#section3) of this guide\.

# <a name='section3'></a>Branching and Workflow

## <a name='subsection3'></a>Package Dependencies

Regarding packages and dependencies between them Tcllib occupies a middle
position between two extremes:

  1. On one side a strongly interdependent set of packages, usually by a single
     author, for a single project\. Looking at my \(Andreas Kupries\) own work
     examples of such are [Marpa](https://core\.tcl\.tk/akupries/marpa/index),
     [CRIMP](https://core\.tcl\.tk/akupries/crimp/index),
     [Kinetcl](https://core\.tcl\.tk/akupries/kinetcl/index), etc\.

     For every change the author of the project handles all the modifications
     cascading from any incompatibilities it introduced to the system\.

  1. On the other side, the world of semi\-independent projects by many different
     authors where authors know what packages their own creations depend on, yet
     usually do not know who else depends on them\.

     The best thing an author making an \(incompatible\) change to their project
     can do is to for one announce such changes in some way, and for two use
     versioning to distinguish the code before and after the change\.

     The world is then responsible for adapting, be it by updating their own
     projects to the new version, or by sticking to the old\.

As mentioned already, Tcllib lives in the middle of that\.

While we as maintainers cannot be aware of all users of Tcllib's packages, and
thus have to rely on the mechanisms touched on in point 2 above for that, the
dependencies between the packages contained in Tcllib are a different matter\.

As we are collectively responsible for the usability of Tcllib in toto to the
outside world, it behooves us to be individually mindful even of Tcllib packages
we are not directly maintaining, when they depend on packages under our
maintainership\. This may be as simple as coordinating with the maintainers of
the affected packages\. It may also require us to choose how to adapt affected
packages which do not have maintainers, i\.e\. modify them to use our changed
package properly, or modify them to properly depend on the unchanged version of
our package\.

Note that the above is not only a chore but an opportunity as well\. Additional
insight can be had by forcing ourselves to look at our package and the planned
change\(s\) from an outside perspective, to consider the ramifications of our
actions on others in general, and on dependent packages in particular\.

## <a name='subsection4'></a>Trunk

The management and use of branches is an important part of working with a
*Distributed Version Control System* \(*DVCS*\) like
[fossil](https://www\.fossil\-scm\.org/)\.

For Tcllib the main branch of the collection is *trunk*\. In
*[git](\.\./\.\./\.\./index\.md\#git)* this branch would be called *master*, and
this is exactly the case in the [github
mirror](https://github\.com/tcltk/tcllib/) of Tcllib\.

To properly support debugging *each commit* on this branch *has to pass the
entire testsuite* of the collection\. Using bisection to determine when an issue
appeared is an example of an action made easier by this constraint\.

This is part of our collective responsibility for the usability of Tcllib in
toto to the outside world\. As *[fossil](\.\./\.\./\.\./index\.md\#fossil)* has no
mechanism to enforce this condition this is handled on the honor system for
developers and maintainers\.

To make the task easier Tcllib comes with a tool \("sak\.tcl"\) providing a number
of commands in support\. These commands are explained in the following sections
of this guide\.

While it is possible and allowed to commit directly to trunk remember the above
constraint regarding the testsuite, and the coming notes about other possible
issues with a commit\.

## <a name='subsection5'></a>Branches

Given the constraints placed on the *trunk* branch of the repository it is
\(strongly\) recommended to perform any development going beyond trivial changes
on a non\-trunk branch\.

Outside of the trunk developers are allowed to commit intermediate broken states
of their work\. Only at the end of a development cycle, when the relevant branch
is considered ready for merging, will it be necessary to perform full the set of
validations ensuring that the merge to come will create a good commit on trunk\.

Note that while a review from a second developer is not a required condition for
merging a branch it is recommended to seek out such an independent opinion as a
means of cross\-checking the work\.

It also recommended to give any new branch a name which aids in determining
additional details about it\. Examples of good things to stick into a branch name
would be

  - Developer \(nick\)name

  - Ticket hash/reference

  - One or two keywords applicable to the work

  - \.\.\.

Further, while most development branches are likely quite short\-lived, no
prohibitions exist against making longer\-lived branches\. Creators should however
be mindful that the longer such a branch exists without merges the more
divergent they will tend to be, with an associated increase in the effort which
will have to be spent on either merging from and merging to trunk\.

## <a name='subsection6'></a>Working with Branches

In the hope of engendering good work practices now a few example operations
which will come up with branches, and their associated fossil command
\(sequences\)\.

  - *Awareness*

    When developing we have to keep ourselves aware of the context of our work\.
    On what branch are we ? What files have we changed ? What new files are not
    yet known to the repository ? What has happened remotely since we used our
    checkout ? The answers to these questions become especially important when
    using a long\-lived checkout and coming back to it after some time away\.

    Commands to answer questions like the above are:

      * __fossil pull__

        Get all changes done on the remote since the last pull or sync from it\.
        This has to be done first, before any of the commands below\.

        Even if the commit in our checkout refers to the branch we want right
        now control operations committed to the remote may have changed that
        from underneath us\.

      * __fossil info &#124; grep tags__

      * __fossil branch list &#124; grep '\\\*'__

        Two different ways of determining the branch our checkout is on\.

      * __fossil timeline__

        What have we \(and others\) done recently ?

        *Attention*, this information is very likely outdated, the more the
        longer we did not use this checkout\. Run __fossil pull__ first to
        get latest information from the remote repository of the project\.

      * __fossil timeline current__

        Place the commit our checkout is based on at the top of the timeline\.

      * __fossil changes__

        Lists the files we have changed compared to the commit the checkout is
        based on\.

      * __fossil extra__

        Lists the files we have in the checkout the repository does not know
        about\. This may be leftover chaff from our work, or something we have
        forgotten to __fossil add__ to the repository yet\.

  - *Clean checkouts*

    Be aware of where you are \(see first definition\)\.

    For pretty much all the operation recipes below a clean checkout is at least
    desired, often required\. To check that a checkout is clean invoke

        fossil changes
        fossil extra

    How to clean up when uncommitted changes of all sorts are found is
    context\-specific and outside of the scope of this guide\.

  - *Starting a new branch*

    Be aware of where you are \(see first definition\)\.

    Ensure that you have clean checkout \(see second definition\)\. It is
    *required*\.

    In most situations you want to be on branch *trunk*, and you want to be on
    the latest commit for it\. To get there use

        fossil pull
        fossil update trunk

    If some other branch is desired as the starting point for the coming work
    replace *trunk* in the commands above with the name of that branch\.

    With the base line established we now have two ways of creating the new
    branch, with differing \(dis\)advantages\. The simpler way is to

        fossil branch new NAME_OF_NEW_BRANCH

    and start developing\. The advantage here is that you cannot forget to create
    the branch\. The disadvantages are that we have a branch commit unchanged
    from where we branched from, and that we have to use high\-handed techniques
    like hiding or shunning to get rid of the commit should we decide to abandon
    the work before the first actual commit on the branch\.

    The other way of creating the branch is to start developing, and then on the
    first commit use the option __\-\-branch__ to tell
    __[fossil](\.\./\.\./\.\./index\.md\#fossil)__ that we are starting a branch
    now\. I\.e\. run

        fossil commit --branch NAME_OF_NEW_BRANCH ...

    where *\.\.\.* are any other options used to supply the commit message, files
    to commit, etc\.

    The \(dis\)advantages are now reversed\.

    We have no superflous commit, only what is actually developed\. The work is
    hidden until we commit to make our first commit\.

    We may forget to use __\-\-branch NAME\_OF\_NEW\_BRANCH__ and then have to
    correct that oversight via the fossil web interface \(I am currently unaware
    of ways of doing such from the command line, although some magic
    incantantion of __fossil tag create__ may work\)\.

    It helps to keep awareness, like checking before any commit that we are on
    the desired branch\.

  - *Merging a branch into trunk*

    Be aware of where you are \(see first definition\)\.

    Ensure that you have clean checkout \(see second definition\)\. In the
    full\-blown sequence \(zig\-zag\) it is *required*, due to the merging from
    trunk\. In the shorter sequence it is only desired\. That said, keeping the
    checkout clean before any major operations is a good habit to have, in my
    opinion\.

    The full\-blown sequencing with checks all the way is to

      1. Validate the checkout, i\.e\. last commit on your branch\. Run the full
         test suite and other validations, fix all the issues which have cropped
         up\.

      1. Merge the latest state of the *trunk* \(see next definition\)\.

      1. Validate the checkout again\. The incoming trunk changes may have broken
         something now\. Do any required fixes\.

      1. Now merge to the trunk using

             fossil update trunk
             fossil merge --integrate YOUR_BRANCH

      1. At this point the checkout should be in the same state as at the end of
         point \(3\) above, because we resolved any issues with the trunk already\.
         Thus a simple

             fossil commit ...

         should be sufficient now to commit the merge back and close the branch
         \(due to the __\-\-integrate__ we used on the merge\)\.

         The more paranoid may validate the checkout a third time before
         commiting\.

    I call this a *zig\-zag merge* because of how the arrows look in the
    timeline, from trunk to feature branch for the first merge, and then back
    for the final merge\.

    A less paranoid can do what I call a *simple merge*, which moves step \(2\)
    after step \(4\) and skips step \(3\) entirely\. The resulting shorter sequence
    is

      1. Validate

      1. Merge to trunk

      1. Validate again

      1. Commit to trunk

    The last step after either zig\-zag or plain merge is to

        fossil sync

    This saves our work to the remote side, and further gives us any other work
    done while we were doing our merge\. It especially allows us to check if we
    raced somebody else, resulting in a split trunk\.

    When that happens we should coordinate with the other developer on who fixes
    the split, to ensure that we do not race each other again\.

  - *Merging from trunk*

    Be aware of where you are \(see first definition\)\.

    Ensure that you have clean checkout \(see second definition\)\. It is
    *required*\.

    In most situations you want to import the latest commit of branch *trunk*
    \(or other origin\)\. To get it use

        fossil pull

    With that done we can now import this commit into our current branch with

        fossil merge trunk

    Even if __[fossil](\.\./\.\./\.\./index\.md\#fossil)__ does not report any
    conflicts it is a good idea to check that the operation has not broken the
    new and/or changed functionality we are working on\.

    With the establishment of a good merge we then save the state with

        fossil commit ...

    before continuing development\.

## <a name='subsection7'></a>Version numbers

In Tcllib all changes to a package have to come with an increment of its version
number\. What part is incremented \(patchlevel, minor, major version\) depends on
the kind of change made\. With multiple changes in a commit the highest "wins"\.

When working in a development branch the version change can be deferred until it
is time to merge, and then has to cover all the changes in the branch\.

Below a list of the kinds of changes and their associated version increments:

  - *D \- documentation*

    No increment

  - *T \- testsuite*

    No increment

  - *B \- bugfix*

    Patchlevel

  - *I \- implementation tweak*

    Patchlevel

  - *P \- performance tweak*

    Patchlevel

  - *E \- backward\-compatible extension*

    Minor

  - *API \- incompatible change*

    Major

Note that a commit containing a version increment has to mention the new version
number in its commit message, as well as the kind of change which caused it\.

Note further that the version number of a package currently exists in three
places\. An increment has to update all of them:

  1. The package implementation\.

  1. The package index \("pkgIndex\.tcl"\)

  1. The package documentation\.

The "sak\.tcl" command __validate version__ helps finding discrepancies
between the first two\. All the other __validate__ methods are also of
interest to any developer\. Invoke it with

    sak.tcl help validate

to see their documentation\.

# <a name='section4'></a>Structural Overview

## <a name='subsection8'></a>Main Directories

The main directories in the Tcllib toplevel directory and of interest to a
developer are:

  - "modules"

    Each child directory represents one or more packages\. In the case of the
    latter the packages are usually related in some way\. Examples are "base64",
    "math", and "struct", with loose \(base64\) to strong \(math\) relations between
    the packages in the directory\.

  - "apps"

    This directory contains all the installable applications, with their
    documentation\. Note that this directory is currently *not* split into
    sub\-directories\.

  - "examples"

    Each child directory "foo" contains one or more example application for the
    packages in "modules/foo"\. These examples are generally not polished enough
    to be considered for installation\.

## <a name='subsection9'></a>More Directories

  - "config"

    This directory contains files supporting the Unix build system, i\.e\.
    "configure" and "Makefile\.in"\.

  - "devdoc"

    This directories contains the doctools sources for the global documentation,
    like this document and its sibling guides\.

  - "embedded"

    This directory contains the entire documentation formatted for
    *[HTML](\.\./\.\./\.\./index\.md\#html)* and styled to properly mix into the
    web site generated by fossil for the repository\.

    This is the documentation accessible from the Tcllib home directory,
    represented in the repository as "embedded/index\.md"\.

  - "idoc"

    This directory contains the entire documentation formatted for
    *[nroff](\.\./\.\./\.\./index\.md\#nroff)* and
    *[HTML](\.\./\.\./\.\./index\.md\#html)*, the latter without any styling\. This
    is the documentation which will be installed\.

  - "support"

    This directory contains the sources of internal packages and utilities used
    in the implementation of the "installer\.tcl" and "sak\.tcl" scripts/tools\.

## <a name='subsection10'></a>Top Files

  - "aclocal\.m4"

  - "configure"

  - "configure\.in"

  - "Makefile\.in"

    These four files comprise the Unix build system layered on top of the
    "installer\.tcl" script\.

  - "installer\.tcl"

    The Tcl\-based installation script/tool\.

  - "project\.shed"

    Configuration file for *Sean Wood*'s
    __[PracTcl](\.\./modules/practcl/practcl\.md)__ buildsystem\.

  - "sak\.tcl"

    This is the main tool for developers and release managers, the *Swiss Army
    Knife* of management operations on the collection\.

  - "ChangeLog"

    The log of changes to the global support, when the sources were held in
    *[CVS](\.\./\.\./\.\./index\.md\#cvs)*\. Not relevant any longer with the
    switch to the *[fossil](\.\./\.\./\.\./index\.md\#fossil)* SCM\.

  - "license\.terms"

    The license in plain ASCII\. See also *[Tcllib \-
    License](tcllib\_license\.md)* for the nicely formatted form\. The text is
    identical\.

  - "README\.md"

  - "\.github/CONTRIBUTING\.md"

  - "\.github/ISSUE\_TEMPLATE\.md"

  - "\.github/PULL\_REQUEST\_TEMPLATE\.md"

    These markdown\-formatted documents are used and shown by the github mirror
    of these sources, pointing people back to the official location and issue
    trackers\.

  - "DESCRIPTION\.txt"

  - "STATUS"

  - "tcllib\.spec"

  - "tcllib\.tap"

  - "tcllib\.yml"

    ????

## <a name='subsection11'></a>File Types

The most common file types, by file extension, are:

  - "\.tcl"

    Tcl code for a package, application, or example\.

  - "\.man"

    Doctools\-formatted documentation, usually for a package\.

  - "\.test"

    Test suite for a package, or part of\. Based on __tcltest__\.

  - "\.bench"

    Performance benchmarks for a package, or part of\. Based on "modules/bench"\.

  - "\.pcx"

    Syntax rules for *TclDevKit*'s __tclchecker__\. Using these rules
    allows the checker to validate the use of commands of a Tcllib package
    __foo__ without having to scan the "\.tcl" files implementing it\.

# <a name='section5'></a>Testsuite Tooling

Testsuites in Tcllib are based on Tcl's standard test package __tcltest__,
plus utilities found in the directory "modules/devtools"

Tcllib developers invoke the suites through the __test run__ method of the
"sak\.tcl" tool, with other methods of __[test](\.\./\.\./\.\./index\.md\#test)__
providing management operations, for example setting a list of standard Tcl
shells to use\.

## <a name='subsection12'></a>Invoke the testsuites of a specific module

Invoke either

    ./sak.tcl test run foo

or

    ./sak.tcl test run modules/foo

to invoke the testsuites found in a specific module "foo"\.

## <a name='subsection13'></a>Invoke the testsuites of all modules

Invoke the tool without a module name, i\.e\.

    ./sak.tcl test run

to invoke the testsuites of all modules\.

## <a name='subsection14'></a>Detailed Test Logs

In all the previous examples the test runner will write a combination of
progress display and testsuite log to the standard output, showing for each
module only the tests that passed or failed and how many of each in a summary at
the end\.

To get a detailed log, it is necessary to invoke the test runner with additional
options\.

For one:

    ./sak.tcl test run --log LOG foo

While this shows the same short log on the terminal as before, it also writes a
detailed log to the file "LOG\.log", and excerpts to other files \("LOG\.summary",
"LOG\.failures", etc\.\)\.

For two:

    ./sak.tcl test run -v foo

This writes the detailed log to the standard output, instead of the short log\.

Regardless of form, the detailed log contains a list of all test cases executed,
which failed, and how they failed \(expected versus actual results\)\.

## <a name='subsection15'></a>Shell Selection

By default the test runner will use all the Tcl shells specified via __test
add__ to invoke the specified testsuites, if any\. If no such are specified it
will fall back to the Tcl shell used to run the tool itself\.

Use option __\-\-shell__ to explicitly specify the Tcl shell to use, like

    ./sak.tcl test run --shell /path/to/tclsh ...

## <a name='subsection16'></a>Help

Invoke the tool as

    ./sak.tcl help test

to see the detailed help for all methods of
__[test](\.\./\.\./\.\./index\.md\#test)__, and the associated options\.

# <a name='section6'></a>Documentation Tooling

The standard format used for documentation of packages and other things in
Tcllib is *[doctools](\.\./\.\./\.\./index\.md\#doctools)*\. Its supporting
packages are a part of Tcllib, see the directories "modules/doctools" and
"modules/dtplite"\. The latter is an application package, with the actual
application "apps/dtplite" a light wrapper around it\.

Tcllib developers gain access to these through the __doc__ method of the
"sak\.tcl" tool, another \(internal\) wrapper around the "modules/dtplite"
application package\.

## <a name='subsection17'></a>Generate documentation for a specific module

Invoke either

    ./sak.tcl doc html foo

or

    ./sak.tcl doc html modules/foo

to generate HTML for the documentation found in the module "foo"\. Instead of
__html__ any other supported format can be used here, of course\.

The generated formatted documentation will be placed into a directory "doc" in
the current working directory\.

## <a name='subsection18'></a>Generate documentation for all modules

Invoke the tool without a module name, i\.e\.

    ./sak.tcl doc html

to generate HTML for the documentation found in all modules\. Instead of
__html__ any other supported format can be used here, of course\.

The generated formatted documentation will be placed into a directory "doc" in
the current working directory\.

## <a name='subsection19'></a>Available output formats, help

Invoke the tool as

    ./sak.tcl help doc

to see the entire set of supported output formats which can be generated\.

## <a name='subsection20'></a>Validation without output

Note the special format __validate__\.

Using this value as the name of the format to generate forces the tool to simply
check that the documentation is syntactically correct, without generating actual
output\.

Invoke it as either

    ./sak.tcl doc validate (modules/)foo

or

    ./sak.tcl doc validate

to either check the packages of a specific module or check all of them\.

# <a name='section7'></a>Notes On Writing A Testsuite

While previous sections talked about running the testsuites for a module and the
packages therein, this has no meaning if the module in question has no
testsuites at all\.

This section gives a very basic overview on possible methodologies for writing
tests and testsuites\.

First there are "drudgery" tests\. Written to check absolutely basic assumptions
which should never fail\.

For example for a command FOO taking two arguments, three tests calling it with
zero, one, and three arguments\. The basic checks that the command fails if it
has not enough arguments, or too many\.

After that come the tests checking things based on our knowledge of the command,
about its properties and assumptions\. Some examples based on the graph
operations added during Google's Summer of Code 2009 are:

  - The BellmanFord command in struct::graph::ops takes a *startnode* as
    argument, and this node should be a node of the graph\. This equals one test
    case checking the behavior when the specified node is not a node of the
    graph\.

    This often gives rise to code in the implementation which explicitly checks
    the assumption and throws an understandable error, instead of letting the
    algorithm fail later in some weird non\-deterministic way\.

    It is not always possible to do such checks\. The graph argument for example
    is just a command in itself, and while we expect it to exhibit a certain
    interface, i\.e\. a set of sub\-commands aka methods, we cannot check that it
    has them, except by actually trying to use them\. That is done by the
    algorithm anyway, so an explicit check is just overhead we can get by
    without\.

  - IIRC one of the distinguishing characteristic of either BellmanFord and/or
    Johnson is that they are able to handle negative weights\. Whereas Dijkstra
    requires positive weights\.

    This induces \(at least\) three testcases \.\.\. Graph with all positive weights,
    all negative, and a mix of positive and negative weights\. Thinking further
    does the algorithm handle the weight __0__ as well ? Another test case,
    or several, if we mix zero with positive and negative weights\.

  - The two algorithms we are currently thinking about are about distances
    between nodes, and distance can be 'Inf'inity, i\.e\. nodes may not be
    connected\. This means that good test cases are

      1. Strongly connected graph

      1. Connected graph

      1. Disconnected graph\.

    At the extremes of strongly connected and disconnected we have the fully
    connected graphs and graphs without edges, only nodes, i\.e\. completely
    disconnected\.

  - IIRC both of the algorithms take weighted arcs, and fill in a default if
    arcs are left unweighted in the input graph\.

    This also induces three test cases:

      1. Graph will all arcs with explicit weights\.

      1. Graph without weights at all\.

      1. Graph with mixture of weighted and unweighted graphs\.

What was described above via examples is called *black\-box* testing\. Test
cases are designed and written based on the developer's knowledge of the
properties of the algorithm and its inputs, without referencing a particular
implementation\.

Going further, a complement to *black\-box* testing is *white\-box*\. For this
we know the implementation of the algorithm, we look at it and design our tests
cases so that they force the code through all possible paths in the
implementation\. Wherever a decision is made we have a test case forcing a
specific direction of the decision, for all possible combinations and
directions\. It is easy to get a combinatorial explosion in the number of needed
test\-cases\.

In practice I often hope that the black\-box tests I have made are enough to
cover all the paths, obviating the need for white\-box tests\.

The above should be enough to make it clear that writing tests for an algorithm
takes at least as much time as coding the algorithm, and often more time\. Much
more time\. See for example also
[http://sqlite\.org/testing\.html](http://sqlite\.org/testing\.html), a writeup
on how the Sqlite database engine is tested\. Another article of interest might
be
[https://www\.researchgate\.net/publication/298896236](https://www\.researchgate\.net/publication/298896236)\.
While geared to a particular numerical algorithm it still shows that even a
simple\-looking algorithm can lead to an incredible number of test cases\.

An interesting connection is to documentation\. In one direction, the properties
checked with black\-box testing are exactly the properties which should be
documented in the algorithm's man page\. And conversely, the documentation of the
properties of an algorithm makes a good reference to base the black\-box tests
on\.

In practice test cases and documentation often get written together,
cross\-influencing each other\. And the actual writing of test cases is a mix of
black and white box, possibly influencing the implementation while writing the
tests\. Like writing a test for a condition like *startnode not in input graph*
serving as reminder to put a check for this condition into the code\.

# <a name='section8'></a>Installation Tooling

A last thing to consider when adding a new package to the collection is
installation\.

How to *use* the "installer\.tcl" script is documented in *[Tcllib \- The
Installer's Guide](tcllib\_installer\.md)*\.

Here we document how to extend said installer so that it may install new
package\(s\) and/or application\(s\)\.

In most cases only a single file has to be modified, the
"support/installation/modules\.tcl" holding one command per module and
application to install\.

The relevant commands are:

  - <a name='1'></a>__[Module](\.\./\.\./\.\./index\.md\#module)__ *name* *code\-action* *doc\-action* *example\-action*

    Install the packages of module *name*, found in "modules/*name*"\.

    The *code\-action* is responsible for installing the packages and their
    index\. The system currently provides

      * __\_tcl__

        Copy all "\.tcl" files found in "modules/*name*" into the installation\.

      * __\_tcr__

        As __\_tcl__, copy the "\.tcl" files found in the subdirectories of
        "modules/*name*" as well\.

      * __\_tci__

        As __\_tcl__, and copy the "tclIndex\.tcl" file as well\.

      * __\_msg__

        As __\_tcl__, and copy the subdirectory "msgs" as well\.

      * __\_doc__

        As __\_tcl__, and copy the subdirectory "mpformats" as well\.

      * __\_tex__

        As __\_tcl__, and copy "\.tex" files as well\.

    The *doc\-action* is responsible for installing the package documentation\.
    The system currently provides

      * __\_null__

        No documentation available, do nothing\.

      * __\_man__

        Process the "\.man" files found in "modules/*name*" and install the
        results \(nroff and/or HTML\) in the proper location, as given to the
        installer\.

        This is actually a fallback, normally the installer uses the pre\-made
        formatted documentation found under "idoc"\.

    The *example\-action* is responsible for installing the examples\. The
    system currently provides

      * __\_null__

        No examples available, do nothing\.

      * __\_exa__

        Copy the the directory "examples/*name*" recursively to the install
        location for examples\.

  - <a name='2'></a>__[Application](\.\./\.\./\.\./index\.md\#application)__ *name*

    Install the application with *name*, found in "apps"\.

  - <a name='3'></a>__Exclude__ *name*

    This command signals to the installer which of the listed modules to *not*
    install\. I\.e\. they name the deprecated modules of Tcllib\.

If, and only if the above actions are not suitable for the new module then a
second file has to be modified, "support/installation/actions\.tcl"\.

This file contains the implementations of the available actions, and is the
place where any custom action needed to handle the special circumstances of
module has to be added\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/devdoc/tcllib_installer.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340

[//000000001]: # (tcllib\_install\_guide \- )
[//000000002]: # (Generated from file 'tcllib\_installer\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (tcllib\_install\_guide\(n\) 1 tcllib "")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

tcllib\_install\_guide \- Tcllib \- The Installer's Guide

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Requisites](#section2)

      - [Tcl](#subsection1)

      - [Critcl](#subsection2)

  - [Build & Installation Instructions](#section3)

      - [Installing on Unix](#subsection3)

      - [Installing on Windows](#subsection4)

      - [Critcl & Accelerators](#subsection5)

      - [Tooling](#subsection6)

# <a name='description'></a>DESCRIPTION

Welcome to Tcllib, the Tcl Standard Library\. Note that Tcllib is not a package
itself\. It is a collection of \(semi\-independent\)
*[Tcl](\.\./\.\./\.\./index\.md\#tcl)* packages that provide utility functions
useful to a large collection of Tcl programmers\.

The audience of this document is anyone wishing to build and install the
packages found in Tcllib, for either themselves, or others\.

For developers intending to work on the packages themselves we additionally
provide

  1. *[Tcllib \- The Developer's Guide](tcllib\_devguide\.md)*\.

Please read *[Tcllib \- How To Get The Sources](tcllib\_sources\.md)* first,
if that was not done already\. Here we assume that the sources are already
available in a directory of your choice\.

# <a name='section2'></a>Requisites

Before Tcllib can be build and used a number of requisites must be installed\.
These are:

  1. The scripting language Tcl\. For details see [Tcl](#subsection1)\.

  1. Optionally, the __critcl__ package \(C embedding\) for
     __[Tcl](\.\./\.\./\.\./index\.md\#tcl)__\. For details see __CriTcl__\.

This list assumes that the machine where Tcllib is to be installed is
essentially clean\. Of course, if parts of the dependencies listed below are
already installed the associated steps can be skipped\. It is still recommended
to read their sections though, to validate that the dependencies they talk about
are indeed installed\.

## <a name='subsection1'></a>Tcl

As we are installing a number of Tcl packages and applications it should be
pretty much obvious that a working installation of Tcl itself is needed, and I
will not belabor the point\.

Out of the many possibilities use whatever you are comfortable with, as long as
it provides at the very least Tcl 8\.2, or higher\. This may be a Tcl installation
provided by your operating system distribution, from a distribution\-independent
vendor, or built by yourself\.

*Note* that the packages in Tcllib have begun to require 8\.4, 8\.5, and even
8\.6\. Older versions of Tcl will not be able to use such packages\. Trying to use
them will result in *package not found* errors, as their package index files
will not register them in versions of the core unable to use them\.

Myself, I used \(and still use\) [ActiveState's](http://www\.activestate\.com)
ActiveTcl 8\.5 distribution during development, as I am most familiar with it\.

*\(Disclosure: I, Andreas Kupries, worked for ActiveState until 2016,
maintaining ActiveTcl and TclDevKit for them\)\.*\. I am currently working for
SUSE Software Canada ULC, although not in Tcl\-related areas\.

This distribution can be found at
[http://www\.activestate\.com/activetcl](http://www\.activestate\.com/activetcl)\.
Retrieve the archive of ActiveTcl 8\.5 \(or higher\) for your platform and install
it as directed by ActiveState\.

For those wishing to build and install Tcl on their own, the relevant sources
can be found at

  - Tcl

    [http://core\.tcl\-lang\.org/tcl/](http://core\.tcl\-lang\.org/tcl/)

together with the necessary instructions on how to build it\.

If there are problems with building, installing, or using Tcl, please file a
ticket against *[Tcl](\.\./\.\./\.\./index\.md\#tcl)*, or the vendor of your
distribution, and *not* *[Tcllib](\.\./\.\./\.\./index\.md\#tcllib)*\.

## <a name='subsection2'></a>Critcl

The __critcl__ tool is an *optional* dependency\.

It is only required when trying to build the C\-based *accelerators* for a
number of packages, as explained in [Critcl & Accelerators](#subsection5)

Tcllib's build system looks for it in the , using the name __critcl__\. This
is for Unix\. On Windows on the other hand the search is more complex\. First we
look for a proper application __critcl\.exe__\. When that is not found we look
for a combination of interpreter \(__tclkitsh\.exe__, __tclsh\.exe__\) and
starkit \(__critcl\.kit__, __critcl__\) instead\. *Note* that the choice
of starkit can be overriden via the environment variable \.

Tcllib requires Critcl version 2 or higher\.

The github repository providing releases of version 2 and higher, and the
associated sources, can be found at
[http://andreas\-kupries\.github\.com/critcl](http://andreas\-kupries\.github\.com/critcl)\.

Any branch of the repository can be used \(if not using the prebuild starkit or
starpack\), although the use of the stable branch *master* is recommended\.

At the above url is also an explanation on how to build and install Critcl,
including a list of its dependencies\.

Its instructions will not be repeated here\. If there are problems with these
directions please file a ticket against the *Critcl* project, and not Tcllib\.

# <a name='section3'></a>Build & Installation Instructions

As Tcllib is mainly a bundle of packages written in pure Tcl building it is the
same as installing it\. The exceptions to this have their own subsection,
[Critcl & Accelerators](#subsection5), later on\.

Before that however comes the standard case, differentiated by the platforms
with material differences in the instruction, i\.e\. *Unix*\-like, versus
*Windows*\.

Regarding the latter it should also be noted that it is possible set up an
*Unix*\-like environment using projects like *MSYS*, *Cygwin*, and others\.
In that case the user has the choice of which instructions to follow\.

Regardless of environment or platform, a suitable
*[Tcl](\.\./\.\./\.\./index\.md\#tcl)* has to be installed, and its __tclsh__
should be placed on the \(*Unix*\) or associated with "\.tcl" files
\(*Windows*\)\.

## <a name='subsection3'></a>Installing on Unix

For *Unix*\-like environments Tcllib comes with the standard set of files to
make

    ./configure
    make install

a suitable way of installing it\. This is a standard non\-interactive install
automatically figuring out where to place everything, i\.e\. packages,
applications, and the manpages\.

To get a graphical installer invoke

    ./installer.tcl

instead\.

## <a name='subsection4'></a>Installing on Windows

In a Windows environment we have the __installer\.tcl__ script to perform
installation\.

If the desired __tclsh__ is associated "\.tcl" files then double\-clicking /
opening the __installer\.tcl__ is enough to invoke it in graphical mode\. This
assumes that *[Tk](\.\./\.\./\.\./index\.md\#tk)* is installed and available as
well\.

Without *[Tk](\.\./\.\./\.\./index\.md\#tk)* the only way to invoke the installer
are to open a DOS window, i\.e\. __cmd\.exe__, and then to invoke

    ./installer.tcl

inside it\.

## <a name='subsection5'></a>Critcl & Accelerators

While the majority of Tcllib consists of packages written in pure Tcl a number
of packages also have *accelerators* associated with them\. These are
__critcl__\-based C packages whose use will boost the performance of the
packages using them\. These accelerators are optional, and they are not built by
default\. If they are built according to the instructions below then they will
also be installed as well\.

To build the accelerators the normally optional dependency on __critcl__
becomes required\.

To build and install Tcllib with the accelerators in a Unix\-like environment
invoke:

    ./configure
    make critcl  # Builds the shared library and package holding
                 # the accelerators, tcllibc
    make install # Installs all packages, including the new tcllibc.

The underlying tool is "sak\.tcl" in the toplevel directory of Tcllib and the
command __make critcl__ is just a wrapper around

    ./sak.tcl critcl

Therefore in a Windows environment instead invoke

    ./sak.tcl critcl
    ./installer.tcl

from within a DOS window, i\.e\. __cmd\.exe__\.

## <a name='subsection6'></a>Tooling

The core of Tcllib's build system is the script "installer\.tcl" found in the
toplevel directory of a checkout or release\.

The

    configure ; make install

setup available to developers on Unix\-like systems is just a wrapper around it\.
To go beyond the standard embodied in the wrapper it is necessary to directly
invoke this script\.

On Windows system using it directly is the only way to invoke it\.

For basic help invoke it as

    ./installer.tcl -help

This will print a short list of all the available options to the standard output
channel\.

The commands associated with the various *install* targets in the
*Makefile\.in* for Unix can be used as additional examples on how to use this
tool as well\.

The installer can operate in GUI and CLI modes\. By default it chooses the mode
automatically, based on if the Tcl package
__[Tk](\.\./\.\./\.\./index\.md\#tk)__ can be used or not\. The option
__\-no\-gui__ can be used to force CLI mode\.

Note that it is possible to specify options on the command line even if the
installer ultimatively selects GUI mode\. In that case the hardwired defaults and
the options determine the data presented to the user for editing\.

The installer will select a number of defaults for the locations of packages,
examples, and documentation, and also the format of the documentation\. The user
can overide these defaults in the GUI, or by specifying additional options\. The
defaults depend on the platform detected \(Unix/Windows\) and on the __tclsh__
executable used to run the installer\.

*Options*

  - __\-help__

    Show the list of options explained here on the standard output channel and
    exit\.

  - __\+excluded__

    Include deprecated packages in the installation\.

  - __\-no\-gui__

    Force command line operation of the installer

  - __\-no\-wait__

    In CLI mode the installer will by default ask the user to confirm that the
    chosen configuration \(destination paths, things to install\) is correct
    before performing any action\. Using this option causes the installer to skip
    this query and immediately jump to installation\.

  - __\-app\-path__ *path*

  - __\-example\-path__ *path*

  - __\-html\-path__ *path*

  - __\-nroff\-path__ *path*

  - __\-pkg\-path__ *path*

    Declare the destination paths for the applications, examples, html
    documentation, nroff manpages, and packages\. The defaults are derived from
    the location of the __tclsh__ used to run the installer\.

  - __\-dry\-run__

  - __\-simulate__

    Run the installer without modifying the destination directories\.

  - __\-apps__

  - __\-no\-apps__

  - __\-examples__

  - __\-no\-examples__

  - __\-pkgs__

  - __\-no\-pkgs__

  - __\-html__

  - __\-no\-html__

  - __\-nroff__

  - __\-no\-nroff__

    \(De\)activate the installation of applications, examples, packages, html
    documentation, and nroff manpages\.

    Applications, examples, and packages are installed by default\.

    On Windows the html documentation is installed by default\.

    On Unix the nroff manpages are installed by default\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/devdoc/tcllib_license.md.

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

[//000000001]: # (tcllib\_license \- )
[//000000002]: # (Generated from file 'tcllib\_license\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (tcllib\_license\(n\) 1 tcllib "")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

tcllib\_license \- Tcllib \- License

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [License](#section2)

# <a name='description'></a>DESCRIPTION

Welcome to Tcllib, the Tcl Standard Library\. Note that Tcllib is not a package
itself\. It is a collection of \(semi\-independent\)
*[Tcl](\.\./\.\./\.\./index\.md\#tcl)* packages that provide utility functions
useful to a large collection of Tcl programmers\.

The collection is under the BSD license\.

# <a name='section2'></a>License

This software is copyrighted by Ajuba Solutions and other parties\. The following
terms apply to all files associated with the software unless explicitly
disclaimed in individual files\.

The authors hereby grant permission to use, copy, modify, distribute, and
license this software and its documentation for any purpose, provided that
existing copyright notices are retained in all copies and that this notice is
included verbatim in any distributions\. No written agreement, license, or
royalty fee is required for any of the authorized uses\. Modifications to this
software may be copyrighted by their authors and need not follow the licensing
terms described here, provided that the new terms are clearly indicated on the
first page of each file where they apply\.

IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT,
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE
AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE\.

THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON\-INFRINGEMENT\. THIS SOFTWARE IS PROVIDED ON AN "AS
IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS\.

GOVERNMENT USE: If you are acquiring this software on behalf of the U\.S\.
government, the Government shall have only "Restricted Rights" in the software
and related documentation as defined in the Federal Acquisition Regulations
\(FARs\) in Clause 52\.227\.19 \(c\) \(2\)\. If you are acquiring the software on behalf
of the Department of Defense, the software shall be classified as "Commercial
Computer Software" and the Government shall have only "Restricted Rights" as
defined in Clause 252\.227\-7013 \(c\) \(1\) of DFARs\. Notwithstanding the foregoing,
the authors grant the U\.S\. Government and others acting in its behalf permission
to use and distribute the software in accordance with the terms specified in
this license\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































Deleted embedded/md/tcllib/files/devdoc/tcllib_releasemgr.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

[//000000001]: # (tcllib\_releasemgr \- )
[//000000002]: # (Generated from file 'tcllib\_releasemgr\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (tcllib\_releasemgr\(n\) 1 tcllib "")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

tcllib\_releasemgr \- Tcllib \- The Release Manager's Guide

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Tools](#section2)

  - [Tasks](#section3)

      - [Start a release candidate](#subsection1)

      - [Ready the candidate](#subsection2)

      - [Make it official](#subsection3)

      - [Distribute the release](#subsection4)

# <a name='description'></a>DESCRIPTION

Welcome to Tcllib, the Tcl Standard Library\. Note that Tcllib is not a package
itself\. It is a collection of \(semi\-independent\)
*[Tcl](\.\./\.\./\.\./index\.md\#tcl)* packages that provide utility functions
useful to a large collection of Tcl programmers\.

The audience of this document is the release manager for Tcllib, their deputies,
and anybody else interested in the task of creating an official release of
Tcllib for distribution\.

Please read *[Tcllib \- How To Get The Sources](tcllib\_sources\.md)* first,
if that was not done already\. Here we assume that the sources are already
available in a directory of your choice\.

# <a name='section2'></a>Tools

The "sak\.tcl" script in the toplevel directory of a Tcllib checkout is the one
tool used by the release manager to perform its [Tasks](#section3)\.

The main commands to be used are

    sak.tcl validate
    sak.tcl test run
    sak.tcl review
    sak.tcl readme
    sak.tcl localdoc
    sak.tcl release

More detail will be provided in the explanations of the various
[Tasks](#section3)\.

# <a name='section3'></a>Tasks

## <a name='subsection1'></a>Start a release candidate

todo: open a candidate for release

## <a name='subsection2'></a>Ready the candidate

todo: test, validate and check that the candidate is worthy of release fix
testsuites, possibly fix packages, documentation regenerate docs coordinate with
package maintainers wrt fixes big thing: going over the packages, classify
changes since last release to generate a nice readme\.

## <a name='subsection3'></a>Make it official

todo: finalize release, make candidate official

## <a name='subsection4'></a>Distribute the release

With the release made it has to be published and the world notified of its
existence\.

  1. Create a proper fossil event for the release, via
     [http://core\.tcl\-lang\.org/tcllib/eventedit](http://core\.tcl\-lang\.org/tcllib/eventedit)\.

     An [existing
     event](http://core\.tcl\-lang\.org/tcllib/event/dac0ddcd2e990234143196b4dc438fe01e7b9817)
     should be used as template\.

  1. Update a number of web locations:

       1) [Home
          page](http://core\.tcl\-lang\.org/tcllib/doc/trunk/embedded/index\.md)

       1) [Downloads](http://core\.tcl\-lang\.org/tcllib/wiki?name=Downloads)

       1) [Past
          Releases](http://core\.tcl\-lang\.org/tcllib/wiki?name=Past\+Releases)

       1) [http://www\.tcl\-lang\.org/home/release\.txt](http://www\.tcl\-lang\.org/home/release\.txt)

       1) [http://www\.tcl\-lang\.org/software/tcllib/\*\.tml](http://www\.tcl\-lang\.org/software/tcllib/\*\.tml)

       1) [http://wiki\.tcl\-lang\.org/page/Tcllib](http://wiki\.tcl\-lang\.org/page/Tcllib)

     The first location maps to the file "embedded/index\.md" in the repository
     itself, as such it can edited as part of the release process\. This is where
     reference to the new fossil event is added, as the new current release\.

     The next two locations are in the fossil tcllib wiki and require admin or
     wiki write permissions for
     [http://core\.tcl\-lang\.org/tcllib](http://core\.tcl\-lang\.org/tcllib)\.

     The last two locations require ssh access to
     [http://www\.tcl\-lang\.org](http://www\.tcl\-lang\.org) and permission to
     edit files in the web area\.

  1. \*\*\*TODO\*\*\* mailing lists and other places to send notes to\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































Deleted embedded/md/tcllib/files/devdoc/tcllib_sources.md.

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

[//000000001]: # (tcllib\_sources \- )
[//000000002]: # (Generated from file 'tcllib\_sources\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (tcllib\_sources\(n\) 1 tcllib "")

<hr> [ <a href="../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../toc.md">Table Of Contents</a> &#124; <a
href="../../../index.md">Keyword Index</a> &#124; <a
href="../../../toc0.md">Categories</a> &#124; <a
href="../../../toc1.md">Modules</a> &#124; <a
href="../../../toc2.md">Applications</a> ] <hr>

# NAME

tcllib\_sources \- Tcllib \- How To Get The Sources

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Source Location](#section2)

  - [Retrieval](#section3)

  - [Source Code Management](#section4)

# <a name='description'></a>DESCRIPTION

Welcome to Tcllib, the Tcl Standard Library\. Note that Tcllib is not a package
itself\. It is a collection of \(semi\-independent\)
*[Tcl](\.\./\.\./\.\./index\.md\#tcl)* packages that provide utility functions
useful to a large collection of Tcl programmers\.

The audience of this document is anyone wishing to either have just a look at
Tcllib's source code, or build the packages, or to extend and modify them\.

For builders and developers we additionally provide

  1. *[Tcllib \- The Installer's Guide](tcllib\_installer\.md)*\.

  1. *[Tcllib \- The Developer's Guide](tcllib\_devguide\.md)*\.

respectively\.

# <a name='section2'></a>Source Location

The official repository for Tcllib can be found at
[http://core\.tcl\-lang\.org/tcllib](http://core\.tcl\-lang\.org/tcllib)

# <a name='section3'></a>Retrieval

Assuming that you simply wish to look at the sources, or build a specific
revision, the easiest way of retrieving it is to:

  1. Log into this site, as "anonymous", using the semi\-random password in the
     captcha\.

  1. Go to the "Timeline"\.

  1. Choose the revision you wish to have\.

  1. Follow its link to its detailed information page\.

  1. On that page, choose either the "ZIP" or "Tarball" link to get a copy of
     this revision in the format of your choice\.

# <a name='section4'></a>Source Code Management

For the curious \(or a developer\-to\-be\), the sources are managed by the [Fossil
SCM](http://www\.fossil\-scm\.org)\. Binaries for popular platforms can be found
directly at its [download page](http://www\.fossil\-scm\.org/download\.html)\.

With that tool available the full history can be retrieved via:

    fossil clone  http://core.tcl-lang.org/tcllib  tcllib.fossil

followed by

    mkdir tcllib
    cd tcllib
    fossil open ../tcllib.fossil

to get a checkout of the head of the trunk\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































Deleted embedded/md/tcllib/files/modules/aes/aes.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201

[//000000001]: # (aes \- Advanced Encryption Standard \(AES\))
[//000000002]: # (Generated from file 'aes\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2012\-2014, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (aes\(n\) 1\.2\.1 tcllib "Advanced Encryption Standard \(AES\)")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

aes \- Implementation of the AES block cipher

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PROGRAMMING INTERFACE](#section3)

  - [MODES OF OPERATION](#section4)

  - [EXAMPLES](#section5)

  - [REFERENCES](#section6)

  - [AUTHORS](#section7)

  - [Bugs, Ideas, Feedback](#section8)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require aes ?1\.2\.1?  

[__::aes::aes__ ?*\-mode \[ecb&#124;cbc\]*? ?*\-dir \[encrypt&#124;decrypt\]*? *\-key keydata* ?*\-iv vector*? ?*\-hex*? ?*\-out channel*? ?*\-chunksize size*? \[ *\-in channel* &#124; ?__\-\-__? *data* \]](#1)  
[__::aes::Init__ *mode* *keydata* *iv*](#2)  
[__::aes::Encrypt__ *Key* *data*](#3)  
[__::aes::Decrypt__ *Key* *data*](#4)  
[__::aes::Reset__ *Key* *iv*](#5)  
[__::aes::Final__ *Key*](#6)  

# <a name='description'></a>DESCRIPTION

This is an implementation in Tcl of the Advanced Encryption Standard \(AES\) as
published by the U\.S\. National Institute of Standards and Technology \[1\]\. AES is
a 128\-bit block cipher with a variable key size of 128, 192 or 256 bits\. This
implementation supports ECB and CBC modes\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::aes::aes__ ?*\-mode \[ecb&#124;cbc\]*? ?*\-dir \[encrypt&#124;decrypt\]*? *\-key keydata* ?*\-iv vector*? ?*\-hex*? ?*\-out channel*? ?*\-chunksize size*? \[ *\-in channel* &#124; ?__\-\-__? *data* \]

    Perform the __aes__ algorithm on either the data provided by the
    argument or on the data read from the *\-in* channel\. If an *\-out*
    channel is given then the result will be written to this channel\.

    The *\-key* option must be given\. This parameter takes a binary string of
    either 16, 24 or 32 bytes in length and is used to generate the key
    schedule\.

    The *\-mode* and *\-dir* options are optional and default to cbc mode and
    encrypt respectively\. The initialization vector *\-iv* takes a 16 byte
    binary argument which defaults to all zeros\. See [MODES OF
    OPERATION](#section4) for more about available modes and their uses\.

    AES is a 128\-bit block cipher\. This means that the data must be provided in
    units that are a multiple of 16 bytes\.

# <a name='section3'></a>PROGRAMMING INTERFACE

Internal state is maintained in an opaque structure that is returned from the
__Init__ function\. In ECB mode the state is not affected by the input but
for CBC mode some input dependent state is maintained and may be reset by
calling the __Reset__ function with a new initialization vector value\.

  - <a name='2'></a>__::aes::Init__ *mode* *keydata* *iv*

    Construct a new AES key schedule using the specified key data and the given
    initialization vector\. The initialization vector is not used with ECB mode
    but is important for CBC mode\. See [MODES OF OPERATION](#section4) for
    details about cipher modes\.

  - <a name='3'></a>__::aes::Encrypt__ *Key* *data*

    Use a prepared key acquired by calling __Init__ to encrypt the provided
    data\. The data argument should be a binary array that is a multiple of the
    AES block size of 16 bytes\. The result is a binary array the same size as
    the input of encrypted data\.

  - <a name='4'></a>__::aes::Decrypt__ *Key* *data*

    Decipher data using the key\. Note that the same key may be used to encrypt
    and decrypt data provided that the initialization vector is reset
    appropriately for CBC mode\.

  - <a name='5'></a>__::aes::Reset__ *Key* *iv*

    Reset the initialization vector\. This permits the programmer to re\-use a key
    and avoid the cost of re\-generating the key schedule where the same key data
    is being used multiple times\.

  - <a name='6'></a>__::aes::Final__ *Key*

    This should be called to clean up resources associated with *Key*\. Once
    this function has been called the key may not be used again\.

# <a name='section4'></a>MODES OF OPERATION

  - Electronic Code Book \(ECB\)

    ECB is the basic mode of all block ciphers\. Each block is encrypted
    independently and so identical plain text will produce identical output when
    encrypted with the same key\. Any encryption errors will only affect a single
    block however this is vulnerable to known plaintext attacks\.

  - Cipher Block Chaining \(CBC\)

    CBC mode uses the output of the last block encryption to affect the current
    block\. An initialization vector of the same size as the cipher block size is
    used to handle the first block\. The initialization vector should be chosen
    randomly and transmitted as the first block of the output\. Errors in
    encryption affect the current block and the next block after which the
    cipher will correct itself\. CBC is the most commonly used mode in software
    encryption\. This is the default mode of operation for this module\.

# <a name='section5'></a>EXAMPLES

    % set nil_block [string repeat \\0 16]
    % aes::aes -hex -mode cbc -dir encrypt -key $nil_block $nil_block
    66e94bd4ef8a2c3b884cfa59ca342b2e

    set Key [aes::Init cbc $sixteen_bytes_key_data $sixteen_byte_iv]
    append ciphertext [aes::Encrypt $Key $plaintext]
    append ciphertext [aes::Encrypt $Key $additional_plaintext]
    aes::Final $Key

# <a name='section6'></a>REFERENCES

  1. "Advanced Encryption Standard", Federal Information Processing Standards
     Publication 197, 2001
     \([http://csrc\.nist\.gov/publications/fips/fips197/fips\-197\.pdf](http://csrc\.nist\.gov/publications/fips/fips197/fips\-197\.pdf)\)

# <a name='section7'></a>AUTHORS

Thorsten Schloermann, Pat Thoyts

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *aes* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[blowfish\(n\)](\.\./blowfish/blowfish\.md), [des\(n\)](\.\./des/des\.md),
[md5\(n\)](\.\./md5/md5\.md), [sha1\(n\)](\.\./sha1/sha1\.md)

# <a name='keywords'></a>KEYWORDS

[aes](\.\./\.\./\.\./\.\./index\.md\#aes), [block
cipher](\.\./\.\./\.\./\.\./index\.md\#block\_cipher), [data
integrity](\.\./\.\./\.\./\.\./index\.md\#data\_integrity),
[encryption](\.\./\.\./\.\./\.\./index\.md\#encryption),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>  
Copyright &copy; 2012\-2014, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/amazon-s3/S3.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514

[//000000001]: # (S3 \- Amazon S3 Web Service Utilities)
[//000000002]: # (Generated from file 'S3\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (2006,2008 Darren New\. All Rights Reserved\. See LICENSE\.TXT for terms\.)
[//000000004]: # (S3\(n\) 1\.0\.3 tcllib "Amazon S3 Web Service Utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

S3 \- Amazon S3 Web Service Interface

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [ERROR REPORTING](#section2)

  - [COMMANDS](#section3)

  - [LOW LEVEL COMMANDS](#section4)

  - [HIGH LEVEL COMMANDS](#section5)

  - [LIMITATIONS](#section6)

  - [USAGE SUGGESTIONS](#section7)

  - [FUTURE DEVELOPMENTS](#section8)

  - [TLS Security Considerations](#section9)

  - [Bugs, Ideas, Feedback](#section10)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require S3 ?1\.0\.3?  
package require sha1 1\.0  
package require md5 2\.0  
package require base64 2\.3  
package require xsxp 1\.0  

[__S3::Configure__ ?__\-reset__ *boolean*? ?__\-retries__ *integer*? ?__\-accesskeyid__ *idstring*? ?__\-secretaccesskey__ *idstring*? ?__\-service\-access\-point__ *FQDN*? ?__\-use\-tls__ *boolean*? ?__\-default\-compare__ *always&#124;never&#124;exists&#124;missing&#124;newer&#124;date&#124;checksum&#124;different*? ?__\-default\-separator__ *string*? ?__\-default\-acl__ *private&#124;public\-read&#124;public\-read\-write&#124;authenticated\-read&#124;keep&#124;calc*? ?__\-default\-bucket__ *bucketname*?](#1)  
[__S3::SuggestBucket__ ?*name*?](#2)  
[__S3::REST__ *dict*](#3)  
[__S3::ListAllMyBuckets__ ?__\-blocking__ *boolean*? ?__\-parse\-xml__ *xmlstring*? ?__\-result\-type__ *REST&#124;xml&#124;pxml&#124;dict&#124;names&#124;owner*?](#4)  
[__S3::PutBucket__ ?__\-bucket__ *bucketname*? ?__\-blocking__ *boolean*? ?__\-acl__ *\{\}&#124;private&#124;public\-read&#124;public\-read\-write&#124;authenticated\-read*?](#5)  
[__S3::DeleteBucket__ ?__\-bucket__ *bucketname*? ?__\-blocking__ *boolean*?](#6)  
[__S3::GetBucket__ ?__\-bucket__ *bucketname*? ?__\-blocking__ *boolean*? ?__\-parse\-xml__ *xmlstring*? ?__\-max\-count__ *integer*? ?__\-prefix__ *prefixstring*? ?__\-delimiter__ *delimiterstring*? ?__\-result\-type__ *REST&#124;xml&#124;pxml&#124;names&#124;dict*?](#7)  
[__S3::Put__ ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-blocking__ *boolean*? ?__\-file__ *filename*? ?__\-content__ *contentstring*? ?__\-acl__ *private&#124;public\-read&#124;public\-read\-write&#124;authenticated\-read&#124;calc&#124;keep*? ?__\-content\-type__ *contenttypestring*? ?__\-x\-amz\-meta\-\*__ *metadatatext*? ?__\-compare__ *comparemode*?](#8)  
[__S3::Get__ ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-blocking__ *boolean*? ?__\-compare__ *comparemode*? ?__\-file__ *filename*? ?__\-content__ *contentvarname*? ?__\-timestamp__ *aws&#124;now*? ?__\-headers__ *headervarname*?](#9)  
[__S3::Head__ ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-blocking__ *boolean*? ?__\-dict__ *dictvarname*? ?__\-headers__ *headersvarname*? ?__\-status__ *statusvarname*?](#10)  
[__S3::GetAcl__ ?__\-blocking__ *boolean*? ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-result\-type__ *REST&#124;xml&#124;pxml*?](#11)  
[__S3::PutAcl__ ?__\-blocking__ *boolean*? ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-acl__ *new\-acl*?](#12)  
[__S3::Delete__ ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-blocking__ *boolean*? ?__\-status__ *statusvar*?](#13)  
[__S3::Push__ ?__\-bucket__ *bucketname*? __\-directory__ *directoryname* ?__\-prefix__ *prefixstring*? ?__\-compare__ *comparemode*? ?__\-x\-amz\-meta\-\*__ *metastring*? ?__\-acl__ *aclcode*? ?__\-delete__ *boolean*? ?__\-error__ *throw&#124;break&#124;continue*? ?__\-progress__ *scriptprefix*?](#14)  
[__S3::Pull__ ?__\-bucket__ *bucketname*? __\-directory__ *directoryname* ?__\-prefix__ *prefixstring*? ?__\-blocking__ *boolean*? ?__\-compare__ *comparemode*? ?__\-delete__ *boolean*? ?__\-timestamp__ *aws&#124;now*? ?__\-error__ *throw&#124;break&#124;continue*? ?__\-progress__ *scriptprefix*?](#15)  
[__S3::Toss__ ?__\-bucket__ *bucketname*? __\-prefix__ *prefixstring* ?__\-blocking__ *boolean*? ?__\-error__ *throw&#124;break&#124;continue*? ?__\-progress__ *scriptprefix*?](#16)  

# <a name='description'></a>DESCRIPTION

This package provides access to Amazon's Simple Storage Solution web service\.

As a quick summary, Amazon Simple Storage Solution provides a for\-fee web
service allowing the storage of arbitrary data as "resources" within "buckets"
online\. See [http://www\.amazonaws\.com/](http://www\.amazonaws\.com/) for
details on that system\. Access to the service is via HTTP \(SOAP or REST\)\. Much
of this documentation will not make sense if you're not familiar with the terms
and functionality of the Amazon S3 service\.

This package provides services for reading and writing the data items via the
REST interface\. It also provides some higher\-level operations\. Other packages in
the same distribution provide for even more functionality\.

Copyright 2006 Darren New\. All Rights Reserved\. NO WARRANTIES OF ANY TYPE ARE
PROVIDED\. COPYING OR USE INDEMNIFIES THE AUTHOR IN ALL WAYS\. This software is
licensed under essentially the same terms as Tcl\. See LICENSE\.txt for the terms\.

# <a name='section2'></a>ERROR REPORTING

The error reporting from this package makes use of $errorCode to provide more
details on what happened than simply throwing an error\. Any error caught by the
S3 package \(and we try to catch them all\) will return with an $errorCode being a
list having at least three elements\. In all cases, the first element will be
"S3"\. The second element will take on one of six values, with that element
defining the value of the third and subsequent elements\. S3::REST does not throw
an error, but rather returns a dictionary with the keys "error", "errorInfo",
and "errorCode" set\. This allows for reliable background use\. The possible
second elements are these:

  - usage

    The usage of the package is incorrect\. For example, a command has been
    invoked which requires the library to be configured before the library has
    been configured, or an invalid combination of options has been specified\.
    The third element of $errorCode supplies the name of the parameter that was
    wrong\. The fourth usually provides the arguments that were actually supplied
    to the throwing proc, unless the usage error isn't confined to a single
    proc\.

  - local

    Something happened on the local system which threw an error\. For example, a
    request to upload or download a file was made and the file permissions
    denied that sort of access\. The third element of $errorCode is the original
    $errorCode\.

  - socket

    Something happened with the socket\. It closed prematurely, or some other
    condition of failure\-to\-communicate\-with\-Amazon was detected\. The third
    element of $errorCode is the original $errorCode, or sometimes the message
    from fcopy, or \.\.\.?

  - remote

    The Amazon web service returned an error code outside the 2xx range in the
    HTTP header\. In other words, everything went as documented, except this
    particular case was documented not to work\. The third element is the
    dictionary returned from __::S3::REST__\. Note that S3::REST itself never
    throws this error, but just returns the dictionary\. Most of the higher\-level
    commands throw for convenience, unless an argument indicates they should
    not\. If something is documented as "not throwing an S3 remote error", it
    means a status return is set rather than throwing an error if Amazon returns
    a non\-2XX HTTP result code\.

  - notyet

    The user obeyed the documentation, but the author has not yet gotten around
    to implementing this feature\. \(Right now, only TLS support and sophisticated
    permissions fall into this category, as well as the S3::Acl command\.\)

  - xml

    The service has returned invalid XML, or XML whose schema is unexpected\. For
    the high\-level commands that accept service XML as input for parsing, this
    may also be thrown\.

# <a name='section3'></a>COMMANDS

This package provides several separate levels of complexity\.

  - The lowest level simply takes arguments to be sent to the service, sends
    them, retrieves the result, and provides it to the caller\. *Note:* This
    layer allows both synchronous and event\-driven processing\. It depends on the
    MD5 and SHA1 and base64 packages from Tcllib \(available at
    [http://core\.tcl\.tk/tcllib/](http://core\.tcl\.tk/tcllib/)\)\. Note that
    __S3::Configure__ is required for __S3::REST__ to work due to the
    authentication portion, so we put that in the "lowest level\."

  - The next layer parses the results of calls, allowing for functionality such
    as uploading only changed files, synchronizing directories, and so on\. This
    layer depends on the __TclXML__ package as well as the included
    __[xsxp](xsxp\.md)__ package\. These packages are package required
    when these more\-sophisticated routines are called, so nothing breaks if they
    are not correctly installed\.

  - Also included is a separate program that uses the library\. It provides code
    to parse $argv0 and $argv from the command line, allowing invocation as a
    tclkit, etc\. \(Not yet implmented\.\)

  - Another separate program provides a GUI interface allowing drag\-and\-drop and
    other such functionality\. \(Not yet implemented\.\)

  - Also built on this package is the OddJob program\. It is a separate program
    designed to allow distribution of computational work units over Amazon's
    Elastic Compute Cloud web service\.

The goal is to have at least the bottom\-most layers implemented in pure Tcl
using only that which comes from widely\-available sources, such as Tcllib\.

# <a name='section4'></a>LOW LEVEL COMMANDS

These commands do not require any packages not listed above\. They talk directly
to the service, or they are utility or configuration routines\. Note that the
"xsxp" package was written to support this package, so it should be available
wherever you got this package\.

  - <a name='1'></a>__S3::Configure__ ?__\-reset__ *boolean*? ?__\-retries__ *integer*? ?__\-accesskeyid__ *idstring*? ?__\-secretaccesskey__ *idstring*? ?__\-service\-access\-point__ *FQDN*? ?__\-use\-tls__ *boolean*? ?__\-default\-compare__ *always&#124;never&#124;exists&#124;missing&#124;newer&#124;date&#124;checksum&#124;different*? ?__\-default\-separator__ *string*? ?__\-default\-acl__ *private&#124;public\-read&#124;public\-read\-write&#124;authenticated\-read&#124;keep&#124;calc*? ?__\-default\-bucket__ *bucketname*?

    There is one command for configuration, and that is __S3::Configure__\.
    If called with no arguments, it returns a dictionary of key/value pairs
    listing all current settings\. If called with one argument, it returns the
    value of that single argument\. If called with two or more arguments, it must
    be called with pairs of arguments, and it applies the changes in order\.
    There is only one set of configuration information per interpreter\.

    The following options are accepted:

      * __\-reset__ *boolean*

        By default, false\. If true, any previous changes and any changes on the
        same call before the reset option will be returned to default values\.

      * __\-retries__ *integer*

        Default value is 3\. If Amazon returns a 500 error, a retry after an
        exponential backoff delay will be tried this many times before finally
        throwing the 500 error\. This applies to each call to __S3::REST__
        from the higher\-level commands, but not to __S3::REST__ itself\. That
        is, __S3::REST__ will always return httpstatus 500 if that's what it
        receives\. Functions like __S3::Put__ will retry the PUT call, and
        will also retry the GET and HEAD calls used to do content comparison\.
        Changing this to 0 will prevent retries and their associated delays\. In
        addition, socket errors \(i\.e\., errors whose errorCode starts with "S3
        socket"\) will be similarly retried after backoffs\.

      * __\-accesskeyid__ *idstring*

      * __\-secretaccesskey__ *idstring*

        Each defaults to an empty string\. These must be set before any calls are
        made\. This is your S3 ID\. Once you sign up for an account, go to
        [http://www\.amazonaws\.com/](http://www\.amazonaws\.com/), sign in, go
        to the "Your Web Services Account" button, pick "AWS Access
        Identifiers", and your access key ID and secret access keys will be
        available\. All __S3::REST__ calls are authenticated\. Blame Amazon
        for the poor choice of names\.

      * __\-service\-access\-point__ *FQDN*

        Defaults to "s3\.amazonaws\.com"\. This is the fully\-qualified domain name
        of the server to contact for __S3::REST__ calls\. You should probably
        never need to touch this, unless someone else implements a compatible
        service, or you wish to test something by pointing the library at your
        own service\.

      * __\-slop\-seconds__ *integer*

        When comparing dates between Amazon and the local machine, two dates
        within this many seconds of each other are considered the same\. Useful
        for clock drift correction, processing overhead time, and so on\.

      * __\-use\-tls__ *boolean*

        Defaults to false\. This is not yet implemented\. If true,
        __S3::REST__ will negotiate a TLS connection to Amazon\. If false,
        unencrypted connections are used\.

      * __\-bucket\-prefix__ *string*

        Defaults to "TclS3"\. This string is used by
        __S3::SuggestBucketName__ if that command is passed an empty string
        as an argument\. It is used to distinguish different applications using
        the Amazon service\. Your application should always set this to keep from
        interfering with the buckets of other users of Amazon S3 or with other
        buckets of the same user\.

      * __\-default\-compare__ *always&#124;never&#124;exists&#124;missing&#124;newer&#124;date&#124;checksum&#124;different*

        Defaults to "always\." If no \-compare is specified on __S3::Put__,
        __S3::Get__, or __S3::Delete__, this comparison is used\. See
        those commands for a description of the meaning\.

      * __\-default\-separator__ *string*

        Defaults to "/"\. This is currently unused\. It might make sense to use
        this for __S3::Push__ and __S3::Pull__, but allowing resources
        to have slashes in their names that aren't marking directories would be
        problematic\. Hence, this currently does nothing\.

      * __\-default\-acl__ *private&#124;public\-read&#124;public\-read\-write&#124;authenticated\-read&#124;keep&#124;calc*

        Defaults to an empty string\. If no \-acl argument is provided to
        __S3::Put__ or __S3::Push__, this string is used \(given as the
        x\-amz\-acl header if not keep or calc\)\. If this is also empty, no
        x\-amz\-acl header is generated\. This is *not* used by __S3::REST__\.

      * __\-default\-bucket__ *bucketname*

        If no bucket is given to __S3::GetBucket__, __S3::PutBucket__,
        __S3::Get__, __S3::Put__, __S3::Head__, __S3::Acl__,
        __S3::Delete__, __S3::Push__, __S3::Pull__, or
        __S3::Toss__, and if this configuration variable is not an empty
        string \(and not simply "/"\), then this value will be used for the
        bucket\. This is useful if one program does a large amount of resource
        manipulation within a single bucket\.

  - <a name='2'></a>__S3::SuggestBucket__ ?*name*?

    The __S3::SuggestBucket__ command accepts an optional string as a prefix
    and returns a valid bucket containing the *name* argument and the Access
    Key ID\. This makes the name unique to the owner and to the application
    \(assuming the application picks a good *name* argument\)\. If no name is
    provided, the name from __S3::Configure__ *\-bucket\-prefix* is used\. If
    that too is empty \(which is not the default\), an error is thrown\.

  - <a name='3'></a>__S3::REST__ *dict*

    The __S3::REST__ command takes as an argument a dictionary and returns a
    dictionary\. The return dictionary has the same keys as the input dictionary,
    and includes additional keys as the result\. The presence or absence of keys
    in the input dictionary can control the behavior of the routine\. It never
    throws an error directly, but includes keys "error", "errorInfo", and
    "errorCode" if necessary\. Some keys are required, some optional\. The routine
    can run either in blocking or non\-blocking mode, based on the presense of
    __resultvar__ in the input dictionary\. This requires the
    *\-accesskeyid* and *\-secretaccesskey* to be configured via
    __S3::Configure__ before being called\.

    The possible input keys are these:

      * __verb__ *GET&#124;PUT&#124;DELETE&#124;HEAD*

        This required item indicates the verb to be used\.

      * __resource__ *string*

        This required item indicates the resource to be accessed\. A leading / is
        added if not there already\. It will be URL\-encoded for you if necessary\.
        Do not supply a resource name that is already URL\-encoded\.

      * ?__rtype__ *torrent&#124;acl*?

        This indicates a torrent or acl resource is being manipulated\. Do not
        include this in the __resource__ key, or the "?" separator will get
        URL\-encoded\.

      * ?__parameters__ *dict*?

        This optional dictionary provides parameters added to the URL for the
        transaction\. The keys must be in the correct case \(which is confusing in
        the Amazon documentation\) and the values must be valid\. This can be an
        empty dictionary or omitted entirely if no parameters are desired\. No
        other error checking on parameters is performed\.

      * ?__headers__ *dict*?

        This optional dictionary provides headers to be added to the HTTP
        request\. The keys must be in *lower case* for the authentication to
        work\. The values must not contain embedded newlines or carriage returns\.
        This is primarily useful for adding x\-amz\-\* headers\. Since
        authentication is calculated by __S3::REST__, do not add that header
        here\. Since content\-type gets its own key, also do not add that header
        here\.

      * ?__inbody__ *contentstring*?

        This optional item, if provided, gives the content that will be sent\. It
        is sent with a tranfer encoding of binary, and only the low bytes are
        used, so use \[encoding convertto utf\-8\] if the string is a utf\-8 string\.
        This is written all in one blast, so if you are using non\-blocking mode
        and the __inbody__ is especially large, you may wind up blocking on
        the write socket\.

      * ?__infile__ *filename*?

        This optional item, if provided, and if __inbody__ is not provided,
        names the file from which the body of the HTTP message will be
        constructed\. The file is opened for reading and sent progressively by
        \[fcopy\], so it should not block in non\-blocking mode even if the file is
        very large\. The file is transfered in binary mode, so the bytes on your
        disk will match the bytes in your resource\. Due to HTTP restrictions, it
        must be possible to use \[file size\] on this file to determine the size
        at the start of the transaction\.

      * ?__S3chan__ *channel*?

        This optional item, if provided, indicates the already\-open socket over
        which the transaction should be conducted\. If not provided, a connection
        is made to the service access point specified via __S3::Configure__,
        which is normally s3\.amazonaws\.com\. If this is provided, the channel is
        not closed at the end of the transaction\.

      * ?__outchan__ *channel*?

        This optional item, if provided, indicates the already\-open channel to
        which the body returned from S3 should be written\. That is, to retrieve
        a large resource, open a file, set the translation mode, and pass the
        channel as the value of the key outchan\. Output will be written to the
        channel in pieces so memory does not fill up unnecessarily\. The channel
        is not closed at the end of the transaction\.

      * ?__resultvar__ *varname*?

        This optional item, if provided, indicates that __S3::REST__ should
        run in non\-blocking mode\. The *varname* should be fully qualified with
        respect to namespaces and cannot be local to a proc\. If provided, the
        result of the __S3::REST__ call is assigned to this variable once
        everything has completed; use trace or vwait to know when this has
        happened\. If this key is not provided, the result is simply returned
        from the call to __S3::REST__ and no calls to the eventloop are
        invoked from within this call\.

      * ?__throwsocket__ *throw&#124;return*?

        This optional item, if provided, indicates that __S3::REST__ should
        throw an error if throwmode is throw and a socket error is encountered\.
        It indicates that __S3::REST__ should return the error code in the
        returned dictionary if a socket error is encountered and this is set to
        return\. If __throwsocket__ is set to *return* or if the call is
        not blocking, then a socket error \(i\.e\., an error whose error code
        starts with "S3 socket" will be returned in the dictionary as
        __error__, __errorInfo__, and __errorCode__\. If a foreground
        call is made \(i\.e\., __resultvar__ is not provided\), and this option
        is not provided or is set to *throw*, then
        __[error](\.\./\.\./\.\./\.\./index\.md\#error)__ will be invoked instead\.

    Once the call to __S3::REST__ completes, a new dict is returned, either
    in the *resultvar* or as the result of execution\. This dict is a copy of
    the original dict with the results added as new keys\. The possible new keys
    are these:

      * __error__ *errorstring*

      * __errorInfo__ *errorstring*

      * __errorCode__ *errorstring*

        If an error is caught, these three keys will be set in the result\. Note
        that __S3::REST__ does *not* consider a non\-2XX HTTP return code
        as an error\. The __errorCode__ value will be formatted according to
        the [ERROR REPORTING](#section2) description\. If these are present,
        other keys described here might not be\.

      * __httpstatus__ *threedigits*

        The three\-digit code from the HTTP transaction\. 2XX for good, 5XX for
        server error, etc\.

      * __httpmessage__ *text*

        The textual result after the status code\. "OK" or "Forbidden" or etc\.

      * __outbody__ *contentstring*

        If *outchan* was not specified, this key will hold a reference to the
        \(unencoded\) contents of the body returned\. If Amazon returned an error
        \(a la the httpstatus not a 2XX value\), the error message will be in
        __outbody__ or written to __outchan__ as appropriate\.

      * __outheaders__ *dict*

        This contains a dictionary of headers returned by Amazon\. The keys are
        always lower case\. It's mainly useful for finding the x\-amz\-meta\-\*
        headers, if any, although things like last\-modified and content\-type are
        also useful\. The keys of this dictionary are always lower case\. Both
        keys and values are trimmed of extraneous whitespace\.

# <a name='section5'></a>HIGH LEVEL COMMANDS

The routines in this section all make use of one or more calls to
__S3::REST__ to do their work, then parse and manage the data in a
convenient way\. All these commands throw errors as described in [ERROR
REPORTING](#section2) unless otherwise noted\.

In all these commands, all arguments are presented as name/value pairs, in any
order\. All the argument names start with a hyphen\.

There are a few options that are common to many of the commands, and those
common options are documented here\.

  - __\-blocking__ *boolean*

    If provided and specified as false, then any calls to __S3:REST__ will
    be non\-blocking, and internally these routines will call \[vwait\] to get the
    results\. In other words, these routines will return the same value, but
    they'll have event loops running while waiting for Amazon\.

  - __\-parse\-xml__ *xmlstring*

    If provided, the routine skips actually communicating with Amazon, and
    instead behaves as if the XML string provided was returned as the body of
    the call\. Since several of these routines allow the return of data in
    various formats, this argument can be used to parse existing XML to extract
    the bits of information that are needed\. It's also helpful for testing\.

  - __\-bucket__ *bucketname*

    Almost every high\-level command needs to know what bucket the resources are
    in\. This option specifies that\. \(Only the command to list available buckets
    does not require this parameter\.\) This does not need to be URL\-encoded, even
    if it contains special or non\-ASCII characters\. May or may not contain
    leading or trailing spaces \- commands normalize the bucket\. If this is not
    supplied, the value is taken from __S3::Configure \-default\-bucket__ if
    that string isn't empty\. Note that spaces and slashes are always trimmed
    from both ends and the rest must leave a valid bucket\.

  - __\-resource__ *resourcename*

    This specifies the resource of interest within the bucket\. It may or may not
    start with a slash \- both cases are handled\. This does not need to be
    URL\-encoded, even if it contains special or non\-ASCII characters\.

  - __\-compare__ *always&#124;never&#124;exists&#124;missing&#124;newer&#124;date&#124;checksum&#124;different*

    When commands copy resources to files or files to resources, the caller may
    specify that the copy should be skipped if the contents are the same\. This
    argument specifies the conditions under which the files should be copied\. If
    it is not passed, the result of __S3::Configure \-default\-compare__ is
    used, which in turn defaults to "always\." The meanings of the various values
    are these:

      * *always*

        Always copy the data\. This is the default\.

      * *never*

        Never copy the data\. This is essentially a no\-op, except in
        __S3::Push__ and __S3::Pull__ where the \-delete flag might make
        a difference\.

      * *exists*

        Copy the data only if the destination already exists\.

      * *missing*

        Copy the data only if the destination does not already exist\.

      * *newer*

        Copy the data if the destination is missing, or if the date on the
        source is newer than the date on the destination by at least
        __S3::Configure \-slop\-seconds__ seconds\. If the source is Amazon,
        the date is taken from the Last\-Modified header\. If the source is local,
        it is taken as the mtime of the file\. If the source data is specified in
        a string rather than a file, it is taken as right now, via \[clock
        seconds\]\.

      * *date*

        Like *newer*, except copy if the date is newer *or* older\.

      * *checksum*

        Calculate the MD5 checksum on the local file or string, ask Amazon for
        the eTag of the resource, and copy the data if they're different\. Copy
        the data also if the destination is missing\. Note that this can be slow
        with large local files unless the C version of the MD5 support is
        available\.

      * *different*

        Copy the data if the destination does not exist\. If the destination
        exists and an actual file name was specified \(rather than a content
        string\), and the date on the file differs from the date on the resource,
        copy the data\. If the data is provided as a content string, the "date"
        is treated as "right now", so it will likely always differ unless
        slop\-seconds is large\. If the dates are the same, the MD5 checksums are
        compared, and the data is copied if the checksums differ\.

    Note that "newer" and "date" don't care about the contents, and "checksum"
    doesn't care about the dates, but "different" checks both\.

  - <a name='4'></a>__S3::ListAllMyBuckets__ ?__\-blocking__ *boolean*? ?__\-parse\-xml__ *xmlstring*? ?__\-result\-type__ *REST&#124;xml&#124;pxml&#124;dict&#124;names&#124;owner*?

    This routine performs a GET on the Amazon S3 service, which is defined to
    return a list of buckets owned by the account identified by the
    authorization header\. \(Blame Amazon for the dumb names\.\)

      * __\-blocking__ *boolean*

        See above for standard definition\.

      * __\-parse\-xml__ *xmlstring*

        See above for standard definition\.

      * __\-result\-type__ *REST*

        The dictionary returned by __S3::REST__ is the return value of
        __S3::ListAllMyBuckets__\. In this case, a non\-2XX httpstatus will
        not throw an error\. You may not combine this with *\-parse\-xml*\.

      * __\-result\-type__ *xml*

        The raw XML of the body is returned as the result \(with no encoding
        applied\)\.

      * __\-result\-type__ *pxml*

        The XML of the body as parsed by __xsxp::parse__ is returned\.

      * __\-result\-type__ *dict*

        A dictionary of interesting portions of the XML is returned\. The
        dictionary contains the following keys:

          + Owner/ID

            The Amazon AWS ID \(in hex\) of the owner of the bucket\.

          + Owner/DisplayName

            The Amazon AWS ID's Display Name\.

          + Bucket/Name

            A list of names, one for each bucket\.

          + Bucket/CreationDate

            A list of dates, one for each bucket, in the same order as
            Bucket/Name, in ISO format \(as returned by Amazon\)\.

      * __\-result\-type__ *names*

        A list of bucket names is returned with all other information stripped
        out\. This is the default result type for this command\.

      * __\-result\-type__ *owner*

        A list containing two elements is returned\. The first element is the
        owner's ID, and the second is the owner's display name\.

  - <a name='5'></a>__S3::PutBucket__ ?__\-bucket__ *bucketname*? ?__\-blocking__ *boolean*? ?__\-acl__ *\{\}&#124;private&#124;public\-read&#124;public\-read\-write&#124;authenticated\-read*?

    This command creates a bucket if it does not already exist\. Bucket names are
    globally unique, so you may get a "Forbidden" error from Amazon even if you
    cannot see the bucket in __S3::ListAllMyBuckets__\. See
    __S3::SuggestBucket__ for ways to minimize this risk\. The x\-amz\-acl
    header comes from the __\-acl__ option, or from __S3::Configure
    \-default\-acl__ if not specified\.

  - <a name='6'></a>__S3::DeleteBucket__ ?__\-bucket__ *bucketname*? ?__\-blocking__ *boolean*?

    This command deletes a bucket if it is empty and you have such permission\.
    Note that Amazon's list of buckets is a global resource, requiring far\-flung
    synchronization\. If you delete a bucket, it may be quite a few minutes \(or
    hours\) before you can recreate it, yielding "Conflict" errors until then\.

  - <a name='7'></a>__S3::GetBucket__ ?__\-bucket__ *bucketname*? ?__\-blocking__ *boolean*? ?__\-parse\-xml__ *xmlstring*? ?__\-max\-count__ *integer*? ?__\-prefix__ *prefixstring*? ?__\-delimiter__ *delimiterstring*? ?__\-result\-type__ *REST&#124;xml&#124;pxml&#124;names&#124;dict*?

    This lists the contents of a bucket\. That is, it returns a directory listing
    of resources within a bucket, rather than transfering any user data\.

      * __\-bucket__ *bucketname*

        The standard bucket argument\.

      * __\-blocking__ *boolean*

        The standard blocking argument\.

      * __\-parse\-xml__ *xmlstring*

        The standard parse\-xml argument\.

      * __\-max\-count__ *integer*

        If supplied, this is the most number of records to be returned\. If not
        supplied, the code will iterate until all records have been found\. Not
        compatible with \-parse\-xml\. Note that if this is supplied, only one call
        to __S3::REST__ will be made\. Otherwise, enough calls will be made
        to exhaust the listing, buffering results in memory, so take care if you
        may have huge buckets\.

      * __\-prefix__ *prefixstring*

        If present, restricts listing to resources with a particular prefix\. One
        leading / is stripped if present\.

      * __\-delimiter__ *delimiterstring*

        If present, specifies a delimiter for the listing\. The presence of this
        will summarize multiple resources into one entry, as if S3 supported
        directories\. See the Amazon documentation for details\.

      * __\-result\-type__ *REST&#124;xml&#124;pxml&#124;names&#124;dict*

        This indicates the format of the return result of the command\.

          + REST

            If *\-max\-count* is specified, the dictionary returned from
            __S3::REST__ is returned\. If *\-max\-count* is not specified, a
            list of all the dictionaries returned from the one or more calls to
            __S3::REST__ is returned\.

          + xml

            If *\-max\-count* is specified, the body returned from
            __S3::REST__ is returned\. If *\-max\-count* is not specified, a
            list of all the bodies returned from the one or more calls to
            __S3::REST__ is returned\.

          + pxml

            If *\-max\-count* is specified, the body returned from
            __S3::REST__ is passed throught __xsxp::parse__ and then
            returned\. If *\-max\-count* is not specified, a list of all the
            bodies returned from the one or more calls to __S3::REST__ are
            each passed through __xsxp::parse__ and then returned\.

          + names

            Returns a list of all names found in either the Contents/Key fields
            or the CommonPrefixes/Prefix fields\. If no *\-delimiter* is
            specified and no *\-max\-count* is specified, this returns a list of
            all resources with the specified *\-prefix*\.

          + dict

            Returns a dictionary\. \(Returns only one dictionary even if
            *\-max\-count* wasn't specified\.\) The keys of the dictionary are as
            follows:

              - Name

                The name of the bucket \(from the final call to
                __S3::REST__\)\.

              - Prefix

                From the final call to __S3::REST__\.

              - Marker

                From the final call to __S3::REST__\.

              - MaxKeys

                From the final call to __S3::REST__\.

              - IsTruncated

                From the final call to __S3::REST__, so always false if
                *\-max\-count* is not specified\.

              - NextMarker

                Always provided if IsTruncated is true, and calculated of Amazon
                does not provide it\. May be empty if IsTruncated is false\.

              - Key

                A list of names of resources in the bucket matching the
                *\-prefix* and *\-delimiter* restrictions\.

              - LastModified

                A list of times of resources in the bucket, in the same order as
                Key, in the format returned by Amazon\. \(I\.e\., it is not parsed
                into a seconds\-from\-epoch\.\)

              - ETag

                A list of entity tags \(a\.k\.a\. MD5 checksums\) in the same order
                as Key\.

              - Size

                A list of sizes in bytes of the resources, in the same order as
                Key\.

              - Owner/ID

                A list of owners of the resources in the bucket, in the same
                order as Key\.

              - Owner/DisplayName

                A list of owners of the resources in the bucket, in the same
                order as Key\. These are the display names\.

              - CommonPrefixes/Prefix

                A list of prefixes common to multiple entities\. This is present
                only if *\-delimiter* was supplied\.

  - <a name='8'></a>__S3::Put__ ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-blocking__ *boolean*? ?__\-file__ *filename*? ?__\-content__ *contentstring*? ?__\-acl__ *private&#124;public\-read&#124;public\-read\-write&#124;authenticated\-read&#124;calc&#124;keep*? ?__\-content\-type__ *contenttypestring*? ?__\-x\-amz\-meta\-\*__ *metadatatext*? ?__\-compare__ *comparemode*?

    This command sends data to a resource on Amazon's servers for storage, using
    the HTTP PUT command\. It returns 0 if the __\-compare__ mode prevented
    the transfer, 1 if the transfer worked, or throws an error if the transfer
    was attempted but failed\. Server 5XX errors and S3 socket errors are retried
    according to __S3:Configure \-retries__ settings before throwing an
    error; other errors throw immediately\.

      * __\-bucket__

        This specifies the bucket into which the resource will be written\.
        Leading and/or trailing slashes are removed for you, as are spaces\.

      * __\-resource__

        This is the full name of the resource within the bucket\. A single
        leading slash is removed, but not a trailing slash\. Spaces are not
        trimmed\.

      * __\-blocking__

        The standard blocking flag\.

      * __\-file__

        If this is specified, the *filename* must exist, must be readable, and
        must not be a special or directory file\. \[file size\] must apply to it
        and must not change for the lifetime of the call\. The default
        content\-type is calculated based on the name and/or contents of the
        file\. Specifying this is an error if __\-content__ is also specified,
        but at least one of __\-file__ or __\-content__ must be specified\.
        \(The file is allowed to not exist or not be readable if __\-compare__
        *never* is specified\.\)

      * __\-content__

        If this is specified, the *contentstring* is sent as the body of the
        resource\. The content\-type defaults to "application/octet\-string"\. Only
        the low bytes are sent, so non\-ASCII should use the appropriate encoding
        \(such as \[encoding convertto utf\-8\]\) before passing it to this routine,
        if necessary\. Specifying this is an error if __\-file__ is also
        specified, but at least one of __\-file__ or __\-content__ must be
        specified\.

      * __\-acl__

        This defaults to __S3::Configure \-default\-acl__ if not specified\. It
        sets the x\-amz\-acl header on the PUT operation\. If the value provided is
        *calc*, the x\-amz\-acl header is calculated based on the I/O
        permissions of the file to be uploaded; it is an error to specify
        *calc* and __\-content__\. If the value provided is *keep*, the
        acl of the resource is read before the PUT \(or the default is used if
        the resource does not exist\), then set back to what it was after the PUT
        \(if it existed\)\. An error will occur if the resource is successfully
        written but the kept ACL cannot be then applied\. This should never
        happen\. *Note:* *calc* is not currently fully implemented\.

      * __\-x\-amz\-meta\-\*__

        If any header starts with "\-x\-amz\-meta\-", its contents are added to the
        PUT command to be stored as metadata with the resource\. Again, no
        encoding is performed, and the metadata should not contain characters
        like newlines, carriage returns, and so on\. It is best to stick with
        simple ASCII strings, or to fix the library in several places\.

      * __\-content\-type__

        This overrides the content\-type calculated by __\-file__ or sets the
        content\-type for __\-content__\.

      * __\-compare__

        This is the standard compare mode argument\. __S3::Put__ returns 1 if
        the data was copied or 0 if the data was skipped due to the comparison
        mode so indicating it should be skipped\.

  - <a name='9'></a>__S3::Get__ ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-blocking__ *boolean*? ?__\-compare__ *comparemode*? ?__\-file__ *filename*? ?__\-content__ *contentvarname*? ?__\-timestamp__ *aws&#124;now*? ?__\-headers__ *headervarname*?

    This command retrieves data from a resource on Amazon's S3 servers, using
    the HTTP GET command\. It returns 0 if the __\-compare__ mode prevented
    the transfer, 1 if the transfer worked, or throws an error if the transfer
    was attempted but failed\. Server 5XX errors and S3 socket errors are are
    retried according to __S3:Configure__ settings before throwing an error;
    other errors throw immediately\. Note that this is always authenticated as
    the user configured in via __S3::Configure \-accesskeyid__\. Use the
    Tcllib http for unauthenticated GETs\.

      * __\-bucket__

        This specifies the bucket from which the resource will be read\. Leading
        and/or trailing slashes are removed for you, as are spaces\.

      * __\-resource__

        This is the full name of the resource within the bucket\. A single
        leading slash is removed, but not a trailing slash\. Spaces are not
        trimmed\.

      * __\-blocking__

        The standard blocking flag\.

      * __\-file__

        If this is specified, the body of the resource will be read into this
        file, incrementally without pulling it entirely into memory first\. The
        parent directory must already exist\. If the file already exists, it must
        be writable\. If an error is thrown part\-way through the process and the
        file already existed, it may be clobbered\. If an error is thrown
        part\-way through the process and the file did not already exist, any
        partial bits will be deleted\. Specifying this is an error if
        __\-content__ is also specified, but at least one of __\-file__ or
        __\-content__ must be specified\.

      * __\-timestamp__

        This is only valid in conjunction with __\-file__\. It may be
        specified as *now* or *aws*\. The default is *now*\. If *now*, the
        file's modification date is left up to the system\. If *aws*, the
        file's mtime is set to match the Last\-Modified header on the resource,
        synchronizing the two appropriately for __\-compare__ *date* or
        __\-compare__ *newer*\.

      * __\-content__

        If this is specified, the *contentvarname* is a variable in the
        caller's scope \(not necessarily global\) that receives the value of the
        body of the resource\. No encoding is done, so if the resource \(for
        example\) represents a UTF\-8 byte sequence, use \[encoding convertfrom
        utf\-8\] to get a valid UTF\-8 string\. If this is specified, the
        __\-compare__ is ignored unless it is *never*, in which case no
        assignment to *contentvarname* is performed\. Specifying this is an
        error if __\-file__ is also specified, but at least one of
        __\-file__ or __\-content__ must be specified\.

      * __\-compare__

        This is the standard compare mode argument\. __S3::Get__ returns 1 if
        the data was copied or 0 if the data was skipped due to the comparison
        mode so indicating it should be skipped\.

      * __\-headers__

        If this is specified, the headers resulting from the fetch are stored in
        the provided variable, as a dictionary\. This will include content\-type
        and x\-amz\-meta\-\* headers, as well as the usual HTTP headers, the
        x\-amz\-id debugging headers, and so on\. If no file is fetched \(due to
        __\-compare__ or other errors\), no assignment to this variable is
        performed\.

  - <a name='10'></a>__S3::Head__ ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-blocking__ *boolean*? ?__\-dict__ *dictvarname*? ?__\-headers__ *headersvarname*? ?__\-status__ *statusvarname*?

    This command requests HEAD from the resource\. It returns whether a 2XX code
    was returned as a result of the request, never throwing an S3 remote error\.
    That is, if this returns 1, the resource exists and is accessible\. If this
    returns 0, something went wrong, and the __\-status__ result can be
    consulted for details\.

      * __\-bucket__

        This specifies the bucket from which the resource will be read\. Leading
        and/or trailing slashes are removed for you, as are spaces\.

      * __\-resource__

        This is the full name of the resource within the bucket\. A single
        leading slash is removed, but not a trailing slash\. Spaces are not
        trimmed\.

      * __\-blocking__

        The standard blocking flag\.

      * __\-dict__

        If specified, the resulting dictionary from the __S3::REST__ call is
        assigned to the indicated \(not necessarily global\) variable in the
        caller's scope\.

      * __\-headers__

        If specified, the dictionary of headers from the result are assigned to
        the indicated \(not necessarily global\) variable in the caller's scope\.

      * __\-status__

        If specified, the indicated \(not necessarily global\) variable in the
        caller's scope is assigned a 2\-element list\. The first element is the
        3\-digit HTTP status code, while the second element is the HTTP message
        \(such as "OK" or "Forbidden"\)\.

  - <a name='11'></a>__S3::GetAcl__ ?__\-blocking__ *boolean*? ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-result\-type__ *REST&#124;xml&#124;pxml*?

    This command gets the ACL of the indicated resource or throws an error if it
    is unavailable\.

      * __\-blocking__ *boolean*

        See above for standard definition\.

      * __\-bucket__

        This specifies the bucket from which the resource will be read\. Leading
        and/or trailing slashes are removed for you, as are spaces\.

      * __\-resource__

        This is the full name of the resource within the bucket\. A single
        leading slash is removed, but not a trailing slash\. Spaces are not
        trimmed\.

      * __\-parse\-xml__ *xml*

        The XML from a previous GetACL can be passed in to be parsed into
        dictionary form\. In this case, \-result\-type must be pxml or dict\.

      * __\-result\-type__ *REST*

        The dictionary returned by __S3::REST__ is the return value of
        __S3::GetAcl__\. In this case, a non\-2XX httpstatus will not throw an
        error\.

      * __\-result\-type__ *xml*

        The raw XML of the body is returned as the result \(with no encoding
        applied\)\.

      * __\-result\-type__ *pxml*

        The XML of the body as parsed by __xsxp::parse__ is returned\.

      * __\-result\-type__ *dict*

        This fetches the ACL, parses it, and returns a dictionary of two
        elements\.

        The first element has the key "owner" whose value is the canonical ID of
        the owner of the resource\.

        The second element has the key "acl" whose value is a dictionary\. Each
        key in the dictionary is one of Amazon's permissions, namely "READ",
        "WRITE", "READ\_ACP", "WRITE\_ACP", or "FULL\_CONTROL"\. Each value of each
        key is a list of canonical IDs or group URLs that have that permission\.
        Elements are not in the list in any particular order, and not all keys
        are necessarily present\. Display names are not returned, as they are not
        especially useful; use pxml to obtain them if necessary\.

  - <a name='12'></a>__S3::PutAcl__ ?__\-blocking__ *boolean*? ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-acl__ *new\-acl*?

    This sets the ACL on the indicated resource\. It returns the XML written to
    the ACL, or throws an error if anything went wrong\.

      * __\-blocking__ *boolean*

        See above for standard definition\.

      * __\-bucket__

        This specifies the bucket from which the resource will be read\. Leading
        and/or trailing slashes are removed for you, as are spaces\.

      * __\-resource__

        This is the full name of the resource within the bucket\. A single
        leading slash is removed, but not a trailing slash\. Spaces are not
        trimmed\.

      * __\-owner__

        If this is provided, it is assumed to match the owner of the resource\.
        Otherwise, a GET may need to be issued against the resource to find the
        owner\. If you already have the owner \(such as from a call to
        __S3::GetAcl__, you can pass the value of the "owner" key as the
        value of this option, and it will be used in the construction of the
        XML\.

      * __\-acl__

        If this option is specified, it provides the ACL the caller wishes to
        write to the resource\. If this is not supplied or is empty, the value is
        taken from __S3::Configure \-default\-acl__\. The ACL is written with a
        PUT to the ?acl resource\.

        If the value passed to this option starts with "<", it is taken to be a
        body to be PUT to the ACL resource\.

        If the value matches one of the standard Amazon x\-amz\-acl headers \(i\.e\.,
        a canned access policy\), that header is translated to XML and then
        applied\. The canned access policies are private, public\-read,
        public\-read\-write, and authenticated\-read \(in lower case\)\.

        Otherwise, the value is assumed to be a dictionary formatted as the
        "acl" sub\-entry within the dict returns by __S3::GetAcl \-result\-type
        dict__\. The proper XML is generated and applied to the resource\. Note
        that a value containing "//" is assumed to be a group, a value
        containing "@" is assumed to be an AmazonCustomerByEmail, and otherwise
        the value is assumed to be a canonical Amazon ID\.

        Note that you cannot change the owner, so calling GetAcl on a resource
        owned by one user and applying it via PutAcl on a resource owned by
        another user may not do exactly what you expect\.

  - <a name='13'></a>__S3::Delete__ ?__\-bucket__ *bucketname*? __\-resource__ *resourcename* ?__\-blocking__ *boolean*? ?__\-status__ *statusvar*?

    This command deletes the specified resource from the specified bucket\. It
    returns 1 if the resource was deleted successfully, 0 otherwise\. It returns
    0 rather than throwing an S3 remote error\.

      * __\-bucket__

        This specifies the bucket from which the resource will be deleted\.
        Leading and/or trailing slashes are removed for you, as are spaces\.

      * __\-resource__

        This is the full name of the resource within the bucket\. A single
        leading slash is removed, but not a trailing slash\. Spaces are not
        trimmed\.

      * __\-blocking__

        The standard blocking flag\.

      * __\-status__

        If specified, the indicated \(not necessarily global\) variable in the
        caller's scope is set to a two\-element list\. The first element is the
        3\-digit HTTP status code\. The second element is the HTTP message \(such
        as "OK" or "Forbidden"\)\. Note that Amazon's DELETE result is 204 on
        success, that being the code indicating no content in the returned body\.

  - <a name='14'></a>__S3::Push__ ?__\-bucket__ *bucketname*? __\-directory__ *directoryname* ?__\-prefix__ *prefixstring*? ?__\-compare__ *comparemode*? ?__\-x\-amz\-meta\-\*__ *metastring*? ?__\-acl__ *aclcode*? ?__\-delete__ *boolean*? ?__\-error__ *throw&#124;break&#124;continue*? ?__\-progress__ *scriptprefix*?

    This synchronises a local directory with a remote bucket by pushing the
    differences using __S3::Put__\. Note that if something has changed in the
    bucket but not locally, those changes could be lost\. Thus, this is not a
    general two\-way synchronization primitive\. \(See __S3::Sync__ for that\.\)
    Note too that resource names are case sensitive, so changing the case of a
    file on a Windows machine may lead to otherwise\-unnecessary transfers\. Note
    that only regular files are considered, so devices, pipes, symlinks, and
    directories are not copied\.

      * __\-bucket__

        This names the bucket into which data will be pushed\.

      * __\-directory__

        This names the local directory from which files will be taken\. It must
        exist, be readable via \[glob\] and so on\. If only some of the files
        therein are readable, __S3::Push__ will PUT those files that are
        readable and return in its results the list of files that could not be
        opened\.

      * __\-prefix__

        This names the prefix that will be added to all resources\. That is, it
        is the remote equivalent of __\-directory__\. If it is not specified,
        the root of the bucket will be treated as the remote directory\. An
        example may clarify\.

            S3::Push -bucket test -directory /tmp/xyz -prefix hello/world

        In this example, /tmp/xyz/pdq\.html will be stored as
        http://s3\.amazonaws\.com/test/hello/world/pdq\.html in Amazon's servers\.
        Also, /tmp/xyz/abc/def/Hello will be stored as
        http://s3\.amazonaws\.com/test/hello/world/abc/def/Hello in Amazon's
        servers\. Without the __\-prefix__ option, /tmp/xyz/pdq\.html would be
        stored as http://s3\.amazonaws\.com/test/pdq\.html\.

      * __\-blocking__

        This is the standard blocking option\.

      * __\-compare__

        If present, this is passed to each invocation of __S3::Put__\.
        Naturally, __S3::Configure \-default\-compare__ is used if this is not
        specified\.

      * __\-x\-amz\-meta\-\*__

        If present, this is passed to each invocation of __S3::Put__\. All
        copied files will have the same metadata\.

      * __\-acl__

        If present, this is passed to each invocation of __S3::Put__\.

      * __\-delete__

        This defaults to false\. If true, resources in the destination that are
        not in the source directory are deleted with __S3::Delete__\. Since
        only regular files are considered, the existance of a symlink, pipe,
        device, or directory in the local source will *not* prevent the
        deletion of a remote resource with a corresponding name\.

      * __\-error__

        This controls the behavior of __S3::Push__ in the event that
        __S3::Put__ throws an error\. Note that errors encountered on the
        local file system or in reading the list of resources in the remote
        bucket always throw errors\. This option allows control over "partial"
        errors, when some files were copied and some were not\.
        __S3::Delete__ is always finished up, with errors simply recorded in
        the return result\.

          + throw

            The error is rethrown with the same errorCode\.

          + break

            Processing stops without throwing an error, the error is recorded in
            the return value, and the command returns with a normal return\. The
            calls to __S3::Delete__ are not started\.

          + continue

            This is the default\. Processing continues without throwing,
            recording the error in the return result, and resuming with the next
            file in the local directory to be copied\.

      * __\-progress__

        If this is specified and the indicated script prefix is not empty, the
        indicated script prefix will be invoked several times in the caller's
        context with additional arguments at various points in the processing\.
        This allows progress reporting without backgrounding\. The provided
        prefix will be invoked with additional arguments, with the first
        additional argument indicating what part of the process is being
        reported on\. The prefix is initially invoked with *args* as the first
        additional argument and a dictionary representing the normalized
        arguments to the __S3::Push__ call as the second additional
        argument\. Then the prefix is invoked with *local* as the first
        additional argument and a list of suffixes of the files to be considered
        as the second argument\. Then the prefix is invoked with *remote* as
        the first additional argument and a list of suffixes existing in the
        remote bucket as the second additional argument\. Then, for each file in
        the local list, the prefix will be invoked with *start* as the first
        additional argument and the common suffix as the second additional
        argument\. When __S3::Put__ returns for that file, the prefix will be
        invoked with *copy* as the first additional argument, the common
        suffix as the second additional argument, and a third argument that will
        be "copied" \(if __S3::Put__ sent the resource\), "skipped" \(if
        __S3::Put__ decided not to based on __\-compare__\), or the
        errorCode that __S3::Put__ threw due to unexpected errors \(in which
        case the third argument is a list that starts with "S3"\)\. When all files
        have been transfered, the prefix may be invoked zero or more times with
        *delete* as the first additional argument and the suffix of the
        resource being deleted as the second additional argument, with a third
        argument being either an empty string \(if the delete worked\) or the
        errorCode from __S3::Delete__ if it failed\. Finally, the prefix will
        be invoked with *finished* as the first additional argument and the
        return value as the second additional argument\.

    The return result from this command is a dictionary\. They keys are the
    suffixes \(i\.e\., the common portion of the path after the __\-directory__
    and __\-prefix__\), while the values are either "copied", "skipped" \(if
    __\-compare__ indicated not to copy the file\), or the errorCode thrown by
    __S3::Put__, as appropriate\. If __\-delete__ was true, there may also
    be entries for suffixes with the value "deleted" or "notdeleted", indicating
    whether the attempted __S3::Delete__ worked or not, respectively\. There
    is one additional pair in the return result, whose key is the empty string
    and whose value is a nested dictionary\. The keys of this nested dictionary
    include "filescopied" \(the number of files successfully copied\),
    "bytescopied" \(the number of data bytes in the files copied, excluding
    headers, metadata, etc\), "compareskipped" \(the number of files not copied
    due to __\-compare__ mode\), "errorskipped" \(the number of files not
    copied due to thrown errors\), "filesdeleted" \(the number of resources
    deleted due to not having corresponding files locally, or 0 if
    __\-delete__ is false\), and "filesnotdeleted" \(the number of resources
    whose deletion was attempted but failed\)\.

    Note that this is currently implemented somewhat inefficiently\. It fetches
    the bucket listing \(including timestamps and eTags\), then calls
    __S3::Put__, which uses HEAD to find the timestamps and eTags again\.
    Correcting this with no API change is planned for a future upgrade\.

  - <a name='15'></a>__S3::Pull__ ?__\-bucket__ *bucketname*? __\-directory__ *directoryname* ?__\-prefix__ *prefixstring*? ?__\-blocking__ *boolean*? ?__\-compare__ *comparemode*? ?__\-delete__ *boolean*? ?__\-timestamp__ *aws&#124;now*? ?__\-error__ *throw&#124;break&#124;continue*? ?__\-progress__ *scriptprefix*?

    This synchronises a remote bucket with a local directory by pulling the
    differences using __S3::Get__ If something has been changed locally but
    not in the bucket, those difference may be lost\. This is not a general
    two\-way synchronization mechanism\. \(See __S3::Sync__ for that\.\) This
    creates directories if needed; new directories are created with default
    permissions\. Note that resource names are case sensitive, so changing the
    case of a file on a Windows machine may lead to otherwise\-unnecessary
    transfers\. Also, try not to store data in resources that end with a slash,
    or which are prefixes of resources that otherwise would start with a slash;
    i\.e\., don't use this if you store data in resources whose names have to be
    directories locally\.

    Note that this is currently implemented somewhat inefficiently\. It fetches
    the bucket listing \(including timestamps and eTags\), then calls
    __S3::Get__, which uses HEAD to find the timestamps and eTags again\.
    Correcting this with no API change is planned for a future upgrade\.

      * __\-bucket__

        This names the bucket from which data will be pulled\.

      * __\-directory__

        This names the local directory into which files will be written It must
        exist, be readable via \[glob\], writable for file creation, and so on\. If
        only some of the files therein are writable, __S3::Pull__ will GET
        those files that are writable and return in its results the list of
        files that could not be opened\.

      * __\-prefix__

        The prefix of resources that will be considered for retrieval\. See
        __S3::Push__ for more details, examples, etc\. \(Of course,
        __S3::Pull__ reads rather than writes, but the prefix is treated
        similarly\.\)

      * __\-blocking__

        This is the standard blocking option\.

      * __\-compare__

        This is passed to each invocation of __S3::Get__ if provided\.
        Naturally, __S3::Configure \-default\-compare__ is used if this is not
        provided\.

      * __\-timestamp__

        This is passed to each invocation of __S3::Get__ if provided\.

      * __\-delete__

        If this is specified and true, files that exist in the
        __\-directory__ that are not in the __\-prefix__ will be deleted
        after all resources have been copied\. In addition, empty directories
        \(other than the top\-level __\-directory__\) will be deleted, as Amazon
        S3 has no concept of an empty directory\.

      * __\-error__

        See __S3::Push__ for a description of this option\.

      * __\-progress__

        See __S3::Push__ for a description of this option\. It differs
        slightly in that local directories may be included with a trailing slash
        to indicate they are directories\.

    The return value from this command is a dictionary\. It is identical in form
    and meaning to the description of the return result of __S3::Push__\. It
    differs only in that directories may be included, with a trailing slash in
    their name, if they are empty and get deleted\.

  - <a name='16'></a>__S3::Toss__ ?__\-bucket__ *bucketname*? __\-prefix__ *prefixstring* ?__\-blocking__ *boolean*? ?__\-error__ *throw&#124;break&#124;continue*? ?__\-progress__ *scriptprefix*?

    This deletes some or all resources within a bucket\. It would be considered a
    "recursive delete" had Amazon implemented actual directories\.

      * __\-bucket__

        The bucket from which resources will be deleted\.

      * ____\-blocking____

        The standard blocking option\.

      * ____\-prefix____

        The prefix for resources to be deleted\. Any resource that starts with
        this string will be deleted\. This is required\. To delete everything in
        the bucket, pass an empty string for the prefix\.

      * ____\-error____

        If this is "throw", __S3::Toss__ rethrows any errors it encounters\.
        If this is "break", __S3::Toss__ returns with a normal return after
        the first error, recording that error in the return result\. If this is
        "continue", which is the default, __S3::Toss__ continues on and
        lists all errors in the return result\.

      * ____\-progress____

        If this is specified and not an empty string, the script prefix will be
        invoked several times in the context of the caller with additional
        arguments appended\. Initially, it will be invoked with the first
        additional argument being *args* and the second being the processed
        list of arguments to __S3::Toss__\. Then it is invoked with
        *remote* as the first additional argument and the list of suffixes in
        the bucket to be deleted as the second additional argument\. Then it is
        invoked with the first additional argument being *delete* and the
        second additional argument being the suffix deleted and the third
        additional argument being "deleted" or "notdeleted" depending on whether
        __S3::Delete__ threw an error\. Finally, the script prefix is invoked
        with a first additional argument of "finished" and a second additional
        argument of the return value\.

    The return value is a dictionary\. The keys are the suffixes of files that
    __S3::Toss__ attempted to delete, and whose values are either the string
    "deleted" or "notdeleted"\. There is also one additional pair, whose key is
    the empty string and whose value is an embedded dictionary\. The keys of this
    embedded dictionary include "filesdeleted" and "filesnotdeleted", each of
    which has integer values\.

# <a name='section6'></a>LIMITATIONS

  - The pure\-Tcl MD5 checking is slow\. If you are processing files in the
    megabyte range, consider ensuring binary support is available\.

  - The commands __S3::Pull__ and __S3::Push__ fetch a directory listing
    which includes timestamps and MD5 hashes, then invoke __S3::Get__ and
    __S3::Put__\. If a complex __\-compare__ mode is specified,
    __S3::Get__ and __S3::Put__ will invoke a HEAD operation for each
    file to fetch timestamps and MD5 hashes of each resource again\. It is
    expected that a future release of this package will solve this without any
    API changes\.

  - The commands __S3::Pull__ and __S3::Push__ fetch a directory listing
    without using __\-max\-count__\. The entire directory is pulled into memory
    at once\. For very large buckets, this could be a performance problem\. The
    author, at this time, does not plan to change this behavior\. Welcome to Open
    Source\.

  - __S3::Sync__ is neither designed nor implemented yet\. The intention
    would be to keep changes synchronised, so changes could be made to both the
    bucket and the local directory and be merged by __S3::Sync__\.

  - Nor is __\-compare__ *calc* fully implemented\. This is primarily due to
    Windows not providing a convenient method for distinguishing between local
    files that are "public\-read" or "public\-read\-write"\. Assistance figuring out
    TWAPI for this would be appreciated\. The U\*\*X semantics are difficult to map
    directly as well\. See the source for details\. Note that there are not tests
    for calc, since it isn't done yet\.

  - The HTTP processing is implemented within the library, rather than using a
    "real" HTTP package\. Hence, multi\-line headers are not \(yet\) handled
    correctly\. Do not include carriage returns or linefeeds in x\-amz\-meta\-\*
    headers, content\-type values, and so on\. The author does not at this time
    expect to improve this\.

  - Internally, __S3::Push__ and __S3::Pull__ and __S3::Toss__ are
    all very similar and should be refactored\.

  - The idea of using __\-compare__ *never* __\-delete__ *true* to
    delete files that have been deleted from one place but not the other yet not
    copying changed files is untested\.

# <a name='section7'></a>USAGE SUGGESTIONS

To fetch a "directory" out of a bucket, make changes, and store it back:

    file mkdir ./tempfiles
    S3::Pull -bucket sample -prefix of/interest -directory ./tempfiles \
      -timestamp aws
    do_my_process ./tempfiles other arguments
    S3::Push -bucket sample -prefix of/interest -directory ./tempfiles \
      -compare newer -delete true

To delete files locally that were deleted off of S3 but not otherwise update
files:

    S3::Pull -bucket sample -prefix of/interest -directory ./myfiles \
      -compare never -delete true

# <a name='section8'></a>FUTURE DEVELOPMENTS

The author intends to work on several additional projects related to this
package, in addition to finishing the unfinished features\.

First, a command\-line program allowing browsing of buckets and transfer of files
from shell scripts and command prompts is useful\.

Second, a GUI\-based program allowing visual manipulation of bucket and resource
trees not unlike Windows Explorer would be useful\.

Third, a command\-line \(and perhaps a GUI\-based\) program called "OddJob" that
will use S3 to synchronize computation amongst multiple servers running OddJob\.
An S3 bucket will be set up with a number of scripts to run, and the OddJob
program can be invoked on multiple machines to run scripts on all the machines,
each moving on to the next unstarted task as it finishes each\. This is still
being designed, and it is intended primarily to be run on Amazon's Elastic
Compute Cloud\.

# <a name='section9'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section10'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *amazon\-s3* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[amazon](\.\./\.\./\.\./\.\./index\.md\#amazon),
[cloud](\.\./\.\./\.\./\.\./index\.md\#cloud), [s3](\.\./\.\./\.\./\.\./index\.md\#s3)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

2006,2008 Darren New\. All Rights Reserved\. See LICENSE\.TXT for terms\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/amazon-s3/xsxp.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

[//000000001]: # (xsxp \- Amazon S3 Web Service Utilities)
[//000000002]: # (Generated from file 'xsxp\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (2006 Darren New\. All Rights Reserved\.)
[//000000004]: # (xsxp\(n\) 1\.0 tcllib "Amazon S3 Web Service Utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

xsxp \- eXtremely Simple Xml Parser

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require xsxp 1  
package require xml  

[__xsxp::parse__ *xml*](#1)  
[__xsxp::fetch__ *pxml* *path* ?*part*?](#2)  
[__xsxp::fetchall__ *pxml\_list* *path* ?*part*?](#3)  
[__xsxp::only__ *pxml* *tagname*](#4)  
[__xsxp::prettyprint__ *pxml* ?*chan*?](#5)  

# <a name='description'></a>DESCRIPTION

This package provides a simple interface to parse XML into a pure\-value list\. It
also provides accessor routines to pull out specific subtags, not unlike DOM
access\. This package was written for and is used by Darren New's Amazon S3
access package\.

This is pretty lame, but I needed something like this for S3, and at the time,
TclDOM would not work with the new 8\.5 Tcl due to version number problems\.

In addition, this is a pure\-value implementation\. There is no garbage to clean
up in the event of a thrown error, for example\. This simplifies the code for
sufficiently small XML documents, which is what Amazon's S3 guarantees\.

Copyright 2006 Darren New\. All Rights Reserved\. NO WARRANTIES OF ANY TYPE ARE
PROVIDED\. COPYING OR USE INDEMNIFIES THE AUTHOR IN ALL WAYS\. This software is
licensed under essentially the same terms as Tcl\. See LICENSE\.txt for the terms\.

# <a name='section2'></a>COMMANDS

The package implements five rather simple procedures\. One parses, one is for
debugging, and the rest pull various parts of the parsed document out for
processing\.

  - <a name='1'></a>__xsxp::parse__ *xml*

    This parses an XML document \(using the standard xml tcllib module in a SAX
    sort of way\) and builds a data structure which it returns if the parsing
    succeeded\. The return value is referred to herein as a "pxml", or "parsed
    xml"\. The list consists of two or more elements:

      * The first element is the name of the tag\.

      * The second element is an array\-get formatted list of key/value pairs\.
        The keys are attribute names and the values are attribute values\. This
        is an empty list if there are no attributes on the tag\.

      * The third through end elements are the children of the node, if any\.
        Each child is, recursively, a pxml\.

      * Note that if the zero'th element, i\.e\. the tag name, is "%PCDATA", then
        the attributes will be empty and the third element will be the text of
        the element\. In addition, if an element's contents consists only of
        PCDATA, it will have only one child, and all the PCDATA will be
        concatenated\. In other words, this parser works poorly for XML with
        elements that contain both child tags and PCDATA\. Since Amazon S3 does
        not do this \(and for that matter most uses of XML where XML is a poor
        choice don't do this\), this is probably not a serious limitation\.

  - <a name='2'></a>__xsxp::fetch__ *pxml* *path* ?*part*?

    *pxml* is a parsed XML, as returned from xsxp::parse\. *path* is a list
    of element tag names\. Each element is the name of a child to look up,
    optionally followed by a hash \("\#"\) and a string of digits\. An empty list or
    an initial empty element selects *pxml*\. If no hash sign is present, the
    behavior is as if "\#0" had been appended to that element\. \(In addition to a
    list, slashes can separate subparts where convenient\.\)

    An element of *path* scans the children at the indicated level for the
    n'th instance of a child whose tag matches the part of the element before
    the hash sign\. If an element is simply "\#" followed by digits, that indexed
    child is selected, regardless of the tags in the children\. Hence, an element
    of "\#3" will always select the fourth child of the node under consideration\.

    *part* defaults to "%ALL"\. It can be one of the following case\-sensitive
    terms:

      * %ALL

        returns the entire selected element\.

      * %TAGNAME

        returns lindex 0 of the selected element\.

      * %ATTRIBUTES

        returns index 1 of the selected element\.

      * %CHILDREN

        returns lrange 2 through end of the selected element, resulting in a
        list of elements being returned\.

      * %PCDATA

        returns a concatenation of all the bodies of direct children of this
        node whose tag is %PCDATA\. It throws an error if no such children are
        found\. That is, part=%PCDATA means return the textual content found in
        that node but not its children nodes\.

      * %PCDATA?

        is like %PCDATA, but returns an empty string if no PCDATA is found\.

    For example, to fetch the first bold text from the fifth paragraph of the
    body of your HTML file,

        xsxp::fetch $pxml {body p#4 b} %PCDATA

  - <a name='3'></a>__xsxp::fetchall__ *pxml\_list* *path* ?*part*?

    This iterates over each PXML in *pxml\_list* \(which must be a list of
    pxmls\) selecting the indicated path from it, building a new list with the
    selected data, and returning that new list\.

    For example, *pxml\_list* might be the %CHILDREN of a particular element,
    and the *path* and *part* might select from each child a sub\-element in
    which we're interested\.

  - <a name='4'></a>__xsxp::only__ *pxml* *tagname*

    This iterates over the direct children of *pxml* and selects only those
    with *tagname* as their tag\. Returns a list of matching elements\.

  - <a name='5'></a>__xsxp::prettyprint__ *pxml* ?*chan*?

    This outputs to *chan* \(default stdout\) a pretty\-printed version of
    *pxml*\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *amazon\-s3* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[dom](\.\./\.\./\.\./\.\./index\.md\#dom), [parser](\.\./\.\./\.\./\.\./index\.md\#parser),
[xml](\.\./\.\./\.\./\.\./index\.md\#xml)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

2006 Darren New\. All Rights Reserved\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/asn/asn.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517

[//000000001]: # (asn \- ASN\.1 processing)
[//000000002]: # (Generated from file 'asn\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2004 Jochen Loewer <loewerj@web\.de>)
[//000000005]: # (Copyright &copy; 2004\-2011 Michael Schlenker <mic42@users\.sourceforge\.net>)
[//000000006]: # (asn\(n\) 0\.8 tcllib "ASN\.1 processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

asn \- ASN\.1 BER encoder/decoder

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

      - [ENCODER](#subsection1)

      - [DECODER](#subsection2)

      - [HANDLING TAGS](#subsection3)

  - [EXAMPLES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require asn ?0\.8\.4?  

[__::asn::asnSequence__ *evalue*\.\.\.](#1)  
[__::asn::asnSequenceFromList__ *elist*](#2)  
[__::asn::asnSet__ *evalue*\.\.\.](#3)  
[__::asn::asnSetFromList__ *elist*](#4)  
[__::asn::asnApplicationConstr__ *appNumber* *evalue*\.\.\.](#5)  
[__::asn::asnApplication__ *appNumber* *data*](#6)  
[__::asn::asnChoice__ *appNumber* *evalue*\.\.\.](#7)  
[__::asn::asnChoiceConstr__ *appNumber* *evalue*\.\.\.](#8)  
[__::asn::asnInteger__ *number*](#9)  
[__::asn::asnEnumeration__ *number*](#10)  
[__::asn::asnBoolean__ *bool*](#11)  
[__::asn::asnContext__ *context* *data*](#12)  
[__::asn::asnContextConstr__ *context* *evalue*\.\.\.](#13)  
[__::asn::asnObjectIdentifier__ *idlist*](#14)  
[__::asn::asnUTCTime__ *utcstring*](#15)  
[__::asn::asnNull__](#16)  
[__::asn::asnBitString__ *string*](#17)  
[__::asn::asnOctetString__ *string*](#18)  
[__::asn::asnNumericString__ *string*](#19)  
[__::asn::asnPrintableString__ *string*](#20)  
[__::asn::asnIA5String__ *string*](#21)  
[__::asn::asnBMPString__ *string*](#22)  
[__::asn::asnUTF8String__ *string*](#23)  
[__::asn::asnString__ *string*](#24)  
[__::asn::defaultStringType__ ?*type*?](#25)  
[__::asn::asnPeekByte__ *data\_var* *byte\_var*](#26)  
[__::asn::asnGetLength__ *data\_var* *length\_var*](#27)  
[__::asn::asnGetResponse__ *chan* *data\_var*](#28)  
[__::asn::asnGetInteger__ *data\_var* *int\_var*](#29)  
[__::asn::asnGetEnumeration__ *data\_var* *enum\_var*](#30)  
[__::asn::asnGetOctetString__ *data\_var* *string\_var*](#31)  
[__::asn::asnGetString__ *data\_var* *string\_var* ?*type\_var*?](#32)  
[__::asn::asnGetNumericString__ *data\_var* *string\_var*](#33)  
[__::asn::asnGetPrintableString__ *data\_var* *string\_var*](#34)  
[__::asn::asnGetIA5String__ *data\_var* *string\_var*](#35)  
[__::asn::asnGetBMPString__ *data\_var* *string\_var*](#36)  
[__::asn::asnGetUTF8String__ *data\_var* *string\_var*](#37)  
[__::asn::asnGetUTCTime__ *data\_var* *utc\_var*](#38)  
[__::asn::asnGetBitString__ *data\_var* *bits\_var*](#39)  
[__::asn::asnGetObjectIdentifier__ *data\_var* *oid\_var*](#40)  
[__::asn::asnGetBoolean__ *data\_var* *bool\_var*](#41)  
[__::asn::asnGetNull__ *data\_var*](#42)  
[__::asn::asnGetSequence__ *data\_var* *sequence\_var*](#43)  
[__::asn::asnGetSet__ *data\_var* *set\_var*](#44)  
[__::asn::asnGetApplication__ *data\_var* *appNumber\_var* ?*content\_var*? ?*encodingType\_var*?](#45)  
[__::asn::asnGetContext__ *data\_var* *contextNumber\_var* ?*content\_var*? ?*encodingType\_var*?](#46)  
[__::asn::asnPeekTag__ *data\_var* *tag\_var* *tagtype\_var* *constr\_var*](#47)  
[__::asn::asnTag__ *tagnumber* ?*class*? ?*tagstyle*?](#48)  
[__::asn::asnRetag__ *data\_var* *newTag*](#49)  

# <a name='description'></a>DESCRIPTION

The __asn__ package provides *partial* de\- and encoder commands for BER
encoded ASN\.1 data\. It can also be used for decoding DER, which is a restricted
subset of BER\.

ASN\.1 is a standard *Abstract Syntax Notation*, and BER are its *Basic
Encoding Rules*\.

See
[http://asn1\.elibel\.tm\.fr/en/standards/index\.htm](http://asn1\.elibel\.tm\.fr/en/standards/index\.htm)
for more information about the standard\.

Also see
[http://luca\.ntop\.org/Teaching/Appunti/asn1\.html](http://luca\.ntop\.org/Teaching/Appunti/asn1\.html)
for *A Layman's Guide to a Subset of ASN\.1, BER, and DER*, an RSA Laboratories
Technical Note by Burton S\. Kaliski Jr\. \(Revised November 1, 1993\)\. A text
version of this note is part of the module sources and should be read by any
implementor\.

# <a name='section2'></a>PUBLIC API

## <a name='subsection1'></a>ENCODER

  - <a name='1'></a>__::asn::asnSequence__ *evalue*\.\.\.

    Takes zero or more encoded values, packs them into an ASN sequence and
    returns its encoded binary form\.

  - <a name='2'></a>__::asn::asnSequenceFromList__ *elist*

    Takes a list of encoded values, packs them into an ASN sequence and returns
    its encoded binary form\.

  - <a name='3'></a>__::asn::asnSet__ *evalue*\.\.\.

    Takes zero or more encoded values, packs them into an ASN set and returns
    its encoded binary form\.

  - <a name='4'></a>__::asn::asnSetFromList__ *elist*

    Takes a list of encoded values, packs them into an ASN set and returns its
    encoded binary form\.

  - <a name='5'></a>__::asn::asnApplicationConstr__ *appNumber* *evalue*\.\.\.

    Takes zero or more encoded values, packs them into an ASN application
    construct and returns its encoded binary form\.

  - <a name='6'></a>__::asn::asnApplication__ *appNumber* *data*

    Takes a single encoded value *data*, packs it into an ASN application
    construct and returns its encoded binary form\.

  - <a name='7'></a>__::asn::asnChoice__ *appNumber* *evalue*\.\.\.

    Takes zero or more encoded values, packs them into an ASN choice construct
    and returns its encoded binary form\.

  - <a name='8'></a>__::asn::asnChoiceConstr__ *appNumber* *evalue*\.\.\.

    Takes zero or more encoded values, packs them into an ASN choice construct
    and returns its encoded binary form\.

  - <a name='9'></a>__::asn::asnInteger__ *number*

    Returns the encoded form of the specified integer *number*\.

  - <a name='10'></a>__::asn::asnEnumeration__ *number*

    Returns the encoded form of the specified enumeration id *number*\.

  - <a name='11'></a>__::asn::asnBoolean__ *bool*

    Returns the encoded form of the specified boolean value *bool*\.

  - <a name='12'></a>__::asn::asnContext__ *context* *data*

    Takes an encoded value and packs it into a constructed value with
    application tag, the *context* number\.

  - <a name='13'></a>__::asn::asnContextConstr__ *context* *evalue*\.\.\.

    Takes zero or more encoded values and packs them into a constructed value
    with application tag, the *context* number\.

  - <a name='14'></a>__::asn::asnObjectIdentifier__ *idlist*

    Takes a list of at least 2 integers describing an object identifier \(OID\)
    value, and returns the encoded value\.

  - <a name='15'></a>__::asn::asnUTCTime__ *utcstring*

    Returns the encoded form of the specified UTC time string\.

  - <a name='16'></a>__::asn::asnNull__

    Returns the NULL encoding\.

  - <a name='17'></a>__::asn::asnBitString__ *string*

    Returns the encoded form of the specified *string*\.

  - <a name='18'></a>__::asn::asnOctetString__ *string*

    Returns the encoded form of the specified *string*\.

  - <a name='19'></a>__::asn::asnNumericString__ *string*

    Returns the *string* encoded as ASN\.1 NumericString\. Raises an error if
    the *string* contains characters other than decimal numbers and space\.

  - <a name='20'></a>__::asn::asnPrintableString__ *string*

    Returns the *string* encoding as ASN\.1 PrintableString\. Raises an error if
    the *string* contains characters which are not allowed by the Printable
    String datatype\. The allowed characters are A\-Z, a\-z, 0\-9, space,
    apostrophe, colon, parentheses, plus, minus, comma, period, forward slash,
    question mark, and the equals sign\.

  - <a name='21'></a>__::asn::asnIA5String__ *string*

    Returns the *string* encoded as ASN\.1 IA5String\. Raises an error if the
    *string* contains any characters outside of the US\-ASCII range\.

  - <a name='22'></a>__::asn::asnBMPString__ *string*

    Returns the *string* encoded as ASN\.1 Basic Multilingual Plane string
    \(Which is essentialy big\-endian UCS2\)\.

  - <a name='23'></a>__::asn::asnUTF8String__ *string*

    Returns the *string* encoded as UTF8 String\. Note that some legacy
    applications such as Windows CryptoAPI do not like UTF8 strings\. Use
    BMPStrings if you are not sure\.

  - <a name='24'></a>__::asn::asnString__ *string*

    Returns an encoded form of *string*, choosing the most restricted ASN\.1
    string type possible\. If the string contains non\-ASCII characters, then
    there is more than one string type which can be used\. See
    __::asn::defaultStringType__\.

  - <a name='25'></a>__::asn::defaultStringType__ ?*type*?

    Selects the string type to use for the encoding of non\-ASCII strings\.
    Returns current default when called without argument\. If the argument
    *type* is supplied, it should be either __UTF8__ or __BMP__ to
    choose UTF8String or BMPString respectively\.

## <a name='subsection2'></a>DECODER

General notes:

  1. Nearly all decoder commands take two arguments\. These arguments are
     variable names, except for __::asn::asnGetResponse__\. The first
     variable contains the encoded ASN value to decode at the beginning, and
     more, and the second variable is where the value is stored to\. The
     remainder of the input after the decoded value is stored back into the
     datavariable\.

  1. After extraction the data variable is always modified first, before by
     writing the extracted value to its variable\. This means that if both
     arguments refer to the same variable, it will always contain the extracted
     value after the call, and not the remainder of the input\.

  - <a name='26'></a>__::asn::asnPeekByte__ *data\_var* *byte\_var*

    Retrieve the first byte of the data, without modifing *data\_var*\. This can
    be used to check for implicit tags\.

  - <a name='27'></a>__::asn::asnGetLength__ *data\_var* *length\_var*

    Decode the length information for a block of BER data\. The tag has already
    to be removed from the data\.

  - <a name='28'></a>__::asn::asnGetResponse__ *chan* *data\_var*

    Reads an encoded ASN *sequence* from the channel *chan* and stores it
    into the variable named by *data\_var*\.

  - <a name='29'></a>__::asn::asnGetInteger__ *data\_var* *int\_var*

    Assumes that an encoded integer value is at the front of the data stored in
    the variable named *data\_var*, extracts and stores it into the variable
    named by *int\_var*\. Additionally removes all bytes associated with the
    value from the data for further processing by the following decoder
    commands\.

  - <a name='30'></a>__::asn::asnGetEnumeration__ *data\_var* *enum\_var*

    Assumes that an enumeration id is at the front of the data stored in the
    variable named *data\_var*, and stores it into the variable named by
    *enum\_var*\. Additionally removes all bytes associated with the value from
    the data for further processing by the following decoder commands\.

  - <a name='31'></a>__::asn::asnGetOctetString__ *data\_var* *string\_var*

    Assumes that a string is at the front of the data stored in the variable
    named *data\_var*, and stores it into the variable named by *string\_var*\.
    Additionally removes all bytes associated with the value from the data for
    further processing by the following decoder commands\.

  - <a name='32'></a>__::asn::asnGetString__ *data\_var* *string\_var* ?*type\_var*?

    Decodes a user\-readable string\. This is a convenience function which is able
    to automatically distinguish all supported ASN\.1 string types and convert
    the input value appropriately\. See __::asn::asnGetPrintableString__,
    __::asnGetIA5String__, etc\. below for the type\-specific conversion
    commands\.

    If the optional third argument *type\_var* is supplied, then the type of
    the incoming string is stored in the variable named by it\.

    The function throws the error "Invalid command name
    asnGetSome__UnsupportedString__" if the unsupported string type
    __Unsupported__ is encountered\. You can create the appropriate function
    "asn::asnGetSome__UnsupportedString__" in your application if
    neccessary\.

  - <a name='33'></a>__::asn::asnGetNumericString__ *data\_var* *string\_var*

    Assumes that a numeric string value is at the front of the data stored in
    the variable named *data\_var*, and stores it into the variable named by
    *string\_var*\. Additionally removes all bytes associated with the value
    from the data for further processing by the following decoder commands\.

  - <a name='34'></a>__::asn::asnGetPrintableString__ *data\_var* *string\_var*

    Assumes that a printable string value is at the front of the data stored in
    the variable named *data\_var*, and stores it into the variable named by
    *string\_var*\. Additionally removes all bytes associated with the value
    from the data for further processing by the following decoder commands\.

  - <a name='35'></a>__::asn::asnGetIA5String__ *data\_var* *string\_var*

    Assumes that a IA5 \(ASCII\) string value is at the front of the data stored
    in the variable named *data\_var*, and stores it into the variable named by
    *string\_var*\. Additionally removes all bytes associated with the value
    from the data for further processing by the following decoder commands\.

  - <a name='36'></a>__::asn::asnGetBMPString__ *data\_var* *string\_var*

    Assumes that a BMP \(two\-byte unicode\) string value is at the front of the
    data stored in the variable named *data\_var*, and stores it into the
    variable named by *string\_var*, converting it into a proper Tcl string\.
    Additionally removes all bytes associated with the value from the data for
    further processing by the following decoder commands\.

  - <a name='37'></a>__::asn::asnGetUTF8String__ *data\_var* *string\_var*

    Assumes that a UTF8 string value is at the front of the data stored in the
    variable named *data\_var*, and stores it into the variable named by
    *string\_var*, converting it into a proper Tcl string\. Additionally removes
    all bytes associated with the value from the data for further processing by
    the following decoder commands\.

  - <a name='38'></a>__::asn::asnGetUTCTime__ *data\_var* *utc\_var*

    Assumes that a UTC time value is at the front of the data stored in the
    variable named *data\_var*, and stores it into the variable named by
    *utc\_var*\. The UTC time value is stored as a string, which has to be
    decoded with the usual clock scan commands\. Additionally removes all bytes
    associated with the value from the data for further processing by the
    following decoder commands\.

  - <a name='39'></a>__::asn::asnGetBitString__ *data\_var* *bits\_var*

    Assumes that a bit string value is at the front of the data stored in the
    variable named *data\_var*, and stores it into the variable named by
    *bits\_var* as a string containing only 0 and 1\. Additionally removes all
    bytes associated with the value from the data for further processing by the
    following decoder commands\.

  - <a name='40'></a>__::asn::asnGetObjectIdentifier__ *data\_var* *oid\_var*

    Assumes that a object identifier \(OID\) value is at the front of the data
    stored in the variable named *data\_var*, and stores it into the variable
    named by *oid\_var* as a list of integers\. Additionally removes all bytes
    associated with the value from the data for further processing by the
    following decoder commands\.

  - <a name='41'></a>__::asn::asnGetBoolean__ *data\_var* *bool\_var*

    Assumes that a boolean value is at the front of the data stored in the
    variable named *data\_var*, and stores it into the variable named by
    *bool\_var*\. Additionally removes all bytes associated with the value from
    the data for further processing by the following decoder commands\.

  - <a name='42'></a>__::asn::asnGetNull__ *data\_var*

    Assumes that a NULL value is at the front of the data stored in the variable
    named *data\_var* and removes the bytes used to encode it from the data\.

  - <a name='43'></a>__::asn::asnGetSequence__ *data\_var* *sequence\_var*

    Assumes that an ASN sequence is at the front of the data stored in the
    variable named *data\_var*, and stores it into the variable named by
    *sequence\_var*\. Additionally removes all bytes associated with the value
    from the data for further processing by the following decoder commands\.

    The data in *sequence\_var* is encoded binary and has to be further decoded
    according to the definition of the sequence, using the decoder commands
    here\.

  - <a name='44'></a>__::asn::asnGetSet__ *data\_var* *set\_var*

    Assumes that an ASN set is at the front of the data stored in the variable
    named *data\_var*, and stores it into the variable named by *set\_var*\.
    Additionally removes all bytes associated with the value from the data for
    further processing by the following decoder commands\.

    The data in *set\_var* is encoded binary and has to be further decoded
    according to the definition of the set, using the decoder commands here\.

  - <a name='45'></a>__::asn::asnGetApplication__ *data\_var* *appNumber\_var* ?*content\_var*? ?*encodingType\_var*?

    Assumes that an ASN application construct is at the front of the data stored
    in the variable named *data\_var*, and stores its id into the variable
    named by *appNumber\_var*\. Additionally removes all bytes associated with
    the value from the data for further processing by the following decoder
    commands\. If a *content\_var* is specified, then the command places all
    data associated with it into the named variable, in the binary form which
    can be processed using the decoder commands of this package\. If a
    *encodingType\_var* is specified, then that var is set to 1 if the encoding
    is constructed and 0 if it is primitive\.

    Otherwise it is the responsibility of the caller to decode the remainder of
    the application construct based on the id retrieved by this command, using
    the decoder commands of this package\.

  - <a name='46'></a>__::asn::asnGetContext__ *data\_var* *contextNumber\_var* ?*content\_var*? ?*encodingType\_var*?

    Assumes that an ASN context tag construct is at the front of the data stored
    in the variable named *data\_var*, and stores its id into the variable
    named by *contextNumber\_var*\. Additionally removes all bytes associated
    with the value from the data for further processing by the following decoder
    commands\. If a *content\_var* is specified, then the command places all
    data associated with it into the named variable, in the binary form which
    can be processed using the decoder commands of this package\. If a
    *encodingType\_var* is specified, then that var is set to 1 if the encoding
    is constructed and 0 if it is primitive\.

    Otherwise it is the responsibility of the caller to decode the remainder of
    the construct based on the id retrieved by this command, using the decoder
    commands of this package\.

## <a name='subsection3'></a>HANDLING TAGS

Working with ASN\.1 you often need to decode tagged values, which use a tag thats
different from the universal tag for a type\. In those cases you have to replace
the tag with the universal tag used for the type, to decode the value\. To decode
a tagged value use the __::asn::asnRetag__ to change the tag to the
appropriate type to use one of the decoders for primitive values\. To help with
this the module contains three functions:

  - <a name='47'></a>__::asn::asnPeekTag__ *data\_var* *tag\_var* *tagtype\_var* *constr\_var*

    The __::asn::asnPeekTag__ command can be used to take a peek at the data
    and decode the tag value, without removing it from the data\. The *tag\_var*
    gets set to the tag number, while the *tagtype\_var* gets set to the class
    of the tag\. \(Either UNIVERSAL, CONTEXT, APPLICATION or PRIVATE\)\. The
    *constr\_var* is set to 1 if the tag is for a constructed value, and to 0
    for not constructed\. It returns the length of the tag\.

  - <a name='48'></a>__::asn::asnTag__ *tagnumber* ?*class*? ?*tagstyle*?

    The __::asn::asnTag__ can be used to create a tag value\. The
    *tagnumber* gives the number of the tag, while the *class* gives one of
    the classes \(UNIVERSAL,CONTEXT,APPLICATION or PRIVATE\)\. The class may be
    abbreviated to just the first letter \(U,C,A,P\), default is UNIVERSAL\. The
    *tagstyle* is either C for Constructed encoding, or P for primitve
    encoding\. It defaults to P\. You can also use 1 instead of C and 0 instead of
    P for direct use of the values returned by __::asn::asnPeekTag__\.

  - <a name='49'></a>__::asn::asnRetag__ *data\_var* *newTag*

    Replaces the tag in front of the data in *data\_var* with *newTag*\. The
    new Tag can be created using the __::asn::asnTag__ command\.

# <a name='section3'></a>EXAMPLES

Examples for the usage of this package can be found in the implementation of
package __[ldap](\.\./ldap/ldap\.md)__\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *asn* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[asn](\.\./\.\./\.\./\.\./index\.md\#asn), [ber](\.\./\.\./\.\./\.\./index\.md\#ber),
[cer](\.\./\.\./\.\./\.\./index\.md\#cer), [der](\.\./\.\./\.\./\.\./index\.md\#der),
[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[protocol](\.\./\.\./\.\./\.\./index\.md\#protocol),
[x\.208](\.\./\.\./\.\./\.\./index\.md\#x\_208), [x\.209](\.\./\.\./\.\./\.\./index\.md\#x\_209)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>  
Copyright &copy; 2004 Jochen Loewer <loewerj@web\.de>  
Copyright &copy; 2004\-2011 Michael Schlenker <mic42@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/base32/base32.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

[//000000001]: # (base32 \- Base32 encoding)
[//000000002]: # (Generated from file 'base32\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Public domain)
[//000000004]: # (base32\(n\) 0\.1 tcllib "Base32 encoding")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

base32 \- base32 standard encoding

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Code map](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require base32::core ?0\.1?  
package require base32 ?0\.1?  

[__::base32::encode__ *string*](#1)  
[__::base32::decode__ *estring*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides commands for encoding and decoding of strings into and out
of the standard base32 encoding as specified in RFC 3548\.

# <a name='section2'></a>API

  - <a name='1'></a>__::base32::encode__ *string*

    This command encodes the given *string* in base32 and returns the encoded
    string as its result\. The result may be padded with the character __=__
    to signal a partial encoding at the end of the input string\.

  - <a name='2'></a>__::base32::decode__ *estring*

    This commands takes the *estring* and decodes it under the assumption that
    it is a valid base32 encoded string\. The result of the decoding is returned
    as the result of the command\.

    Note that while the encoder will generate only uppercase characters this
    decoder accepts input in lowercase as well\.

    The command will always throw an error whenever encountering conditions
    which signal some type of bogus input, namely if

      1. the input contains characters which are not valid output of a base32
         encoder,

      1. the length of the input is not a multiple of eight,

      1. padding appears not at the end of input, but in the middle,

      1. the padding has not of length six, four, three, or one characters,

# <a name='section3'></a>Code map

The code map used to convert 5\-bit sequences is shown below, with the numeric id
of the bit sequences to the left and the character used to encode it to the
right\. It should be noted that the characters "0" and "1" are not used by the
encoding\. This is done as these characters can be easily confused with "O", "o"
and "l" \(L\)\.

    0 A    9 J   18 S   27 3
    1 B   10 K   19 T   28 4
    2 C   11 L   20 U   29 5
    3 D   12 M   21 V   30 6
    4 E   13 N   22 W   31 7
    5 F   14 O   23 X
    6 G   15 P   24 Y
    7 H   16 Q   25 Z
    8 I   17 R   26 2

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *base32* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[base32](\.\./\.\./\.\./\.\./index\.md\#base32),
[rfc3548](\.\./\.\./\.\./\.\./index\.md\#rfc3548)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Public domain
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































Deleted embedded/md/tcllib/files/modules/base32/base32core.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109

[//000000001]: # (base32::core \- Base32 encoding)
[//000000002]: # (Generated from file 'base32core\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Public domain)
[//000000004]: # (base32::core\(n\) 0\.1 tcllib "Base32 encoding")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

base32::core \- Expanding basic base32 maps

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require base32::core ?0\.1?  

[__::base32::core::define__ *map* *forwvar* *backwvar* *ivar*](#1)  
[__::base32::core::valid__ *string* *pattern* *mvar*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides generic commands for the construction of full base32
mappings from a basic mapping listing just the codes and associated characters\.
The full mappings, regular and inverse, created here map to and from bit
sequences, and also handle the partial mappings at the end of a string\.

This is in essence an internal package to be used by implementors of a base32
en\- and decoder\. A regular user has no need of this package at all\.

# <a name='section2'></a>API

  - <a name='1'></a>__::base32::core::define__ *map* *forwvar* *backwvar* *ivar*

    This command computes full forward and backward \(inverse\) mappings from the
    basic *map* and stores them in the variables named by *forwvar* and
    *backwvar* resp\. It also constructs a regexp pattern for the detection of
    invalid characters in supposedly base32 encoded input and stores it in the
    variable named by *ivar*\.

  - <a name='2'></a>__::base32::core::valid__ *string* *pattern* *mvar*

    This command checks if the input *string* is a valid base32 encoded
    string, based on the *pattern* of invalid characters as generated by
    __::base32::core::define__, and some other general rules\.

    The result of the command is a boolean flag\. Its value is __True__ for a
    valid *string*, and __False__ otherwise\. In the latter case an error
    message describing the problem with the input is stored into the variable
    named by *mvar*\. The variable is not touched if the input was found to be
    valid\.

    The rules checked by the command, beyond rejection of bad characters, are:

      1. The length of the input is not a multiple of eight,

      1. The padding appears not at the end of input, but in the middle,

      1. The padding has not of length six, four, three, or one characters,

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *base32* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[base32](\.\./\.\./\.\./\.\./index\.md\#base32)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Public domain
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































Deleted embedded/md/tcllib/files/modules/base32/base32hex.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

[//000000001]: # (base32::hex \- Base32 encoding)
[//000000002]: # (Generated from file 'base32hex\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Public domain)
[//000000004]: # (base32::hex\(n\) 0\.1 tcllib "Base32 encoding")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

base32::hex \- base32 extended hex encoding

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Code map](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require base32::core ?0\.1?  
package require base32::hex ?0\.1?  

[__::base32::hex::encode__ *string*](#1)  
[__::base32::hex::decode__ *estring*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides commands for encoding and decoding of strings into and out
of the extended hex base32 encoding as specified in the RFC 3548bis draft\.

# <a name='section2'></a>API

  - <a name='1'></a>__::base32::hex::encode__ *string*

    This command encodes the given *string* in extended hex base32 and returns
    the encoded string as its result\. The result may be padded with the
    character __=__ to signal a partial encoding at the end of the input
    string\.

  - <a name='2'></a>__::base32::hex::decode__ *estring*

    This commands takes the *estring* and decodes it under the assumption that
    it is a valid extended hex base32 encoded string\. The result of the decoding
    is returned as the result of the command\.

    Note that while the encoder will generate only uppercase characters this
    decoder accepts input in lowercase as well\.

    The command will always throw an error whenever encountering conditions
    which signal some type of bogus input, namely if

      1. the input contains characters which are not valid output of a extended
         hex base32 encoder,

      1. the length of the input is not a multiple of eight,

      1. padding appears not at the end of input, but in the middle,

      1. the padding has not of length six, four, three, or one characters,

# <a name='section3'></a>Code map

The code map used to convert 5\-bit sequences is shown below, with the numeric id
of the bit sequences to the left and the character used to encode it to the
right\. The important feature of the extended hex mapping is that the first 16
codes map to the digits and hex characters\.

    0 0    9 9        18 I   27 R
    1 1   10 A        19 J   28 S
    2 2   11 B        20 K   29 T
    3 3   12 C        21 L   30 U
    4 4   13 D        22 M   31 V
    5 5   14 E        23 N
    6 6   15 F        24 O
    7 7        16 G   25 P
    8 8        17 H   26 Q

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *base32* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[base32](\.\./\.\./\.\./\.\./index\.md\#base32), [hex](\.\./\.\./\.\./\.\./index\.md\#hex),
[rfc3548](\.\./\.\./\.\./\.\./index\.md\#rfc3548)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Public domain
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































Deleted embedded/md/tcllib/files/modules/base64/ascii85.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

[//000000001]: # (ascii85 \- Text encoding & decoding binary data)
[//000000002]: # (Generated from file 'ascii85\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2010, Emiliano Gavilán)
[//000000004]: # (ascii85\(n\) 1\.0 tcllib "Text encoding & decoding binary data")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ascii85 \- ascii85\-encode/decode binary data

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLES](#section2)

  - [References](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require ascii85 ?1\.0?  

[__::ascii85::encode__ ?__\-maxlen__ *maxlen*? ?__\-wrapchar__ *wrapchar*? *string*](#1)  
[__::ascii85::decode__ *string*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides procedures to encode binary data into ascii85 and back\.

  - <a name='1'></a>__::ascii85::encode__ ?__\-maxlen__ *maxlen*? ?__\-wrapchar__ *wrapchar*? *string*

    Ascii85 encodes the given binary *string* and returns the encoded result\.
    Inserts the character *wrapchar* every *maxlen* characters of output\.
    *wrapchar* defaults to newline\. *maxlen* defaults to __76__\.

    *Note well*: If your string is not simple ascii you should fix the string
    encoding before doing ascii85 encoding\. See the examples\.

    The command will throw an error for negative values of *maxlen*, or if
    *maxlen* is not an integer number\.

  - <a name='2'></a>__::ascii85::decode__ *string*

    Ascii85 decodes the given *string* and returns the binary data\. The
    decoder ignores whitespace in the string, as well as tabs and newlines\.

# <a name='section2'></a>EXAMPLES

    % ascii85::encode "Hello, world"
    87cURD_*#TDfTZ)

    % ascii85::encode [string repeat xyz 24]
    G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G
    ^4U[H$X^\H?a^]
    % ascii85::encode -wrapchar "" [string repeat xyz 24]
    G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]

    # NOTE: ascii85 encodes BINARY strings.
    % set chemical [encoding convertto utf-8 "C\u2088H\u2081\u2080N\u2084O\u2082"]
    % set encoded [ascii85::encode $chemical]
    6fN]R8E,5Pidu\UiduhZidua
    % set caffeine [encoding convertfrom utf-8 [ascii85::decode $encoded]]

# <a name='section3'></a>References

  1. [http://en\.wikipedia\.org/wiki/Ascii85](http://en\.wikipedia\.org/wiki/Ascii85)

  1. Postscript Language Reference Manual, 3rd Edition, page 131\.
     [http://www\.adobe\.com/devnet/postscript/pdfs/PLRM\.pdf](http://www\.adobe\.com/devnet/postscript/pdfs/PLRM\.pdf)

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *base64* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[ascii85](\.\./\.\./\.\./\.\./index\.md\#ascii85),
[encoding](\.\./\.\./\.\./\.\./index\.md\#encoding)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2010, Emiliano Gavilán
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































Deleted embedded/md/tcllib/files/modules/base64/base64.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

[//000000001]: # (base64 \- Text encoding & decoding binary data)
[//000000002]: # (Generated from file 'base64\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2000, Eric Melski)
[//000000004]: # (Copyright &copy; 2001, Miguel Sofer)
[//000000005]: # (base64\(n\) 2\.4\.2 tcllib "Text encoding & decoding binary data")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

base64 \- base64\-encode/decode binary data

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8  
package require base64 ?2\.4\.2?  

[__::base64::encode__ ?__\-maxlen__ *maxlen*? ?__\-wrapchar__ *wrapchar*? *string*](#1)  
[__::base64::decode__ *string*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides procedures to encode binary data into base64 and back\.

  - <a name='1'></a>__::base64::encode__ ?__\-maxlen__ *maxlen*? ?__\-wrapchar__ *wrapchar*? *string*

    Base64 encodes the given binary *string* and returns the encoded result\.
    Inserts the character *wrapchar* every *maxlen* characters of output\.
    *wrapchar* defaults to newline\. *maxlen* defaults to __76__\.

    *Note* that if *maxlen* is set to __0__, the output will not be
    wrapped at all\.

    *Note well*: If your string is not simple ascii you should fix the string
    encoding before doing base64 encoding\. See the examples\.

    The command will throw an error for negative values of *maxlen*, or if
    *maxlen* is not an integer number\.

  - <a name='2'></a>__::base64::decode__ *string*

    Base64 decodes the given *string* and returns the binary data\. The decoder
    ignores whitespace in the string\.

# <a name='section2'></a>EXAMPLES

    % base64::encode "Hello, world"
    SGVsbG8sIHdvcmxk

    % base64::encode [string repeat xyz 20]
    eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6
    eHl6eHl6eHl6
    % base64::encode -wrapchar "" [string repeat xyz 20]
    eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6

    # NOTE: base64 encodes BINARY strings.
    % set chemical [encoding convertto utf-8 "C\u2088H\u2081\u2080N\u2084O\u2082"]
    % set encoded [base64::encode $chemical]
    Q+KCiEjigoHigoBO4oKET+KCgg==
    % set caffeine [encoding convertfrom utf-8 [base64::decode $encoded]]

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *base64* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[base64](\.\./\.\./\.\./\.\./index\.md\#base64),
[encoding](\.\./\.\./\.\./\.\./index\.md\#encoding)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2000, Eric Melski  
Copyright &copy; 2001, Miguel Sofer
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































Deleted embedded/md/tcllib/files/modules/base64/uuencode.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138

[//000000001]: # (uuencode \- Text encoding & decoding binary data)
[//000000002]: # (Generated from file 'uuencode\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002, Pat Thoyts)
[//000000004]: # (uuencode\(n\) 1\.1\.4 tcllib "Text encoding & decoding binary data")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

uuencode \- UU\-encode/decode binary data

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [OPTIONS](#section2)

  - [EXAMPLES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8  
package require uuencode ?1\.1\.4?  

[__::uuencode::encode__ *string*](#1)  
[__::uuencode::decode__ *string*](#2)  
[__::uuencode::uuencode__ ?__\-name__ *string*? ?__\-mode__ *octal*? \(__\-file__ *filename* &#124; ?__\-\-__? *string*\)](#3)  
[__::uuencode::uudecode__ \(__\-file__ *filename* &#124; ?__\-\-__? *string*\)](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a Tcl\-only implementation of the __uuencode\(1\)__ and
__uudecode\(1\)__ commands\. This encoding packs binary data into printable
ASCII characters\.

  - <a name='1'></a>__::uuencode::encode__ *string*

    returns the uuencoded data\. This will encode all the data passed in even if
    this is longer than the uuencode maximum line length\. If the number of input
    bytes is not a multiple of 3 then additional 0 bytes are added to pad the
    string\.

  - <a name='2'></a>__::uuencode::decode__ *string*

    Decodes the given encoded data\. This will return any padding characters as
    well and it is the callers responsibility to deal with handling the actual
    length of the encoded data\. \(see uuencode\)\.

  - <a name='3'></a>__::uuencode::uuencode__ ?__\-name__ *string*? ?__\-mode__ *octal*? \(__\-file__ *filename* &#124; ?__\-\-__? *string*\)

  - <a name='4'></a>__::uuencode::uudecode__ \(__\-file__ *filename* &#124; ?__\-\-__? *string*\)

    UUDecode a file or block of data\. A file may contain more than one embedded
    file so the result is a list where each element is a three element list of
    filename, mode value and data\.

# <a name='section2'></a>OPTIONS

  - \-filename name

    Cause the uuencode or uudecode commands to read their data from the named
    file rather that taking a string parameter\.

  - \-name string

    The uuencoded data header line contains the suggested file name to be used
    when unpacking the data\. Use this option to change this from the default of
    "data\.dat"\.

  - \-mode octal

    The uuencoded data header line contains a suggested permissions bit pattern
    expressed as an octal string\. To change the default of 0644 you can set this
    option\. For instance, 0755 would be suitable for an executable\. See
    __chmod\(1\)__\.

# <a name='section3'></a>EXAMPLES

    % set d [uuencode::encode "Hello World!"]
    2&5L;&\\@5V]R;&0A

    % uuencode::uudecode $d
    Hello World!

    % set d [uuencode::uuencode -name hello.txt "Hello World"]
    begin 644 hello.txt
    +2&5L;&\@5V]R;&0`
    `
    end

    % uuencode::uudecode $d
    {hello.txt 644 {Hello World}}

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *base64* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[encoding](\.\./\.\./\.\./\.\./index\.md\#encoding),
[uuencode](\.\./\.\./\.\./\.\./index\.md\#uuencode)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002, Pat Thoyts
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































Deleted embedded/md/tcllib/files/modules/base64/yencode.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139

[//000000001]: # (yencode \- Text encoding & decoding binary data)
[//000000002]: # (Generated from file 'yencode\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002, Pat Thoyts)
[//000000004]: # (yencode\(n\) 1\.1\.2 tcllib "Text encoding & decoding binary data")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

yencode \- Y\-encode/decode binary data

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [OPTIONS](#section2)

  - [References](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require yencode ?1\.1\.2?  

[__::yencode::encode__ *string*](#1)  
[__::yencode::decode__ *string*](#2)  
[__::yencode::yencode__ ?__\-name__ *string*? ?__\-line__ *integer*? ?__\-crc32__ *boolean*? \(__\-file__ *filename* &#124; ?__\-\-__? *string*\)](#3)  
[__::yencode::ydecode__ \(__\-file__ *filename* &#124; ?__\-\-__? *string*\)](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a Tcl\-only implementation of the yEnc file encoding\. This
is a recently introduced method of encoding binary files for transmission
through Usenet\. This encoding packs binary data into a format that requires an
8\-bit clean transmission layer but that escapes characters special to the
*[NNTP](\.\./\.\./\.\./\.\./index\.md\#nntp)* posting protocols\. See
[http://www\.yenc\.org/](http://www\.yenc\.org/) for details concerning the
algorithm\.

  - <a name='1'></a>__::yencode::encode__ *string*

    returns the yEnc encoded data\.

  - <a name='2'></a>__::yencode::decode__ *string*

    Decodes the given yEnc encoded data\.

  - <a name='3'></a>__::yencode::yencode__ ?__\-name__ *string*? ?__\-line__ *integer*? ?__\-crc32__ *boolean*? \(__\-file__ *filename* &#124; ?__\-\-__? *string*\)

    Encode a file or block of data\.

  - <a name='4'></a>__::yencode::ydecode__ \(__\-file__ *filename* &#124; ?__\-\-__? *string*\)

    Decode a file or block of data\. A file may contain more than one embedded
    file so the result is a list where each element is a three element list of
    filename, file size and data\.

# <a name='section2'></a>OPTIONS

  - \-filename name

    Cause the yencode or ydecode commands to read their data from the named file
    rather that taking a string parameter\.

  - \-name string

    The encoded data header line contains the suggested file name to be used
    when unpacking the data\. Use this option to change this from the default of
    "data\.dat"\.

  - \-line integer

    The yencoded data header line contains records the line length used during
    the encoding\. Use this option to select a line length other that the default
    of 128\. Note that NNTP imposes a 1000 character line length limit and some
    gateways may have trouble with more than 255 characters per line\.

  - \-crc32 boolean

    The yEnc specification recommends the inclusion of a cyclic redundancy check
    value in the footer\. Use this option to change the default from *true* to
    *false*\.

    % set d [yencode::yencode -file testfile.txt]
    =ybegin line=128 size=584 name=testfile.txt
     -o- data not shown -o-
    =yend size=584 crc32=ded29f4f

# <a name='section3'></a>References

  1. [http://www\.yenc\.org/yenc\-draft\.1\.3\.txt](http://www\.yenc\.org/yenc\-draft\.1\.3\.txt)

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *base64* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[encoding](\.\./\.\./\.\./\.\./index\.md\#encoding),
[yEnc](\.\./\.\./\.\./\.\./index\.md\#yenc),
[ydecode](\.\./\.\./\.\./\.\./index\.md\#ydecode),
[yencode](\.\./\.\./\.\./\.\./index\.md\#yencode)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002, Pat Thoyts
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































Deleted embedded/md/tcllib/files/modules/bee/bee.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344

[//000000001]: # (bee \- BitTorrent)
[//000000002]: # (Generated from file 'bee\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (bee\(n\) 0\.1 tcllib "BitTorrent")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

bee \- BitTorrent Serialization Format Encoder/Decoder

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

      - [ENCODER](#subsection1)

      - [DECODER](#subsection2)

  - [FORMAT DEFINITION](#section3)

  - [EXAMPLES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require bee ?0\.1?  

[__::bee::encodeString__ *string*](#1)  
[__::bee::encodeNumber__ *integer*](#2)  
[__::bee::encodeListArgs__ *value*\.\.\.](#3)  
[__::bee::encodeList__ *list*](#4)  
[__::bee::encodeDictArgs__ *key* *value*\.\.\.](#5)  
[__::bee::encodeDict__ *dict*](#6)  
[__::bee::decode__ *string* ?*endvar*? ?*start*?](#7)  
[__::bee::decodeIndices__ *string* ?*endvar*? ?*start*?](#8)  
[__::bee::decodeChannel__ *chan* __\-command__ *cmdprefix* ?__\-exact__? ?__\-prefix__ *data*?](#9)  
[__cmdprefix__ __eof__ *token*](#10)  
[__cmdprefix__ __error__ *token* *message*](#11)  
[__cmdprefix__ __value__ *token* *value*](#12)  
[__::bee::decodeCancel__ *token*](#13)  
[__::bee::decodePush__ *token* *string*](#14)  

# <a name='description'></a>DESCRIPTION

The __bee__ package provides de\- and encoder commands for data in bencoding
\(speak 'bee'\), the serialization format for data and messages used by the
BitTorrent protocol\.

# <a name='section2'></a>PUBLIC API

## <a name='subsection1'></a>ENCODER

The package provides one encoder command for each of the basic forms, and two
commands per container, one taking a proper tcl data structure to encode in the
container, the other taking the same information as several arguments\.

  - <a name='1'></a>__::bee::encodeString__ *string*

    Returns the bee\-encoding of the *string*\.

  - <a name='2'></a>__::bee::encodeNumber__ *integer*

    Returns the bee\-encoding of the *integer* number\.

  - <a name='3'></a>__::bee::encodeListArgs__ *value*\.\.\.

    Takes zero or more bee\-encoded values and returns the bee\-encoding of their
    list\.

  - <a name='4'></a>__::bee::encodeList__ *list*

    Takes a list of bee\-encoded values and returns the bee\-encoding of the list\.

  - <a name='5'></a>__::bee::encodeDictArgs__ *key* *value*\.\.\.

    Takes zero or more pairs of keys and values and returns the bee\-encoding of
    the dictionary they form\. The values are expected to be already bee\-encoded,
    but the keys must not be\. Their encoding will be done by the command itself\.

  - <a name='6'></a>__::bee::encodeDict__ *dict*

    Takes a dictionary list of string keys and bee\-encoded values and returns
    the bee\-encoding of the list\. Note that the keys in the input must not be
    bee\-encoded already\. This will be done by the command itself\.

## <a name='subsection2'></a>DECODER

The package provides two main decoder commands, one for decoding a string
expected to contain a complete data structure, the other for the incremental
decoding of bee\-values arriving on a channel\. The latter command is asynchronous
and provides the completed decoded values to the user through a command
callback\.

  - <a name='7'></a>__::bee::decode__ *string* ?*endvar*? ?*start*?

    Takes the bee\-encoding in the string and returns one decoded value\. In the
    case of this being a container all contained values are decoded recursively
    as well and the result is a properly nested tcl list and/or dictionary\.

    If the optional *endvar* is set then it is the name of a variable to store
    the index of the first character *after* the decoded value into\. In other
    words, if the string contains more than one value then *endvar* can be
    used to obtain the position of the bee\-value after the bee\-value currently
    decoded\. together with *start*, see below, it is possible to iterate over
    the string to extract all contained values\.

    The optional *start* index defaults to __0__, i\.e\. the beginning of
    the string\. It is the index of the first character of the bee\-encoded value
    to extract\.

  - <a name='8'></a>__::bee::decodeIndices__ *string* ?*endvar*? ?*start*?

    Takes the same arguments as __::bee::decode__ and returns the same
    information in *endvar*\. The result however is different\. Instead of the
    tcl value contained in the *string* it returns a list describing the value
    with respect to type and location \(indices for the first and last character
    of the bee\-value\)\. In case of a container the structure also contains the
    same information for all the embedded values\.

    Formally the results for the various types of bee\-values are:

      * string

        A list containing three elements:

          + The constant string __string__, denoting the type of the value\.

          + An integer number greater than or equal to zero\. This is the index
            of the first character of the bee\-value in the input *string*\.

          + An integer number greater than or equal to zero\. This is the index
            of the last character of the bee\-value in the input *string*\.

        *Note* that this information is present in the results for all four
        types of bee\-values, with only the first element changing according to
        the type of the value\.

      * integer

        The result is like for strings, except that the type element contains
        the constant string __integer__\.

      * list

        The result is like before, with two exceptions: One, the type element
        contains the constant string __list__\. And two, the result actually
        contains four elements\. The last element is new, and contains the index
        data as described here for all elements of the bee\-list\.

      * dictionary

        The result is like for strings, except that the type element contains
        the constant string __dict__\. A fourth element is present as well,
        with a slightly different structure than for lists\. The element is a
        dictionary mapping from the strings keys of the bee\-dictionary to a list
        containing two elements\. The first of them is the index information for
        the key, and the second element is the index information for the value
        the key maps to\. This structure is the only which contains not only
        index data, but actual values from the bee\-string\. While the index
        information of the keys is unique enough, i\.e\. serviceable as keys, they
        are not easy to navigate when trying to find particular element\. Using
        the actual keys makes this much easier\.

  - <a name='9'></a>__::bee::decodeChannel__ *chan* __\-command__ *cmdprefix* ?__\-exact__? ?__\-prefix__ *data*?

    The command creates a decoder for a series of bee\-values arriving on the
    channel *chan* and returns its handle\. This handle can be used to remove
    the decoder again\. Setting up another bee decoder on *chan* while a bee
    decoder is still active will fail with an error message\.

      * __\-command__

        The command prefix *cmdprefix* specified by the *required* option
        __\-command__ is used to report extracted values and exceptional
        situations \(error, and EOF on the channel\)\. The callback will be
        executed at the global level of the interpreter, with two or three
        arguments\. The exact call signatures are

          + <a name='10'></a>__cmdprefix__ __eof__ *token*

            The decoder has reached eof on the channel *chan*\. No further
            invocations of the callback will be made after this\. The channel has
            already been closed at the time of the call, and the *token* is
            not valid anymore as well\.

          + <a name='11'></a>__cmdprefix__ __error__ *token* *message*

            The decoder encountered an error, which is not eof\. For example a
            malformed bee\-value\. The *message* provides details about the
            error\. The decoder token is in the same state as for eof, i\.e\.
            invalid\. The channel however is kept open\.

          + <a name='12'></a>__cmdprefix__ __value__ *token* *value*

            The decoder received and successfully decoded a bee\-value\. The
            format of the equivalent tcl *value* is the same as returned by
            __::bee::decode__\. The channel is still open and the decoder
            token is valid\. This means that the callback is able to remove the
            decoder\.

      * __\-exact__

        By default the decoder assumes that the remainder of the data in the
        channel consists only of bee\-values, and reads as much as possible per
        event, without regard for boundaries between bee\-values\. This means that
        if the the input contains non\-bee data after a series of bee\-value the
        beginning of that data may be lost because it was already read by the
        decoder, but not processed\.

        The __\-exact__ was made for this situation\. When specified the
        decoder will take care to not read any characters behind the currently
        processed bee\-value, so that any non\-bee data is kept in the channel for
        further processing after removal of the decoder\.

      * __\-prefix__

        If this option is specified its value is assumed to be the beginning of
        the bee\-value and used to initialize the internal decoder buffer\. This
        feature is required if the creator of the decoder used data from the
        channel to determine if it should create the decoder or not\. Without the
        option this data would be lost to the decoding\.

  - <a name='13'></a>__::bee::decodeCancel__ *token*

    This command cancels the decoder set up by __::bee::decodeChannel__ and
    represented by the handle *token*\.

  - <a name='14'></a>__::bee::decodePush__ *token* *string*

    This command appends the *string* to the internal decoder buffer\. It is
    the runtime equivalent of the option __\-prefix__ of
    __::bee::decodeChannel__\. Use it to push data back into the decoder when
    the __value__ callback used data from the channel to determine if it
    should decode another bee\-value or not\.

# <a name='section3'></a>FORMAT DEFINITION

Data in the bee serialization format is constructed from two basic forms, and
two container forms\. The basic forms are strings and integer numbers, and the
containers are lists and dictionaries\.

  - String *S*

    A string *S* of length *L* is encoded by the string
    "*L*__:__*S*", where the length is written out in textual form\.

  - Integer *N*

    An integer number *N* is encoded by the string "__i__*N*__e__"\.

  - List *v1* \.\.\. *vn*

    A list of the values *v1* to *vn* is encoded by the string
    "__l__*BV1*\.\.\.*BVn*__e__" where "BV__i__" is the
    bee\-encoding of the value "v__i__"\.

  - Dict *k1* \-> *v1* \.\.\.

    A dictionary mapping the string key *k*__i__ to the value
    *v*__i__, for __i__ in __1__ \.\.\. __n__ is encoded by the
    string "__d__*BK*__i__*BV*__i__\.\.\.__e__" for i in
    __1__ \.\.\. __n__, where "BK__i__" is the bee\-encoding of the key
    string "k__i__"\. and "BV__i__" is the bee\-encoding of the value
    "v__i__"\.

    *Note*: The bee\-encoding does not retain the order of the keys in the
    input, but stores in a sorted order\. The sorting is done for the "raw
    strings"\.

Note that the type of each encoded item can be determined immediately from the
first character of its representation:

  - i

    Integer\.

  - l

    List\.

  - d

    Dictionary\.

  - \[0\-9\]

    String\.

By wrapping an integer number into __i__\.\.\.__e__ the format makes sure
that they are different from strings, which all begin with a digit\.

# <a name='section4'></a>EXAMPLES

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *bee* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[BitTorrent](\.\./\.\./\.\./\.\./index\.md\#bittorrent),
[bee](\.\./\.\./\.\./\.\./index\.md\#bee),
[bittorrent](\.\./\.\./\.\./\.\./index\.md\#bittorrent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[torrent](\.\./\.\./\.\./\.\./index\.md\#torrent)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/bench/bench.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308

[//000000001]: # (bench \- Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (bench\(n\) 0\.4 tcllib "Benchmarking/Performance tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

bench \- bench \- Processing benchmark suites

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

      - [Benchmark execution](#subsection1)

      - [Result manipulation](#subsection2)

      - [Result format](#subsection3)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require bench ?0\.4?  

[__::bench::locate__ *pattern* *paths*](#1)  
[__::bench::run__ ?*option value*\.\.\.? *interp\_list* *file*\.\.\.](#2)  
[__::bench::versions__ *interp\_list*](#3)  
[__::bench::del__ *bench\_result* *column*](#4)  
[__::bench::edit__ *bench\_result* *column* *newvalue*](#5)  
[__::bench::merge__ *bench\_result*\.\.\.](#6)  
[__::bench::norm__ *bench\_result* *column*](#7)  
[__::bench::out::raw__ *bench\_result*](#8)  

# <a name='description'></a>DESCRIPTION

This package provides commands for the execution of benchmarks written in the
bench language, and for the processing of results generated by such execution\.

A reader interested in the bench language itself should start with the *[bench
language introduction](bench\_lang\_intro\.md)* and proceed from there to the
formal *[bench language specification](bench\_lang\_spec\.md)*\.

# <a name='section2'></a>PUBLIC API

## <a name='subsection1'></a>Benchmark execution

  - <a name='1'></a>__::bench::locate__ *pattern* *paths*

    This command locates Tcl interpreters and returns a list containing their
    paths\. It searches them in the list of *paths* specified by the caller,
    using the glob *pattern*\.

    The command resolves soft links to find the actual executables matching the
    pattern\. Note that only interpreters which are marked as executable and are
    actually executable on the current platform are put into the result\.

  - <a name='2'></a>__::bench::run__ ?*option value*\.\.\.? *interp\_list* *file*\.\.\.

    This command executes the benchmarks declared in the set of files, once per
    Tcl interpreter specified via the *interp\_list*, and per the configuration
    specified by the options, and then returns the accumulated timing results\.
    The format of this result is described in section [Result
    format](#subsection3)\.

    It is assumed that the contents of the files are written in the bench
    language\.

    The available options are

      * __\-errors__ *flag*

        The argument is a boolean value\. If set errors in benchmarks are
        propagated to the command, aborting benchmark execution\. Otherwise they
        are recorded in the timing result via a special result code\. The default
        is to propagate and abort\.

      * __\-threads__ *n*

        The argument is a non\-negative integer value declaring the number of
        threads to use while executing the benchmarks\. The default value is
        __0__, to not use threads\.

      * __\-match__ *pattern*

        The argument is a glob pattern\. Only benchmarks whose description
        matches the pattern are executed\. The default is the empty string, to
        execute all patterns\.

      * __\-rmatch__ *pattern*

        The argument is a regular expression pattern\. Only benchmarks whose
        description matches the pattern are executed\. The default is the empty
        string, to execute all patterns\.

      * __\-iters__ *n*

        The argument is positive integer number, the maximal number of
        iterations for any benchmark\. The default is __1000__\. Individual
        benchmarks can override this\.

      * __\-pkgdir__ *path*

        The argument is a path to an existing, readable directory\. Multiple
        paths can be specified, simply use the option multiple times, each time
        with one of the paths to use\.

        If no paths were specified the system will behave as before\. If one or
        more paths are specified, say __N__, each of the specified
        interpreters will be invoked __N__ times, with one of the specified
        paths\. The chosen path is put into the interpreters' __auto\_path__,
        thus allowing it to find specific versions of a package\.

        In this way the use of __\-pkgdir__ allows the user to benchmark
        several different versions of a package, against one or more
        interpreters\.

        *Note:* The empty string is allowed as a path and causes the system to
        run the specified interpreters with an unmodified __auto\_path__\. In
        case the package in question is available there as well\.

  - <a name='3'></a>__::bench::versions__ *interp\_list*

    This command takes a list of Tcl interpreters, identified by their path, and
    returns a dictionary mapping from the interpreters to their versions\.
    Interpreters which are not actually executable, or fail when interrogated,
    are not put into the result\. I\.e the result may contain less interpreters
    than there in the input list\.

    The command uses builtin command __info patchlevel__ to determine the
    version of each interpreter\.

## <a name='subsection2'></a>Result manipulation

  - <a name='4'></a>__::bench::del__ *bench\_result* *column*

    This command removes a column, i\.e\. all benchmark results for a specific Tcl
    interpreter, from the specified benchmark result and returns the modified
    result\.

    The benchmark results are in the format described in section [Result
    format](#subsection3)\.

    The column is identified by an integer number\.

  - <a name='5'></a>__::bench::edit__ *bench\_result* *column* *newvalue*

    This command renames a column in the specified benchmark result and returns
    the modified result\. This means that the path of the Tcl interpreter in the
    identified column is changed to an arbitrary string\.

    The benchmark results are in the format described in section [Result
    format](#subsection3)\.

    The column is identified by an integer number\.

  - <a name='6'></a>__::bench::merge__ *bench\_result*\.\.\.

    This commands takes one or more benchmark results, merges them into one big
    result, and returns that as its result\.

    All benchmark results are in the format described in section [Result
    format](#subsection3)\.

  - <a name='7'></a>__::bench::norm__ *bench\_result* *column*

    This command normalizes the timing results in the specified benchmark result
    and returns the modified result\. This means that the cell values are not
    times anymore, but factors showing how much faster or slower the execution
    was relative to the baseline\.

    The baseline against which the command normalizes are the timing results in
    the chosen column\. This means that after the normalization the values in
    this column are all __1__, as these benchmarks are neither faster nor
    slower than the baseline\.

    A factor less than __1__ indicates a benchmark which was faster than the
    baseline, whereas a factor greater than __1__ indicates a slower
    execution\.

    The benchmark results are in the format described in section [Result
    format](#subsection3)\.

    The column is identified by an integer number\.

  - <a name='8'></a>__::bench::out::raw__ *bench\_result*

    This command formats the specified benchmark result for output to a file,
    socket, etc\. This specific command does no formatting at all, it passes the
    input through unchanged\.

    For other formatting styles see the packages
    __[bench::out::text](bench\_wtext\.md)__ and
    __[bench::out::csv](bench\_wcsv\.md)__ which provide commands to
    format benchmark results for human consumption, or as CSV data importable by
    spread sheets, respectively\.

    Complementary, to read benchmark results from files, sockets etc\. look for
    the package __[bench::in](bench\_read\.md)__ and the commands provided
    by it\.

## <a name='subsection3'></a>Result format

After the execution of a set of benchmarks the raw result returned by this
package is a Tcl dictionary containing all the relevant information\. The
dictionary is a compact representation, i\.e\. serialization, of a 2\-dimensional
table which has Tcl interpreters as columns and benchmarks as rows\. The cells of
the table contain the timing results\. The Tcl interpreters / columns are
identified by their paths\. The benchmarks / rows are identified by their
description\.

The possible keys are all valid Tcl lists of two or three elements and have one
of the following forms:

  - \{interp \*\}

    The set of keys matching this glob pattern capture the information about all
    the Tcl interpreters used to run the benchmarks\. The second element of the
    key is the path to the interpreter\.

    The associated value is the version of the Tcl interpreter\.

  - \{desc \*\}

    The set of keys matching this glob pattern capture the information about all
    the benchmarks found in the executed benchmark suite\. The second element of
    the key is the description of the benchmark, which has to be unique\.

    The associated value is irrelevant, and set to the empty string\.

  - \{usec \* \*\}

    The set of keys matching this glob pattern capture the performance
    information, i\.e\. timing results\. The second element of the key is the
    description of the benchmark, the third element the path of the Tcl
    interpreter which was used to run it\.

    The associated value is either one of several special result codes, or the
    time it took to execute the benchmark, in microseconds\. The possible special
    result codes are

      * ERR

        Benchmark could not be executed, failed with a Tcl error\.

      * BAD\_RES

        The benchmark could be executed, however the result from its body did
        not match the declared expectations\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *bench* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[bench\_intro](bench\_intro\.md), [bench\_lang\_intro](bench\_lang\_intro\.md),
[bench\_lang\_spec](bench\_lang\_spec\.md), bench\_read, bench\_wcsv, bench\_wtext

# <a name='keywords'></a>KEYWORDS

[benchmark](\.\./\.\./\.\./\.\./index\.md\#benchmark),
[merging](\.\./\.\./\.\./\.\./index\.md\#merging),
[normalization](\.\./\.\./\.\./\.\./index\.md\#normalization),
[performance](\.\./\.\./\.\./\.\./index\.md\#performance),
[testing](\.\./\.\./\.\./\.\./index\.md\#testing)

# <a name='category'></a>CATEGORY

Benchmark tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/bench/bench_intro.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

[//000000001]: # (bench\_intro \- Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (bench\_intro\(n\) 1\.0 tcllib "Benchmarking/Performance tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

bench\_intro \- bench introduction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [HISTORICAL NOTES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

The *[bench](bench\.md)* \(short for *benchmark tools*\), is a set of
related, yet different, entities which are working together for the easy
creation and execution of performance test suites, also known as benchmarks\.
These are

  1. A tcl based language for the declaration of test cases\. A test case is
     represented by a tcl command declaring the various parts needed to execute
     it, like setup, cleanup, the commands to test, etc\.

  1. A package providing the ability to execute test cases written in that
     language\.

Which of the more detailed documents are relevant to the reader of this
introduction depends on their role in the benchmarking process\.

  1. A *writer* of benchmarks has to understand the bench language itself\. A
     beginner to bench should read the more informally written *[bench
     language introduction](bench\_lang\_intro\.md)* first\. Having digested
     this the formal *[bench language specification](bench\_lang\_spec\.md)*
     should become understandable\. A writer experienced with bench may only need
     this last document from time to time, to refresh her memory\.

  1. A *user* of benchmark suites written in the *[bench](bench\.md)*
     language has to know which tools are available for use\. At the bottom level
     sits the package __[bench](bench\.md)__, providing the basic
     facilities to read and execute files containing benchmarks written in the
     bench language, and to manipulate benchmark results\.

# <a name='section2'></a>HISTORICAL NOTES

This module and package have been derived from Jeff Hobbs' __tclbench__
application for the benchmarking of the Tcl core and its ancestor
"runbench\.tcl"\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *bench* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[bench](bench\.md), bench\_lang\_faq,
[bench\_lang\_intro](bench\_lang\_intro\.md),
[bench\_lang\_spec](bench\_lang\_spec\.md)

# <a name='keywords'></a>KEYWORDS

[bench language](\.\./\.\./\.\./\.\./index\.md\#bench\_language),
[benchmark](\.\./\.\./\.\./\.\./index\.md\#benchmark),
[performance](\.\./\.\./\.\./\.\./index\.md\#performance),
[testing](\.\./\.\./\.\./\.\./index\.md\#testing)

# <a name='category'></a>CATEGORY

Benchmark tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































Deleted embedded/md/tcllib/files/modules/bench/bench_lang_intro.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183

[//000000001]: # (bench\_lang\_intro \- Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench\_lang\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (bench\_lang\_intro\(n\) 1\.0 tcllib "Benchmarking/Performance tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

bench\_lang\_intro \- bench language introduction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

      - [Fundamentals](#subsection1)

      - [Basics](#subsection2)

      - [Pre\- and postprocessing](#subsection3)

      - [Advanced pre\- and postprocessing](#subsection4)

  - [FURTHER READING](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

This document is an informal introduction to version 1 of the bench language
based on a multitude of examples\. After reading this a benchmark writer should
be ready to understand the formal *[bench language
specification](bench\_lang\_spec\.md)*\.

## <a name='subsection1'></a>Fundamentals

In the broadest terms possible the *[bench
language](\.\./\.\./\.\./\.\./index\.md\#bench\_language)* is essentially Tcl, plus a
number of commands to support the declaration of benchmarks\. A document written
in this language is a Tcl script and has the same syntax\.

## <a name='subsection2'></a>Basics

One of the most simplest benchmarks which can be written in bench is

    bench -desc LABEL -body {
        set a b
    }

This code declares a benchmark named __LABEL__ which measures the time it
takes to assign a value to a variable\. The Tcl code doing this assignment is the
__\-body__ of the benchmark\.

## <a name='subsection3'></a>Pre\- and postprocessing

Our next example demonstrates how to declare *initialization* and
*[cleanup](\.\./\.\./\.\./\.\./index\.md\#cleanup)* code, i\.e\. code computing
information for the use of the __\-body__, and for releasing such resources
after the measurement is done\. They are the __\-pre__\- and the
__\-post__\-body, respectively\.

In our example, directly drawn from the benchmark suite of Tcllib's
__[aes](\.\./aes/aes\.md)__ package, the concrete initialization code
constructs the key schedule used by the encryption command whose speed we
measure, and the cleanup code releases any resources bound to that schedule\.

> bench \-desc "AES\-$\{len\} ECB encryption core" __\-pre__ \{  
> &nbsp;&nbsp;&nbsp;&nbsp;set key \[aes::Init ecb $k $i\]  
> \} \-body \{  
> &nbsp;&nbsp;&nbsp;&nbsp;aes::Encrypt $key $p  
> \} __\-post__ \{  
> &nbsp;&nbsp;&nbsp;&nbsp;aes::Final $key  
> \}

## <a name='subsection4'></a>Advanced pre\- and postprocessing

Our last example again deals with initialization and cleanup code\. To see the
difference to the regular initialization and cleanup discussed in the last
section it is necessary to know a bit more about how bench actually measures the
speed of the the __\-body__\.

Instead of running the __\-body__ just once the system actually executes the
__\-body__ several hundred times and then returns the average of the found
execution times\. This is done to remove environmental effects like machine load
from the result as much as possible, with outliers canceling each other out in
the average\.

The drawback of doing things this way is that when we measure operations which
are not idempotent we will most likely not measure the time for the operation we
want, but of the state\(s\) the system is in after the first iteration, a mixture
of things we have no interest in\.

Should we wish, for example, to measure the time it takes to include an element
into a set, with the element not yet in the set, and the set having specific
properties like being a shared Tcl\_Obj, then the first iteration will measure
the time for this\. *However* all subsequent iterations will measure the time
to include an element which is already in the set, and the Tcl\_Obj holding the
set will not be shared anymore either\. In the end the timings taken for the
several hundred iterations of this state will overwhelm the time taken from the
first iteration, the only one which actually measured what we wanted\.

The advanced initialization and cleanup codes, __\-ipre__\- and the
__\-ipost__\-body respectively, are present to solve this very problem\. While
the regular initialization and cleanup codes are executed before and after the
whole series of iterations the advanced codes are executed before and after each
iteration of the body, without being measured themselves\. This allows them to
bring the system into the exact state the body wishes to measure\.

Our example, directly drawn from the benchmark suite of Tcllib's
__[struct::set](\.\./struct/struct\_set\.md)__ package, is for exactly the
example we used above to demonstrate the necessity for the advanced
initialization and cleanup\. Its concrete initialization code constructs a
variable refering to a set with specific properties \(The set has a string
representation, which is shared\) affecting the speed of the inclusion command,
and the cleanup code releases the temporary variables created by this
initialization\.

> bench \-desc "set include, missing <SC> x$times $n" __\-ipre__ \{  
> &nbsp;&nbsp;&nbsp;&nbsp;set A $sx\($times,$n\)  
> &nbsp;&nbsp;&nbsp;&nbsp;set B $A  
> \} \-body \{  
> &nbsp;&nbsp;&nbsp;&nbsp;struct::set include A x  
> \} __\-ipost__ \{  
> &nbsp;&nbsp;&nbsp;&nbsp;unset A B  
> \}

# <a name='section2'></a>FURTHER READING

Now that this document has been digested the reader, assumed to be a *writer*
of benchmarks, he should be fortified enough to be able to understand the formal
*bench language specfication*\. It will also serve as the detailed
specification and cheat sheet for all available commands and their syntax\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *bench* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[bench\_intro](bench\_intro\.md), [bench\_lang\_spec](bench\_lang\_spec\.md)

# <a name='keywords'></a>KEYWORDS

[bench language](\.\./\.\./\.\./\.\./index\.md\#bench\_language),
[benchmark](\.\./\.\./\.\./\.\./index\.md\#benchmark),
[examples](\.\./\.\./\.\./\.\./index\.md\#examples),
[performance](\.\./\.\./\.\./\.\./index\.md\#performance),
[testing](\.\./\.\./\.\./\.\./index\.md\#testing)

# <a name='category'></a>CATEGORY

Benchmark tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/bench/bench_lang_spec.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

[//000000001]: # (bench\_lang\_spec \- Documentation tools)
[//000000002]: # (Generated from file 'bench\_lang\_spec\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (bench\_lang\_spec\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

bench\_lang\_spec \- bench language specification

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__bench\_rm__ *path*\.\.\.](#1)  
[__bench\_tmpfile__](#2)  
[__[bench](bench\.md)__ *options*\.\.\.](#3)  

# <a name='description'></a>DESCRIPTION

This document specifies both names and syntax of all the commands which together
are the bench language, version 1\. As this document is intended to be a
reference the commands are listed in alphabetical order, and the descriptions
are relatively short\. A beginner should read the more informally written
*[bench language introduction](bench\_lang\_intro\.md)* first\.

# <a name='section2'></a>Commands

  - <a name='1'></a>__bench\_rm__ *path*\.\.\.

    This command silently removes the files specified as its arguments and then
    returns the empty string as its result\. The command is *trusted*, there is
    no checking if the specified files are outside of whatever restricted area
    the benchmarks are run in\.

  - <a name='2'></a>__bench\_tmpfile__

    This command returns the path to a bench specific unique temporary file\. The
    uniqueness means that multiple calls will return different paths\. While the
    path may exist from previous runs, the command itself does *not* create
    aynthing\.

    The base location of the temporary files is platform dependent:

      * Unix, and indeterminate platform

        "/tmp"

      * Windows

        __$TEMP__

      * Anything else

        The current working directory\.

  - <a name='3'></a>__[bench](bench\.md)__ *options*\.\.\.

    This command declares a single benchmark\. Its result is the empty string\.
    All parts of the benchmark are declared via options, and their values\. The
    options can occur in any order\. The accepted options are:

      * __\-body__ script

        The argument of this option declares the body of the benchmark, the Tcl
        script whose performance we wish to measure\. This option, and
        __\-desc__, are the two required parts of each benchmark\.

      * __\-desc__ msg

        The argument of this option declares the name of the benchmark\. It has
        to be unique, or timing data from different benchmarks will be mixed
        together\.

        *Beware\!* This requirement is not checked when benchmarks are
        executed, and the system will silently produce bogus data\. This option,
        and __\-body__, are the two required parts of each benchmark\.

      * __\-ipost__ script

        The argument of this option declares a script which is run immediately
        *after* each iteration of the body\. Its responsibility is to release
        resources created by the body, or __\-ipre__\-bodym which we do not
        wish to live into the next iteration\.

      * __\-ipre__ script

        The argument of this option declares a script which is run immediately
        *before* each iteration of the body\. Its responsibility is to create
        the state of the system expected by the body so that we measure the
        right thing\.

      * __\-iterations__ num

        The argument of this option declares the maximum number of times to run
        the __\-body__ of the benchmark\. During execution this and the global
        maximum number of iterations are compared and the smaller of the two
        values is used\.

        This option should be used only for benchmarks which are expected or
        known to take a long time per run\. I\.e\. reduce the number of times they
        are run to keep the overall time for the execution of the whole
        benchmark within manageable limits\.

      * __\-post__ script

        The argument of this option declares a script which is run *after* all
        iterations of the body have been run\. Its responsibility is to release
        resources created by the body, or __\-pre__\-body\.

      * __\-pre__ script

        The argument of this option declares a script which is run *before*
        any of the iterations of the body are run\. Its responsibility is to
        create whatever resources are needed by the body to run without failing\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *bench* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[bench\_intro](bench\_intro\.md), [bench\_lang\_intro](bench\_lang\_intro\.md)

# <a name='keywords'></a>KEYWORDS

[bench language](\.\./\.\./\.\./\.\./index\.md\#bench\_language),
[benchmark](\.\./\.\./\.\./\.\./index\.md\#benchmark),
[performance](\.\./\.\./\.\./\.\./index\.md\#performance),
[specification](\.\./\.\./\.\./\.\./index\.md\#specification),
[testing](\.\./\.\./\.\./\.\./index\.md\#testing)

# <a name='category'></a>CATEGORY

Benchmark tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/bench/bench_read.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

[//000000001]: # (bench::in \- Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench\_read\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (bench::in\(n\) 0\.1 tcllib "Benchmarking/Performance tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

bench::in \- bench::in \- Reading benchmark results

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require csv  
package require bench::in ?0\.1?  

[__::bench::in::read__ *file*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a command for reading benchmark results from files,
sockets, etc\.

A reader interested in the creation, processing or writing of such results
should go and read *[bench \- Processing benchmark suites](bench\.md)*
instead\.

If the bench language itself is the actual interest please start with the
*[bench language introduction](bench\_lang\_intro\.md)* and then proceed from
there to the formal *[bench language specification](bench\_lang\_spec\.md)*\.

# <a name='section2'></a>PUBLIC API

  - <a name='1'></a>__::bench::in::read__ *file*

    This command reads a benchmark result from the specified *file* and
    returns it as its result\. The command understands the three formats created
    by the commands

      * __bench::out::raw__

        Provided by package __[bench](bench\.md)__\.

      * __[bench::out::csv](bench\_wcsv\.md)__

        Provided by package __[bench::out::csv](bench\_wcsv\.md)__\.

      * __[bench::out::text](bench\_wtext\.md)__

        Provided by package __[bench::out::text](bench\_wtext\.md)__\.

    and automatically detects which format is used by the input file\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *bench* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[bench](bench\.md), [bench::out::csv](bench\_wcsv\.md),
[bench::out::text](bench\_wtext\.md), [bench\_intro](bench\_intro\.md)

# <a name='keywords'></a>KEYWORDS

[benchmark](\.\./\.\./\.\./\.\./index\.md\#benchmark),
[csv](\.\./\.\./\.\./\.\./index\.md\#csv),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting), [human
readable](\.\./\.\./\.\./\.\./index\.md\#human\_readable),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[performance](\.\./\.\./\.\./\.\./index\.md\#performance),
[reading](\.\./\.\./\.\./\.\./index\.md\#reading),
[testing](\.\./\.\./\.\./\.\./index\.md\#testing),
[text](\.\./\.\./\.\./\.\./index\.md\#text)

# <a name='category'></a>CATEGORY

Benchmark tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































Deleted embedded/md/tcllib/files/modules/bench/bench_wcsv.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

[//000000001]: # (bench::out::csv \- Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench\_wcsv\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (bench::out::csv\(n\) 0\.1\.2 tcllib "Benchmarking/Performance tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

bench::out::csv \- bench::out::csv \- Formatting benchmark results as CSV

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require bench::out::csv ?0\.1\.2?  

[__::bench::out::csv__ *bench\_result*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides commands for fomatting of benchmark results into a CSV
table importable by spread sheets\.

A reader interested in the generation or processing of such results should go
and read *[bench \- Processing benchmark suites](bench\.md)* instead\.

If the bench language itself is the actual interest please start with the
*[bench language introduction](bench\_lang\_intro\.md)* and then proceed from
there to the formal *[bench language specification](bench\_lang\_spec\.md)*\.

# <a name='section2'></a>PUBLIC API

  - <a name='1'></a>__::bench::out::csv__ *bench\_result*

    This command formats the specified benchmark result for output to a file,
    socket, etc\. This specific command generates CSV data importable by spread
    sheets\.

    For other formatting styles see the packages __[bench](bench\.md)__
    and __[bench::out::text](bench\_wtext\.md)__ which provide commands to
    format benchmark results in raw form, or for human consumption,
    respectively\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *bench* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[bench](bench\.md), [bench::out::text](bench\_wtext\.md)

# <a name='keywords'></a>KEYWORDS

[benchmark](\.\./\.\./\.\./\.\./index\.md\#benchmark),
[csv](\.\./\.\./\.\./\.\./index\.md\#csv),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[performance](\.\./\.\./\.\./\.\./index\.md\#performance),
[testing](\.\./\.\./\.\./\.\./index\.md\#testing)

# <a name='category'></a>CATEGORY

Benchmark tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































Deleted embedded/md/tcllib/files/modules/bench/bench_wtext.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104

[//000000001]: # (bench::out::text \- Benchmarking/Performance tools)
[//000000002]: # (Generated from file 'bench\_wtext\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (bench::out::text\(n\) 0\.1\.2 tcllib "Benchmarking/Performance tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

bench::out::text \- bench::out::text \- Formatting benchmark results as human
readable text

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require bench::out::text ?0\.1\.2?  

[__::bench::out::text__ *bench\_result*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides commands for fomatting of benchmark results into human
readable text\.

A reader interested in the generation or processing of such results should go
and read *[bench \- Processing benchmark suites](bench\.md)* instead\.

If the bench language itself is the actual interest please start with the
*[bench language introduction](bench\_lang\_intro\.md)* and then proceed from
there to the formal *[bench language specification](bench\_lang\_spec\.md)*\.

# <a name='section2'></a>PUBLIC API

  - <a name='1'></a>__::bench::out::text__ *bench\_result*

    This command formats the specified benchmark result for output to a file,
    socket, etc\. This specific command generates human readable text\.

    For other formatting styles see the packages __[bench](bench\.md)__
    and __[bench::out::csv](bench\_wcsv\.md)__ which provide commands to
    format benchmark results in raw form, or as importable CSV data,
    respectively\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *bench* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[bench](bench\.md), [bench::out::csv](bench\_wcsv\.md)

# <a name='keywords'></a>KEYWORDS

[benchmark](\.\./\.\./\.\./\.\./index\.md\#benchmark),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting), [human
readable](\.\./\.\./\.\./\.\./index\.md\#human\_readable),
[performance](\.\./\.\./\.\./\.\./index\.md\#performance),
[testing](\.\./\.\./\.\./\.\./index\.md\#testing),
[text](\.\./\.\./\.\./\.\./index\.md\#text)

# <a name='category'></a>CATEGORY

Benchmark tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































Deleted embedded/md/tcllib/files/modules/bibtex/bibtex.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

[//000000001]: # (bibtex \- bibtex)
[//000000002]: # (Generated from file 'bibtex\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 for documentation, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (bibtex\(n\) 0\.7 tcllib "bibtex")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

bibtex \- Parse bibtex files

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require bibtex ?0\.7?  

[__::bibtex::parse__ ?*options*? ?*text*?](#1)  
[__::bibtex::parse__ *text*](#2)  
[__::bibtex::parse__ ?__\-command__ *cmd*? __\-channel__ *chan*](#3)  
[__::bibtex::parse__ ?__\-recordcommand__   *recordcmd*? ?__\-preamblecommand__ *preamblecmd*? ?__\-stringcommand__   *stringcmd*? ?__\-commentcommand__  *commentcmd*? ?__\-progresscommand__ *progresscmd*? ?__\-casesensitivestrings__ *bool*? \(*text* &#124; __\-channel__ *chan*\)](#4)  
[__::bibtex::wait__ *token*](#5)  
[__::bibtex::destroy__ *token*](#6)  
[__::bibtex::addStrings__ *token* *stringdict*](#7)  

# <a name='description'></a>DESCRIPTION

This package provides commands for the parsing of bibliographies in BibTeX
format\.

  - <a name='1'></a>__::bibtex::parse__ ?*options*? ?*text*?

    This is the general form of the command for parsing a bibliography\.
    Depending on the options used to invoke it it will either return a token for
    the parser, or the parsed entries of the input bibliography\. Instead of
    performing an immediate parse returning a predefined format the command can
    also enter an event\-based parsing style where all relevant entries in the
    input are reported through callback commands, in the style of SAX\.

  - <a name='2'></a>__::bibtex::parse__ *text*

    In this form the command will assume that the specified *text* is a
    bibliography in BibTeX format, parse it, and then return a list containing
    one element per record found in the bibliography\. Note that comments, string
    definitions, preambles, etc\. will not show up in the result\. Each element
    will be a list containing record type, bibliography key and record data, in
    this order\. The record data will be a dictionary, its keys the keys of the
    record, with the associated values\.

  - <a name='3'></a>__::bibtex::parse__ ?__\-command__ *cmd*? __\-channel__ *chan*

    In this form the command will reads the bibliography from the specified Tcl
    channel *chan* and then returns the same data structure as described
    above\.

    If however the option __\-command__ is specified the result will be a
    handle for the parser instead and all processing will be incremental and
    happen in the background\. When the input has been exhausted the callback
    *cmd* will be invoked with the result of the parse\. The exact definition
    for the callback is

      * __cmd__ *token* *parseresult*

        The parse result will have the structure explained above, for the
        simpler forms of the parser\.

    *Note* that the parser will *not* close the channel after it has
    exhausted it\. This is still the responsibility of the user of the parser\.

  - <a name='4'></a>__::bibtex::parse__ ?__\-recordcommand__   *recordcmd*? ?__\-preamblecommand__ *preamblecmd*? ?__\-stringcommand__   *stringcmd*? ?__\-commentcommand__  *commentcmd*? ?__\-progresscommand__ *progresscmd*? ?__\-casesensitivestrings__ *bool*? \(*text* &#124; __\-channel__ *chan*\)

    This is the most low\-level form for the parser\. The returned result will be
    a handle for the parser\. During processing it will invoke the invoke the
    specified callback commands for each type of data found in the bibliography\.

    The processing will be incremental and happen in the background if, and only
    if a Tcl channel *chan* is specified\. For a *text* the processing will
    happen immediately and all callbacks will be invoked before the command
    itself returns\.

    The callbacks, i\.e\. *\*cmd*, are all command prefixes and will be invoked
    with additional arguments appended to them\. The meaning of the arguments
    depends on the callback and is explained below\. The first argument will
    however always be the handle of the parser invoking the callback\.

      * __\-casesensitivestrings__

        This option takes a boolean value\. When set string macro processing
        becomes case\-sensitive\. The default is case\-insensitive string macro
        processing\.

      * __recordcmd__ *token* *type* *key* *recorddict*

        This callback is invoked whenever the parser detects a bibliography
        record in the input\. Its arguments are the record type, the bibliography
        key for the record, and a dictionary containing the keys and values
        describing the record\. Any string macros known to the parser have
        already been expanded\.

      * __preamblecmd__ *token* *preambletext*

        This callback is invoked whenever the parser detects an @preamble block
        in the input\. The only additional argument is the text found in the
        preamble block\. By default such entries are ignored\.

      * __stringcmd__ *token* *stringdict*

        This callback is invoked whenever the parser detects an @string\-based
        macro definition in the input\. The argument is a dictionary with the
        macro names as keys and their replacement strings as values\. By default
        such definitions are added to the parser state for use in future
        bibliography records\.

      * __commentcmd__ *token* *commenttext*

        This callback is invoked whenever the parser detects a comment in the
        input\. The only additional argument is the comment text\. By default such
        entries are ignored\.

      * __progresscmd__ *token* *percent*

        This callback is invoked during processing to tell the user about the
        progress which has been made\. Its argument is the percentage of data
        processed, as integer number between __0__ and __100__\. In the
        case of incremental processing the perecentage will always be __\-1__
        as the total number of entries is not known beforehand\.

  - <a name='5'></a>__::bibtex::wait__ *token*

    This command waits for the parser represented by the *token* to complete
    and then returns\. The returned result is the empty string\.

  - <a name='6'></a>__::bibtex::destroy__ *token*

    This command cleans up all internal state associated with the parser
    represented by the handle *token*, effectively destroying it\. This command
    can be called from within the parser callbacks to terminate processing\.

  - <a name='7'></a>__::bibtex::addStrings__ *token* *stringdict*

    This command adds the macro definitions stored in the dictionary
    *stringdict* to the parser represented by the handle *token*\.

    The dictionary keys are the macro names and the values their replacement
    strings\. This command has the correct signature for use as a
    __\-stringcommand__ callback in an invokation of the command
    __::bibtex::parse__\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *bibtex* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[bibliography](\.\./\.\./\.\./\.\./index\.md\#bibliography),
[bibtex](\.\./\.\./\.\./\.\./index\.md\#bibtex),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 for documentation, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/blowfish/blowfish.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

[//000000001]: # (blowfish \- Blowfish Block Cipher)
[//000000002]: # (Generated from file 'blowfish\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (blowfish\(n\) 1\.0\.5 tcllib "Blowfish Block Cipher")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

blowfish \- Implementation of the Blowfish block cipher

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PROGRAMMING INTERFACE](#section3)

  - [MODES OF OPERATION](#section4)

  - [EXAMPLES](#section5)

  - [REFERENCES](#section6)

  - [AUTHORS](#section7)

  - [Bugs, Ideas, Feedback](#section8)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require blowfish ?1\.0\.5?  

[__::blowfish::blowfish__ ?*\-mode \[ecb&#124;cbc\]*? ?*\-dir \[encrypt&#124;decrypt\]*? *\-key keydata* ?*\-iv vector*? ?*\-out channel*? ?*\-chunksize size*? ?*\-pad padchar*? \[ *\-in channel* &#124; ?*\-\-*? *data* \]](#1)  
[__::blowfish::Init__ *mode* *keydata* *iv*](#2)  
[__::blowfish::Encrypt__ *Key* *data*](#3)  
[__::blowfish::Decrypt__ *Key* *data*](#4)  
[__::blowfish::Reset__ *Key* *iv*](#5)  
[__::blowfish::Final__ *Key*](#6)  

# <a name='description'></a>DESCRIPTION

This package is an implementation in Tcl of the Blowfish algorithm developed by
Bruce Schneier \[1\]\. Blowfish is a 64\-bit block cipher designed to operate
quickly on 32 bit architectures and accepting a variable key length\. This
implementation supports ECB and CBC mode blowfish encryption\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::blowfish::blowfish__ ?*\-mode \[ecb&#124;cbc\]*? ?*\-dir \[encrypt&#124;decrypt\]*? *\-key keydata* ?*\-iv vector*? ?*\-out channel*? ?*\-chunksize size*? ?*\-pad padchar*? \[ *\-in channel* &#124; ?*\-\-*? *data* \]

    Perform the __blowfish__ algorithm on either the data provided by the
    argument or on the data read from the *\-in* channel\. If an *\-out*
    channel is given then the result will be written to this channel\.

    The *\-key* option must be given\. This parameter takes a binary string of
    variable length and is used to generate the __blowfish__ key schedule\.
    You should be aware that creating a key schedule is quite an expensive
    operation in blowfish so it is worth reusing the key where possible\. See
    __Reset__\.

    The *\-mode* and *\-dir* options are optional and default to cbc mode and
    encrypt respectively\. The initialization vector *\-iv* takes an 8 byte
    binary argument which defaults to 8 zeros\. See [MODES OF
    OPERATION](#section4) for more about available modes and their uses\.

    Blowfish is a 64\-bit block cipher\. This means that the data must be provided
    in units that are a multiple of 8 bytes\. The __blowfish__ command will
    by default add nul characters to pad the input data to a multiple of 8 bytes
    if necessary\. The programming api commands will never add padding and
    instead will raise an error if the input is not a multiple of the block
    size\. The *\-pad* option can be used to change the padding character or to
    disable padding if the empty string is provided as the argument\.

# <a name='section3'></a>PROGRAMMING INTERFACE

  - <a name='2'></a>__::blowfish::Init__ *mode* *keydata* *iv*

    Construct a new blowfish key schedule using the specified key data and the
    given initialization vector\. The initialization vector is not used with ECB
    mode but is important for CBC mode\. See [MODES OF OPERATION](#section4)
    for details about cipher modes\.

  - <a name='3'></a>__::blowfish::Encrypt__ *Key* *data*

    Use a prepared key acquired by calling __Init__ to encrypt the provided
    data\. The data argument should be a binary array that is a multiple of the
    block size of 8 bytes\. The result is a binary array the same size as the
    input of encrypted data\.

  - <a name='4'></a>__::blowfish::Decrypt__ *Key* *data*

    Decipher data using the key\. Note that the same key may be used to encrypt
    and decrypt data provided that the initialization vector is reset
    appropriately for CBC mode\.

  - <a name='5'></a>__::blowfish::Reset__ *Key* *iv*

    Reset the initialization vector\. This permits the programmer to re\-use a key
    and avoid the cost of re\-generating the key schedule where the same key data
    is being used multiple times\.

  - <a name='6'></a>__::blowfish::Final__ *Key*

    This should be called to clean up resources associated with *Key*\. Once
    this function has been called the key may not be used again\.

# <a name='section4'></a>MODES OF OPERATION

  - Electronic Code Book \(ECB\)

    ECB is the basic mode of all block ciphers\. Each block is encrypted
    independently and so identical plain text will produce identical output when
    encrypted with the same key\. Any encryption errors will only affect a single
    block however this is vulnerable to known plaintext attacks\.

  - Cipher Block Chaining \(CBC\)

    CBC mode uses the output of the last block encryption to affect the current
    block\. An initialization vector of the same size as the cipher block size is
    used to handle the first block\. The initialization vector should be chosen
    randomly and transmitted as the first block of the output\. Errors in
    encryption affect the current block and the next block after which the
    cipher will correct itself\. CBC is the most commonly used mode in software
    encryption\.

# <a name='section5'></a>EXAMPLES

    % blowfish::blowfish -hex -mode ecb -dir encrypt -key secret01 "hello, world!"
    d0d8f27e7a374b9e2dbd9938dd04195a

    set Key [blowfish::Init cbc $eight_bytes_key_data $eight_byte_iv]
    append ciphertext [blowfish::Encrypt $Key $plaintext]
    append ciphertext [blowfish::Encrypt $Key $additional_plaintext]
    blowfish::Final $Key

# <a name='section6'></a>REFERENCES

  1. Schneier, B\. "Applied Cryptography, 2nd edition", 1996, ISBN 0\-471\-11709\-9,
     pub\. John Wiley & Sons\.

# <a name='section7'></a>AUTHORS

Frank Pilhofer, Pat Thoyts

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *blowfish* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

3des, [des](\.\./des/des\.md), [rc4](\.\./rc4/rc4\.md)

# <a name='keywords'></a>KEYWORDS

[block cipher](\.\./\.\./\.\./\.\./index\.md\#block\_cipher),
[blowfish](\.\./\.\./\.\./\.\./index\.md\#blowfish),
[cryptography](\.\./\.\./\.\./\.\./index\.md\#cryptography),
[encryption](\.\./\.\./\.\./\.\./index\.md\#encryption),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/cache/async.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

[//000000001]: # (cache::async \- In\-memory caches)
[//000000002]: # (Generated from file 'async\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (cache::async\(n\) 0\.3\.1 tcllib "In\-memory caches")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

cache::async \- Asynchronous in\-memory cache

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require cache::async ?0\.3\.1?  

[__::cache::async__ *objectName* *commandprefix* ?*options*\.\.\.?](#1)  
[*objectName* __get__ *key* *donecmdprefix*](#2)  
[*objectName* __set__ *key* *value*](#3)  
[*objectName* __unset__ *key*](#4)  
[*objectName* __exists__ *key*](#5)  
[*objectName* __clear__ ?*key*?](#6)  

# <a name='description'></a>DESCRIPTION

This package provides objects which cache data in memory, and operate
asynchronously with regard to request and responses\. The objects are agnostic
with regard to cache keys and values, and unknown methods are delegated to the
provider of cached data\. These two properties make it easy to use caches as a
facade for any data provider\.

# <a name='section2'></a>API

The package exports a class, __cache::async__, as specified below\.

  - <a name='1'></a>__::cache::async__ *objectName* *commandprefix* ?*options*\.\.\.?

    The command creates a new *[cache](\.\./\.\./\.\./\.\./index\.md\#cache)* object
    with an associated global Tcl command whose name is *objectName*\. This
    command may be used to invoke various operations on the object\.

    The *commandprefix* is the action to perform when an user asks for data in
    the cache and the cache doesn't yet know about the key\. When run the
    commandprefix is given three additional arguments, the string __get__,
    the key requested, and the cache object itself, in the form of its object
    command, in this order\. The execution of the action is done in an
    idle\-handler, decoupling it from the original request\.

    The only supported option is

      * __\-full\-async\-results__

        This option defines the behaviour of the cache for when requested keys
        are known to the cache at the time of __get__ request\. By default
        such requeste are responded to asynchronously as well\. Setting this
        option to __false__ forces the cache to respond to them
        synchronuously, although still through the specified callback\.

The object commands created by the class commands above have the form:

  - <a name='2'></a>*objectName* __get__ *key* *donecmdprefix*

    This method requests the data for the *key* from the cache\. If the data is
    not yet known the command prefix specified during construction of the cache
    object is used to ask for this information\.

    Whenever the information is/becomes available the *donecmdprefix* will be
    run to transfer the result to the caller\. This command prefix is invoked
    with either 2 or 3 arguments, i\.e\.

      1. The string __set__, the *key*, and the value\.

      1. The string __unset__, and the *key*\.

    These two possibilities are used to either signal the value for the *key*,
    or that the *key* has no value defined for it\. The latter is distinct from
    the cache not knowing about the *key*\.

    For a cache object configured to be fully asynchronous \(default\) the
    *donecmdprefix* is always run in an idle\-handler, decoupling it from the
    request\. Otherwise the callback will be invoked synchronously when the
    *key* is known to the cache at the time of the invokation\.

    Another important part of the cache's behaviour, as it is asynchronous it is
    possible that multiple __get__ requests are issued for the same *key*
    before it can respond\. In that case the cache will issue only one data
    request to the provider, for the first of these, and suspend the others, and
    then notify all of them when the data becomes available\.

  - <a name='3'></a>*objectName* __set__ *key* *value*

  - <a name='4'></a>*objectName* __unset__ *key*

    These two methods are provided to allow users of the cache to make keys
    known to the cache, as either having a *value*, or as undefined\.

    It is expected that the data provider \(see *commandprefix* of the
    constructor\) uses them in response to data requests for unknown keys\.

    Note how this matches the cache's own API towards its caller, calling the
    *donecmd* of __get__\-requests issued to itself with either "set key
    value" or "unset key", versus issuing __get__\-requests to its own
    provider with itself in the place of the *donecmd*, expecting to be called
    with either "set key value" or "unset key"\.

    This also means that these methods invoke the *donecmd* of all
    __get__\-requests waiting for information about the modified *key*\.

  - <a name='5'></a>*objectName* __exists__ *key*

    This method queries the cache for knowledge about the *key* and returns a
    boolean value\. The result is __true__ if the key is known, and
    __false__ otherwise\.

  - <a name='6'></a>*objectName* __clear__ ?*key*?

    This method resets the state of either the specified *key* or of all keys
    known to the cache, making it unkown\. This forces future
    __get__\-requests to reload the information from the provider\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *cache* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[asynchronous](\.\./\.\./\.\./\.\./index\.md\#asynchronous),
[cache](\.\./\.\./\.\./\.\./index\.md\#cache),
[callback](\.\./\.\./\.\./\.\./index\.md\#callback),
[synchronous](\.\./\.\./\.\./\.\./index\.md\#synchronous)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/clay/clay.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807

[//000000001]: # (clay \- Clay Framework)
[//000000002]: # (Generated from file 'clay\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2018 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (clay\(n\) 0\.8\.6 tcllib "Clay Framework")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

clay \- A minimalist framework for large scale OO Projects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [Structured Data](#subsection1)

      - [Clay Dialect](#subsection2)

      - [Method Delegation](#subsection3)

  - [Commands](#section2)

  - [Classes](#section3)

      - [Class clay::class](#subsection4)

      - [Class clay::object](#subsection5)

  - [AUTHORS](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require uuid  
package require oo::dialect  

[proc __clay::PROC__ *name* *arglist* *body* ?*ninja* ____?](#1)  
[proc __clay::\_ancestors__ *resultvar* *class*](#2)  
[proc __clay::ancestors__ ?*args*?](#3)  
[proc __clay::args\_to\_dict__ ?*args*?](#4)  
[proc __clay::args\_to\_options__ ?*args*?](#5)  
[proc __clay::dynamic\_arguments__ *ensemble* *method* *arglist* ?*args*?](#6)  
[proc __clay::dynamic\_wrongargs\_message__ *arglist*](#7)  
[proc __clay::is\_dict__ *d*](#8)  
[proc __clay::is\_null__ *value*](#9)  
[proc __clay::leaf__ ?*args*?](#10)  
[proc __clay::K__ *a* *b*](#11)  
[proc __clay::noop__ ?*args*?](#12)  
[proc __clay::cleanup__](#13)  
[proc __clay::object\_create__ *objname* ?*class* ____?](#14)  
[proc __clay::object\_rename__ *object* *newname*](#15)  
[proc __clay::object\_destroy__ ?*args*?](#16)  
[proc __clay::path__ ?*args*?](#17)  
[proc __clay::putb__ ?*map*? *text*](#18)  
[proc __clay::script\_path__](#19)  
[proc __clay::NSNormalize__ *qualname*](#20)  
[proc __clay::uuid\_generate__ ?*args*?](#21)  
[proc __clay::uuid::generate\_tcl\_machinfo__](#22)  
[proc __clay::uuid::tostring__ *uuid*](#23)  
[proc __clay::uuid::fromstring__ *uuid*](#24)  
[proc __clay::uuid::equal__ *left* *right*](#25)  
[proc __clay::uuid__ *cmd* ?*args*?](#26)  
[proc __clay::tree::sanitize__ *dict*](#27)  
[proc __clay::tree::\_sanitizeb__ *path* *varname* *dict*](#28)  
[proc __clay::tree::storage__ *rawpath*](#29)  
[proc __clay::tree::dictset__ *varname* ?*args*?](#30)  
[proc __clay::tree::dictmerge__ *varname* ?*args*?](#31)  
[proc __clay::tree::merge__ ?*args*?](#32)  
[proc __dictargs::proc__ *name* *argspec* *body*](#33)  
[proc __dictargs::method__ *name* *argspec* *body*](#34)  
[proc __clay::dialect::Push__ *class*](#35)  
[proc __clay::dialect::Peek__](#36)  
[proc __clay::dialect::Pop__](#37)  
[proc __clay::dialect::create__ *name* ?*parent* ____?](#38)  
[proc __clay::dialect::NSNormalize__ *namespace* *qualname*](#39)  
[proc __clay::dialect::DefineThunk__ *target* ?*args*?](#40)  
[proc __clay::dialect::Canonical__ *namespace* *NSpace* *class*](#41)  
[proc __clay::dialect::Define__ *namespace* *class* ?*args*?](#42)  
[proc __clay::dialect::Aliases__ *namespace* ?*args*?](#43)  
[proc __clay::dialect::SuperClass__ *namespace* ?*args*?](#44)  
[proc __clay::dynamic\_methods__ *class*](#45)  
[proc __clay::dynamic\_methods\_class__ *thisclass*](#46)  
[proc __clay::define::Array__ *name* ?*values* ____?](#47)  
[proc __clay::define::Delegate__ *name* *info*](#48)  
[proc __clay::define::constructor__ *arglist* *rawbody*](#49)  
[proc __clay::define::Class\_Method__ *name* *arglist* *body*](#50)  
[proc __clay::define::class\_method__ *name* *arglist* *body*](#51)  
[proc __clay::define::clay__ ?*args*?](#52)  
[proc __clay::define::destructor__ *rawbody*](#53)  
[proc __clay::define::Dict__ *name* ?*values* ____?](#54)  
[proc __clay::define::Option__ *name* ?*args*?](#55)  
[proc __clay::define::Method__ *name* *argstyle* *argspec* *body*](#56)  
[proc __clay::define::Option\_Class__ *name* ?*args*?](#57)  
[proc __clay::define::Variable__ *name* ?*default* ____?](#58)  
[proc __clay::ensemble\_methodbody__ *ensemble* *einfo*](#59)  
[proc __clay::define::Ensemble__ *rawmethod* ?*args*?](#60)  
[proc __clay::event::cancel__ *self* ?*task* __\*__?](#61)  
[proc __clay::event::generate__ *self* *event* ?*args*?](#62)  
[proc __clay::event::nextid__](#63)  
[proc __clay::event::Notification\_list__ *self* *event* ?*stackvar* ____?](#64)  
[proc __clay::event::notify__ *rcpt* *sender* *event* *eventinfo*](#65)  
[proc __clay::event::process__ *self* *handle* *script*](#66)  
[proc __clay::event::schedule__ *self* *handle* *interval* *script*](#67)  
[proc __clay::event::subscribe__ *self* *who* *event*](#68)  
[proc __clay::event::unsubscribe__ *self* ?*args*?](#69)  
[proc __clay::singleton__ *name* *script*](#70)  
[method __clay ancestors__](#71)  
[method __clay dump__](#72)  
[method __clay find__ *path* ?__path\.\.\.__?](#73)  
[method __clay get__ *path* ?__path\.\.\.__?](#74)  
[method __clay GET__ *path* ?__path\.\.\.__?](#75)  
[method __clay merge__ *dict* ?__dict\.\.\.__?](#76)  
[method __clay replace__ *dictionary*](#77)  
[method __clay search__ *path* ?__path\.\.\.__?](#78)  
[method __clay set__ *path* ?__path\.\.\.__? *value*](#79)  
[method __clay ancestors__](#80)  
[method __clay cache__ *path* *value*](#81)  
[method __clay cget__ *field*](#82)  
[method __clay delegate__ ?*stub*? ?*object*?](#83)  
[method __clay dump__](#84)  
[method __clay ensemble\_map__](#85)  
[method __clay eval__ *script*](#86)  
[method __clay evolve__](#87)  
[method __clay exists__ *path* ?__path\.\.\.__?](#88)  
[method __clay flush__](#89)  
[method __clay forward__ *method* *object*](#90)  
[method __clay get__ *path* ?__path\.\.\.__?](#91)  
[method __clay leaf__ *path* ?__path\.\.\.__?](#92)  
[method __clay merge__ *dict* ?__dict\.\.\.__?](#93)  
[method __clay mixin__ *class* ?__class\.\.\.__?](#94)  
[method __clay mixinmap__ ?*stub*? ?*classes*?](#95)  
[method __clay provenance__ *path* ?__path\.\.\.__?](#96)  
[method __clay replace__ *dictionary*](#97)  
[method __clay search__ *path* *valuevar* *isleafvar*](#98)  
[method __clay source__ *filename*](#99)  
[method __clay set__ *path* ?__path\.\.\.__? *value*](#100)  
[method __InitializePublic__](#101)  

# <a name='description'></a>DESCRIPTION

Clay introduces a method ensemble to both __oo::class__ and
__oo::object__ called clay\. This ensemble handles all of the high level
interactions within the framework\. Clay stores structured data\. Clan manages
method delegation\. Clay has facilities to manage the complex interactions that
come about with mixins\.

The central concept is that inside of every object and class \(which are actually
objects too\) is a dict called clay\. What is stored in that dict is left to the
imagination\. But because this dict is exposed via a public method, we can share
structured data between object, classes, and mixins\.

## <a name='subsection1'></a>Structured Data

Clay uses a standardized set of method interactions and introspection that TclOO
already provides to perform on\-the\-fly searches\. On\-the\-fly searches mean that
the data is never stale, and we avoid many of the sorts of collisions that would
arise when objects start mixing in other classes during operation\.

The __clay__ methods for both classes and objects have a get and a set
method\. For objects, get will search through the local clay dict\. If the
requested leaf is not found, or the query is for a branch, the system will then
begin to poll the clay methods of all of the class that implements the object,
all of that classes’ ancestors, as well as all of the classes that have been
mixed into this object, and all of their ancestors\.

Intended branches on a tree end with a directory slash \(/\)\. Intended leaves are
left unadorned\. This is a guide for the tool that builds the search results to
know what parts of a dict are intended to be branches and which are intended to
be leaves\. For simple cases, branch marking can be ignored:

    ::oo::class create ::foo { }
    ::foo clay set property/ color blue
    ::foo clay set property/ shape round

    set A [::foo new]
    $A clay get property/
    {color blue shape round}

    $A clay set property/ shape square
    $A clay get property/
    {color blue shape square}

But when you start storing blocks of text, guessing what field is a dict and
what isn’t gets messy:

    ::foo clay set description {A generic thing of designated color and shape}

    $A clay get description
    {A generic thing of designated color and shape}

    Without a convention for discerning branches for leaves what should have been a value can be accidentally parsed as a dictionary, and merged with all of the other values that were never intended to be merge. Here is an example of it all going wrong:
    ::oo::class create ::foo { }
    # Add description as a leaf
    ::foo clay set description  {A generic thing of designated color and shape}
    # Add description as a branch
    ::foo clay set description/  {A generic thing of designated color and shape}

    ::oo::class create ::bar {
      superclass foo
    }
    # Add description as a leaf
    ::bar clay set description  {A drinking establishment of designated color and shape and size}
    # Add description as a branch
    ::bar clay set description/  {A drinking establishment of designated color and shape and size}

    set B [::bar new]
    # As a leaf we get the value verbatim from he nearest ancestor
    $B clay get description
      {A drinking establishment of designated color and shape and size}
    # As a branch we get a recursive merge
    $B clay get description/
    {A drinking establishment of designated color and size thing of}

## <a name='subsection2'></a>Clay Dialect

Clay is built using the oo::dialect module from Tcllib\. oo::dialect allows you
to either add keywords directly to clay, or to create your own metaclass and
keyword set using Clay as a foundation\. For details on the keywords and what
they do, consult the functions in the ::clay::define namespace\.

## <a name='subsection3'></a>Method Delegation

Method Delegation It is sometimes useful to have an external object that can be
invoked as if it were a method of the object\. Clay provides a delegate ensemble
method to perform that delegation, as well as introspect which methods are
delegated in that manner\. All delegated methods are marked with html\-like tag
markings \(< >\) around them\.

    ::clay::define counter {
      Variable counter 0
      method incr {{howmuch 1}} {
        my variable counter
        incr counter $howmuch
      }
      method value {} {
        my variable counter
        return $counter
      }
      method reset {} {
        my variable counter
        set counter 0
      }
    }
    ::clay::define example {
      variable buffer
      constructor {} {
        # Build a counter object
        set obj [namespace current]::counter
        ::counter create $obj
        # Delegate the counter
        my delegate <counter> $obj
      }
      method line {text} {
        my <counter> incr
        append buffer $text
      }
    }

    set A [example new]
    $A line {Who’s line is it anyway?}
    $A <counter> value
    1

# <a name='section2'></a>Commands

  - <a name='1'></a>proc __clay::PROC__ *name* *arglist* *body* ?*ninja* ____?

    Because many features in this package may be added as commands to future tcl
    cores, or be provided in binary form by packages, I need a declaritive way
    of saying *Create this command if there isn't one already*\. The *ninja*
    argument is a script to execute if the command is created by this mechanism\.

  - <a name='2'></a>proc __clay::\_ancestors__ *resultvar* *class*

  - <a name='3'></a>proc __clay::ancestors__ ?*args*?

  - <a name='4'></a>proc __clay::args\_to\_dict__ ?*args*?

  - <a name='5'></a>proc __clay::args\_to\_options__ ?*args*?

  - <a name='6'></a>proc __clay::dynamic\_arguments__ *ensemble* *method* *arglist* ?*args*?

  - <a name='7'></a>proc __clay::dynamic\_wrongargs\_message__ *arglist*

  - <a name='8'></a>proc __clay::is\_dict__ *d*

  - <a name='9'></a>proc __clay::is\_null__ *value*

  - <a name='10'></a>proc __clay::leaf__ ?*args*?

  - <a name='11'></a>proc __clay::K__ *a* *b*

  - <a name='12'></a>proc __clay::noop__ ?*args*?

    Perform a noop\. Useful in prototyping for commenting out blocks of code
    without actually having to comment them out\. It also makes a handy default
    for method delegation if a delegate has not been assigned yet\.

  - <a name='13'></a>proc __clay::cleanup__

    Process the queue of objects to be destroyed

  - <a name='14'></a>proc __clay::object\_create__ *objname* ?*class* ____?

  - <a name='15'></a>proc __clay::object\_rename__ *object* *newname*

  - <a name='16'></a>proc __clay::object\_destroy__ ?*args*?

    Mark an objects for destruction on the next cleanup

  - <a name='17'></a>proc __clay::path__ ?*args*?

  - <a name='18'></a>proc __clay::putb__ ?*map*? *text*

    Append a line of text to a variable\. Optionally apply a string mapping\.

  - <a name='19'></a>proc __clay::script\_path__

  - <a name='20'></a>proc __clay::NSNormalize__ *qualname*

  - <a name='21'></a>proc __clay::uuid\_generate__ ?*args*?

  - <a name='22'></a>proc __clay::uuid::generate\_tcl\_machinfo__

  - <a name='23'></a>proc __clay::uuid::tostring__ *uuid*

  - <a name='24'></a>proc __clay::uuid::fromstring__ *uuid*

    Convert a string representation of a uuid into its binary format\.

  - <a name='25'></a>proc __clay::uuid::equal__ *left* *right*

    Compare two uuids for equality\.

  - <a name='26'></a>proc __clay::uuid__ *cmd* ?*args*?

    uuid generate \-> string rep of a new uuid uuid equal uuid1 uuid2

  - <a name='27'></a>proc __clay::tree::sanitize__ *dict*

    Output a dictionary removing any \. entries added by
    __clay::tree::merge__

  - <a name='28'></a>proc __clay::tree::\_sanitizeb__ *path* *varname* *dict*

    Helper function for ::clay::tree::sanitize Formats the string representation
    for a dictionary element within a human readable stream of lines, and
    determines if it needs to call itself with further indentation to express a
    sub\-branch

  - <a name='29'></a>proc __clay::tree::storage__ *rawpath*

    Return the path as a storage path for clay::tree with all branch terminators
    removed\. This command will also break arguments up if they contain /\.

    Example:

    > clay::tree::storage {foo bar baz bang}
    foo bar baz bang
    > clay::tree::storage {foo bar baz bang/}
    foo bar baz bang
    > clay::tree::storage {foo bar baz bang:}
    foo bar baz bang:
    > clay::tree::storage {foo/bar/baz bang:}
    foo bar baz bang:
    > clay::tree::storage {foo/bar/baz/bang}
    foo bar baz bang

  - <a name='30'></a>proc __clay::tree::dictset__ *varname* ?*args*?

    Set an element with a recursive dictionary, marking all branches on the way
    down to the final element\. If the value does not exists in the nested
    dictionary it is added as a leaf\. If the value already exists as a branch
    the value given is merged if the value is a valid dict\. If the incoming
    value is not a valid dict, the value overrides the value stored, and the
    value is treated as a leaf from then on\.

    Example:

    > set r {}
    > ::clay::tree::dictset r option color default Green
    . {} option {. {} color {. {} default Green}}
    > ::clay::tree::dictset r option {Something not dictlike}
    . {} option {Something not dictlike}
    # Note that if the value is not a dict, and you try to force it to be
    # an error with be thrown on the merge
    > ::clay::tree::dictset r option color default Blue
    missing value to go with key

  - <a name='31'></a>proc __clay::tree::dictmerge__ *varname* ?*args*?

    A recursive form of dict merge, intended for modifying variables in place\.

    Example:

    > set mydict {sub/ {sub/ {description {a block of text}}}}
    > ::clay::tree::dictmerge mydict {sub/ {sub/ {field {another block of text}}}}]
    > clay::tree::print $mydict
    sub/ {
      sub/ {
        description {a block of text}
        field {another block of text}
      }
    }

  - <a name='32'></a>proc __clay::tree::merge__ ?*args*?

    A recursive form of dict merge

    A routine to recursively dig through dicts and merge adapted from
    http://stevehavelka\.com/tcl\-dict\-operation\-nested\-merge/

    Example:

    > set mydict {sub/ {sub/ {description {a block of text}}}}
    > set odict [clay::tree::merge $mydict {sub/ {sub/ {field {another block of text}}}}]
    > clay::tree::print $odict
    sub/ {
      sub/ {
        description {a block of text}
        field {another block of text}
      }
    }

  - <a name='33'></a>proc __dictargs::proc__ *name* *argspec* *body*

    Named Procedures as new command

  - <a name='34'></a>proc __dictargs::method__ *name* *argspec* *body*

  - <a name='35'></a>proc __clay::dialect::Push__ *class*

  - <a name='36'></a>proc __clay::dialect::Peek__

  - <a name='37'></a>proc __clay::dialect::Pop__

  - <a name='38'></a>proc __clay::dialect::create__ *name* ?*parent* ____?

    This proc will generate a namespace, a "mother of all classes", and a
    rudimentary set of policies for this dialect\.

  - <a name='39'></a>proc __clay::dialect::NSNormalize__ *namespace* *qualname*

    Support commands; not intended to be called directly\.

  - <a name='40'></a>proc __clay::dialect::DefineThunk__ *target* ?*args*?

  - <a name='41'></a>proc __clay::dialect::Canonical__ *namespace* *NSpace* *class*

  - <a name='42'></a>proc __clay::dialect::Define__ *namespace* *class* ?*args*?

    Implementation of the languages' define command

  - <a name='43'></a>proc __clay::dialect::Aliases__ *namespace* ?*args*?

  - <a name='44'></a>proc __clay::dialect::SuperClass__ *namespace* ?*args*?

  - <a name='45'></a>proc __clay::dynamic\_methods__ *class*

  - <a name='46'></a>proc __clay::dynamic\_methods\_class__ *thisclass*

  - <a name='47'></a>proc __clay::define::Array__ *name* ?*values* ____?

    New OO Keywords for clay

  - <a name='48'></a>proc __clay::define::Delegate__ *name* *info*

    An annotation that objects of this class interact with delegated methods\.
    The annotation is intended to be a dictionary, and the only reserved key is
    *description*, a human readable description\.

  - <a name='49'></a>proc __clay::define::constructor__ *arglist* *rawbody*

  - <a name='50'></a>proc __clay::define::Class\_Method__ *name* *arglist* *body*

    Specify the a method for the class object itself, instead of for objects of
    the class

  - <a name='51'></a>proc __clay::define::class\_method__ *name* *arglist* *body*

    And alias to the new Class\_Method keyword

  - <a name='52'></a>proc __clay::define::clay__ ?*args*?

  - <a name='53'></a>proc __clay::define::destructor__ *rawbody*

  - <a name='54'></a>proc __clay::define::Dict__ *name* ?*values* ____?

  - <a name='55'></a>proc __clay::define::Option__ *name* ?*args*?

    Define an option for the class

  - <a name='56'></a>proc __clay::define::Method__ *name* *argstyle* *argspec* *body*

  - <a name='57'></a>proc __clay::define::Option\_Class__ *name* ?*args*?

    Define a class of options All field / value pairs will be be inherited by an
    option that specify *name* as it class field\.

  - <a name='58'></a>proc __clay::define::Variable__ *name* ?*default* ____?

    This keyword can also be expressed:

    property variable NAME {default DEFAULT}

    Variables registered in the variable property are also initialized \(if
    missing\) when the object changes class via the *morph* method\.

  - <a name='59'></a>proc __clay::ensemble\_methodbody__ *ensemble* *einfo*

    Produce the body of an ensemble's public dispatch method ensemble is the
    name of the the ensemble\. einfo is a dictionary of methods for the ensemble,
    and each value is a script to execute on dispatch

    Example:

    ::clay::ensemble_methodbody foo {
      bar {tailcall my Foo_bar {*}$args}
      baz {tailcall my Foo_baz {*}$args}
      clock {return [clock seconds]}
      default {puts "You gave me $method"}
    }

  - <a name='60'></a>proc __clay::define::Ensemble__ *rawmethod* ?*args*?

  - <a name='61'></a>proc __clay::event::cancel__ *self* ?*task* __\*__?

    Cancel a scheduled event

  - <a name='62'></a>proc __clay::event::generate__ *self* *event* ?*args*?

    Generate an event Adds a subscription mechanism for objects to see who has
    recieved this event and prevent spamming or infinite recursion

  - <a name='63'></a>proc __clay::event::nextid__

  - <a name='64'></a>proc __clay::event::Notification\_list__ *self* *event* ?*stackvar* ____?

    Called recursively to produce a list of who recieves notifications

  - <a name='65'></a>proc __clay::event::notify__ *rcpt* *sender* *event* *eventinfo*

    Final delivery to intended recipient object

  - <a name='66'></a>proc __clay::event::process__ *self* *handle* *script*

    Evaluate an event script in the global namespace

  - <a name='67'></a>proc __clay::event::schedule__ *self* *handle* *interval* *script*

    Schedule an event to occur later

  - <a name='68'></a>proc __clay::event::subscribe__ *self* *who* *event*

    Subscribe an object to an event pattern

  - <a name='69'></a>proc __clay::event::unsubscribe__ *self* ?*args*?

    Unsubscribe an object from an event pattern

  - <a name='70'></a>proc __clay::singleton__ *name* *script*

    An object which is intended to be it's own class\.

# <a name='section3'></a>Classes

## <a name='subsection4'></a>Class  clay::class

__Methods__

  - <a name='71'></a>method __clay ancestors__

    Return this class and all ancestors in search order\.

  - <a name='72'></a>method __clay dump__

    Return a complete dump of this object's clay data, but only this object's
    clay data\.

  - <a name='73'></a>method __clay find__ *path* ?__path\.\.\.__?

    Pull a chunk of data from the clay system\. If the last element of *path*
    is a branch, returns a recursive merge of all data from this object and it's
    constituent classes of the data in that branch\. If the last element is a
    leaf, search this object for a matching leaf, or search all constituent
    classes for a matching leaf and return the first value found\. If no value is
    found, returns an empty string\. If a branch is returned the topmost \. entry
    is omitted\.

  - <a name='74'></a>method __clay get__ *path* ?__path\.\.\.__?

    Pull a chunk of data from the class's clay system\. If no value is found,
    returns an empty string\. If a branch is returned the topmost \. entry is
    omitted\.

  - <a name='75'></a>method __clay GET__ *path* ?__path\.\.\.__?

    Pull a chunk of data from the class's clay system\. If no value is found,
    returns an empty string\.

  - <a name='76'></a>method __clay merge__ *dict* ?__dict\.\.\.__?

    Recursively merge the dictionaries given into the object's local clay
    storage\.

  - <a name='77'></a>method __clay replace__ *dictionary*

    Replace the contents of the internal clay storage with the dictionary given\.

  - <a name='78'></a>method __clay search__ *path* ?__path\.\.\.__?

    Return the first matching value for the path in either this class's clay
    data or one of its ancestors

  - <a name='79'></a>method __clay set__ *path* ?__path\.\.\.__? *value*

    Merge the conents of __value__ with the object's clay storage at
    __path__\.

## <a name='subsection5'></a>Class  clay::object

clay::object This class is inherited by all classes that have options\.

__Methods__

  - <a name='80'></a>method __clay ancestors__

    Return the class this object belongs to, all classes mixed into this object,
    and all ancestors of those classes in search order\.

  - <a name='81'></a>method __clay cache__ *path* *value*

    Store VALUE in such a way that request in SEARCH for PATH will always return
    it until the cache is flushed

  - <a name='82'></a>method __clay cget__ *field*

    Pull a value from either the object's clay structure or one of its
    constituent classes that matches the field name\. The order of search us:

    1\. The as a value in local dict variable config

    2\. The as a value in local dict variable clay

    3\. As a leaf in any ancestor as a root of the clay tree

    4\. As a leaf in any ancestor as __const__ *field*

    5\. As a leaf in any ancestor as __option__ *field* __default__

  - <a name='83'></a>method __clay delegate__ ?*stub*? ?*object*?

    Introspect or control method delegation\. With no arguments, the method will
    return a key/value list of stubs and objects\. With just the *stub*
    argument, the method will return the object \(if any\) attached to the stub\.
    With a *stub* and an *object* this command will forward all calls to the
    method *stub* to the *object*\.

  - <a name='84'></a>method __clay dump__

    Return a complete dump of this object's clay data, as well as the data from
    all constituent classes recursively blended in\.

  - <a name='85'></a>method __clay ensemble\_map__

    Return a dictionary describing the method ensembles to be assembled for this
    object

  - <a name='86'></a>method __clay eval__ *script*

    Evaluated a script in the namespace of this object

  - <a name='87'></a>method __clay evolve__

    Trigger the __InitializePublic__ private method

  - <a name='88'></a>method __clay exists__ *path* ?__path\.\.\.__?

    Returns 1 if *path* exists in either the object's clay data\. Values
    greater than one indicate the element exists in one of the object's
    constituent classes\. A value of zero indicates the path could not be found\.

  - <a name='89'></a>method __clay flush__

    Wipe any caches built by the clay implementation

  - <a name='90'></a>method __clay forward__ *method* *object*

    A convenience wrapper for

    oo::objdefine [self] forward {*}$args

  - <a name='91'></a>method __clay get__ *path* ?__path\.\.\.__?

    Pull a chunk of data from the clay system\. If the last element of *path*
    is a branch \(ends in a slash /\), returns a recursive merge of all data from
    this object and it's constituent classes of the data in that branch\. If the
    last element is a leaf, search this object for a matching leaf, or search
    all constituent classes for a matching leaf and return the first value
    found\. If no value is found, returns an empty string\.

  - <a name='92'></a>method __clay leaf__ *path* ?__path\.\.\.__?

    A modified get which is tailored to pull only leaf elements

  - <a name='93'></a>method __clay merge__ *dict* ?__dict\.\.\.__?

    Recursively merge the dictionaries given into the object's local clay
    storage\.

  - <a name='94'></a>method __clay mixin__ *class* ?__class\.\.\.__?

    Perform \[oo::objdefine \[self\] mixin\] on this object, with a few additional
    rules: Prior to the call, for any class was previously mixed in, but not in
    the new result, execute the script registered to mixin/ unmap\-script \(if
    given\.\) For all new classes, that were not present prior to this call, after
    the native TclOO mixin is invoked, execute the script registered to mixin/
    map\-script \(if given\.\) Fall all classes that are now present and “mixed inâ€,
    execute the script registered to mixin/ react\-script \(if given\.\)

  - <a name='95'></a>method __clay mixinmap__ ?*stub*? ?*classes*?

    With no arguments returns the map of stubs and classes mixed into the
    current object\. When only stub is given, returns the classes mixed in on
    that stub\. When stub and classlist given, replace the classes currently on
    that stub with the given classes and invoke clay mixin on the new matrix of
    mixed in classes\.

  - <a name='96'></a>method __clay provenance__ *path* ?__path\.\.\.__?

    Return either __self__ if that path exists in the current object, or
    return the first class \(if any\) along the clay search path which contains
    that element\.

  - <a name='97'></a>method __clay replace__ *dictionary*

    Replace the contents of the internal clay storage with the dictionary given\.

  - <a name='98'></a>method __clay search__ *path* *valuevar* *isleafvar*

    Return true, and set valuevar to the value and isleafar to true for false if
    PATH was found in the cache\.

  - <a name='99'></a>method __clay source__ *filename*

    Source the given filename within the object's namespace

  - <a name='100'></a>method __clay set__ *path* ?__path\.\.\.__? *value*

    Merge the conents of __value__ with the object's clay storage at
    __path__\.

  - <a name='101'></a>method __InitializePublic__

    Instantiate variables\. Called on object creation and during clay mixin\.

# <a name='section4'></a>AUTHORS

Sean Woods

[mailto:<yoda@etoyoc\.com>](mailto:<yoda@etoyoc\.com>)

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *oo* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo), [oo](\.\./\.\./\.\./\.\./index\.md\#oo)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2018 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/clock/iso8601.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142

[//000000001]: # (clock\_iso8601 \- Date/Time Utilities)
[//000000002]: # (Generated from file 'iso8601\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (clock\_iso8601\(n\) 0\.1 tcllib "Date/Time Utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

clock\_iso8601 \- Parsing ISO 8601 dates/times

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Date formats](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require clock::iso8601 ?0\.1?  

[__::clock::iso8601 parse\_date__ *date* *options\.\.\.*](#1)  
[__::clock::iso8601 parse\_time__ *time* *options\.\.\.*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides functionality to parse dates and times in ISO 8601 format\.

  - <a name='1'></a>__::clock::iso8601 parse\_date__ *date* *options\.\.\.*

    This command parses an ISO8601 date string in an unknown variant and returns
    the given date/time in seconds since epoch\.

    The acceptable options are __\-base__, __\-gmt__, __\-locale__, and
    __\-timezone__ of the builtin command __clock scan__\.

  - <a name='2'></a>__::clock::iso8601 parse\_time__ *time* *options\.\.\.*

    This command parses a full ISO8601 timestamp string \(date and time\) in an
    unknown variant and returns the given time in seconds since epoch\.

    The acceptable options are __\-base__, __\-gmt__, __\-locale__, and
    __\-timezone__ of the builtin command __clock scan__\.

# <a name='section2'></a>Date formats

The commands accept the following 23 date formats:

    (year)-(month)-(day)
    (year)(month)(day)
    (year)-(day in year)
    (year)(day in year)
    (year in century)-(month)-(day)
    (year)-(month)			Day defaults to the 1st of the month
    (year in century)(month)(day)
    (year in century)-(day in year)
    (year in century)(day in year)
    --(month)-(day)			Year defaults to the current year
    --(month)(day)			Year defaults to the current year
    --(day in year)			Year defaults to the current year
    ---(day)  		        Year defaults to the current year, month to current month
    (fiscal year)-W(week)-(wday)
    (fiscal year)W(week)-(wday)
    (fiscal year in century)-W(week)-(wday)
    (fiscal year in century)W(week)(wday)
    (fiscal year)-W(week)		Weekday defaults to monday
    (fiscal year)W(week)		Weekday defaults to monday
    -W(week)-(wday)			Year defaults to current fiscal year
    -W(week)(wday)			Year defaults to current fiscal year
    (wday)				Year defaults to current fiscal year, week to current week
    (year)				Month defaults to january, day to 1st of the month

The possible parts/fields in the above, and their meanings, are:

  - year

    Year with century, 4 digits

  - month

    Month in year, 2 digits

  - day

    Day in month, 2 digits\.

  - year in century

    Year without century, 2 digits

  - day in year

    Day in year, 3 digits

  - fiscal year

    ISO 8601 fiscal year with century, 4 digits

  - fiscal year in century

    ISO 8601 fiscal year without century, 2 digits

  - week

    ISO 8601 week number

  - wday

    Week day, 1 digit, Monday \(1\) to Sunday \(7,0\)

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *clock::iso8601* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































Deleted embedded/md/tcllib/files/modules/clock/rfc2822.md.

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

[//000000001]: # (clock\_rfc2822 \- Date/Time Utilities)
[//000000002]: # (Generated from file 'rfc2822\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (clock\_rfc2822\(n\) 0\.1 tcllib "Date/Time Utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

clock\_rfc2822 \- Parsing RFC 2822 dates/times

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require clock::rfc2822 ?0\.1?  

[__::clock::rfc2822 parse\_date__ *date*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides functionality to parse dates in RFC 2822 format\.

  - <a name='1'></a>__::clock::rfc2822 parse\_date__ *date*

    This command parses an RFC2822 date string and returns the given date in
    seconds since epoch\. An error is thrown if the command is unable to parse
    the date\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *clock::rfc2822* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































Deleted embedded/md/tcllib/files/modules/cmdline/cmdline.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238

[//000000001]: # (cmdline \- Command line and option processing)
[//000000002]: # (Generated from file 'cmdline\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (cmdline\(n\) 1\.5 tcllib "Command line and option processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

cmdline \- Procedures to process command lines and options\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [::argv handling](#section2)

  - [API](#section3)

      - [Error Codes](#subsection1)

  - [EXAMPLES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require cmdline ?1\.3\.3?  

[__::cmdline::getopt__ *argvVar* *optstring* *optVar* *valVar*](#1)  
[__::cmdline::getKnownOpt__ *argvVar* *optstring* *optVar* *valVar*](#2)  
[__::cmdline::getoptions__ *arglistVar* *optlist* ?*usage*?](#3)  
[__::cmdline::getKnownOptions__ *arglistVar* *optlist* ?*usage*?](#4)  
[__::cmdline::usage__ *optlist* ?*usage*?](#5)  
[__::cmdline::getfiles__ *patterns* *quiet*](#6)  
[__::cmdline::getArgv0__](#7)  

# <a name='description'></a>DESCRIPTION

This package provides commands to parse command lines and options\.

# <a name='section2'></a>::argv handling

One of the most common variables this package will be used with is
__::argv__, which holds the command line of the current application\. This
variable has a companion __::argc__ which is initialized to the number of
elements in __::argv__ at the beginning of the application\.

The commands in this package will *not* modify the __::argc__ companion
when called with __::argv__\. Keeping the value consistent, if such is
desired or required, is the responsibility of the caller\.

# <a name='section3'></a>API

  - <a name='1'></a>__::cmdline::getopt__ *argvVar* *optstring* *optVar* *valVar*

    This command works in a fashion like the standard C based __getopt__
    function\. Given an option string and a pointer to an array of args this
    command will process the first argument and return info on how to proceed\.
    The command returns 1 if an option was found, 0 if no more options were
    found, and \-1 if an error occurred\.

    *argvVar* contains the name of the list of arguments to process\. If
    options are found the list is modified and the processed arguments are
    removed from the start of the list\.

    *optstring* contains a list of command options that the application will
    accept\. If the option ends in "\.arg" the command will use the next argument
    as an argument to the option, or extract it from the current argument, if it
    is of the form "option=value"\. Otherwise the option is a boolean that is set
    to 1 if present\.

    *optVar* refers to the variable the command will store the found option
    into \(without the leading '\-' and without the \.arg extension\)\.

    *valVar* refers to the variable to store either the value for the
    specified option into upon success or an error message in the case of
    failure\. The stored value comes from the command line for \.arg options,
    otherwise the value is 1\.

  - <a name='2'></a>__::cmdline::getKnownOpt__ *argvVar* *optstring* *optVar* *valVar*

    Like __::cmdline::getopt__, but ignores any unknown options in the
    input\.

  - <a name='3'></a>__::cmdline::getoptions__ *arglistVar* *optlist* ?*usage*?

    Processes the set of command line options found in the list variable named
    by *arglistVar* and fills in defaults for those not specified\. This also
    generates an error message that lists the allowed flags if an incorrect flag
    is specified\. The optional *usage*\-argument contains a string to include
    in front of the generated message\. If not present it defaults to "options:"\.

    *argvVar* contains the name of the list of arguments to process\. If
    options are found the list is modified and the processed arguments are
    removed from the start of the list\.

    *optlist* contains a list of lists where each element specifies an option
    in the form: *flag* *default* *comment*\.

    If *flag* ends in "\.arg" then the value is taken from the command line\.
    Otherwise it is a boolean and appears in the result if present on the
    command line\. If *flag* ends in "\.secret", it will not be displayed in the
    usage\.

    The options __\-?__, __\-help__, and __\-\-__ are implicitly
    understood\. The first two abort option processing by throwing an error and
    force the generation of the usage message, whereas the the last aborts
    option processing without an error, leaving all arguments coming after for
    regular processing, even if starting with a dash\.

    The result of the command is a dictionary mapping all options to their
    values, be they user\-specified or defaults\.

  - <a name='4'></a>__::cmdline::getKnownOptions__ *arglistVar* *optlist* ?*usage*?

    Like __::cmdline::getoptions__, but ignores any unknown options in the
    input\.

  - <a name='5'></a>__::cmdline::usage__ *optlist* ?*usage*?

    Generates and returns an error message that lists the allowed flags\.
    *optlist* is defined as for __::cmdline::getoptions__\. The optional
    *usage*\-argument contains a string to include in front of the generated
    message\. If not present it defaults to "options:"\.

  - <a name='6'></a>__::cmdline::getfiles__ *patterns* *quiet*

    Given a list of file *patterns* this command computes the set of valid
    files\. On windows, file globbing is performed on each argument\. On Unix,
    only file existence is tested\. If a file argument produces no valid files, a
    warning is optionally generated \(set *quiet* to true\)\.

    This code also uses the full path for each file\. If not given it prepends
    the current working directory to the filename\. This ensures that these files
    will never conflict with files in a wrapped zip file\. The last sentence
    refers to the pro\-tools\.

  - <a name='7'></a>__::cmdline::getArgv0__

    This command returns the "sanitized" version of *argv0*\. It will strip off
    the leading path and removes the extension "\.bin"\. The latter is used by the
    pro\-apps because they must be wrapped by a shell script\.

## <a name='subsection1'></a>Error Codes

Starting with version 1\.5 all errors thrown by the package have a proper
__::errorCode__ for use with Tcl's __[try](\.\./try/tcllib\_try\.md)__
command\. This code always has the word __CMDLINE__ as its first element\.

# <a name='section4'></a>EXAMPLES

            package require Tcl 8.5
            package require try         ;# Tcllib.
            package require cmdline 1.5 ;# First version with proper error-codes.

            # Notes:
            # - Tcl 8.6+ has 'try' as a builtin command and therefore does not
            #   need the 'try' package.
            # - Before Tcl 8.5 we cannot support 'try' and have to use 'catch'.
            #   This then requires a dedicated test (if) on the contents of
            #   ::errorCode to separate the CMDLINE USAGE signal from actual errors.

            set options {
                {a          "set the atime only"}
                {m          "set the mtime only"}
                {c          "do not create non-existent files"}
                {r.arg  ""  "use time from ref_file"}
                {t.arg  -1  "use specified time"}
            }
            set usage ": MyCommandName \[options] filename ...\noptions:"

            try {
                array set params [::cmdline::getoptions argv $options $usage]

    	    # Note: argv is modified now. The recognized options are
    	    # removed from it, leaving the non-option arguments behind.
            } trap {CMDLINE USAGE} {msg o} {
                # Trap the usage signal, print the message, and exit the application.
                # Note: Other errors are not caught and passed through to higher levels!
    	    puts $msg
    	    exit 1
            }

            if {  $params(a) } { set set_atime "true" }
            set has_t [expr {$params(t) != -1}]
            set has_r [expr {[string length $params(r)] > 0}]
            if {$has_t && $has_r} {
                return -code error "Cannot specify both -r and -t"
            } elseif {$has_t} {
    	    ...
            }

This example, taken \(and slightly modified\) from the package
__[fileutil](\.\./fileutil/fileutil\.md)__, shows how to use cmdline\.
First, a list of options is created, then the 'args' list is passed to cmdline
for processing\. Subsequently, different options are checked to see if they have
been passed to the script, and what their value is\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *cmdline* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[argument processing](\.\./\.\./\.\./\.\./index\.md\#argument\_processing),
[argv](\.\./\.\./\.\./\.\./index\.md\#argv), [argv0](\.\./\.\./\.\./\.\./index\.md\#argv0),
[cmdline processing](\.\./\.\./\.\./\.\./index\.md\#cmdline\_processing), [command
line processing](\.\./\.\./\.\./\.\./index\.md\#command\_line\_processing)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/comm/comm.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109

[//000000001]: # (comm \- Remote communication)
[//000000002]: # (Generated from file 'comm\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 1995\-1998 The Open Group\. All Rights Reserved\.)
[//000000004]: # (Copyright &copy; 2003\-2004 ActiveState Corporation\.)
[//000000005]: # (Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000006]: # (comm\(n\) 4\.6\.3 tcllib "Remote communication")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

comm \- A remote communication facility for Tcl \(8\.3 and later\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [Commands](#subsection1)

      - [Eval Semantics](#subsection2)

      - [Multiple Channels](#subsection3)

      - [Channel Configuration](#subsection4)

      - [Id/port Assignments](#subsection5)

      - [Execution Environment](#subsection6)

      - [Remote Interpreters](#subsection7)

      - [Closing Connections](#subsection8)

      - [Callbacks](#subsection9)

      - [Unsupported](#subsection10)

      - [Security](#subsection11)

      - [Blocking Semantics](#subsection12)

      - [Asynchronous Result Generation](#subsection13)

      - [Compatibility](#subsection14)

  - [TLS Security Considerations](#section2)

  - [Author](#section3)

  - [License](#section4)

  - [Bugs](#section5)

  - [On Using Old Versions Of Tcl](#section6)

  - [Related Work](#section7)

  - [Bugs, Ideas, Feedback](#section8)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require comm ?4\.6\.3?  

[__::comm::comm send__ ?\-async? ?\-command *callback*? *id* *cmd* ?*arg arg \.\.\.*?](#1)  
[__::comm::comm self__](#2)  
[__::comm::comm interps__](#3)  
[__::comm::comm connect__ ?*id*?](#4)  
[__::comm::comm new__ *chan* ?*name value \.\.\.*?](#5)  
[__::comm::comm channels__](#6)  
[__::comm::comm config__](#7)  
[__::comm::comm config__ *name*](#8)  
[__::comm::comm config__ ?*name* *value* *\.\.\.*?](#9)  
[__::comm::comm shutdown__ *id*](#10)  
[__::comm::comm abort__](#11)  
[__::comm::comm destroy__](#12)  
[__::comm::comm hook__ *event* ?__\+__? ?*script*?](#13)  
[__::comm::comm remoteid__](#14)  
[__::comm::comm\_send__](#15)  
[__::comm::comm return\_async__](#16)  
[__$future__ __return__ ?__\-code__ *code*? ?*value*?](#17)  
[__$future__ __configure__ ?__\-command__ ?*cmdprefix*??](#18)  
[__$future__ __cget__ __\-command__](#19)  

# <a name='description'></a>DESCRIPTION

The __comm__ command provides an inter\-interpreter remote execution facility
much like Tk's __send\(n\)__, except that it uses sockets rather than the X
server for the communication path\. As a result, __comm__ works with multiple
interpreters, works on Windows and Macintosh systems, and provides control over
the remote execution path\.

These commands work just like __[send](\.\./\.\./\.\./\.\./index\.md\#send)__ and
__winfo interps__ :

    ::comm::comm send ?-async? id cmd ?arg arg ...?
    ::comm::comm interps

This is all that is really needed to know in order to use __comm__

## <a name='subsection1'></a>Commands

The package initializes __::comm::comm__ as the default *chan*\.

__comm__ names communication endpoints with an *id* unique to each
machine\. Before sending commands, the *id* of another interpreter is needed\.
Unlike Tk's send, __comm__ doesn't implicitly know the *id*'s of all the
interpreters on the system\. The following four methods make up the basic
__comm__ interface\.

  - <a name='1'></a>__::comm::comm send__ ?\-async? ?\-command *callback*? *id* *cmd* ?*arg arg \.\.\.*?

    This invokes the given command in the interpreter named by *id*\. The
    command waits for the result and remote errors are returned unless the
    __\-async__ or __\-command__ option is given\. If __\-async__ is
    given, send returns immediately and there is no further notification of
    result\. If __\-command__ is used, *callback* specifies a command to
    invoke when the result is received\. These options are mutually exclusive\.
    The callback will receive arguments in the form *\-option value*, suitable
    for __array set__\. The options are: *\-id*, the comm id of the
    interpreter that received the command; *\-serial*, a unique serial for each
    command sent to a particular comm interpreter; *\-chan*, the comm channel
    name; *\-code*, the result code of the command; *\-errorcode*, the
    errorcode, if any, of the command; *\-errorinfo*, the errorinfo, if any, of
    the command; and *\-result*, the return value of the command\. If connection
    is lost before a reply is received, the callback will be invoked with a
    connection lost message with \-code equal to \-1\. When __\-command__ is
    used, the command returns the unique serial for the command\.

  - <a name='2'></a>__::comm::comm self__

    Returns the *id* for this channel\.

  - <a name='3'></a>__::comm::comm interps__

    Returns a list of all the remote *id*'s to which this channel is
    connected\. __comm__ learns a new remote *id* when a command is first
    issued it, or when a remote *id* first issues a command to this comm
    channel\. __::comm::comm ids__ is an alias for this method\.

  - <a name='4'></a>__::comm::comm connect__ ?*id*?

    Whereas __::comm::comm send__ will automatically connect to the given
    *id*, this forces a connection to a remote *id* without sending a
    command\. After this, the remote *id* will appear in __::comm::comm
    interps__\.

## <a name='subsection2'></a>Eval Semantics

The evaluation semantics of __::comm::comm send__ are intended to match Tk's
__[send](\.\./\.\./\.\./\.\./index\.md\#send)__ *exactly*\. This means that
__comm__ evaluates arguments on the remote side\.

If you find that __::comm::comm send__ doesn't work for a particular
command, try the same thing with Tk's send and see if the result is different\.
If there is a problem, please report it\. For instance, there was had one report
that this command produced an error\. Note that the equivalent
__[send](\.\./\.\./\.\./\.\./index\.md\#send)__ command also produces the same
error\.

    % ::comm::comm send id llength {a b c}
    wrong # args: should be "llength list"
    % send name llength {a b c}
    wrong # args: should be "llength list"

The __eval__ hook \(described below\) can be used to change from
__[send](\.\./\.\./\.\./\.\./index\.md\#send)__'s double eval semantics to single
eval semantics\.

## <a name='subsection3'></a>Multiple Channels

More than one __comm__ channel \(or *listener*\) can be created in each Tcl
interpreter\. This allows flexibility to create full and restricted channels\. For
instance, *[hook](\.\./\.\./\.\./\.\./index\.md\#hook)* scripts are specific to the
channel they are defined against\.

  - <a name='5'></a>__::comm::comm new__ *chan* ?*name value \.\.\.*?

    This creates a new channel and Tcl command with the given channel name\. This
    new command controls the new channel and takes all the same arguments as
    __::comm::comm__\. Any remaining arguments are passed to the
    __config__ method\. The fully qualified channel name is returned\.

  - <a name='6'></a>__::comm::comm channels__

    This lists all the channels allocated in this Tcl interpreter\.

The default configuration parameters for a new channel are:

    "-port 0 -local 1 -listen 0 -silent 0"

The default channel __::comm::comm__ is created with:

    "::comm::comm new ::comm::comm -port 0 -local 1 -listen 1 -silent 0"

## <a name='subsection4'></a>Channel Configuration

The __config__ method acts similar to __fconfigure__ in that it sets or
queries configuration variables associated with a channel\.

  - <a name='7'></a>__::comm::comm config__

  - <a name='8'></a>__::comm::comm config__ *name*

  - <a name='9'></a>__::comm::comm config__ ?*name* *value* *\.\.\.*?

    When given no arguments, __config__ returns a list of all variables and
    their value With one argument, __config__ returns the value of just that
    argument\. With an even number of arguments, the given variables are set to
    the given values\.

These configuration variables can be changed \(descriptions of them are elsewhere
in this manual page\):

  - __\-listen__ ?*0&#124;1*?

  - __\-local__  ?*0&#124;1*?

  - __\-port__   ?*port*?

  - __\-silent__ ?*0&#124;1*?

  - __\-socketcmd__ ?*commandname*?

  - __\-interp__ ?*interpreter*?

  - __\-events__ ?*eventlist*?

These configuration variables are read only:

  - __\-chan__    *chan*

  - __\-serial__  *n*

  - __\-socket__  sock*In*

When __config__ changes the parameters of an existing channel \(with the
exception of __\-interp__ and __\-events__\), it closes and reopens the
listening socket\. An automatically assigned channel *id* will change when this
happens\. Recycling the socket is done by invoking __::comm::comm abort__,
which causes all active sends to terminate\.

## <a name='subsection5'></a>Id/port Assignments

__comm__ uses a TCP port for endpoint *id*\. The __interps__ \(or
__ids__\) method merely lists all the TCP ports to which the channel is
connected\. By default, each channel's *id* is randomly assigned by the
operating system \(but usually starts at a low value around 1024 and increases
each time a new socket is opened\)\. This behavior is accomplished by giving the
__\-port__ config option a value of 0\. Alternately, a specific TCP port
number may be provided for a given channel\. As a special case, comm contains
code to allocate a a high\-numbered TCP port \(>10000\) by using __\-port \{\}__\.
Note that a channel won't be created and initialized unless the specific port
can be allocated\.

As a special case, if the channel is configured with __\-listen 0__, then it
will not create a listening socket and will use an id of __0__ for itself\.
Such a channel is only good for outgoing connections \(although once a connection
is established, it can carry send traffic in both directions\)\. As another
special case, if the channel is configured with __\-silent 0__, then the
listening side will ignore connection attempts where the protocol negotiation
phase failed, instead of throwing an error\.

## <a name='subsection6'></a>Execution Environment

A communication channel in its default configuration will use the current
interpreter for the execution of all received scripts, and of the event scripts
associated with the various hooks\.

This insecure setup can be changed by the user via the two options
__\-interp__, and __\-events__\.

When __\-interp__ is set all received scripts are executed in the slave
interpreter specified as the value of the option\. This interpreter is expected
to exist before configuration\. I\.e\. it is the responsibility of the user to
create it\. However afterward the communication channel takes ownership of this
interpreter, and will destroy it when the communication channel is destroyed\.
Note that reconfiguration of the communication channel to either a different
interpreter or the empty string will release the ownership *without*
destroying the previously configured interpreter\. The empty string has a special
meaning, it restores the default behaviour of executing received scripts in the
current interpreter\.

*Also of note* is that replies and callbacks \(a special form of reply\) are
*not* considered as received scripts\. They are trusted, part of the internal
machinery of comm, and therefore always executed in the current interpreter\.

Even if an interpreter has been configured as the execution environment for
received scripts the event scripts associated with the various hooks will by
default still be executed in the current interpreter\. To change this use the
option __\-events__ to declare a list of the events whose scripts should be
executed in the declared interpreter as well\. The contents of this option are
ignored if the communication channel is configured to execute received scripts
in the current interpreter\.

## <a name='subsection7'></a>Remote Interpreters

By default, each channel is restricted to accepting connections from the local
system\. This can be overridden by using the __\-local 0__ configuration
option For such channels, the *id* parameter takes the form *\{ id host \}*\.

*WARNING*: The *host* must always be specified in the same form \(e\.g\., as
either a fully qualified domain name, plain hostname or an IP address\)\.

## <a name='subsection8'></a>Closing Connections

These methods give control over closing connections:

  - <a name='10'></a>__::comm::comm shutdown__ *id*

    This closes the connection to *id*, aborting all outstanding commands in
    progress\. Note that nothing prevents the connection from being immediately
    reopened by another incoming or outgoing command\.

  - <a name='11'></a>__::comm::comm abort__

    This invokes shutdown on all open connections in this comm channel\.

  - <a name='12'></a>__::comm::comm destroy__

    This aborts all connections and then destroys the this comm channel itself,
    including closing the listening socket\. Special code allows the default
    __::comm::comm__ channel to be closed such that the __::comm::comm__
    command it is not destroyed\. Doing so closes the listening socket,
    preventing both incoming and outgoing commands on the channel\. This sequence
    reinitializes the default channel:

    "::comm::comm destroy; ::comm::comm new ::comm::comm"

When a remote connection is lost \(because the remote exited or called
__shutdown__\), __comm__ can invoke an application callback\. This can be
used to cleanup or restart an ancillary process, for instance\. See the *lost*
callback below\.

## <a name='subsection9'></a>Callbacks

This is a mechanism for setting hooks for particular events:

  - <a name='13'></a>__::comm::comm hook__ *event* ?__\+__? ?*script*?

    This uses a syntax similar to Tk's
    __[bind](\.\./\.\./\.\./\.\./index\.md\#bind)__ command\. Prefixing *script*
    with a __\+__ causes the new script to be appended\. Without this, a new
    *script* replaces any existing script\. When invoked without a script, no
    change is made\. In all cases, the new hook script is returned by the
    command\.

    When an *event* occurs, the *script* associated with it is evaluated
    with the listed variables in scope and available\. The return code \(*not*
    the return value\) of the script is commonly used decide how to further
    process after the hook\.

    Common variables include:

      * __chan__

        the name of the comm channel \(and command\)

      * __id__

        the id of the remote in question

      * __fid__

        the file id for the socket of the connection

These are the defined *events*:

  - __connecting__

    Variables: __chan__, __id__

    This hook is invoked before making a connection to the remote named in
    *id*\. An error return \(via
    __[error](\.\./\.\./\.\./\.\./index\.md\#error)__\) will abort the connection
    attempt with the error\. Example:

    % ::comm::comm hook connecting {
        if {[string match {*[02468]} $id]} {
            error "Can't connect to even ids"
        }
    }
    % ::comm::comm send 10000 puts ok
    Connect to remote failed: Can't connect to even ids
    %

  - __connected__

    Variables: __chan__, __fid__, __id__, __host__, and
    __port__\.

    This hook is invoked immediately after making a remote connection to *id*,
    allowing arbitrary authentication over the socket named by *fid*\. An error
    return \(via __[error](\.\./\.\./\.\./\.\./index\.md\#error)__ \) will close the
    connection with the error\. *host* and *port* are merely extracted from
    the *id*; changing any of these will have no effect on the connection,
    however\. It is also possible to substitute and replace *fid*\.

  - __incoming__

    Variables: __chan__, __fid__, __addr__, and __remport__\.

    Hook invoked when receiving an incoming connection, allowing arbitrary
    authentication over socket named by *fid*\. An error return \(via
    __[error](\.\./\.\./\.\./\.\./index\.md\#error)__\) will close the connection
    with the error\. Note that the peer is named by *remport* and *addr* but
    that the remote *id* is still unknown\. Example:

    ::comm::comm hook incoming {
        if {[string match 127.0.0.1 $addr]} {
            error "I don't talk to myself"
        }
    }

  - __eval__

    Variables: __chan__, __id__, __cmd__, and __buffer__\.

    This hook is invoked after collecting a complete script from a remote but
    *before* evaluating it\. This allows complete control over the processing
    of incoming commands\. *cmd* contains either __send__ or __async__\.
    *buffer* holds the script to evaluate\. At the time the hook is called,
    *$chan remoteid* is identical in value to *id*\.

    By changing *buffer*, the hook can change the script to be evaluated\. The
    hook can short circuit evaluation and cause a value to be immediately
    returned by using __[return](\.\./\.\./\.\./\.\./index\.md\#return)__
    *result* \(or, from within a procedure, __return \-code return__
    *result*\)\. An error return \(via
    __[error](\.\./\.\./\.\./\.\./index\.md\#error)__\) will return an error
    result, as is if the script caused the error\. Any other return will evaluate
    the script in *buffer* as normal\. For compatibility with 3\.2,
    __break__ and __return \-code break__ *result* is supported, acting
    similarly to __return \{\}__ and __return \-code return__ *result*\.

    Examples:

      1. augmenting a command

    % ::comm::comm send [::comm::comm self] pid
    5013
    % ::comm::comm hook eval {puts "going to execute $buffer"}
    % ::comm::comm send [::comm::comm self] pid
    going to execute pid
    5013

      1. short circuiting a command

    % ::comm::comm hook eval {puts "would have executed $buffer"; return 0}
    % ::comm::comm send [::comm::comm self] pid
    would have executed pid
    0

      1. Replacing double eval semantics

    % ::comm::comm send [::comm::comm self] llength {a b c}
    wrong # args: should be "llength list"
    % ::comm::comm hook eval {return [uplevel #0 $buffer]}
    return [uplevel #0 $buffer]
    % ::comm::comm send [::comm::comm self] llength {a b c}
    3

      1. Using a slave interpreter

    % interp create foo
    % ::comm::comm hook eval {return [foo eval $buffer]}
    % ::comm::comm send [::comm::comm self] set myvar 123
    123
    % set myvar
    can't read "myvar": no such variable
    % foo eval set myvar
    123

      1. Using a slave interpreter \(double eval\)

    % ::comm::comm hook eval {return [eval foo eval $buffer]}

      1. Subverting the script to execute

    % ::comm::comm hook eval {
        switch -- $buffer {
            a {return A-OK}
            b {return B-OK}
            default {error "$buffer is a no-no"}
        }
    }
    % ::comm::comm send [::comm::comm self] pid
    pid is a no-no
    % ::comm::comm send [::comm::comm self] a
    A-OK

  - __reply__

    Variables: __chan__, __id__, __buffer__, __ret__, and
    __return\(\)__\.

    This hook is invoked after collecting a complete reply script from a remote
    but *before* evaluating it\. This allows complete control over the
    processing of replies to sent commands\. The reply *buffer* is in one of
    the following forms

      * return result

      * return \-code code result

      * return \-code code \-errorinfo info \-errorcode ecode msg

    For safety reasons, this is decomposed\. The return result is in *ret*, and
    the return switches are in the return array:

      * *return\(\-code\)*

      * *return\(\-errorinfo\)*

      * *return\(\-errorcode\)*

    Any of these may be the empty string\. Modifying these four variables can
    change the return value, whereas modifying *buffer* has no effect\.

  - __callback__

    Variables: __chan__, __id__, __buffer__, __ret__, and
    __return\(\)__\.

    Similar to *reply*, but used for callbacks\.

  - __lost__

    Variables: __chan__, __id__, and __reason__\.

    This hook is invoked when the connection to __id__ is lost\. Return value
    \(or thrown error\) is ignored\. *reason* is an explanatory string indicating
    why the connection was lost\. Example:

    ::comm::comm hook lost {
        global myvar
        if {$myvar(id) == $id} {
            myfunc
            return
        }
    }

## <a name='subsection10'></a>Unsupported

These interfaces may change or go away in subsequence releases\.

  - <a name='14'></a>__::comm::comm remoteid__

    Returns the *id* of the sender of the last remote command executed on this
    channel\. If used by a proc being invoked remotely, it must be called before
    any events are processed\. Otherwise, another command may get invoked and
    change the value\.

  - <a name='15'></a>__::comm::comm\_send__

    Invoking this procedure will substitute the Tk
    __[send](\.\./\.\./\.\./\.\./index\.md\#send)__ and __winfo interps__
    commands with these equivalents that use __::comm::comm__\.

    proc send {args} {
        eval ::comm::comm send $args
    }
    rename winfo tk_winfo
    proc winfo {cmd args} {
        if {![string match in* $cmd]} {
            return [eval [list tk_winfo $cmd] $args]
        }
        return [::comm::comm interps]
    }

## <a name='subsection11'></a>Security

Starting with version 4\.6 of the package an option __\-socketcmd__ is
supported, allowing the user of a comm channel to specify which command to use
when opening a socket\. Anything which is API\-compatible with the builtin
__::socket__ \(the default\) can be used\.

The envisioned main use is the specification of the __tls::socket__ command,
see package __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__, to secure the
communication\.

    # Load and initialize tls
    package require tls
    tls::init  -cafile /path/to/ca/cert -keyfile ...

    # Create secured comm channel
    ::comm::comm new SECURE -socketcmd tls::socket -listen 1
    ...

The sections [Execution Environment](#subsection6) and
[Callbacks](#subsection9) are also relevant to the security of the system,
providing means to restrict the execution to a specific environment, perform
additional authentication, and the like\.

## <a name='subsection12'></a>Blocking Semantics

There is one outstanding difference between __comm__ and
__[send](\.\./\.\./\.\./\.\./index\.md\#send)__\. When blocking in a synchronous
remote command, __[send](\.\./\.\./\.\./\.\./index\.md\#send)__ uses an internal C
hook \(Tk\_RestrictEvents\) to the event loop to look ahead for send\-related events
and only process those without processing any other events\. In contrast,
__comm__ uses the __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__ command as
a semaphore to indicate the return message has arrived\. The difference is that a
synchronous __[send](\.\./\.\./\.\./\.\./index\.md\#send)__ will block the
application and prevent all events \(including window related ones\) from being
processed, while a synchronous __::comm::comm send__ will block the
application but still allow other events to get processed\. In particular,
__after idle__ handlers will fire immediately when comm blocks\.

What can be done about this? First, note that this behavior will come from any
code using __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__ to block and wait for
an event to occur\. At the cost of multiple channel support, __comm__ could
be changed to do blocking I/O on the socket, giving send\-like blocking
semantics\. However, multiple channel support is a very useful feature of comm
that it is deemed too important to lose\. The remaining approaches involve a new
loadable module written in C \(which is somewhat against the philosophy of
__comm__\) One way would be to create a modified version of the
__[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__ command that allow the event
flags passed to Tcl\_DoOneEvent to be specified\. For __comm__, just the
TCL\_FILE\_EVENTS would be processed\. Another way would be to implement a
mechanism like Tk\_RestrictEvents, but apply it to the Tcl event loop \(since
__comm__ doesn't require Tk\)\. One of these approaches will be available in a
future __comm__ release as an optional component\.

## <a name='subsection13'></a>Asynchronous Result Generation

By default the result returned by a remotely invoked command is the result sent
back to the invoker\. This means that the result is generated synchronously, and
the server handling the call is blocked for the duration of the command\.

While this is tolerable as long as only short\-running commands are invoked on
the server long\-running commands, like database queries make this a problem\. One
command can prevent the processing requests of all other clients for an
arbitrary period of time\.

Before version 4\.5 of comm the only solution was to rewrite the server command
to use the Tcl builtin command __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__,
or one of its relatives like __tkwait__, to open a new event loop which
processes requests while the long\-running operation is executed\. This however
has its own perils, as this makes it possible to both overflow the Tcl stack
with a large number of event loop, and to have a newer requests block the return
of older ones, as the eventloop have to be unwound in the order of their
creation\.

The proper solution is to have the invoked command indicate to __comm__ that
it cannot or will not deliver an immediate, synchronous result, but will do so
later\. At that point the framework can put sending the actual result on hold and
continue processing requests using the main event loop\. No blocking, no nesting
of event loops\. At some future date the long running operation delivers the
result to comm, via the future object, which is then forwarded to the invoker as
usual\.

The necessary support for this solution has been added to comm since version
4\.5, in the form of the new method __return\_async__\.

  - <a name='16'></a>__::comm::comm return\_async__

    This command is used by a remotely invoked script to notify the comm channel
    which invoked it that the result to send back to the invoker is not
    generated synchronously\. If this command is not called the default/standard
    behaviour of comm is to send the synchronously generated result of the
    script itself to the invoker\.

    The result of __return\_async__ is an object\. This object, called a
    *future* is where the result of the script has to be delivered to when it
    becomes ready\. When that happens it will take all the necessary actions to
    deliver the result to the invoker of the script, and then destroy itself\.
    Should comm have lost the connection to the invoker while the result is
    being computed the future will not try to deliver the result it got, but
    just destroy itself\. The future can be configured with a command to call
    when the invoker is lost\. This enables the user to implement an early abort
    of the long\-running operation, should this be supported by it\.

    An example:

    # Procedure invoked by remote clients to run database operations.
    proc select {sql} {
        # Signal the async generation of the result

        set future [::comm::comm return_async]

        # Generate an async db operation and tell it where to deliver the result.

        set query [db query -command [list $future return] $sql]

        # Tell the database system which query to cancel if the connection
        # goes away while it is running.

        $future configure -command [list db cancel $query]

        # Note: The above will work without problem only if the async
        # query will nover run its completion callback immediately, but
        # only from the eventloop. Because otherwise the future we wish to
        # configure may already be gone. If that is possible use 'catch'
        # to prevent the error from propagating.
        return
    }

    The API of a future object is:

      * <a name='17'></a>__$future__ __return__ ?__\-code__ *code*? ?*value*?

        Use this method to tell the future that long\-running operation has
        completed\. Arguments are an optional return value \(defaults to the empty
        string\), and the Tcl return code \(defaults to OK\)\.

        The future will deliver this information to invoker, if the connection
        was not lost in the meantime, and then destroy itself\. If the connection
        was lost it will do nothing but destroy itself\.

      * <a name='18'></a>__$future__ __configure__ ?__\-command__ ?*cmdprefix*??

      * <a name='19'></a>__$future__ __cget__ __\-command__

        These methods allow the user to retrieve and set a command to be called
        if the connection the future belongs to has been lost\.

## <a name='subsection14'></a>Compatibility

__comm__ exports itself as a package\. The package version number is in the
form *major \. minor*, where the major version will only change when a
non\-compatible change happens to the API or protocol\. Minor bug fixes and
changes will only affect the minor version\. To load __comm__ this command is
usually used:

    package require comm 3

Note that requiring no version \(or a specific version\) can also be done\.

The revision history of __comm__ includes these releases:

  - 4\.6\.3

    Fixed ticket \[ced0d60fc9\]\. Added proper detection of eof on a socket,
    properly closing it\.

  - 4\.6\.2

    Fixed bugs 2972571 and 3066872, the first a misdetection of quoted brace
    after double backslash, the other a blocking gets making for an obvious
    \(hinsight\) DoS attack on comm channels\.

  - 4\.6\.1

    Changed the implementation of __comm::commCollect__ to emulate lindex's
    pre\-Tcl 8 behaviour, i\.e\. it was given the ability to parse out the first
    word of a list, even if the whole buffer is not a well\-formed list\. Without
    this change the first word could only be extracted if the whole buffer was a
    well\-formed list \(ever since Tcl 8\), and in a ver\-high\-load situation, i\.e\.
    a server sending lots and/or large commands very fast, this may never
    happen, eventually crashing the receiver when it runs out of memory\. With
    the change the receiver is always able to process the first word when it
    becomes well\-formed, regardless of the structure of the remainder of the
    buffer\.

  - 4\.6

    Added the option __\-socketcmd__ enabling users to override how a socket
    is opened\. The envisioned main use is the specification of the
    __tls::socket__ command, see package
    __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__, to secure the communication\.

  - 4\.5\.7

    Changed handling of ports already in use to provide a proper error message\.

  - 4\.5\.6

    Bugfix in the replacement for
    __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__, made robust against of
    variable names containing spaces\.

  - 4\.5\.5

    Bugfix in the handling of hooks, typo in variable name\.

  - 4\.5\.4

    Bugfix in the handling of the result received by the __send__ method\.
    Replaced an *after idle unset result* with an immediate __unset__,
    with the information saved to a local variable\.

    The __after idle__ can spill into a forked child process if there is no
    event loop between its setup and the fork\. This may bork the child if the
    next event loop is the __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__ of
    __comm__'s __send__ a few lines above the __after idle__, and
    the child used the same serial number for its next request\. In that case the
    parent's __after idle unset__ will delete the very array element the
    child is waiting for, unlocking the
    __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__, causing it to access a now
    missing array element, instead of the expected result\.

  - 4\.5\.3

    Bugfixes in the wrappers for the builtin
    __[update](\.\./\.\./\.\./\.\./index\.md\#update)__ and
    __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__ commands\.

  - 4\.5\.2

    Bugfix in the wrapper for the builtin
    __[update](\.\./\.\./\.\./\.\./index\.md\#update)__ command\.

  - 4\.5\.1

    Bugfixes in the handling of \-interp for regular scripts\. The handling of the
    buffer was wrong for scripts which are a single statement as list\. Fixed
    missing argument to new command __commSendReply__, introduced by version
    4\.5\. Affected debugging\.

  - 4\.5

    New server\-side feature\. The command invoked on the server can now switch
    comm from the standard synchronous return of its result to an asynchronous
    \(defered\) return\. Due to the use of snit to implement the *future* objects
    used by this feature from this version on comm requires at least Tcl 8\.3 to
    run\. Please read the section [Asynchronous Result
    Generation](#subsection13) for more details\.

  - 4\.4\.1

    Bugfix in the execution of hooks\.

  - 4\.4

    Bugfixes in the handling of \-interp for regular and hook scripts\. Bugfixes
    in channel cleanup\.

  - 4\.3\.1

    Introduced \-interp and \-events to enable easy use of a slave interp for
    execution of received scripts, and of event scripts\.

  - 4\.3

    Bugfixes, and introduces \-silent to allow the user to force the
    server/listening side to silently ignore connection attempts where the
    protocol negotiation failed\.

  - 4\.2

    Bugfixes, and most important, switched to utf\-8 as default encoding for full
    i18n without any problems\.

  - 4\.1

    Rewrite of internal code to remove old pseudo\-object model\. Addition of send
    \-command asynchronous callback option\.

  - 4\.0

    Per request by John LoVerso\. Improved handling of error for async invoked
    commands\.

  - 3\.7

    Moved into tcllib and placed in a proper namespace\.

  - 3\.6

    A bug in the looking up of the remoteid for a executed command could be
    triggered when the connection was closed while several asynchronous sends
    were queued to be executed\.

  - 3\.5

    Internal change to how reply messages from a
    __[send](\.\./\.\./\.\./\.\./index\.md\#send)__ are handled\. Reply messages
    are now decoded into the *value* to pass to
    __[return](\.\./\.\./\.\./\.\./index\.md\#return)__; a new return statement is
    then cons'd up to with this value\. Previously, the return code was passed in
    from the remote as a command to evaluate\. Since the wire protocol has not
    changed, this is still the case\. Instead, the reply handling code decodes
    the __reply__ message\.

  - 3\.4

    Added more source commentary, as well as documenting config variables in
    this man page\. Fixed bug were loss of connection would give error about a
    variable named __pending__ rather than the message about the lost
    connection\. __comm ids__ is now an alias for __comm interps__
    \(previously, it an alias for __comm chans__\)\. Since the method
    invocation change of 3\.0, break and other exceptional conditions were not
    being returned correctly from __comm send__\. This has been fixed by
    removing the extra level of indirection into the internal procedure
    __commSend__\. Also added propagation of the *errorCode* variable\. This
    means that these commands return exactly as they would with
    __[send](\.\./\.\./\.\./\.\./index\.md\#send)__:

    comm send id break
    catch {comm send id break}
    comm send id expr 1 / 0

    Added a new hook for reply messages\. Reworked method invocation to avoid the
    use of comm:\* procedures; this also cut the invocation time down by 40%\.
    Documented __comm config__ \(as this manual page still listed the defunct
    __comm init__\!\)

  - 3\.3

    Some minor bugs were corrected and the documentation was cleaned up\. Added
    some examples for hooks\. The return semantics of the __eval__ hook were
    changed\.

  - 3\.2

    A new wire protocol, version 3, was added\. This is backwards compatible with
    version 2 but adds an exchange of supported protocol versions to allow
    protocol negotiation in the future\. Several bugs with the hook
    implementation were fixed\. A new section of the man page on blocking
    semantics was added\.

  - 3\.1

    All the documented hooks were implemented\. __commLostHook__ was removed\.
    A bug in __comm new__ was fixed\.

  - 3\.0

    This is a new version of __comm__ with several major changes\. There is a
    new way of creating the methods available under the __comm__ command\.
    The __comm init__ method has been retired and is replaced by __comm
    configure__ which allows access to many of the well\-defined internal
    variables\. This also generalizes the options available to __comm new__\.
    Finally, there is now a protocol version exchanged when a connection is
    established\. This will allow for future on\-wire protocol changes\. Currently,
    the protocol version is set to 2\.

  - 2\.3

    __comm ids__ was renamed to __comm channels__\. General support for
    __comm hook__ was fully implemented, but only the *lost* hook exists,
    and it was changed to follow the general hook API\. __commLostHook__ was
    unsupported \(replaced by __comm hook lost__\) and __commLost__ was
    removed\.

  - 2\.2

    The *died* hook was renamed *lost*, to be accessed by
    __commLostHook__ and an early implementation of __comm lost hook__\.
    As such, __commDied__ is now __commLost__\.

  - 2\.1

    Unsupported method __comm remoteid__ was added\.

  - 2\.0

    __comm__ has been rewritten from scratch \(but is fully compatible with
    Comm 1\.0, without the requirement to use obTcl\)\.

# <a name='section2'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section3'></a>Author

John LoVerso, John@LoVerso\.Southborough\.MA\.US

*http://www\.opengroup\.org/~loverso/tcl\-tk/\#comm*

# <a name='section4'></a>License

Please see the file *comm\.LICENSE* that accompanied this source, or
[http://www\.opengroup\.org/www/dist\_client/caubweb/COPYRIGHT\.free\.html](http://www\.opengroup\.org/www/dist\_client/caubweb/COPYRIGHT\.free\.html)\.

This license for __comm__, new as of version 3\.2, allows it to be used for
free, without any licensing fee or royalty\.

# <a name='section5'></a>Bugs

  - If there is a failure initializing a channel created with __::comm::comm
    new__, then the channel should be destroyed\. Currently, it is left in an
    inconsistent state\.

  - There should be a way to force a channel to quiesce when changing the
    configuration\.

The following items can be implemented with the existing hooks and are listed
here as a reminder to provide a sample hook in a future version\.

  - Allow easier use of a slave interp for actual command execution \(especially
    when operating in "not local" mode\)\.

  - Add host list \(xhost\-like\) or "magic cookie" \(xauth\-like\) authentication to
    initial handshake\.

The following are outstanding todo items\.

  - Add an interp discovery and name\->port mapping\. This is likely to be in a
    separate, optional nameserver\. \(See also the related work, below\.\)

  - Fix the *\{id host\}* form so as not to be dependent upon canonical
    hostnames\. This requires fixes to Tcl to resolve hostnames\!

This man page is bigger than the source file\.

# <a name='section6'></a>On Using Old Versions Of Tcl

Tcl7\.5 under Windows contains a bug that causes the interpreter to hang when EOF
is reached on non\-blocking sockets\. This can be triggered with a command such as
this:

    "comm send $other exit"

Always make sure the channel is quiescent before closing/exiting or use at least
Tcl7\.6 under Windows\.

Tcl7\.6 on the Mac contains several bugs\. It is recommended you use at least
Tcl7\.6p2\.

Tcl8\.0 on UNIX contains a socket bug that can crash Tcl\. It is recommended you
use Tcl8\.0p1 \(or Tcl7\.6p2\)\.

# <a name='section7'></a>Related Work

Tcl\-DP provides an RPC\-based remote execution interface, but is a compiled Tcl
extension\. See
[http://www\.cs\.cornell\.edu/Info/Projects/zeno/Projects/Tcl\-DP\.html](http://www\.cs\.cornell\.edu/Info/Projects/zeno/Projects/Tcl\-DP\.html)\.

Michael Doyle <miked@eolas\.com> has code that implements the Tcl\-DP RPC
interface using standard Tcl sockets, much like __comm__\. The DpTcl package
is available at
[http://chiselapp\.com/user/gwlester/repository/DpTcl](http://chiselapp\.com/user/gwlester/repository/DpTcl)\.

Andreas Kupries <andreas\_kupries@users\.sourceforge\.net> uses __comm__ and
has built a simple nameserver as part of his Pool library\. See
[http://www\.purl\.org/net/akupries/soft/pool/index\.htm](http://www\.purl\.org/net/akupries/soft/pool/index\.htm)\.

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *comm* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

send\(n\)

# <a name='keywords'></a>KEYWORDS

[comm](\.\./\.\./\.\./\.\./index\.md\#comm),
[communication](\.\./\.\./\.\./\.\./index\.md\#communication),
[ipc](\.\./\.\./\.\./\.\./index\.md\#ipc),
[message](\.\./\.\./\.\./\.\./index\.md\#message), [remote
communication](\.\./\.\./\.\./\.\./index\.md\#remote\_communication), [remote
execution](\.\./\.\./\.\./\.\./index\.md\#remote\_execution),
[rpc](\.\./\.\./\.\./\.\./index\.md\#rpc), [secure](\.\./\.\./\.\./\.\./index\.md\#secure),
[send](\.\./\.\./\.\./\.\./index\.md\#send),
[socket](\.\./\.\./\.\./\.\./index\.md\#socket), [ssl](\.\./\.\./\.\./\.\./index\.md\#ssl),
[tls](\.\./\.\./\.\./\.\./index\.md\#tls)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 1995\-1998 The Open Group\. All Rights Reserved\.  
Copyright &copy; 2003\-2004 ActiveState Corporation\.  
Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/comm/comm_wire.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216

[//000000001]: # (comm\_wire \- Remote communication)
[//000000002]: # (Generated from file 'comm\_wire\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Docs\. Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (comm\_wire\(n\) 3 tcllib "Remote communication")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

comm\_wire \- The comm wire protocol

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Wire Protocol Version 3](#section2)

      - [Basic Layer](#subsection1)

      - [Basic Message Layer](#subsection2)

      - [Negotiation Messages \- Initial Handshake](#subsection3)

      - [Script/Command Messages](#subsection4)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require comm  

# <a name='description'></a>DESCRIPTION

The __[comm](comm\.md)__ command provides an inter\-interpreter remote
execution facility much like Tk's __send\(n\)__, except that it uses sockets
rather than the X server for the communication path\. As a result,
__[comm](comm\.md)__ works with multiple interpreters, works on Windows
and Macintosh systems, and provides control over the remote execution path\.

This document contains a specification of the various versions of the wire
protocol used by comm internally for the communication between its endpoints\. It
has no relevance to users of __[comm](comm\.md)__, only to developers who
wish to modify the package, write a compatible facility in a different language,
or some other facility based on the same protocol\.

# <a name='section2'></a>Wire Protocol Version 3

## <a name='subsection1'></a>Basic Layer

The basic encoding for *all* data is UTF\-8\. Because of this binary data,
including the NULL character, can be sent over the wire as is, without the need
for armoring it\.

## <a name='subsection2'></a>Basic Message Layer

On top of the [Basic Layer](#subsection1) we have a *message oriented*
exchange of data\. The totality of all characters written to the channel is a Tcl
list, with each element a separate
*[message](\.\./\.\./\.\./\.\./index\.md\#message)*, each itself a list\. The
messages in the overall list are separated by EOL\. Note that EOL characters can
occur within the list as well\. They can be distinguished from the
message\-separating EOL by the fact that the data from the beginning up to their
location is not a valid Tcl list\.

EOL is signaled through the linefeed character, i\.e __LF__, or, hex
__0x0a__\. This is following the unix convention for line\-endings\.

As a list each message is composed of *words*\. Their meaning depends on when
the message was sent in the overall exchange\. This is described in the upcoming
sections\.

## <a name='subsection3'></a>Negotiation Messages \- Initial Handshake

The command protocol is defined like this:

  - The first message send by a client to a server, when opening the connection,
    contains two words\. The first word is a list as well, and contains the
    versions of the wire protocol the client is willing to accept, with the most
    preferred version first\. The second word is the TCP port the client is
    listening on for connections to itself\. The value __0__ is used here to
    signal that the client will not listen for connections, i\.e\. that it is
    purely for sending commands, and not receiving them\.

  - The first message sent by the server to the client, in response to the
    message above contains only one word\. This word is a list, containing the
    string __vers__ as its first element, and the version of the wire
    protocol the server has selected from the offered versions as the second\.

## <a name='subsection4'></a>Script/Command Messages

All messages coming after the [initial handshake](#subsection3) consist of
three words\. These are an instruction, a transaction id, and the payload\. The
valid instructions are shown below\. The transaction ids are used by the client
to match any incoming replies to the command messages it sent\. This means that a
server has to copy the transaction id from a command message to the reply it
sends for that message\.

  - __send__

  - __async__

  - __command__

    The payload is the Tcl script to execute on the server\. It is actually a
    list containing the script fragments\. These fragment are
    __concat__enated together by the server to form the full script to
    execute on the server side\. This emulates the Tcl "eval" semantics\. In most
    cases it is best to have only one word in the list, a list containing the
    exact command\.

    Examples:

        (a)     {send 1 {{array get tcl_platform}}}
        (b)     {send 1 {array get tcl_platform}}
        (c)     {send 1 {array {get tcl_platform}}}

        are all valid representations of the same command. They are
        generated via

        (a')    send {array get tcl_platform}
        (b')    send array get tcl_platform
        (c')    send array {get tcl_platform}

        respectively

    Note that \(a\), generated by \(a'\), is the usual form, if only single commands
    are sent by the client\. For example constructed using
    __[list](\.\./\.\./\.\./\.\./index\.md\#list)__, if the command contains
    variable arguments\. Like

        send [list array get $the_variable]

    These three instructions all invoke the script on the server side\. Their
    difference is in the treatment of result values, and thus determines if a
    reply is expected\.

      * __send__

        A reply is expected\. The sender is waiting for the result\.

      * __async__

        No reply is expected, the sender has no interest in the result and is
        not waiting for any\.

      * __command__

        A reply is expected, but the sender is not waiting for it\. It has
        arranged to get a process\-internal notification when the result arrives\.

  - __reply__

    Like the previous three command, however the tcl script in the payload is
    highly restricted\. It has to be a syntactically valid Tcl
    __[return](\.\./\.\./\.\./\.\./index\.md\#return)__ command\. This contains
    result code, value, error code, and error info\.

    Examples:

        {reply 1 {return -code 0 {}}}
        {reply 1 {return -code 0 {osVersion 2.4.21-99-default byteOrder littleEndian machine i686 platform unix os Linux user andreask wordSize 4}}}

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *comm* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[comm](comm\.md)

# <a name='keywords'></a>KEYWORDS

[comm](\.\./\.\./\.\./\.\./index\.md\#comm),
[communication](\.\./\.\./\.\./\.\./index\.md\#communication),
[ipc](\.\./\.\./\.\./\.\./index\.md\#ipc),
[message](\.\./\.\./\.\./\.\./index\.md\#message), [remote
communication](\.\./\.\./\.\./\.\./index\.md\#remote\_communication), [remote
execution](\.\./\.\./\.\./\.\./index\.md\#remote\_execution),
[rpc](\.\./\.\./\.\./\.\./index\.md\#rpc), [socket](\.\./\.\./\.\./\.\./index\.md\#socket)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Docs\. Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/control/control.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

[//000000001]: # (control \- Tcl Control Flow Commands)
[//000000002]: # (Generated from file 'control\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (control\(n\) 0\.1\.3 tcllib "Tcl Control Flow Commands")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

control \- Procedures for control flow structures\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [LIMITATIONS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require control ?0\.1\.3?  

[__control::control__ *command* *option* ?*arg arg \.\.\.*?](#1)  
[__control::assert__ *expr* ?*arg arg \.\.\.*?](#2)  
[__control::do__ *body* ?*option test*?](#3)  
[__control::no\-op__ ?*arg arg \.\.\.*?](#4)  

# <a name='description'></a>DESCRIPTION

The __control__ package provides a variety of commands that provide
additional flow of control structures beyond the built\-in ones provided by Tcl\.
These are commands that in many programming languages might be considered
*keywords*, or a part of the language itself\. In Tcl, control flow structures
are just commands like everything else\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__control::control__ *command* *option* ?*arg arg \.\.\.*?

    The __control__ command is used as a configuration command for
    customizing the other public commands of the control package\. The
    *command* argument names the command to be customized\. The set of valid
    *option* and subsequent arguments are determined by the command being
    customized, and are documented with the command\.

  - <a name='2'></a>__control::assert__ *expr* ?*arg arg \.\.\.*?

    When disabled, the __[assert](\.\./\.\./\.\./\.\./index\.md\#assert)__ command
    behaves exactly like the __[no\-op](\.\./\.\./\.\./\.\./index\.md\#no\_op)__
    command\.

    When enabled, the __[assert](\.\./\.\./\.\./\.\./index\.md\#assert)__ command
    evaluates *expr* as an expression \(in the same way that __expr__
    evaluates its argument\)\. If evaluation reveals that *expr* is not a valid
    boolean expression \(according to \[__string is boolean \-strict__\]\), an
    error is raised\. If *expr* evaluates to a true boolean value \(as
    recognized by __if__\), then
    __[assert](\.\./\.\./\.\./\.\./index\.md\#assert)__ returns an empty string\.
    Otherwise, the remaining arguments to
    __[assert](\.\./\.\./\.\./\.\./index\.md\#assert)__ are used to construct a
    message string\. If there are no arguments, the message string is "assertion
    failed: $expr"\. If there are arguments, they are joined by
    __[join](\.\./\.\./\.\./\.\./index\.md\#join)__ to form the message string\.
    The message string is then appended as an argument to a callback command,
    and the completed callback command is evaluated in the global namespace\.

    The __[assert](\.\./\.\./\.\./\.\./index\.md\#assert)__ command can be
    customized by the __control__ command in two ways:

    \[__control::control assert enabled__ ?*boolean*?\] queries or sets
    whether __control::assert__ is enabled\. When called without a
    *boolean* argument, a boolean value is returned indicating whether the
    __control::assert__ command is enabled\. When called with a valid boolean
    value as the *boolean* argument, the __control::assert__ command is
    enabled or disabled to match the argument, and an empty string is returned\.

    \[__control::control assert callback__ ?*command*?\] queries or sets the
    callback command that will be called by an enabled
    __[assert](\.\./\.\./\.\./\.\./index\.md\#assert)__ on assertion failure\. When
    called without a *command* argument, the current callback command is
    returned\. When called with a *command* argument, that argument becomes the
    new assertion failure callback command\. Note that an assertion failure
    callback command is always defined, even when
    __[assert](\.\./\.\./\.\./\.\./index\.md\#assert)__ is disabled\. The default
    callback command is \[__return \-code error__\]\.

    Note that __control::assert__ has been written so that in combination
    with \[__namespace import__\], it is possible to use enabled
    __[assert](\.\./\.\./\.\./\.\./index\.md\#assert)__ commands in some
    namespaces and disabled __[assert](\.\./\.\./\.\./\.\./index\.md\#assert)__
    commands in other namespaces at the same time\. This capability is useful so
    that debugging efforts can be independently controlled module by module\.

        % package require control
        % control::control assert enabled 1
        % namespace eval one namespace import ::control::assert
        % control::control assert enabled 0
        % namespace eval two namespace import ::control::assert
        % one::assert {1 == 0}
        assertion failed: 1 == 0
        % two::assert {1 == 0}

  - <a name='3'></a>__control::do__ *body* ?*option test*?

    The __[do](\.\./\.\./\.\./\.\./index\.md\#do)__ command evaluates the script
    *body* repeatedly *until* the expression *test* becomes true or as
    long as \(*while*\) *test* is true, depending on the value of *option*
    being __until__ or __while__\. If *option* and *test* are omitted
    the body is evaluated exactly once\. After normal completion,
    __[do](\.\./\.\./\.\./\.\./index\.md\#do)__ returns an empty string\.
    Exceptional return codes \(__break__, __continue__,
    __[error](\.\./\.\./\.\./\.\./index\.md\#error)__, etc\.\) during the evaluation
    of *body* are handled in the same way the __while__ command handles
    them, except as noted in [LIMITATIONS](#section3), below\.

  - <a name='4'></a>__control::no\-op__ ?*arg arg \.\.\.*?

    The __[no\-op](\.\./\.\./\.\./\.\./index\.md\#no\_op)__ command takes any number
    of arguments and does nothing\. It returns an empty string\.

# <a name='section3'></a>LIMITATIONS

Several of the commands provided by the __control__ package accept arguments
that are scripts to be evaluated\. Due to fundamental limitations of Tcl's
__catch__ and __[return](\.\./\.\./\.\./\.\./index\.md\#return)__ commands, it
is not possible for these commands to properly evaluate the command \[__return
\-code $code__\] within one of those script arguments for any value of *$code*
other than *ok*\. In this way, the commands of the __control__ package are
limited as compared to Tcl's built\-in control flow commands \(such as __if__,
__while__, etc\.\) and those control flow commands that can be provided by
packages coded in C\. An example of this difference:

    % package require control
    % proc a {} {while 1 {return -code error a}}
    % proc b {} {control::do {return -code error b} while 1}
    % catch a
    1
    % catch b
    0

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *control* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

break, continue, expr, if, [join](\.\./\.\./\.\./\.\./index\.md\#join), namespace,
[return](\.\./\.\./\.\./\.\./index\.md\#return),
[string](\.\./\.\./\.\./\.\./index\.md\#string), while

# <a name='keywords'></a>KEYWORDS

[assert](\.\./\.\./\.\./\.\./index\.md\#assert),
[control](\.\./\.\./\.\./\.\./index\.md\#control), [do](\.\./\.\./\.\./\.\./index\.md\#do),
[flow](\.\./\.\./\.\./\.\./index\.md\#flow), [no\-op](\.\./\.\./\.\./\.\./index\.md\#no\_op),
[structure](\.\./\.\./\.\./\.\./index\.md\#structure)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/coroutine/coro_auto.md.

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
89
90
91
92
93
94
95
96
97
98
99

[//000000001]: # (coroutine::auto \- Coroutine utilities)
[//000000002]: # (Generated from file 'coro\_auto\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2010\-2014 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (coroutine::auto\(n\) 1\.1\.3 tcllib "Coroutine utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

coroutine::auto \- Automatic event and IO coroutine awareness

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require coroutine::auto 1\.1\.3  
package require coroutine 1\.1  

# <a name='description'></a>DESCRIPTION

The __coroutine::auto__ package provides no commands or other directly
visible functionality\. Built on top of the package
__[coroutine](tcllib\_coroutine\.md)__, it intercepts various builtin
commands of the Tcl core to make any code using them coroutine\-oblivious, i\.e\.
able to run inside and outside of a coroutine without changes\.

The commands so affected by this package are

  - __[after](\.\./\.\./\.\./\.\./index\.md\#after)__

  - __[exit](\.\./\.\./\.\./\.\./index\.md\#exit)__

  - __[gets](\.\./\.\./\.\./\.\./index\.md\#gets)__

  - __[global](\.\./\.\./\.\./\.\./index\.md\#global)__

  - __[read](\.\./\.\./\.\./\.\./index\.md\#read)__

  - __[update](\.\./\.\./\.\./\.\./index\.md\#update)__

  - __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *coroutine* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[after](\.\./\.\./\.\./\.\./index\.md\#after),
[channel](\.\./\.\./\.\./\.\./index\.md\#channel),
[coroutine](\.\./\.\./\.\./\.\./index\.md\#coroutine),
[events](\.\./\.\./\.\./\.\./index\.md\#events),
[exit](\.\./\.\./\.\./\.\./index\.md\#exit), [gets](\.\./\.\./\.\./\.\./index\.md\#gets),
[global](\.\./\.\./\.\./\.\./index\.md\#global), [green
threads](\.\./\.\./\.\./\.\./index\.md\#green\_threads),
[read](\.\./\.\./\.\./\.\./index\.md\#read),
[threads](\.\./\.\./\.\./\.\./index\.md\#threads),
[update](\.\./\.\./\.\./\.\./index\.md\#update),
[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)

# <a name='category'></a>CATEGORY

Coroutine

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2010\-2014 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































Deleted embedded/md/tcllib/files/modules/coroutine/tcllib_coroutine.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

[//000000001]: # (coroutine \- Coroutine utilities)
[//000000002]: # (Generated from file 'tcllib\_coroutine\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2010\-2015 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (coroutine\(n\) 1\.2 tcllib "Coroutine utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

coroutine \- Coroutine based event and IO handling

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require coroutine 1\.2  

[__coroutine::util after__ *delay*](#1)  
[__coroutine::util await__ *varname*\.\.\.](#2)  
[__coroutine::util create__ *arg*\.\.\.](#3)  
[__coroutine::util exit__ ?*status*?](#4)  
[__coroutine::util gets__ *chan* ?*varname*?](#5)  
[__coroutine::util gets\_safety__ *chan* *limit* *varname*](#6)  
[__coroutine::util global__ *varname*\.\.\.](#7)  
[__coroutine::util read__ __\-nonewline__ *chan* ?*n*?](#8)  
[__coroutine::util update__ ?__idletasks__?](#9)  
[__coroutine::util vwait__ *varname*](#10)  

# <a name='description'></a>DESCRIPTION

The __coroutine__ package provides coroutine\-aware implementations of
various event\- and channel related commands\. It can be in multiple modes:

  1. Call the commands through their ensemble, in code which is explicitly
     written for use within coroutines\.

  1. Import the commands into a namespace, either directly, or through
     __namespace path__\. This allows the use from within code which is not
     coroutine\-aware per se and restricted to specific namespaces\.

A more agressive form of making code coroutine\-oblivious than point 2 above is
available through the package __[coroutine::auto](coro\_auto\.md)__, which
intercepts the relevant builtin commands and changes their implementation
dependending on the context they are run in, i\.e\. inside or outside of a
coroutine\.

# <a name='section2'></a>API

All the commands listed below are synchronous with respect to the coroutine
invoking them, i\.e\. this coroutine blocks until the result is available\. The
overall eventloop is not blocked however\.

  - <a name='1'></a>__coroutine::util after__ *delay*

    This command delays the coroutine invoking it by *delay* milliseconds\.

  - <a name='2'></a>__coroutine::util await__ *varname*\.\.\.

    This command is an extension form of the __coroutine::util vwait__
    command \(see below\) which waits on a write to one of many named namespace
    variables\.

  - <a name='3'></a>__coroutine::util create__ *arg*\.\.\.

    This command creates a new coroutine with an automatically assigned name and
    causes it to run the code specified by the arguments\.

  - <a name='4'></a>__coroutine::util exit__ ?*status*?

    This command exits the current coroutine, causing it to return *status*\.
    If no status was specified the default *0* is returned\.

  - <a name='5'></a>__coroutine::util gets__ *chan* ?*varname*?

    This command reads a line from the channel *chan* and returns it either as
    its result, or, if a *varname* was specified, writes it to the named
    variable and returns the number of characters read\.

  - <a name='6'></a>__coroutine::util gets\_safety__ *chan* *limit* *varname*

    This command reads a line from the channel *chan* up to size *limit* and
    stores the result in *varname*\. Of *limit* is reached before the set
    first newline, an error is thrown\. The command returns the number of
    characters read\.

  - <a name='7'></a>__coroutine::util global__ *varname*\.\.\.

    This command imports the named global variables of the coroutine into the
    current scope\. From the technical point of view these variables reside in
    level __\#1__ of the Tcl stack\. I\.e\. these are not the regular global
    variable in to the global namespace, and each coroutine can have their own
    set, independent of all others\.

  - <a name='8'></a>__coroutine::util read__ __\-nonewline__ *chan* ?*n*?

    This command reads *n* characters from the channel *chan* and returns
    them as its result\. If *n* is not specified the command will read the
    channel until EOF is reached\.

  - <a name='9'></a>__coroutine::util update__ ?__idletasks__?

    This command causes the coroutine invoking it to run pending events or idle
    handlers before proceeding\.

  - <a name='10'></a>__coroutine::util vwait__ *varname*

    This command causes the coroutine calling it to wait for a write to the
    named namespace variable *varname*\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *coroutine* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[after](\.\./\.\./\.\./\.\./index\.md\#after),
[channel](\.\./\.\./\.\./\.\./index\.md\#channel),
[coroutine](\.\./\.\./\.\./\.\./index\.md\#coroutine),
[events](\.\./\.\./\.\./\.\./index\.md\#events),
[exit](\.\./\.\./\.\./\.\./index\.md\#exit), [gets](\.\./\.\./\.\./\.\./index\.md\#gets),
[global](\.\./\.\./\.\./\.\./index\.md\#global), [green
threads](\.\./\.\./\.\./\.\./index\.md\#green\_threads),
[read](\.\./\.\./\.\./\.\./index\.md\#read),
[threads](\.\./\.\./\.\./\.\./index\.md\#threads),
[update](\.\./\.\./\.\./\.\./index\.md\#update),
[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)

# <a name='category'></a>CATEGORY

Coroutine

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2010\-2015 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/counter/counter.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281

[//000000001]: # (counter \- Counters and Histograms)
[//000000002]: # (Generated from file 'counter\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (counter\(n\) 2\.0\.4 tcllib "Counters and Histograms")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

counter \- Procedures for counters and histograms

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8  
package require counter ?2\.0\.4?  

[__::counter::init__ *tag args*](#1)  
[__::counter::count__ *tag* ?*delta*? ?*instance*?](#2)  
[__::counter::start__ *tag instance*](#3)  
[__::counter::stop__ *tag instance*](#4)  
[__::counter::get__ *tag args*](#5)  
[__::counter::exists__ *tag*](#6)  
[__::counter::names__](#7)  
[__::counter::histHtmlDisplay__ *tag args*](#8)  
[__::counter::reset__ *tag args*](#9)  

# <a name='description'></a>DESCRIPTION

The __counter__ package provides a counter facility and can compute
statistics and histograms over the collected data\.

  - <a name='1'></a>__::counter::init__ *tag args*

    This defines a counter with the name *tag*\. The *args* determines the
    characteristics of the counter\. The *args* are

      * __\-group__ *name*

        Keep a grouped counter where the name of the histogram bucket is passed
        into __::counter::count__\.

      * __\-hist__ *bucketsize*

        Accumulate the counter into histogram buckets of size *bucketsize*\.
        For example, if the samples are millisecond time values and
        *bucketsize* is 10, then each histogram bucket represents time values
        of 0 to 10 msec, 10 to 20 msec, 20 to 30 msec, and so on\.

      * __\-hist2x__ *bucketsize*

        Accumulate the statistic into histogram buckets\. The size of the first
        bucket is *bucketsize*, each other bucket holds values 2 times the
        size of the previous bucket\. For example, if *bucketsize* is 10, then
        each histogram bucket represents time values of 0 to 10 msec, 10 to 20
        msec, 20 to 40 msec, 40 to 80 msec, and so on\.

      * __\-hist10x__ *bucketsize*

        Accumulate the statistic into histogram buckets\. The size of the first
        bucket is *bucketsize*, each other bucket holds values 10 times the
        size of the previous bucket\. For example, if *bucketsize* is 10, then
        each histogram bucket represents time values of 0 to 10 msec, 10 to 100
        msec, 100 to 1000 msec, and so on\.

      * __\-lastn__ *N*

        Save the last *N* values of the counter to maintain a "running
        average" over the last *N* values\.

      * __\-timehist__ *secsPerMinute*

        Keep a time\-based histogram\. The counter is summed into a histogram
        bucket based on the current time\. There are 60 per\-minute buckets that
        have a size determined by *secsPerMinute*, which is normally 60, but
        for testing purposes can be less\. Every "hour" \(i\.e\., 60 "minutes"\) the
        contents of the per\-minute buckets are summed into the next hourly
        bucket\. Every 24 "hours" the contents of the per\-hour buckets are summed
        into the next daily bucket\. The counter package keeps all time\-based
        histograms in sync, so the first *secsPerMinute* value seen by the
        package is used for all subsequent time\-based histograms\.

  - <a name='2'></a>__::counter::count__ *tag* ?*delta*? ?*instance*?

    Increment the counter identified by *tag*\. The default increment is 1,
    although you can increment by any value, integer or real, by specifying
    *delta*\. You must declare each counter with __::counter::init__ to
    define the characteristics of counter before you start to use it\. If the
    counter type is __\-group__, then the counter identified by *instance*
    is incremented\.

  - <a name='3'></a>__::counter::start__ *tag instance*

    Record the starting time of an interval\. The *tag* is the name of the
    counter defined as a __\-hist__ value\-based histogram\. The *instance*
    is used to distinguish this interval from any other intervals that might be
    overlapping this one\.

  - <a name='4'></a>__::counter::stop__ *tag instance*

    Record the ending time of an interval\. The delta time since the
    corresponding __::counter::start__ call for *instance* is recorded in
    the histogram identified by *tag*\.

  - <a name='5'></a>__::counter::get__ *tag args*

    Return statistics about a counter identified by *tag*\. The *args*
    determine what value to return:

      * __\-total__

        Return the total value of the counter\. This is the default if *args*
        is not specified\.

      * __\-totalVar__

        Return the name of the total variable\. Useful for specifying with
        \-textvariable in a Tk widget\.

      * __\-N__

        Return the number of samples accumulated into the counter\.

      * __\-avg__

        Return the average of samples accumulated into the counter\.

      * __\-avgn__

        Return the average over the last *N* samples taken\. The *N* value is
        set in the __::counter::init__ call\.

      * __\-hist__ *bucket*

        If *bucket* is specified, then the value in that bucket of the
        histogram is returned\. Otherwise the complete histogram is returned in
        array get format sorted by bucket\.

      * __\-histVar__

        Return the name of the histogram array variable\.

      * __\-histHour__

        Return the complete hourly histogram in array get format sorted by
        bucket\.

      * __\-histHourVar__

        Return the name of the hourly histogram array variable\.

      * __\-histDay__

        Return the complete daily histogram in array get format sorted by
        bucket\.

      * __\-histDayVar__

        Return the name of the daily histogram array variable\.

      * __\-resetDate__

        Return the clock seconds value recorded when the counter was last reset\.

      * __\-all__

        Return an array get of the array used to store the counter\. This
        includes the total, the number of samples \(N\), and any type\-specific
        information\. This does not include the histogram array\.

  - <a name='6'></a>__::counter::exists__ *tag*

    Returns 1 if the counter is defined\.

  - <a name='7'></a>__::counter::names__

    Returns a list of all counters defined\.

  - <a name='8'></a>__::counter::histHtmlDisplay__ *tag args*

    Generate HTML to display a histogram for a counter\. The *args* control the
    format of the display\. They are:

      * __\-title__ *string*

        Label to display above bar chart

      * __\-unit__ *unit*

        Specify __minutes__, __hours__, or __days__ for the
        time\-base histograms\. For value\-based histograms, the *unit* is used
        in the title\.

      * __\-images__ *url*

        URL of /images directory\.

      * __\-gif__ *filename*

        Image for normal histogram bars\. The *filename* is relative to the
        __\-images__ directory\.

      * __\-ongif__ *filename*

        Image for the active histogram bar\. The *filename* is relative to the
        __\-images__ directory\.

      * __\-max__ *N*

        Maximum number of value\-based buckets to display\.

      * __\-height__ *N*

        Pixel height of the highest bar\.

      * __\-width__ *N*

        Pixel width of each bar\.

      * __\-skip__ *N*

        Buckets to skip when labeling value\-based histograms\.

      * __\-format__ *string*

        Format used to display labels of buckets\.

      * __\-text__ *boolean*

        If 1, a text version of the histogram is dumped, otherwise a graphical
        one is generated\.

  - <a name='9'></a>__::counter::reset__ *tag args*

    Resets the counter with the name *tag* to an initial state\. The *args*
    determine the new characteristics of the counter\. They have the same meaning
    as described for __::counter::init__\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *counter* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[counting](\.\./\.\./\.\./\.\./index\.md\#counting),
[histogram](\.\./\.\./\.\./\.\./index\.md\#histogram),
[statistics](\.\./\.\./\.\./\.\./index\.md\#statistics),
[tallying](\.\./\.\./\.\./\.\./index\.md\#tallying)

# <a name='category'></a>CATEGORY

Data structures
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/crc/cksum.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

[//000000001]: # (cksum \- Cyclic Redundancy Checks)
[//000000002]: # (Generated from file 'cksum\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002, Pat Thoyts)
[//000000004]: # (cksum\(n\) 1\.1\.4 tcllib "Cyclic Redundancy Checks")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

cksum \- Calculate a cksum\(1\) compatible checksum

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [OPTIONS](#section3)

  - [PROGRAMMING INTERFACE](#section4)

  - [EXAMPLES](#section5)

  - [AUTHORS](#section6)

  - [Bugs, Ideas, Feedback](#section7)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require cksum ?1\.1\.4?  

[__::crc::cksum__ ?*\-format format*? ?*\-chunksize size*? \[ *\-channel chan* &#124; *\-filename file* &#124; *string* \]](#1)  
[__::crc::CksumInit__](#2)  
[__::crc::CksumUpdate__ *token* *data*](#3)  
[__::crc::CksumFinal__ *token*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a Tcl implementation of the cksum\(1\) algorithm based upon
information provided at in the GNU implementation of this program as part of the
GNU Textutils 2\.0 package\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::crc::cksum__ ?*\-format format*? ?*\-chunksize size*? \[ *\-channel chan* &#124; *\-filename file* &#124; *string* \]

    The command takes string data or a channel or file name and returns a
    checksum value calculated using the __cksum\(1\)__ algorithm\. The result
    is formatted using the *format*\(n\) specifier provided or as an unsigned
    integer \(%u\) by default\.

# <a name='section3'></a>OPTIONS

  - \-channel *name*

    Return a checksum for the data read from a channel\. The command will read
    data from the channel until the __eof__ is true\. If you need to be able
    to process events during this calculation see the [PROGRAMMING
    INTERFACE](#section4) section

  - \-filename *name*

    This is a convenience option that opens the specified file, sets the
    encoding to binary and then acts as if the *\-channel* option had been
    used\. The file is closed on completion\.

  - \-format *string*

    Return the checksum using an alternative format template\.

# <a name='section4'></a>PROGRAMMING INTERFACE

The cksum package implements the checksum using a context variable to which
additional data can be added at any time\. This is expecially useful in an event
based environment such as a Tk application or a web server package\. Data to be
checksummed may be handled incrementally during a __fileevent__ handler in
discrete chunks\. This can improve the interactive nature of a GUI application
and can help to avoid excessive memory consumption\.

  - <a name='2'></a>__::crc::CksumInit__

    Begins a new cksum context\. Returns a token ID that must be used for the
    remaining functions\. An optional seed may be specified if required\.

  - <a name='3'></a>__::crc::CksumUpdate__ *token* *data*

    Add data to the checksum identified by token\. Calling *CksumUpdate $token
    "abcd"* is equivalent to calling *CksumUpdate $token "ab"* followed by
    *CksumUpdate $token "cb"*\. See [EXAMPLES](#section5)\.

  - <a name='4'></a>__::crc::CksumFinal__ *token*

    Returns the checksum value and releases any resources held by this token\.
    Once this command completes the token will be invalid\. The result is a 32
    bit integer value\.

# <a name='section5'></a>EXAMPLES

    % crc::cksum "Hello, World!"
    2609532967

    % crc::cksum -format 0x%X "Hello, World!"
    0x9B8A5027

    % crc::cksum -file cksum.tcl
    1828321145

    % set tok [crc::CksumInit]
    % crc::CksumUpdate $tok "Hello, "
    % crc::CksumUpdate $tok "World!"
    % crc::CksumFinal $tok
    2609532967

# <a name='section6'></a>AUTHORS

Pat Thoyts

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *crc* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[crc32\(n\)](crc32\.md), [sum\(n\)](sum\.md)

# <a name='keywords'></a>KEYWORDS

[checksum](\.\./\.\./\.\./\.\./index\.md\#checksum),
[cksum](\.\./\.\./\.\./\.\./index\.md\#cksum), [crc](\.\./\.\./\.\./\.\./index\.md\#crc),
[crc32](\.\./\.\./\.\./\.\./index\.md\#crc32), [cyclic redundancy
check](\.\./\.\./\.\./\.\./index\.md\#cyclic\_redundancy\_check), [data
integrity](\.\./\.\./\.\./\.\./index\.md\#data\_integrity),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002, Pat Thoyts
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/crc/crc16.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

[//000000001]: # (crc16 \- Cyclic Redundancy Checks)
[//000000002]: # (Generated from file 'crc16\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002, 2017, Pat Thoyts)
[//000000004]: # (crc16\(n\) 1\.1\.4 tcllib "Cyclic Redundancy Checks")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

crc16 \- Perform a 16bit Cyclic Redundancy Check

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [OPTIONS](#section3)

  - [EXAMPLES](#section4)

  - [AUTHORS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require crc16 ?1\.1\.4?  

[__::crc::crc16__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? __\-\-__ *message*](#1)  
[__::crc::crc16__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? \-filename *file*](#2)  
[__::crc::crc\-ccitt__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? __\-\-__ *message*](#3)  
[__::crc::crc\-ccitt__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? \-filename *file*](#4)  
[__::crc::xmodem__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? __\-\-__ *message*](#5)  
[__::crc::xmodem__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? \-filename *file*](#6)  

# <a name='description'></a>DESCRIPTION

This package provides a Tcl\-only implementation of the CRC algorithms based upon
information provided at http://www\.microconsultants\.com/tips/crc/crc\.txt There
are a number of permutations available for calculating CRC checksums and this
package can handle all of them\. Defaults are set up for the most common cases\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::crc::crc16__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? __\-\-__ *message*

  - <a name='2'></a>__::crc::crc16__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? \-filename *file*

  - <a name='3'></a>__::crc::crc\-ccitt__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? __\-\-__ *message*

  - <a name='4'></a>__::crc::crc\-ccitt__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? \-filename *file*

  - <a name='5'></a>__::crc::xmodem__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? __\-\-__ *message*

  - <a name='6'></a>__::crc::xmodem__ ?\-format *format*? ?\-seed *value*? ?\-implementation *procname*? \-filename *file*

    The command takes either string data or a file name and returns a checksum
    value calculated using the CRC algorithm\. The command used sets up the CRC
    polynomial, initial value and bit ordering for the desired standard checksum
    calculation\. The result is formatted using the *format*\(n\) specifier
    provided or as an unsigned integer \(%u\) by default\.

    A number of common polynomials are in use with the CRC algorithm and the
    most commonly used of these are included in this package\. For convenience
    each of these has a command alias in the crc namespace\.

    It is possible to implement the CRC\-32 checksum using this crc16 package as
    the implementation is sufficiently generic to extend to 32 bit checksums\. As
    an example this has been done already \- however this is not the fastest
    method to implement this algorithm in Tcl and a separate
    __[crc32](crc32\.md)__ package is available\.

# <a name='section3'></a>OPTIONS

  - \-filename *name*

    Return a checksum for the file contents instead of for parameter data\.

  - \-format *string*

    Return the checksum using an alternative format template\.

  - \-seed *value*

    Select an alternative seed value for the CRC calculation\. The default is 0
    for the CRC16 calculation and 0xFFFF for the CCITT version\. This can be
    useful for calculating the CRC for data structures without first converting
    the whole structure into a string\. The CRC of the previous member can be
    used as the seed for calculating the CRC of the next member\. It is also used
    for accumulating a checksum from fragments of a large message \(or file\)

  - \-implementation *procname*

    This hook is provided to allow users to provide their own implementation
    \(perhaps a C compiled extension\)\. The procedure specfied is called with two
    parameters\. The first is the data to be checksummed and the second is the
    seed value\. An integer is expected as the result\.

    The package provides some implementations of standard CRC polynomials for
    the XMODEM, CCITT and the usual CRC\-16 checksum\. For convenience, additional
    commands have been provided that make use of these implementations\.

  - \-\-

    Terminate option processing\. Please note that using the option termination
    flag is important when processing data from parameters\. If the binary data
    looks like one of the options given above then the data will be read as an
    option if this marker is not included\. Always use the *\-\-* option
    termination flag before giving the data argument\.

# <a name='section4'></a>EXAMPLES

    % crc::crc16 -- "Hello, World!"
    64077

    % crc::crc-ccitt -- "Hello, World!"
    26586

    % crc::crc16 -format 0x%X -- "Hello, World!"
    0xFA4D

    % crc::crc16 -file crc16.tcl
    51675

# <a name='section5'></a>AUTHORS

Pat Thoyts

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *crc* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[cksum\(n\)](cksum\.md), [crc32\(n\)](crc32\.md), [sum\(n\)](sum\.md)

# <a name='keywords'></a>KEYWORDS

[checksum](\.\./\.\./\.\./\.\./index\.md\#checksum),
[cksum](\.\./\.\./\.\./\.\./index\.md\#cksum), [crc](\.\./\.\./\.\./\.\./index\.md\#crc),
[crc16](\.\./\.\./\.\./\.\./index\.md\#crc16),
[crc32](\.\./\.\./\.\./\.\./index\.md\#crc32), [cyclic redundancy
check](\.\./\.\./\.\./\.\./index\.md\#cyclic\_redundancy\_check), [data
integrity](\.\./\.\./\.\./\.\./index\.md\#data\_integrity),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002, 2017, Pat Thoyts
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/crc/crc32.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185

[//000000001]: # (crc32 \- Cyclic Redundancy Checks)
[//000000002]: # (Generated from file 'crc32\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002, Pat Thoyts)
[//000000004]: # (crc32\(n\) 1\.3\.3 tcllib "Cyclic Redundancy Checks")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

crc32 \- Perform a 32bit Cyclic Redundancy Check

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [OPTIONS](#section3)

  - [PROGRAMMING INTERFACE](#section4)

  - [EXAMPLES](#section5)

  - [AUTHORS](#section6)

  - [Bugs, Ideas, Feedback](#section7)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require crc32 ?1\.3\.3?  

[__::crc::crc32__ ?\-format *format*? ?\-seed *value*? \[ *\-channel chan* &#124; *\-filename file* &#124; *message* \]](#1)  
[__::crc::Crc32Init__ ?*seed*?](#2)  
[__::crc::Crc32Update__ *token* *data*](#3)  
[__::crc::Crc32Final__ *token*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a Tcl implementation of the CRC\-32 algorithm based upon
information provided at http://www\.naaccr\.org/standard/crc32/document\.html If
either the __critcl__ package or the __Trf__ package are available then
a compiled version may be used internally to accelerate the checksum
calculation\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::crc::crc32__ ?\-format *format*? ?\-seed *value*? \[ *\-channel chan* &#124; *\-filename file* &#124; *message* \]

    The command takes either string data or a channel or file name and returns a
    checksum value calculated using the CRC\-32 algorithm\. The result is
    formatted using the *format*\(n\) specifier provided\. The default is to
    return the value as an unsigned integer \(format %u\)\.

# <a name='section3'></a>OPTIONS

  - \-channel *name*

    Return a checksum for the data read from a channel\. The command will read
    data from the channel until the __eof__ is true\. If you need to be able
    to process events during this calculation see the [PROGRAMMING
    INTERFACE](#section4) section

  - \-filename *name*

    This is a convenience option that opens the specified file, sets the
    encoding to binary and then acts as if the *\-channel* option had been
    used\. The file is closed on completion\.

  - \-format *string*

    Return the checksum using an alternative format template\.

  - \-seed *value*

    Select an alternative seed value for the CRC calculation\. The default is
    0xffffffff\. This can be useful for calculating the CRC for data structures
    without first converting the whole structure into a string\. The CRC of the
    previous member can be used as the seed for calculating the CRC of the next
    member\. Note that the crc32 algorithm includes a final XOR step\. If
    incremental processing is desired then this must be undone before using the
    output of the algorithm as the seed for further processing\. A simpler
    alternative is to use the [PROGRAMMING INTERFACE](#section4) which is
    intended for this mode of operation\.

# <a name='section4'></a>PROGRAMMING INTERFACE

The CRC\-32 package implements the checksum using a context variable to which
additional data can be added at any time\. This is expecially useful in an event
based environment such as a Tk application or a web server package\. Data to be
checksummed may be handled incrementally during a __fileevent__ handler in
discrete chunks\. This can improve the interactive nature of a GUI application
and can help to avoid excessive memory consumption\.

  - <a name='2'></a>__::crc::Crc32Init__ ?*seed*?

    Begins a new CRC32 context\. Returns a token ID that must be used for the
    remaining functions\. An optional seed may be specified if required\.

  - <a name='3'></a>__::crc::Crc32Update__ *token* *data*

    Add data to the checksum identified by token\. Calling *Crc32Update $token
    "abcd"* is equivalent to calling *Crc32Update $token "ab"* followed by
    *Crc32Update $token "cb"*\. See [EXAMPLES](#section5)\.

  - <a name='4'></a>__::crc::Crc32Final__ *token*

    Returns the checksum value and releases any resources held by this token\.
    Once this command completes the token will be invalid\. The result is a 32
    bit integer value\.

# <a name='section5'></a>EXAMPLES

    % crc::crc32 "Hello, World!"
    3964322768

    % crc::crc32 -format 0x%X "Hello, World!"
    0xEC4AC3D0

    % crc::crc32 -file crc32.tcl
    483919716

    % set tok [crc::Crc32Init]
    % crc::Crc32Update $tok "Hello, "
    % crc::Crc32Update $tok "World!"
    % crc::Crc32Final $tok
    3964322768

# <a name='section6'></a>AUTHORS

Pat Thoyts

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *crc* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[cksum\(n\)](cksum\.md), [crc16\(n\)](crc16\.md), [sum\(n\)](sum\.md)

# <a name='keywords'></a>KEYWORDS

[checksum](\.\./\.\./\.\./\.\./index\.md\#checksum),
[cksum](\.\./\.\./\.\./\.\./index\.md\#cksum), [crc](\.\./\.\./\.\./\.\./index\.md\#crc),
[crc32](\.\./\.\./\.\./\.\./index\.md\#crc32), [cyclic redundancy
check](\.\./\.\./\.\./\.\./index\.md\#cyclic\_redundancy\_check), [data
integrity](\.\./\.\./\.\./\.\./index\.md\#data\_integrity),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002, Pat Thoyts
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/crc/sum.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

[//000000001]: # (sum \- Cyclic Redundancy Checks)
[//000000002]: # (Generated from file 'sum\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (sum\(n\) 1\.1\.2 tcllib "Cyclic Redundancy Checks")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

sum \- Calculate a sum\(1\) compatible checksum

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [OPTIONS](#section3)

  - [EXAMPLES](#section4)

  - [AUTHORS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require sum ?1\.1\.2?  

[__::crc::sum__ ?*\-bsd* &#124; *\-sysv*? ?*\-format fmt*? ?*\-chunksize size*? \[ *\-filename file* &#124; *\-channel chan* &#124; *string* \]](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a Tcl\-only implementation of the sum\(1\) command which
calculates a 16 bit checksum value from the input data\. The BSD sum algorithm is
used by default but the SysV algorithm is also available\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::crc::sum__ ?*\-bsd* &#124; *\-sysv*? ?*\-format fmt*? ?*\-chunksize size*? \[ *\-filename file* &#124; *\-channel chan* &#124; *string* \]

    The command takes string data or a file name or a channel and returns a
    checksum value calculated using the __sum\(1\)__ algorithm\. The result is
    formatted using the *format*\(n\) specifier provided or as an unsigned
    integer \(%u\) by default\.

# <a name='section3'></a>OPTIONS

  - \-sysv

    The SysV algorithm is fairly naive\. The byte values are summed and any
    overflow is discarded\. The lowest 16 bits are returned as the checksum\.
    Input with the same content but different ordering will give the same
    result\.

  - \-bsd

    This algorithm is similar to the SysV version but includes a bit rotation
    step which provides a dependency on the order of the data values\.

  - \-filename *name*

    Return a checksum for the file contents instead of for parameter data\.

  - \-channel *chan*

    Return a checksum for the contents of the specified channel\. The channel
    must be open for reading and should be configured for binary translation\.
    The channel will no be closed on completion\.

  - \-chunksize *size*

    Set the block size used when reading data from either files or channels\.
    This value defaults to 4096\.

  - \-format *string*

    Return the checksum using an alternative format template\.

# <a name='section4'></a>EXAMPLES

    % crc::sum "Hello, World!"
    37287

    % crc::sum -format 0x%X "Hello, World!"
    0x91A7

    % crc::sum -file sum.tcl
    13392

# <a name='section5'></a>AUTHORS

Pat Thoyts

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *crc* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[cksum\(n\)](cksum\.md), [crc32\(n\)](crc32\.md), sum\(1\)

# <a name='keywords'></a>KEYWORDS

[checksum](\.\./\.\./\.\./\.\./index\.md\#checksum),
[cksum](\.\./\.\./\.\./\.\./index\.md\#cksum), [crc](\.\./\.\./\.\./\.\./index\.md\#crc),
[crc32](\.\./\.\./\.\./\.\./index\.md\#crc32), [cyclic redundancy
check](\.\./\.\./\.\./\.\./index\.md\#cyclic\_redundancy\_check), [data
integrity](\.\./\.\./\.\./\.\./index\.md\#data\_integrity),
[security](\.\./\.\./\.\./\.\./index\.md\#security),
[sum](\.\./\.\./\.\./\.\./index\.md\#sum)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































Deleted embedded/md/tcllib/files/modules/cron/cron.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256

[//000000001]: # (cron \- cron)
[//000000002]: # (Generated from file 'cron\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2016\-2018 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (cron\(n\) 2\.1 tcllib "cron")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

cron \- Tool for automating the period callback of commands

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require cron ?2\.1?  

[__::cron::at__ *?processname?* *timecode* *command*](#1)  
[__::cron::cancel__ *processname*](#2)  
[__::cron::every__ *processname* *frequency* *command*](#3)  
[__::cron::in__ *?processname?* *timecode* *command*](#4)  
[__::cron::object\_coroutine__ *object* *coroutine* *?info?*](#5)  
[__::cron::sleep__ *milliseconds*](#6)  
[__::cron::task delete__ *process*](#7)  
[__::cron::task exists__ *process*](#8)  
[__::cron::task info__ *process*](#9)  
[__::cron::task set__ *process* *field* *value* *?field\.\.\.?* *?value\.\.\.?*](#10)  
[__::cron::wake__ *?who?*](#11)  
[__::cron::clock\_step__ *milliseconds*](#12)  
[__::cron::clock\_delay__ *milliseconds*](#13)  
[__::cron::clock\_sleep__ *seconds* *?offset?*](#14)  
[__::cron::clock\_set__ *newtime*](#15)  

# <a name='description'></a>DESCRIPTION

The __cron__ package provides a Pure\-tcl set of tools to allow programs to
schedule tasks to occur at regular intervals\. Rather than force each task to
issue it's own call to the event loop, the cron system mimics the cron utility
in Unix: on task periodically checks to see if something is to be done, and
issues all commands for a given time step at once\.

Changes in version 2\.0

While cron was originally designed to handle time scales > 1 second, the latest
version's internal understand time granularity down to the millisecond, making
it easier to integrate with other timed events\. Version 2\.0 also understands how
to properly integrate coroutines and objects\. It also adds a facility for an
external \(or script driven\) clock\. Note that vwait style events won't work very
well with an external clock\.

# <a name='section2'></a>Commands

  - <a name='1'></a>__::cron::at__ *?processname?* *timecode* *command*

    This command registers a *command* to be called at the time specified by
    *timecode*\. If *timecode* is expressed as an integer, the timecode is
    assumed to be in unixtime\. All other inputs will be interpreted by __clock
    scan__ and converted to unix time\. This task can be modified by subsequent
    calls to this package's commands by referencing *processname*\. If
    *processname* exists, it will be replaced\. If *processname* is not
    given, one is generated and returned by the command\.

        ::cron::at start_coffee {Tomorrow at 9:00am}  {remote::exec::coffeepot power on}
        ::cron::at shutdown_coffee {Tomorrow at 12:00pm}  {remote::exec::coffeepot power off}

  - <a name='2'></a>__::cron::cancel__ *processname*

    This command unregisters the process *processname* and cancels any pending
    commands\. Note: processname can be a process created by either
    __::cron::at__ or __::cron::every__\.

        ::cron::cancel check_mail

  - <a name='3'></a>__::cron::every__ *processname* *frequency* *command*

    This command registers a *command* to be called at the interval of
    *frequency*\. *frequency* is given in seconds\. This task can be modified
    by subsequent calls to this package's commands by referencing
    *processname*\. If *processname* exists, it will be replaced\.

        ::cron::every check_mail 900  ::imap_client::check_mail
        ::cron::every backup_db  3600 {::backup_procedure ::mydb}

  - <a name='4'></a>__::cron::in__ *?processname?* *timecode* *command*

    This command registers a *command* to be called after a delay of time
    specified by *timecode*\. *timecode* is expressed as an seconds\. This
    task can be modified by subsequent calls to this package's commands by
    referencing *processname*\. If *processname* exists, it will be replaced\.
    If *processname* is not given, one is generated and returned by the
    command\.

  - <a name='5'></a>__::cron::object\_coroutine__ *object* *coroutine* *?info?*

    This command registers a *coroutine*, associated with *object* to be
    called given the parameters of *info*\. If now parameters are given, the
    coroutine is assumed to be an idle task which will self\-terminate\. *info*
    can be given in any form compadible with __::cron::task set__

  - <a name='6'></a>__::cron::sleep__ *milliseconds*

    When run within a coroutine, this command will register the coroutine for a
    callback at the appointed time, and immediately yield\.

    If the ::cron::time variable is > 0 this command will advance the internal
    time, 100ms at a time\.

    In all other cases this command will generate a fictious variable, generate
    an after call, and vwait the variable:

        set eventid [incr ::cron::eventcount]
        set var ::cron::event_#$eventid
        set $var 0
        ::after $ms "set $var 1"
        ::vwait $var
        ::unset $var

    Usage:

        ::cron::sleep 250

  - <a name='7'></a>__::cron::task delete__ *process*

    Delete the process specified the *process*

  - <a name='8'></a>__::cron::task exists__ *process*

    Returns true if *process* is registered with cron\.

  - <a name='9'></a>__::cron::task info__ *process*

    Returns a dict describing *process*\. See __::cron::task set__ for a
    description of the options\.

  - <a name='10'></a>__::cron::task set__ *process* *field* *value* *?field\.\.\.?* *?value\.\.\.?*

    If *process* does not exist, it is created\. Options Include:

      * __[command](\.\./\.\./\.\./\.\./index\.md\#command)__

        If __[coroutine](\.\./coroutine/tcllib\_coroutine\.md)__ is black, a
        global command which implements this process\. If
        __[coroutine](\.\./coroutine/tcllib\_coroutine\.md)__ is not black,
        the command to invoke to create or recreate the coroutine\.

      * __[coroutine](\.\./coroutine/tcllib\_coroutine\.md)__

        The name of the coroutine \(if any\) which implements this process\.

      * __frequency__

        If \-1, this process is terminated after the next event\. If 0 this
        process should be called during every idle event\. If positive, this
        process should generate events periodically\. The frequency is an integer
        number of milliseconds between events\.

      * __[object](\.\./\.\./\.\./\.\./index\.md\#object)__

        The object associated with this process or coroutine\.

      * __scheduled__

        If non\-zero, the absolute time from the epoch \(in milliseconds\) that
        this process will trigger an event\. If zero, and the __frequency__
        is also zero, this process is called every idle loop\.

      * __[running](\.\./\.\./\.\./\.\./index\.md\#running)__

        A boolean flag\. If true it indicates the process never returned or
        yielded during the event loop, and will not be called again until it
        does so\.

  - <a name='11'></a>__::cron::wake__ *?who?*

    Wake up cron, and arrange for its event loop to be run during the next Idle
    cycle\.

        ::cron::wake {I just did something important}

Several utility commands are provided that are used internally within cron and
for testing cron, but may or may not be useful in the general cases\.

  - <a name='12'></a>__::cron::clock\_step__ *milliseconds*

    Return a clock time absolute to the epoch which falls on the next border
    between one second and the next for the value of *milliseconds*

  - <a name='13'></a>__::cron::clock\_delay__ *milliseconds*

    Return a clock time absolute to the epoch which falls on the next border
    between one second and the next *milliseconds* in the future\.

  - <a name='14'></a>__::cron::clock\_sleep__ *seconds* *?offset?*

    Return a clock time absolute to the epoch which falls exactly *seconds* in
    the future\. If offset is given it may be positive or negative, and will
    shift the final time to before or after the second would flip\.

  - <a name='15'></a>__::cron::clock\_set__ *newtime*

    Sets the internal clock for cron\. This command will advance the time in
    100ms increment, triggering events, until the internal time catches up with
    *newtime*\.

    *newtime* is expressed in absolute milliseconds since the beginning of the
    epoch\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *odie* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[cron](\.\./\.\./\.\./\.\./index\.md\#cron), [odie](\.\./\.\./\.\./\.\./index\.md\#odie)

# <a name='category'></a>CATEGORY

System

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2016\-2018 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/csv/csv.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273

[//000000001]: # (csv \- CSV processing)
[//000000002]: # (Generated from file 'csv\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002\-2015 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (csv\(n\) 0\.8\.1 tcllib "CSV processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

csv \- Procedures to handle CSV data\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [FORMAT](#section3)

  - [EXAMPLE](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require csv ?0\.8\.1?  

[__::csv::iscomplete__ *data*](#1)  
[__::csv::join__ *values* ?*sepChar*? ?*delChar*? ?*delMode*?](#2)  
[__::csv::joinlist__ *values* ?*sepChar*? ?*delChar*? ?*delMode*?](#3)  
[__::csv::joinmatrix__ *matrix* ?*sepChar*? ?*delChar*? ?*delMode*?](#4)  
[__::csv::read2matrix__ ?__\-alternate__? *chan m* \{*sepChar* ,\} \{*expand* none\}](#5)  
[__::csv::read2queue__ ?__\-alternate__? *chan q* \{*sepChar* ,\}](#6)  
[__::csv::report__ *cmd matrix* ?*chan*?](#7)  
[__::csv::split__ ?__\-alternate__? *line* ?*sepChar*? ?*delChar*?](#8)  
[__::csv::split2matrix__ ?__\-alternate__? *m line* \{*sepChar* ,\} \{*expand* none\}](#9)  
[__::csv::split2queue__ ?__\-alternate__? *q line* \{*sepChar* ,\}](#10)  
[__::csv::writematrix__ *m chan* ?*sepChar*? ?*delChar*?](#11)  
[__::csv::writequeue__ *q chan* ?*sepChar*? ?*delChar*?](#12)  

# <a name='description'></a>DESCRIPTION

The __csv__ package provides commands to manipulate information in CSV
[FORMAT](#section3) \(CSV = Comma Separated Values\)\.

# <a name='section2'></a>COMMANDS

The following commands are available:

  - <a name='1'></a>__::csv::iscomplete__ *data*

    A predicate checking if the argument *data* is a complete csv record\. The
    result is a boolean flag indicating the completeness of the data\. The result
    is true if the data is complete\.

  - <a name='2'></a>__::csv::join__ *values* ?*sepChar*? ?*delChar*? ?*delMode*?

    Takes a list of values and returns a string in CSV format containing these
    values\. The separator character can be defined by the caller, but this is
    optional\. The default is ","\. The quoting aka delimiting character can be
    defined by the caller, but this is optional\. The default is '"'\. By default
    the quoting mode *delMode* is "auto", surrounding values with *delChar*
    only when needed\. When set to "always" however, values are always surrounded
    by the *delChar* instead\.

  - <a name='3'></a>__::csv::joinlist__ *values* ?*sepChar*? ?*delChar*? ?*delMode*?

    Takes a list of lists of values and returns a string in CSV format
    containing these values\. The separator character can be defined by the
    caller, but this is optional\. The default is ","\. The quoting character can
    be defined by the caller, but this is optional\. The default is '"'\. By
    default the quoting mode *delMode* is "auto", surrounding values with
    *delChar* only when needed\. When set to "always" however, values are
    always surrounded by the *delChar* instead\. Each element of the outer list
    is considered a record, these are separated by newlines in the result\. The
    elements of each record are formatted as usual \(via __::csv::join__\)\.

  - <a name='4'></a>__::csv::joinmatrix__ *matrix* ?*sepChar*? ?*delChar*? ?*delMode*?

    Takes a *matrix* object following the API specified for the struct::matrix
    package and returns a string in CSV format containing these values\. The
    separator character can be defined by the caller, but this is optional\. The
    default is ","\. The quoting character can be defined by the caller, but this
    is optional\. The default is '"'\. By default the quoting mode *delMode* is
    "auto", surrounding values with *delChar* only when needed\. When set to
    "always" however, values are always surrounded by the *delChar* instead\.
    Each row of the matrix is considered a record, these are separated by
    newlines in the result\. The elements of each record are formatted as usual
    \(via __::csv::join__\)\.

  - <a name='5'></a>__::csv::read2matrix__ ?__\-alternate__? *chan m* \{*sepChar* ,\} \{*expand* none\}

    A wrapper around __::csv::split2matrix__ \(see below\) reading
    CSV\-formatted lines from the specified channel \(until EOF\) and adding them
    to the given matrix\. For an explanation of the *expand* argument see
    __::csv::split2matrix__\.

  - <a name='6'></a>__::csv::read2queue__ ?__\-alternate__? *chan q* \{*sepChar* ,\}

    A wrapper around __::csv::split2queue__ \(see below\) reading
    CSV\-formatted lines from the specified channel \(until EOF\) and adding them
    to the given queue\.

  - <a name='7'></a>__::csv::report__ *cmd matrix* ?*chan*?

    A report command which can be used by the matrix methods __format
    2string__ and __format 2chan__\. For the latter this command delegates
    the work to __::csv::writematrix__\. *cmd* is expected to be either
    __printmatrix__ or __printmatrix2channel__\. The channel argument,
    *chan*, has to be present for the latter and must not be present for the
    first\.

  - <a name='8'></a>__::csv::split__ ?__\-alternate__? *line* ?*sepChar*? ?*delChar*?

    converts a *line* in CSV format into a list of the values contained in the
    line\. The character used to separate the values from each other can be
    defined by the caller, via *sepChar*, but this is optional\. The default is
    ","\. The quoting character can be defined by the caller, but this is
    optional\. The default is '"'\.

    If the option __\-alternate__ is specified a slightly different syntax is
    used to parse the input\. This syntax is explained below, in the section
    [FORMAT](#section3)\.

  - <a name='9'></a>__::csv::split2matrix__ ?__\-alternate__? *m line* \{*sepChar* ,\} \{*expand* none\}

    The same as __::csv::split__, but appends the resulting list as a new
    row to the matrix *m*, using the method __add row__\. The expansion
    mode specified via *expand* determines how the command handles a matrix
    with less columns than contained in *line*\. The allowed modes are:

      * __none__

        This is the default mode\. In this mode it is the responsibility of the
        caller to ensure that the matrix has enough columns to contain the full
        line\. If there are not enough columns the list of values is silently
        truncated at the end to fit\.

      * __empty__

        In this mode the command expands an empty matrix to hold all columns of
        the specified line, but goes no further\. The overall effect is that the
        first of a series of lines determines the number of columns in the
        matrix and all following lines are truncated to that size, as if mode
        __none__ was set\.

      * __auto__

        In this mode the command expands the matrix as needed to hold all
        columns contained in *line*\. The overall effect is that after adding a
        series of lines the matrix will have enough columns to hold all columns
        of the longest line encountered so far\.

  - <a name='10'></a>__::csv::split2queue__ ?__\-alternate__? *q line* \{*sepChar* ,\}

    The same as __::csv::split__, but appending the resulting list as a
    single item to the queue *q*, using the method __put__\.

  - <a name='11'></a>__::csv::writematrix__ *m chan* ?*sepChar*? ?*delChar*?

    A wrapper around __::csv::join__ taking all rows in the matrix *m* and
    writing them CSV formatted into the channel *chan*\.

  - <a name='12'></a>__::csv::writequeue__ *q chan* ?*sepChar*? ?*delChar*?

    A wrapper around __::csv::join__ taking all items in the queue *q*
    \(assumes that they are lists\) and writing them CSV formatted into the
    channel *chan*\.

# <a name='section3'></a>FORMAT

The format of regular CSV files is specified as

  1. Each record of a csv file \(comma\-separated values, as exported e\.g\. by
     Excel\) is a set of ASCII values separated by ","\. For other languages it
     may be ";" however, although this is not important for this case as the
     functions provided here allow any separator character\.

  1. If and only if a value contains itself the separator ",", then it \(the
     value\) has to be put between ""\. If the value does not contain the
     separator character then quoting is optional\.

  1. If a value contains the character ", that character is represented by ""\.

  1. The output string "" represents the value "\. In other words, it is assumed
     that it was created through rule 3, and only this rule, i\.e\. that the value
     was not quoted\.

An alternate format definition mainly used by MS products specifies that the
output string "" is a representation of the empty string\. In other words, it is
assumed that the output was generated out of the empty string by quoting it
\(i\.e\. rule 2\), and not through rule 3\. This is the only difference between the
regular and the alternate format\.

The alternate format is activated through specification of the option
__\-alternate__ to the various split commands\.

# <a name='section4'></a>EXAMPLE

Using the regular format the record

    123,"123,521.2","Mary says ""Hello, I am Mary""",""

is parsed into the items

    a) 123
    b) 123,521.2
    c) Mary says "Hello, I am Mary"
    d) "

Using the alternate format the result is

    a) 123
    b) 123,521.2
    c) Mary says "Hello, I am Mary"
    d) (the empty string)

instead\. As can be seen only item \(d\) is different, now the empty string instead
of a "\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *csv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[matrix](\.\./\.\./\.\./\.\./index\.md\#matrix),
[queue](\.\./\.\./\.\./\.\./index\.md\#queue)

# <a name='keywords'></a>KEYWORDS

[csv](\.\./\.\./\.\./\.\./index\.md\#csv), [matrix](\.\./\.\./\.\./\.\./index\.md\#matrix),
[package](\.\./\.\./\.\./\.\./index\.md\#package),
[queue](\.\./\.\./\.\./\.\./index\.md\#queue),
[tcllib](\.\./\.\./\.\./\.\./index\.md\#tcllib)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002\-2015 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/debug/debug.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286

[//000000001]: # (debug \- debug narrative)
[//000000002]: # (Generated from file 'debug\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 200?, Colin McCormack, Wub Server Utilities)
[//000000004]: # (Copyright &copy; 2012\-2014, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (debug\(n\) 1\.0\.6 tcllib "debug narrative")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

debug \- debug narrative \- core

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require debug ?1\.0\.6?  

[__debug\.____tag__ *message* ?*level*?](#1)  
[__debug__ __2array__](#2)  
[__debug__ __define__ *tag*](#3)  
[__debug__ __header__ *text*](#4)  
[__debug__ __level__ *tag* ?*level*? ?*fd*?](#5)  
[__debug__ __names__](#6)  
[__debug__ __off__ *tag*](#7)  
[__debug__ __on__ *tag*](#8)  
[__debug__ __parray__ *arrayvarname*](#9)  
[__debug__ __pdict__ *dict*](#10)  
[__debug__ __hexl__ *data* ?*prefix*?](#11)  
[__debug__ __nl__](#12)  
[__debug__ __tab__](#13)  
[__debug__ __prefix__ *tag* ?*text*?](#14)  
[__debug__ __setting__ \(*tag* *level*\) \.\.\. ?*fd*?](#15)  
[__debug__ __suffix__ *tag* ?*text*?](#16)  
[__debug__ __trailer__ *text*](#17)  

# <a name='description'></a>DESCRIPTION

Debugging areas of interest are represented by 'tags' which have independently
settable levels of interest \(an integer, higher is more detailed\)\.

# <a name='section2'></a>API

  - <a name='1'></a>__debug\.____tag__ *message* ?*level*?

    For each known tag the package creates a command with this signature the
    user can then use to provide the debug narrative of the tag\. The narrative
    *message* is provided as a Tcl script whose value is
    __[subst](\.\./\.\./\.\./\.\./index\.md\#subst)__ed in the caller's scope if
    and only if the current level of interest for the *tag* matches or exceeds
    the call's *level* of detail\. This is useful, as one can place arbitrarily
    complex narrative in code without unnecessarily evaluating it\.

    See methods __level__ and __setting__ for querying and manipulating
    the current level of detail for tags\.

    The actually printed text consists of not only the *message*, but also
    global and tag\-specific prefix and suffix, should they exist, with each line
    in the message having the specified headers and trailers\.

    All these parts are __[subst](\.\./\.\./\.\./\.\./index\.md\#subst)__ableTcl
    scripts, which are substituted once per message before assembly\.

  - <a name='2'></a>__debug__ __2array__

    This method returns a dictionary mapping the names of all debug tags
    currently known to the package to their state and log level\. The latter are
    encoded in a single numeric value, where a negative number indicates an
    inactive tag at the level given by the absolute value, and a positive number
    is an active tag at that level\.

    See also method __settings__ below\.

  - <a name='3'></a>__debug__ __define__ *tag*

    This method registers the named *tag* with the package\. If the tag was not
    known before it is placed in an inactive state\. The state of an already
    known tag is left untouched\.

    The result of the method is the empty string\.

  - <a name='4'></a>__debug__ __header__ *text*

    This method defines a global
    __[subst](\.\./\.\./\.\./\.\./index\.md\#subst)__able Tcl script which
    provides a text printed before each line of output\.

    Note how this is tag\-independent\.

    Further note that the header substitution happens only once per actual
    printed message, i\.e\. all lines of the same message will have the same
    actual heading text\.

    The result of the method is the specified text\.

  - <a name='5'></a>__debug__ __level__ *tag* ?*level*? ?*fd*?

    This method sets the detail\-*level* for the *tag*, and the channel
    *fd* to write the tags narration into\. The level is an integer value >= 0
    defaulting to __1__\. The channel defaults to __stderr__\.

    The result of the method is the new detail\-level for the tag\.

  - <a name='6'></a>__debug__ __names__

    This method returns a list containing the names of all debug tags currently
    known to the package\.

  - <a name='7'></a>__debug__ __off__ *tag*

    This method registers the named *tag* with the package and sets it
    inactive\.

    The result of the method is the empty string\.

  - <a name='8'></a>__debug__ __on__ *tag*

    This method registers the named *tag* with the package, as active\.

    The result of the method is the empty string\.

  - <a name='9'></a>__debug__ __parray__ *arrayvarname*

    This is a convenience method formatting the named array like the builtin
    command __parray__, except it returns the resulting string instead of
    writing it directly to __stdout__\.

    This makes it suitable for use in debug messages\.

  - <a name='10'></a>__debug__ __pdict__ *dict*

    This is a convenience method formatting the dictionary similarly to how the
    builtin command __parray__ does for array, and returns the resulting
    string\.

    This makes it suitable for use in debug messages\.

  - <a name='11'></a>__debug__ __hexl__ *data* ?*prefix*?

    This is a convenience method formatting arbitrary data into a hex\-dump and
    returns the resulting string\.

    This makes it suitable for use in debug messages\.

    Each line of the dump is prefixed with *prefix*\. This prefix defaults to
    the empty string\.

  - <a name='12'></a>__debug__ __nl__

    This is a convenience method to insert a linefeed character \(ASCII 0x0a\)
    into a debug message\.

  - <a name='13'></a>__debug__ __tab__

    This is a convenience method to insert a TAB character \(ASCII 0x09\) into a
    debug message\.

  - <a name='14'></a>__debug__ __prefix__ *tag* ?*text*?

    This method is similar to the method __header__ above, in that it
    defines __[subst](\.\./\.\./\.\./\.\./index\.md\#subst)__able Tcl script which
    provides more text for debug messages\.

    In contrast to __header__ the generated text is added to the user's
    message before it is split into lines, making it a per\-message extension\.

    Furthermore the script is tag\-dependent\.

    In exception to that, a script for tag __::__ is applied to all
    messages\.

    If both global and tag\-dependent prefix exist, both are applied, with the
    global prefix coming before the tag\-dependent prefix\.

    Note that the prefix substitution happens only once per actual printed
    message\.

    The result of the method is the empty string\.

    If the *tag* was not known at the time of the call it is registered, and
    set inactive\.

  - <a name='15'></a>__debug__ __setting__ \(*tag* *level*\) \.\.\. ?*fd*?

    This method is a multi\-tag variant of method __level__ above, with the
    functionality of methods __on__, and __off__ also folded in\.

    Each named *tag* is set to the detail\-*level* following it, with a
    negative level deactivating the tag, and a positive level activating it\.

    If the last argument is not followed by a level it is not treated as tag
    name, but as the channel all the named tags should print their messages to\.

    The result of the method is the empty string\.

  - <a name='16'></a>__debug__ __suffix__ *tag* ?*text*?

    This method is similar to the method __trailer__ below, in that it
    defines __[subst](\.\./\.\./\.\./\.\./index\.md\#subst)__able Tcl script which
    provides more text for debug messages\.

    In contrast to __trailer__ the generated text is added to the user's
    message before it is split into lines, making it a per\-message extension\.

    Furthermore the script is tag\-dependent\.

    In exception to that, a script for tag __::__ is applied to all
    messages\.

    If both global and tag\-dependent suffix exist, both are applied, with the
    global suffix coming after the tag\-dependent suffix\.

    Note that the suffix substitution happens only once per actual printed
    message\.

    The result of the method is the empty string\.

    If the *tag* was not known at the time of the call it is registered, and
    set inactive\.

  - <a name='17'></a>__debug__ __trailer__ *text*

    This method defines a global
    __[subst](\.\./\.\./\.\./\.\./index\.md\#subst)__able Tcl script which
    provides a text printed after each line of output \(before the EOL however\)\.

    Note how this is tag\-independent\.

    Further note that the trailer substitution happens only once per actual
    printed message, i\.e\. all lines of the same message will have the same
    actual trailing text\.

    The result of the method is the specified text\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *debug* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[debug](\.\./\.\./\.\./\.\./index\.md\#debug), [log](\.\./\.\./\.\./\.\./index\.md\#log),
[narrative](\.\./\.\./\.\./\.\./index\.md\#narrative),
[trace](\.\./\.\./\.\./\.\./index\.md\#trace)

# <a name='category'></a>CATEGORY

debugging, tracing, and logging

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 200?, Colin McCormack, Wub Server Utilities  
Copyright &copy; 2012\-2014, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/debug/debug_caller.md.

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
89
90
91
92

[//000000001]: # (debug::caller \- debug narrative)
[//000000002]: # (Generated from file 'debug\_caller\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2012\-2015, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (debug::caller\(n\) 1\.1 tcllib "debug narrative")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

debug::caller \- debug narrative \- caller

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require debug::caller ?1\.1?  

[__[debug](debug\.md)__ __caller__ ?*args*\.\.\.?](#1)  

# <a name='description'></a>DESCRIPTION

# <a name='section2'></a>API

  - <a name='1'></a>__[debug](debug\.md)__ __caller__ ?*args*\.\.\.?

    This method is useful in a tag\-specific prefix to automatically provide
    caller information for all uses of the tag\. Or in a message, when only
    specific places need such detail\.

    Beyond that it recognizing the various internal forms of method calls
    generated by the __[snit](\.\./snit/snit\.md)__ OO system and rewrites
    these to their original form, for better readability\. Similarly for
    __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__\.

    If *args* are specified then they are treated as the integer indices of
    command arguments to *not* show in the output\. The referenced arguments
    are replaced by __\*__ instead\. The main anticipiated use case for this
    is the exclusion of arguments expected to contain large Tcl values, i\.e\.
    long lists, large dictionaries, etc\. to prevent them from overwhelming the
    narrative\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *debug* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[debug](\.\./\.\./\.\./\.\./index\.md\#debug), [log](\.\./\.\./\.\./\.\./index\.md\#log),
[narrative](\.\./\.\./\.\./\.\./index\.md\#narrative),
[trace](\.\./\.\./\.\./\.\./index\.md\#trace)

# <a name='category'></a>CATEGORY

debugging, tracing, and logging

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2012\-2015, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































Deleted embedded/md/tcllib/files/modules/debug/debug_heartbeat.md.

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
89
90
91
92
93

[//000000001]: # (debug::heartbeat \- debug narrative)
[//000000002]: # (Generated from file 'debug\_heartbeat\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 200?, Colin McCormack, Wub Server Utilities)
[//000000004]: # (Copyright &copy; 2012, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (debug::heartbeat\(n\) 1\.0\.1 tcllib "debug narrative")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

debug::heartbeat \- debug narrative \- heartbeat

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require debug::heartbeat ?1\.0\.1?  
package require debug ?1?  

[__[debug](debug\.md)__ __heartbeat__ ?*delta*?](#1)  

# <a name='description'></a>DESCRIPTION

# <a name='section2'></a>API

  - <a name='1'></a>__[debug](debug\.md)__ __heartbeat__ ?*delta*?

    This method activates or disables a heartbeat with which to monitor the
    event loop of an event\-based Tcl application\.

    It reserves the debug tag __heartbeat__ for its operation and writes a
    message every *delta* milliseconds\.

    A *delta*\-value <= 0 disables the heartbeat\.

    The message produced by the heartbeat contains a sequence counter and the
    time in milliseconds since the last beat, thus providing insight into timing
    variationsn and deviations from the nominal *delta*\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *debug* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[debug](\.\./\.\./\.\./\.\./index\.md\#debug),
[heartbeat](\.\./\.\./\.\./\.\./index\.md\#heartbeat),
[log](\.\./\.\./\.\./\.\./index\.md\#log),
[narrative](\.\./\.\./\.\./\.\./index\.md\#narrative),
[trace](\.\./\.\./\.\./\.\./index\.md\#trace)

# <a name='category'></a>CATEGORY

debugging, tracing, and logging

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 200?, Colin McCormack, Wub Server Utilities  
Copyright &copy; 2012, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































Deleted embedded/md/tcllib/files/modules/debug/debug_timestamp.md.

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

[//000000001]: # (debug::timestamp \- debug narrative)
[//000000002]: # (Generated from file 'debug\_timestamp\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 200?, Colin McCormack, Wub Server Utilities)
[//000000004]: # (Copyright &copy; 2012, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (debug::timestamp\(n\) 1 tcllib "debug narrative")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

debug::timestamp \- debug narrative \- timestamping

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require debug::timestamp ?1?  
package require debug ?1?  

[__[debug](debug\.md)__ __timestamp__](#1)  

# <a name='description'></a>DESCRIPTION

# <a name='section2'></a>API

  - <a name='1'></a>__[debug](debug\.md)__ __timestamp__

    This method returns millisecond timing information since a baseline or last
    call, making it useful in a tag\-specific prefix to automatically provide
    caller information for all uses of the tag\. Or in a message, when only
    specific places need such detail\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *debug* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[debug](\.\./\.\./\.\./\.\./index\.md\#debug), [log](\.\./\.\./\.\./\.\./index\.md\#log),
[narrative](\.\./\.\./\.\./\.\./index\.md\#narrative),
[timestamps](\.\./\.\./\.\./\.\./index\.md\#timestamps),
[trace](\.\./\.\./\.\./\.\./index\.md\#trace)

# <a name='category'></a>CATEGORY

debugging, tracing, and logging

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 200?, Colin McCormack, Wub Server Utilities  
Copyright &copy; 2012, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































Deleted embedded/md/tcllib/files/modules/defer/defer.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

[//000000001]: # (defer \- Defered execution ala Go)
[//000000002]: # (Generated from file 'defer\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2017, Roy Keene)
[//000000004]: # (defer\(n\) 1 tcllib "Defered execution ala Go")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

defer \- Defered execution

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [REFERENCES](#section4)

  - [AUTHORS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require defer ?1?  

[__::defer::defer__ ?*command*? ?*arg1*? ?*arg2*? ?*argN\.\.\.*?](#1)  
[__::defer::with__ *variableList* *script*](#2)  
[__::defer::autowith__ *script*](#3)  
[__::defer::cancel__ ?*id\.\.\.*?](#4)  

# <a name='description'></a>DESCRIPTION

The __defer__ commands allow a developer to schedule actions to happen as
part of the current variable scope terminating\. This is most useful for dealing
with cleanup activities\. Since the defered actions always execute, and always
execute in the reverse order from which the defer statements themselves execute,
the programmer can schedule the cleanup of a resource \(for example, a channel\)
as soon as that resource is acquired\. Then, later if the procedure or lambda
ends, either due to an error, or an explicit return, the cleanup of that
resource will always occur\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::defer::defer__ ?*command*? ?*arg1*? ?*arg2*? ?*argN\.\.\.*?

    Defers execution of some code until the current variable scope ends\. Each
    argument is concatencated together to form the script to execute at deferal
    time\. Multiple defer statements may be used, they are executed in the order
    of last\-in, first\-out\. The return value is an identifier which can be used
    later with __defer::cancel__

  - <a name='2'></a>__::defer::with__ *variableList* *script*

    Defers execution of a script while copying the current value of some
    variables, whose names specified in *variableList*, into the script\. The
    script acts like a lambda but executes at the same level as the
    __defer::with__ call\. The return value is the same as
    __::defer::defer__

  - <a name='3'></a>__::defer::autowith__ *script*

    The same as __::defer::with__ but uses all local variables in the
    variable list\.

  - <a name='4'></a>__::defer::cancel__ ?*id\.\.\.*?

    Cancels the execution of a defered action\. The *id* argument is the
    identifier returned by __::defer::defer__, __::defer::with__, or
    __::defer::autowith__\. Any number of arguments may be supplied, and all
    of the IDs supplied will be cancelled\.

# <a name='section3'></a>EXAMPLES

    package require defer 1
    apply {{} {
    	set fd [open /dev/null]
    	defer::defer close $fd
    }}

# <a name='section4'></a>REFERENCES

# <a name='section5'></a>AUTHORS

Roy Keene

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *defer* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[cleanup](\.\./\.\./\.\./\.\./index\.md\#cleanup),
[golang](\.\./\.\./\.\./\.\./index\.md\#golang)

# <a name='category'></a>CATEGORY

Utility

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2017, Roy Keene
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































Deleted embedded/md/tcllib/files/modules/des/des.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233

[//000000001]: # (des \- Data Encryption Standard \(DES\))
[//000000002]: # (Generated from file 'des\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (des\(n\) 1\.1 tcllib "Data Encryption Standard \(DES\)")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

des \- Implementation of the DES and triple\-DES ciphers

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PROGRAMMING INTERFACE](#section3)

  - [MODES OF OPERATION](#section4)

  - [EXAMPLES](#section5)

  - [REFERENCES](#section6)

  - [AUTHORS](#section7)

  - [Bugs, Ideas, Feedback](#section8)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require des 1\.1  

[__::DES::des__ ?*\-mode \[ecb&#124;cbc&#124;cfb&#124;ofb\]*? ?*\-dir \[encrypt&#124;decrypt\]*? *\-key keydata* ?*\-iv vector*? ?*\-hex*? ?*\-weak*? ?*\-out channel*? ?*\-chunksize size*? \[ *\-in channel* &#124; *data* \]](#1)  
[__::DES::Init__ *mode* *keydata* *iv* ?*weak*?](#2)  
[__::DES::Encrypt__ *Key* *data*](#3)  
[__::DES::Decrypt__ *Key* *data*](#4)  
[__::DES::Reset__ *Key* *iv*](#5)  
[__::DES::Final__ *Key*](#6)  

# <a name='description'></a>DESCRIPTION

This is an implementation in Tcl of the Data Encryption Standard \(DES\) as
published by the U\.S\. National Institute of Standards and Technology \(NIST\) \[1\]\.
This implementation also supports triple DES \(3DES\) extension to DES\. DES is a
64\-bit block cipher that uses a 56\-bit key\. 3DES uses a 168\-bit key\. DES has now
officially been superceeded by AES but is in common use in many protocols\.

The tcllib implementation of DES and 3DES uses an implementation by Mac Cody and
is available as a separate download from \[2\]\. For anyone concerned about the
details of exporting this code please see the TclDES web pages\. The tcllib
specific code is a wrapper to the TclDES API that presents same API for the DES
cipher as for other ciphers in the library\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::DES::des__ ?*\-mode \[ecb&#124;cbc&#124;cfb&#124;ofb\]*? ?*\-dir \[encrypt&#124;decrypt\]*? *\-key keydata* ?*\-iv vector*? ?*\-hex*? ?*\-weak*? ?*\-out channel*? ?*\-chunksize size*? \[ *\-in channel* &#124; *data* \]

    Perform the __[DES](\.\./\.\./\.\./\.\./index\.md\#des)__ algorithm on either
    the data provided by the argument or on the data read from the *\-in*
    channel\. If an *\-out* channel is given then the result will be written to
    this channel\.

    The *\-key* option must be given\. This parameter takes a binary string of 8
    bytes in length and is used to generate the key schedule\. In DES only 56
    bits of key data are used\. The highest bit from each byte is discarded\.

    The *\-mode* and *\-dir* options are optional and default to cbc mode and
    encrypt respectively\. The initialization vector *\-iv* takes an 8 byte
    binary argument\. This defaults to all zeros\. See [MODES OF
    OPERATION](#section4) for more about *\-mode* and the use of the
    initialization vector\.

    DES is a 64\-bit block cipher\. This means that the data must be provided in
    units that are a multiple of 8 bytes\.

# <a name='section3'></a>PROGRAMMING INTERFACE

Internal state is maintained in an opaque structure that is returned from the
__Init__ function\. In ECB mode the state is not affected by the input but
for other modes some input dependent state is maintained and may be reset by
calling the __Reset__ function with a new initialization vector value\.

  - <a name='2'></a>__::DES::Init__ *mode* *keydata* *iv* ?*weak*?

    Construct a new DES key schedule using the specified key data and the given
    initialization vector\. The initialization vector is not used with ECB mode
    but is important for other usage modes\. See [MODES OF
    OPERATION](#section4)\.

    There are a small number of keys that are known to be weak when used with
    DES\. By default if such a key is passed in then an error will be raised\. If
    there is a need to accept such keys then the *weak* parameter can be set
    true to avoid the error being thrown\.

  - <a name='3'></a>__::DES::Encrypt__ *Key* *data*

    Use a prepared key acquired by calling __Init__ to encrypt the provided
    data\. The data argument should be a binary array that is a multiple of the
    DES block size of 8 bytes\. The result is a binary array the same size as the
    input of encrypted data\.

  - <a name='4'></a>__::DES::Decrypt__ *Key* *data*

    Decipher data using the key\. Note that the same key may be used to encrypt
    and decrypt data provided that the initialization vector is reset
    appropriately for CBC mode\.

  - <a name='5'></a>__::DES::Reset__ *Key* *iv*

    Reset the initialization vector\. This permits the programmer to re\-use a key
    and avoid the cost of re\-generating the key schedule where the same key data
    is being used multiple times\.

  - <a name='6'></a>__::DES::Final__ *Key*

    This should be called to clean up resources associated with *Key*\. Once
    this function has been called the key may not be used again\.

# <a name='section4'></a>MODES OF OPERATION

  - Electronic Code Book \(ECB\)

    ECB is the basic mode of all block ciphers\. Each block is encrypted
    independently and so identical plain text will produce identical output when
    encrypted with the same key\. Any encryption errors will only affect a single
    block however this is vulnerable to known plaintext attacks\.

  - Cipher Block Chaining \(CBC\)

    CBC mode uses the output of the last block encryption to affect the current
    block\. An initialization vector of the same size as the cipher block size is
    used to handle the first block\. The initialization vector should be chosen
    randomly and transmitted as the first block of the output\. Errors in
    encryption affect the current block and the next block after which the
    cipher will correct itself\. CBC is the most commonly used mode in software
    encryption\.

  - Cipher Feedback \(CFB\)

    CFB mode can be used to convert block ciphers into stream ciphers\. In CFB
    mode the initialization vector is encrypted and the output is then xor'd
    with the plaintext stream\. The result is then used as the initialization
    vector for the next round\. Errors will affect the current block and the next
    block\.

  - Output Feedback \(OFB\)

    OFB is similar to CFB except that the output of the cipher is fed back into
    the next round and not the xor'd plain text\. This means that errors only
    affect a single block but the cipher is more vulnerable to attack\.

# <a name='section5'></a>EXAMPLES

    % set ciphertext [DES::des -mode cbc -dir encrypt -key $secret $plaintext]
    % set plaintext [DES::des -mode cbc -dir decrypt -key $secret $ciphertext]

    set iv [string repeat \\0 8]
    set Key [DES::Init cbc \\0\\1\\2\\3\\4\\5\\6\\7 $iv]
    set ciphertext [DES::Encrypt $Key "somedata"]
    append ciphertext [DES::Encrypt $Key "moredata"]
    DES::Reset $Key $iv
    set plaintext [DES::Decrypt $Key $ciphertext]
    DES::Final $Key

# <a name='section6'></a>REFERENCES

  1. "Data Encryption Standard", Federal Information Processing Standards
     Publication 46\-3, 1999,
     \([http://csrc\.nist\.gov/publications/fips/fips46\-3/fips46\-3\.pdf](http://csrc\.nist\.gov/publications/fips/fips46\-3/fips46\-3\.pdf)\)

  1. "TclDES: munitions\-grade Tcl scripting"
     [http://tcldes\.sourceforge\.net/](http://tcldes\.sourceforge\.net/)

# <a name='section7'></a>AUTHORS

Jochen C Loewer, Mac Cody, Pat Thoyts

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *des* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[aes\(n\)](\.\./aes/aes\.md), [blowfish\(n\)](\.\./blowfish/blowfish\.md),
[md5\(n\)](\.\./md5/md5\.md), [rc4\(n\)](\.\./rc4/rc4\.md),
[sha1\(n\)](\.\./sha1/sha1\.md)

# <a name='keywords'></a>KEYWORDS

[3DES](\.\./\.\./\.\./\.\./index\.md\#3des), [DES](\.\./\.\./\.\./\.\./index\.md\#des),
[block cipher](\.\./\.\./\.\./\.\./index\.md\#block\_cipher), [data
integrity](\.\./\.\./\.\./\.\./index\.md\#data\_integrity),
[encryption](\.\./\.\./\.\./\.\./index\.md\#encryption),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/des/tcldes.md.

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

[//000000001]: # (tclDES \- Data Encryption Standard \(DES\))
[//000000002]: # (Generated from file 'tcldes\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (tclDES\(n\) 1\.1 tcllib "Data Encryption Standard \(DES\)")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tclDES \- Implementation of the DES and triple\-DES ciphers

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require tclDES 1\.1  

# <a name='description'></a>DESCRIPTION

The __tclDES__ package is a helper package for __[des](des\.md)__\.

Please see the documentation of __[des](des\.md)__ for details\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *des* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[des\(n\)](des\.md)

# <a name='keywords'></a>KEYWORDS

[3DES](\.\./\.\./\.\./\.\./index\.md\#3des), [DES](\.\./\.\./\.\./\.\./index\.md\#des),
[block cipher](\.\./\.\./\.\./\.\./index\.md\#block\_cipher), [data
integrity](\.\./\.\./\.\./\.\./index\.md\#data\_integrity),
[encryption](\.\./\.\./\.\./\.\./index\.md\#encryption),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































Deleted embedded/md/tcllib/files/modules/des/tcldesjr.md.

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

[//000000001]: # (tclDESjr \- Data Encryption Standard \(DES\))
[//000000002]: # (Generated from file 'tcldesjr\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (tclDESjr\(n\) 1\.1 tcllib "Data Encryption Standard \(DES\)")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tclDESjr \- Implementation of the DES and triple\-DES ciphers

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require tclDESjr 1\.1  

# <a name='description'></a>DESCRIPTION

The __tclDESjr__ package is a helper package for __[des](des\.md)__\.

Please see the documentation of __[des](des\.md)__ for details\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *des* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[des\(n\)](des\.md)

# <a name='keywords'></a>KEYWORDS

[3DES](\.\./\.\./\.\./\.\./index\.md\#3des), [DES](\.\./\.\./\.\./\.\./index\.md\#des),
[block cipher](\.\./\.\./\.\./\.\./index\.md\#block\_cipher), [data
integrity](\.\./\.\./\.\./\.\./index\.md\#data\_integrity),
[encryption](\.\./\.\./\.\./\.\./index\.md\#encryption),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































Deleted embedded/md/tcllib/files/modules/dicttool/dicttool.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

[//000000001]: # (dicttool \- Extensions to the standard "dict" command)
[//000000002]: # (Generated from file 'dicttool\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2017 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (dicttool\(n\) 1\.0 tcllib "Extensions to the standard "dict" command")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

dicttool \- Dictionary Tools

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require dicttool ?1\.0?  

[__ladd__ *varname* *args*](#1)  
[__ldelete__ *varname* *args*](#2)  
[__dict getnull__ *args*](#3)  
[__dict print__ *dict*](#4)  
[__dict is\_dict__ *value*](#5)  
[__rmerge__ *args*](#6)  

# <a name='description'></a>DESCRIPTION

The __dicttool__ package enhances the standard *dict* command with several
new commands\. In addition, the package also defines several "creature comfort"
list commands as well\. Each command checks to see if a command already exists of
the same name before adding itself, just in case any of these slip into the
core\.

  - <a name='1'></a>__ladd__ *varname* *args*

    This command will add a new instance of each element in *args* to
    *varname*, but only if that element is not already present\.

  - <a name='2'></a>__ldelete__ *varname* *args*

    This command will delete all instances of each element in *args* from
    *varname*\.

  - <a name='3'></a>__dict getnull__ *args*

    Operates like __dict get__, however if the key *args* does not exist,
    it returns an empty list instead of throwing an error\.

  - <a name='4'></a>__dict print__ *dict*

    This command will produce a string representation of *dict*, with each
    nested branch on a newline, and indented with two spaces for every level\.

  - <a name='5'></a>__dict is\_dict__ *value*

    This command will return true if *value* can be interpreted as a dict\. The
    command operates in such a way as to not force an existing dict
    representation to shimmer into another internal rep\.

  - <a name='6'></a>__rmerge__ *args*

    Return a dict which is the product of a recursive merge of all of the
    arguments\. Unlike __dict merge__, this command descends into all of the
    levels of a dict\. Dict keys which end in a : indicate a leaf, which will be
    interpreted as a literal value, and not descended into further\.

        set items [dict merge {
          option {color {default: green}}
        } {
          option {fruit {default: mango}}
        } {
          option {color {default: blue} fruit {widget: select values: {mango apple cherry grape}}}
        }]
        puts [dict print $items]

    Prints the following result:

        option {
          color {
            default: blue
          }
          fruit {
            widget: select
            values: {mango apple cherry grape}
          }
        }

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *dict* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[dict](\.\./\.\./\.\./\.\./index\.md\#dict)

# <a name='category'></a>CATEGORY

Utilities

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2017 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































Deleted embedded/md/tcllib/files/modules/dns/tcllib_dns.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356

[//000000001]: # (dns \- Domain Name Service)
[//000000002]: # (Generated from file 'tcllib\_dns\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002, Pat Thoyts)
[//000000004]: # (dns\(n\) 1\.5\.0 tcllib "Domain Name Service")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

dns \- Tcl Domain Name Service Client

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [REFERENCES](#section4)

  - [AUTHORS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require dns ?1\.5\.0?  

[__::dns::resolve__ *query* ?*options*?](#1)  
[__::dns::configure__ ?*options*?](#2)  
[__::dns::name__ *token*](#3)  
[__::dns::address__ *token*](#4)  
[__::dns::cname__ *token*](#5)  
[__::dns::result__ *token*](#6)  
[__::dns::status__ *token*](#7)  
[__::dns::error__ *token*](#8)  
[__::dns::reset__ *token*](#9)  
[__::dns::wait__ *token*](#10)  
[__::dns::cleanup__ *token*](#11)  
[__::dns::nameservers__](#12)  

# <a name='description'></a>DESCRIPTION

The dns package provides a Tcl only Domain Name Service client\. You should refer
to \(1\) and \(2\) for information about the DNS protocol or read resolver\(3\) to
find out how the C library resolves domain names\. The intention of this package
is to insulate Tcl scripts from problems with using the system library resolver
for slow name servers\. It may or may not be of practical use\. Internet name
resolution is a complex business and DNS is only one part of the resolver\. You
may find you are supposed to be using hosts files, NIS or WINS to name a few
other systems\. This package is not a substitute for the C library resolver \- it
does however implement name resolution over DNS\. The package also extends the
package __[uri](\.\./uri/uri\.md)__ to support DNS URIs \(4\) of the form
[dns:what\.host\.com](dns:what\.host\.com) or
[dns://my\.nameserver/what\.host\.com](dns://my\.nameserver/what\.host\.com)\. The
__dns::resolve__ command can handle DNS URIs or simple domain names as a
query\.

*Note:* The package defaults to using DNS over TCP connections\. If you wish to
use UDP you will need to have the __tcludp__ package installed and have a
version that correctly handles binary data \(> 1\.0\.4\)\. This is available at
[http://tcludp\.sourceforge\.net/](http://tcludp\.sourceforge\.net/)\. If the
__udp__ package is present then UDP will be used by default\.

*Note:* The package supports DNS over TLS \(RFC 7858\) for enhanced privacy of
DNS queries\. Using this feature requires the TLS package\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::dns::resolve__ *query* ?*options*?

    Resolve a domain name using the *[DNS](\.\./\.\./\.\./\.\./index\.md\#dns)*
    protocol\. *query* is the domain name to be lookup up\. This should be
    either a fully qualified domain name or a DNS URI\.

      * __\-nameserver__ *hostname* or __\-server__ *hostname*

        Specify an alternative name server for this request\.

      * __\-protocol__ *tcp&#124;udp*

        Specify the network protocol to use for this request\. Can be one of
        *tcp* or *udp*\.

      * __\-port__ *portnum*

        Specify an alternative port\.

      * __\-search__ *domainlist*

      * __\-timeout__ *milliseconds*

        Override the default timeout\.

      * __\-type__ *TYPE*

        Specify the type of DNS record you are interested in\. Valid values are
        A, NS, MD, MF, CNAME, SOA, MB, MG, MR, NULL, WKS, PTR, HINFO, MINFO, MX,
        TXT, SPF, SRV, AAAA, AXFR, MAILB, MAILA and \*\. See RFC1035 for details
        about the return values\. See
        [http://spf\.pobox\.com/](http://spf\.pobox\.com/) about SPF\. See \(3\)
        about AAAA records and RFC2782 for details of SRV records\.

      * __\-class__ *CLASS*

        Specify the class of domain name\. This is usually IN but may be one of
        IN for internet domain names, CS, CH, HS or \* for any class\.

      * __\-recurse__ *boolean*

        Set to *false* if you do not want the name server to recursively act
        upon your request\. Normally set to *true*\.

      * __\-command__ *procname*

        Set a procedure to be called upon request completion\. The procedure will
        be passed the token as its only argument\.

      * __\-usetls__ *boolean*

        Set the *true* to use DNS over TLS\. This will force the use of TCP and
        change the default port to 853\. Certificate validation is required so a
        source of trusted certificate authority certificates must be provided
        using *\-cafile* or *\-cadir*\.

      * __\-cafile__ *filepath*

        Specify a file containing a collection of trusted certificate authority
        certficates\. See the __update\-ca\-certificates__ command manual page
        for details or the __\-CAfile__ option help from __openssl__\.

      * __\-cadir__ *dirpath*

        Specify a directory containing trusted certificate authority
        certificates\. This must be provided if __\-cafile__ is not specified
        for certificate validation to work when __\-usetls__ is enabled\. See
        the __openssl__ documentation for the required structure of this
        directory\.

  - <a name='2'></a>__::dns::configure__ ?*options*?

    The __::dns::configure__ command is used to setup the dns package\. The
    server to query, the protocol and domain search path are all set via this
    command\. If no arguments are provided then a list of all the current
    settings is returned\. If only one argument then it must the the name of an
    option and the value for that option is returned\.

      * __\-nameserver__ *hostname*

        Set the default name server to be used by all queries\. The default is
        *localhost*\.

      * __\-protocol__ *tcp&#124;udp*

        Set the default network protocol to be used\. Default is *tcp*\.

      * __\-port__ *portnum*

        Set the default port to use on the name server\. The default is 53\.

      * __\-search__ *domainlist*

        Set the domain search list\. This is currently not used\.

      * __\-timeout__ *milliseconds*

        Set the default timeout value for DNS lookups\. Default is 30 seconds\.

      * __\-loglevel__ *level*

        Set the log level used for emitting diagnostic messages from this
        package\. The default is *warn*\. See the
        __[log](\.\./log/log\.md)__ package for details of the available
        levels\.

      * __\-cafile__ *filepath*

        Set the default file path to be used for the __\-cafile__ option to
        __dns::resolve__\.

      * __\-cadir__ *dirpath*

        Set the default directory path to be used for the __\-cadir__ option
        to __dns::resolve__\.

  - <a name='3'></a>__::dns::name__ *token*

    Returns a list of all domain names returned as an answer to your query\.

  - <a name='4'></a>__::dns::address__ *token*

    Returns a list of the address records that match your query\.

  - <a name='5'></a>__::dns::cname__ *token*

    Returns a list of canonical names \(usually just one\) matching your query\.

  - <a name='6'></a>__::dns::result__ *token*

    Returns a list of all the decoded answer records provided for your query\.
    This permits you to extract the result for more unusual query types\.

  - <a name='7'></a>__::dns::status__ *token*

    Returns the status flag\. For a successfully completed query this will be
    *ok*\. May be *error* or *timeout* or *eof*\. See also
    __::dns::error__

  - <a name='8'></a>__::dns::error__ *token*

    Returns the error message provided for requests whose status is *error*\.
    If there is no error message then an empty string is returned\.

  - <a name='9'></a>__::dns::reset__ *token*

    Reset or cancel a DNS query\.

  - <a name='10'></a>__::dns::wait__ *token*

    Wait for a DNS query to complete and return the status upon completion\.

  - <a name='11'></a>__::dns::cleanup__ *token*

    Remove all state variables associated with the request\.

  - <a name='12'></a>__::dns::nameservers__

    Attempts to return a list of the nameservers currently configured for the
    users system\. On a unix machine this parses the /etc/resolv\.conf file for
    nameservers \(if it exists\) and on Windows systems we examine certain parts
    of the registry\. If no nameserver can be found then the loopback address
    \(127\.0\.0\.1\) is used as a default\.

# <a name='section3'></a>EXAMPLES

    % set tok [dns::resolve www.tcl.tk]
    ::dns::1
    % dns::status $tok
    ok
    % dns::address $tok
    199.175.6.239
    % dns::name $tok
    www.tcl.tk
    % dns::cleanup $tok

Using DNS URIs as queries:

    % set tok [dns::resolve "dns:tcl.tk;type=MX"]
    % set tok [dns::resolve "dns://l.root-servers.net/www.tcl.tk"]

Reverse address lookup:

    % set tok [dns::resolve 127.0.0.1]
    ::dns::1
    % dns::name $tok
    localhost
    % dns::cleanup $tok

Using DNS over TLS \(RFC 7858\):

    % set tok [dns::resolve www.tcl.tk -nameserver dns-tls.bitwiseshift.net  -usetls 1 -cafile /etc/ssl/certs/ca-certificates.crt]
    ::dns::12
    % dns::wait $tok
    ok
    % dns::address $tok
    104.25.119.118 104.25.120.118

# <a name='section4'></a>REFERENCES

  1. Mockapetris, P\., "Domain Names \- Concepts and Facilities", RFC 1034,
     November 1987\.
     \([http://www\.ietf\.org/rfc/rfc1034\.txt](http://www\.ietf\.org/rfc/rfc1034\.txt)\)

  1. Mockapetris, P\., "Domain Names \- Implementation and Specification", RFC
     1035, November 1087\.
     \([http://www\.ietf\.org/rfc/rfc1035\.txt](http://www\.ietf\.org/rfc/rfc1035\.txt)\)

  1. Thompson, S\. and Huitema, C\., "DNS Extensions to support IP version 6", RFC
     1886, December 1995\.
     \([http://www\.ietf\.org/rfc/rfc1886\.txt](http://www\.ietf\.org/rfc/rfc1886\.txt)\)

  1. Josefsson, S\., "Domain Name System Uniform Resource Identifiers",
     Internet\-Draft, October 2003,
     \([http://www\.ietf\.org/internet\-drafts/draft\-josefsson\-dns\-url\-09\.txt](http://www\.ietf\.org/internet\-drafts/draft\-josefsson\-dns\-url\-09\.txt)\)

  1. Gulbrandsen, A\., Vixie, P\. and Esibov, L\., "A DNS RR for specifying the
     location of services \(DNS SRV\)", RFC 2782, February 2000,
     \([http://www\.ietf\.org/rfc/rfc2782\.txt](http://www\.ietf\.org/rfc/rfc2782\.txt)\)

  1. Ohta, M\. "Incremental Zone Transfer in DNS", RFC 1995, August 1996,
     \([http://www\.ietf\.org/rfc/rfc1995\.txt](http://www\.ietf\.org/rfc/rfc1995\.txt)\)

  1. Hu, Z\., etc al\. "Specification for DNS over Transport Layer Security
     \(TLS\)", RFC 7858, May 2016,
     \([http://www\.ietf\.org/rfc/rfc7858\.txt](http://www\.ietf\.org/rfc/rfc7858\.txt)\)

# <a name='section5'></a>AUTHORS

Pat Thoyts

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *dns* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

resolver\(5\)

# <a name='keywords'></a>KEYWORDS

[DNS](\.\./\.\./\.\./\.\./index\.md\#dns), [domain name
service](\.\./\.\./\.\./\.\./index\.md\#domain\_name\_service),
[resolver](\.\./\.\./\.\./\.\./index\.md\#resolver), [rfc
1034](\.\./\.\./\.\./\.\./index\.md\#rfc\_1034), [rfc
1035](\.\./\.\./\.\./\.\./index\.md\#rfc\_1035), [rfc
1886](\.\./\.\./\.\./\.\./index\.md\#rfc\_1886), [rfc
7858](\.\./\.\./\.\./\.\./index\.md\#rfc\_7858)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002, Pat Thoyts
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/dns/tcllib_ip.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424

[//000000001]: # (tcllib\_ip \- Domain Name Service)
[//000000002]: # (Generated from file 'tcllib\_ip\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004, Pat Thoyts)
[//000000004]: # (Copyright &copy; 2005 Aamer Akhter <aakhter@cisco\.com>)
[//000000005]: # (tcllib\_ip\(n\) 1\.4 tcllib "Domain Name Service")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcllib\_ip \- IPv4 and IPv6 address manipulation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [REFERENCES](#section4)

  - [AUTHORS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require ip ?1\.4?  

[__::ip::version__ *address*](#1)  
[__::ip::is__ *class* *address*](#2)  
[__::ip::equal__ *address* *address*](#3)  
[__::ip::normalize__ *address*](#4)  
[__::ip::contract__ *address*](#5)  
[__::ip::distance__ *ipaddr1* *ipaddr2*](#6)  
[__::ip::nextIp__ *ipaddr* ?*offset*?](#7)  
[__::ip::prefix__ *address*](#8)  
[__::ip::type__ *address*](#9)  
[__::ip::mask__ *address*](#10)  
[__::ip::prefixToNative__ *prefix*](#11)  
[__::ip::nativeToPrefix__ *nativeList*&#124;*native* ?__\-ipv4__?](#12)  
[__::ip::intToString__ *number* ?__\-ipv4__?](#13)  
[__::ip::toInteger__ *ipaddr*](#14)  
[__::ip::toHex__ *ipaddr*](#15)  
[__::ip::maskToInt__ *ipmask*](#16)  
[__::ip::broadcastAddress__ *prefix* ?__\-ipv4__?](#17)  
[__::ip::maskToLength__ *dottedMask*&#124;*integerMask*&#124;*hexMask* ?__\-ipv4__?](#18)  
[__::ip::lengthToMask__ *maskLength* ?__\-ipv4__?](#19)  
[__::ip::nextNet__ *ipaddr* *ipmask* ?*count*? ?__\-ipv4__?](#20)  
[__::ip::isOverlap__ *prefix* *prefix*\.\.\.](#21)  
[__::ip::isOverlapNative__ ?__\-all__? ?__\-inline__? ?__\-ipv4__? *hexipaddr* *hexipmask* *hexiplist*](#22)  
[__::ip::ipToLayer2Multicast__ *ipaddr*](#23)  
[__::ip::ipHostFromPrefix__ *prefix* ?__\-exclude__ *prefixExcludeList*?](#24)  
[__::ip::reduceToAggregates__ *prefixlist*](#25)  
[__::ip::longestPrefixMatch__ *ipaddr* *prefixlist* ?__\-ipv4__?](#26)  
[__::ip::collapse__ *prefixlist*](#27)  
[__::ip::subtract__ *prefixlist*](#28)  

# <a name='description'></a>DESCRIPTION

This package provides a set of commands to help in parsing, displaying and
comparing internet addresses\. The package can handle both IPv4 \(1\) and IPv6 \(2\)
address types\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::ip::version__ *address*

    Returns the protocol version of the address \(__4__ or __6__\), or
    __\-1__ if the address is neither IPv4 or IPv6\.

  - <a name='2'></a>__::ip::is__ *class* *address*

    Returns true if the address is a member of the given protocol class\. The
    class parameter may be either __ipv4__ or __ipv6__ This is
    effectively a boolean equivalent of the __version__ command\. The
    *class* argument may be shortened to __4__ or __6__\.

  - <a name='3'></a>__::ip::equal__ *address* *address*

    Compare two address specifications for equivalence\. The arguments are
    normalized and the address prefix determined \(if a mask is supplied\)\. The
    normalized addresses are then compared bit\-by\-bit and the procedure returns
    true if they match\.

  - <a name='4'></a>__::ip::normalize__ *address*

    Convert an IPv4 or IPv6 address into a fully expanded version\. There are
    various shorthand ways to write internet addresses, missing out redundant
    parts or digits\. This procedure is the opposite of __contract__\.

  - <a name='5'></a>__::ip::contract__ *address*

    Convert a __normalize__d internet address into a more compact form
    suitable for displaying to users\.

  - <a name='6'></a>__::ip::distance__ *ipaddr1* *ipaddr2*

    This command computes the \(integer\) distance from IPv4 address *ipaddr1*
    to IPv4 address *ipaddr2*, i\.e\. "ipaddr2 \- ipaddr1"

        % ::ip::distance 1.1.1.1  1.1.1.5
        4

  - <a name='7'></a>__::ip::nextIp__ *ipaddr* ?*offset*?

    This command adds the integer *offset* to the IPv4 address *ipaddr* and
    returns the new IPv4 address\.

        % ::ip::distance 1.1.1.1  4
        1.1.1.5

  - <a name='8'></a>__::ip::prefix__ *address*

    Returns the address prefix generated by masking the address part with the
    mask if provided\. If there is no mask then it is equivalent to calling
    __normalize__

  - <a name='9'></a>__::ip::type__ *address*

  - <a name='10'></a>__::ip::mask__ *address*

    If the address supplied includes a mask then this is returned otherwise
    returns an empty string\.

  - <a name='11'></a>__::ip::prefixToNative__ *prefix*

    This command converts the string *prefix* from dotted form
    \(<ipaddr>/<mask> format\) to native \(hex\) form\. Returns a list containing two
    elements, ipaddress and mask, in this order, in hexadecimal notation\.

        % ip::prefixToNative 1.1.1.0/24
        0x01010100 0xffffff00

  - <a name='12'></a>__::ip::nativeToPrefix__ *nativeList*&#124;*native* ?__\-ipv4__?

    This command converts from native \(hex\) form to dotted form\. It is the
    complement of __::ip::prefixToNative__\.

      * list *nativeList* \(in\)

        List of several ip addresses in native form\. The native form is a list
        as returned by __::ip::prefixToNative__\.

      * list *native* \(in\)

        A list as returned by __::ip::prefixToNative__\.

    The command returns a list of addresses in dotted form if it was called with
    a list of addresses\. Otherwise a single address in dotted form is returned\.

        % ip::nativeToPrefix {0x01010100 0xffffff00} -ipv4
        1.1.1.0/24

  - <a name='13'></a>__::ip::intToString__ *number* ?__\-ipv4__?

    This command converts from an ip address specified as integer number to
    dotted form\.

        ip::intToString 4294967295
        255.255.255.255

  - <a name='14'></a>__::ip::toInteger__ *ipaddr*

    This command converts a dotted form ip into an integer number\.

        % ::ip::toInteger 1.1.1.0
        16843008

  - <a name='15'></a>__::ip::toHex__ *ipaddr*

    This command converts dotted form ip into a hexadecimal number\.

        % ::ip::toHex 1.1.1.0
        0x01010100

  - <a name='16'></a>__::ip::maskToInt__ *ipmask*

    This command convert an ipmask in either dotted \(255\.255\.255\.0\) form or mask
    length form \(24\) into an integer number\.

        ::ip::maskToInt 24
        4294967040

  - <a name='17'></a>__::ip::broadcastAddress__ *prefix* ?__\-ipv4__?

    This commands returns a broadcast address in dotted form for the given route
    *prefix*, either in the form "addr/mask", or in native form\. The result is
    in dotted form\.

        ::ip::broadcastAddress 1.1.1.0/24
        1.1.1.255

        ::ip::broadcastAddress {0x01010100 0xffffff00}
        0x010101ff

  - <a name='18'></a>__::ip::maskToLength__ *dottedMask*&#124;*integerMask*&#124;*hexMask* ?__\-ipv4__?

    This command converts the dotted or integer form of an ipmask to the mask
    length form\.

        ::ip::maskToLength 0xffffff00 -ipv4
        24

        % ::ip::maskToLength 255.255.255.0
        24

  - <a name='19'></a>__::ip::lengthToMask__ *maskLength* ?__\-ipv4__?

    This command converts an ipmask in mask length form to its dotted form\.

        ::ip::lengthToMask 24
        255.255.255.0

  - <a name='20'></a>__::ip::nextNet__ *ipaddr* *ipmask* ?*count*? ?__\-ipv4__?

    This command returns an ipaddress in the same position in the *count* next
    network\. The default value for *count* is __1__\.

    The address can be specified as either integer number or in dotted form\. The
    mask can be specified as either integer number, dotted form, or mask length
    form\.

    The result is in hex form\.

  - <a name='21'></a>__::ip::isOverlap__ *prefix* *prefix*\.\.\.

    This command checks if the given ip prefixes overlap\. All arguments are in
    dotted "addr/mask" form\. All arguments after the first prefix are compared
    against the first prefix\. The result is a boolean value\. It is true if an
    overlap was found for any of the prefixes\.

        % ::ip::isOverlap 1.1.1.0/24 2.1.0.1/32
        0

        ::ip::isOverlap 1.1.1.0/24 2.1.0.1/32 1.1.1.1/32
        1

  - <a name='22'></a>__::ip::isOverlapNative__ ?__\-all__? ?__\-inline__? ?__\-ipv4__? *hexipaddr* *hexipmask* *hexiplist*

    This command is similar to __::ip::isOverlap__, however the arguments
    are in the native form, and the form of the result is under greater control
    of the caller\. If the option __\-all__ is specified it checks all
    addresses for overlap, not only until the first one is found\. If the option
    __\-inline__ is specified the command returns the overlapping prefix
    instead of index values\.

    The result of the command is, depending on the specified options,

      * no options

        The index of the first overlap found, or 0 if there is none\.

      * \-all

        A list containing the indices of all overlaps found, or an empty list if
        there are none\.

      * \-inline

        The first overlapping prefix, or an empoty string if there is none\.

      * \-all \-inline

        A list containing the prefixes of all overlaps found, or an empty list
        if there are none\.

        % ::ip::isOverlapNative 0x01010100 0xffffff00 {{0x02010001 0xffffffff}}
        0

        % ::ip::isOverlapNative 0x01010100 0xffffff00 {{0x02010001 0xffffffff} {0x01010101 0xffffffff}}
        2

  - <a name='23'></a>__::ip::ipToLayer2Multicast__ *ipaddr*

    This command an converts ipv4 address in dotted form into a layer 2
    multicast address, also in dotted form\.

        % ::ip::ipToLayer2Multicast 224.0.0.2
        01.00.5e.00.00.02

  - <a name='24'></a>__::ip::ipHostFromPrefix__ *prefix* ?__\-exclude__ *prefixExcludeList*?

    This command returns a host address from a prefix in the form
    "ipaddr/masklen", also making sure that the result is not an address found
    in the *prefixExcludeList*\. The result is an ip address in dotted form\.

        %::ip::ipHostFromPrefix  1.1.1.5/24
        1.1.1.1

        %::ip::ipHostFromPrefix  1.1.1.1/32
        1.1.1.1

  - <a name='25'></a>__::ip::reduceToAggregates__ *prefixlist*

    This command finds nets that overlap and filters out the more specific nets\.
    The prefixes are in either addr/mask form or in native format\. The result is
    a list containing the non\-overlapping ip prefixes from the input\.

        % ::ip::reduceToAggregates {1.1.1.0/24 1.1.0.0/8  2.1.1.0/24 1.1.1.1/32 }
        1.0.0.0/8 2.1.1.0/24

  - <a name='26'></a>__::ip::longestPrefixMatch__ *ipaddr* *prefixlist* ?__\-ipv4__?

    This command finds longest prefix match from set of prefixes, given a
    specific host address\. The prefixes in the list are in either native or
    dotted form, whereas the host address is in either ipprefix format, dotted
    form, or integer form\. The result is the prefix which is the most specific
    match to the host address\.

        % ::ip::longestPrefixMatch 1.1.1.1 {1.1.1.0/24 1.0.0.0/8  2.1.1.0/24 1.1.1.0/28 }
        1.1.1.0/28

  - <a name='27'></a>__::ip::collapse__ *prefixlist*

    This commands takes a list of prefixes and returns a list prefixes with the
    largest possible subnet masks covering the input, in this manner collapsing
    adjacent prefixes into larger ranges\.

    This is different from __::ip::reduceToAggregates__ in that the latter
    only removes specific nets from a list when they are covered by other
    elements of the input whereas this command actively merges nets into larger
    ranges when they are adjacent to each other\.

        % ::ip::collapse {1.2.2.0/24 1.2.3.0/24}
        1.2.2.0/23

  - <a name='28'></a>__::ip::subtract__ *prefixlist*

    This command takes a list of prefixes, some of which are prefixed by a dash\.
    These latter *negative* prefixes are used to punch holes into the ranges
    described by the other, *positive*, prefixes\. I\.e\. the negative prefixes
    are subtracted frrom the positive ones, resulting in a larger list of
    describes describing the covered ranges only as positives\.

# <a name='section3'></a>EXAMPLES

    % ip::version ::1
    6
    % ip::version 127.0.0.1
    4

    % ip::normalize 127/8
    127.0.0.0/8
    % ip::contract 192.168.0.0
    192.168
    %
    % ip::normalize fec0::1
    fec0:0000:0000:0000:0000:0000:0000:0001
    % ip::contract fec0:0000:0000:0000:0000:0000:0000:0001
    fec0::1

    % ip::equal 192.168.0.4/16 192.168.0.0/16
    1
    % ip::equal fec0::1/10 fec0::fe01/10
    1

# <a name='section4'></a>REFERENCES

  1. Postel, J\. "Internet Protocol\." RFC 791, September 1981,
     \([http://www\.ietf\.org/rfc/rfc791\.txt](http://www\.ietf\.org/rfc/rfc791\.txt)\)

  1. Hinden, R\. and Deering, S\., "Internet Protocol Version 6 \(IPv6\) Addressing
     Architecture", RFC 3513, April 2003
     \([http://www\.ietf\.org/rfc/rfc3513\.txt](http://www\.ietf\.org/rfc/rfc3513\.txt)\)

# <a name='section5'></a>AUTHORS

Pat Thoyts

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *dns* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

inet\(3\), ip\(7\), ipv6\(7\)

# <a name='keywords'></a>KEYWORDS

[internet address](\.\./\.\./\.\./\.\./index\.md\#internet\_address),
[ip](\.\./\.\./\.\./\.\./index\.md\#ip), [ipv4](\.\./\.\./\.\./\.\./index\.md\#ipv4),
[ipv6](\.\./\.\./\.\./\.\./index\.md\#ipv6), [rfc
3513](\.\./\.\./\.\./\.\./index\.md\#rfc\_3513)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004, Pat Thoyts  
Copyright &copy; 2005 Aamer Akhter <aakhter@cisco\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/docstrip/docstrip.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449

[//000000001]: # (docstrip \- Literate programming tool)
[//000000002]: # (Generated from file 'docstrip\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003–2010 Lars Hellström <Lars dot Hellstrom at residenset dot net>)
[//000000004]: # (docstrip\(n\) 1\.2 tcllib "Literate programming tool")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

docstrip \- Docstrip style source code extraction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [File format](#section2)

  - [Commands](#section3)

  - [Document structure](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require docstrip ?1\.2?  

[__docstrip::extract__ *text* *terminals* ?*option* *value* \.\.\.?](#1)  
[__docstrip::sourcefrom__ *filename* *terminals* ?*option* *value* \.\.\.?](#2)  

# <a name='description'></a>DESCRIPTION

__Docstrip__ is a tool created to support a brand of Literate Programming\.
It is most common in the \(La\)TeX community, where it is being used for pretty
much everything from the LaTeX core and up, but there is nothing about
__docstrip__ which prevents using it for other types of software\.

In short, the basic principle of literate programming is that program source
should primarily be written and structured to suit the developers \(and advanced
users who want to peek "under the hood"\), not to suit the whims of a compiler or
corresponding source code consumer\. This means literate sources often need some
kind of "translation" to an illiterate form that dumb software can understand\.
The __docstrip__ Tcl package handles this translation\.

Even for those who do not whole\-hartedly subscribe to the philosophy behind
literate programming, __docstrip__ can bring greater clarity to in
particular:

  - programs employing non\-obvious mathematics

  - projects where separate pieces of code, perhaps in different languages, need
    to be closely coordinated\.

The first is by providing access to much more powerful typographical features
for source code comments than are possible in plain text\. The second is because
all the separate pieces of code can be kept next to each other in the same
source file\.

The way it works is that the programmer edits directly only one or several
"master" source code files, from which __docstrip__ generates the more
traditional "source" files compilers or the like would expect\. The master
sources typically contain a large amount of documentation of the code, sometimes
even in places where the code consumers would not allow any comments\. The
etymology of "docstrip" is that this *doc*umentation was *strip*ped away
\(although "code extraction" might be a better description, as it has always been
a matter of copying selected pieces of the master source rather than deleting
text from it\)\. The __docstrip__ Tcl package contains a reimplementation of
the basic extraction functionality from the __docstrip__ program, and thus
makes it possible for a Tcl interpreter to read and interpret the master source
files directly\.

Readers who are not previously familiar with __docstrip__ but want to know
more about it may consult the following sources\.

  1. *The tclldoc package and class*,
     [http://ctan\.org/tex\-archive/macros/latex/contrib/tclldoc/](http://ctan\.org/tex\-archive/macros/latex/contrib/tclldoc/)\.

  1. *The DocStrip utility*,
     [http://ctan\.org/tex\-archive/macros/latex/base/docstrip\.dtx](http://ctan\.org/tex\-archive/macros/latex/base/docstrip\.dtx)\.

  1. *The doc and shortvrb Packages*,
     [http://ctan\.org/tex\-archive/macros/latex/base/doc\.dtx](http://ctan\.org/tex\-archive/macros/latex/base/doc\.dtx)\.

  1. Chapter 14 of *The LaTeX Companion* \(second edition\), Addison\-Wesley,
     2004; ISBN 0\-201\-36299\-6\.

# <a name='section2'></a>File format

The basic unit __docstrip__ operates on are the *lines* of a master source
file\. Extraction consists of selecting some of these lines to be copied from
input text to output text\. The basic distinction is that between *code lines*
\(which are copied and do not begin with a percent character\) and *comment
lines* \(which begin with a percent character and are not copied\)\.

    docstrip::extract [join {
      {% comment}
      {% more comment !"#$%&/(}
      {some command}
      { % blah $blah "Not a comment."}
      {% abc; this is comment}
      {# def; this is code}
      {ghi}
      {% jkl}
    } \n] {}

returns the same sequence of lines as

    join {
      {some command}
      { % blah $blah "Not a comment."}
      {# def; this is code}
      {ghi} ""
    } \n

It does not matter to __docstrip__ what format is used for the documentation
in the comment lines, but in order to do better than plain text comments, one
typically uses some markup language\. Most commonly LaTeX is used, as that is a
very established standard and also provides the best support for mathematical
formulae, but the __docstrip::util__ package also gives some support for
*[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)*\-like markup\.

Besides the basic code and comment lines, there are also *guard lines*, which
begin with the two characters '%<', and *meta\-comment lines*, which begin with
the two characters '%%'\. Within guard lines there is furthermore the distinction
between *verbatim guard lines*, which begin with '%<<', and ordinary guard
lines, where the '%<' is not followed by another '<'\. The last category is by
far the most common\.

Ordinary guard lines conditions extraction of the code line\(s\) they guard by the
value of a boolean expression; the guarded block of code lines will only be
included if the expression evaluates to true\. The syntax of an ordinary guard
line is one of

    '%' '<' STARSLASH EXPRESSION '>'
    '%' '<' PLUSMINUS EXPRESSION '>' CODE

where

    STARSLASH  ::=  '*' | '/'
    PLUSMINUS  ::=  | '+' | '-'
    EXPRESSION ::= SECONDARY | SECONDARY ',' EXPRESSION
                 | SECONDARY '|' EXPRESSION
    SECONDARY  ::= PRIMARY | PRIMARY '&' SECONDARY
    PRIMARY    ::= TERMINAL | '!' PRIMARY | '(' EXPRESSION ')'
    CODE       ::= { any character except end-of-line }

Comma and vertical bar both denote 'or'\. Ampersand denotes 'and'\. Exclamation
mark denotes 'not'\. A TERMINAL can be any nonempty string of characters not
containing '>', '&', '&#124;', comma, '\(', or '\)', although the __docstrip__
manual is a bit restrictive and only guarantees proper operation for strings of
letters \(although even the LaTeX core sources make heavy use also of digits in
TERMINALs\)\. The second argument of __docstrip::extract__ is the list of
those TERMINALs that should count as having the value 'true'; all other
TERMINALs count as being 'false' when guard expressions are evaluated\.

In the case of a '%<\**EXPRESSION*>' guard, the lines guarded are all lines up
to the next '%</*EXPRESSION*>' guard with the same *EXPRESSION* \(compared as
strings\)\. The blocks of code delimited by such '\*' and '/' guard lines must be
properly nested\.

    set text [join {
       {begin}
       {%<*foo>}
       {1}
       {%<*bar>}
       {2}
       {%</bar>}
       {%<*!bar>}
       {3}
       {%</!bar>}
       {4}
       {%</foo>}
       {5}
       {%<*bar>}
       {6}
       {%</bar>}
       {end}
    } \n]
    set res [docstrip::extract $text foo]
    append res [docstrip::extract $text {foo bar}]
    append res [docstrip::extract $text bar]

sets $res to the result of

    join {
       {begin}
       {1}
       {3}
       {4}
       {5}
       {end}
       {begin}
       {1}
       {2}
       {4}
       {5}
       {6}
       {end}
       {begin}
       {5}
       {6}
       {end} ""
    } \n

In guard lines without a '\*', '/', '\+', or '\-' modifier after the '%<', the
guard applies only to the CODE following the '>' on that single line\. A '\+'
modifier is equivalent to no modifier\. A '\-' modifier is like the case with no
modifier, but the expression is implicitly negated, i\.e\., the CODE of a '%<\-'
guard line is only included if the expression evaluates to false\.

Metacomment lines are "comment lines which should not be stripped away", but be
extracted like code lines; these are sometimes used for copyright notices and
similar material\. The '%%' prefix is however not kept, but substituted by the
current __\-metaprefix__, which is customarily set to some "comment until end
of line" character \(or character sequence\) of the language of the code being
extracted\.

    set text [join {
       {begin}
       {%<foo> foo}
       {%<+foo>plusfoo}
       {%<-foo>minusfoo}
       {middle}
       {%% some metacomment}
       {%<*foo>}
       {%%another metacomment}
       {%</foo>}
       {end}
    } \n]
    set res [docstrip::extract $text foo -metaprefix {# }]
    append res [docstrip::extract $text bar -metaprefix {#}]

sets $res to the result of

    join {
       {begin}
       { foo}
       {plusfoo}
       {middle}
       {#  some metacomment}
       {# another metacomment}
       {end}
       {begin}
       {minusfoo}
       {middle}
       {# some metacomment}
       {end} ""
    } \n

Verbatim guards can be used to force code line interpretation of a block of
lines even if some of them happen to look like any other type of lines to
docstrip\. A verbatim guard has the form '%<<*END\-TAG*' and the verbatim block
is terminated by the first line that is exactly '%*END\-TAG*'\.

    set text [join {
       {begin}
       {%<*myblock>}
       {some stupid()}
       {   #computer<program>}
       {%<<QQQ-98765}
       {% These three lines are copied verbatim (including percents}
       {%% even if -metaprefix is something different than %%).}
       {%</myblock>}
       {%QQQ-98765}
       {   using*strange@programming<language>}
       {%</myblock>}
       {end}
    } \n]
    set res [docstrip::extract $text myblock -metaprefix {# }]
    append res [docstrip::extract $text {}]

sets $res to the result of

    join {
       {begin}
       {some stupid()}
       {   #computer<program>}
       {% These three lines are copied verbatim (including percents}
       {%% even if -metaprefix is something different than %%).}
       {%</myblock>}
       {   using*strange@programming<language>}
       {end}
       {begin}
       {end} ""
    } \n

The processing of verbatim guards takes place also inside blocks of lines which
due to some outer block guard will not be copied\.

The final piece of __docstrip__ syntax is that extraction stops at a line
that is exactly "\\endinput"; this is often used to avoid copying random
whitespace at the end of a file\. In the unlikely case that one wants such a code
line, one can protect it with a verbatim guard\.

# <a name='section3'></a>Commands

The package defines two commands\.

  - <a name='1'></a>__docstrip::extract__ *text* *terminals* ?*option* *value* \.\.\.?

    The __extract__ command docstrips the *text* and returns the extracted
    lines of code, as a string with each line terminated with a newline\. The
    *terminals* is the list of those guard expression terminals which should
    evaluate to true\. The available options are:

      * __\-annotate__ *lines*

        Requests the specified number of lines of annotation to follow each
        extracted line in the result\. Defaults to 0\. Annotation lines are mostly
        useful when the extracted lines are to undergo some further
        transformation\. A first annotation line is a list of three elements:
        line type, prefix removed in extraction, and prefix inserted in
        extraction\. The line type is one of: 'V' \(verbatim\), 'M' \(metacomment\),
        '\+' \(\+ or no modifier guard line\), '\-' \(\- modifier guard line\), '\.'
        \(normal line\)\. A second annotation line is the source line number\. A
        third annotation line is the current stack of block guards\. Requesting
        more than three lines of annotation is currently not supported\.

      * __\-metaprefix__ *string*

        The string by which the '%%' prefix of a metacomment line will be
        replaced\. Defaults to '%%'\. For Tcl code this would typically be '\#'\.

      * __\-onerror__ *keyword*

        Controls what will be done when a format error in the *text* being
        processed is detected\. The settings are:

          + __ignore__

            Just ignore the error; continue as if nothing happened\.

          + __puts__

            Write an error message to __stderr__, then continue processing\.

          + __throw__

            Throw an error\. The __\-errorcode__ is set to a list whose first
            element is __DOCSTRIP__, second element is the type of error,
            and third element is the line number where the error is detected\.
            This is the default\.

      * __\-trimlines__ *boolean*

        Controls whether *spaces* at the end of a line should be trimmed away
        before the line is processed\. Defaults to true\.

    It should be remarked that the *terminals* are often called "options" in
    the context of the __docstrip__ program, since these specify which
    optional code fragments should be included\.

  - <a name='2'></a>__docstrip::sourcefrom__ *filename* *terminals* ?*option* *value* \.\.\.?

    The __sourcefrom__ command is a docstripping emulation of
    __[source](\.\./\.\./\.\./\.\./index\.md\#source)__\. It opens the file
    *filename*, reads it, closes it, docstrips the contents as specified by
    the *terminals*, and evaluates the result in the local context of the
    caller, during which time the __[info](\.\./\.\./\.\./\.\./index\.md\#info)__
    __script__ value will be the *filename*\. The options are passed on to
    __fconfigure__ to configure the file before its contents are read\. The
    __\-metaprefix__ is set to '\#', all other __extract__ options have
    their default values\.

# <a name='section4'></a>Document structure

The file format \(as described above\) determines whether a master source code
file can be processed correctly by __docstrip__, but the usefulness of the
format is to no little part also dependent on that the code and comment lines
together constitute a well\-formed document\.

For a document format that does not require any non\-Tcl software, see the
__ddt2man__ command in the __docstrip::util__ package\. It is suggested
that files employing that document format are given the suffix "\.ddt", to
distinguish them from the more traditional LaTeX\-based "\.dtx" files\.

Master source files with "\.dtx" extension are usually set up so that they can be
typeset directly by __[latex](\.\./\.\./\.\./\.\./index\.md\#latex)__ without any
support from other files\. This is achieved by beginning the file with the lines

> &nbsp;&nbsp;&nbsp;% \\iffalse  
> &nbsp;&nbsp;&nbsp;%<\*driver>  
> &nbsp;&nbsp;&nbsp;\\documentclass\{tclldoc\}  
> &nbsp;&nbsp;&nbsp;\\begin\{document\}  
> &nbsp;&nbsp;&nbsp;\\DocInput\{*filename\.dtx*\}  
> &nbsp;&nbsp;&nbsp;\\end\{document\}  
> &nbsp;&nbsp;&nbsp;%</driver>  
> &nbsp;&nbsp;&nbsp;% \\fi

or some variation thereof\. The trick is that the file gets read twice\. With
normal LaTeX reading rules, the first two lines are comments and therefore
ignored\. The third line is the document preamble, the fourth line begins the
document body, and the sixth line ends the document, so LaTeX stops there —
non\-comments below that point in the file are never subjected to the normal
LaTeX reading rules\. Before that, however, the \\DocInput command on the fifth
line is processed, and that does two things: it changes the interpretation of
'%' from "comment" to "ignored", and it inputs the file specified in the
argument \(which is normally the name of the file the command is in\)\. It is this
second time that the file is being read that the comments and code in it are
typeset\.

The function of the \\iffalse \.\.\. \\fi is to skip lines two to seven on this
second time through; this is similar to the "if 0 \{ \.\.\. \}" idiom for block
comments in Tcl code, and it is needed here because \(amongst other things\) the
\\documentclass command may only be executed once\. The function of the <driver>
guards is to prevent this short piece of LaTeX code from being extracted by
__docstrip__\. The total effect is that the file can function both as a LaTeX
document and as a __docstrip__ master source code file\.

It is not necessary to use the tclldoc document class, but that does provide a
number of features that are convenient for "\.dtx" files containing Tcl code\.
More information on this matter can be found in the references above\.

# <a name='seealso'></a>SEE ALSO

[docstrip\_util](docstrip\_util\.md)

# <a name='keywords'></a>KEYWORDS

[\.dtx](\.\./\.\./\.\./\.\./index\.md\#\_dtx), [LaTeX](\.\./\.\./\.\./\.\./index\.md\#latex),
[docstrip](\.\./\.\./\.\./\.\./index\.md\#docstrip),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation), [literate
programming](\.\./\.\./\.\./\.\./index\.md\#literate\_programming),
[source](\.\./\.\./\.\./\.\./index\.md\#source)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003–2010 Lars Hellström <Lars dot Hellstrom at residenset dot net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/docstrip/docstrip_util.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672

[//000000001]: # (docstrip\_util \- Literate programming tool)
[//000000002]: # (Generated from file 'docstrip\_util\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003–2010 Lars Hellström <Lars dot Hellstrom at residenset dot net>)
[//000000004]: # (docstrip\_util\(n\) 1\.3\.1 tcllib "Literate programming tool")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

docstrip\_util \- Docstrip\-related utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Package indexing commands](#section2)

  - [Source processing commands](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require docstrip ?1\.2?  
package require docstrip::util ?1\.3\.1?  

[__pkgProvide__ *name* *version* *terminals*](#1)  
[__pkgIndex__ ?*terminal* \.\.\.?](#2)  
[__fileoptions__ ?*option* *value* \.\.\.?](#3)  
[__docstrip::util::index\_from\_catalogue__ *dir* *pattern* ?*option* *value* \.\.\.?](#4)  
[__docstrip::util::modules\_from\_catalogue__ *target* *source* ?*option* *value* \.\.\.?](#5)  
[__docstrip::util::classical\_preamble__ *metaprefix* *message* *target* ?*source* *terminals* \.\.\.?](#6)  
[__docstrip::util::classical\_postamble__ *metaprefix* *message* *target* ?*source* *terminals* \.\.\.?](#7)  
[__docstrip::util::packages\_provided__ *text* ?*setup\-script*?](#8)  
[__docstrip::util::ddt2man__ *text*](#9)  
[__docstrip::util::guards__ *subcmd* *text*](#10)  
[__docstrip::util::patch__ *source\-var* *terminals* *fromtext* *diff* ?*option* *value* \.\.\.?](#11)  
[__docstrip::util::thefile__ *filename* ?*option* *value* \.\.\.?](#12)  
[__docstrip::util::import\_unidiff__ *diff\-text* ?*warning\-var*?](#13)  

# <a name='description'></a>DESCRIPTION

The __docstrip::util__ package is meant for collecting various utility
procedures that are mainly useful at installation or development time\. It is
separate from the base package to avoid overhead when the latter is used to
__[source](\.\./\.\./\.\./\.\./index\.md\#source)__ code\.

# <a name='section2'></a>Package indexing commands

Like raw "\.tcl" files, code lines in docstrip source files can be searched for
package declarations and corresponding indices constructed\. A complication is
however that one cannot tell from the code blocks themselves which will fit
together to make a working package; normally that information would be found in
an accompanying "\.ins" file, but parsing one of those is not an easy task\.
Therefore __docstrip::util__ introduces an alternative encoding of such
information, in the form of a declarative Tcl script: the
*[catalogue](\.\./\.\./\.\./\.\./index\.md\#catalogue)* \(of the contents in a source
file\)\.

The special commands which are available inside a catalogue are:

  - <a name='1'></a>__pkgProvide__ *name* *version* *terminals*

    Declares that the code for a package with name *name* and version
    *version* is made up from those modules in the source file which are
    selected by the *terminals* list of guard expression terminals\. This code
    should preferably not contain a
    __[package](\.\./\.\./\.\./\.\./index\.md\#package)__ __provide__ command
    for the package, as one will be provided by the package loading mechanisms\.

  - <a name='2'></a>__pkgIndex__ ?*terminal* \.\.\.?

    Declares that the code for a package is made up from those modules in the
    source file which are selected by the listed guard expression *terminal*s\.
    The name and version of this package is determined from
    __[package](\.\./\.\./\.\./\.\./index\.md\#package)__ __provide__
    command\(s\) found in that code \(hence there must be such a command in there\)\.

  - <a name='3'></a>__fileoptions__ ?*option* *value* \.\.\.?

    Declares the __fconfigure__ options that should be in force when reading
    the source; this can usually be ignored for pure ASCII files, but if the
    file needs to be interpreted according to some other __\-encoding__ then
    this is how to specify it\. The command should normally appear first in the
    catalogue, as it takes effect only for commands following it\.

Other Tcl commands are supported too — a catalogue is parsed by being evaluated
in a safe interpreter — but they are rarely needed\. To allow for future
extensions, unknown commands in the catalogue are silently ignored\.

To simplify distribution of catalogues together with their source files, the
catalogue is stored *in the source file itself* as a module selected by the
terminal '__docstrip\.tcl::catalogue__'\. This supports both the style of
collecting all catalogue lines in one place and the style of putting each
catalogue line in close proximity of the code that it declares\.

Putting catalogue entries next to the code they declare may look as follows

    %    First there's the catalogue entry
    %    \begin{tcl}
    %<docstrip.tcl::catalogue>pkgProvide foo::bar 1.0 {foobar load}
    %    \end{tcl}
    %    second a metacomment used to include a copyright message
    %    \begin{macrocode}
    %<*foobar>
    %% This file is placed in the public domain.
    %    \end{macrocode}
    %    third the package implementation
    %    \begin{tcl}
    namespace eval foo::bar {
       # ... some clever piece of Tcl code elided ...
    %    \end{tcl}
    %    which at some point may have variant code to make use of a
    %    |load|able extension
    %    \begin{tcl}
    %<*load>
       load [file rootname [info script]][info sharedlibextension]
    %</load>
    %<*!load>
       # ... even more clever scripted counterpart of the extension
       # also elided ...
    %</!load>
    }
    %</foobar>
    %    \end{tcl}
    %    and that's it!

The corresponding set\-up with __pkgIndex__ would be

    %    First there's the catalogue entry
    %    \begin{tcl}
    %<docstrip.tcl::catalogue>pkgIndex foobar load
    %    \end{tcl}
    %    second a metacomment used to include a copyright message
    %    \begin{tcl}
    %<*foobar>
    %% This file is placed in the public domain.
    %    \end{tcl}
    %    third the package implementation
    %    \begin{tcl}
    package provide foo::bar 1.0
    namespace eval foo::bar {
       # ... some clever piece of Tcl code elided ...
    %    \end{tcl}
    %    which at some point may have variant code to make use of a
    %    |load|able extension
    %    \begin{tcl}
    %<*load>
       load [file rootname [info script]][info sharedlibextension]
    %</load>
    %<*!load>
       # ... even more clever scripted counterpart of the extension
       # also elided ...
    %</!load>
    }
    %</foobar>
    %    \end{tcl}
    %    and that's it!

  - <a name='4'></a>__docstrip::util::index\_from\_catalogue__ *dir* *pattern* ?*option* *value* \.\.\.?

    This command is a sibling of the standard __pkg\_mkIndex__ command, in
    that it adds package entries to "pkgIndex\.tcl" files\. The difference is that
    it indexes __[docstrip](docstrip\.md)__\-style source files rather
    than raw "\.tcl" or loadable library files\. Only packages listed in the
    catalogue of a file are considered\.

    The *dir* argument is the directory in which to look for files \(and whose
    "pkgIndex\.tcl" file should be amended\)\. The *pattern* argument is a
    __glob__ pattern of files to look into; a typical value would be
    __\*\.dtx__ or __\*\.\{dtx,ddt\}__\. Remaining arguments are option\-value
    pairs, where the supported options are:

      * __\-recursein__ *dirpattern*

        If this option is given, then the __index\_from\_catalogue__ operation
        will be repeated in each subdirectory whose name matches the
        *dirpattern*\. __\-recursein__ __\*__ will cause the entire
        subtree rooted at *dir* to be indexed\.

      * __\-sourceconf__ *dictionary*

        Specify __fileoptions__ to use when reading the catalogues of files
        \(and also for reading the packages if the catalogue does not contain a
        __fileoptions__ command\)\. Defaults to being empty\. Primarily useful
        if your system encoding is very different from that of the source file
        \(e\.g\., one is a two\-byte encoding and the other is a one\-byte encoding\)\.
        __ascii__ and __utf\-8__ are not very different in that sense\.

      * __\-options__ *terminals*

        The *terminals* is a list of terminals in addition to
        __docstrip\.tcl::catalogue__ that should be held as true when
        extracting the catalogue\. Defaults to being empty\. This makes it
        possible to make use of "variant sections" in the catalogue itself, e\.g\.
        gaurd some entries with an extra "experimental" and thus prevent them
        from appearing in the index unless that is generated with "experimental"
        among the __\-options__\.

      * __\-report__ *boolean*

        If the *boolean* is true then the return value will be a textual,
        probably multiline, report on what was done\. Defaults to false, in which
        case there is no particular return value\.

      * __\-reportcmd__ *commandPrefix*

        Every item in the report is handed as an extra argument to the command
        prefix\. Since __index\_from\_catalogue__ would typically be used at a
        rather high level in installation scripts and the like, the
        *commandPrefix* defaults to "__puts__ __stdout__"\. Use
        __[list](\.\./\.\./\.\./\.\./index\.md\#list)__ to effectively disable
        this feature\. The return values from the prefix are ignored\.

    The __package ifneeded__ scripts that are generated contain one
    __package require docstrip__ command and one
    __docstrip::sourcefrom__ command\. If the catalogue entry was of the
    __pkgProvide__ kind then the __package ifneeded__ script also
    contains the __package provide__ command\.

    Note that __index\_from\_catalogue__ never removes anything from an
    existing "pkgIndex\.tcl" file\. Hence you may need to delete it \(or have
    __pkg\_mkIndex__ recreate it from scratch\) before running
    __index\_from\_catalogue__ to update some piece of information, such as a
    package version number\.

  - <a name='5'></a>__docstrip::util::modules\_from\_catalogue__ *target* *source* ?*option* *value* \.\.\.?

    This command is an alternative to __index\_from\_catalogue__ which creates
    Tcl Module \("\.tm"\) files rather than "pkgIndex\.tcl" entries\. Since this
    action is more similar to what __[docstrip](docstrip\.md)__
    classically does, it has features for putting pre\- and postambles on the
    generated files\.

    The *source* argument is the name of the source file to generate "\.tm"
    files from\. The *target* argument is the directory which should count as a
    module path, i\.e\., this is what the relative paths derived from package
    names are joined to\. The supported options are:

      * __\-preamble__ *message*

        A message to put in the preamble \(initial block of comments\) of
        generated files\. Defaults to a space\. May be several lines, which are
        then separated by newlines\. Traditionally used for copyright notices or
        the like, but metacomment lines provide an alternative to that\.

      * __\-postamble__ *message*

        Like __\-preamble__, but the message is put at the end of the file
        instead of the beginning\. Defaults to being empty\.

      * __\-sourceconf__ *dictionary*

        Specify __fileoptions__ to use when reading the catalogue of the
        *source* \(and also for reading the packages if the catalogue does not
        contain a __fileoptions__ command\)\. Defaults to being empty\.
        Primarily useful if your system encoding is very different from that of
        the source file \(e\.g\., one is a two\-byte encoding and the other is a
        one\-byte encoding\)\. __ascii__ and __utf\-8__ are not very
        different in that sense\.

      * __\-options__ *terminals*

        The *terminals* is a list of terminals in addition to
        __docstrip\.tcl::catalogue__ that should be held as true when
        extracting the catalogue\. Defaults to being empty\. This makes it
        possible to make use of "variant sections" in the catalogue itself, e\.g\.
        gaurd some entries with an extra "experimental" guard and thus prevent
        them from contributing packages unless those are generated with
        "experimental" among the __\-options__\.

      * __\-formatpreamble__ *commandPrefix*

        Command prefix used to actually format the preamble\. Takes four
        additional arguments *message*, *targetFilename*,
        *sourceFilename*, and *terminalList* and returns a fully formatted
        preamble\. Defaults to using __classical\_preamble__ with a
        *metaprefix* of '\#\#'\.

      * __\-formatpostamble__ *commandPrefix*

        Command prefix used to actually format the postamble\. Takes four
        additional arguments *message*, *targetFilename*,
        *sourceFilename*, and *terminalList* and returns a fully formatted
        postamble\. Defaults to using __classical\_postamble__ with a
        *metaprefix* of '\#\#'\.

      * __\-report__ *boolean*

        If the *boolean* is true \(which is the default\) then the return value
        will be a textual, probably multiline, report on what was done\. If it is
        false then there is no particular return value\.

      * __\-reportcmd__ *commandPrefix*

        Every item in the report is handed as an extra argument to this command
        prefix\. Defaults to __[list](\.\./\.\./\.\./\.\./index\.md\#list)__, which
        effectively disables this feature\. The return values from the prefix are
        ignored\. Use for example "__puts__ __stdout__" to get report
        items written immediately to the terminal\.

    An existing file of the same name as one to be created will be overwritten\.

  - <a name='6'></a>__docstrip::util::classical\_preamble__ *metaprefix* *message* *target* ?*source* *terminals* \.\.\.?

    This command returns a preamble in the classical
    __[docstrip](docstrip\.md)__ style

    ##
    ## This is `TARGET',
    ## generated by the docstrip::util package.
    ##
    ## The original source files were:
    ##
    ## SOURCE (with options: `foo,bar')
    ##
    ## Some message line 1
    ## line2
    ## line3

    if called as

    docstrip::util::classical_preamble {##}\
      "\nSome message line 1\nline2\nline3" TARGET SOURCE {foo bar}

    The command supports preambles for files generated from multiple sources,
    even though __modules\_from\_catalogue__ at present does not need that\.

  - <a name='7'></a>__docstrip::util::classical\_postamble__ *metaprefix* *message* *target* ?*source* *terminals* \.\.\.?

    This command returns a postamble in the classical
    __[docstrip](docstrip\.md)__ style

    ## Some message line 1
    ## line2
    ## line3
    ##
    ## End of file `TARGET'.

    if called as

    docstrip::util::classical_postamble {##}\
      "Some message line 1\nline2\nline3" TARGET SOURCE {foo bar}

    In other words, the *source* and *terminals* arguments are ignored, but
    supported for symmetry with __classical\_preamble__\.

  - <a name='8'></a>__docstrip::util::packages\_provided__ *text* ?*setup\-script*?

    This command returns a list where every even index element is the name of a
    package __provide__d by *text* when that is evaluated as a Tcl script,
    and the following odd index element is the corresponding version\. It is used
    to do package indexing of extracted pieces of code, in the manner of
    __pkg\_mkIndex__\.

    One difference to __pkg\_mkIndex__ is that the *text* gets evaluated in
    a safe interpreter\. __package require__ commands are silently ignored,
    as are unknown commands \(which includes
    __[source](\.\./\.\./\.\./\.\./index\.md\#source)__ and __load__\)\. Other
    errors cause processing of the *text* to stop, in which case only those
    package declarations that had been encountered before the error will be
    included in the return value\.

    The *setup\-script* argument can be used to customise the evaluation
    environment, if the code in *text* has some very special needs\. The
    *setup\-script* is evaluated in the local context of the
    __packages\_provided__ procedure just before the *text* is processed\.
    At that time, the name of the slave command for the safe interpreter that
    will do this processing is kept in the local variable __c__\. To for
    example copy the contents of the __::env__ array to the safe
    interpreter, one might use a *setup\-script* of

    $c eval [list array set env [array get ::env]]

# <a name='section3'></a>Source processing commands

Unlike the previous group of commands, which would use __docstrip::extract__
to extract some code lines and then process those further, the following
commands operate on text consisting of all types of lines\.

  - <a name='9'></a>__docstrip::util::ddt2man__ *text*

    The __ddt2man__ command reformats *text* from the general
    __[docstrip](docstrip\.md)__ format to
    __[doctools](\.\./doctools/doctools\.md)__ "\.man" format \(Tcl Markup
    Language for Manpages\)\. The different line types are treated as follows:

      * comment and metacomment lines

        The '%' and '%%' prefixes are removed, the rest of the text is kept as
        it is\.

      * empty lines

        These are kept as they are\. \(Effectively this means that they will count
        as comment lines after a comment line and as code lines after a code
        line\.\)

      * code lines

        __example\_begin__ and __example\_end__ commands are placed at the
        beginning and end of every block of consecutive code lines\. Brackets in
        a code line are converted to __lb__ and __rb__ commands\.

      * verbatim guards

        These are processed as usual, so they do not show up in the result but
        every line in a verbatim block is treated as a code line\.

      * other guards

        These are treated as code lines, except that the actual guard is
        __emph__asised\.

    At the time of writing, no project has employed
    __[doctools](\.\./doctools/doctools\.md)__ markup in master source
    files, so experience of what works well is not available\. A source file
    could however look as follows

    % [manpage_begin gcd n 1.0]
    % [keywords divisor]
    % [keywords math]
    % [moddesc {Greatest Common Divisor}]
    % [require gcd [opt 1.0]]
    % [description]
    %
    % [list_begin definitions]
    % [call [cmd gcd] [arg a] [arg b]]
    %   The [cmd gcd] procedure takes two arguments [arg a] and [arg b] which
    %   must be integers and returns their greatest common divisor.
    proc gcd {a b} {
    %   The first step is to take the absolute values of the arguments.
    %   This relieves us of having to worry about how signs will be treated
    %   by the remainder operation.
       set a [expr {abs($a)}]
       set b [expr {abs($b)}]
    %   The next line does all of Euclid's algorithm! We can make do
    %   without a temporary variable, since $a is substituted before the
    %   [lb]set a $b[rb] and thus continues to hold a reference to the
    %   "old" value of [var a].
       while {$b>0} { set b [expr { $a % [set a $b] }] }
    %   In Tcl 8.3 we might want to use [cmd set] instead of [cmd return]
    %   to get the slight advantage of byte-compilation.
    %<tcl83>  set a
    %<!tcl83>   return $a
    }
    % [list_end]
    %
    % [manpage_end]

    If the above text is fed through __docstrip::util::ddt2man__ then the
    result will be a syntactically correct
    __[doctools](\.\./doctools/doctools\.md)__ manpage, even though its
    purpose is a bit different\.

    It is suggested that master source code files with
    __[doctools](\.\./doctools/doctools\.md)__ markup are given the suffix
    "\.ddt", hence the "ddt" in __ddt2man__\.

  - <a name='10'></a>__docstrip::util::guards__ *subcmd* *text*

    The __guards__ command returns information \(mostly of a statistical
    nature\) about the ordinary docstrip guards that occur in the *text*\. The
    *subcmd* selects what is returned\.

      * __counts__

        List the guard expression terminals with counts\. The format of the
        return value is a dictionary which maps the terminal name to the number
        of occurencies of it in the file\.

      * __exprcount__

        List the guard expressions with counts\. The format of the return value
        is a dictionary which maps the expression to the number of occurencies
        of it in the file\.

      * __exprerr__

        List the syntactically incorrect guard expressions \(e\.g\. parentheses do
        not match, or a terminal is missing\)\. The return value is a list, with
        the elements in no particular order\.

      * __expressions__

        List the guard expressions\. The return value is a list, with the
        elements in no particular order\.

      * __exprmods__

        List the guard expressions with modifiers\. The format of the return
        value is a dictionary where each index is a guard expression and each
        entry is a string with one character for every guard line that has this
        expression\. The characters in the entry specify what modifier was used
        in that line: \+, \-, \*, /, or \(for guard without modifier:\) space\. This
        is the most primitive form of the information gathered by
        __guards__\.

      * __names__

        List the guard expression terminals\. The return value is a list, with
        the elements in no particular order\.

      * __rotten__

        List the malformed guard lines \(this does not include lines where only
        the expression is malformed, though\)\. The format of the return value is
        a dictionary which maps line numbers to their contents\.

  - <a name='11'></a>__docstrip::util::patch__ *source\-var* *terminals* *fromtext* *diff* ?*option* *value* \.\.\.?

    This command tries to apply a __[diff](\.\./\.\./\.\./\.\./index\.md\#diff)__
    file \(for example a contributed patch\) that was computed for a generated
    file to the __[docstrip](docstrip\.md)__ source\. This can be useful
    if someone has edited a generated file, thus mistaking it for being the
    source\. This command makes no presumptions which are specific for the case
    that the generated file is a Tcl script\.

    __[patch](\.\./\.\./\.\./\.\./index\.md\#patch)__ requires that the source
    file to patch is kept as a list of lines in a variable, and the name of that
    variable in the calling context is what goes into the *source\-var*
    argument\. The *terminals* is the list of terminals used to extract the
    file that has been patched\. The *diff* is the actual diff to apply \(in a
    format as explained below\) and the *fromtext* is the contents of the file
    which served as "from" when the diff was computed\. Options can be used to
    further control the process\.

    The process works by "lifting" the hunks in the *diff* from generated to
    source file, and then applying them to the elements of the *source\-var*\.
    In order to do this lifting, it is necessary to determine how lines in the
    *fromtext* correspond to elements of the *source\-var*, and that is where
    the *terminals* come in; the source is first __extract__ed under the
    given *terminals*, and the result of that is then matched against the
    *fromtext*\. This produces a map which translates line numbers stated in
    the *diff* to element numbers in *source\-var*, which is what is needed
    to lift the hunks\.

    The reason that both the *terminals* and the *fromtext* must be given is
    twofold\. First, it is very difficult to keep track of how many lines of
    preamble are supplied some other way than by copying lines from source
    files\. Second, a generated file might contain material from several source
    files\. Both make it impossible to predict what line number an extracted file
    would have in the generated file, so instead the algorithm for computing the
    line number map looks for a block of lines in the *fromtext* which matches
    what can be extracted from the source\. This matching is affected by the
    following options:

      * __\-matching__ *mode*

        How equal must two lines be in order to match? The supported *mode*s
        are:

          + __exact__

            Lines must be equal as strings\. This is the default\.

          + __anyspace__

            All sequences of whitespace characters are converted to single
            spaces before comparing\.

          + __nonspace__

            Only non\-whitespace characters are considered when comparing\.

          + __none__

            Any two lines are considered to be equal\.

      * __\-metaprefix__ *string*

        The __\-metaprefix__ value to use when extracting\. Defaults to "%%",
        but for Tcl code it is more likely that "\#" or "\#\#" had been used for
        the generated file\.

      * __\-trimlines__ *boolean*

        The __\-trimlines__ value to use when extracting\. Defaults to true\.

    The return value is in the form of a unified diff, containing only those
    hunks which were not applied or were only partially applied; a comment in
    the header of each hunk specifies which case is at hand\. It is normally
    necessary to manually review both the return value from
    __[patch](\.\./\.\./\.\./\.\./index\.md\#patch)__ and the patched text itself,
    as this command cannot adjust comment lines to match new content\.

    An example use would look like

    set sourceL [split [docstrip::util::thefile from.dtx] \n]
    set terminals {foo bar baz}
    set fromtext [docstrip::util::thefile from.tcl]
    set difftext [exec diff --unified from.tcl to.tcl]
    set leftover [docstrip::util::patch sourceL $terminals $fromtext\
      [docstrip::util::import_unidiff $difftext] -metaprefix {#}]
    set F [open to.dtx w]; puts $F [join $sourceL \n]; close $F
    return $leftover

    Here, "from\.dtx" was used as source for "from\.tcl", which someone modified
    into "to\.tcl"\. We're trying to construct a "to\.dtx" which can be used as
    source for "to\.tcl"\.

  - <a name='12'></a>__docstrip::util::thefile__ *filename* ?*option* *value* \.\.\.?

    The __thefile__ command opens the file *filename*, reads it to end,
    closes it, and returns the contents \(dropping a final newline if there is
    one\)\. The option\-value pairs are passed on to __fconfigure__ to
    configure the open file channel before anything is read from it\.

  - <a name='13'></a>__docstrip::util::import\_unidiff__ *diff\-text* ?*warning\-var*?

    This command parses a unified \(__[diff](\.\./\.\./\.\./\.\./index\.md\#diff)__
    flags __\-U__ and __\-\-unified__\) format diff into the list\-of\-hunks
    format expected by __docstrip::util::patch__\. The *diff\-text* argument
    is the text to parse and the *warning\-var* is, if specified, the name in
    the calling context of a variable to which any warnings about parsing
    problems will be __append__ed\.

    The return value is a list of *hunks*\. Each hunk is a list of five
    elements "*start1* *end1* *start2* *end2* *lines*"\. *start1* and
    *end1* are line numbers in the "from" file of the first and last
    respectively lines of the hunk\. *start2* and *end2* are the
    corresponding line numbers in the "to" file\. Line numbers start at 1\. The
    *lines* is a list with two elements for each line in the hunk; the first
    specifies the type of a line and the second is the actual line contents\. The
    type is __\-__ for lines only in the "from" file, __\+__ for lines
    that are only in the "to" file, and __0__ for lines that are in both\.

# <a name='seealso'></a>SEE ALSO

[docstrip](docstrip\.md), [doctools](\.\./doctools/doctools\.md),
doctools\_fmt

# <a name='keywords'></a>KEYWORDS

[\.ddt](\.\./\.\./\.\./\.\./index\.md\#\_ddt), [\.dtx](\.\./\.\./\.\./\.\./index\.md\#\_dtx),
[LaTeX](\.\./\.\./\.\./\.\./index\.md\#latex), [Tcl
module](\.\./\.\./\.\./\.\./index\.md\#tcl\_module),
[catalogue](\.\./\.\./\.\./\.\./index\.md\#catalogue),
[diff](\.\./\.\./\.\./\.\./index\.md\#diff),
[docstrip](\.\./\.\./\.\./\.\./index\.md\#docstrip),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation), [literate
programming](\.\./\.\./\.\./\.\./index\.md\#literate\_programming),
[module](\.\./\.\./\.\./\.\./index\.md\#module), [package
indexing](\.\./\.\./\.\./\.\./index\.md\#package\_indexing),
[patch](\.\./\.\./\.\./\.\./index\.md\#patch),
[source](\.\./\.\./\.\./\.\./index\.md\#source)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003–2010 Lars Hellström <Lars dot Hellstrom at residenset dot net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/changelog.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136

[//000000001]: # (doctools::changelog \- Documentation tools)
[//000000002]: # (Generated from file 'changelog\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003\-2013 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::changelog\(n\) 1\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::changelog \- Processing text in Emacs ChangeLog format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil  
package require doctools::changelog ?1\.1?  

[__::doctools::changelog::scan__ *text*](#1)  
[__::doctools::changelog::flatten__ *entries*](#2)  
[__::doctools::changelog::toDoctools__ *title* *module* *version* *entries*](#3)  
[__::doctools::changelog::merge__ *entries*\.\.\.](#4)  

# <a name='description'></a>DESCRIPTION

This package provides Tcl commands for the processing and reformatting of text
in the "ChangeLog" format generated by
__[emacs](\.\./\.\./\.\./\.\./index\.md\#emacs)__\.

# <a name='section2'></a>API

  - <a name='1'></a>__::doctools::changelog::scan__ *text*

    The command takes the *text* and parses it under the assumption that it
    contains a ChangeLog as generated by
    __[emacs](\.\./\.\./\.\./\.\./index\.md\#emacs)__\. It returns a data structure
    describing the contents of this ChangeLog\.

    This data structure is a list where each element describes one entry in the
    ChangeLog\. Each element/entry is then a list of three elements describing
    the date of the entry, its author, and the comments made, in this order\. The
    last item in each element/entry, the comments, is a list of sections\. Each
    section is described by a list containing two elements, a list of file
    names, and a string containing the true comment associated with the files of
    the section\.

            {
        	{
        	    date
        	    author
        	    {
        		{
        		    {file ...}
        		    commenttext
        		}
        		...
        	    }
        	}
        	{...}
            }

  - <a name='2'></a>__::doctools::changelog::flatten__ *entries*

    This command converts a list of entries as generated by __change::scan__
    above into a simpler list of plain text blocks each containing all the
    information of a single entry\.

  - <a name='3'></a>__::doctools::changelog::toDoctools__ *title* *module* *version* *entries*

    This command converts the pre\-parsed ChangeLog *entries* as generated by
    the command __::doctools::changelog::scan__ into a document in
    *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format and returns it as
    the result of the command\.

    The other three arguments supply the information for the header of that
    document which is not available from the changelog itself\.

  - <a name='4'></a>__::doctools::changelog::merge__ *entries*\.\.\.

    Each argument of the command is assumed to be a pre\-parsed Changelog as
    generated by the command __::doctools::changelog::scan__\. This command
    merges all of them into a single structure, and collapses multiple entries
    for the same date and author into a single entry\. The new structure is
    returned as the result of the command\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[changelog](\.\./\.\./\.\./\.\./index\.md\#changelog),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[emacs](\.\./\.\./\.\./\.\./index\.md\#emacs)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003\-2013 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/cvs.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

[//000000001]: # (doctools::cvs \- Documentation tools)
[//000000002]: # (Generated from file 'cvs\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::cvs\(n\) 1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::cvs \- Processing text in 'cvs log' format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil  
package require doctools::cvs ?1?  

[__::doctools::cvs::scanLog__ *text* *evar* *cvar* *fvar*](#1)  
[__::doctools::cvs::toChangeLog__ *evar* *cvar* *fvar*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides Tcl commands for the processing and reformatting text in
the format generated by the __[cvs log](\.\./\.\./\.\./\.\./index\.md\#cvs\_log)__
command\.

The commands __::doctools::cvs::scanLog__ and
__::doctools::cvs::toChangeLog__ are derived from code found on the
[Tcl'ers Wiki](http://wiki\.tcl\.tk)\. See the references at the end of the
page\.

# <a name='section2'></a>API

  - <a name='1'></a>__::doctools::cvs::scanLog__ *text* *evar* *cvar* *fvar*

    The command takes the *text* and parses it under the assumption that it
    contains a CVS log as generated by __[cvs
    log](\.\./\.\./\.\./\.\./index\.md\#cvs\_log)__\. The resulting information is
    stored in the variables whose names were specified via *evar*, *cvar*,
    and *fvar*\.

    Already existing information in the referenced variables is preserved,
    allowing the caller to merge data from multiple logs into one database\.

      * varname *evar* \(in\)

        Has to refer to a scalar variable\. After the call this variable will
        contain a list of all the entries found in the log file\. An entry is
        identified through the combination of date and author, and can be split
        over multiple physical entries, one per touched file\.

        It should be noted that the entries are listed in the same order as they
        were found in the *text*\. This is not necessarily sorted by date or
        author\.

        Each item in the list is a list containing two elements, the date of the
        entry, and its author, in this order\. The date is formatted as
        __year__/__month__/__day__\.

      * varname *cvar* \(in\)

        Has to refer to an array variable\. Keys are strings containing the date
        and author of log entries, in this order, separated by a comma\.

        The values are lists of comments made for the entry\.

      * varname *fvar* \(in\)

        Has to refer to an array variable\. Keys are strings containing date,
        author of a log entry, and a comment for that entry, in this order,
        separated by commas\.

        The values are lists of the files the entry is touching\.

  - <a name='2'></a>__::doctools::cvs::toChangeLog__ *evar* *cvar* *fvar*

    The three arguments for this command are the same as the last three
    arguments of the command __::doctools::cvs::scanLog__\. This command
    however expects them to be filled with information about one or more logs\.
    It takes this information and converts it into a text in the format of a
    ChangeLog as accepted and generated by
    __[emacs](\.\./\.\./\.\./\.\./index\.md\#emacs)__\. The constructed text is
    returned as the result of the command\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

\[uri, http://wiki\.tcl\.tk/log2changelog

# <a name='keywords'></a>KEYWORDS

[changelog](\.\./\.\./\.\./\.\./index\.md\#changelog),
[cvs](\.\./\.\./\.\./\.\./index\.md\#cvs), [cvs
log](\.\./\.\./\.\./\.\./index\.md\#cvs\_log), [emacs](\.\./\.\./\.\./\.\./index\.md\#emacs),
[log](\.\./\.\./\.\./\.\./index\.md\#log)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/docidx.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410

[//000000001]: # (doctools::idx \- Documentation tools)
[//000000002]: # (Generated from file 'docidx\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx\(n\) 1\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx \- docidx \- Processing indices

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

      - [PACKAGE COMMANDS](#subsection1)

      - [OBJECT COMMAND](#subsection2)

      - [OBJECT METHODS](#subsection3)

      - [OBJECT CONFIGURATION](#subsection4)

      - [FORMAT MAPPING](#subsection5)

  - [PREDEFINED ENGINES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require doctools::idx ?1\.1?  

[__::doctools::idx::new__ *objectName* ?__\-option__ *value* \.\.\.?](#1)  
[__::doctools::idx::help__](#2)  
[__::doctools::idx::search__ *path*](#3)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#4)  
[*objectName* __configure__](#5)  
[*objectName* __configure__ *option*](#6)  
[*objectName* __configure__ __\-option__ *value*\.\.\.](#7)  
[*objectName* __cget__ __\-option__](#8)  
[*objectName* __destroy__](#9)  
[*objectName* __format__ *text*](#10)  
[*objectName* __map__ *symbolic* *actual*](#11)  
[*objectName* __parameters__](#12)  
[*objectName* __search__ *path*](#13)  
[*objectName* __setparam__ *name* *value*](#14)  
[*objectName* __warnings__](#15)  

# <a name='description'></a>DESCRIPTION

This package provides a class for the creation of objects able to process and
convert text written in the *[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* markup
language into any output format X for which a *[formatting
engine](\.\./\.\./\.\./\.\./index\.md\#formatting\_engine)* is available\.

A reader interested in the markup language itself should start with the
*[docidx language introduction](docidx\_lang\_intro\.md)* and proceed from
there to the formal specifications, i\.e\. the *[docidx language
syntax](docidx\_lang\_syntax\.md)* and the *[docidx language command
reference](docidx\_lang\_cmdref\.md)*\.

If on the other hand the reader wishes to write her own formatting engine for
some format, i\.e\. is a *plugin writer* then reading and understanding the
*[docidx plugin API reference](docidx\_plugin\_apiref\.md)* is an absolute
necessity, as that document specifies the interaction between this package and
its plugins, i\.e\. the formatting engines, in detail\.

# <a name='section2'></a>PUBLIC API

## <a name='subsection1'></a>PACKAGE COMMANDS

  - <a name='1'></a>__::doctools::idx::new__ *objectName* ?__\-option__ *value* \.\.\.?

    This command creates a new docidx object with an associated Tcl command
    whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [OBJECT COMMAND](#subsection2) and [OBJECT
    METHODS](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

    The options and their values coming after the name of the object are used to
    set the initial configuration of the object\.

  - <a name='2'></a>__::doctools::idx::help__

    This is a convenience command for applications wishing to provide their user
    with a short description of the available formatting commands and their
    meanings\. It returns a string containing a standard help text\.

  - <a name='3'></a>__::doctools::idx::search__ *path*

    Whenever an object created by this the package has to map the name of a
    format to the file containing the code for its formatting engine it will
    search for the file in a number of directories stored in a list\. See section
    [FORMAT MAPPING](#subsection5) for more explanations\.

    This list not only contains three default directories which are declared by
    the package itself, but is also extensible user of the package\. This command
    is the means to do so\. When given a *path* to an existing and readable
    directory it will prepend that directory to the list of directories to
    search\. This means that the *path* added last is later searched through
    first\.

    An error will be thrown if the *path* either does not exist, is not a
    directory, or is not readable\.

## <a name='subsection2'></a>OBJECT COMMAND

All commands created by __::doctools::idx::new__ have the following general
form and may be used to invoke various operations on their docidx converter
object\.

  - <a name='4'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [OBJECT METHODS](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>OBJECT METHODS

  - <a name='5'></a>*objectName* __configure__

    The method returns a list of all known options and their current values when
    called without any arguments\.

  - <a name='6'></a>*objectName* __configure__ *option*

    The method behaves like the method __cget__ when called with a single
    argument and returns the value of the option specified by said argument\.

  - <a name='7'></a>*objectName* __configure__ __\-option__ *value*\.\.\.

    The method reconfigures the specified __option__s of the object, setting
    them to the associated *value*s, when called with an even number of
    arguments, at least two\.

    The legal options are described in the section [OBJECT
    CONFIGURATION](#subsection4)\.

  - <a name='8'></a>*objectName* __cget__ __\-option__

    This method expects a legal configuration option as argument and will return
    the current value of that option for the object the method was invoked for\.

    The legal configuration options are described in section [OBJECT
    CONFIGURATION](#subsection4)\.

  - <a name='9'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='10'></a>*objectName* __format__ *text*

    This method runs the *text* through the configured formatting engine and
    returns the generated string as its result\. An error will be thrown if no
    __\-format__ was configured for the object\.

    The method assumes that the *text* is in
    *[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* format as specified in the
    companion document *docidx\_fmt*\. Errors will be thrown otherwise\.

  - <a name='11'></a>*objectName* __map__ *symbolic* *actual*

    This methods add one entry to the per\-object mapping from *symbolic*
    filenames to the *actual* uris\. The object just stores this mapping and
    makes it available to the configured formatting engine through the command
    __dt\_fmap__\. This command is described in more detail in the *[docidx
    plugin API reference](docidx\_plugin\_apiref\.md)* which specifies the
    interaction between the objects created by this package and index formatting
    engines\.

  - <a name='12'></a>*objectName* __parameters__

    This method returns a list containing the names of all engine parameters
    provided by the configured formatting engine\. It will return an empty list
    if the object is not yet configured for a specific format\.

  - <a name='13'></a>*objectName* __search__ *path*

    This method extends the per\-object list of paths searched for index
    formatting engines\. See also the command __::doctools::idx::search__ on
    how to extend the per\-package list of paths\. Note that the path entered last
    will be searched first\. For more details see section [FORMAT
    MAPPING](#subsection5)\.

  - <a name='14'></a>*objectName* __setparam__ *name* *value*

    This method sets the *name*d engine parameter to the specified *value*\.
    It will throw an error if the object is either not yet configured for a
    specific format, or if the formatting engine for the configured format does
    not provide a parameter with the given *name*\. The list of parameters
    provided by the configured formatting engine can be retrieved through the
    method __parameters__\.

  - <a name='15'></a>*objectName* __warnings__

    This method returns a list containing all the warnings which were generated
    by the configured formatting engine during the last invocation of the method
    __format__\.

## <a name='subsection4'></a>OBJECT CONFIGURATION

All docidx objects understand the following configuration options:

  - __\-file__ *file*

    The argument of this option is stored in the object and made available to
    the configured formatting engine through the command __dt\_file__\. This
    command is described in more detail in the companion document *docidx\_api*
    which specifies the API between the object and formatting engines\.

    The default value of this option is the empty string\.

    The configured formatting engine should interpret the value as the name of
    the file containing the document which is currently processed\.

  - __\-format__ *text*

    The argument of this option specifies the format to generate and by
    implication the formatting engine to use when converting text via the method
    __format__\. Its default value is the empty string\. The method
    __format__ cannot be used if this option is not set to a valid value at
    least once\.

    The package will immediately try to map the given name to a file containing
    the code for a formatting engine generating that format\. An error will be
    thrown if this mapping fails\. In that case a previously configured format is
    left untouched\.

    The section [FORMAT MAPPING](#subsection5) explains in detail how the
    package and object will look for engine implementations\.

## <a name='subsection5'></a>FORMAT MAPPING

The package and object will perform the following algorithm when trying to map a
format name *foo* to a file containing an implementation of a formatting
engine for *foo*:

  1. If *foo* is the name of an existing file then this file is directly taken
     as the implementation\.

  1. If not, the list of per\-object search paths is searched\. For each directory
     in the list the package checks if that directory contains a file
     "idx\.*foo*"\. If yes, then that file is taken as the implementation\.

     Note that this list of paths is initially empty and can be extended through
     the object method __search__\.

  1. If not, the list of package paths is searched\. For each directory in the
     list the package checks if that directory contains a file "idx\.*foo*"\. If
     yes, then that file is taken as the implementation\.

     This list of paths can be extended through the command
     __::doctools::idx::search__\. It contains initially one path, the
     subdirectory "mpformats" of the directory the package itself is located in\.
     In other words, if the package implementation "docidx\.tcl" is installed in
     the directory "/usr/local/lib/tcllib/doctools" then it will by default
     search the directory "/usr/local/lib/tcllib/doctools/mpformats" for format
     implementations\.

  1. The mapping fails\.

# <a name='section3'></a>PREDEFINED ENGINES

The package provides predefined formatting engines for the following formats\.
Some of the formatting engines support engine parameters\. These will be
explicitly highlighted\.

  - html

    This engine generates HTML markup, for processing by web browsers and the
    like\. This engine supports three parameters:

      * footer

        The value for this parameter has to be valid selfcontained HTML markup
        for the body section of a HTML document\. The default value is the empty
        string\. The value is inserted into the generated output just before the
        __</body>__ tag, closing the body of the generated HTML\.

        This can be used to insert boilerplate footer markup into the generated
        document\.

      * header

        The value for this parameter has to be valid selfcontained HTML markup
        for the body section of a HTML document\. The default value is the empty
        string\. The value is inserted into the generated output just after the
        __<body>__ tag, starting the body of the generated HTML\.

        This can be used to insert boilerplate header markup into the generated
        document\.

      * meta

        The value for this parameter has to be valid selfcontained HTML markup
        for the header section of a HTML document\. The default value is the
        empty string\. The value is inserted into the generated output just after
        the __<head>__ tag, starting the header section of the generated
        HTML\.

        This can be used to insert boilerplate meta data markup into the
        generated document, like references to a stylesheet, standard meta
        keywords, etc\.

  - latex

    This engine generates output suitable for the
    __[latex](\.\./\.\./\.\./\.\./index\.md\#latex)__ text processor coming out of
    the TeX world\.

  - list

    This engine retrieves version, section and title of the manpage from the
    document\. As such it can be used to generate a directory listing for a set
    of manpages\.

  - markdown

    This engine generates *[Markdown](\.\./\.\./\.\./\.\./index\.md\#markdown)*
    markup\.

  - nroff

    This engine generates nroff output, for processing by
    __[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff)__, or __groff__\. The
    result will be standard man pages as they are known in the unix world\.

  - null

    This engine generates no outout at all\. This can be used if one just wants
    to validate some input\.

  - tmml

    This engine generates TMML markup as specified by Joe English\. The Tcl
    Manpage Markup Language is a derivate of XML\.

  - wiki

    This engine generates Wiki markup as understood by Jean Claude Wippler's
    __wikit__ application\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx\_intro](docidx\_intro\.md),
[docidx\_lang\_cmdref](docidx\_lang\_cmdref\.md),
[docidx\_lang\_intro](docidx\_lang\_intro\.md),
[docidx\_lang\_syntax](docidx\_lang\_syntax\.md),
[docidx\_plugin\_apiref](docidx\_plugin\_apiref\.md)

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html), [TMML](\.\./\.\./\.\./\.\./index\.md\#tmml),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation),
[index](\.\./\.\./\.\./\.\./index\.md\#index), [keyword
index](\.\./\.\./\.\./\.\./index\.md\#keyword\_index),
[latex](\.\./\.\./\.\./\.\./index\.md\#latex),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markdown](\.\./\.\./\.\./\.\./index\.md\#markdown),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff), [wiki](\.\./\.\./\.\./\.\./index\.md\#wiki)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/docidx_intro.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

[//000000001]: # (docidx\_intro \- Documentation tools)
[//000000002]: # (Generated from file 'docidx\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (docidx\_intro\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

docidx\_intro \- docidx introduction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [RELATED FORMATS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

*[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* \(short for *documentation tables
of contents*\) stands for a set of related, yet different, entities which are
working together for the easy creation and transformation of keyword\-based
indices for documentation\. These are

  1. A tcl based language for the semantic markup of a keyword index\. Markup is
     represented by Tcl commands\.

  1. A package providing the ability to read and transform texts written in that
     markup language\. It is important to note that the actual transformation of
     the input text is delegated to plugins\.

  1. An API describing the interface between the package above and a plugin\.

Which of the more detailed documents are relevant to the reader of this
introduction depends on their role in the documentation process\.

  1. A *writer* of documentation has to understand the markup language itself\.
     A beginner to docidx should read the more informally written *[docidx
     language introduction](docidx\_lang\_intro\.md)* first\. Having digested
     this the formal *[docidx language syntax](docidx\_lang\_syntax\.md)*
     specification should become understandable\. A writer experienced with
     docidx may only need the *[docidx language command
     reference](docidx\_lang\_cmdref\.md)* from time to time to refresh her
     memory\.

     While a document is written the __dtp__ application can be used to
     validate it, and after completion it also performs the conversion into the
     chosen system of visual markup, be it \*roff, HTML, plain text, wiki, etc\.
     The simpler __[dtplite](\.\./\.\./apps/dtplite\.md)__ application makes
     internal use of docidx when handling directories of documentation,
     automatically generating a proper keyword index for them\.

  1. A *processor* of documentation written in the
     *[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* markup language has to know
     which tools are available for use\.

     The main tool is the aforementioned __dtp__ application provided by
     Tcllib\. The simpler __[dtplite](\.\./\.\./apps/dtplite\.md)__ does not
     expose docidx to the user\. At the bottom level, common to both
     applications, however sits the package __doctoools::idx__, providing
     the basic facilities to read and process files containing text in the
     docidx format\.

  1. At last, but not least, *plugin writers* have to understand the
     interaction between the
     __[doctools::idx](\.\./doctools2idx/idx\_container\.md)__ package and
     its plugins, as described in the *[docidx plugin API
     reference](docidx\_plugin\_apiref\.md)*\.

# <a name='section2'></a>RELATED FORMATS

docidx does not stand alone, it has two companion formats\. These are called
*[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* and
*[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)*, and they are for the markup
of *tables of contents*, and general documentation, respectively\. They are
described in their own sets of documents, starting at the *[doctoc
introduction](doctoc\_intro\.md)* and the *[doctools
introduction](doctools\_intro\.md)*, respectively\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx\_lang\_cmdref](docidx\_lang\_cmdref\.md),
[docidx\_lang\_faq](docidx\_lang\_faq\.md),
[docidx\_lang\_intro](docidx\_lang\_intro\.md),
[docidx\_lang\_syntax](docidx\_lang\_syntax\.md),
[docidx\_plugin\_apiref](docidx\_plugin\_apiref\.md),
[doctoc\_intro](doctoc\_intro\.md),
[doctools::idx](\.\./doctools2idx/idx\_container\.md),
[doctools\_intro](doctools\_intro\.md)

# <a name='keywords'></a>KEYWORDS

[index](\.\./\.\./\.\./\.\./index\.md\#index), [keyword
index](\.\./\.\./\.\./\.\./index\.md\#keyword\_index),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/docidx_lang_cmdref.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

[//000000001]: # (docidx\_lang\_cmdref \- Documentation tools)
[//000000002]: # (Generated from file 'docidx\_lang\_cmdref\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (docidx\_lang\_cmdref\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

docidx\_lang\_cmdref \- docidx language command reference

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ *plaintext*](#1)  
[__include__ *filename*](#2)  
[__index\_begin__ *text* *title*](#3)  
[__index\_end__](#4)  
[__key__ *text*](#5)  
[__lb__](#6)  
[__[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage)__ *file* *text*](#7)  
[__rb__](#8)  
[__[url](\.\./\.\./\.\./\.\./index\.md\#url)__ *url* *label*](#9)  
[__vset__ *varname* *value*](#10)  
[__vset__ *varname*](#11)  

# <a name='description'></a>DESCRIPTION

This document specifies both names and syntax of all the commands which together
are the docidx markup language, version 1\. As this document is intended to be a
reference the commands are listed in alphabetical order, and the descriptions
are relatively short\. A beginner should read the much more informally written
*[docidx language introduction](docidx\_lang\_intro\.md)* first\.

# <a name='section2'></a>Commands

  - <a name='1'></a>__[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ *plaintext*

    Index markup\. The argument text is marked up as a comment standing outside
    of the actual text of the document\. Main use is in free\-form text\.

  - <a name='2'></a>__include__ *filename*

    Templating\. The contents of the named file are interpreted as text written
    in the docidx markup and processed in the place of the include command\. The
    markup in the file has to be self\-contained\. It is not possible for a markup
    command to cross the file boundaries\.

  - <a name='3'></a>__index\_begin__ *text* *title*

    Document structure\. The command to start an index\. The arguments are a label
    for the whole group of documents the index refers to \(*text*\) and the
    overall title text for the index \(*title*\), without markup\.

    The label often is the name of the package \(or extension\) the documents
    belong to\.

  - <a name='4'></a>__index\_end__

    Document structure\. Command to end an index\. Anything in the document coming
    after this command is in error\.

  - <a name='5'></a>__key__ *text*

    Index structure\. This command adds the keyword *text* to the index\.

  - <a name='6'></a>__lb__

    Text\. The command is replaced with a left bracket\. Use in free\-form text\.
    Required to avoid interpretation of a left bracket as the start of a markup
    command\. Its usage is restricted to the arguments of other markup commands\.

  - <a name='7'></a>__[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage)__ *file* *text*

    Index structure\. This command adds an element to the index which refers to a
    document\. The document is specified through the symbolic name *file*\. The
    *text* argument is used to label the reference\.

    Symbolic names are used to preserve the convertibility of this format to any
    output format\. The actual name of the file will be inserted by the chosen
    formatting engine when converting the input\. This will be based on a mapping
    from symbolic to actual names given to the engine\.

  - <a name='8'></a>__rb__

    Text\. The command is replaced with a right bracket\. Use in free\-form text\.
    Required to avoid interpretation of a right bracket as the end of a markup
    command\. Its usage is restricted to the arguments of other commands\.

  - <a name='9'></a>__[url](\.\./\.\./\.\./\.\./index\.md\#url)__ *url* *label*

    Index structure\. This is the second command to add an element to the index\.
    To refer to a document it is not using a symbolic name however, but a
    \(possibly format\-specific\) url describing the exact location of the document
    indexed here\.

  - <a name='10'></a>__vset__ *varname* *value*

    Templating\. In this form the command sets the named document variable to the
    specified *value*\. It does not generate output\. I\.e\. the command is
    replaced by the empty string\.

  - <a name='11'></a>__vset__ *varname*

    Templating\. In this form the command is replaced by the value of the named
    document variable

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx\_intro](docidx\_intro\.md), [docidx\_lang\_faq](docidx\_lang\_faq\.md),
[docidx\_lang\_intro](docidx\_lang\_intro\.md),
[docidx\_lang\_syntax](docidx\_lang\_syntax\.md)

# <a name='keywords'></a>KEYWORDS

[docidx commands](\.\./\.\./\.\./\.\./index\.md\#docidx\_commands), [docidx
language](\.\./\.\./\.\./\.\./index\.md\#docidx\_language), [docidx
markup](\.\./\.\./\.\./\.\./index\.md\#docidx\_markup),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/docidx_lang_faq.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

[//000000001]: # (docidx\_lang\_faq \- Documentation tools)
[//000000002]: # (Generated from file 'docidx\_lang\_faq\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (docidx\_lang\_faq\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

docidx\_lang\_faq \- docidx language faq

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [OVERVIEW](#section2)

      - [What is this document?](#subsection1)

  - [EXAMPLES](#section3)

      - [Where do I find docidx examples?](#subsection2)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

# <a name='section2'></a>OVERVIEW

## <a name='subsection1'></a>What is this document?

This document is currently mainly a placeholder, to be filled with commonly
asked questions about the docidx markup language and companions, and their
answers\.

Please report any questions \(and, if possible, answers\) we should consider for
this document as explained in the section [Bugs, Ideas,
Feedback](#section4) below\.

# <a name='section3'></a>EXAMPLES

## <a name='subsection2'></a>Where do I find docidx examples?

We have no direct examples of documents written using docidx markup\. However the
doctools processor __[dtplite](\.\./\.\./apps/dtplite\.md)__ does generate a
table of contents when processing a set of documents written in doctools markup\.
The intermediate file for it uses docidx markup and is not deleted when
generation completes\. Such files can therefore serve as examples\.

__[dtplite](\.\./\.\./apps/dtplite\.md)__ is distributed as part of Tcllib,
so to get it you need one of

  1. A snapshot of Tcllib\. How to retrieve such a snapshot and the tools
     required for this are described at [Development
     Snapshots](/wiki?name=Development\+Snapshots)

  1. A Tcllib release archive\. They are available at the [home](/home) page\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx\_lang\_cmdref](docidx\_lang\_cmdref\.md),
[docidx\_lang\_intro](docidx\_lang\_intro\.md),
[docidx\_lang\_syntax](docidx\_lang\_syntax\.md)

# <a name='keywords'></a>KEYWORDS

[docidx commands](\.\./\.\./\.\./\.\./index\.md\#docidx\_commands), [docidx
language](\.\./\.\./\.\./\.\./index\.md\#docidx\_language), [docidx
markup](\.\./\.\./\.\./\.\./index\.md\#docidx\_markup), [docidx
syntax](\.\./\.\./\.\./\.\./index\.md\#docidx\_syntax),
[examples](\.\./\.\./\.\./\.\./index\.md\#examples),
[faq](\.\./\.\./\.\./\.\./index\.md\#faq), [markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[semantic markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/docidx_lang_intro.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228

[//000000001]: # (docidx\_lang\_intro \- Documentation tools)
[//000000002]: # (Generated from file 'docidx\_lang\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (docidx\_lang\_intro\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

docidx\_lang\_intro \- docidx language introduction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

      - [Fundamentals](#subsection1)

      - [Basic structure](#subsection2)

      - [Advanced structure](#subsection3)

      - [Escapes](#subsection4)

  - [FURTHER READING](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

This document is an informal introduction to version 1 of the docidx markup
language based on a multitude of examples\. After reading this a writer should be
ready to understand the two parts of the formal specification, i\.e\. the
*[docidx language syntax](docidx\_lang\_syntax\.md)* specification and the
*[docidx language command reference](docidx\_lang\_cmdref\.md)*\.

## <a name='subsection1'></a>Fundamentals

While the *docidx markup language* is quite similar to the *doctools markup
language*, in the broadest terms possible, there is one key difference\. An
index consists essentially only of markup commands, with no plain text
interspersed between them, except for whitespace\.

Each markup command is a Tcl command surrounded by a matching pair of __\[__
and __\]__\. Inside of these delimiters the usual rules for a Tcl command
apply with regard to word quotation, nested commands, continuation lines, etc\.
I\.e\.

    ... [key {markup language}] ...

    ... [manpage thefile \
            {file description}] ...

## <a name='subsection2'></a>Basic structure

The most simple document which can be written in docidx is

    [index_begin GROUPTITLE TITLE]
    [index_end]

Not very useful, but valid\. This also shows us that all docidx documents consist
of only one part where we will list all keys and their references\.

A more useful index will contain at least keywords, or short 'keys', i\.e\. the
phrases which were indexed\. So:

> \[index\_begin GROUPTITLE TITLE\]  
> \[__key markup__\]  
> \[__key \{semantic markup\}\]__\]  
> \[__key \{docidx markup\}__\]  
> \[__key \{docidx language\}__\]  
> \[__key \{docidx commands\}__\]  
> \[index\_end\]

In the above example the command __key__ is used to declare the keyword
phrases we wish to be part of the index\.

However a truly useful index does not only list the keyword phrases, but will
also contain references to documents associated with the keywords\. Here is a
made\-up index for all the manpages in the module
*[base64](\.\./\.\./\.\./\.\./index\.md\#base64)*:

> \[index\_begin tcllib/base64 \{De\- & Encoding\}\]  
> \[key base64\]  
> \[__manpage base64__\]  
> \[key encoding\]  
> \[__manpage base64__\]  
> \[__manpage uuencode__\]  
> \[__manpage yencode__\]  
> \[key uuencode\]  
> \[__manpage uuencode__\]  
> \[key yEnc\]  
> \[__manpage yencode__\]  
> \[key ydecode\]  
> \[__manpage yencode__\]  
> \[key yencode\]  
> \[__manpage yencode__\]  
> \[index\_end\]

In the above example the command
__[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage)__ is used to insert references
to documents, using symbolic file names, with each command belonging to the last
__key__ command coming before it\.

The other command to insert references is
__[url](\.\./\.\./\.\./\.\./index\.md\#url)__\. In contrast to
__[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage)__ it uses explicit \(possibly
format\-specific\) urls to describe the location of the referenced document\. As
such this command is intended for the creation of references to external
documents which could not be handled in any other way\.

## <a name='subsection3'></a>Advanced structure

In all previous examples we fudged a bit regarding the markup actually allowed
to be used before the __index\_begin__ command opening the document\.

Instead of only whitespace the two templating commands __include__ and
__vset__ are also allowed, to enable the writer to either set and/or import
configuration settings relevant to the table of contents\. I\.e\. it is possible to
write

> \[__include FILE__\]  
> \[__vset VAR VALUE__\]  
> \[index\_begin GROUPTITLE TITLE\]  
> \.\.\.  
> \[index\_end\]

Even more important, these two commands are allowed anywhere where a markup
command is allowed, without regard for any other structure\.

> \[index\_begin GROUPTITLE TITLE\]  
> \[__include FILE__\]  
> \[__vset VAR VALUE__\]  
> \.\.\.  
> \[index\_end\]

The only restriction __include__ has to obey is that the contents of the
included file must be valid at the place of the inclusion\. I\.e\. a file included
before __index\_begin__ may contain only the templating commands __vset__
and __include__, a file included after a key may contain only manape or url
references, and other keys, etc\.

## <a name='subsection4'></a>Escapes

Beyond the 6 commands shown so far we have two more available\. However their
function is not the marking up of index structure, but the insertion of
characters, namely __\[__ and __\]__\. These commands, __lb__ and
__rb__ respectively, are required because our use of \[ and \] to bracket
markup commands makes it impossible to directly use \[ and \] within the text\.

Our example of their use are the sources of the last sentence in the previous
paragraph, with some highlighting added\.

> &nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;These commands, \[cmd lb\] and \[cmd lb\] respectively, are required  
> &nbsp;&nbsp;because our use of \[__lb__\] and \[__rb__\] to bracket markup commands makes it  
> &nbsp;&nbsp;impossible to directly use \[__lb__\] and \[__rb__\] within the text\.  
> &nbsp;&nbsp;\.\.\.

# <a name='section2'></a>FURTHER READING

Now that this document has been digested the reader, assumed to be a *writer*
of documentation should be fortified enough to be able to understand the formal
*[docidx language syntax](docidx\_lang\_syntax\.md)* specification as well\.
From here on out the *[docidx language command
reference](docidx\_lang\_cmdref\.md)* will also serve as the detailed
specification and cheat sheet for all available commands and their syntax\.

To be able to validate a document while writing it, it is also recommended to
familiarize oneself with Tclapps' ultra\-configurable __dtp__\.

On the other hand, docidx is perfectly suited for the automatic generation from
doctools documents, and this is the route Tcllib's easy and simple
__[dtplite](\.\./\.\./apps/dtplite\.md)__ goes, creating an index for a set
of documents behind the scenes, without the writer having to do so on their own\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx\_intro](docidx\_intro\.md),
[docidx\_lang\_cmdref](docidx\_lang\_cmdref\.md),
[docidx\_lang\_syntax](docidx\_lang\_syntax\.md)

# <a name='keywords'></a>KEYWORDS

[docidx commands](\.\./\.\./\.\./\.\./index\.md\#docidx\_commands), [docidx
language](\.\./\.\./\.\./\.\./index\.md\#docidx\_language), [docidx
markup](\.\./\.\./\.\./\.\./index\.md\#docidx\_markup), [docidx
syntax](\.\./\.\./\.\./\.\./index\.md\#docidx\_syntax),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/docidx_lang_syntax.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152

[//000000001]: # (docidx\_lang\_syntax \- Documentation tools)
[//000000002]: # (Generated from file 'docidx\_lang\_syntax\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (docidx\_lang\_syntax\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

docidx\_lang\_syntax \- docidx language syntax

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Fundamentals](#section2)

  - [Lexical definitions](#section3)

  - [Syntax](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

This document contains the formal specification of the syntax of the docidx
markup language, version 1 in Backus\-Naur\-Form\. This document is intended to be
a reference, complementing the *[docidx language command
reference](docidx\_lang\_cmdref\.md)*\. A beginner should read the much more
informally written *[docidx language introduction](docidx\_lang\_intro\.md)*
first before trying to understand either this document or the command reference\.

# <a name='section2'></a>Fundamentals

In the broadest terms possible the *docidx markup language* is like SGML and
similar languages\. A document written in this language consists primarily of
markup commands, with text embedded into it at some places\.

Each markup command is a just Tcl command surrounded by a matching pair of
__\[__ and __\]__\. Which commands are available, and their arguments, i\.e\.
syntax is specified in the *[docidx language command
reference](docidx\_lang\_cmdref\.md)*\.

In this document we specify first the lexeme, and then the syntax, i\.e\. how we
can mix text and markup commands with each other\.

# <a name='section3'></a>Lexical definitions

In the syntax rules listed in the next section

  1. <TEXT> stands for all text except markup commands\.

  1. Any XXX stands for the markup command \[xxx\] including its arguments\. Each
     markup command is a Tcl command surrounded by a matching pair of __\[__
     and __\]__\. Inside of these delimiters the usual rules for a Tcl command
     apply with regard to word quotation, nested commands, continuation lines,
     etc\.

  1. <WHITE> stands for all text consisting only of spaces, newlines, tabulators
     and the __[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ markup command\.

# <a name='section4'></a>Syntax

The rules listed here specify only the syntax of docidx documents\. The lexical
level of the language was covered in the previous section\.

Regarding the syntax of the \(E\)BNF itself

  1. The construct \{ X \} stands for zero or more occurrences of X\.

  1. The construct \[ X \] stands for zero or one occurrence of X\.

The syntax:

    index     = defs
                INDEX_BEGIN
                [ contents ]
                INDEX_END
                { <WHITE> }

    defs      = { INCLUDE | VSET | <WHITE> }
    contents  = keyword { keyword }

    keyword   = defs KEY ref { ref }
    ref       = MANPAGE | URL | defs

At last a rule we were unable to capture in the EBNF syntax, as it is about the
arguments of the markup commands, something which is not modeled here\.

  1. The arguments of all markup commands have to be plain text, and/or text
     markup commands, i\.e\. one of

       1) __lb__,

       1) __rb__, or

       1) __vset__ \(1\-argument form\)\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx\_intro](docidx\_intro\.md),
[docidx\_lang\_cmdref](docidx\_lang\_cmdref\.md),
[docidx\_lang\_faq](docidx\_lang\_faq\.md),
[docidx\_lang\_intro](docidx\_lang\_intro\.md)

# <a name='keywords'></a>KEYWORDS

[docidx commands](\.\./\.\./\.\./\.\./index\.md\#docidx\_commands), [docidx
language](\.\./\.\./\.\./\.\./index\.md\#docidx\_language), [docidx
markup](\.\./\.\./\.\./\.\./index\.md\#docidx\_markup), [docidx
syntax](\.\./\.\./\.\./\.\./index\.md\#docidx\_syntax),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/docidx_plugin_apiref.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420

[//000000001]: # (docidx\_plugin\_apiref \- Documentation tools)
[//000000002]: # (Generated from file 'docidx\_plugin\_apiref\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (docidx\_plugin\_apiref\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

docidx\_plugin\_apiref \- docidx plugin API reference

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [OVERVIEW](#section2)

  - [FRONTEND COMMANDS](#section3)

  - [PLUGIN COMMANDS](#section4)

      - [Management commands](#subsection1)

      - [Formatting commands](#subsection2)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__dt\_fmap__ *symfname*](#1)  
[__dt\_format__](#2)  
[__dt\_read__ *file*](#3)  
[__dt\_source__ *file*](#4)  
[__ex\_cappend__ *text*](#5)  
[__ex\_cget__ *varname*](#6)  
[__ex\_cis__ *cname*](#7)  
[__ex\_cname__](#8)  
[__ex\_cpop__ *cname*](#9)  
[__ex\_cpush__ *cname*](#10)  
[__ex\_cset__ *varname* *value*](#11)  
[__ex\_lb__ ?*newbracket*?](#12)  
[__ex\_rb__ ?*newbracket*?](#13)  
[__idx\_initialize__](#14)  
[__idx\_listvariables__](#15)  
[__idx\_numpasses__](#16)  
[__idx\_postprocess__ *text*](#17)  
[__idx\_setup__ *n*](#18)  
[__idx\_shutdown__](#19)  
[__idx\_varset__ *varname* *text*](#20)  
[__fmt\_plain\_text__ *text*](#21)  

# <a name='description'></a>DESCRIPTION

This document is intended for *plugin writers*, i\.e\. developers wishing to
write an index *[formatting
engine](\.\./\.\./\.\./\.\./index\.md\#formatting\_engine)* for some output format X\.

It specifies the interaction between the
__[doctools::idx](\.\./doctools2idx/idx\_container\.md)__ package and its
plugins, i\.e\. the interface any index formatting engine has to comply with\.

This document deals with version 1 of the interface\.

A reader who is on the other hand more interested in the markup language itself
should start with the *[docidx language
introduction](docidx\_lang\_intro\.md)* and proceed from there to the formal
specifications, i\.e\. the *[docidx language syntax](docidx\_lang\_syntax\.md)*
and the *[docidx language command reference](docidx\_lang\_cmdref\.md)*\.

# <a name='section2'></a>OVERVIEW

The API for an index formatting engine consists of two major sections\.

On the one side we have a set of commands through which the plugin is able to
query the frontend\. These commands are provided by the frontend and linked into
the plugin interpreter\. Please see section [FRONTEND COMMANDS](#section3)
for their detailed specification\.

And on the other side the plugin has to provide its own set of commands which
will then be called by the frontend in a specific sequence while processing
input\. They, again, fall into two categories, management and formatting\. Please
see section [PLUGIN COMMANDS](#section4) and its subsections for their
detailed specification\.

# <a name='section3'></a>FRONTEND COMMANDS

This section specifies the set of commands through which a plugin, also known as
an index formatting engine, is able to query the frontend\. These commands are
provided by the frontend and linked into the plugin interpreter\.

I\.e\. an index formatting engine can assume that all of the following commands
are present when any of its own commands \(as specified in section [PLUGIN
COMMANDS](#section4)\) are executed\.

Beyond that it can also assume that it has full access to its own safe
interpreter and thus is not able to damage the other parts of the processor, nor
can it damage the filesystem\. It is however able to either kill or hang the
whole process, by exiting, or running an infinite loop\.

Coming back to the imported commands, all the commands with prefix *dt\_*
provide limited access to specific parts of the frontend, whereas the commands
with prefix *ex\_* provide access to the state of the
__[textutil::expander](\.\./textutil/expander\.md)__ object which does the
main parsing of the input within the frontend\. These commands should not be
except under very special circumstances\.

  - <a name='1'></a>__dt\_fmap__ *symfname*

    Query command\. It returns the actual pathname to use in the output in place
    of the symbolic filename *symfname*\. It will return the unchanged input if
    no mapping was established for *symfname*\.

    The required mappings are established with the method __map__ of a
    frontend, as explained in section __OBJECT METHODS__ of the
    documentation for the package
    __[doctools::idx](\.\./doctools2idx/idx\_container\.md)__\.

  - <a name='2'></a>__dt\_format__

    Query command\. It returns the name of the format associated with the index
    formatting engine\.

  - <a name='3'></a>__dt\_read__ *file*

    Controlled filesystem access\. Returns contents of *file* for whatever use
    desired by the plugin\. Only files which are either in the same directory as
    the file containing the engine, or below it, can be loaded\. Trying to load a
    file outside of this directory causes an error\.

  - <a name='4'></a>__dt\_source__ *file*

    Controlled filesystem access\. This command allows the index formatting
    engine to load additional Tcl code it may need\. Only files which are either
    in the same directory as the file containing the engine, or below it, can be
    loaded\. Trying to load a file outside of this directory causes an error\.

  - <a name='5'></a>__ex\_cappend__ *text*

    Appends a string to the output in the current context\. This command should
    rarely be used by macros or application code\.

  - <a name='6'></a>__ex\_cget__ *varname*

    Retrieves the value of variable *varname*, defined in the current context\.

  - <a name='7'></a>__ex\_cis__ *cname*

    Determines whether or not the name of the current context is *cname*\.

  - <a name='8'></a>__ex\_cname__

    Returns the name of the current context\.

  - <a name='9'></a>__ex\_cpop__ *cname*

    Pops a context from the context stack, returning all accumulated output in
    that context\. The context must be named *cname*, or an error results\.

  - <a name='10'></a>__ex\_cpush__ *cname*

    Pushes a context named *cname* onto the context stack\. The context must be
    popped by __cpop__ before expansion ends or an error results\.

  - <a name='11'></a>__ex\_cset__ *varname* *value*

    Sets variable *varname* to *value* in the current context\.

  - <a name='12'></a>__ex\_lb__ ?*newbracket*?

    Returns the current value of the left macro expansion bracket; this is for
    use as or within a macro, when the bracket needs to be included in the
    output text\. If *newbracket* is specified, it becomes the new bracket, and
    is returned\.

  - <a name='13'></a>__ex\_rb__ ?*newbracket*?

    Returns the current value of the right macro expansion bracket; this is for
    use as or within a macro, when the bracket needs to be included in the
    output text\. If *newbracket* is specified, it becomes the new bracket, and
    is returned\.

# <a name='section4'></a>PLUGIN COMMANDS

The plugin has to provide its own set of commands which will then be called by
the frontend in a specific sequence while processing input\. They fall into two
categories, management and formatting\. Their expected names, signatures, and
responsibilities are specified in the following two subsections\.

## <a name='subsection1'></a>Management commands

The management commands a plugin has to provide are used by the frontend to

  1. initialize and shutdown the plugin

  1. determine the number of passes it has to make over the input

  1. initialize and shutdown each pass

  1. query and initialize engine parameters

After the plugin has been loaded and the frontend commands are established the
commands will be called in the following sequence:

    idx_numpasses -> n
    idx_listvariables -> vars

    idx_varset var1 value1
    idx_varset var2 value2
    ...
    idx_varset varK valueK
    idx_initialize
    idx_setup 1
    ...
    idx_setup 2
    ...
    ...
    idx_setup n
    ...
    idx_postprocess
    idx_shutdown
    ...

I\.e\. first the number of passes and the set of available engine parameters is
established, followed by calls setting the parameters\. That second part is
optional\.

After that the plugin is initialized, the specified number of passes executed,
the final result run through a global post processing step and at last the
plugin is shutdown again\. This can be followed by more conversions, restarting
the sequence at __idx\_varset__\.

In each of the passes, i\.e\. after the calls of __idx\_setup__ the frontend
will process the input and call the formatting commands as markup is
encountered\. This means that the sequence of formatting commands is determined
by the grammar of the docidx markup language, as specified in the *[docidx
language syntax](docidx\_lang\_syntax\.md)* specification\.

A different way of looking at the sequence is:

  - First some basic parameters are determined\.

  - Then everything starting at the first __idx\_varset__ to
    __idx\_shutdown__ forms a *run*, the formatting of a single input\. Each
    run can be followed by more\.

  - Embedded within each run we have one or more *passes*, each starting with
    __idx\_setup__ and going until either the next __idx\_setup__ or
    __idx\_postprocess__ is reached\.

    If more than one pass is required to perform the formatting only the output
    of the last pass is relevant\. The output of all the previous, preparatory
    passes is ignored\.

The commands, their names, signatures, and responsibilities are, in detail:

  - <a name='14'></a>__idx\_initialize__

    *Initialization/Shutdown*\. This command is called at the beginning of
    every conversion run, as the first command of that run\. Note that a run is
    not a pass, but may consist of multiple passes\. It has to initialize the
    general state of the plugin, beyond the initialization done during the load\.
    No return value is expected, and any returned value is ignored\.

  - <a name='15'></a>__idx\_listvariables__

    *Initialization/Shutdown* and *Engine parameters*\. Second command is
    called after the plugin code has been loaded, i\.e\. immediately after
    __idx\_numpasses__\. It has to return a list containing the names of the
    parameters the frontend can set to configure the engine\. This list can be
    empty\.

  - <a name='16'></a>__idx\_numpasses__

    *Initialization/Shutdown* and *Pass management*\. First command called
    after the plugin code has been loaded\. No other command of the engine will
    be called before it\. It has to return the number of passes this engine
    requires to fully process the input document\. This value has to be an
    integer number greater or equal to one\.

  - <a name='17'></a>__idx\_postprocess__ *text*

    *Initialization/Shutdown*\. This command is called immediately after the
    last pass in a run\. Its argument is the result of the conversion generated
    by that pass\. It is provided to allow the engine to perform any global
    modifications of the generated document\. If no post\-processing is required
    for a specific format the command has to just return the argument\.

    Expected to return a value, the final result of formatting the input\.

  - <a name='18'></a>__idx\_setup__ *n*

    *Initialization/Shutdown* and *Pass management*\. This command is called
    at the beginning of each pass over the input in a run\. Its argument is the
    number of the pass which has begun\. Passes are counted from __1__
    upward\. The command has to set up the internal state of the plugin for this
    particular pass\. No return value is expected, and any returned value is
    ignored\.

  - <a name='19'></a>__idx\_shutdown__

    *Initialization/Shutdown*\. This command is called at the end of every
    conversion run\. It is the last command called in a run\. It has to clean up
    of all the run\-specific state in the plugin\. After the call the engine has
    to be in a state which allows the initiation of another run without fear
    that information from the last run is leaked into this new run\. No return
    value is expected, and any returned value is ignored\.

  - <a name='20'></a>__idx\_varset__ *varname* *text*

    *Engine parameters*\. This command is called by the frontend to set an
    engine parameter to a particular value\. The parameter to change is specified
    by *varname*, the value to set in *text*\.

    The command has to throw an error if an unknown *varname* is used\. Only
    the names returned by __idx\_listvariables__ have to be considered as
    known\.

    The values of all engine parameters have to persist between passes and runs\.

## <a name='subsection2'></a>Formatting commands

The formatting commands have to implement the formatting for the output format,
for all the markup commands of the docidx markup language, except __lb__,
__rb__, __vset__, __include__, and
__[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__\. These exceptions are
processed by the frontend and are never seen by the plugin\. In return a command
for the formatting of plain text has to be provided, something which has no
markup in the input at all\.

This means, that each of the five markup commands specified in the *[docidx
language command reference](docidx\_lang\_cmdref\.md)* and outside of the set
of exceptions listed above has an equivalent formatting command which takes the
same arguments as the markup command and whose name is the name of markup
command with the prefix *fmt\_* added to it\.

All commands are expected to format their input in some way per the semantics
specified in the command reference and to return whatever part of this that they
deem necessary as their result, which will be added to the output\.

To avoid essentially duplicating the command reference we do not list any of the
command here and simply refer the reader to the *[docidx language command
reference](docidx\_lang\_cmdref\.md)* for their signature and description\. The
sole exception is the plain text formatter, which has no equivalent markup
command\.

The calling sequence of formatting commands is not as rigid as for the
management commands, but determined by the grammar of the docidx markup
language, as specified in the *[docidx language
syntax](docidx\_lang\_syntax\.md)* specification\.

  - <a name='21'></a>__fmt\_plain\_text__ *text*

    *No associated markup command*\.

    Called by the frontend for any plain text encountered in the input\. It has
    to perform any and all special processing required for plain text\.

    The formatted text is expected as the result of the command, and added to
    the output\. If no special processing is required it has to simply return its
    argument without change\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx\_intro](docidx\_intro\.md),
[docidx\_lang\_cmdref](docidx\_lang\_cmdref\.md),
[docidx\_lang\_faq](docidx\_lang\_faq\.md),
[docidx\_lang\_intro](docidx\_lang\_intro\.md),
[docidx\_lang\_syntax](docidx\_lang\_syntax\.md),
[doctools::idx](\.\./doctools2idx/idx\_container\.md)

# <a name='keywords'></a>KEYWORDS

[formatting engine](\.\./\.\./\.\./\.\./index\.md\#formatting\_engine),
[index](\.\./\.\./\.\./\.\./index\.md\#index), [index
formatter](\.\./\.\./\.\./\.\./index\.md\#index\_formatter),
[keywords](\.\./\.\./\.\./\.\./index\.md\#keywords),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctoc.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410

[//000000001]: # (doctools::toc \- Documentation tools)
[//000000002]: # (Generated from file 'doctoc\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc\(n\) 1\.2 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc \- doctoc \- Processing tables of contents

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

      - [PACKAGE COMMANDS](#subsection1)

      - [OBJECT COMMAND](#subsection2)

      - [OBJECT METHODS](#subsection3)

      - [OBJECT CONFIGURATION](#subsection4)

      - [FORMAT MAPPING](#subsection5)

  - [PREDEFINED ENGINES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require doctools::toc ?1\.2?  

[__::doctools::toc::new__ *objectName* ?__\-option__ *value* \.\.\.?](#1)  
[__::doctools::toc::help__](#2)  
[__::doctools::toc::search__ *path*](#3)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#4)  
[*objectName* __configure__](#5)  
[*objectName* __configure__ *option*](#6)  
[*objectName* __configure__ __\-option__ *value*\.\.\.](#7)  
[*objectName* __cget__ __\-option__](#8)  
[*objectName* __destroy__](#9)  
[*objectName* __format__ *text*](#10)  
[*objectName* __map__ *symbolic* *actual*](#11)  
[*objectName* __parameters__](#12)  
[*objectName* __search__ *path*](#13)  
[*objectName* __setparam__ *name* *value*](#14)  
[*objectName* __warnings__](#15)  

# <a name='description'></a>DESCRIPTION

This package provides a class for the creation of objects able to process and
convert text written in the *[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* markup
language into any output format X for which a *[formatting
engine](\.\./\.\./\.\./\.\./index\.md\#formatting\_engine)* is available\.

A reader interested in the markup language itself should start with the
*[doctoc language introduction](doctoc\_lang\_intro\.md)* and proceed from
there to the formal specifications, i\.e\. the *[doctoc language
syntax](doctoc\_lang\_syntax\.md)* and the *[doctoc language command
reference](doctoc\_lang\_cmdref\.md)*\.

If on the other hand the reader wishes to write her own formatting engine for
some format, i\.e\. is a *plugin writer* then reading and understanding the
*[doctoc plugin API reference](doctoc\_plugin\_apiref\.md)* is an absolute
necessity, as that document specifies the interaction between this package and
its plugins, i\.e\. the formatting engines, in detail\.

# <a name='section2'></a>PUBLIC API

## <a name='subsection1'></a>PACKAGE COMMANDS

  - <a name='1'></a>__::doctools::toc::new__ *objectName* ?__\-option__ *value* \.\.\.?

    This command creates a new doctoc object with an associated Tcl command
    whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [OBJECT COMMAND](#subsection2) and [OBJECT
    METHODS](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

    The options and their values coming after the name of the object are used to
    set the initial configuration of the object\.

  - <a name='2'></a>__::doctools::toc::help__

    This is a convenience command for applications wishing to provide their user
    with a short description of the available formatting commands and their
    meanings\. It returns a string containing a standard help text\.

  - <a name='3'></a>__::doctools::toc::search__ *path*

    Whenever an object created by this the package has to map the name of a
    format to the file containing the code for its formatting engine it will
    search for the file in a number of directories stored in a list\. See section
    [FORMAT MAPPING](#subsection5) for more explanations\.

    This list not only contains three default directories which are declared by
    the package itself, but is also extensible user of the package\. This command
    is the means to do so\. When given a *path* to an existing and readable
    directory it will prepend that directory to the list of directories to
    search\. This means that the *path* added last is later searched through
    first\.

    An error will be thrown if the *path* either does not exist, is not a
    directory, or is not readable\.

## <a name='subsection2'></a>OBJECT COMMAND

All commands created by __::doctools::toc::new__ have the following general
form and may be used to invoke various operations on their doctoc converter
object\.

  - <a name='4'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [OBJECT METHODS](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>OBJECT METHODS

  - <a name='5'></a>*objectName* __configure__

    The method returns a list of all known options and their current values when
    called without any arguments\.

  - <a name='6'></a>*objectName* __configure__ *option*

    The method behaves like the method __cget__ when called with a single
    argument and returns the value of the option specified by said argument\.

  - <a name='7'></a>*objectName* __configure__ __\-option__ *value*\.\.\.

    The method reconfigures the specified __option__s of the object, setting
    them to the associated *value*s, when called with an even number of
    arguments, at least two\.

    The legal options are described in the section [OBJECT
    CONFIGURATION](#subsection4)\.

  - <a name='8'></a>*objectName* __cget__ __\-option__

    This method expects a legal configuration option as argument and will return
    the current value of that option for the object the method was invoked for\.

    The legal configuration options are described in section [OBJECT
    CONFIGURATION](#subsection4)\.

  - <a name='9'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='10'></a>*objectName* __format__ *text*

    This method runs the *text* through the configured formatting engine and
    returns the generated string as its result\. An error will be thrown if no
    __\-format__ was configured for the object\.

    The method assumes that the *text* is in
    *[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* format as specified in the
    companion document *doctoc\_fmt*\. Errors will be thrown otherwise\.

  - <a name='11'></a>*objectName* __map__ *symbolic* *actual*

    This methods add one entry to the per\-object mapping from *symbolic*
    filenames to the *actual* uris\. The object just stores this mapping and
    makes it available to the configured formatting engine through the command
    __dt\_fmap__\. This command is described in more detail in the *[doctoc
    plugin API reference](doctoc\_plugin\_apiref\.md)* which specifies the
    interaction between the objects created by this package and toc formatting
    engines\.

  - <a name='12'></a>*objectName* __parameters__

    This method returns a list containing the names of all engine parameters
    provided by the configured formatting engine\. It will return an empty list
    if the object is not yet configured for a specific format\.

  - <a name='13'></a>*objectName* __search__ *path*

    This method extends the per\-object list of paths searched for toc formatting
    engines\. See also the command __::doctools::toc::search__ on how to
    extend the per\-package list of paths\. Note that the path entered last will
    be searched first\. For more details see section [FORMAT
    MAPPING](#subsection5)\.

  - <a name='14'></a>*objectName* __setparam__ *name* *value*

    This method sets the *name*d engine parameter to the specified *value*\.
    It will throw an error if the object is either not yet configured for a
    specific format, or if the formatting engine for the configured format does
    not provide a parameter with the given *name*\. The list of parameters
    provided by the configured formatting engine can be retrieved through the
    method __parameters__\.

  - <a name='15'></a>*objectName* __warnings__

    This method returns a list containing all the warnings which were generated
    by the configured formatting engine during the last invocation of the method
    __format__\.

## <a name='subsection4'></a>OBJECT CONFIGURATION

All doctoc objects understand the following configuration options:

  - __\-file__ *file*

    The argument of this option is stored in the object and made available to
    the configured formatting engine through the command __dt\_file__\. This
    command is described in more detail in the companion document *doctoc\_api*
    which specifies the API between the object and formatting engines\.

    The default value of this option is the empty string\.

    The configured formatting engine should interpret the value as the name of
    the file containing the document which is currently processed\.

  - __\-format__ *text*

    The argument of this option specifies the format to generate and by
    implication the formatting engine to use when converting text via the method
    __format__\. Its default value is the empty string\. The method
    __format__ cannot be used if this option is not set to a valid value at
    least once\.

    The package will immediately try to map the given name to a file containing
    the code for a formatting engine generating that format\. An error will be
    thrown if this mapping fails\. In that case a previously configured format is
    left untouched\.

    The section [FORMAT MAPPING](#subsection5) explains in detail how the
    package and object will look for engine implementations\.

## <a name='subsection5'></a>FORMAT MAPPING

The package and object will perform the following algorithm when trying to map a
format name *foo* to a file containing an implementation of a formatting
engine for *foo*:

  1. If *foo* is the name of an existing file then this file is directly taken
     as the implementation\.

  1. If not, the list of per\-object search paths is searched\. For each directory
     in the list the package checks if that directory contains a file
     "toc\.*foo*"\. If yes, then that file is taken as the implementation\.

     Note that this list of paths is initially empty and can be extended through
     the object method __search__\.

  1. If not, the list of package paths is searched\. For each directory in the
     list the package checks if that directory contains a file "toc\.*foo*"\. If
     yes, then that file is taken as the implementation\.

     This list of paths can be extended through the command
     __::doctools::toc::search__\. It contains initially one path, the
     subdirectory "mpformats" of the directory the package itself is located in\.
     In other words, if the package implementation "doctoc\.tcl" is installed in
     the directory "/usr/local/lib/tcllib/doctools" then it will by default
     search the directory "/usr/local/lib/tcllib/doctools/mpformats" for format
     implementations\.

  1. The mapping fails\.

# <a name='section3'></a>PREDEFINED ENGINES

The package provides predefined formatting engines for the following formats\.
Some of the formatting engines support engine parameters\. These will be
explicitly highlighted\.

  - html

    This engine generates HTML markup, for processing by web browsers and the
    like\. This engine supports three parameters:

      * footer

        The value for this parameter has to be valid selfcontained HTML markup
        for the body section of a HTML document\. The default value is the empty
        string\. The value is inserted into the generated output just before the
        __</body>__ tag, closing the body of the generated HTML\.

        This can be used to insert boilerplate footer markup into the generated
        document\.

      * header

        The value for this parameter has to be valid selfcontained HTML markup
        for the body section of a HTML document\. The default value is the empty
        string\. The value is inserted into the generated output just after the
        __<body>__ tag, starting the body of the generated HTML\.

        This can be used to insert boilerplate header markup into the generated
        document\.

      * meta

        The value for this parameter has to be valid selfcontained HTML markup
        for the header section of a HTML document\. The default value is the
        empty string\. The value is inserted into the generated output just after
        the __<head>__ tag, starting the header section of the generated
        HTML\.

        This can be used to insert boilerplate meta data markup into the
        generated document, like references to a stylesheet, standard meta
        keywords, etc\.

  - latex

    This engine generates output suitable for the
    __[latex](\.\./\.\./\.\./\.\./index\.md\#latex)__ text processor coming out of
    the TeX world\.

  - list

    This engine retrieves version, section and title of the manpage from the
    document\. As such it can be used to generate a directory listing for a set
    of manpages\.

  - markdown

    This engine generates *[Markdown](\.\./\.\./\.\./\.\./index\.md\#markdown)*
    markup\.

  - nroff

    This engine generates nroff output, for processing by
    __[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff)__, or __groff__\. The
    result will be standard man pages as they are known in the unix world\.

  - null

    This engine generates no outout at all\. This can be used if one just wants
    to validate some input\.

  - tmml

    This engine generates TMML markup as specified by Joe English\. The Tcl
    Manpage Markup Language is a derivate of XML\.

  - wiki

    This engine generates Wiki markup as understood by Jean Claude Wippler's
    __wikit__ application\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctoc\_intro](doctoc\_intro\.md),
[doctoc\_lang\_cmdref](doctoc\_lang\_cmdref\.md),
[doctoc\_lang\_intro](doctoc\_lang\_intro\.md),
[doctoc\_lang\_syntax](doctoc\_lang\_syntax\.md),
[doctoc\_plugin\_apiref](doctoc\_plugin\_apiref\.md)

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html), [TMML](\.\./\.\./\.\./\.\./index\.md\#tmml),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation),
[latex](\.\./\.\./\.\./\.\./index\.md\#latex),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markdown](\.\./\.\./\.\./\.\./index\.md\#markdown),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc), [wiki](\.\./\.\./\.\./\.\./index\.md\#wiki)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctoc_intro.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

[//000000001]: # (doctoc\_intro \- Documentation tools)
[//000000002]: # (Generated from file 'doctoc\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctoc\_intro\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctoc\_intro \- doctoc introduction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [RELATED FORMATS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

*[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* \(short for *documentation tables
of contents*\) stands for a set of related, yet different, entities which are
working together for the easy creation and transformation of tables of contents
for documentation\. These are

  1. A tcl based language for the semantic markup of a table of contents\. Markup
     is represented by Tcl commands\.

  1. A package providing the ability to read and transform texts written in that
     markup language\. It is important to note that the actual transformation of
     the input text is delegated to plugins\.

  1. An API describing the interface between the package above and a plugin\.

Which of the more detailed documents are relevant to the reader of this
introduction depends on their role in the documentation process\.

  1. A *writer* of documentation has to understand the markup language itself\.
     A beginner to doctoc should read the more informally written *[doctoc
     language introduction](doctoc\_lang\_intro\.md)* first\. Having digested
     this the formal *[doctoc language syntax](doctoc\_lang\_syntax\.md)*
     specification should become understandable\. A writer experienced with
     doctoc may only need the *[doctoc language command
     reference](doctoc\_lang\_cmdref\.md)* from time to time to refresh her
     memory\.

     While a document is written the __dtp__ application can be used to
     validate it, and after completion it also performs the conversion into the
     chosen system of visual markup, be it \*roff, HTML, plain text, wiki, etc\.
     The simpler __[dtplite](\.\./\.\./apps/dtplite\.md)__ application makes
     internal use of doctoc when handling directories of documentation,
     automatically generating a proper table of contents for them\.

  1. A *processor* of documentation written in the
     *[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* markup language has to know
     which tools are available for use\.

     The main tool is the aforementioned __dtp__ application provided by
     Tcllib\. The simpler __[dtplite](\.\./\.\./apps/dtplite\.md)__ does not
     expose doctoc to the user\. At the bottom level, common to both
     applications, however sits the package __doctoools::toc__, providing
     the basic facilities to read and process files containing text in the
     doctoc format\.

  1. At last, but not least, *plugin writers* have to understand the
     interaction between the __[doctools::toc](doctoc\.md)__ package and
     its plugins, as described in the *[doctoc plugin API
     reference](doctoc\_plugin\_apiref\.md)*\.

# <a name='section2'></a>RELATED FORMATS

doctoc does not stand alone, it has two companion formats\. These are called
*[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* and
*[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)*, and they are for the markup
of *keyword indices*, and general documentation, respectively\. They are
described in their own sets of documents, starting at the *[docidx
introduction](docidx\_intro\.md)* and the *[doctools
introduction](doctools\_intro\.md)*, respectively\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx\_intro](docidx\_intro\.md),
[doctoc\_lang\_cmdref](doctoc\_lang\_cmdref\.md),
[doctoc\_lang\_faq](doctoc\_lang\_faq\.md),
[doctoc\_lang\_intro](doctoc\_lang\_intro\.md),
[doctoc\_lang\_syntax](doctoc\_lang\_syntax\.md),
[doctoc\_plugin\_apiref](doctoc\_plugin\_apiref\.md),
[doctools::toc](doctoc\.md), [doctools\_intro](doctools\_intro\.md)

# <a name='keywords'></a>KEYWORDS

[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctoc_lang_cmdref.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

[//000000001]: # (doctoc\_lang\_cmdref \- Documentation tools)
[//000000002]: # (Generated from file 'doctoc\_lang\_cmdref\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctoc\_lang\_cmdref\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctoc\_lang\_cmdref \- doctoc language command reference

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ *plaintext*](#1)  
[__division\_end__](#2)  
[__division\_start__ *text* ?*symfile*?](#3)  
[__include__ *filename*](#4)  
[__item__ *file* *text* *desc*](#5)  
[__lb__](#6)  
[__rb__](#7)  
[__toc\_begin__ *text* *title*](#8)  
[__toc\_end__](#9)  
[__vset__ *varname* *value*](#10)  
[__vset__ *varname*](#11)  

# <a name='description'></a>DESCRIPTION

This document specifies both names and syntax of all the commands which together
are the doctoc markup language, version 1\. As this document is intended to be a
reference the commands are listed in alphabetical order, and the descriptions
are relatively short\. A beginner should read the much more informally written
*[doctoc language introduction](doctoc\_lang\_intro\.md)* first\.

# <a name='section2'></a>Commands

  - <a name='1'></a>__[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ *plaintext*

    Toc markup\. The argument text is marked up as a comment standing outside of
    the actual text of the document\. Main use is in free\-form text\.

  - <a name='2'></a>__division\_end__

    Toc structure\. This command closes the division opened by the last
    __division\_begin__ command coming before it, and not yet closed\.

  - <a name='3'></a>__division\_start__ *text* ?*symfile*?

    Toc structure\. This command opens a division in the table of contents\. Its
    counterpart is __division\_end__\. Together they allow a user to give a
    table of contents additional structure\.

    The title of the new division is provided by the argument *text*\.

    If the symbolic filename *symfile* is present then the section title
    should link to the referenced document, if links are supported by the output
    format\.

  - <a name='4'></a>__include__ *filename*

    Templating\. The contents of the named file are interpreted as text written
    in the doctoc markup and processed in the place of the include command\. The
    markup in the file has to be self\-contained\. It is not possible for a markup
    command to cross the file boundaries\.

  - <a name='5'></a>__item__ *file* *text* *desc*

    Toc structure\. This command adds an individual element to the table of
    contents\. Each such element refers to a document\. The document is specified
    through the symbolic name *file*\. The *text* argument is used to label
    the reference, whereas the *desc* provides a short descriptive text of
    that document\.

    The symbolic names are used to preserve the convertibility of this format to
    any output format\. The actual name of the file will be inserted by the
    chosen formatting engine when converting the input\. This will be based on a
    mapping from symbolic to actual names given to the engine\.

  - <a name='6'></a>__lb__

    Text\. The command is replaced with a left bracket\. Use in free\-form text\.
    Required to avoid interpretation of a left bracket as the start of a markup
    command\. Its usage is restricted to the arguments of other markup commands\.

  - <a name='7'></a>__rb__

    Text\. The command is replaced with a right bracket\. Use in free\-form text\.
    Required to avoid interpretation of a right bracket as the end of a markup
    command\. Its usage is restricted to the arguments of other commands\.

  - <a name='8'></a>__toc\_begin__ *text* *title*

    Document structure\. The command to start a table of contents\. The arguments
    are a label for the whole group of documents the index refers to \(*text*\)
    and the overall title text for the index \(*title*\), without markup\.

    The label often is the name of the package \(or extension\) the documents
    belong to\.

  - <a name='9'></a>__toc\_end__

    Document structure\. Command to end a table of contents\. Anything in the
    document coming after this command is in error\.

  - <a name='10'></a>__vset__ *varname* *value*

    Templating\. In this form the command sets the named document variable to the
    specified *value*\. It does not generate output\. I\.e\. the command is
    replaced by the empty string\.

  - <a name='11'></a>__vset__ *varname*

    Templating\. In this form the command is replaced by the value of the named
    document variable

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctoc\_intro](doctoc\_intro\.md), [doctoc\_lang\_faq](doctoc\_lang\_faq\.md),
[doctoc\_lang\_intro](doctoc\_lang\_intro\.md),
[doctoc\_lang\_syntax](doctoc\_lang\_syntax\.md)

# <a name='keywords'></a>KEYWORDS

[doctoc commands](\.\./\.\./\.\./\.\./index\.md\#doctoc\_commands), [doctoc
language](\.\./\.\./\.\./\.\./index\.md\#doctoc\_language), [doctoc
markup](\.\./\.\./\.\./\.\./index\.md\#doctoc\_markup),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctoc_lang_faq.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

[//000000001]: # (doctoc\_lang\_faq \- Documentation tools)
[//000000002]: # (Generated from file 'doctoc\_lang\_faq\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctoc\_lang\_faq\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctoc\_lang\_faq \- doctoc language faq

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [OVERVIEW](#section2)

      - [What is this document?](#subsection1)

  - [EXAMPLES](#section3)

      - [Where do I find doctoc examples?](#subsection2)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

# <a name='section2'></a>OVERVIEW

## <a name='subsection1'></a>What is this document?

This document is currently mainly a placeholder, to be filled with commonly
asked questions about the doctoc markup language and companions, and their
answers\.

Please report any questions \(and, if possible, answers\) we should consider for
this document as explained in the section [Bugs, Ideas,
Feedback](#section4) below\.

# <a name='section3'></a>EXAMPLES

## <a name='subsection2'></a>Where do I find doctoc examples?

We have no direct examples of documents written using doctoc markup\. However the
doctools processor __[dtplite](\.\./\.\./apps/dtplite\.md)__ does generate a
table of contents when processing a set of documents written in doctools markup\.
The intermediate file for it uses doctoc markup and is not deleted when
generation completes\. Such files can therefore serve as examples\.

__[dtplite](\.\./\.\./apps/dtplite\.md)__ is distributed as part of Tcllib,
so to get it you need one of

  1. A snapshot of Tcllib\. How to retrieve such a snapshot and the tools
     required for this are described at [Development
     Snapshots](/wiki?name=Development\+Snapshots)

  1. A Tcllib release archive\. They are available at the [home](/home) page\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctoc\_lang\_cmdref](doctoc\_lang\_cmdref\.md),
[doctoc\_lang\_intro](doctoc\_lang\_intro\.md),
[doctoc\_lang\_syntax](doctoc\_lang\_syntax\.md)

# <a name='keywords'></a>KEYWORDS

[doctoc commands](\.\./\.\./\.\./\.\./index\.md\#doctoc\_commands), [doctoc
language](\.\./\.\./\.\./\.\./index\.md\#doctoc\_language), [doctoc
markup](\.\./\.\./\.\./\.\./index\.md\#doctoc\_markup), [doctoc
syntax](\.\./\.\./\.\./\.\./index\.md\#doctoc\_syntax),
[examples](\.\./\.\./\.\./\.\./index\.md\#examples),
[faq](\.\./\.\./\.\./\.\./index\.md\#faq), [markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[semantic markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctoc_lang_intro.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299

[//000000001]: # (doctoc\_lang\_intro \- Documentation tools)
[//000000002]: # (Generated from file 'doctoc\_lang\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctoc\_lang\_intro\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctoc\_lang\_intro \- doctoc language introduction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

      - [Fundamentals](#subsection1)

      - [Basic structure](#subsection2)

      - [Items](#subsection3)

      - [Divisions](#subsection4)

      - [Advanced structure](#subsection5)

      - [Escapes](#subsection6)

  - [FURTHER READING](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

This document is an informal introduction to version 1\.1 of the doctoc markup
language based on a multitude of examples\. After reading this a writer should be
ready to understand the two parts of the formal specification, i\.e\. the
*[doctoc language syntax](doctoc\_lang\_syntax\.md)* specification and the
*[doctoc language command reference](doctoc\_lang\_cmdref\.md)*\.

## <a name='subsection1'></a>Fundamentals

While the *doctoc markup language* is quite similar to the *doctools markup
language*, in the broadest terms possible, there is one key difference\. A table
of contents consists essentially only of markup commands, with no plain text
interspersed between them, except for whitespace\.

Each markup command is a Tcl command surrounded by a matching pair of __\[__
and __\]__\. Inside of these delimiters the usual rules for a Tcl command
apply with regard to word quotation, nested commands, continuation lines, etc\.
I\.e\.

    ... [division_start {Appendix 1}] ...

    ... [item thefile \
            label {file description}] ...

## <a name='subsection2'></a>Basic structure

The most simple document which can be written in doctoc is

    [toc_begin GROUPTITLE TITLE]
    [toc_end]

This also shows us that all doctoc documents consist of only one part where we
will list *items* and *divisions*\.

The user is free to mix these as she sees fit\. This is a change from version 1
of the language, which did not allow this mixing, but only the use of either a
series of items or a series of divisions\.

We will discuss the commands for each of these two possibilities in the next
sections\.

## <a name='subsection3'></a>Items

Use the command __item__ to put an *item* into a table of contents\. This
is essentially a reference to a section, subsection, etc\. in the document, or
set of documents, the table of contents is for\. The command takes three
arguments, a symbolic name for the file the item is for and two text to label
the item and describe the referenced section\.

Symbolic names are used to preserve the convertibility of this format to any
output format\. The actual name of any file will be inserted by the chosen
formatting engine when converting the input, based on a mapping from symbolic to
actual names given to the engine\.

Here a made up example for a table of contents of this document:

> \[toc\_begin Doctoc \{Language Introduction\}\]  
> \[__item 1 DESCRIPTION__\]  
> \[__item 1\.1 \{Basic structure\}__\]  
> \[__item 1\.2 Items__\]  
> \[__item 1\.3 Divisions__\]  
> \[__item 2 \{FURTHER READING\}__\]  
> \[toc\_end\]

## <a name='subsection4'></a>Divisions

One thing of notice in the last example in the previous section is that the
referenced sections actually had a nested structure, something which was
expressed in the item labels, by using a common prefix for all the sections
nested under section 1\.

This kind of structure can be made more explicit in the doctoc language by using
divisions\. Instead of using a series of plain items we use a series of divisions
for the major references, and then place the nested items inside of these\.

Of course, instead of the nested items we can again use divisions and thus nest
arbitrarily deep\.

A division is marked by two commands instead of one, one to start it, the other
to close the last opened division\. They are:

  - __division\_start__

    This command opens a new division\. It takes one or two arguments, the title
    of the division, and the symbolic name of the file it refers to\. The latter
    is optional\. If the symbolic filename is present then the section title
    should link to the referenced document, if links are supported by the output
    format\.

  - __division\_end__

    This command closes the last opened and not yet closed division\.

Using this we can recast the last example like this

> \[toc\_begin Doctoc \{Language Introduction\}\]  
> \[__division\_start DESCRIPTION__\]  
> \[item 1 \{Basic structure\}\]  
> \[item 2 Items\]  
> \[item 3 Divisions\]  
> \[__division\_end__\]  
> \[__division\_start \{FURTHER READING\}__\]  
> \[__division\_end__\]  
> \[toc\_end\]

Or, to demonstrate deeper nesting

> \[toc\_begin Doctoc \{Language Introduction\}\]  
> \[__division\_start DESCRIPTION__\]  
> \[__division\_start \{Basic structure\}__\]  
> \[item 1 Do\]  
> \[item 2 Re\]  
> \[__division\_end__\]  
> \[__division\_start Items__\]  
> \[item a Fi\]  
> \[item b Fo\]  
> \[item c Fa\]  
> \[__division\_end__\]  
> \[__division\_start Divisions__\]  
> \[item 1 Sub\]  
> \[item 1 Zero\]  
> \[__division\_end__\]  
> \[__division\_end__\]  
> \[__division\_start \{FURTHER READING\}__\]  
> \[__division\_end__\]  
> \[toc\_end\]

And do not forget, it is possible to freely mix items and divisions, and to have
empty divisions\.

> \[toc\_begin Doctoc \{Language Introduction\}\]  
> \[item 1 Do\]  
> \[__division\_start DESCRIPTION__\]  
> \[__division\_start \{Basic structure\}__\]  
> \[item 2 Re\]  
> \[__division\_end__\]  
> \[item a Fi\]  
> \[__division\_start Items__\]  
> \[item b Fo\]  
> \[item c Fa\]  
> \[__division\_end__\]  
> \[__division\_start Divisions__\]  
> \[__division\_end__\]  
> \[__division\_end__\]  
> \[__division\_start \{FURTHER READING\}__\]  
> \[__division\_end__\]  
> \[toc\_end\]

## <a name='subsection5'></a>Advanced structure

In all previous examples we fudged a bit regarding the markup actually allowed
to be used before the __toc\_begin__ command opening the document\.

Instead of only whitespace the two templating commands __include__ and
__vset__ are also allowed, to enable the writer to either set and/or import
configuration settings relevant to the table of contents\. I\.e\. it is possible to
write

> \[__include FILE__\]  
> \[__vset VAR VALUE__\]  
> \[toc\_begin GROUPTITLE TITLE\]  
> \.\.\.  
> \[toc\_end\]

Even more important, these two commands are allowed anywhere where a markup
command is allowed, without regard for any other structure\.

> \[toc\_begin GROUPTITLE TITLE\]  
> \[__include FILE__\]  
> \[__vset VAR VALUE__\]  
> \.\.\.  
> \[toc\_end\]

The only restriction __include__ has to obey is that the contents of the
included file must be valid at the place of the inclusion\. I\.e\. a file included
before __toc\_begin__ may contain only the templating commands __vset__
and __include__, a file included in a division may contain only items or
divisions commands, etc\.

## <a name='subsection6'></a>Escapes

Beyond the 6 commands shown so far we have two more available\. However their
function is not the marking up of toc structure, but the insertion of
characters, namely __\[__ and __\]__\. These commands, __lb__ and
__rb__ respectively, are required because our use of \[ and \] to bracket
markup commands makes it impossible to directly use \[ and \] within the text\.

Our example of their use are the sources of the last sentence in the previous
paragraph, with some highlighting added\.

> &nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;These commands, \[cmd lb\] and \[cmd lb\] respectively, are required  
> &nbsp;&nbsp;because our use of \[__lb__\] and \[__rb__\] to bracket markup commands makes it  
> &nbsp;&nbsp;impossible to directly use \[__lb__\] and \[__rb__\] within the text\.  
> &nbsp;&nbsp;\.\.\.

# <a name='section2'></a>FURTHER READING

Now that this document has been digested the reader, assumed to be a *writer*
of documentation should be fortified enough to be able to understand the formal
*[doctoc language syntax](doctoc\_lang\_syntax\.md)* specification as well\.
From here on out the *[doctoc language command
reference](doctoc\_lang\_cmdref\.md)* will also serve as the detailed
specification and cheat sheet for all available commands and their syntax\.

To be able to validate a document while writing it, it is also recommended to
familiarize oneself with Tclapps' ultra\-configurable __dtp__\.

On the other hand, doctoc is perfectly suited for the automatic generation from
doctools documents, and this is the route Tcllib's easy and simple
__[dtplite](\.\./\.\./apps/dtplite\.md)__ goes, creating a table of contents
for a set of documents behind the scenes, without the writer having to do so on
their own\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctoc\_intro](doctoc\_intro\.md),
[doctoc\_lang\_cmdref](doctoc\_lang\_cmdref\.md),
[doctoc\_lang\_syntax](doctoc\_lang\_syntax\.md)

# <a name='keywords'></a>KEYWORDS

[doctoc commands](\.\./\.\./\.\./\.\./index\.md\#doctoc\_commands), [doctoc
language](\.\./\.\./\.\./\.\./index\.md\#doctoc\_language), [doctoc
markup](\.\./\.\./\.\./\.\./index\.md\#doctoc\_markup), [doctoc
syntax](\.\./\.\./\.\./\.\./index\.md\#doctoc\_syntax),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctoc_lang_syntax.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

[//000000001]: # (doctoc\_lang\_syntax \- Documentation tools)
[//000000002]: # (Generated from file 'doctoc\_lang\_syntax\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctoc\_lang\_syntax\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctoc\_lang\_syntax \- doctoc language syntax

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Fundamentals](#section2)

  - [Lexical definitions](#section3)

  - [Syntax](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

This document contains the formal specification of the syntax of the doctoc
markup language, version 1\.1 in Backus\-Naur\-Form\. This document is intended to
be a reference, complementing the *[doctoc language command
reference](doctoc\_lang\_cmdref\.md)*\. A beginner should read the much more
informally written *[doctoc language introduction](doctoc\_lang\_intro\.md)*
first before trying to understand either this document or the command reference\.

# <a name='section2'></a>Fundamentals

In the broadest terms possible the *doctoc markup language* is like SGML and
similar languages\. A document written in this language consists primarily of
markup commands, with text embedded into it at some places\.

Each markup command is a just Tcl command surrounded by a matching pair of
__\[__ and __\]__\. Which commands are available, and their arguments, i\.e\.
syntax is specified in the *[doctoc language command
reference](doctoc\_lang\_cmdref\.md)*\.

In this document we specify first the lexeme, and then the syntax, i\.e\. how we
can mix text and markup commands with each other\.

# <a name='section3'></a>Lexical definitions

In the syntax rules listed in the next section

  1. <TEXT> stands for all text except markup commands\.

  1. Any XXX stands for the markup command \[xxx\] including its arguments\. Each
     markup command is a Tcl command surrounded by a matching pair of __\[__
     and __\]__\. Inside of these delimiters the usual rules for a Tcl command
     apply with regard to word quotation, nested commands, continuation lines,
     etc\.

  1. <WHITE> stands for all text consisting only of spaces, newlines, tabulators
     and the __[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ markup command\.

# <a name='section4'></a>Syntax

The rules listed here specify only the syntax of doctoc documents\. The lexical
level of the language was covered in the previous section\.

Regarding the syntax of the \(E\)BNF itself

  1. The construct \{ X \} stands for zero or more occurrences of X\.

  1. The construct \[ X \] stands for zero or one occurrence of X\.

The syntax:

    toc       = defs
                TOC_BEGIN
                contents
                TOC_END
                { <WHITE> }

    defs      = { INCLUDE | VSET | <WHITE> }
    contents  = { defs entry } [ defs ]

    entry     = ITEM | division

    division  = DIVISION_START
                contents
                DIVISION_END

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctoc\_intro](doctoc\_intro\.md),
[doctoc\_lang\_cmdref](doctoc\_lang\_cmdref\.md),
[doctoc\_lang\_faq](doctoc\_lang\_faq\.md),
[doctoc\_lang\_intro](doctoc\_lang\_intro\.md)

# <a name='keywords'></a>KEYWORDS

[doctoc commands](\.\./\.\./\.\./\.\./index\.md\#doctoc\_commands), [doctoc
language](\.\./\.\./\.\./\.\./index\.md\#doctoc\_language), [doctoc
markup](\.\./\.\./\.\./\.\./index\.md\#doctoc\_markup), [doctoc
syntax](\.\./\.\./\.\./\.\./index\.md\#doctoc\_syntax),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctoc_plugin_apiref.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418

[//000000001]: # (doctoc\_plugin\_apiref \- Documentation tools)
[//000000002]: # (Generated from file 'doctoc\_plugin\_apiref\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctoc\_plugin\_apiref\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctoc\_plugin\_apiref \- doctoc plugin API reference

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [OVERVIEW](#section2)

  - [FRONTEND COMMANDS](#section3)

  - [PLUGIN COMMANDS](#section4)

      - [Management commands](#subsection1)

      - [Formatting commands](#subsection2)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__dt\_fmap__ *symfname*](#1)  
[__dt\_format__](#2)  
[__dt\_read__ *file*](#3)  
[__dt\_source__ *file*](#4)  
[__ex\_cappend__ *text*](#5)  
[__ex\_cget__ *varname*](#6)  
[__ex\_cis__ *cname*](#7)  
[__ex\_cname__](#8)  
[__ex\_cpop__ *cname*](#9)  
[__ex\_cpush__ *cname*](#10)  
[__ex\_cset__ *varname* *value*](#11)  
[__ex\_lb__ ?*newbracket*?](#12)  
[__ex\_rb__ ?*newbracket*?](#13)  
[__toc\_initialize__](#14)  
[__toc\_listvariables__](#15)  
[__toc\_numpasses__](#16)  
[__toc\_postprocess__ *text*](#17)  
[__toc\_setup__ *n*](#18)  
[__toc\_shutdown__](#19)  
[__toc\_varset__ *varname* *text*](#20)  
[__fmt\_plain\_text__ *text*](#21)  

# <a name='description'></a>DESCRIPTION

This document is intended for *plugin writers*, i\.e\. developers wishing to
write a toc *[formatting engine](\.\./\.\./\.\./\.\./index\.md\#formatting\_engine)*
for some output format X\.

It specifies the interaction between the __[doctools::toc](doctoc\.md)__
package and its plugins, i\.e\. the interface any toc formatting engine has to
comply with\.

This document deals with version 1 of the interface\.

A reader who is on the other hand more interested in the markup language itself
should start with the *[doctoc language
introduction](doctoc\_lang\_intro\.md)* and proceed from there to the formal
specifications, i\.e\. the *[doctoc language syntax](doctoc\_lang\_syntax\.md)*
and the *[doctoc language command reference](doctoc\_lang\_cmdref\.md)*\.

# <a name='section2'></a>OVERVIEW

The API for a toc formatting engine consists of two major sections\.

On the one side we have a set of commands through which the plugin is able to
query the frontend\. These commands are provided by the frontend and linked into
the plugin interpreter\. Please see section [FRONTEND COMMANDS](#section3)
for their detailed specification\.

And on the other side the plugin has to provide its own set of commands which
will then be called by the frontend in a specific sequence while processing
input\. They, again, fall into two categories, management and formatting\. Please
see section [PLUGIN COMMANDS](#section4) and its subsections for their
detailed specification\.

# <a name='section3'></a>FRONTEND COMMANDS

This section specifies the set of commands through which a plugin, also known as
a toc formatting engine, is able to query the frontend\. These commands are
provided by the frontend and linked into the plugin interpreter\.

I\.e\. a toc formatting engine can assume that all of the following commands are
present when any of its own commands \(as specified in section [PLUGIN
COMMANDS](#section4)\) are executed\.

Beyond that it can also assume that it has full access to its own safe
interpreter and thus is not able to damage the other parts of the processor, nor
can it damage the filesystem\. It is however able to either kill or hang the
whole process, by exiting, or running an infinite loop\.

Coming back to the imported commands, all the commands with prefix *dt\_*
provide limited access to specific parts of the frontend, whereas the commands
with prefix *ex\_* provide access to the state of the
__[textutil::expander](\.\./textutil/expander\.md)__ object which does the
main parsing of the input within the frontend\. These commands should not be
except under very special circumstances\.

  - <a name='1'></a>__dt\_fmap__ *symfname*

    Query command\. It returns the actual pathname to use in the output in place
    of the symbolic filename *symfname*\. It will return the unchanged input if
    no mapping was established for *symfname*\.

    The required mappings are established with the method __map__ of a
    frontend, as explained in section __OBJECT METHODS__ of the
    documentation for the package __[doctools::toc](doctoc\.md)__\.

  - <a name='2'></a>__dt\_format__

    Query command\. It returns the name of the format associated with the toc
    formatting engine\.

  - <a name='3'></a>__dt\_read__ *file*

    Controlled filesystem access\. Returns contents of *file* for whatever use
    desired by the plugin\. Only files which are either in the same directory as
    the file containing the engine, or below it, can be loaded\. Trying to load a
    file outside of this directory causes an error\.

  - <a name='4'></a>__dt\_source__ *file*

    Controlled filesystem access\. This command allows the toc formatting engine
    to load additional Tcl code it may need\. Only files which are either in the
    same directory as the file containing the engine, or below it, can be
    loaded\. Trying to load a file outside of this directory causes an error\.

  - <a name='5'></a>__ex\_cappend__ *text*

    Appends a string to the output in the current context\. This command should
    rarely be used by macros or application code\.

  - <a name='6'></a>__ex\_cget__ *varname*

    Retrieves the value of variable *varname*, defined in the current context\.

  - <a name='7'></a>__ex\_cis__ *cname*

    Determines whether or not the name of the current context is *cname*\.

  - <a name='8'></a>__ex\_cname__

    Returns the name of the current context\.

  - <a name='9'></a>__ex\_cpop__ *cname*

    Pops a context from the context stack, returning all accumulated output in
    that context\. The context must be named *cname*, or an error results\.

  - <a name='10'></a>__ex\_cpush__ *cname*

    Pushes a context named *cname* onto the context stack\. The context must be
    popped by __cpop__ before expansion ends or an error results\.

  - <a name='11'></a>__ex\_cset__ *varname* *value*

    Sets variable *varname* to *value* in the current context\.

  - <a name='12'></a>__ex\_lb__ ?*newbracket*?

    Returns the current value of the left macro expansion bracket; this is for
    use as or within a macro, when the bracket needs to be included in the
    output text\. If *newbracket* is specified, it becomes the new bracket, and
    is returned\.

  - <a name='13'></a>__ex\_rb__ ?*newbracket*?

    Returns the current value of the right macro expansion bracket; this is for
    use as or within a macro, when the bracket needs to be included in the
    output text\. If *newbracket* is specified, it becomes the new bracket, and
    is returned\.

# <a name='section4'></a>PLUGIN COMMANDS

The plugin has to provide its own set of commands which will then be called by
the frontend in a specific sequence while processing input\. They fall into two
categories, management and formatting\. Their expected names, signatures, and
responsibilities are specified in the following two subsections\.

## <a name='subsection1'></a>Management commands

The management commands a plugin has to provide are used by the frontend to

  1. initialize and shutdown the plugin

  1. determine the number of passes it has to make over the input

  1. initialize and shutdown each pass

  1. query and initialize engine parameters

After the plugin has been loaded and the frontend commands are established the
commands will be called in the following sequence:

    toc_numpasses -> n
    toc_listvariables -> vars

    toc_varset var1 value1
    toc_varset var2 value2
    ...
    toc_varset varK valueK
    toc_initialize
    toc_setup 1
    ...
    toc_setup 2
    ...
    ...
    toc_setup n
    ...
    toc_postprocess
    toc_shutdown
    ...

I\.e\. first the number of passes and the set of available engine parameters is
established, followed by calls setting the parameters\. That second part is
optional\.

After that the plugin is initialized, the specified number of passes executed,
the final result run through a global post processing step and at last the
plugin is shutdown again\. This can be followed by more conversions, restarting
the sequence at __toc\_varset__\.

In each of the passes, i\.e\. after the calls of __toc\_setup__ the frontend
will process the input and call the formatting commands as markup is
encountered\. This means that the sequence of formatting commands is determined
by the grammar of the doctoc markup language, as specified in the *[doctoc
language syntax](doctoc\_lang\_syntax\.md)* specification\.

A different way of looking at the sequence is:

  - First some basic parameters are determined\.

  - Then everything starting at the first __toc\_varset__ to
    __toc\_shutdown__ forms a *run*, the formatting of a single input\. Each
    run can be followed by more\.

  - Embedded within each run we have one or more *passes*, each starting with
    __toc\_setup__ and going until either the next __toc\_setup__ or
    __toc\_postprocess__ is reached\.

    If more than one pass is required to perform the formatting only the output
    of the last pass is relevant\. The output of all the previous, preparatory
    passes is ignored\.

The commands, their names, signatures, and responsibilities are, in detail:

  - <a name='14'></a>__toc\_initialize__

    *Initialization/Shutdown*\. This command is called at the beginning of
    every conversion run, as the first command of that run\. Note that a run is
    not a pass, but may consist of multiple passes\. It has to initialize the
    general state of the plugin, beyond the initialization done during the load\.
    No return value is expected, and any returned value is ignored\.

  - <a name='15'></a>__toc\_listvariables__

    *Initialization/Shutdown* and *Engine parameters*\. Second command is
    called after the plugin code has been loaded, i\.e\. immediately after
    __toc\_numpasses__\. It has to return a list containing the names of the
    parameters the frontend can set to configure the engine\. This list can be
    empty\.

  - <a name='16'></a>__toc\_numpasses__

    *Initialization/Shutdown* and *Pass management*\. First command called
    after the plugin code has been loaded\. No other command of the engine will
    be called before it\. It has to return the number of passes this engine
    requires to fully process the input document\. This value has to be an
    integer number greater or equal to one\.

  - <a name='17'></a>__toc\_postprocess__ *text*

    *Initialization/Shutdown*\. This command is called immediately after the
    last pass in a run\. Its argument is the result of the conversion generated
    by that pass\. It is provided to allow the engine to perform any global
    modifications of the generated document\. If no post\-processing is required
    for a specific format the command has to just return the argument\.

    Expected to return a value, the final result of formatting the input\.

  - <a name='18'></a>__toc\_setup__ *n*

    *Initialization/Shutdown* and *Pass management*\. This command is called
    at the beginning of each pass over the input in a run\. Its argument is the
    number of the pass which has begun\. Passes are counted from __1__
    upward\. The command has to set up the internal state of the plugin for this
    particular pass\. No return value is expected, and any returned value is
    ignored\.

  - <a name='19'></a>__toc\_shutdown__

    *Initialization/Shutdown*\. This command is called at the end of every
    conversion run\. It is the last command called in a run\. It has to clean up
    of all the run\-specific state in the plugin\. After the call the engine has
    to be in a state which allows the initiation of another run without fear
    that information from the last run is leaked into this new run\. No return
    value is expected, and any returned value is ignored\.

  - <a name='20'></a>__toc\_varset__ *varname* *text*

    *Engine parameters*\. This command is called by the frontend to set an
    engine parameter to a particular value\. The parameter to change is specified
    by *varname*, the value to set in *text*\.

    The command has to throw an error if an unknown *varname* is used\. Only
    the names returned by __toc\_listvariables__ have to be considered as
    known\.

    The values of all engine parameters have to persist between passes and runs\.

## <a name='subsection2'></a>Formatting commands

The formatting commands have to implement the formatting for the output format,
for all the markup commands of the doctoc markup language, except __lb__,
__rb__, __vset__, __include__, and
__[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__\. These exceptions are
processed by the frontend and are never seen by the plugin\. In return a command
for the formatting of plain text has to be provided, something which has no
markup in the input at all\.

This means, that each of the five markup commands specified in the *[doctoc
language command reference](doctoc\_lang\_cmdref\.md)* and outside of the set
of exceptions listed above has an equivalent formatting command which takes the
same arguments as the markup command and whose name is the name of markup
command with the prefix *fmt\_* added to it\.

All commands are expected to format their input in some way per the semantics
specified in the command reference and to return whatever part of this that they
deem necessary as their result, which will be added to the output\.

To avoid essentially duplicating the command reference we do not list any of the
command here and simply refer the reader to the *[doctoc language command
reference](doctoc\_lang\_cmdref\.md)* for their signature and description\. The
sole exception is the plain text formatter, which has no equivalent markup
command\.

The calling sequence of formatting commands is not as rigid as for the
management commands, but determined by the grammar of the doctoc markup
language, as specified in the *[doctoc language
syntax](doctoc\_lang\_syntax\.md)* specification\.

  - <a name='21'></a>__fmt\_plain\_text__ *text*

    *No associated markup command*\.

    Called by the frontend for any plain text encountered in the input\. It has
    to perform any and all special processing required for plain text\.

    The formatted text is expected as the result of the command, and added to
    the output\. If no special processing is required it has to simply return its
    argument without change\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctoc\_intro](doctoc\_intro\.md),
[doctoc\_lang\_cmdref](doctoc\_lang\_cmdref\.md),
[doctoc\_lang\_faq](doctoc\_lang\_faq\.md),
[doctoc\_lang\_intro](doctoc\_lang\_intro\.md),
[doctoc\_lang\_syntax](doctoc\_lang\_syntax\.md), [doctools::toc](doctoc\.md)

# <a name='keywords'></a>KEYWORDS

[formatting engine](\.\./\.\./\.\./\.\./index\.md\#formatting\_engine),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc), [toc
formatter](\.\./\.\./\.\./\.\./index\.md\#toc\_formatter)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctools.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539

[//000000001]: # (doctools \- Documentation tools)
[//000000002]: # (Generated from file 'doctools\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools\(n\) 1\.5\.6 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools \- doctools \- Processing documents

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

      - [PACKAGE COMMANDS](#subsection1)

      - [OBJECT COMMAND](#subsection2)

      - [OBJECT METHODS](#subsection3)

      - [OBJECT CONFIGURATION](#subsection4)

      - [FORMAT MAPPING](#subsection5)

  - [PREDEFINED ENGINES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require doctools ?1\.5\.6?  

[__::doctools::new__ *objectName* ?*option value*\.\.\.?](#1)  
[__::doctools::help__](#2)  
[__::doctools::search__ *path*](#3)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#4)  
[*objectName* __configure__](#5)  
[*objectName* __configure__ *option*](#6)  
[*objectName* __configure__ __\-option__ *value*\.\.\.](#7)  
[*objectName* __cget__ __\-option__](#8)  
[*objectName* __destroy__](#9)  
[*objectName* __format__ *text*](#10)  
[*objectName* __map__ *symbolic* *actual*](#11)  
[*objectName* __parameters__](#12)  
[*objectName* __search__ *path*](#13)  
[*objectName* __setparam__ *name* *value*](#14)  
[*objectName* __warnings__](#15)  

# <a name='description'></a>DESCRIPTION

This package provides a class for the creation of objects able to process and
convert text written in the *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)*
markup language into any output format X for which a *[formatting
engine](\.\./\.\./\.\./\.\./index\.md\#formatting\_engine)* is available\.

A reader interested in the markup language itself should start with the
*[doctools language introduction](doctools\_lang\_intro\.md)* and proceed
from there to the formal specifications, i\.e\. the *[doctools language
syntax](doctools\_lang\_syntax\.md)* and the *[doctools language command
reference](doctools\_lang\_cmdref\.md)*\.

If on the other hand the reader wishes to write her own formatting engine for
some format, i\.e\. is a *plugin writer* then reading and understanding the
*[doctools plugin API reference](doctools\_plugin\_apiref\.md)* is an
absolute necessity, as that document specifies the interaction between this
package and its plugins, i\.e\. the formatting engines, in detail\.

# <a name='section2'></a>PUBLIC API

## <a name='subsection1'></a>PACKAGE COMMANDS

  - <a name='1'></a>__::doctools::new__ *objectName* ?*option value*\.\.\.?

    This command creates a new doctools object with an associated Tcl command
    whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [OBJECT COMMAND](#subsection2) and [OBJECT
    METHODS](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

    The options and their values coming after the name of the object are used to
    set the initial configuration of the object\.

  - <a name='2'></a>__::doctools::help__

    This is a convenience command for applications wishing to provide their user
    with a short description of the available formatting commands and their
    meanings\. It returns a string containing a standard help text\.

  - <a name='3'></a>__::doctools::search__ *path*

    Whenever an object created by this the package has to map the name of a
    format to the file containing the code for its formatting engine it will
    search for the file in a number of directories stored in a list\. See section
    [FORMAT MAPPING](#subsection5) for more explanations\.

    This list not only contains three default directories which are declared by
    the package itself, but is also extensible user of the package\. This command
    is the means to do so\. When given a *path* to an existing and readable
    directory it will prepend that directory to the list of directories to
    search\. This means that the *path* added last is later searched through
    first\.

    An error will be thrown if the *path* either does not exist, is not a
    directory, or is not readable\.

## <a name='subsection2'></a>OBJECT COMMAND

All commands created by __::doctools::new__ have the following general form
and may be used to invoke various operations on their doctools converter object\.

  - <a name='4'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [OBJECT METHODS](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>OBJECT METHODS

  - <a name='5'></a>*objectName* __configure__

    The method returns a list of all known options and their current values when
    called without any arguments\.

  - <a name='6'></a>*objectName* __configure__ *option*

    The method behaves like the method __cget__ when called with a single
    argument and returns the value of the option specified by said argument\.

  - <a name='7'></a>*objectName* __configure__ __\-option__ *value*\.\.\.

    The method reconfigures the specified __option__s of the object, setting
    them to the associated *value*s, when called with an even number of
    arguments, at least two\.

    The legal options are described in the section [OBJECT
    CONFIGURATION](#subsection4)\.

  - <a name='8'></a>*objectName* __cget__ __\-option__

    This method expects a legal configuration option as argument and will return
    the current value of that option for the object the method was invoked for\.

    The legal configuration options are described in section [OBJECT
    CONFIGURATION](#subsection4)\.

  - <a name='9'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='10'></a>*objectName* __format__ *text*

    This method runs the *text* through the configured formatting engine and
    returns the generated string as its result\. An error will be thrown if no
    __\-format__ was configured for the object\.

    The method assumes that the *text* is in
    *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format as specified in the
    companion document *doctools\_fmt*\. Errors will be thrown otherwise\.

  - <a name='11'></a>*objectName* __map__ *symbolic* *actual*

    This methods add one entry to the per\-object mapping from *symbolic*
    filenames to the *actual* uris\. The object just stores this mapping and
    makes it available to the configured formatting engine through the command
    __dt\_fmap__\. This command is described in more detail in the
    *[doctools plugin API reference](doctools\_plugin\_apiref\.md)* which
    specifies the interaction between the objects created by this package and
    doctools formatting engines\.

  - <a name='12'></a>*objectName* __parameters__

    This method returns a list containing the names of all engine parameters
    provided by the configured formatting engine\. It will return an empty list
    if the object is not yet configured for a specific format\.

  - <a name='13'></a>*objectName* __search__ *path*

    This method extends the per\-object list of paths searched for doctools
    formatting engines\. See also the command __::doctools::search__ on how
    to extend the per\-package list of paths\. Note that the path entered last
    will be searched first\. For more details see section [FORMAT
    MAPPING](#subsection5)\.

  - <a name='14'></a>*objectName* __setparam__ *name* *value*

    This method sets the *name*d engine parameter to the specified *value*\.
    It will throw an error if the object is either not yet configured for a
    specific format, or if the formatting engine for the configured format does
    not provide a parameter with the given *name*\. The list of parameters
    provided by the configured formatting engine can be retrieved through the
    method __parameters__\.

  - <a name='15'></a>*objectName* __warnings__

    This method returns a list containing all the warnings which were generated
    by the configured formatting engine during the last invocation of the method
    __format__\.

## <a name='subsection4'></a>OBJECT CONFIGURATION

All doctools objects understand the following configuration options:

  - __\-file__ *file*

    The argument of this option is stored in the object and made available to
    the configured formatting engine through the commands __dt\_file__ and
    __dt\_mainfile__\. These commands are described in more detail in the
    companion document *doctools\_api* which specifies the API between the
    object and formatting engines\.

    The default value of this option is the empty string\.

    The configured formatting engine should interpret the value as the name of
    the file containing the document which is currently processed\.

  - __\-ibase__ *file*

    The argument of this option is stored in the object and used as the base
    path for resolution of relative include paths\. If this option is not set
    \(empty string\) the value of __\-file__ is used instead\.

    Note that __\-file__ and __\-ibase__, while similar looking, are
    actually very different\. The value of __\-file__ is used by some engines
    for the generation of proper relative references between output documents
    \(HTML\)\. As such this is a *destination* path\. The __\-ibase__ on the
    other hand is used to resolve relative include paths, and as such deals with
    *[source](\.\./\.\./\.\./\.\./index\.md\#source)* paths\.

    The default value of this option is the empty string\.

  - __\-module__ *text*

    The argument of this option is stored in the object and made available to
    the configured formatting engine through the command __dt\_module__\. This
    command is described in more detail in the companion document
    *doctools\_api* which specifies the API between the object and formatting
    engines\.

    The default value of this option is the empty string\.

    The configured formatting engine should interpret the value as the name of
    the module the file containing the document which is currently processed
    belongs to\.

  - __\-format__ *text*

    The argument of this option specifies the format to generate and by
    implication the formatting engine to use when converting text via the method
    __format__\. Its default value is the empty string\. The method
    __format__ cannot be used if this option is not set to a valid value at
    least once\.

    The package will immediately try to map the given name to a file containing
    the code for a formatting engine generating that format\. An error will be
    thrown if this mapping fails\. In that case a previously configured format is
    left untouched\.

    The section [FORMAT MAPPING](#subsection5) explains in detail how the
    package and object will look for engine implementations\.

  - __\-deprecated__ *boolean*

    This option is a boolean flag\. The object will generate warnings if this
    flag is set and the text given to method __format__ contains the
    deprecated markup command __strong__\. Its default value is
    __FALSE__\. In other words, no warnings will be generated\.

  - __\-copyright__ *text*

    The argument of this option is stored in the object and made available to
    the configured formatting engine through the command __dt\_copyright__\.
    This command is described in more detail in the companion document
    *doctools\_api* which specifies the API between the object and formatting
    engines\.

    The default value of this option is the empty string\.

    The configured formatting engine should interpret the value as a copyright
    assignment for the document which is currently processed, or the package
    described by it\.

    This information must be used if and only if the engine is unable to find
    any copyright assignments within the document itself\. Such are specified by
    the formatting command __copyright__\. This command is described in more
    detail in the companion document *doctools\_fmt* which specifies the
    *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format itself\.

## <a name='subsection5'></a>FORMAT MAPPING

The package and object will perform the following algorithm when trying to map a
format name *foo* to a file containing an implementation of a formatting
engine for *foo*:

  1. If *foo* is the name of an existing file then this file is directly taken
     as the implementation\.

  1. If not, the list of per\-object search paths is searched\. For each directory
     in the list the package checks if that directory contains a file
     "fmt\.*foo*"\. If yes, then that file is taken as the implementation\.

     Note that this list of paths is initially empty and can be extended through
     the object method __search__\.

  1. If not, the list of package paths is searched\. For each directory in the
     list the package checks if that directory contains a file "fmt\.*foo*"\. If
     yes, then that file is taken as the implementation\.

     This list of paths can be extended through the command
     __::doctools::search__\. It contains initially one path, the
     subdirectory "mpformats" of the directory the package itself is located in\.
     In other words, if the package implementation "doctools\.tcl" is installed
     in the directory "/usr/local/lib/tcllib/doctools" then it will by default
     search the directory "/usr/local/lib/tcllib/doctools/mpformats" for format
     implementations\.

  1. The mapping fails\.

# <a name='section3'></a>PREDEFINED ENGINES

The package provides predefined engines for the following formats\. Some of the
engines support parameters\. These will be explained below as well\.

  - html

    This engine generates HTML markup, for processing by web browsers and the
    like\. This engine supports four parameters:

      * footer

        The value for this parameter has to be valid selfcontained HTML markup
        for the body section of a HTML document\. The default value is the empty
        string\. The value is inserted into the generated output just before the
        __</body>__ tag, closing the body of the generated HTML\.

        This can be used to insert boilerplate footer markup into the generated
        document\.

      * header

        The value for this parameter has to be valid selfcontained HTML markup
        for the body section of a HTML document\. The default value is the empty
        string\. The value is inserted into the generated output just after the
        __<body>__ tag, starting the body of the generated HTML\.

        This can be used to insert boilerplate header markup into the generated
        document\.

      * meta

        The value for this parameter has to be valid selfcontained HTML markup
        for the header section of a HTML document\. The default value is the
        empty string\. The value is inserted into the generated output just after
        the __<head>__ tag, starting the header section of the generated
        HTML\.

        This can be used to insert boilerplate meta data markup into the
        generated document, like references to a stylesheet, standard meta
        keywords, etc\.

      * xref

        The value for this parameter has to be a list of triples specifying
        cross\-reference information\. This information is used by the engine to
        create more hyperlinks\. Each triple is a list containing a pattern,
        symbolic filename and fragment reference, in this order\. If a pattern is
        specified multiple times the last occurrence of the pattern will be
        used\.

        The engine will consult the xref database when encountering specific
        commands and will create a link if the relevant text matches one of the
        patterns\. No link will be created if no match was found\. The link will
        go to the uri __file\#fragment__ listed in the relevant triple, after
        conversion of the symbolic file name to the actual uri via
        __dt\_fmap__ \(see the *[doctools plugin API
        reference](doctools\_plugin\_apiref\.md)*\)\. This file\-to\-uri mapping
        was build by calls to the method __map__ of the doctools object \(See
        section [OBJECT METHODS](#subsection3)\)\.

        The following formatting commands will consult the xref database:

          + __cmd__ *word*

            The command will look for the patterns __sa,__*word*, and
            *word*, in this order\. If this fails if it will convert *word*
            to all lowercase and try again\.

          + __syscmd__ *word*

            The command will look for the patterns __sa,__*word*, and
            *word*, in this order\. If this fails if it will convert *word*
            to all lowercase and try again\.

          + __[term](\.\./term/term\.md)__ *word*

            The command will look for the patterns __kw,__*word*,
            __sa,__*word*, and *word*, in this order\. If this fails if
            it will convert *word* to all lowercase and try again\.

          + __[package](\.\./\.\./\.\./\.\./index\.md\#package)__ *word*

            The command will look for the patterns __sa,__*word*,
            __kw,__*word*, and *word*, in this order\. If this fails if
            it will convert *word* to all lowercase and try again\.

          + __see\_also__ *word*\.\.\.

            The command will look for the patterns __sa,__*word*, and
            *word*, in this order, for each *word* given to the command\. If
            this fails if it will convert *word* to all lowercase and try
            again\.

          + __[keywords](\.\./\.\./\.\./\.\./index\.md\#keywords)__ *word*\.\.\.

            The command will look for the patterns __kw,__*word*, and
            *word*, in this order, for each *word* given to the command\. If
            this fails if it will convert *word* to all lowercase and try
            again\.

  - latex

    This engine generates output suitable for the
    __[latex](\.\./\.\./\.\./\.\./index\.md\#latex)__ text processor coming out of
    the TeX world\.

  - list

    This engine retrieves version, section and title of the manpage from the
    document\. As such it can be used to generate a directory listing for a set
    of manpages\.

  - nroff

    This engine generates nroff output, for processing by
    __[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff)__, or __groff__\. The
    result will be standard man pages as they are known in the unix world\.

  - markdown

    This engine generates *[Markdown](\.\./\.\./\.\./\.\./index\.md\#markdown)*
    markup\. This engine supports two parameters:

      * header

        The value for this parameter has to be valid selfcontained markdown
        markup for the body section of a markdown document\. The default value is
        the empty string\. The value is inserted into the generated output just
        before the table of contents\.

        This can be used to insert boilerplate header markup into the generated
        document\.

      * xref

        The value for this parameter has to be a list of triples specifying
        cross\-reference information\.

        The full details of expected syntax and engine\-internal use are
        explained above for the *[html](\.\./\.\./\.\./\.\./index\.md\#html)*
        engine\.

  - null

    This engine generates no outout at all\. This can be used if one just wants
    to validate some input\.

  - tmml

    This engine generates TMML markup as specified by Joe English\. The Tcl
    Manpage Markup Language is a derivate of XML\.

  - wiki

    This engine generates Wiki markup as understood by Jean Claude Wippler's
    __wikit__ application\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctools\_intro](doctools\_intro\.md),
[doctools\_lang\_cmdref](doctools\_lang\_cmdref\.md),
[doctools\_lang\_intro](doctools\_lang\_intro\.md),
[doctools\_lang\_syntax](doctools\_lang\_syntax\.md),
[doctools\_plugin\_apiref](doctools\_plugin\_apiref\.md)

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html), [TMML](\.\./\.\./\.\./\.\./index\.md\#tmml),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markdown](\.\./\.\./\.\./\.\./index\.md\#markdown),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctools_intro.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

[//000000001]: # (doctools\_intro \- Documentation tools)
[//000000002]: # (Generated from file 'doctools\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools\_intro\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools\_intro \- doctools introduction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [RELATED FORMATS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

*[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* \(short for *documentation
tools*\) stands for a set of related, yet different, entities which are working
together for the easy creation and transformation of documentation\. These are

  1. A tcl based language for the semantic markup of text\. Markup is represented
     by Tcl commands interspersed with the actual text\.

  1. A package providing the ability to read and transform texts written in that
     markup language\. It is important to note that the actual transformation of
     the input text is delegated to plugins\.

  1. An API describing the interface between the package above and a plugin\.

Which of the more detailed documents are relevant to the reader of this
introduction depends on their role in the documentation process\.

  1. A *writer* of documentation has to understand the markup language itself\.
     A beginner to doctools should read the more informally written *[doctools
     language introduction](doctools\_lang\_intro\.md)* first\. Having digested
     this the formal *[doctools language syntax](doctools\_lang\_syntax\.md)*
     specification should become understandable\. A writer experienced with
     doctools may only need the *[doctools language command
     reference](doctools\_lang\_cmdref\.md)* from time to time to refresh her
     memory\.

     While a document is written the
     __[dtplite](\.\./\.\./apps/dtplite\.md)__ application can be used to
     validate it, and after completion it also performs the conversion into the
     chosen system of visual markup, be it \*roff, HTML, plain text, wiki, etc\.

  1. A *processor* of documentation written in the
     *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* markup language has to
     know which tools are available for use\.

     The main tool is the aforementioned
     __[dtplite](\.\./\.\./apps/dtplite\.md)__ application provided by
     Tcllib\. A more powerful one \(in terms of options and ability to configure
     it\) is the __dtp__ application, provided by Tclapps\. At the bottom
     level, common to both applications, however sits the package
     __[doctools](doctools\.md)__, providing the basic facilities to read
     and process files containing text in the doctools format\.

  1. At last, but not least, *plugin writers* have to understand the
     interaction between the __[doctools](doctools\.md)__ package and its
     plugins, as described in the *[doctools plugin API
     reference](doctools\_plugin\_apiref\.md)*\.

# <a name='section2'></a>RELATED FORMATS

doctools does not stand alone, it has two companion formats\. These are called
*[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* and
*[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)*, and they are for the markup of
*keyword indices*, and *tables of contents*, respectively\. They are
described in their own sets of documents, starting at the *[docidx
introduction](docidx\_intro\.md)* and the *[doctoc
introduction](doctoc\_intro\.md)*, respectively\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx\_intro](docidx\_intro\.md), [doctoc\_intro](doctoc\_intro\.md),
[doctools](doctools\.md),
[doctools\_lang\_cmdref](doctools\_lang\_cmdref\.md),
[doctools\_lang\_faq](doctools\_lang\_faq\.md),
[doctools\_lang\_intro](doctools\_lang\_intro\.md),
[doctools\_lang\_syntax](doctools\_lang\_syntax\.md),
[doctools\_plugin\_apiref](doctools\_plugin\_apiref\.md)

# <a name='keywords'></a>KEYWORDS

[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctools_lang_cmdref.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601

[//000000001]: # (doctools\_lang\_cmdref \- Documentation tools)
[//000000002]: # (Generated from file 'doctools\_lang\_cmdref\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2010 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools\_lang\_cmdref\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools\_lang\_cmdref \- doctools language command reference

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__arg__ *text*](#1)  
[__arg\_def__ *type* *name* ?*mode*?](#2)  
[__bullet__](#3)  
[__call__ *args*](#4)  
[__category__ *text*](#5)  
[__[class](\.\./\.\./\.\./\.\./index\.md\#class)__ *text*](#6)  
[__cmd__ *text*](#7)  
[__cmd\_def__ *command*](#8)  
[__[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ *plaintext*](#9)  
[__const__ *text*](#10)  
[__copyright__ *text*](#11)  
[__def__ *text*](#12)  
[__description__](#13)  
[__enum__](#14)  
[__emph__ *text*](#15)  
[__example__ *text*](#16)  
[__example\_begin__](#17)  
[__example\_end__](#18)  
[__[file](\.\./\.\./\.\./\.\./index\.md\#file)__ *text*](#19)  
[__fun__ *text*](#20)  
[__[image](\.\./\.\./\.\./\.\./index\.md\#image)__ *name* ?*label*?](#21)  
[__include__ *filename*](#22)  
[__item__](#23)  
[__[keywords](\.\./\.\./\.\./\.\./index\.md\#keywords)__ *args*](#24)  
[__lb__](#25)  
[__list\_begin__ *what*](#26)  
[__list\_end__](#27)  
[__lst\_item__ *text*](#28)  
[__manpage\_begin__ *command* *section* *version*](#29)  
[__manpage\_end__](#30)  
[__[method](\.\./\.\./\.\./\.\./index\.md\#method)__ *text*](#31)  
[__moddesc__ *text*](#32)  
[__namespace__ *text*](#33)  
[__nl__](#34)  
[__opt__ *text*](#35)  
[__opt\_def__ *name* ?*arg*?](#36)  
[__option__ *text*](#37)  
[__[package](\.\./\.\./\.\./\.\./index\.md\#package)__ *text*](#38)  
[__para__](#39)  
[__rb__](#40)  
[__require__ *package* ?*version*?](#41)  
[__section__ *name*](#42)  
[__sectref__ *id* ?*text*?](#43)  
[__sectref\-external__ *text*](#44)  
[__see\_also__ *args*](#45)  
[__strong__ *text*](#46)  
[__subsection__ *name*](#47)  
[__syscmd__ *text*](#48)  
[__[term](\.\./term/term\.md)__ *text*](#49)  
[__titledesc__ *desc*](#50)  
[__tkoption\_def__ *name* *dbname* *dbclass*](#51)  
[__[type](\.\./\.\./\.\./\.\./index\.md\#type)__ *text*](#52)  
[__[uri](\.\./uri/uri\.md)__ *text* ?*text*?](#53)  
[__usage__ *args*](#54)  
[__var__ *text*](#55)  
[__vset__ *varname* *value*](#56)  
[__vset__ *varname*](#57)  
[__[widget](\.\./\.\./\.\./\.\./index\.md\#widget)__ *text*](#58)  

# <a name='description'></a>DESCRIPTION

This document specifies both names and syntax of all the commands which together
are the doctools markup language, version 1\. As this document is intended to be
a reference the commands are listed in alphabetical order, and the descriptions
are relatively short\. A beginner should read the much more informally written
*[doctools language introduction](doctools\_lang\_intro\.md)* first\.

# <a name='section2'></a>Commands

  - <a name='1'></a>__arg__ *text*

    Text markup\. The argument text is marked up as the *argument* of a
    command\. Main uses are the highlighting of command arguments in free\-form
    text, and for the argument parameters of the markup commands __call__
    and __usage__\.

  - <a name='2'></a>__arg\_def__ *type* *name* ?*mode*?

    Text structure\. List element\. Argument list\. Automatically closes the
    previous list element\. Specifies the data\-*type* of the described argument
    of a command, its *name* and its i/o\-*mode*\. The latter is optional\.

  - <a name='3'></a>__bullet__

    *Deprecated*\. Text structure\. List element\. Itemized list\. See
    __item__ for the canonical command to open a list item in an itemized
    list\.

  - <a name='4'></a>__call__ *args*

    Text structure\. List element\. Definition list\. Automatically closes the
    previous list element\. Defines the term as a command and its arguments\. The
    first argument is the name of the command described by the following
    free\-form text, and all arguments coming after that are descriptions of the
    command's arguments\. It is expected that the arguments are marked up with
    __arg__, __[method](\.\./\.\./\.\./\.\./index\.md\#method)__,
    __option__ etc\., as is appropriate, and that the command itself is
    marked up with __cmd__\. It is expected that the formatted term is not
    only printed in place, but also in the table of contents of the document, or
    synopsis, depending on the output format\.

  - <a name='5'></a>__category__ *text*

    Document information\. Anywhere\. This command registers its plain text
    arguments as the category this document belongs to\. If this command is used
    multiple times the last value specified is used\.

  - <a name='6'></a>__[class](\.\./\.\./\.\./\.\./index\.md\#class)__ *text*

    Text markup\. The argument is marked up as the name of a
    *[class](\.\./\.\./\.\./\.\./index\.md\#class)*\. The text may have other markup
    already applied to it\. Main use is the highlighting of class names in
    free\-form text\.

  - <a name='7'></a>__cmd__ *text*

    Text markup\. The argument text is marked up as the name of a *Tcl
    command*\. The text may have other markup already applied to it\. Main uses
    are the highlighting of commands in free\-form text, and for the command
    parameters of the markup commands __call__ and __usage__\.

  - <a name='8'></a>__cmd\_def__ *command*

    Text structure\. List element\. Command list\. Automatically closes the
    previous list element\. The argument specifies the name of the *Tcl
    command* to be described by the list element\. Expected to be marked up in
    the output as if it had been formatted with __cmd__\.

  - <a name='9'></a>__[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ *plaintext*

    Text markup\. The argument text is marked up as a comment standing outside of
    the actual text of the document\. Main use is in free\-form text\.

  - <a name='10'></a>__const__ *text*

    Text markup\. The argument is marked up as a *constant* value\. The text may
    have other markup already applied to it\. Main use is the highlighting of
    constants in free\-form text\.

  - <a name='11'></a>__copyright__ *text*

    Document information\. Anywhere\. The command registers the plain text
    argument as a copyright assignment for the manpage\. When invoked more than
    once the assignments are accumulated\.

  - <a name='12'></a>__def__ *text*

    Text structure\. List element\. Definition list\. Automatically closes the
    previous list element\. The argument text is the term defined by the new list
    element\. Text markup can be applied to it\.

  - <a name='13'></a>__description__

    Document structure\. This command separates the header from the document
    body\. Implicitly starts a section named "DESCRIPTION" \(See command
    __section__\)\.

  - <a name='14'></a>__enum__

    Text structure\. List element\. Enumerated list\. Automatically closes the
    previous list element\.

  - <a name='15'></a>__emph__ *text*

    Text markup\. The argument text is marked up as emphasized\. Main use is for
    general highlighting of pieces of free\-form text without attaching special
    meaning to the pieces\.

  - <a name='16'></a>__example__ *text*

    Text structure, Text markup\. This command marks its argument up as an
    *example*\. Main use is the simple embedding of examples in free\-form text\.
    It should be used if the example does *not* need special markup of its
    own\. Otherwise use a sequence of __example\_begin__ \.\.\.
    __example\_end__\.

  - <a name='17'></a>__example\_begin__

    Text structure\. This commands starts an example\. All text until the next
    __example\_end__ belongs to the example\. Line breaks, spaces, and tabs
    have to be preserved literally\. Examples cannot be nested\.

  - <a name='18'></a>__example\_end__

    Text structure\. This command closes the example started by the last
    __example\_begin__\.

  - <a name='19'></a>__[file](\.\./\.\./\.\./\.\./index\.md\#file)__ *text*

    Text markup\. The argument is marked up as a
    *[file](\.\./\.\./\.\./\.\./index\.md\#file)* or *directory*, i\.e\. in general
    a *path*\. The text may have other markup already applied to it\. Main use
    is the highlighting of paths in free\-form text\.

  - <a name='20'></a>__fun__ *text*

    Text markup\. The argument is marked up as the name of a *function*\. The
    text may have other markup already applied to it\. Main use is the
    highlighting of function names in free\-form text\.

  - <a name='21'></a>__[image](\.\./\.\./\.\./\.\./index\.md\#image)__ *name* ?*label*?

    Text markup\. The argument is the symbolic name of an
    *[image](\.\./\.\./\.\./\.\./index\.md\#image)* and replaced with the image
    itself, if a suitable variant is found by the backend\. The second argument,
    should it be present, will be interpreted the human\-readable description of
    the image, and put into the output in a suitable position, if such is
    supported by the format\. The HTML format, for example, can place it into the
    *alt* attribute of image references\.

  - <a name='22'></a>__include__ *filename*

    Templating\. The contents of the named file are interpreted as text written
    in the doctools markup and processed in the place of the include command\.
    The markup in the file has to be self\-contained\. It is not possible for a
    markup command to cross the file boundaries\.

  - <a name='23'></a>__item__

    Text structure\. List element\. Itemized list\. Automatically closes the
    previous list element\.

  - <a name='24'></a>__[keywords](\.\./\.\./\.\./\.\./index\.md\#keywords)__ *args*

    Document information\. Anywhere\. This command registers all its plain text
    arguments as keywords applying to this document\. Each argument is a single
    keyword\. If this command is used multiple times all the arguments
    accumulate\.

  - <a name='25'></a>__lb__

    Text\. The command is replaced with a left bracket\. Use in free\-form text\.
    Required to avoid interpretation of a left bracket as the start of a markup
    command\.

  - <a name='26'></a>__list\_begin__ *what*

    Text structure\. This command starts a list\. The exact nature of the list is
    determined by the argument *what* of the command\. This further determines
    which commands are have to be used to start the list elements\. Lists can be
    nested, i\.e\. it is allowed to start a new list within a list element\.

    The allowed types \(and their associated item commands\) are:

      * __arguments__

        __arg\_def__\.

      * __commands__

        __cmd\_def__\.

      * __definitions__

        __def__ and __call__\.

      * __enumerated__

        __enum__

      * __itemized__

        __item__

      * __options__

        __opt\_def__

      * __tkoptions__

        __tkoption\_def__

    Additionally the following names are recognized as shortcuts for some of the
    regular types:

      * __args__

        Short for __arguments__\.

      * __cmds__

        Short for __commands__\.

      * __enum__

        Short for __enumerated__\.

      * __item__

        Short for __itemized__\.

      * __opts__

        Short for __options__\.

    At last the following names are still recognized for backward compatibility,
    but are otherwise considered to be *deprecated*\.

      * __arg__

        *Deprecated*\. See __arguments__\.

      * __bullet__

        *Deprecated*\. See __itemized__\.

      * __cmd__

        *Deprecated*\. See __commands__\.

      * __opt__

        *Deprecated*\. See __options__\.

      * __tkoption__

        *Deprecated*\. See __tkoptions__\.

  - <a name='27'></a>__list\_end__

    Text structure\. This command closes the list opened by the last
    __list\_begin__ command coming before it\.

  - <a name='28'></a>__lst\_item__ *text*

    *Deprecated*\. Text structure\. List element\. Definition list\. See
    __def__ for the canonical command to open a general list item in a
    definition list\.

  - <a name='29'></a>__manpage\_begin__ *command* *section* *version*

    Document structure\. The command to start a manpage\. The arguments are the
    name of the *command* described by the manpage, the *section* of the
    manpages this manpage resides in, and the *version* of the module
    containing the command\. All arguments have to be plain text, without markup\.

  - <a name='30'></a>__manpage\_end__

    Document structure\. Command to end a manpage/document\. Anything in the
    document coming after this command is in error\.

  - <a name='31'></a>__[method](\.\./\.\./\.\./\.\./index\.md\#method)__ *text*

    Text markup\. The argument text is marked up as the name of an
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)*
    *[method](\.\./\.\./\.\./\.\./index\.md\#method)*, i\.e\. subcommand of a Tcl
    command\. The text may have other markup already applied to it\. Main uses are
    the highlighting of method names in free\-form text, and for the command
    parameters of the markup commands __call__ and __usage__\.

  - <a name='32'></a>__moddesc__ *text*

    Document information\. Header\. Registers the plain text argument as a short
    description of the module the manpage resides in\.

  - <a name='33'></a>__namespace__ *text*

    Text markup\. The argument text is marked up as a namespace name\. The text
    may have other markup already applied to it\. Main use is the highlighting of
    namespace names in free\-form text\.

  - <a name='34'></a>__nl__

    *Deprecated*\. Text structure\. See __para__ for the canonical command
    to insert paragraph breaks into the text\.

  - <a name='35'></a>__opt__ *text*

    Text markup\. The argument text is marked up as *optional*\. The text may
    have other markup already applied to it\. Main use is the highlighting of
    optional arguments, see the command arg __arg__\.

  - <a name='36'></a>__opt\_def__ *name* ?*arg*?

    Text structure\. List element\. Option list\. Automatically closes the previous
    list element\. Specifies *name* and arguments of the *option* described
    by the list element\. It is expected that the name is marked up using
    __option__\.

  - <a name='37'></a>__option__ *text*

    Text markup\. The argument is marked up as *option*\. The text may have
    other markup already applied to it\. Main use is the highlighting of options,
    also known as command\-switches, in either free\-form text, or the arguments
    of the __call__ and __usage__ commands\.

  - <a name='38'></a>__[package](\.\./\.\./\.\./\.\./index\.md\#package)__ *text*

    Text markup\. The argument is marked up as the name of a
    *[package](\.\./\.\./\.\./\.\./index\.md\#package)*\. The text may have other
    markup already applied to it\. Main use is the highlighting of package names
    in free\-form text\.

  - <a name='39'></a>__para__

    Text structure\. This command breaks free\-form text into paragraphs\. Each
    command closes the paragraph coming before it and starts a new paragraph for
    the text coming after it\. Higher\-level forms of structure are sections and
    subsections\.

  - <a name='40'></a>__rb__

    Text\. The command is replaced with a right bracket\. Use in free\-form text\.
    Required to avoid interpretation of a right bracket as the end of a markup
    command\.

  - <a name='41'></a>__require__ *package* ?*version*?

    Document information\. Header\. This command registers its argument
    *package* as the name of a package or application required by the
    described package or application\. A minimum version can be provided as well\.
    This argument can be marked up\. The usual markup is __opt__\.

  - <a name='42'></a>__section__ *name*

    Text structure\. This command starts a new named document section\. The
    argument has to be plain text\. Implicitly closes the last paragraph coming
    before it and also implicitly opens the first paragraph of the new section\.

  - <a name='43'></a>__sectref__ *id* ?*text*?

    Text markup\. Formats a reference to the section identified by *id*\. If no
    *text* is specified the title of the referenced section is used in the
    output, otherwise *text* is used\.

  - <a name='44'></a>__sectref\-external__ *text*

    Text markup\. Like __sectref__, except that the section is assumed to be
    in a different document and therefore doesn't need to be identified, nor are
    any checks for existence made\. Only the text to format is needed\.

  - <a name='45'></a>__see\_also__ *args*

    Document information\. Anywhere\. The command defines direct cross\-references
    to other documents\. Each argument is a plain text label identifying the
    referenced document\. If this command is used multiple times all the
    arguments accumulate\.

  - <a name='46'></a>__strong__ *text*

    *Deprecated*\. Text markup\. See __emph__ for the canonical command to
    emphasize text\.

  - <a name='47'></a>__subsection__ *name*

    Text structure\. This command starts a new named subsection of a section\. The
    argument has to be plain text\. Implicitly closes the last paragraph coming
    before it and also implicitly opens the first paragraph of the new
    subsection\.

  - <a name='48'></a>__syscmd__ *text*

    Text markup\. The argument text is marked up as the name of an external
    command\. The text may have other markup already applied to it\. Main use is
    the highlighting of external commands in free\-form text\.

  - <a name='49'></a>__[term](\.\./term/term\.md)__ *text*

    Text markup\. The argument is marked up as unspecific terminology\. The text
    may have other markup already applied to it\. Main use is the highlighting of
    important terms and concepts in free\-form text\.

  - <a name='50'></a>__titledesc__ *desc*

    Document information\. Header\. Optional\. Registers the plain text argument as
    the title of the manpage\. Defaults to the value registered by
    __moddesc__\.

  - <a name='51'></a>__tkoption\_def__ *name* *dbname* *dbclass*

    Text structure\. List element\. Widget option list\. Automatically closes the
    previous list element\. Specifies the *name* of the option as used in
    scripts, the name used by the option database \(*dbname*\), and its class
    \(*dbclass*\), i\.e\. its type\. It is expected that the name is marked up
    using __option__\.

  - <a name='52'></a>__[type](\.\./\.\./\.\./\.\./index\.md\#type)__ *text*

    Text markup\. The argument is marked up as the name of a *data type*\. The
    text may have other markup already applied to it\. Main use is the
    highlighting of data types in free\-form text\.

  - <a name='53'></a>__[uri](\.\./uri/uri\.md)__ *text* ?*text*?

    Text markup\. The argument is marked up as an
    *[uri](\.\./\.\./\.\./\.\./index\.md\#uri)* \(i\.e\. a *uniform resource
    identifier*\. The text may have other markup already applied to it\. Main use
    is the highlighting of uris in free\-form text\. The second argument, should
    it be present, will be interpreted the human\-readable description of the
    uri\. In other words, as its label\. Without an explicit label the uri will be
    its own label\.

  - <a name='54'></a>__usage__ *args*

    Text markup\. See __call__ for the full description, this command is
    syntactically identical, as it is in its expectations for the markup of its
    arguments\. In contrast to __call__ it is however not allowed to generate
    output where this command occurs in the text\. The command is *silent*\. The
    formatted text may only appear in a different section of the output, for
    example a table of contents, or synopsis, depending on the output format\.

  - <a name='55'></a>__var__ *text*

    Text markup\. The argument is marked up as the name of a *variable*\. The
    text may have other markup already applied to it\. Main use is the
    highlighting of variables in free\-form text\.

  - <a name='56'></a>__vset__ *varname* *value*

    Templating\. In this form the command sets the named document variable to the
    specified *value*\. It does not generate output\. I\.e\. the command is
    replaced by the empty string\.

  - <a name='57'></a>__vset__ *varname*

    Templating\. In this form the command is replaced by the value of the named
    document variable

  - <a name='58'></a>__[widget](\.\./\.\./\.\./\.\./index\.md\#widget)__ *text*

    Text markup\. The argument is marked up as the name of a
    *[widget](\.\./\.\./\.\./\.\./index\.md\#widget)*\. The text may have other
    markup already applied to it\. Main use is the highlighting of widget names
    in free\-form text\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctools\_intro](doctools\_intro\.md),
[doctools\_lang\_faq](doctools\_lang\_faq\.md),
[doctools\_lang\_intro](doctools\_lang\_intro\.md),
[doctools\_lang\_syntax](doctools\_lang\_syntax\.md)

# <a name='keywords'></a>KEYWORDS

[doctools commands](\.\./\.\./\.\./\.\./index\.md\#doctools\_commands), [doctools
language](\.\./\.\./\.\./\.\./index\.md\#doctools\_language), [doctools
markup](\.\./\.\./\.\./\.\./index\.md\#doctools\_markup),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2010 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctools_lang_faq.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

[//000000001]: # (doctools\_lang\_faq \- Documentation tools)
[//000000002]: # (Generated from file 'doctools\_lang\_faq\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools\_lang\_faq\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools\_lang\_faq \- doctools language faq

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [OVERVIEW](#section2)

      - [What is this document?](#subsection1)

  - [EXAMPLES](#section3)

      - [Where do I find doctools examples?](#subsection2)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

# <a name='section2'></a>OVERVIEW

## <a name='subsection1'></a>What is this document?

This document is currently mainly a placeholder, to be filled with commonly
asked questions about the doctools markup language and companions, and their
answers\.

Please report any questions \(and, if possible, answers\) we should consider for
this document as explained in the section [Bugs, Ideas,
Feedback](#section4) below\.

# <a name='section3'></a>EXAMPLES

## <a name='subsection2'></a>Where do I find doctools examples?

We have no direct examples of documents written using doctools markup\. However
the doctools processor __[dtplite](\.\./\.\./apps/dtplite\.md)__ does
generate a table of contents when processing a set of documents written in
doctools markup\. The intermediate file for it uses doctools markup and is not
deleted when generation completes\. Such files can therefore serve as examples\.

__[dtplite](\.\./\.\./apps/dtplite\.md)__ is distributed as part of Tcllib,
so to get it you need one of

  1. A snapshot of Tcllib\. How to retrieve such a snapshot and the tools
     required for this are described at [Development
     Snapshots](/wiki?name=Development\+Snapshots)

  1. A Tcllib release archive\. They are available at the [home](/home) page\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctools\_lang\_cmdref](doctools\_lang\_cmdref\.md),
[doctools\_lang\_intro](doctools\_lang\_intro\.md),
[doctools\_lang\_syntax](doctools\_lang\_syntax\.md)

# <a name='keywords'></a>KEYWORDS

[doctools commands](\.\./\.\./\.\./\.\./index\.md\#doctools\_commands), [doctools
language](\.\./\.\./\.\./\.\./index\.md\#doctools\_language), [doctools
markup](\.\./\.\./\.\./\.\./index\.md\#doctools\_markup), [doctools
syntax](\.\./\.\./\.\./\.\./index\.md\#doctools\_syntax),
[examples](\.\./\.\./\.\./\.\./index\.md\#examples),
[faq](\.\./\.\./\.\./\.\./index\.md\#faq), [markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[semantic markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctools_lang_intro.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626

[//000000001]: # (doctools\_lang\_intro \- Documentation tools)
[//000000002]: # (Generated from file 'doctools\_lang\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools\_lang\_intro\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools\_lang\_intro \- doctools language introduction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

      - [Fundamentals](#subsection1)

      - [Basic structure](#subsection2)

      - [Advanced structure](#subsection3)

      - [Text structure](#subsection4)

      - [Text markup](#subsection5)

      - [Escapes](#subsection6)

      - [Cross\-references](#subsection7)

      - [Examples](#subsection8)

      - [Lists](#subsection9)

  - [FURTHER READING](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

This document is an informal introduction to version 1 of the doctools markup
language based on a multitude of examples\. After reading this a writer should be
ready to understand the two parts of the formal specification, i\.e\. the
*[doctools language syntax](doctools\_lang\_syntax\.md)* specification and
the *[doctools language command reference](doctools\_lang\_cmdref\.md)*\.

## <a name='subsection1'></a>Fundamentals

In the broadest terms possible the *doctools markup language* is LaTeX\-like,
instead of like SGML and similar languages\. A document written in this language
consists primarily of text, with markup commands embedded into it\.

Each markup command is a Tcl command surrounded by a matching pair of __\[__
and __\]__\. Inside of these delimiters the usual rules for a Tcl command
apply with regard to word quotation, nested commands, continuation lines, etc\.
I\.e\.

    ... [list_begin enumerated] ...

    ... [call [cmd foo] \
            [arg bar]] ...

    ... [term {complex concept}] ...

    ... [opt "[arg key] [arg value]"] ...

## <a name='subsection2'></a>Basic structure

The most simple document which can be written in doctools is

        [manpage_begin NAME SECTION VERSION]
    [see_also doctools_intro]
    [see_also doctools_lang_cmdref]
    [see_also doctools_lang_faq]
    [see_also doctools_lang_syntax]
    [keywords {doctools commands}]
    [keywords {doctools language}]
    [keywords {doctools markup}]
    [keywords {doctools syntax}]
    [keywords markup]
    [keywords {semantic markup}]
        [description]
        [vset CATEGORY doctools]
    [include ../common-text/feedback.inc]
    [manpage_end]

This also shows us that all doctools documents are split into two parts, the
*header* and the *body*\. Everything coming before \[__description__\]
belongs to the header, and everything coming after belongs to the body, with the
whole document bracketed by the two __manpage\_\*__ commands\. Before and after
these opening and closing commands we have only *whitespace*\.

In the remainder of this section we will discuss only the contents of the
header, the structure of the body will be discussed in the section [Text
structure](#subsection4)\.

The header section can be empty, and otherwise may contain only an arbitrary
sequence of the four so\-called *header* commands, plus *whitespace*\. These
commands are

  - __titledesc__

  - __moddesc__

  - __require__

  - __copyright__

They provide, through their arguments, additional information about the
document, like its title, the title of the larger group the document belongs to
\(if applicable\), the requirements of the documented packages \(if applicable\),
and copyright assignments\. All of them can occur multiple times, including none,
and they can be used in any order\. However for __titledesc__ and
__moddesc__ only the last occurrence is taken\. For the other two the
specified information is accumulated, in the given order\. Regular text is not
allowed within the header\.

Given the above a less minimal example of a document is

> \[manpage\_begin NAME SECTION VERSION\]  
> \[__copyright \{YEAR AUTHOR\}__\]  
> \[__titledesc TITLE__\]  
> \[__moddesc   MODULE\_TITLE__\]  
> \[__require   PACKAGE VERSION__\]  
> \[__require   PACKAGE__\]  
> \[description\]  
> \[manpage\_end\]

Remember that the whitespace is optional\. The document

        [manpage_begin NAME SECTION VERSION]
        [copyright {YEAR AUTHOR}][titledesc TITLE][moddesc MODULE_TITLE]
        [require PACKAGE VERSION][require PACKAGE][description]
        [vset CATEGORY doctools]
    [include ../common-text/feedback.inc]
    [manpage_end]

has the same meaning as the example before\.

On the other hand, if *whitespace* is present it consists not only of any
sequence of characters containing the space character, horizontal and vertical
tabs, carriage return, and newline, but it may contain comment markup as well,
in the form of the __[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ command\.

> \[__comment \{ \.\.\. \}__\]  
> \[manpage\_begin NAME SECTION VERSION\]  
> \[copyright \{YEAR AUTHOR\}\]  
> \[titledesc TITLE\]  
> \[moddesc   MODULE\_TITLE\]\[__comment \{ \.\.\. \}__\]  
> \[require   PACKAGE VERSION\]  
> \[require   PACKAGE\]  
> \[description\]  
> \[manpage\_end\]  
> \[__comment \{ \.\.\. \}__\]

## <a name='subsection3'></a>Advanced structure

In the simple examples of the last section we fudged a bit regarding the markup
actually allowed to be used before the __manpage\_begin__ command opening the
document\.

Instead of only whitespace the two templating commands __include__ and
__vset__ are also allowed, to enable the writer to either set and/or import
configuration settings relevant to the document\. I\.e\. it is possible to write

> \[__include FILE__\]  
> \[__vset VAR VALUE__\]  
> \[manpage\_begin NAME SECTION VERSION\]  
> \[description\]  
> \[manpage\_end\]

Even more important, these two commands are allowed anywhere where a markup
command is allowed, without regard for any other structure\. I\.e\. for example in
the header as well\.

> \[manpage\_begin NAME SECTION VERSION\]  
> \[__include FILE__\]  
> \[__vset VAR VALUE__\]  
> \[description\]  
> \[manpage\_end\]

The only restriction __include__ has to obey is that the contents of the
included file must be valid at the place of the inclusion\. I\.e\. a file included
before __manpage\_begin__ may contain only the templating commands
__vset__ and __include__, a file included in the header may contain only
header commands, etc\.

## <a name='subsection4'></a>Text structure

The body of the document consists mainly of text, possibly split into sections,
subsections, and paragraphs, with parts marked up to highlight various semantic
categories of text, and additional structure through the use of examples and
\(nested\) lists\.

This section explains the high\-level structural commands, with everything else
deferred to the following sections\.

The simplest way of structuring the body is through the introduction of
paragraphs\. The command for doing so is __para__\. Each occurrence of this
command closes the previous paragraph and automatically opens the next\. The
first paragraph is automatically opened at the beginning of the body, by
__description__\. In the same manner the last paragraph automatically ends at
__manpage\_end__\.

> \[manpage\_begin NAME SECTION VERSION\]  
> \[description\]  
> &nbsp;\.\.\.  
> \[__para__\]  
> &nbsp;\.\.\.  
> \[__para__\]  
> &nbsp;\.\.\.  
> \[manpage\_end\]

Empty paragraphs are ignored\.

A structure coarser than paragraphs are sections, which allow the writer to
split a document into larger, and labeled, pieces\. The command for doing so is
__section__\. Each occurrence of this command closes the previous section and
automatically opens the next, including its first paragraph\. The first section
is automatically opened at the beginning of the body, by __description__
\(This section is labeled "DESCRIPTION"\)\. In the same manner the last section
automatically ends at __manpage\_end__\.

Empty sections are *not* ignored\. We are free to \(not\) use paragraphs within
sections\.

> \[manpage\_begin NAME SECTION VERSION\]  
> \[description\]  
> &nbsp;\.\.\.  
> \[__section \{Section A\}__\]  
> &nbsp;\.\.\.  
> \[para\]  
> &nbsp;\.\.\.  
> \[__section \{Section B\}__\]  
> &nbsp;\.\.\.  
> \[manpage\_end\]

Between sections and paragraphs we have subsections, to split sections\. The
command for doing so is __subsection__\. Each occurrence of this command
closes the previous subsection and automatically opens the next, including its
first paragraph\. A subsection is automatically opened at the beginning of the
body, by __description__, and at the beginning of each section\. In the same
manner the last subsection automatically ends at __manpage\_end__\.

Empty subsections are *not* ignored\. We are free to \(not\) use paragraphs
within subsections\.

> \[manpage\_begin NAME SECTION VERSION\]  
> \[description\]  
> &nbsp;\.\.\.  
> \[section \{Section A\}\]  
> &nbsp;\.\.\.  
> \[__subsection \{Sub 1\}__\]  
> &nbsp;\.\.\.  
> \[para\]  
> &nbsp;\.\.\.  
> \[__subsection \{Sub 2\}__\]  
> &nbsp;\.\.\.  
> \[section \{Section B\}\]  
> &nbsp;\.\.\.  
> \[manpage\_end\]

## <a name='subsection5'></a>Text markup

Having handled the overall structure a writer can impose on the document we now
take a closer at the text in a paragraph\.

While most often this is just the unadorned content of the document we do have
situations where we wish to highlight parts of it as some type of thing or
other, like command arguments, command names, concepts, uris, etc\.

For this we have a series of markup commands which take the text to highlight as
their single argument\. It should be noted that while their predominant use is
the highlighting of parts of a paragraph they can also be used to mark up the
arguments of list item commands, and of other markup commands\.

The commands available to us are

  - __arg__

    Its argument is a the name of a command argument\.

  - __[class](\.\./\.\./\.\./\.\./index\.md\#class)__

    Its argument is a class name\.

  - __cmd__

    Its argument is a command name \(Tcl command\)\.

  - __const__

    Its argument is a constant\.

  - __emph__

    General, non\-semantic emphasis\.

  - __[file](\.\./\.\./\.\./\.\./index\.md\#file)__

    Its argument is a filename / path\.

  - __fun__

    Its argument is a function name\.

  - __[method](\.\./\.\./\.\./\.\./index\.md\#method)__

    Its argument is a method name

  - __namespace__

    Its argument is namespace name\.

  - __opt__

    Its argument is some optional syntax element\.

  - __option__

    Its argument is a command line switch / widget option\.

  - __[package](\.\./\.\./\.\./\.\./index\.md\#package)__

    Its argument is a package name\.

  - __sectref__

    Its argument is the title of a section or subsection, i\.e\. a section
    reference\.

  - __syscmd__

    Its argument is a command name \(external, system command\)\.

  - __[term](\.\./term/term\.md)__

    Its argument is a concept, or general terminology\.

  - __[type](\.\./\.\./\.\./\.\./index\.md\#type)__

    Its argument is a type name\.

  - __[uri](\.\./uri/uri\.md)__

    Its argument is a uniform resource identifier, i\.e an external reference\. A
    second argument can be used to specify an explicit label for the reference
    in question\.

  - __usage__

    The arguments describe the syntax of a Tcl command\.

  - __var__

    Its argument is a variable\.

  - __[widget](\.\./\.\./\.\./\.\./index\.md\#widget)__

    Its argument is a widget name\.

The example demonstrating the use of text markup is an excerpt from the
*[doctools language command reference](doctools\_lang\_cmdref\.md)*, with
some highlighting added\. It shows their use within a block of text, as the
arguments of a list item command \(__call__\), and our ability to nest them\.

> &nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;\[call \[__cmd arg\_def__\] \[__arg type__\] \[__arg name__\] \[__opt__ \[__arg mode__\]\]\]  
>   
> &nbsp;&nbsp;Text structure\. List element\. Argument list\. Automatically closes the  
> &nbsp;&nbsp;previous list element\. Specifies the data\-\[__arg type__\] of the described  
> &nbsp;&nbsp;argument of a command, its \[__arg name__\] and its i/o\-\[__arg mode__\]\. The  
> &nbsp;&nbsp;latter is optional\.  
> &nbsp;&nbsp;\.\.\.

## <a name='subsection6'></a>Escapes

Beyond the 20 commands for simple markup shown in the previous section we have
two more available which are technically simple markup\. However their function
is not the marking up of phrases as specific types of things, but the insertion
of characters, namely __\[__ and __\]__\. These commands, __lb__ and
__rb__ respectively, are required because our use of \[ and \] to bracket
markup commands makes it impossible to directly use \[ and \] within the text\.

Our example of their use are the sources of the last sentence in the previous
paragraph, with some highlighting added\.

> &nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;These commands, \[cmd lb\] and \[cmd lb\] respectively, are required  
> &nbsp;&nbsp;because our use of \[__lb__\] and \[__rb__\] to bracket markup commands makes it  
> &nbsp;&nbsp;impossible to directly use \[__lb__\] and \[__rb__\] within the text\.  
> &nbsp;&nbsp;\.\.\.

## <a name='subsection7'></a>Cross\-references

The last two commands we have to discuss are for the declaration of
cross\-references between documents, explicit and implicit\. They are
__[keywords](\.\./\.\./\.\./\.\./index\.md\#keywords)__ and __see\_also__\. Both
take an arbitrary number of arguments, all of which have to be plain unmarked
text\. I\.e\. it is not allowed to use markup on them\. Both commands can be used
multiple times in a document\. If that is done all arguments of all occurrences
of one of them are put together into a single set\.

  - __[keywords](\.\./\.\./\.\./\.\./index\.md\#keywords)__

    The arguments of this command are interpreted as keywords describing the
    document\. A processor can use this information to create an index indirectly
    linking the containing document to all documents with the same keywords\.

  - __see\_also__

    The arguments of this command are interpreted as references to other
    documents\. A processor can format them as direct links to these documents\.

All the cross\-reference commands can occur anywhere in the document between
__manpage\_begin__ and __manpage\_end__\. As such the writer can choose
whether she wants to have them at the beginning of the body, or at its end,
maybe near the place a keyword is actually defined by the main content, or
considers them as meta data which should be in the header, etc\.

Our example shows the sources for the cross\-references of this document, with
some highlighting added\. Incidentally they are found at the end of the body\.

> &nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;\[__see\_also doctools\_intro__\]  
> &nbsp;&nbsp;\[__see\_also doctools\_lang\_syntax__\]  
> &nbsp;&nbsp;\[__see\_also doctools\_lang\_cmdref__\]  
> &nbsp;&nbsp;\[__keywords markup \{semantic markup\}__\]  
> &nbsp;&nbsp;\[__keywords \{doctools markup\} \{doctools language\}__\]  
> &nbsp;&nbsp;\[__keywords \{doctools syntax\} \{doctools commands\}__\]  
> &nbsp;&nbsp;\[manpage\_end\]

## <a name='subsection8'></a>Examples

Where ever we can write plain text we can write examples too\. For simple
examples we have the command __example__ which takes a single argument, the
text of the argument\. The example text must not contain markup\. If we wish to
have markup within an example we have to use the 2\-command combination
__example\_begin__ / __example\_end__ instead\.

The first opens an example block, the other closes it, and in between we can
write plain text and use all the regular text markup commands\. Note that text
structure commands are not allowed\. This also means that it is not possible to
embed examples and lists within an example\. On the other hand, we *can* use
templating commands within example blocks to read their contents from a file
\(Remember section [Advanced structure](#subsection3)\)\.

The source for the very first example in this document \(see section
[Fundamentals](#subsection1)\), with some highlighting added, is

> \[__example__ \{  
> &nbsp;&nbsp;&nbsp;&nbsp;\.\.\. \[list\_begin enumerated\] \.\.\.  
> &nbsp;&nbsp;\}\]

Using __example\_begin__ / __example\_end__ this would look like

> \[__example\_begin__\]  
> &nbsp;&nbsp;&nbsp;&nbsp;\.\.\. \[list\_begin enumerated\] \.\.\.  
> &nbsp;&nbsp;\[__example\_end__\]

## <a name='subsection9'></a>Lists

Where ever we can write plain text we can write lists too\. The main commands are
__list\_begin__ to start a list, and __list\_end__ to close one\. The
opening command takes an argument specifying the type of list started it, and
this in turn determines which of the eight existing list item commands are
allowed within the list to start list items\.

After the opening command only whitespace is allowed, until the first list item
command opens the first item of the list\. Each item is a regular series of
paragraphs and is closed by either the next list item command, or the end of the
list\. If closed by a list item command this command automatically opens the next
list item\. A consequence of a list item being a series of paragraphs is that all
regular text markup can be used within a list item, including examples and other
lists\.

The list types recognized by __list\_begin__ and their associated list item
commands are:

  - __arguments__

    \(__arg\_def__\) This opens an *argument \(declaration\) list*\. It is a
    specialized form of a term definition list where the term is an argument
    name, with its type and i/o\-mode\.

  - __commands__

    \(__cmd\_def__\) This opens a *command \(declaration\) list*\. It is a
    specialized form of a term definition list where the term is a command name\.

  - __definitions__

    \(__def__ and __call__\) This opens a general *term definition
    list*\. The terms defined by the list items are specified through the
    argument\(s\) of the list item commands, either general terms, possibly with
    markup \(__def__\), or Tcl commands with their syntax \(__call__\)\.

  - __enumerated__

    \(__enum__\) This opens a general *enumerated list*\.

  - __itemized__

    \(__item__\) This opens a general *itemized list*\.

  - __options__

    \(__opt\_def__\) This opens an *option \(declaration\) list*\. It is a
    specialized form of a term definition list where the term is an option name,
    possibly with the option's arguments\.

  - __tkoptions__

    \(__tkoption\_def__\) This opens a *widget option \(declaration\) list*\. It
    is a specialized form of a term definition list where the term is the name
    of a configuration option for a widget, with its name and class in the
    option database\.

Our example is the source of the definition list in the previous paragraph, with
most of the content in the middle removed\.

> &nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;\[__list\_begin__ definitions\]  
> &nbsp;&nbsp;\[__def__ \[const arg\]\]  
>   
> &nbsp;&nbsp;\(\[cmd arg\_def\]\) This opens an argument \(declaration\) list\. It is a  
> &nbsp;&nbsp;specialized form of a definition list where the term is an argument  
> &nbsp;&nbsp;name, with its type and i/o\-mode\.  
>   
> &nbsp;&nbsp;\[__def__ \[const itemized\]\]  
>   
> &nbsp;&nbsp;\(\[cmd item\]\)  
> &nbsp;&nbsp;This opens a general itemized list\.  
>   
> &nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;\[__def__ \[const tkoption\]\]  
>   
> &nbsp;&nbsp;\(\[cmd tkoption\_def\]\) This opens a widget option \(declaration\) list\. It  
> &nbsp;&nbsp;is a specialized form of a definition list where the term is the name  
> &nbsp;&nbsp;of a configuration option for a widget, with its name and class in the  
> &nbsp;&nbsp;option database\.  
>   
> &nbsp;&nbsp;\[__list\_end__\]  
> &nbsp;&nbsp;\.\.\.

Note that a list cannot begin in one \(sub\)section and end in another\.
Differently said, \(sub\)section breaks are not allowed within lists and list
items\. An example of this *illegal* construct is

> &nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;\[list\_begin itemized\]  
> &nbsp;&nbsp;\[item\]  
> &nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;\[__section \{ILLEGAL WITHIN THE LIST\}__\]  
> &nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;\[list\_end\]  
> &nbsp;&nbsp;\.\.\.

# <a name='section2'></a>FURTHER READING

Now that this document has been digested the reader, assumed to be a *writer*
of documentation should be fortified enough to be able to understand the formal
*[doctools language syntax](doctools\_lang\_syntax\.md)* specification as
well\. From here on out the *[doctools language command
reference](doctools\_lang\_cmdref\.md)* will also serve as the detailed
specification and cheat sheet for all available commands and their syntax\.

To be able to validate a document while writing it, it is also recommended to
familiarize oneself with one of the applications for the processing and
conversion of doctools documents, i\.e\. either Tcllib's easy and simple
__[dtplite](\.\./\.\./apps/dtplite\.md)__, or Tclapps' ultra\-configurable
__dtp__\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctools\_intro](doctools\_intro\.md),
[doctools\_lang\_cmdref](doctools\_lang\_cmdref\.md),
[doctools\_lang\_faq](doctools\_lang\_faq\.md),
[doctools\_lang\_syntax](doctools\_lang\_syntax\.md)

# <a name='keywords'></a>KEYWORDS

[doctools commands](\.\./\.\./\.\./\.\./index\.md\#doctools\_commands), [doctools
language](\.\./\.\./\.\./\.\./index\.md\#doctools\_language), [doctools
markup](\.\./\.\./\.\./\.\./index\.md\#doctools\_markup), [doctools
syntax](\.\./\.\./\.\./\.\./index\.md\#doctools\_syntax),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctools_lang_syntax.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180

[//000000001]: # (doctools\_lang\_syntax \- Documentation tools)
[//000000002]: # (Generated from file 'doctools\_lang\_syntax\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools\_lang\_syntax\(n\) 1\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools\_lang\_syntax \- doctools language syntax

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Fundamentals](#section2)

  - [Lexical definitions](#section3)

  - [Syntax](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

This document contains the formal specification of the syntax of the doctools
markup language, version 1 in Backus\-Naur\-Form\. This document is intended to be
a reference, complementing the *[doctools language command
reference](doctools\_lang\_cmdref\.md)*\. A beginner should read the much more
informally written *[doctools language
introduction](doctools\_lang\_intro\.md)* first before trying to understand
either this document or the command reference\.

# <a name='section2'></a>Fundamentals

In the broadest terms possible the *doctools markup language* is LaTeX\-like,
instead of like SGML and similar languages\. A document written in this language
consists primarily of text, with markup commands embedded into it\.

Each markup command is a just Tcl command surrounded by a matching pair of
__\[__ and __\]__\. Which commands are available, and their arguments, i\.e\.
syntax is specified in the *[doctools language command
reference](doctools\_lang\_cmdref\.md)*\.

In this document we specify first the lexeme, and then the syntax, i\.e\. how we
can mix text and markup commands with each other\.

# <a name='section3'></a>Lexical definitions

In the syntax rules listed in the next section

  1. <TEXT> stands for all text except markup commands\.

  1. Any XXX stands for the markup command \[xxx\] including its arguments\. Each
     markup command is a Tcl command surrounded by a matching pair of __\[__
     and __\]__\. Inside of these delimiters the usual rules for a Tcl command
     apply with regard to word quotation, nested commands, continuation lines,
     etc\.

  1. <WHITE> stands for all text consisting only of spaces, newlines, tabulators
     and the __[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ markup command\.

# <a name='section4'></a>Syntax

The rules listed here specify only the syntax of doctools documents\. The lexical
level of the language was covered in the previous section\.

Regarding the syntax of the \(E\)BNF itself

  1. The construct \{ X \} stands for zero or more occurrences of X\.

  1. The construct \[ X \] stands for zero or one occurrence of X\.

  1. The construct LIST\_BEGIN<X> stands for the markup command
     __list\_begin__ with __X__ as its type argument\.

The syntax:

    manpage = defs
              MANPAGE_BEGIN
              header
              DESCRIPTION
              body
              MANPAGE_END
              { <WHITE> }

    defs    = { INCLUDE | VSET | <WHITE> }

    header  = { TITLEDESC | MODDESC | COPYRIGHT | REQUIRE | defs | xref }

    xref    = KEYWORDS | SEE_ALSO | CATEGORY

    body    = paras { SECTION    sbody  }
    sbody   = paras { SUBSECTION ssbody }
    ssbody  = paras

    paras   = tblock { (PARA | NL) tblock }

    tblock  = { <TEXT> | defs | markup | xref | an_example | a_list }

    markup  = ARG     | CLASS | CMD     | CONST     | EMPH   | FILE
            | FUN     | LB    | METHOD  | NAMESPACE | OPT    | OPTION
            | PACKAGE | RB    | SECTREF | STRONG    | SYSCMD | TERM
            | TYPE    | URI   | USAGE   | VAR       | WIDGET

    example = EXAMPLE
            | EXAMPLE_BEGIN extext EXAMPLE_END

    extext  = { <TEXT> | defs | markup }

    a_list  = LIST_BEGIN<arguments>   argd_list   LIST_END
            | LIST_BEGIN<commands>    cmdd_list   LIST_END
            | LIST_BEGIN<definitions> def_list    LIST_END
            | LIST_BEGIN<enumerated>  enum_list   LIST_END
            | LIST_BEGIN<itemized>    item_list   LIST_END
            | LIST_BEGIN<options>     optd_list   LIST_END
            | LIST_BEGIN<tkoptions>   tkoptd_list LIST_END

    argd_list   = [ <WHITE> ] { ARG_DEF      paras }
    cmdd_list   = [ <WHITE> ] { CMD_DEF      paras }
    def_list    = [ <WHITE> ] { (DEF|CALL)   paras }
    enum_list   = [ <WHITE> ] { ENUM         paras }
    item_list   = [ <WHITE> ] { ITEM         paras }
    optd_list   = [ <WHITE> ] { OPT_DEF      paras }
    tkoptd_list = [ <WHITE> ] { TKOPTION_DEF paras }

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctools\_intro](doctools\_intro\.md),
[doctools\_lang\_cmdref](doctools\_lang\_cmdref\.md),
[doctools\_lang\_faq](doctools\_lang\_faq\.md),
[doctools\_lang\_intro](doctools\_lang\_intro\.md)

# <a name='keywords'></a>KEYWORDS

[doctools commands](\.\./\.\./\.\./\.\./index\.md\#doctools\_commands), [doctools
language](\.\./\.\./\.\./\.\./index\.md\#doctools\_language), [doctools
markup](\.\./\.\./\.\./\.\./index\.md\#doctools\_markup), [doctools
syntax](\.\./\.\./\.\./\.\./index\.md\#doctools\_syntax),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/doctools_plugin_apiref.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484

[//000000001]: # (doctools\_plugin\_apiref \- Documentation tools)
[//000000002]: # (Generated from file 'doctools\_plugin\_apiref\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2010 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools\_plugin\_apiref\(n\) 1\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools\_plugin\_apiref \- doctools plugin API reference

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [OVERVIEW](#section2)

  - [FRONTEND COMMANDS](#section3)

  - [PLUGIN COMMANDS](#section4)

      - [Management commands](#subsection1)

      - [Formatting commands](#subsection2)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__dt\_copyright__](#1)  
[__dt\_file__](#2)  
[__dt\_mainfile__](#3)  
[__dt\_fileid__](#4)  
[__dt\_fmap__ *symfname*](#5)  
[__dt\_format__](#6)  
[__dt\_imgdata__ *key* *extensions*](#7)  
[__dt\_imgdst__ *key* *extensions*](#8)  
[__dt\_imgsrc__ *key* *extensions*](#9)  
[__dt\_lnesting__](#10)  
[__dt\_module__](#11)  
[__dt\_read__ *file*](#12)  
[__dt\_source__ *file*](#13)  
[__dt\_user__](#14)  
[__ex\_cappend__ *text*](#15)  
[__ex\_cget__ *varname*](#16)  
[__ex\_cis__ *cname*](#17)  
[__ex\_cname__](#18)  
[__ex\_cpop__ *cname*](#19)  
[__ex\_cpush__ *cname*](#20)  
[__ex\_cset__ *varname* *value*](#21)  
[__ex\_lb__ ?*newbracket*?](#22)  
[__ex\_rb__ ?*newbracket*?](#23)  
[__fmt\_initialize__](#24)  
[__fmt\_listvariables__](#25)  
[__fmt\_numpasses__](#26)  
[__fmt\_postprocess__ *text*](#27)  
[__fmt\_setup__ *n*](#28)  
[__fmt\_shutdown__](#29)  
[__fmt\_varset__ *varname* *text*](#30)  
[__fmt\_plain\_text__ *text*](#31)  

# <a name='description'></a>DESCRIPTION

This document is intended for *plugin writers*, i\.e\. developers wishing to
write a doctools *[formatting
engine](\.\./\.\./\.\./\.\./index\.md\#formatting\_engine)* for some output format X\.

It specifies the interaction between the __[doctools](doctools\.md)__
package and its plugins, i\.e\. the interface any doctools formatting engine has
to comply with\.

This document deals with version 1 of the interface\.

A reader who is on the other hand more interested in the markup language itself
should start with the *[doctools language
introduction](doctools\_lang\_intro\.md)* and proceed from there to the formal
specifications, i\.e\. the *[doctools language
syntax](doctools\_lang\_syntax\.md)* and the *[doctools language command
reference](doctools\_lang\_cmdref\.md)*\.

# <a name='section2'></a>OVERVIEW

The API for a doctools formatting engine consists of two major sections\.

On the one side we have a set of commands through which the plugin is able to
query the frontend\. These commands are provided by the frontend and linked into
the plugin interpreter\. Please see section [FRONTEND COMMANDS](#section3)
for their detailed specification\.

And on the other side the plugin has to provide its own set of commands which
will then be called by the frontend in a specific sequence while processing
input\. They, again, fall into two categories, management and formatting\. Please
see section [PLUGIN COMMANDS](#section4) and its subsections for their
detailed specification\.

# <a name='section3'></a>FRONTEND COMMANDS

This section specifies the set of commands through which a plugin, also known as
a doctools formatting engine, is able to query the frontend\. These commands are
provided by the frontend and linked into the plugin interpreter\.

I\.e\. a doctools formatting engine can assume that all of the following commands
are present when any of its own commands \(as specified in section [PLUGIN
COMMANDS](#section4)\) are executed\.

Beyond that it can also assume that it has full access to its own safe
interpreter and thus is not able to damage the other parts of the processor, nor
can it damage the filesystem\. It is however able to either kill or hang the
whole process, by exiting, or running an infinite loop\.

Coming back to the imported commands, all the commands with prefix *dt\_*
provide limited access to specific parts of the frontend, whereas the commands
with prefix *ex\_* provide access to the state of the
__[textutil::expander](\.\./textutil/expander\.md)__ object which does the
main parsing of the input within the frontend\. These commands should not be
except under very special circumstances\.

  - <a name='1'></a>__dt\_copyright__

    Query command\. It returns a string containing the copyright information the
    doctools processor was configured with\. The relevant option is
    __\-copyright__\)\.

  - <a name='2'></a>__dt\_file__

    Query command\. It returns the full path of the file containing the input
    currently processed by the engine\. This may be an included file\.

  - <a name='3'></a>__dt\_mainfile__

    Query command\. It returns the full path of the toplevel file containing the
    input currently processed by the engine\.

  - <a name='4'></a>__dt\_fileid__

    Query command\. It returns the name of the file containing the input
    currently processed by the engine, without path, nor extension\.

  - <a name='5'></a>__dt\_fmap__ *symfname*

    Query command\. It returns the actual pathname to use in the output in place
    of the symbolic filename *symfname*\. It will return the unchanged input if
    no mapping was established for *symfname*\.

    The required mappings are established with the method __map__ of a
    frontend, as explained in section __OBJECT METHODS__ of the
    documentation for the package __[doctools](doctools\.md)__\.

  - <a name='6'></a>__dt\_format__

    Query command\. It returns the name of the format associated with the
    doctools formatting engine\.

  - <a name='7'></a>__dt\_imgdata__ *key* *extensions*

    Query command\. Access to the image map\. Looks for an image recorded under
    the *key* and having on the specified *extension*\. If a matching image
    is found its data is returned as the result of the command\. Otherwise an
    empty string is returned\.

  - <a name='8'></a>__dt\_imgdst__ *key* *extensions*

    Query command\. Access to the image map\. Looks for an image recorded under
    the *key* and having on the specified *extension*\. If a matching image
    is found its destination path in the output is returned as the result of the
    command\. Otherwise an empty string is returned\.

  - <a name='9'></a>__dt\_imgsrc__ *key* *extensions*

    Query command\. Access to the image map\. Looks for an image recorded under
    the *key* and having on the specified *extension*\. If a matching image
    is found its origin path is returned as the result of the command\. Otherwise
    an empty string is returned\.

  - <a name='10'></a>__dt\_lnesting__

    Query command\. It returns the number of lists currently open\.

  - <a name='11'></a>__dt\_module__

    Query command\. It returns the name of the module the input currently
    processed belongs to\.

  - <a name='12'></a>__dt\_read__ *file*

    Controlled filesystem access\. Returns contents of *file* for whatever use
    desired by the plugin\. Only files which are either in the same directory as
    the file containing the engine, or below it, can be loaded\. Trying to load a
    file outside of this directory causes an error\.

  - <a name='13'></a>__dt\_source__ *file*

    Controlled filesystem access\. This command allows the doctools formatting
    engine to load additional Tcl code it may need\. Only files which are either
    in the same directory as the file containing the engine, or below it, can be
    loaded\. Trying to load a file outside of this directory causes an error\.

  - <a name='14'></a>__dt\_user__

    Query command\. It returns the name of the current user as known to the tcl
    interpreter the frontend controlling the formatting engine resides in\.

  - <a name='15'></a>__ex\_cappend__ *text*

    Appends a string to the output in the current context\. This command should
    rarely be used by macros or application code\.

  - <a name='16'></a>__ex\_cget__ *varname*

    Retrieves the value of variable *varname*, defined in the current context\.

  - <a name='17'></a>__ex\_cis__ *cname*

    Determines whether or not the name of the current context is *cname*\.

  - <a name='18'></a>__ex\_cname__

    Returns the name of the current context\.

  - <a name='19'></a>__ex\_cpop__ *cname*

    Pops a context from the context stack, returning all accumulated output in
    that context\. The context must be named *cname*, or an error results\.

  - <a name='20'></a>__ex\_cpush__ *cname*

    Pushes a context named *cname* onto the context stack\. The context must be
    popped by __cpop__ before expansion ends or an error results\.

  - <a name='21'></a>__ex\_cset__ *varname* *value*

    Sets variable *varname* to *value* in the current context\.

  - <a name='22'></a>__ex\_lb__ ?*newbracket*?

    Returns the current value of the left macro expansion bracket; this is for
    use as or within a macro, when the bracket needs to be included in the
    output text\. If *newbracket* is specified, it becomes the new bracket, and
    is returned\.

  - <a name='23'></a>__ex\_rb__ ?*newbracket*?

    Returns the current value of the right macro expansion bracket; this is for
    use as or within a macro, when the bracket needs to be included in the
    output text\. If *newbracket* is specified, it becomes the new bracket, and
    is returned\.

# <a name='section4'></a>PLUGIN COMMANDS

The plugin has to provide its own set of commands which will then be called by
the frontend in a specific sequence while processing input\. They fall into two
categories, management and formatting\. Their expected names, signatures, and
responsibilities are specified in the following two subsections\.

## <a name='subsection1'></a>Management commands

The management commands a plugin has to provide are used by the frontend to

  1. initialize and shutdown the plugin

  1. determine the number of passes it has to make over the input

  1. initialize and shutdown each pass

  1. query and initialize engine parameters

After the plugin has been loaded and the frontend commands are established the
commands will be called in the following sequence:

    fmt_numpasses -> n
    fmt_listvariables -> vars

    fmt_varset var1 value1
    fmt_varset var2 value2
    ...
    fmt_varset varK valueK
    fmt_initialize
    fmt_setup 1
    ...
    fmt_setup 2
    ...
    ...
    fmt_setup n
    ...
    fmt_postprocess
    fmt_shutdown
    ...

I\.e\. first the number of passes and the set of available engine parameters is
established, followed by calls setting the parameters\. That second part is
optional\.

After that the plugin is initialized, the specified number of passes executed,
the final result run through a global post processing step and at last the
plugin is shutdown again\. This can be followed by more conversions, restarting
the sequence at __fmt\_varset__\.

In each of the passes, i\.e\. after the calls of __fmt\_setup__ the frontend
will process the input and call the formatting commands as markup is
encountered\. This means that the sequence of formatting commands is determined
by the grammar of the doctools markup language, as specified in the *[doctools
language syntax](doctools\_lang\_syntax\.md)* specification\.

A different way of looking at the sequence is:

  - First some basic parameters are determined\.

  - Then everything starting at the first __fmt\_varset__ to
    __fmt\_shutdown__ forms a *run*, the formatting of a single input\. Each
    run can be followed by more\.

  - Embedded within each run we have one or more *passes*, each starting with
    __fmt\_setup__ and going until either the next __fmt\_setup__ or
    __fmt\_postprocess__ is reached\.

    If more than one pass is required to perform the formatting only the output
    of the last pass is relevant\. The output of all the previous, preparatory
    passes is ignored\.

The commands, their names, signatures, and responsibilities are, in detail:

  - <a name='24'></a>__fmt\_initialize__

    *Initialization/Shutdown*\. This command is called at the beginning of
    every conversion run, as the first command of that run\. Note that a run is
    not a pass, but may consist of multiple passes\. It has to initialize the
    general state of the plugin, beyond the initialization done during the load\.
    No return value is expected, and any returned value is ignored\.

  - <a name='25'></a>__fmt\_listvariables__

    *Initialization/Shutdown* and *Engine parameters*\. Second command is
    called after the plugin code has been loaded, i\.e\. immediately after
    __fmt\_numpasses__\. It has to return a list containing the names of the
    parameters the frontend can set to configure the engine\. This list can be
    empty\.

  - <a name='26'></a>__fmt\_numpasses__

    *Initialization/Shutdown* and *Pass management*\. First command called
    after the plugin code has been loaded\. No other command of the engine will
    be called before it\. It has to return the number of passes this engine
    requires to fully process the input document\. This value has to be an
    integer number greater or equal to one\.

  - <a name='27'></a>__fmt\_postprocess__ *text*

    *Initialization/Shutdown*\. This command is called immediately after the
    last pass in a run\. Its argument is the result of the conversion generated
    by that pass\. It is provided to allow the engine to perform any global
    modifications of the generated document\. If no post\-processing is required
    for a specific format the command has to just return the argument\.

    Expected to return a value, the final result of formatting the input\.

  - <a name='28'></a>__fmt\_setup__ *n*

    *Initialization/Shutdown* and *Pass management*\. This command is called
    at the beginning of each pass over the input in a run\. Its argument is the
    number of the pass which has begun\. Passes are counted from __1__
    upward\. The command has to set up the internal state of the plugin for this
    particular pass\. No return value is expected, and any returned value is
    ignored\.

  - <a name='29'></a>__fmt\_shutdown__

    *Initialization/Shutdown*\. This command is called at the end of every
    conversion run\. It is the last command called in a run\. It has to clean up
    of all the run\-specific state in the plugin\. After the call the engine has
    to be in a state which allows the initiation of another run without fear
    that information from the last run is leaked into this new run\. No return
    value is expected, and any returned value is ignored\.

  - <a name='30'></a>__fmt\_varset__ *varname* *text*

    *Engine parameters*\. This command is called by the frontend to set an
    engine parameter to a particular value\. The parameter to change is specified
    by *varname*, the value to set in *text*\.

    The command has to throw an error if an unknown *varname* is used\. Only
    the names returned by __fmt\_listvariables__ have to be considered as
    known\.

    The values of all engine parameters have to persist between passes and runs\.

## <a name='subsection2'></a>Formatting commands

The formatting commands have to implement the formatting for the output format,
for all the markup commands of the doctools markup language, except __lb__,
__rb__, __vset__, __include__, and
__[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__\. These exceptions are
processed by the frontend and are never seen by the plugin\. In return a command
for the formatting of plain text has to be provided, something which has no
markup in the input at all\.

This means, that each of the 49 markup commands specified in the *[doctools
language command reference](doctools\_lang\_cmdref\.md)* and outside of the set
of exceptions listed above has an equivalent formatting command which takes the
same arguments as the markup command and whose name is the name of markup
command with the prefix *fmt\_* added to it\.

All commands are expected to format their input in some way per the semantics
specified in the command reference and to return whatever part of this that they
deem necessary as their result, which will be added to the output\.

To avoid essentially duplicating the command reference we do not list any of the
command here and simply refer the reader to the *[doctools language command
reference](doctools\_lang\_cmdref\.md)* for their signature and description\.
The sole exception is the plain text formatter, which has no equivalent markup
command\.

The calling sequence of formatting commands is not as rigid as for the
management commands, but determined by the grammar of the doctools markup
language, as specified in the *[doctools language
syntax](doctools\_lang\_syntax\.md)* specification\.

  - <a name='31'></a>__fmt\_plain\_text__ *text*

    *No associated markup command*\.

    Called by the frontend for any plain text encountered in the input\. It has
    to perform any and all special processing required for plain text\.

    The formatted text is expected as the result of the command, and added to
    the output\. If no special processing is required it has to simply return its
    argument without change\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctools](doctools\.md), [doctools\_intro](doctools\_intro\.md),
[doctools\_lang\_cmdref](doctools\_lang\_cmdref\.md),
[doctools\_lang\_faq](doctools\_lang\_faq\.md),
[doctools\_lang\_intro](doctools\_lang\_intro\.md),
[doctools\_lang\_syntax](doctools\_lang\_syntax\.md)

# <a name='keywords'></a>KEYWORDS

[document](\.\./\.\./\.\./\.\./index\.md\#document),
[formatter](\.\./\.\./\.\./\.\./index\.md\#formatter), [formatting
engine](\.\./\.\./\.\./\.\./index\.md\#formatting\_engine),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2010 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools/mpexpand.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142

[//000000001]: # (mpexpand \- Documentation toolbox)
[//000000002]: # (Generated from file 'mpexpand\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2003 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (mpexpand\(n\) 1\.0 tcllib "Documentation toolbox")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

mpexpand \- Markup processor

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [NOTES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__mpexpand__ ?\-module *module*? *format* *infile*&#124;\- *outfile*&#124;\-](#1)  
[__mpexpand\.all__ ?*\-verbose*? ?*module*?](#2)  

# <a name='description'></a>DESCRIPTION

This manpage describes a processor / converter for manpages in the doctools
format as specified in __doctools\_fmt__\. The processor is based upon the
package __[doctools](doctools\.md)__\.

  - <a name='1'></a>__mpexpand__ ?\-module *module*? *format* *infile*&#124;\- *outfile*&#124;\-

    The processor takes three arguments, namely the code describing which
    formatting to generate as the output, the file to read the markup from, and
    the file to write the generated output into\. If the *infile* is
    "__\-__" the processor will read from __stdin__\. If *outfile* is
    "__\-__" the processor will write to __stdout__\.

    If the option *\-module* is present its value overrides the internal
    definition of the module name\.

    The currently known output formats are

      * __nroff__

        The processor generates \*roff output, the standard format for unix
        manpages\.

      * __html__

        The processor generates HTML output, for usage in and display by web
        browsers\.

      * __tmml__

        The processor generates TMML output, the Tcl Manpage Markup Language, a
        derivative of XML\.

      * __latex__

        The processor generates LaTeX output\.

      * __wiki__

        The processor generates Wiki markup as understood by __wikit__\.

      * __list__

        The processor extracts the information provided by
        __manpage\_begin__\.

      * __null__

        The processor does not generate any output\.

  - <a name='2'></a>__mpexpand\.all__ ?*\-verbose*? ?*module*?

    This command uses __mpexpand__ to generate all possible output formats
    for all manpages in the current directory\. The manpages are recognized
    through the extension "\.man"\. If *\-verbose* is specified the command will
    list its actions before executing them\.

    The *module* information is passed to __mpexpand__\.

# <a name='section2'></a>NOTES

Possible future formats are plain text, pdf and postscript\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

expander\(n\), format\(n\), formatter\(n\)

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html), [TMML](\.\./\.\./\.\./\.\./index\.md\#tmml),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>  
Copyright &copy; 2003 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2base/html_cssdefaults.md.

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
89
90

[//000000001]: # (doctools::html::cssdefaults \- Documentation tools)
[//000000002]: # (Generated from file 'html\_cssdefaults\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::html::cssdefaults\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::html::cssdefaults \- Default CSS style for HTML export plugins

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::html::cssdefaults ?0\.1?  

[__::doctools::html::cssdefaults::contents__](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a single command providing access to the text of the
default CSS style to use for HTML markup generated by the various HTML export
plugins\.

This is an internal package of doctools, for use by
*[export](\.\./\.\./\.\./\.\./index\.md\#export)* plugins, i\.e\. the packages
converting doctools related documented into other formats, most notably
*[HTML](\.\./\.\./\.\./\.\./index\.md\#html)*\.

# <a name='section2'></a>API

  - <a name='1'></a>__::doctools::html::cssdefaults::contents__

    This command returns the text of the default CSS style to use for HTML
    markup generated by the various HTML export plugins\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[CSS](\.\./\.\./\.\./\.\./index\.md\#css), [HTML](\.\./\.\./\.\./\.\./index\.md\#html),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin),
[style](\.\./\.\./\.\./\.\./index\.md\#style)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































Deleted embedded/md/tcllib/files/modules/doctools2base/nroff_manmacros.md.

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
89
90
91

[//000000001]: # (doctools::nroff::man\_macros \- Documentation tools)
[//000000002]: # (Generated from file 'nroff\_manmacros\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::nroff::man\_macros\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::nroff::man\_macros \- Default CSS style for NROFF export plugins

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::nroff::man\_macros ?0\.1?  

[__::doctools::nroff::man\_macros::contents__](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a single command providing access to the definition of the
nroff *man* macro set to use for NROFF markup generated by the various NROFF
export plugins\.

This is an internal package of doctools, for use by
*[export](\.\./\.\./\.\./\.\./index\.md\#export)* plugins, i\.e\. the packages
converting doctools related documented into other formats, most notably
*[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff)*\.

# <a name='section2'></a>API

  - <a name='1'></a>__::doctools::nroff::man\_macros::contents__

    This command returns the text of the default CSS style to use for NROFF
    generated by the various NROFF export plugins\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[macros](\.\./\.\./\.\./\.\./index\.md\#macros),
[man\_macros](\.\./\.\./\.\./\.\./index\.md\#man\_macros),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































Deleted embedded/md/tcllib/files/modules/doctools2base/tcl_parse.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

[//000000001]: # (doctools::tcl::parse \- Documentation tools)
[//000000002]: # (Generated from file 'tcl\_parse\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::tcl::parse\(n\) 1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::tcl::parse \- Processing text in 'subst \-novariables' format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error format](#section3)

  - [Tree Structure](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit  
package require fileutil  
package require logger  
package require struct::list  
package require struct::stack  
package require struct::set  
package require treeql  
package require doctools::tcl::parse  

[__::doctools::tcl::parse__ __text__ *tree* *text* ?*root*?](#1)  
[__::doctools::tcl::parse__ __file__ *tree* *path* ?*root*?](#2)  

# <a name='description'></a>DESCRIPTION

This package provides commands for parsing text with embedded Tcl commands as
accepted by the Tcl builtin command __subst \-novariables__\. The result of
the parsing is an abstract syntax tree\.

This is an internal package of doctools, for use by the higher level parsers
processing the *[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)*,
*[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)*, and
*[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* markup languages\.

# <a name='section2'></a>API

  - <a name='1'></a>__::doctools::tcl::parse__ __text__ *tree* *text* ?*root*?

    The command takes the *text* and parses it under the assumption that it
    contains a string acceptable to the Tcl builtin command __subst
    \-novariables__\. Errors are thrown otherwise during the parsing\. The format
    used for these errors in described in section [Error
    format](#section3)\.

    The command returns the empty string as it result\. The actual result of the
    parsing is entered into the tree structure *tree*, under the node
    *root*\. If *root* is not specified the root of *tree* is used\. The
    *tree* has to exist and be the command of a tree object which supports the
    same methods as trees created by the package
    __[struct::tree](\.\./struct/struct\_tree\.md)__\.

    In case of errors *tree* will be left in an undefined state\.

  - <a name='2'></a>__::doctools::tcl::parse__ __file__ *tree* *path* ?*root*?

    The same as __text__, except that the text to parse is read from the
    file specified by *path*\.

# <a name='section3'></a>Error format

When the parser encounters a problem in the input it will throw an error using
the format described here\.

  1. The message will contain the reason for the problem \(unexpected character
     or end of input in input\), the character in question, if any, and the line
     and column the problem was found at, in a human readable form\. This part is
     not documented further as its format may change as we see fit\. It is
     intended for human consumption, not machine\.

  1. The error code however will contain a machine\-readable representation of
     the problem, in the form of a 5\-element list containing, in the order
     listed below

       1) the constant string __doctools::tcl::parse__

       1) the cause of the problem, one of

            - __char__

              Unexpected character in input

            - __eof__

              Unexpected end of the input

       1) The location of the problem as offset from the beginning of the input,
          counted in characters\. Note: Line markers count as one character\.

       1) The line the problem was found on \(counted from 1 \(one\)\),

       1) The column the problem was found at \(counted from 0 \(zero\)\)

# <a name='section4'></a>Tree Structure

After successfully parsing a string the generated tree will have the following
structure:

  1. In the following items the word 'root' refers to the node which was
     specified as the root of the tree when invoking either __text__ or
     __file__\. This may be the actual root of the tree\.

  1. All the following items further ignore the possibility of pre\-existing
     attributes in the pre\-existing nodes\. If attributes exists with the same
     names as the attributes used by the parser the pre\-existing values are
     written over\. Attributes with names not clashing with the parser's
     attributes are not touched\.

  1. The root node has no attributes\.

  1. All other nodes have the attributes

       - type

         The value is a string from the set \{ Command , Text , Word \}

       - range

         The value is either empty or a 2\-element list containing integer
         numbers\. The numbers are the offsets of the first and last character in
         the input text, of the token described by the node,\.

       - line

         The value is an integer, it describes the line in the input the token
         described by the node ends on\. Lines are counted from 1 \(__one__\)\.

       - col

         The value is an integer, it describes the column in the line in the
         input the token described by the node ends on\. Columns are counted from
         0 \(__zero__\)\.

  1. The children of the root, if any, are of type Command and Text, in
     semi\-alternation\. This means: After a Text node a Command node has to
     follow, and anything can follow a Command node, a Text or other Command
     node\.

  1. The children of a Command node, if any, are of type Command, and Text, and
     Word, they describe the arguments of the command\.

  1. The children of a Word node, if any, are of type Command, Text, in
     semi\-alternation\. This means: After a Text node a Command node has to
     follow, and anything can follow a Command node, a Text or other Command
     node\.

  1. A Word node without children represents the empty string\.

  1. All Text nodes are leaves of the tree\.

  1. All leaves of the tree are either Text or Command nodes\. Word nodes cannot
     be leaves\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Tcl syntax](\.\./\.\./\.\./\.\./index\.md\#tcl\_syntax),
[command](\.\./\.\./\.\./\.\./index\.md\#command),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser),
[subst](\.\./\.\./\.\./\.\./index\.md\#subst), [word](\.\./\.\./\.\./\.\./index\.md\#word)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2base/tcllib_msgcat.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

[//000000001]: # (doctools::msgcat \- Documentation tools)
[//000000002]: # (Generated from file 'tcllib\_msgcat\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::msgcat\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::msgcat \- Message catalog management for the various document parsers

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require msgcat  
package require doctools::msgcat ?0\.1?  

[__::doctools::msgcat::init__ *prefix*](#1)  

# <a name='description'></a>DESCRIPTION

The package __doctools::msgcat__ is a support module handling the selection
of message catalogs for the various document processing packages in the doctools
system version 2\. As such it is an internal package a regular user \(developer\)
should not be in direct contact with\.

If you are such please go the documentation of either

  1. __doctools::doc__,

  1. __[doctools::toc](\.\./doctools/doctoc\.md)__, or

  1. __[doctools::idx](\.\./doctools2idx/idx\_container\.md)__

Within the system architecture this package resides under the various parser
packages, and is shared by them\. Underneath it, but not explicit dependencies,
are the packages providing the message catalogs for the various languages\.

# <a name='section2'></a>API

  - <a name='1'></a>__::doctools::msgcat::init__ *prefix*

    The command locates and loads the message catalogs for all the languages
    returned by __msgcat::mcpreferences__, provided that they could be
    found\. It returns an integer number describing how many packages were found
    and loaded\.

    The names of the packages the command will look for have the form
    "doctools::msgcat::*prefix*::__langcode__", with *prefix* the
    argument to the command, and the __langcode__ supplied by the result of
    __msgcat::mcpreferences__\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[catalog package](\.\./\.\./\.\./\.\./index\.md\#catalog\_package),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[i18n](\.\./\.\./\.\./\.\./index\.md\#i18n),
[internationalization](\.\./\.\./\.\./\.\./index\.md\#internationalization),
[l10n](\.\./\.\./\.\./\.\./index\.md\#l10n),
[localization](\.\./\.\./\.\./\.\./index\.md\#localization), [message
catalog](\.\./\.\./\.\./\.\./index\.md\#message\_catalog), [message
package](\.\./\.\./\.\./\.\./index\.md\#message\_package)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/export_docidx.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253

[//000000001]: # (doctools::idx::export::docidx \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::export::docidx\(n\) 0\.2\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::export::docidx \- docidx export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [\[docidx\] notation of keyword indices](#section3)

  - [Configuration](#section4)

  - [Keyword index serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::idx::export::docidx ?0\.2\.1?  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools keyword index export plugin for the
generation of docidx markup\.

This is an internal package of doctools, for use by the higher level management
packages handling keyword indices, especially
__[doctools::idx::export](idx\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::idx::export](idx\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the docidx
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a keyword index, as
    specified in section [Keyword index serialization format](#section5),
    and contained in *serial*, the *configuration*, a dictionary, and
    generates docidx markup encoding the index\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>\[docidx\] notation of keyword indices

The docidx format for keyword indices, also called the *docidx markup
language*, is too large to be covered in single section\. The interested reader
should start with the document

  1. *[docidx language introduction](\.\./doctools/docidx\_lang\_intro\.md)*

and then proceed from there to the formal specifications, i\.e\. the documents

  1. *[docidx language syntax](\.\./doctools/docidx\_lang\_syntax\.md)* and

  1. *[docidx language command
     reference](\.\./doctools/docidx\_lang\_cmdref\.md)*\.

to get a thorough understanding of the language\.

# <a name='section4'></a>Configuration

The docidx export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - string *user*

    This standard configuration variable contains the name of the user running
    the process which invoked the export plugin\. The plugin puts this
    information into the provenance comment at the beginning of the generated
    document\.

  - string *file*

    This standard configuration variable contains the name of the file the index
    came from\. This variable may not be set or contain the empty string\. The
    plugin puts this information, if defined, i\.e\. set and not the empty string,
    into the provenance comment at the beginning of the generated document\.

  - boolean *newlines*

    If this flag is set the plugin will break the generated docidx code across
    lines, with each markup command on a separate line\.

    If this flag is not set \(the default\), the whole document will be written on
    a single line, with minimum spacing between all elements\.

  - boolean *indented*

    If this flag is set the plugin will indent the markup commands according to
    the structure of indices\. To make this work this also implies that
    __newlines__ is set\. This effect is independent of the value for
    __aligned__ however\.

    If this flag is not set \(the default\), the output is formatted as per the
    values of __newlines__ and __aligned__, and no indenting is done\.

  - boolean *aligned*

    If this flag is set the generator ensures that the arguments for the
    __[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage)__ and
    __[url](\.\./\.\./\.\./\.\./index\.md\#url)__ commands in a keyword section
    are aligned vertically for a nice table effect\. To make this work this also
    implies that __newlines__ is set\. This effect is independent of the
    value for __indented__ however\.

    If this flag is not set \(the default\), the output is formatted as per the
    values of __newlines__ and __indented__, and no alignment is done\.

*Note* that this plugin ignores the standard configuration variables
__format__, and __map__, and their values\.

# <a name='section5'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[index](\.\./\.\./\.\./\.\./index\.md\#index),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_container.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443

[//000000001]: # (doctools::idx \- Documentation tools)
[//000000002]: # (Generated from file 'idx\_container\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx\(n\) 2 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx \- Holding keyword indices

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Concepts](#section2)

  - [API](#section3)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

  - [Keyword index serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require doctools::idx ?2?  
package require Tcl 8\.4  
package require doctools::idx::structure  
package require snit  

[__::doctools::idx__ *objectName*](#1)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __key add__ *name*](#4)  
[*objectName* __key remove__ *name*](#5)  
[*objectName* __key references__ *name*](#6)  
[*objectName* __keys__](#7)  
[*objectName* __reference add__ *type* *key* *name* *label*](#8)  
[*objectName* __reference remove__ *name*](#9)  
[*objectName* __reference label__ *name*](#10)  
[*objectName* __reference keys__ *name*](#11)  
[*objectName* __reference type__ *name*](#12)  
[*objectName* __references__](#13)  
[*objectName* __title__](#14)  
[*objectName* __title__ *text*](#15)  
[*objectName* __label__](#16)  
[*objectName* __label__ *text*](#17)  
[*objectName* __importer__](#18)  
[*objectName* __importer__ *object*](#19)  
[*objectName* __exporter__](#20)  
[*objectName* __exporter__ *object*](#21)  
[*objectName* __deserialize =__ *data* ?*format*?](#22)  
[*objectName* __deserialize \+=__ *data* ?*format*?](#23)  
[*objectName* __serialize__ ?*format*?](#24)  

# <a name='description'></a>DESCRIPTION

This package provides a class to contain and programmatically manipulate keyword
indices

This is one of the three public pillars the management of keyword indices
resides on\. The other two pillars are

  1. *[Exporting keyword indices](idx\_export\.md)*, and

  1. *[Importing keyword indices](idx\_import\.md)*

For information about the [Concepts](#section2) of keyword indices, and
their parts, see the same\-named section\. For information about the data
structure which is used to encode keyword indices as values see the section
[Keyword index serialization format](#section4)\. This is the only format
directly known to this class\. Conversions from and to any other format are
handled by export and import manager objects\. These may be attached to a
container, but do not have to be, it is merely a convenience\.

# <a name='section2'></a>Concepts

  1. A *[keyword index](\.\./\.\./\.\./\.\./index\.md\#keyword\_index)* consists of a
     \(possibly empty\) set of *[keywords](\.\./\.\./\.\./\.\./index\.md\#keywords)*\.

  1. Each keyword in the set is identified by its name\.

  1. Each keyword has a \(possibly empty\) set of *references*\.

  1. A reference can be associated with more than one keyword\.

  1. A reference not associated with at least one keyword is not possible
     however\.

  1. Each reference is identified by its target, specified as either an url or
     symbolic filename, depending on the type of reference \(__url__, or
     __manpage__\)\.

  1. The type of a reference \(url, or manpage\) depends only on the reference
     itself, and not the keywords it is associated with\.

  1. In addition to a type each reference has a descriptive label as well\. This
     label depends only on the reference itself, and not the keywords it is
     associated with\.

A few notes

  1. Manpage references are intended to be used for references to the documents
     the index is made for\. Their target is a symbolic file name identifying the
     document, and export plugins may replace symbolic with actual file names,
     if specified\.

  1. Url references are intended on the othre hand are inteded to be used for
     links to anything else, like websites\. Their target is an url\.

  1. While url and manpage references share a namespace for their identifiers,
     this should be no problem, given that manpage identifiers are symbolic
     filenames and as such they should never look like urls, the identifiers for
     url references\.

# <a name='section3'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__::doctools::idx__ *objectName*

    This command creates a new container object with an associated Tcl command
    whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

## <a name='subsection2'></a>Object command

All objects created by the __::doctools::idx__ command have the following
general form:

  - <a name='2'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='4'></a>*objectName* __key add__ *name*

    This method adds the keyword *name* to the index\. If the keyword is
    already known nothing is done\. The result of the method is the empty string\.

  - <a name='5'></a>*objectName* __key remove__ *name*

    This method removes the keyword *name* from the index\. If the keyword is
    already gone nothing is done\. Any references for whom this keyword was the
    last association are removed as well\. The result of the method is the empty
    string\.

  - <a name='6'></a>*objectName* __key references__ *name*

    This method returns a list containing the names of all references associated
    with the keyword *name*\. An error is thrown in the keyword is not known to
    the index\. The order of the references in the list is undefined\.

  - <a name='7'></a>*objectName* __keys__

    This method returns a list containing the names of all keywords known to the
    index\. The order of the keywords in the list is undefined\.

  - <a name='8'></a>*objectName* __reference add__ *type* *key* *name* *label*

    This method adds the reference *name* to the index and associates it with
    the keyword *key*\. The other two arguments hold the *type* and *label*
    of the reference, respectively\. The type has to match the stored
    information, should the reference exist already, i\.e\. this information is
    immutable after the reference is known\. The only way to change it is delete
    and recreate the reference\. The label on the other hand is automatically
    updated to the value of the argument, overwriting any previously stored
    information\. Should the reference exists already it is simply associated
    with the *key*\. If that is true already as well nothing is done, but the
    *label* updated to the new value\. The result of the method is the empty
    string\.

    The *type* argument has be to one of __manpage__ or __url__\.

  - <a name='9'></a>*objectName* __reference remove__ *name*

    The reference *name* is removed from the index\. All associations with
    keywords are released and the relevant reference labels removed\. The result
    of the method is the empty string\.

  - <a name='10'></a>*objectName* __reference label__ *name*

    This method returns the label associated with the reference *name*\. An
    error is thrown if the reference is not known\.

  - <a name='11'></a>*objectName* __reference keys__ *name*

    This method returns a list containing the names of all keywords associated
    with the reference *name*\. An error is thrown in the reference is not
    known to the index\. The order of the keywords in the list is undefined\.

  - <a name='12'></a>*objectName* __reference type__ *name*

    This method returns the type of the reference *name*\. An error is thrown
    in the reference is not known to the index\.

  - <a name='13'></a>*objectName* __references__

    This method returns a list containing the names of all references known to
    the index\. The order of the references in the list is undefined\.

  - <a name='14'></a>*objectName* __title__

    Returns the currently defined title of the keyword index\.

  - <a name='15'></a>*objectName* __title__ *text*

    Sets the title of the keyword index to *text*, and returns it as the
    result of the command\.

  - <a name='16'></a>*objectName* __label__

    Returns the currently defined label of the keyword index\.

  - <a name='17'></a>*objectName* __label__ *text*

    Sets the label of the keyword index to *text*, and returns it as the
    result of the command\.

  - <a name='18'></a>*objectName* __importer__

    Returns the import manager object currently attached to the container, if
    any\.

  - <a name='19'></a>*objectName* __importer__ *object*

    Attaches the *object* as import manager to the container, and returns it
    as the result of the command\. Note that the *object* is *not* put into
    ownership of the container\. I\.e\., destruction of the container will *not*
    destroy the *object*\.

    It is expected that *object* provides a method named __import text__
    which takes a text and a format name, and returns the canonical
    serialization of the keyword index contained in the text, assuming the given
    format\.

  - <a name='20'></a>*objectName* __exporter__

    Returns the export manager object currently attached to the container, if
    any\.

  - <a name='21'></a>*objectName* __exporter__ *object*

    Attaches the *object* as export manager to the container, and returns it
    as the result of the command\. Note that the *object* is *not* put into
    ownership of the container\. I\.e\., destruction of the container will *not*
    destroy the *object*\.

    It is expected that *object* provides a method named __export object__
    which takes the container and a format name, and returns a text encoding
    keyword index stored in the container, in the given format\. It is further
    expected that the *object* will use the container's method
    __serialize__ to obtain the serialization of the keyword index from
    which to generate the text\.

  - <a name='22'></a>*objectName* __deserialize =__ *data* ?*format*?

    This method replaces the contents of the index object with the index
    contained in the *data*\. If no *format* was specified it is assumed to
    be the regular serialization of a keyword index\.

    Otherwise the object will use the attached import manager to convert the
    data from the specified format to a serialization it can handle\. In that
    case an error will be thrown if the container has no import manager attached
    to it\.

    The result of the method is the empty string\.

  - <a name='23'></a>*objectName* __deserialize \+=__ *data* ?*format*?

    This method behaves like __deserialize =__ in its essentials, except
    that it merges the keyword index in the *data* to its contents instead of
    replacing it\. The method will throw an error if merging is not possible,
    i\.e\. would produce an invalid index\. The existing content is left unchanged
    in that case\.

    The result of the method is the empty string\.

  - <a name='24'></a>*objectName* __serialize__ ?*format*?

    This method returns the keyword index contained in the object\. If no
    *format* is not specified the returned result is the canonical
    serialization of its contents\.

    Otherwise the object will use the attached export manager to convert the
    data to the specified format\. In that case an error will be thrown if the
    container has no export manager attached to it\.

# <a name='section4'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html), [TMML](\.\./\.\./\.\./\.\./index\.md\#tmml),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion), [docidx
markup](\.\./\.\./\.\./\.\./index\.md\#docidx\_markup),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[generation](\.\./\.\./\.\./\.\./index\.md\#generation),
[index](\.\./\.\./\.\./\.\./index\.md\#index), [json](\.\./\.\./\.\./\.\./index\.md\#json),
[keyword index](\.\./\.\./\.\./\.\./index\.md\#keyword\_index),
[latex](\.\./\.\./\.\./\.\./index\.md\#latex),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin),
[reference](\.\./\.\./\.\./\.\./index\.md\#reference), [tcler's
wiki](\.\./\.\./\.\./\.\./index\.md\#tcler\_s\_wiki),
[text](\.\./\.\./\.\./\.\./index\.md\#text), [url](\.\./\.\./\.\./\.\./index\.md\#url),
[wiki](\.\./\.\./\.\./\.\./index\.md\#wiki)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_export.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472

[//000000001]: # (doctools::idx::export \- Documentation tools)
[//000000002]: # (Generated from file 'idx\_export\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::export\(n\) 0\.2\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::export \- Exporting keyword indices

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Concepts](#section2)

  - [API](#section3)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

  - [Export plugin API v2 reference](#section4)

  - [Keyword index serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require doctools::idx::export ?0\.2\.1?  
package require Tcl 8\.4  
package require struct::map  
package require doctools::idx::structure  
package require snit  
package require pluginmgr  

[__::doctools::idx::export__ *objectName*](#1)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __export serial__ *serial* ?*format*?](#4)  
[*objectName* __export object__ *object* ?*format*?](#5)  
[*objectName* __config names__](#6)  
[*objectName* __config get__](#7)  
[*objectName* __config set__ *name* ?*value*?](#8)  
[*objectName* __config unset__ *pattern*\.\.\.](#9)  
[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#10)  

# <a name='description'></a>DESCRIPTION

This package provides a class to manage the plugins for the export of keyword
indices to other formats, i\.e\. their conversion to, for example
*[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)*,
*[HTML](\.\./\.\./\.\./\.\./index\.md\#html)*, etc\.

This is one of the three public pillars the management of keyword indices
resides on\. The other two pillars are

  1. *[Importing keyword indices](idx\_import\.md)*, and

  1. *[Holding keyword indices](idx\_container\.md)*

For information about the [Concepts](#section2) of keyword indices, and
their parts, see the same\-named section\. For information about the data
structure which is the major input to the manager objects provided by this
package see the section [Keyword index serialization format](#section5)\.

The plugin system of our class is based on the package
__[pluginmgr](\.\./pluginmgr/pluginmgr\.md)__, and configured to look for
plugins using

  1. the environment variable __DOCTOOLS\_IDX\_EXPORT\_PLUGINS__,

  1. the environment variable __DOCTOOLS\_IDX\_PLUGINS__,

  1. the environment variable __DOCTOOLS\_PLUGINS__,

  1. the path "~/\.doctools/idx/export/plugin"

  1. the path "~/\.doctools/idx/plugin"

  1. the path "~/\.doctools/plugin"

  1. the path "~/\.doctools/idx/export/plugins"

  1. the path "~/\.doctools/idx/plugins"

  1. the path "~/\.doctools/plugins"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\IDX\\EXPORT\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\IDX\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\PLUGINS"

The last three are used only when the package is run on a machine using
Windows\(tm\) operating system\.

The whole system is delivered with six predefined export plugins, namely

  - docidx

    See *[docidx export plugin](export\_docidx\.md)* for details\.

  - html

    See *html export plugin* for details\.

  - json

    See *json export plugin* for details\.

  - nroff

    See *[nroff export plugin](\.\./doctools2toc/toc\_export\_nroff\.md)* for
    details\.

  - text

    See *text export plugin* for details\.

  - wiki

    See *[wiki export plugin](\.\./doctools2toc/toc\_export\_wiki\.md)* for
    details\.

Readers wishing to write their own export plugin for some format, i\.e\. *plugin
writer*s reading and understanding the section containing the [Export plugin
API v2 reference](#section4) is an absolute necessity, as it specifies the
interaction between this package and its plugins in detail\.

# <a name='section2'></a>Concepts

  1. A *[keyword index](\.\./\.\./\.\./\.\./index\.md\#keyword\_index)* consists of a
     \(possibly empty\) set of *[keywords](\.\./\.\./\.\./\.\./index\.md\#keywords)*\.

  1. Each keyword in the set is identified by its name\.

  1. Each keyword has a \(possibly empty\) set of *references*\.

  1. A reference can be associated with more than one keyword\.

  1. A reference not associated with at least one keyword is not possible
     however\.

  1. Each reference is identified by its target, specified as either an url or
     symbolic filename, depending on the type of reference \(__url__, or
     __manpage__\)\.

  1. The type of a reference \(url, or manpage\) depends only on the reference
     itself, and not the keywords it is associated with\.

  1. In addition to a type each reference has a descriptive label as well\. This
     label depends only on the reference itself, and not the keywords it is
     associated with\.

A few notes

  1. Manpage references are intended to be used for references to the documents
     the index is made for\. Their target is a symbolic file name identifying the
     document, and export plugins may replace symbolic with actual file names,
     if specified\.

  1. Url references are intended on the othre hand are inteded to be used for
     links to anything else, like websites\. Their target is an url\.

  1. While url and manpage references share a namespace for their identifiers,
     this should be no problem, given that manpage identifiers are symbolic
     filenames and as such they should never look like urls, the identifiers for
     url references\.

# <a name='section3'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__::doctools::idx::export__ *objectName*

    This command creates a new export manager object with an associated Tcl
    command whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

## <a name='subsection2'></a>Object command

All objects created by the __::doctools::idx::export__ command have the
following general form:

  - <a name='2'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='4'></a>*objectName* __export serial__ *serial* ?*format*?

    This method takes the canonical serialization of a keyword index stored in
    *serial* and converts it to the specified *format*, using the export
    plugin for the format\. An error is thrown if no plugin could be found for
    the format\. The string generated by the conversion process is returned as
    the result of this method\.

    If no format is specified the method defaults to __docidx__\.

    The specification of what a *canonical* serialization is can be found in
    the section [Keyword index serialization format](#section5)\.

    The plugin has to conform to the interface specified in section [Export
    plugin API v2 reference](#section4)\.

  - <a name='5'></a>*objectName* __export object__ *object* ?*format*?

    This method is a convenient wrapper around the __export serial__ method
    described by the previous item\. It expects that *object* is an object
    command supporting a __serialize__ method returning the canonical
    serialization of a keyword index\. It invokes that method, feeds the result
    into __export serial__ and returns the resulting string as its own
    result\.

  - <a name='6'></a>*objectName* __config names__

    This method returns a list containing the names of all configuration
    variables currently known to the object\.

  - <a name='7'></a>*objectName* __config get__

    This method returns a dictionary containing the names and values of all
    configuration variables currently known to the object\.

  - <a name='8'></a>*objectName* __config set__ *name* ?*value*?

    This method sets the configuration variable *name* to the specified
    *value* and returns the new value of the variable\.

    If no value is specified it simply returns the current value, without
    changing it\.

    Note that while the user can set the predefined configuration variables
    __user__ and __format__ doing so will have no effect, these values
    will be internally overridden when invoking an import plugin\.

  - <a name='9'></a>*objectName* __config unset__ *pattern*\.\.\.

    This method unsets all configuration variables matching the specified glob
    *pattern*s\. If no pattern is specified it will unset all currently defined
    configuration variables\.

# <a name='section4'></a>Export plugin API v2 reference

Plugins are what this package uses to manage the support for any output format
beyond the [Keyword index serialization format](#section5)\. Here we specify
the API the objects created by this package use to interact with their plugins\.

A plugin for this package has to follow the rules listed below:

  1. A plugin is a package\.

  1. The name of a plugin package has the form
     doctools::idx::export::__FOO__, where __FOO__ is the name of the
     format the plugin will generate output for\. This name is also the argument
     to provide to the various __export__ methods of export manager objects
     to get a string encoding a keyword index in that format\.

  1. The plugin can expect that the package
     __doctools::idx::export::plugin__ is present, as indicator that it was
     invoked from a genuine plugin manager\.

  1. A plugin has to provide one command, with the signature shown below\.

       - <a name='10'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

         Whenever an export manager of
         __[doctools::idx](idx\_container\.md)__ has to generate output
         for an index it will invoke this command\.

           * string *serial*

             This argument will contain the *canonical* serialization of the
             index for which to generate the output\. The specification of what a
             *canonical* serialization is can be found in the section
             [Keyword index serialization format](#section5)\.

           * dictionary *configuration*

             This argument will contain the current configuration to apply to
             the generation, as a dictionary mapping from variable names to
             values\.

             The following configuration variables have a predefined meaning all
             plugins have to obey, although they can ignore this information at
             their discretion\. Any other other configuration variables
             recognized by a plugin will be described in the manpage for that
             plugin\.

               + user

                 This variable is expected to contain the name of the user
                 owning the process invoking the plugin\.

               + format

                 This variable is expected to contain the name of the format
                 whose plugin is invoked\.

               + file

                 This variable, if defined by the user of the index object is
                 expected to contain the name of the input file for which the
                 plugin is generating its output for\.

               + map

                 This variable, if defined by the user of the index object is
                 expected to contain a dictionary mapping from symbolic file
                 names used in the references of type __manpage__ to actual
                 paths \(or urls\)\. A plugin has to be able to handle the
                 possibility that a symbolic name is without entry in this
                 mapping\.

  1. A single usage cycle of a plugin consists of the invokations of the command
     __[export](\.\./\.\./\.\./\.\./index\.md\#export)__\. This call has to leave
     the plugin in a state where another usage cycle can be run without
     problems\.

# <a name='section5'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[generation](\.\./\.\./\.\./\.\./index\.md\#generation),
[index](\.\./\.\./\.\./\.\./index\.md\#index), [json](\.\./\.\./\.\./\.\./index\.md\#json),
[keyword index](\.\./\.\./\.\./\.\./index\.md\#keyword\_index),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin),
[reference](\.\./\.\./\.\./\.\./index\.md\#reference), [tcler's
wiki](\.\./\.\./\.\./\.\./index\.md\#tcler\_s\_wiki),
[text](\.\./\.\./\.\./\.\./index\.md\#text), [url](\.\./\.\./\.\./\.\./index\.md\#url),
[wiki](\.\./\.\./\.\./\.\./index\.md\#wiki)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_export_html.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351

[//000000001]: # (doctools::idx::export::html \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::export::html\(n\) 0\.2 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::export::html \- HTML export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Configuration](#section3)

  - [Keyword index serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::idx::export::html ?0\.2?  
package require doctools::text  
package require doctools::html  
package require doctools::html::cssdefaults  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools keyword index export plugin for the
generation of HTML markup\.

This is an internal package of doctools, for use by the higher level management
packages handling keyword indices, especially
__[doctools::idx::export](idx\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::idx::export](idx\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the docidx
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a keyword index, as
    specified in section [Keyword index serialization format](#section4),
    and contained in *serial*, the *configuration*, a dictionary, and
    generates HTML markup encoding the index\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Configuration

The html export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - string *user*

    This standard configuration variable contains the name of the user running
    the process which invoked the export plugin\. The plugin puts this
    information into the provenance comment at the beginning of the generated
    document\.

  - string *file*

    This standard configuration variable contains the name of the file the index
    came from\. This variable may not be set or contain the empty string\. The
    plugin puts this information, if defined, i\.e\. set and not the empty string,
    into the provenance comment at the beginning of the generated document\.

  - dictionary *map*

    This standard configuration variable contains a dictionary mapping from the
    symbolic files names in manpage references to the actual filenames and/or
    urls to be used in the output\.

    Url references and symbolic file names without a mapping are used unchanged\.

  - boolean *newlines*

    If this flag is set the plugin will break the generated html code across
    lines, with each markup command on a separate line\.

    If this flag is not set \(the default\), the whole document will be written on
    a single line, with minimum spacing between all elements\.

  - boolean *indented*

    If this flag is set the plugin will indent the markup commands according to
    the structure of indices\. To make this work this also implies that
    __newlines__ is set\.

    If this flag is not set \(the default\), the output is formatted as per the
    value of __newlines__, and no indenting is done\.

  - string *meta*

    This variable is meant to hold a fragment of HTML \(default: empty\)\. The
    fragment it contains will be inserted into the generated output in the
    <head> section of the document, just after the <title> tag\.

  - string *header*

    This variable is meant to hold a fragment of HTML \(default: empty\)\. The
    fragment it contains will be inserted into the generated output just after
    the <h1> title tag in the body of the document, in the class\.header
    <div>'ision\.

  - string *footer*

    This variable is meant to hold a fragment of HTML \(default: empty\)\. The
    fragment it contains will be inserted into the generated output just before
    the </body> tag, in the class\.footer <div>'ision\.

  - dictionary *kwid*

    The value of this variable \(default: empty\) maps keywords to the identifiers
    to use as their anchor names\. Each keyword __FOO__ not found in the
    dictionary uses __KW\-____FOO__ as anchor, i\.e\. itself prefixed with
    the string __KW\-__\.

  - string *sepline*

    The value of this variable is the string to use for the separator comments
    inserted into the output when the outpout is broken across lines and/or
    indented\. The default string consists of 60 dashes\.

  - integer *kwidth*

    This variable holds the size of the keyword column in the main table
    generated by the plugin, in percent of the total width of the table\. This is
    an integer number in the range of 1 to 99\. Choosing a value outside of that
    range causes the generator to switch back to the defauly setting, 35
    percent\.

  - string *dot*

    This variable contains a HTML fragment inserted between the entries of the
    navigation bar, and the references associated with each keyword\. The default
    is the HTML entity &\#183; i\.e\. the bullet character, also known as the
    "Greek middle dot", i\.e\. the unicode character 00B7\.

  - string *class\.main*

    This variable contains the class name for the main <div>'ivision of the
    generated document\. The default is __doctools__\.

  - string *class\.header*

    This variable contains the class name for the header <div>'ision of the
    generated document\. The default is __idx\-header__\. This division
    contains the document title, the user specified __header__, if any, a
    visible separator line, and the navigation bar for quick access to each
    keyword section\.

  - string *class\.title*

    This variable contains the class name for the <h1> tag enclosing the
    document title\. The default is __idx\-title__\.

  - string *class\.navsep*

    This variable contains the class name for the <hr> separators in the header
    and footer sections of the generated document\. The default is
    __idx\-navsep__\.

  - string *class\.navbar*

    This variable contains the class name for the navigation <div>'ision
    enclosing the navigation bar of the generated document\. The default is
    __idx\-kwnav__\.

  - string *class\.contents*

    This variable contains the class name for the <table> holding the keywords
    and their references in the generated document\. The default is
    __idx\-contents__\.

  - string *class\.leader*

    This variable contains the class name for the anchor names the plugin
    inserts into the keyword table when switching from one section to the next
    \(Each section holds all keywords with a particular first character\)\. The
    default is __idx\-leader__\.

  - string *class\.row0*

    This variable contains the class name used to label the even rows \(<tr>\) of
    the keyword table\. The default is __idx\-even__\.

  - string *class\.row1*

    This variable contains the class name used to label the odd rows \(<tr>\) of
    the keyword table\. The default is __idx\-odd__\.

  - string *class\.keyword*

    This variable contains the class name used to label the keyword cells/column
    \(<td>\) in the keyword table of the document\. The default is
    __idx\-keyword__\.

  - string *class\.refs*

    This variable contains the class name used to label the reference
    cells/column \(<td>\) in the keyword table of the document\. The default is
    __idx\-refs__\.

  - string *class\.footer*

    This variable contains the class name for the footer <div>'ision of the
    generated document\. The default is __idx\-footer__\. This division
    contains a browser\-visible separator line and the user specified
    __footer__, if any\.

*Note* that this plugin ignores the standard configuration variable
__format__, and its value\.

# <a name='section4'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[index](\.\./\.\./\.\./\.\./index\.md\#index),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_export_json.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260

[//000000001]: # (doctools::idx::export::json \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::export::json\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::export::json \- JSON export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [JSON notation of keyword indices](#section3)

  - [Configuration](#section4)

  - [Keyword index serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::idx::export::json ?0\.1?  
package require textutil::adjust  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools keyword index export plugin for the
generation of JSON markup\.

This is an internal package of doctools, for use by the higher level management
packages handling keyword indices, especially
__[doctools::idx::export](idx\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::idx::export](idx\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the docidx
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a keyword index, as
    specified in section [Keyword index serialization format](#section5),
    and contained in *serial*, the *configuration*, a dictionary, and
    generates JSON markup encoding the index\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>JSON notation of keyword indices

The JSON format used for keyword indices is a direct translation of the
[Keyword index serialization format](#section5), mapping Tcl dictionaries
as JSON objects and Tcl lists as JSON arrays\. For example, the Tcl serialization

    doctools::idx {
    	label {Keyword Index}
    	keywords {
    		changelog  {changelog.man cvs.man}
    		conversion {doctools.man docidx.man doctoc.man apps/dtplite.man mpexpand.man}
    		cvs        cvs.man
    	}
    	references {
    		apps/dtplite.man {manpage dtplite}
    		changelog.man    {manpage doctools::changelog}
    		cvs.man          {manpage doctools::cvs}
    		docidx.man       {manpage doctools::idx}
    		doctoc.man       {manpage doctools::toc}
    		doctools.man     {manpage doctools}
    		mpexpand.man     {manpage mpexpand}
    	}
    	title {}
    }

is equivalent to the JSON string

    {
        "doctools::idx" : {
            "label"      : "Keyword Index",
            "keywords"   : {
                "changelog"  : ["changelog.man","cvs.man"],
                "conversion" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
                "cvs"        : ["cvs.man"],
            },
            "references" : {
                "apps\/dtplite.man" : ["manpage","dtplite"],
                "changelog.man"     : ["manpage","doctools::changelog"],
                "cvs.man"           : ["manpage","doctools::cvs"],
                "docidx.man"        : ["manpage","doctools::idx"],
                "doctoc.man"        : ["manpage","doctools::toc"],
                "doctools.man"      : ["manpage","doctools"],
                "mpexpand.man"      : ["manpage","mpexpand"]
            },
            "title"      : ""
        }
    }

# <a name='section4'></a>Configuration

The JSON export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - boolean *indented*

    If this flag is set the plugin will break the generated JSON code across
    lines and indent it according to its inner structure, with each key of a
    dictionary on a separate line\.

    If this flag is not set \(the default\), the whole JSON object will be written
    on a single line, with minimum spacing between all elements\.

  - boolean *aligned*

    If this flag is set the generator ensures that the values for the keys in a
    dictionary are vertically aligned with each other, for a nice table effect\.
    To make this work this also implies that __indented__ is set\.

    If this flag is not set \(the default\), the output is formatted as per the
    value of __indented__, without trying to align the values for dictionary
    keys\.

*Note* that this plugin ignores the standard configuration variables
__user__, __format__, __file__, and __map__ and their values\.

# <a name='section5'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[JSON](\.\./\.\./\.\./\.\./index\.md\#json),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[index](\.\./\.\./\.\./\.\./index\.md\#index),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_export_nroff.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215

[//000000001]: # (doctools::idx::export::nroff \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::export::nroff\(n\) 0\.3 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::export::nroff \- nroff export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Configuration](#section3)

  - [Keyword index serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::idx::export::nroff ?0\.3?  
package require doctools::text  
package require doctools::nroff::man\_macros  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools keyword index export plugin for the
generation of nroff markup\.

This is an internal package of doctools, for use by the higher level management
packages handling keyword indices, especially
__[doctools::idx::export](idx\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::idx::export](idx\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the docidx
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a keyword index, as
    specified in section [Keyword index serialization format](#section4),
    and contained in *serial*, the *configuration*, a dictionary, and
    generates nroff markup encoding the index\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Configuration

The nroff export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - string *user*

    This standard configuration variable contains the name of the user running
    the process which invoked the export plugin\. The plugin puts this
    information into the provenance comment at the beginning of the generated
    document\.

  - string *file*

    This standard configuration variable contains the name of the file the index
    came from\. This variable may not be set or contain the empty string\. The
    plugin puts this information, if defined, i\.e\. set and not the empty string,
    into the provenance comment at the beginning of the generated document\.

  - boolean *inline*

    If this flag is set \(default\) the plugin will place the definitions of the
    man macro set directly into the output\.

    If this flag is not set, the plugin will place a reference to the
    definitions of the man macro set into the output, but not the macro
    definitions themselves\.

*Note* that this plugin ignores the standard configuration variables
__format__, and __map__, and their values\.

# <a name='section4'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[index](\.\./\.\./\.\./\.\./index\.md\#index),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_export_text.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199

[//000000001]: # (doctools::idx::export::text \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::export::text\(n\) 0\.2 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::export::text \- plain text export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Configuration](#section3)

  - [Keyword index serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::idx::export::text ?0\.2?  
package require doctools::text  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools keyword index export plugin for the
generation of plain text markup\.

This is an internal package of doctools, for use by the higher level management
packages handling keyword indices, especially
__[doctools::idx::export](idx\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::idx::export](idx\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the docidx
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a keyword index, as
    specified in section [Keyword index serialization format](#section4),
    and contained in *serial*, the *configuration*, a dictionary, and
    generates plain text markup encoding the index\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Configuration

The text export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - dictionary *map*

    This standard configuration variable contains a dictionary mapping from the
    symbolic files names in manpage references to the actual filenames and/or
    urls to be used in the output\.

    Url references and symbolic file names without a mapping are used unchanged\.

*Note* that this plugin ignores the standard configuration variables
__user__, __file__, and __format__, and their values\.

# <a name='section4'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[index](\.\./\.\./\.\./\.\./index\.md\#index), [plain
text](\.\./\.\./\.\./\.\./index\.md\#plain\_text),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_export_wiki.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215

[//000000001]: # (doctools::idx::export::wiki \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::export::wiki\(n\) 0\.2 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::export::wiki \- wiki export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Wiki markup](#section3)

  - [Configuration](#section4)

  - [Keyword index serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::idx::export::wiki ?0\.2?  
package require doctools::text  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools keyword index export plugin for the
generation of wiki markup\.

This is an internal package of doctools, for use by the higher level management
packages handling keyword indices, especially
__[doctools::idx::export](idx\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::idx::export](idx\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the docidx
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a keyword index, as
    specified in section [Keyword index serialization format](#section5),
    and contained in *serial*, the *configuration*, a dictionary, and
    generates wiki markup encoding the index\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Wiki markup

The basic syntax of the wiki markup generated by this plugin are described at
[http://wiki\.tcl\.tk/14](http://wiki\.tcl\.tk/14)\.

The plugin goes beyond the classic markup to generate proper headers and either
a table or indented list of the keywords and their references\.

# <a name='section4'></a>Configuration

The wiki export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - dictionary *map*

    This standard configuration variable contains a dictionary mapping from the
    symbolic files names in manpage references to the actual filenames and/or
    urls to be used in the output\.

    Url references and symbolic file names without a mapping are used unchanged\.

  - enum *style*

    This variable recognizes two values as legal, __list__ \(default\), and
    __table__\. Depending on the value the plugin generates either a list\- or
    table\-based wiki page for the index\.

*Note* that this plugin ignores the standard configuration variables
__user__, __file__ and __format__, and their values\.

# <a name='section5'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[index](\.\./\.\./\.\./\.\./index\.md\#index),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[wiki](\.\./\.\./\.\./\.\./index\.md\#wiki)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_import.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529

[//000000001]: # (doctools::idx::import \- Documentation tools)
[//000000002]: # (Generated from file 'idx\_import\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::import\(n\) 0\.2\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::import \- Importing keyword indices

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Concepts](#section2)

  - [API](#section3)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

  - [Import plugin API v2 reference](#section4)

  - [Keyword index serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require doctools::idx::import ?0\.2\.1?  
package require Tcl 8\.4  
package require struct::map  
package require doctools::idx::structure  
package require snit  
package require pluginmgr  

[__::doctools::idx::import__ *objectName*](#1)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __import text__ *text* ?*format*?](#4)  
[*objectName* __import file__ *path* ?*format*?](#5)  
[*objectName* __import object text__ *object* *text* ?*format*?](#6)  
[*objectName* __import object file__ *object* *path* ?*format*?](#7)  
[*objectName* __config names__](#8)  
[*objectName* __config get__](#9)  
[*objectName* __config set__ *name* ?*value*?](#10)  
[*objectName* __config unset__ *pattern*\.\.\.](#11)  
[*objectName* __includes__](#12)  
[*objectName* __include add__ *path*](#13)  
[*objectName* __include remove__ *path*](#14)  
[*objectName* __include clear__](#15)  
[__IncludeFile__ *currentfile* *path*](#16)  
[__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *text* *configuration*](#17)  

# <a name='description'></a>DESCRIPTION

This package provides a class to manage the plugins for the import of keyword
indices from other formats, i\.e\. their conversion from, for example
*[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)*,
*[json](\.\./\.\./\.\./\.\./index\.md\#json)*, etc\.

This is one of the three public pillars the management of keyword indices
resides on\. The other two pillars are

  1. *[Exporting keyword indices](idx\_export\.md)*, and

  1. *[Holding keyword indices](idx\_container\.md)*

For information about the [Concepts](#section2) of keyword indices, and
their parts, see the same\-named section\. For information about the data
structure which is the major output of the manager objects provided by this
package see the section [Keyword index serialization format](#section5)\.

The plugin system of our class is based on the package
__[pluginmgr](\.\./pluginmgr/pluginmgr\.md)__, and configured to look for
plugins using

  1. the environment variable __DOCTOOLS\_IDX\_IMPORT\_PLUGINS__,

  1. the environment variable __DOCTOOLS\_IDX\_PLUGINS__,

  1. the environment variable __DOCTOOLS\_PLUGINS__,

  1. the path "~/\.doctools/idx/import/plugin"

  1. the path "~/\.doctools/idx/plugin"

  1. the path "~/\.doctools/plugin"

  1. the path "~/\.doctools/idx/import/plugins"

  1. the path "~/\.doctools/idx/plugins"

  1. the path "~/\.doctools/plugins"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\IDX\\IMPORT\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\IDX\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\PLUGINS"

The last three are used only when the package is run on a machine using
Windows\(tm\) operating system\.

The whole system is delivered with two predefined import plugins, namely

  - docidx

    See *[docidx import plugin](import\_docidx\.md)* for details\.

  - json

    See *json import plugin* for details\.

Readers wishing to write their own import plugin for some format, i\.e\. *plugin
writer*s reading and understanding the section containing the [Import plugin
API v2 reference](#section4) is an absolute necessity, as it specifies the
interaction between this package and its plugins in detail\.

# <a name='section2'></a>Concepts

  1. A *[keyword index](\.\./\.\./\.\./\.\./index\.md\#keyword\_index)* consists of a
     \(possibly empty\) set of *[keywords](\.\./\.\./\.\./\.\./index\.md\#keywords)*\.

  1. Each keyword in the set is identified by its name\.

  1. Each keyword has a \(possibly empty\) set of *references*\.

  1. A reference can be associated with more than one keyword\.

  1. A reference not associated with at least one keyword is not possible
     however\.

  1. Each reference is identified by its target, specified as either an url or
     symbolic filename, depending on the type of reference \(__url__, or
     __manpage__\)\.

  1. The type of a reference \(url, or manpage\) depends only on the reference
     itself, and not the keywords it is associated with\.

  1. In addition to a type each reference has a descriptive label as well\. This
     label depends only on the reference itself, and not the keywords it is
     associated with\.

A few notes

  1. Manpage references are intended to be used for references to the documents
     the index is made for\. Their target is a symbolic file name identifying the
     document, and export plugins may replace symbolic with actual file names,
     if specified\.

  1. Url references are intended on the othre hand are inteded to be used for
     links to anything else, like websites\. Their target is an url\.

  1. While url and manpage references share a namespace for their identifiers,
     this should be no problem, given that manpage identifiers are symbolic
     filenames and as such they should never look like urls, the identifiers for
     url references\.

# <a name='section3'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__::doctools::idx::import__ *objectName*

    This command creates a new import manager object with an associated Tcl
    command whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

## <a name='subsection2'></a>Object command

All objects created by the __::doctools::idx::import__ command have the
following general form:

  - <a name='2'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='4'></a>*objectName* __import text__ *text* ?*format*?

    This method takes the *text* and converts it from the specified *format*
    to the canonical serialization of a keyword index using the import plugin
    for the format\. An error is thrown if no plugin could be found for the
    format\. The serialization generated by the conversion process is returned as
    the result of this method\.

    If no format is specified the method defaults to __docidx__\.

    The specification of what a *canonical* serialization is can be found in
    the section [Keyword index serialization format](#section5)\.

    The plugin has to conform to the interface specified in section [Import
    plugin API v2 reference](#section4)\.

  - <a name='5'></a>*objectName* __import file__ *path* ?*format*?

    This method is a convenient wrapper around the __import text__ method
    described by the previous item\. It reads the contents of the specified file
    into memory, feeds the result into __import text__ and returns the
    resulting serialization as its own result\.

  - <a name='6'></a>*objectName* __import object text__ *object* *text* ?*format*?

    This method is a convenient wrapper around the __import text__ method
    described by the previous item\. It expects that *object* is an object
    command supporting a __deserialize__ method expecting the canonical
    serialization of a keyword index\. It imports the text using __import
    text__ and then feeds the resulting serialization into the *object* via
    __deserialize__\. This method returns the empty string as it result\.

  - <a name='7'></a>*objectName* __import object file__ *object* *path* ?*format*?

    This method behaves like __import object text__, except that it reads
    the text to convert from the specified file instead of being given it as
    argument\.

  - <a name='8'></a>*objectName* __config names__

    This method returns a list containing the names of all configuration
    variables currently known to the object\.

  - <a name='9'></a>*objectName* __config get__

    This method returns a dictionary containing the names and values of all
    configuration variables currently known to the object\.

  - <a name='10'></a>*objectName* __config set__ *name* ?*value*?

    This method sets the configuration variable *name* to the specified
    *value* and returns the new value of the variable\.

    If no value is specified it simply returns the current value, without
    changing it\.

    Note that while the user can set the predefined configuration variables
    __user__ and __format__ doing so will have no effect, these values
    will be internally overridden when invoking an import plugin\.

  - <a name='11'></a>*objectName* __config unset__ *pattern*\.\.\.

    This method unsets all configuration variables matching the specified glob
    *pattern*s\. If no pattern is specified it will unset all currently defined
    configuration variables\.

  - <a name='12'></a>*objectName* __includes__

    This method returns a list containing the currently specified paths to use
    to search for include files when processing input\. The order of paths in the
    list corresponds to the order in which they are used, from first to last,
    and also corresponds to the order in which they were added to the object\.

  - <a name='13'></a>*objectName* __include add__ *path*

    This methods adds the specified *path* to the list of paths to use to
    search for include files when processing input\. The path is added to the end
    of the list, causing it to be searched after all previously added paths\. The
    result of the command is the empty string\.

    The method does nothing if the path is already known\.

  - <a name='14'></a>*objectName* __include remove__ *path*

    This methods removes the specified *path* from the list of paths to use to
    search for include files when processing input\. The result of the command is
    the empty string\.

    The method does nothing if the path is not known\.

  - <a name='15'></a>*objectName* __include clear__

    This method clears the list of paths to use to search for include files when
    processing input\. The result of the command is the empty string\.

# <a name='section4'></a>Import plugin API v2 reference

Plugins are what this package uses to manage the support for any input format
beyond the [Keyword index serialization format](#section5)\. Here we specify
the API the objects created by this package use to interact with their plugins\.

A plugin for this package has to follow the rules listed below:

  1. A plugin is a package\.

  1. The name of a plugin package has the form
     doctools::idx::import::__FOO__, where __FOO__ is the name of the
     format the plugin will generate output for\. This name is also the argument
     to provide to the various __import__ methods of import manager objects
     to get a string encoding a keyword index in that format\.

  1. The plugin can expect that the package
     __doctools::idx::export::plugin__ is present, as indicator that it was
     invoked from a genuine plugin manager\.

  1. The plugin can expect that a command named __IncludeFile__ is present,
     with the signature

       - <a name='16'></a>__IncludeFile__ *currentfile* *path*

         This command has to be invoked by the plugin when it has to process an
         included file, if the format has the concept of such\. An example of
         such a format would be *[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)*\.

         The plugin has to supply the following arguments

           * string *currentfile*

             The path of the file it is currently processing\. This may be the
             empty string if no such is known\.

           * string *path*

             The path of the include file as specified in the include directive
             being processed\.

         The result of the command will be a 5\-element list containing

           1) A boolean flag indicating the success \(__True__\) or failure
              \(__False__\) of the operation\.

           1) In case of success the contents of the included file, and the
              empty string otherwise\.

           1) The resolved, i\.e\. absolute path of the included file, if
              possible, or the unchanged *path* argument\. This is for display
              in an error message, or as the *currentfile* argument of another
              call to __IncludeFile__ should this file contain more files\.

           1) In case of success an empty string, and for failure a code
              indicating the reason for it, one of

                * notfound

                  The specified file could not be found\.

                * notread

                  The specified file was found, but not be read into memory\.

           1) An empty string in case of success of a __notfound__ failure,
              and an additional error message describing the reason for a
              __notread__ error in more detail\.

  1. A plugin has to provide one command, with the signature shown below\.

       - <a name='17'></a>__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *text* *configuration*

         Whenever an import manager of
         __[doctools::idx](idx\_container\.md)__ has to parse input for an
         index it will invoke this command\.

           * string *text*

             This argument will contain the text encoding the index per the
             format the plugin is for\.

           * dictionary *configuration*

             This argument will contain the current configuration to apply to
             the parsing, as a dictionary mapping from variable names to values\.

             The following configuration variables have a predefined meaning all
             plugins have to obey, although they can ignore this information at
             their discretion\. Any other other configuration variables
             recognized by a plugin will be described in the manpage for that
             plugin\.

               + user

                 This variable is expected to contain the name of the user
                 owning the process invoking the plugin\.

               + format

                 This variable is expected to contain the name of the format
                 whose plugin is invoked\.

  1. A single usage cycle of a plugin consists of the invokations of the command
     __[import](\.\./\.\./\.\./\.\./index\.md\#import)__\. This call has to leave
     the plugin in a state where another usage cycle can be run without
     problems\.

# <a name='section5'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation),
[import](\.\./\.\./\.\./\.\./index\.md\#import),
[index](\.\./\.\./\.\./\.\./index\.md\#index), [json](\.\./\.\./\.\./\.\./index\.md\#json),
[keyword index](\.\./\.\./\.\./\.\./index\.md\#keyword\_index),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin),
[reference](\.\./\.\./\.\./\.\./index\.md\#reference),
[url](\.\./\.\./\.\./\.\./index\.md\#url)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_import_json.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232

[//000000001]: # (doctools::idx::import::json \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::import::json\(n\) 0\.2\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::import::json \- JSON import plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [JSON notation of keyword indices](#section3)

  - [Keyword index serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require doctools::idx::import::json ?0\.2\.1?  
package require doctools::idx::structure  
package require json  

[__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *string* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools keyword index import plugin for the parsing
of JSON markup\.

This is an internal package of doctools, for use by the higher level management
packages handling keyword indices, especially
__[doctools::idx::import](idx\_import\.md)__, the import manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::idx::import](idx\_import\.md)__ and the import
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the docidx
import plugin API version 2\.

  - <a name='1'></a>__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *string* *configuration*

    This command takes the *string* and parses it as JSON markup encoding a
    keyword index, in the context of the specified *configuration* \(a
    dictionary\)\. The result of the command is the canonical serialization of
    that keyword index, in the form specified in section [Keyword index
    serialization format](#section4)\.

# <a name='section3'></a>JSON notation of keyword indices

The JSON format used for keyword indices is a direct translation of the
[Keyword index serialization format](#section4), mapping Tcl dictionaries
as JSON objects and Tcl lists as JSON arrays\. For example, the Tcl serialization

    doctools::idx {
    	label {Keyword Index}
    	keywords {
    		changelog  {changelog.man cvs.man}
    		conversion {doctools.man docidx.man doctoc.man apps/dtplite.man mpexpand.man}
    		cvs        cvs.man
    	}
    	references {
    		apps/dtplite.man {manpage dtplite}
    		changelog.man    {manpage doctools::changelog}
    		cvs.man          {manpage doctools::cvs}
    		docidx.man       {manpage doctools::idx}
    		doctoc.man       {manpage doctools::toc}
    		doctools.man     {manpage doctools}
    		mpexpand.man     {manpage mpexpand}
    	}
    	title {}
    }

is equivalent to the JSON string

    {
        "doctools::idx" : {
            "label"      : "Keyword Index",
            "keywords"   : {
                "changelog"  : ["changelog.man","cvs.man"],
                "conversion" : ["doctools.man","docidx.man","doctoc.man","apps\/dtplite.man","mpexpand.man"],
                "cvs"        : ["cvs.man"],
            },
            "references" : {
                "apps\/dtplite.man" : ["manpage","dtplite"],
                "changelog.man"     : ["manpage","doctools::changelog"],
                "cvs.man"           : ["manpage","doctools::cvs"],
                "docidx.man"        : ["manpage","doctools::idx"],
                "doctoc.man"        : ["manpage","doctools::toc"],
                "doctools.man"      : ["manpage","doctools"],
                "mpexpand.man"      : ["manpage","mpexpand"]
            },
            "title"      : ""
        }
    }

# <a name='section4'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[JSON](\.\./\.\./\.\./\.\./index\.md\#json),
[deserialization](\.\./\.\./\.\./\.\./index\.md\#deserialization),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[import](\.\./\.\./\.\./\.\./index\.md\#import),
[index](\.\./\.\./\.\./\.\./index\.md\#index)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_introduction.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

[//000000001]: # (doctools2idx\_introduction \- Documentation tools)
[//000000002]: # (Generated from file 'idx\_introduction\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools2idx\_introduction\(n\) 2\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools2idx\_introduction \- DocTools \- Keyword indices

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Related formats](#section2)

  - [Package Overview](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

*[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* \(short for *documentation
indices*\) stands for a set of related, yet different, entities which are
working together for the easy creation and transformation of keyword indices for
documentation\.

These are

  1. A tcl based language for the semantic markup of a keyword index\. Markup is
     represented by Tcl commands\. Beginners should start with the *[docidx
     language introduction](\.\./doctools/docidx\_lang\_intro\.md)*\. The formal
     specification is split over two documents, one dealing with the *[docidx
     language syntax](\.\./doctools/docidx\_lang\_syntax\.md)*, the other a
     *[docidx language command
     reference](\.\./doctools/docidx\_lang\_cmdref\.md)*\.

  1. A set of packages for the programmatic manipulation of keyword indices in
     memory, and their conversion between various formats, reading and writing\.
     The aforementioned markup language is one of the formats which can be both
     read from and written to\.

  1. The system for the conversion of indices is based on a plugin mechanism,
     for this we have two APIs describing the interface between the packages
     above and the import/export plugins\.

Which of the more detailed documents are relevant to the reader of this
introduction depends on their role in the documentation process\.

  1. A *writer* of documentation has to understand the markup language itself\.
     A beginner to docidx should read the more informally written *[docidx
     language introduction](\.\./doctools/docidx\_lang\_intro\.md)* first\. Having
     digested this the formal *[docidx language
     syntax](\.\./doctools/docidx\_lang\_syntax\.md)* specification should become
     understandable\. A writer experienced with docidx may only need the
     *[docidx language command
     reference](\.\./doctools/docidx\_lang\_cmdref\.md)* from time to time to
     refresh her memory\.

     While a document is written the __dtp__ application can be used to
     validate it, and after completion it also performs the conversion into the
     chosen system of visual markup, be it \*roff, HTML, plain text, wiki, etc\.
     The simpler __[dtplite](\.\./\.\./apps/dtplite\.md)__ application makes
     internal use of docidx when handling directories of documentation,
     automatically generating a proper keyword index for them\.

  1. A *processor* of documentation written in the
     *[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* markup language has to know
     which tools are available for use\.

     The main tool is the aforementioned __dtp__ application provided by
     Tcllib\. The simpler __[dtplite](\.\./\.\./apps/dtplite\.md)__ does not
     expose docidx to the user\. At the bottom level, common to both
     applications, however we find the three packages providing the basic
     facilities to handle keyword indices, i\.e\. import from textual formats,
     programmatic manipulation in memory, and export to textual formats\. These
     are

       - __[doctools::idx](idx\_container\.md)__

         Programmatic manipulation of keyword indices in memory\.

       - __[doctools::idx::import](idx\_import\.md)__

         Import of keyword indices from various textual formats\. The set of
         supported formats is extensible through plugin packages\.

       - __[doctools::idx::export](idx\_export\.md)__

         Export of keyword indices to various textual formats\. The set of
         supported formats is extensible through plugin packages\.

     See also section [Package Overview](#section3) for an overview of the
     dependencies between these and other, supporting packages\.

  1. At last, but not least, *plugin writers* have to understand the
     interaction between the import and export packages and their plugins\. These
     APIs are described in the documentation for the two relevant packages, i\.e\.

       - __[doctools::idx::import](idx\_import\.md)__

       - __[doctools::idx::export](idx\_export\.md)__

# <a name='section2'></a>Related formats

The docidx format does not stand alone, it has two companion formats\. These are
called *[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* and
*[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)*, and they are intended for the
markup of *tables of contents*, and of general documentation, respectively\.
They are described in their own sets of documents, starting at the *DocTools \-
Tables Of Contents* and the *DocTools \- General*, respectively\.

# <a name='section3'></a>Package Overview

                                        ~~~~~~~~~~~ doctools::idx ~~~~~~~~~~~
                                       ~~                   |               ~~
                    doctools::idx::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::idx::import
                            |                               |                       |
            +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
            |               |                         |     |    |                  |               |                       |               |
    struct::map             =                         |     |    |                  =       doctools::include       struct::map      fileutil::paths
                            |                         |     |    |                  |
                    doctools::idx::export::<*>        |     |    |          doctools::idx::import::<*>
                            docidx                    |     |    |                  docidx, json
                            json                      |     |    |                  |           \
                            html                      |     |    |          doctools::idx::parse \
                            nroff                     |     |    |                  |             \
                            wiki                      |     |    |  +---------------+              json
                            text                      |     |    |  |               |
                                                    doctools::idx::structure        |
                                                                                    |
                                                                            +-------+---------------+
                                                                            |                       |
              doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat
                    |                                                                               |
              doctools::text  doctools::nroff::man_macros                                           =
                                                                                                    |
                                                                                            doctools::msgcat::idx::<*>
                                                                                                    c, en, de, fr
                                                                                                    (fr == en for now)
            ~~      Interoperable objects, without actual package dependencies
            --      Package dependency, higher requires lower package
            =       Dynamic dependency through plugin system
            <*>     Multiple packages following the given form of naming.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx\_intro](\.\./doctools/docidx\_intro\.md),
[doctoc\_intro](\.\./doctools/doctoc\_intro\.md),
[doctools](\.\./doctools/doctools\.md), doctools2doc\_introduction,
[doctools2toc\_introduction](\.\./doctools2toc/toc\_introduction\.md),
[doctools\_lang\_cmdref](\.\./doctools/doctools\_lang\_cmdref\.md),
[doctools\_lang\_faq](\.\./doctools/doctools\_lang\_faq\.md),
[doctools\_lang\_intro](\.\./doctools/doctools\_lang\_intro\.md),
[doctools\_lang\_syntax](\.\./doctools/doctools\_lang\_syntax\.md),
[doctools\_plugin\_apiref](\.\./doctools/doctools\_plugin\_apiref\.md)

# <a name='keywords'></a>KEYWORDS

[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[index](\.\./\.\./\.\./\.\./index\.md\#index), [keyword
index](\.\./\.\./\.\./\.\./index\.md\#keyword\_index),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_msgcat_c.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101

[//000000001]: # (doctools::msgcat::idx::c \- Documentation tools)
[//000000002]: # (Generated from file 'msgcat\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::msgcat::idx::c\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::msgcat::idx::c \- Message catalog for the docidx parser \(C\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require msgcat  
package require doctools::msgcat::idx::c ?0\.1?  

# <a name='description'></a>DESCRIPTION

The package __doctools::msgcat::idx::c__ is a support module providing the C
language message catalog for the docidx parser in the doctools system version 2\.
As such it is an internal package a regular user \(developer\) should not be in
direct contact with\.

If you are such please go the documentation of either

  1. __doctools::doc__,

  1. __[doctools::toc](\.\./doctools/doctoc\.md)__, or

  1. __[doctools::idx](idx\_container\.md)__

Within the system architecture this package resides under the package
__[doctools::msgcat](\.\./doctools2base/tcllib\_msgcat\.md)__ providing the
general message catalog management within the system\. *Note* that there is
*no* explicit dependency between the manager and catalog packages\. The catalog
is a plugin which is selected and loaded dynamically\.

# <a name='section2'></a>API

This package has no exported API\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[C](\.\./\.\./\.\./\.\./index\.md\#c), [catalog
package](\.\./\.\./\.\./\.\./index\.md\#catalog\_package),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[i18n](\.\./\.\./\.\./\.\./index\.md\#i18n),
[internationalization](\.\./\.\./\.\./\.\./index\.md\#internationalization),
[l10n](\.\./\.\./\.\./\.\./index\.md\#l10n),
[localization](\.\./\.\./\.\./\.\./index\.md\#localization), [message
catalog](\.\./\.\./\.\./\.\./index\.md\#message\_catalog), [message
package](\.\./\.\./\.\./\.\./index\.md\#message\_package)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_msgcat_de.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101

[//000000001]: # (doctools::msgcat::idx::de \- Documentation tools)
[//000000002]: # (Generated from file 'msgcat\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::msgcat::idx::de\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::msgcat::idx::de \- Message catalog for the docidx parser \(DE\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require msgcat  
package require doctools::msgcat::idx::de ?0\.1?  

# <a name='description'></a>DESCRIPTION

The package __doctools::msgcat::idx::de__ is a support module providing the
DE \(german\) language message catalog for the docidx parser in the doctools
system version 2\. As such it is an internal package a regular user \(developer\)
should not be in direct contact with\.

If you are such please go the documentation of either

  1. __doctools::doc__,

  1. __[doctools::toc](\.\./doctools/doctoc\.md)__, or

  1. __[doctools::idx](idx\_container\.md)__

Within the system architecture this package resides under the package
__[doctools::msgcat](\.\./doctools2base/tcllib\_msgcat\.md)__ providing the
general message catalog management within the system\. *Note* that there is
*no* explicit dependency between the manager and catalog packages\. The catalog
is a plugin which is selected and loaded dynamically\.

# <a name='section2'></a>API

This package has no exported API\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[DE](\.\./\.\./\.\./\.\./index\.md\#de), [catalog
package](\.\./\.\./\.\./\.\./index\.md\#catalog\_package),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[i18n](\.\./\.\./\.\./\.\./index\.md\#i18n),
[internationalization](\.\./\.\./\.\./\.\./index\.md\#internationalization),
[l10n](\.\./\.\./\.\./\.\./index\.md\#l10n),
[localization](\.\./\.\./\.\./\.\./index\.md\#localization), [message
catalog](\.\./\.\./\.\./\.\./index\.md\#message\_catalog), [message
package](\.\./\.\./\.\./\.\./index\.md\#message\_package)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_msgcat_en.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101

[//000000001]: # (doctools::msgcat::idx::en \- Documentation tools)
[//000000002]: # (Generated from file 'msgcat\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::msgcat::idx::en\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::msgcat::idx::en \- Message catalog for the docidx parser \(EN\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require msgcat  
package require doctools::msgcat::idx::en ?0\.1?  

# <a name='description'></a>DESCRIPTION

The package __doctools::msgcat::idx::en__ is a support module providing the
EN \(english\) language message catalog for the docidx parser in the doctools
system version 2\. As such it is an internal package a regular user \(developer\)
should not be in direct contact with\.

If you are such please go the documentation of either

  1. __doctools::doc__,

  1. __[doctools::toc](\.\./doctools/doctoc\.md)__, or

  1. __[doctools::idx](idx\_container\.md)__

Within the system architecture this package resides under the package
__[doctools::msgcat](\.\./doctools2base/tcllib\_msgcat\.md)__ providing the
general message catalog management within the system\. *Note* that there is
*no* explicit dependency between the manager and catalog packages\. The catalog
is a plugin which is selected and loaded dynamically\.

# <a name='section2'></a>API

This package has no exported API\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EN](\.\./\.\./\.\./\.\./index\.md\#en), [catalog
package](\.\./\.\./\.\./\.\./index\.md\#catalog\_package),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[i18n](\.\./\.\./\.\./\.\./index\.md\#i18n),
[internationalization](\.\./\.\./\.\./\.\./index\.md\#internationalization),
[l10n](\.\./\.\./\.\./\.\./index\.md\#l10n),
[localization](\.\./\.\./\.\./\.\./index\.md\#localization), [message
catalog](\.\./\.\./\.\./\.\./index\.md\#message\_catalog), [message
package](\.\./\.\./\.\./\.\./index\.md\#message\_package)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_msgcat_fr.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101

[//000000001]: # (doctools::msgcat::idx::fr \- Documentation tools)
[//000000002]: # (Generated from file 'msgcat\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::msgcat::idx::fr\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::msgcat::idx::fr \- Message catalog for the docidx parser \(FR\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require msgcat  
package require doctools::msgcat::idx::fr ?0\.1?  

# <a name='description'></a>DESCRIPTION

The package __doctools::msgcat::idx::fr__ is a support module providing the
FR \(french\) language message catalog for the docidx parser in the doctools
system version 2\. As such it is an internal package a regular user \(developer\)
should not be in direct contact with\.

If you are such please go the documentation of either

  1. __doctools::doc__,

  1. __[doctools::toc](\.\./doctools/doctoc\.md)__, or

  1. __[doctools::idx](idx\_container\.md)__

Within the system architecture this package resides under the package
__[doctools::msgcat](\.\./doctools2base/tcllib\_msgcat\.md)__ providing the
general message catalog management within the system\. *Note* that there is
*no* explicit dependency between the manager and catalog packages\. The catalog
is a plugin which is selected and loaded dynamically\.

# <a name='section2'></a>API

This package has no exported API\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[FR](\.\./\.\./\.\./\.\./index\.md\#fr), [catalog
package](\.\./\.\./\.\./\.\./index\.md\#catalog\_package),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[i18n](\.\./\.\./\.\./\.\./index\.md\#i18n),
[internationalization](\.\./\.\./\.\./\.\./index\.md\#internationalization),
[l10n](\.\./\.\./\.\./\.\./index\.md\#l10n),
[localization](\.\./\.\./\.\./\.\./index\.md\#localization), [message
catalog](\.\./\.\./\.\./\.\./index\.md\#message\_catalog), [message
package](\.\./\.\./\.\./\.\./index\.md\#message\_package)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_parse.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308

[//000000001]: # (doctools::idx::parse \- Documentation tools)
[//000000002]: # (Generated from file 'idx\_parse\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::parse\(n\) 1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::parse \- Parsing text in docidx format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Parse errors](#section3)

  - [\[docidx\] notation of keyword indices](#section4)

  - [Keyword index serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require doctools::idx::parse ?0\.1?  
package require Tcl 8\.4  
package require doctools::idx::structure  
package require doctools::msgcat  
package require doctools::tcl::parse  
package require fileutil  
package require logger  
package require snit  
package require struct::list  
package require struct::stack  

[__::doctools::idx::parse__ __text__ *text*](#1)  
[__::doctools::idx::parse__ __file__ *path*](#2)  
[__::doctools::idx::parse__ __includes__](#3)  
[__::doctools::idx::parse__ __include add__ *path*](#4)  
[__::doctools::idx::parse__ __include remove__ *path*](#5)  
[__::doctools::idx::parse__ __include clear__](#6)  
[__::doctools::idx::parse__ __vars__](#7)  
[__::doctools::idx::parse__ __var set__ *name* *value*](#8)  
[__::doctools::idx::parse__ __var unset__ *name*](#9)  
[__::doctools::idx::parse__ __var clear__ ?*pattern*?](#10)  

# <a name='description'></a>DESCRIPTION

This package provides commands to parse text written in the
*[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* markup language and convert it
into the canonical serialization of the keyword index encoded in the text\. See
the section [Keyword index serialization format](#section5) for
specification of their format\.

This is an internal package of doctools, for use by the higher level packages
handling *[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* documents\.

# <a name='section2'></a>API

  - <a name='1'></a>__::doctools::idx::parse__ __text__ *text*

    The command takes the string contained in *text* and parses it under the
    assumption that it contains a document written using the
    *[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* markup language\. An error is
    thrown if this assumption is found to be false\. The format of these errors
    is described in section [Parse errors](#section3)\.

    When successful the command returns the canonical serialization of the
    keyword index which was encoded in the text\. See the section [Keyword index
    serialization format](#section5) for specification of that format\.

  - <a name='2'></a>__::doctools::idx::parse__ __file__ *path*

    The same as __text__, except that the text to parse is read from the
    file specified by *path*\.

  - <a name='3'></a>__::doctools::idx::parse__ __includes__

    This method returns the current list of search paths used when looking for
    include files\.

  - <a name='4'></a>__::doctools::idx::parse__ __include add__ *path*

    This method adds the *path* to the list of paths searched when looking for
    an include file\. The call is ignored if the path is already in the list of
    paths\. The method returns the empty string as its result\.

  - <a name='5'></a>__::doctools::idx::parse__ __include remove__ *path*

    This method removes the *path* from the list of paths searched when
    looking for an include file\. The call is ignored if the path is not
    contained in the list of paths\. The method returns the empty string as its
    result\.

  - <a name='6'></a>__::doctools::idx::parse__ __include clear__

    This method clears the list of search paths for include files\.

  - <a name='7'></a>__::doctools::idx::parse__ __vars__

    This method returns a dictionary containing the current set of predefined
    variables known to the __vset__ markup command during processing\.

  - <a name='8'></a>__::doctools::idx::parse__ __var set__ *name* *value*

    This method adds the variable *name* to the set of predefined variables
    known to the __vset__ markup command during processing, and gives it the
    specified *value*\. The method returns the empty string as its result\.

  - <a name='9'></a>__::doctools::idx::parse__ __var unset__ *name*

    This method removes the variable *name* from the set of predefined
    variables known to the __vset__ markup command during processing\. The
    method returns the empty string as its result\.

  - <a name='10'></a>__::doctools::idx::parse__ __var clear__ ?*pattern*?

    This method removes all variables matching the *pattern* from the set of
    predefined variables known to the __vset__ markup command during
    processing\. The method returns the empty string as its result\.

    The pattern matching is done with __string match__, and the default
    pattern used when none is specified, is __\*__\.

# <a name='section3'></a>Parse errors

The format of the parse error messages thrown when encountering violations of
the *[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* markup syntax is human
readable and not intended for processing by machines\. As such it is not
documented\.

*However*, the errorCode attached to the message is machine\-readable and has
the following format:

  1. The error code will be a list, each element describing a single error found
     in the input\. The list has at least one element, possibly more\.

  1. Each error element will be a list containing six strings describing an
     error in detail\. The strings will be

       1) The path of the file the error occurred in\. This may be empty\.

       1) The range of the token the error was found at\. This range is a
          two\-element list containing the offset of the first and last character
          in the range, counted from the beginning of the input \(file\)\. Offsets
          are counted from zero\.

       1) The line the first character after the error is on\. Lines are counted
          from one\.

       1) The column the first character after the error is at\. Columns are
          counted from zero\.

       1) The message code of the error\. This value can be used as argument to
          __msgcat::mc__ to obtain a localized error message, assuming that
          the application had a suitable call of __doctools::msgcat::init__
          to initialize the necessary message catalogs \(See package
          __[doctools::msgcat](\.\./doctools2base/tcllib\_msgcat\.md)__\)\.

       1) A list of details for the error, like the markup command involved\. In
          the case of message code __docidx/include/syntax__ this value is
          the set of errors found in the included file, using the format
          described here\.

# <a name='section4'></a>\[docidx\] notation of keyword indices

The docidx format for keyword indices, also called the *docidx markup
language*, is too large to be covered in single section\. The interested reader
should start with the document

  1. *[docidx language introduction](\.\./doctools/docidx\_lang\_intro\.md)*

and then proceed from there to the formal specifications, i\.e\. the documents

  1. *[docidx language syntax](\.\./doctools/docidx\_lang\_syntax\.md)* and

  1. *[docidx language command
     reference](\.\./doctools/docidx\_lang\_cmdref\.md)*\.

to get a thorough understanding of the language\.

# <a name='section5'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[lexer](\.\./\.\./\.\./\.\./index\.md\#lexer),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/idx_structure.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234

[//000000001]: # (doctools::idx::structure \- Documentation tools)
[//000000002]: # (Generated from file 'idx\_structure\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::structure\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::structure \- Docidx serialization utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Keyword index serialization format](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require doctools::idx::structure ?0\.1?  
package require Tcl 8\.4  
package require logger  
package require snit  

[__::doctools::idx::structure__ __verify__ *serial* ?*canonvar*?](#1)  
[__::doctools::idx::structure__ __verify\-as\-canonical__ *serial*](#2)  
[__::doctools::idx::structure__ __canonicalize__ *serial*](#3)  
[__::doctools::idx::structure__ __print__ *serial*](#4)  
[__::doctools::idx::structure__ __merge__ *seriala* *serialb*](#5)  

# <a name='description'></a>DESCRIPTION

This package provides commands to work with the serializations of keyword
indices as managed by the doctools system v2, and specified in section [Keyword
index serialization format](#section3)\.

This is an internal package of doctools, for use by the higher level packages
handling keyword indices and their conversion into and out of various other
formats, like documents written using
*[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* markup\.

# <a name='section2'></a>API

  - <a name='1'></a>__::doctools::idx::structure__ __verify__ *serial* ?*canonvar*?

    This command verifies that the content of *serial* is a valid *regular*
    serialization of a keyword index and will throw an error if that is not the
    case\. The result of the command is the empty string\.

    If the argument *canonvar* is specified it is interpreted as the name of a
    variable in the calling context\. This variable will be written to if and
    only if *serial* is a valid regular serialization\. Its value will be a
    boolean, with __True__ indicating that the serialization is not only
    valid, but also *canonical*\. __False__ will be written for a valid,
    but non\-canonical serialization\.

    For the specification of regular and canonical keyword index serializations
    see the section [Keyword index serialization format](#section3)\.

  - <a name='2'></a>__::doctools::idx::structure__ __verify\-as\-canonical__ *serial*

    This command verifies that the content of *serial* is a valid
    *canonical* serialization of a keyword index and will throw an error if
    that is not the case\. The result of the command is the empty string\.

    For the specification of canonical keyword index serializations see the
    section [Keyword index serialization format](#section3)\.

  - <a name='3'></a>__::doctools::idx::structure__ __canonicalize__ *serial*

    This command assumes that the content of *serial* is a valid *regular*
    serialization of a keyword index and will throw an error if that is not the
    case\.

    It will then convert the input into the *canonical* serialization of the
    contained keyword index and return it as its result\. If the input is already
    canonical it will be returned unchanged\.

    For the specification of regular and canonical keyword index serializations
    see the section [Keyword index serialization format](#section3)\.

  - <a name='4'></a>__::doctools::idx::structure__ __print__ *serial*

    This command assumes that the argument *serial* contains a valid regular
    serialization of a keyword index and returns a string containing that index
    in a human readable form\.

    The exact format of this form is not specified and cannot be relied on for
    parsing or other machine\-based activities\.

    For the specification of regular keyword index serializations see the
    section [Keyword index serialization format](#section3)\.

  - <a name='5'></a>__::doctools::idx::structure__ __merge__ *seriala* *serialb*

    This command accepts the regular serializations of two keyword indices and
    uses them to create their union\. The result of the command is the canonical
    serialization of this unified keyword index\.

    Title and label of the resulting index are taken from the index contained in
    *serialb*\. The set of keys, references and their connections is the union
    of the set of keys and references of the two inputs\.

    For the specification of regular and canonical keyword index serializations
    see the section [Keyword index serialization format](#section3)\.

# <a name='section3'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[deserialization](\.\./\.\./\.\./\.\./index\.md\#deserialization),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2idx/import_docidx.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

[//000000001]: # (doctools::idx::import::docidx \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::idx::import::docidx\(n\) 0\.2\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::idx::import::docidx \- docidx import plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [\[docidx\] notation of keyword indices](#section3)

  - [Keyword index serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require doctools::idx::import::docidx ?0\.2\.1?  
package require doctools::idx::parse  
package require doctools::idx::structure  
package require doctools::msgcat  
package require doctools::tcl::parse  
package require fileutil  
package require logger  
package require snit  
package require struct::list  
package require struct::set  
package require struct::stack  
package require struct::tree  
package require treeql  

[__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *string* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools keyword index import plugin for the parsing
of docidx markup\.

This is an internal package of doctools, for use by the higher level management
packages handling keyword indices, especially
__[doctools::idx::import](idx\_import\.md)__, the import manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::idx::import](idx\_import\.md)__ and the import
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the docidx
import plugin API version 2\.

  - <a name='1'></a>__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *string* *configuration*

    This command takes the *string* and parses it as docidx markup encoding a
    keyword index, in the context of the specified *configuration* \(a
    dictionary\)\. The result of the command is the canonical serialization of
    that keyword index, in the form specified in section [Keyword index
    serialization format](#section4)\.

# <a name='section3'></a>\[docidx\] notation of keyword indices

The docidx format for keyword indices, also called the *docidx markup
language*, is too large to be covered in single section\. The interested reader
should start with the document

  1. *[docidx language introduction](\.\./doctools/docidx\_lang\_intro\.md)*

and then proceed from there to the formal specifications, i\.e\. the documents

  1. *[docidx language syntax](\.\./doctools/docidx\_lang\_syntax\.md)* and

  1. *[docidx language command
     reference](\.\./doctools/docidx\_lang\_cmdref\.md)*\.

to get a thorough understanding of the language\.

# <a name='section4'></a>Keyword index serialization format

Here we specify the format used by the doctools v2 packages to serialize keyword
indices as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
keyword index may have more than one regular serialization only exactly one of
them will be *canonical*\.

  - regular serialization

      1. An index serialization is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::idx__, and its
         value\. This value holds the contents of the index\.

      1. The contents of the index are a Tcl dictionary holding the title of the
         index, a label, and the keywords and references\. The relevant keys and
         their values are

           * __title__

             The value is a string containing the title of the index\.

           * __label__

             The value is a string containing a label for the index\.

           * __keywords__

             The value is a Tcl dictionary, using the keywords known to the
             index as keys\. The associated values are lists containing the
             identifiers of the references associated with that particular
             keyword\.

             Any reference identifier used in these lists has to exist as a key
             in the __references__ dictionary, see the next item for its
             definition\.

           * __references__

             The value is a Tcl dictionary, using the identifiers for the
             references known to the index as keys\. The associated values are
             2\-element lists containing the type and label of the reference, in
             this order\.

             Any key here has to be associated with at least one keyword, i\.e\.
             occur in at least one of the reference lists which are the values
             in the __keywords__ dictionary, see previous item for its
             definition\.

      1. The *[type](\.\./\.\./\.\./\.\./index\.md\#type)* of a reference can be one
         of two values,

           * __manpage__

             The identifier of the reference is interpreted as symbolic file
             name, referring to one of the documents the index was made for\.

           * __url__

             The identifier of the reference is interpreted as an url, referring
             to some external location, like a website, etc\.

  - canonical serialization

    The canonical serialization of a keyword index has the format as specified
    in the previous item, and then additionally satisfies the constraints below,
    which make it unique among all the possible serializations of the keyword
    index\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The references listed for each keyword of the index, if any, are listed
         in ascending dictionary order of their *labels*, as generated by
         Tcl's builtin command __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[deserialization](\.\./\.\./\.\./\.\./index\.md\#deserialization),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[import](\.\./\.\./\.\./\.\./index\.md\#import),
[index](\.\./\.\./\.\./\.\./index\.md\#index)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/export_doctoc.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281

[//000000001]: # (doctools::toc::export::doctoc \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::export::doctoc\(n\) 0\.2\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::export::doctoc \- doctoc export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [\[doctoc\] notation of tables of contents](#section3)

  - [Configuration](#section4)

  - [ToC serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::toc::export::doctoc ?0\.2\.1?  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools table of contents export plugin for the
generation of doctoc markup\.

This is an internal package of doctools, for use by the higher level management
packages handling tables of contents, especially
__[doctools::toc::export](toc\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::toc::export](toc\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the doctoc
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a table of contents, as
    specified in section [ToC serialization format](#section5), and
    contained in *serial*, the *configuration*, a dictionary, and generates
    doctoc markup encoding the table\. The created string is then returned as the
    result of the command\.

# <a name='section3'></a>\[doctoc\] notation of tables of contents

The doctoc format for tables of contents, also called the *doctoc markup
language*, is too large to be covered in single section\. The interested reader
should start with the document

  1. *[doctoc language introduction](\.\./doctools/doctoc\_lang\_intro\.md)*

and then proceed from there to the formal specifications, i\.e\. the documents

  1. *[doctoc language syntax](\.\./doctools/doctoc\_lang\_syntax\.md)* and

  1. *[doctoc language command
     reference](\.\./doctools/doctoc\_lang\_cmdref\.md)*\.

to get a thorough understanding of the language\.

# <a name='section4'></a>Configuration

The doctoc export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - string *user*

    This standard configuration variable contains the name of the user running
    the process which invoked the export plugin\. The plugin puts this
    information into the provenance comment at the beginning of the generated
    document\.

  - string *file*

    This standard configuration variable contains the name of the file the table
    of contents came from\. This variable may not be set or contain the empty
    string\. The plugin puts this information, if defined, i\.e\. set and not the
    empty string, into the provenance comment at the beginning of the generated
    document\.

  - boolean *newlines*

    If this flag is set the plugin will break the generated doctoc code across
    lines, with each markup command on a separate line\.

    If this flag is not set \(the default\), the whole document will be written on
    a single line, with minimum spacing between all elements\.

  - boolean *indented*

    If this flag is set the plugin will indent the markup commands according to
    the structure of tables of contents\. To make this work this also implies
    that __newlines__ is set\. This effect is independent of the value for
    __aligned__ however\.

    If this flag is not set \(the default\), the output is formatted as per the
    value of __newlines__, and no indenting is done\.

  - boolean *aligned*

    If this flag is set the generator ensures that the arguments for the
    __item__ commands in a division are aligned vertically for a nice table
    effect\. To make this work this also implies that __newlines__ is set\.
    This effect is independent of the value for __indented__ however\.

    If this flag is not set \(the default\), the output is formatted as per the
    values of __newlines__ and __indented__, and no alignment is done\.

*Note* that this plugin ignores the standard configuration variables
__format__, and __map__, and their values\.

# <a name='section5'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/import_doctoc.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240

[//000000001]: # (doctools::toc::import::doctoc \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::import::doctoc\(n\) 0\.2\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::import::doctoc \- doctoc import plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [\[doctoc\] notation of tables of contents](#section3)

  - [ToC serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require doctools::toc::import::doctoc ?0\.2\.1?  
package require doctools::toc::parse  
package require doctools::toc::structure  
package require doctools::msgcat  
package require doctools::tcl::parse  
package require fileutil  
package require logger  
package require snit  
package require struct::list  
package require struct::set  
package require struct::stack  
package require struct::tree  
package require treeql  

[__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *string* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools table of contents import plugin for the
parsing of doctoc markup\.

This is an internal package of doctools, for use by the higher level management
packages handling tables of contents, especially
__[doctools::toc::import](toc\_import\.md)__, the import manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::toc::import](toc\_import\.md)__ and the import
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the doctoc
import plugin API version 2\.

  - <a name='1'></a>__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *string* *configuration*

    This command takes the *string* and parses it as doctoc markup encoding a
    table of contents, in the context of the specified *configuration* \(a
    dictionary\)\. The result of the command is the canonical serialization of
    that table of contents, in the form specified in section [ToC serialization
    format](#section4)\.

# <a name='section3'></a>\[doctoc\] notation of tables of contents

The doctoc format for tables of contents, also called the *doctoc markup
language*, is too large to be covered in single section\. The interested reader
should start with the document

  1. *[doctoc language introduction](\.\./doctools/doctoc\_lang\_intro\.md)*

and then proceed from there to the formal specifications, i\.e\. the documents

  1. *[doctoc language syntax](\.\./doctools/doctoc\_lang\_syntax\.md)* and

  1. *[doctoc language command
     reference](\.\./doctools/doctoc\_lang\_cmdref\.md)*\.

to get a thorough understanding of the language\.

# <a name='section4'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[deserialization](\.\./\.\./\.\./\.\./index\.md\#deserialization),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[import](\.\./\.\./\.\./\.\./index\.md\#import), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_container.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517

[//000000001]: # (doctools::toc \- Documentation tools)
[//000000002]: # (Generated from file 'toc\_container\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc\(n\) 2 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc \- Holding tables of contents

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Concepts](#section2)

  - [API](#section3)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

  - [ToC serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require doctools::toc ?2?  
package require Tcl 8\.4  
package require doctools::toc::structure  
package require struct::tree  
package require snit  

[__::doctools::toc__ *objectName*](#1)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __\+ reference__ *id* *label* *docid* *desc*](#4)  
[*objectName* __\+ division__ *id* *label* ?*docid*?](#5)  
[*objectName* __remove__ *id*](#6)  
[*objectName* __up__ *id*](#7)  
[*objectName* __next__ *id*](#8)  
[*objectName* __prev__ *id*](#9)  
[*objectName* __child__ *id* *label* ?*\.\.\.*?](#10)  
[*objectName* __element__ ?*\.\.\.*?](#11)  
[*objectName* __children__ *id*](#12)  
[*objectName* __type__ *id*](#13)  
[*objectName* __full\-label__ *id*](#14)  
[*objectName* __elabel__ *id* ?*newlabel*?](#15)  
[*objectName* __description__ *id* ?*newdesc*?](#16)  
[*objectName* __document__ *id* ?*newdocid*?](#17)  
[*objectName* __title__](#18)  
[*objectName* __title__ *text*](#19)  
[*objectName* __label__](#20)  
[*objectName* __label__ *text*](#21)  
[*objectName* __importer__](#22)  
[*objectName* __importer__ *object*](#23)  
[*objectName* __exporter__](#24)  
[*objectName* __exporter__ *object*](#25)  
[*objectName* __deserialize =__ *data* ?*format*?](#26)  
[*objectName* __deserialize \+=__ *data* ?*format*?](#27)  
[*objectName* __serialize__ ?*format*?](#28)  

# <a name='description'></a>DESCRIPTION

This package provides a class to contain and programmatically manipulate tables
of contents\.

This is one of the three public pillars the management of tables of contents
resides on\. The other two pillars are

  1. *[Exporting tables of contents](toc\_export\.md)*, and

  1. *Importing tables of contents*

For information about the [Concepts](#section2) of tables of contents, and
their parts, see the same\-named section\. For information about the data
structure which is used to encode tables of contents as values see the section
[ToC serialization format](#section4)\. This is the only format directly
known to this class\. Conversions from and to any other format are handled by
export and import manager objects\. These may be attached to a container, but do
not have to be, it is merely a convenience\.

# <a name='section2'></a>Concepts

  1. A *[table of contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents)*
     consists of a \(possibly empty\) list of *elements*\.

  1. Each element in the list is identified by its label\.

  1. Each element is either a
     *[reference](\.\./\.\./\.\./\.\./index\.md\#reference)*, or a *division*\.

  1. Each reference has an associated document, identified by a symbolic id, and
     a textual description\.

  1. Each division may have an associated document, identified by a symbolic id\.

  1. Each division consists consists of a \(possibly empty\) list of *elements*,
     with each element following the rules as specified in item 2 and above\.

A few notes

  1. The above rules span up a tree of elements, with references as the leaf
     nodes, and divisions as the inner nodes, and each element representing an
     entry in the whole table of contents\.

  1. The identifying labels of any element E are unique within their division
     \(or toc\), and the full label of any element E is the list of labels for all
     nodes on the unique path from the root of the tree to E, including E\.

# <a name='section3'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__::doctools::toc__ *objectName*

    This command creates a new container object with an associated Tcl command
    whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

## <a name='subsection2'></a>Object command

All objects created by the __::doctools::toc__ command have the following
general form:

  - <a name='2'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='4'></a>*objectName* __\+ reference__ *id* *label* *docid* *desc*

    This method adds a new reference element to the table of contents, under the
    element specified via its handle *id*\. This parent element has to be a
    division element, or the root\. An error is thrown otherwise\. The new element
    will be externally identified by its *label*, which has to be be unique
    within the parent element\. An error is thrown otherwise\.

    As a reference element it will refer to a document identified by the
    symbolic *docid*\. This reference must not be the empty string, an error is
    thrown otherwise\. Beyond the label the element also has a longer descriptive
    string, supplied via *desc*\.

    The result of the method is the handle \(id\) of the new element\.

  - <a name='5'></a>*objectName* __\+ division__ *id* *label* ?*docid*?

    This method adds a new division element to the table of contents, under the
    element specified via its handle *id*\. This parent element has to be a
    division element, or the root\. An error is thrown otherwise\. The new element
    will be externally identified by its *label*, which has to be be unique
    within the parent element\. An error is thrown otherwise\.

    As a division element it is can refer to a document, identified by the
    symbolic *docid*, but may choose not to\.

    The result of the method is the handle \(id\) of the new element\.

  - <a name='6'></a>*objectName* __remove__ *id*

    This method removes the element identified by the handle *id* from the
    table of contents\. If the element is a division all of its children, if any,
    are removed as well\. The root element/division of the table of contents
    cannot be removed however, only its children\.

    The result of the method is the empty string\.

  - <a name='7'></a>*objectName* __up__ *id*

    This method returns the handle of the parent for the element identified by
    its handle *id*, or the empty string if *id* referred to the root
    element\.

  - <a name='8'></a>*objectName* __next__ *id*

    This method returns the handle of the right sibling for the element
    identified by its handle *id*, or the handle of the parent if the element
    has no right sibling, or the empty string if *id* referred to the root
    element\.

  - <a name='9'></a>*objectName* __prev__ *id*

    This method returns the handle of the left sibling for the element
    identified by its handle *id*, or the handle of the parent if the element
    has no left sibling, or the empty string if *id* referred to the root
    element\.

  - <a name='10'></a>*objectName* __child__ *id* *label* ?*\.\.\.*?

    This method returns the handle of a child of the element identified by its
    handle *id*\. The child itself is identified by a series of labels\.

  - <a name='11'></a>*objectName* __element__ ?*\.\.\.*?

    This method returns the handle of the element identified by a series of
    labels, starting from the root of the table of contents\. The series of
    labels is allowed to be empty, in which case the handle of the root element
    is returned\.

  - <a name='12'></a>*objectName* __children__ *id*

    This method returns a list containing the handles of all children of the
    element identified by the handle *id*, from first to last, in that order\.

  - <a name='13'></a>*objectName* __type__ *id*

    This method returns the type of the element, either __reference__, or
    __division__\.

  - <a name='14'></a>*objectName* __full\-label__ *id*

    This method is the complement of the method __element__, converting the
    handle *id* of an element into a list of labels full identifying the
    element within the whole table of contents\.

  - <a name='15'></a>*objectName* __elabel__ *id* ?*newlabel*?

    This method queries and/or changes the label of the element identified by
    the handle *id*\. If the argument *newlabel* is present then the label is
    changed to that value\. Regardless of this, the result of the method is the
    current value of the label\.

    If the label is changed the new label has to be unique within the containing
    division, or an error is thrown\.

    Further, of the *id* refers to the root element of the table of contents,
    then using this method is equivalent to using the method *label*, i\.e\. it
    is accessing the global label for the whole table\.

  - <a name='16'></a>*objectName* __description__ *id* ?*newdesc*?

    This method queries and/or changes the description of the element identified
    by the handle *id*\. If the argument *newdesc* is present then the
    description is changed to that value\. Regardless of this, the result of the
    method is the current value of the description\.

    The element this method operates on has to be a reference element, or an
    error will be thrown\.

  - <a name='17'></a>*objectName* __document__ *id* ?*newdocid*?

    This method queries and/or changes the document reference of the element
    identified by the handle *id*\. If the argument *newdocid* is present
    then the description is changed to that value\. Regardless of this, the
    result of the method is the current value of the document reference\.

    Setting the reference to the empty string means unsetting it, and is allowed
    only for division elements\. Conversely, if the result is the empty string
    then the element has no document reference, and this can happen only for
    division elements\.

  - <a name='18'></a>*objectName* __title__

    Returns the currently defined title of the table of contents\.

  - <a name='19'></a>*objectName* __title__ *text*

    Sets the title of the table of contents to *text*, and returns it as the
    result of the command\.

  - <a name='20'></a>*objectName* __label__

    Returns the currently defined label of the table of contents\.

  - <a name='21'></a>*objectName* __label__ *text*

    Sets the label of the table of contents to *text*, and returns it as the
    result of the command\.

  - <a name='22'></a>*objectName* __importer__

    Returns the import manager object currently attached to the container, if
    any\.

  - <a name='23'></a>*objectName* __importer__ *object*

    Attaches the *object* as import manager to the container, and returns it
    as the result of the command\. Note that the *object* is *not* put into
    ownership of the container\. I\.e\., destruction of the container will *not*
    destroy the *object*\.

    It is expected that *object* provides a method named __import text__
    which takes a text and a format name, and returns the canonical
    serialization of the table of contents contained in the text, assuming the
    given format\.

  - <a name='24'></a>*objectName* __exporter__

    Returns the export manager object currently attached to the container, if
    any\.

  - <a name='25'></a>*objectName* __exporter__ *object*

    Attaches the *object* as export manager to the container, and returns it
    as the result of the command\. Note that the *object* is *not* put into
    ownership of the container\. I\.e\., destruction of the container will *not*
    destroy the *object*\.

    It is expected that *object* provides a method named __export object__
    which takes the container and a format name, and returns a text encoding
    table of contents stored in the container, in the given format\. It is
    further expected that the *object* will use the container's method
    __serialize__ to obtain the serialization of the table of contents from
    which to generate the text\.

  - <a name='26'></a>*objectName* __deserialize =__ *data* ?*format*?

    This method replaces the contents of the table object with the table
    contained in the *data*\. If no *format* was specified it is assumed to
    be the regular serialization of a table of contents\.

    Otherwise the object will use the attached import manager to convert the
    data from the specified format to a serialization it can handle\. In that
    case an error will be thrown if the container has no import manager attached
    to it\.

    The result of the method is the empty string\.

  - <a name='27'></a>*objectName* __deserialize \+=__ *data* ?*format*?

    This method behaves like __deserialize =__ in its essentials, except
    that it merges the table of contents in the *data* to its contents instead
    of replacing it\. The method will throw an error if merging is not possible,
    i\.e\. would produce an invalid table\. The existing content is left unchanged
    in that case\.

    The result of the method is the empty string\.

  - <a name='28'></a>*objectName* __serialize__ ?*format*?

    This method returns the table of contents contained in the object\. If no
    *format* is not specified the returned result is the canonical
    serialization of its contents\.

    Otherwise the object will use the attached export manager to convert the
    data to the specified format\. In that case an error will be thrown if the
    container has no export manager attached to it\.

# <a name='section4'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html), [TMML](\.\./\.\./\.\./\.\./index\.md\#tmml),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion), [doctoc
markup](\.\./\.\./\.\./\.\./index\.md\#doctoc\_markup),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[generation](\.\./\.\./\.\./\.\./index\.md\#generation),
[json](\.\./\.\./\.\./\.\./index\.md\#json), [latex](\.\./\.\./\.\./\.\./index\.md\#latex),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin),
[reference](\.\./\.\./\.\./\.\./index\.md\#reference),
[table](\.\./\.\./\.\./\.\./index\.md\#table), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents), [tcler's
wiki](\.\./\.\./\.\./\.\./index\.md\#tcler\_s\_wiki),
[text](\.\./\.\./\.\./\.\./index\.md\#text), [wiki](\.\./\.\./\.\./\.\./index\.md\#wiki)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_export.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486

[//000000001]: # (doctools::toc::export \- Documentation tools)
[//000000002]: # (Generated from file 'toc\_export\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::export\(n\) 0\.2\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::export \- Exporting tables of contents

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Concepts](#section2)

  - [API](#section3)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

  - [Export plugin API v2 reference](#section4)

  - [ToC serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require doctools::toc::export ?0\.2\.1?  
package require Tcl 8\.4  
package require struct::map  
package require doctools::toc::structure  
package require snit  
package require pluginmgr  

[__::doctools::toc::export__ *objectName*](#1)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __export serial__ *serial* ?*format*?](#4)  
[*objectName* __export object__ *object* ?*format*?](#5)  
[*objectName* __config names__](#6)  
[*objectName* __config get__](#7)  
[*objectName* __config set__ *name* ?*value*?](#8)  
[*objectName* __config unset__ *pattern*\.\.\.](#9)  
[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#10)  

# <a name='description'></a>DESCRIPTION

This package provides a class to manage the plugins for the export of tables of
contents to other formats, i\.e\. their conversion to, for example
*[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)*,
*[HTML](\.\./\.\./\.\./\.\./index\.md\#html)*, etc\.

This is one of the three public pillars the management of tables of contents
resides on\. The other two pillars are

  1. *Importing tables of contents*, and

  1. *[Holding tables of contents](toc\_container\.md)*

For information about the [Concepts](#section2) of tables of contents, and
their parts, see the same\-named section\. For information about the data
structure which is the major input to the manager objects provided by this
package see the section [ToC serialization format](#section5)\.

The plugin system of our class is based on the package
__[pluginmgr](\.\./pluginmgr/pluginmgr\.md)__, and configured to look for
plugins using

  1. the environment variable __DOCTOOLS\_TOC\_EXPORT\_PLUGINS__,

  1. the environment variable __DOCTOOLS\_TOC\_PLUGINS__,

  1. the environment variable __DOCTOOLS\_PLUGINS__,

  1. the path "~/\.doctools/toc/export/plugin"

  1. the path "~/\.doctools/toc/plugin"

  1. the path "~/\.doctools/plugin"

  1. the path "~/\.doctools/toc/export/plugins"

  1. the path "~/\.doctools/toc/plugins"

  1. the path "~/\.doctools/plugins"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\TOC\\EXPORT\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\TOC\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\PLUGINS"

The last three are used only when the package is run on a machine using
Windows\(tm\) operating system\.

The whole system is delivered with six predefined export plugins, namely

  - doctoc

    See *[doctoc export plugin](export\_doctoc\.md)* for details\.

  - html

    See *html export plugin* for details\.

  - json

    See *json export plugin* for details\.

  - nroff

    See *[nroff export plugin](toc\_export\_nroff\.md)* for details\.

  - text

    See *text export plugin* for details\.

  - wiki

    See *[wiki export plugin](toc\_export\_wiki\.md)* for details\.

Readers wishing to write their own export plugin for some format, i\.e\. *plugin
writer*s reading and understanding the section containing the [Export plugin
API v2 reference](#section4) is an absolute necessity, as it specifies the
interaction between this package and its plugins in detail\.

# <a name='section2'></a>Concepts

  1. A *[table of contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents)*
     consists of a \(possibly empty\) list of *elements*\.

  1. Each element in the list is identified by its label\.

  1. Each element is either a
     *[reference](\.\./\.\./\.\./\.\./index\.md\#reference)*, or a *division*\.

  1. Each reference has an associated document, identified by a symbolic id, and
     a textual description\.

  1. Each division may have an associated document, identified by a symbolic id\.

  1. Each division consists consists of a \(possibly empty\) list of *elements*,
     with each element following the rules as specified in item 2 and above\.

A few notes

  1. The above rules span up a tree of elements, with references as the leaf
     nodes, and divisions as the inner nodes, and each element representing an
     entry in the whole table of contents\.

  1. The identifying labels of any element E are unique within their division
     \(or toc\), and the full label of any element E is the list of labels for all
     nodes on the unique path from the root of the tree to E, including E\.

# <a name='section3'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__::doctools::toc::export__ *objectName*

    This command creates a new export manager object with an associated Tcl
    command whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

## <a name='subsection2'></a>Object command

All objects created by the __::doctools::toc::export__ command have the
following general form:

  - <a name='2'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='4'></a>*objectName* __export serial__ *serial* ?*format*?

    This method takes the canonical serialization of a table of contents stored
    in *serial* and converts it to the specified *format*, using the export
    plugin for the format\. An error is thrown if no plugin could be found for
    the format\. The string generated by the conversion process is returned as
    the result of this method\.

    If no format is specified the method defaults to __doctoc__\.

    The specification of what a *canonical* serialization is can be found in
    the section [ToC serialization format](#section5)\.

    The plugin has to conform to the interface specified in section [Export
    plugin API v2 reference](#section4)\.

  - <a name='5'></a>*objectName* __export object__ *object* ?*format*?

    This method is a convenient wrapper around the __export serial__ method
    described by the previous item\. It expects that *object* is an object
    command supporting a __serialize__ method returning the canonical
    serialization of a table of contents\. It invokes that method, feeds the
    result into __export serial__ and returns the resulting string as its
    own result\.

  - <a name='6'></a>*objectName* __config names__

    This method returns a list containing the names of all configuration
    variables currently known to the object\.

  - <a name='7'></a>*objectName* __config get__

    This method returns a dictionary containing the names and values of all
    configuration variables currently known to the object\.

  - <a name='8'></a>*objectName* __config set__ *name* ?*value*?

    This method sets the configuration variable *name* to the specified
    *value* and returns the new value of the variable\.

    If no value is specified it simply returns the current value, without
    changing it\.

    Note that while the user can set the predefined configuration variables
    __user__ and __format__ doing so will have no effect, these values
    will be internally overridden when invoking an import plugin\.

  - <a name='9'></a>*objectName* __config unset__ *pattern*\.\.\.

    This method unsets all configuration variables matching the specified glob
    *pattern*s\. If no pattern is specified it will unset all currently defined
    configuration variables\.

# <a name='section4'></a>Export plugin API v2 reference

Plugins are what this package uses to manage the support for any output format
beyond the [ToC serialization format](#section5)\. Here we specify the API
the objects created by this package use to interact with their plugins\.

A plugin for this package has to follow the rules listed below:

  1. A plugin is a package\.

  1. The name of a plugin package has the form
     doctools::toc::export::__FOO__, where __FOO__ is the name of the
     format the plugin will generate output for\. This name is also the argument
     to provide to the various __export__ methods of export manager objects
     to get a string encoding a table of contents in that format\.

  1. The plugin can expect that the package
     __doctools::toc::export::plugin__ is present, as indicator that it was
     invoked from a genuine plugin manager\.

  1. A plugin has to provide one command, with the signature shown below\.

       - <a name='10'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

         Whenever an export manager of
         __[doctools::toc](\.\./doctools/doctoc\.md)__ has to generate
         output for a table of contents it will invoke this command\.

           * string *serial*

             This argument will contain the *canonical* serialization of the
             table of contents for which to generate the output\. The
             specification of what a *canonical* serialization is can be found
             in the section [ToC serialization format](#section5)\.

           * dictionary *configuration*

             This argument will contain the current configuration to apply to
             the generation, as a dictionary mapping from variable names to
             values\.

             The following configuration variables have a predefined meaning all
             plugins have to obey, although they can ignore this information at
             their discretion\. Any other other configuration variables
             recognized by a plugin will be described in the manpage for that
             plugin\.

               + user

                 This variable is expected to contain the name of the user
                 owning the process invoking the plugin\.

               + format

                 This variable is expected to contain the name of the format
                 whose plugin is invoked\.

               + file

                 This variable, if defined by the user of the table object is
                 expected to contain the name of the input file for which the
                 plugin is generating its output for\.

               + map

                 This variable, if defined by the user of the table object is
                 expected to contain a dictionary mapping from symbolic document
                 ids used in the table entries to actual paths \(or urls\)\. A
                 plugin has to be able to handle the possibility that a document
                 id is without entry in this mapping\.

  1. A single usage cycle of a plugin consists of the invokations of the command
     __[export](\.\./\.\./\.\./\.\./index\.md\#export)__\. This call has to leave
     the plugin in a state where another usage cycle can be run without
     problems\.

# <a name='section5'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[generation](\.\./\.\./\.\./\.\./index\.md\#generation),
[json](\.\./\.\./\.\./\.\./index\.md\#json),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin),
[reference](\.\./\.\./\.\./\.\./index\.md\#reference),
[table](\.\./\.\./\.\./\.\./index\.md\#table), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents), [tcler's
wiki](\.\./\.\./\.\./\.\./index\.md\#tcler\_s\_wiki),
[text](\.\./\.\./\.\./\.\./index\.md\#text), [url](\.\./\.\./\.\./\.\./index\.md\#url),
[wiki](\.\./\.\./\.\./\.\./index\.md\#wiki)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_export_html.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340

[//000000001]: # (doctools::toc::export::html \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::export::html\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::export::html \- HTML export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Configuration](#section3)

  - [ToC serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::toc::export::html ?0\.1?  
package require doctools::text  
package require doctools::html  
package require doctools::html::cssdefaults  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools table of contents export plugin for the
generation of HTML markup\.

This is an internal package of doctools, for use by the higher level management
packages handling tables of contents, especially
__[doctools::toc::export](toc\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::toc::export](toc\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the doctoc
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a table of contents, as
    specified in section [ToC serialization format](#section4), and
    contained in *serial*, the *configuration*, a dictionary, and generates
    HTML markup encoding the table\. The created string is then returned as the
    result of the command\.

# <a name='section3'></a>Configuration

The html export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - string *user*

    This standard configuration variable contains the name of the user running
    the process which invoked the export plugin\. The plugin puts this
    information into the provenance comment at the beginning of the generated
    document\.

  - string *file*

    This standard configuration variable contains the name of the file the table
    of contents came from\. This variable may not be set or contain the empty
    string\. The plugin puts this information, if defined, i\.e\. set and not the
    empty string, into the provenance comment at the beginning of the generated
    document\.

  - dictionary *map*

    This standard configuration variable contains a dictionary mapping from the
    \(symbolic\) document ids in reference entries to the actual filenames and/or
    urls to be used in the output\.

    Document ids without a mapping are used unchanged\.

  - boolean *newlines*

    If this flag is set the plugin will break the generated html code across
    lines, with each markup command on a separate line\.

    If this flag is not set \(the default\), the whole document will be written on
    a single line, with minimum spacing between all elements\.

  - boolean *indented*

    If this flag is set the plugin will indent the markup commands according to
    the structure of indices\. To make this work this also implies that
    __newlines__ is set\.

    If this flag is not set \(the default\), the output is formatted as per the
    value of __newlines__, and no indenting is done\.

  - string *meta*

    This variable is meant to hold a fragment of HTML \(default: empty\)\. The
    fragment it contains will be inserted into the generated output in the
    <head> section of the document, just after the <title> tag\.

  - string *header*

    This variable is meant to hold a fragment of HTML \(default: empty\)\. The
    fragment it contains will be inserted into the generated output just after
    the <h1> title tag in the body of the document, in the class\.header
    <div>'ision\.

  - string *footer*

    This variable is meant to hold a fragment of HTML \(default: empty\)\. The
    fragment it contains will be inserted into the generated output just before
    the </body> tag, in the class\.footer <div>'ision\.

  - dictionary *rid*

    The value of this variable \(default: empty\) maps references to the
    identifiers to use as their anchor names\. Each reference __FOO__ not
    found in the dictionary uses __REF\-____FOO__ as anchor, i\.e\. itself
    prefixed with the string __REF\-__\.

  - string *sepline*

    The value of this variable is the string to use for the separator comments
    inserted into the output when the outpout is broken across lines and/or
    indented\. The default string consists of 60 dashes\.

  - string *class\.main*

    This variable contains the class name for the main <div>'ivision of the
    generated document\. The default is __doctools__\.

  - string *class\.header*

    This variable contains the class name for the header <div>'ision of the
    generated document\. The default is __toc\-header__\. This division
    contains the document title, the user specified __header__, if any, and
    a visible separator line\.

  - string *class\.title*

    This variable contains the class name for the <h1> tag enclosing the
    document title\. The default is __toc\-title__\.

  - string *class\.navsep*

    This variable contains the class name for the <hr> separators in the header
    and footer sections of the generated document\. The default is
    __toc\-navsep__\.

  - string *class\.contents*

    This variable contains the class name for the XXXXX holding the keywords and
    their references in the generated document\. The default is
    __toc\-contents__\.

  - string *class\.ref*

    This variable contains the class name for the table elements which are
    references to other documents\. The default is __toc\-ref__\.

  - string *class\.div*

    This variable contains the class name for the table elements which are
    divisions\. The default is __toc\-div__\.

  - string *class\.footer*

    This variable contains the class name for the footer <div>'ision of the
    generated document\. The default is __toc\-footer__\. This division
    contains a browser\-visible separator line and the user specified
    __footer__, if any\.

*Note* that this plugin ignores the standard configuration variable
__format__, and its value\.

# <a name='section4'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_export_json.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309

[//000000001]: # (doctools::toc::export::json \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::export::json\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::export::json \- JSON export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [JSON notation of tables of contents](#section3)

  - [Configuration](#section4)

  - [ToC serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::toc::export::json ?0\.1?  
package require textutil::adjust  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools table of contents export plugin for the
generation of JSON markup\.

This is an internal package of doctools, for use by the higher level management
packages handling tables of contents, especially
__[doctools::toc::export](toc\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::toc::export](toc\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the doctoc
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a table of contents, as
    specified in section [ToC serialization format](#section5), and
    contained in *serial*, the *configuration*, a dictionary, and generates
    JSON markup encoding the table\. The created string is then returned as the
    result of the command\.

# <a name='section3'></a>JSON notation of tables of contents

The JSON format used for tables of contents is a direct translation of the [ToC
serialization format](#section5), mapping Tcl dictionaries as JSON objects
and Tcl lists as JSON arrays\. For example, the Tcl serialization

    doctools::toc {
        items {
            {reference {
    	    desc {DocTools - Tables of Contents}
    	     id introduction.man
    	     label doctools::toc::introduction
    	}}
    	{division {
    	     id processing.man
    	     items {
    	         {reference {
    		     desc {doctoc serialization utilities}
    		     id structure.man
    		     label doctools::toc::structure
    		 }}
    		 {reference {
    		     desc {Parsing text in doctoc format}
    		     id parse.man
    		     label doctools::toc::parse
    		 }}
    	     }
                 label Processing
            }}
        }
        label {Table of Contents}
        title TOC
    }

is equivalent to the JSON string

    {
        "doctools::toc" : {
            "items" : [{
                "reference" : {
                    "desc"  : "DocTools - Tables of Contents",
                    "id"    : "introduction.man",
                    "label" : "doctools::toc::introduction"
                }
            },{
                "division" : {
                    "id"    : "processing.man",
                    "items" : [{
                        "reference" : {
                            "desc"  : "doctoc serialization utilities",
                            "id"    : "structure.man",
                            "label" : "doctools::toc::structure"
                        }
                    },{
                        "reference" : {
                            "desc"  : "Parsing text in doctoc format",
                            "id"    : "parse.man",
                            "label" : "doctools::toc::parse"
                        }
                    }],
                    "label" : "Processing"
                }
            }],
            "label" : "Table of Contents",
            "title" : "TOC"
        }
    }

# <a name='section4'></a>Configuration

The JSON export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - boolean *indented*

    If this flag is set the plugin will break the generated JSON code across
    lines and indent it according to its inner structure, with each key of a
    dictionary on a separate line\.

    If this flag is not set \(the default\), the whole JSON object will be written
    on a single line, with minimum spacing between all elements\.

  - boolean *aligned*

    If this flag is set the generator ensures that the values for the keys in a
    dictionary are vertically aligned with each other, for a nice table effect\.
    To make this work this also implies that __indented__ is set\.

    If this flag is not set \(the default\), the output is formatted as per the
    value of __indented__, without trying to align the values for dictionary
    keys\.

*Note* that this plugin ignores the standard configuration variables
__user__, __format__, __file__, and __map__ and their values\.

# <a name='section5'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[JSON](\.\./\.\./\.\./\.\./index\.md\#json),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_export_nroff.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245

[//000000001]: # (doctools::toc::export::nroff \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::export::nroff\(n\) 0\.2 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::export::nroff \- nroff export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Configuration](#section3)

  - [ToC serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::toc::export::nroff ?0\.2?  
package require doctools::text  
package require doctools::nroff::man\_macros  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools table of contents export plugin for the
generation of nroff markup\.

This is an internal package of doctools, for use by the higher level management
packages handling tables of contents, especially
__[doctools::toc::export](toc\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::toc::export](toc\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the doctoc
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a table of contents, as
    specified in section [ToC serialization format](#section4), and
    contained in *serial*, the *configuration*, a dictionary, and generates
    nroff markup encoding the table\. The created string is then returned as the
    result of the command\.

# <a name='section3'></a>Configuration

The nroff export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - string *user*

    This standard configuration variable contains the name of the user running
    the process which invoked the export plugin\. The plugin puts this
    information into the provenance comment at the beginning of the generated
    document\.

  - string *file*

    This standard configuration variable contains the name of the file the table
    of contents came from\. This variable may not be set or contain the empty
    string\. The plugin puts this information, if defined, i\.e\. set and not the
    empty string, into the provenance comment at the beginning of the generated
    document\.

  - boolean *inline*

    If this flag is set \(default\) the plugin will place the definitions of the
    man macro set directly into the output\.

    If this flag is not set, the plugin will place a reference to the
    definitions of the man macro set into the output, but not the macro
    definitions themselves\.

*Note* that this plugin ignores the standard configuration variables
__format__, and __map__, and their values\.

# <a name='section4'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_export_text.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228

[//000000001]: # (doctools::toc::export::text \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::export::text\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::export::text \- plain text export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Configuration](#section3)

  - [ToC serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::toc::export::text ?0\.1?  
package require doctools::text  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools table of contents export plugin for the
generation of plain text markup\.

This is an internal package of doctools, for use by the higher level management
packages handling tables of contents, especially
__[doctools::toc::export](toc\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::toc::export](toc\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the doctoc
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a table of contents, as
    specified in section [ToC serialization format](#section4), and
    contained in *serial*, the *configuration*, a dictionary, and generates
    plain text markup encoding the table\. The created string is then returned as
    the result of the command\.

# <a name='section3'></a>Configuration

The text export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - dictionary *map*

    This standard configuration variable contains a dictionary mapping from the
    \(symbolic\) document ids in reference entries to the actual filenames and/or
    urls to be used in the output\.

    Document ids without a mapping are used unchanged\.

*Note* that this plugin ignores the standard configuration variables
__user__, __file__, and __format__, and their values\.

# <a name='section4'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export), [plain
text](\.\./\.\./\.\./\.\./index\.md\#plain\_text),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_export_wiki.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237

[//000000001]: # (doctools::toc::export::wiki \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::export::wiki\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::export::wiki \- wiki export plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Wiki markup](#section3)

  - [Configuration](#section4)

  - [ToC serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require doctools::toc::export::wiki ?0\.1?  
package require doctools::text  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools table of contents export plugin for the
generation of wiki markup\.

This is an internal package of doctools, for use by the higher level management
packages handling tables of contents, especially
__[doctools::toc::export](toc\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::toc::export](toc\_export\.md)__ and the export
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the doctoc
export plugin API version 2\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a table of contents, as
    specified in section [ToC serialization format](#section5), and
    contained in *serial*, the *configuration*, a dictionary, and generates
    wiki markup encoding the table\. The created string is then returned as the
    result of the command\.

# <a name='section3'></a>Wiki markup

The basic syntax of the wiki markup generated by this plugin are described at
[http://wiki\.tcl\.tk/14](http://wiki\.tcl\.tk/14)\.

The plugin goes beyond the classic markup to generate proper headers and
indenting\.

# <a name='section4'></a>Configuration

The wiki export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - dictionary *map*

    This standard configuration variable contains a dictionary mapping from the
    \(symbolic\) document ids in reference entries to the actual filenames and/or
    urls to be used in the output\.

    Document ids without a mapping are used unchanged\.

*Note* that this plugin ignores the standard configuration variables
__user__, __file__ and __format__, and their values\.

# <a name='section5'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc), [wiki](\.\./\.\./\.\./\.\./index\.md\#wiki)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_import.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546

[//000000001]: # (doctools::toc::import \- Documentation tools)
[//000000002]: # (Generated from file 'toc\_import\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::import\(n\) 0\.2\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::import \- Importing keyword indices

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Concepts](#section2)

  - [API](#section3)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

  - [Import plugin API v2 reference](#section4)

  - [ToC serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require doctools::toc::import ?0\.2\.1?  
package require Tcl 8\.4  
package require struct::map  
package require doctools::toc::structure  
package require snit  
package require pluginmgr  

[__::doctools::toc::import__ *objectName*](#1)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __import text__ *text* ?*format*?](#4)  
[*objectName* __import file__ *path* ?*format*?](#5)  
[*objectName* __import object text__ *object* *text* ?*format*?](#6)  
[*objectName* __import object file__ *object* *path* ?*format*?](#7)  
[*objectName* __config names__](#8)  
[*objectName* __config get__](#9)  
[*objectName* __config set__ *name* ?*value*?](#10)  
[*objectName* __config unset__ *pattern*\.\.\.](#11)  
[*objectName* __includes__](#12)  
[*objectName* __include add__ *path*](#13)  
[*objectName* __include remove__ *path*](#14)  
[*objectName* __include clear__](#15)  
[__IncludeFile__ *currentfile* *path*](#16)  
[__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *text* *configuration*](#17)  

# <a name='description'></a>DESCRIPTION

This package provides a class to manage the plugins for the import of tables of
contents from other formats, i\.e\. their conversion from, for example
*[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)*,
*[json](\.\./\.\./\.\./\.\./index\.md\#json)*, etc\.

This is one of the three public pillars the management of tables of contents
resides on\. The other two pillars are

  1. *[Exporting tables of contents](toc\_export\.md)*, and

  1. *[Holding tables of contents](toc\_container\.md)*

For information about the [Concepts](#section2) of tables of contents, and
their parts, see the same\-named section\. For information about the data
structure which is the major output of the manager objects provided by this
package see the section [ToC serialization format](#section5)\.

The plugin system of our class is based on the package
__[pluginmgr](\.\./pluginmgr/pluginmgr\.md)__, and configured to look for
plugins using

  1. the environment variable __DOCTOOLS\_TOC\_IMPORT\_PLUGINS__,

  1. the environment variable __DOCTOOLS\_TOC\_PLUGINS__,

  1. the environment variable __DOCTOOLS\_PLUGINS__,

  1. the path "~/\.doctools/toc/import/plugin"

  1. the path "~/\.doctools/toc/plugin"

  1. the path "~/\.doctools/plugin"

  1. the path "~/\.doctools/toc/import/plugins"

  1. the path "~/\.doctools/toc/plugins"

  1. the path "~/\.doctools/plugins"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\TOC\\IMPORT\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\TOC\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\DOCTOOLS\\PLUGINS"

The last three are used only when the package is run on a machine using
Windows\(tm\) operating system\.

The whole system is delivered with two predefined import plugins, namely

  - doctoc

    See *[doctoc import plugin](import\_doctoc\.md)* for details\.

  - json

    See *json import plugin* for details\.

Readers wishing to write their own import plugin for some format, i\.e\. *plugin
writer*s reading and understanding the section containing the [Import plugin
API v2 reference](#section4) is an absolute necessity, as it specifies the
interaction between this package and its plugins in detail\.

# <a name='section2'></a>Concepts

  1. A *[table of contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents)*
     consists of a \(possibly empty\) list of *elements*\.

  1. Each element in the list is identified by its label\.

  1. Each element is either a
     *[reference](\.\./\.\./\.\./\.\./index\.md\#reference)*, or a *division*\.

  1. Each reference has an associated document, identified by a symbolic id, and
     a textual description\.

  1. Each division may have an associated document, identified by a symbolic id\.

  1. Each division consists consists of a \(possibly empty\) list of *elements*,
     with each element following the rules as specified in item 2 and above\.

A few notes

  1. The above rules span up a tree of elements, with references as the leaf
     nodes, and divisions as the inner nodes, and each element representing an
     entry in the whole table of contents\.

  1. The identifying labels of any element E are unique within their division
     \(or toc\), and the full label of any element E is the list of labels for all
     nodes on the unique path from the root of the tree to E, including E\.

# <a name='section3'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__::doctools::toc::import__ *objectName*

    This command creates a new import manager object with an associated Tcl
    command whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

## <a name='subsection2'></a>Object command

All objects created by the __::doctools::toc::import__ command have the
following general form:

  - <a name='2'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='4'></a>*objectName* __import text__ *text* ?*format*?

    This method takes the *text* and converts it from the specified *format*
    to the canonical serialization of a table of contents using the import
    plugin for the format\. An error is thrown if no plugin could be found for
    the format\. The serialization generated by the conversion process is
    returned as the result of this method\.

    If no format is specified the method defaults to __doctoc__\.

    The specification of what a *canonical* serialization is can be found in
    the section [ToC serialization format](#section5)\.

    The plugin has to conform to the interface specified in section [Import
    plugin API v2 reference](#section4)\.

  - <a name='5'></a>*objectName* __import file__ *path* ?*format*?

    This method is a convenient wrapper around the __import text__ method
    described by the previous item\. It reads the contents of the specified file
    into memory, feeds the result into __import text__ and returns the
    resulting serialization as its own result\.

  - <a name='6'></a>*objectName* __import object text__ *object* *text* ?*format*?

    This method is a convenient wrapper around the __import text__ method
    described by the previous item\. It expects that *object* is an object
    command supporting a __deserialize__ method expecting the canonical
    serialization of a table of contents\. It imports the text using __import
    text__ and then feeds the resulting serialization into the *object* via
    __deserialize__\. This method returns the empty string as it result\.

  - <a name='7'></a>*objectName* __import object file__ *object* *path* ?*format*?

    This method behaves like __import object text__, except that it reads
    the text to convert from the specified file instead of being given it as
    argument\.

  - <a name='8'></a>*objectName* __config names__

    This method returns a list containing the names of all configuration
    variables currently known to the object\.

  - <a name='9'></a>*objectName* __config get__

    This method returns a dictionary containing the names and values of all
    configuration variables currently known to the object\.

  - <a name='10'></a>*objectName* __config set__ *name* ?*value*?

    This method sets the configuration variable *name* to the specified
    *value* and returns the new value of the variable\.

    If no value is specified it simply returns the current value, without
    changing it\.

    Note that while the user can set the predefined configuration variables
    __user__ and __format__ doing so will have no effect, these values
    will be internally overridden when invoking an import plugin\.

  - <a name='11'></a>*objectName* __config unset__ *pattern*\.\.\.

    This method unsets all configuration variables matching the specified glob
    *pattern*s\. If no pattern is specified it will unset all currently defined
    configuration variables\.

  - <a name='12'></a>*objectName* __includes__

    This method returns a list containing the currently specified paths to use
    to search for include files when processing input\. The order of paths in the
    list corresponds to the order in which they are used, from first to last,
    and also corresponds to the order in which they were added to the object\.

  - <a name='13'></a>*objectName* __include add__ *path*

    This methods adds the specified *path* to the list of paths to use to
    search for include files when processing input\. The path is added to the end
    of the list, causing it to be searched after all previously added paths\. The
    result of the command is the empty string\.

    The method does nothing if the path is already known\.

  - <a name='14'></a>*objectName* __include remove__ *path*

    This methods removes the specified *path* from the list of paths to use to
    search for include files when processing input\. The result of the command is
    the empty string\.

    The method does nothing if the path is not known\.

  - <a name='15'></a>*objectName* __include clear__

    This method clears the list of paths to use to search for include files when
    processing input\. The result of the command is the empty string\.

# <a name='section4'></a>Import plugin API v2 reference

Plugins are what this package uses to manage the support for any input format
beyond the [ToC serialization format](#section5)\. Here we specify the API
the objects created by this package use to interact with their plugins\.

A plugin for this package has to follow the rules listed below:

  1. A plugin is a package\.

  1. The name of a plugin package has the form
     doctools::toc::import::__FOO__, where __FOO__ is the name of the
     format the plugin will generate output for\. This name is also the argument
     to provide to the various __import__ methods of import manager objects
     to get a string encoding a table of contents in that format\.

  1. The plugin can expect that the package
     __doctools::toc::export::plugin__ is present, as indicator that it was
     invoked from a genuine plugin manager\.

  1. The plugin can expect that a command named __IncludeFile__ is present,
     with the signature

       - <a name='16'></a>__IncludeFile__ *currentfile* *path*

         This command has to be invoked by the plugin when it has to process an
         included file, if the format has the concept of such\. An example of
         such a format would be *[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)*\.

         The plugin has to supply the following arguments

           * string *currentfile*

             The path of the file it is currently processing\. This may be the
             empty string if no such is known\.

           * string *path*

             The path of the include file as specified in the include directive
             being processed\.

         The result of the command will be a 5\-element list containing

           1) A boolean flag indicating the success \(__True__\) or failure
              \(__False__\) of the operation\.

           1) In case of success the contents of the included file, and the
              empty string otherwise\.

           1) The resolved, i\.e\. absolute path of the included file, if
              possible, or the unchanged *path* argument\. This is for display
              in an error message, or as the *currentfile* argument of another
              call to __IncludeFile__ should this file contain more files\.

           1) In case of success an empty string, and for failure a code
              indicating the reason for it, one of

                * notfound

                  The specified file could not be found\.

                * notread

                  The specified file was found, but not be read into memory\.

           1) An empty string in case of success of a __notfound__ failure,
              and an additional error message describing the reason for a
              __notread__ error in more detail\.

  1. A plugin has to provide one command, with the signature shown below\.

       - <a name='17'></a>__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *text* *configuration*

         Whenever an import manager of
         __[doctools::toc](\.\./doctools/doctoc\.md)__ has to parse input
         for a table of contents it will invoke this command\.

           * string *text*

             This argument will contain the text encoding the table of contents
             per the format the plugin is for\.

           * dictionary *configuration*

             This argument will contain the current configuration to apply to
             the parsing, as a dictionary mapping from variable names to values\.

             The following configuration variables have a predefined meaning all
             plugins have to obey, although they can ignore this information at
             their discretion\. Any other other configuration variables
             recognized by a plugin will be described in the manpage for that
             plugin\.

               + user

                 This variable is expected to contain the name of the user
                 owning the process invoking the plugin\.

               + format

                 This variable is expected to contain the name of the format
                 whose plugin is invoked\.

  1. A single usage cycle of a plugin consists of the invokations of the command
     __[import](\.\./\.\./\.\./\.\./index\.md\#import)__\. This call has to leave
     the plugin in a state where another usage cycle can be run without
     problems\.

# <a name='section5'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation),
[import](\.\./\.\./\.\./\.\./index\.md\#import),
[json](\.\./\.\./\.\./\.\./index\.md\#json),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin),
[reference](\.\./\.\./\.\./\.\./index\.md\#reference),
[table](\.\./\.\./\.\./\.\./index\.md\#table), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[url](\.\./\.\./\.\./\.\./index\.md\#url)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_import_json.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281

[//000000001]: # (doctools::toc::import::json \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::import::json\(n\) 0\.2\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::import::json \- JSON import plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [JSON notation of tables of contents](#section3)

  - [ToC serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require doctools::toc::import::json ?0\.2\.1?  
package require doctools::toc::structure  
package require json  

[__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *string* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

This package implements the doctools table of contents import plugin for the
parsing of JSON markup\.

This is an internal package of doctools, for use by the higher level management
packages handling tables of contents, especially
__[doctools::toc::import](toc\_import\.md)__, the import manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::toc::import](toc\_import\.md)__ and the import
manager objects it provides\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the doctoc
import plugin API version 2\.

  - <a name='1'></a>__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *string* *configuration*

    This command takes the *string* and parses it as JSON markup encoding a
    table of contents, in the context of the specified *configuration* \(a
    dictionary\)\. The result of the command is the canonical serialization of
    that table of contents, in the form specified in section [ToC serialization
    format](#section4)\.

# <a name='section3'></a>JSON notation of tables of contents

The JSON format used for tables of contents is a direct translation of the [ToC
serialization format](#section4), mapping Tcl dictionaries as JSON objects
and Tcl lists as JSON arrays\. For example, the Tcl serialization

    doctools::toc {
        items {
            {reference {
    	    desc {DocTools - Tables of Contents}
    	     id introduction.man
    	     label doctools::toc::introduction
    	}}
    	{division {
    	     id processing.man
    	     items {
    	         {reference {
    		     desc {doctoc serialization utilities}
    		     id structure.man
    		     label doctools::toc::structure
    		 }}
    		 {reference {
    		     desc {Parsing text in doctoc format}
    		     id parse.man
    		     label doctools::toc::parse
    		 }}
    	     }
                 label Processing
            }}
        }
        label {Table of Contents}
        title TOC
    }

is equivalent to the JSON string

    {
        "doctools::toc" : {
            "items" : [{
                "reference" : {
                    "desc"  : "DocTools - Tables of Contents",
                    "id"    : "introduction.man",
                    "label" : "doctools::toc::introduction"
                }
            },{
                "division" : {
                    "id"    : "processing.man",
                    "items" : [{
                        "reference" : {
                            "desc"  : "doctoc serialization utilities",
                            "id"    : "structure.man",
                            "label" : "doctools::toc::structure"
                        }
                    },{
                        "reference" : {
                            "desc"  : "Parsing text in doctoc format",
                            "id"    : "parse.man",
                            "label" : "doctools::toc::parse"
                        }
                    }],
                    "label" : "Processing"
                }
            }],
            "label" : "Table of Contents",
            "title" : "TOC"
        }
    }

# <a name='section4'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[JSON](\.\./\.\./\.\./\.\./index\.md\#json),
[deserialization](\.\./\.\./\.\./\.\./index\.md\#deserialization),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[import](\.\./\.\./\.\./\.\./index\.md\#import), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc)

# <a name='category'></a>CATEGORY

Text formatter plugin

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_introduction.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206

[//000000001]: # (doctools2toc\_introduction \- Documentation tools)
[//000000002]: # (Generated from file 'toc\_introduction\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools2toc\_introduction\(n\) 2\.0 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools2toc\_introduction \- DocTools \- Tables of Contents

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Related formats](#section2)

  - [Package Overview](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

*[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* \(short for *documentation tables
of contents*\) stands for a set of related, yet different, entities which are
working together for the easy creation and transformation of tables and contents
for documentation\.

These are

  1. A tcl based language for the semantic markup of a table of contents\. Markup
     is represented by Tcl commands\. Beginners should start with the *[doctoc
     language introduction](\.\./doctools/doctoc\_lang\_intro\.md)*\. The formal
     specification is split over two documents, one dealing with the *[doctoc
     language syntax](\.\./doctools/doctoc\_lang\_syntax\.md)*, the other a
     *[doctoc language command
     reference](\.\./doctools/doctoc\_lang\_cmdref\.md)*\.

  1. A set of packages for the programmatic manipulation of tables of contents
     in memory, and their conversion between various formats, reading and
     writing\. The aforementioned markup language is one of the formats which can
     be both read from and written to\.

  1. The system for the conversion of tables of contents is based on a plugin
     mechanism, for this we have two APIs describing the interface between the
     packages above and the import/export plugins\.

Which of the more detailed documents are relevant to the reader of this
introduction depends on their role in the documentation process\.

  1. A *writer* of documentation has to understand the markup language itself\.
     A beginner to doctoc should read the more informally written *[doctoc
     language introduction](\.\./doctools/doctoc\_lang\_intro\.md)* first\. Having
     digested this the formal *[doctoc language
     syntax](\.\./doctools/doctoc\_lang\_syntax\.md)* specification should become
     understandable\. A writer experienced with doctoc may only need the
     *[doctoc language command
     reference](\.\./doctools/doctoc\_lang\_cmdref\.md)* from time to time to
     refresh her memory\.

     While a document is written the __dtp__ application can be used to
     validate it, and after completion it also performs the conversion into the
     chosen system of visual markup, be it \*roff, HTML, plain text, wiki, etc\.
     The simpler __[dtplite](\.\./\.\./apps/dtplite\.md)__ application makes
     internal use of doctoc when handling directories of documentation,
     automatically generating a proper table of contents for them\.

  1. A *processor* of documentation written in the
     *[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* markup language has to know
     which tools are available for use\.

     The main tool is the aforementioned __dtp__ application provided by
     Tcllib\. The simpler __[dtplite](\.\./\.\./apps/dtplite\.md)__ does not
     expose doctoc to the user\. At the bottom level, common to both
     applications, however we find the three packages providing the basic
     facilities to handle tables of contents, i\.e\. import from textual formats,
     programmatic manipulation in memory, and export to textual formats\. These
     are

       - __doctoools::toc__

         Programmatic manipulation of tables of contents in memory\.

       - __doctoools::toc::import__

         Import of tables of contents from various textual formats\. The set of
         supported formats is extensible through plugin packages\.

       - __doctoools::toc::export__

         Export of tables of contents to various textual formats\. The set of
         supported formats is extensible through plugin packages\.

     See also section [Package Overview](#section3) for an overview of the
     dependencies between these and other, supporting packages\.

  1. At last, but not least, *plugin writers* have to understand the
     interaction between the import and export packages and their plugins\. These
     APIs are described in the documentation for the two relevant packages, i\.e\.

       - __doctoools::toc::import__

       - __doctoools::toc::export__

# <a name='section2'></a>Related formats

The doctoc format does not stand alone, it has two companion formats\. These are
called *[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx)* and
*[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)*, and they are intended for the
markup of *keyword indices*, and of general documentation, respectively\. They
are described in their own sets of documents, starting at the *DocTools \-
Keyword Indices* and the *DocTools \- General*, respectively\.

# <a name='section3'></a>Package Overview

                                        ~~~~~~~~~~~ doctools::toc ~~~~~~~~~~~
                                       ~~                   |               ~~
                    doctools::toc::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::toc::import
                            |                               |                       |
            +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
            |               |                         |     |    |                  |               |                       |               |
    struct:map              =                         |     |    |                  =       doctools::include       struct::map      fileutil::paths
                            |                         |     |    |                  |
                    doctools::toc::export::<*>        |     |    |          doctools::toc::import::<*>
                            doctoc                    |     |    |                  doctoc, json
                            json                      |     |    |                  |           \
                            html                      |     |    |          doctools::toc::parse \
                            nroff                     |     |    |                  |             \
                            wiki                      |     |    |  +---------------+              json
                            text                      |     |    |  |               |
                                                    doctools::toc::structure        |
                                                                                    |
                                                                            +-------+---------------+
                                                                            |                       |
              doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat
                    |                                                                               |
              doctools::text  doctools::nroff::man_macros                                           =
                                                                                                    |
                                                                                            doctools::msgcat::toc::<*>
                                                                                                    c, en, de, fr
                                                                                                    (fr == en for now)
            ~~      Interoperable objects, without actual package dependencies
            --      Package dependency, higher requires lower package
            =       Dynamic dependency through plugin system
            <*>     Multiple packages following the given form of naming.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[doctoc\_intro](\.\./doctools/doctoc\_intro\.md),
[doctools](\.\./doctools/doctools\.md), doctools2doc\_introduction,
[doctools2idx\_introduction](\.\./doctools2idx/idx\_introduction\.md),
[doctools\_lang\_cmdref](\.\./doctools/doctools\_lang\_cmdref\.md),
[doctools\_lang\_faq](\.\./doctools/doctools\_lang\_faq\.md),
[doctools\_lang\_intro](\.\./doctools/doctools\_lang\_intro\.md),
[doctools\_lang\_syntax](\.\./doctools/doctools\_lang\_syntax\.md),
[doctools\_plugin\_apiref](\.\./doctools/doctools\_plugin\_apiref\.md)

# <a name='keywords'></a>KEYWORDS

[contents](\.\./\.\./\.\./\.\./index\.md\#contents),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin), [semantic
markup](\.\./\.\./\.\./\.\./index\.md\#semantic\_markup), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_msgcat_c.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101

[//000000001]: # (doctools::msgcat::toc::c \- Documentation tools)
[//000000002]: # (Generated from file 'msgcat\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::msgcat::toc::c\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::msgcat::toc::c \- Message catalog for the doctoc parser \(C\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require msgcat  
package require doctools::msgcat::toc::c ?0\.1?  

# <a name='description'></a>DESCRIPTION

The package __doctools::msgcat::toc::c__ is a support module providing the C
language message catalog for the doctoc parser in the doctools system version 2\.
As such it is an internal package a regular user \(developer\) should not be in
direct contact with\.

If you are such please go the documentation of either

  1. __doctools::doc__,

  1. __[doctools::toc](\.\./doctools/doctoc\.md)__, or

  1. __[doctools::idx](\.\./doctools2idx/idx\_container\.md)__

Within the system architecture this package resides under the package
__[doctools::msgcat](\.\./doctools2base/tcllib\_msgcat\.md)__ providing the
general message catalog management within the system\. *Note* that there is
*no* explicit dependency between the manager and catalog packages\. The catalog
is a plugin which is selected and loaded dynamically\.

# <a name='section2'></a>API

This package has no exported API\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[C](\.\./\.\./\.\./\.\./index\.md\#c), [catalog
package](\.\./\.\./\.\./\.\./index\.md\#catalog\_package),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[i18n](\.\./\.\./\.\./\.\./index\.md\#i18n),
[internationalization](\.\./\.\./\.\./\.\./index\.md\#internationalization),
[l10n](\.\./\.\./\.\./\.\./index\.md\#l10n),
[localization](\.\./\.\./\.\./\.\./index\.md\#localization), [message
catalog](\.\./\.\./\.\./\.\./index\.md\#message\_catalog), [message
package](\.\./\.\./\.\./\.\./index\.md\#message\_package)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_msgcat_de.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101

[//000000001]: # (doctools::msgcat::toc::de \- Documentation tools)
[//000000002]: # (Generated from file 'msgcat\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::msgcat::toc::de\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::msgcat::toc::de \- Message catalog for the doctoc parser \(DE\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require msgcat  
package require doctools::msgcat::toc::de ?0\.1?  

# <a name='description'></a>DESCRIPTION

The package __doctools::msgcat::toc::de__ is a support module providing the
DE \(german\) language message catalog for the doctoc parser in the doctools
system version 2\. As such it is an internal package a regular user \(developer\)
should not be in direct contact with\.

If you are such please go the documentation of either

  1. __doctools::doc__,

  1. __[doctools::toc](\.\./doctools/doctoc\.md)__, or

  1. __[doctools::idx](\.\./doctools2idx/idx\_container\.md)__

Within the system architecture this package resides under the package
__[doctools::msgcat](\.\./doctools2base/tcllib\_msgcat\.md)__ providing the
general message catalog management within the system\. *Note* that there is
*no* explicit dependency between the manager and catalog packages\. The catalog
is a plugin which is selected and loaded dynamically\.

# <a name='section2'></a>API

This package has no exported API\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[DE](\.\./\.\./\.\./\.\./index\.md\#de), [catalog
package](\.\./\.\./\.\./\.\./index\.md\#catalog\_package),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[i18n](\.\./\.\./\.\./\.\./index\.md\#i18n),
[internationalization](\.\./\.\./\.\./\.\./index\.md\#internationalization),
[l10n](\.\./\.\./\.\./\.\./index\.md\#l10n),
[localization](\.\./\.\./\.\./\.\./index\.md\#localization), [message
catalog](\.\./\.\./\.\./\.\./index\.md\#message\_catalog), [message
package](\.\./\.\./\.\./\.\./index\.md\#message\_package)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_msgcat_en.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101

[//000000001]: # (doctools::msgcat::toc::en \- Documentation tools)
[//000000002]: # (Generated from file 'msgcat\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::msgcat::toc::en\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::msgcat::toc::en \- Message catalog for the doctoc parser \(EN\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require msgcat  
package require doctools::msgcat::toc::en ?0\.1?  

# <a name='description'></a>DESCRIPTION

The package __doctools::msgcat::toc::en__ is a support module providing the
EN \(english\) language message catalog for the doctoc parser in the doctools
system version 2\. As such it is an internal package a regular user \(developer\)
should not be in direct contact with\.

If you are such please go the documentation of either

  1. __doctools::doc__,

  1. __[doctools::toc](\.\./doctools/doctoc\.md)__, or

  1. __[doctools::idx](\.\./doctools2idx/idx\_container\.md)__

Within the system architecture this package resides under the package
__[doctools::msgcat](\.\./doctools2base/tcllib\_msgcat\.md)__ providing the
general message catalog management within the system\. *Note* that there is
*no* explicit dependency between the manager and catalog packages\. The catalog
is a plugin which is selected and loaded dynamically\.

# <a name='section2'></a>API

This package has no exported API\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EN](\.\./\.\./\.\./\.\./index\.md\#en), [catalog
package](\.\./\.\./\.\./\.\./index\.md\#catalog\_package),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[i18n](\.\./\.\./\.\./\.\./index\.md\#i18n),
[internationalization](\.\./\.\./\.\./\.\./index\.md\#internationalization),
[l10n](\.\./\.\./\.\./\.\./index\.md\#l10n),
[localization](\.\./\.\./\.\./\.\./index\.md\#localization), [message
catalog](\.\./\.\./\.\./\.\./index\.md\#message\_catalog), [message
package](\.\./\.\./\.\./\.\./index\.md\#message\_package)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_msgcat_fr.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101

[//000000001]: # (doctools::msgcat::toc::fr \- Documentation tools)
[//000000002]: # (Generated from file 'msgcat\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::msgcat::toc::fr\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::msgcat::toc::fr \- Message catalog for the doctoc parser \(FR\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require msgcat  
package require doctools::msgcat::toc::fr ?0\.1?  

# <a name='description'></a>DESCRIPTION

The package __doctools::msgcat::toc::fr__ is a support module providing the
FR \(french\) language message catalog for the doctoc parser in the doctools
system version 2\. As such it is an internal package a regular user \(developer\)
should not be in direct contact with\.

If you are such please go the documentation of either

  1. __doctools::doc__,

  1. __[doctools::toc](\.\./doctools/doctoc\.md)__, or

  1. __[doctools::idx](\.\./doctools2idx/idx\_container\.md)__

Within the system architecture this package resides under the package
__[doctools::msgcat](\.\./doctools2base/tcllib\_msgcat\.md)__ providing the
general message catalog management within the system\. *Note* that there is
*no* explicit dependency between the manager and catalog packages\. The catalog
is a plugin which is selected and loaded dynamically\.

# <a name='section2'></a>API

This package has no exported API\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[FR](\.\./\.\./\.\./\.\./index\.md\#fr), [catalog
package](\.\./\.\./\.\./\.\./index\.md\#catalog\_package),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[i18n](\.\./\.\./\.\./\.\./index\.md\#i18n),
[internationalization](\.\./\.\./\.\./\.\./index\.md\#internationalization),
[l10n](\.\./\.\./\.\./\.\./index\.md\#l10n),
[localization](\.\./\.\./\.\./\.\./index\.md\#localization), [message
catalog](\.\./\.\./\.\./\.\./index\.md\#message\_catalog), [message
package](\.\./\.\./\.\./\.\./index\.md\#message\_package)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_parse.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336

[//000000001]: # (doctools::toc::parse \- Documentation tools)
[//000000002]: # (Generated from file 'toc\_parse\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::parse\(n\) 1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::parse \- Parsing text in doctoc format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Parse errors](#section3)

  - [\[doctoc\] notation of tables of contents](#section4)

  - [ToC serialization format](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require doctools::toc::parse ?0\.1?  
package require Tcl 8\.4  
package require doctools::toc::structure  
package require doctools::msgcat  
package require doctools::tcl::parse  
package require fileutil  
package require logger  
package require snit  
package require struct::list  
package require struct::stack  

[__::doctools::toc::parse__ __text__ *text*](#1)  
[__::doctools::toc::parse__ __file__ *path*](#2)  
[__::doctools::toc::parse__ __includes__](#3)  
[__::doctools::toc::parse__ __include add__ *path*](#4)  
[__::doctools::toc::parse__ __include remove__ *path*](#5)  
[__::doctools::toc::parse__ __include clear__](#6)  
[__::doctools::toc::parse__ __vars__](#7)  
[__::doctools::toc::parse__ __var set__ *name* *value*](#8)  
[__::doctools::toc::parse__ __var unset__ *name*](#9)  
[__::doctools::toc::parse__ __var clear__ ?*pattern*?](#10)  

# <a name='description'></a>DESCRIPTION

This package provides commands to parse text written in the
*[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* markup language and convert it
into the canonical serialization of the table of contents encoded in the text\.
See the section [ToC serialization format](#section5) for specification of
their format\.

This is an internal package of doctools, for use by the higher level packages
handling *[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* documents\.

# <a name='section2'></a>API

  - <a name='1'></a>__::doctools::toc::parse__ __text__ *text*

    The command takes the string contained in *text* and parses it under the
    assumption that it contains a document written using the
    *[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* markup language\. An error is
    thrown if this assumption is found to be false\. The format of these errors
    is described in section [Parse errors](#section3)\.

    When successful the command returns the canonical serialization of the table
    of contents which was encoded in the text\. See the section [ToC
    serialization format](#section5) for specification of that format\.

  - <a name='2'></a>__::doctools::toc::parse__ __file__ *path*

    The same as __text__, except that the text to parse is read from the
    file specified by *path*\.

  - <a name='3'></a>__::doctools::toc::parse__ __includes__

    This method returns the current list of search paths used when looking for
    include files\.

  - <a name='4'></a>__::doctools::toc::parse__ __include add__ *path*

    This method adds the *path* to the list of paths searched when looking for
    an include file\. The call is ignored if the path is already in the list of
    paths\. The method returns the empty string as its result\.

  - <a name='5'></a>__::doctools::toc::parse__ __include remove__ *path*

    This method removes the *path* from the list of paths searched when
    looking for an include file\. The call is ignored if the path is not
    contained in the list of paths\. The method returns the empty string as its
    result\.

  - <a name='6'></a>__::doctools::toc::parse__ __include clear__

    This method clears the list of search paths for include files\.

  - <a name='7'></a>__::doctools::toc::parse__ __vars__

    This method returns a dictionary containing the current set of predefined
    variables known to the __vset__ markup command during processing\.

  - <a name='8'></a>__::doctools::toc::parse__ __var set__ *name* *value*

    This method adds the variable *name* to the set of predefined variables
    known to the __vset__ markup command during processing, and gives it the
    specified *value*\. The method returns the empty string as its result\.

  - <a name='9'></a>__::doctools::toc::parse__ __var unset__ *name*

    This method removes the variable *name* from the set of predefined
    variables known to the __vset__ markup command during processing\. The
    method returns the empty string as its result\.

  - <a name='10'></a>__::doctools::toc::parse__ __var clear__ ?*pattern*?

    This method removes all variables matching the *pattern* from the set of
    predefined variables known to the __vset__ markup command during
    processing\. The method returns the empty string as its result\.

    The pattern matching is done with __string match__, and the default
    pattern used when none is specified, is __\*__\.

# <a name='section3'></a>Parse errors

The format of the parse error messages thrown when encountering violations of
the *[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* markup syntax is human
readable and not intended for processing by machines\. As such it is not
documented\.

*However*, the errorCode attached to the message is machine\-readable and has
the following format:

  1. The error code will be a list, each element describing a single error found
     in the input\. The list has at least one element, possibly more\.

  1. Each error element will be a list containing six strings describing an
     error in detail\. The strings will be

       1) The path of the file the error occurred in\. This may be empty\.

       1) The range of the token the error was found at\. This range is a
          two\-element list containing the offset of the first and last character
          in the range, counted from the beginning of the input \(file\)\. Offsets
          are counted from zero\.

       1) The line the first character after the error is on\. Lines are counted
          from one\.

       1) The column the first character after the error is at\. Columns are
          counted from zero\.

       1) The message code of the error\. This value can be used as argument to
          __msgcat::mc__ to obtain a localized error message, assuming that
          the application had a suitable call of __doctools::msgcat::init__
          to initialize the necessary message catalogs \(See package
          __[doctools::msgcat](\.\./doctools2base/tcllib\_msgcat\.md)__\)\.

       1) A list of details for the error, like the markup command involved\. In
          the case of message code __doctoc/include/syntax__ this value is
          the set of errors found in the included file, using the format
          described here\.

# <a name='section4'></a>\[doctoc\] notation of tables of contents

The doctoc format for tables of contents, also called the *doctoc markup
language*, is too large to be covered in single section\. The interested reader
should start with the document

  1. *[doctoc language introduction](\.\./doctools/doctoc\_lang\_intro\.md)*

and then proceed from there to the formal specifications, i\.e\. the documents

  1. *[doctoc language syntax](\.\./doctools/doctoc\_lang\_syntax\.md)* and

  1. *[doctoc language command
     reference](\.\./doctools/doctoc\_lang\_cmdref\.md)*\.

to get a thorough understanding of the language\.

# <a name='section5'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[lexer](\.\./\.\./\.\./\.\./index\.md\#lexer),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/doctools2toc/toc_structure.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279

[//000000001]: # (doctools::toc::structure \- Documentation tools)
[//000000002]: # (Generated from file 'toc\_structure\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::structure\(n\) 0\.1 tcllib "Documentation tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

doctools::toc::structure \- Doctoc serialization utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [ToC serialization format](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require doctools::toc::structure ?0\.1?  
package require Tcl 8\.4  
package require logger  
package require snit  

[__::doctools::toc::structure__ __verify__ *serial* ?*canonvar*?](#1)  
[__::doctools::toc::structure__ __verify\-as\-canonical__ *serial*](#2)  
[__::doctools::toc::structure__ __canonicalize__ *serial*](#3)  
[__::doctools::toc::structure__ __print__ *serial*](#4)  
[__::doctools::toc::structure__ __merge__ *seriala* *serialb*](#5)  

# <a name='description'></a>DESCRIPTION

This package provides commands to work with the serializations of tables of
contents as managed by the doctools system v2, and specified in section [ToC
serialization format](#section3)\.

This is an internal package of doctools, for use by the higher level packages
handling tables of contents and their conversion into and out of various other
formats, like documents written using
*[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc)* markup\.

# <a name='section2'></a>API

  - <a name='1'></a>__::doctools::toc::structure__ __verify__ *serial* ?*canonvar*?

    This command verifies that the content of *serial* is a valid *regular*
    serialization of a table of contents and will throw an error if that is not
    the case\. The result of the command is the empty string\.

    If the argument *canonvar* is specified it is interpreted as the name of a
    variable in the calling context\. This variable will be written to if and
    only if *serial* is a valid regular serialization\. Its value will be a
    boolean, with __True__ indicating that the serialization is not only
    valid, but also *canonical*\. __False__ will be written for a valid,
    but non\-canonical serialization\.

    For the specification of regular and canonical serializations see the
    section [ToC serialization format](#section3)\.

  - <a name='2'></a>__::doctools::toc::structure__ __verify\-as\-canonical__ *serial*

    This command verifies that the content of *serial* is a valid
    *canonical* serialization of a table of contents and will throw an error
    if that is not the case\. The result of the command is the empty string\.

    For the specification of canonical serializations see the section [ToC
    serialization format](#section3)\.

  - <a name='3'></a>__::doctools::toc::structure__ __canonicalize__ *serial*

    This command assumes that the content of *serial* is a valid *regular*
    serialization of a table of contents and will throw an error if that is not
    the case\.

    It will then convert the input into the *canonical* serialization of the
    contained table of contents and return it as its result\. If the input is
    already canonical it will be returned unchanged\.

    For the specification of regular and canonical serializations see the
    section [ToC serialization format](#section3)\.

  - <a name='4'></a>__::doctools::toc::structure__ __print__ *serial*

    This command assumes that the argument *serial* contains a valid regular
    serialization of a table of contents and returns a string containing that
    table in a human readable form\.

    The exact format of this form is not specified and cannot be relied on for
    parsing or other machine\-based activities\.

    For the specification of regular serializations see the section [ToC
    serialization format](#section3)\.

  - <a name='5'></a>__::doctools::toc::structure__ __merge__ *seriala* *serialb*

    This command accepts the regular serializations of two tables of contents
    and uses them to create their union\. The result of the command is the
    canonical serialization of this unified table of contents\.

    Title and label of the resulting table are taken from the table contained in
    *serialb*\.

    The whole table and its divisions are merged recursively in the same manner:

      1. All reference elements which occur in both divisions \(identified by
         their label\) are unified with document id's and descriptions taken from
         the second table\.

      1. All division elements which occur in both divisions \(identified by
         their label\) are unified with the optional document id taken from the
         second table, if any, or from the first if none is in the second\. The
         elements in the division are merged recursively using the same
         algorithm as described in this list\.

      1. Type conflicts between elements, i\.e\. finding two elements with the
         same label but different types result in a merge error\.

      1. All elements found in the second division but not in the first are
         added to the end of the list of elements in the merge result\.

    For the specification of regular and canonical serializations see the
    section [ToC serialization format](#section3)\.

# <a name='section3'></a>ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[deserialization](\.\./\.\./\.\./\.\./index\.md\#deserialization),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/dtplite/pkg_dtplite.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412

[//000000001]: # (dtplite \- Documentation toolbox)
[//000000002]: # (Generated from file 'pkg\_dtplite\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004\-2013 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (dtplite\(n\) 1\.3\.1 tcllib "Documentation toolbox")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

dtplite \- Lightweight DocTools Markup Processor

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [USE CASES](#subsection1)

      - [COMMAND LINE](#subsection2)

      - [OPTIONS](#subsection3)

      - [FORMATS](#subsection4)

      - [DIRECTORY STRUCTURES](#subsection5)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require dtplite ?1\.3\.1?  

[__[dtplite](\.\./\.\./apps/dtplite\.md)__ __\-o__ *output* ?options? *format* *inputfile*](#1)  
[__[dtplite](\.\./\.\./apps/dtplite\.md)__ __validate__ *inputfile*](#2)  
[__[dtplite](\.\./\.\./apps/dtplite\.md)__ __\-o__ *output* ?options? *format* *inputdirectory*](#3)  
[__[dtplite](\.\./\.\./apps/dtplite\.md)__ __\-merge__ __\-o__ *output* ?options? *format* *inputdirectory*](#4)  

# <a name='description'></a>DESCRIPTION

The application described by this document,
__[dtplite](\.\./\.\./apps/dtplite\.md)__, is the successor to the extremely
simple __[mpexpand](\.\./doctools/mpexpand\.md)__\. Influenced in its
functionality by the __dtp__ doctools processor it is much more powerful
than __[mpexpand](\.\./doctools/mpexpand\.md)__, yet still as easy to use;
definitely easier than __dtp__ with its myriad of subcommands and options\.

__[dtplite](\.\./\.\./apps/dtplite\.md)__ is based upon the package
__[doctools](\.\./doctools/doctools\.md)__, like the other two processors\.

## <a name='subsection1'></a>USE CASES

__[dtplite](\.\./\.\./apps/dtplite\.md)__ was written with the following
three use cases in mind\.

  1. Validation of a single document, i\.e\. checking that it was written in valid
     doctools format\. This mode can also be used to get a preliminary version of
     the formatted output for a single document, for display in a browser,
     nroff, etc\., allowing proofreading of the formatting\.

  1. Generation of the formatted documentation for a single package, i\.e\. all
     the manpages, plus a table of contents and an index of keywords\.

  1. An extension of the previous mode of operation, a method for the easy
     generation of one documentation tree for several packages, and especially
     of a unified table of contents and keyword index\.

Beyond the above we also want to make use of the customization features provided
by the HTML formatter\. It is not the only format the application should be able
to generate, but we anticipiate it to be the most commonly used, and it is one
of the few which do provide customization hooks\.

We allow the caller to specify a header string, footer string, a stylesheet, and
data for a bar of navigation links at the top of the generated document\. While
all can be set as long as the formatting engine provides an appropriate engine
parameter \(See section [OPTIONS](#subsection3)\) the last two have internal
processing which make them specific to HTML\.

## <a name='subsection2'></a>COMMAND LINE

  - <a name='1'></a>__[dtplite](\.\./\.\./apps/dtplite\.md)__ __\-o__ *output* ?options? *format* *inputfile*

    This is the form for use case \[1\]\. The *options* will be explained later,
    in section [OPTIONS](#subsection3)\.

      * path *output* \(in\)

        This argument specifies where to write the generated document\. It can be
        the path to a file or directory, or __\-__\. The last value causes the
        application to write the generated documented to __stdout__\.

        If the *output* does not exist then \[file dirname $output\] has to
        exist and must be a writable directory\. The generated document will be
        written to a file in that directory, and the name of that file will be
        derived from the *inputfile*, the *format*, and the value given to
        option __\-ext__ \(if present\)\.

      * \(path&#124;handle\) *format* \(in\)

        This argument specifies the formatting engine to use when processing the
        input, and thus the format of the generated document\. See section
        [FORMATS](#subsection4) for the possibilities recognized by the
        application\.

      * path *inputfile* \(in\)

        This argument specifies the path to the file to process\. It has to
        exist, must be readable, and written in
        *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format\.

  - <a name='2'></a>__[dtplite](\.\./\.\./apps/dtplite\.md)__ __validate__ *inputfile*

    This is a simpler form for use case \[1\]\. The "validate" format generates no
    output at all, only syntax checks are performed\. As such the specification
    of an output file or other options is not necessary and left out\.

  - <a name='3'></a>__[dtplite](\.\./\.\./apps/dtplite\.md)__ __\-o__ *output* ?options? *format* *inputdirectory*

    This is the form for use case \[2\]\. It differs from the form for use case \[1\]
    by having the input documents specified through a directory instead of a
    file\. The other arguments are identical, except for *output*, which now
    has to be the path to an existing and writable directory\.

    The input documents are all files in *inputdirectory* or any of its
    subdirectories which were recognized by __fileutil::fileType__ as
    containing text in *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format\.

  - <a name='4'></a>__[dtplite](\.\./\.\./apps/dtplite\.md)__ __\-merge__ __\-o__ *output* ?options? *format* *inputdirectory*

    This is the form for use case \[3\]\. The only difference to the form for use
    case \[2\] is the additional option __\-merge__\.

    Each such call will merge the generated documents coming from processing the
    input documents under *inputdirectory* or any of its subdirectories to the
    files under *output*\. In this manner it is possible to incrementally build
    the unified documentation for any number of packages\. Note that it is
    necessary to run through all the packages twice to get fully correct
    cross\-references \(for formats supporting them\)\.

## <a name='subsection3'></a>OPTIONS

This section describes all the options available to the user of the application,
with the exception of the options __\-o__ and __\-merge__\. These two were
described already, in section [COMMAND LINE](#subsection2)\.

  - __\-exclude__ string

    This option specifies an exclude \(glob\) pattern\. Any files identified as
    manpages to process which match the exclude pattern are ignored\. The option
    can be provided multiple times, each usage adding an additional pattern to
    the list of exclusions\.

  - __\-ext__ string

    If the name of an output file has to be derived from the name of an input
    file it will use the name of the *format* as the extension by default\.
    This option here will override this however, forcing it to use *string* as
    the file extension\. This option is ignored if the name of the output file is
    fully specified through option __\-o__\.

    When used multiple times only the last definition is relevant\.

  - __\-header__ file

    This option can be used if and only if the selected *format* provides an
    engine parameter named "header"\. It takes the contents of the specified file
    and assign them to that parameter, for whatever use by the engine\. The HTML
    engine will insert the text just after the tag __<body>__\. If navigation
    buttons are present \(see option __\-nav__ below\), then the HTML generated
    for them is appended to the header data originating here before the final
    assignment to the parameter\.

    When used multiple times only the last definition is relevant\.

  - __\-footer__ file

    Like __\-header__, except that: Any navigation buttons are ignored, the
    corresponding required engine parameter is named "footer", and the data is
    inserted just before the tag __</body>__\.

    When used multiple times only the last definition is relevant\.

  - __\-style__ file

    This option can be used if and only if the selected *format* provides an
    engine parameter named "meta"\. When specified it will generate a piece of
    HTML code declaring the *file* as the stylesheet for the generated
    document and assign that to the parameter\. The HTML engine will insert this
    inot the document, just after the tag __<head>__\.

    When processing an input directory the stylesheet file is copied into the
    output directory and the generated HTML will refer to the copy, to make the
    result more self\-contained\. When processing an input file we have no
    location to copy the stylesheet to and so just reference it as specified\.

    When used multiple times only the last definition is relevant\.

  - __\-toc__ path&#124;text

    This option specifies a doctoc file \(or text\) to use for the table of
    contents instead of generating our own\.

    When used multiple times only the last definition is relevant\.

  - __\-pre\+toc__ label path&#124;text

  - __\-post\+toc__ label path&#124;text

    This option specifies additional doctoc files \(or texts\) to use in the
    navigation bar\.

    Positioning and handling of multiple uses is like for options
    __\-prenav__ and __\-postnav__, see below\.

  - __\-nav__ label url

  - __\-prenav__ label url

    Use this option to specify a navigation button with *label* to display and
    the *url* to link to\. This option can be used if and only if the selected
    *format* provides an engine parameter named "header"\. The HTML generated
    for this is appended to whatever data we got from option __\-header__
    before it is inserted into the generated documents\.

    When used multiple times all definitions are collected and a navigation bar
    is created, with the first definition shown at the left edge and the last
    definition to the right\.

    The url can be relative\. In that case it is assumed to be relative to the
    main files \(TOC and Keyword index\), and will be transformed for all others
    to still link properly\.

  - __\-postnav__ label url

    Use this option to specify a navigation button with *label* to display and
    the *url* to link to\. This option can be used if and only if the selected
    *format* provides an engine parameter named "header"\. The HTML generated
    for this is appended to whatever data we got from option __\-header__
    before it is inserted into the generated documents\.

    When used multiple times all definitions are collected and a navigation bar
    is created, with the last definition shown at the right edge and the first
    definition to the left\.

    The url can be relative\. In that case it is assumed to be relative to the
    main files \(TOC and Keyword index\), and will be transformed for all others
    to still link properly\.

## <a name='subsection4'></a>FORMATS

At first the *format* argument will be treated as a path to a tcl file
containing the code for the requested formatting engine\. The argument will be
treated as the name of one of the predefined formats listed below if and only if
the path does not exist\.

*Note a limitation*: If treating the format as path to the tcl script
implementing the engine was sucessful, then this script has to implement not
only the engine API for doctools, i\.e\. *doctools\_api*, but for *doctoc\_api*
and *docidx\_api* as well\. Otherwise the generation of a table of contents and
of a keyword index will fail\.

List of predefined formats, i\.e\. as provided by the package
__[doctools](\.\./doctools/doctools\.md)__:

  - __nroff__

    The processor generates \*roff output, the standard format for unix manpages\.

  - __html__

    The processor generates HTML output, for usage in and display by web
    browsers\. This engine is currently the only one providing the various engine
    parameters required for the additional customaization of the output\.

  - __tmml__

    The processor generates TMML output, the Tcl Manpage Markup Language, a
    derivative of XML\.

  - __latex__

    The processor generates LaTeX output\.

  - __wiki__

    The processor generates Wiki markup as understood by __wikit__\.

  - __list__

    The processor extracts the information provided by __manpage\_begin__\.
    This format is used internally to extract the meta data from which both
    table of contents and keyword index are derived from\.

  - __null__

    The processor does not generate any output\. This is equivalent to
    __validate__\.

## <a name='subsection5'></a>DIRECTORY STRUCTURES

In this section we describe the directory structures generated by the
application under *output* when processing all documents in an
*inputdirectory*\. In other words, this is only relevant to the use cases \[2\]
and \[3\]\.

  - \[2\]

    The following directory structure is created when processing a single set of
    input documents\. The file extension used is for output in HTML, but that is
    not relevant to the structure and was just used to have proper file names\.

        output/
            toc.html
            index.html
            files/
                path/to/FOO.html

    The last line in the example shows the document generated for a file FOO
    located at

        inputdirectory/path/to/FOO

  - \[3\]

    When merging many packages into a unified set of documents the generated
    directory structure is a bit deeper:

        output
            .toc
            .idx
            .tocdoc
            .idxdoc
            .xrf
            toc.html
            index.html
            FOO1/
                ...
            FOO2/
                toc.html
                files/
                    path/to/BAR.html

    Each of the directories FOO1, \.\.\. contains the documents generated for the
    package FOO1, \.\.\. and follows the structure shown for use case \[2\]\. The only
    exception is that there is no per\-package index\.

    The files "\.toc", "\.idx", and "\.xrf" contain the internal status of the
    whole output and will be read and updated by the next invokation\. Their
    contents will not be documented\. Remove these files when all packages wanted
    for the output have been processed, i\.e\. when the output is complete\.

    The files "\.tocdoc", and "\.idxdoc", are intermediate files in doctoc and
    docidx markup, respectively, containing the main table of contents and
    keyword index for the set of documents before their conversion to the chosen
    output format\. They are left in place, i\.e\. not deleted, to serve as
    demonstrations of doctoc and docidx markup\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[docidx introduction](\.\./doctools/docidx\_intro\.md), [doctoc
introduction](\.\./doctools/doctoc\_intro\.md), [doctools
introduction](\.\./doctools/doctools\_intro\.md)

# <a name='keywords'></a>KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html), [TMML](\.\./\.\./\.\./\.\./index\.md\#tmml),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[docidx](\.\./\.\./\.\./\.\./index\.md\#docidx),
[doctoc](\.\./\.\./\.\./\.\./index\.md\#doctoc),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage),
[markup](\.\./\.\./\.\./\.\./index\.md\#markup),
[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004\-2013 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/fileutil/fileutil.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540

[//000000001]: # (fileutil \- file utilities)
[//000000002]: # (Generated from file 'fileutil\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (fileutil\(n\) 1\.16 tcllib "file utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

fileutil \- Procedures implementing some file utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Warnings and Incompatibilities](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8  
package require fileutil ?1\.16?  

[__::fileutil::lexnormalize__ *path*](#1)  
[__::fileutil::fullnormalize__ *path*](#2)  
[__::fileutil::test__ *path* *codes* ?*msgvar*? ?*label*?](#3)  
[__::fileutil::cat__ \(?*options*? *file*\)\.\.\.](#4)  
[__::fileutil::writeFile__ ?*options*? *file* *data*](#5)  
[__::fileutil::appendToFile__ ?*options*? *file* *data*](#6)  
[__::fileutil::insertIntoFile__ ?*options*? *file* *at* *data*](#7)  
[__::fileutil::removeFromFile__ ?*options*? *file* *at* *n*](#8)  
[__::fileutil::replaceInFile__ ?*options*? *file* *at* *n* *data*](#9)  
[__::fileutil::updateInPlace__ ?*options*? *file* *cmd*](#10)  
[__::fileutil::fileType__ *filename*](#11)  
[__::fileutil::find__ ?*basedir* ?*filtercmd*??](#12)  
[__::fileutil::findByPattern__ *basedir* ?__\-regexp__&#124;__\-glob__? ?__\-\-__? *patterns*](#13)  
[__::fileutil::foreachLine__ *var filename cmd*](#14)  
[__::fileutil::grep__ *pattern* ?*files*?](#15)  
[__::fileutil::install__ ?__\-m__ *mode*? *source* *destination*](#16)  
[__::fileutil::stripN__ *path* *n*](#17)  
[__::fileutil::stripPwd__ *path*](#18)  
[__::fileutil::stripPath__ *prefix* *path*](#19)  
[__::fileutil::jail__ *jail* *path*](#20)  
[__::fileutil::touch__ ?__\-a__? ?__\-c__? ?__\-m__? ?__\-r__ *ref\_file*? ?__\-t__ *time*? *filename* ?*\.\.\.*?](#21)  
[__::fileutil::tempdir__](#22)  
[__::fileutil::tempdir__ *path*](#23)  
[__::fileutil::tempdirReset__](#24)  
[__::fileutil::tempfile__ ?*prefix*?](#25)  
[__::fileutil::maketempdir__ ?__\-prefix__ *str*? ?__\-suffix__ *str*? ?__\-dir__ *str*?](#26)  
[__::fileutil::relative__ *base* *dst*](#27)  
[__::fileutil::relativeUrl__ *base* *dst*](#28)  

# <a name='description'></a>DESCRIPTION

This package provides implementations of standard unix utilities\.

  - <a name='1'></a>__::fileutil::lexnormalize__ *path*

    This command performs purely lexical normalization on the *path* and
    returns the changed path as its result\. Symbolic links in the path are
    *not* resolved\.

    Examples:

        fileutil::lexnormalize /foo/./bar
        => /foo/bar

        fileutil::lexnormalize /foo/../bar
        => /bar

  - <a name='2'></a>__::fileutil::fullnormalize__ *path*

    This command resolves all symbolic links in the *path* and returns the
    changed path as its result\. In contrast to the builtin __file
    normalize__ this command resolves a symbolic link in the last element of
    the path as well\.

  - <a name='3'></a>__::fileutil::test__ *path* *codes* ?*msgvar*? ?*label*?

    A command for the testing of several properties of a *path*\. The
    properties to test for are specified in *codes*, either as a list of
    keywords describing the properties, or as a string where each letter is a
    shorthand for a property to test\. The recognized keywords, shorthands, and
    associated properties are shown in the list below\. The tests are executed in
    the order given to the command\.

    The result of the command is a boolean value\. It will be true if and only if
    the *path* passes all the specified tests\. In the case of the *path* not
    passing one or more test the first failing test will leave a message in the
    variable referenced by *msgvar*, if such is specified\. The message will be
    prefixed with *label*, if it is specified\. *Note* that the variabled
    referenced by *msgvar* is not touched at all if all the tests pass\.

      * *r*ead

        __file readable__

      * *w*rite

        __file writable__

      * *e*xists

        __file exists__

      * e*x*ec

        __file executable__

      * *f*ile

        __file isfile__

      * *d*ir

        __file isdirectory__

  - <a name='4'></a>__::fileutil::cat__ \(?*options*? *file*\)\.\.\.

    A tcl implementation of the UNIX __[cat](\.\./\.\./\.\./\.\./index\.md\#cat)__
    command\. Returns the contents of the specified file\(s\)\. The arguments are
    files to read, with interspersed options configuring the process\. If there
    are problems reading any of the files, an error will occur, and no data will
    be returned\.

    The options accepted are __\-encoding__, __\-translation__,
    __\-eofchar__, and __\-\-__\. With the exception of the last all options
    take a single value as argument, as specified by the tcl builtin command
    __fconfigure__\. The __\-\-__ has to be used to terminate option
    processing before a file if that file's name begins with a dash\.

    Each file can have its own set of options coming before it, and for anything
    not specified directly the defaults are inherited from the options of the
    previous file\. The first file inherits the system default for unspecified
    options\.

  - <a name='5'></a>__::fileutil::writeFile__ ?*options*? *file* *data*

    The command replaces the current contents of the specified *file* with
    *data*, with the process configured by the options\. The command accepts
    the same options as __::fileutil::cat__\. The specification of a
    non\-existent file is legal and causes the command to create the file \(and
    all required but missing directories\)\.

  - <a name='6'></a>__::fileutil::appendToFile__ ?*options*? *file* *data*

    This command is like __::fileutil::writeFile__, except that the previous
    contents of *file* are not replaced, but appended to\. The command accepts
    the same options as __::fileutil::cat__

  - <a name='7'></a>__::fileutil::insertIntoFile__ ?*options*? *file* *at* *data*

    This comment is similar to __::fileutil::appendToFile__, except that the
    new data is not appended at the end, but inserted at a specified location
    within the file\. In further contrast this command has to be given the path
    to an existing file\. It will not create a missing file, but throw an error
    instead\.

    The specified location *at* has to be an integer number in the range
    __0__ \.\.\. \[file size *file*\]\. __0__ will cause insertion of the
    new data before the first character of the existing content, whereas \[file
    size *file*\] causes insertion after the last character of the existing
    content, i\.e\. appending\.

    The command accepts the same options as __::fileutil::cat__\.

  - <a name='8'></a>__::fileutil::removeFromFile__ ?*options*? *file* *at* *n*

    This command is the complement to __::fileutil::insertIntoFile__,
    removing *n* characters from the *file*, starting at location *at*\.
    The specified location *at* has to be an integer number in the range
    __0__ \.\.\. \[file size *file*\] \- *n*\. __0__ will cause the removal
    of the new data to start with the first character of the existing content,
    whereas \[file size *file*\] \- *n* causes the removal of the tail of the
    existing content, i\.e\. the truncation of the file\.

    The command accepts the same options as __::fileutil::cat__\.

  - <a name='9'></a>__::fileutil::replaceInFile__ ?*options*? *file* *at* *n* *data*

    This command is a combination of __::fileutil::removeFromFile__ and
    __::fileutil::insertIntoFile__\. It first removes the part of the
    contents specified by the arguments *at* and *n*, and then inserts
    *data* at the given location, effectively replacing the removed by content
    with *data*\. All constraints imposed on *at* and *n* by
    __::fileutil::removeFromFile__ and __::fileutil::insertIntoFile__
    are obeyed\.

    The command accepts the same options as __::fileutil::cat__\.

  - <a name='10'></a>__::fileutil::updateInPlace__ ?*options*? *file* *cmd*

    This command can be seen as the generic core functionality of
    __::fileutil::replaceInFile__\. It first reads the contents of the
    specified *file*, then runs the command prefix *cmd* with that data
    appended to it, and at last writes the result of that invokation back as the
    new contents of the file\.

    If the executed command throws an error the *file* is not changed\.

    The command accepts the same options as __::fileutil::cat__\.

  - <a name='11'></a>__::fileutil::fileType__ *filename*

    An implementation of the UNIX __[file](\.\./\.\./\.\./\.\./index\.md\#file)__
    command, which uses various heuristics to guess the type of a file\. Returns
    a list specifying as much type information as can be determined about the
    file, from most general \(eg, "binary" or "text"\) to most specific \(eg,
    "gif"\)\. For example, the return value for a GIF file would be "binary
    graphic gif"\. The command will detect the following types of files:
    directory, empty, binary, text, script \(with interpreter\), executable elf,
    executable dos, executable ne, executable pe, graphic gif, graphic jpeg,
    graphic png, graphic tiff, graphic bitmap, html, xml \(with doctype if
    available\), message pgp, binary pdf, text ps, text eps, binary
    gravity\_wave\_data\_frame, compressed bzip, compressed gzip, compressed zip,
    compressed tar, audio wave, audio mpeg, and link\. It further detects
    doctools, doctoc, and docidx documentation files, and tklib diagrams\.

  - <a name='12'></a>__::fileutil::find__ ?*basedir* ?*filtercmd*??

    An implementation of the unix command
    __[find](\.\./\.\./\.\./\.\./index\.md\#find)__\. Adapted from the Tcler's
    Wiki\. Takes at most two arguments, the path to the directory to start
    searching from and a command to use to evaluate interest in each file\. The
    path defaults to "\.", i\.e\. the current directory\. The command defaults to
    the empty string, which means that all files are of interest\. The command
    takes care *not* to lose itself in infinite loops upon encountering
    circular link structures\. The result of the command is a list containing the
    paths to the interesting files\.

    The *filtercmd*, if specified, is interpreted as a command prefix and one
    argument is added to it, the name of the file or directory find is currently
    looking at\. Note that this name is *not* fully qualified\. It has to be
    joined it with the result of __pwd__ to get an absolute filename\.

    The result of *filtercmd* is a boolean value that indicates if the current
    file should be included in the list of interesting files\.

    Example:

        # find .tcl files
        package require fileutil
        proc is_tcl {name} {return [string match *.tcl $name]}
        set tcl_files [fileutil::find . is_tcl]

  - <a name='13'></a>__::fileutil::findByPattern__ *basedir* ?__\-regexp__&#124;__\-glob__? ?__\-\-__? *patterns*

    This command is based upon the __TclX__ command __recursive\_glob__,
    except that it doesn't allow recursion over more than one directory at a
    time\. It uses __::fileutil::find__ internally and is thus able to and
    does follow symbolic links, something the __TclX__ command does not do\.
    First argument is the directory to start the search in, second argument is a
    list of *patterns*\. The command returns a list of all files reachable
    through *basedir* whose names match at least one of the patterns\. The
    options before the pattern\-list determine the style of matching, either
    regexp or glob\. glob\-style matching is the default if no options are given\.
    Usage of the option __\-\-__ stops option processing\. This allows the use
    of a leading '\-' in the patterns\.

  - <a name='14'></a>__::fileutil::foreachLine__ *var filename cmd*

    The command reads the file *filename* and executes the script *cmd* for
    every line in the file\. During the execution of the script the variable
    *var* is set to the contents of the current line\. The return value of this
    command is the result of the last invocation of the script *cmd* or the
    empty string if the file was empty\.

  - <a name='15'></a>__::fileutil::grep__ *pattern* ?*files*?

    Implementation of __[grep](\.\./\.\./\.\./\.\./index\.md\#grep)__\. Adapted
    from the Tcler's Wiki\. The first argument defines the *pattern* to search
    for\. This is followed by a list of *files* to search through\. The list is
    optional and __stdin__ will be used if it is missing\. The result of the
    procedures is a list containing the matches\. Each match is a single element
    of the list and contains filename, number and contents of the matching line,
    separated by a colons\.

  - <a name='16'></a>__::fileutil::install__ ?__\-m__ *mode*? *source* *destination*

    The __install__ command is similar in functionality to the
    __install__ command found on many unix systems, or the shell script
    distributed with many source distributions \(unix/install\-sh in the Tcl
    sources, for example\)\. It copies *source*, which can be either a file or
    directory to *destination*, which should be a directory, unless *source*
    is also a single file\. The ?\-m? option lets the user specify a unix\-style
    mode \(either octal or symbolic \- see __file attributes__\.

  - <a name='17'></a>__::fileutil::stripN__ *path* *n*

    Removes the first *n* elements from the specified *path* and returns the
    modified path\. If *n* is greater than the number of components in *path*
    an empty string is returned\. The number of components in a given path may be
    determined by performing __llength__ on the list returned by __file
    split__\.

  - <a name='18'></a>__::fileutil::stripPwd__ *path*

    If, and only if the *path* is inside of the directory returned by
    \[__pwd__\] \(or the current working directory itself\) it is made relative
    to that directory\. In other words, the current working directory is stripped
    from the *path*\. The possibly modified path is returned as the result of
    the command\. If the current working directory itself was specified for
    *path* the result is the string "__\.__"\.

  - <a name='19'></a>__::fileutil::stripPath__ *prefix* *path*

    If, and only of the *path* is inside of the directory "prefix" \(or the
    prefix directory itself\) it is made relative to that directory\. In other
    words, the prefix directory is stripped from the *path*\. The possibly
    modified path is returned as the result of the command\. If the prefix
    directory itself was specified for *path* the result is the string
    "__\.__"\.

  - <a name='20'></a>__::fileutil::jail__ *jail* *path*

    This command ensures that the *path* is not escaping the directory
    *jail*\. It always returns an absolute path derived from *path* which is
    within *jail*\.

    If *path* is an absolute path and already within *jail* it is returned
    unmodified\.

    An absolute path outside of *jail* is stripped of its root element and
    then put into the *jail* by prefixing it with it\. The same happens if
    *path* is relative, except that nothing is stripped of it\. Before adding
    the *jail* prefix the *path* is lexically normalized to prevent the
    caller from using __\.\.__ segments in *path* to escape the jail\.

  - <a name='21'></a>__::fileutil::touch__ ?__\-a__? ?__\-c__? ?__\-m__? ?__\-r__ *ref\_file*? ?__\-t__ *time*? *filename* ?*\.\.\.*?

    Implementation of __[touch](\.\./\.\./\.\./\.\./index\.md\#touch)__\. Alter the
    atime and mtime of the specified files\. If __\-c__, do not create files
    if they do not already exist\. If __\-r__, use the atime and mtime from
    *ref\_file*\. If __\-t__, use the integer clock value *time*\. It is
    illegal to specify both __\-r__ and __\-t__\. If __\-a__, only
    change the atime\. If __\-m__, only change the mtime\.

    *This command is not available for Tcl versions less than 8\.3\.*

  - <a name='22'></a>__::fileutil::tempdir__

    The command returns the path of a directory where the caller can place
    temporary files, such as "/tmp" on Unix systems\. The algorithm we use to
    find the correct directory is as follows:

      1. The directory set by an invokation of __::fileutil::tempdir__ with
         an argument\. If this is present it is tried exclusively and none of the
         following item are tried\.

      1. The directory named in the TMPDIR environment variable\.

      1. The directory named in the TEMP environment variable\.

      1. The directory named in the TMP environment variable\.

      1. A platform specific location:

           * Windows

             "C:\\TEMP", "C:\\TMP", "\\TEMP", and "\\TMP" are tried in that order\.

           * \(classic\) Macintosh

             The TRASH\_FOLDER environment variable is used\. This is most likely
             not correct\.

           * Unix

             The directories "/tmp", "/var/tmp", and "/usr/tmp" are tried in
             that order\.

    The algorithm utilized is mainly that used in the Python standard library\.
    The exception is the first item, the ability to have the search overridden
    by a user\-specified directory\.

  - <a name='23'></a>__::fileutil::tempdir__ *path*

    In this mode the command sets the *path* as the first and only directory
    to try as a temp\. directory\. See the previous item for the use of the set
    directory\. The command returns the empty string\.

  - <a name='24'></a>__::fileutil::tempdirReset__

    Invoking this command clears the information set by the last call of
    \[__::fileutil::tempdir__ *path*\]\. See the last item too\.

  - <a name='25'></a>__::fileutil::tempfile__ ?*prefix*?

    The command generates a temporary file name suitable for writing to, and the
    associated file\. The file name will be unique, and the file will be writable
    and contained in the appropriate system specific temp directory\. The name of
    the file will be returned as the result of the command\.

    The code was taken from
    [http://wiki\.tcl\.tk/772](http://wiki\.tcl\.tk/772), attributed to Igor
    Volobouev and anon\.

  - <a name='26'></a>__::fileutil::maketempdir__ ?__\-prefix__ *str*? ?__\-suffix__ *str*? ?__\-dir__ *str*?

    The command generates a temporary directory suitable for writing to\. The
    directory name will be unique, and the directory will be writable and
    contained in the appropriate system specific temp directory\. The name of the
    directory will be returned as the result of the command\.

    The three options can used to tweak the behaviour of the command:

      * __\-prefix__ str

        The initial, fixed part of the directory name\. Defaults to __tmp__
        if not specified\.

      * __\-suffix__ str

        The fixed tail of the directory\. Defaults to the empty string if not
        specified\.

      * __\-dir__ str

        The directory to place the new directory into\. Defaults to the result of
        __fileutil::tempdir__ if not specified\.

    The initial code for this was supplied by [Miguel Martinez
    Lopez](mailto:aplicacionamedida@gmail\.com)\.

  - <a name='27'></a>__::fileutil::relative__ *base* *dst*

    This command takes two directory paths, both either absolute or relative and
    computes the path of *dst* relative to *base*\. This relative path is
    returned as the result of the command\. As implied in the previous sentence,
    the command is not able to compute this relationship between the arguments
    if one of the paths is absolute and the other relative\.

    *Note:* The processing done by this command is purely lexical\. Symbolic
    links are *not* taken into account\.

  - <a name='28'></a>__::fileutil::relativeUrl__ *base* *dst*

    This command takes two file paths, both either absolute or relative and
    computes the path of *dst* relative to *base*, as seen from inside of
    the *base*\. This is the algorithm how a browser resolves a relative link
    found in the currently shown file\.

    The computed relative path is returned as the result of the command\. As
    implied in the previous sentence, the command is not able to compute this
    relationship between the arguments if one of the paths is absolute and the
    other relative\.

    *Note:* The processing done by this command is purely lexical\. Symbolic
    links are *not* taken into account\.

# <a name='section2'></a>Warnings and Incompatibilities

  - __1\.14\.9__

    In this version __fileutil::find__'s broken system for handling symlinks
    was replaced with one working correctly and properly enumerating all the
    legal non\-cyclic paths under a base directory\.

    While correct this means that certain pathological directory hierarchies
    with cross\-linked sym\-links will now take about O\(n\*\*2\) time to enumerate
    whereas the original broken code managed O\(n\) due to its brokenness\.

    A concrete example and extreme case is the "/sys" hierarchy under Linux
    where some hundred devices exist under both "/sys/devices" and "/sys/class"
    with the two sub\-hierarchies linking to the other, generating millions of
    legal paths to enumerate\. The structure, reduced to three devices, roughly
    looks like

        /sys/class/tty/tty0 --> ../../dev/tty0
        /sys/class/tty/tty1 --> ../../dev/tty1
        /sys/class/tty/tty2 --> ../../dev/tty1

        /sys/dev/tty0/bus
        /sys/dev/tty0/subsystem --> ../../class/tty
        /sys/dev/tty1/bus
        /sys/dev/tty1/subsystem --> ../../class/tty
        /sys/dev/tty2/bus
        /sys/dev/tty2/subsystem --> ../../class/tty

    The command __fileutil::find__ currently has no way to escape this\. When
    having to handle such a pathological hierarchy It is recommended to switch
    to package __fileutil::traverse__ and the same\-named command it
    provides, and then use the __\-prefilter__ option to prevent the
    traverser from following symbolic links, like so:

        package require fileutil::traverse

        proc NoLinks {fileName} {
            if {[string equal [file type $fileName] link]} {
                return 0
            }
            return 1
        }

        fileutil::traverse T /sys/devices -prefilter NoLinks
        T foreach p {
            puts $p
        }
        T destroy

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *fileutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[cat](\.\./\.\./\.\./\.\./index\.md\#cat), [file
utilities](\.\./\.\./\.\./\.\./index\.md\#file\_utilities),
[grep](\.\./\.\./\.\./\.\./index\.md\#grep), [temp
file](\.\./\.\./\.\./\.\./index\.md\#temp\_file), [test](\.\./\.\./\.\./\.\./index\.md\#test),
[touch](\.\./\.\./\.\./\.\./index\.md\#touch), [type](\.\./\.\./\.\./\.\./index\.md\#type)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/fileutil/multi.md.

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
89
90
91
92
93
94
95

[//000000001]: # (fileutil::multi \- file utilities)
[//000000002]: # (Generated from file 'multi\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (fileutil::multi\(n\) 0\.1 tcllib "file utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

fileutil::multi \- Multi\-file operation, scatter/gather, standard object

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require fileutil::multi ?0\.1?  
package require fileutil::multi::op ?0\.1?  
package require wip ?1\.0?  

[__::fileutil::multi__ ?*word*\.\.\.?](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a single command to perform actions on multiple files
selected by glob patterns\. It is a thin layer over the package
__[fileutil::multi::op](multiop\.md)__ which provides objects for the
same\. This package simply creates a single such object and directs all file
commands to it\.

At the core is a domain specific language allowing the easy specification of
multi\-file copy and/or move and/or deletion operations\. Alternate names would be
scatter/gather processor, or maybe even assembler\. For the detailed
specification of this language, and examples, please see the documention for the
package __[fileutil::multi::op](multiop\.md)__\.

# <a name='section2'></a>PUBLIC API

The main command of the package is:

  - <a name='1'></a>__::fileutil::multi__ ?*word*\.\.\.?

    This command interprets the specified words as file commands to execute\. See
    the section __FILE API__ of the documentation for the package
    __[fileutil::multi::op](multiop\.md)__ for the set of acceptable
    commands, their syntax, and semantics\.

    The result of the command is the result generated by the last file command
    it executed\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *fileutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[copy](\.\./\.\./\.\./\.\./index\.md\#copy), [file
utilities](\.\./\.\./\.\./\.\./index\.md\#file\_utilities),
[move](\.\./\.\./\.\./\.\./index\.md\#move),
[multi\-file](\.\./\.\./\.\./\.\./index\.md\#multi\_file),
[remove](\.\./\.\./\.\./\.\./index\.md\#remove)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































Deleted embedded/md/tcllib/files/modules/fileutil/multiop.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485

[//000000001]: # (fileutil::multi::op \- file utilities)
[//000000002]: # (Generated from file 'multiop\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (fileutil::multi::op\(n\) 0\.5\.3 tcllib "file utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

fileutil::multi::op \- Multi\-file operation, scatter/gather

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [CLASS API](#section2)

  - [OBJECT API](#section3)

  - [FILE API](#section4)

  - [EXAMPLES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require fileutil::multi::op ?0\.5\.3?  
package require wip ?1\.0?  

[__::fileutil::multi::op__ ?*opName*? ?*word*\.\.\.?](#1)  
[__opName__ *option* ?*arg arg \.\.\.*?](#2)  
[__$opName__ __do__ ?*word*\.\.\.?](#3)  
[__into__ *directory*](#4)  
[__in__ *directory*](#5)  
[__to__ *directory*](#6)  
[__from__ *directory*](#7)  
[__not__ *pattern*](#8)  
[__for__ *pattern*](#9)  
[__exclude__ *pattern*](#10)  
[__but__](#11)  
[__except__](#12)  
[__as__ *name*](#13)  
[__recursive__](#14)  
[__recursively__](#15)  
[__[copy](\.\./\.\./\.\./\.\./index\.md\#copy)__](#16)  
[__[move](\.\./\.\./\.\./\.\./index\.md\#move)__](#17)  
[__[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__](#18)  
[__expand__](#19)  
[__invoke__ *cmdprefix*](#20)  
[__reset__](#21)  
[__\(__](#22)  
[__\)__](#23)  
[__cd__ *directory*](#24)  
[__up__](#25)  
[__for\-windows__](#26)  
[__for\-win__](#27)  
[__for\-unix__](#28)  
[__the__ *pattern*](#29)  
[__the\-set__ *varname*](#30)  
[__\->__ *varname*](#31)  
[__strict__](#32)  
[__\!strict__](#33)  
[__files__](#34)  
[__links__](#35)  
[__directories__](#36)  
[__dirs__](#37)  
[__all__](#38)  
[__state?__](#39)  
[__as?__](#40)  
[__excluded?__](#41)  
[__from?__](#42)  
[__into?__](#43)  
[__operation?__](#44)  
[__recursive?__](#45)  
[__strict?__](#46)  
[__type?__](#47)  

# <a name='description'></a>DESCRIPTION

This package provides objects which are able to perform actions on multiple
files selected by glob patterns\.

At the core is a domain specific language allowing the easy specification of
multi\-file copy and/or move and/or deletion operations\. Alternate names would be
scatter/gather processor, or maybe even assembler\.

# <a name='section2'></a>CLASS API

The main command of the package is:

  - <a name='1'></a>__::fileutil::multi::op__ ?*opName*? ?*word*\.\.\.?

    The command creates a new multi\-file operation object with an associated
    global Tcl command whose name is *opName*\. This command can be used to
    invoke the various possible file operations\. It has the following general
    form:

      * <a name='2'></a>__opName__ *option* ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.

    If the string __%AUTO%__ is used as the *opName* then the package will
    generate a unique name on its own\.

    If one or more *word*s are specified they are interpreted as an initial
    set of file commands to execute\. I\.e\. the method __do__ of the newly
    constructed object is implicitly invoked using the words as its arguments\.

# <a name='section3'></a>OBJECT API

The following methods are possible for multi\-file operation objects:

  - <a name='3'></a>__$opName__ __do__ ?*word*\.\.\.?

    This method interprets the specified words as file commands to execute\. See
    the section [FILE API](#section4) for the set of acceptable commands,
    their syntax, and semantics\.

    The result of the method is the result generated by the last file command it
    executed\.

# <a name='section4'></a>FILE API

Both object constructor and method __do__ take a list of words and interpret
them as file commands to execute\. The names were chosen to allow the
construction of operations as sentences in near\-natural language\. Most of the
commands influence just the state of the object, i\.e\. are simply providing the
configuration used by the command triggering the actual action\.

  - <a name='4'></a>__into__ *directory*

    Specifies the destination directory for operations\.

  - <a name='5'></a>__in__ *directory*

    Alias for __into__\.

  - <a name='6'></a>__to__ *directory*

    Alias for __into__\.

  - <a name='7'></a>__from__ *directory*

    Specifies the source directory for operations\.

  - <a name='8'></a>__not__ *pattern*

    Specifies a glob pattern for paths to be excluded from the operation\.

  - <a name='9'></a>__for__ *pattern*

    Alias for __not__\.

  - <a name='10'></a>__exclude__ *pattern*

    Alias for __not__\.

  - <a name='11'></a>__but__

    Has no arguments of its own, but looks ahead in the list of words and
    executes all __not__ commands immediately following it\. This allows the
    construction of "but not" and "but exclude" clauses for a more natural
    sounding specification of excluded paths\.

  - <a name='12'></a>__except__

    A semi\-alias for __but__\. Has no arguments of its own, but looks ahead
    in the list of words and executes all __for__ commands immediately
    following it\. This allows the construction of "except for" clauses for a
    more natural sounding specification of excluded paths\.

  - <a name='13'></a>__as__ *name*

    Specifies a new name for the first file handled by the current operation\.
    I\.e\. for the renaming of a single file during the operation\.

  - <a name='14'></a>__recursive__

    Signals that file expansion should happen in the whole directory hierarchy
    and not just the directory itself\.

  - <a name='15'></a>__recursively__

    An alias for __recursive__\.

  - <a name='16'></a>__[copy](\.\./\.\./\.\./\.\./index\.md\#copy)__

    Signals that the operation is the copying of files from source to
    destination directory per the specified inclusion and exclusion patterns\.

  - <a name='17'></a>__[move](\.\./\.\./\.\./\.\./index\.md\#move)__

    Signals that the operation is the moving of files from source to destination
    directory per the specified inclusion and exclusion patterns\.

  - <a name='18'></a>__[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__

    Signals that the operation is the removal of files in the destination
    directory per the specified inclusion and exclusion patterns\.

  - <a name='19'></a>__expand__

    Signals that there is no operation but the calculation of the set of files
    from the include and exclude patterns\. This operation is not available if
    __the\-set__ is used\.

  - <a name='20'></a>__invoke__ *cmdprefix*

    Signals that the user\-specified command prefix *cmdprefix* is the
    operation to perform\. The command prefix is executed at the global level and
    given the source directory, destination directory, and set of files \(as
    dictionary mapping from source to destination files\), in this order\.

  - <a name='21'></a>__reset__

    Forces the object into the ground state where all parts of the configuration
    have default values\.

  - <a name='22'></a>__\(__

    Saves a copy of the current object state on a stack\.

  - <a name='23'></a>__\)__

    Takes the state at the top of the state stack and restores it, i\.e\. makes it
    the new current object state\.

  - <a name='24'></a>__cd__ *directory*

    Changes the destination directory to the sub\-directory *directory* of the
    current destination\.

  - <a name='25'></a>__up__

    Changes the destination directory to the parent directory of the current
    destination\.

  - <a name='26'></a>__for\-windows__

    Checks that Windows is the current platform\. Aborts processing if not\.

  - <a name='27'></a>__for\-win__

    An alias for __for\-windows__\.

  - <a name='28'></a>__for\-unix__

    Checks that Unix is the current platform\. Aborts processing if not\.

  - <a name='29'></a>__the__ *pattern*

    This command specifies the files to operate on per a glob pattern, and is
    also the active element, i\.e\. the command which actually performs the
    specified operation\. All the other commands only modified the object state
    to set the operation up, but di nothing else\.

    To allow for a more natural sounding syntax this command also looks ahead in
    the list of words looks and executes several commands immediately following
    it before performing its own actions\. These commands are __as__,
    __but__, __exclude__, __except__, __from__, and __into__
    \(and aliases\)\. That way these commands act like qualifiers, and still take
    effect as if they had been written before this command\.

    After the operation has been performed the object state the exclude patterns
    and the alias name, if specified, are reset to their default values \(i\.e\.
    empty\), but nothing else\.

  - <a name='30'></a>__the\-set__ *varname*

    Like __the__, however the set of files to use is not specified
    implicitly per a glob pattern, but contained and loaded from the specified
    variable\. The operation __expand__ is not available if this command is
    used\.

  - <a name='31'></a>__\->__ *varname*

    Saves the set of files from the last expansion into the specified variable\.

  - <a name='32'></a>__strict__

    Make file expansion and definition of destination directory \(__in__ and
    aliases\) strict, i\.e\. report errors for missing directories, and empty
    expansion\.

  - <a name='33'></a>__\!strict__

    Complement of __strict__\. A missing destination directory or empty
    expansion are not reported as errors\.

  - <a name='34'></a>__files__

    Limit the search to files\. Default is to accept every type of path\.

  - <a name='35'></a>__links__

    Limit the search to symbolic links\. Default is to accept every type of path\.

  - <a name='36'></a>__directories__

    Limit the search to directories\. Default is to accept every type of path\.

  - <a name='37'></a>__dirs__

    An alias for __directories__\.

  - <a name='38'></a>__all__

    Accept all types of paths \(default\)\.

  - <a name='39'></a>__state?__

    Returns the current state of the object as dictionary\. The dictionary keys
    and their meanings are:

      * __as__

        Last setting made by __as__\.

      * __excluded__

        List of currently known exclusion patterns\.

      * __from__

        Current source directory, set by __from__\.

      * __into__

        Current destination directory, set by __into__ \(and aliases\)\.

      * __operation__

        Current operation to perform, set by
        __[copy](\.\./\.\./\.\./\.\./index\.md\#copy)__,
        __[move](\.\./\.\./\.\./\.\./index\.md\#move)__,
        __[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__, __expand__, or
        __invoke__\.

      * __recursive__

        Current recursion status\. Set/unset by __recursive__ and
        __\!recursive__\.

      * __strict__

        Current strictness\. Set/unset by __strict__ and __\!strict__\.

      * __type__

        Current path type limiter\. Set by either __files__,
        __directories__, __links__, or __all__\.

  - <a name='40'></a>__as?__

    Returns the current alias name\.

  - <a name='41'></a>__excluded?__

    Returns the current set of exclusion patterns\.

  - <a name='42'></a>__from?__

    Returns the current source directory\.

  - <a name='43'></a>__into?__

    Returns the current destination directory\.

  - <a name='44'></a>__operation?__

    Returns the current operation to perform\.

  - <a name='45'></a>__recursive?__

    Returns the current recursion status\.

  - <a name='46'></a>__strict?__

    Returns the current strictness\.

  - <a name='47'></a>__type?__

    Returns the current path type limiter\.

# <a name='section5'></a>EXAMPLES

The following examples assume that the variable __F__ contains a reference
to a multi\-file operation object\.

        $F do copy                       \
    	the  *.dll                    \
    	from c:/TDK/PrivateOpenSSL/bin \
    	to   [installdir_of tls]

        $F do move      \
    	the  *       \
    	from /sources \
    	into /scratch  \
    	but not *.html

        # Alternatively use 'except for *.html'.

        $F do           \
    	move         \
    	the  index    \
    	from /sources  \
    	into /scratch   \
    	as   pkgIndex.tcl

        $F do         \
    	remove     \
    	the *.txt  \
    	in /scratch

Note that the fact that most commands just modify the object state allows us to
use more off forms as specifications instead of just nearly\-natural language
sentences\. For example the second example in this section can re\-arranged into:

        $F do            \
    	from /sources \
    	into /scratch  \
    	but not *.html \
    	move           \
    	the  *

and the result is not only still a valid specification, but even stays
relatively readable\.

Further note that the information collected by the commands __but__,
__except__, and __as__ is automatically reset after the associated
__the__ was executed\. However no other state is reset in that manner,
allowing the user to avoid repetitions of unchanging information\. For example
the second and third examples of this section can be merged and rewritten into
the equivalent:

    $F do                   \
        move                 \
        the  *                \
        from /sources          \
        into /scratch           \
        but not *.html not index \
        the  index               \
        as   pkgIndex.tcl

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *fileutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[copy](\.\./\.\./\.\./\.\./index\.md\#copy), [file
utilities](\.\./\.\./\.\./\.\./index\.md\#file\_utilities),
[move](\.\./\.\./\.\./\.\./index\.md\#move),
[multi\-file](\.\./\.\./\.\./\.\./index\.md\#multi\_file),
[remove](\.\./\.\./\.\./\.\./index\.md\#remove)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/fileutil/paths.md.

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
89
90
91
92
93
94
95
96
97
98
99
100

[//000000001]: # (fileutil::paths \- )
[//000000002]: # (Generated from file 'paths\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (fileutil::paths\(n\) 1 tcllib "")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

fileutil::paths \- Manage search path pools

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require fileutil::paths ?1?  

[__::fileutil::paths__ *poolName*](#1)  
[__poolName__ __method__ ?*arg arg \.\.\.*?](#2)  
[*poolName* __add__ *path*](#3)  
[*poolName* __clear__](#4)  
[*poolName* __paths__](#5)  
[*poolName* __remove__ *path*](#6)  

# <a name='description'></a>DESCRIPTION

Provides a snit class whose instances manage a pool of \(search\) paths\.

# <a name='section2'></a>API

The main command provides construction of search path pools:

  - <a name='1'></a>__::fileutil::paths__ *poolName*

    Creates a new, empty pool of search paths with an associated global Tcl
    command whose name is *poolName*\. It may be used to invoke various
    operations on the pool\. It has the following general form:

      * <a name='2'></a>__poolName__ __method__ ?*arg arg \.\.\.*?

        __method__ and *arg*uments determine the exact behavior of the
        command\.

    If *poolName* is specified as __%AUTO%__ a unique name will be
    generated by the package itself\. The result of the command is the
    fully\-qualified name of the instance command\.

The following commands are possible for pool objects:

  - <a name='3'></a>*poolName* __add__ *path*

    Adds the *path* to the pool\. Nothing is done if the *path* is already
    known to the pool\. The result of the command is the empty string\.

  - <a name='4'></a>*poolName* __clear__

    Clears the entire pool\. In other words, removes all paths from it\. The
    result of the command is the empty string\.

  - <a name='5'></a>*poolName* __paths__

    Returns the list of all paths known to the pool, in the order they were
    added\.

  - <a name='6'></a>*poolName* __remove__ *path*

    Removes the *path* from the pool, if it is known to the pool\. Unknown
    paths are ignored without error\. The result of the command is the empty
    string\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *fileutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































Deleted embedded/md/tcllib/files/modules/fileutil/traverse.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209

[//000000001]: # (fileutil\_traverse \- file utilities)
[//000000002]: # (Generated from file 'traverse\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (fileutil\_traverse\(n\) 0\.6 tcllib "file utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

fileutil\_traverse \- Iterative directory traversal

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [OPTIONS](#section2)

  - [Warnings and Incompatibilities](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require fileutil::traverse ?0\.6?  
package require fileutil  
package require control  

[__::fileutil::traverse__ ?*objectName*? *path* ?*option* *value*\.\.\.?](#1)  
[__$traverser__ __command__ ?*arg arg \.\.\.*?](#2)  
[__$traverser__ __files__](#3)  
[__$traverser__ __foreach__ *filevar* *script*](#4)  
[__$traverser__ __next__ *filevar*](#5)  

# <a name='description'></a>DESCRIPTION

This package provides objects for the programmable traversal of directory
hierarchies\. The main command exported by the package is:

  - <a name='1'></a>__::fileutil::traverse__ ?*objectName*? *path* ?*option* *value*\.\.\.?

    The command creates a new traversal object with an associated global Tcl
    command whose name is *objectName*\. This command may be used to invoke
    various operations on the traverser\. If the string __%AUTO%__ is used as
    the *objectName* then a unique name will be generated by the package
    itself\.

    Regarding the recognized options see section [OPTIONS](#section2)\. Note
    that all these options can be set only during the creation of the traversal
    object\. Changing them later is not possible and causes errors to be thrown
    if attempted\.

    The object command has the following general form:

      * <a name='2'></a>__$traverser__ __command__ ?*arg arg \.\.\.*?

        *Command* and its *arg*uments determine the exact behavior of the
        object\.

The following commands are possible for traversal objects:

  - <a name='3'></a>__$traverser__ __files__

    This method is the most highlevel one provided by traversal objects\. When
    invoked it returns a list containing the names of all files and directories
    matching the current configuration of the traverser\.

  - <a name='4'></a>__$traverser__ __foreach__ *filevar* *script*

    The highlevel __files__ method \(see above\) is based on this mid\-level
    method\. When invoked it finds all files and directories matching per the
    current configuration and executes the *script* for each path\. The current
    path under consideration is stored in the variable named by *filevar*\.
    Both variable and script live / are executed in the context of the caller of
    the method\. In the method __files__ the script simply saves the found
    paths into the list to return\.

  - <a name='5'></a>__$traverser__ __next__ *filevar*

    This is the lowest possible interface to the traverser, the core all higher
    methods are built on\. When invoked it returns a boolean value indicating
    whether it found a path matching the current configuration \(__True__\),
    or not \(__False__\)\. If a path was found it is stored into the variable
    named by *filevar*, in the context of the caller\.

    The __foreach__ method simply calls this method in a loop until it
    returned __False__\. This method is exposed so that we are also able to
    incrementally traverse a directory hierarchy in an event\-based manner\.

    Note that the traverser does follow symbolic links, except when doing so
    would cause it to enter a link\-cycle\. In other words, the command takes care
    to *not* lose itself in infinite loops upon encountering circular link
    structures\. Note that even links which are not followed will still appear in
    the result\.

# <a name='section2'></a>OPTIONS

  - __\-prefilter__ command\_prefix

    This callback is executed for directories\. Its result determines if the
    traverser recurses into the directory or not\. The default is to always
    recurse into all directories\. The callback is invoked with a single
    argument, the *absolute* path of the directory, and has to return a
    boolean value, __True__ when the directory passes the filter, and
    __False__ if not\.

  - __\-filter__ command\_prefix

    This callback is executed for all paths\. Its result determines if the
    current path is a valid result, and returned by __next__\. The default is
    to accept all paths as valid\. The callback is invoked with a single
    argument, the *absolute* path to check, and has to return a boolean value,
    __True__ when the path passes the filter, and __False__ if not\.

  - __\-errorcmd__ command\_prefix

    This callback is executed for all paths the traverser has trouble with\. Like
    being unable to change into them, get their status, etc\. The default is to
    ignore any such problems\. The callback is invoked with a two arguments, the
    *absolute* path for which the error occured, and the error message\. Errors
    thrown by the filter callbacks are handled through this callback too\. Errors
    thrown by the error callback itself are not caught and ignored, but allowed
    to pass to the caller, i\.e\. however invoked the __next__\. Any other
    results from the callback are ignored\.

# <a name='section3'></a>Warnings and Incompatibilities

  - __0\.4\.4__

    In this version the traverser's broken system for handling symlinks was
    replaced with one working correctly and properly enumerating all the legal
    non\-cyclic paths under a base directory\.

    While correct this means that certain pathological directory hierarchies
    with cross\-linked sym\-links will now take about O\(n\*\*2\) time to enumerate
    whereas the original broken code managed O\(n\) due to its brokenness\.

    A concrete example and extreme case is the "/sys" hierarchy under Linux
    where some hundred devices exist under both "/sys/devices" and "/sys/class"
    with the two sub\-hierarchies linking to the other, generating millions of
    legal paths to enumerate\. The structure, reduced to three devices, roughly
    looks like

        /sys/class/tty/tty0 --> ../../dev/tty0
        /sys/class/tty/tty1 --> ../../dev/tty1
        /sys/class/tty/tty2 --> ../../dev/tty1

        /sys/dev/tty0/bus
        /sys/dev/tty0/subsystem --> ../../class/tty
        /sys/dev/tty1/bus
        /sys/dev/tty1/subsystem --> ../../class/tty
        /sys/dev/tty2/bus
        /sys/dev/tty2/subsystem --> ../../class/tty

    When having to handle such a pathological hierarchy it is recommended to use
    the __\-prefilter__ option to prevent the traverser from following
    symbolic links, like so:

        package require fileutil::traverse

        proc NoLinks {fileName} {
            if {[string equal [file type $fileName] link]} {
                return 0
            }
            return 1
        }

        fileutil::traverse T /sys/devices -prefilter NoLinks
        T foreach p {
            puts $p
        }
        T destroy

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *fileutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[directory traversal](\.\./\.\./\.\./\.\./index\.md\#directory\_traversal),
[traversal](\.\./\.\./\.\./\.\./index\.md\#traversal)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/ftp/ftp.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425

[//000000001]: # (ftp \- ftp client)
[//000000002]: # (Generated from file 'ftp\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (ftp\(n\) 2\.4\.13 tcllib "ftp client")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ftp \- Client\-side tcl implementation of the ftp protocol

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [BUGS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require ftp ?2\.4\.13?  

[__::ftp::Open__ *server* *user* *passwd* ?*options*?](#1)  
[__::ftp::Close__ *handle*](#2)  
[__::ftp::Cd__ *handle* *directory*](#3)  
[__::ftp::Pwd__ *handle*](#4)  
[__::ftp::Type__ *handle* ?__ascii&#124;binary&#124;tenex__?](#5)  
[__::ftp::List__ *handle* ?*pattern*?](#6)  
[__::ftp::NList__ *handle* ?*directory*?](#7)  
[__::ftp::FileSize__ *handle* *file*](#8)  
[__::ftp::ModTime__ *handle* *file*](#9)  
[__::ftp::Delete__ *handle* *file*](#10)  
[__::ftp::Rename__ *handle* *from* *to*](#11)  
[__::ftp::Put__ *handle* \(*local* &#124; \-data *data* &#124; \-channel *chan*\) ?*remote*?](#12)  
[__::ftp::Append__ *handle* \(*local* &#124; \-data *data* &#124; \-channel *chan*\) ?*remote*?](#13)  
[__::ftp::Get__ *handle* *remote* ?\(*local* &#124; \-variable *varname* &#124; \-channel *chan*\)?](#14)  
[__::ftp::Reget__ *handle* *remote* ?*local*? ?*from*? ?*to*?](#15)  
[__::ftp::Newer__ *handle* *remote* ?*local*?](#16)  
[__::ftp::MkDir__ *handle* *directory*](#17)  
[__::ftp::RmDir__ *handle* *directory*](#18)  
[__::ftp::Quote__ *handle* *arg1* *arg2* *\.\.\.*](#19)  
[__::ftp::DisplayMsg__ *handle* *msg* ?*state*?](#20)  

# <a name='description'></a>DESCRIPTION

The ftp package provides the client side of the ftp protocol as specified in RFC
959
\([http://www\.rfc\-editor\.org/rfc/rfc959\.txt](http://www\.rfc\-editor\.org/rfc/rfc959\.txt)\)\.
The package implements both active \(default\) and passive ftp sessions\.

A new ftp session is started with the __::ftp::Open__ command\. To shutdown
an existing ftp session use __::ftp::Close__\. All other commands are
restricted to usage in an an open ftp session\. They will generate errors if they
are used out of context\. The ftp package includes file and directory
manipulating commands for remote sites\. To perform the same operations on the
local site use commands built into the core, like __cd__ or
__[file](\.\./\.\./\.\./\.\./index\.md\#file)__\.

The output of the package is controlled by two state variables,
__::ftp::VERBOSE__ and __::ftp::DEBUG__\. Setting __::ftp::VERBOSE__
to "1" forces the package to show all responses from a remote server\. The
default value is "0"\. Setting __::ftp::DEBUG__ to "1" enables debugging and
forces the package to show all return codes, states, state changes and "real"
ftp commands\. The default value is "0"\.

The command __::ftp::DisplayMsg__ is used to show the different messages
from the ftp session\. The setting of __::ftp::VERBOSE__ determines if this
command is called or not\. The current implementation of the command uses the
__[log](\.\./log/log\.md)__ package of tcllib to write the messages to
their final destination\. This means that the behaviour of
__::ftp::DisplayMsg__ can be customized without changing its implementation\.
For more radical changes overwriting its implementation by the application is of
course still possible\. Note that the default implementation honors the option
__\-output__ to __::ftp::Open__ for a session specific log command\.

*Caution*: The default implementation logs error messages like all other
messages\. If this behaviour is changed to throwing an error instead all commands
in the API will change their behaviour too\. In such a case they will not return
a failure code as described below but pass the thrown error to their caller\.

# <a name='section2'></a>API

  - <a name='1'></a>__::ftp::Open__ *server* *user* *passwd* ?*options*?

    This command is used to start a FTP session by establishing a control
    connection to the FTP server\. The defaults are used for any option not
    specified by the caller\.

    The command takes a host name *server*, a user name *user* and a
    password *password* as its parameters and returns a session handle that is
    an integer number greater than or equal to "0", if the connection is
    successfully established\. Otherwise it returns "\-1"\. The *server*
    parameter must be the name or internet address \(in dotted decimal notation\)
    of the ftp server to connect to\. The *user* and *passwd* parameters must
    contain a valid user name and password to complete the login process\.

    The options overwrite some default values or set special abilities:

      * __\-blocksize__ *size*

        The blocksize is used during data transfer\. At most *size* bytes are
        transfered at once\. The default value for this option is 4096\. The
        package will evaluate the __\-progress callback__ for the session
        after the transfer of each block\.

      * __\-timeout__ *seconds*

        If *seconds* is non\-zero, then __::ftp::Open__ sets up a timeout
        which will occur after the specified number of seconds\. The default
        value is 600\.

      * __\-port__ *number*

        The port *number* specifies an alternative remote port on the ftp
        server on which the ftp service resides\. Most ftp services listen for
        connection requests on the default port 21\. Sometimes, usually for
        security reasons, port numbers other than 21 are used for ftp
        connections\.

      * __\-mode__ *mode*

        The transfer *mode* option determines if a file transfer occurs in
        __active__ or __passive__ mode\. In passive mode the client will
        ask the ftp server to listen on a data port and wait for the connection
        rather than to initiate the process by itself when a data transfer
        request comes in\. Passive mode is normally a requirement when accessing
        sites via a firewall\. The default mode is __active__\.

      * __\-progress__ *callback*

        This *callback* is evaluated whenever a block of data was transfered\.
        See the option __\-blocksize__ for how to specify the size of the
        transfered blocks\.

        When evaluating the *callback* one argument is appended to the
        callback script, the current accumulated number of bytes transferred so
        far\.

      * __\-command__ *callback*

        Specifying this option places the connection into asynchronous mode\. The
        *callback* is evaluated after the completion of any operation\. When an
        operation is running no further operations must be started until a
        callback has been received for the currently executing operation\.

        When evaluating the *callback* several arguments are appended to the
        callback script, namely the keyword of the operation that has completed
        and any additional arguments specific to the operation\. If an error
        occurred during the execution of the operation the callback is given the
        keyword __error__\.

      * __\-output__ *callback*

        This option has no default\. If it is set the default implementation of
        __::ftp::DisplayMsg__ will use its value as command prefix to log
        all internal messages\. The callback will have three arguments appended
        to it before evaluation, the id of the session, the message itself, and
        the connection state, in this order\.

  - <a name='2'></a>__::ftp::Close__ *handle*

    This command terminates the specified ftp session\. If no file transfer is in
    progress, the server will close the control connection immediately\. If a
    file transfer is in progress however, the control connection will remain
    open until the transfers completes\. When that happens the server will write
    the result response for the transfer to it and close the connection
    afterward\.

  - <a name='3'></a>__::ftp::Cd__ *handle* *directory*

    This command changes the current working directory on the ftp server to a
    specified target *directory*\. The command returns 1 if the current working
    directory was successfully changed to the specified directory or 0 if it
    fails\. The target directory can be

      * a subdirectory of the current directory,

      * Two dots, __\.\.__ \(as an indicator for the parent directory of the
        current directory\)

      * or a fully qualified path to a new working directory\.

  - <a name='4'></a>__::ftp::Pwd__ *handle*

    This command returns the complete path of the current working directory on
    the ftp server, or an empty string in case of an error\.

  - <a name='5'></a>__::ftp::Type__ *handle* ?__ascii&#124;binary&#124;tenex__?

    This command sets the ftp file transfer type to either __ascii__,
    __binary__, or __tenex__\. The command always returns the currently
    set type\. If called without type no change is made\.

    Currently only __ascii__ and __binary__ types are supported\. There
    is some early \(alpha\) support for Tenex mode\. The type __ascii__ is
    normally used to convert text files into a format suitable for text editors
    on the platform of the destination machine\. This mainly affects end\-of\-line
    markers\. The type __binary__ on the other hand allows the undisturbed
    transfer of non\-text files, such as compressed files, images and
    executables\.

  - <a name='6'></a>__::ftp::List__ *handle* ?*pattern*?

    This command returns a human\-readable list of files\. Wildcard expressions
    such as "\*\.tcl" are allowed\. If *pattern* refers to a specific directory,
    then the contents of that directory are returned\. If the *pattern* is not
    a fully\-qualified path name, the command lists entries relative to the
    current remote directory\. If no *pattern* is specified, the contents of
    the current remote directory is returned\.

    The listing includes any system\-dependent information that the server
    chooses to include\. For example most UNIX systems produce output from the
    command __ls \-l__\. The command returns the retrieved information as a
    tcl list with one item per entry\. Empty lines and UNIX's "total" lines are
    ignored and not included in the result as reported by this command\.

    If the command fails an empty list is returned\.

  - <a name='7'></a>__::ftp::NList__ *handle* ?*directory*?

    This command has the same behavior as the __::ftp::List__ command,
    except that it only retrieves an abbreviated listing\. This means only file
    names are returned in a sorted list\.

  - <a name='8'></a>__::ftp::FileSize__ *handle* *file*

    This command returns the size of the specified *file* on the ftp server\.
    If the command fails an empty string is returned\.

    *ATTENTION\!* It will not work properly when in ascii mode and is not
    supported by all ftp server implementations\.

  - <a name='9'></a>__::ftp::ModTime__ *handle* *file*

    This command retrieves the time of the last modification of the *file* on
    the ftp server as a system dependent integer value in seconds or an empty
    string if an error occurred\. Use the built\-in command __clock__ to
    convert the retrieves value into other formats\.

  - <a name='10'></a>__::ftp::Delete__ *handle* *file*

    This command deletes the specified *file* on the ftp server\. The command
    returns 1 if the specified file was successfully deleted or 0 if it failed\.

  - <a name='11'></a>__::ftp::Rename__ *handle* *from* *to*

    This command renames the file *from* in the current directory of the ftp
    server to the specified new file name *to*\. This new file name must not be
    the same as any existing subdirectory or file name\. The command returns 1 if
    the specified file was successfully renamed or 0 if it failed\.

  - <a name='12'></a>__::ftp::Put__ *handle* \(*local* &#124; \-data *data* &#124; \-channel *chan*\) ?*remote*?

    This command transfers a local file *local* to a remote file *remote* on
    the ftp server\. If the file parameters passed to the command do not fully
    qualified path names the command will use the current directory on local and
    remote host\. If the remote file name is unspecified, the server will use the
    name of the local file as the name of the remote file\. The command returns 1
    to indicate a successful transfer and 0 in the case of a failure\.

    If __\-data__ *data* is specified instead of a local file, the system
    will not transfer a file, but the *data* passed into it\. In this case the
    name of the remote file has to be specified\.

    If __\-channel__ *chan* is specified instead of a local file, the
    system will not transfer a file, but read the contents of the channel
    *chan* and write this to the remote file\. In this case the name of the
    remote file has to be specified\. After the transfer *chan* will be closed\.

  - <a name='13'></a>__::ftp::Append__ *handle* \(*local* &#124; \-data *data* &#124; \-channel *chan*\) ?*remote*?

    This command behaves like __::ftp::Puts__, but appends the transfered
    information to the remote file\. If the file did not exist on the server it
    will be created\.

  - <a name='14'></a>__::ftp::Get__ *handle* *remote* ?\(*local* &#124; \-variable *varname* &#124; \-channel *chan*\)?

    This command retrieves a remote file *remote* on the ftp server and stores
    its contents into the local file *local*\. If the file parameters passed to
    the command are not fully qualified path names the command will use the
    current directory on local and remote host\. If the local file name is
    unspecified, the server will use the name of the remote file as the name of
    the local file\. The command returns 1 to indicate a successful transfer and
    0 in the case of a failure\. The command will throw an error if the directory
    the file *local* is to be placed in does not exist\.

    If __\-variable__ *varname* is specified, the system will store the
    retrieved data into the variable *varname* instead of a file\.

    If __\-channel__ *chan* is specified, the system will write the
    retrieved data into the channel *chan* instead of a file\. The system will
    *not* close *chan* after the transfer, this is the responsibility of the
    caller to __::ftp::Get__\.

  - <a name='15'></a>__::ftp::Reget__ *handle* *remote* ?*local*? ?*from*? ?*to*?

    This command behaves like __::ftp::Get__, except that if local file
    *local* exists and is smaller than remote file *remote*, the local file
    is presumed to be a partially transferred copy of the remote file and the
    transfer is continued from the apparent point of failure\. The command will
    throw an error if the directory the file *local* is to be placed in does
    not exist\. This command is useful when transferring very large files over
    networks that tend to drop connections\.

    Specifying the additional byte offsets *from* and *to* will cause the
    command to change its behaviour and to download exactly the specified slice
    of the remote file\. This mode is possible only if a local destination is
    explicitly provided\. Omission of *to* leads to downloading till the end of
    the file\.

  - <a name='16'></a>__::ftp::Newer__ *handle* *remote* ?*local*?

    This command behaves like __::ftp::Get__, except that it retrieves the
    remote file only if the modification time of the remote file is more recent
    than the file on the local system\. If the file does not exist on the local
    system, the remote file is considered newer\. The command will throw an error
    if the directory the file *local* is to be placed in does not exist\.

  - <a name='17'></a>__::ftp::MkDir__ *handle* *directory*

    This command creates the specified *directory* on the ftp server\. If the
    specified path is relative the new directory will be created as a
    subdirectory of the current working directory\. Else the created directory
    will have the specified path name\. The command returns 1 to indicate a
    successful creation of the directory and 0 in the case of a failure\.

  - <a name='18'></a>__::ftp::RmDir__ *handle* *directory*

    This command removes the specified directory on the ftp server\. The remote
    directory has to be empty or the command will fail\. The command returns 1 to
    indicate a successful removal of the directory and 0 in the case of a
    failure\.

  - <a name='19'></a>__::ftp::Quote__ *handle* *arg1* *arg2* *\.\.\.*

    This command is used to send an arbitrary ftp command to the server\. It
    cannot be used to obtain a directory listing or for transferring files\. It
    is included to allow an application to execute commands on the ftp server
    which are not provided by this package\. The arguments are sent verbatim,
    i\.e\. as is, with no changes\.

    In contrast to the other commands in this package this command will not
    parse the response it got from the ftp server but return it verbatim to the
    caller\.

  - <a name='20'></a>__::ftp::DisplayMsg__ *handle* *msg* ?*state*?

    This command is used by the package itself to show the different messages
    from the ftp sessions\. The package itself declares this command very simple,
    writing the messages to __stdout__ \(if __::ftp::VERBOSE__ was set,
    see below\) and throwing tcl errors for error messages\. It is the
    responsibility of the application to overwrite it as needed\. A state
    variable for different states assigned to different colors is recommended by
    the author\. The package __[log](\.\./log/log\.md)__ is useful for this\.

  - __::ftp::VERBOSE__

    A state variable controlling the output of the package\. Setting
    __::ftp::VERBOSE__ to "1" forces the package to show all responses from
    a remote server\. The default value is "0"\.

  - __::ftp::DEBUG__

    A state variable controlling the output of ftp\. Setting __::ftp::DEBUG__
    to "1" enables debugging and forces the package to show all return codes,
    states, state changes and "real" ftp commands\. The default value is "0"\.

# <a name='section3'></a>BUGS

The correct execution of many commands depends upon the proper behavior by the
remote server, network and router configuration\.

An update command placed in the procedure __::ftp::DisplayMsg__ may run into
persistent errors or infinite loops\. The solution to this problem is to use
__update idletasks__ instead of
__[update](\.\./\.\./\.\./\.\./index\.md\#update)__\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *ftp* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[ftpd](\.\./ftpd/ftpd\.md), [mime](\.\./mime/mime\.md),
[pop3](\.\./pop3/pop3\.md), [smtp](\.\./mime/smtp\.md)

# <a name='keywords'></a>KEYWORDS

[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp),
[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[net](\.\./\.\./\.\./\.\./index\.md\#net), [rfc 959](\.\./\.\./\.\./\.\./index\.md\#rfc\_959)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/ftp/ftp_geturl.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102

[//000000001]: # (ftp::geturl \- ftp client)
[//000000002]: # (Generated from file 'ftp\_geturl\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (ftp::geturl\(n\) 0\.2\.2 tcllib "ftp client")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ftp::geturl \- Uri handler for ftp urls

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require ftp::geturl ?0\.2\.2?  

[__::ftp::geturl__ *url*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a command which wraps around the client side of the
*[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)* protocol provided by package
__[ftp](ftp\.md)__ to allow the retrieval of urls using the
*[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)* schema\.

# <a name='section2'></a>API

  - <a name='1'></a>__::ftp::geturl__ *url*

    This command can be used by the generic command __::uri::geturl__ \(See
    package __[uri](\.\./uri/uri\.md)__\) to retrieve the contents of ftp
    urls\. Internally it uses the commands of the package
    __[ftp](ftp\.md)__ to fulfill the request\.

    The contents of a *[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)* url are defined as
    follows:

      * *[file](\.\./\.\./\.\./\.\./index\.md\#file)*

        The contents of the specified file itself\.

      * *directory*

        A listing of the contents of the directory in key value notation where
        the file name is the key and its attributes the associated value\.

      * *link*

        The attributes of the link, including the path it refers to\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *ftp* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[ftpd](\.\./ftpd/ftpd\.md), [mime](\.\./mime/mime\.md),
[pop3](\.\./pop3/pop3\.md), [smtp](\.\./mime/smtp\.md)

# <a name='keywords'></a>KEYWORDS

[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp),
[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[net](\.\./\.\./\.\./\.\./index\.md\#net), [rfc 959](\.\./\.\./\.\./\.\./index\.md\#rfc\_959)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































Deleted embedded/md/tcllib/files/modules/ftpd/ftpd.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

[//000000001]: # (ftpd \- Tcl FTP Server Package)
[//000000002]: # (Generated from file 'ftpd\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (ftpd\(n\) 1\.3 tcllib "Tcl FTP Server Package")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ftpd \- Tcl FTP server implementation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [CALLBACKS](#section3)

  - [VARIABLES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require ftpd ?1\.3?  

[__::ftpd::server__ ?*myaddr*?](#1)  
[__::ftpd::config__ ?*option value*? ?*option value \.\.\.*?](#2)  
[*fsCmd* __append__ *path*](#3)  
[*fsCmd* __delete__ *path* *channel*](#4)  
[*fsCmd* __dlist__ *path* *style* *channel*](#5)  
[*fsCmd* __exists__ *path*](#6)  
[*fsCmd* __mkdir__ *path* *channel*](#7)  
[*fsCmd* __mtime__ *path* *channel*](#8)  
[*fsCmd* __permissions__ *path*](#9)  
[*fsCmd* __rename__ *path* *newpath* *channel*](#10)  
[*fsCmd* __retr__ *path*](#11)  
[*fsCmd* __rmdir__ *path* *channel*](#12)  
[*fsCmd* __size__ *path* *channel*](#13)  
[*fsCmd* __store__ *path*](#14)  

# <a name='description'></a>DESCRIPTION

The __ftpd__ package provides a simple Tcl\-only server library for the FTP
protocol as specified in RFC 959
\([http://www\.rfc\-editor\.org/rfc/rfc959\.txt](http://www\.rfc\-editor\.org/rfc/rfc959\.txt)\)\.
It works by listening on the standard FTP socket\. Most server errors are
returned as error messages with the appropriate code attached to them\. Since the
server code for the ftp daemon is executed in the event loop, it is possible
that a __bgerror__ will be thrown on the server if there are problems with
the code in the module\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::ftpd::server__ ?*myaddr*?

    Open a listening socket to listen to and accept ftp connections\. myaddr is
    an optional argument\. *myaddr* is the domain\-style name or numerical IP
    address of the client\-side network interface to use for the connection\.

  - <a name='2'></a>__::ftpd::config__ ?*option value*? ?*option value \.\.\.*?

    The value is always the name of the command to call as the callback\. The
    option specifies which callback should be configured\. See section
    [CALLBACKS](#section3) for descriptions of the arguments and return
    values for each of the callbacks\.

      * \-authIpCmd *proc*

        Callback to authenticate new connections based on the ip\-address of the
        peer\.

      * \-authUsrCmd *proc*

        Callback to authenticate new connections based on the user logging in
        \(and the users password\)\.

      * \-authFileCmd *proc*

        Callback to accept or deny a users access to read and write to a
        specific path or file\.

      * \-logCmd *proc*

        Callback for log information generated by the FTP engine\.

      * \-fsCmd *proc*

        Callback to connect the engine to the filesystem it operates on\.

      * \-closeCmd *proc*

        Callback to be called when a connection is closed\. This allows the
        embedding application to perform its own cleanup operations\.

      * \-xferDoneCmd *proc*

        Callback for transfer completion notification\. In other words, it is
        called whenever a transfer of data to or from the client has completed\.

# <a name='section3'></a>CALLBACKS

  - __authIpCmd__ callback

    The authIpCmd receives the ip\-address of the peer attempting to connect to
    the ftp server as its argument\. It returns a 1 to allow users from the
    specified IP to attempt to login and a 0 to reject the login attempt from
    the specified IP\.

  - __authUsrCmd__ callback

    The authUsrCmd receives the username and password as its two arguments\. It
    returns a 1 to accept the attempted login to the ftpd and a 0 to reject the
    attempted login\.

  - __authFileCmd__ callback

    The authFileCmd receives the user \(that is currently logged in\), the path or
    filename that is about to be read or written, and __read__ or
    __write__ as its three arguments\. It returns a 1 to allow the path or
    filename to be read or written, and a 0 to reject the attempted read or
    write with a permissions error code\.

  - __logCmd__ callback

    The logCmd receives a severity and a message as its two arguments\. The
    severities used within the ftpd package are __note__, __debug__, and
    __error__\. The logCmd doesn't return anything\.

  - __fsCmd__ callback

    The fsCmd receives a subcommand, a filename or path, and optional additional
    arguments \(depending on the subcommand\)\.

    The subcommands supported by the fsCmd are:

      * <a name='3'></a>*fsCmd* __append__ *path*

        The append subcommand receives the filename to append to as its
        argument\. It returns a writable tcl channel as its return value\.

      * <a name='4'></a>*fsCmd* __delete__ *path* *channel*

        The delete subcommand receives the filename to delete, and a channel to
        write to as its two arguments\. The file specified is deleted and the
        appropriate ftp message is written to the channel that is passed as the
        second argument\. The delete subcommand returns nothing\.

      * <a name='5'></a>*fsCmd* __dlist__ *path* *style* *channel*

        The dlist subcommand receives the path that it should list the files
        that are in, the style in which the files should be listed which is
        either __nlst__ or __list__, and a channel to write to as its
        three arguments\. The files in the specified path are printed to the
        specified channel one per line\. If the style is __nlst__ only the
        name of the file is printed to the channel\. If the style is __list__
        then the file permissions, number of links to the file, the name of the
        user that owns the file, the name of the group that owns the file, the
        size \(in bytes\) of the file, the modify time of the file, and the
        filename are printed out to the channel in a formatted space separated
        format\. The __dlist__ subcommand returns nothing\.

      * <a name='6'></a>*fsCmd* __exists__ *path*

        The exists subcommand receives the name of a file to check the existence
        of as its only argument\. The exists subcommand returns a 1 if the path
        specified exists and the path is not a directory\.

      * <a name='7'></a>*fsCmd* __mkdir__ *path* *channel*

        The mkdir subcommand receives the path of a directory to create and a
        channel to write to as its two arguments\. The mkdir subcommand creates
        the specified directory if necessary and possible\. The mkdir subcommand
        then prints the appropriate success or failure message to the channel\.
        The mkdir subcommand returns nothing\.

      * <a name='8'></a>*fsCmd* __mtime__ *path* *channel*

        The mtime subcommand receives the path of a file to check the modify
        time on and a channel as its two arguments\. If the file exists the mtime
        is printed to the channel in the proper FTP format, otherwise an
        appropriate error message and code are printed to the channel\. The mtime
        subcommand returns nothing\.

      * <a name='9'></a>*fsCmd* __permissions__ *path*

        The permissions subcommand receives the path of a file to retrieve the
        permissions of\. The permissions subcommand returns the octal file
        permissions of the specified file\. The file is expected to exist\.

      * <a name='10'></a>*fsCmd* __rename__ *path* *newpath* *channel*

        The rename subcommand receives the path of the current file, the new
        file path, and a channel to write to as its three arguments\. The rename
        subcommand renames the current file to the new file path if the path to
        the new file exists, and then prints out the appropriate message to the
        channel\. If the new file path doesn't exist the appropriate error
        message is printed to the channel\. The rename subcommand returns
        nothing\.

      * <a name='11'></a>*fsCmd* __retr__ *path*

        The retr subcommand receives the path of a file to read as its only
        argument\. The retr subcommand returns a readable channel that the
        specified file can be read from\.

      * <a name='12'></a>*fsCmd* __rmdir__ *path* *channel*

        The rmdir subcommand receives the path of a directory to remove and a
        channel to write to as its two arguments\. The rmdir subcommand removes
        the specified directory \(if possible\) and prints the appropriate message
        to the channel \(which may be an error if the specified directory does
        not exist or is not empty\)\. The rmdir subcommand returns nothing\.

      * <a name='13'></a>*fsCmd* __size__ *path* *channel*

        The size subcommand receives the path of a file to get the size \(in
        bytes\) of and a channel to write to as its two arguments\. The size
        subcommand prints the appropriate code and the size of the file if the
        specified path is a file, otherwise an appropriate error code and
        message are printed to the channel\. The size subcommand returns nothing\.

      * <a name='14'></a>*fsCmd* __store__ *path*

        The store subcommand receives the path of a file to write as its only
        argument\. The store subcommand returns a writable channel\.

  - __closeCmd__

    The __closeCmd__ receives no arguments when it is invoked, and any
    return value it may generate is discarded\.

  - __xferDoneCmd__ sock sock2 file bytes filename err

    The __xferDoneCmd__ receives six arguments when invoked\. These are, in
    this order, the channel handle of the control socket for the connection, the
    channel handle of the data socket used for the transfer \(already closed\),
    the handle of the channel containing the transfered file, the number of
    bytes transfered, the path of the file which was transfered, and a \(possibly
    empty\) error message\. Any return value it may generate is discarded\.

# <a name='section4'></a>VARIABLES

  - __::ftpd::cwd__

    The current working directory for a session when someone first connects to
    the FTPD or when the __REIN__ ftp command is received\.

  - __::ftpd::contact__

    The e\-mail address of the person that is the contact for the ftp server\.
    This address is printed out as part of the response to the __FTP HELP__
    command\.

  - __::ftpd::port__

    The port that the ftp server should listen on\. If port is specified as zero,
    the operating system will allocate an unused port for use as a server
    socket; afterwards, the variable will contain the port number that was
    allocated\.

  - __::ftpd::welcome__

    The message that is printed out when the user first connects to the ftp
    server\.

  - __::ftpd::CurrentSocket__

    Accessible to all callbacks and all filesystem commands \(which are a special
    form of callback\) and contains the handle of the socket channel which was
    active when the callback was invoked\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *ftpd* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp), [ftpd](\.\./\.\./\.\./\.\./index\.md\#ftpd),
[ftpserver](\.\./\.\./\.\./\.\./index\.md\#ftpserver), [rfc
959](\.\./\.\./\.\./\.\./index\.md\#rfc\_959),
[services](\.\./\.\./\.\./\.\./index\.md\#services)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/fumagic/cfront.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

[//000000001]: # (fileutil::magic::cfront \- file utilities)
[//000000002]: # (Generated from file 'cfront\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (fileutil::magic::cfront\(n\) 1\.2\.0 tcllib "file utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

fileutil::magic::cfront \- Generator core for compiler of magic\(5\) files

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require fileutil::magic::cfront ?1\.2\.0?  
package require fileutil::magic::cgen ?1\.2\.0?  
package require fileutil::magic::rt ?1\.2\.0?  
package require struct::list  
package require fileutil  

[__::fileutil::magic::cfront::compile__ *path*\.\.\.](#1)  
[__::fileutil::magic::cfront::procdef__ *procname* *path*\.\.\.](#2)  
[__::fileutil::magic::cfront::install__ *path*\.\.\.](#3)  

# <a name='description'></a>DESCRIPTION

This package provides the frontend of a compiler of magic\(5\) files into
recognizers based on the __[fileutil::magic::rt](rtcore\.md)__ recognizer
runtime package\. For the generator backed used by this compiler see the package
__[fileutil::magic::cgen](cgen\.md)__\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::fileutil::magic::cfront::compile__ *path*\.\.\.

    This command takes the paths of one or more files and directories and
    compiles all the files, and the files in all the directories into a single
    recognizer for all the file types specified in these files\.

    All the files have to be in the format specified by magic\(5\)\.

    The result of the command is a Tcl script containing the generated
    recognizer\.

  - <a name='2'></a>__::fileutil::magic::cfront::procdef__ *procname* *path*\.\.\.

    This command behaves like __::fileutil::magic::cfront::compile__ with
    regard to the specified path arguments, then wraps the resulting recognizer
    script into a procedure named *procname*, puts code setting up the
    namespace of *procname* in front, and returns the resulting script\.

  - <a name='3'></a>__::fileutil::magic::cfront::install__ *path*\.\.\.

    This command uses __::fileutil::magic::cfront::procdef__ to compile each
    of the paths into a recognizer procedure and installs the result in the
    current interpreter\.

    The name of each new procedure is derived from the name of the
    file/directory used in its creation, with file/directory "FOO" causing the
    creation of procedure __::fileutil::magic::/FOO::run__\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *fileutil :: magic* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

file\(1\), [fileutil](\.\./fileutil/fileutil\.md), magic\(5\)

# <a name='keywords'></a>KEYWORDS

[file recognition](\.\./\.\./\.\./\.\./index\.md\#file\_recognition), [file
type](\.\./\.\./\.\./\.\./index\.md\#file\_type), [file
utilities](\.\./\.\./\.\./\.\./index\.md\#file\_utilities),
[mime](\.\./\.\./\.\./\.\./index\.md\#mime), [type](\.\./\.\./\.\./\.\./index\.md\#type)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































Deleted embedded/md/tcllib/files/modules/fumagic/cgen.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

[//000000001]: # (fileutil::magic::cgen \- file utilities)
[//000000002]: # (Generated from file 'cgen\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (fileutil::magic::cgen\(n\) 1\.2\.0 tcllib "file utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

fileutil::magic::cgen \- Generator core for compiler of magic\(5\) files

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require fileutil::magic::cgen ?1\.2\.0?  
package require fileutil::magic::rt ?1\.2\.0?  
package require struct::tree  
package require struct::list  

[__::fileutil::magic::cgen::2tree__ *script*](#1)  
[__::fileutil::magic::cgen::treedump__ *tree*](#2)  
[__::fileutil::magic::cgen::treegen__ *tree* *node*](#3)  

# <a name='description'></a>DESCRIPTION

This package provides the generator backend for a compiler of magic\(5\) files
into recognizers based on the __[fileutil::magic::rt](rtcore\.md)__
recognizer runtime package\. For the compiler frontend using this generator see
the package __[fileutil::magic::cfront](cfront\.md)__\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::fileutil::magic::cgen::2tree__ *script*

    This command converts the recognizer specified by the *script* into a tree
    and returns the object command of that tree as its result\. It uses the
    package __[struct::tree](\.\./struct/struct\_tree\.md)__ for the tree\.

    The *script* is in the format specified by magic\(5\)\.

  - <a name='2'></a>__::fileutil::magic::cgen::treedump__ *tree*

    This command takes a *tree* as generated by
    __::fileutil::magic::cgen::2tree__ and returns a string encoding the
    tree for human consumption, to aid in debugging\.

  - <a name='3'></a>__::fileutil::magic::cgen::treegen__ *tree* *node*

    This command takes a *tree* as generated by
    __::fileutil::magic::cgen::2tree__ and returns a Tcl script, the
    recognizer for the file types represented by the sub\-tree rooted at the
    *node*\. The generated script makes extensive use of the commands provided
    by the recognizer runtime package
    __[fileutil::magic::rt](rtcore\.md)__ to perform its duties\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *fileutil :: magic* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

file\(1\), [fileutil](\.\./fileutil/fileutil\.md), magic\(5\)

# <a name='keywords'></a>KEYWORDS

[file recognition](\.\./\.\./\.\./\.\./index\.md\#file\_recognition), [file
type](\.\./\.\./\.\./\.\./index\.md\#file\_type), [file
utilities](\.\./\.\./\.\./\.\./index\.md\#file\_utilities),
[mime](\.\./\.\./\.\./\.\./index\.md\#mime), [type](\.\./\.\./\.\./\.\./index\.md\#type)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































Deleted embedded/md/tcllib/files/modules/fumagic/filetypes.md.

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
89
90
91
92
93

[//000000001]: # (fileutil::magic::filetype \- file utilities)
[//000000002]: # (Generated from file 'filetypes\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (fileutil::magic::filetype\(n\) 2\.0 tcllib "file utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

fileutil::magic::filetype \- Procedures implementing file\-type recognition

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [REFERENCES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require fileutil::magic::filetype ?2\.0?  

[__::fileutil::magic::filetype__ *filename*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a command for the recognition of file types in pure Tcl\.

The core part of the recognizer was generated from a "magic\(5\)" file containing
the checks to perform to recognize files, and associated file\-types\.

*Beware\!* This recognizer is large, about 752 Kilobyte of generated Tcl code\.

  - <a name='1'></a>__::fileutil::magic::filetype__ *filename*

    This command is similar to the command __fileutil::fileType__\.

    Returns a list containing a list of descriptions, a list of mimetype
    components, and a list file extensions\. Returns an empty string if the file
    content is not recognized\.

# <a name='section2'></a>REFERENCES

  1. [File\(1\) sources](ftp://ftp\.astron\.com/pub/file/) This site contains
     the current sources for the file command, including the magic definitions
     used by it\. The latter were used by us to generate this recognizer\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *fileutil :: magic* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

file\(1\), [fileutil](\.\./fileutil/fileutil\.md), magic\(5\)

# <a name='keywords'></a>KEYWORDS

[file recognition](\.\./\.\./\.\./\.\./index\.md\#file\_recognition), [file
type](\.\./\.\./\.\./\.\./index\.md\#file\_type), [file
utilities](\.\./\.\./\.\./\.\./index\.md\#file\_utilities),
[type](\.\./\.\./\.\./\.\./index\.md\#type)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































Deleted embedded/md/tcllib/files/modules/fumagic/rtcore.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319

[//000000001]: # (fileutil::magic::rt \- file utilities)
[//000000002]: # (Generated from file 'rtcore\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (fileutil::magic::rt\(n\) 2\.0 tcllib "file utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

fileutil::magic::rt \- Runtime core for file type recognition engines written in
pure Tcl

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [NUMERIC TYPES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require fileutil::magic::rt ?2\.0?  

[__::fileutil::magic::rt::>__](#1)  
[__::fileutil::magic::rt::<__](#2)  
[__::fileutil::magic::rt::open__ *filename*](#3)  
[__::fileutil::magic::rt::close__](#4)  
[__::fileutil::magic::rt::file\_start__ *name*](#5)  
[__::fileutil::magic::rt::result__ ?*msg*?](#6)  
[__::fileutil::magic::rt::resultv__ ?*msg*?](#7)  
[__::fileutil::magic::rt::emit__ *msg*](#8)  
[__::fileutil::magic::rt::offset__ *where*](#9)  
[__::fileutil::magic::rt::Nv__ *type* *offset* ?*qual*?](#10)  
[__::fileutil::magic::rt::N__ *type* *offset* *comp* *val* ?*qual*?](#11)  
[__::fileutil::magic::rt::Nvx__ *type* *offset* ?*qual*?](#12)  
[__::fileutil::magic::rt::Nx__ *type* *offset* *comp* *val* ?*qual*?](#13)  
[__::fileutil::magic::rt::S__ *offset* *comp* *val* ?*qual*?](#14)  
[__::fileutil::magic::rt::Sx__ *offset* *comp* *val* ?*qual*?](#15)  
[__::fileutil::magic::rt::L__ *newlevel*](#16)  
[__::fileutil::magic::rt::I__ *base* *type* *delta*](#17)  
[__::fileutil::magic::rt::R__ *offset*](#18)  
[__::fileutil::magic::rt::U__ *fileindex* *name*](#19)  

# <a name='description'></a>DESCRIPTION

This package provides the runtime core for file type recognition engines written
in pure Tcl and is thus used by all other packages in this module, i\.e\. the two
frontend packages __fileutil::magic::mimetypes__ and
__fileutil::magic::filetypes__, and the two engine compiler packages
__[fileutil::magic::cgen](cgen\.md)__ and
__[fileutil::magic::cfront](cfront\.md)__\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::fileutil::magic::rt::>__

    Shorthand for __incr level__\.

  - <a name='2'></a>__::fileutil::magic::rt::<__

    Shorthand for __incr level \-1__\.

  - <a name='3'></a>__::fileutil::magic::rt::open__ *filename*

    This command initializes the runtime and prepares the file *filename* for
    use by the system\. This command has to be invoked first, before any other
    command of this package\.

    The command returns the channel handle of the opened file as its result\.

  - <a name='4'></a>__::fileutil::magic::rt::close__

    This command closes the last file opened via
    __::fileutil::magic::rt::open__ and shuts the runtime down\. This command
    has to be invoked last, after the file has been dealt with completely\.
    Afterward another invokation of __::fileutil::magic::rt::open__ is
    required to process another file\.

    This command returns the empty string as its result\.

  - <a name='5'></a>__::fileutil::magic::rt::file\_start__ *name*

    This command marks the start of a magic file when debugging\. It returns the
    empty string as its result\.

  - <a name='6'></a>__::fileutil::magic::rt::result__ ?*msg*?

    This command returns the current result and stops processing\.

    If *msg* is specified its text is added to the result before it is
    returned\. See __::fileutil::magic::rt::emit__ for the allowed special
    character sequences\.

  - <a name='7'></a>__::fileutil::magic::rt::resultv__ ?*msg*?

    This command returns the current result\. In contrast to
    __::fileutil::magic::rt::result__ processing continues\.

    If *msg* is specified its text is added to the result before it is
    returned\. See __::fileutil::magic::rt::emit__ for the allowed special
    character sequences\.

  - <a name='8'></a>__::fileutil::magic::rt::emit__ *msg*

    This command adds the text *msg* to the result buffer\. The message may
    contain the following special character sequences\. They will be replaced
    with buffered values before the message is added to the result\. The command
    returns the empty string as its result\.

      * __\\b__

        This sequence is removed

      * __%s__

        Replaced with the last buffered string value\.

      * __%ld__

        Replaced with the last buffered numeric value\.

      * __%d__

        See above\.

  - <a name='9'></a>__::fileutil::magic::rt::offset__ *where*

  - <a name='10'></a>__::fileutil::magic::rt::Nv__ *type* *offset* ?*qual*?

    This command fetches the numeric value with *type* from the absolute
    location *offset* and returns it as its result\. The fetched value is
    further stored in the numeric buffer\.

    If *qual* is specified it is considered to be a mask and applied to the
    fetched value before it is stored and returned\. It has to have the form of a
    partial Tcl bit\-wise expression, i\.e\.

        & number

    For example:

        Nv lelong 0 &0x8080ffff

    For the possible types see section [NUMERIC TYPES](#section3)\.

  - <a name='11'></a>__::fileutil::magic::rt::N__ *type* *offset* *comp* *val* ?*qual*?

    This command behaves mostly like __::fileutil::magic::rt::Nv__, except
    that it compares the fetched and masked value against *val* as specified
    with *comp* and returns the result of that comparison\.

    The argument *comp* has to contain one of Tcl's comparison operators, and
    the comparison made will be

        <val> <comp> <fetched-and-masked-value>

    The special comparison operator __x__ signals that no comparison should
    be done, or, in other words, that the fetched value will always match
    *val*\.

  - <a name='12'></a>__::fileutil::magic::rt::Nvx__ *type* *offset* ?*qual*?

    This command behaves like __::fileutil::magic::rt::Nv__, except that it
    additionally remembers the location in the file after the fetch in the
    calling context, for the current level, for later use by
    __::fileutil::magic::rt::R__\.

  - <a name='13'></a>__::fileutil::magic::rt::Nx__ *type* *offset* *comp* *val* ?*qual*?

    This command behaves like __::fileutil::magic::rt::N__, except that it
    additionally remembers the location in the file after the fetch in the
    calling context, for the current, for later use by
    __::fileutil::magic::rt::R__\.

  - <a name='14'></a>__::fileutil::magic::rt::S__ *offset* *comp* *val* ?*qual*?

    This command behaves like __::fileutil::magic::rt::N__, except that it
    fetches and compares strings, not numeric data\. The fetched value is also
    stored in the internal string buffer instead of the numeric buffer\.

  - <a name='15'></a>__::fileutil::magic::rt::Sx__ *offset* *comp* *val* ?*qual*?

    This command behaves like __::fileutil::magic::rt::S__, except that it
    additionally remembers the location in the file after the fetch in the
    calling context, for the current level, for later use by
    __::fileutil::magic::rt::R__\.

  - <a name='16'></a>__::fileutil::magic::rt::L__ *newlevel*

    This command sets the current level in the calling context to *newlevel*\.
    The command returns the empty string as its result\.

  - <a name='17'></a>__::fileutil::magic::rt::I__ *base* *type* *delta*

    This command handles base locations specified indirectly through the
    contents of the inspected file\. It returns the sum of *delta* and the
    value of numeric *type* fetched from the absolute location *base*\.

    For the possible types see section [NUMERIC TYPES](#section3)\.

  - <a name='18'></a>__::fileutil::magic::rt::R__ *offset*

    This command handles base locations specified relative to the end of the
    last field one level above\.

    In other words, the command computes an absolute location in the file based
    on the relative *offset* and returns it as its result\. The base the offset
    is added to is the last location remembered for the level in the calling
    context\.

  - <a name='19'></a>__::fileutil::magic::rt::U__ *fileindex* *name*

    Use a named test script at the current level\.

# <a name='section3'></a>NUMERIC TYPES

  - __byte__

    8\-bit integer

  - __short__

    16\-bit integer, stored in native endianess

  - __beshort__

    see above, stored in big endian

  - __leshort__

    see above, stored in small/little endian

  - __long__

    32\-bit integer, stored in native endianess

  - __belong__

    see above, stored in big endian

  - __lelong__

    see above, stored in small/little endian

All of the types above exit in an unsigned form as well\. The type names are the
same, with the character "u" added as prefix\.

  - __date__

    32\-bit integer timestamp, stored in native endianess

  - __bedate__

    see above, stored in big endian

  - __ledate__

    see above, stored in small/little endian

  - __ldate__

    32\-bit integer timestamp, stored in native endianess

  - __beldate__

    see above, stored in big endian

  - __leldate__

    see above, stored in small/little endian

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *fileutil :: magic* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

file\(1\), [fileutil](\.\./fileutil/fileutil\.md), magic\(5\)

# <a name='keywords'></a>KEYWORDS

[file recognition](\.\./\.\./\.\./\.\./index\.md\#file\_recognition), [file
type](\.\./\.\./\.\./\.\./index\.md\#file\_type), [file
utilities](\.\./\.\./\.\./\.\./index\.md\#file\_utilities),
[mime](\.\./\.\./\.\./\.\./index\.md\#mime), [type](\.\./\.\./\.\./\.\./index\.md\#type)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/generator/generator.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511

[//000000001]: # (generator \- Tcl Generator Commands)
[//000000002]: # (Generated from file 'generator\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (generator\(n\) 0\.1 tcllib "Tcl Generator Commands")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

generator \- Procedures for creating and using generators\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PRELUDE](#section3)

  - [BUGS, IDEAS, FEEDBACK](#section4)

  - [Keywords](#keywords)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require generator ?0\.1?  

[__generator__ __define__ *name* *params* *body*](#1)  
[__generator__ __yield__ *arg* ?*args\.\.*?](#2)  
[__generator__ __foreach__ *varList* *generator* *varList* *generator* ?\.\.\.? *body*](#3)  
[__generator__ __next__ *generator* ?*varName\.\.*?](#4)  
[__generator__ __exists__ *generator*](#5)  
[__generator__ __names__](#6)  
[__generator__ __destroy__ ?*generator\.\.*?](#7)  
[__generator__ __finally__ *cmd* ?*arg\.\.*?](#8)  
[__generator__ __from__ *format* *value*](#9)  
[__generator__ __to__ *format* *generator*](#10)  
[__generator__ __map__ *function* *generator*](#11)  
[__generator__ __filter__ *predicate* *generator*](#12)  
[__generator__ __reduce__ *function* *zero* *generator*](#13)  
[__generator__ __foldl__ *function* *zero* *generator*](#14)  
[__generator__ __foldr__ *function* *zero* *generator*](#15)  
[__generator__ __all__ *predicate* *generator*](#16)  
[__generator__ __and__ *generator*](#17)  
[__generator__ __any__ *generator*](#18)  
[__generator__ __concat__ *generator* ?*generator\.\.*?](#19)  
[__generator__ __concatMap__ *function* *generator*](#20)  
[__generator__ __drop__ *n* *generator*](#21)  
[__generator__ __dropWhile__ *predicate* *generator*](#22)  
[__generator__ __contains__ *element* *generator*](#23)  
[__generator__ __foldl1__ *function* *generator*](#24)  
[__generator__ __foldli__ *function* *zero* *generator*](#25)  
[__generator__ __foldri__ *function* *zero* *generator*](#26)  
[__generator__ __head__ *generator*](#27)  
[__generator__ __tail__ *generator*](#28)  
[__generator__ __init__ *generator*](#29)  
[__generator__ __takeList__ *n* *generator*](#30)  
[__generator__ __take__ *n* *generator*](#31)  
[__generator__ __iterate__ *function* *init*](#32)  
[__generator__ __last__ *generator*](#33)  
[__generator__ __length__ *generator*](#34)  
[__generator__ __or__ *predicate* *generator*](#35)  
[__generator__ __product__ *generator*](#36)  
[__generator__ __repeat__ *n* *value\.\.*](#37)  
[__generator__ __sum__ *generator*](#38)  
[__generator__ __takeWhile__ *predicate* *generator*](#39)  
[__generator__ __splitWhen__ *predicate* *generator*](#40)  
[__generator__ __scanl__ *function* *zero* *generator*](#41)  

# <a name='description'></a>DESCRIPTION

The __generator__ package provides commands to define and iterate over
generator expressions\. A *generator* is a command that returns a sequence of
values\. However, unlike an ordinary command that returns a list, a generator
*yields* each value and then suspends, allowing subsequent values to be
fetched on\-demand\. As such, generators can be used to efficiently iterate over a
set of values, without having to generate all answers in\-memory\. Generators can
be used to iterate over elements of a data structure, or rows in the result set
of a database query, or to decouple producer/consumer software designs such as
parsers and tokenizers, or to implement sophisticated custom control strategies
such as backtracking search\. Generators reduce the need to implement custom
control structures, as many such structures can be recast as generators, leading
to both a simpler implementation and a more standardised interface\. The
generator mechanism is built on top of the Tcl 8\.6 coroutine mechanism\.

The package exports a single ensemble command, __generator__\. All
functionality is provided as subcommands of this command\. The core subcommands
of the package are __define__, __yield__, and __foreach__\. The
__define__ command works like Tcl's
__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ command, but creates a generator
procedure; that is, a procedure that returns a generator when called\. The
generator itself is a command that can be called multiple times: each time it
returns the next value in the generated series\. When the series has been
exhausted, the generator command returns an empty list and then destroys itself\.
Rather than manually call a generator, however, the package also provides a
flexible __foreach__ command that loops through the values of one or more
generators\. This loop construct mimicks the functionality of the built\-in Tcl
__[foreach](\.\./\.\./\.\./\.\./index\.md\#foreach)__ command, including handling
multiple return values and looping over multiple generators at once\. Writing a
generator is also a simple task, much like writing a normal procedure: simply
use the __define__ command to define the generator, and then call
__yield__ instead of __[return](\.\./\.\./\.\./\.\./index\.md\#return)__\. For
example, we can define a generator for looping through the integers in a
particular range:

    generator define range {n m} {
        for {set i $n} {$i <= $m} {incr i} { generator yield $i }
    }
    generator foreach x [range 1 10] {
        puts "x = $x"
    }

The above example will print the numbers from 1 to 10 in sequence, as you would
expect\. The difference from a normal loop over a list is that the numbers are
only generated as they are needed\. If we insert a break into the loop then any
remaining numbers in the sequence would never be generated\. To illustrate, we
can define a generator that produces the sequence of natural numbers: an
infinite series\. A normal procedure would never return trying to produce this
series as a list\. By using a generator we only have to generate those values
which are actually used:

    generator define nats {} {
        while 1 { generator yield [incr nat] }
    }
    generator foreach n [nats] {
        if {$n > 100} { break }
    }

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__generator__ __define__ *name* *params* *body*

    Creates a new generator procedure\. The arguments to the command are
    identical to those for __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__: a
    *name*, a list of parameters, and a body\. The parameter list format is
    identical to a procedure\. In particular, default values and the ?args?
    syntax can be used as usual\. Each time the resulting generator procedure is
    called it creates a new generator command \(coroutine\) that will yield a list
    of values on each call\. Each result from a generator is guaranteed to be a
    non\-empty list of values\. When a generator is exhausted it returns an empty
    list and then destroys itself to free up resources\. It is an error to
    attempt to call an exhausted generator as the command no longer exists\.

  - <a name='2'></a>__generator__ __yield__ *arg* ?*args\.\.*?

    Used in the definition of a generator, this command returns the next set of
    values to the consumer\. Once the __yield__ command has been called the
    generator will suspend to allow the consumer to process that value\. When the
    next value is requested, the generator will resume as if the yield command
    had just returned, and can continue processing to yield the next result\. The
    __yield__ command must be called with at least one argument, but can be
    called with multiple arguments, in which case this is equivalent to calling
    __yield__ once for each argument\.

  - <a name='3'></a>__generator__ __foreach__ *varList* *generator* *varList* *generator* ?\.\.\.? *body*

    Loops through one or more generators, assigning the next values to variables
    and then executing the loop body\. Works much like the built\-in
    __[foreach](\.\./\.\./\.\./\.\./index\.md\#foreach)__ command, but working
    with generators rather than lists\. Multiple generators can be iterated over
    in parallel, and multiple results can be retrieved from a single generator
    at once\. Like the built\-in
    __[foreach](\.\./\.\./\.\./\.\./index\.md\#foreach)__, the loop will continue
    until all of the generators have been exhausted: variables for generators
    that are exhausted early will be set to the empty string\.

    The __foreach__ command will automatically clean\-up all of the
    generators at the end of the loop, regardless of whether the loop terminated
    early or not\. This behaviour is provided as a convenience to avoid having to
    explicitly clean up a generator in the usual cases\. Generators can however
    be destroyed before the end of the loop, in which case the loop will
    continue as normal until all the other generators have been destroyed or
    exhausted\.

    The __foreach__ command does not take a snapshot of the generator\. Any
    changes in the state of the generator made inside the loop or by other code
    will affect the state of the loop\. In particular, if the code in the loop
    invokes the generator to manually retrieve the next element, this element
    will then be excluded from the loop, and the next iteration will continue
    from the element after that one\. Care should be taken to avoid concurrent
    updates to generators unless this behaviour is required \(e\.g\., in argument
    processing\)\.

  - <a name='4'></a>__generator__ __next__ *generator* ?*varName\.\.*?

    Manually retrieves the next values from a generator\. One value is retrieved
    for each variable supplied and assigned to the corresponding variable\. If
    the generator becomes exhausted at any time then any remaining variables are
    set to the empty string\.

  - <a name='5'></a>__generator__ __exists__ *generator*

    Returns 1 if the generator \(still\) exists, or 0 otherwise\.

  - <a name='6'></a>__generator__ __names__

    Returns a list of all currently existing generator commands\.

  - <a name='7'></a>__generator__ __destroy__ ?*generator\.\.*?

    Destroys one or more generators, freeing any associated resources\.

  - <a name='8'></a>__generator__ __finally__ *cmd* ?*arg\.\.*?

    Used in the definition of a generator procedure, this command arranges for a
    resource to be cleaned up whenever the generator is destroyed, either
    explicitly or implicitly when the generator is exhausted\. This command can
    be used like a __finally__ block in the
    __[try](\.\./try/tcllib\_try\.md)__ command, except that it is tied to
    the life\-cycle of the generator rather than to a particular scope\. For
    example, if we create a generator to iterate over the lines in a text file,
    we can use __finally__ to ensure that the file is closed whenever the
    generator is destroyed:

    generator define lines file {
        set in [open $file]
        # Ensure file is always closed
        generator finally close $in
        while {[gets $in line] >= 0} {
            generator yield $line
        }
    }
    generator foreach line [lines /etc/passwd] {
        puts "[incr count]: $line"
        if {$count > 10} { break }
    }
    # File will be closed even on early exit

    If you create a generator that consumes another generator \(such as the
    standard __map__ and __filter__ generators defined later\), then you
    should use a __finally__ command to ensure that this generator is
    destroyed when its parent is\. For example, the __map__ generator is
    defined as follows:

    generator define map {f xs} {
        generator finally generator destroy $xs
        generator foreach x $xs { generator yield [{*}$f $x] }
    }

  - <a name='9'></a>__generator__ __from__ *format* *value*

    Creates a generator from a data structure\. Currently, supported formats are
    __list__, __dict__, or __string__\. The list format yields each
    element in turn\. For dictionaries, each key and value are yielded
    separately\. Finally, strings are yielded a character at a time\.

  - <a name='10'></a>__generator__ __to__ *format* *generator*

    Converts a generator into a data structure\. This is the reverse operation of
    the __from__ command, and supports the same data structures\. The two
    operations obey the following identity laws \(where __=__ is interpreted
    appropriately\):

    [generator to $fmt [generator from $fmt $value]] = $value
    [generator from $fmt [generator to $fmt $gen]]   = $gen

# <a name='section3'></a>PRELUDE

The following commands are provided as a standard library of generator
combinators and functions that perform convenience operations on generators\. The
functions in this section are loosely modelled on the equivalent functions from
the Haskell Prelude\. *Warning:* most of the functions in this prelude destroy
any generator arguments they are passed as a side\-effect\. If you want to have
persistent generators, see the streams library\.

  - <a name='11'></a>__generator__ __map__ *function* *generator*

    Apply a function to every element of a generator, returning a new generator
    of the results\. This is the classic map function from functional
    programming, applied to generators\. For example, we can generate all the
    square numbers using the following code \(where __nats__ is defined as
    earlier\):

    proc square x { expr {$x * $x} }
    generator foreach n [generator map square [nats]] {
        puts "n = $n"
        if {$n > 1000} { break }
    }

  - <a name='12'></a>__generator__ __filter__ *predicate* *generator*

    Another classic functional programming gem\. This command returns a generator
    that yields only those items from the argument generator that satisfy the
    predicate \(boolean function\)\. For example, if we had a generator
    __employees__ that returned a stream of dictionaries representing
    people, we could filter all those whose salaries are above 100,000 dollars
    \(or whichever currency you prefer\) using a simple filter:

    proc salary> {amount person} { expr {[dict get $person salary] > $amount} }
    set fat-cats [generator filter {salary> 100000} $employees]

  - <a name='13'></a>__generator__ __reduce__ *function* *zero* *generator*

    This is the classic left\-fold operation\. This command takes a function, an
    initial value, and a generator of values\. For each element in the generator
    it applies the function to the current accumulator value \(the *zero*
    argument initially\) and that element, and then uses the result as the new
    accumulator value\. This process is repeated through the entire generator
    \(eagerly\) and the final accumulator value is then returned\. If we consider
    the function to be a binary operator, and the zero argument to be the left
    identity element of that operation, then we can consider the __reduce__
    command as *folding* the operator between each successive pair of values
    in the generator in a left\-associative fashion\. For example, the sum of a
    sequence of numbers can be calculated by folding a __\+__ operator
    between them, with 0 as the identity:

    # sum xs          = reduce + 0 xs
    # sum [range 1 5] = reduce + 0 [range 1 5]
    #                 = reduce + [+ 0 1] [range 2 5]
    #                 = reduce + [+ 1 2] [range 3 5]
    #                 = ...
    #                 = reduce + [+ 10 5] <empty>
    #                 = ((((0+1)+2)+3)+4)+5
    #                 = 15
    proc + {a b} { expr {$a + $b} }
    proc sum gen { generator reduce + 0 $gen }
    puts [sum [range 1 10]]

    The __reduce__ operation is an extremely useful one, and a great variety
    of different operations can be defined using it\. For example, we can define
    a factorial function as the product of a range using generators\. This
    definition is both very clear and also quite efficient \(in both memory and
    running time\):

    proc * {x y} { expr {$x * $y} }
    proc prod gen { generator reduce * 0 $gen }
    proc fac n { prod [range 1 $n] }

    However, while the __reduce__ operation is efficient for finite
    generators, care should be taken not to apply it to an infinite generator,
    as this will result in an infinite loop:

    sum [nats]; # Never returns

  - <a name='14'></a>__generator__ __foldl__ *function* *zero* *generator*

    This is an alias for the __reduce__ command\.

  - <a name='15'></a>__generator__ __foldr__ *function* *zero* *generator*

    This is the right\-associative version of __reduce__\. This operation is
    generally inefficient, as the entire generator needs to be evaluated into
    memory \(as a list\) before the reduction can commence\. In an eagerly
    evaluated language like Tcl, this operation has limited use, and should be
    avoided if possible\.

  - <a name='16'></a>__generator__ __all__ *predicate* *generator*

    Returns true if all elements of the generator satisfy the given predicate\.

  - <a name='17'></a>__generator__ __and__ *generator*

    Returns true if all elements of the generator are true \(i\.e\., takes the
    logical conjunction of the elements\)\.

  - <a name='18'></a>__generator__ __any__ *generator*

    Returns true if any of the elements of the generator are true \(i\.e\., logical
    disjunction\)\.

  - <a name='19'></a>__generator__ __concat__ *generator* ?*generator\.\.*?

    Returns a generator which is the concatenation of each of the argument
    generators\.

  - <a name='20'></a>__generator__ __concatMap__ *function* *generator*

    Given a function which maps a value to a series of values, and a generator
    of values of that type, returns a generator of all of the results in one
    flat series\. Equivalent to __concat__ applied to the result of
    __map__\.

  - <a name='21'></a>__generator__ __drop__ *n* *generator*

    Removes the given number of elements from the front of the generator and
    returns the resulting generator with those elements removed\.

  - <a name='22'></a>__generator__ __dropWhile__ *predicate* *generator*

    Removes all elements from the front of the generator that satisfy the
    predicate\.

  - <a name='23'></a>__generator__ __contains__ *element* *generator*

    Returns true if the generator contains the given element\. Note that this
    will destroy the generator\!

  - <a name='24'></a>__generator__ __foldl1__ *function* *generator*

    A version of __foldl__ that takes the *zero* argument from the first
    element of the generator\. Therefore this function is only valid on non\-empty
    generators\.

  - <a name='25'></a>__generator__ __foldli__ *function* *zero* *generator*

    A version of __foldl__ that supplies the integer index of each element
    as the first argument to the function\. The first element in the generator at
    this point is given index 0\.

  - <a name='26'></a>__generator__ __foldri__ *function* *zero* *generator*

    Right\-associative version of __foldli__\.

  - <a name='27'></a>__generator__ __head__ *generator*

    Returns the first element of the generator\.

  - <a name='28'></a>__generator__ __tail__ *generator*

    Removes the first element of the generator, returning the rest\.

  - <a name='29'></a>__generator__ __init__ *generator*

    Returns a new generator consisting of all elements except the last of the
    argument generator\.

  - <a name='30'></a>__generator__ __takeList__ *n* *generator*

    Returns the next *n* elements of the generator as a list\. If not enough
    elements are left in the generator, then just the remaining elements are
    returned\.

  - <a name='31'></a>__generator__ __take__ *n* *generator*

    Returns the next *n* elements of the generator as a new generator\. The old
    generator is destroyed\.

  - <a name='32'></a>__generator__ __iterate__ *function* *init*

    Returns an infinite generator formed by repeatedly applying the function to
    the initial argument\. For example, the Fibonacci numbers can be defined as
    follows:

    proc fst pair { lindex $pair 0 }
    proc snd pair { lindex $pair 1 }
    proc nextFib ab { list [snd $ab] [expr {[fst $ab] + [snd $ab]}] }
    proc fibs {} { generator map fst [generator iterate nextFib {0 1}] }

  - <a name='33'></a>__generator__ __last__ *generator*

    Returns the last element of the generator \(if it exists\)\.

  - <a name='34'></a>__generator__ __length__ *generator*

    Returns the length of the generator, destroying it in the process\.

  - <a name='35'></a>__generator__ __or__ *predicate* *generator*

    Returns 1 if any of the elements of the generator satisfy the predicate\.

  - <a name='36'></a>__generator__ __product__ *generator*

    Returns the product of the numbers in a generator\.

  - <a name='37'></a>__generator__ __repeat__ *n* *value\.\.*

    Returns a generator that consists of *n* copies of the given elements\. The
    special value *Inf* can be used to generate an infinite sequence\.

  - <a name='38'></a>__generator__ __sum__ *generator*

    Returns the sum of the values in the generator\.

  - <a name='39'></a>__generator__ __takeWhile__ *predicate* *generator*

    Returns a generator of the first elements in the argument generator that
    satisfy the predicate\.

  - <a name='40'></a>__generator__ __splitWhen__ *predicate* *generator*

    Splits the generator into lists of elements using the predicate to identify
    delimiters\. The resulting lists are returned as a generator\. Elements
    matching the delimiter predicate are discarded\. For example, to split up a
    generator using the string "&#124;" as a delimiter:

    set xs [generator from list {a | b | c}]
    generator split {string equal "|"} $xs ;# returns a then b then c

  - <a name='41'></a>__generator__ __scanl__ *function* *zero* *generator*

    Similar to __foldl__, but returns a generator of all of the intermediate
    values for the accumulator argument\. The final element of this generator is
    equivalent to __foldl__ called on the same arguments\.

# <a name='section4'></a>BUGS, IDEAS, FEEDBACK

Please report any errors in this document, or in the package it describes, to
[Neil Madden](mailto:nem@cs\.nott\.ac\.uk)\.

# <a name='keywords'></a>KEYWORDS

[control structure](\.\./\.\./\.\./\.\./index\.md\#control\_structure),
[coroutine](\.\./\.\./\.\./\.\./index\.md\#coroutine),
[filter](\.\./\.\./\.\./\.\./index\.md\#filter),
[foldl](\.\./\.\./\.\./\.\./index\.md\#foldl),
[foldr](\.\./\.\./\.\./\.\./index\.md\#foldr),
[foreach](\.\./\.\./\.\./\.\./index\.md\#foreach),
[generator](\.\./\.\./\.\./\.\./index\.md\#generator),
[iterator](\.\./\.\./\.\./\.\./index\.md\#iterator),
[map](\.\./\.\./\.\./\.\./index\.md\#map), [reduce](\.\./\.\./\.\./\.\./index\.md\#reduce),
[scanl](\.\./\.\./\.\./\.\./index\.md\#scanl)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/gpx/gpx.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

[//000000001]: # (gpx \- GPS eXchange Format \(GPX\))
[//000000002]: # (Generated from file 'gpx\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2010, Keith Vetter <kvetter@gmail\.com>)
[//000000004]: # (gpx\(n\) 0\.9 tcllib "GPS eXchange Format \(GPX\)")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

gpx \- Extracts waypoints, tracks and routes from GPX files

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [DATA STRUCTURES](#section3)

  - [EXAMPLE](#section4)

  - [REFERENCES](#section5)

  - [AUTHOR](#section6)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require gpx ?0\.9?  

[__::gpx::Create__ *gpxFilename* ?*rawXML*?](#1)  
[__::gpx::Cleanup__ *token*](#2)  
[__::gpx::GetGPXMetadata__ *token*](#3)  
[__::gpx::GetWaypointCount__ *token*](#4)  
[__::gpx::GetAllWaypoints__ *token*](#5)  
[__::gpx::GetTrackCount__ *token*](#6)  
[__::gpx::GetTrackMetadata__ *token* *whichTrack*](#7)  
[__::gpx::GetTrackPoints__ *token* *whichTrack*](#8)  
[__::gpx::GetRouteCount__ *token*](#9)  
[__::gpx::GetRouteMetadata__ *token* *whichRoute*](#10)  
[__::gpx::GetRoutePoints__ *token* *whichRoute*](#11)  

# <a name='description'></a>DESCRIPTION

This module parses and extracts waypoints, tracks, routes and metadata from a
GPX \(GPS eXchange\) file\. Both GPX version 1\.0 and 1\.1 are supported\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::gpx::Create__ *gpxFilename* ?*rawXML*?

    The __::gpx::Create__ is the first command called to process GPX data\.
    It takes the GPX data from either the *rawXML* parameter if present or
    from the contents of *gpxFilename*, and parses it using *tdom*\. It
    returns a token value that is used by all the other commands\.

  - <a name='2'></a>__::gpx::Cleanup__ *token*

    This procedure cleans up resources associated with *token*\. It is
    *strongly* recommended that you call this function after you are done with
    a given GPX file\. Not doing so will result in memory not being freed, and if
    your app calls __::gpx::Create__ enough times, the memory leak could
    cause a performance hit\.\.\.or worse\.

  - <a name='3'></a>__::gpx::GetGPXMetadata__ *token*

    This procedure returns a dictionary of the metadata associated with the GPX
    data identified by *token*\. The format of the metadata dictionary is
    described below, but keys *version* and *creator* will always be
    present\.

  - <a name='4'></a>__::gpx::GetWaypointCount__ *token*

    This procedure returns the number of waypoints defined in the GPX data
    identified by *token*\.

  - <a name='5'></a>__::gpx::GetAllWaypoints__ *token*

    This procedure returns the a list of waypoints defined in the GPX data
    identified by *token*\. The format of each waypoint item is described
    below\.

  - <a name='6'></a>__::gpx::GetTrackCount__ *token*

    This procedure returns the number of tracks defined in the GPX data
    identified by *token*\.

  - <a name='7'></a>__::gpx::GetTrackMetadata__ *token* *whichTrack*

    This procedure returns a dictionary of the metadata associated track number
    *whichTrack* \(1 based\) in the GPX data identified by *token*\. The format
    of the metadata dictionary is described below\.

  - <a name='8'></a>__::gpx::GetTrackPoints__ *token* *whichTrack*

    The procedure returns a list of track points comprising track number
    *whichTrack* \(1 based\) in the GPX data identified by *token*\. The format
    of the metadata dictionary is described below\.

  - <a name='9'></a>__::gpx::GetRouteCount__ *token*

    This procedure returns the number of routes defined in the GPX data
    identified by *token*\.

  - <a name='10'></a>__::gpx::GetRouteMetadata__ *token* *whichRoute*

    This procedure returns a dictionary of the metadata associated route number
    *whichRoute* \(1 based\) in the GPX data identified by *token*\. The format
    of the metadata dictionary is described below\.

  - <a name='11'></a>__::gpx::GetRoutePoints__ *token* *whichRoute*

    The procedure returns a list of route points comprising route number
    *whichRoute* \(1 based\) in the GPX data identified by *token*\. The format
    of the metadata dictionary is described below\.

# <a name='section3'></a>DATA STRUCTURES

  - metadata dictionary

    The metadata associated with either the GPX document, a track, a route, a
    waypoint, a track point or route point is returned in a dictionary\. The keys
    of that dictionary will be whatever optional GPX elements are present\. The
    value for each key depends on the GPX schema for that element\. For example,
    the value for a version key will be a string, while for a link key will be a
    sub\-dictionary with keys *href* and optionally *text* and *type*\.

  - point item

    Each item in a track or route list of points consists of a list of three
    elements: *latitude*, *longitude* and *metadata dictionary*\.
    *Latitude* and *longitude* are decimal numbers\. The *metadata
    dictionary* format is described above\. For points in a track, typically
    there will always be ele \(elevation\) and time metadata keys\.

# <a name='section4'></a>EXAMPLE

    % set token [::gpx::Create myGpxFile.gpx]
    % set version [dict get [::gpx::GetGPXMetadata $token] version]
    % set trackCnt [::gpx::GetTrackCount $token]
    % set firstPoint [lindex [::gpx::GetTrackPoints $token 1] 0]
    % lassign $firstPoint lat lon ptMetadata
    % puts "first point in the first track is at $lat, $lon"
    % if {[dict exists $ptMetadata ele]} {
         puts "at elevation [dict get $ptMetadata ele] meters"
      }
    % ::gpx::Cleanup $token

# <a name='section5'></a>REFERENCES

  1. GPX: the GPS Exchange Format
     \([http://www\.topografix\.com/gpx\.asp](http://www\.topografix\.com/gpx\.asp)\)

  1. GPX 1\.1 Schema Documentation
     \([http://www\.topografix\.com/GPX/1/1/](http://www\.topografix\.com/GPX/1/1/)\)

  1. GPX 1\.0 Developer's Manual
     \([http://www\.topografix\.com/gpx\_manual\.asp](http://www\.topografix\.com/gpx\_manual\.asp)\)

# <a name='section6'></a>AUTHOR

Keith Vetter

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *gpx* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[gps](\.\./\.\./\.\./\.\./index\.md\#gps), [gpx](\.\./\.\./\.\./\.\./index\.md\#gpx)

# <a name='category'></a>CATEGORY

File formats

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2010, Keith Vetter <kvetter@gmail\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_aycock/aycock.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

[//000000001]: # (grammar::aycock \- Aycock\-Horspool\-Earley parser generator for Tcl)
[//000000002]: # (Generated from file 'aycock\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 by Kevin B\. Kenny <kennykb@acm\.org>)
[//000000004]: # (Redistribution permitted under the terms of the Open Publication License <http://www\.opencontent\.org/openpub/>)
[//000000005]: # (grammar::aycock\(n\) 1\.0 tcllib "Aycock\-Horspool\-Earley parser generator for Tcl")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::aycock \- Aycock\-Horspool\-Earley parser generator for Tcl

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [OBJECT COMMAND](#section3)

  - [DESCRIPTION](#section4)

  - [EXAMPLE](#section5)

  - [KEYWORDS](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require grammar::aycock ?1\.0?  

[__::aycock::parser__ *grammar* ?__\-verbose__?](#1)  
[*parserName* __parse__ *symList* *valList* ?*clientData*?](#2)  
[*parserName* __destroy__](#3)  
[*parserName* __terminals__](#4)  
[*parserName* __nonterminals__](#5)  
[*parserName* __save__](#6)  

# <a name='description'></a>DESCRIPTION

The __grammar::aycock__ package implements a parser generator for the class
of parsers described in John Aycock and R\. Nigel Horspool\. Practical Earley
Parsing\. *The Computer Journal,* *45*\(6\):620\-630, 2002\.
[http://citeseerx\.ist\.psu\.edu/viewdoc/summary?doi=10\.1\.1\.12\.4254](http://citeseerx\.ist\.psu\.edu/viewdoc/summary?doi=10\.1\.1\.12\.4254)

# <a name='section2'></a>PROCEDURES

The __grammar::aycock__ package exports the single procedure:

  - <a name='1'></a>__::aycock::parser__ *grammar* ?__\-verbose__?

    Generates a parser for the given *grammar*, and returns its name\. If the
    optional __\-verbose__ flag is given, dumps verbose information relating
    to the generated parser to the standard output\. The returned parser is an
    object that accepts commands as shown in [OBJECT COMMAND](#section3)
    below\.

# <a name='section3'></a>OBJECT COMMAND

  - <a name='2'></a>*parserName* __parse__ *symList* *valList* ?*clientData*?

    Invokes a parser returned from __::aycock::parser__\. *symList* is a
    list of grammar symbols representing the terminals in an input string, and
    *valList* is a list of their semantic values\. The result is the semantic
    value of the entire string when parsed\.

  - <a name='3'></a>*parserName* __destroy__

    Destroys a parser constructed by __::aycock::parser__\.

  - <a name='4'></a>*parserName* __terminals__

    Returns a list of terminal symbols that may be presented in the *symList*
    argument to the __parse__ object command\.

  - <a name='5'></a>*parserName* __nonterminals__

    Returns a list of nonterminal symbols that were defined in the parser's
    grammar\.

  - <a name='6'></a>*parserName* __save__

    Returns a Tcl script that will reconstruct the parser without needing all
    the mechanism of the parser generator at run time\. The reconstructed parser
    depends on a set of commands in the package
    __grammar::aycock::runtime__, which is also automatically loaded when
    the __grammar::aycock__ package is loaded\.

# <a name='section4'></a>DESCRIPTION

The __grammar::aycock::parser__ command accepts a grammar expressed as a Tcl
list\. The list must be structured as the concatenation of a set of *rule*s\.
Each *rule* comprises a variable number of elements in the list:

  - The name of the nonterminal symbol that the rule reduces\.

  - The literal string, __::=__

  - Zero or more names of terminal or nonterminal symbols that comprise the
    right\-hand\-side of the rule\.

  - Finally, a Tcl script to execute when the rule is reduced\. Within the given
    script, a variable called __\___ contains a list of the semantic values
    of the symbols on the right\-hand side\. The value returned by the script is
    expected to be the semantic value of the left\-hand side\. If the
    *clientData* parameter was passed to the __parse__ method, it is
    available in a variable called __clientData__\. It is permissible for the
    script to be the empty string\. In this case, the semantic value of the rule
    will be the same as the semantic value of the first symbol on the right\-hand
    side\. If the right\-hand side is also empty, the semantic value will be the
    empty string\.

Parsing is done with an Earley parser, which is not terribly efficient in speed
or memory consumption, but which deals effectively with ambiguous grammars\. For
this reason, the __grammar::aycock__ package is perhaps best adapted to
natural\-language processing or the parsing of extraordinarily complex languages
in which ambiguity can be tolerated\.

# <a name='section5'></a>EXAMPLE

The following code demonstrates a trivial desk calculator, admitting only
__\+__, __\*__ and parentheses as its operators\. It also shows the format
in which the lexical analyzer is expected to present terminal symbols to the
parser\.

    set p [aycock::parser {
        start ::= E {}
        E ::= E + T {expr {[lindex $_ 0] + [lindex $_ 2]}}
        E ::= T {}
        T ::= T * F {expr {[lindex $_ 0] * [lindex $_ 2]}}
        T ::= F {}
        F ::= NUMBER {}
        F ::= ( E ) {lindex $_ 1}
    }]
    puts [$p parse {(  NUMBER +  NUMBER )  *  ( NUMBER +  NUMBER ) }  {{} 2      {} 3      {} {} {} 7     {} 1      {}}]
    $p destroy

The example, when run, prints __40__\.

# <a name='section6'></a>KEYWORDS

Aycock, Earley, Horspool, parser, compiler

# <a name='keywords'></a>KEYWORDS

[ambiguous](\.\./\.\./\.\./\.\./index\.md\#ambiguous),
[aycock](\.\./\.\./\.\./\.\./index\.md\#aycock),
[earley](\.\./\.\./\.\./\.\./index\.md\#earley),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[horspool](\.\./\.\./\.\./\.\./index\.md\#horspool),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 by Kevin B\. Kenny <kennykb@acm\.org>
Redistribution permitted under the terms of the Open Publication License <http://www\.opencontent\.org/openpub/>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_fa/dacceptor.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141

[//000000001]: # (grammar::fa::dacceptor \- Finite automaton operations and usage)
[//000000002]: # (Generated from file 'dacceptor\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::fa::dacceptor\(n\) 0\.1\.1 tcllib "Finite automaton operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::fa::dacceptor \- Create and use deterministic acceptors

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [ACCEPTOR METHODS](#section3)

  - [EXAMPLES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit  
package require struct::set  
package require grammar::fa::dacceptor ?0\.1\.1?  

[__::grammar::fa::dacceptor__ *daName* *fa* ?__\-any__ *any*?](#1)  
[__daName__ *option* ?*arg arg \.\.\.*?](#2)  
[*daName* __destroy__](#3)  
[*daName* __accept?__ *symbols*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a class for acceptors constructed from deterministic
*finite automatons* \(DFA\)\. Acceptors are objects which can be given a string
of symbols and tell if the DFA they are constructed from would *accept* that
string\. For the actual creation of the DFAs the acceptors are based on we have
the packages __[grammar::fa](fa\.md)__ and
__[grammar::fa::op](faop\.md)__\.

# <a name='section2'></a>API

The package exports the API described here\.

  - <a name='1'></a>__::grammar::fa::dacceptor__ *daName* *fa* ?__\-any__ *any*?

    Creates a new deterministic acceptor with an associated global Tcl command
    whose name is *daName*\. This command may be used to invoke various
    operations on the acceptor\. It has the following general form:

      * <a name='2'></a>__daName__ *option* ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.
        See section [ACCEPTOR METHODS](#section3) for more explanations\.

        The acceptor will be based on the deterministic finite automaton stored
        in the object *fa*\. It will keep a copy of the relevant data of the FA
        in its own storage, in a form easy to use for its purposes\. This also
        means that changes made to the *fa* after the construction of the
        acceptor *will not* influence the acceptor\.

        If *any* has been specified, then the acceptor will convert all
        symbols in the input which are unknown to the base FA to that symbol
        before proceeding with the processing\.

# <a name='section3'></a>ACCEPTOR METHODS

All acceptors provide the following methods for their manipulation:

  - <a name='3'></a>*daName* __destroy__

    Destroys the automaton, including its storage space and associated command\.

  - <a name='4'></a>*daName* __accept?__ *symbols*

    Takes the list of *symbols* and checks if the FA the acceptor is based on
    would accept it\. The result is a boolean value\. __True__ is returned if
    the symbols are accepted, and __False__ otherwise\. Note that bogus
    symbols in the input are either translated to the *any* symbol \(if
    specified\), or cause the acceptance test to simply fail\. No errors will be
    thrown\. The method will process only just that prefix of the input which is
    enough to fully determine \(non\-\)acceptance\.

# <a name='section4'></a>EXAMPLES

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_fa* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[acceptance](\.\./\.\./\.\./\.\./index\.md\#acceptance),
[acceptor](\.\./\.\./\.\./\.\./index\.md\#acceptor),
[automaton](\.\./\.\./\.\./\.\./index\.md\#automaton), [finite
automaton](\.\./\.\./\.\./\.\./index\.md\#finite\_automaton),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [regular
expression](\.\./\.\./\.\./\.\./index\.md\#regular\_expression), [regular
grammar](\.\./\.\./\.\./\.\./index\.md\#regular\_grammar), [regular
languages](\.\./\.\./\.\./\.\./index\.md\#regular\_languages),
[state](\.\./\.\./\.\./\.\./index\.md\#state),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_fa/dexec.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

[//000000001]: # (grammar::fa::dexec \- Finite automaton operations and usage)
[//000000002]: # (Generated from file 'dexec\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2007 Bogdan <rftghost@users\.sourceforge\.net>)
[//000000005]: # (grammar::fa::dexec\(n\) 0\.2 tcllib "Finite automaton operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::fa::dexec \- Execute deterministic finite automatons

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [EXECUTOR METHODS](#section3)

  - [EXECUTOR CALLBACK](#section4)

  - [EXAMPLES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit  
package require grammar::fa::dexec ?0\.2?  

[__::grammar::fa::dexec__ *daName* *fa* ?__\-any__ *any*? ?__\-command__ *cmdprefix*?](#1)  
[__daName__ *option* ?*arg arg \.\.\.*?](#2)  
[*daName* __destroy__](#3)  
[*daName* __put__ *symbol*](#4)  
[*daName* __reset__](#5)  
[*daName* __state__](#6)  
[*cmdprefix* __error__ *code* *message*](#7)  
[*cmdprefix* __final__ *stateid*](#8)  
[*cmdprefix* __reset__](#9)  
[*cmdprefix* __state__ *stateid*](#10)  

# <a name='description'></a>DESCRIPTION

This package provides a class for executors constructed from deterministic
*finite automatons* \(DFA\)\. Executors are objects which are given a string of
symbols in a piecemal fashion, perform state transitions and report back when
they enter a final state, or find an error in the input\. For the actual creation
of the DFAs the executors are based on we have the packages
__[grammar::fa](fa\.md)__ and __[grammar::fa::op](faop\.md)__\.

The objects follow a push model\. Symbols are pushed into the executor, and when
something important happens, i\.e\. error occurs, a state transition, or a final
state is entered this will be reported via the callback specified via the option
__\-command__\. Note that conversion of this into a pull model where the
environment retrieves messages from the object and the object uses a callback to
ask for more symbols is a trivial thing\.

*Side note*: The acceptor objects provided by
__[grammar::fa::dacceptor](dacceptor\.md)__ could have been implemented
on top of the executors provided here, but were not, to get a bit more
performance \(we avoid a number of method calls and the time required for their
dispatch\)\.

# <a name='section2'></a>API

The package exports the API described here\.

  - <a name='1'></a>__::grammar::fa::dexec__ *daName* *fa* ?__\-any__ *any*? ?__\-command__ *cmdprefix*?

    Creates a new deterministic executor with an associated global Tcl command
    whose name is *daName*\. This command may be used to invoke various
    operations on the executor\. It has the following general form:

      * <a name='2'></a>__daName__ *option* ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.
        See section [EXECUTOR METHODS](#section3) for more explanations\.

        The executor will be based on the deterministic finite automaton stored
        in the object *fa*\. It will keep a copy of the relevant data of the FA
        in its own storage, in a form easy to use for its purposes\. This also
        means that changes made to the *fa* after the construction of the
        executor *will not* influence the executor\.

        If *any* has been specified, then the executor will convert all
        symbols in the input which are unknown to the base FA to that symbol
        before proceeding with the processing\.

# <a name='section3'></a>EXECUTOR METHODS

All executors provide the following methods for their manipulation:

  - <a name='3'></a>*daName* __destroy__

    Destroys the automaton, including its storage space and associated command\.

  - <a name='4'></a>*daName* __put__ *symbol*

    Takes the current state of the executor and the *symbol* and performs the
    appropriate state transition\. Reports any errors encountered via the command
    callback, as well as entering a final state of the underlying FA\.

    When an error is reported all further invokations of __put__ will do
    nothing, until the error condition has been cleared via an invokation of
    method __reset__\.

  - <a name='5'></a>*daName* __reset__

    Unconditionally sets the executor into the start state of the underlying FA\.
    This also clears any error condition __put__ may have encountered\.

  - <a name='6'></a>*daName* __state__

    Returns the current state of the underlying FA\. This allow for introspection
    without the need to pass data from the callback command\.

# <a name='section4'></a>EXECUTOR CALLBACK

The callback command *cmdprefix* given to an executor via the option
__\-command__ will be executed by the object at the global level, using the
syntax described below\. Note that *cmdprefix* is not simply the name of a
command, but a full command prefix\. In other words it may contain additional
fixed argument words beyond the command word\.

  - <a name='7'></a>*cmdprefix* __error__ *code* *message*

    The executor has encountered an error, and *message* contains a
    human\-readable text explaining the nature of the problem\. The *code* on
    the other hand is a fixed machine\-readable text\. The following error codes
    can be generated by executor objects\.

      * __BADSYM__

        An unknown symbol was found in the input\. This can happen if and only if
        no __\-any__ symbol was specified\.

      * __BADTRANS__

        The underlying FA has no transition for the current combination of input
        symbol and state\. In other words, the executor was not able to compute a
        new state for this combination\.

  - <a name='8'></a>*cmdprefix* __final__ *stateid*

    The executor has entered the final state *stateid*\.

  - <a name='9'></a>*cmdprefix* __reset__

    The executor was reset\.

  - <a name='10'></a>*cmdprefix* __state__ *stateid*

    The FA changed state due to a transition\. *stateid* is the new state\.

# <a name='section5'></a>EXAMPLES

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_fa* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[automaton](\.\./\.\./\.\./\.\./index\.md\#automaton),
[execution](\.\./\.\./\.\./\.\./index\.md\#execution), [finite
automaton](\.\./\.\./\.\./\.\./index\.md\#finite\_automaton),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [regular
expression](\.\./\.\./\.\./\.\./index\.md\#regular\_expression), [regular
grammar](\.\./\.\./\.\./\.\./index\.md\#regular\_grammar), [regular
languages](\.\./\.\./\.\./\.\./index\.md\#regular\_languages),
[running](\.\./\.\./\.\./\.\./index\.md\#running),
[state](\.\./\.\./\.\./\.\./index\.md\#state),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>  
Copyright &copy; 2007 Bogdan <rftghost@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_fa/fa.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634

[//000000001]: # (grammar::fa \- Finite automaton operations and usage)
[//000000002]: # (Generated from file 'fa\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::fa\(n\) 0\.4 tcllib "Finite automaton operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::fa \- Create and manipulate finite automatons

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [FA METHODS](#section3)

  - [EXAMPLES](#section4)

  - [FINITE AUTOMATONS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit 1\.3  
package require struct::list  
package require struct::set  
package require grammar::fa::op ?0\.2?  
package require grammar::fa ?0\.4?  

[__::grammar::fa__ *faName* ?__=__&#124;__:=__&#124;__<\-\-__&#124;__as__&#124;__deserialize__ *src*&#124;__fromRegex__ *re* ?*over*??](#1)  
[__faName__ *option* ?*arg arg \.\.\.*?](#2)  
[*faName* __destroy__](#3)  
[*faName* __clear__](#4)  
[*faName* __=__ *srcFA*](#5)  
[*faName* __\-\->__ *dstFA*](#6)  
[*faName* __serialize__](#7)  
[*faName* __deserialize__ *serialization*](#8)  
[*faName* __states__](#9)  
[*faName* __state__ __add__ *s1* ?*s2* \.\.\.?](#10)  
[*faName* __state__ __delete__ *s1* ?*s2* \.\.\.?](#11)  
[*faName* __state__ __exists__ *s*](#12)  
[*faName* __state__ __rename__ *s* *snew*](#13)  
[*faName* __startstates__](#14)  
[*faName* __start__ __add__ *s1* ?*s2* \.\.\.?](#15)  
[*faName* __start__ __remove__ *s1* ?*s2* \.\.\.?](#16)  
[*faName* __start?__ *s*](#17)  
[*faName* __start?set__ *stateset*](#18)  
[*faName* __finalstates__](#19)  
[*faName* __final__ __add__ *s1* ?*s2* \.\.\.?](#20)  
[*faName* __final__ __remove__ *s1* ?*s2* \.\.\.?](#21)  
[*faName* __final?__ *s*](#22)  
[*faName* __final?set__ *stateset*](#23)  
[*faName* __symbols__](#24)  
[*faName* __symbols@__ *s* ?*d*?](#25)  
[*faName* __symbols@set__ *stateset*](#26)  
[*faName* __symbol__ __add__ *sym1* ?*sym2* \.\.\.?](#27)  
[*faName* __symbol__ __delete__ *sym1* ?*sym2* \.\.\.?](#28)  
[*faName* __symbol__ __rename__ *sym* *newsym*](#29)  
[*faName* __symbol__ __exists__ *sym*](#30)  
[*faName* __next__ *s* *sym* ?__\-\->__ *next*?](#31)  
[*faName* __\!next__ *s* *sym* ?__\-\->__ *next*?](#32)  
[*faName* __nextset__ *stateset* *sym*](#33)  
[*faName* __is__ __deterministic__](#34)  
[*faName* __is__ __complete__](#35)  
[*faName* __is__ __useful__](#36)  
[*faName* __is__ __epsilon\-free__](#37)  
[*faName* __reachable\_states__](#38)  
[*faName* __unreachable\_states__](#39)  
[*faName* __reachable__ *s*](#40)  
[*faName* __useful\_states__](#41)  
[*faName* __unuseful\_states__](#42)  
[*faName* __useful__ *s*](#43)  
[*faName* __epsilon\_closure__ *s*](#44)  
[*faName* __reverse__](#45)  
[*faName* __complete__](#46)  
[*faName* __remove\_eps__](#47)  
[*faName* __trim__ ?*what*?](#48)  
[*faName* __determinize__ ?*mapvar*?](#49)  
[*faName* __minimize__ ?*mapvar*?](#50)  
[*faName* __complement__](#51)  
[*faName* __kleene__](#52)  
[*faName* __optional__](#53)  
[*faName* __union__ *fa* ?*mapvar*?](#54)  
[*faName* __intersect__ *fa* ?*mapvar*?](#55)  
[*faName* __difference__ *fa* ?*mapvar*?](#56)  
[*faName* __concatenate__ *fa* ?*mapvar*?](#57)  
[*faName* __fromRegex__ *regex* ?*over*?](#58)  

# <a name='description'></a>DESCRIPTION

This package provides a container class for *finite automatons* \(Short: FA\)\.
It allows the incremental definition of the automaton, its manipulation and
querying of the definition\. While the package provides complex operations on the
automaton \(via package __[grammar::fa::op](faop\.md)__\), it does not have
the ability to execute a definition for a stream of symbols\. Use the packages
__[grammar::fa::dacceptor](dacceptor\.md)__ and
__[grammar::fa::dexec](dexec\.md)__ for that\. Another package related to
this is __grammar::fa::compiler__\. It turns a FA into an executor class
which has the definition of the FA hardwired into it\. The output of this package
is configurable to suit a large number of different implementation languages and
paradigms\.

For more information about what a finite automaton is see section [FINITE
AUTOMATONS](#section5)\.

# <a name='section2'></a>API

The package exports the API described here\.

  - <a name='1'></a>__::grammar::fa__ *faName* ?__=__&#124;__:=__&#124;__<\-\-__&#124;__as__&#124;__deserialize__ *src*&#124;__fromRegex__ *re* ?*over*??

    Creates a new finite automaton with an associated global Tcl command whose
    name is *faName*\. This command may be used to invoke various operations on
    the automaton\. It has the following general form:

      * <a name='2'></a>__faName__ *option* ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.
        See section [FA METHODS](#section3) for more explanations\. The new
        automaton will be empty if no *src* is specified\. Otherwise it will
        contain a copy of the definition contained in the *src*\. The *src*
        has to be a FA object reference for all operators except
        __deserialize__ and __fromRegex__\. The __deserialize__
        operator requires *src* to be the serialization of a FA instead, and
        __fromRegex__ takes a regular expression in the form a of a syntax
        tree\. See __::grammar::fa::op::fromRegex__ for more detail on that\.

# <a name='section3'></a>FA METHODS

All automatons provide the following methods for their manipulation:

  - <a name='3'></a>*faName* __destroy__

    Destroys the automaton, including its storage space and associated command\.

  - <a name='4'></a>*faName* __clear__

    Clears out the definition of the automaton contained in *faName*, but does
    *not* destroy the object\.

  - <a name='5'></a>*faName* __=__ *srcFA*

    Assigns the contents of the automaton contained in *srcFA* to *faName*,
    overwriting any existing definition\. This is the assignment operator for
    automatons\. It copies the automaton contained in the FA object *srcFA*
    over the automaton definition in *faName*\. The old contents of *faName*
    are deleted by this operation\.

    This operation is in effect equivalent to

    > *faName* __deserialize__ \[*srcFA* __serialize__\]

  - <a name='6'></a>*faName* __\-\->__ *dstFA*

    This is the reverse assignment operator for automatons\. It copies the
    automation contained in the object *faName* over the automaton definition
    in the object *dstFA*\. The old contents of *dstFA* are deleted by this
    operation\.

    This operation is in effect equivalent to

    > *dstFA* __deserialize__ \[*faName* __serialize__\]

  - <a name='7'></a>*faName* __serialize__

    This method serializes the automaton stored in *faName*\. In other words it
    returns a tcl *value* completely describing that automaton\. This allows,
    for example, the transfer of automatons over arbitrary channels,
    persistence, etc\. This method is also the basis for both the copy
    constructor and the assignment operator\.

    The result of this method has to be semantically identical over all
    implementations of the __grammar::fa__ interface\. This is what will
    enable us to copy automatons between different implementations of the same
    interface\.

    The result is a list of three elements with the following structure:

      1. The constant string __grammar::fa__\.

      1. A list containing the names of all known input symbols\. The order of
         elements in this list is not relevant\.

      1. The last item in the list is a dictionary, however the order of the
         keys is important as well\. The keys are the states of the serialized
         FA, and their order is the order in which to create the states when
         deserializing\. This is relevant to preserve the order relationship
         between states\.

         The value of each dictionary entry is a list of three elements
         describing the state in more detail\.

           1) A boolean flag\. If its value is __true__ then the state is a
              start state, otherwise it is not\.

           1) A boolean flag\. If its value is __true__ then the state is a
              final state, otherwise it is not\.

           1) The last element is a dictionary describing the transitions for
              the state\. The keys are symbols \(or the empty string\), and the
              values are sets of successor states\.

    Assuming the following FA \(which describes the life of a truck driver in a
    very simple way :\)

        Drive -- yellow --> Brake -- red --> (Stop) -- red/yellow --> Attention -- green --> Drive
        (...) is the start state.

    a possible serialization is

        grammar::fa \
        {yellow red green red/yellow} \
        {Drive     {0 0 {yellow     Brake}} \
         Brake     {0 0 {red        Stop}} \
         Stop      {1 0 {red/yellow Attention}} \
         Attention {0 0 {green      Drive}}}

    A possible one, because I did not care about creation order here

  - <a name='8'></a>*faName* __deserialize__ *serialization*

    This is the complement to __serialize__\. It replaces the automaton
    definition in *faName* with the automaton described by the
    *serialization* value\. The old contents of *faName* are deleted by this
    operation\.

  - <a name='9'></a>*faName* __states__

    Returns the set of all states known to *faName*\.

  - <a name='10'></a>*faName* __state__ __add__ *s1* ?*s2* \.\.\.?

    Adds the states *s1*, *s2*, et cetera to the FA definition in
    *faName*\. The operation will fail any of the new states is already
    declared\.

  - <a name='11'></a>*faName* __state__ __delete__ *s1* ?*s2* \.\.\.?

    Deletes the state *s1*, *s2*, et cetera, and all associated information
    from the FA definition in *faName*\. The latter means that the information
    about in\- or outbound transitions is deleted as well\. If the deleted state
    was a start or final state then this information is invalidated as well\. The
    operation will fail if the state *s* is not known to the FA\.

  - <a name='12'></a>*faName* __state__ __exists__ *s*

    A predicate\. It tests whether the state *s* is known to the FA in
    *faName*\. The result is a boolean value\. It will be set to __true__ if
    the state *s* is known, and __false__ otherwise\.

  - <a name='13'></a>*faName* __state__ __rename__ *s* *snew*

    Renames the state *s* to *snew*\. Fails if *s* is not a known state\.
    Also fails if *snew* is already known as a state\.

  - <a name='14'></a>*faName* __startstates__

    Returns the set of states which are marked as *start* states, also known
    as *initial* states\. See [FINITE AUTOMATONS](#section5) for
    explanations what this means\.

  - <a name='15'></a>*faName* __start__ __add__ *s1* ?*s2* \.\.\.?

    Mark the states *s1*, *s2*, et cetera in the FA *faName* as *start*
    \(aka *initial*\)\.

  - <a name='16'></a>*faName* __start__ __remove__ *s1* ?*s2* \.\.\.?

    Mark the states *s1*, *s2*, et cetera in the FA *faName* as *not
    start* \(aka *not accepting*\)\.

  - <a name='17'></a>*faName* __start?__ *s*

    A predicate\. It tests if the state *s* in the FA *faName* is *start*
    or not\. The result is a boolean value\. It will be set to __true__ if the
    state *s* is *start*, and __false__ otherwise\.

  - <a name='18'></a>*faName* __start?set__ *stateset*

    A predicate\. It tests if the set of states *stateset* contains at least
    one start state\. They operation will fail if the set contains an element
    which is not a known state\. The result is a boolean value\. It will be set to
    __true__ if a start state is present in *stateset*, and __false__
    otherwise\.

  - <a name='19'></a>*faName* __finalstates__

    Returns the set of states which are marked as
    *[final](\.\./\.\./\.\./\.\./index\.md\#final)* states, also known as
    *accepting* states\. See [FINITE AUTOMATONS](#section5) for
    explanations what this means\.

  - <a name='20'></a>*faName* __final__ __add__ *s1* ?*s2* \.\.\.?

    Mark the states *s1*, *s2*, et cetera in the FA *faName* as
    *[final](\.\./\.\./\.\./\.\./index\.md\#final)* \(aka *accepting*\)\.

  - <a name='21'></a>*faName* __final__ __remove__ *s1* ?*s2* \.\.\.?

    Mark the states *s1*, *s2*, et cetera in the FA *faName* as *not
    final* \(aka *not accepting*\)\.

  - <a name='22'></a>*faName* __final?__ *s*

    A predicate\. It tests if the state *s* in the FA *faName* is
    *[final](\.\./\.\./\.\./\.\./index\.md\#final)* or not\. The result is a boolean
    value\. It will be set to __true__ if the state *s* is
    *[final](\.\./\.\./\.\./\.\./index\.md\#final)*, and __false__ otherwise\.

  - <a name='23'></a>*faName* __final?set__ *stateset*

    A predicate\. It tests if the set of states *stateset* contains at least
    one final state\. They operation will fail if the set contains an element
    which is not a known state\. The result is a boolean value\. It will be set to
    __true__ if a final state is present in *stateset*, and __false__
    otherwise\.

  - <a name='24'></a>*faName* __symbols__

    Returns the set of all symbols known to the FA *faName*\.

  - <a name='25'></a>*faName* __symbols@__ *s* ?*d*?

    Returns the set of all symbols for which the state *s* has transitions\. If
    the empty symbol is present then *s* has epsilon transitions\. If two
    states are specified the result is the set of symbols which have transitions
    from *s* to *t*\. This set may be empty if there are no transitions
    between the two specified states\.

  - <a name='26'></a>*faName* __symbols@set__ *stateset*

    Returns the set of all symbols for which at least one state in the set of
    states *stateset* has transitions\. In other words, the union of
    \[*faName* __symbols@__ __s__\] for all states __s__ in
    *stateset*\. If the empty symbol is present then at least one state
    contained in *stateset* has epsilon transitions\.

  - <a name='27'></a>*faName* __symbol__ __add__ *sym1* ?*sym2* \.\.\.?

    Adds the symbols *sym1*, *sym2*, et cetera to the FA definition in
    *faName*\. The operation will fail any of the symbols is already declared\.
    The empty string is not allowed as a value for the symbols\.

  - <a name='28'></a>*faName* __symbol__ __delete__ *sym1* ?*sym2* \.\.\.?

    Deletes the symbols *sym1*, *sym2* et cetera, and all associated
    information from the FA definition in *faName*\. The latter means that all
    transitions using the symbols are deleted as well\. The operation will fail
    if any of the symbols is not known to the FA\.

  - <a name='29'></a>*faName* __symbol__ __rename__ *sym* *newsym*

    Renames the symbol *sym* to *newsym*\. Fails if *sym* is not a known
    symbol\. Also fails if *newsym* is already known as a symbol\.

  - <a name='30'></a>*faName* __symbol__ __exists__ *sym*

    A predicate\. It tests whether the symbol *sym* is known to the FA in
    *faName*\. The result is a boolean value\. It will be set to __true__ if
    the symbol *sym* is known, and __false__ otherwise\.

  - <a name='31'></a>*faName* __next__ *s* *sym* ?__\-\->__ *next*?

    Define or query transition information\.

    If *next* is specified, then the method will add a transition from the
    state *s* to the *successor* state *next* labeled with the symbol
    *sym* to the FA contained in *faName*\. The operation will fail if *s*,
    or *next* are not known states, or if *sym* is not a known symbol\. An
    exception to the latter is that *sym* is allowed to be the empty string\.
    In that case the new transition is an *epsilon transition* which will not
    consume input when traversed\. The operation will also fail if the
    combination of \(*s*, *sym*, and *next*\) is already present in the FA\.

    If *next* was not specified, then the method will return the set of states
    which can be reached from *s* through a single transition labeled with
    symbol *sym*\.

  - <a name='32'></a>*faName* __\!next__ *s* *sym* ?__\-\->__ *next*?

    Remove one or more transitions from the Fa in *faName*\.

    If *next* was specified then the single transition from the state *s* to
    the state *next* labeled with the symbol *sym* is removed from the FA\.
    Otherwise *all* transitions originating in state *s* and labeled with
    the symbol *sym* will be removed\.

    The operation will fail if *s* and/or *next* are not known as states\. It
    will also fail if a non\-empty *sym* is not known as symbol\. The empty
    string is acceptable, and allows the removal of epsilon transitions\.

  - <a name='33'></a>*faName* __nextset__ *stateset* *sym*

    Returns the set of states which can be reached by a single transition
    originating in a state in the set *stateset* and labeled with the symbol
    *sym*\.

    In other words, this is the union of \[*faName* next __s__ *symbol*\]
    for all states __s__ in *stateset*\.

  - <a name='34'></a>*faName* __is__ __deterministic__

    A predicate\. It tests whether the FA in *faName* is a deterministic FA or
    not\. The result is a boolean value\. It will be set to __true__ if the FA
    is deterministic, and __false__ otherwise\.

  - <a name='35'></a>*faName* __is__ __complete__

    A predicate\. It tests whether the FA in *faName* is a complete FA or not\.
    A FA is complete if it has at least one transition per state and symbol\.
    This also means that a FA without symbols, or states is also complete\. The
    result is a boolean value\. It will be set to __true__ if the FA is
    deterministic, and __false__ otherwise\.

    Note: When a FA has epsilon\-transitions transitions over a symbol for a
    state S can be indirect, i\.e\. not attached directly to S, but to a state in
    the epsilon\-closure of S\. The symbols for such indirect transitions count
    when computing completeness\.

  - <a name='36'></a>*faName* __is__ __useful__

    A predicate\. It tests whether the FA in *faName* is an useful FA or not\. A
    FA is useful if all states are *reachable* and *useful*\. The result is a
    boolean value\. It will be set to __true__ if the FA is deterministic,
    and __false__ otherwise\.

  - <a name='37'></a>*faName* __is__ __epsilon\-free__

    A predicate\. It tests whether the FA in *faName* is an epsilon\-free FA or
    not\. A FA is epsilon\-free if it has no epsilon transitions\. This definition
    means that all deterministic FAs are epsilon\-free as well, and
    epsilon\-freeness is a necessary pre\-condition for deterministic'ness\. The
    result is a boolean value\. It will be set to __true__ if the FA is
    deterministic, and __false__ otherwise\.

  - <a name='38'></a>*faName* __reachable\_states__

    Returns the set of states which are reachable from a start state by one or
    more transitions\.

  - <a name='39'></a>*faName* __unreachable\_states__

    Returns the set of states which are not reachable from any start state by
    any number of transitions\. This is

        [faName states] - [faName reachable_states]

  - <a name='40'></a>*faName* __reachable__ *s*

    A predicate\. It tests whether the state *s* in the FA *faName* can be
    reached from a start state by one or more transitions\. The result is a
    boolean value\. It will be set to __true__ if the state can be reached,
    and __false__ otherwise\.

  - <a name='41'></a>*faName* __useful\_states__

    Returns the set of states which are able to reach a final state by one or
    more transitions\.

  - <a name='42'></a>*faName* __unuseful\_states__

    Returns the set of states which are not able to reach a final state by any
    number of transitions\. This is

        [faName states] - [faName useful_states]

  - <a name='43'></a>*faName* __useful__ *s*

    A predicate\. It tests whether the state *s* in the FA *faName* is able
    to reach a final state by one or more transitions\. The result is a boolean
    value\. It will be set to __true__ if the state is useful, and
    __false__ otherwise\.

  - <a name='44'></a>*faName* __epsilon\_closure__ *s*

    Returns the set of states which are reachable from the state *s* in the FA
    *faName* by one or more epsilon transitions, i\.e transitions over the
    empty symbol, transitions which do not consume input\. This is called the
    *epsilon closure* of *s*\.

  - <a name='45'></a>*faName* __reverse__

  - <a name='46'></a>*faName* __complete__

  - <a name='47'></a>*faName* __remove\_eps__

  - <a name='48'></a>*faName* __trim__ ?*what*?

  - <a name='49'></a>*faName* __determinize__ ?*mapvar*?

  - <a name='50'></a>*faName* __minimize__ ?*mapvar*?

  - <a name='51'></a>*faName* __complement__

  - <a name='52'></a>*faName* __kleene__

  - <a name='53'></a>*faName* __optional__

  - <a name='54'></a>*faName* __union__ *fa* ?*mapvar*?

  - <a name='55'></a>*faName* __intersect__ *fa* ?*mapvar*?

  - <a name='56'></a>*faName* __difference__ *fa* ?*mapvar*?

  - <a name='57'></a>*faName* __concatenate__ *fa* ?*mapvar*?

  - <a name='58'></a>*faName* __fromRegex__ *regex* ?*over*?

    These methods provide more complex operations on the FA\. Please see the
    same\-named commands in the package __[grammar::fa::op](faop\.md)__
    for descriptions of what they do\.

# <a name='section4'></a>EXAMPLES

# <a name='section5'></a>FINITE AUTOMATONS

For the mathematically inclined, a FA is a 5\-tuple \(S,Sy,St,Fi,T\) where

  - S is a set of *states*,

  - Sy a set of *input symbols*,

  - St is a subset of S, the set of *start* states, also known as *initial*
    states\.

  - Fi is a subset of S, the set of *[final](\.\./\.\./\.\./\.\./index\.md\#final)*
    states, also known as *accepting*\.

  - T is a function from S x \(Sy \+ epsilon\) to \{S\}, the *transition function*\.
    Here __epsilon__ denotes the empty input symbol and is distinct from all
    symbols in Sy; and \{S\} is the set of subsets of S\. In other words, T maps a
    combination of State and Input \(which can be empty\) to a set of *successor
    states*\.

In computer theory a FA is most often shown as a graph where the nodes represent
the states, and the edges between the nodes encode the transition function: For
all n in S' = T \(s, sy\) we have one edge between the nodes representing s and n
resp\., labeled with sy\. The start and accepting states are encoded through
distinct visual markers, i\.e\. they are attributes of the nodes\.

FA's are used to process streams of symbols over Sy\.

A specific FA is said to *accept* a finite stream sy\_1 sy\_2 \.\.\. sy\_n if there
is a path in the graph of the FA beginning at a state in St and ending at a
state in Fi whose edges have the labels sy\_1, sy\_2, etc\. to sy\_n\. The set of all
strings accepted by the FA is the *language* of the FA\. One important
equivalence is that the set of languages which can be accepted by an FA is the
set of *[regular languages](\.\./\.\./\.\./\.\./index\.md\#regular\_languages)*\.

Another important concept is that of deterministic FAs\. A FA is said to be
*deterministic* if for each string of input symbols there is exactly one path
in the graph of the FA beginning at the start state and whose edges are labeled
with the symbols in the string\. While it might seem that non\-deterministic FAs
to have more power of recognition, this is not so\. For each non\-deterministic FA
we can construct a deterministic FA which accepts the same language \(\-\->
Thompson's subset construction\)\.

While one of the premier applications of FAs is in
*[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing)*, especially in the
*[lexer](\.\./\.\./\.\./\.\./index\.md\#lexer)* stage \(where symbols == characters\),
this is not the only possibility by far\.

Quite a lot of processes can be modeled as a FA, albeit with a possibly large
set of states\. For these the notion of accepting states is often less or not
relevant at all\. What is needed instead is the ability to act to state changes
in the FA, i\.e\. to generate some output in response to the input\. This
transforms a FA into a *finite transducer*, which has an additional set OSy of
*output symbols* and also an additional *output function* O which maps from
"S x \(Sy \+ epsilon\)" to "\(Osy \+ epsilon\)", i\.e a combination of state and input,
possibly empty to an output symbol, or nothing\.

For the graph representation this means that edges are additional labeled with
the output symbol to write when this edge is traversed while matching input\.
Note that for an application "writing an output symbol" can also be "executing
some code"\.

Transducers are not handled by this package\. They will get their own package in
the future\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_fa* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[automaton](\.\./\.\./\.\./\.\./index\.md\#automaton), [finite
automaton](\.\./\.\./\.\./\.\./index\.md\#finite\_automaton),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [regular
expression](\.\./\.\./\.\./\.\./index\.md\#regular\_expression), [regular
grammar](\.\./\.\./\.\./\.\./index\.md\#regular\_grammar), [regular
languages](\.\./\.\./\.\./\.\./index\.md\#regular\_languages),
[state](\.\./\.\./\.\./\.\./index\.md\#state),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_fa/faop.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457

[//000000001]: # (grammar::fa::op \- Finite automaton operations and usage)
[//000000002]: # (Generated from file 'faop\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::fa::op\(n\) 0\.4 tcllib "Finite automaton operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::fa::op \- Operations on finite automatons

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [EXAMPLES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit  
package require struct::list  
package require struct::set  
package require grammar::fa::op ?0\.4\.1?  

[__::grammar::fa::op::constructor__ *cmd*](#1)  
[__::grammar::fa::op::reverse__ *fa*](#2)  
[__::grammar::fa::op::complete__ *fa* ?*sink*?](#3)  
[__::grammar::fa::op::remove\_eps__ *fa*](#4)  
[__::grammar::fa::op::trim__ *fa* ?*what*?](#5)  
[__::grammar::fa::op::determinize__ *fa* ?*mapvar*?](#6)  
[__::grammar::fa::op::minimize__ *fa* ?*mapvar*?](#7)  
[__::grammar::fa::op::complement__ *fa*](#8)  
[__::grammar::fa::op::kleene__ *fa*](#9)  
[__::grammar::fa::op::optional__ *fa*](#10)  
[__::grammar::fa::op::union__ *fa* *fb* ?*mapvar*?](#11)  
[__::grammar::fa::op::intersect__ *fa* *fb* ?*mapvar*?](#12)  
[__::grammar::fa::op::difference__ *fa* *fb* ?*mapvar*?](#13)  
[__::grammar::fa::op::concatenate__ *fa* *fb* ?*mapvar*?](#14)  
[__::grammar::fa::op::fromRegex__ *fa* *regex* ?*over*?](#15)  
[__::grammar::fa::op::toRegexp__ *fa*](#16)  
[__::grammar::fa::op::toRegexp2__ *fa*](#17)  
[__::grammar::fa::op::toTclRegexp__ *regexp* *symdict*](#18)  
[__::grammar::fa::op::simplifyRegexp__ *regexp*](#19)  

# <a name='description'></a>DESCRIPTION

This package provides a number of complex operations on finite automatons
\(Short: FA\), as provided by the package __[grammar::fa](fa\.md)__\. The
package does not provide the ability to create and/or manipulate such FAs, nor
the ability to execute a FA for a stream of symbols\. Use the packages
__[grammar::fa](fa\.md)__ and __grammar::fa::interpreter__ for that\.
Another package related to this is __grammar::fa::compiler__ which turns a
FA into an executor class which has the definition of the FA hardwired into it\.

For more information about what a finite automaton is see section *FINITE
AUTOMATONS* in package __[grammar::fa](fa\.md)__\.

# <a name='section2'></a>API

The package exports the API described here\. All commands modify their first
argument\. I\.e\. whatever FA they compute is stored back into it\. Some of the
operations will construct an automaton whose states are all new, but related to
the states in the source automaton\(s\)\. These operations take variable names as
optional arguments where they will store mappings which describe the
relationship\(s\)\. The operations can be loosely partitioned into structural and
language operations\. The latter are defined in terms of the language the
automaton\(s\) accept, whereas the former are defined in terms of the structural
properties of the involved automaton\(s\)\. Some operations are both\. *Structure
operations*

  - <a name='1'></a>__::grammar::fa::op::constructor__ *cmd*

    This command has to be called by the user of the package before any other
    operations is performed, to establish a command which can be used to
    construct a FA container object\. If this is not done several operations will
    fail as they are unable to construct internal and transient containers to
    hold state and/or partial results\.

    Any container class using this package for complex operations should set its
    own class command as the constructor\. See package
    __[grammar::fa](fa\.md)__ for an example\.

  - <a name='2'></a>__::grammar::fa::op::reverse__ *fa*

    Reverses the *fa*\. This is done by reversing the direction of all
    transitions and swapping the sets of *start* and
    *[final](\.\./\.\./\.\./\.\./index\.md\#final)* states\. The language of *fa*
    changes unpredictably\.

  - <a name='3'></a>__::grammar::fa::op::complete__ *fa* ?*sink*?

    Completes the *fa* *complete*, but nothing is done if the *fa* is
    already *complete*\. This implies that only the first in a series of
    multiple consecutive complete operations on *fa* will perform anything\.
    The remainder will be null operations\.

    The language of *fa* is unchanged by this operation\.

    This is done by adding a single new state, the *sink*, and transitions
    from all other states to that sink for all symbols they have no transitions
    for\. The sink itself is made complete by adding loop transitions for all
    symbols\.

    Note: When a FA has epsilon\-transitions transitions over a symbol for a
    state S can be indirect, i\.e\. not attached directly to S, but to a state in
    the epsilon\-closure of S\. The symbols for such indirect transitions count
    when computing completeness of a state\. In other words, these indirectly
    reached symbols are *not* missing\.

    The argument *sink* provides the name for the new state and most not be
    present in the *fa* if specified\. If the name is not specified the command
    will name the state "sink__n__", where __n__ is set so that there
    are no collisions with existing states\.

    Note that the sink state is *not useful* by definition\. In other words,
    while the FA becomes complete, it is also *not useful* in the strict sense
    as it has a state from which no final state can be reached\.

  - <a name='4'></a>__::grammar::fa::op::remove\_eps__ *fa*

    Removes all epsilon\-transitions from the *fa* in such a manner the the
    language of *fa* is unchanged\. However nothing is done if the *fa* is
    already *epsilon\-free*\. This implies that only the first in a series of
    multiple consecutive complete operations on *fa* will perform anything\.
    The remainder will be null operations\.

    *Note:* This operation may cause states to become unreachable or not
    useful\. These states are not removed by this operation\. Use
    __::grammar::fa::op::trim__ for that instead\.

  - <a name='5'></a>__::grammar::fa::op::trim__ *fa* ?*what*?

    Removes unwanted baggage from *fa*\. The legal values for *what* are
    listed below\. The command defaults to __\!reachable&#124;\!useful__ if no
    specific argument was given\.

      * __\!reachable__

        Removes all states which are not reachable from a start state\.

      * __\!useful__

        Removes all states which are unable to reach a final state\.

      * __\!reachable&\!useful__

      * __\!\(reachable&#124;useful\)__

        Removes all states which are not reachable from a start state and are
        unable to reach a final state\.

      * __\!reachable&#124;\!useful__

      * __\!\(reachable&useful\)__

        Removes all states which are not reachable from a start state or are
        unable to reach a final state\.

  - <a name='6'></a>__::grammar::fa::op::determinize__ *fa* ?*mapvar*?

    Makes the *fa* deterministic without changing the language accepted by the
    *fa*\. However nothing is done if the *fa* is already *deterministic*\.
    This implies that only the first in a series of multiple consecutive
    complete operations on *fa* will perform anything\. The remainder will be
    null operations\.

    The command will store a dictionary describing the relationship between the
    new states of the resulting dfa and the states of the input nfa in
    *mapvar*, if it has been specified\. Keys of the dictionary are the handles
    for the states of the resulting dfa, values are sets of states from the
    input nfa\.

    *Note*: An empty dictionary signals that the command was able to make the
    *fa* deterministic without performing a full subset construction, just by
    removing states and shuffling transitions around \(As part of making the FA
    epsilon\-free\)\.

    *Note*: The algorithm fails to make the FA deterministic in the technical
    sense if the FA has no start state\(s\), because determinism requires the FA
    to have exactly one start states\. In that situation we make a best effort;
    and the missing start state will be the only condition preventing the
    generated result from being *deterministic*\. It should also be noted that
    in this case the possibilities for trimming states from the FA are also
    severely reduced as we cannot declare states unreachable\.

  - <a name='7'></a>__::grammar::fa::op::minimize__ *fa* ?*mapvar*?

    Creates a FA which accepts the same language as *fa*, but has a minimal
    number of states\. Uses Brzozowski's method to accomplish this\.

    The command will store a dictionary describing the relationship between the
    new states of the resulting minimal fa and the states of the input fa in
    *mapvar*, if it has been specified\. Keys of the dictionary are the handles
    for the states of the resulting minimal fa, values are sets of states from
    the input fa\.

    *Note*: An empty dictionary signals that the command was able to minimize
    the *fa* without having to compute new states\. This should happen if and
    only if the input FA was already minimal\.

    *Note*: If the algorithm has no start or final states to work with then
    the result might be technically minimal, but have a very unexpected
    structure\. It should also be noted that in this case the possibilities for
    trimming states from the FA are also severely reduced as we cannot declare
    states unreachable\.

*Language operations* All operations in this section require that all input
FAs have at least one start and at least one final state\. Otherwise the language
of the FAs will not be defined, making the operation senseless \(as it operates
on the languages of the FAs in a defined manner\)\.

  - <a name='8'></a>__::grammar::fa::op::complement__ *fa*

    Complements *fa*\. This is possible if and only if *fa* is *complete*
    and *deterministic*\. The resulting FA accepts the complementary language
    of *fa*\. In other words, all inputs not accepted by the input are accepted
    by the result, and vice versa\.

    The result will have all states and transitions of the input, and different
    final states\.

  - <a name='9'></a>__::grammar::fa::op::kleene__ *fa*

    Applies Kleene's closure to *fa*\. The resulting FA accepts all strings
    __S__ for which we can find a natural number __n__ \(0 inclusive\) and
    strings __A1__ \.\.\. __An__ in the language of *fa* such that
    __S__ is the concatenation of __A1__ \.\.\. __An__\. In other words,
    the language of the result is the infinite union over finite length
    concatenations over the language of *fa*\.

    The result will have all states and transitions of the input, and new start
    and final states\.

  - <a name='10'></a>__::grammar::fa::op::optional__ *fa*

    Makes the *fa* optional\. In other words it computes the FA which accepts
    the language of *fa* and the empty the word \(epsilon\) as well\.

    The result will have all states and transitions of the input, and new start
    and final states\.

  - <a name='11'></a>__::grammar::fa::op::union__ *fa* *fb* ?*mapvar*?

    Combines the FAs *fa* and *fb* such that the resulting FA accepts the
    union of the languages of the two FAs\.

    The result will have all states and transitions of the two input FAs, and
    new start and final states\. All states of *fb* which exist in *fa* as
    well will be renamed, and the *mapvar* will contain a mapping from the old
    states of *fb* to the new ones, if present\.

    It should be noted that the result will be non\-deterministic, even if the
    inputs are deterministic\.

  - <a name='12'></a>__::grammar::fa::op::intersect__ *fa* *fb* ?*mapvar*?

    Combines the FAs *fa* and *fb* such that the resulting FA accepts the
    intersection of the languages of the two FAs\. In other words, the result
    will accept a word if and only if the word is accepted by both *fa* and
    *fb*\. The result will be useful, but not necessarily deterministic or
    minimal\.

    The command will store a dictionary describing the relationship between the
    new states of the resulting fa and the pairs of states of the input FAs in
    *mapvar*, if it has been specified\. Keys of the dictionary are the handles
    for the states of the resulting fa, values are pairs of states from the
    input FAs\. Pairs are represented by lists\. The first element in each pair
    will be a state in *fa*, the second element will be drawn from *fb*\.

  - <a name='13'></a>__::grammar::fa::op::difference__ *fa* *fb* ?*mapvar*?

    Combines the FAs *fa* and *fb* such that the resulting FA accepts the
    difference of the languages of the two FAs\. In other words, the result will
    accept a word if and only if the word is accepted by *fa*, but not by
    *fb*\. This can also be expressed as the intersection of *fa* with the
    complement of *fb*\. The result will be useful, but not necessarily
    deterministic or minimal\.

    The command will store a dictionary describing the relationship between the
    new states of the resulting fa and the pairs of states of the input FAs in
    *mapvar*, if it has been specified\. Keys of the dictionary are the handles
    for the states of the resulting fa, values are pairs of states from the
    input FAs\. Pairs are represented by lists\. The first element in each pair
    will be a state in *fa*, the second element will be drawn from *fb*\.

  - <a name='14'></a>__::grammar::fa::op::concatenate__ *fa* *fb* ?*mapvar*?

    Combines the FAs *fa* and *fb* such that the resulting FA accepts the
    cross\-product of the languages of the two FAs\. I\.e\. a word W will be
    accepted by the result if there are two words A and B accepted by *fa*,
    and *fb* resp\. and W is the concatenation of A and B\.

    The result FA will be non\-deterministic\.

  - <a name='15'></a>__::grammar::fa::op::fromRegex__ *fa* *regex* ?*over*?

    Generates a non\-deterministic FA which accepts the same language as the
    regular expression *regex*\. If the *over* is specified it is treated as
    the set of symbols the regular expression and the automaton are defined
    over\. The command will compute the set from the "S" constructors in
    *regex* when *over* was not specified\. This set is important if and only
    if the complement operator "\!" is used in *regex* as the complementary
    language of an FA is quite different for different sets of symbols\.

    The regular expression is represented by a nested list, which forms a syntax
    tree\. The following structures are legal:

      * \{S x\}

        Atomic regular expression\. Everything else is constructed from these\.
        Accepts the __S__ymbol "x"\.

      * \{\. A1 A2 \.\.\.\}

        Concatenation operator\. Accepts the concatenation of the regular
        expressions __A1__, __A2__, etc\.

        *Note* that this operator accepts zero or more arguments\. With zero
        arguments the represented language is *epsilon*, the empty word\.

      * \{&#124; A1 A2 \.\.\.\}

        Choice operator, also called "Alternative"\. Accepts all input accepted
        by at least one of the regular expressions __A1__, __A2__, etc\.
        In other words, the union of __A1__, __A2__\.

        *Note* that this operator accepts zero or more arguments\. With zero
        arguments the represented language is the *empty* language, the
        language without words\.

      * \{& A1 A2 \.\.\.\}

        Intersection operator, logical and\. Accepts all input accepted which is
        accepted by all of the regular expressions __A1__, __A2__, etc\.
        In other words, the intersection of __A1__, __A2__\.

      * \{? A\}

        Optionality operator\. Accepts the empty word and anything from the
        regular expression __A__\.

      * \{\* A\}

        Kleene closure\. Accepts the empty word and any finite concatenation of
        words accepted by the regular expression __A__\.

      * \{\+ A\}

        Positive Kleene closure\. Accepts any finite concatenation of words
        accepted by the regular expression __A__, but not the empty word\.

      * \{\! A\}

        Complement operator\. Accepts any word not accepted by the regular
        expression __A__\. Note that the complement depends on the set of
        symbol the result should run over\. See the discussion of the argument
        *over* before\.

  - <a name='16'></a>__::grammar::fa::op::toRegexp__ *fa*

    This command generates and returns a regular expression which accepts the
    same language as the finite automaton *fa*\. The regular expression is in
    the format as described above, for __::grammar::fa::op::fromRegex__\.

  - <a name='17'></a>__::grammar::fa::op::toRegexp2__ *fa*

    This command has the same functionality as
    __::grammar::fa::op::toRegexp__, but uses a different algorithm to
    simplify the generated regular expressions\.

  - <a name='18'></a>__::grammar::fa::op::toTclRegexp__ *regexp* *symdict*

    This command generates and returns a regular expression in Tcl syntax for
    the regular expression *regexp*, if that is possible\. *regexp* is in the
    same format as expected by __::grammar::fa::op::fromRegex__\.

    The command will fail and throw an error if *regexp* contains
    complementation and intersection operations\.

    The argument *symdict* is a dictionary mapping symbol names to pairs of
    *syntactic type* and Tcl\-regexp\. If a symbol occurring in the *regexp*
    is not listed in this dictionary then single\-character symbols are
    considered to designate themselves whereas multiple\-character symbols are
    considered to be a character class name\.

  - <a name='19'></a>__::grammar::fa::op::simplifyRegexp__ *regexp*

    This command simplifies a regular expression by applying the following
    algorithm first to the main expression and then recursively to all
    sub\-expressions:

      1. Convert the expression into a finite automaton\.

      1. Minimize the automaton\.

      1. Convert the automaton back to a regular expression\.

      1. Choose the shorter of original expression and expression from the
         previous step\.

# <a name='section3'></a>EXAMPLES

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_fa* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[automaton](\.\./\.\./\.\./\.\./index\.md\#automaton), [finite
automaton](\.\./\.\./\.\./\.\./index\.md\#finite\_automaton),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [regular
expression](\.\./\.\./\.\./\.\./index\.md\#regular\_expression), [regular
grammar](\.\./\.\./\.\./\.\./index\.md\#regular\_grammar), [regular
languages](\.\./\.\./\.\./\.\./index\.md\#regular\_languages),
[state](\.\./\.\./\.\./\.\./index\.md\#state),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_me/gasm.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438

[//000000001]: # (grammar::me::cpu::gasm \- Grammar operations and usage)
[//000000002]: # (Generated from file 'gasm\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::me::cpu::gasm\(n\) 0\.1 tcllib "Grammar operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::me::cpu::gasm \- ME assembler

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [DEFINITIONS](#section2)

  - [API](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require grammar::me::cpu::gasm ?0\.1?  

[__::grammar::me::cpu::gasm::begin__ *g* *n* ?*mode*? ?*note*?](#1)  
[__::grammar::me::cpu::gasm::done__ __\-\->__ *t*](#2)  
[__::grammar::me::cpu::gasm::state__](#3)  
[__::grammar::me::cpu::gasm::state\!__ *s*](#4)  
[__::grammar::me::cpu::gasm::lift__ *t* *dst* __=__ *src*](#5)  
[__::grammar::me::cpu::gasm::Inline__ *t* *node* *label*](#6)  
[__::grammar::me::cpu::gasm::Cmd__ *cmd* ?*arg*\.\.\.?](#7)  
[__::grammar::me::cpu::gasm::Bra__](#8)  
[__::grammar::me::cpu::gasm::Nop__ *text*](#9)  
[__::grammar::me::cpu::gasm::Note__ *text*](#10)  
[__::grammar::me::cpu::gasm::Jmp__ *label*](#11)  
[__::grammar::me::cpu::gasm::Exit__](#12)  
[__::grammar::me::cpu::gasm::Who__ *label*](#13)  
[__::grammar::me::cpu::gasm::/Label__ *name*](#14)  
[__::grammar::me::cpu::gasm::/Clear__](#15)  
[__::grammar::me::cpu::gasm::/Ok__](#16)  
[__::grammar::me::cpu::gasm::/Fail__](#17)  
[__::grammar::me::cpu::gasm::/At__ *name*](#18)  
[__::grammar::me::cpu::gasm::/CloseLoop__](#19)  

# <a name='description'></a>DESCRIPTION

This package provides a simple in\-memory assembler\. Its origin is that of a
support package for use by packages converting PEG and other grammars into a
corresponding matcher based on the ME virtual machine, like
__page::compiler::peg::mecpu__\. Despite that it is actually mostly agnostic
regarding the instructions, users can choose any instruction set they like\.

The program under construction is held in a graph structure \(See package
__[struct::graph](\.\./struct/graph\.md)__\) during assembly and subsequent
manipulation, with instructions represented by nodes, and the flow of execution
between instructions explicitly encoded in the arcs between them\.

In this model jumps are not encoded explicitly, they are implicit in the arcs\.
The generation of explicit jumps is left to any code converting the graph
structure into a more conventional representation\. The same goes for branches\.
They are implicitly encoded by all instructions which have two outgoing arcs,
whereas all other instructions have only one outgoing arc\. Their conditonality
is handled by tagging their outgoing arcs with information about the conditions
under which they are taken\.

While the graph the assembler operates on is supplied from the outside, i\.e\.
external, it does manage some internal state, namely:

  1. The handle of the graph node most assembler operations will work on, the
     *anchor*\.

  1. A mapping from arbitrary strings to instructions\. I\.e\. it is possible to
     *label* an instruction during assembly, and later recall that instruction
     by its label\.

  1. The condition code to use when creating arcs between instructions, which is
     one of __always__, __ok__, and __fail__\.

  1. The current operation mode, one of __halt__, __okfail__, and
     __\!okfail__\.

  1. The name of a node in a tree\. This, and the operation mode above are the
     parts most heavily influenced by the needs of a grammar compiler, as they
     assume some basic program structures \(selected through the operation mode\),
     and intertwine the graph with a tree, like the AST for the grammar to be
     compiled\.

# <a name='section2'></a>DEFINITIONS

As the graph the assembler is operating on, and the tree it is intertwined with,
are supplied to the assembler from the outside it is necessary to specify the
API expected from them, and to describe the structures expected and/or generated
by the assembler in either\.

  1. Any graph object command used by the assembler has to provide the API as
     specified in the documentation for the package
     __[struct::graph](\.\./struct/graph\.md)__\.

  1. Any tree object command used by the assembler has to provide the API as
     specified in the documentation for the package
     __[struct::tree](\.\./struct/struct\_tree\.md)__\.

  1. Any instruction \(node\) generated by the assembler in a graph will have at
     least two, and at most three attributes:

       - __instruction__

         The value of this attribute is the name of the instruction\. The only
         names currently defined by the assembler are the three
         pseudo\-instructions

           * __NOP__

             This instruction does nothing\. Useful for fixed framework nodes,
             unchanging jump destinations, and the like\. No arguments\.

           * __C__

             A \.NOP to allow the insertion of arbitrary comments into the
             instruction stream, i\.e\. a comment node\. One argument, the text of
             the comment\.

           * __BRA__

             A \.NOP serving as explicitly coded conditional branch\. No
             arguments\.

         However we reserve the space of all instructions whose names begin with
         a "\." \(dot\) for future use by the assembler\.

       - __arguments__

         The value of this attribute is a list of strings, the arguments of the
         instruction\. The contents are dependent on the actual instruction and
         the assembler doesn't know or care about them\. This means for example
         that it has no builtin knowledge about what instruction need which
         arguments and thus doesn't perform any type of checking\.

       - __expr__

         This attribute is optional\. When it is present its value is the name of
         a node in the tree intertwined with the graph\.

  1. Any arc between two instructions will have one attribute:

       - __condition__

         The value of this attribute determines under which condition execution
         will take this arc\. It is one of __always__, __ok__, and
         __fail__\. The first condition is used for all arcs which are the
         single outgoing arc of an instruction\. The other two are used for the
         two outgoing arcs of an instruction which implicitly encode a branch\.

  1. A tree node given to the assembler for cross\-referencing will be written to
     and given the following attributes, some fixed, some dependent on the
     operation mode\. All values will be references to nodes in the instruction
     graph\. Some of the instruction will expect some or specific sets of these
     attributes\.

       - __gas::entry__

         Always written\.

       - __gas::exit__

         Written for all modes but __okfail__\.

       - __gas::exit::ok__

         Written for mode __okfail__\.

       - __gas::exit::fail__

         Written for mode __okfail__\.

# <a name='section3'></a>API

  - <a name='1'></a>__::grammar::me::cpu::gasm::begin__ *g* *n* ?*mode*? ?*note*?

    This command starts the assembly of an instruction sequence, and
    \(re\)initializes the state of the assembler\. After completion of the
    instruction sequence use __::grammar::me::cpu::gasm::done__ to finalize
    the assembler\.

    It will operate on the graph *g* in the specified *mode* \(Default is
    __okfail__\)\. As part of the initialization it will always create a
    standard \.NOP instruction and label it "entry"\. The creation of the
    remaining standard instructions is *mode*\-dependent:

      * __halt__

        An "icf\_halt" instruction labeled "exit/return"\.

      * __\!okfail__

        An "icf\_ntreturn" instruction labeled "exit/return"\.

      * __okfail__

        Two \.NOP instructions labeled "exit/ok" and "exit/fail" respectively\.

    The *note*, if specified \(default is not\), is given to the "entry" \.NOP
    instruction\.

    The node reference *n* is simply stored for use by
    __::grammar::me::cpu::gasm::done__\. It has to refer to a node in the
    tree *t* argument of that command\.

    After the initialization is done the "entry" instruction will be the
    *anchor*, and the condition code will be set to __always__\.

    The command returns the empy string as its result\.

  - <a name='2'></a>__::grammar::me::cpu::gasm::done__ __\-\->__ *t*

    This command finalizes the creation of an instruction sequence and then
    clears the state of the assembler\. *NOTE* that this *does not* delete
    any of the created instructions\. They can be made available to future
    begin/done cycles\. Further assembly will be possible only after
    reinitialization of the system via __::grammar::me::cpu::gasm::begin__\.

    Before the state is cleared selected references to selected instructions
    will be written to attributes of the node *n* in the tree *t*\. Which
    instructions are saved is *mode*\-dependent\. Both *mode* and the
    destination node *n* were specified during invokation of
    __::grammar::me::cpu::gasm::begin__\.

    Independent of the mode a reference to the instruction labeled "entry" will
    be saved to the attribute __gas::entry__ of *n*\. The reference to the
    node *n* will further be saved into the attribute "expr" of the "entry"
    instruction\. Beyond that

      * __halt__

        A reference to the instruction labeled "exit/return" will be saved to
        the attribute __gas::exit__ of *n*\.

      * __okfail__

        See __halt__\.

      * __\!okfail__

        Reference to the two instructions labeled "exit/ok" and "exit/fail" will
        be saved to the attributes __gas::exit::ok__ and
        __gas::exit::fail__ of *n* respectively\.

    The command returns the empy string as its result\.

  - <a name='3'></a>__::grammar::me::cpu::gasm::state__

    This command returns the current state of the assembler\. Its format is not
    documented and considered to be internal to the package\.

  - <a name='4'></a>__::grammar::me::cpu::gasm::state\!__ *s*

    This command takes a serialized assembler state *s* as returned by
    __::grammar::me::cpu::gasm::state__ and makes it the current state of
    the assembler\.

    *Note* that this may overwrite label definitions, however all
    non\-conflicting label definitions in the state before are not touched and
    merged with *s*\.

    The command returns the empty string as its result\.

  - <a name='5'></a>__::grammar::me::cpu::gasm::lift__ *t* *dst* __=__ *src*

    This command operates on the tree *t*\. It copies the contents of the
    attributes __gas::entry__, __gas::exit::ok__ and
    __gas::exit::fail__ from the node *src* to the node *dst*\. It
    returns the empty string as its result\.

  - <a name='6'></a>__::grammar::me::cpu::gasm::Inline__ *t* *node* *label*

    This command links an instruction sequence created by an earlier begin/done
    pair into the current instruction sequence\.

    To this end it

      1. reads the instruction references from the attributes
         __gas::entry__, __gas::exit::ok__, and __gas::exit::fail__
         from the node *n* of the tree *t* and makes them available to
         assembler und the labels *label*/entry, *label*/exit::ok, and
         *label*/exit::fail respectively\.

      1. Creates an arc from the *anchor* to the node labeled *label*/entry,
         and tags it with the current condition code\.

      1. Makes the node labeled *label*/exit/ok the new *anchor*\.

    The command returns the empty string as its result\.

  - <a name='7'></a>__::grammar::me::cpu::gasm::Cmd__ *cmd* ?*arg*\.\.\.?

    This is the basic command to add instructions to the graph\. It creates a new
    instruction of type *cmd* with the given arguments *arg*\.\.\. If the
    *anchor* was defined it will also create an arc from the *anchor* to the
    new instruction using the current condition code\. After the call the new
    instruction will be the *anchor* and the current condition code will be
    set to __always__\.

    The command returns the empty string as its result\.

  - <a name='8'></a>__::grammar::me::cpu::gasm::Bra__

    This is a convenience command to create a \.BRA pseudo\-instruction\. It uses
    __::grammar::me::cpu::gasm::Cmd__ to actually create the instruction and
    inherits its behaviour\.

  - <a name='9'></a>__::grammar::me::cpu::gasm::Nop__ *text*

    This is a convenience command to create a \.NOP pseudo\-instruction\. It uses
    __::grammar::me::cpu::gasm::Cmd__ to actually create the instruction and
    inherits its behaviour\. The *text* will be saved as the first and only
    argument of the new instruction\.

  - <a name='10'></a>__::grammar::me::cpu::gasm::Note__ *text*

    This is a convenience command to create a \.C pseudo\-instruction, i\.e\. a
    comment\. It uses __::grammar::me::cpu::gasm::Cmd__ to actually create
    the instruction and inherits its behaviour\. The *text* will be saved as
    the first and only argument of the new instruction\.

  - <a name='11'></a>__::grammar::me::cpu::gasm::Jmp__ *label*

    This command creates an arc from the *anchor* to the instruction labeled
    with *label*, and tags with the the current condition code\.

    The command returns the empty string as its result\.

  - <a name='12'></a>__::grammar::me::cpu::gasm::Exit__

    This command creates an arc from the *anchor* to one of the exit
    instructions, based on the operation mode \(see
    __::grammar::me::cpu::gasm::begin__\), and tags it with current condition
    code\.

    For mode __okfail__ it links to the instruction labeled either "exit/ok"
    or "exit/fail", depending on the current condition code, and tagging it with
    the current condition code For the other two modes it links to the
    instruction labeled "exit/return", tagging it condition code __always__,
    independent the current condition code\.

    The command returns the empty string as its result\.

  - <a name='13'></a>__::grammar::me::cpu::gasm::Who__ *label*

    This command returns a reference to the instruction labeled with *label*\.

  - <a name='14'></a>__::grammar::me::cpu::gasm::/Label__ *name*

    This command labels the *anchor* with *name*\. *Note* that an
    instruction can have more than one label\.

    The command returns the empty string as its result\.

  - <a name='15'></a>__::grammar::me::cpu::gasm::/Clear__

    This command clears the *anchor*, leaving it undefined, and further resets
    the current condition code to __always__\.

    The command returns the empty string as its result\.

  - <a name='16'></a>__::grammar::me::cpu::gasm::/Ok__

    This command sets the current condition code to __ok__\.

    The command returns the empty string as its result\.

  - <a name='17'></a>__::grammar::me::cpu::gasm::/Fail__

    This command sets the current condition code to __fail__\.

    The command returns the empty string as its result\.

  - <a name='18'></a>__::grammar::me::cpu::gasm::/At__ *name*

    This command sets the *anchor* to the instruction labeled with *name*,
    and further resets the current condition code to __always__\.

    The command returns the empty string as its result\.

  - <a name='19'></a>__::grammar::me::cpu::gasm::/CloseLoop__

    This command marks the *anchor* as the last instruction in a loop body, by
    creating the attribute __LOOP__\.

    The command returns the empty string as its result\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_me* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[assembler](\.\./\.\./\.\./\.\./index\.md\#assembler),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[graph](\.\./\.\./\.\./\.\./index\.md\#graph),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[tree](\.\./\.\./\.\./\.\./index\.md\#tree), [virtual
machine](\.\./\.\./\.\./\.\./index\.md\#virtual\_machine)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_me/me_ast.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

[//000000001]: # (grammar::me\_ast \- Grammar operations and usage)
[//000000002]: # (Generated from file 'me\_ast\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::me\_ast\(n\) 0\.1 tcllib "Grammar operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::me\_ast \- Various representations of ASTs

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [AST VALUES](#section2)

  - [AST OBJECTS](#section3)

  - [EXTENDED AST OBJECTS](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

This document specifies various representations for the *[abstract syntax
tree](\.\./\.\./\.\./\.\./index\.md\#abstract\_syntax\_tree)*s \(short
*[AST](\.\./\.\./\.\./\.\./index\.md\#ast)*\) generated by instances of ME virtual
machines, independent of variant\. Please go and read the document
__[grammar::me\_intro](me\_intro\.md)__ first if you do not know what a ME
virtual machine is\.

ASTs and all the representations we specify distinguish between two types of
nodes, namely:

  - Terminal

    Terminal nodes refer to the terminal symbols found in the token stream\. They
    are always leaf nodes\. I\.e\. terminal nodes never have children\.

  - Nonterminal

    Nonterminal nodes represent a nonterminal symbol of the grammar used during
    parsing\. They can occur as leaf and inner nodes of the tree\.

Both types of nodes carry basic range information telling a user which parts of
the input are covered by the node by providing the location of the first and
last tokens found within the range\. Locations are provided as non\-negative
integer offsets from the beginning of the token stream, with the first token
found in the stream located at offset 0 \(zero\)\.

The root of an AS tree can be either a terminal or nonterminal node\.

# <a name='section2'></a>AST VALUES

This representation of ASTs is a Tcl list\. The main list represents the root
node of the tree, with the representations of the children nested within\.

Each node is represented by a single Tcl list containing three or more elements\.
The first element is either the empty string or the name of a nonterminal symbol
\(which is never the empty string\)\. The second and third elements are then the
locations of the first and last tokens\. Any additional elements after the third
are then the representations of the children, with the leftmost child first,
i\.e\. as the fourth element of the list representing the node\.

# <a name='section3'></a>AST OBJECTS

In this representation an AST is represented by a Tcl object command whose API
is compatible to the tree objects provided by the package
__[struct::tree](\.\./struct/struct\_tree\.md)__\. I\.e it has to support at
least all of the methods described by that package, and may support more\.

Because of this the remainder of the specifications is written using the terms
of __[struct::tree](\.\./struct/struct\_tree\.md)__\.

Each node of the AST directly maps to a node in the tree object\. All data beyond
the child nodes, i\.e\. node type and input locations, are stored in attributes of
the node in the tree object\. They are:

  - type

    The type of the AST node\. The recognized values are __terminal__ and
    __nonterminal__\.

  - range

    The locations of the first and last token of the terminal data in the input
    covered by the node\. This is a list containing two locations\.

  - detail

    This attribute is present only for nonterminal nodes\. It contains the name
    of the nonterminal symbol stored in the node\.

# <a name='section4'></a>EXTENDED AST OBJECTS

Extended AST objects are like AST objects, with additional information\.

  - detail

    This attribute is now present at all nodes\. Its contents are unchanged for
    nonterminal nodes\. For terminal nodes it contains a list describing all
    tokens from the input which are covered by the node\.

    Each element of the list contains the token name, the associated lexeme
    attribute, line number, and column index, in this order\.

  - range\_lc

    This new attribute is defined for all nodes, and contains the locations from
    attribute *range* translated into line number and column index\. Lines are
    counted from 1, columns are counted from 0\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_me* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[AST](\.\./\.\./\.\./\.\./index\.md\#ast), [abstract syntax
tree](\.\./\.\./\.\./\.\./index\.md\#abstract\_syntax\_tree)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_me/me_cpu.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323

[//000000001]: # (grammar::me::cpu \- Grammar operations and usage)
[//000000002]: # (Generated from file 'me\_cpu\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005\-2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::me::cpu\(n\) 0\.2 tcllib "Grammar operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::me::cpu \- Virtual machine implementation II for parsing token streams

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [CLASS API](#subsection1)

      - [OBJECT API](#subsection2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require grammar::me::cpu ?0\.2?  

[__::grammar::me::cpu__ *meName* *matchcode*](#1)  
[__meName__ __option__ ?*arg arg \.\.\.*?](#2)  
[*meName* __lc__ *location*](#3)  
[*meName* __tok__ ?*from* ?*to*??](#4)  
[*meName* __pc__ *state*](#5)  
[*meName* __iseof__ *state*](#6)  
[*meName* __at__ *state*](#7)  
[*meName* __cc__ *state*](#8)  
[*meName* __sv__](#9)  
[*meName* __ok__](#10)  
[*meName* __error__](#11)  
[*meName* __lstk__ *state*](#12)  
[*meName* __astk__ *state*](#13)  
[*meName* __mstk__ *state*](#14)  
[*meName* __estk__ *state*](#15)  
[*meName* __rstk__ *state*](#16)  
[*meName* __nc__ *state*](#17)  
[*meName* __ast__](#18)  
[*meName* __halted__](#19)  
[*meName* __code__](#20)  
[*meName* __eof__](#21)  
[*meName* __put__ *tok* *lex* *line* *col*](#22)  
[*meName* __putstring__ *string* *lvar* *cvar*](#23)  
[*meName* __run__ ?*n*?](#24)  
[*meName* __pull__ *nextcmd*](#25)  
[*meName* __reset__](#26)  
[*meName* __destroy__](#27)  

# <a name='description'></a>DESCRIPTION

This package provides an implementation of the ME virtual machine\. Please go and
read the document __[grammar::me\_intro](me\_intro\.md)__ first if you do
not know what a ME virtual machine is\.

This implementation provides an object\-based API and the machines are not truly
tied to Tcl\. A C implementation of the same API is quite possible\.

Internally the package actually uses the value\-based machine manipulation
commands as provided by the package
__[grammar::me::cpu::core](me\_cpucore\.md)__ to perform its duties\.

# <a name='section2'></a>API

## <a name='subsection1'></a>CLASS API

The package directly provides only a single command for the construction of ME
virtual machines\.

  - <a name='1'></a>__::grammar::me::cpu__ *meName* *matchcode*

    The command creates a new ME machine object with an associated global Tcl
    command whose name is *meName*\. This command may be used to invoke various
    operations on the machine\. It has the following general form:

      * <a name='2'></a>__meName__ __option__ ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.

    The argument *matchcode* contains the match instructions the machine has
    to execute while parsing the input stream\. Please read section __MATCH
    CODE REPRESENTATION__ of the documentation for the package
    __[grammar::me::cpu::core](me\_cpucore\.md)__ for the specification of
    the structure of this value\.

    The *tokmap* argument taken by the implementation provided by the package
    __[grammar::me::tcl](me\_tcl\.md)__ is here hidden inside of the match
    instructions and therefore not needed\.

## <a name='subsection2'></a>OBJECT API

All ME virtual machine objects created by the class command specified in section
[CLASS API](#subsection1) support the methods listed below\.

The machines provided by this package provide methods for operation in both
push\- and pull\-styles\. Push\-style means that tokens are pushed into the machine
state when they arrive, triggering further execution until they are consumed\. In
other words, this allows the machine to be suspended and resumed at will and an
arbitrary number of times, the quasi\-parallel operation of several machines, and
the operation as part of the event loop\.

  - <a name='3'></a>*meName* __lc__ *location*

    This method converts the location of a token given as offset in the input
    stream into the associated line number and column index\. The result of the
    command is a 2\-element list containing the two values, in the order
    mentioned in the previous sentence\. This allows higher levels to convert the
    location information found in the error status and the generated AST into
    more human readable data\.

    *Note* that the command is not able to convert locations which have not
    been reached by the machine yet\. In other words, if the machine has read 7
    tokens the command is able to convert the offsets __0__ to __6__,
    but nothing beyond that\. This also shows that it is not possible to convert
    offsets which refer to locations before the beginning of the stream\.

  - <a name='4'></a>*meName* __tok__ ?*from* ?*to*??

    This method returns a Tcl list containing the part of the input stream
    between the locations *from* and *to* \(both inclusive\)\. If *to* is not
    specified it will default to the value of *from*\. If *from* is not
    specified either the whole input stream is returned\.

    Each element of the returned list is a list of four elements, the token, its
    associated lexeme, line number, and column index, in this order\. This
    command places the same restrictions on its location arguments as the method
    __lc__\.

  - <a name='5'></a>*meName* __pc__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current value of the stored program counter\.

  - <a name='6'></a>*meName* __iseof__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current value of the stored eof flag\.

  - <a name='7'></a>*meName* __at__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current location in the input stream\.

  - <a name='8'></a>*meName* __cc__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current token\.

  - <a name='9'></a>*meName* __sv__

    This command returns the current semantic value *SV* stored in the
    machine\. This is an abstract syntax tree as specified in the document
    __[grammar::me\_ast](me\_ast\.md)__, section __AST VALUES__\.

  - <a name='10'></a>*meName* __ok__

    This method returns the current match status *OK*\.

  - <a name='11'></a>*meName* __error__

    This method returns the current error status *ER*\.

  - <a name='12'></a>*meName* __lstk__ *state*

    This method takes the state value of a ME virtual machine and returns the
    location stack\.

  - <a name='13'></a>*meName* __astk__ *state*

    This method takes the state value of a ME virtual machine and returns the
    AST stack\.

  - <a name='14'></a>*meName* __mstk__ *state*

    This method takes the state value of a ME virtual machine and returns the
    AST marker stack\.

  - <a name='15'></a>*meName* __estk__ *state*

    This method takes the state value of a ME virtual machine and returns the
    error stack\.

  - <a name='16'></a>*meName* __rstk__ *state*

    This method takes the state value of a ME virtual machine and returns the
    subroutine return stack\.

  - <a name='17'></a>*meName* __nc__ *state*

    This method takes the state value of a ME virtual machine and returns the
    nonterminal match cache as a dictionary\.

  - <a name='18'></a>*meName* __ast__

    This method returns the current top entry of the AST stack *AS*\. This is
    an abstract syntax tree as specified in the document
    __[grammar::me\_ast](me\_ast\.md)__, section __AST VALUES__\.

  - <a name='19'></a>*meName* __halted__

    This method returns a boolean value telling the caller whether the engine
    has halted execution or not\. Halt means that no further matching is
    possible, and the information retrieved via the other method is final\.
    Attempts to __run__ the engine will be ignored, until a __reset__ is
    made\.

  - <a name='20'></a>*meName* __code__

    This method returns the *code* information used to construct the object\.
    In other words, the match program executed by the machine\.

  - <a name='21'></a>*meName* __eof__

    This method adds an end of file marker to the end of the input stream\. This
    signals the machine that the current contents of the input queue are the
    final parts of the input and nothing will come after\. Attempts to put more
    characters into the queue will fail\.

  - <a name='22'></a>*meName* __put__ *tok* *lex* *line* *col*

    This method adds the token *tok* to the end of the input stream, with
    associated lexeme data *lex* and *line*/*col*umn information\.

  - <a name='23'></a>*meName* __putstring__ *string* *lvar* *cvar*

    This method adds each individual character in the *string* as a token to
    the end of the input stream, from first to last\. The lexemes will be empty
    and the line/col information is computed based on the characters encountered
    and the data in the variables *lvar* and *cvar*\.

  - <a name='24'></a>*meName* __run__ ?*n*?

    This methods causes the engine to execute match instructions until either

      * *n* instructions have been executed, or

      * a halt instruction was executed, or

      * the input queue is empty and the code is asking for more tokens to
        process\.

    If no limit *n* was set only the last two conditions are checked for\.

  - <a name='25'></a>*meName* __pull__ *nextcmd*

    This method implements pull\-style operation of the machine\. It causes it to
    execute match instructions until either a halt instruction is reached, or
    the command prefix *nextcmd* ceases to deliver more tokens\.

    The command prefix *nextcmd* represents the input stream of characters and
    is invoked by the machine whenever the a new character from the stream is
    required\. The instruction for handling this is *ict\_advance*\. The callback
    has to return either the empty list, or a list of 4 elements containing the
    token, its lexeme attribute, and its location as line number and column
    index, in this order\. The empty list is the signal that the end of the input
    stream has been reached\. The lexeme attribute is stored in the terminal
    cache, but otherwise not used by the machine\.

    The end of the input stream for this method does not imply that method
    __eof__ is called for the machine as a whole\. By avoiding this and still
    asking for an explicit call of the method it is possible to mix push\- and
    pull\-style operation during the lifetime of the machine\.

  - <a name='26'></a>*meName* __reset__

    This method resets the machine to its initial state, discarding any state it
    may have\.

  - <a name='27'></a>*meName* __destroy__

    This method deletes the object and releases all resurces it claimed\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_me* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [virtual
machine](\.\./\.\./\.\./\.\./index\.md\#virtual\_machine)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005\-2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_me/me_cpucore.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440

[//000000001]: # (grammar::me::cpu::core \- Grammar operations and usage)
[//000000002]: # (Generated from file 'me\_cpucore\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005\-2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::me::cpu::core\(n\) 0\.2 tcllib "Grammar operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::me::cpu::core \- ME virtual machine state manipulation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [MATCH PROGRAM REPRESENTATION](#subsection1)

  - [CPU STATE](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require grammar::me::cpu::core ?0\.2?  

[__::grammar::me::cpu::core__ __disasm__ *asm*](#1)  
[__::grammar::me::cpu::core__ __asm__ *asm*](#2)  
[__::grammar::me::cpu::core__ __new__ *asm*](#3)  
[__::grammar::me::cpu::core__ __lc__ *state* *location*](#4)  
[__::grammar::me::cpu::core__ __tok__ *state* ?*from* ?*to*??](#5)  
[__::grammar::me::cpu::core__ __pc__ *state*](#6)  
[__::grammar::me::cpu::core__ __iseof__ *state*](#7)  
[__::grammar::me::cpu::core__ __at__ *state*](#8)  
[__::grammar::me::cpu::core__ __cc__ *state*](#9)  
[__::grammar::me::cpu::core__ __sv__ *state*](#10)  
[__::grammar::me::cpu::core__ __ok__ *state*](#11)  
[__::grammar::me::cpu::core__ __error__ *state*](#12)  
[__::grammar::me::cpu::core__ __lstk__ *state*](#13)  
[__::grammar::me::cpu::core__ __astk__ *state*](#14)  
[__::grammar::me::cpu::core__ __mstk__ *state*](#15)  
[__::grammar::me::cpu::core__ __estk__ *state*](#16)  
[__::grammar::me::cpu::core__ __rstk__ *state*](#17)  
[__::grammar::me::cpu::core__ __nc__ *state*](#18)  
[__::grammar::me::cpu::core__ __ast__ *state*](#19)  
[__::grammar::me::cpu::core__ __halted__ *state*](#20)  
[__::grammar::me::cpu::core__ __code__ *state*](#21)  
[__::grammar::me::cpu::core__ __eof__ *statevar*](#22)  
[__::grammar::me::cpu::core__ __put__ *statevar* *tok* *lex* *line* *col*](#23)  
[__::grammar::me::cpu::core__ __run__ *statevar* ?*n*?](#24)  

# <a name='description'></a>DESCRIPTION

This package provides an implementation of the ME virtual machine\. Please go and
read the document __[grammar::me\_intro](me\_intro\.md)__ first if you do
not know what a ME virtual machine is\.

This implementation represents each ME virtual machine as a Tcl value and
provides commands to manipulate and query such values to show the effects of
executing instructions, adding tokens, retrieving state, etc\.

The values fully follow the paradigm of Tcl that every value is a string and
while also allowing C implementations for a proper Tcl\_ObjType to keep all the
important data in native data structures\. Because of the latter it is
recommended to access the state values *only* through the commands of this
package to ensure that internal representation is not shimmered away\.

The actual structure used by all state values is described in section [CPU
STATE](#section3)\.

# <a name='section2'></a>API

The package directly provides only a single command, and all the functionality
is made available through its methods\.

  - <a name='1'></a>__::grammar::me::cpu::core__ __disasm__ *asm*

    This method returns a list containing a disassembly of the match
    instructions in *asm*\. The format of *asm* is specified in the section
    [MATCH PROGRAM REPRESENTATION](#subsection1)\.

    Each element of the result contains instruction label, instruction name, and
    the instruction arguments, in this order\. The label can be the empty string\.
    Jump destinations are shown as labels, strings and tokens unencoded\. Token
    names are prefixed with their numeric id, if, and only if a tokmap is
    defined\. The two components are separated by a colon\.

  - <a name='2'></a>__::grammar::me::cpu::core__ __asm__ *asm*

    This method returns code in the format as specified in section [MATCH
    PROGRAM REPRESENTATION](#subsection1) generated from ME assembly code
    *asm*, which is in the format as returned by the method __disasm__\.

  - <a name='3'></a>__::grammar::me::cpu::core__ __new__ *asm*

    This method creates state value for a ME virtual machine in its initial
    state and returns it as its result\.

    The argument *matchcode* contains a Tcl representation of the match
    instructions the machine has to execute while parsing the input stream\. Its
    format is specified in the section [MATCH PROGRAM
    REPRESENTATION](#subsection1)\.

    The *tokmap* argument taken by the implementation provided by the package
    __[grammar::me::tcl](me\_tcl\.md)__ is here hidden inside of the match
    instructions and therefore not needed\.

  - <a name='4'></a>__::grammar::me::cpu::core__ __lc__ *state* *location*

    This method takes the state value of a ME virtual machine and uses it to
    convert a location in the input stream \(as offset\) into a line number and
    column index\. The result of the method is a 2\-element list containing the
    two pieces in the order mentioned in the previous sentence\.

    *Note* that the method cannot convert locations which the machine has not
    yet read from the input stream\. In other words, if the machine has read 7
    characters so far it is possible to convert the offsets __0__ to
    __6__, but nothing beyond that\. This also shows that it is not possible
    to convert offsets which refer to locations before the beginning of the
    stream\.

    This utility allows higher levels to convert the location offsets found in
    the error status and the AST into more human readable data\.

  - <a name='5'></a>__::grammar::me::cpu::core__ __tok__ *state* ?*from* ?*to*??

    This method takes the state value of a ME virtual machine and returns a Tcl
    list containing the part of the input stream between the locations *from*
    and *to* \(both inclusive\)\. If *to* is not specified it will default to
    the value of *from*\. If *from* is not specified either the whole input
    stream is returned\.

    This method places the same restrictions on its location arguments as the
    method __lc__\.

  - <a name='6'></a>__::grammar::me::cpu::core__ __pc__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current value of the stored program counter\.

  - <a name='7'></a>__::grammar::me::cpu::core__ __iseof__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current value of the stored eof flag\.

  - <a name='8'></a>__::grammar::me::cpu::core__ __at__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current location in the input stream\.

  - <a name='9'></a>__::grammar::me::cpu::core__ __cc__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current token\.

  - <a name='10'></a>__::grammar::me::cpu::core__ __sv__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current semantic value stored in it\. This is an abstract syntax tree as
    specified in the document __[grammar::me\_ast](me\_ast\.md)__, section
    __AST VALUES__\.

  - <a name='11'></a>__::grammar::me::cpu::core__ __ok__ *state*

    This method takes the state value of a ME virtual machine and returns the
    match status stored in it\.

  - <a name='12'></a>__::grammar::me::cpu::core__ __error__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current error status stored in it\.

  - <a name='13'></a>__::grammar::me::cpu::core__ __lstk__ *state*

    This method takes the state value of a ME virtual machine and returns the
    location stack\.

  - <a name='14'></a>__::grammar::me::cpu::core__ __astk__ *state*

    This method takes the state value of a ME virtual machine and returns the
    AST stack\.

  - <a name='15'></a>__::grammar::me::cpu::core__ __mstk__ *state*

    This method takes the state value of a ME virtual machine and returns the
    AST marker stack\.

  - <a name='16'></a>__::grammar::me::cpu::core__ __estk__ *state*

    This method takes the state value of a ME virtual machine and returns the
    error stack\.

  - <a name='17'></a>__::grammar::me::cpu::core__ __rstk__ *state*

    This method takes the state value of a ME virtual machine and returns the
    subroutine return stack\.

  - <a name='18'></a>__::grammar::me::cpu::core__ __nc__ *state*

    This method takes the state value of a ME virtual machine and returns the
    nonterminal match cache as a dictionary\.

  - <a name='19'></a>__::grammar::me::cpu::core__ __ast__ *state*

    This method takes the state value of a ME virtual machine and returns the
    abstract syntax tree currently at the top of the AST stack stored in it\.
    This is an abstract syntax tree as specified in the document
    __[grammar::me\_ast](me\_ast\.md)__, section __AST VALUES__\.

  - <a name='20'></a>__::grammar::me::cpu::core__ __halted__ *state*

    This method takes the state value of a ME virtual machine and returns the
    current halt status stored in it, i\.e\. if the machine has stopped or not\.

  - <a name='21'></a>__::grammar::me::cpu::core__ __code__ *state*

    This method takes the state value of a ME virtual machine and returns the
    code stored in it, i\.e\. the instructions executed by the machine\.

  - <a name='22'></a>__::grammar::me::cpu::core__ __eof__ *statevar*

    This method takes the state value of a ME virtual machine as stored in the
    variable named by *statevar* and modifies it so that the eof flag inside
    is set\. This signals to the machine that whatever token are in the input
    queue are the last to be processed\. There will be no more\.

  - <a name='23'></a>__::grammar::me::cpu::core__ __put__ *statevar* *tok* *lex* *line* *col*

    This method takes the state value of a ME virtual machine as stored in the
    variable named by *statevar* and modifies it so that the token *tok* is
    added to the end of the input queue, with associated lexeme data *lex* and
    *line*/*col*umn information\.

    The operation will fail with an error if the eof flag of the machine has
    been set through the method __eof__\.

  - <a name='24'></a>__::grammar::me::cpu::core__ __run__ *statevar* ?*n*?

    This method takes the state value of a ME virtual machine as stored in the
    variable named by *statevar*, executes a number of instructions and stores
    the state resulting from their modifications back into the variable\.

    The execution loop will run until either

      * *n* instructions have been executed, or

      * a halt instruction was executed, or

      * the input queue is empty and the code is asking for more tokens to
        process\.

    If no limit *n* was set only the last two conditions are checked for\.

## <a name='subsection1'></a>MATCH PROGRAM REPRESENTATION

A match program is represented by nested Tcl list\. The first element, *asm*,
is a list of integer numbers, the instructions to execute, and their arguments\.
The second element, *[pool](\.\./\.\./\.\./\.\./index\.md\#pool)*, is a list of
strings, referenced by the instructions, for error messages, token names, etc\.
The third element, *tokmap*, provides ordering information for the tokens,
mapping their names to their numerical rank\. This element can be empty, forcing
lexicographic comparison when matching ranges\.

All ME instructions are encoded as integer numbers, with the mapping given
below\. A number of the instructions, those which handle error messages, have
been given an additional argument to supply that message explicitly instead of
having it constructed from token names, etc\. This allows the machine state to
store only the message ids instead of the full strings\.

Jump destination arguments are absolute indices into the *asm* element,
refering to the instruction to jump to\. Any string arguments are absolute
indices into the *[pool](\.\./\.\./\.\./\.\./index\.md\#pool)* element\. Tokens,
characters, messages, and token \(actually character\) classes to match are coded
as references into the *[pool](\.\./\.\./\.\./\.\./index\.md\#pool)* as well\.

  1. "__ict\_advance__ *message*"

  1. "__ict\_match\_token__ *tok* *message*"

  1. "__ict\_match\_tokrange__ *tokbegin* *tokend* *message*"

  1. "__ict\_match\_tokclass__ *code* *message*"

  1. "__inc\_restore__ *branchlabel* *nt*"

  1. "__inc\_save__ *nt*"

  1. "__icf\_ntcall__ *branchlabel*"

  1. "__icf\_ntreturn__"

  1. "__iok\_ok__"

  1. "__iok\_fail__"

  1. "__iok\_negate__"

  1. "__icf\_jalways__ *branchlabel*"

  1. "__icf\_jok__ *branchlabel*"

  1. "__icf\_jfail__ *branchlabel*"

  1. "__icf\_halt__"

  1. "__icl\_push__"

  1. "__icl\_rewind__"

  1. "__icl\_pop__"

  1. "__ier\_push__"

  1. "__ier\_clear__"

  1. "__ier\_nonterminal__ *message*"

  1. "__ier\_merge__"

  1. "__isv\_clear__"

  1. "__isv\_terminal__"

  1. "__isv\_nonterminal\_leaf__ *nt*"

  1. "__isv\_nonterminal\_range__ *nt*"

  1. "__isv\_nonterminal\_reduce__ *nt*"

  1. "__ias\_push__"

  1. "__ias\_mark__"

  1. "__ias\_mrewind__"

  1. "__ias\_mpop__"

# <a name='section3'></a>CPU STATE

A state value is a list containing the following elements, in the order listed
below:

  1. *code*: Match instructions, see [MATCH PROGRAM
     REPRESENTATION](#subsection1)\.

  1. *pc*: Program counter, *int*\.

  1. *halt*: Halt flag, *boolean*\.

  1. *eof*: Eof flag, *boolean*

  1. *tc*: Terminal cache, and input queue\. Structure see below\.

  1. *cl*: Current location, *int*\.

  1. *ct*: Current token, *[string](\.\./\.\./\.\./\.\./index\.md\#string)*\.

  1. *ok*: Match status, *boolean*\.

  1. *sv*: Semantic value, *[list](\.\./\.\./\.\./\.\./index\.md\#list)*\.

  1. *er*: Error status, *[list](\.\./\.\./\.\./\.\./index\.md\#list)*\.

  1. *ls*: Location stack, *[list](\.\./\.\./\.\./\.\./index\.md\#list)*\.

  1. *as*: AST stack, *[list](\.\./\.\./\.\./\.\./index\.md\#list)*\.

  1. *ms*: AST marker stack, *[list](\.\./\.\./\.\./\.\./index\.md\#list)*\.

  1. *es*: Error stack, *[list](\.\./\.\./\.\./\.\./index\.md\#list)*\.

  1. *rs*: Return stack, *[list](\.\./\.\./\.\./\.\./index\.md\#list)*\.

  1. *nc*: Nonterminal cache, *dictionary*\.

*tc*, the input queue of tokens waiting for processing and the terminal cache
containing the tokens already processing are one unified data structure simply
holding all tokens and their information, with the current location separating
that which has been processed from that which is waiting\. Each element of the
queue/cache is a list containing the token, its lexeme information, line number,
and column index, in this order\.

All stacks have their top element aat the end, i\.e\. pushing an item is
equivalent to appending to the list representing the stack, and popping it
removes the last element\.

*er*, the error status is either empty or a list of two elements, a location
in the input, and a list of messages, encoded as references into the
*[pool](\.\./\.\./\.\./\.\./index\.md\#pool)* element of the *code*\.

*nc*, the nonterminal cache is keyed by nonterminal name and location, each
value a four\-element list containing current location, match status, semantic
value, and error status, in this order\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_me* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [virtual
machine](\.\./\.\./\.\./\.\./index\.md\#virtual\_machine)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005\-2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_me/me_intro.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

[//000000001]: # (grammar::me\_intro \- Grammar operations and usage)
[//000000002]: # (Generated from file 'me\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::me\_intro\(n\) 0\.1 tcllib "Grammar operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::me\_intro \- Introduction to virtual machines for parsing token streams

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

This document is an introduction to and overview of the basic facilities for the
parsing and/or matching of *token* streams\. One possibility often used for the
token domain are characters\.

The packages themselves all provide variants of one *[virtual
machine](\.\./\.\./\.\./\.\./index\.md\#virtual\_machine)*, called a *match engine*
\(short *ME*\), which has all the facilities needed for the matching and parsing
of a stream, and which are either controlled directly, or are customized with a
match program\. The virtual machine is basically a pushdown automaton, with
additional elements for backtracking and/or handling of semantic data and
construction of abstract syntax trees \(*[AST](\.\./\.\./\.\./\.\./index\.md\#ast)*\)\.

Because of the high degree of similarity in the actual implementations of the
aforementioned virtual machine and the data structures they receive and generate
these common parts are specified in a separate document which will be referenced
by the documentation for packages actually implementing it\.

The relevant documents are:

  - __[grammar::me\_vm](me\_vm\.md)__

    Virtual machine specification\.

  - __[grammar::me\_ast](me\_ast\.md)__

    Specification of various representations used for abstract syntax trees\.

  - __[grammar::me::util](me\_util\.md)__

    Utility commands\.

  - __[grammar::me::tcl](me\_tcl\.md)__

    Singleton ME virtual machine implementation tied to Tcl for control flow and
    stacks\. Hardwired for pull operation\. Uninteruptible during processing\.

  - __[grammar::me::cpu](me\_cpu\.md)__

    Object\-based ME virtual machine implementation with explicit control flow,
    and stacks, using bytecodes\. Suspend/Resumable\. Push/pull operation\.

  - __[grammar::me::cpu::core](me\_cpucore\.md)__

    Core functionality for state manipulation and stepping used in the bytecode
    based implementation of ME virtual machines\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_me* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[CFG](\.\./\.\./\.\./\.\./index\.md\#cfg), [CFL](\.\./\.\./\.\./\.\./index\.md\#cfl),
[LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_), [PEG](\.\./\.\./\.\./\.\./index\.md\#peg),
[TPDL](\.\./\.\./\.\./\.\./index\.md\#tpdl), [context\-free
grammar](\.\./\.\./\.\./\.\./index\.md\#context\_free\_grammar), [context\-free
languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer), [virtual
machine](\.\./\.\./\.\./\.\./index\.md\#virtual\_machine)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_me/me_tcl.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398

[//000000001]: # (grammar::me::tcl \- Grammar operations and usage)
[//000000002]: # (Generated from file 'me\_tcl\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::me::tcl\(n\) 0\.1 tcllib "Grammar operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::me::tcl \- Virtual machine implementation I for parsing token streams

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [MACHINE STATE](#section3)

  - [MACHINE INSTRUCTIONS](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require grammar::me::tcl ?0\.1?  

[__::grammar::me::tcl__ __cmd__ *\.\.\.*](#1)  
[__::grammar::me::tcl__ __init__ *nextcmd* ?*tokmap*?](#2)  
[__::grammar::me::tcl__ __lc__ *location*](#3)  
[__::grammar::me::tcl__ __tok__ *from* ?*to*?](#4)  
[__::grammar::me::tcl__ __tokens__](#5)  
[__::grammar::me::tcl__ __sv__](#6)  
[__::grammar::me::tcl__ __ast__](#7)  
[__::grammar::me::tcl__ __astall__](#8)  
[__::grammar::me::tcl__ __ctok__](#9)  
[__::grammar::me::tcl__ __nc__](#10)  
[__::grammar::me::tcl__ __next__](#11)  
[__::grammar::me::tcl__ __ord__](#12)  
[__::grammar::me::tcl::ict\_advance__ *message*](#13)  
[__::grammar::me::tcl::ict\_match\_token__ *tok* *message*](#14)  
[__::grammar::me::tcl::ict\_match\_tokrange__ *tokbegin* *tokend* *message*](#15)  
[__::grammar::me::tcl::ict\_match\_tokclass__ *code* *message*](#16)  
[__::grammar::me::tcl::inc\_restore__ *nt*](#17)  
[__::grammar::me::tcl::inc\_save__ *nt* *startlocation*](#18)  
[__::grammar::me::tcl::iok\_ok__](#19)  
[__::grammar::me::tcl::iok\_fail__](#20)  
[__::grammar::me::tcl::iok\_negate__](#21)  
[__::grammar::me::tcl::icl\_get__](#22)  
[__::grammar::me::tcl::icl\_rewind__ *oldlocation*](#23)  
[__::grammar::me::tcl::ier\_get__](#24)  
[__::grammar::me::tcl::ier\_clear__](#25)  
[__::grammar::me::tcl::ier\_nonterminal__ *message* *location*](#26)  
[__::grammar::me::tcl::ier\_merge__ *olderror*](#27)  
[__::grammar::me::tcl::isv\_clear__](#28)  
[__::grammar::me::tcl::isv\_terminal__](#29)  
[__::grammar::me::tcl::isv\_nonterminal\_leaf__ *nt* *startlocation*](#30)  
[__::grammar::me::tcl::isv\_nonterminal\_range__ *nt* *startlocation*](#31)  
[__::grammar::me::tcl::isv\_nonterminal\_reduce__ *nt* *startlocation* ?*marker*?](#32)  
[__::grammar::me::tcl::ias\_push__](#33)  
[__::grammar::me::tcl::ias\_mark__](#34)  
[__::grammar::me::tcl::ias\_pop2mark__ *marker*](#35)  

# <a name='description'></a>DESCRIPTION

This package provides an implementation of the ME virtual machine\. Please go and
read the document __[grammar::me\_intro](me\_intro\.md)__ first if you do
not know what a ME virtual machine is\.

This implementation is tied very strongly to Tcl\. All the stacks in the machine
state are handled through the Tcl stack, all control flow is handled by Tcl
commands, and the remaining machine instructions are directly mapped to Tcl
commands\. Especially the matching of nonterminal symbols is handled by Tcl
procedures as well, essentially extending the machine implementation with custom
instructions\.

Further on the implementation handles only a single machine which is
uninteruptible during execution and hardwired for pull operation\. I\.e\. it
explicitly requests each new token through a callback, pulling them into its
state\.

A related package is
__[grammar::peg::interp](\.\./grammar\_peg/peg\_interp\.md)__ which provides
a generic interpreter / parser for parsing expression grammars \(PEGs\),
implemented on top of this implementation of the ME virtual machine\.

# <a name='section2'></a>API

The commands documented in this section do not implement any of the instructions
of the ME virtual machine\. They provide the facilities for the initialization of
the machine and the retrieval of important information\.

  - <a name='1'></a>__::grammar::me::tcl__ __cmd__ *\.\.\.*

    This is an ensemble command providing access to the commands listed in this
    section\. See the methods themselves for detailed specifications\.

  - <a name='2'></a>__::grammar::me::tcl__ __init__ *nextcmd* ?*tokmap*?

    This command \(re\)initializes the machine\. It returns the empty string\. This
    command has to be invoked before any other command of this package\.

    The command prefix *nextcmd* represents the input stream of characters and
    is invoked by the machine whenever the a new character from the stream is
    required\. The instruction for handling this is *ict\_advance*\. The callback
    has to return either the empty list, or a list of 4 elements containing the
    token, its lexeme attribute, and its location as line number and column
    index, in this order\. The empty list is the signal that the end of the input
    stream has been reached\. The lexeme attribute is stored in the terminal
    cache, but otherwise not used by the machine\.

    The optional dictionary *tokmap* maps from tokens to integer numbers\. If
    present the numbers impose an order on the tokens, which is subsequently
    used by *ict\_match\_tokrange* to determine if a token is in the specified
    range or not\. If no token map is specified the lexicographic order of th
    token names will be used instead\. This choice is especially asensible when
    using characters as tokens\.

  - <a name='3'></a>__::grammar::me::tcl__ __lc__ *location*

    This command converts the location of a token given as offset in the input
    stream into the associated line number and column index\. The result of the
    command is a 2\-element list containing the two values, in the order
    mentioned in the previous sentence\. This allows higher levels to convert the
    location information found in the error status and the generated AST into
    more human readable data\.

    *Note* that the command is not able to convert locations which have not
    been reached by the machine yet\. In other words, if the machine has read 7
    tokens the command is able to convert the offsets __0__ to __6__,
    but nothing beyond that\. This also shows that it is not possible to convert
    offsets which refer to locations before the beginning of the stream\.

    After a call of __init__ the state used for the conversion is cleared,
    making further conversions impossible until the machine has read tokens
    again\.

  - <a name='4'></a>__::grammar::me::tcl__ __tok__ *from* ?*to*?

    This command returns a Tcl list containing the part of the input stream
    between the locations *from* and *to* \(both inclusive\)\. If *to* is not
    specified it will default to the value of *from*\.

    Each element of the returned list is a list of four elements, the token, its
    associated lexeme, line number, and column index, in this order\. In other
    words, each element has the same structure as the result of the *nextcmd*
    callback given to __::grammar::me::tcl::init__

    This command places the same restrictions on its location arguments as
    __::grammar::me::tcl::lc__\.

  - <a name='5'></a>__::grammar::me::tcl__ __tokens__

    This command returns the number of tokens currently known to the ME virtual
    machine\.

  - <a name='6'></a>__::grammar::me::tcl__ __sv__

    This command returns the current semantic value *SV* stored in the
    machine\. This is an abstract syntax tree as specified in the document
    __[grammar::me\_ast](me\_ast\.md)__, section __AST VALUES__\.

  - <a name='7'></a>__::grammar::me::tcl__ __ast__

    This method returns the abstract syntax tree currently at the top of the AST
    stack of the ME virtual machine\. This is an abstract syntax tree as
    specified in the document __[grammar::me\_ast](me\_ast\.md)__, section
    __AST VALUES__\.

  - <a name='8'></a>__::grammar::me::tcl__ __astall__

    This method returns the whole stack of abstract syntax trees currently known
    to the ME virtual machine\. Each element of the returned list is an abstract
    syntax tree as specified in the document
    __[grammar::me\_ast](me\_ast\.md)__, section __AST VALUES__\. The
    top of the stack resides at the end of the list\.

  - <a name='9'></a>__::grammar::me::tcl__ __ctok__

    This method returns the current token considered by the ME virtual machine\.

  - <a name='10'></a>__::grammar::me::tcl__ __nc__

    This method returns the contents of the nonterminal cache as a dictionary
    mapping from "__symbol__,__location__" to match information\.

  - <a name='11'></a>__::grammar::me::tcl__ __next__

    This method returns the next token callback as specified during
    initialization of the ME virtual machine\.

  - <a name='12'></a>__::grammar::me::tcl__ __ord__

    This method returns a dictionary containing the *tokmap* specified during
    initialization of the ME virtual machine\.
    ____::grammar::me::tcl::ok____ This variable contains the current
    match status *OK*\. It is provided as variable instead of a command because
    that makes access to this information faster, and the speed of access is
    considered very important here as this information is used constantly to
    determine the control flow\.

# <a name='section3'></a>MACHINE STATE

Please go and read the document __[grammar::me\_vm](me\_vm\.md)__ first for
a specification of the basic ME virtual machine and its state\.

This implementation manages the state described in that document, except for the
stacks minus the AST stack\. In other words, location stack, error stack, return
stack, and ast marker stack are implicitly managed through standard Tcl scoping,
i\.e\. Tcl variables in procedures, outside of this implementation\.

# <a name='section4'></a>MACHINE INSTRUCTIONS

Please go and read the document __[grammar::me\_vm](me\_vm\.md)__ first for
a specification of the basic ME virtual machine and its instruction set\.

This implementation maps all instructions to Tcl commands in the namespace
"::grammar::me::tcl", except for the stack related commands, nonterminal symbols
and control flow\. Here we simply list the commands and explain the differences
to the specified instructions, if there are any\. For their semantics see the
aforementioned specification\. The machine commands are *not* reachable through
the ensemble command __::grammar::me::tcl__\.

  - <a name='13'></a>__::grammar::me::tcl::ict\_advance__ *message*

    No changes\.

  - <a name='14'></a>__::grammar::me::tcl::ict\_match\_token__ *tok* *message*

    No changes\.

  - <a name='15'></a>__::grammar::me::tcl::ict\_match\_tokrange__ *tokbegin* *tokend* *message*

    If, and only if a token map was specified during initialization then the
    arguments are the numeric representations of the smallest and largest tokens
    in the range\. Otherwise they are the relevant tokens themselves and
    lexicographic comparison is used\.

  - <a name='16'></a>__::grammar::me::tcl::ict\_match\_tokclass__ *code* *message*

    No changes\.

  - <a name='17'></a>__::grammar::me::tcl::inc\_restore__ *nt*

    Instead of taking a branchlabel the command returns a boolean value\. The
    result will be __true__ if and only if cached information was found\. The
    caller has to perform the appropriate branching\.

  - <a name='18'></a>__::grammar::me::tcl::inc\_save__ *nt* *startlocation*

    The command takes the start location as additional argument, as it is
    managed on the Tcl stack, and not in the machine state\.

  - __icf\_ntcall__ *branchlabel*

  - __icf\_ntreturn__

    These two instructions are not mapped to commands\. They are control flow
    instructions and handled in Tcl\.

  - <a name='19'></a>__::grammar::me::tcl::iok\_ok__

    No changes\.

  - <a name='20'></a>__::grammar::me::tcl::iok\_fail__

    No changes\.

  - <a name='21'></a>__::grammar::me::tcl::iok\_negate__

    No changes\.

  - __icf\_jalways__ *branchlabel*

  - __icf\_jok__ *branchlabel*

  - __icf\_jfail__ *branchlabel*

  - __icf\_halt__

    These four instructions are not mapped to commands\. They are control flow
    instructions and handled in Tcl\.

  - <a name='22'></a>__::grammar::me::tcl::icl\_get__

    This command returns the current location *CL* in the input\. It replaces
    *icl\_push*\.

  - <a name='23'></a>__::grammar::me::tcl::icl\_rewind__ *oldlocation*

    The command takes the location as argument as it comes from the Tcl stack,
    not the machine state\.

  - __icl\_pop__

    Not mapped, the stacks are not managed by the package\.

  - <a name='24'></a>__::grammar::me::tcl::ier\_get__

    This command returns the current error state *ER*\. It replaces
    *ier\_push*\.

  - <a name='25'></a>__::grammar::me::tcl::ier\_clear__

    No changes\.

  - <a name='26'></a>__::grammar::me::tcl::ier\_nonterminal__ *message* *location*

    The command takes the location as argument as it comes from the Tcl stack,
    not the machine state\.

  - <a name='27'></a>__::grammar::me::tcl::ier\_merge__ *olderror*

    The command takes the second error state to merge as argument as it comes
    from the Tcl stack, not the machine state\.

  - <a name='28'></a>__::grammar::me::tcl::isv\_clear__

    No changes\.

  - <a name='29'></a>__::grammar::me::tcl::isv\_terminal__

    No changes\.

  - <a name='30'></a>__::grammar::me::tcl::isv\_nonterminal\_leaf__ *nt* *startlocation*

    The command takes the start location as argument as it comes from the Tcl
    stack, not the machine state\.

  - <a name='31'></a>__::grammar::me::tcl::isv\_nonterminal\_range__ *nt* *startlocation*

    The command takes the start location as argument as it comes from the Tcl
    stack, not the machine state\.

  - <a name='32'></a>__::grammar::me::tcl::isv\_nonterminal\_reduce__ *nt* *startlocation* ?*marker*?

    The command takes start location and marker as argument as it comes from the
    Tcl stack, not the machine state\.

  - <a name='33'></a>__::grammar::me::tcl::ias\_push__

    No changes\.

  - <a name='34'></a>__::grammar::me::tcl::ias\_mark__

    This command returns a marker for the current state of the AST stack *AS*\.
    The marker stack is not managed by the machine\.

  - <a name='35'></a>__::grammar::me::tcl::ias\_pop2mark__ *marker*

    The command takes the marker as argument as it comes from the Tcl stack, not
    the machine state\. It replaces *ias\_mpop*\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_me* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [virtual
machine](\.\./\.\./\.\./\.\./index\.md\#virtual\_machine)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_me/me_util.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

[//000000001]: # (grammar::me::util \- Grammar operations and usage)
[//000000002]: # (Generated from file 'me\_util\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::me::util\(n\) 0\.1 tcllib "Grammar operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::me::util \- AST utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require grammar::me::util ?0\.1?  

[__::grammar::me::util::ast2tree__ *ast* *tree* ?*root*?](#1)  
[__::grammar::me::util::ast2etree__ *ast* *mcmd* *tree* ?*root*?](#2)  
[__mcmd__ __lc__ *location*](#3)  
[__mcmd__ __tok__ *from* ?*to*?](#4)  
[__::grammar::me::util::tree2ast__ *tree* ?*root*?](#5)  

# <a name='description'></a>DESCRIPTION

This package provides a number of utility command for the conversion between the
various representations of abstract syntax trees as specified in the document
__[grammar::me\_ast](me\_ast\.md)__\.

  - <a name='1'></a>__::grammar::me::util::ast2tree__ *ast* *tree* ?*root*?

    This command converts an *ast* from value to object representation\. All
    nodes in the *ast* will be converted into nodes of this *tree*, with the
    root of the AST a child of the node *root*\. If this node is not explicitly
    specified the root of the tree is used\. Existing content of tree is not
    touched, i\.e\. neither removed nor changed, with the exception of the
    specified root node, which will gain a new child\.

  - <a name='2'></a>__::grammar::me::util::ast2etree__ *ast* *mcmd* *tree* ?*root*?

    This command is like __::grammar::me::util::ast2tree__, except that the
    result is in the extended object representation of the input AST\. The source
    of the extended information is the command prefix *mcmd*\. It has to
    understand two methods, __lc__, and __tok__, with the semantics
    specified below\.

      * <a name='3'></a>__mcmd__ __lc__ *location*

        Takes the location of a token given as offset in the input stream and
        return a 2\-element list containing the associated line number and column
        index, in this order\.

      * <a name='4'></a>__mcmd__ __tok__ *from* ?*to*?

        Takes one or two locations *from* and *to* as offset in the input
        stream and returns a Tcl list containing the specified part of the input
        stream\. Both location are inclusive\. If *to* is not specified it will
        default to the value of *from*\.

        Each element of the returned list is a list containing the token, its
        associated lexeme, the line number, and column index, in this order\.

    Both the ensemble command __::grammar::me::tcl__ provided by the package
    __[grammar::me::tcl](me\_tcl\.md)__ and the objects command created by
    the package __::grammar::me::cpu__ fit the above specification\.

  - <a name='5'></a>__::grammar::me::util::tree2ast__ *tree* ?*root*?

    This command converts an *ast* in \(extended\) object representation into a
    value and returns it\. If a *root* node is specified the AST is generated
    from that node downward\. Otherwise the root of the tree object is used as
    the starting point\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_me* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[abstract syntax tree](\.\./\.\./\.\./\.\./index\.md\#abstract\_syntax\_tree), [syntax
tree](\.\./\.\./\.\./\.\./index\.md\#syntax\_tree),
[tree](\.\./\.\./\.\./\.\./index\.md\#tree)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_me/me_vm.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560

[//000000001]: # (grammar::me\_vm \- Grammar operations and usage)
[//000000002]: # (Generated from file 'me\_vm\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::me\_vm\(n\) 0\.1 tcllib "Grammar operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::me\_vm \- Virtual machine for parsing token streams

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [MACHINE STATE](#section2)

  - [MACHINE INSTRUCTIONS](#section3)

      - [TERMINAL MATCHING](#subsection1)

      - [NONTERMINAL MATCHING](#subsection2)

      - [UNCONDITIONAL MATCHING](#subsection3)

      - [CONTROL FLOW](#subsection4)

      - [INPUT LOCATION HANDLING](#subsection5)

      - [ERROR HANDLING](#subsection6)

      - [SEMANTIC VALUES](#subsection7)

      - [AST STACK HANDLING](#subsection8)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

Please go and read the document __[grammar::me\_intro](me\_intro\.md)__
first for an overview of the various documents and their relations\.

This document specifies a virtual machine for the controlled matching and
parsing of token streams, creating an *[abstract syntax
tree](\.\./\.\./\.\./\.\./index\.md\#abstract\_syntax\_tree)* \(short
*[AST](\.\./\.\./\.\./\.\./index\.md\#ast)*\) reflecting the structure of the input\.
Special machine features are the caching and reuse of partial results, caching
of the encountered input, and the ability to backtrack in both input and AST
creation\.

These features make the specified virtual machine especially useful to packrat
parsers based on parsing expression grammars\. It is however not restricted to
this type of parser\. Normal LL and LR parsers can be implemented with it as
well\.

The following sections will discuss first the abstract state kept by ME virtual
machines, and then their instruction set\.

# <a name='section2'></a>MACHINE STATE

A ME virtual machine manages the following state:

  - *Current token* CT

    The token from the input under consideration by the machine\.

    This information is used and modified by the instructions defined in the
    section [TERMINAL MATCHING](#subsection1)\.

  - *Current location* CL

    The location of the *current token* in the input stream, as offset
    relative to the beginning of the stream\. The first token is considered to be
    at offset __0__\.

    This information is implicitly used and modified by the instructions defined
    in the sections [TERMINAL MATCHING](#subsection1) and [NONTERMINAL
    MATCHING](#subsection2), and can be directly queried and modified by the
    instructions defined in section [INPUT LOCATION
    HANDLING](#subsection5)\.

  - *Location stack* LS

    In addition to the above a stack of locations, for backtracking\. Locations
    can put on the stack, removed from it, and removed with setting the current
    location\.

    This information is implicitly used and modified by the instructions defined
    in the sections [TERMINAL MATCHING](#subsection1) and [NONTERMINAL
    MATCHING](#subsection2), and can be directly queried and modified by the
    instructions defined in section [INPUT LOCATION
    HANDLING](#subsection5)\.

  - *Match status* OK

    A boolean value, the result of the last attempt at matching input\. It is set
    to __true__ if that attempt was successful, and __false__ otherwise\.

    This information is influenced by the instructions defined in the sections
    [TERMINAL MATCHING](#subsection1), [NONTERMINAL
    MATCHING](#subsection2), and [UNCONDITIONAL
    MATCHING](#subsection3)\. It is queried by the instructions defined in
    the section [CONTROL FLOW](#subsection4)\.

  - *Semantic value* SV

    The semantic value associated with \(generated by\) the last attempt at
    matching input\. Contains either the empty string or a node for the abstract
    syntax tree constructed from the input\.

    This information is influenced by the instructions defined in the sections
    [SEMANTIC VALUES](#subsection7), and [AST STACK
    HANDLING](#subsection8)\.

  - *AST stack* AS

    A stack of partial abstract syntax trees constructed by the machine during
    matching\.

    This information is influenced by the instructions defined in the sections
    [SEMANTIC VALUES](#subsection7), and [AST STACK
    HANDLING](#subsection8)\.

  - *AST Marker stack* MS

    In addition to the above a stack of stacks, for backtracking\. This is
    actually a stack of markers into the AST stack, thus implicitly snapshooting
    the state of the AST stack at some point in time\. Markers can be put on the
    stack, dropped from it, and used to roll back the AST stack to an earlier
    state\.

    This information is influenced by the instructions defined in the sections
    [SEMANTIC VALUES](#subsection7), and [AST STACK
    HANDLING](#subsection8)\.

  - *Error status* ER

    Error information associated with the last attempt at matching input\.
    Contains either the empty string or a list of 2 elements, a location in the
    input and a list of error messages associated with it, in this order\.

    *Note* that error information can be set even if the last attempt at
    matching input was successful\. For example the \*\-operator \(matching a
    sub\-expression zero or more times\) in a parsing expression grammar is always
    successful, even if it encounters a problem further in the input and has to
    backtrack\. Such problems must not be forgotten when continuing to match\.

    This information is queried and influenced by the instructions defined in
    the sections [TERMINAL MATCHING](#subsection1), [NONTERMINAL
    MATCHING](#subsection2), and [ERROR HANDLING](#subsection6)\.

  - *Error stack* ES

    In addition to the above a stack of error information, to allow the merging
    of current and older error information when performing backtracking in
    choices after an unsucessful match\.

    This information is queried and influenced by the instructions defined in
    the sections [TERMINAL MATCHING](#subsection1), [NONTERMINAL
    MATCHING](#subsection2), and [ERROR HANDLING](#subsection6)\.

  - *Return stack* RS

    A stack of program counter values, i\.e\. locations in the code controlling
    the virtual machine, for the management of subroutine calls, i\.e\. the
    matching of nonterminal symbols\.

    This information is queried and influenced by the instructions defined in
    the section [NONTERMINAL MATCHING](#subsection2)\.

  - *Nonterminal cache* NC

    A cache of machine states \(A 4\-tuple containing a location in the input,
    match status *OK*, semantic value *SV*, and error status *ER*\) keyed
    by name of nonterminal symbol and location in the input stream\.

    The key location is where machine started the attempt to match the named
    nonterminal symbol, and the location in the value is where machine ended up
    after the attempt completed, independent of the success of the attempt\.

    This status is queried and influenced by the instructions defined in the
    section [NONTERMINAL MATCHING](#subsection2)\.

# <a name='section3'></a>MACHINE INSTRUCTIONS

With the machine state specified it is now possible to explain the instruction
set of ME virtual machines\. They are grouped roughly by the machine state they
influence and/or query\.

## <a name='subsection1'></a>TERMINAL MATCHING

First the instructions to match tokens from the input stream, and by extension
all terminal symbols\.

These instructions are the only ones which may retrieve a new token from the
input stream\. This is a *may* and not a *will* because the instructions will
a retrieve new token if, and only if the current location *CL* is at the head
of the stream\. If the machine has backtracked \(see __icl\_rewind__\) the
instructions will retrieve the token to compare against from the internal cache\.

  - __ict\_advance__ *message*

    This instruction tries to advance to the next token in the input stream,
    i\.e\. the one after the current location *CL*\. The instruction will fail
    if, and only if the end of the input stream is reached, i\.e\. if there is no
    next token\.

    The sucess/failure of the instruction is remembered in the match status
    *OK*\. In the case of failure the error status *ER* is set to the current
    location and the message *message*\. In the case of success the error
    status *ER* is cleared, the new token is made the current token *CT*,
    and the new location is made the current location *CL*\.

    The argument *message* is a reference to the string to put into the error
    status *ER*, if such is needed\.

  - __ict\_match\_token__ *tok* *message*

    This instruction tests the current token *CT* for equality with the
    argument *tok* and records the result in the match status *OK*\. The
    instruction fails if the current token is not equal to *tok*\.

    In case of failure the error status *ER* is set to the current location
    *CL* and the message *message*, and the current location *CL* is moved
    one token backwards\. Otherwise, i\.e\. upon success, the error status *ER*
    is cleared and the current location *CL* is not touched\.

  - __ict\_match\_tokrange__ *tokbegin* *tokend* *message*

    This instruction tests the current token *CT* for being in the range of
    tokens from *tokbegin* to *tokend* \(inclusive\) and records the result in
    the match status *OK*\. The instruction fails if the current token is not
    inside the range\.

    In case of failure the error status *ER* is set to the current location
    *CL* and the message *message*, and the current location *CL* is moved
    one token backwards\. Otherwise, i\.e\. upon success, the error status *ER*
    is cleared and the current location *CL* is not touched\.

  - __ict\_match\_tokclass__ *code* *message*

    This instruction tests the current token *CT* for being a member of the
    token class *code* and records the result in the match status *OK*\. The
    instruction fails if the current token is not a member of the specified
    class\.

    In case of failure the error status *ER* is set to the current location
    *CL* and the message *message*, and the current location *CL* is moved
    one token backwards\. Otherwise, i\.e\. upon success, the error status *ER*
    is cleared and the current location *CL* is not touched\.

    Currently the following classes are legal:

      * alnum

        A token is accepted if it is a unicode alphabetical character, or a
        digit\.

      * alpha

        A token is accepted if it is a unicode alphabetical character\.

      * digit

        A token is accepted if it is a unicode digit character\.

      * xdigit

        A token is accepted if it is a hexadecimal digit character\.

      * punct

        A token is accepted if it is a unicode punctuation character\.

      * space

        A token is accepted if it is a unicode space character\.

## <a name='subsection2'></a>NONTERMINAL MATCHING

The instructions in this section handle the matching of nonterminal symbols\.
They query the nonterminal cache *NC* for saved information, and put such
information into the cache\.

The usage of the cache is a performance aid for backtracking parsers, allowing
them to avoid an expensive rematch of complex nonterminal symbols if they have
been encountered before\.

  - __inc\_restore__ *branchlabel* *nt*

    This instruction checks if the nonterminal cache *NC* contains information
    about the nonterminal symbol *nt*, at the current location *CL*\. If that
    is the case the instruction will update the machine state \(current location
    *CL*, match status *OK*, semantic value *SV*, and error status *ER*\)
    with the found information and continue execution at the instruction refered
    to by the *branchlabel*\. The new current location *CL* will be the last
    token matched by the nonterminal symbol, i\.e\. belonging to it\.

    If no information was found the instruction will continue execution at the
    next instruction\.

    Together with __icf\_ntcall__ it is possible to generate code for
    memoized and non\-memoized matching of nonterminal symbols, either as
    subroutine calls, or inlined in the caller\.

  - __inc\_save__ *nt*

    This instruction saves the current state of the machine \(current location
    *CL*, match status *OK*, semantic value *SV*, and error status
    *ER*\), to the nonterminal cache *NC*\. It will also pop an entry from the
    location stack *LS* and save it as the start location of the match\.

    It is expected to be called at the end of matching a nonterminal symbol,
    with *nt* the name of the nonterminal symbol the code was working on\. This
    allows the instruction __inc\_restore__ to check for and retrieve the
    data, should we have to match this nonterminal symbol at the same location
    again, during backtracking\.

  - __icf\_ntcall__ *branchlabel*

    This instruction invokes the code for matching the nonterminal symbol *nt*
    as a subroutine\. To this end it stores the current program counter *PC* on
    the return stack *RS*, the current location *CL* on the location stack
    *LS*, and then continues execution at the address *branchlabel*\.

    The next matching __icf\_ntreturn__ will cause the execution to continue
    at the instruction coming after the call\.

  - __icf\_ntreturn__

    This instruction will pop an entry from the return stack *RS*, assign it
    to the program counter *PC*, and then continue execution at the new
    address\.

## <a name='subsection3'></a>UNCONDITIONAL MATCHING

The instructions in this section are the remaining match operators\. They change
the match status *OK* directly and unconditionally\.

  - __iok\_ok__

    This instruction sets the match status *OK* to __true__, indicating a
    successful match\.

  - __iok\_fail__

    This instruction sets the match status *OK* to __false__, indicating a
    failed match\.

  - __iok\_negate__

    This instruction negates the match status *OK*, turning a failure into a
    success and vice versa\.

## <a name='subsection4'></a>CONTROL FLOW

The instructions in this section implement both conditional and unconditional
control flow\. The conditional jumps query the match status *OK*\.

  - __icf\_jalways__ *branchlabel*

    This instruction sets the program counter *PC* to the address specified by
    *branchlabel* and then continues execution from there\. This is an
    unconditional jump\.

  - __icf\_jok__ *branchlabel*

    This instruction sets the program counter *PC* to the address specified by
    *branchlabel*\. This happens if, and only if the match status *OK*
    indicates a success\. Otherwise it simply continues execution at the next
    instruction\. This is a conditional jump\.

  - __icf\_jfail__ *branchlabel*

    This instruction sets the program counter *PC* to the address specified by
    *branchlabel*\. This happens if, and only if the match status *OK*
    indicates a failure\. Otherwise it simply continues execution at the next
    instruction\. This is a conditional jump\.

  - __icf\_halt__

    This instruction halts the machine and blocks any further execution\.

## <a name='subsection5'></a>INPUT LOCATION HANDLING

The instructions in this section are for backtracking, they manipulate the
current location *CL* of the machine state\. They allow a user of the machine
to query and save locations in the input, and to rewind the current location
*CL* to saved locations, making them one of the components enabling the
implementation of backtracking parsers\.

  - __icl\_push__

    This instruction pushes a copy of the current location *CL* on the
    location stack *LS*\.

  - __icl\_rewind__

    This instruction pops an entry from the location stack *LS* and then moves
    the current location *CL* back to this point in the input\.

  - __icl\_pop__

    This instruction pops an entry from the location stack *LS* and discards
    it\.

## <a name='subsection6'></a>ERROR HANDLING

The instructions in this section provide read and write access to the error
status *ER* of the machine\.

  - __ier\_push__

    This instruction pushes a copy of the current error status *ER* on the
    error stack *ES*\.

  - __ier\_clear__

    This instruction clears the error status *ER*\.

  - __ier\_nonterminal__ *message*

    This instruction checks if the error status *ER* contains an error whose
    location is just past the location found in the top entry of the location
    stack *LS*\. Nothing happens if no such error is found\. Otherwise the found
    error is replaced by an error at the location found on the stack, having the
    message *message*\.

  - __ier\_merge__

    This instruction pops an entry from the error stack *ES*, merges it with
    the current error status *ER* and stores the result of the merge as the
    new error status *ER*\.

    The merge is performed as described below:

    If one of the two error states is empty the other is chosen\. If neither
    error state is empty, and refering to different locations, then the error
    state with the location further in the input is chosen\. If both error states
    refer to the same location their messages are merged \(with removing
    duplicates\)\.

## <a name='subsection7'></a>SEMANTIC VALUES

The instructions in this section manipulate the semantic value *SV*\.

  - __isv\_clear__

    This instruction clears the semantic value *SV*\.

  - __isv\_terminal__

    This instruction creates a terminal AST node for the current token *CT*,
    makes it the semantic value *SV*, and also pushes the node on the AST
    stack *AS*\.

  - __isv\_nonterminal\_leaf__ *nt*

    This instruction creates a nonterminal AST node without any children for the
    nonterminal *nt*, and makes it the semantic value *SV*\.

    This instruction should be executed if, and only if the match status *OK*
    indicates a success\. In the case of a failure __isv\_clear__ should be
    called\.

  - __isv\_nonterminal\_range__ *nt*

    This instruction creates a nonterminal AST node for the nonterminal *nt*,
    with a single terminal node as its child, and makes this AST the semantic
    value *SV*\. The terminal node refers to the input string from the location
    found on top of the location stack *LS* to the current location *CL*
    \(both inclusive\)\.

    This instruction should be executed if, and only if the match status *OK*
    indicates a success\. In the case of a failure __isv\_clear__ should be
    called\.

  - __isv\_nonterminal\_reduce__ *nt*

    This instruction creates a nonterminal AST node for the nonterminal *nt*
    and makes it the semantic value *SV*\.

    All entries on the AST stack *AS* above the marker found in the top entry
    of the AST Marker stack *MS* become children of the new node, with the
    entry at the stack top becoming the rightmost child\. If the AST Marker stack
    *MS* is empty the whole stack is used\. The AST marker stack *MS* is left
    unchanged\.

    This instruction should be executed if, and only if the match status *OK*
    indicates a success\. In the case of a failure __isv\_clear__ should be
    called\.

## <a name='subsection8'></a>AST STACK HANDLING

The instructions in this section manipulate the AST stack *AS*, and the AST
Marker stack *MS*\.

  - __ias\_push__

    This instruction pushes the semantic value *SV* on the AST stack *AS*\.

  - __ias\_mark__

    This instruction pushes a marker for the current state of the AST stack
    *AS* on the AST Marker stack *MS*\.

  - __ias\_mrewind__

    This instruction pops an entry from the AST Marker stack *MS* and then
    proceeds to pop entries from the AST stack *AS* until the state
    represented by the popped marker has been reached again\. Nothing is done if
    the AST stack *AS* is already smaller than indicated by the popped marker\.

  - __ias\_mpop__

    This instruction pops an entry from the AST Marker stack *MS* and discards
    it\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_me* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [virtual
machine](\.\./\.\./\.\./\.\./index\.md\#virtual\_machine)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_peg/peg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573

[//000000001]: # (grammar::peg \- Grammar operations and usage)
[//000000002]: # (Generated from file 'peg\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::peg\(n\) 0\.1 tcllib "Grammar operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::peg \- Create and manipulate parsing expression grammars

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [TERMS & CONCEPTS](#subsection1)

      - [CONTAINER CLASS API](#subsection2)

      - [CONTAINER OBJECT API](#subsection3)

      - [PARSING EXPRESSIONS](#subsection4)

  - [PARSING EXPRESSION GRAMMARS](#section2)

  - [REFERENCES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit  
package require grammar::peg ?0\.1?  

[__::grammar::peg__ *pegName* ?__=__&#124;__:=__&#124;__<\-\-__&#124;__as__&#124;__deserialize__ *src*?](#1)  
[*pegName* __destroy__](#2)  
[*pegName* __clear__](#3)  
[*pegName* __=__ *srcPEG*](#4)  
[*pegName* __\-\->__ *dstPEG*](#5)  
[*pegName* __serialize__](#6)  
[*pegName* __deserialize__ *serialization*](#7)  
[*pegName* __is valid__](#8)  
[*pegName* __start__ ?*pe*?](#9)  
[*pegName* __nonterminals__](#10)  
[*pegName* __nonterminal add__ *nt* *pe*](#11)  
[*pegName* __nonterminal delete__ *nt1* ?*nt2* \.\.\.?](#12)  
[*pegName* __nonterminal exists__ *nt*](#13)  
[*pegName* __nonterminal rename__ *nt* *ntnew*](#14)  
[*pegName* __nonterminal mode__ *nt* ?*mode*?](#15)  
[*pegName* __nonterminal rule__ *nt*](#16)  
[*pegName* __unknown nonterminals__](#17)  

# <a name='description'></a>DESCRIPTION

This package provides a container class for *parsing expression grammars*
\(Short: PEG\)\. It allows the incremental definition of the grammar, its
manipulation and querying of the definition\. The package neither provides
complex operations on the grammar, nor has it the ability to execute a grammar
definition for a stream of symbols\. Two packages related to this one are
__grammar::mengine__ and __grammar::peg::interpreter__\. The first of
them defines a general virtual machine for the matching of a character stream,
and the second implements an interpreter for parsing expression grammars on top
of that virtual machine\.

## <a name='subsection1'></a>TERMS & CONCEPTS

PEGs are similar to context\-free grammars, but not equivalent; in some cases
PEGs are strictly more powerful than context\-free grammars \(there exist PEGs for
some non\-context\-free languages\)\. The formal mathematical definition of parsing
expressions and parsing expression grammars can be found in section [PARSING
EXPRESSION GRAMMARS](#section2)\.

In short, we have *terminal symbols*, which are the most basic building blocks
for *sentences*, and *nonterminal symbols* with associated *parsing
expressions*, defining the grammatical structure of the sentences\. The two sets
of symbols are distinctive, and do not overlap\. When speaking about symbols the
word "symbol" is often left out\. The union of the sets of terminal and
nonterminal symbols is called the set of *symbols*\.

Here the set of *terminal symbols* is not explicitly managed, but implicitly
defined as the set of all characters\. Note that this means that we inherit from
Tcl the ability to handle all of Unicode\.

A pair of *nonterminal* and *[parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression)* is also called a
*grammatical rule*, or *rule* for short\. In the context of a rule the
nonterminal is often called the left\-hand\-side \(LHS\), and the parsing expression
the right\-hand\-side \(RHS\)\.

The *start expression* of a grammar is a parsing expression from which all the
sentences contained in the language specified by the grammar are *derived*\. To
make the understanding of this term easier let us assume for a moment that the
RHS of each rule, and the start expression, is either a sequence of symbols, or
a series of alternate parsing expressions\. In the latter case the rule can be
seen as a set of rules, each providing one alternative for the nonterminal\. A
parsing expression A' is now a derivation of a parsing expression A if we pick
one of the nonterminals N in the expression, and one of the alternative rules R
for N, and then replace the nonterminal in A with the RHS of the chosen rule\.
Here we can see why the terminal symbols are called such\. They cannot be
expanded any further, thus terminate the process of deriving new expressions\. An
example

    Rules
      (1)  A <- a B c
      (2a) B <- d B
      (2b) B <- e

    Some derivations, using starting expression A.

      A -/1/-> a B c -/2a/-> a d B c -/2b/-> a d e c

A derived expression containing only terminal symbols is a *sentence*\. The set
of all sentences which can be derived from the start expression is the
*language* of the grammar\.

Some definitions for nonterminals and expressions:

  1. A nonterminal A is called *reachable* if it is possible to derive a
     parsing expression from the start expression which contains A\.

  1. A nonterminal A is called *useful* if it is possible to derive a sentence
     from it\.

  1. A nonterminal A is called *recursive* if it is possible to derive a
     parsing expression from it which contains A, again\.

  1. The *FIRST set* of a nonterminal A contains all the symbols which can
     occur of as the leftmost symbol in a parsing expression derived from A\. If
     the FIRST set contains A itself then that nonterminal is called
     *left\-recursive*\.

  1. The *LAST set* of a nonterminal A contains all the symbols which can
     occur of as the rightmost symbol in a parsing expression derived from A\. If
     the LAST set contains A itself then that nonterminal is called
     *right\-recursive*\.

  1. The *FOLLOW set* of a nonterminal A contains all the symbols which can
     occur after A in a parsing expression derived from the start expression\.

  1. A nonterminal \(or parsing expression\) is called *nullable* if the empty
     sentence can be derived from it\.

And based on the above definitions for grammars:

  1. A grammar G is *recursive* if and only if it contains a nonterminal A
     which is recursive\. The terms *left\-* and *right\-recursive*, and
     *useful* are analogously defined\.

  1. A grammar is *minimal* if it contains only *reachable* and *useful*
     nonterminals\.

  1. A grammar is *wellformed* if it is not left\-recursive\. Such grammars are
     also *complete*, which means that they always succeed or fail on all
     input sentences\. For an incomplete grammar on the other hand input
     sentences exist for which an attempt to match them against the grammar will
     not terminate\.

  1. As we wish to allow ourselves to build a grammar incrementally in a
     container object we will encounter stages where the RHS of one or more
     rules reference symbols which are not yet known to the container\. Such a
     grammar we call *invalid*\. We cannot use the term *incomplete* as this
     term is already taken, see the last item\.

## <a name='subsection2'></a>CONTAINER CLASS API

The package exports the API described here\.

  - <a name='1'></a>__::grammar::peg__ *pegName* ?__=__&#124;__:=__&#124;__<\-\-__&#124;__as__&#124;__deserialize__ *src*?

    The command creates a new container object for a parsing expression grammar
    and returns the fully qualified name of the object command as its result\.
    The API the returned command is following is described in the section
    [CONTAINER OBJECT API](#subsection3)\. It may be used to invoke various
    operations on the container and the grammar within\.

    The new container, i\.e\. grammar will be empty if no *src* is specified\.
    Otherwise it will contain a copy of the grammar contained in the *src*\.
    The *src* has to be a container object reference for all operators except
    __deserialize__\. The __deserialize__ operator requires *src* to be
    the serialization of a parsing expression grammar instead\.

    An empty grammar has no nonterminal symbols, and the start expression is the
    empty expression, i\.e\. epsilon\. It is *valid*, but not *useful*\.

## <a name='subsection3'></a>CONTAINER OBJECT API

All grammar container objects provide the following methods for the manipulation
of their contents:

  - <a name='2'></a>*pegName* __destroy__

    Destroys the grammar, including its storage space and associated command\.

  - <a name='3'></a>*pegName* __clear__

    Clears out the definition of the grammar contained in *pegName*, but does
    *not* destroy the object\.

  - <a name='4'></a>*pegName* __=__ *srcPEG*

    Assigns the contents of the grammar contained in *srcPEG* to *pegName*,
    overwriting any existing definition\. This is the assignment operator for
    grammars\. It copies the grammar contained in the grammar object *srcPEG*
    over the grammar definition in *pegName*\. The old contents of *pegName*
    are deleted by this operation\.

    This operation is in effect equivalent to

    > *pegName* __deserialize__ \[*srcPEG* __serialize__\]

  - <a name='5'></a>*pegName* __\-\->__ *dstPEG*

    This is the reverse assignment operator for grammars\. It copies the
    automation contained in the object *pegName* over the grammar definition
    in the object *dstPEG*\. The old contents of *dstPEG* are deleted by this
    operation\.

    This operation is in effect equivalent to

    > *dstPEG* __deserialize__ \[*pegName* __serialize__\]

  - <a name='6'></a>*pegName* __serialize__

    This method serializes the grammar stored in *pegName*\. In other words it
    returns a tcl *value* completely describing that grammar\. This allows, for
    example, the transfer of grammars over arbitrary channels, persistence, etc\.
    This method is also the basis for both the copy constructor and the
    assignment operator\.

    The result of this method has to be semantically identical over all
    implementations of the __grammar::peg__ interface\. This is what will
    enable us to copy grammars between different implementations of the same
    interface\.

    The result is a list of four elements with the following structure:

      1. The constant string __grammar::peg__\.

      1. A dictionary\. Its keys are the names of all known nonterminal symbols,
         and their associated values are the parsing expressions describing
         their sentennial structure\.

      1. A dictionary\. Its keys are the names of all known nonterminal symbols,
         and their associated values hints to a matcher regarding the semantic
         values produced by the symbol\.

      1. The last item is a parsing expression, the *start expression* of the
         grammar\.

    Assuming the following PEG for simple mathematical expressions

    Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'
    Sign       <- '+' / '-'
    Number     <- Sign? Digit+
    Expression <- '(' Expression ')' / (Factor (MulOp Factor)*)
    MulOp      <- '*' / '/'
    Factor     <- Term (AddOp Term)*
    AddOp      <- '+'/'-'
    Term       <- Number

    a possible serialization is

    grammar::peg \
    {Expression {/ {x ( Expression )} {x Factor {* {x MulOp Factor}}}} \
     Factor     {x Term {* {x AddOp Term}}} \
     Term       Number \
     MulOp      {/ * /} \
     AddOp      {/ + -} \
     Number     {x {? Sign} {+ Digit}} \
     Sign       {/ + -} \
     Digit      {/ 0 1 2 3 4 5 6 7 8 9} \
    } \
    {Expression value     Factor     value \
     Term       value     MulOp      value \
     AddOp      value     Number     value \
     Sign       value     Digit      value \
    }
    Expression

    A possible one, because the order of the nonterminals in the dictionary is
    not relevant\.

  - <a name='7'></a>*pegName* __deserialize__ *serialization*

    This is the complement to __serialize__\. It replaces the grammar
    definition in *pegName* with the grammar described by the
    *serialization* value\. The old contents of *pegName* are deleted by this
    operation\.

  - <a name='8'></a>*pegName* __is valid__

    A predicate\. It tests whether the PEG in *pegName* is *valid*\. See
    section [TERMS & CONCEPTS](#subsection1) for the definition of this
    grammar property\. The result is a boolean value\. It will be set to
    __true__ if the PEG has the tested property, and __false__
    otherwise\.

  - <a name='9'></a>*pegName* __start__ ?*pe*?

    This method defines the *start expression* of the grammar\. It replaces the
    previously defined start expression with the parsing expression *pe*\. The
    method fails and throws an error if *pe* does not contain a valid parsing
    expression as specified in the section [PARSING
    EXPRESSIONS](#subsection4)\. In that case the existing start expression
    is not changed\. The method returns the empty string as its result\.

    If the method is called without an argument it will return the currently
    defined start expression\.

  - <a name='10'></a>*pegName* __nonterminals__

    Returns the set of all nonterminal symbols known to the grammar\.

  - <a name='11'></a>*pegName* __nonterminal add__ *nt* *pe*

    This method adds the nonterminal *nt* and its associated parsing
    expression *pe* to the set of nonterminal symbols and rules of the PEG
    contained in the object *pegName*\. The method fails and throws an error if
    either the string *nt* is already known as a symbol of the grammar, or if
    *pe* does not contain a valid parsing expression as specified in the
    section [PARSING EXPRESSIONS](#subsection4)\. In that case the current
    set of nonterminal symbols and rules is not changed\. The method returns the
    empty string as its result\.

  - <a name='12'></a>*pegName* __nonterminal delete__ *nt1* ?*nt2* \.\.\.?

    This method removes the named symbols *nt1*, *nt2* from the set of
    nonterminal symbols of the PEG contained in the object *pegName*\. The
    method fails and throws an error if any of the strings is not known as a
    nonterminal symbol\. In that case the current set of nonterminal symbols is
    not changed\. The method returns the empty string as its result\.

    The stored grammar becomes invalid if the deleted nonterminals are
    referenced by the RHS of still\-known rules\.

  - <a name='13'></a>*pegName* __nonterminal exists__ *nt*

    A predicate\. It tests whether the nonterminal symbol *nt* is known to the
    PEG in *pegName*\. The result is a boolean value\. It will be set to
    __true__ if the symbol *nt* is known, and __false__ otherwise\.

  - <a name='14'></a>*pegName* __nonterminal rename__ *nt* *ntnew*

    This method renames the nonterminal symbol *nt* to *ntnew*\. The method
    fails and throws an error if either *nt* is not known as a nonterminal, or
    if *ntnew* is a known symbol\. The method returns the empty string as its
    result\.

  - <a name='15'></a>*pegName* __nonterminal mode__ *nt* ?*mode*?

    This mode returns or sets the semantic mode associated with the nonterminal
    symbol *nt*\. If no *mode* is specified the current mode of the
    nonterminal is returned\. Otherwise the current mode is set to *mode*\. The
    method fails and throws an error if *nt* is not known as a nonterminal\.
    The grammar interpreter implemented by the package
    __grammar::peg::interpreter__ recognizes the following modes:

      * value

        The semantic value of the nonterminal is the abstract syntax tree
        created from the AST's of the RHS and a node for the nonterminal itself\.

      * match

        The semantic value of the nonterminal is an the abstract syntax tree
        consisting of single a node for the string matched by the RHS\. The ASTs
        generated by the RHS are discarded\.

      * leaf

        The semantic value of the nonterminal is an the abstract syntax tree
        consisting of single a node for the nonterminal itself\. The ASTs
        generated by the RHS are discarded\.

      * discard

        The nonterminal has no semantic value\. The ASTs generated by the RHS are
        discarded \(as well\)\.

  - <a name='16'></a>*pegName* __nonterminal rule__ *nt*

    This method returns the parsing expression associated with the nonterminal
    *nt*\. The method fails and throws an error if *nt* is not known as a
    nonterminal\.

  - <a name='17'></a>*pegName* __unknown nonterminals__

    This method returns a list containing the names of all nonterminal symbols
    which are referenced on the RHS of a grammatical rule, but have no rule
    definining their structure\. In other words, a list of the nonterminal
    symbols which make the grammar invalid\. The grammar is valid if this list is
    empty\.

## <a name='subsection4'></a>PARSING EXPRESSIONS

Various methods of PEG container objects expect a parsing expression as their
argument, or will return such\. This section specifies the format such parsing
expressions are in\.

  1. The string __epsilon__ is an atomic parsing expression\. It matches the
     empty string\.

  1. The string __alnum__ is an atomic parsing expression\. It matches any
     alphanumeric character\.

  1. The string __alpha__ is an atomic parsing expression\. It matches any
     alphabetical character\.

  1. The string __dot__ is an atomic parsing expression\. It matches any
     character\.

  1. The expression \[list t __x__\] is an atomic parsing expression\. It
     matches the terminal string __x__\.

  1. The expression \[list n __A__\] is an atomic parsing expression\. It
     matches the nonterminal __A__\.

  1. For parsing expressions __e1__, __e2__, \.\.\. the result of \[list /
     __e1__ __e2__ \.\.\. \] is a parsing expression as well\. This is the
     *ordered choice*, aka *prioritized choice*\.

  1. For parsing expressions __e1__, __e2__, \.\.\. the result of \[list x
     __e1__ __e2__ \.\.\. \] is a parsing expression as well\. This is the
     *sequence*\.

  1. For a parsing expression __e__ the result of \[list \* __e__\] is a
     parsing expression as well\. This is the *kleene closure*, describing zero
     or more repetitions\.

  1. For a parsing expression __e__ the result of \[list \+ __e__\] is a
     parsing expression as well\. This is the *positive kleene closure*,
     describing one or more repetitions\.

  1. For a parsing expression __e__ the result of \[list & __e__\] is a
     parsing expression as well\. This is the *and lookahead predicate*\.

  1. For a parsing expression __e__ the result of \[list \! __e__\] is a
     parsing expression as well\. This is the *not lookahead predicate*\.

  1. For a parsing expression __e__ the result of \[list ? __e__\] is a
     parsing expression as well\. This is the *optional input*\.

Examples of parsing expressions where already shown, in the description of the
method __serialize__\.

# <a name='section2'></a>PARSING EXPRESSION GRAMMARS

For the mathematically inclined, a PEG is a 4\-tuple \(VN,VT,R,eS\) where

  - VN is a set of *nonterminal symbols*,

  - VT is a set of *terminal symbols*,

  - R is a finite set of rules, where each rule is a pair \(A,e\), A in VN, and
    *[e](\.\./\.\./\.\./\.\./index\.md\#e)* a *[parsing
    expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression)*\.

  - eS is a parsing expression, the *start expression*\.

Further constraints are

  - The intersection of VN and VT is empty\.

  - For all A in VT exists exactly one pair \(A,e\) in R\. In other words, R is a
    function from nonterminal symbols to parsing expressions\.

Parsing expression are inductively defined via

  - The empty string \(epsilon\) is a parsing expression\.

  - A terminal symbol *a* is a parsing expression\.

  - A nonterminal symbol *A* is a parsing expression\.

  - *e1**e2* is a parsing expression for parsing expressions *e1* and
    *2*\. This is called *sequence*\.

  - *e1*/*e2* is a parsing expression for parsing expressions *e1* and
    *2*\. This is called *ordered choice*\.

  - *[e](\.\./\.\./\.\./\.\./index\.md\#e)*\* is a parsing expression for parsing
    expression *[e](\.\./\.\./\.\./\.\./index\.md\#e)*\. This is called
    *zero\-or\-more repetitions*, also known as *kleene closure*\.

  - *[e](\.\./\.\./\.\./\.\./index\.md\#e)*\+ is a parsing expression for parsing
    expression *[e](\.\./\.\./\.\./\.\./index\.md\#e)*\. This is called *one\-or\-more
    repetitions*, also known as *positive kleene closure*\.

  - \!*[e](\.\./\.\./\.\./\.\./index\.md\#e)* is a parsing expression for parsing
    expression *e1*\. This is called a *not lookahead predicate*\.

  - &*[e](\.\./\.\./\.\./\.\./index\.md\#e)* is a parsing expression for parsing
    expression *e1*\. This is called an *and lookahead predicate*\.

PEGs are used to define a grammatical structure for streams of symbols over VT\.
They are a modern phrasing of older formalisms invented by Alexander Birham\.
These formalisms were called TS \(TMG recognition scheme\), and gTS \(generalized
TS\)\. Later they were renamed to TPDL \(Top\-Down Parsing Languages\) and gTPDL
\(generalized TPDL\)\.

They can be easily implemented by recursive descent parsers with backtracking\.
This makes them relatives of LL\(k\) Context\-Free Grammars\.

# <a name='section3'></a>REFERENCES

  1. [The Packrat Parsing and Parsing Expression Grammars
     Page](http://www\.pdos\.lcs\.mit\.edu/~baford/packrat/), by Bryan Ford,
     Massachusetts Institute of Technology\. This is the main entry page to PEGs,
     and their realization through Packrat Parsers\.

  1. [Parsing Techniques \- A Practical Guide
     ](http://www\.cs\.vu\.nl/~dick/PTAPG\.html), an online book offering a
     clear, accessible, and thorough discussion of many different parsing
     techniques with their interrelations and applicabilities, including error
     recovery techniques\.

  1. [Compilers and Compiler Generators](http://scifac\.ru\.ac\.za/compilers/),
     an online book using CoCo/R, a generator for recursive descent parsers\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_peg* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/grammar_peg/peg_interp.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146

[//000000001]: # (grammar::peg::interp \- Grammar operations and usage)
[//000000002]: # (Generated from file 'peg\_interp\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005\-2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (grammar::peg::interp\(n\) 0\.1\.1 tcllib "Grammar operations and usage")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

grammar::peg::interp \- Interpreter for parsing expression grammars

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [THE INTERPRETER API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require grammar::mengine ?0\.1?  
package require grammar::peg::interp ?0\.1\.1?  

[__::grammar::peg::interp::setup__ *peg*](#1)  
[__::grammar::peg::interp::parse__ *nextcmd* *errorvar* *astvar*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides commands for the controlled matching of a character stream
via a parsing expression grammar and the creation of an abstract syntax tree for
the stream and partials\.

It is built on top of the virtual machine provided by the package
__[grammar::me::tcl](\.\./grammar\_me/me\_tcl\.md)__ and directly interprets
the parsing expression grammar given to it\. In other words, the grammar is
*not* pre\-compiled but used as is\.

The grammar to be interpreted is taken from a container object following the
interface specified by the package __grammar::peg::container__\. Only the
relevant parts are copied into the state of this package\.

It should be noted that the package provides exactly one instance of the
interpreter, and interpreting a second grammar requires the user to either abort
or complete a running interpretation, or to put them into different Tcl
interpreters\.

Also of note is that the implementation assumes a pull\-type handling of the
input\. In other words, the interpreter pulls characters from the input stream as
it needs them\. For usage in a push environment, i\.e\. where the environment
pushes new characters as they come we have to put the engine into its own
thread\.

# <a name='section2'></a>THE INTERPRETER API

The package exports the following API

  - <a name='1'></a>__::grammar::peg::interp::setup__ *peg*

    This command \(re\)initializes the interpreter\. It returns the empty string\.
    This command has to be invoked first, before any matching run\.

    Its argument *peg* is the handle of an object containing the parsing
    expression grammar to interpret\. This grammar has to be valid, or an error
    will be thrown\.

  - <a name='2'></a>__::grammar::peg::interp::parse__ *nextcmd* *errorvar* *astvar*

    This command interprets the loaded grammar and tries to match it against the
    stream of characters represented by the command prefix *nextcmd*\.

    The command prefix *nextcmd* represents the input stream of characters and
    is invoked by the interpreter whenever the a new character from the stream
    is required\. The callback has to return either the empty list, or a list of
    4 elements containing the token, its lexeme attribute, and its location as
    line number and column index, in this order\. The empty list is the signal
    that the end of the input stream has been reached\. The lexeme attribute is
    stored in the terminal cache, but otherwise not used by the machine\.

    The result of the command is a boolean value indicating whether the matching
    process was successful \(__true__\), or not \(__false__\)\. In the case
    of a match failure error information will be stored into the variable
    referenced by *errorvar*\. The variable referenced by *astvar* will
    always contain the generated abstract syntax tree, however in the case of an
    error it will be only partial and possibly malformed\.

    The abstract syntax tree is represented by a nested list, as described in
    section __AST VALUES__ of document
    *[grammar::me\_ast](\.\./grammar\_me/me\_ast\.md)*\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *grammar\_peg* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer), [virtual
machine](\.\./\.\./\.\./\.\./index\.md\#virtual\_machine)

# <a name='category'></a>CATEGORY

Grammars and finite automata

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005\-2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































Deleted embedded/md/tcllib/files/modules/hook/hook.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371

[//000000001]: # (hook \- Hooks)
[//000000002]: # (Generated from file 'hook\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2010, by William H\. Duquette)
[//000000004]: # (hook\(n\) 0\.1 tcllib "Hooks")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

hook \- Hooks

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Concepts](#section2)

      - [Introduction](#subsection1)

      - [Bindings](#subsection2)

      - [Subjects and observers](#subsection3)

  - [Reference](#section3)

  - [Example](#section4)

  - [Credits](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require hook ?0\.1?  

[__hook__ __bind__ ?*subject*? ?*hook*? ?*observer*? ?*cmdPrefix*?](#1)  
[__hook__ __call__ *subject* *hook* ?*args*\.\.\.?](#2)  
[__hook__ __forget__ *object*](#3)  
[__hook__ __cget__ *option*](#4)  
[__hook__ __configure__ __option__ *value* \.\.\.](#5)  

# <a name='description'></a>DESCRIPTION

This package provides the __hook__ ensemble command, which implements the
Subject/Observer pattern\. It allows *subjects*, which may be *modules*,
*objects*, *widgets*, and so forth, to synchronously call *hooks* which
may be bound to an arbitrary number of subscribers, called *observers*\. A
subject may call any number of distinct hooks, and any number of observers can
bind callbacks to a particular hook called by a particular subject\. Hook
bindings can be queried and deleted\.

This man page is intended to be a reference only\.

# <a name='section2'></a>Concepts

## <a name='subsection1'></a>Introduction

Tcl modules usually send notifications to other modules in two ways: via Tk
events, and via callback options like the text widget's __\-yscrollcommand__
option\. Tk events are available only in Tk, and callback options require tight
coupling between the modules sending and receiving the notification\.

Loose coupling between sender and receiver is often desirable, however\. In
Model/View/Controller terms, a View can send a command \(stemming from user
input\) to the Controller, which updates the Model\. The Model can then call a
hook *to which all relevant* *Views subscribe\.* The Model is decoupled from
the Views, and indeed need not know whether any Views actually exist\. At
present, Tcl/Tk has no standard mechanism for implementing loose coupling of
this kind\. This package defines a new command, __hook__, which implements
just such a mechanism\.

## <a name='subsection2'></a>Bindings

The __hook__ command manages a collection of hook bindings\. A hook binding
has four elements:

  1. A *[subject](\.\./\.\./\.\./\.\./index\.md\#subject)*: the name of the entity
     that will be calling the hook\.

  1. The *[hook](\.\./\.\./\.\./\.\./index\.md\#hook)* itself\. A hook usually
     reflects some occurrence in the life of the
     *[subject](\.\./\.\./\.\./\.\./index\.md\#subject)* that other entities might
     care to know about\. A *[hook](\.\./\.\./\.\./\.\./index\.md\#hook)* has a name,
     and may also have arguments\. Hook names are arbitrary strings\. Each
     *[subject](\.\./\.\./\.\./\.\./index\.md\#subject)* must document the names and
     arguments of the hooks it can call\.

  1. The name of the *[observer](\.\./\.\./\.\./\.\./index\.md\#observer)* that
     wishes to receive the *[hook](\.\./\.\./\.\./\.\./index\.md\#hook)* from the
     *[subject](\.\./\.\./\.\./\.\./index\.md\#subject)*\.

  1. A command prefix to which the *[hook](\.\./\.\./\.\./\.\./index\.md\#hook)*
     arguments will be appended when the binding is executed\.

## <a name='subsection3'></a>Subjects and observers

For convenience, this document collectively refers to subjects and observers as
*objects*, while placing no requirements on how these *objects* are actually
implemented\. An object can be a __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__
or __[Snit](\.\./\.\./\.\./\.\./index\.md\#snit)__ or __XOTcl__ object, a Tcl
command, a namespace, a module, a pseudo\-object managed by some other object \(as
tags are managed by the Tk text widget\) or simply a well\-known name\.

Subject and observer names are arbitrary strings; however, as __hook__ might
be used at the package level, it's necessary to have conventions that avoid name
collisions between packages written by different people\.

Therefore, any subject or observer name used in core or package level code
should look like a Tcl command name, and should be defined in a namespace owned
by the package\. Consider, for example, an ensemble command __::foo__ that
creates a set of pseudo\-objects and uses __hook__ to send notifications\. The
pseudo\-objects have names that are not commands and exist in their own
namespace, rather like file handles do\. To avoid name collisions with subjects
defined by other packages, users of __hook__, these __::foo__ handles
should have names like __::foo::1__, __::foo::2__, and so on\.

Because object names are arbitrary strings, application code can use whatever
additional conventions are dictated by the needs of the application\.

# <a name='section3'></a>Reference

Hook provides the following commands:

  - <a name='1'></a>__hook__ __bind__ ?*subject*? ?*hook*? ?*observer*? ?*cmdPrefix*?

    This subcommand is used to create, update, delete, and query hook bindings\.

    Called with no arguments it returns a list of the subjects with hooks to
    which observers are currently bound\.

    Called with one argument, a *subject*, it returns a list of the subject's
    hooks to which observers are currently bound\.

    Called with two arguments, a *subject* and a *hook*, it returns a list
    of the observers which are currently bound to this *subject* and *hook*\.

    Called with three arguments, a *subject*, a *hook*, and an *observer*,
    it returns the binding proper, the command prefix to be called when the hook
    is called, or the empty string if there is no such binding\.

    Called with four arguments, it creates, updates, or deletes a binding\. If
    *cmdPrefix* is the empty string, it deletes any existing binding for the
    *subject*, *hook*, and *observer*; nothing is returned\. Otherwise,
    *cmdPrefix* must be a command prefix taking as many additional arguments
    as are documented for the *subject* and *hook*\. The binding is added or
    updated, and the observer is returned\.

    If the *observer* is the empty string, "", it will create a new binding
    using an automatically generated observer name of the form
    __::hook::ob__<__number__>\. The automatically generated name will be
    returned, and can be used to query, update, and delete the binding as usual\.
    If automated observer names are always used, the observer name effectively
    becomes a unique binding ID\.

    It is possible to call __hook bind__ to create or delete a binding to a
    *subject* and *hook* while in an observer binding for that same
    *subject* and *hook*\. The following rules determine what happens when

        hook bind $s $h $o $binding

    is called during the execution of

        hook call $s $h

      1. No binding is ever called after it is deleted\.

      1. When a binding is called, the most recently given command prefix is
         always used\.

      1. The set of observers whose bindings are to be called is determined when
         this method begins to execute, and does not change thereafter, except
         that deleted bindings are not called\.

    In particular:

      1. If __$o__s binding to __$s__ and __$h__ is deleted, and
         __$o__s binding has not yet been called during this execution of

             hook call $s $h

         it will not be called\. \(Note that it might already have been called;
         and in all likelihood, it is probably deleting itself\.\)

      1. If __$o__ changes the command prefix that's bound to __$s__ and
         __$h__, and if __$o__s binding has not yet been called during
         this execution of

             hook call $s $h

         the new binding will be called when the time comes\. \(But again, it is
         probably __$o__s binding that is is making the change\.\)

      1. If a new observer is bound to __$s__ and __$h__, its binding
         will not be called until the next invocation of

             hook call $s $h

  - <a name='2'></a>__hook__ __call__ *subject* *hook* ?*args*\.\.\.?

    This command is called when the named *subject* wishes to call the named
    *hook*\. All relevant bindings are called with the specified arguments in
    the global namespace\. Note that the bindings are called synchronously,
    before the command returns; this allows the *args* to include references
    to entities that will be cleaned up as soon as the hook has been called\.

    The order in which the bindings are called is not guaranteed\. If sequence
    among observers must be preserved, define one observer and have its bindings
    call the other callbacks directly in the proper sequence\.

    Because the __hook__ mechanism is intended to support loose coupling, it
    is presumed that the *subject* has no knowledge of the observers, nor any
    expectation regarding return values\. This has a number of implications:

      1. __hook call__ returns the empty string\.

      1. Normal return values from observer bindings are ignored\.

      1. Errors and other exceptional returns propagate normally by default\.
         This will rarely be what is wanted, because the subjects usually have
         no knowledge of the observers and will therefore have no particular
         competence at handling their errors\. That makes it an application
         issue, and so applications will usually want to define an
         __\-errorcommand__\.

    If the __\-errorcommand__ configuration option has a non\-empty value, its
    value will be invoked for all errors and other exceptional returns in
    observer bindings\. See __hook configure__, below, for more information
    on configuration options\.

  - <a name='3'></a>__hook__ __forget__ *object*

    This command deletes any existing bindings in which the named *object*
    appears as either the *[subject](\.\./\.\./\.\./\.\./index\.md\#subject)* or the
    *[observer](\.\./\.\./\.\./\.\./index\.md\#observer)*\. Bindings deleted by this
    method will never be called again\. In particular,

      1. If an observer is forgotten during a call to __hook call__, any
         uncalled binding it might have had to the relevant subject and hook
         will *not* be called subsequently\.

      1. If a subject __$s__ is forgotten during a call to

             hook call $s $h

         then __hook call__ will return as soon as the current binding
         returns\. No further bindings will be called\.

  - <a name='4'></a>__hook__ __cget__ *option*

    This command returns the value of one of the __hook__ command's
    configuration options\.

  - <a name='5'></a>__hook__ __configure__ __option__ *value* \.\.\.

    This command sets the value of one or more of the __hook__ command's
    configuration options:

      * __\-errorcommand__ *cmdPrefix*

        If the value of this option is the empty string, "", then errors and
        other exception returns in binding scripts are propagated normally\.
        Otherwise, it must be a command prefix taking three additional
        arguments:

          1. a 4\-element list \{subject hook arglist observer\},

          1. the result string, and

          1. the return options dictionary\.

        Given this information, the __\-errorcommand__ can choose to log the
        error, call __interp bgerror__, delete the errant binding \(thus
        preventing the error from arising a second time\) and so forth\.

      * __\-tracecommand__ *cmdPrefix*

        The option's value should be a command prefix taking four arguments:

          1. a *[subject](\.\./\.\./\.\./\.\./index\.md\#subject)*,

          1. a *[hook](\.\./\.\./\.\./\.\./index\.md\#hook)*,

          1. a list of the hook's argument values, and

          1. a list of *objects* the hook was called for\.

        The command will be called for each hook that is called\. This allows the
        application to trace hook execution for debugging purposes\.

# <a name='section4'></a>Example

The __::model__ module calls the <Update> hook in response to commands that
change the model's data:

    hook call ::model <Update>

The __\.view__ megawidget displays the model state, and needs to know about
model updates\. Consequently, it subscribes to the ::model's <Update> hook\.

    hook bind ::model <Update> .view [list .view ModelUpdate]

When the __::model__ calls the hook, the __\.view__s ModelUpdate
subcommand will be called\.

Later the __\.view__ megawidget is destroyed\. In its destructor, it tells the
*[hook](\.\./\.\./\.\./\.\./index\.md\#hook)* that it no longer exists:

    hook forget .view

All bindings involving __\.view__ are deleted\.

# <a name='section5'></a>Credits

Hook has been designed and implemented by William H\. Duquette\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *hook* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[uevent\(n\)](\.\./uev/uevent\.md)

# <a name='keywords'></a>KEYWORDS

[callback](\.\./\.\./\.\./\.\./index\.md\#callback),
[event](\.\./\.\./\.\./\.\./index\.md\#event), [hook](\.\./\.\./\.\./\.\./index\.md\#hook),
[observer](\.\./\.\./\.\./\.\./index\.md\#observer),
[producer](\.\./\.\./\.\./\.\./index\.md\#producer),
[publisher](\.\./\.\./\.\./\.\./index\.md\#publisher),
[subject](\.\./\.\./\.\./\.\./index\.md\#subject),
[subscriber](\.\./\.\./\.\./\.\./index\.md\#subscriber),
[uevent](\.\./\.\./\.\./\.\./index\.md\#uevent)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2010, by William H\. Duquette
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/html/html.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594

[//000000001]: # (html \- HTML Generation)
[//000000002]: # (Generated from file 'html\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (html\(n\) 1\.5 tcllib "HTML Generation")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

html \- Procedures to generate HTML structures

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require html ?1\.5?  

[__::html::author__ *author*](#1)  
[__::html::bodyTag__ *args*](#2)  
[__::html::cell__ *param value* ?*tag*?](#3)  
[__::html::checkbox__ *name value*](#4)  
[__::html::checkSet__ *key sep list*](#5)  
[__::html::checkValue__ *name* ?*value*?](#6)  
[__::html::closeTag__](#7)  
[__::html::default__ *key* ?*param*?](#8)  
[__::html::description__ *description*](#9)  
[__::html::end__](#10)  
[__::html::eval__ *arg* ?*args*?](#11)  
[__::html::extractParam__ *param key* ?*varName*?](#12)  
[__::html::font__ *args*](#13)  
[__::html::for__ *start test next body*](#14)  
[__::html::foreach__ *varlist1 list1* ?*varlist2 list2 \.\.\.*? *body*](#15)  
[__::html::formValue__ *name* ?*defvalue*?](#16)  
[__::html::getFormInfo__ *args*](#17)  
[__::html::getTitle__](#18)  
[__::html::h__ *level string* ?*param*?](#19)  
[__::html::h1__ *string* ?*param*?](#20)  
[__::html::h2__ *string* ?*param*?](#21)  
[__::html::h3__ *string* ?*param*?](#22)  
[__::html::h4__ *string* ?*param*?](#23)  
[__::html::h5__ *string* ?*param*?](#24)  
[__::html::h6__ *string* ?*param*?](#25)  
[__::html::hdrRow__ *args*](#26)  
[__::html::head__ *title*](#27)  
[__::html::headTag__ *string*](#28)  
[__::html::html\_entities__ *string*](#29)  
[__::html::if__ *expr1 body1* ?__elseif__ *expr2 body2 \.\.\.*? ?__else__ *bodyN*?](#30)  
[__::html::init__ ?*list*?](#31)  
[__::html::keywords__ *args*](#32)  
[__::html::mailto__ *email* ?*subject*?](#33)  
[__::html::meta__ *args*](#34)  
[__::html::meta\_name__ *args*](#35)  
[__::html::meta\_equiv__ *args*](#36)  
[__::html::meta\_charset__ *charset*](#37)  
[__::html::css__ *href*](#38)  
[__::html::css\-clear__](#39)  
[__::html::js__ *href*](#40)  
[__::html::js\-clear__](#41)  
[__::html::minorList__ *list* ?*ordered*?](#42)  
[__::html::minorMenu__ *list* ?*sep*?](#43)  
[__::html::nl2br__ *string*](#44)  
[__::html::openTag__ *tag* ?*param*?](#45)  
[__::html::paramRow__ *list* ?*rparam*? ?*cparam*?](#46)  
[__::html::passwordInput__ ?*name*?](#47)  
[__::html::passwordInputRow__ *label* ?*name*?](#48)  
[__::html::quoteFormValue__ *value*](#49)  
[__::html::radioSet__ *key sep list*](#50)  
[__::html::radioValue__ *name value*](#51)  
[__::html::refresh__ *seconds url*](#52)  
[__::html::row__ *args*](#53)  
[__::html::select__ *name param choices* ?*current*?](#54)  
[__::html::selectPlain__ *name param choices* ?*current*?](#55)  
[__::html::set__ *var val*](#56)  
[__::html::submit__ *label* ?*name*? ?*title*?](#57)  
[__::html::tableFromArray__ *arrname* ?*param*? ?*pat*?](#58)  
[__::html::tableFromList__ *querylist* ?*param*?](#59)  
[__::html::textarea__ *name* ?*param*? ?*current*?](#60)  
[__::html::textInput__ *name value args*](#61)  
[__::html::textInputRow__ *label name value args*](#62)  
[__::html::varEmpty__ *name*](#63)  
[__::html::while__ *test body*](#64)  
[__::html::doctype__ *id*](#65)  
[__::html::wrapTag__ *tag* ?*text*? ?*args*?](#66)  

# <a name='description'></a>DESCRIPTION

The package __html__ provides commands that generate HTML\. These commands
typically return an HTML string as their result\. In particular, they do not
output their result to __stdout__\.

The command __::html::init__ should be called early to initialize the
module\. You can also use this procedure to define default values for HTML tag
parameters\.

  - <a name='1'></a>__::html::author__ *author*

    *Side effect only*\. Call this before __::html::head__ to define an
    author for the page\. The author is noted in a comment in the HEAD section\.

  - <a name='2'></a>__::html::bodyTag__ *args*

    Generate a *body* tag\. The tag parameters are taken from *args* or from
    the body\.\* attributes define with __::html::init__\.

  - <a name='3'></a>__::html::cell__ *param value* ?*tag*?

    Generate a *td* \(or *th*\) tag, a value, and a closing *td* \(or *th*\)
    tag\. The tag parameters come from *param* or TD\.\* attributes defined with
    __::html::init__\. This uses __::html::font__ to insert a standard
    *font* tag into the table cell\. The *tag* argument defaults to "td"\.

  - <a name='4'></a>__::html::checkbox__ *name value*

    Generate a *[checkbox](\.\./\.\./\.\./\.\./index\.md\#checkbox)* form element
    with the specified name and value\. This uses __::html::checkValue__\.

  - <a name='5'></a>__::html::checkSet__ *key sep list*

    Generate a set of *[checkbox](\.\./\.\./\.\./\.\./index\.md\#checkbox)* form
    elements and associated labels\. The *list* should contain an alternating
    list of labels and values\. This uses __::html::checkbox__\. All the
    *[checkbox](\.\./\.\./\.\./\.\./index\.md\#checkbox)* buttons share the same
    *key* for their name\. The *sep* is text used to separate the elements\.

  - <a name='6'></a>__::html::checkValue__ *name* ?*value*?

    Generate the "name=*name* value=*value*" for a
    *[checkbox](\.\./\.\./\.\./\.\./index\.md\#checkbox)* form element\. If the CGI
    variable *name* has the value *value*, then SELECTED is added to the
    return value\. *value* defaults to "1"\.

  - <a name='7'></a>__::html::closeTag__

    Pop a tag off the stack created by __::html::openTag__ and generate the
    corresponding close tag \(e\.g\., </body>\)\.

  - <a name='8'></a>__::html::default__ *key* ?*param*?

    This procedure is used by __::html::tagParam__ to generate the name,
    value list of parameters for a tag\. The __::html::default__ procedure is
    used to generate default values for those items not already in *param*\. If
    the value identified by *key* matches a value in *param* then this
    procedure returns the empty string\. Otherwise, it returns a
    "parameter=value" string for a form element identified by *key*\. The
    *key* has the form "tag\.parameter" \(e\.g\., body\.bgcolor\)\. Use
    __::html::init__ to register default values\. *param* defaults to the
    empty string\.

  - <a name='9'></a>__::html::description__ *description*

    *Side effect only*\. Call this before __::html::head__ to define a
    description *meta* tag for the page\. This tag is generated later in the
    call to __::html::head__\.

  - <a name='10'></a>__::html::end__

    Pop all open tags from the stack and generate the corresponding close HTML
    tags, \(e\.g\., </body></html>\)\.

  - <a name='11'></a>__::html::eval__ *arg* ?*args*?

    This procedure is similar to the built\-in Tcl __eval__ command\. The only
    difference is that it returns "" so it can be called from an HTML template
    file without appending unwanted results\.

  - <a name='12'></a>__::html::extractParam__ *param key* ?*varName*?

    This is a parsing procedure that extracts the value of *key* from
    *param*, which is a HTML\-style "name=quotedvalue" list\. *varName* is
    used as the name of a Tcl variable that is changed to have the value found
    in the parameters\. The function returns 1 if the parameter was found in
    *param*, otherwise it returns 0\. If the *varName* is not specified, then
    *key* is used as the variable name\.

  - <a name='13'></a>__::html::font__ *args*

    Generate a standard *font* tag\. The parameters to the tag are taken from
    *args* and the HTML defaults defined with __::html::init__\.

  - <a name='14'></a>__::html::for__ *start test next body*

    This procedure is similar to the built\-in Tcl __for__ control structure\.
    Rather than evaluating the body, it returns the subst'ed *body*\. Each
    iteration of the loop causes another string to be concatenated to the result
    value\.

  - <a name='15'></a>__::html::foreach__ *varlist1 list1* ?*varlist2 list2 \.\.\.*? *body*

    This procedure is similar to the built\-in Tcl
    __[foreach](\.\./\.\./\.\./\.\./index\.md\#foreach)__ control structure\.
    Rather than evaluating the body, it returns the subst'ed *body*\. Each
    iteration of the loop causes another string to be concatenated to the result
    value\.

  - <a name='16'></a>__::html::formValue__ *name* ?*defvalue*?

    Return a name and value pair, where the value is initialized from existing
    CGI data, if any\. The result has this form:

        name="fred" value="freds value"

  - <a name='17'></a>__::html::getFormInfo__ *args*

    Generate hidden fields to capture form values\. If *args* is empty, then
    hidden fields are generated for all CGI values\. Otherwise args is a list of
    string match patterns for form element names\.

  - <a name='18'></a>__::html::getTitle__

    Return the title string, with out the surrounding *title* tag, set with a
    previous call to __::html::title__\.

  - <a name='19'></a>__::html::h__ *level string* ?*param*?

    Generate a heading \(e\.g\., *h__level__*\) tag\. The *string* is nested
    in the heading, and *param* is used for the tag parameters\.

  - <a name='20'></a>__::html::h1__ *string* ?*param*?

    Generate an *h1* tag\. See __::html::h__\.

  - <a name='21'></a>__::html::h2__ *string* ?*param*?

    Generate an *h2* tag\. See __::html::h__\.

  - <a name='22'></a>__::html::h3__ *string* ?*param*?

    Generate an *h3* tag\. See __::html::h__\.

  - <a name='23'></a>__::html::h4__ *string* ?*param*?

    Generate an *h4* tag\. See __::html::h__\.

  - <a name='24'></a>__::html::h5__ *string* ?*param*?

    Generate an *h5* tag\. See __::html::h__\.

  - <a name='25'></a>__::html::h6__ *string* ?*param*?

    Generate an *h6* tag\. See __::html::h__\.

  - <a name='26'></a>__::html::hdrRow__ *args*

    Generate a table row, including *tr* and *th* tags\. Each value in
    *args* is place into its own table cell\. This uses __::html::cell__\.

  - <a name='27'></a>__::html::head__ *title*

    Generate the *head* section that includes the page *title*\. If previous
    calls have been made to __::html::author__, __::html::keywords__,
    __::html::description__, or __::html::meta__ then additional tags
    are inserted into the *head* section\. This leaves an open
    *[html](\.\./\.\./\.\./\.\./index\.md\#html)* tag pushed on the stack with
    __::html::openTag__\.

  - <a name='28'></a>__::html::headTag__ *string*

    Save a tag for inclusion in the *head* section generated by
    __::html::head__\. The *string* is everything in the tag except the
    enclosing angle brackets, < >\.

  - <a name='29'></a>__::html::html\_entities__ *string*

    This command replaces all special characters in the *string* with their
    HTML entities and returns the modified text\.

  - <a name='30'></a>__::html::if__ *expr1 body1* ?__elseif__ *expr2 body2 \.\.\.*? ?__else__ *bodyN*?

    This procedure is similar to the built\-in Tcl __if__ control structure\.
    Rather than evaluating the body of the branch that is taken, it returns the
    subst'ed *body*\. Note that the syntax is slightly more restrictive than
    that of the built\-in Tcl __if__ control structure\.

  - <a name='31'></a>__::html::init__ ?*list*?

    __::html::init__ accepts a Tcl\-style name\-value list that defines values
    for items with a name of the form "tag\.parameter"\. For example, a default
    with key "body\.bgcolor" defines the background color for the *body* tag\.

  - <a name='32'></a>__::html::keywords__ *args*

    *Side effect only*\. Call this before __::html::head__ to define a
    keyword *meta* tag for the page\. The *meta* tag is included in the
    result of __::html::head__\.

  - <a name='33'></a>__::html::mailto__ *email* ?*subject*?

    Generate a hypertext link to a mailto: URL\.

  - <a name='34'></a>__::html::meta__ *args*

    Compatibility name for __html::meta\_name__\.

  - <a name='35'></a>__::html::meta\_name__ *args*

    *Side effect only*\. Call this before __::html::head__ to define a
    *meta* tag for the page\. The arguments \(*args*\) are a Tcl\-style name,
    value list that is used for the __name=__ and __content=__
    attributes of the *meta* tag\. The *meta* tag is included in the result
    of __::html::head__\.

  - <a name='36'></a>__::html::meta\_equiv__ *args*

    *Side effect only*\. Call this before __::html::head__ to define a
    *meta* tag for the page\. The arguments \(*args*\) are a Tcl\-style name,
    value list that is used for the __http\-equiv=__ and __content=__
    attributes of the *meta* tag\. The *meta* tag is included in the result
    of __::html::head__\.

  - <a name='37'></a>__::html::meta\_charset__ *charset*

    *Side effect only*\. Call this before __::html::head__ to define a
    *meta* tag for the page\. The *charset* is used with the __charset=__
    attribute of the *meta* tag\. The *meta* tag is included in the result of
    __::html::head__\.

  - <a name='38'></a>__::html::css__ *href*

    *Side effect only*\. Call this before __::html::head__ to define a
    *link* tag for a linked CSS document\. The *href* value is a HTTP URL to
    a CSS document\. The *link* tag is included in the result of
    __::html::head__\.

    Multiple calls of this command are allowed, enabling the use of multiple CSS
    document references\. In other words, the arguments of multiple calls are
    accumulated, and do not overwrite each other\.

  - <a name='39'></a>__::html::css\-clear__

    *Side effect only*\. Call this before __::html::head__ to clear all
    links to CSS documents\.

    Multiple calls of this command are allowed, doing nothing after the first of
    a sequence with no intervening __::html::css__\.

  - <a name='40'></a>__::html::js__ *href*

    *Side effect only*\. Call this before __::html::head__ to define a
    *script* tag for a linked JavaScript document\. The *href* is a HTTP URL
    to a JavaScript document\. The *script* tag is included in the result of
    __::html::head__\.

    Multiple calls of this command are allowed, enabling the use of multiple
    JavaScript document references\. In other words, the arguments of multiple
    calls are accumulated, and do not overwrite each other\.

  - <a name='41'></a>__::html::js\-clear__

    *Side effect only*\. Call this before __::html::head__ to clear all
    links to JavaScript documents\.

    Multiple calls of this command are allowed, doing nothing after the first of
    a sequence with no intervening __::html::js__\.

  - <a name='42'></a>__::html::minorList__ *list* ?*ordered*?

    Generate an ordered or unordered list of links\. The *list* is a Tcl\-style
    name, value list of labels and urls for the links\. *ordered* is a boolean
    used to choose between an ordered or unordered list\. It defaults to
    __false__\.

  - <a name='43'></a>__::html::minorMenu__ *list* ?*sep*?

    Generate a series of hypertext links\. The *list* is a Tcl\-style name,
    value list of labels and urls for the links\. The *sep* is the text to put
    between each link\. It defaults to " &#124; "\.

  - <a name='44'></a>__::html::nl2br__ *string*

    This command replaces all line\-endings in the *string* with a *br* tag
    and returns the modified text\.

  - <a name='45'></a>__::html::openTag__ *tag* ?*param*?

    Push *tag* onto a stack and generate the opening tag for *tag*\. Use
    __::html::closeTag__ to pop the tag from the stack\. The second argument
    provides any tag arguments, as a list whose elements are formatted to be in
    the form "__key__=__value__"\.

  - <a name='46'></a>__::html::paramRow__ *list* ?*rparam*? ?*cparam*?

    Generate a table row, including *tr* and *td* tags\. Each value in
    *list* is placed into its own table cell\. This uses __::html::cell__\.
    The value of *rparam* is used as parameter for the *tr* tag\. The value
    of *cparam* is passed to __::html::cell__ as parameter for the *td*
    tags\.

  - <a name='47'></a>__::html::passwordInput__ ?*name*?

    Generate an *input* tag of type
    *[password](\.\./\.\./\.\./\.\./index\.md\#password)*\. The *name* defaults to
    "password"\.

  - <a name='48'></a>__::html::passwordInputRow__ *label* ?*name*?

    Format a table row containing a label and an *input* tag of type
    *[password](\.\./\.\./\.\./\.\./index\.md\#password)*\. The *name* defaults to
    "password"\.

  - <a name='49'></a>__::html::quoteFormValue__ *value*

    Quote special characters in *value* by replacing them with HTML entities
    for quotes, ampersand, and angle brackets\.

  - <a name='50'></a>__::html::radioSet__ *key sep list*

    Generate a set of *input* tags of type *radio* and an associated text
    label\. All the radio buttons share the same *key* for their name\. The
    *sep* is text used to separate the elements\. The *list* is a Tcl\-style
    label, value list\.

  - <a name='51'></a>__::html::radioValue__ *name value*

    Generate the "name=*name* value=*value*" for a *radio* form element\.
    If the CGI variable *name* has the value *value*, then SELECTED is added
    to the return value\.

  - <a name='52'></a>__::html::refresh__ *seconds url*

    Set up a refresh *meta* tag\. Call this before __::html::head__ and the
    HEAD section will contain a *meta* tag that causes the document to refresh
    in *seconds* seconds\. The *url* is optional\. If specified, it specifies
    a new page to load after the refresh interval\.

  - <a name='53'></a>__::html::row__ *args*

    Generate a table row, including *tr* and *td* tags\. Each value in
    *args* is place into its own table cell\. This uses __::html::cell__\.
    Ignores any default information set up via __::html::init__\.

  - <a name='54'></a>__::html::select__ *name param choices* ?*current*?

    Generate a *select* form element and nested *option* tags\. The *name*
    and *param* are used to generate the *select* tag\. The *choices* list
    is a Tcl\-style name, value list\.

  - <a name='55'></a>__::html::selectPlain__ *name param choices* ?*current*?

    Like __::html::select__ except that *choices* is a Tcl list of values
    used for the *option* tags\. The label and the value for each *option*
    are the same\.

  - <a name='56'></a>__::html::set__ *var val*

    This procedure is similar to the built\-in Tcl
    __[set](\.\./\.\./\.\./\.\./index\.md\#set)__ command\. The main difference is
    that it returns "" so it can be called from an HTML template file without
    appending unwanted results\. The other difference is that it must take two
    arguments\.

  - <a name='57'></a>__::html::submit__ *label* ?*name*? ?*title*?

    Generate an *input* tag of type *submit*\. The *name* defaults to
    "submit"\. When a non\-empty *title* string is specified the button gains a
    __title=__ attribute with that value\.

  - <a name='58'></a>__::html::tableFromArray__ *arrname* ?*param*? ?*pat*?

    Generate a two\-column *[table](\.\./\.\./\.\./\.\./index\.md\#table)* and nested
    rows to display a Tcl array\. The table gets a heading that matches the array
    name, and each generated row contains a name, value pair\. The array names
    are sorted \(__lsort__ without special options\)\. The argument *param*
    is for the *[table](\.\./\.\./\.\./\.\./index\.md\#table)* tag and has to
    contain a pre\-formatted string\. The *pat* is a __string match__
    pattern used to select the array elements to show in the table\. It defaults
    to __\*__, i\.e\. the whole array is shown\.

  - <a name='59'></a>__::html::tableFromList__ *querylist* ?*param*?

    Generate a two\-column *[table](\.\./\.\./\.\./\.\./index\.md\#table)* and nested
    rows to display *querylist*, which is a Tcl dictionary\. Each generated row
    contains a name, value pair\. The information is shown in the same order as
    specified in the dictionary\. The argument *param* is for the
    *[table](\.\./\.\./\.\./\.\./index\.md\#table)* tag and has to contain a
    pre\-formatted string\.

  - <a name='60'></a>__::html::textarea__ *name* ?*param*? ?*current*?

    Generate a *textarea* tag wrapped around its current values\.

  - <a name='61'></a>__::html::textInput__ *name value args*

    Generate an *input* form tag with type
    *[text](\.\./\.\./\.\./\.\./index\.md\#text)*\. This uses
    __::html::formValue__\. The args is any additional tag attributes you
    want to put into the *input* tag\.

  - <a name='62'></a>__::html::textInputRow__ *label name value args*

    Generate an *input* form tag with type
    *[text](\.\./\.\./\.\./\.\./index\.md\#text)* formatted into a table row with an
    associated label\. The args is any additional tag attributes you want to put
    into the *input* tag\.

  - <a name='63'></a>__::html::varEmpty__ *name*

    This returns 1 if the named variable either does not exist or has the empty
    string for its value\.

  - <a name='64'></a>__::html::while__ *test body*

    This procedure is similar to the built\-in Tcl __while__ control
    structure\. Rather than evaluating the body, it returns the subst'ed
    *body*\. Each iteration of the loop causes another string to be
    concatenated to the result value\.

  - <a name='65'></a>__::html::doctype__ *id*

    This procedure can be used to build the standard DOCTYPE declaration string\.
    It will return the standard declaration string for the id, or throw an error
    if the id is not known\. The following id's are defined:

      1. HTML32

      1. HTML40

      1. HTML40T

      1. HTML40F

      1. HTML401

      1. HTML401T

      1. HTML401F

      1. XHTML10S

      1. XHTML10T

      1. XHTML10F

      1. XHTML11

      1. XHTMLB

  - <a name='66'></a>__::html::wrapTag__ *tag* ?*text*? ?*args*?

    A helper to wrap a *text* in a pair of open/close *tag*s\. The arguments
    \(*args*\) are a Tcl\-style name, value list that is used to provide
    attributes and associated values to the opening tag\. The result is a string
    with the open *tag* along with the optional attributes, the optional text,
    and the closed tag\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *html* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[htmlparse](\.\./htmlparse/htmlparse\.md), [ncgi](\.\./ncgi/ncgi\.md)

# <a name='keywords'></a>KEYWORDS

[checkbox](\.\./\.\./\.\./\.\./index\.md\#checkbox),
[checkbutton](\.\./\.\./\.\./\.\./index\.md\#checkbutton),
[form](\.\./\.\./\.\./\.\./index\.md\#form), [html](\.\./\.\./\.\./\.\./index\.md\#html),
[radiobutton](\.\./\.\./\.\./\.\./index\.md\#radiobutton),
[table](\.\./\.\./\.\./\.\./index\.md\#table)

# <a name='category'></a>CATEGORY

CGI programming
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/htmlparse/htmlparse.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264

[//000000001]: # (htmlparse \- HTML Parser)
[//000000002]: # (Generated from file 'htmlparse\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (htmlparse\(n\) 1\.2\.2 tcllib "HTML Parser")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

htmlparse \- Procedures to parse HTML strings

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require struct::stack 1\.3  
package require cmdline 1\.1  
package require htmlparse ?1\.2\.2?  

[__::htmlparse::parse__ ?\-cmd *cmd*? ?\-vroot *tag*? ?\-split *n*? ?\-incvar *var*? ?\-queue *q*? *html*](#1)  
[__::htmlparse::debugCallback__ ?*clientdata*? *tag slash param textBehindTheTag*](#2)  
[__::htmlparse::mapEscapes__ *html*](#3)  
[__::htmlparse::2tree__ *html tree*](#4)  
[__::htmlparse::removeVisualFluff__ *tree*](#5)  
[__::htmlparse::removeFormDefs__ *tree*](#6)  

# <a name='description'></a>DESCRIPTION

The __htmlparse__ package provides commands that allow libraries and
applications to parse HTML in a string into a representation of their choice\.

The following commands are available:

  - <a name='1'></a>__::htmlparse::parse__ ?\-cmd *cmd*? ?\-vroot *tag*? ?\-split *n*? ?\-incvar *var*? ?\-queue *q*? *html*

    This command is the basic parser for HTML\. It takes an HTML string, parses
    it and invokes a command prefix for every tag encountered\. It is not
    necessary for the HTML to be valid for this parser to function\. It is the
    responsibility of the command invoked for every tag to check this\. Another
    responsibility of the invoked command is the handling of tag attributes and
    character entities \(escaped characters\)\. The parser provides the
    un\-interpreted tag attributes to the invoked command to aid in the former,
    and the package at large provides a helper command,
    __::htmlparse::mapEscapes__, to aid in the handling of the latter\. The
    parser *does* ignore leading DOCTYPE declarations and all valid HTML
    comments it encounters\.

    All information beyond the HTML string itself is specified via options,
    these are explained below\.

    To help understand the options, some more background information about the
    parser\.

    It is capable of detecting incomplete tags in the HTML string given to it\.
    Under normal circumstances this will cause the parser to throw an error, but
    if the option *\-incvar* is used to specify a global \(or namespace\)
    variable, the parser will store the incomplete part of the input into this
    variable instead\. This will aid greatly in the handling of incrementally
    arriving HTML, as the parser will handle whatever it can and defer the
    handling of the incomplete part until more data has arrived\.

    Another feature of the parser are its two possible modes of operation\. The
    normal mode is activated if the option *\-queue* is not present on the
    command line invoking the parser\. If it is present, the parser will go into
    the incremental mode instead\.

    The main difference is that a parser in normal mode will immediately invoke
    the command prefix for each tag it encounters\. In incremental mode however
    the parser will generate a number of scripts which invoke the command prefix
    for groups of tags in the HTML string and then store these scripts in the
    specified queue\. It is then the responsibility of the caller of the parser
    to ensure the execution of the scripts in the queue\.

    *Note*: The queue object given to the parser has to provide the same
    interface as the queue defined in tcllib \-> struct\. This means, for example,
    that all queues created via that tcllib module can be immediately used here\.
    Still, the queue doesn't have to come from tcllib \-> struct as long as the
    same interface is provided\.

    In both modes the parser will return an empty string to the caller\.

    The *\-split* option may be given to a parser in incremental mode to
    specify the size of the groups it creates\. In other words, \-split 5 means
    that each of the generated scripts will invoke the command prefix for 5
    consecutive tags in the HTML string\. A parser in normal mode will ignore
    this option and its value\.

    The option *\-vroot* specifies a virtual root tag\. A parser in normal mode
    will invoke the command prefix for it immediately before and after it
    processes the tags in the HTML, thus simulating that the HTML string is
    enclosed in a <vroot> </vroot> combination\. In incremental mode however the
    parser is unable to provide the closing virtual root as it never knows when
    the input is complete\. In this case the first script generated by each
    invocation of the parser will contain an invocation of the command prefix
    for the virtual root as its first command\. The following options are
    available:

      * __\-cmd__ *cmd*

        The command prefix to invoke for every tag in the HTML string\. Defaults
        to *::htmlparse::debugCallback*\.

      * __\-vroot__ *tag*

        The virtual root tag to add around the HTML in normal mode\. In
        incremental mode it is the first tag in each chunk processed by the
        parser, but there will be no closing tags\. Defaults to *hmstart*\.

      * __\-split__ *n*

        The size of the groups produced by an incremental mode parser\. Ignored
        when in normal mode\. Defaults to 10\. Values <= 0 are not allowed\.

      * __\-incvar__ *var*

        The name of the variable where to store any incomplete HTML into\. This
        makes most sense for the incremental mode\. The parser will throw an
        error if it sees incomplete HTML and has no place to store it to\. This
        makes sense for the normal mode\. Only incomplete tags are detected, not
        missing tags\. Optional, defaults to 'no variable'\.

      * *Interface to the command prefix*

        In normal mode the parser will invoke the command prefix with four
        arguments appended\. See __::htmlparse::debugCallback__ for a
        description\.

        In incremental mode, however, the generated scripts will invoke the
        command prefix with five arguments appended\. The last four of these are
        the same which were mentioned above\. The first is a placeholder string
        \(__@win@__\) for a clientdata value to be supplied later during the
        actual execution of the generated scripts\. This could be a tk window
        path, for example\. This allows the user of this package to preprocess
        HTML strings without committing them to a specific window, object,
        whatever during parsing\. This connection can be made later\. This also
        means that it is possible to cache preprocessed HTML\. Of course, nothing
        prevents the user of the parser from replacing the placeholder with an
        empty string\.

  - <a name='2'></a>__::htmlparse::debugCallback__ ?*clientdata*? *tag slash param textBehindTheTag*

    This command is the standard callback used by the parser in
    __::htmlparse::parse__ if none was specified by the user\. It simply
    dumps its arguments to stdout\. This callback can be used for both normal and
    incremental mode of the calling parser\. In other words, it accepts four or
    five arguments\. The last four arguments are described below\. The optional
    fifth argument contains the clientdata value passed to the callback by a
    parser in incremental mode\. All callbacks have to follow the signature of
    this command in the last four arguments, and callbacks used in incremental
    parsing have to follow this signature in the last five arguments\.

    The first argument, *clientdata*, is optional and present only if this
    command is invoked by a parser in incremental mode\. It contains whatever the
    user of this package wishes\.

    The second argument, *tag*, contains the name of the tag which is
    currently processed by the parser\.

    The third argument, *slash*, is either empty or contains a slash
    character\. It allows the callback to distinguish between opening \(slash is
    empty\) and closing tags \(slash contains a slash character\)\.

    The fourth argument, *param*, contains the un\-interpreted list of
    parameters to the tag\.

    The fifth and last argument, *textBehindTheTag*, contains the text found
    by the parser behind the tag named in *tag*\.

  - <a name='3'></a>__::htmlparse::mapEscapes__ *html*

    This command takes a HTML string, substitutes all escape sequences with
    their actual characters and then returns the resulting string\. HTML strings
    which do not contain escape sequences are returned unchanged\.

  - <a name='4'></a>__::htmlparse::2tree__ *html tree*

    This command is a wrapper around __::htmlparse::parse__ which takes an
    HTML string \(in *html*\) and converts it into a tree containing the logical
    structure of the parsed document\. The name of the tree is given to the
    command as its second argument \(*tree*\)\. The command does __not__
    generate the tree by itself but expects that the caller provided it with an
    existing and empty tree\. It also expects that the specified tree object
    follows the same interface as the tree object in tcllib \-> struct\. It
    doesn't have to be from tcllib \-> struct, but it must provide the same
    interface\.

    The internal callback does some basic checking of HTML validity and tries to
    recover from the most basic errors\. The command returns the contents of its
    second argument\. Side effects are the creation and manipulation of a tree
    object\.

    Each node in the generated tree represent one tag in the input\. The name of
    the tag is stored in the attribute *type* of the node\. Any html attributes
    coming with the tag are stored unmodified in the attribute *data* of the
    tag\. In other words, the command does *not* parse html attributes into
    their names and values\.

    If a tag contains text its node will have children of type *PCDATA*
    containing this text\. The text will be stored in the attribute *data* of
    these children\.

  - <a name='5'></a>__::htmlparse::removeVisualFluff__ *tree*

    This command walks a tree as generated by __::htmlparse::2tree__ and
    removes all the nodes which represent visual tags and not structural ones\.
    The purpose of the command is to make the tree easier to navigate without
    getting bogged down in visual information not relevant to the search\. Its
    only argument is the name of the tree to cut down\.

  - <a name='6'></a>__::htmlparse::removeFormDefs__ *tree*

    Like __::htmlparse::removeVisualFluff__ this command is here to cut down
    on the size of the tree as generated by __::htmlparse::2tree__\. It
    removes all nodes representing forms and form elements\. Its only argument is
    the name of the tree to cut down\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *htmlparse* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[struct::tree](\.\./struct/struct\_tree\.md)

# <a name='keywords'></a>KEYWORDS

[html](\.\./\.\./\.\./\.\./index\.md\#html),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[queue](\.\./\.\./\.\./\.\./index\.md\#queue), [tree](\.\./\.\./\.\./\.\./index\.md\#tree)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/http/autoproxy.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299

[//000000001]: # (autoproxy \- HTTP protocol helper modules)
[//000000002]: # (Generated from file 'autoproxy\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (autoproxy\(n\) 1\.7 tcllib "HTTP protocol helper modules")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

autoproxy \- Automatic HTTP proxy usage and authentication

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [TLS Security Considerations](#section2)

  - [COMMANDS](#section3)

  - [OPTIONS](#section4)

  - [Basic Authentication](#section5)

  - [EXAMPLES](#section6)

  - [REFERENCES](#section7)

  - [BUGS](#section8)

  - [AUTHORS](#section9)

  - [Bugs, Ideas, Feedback](#section10)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require http ?2\.0?  
package require autoproxy ?1\.7?  

[__::autoproxy::init__](#1)  
[__::autoproxy::cget__ *\-option*](#2)  
[__::autoproxy::configure__ ?\-option *value*?](#3)  
[__::autoproxy::tls\_connect__ *args*](#4)  
[__::autoproxy::tunnel\_connect__ *args*](#5)  
[__::autoproxy::tls\_socket__ *args*](#6)  

# <a name='description'></a>DESCRIPTION

This package attempts to automate the use of HTTP proxy servers in Tcl HTTP
client code\. It tries to initialize the web access settings from system standard
locations and can be configured to negotiate authentication with the proxy if
required\.

On Unix the standard for identifying the local HTTP proxy server seems to be to
use the environment variable http\_proxy or ftp\_proxy and no\_proxy to list those
domains to be excluded from proxying\. On Windows we can retrieve the Internet
Settings values from the registry to obtain pretty much the same information\.
With this information we can setup a suitable filter procedure for the Tcl http
package and arrange for automatic use of the proxy\.

There seem to be a number of ways that the http\_proxy environment variable may
be set up\. Either a plain host:port or more commonly a URL and sometimes the URL
may contain authentication parameters or these may be requested from the user or
provided via http\_proxy\_user and http\_proxy\_pass\. This package attempts to deal
with all these schemes\. It will do it's best to get the required parameters from
the environment or registry and if it fails can be reconfigured\.

# <a name='section2'></a>TLS Security Considerations

*Note* This section only applies if TLS support is provided by the
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package\. It does not apply when
__autoproxy__ was configured to use some other package which can provide the
same \(i\.e __twapi__\), via the __\-tls\_package__ configuration option\.

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section3'></a>COMMANDS

  - <a name='1'></a>__::autoproxy::init__

    Initialize the autoproxy package from system resources\. Under unix this
    means we look for environment variables\. Under windows we look for the same
    environment variables but also look at the registry settings used by
    Internet Explorer\.

  - <a name='2'></a>__::autoproxy::cget__ *\-option*

    Retrieve individual package configuration options\. See
    [OPTIONS](#section4)\.

  - <a name='3'></a>__::autoproxy::configure__ ?\-option *value*?

    Configure the autoproxy package\. Calling __configure__ with no options
    will return a list of all option names and values\. See
    [OPTIONS](#section4)\.

  - <a name='4'></a>__::autoproxy::tls\_connect__ *args*

    Connect to a secure socket through a proxy\. HTTP proxy servers permit the
    use of the CONNECT HTTP command to open a link through the proxy to the
    target machine\. This function hides the details\. For use with the http
    package see __tls\_socket__\.

    The *args* list may contain any of the options supported by the specific
    TLS package that is in use but must end with the host and port as the last
    two items\.

  - <a name='5'></a>__::autoproxy::tunnel\_connect__ *args*

    Connect to a target host throught a proxy\. This uses the same CONNECT HTTP
    command as the __tls\_connect__ but does not promote the link security
    once the connection is established\.

    The *args* list may contain any of the options supported by the specific
    TLS package that is in use but must end with the host and port as the last
    two items\.

    Note that many proxy servers will permit CONNECT calls to a limited set of
    ports \- typically only port 443 \(the secure HTTP port\)\.

  - <a name='6'></a>__::autoproxy::tls\_socket__ *args*

    This function is to be used to register a proxy\-aware secure socket handler
    for the https protocol\. It may only be used with the Tcl http package and
    should be registered using the http::register command \(see the examples
    below\)\. The job of actually creating the tunnelled connection is done by the
    tls\_connect command and this may be used when not registering with the http
    package\.

# <a name='section4'></a>OPTIONS

  - __\-host__ hostname

  - __\-proxy\_host__ hostname

    Set the proxy hostname\. This is normally set up by __init__ but may be
    configured here as well\.

  - __\-port__ number

  - __\-proxy\_port__ number

    Set the proxy port number\. This is normally set up by __init__\. e\.g\.
    __configure__ __\-port__ *3128*

  - __\-no\_proxy__ list

    You may manipulate the __no\_proxy__ list that was setup by __init__\.
    The value of this option is a tcl list of strings that are matched against
    the http request host using the tcl __string match__ command\. Therefore
    glob patterns are permitted\. For instance, __configure__
    __\-no\_proxy__ *\*\.localdomain*

  - __\-authProc__ procedure

    This option may be used to set an application defined procedure to be called
    when __configure__ __\-basic__ is called with either no or
    insufficient authentication details\. This can be used to present a dialog to
    the user to request the additional information\.

  - __\-basic__

    Following options are for configuring the Basic authentication scheme
    parameters\. See [Basic Authentication](#section5)\. To unset the proxy
    authentication information retained from a previous call of this function
    either "\-\-" or no additional parameters can be supplied\. This will remove
    the existing authentication information\.

  - __\-tls\_package__ packagename

    This option may be used to configure the Tcl package to use for TLS support\.
    Valid package names are __tls__ \(default\) and __twapi__\.

# <a name='section5'></a>Basic Authentication

Basic is the simplest and most commonly use HTTP proxy authentication scheme\. It
is described in \(1 section 11\) and also in \(2\)\. It offers no privacy whatsoever
and its use should be discouraged in favour of more secure alternatives like
Digest\. To perform Basic authentication the client base64 encodes the username
and plaintext password separated by a colon\. This encoded text is prefixed with
the word "Basic" and a space\.

The following options exists for this scheme:

  - __\-username__ name

    The username required to authenticate with the configured proxy\.

  - __\-password__ password

    The password required for the username specified\.

  - __\-realm__ realm

    This option is not used by this package but may be used in requesting
    authentication details from the user\.

  - __\-\-__

    The end\-of\-options indicator may be used alone to unset any authentication
    details currently enabled\.

# <a name='section6'></a>EXAMPLES

    package require autoproxy
    autoproxy::init
    autoproxy::configure -basic -username ME -password SEKRET
    set tok [http::geturl http://wiki.tcl.tk/]
    http::data $tok

    package require http
    package require tls
    package require autoproxy
    autoproxy::init
    http::register https 443 autoproxy::tls_socket
    set tok [http::geturl https://www.example.com/]

# <a name='section7'></a>REFERENCES

  1. Berners\-Lee, T\., Fielding R\. and Frystyk, H\. "Hypertext Transfer Protocol
     \-\- HTTP/1\.0", RFC 1945, May 1996,
     \([http://www\.rfc\-editor\.org/rfc/rfc1945\.txt](http://www\.rfc\-editor\.org/rfc/rfc1945\.txt)\)

  1. Franks, J\. et al\. "HTTP Authentication: Basic and Digest Access
     Authentication", RFC 2617, June 1999
     \([http://www\.rfc\-editor\.org/rfc/rfc2617\.txt](http://www\.rfc\-editor\.org/rfc/rfc2617\.txt)\)

# <a name='section8'></a>BUGS

At this time only Basic authentication \(1\) \(2\) is supported\. It is planned to
add support for Digest \(2\) and NTLM in the future\.

# <a name='section9'></a>AUTHORS

Pat Thoyts

# <a name='section10'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *http :: autoproxy* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

http\(n\)

# <a name='keywords'></a>KEYWORDS

[authentication](\.\./\.\./\.\./\.\./index\.md\#authentication),
[http](\.\./\.\./\.\./\.\./index\.md\#http), [proxy](\.\./\.\./\.\./\.\./index\.md\#proxy)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/httpd/httpd.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854

[//000000001]: # (httpd \- Tcl Web Server)
[//000000002]: # (Generated from file 'httpd\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2018 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (httpd\(n\) 4\.3\.5 tcllib "Tcl Web Server")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

httpd \- A TclOO and coroutine based web server

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Minimal Example](#section2)

  - [Classes](#section3)

      - [Class httpd::mime](#subsection1)

      - [Class httpd::reply](#subsection2)

      - [Class httpd::server](#subsection3)

      - [Class httpd::server::dispatch](#subsection4)

      - [Class httpd::content\.redirect](#subsection5)

      - [Class httpd::content\.cache](#subsection6)

      - [Class httpd::content\.template](#subsection7)

      - [Class httpd::content\.file](#subsection8)

      - [Class httpd::content\.exec](#subsection9)

      - [Class httpd::content\.proxy](#subsection10)

      - [Class httpd::content\.cgi](#subsection11)

      - [Class httpd::protocol\.scgi](#subsection12)

      - [Class httpd::content\.scgi](#subsection13)

      - [Class httpd::server\.scgi](#subsection14)

      - [Class httpd::content\.websocket](#subsection15)

      - [Class httpd::plugin](#subsection16)

      - [Class httpd::plugin\.dict\_dispatch](#subsection17)

      - [Class httpd::reply\.memchan](#subsection18)

      - [Class httpd::plugin\.local\_memchan](#subsection19)

  - [AUTHORS](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require uuid  
package require clay  
package require coroutine  
package require fileutil  
package require fileutil::magic::filetype  
package require websocket  
package require mime  
package require cron  
package require uri  
package require Markdown  

[method __ChannelCopy__ *in* *out* ?*args*?](#1)  
[method __html\_header__ ?*title* ____? ?*args*?](#2)  
[method __html\_footer__ ?*args*?](#3)  
[method __http\_code\_string__ *code*](#4)  
[method __HttpHeaders__ *sock* ?*debug* ____?](#5)  
[method __HttpHeaders\_Default__](#6)  
[method __HttpServerHeaders__](#7)  
[method __MimeParse__ *mimetext*](#8)  
[method __Url\_Decode__ *data*](#9)  
[method __Url\_PathCheck__ *urlsuffix*](#10)  
[method __wait__ *mode* *sock*](#11)  
[variable __ChannelRegister__](#12)  
[variable __reply__](#13)  
[variable __request__](#14)  
[delegate __<server>__](#15)  
[method __constructor__ *ServerObj* ?*args*?](#16)  
[method __destructor__ ?*dictargs*?](#17)  
[method __ChannelRegister__ ?*args*?](#18)  
[method __close__](#19)  
[method __Log\_Dispatched__](#20)  
[method __dispatch__ *newsock* *datastate*](#21)  
[method __Dispatch__](#22)  
[method __html\_header__ *title* ?*args*?](#23)  
[method __html\_footer__ ?*args*?](#24)  
[method __[error](\.\./\.\./\.\./\.\./index\.md\#error)__ *code* ?*msg* ____? ?*errorInfo* ____?](#25)  
[method __content__](#26)  
[method __EncodeStatus__ *status*](#27)  
[method __[log](\.\./log/log\.md)__ *type* ?*info* ____?](#28)  
[method __CoroName__](#29)  
[method __DoOutput__](#30)  
[method __FormData__](#31)  
[method __PostData__ *length*](#32)  
[method __Session\_Load__](#33)  
[method __puts__ *line*](#34)  
[method __RequestFind__ *field*](#35)  
[method __request__ *subcommand* ?*args*?](#36)  
[method __reply__ *subcommand* ?*args*?](#37)  
[method __reset__](#38)  
[method __timeOutCheck__](#39)  
[method __[timestamp](\.\./\.\./\.\./\.\./index\.md\#timestamp)__](#40)  
[variable __template__](#41)  
[variable __url\_patterns__](#42)  
[method __constructor__ *args* ?*port* __auto__? ?*myaddr* __127\.0\.0\.1__? ?*string* __auto__? ?*name* __auto__? ?*doc\_root* ____? ?*reverse\_dns* __0__? ?*configuration\_file* ____? ?*protocol* __HTTP/1\.1__?](#43)  
[method __destructor__ ?*dictargs*?](#44)  
[method __connect__ *sock* *ip* *port*](#45)  
[method __ServerHeaders__ *ip* *http\_request* *mimetxt*](#46)  
[method __Connect__ *uuid* *sock* *ip*](#47)  
[method __[counter](\.\./counter/counter\.md)__ *which*](#48)  
[method __CheckTimeout__](#49)  
[method __[debug](\.\./debug/debug\.md)__ ?*args*?](#50)  
[method __dispatch__ *data*](#51)  
[method __Dispatch\_Default__ *reply*](#52)  
[method __Dispatch\_Local__ *data*](#53)  
[method __Headers\_Local__ *varname*](#54)  
[method __Headers\_Process__ *varname*](#55)  
[method __HostName__ *ipaddr*](#56)  
[method __[log](\.\./log/log\.md)__ ?*args*?](#57)  
[method __[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin)__ *slot* ?*class* ____?](#58)  
[method __port\_listening__](#59)  
[method __PrefixNormalize__ *prefix*](#60)  
[method __[source](\.\./\.\./\.\./\.\./index\.md\#source)__ *filename*](#61)  
[method __start__](#62)  
[method __stop__](#63)  
[method __SubObject \{\} db__](#64)  
[method __SubObject \{\} default__](#65)  
[method __template__ *page*](#66)  
[method __TemplateSearch__ *page*](#67)  
[method __Thread\_start__](#68)  
[method __Uuid\_Generate__](#69)  
[method __Validate\_Connection__ *sock* *ip*](#70)  
[method __reset__](#71)  
[method __content__](#72)  
[method __Dispatch__](#73)  
[method __content__](#74)  
[method __FileName__](#75)  
[method __DirectoryListing__ *local\_file*](#76)  
[method __content__](#77)  
[method __Dispatch__](#78)  
[variable __exename__](#79)  
[method __CgiExec__ *execname* *script* *arglist*](#80)  
[method __Cgi\_Executable__ *script*](#81)  
[method __proxy\_channel__](#82)  
[method __proxy\_path__](#83)  
[method __ProxyRequest__ *chana* *chanb*](#84)  
[method __ProxyReply__ *chana* *chanb* ?*args*?](#85)  
[method __Dispatch__](#86)  
[method __FileName__](#87)  
[method __proxy\_channel__](#88)  
[method __ProxyRequest__ *chana* *chanb*](#89)  
[method __ProxyReply__ *chana* *chanb* ?*args*?](#90)  
[method __DirectoryListing__ *local\_file*](#91)  
[method __EncodeStatus__ *status*](#92)  
[method __scgi\_info__](#93)  
[method __proxy\_channel__](#94)  
[method __ProxyRequest__ *chana* *chanb*](#95)  
[method __ProxyReply__ *chana* *chanb* ?*args*?](#96)  
[method __[debug](\.\./debug/debug\.md)__ ?*args*?](#97)  
[method __Connect__ *uuid* *sock* *ip*](#98)  
[method __Dispatch\_Dict__ *data*](#99)  
[method __uri \{\} add__ *vhosts* *patterns* *info*](#100)  
[method __uri \{\} direct__ *vhosts* *patterns* *info* *body*](#101)  
[method __output__](#102)  
[method __DoOutput__](#103)  
[method __close__](#104)  
[method __local\_memchan__ *command* ?*args*?](#105)  
[method __Connect\_Local__ *uuid* *sock* ?*args*?](#106)  

# <a name='description'></a>DESCRIPTION

This module implements a web server, suitable for embedding in an application\.
The server is object oriented, and contains all of the fundamentals needed for a
full service website\.

# <a name='section2'></a>Minimal Example

Starting a web service requires starting a class of type __httpd::server__,
and providing that server with one or more URIs to service, and
__httpd::reply__ derived classes to generate them\.

    oo::class create ::reply.hello {
      method content {} {
        my puts "<HTML><HEAD><TITLE>IRM Dispatch Server</TITLE></HEAD><BODY>"
        my puts "<h1>Hello World!</h1>"
        my puts </BODY></HTML>
      }
    }
    ::httpd::server create HTTPD port 8015 myaddr 127.0.0.1 doc_root ~/htdocs
    HTTPD plugin dispatch httpd::server::dispatch
    HTTPD uri add * /hello [list mixin reply.hello]

The bare module does have facilities to hose a files from a file system\. Files
that end in a \.tml will be substituted in the style of Tclhttpd:

    <!-- hello.tml -->
    [my html_header {Hello World!}]
    Your Server is running.
    <p>
    The time is now [clock format [clock seconds]]
    [my html_footer]

A complete example of an httpd server is in the /examples directory of Tcllib\.
It also show how to dispatch URIs to other processes via SCGI and HTTP proxies\.

    cd ~/tcl/sandbox/tcllib
    tclsh examples/httpd.tcl

# <a name='section3'></a>Classes

## <a name='subsection1'></a>Class  httpd::mime

A metaclass for MIME handling behavior across a live socket

__Methods__

  - <a name='1'></a>method __ChannelCopy__ *in* *out* ?*args*?

  - <a name='2'></a>method __html\_header__ ?*title* ____? ?*args*?

    Returns a block of HTML

  - <a name='3'></a>method __html\_footer__ ?*args*?

  - <a name='4'></a>method __http\_code\_string__ *code*

  - <a name='5'></a>method __HttpHeaders__ *sock* ?*debug* ____?

  - <a name='6'></a>method __HttpHeaders\_Default__

  - <a name='7'></a>method __HttpServerHeaders__

  - <a name='8'></a>method __MimeParse__ *mimetext*

    Converts a block of mime encoded text to a key/value list\. If an exception
    is encountered, the method will generate its own call to the
    __[error](\.\./\.\./\.\./\.\./index\.md\#error)__ method, and immediately
    invoke the __output__ method to produce an error code and close the
    connection\.

  - <a name='9'></a>method __Url\_Decode__ *data*

    De\-httpizes a string\.

  - <a name='10'></a>method __Url\_PathCheck__ *urlsuffix*

  - <a name='11'></a>method __wait__ *mode* *sock*

## <a name='subsection2'></a>Class  httpd::reply

*ancestors*: __httpd::mime__

A class which shephards a request through the process of generating a reply\. The
socket associated with the reply is available at all times as the *chan*
variable\. The process of generating a reply begins with an __httpd::server__
generating a __http::class__ object, mixing in a set of behaviors and then
invoking the reply object's __dispatch__ method\. In normal operations the
__dispatch__ method:

  1. Invokes the __reset__ method for the object to populate default
     headers\.

  1. Invokes the __HttpHeaders__ method to stream the MIME headers out of
     the socket

  1. Invokes the __request parse__ method to convert the stream of MIME
     headers into a dict that can be read via the __request__ method\.

  1. Stores the raw stream of MIME headers in the *rawrequest* variable of the
     object\.

  1. Invokes the __content__ method for the object, generating an call to
     the __[error](\.\./\.\./\.\./\.\./index\.md\#error)__ method if an exception
     is raised\.

  1. Invokes the __output__ method for the object

Developers have the option of streaming output to a buffer via the __puts__
method of the reply, or simply populating the *reply\_body* variable of the
object\. The information returned by the __content__ method is not
interpreted in any way\. If an exception is thrown \(via the
__[error](\.\./\.\./\.\./\.\./index\.md\#error)__ command in Tcl, for example\) the
caller will auto\-generate a 500 \{Internal Error\} message\. A typical
implementation of __content__ look like:

    clay::define ::test::content.file {
    	superclass ::httpd::content.file
    	# Return a file
    	# Note: this is using the content.file mixin which looks for the reply_file variable
    	# and will auto-compute the Content-Type
    	method content {} {
    	  my reset
        set doc_root [my request get DOCUMENT_ROOT]
        my variable reply_file
        set reply_file [file join $doc_root index.html]
    	}
    }
    clay::define ::test::content.time {
      # return the current system time
    	method content {} {
    		my variable reply_body
        my reply set Content-Type text/plain
    		set reply_body [clock seconds]
    	}
    }
    clay::define ::test::content.echo {
    	method content {} {
    		my variable reply_body
        my reply set Content-Type [my request get CONTENT_TYPE]
    		set reply_body [my PostData [my request get CONTENT_LENGTH]]
    	}
    }
    clay::define ::test::content.form_handler {
    	method content {} {
    	  set form [my FormData]
    	  my reply set Content-Type {text/html; charset=UTF-8}
        my puts [my html_header {My Dynamic Page}]
        my puts "<BODY>"
        my puts "You Sent<p>"
        my puts "<TABLE>"
        foreach {f v} $form {
          my puts "<TR><TH>$f</TH><TD><verbatim>$v</verbatim></TD>"
        }
        my puts "</TABLE><p>"
        my puts "Send some info:<p>"
        my puts "<FORM action=/[my request get REQUEST_PATH] method POST>"
        my puts "<TABLE>"
        foreach field {name rank serial_number} {
          set line "<TR><TH>$field</TH><TD><input name=\"$field\" "
          if {[dict exists $form $field]} {
            append line " value=\"[dict get $form $field]\"""
          }
          append line " /></TD></TR>"
          my puts $line
        }
        my puts "</TABLE>"
        my puts [my html footer]
    	}
    }

__Variable__

  - <a name='12'></a>variable __ChannelRegister__

  - <a name='13'></a>variable __reply__

    A dictionary which will converted into the MIME headers of the reply

  - <a name='14'></a>variable __request__

    A dictionary containing the SCGI transformed HTTP headers for the request

__Delegate__

  - <a name='15'></a>delegate __<server>__

    The server object which spawned this reply

__Methods__

  - <a name='16'></a>method __constructor__ *ServerObj* ?*args*?

  - <a name='17'></a>method __destructor__ ?*dictargs*?

    clean up on exit

  - <a name='18'></a>method __ChannelRegister__ ?*args*?

    Registers a channel to be closed by the close method

  - <a name='19'></a>method __close__

    Close channels opened by this object

  - <a name='20'></a>method __Log\_Dispatched__

    Record a dispatch event

  - <a name='21'></a>method __dispatch__ *newsock* *datastate*

    Accept the handoff from the server object of the socket *newsock* and feed
    it the state *datastate*\. Fields the *datastate* are looking for in
    particular are:

    \* __mixin__ \- A key/value list of slots and classes to be mixed into the
    object prior to invoking __Dispatch__\.

    \* __http__ \- A key/value list of values to populate the object's
    *request* ensemble

    All other fields are passed along to the __clay__ structure of the
    object\.

  - <a name='22'></a>method __Dispatch__

  - <a name='23'></a>method __html\_header__ *title* ?*args*?

  - <a name='24'></a>method __html\_footer__ ?*args*?

  - <a name='25'></a>method __[error](\.\./\.\./\.\./\.\./index\.md\#error)__ *code* ?*msg* ____? ?*errorInfo* ____?

  - <a name='26'></a>method __content__

    REPLACE ME: This method is the "meat" of your application\. It writes to the
    result buffer via the "puts" method and can tweak the headers via "clay put
    header\_reply"

  - <a name='27'></a>method __EncodeStatus__ *status*

    Formulate a standard HTTP status header from he string provided\.

  - <a name='28'></a>method __[log](\.\./log/log\.md)__ *type* ?*info* ____?

  - <a name='29'></a>method __CoroName__

  - <a name='30'></a>method __DoOutput__

    Generates the the HTTP reply, streams that reply back across *chan*, and
    destroys the object\.

  - <a name='31'></a>method __FormData__

    For GET requests, converts the QUERY\_DATA header into a key/value list\. For
    POST requests, reads the Post data and converts that information to a
    key/value list for application/x\-www\-form\-urlencoded posts\. For multipart
    posts, it composites all of the MIME headers of the post to a singular
    key/value list, and provides MIME\_\* information as computed by the
    __[mime](\.\./mime/mime\.md)__ package, including the MIME\_TOKEN, which
    can be fed back into the mime package to read out the contents\.

  - <a name='32'></a>method __PostData__ *length*

    Stream *length* bytes from the *chan* socket, but only of the request is
    a POST or PUSH\. Returns an empty string otherwise\.

  - <a name='33'></a>method __Session\_Load__

    Manage session data

  - <a name='34'></a>method __puts__ *line*

    Appends the value of *string* to the end of *reply\_body*, as well as a
    trailing newline character\.

  - <a name='35'></a>method __RequestFind__ *field*

  - <a name='36'></a>method __request__ *subcommand* ?*args*?

  - <a name='37'></a>method __reply__ *subcommand* ?*args*?

  - <a name='38'></a>method __reset__

    Clear the contents of the *reply\_body* variable, and reset all headers in
    the __reply__ structure back to the defaults for this object\.

  - <a name='39'></a>method __timeOutCheck__

    Called from the __http::server__ object which spawned this reply\. Checks
    to see if too much time has elapsed while waiting for data or generating a
    reply, and issues a timeout error to the request if it has, as well as
    destroy the object and close the *chan* socket\.

  - <a name='40'></a>method __[timestamp](\.\./\.\./\.\./\.\./index\.md\#timestamp)__

    Return the current system time in the format:

    %a, %d %b %Y %T %Z

## <a name='subsection3'></a>Class  httpd::server

*ancestors*: __httpd::mime__

__Variable__

  - <a name='41'></a>variable __template__

  - <a name='42'></a>variable __url\_patterns__

__Methods__

  - <a name='43'></a>method __constructor__ *args* ?*port* __auto__? ?*myaddr* __127\.0\.0\.1__? ?*string* __auto__? ?*name* __auto__? ?*doc\_root* ____? ?*reverse\_dns* __0__? ?*configuration\_file* ____? ?*protocol* __HTTP/1\.1__?

  - <a name='44'></a>method __destructor__ ?*dictargs*?

  - <a name='45'></a>method __connect__ *sock* *ip* *port*

    Reply to an open socket\. This method builds a coroutine to manage the
    remainder of the connection\. The coroutine's operations are driven by the
    __Connect__ method\.

  - <a name='46'></a>method __ServerHeaders__ *ip* *http\_request* *mimetxt*

  - <a name='47'></a>method __Connect__ *uuid* *sock* *ip*

    This method reads HTTP headers, and then consults the __dispatch__
    method to determine if the request is valid, and/or what kind of reply to
    generate\. Under normal cases, an object of class __::http::reply__ is
    created, and that class's __dispatch__ method\. This action passes
    control of the socket to the reply object\. The reply object manages the rest
    of the transaction, including closing the socket\.

  - <a name='48'></a>method __[counter](\.\./counter/counter\.md)__ *which*

    Increment an internal counter\.

  - <a name='49'></a>method __CheckTimeout__

    Check open connections for a time out event\.

  - <a name='50'></a>method __[debug](\.\./debug/debug\.md)__ ?*args*?

  - <a name='51'></a>method __dispatch__ *data*

    Given a key/value list of information, return a data structure describing
    how the server should reply\.

  - <a name='52'></a>method __Dispatch\_Default__ *reply*

    Method dispatch method of last resort before returning a 404 NOT FOUND
    error\. The default behavior is to look for a file in *DOCUMENT\_ROOT* which
    matches the query\.

  - <a name='53'></a>method __Dispatch\_Local__ *data*

    Method dispatch method invoked prior to invoking methods implemented by
    plugins\. If this method returns a non\-empty dictionary, that structure will
    be passed to the reply\. The default is an empty implementation\.

  - <a name='54'></a>method __Headers\_Local__ *varname*

    Introspect and possibly modify a data structure destined for a reply\. This
    method is invoked before invoking Header methods implemented by plugins\. The
    default implementation is empty\.

  - <a name='55'></a>method __Headers\_Process__ *varname*

    Introspect and possibly modify a data structure destined for a reply\. This
    method is built dynamically by the
    __[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin)__ method\.

  - <a name='56'></a>method __HostName__ *ipaddr*

    Convert an ip address to a host name\. If the server/ reverse\_dns flag is
    false, this method simply returns the IP address back\. Internally, this
    method uses the *dns* module from tcllib\.

  - <a name='57'></a>method __[log](\.\./log/log\.md)__ ?*args*?

    Log an event\. The input for args is free form\. This method is intended to be
    replaced by the user, and is a noop for a stock http::server object\.

  - <a name='58'></a>method __[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin)__ *slot* ?*class* ____?

    Incorporate behaviors from a plugin\. This method dynamically rebuilds the
    __Dispatch__ and __Headers__ method\. For every plugin, the server
    looks for the following entries in *clay plugin/*:

    *load* \- A script to invoke in the server's namespace during the
    __[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin)__ method invokation\.

    *dispatch* \- A script to stitch into the server's __Dispatch__ method\.

    *headers* \- A script to stitch into the server's __Headers__ method\.

    *thread* \- A script to stitch into the server's __Thread\_start__
    method\.

  - <a name='59'></a>method __port\_listening__

    Return the actual port that httpd is listening on\.

  - <a name='60'></a>method __PrefixNormalize__ *prefix*

    For the stock version, trim trailing /'s and \*'s from a prefix\. This method
    can be replaced by the end user to perform any other transformations needed
    for the application\.

  - <a name='61'></a>method __[source](\.\./\.\./\.\./\.\./index\.md\#source)__ *filename*

  - <a name='62'></a>method __start__

    Open the socket listener\.

  - <a name='63'></a>method __stop__

    Shut off the socket listener, and destroy any pending replies\.

  - <a name='64'></a>method __SubObject \{\} db__

  - <a name='65'></a>method __SubObject \{\} default__

  - <a name='66'></a>method __template__ *page*

    Return a template for the string *page*

  - <a name='67'></a>method __TemplateSearch__ *page*

    Perform a search for the template that best matches *page*\. This can
    include local file searches, in\-memory structures, or even database lookups\.
    The stock implementation simply looks for files with a \.tml or \.html
    extension in the ?doc\_root? directory\.

  - <a name='68'></a>method __Thread\_start__

    Built by the __[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin)__ method\.
    Called by the __start__ method\. Intended to allow plugins to spawn
    worker threads\.

  - <a name='69'></a>method __Uuid\_Generate__

    Generate a GUUID\. Used to ensure every request has a unique ID\. The default
    implementation is:

    return [::clay::uuid generate]

  - <a name='70'></a>method __Validate\_Connection__ *sock* *ip*

    Given a socket and an ip address, return true if this connection should be
    terminated, or false if it should be allowed to continue\. The stock
    implementation always returns 0\. This is intended for applications to be
    able to implement black lists and/or provide security based on IP address\.

## <a name='subsection4'></a>Class  httpd::server::dispatch

*ancestors*: __httpd::server__

Provide a backward compadible alias

## <a name='subsection5'></a>Class  httpd::content\.redirect

__Methods__

  - <a name='71'></a>method __reset__

  - <a name='72'></a>method __content__

## <a name='subsection6'></a>Class  httpd::content\.cache

__Methods__

  - <a name='73'></a>method __Dispatch__

## <a name='subsection7'></a>Class  httpd::content\.template

__Methods__

  - <a name='74'></a>method __content__

## <a name='subsection8'></a>Class  httpd::content\.file

Class to deliver Static content When utilized, this class is fed a local
filename by the dispatcher

__Methods__

  - <a name='75'></a>method __FileName__

  - <a name='76'></a>method __DirectoryListing__ *local\_file*

  - <a name='77'></a>method __content__

  - <a name='78'></a>method __Dispatch__

## <a name='subsection9'></a>Class  httpd::content\.exec

__Variable__

  - <a name='79'></a>variable __exename__

__Methods__

  - <a name='80'></a>method __CgiExec__ *execname* *script* *arglist*

  - <a name='81'></a>method __Cgi\_Executable__ *script*

## <a name='subsection10'></a>Class  httpd::content\.proxy

*ancestors*: __httpd::content\.exec__

Return data from an proxy process

__Methods__

  - <a name='82'></a>method __proxy\_channel__

  - <a name='83'></a>method __proxy\_path__

  - <a name='84'></a>method __ProxyRequest__ *chana* *chanb*

  - <a name='85'></a>method __ProxyReply__ *chana* *chanb* ?*args*?

  - <a name='86'></a>method __Dispatch__

## <a name='subsection11'></a>Class  httpd::content\.cgi

*ancestors*: __httpd::content\.proxy__

__Methods__

  - <a name='87'></a>method __FileName__

  - <a name='88'></a>method __proxy\_channel__

  - <a name='89'></a>method __ProxyRequest__ *chana* *chanb*

  - <a name='90'></a>method __ProxyReply__ *chana* *chanb* ?*args*?

  - <a name='91'></a>method __DirectoryListing__ *local\_file*

    For most CGI applications a directory list is vorboten

## <a name='subsection12'></a>Class  httpd::protocol\.scgi

Return data from an SCGI process

__Methods__

  - <a name='92'></a>method __EncodeStatus__ *status*

## <a name='subsection13'></a>Class  httpd::content\.scgi

*ancestors*: __httpd::content\.proxy__

__Methods__

  - <a name='93'></a>method __scgi\_info__

  - <a name='94'></a>method __proxy\_channel__

  - <a name='95'></a>method __ProxyRequest__ *chana* *chanb*

  - <a name='96'></a>method __ProxyReply__ *chana* *chanb* ?*args*?

## <a name='subsection14'></a>Class  httpd::server\.scgi

*ancestors*: __httpd::server__

Act as an SCGI Server

__Methods__

  - <a name='97'></a>method __[debug](\.\./debug/debug\.md)__ ?*args*?

  - <a name='98'></a>method __Connect__ *uuid* *sock* *ip*

## <a name='subsection15'></a>Class  httpd::content\.websocket

Upgrade a connection to a websocket

## <a name='subsection16'></a>Class  httpd::plugin

httpd plugin template

## <a name='subsection17'></a>Class  httpd::plugin\.dict\_dispatch

A rudimentary plugin that dispatches URLs from a dict data structure

__Methods__

  - <a name='99'></a>method __Dispatch\_Dict__ *data*

    Implementation of the dispatcher

  - <a name='100'></a>method __uri \{\} add__ *vhosts* *patterns* *info*

  - <a name='101'></a>method __uri \{\} direct__ *vhosts* *patterns* *info* *body*

## <a name='subsection18'></a>Class  httpd::reply\.memchan

*ancestors*: __httpd::reply__

__Methods__

  - <a name='102'></a>method __output__

  - <a name='103'></a>method __DoOutput__

  - <a name='104'></a>method __close__

## <a name='subsection19'></a>Class  httpd::plugin\.local\_memchan

__Methods__

  - <a name='105'></a>method __local\_memchan__ *command* ?*args*?

  - <a name='106'></a>method __Connect\_Local__ *uuid* *sock* ?*args*?

    A modified connection method that passes simple GET request to an object and
    pulls data directly from the reply\_body data variable in the object Needed
    because memchan is bidirectional, and we can't seem to communicate that the
    server is one side of the link and the reply is another

# <a name='section4'></a>AUTHORS

Sean Woods

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *network* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo), [WWW](\.\./\.\./\.\./\.\./index\.md\#www),
[http](\.\./\.\./\.\./\.\./index\.md\#http), [httpd](\.\./\.\./\.\./\.\./index\.md\#httpd),
[httpserver](\.\./\.\./\.\./\.\./index\.md\#httpserver),
[services](\.\./\.\./\.\./\.\./index\.md\#services)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2018 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/ident/ident.md.

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
89
90
91
92
93
94
95
96
97
98
99
100

[//000000001]: # (ident \- Identification protocol client)
[//000000002]: # (Generated from file 'ident\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Reinhard Max <max@tclers\.tk>)
[//000000004]: # (ident\(n\) 0\.42 tcllib "Identification protocol client")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ident \- Ident protocol client

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require ident ?0\.42?  

[__::ident::query__ *socket* ?*callback*?](#1)  

# <a name='description'></a>DESCRIPTION

The __ident__ package provides a client implementation of the ident protocol
as defined in RFC 1413
\([http://www\.rfc\-editor\.org/rfc/rfc1413\.txt](http://www\.rfc\-editor\.org/rfc/rfc1413\.txt)\)\.

  - <a name='1'></a>__::ident::query__ *socket* ?*callback*?

    This command queries the ident daemon on the remote side of the given
    socket, and returns the result of the query as a dictionary\. Interpreting
    the dictionary as list the first key will always be __resp\-type__, and
    can have one of the values __USERID__, __ERROR__, and __FATAL__\.
    These *response types* have the following meanings:

      * USERID

        This indicates a successful response\. Two more keys and associated
        values are returned, __opsys__, and __user\-id__\.

      * ERROR

        This means the ident server has returned an error\. A second key named
        __error__ is present whose value contains the __error\-type__
        field from the server response\.

      * FATAL

        Fatal errors happen when no ident server is listening on the remote
        side, or when the ident server gives a response that does not conform to
        the RFC\. A detailed error message is returned under the __error__
        key\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *ident* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[ident](\.\./\.\./\.\./\.\./index\.md\#ident),
[identification](\.\./\.\./\.\./\.\./index\.md\#identification), [rfc
1413](\.\./\.\./\.\./\.\./index\.md\#rfc\_1413)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Reinhard Max <max@tclers\.tk>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































Deleted embedded/md/tcllib/files/modules/imap4/imap4.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521

[//000000001]: # (imap4 \- imap client)
[//000000002]: # (Generated from file 'imap4\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (imap4\(n\) 0\.5\.3 tcllib "imap client")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

imap4 \- imap client\-side tcl implementation of imap protocol

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [EXAMPLES](#section3)

  - [TLS Security Considerations](#section4)

  - [REFERENCES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require imap4 ?0\.5\.3?  

[__::imap4::open__ *hostname* ?*port*?](#1)  
[__::imap4::starttls__ *chan*](#2)  
[__::imap4::login__ *chan* *user* *pass*](#3)  
[__::imap4::folders__ *chan* ?*\-inline*? ?*mboxref*? ?*mboxname*?](#4)  
[__::imap4::select__ *chan* ?*mailbox*?](#5)  
[__::imap4::examine__ *chan* ?*mailbox*?](#6)  
[__::imap4::fetch__ *chan* *range* ?*\-inline*? ?*attr \.\.\.*?](#7)  
[__::imap4::noop__ *chan*](#8)  
[__::imap4::check__ *chan*](#9)  
[__::imap4::folderinfo__ *chan* ?*info*?](#10)  
[__::imap4::msginfo__ *chan* *msgid* ?*info*? ?*defval*?](#11)  
[__::imap4::mboxinfo__ *chan* ?*info*?](#12)  
[__::imap4::isableto__ *chan* ?*capability*?](#13)  
[__::imap4::create__ *chan* *mailbox*](#14)  
[__::imap4::delete__ *chan* *mailbox*](#15)  
[__::imap4::rename__ *chan* *oldname* *newname*](#16)  
[__::imap4::subscribe__ *chan* *mailbox*](#17)  
[__::imap4::unsubscribe__ *chan* *mailbox*](#18)  
[__::imap4::search__ *chan* *expr* ?*\.\.\.*?](#19)  
[__::imap4::close__ *chan*](#20)  
[__::imap4::cleanup__ *chan*](#21)  
[__::imap4::debugmode__ *chan* ?*errormsg*?](#22)  
[__::imap4::store__ *chan* *range* *data* *flaglist*](#23)  
[__::imap4::expunge__ *chan*](#24)  
[__::imap4::copy__ *chan* *msgid* *mailbox*](#25)  
[__::imap4::logout__ *chan*](#26)  

# <a name='description'></a>DESCRIPTION

The __imap4__ library package provides the client side of the *Internet
Message Access Protocol* \(IMAP\) using standard sockets or secure connection via
TLS/SSL\. The package is fully implemented in Tcl\.

This document describes the procedures and explains their usage\.

# <a name='section2'></a>PROCEDURES

This package defines the following public procedures:

  - <a name='1'></a>__::imap4::open__ *hostname* ?*port*?

    Open a new IMAP connection and initalize the handler, the imap communication
    channel \(handler\) is returned\.

    *hostname* \- mail server

    *port* \- connection port, defaults to 143

    The namespace variable __::imap4::use\_ssl__ can be used to establish to
    a secure connection via TSL/SSL if set to true\. In this case default
    connection port defaults to 993\.

    *Note:* For connecting via SSL the Tcl module *tls* must be already
    loaded otherwise an error is raised\.

        package require tls              ; # must be loaded for TLS/SSL
        set ::imap4::use_ssl 1           ; # request a secure connection
        set chan [::imap4::open $server] ; # default port is now 993

  - <a name='2'></a>__::imap4::starttls__ *chan*

    Use this when tasked with connecting to an unsecure port which must be
    changed to a secure port prior to user login\. This feature is known as
    *STARTTLS*\.

  - <a name='3'></a>__::imap4::login__ *chan* *user* *pass*

    Login using the IMAP LOGIN command, 0 is returned on successful login\.

    *chan* \- imap channel

    *user* \- username

    *pass* \- password

  - <a name='4'></a>__::imap4::folders__ *chan* ?*\-inline*? ?*mboxref*? ?*mboxname*?

    Get list of matching folders, 0 is returned on success\.

    Wildcards '\*' as '%' are allowed for *mboxref* and *mboxname*, command
    __::imap4::folderinfo__ can be used to retrieve folder information\.

    *chan* \- imap channel

    *mboxref* \- mailbox reference, defaults to ""

    *mboxname* \- mailbox name, defaults to "\*"

    If __\-inline__ is specified a compact folderlist is returned instead of
    the result code\. All flags are converted to lowercase and leading special
    characters are removed\.

        {{Arc08 noselect} {Arc08/Private {noinferiors unmarked}} {INBOX noinferiors}}

  - <a name='5'></a>__::imap4::select__ *chan* ?*mailbox*?

    Select a mailbox, 0 is returned on success\.

    *chan* \- imap channel

    *mailbox* \- Path of the mailbox, defaults to *INBOX*

    Prior to examine/select an open mailbox must be closed \- see:
    __::imap4::close__\.

  - <a name='6'></a>__::imap4::examine__ *chan* ?*mailbox*?

    "Examines" a mailbox, read\-only equivalent of __::imap4::select__\.

    *chan* \- imap channel

    *mailbox* \- mailbox name or path to mailbox, defaults to *INBOX*

    Prior to examine/select an open mailbox must be closed \- see:
    __::imap4::close__\.

  - <a name='7'></a>__::imap4::fetch__ *chan* *range* ?*\-inline*? ?*attr \.\.\.*?

    Fetch attributes from messages\.

    The attributes are fetched and stored in the internal state which can be
    retrieved with command __::imap4::msginfo__, 0 is returned on success\.
    If __\-inline__ is specified, alle records are returned as list in order
    as defined in the *attr* argument\.

    *chan* \- imap channel

    *range* \- message index in format *FROM*:*TO*

    *attr* \- imap attributes to fetch

    *Note:* If *FROM* is omitted, the 1st message is assumed, if *TO* is
    ommitted the last message is assumed\. All message index ranges are 1\-based\.

  - <a name='8'></a>__::imap4::noop__ *chan*

    Send NOOP command to server\. May get information as untagged data\.

    *chan* \- imap channel

  - <a name='9'></a>__::imap4::check__ *chan*

    Send CHECK command to server\. Flush to disk\.

    *chan* \- imap channel

  - <a name='10'></a>__::imap4::folderinfo__ *chan* ?*info*?

    Get information on the recently selected folderlist\. If the *info*
    argument is omitted or a null string, the full list of information available
    for the mailbox is returned\.

    If the required information name is suffixed with a ? character, the command
    returns true if the information is available, or false if it is not\.

    *chan* \- imap channel

    *info* \- folderlist options to retrieve

    Currently supported options: *delim* \- hierarchy delimiter only, *match*
    \- ref and mbox search patterns \(see __::imap4::folders__\), *names* \-
    list of folder names only, *flags* \- list of folder names with flags in
    format *\{ \{name \{flags\}\} \.\.\. \}* \(see also compact format in function
    __::imap4::folders__\)\.

        {{Arc08 {{\NoSelect}}} {Arc08/Private {{\NoInferiors} {\UnMarked}}} {INBOX {\NoInferiors}}}

  - <a name='11'></a>__::imap4::msginfo__ *chan* *msgid* ?*info*? ?*defval*?

    Get information \(from previously collected using fetch\) from a given
    *msgid*\. If the 'info' argument is omitted or a null string, the list of
    available information options for the given message is returned\.

    If the required information name is suffixed with a ? character, the command
    returns true if the information is available, or false if it is not\.

    *chan* \- imap channel

    *msgid* \- message number

    *info* \- imap keyword to retrieve

    *defval* \- default value, returned if info is empty

    *Note:* All message index ranges are 1\-based\.

  - <a name='12'></a>__::imap4::mboxinfo__ *chan* ?*info*?

    Get information on the currently selected mailbox\. If the *info* argument
    is omitted or a null string, the list of available information options for
    the mailbox is returned\.

    If the required information name is suffixed with a ? character, the command
    returns true if the information is available, or false if it is not\.

    *chan* \- imap channel

    *opt* \- mailbox option to retrieve

    Currently supported options: *EXISTS* \(noof msgs\), *RECENT* \(noof
    'recent' flagged msgs\), *FLAGS*

    In conjunction with OK: *PERMFLAGS*, *UIDNEXT*, *UIDVAL*, *UNSEEN*

    Div\. states: *CURRENT*, *FOUND*, *PERM*\.

        ::imap4::select $chan INBOX
        puts "[::imap4::mboxinfo $chan exists] mails in INBOX"

  - <a name='13'></a>__::imap4::isableto__ *chan* ?*capability*?

    Test for capability\. It returns 1 if requested capability is supported, 0
    otherwise\. If *capability* is omitted all capability imap codes are
    retured as list\.

    *chan* \- imap channel

    *info* \- imap keyword to retrieve

    *Note:* Use the capability command to ask the server if not already done
    by the user\.

  - <a name='14'></a>__::imap4::create__ *chan* *mailbox*

    Create a new mailbox\.

    *chan* \- imap channel

    *mailbox* \- mailbox name

  - <a name='15'></a>__::imap4::delete__ *chan* *mailbox*

    Delete a new mailbox\.

    *chan* \- imap channel

    *mailbox* \- mailbox name

  - <a name='16'></a>__::imap4::rename__ *chan* *oldname* *newname*

    Rename a new mailbox\.

    *chan* \- imap channel

    *mailbox* \- old mailbox name

    *mailbox* \- new mailbox name

  - <a name='17'></a>__::imap4::subscribe__ *chan* *mailbox*

    Subscribe a new mailbox\.

    *chan* \- imap channel

    *mailbox* \- mailbox name

  - <a name='18'></a>__::imap4::unsubscribe__ *chan* *mailbox*

    Unsubscribe a new mailbox\.

    *chan* \- imap channel

    *mailbox* \- mailbox name

  - <a name='19'></a>__::imap4::search__ *chan* *expr* ?*\.\.\.*?

    Search for mails matching search criterions, 0 is returned on success\.

    *chan* \- imap channel

    *expr* \- imap search expression

    *Notes:* Currently the following search expressions are handled:

    *Mail header flags:* all mail header entries \(ending with a colon ":"\),
    like "From:", "Bcc:", \.\.\.

    *Imap message search flags:* ANSWERED, DELETED, DRAFT, FLAGGED, RECENT,
    SEEN, NEW, OLD, UNANSWERED, UNDELETED, UNDRAFT, UNFLAGGED, UNSEEN, ALL

    *Imap header search flags:* BODY, CC, FROM, SUBJECT, TEXT, KEYWORD, BCC

    *Imap conditional search flags:* SMALLER, LARGER, ON, SENTBEFORE, SENTON,
    SENTSINCE, SINCE, BEFORE \(not implemented\), UID \(not implemented\)

    *Logical search conditions:* OR, NOT

        ::imap4::search $chan larger 4000 seen
        puts "Found messages: [::imap4::mboxinfo $chan found]"
        Found messages: 1 3 6 7 8 9 13 14 15 19 20

  - <a name='20'></a>__::imap4::close__ *chan*

    Close the mailbox\. Permanently removes \\Deleted messages and return to the
    AUTH state\.

    *chan* \- imap channel

  - <a name='21'></a>__::imap4::cleanup__ *chan*

    Destroy an IMAP connection and free the used space\. Close the mailbox\.
    Permanently removes \\Deleted messages and return to the AUTH state\.

    *chan* \- imap channel

  - <a name='22'></a>__::imap4::debugmode__ *chan* ?*errormsg*?

    Switch client into command line debug mode\.

    This is a developers mode only that pass the control to the programmer\.
    Every line entered is sent verbatim to the server \(after the addition of the
    request identifier\)\. The ::imap4::debug variable is automatically set to '1'
    on enter\.

    It's possible to execute Tcl commands starting the line with a slash\.

    *chan* \- imap channel

    *errormsg* \- optional error message to display

  - <a name='23'></a>__::imap4::store__ *chan* *range* *data* *flaglist*

    Alters data associated with a message in the selected mailbox\.

    *chan* \- imap channel

    *range* \- message index in format *FROM*:*TO*

    *flaglist* \- Flags the *data* operates on\.

    *data* \- The currently defined *data* items that can be stored are shown
    below\. *Note* that all of these data types may also be suffixed with
    "\.SILENT" to suppress the untagged FETCH response\.

      * FLAGS

        Replace the flags for the message \(other than \\Recent\) with the
        *flaglist*\.

      * \+FLAGS

        Add the flags in *flaglist* to the existing flags for the message\.

      * \-FLAGS

        Remove the flags in *flaglist* to the existing flags for the message\.

    For example:

        ::imap4::store $chan $start_msgid:$end_msgid +FLAGS "Deleted"

  - <a name='24'></a>__::imap4::expunge__ *chan*

    Permanently removes all messages that have the \\Deleted flag set from the
    currently selected mailbox, without the need to close the connection\.

    *chan* \- imap channel

  - <a name='25'></a>__::imap4::copy__ *chan* *msgid* *mailbox*

    Copies the specified message \(identified by its message number\) to the named
    mailbox, i\.e\. imap folder\.

    *chan* \- imap channel

    *msgid* \- message number

    *mailbox* \- mailbox name

  - <a name='26'></a>__::imap4::logout__ *chan*

    Informs the server that the client is done with the connection and closes
    the network connection\. Permanently removes \\Deleted messages\.

    A new connection will need to be established to login once more\.

    *chan* \- imap channel

# <a name='section3'></a>EXAMPLES

    set user myusername
    set pass xtremescrt
    set server imap.test.tld
    set FOLDER INBOX
    # Connect to server
    set imap [::imap4::open $server]
    ::imap4::login $imap $user $pass
    ::imap4::select $imap $FOLDER
    # Output all the information about that mailbox
    foreach info [::imap4::mboxinfo $imap] {
        puts "$info -> [::imap4::mboxinfo $imap $info]"
    }
    # fetch 3 records inline
    set fields {from: to: subject: size}
    foreach rec [::imap4::fetch $imap :3 -inline {*}$fields] {
        puts -nonewline "#[incr idx])"
        for {set j 0} {$j<[llength $fields]} {incr j} {
            puts "\t[lindex $fields $j] [lindex $rec $j]"
        }
    }

    # Show all the information available about the message ID 1
    puts "Available info about message 1: [::imap4::msginfo $imap 1]"

    # Use the capability stuff
    puts "Capabilities: [::imap4::isableto $imap]"
    puts "Is able to imap4rev1? [::imap4::isableto $imap imap4rev1]"

    # Cleanup
    ::imap4::cleanup $imap

# <a name='section4'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section5'></a>REFERENCES

Mark R\. Crispin, "INTERNET MESSAGE ACCESS PROTOCOL \- VERSION 4rev1", RFC 3501,
March 2003,
[http://www\.rfc\-editor\.org/rfc/rfc3501\.txt](http://www\.rfc\-editor\.org/rfc/rfc3501\.txt)

OpenSSL, [http://www\.openssl\.org/](http://www\.openssl\.org/)

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *imap4* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\. Only a small part of rfc3501 implemented\.

# <a name='seealso'></a>SEE ALSO

[ftp](\.\./ftp/ftp\.md), [http](\.\./\.\./\.\./\.\./index\.md\#http),
[imap](\.\./\.\./\.\./\.\./index\.md\#imap), [mime](\.\./mime/mime\.md),
[pop3](\.\./pop3/pop3\.md), [tls](\.\./\.\./\.\./\.\./index\.md\#tls)

# <a name='keywords'></a>KEYWORDS

[email](\.\./\.\./\.\./\.\./index\.md\#email), [imap](\.\./\.\./\.\./\.\./index\.md\#imap),
[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[mail](\.\./\.\./\.\./\.\./index\.md\#mail), [net](\.\./\.\./\.\./\.\./index\.md\#net),
[rfc3501](\.\./\.\./\.\./\.\./index\.md\#rfc3501),
[ssl](\.\./\.\./\.\./\.\./index\.md\#ssl), [tls](\.\./\.\./\.\./\.\./index\.md\#tls)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/inifile/ini.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150

[//000000001]: # (inifile \- Parsing of Windows INI files)
[//000000002]: # (Generated from file 'ini\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (inifile\(n\) 0\.3\.2 tcllib "Parsing of Windows INI files")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

inifile \- Parsing of Windows INI files

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require inifile ?0\.3\.2?  

[__::ini::open__ *file* ?__\-encoding__ *encoding*? ?*access*?](#1)  
[__::ini::close__ *ini*](#2)  
[__::ini::commit__ *ini*](#3)  
[__::ini::revert__ *ini*](#4)  
[__::ini::filename__ *ini*](#5)  
[__::ini::sections__ *ini*](#6)  
[__::ini::keys__ *ini* *section*](#7)  
[__::ini::get__ *ini* *section*](#8)  
[__::ini::exists__ *ini* *section* ?*key*?](#9)  
[__::ini::value__ *ini* *section* *key* ?*default*?](#10)  
[__::ini::set__ *ini* *section* *key* *value*](#11)  
[__::ini::delete__ *ini* *section* ?*key*?](#12)  
[__::ini::comment__ *ini* *section* ?*key*? ?*text*?](#13)  
[__::ini::commentchar__ ?char?](#14)  

# <a name='description'></a>DESCRIPTION

This package provides an interface for easy manipulation of Windows INI files\.

  - <a name='1'></a>__::ini::open__ *file* ?__\-encoding__ *encoding*? ?*access*?

    Opens an INI file and returns a handle that is used by other commands\.
    *access* is the same as the first form \(non POSIX\) of the __open__
    command, with the exception that mode __a__ is not supported\. The
    default mode is __r\+__\.

    The default *encoding* is the system encoding\.

  - <a name='2'></a>__::ini::close__ *ini*

    Close the specified handle\. If any changes were made and not written by
    __commit__ they are lost\.

  - <a name='3'></a>__::ini::commit__ *ini*

    Writes the file and all changes to disk\. The sections are written in
    arbitrary order\. The keys in a section are written in alphabetical order\. If
    the ini was opened in read only mode an error will be thrown\.

  - <a name='4'></a>__::ini::revert__ *ini*

    Rolls all changes made to the inifile object back to the last committed
    state\.

  - <a name='5'></a>__::ini::filename__ *ini*

    Returns the name of the file the *ini* object is associated with\.

  - <a name='6'></a>__::ini::sections__ *ini*

    Returns a list of all the names of the existing sections in the file handle
    specified\.

  - <a name='7'></a>__::ini::keys__ *ini* *section*

    Returns a list of all they key names in the section and file specified\.

  - <a name='8'></a>__::ini::get__ *ini* *section*

    Returns a list of key value pairs that exist in the section and file
    specified\.

  - <a name='9'></a>__::ini::exists__ *ini* *section* ?*key*?

    Returns a boolean value indicating the existance of the specified section as
    a whole or the specified key within that section\.

  - <a name='10'></a>__::ini::value__ *ini* *section* *key* ?*default*?

    Returns the value of the named key and section\. If specified, the default
    value will be returned if the key does not exist\. If the key does not exist
    and no default is specified an error will be thrown\.

  - <a name='11'></a>__::ini::set__ *ini* *section* *key* *value*

    Sets the value of the key in the specified section\. If the section does not
    exist then a new one is created\.

  - <a name='12'></a>__::ini::delete__ *ini* *section* ?*key*?

    Removes the key or the entire section and all its keys\. A section is not
    automatically deleted when it has no remaining keys\.

  - <a name='13'></a>__::ini::comment__ *ini* *section* ?*key*? ?*text*?

    Reads and modifies comments for sections and keys\. To write a section
    comment use an empty string for the *key*\. To remove all comments use an
    empty string for *text*\. *text* may consist of a list of lines or one
    single line\. Any embedded newlines in *text* are properly handled\.
    Comments may be written to nonexistant sections or keys and will not return
    an error\. Reading a comment from a nonexistant section or key will return an
    empty string\.

  - <a name='14'></a>__::ini::commentchar__ ?char?

    Reads and sets the comment character\. Lines that begin with this character
    are treated as comments\. When comments are written out each line is preceded
    by this character\. The default is __;__\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *inifile* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































Deleted embedded/md/tcllib/files/modules/interp/deleg_method.md.

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
89
90
91
92
93
94
95
96

[//000000001]: # (deleg\_method \- Interpreter utilities)
[//000000002]: # (Generated from file 'deleg\_method\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (deleg\_method\(n\) 0\.2 tcllib "Interpreter utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

deleg\_method \- Creation of comm delegates \(snit methods\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require snit ?1\.1?  
package require interp::delegate::method ?0\.2?  

[__::interp::delegate::method__ ?__\-async__? *name* *arguments* *comm* *id*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a single command for use within
__[snit](\.\./snit/snit\.md)__ type definition \(i\.e\. actually a
__snit::macro__\) for the convenient creation of methods which delegate the
actual work to a remote location via a "channel" created by the package
__[comm](\.\./comm/comm\.md)__\.

# <a name='section2'></a>API

  - <a name='1'></a>__::interp::delegate::method__ ?__\-async__? *name* *arguments* *comm* *id*

    This commands creates a method which is named by *name*\. All invokations
    of this method will delegate the actual work to the remote location
    identified by the comm channel *comm* and the endpoint *id*\.

    The name of the remote method invoked by the delegator is identical to the
    name of the method itself\.

    Normally the generated method marshalls the *arguments*, and returns the
    result from the remote method as its own result\. If however the option
    __\-async__ was specified then the generated method will not wait for a
    result and return immediately\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *interp* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[comm](\.\./\.\./\.\./\.\./index\.md\#comm),
[delegation](\.\./\.\./\.\./\.\./index\.md\#delegation),
[interpreter](\.\./\.\./\.\./\.\./index\.md\#interpreter),
[method](\.\./\.\./\.\./\.\./index\.md\#method), [snit](\.\./\.\./\.\./\.\./index\.md\#snit)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































Deleted embedded/md/tcllib/files/modules/interp/deleg_proc.md.

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
89
90
91
92
93
94

[//000000001]: # (deleg\_proc \- Interpreter utilities)
[//000000002]: # (Generated from file 'deleg\_proc\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (deleg\_proc\(n\) 0\.2 tcllib "Interpreter utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

deleg\_proc \- Creation of comm delegates \(procedures\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require interp::delegate::proc ?0\.2?  

[__::interp::delegate::proc__ ?__\-async__? *name* *arguments* *comm* *id*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a single command for the convenient creation of procedures
which delegate the actual work to a remote location via a "channel" created by
the package __[comm](\.\./comm/comm\.md)__\.

# <a name='section2'></a>API

  - <a name='1'></a>__::interp::delegate::proc__ ?__\-async__? *name* *arguments* *comm* *id*

    This commands creates a procedure which is named by *name* and returns its
    fully\-qualified name\. All invokations of this procedure will delegate the
    actual work to the remote location identified by the comm channel *comm*
    and the endpoint *id*\.

    The name of the remote procedure invoked by the delegator is \[namespace tail
    *name*\]\. I\.e\., namespace information is stripped from the call\.

    Normally the generated procedure marshalls the *arguments*, and returns
    the result from the remote procedure as its own result\. If however the
    option __\-async__ was specified then the generated procedure will not
    wait for a result and return immediately\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *interp* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[comm](\.\./\.\./\.\./\.\./index\.md\#comm),
[delegation](\.\./\.\./\.\./\.\./index\.md\#delegation),
[interpreter](\.\./\.\./\.\./\.\./index\.md\#interpreter),
[procedure](\.\./\.\./\.\./\.\./index\.md\#procedure)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































Deleted embedded/md/tcllib/files/modules/interp/tcllib_interp.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112

[//000000001]: # (interp \- Interpreter utilities)
[//000000002]: # (Generated from file 'tcllib\_interp\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (interp\(n\) 0\.1\.2 tcllib "Interpreter utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

interp \- Interp creation and aliasing

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require interp ?0\.1\.2?  

[__::interp::createEmpty__ ?*path*?](#1)  
[__::interp::snitLink__ *path* *methodlist*](#2)  
[__::interp::snitDictLink__ *path* *methoddict*](#3)  

# <a name='description'></a>DESCRIPTION

This package provides a number of commands for the convenient creation of Tcl
interpreters for highly restricted execution\.

# <a name='section2'></a>API

  - <a name='1'></a>__::interp::createEmpty__ ?*path*?

    This commands creates an empty Tcl interpreter and returns it name\. Empty
    means that the new interpreter has neither namespaces, nor any commands\. It
    is useful only for the creation of aliases\.

    If a *path* is specified then it is taken as the name of the new
    interpreter\.

  - <a name='2'></a>__::interp::snitLink__ *path* *methodlist*

    This command assumes that it was called from within a method of a snit
    object, and that the command __mymethod__ is available\.

    It extends the interpreter specified by *path* with aliases for all
    methods found in the *methodlist*, with the alias directing execution to
    the same\-named method of the snit object invoking this command\. Each element
    of *methodlist* is actually interpreted as a command prefix, with the
    first word of each prefix the name of the method to link to\.

    The result of the command is the empty string\.

  - <a name='3'></a>__::interp::snitDictLink__ *path* *methoddict*

    This command behaves like __::interp::snitLink__, except that it takes a
    dictionary mapping from commands to methods as its input, and not a list of
    methods\. Like for __::interp::snitLink__ the method references are
    actually command prefixes\. This command allows the creation of more complex
    command\-method mappings than __::interp::snitLink__\.

    The result of the command is the empty string\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *interp* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[alias](\.\./\.\./\.\./\.\./index\.md\#alias), [empty
interpreter](\.\./\.\./\.\./\.\./index\.md\#empty\_interpreter),
[interpreter](\.\./\.\./\.\./\.\./index\.md\#interpreter),
[method](\.\./\.\./\.\./\.\./index\.md\#method), [snit](\.\./\.\./\.\./\.\./index\.md\#snit)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































Deleted embedded/md/tcllib/files/modules/irc/irc.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308

[//000000001]: # (irc \- Low Level Tcl IRC Interface)
[//000000002]: # (Generated from file 'irc\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (irc\(n\) 0\.7\.0 tcllib "Low Level Tcl IRC Interface")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

irc \- Create IRC connection and interface\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Per\-connection Commands](#section2)

  - [Callback Commands](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require irc ?0\.7\.0?  

[__::irc::config__ ?key? ?value?](#1)  
[__::irc::connection__](#2)  
[__::irc::connections__](#3)  
[*net* __registerevent__ *event* *script*](#4)  
[*net* __getevent__ *event* *script*](#5)  
[*net* __eventexists__ *event* *script*](#6)  
[*net* __connect__ *hostname* ?port?](#7)  
[*net* __config__ ?key? ?value?](#8)  
[*net* __log__ *level* *message*](#9)  
[*net* __logname__](#10)  
[*net* __connected__](#11)  
[*net* __sockname__](#12)  
[*net* __peername__](#13)  
[*net* __socket__](#14)  
[*net* __user__ *username* *localhostname* *localdomainname* *userinfo*](#15)  
[*net* __nick__ *nick*](#16)  
[*net* __ping__ *target*](#17)  
[*net* __serverping__](#18)  
[*net* __join__ *channel* ?*key*?](#19)  
[*net* __part__ *channel* ?*message*?](#20)  
[*net* __quit__ ?*message*?](#21)  
[*net* __privmsg__ *target* *message*](#22)  
[*net* __notice__ *target* *message*](#23)  
[*net* __ctcp__ *target* *message*](#24)  
[*net* __kick__ *channel* *target* ?*message*?](#25)  
[*net* __mode__ *target* *args*](#26)  
[*net* __topic__ *channel* *message*](#27)  
[*net* __invite__ *channel* *target*](#28)  
[*net* __send__ *text*](#29)  
[*net* __destroy__](#30)  
[__who__ ?__address__?](#31)  
[__action__](#32)  
[__target__](#33)  
[__additional__](#34)  
[__header__](#35)  
[__msg__](#36)  

# <a name='description'></a>DESCRIPTION

This package provides low\-level commands to deal with the IRC protocol \(Internet
Relay Chat\) for immediate and interactive multi\-cast communication\.

  - <a name='1'></a>__::irc::config__ ?key? ?value?

    Sets configuration ?key? to ?value?\. The configuration keys currently
    defined are the boolean flags __logger__ and __debug__\.
    __logger__ makes __irc__ use the logger package for printing error\.
    __debug__ requires __logger__ and prints extra debug output\. If no
    ?key? or ?value? is given the current values are returned\.

  - <a name='2'></a>__::irc::connection__

    The command creates a new object to deal with an IRC connection\. Creating
    this IRC object does not automatically create the network connection\. It
    returns a new irc namespace command which can be used to interact with the
    new IRC connection\. NOTE: the old form of the connection command, which took
    a hostname and port as arguments, is deprecated\. Use __connect__ instead
    to specify this information\.

  - <a name='3'></a>__::irc::connections__

    Returns a list of all the current connections that were created with
    __connection__

# <a name='section2'></a>Per\-connection Commands

In the following list of available connection methods *net* represents a
connection command as returned by __::irc::connection__\.

  - <a name='4'></a>*net* __registerevent__ *event* *script*

    Registers a callback handler for the specific event\. Events available are
    those described in RFC 1459
    [http://www\.rfc\-editor\.org/rfc/rfc1459\.txt](http://www\.rfc\-editor\.org/rfc/rfc1459\.txt)\.
    In addition, there are several other events defined\. __defaultcmd__ adds
    a command that is called if no other callback is present\. __EOF__ is
    called if the connection signals an End of File condition\. The events
    __defaultcmd__, __defaultnumeric__, __defaultevent__, and
    __EOF__ are required\. *script* is executed in the connection
    namespace, which can take advantage of several commands \(see [Callback
    Commands](#section3) below\) to aid in the parsing of data\.

  - <a name='5'></a>*net* __getevent__ *event* *script*

    Returns the current handler for the event if one exists\. Otherwise an empty
    string is returned\.

  - <a name='6'></a>*net* __eventexists__ *event* *script*

    Returns a boolean value indicating the existence of the event handler\.

  - <a name='7'></a>*net* __connect__ *hostname* ?port?

    This causes the socket to be established\. __::irc::connection__ created
    the namespace and the commands to be used, but did not actually open the
    socket\. This is done here\. NOTE: the older form of 'connect' did not require
    the user to specify a hostname and port, which were specified with
    'connection'\. That form is deprecated\.

  - <a name='8'></a>*net* __config__ ?key? ?value?

    The same as __::irc::config__ but sets and gets options for the *net*
    connection only\.

  - <a name='9'></a>*net* __log__ *level* *message*

    If logger is turned on by __config__ this will write a log *message*
    at *level*\.

  - <a name='10'></a>*net* __logname__

    Returns the name of the logger instance if logger is turned on\.

  - <a name='11'></a>*net* __connected__

    Returns a boolean value indicating if this connection is connected to a
    server\.

  - <a name='12'></a>*net* __sockname__

    Returns a 3 element list consisting of the ip address, the hostname, and the
    port of the local end of the connection, if currently connected\.

  - <a name='13'></a>*net* __peername__

    Returns a 3 element list consisting of the ip address, the hostname, and the
    port of the remote end of the connection, if currently connected\.

  - <a name='14'></a>*net* __socket__

    Return the Tcl channel for the socket used by the connection\.

  - <a name='15'></a>*net* __user__ *username* *localhostname* *localdomainname* *userinfo*

    Sends USER command to server\. *username* is the username you want to
    appear\. *localhostname* is the host portion of your hostname,
    *localdomainname* is your domain name, and *userinfo* is a short
    description of who you are\. The 2nd and 3rd arguments are normally ignored
    by the IRC server\.

  - <a name='16'></a>*net* __nick__ *nick*

    NICK command\. *nick* is the nickname you wish to use for the particular
    connection\.

  - <a name='17'></a>*net* __ping__ *target*

    Send a CTCP PING to *target*\.

  - <a name='18'></a>*net* __serverping__

    PING the server\.

  - <a name='19'></a>*net* __join__ *channel* ?*key*?

    *channel* is the IRC channel to join\. IRC channels typically begin with a
    hashmark \("\#"\) or ampersand \("&"\)\.

  - <a name='20'></a>*net* __part__ *channel* ?*message*?

    Makes the client leave *channel*\. Some networks may support the optional
    argument *message*

  - <a name='21'></a>*net* __quit__ ?*message*?

    Instructs the IRC server to close the current connection\. The package will
    use a generic default if no *message* was specified\.

  - <a name='22'></a>*net* __privmsg__ *target* *message*

    Sends *message* to *target*, which can be either a channel, or another
    user, in which case their nick is used\.

  - <a name='23'></a>*net* __notice__ *target* *message*

    Sends a __notice__ with message *message* to *target*, which can be
    either a channel, or another user, in which case their nick is used\.

  - <a name='24'></a>*net* __ctcp__ *target* *message*

    Sends a CTCP of type *message* to *target*

  - <a name='25'></a>*net* __kick__ *channel* *target* ?*message*?

    Kicks the user *target* from the channel *channel* with a *message*\.
    The latter can be left out\.

  - <a name='26'></a>*net* __mode__ *target* *args*

    Sets the mode *args* on the target *target*\. *target* may be a
    channel, a channel user, or yourself\.

  - <a name='27'></a>*net* __topic__ *channel* *message*

    Sets the topic on *channel* to *message* specifying an empty string will
    remove the topic\.

  - <a name='28'></a>*net* __invite__ *channel* *target*

    Invites *target* to join the channel *channel*

  - <a name='29'></a>*net* __send__ *text*

    Sends *text* to the IRC server\.

  - <a name='30'></a>*net* __destroy__

    Deletes the connection and its associated namespace and information\.

# <a name='section3'></a>Callback Commands

These commands can be used within callbacks

  - <a name='31'></a>__who__ ?__address__?

    Returns the nick of the user who performed a command\. The optional keyword
    __address__ causes the command to return the user in the format
    "username@address"\.

  - <a name='32'></a>__action__

    Returns the action performed, such as KICK, PRIVMSG, MODE, etc\.\.\. Normally
    not useful, as callbacks are bound to a particular event\.

  - <a name='33'></a>__target__

    Returns the target of a particular command, such as the channel or user to
    whom a PRIVMSG is sent\.

  - <a name='34'></a>__additional__

    Returns a list of any additional arguments after the target\.

  - <a name='35'></a>__header__

    Returns the entire event header \(everything up to the :\) as a proper list\.

  - <a name='36'></a>__msg__

    Returns the message portion of the command \(the part after the :\)\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *irc* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

rfc 1459

# <a name='keywords'></a>KEYWORDS

[chat](\.\./\.\./\.\./\.\./index\.md\#chat), [irc](\.\./\.\./\.\./\.\./index\.md\#irc)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/irc/picoirc.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201

[//000000001]: # (picoirc \- Simple embeddable IRC interface)
[//000000002]: # (Generated from file 'picoirc\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (picoirc\(n\) 0\.7\.0 tcllib "Simple embeddable IRC interface")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

picoirc \- Small and simple embeddable IRC client\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [CALLBACK](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require picoirc ?0\.7\.0?  

[__::picoirc::connect__ *callback* *nick* ?*password*? *url*](#1)  
[__::picoirc::post__ *context* *channel* *message*](#2)  
[__::picoirc::splituri__ *uri*](#3)  
[__::picoirc::send__ *context* *line*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a general purpose minimal IRC client suitable for
embedding in other applications\. All communication with the parent application
is done via an application provided callback procedure\. Each connection has its
own state so you can hook up multiple servers in a single application instance\.

To initiate an IRC connection you must call __picoirc::connect__ with a
callback procedure, a nick\-name to use on IRC and the IRC URL that describes the
connection\. This will return a variable name that is the irc connection context\.
See [CALLBACK](#section3) for details\.

This package is a fairly simple IRC client\. If you need something with more
capability investigate the __[irc](irc\.md)__ package\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::picoirc::connect__ *callback* *nick* ?*password*? *url*

    Creates a new irc connection to the server specified by *url* and login
    using the *nick* as the username and optionally *password*\. If the
    *url* starts with *ircs://* then a TLS connection is created\. The
    *callback* must be as specified in [CALLBACK](#section3)\. Returns a
    package\-specific variable that is used when calling other commands in this
    package\.

    *Note:* For connecting via TLS the Tcl module *tls* must be already
    loaded, otherwise an error is raised\.

        # must be loaded for TLS
        package require tls
        # default arguments
        tls::init -autoservername true -command workaround \
            -require 1 -cadir /etc/ssl/certs -tls1 0 -tls1.1 0
        # avoid annoying bgerror, errors are already catched internally
        proc workaround {state args} {
            if {$state == "verify"} {
                return [lindex $args 3]
            }
        }

  - <a name='2'></a>__::picoirc::post__ *context* *channel* *message*

    This should be called to process user input and send it to the server\. A
    number of commands are recognised when prefixed with a forward\-slash \(/\)\.
    Such commands are converted to IRC command sequences and then sent\.

  - <a name='3'></a>__::picoirc::splituri__ *uri*

    Splits an IRC scheme uniform resource indicator into its component parts\.
    Returns a list of server, port, channel and secure where secure is a boolean
    flag which is __true__ if a TLS connection was requested via the
    *ircs://* schema\. The default port is 6667 \(or 6697 if secured\) and there
    is no default channel\.

  - <a name='4'></a>__::picoirc::send__ *context* *line*

    This command is where all raw output to the server is handled\. The default
    action is to write the *line* to the irc socket\. However, before this
    happens the callback is called with "debug write"\. This permits the
    application author to inspect the raw IRC data and if desired to return a
    break error code to halt further processing\. In this way the application can
    override the default send via the callback procedure\.

# <a name='section3'></a>CALLBACK

The callback must look like:

    proc Callback {context state args} {
    }

where context is the irc context variable name \(in case you need to pass it back
to a picoirc procedure\)\. state is one of a number of states as described below\.

  - __init__

    called just before the socket is created

  - __connect__

    called once we have connected, before we join any channels

  - __close__

    called when the socket gets closed, before the context is deleted\. If an
    error occurs before we get connected the only argument will be the socket
    error message\.

  - __userlist__ *channel* *nicklist*

    called to notify the application of an updated userlist\. This is generated
    when the output of the NAMES irc command is seen\. The package collects the
    entire output which can span a number of output lines from the server and
    calls this callback when they have all been received\.

  - __chat__ *target* *nick* *message* *type*

    called when a message arrives\. *target* is the identity that the message
    was targetted for\. This can be the logged in nick or a channel name\.
    *nick* is the name of the sender of the message\. *message* is the
    message text\. *type* is set to "ACTION" if the message was sent as a CTCP
    ACTION

  - __system__ *channel* *message*

    called when a system message is received

  - __topic__ *channel* *topic*

    called when the channel topic string is seen\. *topic* is the text of the
    channel topic\.

  - __traffic__ *action* *channel* *nick* ?*newnick*?

    called when users join, leave or change names\. *action* is either entered,
    left or nickchange and *nick* is the user doing the action\. *newnick* is
    the new name if *action* is nickchange\.

    *NOTE*: *channel* is often empty for these messages as nick activities
    are global for the irc server\. You will have to manage the nick for all
    connected channels yourself\.

  - __version__

    This is called to request a version string to use to override the internal
    version\. If implemented, you should return as colon delimited string as

    Appname:Appversion:LibraryVersion

    For example, the default is

    PicoIRC:\[package provide picoirc\]:Tcl \[info patchlevel\]

  - __debug__ *type* *raw*

    called when data is either being read or written to the network socket\.
    *type* is set to __read__ when reading data and __write__ if the
    data is to be written\. *raw* is the unprocessed IRC protocol data\.

    In both cases the application can return a break error code to interrupt
    further processing of the raw data\. If this is a __read__ operation then
    the package will not handle this line\. If the operation is __write__
    then the package will not send the data\. This callback is intended for
    debugging protocol issues but could be used to redirect all input and output
    if desired\.

# <a name='seealso'></a>SEE ALSO

rfc 1459

# <a name='keywords'></a>KEYWORDS

[chat](\.\./\.\./\.\./\.\./index\.md\#chat), [irc](\.\./\.\./\.\./\.\./index\.md\#irc)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/javascript/javascript.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139

[//000000001]: # (javascript \- HTML and Java Script Generation)
[//000000002]: # (Generated from file 'javascript\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (javascript\(n\) 1\.0\.2 tcllib "HTML and Java Script Generation")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

javascript \- Procedures to generate HTML and Java Script structures\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8  
package require javascript ?1\.0\.2?  

[__::javascript::makeSelectorWidget__ *id leftLabel leftValueList rightLabel rightValueList rightNameList* ?*length*? ?*minWidth*?](#1)  
[__::javascript::makeSubmitButton__ *name value*](#2)  
[__::javascript::makeProtectedSubmitButton__ *name value msg*](#3)  
[__::javascript::makeMasterButton__ *master value slavePattern boolean*](#4)  
[__::javascript::makeParentCheckbox__ *parentName childName*](#5)  
[__::javascript::makeChildCheckbox__ *parentName childName*](#6)  

# <a name='description'></a>DESCRIPTION

The __::javascript__ package provides commands that generate HTML and Java
Script code\. These commands typically return an HTML string as their result\. In
particular, they do not output their result to __stdout__\.

  - <a name='1'></a>__::javascript::makeSelectorWidget__ *id leftLabel leftValueList rightLabel rightValueList rightNameList* ?*length*? ?*minWidth*?

    Construct HTML code to create a dual\-multi\-selection megawidget\. This
    megawidget consists of two side\-by\-side multi\-selection boxes separated by a
    left arrow and a right arrow button\. The right arrow button moves all items
    selected in the left box to the right box\. The left arrow button moves all
    items selected in the right box to the left box\. The *id* argument is the
    suffix of all HTML objects in this megawidget\. The *leftLabel* argument is
    the text that appears above the left selection box\. The *leftValueList*
    argument is the values of items in the left selection box\. The
    *leftNameList* argument is the names to appear in the left selection box\.
    The *rightLabel* argument is the text that appears above the right
    selection box\. The *rightValueList* argument is the values of items in the
    right selection box\. The *rightNameList* argument is the names to appear
    in the right selection box\. The *length* argument \(optional\) determines
    the number of elts to show before adding a vertical scrollbar; it defaults
    to 8\. The *minWidth* argument \(optional\) is the number of spaces to
    determine the minimum box width; it defaults to 32\.

  - <a name='2'></a>__::javascript::makeSubmitButton__ *name value*

    Create an HTML submit button that resets a hidden field for each registered
    multi\-selection box\. The *name* argument is the name of the HTML button
    object to create\. The *value* argument is the label of the HTML button
    object to create\.

  - <a name='3'></a>__::javascript::makeProtectedSubmitButton__ *name value msg*

    Create an HTML submit button that prompts the user with a continue/cancel
    shutdown warning before the form is submitted\. The *name* argument is the
    name of the HTML button object to create\. The *value* argument is the
    label of the HTML button object to create\. The *msg* argument is the
    message to display when the button is pressed\.

  - <a name='4'></a>__::javascript::makeMasterButton__ *master value slavePattern boolean*

    Create an HTML button that sets its slave checkboxs to the boolean value\.
    The *master* argument is the name of the child's parent html checkbox
    object\. The *value* argument is the value of the master\. The *slaves*
    argument is the name of child html checkbox object to create\. The
    *boolean* argument is the java script boolean value that will be given to
    all the slaves; it must be "true" or "false"\.

  - <a name='5'></a>__::javascript::makeParentCheckbox__ *parentName childName*

    Create an HTML checkbox and tie its value to that of its child checkbox\. If
    the parent is unchecked, the child is automatically unchecked\. The
    *parentName* argument is the name of parent html checkbox object to
    create\. The *childName* argument is the name of the parent's child html
    checkbox object\.

  - <a name='6'></a>__::javascript::makeChildCheckbox__ *parentName childName*

    Create an HTML checkbox and tie its value to that of its parent checkbox\. If
    the child is checked, the parent is automatically checked\. The
    *parentName* argument is the name of the child's parent html checkbox
    object\. The *childName* argument is the name of child html checkbox object
    to create\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *javascript* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[html](\.\./html/html\.md), [ncgi](\.\./ncgi/ncgi\.md)

# <a name='keywords'></a>KEYWORDS

[checkbox](\.\./\.\./\.\./\.\./index\.md\#checkbox),
[html](\.\./\.\./\.\./\.\./index\.md\#html),
[javascript](\.\./\.\./\.\./\.\./index\.md\#javascript),
[selectionbox](\.\./\.\./\.\./\.\./index\.md\#selectionbox),
[submitbutton](\.\./\.\./\.\./\.\./index\.md\#submitbutton)

# <a name='category'></a>CATEGORY

CGI programming
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































Deleted embedded/md/tcllib/files/modules/jpeg/jpeg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232

[//000000001]: # (jpeg \- JPEG image manipulation)
[//000000002]: # (Generated from file 'jpeg\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004\-2005, Code: Aaron Faupell <afaupell@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2007, Code:  Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (Copyright &copy; 2004\-2009, Doc:  Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000006]: # (Copyright &copy; 2011, Code: Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000007]: # (jpeg\(n\) 0\.5 tcllib "JPEG image manipulation")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

jpeg \- JPEG querying and manipulation of meta data

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [LIMITATIONS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require jpeg ?0\.5?  

[__::jpeg::isJPEG__ *file*](#1)  
[__::jpeg::imageInfo__ *file*](#2)  
[__::jpeg::dimensions__ *file*](#3)  
[__::jpeg::getThumbnail__ *file*](#4)  
[__::jpeg::getExif__ *file* ?*section*?](#5)  
[__::jpeg::getExifFromChannel__ *channel* ?*section*?](#6)  
[__::jpeg::formatExif__ *keys*](#7)  
[__::jpeg::exifKeys__](#8)  
[__::jpeg::removeExif__ *file*](#9)  
[__::jpeg::stripJPEG__ *file*](#10)  
[__::jpeg::getComments__ *file*](#11)  
[__::jpeg::addComment__ *file* *text*\.\.\.](#12)  
[__::jpeg::removeComments__ *file*](#13)  
[__::jpeg::replaceComment__ *file* *text*](#14)  
[__::jpeg::debug__ *file*](#15)  
[__::jpeg::markers__ *channel*](#16)  

# <a name='description'></a>DESCRIPTION

This package provides commands to query and modify JPEG images\. JPEG stands for
*Joint Photography Experts Group* and is a standard for the lossy compression
of photographical images\. It is specified at [LINK\_HERE](LINK\_HERE)\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::jpeg::isJPEG__ *file*

    Returns a boolean value indicating if *file* is a JPEG image\.

  - <a name='2'></a>__::jpeg::imageInfo__ *file*

    Returns a dictionary with keys __version__, __units__,
    __xdensity__, __ydensity__, __xthumb__, and __ythumb__\. The
    values are the associated properties of the JPEG image in *file*\. Throws
    an error if *file* is not a JPEG image\.

  - <a name='3'></a>__::jpeg::dimensions__ *file*

    Returns the dimensions of the JPEG *file* as a list of the horizontal and
    vertical pixel count\. Throws an error if *file* is not a JPEG image\.

  - <a name='4'></a>__::jpeg::getThumbnail__ *file*

    This procedure will return the binary thumbnail image data, if a JPEG
    thumbnail is included in *file*, and the empty string otherwise\. Note that
    it is possible to include thumbnails in formats other than JPEG although
    that is not common\. The command finds thumbnails that are encoded in either
    the JFXX or EXIF segments of the JPEG information\. If both are present the
    EXIF thumbnail will take precedence\. Throws an error if *file* is not a
    JPEG image\.

        set fh [open thumbnail.jpg w+]
        fconfigure $fh -translation binary -encoding binary
        puts -nonewline $fh [::jpeg::getThumbnail photo.jpg]
        close $fh

  - <a name='5'></a>__::jpeg::getExif__ *file* ?*section*?

    *section* must be one of __main__ or __thumbnail__\. The default is
    __main__\. Returns a dictionary containing the EXIF information for the
    specified section\. For example:

            set exif {
        	Make     Canon
        	Model    {Canon DIGITAL IXUS}
        	DateTime {2001:06:09 15:17:32}
            }

    Throws an error if *file* is not a JPEG image\.

  - <a name='6'></a>__::jpeg::getExifFromChannel__ *channel* ?*section*?

    This command is as per __::jpeg::getExif__ except that it uses a
    previously opened channel\. *channel* should be a seekable channel and
    *section* is as described in the documentation of __::jpeg::getExif__\.

    *Note*: The jpeg parser expects that the start of the channel is the start
    of the image data\. If working with an image embedded in a container file
    format it may be necessary to read the jpeg data into a temporary container:
    either a temporary file or a memory channel\.

    *Attention*: It is the resonsibility of the caller to close the channel
    after its use\.

  - <a name='7'></a>__::jpeg::formatExif__ *keys*

    Takes a list of key\-value pairs as returned by __getExif__ and formats
    many of the values into a more human readable form\. As few as one key\-value
    may be passed in, the entire exif is not required\.

        foreach {key val} [::jpeg::formatExif [::jpeg::getExif photo.jpg]] {
            puts "$key: $val"
        }

        array set exif [::jpeg::getExif photo.jpg]
        puts "max f-stop: [::jpeg::formatExif [list MaxAperture $exif(MaxAperture)]]

  - <a name='8'></a>__::jpeg::exifKeys__

    Returns a list of the EXIF keys which are currently understood\. There may be
    keys present in __getExif__ data that are not understood\. Those keys
    will appear in a 4 digit hexadecimal format\.

  - <a name='9'></a>__::jpeg::removeExif__ *file*

    Removes the Exif data segment from the specified file and replaces it with a
    standard JFIF segment\. Throws an error if *file* is not a JPEG image\.

  - <a name='10'></a>__::jpeg::stripJPEG__ *file*

    Removes all metadata from the JPEG file leaving only the image\. This
    includes comments, EXIF segments, JFXX segments, and application specific
    segments\. Throws an error if *file* is not a JPEG image\.

  - <a name='11'></a>__::jpeg::getComments__ *file*

    Returns a list containing all the JPEG comments found in the *file*\.
    Throws an error if *file* is not a valid JPEG image\.

  - <a name='12'></a>__::jpeg::addComment__ *file* *text*\.\.\.

    Adds one or more plain *text* comments to the JPEG image in *file*\.
    Throws an error if *file* is not a valid JPEG image\.

  - <a name='13'></a>__::jpeg::removeComments__ *file*

    Removes all comments from the file specified\. Throws an error if *file* is
    not a valid JPEG image\.

  - <a name='14'></a>__::jpeg::replaceComment__ *file* *text*

    Replaces the first comment in the file with the new *text*\. This is merely
    a shortcut for __::jpeg::removeComments__ and __::jpeg::addComment__
    Throws an error if *file* is not a valid JPEG image\.

  - <a name='15'></a>__::jpeg::debug__ *file*

    Prints everything we know about the given file in a nice format\.

  - <a name='16'></a>__::jpeg::markers__ *channel*

    This is an internal helper command, we document it for use by advanced users
    of the package\. The argument *channel* is an open file handle positioned
    at the start of the first marker \(usually 2 bytes\)\. The command returns a
    list with one element for each JFIF marker found in the file\. Each element
    consists of a list of the marker name, its offset in the file, and its
    length\. The offset points to the beginning of the sections data, not the
    marker itself\. The length is the length of the data from the offset listed
    to the start of the next marker\.

# <a name='section3'></a>LIMITATIONS

can only work with files cant write exif data gps exif data not parsed makernote
data not yet implemented

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *jpeg* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[comment](\.\./\.\./\.\./\.\./index\.md\#comment),
[exif](\.\./\.\./\.\./\.\./index\.md\#exif), [image](\.\./\.\./\.\./\.\./index\.md\#image),
[jfif](\.\./\.\./\.\./\.\./index\.md\#jfif), [jpeg](\.\./\.\./\.\./\.\./index\.md\#jpeg),
[thumbnail](\.\./\.\./\.\./\.\./index\.md\#thumbnail)

# <a name='category'></a>CATEGORY

File formats

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004\-2005, Code: Aaron Faupell <afaupell@users\.sourceforge\.net>  
Copyright &copy; 2007, Code:  Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>  
Copyright &copy; 2004\-2009, Doc:  Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>  
Copyright &copy; 2011, Code: Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/json/json.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

[//000000001]: # (json \- JSON)
[//000000002]: # (Generated from file 'json\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 ActiveState Software Inc\.)
[//000000004]: # (Copyright &copy; 2009 Thomas Maeder, Glue Software Engineering AG)
[//000000005]: # (json\(n\) 1\.3\.4 tcllib "JSON")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

json \- JSON parser

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [RELATED](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require json ?1\.3\.4?  

[__::json::json2dict__ *txt*](#1)  
[__::json::many\-json2dict__ *txt* ?*max*?](#2)  

# <a name='description'></a>DESCRIPTION

The __json__ package provides a simple Tcl\-only library for parsing the JSON
[http://www\.json\.org/](http://www\.json\.org/) data exchange format as
specified in RFC 4627
[http://www\.ietf\.org/rfc/rfc4627\.txt](http://www\.ietf\.org/rfc/rfc4627\.txt)\.
There is some ambiguity in parsing JSON because JSON has type information that
is not maintained by the Tcl conversion\. The __json__ package returns data
as a Tcl __[dict](\.\./\.\./\.\./\.\./index\.md\#dict)__\. Either the
__[dict](\.\./\.\./\.\./\.\./index\.md\#dict)__ package or Tcl 8\.5 is required for
use\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::json::json2dict__ *txt*

    Parse JSON formatted text *txt* into a Tcl dict and return the value\.

    If *txt* contains more than one JSON entity only the first one is
    returned\.

  - <a name='2'></a>__::json::many\-json2dict__ *txt* ?*max*?

    Parse JSON formatted text *txt* containing multiple JSON entities into a
    list of dictionaries and return that list\.

    If *max* is specified exactly that many entities are extracted from
    *txt*\. By default the command will attempt to extract all, without limits\.
    A value of "*max* == 0" does not make sense and will cause the command to
    throw an error\.

# <a name='section3'></a>EXAMPLES

An example of a JSON array converted to Tcl\. A JSON array is returned as a
single item with multiple elements\.

    [
        {
           "precision": "zip",
           "Latitude":  37.7668,
           "Longitude": -122.3959,
           "Address":   "",
           "City":      "SAN FRANCISCO",
           "State":     "CA",
           "Zip":       "94107",
           "Country":   "US"
        },
        {
           "precision": "zip",
           "Latitude":  37.371991,
           "Longitude": -122.026020,
           "Address":   "",
           "City":      "SUNNYVALE",
           "State":     "CA",
           "Zip":       "94085",
           "Country":   "US"
        }
    ]
    =>
    {Country US Latitude 37.7668 precision zip State CA City {SAN FRANCISCO} Address {} Zip 94107 Longitude -122.3959} {Country US Latitude 37.371991 precision zip State CA City SUNNYVALE Address {} Zip 94085 Longitude -122.026020}

An example of a JSON object converted to Tcl\. A JSON object is returned as a
multi\-element list \(a dict\)\.

    {
        "Image": {
            "Width":  800,
            "Height": 600,
            "Title":  "View from 15th Floor",
            "Thumbnail": {
                "Url":    "http://www.example.com/image/481989943",
                "Height": 125,
                "Width":  "100"
            },
            "IDs": [116, 943, 234, 38793]
        }
    }
    =>
    Image {IDs {116 943 234 38793} Thumbnail {Width 100 Height 125 Url http://www.example.com/image/481989943} Width 800 Height 600 Title {View from 15th Floor}}

# <a name='section4'></a>RELATED

To write json, instead of parsing it, see package
__[json::write](json\_write\.md)__\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *json* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[data exchange](\.\./\.\./\.\./\.\./index\.md\#data\_exchange), [exchange
format](\.\./\.\./\.\./\.\./index\.md\#exchange\_format),
[javascript](\.\./\.\./\.\./\.\./index\.md\#javascript),
[json](\.\./\.\./\.\./\.\./index\.md\#json)

# <a name='category'></a>CATEGORY

CGI programming

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 ActiveState Software Inc\.  
Copyright &copy; 2009 Thomas Maeder, Glue Software Engineering AG
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/json/json_write.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141

[//000000001]: # (json::write \- JSON)
[//000000002]: # (Generated from file 'json\_write\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2013 Andreas Kupries <andreas\_kupries@sourceforge\.net>)
[//000000004]: # (json::write\(n\) 1\.0\.3 tcllib "JSON")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

json::write \- JSON generation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [RELATED](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require json::write ?1\.0\.3?  

[__::json::write__ __indented__](#1)  
[__::json::write__ __indented__ *flag*](#2)  
[__::json::write__ __aligned__](#3)  
[__::json::write__ __aligned__ *flag*](#4)  
[__::json::write__ __string__ *s*](#5)  
[__::json::write__ __array__ *arg*\.\.\.](#6)  
[__::json::write__ __object__ *key* *value*\.\.\.](#7)  

# <a name='description'></a>DESCRIPTION

The __json::write__ package provides a simple Tcl\-only library for
generation of text in the JSON [http://www\.json\.org/](http://www\.json\.org/)
data exchange format as specified in RFC 4627
[http://www\.ietf\.org/rfc/rfc4627\.txt](http://www\.ietf\.org/rfc/rfc4627\.txt)\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::json::write__ __indented__

    This method returns the current state of the indentation setting\.

  - <a name='2'></a>__::json::write__ __indented__ *flag*

    This and the method __aligned__ configure the layout of the JSON
    generated by the package\.

    If this *flag* is set \(default\) the package will break the generated JSON
    code across lines and indent it according to its inner structure, with each
    key of an object on a separate line\.

    If this flag is not set, the whole JSON object will be written on a single
    line, with minimum spacing between all elements\.

  - <a name='3'></a>__::json::write__ __aligned__

    This method returns the current state of the alignment setting\.

  - <a name='4'></a>__::json::write__ __aligned__ *flag*

    This and the method __indented__ configure the layout of the JSON
    generated by the package\.

    If this *flag* is set \(default\) the package ensures that the values for
    the keys in an object are vertically aligned with each other, for a nice
    table effect\. To make this work this also implies that __indented__ is
    set as well\.

    If this flag is not set, the output is formatted as per the value of
    __indented__, without trying to align the values for object keys\.

  - <a name='5'></a>__::json::write__ __string__ *s*

    This method takes the string *s* and returns it properly quoted for JSON
    as its result\.

  - <a name='6'></a>__::json::write__ __array__ *arg*\.\.\.

    This method takes a series of JSON formatted arguments and returns them as a
    properly formatted JSON array as its result\.

  - <a name='7'></a>__::json::write__ __object__ *key* *value*\.\.\.

    This method takes a series of key/value arguments, the values already
    formatted for JSON, and returns them as a properly formatted JSON object as
    its result, with the keys formatted as JSON strings\.

# <a name='section3'></a>RELATED

To parse json, instead of writing it, see package __[json](json\.md)__\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *json* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[data exchange](\.\./\.\./\.\./\.\./index\.md\#data\_exchange), [exchange
format](\.\./\.\./\.\./\.\./index\.md\#exchange\_format),
[javascript](\.\./\.\./\.\./\.\./index\.md\#javascript),
[json](\.\./\.\./\.\./\.\./index\.md\#json)

# <a name='category'></a>CATEGORY

CGI programming

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2013 Andreas Kupries <andreas\_kupries@sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































Deleted embedded/md/tcllib/files/modules/lambda/lambda.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139

[//000000001]: # (lambda \- Utility commands for anonymous procedures)
[//000000002]: # (Generated from file 'lambda\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries, BSD licensed)
[//000000004]: # (lambda\(n\) 1 tcllib "Utility commands for anonymous procedures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

lambda \- Utility commands for anonymous procedures

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [AUTHORS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require lambda ?1?  

[__::lambda__ *arguments* *body* ?*arg*\.\.\.?](#1)  
[__::lambda@__ *namespace* *arguments* *body* ?*arg*\.\.\.?](#2)  

# <a name='description'></a>DESCRIPTION

This package provides two convenience commands to make the writing of anonymous
procedures, i\.e\. lambdas more
__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__\-like\. Instead of, for example, to
write

    set f {::apply {{x} {
       ....
    }}}

with its deep nesting of braces, or

    set f [list ::apply {{x y} {
       ....
    }} $value_for_x]

with a list command to insert some of the arguments of a partial application,
just write

    set f [lambda {x} {
       ....
    }]

and

    set f [lambda {x y} {
       ....
    } $value_for_x]

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::lambda__ *arguments* *body* ?*arg*\.\.\.?

    The command constructs an anonymous procedure from the list of arguments,
    body script and \(optional\) predefined argument values and returns a command
    prefix representing this anonymous procedure\.

    When invoked the *body* is run in a new procedure scope just underneath
    the global scope, with the arguments set to the values supplied at both
    construction and invokation time\.

  - <a name='2'></a>__::lambda@__ *namespace* *arguments* *body* ?*arg*\.\.\.?

    The command constructs an anonymous procedure from the namespace name, list
    of arguments, body script and \(optional\) predefined argument values and
    returns a command prefix representing this anonymous procedure\.

    When invoked the *body* is run in a new procedure scope in the
    *namespace*, with the arguments set to the values supplied at both
    construction and invokation time\.

# <a name='section3'></a>AUTHORS

Andreas Kupries

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *lambda* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

apply\(n\), proc\(n\)

# <a name='keywords'></a>KEYWORDS

[anonymous procedure](\.\./\.\./\.\./\.\./index\.md\#anonymous\_procedure),
[callback](\.\./\.\./\.\./\.\./index\.md\#callback), [command
prefix](\.\./\.\./\.\./\.\./index\.md\#command\_prefix),
[currying](\.\./\.\./\.\./\.\./index\.md\#currying),
[lambda](\.\./\.\./\.\./\.\./index\.md\#lambda), [partial
application](\.\./\.\./\.\./\.\./index\.md\#partial\_application),
[proc](\.\./\.\./\.\./\.\./index\.md\#proc)

# <a name='category'></a>CATEGORY

Utility

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries, BSD licensed
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































Deleted embedded/md/tcllib/files/modules/lazyset/lazyset.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

[//000000001]: # (lazyset \- Lazy evaluation for variables and arrays)
[//000000002]: # (Generated from file 'lazyset\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2018 Roy Keene)
[//000000004]: # (lazyset\(n\) 1 tcllib "Lazy evaluation for variables and arrays")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

lazyset \- Lazy evaluation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [AUTHORS](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require lazyset ?1?  

[__::lazyset::variable__ ?*\-array boolean*? ?*\-appendArgs boolean*? *variableName* *commandPrefix*](#1)  

# <a name='description'></a>DESCRIPTION

The __lazyset__ package provides a mechanism for deferring execution of code
until a specific variable or any index of an array is referenced\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::lazyset::variable__ ?*\-array boolean*? ?*\-appendArgs boolean*? *variableName* *commandPrefix*

    Arrange for the code specified as *commandPrefix* to be executed when the
    variable whose name is specified by *variableName* is read for the first
    time\. If the optional argument *\-array boolean* is specified as true, then
    the variable specified as *variableName* is treated as an array and
    attempting to read any index of the array causes that index to be set by the
    *commandPrefix* as they are read\. If the optional argument *\-appendArgs
    boolean* is specified as false, then the variable name and subnames are not
    appended to the *commandPrefix* before it is evaluated\. If the argument
    *\-appendArgs boolean* is not specified or is specified as true then 1 or 2
    additional arguments are appended to the *commandPrefix*\. If *\-array
    boolean* is specified as true, then 2 arguments are appended corresponding
    to the name of the variable and the index, otherwise 1 argument is appended
    containing the name of variable\. The *commandPrefix* code is run in the
    same scope as the variable is read\.

# <a name='section3'></a>EXAMPLES

    ::lazyset::variable page {apply {{name} {
    	package require http
    	set token [http::geturl http://www.tcl.tk/]
    	set data [http::data $token]
    	return $data
    }}}

    puts $page

    ::lazyset::variable -array true page {apply {{name index} {
    	package require http
    	set token [http::geturl $index]
    	set data [http::data $token]
    	return $data
    }}}

    puts $page(http://www.tcl.tk/)

    ::lazyset::variable -appendArgs false simple {
    	return -level 0 42
    }

    puts $simple

# <a name='section4'></a>AUTHORS

Roy Keene

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *utility* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='category'></a>CATEGORY

Utility

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2018 Roy Keene
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































Deleted embedded/md/tcllib/files/modules/ldap/ldap.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666

[//000000001]: # (ldap \- LDAP client)
[//000000002]: # (Generated from file 'ldap\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2004 Jochen Loewer <loewerj@web\.de>)
[//000000005]: # (Copyright &copy; 2006 Michael Schlenker <mic42@users\.sourceforge\.net>)
[//000000006]: # (ldap\(n\) 1\.10 tcllib "LDAP client")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ldap \- LDAP client

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [TLS Security Considerations](#section2)

  - [COMMANDS](#section3)

  - [EXAMPLES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require ldap ?1\.10?  

[__::ldap::connect__ *host* ?*port*?](#1)  
[__::ldap::tlsoptions__ __reset__](#2)  
[__::ldap::tlsoptions__ ?*opt1* *val1*? ?*opt2* *val2*? \.\.\.](#3)  
[__::ldap::secure\_connect__ *host* ?*port*?](#4)  
[__::ldap::secure\_connect__ *host* ?*port*? ?*verify\_cert*? ?*sni\_servername*?](#5)  
[__::ldap::disconnect__ *handle*](#6)  
[__::ldap::starttls__ *handle*](#7)  
[__::ldap::starttls__ *handle* ?*cafile*? ?*certfile*? ?*keyfile*? ?*verify\_cert*? ?*sni\_servername*?](#8)  
[__::ldap::bind__ *handle* ?*name*? ?*password*?](#9)  
[__::ldap::bindSASL__ *handle* ?*name*? ?*password*?](#10)  
[__::ldap::unbind__ *handle*](#11)  
[__::ldap::search__ *handle* *baseObject* *filterString* *attributes* *options*](#12)  
[__::ldap::searchInit__ *handle* *baseObject* *filterString* *attributes* *options*](#13)  
[__::ldap::searchNext__ *handle*](#14)  
[__::ldap::searchEnd__ *handle*](#15)  
[__::ldap::modify__ *handle* *dn* *attrValToReplace* ?*attrToDelete*? ?*attrValToAdd*?](#16)  
[__::ldap::modifyMulti__ *handle* *dn* *attrValToReplace* ?*attrValToDelete*? ?*attrValToAdd*?](#17)  
[__::ldap::add__ *handle* *dn* *attrValueTuples*](#18)  
[__::ldap::addMulti__ *handle* *dn* *attrValueTuples*](#19)  
[__::ldap::delete__ *handle* *dn*](#20)  
[__::ldap::modifyDN__ *handle* *dn* *newrdn* ?*deleteOld*? ?*newSuperior*?](#21)  
[__::ldap::info__ __[ip](\.\./\.\./\.\./\.\./index\.md\#ip)__ *handle*](#22)  
[__::ldap::info__ __bound__ *handle*](#23)  
[__::ldap::info__ __bounduser__ *handle*](#24)  
[__::ldap::info__ __connections__](#25)  
[__::ldap::info__ __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__ *handle*](#26)  
[__::ldap::info__ __tlsstatus__ *handle*](#27)  
[__::ldap::info__ __saslmechanisms__ *handle*](#28)  
[__::ldap::info__ __[control](\.\./control/control\.md)__ *handle*](#29)  
[__::ldap::info__ __extensions__ *extensions*](#30)  
[__::ldap::info__ __whoami__ *handle*](#31)  

# <a name='description'></a>DESCRIPTION

The __ldap__ package provides a Tcl\-only client library for the LDAPv3
protocol as specified in RFC 4511
\([http://www\.rfc\-editor\.org/rfc/rfc4511\.txt](http://www\.rfc\-editor\.org/rfc/rfc4511\.txt)\)\.
It works by opening the standard \(or secure\) LDAP socket on the server, and then
providing a Tcl API to access the LDAP protocol commands\. All server errors are
returned as Tcl errors \(thrown\) which must be caught with the Tcl __catch__
command\.

# <a name='section2'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __LDAPS__ connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    ldap::tlsoptions -tls1 1 -ssl2 0 -ssl3 0 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section3'></a>COMMANDS

  - <a name='1'></a>__::ldap::connect__ *host* ?*port*?

    Opens a LDAPv3 connection to the specified *host*, at the given *port*,
    and returns a token for the connection\. This token is the *handle*
    argument for all other commands\. If no *port* is specified it will default
    to __389__\.

    The command blocks until the connection has been established, or
    establishment definitely failed\.

  - <a name='2'></a>__::ldap::tlsoptions__ __reset__

    This command resets TLS options to default values\. It returns the set of
    options\. Using this command is incompatible with the obsolete form of
    __::ldap::secure\_connect__ and __::ldap\_starttls__\.

  - <a name='3'></a>__::ldap::tlsoptions__ ?*opt1* *val1*? ?*opt2* *val2*? \.\.\.

    This commands adds one or more options to some value, and may be used more
    than one time in order to add options in several steps\. A complete
    description of options may be found in the
    __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__ package documentation\. Valid
    options and values are:

      * __\-cadir__ directory

        Provide the directory containing the CA certificates\. No default\.

      * __\-cafile__ file

        Provide the CA file\. No default\.

      * __\-cipher__ string

        Provide the cipher suites to use\. No default\.

      * __\-dhparams__ file

        Provide a Diffie\-Hellman parameters file\. No default\.

      * __\-request__ boolean

        Request a certificate from peer during SSL handshake\. Default: true\.

      * __\-require__ boolean

        Require a valid certificate from peer during SSL handshake\. If this is
        set to true then \-request must also be set to true\. Default: false

      * __\-servername__ host

        Only available if the OpenSSL library the TLS package is linked against
        supports the TLS hostname extension for 'Server Name Indication' \(SNI\)\.
        Use to name the logical host we are talking to and expecting a
        certificate for\. No default\.

      * __\-ssl2__ bool

        Enable use of SSL v2\. Default: false

      * __\-ssl3__ bool

        Enable use of SSL v3\. Default: false

      * __\-tls1__ bool

        Enable use of TLS v1 Default: true

      * __\-tls1\.1__ bool

        Enable use of TLS v1\.1 Default: true

      * __\-tls1\.2__ bool

        Enable use of TLS v1\.2 Default: true

    This command returns the current set of TLS options and values\. In
    particular, one may use this command without any arguments to get the
    current set of options\.

    Using this command is incompatible with the obsolete form of
    __::ldap::secure\_connect__ and __::ldap\_starttls__ \(see below\)\.

  - <a name='4'></a>__::ldap::secure\_connect__ *host* ?*port*?

    Like __::ldap::connect__, except that the created connection is secured
    by SSL\. The port defaults to __636__\. This command depends on the
    availability of the package __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__,
    which is a SSL binding for Tcl\. If
    __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ is not available, then this
    command will fail\.

    TLS options are specified with __::ldap::tlsoptions__\.

    The command blocks until the connection has been established, or
    establishment definitely failed\.

  - <a name='5'></a>__::ldap::secure\_connect__ *host* ?*port*? ?*verify\_cert*? ?*sni\_servername*?

    Note: this form of the command is deprecated, since TLS options had to be
    specified with a combination of parameters to this command \(*verify\_cert*
    and *sni\_servername*\) and arguments to __::tls::init__ \(from package
    __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__\) for example to setup defaults
    for trusted certificates\. Prefer the above form \(without the *verify\_cert*
    and *sni\_servername* parameters\) and set TLS options with
    __::ldap::tlsoptions__\.

    If *verify\_cert* is set to 1, the default, this checks the server
    certificate against the known hosts\. If *sni\_servername* is set, the given
    hostname is used as the hostname for Server Name Indication in the TLS
    handshake\.

    Use __::tls::init__ to setup defaults for trusted certificates\.

    TLS supports different protocol levels\. In common use are the versions 1\.0,
    1\.1 and 1\.2\. By default all those versions are offered\. If you need to
    modify the acceptable protocols, you can change the ::ldap::tlsProtocols
    list \(deprecated\)\.

  - <a name='6'></a>__::ldap::disconnect__ *handle*

    Closes the ldap connection refered to by the token *handle*\. Returns the
    empty string as its result\.

  - <a name='7'></a>__::ldap::starttls__ *handle*

    Start TLS negotiation on the connection denoted by *handle*, with TLS
    parameters set with __::ldap::tlsoptions__\.

  - <a name='8'></a>__::ldap::starttls__ *handle* ?*cafile*? ?*certfile*? ?*keyfile*? ?*verify\_cert*? ?*sni\_servername*?

    Note: this form of the command is deprecated, since TLS options had to be
    specified with a combination of parameters to this command \(*cafile*,
    *certfile*, *keyfile*, *verify\_cert* and *sni\_servername*\) and
    arguments to __::tls::init__ \(from package
    __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__\)\. Prefer the above form \(without
    specific TLS arguments\) and set TLS options with __::ldap::tlsoptions__\.

    Start TLS negotiation on the connection denoted by *handle*\. You need to
    set at least the *cafile* argument to a file with trusted certificates, if
    *verify\_cert* is 1, which is the default\. The *sni\_servername* can be
    used to signal a different hostname during the TLS handshake\. The announced
    protocols are determined in the same way as __::ldap::secure\_connect__\.
    You can specify a TLS client certificate with the *certfile* and
    *keyfile* options\.

  - <a name='9'></a>__::ldap::bind__ *handle* ?*name*? ?*password*?

    This command authenticates the ldap connection refered to by the token in
    *handle*, with a user name and associated password\. It blocks until a
    response from the ldap server arrives\. Its result is the empty string\. Both
    *name* and *passwd* default to the empty string if they are not
    specified\. By leaving out *name* and *passwd* you can make an anonymous
    bind to the ldap server\. You can issue __::ldap::bind__ again to bind
    with different credentials\.

  - <a name='10'></a>__::ldap::bindSASL__ *handle* ?*name*? ?*password*?

    This command uses SASL authentication mechanisms to do a multistage bind\.
    Its otherwise identical to the standard __::ldap::bind__\. This feature
    is currently experimental and subject to change\. See the documentation for
    the __[SASL](\.\./sasl/sasl\.md)__ and the "SASL\.txt" in the tcllib CVS
    repository for details how to setup and use SASL with openldap\.

  - <a name='11'></a>__::ldap::unbind__ *handle*

    This command asks the ldap server to release the last bind done for the
    connection refered to by the token in *handle*\. The *handle* is invalid
    after the unbind, as the server closes the connection\. So this is effectivly
    just a more polite disconnect operation\.

  - <a name='12'></a>__::ldap::search__ *handle* *baseObject* *filterString* *attributes* *options*

    This command performs a LDAP search below the *baseObject* tree using a
    complex LDAP search expression *filterString* and returns the specified
    *attributes* of all matching objects \(DNs\)\. If the list of *attributes*
    was empty all attributes are returned\. The command blocks until it has
    received all results\. The valid *options* are identical to the options
    listed for __::ldap::searchInit__\.

    An example of a search expression is

    set filterString "|(cn=Linus*)(sn=Torvalds*)"

    The return value of the command is a list of nested dictionaries\. The first
    level keys are object identifiers \(DNs\), second levels keys are attribute
    names\. In other words, it is in the form

    {dn1 {attr1 {val11 val12 ...} attr2 {val21...} ...}} {dn2 {a1 {v11 ...} ...}} ...

  - <a name='13'></a>__::ldap::searchInit__ *handle* *baseObject* *filterString* *attributes* *options*

    This command initiates a LDAP search below the *baseObject* tree using a
    complex LDAP search expression *filterString*\. The search gets the
    specified *attributes* of all matching objects \(DNs\)\. The command itself
    just starts the search, to retrieve the actual results, use
    __::ldap::searchNext__\. A search can be terminated at any time by
    __::ldap::searchEnd__\. This informs the server that no further results
    should be sent by sending and ABANDON message and cleans up the internal
    state of the search\. Only one __::ldap::search__ can be active at a
    given time, this includes the introspection commands __::ldap::info
    saslmechanisms__, __ldap::info control__ and __ldap::info
    extensions__, which invoke a search internally\. Error responses from the
    server due to wrong arguments or similar things are returned with the first
    __::ldap::searchNext__ call and should be checked and dealed with there\.
    If the list of requested *attributes* is empty all attributes will be
    returned\. The parameter *options* specifies the options to be used in the
    search, and has the following format:

    {-option1 value1 -option2 value2 ... }

    Following options are available:

      * __\-scope__ base one sub

        Control the scope of the search to be one of __base__, __one__,
        or __sub__, to specify a base object, one\-level or subtree search\.
        The default is __sub__\.

      * __\-derefaliases__ never search find always

        Control how aliases dereferencing is done\. Should be one of
        __never__, __always__, __search__, or __find__ to
        specify that aliases are never dereferenced, always dereferenced,
        dereferenced when searching, or dereferenced only when locating the base
        object for the search\. The default is to never dereference aliases\.

      * __\-sizelimit__ num

        Determines the maximum number of entries to return in a search\. If
        specified as 0 no limit is enforced\. The server may enforce a
        configuration dependent sizelimit, which may be lower than the one given
        by this option\. The default is 0, no limit\.

      * __\-timelimit__ seconds

        Asks the server to use a timelimit of *seconds* for the search\. Zero
        means no limit\. The default is 0, no limit\.

      * __\-attrsonly__ boolean

        If set to 1 only the attribute names but not the values will be present
        in the search result\. The default is to retrieve attribute names and
        values\.

      * __\-referencevar__ varname

        If set the search result reference LDAPURIs, if any, are returned in the
        given variable\. The caller can than decide to follow those references
        and query other LDAP servers for further results\.

  - <a name='14'></a>__::ldap::searchNext__ *handle*

    This command returns the next entry from a LDAP search initiated by
    __::ldap::searchInit__\. It returns only after a new result is received
    or when no further results are available, but takes care to keep the event
    loop alive\. The returned entry is a list with two elements: the first is the
    DN of the entry, the second is the list of attributes and values, under the
    format:

    dn {attr1 {val11 val12 ...} attr2 {val21...} ...}

    The __::ldap::searchNext__ command returns an empty list at the end of
    the search\.

  - <a name='15'></a>__::ldap::searchEnd__ *handle*

    This command terminates a LDAP search initiated by
    __::ldap::searchInit__\. It also cleans up the internal state so a new
    search can be initiated\. If the client has not yet received all results, the
    client sends an ABANDON message to inform the server that no further results
    for the previous search should to be sent\.

  - <a name='16'></a>__::ldap::modify__ *handle* *dn* *attrValToReplace* ?*attrToDelete*? ?*attrValToAdd*?

    This command modifies the object *dn* on the ldap server we are connected
    to via *handle*\. It replaces attributes with new values, deletes
    attributes, and adds new attributes with new values\. All arguments are
    dictionaries mapping attribute names to values\. The optional arguments
    default to the empty dictionary, which means that no attributes will be
    deleted nor added\.

      * dictionary *attrValToReplace* \(in\)

        No attributes will be changed if this argument is empty\. The dictionary
        contains the new attributes and their values\. They *replace all*
        attributes known to the object\.

      * dictionary *attrToDelete* \(in\)

        No attributes will be deleted if this argument is empty\. The dictionary
        values are restrictions on the deletion\. An attribute listed here will
        be deleted if and only if its current value at the server matches the
        value specified in the dictionary, or if the value in the dictionary is
        the empty string\.

      * dictionary *attrValToAdd* \(in\)

        No attributes will be added if this argument is empty\. The dictionary
        values are the values for the new attributes\.

    The command blocks until all modifications have completed\. Its result is the
    empty string\.

  - <a name='17'></a>__::ldap::modifyMulti__ *handle* *dn* *attrValToReplace* ?*attrValToDelete*? ?*attrValToAdd*?

    This command modifies the object *dn* on the ldap server we are connected
    to via *handle*\. It replaces attributes with new values, deletes
    attributes, and adds new attributes with new values\. All arguments are lists
    with the format:

    attr1 {val11 val12 ...} attr2 {val21...} ...

    where each value list may be empty for deleting all attributes\. The optional
    arguments default to empty lists of attributes to delete and to add\.

      * list *attrValToReplace* \(in\)

        No attributes will be changed if this argument is empty\. The dictionary
        contains the new attributes and their values\. They *replace all*
        attributes known to the object\.

      * list *attrValToDelete* \(in\)

        No attributes will be deleted if this argument is empty\. If no value is
        specified, the whole set of values for an attribute will be deleted\.

      * list *attrValToAdd* \(in\)

        No attributes will be added if this argument is empty\.

    The command blocks until all modifications have completed\. Its result is the
    empty string\.

  - <a name='18'></a>__::ldap::add__ *handle* *dn* *attrValueTuples*

    This command creates a new object using the specified *dn*\. The attributes
    of the new object are set to the values in the list *attrValueTuples*\.
    Multiple valuated attributes may be specified using multiple tuples\. The
    command blocks until the operation has completed\. Its result is the empty
    string\.

  - <a name='19'></a>__::ldap::addMulti__ *handle* *dn* *attrValueTuples*

    This command is the preferred one to create a new object using the specified
    *dn*\. The attributes of the new object are set to the values in the
    dictionary *attrValueTuples* \(which is keyed by the attribute names\)\. Each
    tuple is a list containing multiple values\. The command blocks until the
    operation has completed\. Its result is the empty string\.

  - <a name='20'></a>__::ldap::delete__ *handle* *dn*

    This command removes the object specified by *dn*, and all its attributes
    from the server\. The command blocks until the operation has completed\. Its
    result is the empty string\.

  - <a name='21'></a>__::ldap::modifyDN__ *handle* *dn* *newrdn* ?*deleteOld*? ?*newSuperior*?

    This command moves or copies the object specified by *dn* to a new
    location in the tree of object\. This location is specified by *newrdn*, a
    *relative* designation, or by *newrdn* and *newSuperior*, a
    *absolute* designation\. The optional argument *deleteOld* defaults to
    __true__, i\.e\. a move operation\. If *deleteOld* is not set, then the
    operation will create a copy of *dn* in the new location\. The optional
    argument *newSuperior* defaults an empty string, meaning that the object
    must not be relocated in another branch of the tree\. If this argument is
    given, the argument *deleteOld* must be specified also\. The command blocks
    until the operation has completed\. Its result is the empty string\.

  - <a name='22'></a>__::ldap::info__ __[ip](\.\./\.\./\.\./\.\./index\.md\#ip)__ *handle*

    This command returns the IP address of the remote LDAP server the handle is
    connected to\.

  - <a name='23'></a>__::ldap::info__ __bound__ *handle*

    This command returns 1 if a handle has successfully completed a
    __::ldap::bind__\. If no bind was done or it failed, a 0 is returned\.

  - <a name='24'></a>__::ldap::info__ __bounduser__ *handle*

    This command returns the username used in the bind operation if a handle has
    successfully completed a __::ldap::bind__\. If no bound was done or it
    failed, an empty string is returned\.

  - <a name='25'></a>__::ldap::info__ __connections__

    This command returns all currently existing ldap connection handles\.

  - <a name='26'></a>__::ldap::info__ __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__ *handle*

    This command returns 1 if the ldap connection *handle* used TLS/SSL for
    connection via __ldap::secure\_connect__ or completed
    __ldap::starttls__, 0 otherwise\.

  - <a name='27'></a>__::ldap::info__ __tlsstatus__ *handle*

    This command returns the current security status of an TLS secured channel\.
    The result is a list of key\-value pairs describing the connected peer \(see
    the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package documentation for
    the returned values\)\. If the connection is not secured with TLS, an empty
    list is returned\.

  - <a name='28'></a>__::ldap::info__ __saslmechanisms__ *handle*

    Return the supported SASL mechanisms advertised by the server\. Only valid in
    a bound state \(anonymous or other\)\.

  - <a name='29'></a>__::ldap::info__ __[control](\.\./control/control\.md)__ *handle*

    Return the supported controls advertised by the server as a list of OIDs\.
    Only valid in a bound state\. This is currently experimental and subject to
    change\.

  - <a name='30'></a>__::ldap::info__ __extensions__ *extensions*

    Returns the supported LDAP extensions as list of OIDs\. Only valid in a bound
    state\. This is currently experimental and subject to change\.

  - <a name='31'></a>__::ldap::info__ __whoami__ *handle*

    Returns authzId for the current connection\. This implements the RFC 4532
    protocol extension\.

# <a name='section4'></a>EXAMPLES

A small example, extracted from the test application coming with this code\.

        package require ldap

        # Connect, bind, add a new object, modify it in various ways

        set handle [ldap::connect localhost 9009]

        set dn "cn=Manager, o=University of Michigan, c=US"
        set pw secret

        ldap::bind $handle $dn $pw

        set dn "cn=Test User,ou=People,o=University of Michigan,c=US"

        ldap::add $handle $dn {
    	objectClass     OpenLDAPperson
    	cn              {Test User}
    	mail            test.user@google.com
    	uid             testuid
    	sn              User
    	telephoneNumber +31415926535
    	telephoneNumber +27182818285
        }

        set dn "cn=Another User,ou=People,o=University of Michigan,c=US"

        ldap::addMulti $handle $dn {
    	objectClass     {OpenLDAPperson}
    	cn              {{Anotther User}}
    	mail            {test.user@google.com}
    	uid             {testuid}
    	sn              {User}
    	telephoneNumber {+31415926535 +27182818285}
        }

        # Replace all attributes
        ldap::modify $handle $dn [list drink icetea uid JOLO]

        # Add some more
        ldap::modify $handle $dn {} {} [list drink water  drink orangeJuice pager "+1 313 555 7671"]

        # Delete
        ldap::modify $handle $dn {} [list drink water  pager ""]

        # Move
        ldap::modifyDN $handle $dn "cn=Tester"

        # Kill the test object, and shut the connection down.
        set dn "cn=Tester,ou=People,o=University of Michigan,c=US"
        ldap::delete $handle $dn

        ldap::unbind     $handle
        ldap::disconnect $handle

And another example, a simple query, and processing the results\.

        package require ldap
        set handle [ldap::connect ldap.acme.com 389]
        ldap::bind $handle
        set results [ldap::search $handle "o=acme,dc=com" "(uid=jdoe)" {}]
        foreach result $results {
    	foreach {object attributes} $result break

    	# The processing here is similar to what 'parray' does.
    	# I.e. finding the longest attribute name and then
    	# generating properly aligned output listing all attributes
    	# and their values.

    	set width 0
    	set sortedAttribs {}
    	foreach {type values} $attributes {
    	    if {[string length $type] > $width} {
    		set width [string length $type]
    	    }
    	    lappend sortedAttribs [list $type $values]
    	}

    	puts "object='$object'"

    	foreach sortedAttrib  $sortedAttribs {
    	    foreach {type values} $sortedAttrib break
    	    foreach value $values {
    		regsub -all "\[\x01-\x1f\]" $value ? value
    		puts [format "  %-${width}s %s" $type $value]
    	    }
    	}
    	puts ""
        }
        ldap::unbind $handle
        ldap::disconnect $handle

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *ldap* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[directory access](\.\./\.\./\.\./\.\./index\.md\#directory\_access),
[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[ldap](\.\./\.\./\.\./\.\./index\.md\#ldap), [ldap
client](\.\./\.\./\.\./\.\./index\.md\#ldap\_client),
[protocol](\.\./\.\./\.\./\.\./index\.md\#protocol), [rfc
2251](\.\./\.\./\.\./\.\./index\.md\#rfc\_2251), [rfc
4511](\.\./\.\./\.\./\.\./index\.md\#rfc\_4511), [x\.500](\.\./\.\./\.\./\.\./index\.md\#x\_500)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>  
Copyright &copy; 2004 Jochen Loewer <loewerj@web\.de>  
Copyright &copy; 2006 Michael Schlenker <mic42@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/ldap/ldapx.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800

[//000000001]: # (ldapx \- LDAP extended object interface)
[//000000002]: # (Generated from file 'ldapx\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006\-2018 Pierre David <pdav@users\.sourceforge\.net>)
[//000000004]: # (ldapx\(n\) 1\.2 tcllib "LDAP extended object interface")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ldapx \- LDAP extended object interface

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [OVERVIEW](#section2)

  - [ENTRY CLASS](#section3)

      - [Entry Instance Data](#subsection1)

      - [Entry Options](#subsection2)

      - [Methods for all kinds of entries](#subsection3)

      - [Methods for standard entries only](#subsection4)

      - [Methods for change entries only](#subsection5)

      - [Entry Example](#subsection6)

  - [LDAP CLASS](#section4)

      - [Ldap Instance Data](#subsection7)

      - [Ldap Options](#subsection8)

      - [Ldap Methods](#subsection9)

      - [Ldap Example](#subsection10)

  - [LDIF CLASS](#section5)

      - [Ldif Instance Data](#subsection11)

      - [Ldif Options](#subsection12)

      - [Ldif Methods](#subsection13)

      - [Ldif Example](#subsection14)

  - [References](#section6)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require ldapx ?1\.2?  

[*e* __reset__](#1)  
[*e* __dn__ ?*newdn*?](#2)  
[*e* __rdn__](#3)  
[*e* __superior__](#4)  
[*e* __print__](#5)  
[*se* __isempty__](#6)  
[*se* __get__ *attr*](#7)  
[*se* __get1__ *attr*](#8)  
[*se* __set__ *attr* *values*](#9)  
[*se* __set1__ *attr* *value*](#10)  
[*se* __add__ *attr* *values*](#11)  
[*se* __add1__ *attr* *value*](#12)  
[*se* __del__ *attr* ?*values*?](#13)  
[*se* __del1__ *attr* *value*](#14)  
[*se* __getattr__](#15)  
[*se* __getall__](#16)  
[*se* __setall__ *avpairs*](#17)  
[*se* __backup__ ?*other*?](#18)  
[*se* __swap__](#19)  
[*se* __restore__ ?*other*?](#20)  
[*se* __apply__ *centry*](#21)  
[*ce* __change__ ?*new*?](#22)  
[*ce* __diff__ *new* ?*old*?](#23)  
[*la* __error__ ?*newmsg*?](#24)  
[*la* __connect__ *url* ?*binddn*? ?*bindpw*? ?*starttls*?](#25)  
[*la* __disconnect__](#26)  
[*la* __traverse__ *base* *filter* *attrs* *entry* *body*](#27)  
[*la* __search__ *base* *filter* *attrs*](#28)  
[*la* __read__ *base* *filter* *entry* \.\.\. *entry*](#29)  
[*la* __commit__ *entry* \.\.\. *entry*](#30)  
[*li* __channel__ *chan*](#31)  
[*li* __error__ ?*newmsg*?](#32)  
[*li* __read__ *entry*](#33)  
[*li* __write__ *entry*](#34)  

# <a name='description'></a>DESCRIPTION

The __ldapx__ package provides an extended Tcl interface to LDAP directores
and LDIF files\. The __ldapx__ package is built upon the
__[ldap](ldap\.md)__ package in order to get low level LDAP access\.

LDAP access is compatible with RFC 2251
\([http://www\.rfc\-editor\.org/rfc/rfc2251\.txt](http://www\.rfc\-editor\.org/rfc/rfc2251\.txt)\)\.
LDIF access is compatible with RFC 2849
\([http://www\.rfc\-editor\.org/rfc/rfc2849\.txt](http://www\.rfc\-editor\.org/rfc/rfc2849\.txt)\)\.

# <a name='section2'></a>OVERVIEW

The __ldapx__ package provides objects to interact with LDAP directories and
LDIF files with an easy to use programming interface\. It implements three
__[snit](\.\./snit/snit\.md)__::type classes\.

The first class, __entry__, is used to store individual entries\. Two
different formats are available: the first one is the *standard* format, which
represents an entry as read from the directory\. The second format is the
*change* format, which stores differences between two standard entries\.

With these entries, an application which wants to modify an entry in a directory
needs to read a \(standard\) entry from the directory, create a fresh copy into a
new \(standard\) entry, modify the new copy, and then compute the differences
between the two entries into a new \(change\) entry, which may be commited to the
directory\.

Such kinds of modifications are so heavily used that standard entries may
contain their own copy of the original data\. With such a copy, the application
described above reads a \(standard\) entry from the directory, backs\-up the
original data, modifies the entry, and computes the differences between the
entry and its backup\. These differences are then commited to the directory\.

Methods are provided to compute differences between two entries, to apply
differences to an entry in order to get a new entry, and to get or set
attributes in standard entries\.

The second class is the __ldap__ class\. It provides a method to
__connect__ and bind to the directory with a uniform access to LDAP and
LDAPS through an URL \(ldap:// or ldaps://\)\. The __traverse__ control
structure executes a body for each entry found in the directory\. The
__commit__ method applies some changes \(represented as __entry__
objects\) to the directory\. Since some attributes are represented as UTF\-8
strings, the option __\-utf8__ controls which attributes must be converted
and which attributes must not be converted\.

The last class is the __ldif__ class\. It provides a method to associate a
standard Tcl *channel* to an LDIF object\. Then, methods __read__ and
__write__ read or write entries from or to this channel\. This class can make
use of standard or change entries, according to the type of the LDIF file which
may contain either standard entries or change entries \(but not both at the same
time\)\. The option __\-utf8__ works exactly as with the __ldap__ class\.

# <a name='section3'></a>ENTRY CLASS

## <a name='subsection1'></a>Entry Instance Data

An instance of the __entry__ class keeps the following data:

  - dn

    This is the DN of the entry, which includes \(in LDAP terminology\) the RDN
    \(relative DN\) and the Superior parts\.

  - format

    The format may be *uninitialized* \(entry not yet used\), *standard* or
    *change*\. Most methods check the format of the entry, which can be reset
    with the __reset__ method\.

  - attrvals

    In a *standard* entry, this is where the attributes and associated values
    are stored\. Many methods provide access to these informations\. Attribute
    names are always converted into lower case\.

  - backup

    In a *standard* entry, the backup may contain a copy of the dn and all
    attributes and values\. Methods __backup__ and __restore__ manipulate
    these data, and method __diff__ may use this backup\.

  - change

    In a *change* entry, these data represent the modifications\. Such
    modifications are handled by specialized methods such as __apply__ or
    __commit__\. Detailed format should not be used directly by programs\.

    Internally, modifications are represented as a list of elements, each
    element has one of the following formats \(which match the corresponding LDAP
    operations\):

      1. \{__add__ \{attr1 \{val1\.\.\.valn\} attr2 \{\.\.\.\} \.\.\.\}\}

         Addition of a new entry\.

      1. \{__mod__ \{modop \{attr1 ?val1\.\.\.valn?\} attr2 \.\.\.\} \{modop \.\.\.\} \.\.\.\}

         Modification of one or more attributes and/or values, where <modop> can
         be __modadd__, __moddel__ or __modrepl__ \(see the LDAP
         modify operation\)\.

      1. \{__del__\}

         Deletion of an old entry\.

      1. \{__modrdn__ newrdn deleteoldrdn ?newsuperior?\}

         Renaming of an entry\.

## <a name='subsection2'></a>Entry Options

No option is defined by this class\.

## <a name='subsection3'></a>Methods for all kinds of entries

  - <a name='1'></a>*e* __reset__

    This method resets the entry to an uninitialized state\.

  - <a name='2'></a>*e* __dn__ ?*newdn*?

    This method returns the current DN of the entry\. If the optional *newdn*
    is specified, it replaces the current DN of the entry\.

  - <a name='3'></a>*e* __rdn__

    This method returns the RDN part of the DN of the entry\.

  - <a name='4'></a>*e* __superior__

    This method returns the superior part of the DN of the entry\.

  - <a name='5'></a>*e* __print__

    This method returns the entry as a string ready to be printed\.

## <a name='subsection4'></a>Methods for standard entries only

In all methods, attribute names are converted in lower case\.

  - <a name='6'></a>*se* __isempty__

    This method returns 1 if the entry is empty \(i\.e\. without any attribute\)\.

  - <a name='7'></a>*se* __get__ *attr*

    This method returns all values of the attribute *attr*, or the empty list
    if the attribute is not fond\.

  - <a name='8'></a>*se* __get1__ *attr*

    This method returns the first value of the attribute\.

  - <a name='9'></a>*se* __set__ *attr* *values*

    This method sets the values \(list *values*\) of the attribute *attr*\. If
    the list is empty, this method deletes all

  - <a name='10'></a>*se* __set1__ *attr* *value*

    This method sets the values of the attribute *attr* to be an unique value
    *value*\. Previous values, if any, are replaced by the new value\.

  - <a name='11'></a>*se* __add__ *attr* *values*

    This method adds all elements the list *values* to the values of the
    attribute *attr*\.

  - <a name='12'></a>*se* __add1__ *attr* *value*

    This method adds a single value given by the parameter *value* to the
    attribute *attr*\.

  - <a name='13'></a>*se* __del__ *attr* ?*values*?

    If the optional list *values* is specified, this method deletes all
    specified values from the attribute *attr*\. If the argument *values* is
    not specified, this method deletes all values\.

  - <a name='14'></a>*se* __del1__ *attr* *value*

    This method deletes a unique *value* from the attribute *attr*\.

  - <a name='15'></a>*se* __getattr__

    This method returns all attributes names\.

  - <a name='16'></a>*se* __getall__

    This method returns all attributes and values from the entry, packed in a
    list of pairs <attribute, list of values>\.

  - <a name='17'></a>*se* __setall__ *avpairs*

    This method sets at once all attributes and values\. The format of the
    *avpairs* argument is the same as the one returned by method
    __getall__\.

  - <a name='18'></a>*se* __backup__ ?*other*?

    This method stores in an *other* standard entry object a copy of the
    current DN and attributes/values\. If the optional *other* argument is not
    specified, copy is done in the current entry \(in a specific place, see
    section [OVERVIEW](#section2)\)\.

  - <a name='19'></a>*se* __swap__

    This method swaps the current and backup contexts of the entry\.

  - <a name='20'></a>*se* __restore__ ?*other*?

    If the optional argument *other* is given, which must then be a
    *standard* entry, this method restores the current entry into the
    *other* entry\. If the argument *other* argument is not specified, this
    methods restores the current entry from its internal backup \(see section
    [OVERVIEW](#section2)\)\.

  - <a name='21'></a>*se* __apply__ *centry*

    This method applies changes defined in the *centry* argument, which must
    be a *change* entry\.

## <a name='subsection5'></a>Methods for change entries only

  - <a name='22'></a>*ce* __change__ ?*new*?

    If the optional argument *new* is specified, this method modifies the
    change list \(see subsection [Entry Instance Data](#subsection1) for the
    exact format\)\. In both cases, current change list is returned\. Warning:
    values returned by this method should only be used by specialized methods
    such as __apply__ or __commit__\.

  - <a name='23'></a>*ce* __diff__ *new* ?*old*?

    This method computes the differences between the *new* and *old* entries
    under the form of a change list, and stores this list into the current
    *change* entry\. If the optional argument *old* is not specified,
    difference is computed from the entry and its internal backup \(see section
    [OVERVIEW](#section2)\)\. Return value is the computed change list\.

## <a name='subsection6'></a>Entry Example

    package require ldapx

    #
    # Create an entry and fill it as a standard entry with
    # attributes and values
    #
    ::ldapx::entry create e
    e dn "uid=joe,ou=people,o=mycomp"
    e set1 "uid"             "joe"
    e set  "objectClass"     {person anotherObjectClass}
    e set1 "givenName"       "Joe"
    e set1 "sn"              "User"
    e set  "telephoneNumber" {+31415926535 +2182818}
    e set1 "anotherAttr"     "This is a beautiful day, isn't it?"

    puts stdout "e\n[e print]"

    #
    # Create a second entry as a backup of the first, and
    # make some changes on it.
    # Entry is named automatically by snit.
    #

    set b [::ldapx::entry create %AUTO%]
    e backup $b

    puts stdout "$b\n[$b print]"

    $b del  "anotherAttr"
    $b del1 "objectClass" "anotherObjectClass"

    #
    # Create a change entry, a compute differences between first
    # and second entry.
    #

    ::ldapx::entry create c
    c diff e $b

    puts stdout "$c\n[$c print]"

    #
    # Apply changes to first entry. It should be the same as the
    # second entry, now.
    #

    e apply c

    ::ldapx::entry create nc
    nc diff e $b

    puts stdout "nc\n[nc print]"

    #
    # Clean-up
    #

    e destroy
    $b destroy
    c destroy
    nc destroy

# <a name='section4'></a>LDAP CLASS

## <a name='subsection7'></a>Ldap Instance Data

An instance of the __ldap__ class keeps the following data:

  - channel

    This is the channel used by the __[ldap](ldap\.md)__ package for
    communication with the LDAP server\.

  - lastError

    This variable contains the error message which appeared in the last method
    of the __ldap__ class \(this string is modified in nearly all methods\)\.
    The __error__ method may be used to fetch this message\.

## <a name='subsection8'></a>Ldap Options

Options are configured on __ldap__ instances using the __configure__
method\.

The first option is used for TLS parameters:

  - __\-tlsoptions__ *list*

    Specify the set of TLS options to use when connecting to the LDAP server
    \(see the __connect__ method\)\. For the list of valid options, see the
    __[LDAP](ldap\.md)__ package documentation\.

    The default is __\-request 1 \-require 1 \-ssl2 no \-ssl3 no \-tls1 yes \-tls1\.1
    yes \-tls1\.2 yes__\.

    Example:

    $l configure -tlsoptions {-request yes -require yes}

A set of options of the __ldap__ class is used during search operations
\(methods __traverse__, __search__ and __read__, see below\)\.

  - __\-scope__ __base__&#124;__one__&#124;__sub__

    Specify the scope of the LDAP search to be one of __base__, __one__
    or __sub__ to specify a base object, one\-level or subtree search\.

    The default is __sub__\.

  - __\-derefaliases__ __never__&#124;__seach__&#124;__find__&#124;__always__

    Specify how aliases dereferencing is handled: __never__ is used to
    specify that aliases are never derefenced, __always__ that aliases are
    always derefenced, __search__ that aliases are dereferenced when
    searching, or __find__ that aliases are dereferenced only when locating
    the base object for the search\.

    The default is __never__\.

  - __\-sizelimit__ integer

    Specify the maximum number of entries to be retreived during a search\. A
    value of __0__ means no limit\.

    Default is __0__\.

  - __\-timelimit__ integer

    Specify the time limit for a search to complete\. A value of __0__ means
    no limit\.

    Default is __0__\.

  - __\-attrsonly__ __0__&#124;__1__

    Specify if only attribute names are to be retrieved \(value __1__\)\.
    Normally \(value __0__\), attribute values are also retrieved\.

    Default is __0__\.

The last option is used when getting entries or committing changes in the
directory:

  - __\-utf8__ pattern\-yes pattern\-no

    Specify which attribute values are encoded in UTF\-8\. This information is
    specific to the LDAP schema in use by the application, since some attributes
    such as jpegPhoto, for example, are not encoded in UTF\-8\. This option takes
    the form of a list with two regular expressions suitable for the
    __regexp__ command \(anchored by ^ and $\)\. The first specifies which
    attribute names are to be UTF\-8 encoded, and the second selects, among
    those, the attribute names which will not be UTF\-8 encoded\. It is thus
    possible to say: convert all attributes, except jpegPhoto\.

    Default is \{\{\.\*\} \{\}\}, meaning: all attributes are converted, without
    exception\.

## <a name='subsection9'></a>Ldap Methods

  - <a name='24'></a>*la* __error__ ?*newmsg*?

    This method returns the error message that occurred in the last call to a
    __ldap__ class method\. If the optional argument *newmsg* is supplied,
    it becomes the last error message\.

  - <a name='25'></a>*la* __connect__ *url* ?*binddn*? ?*bindpw*? ?*starttls*?

    This method connects to the LDAP server using given URL \(which can be of the
    form [ldap://host:port](ldap://host:port) or
    [ldaps://host:port](ldaps://host:port)\)\. If an optional *binddn*
    argument is given together with the *bindpw* argument, the __connect__
    binds to the LDAP server using the specified DN and password\.

    If the *starttls* argument is given a true value \(__1__, __yes__,
    etc\.\) and the URL uses the [ldap://](ldap://) scheme, a TLS negotiation
    is initiated with the newly created connection, before LDAP binding\. Default
    value: __no__\.

    This method returns 1 if connection was successful, or 0 if an error
    occurred \(use the __[error](\.\./\.\./\.\./\.\./index\.md\#error)__ method to
    get the message\)\.

  - <a name='26'></a>*la* __disconnect__

    This method disconnects \(and unbinds, if necessary\) from the LDAP server\.

  - <a name='27'></a>*la* __traverse__ *base* *filter* *attrs* *entry* *body*

    This method is a new control structure\. It searches the LDAP directory from
    the specified base DN \(given by the *base* argument\) and selects entries
    based on the argument *filter*\. For each entry found, this method fetches
    attributes specified by the *attrs* argument \(or all attributes if it is
    an empty list\), stores them in the *entry* instance of class __entry__
    and executes the script defined by the argument *body*\. Options are used
    to refine the search\.

    Caution: when this method is used, the script *body* cannot perform
    another LDAP search \(methods __traverse__, __search__ or
    __read__\)\.

  - <a name='28'></a>*la* __search__ *base* *filter* *attrs*

    This method searches the directory using the same way as method
    __traverse__\. All found entries are stored in newly created instances of
    class __entry__, which are returned in a list\. The newly created
    instances should be destroyed when they are no longer used\.

  - <a name='29'></a>*la* __read__ *base* *filter* *entry* \.\.\. *entry*

    This method reads one or more entries, using the same search criteria as
    methods __traverse__ and __search__\. All attributes are stored in
    the entries\. This method provides a quick way to read some entries\. It
    returns the number of entries found in the directory \(which may be more than
    the number of read entries\)\. If called without any *entry* argument, this
    method just returns the number of entries found, without returning any data\.

  - <a name='30'></a>*la* __commit__ *entry* \.\.\. *entry*

    This method commits the changes stored in the *entry* arguments\. Each
    *entry* may be either a *change* entry, or a *standard* entry with a
    backup\.

    Note: in the future, this method should use the LDAP transaction extension
    provided by OpenLDAP 2\.3 and later\.

## <a name='subsection10'></a>Ldap Example

        package require ldapx

        #
        # Connects to the LDAP directory using StartTLS
        #

        ::ldapx::ldap create l
        l configure -tlsoptions {-cadir /etc/ssl/certs -request yes -require yes}
        set url "ldap://server.mycomp.com"
        if {! [l connect $url "cn=admin,o=mycomp" "mypasswd" yes]} then {
    	puts stderr "error: [l error]"
    	exit 1
        }

        #
        # Search all entries matching some criterion
        #

        l configure -scope one
        ::ldapx::entry create e
        set n 0
        l traverse "ou=people,o=mycomp" "(sn=Joe*)" {sn givenName} e {
    	puts "dn: [e dn]"
    	puts "  sn:        [e get1 sn]"
    	puts "  givenName: [e get1 givenName]"
    	incr n
        }
        puts "$n entries found"
        e destroy

        #
        # Add a telephone number to some entries
        # Note this modification cannot be done in the "traverse" operation.
        #

        set lent [l search "ou=people,o=mycomp" "(sn=Joe*)" {}]
        ::ldapx::entry create c
        foreach e $lent {
    	$e backup
    	$e add1 "telephoneNumber" "+31415926535"
    	c diff $e
    	if {! [l commit c]} then {
    	    puts stderr "error: [l error]"
    	    exit 1
    	}
    	$e destroy
        }
        c destroy

        l disconnect
        l destroy

# <a name='section5'></a>LDIF CLASS

## <a name='subsection11'></a>Ldif Instance Data

An instance of the __ldif__ class keeps the following data:

  - channel

    This is the Tcl channel used to retrieve or store LDIF file contents\. The
    association between an instance and a channel is made by the method
    __channel__\. There is no need to disrupt this association when the LDIF
    file operation has ended\.

  - format

    LDIF files may contain *standard* entries or *change* entries, but not
    both\. This variable contains the detected format of the file \(when reading\)
    or the format of entries written to the file \(when writing\)\.

  - lastError

    This variable contains the error message which appeared in the last method
    of the __ldif__ class \(this string is modified in nearly all methods\)\.
    The __error__ method may be used to fetch this message\.

  - version

    This is the version of the LDIF file\. Only version 1 is supported: the
    method __read__ can only read from version 1 files, and method
    __write__ only creates version 1 files\.

## <a name='subsection12'></a>Ldif Options

This class defines two options:

  - __\-ignore__ list\-of\-attributes

    This option is used to ignore certain attribute names on reading\. For
    example, to read OpenLDAP replica files \(replog\), one must ignore
    __replica__ and __time__ attributes since they do not conform to the
    RFC 2849 standard for LDIF files\.

    Default is empty list: no attribute is ignored\.

  - __\-utf8__ pattern\-yes pattern\-no

    Specify which attribute values are encoded in UTF\-8\. This information is
    specific to the LDAP schema in use by the application, since some attributes
    such as jpegPhoto, for example, are not encoded in UTF\-8\. This option takes
    the form of a list with two regular expressions suitable for the
    __regexp__ command \(anchored by ^ and $\)\. The first specifies which
    attribute names are to be UTF\-8 encoded, and the second selects, among
    those, the attribute names which will not be UTF\-8 encoded\. It is thus
    possible to say: convert all attributes, except jpegPhoto\.

    Default is \{\{\.\*\} \{\}\}, meaning: all attributes are converted, without
    exception\.

## <a name='subsection13'></a>Ldif Methods

  - <a name='31'></a>*li* __channel__ *chan*

    This method associates the Tcl channel named *chan* with the LDIF
    instance\. It resets the type of LDIF object to *uninitialized*\.

  - <a name='32'></a>*li* __error__ ?*newmsg*?

    This method returns the error message that occurred in the last call to a
    __ldif__ class method\. If the optional argument *newmsg* is supplied,
    it becomes the last error message\.

  - <a name='33'></a>*li* __read__ *entry*

    This method reads the next entry from the LDIF file and stores it in the
    *entry* object of class __entry__\. The entry may be a *standard* or
    *change* entry\.

  - <a name='34'></a>*li* __write__ *entry*

    This method writes the entry given in the argument *entry* to the LDIF
    file\.

## <a name='subsection14'></a>Ldif Example

        package require ldapx

        # This examples reads a LDIF file containing entries,
        # compare them to a LDAP directory, and writes on standard
        # output an LDIF file containing changes to apply to the
        # LDAP directory to match exactly the LDIF file.

        ::ldapx::ldif create liin
        liin channel stdin

        ::ldapx::ldif create liout
        liout channel stdout

        ::ldapx::ldap create la
        if {! [la connect "ldap://server.mycomp.com"]} then {
    	puts stderr "error: [la error]"
    	exit 1
        }
        la configure -scope one

        # Reads LDIF file

        ::ldapx::entry create e1
        ::ldapx::entry create e2
        ::ldapx::entry create c

        while {[liin read e1] != 0} {
    	set base [e1 superior]
    	set id [e1 rdn]
    	if {[la read $base "($id)" e2] == 0} then {
    	    e2 reset
    	}

    	c diff e1 e2
    	if {[llength [c change]] != 0} then {
    	    liout write c
    	}
        }

        la disconnect
        la destroy
        e1 destroy
        e2 destroy
        c destroy
        liout destroy
        liin destroy

# <a name='section6'></a>References

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *ldap* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[directory access](\.\./\.\./\.\./\.\./index\.md\#directory\_access),
[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[ldap](\.\./\.\./\.\./\.\./index\.md\#ldap), [ldap
client](\.\./\.\./\.\./\.\./index\.md\#ldap\_client),
[ldif](\.\./\.\./\.\./\.\./index\.md\#ldif),
[protocol](\.\./\.\./\.\./\.\./index\.md\#protocol), [rfc
2251](\.\./\.\./\.\./\.\./index\.md\#rfc\_2251), [rfc
2849](\.\./\.\./\.\./\.\./index\.md\#rfc\_2849)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006\-2018 Pierre David <pdav@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/log/log.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318

[//000000001]: # (log \- Logging facility)
[//000000002]: # (Generated from file 'log\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2001\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (log\(n\) 1\.4 tcllib "Logging facility")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

log \- Procedures to log messages of libraries and applications\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [LEVELS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8  
package require log ?1\.4?  

[__::log::levels__](#1)  
[__::log::lv2longform__ *level*](#2)  
[__::log::lv2color__ *level*](#3)  
[__::log::lv2priority__ *level*](#4)  
[__::log::lv2cmd__ *level*](#5)  
[__::log::lv2channel__ *level*](#6)  
[__::log::lvCompare__ *level1* *level2*](#7)  
[__::log::lvSuppress__ *level* \{*suppress* 1\}](#8)  
[__::log::lvSuppressLE__ *level* \{*suppress* 1\}](#9)  
[__::log::lvIsSuppressed__ *level*](#10)  
[__::log::lvCmd__ *level* *cmd*](#11)  
[__::log::lvCmdForall__ *cmd*](#12)  
[__::log::lvChannel__ *level* *chan*](#13)  
[__::log::lvChannelForall__ *chan*](#14)  
[__::log::lvColor__ *level* *color*](#15)  
[__::log::lvColorForall__ *color*](#16)  
[__::log::log__ *level* *text*](#17)  
[__::log::logarray__ *level* *arrayvar* ?*pattern*?](#18)  
[__::log::loghex__ *level* *text* *data*](#19)  
[__::log::logsubst__ *level* *msg*](#20)  
[__::log::logMsg__ *text*](#21)  
[__::log::logError__ *text*](#22)  
[__::log::Puts__ *level* *text*](#23)  

# <a name='description'></a>DESCRIPTION

The __log__ package provides commands that allow libraries and applications
to selectively log information about their internal operation and state\.

To use the package just execute

    package require log
    log::log notice "Some message"

As can be seen above, each message given to the log facility is associated with
a *level* determining the importance of the message\. The user can then select
which levels to log, what commands to use for the logging of each level and the
channel to write the message to\. In the following example the logging of all
message with level __debug__ is deactivated\.

    package require log
    log::lvSuppress debug
    log::log debug "Unseen message" ; # No output

By default all messages associated with an error\-level \(__emergency__,
__alert__, __critical__, and __error__\) are written to
__stderr__\. Messages with any other level are written to __stdout__\. In
the following example the log module is reconfigured to write __debug__
messages to __stderr__ too\.

    package require log
    log::lvChannel debug stderr
    log::log debug "Written to stderr"

Each message level is also associated with a command to use when logging a
message with that level\. The behaviour above for example relies on the fact that
all message levels use by default the standard command __::log::Puts__ to
log any message\. In the following example all messages of level __notice__
are given to the non\-standard command __toText__ for logging\. This disables
the channel setting for such messages, assuming that __toText__ does not use
it by itself\.

    package require log
    log::lvCmd notice toText
    log::log notice "Handled by \"toText\""

Another database maintained by this facility is a map from message levels to
colors\. The information in this database has *no* influence on the behaviour
of the module\. It is merely provided as a convenience and in anticipation of the
usage of this facility in __tk__\-based application which may want to
colorize message logs\.

# <a name='section2'></a>API

The following commands are available:

  - <a name='1'></a>__::log::levels__

    Returns the names of all known levels, in alphabetical order\.

  - <a name='2'></a>__::log::lv2longform__ *level*

    Converts any unique abbreviation of a level name to the full level name\.

  - <a name='3'></a>__::log::lv2color__ *level*

    Converts any level name including unique abbreviations to the corresponding
    color\.

  - <a name='4'></a>__::log::lv2priority__ *level*

    Converts any level name including unique abbreviations to the corresponding
    priority\.

  - <a name='5'></a>__::log::lv2cmd__ *level*

    Converts any level name including unique abbreviations to the command prefix
    used to write messages with that level\.

  - <a name='6'></a>__::log::lv2channel__ *level*

    Converts any level name including unique abbreviations to the channel used
    by __::log::Puts__ to write messages with that level\.

  - <a name='7'></a>__::log::lvCompare__ *level1* *level2*

    Compares two levels \(including unique abbreviations\) with respect to their
    priority\. This command can be used by the \-command option of lsort\. The
    result is one of \-1, 0 or 1 or an error\. A result of \-1 signals that level1
    is of less priority than level2\. 0 signals that both levels have the same
    priority\. 1 signals that level1 has higher priority than level2\.

  - <a name='8'></a>__::log::lvSuppress__ *level* \{*suppress* 1\}

    \(Un\)suppresses the output of messages having the specified level\. Unique
    abbreviations for the level are allowed here too\.

  - <a name='9'></a>__::log::lvSuppressLE__ *level* \{*suppress* 1\}

    \(Un\)suppresses the output of messages having the specified level or one of
    lesser priority\. Unique abbreviations for the level are allowed here too\.

  - <a name='10'></a>__::log::lvIsSuppressed__ *level*

    Asks the package whether the specified level is currently suppressed\. Unique
    abbreviations of level names are allowed\.

  - <a name='11'></a>__::log::lvCmd__ *level* *cmd*

    Defines for the specified level with which command to write the messages
    having this level\. Unique abbreviations of level names are allowed\. The
    command is actually a command prefix and this facility will append 2
    arguments before calling it, the level of the message and the message
    itself, in this order\.

  - <a name='12'></a>__::log::lvCmdForall__ *cmd*

    Defines for all known levels with which command to write the messages having
    this level\. The command is actually a command prefix and this facility will
    append 2 arguments before calling it, the level of the message and the
    message itself, in this order\.

  - <a name='13'></a>__::log::lvChannel__ *level* *chan*

    Defines for the specified level into which channel __::log::Puts__ \(the
    standard command\) shall write the messages having this level\. Unique
    abbreviations of level names are allowed\. The command is actually a command
    prefix and this facility will append 2 arguments before calling it, the
    level of the message and the message itself, in this order\.

  - <a name='14'></a>__::log::lvChannelForall__ *chan*

    Defines for all known levels with which which channel __::log::Puts__
    \(the standard command\) shall write the messages having this level\. The
    command is actually a command prefix and this facility will append 2
    arguments before calling it, the level of the message and the message
    itself, in this order\.

  - <a name='15'></a>__::log::lvColor__ *level* *color*

    Defines for the specified level the color to return for it in a call to
    __::log::lv2color__\. Unique abbreviations of level names are allowed\.

  - <a name='16'></a>__::log::lvColorForall__ *color*

    Defines for all known levels the color to return for it in a call to
    __::log::lv2color__\. Unique abbreviations of level names are allowed\.

  - <a name='17'></a>__::log::log__ *level* *text*

    Log a message according to the specifications for commands, channels and
    suppression\. In other words: The command will do nothing if the specified
    level is suppressed\. If it is not suppressed the actual logging is delegated
    to the specified command\. If there is no command specified for the level the
    message won't be logged\. The standard command __::log::Puts__ will write
    the message to the channel specified for the given level\. If no channel is
    specified for the level the message won't be logged\. Unique abbreviations of
    level names are allowed\. Errors in the actual logging command are *not*
    caught, but propagated to the caller, as they may indicate misconfigurations
    of the log facility or errors in the callers code itself\.

  - <a name='18'></a>__::log::logarray__ *level* *arrayvar* ?*pattern*?

    Like __::log::log__, but logs the contents of the specified array
    variable *arrayvar*, possibly restricted to entries matching the
    *pattern*\. The pattern defaults to __\*__ \(i\.e\. all entries\) if none
    was specified\.

  - <a name='19'></a>__::log::loghex__ *level* *text* *data*

    Like __::log::log__, but assumes that *data* contains binary data\. It
    converts this into a mixed hex/ascii representation before writing them to
    the log\.

  - <a name='20'></a>__::log::logsubst__ *level* *msg*

    Like __::log::log__, but *msg* may contain substitutions and variable
    references, which are evaluated in the caller scope first\. The purpose of
    this command is to avoid overhead in the non\-logging case, if the log
    message building is expensive\. Any substitution errors raise an error in the
    command execution\. The following example shows an xml text representation,
    which is only generated in debug mode:

    log::logsubst debug {XML of node $node is '[$node toXml]'}

  - <a name='21'></a>__::log::logMsg__ *text*

    Convenience wrapper around __::log::log__\. Equivalent to __::log::log
    info text__\.

  - <a name='22'></a>__::log::logError__ *text*

    Convenience wrapper around __::log::log__\. Equivalent to __::log::log
    error text__\.

  - <a name='23'></a>__::log::Puts__ *level* *text*

    The standard log command, it writes messages and their levels to
    user\-specified channels\. Assumes that the suppression checks were done by
    the caller\. Expects full level names, abbreviations are *not allowed*\.

# <a name='section3'></a>LEVELS

The package currently defines the following log levels, the level of highest
importance listed first\.

  - emergency

  - alert

  - critical

  - error

  - warning

  - notice

  - info

  - debug

*Note* that by default all messages with levels __warning__ down to
__debug__ are suppressed\. This is done intentionally, because \(we believe
that\) in most situations debugging output is not wanted\. Most people wish to
have such output only when actually debugging an application\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *log* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[log](\.\./\.\./\.\./\.\./index\.md\#log), [log
level](\.\./\.\./\.\./\.\./index\.md\#log\_level),
[message](\.\./\.\./\.\./\.\./index\.md\#message), [message
level](\.\./\.\./\.\./\.\./index\.md\#message\_level)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2001\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/log/logger.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460

[//000000001]: # (logger \- Object Oriented logging facility)
[//000000002]: # (Generated from file 'logger\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (logger\(n\) 0\.9\.4 tcllib "Object Oriented logging facility")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

logger \- System to control logging of events\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [IMPLEMENTATION](#section2)

  - [Logprocs and Callstack](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require logger ?0\.9\.4?  

[__logger::init__ *service*](#1)  
[__logger::import__ ?__\-all__? ?__\-force__? ?__\-prefix__ *prefix*? ?__\-namespace__ *namespace*? *service*](#2)  
[__logger::initNamespace__ *ns* ?*level*?](#3)  
[__logger::services__](#4)  
[__logger::enable__ *level*](#5)  
[__logger::disable__ *level*](#6)  
[__logger::setlevel__ *level*](#7)  
[__logger::levels__](#8)  
[__logger::servicecmd__ *service*](#9)  
[__$\{log\}::debug__ *message*](#10)  
[__$\{log\}::info__ *message*](#11)  
[__$\{log\}::notice__ *message*](#12)  
[__$\{log\}::warn__ *message*](#13)  
[__$\{log\}::error__ *message*](#14)  
[__$\{log\}::critical__ *message*](#15)  
[__$\{log\}::alert__ *message*](#16)  
[__$\{log\}::emergency__ *message*](#17)  
[__$\{log\}::setlevel__ *level*](#18)  
[__$\{log\}::enable__ *level*](#19)  
[__$\{log\}::disable__ *level*](#20)  
[__$\{log\}::lvlchangeproc__ *command*](#21)  
[__$\{log\}::lvlchangeproc__](#22)  
[__$\{log\}::logproc__ *level*](#23)  
[__$\{log\}::logproc__ *level* *command*](#24)  
[__$\{log\}::logproc__ *level* *argname* *body*](#25)  
[__$\{log\}::services__](#26)  
[__$\{log\}::servicename__](#27)  
[__$\{log\}::currentloglevel__](#28)  
[__$\{log\}::delproc__ *command*](#29)  
[__$\{log\}::delproc__](#30)  
[__$\{log\}::delete__](#31)  
[__$\{log\}::trace__ *command*](#32)  
[__$\{log\}::trace__ __on__](#33)  
[__$\{log\}::trace__ __off__](#34)  
[__$\{log\}::trace__ __status__ ?procName? ?\.\.\.?](#35)  
[__$\{log\}::trace__ __add__ *procName* ?\.\.\.?](#36)  
[__$\{log\}::trace__ __add__ ?\-ns? *nsName* ?\.\.\.?](#37)  
[__$\{log\}::trace__ __[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__ *procName* ?\.\.\.?](#38)  
[__$\{log\}::trace__ __[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__ ?\-ns? *nsName* ?\.\.\.?](#39)  

# <a name='description'></a>DESCRIPTION

The __logger__ package provides a flexible system for logging messages from
different services, at priority levels, with different commands\.

To begin using the logger package, we do the following:

    package require logger
    set log [logger::init myservice]
    ${log}::notice "Initialized myservice logging"

    ... code ...

    ${log}::notice "Ending myservice logging"
    ${log}::delete

In the above code, after the package is loaded, the following things happen:

  - <a name='1'></a>__logger::init__ *service*

    Initializes the service *service* for logging\. The service names are
    actually Tcl namespace names, so they are separated with '::'\. The service
    name may not be the empty string or only ':'s\. When a logger service is
    initialized, it "inherits" properties from its parents\. For instance, if
    there were a service *foo*, and we did a __logger::init__ *foo::bar*
    \(to create a *bar* service underneath *foo*\), *bar* would copy the
    current configuration of the *foo* service, although it would of course,
    also be possible to then separately configure *bar*\. If a logger service
    is initialized and the parent does not yet exist, the parent is also
    created\. The new logger service is initialized with the default loglevel set
    with __logger::setlevel__\.

  - <a name='2'></a>__logger::import__ ?__\-all__? ?__\-force__? ?__\-prefix__ *prefix*? ?__\-namespace__ *namespace*? *service*

    Import the logger service commands into the current namespace\. Without the
    __\-all__ option only the commands corresponding to the log levels are
    imported\. If __\-all__ is given, all the __$\{log\}::cmd__ style
    commands are imported\. If the import would overwrite a command an error is
    returned and no command is imported\. Use the __\-force__ option to force
    the import and overwrite existing commands without complaining\. If the
    __\-prefix__ option is given, the commands are imported with the given
    *prefix* prepended to their names\. If the __\-namespace__ option is
    given, the commands are imported into the given namespace\. If the namespace
    does not exist, it is created\. If a namespace without a leading :: is given,
    it is interpreted as a child namespace to the current namespace\.

  - <a name='3'></a>__logger::initNamespace__ *ns* ?*level*?

    Convenience command for setting up a namespace for logging\. Creates a logger
    service named after the namespace *ns* \(a :: prefix is stripped\), imports
    all the log commands into the namespace, and sets the default logging level,
    either as specified by *level*, or inherited from a service in the parent
    namespace, or a hardwired default, __warn__\.

  - <a name='4'></a>__logger::services__

    Returns a list of all the available services\.

  - <a name='5'></a>__logger::enable__ *level*

    Globally enables logging at and "above" the given level\. Levels are
    __debug__, __info__, __notice__, __warn__, __error__,
    __critical__, __alert__, __emergency__\.

  - <a name='6'></a>__logger::disable__ *level*

    Globally disables logging at and "below" the given level\. Levels are those
    listed above\.

  - <a name='7'></a>__logger::setlevel__ *level*

    Globally enable logging at and "above" the given level\. Levels are those
    listed above\. This command changes the default loglevel for new loggers
    created with __logger::init__\.

  - <a name='8'></a>__logger::levels__

    Returns a list of the available log levels \(also listed above under
    __enable__\)\.

  - <a name='9'></a>__logger::servicecmd__ *service*

    Returns the __$\{log\}__ token created by __logger::init__ for this
    service\.

  - <a name='10'></a>__$\{log\}::debug__ *message*

  - <a name='11'></a>__$\{log\}::info__ *message*

  - <a name='12'></a>__$\{log\}::notice__ *message*

  - <a name='13'></a>__$\{log\}::warn__ *message*

  - <a name='14'></a>__$\{log\}::error__ *message*

  - <a name='15'></a>__$\{log\}::critical__ *message*

  - <a name='16'></a>__$\{log\}::alert__ *message*

  - <a name='17'></a>__$\{log\}::emergency__ *message*

    These are the commands called to actually log a message about an event\.
    __$\{log\}__ is the variable obtained from __logger::init__\.

  - <a name='18'></a>__$\{log\}::setlevel__ *level*

    Enable logging, in the service referenced by __$\{log\}__, and its
    children, at and above the level specified, and disable logging below it\.

  - <a name='19'></a>__$\{log\}::enable__ *level*

    Enable logging, in the service referenced by __$\{log\}__, and its
    children, at and above the level specified\. Note that this does *not*
    disable logging below this level, so you should probably use
    __setlevel__ instead\.

  - <a name='20'></a>__$\{log\}::disable__ *level*

    Disable logging, in the service referenced by __$\{log\}__, and its
    children, at and below the level specified\. Note that this does *not*
    enable logging above this level, so you should probably use __setlevel__
    instead\. Disabling the loglevel __emergency__ switches logging off for
    the service and its children\.

  - <a name='21'></a>__$\{log\}::lvlchangeproc__ *command*

  - <a name='22'></a>__$\{log\}::lvlchangeproc__

    Set the script to call when the log instance in question changes its log
    level\. If called without a command it returns the currently registered
    command\. The command gets two arguments appended, the old and the new
    loglevel\. The callback is invoked after all changes have been done\. If child
    loggers are affected, their callbacks are called before their parents
    callback\.

    proc lvlcallback {old new} {
        puts "Loglevel changed from $old to $new"
    }
    ${log}::lvlchangeproc lvlcallback

  - <a name='23'></a>__$\{log\}::logproc__ *level*

  - <a name='24'></a>__$\{log\}::logproc__ *level* *command*

  - <a name='25'></a>__$\{log\}::logproc__ *level* *argname* *body*

    This command comes in three forms \- the third, older one is deprecated and
    may be removed from future versions of the logger package\. The current set
    version takes one argument, a command to be executed when the level is
    called\. The callback command takes on argument, the text to be logged\. If
    called only with a valid level __logproc__ returns the name of the
    command currently registered as callback command\. __logproc__ specifies
    which command will perform the actual logging for a given level\. The logger
    package ships with default commands for all log levels, but with
    __logproc__ it is possible to replace them with custom code\. This would
    let you send your logs over the network, to a database, or anything else\.
    For example:

    proc logtoserver {txt} {
        variable socket
        puts $socket "Notice: $txt"
    }

    ${log}::logproc notice logtoserver

    Trace logs are slightly different: instead of a plain text argument, the
    argument provided to the logproc is a dictionary consisting of the
    __enter__ or __leave__ keyword along with another dictionary of
    details about the trace\. These include:

      * __proc__ \- Name of the procedure being traced\.

      * __level__ \- The stack level for the procedure invocation \(from
        __[info](\.\./\.\./\.\./\.\./index\.md\#info)__ __level__\)\.

      * __script__ \- The name of the file in which the procedure is defined,
        or an empty string if defined in interactive mode\.

      * __caller__ \- The name of the procedure calling the procedure being
        traced, or an empty string if the procedure was called from the global
        scope \(stack level 0\)\.

      * __procargs__ \- A dictionary consisting of the names of arguments to
        the procedure paired with values given for those arguments
        \(__enter__ traces only\)\.

      * __status__ \- The Tcl return code \(e\.g\. __ok__, __continue__,
        etc\.\) \(__leave__ traces only\)\.

      * __result__ \- The value returned by the procedure \(__leave__
        traces only\)\.

  - <a name='26'></a>__$\{log\}::services__

    Returns a list of the registered logging services which are children of this
    service\.

  - <a name='27'></a>__$\{log\}::servicename__

    Returns the name of this service\.

  - <a name='28'></a>__$\{log\}::currentloglevel__

    Returns the currently enabled log level for this service\. If no logging is
    enabled returns __none__\.

  - <a name='29'></a>__$\{log\}::delproc__ *command*

  - <a name='30'></a>__$\{log\}::delproc__

    Set the script to call when the log instance in question is deleted\. If
    called without a command it returns the currently registered command\. For
    example:

    ${log}::delproc [list closesock $logsock]

  - <a name='31'></a>__$\{log\}::delete__

    This command deletes a particular logging service, and its children\. You
    must call this to clean up the resources used by a service\.

  - <a name='32'></a>__$\{log\}::trace__ *command*

    This command controls logging of enter/leave traces for specified
    procedures\. It is used to enable and disable tracing, query tracing status,
    and specify procedures are to be traced\. Trace handlers are unregistered
    when tracing is disabled\. As a result, there is not performance impact to a
    library when tracing is disabled, just as with other log level commands\.

      proc tracecmd { dict } {
          puts $dict
      }

      set log [::logger::init example]
      ${log}::logproc trace tracecmd

      proc foo { args } {
          puts "In foo"
          bar 1
          return "foo_result"
      }

      proc bar { x } {
          puts "In bar"
          return "bar_result"
      }

      ${log}::trace add foo bar
      ${log}::trace on

      foo

    # Output:
    enter {proc ::foo level 1 script {} caller {} procargs {args {}}}
    In foo
    enter {proc ::bar level 2 script {} caller ::foo procargs {x 1}}
    In bar
    leave {proc ::bar level 2 script {} caller ::foo status ok result bar_result}
    leave {proc ::foo level 1 script {} caller {} status ok result foo_result}

  - <a name='33'></a>__$\{log\}::trace__ __on__

    Turns on trace logging for procedures registered through the
    __[trace](\.\./\.\./\.\./\.\./index\.md\#trace)__ __add__ command\. This is
    similar to the __enable__ command for other logging levels, but allows
    trace logging to take place at any level\. The trace logging mechanism takes
    advantage of the execution trace feature of Tcl 8\.4 and later\. The
    __[trace](\.\./\.\./\.\./\.\./index\.md\#trace)__ __on__ command will
    return an error if called from earlier versions of Tcl\.

  - <a name='34'></a>__$\{log\}::trace__ __off__

    Turns off trace logging for procedures registered for trace logging through
    the __[trace](\.\./\.\./\.\./\.\./index\.md\#trace)__ __add__ command\.
    This is similar to the __disable__ command for other logging levels, but
    allows trace logging to take place at any level\. Procedures are not
    unregistered, so logging for them can be turned back on with the
    __[trace](\.\./\.\./\.\./\.\./index\.md\#trace)__ __on__ command\. There is
    no overhead imposed by trace registration when trace logging is disabled\.

  - <a name='35'></a>__$\{log\}::trace__ __status__ ?procName? ?\.\.\.?

    This command returns a list of the procedures currently registered for trace
    logging, or a flag indicating whether or not a trace is registered for one
    or more specified procedures\.

  - <a name='36'></a>__$\{log\}::trace__ __add__ *procName* ?\.\.\.?

  - <a name='37'></a>__$\{log\}::trace__ __add__ ?\-ns? *nsName* ?\.\.\.?

    This command registers one or more procedures for logging of entry/exit
    traces\. Procedures can be specified via a list of procedure names or
    namespace names \(in which case all procedure within the namespace are
    targeted by the operation\)\. By default, each name is first interpreted as a
    procedure name or glob\-style search pattern, and if not found its
    interpreted as a namespace name\. The *\-ns* option can be used to force
    interpretation of all provided arguments as namespace names\. Procedures must
    be defined prior to registering them for tracing through the
    __[trace](\.\./\.\./\.\./\.\./index\.md\#trace)__ __add__ command\. Any
    procedure or namespace names/patterns that don't match any existing
    procedures will be silently ignored\.

  - <a name='38'></a>__$\{log\}::trace__ __[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__ *procName* ?\.\.\.?

  - <a name='39'></a>__$\{log\}::trace__ __[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__ ?\-ns? *nsName* ?\.\.\.?

    This command unregisters one or more procedures so that they will no longer
    have trace logging performed, with the same matching rules as that of the
    __[trace](\.\./\.\./\.\./\.\./index\.md\#trace)__ __add__ command\.

# <a name='section2'></a>IMPLEMENTATION

The logger package is implemented in such a way as to optimize \(for Tcl 8\.4 and
newer\) log procedures which are disabled\. They are aliased to a proc which has
no body, which is compiled to a no op in bytecode\. This should make the
peformance hit minimal\. If you really want to pull out all the stops, you can
replace the $\{log\} token in your code with the actual namespace and command
\($\{log\}::warn becomes ::logger::tree::myservice::warn\), so that no variable
lookup is done\. This puts the performance of disabled logger commands very close
to no logging at all\.

The "object orientation" is done through a hierarchy of namespaces\. Using an
actual object oriented system would probably be a better way of doing things, or
at least provide for a cleaner implementation\.

The service "object orientation" is done with namespaces\.

# <a name='section3'></a>Logprocs and Callstack

The logger package takes extra care to keep the logproc out of the call stack\.
This enables logprocs to execute code in the callers scope by using uplevel or
linking to local variables by using upvar\. This may fire traces with all usual
side effects\.

    # Print caller and current vars in the calling proc
    proc log_local_var {txt} {
         set caller [info level -1]
         set vars [uplevel 1 info vars]
         foreach var [lsort $vars] {
            if {[uplevel 1 [list array exists $var]] == 1} {
            	lappend val $var <Array>
            } else {
            	lappend val $var [uplevel 1 [list set $var]]
            }
         }
         puts "$txt"
         puts "Caller: $caller"
         puts "Variables in callers scope:"
         foreach {var value} $val {
         	puts "$var = $value"
         }
    }

    # install as logproc
    ${log}::logproc debug log_local_var

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *logger* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[log](\.\./\.\./\.\./\.\./index\.md\#log), [log
level](\.\./\.\./\.\./\.\./index\.md\#log\_level),
[logger](\.\./\.\./\.\./\.\./index\.md\#logger),
[service](\.\./\.\./\.\./\.\./index\.md\#service)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/log/loggerAppender.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105

[//000000001]: # (logger::appender \- Object Oriented logging facility)
[//000000002]: # (Generated from file 'loggerAppender\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Aamer Akhter <aakhter@cisco\.com>)
[//000000004]: # (logger::appender\(n\) 1\.2 tcllib "Object Oriented logging facility")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

logger::appender \- Collection of predefined appenders for logger

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require logger::appender ?1\.2?  

[__::logger::appender::console__ __\-level__ *level* __\-service__ *service* ?*options*\.\.\.?](#1)  
[__::logger::appender::colorConsole__ __\-level__ *level* __\-service__ *service* ?*options*\.\.\.?](#2)  

# <a name='description'></a>DESCRIPTION

This package provides a predefined set of logger templates\.

  - <a name='1'></a>__::logger::appender::console__ __\-level__ *level* __\-service__ *service* ?*options*\.\.\.?

      * __\-level__ level

        Name of the level to fill in as "priority" in the log procedure\.

      * __\-service__ service

        Name of the service to fill in as "category" in the log procedure\.

      * __\-appenderArgs__ appenderArgs

        Any additional arguments for the log procedure in list form

      * __\-conversionPattern__ conversionPattern

        The log pattern to use \(see __logger::utils::createLogProc__ for the
        allowed substitutions\)\.

      * __\-procName__ procName

        Explicitly set the name of the created procedure\.

      * __\-procNameVar__ procNameVar

        Name of the variable to set in the calling context\. This variable will
        contain the name of the procedure\.

  - <a name='2'></a>__::logger::appender::colorConsole__ __\-level__ *level* __\-service__ *service* ?*options*\.\.\.?

    See __::logger::appender::colorConsole__ for a description of the
    applicable options\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *logger* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[appender](\.\./\.\./\.\./\.\./index\.md\#appender),
[logger](\.\./\.\./\.\./\.\./index\.md\#logger)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Aamer Akhter <aakhter@cisco\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































Deleted embedded/md/tcllib/files/modules/log/loggerUtils.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

[//000000001]: # (logger::utils \- Object Oriented logging facility)
[//000000002]: # (Generated from file 'loggerUtils\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Aamer Akhter <aakhter@cisco\.com>)
[//000000004]: # (logger::utils\(n\) 1\.3\.1 tcllib "Object Oriented logging facility")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

logger::utils \- Utilities for logger

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require logger::utils ?1\.3\.1?  

[__::logger::utils::createFormatCmd__ *formatString*](#1)  
[__::logger::utils::createLogProc__ __\-procName__ *procName* ?*options*\.\.\.?](#2)  
[__::logger::utils::applyAppender__ __\-appender__ *appenderType* ?*options*\.\.\.?](#3)  
[__::logger::utils::autoApplyAppender__ *command* *command\-string* *log* *op* *args*\.\.\.](#4)  

# <a name='description'></a>DESCRIPTION

This package adds template based *appenders*\.

  - <a name='1'></a>__::logger::utils::createFormatCmd__ *formatString*

    This command translates *formatString* into an expandable command string\.
    The following strings are the known substitutions \(from log4perl\) allowed to
    occur in the *formatString*:

      * %c

        Category of the logging event

      * %C

        Fully qualified name of logging event

      * %d

        Current date in yyyy/MM/dd hh:mm:ss

      * %H

        Hostname

      * %m

        Message to be logged

      * %M

        Method where logging event was issued

      * %p

        Priority of logging event

      * %P

        Pid of current process

  - <a name='2'></a>__::logger::utils::createLogProc__ __\-procName__ *procName* ?*options*\.\.\.?

    This command \.\.\.

      * __\-procName__ procName

        The name of the procedure to create\.

      * __\-conversionPattern__ pattern

        See __::logger::utils::createFormatCmd__ for the substitutions
        allowed in the *pattern*\.

      * __\-category__ category

        The category \(service\)\.

      * __\-priority__ priority

        The priority \(level\)\.

      * __\-outputChannel__ channel

        channel to output on \(default stdout\)

  - <a name='3'></a>__::logger::utils::applyAppender__ __\-appender__ *appenderType* ?*options*\.\.\.?

    This command will create an appender for the specified logger services\. If
    no service is specified then the appender will be added as the default
    appender for the specified levels\. If no levels are specified, then all
    levels are assumed\.

      * __\-service__ loggerservices

      * __\-serviceCmd__ loggerserviceCmds

        Name of the logger instance to modify\. __\-serviceCmd__ takes as
        input the return of __logger::init__\.

      * __\-appender__ appenderType

        Type of the appender to use\. One of __console__,
        __colorConsole__\.

      * __\-appenderArgs__ appenderArgs

        Additional arguments to apply to the appender\. The argument of the
        option is a list of options and their arguments\.

        For example

            logger::utils::applyAppender -serviceCmd $log -appender console -appenderArgs {-conversionPattern {\[%M\] \[%p\] - %m}}

        The usual Tcl quoting rules apply\.

      * __\-levels__ levelList

        The list of levels to apply this appender to\. If not specified all
        levels are assumed\.

    Example of usage:

        % set log [logger::init testLog]
        ::logger::tree::testLog
        % logger::utils::applyAppender -appender console -serviceCmd $log
        % ${log}::error "this is an error"
        [2005/08/22 10:14:13] [testLog] [global] [error] this is an error

  - <a name='4'></a>__::logger::utils::autoApplyAppender__ *command* *command\-string* *log* *op* *args*\.\.\.

    This command is designed to be added via __trace leave__ to calls of
    __logger::init__\. It will look at preconfigured state \(via
    __::logger::utils::applyAppender__\) to autocreate appenders for newly
    created logger instances\. It will return its argument *log*\.

    Example of usage:

        logger::utils::applyAppender -appender console
        set log [logger::init applyAppender-3]
        ${log}::error "this is an error"

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *logger* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[appender](\.\./\.\./\.\./\.\./index\.md\#appender),
[logger](\.\./\.\./\.\./\.\./index\.md\#logger)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Aamer Akhter <aakhter@cisco\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/map/map_geocode_nominatim.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

[//000000001]: # (map::geocode::nominatim \- Mapping utilities)
[//000000002]: # (Generated from file 'map\_geocode\_nominatim\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (map::geocode::nominatim\(n\) 0\.1 tcllib "Mapping utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

map::geocode::nominatim \- Resolving geographical names with a Nominatim service

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Options](#subsection1)

      - [Methods](#subsection2)

  - [References](#section3)

  - [Keywords](#keywords)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require http  
package require json  
package require uri  
package require snit  
package require map::geocode::nominatim ?0\.1?  

[__::map::geocode::nominatim__ *requestor* ?__\-baseurl__ *url*? ?__\-callback__ *callback*? ?__\-error__ *error callback*?](#1)  
[__$cmdprefix__ *result*](#2)  
[__$cmdprefix__ *errorstring*](#3)  
[*requestor* __search__ *query*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a class for accessing geocoding services which implement
the *[Nominatim](\.\./\.\./\.\./\.\./index\.md\#nominatim)* interface \(see
[References](#section3)\)

# <a name='section2'></a>API

  - <a name='1'></a>__::map::geocode::nominatim__ *requestor* ?__\-baseurl__ *url*? ?__\-callback__ *callback*? ?__\-error__ *error callback*?

    Creates a geocoding request object *requestor*, which will send its
    requests to the *[Nominatim](\.\./\.\./\.\./\.\./index\.md\#nominatim)* server\.

    The result of the command is *name*\.

## <a name='subsection1'></a>Options

  - __\-baseurl__ *url*

    The base URL of the *[Nominatim](\.\./\.\./\.\./\.\./index\.md\#nominatim)*
    service\. Default value is *OpenStreetMap's* service at
    [http://nominatim\.openstreetmap\.org/search](http://nominatim\.openstreetmap\.org/search)
    A possible free alternative is at
    [http://open\.mapquestapi\.com//nominatim/v1/search](http://open\.mapquestapi\.com//nominatim/v1/search)

  - __\-callback__ *cmdprefix*

    A command prefix to be invoked when search result become available\. The
    default setting, active when nothing was specified on object creation, is to
    print the *result* \(see below\) to
    *[stdout](\.\./\.\./\.\./\.\./index\.md\#stdout)*\. The result of the command
    prefix is ignored\. Errors thrown by the command prefix are caught and cause
    the invokation of the error callback \(see option __\-error__ below\), with
    the error message as argument\.

    The signature of the command prefix is:

      * <a name='2'></a>__$cmdprefix__ *result*

        The *result* is a list of dictionaries, containing one item per hit\.
        Each dictionary will have the following entries:

          + place\_id

            The place ID \(FIXME: what's this?\)

          + licence

            The data licence string

          + osm\_type

            The OSM type of the location

          + osm\_id

            FIXME

          + boundingbox

            The coordinates of the bounding box \(min and max latitude, min and
            max longitude\)

          + lat

            The location's latitude

          + lon

            The location's longitude

          + display\_name

            the location's human readable name

          + class

            FIXME

          + type

            FIXME

          + icon

            FIXME

  - __\-error__ *cmdprefix*

    A command prefix to be invoked when encountering errors\. Typically these are
    HTTP errors\. The default setting, active when nothing was specified on
    object creation, is to print the *errorstring* \(see below\) to *stderr*\.
    The result of the command prefix is ignored\. Errors thrown by the command
    prefix are passed to higher levels\.

    The signature of the command prefix is:

      * <a name='3'></a>__$cmdprefix__ *errorstring*

## <a name='subsection2'></a>Methods

  - <a name='4'></a>*requestor* __search__ *query*

    This method returns a list of dictionaries, one item per hit for the
    specified *query*\.

# <a name='section3'></a>References

  1. [http://wiki\.openstreetmap\.org/wiki/Nominatim](http://wiki\.openstreetmap\.org/wiki/Nominatim)

  1. [http://open\.mapquestapi\.com/nominatim/](http://open\.mapquestapi\.com/nominatim/)

# <a name='keywords'></a>KEYWORDS

[geocoding](\.\./\.\./\.\./\.\./index\.md\#geocoding),
[http](\.\./\.\./\.\./\.\./index\.md\#http),
[location](\.\./\.\./\.\./\.\./index\.md\#location),
[map](\.\./\.\./\.\./\.\./index\.md\#map),
[nominatim](\.\./\.\./\.\./\.\./index\.md\#nominatim),
[server](\.\./\.\./\.\./\.\./index\.md\#server), [url](\.\./\.\./\.\./\.\./index\.md\#url)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/map/map_slippy.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

[//000000001]: # (map::slippy \- Mapping utilities)
[//000000002]: # (Generated from file 'map\_slippy\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (map::slippy\(n\) 0\.5 tcllib "Mapping utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

map::slippy \- Common code for slippy based map packages

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Coordinate systems](#section3)

      - [Geographic](#subsection1)

      - [Tiles](#subsection2)

      - [Pixels/Points](#subsection3)

  - [References](#section4)

  - [Keywords](#keywords)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require Tk 8\.4  
package require map::slippy ?0\.5?  

[__::map::slippy__ __length__ *level*](#1)  
[__::map::slippy__ __tiles__ *level*](#2)  
[__::map::slippy__ __tile size__](#3)  
[__::map::slippy__ __tile valid__ *tile* *levels* ?*msgvar*?](#4)  
[__::map::slippy__ __geo 2tile__ *geo*](#5)  
[__::map::slippy__ __geo 2tile\.float__ *geo*](#6)  
[__::map::slippy__ __geo 2point__ *geo*](#7)  
[__::map::slippy__ __tile 2geo__ *tile*](#8)  
[__::map::slippy__ __tile 2point__ *tile*](#9)  
[__::map::slippy__ __point 2geo__ *point*](#10)  
[__::map::slippy__ __point 2tile__ *point*](#11)  
[__::map::slippy__ __fit geobox__ *canvdim* *geobox* *zmin* *zmax*](#12)  

# <a name='description'></a>DESCRIPTION

This package provides a number of methods doing things needed by all types of
slippy\-based map packages\.

# <a name='section2'></a>API

  - <a name='1'></a>__::map::slippy__ __length__ *level*

    This method returns the width/height of a slippy\-based map at the specified
    zoom *level*, in pixels\. This is, in essence, the result of

        expr { [tiles $level] * [tile size] }

  - <a name='2'></a>__::map::slippy__ __tiles__ *level*

    This method returns the width/height of a slippy\-based map at the specified
    zoom *level*, in *tiles*\.

  - <a name='3'></a>__::map::slippy__ __tile size__

    This method returns the width/height of a tile in a slippy\-based map, in
    pixels\.

  - <a name='4'></a>__::map::slippy__ __tile valid__ *tile* *levels* ?*msgvar*?

    This method checks whether *tile* described a valid tile in a slippy\-based
    map containing that many zoom *levels*\. The result is a boolean value,
    __true__ if the tile is valid, and __false__ otherwise\. For the
    latter a message is left in the variable named by *msgvar*, should it be
    specified\.

    A tile identifier as stored in *tile* is a list containing zoom level,
    tile row, and tile column, in this order\. The command essentially checks
    this, i\.e\. the syntax, that the zoom level is between 0 and "*levels*\-1",
    and that the row/col information is within the boundaries for the zoom
    level, i\.e\. 0 \.\.\. "\[tiles $zoom\]\-1"\.

  - <a name='5'></a>__::map::slippy__ __geo 2tile__ *geo*

    Converts a geographical location at a zoom level \(*geo*, a list containing
    zoom level, latitude, and longitude, in this order\) to a tile identifier
    \(list containing zoom level, row, and column\) at that level\. The tile
    identifier uses pure integer numbers for the tile coordinates, for all
    geographic coordinates mapping to that tile\.

  - <a name='6'></a>__::map::slippy__ __geo 2tile\.float__ *geo*

    Converts a geographical location at a zoom level \(*geo*, a list containing
    zoom level, latitude, and longitude, in this order\) to a tile identifier
    \(list containing zoom level, row, and column\) at that level\. The tile
    identifier uses floating point numbers for the tile coordinates,
    representing not only the tile the geographic coordinates map to, but also
    the fractional location inside of that tile\.

  - <a name='7'></a>__::map::slippy__ __geo 2point__ *geo*

    Converts a geographical location at a zoom level \(*geo*, a list containing
    zoom level, latitude, and longitude, in this order\) to a pixel position
    \(list containing zoom level, y, and x\) at that level\.

  - <a name='8'></a>__::map::slippy__ __tile 2geo__ *tile*

    Converts a tile identifier at a zoom level \(*tile*, list containing zoom
    level, row, and column\) to a geographical location \(list containing zoom
    level, latitude, and longitude, in this order\) at that level\.

  - <a name='9'></a>__::map::slippy__ __tile 2point__ *tile*

    Converts a tile identifier at a zoom level \(*tile*, a list containing zoom
    level, row, and column, in this order\) to a pixel position \(list containing
    zoom level, y, and x\) at that level\.

  - <a name='10'></a>__::map::slippy__ __point 2geo__ *point*

    Converts a pixel position at a zoom level \(*point*, list containing zoom
    level, y, and x\) to a geographical location \(list containing zoom level,
    latitude, and longitude, in this order\) at that level\.

  - <a name='11'></a>__::map::slippy__ __point 2tile__ *point*

    Converts a pixel position at a zoom level \(*point*, a list containing zoom
    level, y, and x, in this order\) to a tile identifier \(list containing zoom
    level, row, and column\) at that level\.

  - <a name='12'></a>__::map::slippy__ __fit geobox__ *canvdim* *geobox* *zmin* *zmax*

    Calculates the zoom level \(whithin the bounds *zmin* and *zmax*\) such
    that *geobox* \(a 4\-element list containing the latitudes and longitudes
    lat0, lat1, lon0 and lon1 of a geo box, in this order\) fits into a viewport
    given by *canvdim*, a 2\-element list containing the width and height of
    the viewport, in this order\.

# <a name='section3'></a>Coordinate systems

The commands of this package operate on three distinct coordinate systems, which
are explained below\.

## <a name='subsection1'></a>Geographic

*Geographic*al coordinates are represented by *Latitude* and
*[Longitude](\.\./\.\./\.\./\.\./index\.md\#longitude)*, each of which is measured
in degrees, as they are essentially angles\.

__Zero__ longitude is the *Greenwich meridian*, with positive values going
*east*, and negative values going *west*, for a total range of \+/\- 180
degrees\. Note that \+180 and \-180 longitude are the same *meridian*, opposite
to greenwich\.

__zero__ latitude the *Equator*, with positive values going *north* and
negative values going *south*\. While the true range is \+/\- 90 degrees the
projection used by the package requires us to cap the range at \+/\-
85\.05112877983284 degrees\. This means that north and south pole are not
representable and not part of any map\.

## <a name='subsection2'></a>Tiles

While [Geographic](#subsection1)al coordinates of the previous section are
independent of zoom level the *tile coordinates* are not\.

Generally the integer part of tile coordinates represent the row and column
number of the tile in question, wheras the fractional parts signal how far
inside the tile the location in question is, with pure integer coordinates \(no
fractional part\) representing the upper left corner of the tile\.

The zero point of the map is at the upper left corner, regardless of zoom level,
with larger coordinates going right \(east\) and down \(south\), and smaller
coordinates going left \(west\) and up \(north\)\. Again regardless of zxoom level\.

Negative tile coordinates are not allowed\.

At zoom level 0 the whole map is represented by a single, putting the geographic
zero at 1/2, 1/2 of tile coordinates, and the range of tile coordinates as
\[0\.\.\.1\]\.

To go from a zoom level N to the next deeper level N\+1 each tile of level N is
split into its four quadrants, which then are the tiles of level N\+1\.

This means that at zoom level N the map is sliced \(horizontally and vertically\)
into 2^N stripes, for a total of 4^N tiles, with tile coordinates ranging from 0
to 2^N\+1\.

## <a name='subsection3'></a>Pixels/Points

*pixel coordinates*, also called *point coordinates* are in essence [tile
coordinates](#subsection2) scaled by the size of the image representing a
tile\. This tile size currently has a fixed value, __256__\.

# <a name='section4'></a>References

  1. [http://wiki\.openstreetmap\.org/wiki/Main\_Page](http://wiki\.openstreetmap\.org/wiki/Main\_Page)

# <a name='keywords'></a>KEYWORDS

[geodesy](\.\./\.\./\.\./\.\./index\.md\#geodesy),
[geography](\.\./\.\./\.\./\.\./index\.md\#geography),
[latitute](\.\./\.\./\.\./\.\./index\.md\#latitute),
[location](\.\./\.\./\.\./\.\./index\.md\#location),
[longitude](\.\./\.\./\.\./\.\./index\.md\#longitude),
[map](\.\./\.\./\.\./\.\./index\.md\#map), [slippy](\.\./\.\./\.\./\.\./index\.md\#slippy),
[zoom](\.\./\.\./\.\./\.\./index\.md\#zoom)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/map/map_slippy_cache.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

[//000000001]: # (map::slippy::cache \- Mapping utilities)
[//000000002]: # (Generated from file 'map\_slippy\_cache\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (map::slippy::cache\(n\) 0\.2 tcllib "Mapping utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

map::slippy::cache \- Management of a tile cache in the local filesystem

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Methods](#subsection1)

  - [References](#section3)

  - [Keywords](#keywords)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require Tk 8\.4  
package require img::png  
package require map::slippy  
package require map::slippy::cache ?0\.2?  

[__::map::slippy::cache__ *cacheName* *cachedir* *provider*](#1)  
[*cacheName* __valid__ *tile* ?*msgvar*?](#2)  
[*cacheName* __exists__ *tile*](#3)  
[*cacheName* __get__ *tile* *donecmd*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a class for managing a cache of tiles for slippy\-based
maps in the local filesystem\.

# <a name='section2'></a>API

  - <a name='1'></a>__::map::slippy::cache__ *cacheName* *cachedir* *provider*

    Creates the cache *cacheName* and configures it with both the path to the
    directory contaiing the locally cached tiles \(*cachedir*\), and the command
    prefix from which it will pull tiles asked for and not yet known to the
    cache itself \(*provider*\)\.

    The result of the command is *cacheName*\.

## <a name='subsection1'></a>Methods

  - <a name='2'></a>*cacheName* __valid__ *tile* ?*msgvar*?

    This method checks the validity of a the given *tile* identifier\. This is
    a convenience wrapper to __::map::slippy tile valid__ and has the same
    interface\.

  - <a name='3'></a>*cacheName* __exists__ *tile*

    This methods tests whether the cache contains the specified *tile* or not\.
    The result is a boolean value, __true__ if the tile is known, and
    __false__ otherwise\. The tile is identified by a list containing three
    elements, zoom level, row, and column number, in this order\.

  - <a name='4'></a>*cacheName* __get__ *tile* *donecmd*

    This is the main method of the cache, retrieving the image for the specified
    *tile* from the cache\. The tile identifier is a list containing three
    elements, the zoom level, row, and column number of the tile, in this order\.

    The command refix *donecmd* will be invoked when the cache either knows
    the image for the tile or that no image will forthcoming\. It will be invoked
    with either 2 or 3 arguments, i\.e\.

      1. The string __set__, the *tile*, and the image\.

      1. The string __unset__, and the *tile*\.

    These two possibilities are used to either signal the image for the
    *tile*, or that the *tile* has no image defined for it\.

    When the cache has no information about the tile it will invoke the
    *provider* command prefix specified during its construction, adding three
    arguments: The string __get__, the *tile*, and a callback into the
    cache\. The latter will be invoked by the provider to either transfer the
    image to the cache, or signal that the tile has no image\.

    When multiple requests for the same tile are made only one request will be
    issued to the provider\.

# <a name='section3'></a>References

  1. [http://wiki\.openstreetmap\.org/wiki/Main\_Page](http://wiki\.openstreetmap\.org/wiki/Main\_Page)

# <a name='keywords'></a>KEYWORDS

[cache](\.\./\.\./\.\./\.\./index\.md\#cache),
[filesystem](\.\./\.\./\.\./\.\./index\.md\#filesystem),
[location](\.\./\.\./\.\./\.\./index\.md\#location),
[map](\.\./\.\./\.\./\.\./index\.md\#map), [slippy](\.\./\.\./\.\./\.\./index\.md\#slippy),
[tile](\.\./\.\./\.\./\.\./index\.md\#tile), [zoom](\.\./\.\./\.\./\.\./index\.md\#zoom)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































Deleted embedded/md/tcllib/files/modules/map/map_slippy_fetcher.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105

[//000000001]: # (map::slippy::fetcher \- Mapping utilities)
[//000000002]: # (Generated from file 'map\_slippy\_fetcher\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (map::slippy::fetcher\(n\) 0\.4 tcllib "Mapping utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

map::slippy::fetcher \- Accessing a server providing tiles for slippy\-based maps

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Methods](#subsection1)

  - [References](#section3)

  - [Keywords](#keywords)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require Tk 8\.4  
package require img::png  
package require map::slippy  
package require map::slippy::fetcher ?0\.4?  

[__::map::slippy::fetcher__ *fetcherName* *levels* *url*](#1)  
[*fetcherName* __levels__](#2)  
[*fetcherName* __tileheight__](#3)  
[*fetcherName* __tilewidth__](#4)  
[*fetcherName* __get__ *tile* *donecmd*](#5)  

# <a name='description'></a>DESCRIPTION

This package provides a class for accessing http servers providing tiles for
slippy\-based maps\.

# <a name='section2'></a>API

  - <a name='1'></a>__::map::slippy::fetcher__ *fetcherName* *levels* *url*

    Creates the fetcher *fetcherName* and configures it with the number of
    zoom *levels* supported by the tile server, and the *url* it is
    listening on for tile requests\.

    The result of the command is *fetcherName*\.

## <a name='subsection1'></a>Methods

  - <a name='2'></a>*fetcherName* __levels__

    This method returns the number of zoom levels supported by the fetcher
    object, and the tile server it is accessing\.

  - <a name='3'></a>*fetcherName* __tileheight__

    This method returns the height of tiles served, in pixels\.

  - <a name='4'></a>*fetcherName* __tilewidth__

    This method returns the width of tiles served, in pixels\.

  - <a name='5'></a>*fetcherName* __get__ *tile* *donecmd*

    This is the main method of the fetcher, retrieving the image for the
    specified *tile*\. The tile identifier is a list containing three elements,
    the zoom level, row, and column number of the tile, in this order\.

    The command refix *donecmd* will be invoked when the fetcher either knows
    the image for the tile or that no image will forthcoming\. It will be invoked
    with either 2 or 3 arguments, i\.e\.

      1. The string __set__, the *tile*, and the image\.

      1. The string __unset__, and the *tile*\.

    These two possibilities are used to either signal the image for the
    *tile*, or that the *tile* has no image defined for it\.

# <a name='section3'></a>References

  1. [http://wiki\.openstreetmap\.org/wiki/Main\_Page](http://wiki\.openstreetmap\.org/wiki/Main\_Page)

# <a name='keywords'></a>KEYWORDS

[http](\.\./\.\./\.\./\.\./index\.md\#http),
[location](\.\./\.\./\.\./\.\./index\.md\#location),
[map](\.\./\.\./\.\./\.\./index\.md\#map), [server](\.\./\.\./\.\./\.\./index\.md\#server),
[slippy](\.\./\.\./\.\./\.\./index\.md\#slippy),
[tile](\.\./\.\./\.\./\.\./index\.md\#tile), [url](\.\./\.\./\.\./\.\./index\.md\#url),
[zoom](\.\./\.\./\.\./\.\./index\.md\#zoom)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































Deleted embedded/md/tcllib/files/modules/mapproj/mapproj.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479

[//000000001]: # (mapproj \- Tcl Library)
[//000000002]: # (Generated from file 'mapproj\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Kevin B\. Kenny <kennykb@acm\.org>)
[//000000004]: # (mapproj\(n\) 0\.1 tcllib "Tcl Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

mapproj \- Map projection routines

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [Arguments](#section3)

  - [Results](#section4)

  - [Choosing a projection](#section5)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.4?  
package require math::interpolate ?1\.0?  
package require math::special ?0\.2\.1?  
package require mapproj ?1\.0?  

[__::mapproj::toPlateCarree__ *lambda\_0* *phi\_0* *lambda* *phi*](#1)  
[__::mapproj::fromPlateCarree__ *lambda\_0* *phi\_0* *x* *y*](#2)  
[__::mapproj::toCylindricalEqualArea__ *lambda\_0* *phi\_0* *lambda* *phi*](#3)  
[__::mapproj::fromCylindricalEqualArea__ *lambda\_0* *phi\_0* *x* *y*](#4)  
[__::mapproj::toMercator__ *lambda\_0* *phi\_0* *lambda* *phi*](#5)  
[__::mapproj::fromMercator__ *lambda\_0* *phi\_0* *x* *y*](#6)  
[__::mapproj::toMillerCylindrical__ *lambda\_0* *lambda* *phi*](#7)  
[__::mapproj::fromMillerCylindrical__ *lambda\_0* *x* *y*](#8)  
[__::mapproj::toSinusoidal__ *lambda\_0* *phi\_0* *lambda* *phi*](#9)  
[__::mapproj::fromSinusoidal__ *lambda\_0* *phi\_0* *x* *y*](#10)  
[__::mapproj::toMollweide__ *lambda\_0* *lambda* *phi*](#11)  
[__::mapproj::fromMollweide__ *lambda\_0* *x* *y*](#12)  
[__::mapproj::toEckertIV__ *lambda\_0* *lambda* *phi*](#13)  
[__::mapproj::fromEckertIV__ *lambda\_0* *x* *y*](#14)  
[__::mapproj::toEckertVI__ *lambda\_0* *lambda* *phi*](#15)  
[__::mapproj::fromEckertVI__ *lambda\_0* *x* *y*](#16)  
[__::mapproj::toRobinson__ *lambda\_0* *lambda* *phi*](#17)  
[__::mapproj::fromRobinson__ *lambda\_0* *x* *y*](#18)  
[__::mapproj::toCassini__ *lambda\_0* *phi\_0* *lambda* *phi*](#19)  
[__::mapproj::fromCassini__ *lambda\_0* *phi\_0* *x* *y*](#20)  
[__::mapproj::toPeirceQuincuncial__ *lambda\_0* *lambda* *phi*](#21)  
[__::mapproj::fromPeirceQuincuncial__ *lambda\_0* *x* *y*](#22)  
[__::mapproj::toOrthographic__ *lambda\_0* *phi\_0* *lambda* *phi*](#23)  
[__::mapproj::fromOrthographic__ *lambda\_0* *phi\_0* *x* *y*](#24)  
[__::mapproj::toStereographic__ *lambda\_0* *phi\_0* *lambda* *phi*](#25)  
[__::mapproj::fromStereographic__ *lambda\_0* *phi\_0* *x* *y*](#26)  
[__::mapproj::toGnomonic__ *lambda\_0* *phi\_0* *lambda* *phi*](#27)  
[__::mapproj::fromGnomonic__ *lambda\_0* *phi\_0* *x* *y*](#28)  
[__::mapproj::toAzimuthalEquidistant__ *lambda\_0* *phi\_0* *lambda* *phi*](#29)  
[__::mapproj::fromAzimuthalEquidistant__ *lambda\_0* *phi\_0* *x* *y*](#30)  
[__::mapproj::toLambertAzimuthalEqualArea__ *lambda\_0* *phi\_0* *lambda* *phi*](#31)  
[__::mapproj::fromLambertAzimuthalEqualArea__ *lambda\_0* *phi\_0* *x* *y*](#32)  
[__::mapproj::toHammer__ *lambda\_0* *lambda* *phi*](#33)  
[__::mapproj::fromHammer__ *lambda\_0* *x* *y*](#34)  
[__::mapproj::toConicEquidistant__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *lambda* *phi*](#35)  
[__::mapproj::fromConicEquidistant__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *x* *y*](#36)  
[__::mapproj::toAlbersEqualAreaConic__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *lambda* *phi*](#37)  
[__::mapproj::fromAlbersEqualAreaConic__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *x* *y*](#38)  
[__::mapproj::toLambertConformalConic__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *lambda* *phi*](#39)  
[__::mapproj::fromLambertConformalConic__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *x* *y*](#40)  
[__::mapproj::toLambertCylindricalEqualArea__ *lambda\_0* *phi\_0* *lambda* *phi*](#41)  
[__::mapproj::fromLambertCylindricalEqualArea__ *lambda\_0* *phi\_0* *x* *y*](#42)  
[__::mapproj::toBehrmann__ *lambda\_0* *phi\_0* *lambda* *phi*](#43)  
[__::mapproj::fromBehrmann__ *lambda\_0* *phi\_0* *x* *y*](#44)  
[__::mapproj::toTrystanEdwards__ *lambda\_0* *phi\_0* *lambda* *phi*](#45)  
[__::mapproj::fromTrystanEdwards__ *lambda\_0* *phi\_0* *x* *y*](#46)  
[__::mapproj::toHoboDyer__ *lambda\_0* *phi\_0* *lambda* *phi*](#47)  
[__::mapproj::fromHoboDyer__ *lambda\_0* *phi\_0* *x* *y*](#48)  
[__::mapproj::toGallPeters__ *lambda\_0* *phi\_0* *lambda* *phi*](#49)  
[__::mapproj::fromGallPeters__ *lambda\_0* *phi\_0* *x* *y*](#50)  
[__::mapproj::toBalthasart__ *lambda\_0* *phi\_0* *lambda* *phi*](#51)  
[__::mapproj::fromBalthasart__ *lambda\_0* *phi\_0* *x* *y*](#52)  

# <a name='description'></a>DESCRIPTION

The __mapproj__ package provides a set of procedures for converting between
world co\-ordinates \(latitude and longitude\) and map co\-ordinates on a number of
different map projections\.

# <a name='section2'></a>Commands

The following commands convert between world co\-ordinates and map co\-ordinates:

  - <a name='1'></a>__::mapproj::toPlateCarree__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the *plate carrée* \(cylindrical equidistant\) projection\.

  - <a name='2'></a>__::mapproj::fromPlateCarree__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the *plate carrée* \(cylindrical equidistant\) projection\.

  - <a name='3'></a>__::mapproj::toCylindricalEqualArea__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the cylindrical equal\-area projection\.

  - <a name='4'></a>__::mapproj::fromCylindricalEqualArea__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the cylindrical equal\-area projection\.

  - <a name='5'></a>__::mapproj::toMercator__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the Mercator \(cylindrical conformal\) projection\.

  - <a name='6'></a>__::mapproj::fromMercator__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the Mercator \(cylindrical conformal\) projection\.

  - <a name='7'></a>__::mapproj::toMillerCylindrical__ *lambda\_0* *lambda* *phi*

    Converts to the Miller Cylindrical projection\.

  - <a name='8'></a>__::mapproj::fromMillerCylindrical__ *lambda\_0* *x* *y*

    Converts from the Miller Cylindrical projection\.

  - <a name='9'></a>__::mapproj::toSinusoidal__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the sinusoidal \(Sanson\-Flamsteed\) projection\. projection\.

  - <a name='10'></a>__::mapproj::fromSinusoidal__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the sinusoidal \(Sanson\-Flamsteed\) projection\. projection\.

  - <a name='11'></a>__::mapproj::toMollweide__ *lambda\_0* *lambda* *phi*

    Converts to the Mollweide projection\.

  - <a name='12'></a>__::mapproj::fromMollweide__ *lambda\_0* *x* *y*

    Converts from the Mollweide projection\.

  - <a name='13'></a>__::mapproj::toEckertIV__ *lambda\_0* *lambda* *phi*

    Converts to the Eckert IV projection\.

  - <a name='14'></a>__::mapproj::fromEckertIV__ *lambda\_0* *x* *y*

    Converts from the Eckert IV projection\.

  - <a name='15'></a>__::mapproj::toEckertVI__ *lambda\_0* *lambda* *phi*

    Converts to the Eckert VI projection\.

  - <a name='16'></a>__::mapproj::fromEckertVI__ *lambda\_0* *x* *y*

    Converts from the Eckert VI projection\.

  - <a name='17'></a>__::mapproj::toRobinson__ *lambda\_0* *lambda* *phi*

    Converts to the Robinson projection\.

  - <a name='18'></a>__::mapproj::fromRobinson__ *lambda\_0* *x* *y*

    Converts from the Robinson projection\.

  - <a name='19'></a>__::mapproj::toCassini__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the Cassini \(transverse cylindrical equidistant\) projection\.

  - <a name='20'></a>__::mapproj::fromCassini__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the Cassini \(transverse cylindrical equidistant\) projection\.

  - <a name='21'></a>__::mapproj::toPeirceQuincuncial__ *lambda\_0* *lambda* *phi*

    Converts to the Peirce Quincuncial Projection\.

  - <a name='22'></a>__::mapproj::fromPeirceQuincuncial__ *lambda\_0* *x* *y*

    Converts from the Peirce Quincuncial Projection\.

  - <a name='23'></a>__::mapproj::toOrthographic__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the orthographic projection\.

  - <a name='24'></a>__::mapproj::fromOrthographic__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the orthographic projection\.

  - <a name='25'></a>__::mapproj::toStereographic__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the stereographic \(azimuthal conformal\) projection\.

  - <a name='26'></a>__::mapproj::fromStereographic__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the stereographic \(azimuthal conformal\) projection\.

  - <a name='27'></a>__::mapproj::toGnomonic__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the gnomonic projection\.

  - <a name='28'></a>__::mapproj::fromGnomonic__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the gnomonic projection\.

  - <a name='29'></a>__::mapproj::toAzimuthalEquidistant__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the azimuthal equidistant projection\.

  - <a name='30'></a>__::mapproj::fromAzimuthalEquidistant__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the azimuthal equidistant projection\.

  - <a name='31'></a>__::mapproj::toLambertAzimuthalEqualArea__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the Lambert azimuthal equal\-area projection\.

  - <a name='32'></a>__::mapproj::fromLambertAzimuthalEqualArea__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the Lambert azimuthal equal\-area projection\.

  - <a name='33'></a>__::mapproj::toHammer__ *lambda\_0* *lambda* *phi*

    Converts to the Hammer projection\.

  - <a name='34'></a>__::mapproj::fromHammer__ *lambda\_0* *x* *y*

    Converts from the Hammer projection\.

  - <a name='35'></a>__::mapproj::toConicEquidistant__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *lambda* *phi*

    Converts to the conic equidistant projection\.

  - <a name='36'></a>__::mapproj::fromConicEquidistant__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *x* *y*

    Converts from the conic equidistant projection\.

  - <a name='37'></a>__::mapproj::toAlbersEqualAreaConic__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *lambda* *phi*

    Converts to the Albers equal\-area conic projection\.

  - <a name='38'></a>__::mapproj::fromAlbersEqualAreaConic__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *x* *y*

    Converts from the Albers equal\-area conic projection\.

  - <a name='39'></a>__::mapproj::toLambertConformalConic__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *lambda* *phi*

    Converts to the Lambert conformal conic projection\.

  - <a name='40'></a>__::mapproj::fromLambertConformalConic__ *lambda\_0* *phi\_0* *phi\_1* *phi\_2* *x* *y*

    Converts from the Lambert conformal conic projection\.

Among the cylindrical equal\-area projections, there are a number of choices of
standard parallels that have names:

  - <a name='41'></a>__::mapproj::toLambertCylindricalEqualArea__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the Lambert cylindrical equal area projection\. \(standard
    parallel is the Equator\.\)

  - <a name='42'></a>__::mapproj::fromLambertCylindricalEqualArea__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the Lambert cylindrical equal area projection\. \(standard
    parallel is the Equator\.\)

  - <a name='43'></a>__::mapproj::toBehrmann__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the Behrmann cylindrical equal area projection\. \(standard
    parallels are 30 degrees North and South\)

  - <a name='44'></a>__::mapproj::fromBehrmann__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the Behrmann cylindrical equal area projection\. \(standard
    parallels are 30 degrees North and South\.\)

  - <a name='45'></a>__::mapproj::toTrystanEdwards__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the Trystan Edwards cylindrical equal area projection\. \(standard
    parallels are 37\.4 degrees North and South\)

  - <a name='46'></a>__::mapproj::fromTrystanEdwards__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the Trystan Edwards cylindrical equal area projection\.
    \(standard parallels are 37\.4 degrees North and South\.\)

  - <a name='47'></a>__::mapproj::toHoboDyer__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the Hobo\-Dyer cylindrical equal area projection\. \(standard
    parallels are 37\.5 degrees North and South\)

  - <a name='48'></a>__::mapproj::fromHoboDyer__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the Hobo\-Dyer cylindrical equal area projection\. \(standard
    parallels are 37\.5 degrees North and South\.\)

  - <a name='49'></a>__::mapproj::toGallPeters__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the Gall\-Peters cylindrical equal area projection\. \(standard
    parallels are 45 degrees North and South\)

  - <a name='50'></a>__::mapproj::fromGallPeters__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the Gall\-Peters cylindrical equal area projection\. \(standard
    parallels are 45 degrees North and South\.\)

  - <a name='51'></a>__::mapproj::toBalthasart__ *lambda\_0* *phi\_0* *lambda* *phi*

    Converts to the Balthasart cylindrical equal area projection\. \(standard
    parallels are 50 degrees North and South\)

  - <a name='52'></a>__::mapproj::fromBalthasart__ *lambda\_0* *phi\_0* *x* *y*

    Converts from the Balthasart cylindrical equal area projection\. \(standard
    parallels are 50 degrees North and South\.\)

# <a name='section3'></a>Arguments

The following arguments are accepted by the projection commands:

  - *lambda*

    Longitude of the point to be projected, in degrees\.

  - *phi*

    Latitude of the point to be projected, in degrees\.

  - *lambda\_0*

    Longitude of the center of the sheet, in degrees\. For many projections, this
    figure is also the reference meridian of the projection\.

  - *phi\_0*

    Latitude of the center of the sheet, in degrees\. For the azimuthal
    projections, this figure is also the latitude of the center of the
    projection\.

  - *phi\_1*

    Latitude of the first reference parallel, for projections that use reference
    parallels\.

  - *phi\_2*

    Latitude of the second reference parallel, for projections that use
    reference parallels\.

  - *x*

    X co\-ordinate of a point on the map, in units of Earth radii\.

  - *y*

    Y co\-ordinate of a point on the map, in units of Earth radii\.

# <a name='section4'></a>Results

For all of the procedures whose names begin with 'to', the return value is a
list comprising an *x* co\-ordinate and a *y* co\-ordinate\. The co\-ordinates
are relative to the center of the map sheet to be drawn, measured in Earth radii
at the reference location on the map\. For all of the functions whose names begin
with 'from', the return value is a list comprising the longitude and latitude,
in degrees\.

# <a name='section5'></a>Choosing a projection

This package offers a great many projections, because no single projection is
appropriate to all maps\. This section attempts to provide guidance on how to
choose a projection\.

First, consider the type of data that you intend to display on the map\. If the
data are *directional* \(*e\.g\.,* winds, ocean currents, or magnetic fields\)
then you need to use a projection that preserves angles; these are known as
*conformal* projections\. Conformal projections include the Mercator, the
Albers azimuthal equal\-area, the stereographic, and the Peirce Quincuncial
projection\. If the data are *thematic*, describing properties of land or
water, such as temperature, population density, land use, or demographics; then
you need a projection that will show these data with the areas on the map
proportional to the areas in real life\. These so\-called *equal area*
projections include the various cylindrical equal area projections, the
sinusoidal projection, the Lambert azimuthal equal\-area projection, the Albers
equal\-area conic projection, and several of the world\-map projections \(Miller
Cylindrical, Mollweide, Eckert IV, Eckert VI, Robinson, and Hammer\)\. If the
significant factor in your data is distance from a central point or line \(such
as air routes\), then you will do best with an *equidistant* projection such as
*plate carrée*, Cassini, azimuthal equidistant, or conic equidistant\. If
direction from a central point is a critical factor in your data \(for instance,
air routes, radio antenna pointing\), then you will almost surely want to use one
of the azimuthal projections\. Appropriate choices are azimuthal equidistant,
azimuthal equal\-area, stereographic, and perhaps orthographic\.

Next, consider how much of the Earth your map will cover, and the general shape
of the area of interest\. For maps of the entire Earth, the cylindrical equal
area, Eckert IV and VI, Mollweide, Robinson, and Hammer projections are good
overall choices\. The Mercator projection is traditional, but the extreme
distortions of area at high latitudes make it a poor choice unless a conformal
projection is required\. The Peirce projection is a better choice of conformal
projection, having less distortion of landforms\. The Miller Cylindrical is a
compromise designed to give shapes similar to the traditional Mercator, but with
less polar stretching\. The Peirce Quincuncial projection shows all the
continents with acceptable distortion if a reference meridian close to \+20
degrees is chosen\. The Robinson projection yields attractive maps for things
like political divisions, but should be avoided in presenting scientific data,
since other projections have moe useful geometric properties\.

If the map will cover a hemisphere, then choose stereographic,
azimuthal\-equidistant, Hammer, or Mollweide projections; these all project the
hemisphere into a circle\.

If the map will cover a large area \(at least a few hundred km on a side\), but
less than a hemisphere, then you have several choices\. Azimuthal projections are
usually good \(choose stereographic, azimuthal equidistant, or Lambert azimuthal
equal\-area according to whether shapes, distances from a central point, or areas
are important\)\. Azimuthal projections \(and possibly the Cassini projection\) are
the only really good choices for mapping the polar regions\.

If the large area is in one of the temperate zones and is round or has a
primarily east\-west extent, then the conic projections are good choices\. Choose
the Lambert conformal conic, the conic equidistant, or the Albers equal\-area
conic according to whether shape, distance, or area are the most important
parameters\. For any of these, the reference parallels should be chosen at
approximately 1/6 and 5/6 of the range of latitudes to be displayed\. For
instance, maps of the 48 coterminous United States are attractive with reference
parallels of 28\.5 and 45\.5 degrees\.

If the large area is equatorial and is round or has a primarily east\-west
extent, then the Mercator projection is a good choice for a conformal
projection; Lambert cylindrical equal\-area and sinusoidal projections are good
equal\-area projections; and the *plate carrée* is a good equidistant
projection\.

Large areas having a primarily North\-South aspect, particularly those spanning
the Equator, need some other choices\. The Cassini projection is a good choice
for an equidistant projection \(for instance, a Cassini projection with a central
meridian of 80 degrees West produces an attractive map of the Americas\)\. The
cylindrical equal\-area, Albers equal\-area conic, sinusoidal, Mollweide and
Hammer projections are possible choices for equal\-area projections\. A good
conformal projection in this situation is the Transverse Mercator, which alas,
is not yet implemented\.

Small areas begin to get into a realm where the ellipticity of the Earth affects
the map scale\. This package does not attempt to handle accurate mapping for
large\-scale topographic maps\. If slight scale errors are acceptable in your
application, then any of the projections appropriate to large areas should work
for small ones as well\.

There are a few projections that are included for their special properties\. The
orthographic projection produces views of the Earth as seen from space\. The
gnomonic projection produces a map on which all great circles \(the shortest
distance between two points on the Earth's surface\) are rendered as straight
lines\. While this projection is useful for navigational planning, it has extreme
distortions of shape and area, and can display only a limited area of the Earth
\(substantially less than a hemisphere\)\.

# <a name='keywords'></a>KEYWORDS

[geodesy](\.\./\.\./\.\./\.\./index\.md\#geodesy),
[map](\.\./\.\./\.\./\.\./index\.md\#map),
[projection](\.\./\.\./\.\./\.\./index\.md\#projection)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Kevin B\. Kenny <kennykb@acm\.org>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/markdown/markdown.md.

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
89
90
91
92
93
94

[//000000001]: # (markdown \- Markdown to HTML Converter)
[//000000002]: # (Generated from file 'markdown\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (markdown\(n\) 1\.2 tcllib "Markdown to HTML Converter")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

markdown \- Converts Markdown text to HTML

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require Markdown 1\.2  
package require textutil ?0\.8?  

[__::Markdown::convert__ *markdown*](#1)  
[__::Markdown::register__ *langspec* *converter*](#2)  
[__::Markdown::get\_lang\_counter__](#3)  
[__::Markdown::reset\_lang\_counter__](#4)  

# <a name='description'></a>DESCRIPTION

The package __Markdown__ provides a command to convert Markdown annotated
text into HMTL\.

  - <a name='1'></a>__::Markdown::convert__ *markdown*

    This command takes in a block of Markdown text, and returns a block of HTML\.

    The converter supports two types of syntax highlighting for fenced code
    blocks: highlighting via a registered converter \(see
    __::Markdown::register__\), or pure JavaScript highlighting, e\.g\. via
    "highlight\.js", where the language specifier used in the markup is set as
    CSS class of the "code" element in the returned markup\.

  - <a name='2'></a>__::Markdown::register__ *langspec* *converter*

    Register a language specific converter for prettifying a code block \(e\.g\.
    syntax highlighting\)\. Markdown supports fenced code blocks with an optional
    language specifier \(e\.g\. "tcl"\)\. When the markdown parser processes such a
    code block and a converter for the specified langspec is registered, the
    converter is called with the raw code block as argument\. The converter is
    supposed to return the markup of the code block as result\. The specified
    converter can be an arbitrary Tcl command, the raw text block is added as
    last argument upon invocation\.

  - <a name='3'></a>__::Markdown::get\_lang\_counter__

    Return a dict of language specifier and number of occurrences in fenced code
    blocks\. This function can be used e\.g\. to detect, whether some CSS or
    JavaScript headers should be included for rendering without the need of
    postprocessing the rendered result\.

  - <a name='4'></a>__::Markdown::reset\_lang\_counter__

    Reset the language counters\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































Deleted embedded/md/tcllib/files/modules/math/bigfloat.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535

[//000000001]: # (math::bigfloat \- Tcl Math Library)
[//000000002]: # (Generated from file 'bigfloat\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004\-2008, by Stephane Arnold <stephanearnold at yahoo dot fr>)
[//000000004]: # (math::bigfloat\(n\) 2\.0\.3 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::bigfloat \- Arbitrary precision floating\-point numbers

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [INTRODUCTION](#section2)

  - [ARITHMETICS](#section3)

  - [COMPARISONS](#section4)

  - [ANALYSIS](#section5)

  - [ROUNDING](#section6)

  - [PRECISION](#section7)

  - [WHAT ABOUT TCL 8\.4 ?](#section8)

  - [NAMESPACES AND OTHER PACKAGES](#section9)

  - [EXAMPLES](#section10)

  - [Bugs, Ideas, Feedback](#section11)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require math::bigfloat ?2\.0\.3?  

[__fromstr__ *number* ?*trailingZeros*?](#1)  
[__tostr__ ?__\-nosci__? *number*](#2)  
[__fromdouble__ *double* ?*decimals*?](#3)  
[__todouble__ *number*](#4)  
[__isInt__ *number*](#5)  
[__isFloat__ *number*](#6)  
[__int2float__ *integer* ?*decimals*?](#7)  
[__add__ *x* *y*](#8)  
[__sub__ *x* *y*](#9)  
[__mul__ *x* *y*](#10)  
[__div__ *x* *y*](#11)  
[__mod__ *x* *y*](#12)  
[__abs__ *x*](#13)  
[__opp__ *x*](#14)  
[__pow__ *x* *n*](#15)  
[__iszero__ *x*](#16)  
[__[equal](\.\./\.\./\.\./\.\./index\.md\#equal)__ *x* *y*](#17)  
[__compare__ *x* *y*](#18)  
[__sqrt__ *x*](#19)  
[__[log](\.\./log/log\.md)__ *x*](#20)  
[__exp__ *x*](#21)  
[__cos__ *x*](#22)  
[__sin__ *x*](#23)  
[__tan__ *x*](#24)  
[__cotan__ *x*](#25)  
[__acos__ *x*](#26)  
[__asin__ *x*](#27)  
[__atan__ *x*](#28)  
[__cosh__ *x*](#29)  
[__sinh__ *x*](#30)  
[__tanh__ *x*](#31)  
[__[pi](\.\./\.\./\.\./\.\./index\.md\#pi)__ *n*](#32)  
[__rad2deg__ *radians*](#33)  
[__deg2rad__ *degrees*](#34)  
[__round__ *x*](#35)  
[__ceil__ *x*](#36)  
[__floor__ *x*](#37)  

# <a name='description'></a>DESCRIPTION

The bigfloat package provides arbitrary precision floating\-point math
capabilities to the Tcl language\. It is designed to work with Tcl 8\.5, but for
Tcl 8\.4 is provided an earlier version of this package\. See [WHAT ABOUT TCL 8\.4
?](#section8) for more explanations\. By convention, we will talk about the
numbers treated in this library as :

  - BigFloat for floating\-point numbers of arbitrary length\.

  - integers for arbitrary length signed integers, just as basic integers since
    Tcl 8\.5\.

Each BigFloat is an interval, namely \[*m\-d, m\+d*\], where *m* is the mantissa
and *d* the uncertainty, representing the limitation of that number's
precision\. This is why we call such mathematics *interval computations*\. Just
take an example in physics : when you measure a temperature, not all digits you
read are *significant*\. Sometimes you just cannot trust all digits \- not to
mention if doubles \(f\.p\. numbers\) can handle all these digits\. BigFloat can
handle this problem \- trusting the digits you get \- plus the ability to store
numbers with an arbitrary precision\. BigFloats are internally represented at Tcl
lists: this package provides a set of procedures operating against the internal
representation in order to :

  - perform math operations on BigFloats and \(optionnaly\) with integers\.

  - convert BigFloats from their internal representations to strings, and vice
    versa\.

# <a name='section2'></a>INTRODUCTION

  - <a name='1'></a>__fromstr__ *number* ?*trailingZeros*?

    Converts *number* into a BigFloat\. Its precision is at least the number of
    digits provided by *number*\. If the *number* contains only digits and
    eventually a minus sign, it is considered as an integer\. Subsequently, no
    conversion is done at all\.

    *trailingZeros* \- the number of zeros to append at the end of the
    floating\-point number to get more precision\. It cannot be applied to an
    integer\.

        # x and y are BigFloats : the first string contained a dot, and the second an e sign
        set x [fromstr -1.000000]
        set y [fromstr 2000e30]
        # let's see how we get integers
        set t 20000000000000
        # the old way (package 1.2) is still supported for backwards compatibility :
        set m [fromstr 10000000000]
        # but we do not need fromstr for integers anymore
        set n -39
        # t, m and n are integers

    The *number*'s last digit is considered by the procedure to be true at
    \+/\-1, For example, 1\.00 is the interval \[0\.99, 1\.01\], and 0\.43 the interval
    \[0\.42, 0\.44\]\. The Pi constant may be approximated by the number "3\.1415"\.
    This string could be considered as the interval \[3\.1414 , 3\.1416\] by
    __fromstr__\. So, when you mean 1\.0 as a double, you may have to write
    1\.000000 to get enough precision\. To learn more about this subject, see
    [PRECISION](#section7)\.

    For example :

        set x [fromstr 1.0000000000]
        # the next line does the same, but smarter
        set y [fromstr 1. 10]

  - <a name='2'></a>__tostr__ ?__\-nosci__? *number*

    Returns a string form of a BigFloat, in which all digits are exacts\. *All
    exact digits* means a rounding may occur, for example to zero, if the
    uncertainty interval does not clearly show the true digits\. *number* may
    be an integer, causing the command to return exactly the input argument\.
    With the __\-nosci__ option, the number returned is never shown in
    scientific notation, i\.e\. not like '3\.4523e\+5' but like '345230\.'\.

        puts [tostr [fromstr 0.99999]] ;# 1.0000
        puts [tostr [fromstr 1.00001]] ;# 1.0000
        puts [tostr [fromstr 0.002]] ;# 0.e-2

    See [PRECISION](#section7) for that matter\. See also __iszero__ for
    how to detect zeros, which is useful when performing a division\.

  - <a name='3'></a>__fromdouble__ *double* ?*decimals*?

    Converts a double \(a simple floating\-point value\) to a BigFloat, with
    exactly *decimals* digits\. Without the *decimals* argument, it behaves
    like __fromstr__\. Here, the only important feature you might care of is
    the ability to create BigFloats with a fixed number of *decimals*\.

        tostr [fromstr 1.111 4]
        # returns : 1.111000 (3 zeros)
        tostr [fromdouble 1.111 4]
        # returns : 1.111

  - <a name='4'></a>__todouble__ *number*

    Returns a double, that may be used in *expr*, from a BigFloat\.

  - <a name='5'></a>__isInt__ *number*

    Returns 1 if *number* is an integer, 0 otherwise\.

  - <a name='6'></a>__isFloat__ *number*

    Returns 1 if *number* is a BigFloat, 0 otherwise\.

  - <a name='7'></a>__int2float__ *integer* ?*decimals*?

    Converts an integer to a BigFloat with *decimals* trailing zeros\. The
    default, and minimal, number of *decimals* is 1\. When converting back to
    string, one decimal is lost:

        set n 10
        set x [int2float $n]; # like fromstr 10.0
        puts [tostr $x]; # prints "10."
        set x [int2float $n 3]; # like fromstr 10.000
        puts [tostr $x]; # prints "10.00"

# <a name='section3'></a>ARITHMETICS

  - <a name='8'></a>__add__ *x* *y*

  - <a name='9'></a>__sub__ *x* *y*

  - <a name='10'></a>__mul__ *x* *y*

    Return the sum, difference and product of *x* by *y*\. *x* \- may be
    either a BigFloat or an integer *y* \- may be either a BigFloat or an
    integer When both are integers, these commands behave like __expr__\.

  - <a name='11'></a>__div__ *x* *y*

  - <a name='12'></a>__mod__ *x* *y*

    Return the quotient and the rest of *x* divided by *y*\. Each argument
    \(*x* and *y*\) can be either a BigFloat or an integer, but you cannot
    divide an integer by a BigFloat Divide by zero throws an error\.

  - <a name='13'></a>__abs__ *x*

    Returns the absolute value of *x*

  - <a name='14'></a>__opp__ *x*

    Returns the opposite of *x*

  - <a name='15'></a>__pow__ *x* *n*

    Returns *x* taken to the *n*th power\. It only works if *n* is an
    integer\. *x* might be a BigFloat or an integer\.

# <a name='section4'></a>COMPARISONS

  - <a name='16'></a>__iszero__ *x*

    Returns 1 if *x* is :

      * a BigFloat close enough to zero to raise "divide by zero"\.

      * the integer 0\.

    See here how numbers that are close to zero are converted to strings:

        tostr [fromstr 0.001] ; # -> 0.e-2
        tostr [fromstr 0.000000] ; # -> 0.e-5
        tostr [fromstr -0.000001] ; # -> 0.e-5
        tostr [fromstr 0.0] ; # -> 0.
        tostr [fromstr 0.002] ; # -> 0.e-2

        set a [fromstr 0.002] ; # uncertainty interval : 0.001, 0.003
        tostr  $a ; # 0.e-2
        iszero $a ; # false

        set a [fromstr 0.001] ; # uncertainty interval : 0.000, 0.002
        tostr  $a ; # 0.e-2
        iszero $a ; # true

  - <a name='17'></a>__[equal](\.\./\.\./\.\./\.\./index\.md\#equal)__ *x* *y*

    Returns 1 if *x* and *y* are equal, 0 elsewhere\.

  - <a name='18'></a>__compare__ *x* *y*

    Returns 0 if both BigFloat arguments are equal, 1 if *x* is greater than
    *y*, and \-1 if *x* is lower than *y*\. You would not be able to compare
    an integer to a BigFloat : the operands should be both BigFloats, or both
    integers\.

# <a name='section5'></a>ANALYSIS

  - <a name='19'></a>__sqrt__ *x*

  - <a name='20'></a>__[log](\.\./log/log\.md)__ *x*

  - <a name='21'></a>__exp__ *x*

  - <a name='22'></a>__cos__ *x*

  - <a name='23'></a>__sin__ *x*

  - <a name='24'></a>__tan__ *x*

  - <a name='25'></a>__cotan__ *x*

  - <a name='26'></a>__acos__ *x*

  - <a name='27'></a>__asin__ *x*

  - <a name='28'></a>__atan__ *x*

  - <a name='29'></a>__cosh__ *x*

  - <a name='30'></a>__sinh__ *x*

  - <a name='31'></a>__tanh__ *x*

    The above functions return, respectively, the following : square root,
    logarithm, exponential, cosine, sine, tangent, cotangent, arc cosine, arc
    sine, arc tangent, hyperbolic cosine, hyperbolic sine, hyperbolic tangent,
    of a BigFloat named *x*\.

  - <a name='32'></a>__[pi](\.\./\.\./\.\./\.\./index\.md\#pi)__ *n*

    Returns a BigFloat representing the Pi constant with *n* digits after the
    dot\. *n* is a positive integer\.

  - <a name='33'></a>__rad2deg__ *radians*

  - <a name='34'></a>__deg2rad__ *degrees*

    *radians* \- angle expressed in radians \(BigFloat\)

    *degrees* \- angle expressed in degrees \(BigFloat\)

    Convert an angle from radians to degrees, and *vice versa*\.

# <a name='section6'></a>ROUNDING

  - <a name='35'></a>__round__ *x*

  - <a name='36'></a>__ceil__ *x*

  - <a name='37'></a>__floor__ *x*

    The above functions return the *x* BigFloat, rounded like with the same
    mathematical function in *expr*, and returns it as an integer\.

# <a name='section7'></a>PRECISION

How do conversions work with precision ?

  - When a BigFloat is converted from string, the internal representation holds
    its uncertainty as 1 at the level of the last digit\.

  - During computations, the uncertainty of each result is internally computed
    the closest to the reality, thus saving the memory used\.

  - When converting back to string, the digits that are printed are not subject
    to uncertainty\. However, some rounding is done, as not doing so causes
    severe problems\.

Uncertainties are kept in the internal representation of the number ; it is
recommended to use __tostr__ only for outputting data \(on the screen or in a
file\), and NEVER call __fromstr__ with the result of __tostr__\. It is
better to always keep operands in their internal representation\. Due to the
internals of this library, the uncertainty interval may be slightly wider than
expected, but this should not cause false digits\.

Now you may ask this question : What precision am I going to get after calling
add, sub, mul or div? First you set a number from the string representation and,
by the way, its uncertainty is set:

    set a [fromstr 1.230]
    # $a belongs to [1.229, 1.231]
    set a [fromstr 1.000]
    # $a belongs to [0.999, 1.001]
    # $a has a relative uncertainty of 0.1% : 0.001(the uncertainty)/1.000(the medium value)

The uncertainty of the sum, or the difference, of two numbers, is the sum of
their respective uncertainties\.

    set a [fromstr 1.230]
    set b [fromstr 2.340]
    set sum [add $a $b]]
    # the result is : [3.568, 3.572] (the last digit is known with an uncertainty of 2)
    tostr $sum ; # 3.57

But when, for example, we add or substract an integer to a BigFloat, the
relative uncertainty of the result is unchanged\. So it is desirable not to
convert integers to BigFloats:

    set a [fromstr 0.999999999]
    # now something dangerous
    set b [fromstr 2.000]
    # the result has only 3 digits
    tostr [add $a $b]

    # how to keep precision at its maximum
    puts [tostr [add $a 2]]

For multiplication and division, the relative uncertainties of the product or
the quotient, is the sum of the relative uncertainties of the operands\. Take
care of division by zero : check each divider with __iszero__\.

    set num [fromstr 4.00]
    set denom [fromstr 0.01]

    puts [iszero $denom];# true
    set quotient [div $num $denom];# error : divide by zero

    # opposites of our operands
    puts [compare $num [opp $num]]; # 1
    puts [compare $denom [opp $denom]]; # 0 !!!
    # No suprise ! 0 and its opposite are the same...

Effects of the precision of a number considered equal to zero to the cos
function:

    puts [tostr [cos [fromstr 0. 10]]]; # -> 1.000000000
    puts [tostr [cos [fromstr 0. 5]]]; # -> 1.0000
    puts [tostr [cos [fromstr 0e-10]]]; # -> 1.000000000
    puts [tostr [cos [fromstr 1e-10]]]; # -> 1.000000000

BigFloats with different internal representations may be converted to the same
string\.

For most analysis functions \(cosine, square root, logarithm, etc\.\), determining
the precision of the result is difficult\. It seems however that in many cases,
the loss of precision in the result is of one or two digits\. There are some
exceptions : for example,

    tostr [exp [fromstr 100.0 10]]
    # returns : 2.688117142e+43 which has only 10 digits of precision, although the entry
    # has 14 digits of precision.

# <a name='section8'></a>WHAT ABOUT TCL 8\.4 ?

If your setup do not provide Tcl 8\.5 but supports 8\.4, the package can still be
loaded, switching back to *math::bigfloat* 1\.2\. Indeed, an important function
introduced in Tcl 8\.5 is required \- the ability to handle bignums, that we can
do with __expr__\. Before 8\.5, this ability was provided by several packages,
including the pure\-Tcl *math::bignum* package provided by *tcllib*\. In this
case, all you need to know, is that arguments to the commands explained here,
are expected to be in their internal representation\. So even with integers, you
will need to call __fromstr__ and __tostr__ in order to convert them
between string and internal representations\.

    #
    # with Tcl 8.5
    # ============
    set a [pi 20]
    # round returns an integer and 'everything is a string' applies to integers
    # whatever big they are
    puts [round [mul $a 10000000000]]
    #
    # the same with Tcl 8.4
    # =====================
    set a [pi 20]
    # bignums (arbitrary length integers) need a conversion hook
    set b [fromstr 10000000000]
    # round returns a bignum:
    # before printing it, we need to convert it with 'tostr'
    puts [tostr [round [mul $a $b]]]

# <a name='section9'></a>NAMESPACES AND OTHER PACKAGES

We have not yet discussed about namespaces because we assumed that you had
imported public commands into the global namespace, like this:

    namespace import ::math::bigfloat::*

If you matter much about avoiding names conflicts, I considere it should be
resolved by the following :

    package require math::bigfloat
    # beware: namespace ensembles are not available in Tcl 8.4
    namespace eval ::math::bigfloat {namespace ensemble create -command ::bigfloat}
    # from now, the bigfloat command takes as subcommands all original math::bigfloat::* commands
    set a [bigfloat sub [bigfloat fromstr 2.000] [bigfloat fromstr 0.530]]
    puts [bigfloat tostr $a]

# <a name='section10'></a>EXAMPLES

Guess what happens when you are doing some astronomy\. Here is an example :

    # convert acurrate angles with a millisecond-rated accuracy
    proc degree-angle {degrees minutes seconds milliseconds} {
        set result 0
        set div 1
        foreach factor {1 1000 60 60} var [list $milliseconds $seconds $minutes $degrees] {
            # we convert each entry var into milliseconds
            set div [expr {$div*$factor}]
            incr result [expr {$var*$div}]
        }
        return [div [int2float $result] $div]
    }
    # load the package
    package require math::bigfloat
    namespace import ::math::bigfloat::*
    # work with angles : a standard formula for navigation (taking bearings)
    set angle1 [deg2rad [degree-angle 20 30 40   0]]
    set angle2 [deg2rad [degree-angle 21  0 50 500]]
    set opposite3 [deg2rad [degree-angle 51  0 50 500]]
    set sinProduct [mul [sin $angle1] [sin $angle2]]
    set cosProduct [mul [cos $angle1] [cos $angle2]]
    set angle3 [asin [add [mul $sinProduct [cos $opposite3]] $cosProduct]]
    puts "angle3 : [tostr [rad2deg $angle3]]"

# <a name='section11'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: bignum :: float*
of the [Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also
report any ideas for enhancements you may have for either package and/or
documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[computations](\.\./\.\./\.\./\.\./index\.md\#computations),
[floating\-point](\.\./\.\./\.\./\.\./index\.md\#floating\_point),
[interval](\.\./\.\./\.\./\.\./index\.md\#interval),
[math](\.\./\.\./\.\./\.\./index\.md\#math),
[multiprecision](\.\./\.\./\.\./\.\./index\.md\#multiprecision),
[tcl](\.\./\.\./\.\./\.\./index\.md\#tcl)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004\-2008, by Stephane Arnold <stephanearnold at yahoo dot fr>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/bignum.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332

[//000000001]: # (math::bignum \- Tcl Math Library)
[//000000002]: # (Generated from file 'bignum\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Salvatore Sanfilippo <antirez at invece dot org>)
[//000000004]: # (Copyright &copy; 2004 Arjen Markus <arjenmarkus at users dot sourceforge dot net>)
[//000000005]: # (math::bignum\(n\) 3\.1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::bignum \- Arbitrary precision integer numbers

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLES](#section2)

  - [API](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.4?  
package require math::bignum ?3\.1?  

[__::math::bignum::fromstr__ *string* ?*radix*?](#1)  
[__::math::bignum::tostr__ *bignum* ?*radix*?](#2)  
[__::math::bignum::sign__ *bignum*](#3)  
[__::math::bignum::abs__ *bignum*](#4)  
[__::math::bignum::cmp__ *a* *b*](#5)  
[__::math::bignum::iszero__ *bignum*](#6)  
[__::math::bignum::lt__ *a* *b*](#7)  
[__::math::bignum::le__ *a* *b*](#8)  
[__::math::bignum::gt__ *a* *b*](#9)  
[__::math::bignum::ge__ *a* *b*](#10)  
[__::math::bignum::eq__ *a* *b*](#11)  
[__::math::bignum::ne__ *a* *b*](#12)  
[__::math::bignum::isodd__ *bignum*](#13)  
[__::math::bignum::iseven__ *bignum*](#14)  
[__::math::bignum::add__ *a* *b*](#15)  
[__::math::bignum::sub__ *a* *b*](#16)  
[__::math::bignum::mul__ *a* *b*](#17)  
[__::math::bignum::divqr__ *a* *b*](#18)  
[__::math::bignum::div__ *a* *b*](#19)  
[__::math::bignum::rem__ *a* *b*](#20)  
[__::math::bignum::mod__ *n* *m*](#21)  
[__::math::bignum::pow__ *base* *exp*](#22)  
[__::math::bignum::powm__ *base* *exp* *m*](#23)  
[__::math::bignum::sqrt__ *bignum*](#24)  
[__::math::bignum::rand__ *bits*](#25)  
[__::math::bignum::lshift__ *bignum* *bits*](#26)  
[__::math::bignum::rshift__ *bignum* *bits*](#27)  
[__::math::bignum::bitand__ *a* *b*](#28)  
[__::math::bignum::bitor__ *a* *b*](#29)  
[__::math::bignum::bitxor__ *a* *b*](#30)  
[__::math::bignum::setbit__ *bignumVar* *bit*](#31)  
[__::math::bignum::clearbit__ *bignumVar* *bit*](#32)  
[__::math::bignum::testbit__ *bignum* *bit*](#33)  
[__::math::bignum::bits__ *bignum*](#34)  

# <a name='description'></a>DESCRIPTION

The bignum package provides arbitrary precision integer math \(also known as "big
numbers"\) capabilities to the Tcl language\. Big numbers are internally
represented at Tcl lists: this package provides a set of procedures operating
against the internal representation in order to:

  - perform math operations

  - convert bignums from the internal representation to a string in the desired
    radix and vice versa\.

But the two constants "0" and "1" are automatically converted to the internal
representation, in order to easily compare a number to zero, or increment a big
number\.

The bignum interface is opaque, so operations on bignums that are not returned
by procedures in this package \(but created by hand\) may lead to unspecified
behaviours\. It's safe to treat bignums as pure values, so there is no need to
free a bignum, or to duplicate it via a special operation\.

# <a name='section2'></a>EXAMPLES

This section shows some simple example\. This library being just a way to perform
math operations, examples may be the simplest way to learn how to work with it\.
Consult the API section of this man page for information about individual
procedures\.

    package require math::bignum

    # Multiplication of two bignums
    set a [::math::bignum::fromstr 88888881111111]
    set b [::math::bignum::fromstr 22222220000000]
    set c [::math::bignum::mul $a $b]
    puts [::math::bignum::tostr $c] ; # => will output 1975308271604953086420000000
    set c [::math::bignum::sqrt $c]
    puts [::math::bignum::tostr $c] ; # => will output 44444440277777

    # From/To string conversion in different radix
    set a [::math::bignum::fromstr 1100010101010111001001111010111 2]
    puts [::math::bignum::tostr $a 16] ; # => will output 62ab93d7

    # Factorial example
    proc fact n {
        # fromstr is not needed for 0 and 1
        set z 1
        for {set i 2} {$i <= $n} {incr i} {
            set z [::math::bignum::mul $z [::math::bignum::fromstr $i]]
        }
        return $z
    }

    puts [::math::bignum::tostr [fact 100]]

# <a name='section3'></a>API

  - <a name='1'></a>__::math::bignum::fromstr__ *string* ?*radix*?

    Convert *string* into a bignum\. If *radix* is omitted or zero, the
    string is interpreted in hex if prefixed with *0x*, in octal if prefixed
    with *ox*, in binary if it's pefixed with *bx*, as a number in radix 10
    otherwise\. If instead the *radix* argument is specified in the range 2\-36,
    the *string* is interpreted in the given radix\. Please note that this
    conversion is not needed for two constants : *0* and *1*\. \(see the
    example\)

  - <a name='2'></a>__::math::bignum::tostr__ *bignum* ?*radix*?

    Convert *bignum* into a string representing the number in the specified
    radix\. If *radix* is omitted, the default is 10\.

  - <a name='3'></a>__::math::bignum::sign__ *bignum*

    Return the sign of the bignum\. The procedure returns 0 if the number is
    positive, 1 if it's negative\.

  - <a name='4'></a>__::math::bignum::abs__ *bignum*

    Return the absolute value of the bignum\.

  - <a name='5'></a>__::math::bignum::cmp__ *a* *b*

    Compare the two bignums a and b, returning *0* if *a == b*, *1* if *a
    > b*, and *\-1* if *a < b*\.

  - <a name='6'></a>__::math::bignum::iszero__ *bignum*

    Return true if *bignum* value is zero, otherwise false is returned\.

  - <a name='7'></a>__::math::bignum::lt__ *a* *b*

    Return true if *a < b*, otherwise false is returned\.

  - <a name='8'></a>__::math::bignum::le__ *a* *b*

    Return true if *a <= b*, otherwise false is returned\.

  - <a name='9'></a>__::math::bignum::gt__ *a* *b*

    Return true if *a > b*, otherwise false is returned\.

  - <a name='10'></a>__::math::bignum::ge__ *a* *b*

    Return true if *a >= b*, otherwise false is returned\.

  - <a name='11'></a>__::math::bignum::eq__ *a* *b*

    Return true if *a == b*, otherwise false is returned\.

  - <a name='12'></a>__::math::bignum::ne__ *a* *b*

    Return true if *a \!= b*, otherwise false is returned\.

  - <a name='13'></a>__::math::bignum::isodd__ *bignum*

    Return true if *bignum* is odd\.

  - <a name='14'></a>__::math::bignum::iseven__ *bignum*

    Return true if *bignum* is even\.

  - <a name='15'></a>__::math::bignum::add__ *a* *b*

    Return the sum of the two bignums *a* and *b*\.

  - <a name='16'></a>__::math::bignum::sub__ *a* *b*

    Return the difference of the two bignums *a* and *b*\.

  - <a name='17'></a>__::math::bignum::mul__ *a* *b*

    Return the product of the two bignums *a* and *b*\. The implementation
    uses Karatsuba multiplication if both the numbers are bigger than a given
    threshold, otherwise the direct algorith is used\.

  - <a name='18'></a>__::math::bignum::divqr__ *a* *b*

    Return a two\-elements list containing as first element the quotient of the
    division between the two bignums *a* and *b*, and the remainder of the
    division as second element\.

  - <a name='19'></a>__::math::bignum::div__ *a* *b*

    Return the quotient of the division between the two bignums *a* and *b*\.

  - <a name='20'></a>__::math::bignum::rem__ *a* *b*

    Return the remainder of the division between the two bignums *a* and
    *b*\.

  - <a name='21'></a>__::math::bignum::mod__ *n* *m*

    Return *n* modulo *m*\. This operation is called modular reduction\.

  - <a name='22'></a>__::math::bignum::pow__ *base* *exp*

    Return *base* raised to the exponent *exp*\.

  - <a name='23'></a>__::math::bignum::powm__ *base* *exp* *m*

    Return *base* raised to the exponent *exp*, modulo *m*\. This function
    is often used in the field of cryptography\.

  - <a name='24'></a>__::math::bignum::sqrt__ *bignum*

    Return the integer part of the square root of *bignum*

  - <a name='25'></a>__::math::bignum::rand__ *bits*

    Return a random number of at most *bits* bits\. The returned number is
    internally generated using Tcl's *expr rand\(\)* function and is not
    suitable where an unguessable and cryptographically secure random number is
    needed\.

  - <a name='26'></a>__::math::bignum::lshift__ *bignum* *bits*

    Return the result of left shifting *bignum*'s binary representation of
    *bits* positions on the left\. This is equivalent to multiplying by
    2^*bits* but much faster\.

  - <a name='27'></a>__::math::bignum::rshift__ *bignum* *bits*

    Return the result of right shifting *bignum*'s binary representation of
    *bits* positions on the right\. This is equivalent to dividing by
    *2^bits* but much faster\.

  - <a name='28'></a>__::math::bignum::bitand__ *a* *b*

    Return the result of doing a bitwise AND operation on a and b\. The operation
    is restricted to positive numbers, including zero\. When negative numbers are
    provided as arguments the result is undefined\.

  - <a name='29'></a>__::math::bignum::bitor__ *a* *b*

    Return the result of doing a bitwise OR operation on a and b\. The operation
    is restricted to positive numbers, including zero\. When negative numbers are
    provided as arguments the result is undefined\.

  - <a name='30'></a>__::math::bignum::bitxor__ *a* *b*

    Return the result of doing a bitwise XOR operation on a and b\. The operation
    is restricted to positive numbers, including zero\. When negative numbers are
    provided as arguments the result is undefined\.

  - <a name='31'></a>__::math::bignum::setbit__ *bignumVar* *bit*

    Set the bit at *bit* position to 1 in the bignum stored in the variable
    *bignumVar*\. Bit 0 is the least significant\.

  - <a name='32'></a>__::math::bignum::clearbit__ *bignumVar* *bit*

    Set the bit at *bit* position to 0 in the bignum stored in the variable
    *bignumVar*\. Bit 0 is the least significant\.

  - <a name='33'></a>__::math::bignum::testbit__ *bignum* *bit*

    Return true if the bit at the *bit* position of *bignum* is on,
    otherwise false is returned\. If *bit* is out of range, it is considered as
    set to zero\.

  - <a name='34'></a>__::math::bignum::bits__ *bignum*

    Return the number of bits needed to represent bignum in radix 2\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: bignum* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[bignums](\.\./\.\./\.\./\.\./index\.md\#bignums),
[math](\.\./\.\./\.\./\.\./index\.md\#math),
[multiprecision](\.\./\.\./\.\./\.\./index\.md\#multiprecision),
[tcl](\.\./\.\./\.\./\.\./index\.md\#tcl)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Salvatore Sanfilippo <antirez at invece dot org>  
Copyright &copy; 2004 Arjen Markus <arjenmarkus at users dot sourceforge dot net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/calculus.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518

[//000000001]: # (math::calculus \- Tcl Math Library)
[//000000002]: # (Generated from file 'calculus\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002,2003,2004 Arjen Markus)
[//000000004]: # (math::calculus\(n\) 0\.8\.2 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::calculus \- Integration and ordinary differential equations

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [EXAMPLES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require math::calculus 0\.8\.2  

[__::math::calculus::integral__ *begin* *end* *nosteps* *func*](#1)  
[__::math::calculus::integralExpr__ *begin* *end* *nosteps* *expression*](#2)  
[__::math::calculus::integral2D__ *xinterval* *yinterval* *func*](#3)  
[__::math::calculus::integral2D\_accurate__ *xinterval* *yinterval* *func*](#4)  
[__::math::calculus::integral3D__ *xinterval* *yinterval* *zinterval* *func*](#5)  
[__::math::calculus::integral3D\_accurate__ *xinterval* *yinterval* *zinterval* *func*](#6)  
[__::math::calculus::qk15__ *xstart* *xend* *func* *nosteps*](#7)  
[__::math::calculus::qk15\_detailed__ *xstart* *xend* *func* *nosteps*](#8)  
[__::math::calculus::eulerStep__ *t* *tstep* *xvec* *func*](#9)  
[__::math::calculus::heunStep__ *t* *tstep* *xvec* *func*](#10)  
[__::math::calculus::rungeKuttaStep__ *t* *tstep* *xvec* *func*](#11)  
[__::math::calculus::boundaryValueSecondOrder__ *coeff\_func* *force\_func* *leftbnd* *rightbnd* *nostep*](#12)  
[__::math::calculus::solveTriDiagonal__ *acoeff* *bcoeff* *ccoeff* *dvalue*](#13)  
[__::math::calculus::newtonRaphson__ *func* *deriv* *initval*](#14)  
[__::math::calculus::newtonRaphsonParameters__ *maxiter* *tolerance*](#15)  
[__::math::calculus::regula\_falsi__ *f* *xb* *xe* *eps*](#16)  

# <a name='description'></a>DESCRIPTION

This package implements several simple mathematical algorithms:

  - The integration of a function over an interval

  - The numerical integration of a system of ordinary differential equations\.

  - Estimating the root\(s\) of an equation of one variable\.

The package is fully implemented in Tcl\. No particular attention has been paid
to the accuracy of the calculations\. Instead, well\-known algorithms have been
used in a straightforward manner\.

This document describes the procedures and explains their usage\.

# <a name='section2'></a>PROCEDURES

This package defines the following public procedures:

  - <a name='1'></a>__::math::calculus::integral__ *begin* *end* *nosteps* *func*

    Determine the integral of the given function using the Simpson rule\. The
    interval for the integration is \[*begin*, *end*\]\. The remaining
    arguments are:

      * *nosteps*

        Number of steps in which the interval is divided\.

      * *func*

        Function to be integrated\. It should take one single argument\.

  - <a name='2'></a>__::math::calculus::integralExpr__ *begin* *end* *nosteps* *expression*

    Similar to the previous proc, this one determines the integral of the given
    *expression* using the Simpson rule\. The interval for the integration is
    \[*begin*, *end*\]\. The remaining arguments are:

      * *nosteps*

        Number of steps in which the interval is divided\.

      * *expression*

        Expression to be integrated\. It should use the variable "x" as the only
        variable \(the "integrate"\)

  - <a name='3'></a>__::math::calculus::integral2D__ *xinterval* *yinterval* *func*

  - <a name='4'></a>__::math::calculus::integral2D\_accurate__ *xinterval* *yinterval* *func*

    The commands __integral2D__ and __integral2D\_accurate__ calculate
    the integral of a function of two variables over the rectangle given by the
    first two arguments, each a list of three items, the start and stop interval
    for the variable and the number of steps\.

    The command __integral2D__ evaluates the function at the centre of each
    rectangle, whereas the command __integral2D\_accurate__ uses a four\-point
    quadrature formula\. This results in an exact integration of polynomials of
    third degree or less\.

    The function must take two arguments and return the function value\.

  - <a name='5'></a>__::math::calculus::integral3D__ *xinterval* *yinterval* *zinterval* *func*

  - <a name='6'></a>__::math::calculus::integral3D\_accurate__ *xinterval* *yinterval* *zinterval* *func*

    The commands __integral3D__ and __integral3D\_accurate__ are the
    three\-dimensional equivalent of __integral2D__ and
    __integral3D\_accurate__\. The function *func* takes three arguments and
    is integrated over the block in 3D space given by three intervals\.

  - <a name='7'></a>__::math::calculus::qk15__ *xstart* *xend* *func* *nosteps*

    Determine the integral of the given function using the Gauss\-Kronrod 15
    points quadrature rule\. The returned value is the estimate of the integral
    over the interval \[*xstart*, *xend*\]\. The remaining arguments are:

      * *func*

        Function to be integrated\. It should take one single argument\.

      * ?nosteps?

        Number of steps in which the interval is divided\. Defaults to 1\.

  - <a name='8'></a>__::math::calculus::qk15\_detailed__ *xstart* *xend* *func* *nosteps*

    Determine the integral of the given function using the Gauss\-Kronrod 15
    points quadrature rule\. The interval for the integration is \[*xstart*,
    *xend*\]\. The procedure returns a list of four values:

      * The estimate of the integral over the specified interval \(I\)\.

      * An estimate of the absolute error in I\.

      * The estimate of the integral of the absolute value of the function over
        the interval\.

      * The estimate of the integral of the absolute value of the function minus
        its mean over the interval\.

    The remaining arguments are:

      * *func*

        Function to be integrated\. It should take one single argument\.

      * ?nosteps?

        Number of steps in which the interval is divided\. Defaults to 1\.

  - <a name='9'></a>__::math::calculus::eulerStep__ *t* *tstep* *xvec* *func*

    Set a single step in the numerical integration of a system of differential
    equations\. The method used is Euler's\.

      * *t*

        Value of the independent variable \(typically time\) at the beginning of
        the step\.

      * *tstep*

        Step size for the independent variable\.

      * *xvec*

        List \(vector\) of dependent values

      * *func*

        Function of t and the dependent values, returning a list of the
        derivatives of the dependent values\. \(The lengths of xvec and the return
        value of "func" must match\)\.

  - <a name='10'></a>__::math::calculus::heunStep__ *t* *tstep* *xvec* *func*

    Set a single step in the numerical integration of a system of differential
    equations\. The method used is Heun's\.

      * *t*

        Value of the independent variable \(typically time\) at the beginning of
        the step\.

      * *tstep*

        Step size for the independent variable\.

      * *xvec*

        List \(vector\) of dependent values

      * *func*

        Function of t and the dependent values, returning a list of the
        derivatives of the dependent values\. \(The lengths of xvec and the return
        value of "func" must match\)\.

  - <a name='11'></a>__::math::calculus::rungeKuttaStep__ *t* *tstep* *xvec* *func*

    Set a single step in the numerical integration of a system of differential
    equations\. The method used is Runge\-Kutta 4th order\.

      * *t*

        Value of the independent variable \(typically time\) at the beginning of
        the step\.

      * *tstep*

        Step size for the independent variable\.

      * *xvec*

        List \(vector\) of dependent values

      * *func*

        Function of t and the dependent values, returning a list of the
        derivatives of the dependent values\. \(The lengths of xvec and the return
        value of "func" must match\)\.

  - <a name='12'></a>__::math::calculus::boundaryValueSecondOrder__ *coeff\_func* *force\_func* *leftbnd* *rightbnd* *nostep*

    Solve a second order linear differential equation with boundary values at
    two sides\. The equation has to be of the form \(the "conservative" form\):

        d      dy     d
        -- A(x)--  +  -- B(x)y + C(x)y  =  D(x)
        dx     dx     dx

    Ordinarily, such an equation would be written as:

            d2y        dy
        a(x)---  + b(x)-- + c(x) y  =  D(x)
            dx2        dx

    The first form is easier to discretise \(by integrating over a finite volume\)
    than the second form\. The relation between the two forms is fairly
    straightforward:

        A(x)  =  a(x)
        B(x)  =  b(x) - a'(x)
        C(x)  =  c(x) - B'(x)  =  c(x) - b'(x) + a''(x)

    Because of the differentiation, however, it is much easier to ask the user
    to provide the functions A, B and C directly\.

      * *coeff\_func*

        Procedure returning the three coefficients \(A, B, C\) of the equation,
        taking as its one argument the x\-coordinate\.

      * *force\_func*

        Procedure returning the right\-hand side \(D\) as a function of the
        x\-coordinate\.

      * *leftbnd*

        A list of two values: the x\-coordinate of the left boundary and the
        value at that boundary\.

      * *rightbnd*

        A list of two values: the x\-coordinate of the right boundary and the
        value at that boundary\.

      * *nostep*

        Number of steps by which to discretise the interval\. The procedure
        returns a list of x\-coordinates and the approximated values of the
        solution\.

  - <a name='13'></a>__::math::calculus::solveTriDiagonal__ *acoeff* *bcoeff* *ccoeff* *dvalue*

    Solve a system of linear equations Ax = b with A a tridiagonal matrix\.
    Returns the solution as a list\.

      * *acoeff*

        List of values on the lower diagonal

      * *bcoeff*

        List of values on the main diagonal

      * *ccoeff*

        List of values on the upper diagonal

      * *dvalue*

        List of values on the righthand\-side

  - <a name='14'></a>__::math::calculus::newtonRaphson__ *func* *deriv* *initval*

    Determine the root of an equation given by

        func(x) = 0

    using the method of Newton\-Raphson\. The procedure takes the following
    arguments:

      * *func*

        Procedure that returns the value the function at x

      * *deriv*

        Procedure that returns the derivative of the function at x

      * *initval*

        Initial value for x

  - <a name='15'></a>__::math::calculus::newtonRaphsonParameters__ *maxiter* *tolerance*

    Set the numerical parameters for the Newton\-Raphson method:

      * *maxiter*

        Maximum number of iteration steps \(defaults to 20\)

      * *tolerance*

        Relative precision \(defaults to 0\.001\)

  - <a name='16'></a>__::math::calculus::regula\_falsi__ *f* *xb* *xe* *eps*

    Return an estimate of the zero or one of the zeros of the function contained
    in the interval \[xb,xe\]\. The error in this estimate is of the order of
    eps\*abs\(xe\-xb\), the actual error may be slightly larger\.

    The method used is the so\-called *regula falsi* or *false position*
    method\. It is a straightforward implementation\. The method is robust, but
    requires that the interval brackets a zero or at least an uneven number of
    zeros, so that the value of the function at the start has a different sign
    than the value at the end\.

    In contrast to Newton\-Raphson there is no need for the computation of the
    function's derivative\.

      * command *f*

        Name of the command that evaluates the function for which the zero is to
        be returned

      * float *xb*

        Start of the interval in which the zero is supposed to lie

      * float *xe*

        End of the interval

      * float *eps*

        Relative allowed error \(defaults to 1\.0e\-4\)

*Notes:*

Several of the above procedures take the *names* of procedures as arguments\.
To avoid problems with the *visibility* of these procedures, the
fully\-qualified name of these procedures is determined inside the calculus
routines\. For the user this has only one consequence: the named procedure must
be visible in the calling procedure\. For instance:

    namespace eval ::mySpace {
       namespace export calcfunc
       proc calcfunc { x } { return $x }
    }
    #
    # Use a fully-qualified name
    #
    namespace eval ::myCalc {
       proc detIntegral { begin end } {
          return [integral $begin $end 100 ::mySpace::calcfunc]
       }
    }
    #
    # Import the name
    #
    namespace eval ::myCalc {
       namespace import ::mySpace::calcfunc
       proc detIntegral { begin end } {
          return [integral $begin $end 100 calcfunc]
       }
    }

Enhancements for the second\-order boundary value problem:

  - Other types of boundary conditions \(zero gradient, zero flux\)

  - Other schematisation of the first\-order term \(now central differences are
    used, but upstream differences might be useful too\)\.

# <a name='section3'></a>EXAMPLES

Let us take a few simple examples:

Integrate x over the interval \[0,100\] \(20 steps\):

    proc linear_func { x } { return $x }
    puts "Integral: [::math::calculus::integral 0 100 20 linear_func]"

For simple functions, the alternative could be:

    puts "Integral: [::math::calculus::integralExpr 0 100 20 {$x}]"

Do not forget the braces\!

The differential equation for a dampened oscillator:

    x'' + rx' + wx = 0

can be split into a system of first\-order equations:

    x' = y
    y' = -ry - wx

Then this system can be solved with code like this:

    proc dampened_oscillator { t xvec } {
       set x  [lindex $xvec 0]
       set x1 [lindex $xvec 1]
       return [list $x1 [expr {-$x1-$x}]]
    }

    set xvec   { 1.0 0.0 }
    set t      0.0
    set tstep  0.1
    for { set i 0 } { $i < 20 } { incr i } {
       set result [::math::calculus::eulerStep $t $tstep $xvec dampened_oscillator]
       puts "Result ($t): $result"
       set t      [expr {$t+$tstep}]
       set xvec   $result
    }

Suppose we have the boundary value problem:

    Dy'' + ky = 0
    x = 0: y = 1
    x = L: y = 0

This boundary value problem could originate from the diffusion of a decaying
substance\.

It can be solved with the following fragment:

    proc coeffs { x } { return [list $::Diff 0.0 $::decay] }
    proc force  { x } { return 0.0 }

    set Diff   1.0e-2
    set decay  0.0001
    set length 100.0

    set y [::math::calculus::boundaryValueSecondOrder \
       coeffs force {0.0 1.0} [list $length 0.0] 100]

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: calculus* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

romberg

# <a name='keywords'></a>KEYWORDS

[calculus](\.\./\.\./\.\./\.\./index\.md\#calculus), [differential
equations](\.\./\.\./\.\./\.\./index\.md\#differential\_equations),
[integration](\.\./\.\./\.\./\.\./index\.md\#integration),
[math](\.\./\.\./\.\./\.\./index\.md\#math), [roots](\.\./\.\./\.\./\.\./index\.md\#roots)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002,2003,2004 Arjen Markus
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/changepoint.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191

[//000000001]: # (math::changepoint \- Tcl Math Library)
[//000000002]: # (Generated from file 'changepoint\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2020 by Arjen Markus)
[//000000004]: # (math::changepoint\(n\) 0\.1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::changepoint \- Change point detection methods

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.5?  
package require math::statistics  
package require math::changepoint ?0\.1?  

[__::math::changepoint::cusum\-detect__ *data* ?args?](#1)  
[__::math::changepoint::cusum\-online__ ?args?](#2)  
[__$cusumObj__ examine *value*](#3)  
[__$cusumObj__ reset](#4)  
[__::math::changepoint::binary\-segmentation__ *data* ?args?](#5)  

# <a name='description'></a>DESCRIPTION

The __math::changepoint__ package implements a number of well\-known methods
to determine if a series of data contains a shift in the mean or not\. Note that
these methods only indicate if a shift in the mean is probably\. Due to the
stochastic nature of the data that will be analysed, false positives are
possible\. The CUSUM method is implemented in both an "offline" and an "online"
version, so that it can be used either for a complete data series or for
detecting changes in data that come in one by one\. The implementation has been
based on these websites mostly:

  - [https://www\.itl\.nist\.gov/div898/handbook/pmc/section3/pmc323\.htm](https://www\.itl\.nist\.gov/div898/handbook/pmc/section3/pmc323\.htm)

  - [https://en\.wikipedia\.org/wiki/CUSUM](https://en\.wikipedia\.org/wiki/CUSUM)

Basically, the deviation of the data from a given target value is accumulated
and when the total deviation becomes too large, a change point is reported\. A
second method, binary segmentation, is implemented only as an "offline" method,
as it needs to examine the data series as a whole\. In the variant contained here
the following ideas have been used:

  - The segments in which the data series may be separated shold not be too
    short, otherwise the ultimate result could be segments of only one data
    point long\. So a minimum length is used\.

  - To make the segmentation worthwhile there should be a minimum gain in
    reducing the cost function \(the sum of the squared deviations from the mean
    for each segment\)\.

This may not be in agreement with the descriptions of the method found in
various publications, but it is simple to understand and intuitive\. One
publication that provides more information on the method in general is
"Selective review of offline change point detection methods" by Truong et al\.
[https://arxiv\.org/abs/1801\.00718](https://arxiv\.org/abs/1801\.00718)\.

# <a name='section2'></a>PROCEDURES

The package defines the following public procedures:

  - <a name='1'></a>__::math::changepoint::cusum\-detect__ *data* ?args?

    Examine a given data series and return the location of the first change \(if
    any\)

      * double *data*

        Series of data to be examined

      * list *args*

        Optional list of key\-value pairs:

          + __\-target__ *value*

            The target \(or mean\) for the time series

          + __\-tolerance__ *value*

            The tolerated standard deviation

          + __\-kfactor__ *value*

            The factor by which to multiply the standard deviation \(defaults to
            0\.5, typically between 0\.5 and 1\.0\)

          + __\-hfactor__ *value*

            The factor determining the limits betweem which the "cusum"
            statistic is accepted \(typicaly 3\.0\-5\.0, default 4\.0\)

  - <a name='2'></a>__::math::changepoint::cusum\-online__ ?args?

    Class to examine data passed in against expected properties\. At least the
    keywords *\-target* and *\-tolerance* must be given\.

      * list *args*

        List of key\-value pairs:

          + __\-target__ *value*

            The target \(or mean\) for the time series

          + __\-tolerance__ *value*

            The tolerated standard deviation

          + __\-kfactor__ *value*

            The factor by which to multiply the standard deviation \(defaults to
            0\.5, typically between 0\.5 and 1\.0\)

          + __\-hfactor__ *value*

            The factor determining the limits betweem which the "cusum"
            statistic is accepted \(typicaly 3\.0\-5\.0, default 4\.0\)

  - <a name='3'></a>__$cusumObj__ examine *value*

    Pass a value to the *cusum\-online* object and examine it\. If, with this
    new value, the cumulative sum remains within the bounds, zero \(0\) is
    returned, otherwise one \(1\) is returned\.

      * double *value*

        The new value

  - <a name='4'></a>__$cusumObj__ reset

    Reset the cumulative sum, so that the examination can start afresh\.

  - <a name='5'></a>__::math::changepoint::binary\-segmentation__ *data* ?args?

    Apply the binary segmentation method recursively to find change points\.
    Returns a list of indices of potential change points

      * list *data*

        Data to be examined

      * list *args*

        Optional key\-value pairs:

          + __\-minlength__ *number*

            Minimum number of points in each segment \(default: 5\)

          + __\-threshold__ *value*

            Factor applied to the standard deviation functioning as a threshold
            for accepting the change in cost function as an improvement
            \(default: 1\.0\)

# <a name='keywords'></a>KEYWORDS

[control](\.\./\.\./\.\./\.\./index\.md\#control),
[statistics](\.\./\.\./\.\./\.\./index\.md\#statistics)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2020 by Arjen Markus
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/combinatorics.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350

[//000000001]: # (math::combinatorics \- Tcl Math Library)
[//000000002]: # (Generated from file 'combinatorics\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (math::combinatorics\(n\) 2\.0 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::combinatorics \- Combinatorial functions in the Tcl Math Library

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require math ?1\.2\.3?  
package require Tcl 8\.6  
package require math::combinatorics ?2\.0?  

[__::math::ln\_Gamma__ *z*](#1)  
[__::math::factorial__ *x*](#2)  
[__::math::choose__ *n k*](#3)  
[__::math::Beta__ *z w*](#4)  
[__::math::combinatorics::permutations__ *n*](#5)  
[__::math::combinatorics::variations__ *n* *k*](#6)  
[__::math::combinatorics::combinations__ *n* *k*](#7)  
[__::math::combinatorics::derangements__ *n*](#8)  
[__::math::combinatorics::catalan__ *n*](#9)  
[__::math::combinatorics::firstStirling__ *n* *m*](#10)  
[__::math::combinatorics::secondStirling__ *n* *m*](#11)  
[__::math::combinatorics::partitionP__ *n*](#12)  
[__::math::combinatorics::list\-permutations__ *n*](#13)  
[__::math::combinatorics::list\-variations__ *n* *k*](#14)  
[__::math::combinatorics::list\-combinations__ *n* *k*](#15)  
[__::math::combinatorics::list\-derangements__ *n*](#16)  
[__::math::combinatorics::list\-powerset__ *n*](#17)  
[__::math::combinatorics::permutationObj__ new/create NAME *n*](#18)  
[__$perm__ next](#19)  
[__$perm__ reset](#20)  
[__$perm__ setElements *elements*](#21)  
[__$perm__ setElements](#22)  
[__::math::combinatorics::combinationObj__ new/create NAME *n* *k*](#23)  
[__$combin__ next](#24)  
[__$combin__ reset](#25)  
[__$combin__ setElements *elements*](#26)  
[__$combin__ setElements](#27)  

# <a name='description'></a>DESCRIPTION

The __[math](math\.md)__ package contains implementations of several
functions useful in combinatorial problems\. The __math::combinatorics__
extends the collections based on features in Tcl 8\.6\. Note: the meaning of the
partitionP function, Catalan and Stirling numbers is explained on the
[MathWorld website](http://mathworld\.wolfram\.com)

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::math::ln\_Gamma__ *z*

    Returns the natural logarithm of the Gamma function for the argument *z*\.

    The Gamma function is defined as the improper integral from zero to positive
    infinity of

        t**(x-1)*exp(-t) dt

    The approximation used in the Tcl Math Library is from Lanczos, *ISIAM J\.
    Numerical Analysis, series B,* volume 1, p\. 86\. For "__x__ > 1", the
    absolute error of the result is claimed to be smaller than 5\.5\*10\*\*\-10 \-\-
    that is, the resulting value of Gamma when

        exp( ln_Gamma( x) )

    is computed is expected to be precise to better than nine significant
    figures\.

  - <a name='2'></a>__::math::factorial__ *x*

    Returns the factorial of the argument *x*\.

    For integer *x*, 0 <= *x* <= 12, an exact integer result is returned\.

    For integer *x*, 13 <= *x* <= 21, an exact floating\-point result is
    returned on machines with IEEE floating point\.

    For integer *x*, 22 <= *x* <= 170, the result is exact to 1 ULP\.

    For real *x*, *x* >= 0, the result is approximated by computing
    *Gamma\(x\+1\)* using the __::math::ln\_Gamma__ function, and the result
    is expected to be precise to better than nine significant figures\.

    It is an error to present *x* <= \-1 or *x* > 170, or a value of *x*
    that is not numeric\.

  - <a name='3'></a>__::math::choose__ *n k*

    Returns the binomial coefficient *C\(n, k\)*

        C(n,k) = n! / k! (n-k)!

    If both parameters are integers and the result fits in 32 bits, the result
    is rounded to an integer\.

    Integer results are exact up to at least *n* = 34\. Floating point results
    are precise to better than nine significant figures\.

  - <a name='4'></a>__::math::Beta__ *z w*

    Returns the Beta function of the parameters *z* and *w*\.

        Beta(z,w) = Beta(w,z) = Gamma(z) * Gamma(w) / Gamma(z+w)

    Results are returned as a floating point number precise to better than nine
    significant digits provided that *w* and *z* are both at least 1\.

  - <a name='5'></a>__::math::combinatorics::permutations__ *n*

    Return the number of permutations of n items\. The returned number is always
    an integer, it is not limited by the range of 32\-or 64\-bits integers using
    the arbitrary precision integers available in Tcl 8\.5 and later\.

      * int *n*

        The number of items to be permuted\.

  - <a name='6'></a>__::math::combinatorics::variations__ *n* *k*

    Return the number of variations k items selected from the total of n items\.
    The order of the items is taken into account\.

      * int *n*

        The number of items to be selected from\.

      * int *k*

        The number of items to be selected in each variation\.

  - <a name='7'></a>__::math::combinatorics::combinations__ *n* *k*

    Return the number of combinations of k items selected from the total of n
    items\. The order of the items is not important\.

      * int *n*

        The number of items to be selected from\.

      * int *k*

        The number of items to be selected in each combination\.

  - <a name='8'></a>__::math::combinatorics::derangements__ *n*

    Return the number of derangements of n items\. A derangement is a permutation
    where each item is displaced from the original position\.

      * int *n*

        The number of items to be rearranged\.

  - <a name='9'></a>__::math::combinatorics::catalan__ *n*

    Return the n'th Catalan number\. The number n is expected to be 1 or larger\.
    These numbers occur in various combinatorial problems\.

      * int *n*

        The index of the Catalan number

  - <a name='10'></a>__::math::combinatorics::firstStirling__ *n* *m*

    Calculate a Stirling number of the first kind \(signed version, m cycles in a
    permutation of n items\)

      * int *n*

        Number of items

      * int *m*

        Number of cycles

  - <a name='11'></a>__::math::combinatorics::secondStirling__ *n* *m*

    Calculate a Stirling number of the second kind \(m non\-empty subsets from n
    items\)

      * int *n*

        Number of items

      * int *m*

        Number of subsets

  - <a name='12'></a>__::math::combinatorics::partitionP__ *n*

    Calculate the number of ways an integer n can be written as the sum of
    positive integers\.

      * int *n*

        Number in question

  - <a name='13'></a>__::math::combinatorics::list\-permutations__ *n*

    Return the list of permutations of the numbers 0, \.\.\., n\-1\.

      * int *n*

        The number of items to be permuted\.

  - <a name='14'></a>__::math::combinatorics::list\-variations__ *n* *k*

    Return the list of variations of k numbers selected from the numbers 0, \.\.\.,
    n\-1\. The order of the items is taken into account\.

      * int *n*

        The number of items to be selected from\.

      * int *k*

        The number of items to be selected in each variation\.

  - <a name='15'></a>__::math::combinatorics::list\-combinations__ *n* *k*

    Return the list of combinations of k numbers selected from the numbers 0,
    \.\.\., n\-1\. The order of the items is ignored\.

      * int *n*

        The number of items to be selected from\.

      * int *k*

        The number of items to be selected in each combination\.

  - <a name='16'></a>__::math::combinatorics::list\-derangements__ *n*

    Return the list of derangements of the numbers 0, \.\.\., n\-1\.

      * int *n*

        The number of items to be rearranged\.

  - <a name='17'></a>__::math::combinatorics::list\-powerset__ *n*

    Return the list of all subsets of the numbers 0, \.\.\., n\-1\.

      * int *n*

        The number of items to be rearranged\.

  - <a name='18'></a>__::math::combinatorics::permutationObj__ new/create NAME *n*

    Create a TclOO object for returning permutations one by one\. If the last
    permutation has been reached an empty list is returned\.

      * int *n*

        The number of items to be rearranged\.

  - <a name='19'></a>__$perm__ next

    Return the next permutation of n objects\.

  - <a name='20'></a>__$perm__ reset

    Reset the object, so that the command *next* returns the complete list
    again\.

  - <a name='21'></a>__$perm__ setElements *elements*

    Register a list of items to be permuted, using the *nextElements* command\.

      * list *elements*

        The list of n items that will be permuted\.

  - <a name='22'></a>__$perm__ setElements

    Return the next permulation of the registered items\.

  - <a name='23'></a>__::math::combinatorics::combinationObj__ new/create NAME *n* *k*

    Create a TclOO object for returning combinations one by one\. If the last
    combination has been reached an empty list is returned\.

      * int *n*

        The number of items to be rearranged\.

  - <a name='24'></a>__$combin__ next

    Return the next combination of n objects\.

  - <a name='25'></a>__$combin__ reset

    Reset the object, so that the command *next* returns the complete list
    again\.

  - <a name='26'></a>__$combin__ setElements *elements*

    Register a list of items to be permuted, using the *nextElements* command\.

      * list *elements*

        The list of n items that will be permuted\.

  - <a name='27'></a>__$combin__ setElements

    Return the next combination of the registered items\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='category'></a>CATEGORY

Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/constants.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

[//000000001]: # (math::constants \- Tcl Math Library)
[//000000002]: # (Generated from file 'constants\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (math::constants\(n\) 1\.0\.2 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::constants \- Mathematical and numerical constants

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [Constants](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.3?  
package require math::constants ?1\.0\.2?  

[__::math::constants::constants__ *args*](#1)  
[__::math::constants::print\-constants__ *args*](#2)  

# <a name='description'></a>DESCRIPTION

This package defines some common mathematical and numerical constants\. By using
the package you get consistent values for numbers like pi and ln\(10\)\.

It defines two commands:

  - One for importing the constants

  - One for reporting which constants are defined and what values they actually
    have\.

The motivation for this package is that quite often, with \(mathematical\)
computations, you need a good approximation to, say, the ratio of degrees to
radians\. You can, of course, define this like:

    variable radtodeg [expr {180.0/(4.0*atan(1.0))}]

and use the variable radtodeg whenever you need the conversion\.

This has two drawbacks:

  - You need to remember the proper formula or value and that is error\-prone\.

  - Especially with the use of mathematical functions like *atan* you assume
    that they have been accurately implemented\. This is seldom or never the case
    and for each platform you can get subtle differences\.

Here is the way you can do it with the *math::constants* package:

    package require math::constants
    ::math::constants::constants radtodeg degtorad

which creates two variables, radtodeg and \(its reciprocal\) degtorad in the
calling namespace\.

Constants that have been defined \(their values are mostly taken from
mathematical tables with more precision than usually can be handled\) include:

  - basic constants like pi, e, gamma \(Euler's constant\)

  - derived values like ln\(10\) and sqrt\(2\)

  - purely numerical values such as 1/3 that are included for convenience and
    for the fact that certain seemingly trivial computations like:

    set value [expr {3.0*$onethird}]

    give *exactly* the value you expect \(if IEEE arithmetic is available\)\.

The full set of named constants is listed in section
[Constants](#section3)\.

# <a name='section2'></a>PROCEDURES

The package defines the following public procedures:

  - <a name='1'></a>__::math::constants::constants__ *args*

    Import the constants whose names are given as arguments

  - <a name='2'></a>__::math::constants::print\-constants__ *args*

    Print the constants whose names are given as arguments on the screen \(name,
    value and description\) or, if no arguments are given, print all defined
    constants\. This is mainly a convenience procedure\.

# <a name='section3'></a>Constants

  - __pi__

    Ratio of circle circumference to diameter

  - __e__

    Base for natural logarithm

  - __ln10__

    Natural logarithm of 10

  - __phi__

    Golden ratio

  - __gamma__

    Euler's constant

  - __sqrt2__

    Square root of 2

  - __thirdrt2__

    One\-third power of 2

  - __sqrt3__

    Square root of 3

  - __radtodeg__

    Conversion from radians to degrees

  - __degtorad__

    Conversion from degrees to radians

  - __onethird__

    One third \(0\.3333\.\.\.\.\)

  - __twothirds__

    Two thirds \(0\.6666\.\.\.\.\)

  - __onesixth__

    One sixth \(0\.1666\.\.\.\.\)

  - __huge__

    \(Approximately\) largest number

  - __tiny__

    \(Approximately\) smallest number not equal zero

  - __eps__

    Smallest number such that 1\+eps \!= 1

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: constants* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[constants](\.\./\.\./\.\./\.\./index\.md\#constants),
[degrees](\.\./\.\./\.\./\.\./index\.md\#degrees), [e](\.\./\.\./\.\./\.\./index\.md\#e),
[math](\.\./\.\./\.\./\.\./index\.md\#math), [pi](\.\./\.\./\.\./\.\./index\.md\#pi),
[radians](\.\./\.\./\.\./\.\./index\.md\#radians)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/decimal.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339

[//000000001]: # (math::decimal \- Tcl Decimal Arithmetic Library)
[//000000002]: # (Generated from file 'decimal\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Mark Alston <mark at beernut dot com>)
[//000000004]: # (math::decimal\(n\) 1\.0\.3 tcllib "Tcl Decimal Arithmetic Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::decimal \- General decimal arithmetic

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLES](#section2)

  - [API](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.5?  
package require math::decimal 1\.0\.3  

[__::math::decimal::fromstr__ *string*](#1)  
[__::math::decimal::tostr__ *decimal*](#2)  
[__::math::decimal::setVariable__ *variable* *setting*](#3)  
[__::math::decimal::add__ *a* *b*](#4)  
[__::math::decimal::\+__ *a* *b*](#5)  
[__::math::decimal::subtract__ *a* *b*](#6)  
[__::math::decimal::\-__ *a* *b*](#7)  
[__::math::decimal::multiply__ *a* *b*](#8)  
[__::math::decimal::\*__ *a* *b*](#9)  
[__::math::decimal::divide__ *a* *b*](#10)  
[__::math::decimal::/__ *a* *b*](#11)  
[__::math::decimal::divideint__ *a* *b*](#12)  
[__::math::decimal::remainder__ *a* *b*](#13)  
[__::math::decimal::abs__ *decimal*](#14)  
[__::math::decimal::compare__ *a* *b*](#15)  
[__::math::decimal::max__ *a* *b*](#16)  
[__::math::decimal::maxmag__ *a* *b*](#17)  
[__::math::decimal::min__ *a* *b*](#18)  
[__::math::decimal::minmag__ *a* *b*](#19)  
[__::math::decimal::plus__ *a*](#20)  
[__::math::decimal::minus__ *a*](#21)  
[__::math::decimal::copynegate__ *a*](#22)  
[__::math::decimal::copysign__ *a* *b*](#23)  
[__::math::decimal::is\-signed__ *decimal*](#24)  
[__::math::decimal::is\-zero__ *decimal*](#25)  
[__::math::decimal::is\-NaN__ *decimal*](#26)  
[__::math::decimal::is\-infinite__ *decimal*](#27)  
[__::math::decimal::is\-finite__ *decimal*](#28)  
[__::math::decimal::fma__ *a* *b* *c*](#29)  
[__::math::decimal::round\_half\_even__ *decimal* *digits*](#30)  
[__::math::decimal::round\_half\_up__ *decimal* *digits*](#31)  
[__::math::decimal::round\_half\_down__ *decimal* *digits*](#32)  
[__::math::decimal::round\_down__ *decimal* *digits*](#33)  
[__::math::decimal::round\_up__ *decimal* *digits*](#34)  
[__::math::decimal::round\_floor__ *decimal* *digits*](#35)  
[__::math::decimal::round\_ceiling__ *decimal* *digits*](#36)  
[__::math::decimal::round\_05up__ *decimal* *digits*](#37)  

# <a name='description'></a>DESCRIPTION

The decimal package provides decimal arithmetic support for both limited
precision floating point and arbitrary precision floating point\. Additionally,
integer arithmetic is supported\.

More information and the specifications on which this package depends can be
found on the general decimal arithmetic page at http://speleotrove\.com/decimal
This package provides for:

  - A new data type decimal which is represented as a list containing sign,
    mantissa and exponent\.

  - Arithmetic operations on those decimal numbers such as addition,
    subtraction, multiplication, etc\.\.\.

Numbers are converted to decimal format using the operation
::math::decimal::fromstr\.

Numbers are converted back to string format using the operation
::math::decimal::tostr\.

# <a name='section2'></a>EXAMPLES

This section shows some simple examples\. Since the purpose of this library is to
perform decimal math operations, examples may be the simplest way to learn how
to work with it and to see the difference between using this package and
sticking with expr\. Consult the API section of this man page for information
about individual procedures\.

    package require math::decimal

    # Various operations on two numbers.
    # We first convert them to decimal format.
    set a [::math::decimal::fromstr 8.2]
    set b [::math::decimal::fromstr .2]

    # Then we perform our operations. Here we add
    set c [::math::decimal::+ $a $b]

    # Finally we convert back to string format for presentation to the user.
    puts [::math::decimal::tostr $c] ; # => will output 8.4

    # Other examples
    #
    # Subtraction
    set c [::math::decimal::- $a $b]
    puts [::math::decimal::tostr $c] ; # => will output 8.0

    # Why bother using this instead of simply expr?
    puts [expr {8.2 + .2}] ; # => will output 8.399999999999999
    puts [expr {8.2 - .2}] ; # => will output 7.999999999999999
    # See http://speleotrove.com/decimal to learn more about why this happens.

# <a name='section3'></a>API

  - <a name='1'></a>__::math::decimal::fromstr__ *string*

    Convert *string* into a decimal\.

  - <a name='2'></a>__::math::decimal::tostr__ *decimal*

    Convert *decimal* into a string representing the number in base 10\.

  - <a name='3'></a>__::math::decimal::setVariable__ *variable* *setting*

    Sets the *variable* to *setting*\. Valid variables are:

      * *rounding* \- Method of rounding to use during rescale\. Valid methods
        are round\_half\_even, round\_half\_up, round\_half\_down, round\_down,
        round\_up, round\_floor, round\_ceiling\.

      * *precision* \- Maximum number of digits allowed in mantissa\.

      * *extended* \- Set to 1 for extended mode\. 0 for simplified mode\.

      * *maxExponent* \- Maximum value for the exponent\. Defaults to 999\.

      * *minExponent* \- Minimum value for the exponent\. Default to \-998\.

  - <a name='4'></a>__::math::decimal::add__ *a* *b*

  - <a name='5'></a>__::math::decimal::\+__ *a* *b*

    Return the sum of the two decimals *a* and *b*\.

  - <a name='6'></a>__::math::decimal::subtract__ *a* *b*

  - <a name='7'></a>__::math::decimal::\-__ *a* *b*

    Return the differnece of the two decimals *a* and *b*\.

  - <a name='8'></a>__::math::decimal::multiply__ *a* *b*

  - <a name='9'></a>__::math::decimal::\*__ *a* *b*

    Return the product of the two decimals *a* and *b*\.

  - <a name='10'></a>__::math::decimal::divide__ *a* *b*

  - <a name='11'></a>__::math::decimal::/__ *a* *b*

    Return the quotient of the division between the two decimals *a* and
    *b*\.

  - <a name='12'></a>__::math::decimal::divideint__ *a* *b*

    Return a the integer portion of the quotient of the division between
    decimals *a* and *b*

  - <a name='13'></a>__::math::decimal::remainder__ *a* *b*

    Return the remainder of the division between the two decimals *a* and
    *b*\.

  - <a name='14'></a>__::math::decimal::abs__ *decimal*

    Return the absolute value of the decimal\.

  - <a name='15'></a>__::math::decimal::compare__ *a* *b*

    Compare the two decimals a and b, returning *0* if *a == b*, *1* if
    *a > b*, and *\-1* if *a < b*\.

  - <a name='16'></a>__::math::decimal::max__ *a* *b*

    Compare the two decimals a and b, and return *a* if *a >= b*, and *b*
    if *a < b*\.

  - <a name='17'></a>__::math::decimal::maxmag__ *a* *b*

    Compare the two decimals a and b while ignoring their signs, and return
    *a* if *abs\(a\) >= abs\(b\)*, and *b* if *abs\(a\) < abs\(b\)*\.

  - <a name='18'></a>__::math::decimal::min__ *a* *b*

    Compare the two decimals a and b, and return *a* if *a <= b*, and *b*
    if *a > b*\.

  - <a name='19'></a>__::math::decimal::minmag__ *a* *b*

    Compare the two decimals a and b while ignoring their signs, and return
    *a* if *abs\(a\) <= abs\(b\)*, and *b* if *abs\(a\) > abs\(b\)*\.

  - <a name='20'></a>__::math::decimal::plus__ *a*

    Return the result from *::math::decimal::\+ 0 $a*\.

  - <a name='21'></a>__::math::decimal::minus__ *a*

    Return the result from *::math::decimal::\- 0 $a*\.

  - <a name='22'></a>__::math::decimal::copynegate__ *a*

    Returns *a* with the sign flipped\.

  - <a name='23'></a>__::math::decimal::copysign__ *a* *b*

    Returns *a* with the sign set to the sign of the *b*\.

  - <a name='24'></a>__::math::decimal::is\-signed__ *decimal*

    Return the sign of the decimal\. The procedure returns 0 if the number is
    positive, 1 if it's negative\.

  - <a name='25'></a>__::math::decimal::is\-zero__ *decimal*

    Return true if *decimal* value is zero, otherwise false is returned\.

  - <a name='26'></a>__::math::decimal::is\-NaN__ *decimal*

    Return true if *decimal* value is NaN \(not a number\), otherwise false is
    returned\.

  - <a name='27'></a>__::math::decimal::is\-infinite__ *decimal*

    Return true if *decimal* value is Infinite, otherwise false is returned\.

  - <a name='28'></a>__::math::decimal::is\-finite__ *decimal*

    Return true if *decimal* value is finite, otherwise false is returned\.

  - <a name='29'></a>__::math::decimal::fma__ *a* *b* *c*

    Return the result from first multiplying *a* by *b* and then adding
    *c*\. Rescaling only occurs after completion of all operations\. In this way
    the result may vary from that returned by performing the operations
    individually\.

  - <a name='30'></a>__::math::decimal::round\_half\_even__ *decimal* *digits*

    Rounds *decimal* to *digits* number of decimal points with the following
    rules: Round to the nearest\. If equidistant, round so the final digit is
    even\.

  - <a name='31'></a>__::math::decimal::round\_half\_up__ *decimal* *digits*

    Rounds *decimal* to *digits* number of decimal points with the following
    rules: Round to the nearest\. If equidistant, round up\.

  - <a name='32'></a>__::math::decimal::round\_half\_down__ *decimal* *digits*

    Rounds *decimal* to *digits* number of decimal points with the following
    rules: Round to the nearest\. If equidistant, round down\.

  - <a name='33'></a>__::math::decimal::round\_down__ *decimal* *digits*

    Rounds *decimal* to *digits* number of decimal points with the following
    rules: Round toward 0\. \(Truncate\)

  - <a name='34'></a>__::math::decimal::round\_up__ *decimal* *digits*

    Rounds *decimal* to *digits* number of decimal points with the following
    rules: Round away from 0

  - <a name='35'></a>__::math::decimal::round\_floor__ *decimal* *digits*

    Rounds *decimal* to *digits* number of decimal points with the following
    rules: Round toward \-Infinity\.

  - <a name='36'></a>__::math::decimal::round\_ceiling__ *decimal* *digits*

    Rounds *decimal* to *digits* number of decimal points with the following
    rules: Round toward Infinity

  - <a name='37'></a>__::math::decimal::round\_05up__ *decimal* *digits*

    Rounds *decimal* to *digits* number of decimal points with the following
    rules: Round zero or five away from 0\. The same as round\-up, except that
    rounding up only occurs if the digit to be rounded up is 0 or 5, and after
    overflow the result is the same as for round\-down\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *decimal* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[decimal](\.\./\.\./\.\./\.\./index\.md\#decimal),
[math](\.\./\.\./\.\./\.\./index\.md\#math), [tcl](\.\./\.\./\.\./\.\./index\.md\#tcl)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Mark Alston <mark at beernut dot com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/exact.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265

[//000000001]: # (math::exact \- Tcl Math Library)
[//000000002]: # (Generated from file 'exact\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2015 Kevin B\. Kenny <kennykb@acm\.org>)
[//000000004]: # (Redistribution permitted under the terms of the Open Publication License <http://www\.opencontent\.org/openpub/>)
[//000000005]: # (math::exact\(n\) 1\.0\.1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::exact \- Exact Real Arithmetic

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Procedures](#section2)

  - [Parameters](#section3)

  - [Expressions](#section4)

  - [Functions](#section5)

  - [Summary](#section6)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require grammar::aycock 1\.0  
package require math::exact 1\.0\.1  

[__::math::exact::exactexpr__ *expr*](#1)  
[*number* __ref__](#2)  
[*number* __unref__](#3)  
[*number* __asPrint__ *precision*](#4)  
[*number* __asFloat__ *precision*](#5)  

# <a name='description'></a>DESCRIPTION

The __exactexpr__ command in the __math::exact__ package allows for
exact computations over the computable real numbers\. These are not
arbitrary\-precision calculations; rather they are exact, with numbers
represented by algorithms that produce successive approximations\. At the end of
a calculation, the caller can request a given precision for the end result, and
intermediate results are computed to whatever precision is necessary to satisfy
the request\.

# <a name='section2'></a>Procedures

The following procedure is the primary entry into the __math::exact__
package\.

  - <a name='1'></a>__::math::exact::exactexpr__ *expr*

    Accepts a mathematical expression in Tcl syntax, and returns an object that
    represents the program to calculate successive approximations to the
    expression's value\. The result will be referred to as an exact real number\.

  - <a name='2'></a>*number* __ref__

    Increases the reference count of a given exact real number\.

  - <a name='3'></a>*number* __unref__

    Decreases the reference count of a given exact real number, and destroys the
    number if the reference count is zero\.

  - <a name='4'></a>*number* __asPrint__ *precision*

    Formats the given *number* for printing, with the specified *precision*\.
    \(See below for how *precision* is interpreted\)\. Numbers that are known to
    be rational are formatted as fractions\.

  - <a name='5'></a>*number* __asFloat__ *precision*

    Formats the given *number* for printing, with the specified *precision*\.
    \(See below for how *precision* is interpreted\)\. All numbers are formatted
    in floating\-point E format\.

# <a name='section3'></a>Parameters

  - *expr*

    Expression to evaluate\. The syntax for expressions is the same as it is in
    Tcl, but the set of operations is smaller\. See [Expressions](#section4)
    below for details\.

  - *number*

    The object returned by an earlier invocation of
    __math::exact::exactexpr__

  - *precision*

    The requested 'precision' of the result\. The precision is \(approximately\)
    the absolute value of the binary exponent plus the number of bits of the
    binary significand\. For instance, to return results to IEEE\-754 double
    precision, 56 bits plus the exponent are required\. Numbers between 1/2 and 2
    will require a precision of 57; numbers between 1/4 and 1/2 or between 2 and
    4 will require 58; numbers between 1/8 and 1/4 or between 4 and 8 will
    require 59; and so on\.

# <a name='section4'></a>Expressions

The __math::exact::exactexpr__ command accepts expressions in a subset of
Tcl's syntax\. The following components may be used in an expression\.

  - Decimal integers\.

  - Variable references with the dollar sign \(__$__\)\. The value of the
    variable must be the result of another call to
    __math::exact::exactexpr__\. The reference count of the value will be
    increased by one for each position at which it appears in the expression\.

  - The exponentiation operator \(__\*\*__\)\.

  - Unary plus \(__\+__\) and minus \(__\-__\) operators\.

  - Multiplication \(__\*__\) and division \(__/__\) operators\.

  - Parentheses used for grouping\.

  - Functions\. See [Functions](#section5) below for the functions that are
    available\.

# <a name='section5'></a>Functions

The following functions are available for use within exact real expressions\.

  - __acos\(__*x*__\)__

    The inverse cosine of *x*\. The result is expressed in radians\. The
    absolute value of *x* must be less than 1\.

  - __acosh\(__*x*__\)__

    The inverse hyperbolic cosine of *x*\. *x* must be greater than 1\.

  - __asin\(__*x*__\)__

    The inverse sine of *x*\. The result is expressed in radians\. The absolute
    value of *x* must be less than 1\.

  - __asinh\(__*x*__\)__

    The inverse hyperbolic sine of *x*\.

  - __atan\(__*x*__\)__

    The inverse tangent of *x*\. The result is expressed in radians\.

  - __atanh\(__*x*__\)__

    The inverse hyperbolic tangent of *x*\. The absolute value of *x* must be
    less than 1\.

  - __cos\(__*x*__\)__

    The cosine of *x*\. *x* is expressed in radians\.

  - __cosh\(__*x*__\)__

    The hyperbolic cosine of *x*\.

  - __e\(\)__

    The base of the natural logarithms = __2\.71828\.\.\.__

  - __exp\(__*x*__\)__

    The exponential function of *x*\.

  - __log\(__*x*__\)__

    The natural logarithm of *x*\. *x* must be positive\.

  - __pi\(\)__

    The value of pi = __3\.15159\.\.\.__

  - __sin\(__*x*__\)__

    The sine of *x*\. *x* is expressed in radians\.

  - __sinh\(__*x*__\)__

    The hyperbolic sine of *x*\.

  - __sqrt\(__*x*__\)__

    The square root of *x*\. *x* must be positive\.

  - __tan\(__*x*__\)__

    The tangent of *x*\. *x* is expressed in radians\.

  - __tanh\(__*x*__\)__

    The hyperbolic tangent of *x*\.

# <a name='section6'></a>Summary

The __math::exact::exactexpr__ command provides a system that performs exact
arithmetic over computable real numbers, representing the numbers as algorithms
for successive approximation\. An example, which implements the high\-school
quadratic formula, is shown below\.

    namespace import math::exact::exactexpr
    proc exactquad {a b c} {
        set d [[exactexpr {sqrt($b*$b - 4*$a*$c)}] ref]
        set r0 [[exactexpr {(-$b - $d) / (2 * $a)}] ref]
        set r1 [[exactexpr {(-$b + $d) / (2 * $a)}] ref]
        $d unref
        return [list $r0 $r1]
    }

    set a [[exactexpr 1] ref]
    set b [[exactexpr 200] ref]
    set c [[exactexpr {(-3/2) * 10**-12}] ref]
    lassign [exactquad $a $b $c] r0 r1
    $a unref; $b unref; $c unref
    puts [list [$r0 asFloat 70] [$r1 asFloat 110]]
    $r0 unref; $r1 unref

The program prints the result:

    -2.000000000000000075e2 7.499999999999999719e-15

Note that if IEEE\-754 floating point had been used, a catastrophic roundoff
error would yield a smaller root that is a factor of two too high:

    -200.0 1.4210854715202004e-14

The invocations of __exactexpr__ should be fairly self\-explanatory\. The
other commands of note are __ref__ and __unref__\. It is necessary for
the caller to keep track of references to exact expressions \- to call
__ref__ every time an exact expression is stored in a variable and
__unref__ every time the variable goes out of scope or is overwritten\. The
__asFloat__ method emits decimal digits as long as the requested precision
supports them\. It terminates when the requested precision yields an uncertainty
of more than one unit in the least significant digit\.

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2015 Kevin B\. Kenny <kennykb@acm\.org>
Redistribution permitted under the terms of the Open Publication License <http://www\.opencontent\.org/openpub/>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/filtergen.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132

[//000000001]: # (math::filters \- Tcl Math Library)
[//000000002]: # (Generated from file 'filtergen\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2020 by Arjen Markus)
[//000000004]: # (math::filters\(n\) 0\.1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::filters \- Digital filters

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.5?  
package require math::filters ?0\.1?  

[__::math::filters::filterButterworth__ *lowpass* *order* *samplefreq* *cutofffreq*](#1)  
[__::math::filters::filter__ *coeffs* *data*](#2)  
[__::math::filters::filterObj__ new *coeffs* *yinit*](#3)  
[__$filterObj__ filter *x*](#4)  
[__$filterObj__ reset](#5)  

# <a name='description'></a>DESCRIPTION

The __math::filters__ package implements digital filters, notably
Butterworth low\-pass and high\-pass filters\. The procedures allow to filter an
entire data series as well as filter data one by one\.

# <a name='section2'></a>PROCEDURES

The package defines the following public procedures:

  - <a name='1'></a>__::math::filters::filterButterworth__ *lowpass* *order* *samplefreq* *cutofffreq*

    Determine the coefficients for a Butterworth filter of given order\. The
    coefficients are returned as a list of the x\-coefficients, the
    y\-coefficients and the scale\. The formula is \(n is the filter order\):

                       n             n
        scale * y_k = sum x_(k-i) + sum y_(k-i)
                      i=0           i=1

      * bool *lowpass*

        Generate a low\-pass filter \(1\) or a high\-pass filter \(0\)

      * integer *lowpass*

        The order of the filter to be generated

      * double *samplefreq*

        Sampling frequency of the data series

      * double *cutofffreq*

        Cut\-off frequency for the filter

  - <a name='2'></a>__::math::filters::filter__ *coeffs* *data*

    Filter the entire data series based on the filter coefficients\.

      * list *coeffs*

        List of coefficients as generated by *filterButterworth* \(or in fact
        any similar list of coefficients\)

      * list *data*

        Data to be filtered

  - <a name='3'></a>__::math::filters::filterObj__ new *coeffs* *yinit*

    Create a filter object\. The initial x data are taken as zero\. The initial y
    data can be prescribed\. If they are not given, they are taken as zero as
    well\.

      * list *coeffs*

        List of coefficients as generated by *filterButterworth* \(or in fact
        any similar list of coefficients\)

      * list *yinit*

        \(Optional\) initial data for the filter result\.

  - <a name='4'></a>__$filterObj__ filter *x*

    Filter a single value and return the result\.

      * double *x*

        The value to be filtered

  - <a name='5'></a>__$filterObj__ reset

    Reset the filter object \(start anew\)

# <a name='keywords'></a>KEYWORDS

[digital](\.\./\.\./\.\./\.\./index\.md\#digital),
[filtering](\.\./\.\./\.\./\.\./index\.md\#filtering)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2020 by Arjen Markus
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/fourier.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180

[//000000001]: # (math::fourier \- Tcl Math Library)
[//000000002]: # (Generated from file 'fourier\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (math::fourier\(n\) 1\.0\.2 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::fourier \- Discrete and fast fourier transforms

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [GENERAL INFORMATION](#section2)

  - [PROCEDURES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require math::fourier 1\.0\.2  

[__::math::fourier::dft__ *in\_data*](#1)  
[__::math::fourier::inverse\_dft__ *in\_data*](#2)  
[__::math::fourier::lowpass__ *cutoff* *in\_data*](#3)  
[__::math::fourier::highpass__ *cutoff* *in\_data*](#4)  

# <a name='description'></a>DESCRIPTION

The __math::fourier__ package implements two versions of discrete Fourier
transforms, the ordinary transform and the fast Fourier transform\. It also
provides a few simple filter procedures as an illustrations of how such filters
can be implemented\.

The purpose of this document is to describe the implemented procedures and
provide some examples of their usage\. As there is ample literature on the
algorithms involved, we refer to relevant text books for more explanations\. We
also refer to the original Wiki page on the subject which describes some of the
considerations behind the current implementation\.

# <a name='section2'></a>GENERAL INFORMATION

The two top\-level procedures defined are

  - dft data\-list

  - inverse\_dft data\-list

Both take a list of *complex numbers* and apply a Discrete Fourier Transform
\(DFT\) or its inverse respectively to these lists of numbers\. A "complex number"
in this case is either \(i\) a pair \(two element list\) of numbers, interpreted as
the real and imaginary parts of the complex number, or \(ii\) a single number,
interpreted as the real part of a complex number whose imaginary part is zero\.
The return value is always in the first format\. \(The DFT generally produces
complex results even if the input is purely real\.\) Applying first one and then
the other of these procedures to a list of complex numbers will \(modulo rounding
errors due to floating point arithmetic\) return the original list of numbers\.

If the input length N is a power of two then these procedures will utilize the
O\(N log N\) Fast Fourier Transform algorithm\. If input length is not a power of
two then the DFT will instead be computed using a the naive quadratic algorithm\.

Some examples:

    % dft {1 2 3 4}
    {10 0.0} {-2.0 2.0} {-2 0.0} {-2.0 -2.0}
    % inverse_dft {{10 0.0} {-2.0 2.0} {-2 0.0} {-2.0 -2.0}}
    {1.0 0.0} {2.0 0.0} {3.0 0.0} {4.0 0.0}
    % dft {1 2 3 4 5}
    {15.0 0.0} {-2.5 3.44095480118} {-2.5 0.812299240582} {-2.5 -0.812299240582} {-2.5 -3.44095480118}
    % inverse_dft {{15.0 0.0} {-2.5 3.44095480118} {-2.5 0.812299240582} {-2.5 -0.812299240582} {-2.5 -3.44095480118}}
    {1.0 0.0} {2.0 8.881784197e-17} {3.0 4.4408920985e-17} {4.0 4.4408920985e-17} {5.0 -8.881784197e-17}

In the last case, the imaginary parts <1e\-16 would have been zero in exact
arithmetic, but aren't here due to rounding errors\.

Internally, the procedures use a flat list format where every even index element
of a list is a real part and every odd index element is an imaginary part\. This
is reflected in the variable names by Re\_ and Im\_ prefixes\.

The package includes two simple filters\. They have an analogue equivalent in a
simple electronic circuit, a resistor and a capacitance in series\. Using these
filters requires the __[math::complexnumbers](qcomplex\.md)__ package\.

# <a name='section3'></a>PROCEDURES

The public Fourier transform procedures are:

  - <a name='1'></a>__::math::fourier::dft__ *in\_data*

    Determine the *Fourier transform* of the given list of complex numbers\.
    The result is a list of complex numbers representing the \(complex\)
    amplitudes of the Fourier components\.

      * list *in\_data*

        List of data

  - <a name='2'></a>__::math::fourier::inverse\_dft__ *in\_data*

    Determine the *inverse Fourier transform* of the given list of complex
    numbers \(interpreted as amplitudes\)\. The result is a list of complex numbers
    representing the original \(complex\) data

      * list *in\_data*

        List of data \(amplitudes\)

  - <a name='3'></a>__::math::fourier::lowpass__ *cutoff* *in\_data*

    Filter the \(complex\) amplitudes so that high\-frequency components are
    suppressed\. The implemented filter is a first\-order low\-pass filter, the
    discrete equivalent of a simple electronic circuit with a resistor and a
    capacitance\.

      * float *cutoff*

        Cut\-off frequency

      * list *in\_data*

        List of data \(amplitudes\)

  - <a name='4'></a>__::math::fourier::highpass__ *cutoff* *in\_data*

    Filter the \(complex\) amplitudes so that low\-frequency components are
    suppressed\. The implemented filter is a first\-order low\-pass filter, the
    discrete equivalent of a simple electronic circuit with a resistor and a
    capacitance\.

      * float *cutoff*

        Cut\-off frequency

      * list *in\_data*

        List of data \(amplitudes\)

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: fourier* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[FFT](\.\./\.\./\.\./\.\./index\.md\#fft), [Fourier
transform](\.\./\.\./\.\./\.\./index\.md\#fourier\_transform), [complex
numbers](\.\./\.\./\.\./\.\./index\.md\#complex\_numbers),
[mathematics](\.\./\.\./\.\./\.\./index\.md\#mathematics)

# <a name='category'></a>CATEGORY

Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/fuzzy.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

[//000000001]: # (math::fuzzy \- Tcl Math Library)
[//000000002]: # (Generated from file 'fuzzy\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (math::fuzzy\(n\) 0\.2 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::fuzzy \- Fuzzy comparison of floating\-point numbers

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [TEST CASES](#section3)

  - [REFERENCES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.3?  
package require math::fuzzy ?0\.2?  

[__::math::fuzzy::teq__ *value1* *value2*](#1)  
[__::math::fuzzy::tne__ *value1* *value2*](#2)  
[__::math::fuzzy::tge__ *value1* *value2*](#3)  
[__::math::fuzzy::tle__ *value1* *value2*](#4)  
[__::math::fuzzy::tlt__ *value1* *value2*](#5)  
[__::math::fuzzy::tgt__ *value1* *value2*](#6)  
[__::math::fuzzy::tfloor__ *value*](#7)  
[__::math::fuzzy::tceil__ *value*](#8)  
[__::math::fuzzy::tround__ *value*](#9)  
[__::math::fuzzy::troundn__ *value* *ndigits*](#10)  

# <a name='description'></a>DESCRIPTION

The package Fuzzy is meant to solve common problems with floating\-point numbers
in a systematic way:

  - Comparing two numbers that are "supposed" to be identical, like 1\.0 and
    2\.1/\(1\.2\+0\.9\) is not guaranteed to give the intuitive result\.

  - Rounding a number that is halfway two integer numbers can cause strange
    errors, like int\(100\.0\*2\.8\) \!= 28 but 27

The Fuzzy package is meant to help sorting out this type of problems by defining
"fuzzy" comparison procedures for floating\-point numbers\. It does so by allowing
for a small margin that is determined automatically \- the margin is three times
the "epsilon" value, that is three times the smallest number *eps* such that
1\.0 and 1\.0\+$eps canbe distinguished\. In Tcl, which uses double precision
floating\-point numbers, this is typically 1\.1e\-16\.

# <a name='section2'></a>PROCEDURES

Effectively the package provides the following procedures:

  - <a name='1'></a>__::math::fuzzy::teq__ *value1* *value2*

    Compares two floating\-point numbers and returns 1 if their values fall
    within a small range\. Otherwise it returns 0\.

  - <a name='2'></a>__::math::fuzzy::tne__ *value1* *value2*

    Returns the negation, that is, if the difference is larger than the margin,
    it returns 1\.

  - <a name='3'></a>__::math::fuzzy::tge__ *value1* *value2*

    Compares two floating\-point numbers and returns 1 if their values either
    fall within a small range or if the first number is larger than the second\.
    Otherwise it returns 0\.

  - <a name='4'></a>__::math::fuzzy::tle__ *value1* *value2*

    Returns 1 if the two numbers are equal according to \[teq\] or if the first is
    smaller than the second\.

  - <a name='5'></a>__::math::fuzzy::tlt__ *value1* *value2*

    Returns the opposite of \[tge\]\.

  - <a name='6'></a>__::math::fuzzy::tgt__ *value1* *value2*

    Returns the opposite of \[tle\]\.

  - <a name='7'></a>__::math::fuzzy::tfloor__ *value*

    Returns the integer number that is lower or equal to the given
    floating\-point number, within a well\-defined tolerance\.

  - <a name='8'></a>__::math::fuzzy::tceil__ *value*

    Returns the integer number that is greater or equal to the given
    floating\-point number, within a well\-defined tolerance\.

  - <a name='9'></a>__::math::fuzzy::tround__ *value*

    Rounds the floating\-point number off\.

  - <a name='10'></a>__::math::fuzzy::troundn__ *value* *ndigits*

    Rounds the floating\-point number off to the specified number of decimals
    \(Pro memorie\)\.

Usage:

    if { [teq $x $y] } { puts "x == y" }
    if { [tne $x $y] } { puts "x != y" }
    if { [tge $x $y] } { puts "x >= y" }
    if { [tgt $x $y] } { puts "x > y" }
    if { [tlt $x $y] } { puts "x < y" }
    if { [tle $x $y] } { puts "x <= y" }

    set fx      [tfloor $x]
    set fc      [tceil  $x]
    set rounded [tround $x]
    set roundn  [troundn $x $nodigits]

# <a name='section3'></a>TEST CASES

The problems that can occur with floating\-point numbers are illustrated by the
test cases in the file "fuzzy\.test":

  - Several test case use the ordinary comparisons, and they fail invariably to
    produce understandable results

  - One test case uses \[expr\] without braces \(\{ and \}\)\. It too fails\.

The conclusion from this is that any expression should be surrounded by braces,
because otherwise very awkward things can happen if you need accuracy\.
Furthermore, accuracy and understandable results are enhanced by using these
"tolerant" or fuzzy comparisons\.

Note that besides the Tcl\-only package, there is also a C\-based version\.

# <a name='section4'></a>REFERENCES

Original implementation in Fortran by dr\. H\.D\. Knoble \(Penn State University\)\.

P\. E\. Hagerty, "More on Fuzzy Floor and Ceiling," APL QUOTE QUAD 8\(4\):20\-24,
June 1978\. Note that TFLOOR=FL5 took five years of refereed evolution
\(publication\)\.

L\. M\. Breed, "Definitions for Fuzzy Floor and Ceiling", APL QUOTE QUAD
8\(3\):16\-23, March 1978\.

D\. Knuth, Art of Computer Programming, Vol\. 1, Problem 1\.2\.4\-5\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: fuzzy* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[floating\-point](\.\./\.\./\.\./\.\./index\.md\#floating\_point),
[math](\.\./\.\./\.\./\.\./index\.md\#math),
[rounding](\.\./\.\./\.\./\.\./index\.md\#rounding)

# <a name='category'></a>CATEGORY

Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/interpolate.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350

[//000000001]: # (math::interpolate \- Tcl Math Library)
[//000000002]: # (Generated from file 'interpolate\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2004 Kevn B\. Kenny <kennykb@users\.sourceforge\.net>)
[//000000005]: # (math::interpolate\(n\) 1\.1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::interpolate \- Interpolation routines

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [INCOMPATIBILITY WITH VERSION 1\.0\.3](#section2)

  - [PROCEDURES](#section3)

  - [EXAMPLES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.4?  
package require struct  
package require math::interpolate ?1\.1?  

[__::math::interpolate::defineTable__ *name* *colnames* *values*](#1)  
[__::math::interpolate::interp\-1d\-table__ *name* *xval*](#2)  
[__::math::interpolate::interp\-table__ *name* *xval* *yval*](#3)  
[__::math::interpolate::interp\-linear__ *xyvalues* *xval*](#4)  
[__::math::interpolate::interp\-lagrange__ *xyvalues* *xval*](#5)  
[__::math::interpolate::prepare\-cubic\-splines__ *xcoord* *ycoord*](#6)  
[__::math::interpolate::interp\-cubic\-splines__ *coeffs* *x*](#7)  
[__::math::interpolate::interp\-spatial__ *xyvalues* *coord*](#8)  
[__::math::interpolate::interp\-spatial\-params__ *max\_search* *power*](#9)  
[__::math::interpolate::neville__ *xlist* *ylist* *x*](#10)  

# <a name='description'></a>DESCRIPTION

This package implements several interpolation algorithms:

  - Interpolation into a table \(one or two independent variables\), this is
    useful for example, if the data are static, like with tables of statistical
    functions\.

  - Linear interpolation into a given set of data \(organised as \(x,y\) pairs\)\.

  - Lagrange interpolation\. This is mainly of theoretical interest, because
    there is no guarantee about error bounds\. One possible use: if you need a
    line or a parabola through given points \(it will calculate the values, but
    not return the coefficients\)\.

    A variation is Neville's method which has better behaviour and error bounds\.

  - Spatial interpolation using a straightforward distance\-weight method\. This
    procedure allows any number of spatial dimensions and any number of
    dependent variables\.

  - Interpolation in one dimension using cubic splines\.

This document describes the procedures and explains their usage\.

# <a name='section2'></a>INCOMPATIBILITY WITH VERSION 1\.0\.3

The interpretation of the tables in the
__::math::interpolate::interpolate\-1d\-table__ command has been changed to be
compatible with the interpretation for 2D interpolation in the
__::math::interpolate::interpolate\-table__ command\. As a consequence this
version is incompatible with the previous versions of the command \(1\.0\.x\)\.

# <a name='section3'></a>PROCEDURES

The interpolation package defines the following public procedures:

  - <a name='1'></a>__::math::interpolate::defineTable__ *name* *colnames* *values*

    Define a table with one or two independent variables \(the distinction is
    implicit in the data\)\. The procedure returns the name of the table \- this
    name is used whenever you want to interpolate the values\. *Note:* this
    procedure is a convenient wrapper for the struct::matrix procedure\.
    Therefore you can access the data at any location in your program\.

      * string *name* \(in\)

        Name of the table to be created

      * list *colnames* \(in\)

        List of column names

      * list *values* \(in\)

        List of values \(the number of elements should be a multiple of the
        number of columns\. See [EXAMPLES](#section4) for more information
        on the interpretation of the data\.

        The values must be sorted with respect to the independent variable\(s\)\.

  - <a name='2'></a>__::math::interpolate::interp\-1d\-table__ *name* *xval*

    Interpolate into the one\-dimensional table "name" and return a list of
    values, one for each dependent column\.

      * string *name* \(in\)

        Name of an existing table

      * float *xval* \(in\)

        Value of the independent *row* variable

  - <a name='3'></a>__::math::interpolate::interp\-table__ *name* *xval* *yval*

    Interpolate into the two\-dimensional table "name" and return the
    interpolated value\.

      * string *name* \(in\)

        Name of an existing table

      * float *xval* \(in\)

        Value of the independent *row* variable

      * float *yval* \(in\)

        Value of the independent *column* variable

  - <a name='4'></a>__::math::interpolate::interp\-linear__ *xyvalues* *xval*

    Interpolate linearly into the list of x,y pairs and return the interpolated
    value\.

      * list *xyvalues* \(in\)

        List of pairs of \(x,y\) values, sorted to increasing x\. They are used as
        the breakpoints of a piecewise linear function\.

      * float *xval* \(in\)

        Value of the independent variable for which the value of y must be
        computed\.

  - <a name='5'></a>__::math::interpolate::interp\-lagrange__ *xyvalues* *xval*

    Use the list of x,y pairs to construct the unique polynomial of lowest
    degree that passes through all points and return the interpolated value\.

      * list *xyvalues* \(in\)

        List of pairs of \(x,y\) values

      * float *xval* \(in\)

        Value of the independent variable for which the value of y must be
        computed\.

  - <a name='6'></a>__::math::interpolate::prepare\-cubic\-splines__ *xcoord* *ycoord*

    Returns a list of coefficients for the second routine
    *interp\-cubic\-splines* to actually interpolate\.

      * list *xcoord*

        List of x\-coordinates for the value of the function to be interpolated
        is known\. The coordinates must be strictly ascending\. At least three
        points are required\.

      * list *ycoord*

        List of y\-coordinates \(the values of the function at the given
        x\-coordinates\)\.

  - <a name='7'></a>__::math::interpolate::interp\-cubic\-splines__ *coeffs* *x*

    Returns the interpolated value at coordinate x\. The coefficients are
    computed by the procedure *prepare\-cubic\-splines*\.

      * list *coeffs*

        List of coefficients as returned by prepare\-cubic\-splines

      * float *x*

        x\-coordinate at which to estimate the function\. Must be between the
        first and last x\-coordinate for which values were given\.

  - <a name='8'></a>__::math::interpolate::interp\-spatial__ *xyvalues* *coord*

    Use a straightforward interpolation method with weights as function of the
    inverse distance to interpolate in 2D and N\-dimensional space

    The list xyvalues is a list of lists:

            {   {x1 y1 z1 {v11 v12 v13 v14}}
        	{x2 y2 z2 {v21 v22 v23 v24}}
        	...
            }

    The last element of each inner list is either a single number or a list in
    itself\. In the latter case the return value is a list with the same number
    of elements\.

    The method is influenced by the search radius and the power of the inverse
    distance

      * list *xyvalues* \(in\)

        List of lists, each sublist being a list of coordinates and of dependent
        values\.

      * list *coord* \(in\)

        List of coordinates for which the values must be calculated

  - <a name='9'></a>__::math::interpolate::interp\-spatial\-params__ *max\_search* *power*

    Set the parameters for spatial interpolation

      * float *max\_search* \(in\)

        Search radius \(data points further than this are ignored\)

      * integer *power* \(in\)

        Power for the distance \(either 1 or 2; defaults to 2\)

  - <a name='10'></a>__::math::interpolate::neville__ *xlist* *ylist* *x*

    Interpolates between the tabulated values of a function whose abscissae are
    *xlist* and whose ordinates are *ylist* to produce an estimate for the
    value of the function at *x*\. The result is a two\-element list; the first
    element is the function's estimated value, and the second is an estimate of
    the absolute error of the result\. Neville's algorithm for polynomial
    interpolation is used\. Note that a large table of values will use an
    interpolating polynomial of high degree, which is likely to result in
    numerical instabilities; one is better off using only a few tabulated values
    near the desired abscissa\.

# <a name='section4'></a>EXAMPLES

*Example of using one\-dimensional tables:*

Suppose you have several tabulated functions of one variable:

      x     y1     y2
    0.0    0.0    0.0
    1.0    1.0    1.0
    2.0    4.0    8.0
    3.0    9.0   27.0
    4.0   16.0   64.0

Then to estimate the values at 0\.5, 1\.5, 2\.5 and 3\.5, you can use:

    set table [::math::interpolate::defineTable table1  {x y1 y2} {   -      1      2
                    0.0    0.0    0.0
                    1.0    1.0    1.0
                    2.0    4.0    8.0
                    3.0    9.0   27.0
                    4.0   16.0   64.0}]
    foreach x {0.5 1.5 2.5 3.5} {
        puts "$x: [::math::interpolate::interp-1d-table $table $x]"
    }

For one\-dimensional tables the first row is not used\. For two\-dimensional
tables, the first row represents the values for the second independent variable\.

*Example of using the cubic splines:*

Suppose the following values are given:

      x       y
    0.1     1.0
    0.3     2.1
    0.4     2.2
    0.8     4.11
    1.0     4.12

Then to estimate the values at 0\.1, 0\.2, 0\.3, \.\.\. 1\.0, you can use:

    set coeffs [::math::interpolate::prepare-cubic-splines  {0.1 0.3 0.4 0.8  1.0}  {1.0 2.1 2.2 4.11 4.12}]
    foreach x {0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0} {
       puts "$x: [::math::interpolate::interp-cubic-splines $coeffs $x]"
    }

to get the following output:

    0.1: 1.0
    0.2: 1.68044117647
    0.3: 2.1
    0.4: 2.2
    0.5: 3.11221507353
    0.6: 4.25242647059
    0.7: 5.41804227941
    0.8: 4.11
    0.9: 3.95675857843
    1.0: 4.12

As you can see, the values at the abscissae are reproduced perfectly\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: interpolate* of
the [Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also
report any ideas for enhancements you may have for either package and/or
documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[interpolation](\.\./\.\./\.\./\.\./index\.md\#interpolation),
[math](\.\./\.\./\.\./\.\./index\.md\#math), [spatial
interpolation](\.\./\.\./\.\./\.\./index\.md\#spatial\_interpolation)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>  
Copyright &copy; 2004 Kevn B\. Kenny <kennykb@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/linalg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179

[//000000001]: # (math::linearalgebra \- Tcl Math Library)
[//000000002]: # (Generated from file 'linalg\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004\-2008 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2004 Ed Hume <http://www\.hume\.com/contact\.us\.htm>)
[//000000005]: # (Copyright &copy; 2008 Michael Buadin <relaxkmike@users\.sourceforge\.net>)
[//000000006]: # (math::linearalgebra\(n\) 1\.1\.5 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::linearalgebra \- Linear Algebra

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [STORAGE](#section3)

  - [REMARKS ON THE IMPLEMENTATION](#section4)

  - [TODO](#section5)

  - [NAMING CONFLICT](#section6)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.4?  
package require math::linearalgebra ?1\.1\.5?  

[__::math::linearalgebra::mkVector__ *ndim* *value*](#1)  
[__::math::linearalgebra::mkUnitVector__ *ndim* *ndir*](#2)  
[__::math::linearalgebra::mkMatrix__ *nrows* *ncols* *value*](#3)  
[__::math::linearalgebra::getrow__ *matrix* *row* ?imin? ?imax?](#4)  
[__::math::linearalgebra::setrow__ *matrix* *row* *newvalues* ?imin? ?imax?](#5)  
[__::math::linearalgebra::getcol__ *matrix* *col* ?imin? ?imax?](#6)  
[__::math::linearalgebra::setcol__ *matrix* *col* *newvalues* ?imin? ?imax?](#7)  
[__::math::linearalgebra::getelem__ *matrix* *row* *col*](#8)  
[__::math::linearalgebra::setelem__ *matrix* *row* ?col? *newvalue*](#9)  
[__::math::linearalgebra::swaprows__ *matrix* *irow1* *irow2* ?imin? ?imax?](#10)  
[__::math::linearalgebra::swapcols__ *matrix* *icol1* *icol2* ?imin? ?imax?](#11)  
[__::math::linearalgebra::show__ *obj* ?format? ?rowsep? ?colsep?](#12)  
[__::math::linearalgebra::dim__ *obj*](#13)  
[__::math::linearalgebra::shape__ *obj*](#14)  
[__::math::linearalgebra::conforming__ *type* *obj1* *obj2*](#15)  
[__::math::linearalgebra::symmetric__ *matrix* ?eps?](#16)  
[__::math::linearalgebra::norm__ *vector* *type*](#17)  
[__::math::linearalgebra::norm\_one__ *vector*](#18)  
[__::math::linearalgebra::norm\_two__ *vector*](#19)  
[__::math::linearalgebra::norm\_max__ *vector* ?index?](#20)  
[__::math::linearalgebra::normMatrix__ *matrix* *type*](#21)  
[__::math::linearalgebra::dotproduct__ *vect1* *vect2*](#22)  
[__::math::linearalgebra::unitLengthVector__ *vector*](#23)  
[__::math::linearalgebra::normalizeStat__ *mv*](#24)  
[__::math::linearalgebra::axpy__ *scale* *mv1* *mv2*](#25)  
[__::math::linearalgebra::add__ *mv1* *mv2*](#26)  
[__::math::linearalgebra::sub__ *mv1* *mv2*](#27)  
[__::math::linearalgebra::scale__ *scale* *mv*](#28)  
[__::math::linearalgebra::rotate__ *c* *s* *vect1* *vect2*](#29)  
[__::math::linearalgebra::transpose__ *matrix*](#30)  
[__::math::linearalgebra::matmul__ *mv1* *mv2*](#31)  
[__::math::linearalgebra::angle__ *vect1* *vect2*](#32)  
[__::math::linearalgebra::crossproduct__ *vect1* *vect2*](#33)  
[__::math::linearalgebra::matmul__ *mv1* *mv2*](#34)  
[__::math::linearalgebra::mkIdentity__ *size*](#35)  
[__::math::linearalgebra::mkDiagonal__ *diag*](#36)  
[__::math::linearalgebra::mkRandom__ *size*](#37)  
[__::math::linearalgebra::mkTriangular__ *size* ?uplo? ?value?](#38)  
[__::math::linearalgebra::mkHilbert__ *size*](#39)  
[__::math::linearalgebra::mkDingdong__ *size*](#40)  
[__::math::linearalgebra::mkOnes__ *size*](#41)  
[__::math::linearalgebra::mkMoler__ *size*](#42)  
[__::math::linearalgebra::mkFrank__ *size*](#43)  
[__::math::linearalgebra::mkBorder__ *size*](#44)  
[__::math::linearalgebra::mkWilkinsonW\+__ *size*](#45)  
[__::math::linearalgebra::mkWilkinsonW\-__ *size*](#46)  
[__::math::linearalgebra::solveGauss__ *matrix* *bvect*](#47)  
[__::math::linearalgebra::solvePGauss__ *matrix* *bvect*](#48)  
[__::math::linearalgebra::solveTriangular__ *matrix* *bvect* ?uplo?](#49)  
[__::math::linearalgebra::solveGaussBand__ *matrix* *bvect*](#50)  
[__::math::linearalgebra::solveTriangularBand__ *matrix* *bvect*](#51)  
[__::math::linearalgebra::determineSVD__ *A* *eps*](#52)  
[__::math::linearalgebra::eigenvectorsSVD__ *A* *eps*](#53)  
[__::math::linearalgebra::leastSquaresSVD__ *A* *y* *qmin* *eps*](#54)  
[__::math::linearalgebra::choleski__ *matrix*](#55)  
[__::math::linearalgebra::orthonormalizeColumns__ *matrix*](#56)  
[__::math::linearalgebra::orthonormalizeRows__ *matrix*](#57)  
[__::math::linearalgebra::dger__ *matrix* *alpha* *x* *y* ?scope?](#58)  
[__::math::linearalgebra::dgetrf__ *matrix*](#59)  
[__::math::linearalgebra::det__ *matrix*](#60)  
[__::math::linearalgebra::largesteigen__ *matrix* *tolerance* *maxiter*](#61)  
[__::math::linearalgebra::to\_LA__ *mv*](#62)  
[__::math::linearalgebra::from\_LA__ *mv*](#63)  

# <a name='description'></a>DESCRIPTION

This package offers both low\-level procedures and high\-level algorithms to deal
with linear algebra problems:

  - robust solution of linear equations or least squares problems

  - determining eigenvectors and eigenvalues of symmetric matrices

  - various decompositions of general matrices or matrices of a specific form

  - \(limited\) support for matrices in band storage, a common type of sparse
    matrices

It arose as a re\-implementation of Hume's LA package and the desire to offer
low\-level procedures as found in the well\-known BLAS library\. Matrices are
implemented as lists of lists rather linear lists with reserved elements, as in
the original LA package, as it was found that such an implementation is actually
faster\.

It is advisable, however, to use the procedures that are offered, such as
*setrow* and *getrow*, rather than rely on this representation explicitly:
that way it is to switch to a possibly even faster compiled implementation that
supports the same API\.

*Note:* When using this package in combination with Tk, there may be a naming
conflict, as both this package and Tk define a command *scale*\. See the
[NAMING CONFLICT](#section6) section below\.

# <a name='section2'></a>PROCEDURES

The package defines the following public procedures \(several exist as
specialised procedures, see below\):

*Constructing matrices and vectors*

  - <a name='1'></a>__::math::linearalgebra::mkVector__ *ndim* *value*

    Create a vector with ndim elements, each with the value *value*\.

      * integer *ndim*

        Dimension of the vector \(number of components\)

      * double *value*

        Uniform value to be used \(default: 0\.0\)

  - <a name='2'></a>__::math::linearalgebra::mkUnitVector__ *ndim* *ndir*

    Create a unit vector in *ndim*\-dimensional space, along the *ndir*\-th
    direction\.

      * integer *ndim*

        Dimension of the vector \(number of components\)

      * integer *ndir*

        Direction \(0, \.\.\., ndim\-1\)

  - <a name='3'></a>__::math::linearalgebra::mkMatrix__ *nrows* *ncols* *value*

    Create a matrix with *nrows* rows and *ncols* columns\. All elements have
    the value *value*\.

      * integer *nrows*

        Number of rows

      * integer *ncols*

        Number of columns

      * double *value*

        Uniform value to be used \(default: 0\.0\)

  - <a name='4'></a>__::math::linearalgebra::getrow__ *matrix* *row* ?imin? ?imax?

    Returns a single row of a matrix as a list

      * list *matrix*

        Matrix in question

      * integer *row*

        Index of the row to return

      * integer *imin*

        Minimum index of the column \(default: 0\)

      * integer *imax*

        Maximum index of the column \(default: ncols\-1\)

  - <a name='5'></a>__::math::linearalgebra::setrow__ *matrix* *row* *newvalues* ?imin? ?imax?

    Set a single row of a matrix to new values \(this list must have the same
    number of elements as the number of *columns* in the matrix\)

      * list *matrix*

        *name* of the matrix in question

      * integer *row*

        Index of the row to update

      * list *newvalues*

        List of new values for the row

      * integer *imin*

        Minimum index of the column \(default: 0\)

      * integer *imax*

        Maximum index of the column \(default: ncols\-1\)

  - <a name='6'></a>__::math::linearalgebra::getcol__ *matrix* *col* ?imin? ?imax?

    Returns a single column of a matrix as a list

      * list *matrix*

        Matrix in question

      * integer *col*

        Index of the column to return

      * integer *imin*

        Minimum index of the row \(default: 0\)

      * integer *imax*

        Maximum index of the row \(default: nrows\-1\)

  - <a name='7'></a>__::math::linearalgebra::setcol__ *matrix* *col* *newvalues* ?imin? ?imax?

    Set a single column of a matrix to new values \(this list must have the same
    number of elements as the number of *rows* in the matrix\)

      * list *matrix*

        *name* of the matrix in question

      * integer *col*

        Index of the column to update

      * list *newvalues*

        List of new values for the column

      * integer *imin*

        Minimum index of the row \(default: 0\)

      * integer *imax*

        Maximum index of the row \(default: nrows\-1\)

  - <a name='8'></a>__::math::linearalgebra::getelem__ *matrix* *row* *col*

    Returns a single element of a matrix/vector

      * list *matrix*

        Matrix or vector in question

      * integer *row*

        Row of the element

      * integer *col*

        Column of the element \(not present for vectors\)

  - <a name='9'></a>__::math::linearalgebra::setelem__ *matrix* *row* ?col? *newvalue*

    Set a single element of a matrix \(or vector\) to a new value

      * list *matrix*

        *name* of the matrix in question

      * integer *row*

        Row of the element

      * integer *col*

        Column of the element \(not present for vectors\)

  - <a name='10'></a>__::math::linearalgebra::swaprows__ *matrix* *irow1* *irow2* ?imin? ?imax?

    Swap two rows in a matrix completely or only a selected part

      * list *matrix*

        *name* of the matrix in question

      * integer *irow1*

        Index of first row

      * integer *irow2*

        Index of second row

      * integer *imin*

        Minimum column index \(default: 0\)

      * integer *imin*

        Maximum column index \(default: ncols\-1\)

  - <a name='11'></a>__::math::linearalgebra::swapcols__ *matrix* *icol1* *icol2* ?imin? ?imax?

    Swap two columns in a matrix completely or only a selected part

      * list *matrix*

        *name* of the matrix in question

      * integer *irow1*

        Index of first column

      * integer *irow2*

        Index of second column

      * integer *imin*

        Minimum row index \(default: 0\)

      * integer *imin*

        Maximum row index \(default: nrows\-1\)

*Querying matrices and vectors*

  - <a name='12'></a>__::math::linearalgebra::show__ *obj* ?format? ?rowsep? ?colsep?

    Return a string representing the vector or matrix, for easy printing\. \(There
    is currently no way to print fixed sets of columns\)

      * list *obj*

        Matrix or vector in question

      * string *format*

        Format for printing the numbers \(default: %6\.4f\)

      * string *rowsep*

        String to use for separating rows \(default: newline\)

      * string *colsep*

        String to use for separating columns \(default: space\)

  - <a name='13'></a>__::math::linearalgebra::dim__ *obj*

    Returns the number of dimensions for the object \(either 0 for a scalar, 1
    for a vector and 2 for a matrix\)

      * any *obj*

        Scalar, vector, or matrix

  - <a name='14'></a>__::math::linearalgebra::shape__ *obj*

    Returns the number of elements in each dimension for the object \(either an
    empty list for a scalar, a single number for a vector and a list of the
    number of rows and columns for a matrix\)

      * any *obj*

        Scalar, vector, or matrix

  - <a name='15'></a>__::math::linearalgebra::conforming__ *type* *obj1* *obj2*

    Checks if two objects \(vector or matrix\) have conforming shapes, that is if
    they can be applied in an operation like addition or matrix multiplication\.

      * string *type*

        Type of check:

          + "shape" \- the two objects have the same shape \(for all element\-wise
            operations\)

          + "rows" \- the two objects have the same number of rows \(for use as A
            and b in a system of linear equations *Ax = b*

          + "matmul" \- the first object has the same number of columns as the
            number of rows of the second object\. Useful for matrix\-matrix or
            matrix\-vector multiplication\.

      * list *obj1*

        First vector or matrix \(left operand\)

      * list *obj2*

        Second vector or matrix \(right operand\)

  - <a name='16'></a>__::math::linearalgebra::symmetric__ *matrix* ?eps?

    Checks if the given \(square\) matrix is symmetric\. The argument eps is the
    tolerance\.

      * list *matrix*

        Matrix to be inspected

      * float *eps*

        Tolerance for determining approximate equality \(defaults to 1\.0e\-8\)

*Basic operations*

  - <a name='17'></a>__::math::linearalgebra::norm__ *vector* *type*

    Returns the norm of the given vector\. The type argument can be: 1, 2, inf or
    max, respectively the sum of absolute values, the ordinary Euclidean norm or
    the max norm\.

      * list *vector*

        Vector, list of coefficients

      * string *type*

        Type of norm \(default: 2, the Euclidean norm\)

  - <a name='18'></a>__::math::linearalgebra::norm\_one__ *vector*

    Returns the L1 norm of the given vector, the sum of absolute values

      * list *vector*

        Vector, list of coefficients

  - <a name='19'></a>__::math::linearalgebra::norm\_two__ *vector*

    Returns the L2 norm of the given vector, the ordinary Euclidean norm

      * list *vector*

        Vector, list of coefficients

  - <a name='20'></a>__::math::linearalgebra::norm\_max__ *vector* ?index?

    Returns the Linf norm of the given vector, the maximum absolute coefficient

      * list *vector*

        Vector, list of coefficients

      * integer *index*

        \(optional\) if non zero, returns a list made of the maximum value and the
        index where that maximum was found\. if zero, returns the maximum value\.

  - <a name='21'></a>__::math::linearalgebra::normMatrix__ *matrix* *type*

    Returns the norm of the given matrix\. The type argument can be: 1, 2, inf or
    max, respectively the sum of absolute values, the ordinary Euclidean norm or
    the max norm\.

      * list *matrix*

        Matrix, list of row vectors

      * string *type*

        Type of norm \(default: 2, the Euclidean norm\)

  - <a name='22'></a>__::math::linearalgebra::dotproduct__ *vect1* *vect2*

    Determine the inproduct or dot product of two vectors\. These must have the
    same shape \(number of dimensions\)

      * list *vect1*

        First vector, list of coefficients

      * list *vect2*

        Second vector, list of coefficients

  - <a name='23'></a>__::math::linearalgebra::unitLengthVector__ *vector*

    Return a vector in the same direction with length 1\.

      * list *vector*

        Vector to be normalized

  - <a name='24'></a>__::math::linearalgebra::normalizeStat__ *mv*

    Normalize the matrix or vector in a statistical sense: the mean of the
    elements of the columns of the result is zero and the standard deviation is
    1\.

      * list *mv*

        Vector or matrix to be normalized in the above sense

  - <a name='25'></a>__::math::linearalgebra::axpy__ *scale* *mv1* *mv2*

    Return a vector or matrix that results from a "daxpy" operation, that is:
    compute a\*x\+y \(a a scalar and x and y both vectors or matrices of the same
    shape\) and return the result\.

    Specialised variants are: axpy\_vect and axpy\_mat \(slightly faster, but no
    check on the arguments\)

      * double *scale*

        The scale factor for the first vector/matrix \(a\)

      * list *mv1*

        First vector or matrix \(x\)

      * list *mv2*

        Second vector or matrix \(y\)

  - <a name='26'></a>__::math::linearalgebra::add__ *mv1* *mv2*

    Return a vector or matrix that is the sum of the two arguments \(x\+y\)

    Specialised variants are: add\_vect and add\_mat \(slightly faster, but no
    check on the arguments\)

      * list *mv1*

        First vector or matrix \(x\)

      * list *mv2*

        Second vector or matrix \(y\)

  - <a name='27'></a>__::math::linearalgebra::sub__ *mv1* *mv2*

    Return a vector or matrix that is the difference of the two arguments \(x\-y\)

    Specialised variants are: sub\_vect and sub\_mat \(slightly faster, but no
    check on the arguments\)

      * list *mv1*

        First vector or matrix \(x\)

      * list *mv2*

        Second vector or matrix \(y\)

  - <a name='28'></a>__::math::linearalgebra::scale__ *scale* *mv*

    Scale a vector or matrix and return the result, that is: compute a\*x\.

    Specialised variants are: scale\_vect and scale\_mat \(slightly faster, but no
    check on the arguments\)

      * double *scale*

        The scale factor for the vector/matrix \(a\)

      * list *mv*

        Vector or matrix \(x\)

  - <a name='29'></a>__::math::linearalgebra::rotate__ *c* *s* *vect1* *vect2*

    Apply a planar rotation to two vectors and return the result as a list of
    two vectors: c\*x\-s\*y and s\*x\+c\*y\. In algorithms you can often easily
    determine the cosine and sine of the angle, so it is more efficient to pass
    that information directly\.

      * double *c*

        The cosine of the angle

      * double *s*

        The sine of the angle

      * list *vect1*

        First vector \(x\)

      * list *vect2*

        Seocnd vector \(x\)

  - <a name='30'></a>__::math::linearalgebra::transpose__ *matrix*

    Transpose a matrix

      * list *matrix*

        Matrix to be transposed

  - <a name='31'></a>__::math::linearalgebra::matmul__ *mv1* *mv2*

    Multiply a vector/matrix with another vector/matrix\. The result is a matrix,
    if both x and y are matrices or both are vectors, in which case the "outer
    product" is computed\. If one is a vector and the other is a matrix, then the
    result is a vector\.

      * list *mv1*

        First vector/matrix \(x\)

      * list *mv2*

        Second vector/matrix \(y\)

  - <a name='32'></a>__::math::linearalgebra::angle__ *vect1* *vect2*

    Compute the angle between two vectors \(in radians\)

      * list *vect1*

        First vector

      * list *vect2*

        Second vector

  - <a name='33'></a>__::math::linearalgebra::crossproduct__ *vect1* *vect2*

    Compute the cross product of two \(three\-dimensional\) vectors

      * list *vect1*

        First vector

      * list *vect2*

        Second vector

  - <a name='34'></a>__::math::linearalgebra::matmul__ *mv1* *mv2*

    Multiply a vector/matrix with another vector/matrix\. The result is a matrix,
    if both x and y are matrices or both are vectors, in which case the "outer
    product" is computed\. If one is a vector and the other is a matrix, then the
    result is a vector\.

      * list *mv1*

        First vector/matrix \(x\)

      * list *mv2*

        Second vector/matrix \(y\)

*Common matrices and test matrices*

  - <a name='35'></a>__::math::linearalgebra::mkIdentity__ *size*

    Create an identity matrix of dimension *size*\.

      * integer *size*

        Dimension of the matrix

  - <a name='36'></a>__::math::linearalgebra::mkDiagonal__ *diag*

    Create a diagonal matrix whose diagonal elements are the elements of the
    vector *diag*\.

      * list *diag*

        Vector whose elements are used for the diagonal

  - <a name='37'></a>__::math::linearalgebra::mkRandom__ *size*

    Create a square matrix whose elements are uniformly distributed random
    numbers between 0 and 1 of dimension *size*\.

      * integer *size*

        Dimension of the matrix

  - <a name='38'></a>__::math::linearalgebra::mkTriangular__ *size* ?uplo? ?value?

    Create a triangular matrix with non\-zero elements in the upper or lower
    part, depending on argument *uplo*\.

      * integer *size*

        Dimension of the matrix

      * string *uplo*

        Fill the upper \(U\) or lower part \(L\)

      * double *value*

        Value to fill the matrix with

  - <a name='39'></a>__::math::linearalgebra::mkHilbert__ *size*

    Create a Hilbert matrix of dimension *size*\. Hilbert matrices are very
    ill\-conditioned with respect to eigenvalue/eigenvector problems\. Therefore
    they are good candidates for testing the accuracy of algorithms and
    implementations\.

      * integer *size*

        Dimension of the matrix

  - <a name='40'></a>__::math::linearalgebra::mkDingdong__ *size*

    Create a "dingdong" matrix of dimension *size*\. Dingdong matrices are
    imprecisely represented, but have the property of being very stable in such
    algorithms as Gauss elimination\.

      * integer *size*

        Dimension of the matrix

  - <a name='41'></a>__::math::linearalgebra::mkOnes__ *size*

    Create a square matrix of dimension *size* whose entries are all 1\.

      * integer *size*

        Dimension of the matrix

  - <a name='42'></a>__::math::linearalgebra::mkMoler__ *size*

    Create a Moler matrix of size *size*\. \(Moler matrices have a very simple
    Choleski decomposition\. It has one small eigenvalue and it can easily upset
    elimination methods for systems of linear equations\.\)

      * integer *size*

        Dimension of the matrix

  - <a name='43'></a>__::math::linearalgebra::mkFrank__ *size*

    Create a Frank matrix of size *size*\. \(Frank matrices are fairly
    well\-behaved matrices\)

      * integer *size*

        Dimension of the matrix

  - <a name='44'></a>__::math::linearalgebra::mkBorder__ *size*

    Create a bordered matrix of size *size*\. \(Bordered matrices have a very
    low rank and can upset certain specialised algorithms\.\)

      * integer *size*

        Dimension of the matrix

  - <a name='45'></a>__::math::linearalgebra::mkWilkinsonW\+__ *size*

    Create a Wilkinson W\+ of size *size*\. This kind of matrix has pairs of
    eigenvalues that are very close together\. Usually the order \(size\) is odd\.

      * integer *size*

        Dimension of the matrix

  - <a name='46'></a>__::math::linearalgebra::mkWilkinsonW\-__ *size*

    Create a Wilkinson W\- of size *size*\. This kind of matrix has pairs of
    eigenvalues with opposite signs, when the order \(size\) is odd\.

      * integer *size*

        Dimension of the matrix

*Common algorithms*

  - <a name='47'></a>__::math::linearalgebra::solveGauss__ *matrix* *bvect*

    Solve a system of linear equations \(Ax=b\) using Gauss elimination\. Returns
    the solution \(x\) as a vector or matrix of the same shape as bvect\.

      * list *matrix*

        Square matrix \(matrix A\)

      * list *bvect*

        Vector or matrix whose columns are the individual b\-vectors

  - <a name='48'></a>__::math::linearalgebra::solvePGauss__ *matrix* *bvect*

    Solve a system of linear equations \(Ax=b\) using Gauss elimination with
    partial pivoting\. Returns the solution \(x\) as a vector or matrix of the same
    shape as bvect\.

      * list *matrix*

        Square matrix \(matrix A\)

      * list *bvect*

        Vector or matrix whose columns are the individual b\-vectors

  - <a name='49'></a>__::math::linearalgebra::solveTriangular__ *matrix* *bvect* ?uplo?

    Solve a system of linear equations \(Ax=b\) by backward substitution\. The
    matrix is supposed to be upper\-triangular\.

      * list *matrix*

        Lower or upper\-triangular matrix \(matrix A\)

      * list *bvect*

        Vector or matrix whose columns are the individual b\-vectors

      * string *uplo*

        Indicates whether the matrix is lower\-triangular \(L\) or upper\-triangular
        \(U\)\. Defaults to "U"\.

  - <a name='50'></a>__::math::linearalgebra::solveGaussBand__ *matrix* *bvect*

    Solve a system of linear equations \(Ax=b\) using Gauss elimination, where the
    matrix is stored as a band matrix \(*cf\.* [STORAGE](#section3)\)\.
    Returns the solution \(x\) as a vector or matrix of the same shape as bvect\.

      * list *matrix*

        Square matrix \(matrix A; in band form\)

      * list *bvect*

        Vector or matrix whose columns are the individual b\-vectors

  - <a name='51'></a>__::math::linearalgebra::solveTriangularBand__ *matrix* *bvect*

    Solve a system of linear equations \(Ax=b\) by backward substitution\. The
    matrix is supposed to be upper\-triangular and stored in band form\.

      * list *matrix*

        Upper\-triangular matrix \(matrix A\)

      * list *bvect*

        Vector or matrix whose columns are the individual b\-vectors

  - <a name='52'></a>__::math::linearalgebra::determineSVD__ *A* *eps*

    Determines the Singular Value Decomposition of a matrix: A = U S Vtrans\.
    Returns a list with the matrix U, the vector of singular values S and the
    matrix V\.

      * list *A*

        Matrix to be decomposed

      * float *eps*

        Tolerance \(defaults to 2\.3e\-16\)

  - <a name='53'></a>__::math::linearalgebra::eigenvectorsSVD__ *A* *eps*

    Determines the eigenvectors and eigenvalues of a real *symmetric* matrix,
    using SVD\. Returns a list with the matrix of normalized eigenvectors and
    their eigenvalues\.

      * list *A*

        Matrix whose eigenvalues must be determined

      * float *eps*

        Tolerance \(defaults to 2\.3e\-16\)

  - <a name='54'></a>__::math::linearalgebra::leastSquaresSVD__ *A* *y* *qmin* *eps*

    Determines the solution to a least\-sqaures problem Ax ~ y via singular value
    decomposition\. The result is the vector x\.

    Note that if you add a column of 1s to the matrix, then this column will
    represent a constant like in: y = a\*x1 \+ b\*x2 \+ c\. To force the intercept to
    be zero, simply leave it out\.

      * list *A*

        Matrix of independent variables

      * list *y*

        List of observed values

      * float *qmin*

        Minimum singular value to be considered \(defaults to 0\.0\)

      * float *eps*

        Tolerance \(defaults to 2\.3e\-16\)

  - <a name='55'></a>__::math::linearalgebra::choleski__ *matrix*

    Determine the Choleski decomposition of a symmetric positive semidefinite
    matrix \(this condition is not checked\!\)\. The result is the lower\-triangular
    matrix L such that L Lt = matrix\.

      * list *matrix*

        Matrix to be decomposed

  - <a name='56'></a>__::math::linearalgebra::orthonormalizeColumns__ *matrix*

    Use the modified Gram\-Schmidt method to orthogonalize and normalize the
    *columns* of the given matrix and return the result\.

      * list *matrix*

        Matrix whose columns must be orthonormalized

  - <a name='57'></a>__::math::linearalgebra::orthonormalizeRows__ *matrix*

    Use the modified Gram\-Schmidt method to orthogonalize and normalize the
    *rows* of the given matrix and return the result\.

      * list *matrix*

        Matrix whose rows must be orthonormalized

  - <a name='58'></a>__::math::linearalgebra::dger__ *matrix* *alpha* *x* *y* ?scope?

    Perform the rank 1 operation A \+ alpha\*x\*y' inline \(that is: the matrix A is
    adjusted\)\. For convenience the new matrix is also returned as the result\.

      * list *matrix*

        Matrix whose rows must be adjusted

      * double *alpha*

        Scale factor

      * list *x*

        A column vector

      * list *y*

        A column vector

      * list *scope*

        If not provided, the operation is performed on all rows/columns of A if
        provided, it is expected to be the list \{imin imax jmin jmax\} where:

          + *imin* Minimum row index

          + *imax* Maximum row index

          + *jmin* Minimum column index

          + *jmax* Maximum column index

  - <a name='59'></a>__::math::linearalgebra::dgetrf__ *matrix*

    Computes an LU factorization of a general matrix, using partial, pivoting
    with row interchanges\. Returns the permutation vector\.

    The factorization has the form

        P * A = L * U

    where P is a permutation matrix, L is lower triangular with unit diagonal
    elements, and U is upper triangular\. Returns the permutation vector, as a
    list of length n\-1\. The last entry of the permutation is not stored, since
    it is implicitely known, with value n \(the last row is not swapped with any
    other row\)\. At index \#i of the permutation is stored the index of the row \#j
    which is swapped with row \#i at step \#i\. That means that each index of the
    permutation gives the permutation at each step, not the cumulated
    permutation matrix, which is the product of permutations\.

      * list *matrix*

        On entry, the matrix to be factored\. On exit, the factors L and U from
        the factorization P\*A = L\*U; the unit diagonal elements of L are not
        stored\.

  - <a name='60'></a>__::math::linearalgebra::det__ *matrix*

    Returns the determinant of the given matrix, based on PA=LU decomposition,
    i\.e\. Gauss partial pivotal\.

      * list *matrix*

        Square matrix \(matrix A\)

      * list *ipiv*

        The pivots \(optionnal\)\. If the pivots are not provided, a PA=LU
        decomposition is performed\. If the pivots are provided, we assume that
        it contains the pivots and that the matrix A contains the L and U
        factors, as provided by dgterf\. b\-vectors

  - <a name='61'></a>__::math::linearalgebra::largesteigen__ *matrix* *tolerance* *maxiter*

    Returns a list made of the largest eigenvalue \(in magnitude\) and associated
    eigenvector\. Uses iterative Power Method as provided as algorithm \#7\.3\.3 of
    Golub & Van Loan\. This algorithm is used here for a dense matrix \(but is
    usually used for sparse matrices\)\.

      * list *matrix*

        Square matrix \(matrix A\)

      * double *tolerance*

        The relative tolerance of the eigenvalue \(default:1\.e\-8\)\.

      * integer *maxiter*

        The maximum number of iterations \(default:10\)\.

*Compability with the LA package* Two procedures are provided for
compatibility with Hume's LA package:

  - <a name='62'></a>__::math::linearalgebra::to\_LA__ *mv*

    Transforms a vector or matrix into the format used by the original LA
    package\.

      * list *mv*

        Matrix or vector

  - <a name='63'></a>__::math::linearalgebra::from\_LA__ *mv*

    Transforms a vector or matrix from the format used by the original LA
    package into the format used by the present implementation\.

      * list *mv*

        Matrix or vector as used by the LA package

# <a name='section3'></a>STORAGE

While most procedures assume that the matrices are given in full form, the
procedures *solveGaussBand* and *solveTriangularBand* assume that the
matrices are stored as *band matrices*\. This common type of "sparse" matrices
is related to ordinary matrices as follows:

  - "A" is a full\-size matrix with N rows and M columns\.

  - "B" is a band matrix, with m upper and lower diagonals and n rows\.

  - "B" can be stored in an ordinary matrix of \(2m\+1\) columns \(one for each
    off\-diagonal and the main diagonal\) and n rows\.

  - Element i,j \(i = \-m,\.\.\.,m; j =1,\.\.\.,n\) of "B" corresponds to element k,j of
    "A" where k = M\+i\-1 and M is at least \(\!\) n, the number of rows in "B"\.

  - To set element \(i,j\) of matrix "B" use:

        setelem B $j [expr {$N+$i-1}] $value

\(There is no convenience procedure for this yet\)

# <a name='section4'></a>REMARKS ON THE IMPLEMENTATION

There is a difference between the original LA package by Hume and the current
implementation\. Whereas the LA package uses a linear list, the current package
uses lists of lists to represent matrices\. It turns out that with this
representation, the algorithms are faster and easier to implement\.

The LA package was used as a model and in fact the implementation of, for
instance, the SVD algorithm was taken from that package\. The set of procedures
was expanded using ideas from the well\-known BLAS library and some algorithms
were updated from the second edition of J\.C\. Nash's book, Compact Numerical
Methods for Computers, \(Adam Hilger, 1990\) that inspired the LA package\.

Two procedures are provided to make the transition between the two
implementations easier: *to\_LA* and *from\_LA*\. They are described above\.

# <a name='section5'></a>TODO

Odds and ends: the following algorithms have not been implemented yet:

  - determineQR

  - certainlyPositive, diagonallyDominant

# <a name='section6'></a>NAMING CONFLICT

If you load this package in a Tk\-enabled shell like wish, then the command

    namespace import ::math::linearalgebra

results in an error message about "scale"\. This is due to the fact that Tk
defines all its commands in the global namespace\. The solution is to import the
linear algebra commands in a namespace that is not the global one:

    package require math::linearalgebra
    namespace eval compute {
        namespace import ::math::linearalgebra::*
        ... use the linear algebra version of scale ...
    }

To use Tk's scale command in that same namespace you can rename it:

    namespace eval compute {
        rename ::scale scaleTk
        scaleTk .scale ...
    }

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: linearalgebra* of
the [Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also
report any ideas for enhancements you may have for either package and/or
documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[least squares](\.\./\.\./\.\./\.\./index\.md\#least\_squares), [linear
algebra](\.\./\.\./\.\./\.\./index\.md\#linear\_algebra), [linear
equations](\.\./\.\./\.\./\.\./index\.md\#linear\_equations),
[math](\.\./\.\./\.\./\.\./index\.md\#math),
[matrices](\.\./\.\./\.\./\.\./index\.md\#matrices),
[matrix](\.\./\.\./\.\./\.\./index\.md\#matrix),
[vectors](\.\./\.\./\.\./\.\./index\.md\#vectors)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004\-2008 Arjen Markus <arjenmarkus@users\.sourceforge\.net>  
Copyright &copy; 2004 Ed Hume <http://www\.hume\.com/contact\.us\.htm>  
Copyright &copy; 2008 Michael Buadin <relaxkmike@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/machineparameters.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231

[//000000001]: # (math::machineparameters \- tclrep)
[//000000002]: # (Generated from file 'machineparameters\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008 Michael Baudin <michael\.baudin@sourceforge\.net>)
[//000000004]: # (math::machineparameters\(n\) 1\.0 tcllib "tclrep")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::machineparameters \- Compute double precision machine parameters\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLE](#section2)

  - [REFERENCES](#section3)

  - [CLASS API](#section4)

  - [OBJECT API](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit  
package require math::machineparameters 0\.1  

[__machineparameters__ create *objectname* ?*options*\.\.\.?](#1)  
[*objectname* __configure__ ?*options*\.\.\.?](#2)  
[*objectname* __cget__ *opt*](#3)  
[*objectname* __destroy__](#4)  
[*objectname* __compute__](#5)  
[*objectname* __get__ *key*](#6)  
[*objectname* __tostring__](#7)  
[*objectname* __print__](#8)  

# <a name='description'></a>DESCRIPTION

The *math::machineparameters* package is the Tcl equivalent of the DLAMCH
LAPACK function\. In floating point systems, a floating point number is
represented by

    x = +/- d1 d2 ... dt basis^e

where digits satisfy

    0 <= di <= basis - 1, i = 1, t

with the convention :

  - t is the size of the mantissa

  - basis is the basis \(the "radix"\)

The __compute__ method computes all machine parameters\. Then, the
__get__ method can be used to get each parameter\. The __print__ method
prints a report on standard output\.

# <a name='section2'></a>EXAMPLE

In the following example, one compute the parameters of a desktop under Linux
with the following Tcl 8\.4\.19 properties :

    % parray tcl_platform
    tcl_platform(byteOrder) = littleEndian
    tcl_platform(machine)   = i686
    tcl_platform(os)        = Linux
    tcl_platform(osVersion) = 2.6.24-19-generic
    tcl_platform(platform)  = unix
    tcl_platform(tip,268)   = 1
    tcl_platform(tip,280)   = 1
    tcl_platform(user)      = <username>
    tcl_platform(wordSize)  = 4

The following example creates a machineparameters object, computes the
properties and displays it\.

    set pp [machineparameters create %AUTO%]
    $pp compute
    $pp print
    $pp destroy

This prints out :

    Machine parameters
    Epsilon : 1.11022302463e-16
    Beta : 2
    Rounding : proper
    Mantissa : 53
    Maximum exponent : 1024
    Minimum exponent : -1021
    Overflow threshold : 8.98846567431e+307
    Underflow threshold : 2.22507385851e-308

That compares well with the results produced by Lapack 3\.1\.1 :

    Epsilon                      =   1.11022302462515654E-016
    Safe minimum                 =   2.22507385850720138E-308
    Base                         =    2.0000000000000000
    Precision                    =   2.22044604925031308E-016
    Number of digits in mantissa =    53.000000000000000
    Rounding mode                =   1.00000000000000000
    Minimum exponent             =   -1021.0000000000000
    Underflow threshold          =   2.22507385850720138E-308
    Largest exponent             =    1024.0000000000000
    Overflow threshold           =   1.79769313486231571E+308
    Reciprocal of safe minimum   =   4.49423283715578977E+307

The following example creates a machineparameters object, computes the
properties and gets the epsilon for the machine\.

    set pp [machineparameters create %AUTO%]
    $pp compute
    set eps [$pp get -epsilon]
    $pp destroy

# <a name='section3'></a>REFERENCES

  - "Algorithms to Reveal Properties of Floating\-Point Arithmetic", Michael A\.
    Malcolm, Stanford University, Communications of the ACM, Volume 15 , Issue
    11 \(November 1972\), Pages: 949 \- 951

  - "More on Algorithms that Reveal Properties of Floating, Point Arithmetic
    Units", W\. Morven Gentleman, University of Waterloo, Scott B\. Marovich,
    Purdue University, Communications of the ACM, Volume 17 , Issue 5 \(May
    1974\), Pages: 276 \- 277

# <a name='section4'></a>CLASS API

  - <a name='1'></a>__machineparameters__ create *objectname* ?*options*\.\.\.?

    The command creates a new machineparameters object and returns the fully
    qualified name of the object command as its result\.

      * __\-verbose__ *verbose*

        Set this option to 1 to enable verbose logging\. This option is mainly
        for debug purposes\. The default value of *verbose* is 0\.

# <a name='section5'></a>OBJECT API

  - <a name='2'></a>*objectname* __configure__ ?*options*\.\.\.?

    The command configure the options of the object *objectname*\. The options
    are the same as the static method __create__\.

  - <a name='3'></a>*objectname* __cget__ *opt*

    Returns the value of the option which name is *opt*\. The options are the
    same as the method __create__ and __configure__\.

  - <a name='4'></a>*objectname* __destroy__

    Destroys the object *objectname*\.

  - <a name='5'></a>*objectname* __compute__

    Computes the machine parameters\.

  - <a name='6'></a>*objectname* __get__ *key*

    Returns the value corresponding with given key\. The following is the list of
    available keys\.

      * \-epsilon : smallest value so that 1\+epsilon>1 is false

      * \-rounding : The rounding mode used on the machine\. The rounding occurs
        when more than t digits would be required to represent the number\. Two
        modes can be determined with the current system : "chop" means than only
        t digits are kept, no matter the value of the number "proper" means that
        another rounding mode is used, be it "round to nearest", "round up",
        "round down"\.

      * \-basis : the basis of the floating\-point representation\. The basis is
        usually 2, i\.e\. binary representation \(for example IEEE 754 machines\),
        but some machines \(like HP calculators for example\) uses 10, or 16,
        etc\.\.\.

      * \-mantissa : the number of bits in the mantissa

      * \-exponentmax : the largest positive exponent before overflow occurs

      * \-exponentmin : the largest negative exponent before \(gradual\) underflow
        occurs

      * \-vmax : largest positive value before overflow occurs

      * \-vmin : largest negative value before \(gradual\) underflow occurs

  - <a name='7'></a>*objectname* __tostring__

    Return a report for machine parameters\.

  - <a name='8'></a>*objectname* __print__

    Print machine parameters on standard output\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008 Michael Baudin <michael\.baudin@sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/math.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180

[//000000001]: # (math \- Tcl Math Library)
[//000000002]: # (Generated from file 'math\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (math\(n\) 1\.2\.5 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math \- Tcl Math Library

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [BASIC COMMANDS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require math ?1\.2\.5?  

[__::math::cov__ *value* *value* ?*value \.\.\.*?](#1)  
[__::math::integrate__ *list of xy value pairs*](#2)  
[__::math::fibonacci__ *n*](#3)  
[__::math::max__ *value* ?*value \.\.\.*?](#4)  
[__::math::mean__ *value* ?*value \.\.\.*?](#5)  
[__::math::min__ *value* ?*value \.\.\.*?](#6)  
[__::math::product__ *value* ?*value \.\.\.*?](#7)  
[__::math::random__ ?*value1*? ?*value2*?](#8)  
[__::math::sigma__ *value* *value* ?*value \.\.\.*?](#9)  
[__::math::stats__ *value* *value* ?*value \.\.\.*?](#10)  
[__::math::sum__ *value* ?*value \.\.\.*?](#11)  

# <a name='description'></a>DESCRIPTION

The __math__ package provides utility math functions\.

Besides a set of basic commands, available via the package *math*, there are
more specialised packages:

  - __[math::bigfloat](bigfloat\.md)__ \- Arbitrary\-precision
    floating\-point arithmetic

  - __[math::bignum](bignum\.md)__ \- Arbitrary\-precision integer
    arithmetic

  - __[math::calculus::romberg](romberg\.md)__ \- Robust integration
    methods for functions of one variable, using Romberg integration

  - __[math::calculus](calculus\.md)__ \- Integration of functions,
    solving ordinary differential equations

  - __[math::combinatorics](combinatorics\.md)__ \- Procedures for various
    combinatorial functions \(for instance the Gamma function and "k out of n"\)

  - __[math::complexnumbers](qcomplex\.md)__ \- Complex number arithmetic

  - __[math::constants](constants\.md)__ \- A set of well\-known
    mathematical constants, such as Pi, E, and the golden ratio

  - __[math::fourier](fourier\.md)__ \- Discrete Fourier transforms

  - __[math::fuzzy](fuzzy\.md)__ \- Fuzzy comparisons of floating\-point
    numbers

  - __[math::geometry](math\_geometry\.md)__ \- 2D geometrical computations

  - __[math::interpolate](interpolate\.md)__ \- Various interpolation
    methods

  - __[math::linearalgebra](linalg\.md)__ \- Linear algebra package

  - __[math::optimize](optimize\.md)__ \- Optimization methods

  - __[math::polynomials](polynomials\.md)__ \- Polynomial arithmetic
    \(includes families of classical polynomials\)

  - __[math::rationalfunctions](rational\_funcs\.md)__ \- Arithmetic of
    rational functions

  - __[math::roman](roman\.md)__ \- Manipulation \(including arithmetic\) of
    Roman numerals

  - __[math::special](special\.md)__ \- Approximations of special
    functions from mathematical physics

  - __[math::statistics](statistics\.md)__ \- Statistical operations and
    tests

# <a name='section2'></a>BASIC COMMANDS

  - <a name='1'></a>__::math::cov__ *value* *value* ?*value \.\.\.*?

    Return the coefficient of variation expressed as percent of two or more
    numeric values\.

  - <a name='2'></a>__::math::integrate__ *list of xy value pairs*

    Return the area under a "curve" defined by a set of x,y pairs and the error
    bound as a list\.

  - <a name='3'></a>__::math::fibonacci__ *n*

    Return the *n*'th Fibonacci number\.

  - <a name='4'></a>__::math::max__ *value* ?*value \.\.\.*?

    Return the maximum of one or more numeric values\.

  - <a name='5'></a>__::math::mean__ *value* ?*value \.\.\.*?

    Return the mean, or "average" of one or more numeric values\.

  - <a name='6'></a>__::math::min__ *value* ?*value \.\.\.*?

    Return the minimum of one or more numeric values\.

  - <a name='7'></a>__::math::product__ *value* ?*value \.\.\.*?

    Return the product of one or more numeric values\.

  - <a name='8'></a>__::math::random__ ?*value1*? ?*value2*?

    Return a random number\. If no arguments are given, the number is a floating
    point value between 0 and 1\. If one argument is given, the number is an
    integer value between 0 and *value1*\. If two arguments are given, the
    number is an integer value between *value1* and *value2*\.

  - <a name='9'></a>__::math::sigma__ *value* *value* ?*value \.\.\.*?

    Return the population standard deviation of two or more numeric values\.

  - <a name='10'></a>__::math::stats__ *value* *value* ?*value \.\.\.*?

    Return the mean, standard deviation, and coefficient of variation \(as
    percent\) as a list\.

  - <a name='11'></a>__::math::sum__ *value* ?*value \.\.\.*?

    Return the sum of one or more numeric values\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[math](\.\./\.\./\.\./\.\./index\.md\#math),
[statistics](\.\./\.\./\.\./\.\./index\.md\#statistics)

# <a name='category'></a>CATEGORY

Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/math_geometry.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050

[//000000001]: # (math::geometry \- Tcl Math Library)
[//000000002]: # (Generated from file 'math\_geometry\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2001 by Ideogramic ApS and other parties)
[//000000004]: # (Copyright &copy; 2010 by Andreas Kupries)
[//000000005]: # (Copyright &copy; 2010 by Kevin Kenny)
[//000000006]: # (Copyright &copy; 2018 by Arjen Markus)
[//000000007]: # (Copyright &copy; 2020 by Manfred Rosenberger)
[//000000008]: # (math::geometry\(n\) 1\.4\.1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::geometry \- Geometrical computations

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [COORDINATE SYSTEM](#section3)

  - [References](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.5?  
package require math::geometry ?1\.4\.1?  

[__::math::geometry::\+__ *point1* *point2*](#1)  
[__::math::geometry::\-__ *point1* *point2*](#2)  
[__::math::geometry::p__ *x* *y*](#3)  
[__::math::geometry::distance__ *point1* *point2*](#4)  
[__::math::geometry::length__ *point*](#5)  
[__::math::geometry::s\*__ *factor* *point*](#6)  
[__::math::geometry::direction__ *angle*](#7)  
[__::math::geometry::h__ *length*](#8)  
[__::math::geometry::v__ *length*](#9)  
[__::math::geometry::between__ *point1* *point2* *s*](#10)  
[__::math::geometry::octant__ *point*](#11)  
[__::math::geometry::rect__ *nw* *se*](#12)  
[__::math::geometry::nwse__ *rect*](#13)  
[__::math::geometry::angle__ *line*](#14)  
[__::math::geometry::angleBetween__ *vector1* *vector2*](#15)  
[__::math::geometry::inproduct__ *vector1* *vector2*](#16)  
[__::math::geometry::areaParallellogram__ *vector1* *vector2*](#17)  
[__::math::geometry::calculateDistanceToLine__ *P* *line*](#18)  
[__::math::geometry::calculateDistanceToLineSegment__ *P* *linesegment*](#19)  
[__::math::geometry::calculateDistanceToPolyline__ *P* *polyline*](#20)  
[__::math::geometry::calculateDistanceToPolygon__ *P* *polygon*](#21)  
[__::math::geometry::findClosestPointOnLine__ *P* *line*](#22)  
[__::math::geometry::findClosestPointOnLineSegment__ *P* *linesegment*](#23)  
[__::math::geometry::findClosestPointOnPolyline__ *P* *polyline*](#24)  
[__::math::geometry::lengthOfPolyline__ *polyline*](#25)  
[__::math::geometry::movePointInDirection__ *P* *direction* *dist*](#26)  
[__::math::geometry::lineSegmentsIntersect__ *linesegment1* *linesegment2*](#27)  
[__::math::geometry::findLineSegmentIntersection__ *linesegment1* *linesegment2*](#28)  
[__::math::geometry::findLineIntersection__ *line1* *line2*](#29)  
[__::math::geometry::polylinesIntersect__ *polyline1* *polyline2*](#30)  
[__::math::geometry::polylinesBoundingIntersect__ *polyline1* *polyline2* *granularity*](#31)  
[__::math::geometry::intervalsOverlap__ *y1* *y2* *y3* *y4* *strict*](#32)  
[__::math::geometry::rectanglesOverlap__ *P1* *P2* *Q1* *Q2* *strict*](#33)  
[__::math::geometry::bbox__ *polyline*](#34)  
[__::math::geometry::overlapBBox__ *polyline1* *polyline2* ?strict?](#35)  
[__::math::geometry::pointInsideBBox__ *bbox* *point*](#36)  
[__::math::geometry::cathetusPoint__ *pa* *pb* *cathetusLength* ?location?](#37)  
[__::math::geometry::parallel__ *line* *offset* ?orient?](#38)  
[__::math::geometry::unitVector__ *line*](#39)  
[__::math::geometry::pointInsidePolygon__ *P* *polyline*](#40)  
[__::math::geometry::pointInsidePolygonAlt__ *P* *polyline*](#41)  
[__::math::geometry::rectangleInsidePolygon__ *P1* *P2* *polyline*](#42)  
[__::math::geometry::areaPolygon__ *polygon*](#43)  
[__::math::geometry::translate__ *vector* *polyline*](#44)  
[__::math::geometry::rotate__ *angle* *polyline*](#45)  
[__::math::geometry::rotateAbout__ *p* *angle* *polyline*](#46)  
[__::math::geometry::reflect__ *angle* *polyline*](#47)  
[__::math::geometry::degToRad__ *angle*](#48)  
[__::math::geometry::radToDeg__ *angle*](#49)  
[__::math::geometry::circle__ *centre* *radius*](#50)  
[__::math::geometry::circleTwoPoints__ *point1* *point2*](#51)  
[__::math::geometry::pointInsideCircle__ *point* *circle*](#52)  
[__::math::geometry::lineIntersectsCircle__ *line* *circle*](#53)  
[__::math::geometry::lineSegmentIntersectsCircle__ *segment* *circle*](#54)  
[__::math::geometry::intersectionLineWithCircle__ *line* *circle*](#55)  
[__::math::geometry::intersectionCircleWithCircle__ *circle1* *circle2*](#56)  
[__::math::geometry::tangentLinesToCircle__ *point* *circle*](#57)  
[__::math::geometry::intersectionPolylines__ *polyline1* *polyline2* ?mode? ?granularity?](#58)  
[__::math::geometry::intersectionPolylineCircle__ *polyline* *circle* ?mode? ?granularity?](#59)  
[__::math::geometry::polylineCutOrigin__ *polyline1* *polyline2* ?granularity?](#60)  
[__::math::geometry::polylineCutEnd__ *polyline1* *polyline2* ?granularity?](#61)  
[__::math::geometry::splitPolyline__ *polyline* *numberVertex*](#62)  
[__::math::geometry::enrichPolyline__ *polyline* *accuracy*](#63)  
[__::math::geometry::cleanupPolyline__ *polyline*](#64)  

# <a name='description'></a>DESCRIPTION

The __math::geometry__ package is a collection of functions for computations
and manipulations on two\-dimensional geometrical objects, such as points, lines
and polygons\.

The geometrical objects are implemented as plain lists of coordinates\. For
instance a line is defined by a list of four numbers, the x\- and y\-coordinate of
a first point and the x\- and y\-coordinates of a second point on the line\.

*Note:* In version 1\.4\.0 an inconsistency was repaired \- see
[https://core\.tcl\-lang\.org/tcllib/tktview?name=fb4812f82b](https://core\.tcl\-lang\.org/tcllib/tktview?name=fb4812f82b)\.
More in [COORDINATE SYSTEM](#section3)

The various types of object are recognised by the number of coordinate pairs and
the context in which they are used: a list of four elements can be regarded as
an infinite line, a finite line segment but also as a polyline of one segment
and a point set of two points\.

Currently the following types of objects are distinguished:

  - *point* \- a list of two coordinates representing the x\- and y\-coordinates
    respectively\.

  - *line* \- a list of four coordinates, interpreted as the x\- and
    y\-coordinates of two distinct points on the line\.

  - *line segment* \- a list of four coordinates, interpreted as the x\- and
    y\-coordinates of the first and the last points on the line segment\.

  - *polyline* \- a list of an even number of coordinates, interpreted as the
    x\- and y\-coordinates of an ordered set of points\.

  - *polygon* \- like a polyline, but the implicit assumption is that the
    polyline is closed \(if the first and last points do not coincide, the
    missing segment is automatically added\)\.

  - *point set* \- again a list of an even number of coordinates, but the
    points are regarded without any ordering\.

  - *circle* \- a list of three numbers, the first two are the coordinates of
    the centre and the third is the radius\.

# <a name='section2'></a>PROCEDURES

The package defines the following public procedures:

  - <a name='1'></a>__::math::geometry::\+__ *point1* *point2*

    Compute the sum of the two vectors given as points and return it\. The result
    is a vector as well\.

  - <a name='2'></a>__::math::geometry::\-__ *point1* *point2*

    Compute the difference \(point1 \- point2\) of the two vectors given as points
    and return it\. The result is a vector as well\.

  - <a name='3'></a>__::math::geometry::p__ *x* *y*

    Construct a point from its coordinates and return it as the result of the
    command\.

  - <a name='4'></a>__::math::geometry::distance__ *point1* *point2*

    Compute the distance between the two points and return it as the result of
    the command\. This is in essence the same as

        math::geometry::length [math::geomtry::- point1 point2]

  - <a name='5'></a>__::math::geometry::length__ *point*

    Compute the length of the vector and return it as the result of the command\.

  - <a name='6'></a>__::math::geometry::s\*__ *factor* *point*

    Scale the vector by the factor and return it as the result of the command\.
    This is a vector as well\.

  - <a name='7'></a>__::math::geometry::direction__ *angle*

    Given the angle in degrees this command computes and returns the unit vector
    pointing into this direction\. The vector for angle == 0 points to the right
    \(east\), and for angle == 90 up \(north\)\.

  - <a name='8'></a>__::math::geometry::h__ *length*

    Returns a horizontal vector on the X\-axis of the specified length\. Positive
    lengths point to the right \(east\)\.

  - <a name='9'></a>__::math::geometry::v__ *length*

    Returns a vertical vector on the Y\-axis of the specified length\. Positive
    lengths point down \(south\)\.

  - <a name='10'></a>__::math::geometry::between__ *point1* *point2* *s*

    Compute the point which is at relative distance *s* between the two points
    and return it as the result of the command\. A relative distance of __0__
    returns *point1*, the distance __1__ returns *point2*\. Distances < 0
    or > 1 extrapolate along the line between the two point\.

  - <a name='11'></a>__::math::geometry::octant__ *point*

    Compute the octant of the circle the point is in and return it as the result
    of the command\. The possible results are

      1. east

      1. northeast

      1. north

      1. northwest

      1. west

      1. southwest

      1. south

      1. southeast

    Each octant is the arc of the circle \+/\- 22\.5 degrees from the cardinal
    direction the octant is named for\.

  - <a name='12'></a>__::math::geometry::rect__ *nw* *se*

    Construct a rectangle from its northwest and southeast corners and return it
    as the result of the command\.

  - <a name='13'></a>__::math::geometry::nwse__ *rect*

    Extract the northwest and southeast corners of the rectangle and return them
    as the result of the command \(a 2\-element list containing the points, in the
    named order\)\.

  - <a name='14'></a>__::math::geometry::angle__ *line*

    Calculate the angle from the positive x\-axis to a given line \(in two
    dimensions only\)\.

      * list *line*

        Coordinates of the line

  - <a name='15'></a>__::math::geometry::angleBetween__ *vector1* *vector2*

    Calculate the angle between two vectors \(in degrees\)

      * list *vector1*

        First vector

      * list *vector2*

        Second vector

  - <a name='16'></a>__::math::geometry::inproduct__ *vector1* *vector2*

    Calculate the inner product of two vectors

      * list *vector1*

        First vector

      * list *vector2*

        Second vector

  - <a name='17'></a>__::math::geometry::areaParallellogram__ *vector1* *vector2*

    Calculate the area of the parallellogram with the two vectors as its sides

      * list *vector1*

        First vector

      * list *vector2*

        Second vector

  - <a name='18'></a>__::math::geometry::calculateDistanceToLine__ *P* *line*

    Calculate the distance of point P to the \(infinite\) line and return the
    result

      * list *P*

        List of two numbers, the coordinates of the point

      * list *line*

        List of four numbers, the coordinates of two points on the line

  - <a name='19'></a>__::math::geometry::calculateDistanceToLineSegment__ *P* *linesegment*

    Calculate the distance of point P to the \(finite\) line segment and return
    the result\.

      * list *P*

        List of two numbers, the coordinates of the point

      * list *linesegment*

        List of four numbers, the coordinates of the first and last points of
        the line segment

  - <a name='20'></a>__::math::geometry::calculateDistanceToPolyline__ *P* *polyline*

    Calculate the distance of point P to the polyline and return the result\.
    Note that a polyline needs not to be closed\.

      * list *P*

        List of two numbers, the coordinates of the point

      * list *polyline*

        List of numbers, the coordinates of the vertices of the polyline

  - <a name='21'></a>__::math::geometry::calculateDistanceToPolygon__ *P* *polygon*

    Calculate the distance of point P to the polygon and return the result\. If
    the list of coordinates is not closed \(first and last points differ\), it is
    automatically closed\.

      * list *P*

        List of two numbers, the coordinates of the point

      * list *polygon*

        List of numbers, the coordinates of the vertices of the polygon

  - <a name='22'></a>__::math::geometry::findClosestPointOnLine__ *P* *line*

    Return the point on a line which is closest to a given point\.

      * list *P*

        List of two numbers, the coordinates of the point

      * list *line*

        List of four numbers, the coordinates of two points on the line

  - <a name='23'></a>__::math::geometry::findClosestPointOnLineSegment__ *P* *linesegment*

    Return the point on a *line segment* which is closest to a given point\.

      * list *P*

        List of two numbers, the coordinates of the point

      * list *linesegment*

        List of four numbers, the first and last points on the line segment

  - <a name='24'></a>__::math::geometry::findClosestPointOnPolyline__ *P* *polyline*

    Return the point on a *polyline* which is closest to a given point\.

      * list *P*

        List of two numbers, the coordinates of the point

      * list *polyline*

        List of numbers, the vertices of the polyline

  - <a name='25'></a>__::math::geometry::lengthOfPolyline__ *polyline*

    Return the length of the *polyline* \(note: it not regarded as a polygon\)

      * list *polyline*

        List of numbers, the vertices of the polyline

  - <a name='26'></a>__::math::geometry::movePointInDirection__ *P* *direction* *dist*

    Move a point over a given distance in a given direction and return the new
    coordinates \(in two dimensions only\)\.

      * list *P*

        Coordinates of the point to be moved

      * double *direction*

        Direction \(in degrees; 0 is to the right, 90 upwards\)

      * list *dist*

        Distance over which to move the point

  - <a name='27'></a>__::math::geometry::lineSegmentsIntersect__ *linesegment1* *linesegment2*

    Check if two line segments intersect or coincide\. Returns 1 if that is the
    case, 0 otherwise \(in two dimensions only\)\. If an endpoint of one segment
    lies on the other segment \(or is very close to the segment\), they are
    considered to intersect

      * list *linesegment1*

        First line segment

      * list *linesegment2*

        Second line segment

  - <a name='28'></a>__::math::geometry::findLineSegmentIntersection__ *linesegment1* *linesegment2*

    Find the intersection point of two line segments\. Return the coordinates or
    the keywords "coincident" or "none" if the line segments coincide or have no
    points in common \(in two dimensions only\)\.

      * list *linesegment1*

        First line segment

      * list *linesegment2*

        Second line segment

  - <a name='29'></a>__::math::geometry::findLineIntersection__ *line1* *line2*

    Find the intersection point of two \(infinite\) lines\. Return the coordinates
    or the keywords "coincident" or "none" if the lines coincide or have no
    points in common \(in two dimensions only\)\.

      * list *line1*

        First line

      * list *line2*

        Second line

    See section [References](#section4) for details on the algorithm and
    math behind it\.

  - <a name='30'></a>__::math::geometry::polylinesIntersect__ *polyline1* *polyline2*

    Check if two polylines intersect or not \(in two dimensions only\)\.

      * list *polyline1*

        First polyline

      * list *polyline2*

        Second polyline

  - <a name='31'></a>__::math::geometry::polylinesBoundingIntersect__ *polyline1* *polyline2* *granularity*

    Check whether two polylines intersect, but reduce the correctness of the
    result to the given granularity\. Use this for faster, but weaker,
    intersection checking\.

    How it works:

    Each polyline is split into a number of smaller polylines, consisting of
    granularity points each\. If a pair of those smaller lines' bounding boxes
    intersect, then this procedure returns 1, otherwise it returns 0\.

      * list *polyline1*

        First polyline

      * list *polyline2*

        Second polyline

      * int *granularity*

        Number of points in each part \(<=1 means check every edge\)

  - <a name='32'></a>__::math::geometry::intervalsOverlap__ *y1* *y2* *y3* *y4* *strict*

    Check if two intervals overlap\.

      * double *y1,y2*

        Begin and end of first interval

      * double *y3,y4*

        Begin and end of second interval

      * logical *strict*

        Check for strict or non\-strict overlap

  - <a name='33'></a>__::math::geometry::rectanglesOverlap__ *P1* *P2* *Q1* *Q2* *strict*

    Check if two rectangles overlap\.

      * list *P1*

        upper\-left corner of the first rectangle

      * list *P2*

        lower\-right corner of the first rectangle

      * list *Q1*

        upper\-left corner of the second rectangle

      * list *Q2*

        lower\-right corner of the second rectangle

      * list *strict*

        choosing strict or non\-strict interpretation

  - <a name='34'></a>__::math::geometry::bbox__ *polyline*

    Calculate the bounding box of a polyline\. Returns a list of four
    coordinates: the upper\-left and the lower\-right corner of the box\.

      * list *polyline*

        The polyline to be examined

  - <a name='35'></a>__::math::geometry::overlapBBox__ *polyline1* *polyline2* ?strict?

    Check if the bounding boxes of two polylines overlap or not\.

    Arguments:

      * list *polyline1*

        The first polyline

      * list *polyline1*

        The second polyline

      * int *strict*

        Whether strict overlap is to checked \(1\) or if the bounding boxes may
        touch \(0, default\)

  - <a name='36'></a>__::math::geometry::pointInsideBBox__ *bbox* *point*

    Check if the point is inside or on the bounding box or not\. Arguments:

      * list *bbox*

        The bounding box given as a list of x/y coordinates

      * list *point*

        The point to be checked

  - <a name='37'></a>__::math::geometry::cathetusPoint__ *pa* *pb* *cathetusLength* ?location?

    Return the third point of the rectangular triangle defined by the two given
    end points of the hypothenusa\. The triangle's side from point A \(or B, if
    the location is given as "b"\) to the third point is the cathetus length\. If
    the cathetus' length is lower than the length of the hypothenusa, an empty
    list is returned\.

    Arguments:

      * list *pa*

        The starting point on hypotenuse

      * list *pb*

        The ending point on hypotenuse

      * float *cathetusLength*

        The length of the cathetus of the triangle

      * string *location*

        The location of the given cathetus, "a" means given cathetus shares
        point pa \(default\) "b" means given cathetus shares point pb

  - <a name='38'></a>__::math::geometry::parallel__ *line* *offset* ?orient?

    Return a line parallel to the given line, with a distance "offset"\. The
    orientation is determined by the two points defining the line\.

    Arguments:

      * list *line*

        The given line

      * float *offset*

        The distance to the given line

      * string *orient*

        Orientation of the new line with respect to the given line \(defaults to
        "right"\)

  - <a name='39'></a>__::math::geometry::unitVector__ *line*

    Return a unit vector from the given line or direction, if the
    *[line](\.\./\.\./\.\./\.\./index\.md\#line)* argument is a single point \(then a
    line through the origin is assumed\) Arguments:

      * list *line*

        The line in question \(or a single point, implying a line through the
        origin\)

  - <a name='40'></a>__::math::geometry::pointInsidePolygon__ *P* *polyline*

    Determine if a point is completely inside a polygon\. If the point touches
    the polygon, then the point is not completely inside the polygon\.

      * list *P*

        Coordinates of the point

      * list *polyline*

        The polyline to be examined

  - <a name='41'></a>__::math::geometry::pointInsidePolygonAlt__ *P* *polyline*

    Determine if a point is completely inside a polygon\. If the point touches
    the polygon, then the point is not completely inside the polygon\. *Note:*
    this alternative procedure uses the so\-called winding number to determine
    this\. It handles self\-intersecting polygons in a "natural" way\.

      * list *P*

        Coordinates of the point

      * list *polyline*

        The polyline to be examined

  - <a name='42'></a>__::math::geometry::rectangleInsidePolygon__ *P1* *P2* *polyline*

    Determine if a rectangle is completely inside a polygon\. If polygon touches
    the rectangle, then the rectangle is not complete inside the polygon\.

      * list *P1*

        Upper\-left corner of the rectangle

      * list *P2*

        Lower\-right corner of the rectangle

      * list *polygon*

        The polygon in question

  - <a name='43'></a>__::math::geometry::areaPolygon__ *polygon*

    Calculate the area of a polygon\.

      * list *polygon*

        The polygon in question

  - <a name='44'></a>__::math::geometry::translate__ *vector* *polyline*

    Translate a polyline over a given vector

      * list *vector*

        Translation vector

      * list *polyline*

        The polyline to be translated

  - <a name='45'></a>__::math::geometry::rotate__ *angle* *polyline*

    Rotate a polyline over a given angle \(degrees\) around the origin

      * list *angle*

        Angle over which to rotate the polyline \(degrees\)

      * list *polyline*

        The polyline to be rotated

  - <a name='46'></a>__::math::geometry::rotateAbout__ *p* *angle* *polyline*

    Rotate a polyline around a given point p and return the new polyline\.

    Arguments:

      * list *p*

        The point of rotation

      * float *angle*

        The angle over which to rotate the polyline \(degrees\)

      * list *polyline*

        The polyline to be rotated

  - <a name='47'></a>__::math::geometry::reflect__ *angle* *polyline*

    Reflect a polyline in a line through the origin at a given angle \(degrees\)
    to the x\-axis

      * list *angle*

        Angle of the line of reflection \(degrees\)

      * list *polyline*

        The polyline to be reflected

  - <a name='48'></a>__::math::geometry::degToRad__ *angle*

    Convert from degrees to radians

      * list *angle*

        Angle in degrees

  - <a name='49'></a>__::math::geometry::radToDeg__ *angle*

    Convert from radians to degrees

      * list *angle*

        Angle in radians

  - <a name='50'></a>__::math::geometry::circle__ *centre* *radius*

    Convenience procedure to create a circle from a point and a radius\.

      * list *centre*

        Coordinates of the circle centre

      * list *radius*

        Radius of the circle

  - <a name='51'></a>__::math::geometry::circleTwoPoints__ *point1* *point2*

    Convenience procedure to create a circle from two points on its
    circumference The centre is the point between the two given points, the
    radius is half the distance between them\.

      * list *point1*

        First point

      * list *point2*

        Second point

  - <a name='52'></a>__::math::geometry::pointInsideCircle__ *point* *circle*

    Determine if the given point is inside the circle or on the circumference
    \(1\) or outside \(0\)\.

      * list *point*

        Point to be checked

      * list *circle*

        Circle that may or may not contain the point

  - <a name='53'></a>__::math::geometry::lineIntersectsCircle__ *line* *circle*

    Determine if the given line intersects the circle or touches it \(1\) or does
    not \(0\)\.

      * list *line*

        Line to be checked

      * list *circle*

        Circle that may or may not be intersected

  - <a name='54'></a>__::math::geometry::lineSegmentIntersectsCircle__ *segment* *circle*

    Determine if the given line segment intersects the circle or touches it \(1\)
    or does not \(0\)\.

      * list *segment*

        Line segment to be checked

      * list *circle*

        Circle that may or may not be intersected

  - <a name='55'></a>__::math::geometry::intersectionLineWithCircle__ *line* *circle*

    Determine the points at which the given line intersects the circle\. There
    can be zero, one or two points\. \(If the line touches the circle or is close
    to it, then one point is returned\. An arbitrary margin of 1\.0e\-10 times the
    radius is used to determine this situation\.\)

      * list *line*

        Line to be checked

      * list *circle*

        Circle that may or may not be intersected

  - <a name='56'></a>__::math::geometry::intersectionCircleWithCircle__ *circle1* *circle2*

    Determine the points at which the given two circles intersect\. There can be
    zero, one or two points\. \(If the two circles touch the circle or are very
    close, then one point is returned\. An arbitrary margin of 1\.0e\-10 times the
    mean of the radii of the two circles is used to determine this situation\.\)

      * list *circle1*

        First circle

      * list *circle2*

        Second circle

  - <a name='57'></a>__::math::geometry::tangentLinesToCircle__ *point* *circle*

    Determine the tangent lines from the given point to the circle\. There can be
    zero, one or two lines\. \(If the point is on the cirucmference or very close
    to the circle, then one line is returned\. An arbitrary margin of 1\.0e\-10
    times the radius of the circle is used to determine this situation\.\)

      * list *point*

        Point in question

      * list *circle*

        Circle to which the tangent lines are to be determined

  - <a name='58'></a>__::math::geometry::intersectionPolylines__ *polyline1* *polyline2* ?mode? ?granularity?

    Return the first point or all points where the two polylines intersect\. If
    the number of points in the polylines is large, you can use the granularity
    to get an approximate answer faster\.

    Arguments:

      * list *polyline1*

        The first polyline

      * list *polyline2*

        The second polyline

      * string *mode*

        Whether to return only the first \(default\) or to return all intersection
        points \("all"\)

      * int *granularity*

        The number of points that will be skipped plus 1 in the search for
        intersection points \(1 or smaller means an exact answer is returned\)

  - <a name='59'></a>__::math::geometry::intersectionPolylineCircle__ *polyline* *circle* ?mode? ?granularity?

    Return the first point or all points where the polyline intersects the
    circle\. If the number of points in the polyline is large, you can use the
    granularity to get an approximate answer faster\.

    Arguments:

      * list *polyline*

        The polyline that may intersect the circle

      * list *circle*

        The circle in question

      * string *mode*

        Whether to return only the first \(default\) or to return all intersection
        points \("all"\)

      * int *granularity*

        The number of points that will be skipped plus 1 in the search for
        intersection points \(1 or smaller means an exact answer is returned\)

  - <a name='60'></a>__::math::geometry::polylineCutOrigin__ *polyline1* *polyline2* ?granularity?

    Return the part of the first polyline from the origin up to the first
    intersection with the second\. If the number of points in the polyline is
    large, you can use the granularity to get an approximate answer faster\.

    Arguments:

      * list *polyline1*

        The first polyline \(from which a part is to be returned\)

      * list *polyline2*

        The second polyline

      * int *granularity*

        The number of points that will be skipped plus 1 in the search for
        intersection points \(1 or smaller means an exact answer is returned\)

  - <a name='61'></a>__::math::geometry::polylineCutEnd__ *polyline1* *polyline2* ?granularity?

    Return the part of the first polyline from the last intersection point with
    the second to the end\. If the number of points in the polyline is large, you
    can use the granularity to get an approximate answer faster\.

    Arguments:

      * list *polyline1*

        The first polyline \(from which a part is to be returned\)

      * list *polyline2*

        The second polyline

      * int *granularity*

        The number of points that will be skipped plus 1 in the search for
        intersection points \(1 or smaller means an exact answer is returned\)

  - <a name='62'></a>__::math::geometry::splitPolyline__ *polyline* *numberVertex*

    Split the poyline into a set of polylines where each separate polyline holds
    "numberVertex" vertices between the two end points\.

    Arguments:

      * list *polyline*

        The polyline to be split up

      * int *numberVertex*

        The number of "internal" vertices

  - <a name='63'></a>__::math::geometry::enrichPolyline__ *polyline* *accuracy*

    Split up each segment of a polyline into a number of smaller segments and
    return the result\.

    Arguments:

      * list *polyline*

        The polyline to be refined

      * int *accuracy*

        The number of subsegments to be created

  - <a name='64'></a>__::math::geometry::cleanupPolyline__ *polyline*

    Remove duplicate neighbouring vertices and return the result\.

    Arguments:

      * list *polyline*

        The polyline to be cleaned up

# <a name='section3'></a>COORDINATE SYSTEM

The coordinate system used by the package is the ordinary cartesian system,
where the positive x\-axis is directed to the right and the positive y\-axis is
directed upwards\. Angles and directions are defined with respect to the positive
x\-axis in a counter\-clockwise direction, so that an angle of 90 degrees is the
direction of the positive y\-axis\. Note that the Tk canvas coordinates differ
from this, as there the origin is located in the upper left corner of the
window\. Up to and including version 1\.3, the direction and octant procedures of
this package used this convention inconsistently\.

# <a name='section4'></a>References

  1. [Polygon Intersection](http:/wiki\.tcl\.tk/12070)

  1. [http://en\.wikipedia\.org/wiki/Line\-line\_intersection](http://en\.wikipedia\.org/wiki/Line\-line\_intersection)

  1. [http://local\.wasp\.uwa\.edu\.au/~pbourke/geometry/lineline2d/](http://local\.wasp\.uwa\.edu\.au/~pbourke/geometry/lineline2d/)

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: geometry* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[angle](\.\./\.\./\.\./\.\./index\.md\#angle),
[distance](\.\./\.\./\.\./\.\./index\.md\#distance),
[line](\.\./\.\./\.\./\.\./index\.md\#line), [math](\.\./\.\./\.\./\.\./index\.md\#math),
[plane geometry](\.\./\.\./\.\./\.\./index\.md\#plane\_geometry),
[point](\.\./\.\./\.\./\.\./index\.md\#point)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2001 by Ideogramic ApS and other parties  
Copyright &copy; 2010 by Andreas Kupries  
Copyright &copy; 2010 by Kevin Kenny  
Copyright &copy; 2018 by Arjen Markus  
Copyright &copy; 2020 by Manfred Rosenberger
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/numtheory.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278

[//000000001]: # (math::numtheory \- Tcl Math Library)
[//000000002]: # (Generated from file 'numtheory\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2010 Lars Hellström <Lars dot Hellstrom at residenset dot net>)
[//000000004]: # (math::numtheory\(n\) 1\.1\.1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::numtheory \- Number Theory

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.5?  
package require math::numtheory ?1\.1\.1?  

[__math::numtheory::isprime__ *N* ?*option* *value* \.\.\.?](#1)  
[__math::numtheory::firstNprimes__ *N*](#2)  
[__math::numtheory::primesLowerThan__ *N*](#3)  
[__math::numtheory::primeFactors__ *N*](#4)  
[__math::numtheory::primesLowerThan__ *N*](#5)  
[__math::numtheory::primeFactors__ *N*](#6)  
[__math::numtheory::uniquePrimeFactors__ *N*](#7)  
[__math::numtheory::factors__ *N*](#8)  
[__math::numtheory::totient__ *N*](#9)  
[__math::numtheory::moebius__ *N*](#10)  
[__math::numtheory::legendre__ *a* *p*](#11)  
[__math::numtheory::jacobi__ *a* *b*](#12)  
[__math::numtheory::gcd__ *m* *n*](#13)  
[__math::numtheory::lcm__ *m* *n*](#14)  
[__math::numtheory::numberPrimesGauss__ *N*](#15)  
[__math::numtheory::numberPrimesLegendre__ *N*](#16)  
[__math::numtheory::numberPrimesLegendreModified__ *N*](#17)  
[__math::numtheory::differenceNumberPrimesLegendreModified__ *lower* *upper*](#18)  

# <a name='description'></a>DESCRIPTION

This package is for collecting various number\-theoretic operations, with a
slight bias to prime numbers\.

  - <a name='1'></a>__math::numtheory::isprime__ *N* ?*option* *value* \.\.\.?

    The __isprime__ command tests whether the integer *N* is a prime,
    returning a boolean true value for prime *N* and a boolean false value for
    non\-prime *N*\. The formal definition of 'prime' used is the conventional,
    that the number being tested is greater than 1 and only has trivial
    divisors\.

    To be precise, the return value is one of __0__ \(if *N* is definitely
    not a prime\), __1__ \(if *N* is definitely a prime\), and __on__ \(if
    *N* is probably prime\); the latter two are both boolean true values\. The
    case that an integer may be classified as "probably prime" arises because
    the Miller\-Rabin algorithm used in the test implementation is basically
    probabilistic, and may if we are unlucky fail to detect that a number is in
    fact composite\. Options may be used to select the risk of such "false
    positives" in the test\. __1__ is returned for "small" *N* \(which
    currently means *N* < 118670087467\), where it is known that no false
    positives are possible\.

    The only option currently defined is:

      * __\-randommr__ *repetitions*

        which controls how many times the Miller\-Rabin test should be repeated
        with randomly chosen bases\. Each repetition reduces the probability of a
        false positive by a factor at least 4\. The default for *repetitions*
        is 4\.

    Unknown options are silently ignored\.

  - <a name='2'></a>__math::numtheory::firstNprimes__ *N*

    Return the first N primes

      * integer *N* \(in\)

        Number of primes to return

  - <a name='3'></a>__math::numtheory::primesLowerThan__ *N*

    Return the prime numbers lower/equal to N

      * integer *N* \(in\)

        Maximum number to consider

  - <a name='4'></a>__math::numtheory::primeFactors__ *N*

    Return a list of the prime numbers in the number N

      * integer *N* \(in\)

        Number to be factorised

  - <a name='5'></a>__math::numtheory::primesLowerThan__ *N*

    Return the prime numbers lower/equal to N

      * integer *N* \(in\)

        Maximum number to consider

  - <a name='6'></a>__math::numtheory::primeFactors__ *N*

    Return a list of the prime numbers in the number N

      * integer *N* \(in\)

        Number to be factorised

  - <a name='7'></a>__math::numtheory::uniquePrimeFactors__ *N*

    Return a list of the *unique* prime numbers in the number N

      * integer *N* \(in\)

        Number to be factorised

  - <a name='8'></a>__math::numtheory::factors__ *N*

    Return a list of all *unique* factors in the number N, including 1 and N
    itself

      * integer *N* \(in\)

        Number to be factorised

  - <a name='9'></a>__math::numtheory::totient__ *N*

    Evaluate the Euler totient function for the number N \(number of numbers
    relatively prime to N\)

      * integer *N* \(in\)

        Number in question

  - <a name='10'></a>__math::numtheory::moebius__ *N*

    Evaluate the Moebius function for the number N

      * integer *N* \(in\)

        Number in question

  - <a name='11'></a>__math::numtheory::legendre__ *a* *p*

    Evaluate the Legendre symbol \(a/p\)

      * integer *a* \(in\)

        Upper number in the symbol

      * integer *p* \(in\)

        Lower number in the symbol \(must be non\-zero\)

  - <a name='12'></a>__math::numtheory::jacobi__ *a* *b*

    Evaluate the Jacobi symbol \(a/b\)

      * integer *a* \(in\)

        Upper number in the symbol

      * integer *b* \(in\)

        Lower number in the symbol \(must be odd\)

  - <a name='13'></a>__math::numtheory::gcd__ *m* *n*

    Return the greatest common divisor of *m* and *n*

      * integer *m* \(in\)

        First number

      * integer *n* \(in\)

        Second number

  - <a name='14'></a>__math::numtheory::lcm__ *m* *n*

    Return the lowest common multiple of *m* and *n*

      * integer *m* \(in\)

        First number

      * integer *n* \(in\)

        Second number

  - <a name='15'></a>__math::numtheory::numberPrimesGauss__ *N*

    Estimate the number of primes according the formula by Gauss\.

      * integer *N* \(in\)

        Number in question, should be larger than 0

  - <a name='16'></a>__math::numtheory::numberPrimesLegendre__ *N*

    Estimate the number of primes according the formula by Legendre\.

      * integer *N* \(in\)

        Number in question, should be larger than 0

  - <a name='17'></a>__math::numtheory::numberPrimesLegendreModified__ *N*

    Estimate the number of primes according the modified formula by Legendre\.

      * integer *N* \(in\)

        Number in question, should be larger than 0

  - <a name='18'></a>__math::numtheory::differenceNumberPrimesLegendreModified__ *lower* *upper*

    Estimate the number of primes between tow limits according the modified
    formula by Legendre\.

      * integer *lower* \(in\)

        Lower limit for the primes, should be larger than 0

      * integer *upper* \(in\)

        Upper limit for the primes, should be larger than 0

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: numtheory* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[number theory](\.\./\.\./\.\./\.\./index\.md\#number\_theory),
[prime](\.\./\.\./\.\./\.\./index\.md\#prime)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2010 Lars Hellström <Lars dot Hellstrom at residenset dot net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/optimize.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374

[//000000001]: # (math::optimize \- Tcl Math Library)
[//000000002]: # (Generated from file 'optimize\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2004,2005 Kevn B\. Kenny <kennykb@users\.sourceforge\.net>)
[//000000005]: # (math::optimize\(n\) 1\.0 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::optimize \- Optimisation routines

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [NOTES](#section3)

  - [EXAMPLES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require math::optimize ?1\.0?  

[__::math::optimize::minimum__ *begin* *end* *func* *maxerr*](#1)  
[__::math::optimize::maximum__ *begin* *end* *func* *maxerr*](#2)  
[__::math::optimize::min\_bound\_1d__ *func* *begin* *end* ?__\-relerror__ *reltol*? ?__\-abserror__ *abstol*? ?__\-maxiter__ *maxiter*? ?__\-trace__ *traceflag*?](#3)  
[__::math::optimize::min\_unbound\_1d__ *func* *begin* *end* ?__\-relerror__ *reltol*? ?__\-abserror__ *abstol*? ?__\-maxiter__ *maxiter*? ?__\-trace__ *traceflag*?](#4)  
[__::math::optimize::solveLinearProgram__ *objective* *constraints*](#5)  
[__::math::optimize::linearProgramMaximum__ *objective* *result*](#6)  
[__::math::optimize::nelderMead__ *objective* *xVector* ?__\-scale__ *xScaleVector*? ?__\-ftol__ *epsilon*? ?__\-maxiter__ *count*? ??\-trace? *flag*?](#7)  

# <a name='description'></a>DESCRIPTION

This package implements several optimisation algorithms:

  - Minimize or maximize a function over a given interval

  - Solve a linear program \(maximize a linear function subject to linear
    constraints\)

  - Minimize a function of several variables given an initial guess for the
    location of the minimum\.

The package is fully implemented in Tcl\. No particular attention has been paid
to the accuracy of the calculations\. Instead, the algorithms have been used in a
straightforward manner\.

This document describes the procedures and explains their usage\.

# <a name='section2'></a>PROCEDURES

This package defines the following public procedures:

  - <a name='1'></a>__::math::optimize::minimum__ *begin* *end* *func* *maxerr*

    Minimize the given \(continuous\) function by examining the values in the
    given interval\. The procedure determines the values at both ends and in the
    centre of the interval and then constructs a new interval of 1/2 length that
    includes the minimum\. No guarantee is made that the *global* minimum is
    found\.

    The procedure returns the "x" value for which the function is minimal\.

    *This procedure has been deprecated \- use min\_bound\_1d instead*

    *begin* \- Start of the interval

    *end* \- End of the interval

    *func* \- Name of the function to be minimized \(a procedure taking one
    argument\)\.

    *maxerr* \- Maximum relative error \(defaults to 1\.0e\-4\)

  - <a name='2'></a>__::math::optimize::maximum__ *begin* *end* *func* *maxerr*

    Maximize the given \(continuous\) function by examining the values in the
    given interval\. The procedure determines the values at both ends and in the
    centre of the interval and then constructs a new interval of 1/2 length that
    includes the maximum\. No guarantee is made that the *global* maximum is
    found\.

    The procedure returns the "x" value for which the function is maximal\.

    *This procedure has been deprecated \- use max\_bound\_1d instead*

    *begin* \- Start of the interval

    *end* \- End of the interval

    *func* \- Name of the function to be maximized \(a procedure taking one
    argument\)\.

    *maxerr* \- Maximum relative error \(defaults to 1\.0e\-4\)

  - <a name='3'></a>__::math::optimize::min\_bound\_1d__ *func* *begin* *end* ?__\-relerror__ *reltol*? ?__\-abserror__ *abstol*? ?__\-maxiter__ *maxiter*? ?__\-trace__ *traceflag*?

    Miminizes a function of one variable in the given interval\. The procedure
    uses Brent's method of parabolic interpolation, protected by golden\-section
    subdivisions if the interpolation is not converging\. No guarantee is made
    that a *global* minimum is found\. The function to evaluate, *func*, must
    be a single Tcl command; it will be evaluated with an abscissa appended as
    the last argument\.

    *x1* and *x2* are the two bounds of the interval in which the minimum is
    to be found\. They need not be in increasing order\.

    *reltol*, if specified, is the desired upper bound on the relative error
    of the result; default is 1\.0e\-7\. The given value should never be smaller
    than the square root of the machine's floating point precision, or else
    convergence is not guaranteed\. *abstol*, if specified, is the desired
    upper bound on the absolute error of the result; default is 1\.0e\-10\. Caution
    must be used with small values of *abstol* to avoid overflow/underflow
    conditions; if the minimum is expected to lie about a small but non\-zero
    abscissa, you consider either shifting the function or changing its length
    scale\.

    *maxiter* may be used to constrain the number of function evaluations to
    be performed; default is 100\. If the command evaluates the function more
    than *maxiter* times, it returns an error to the caller\.

    *traceFlag* is a Boolean value\. If true, it causes the command to print a
    message on the standard output giving the abscissa and ordinate at each
    function evaluation, together with an indication of what type of
    interpolation was chosen\. Default is 0 \(no trace\)\.

  - <a name='4'></a>__::math::optimize::min\_unbound\_1d__ *func* *begin* *end* ?__\-relerror__ *reltol*? ?__\-abserror__ *abstol*? ?__\-maxiter__ *maxiter*? ?__\-trace__ *traceflag*?

    Miminizes a function of one variable over the entire real number line\. The
    procedure uses parabolic extrapolation combined with golden\-section
    dilatation to search for a region where a minimum exists, followed by
    Brent's method of parabolic interpolation, protected by golden\-section
    subdivisions if the interpolation is not converging\. No guarantee is made
    that a *global* minimum is found\. The function to evaluate, *func*, must
    be a single Tcl command; it will be evaluated with an abscissa appended as
    the last argument\.

    *x1* and *x2* are two initial guesses at where the minimum may lie\.
    *x1* is the starting point for the minimization, and the difference
    between *x2* and *x1* is used as a hint at the characteristic length
    scale of the problem\.

    *reltol*, if specified, is the desired upper bound on the relative error
    of the result; default is 1\.0e\-7\. The given value should never be smaller
    than the square root of the machine's floating point precision, or else
    convergence is not guaranteed\. *abstol*, if specified, is the desired
    upper bound on the absolute error of the result; default is 1\.0e\-10\. Caution
    must be used with small values of *abstol* to avoid overflow/underflow
    conditions; if the minimum is expected to lie about a small but non\-zero
    abscissa, you consider either shifting the function or changing its length
    scale\.

    *maxiter* may be used to constrain the number of function evaluations to
    be performed; default is 100\. If the command evaluates the function more
    than *maxiter* times, it returns an error to the caller\.

    *traceFlag* is a Boolean value\. If true, it causes the command to print a
    message on the standard output giving the abscissa and ordinate at each
    function evaluation, together with an indication of what type of
    interpolation was chosen\. Default is 0 \(no trace\)\.

  - <a name='5'></a>__::math::optimize::solveLinearProgram__ *objective* *constraints*

    Solve a *linear program* in standard form using a straightforward
    implementation of the Simplex algorithm\. \(In the explanation below: The
    linear program has N constraints and M variables\)\.

    The procedure returns a list of M values, the values for which the objective
    function is maximal or a single keyword if the linear program is not
    feasible or unbounded \(either "unfeasible" or "unbounded"\)

    *objective* \- The M coefficients of the objective function

    *constraints* \- Matrix of coefficients plus maximum values that implement
    the linear constraints\. It is expected to be a list of N lists of M\+1
    numbers each, M coefficients and the maximum value\.

  - <a name='6'></a>__::math::optimize::linearProgramMaximum__ *objective* *result*

    Convenience function to return the maximum for the solution found by the
    solveLinearProgram procedure\.

    *objective* \- The M coefficients of the objective function

    *result* \- The result as returned by solveLinearProgram

  - <a name='7'></a>__::math::optimize::nelderMead__ *objective* *xVector* ?__\-scale__ *xScaleVector*? ?__\-ftol__ *epsilon*? ?__\-maxiter__ *count*? ??\-trace? *flag*?

    Minimizes, in unconstrained fashion, a function of several variable over all
    of space\. The function to evaluate, *objective*, must be a single Tcl
    command\. To it will be appended as many elements as appear in the initial
    guess at the location of the minimum, passed in as a Tcl list, *xVector*\.

    *xScaleVector* is an initial guess at the problem scale; the first
    function evaluations will be made by varying the co\-ordinates in *xVector*
    by the amounts in *xScaleVector*\. If *xScaleVector* is not supplied, the
    co\-ordinates will be varied by a factor of 1\.0001 \(if the co\-ordinate is
    non\-zero\) or by a constant 0\.0001 \(if the co\-ordinate is zero\)\.

    *epsilon* is the desired relative error in the value of the function
    evaluated at the minimum\. The default is 1\.0e\-7, which usually gives three
    significant digits of accuracy in the values of the x's\.

    pp *count* is a limit on the number of trips through the main loop of the
    optimizer\. The number of function evaluations may be several times this
    number\. If the optimizer fails to find a minimum to within *ftol* in
    *maxiter* iterations, it returns its current best guess and an error
    status\. Default is to allow 500 iterations\.

    *flag* is a flag that, if true, causes a line to be written to the
    standard output for each evaluation of the objective function, giving the
    arguments presented to the function and the value returned\. Default is
    false\.

    The __nelderMead__ procedure returns a list of alternating keywords and
    values suitable for use with __array set__\. The meaning of the keywords
    is:

    *x* is the approximate location of the minimum\.

    *y* is the value of the function at *x*\.

    *yvec* is a vector of the best N\+1 function values achieved, where N is
    the dimension of *x*

    *vertices* is a list of vectors giving the function arguments
    corresponding to the values in *yvec*\.

    *nIter* is the number of iterations required to achieve convergence or
    fail\.

    *status* is 'ok' if the operation succeeded, or 'too\-many\-iterations' if
    the maximum iteration count was exceeded\.

    __nelderMead__ minimizes the given function using the downhill simplex
    method of Nelder and Mead\. This method is quite slow \- much faster methods
    for minimization are known \- but has the advantage of being extremely robust
    in the face of problems where the minimum lies in a valley of complex
    topology\.

    __nelderMead__ can occasionally find itself "stuck" at a point where it
    can make no further progress; it is recommended that the caller run it at
    least a second time, passing as the initial guess the result found by the
    previous call\. The second run is usually very fast\.

    __nelderMead__ can be used in some cases for constrained optimization\.
    To do this, add a large value to the objective function if the parameters
    are outside the feasible region\. To work effectively in this mode,
    __nelderMead__ requires that the initial guess be feasible and usually
    requires that the feasible region be convex\.

# <a name='section3'></a>NOTES

Several of the above procedures take the *names* of procedures as arguments\.
To avoid problems with the *visibility* of these procedures, the
fully\-qualified name of these procedures is determined inside the optimize
routines\. For the user this has only one consequence: the named procedure must
be visible in the calling procedure\. For instance:

    namespace eval ::mySpace {
       namespace export calcfunc
       proc calcfunc { x } { return $x }
    }
    #
    # Use a fully-qualified name
    #
    namespace eval ::myCalc {
       puts [min_bound_1d ::myCalc::calcfunc $begin $end]
    }
    #
    # Import the name
    #
    namespace eval ::myCalc {
       namespace import ::mySpace::calcfunc
       puts [min_bound_1d calcfunc $begin $end]
    }

The simple procedures *minimum* and *maximum* have been deprecated: the
alternatives are much more flexible, robust and require less function
evaluations\.

# <a name='section4'></a>EXAMPLES

Let us take a few simple examples:

Determine the maximum of f\(x\) = x^3 exp\(\-3x\), on the interval \(0,10\):

    proc efunc { x } { expr {$x*$x*$x * exp(-3.0*$x)} }
    puts "Maximum at: [::math::optimize::max_bound_1d efunc 0.0 10.0]"

The maximum allowed error determines the number of steps taken \(with each step
in the iteration the interval is reduced with a factor 1/2\)\. Hence, a maximum
error of 0\.0001 is achieved in approximately 14 steps\.

An example of a *linear program* is:

Optimise the expression 3x\+2y, where:

    x >= 0 and y >= 0 (implicit constraints, part of the
                      definition of linear programs)

    x + y   <= 1      (constraints specific to the problem)
    2x + 5y <= 10

This problem can be solved as follows:

    set solution [::math::optimize::solveLinearProgram  { 3.0   2.0 }  { { 1.0   1.0   1.0 }
         { 2.0   5.0  10.0 } } ]

Note, that a constraint like:

    x + y >= 1

can be turned into standard form using:

    -x  -y <= -1

The theory of linear programming is the subject of many a text book and the
Simplex algorithm that is implemented here is the best\-known method to solve
this type of problems, but it is not the only one\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: optimize* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[linear program](\.\./\.\./\.\./\.\./index\.md\#linear\_program),
[math](\.\./\.\./\.\./\.\./index\.md\#math),
[maximum](\.\./\.\./\.\./\.\./index\.md\#maximum),
[minimum](\.\./\.\./\.\./\.\./index\.md\#minimum),
[optimization](\.\./\.\./\.\./\.\./index\.md\#optimization)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>  
Copyright &copy; 2004,2005 Kevn B\. Kenny <kennykb@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/pca.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199

[//000000001]: # (math::PCA \- Principal Components Analysis)
[//000000002]: # (Generated from file 'pca\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (math::PCA\(n\) 1\.0 tcllib "Principal Components Analysis")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::PCA \- Package for Principal Component Analysis

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [EXAMPLE](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.6?  
package require math::linearalgebra 1\.0  

[__::math::PCA::createPCA__ *data* ?args?](#1)  
[__$pca using__ ?number?&#124;?\-minproportion value?](#2)  
[__$pca eigenvectors__ ?option?](#3)  
[__$pca eigenvalues__ ?option?](#4)  
[__$pca proportions__ ?option?](#5)  
[__$pca approximate__ *observation*](#6)  
[__$pca approximatOriginal__](#7)  
[__$pca scores__ *observation*](#8)  
[__$pca distance__ *observation*](#9)  
[__$pca qstatistic__ *observation* ?option?](#10)  

# <a name='description'></a>DESCRIPTION

The PCA package provides a means to perform principal components analysis in
Tcl, using an object\-oriented technique as facilitated by TclOO\. It actually
defines a single public method, *::math::PCA::createPCA*, which constructs an
object based on the data that are passed to perform the actual analysis\.

The methods of the PCA objects that are created with this command allow one to
examine the principal components, to approximate \(new\) observations using all or
a selected number of components only and to examine the properties of the
components and the statistics of the approximations\.

The package has been modelled after the PCA example provided by the original
linear algebra package by Ed Hume\.

# <a name='section2'></a>Commands

The *math::PCA* package provides one public command:

  - <a name='1'></a>__::math::PCA::createPCA__ *data* ?args?

    Create a new object, based on the data that are passed via the *data*
    argument\. The principal components may be based on either correlations or
    covariances\. All observations will be normalised according to the mean and
    standard deviation of the original data\.

      * list *data*

        \- A list of observations \(see the example below\)\.

      * list *args*

        \- A list of key\-value pairs defining the options\. Currently there is
        only one key: *\-covariances*\. This indicates if covariances are to be
        used \(if the value is 1\) or instead correlations \(value is 0\)\. The
        default is to use correlations\.

The PCA object that is created has the following methods:

  - <a name='2'></a>__$pca using__ ?number?&#124;?\-minproportion value?

    Set the number of components to be used in the analysis \(the number of
    retained components\)\. Returns the number of components, also if no argument
    is given\.

      * int *number*

        \- The number of components to be retained

      * double *value*

        \- Select the number of components based on the minimum proportion of
        variation that is retained by them\. Should be a value between 0 and 1\.

  - <a name='3'></a>__$pca eigenvectors__ ?option?

    Return the eigenvectors as a list of lists\.

      * string *option*

        \- By default only the *retained* components are returned\. If all
        eigenvectors are required, use the option *\-all*\.

  - <a name='4'></a>__$pca eigenvalues__ ?option?

    Return the eigenvalues as a list of lists\.

      * string *option*

        \- By default only the eigenvalues of the *retained* components are
        returned\. If all eigenvalues are required, use the option *\-all*\.

  - <a name='5'></a>__$pca proportions__ ?option?

    Return the proportions for all components, that is, the amount of variations
    that each components can explain\.

  - <a name='6'></a>__$pca approximate__ *observation*

    Return an approximation of the observation based on the retained components

      * list *observation*

        \- The values for the observation\.

  - <a name='7'></a>__$pca approximatOriginal__

    Return an approximation of the original data, using the retained components\.
    It is a convenience method that works on the complete set of original data\.

  - <a name='8'></a>__$pca scores__ *observation*

    Return the scores per retained component for the given observation\.

      * list *observation*

        \- The values for the observation\.

  - <a name='9'></a>__$pca distance__ *observation*

    Return the distance between the given observation and its approximation\.
    \(Note: this distance is based on the normalised vectors\.\)

      * list *observation*

        \- The values for the observation\.

  - <a name='10'></a>__$pca qstatistic__ *observation* ?option?

    Return the Q statistic, basically the square of the distance, for the given
    observation\.

      * list *observation*

        \- The values for the observation\.

      * string *option*

        \- If the observation is part of the original data, you may want to use
        the corrected Q statistic\. This is achieved with the option "\-original"\.

# <a name='section3'></a>EXAMPLE

TODO: NIST example

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *PCA* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[PCA](\.\./\.\./\.\./\.\./index\.md\#pca), [math](\.\./\.\./\.\./\.\./index\.md\#math),
[statistics](\.\./\.\./\.\./\.\./index\.md\#statistics),
[tcl](\.\./\.\./\.\./\.\./index\.md\#tcl)

# <a name='category'></a>CATEGORY

Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/polynomials.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253

[//000000001]: # (math::polynomials \- Tcl Math Library)
[//000000002]: # (Generated from file 'polynomials\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (math::polynomials\(n\) 1\.0\.1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::polynomials \- Polynomial functions

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [REMARKS ON THE IMPLEMENTATION](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.3?  
package require math::polynomials ?1\.0\.1?  

[__::math::polynomials::polynomial__ *coeffs*](#1)  
[__::math::polynomials::polynCmd__ *coeffs*](#2)  
[__::math::polynomials::evalPolyn__ *polynomial* *x*](#3)  
[__::math::polynomials::addPolyn__ *polyn1* *polyn2*](#4)  
[__::math::polynomials::subPolyn__ *polyn1* *polyn2*](#5)  
[__::math::polynomials::multPolyn__ *polyn1* *polyn2*](#6)  
[__::math::polynomials::divPolyn__ *polyn1* *polyn2*](#7)  
[__::math::polynomials::remainderPolyn__ *polyn1* *polyn2*](#8)  
[__::math::polynomials::derivPolyn__ *polyn*](#9)  
[__::math::polynomials::primitivePolyn__ *polyn*](#10)  
[__::math::polynomials::degreePolyn__ *polyn*](#11)  
[__::math::polynomials::coeffPolyn__ *polyn* *index*](#12)  
[__::math::polynomials::allCoeffsPolyn__ *polyn*](#13)  

# <a name='description'></a>DESCRIPTION

This package deals with polynomial functions of one variable:

  - the basic arithmetic operations are extended to polynomials

  - computing the derivatives and primitives of these functions

  - evaluation through a general procedure or via specific procedures\)

# <a name='section2'></a>PROCEDURES

The package defines the following public procedures:

  - <a name='1'></a>__::math::polynomials::polynomial__ *coeffs*

    Return an \(encoded\) list that defines the polynomial\. A polynomial

        f(x) = a + b.x + c.x**2 + d.x**3

    can be defined via:

        set f [::math::polynomials::polynomial [list $a $b $c $d]

      * list *coeffs*

        Coefficients of the polynomial \(in ascending order\)

  - <a name='2'></a>__::math::polynomials::polynCmd__ *coeffs*

    Create a new procedure that evaluates the polynomial\. The name of the
    polynomial is automatically generated\. Useful if you need to evualuate the
    polynomial many times, as the procedure consists of a single \[expr\] command\.

      * list *coeffs*

        Coefficients of the polynomial \(in ascending order\) or the polynomial
        definition returned by the *polynomial* command\.

  - <a name='3'></a>__::math::polynomials::evalPolyn__ *polynomial* *x*

    Evaluate the polynomial at x\.

      * list *polynomial*

        The polynomial's definition \(as returned by the polynomial command\)\.
        order\)

      * float *x*

        The coordinate at which to evaluate the polynomial

  - <a name='4'></a>__::math::polynomials::addPolyn__ *polyn1* *polyn2*

    Return a new polynomial which is the sum of the two others\.

      * list *polyn1*

        The first polynomial operand

      * list *polyn2*

        The second polynomial operand

  - <a name='5'></a>__::math::polynomials::subPolyn__ *polyn1* *polyn2*

    Return a new polynomial which is the difference of the two others\.

      * list *polyn1*

        The first polynomial operand

      * list *polyn2*

        The second polynomial operand

  - <a name='6'></a>__::math::polynomials::multPolyn__ *polyn1* *polyn2*

    Return a new polynomial which is the product of the two others\. If one of
    the arguments is a scalar value, the other polynomial is simply scaled\.

      * list *polyn1*

        The first polynomial operand or a scalar

      * list *polyn2*

        The second polynomial operand or a scalar

  - <a name='7'></a>__::math::polynomials::divPolyn__ *polyn1* *polyn2*

    Divide the first polynomial by the second polynomial and return the result\.
    The remainder is dropped

      * list *polyn1*

        The first polynomial operand

      * list *polyn2*

        The second polynomial operand

  - <a name='8'></a>__::math::polynomials::remainderPolyn__ *polyn1* *polyn2*

    Divide the first polynomial by the second polynomial and return the
    remainder\.

      * list *polyn1*

        The first polynomial operand

      * list *polyn2*

        The second polynomial operand

  - <a name='9'></a>__::math::polynomials::derivPolyn__ *polyn*

    Differentiate the polynomial and return the result\.

      * list *polyn*

        The polynomial to be differentiated

  - <a name='10'></a>__::math::polynomials::primitivePolyn__ *polyn*

    Integrate the polynomial and return the result\. The integration constant is
    set to zero\.

      * list *polyn*

        The polynomial to be integrated

  - <a name='11'></a>__::math::polynomials::degreePolyn__ *polyn*

    Return the degree of the polynomial\.

      * list *polyn*

        The polynomial to be examined

  - <a name='12'></a>__::math::polynomials::coeffPolyn__ *polyn* *index*

    Return the coefficient of the term of the index'th degree of the polynomial\.

      * list *polyn*

        The polynomial to be examined

      * int *index*

        The degree of the term

  - <a name='13'></a>__::math::polynomials::allCoeffsPolyn__ *polyn*

    Return the coefficients of the polynomial \(in ascending order\)\.

      * list *polyn*

        The polynomial in question

# <a name='section3'></a>REMARKS ON THE IMPLEMENTATION

The implementation for evaluating the polynomials at some point uses Horn's
rule, which guarantees numerical stability and a minimum of arithmetic
operations\. To recognise that a polynomial definition is indeed a correct
definition, it consists of a list of two elements: the keyword "POLYNOMIAL" and
the list of coefficients in descending order\. The latter makes it easier to
implement Horner's rule\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: polynomials* of
the [Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also
report any ideas for enhancements you may have for either package and/or
documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[math](\.\./\.\./\.\./\.\./index\.md\#math), [polynomial
functions](\.\./\.\./\.\./\.\./index\.md\#polynomial\_functions)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/probopt.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293

[//000000001]: # (math::probopt \- Tcl Math Library)
[//000000002]: # (Generated from file 'probopt\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (math::probopt\(n\) 1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::probopt \- Probabilistic optimisation methods

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [DETAILS ON THE ALGORITHMS](#section2)

  - [References](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require math::probopt 1  

[__::math::probopt::pso__ *function* *bounds* *args*](#1)  
[__::math::probopt::sce__ *function* *bounds* *args*](#2)  
[__::math::probopt::diffev__ *function* *bounds* *args*](#3)  
[__::math::probopt::lipoMax__ *function* *bounds* *args*](#4)  
[__::math::probopt::adaLipoMax__ *function* *bounds* *args*](#5)  

# <a name='description'></a>DESCRIPTION

The purpose of the __math::probopt__ package is to provide various
optimisation algorithms that are based on probabilistic techniques\. The results
of these algorithms may therefore vary from one run to the next\. The algorithms
are all well\-known and well described and proponents generally claim they are
efficient and reliable\.

As most of these algorithms have one or more tunable parameters or even
variations, the interface to each accepts options to set these parameters or the
select the variation\. These take the form of key\-value pairs, for instance,
*\-iterations 100*\.

This manual does not offer any recommendations with regards to these algorithms,
nor does it provide much in the way of guidelines for the parameters\. For this
we refer to online articles on the algorithms in question\.

A few notes, however:

  - With the exception of LIPO, the algorithms are capable of dealing with
    irregular \(non\-smooth\) and even discontinuous functions\.

  - The results depend on the random number seeding and are likely not to be
    very accurate, especially if the function varies slowly in the vicinty of
    the optimum\. They do give a good starting point for a deterministic
    algorithm\.

The collection consists of the following algorithms:

  - PSO \- particle swarm optimisation

  - SCE \- shuffled complexes evolution

  - DE \- differential evolution

  - LIPO \- Lipschitz optimisation

The various procedures have a uniform interface:

    set result [::math::probopt::algorithm function bounds args]

The arguments have the following meaning:

  - The argument *function* is the name of the procedure that evaluates the
    function\. Its interface is:

    set value [function coords]

    where *coords* is a list of coordinates at which to evaluate the function\.
    It is supposed to return the function value\.

  - The argument *bounds* is a list of pairs of minimum and maximum for each
    coordinate\. This list implicitly determines the dimension of the coordinate
    space in which the optimum is to be sought, for instance for a function like
    *x\*\*2 \+ \(y\-1\)\*\*4*, you may specify the bounds as *\{\{\-1 1\} \{\-1 1\}\}*, that
    is, two pairs for the two coordinates\.

  - The rest \(*args*\) consists of zero or more key\-value pairs to specify the
    options\. Which options are supported by which algorithm, is documented
    below\.

The result of the various optimisation procedures is a dictionary containing at
least the following elements:

  - *optimum\-coordinates* is a list containing the coordinates of the optimum
    that was found\.

  - *optimum\-value* is the function value at those coordinates\.

  - *evaluations* is the number of function evaluations\.

  - *best\-values* is a list of successive best values, obtained as part of the
    iterations\.

# <a name='section2'></a>DETAILS ON THE ALGORITHMS

The algorithms in the package are the following:

  - <a name='1'></a>__::math::probopt::pso__ *function* *bounds* *args*

    The "particle swarm optimisation" algorithm uses the idea that the candidate
    optimum points should swarm around the best point found so far, with
    variations to allow for improvements\.

    It recognises the following options:

      * *\-swarmsize number*: Number of particles to consider \(default: 50\)

      * *\-vweight value*: Weight for the current "velocity" \(0\-1, default:
        0\.5\)

      * *\-pweight value*: Weight for the individual particle's best position
        \(0\-1, default: 0\.3\)

      * *\-gweight value*: Weight for the "best" overall position as per
        particle \(0\-1, default: 0\.3\)

      * *\-type local/global*: Type of optimisation

      * *\-neighbours number*: Size of the neighbourhood \(default: 5, used if
        "local"\)

      * *\-iterations number*: Maximum number of iterations

      * *\-tolerance value*: Absolute minimal improvement for minimum value

  - <a name='2'></a>__::math::probopt::sce__ *function* *bounds* *args*

    The "shuffled complex evolution" algorithm is an extension of the
    Nelder\-Mead algorithm that uses multiple complexes and reorganises these
    complexes to find the "global" optimum\.

    It recognises the following options:

      * *\-complexes number*: Number of particles to consider \(default: 2\)

      * *\-mincomplexes number*: Minimum number of complexes \(default: 2; not
        currently used\)

      * *\-newpoints number*: Number of new points to be generated \(default: 1\)

      * *\-shuffle number*: Number of iterations after which to reshuffle the
        complexes \(if set to 0, the default, a number will be calculated from
        the number of dimensions\)

      * *\-pointspercomplex number*: Number of points per complex \(if set to 0,
        the default, a number will be calculated from the number of dimensions\)

      * *\-pointspersubcomplex number*: Number of points per subcomplex \(used
        to select the best points in each complex; if set to 0, the default, a
        number will be calculated from the number of dimensions\)

      * *\-iterations number*: Maximum number of iterations \(default: 100\)

      * *\-maxevaluations number*: Maximum number of function evaluations \(when
        this number is reached the iteration is broken off\. Default: 1000
        million\)

      * *\-abstolerance value*: Absolute minimal improvement for minimum value
        \(default: 0\.0\)

      * *\-reltolerance value*: Relative minimal improvement for minimum value
        \(default: 0\.001\)

  - <a name='3'></a>__::math::probopt::diffev__ *function* *bounds* *args*

    The "differential evolution" algorithm uses a number of initial points that
    are then updated using randomly selected points\. It is more or less akin to
    genetic algorithms\. It is controlled by two parameters, factor and lambda,
    where the first determines the update via random points and the second the
    update with the best point found sofar\.

    It recognises the following options:

      * *\-iterations number*: Maximum number of iterations \(default: 100\)

      * *\-number number*: Number of point to work with \(if set to 0, the
        default, it is calculated from the number of dimensions\)

      * *\-factor value*: Weight of randomly selected points in the updating
        \(0\-1, default: 0\.6\)

      * *\-lambda value*: Weight of the best point found so far in the updating
        \(0\-1, default: 0\.0\)

      * *\-crossover value*: Fraction of new points to be considered for
        replacing the old ones \(0\-1, default: 0\.5\)

      * *\-maxevaluations number*: Maximum number of function evaluations \(when
        this number is reached the iteration is broken off\. Default: 1000
        million\)

      * *\-abstolerance value*: Absolute minimal improvement for minimum value
        \(default: 0\.0\)

      * *\-reltolerance value*: Relative minimal improvement for minimum value
        \(default: 0\.001\)

  - <a name='4'></a>__::math::probopt::lipoMax__ *function* *bounds* *args*

    The "Lipschitz optimisation" algorithm uses the "Lipschitz" property of the
    given function to find a *maximum* in the given bounding box\. There are
    two variants, *lipoMax* assumes a fixed estimate for the Lipschitz
    parameter\.

    It recognises the following options:

      * *\-iterations number*: Number of iterations \(equals the actual number
        of function evaluations, default: 100\)

      * *\-lipschitz value*: Estimate of the Lipschitz parameter \(default:
        10\.0\)

  - <a name='5'></a>__::math::probopt::adaLipoMax__ *function* *bounds* *args*

    The "adaptive Lipschitz optimisation" algorithm uses the "Lipschitz"
    property of the given function to find a *maximum* in the given bounding
    box\. The adaptive variant actually uses two phases to find a suitable
    estimate for the Lipschitz parameter\. This is controlled by the "Bernoulli"
    parameter\.

    When you specify a large number of iterations, the algorithm may take a very
    long time to complete as it is trying to improve on the Lipschitz parameter
    and the chances of hitting a better estimate diminish fast\.

    It recognises the following options:

      * *\-iterations number*: Number of iterations \(equals the actual number
        of function evaluations, default: 100\)

      * *\-bernoulli value*: Parameter for random decisions \(exploration versus
        exploitation, default: 0\.1\)

# <a name='section3'></a>References

The various algorithms have been described in on\-line publications\. Here are a
few:

  - *PSO*: Maurice Clerc, Standard Particle Swarm Optimisation \(2012\)
    [https://hal\.archives\-ouvertes\.fr/file/index/docid/764996/filename/SPSO\_descriptions\.pdf](https://hal\.archives\-ouvertes\.fr/file/index/docid/764996/filename/SPSO\_descriptions\.pdf)

    Alternatively:
    [https://en\.wikipedia\.org/wiki/Particle\_swarm\_optimization](https://en\.wikipedia\.org/wiki/Particle\_swarm\_optimization)

  - *SCE*: Qingyuan Duan, Soroosh Sorooshian, Vijai K\. Gupta, Optimal use offo
    the SCE\-UA global optimization method for calibrating watershed models
    \(1994\), Journal of Hydrology 158, pp 265\-284

    [https://www\.researchgate\.net/publication/223408756\_Optimal\_Use\_of\_the\_SCE\-UA\_Global\_Optimization\_Method\_for\_Calibrating\_Watershed\_Models](https://www\.researchgate\.net/publication/223408756\_Optimal\_Use\_of\_the\_SCE\-UA\_Global\_Optimization\_Method\_for\_Calibrating\_Watershed\_Models)

  - *[DE](\.\./\.\./\.\./\.\./index\.md\#de)*: Rainer Storn and Kenneth Price,
    Differential Evolution \- A simple and efficient adaptivescheme for
    globaloptimization over continuous spaces \(1996\)

    [http://www1\.icsi\.berkeley\.edu/~storn/TR\-95\-012\.pdf](http://www1\.icsi\.berkeley\.edu/~storn/TR\-95\-012\.pdf)

  - *LIPO*: Cedric Malherbe and Nicolas Vayatis, Global optimization of
    Lipschitz functions, \(june 2017\)

    [https://arxiv\.org/pdf/1703\.02628\.pdf](https://arxiv\.org/pdf/1703\.02628\.pdf)

# <a name='keywords'></a>KEYWORDS

[mathematics](\.\./\.\./\.\./\.\./index\.md\#mathematics),
[optimisation](\.\./\.\./\.\./\.\./index\.md\#optimisation), [probabilistic
calculations](\.\./\.\./\.\./\.\./index\.md\#probabilistic\_calculations)

# <a name='category'></a>CATEGORY

Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/qcomplex.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299

[//000000001]: # (math::complexnumbers \- Tcl Math Library)
[//000000002]: # (Generated from file 'qcomplex\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (math::complexnumbers\(n\) 1\.0\.2 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::complexnumbers \- Straightforward complex number package

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [AVAILABLE PROCEDURES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require math::complexnumbers ?1\.0\.2?  

[__::math::complexnumbers::\+__ *z1* *z2*](#1)  
[__::math::complexnumbers::\-__ *z1* *z2*](#2)  
[__::math::complexnumbers::\*__ *z1* *z2*](#3)  
[__::math::complexnumbers::/__ *z1* *z2*](#4)  
[__::math::complexnumbers::conj__ *z1*](#5)  
[__::math::complexnumbers::real__ *z1*](#6)  
[__::math::complexnumbers::imag__ *z1*](#7)  
[__::math::complexnumbers::mod__ *z1*](#8)  
[__::math::complexnumbers::arg__ *z1*](#9)  
[__::math::complexnumbers::complex__ *real* *imag*](#10)  
[__::math::complexnumbers::tostring__ *z1*](#11)  
[__::math::complexnumbers::exp__ *z1*](#12)  
[__::math::complexnumbers::sin__ *z1*](#13)  
[__::math::complexnumbers::cos__ *z1*](#14)  
[__::math::complexnumbers::tan__ *z1*](#15)  
[__::math::complexnumbers::log__ *z1*](#16)  
[__::math::complexnumbers::sqrt__ *z1*](#17)  
[__::math::complexnumbers::pow__ *z1* *z2*](#18)  

# <a name='description'></a>DESCRIPTION

The mathematical module *complexnumbers* provides a straightforward
implementation of complex numbers in pure Tcl\. The philosophy is that the user
knows he or she is dealing with complex numbers in an abstract way and wants as
high a performance as can be had within the limitations of an interpreted
language\.

Therefore the procedures defined in this package assume that the arguments are
valid \(representations of\) "complex numbers", that is, lists of two numbers
defining the real and imaginary part of a complex number \(though this is a mere
detail: rely on the *complex* command to construct a valid number\.\)

Most procedures implement the basic arithmetic operations or elementary
functions whereas several others convert to and from different representations:

    set z [complex 0 1]
    puts "z = [tostring $z]"
    puts "z**2 = [* $z $z]

would result in:

    z = i
    z**2 = -1

# <a name='section2'></a>AVAILABLE PROCEDURES

The package implements all or most basic operations and elementary functions\.

*The arithmetic operations are:*

  - <a name='1'></a>__::math::complexnumbers::\+__ *z1* *z2*

    Add the two arguments and return the resulting complex number

      * complex *z1* \(in\)

        First argument in the summation

      * complex *z2* \(in\)

        Second argument in the summation

  - <a name='2'></a>__::math::complexnumbers::\-__ *z1* *z2*

    Subtract the second argument from the first and return the resulting complex
    number\. If there is only one argument, the opposite of z1 is returned \(i\.e\.
    \-z1\)

      * complex *z1* \(in\)

        First argument in the subtraction

      * complex *z2* \(in\)

        Second argument in the subtraction \(optional\)

  - <a name='3'></a>__::math::complexnumbers::\*__ *z1* *z2*

    Multiply the two arguments and return the resulting complex number

      * complex *z1* \(in\)

        First argument in the multiplication

      * complex *z2* \(in\)

        Second argument in the multiplication

  - <a name='4'></a>__::math::complexnumbers::/__ *z1* *z2*

    Divide the first argument by the second and return the resulting complex
    number

      * complex *z1* \(in\)

        First argument \(numerator\) in the division

      * complex *z2* \(in\)

        Second argument \(denominator\) in the division

  - <a name='5'></a>__::math::complexnumbers::conj__ *z1*

    Return the conjugate of the given complex number

      * complex *z1* \(in\)

        Complex number in question

*Conversion/inquiry procedures:*

  - <a name='6'></a>__::math::complexnumbers::real__ *z1*

    Return the real part of the given complex number

      * complex *z1* \(in\)

        Complex number in question

  - <a name='7'></a>__::math::complexnumbers::imag__ *z1*

    Return the imaginary part of the given complex number

      * complex *z1* \(in\)

        Complex number in question

  - <a name='8'></a>__::math::complexnumbers::mod__ *z1*

    Return the modulus of the given complex number

      * complex *z1* \(in\)

        Complex number in question

  - <a name='9'></a>__::math::complexnumbers::arg__ *z1*

    Return the argument \("angle" in radians\) of the given complex number

      * complex *z1* \(in\)

        Complex number in question

  - <a name='10'></a>__::math::complexnumbers::complex__ *real* *imag*

    Construct the complex number "real \+ imag\*i" and return it

      * float *real* \(in\)

        The real part of the new complex number

      * float *imag* \(in\)

        The imaginary part of the new complex number

  - <a name='11'></a>__::math::complexnumbers::tostring__ *z1*

    Convert the complex number to the form "real \+ imag\*i" and return the string

      * float *complex* \(in\)

        The complex number to be converted

*Elementary functions:*

  - <a name='12'></a>__::math::complexnumbers::exp__ *z1*

    Calculate the exponential for the given complex argument and return the
    result

      * complex *z1* \(in\)

        The complex argument for the function

  - <a name='13'></a>__::math::complexnumbers::sin__ *z1*

    Calculate the sine function for the given complex argument and return the
    result

      * complex *z1* \(in\)

        The complex argument for the function

  - <a name='14'></a>__::math::complexnumbers::cos__ *z1*

    Calculate the cosine function for the given complex argument and return the
    result

      * complex *z1* \(in\)

        The complex argument for the function

  - <a name='15'></a>__::math::complexnumbers::tan__ *z1*

    Calculate the tangent function for the given complex argument and return the
    result

      * complex *z1* \(in\)

        The complex argument for the function

  - <a name='16'></a>__::math::complexnumbers::log__ *z1*

    Calculate the \(principle value of the\) logarithm for the given complex
    argument and return the result

      * complex *z1* \(in\)

        The complex argument for the function

  - <a name='17'></a>__::math::complexnumbers::sqrt__ *z1*

    Calculate the \(principle value of the\) square root for the given complex
    argument and return the result

      * complex *z1* \(in\)

        The complex argument for the function

  - <a name='18'></a>__::math::complexnumbers::pow__ *z1* *z2*

    Calculate "z1 to the power of z2" and return the result

      * complex *z1* \(in\)

        The complex number to be raised to a power

      * complex *z2* \(in\)

        The complex power to be used

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: complexnumbers* of
the [Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also
report any ideas for enhancements you may have for either package and/or
documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[complex numbers](\.\./\.\./\.\./\.\./index\.md\#complex\_numbers),
[math](\.\./\.\./\.\./\.\./index\.md\#math)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/quasirandom.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

[//000000001]: # (math::quasirandom \- Tcl Math Library)
[//000000002]: # (Generated from file 'quasirandom\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (math::quasirandom\(n\) 1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::quasirandom \- Quasi\-random points for integration and Monte Carlo type
methods

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [TODO](#section3)

  - [References](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require math::quasirandom 1  

[__::math::quasirandom::qrpoint create__ *NAME* *DIM* ?ARGS?](#1)  
[__gen next__](#2)  
[__gen set\-start__ *index*](#3)  
[__gen set\-evaluations__ *number*](#4)  
[__gen integral__ *func* *minmax* *args*](#5)  

# <a name='description'></a>DESCRIPTION

In many applications pseudo\-random numbers and pseudo\-random points in a
\(limited\) sample space play an important role\. For instance in any type of Monte
Carlo simulation\. Pseudo\-random numbers, however, may be too random and as a
consequence a large number of data points is required to reduce the error or
fluctuation in the results to the desired value\.

Quasi\-random numbers can be used as an alternative: instead of "completely"
arbitrary points, points are generated that are diverse enough to cover the
entire sample space in a more or less uniform way\. As a consequence convergence
to the limit can be much faster, when such quasi\-random numbers are well\-chosen\.

The package defines a *[class](\.\./\.\./\.\./\.\./index\.md\#class)* "qrpoint" that
creates a command to generate quasi\-random points in 1, 2 or more dimensions\.
The command can either generate separate points, so that they can be used in a
user\-defined algorithm or use these points to calculate integrals of functions
defined over 1, 2 or more dimensions\. It also holds several other common
algorithms\. \(NOTE: these are not implemented yet\)

One particular characteristic of the generators is that there are no tuning
parameters involved, which makes the use particularly simple\.

# <a name='section2'></a>COMMANDS

A quasi\-random point generator is created using the *qrpoint* class:

  - <a name='1'></a>__::math::quasirandom::qrpoint create__ *NAME* *DIM* ?ARGS?

    This command takes the following arguments:

      * string *NAME*

        The name of the command to be created \(alternatively: the *new*
        subcommand will generate a unique name\)

      * integer/string *DIM*

        The number of dimensions or one of: "circle", "disk", "sphere" or "ball"

      * strings *ARGS*

        Zero or more key\-value pairs\. The supported options are:

          + *\-start index*: The index for the next point to be generated
            \(default: 1\)

          + *\-evaluations number*: The number of evaluations to be used by
            default \(default: 100\)

The points that are returned lie in the hyperblock \[0,1\[^n \(n the number of
dimensions\) or on the unit circle, within the unit disk, on the unit sphere or
within the unit ball\.

Each generator supports the following subcommands:

  - <a name='2'></a>__gen next__

    Return the coordinates of the next quasi\-random point

  - <a name='3'></a>__gen set\-start__ *index*

    Reset the index for the next quasi\-random point\. This is useful to control
    which list of points is returned\. Returns the new or the current value, if
    no value is given\.

  - <a name='4'></a>__gen set\-evaluations__ *number*

    Reset the default number of evaluations in compound algorithms\. Note that
    the actual number is the smallest 4\-fold larger or equal to the given
    number\. \(The 4\-fold plays a role in the detailed integration routine\.\)

  - <a name='5'></a>__gen integral__ *func* *minmax* *args*

    Calculate the integral of the given function over the block \(or the circle,
    sphere etc\.\)

      * string *func*

        The name of the function to be integrated

      * list *minmax*

        List of pairs of minimum and maximum coordinates\. This can be used to
        map the quasi\-random coordinates to the desired hyper\-block\.

        If the space is a circle, disk etc\. then this argument should be a
        single value, the radius\. The circle, disk, etc\. is centred at the
        origin\. If this is not what is required, then a coordinate
        transformation should be made within the function\.

      * strings *args*

        Zero or more key\-value pairs\. The following options are supported:

          + *\-evaluations number*: The number of evaluations to be used\. If
            not specified use the default of the generator object\.

# <a name='section3'></a>TODO

Implement other algorithms and variants

Implement more unit tests\.

Comparison to pseudo\-random numbers for integration\.

# <a name='section4'></a>References

Various algorithms exist for generating quasi\-random numbers\. The generators
created in this package are based on:
[http://extremelearning\.com\.au/unreasonable\-effectiveness\-of\-quasirandom\-sequences/](http://extremelearning\.com\.au/unreasonable\-effectiveness\-of\-quasirandom\-sequences/)

# <a name='keywords'></a>KEYWORDS

[mathematics](\.\./\.\./\.\./\.\./index\.md\#mathematics),
[quasi\-random](\.\./\.\./\.\./\.\./index\.md\#quasi\_random)

# <a name='category'></a>CATEGORY

Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/rational_funcs.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

[//000000001]: # (math::rationalfunctions \- Math)
[//000000002]: # (Generated from file 'rational\_funcs\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (math::rationalfunctions\(n\) 1\.0\.1 tcllib "Math")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::rationalfunctions \- Polynomial functions

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [REMARKS ON THE IMPLEMENTATION](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.4?  
package require math::rationalfunctions ?1\.0\.1?  

[__::math::rationalfunctions::rationalFunction__ *num* *den*](#1)  
[__::math::rationalfunctions::ratioCmd__ *num* *den*](#2)  
[__::math::rationalfunctions::evalRatio__ *rational* *x*](#3)  
[__::math::rationalfunctions::addRatio__ *ratio1* *ratio2*](#4)  
[__::math::rationalfunctions::subRatio__ *ratio1* *ratio2*](#5)  
[__::math::rationalfunctions::multRatio__ *ratio1* *ratio2*](#6)  
[__::math::rationalfunctions::divRatio__ *ratio1* *ratio2*](#7)  
[__::math::rationalfunctions::derivPolyn__ *ratio*](#8)  
[__::math::rationalfunctions::coeffsNumerator__ *ratio*](#9)  
[__::math::rationalfunctions::coeffsDenominator__ *ratio*](#10)  

# <a name='description'></a>DESCRIPTION

This package deals with rational functions of one variable:

  - the basic arithmetic operations are extended to rational functions

  - computing the derivatives of these functions

  - evaluation through a general procedure or via specific procedures\)

# <a name='section2'></a>PROCEDURES

The package defines the following public procedures:

  - <a name='1'></a>__::math::rationalfunctions::rationalFunction__ *num* *den*

    Return an \(encoded\) list that defines the rational function\. A rational
    function

                  1 + x^3
        f(x) = ------------
               1 + 2x + x^2

    can be defined via:

        set f [::math::rationalfunctions::rationalFunction [list 1 0 0 1]  [list 1 2 1]]

      * list *num*

        Coefficients of the numerator of the rational function \(in ascending
        order\)

      * list *den*

        Coefficients of the denominator of the rational function \(in ascending
        order\)

  - <a name='2'></a>__::math::rationalfunctions::ratioCmd__ *num* *den*

    Create a new procedure that evaluates the rational function\. The name of the
    function is automatically generated\. Useful if you need to evaluate the
    function many times, as the procedure consists of a single \[expr\] command\.

      * list *num*

        Coefficients of the numerator of the rational function \(in ascending
        order\)

      * list *den*

        Coefficients of the denominator of the rational function \(in ascending
        order\)

  - <a name='3'></a>__::math::rationalfunctions::evalRatio__ *rational* *x*

    Evaluate the rational function at x\.

      * list *rational*

        The rational function's definition \(as returned by the rationalFunction
        command\)\. order\)

      * float *x*

        The coordinate at which to evaluate the function

  - <a name='4'></a>__::math::rationalfunctions::addRatio__ *ratio1* *ratio2*

    Return a new rational function which is the sum of the two others\.

      * list *ratio1*

        The first rational function operand

      * list *ratio2*

        The second rational function operand

  - <a name='5'></a>__::math::rationalfunctions::subRatio__ *ratio1* *ratio2*

    Return a new rational function which is the difference of the two others\.

      * list *ratio1*

        The first rational function operand

      * list *ratio2*

        The second rational function operand

  - <a name='6'></a>__::math::rationalfunctions::multRatio__ *ratio1* *ratio2*

    Return a new rational function which is the product of the two others\. If
    one of the arguments is a scalar value, the other rational function is
    simply scaled\.

      * list *ratio1*

        The first rational function operand or a scalar

      * list *ratio2*

        The second rational function operand or a scalar

  - <a name='7'></a>__::math::rationalfunctions::divRatio__ *ratio1* *ratio2*

    Divide the first rational function by the second rational function and
    return the result\. The remainder is dropped

      * list *ratio1*

        The first rational function operand

      * list *ratio2*

        The second rational function operand

  - <a name='8'></a>__::math::rationalfunctions::derivPolyn__ *ratio*

    Differentiate the rational function and return the result\.

      * list *ratio*

        The rational function to be differentiated

  - <a name='9'></a>__::math::rationalfunctions::coeffsNumerator__ *ratio*

    Return the coefficients of the numerator of the rational function\.

      * list *ratio*

        The rational function to be examined

  - <a name='10'></a>__::math::rationalfunctions::coeffsDenominator__ *ratio*

    Return the coefficients of the denominator of the rational function\.

      * list *ratio*

        The rational function to be examined

# <a name='section3'></a>REMARKS ON THE IMPLEMENTATION

The implementation of the rational functions relies on the math::polynomials
package\. For further remarks see the documentation on that package\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: rationalfunctions*
of the [Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also
report any ideas for enhancements you may have for either package and/or
documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[math](\.\./\.\./\.\./\.\./index\.md\#math), [rational
functions](\.\./\.\./\.\./\.\./index\.md\#rational\_functions)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Arjen Markus <arjenmarkus@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/roman.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110

[//000000001]: # (math::roman \- Tcl Math Library)
[//000000002]: # (Generated from file 'roman\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Kenneth Green <kenneth\.green@gmail\.com>)
[//000000004]: # (math::roman\(\) 1\.0 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::roman \- Tools for creating and manipulating roman numerals

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require math::roman ?1\.0?  

[__::math::roman::toroman__ *i*](#1)  
[__::math::roman::tointeger__ *r*](#2)  
[__::math::roman::sort__ *list*](#3)  
[__::math::roman::expr__ *args*](#4)  

# <a name='description'></a>DESCRIPTION

__::math::roman__ is a pure\-Tcl library for converting between integers and
roman numerals\. It also provides utility functions for sorting and performing
arithmetic on roman numerals\.

This code was originally harvested from the Tcler's wiki at
http://wiki\.tcl\.tk/1823 and as such is free for any use for any purpose\. Many
thanks to the ingeneous folk who devised these clever routines and generously
contributed them to the Tcl community\.

While written and tested under Tcl 8\.3, I expect this library will work under
all 8\.x versions of Tcl\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::math::roman::toroman__ *i*

    Convert an integer to roman numerals\. The result is always in upper case\.
    The value zero is converted to an empty string\.

  - <a name='2'></a>__::math::roman::tointeger__ *r*

    Convert a roman numeral into an integer\.

  - <a name='3'></a>__::math::roman::sort__ *list*

    Sort a list of roman numerals from smallest to largest\.

  - <a name='4'></a>__::math::roman::expr__ *args*

    Evaluate an expression where the operands are all roman numerals\.

Of these commands both *toroman* and *tointeger* are exported for easier
use\. The other two are not, as they could interfer or be confused with existing
Tcl commands\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: roman* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[integer](\.\./\.\./\.\./\.\./index\.md\#integer), [roman
numeral](\.\./\.\./\.\./\.\./index\.md\#roman\_numeral)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Kenneth Green <kenneth\.green@gmail\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































Deleted embedded/md/tcllib/files/modules/math/romberg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345

[//000000001]: # (math::calculus::romberg \- Tcl Math Library)
[//000000002]: # (Generated from file 'romberg\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Kevin B\. Kenny <kennykb@acm\.org>\. All rights reserved\. Redistribution permitted under the terms of the Open Publication License <http://www\.opencontent\.org/openpub/>)
[//000000004]: # (math::calculus::romberg\(n\) 0\.6 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::calculus::romberg \- Romberg integration

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [PARAMETERS](#section3)

  - [OPTIONS](#section4)

  - [DESCRIPTION](#section5)

  - [IMPROPER INTEGRALS](#section6)

  - [OTHER CHANGES OF VARIABLE](#section7)

  - [Bugs, Ideas, Feedback](#section8)

  - [See Also](#seealso)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require math::calculus 0\.6  

[__::math::calculus::romberg__ *f* *a* *b* ?*\-option value*\.\.\.?](#1)  
[__::math::calculus::romberg\_infinity__ *f* *a* *b* ?*\-option value*\.\.\.?](#2)  
[__::math::calculus::romberg\_sqrtSingLower__ *f* *a* *b* ?*\-option value*\.\.\.?](#3)  
[__::math::calculus::romberg\_sqrtSingUpper__ *f* *a* *b* ?*\-option value*\.\.\.?](#4)  
[__::math::calculus::romberg\_powerLawLower__ *gamma* *f* *a* *b* ?*\-option value*\.\.\.?](#5)  
[__::math::calculus::romberg\_powerLawUpper__ *gamma* *f* *a* *b* ?*\-option value*\.\.\.?](#6)  
[__::math::calculus::romberg\_expLower__ *f* *a* *b* ?*\-option value*\.\.\.?](#7)  
[__::math::calculus::romberg\_expUpper__ *f* *a* *b* ?*\-option value*\.\.\.?](#8)  

# <a name='description'></a>DESCRIPTION

The __romberg__ procedures in the __[math::calculus](calculus\.md)__
package perform numerical integration of a function of one variable\. They are
intended to be of "production quality" in that they are robust, precise, and
reasonably efficient in terms of the number of function evaluations\.

# <a name='section2'></a>PROCEDURES

The following procedures are available for Romberg integration:

  - <a name='1'></a>__::math::calculus::romberg__ *f* *a* *b* ?*\-option value*\.\.\.?

    Integrates an analytic function over a given interval\.

  - <a name='2'></a>__::math::calculus::romberg\_infinity__ *f* *a* *b* ?*\-option value*\.\.\.?

    Integrates an analytic function over a half\-infinite interval\.

  - <a name='3'></a>__::math::calculus::romberg\_sqrtSingLower__ *f* *a* *b* ?*\-option value*\.\.\.?

    Integrates a function that is expected to be analytic over an interval
    except for the presence of an inverse square root singularity at the lower
    limit\.

  - <a name='4'></a>__::math::calculus::romberg\_sqrtSingUpper__ *f* *a* *b* ?*\-option value*\.\.\.?

    Integrates a function that is expected to be analytic over an interval
    except for the presence of an inverse square root singularity at the upper
    limit\.

  - <a name='5'></a>__::math::calculus::romberg\_powerLawLower__ *gamma* *f* *a* *b* ?*\-option value*\.\.\.?

    Integrates a function that is expected to be analytic over an interval
    except for the presence of a power law singularity at the lower limit\.

  - <a name='6'></a>__::math::calculus::romberg\_powerLawUpper__ *gamma* *f* *a* *b* ?*\-option value*\.\.\.?

    Integrates a function that is expected to be analytic over an interval
    except for the presence of a power law singularity at the upper limit\.

  - <a name='7'></a>__::math::calculus::romberg\_expLower__ *f* *a* *b* ?*\-option value*\.\.\.?

    Integrates an exponentially growing function; the lower limit of the region
    of integration may be arbitrarily large and negative\.

  - <a name='8'></a>__::math::calculus::romberg\_expUpper__ *f* *a* *b* ?*\-option value*\.\.\.?

    Integrates an exponentially decaying function; the upper limit of the region
    of integration may be arbitrarily large\.

# <a name='section3'></a>PARAMETERS

  - *f*

    Function to integrate\. Must be expressed as a single Tcl command, to which
    will be appended a single argument, specifically, the abscissa at which the
    function is to be evaluated\. The first word of the command will be processed
    with __namespace which__ in the caller's scope prior to any evaluation\.
    Given this processing, the command may local to the calling namespace rather
    than needing to be global\.

  - *a*

    Lower limit of the region of integration\.

  - *b*

    Upper limit of the region of integration\. For the
    __romberg\_sqrtSingLower__, __romberg\_sqrtSingUpper__,
    __romberg\_powerLawLower__, __romberg\_powerLawUpper__,
    __romberg\_expLower__, and __romberg\_expUpper__ procedures, the lower
    limit must be strictly less than the upper\. For the other procedures, the
    limits may appear in either order\.

  - *gamma*

    Power to use for a power law singularity; see section [IMPROPER
    INTEGRALS](#section6) for details\.

# <a name='section4'></a>OPTIONS

  - __\-abserror__ *epsilon*

    Requests that the integration machinery proceed at most until the estimated
    absolute error of the integral is less than *epsilon*\. The error may be
    seriously over\- or underestimated if the function \(or any of its
    derivatives\) contains singularities; see section [IMPROPER
    INTEGRALS](#section6) for details\. Default is 1\.0e\-08\.

  - __\-relerror__ *epsilon*

    Requests that the integration machinery proceed at most until the estimated
    relative error of the integral is less than *epsilon*\. The error may be
    seriously over\- or underestimated if the function \(or any of its
    derivatives\) contains singularities; see section [IMPROPER
    INTEGRALS](#section6) for details\. Default is 1\.0e\-06\.

  - __\-maxiter__ *m*

    Requests that integration terminate after at most *n* triplings of the
    number of evaluations performed\. In other words, given *n* for
    __\-maxiter__, the integration machinery will make at most 3\*\**n*
    evaluations of the function\. Default is 14, corresponding to a limit
    approximately 4\.8 million evaluations\. \(Well\-behaved functions will seldom
    require more than a few hundred evaluations\.\)

  - __\-degree__ *d*

    Requests that an extrapolating polynomial of degree *d* be used in Romberg
    integration; see section [DESCRIPTION](#section5) for details\. Default
    is 4\. Can be at most *m*\-1\.

# <a name='section5'></a>DESCRIPTION

The __romberg__ procedure performs Romberg integration using the modified
midpoint rule\. Romberg integration is an iterative process\. At the first step,
the function is evaluated at the midpoint of the region of integration, and the
value is multiplied by the width of the interval for the coarsest possible
estimate\. At the second step, the interval is divided into three parts, and the
function is evaluated at the midpoint of each part; the sum of the values is
multiplied by three\. At the third step, nine parts are used, at the fourth
twenty\-seven, and so on, tripling the number of subdivisions at each step\.

Once the interval has been divided at least *d* times, a polynomial is fitted
to the integrals estimated in the last *d*\+1 divisions\. The integrals are
considered to be a function of the square of the width of the subintervals \(any
good numerical analysis text will discuss this process under "Romberg
integration"\)\. The polynomial is extrapolated to a step size of zero, computing
a value for the integral and an estimate of the error\.

This process will be well\-behaved only if the function is analytic over the
region of integration; there may be removable singularities at either end of the
region provided that the limit of the function \(and of all its derivatives\)
exists as the ends are approached\. Thus, __romberg__ may be used to
integrate a function like f\(x\)=sin\(x\)/x over an interval beginning or ending at
zero\.

Note that __romberg__ will either fail to converge or else return incorrect
error estimates if the function, or any of its derivatives, has a singularity
anywhere in the region of integration \(except for the case mentioned above\)\.
Care must be used, therefore, in integrating a function like 1/\(1\-x\*\*2\) to avoid
the places where the derivative is singular\.

# <a name='section6'></a>IMPROPER INTEGRALS

Romberg integration is also useful for integrating functions over half\-infinite
intervals or functions that have singularities\. The trick is to make a change of
variable to eliminate the singularity, and to put the singularity at one end or
the other of the region of integration\. The
__[math::calculus](calculus\.md)__ package supplies a number of
__romberg__ procedures to deal with the commoner cases\.

  - __romberg\_infinity__

    Integrates a function over a half\-infinite interval; either *a* or *b*
    may be infinite\. *a* and *b* must be of the same sign; if you need to
    integrate across the axis, say, from a negative value to positive infinity,
    use __romberg__ to integrate from the negative value to a small positive
    value, and then __romberg\_infinity__ to integrate from the positive
    value to positive infinity\. The __romberg\_infinity__ procedure works by
    making the change of variable u=1/x, so that the integral from a to b of
    f\(x\) is evaluated as the integral from 1/a to 1/b of f\(1/u\)/u\*\*2\.

  - __romberg\_powerLawLower__ and __romberg\_powerLawUpper__

    Integrate a function that has an integrable power law singularity at either
    the lower or upper bound of the region of integration \(or has a derivative
    with a power law singularity there\)\. These procedures take a first
    parameter, *gamma*, which gives the power law\. The function or its first
    derivative are presumed to diverge as \(x\-*a*\)\*\*\(\-*gamma*\) or
    \(*b*\-x\)\*\*\(\-*gamma*\)\. *gamma* must be greater than zero and less than
    1\.

    These procedures are useful not only in integrating functions that go to
    infinity at one end of the region of integration, but also functions whose
    derivatives do not exist at the end of the region\. For instance, integrating
    f\(x\)=pow\(x,0\.25\) with the origin as one end of the region will result in the
    __romberg__ procedure greatly underestimating the error in the integral\.
    The problem can be fixed by observing that the first derivative of f\(x\),
    f'\(x\)=x\*\*\(\-3/4\)/4, goes to infinity at the origin\. Integrating using
    __romberg\_powerLawLower__ with *gamma* set to 0\.75 gives much more
    orderly convergence\.

    These procedures operate by making the change of variable u=\(x\-a\)\*\*\(1\-gamma\)
    \(__romberg\_powerLawLower__\) or u=\(b\-x\)\*\*\(1\-gamma\)
    \(__romberg\_powerLawUpper__\)\.

    To summarize the meaning of gamma:

      * If f\(x\) ~ x\*\*\(\-a\) \(0 < a < 1\), use gamma = a

      * If f'\(x\) ~ x\*\*\(\-b\) \(0 < b < 1\), use gamma = b

  - __romberg\_sqrtSingLower__ and __romberg\_sqrtSingUpper__

    These procedures behave identically to __romberg\_powerLawLower__ and
    __romberg\_powerLawUpper__ for the common case of *gamma*=0\.5; that is,
    they integrate a function with an inverse square root singularity at one end
    of the interval\. They have a simpler implementation involving square roots
    rather than arbitrary powers\.

  - __romberg\_expLower__ and __romberg\_expUpper__

    These procedures are for integrating a function that grows or decreases
    exponentially over a half\-infinite interval\. __romberg\_expLower__
    handles exponentially growing functions, and allows the lower limit of
    integration to be an arbitrarily large negative number\.
    __romberg\_expUpper__ handles exponentially decaying functions and allows
    the upper limit of integration to be an arbitrary large positive number\. The
    functions make the change of variable u=exp\(\-x\) and u=exp\(x\) respectively\.

# <a name='section7'></a>OTHER CHANGES OF VARIABLE

If you need an improper integral other than the ones listed here, a change of
variable can be written in very few lines of Tcl\. Because the Tcl coding that
does it is somewhat arcane, we offer a worked example here\.

Let's say that the function that we want to integrate is f\(x\)=exp\(x\)/sqrt\(1\-x\*x\)
\(not a very natural function, but a good example\), and we want to integrate it
over the interval \(\-1,1\)\. The denominator falls to zero at both ends of the
interval\. We wish to make a change of variable from x to u so that
dx/sqrt\(1\-x\*\*2\) maps to du\. Choosing x=sin\(u\), we can find that dx=cos\(u\)\*du,
and sqrt\(1\-x\*\*2\)=cos\(u\)\. The integral from a to b of f\(x\) is the integral from
asin\(a\) to asin\(b\) of f\(sin\(u\)\)\*cos\(u\)\.

We can make a function __g__ that accepts an arbitrary function __f__
and the parameter u, and computes this new integrand\.

    proc g { f u } {
        set x [expr { sin($u) }]
        set cmd $f; lappend cmd $x; set y [eval $cmd]
        return [expr { $y / cos($u) }]
    }

Now integrating __f__ from *a* to *b* is the same as integrating
__g__ from *asin\(a\)* to *asin\(b\)*\. It's a little tricky to get __f__
consistently evaluated in the caller's scope; the following procedure does it\.

    proc romberg_sine { f a b args } {
        set f [lreplace $f 0 0 [uplevel 1 [list namespace which [lindex $f 0]]]]
        set f [list g $f]
        return [eval [linsert $args 0 romberg $f [expr { asin($a) }] [expr { asin($b) }]]]
    }

This __romberg\_sine__ procedure will do any function with sqrt\(1\-x\*x\) in the
denominator\. Our sample function is f\(x\)=exp\(x\)/sqrt\(1\-x\*x\):

    proc f { x } {
        expr { exp($x) / sqrt( 1. - $x*$x ) }
    }

Integrating it is a matter of applying __romberg\_sine__ as we would any of
the other __romberg__ procedures:

    foreach { value error } [romberg_sine f -1.0 1.0] break
    puts [format "integral is %.6g +/- %.6g" $value $error]

    integral is 3.97746 +/- 2.3557e-010

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: calculus* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[math::calculus](calculus\.md), [math::interpolate](interpolate\.md)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Kevin B\. Kenny <kennykb@acm\.org>\. All rights reserved\. Redistribution permitted under the terms of the Open Publication License <http://www\.opencontent\.org/openpub/>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/special.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595

[//000000001]: # (math::special \- Tcl Math Library)
[//000000002]: # (Generated from file 'special\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (math::special\(n\) 0\.4 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::special \- Special mathematical functions

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [OVERVIEW](#section2)

  - [PROCEDURES](#section3)

  - [THE ORTHOGONAL POLYNOMIALS](#section4)

  - [REMARKS ON THE IMPLEMENTATION](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.5?  
package require math::special ?0\.5?  

[__::math::special::eulerNumber__ *index*](#1)  
[__::math::special::bernoulliNumber__ *index*](#2)  
[__::math::special::Beta__ *x* *y*](#3)  
[__::math::special::incBeta__ *a* *b* *x*](#4)  
[__::math::special::regIncBeta__ *a* *b* *x*](#5)  
[__::math::special::Gamma__ *x*](#6)  
[__::math::special::digamma__ *x*](#7)  
[__::math::special::erf__ *x*](#8)  
[__::math::special::erfc__ *x*](#9)  
[__::math::special::invnorm__ *p*](#10)  
[__::math::special::J0__ *x*](#11)  
[__::math::special::J1__ *x*](#12)  
[__::math::special::Jn__ *n* *x*](#13)  
[__::math::special::J1/2__ *x*](#14)  
[__::math::special::J\-1/2__ *x*](#15)  
[__::math::special::I\_n__ *x*](#16)  
[__::math::special::cn__ *u* *k*](#17)  
[__::math::special::dn__ *u* *k*](#18)  
[__::math::special::sn__ *u* *k*](#19)  
[__::math::special::elliptic\_K__ *k*](#20)  
[__::math::special::elliptic\_E__ *k*](#21)  
[__::math::special::exponential\_Ei__ *x*](#22)  
[__::math::special::exponential\_En__ *n* *x*](#23)  
[__::math::special::exponential\_li__ *x*](#24)  
[__::math::special::exponential\_Ci__ *x*](#25)  
[__::math::special::exponential\_Si__ *x*](#26)  
[__::math::special::exponential\_Chi__ *x*](#27)  
[__::math::special::exponential\_Shi__ *x*](#28)  
[__::math::special::fresnel\_C__ *x*](#29)  
[__::math::special::fresnel\_S__ *x*](#30)  
[__::math::special::sinc__ *x*](#31)  
[__::math::special::legendre__ *n*](#32)  
[__::math::special::chebyshev__ *n*](#33)  
[__::math::special::laguerre__ *alpha* *n*](#34)  
[__::math::special::hermite__ *n*](#35)  

# <a name='description'></a>DESCRIPTION

This package implements several so\-called special functions, like the Gamma
function, the Bessel functions and such\.

Each function is implemented by a procedure that bears its name \(well, in close
approximation\):

  - J0 for the zeroth\-order Bessel function of the first kind

  - J1 for the first\-order Bessel function of the first kind

  - Jn for the nth\-order Bessel function of the first kind

  - J1/2 for the half\-order Bessel function of the first kind

  - J\-1/2 for the minus\-half\-order Bessel function of the first kind

  - I\_n for the modified Bessel function of the first kind of order n

  - Gamma for the Gamma function, erf and erfc for the error function and the
    complementary error function

  - fresnel\_C and fresnel\_S for the Fresnel integrals

  - elliptic\_K and elliptic\_E \(complete elliptic integrals\)

  - exponent\_Ei and other functions related to the so\-called exponential
    integrals

  - legendre, hermite: some of the classical orthogonal polynomials\.

# <a name='section2'></a>OVERVIEW

In the following table several characteristics of the functions in this package
are summarized: the domain for the argument, the values for the parameters and
error bounds\.

    Family       | Function    | Domain x    | Parameter   | Error bound
    -------------+-------------+-------------+-------------+--------------
    Bessel       | J0, J1,     | all of R    | n = integer |   < 1.0e-8
                 | Jn          |             |             |  (|x|<20, n<20)
    Bessel       | J1/2, J-1/2,|  x > 0      | n = integer |   exact
    Bessel       | I_n         | all of R    | n = integer |   < 1.0e-6
                 |             |             |             |
    Elliptic     | cn          | 0 <= x <= 1 |     --      |   < 1.0e-10
    functions    | dn          | 0 <= x <= 1 |     --      |   < 1.0e-10
                 | sn          | 0 <= x <= 1 |     --      |   < 1.0e-10
    Elliptic     | K           | 0 <= x < 1  |     --      |   < 1.0e-6
    integrals    | E           | 0 <= x < 1  |     --      |   < 1.0e-6
                 |             |             |             |
    Error        | erf         |             |     --      |
    functions    | erfc        |             |             |
                 |             |             |             |
    Inverse      | invnorm     | 0 < x < 1   |     --      |   < 1.2e-9
    normal       |             |             |             |
    distribution |             |             |             |
                 |             |             |             |
    Exponential  | Ei          |  x != 0     |     --      |   < 1.0e-10 (relative)
    integrals    | En          |  x >  0     |     --      |   as Ei
                 | li          |  x > 0      |     --      |   as Ei
                 | Chi         |  x > 0      |     --      |   < 1.0e-8
                 | Shi         |  x > 0      |     --      |   < 1.0e-8
                 | Ci          |  x > 0      |     --      |   < 2.0e-4
                 | Si          |  x > 0      |     --      |   < 2.0e-4
                 |             |             |             |
    Fresnel      | C           |  all of R   |     --      |   < 2.0e-3
    integrals    | S           |  all of R   |     --      |   < 2.0e-3
                 |             |             |             |
    general      | Beta        | (see Gamma) |     --      |   < 1.0e-9
                 | Gamma       |  x != 0,-1, |     --      |   < 1.0e-9
                 |             |  -2, ...    |             |
                 | incBeta     |             |  a, b > 0   |   < 1.0e-9
                 | regIncBeta  |             |  a, b > 0   |   < 1.0e-9
                 | digamma     |  x != 0,-1  |             |   < 1.0e-9
                 |             |  -2, ...    |             |
                 |             |             |             |
                 | sinc        |  all of R   |     --      |   exact
                 |             |             |             |
    orthogonal   | Legendre    |  all of R   | n = 0,1,... |   exact
    polynomials  | Chebyshev   |  all of R   | n = 0,1,... |   exact
                 | Laguerre    |  all of R   | n = 0,1,... |   exact
                 |             |             | alpha el. R |
                 | Hermite     |  all of R   | n = 0,1,... |   exact

*Note:* Some of the error bounds are estimated, as no "formal" bounds were
available with the implemented approximation method, others hold for the
auxiliary functions used for estimating the primary functions\.

The following well\-known functions are currently missing from the package:

  - Bessel functions of the second kind \(Y\_n, K\_n\)

  - Bessel functions of arbitrary order \(and hence the Airy functions\)

  - Chebyshev polynomials of the second kind \(U\_n\)

  - The incomplete gamma function

# <a name='section3'></a>PROCEDURES

The package defines the following public procedures:

  - <a name='1'></a>__::math::special::eulerNumber__ *index*

    Return the index'th Euler number \(note: these are integer values\)\. As the
    size of these numbers grows very fast, only a limited number are available\.

      * int *index*

        Index of the number to be returned \(should be between 0 and 54\)

  - <a name='2'></a>__::math::special::bernoulliNumber__ *index*

    Return the index'th Bernoulli number\. As the size of the numbers grows very
    fast, only a limited number are available\.

      * int *index*

        Index of the number to be returned \(should be between 0 and 52\)

  - <a name='3'></a>__::math::special::Beta__ *x* *y*

    Compute the Beta function for arguments "x" and "y"

      * float *x*

        First argument for the Beta function

      * float *y*

        Second argument for the Beta function

  - <a name='4'></a>__::math::special::incBeta__ *a* *b* *x*

    Compute the incomplete Beta function for argument "x" with parameters "a"
    and "b"

      * float *a*

        First parameter for the incomplete Beta function, a > 0

      * float *b*

        Second parameter for the incomplete Beta function, b > 0

      * float *x*

        Argument for the incomplete Beta function

  - <a name='5'></a>__::math::special::regIncBeta__ *a* *b* *x*

    Compute the regularized incomplete Beta function for argument "x" with
    parameters "a" and "b"

      * float *a*

        First parameter for the incomplete Beta function, a > 0

      * float *b*

        Second parameter for the incomplete Beta function, b > 0

      * float *x*

        Argument for the regularized incomplete Beta function

  - <a name='6'></a>__::math::special::Gamma__ *x*

    Compute the Gamma function for argument "x"

      * float *x*

        Argument for the Gamma function

  - <a name='7'></a>__::math::special::digamma__ *x*

    Compute the digamma function \(psi\) for argument "x"

      * float *x*

        Argument for the digamma function

  - <a name='8'></a>__::math::special::erf__ *x*

    Compute the error function for argument "x"

      * float *x*

        Argument for the error function

  - <a name='9'></a>__::math::special::erfc__ *x*

    Compute the complementary error function for argument "x"

      * float *x*

        Argument for the complementary error function

  - <a name='10'></a>__::math::special::invnorm__ *p*

    Compute the inverse of the normal distribution function for argument "p"

      * float *p*

        Argument for the inverse normal distribution function \(p must be greater
        than 0 and lower than 1\)

  - <a name='11'></a>__::math::special::J0__ *x*

    Compute the zeroth\-order Bessel function of the first kind for the argument
    "x"

      * float *x*

        Argument for the Bessel function

  - <a name='12'></a>__::math::special::J1__ *x*

    Compute the first\-order Bessel function of the first kind for the argument
    "x"

      * float *x*

        Argument for the Bessel function

  - <a name='13'></a>__::math::special::Jn__ *n* *x*

    Compute the nth\-order Bessel function of the first kind for the argument "x"

      * integer *n*

        Order of the Bessel function

      * float *x*

        Argument for the Bessel function

  - <a name='14'></a>__::math::special::J1/2__ *x*

    Compute the half\-order Bessel function of the first kind for the argument
    "x"

      * float *x*

        Argument for the Bessel function

  - <a name='15'></a>__::math::special::J\-1/2__ *x*

    Compute the minus\-half\-order Bessel function of the first kind for the
    argument "x"

      * float *x*

        Argument for the Bessel function

  - <a name='16'></a>__::math::special::I\_n__ *x*

    Compute the modified Bessel function of the first kind of order n for the
    argument "x"

      * int *x*

        Positive integer order of the function

      * float *x*

        Argument for the function

  - <a name='17'></a>__::math::special::cn__ *u* *k*

    Compute the elliptic function *cn* for the argument "u" and parameter "k"\.

      * float *u*

        Argument for the function

      * float *k*

        Parameter

  - <a name='18'></a>__::math::special::dn__ *u* *k*

    Compute the elliptic function *dn* for the argument "u" and parameter "k"\.

      * float *u*

        Argument for the function

      * float *k*

        Parameter

  - <a name='19'></a>__::math::special::sn__ *u* *k*

    Compute the elliptic function *sn* for the argument "u" and parameter "k"\.

      * float *u*

        Argument for the function

      * float *k*

        Parameter

  - <a name='20'></a>__::math::special::elliptic\_K__ *k*

    Compute the complete elliptic integral of the first kind for the argument
    "k"

      * float *k*

        Argument for the function

  - <a name='21'></a>__::math::special::elliptic\_E__ *k*

    Compute the complete elliptic integral of the second kind for the argument
    "k"

      * float *k*

        Argument for the function

  - <a name='22'></a>__::math::special::exponential\_Ei__ *x*

    Compute the exponential integral of the second kind for the argument "x"

      * float *x*

        Argument for the function \(x \!= 0\)

  - <a name='23'></a>__::math::special::exponential\_En__ *n* *x*

    Compute the exponential integral of the first kind for the argument "x" and
    order n

      * int *n*

        Order of the integral \(n >= 0\)

      * float *x*

        Argument for the function \(x >= 0\)

  - <a name='24'></a>__::math::special::exponential\_li__ *x*

    Compute the logarithmic integral for the argument "x"

      * float *x*

        Argument for the function \(x > 0\)

  - <a name='25'></a>__::math::special::exponential\_Ci__ *x*

    Compute the cosine integral for the argument "x"

      * float *x*

        Argument for the function \(x > 0\)

  - <a name='26'></a>__::math::special::exponential\_Si__ *x*

    Compute the sine integral for the argument "x"

      * float *x*

        Argument for the function \(x > 0\)

  - <a name='27'></a>__::math::special::exponential\_Chi__ *x*

    Compute the hyperbolic cosine integral for the argument "x"

      * float *x*

        Argument for the function \(x > 0\)

  - <a name='28'></a>__::math::special::exponential\_Shi__ *x*

    Compute the hyperbolic sine integral for the argument "x"

      * float *x*

        Argument for the function \(x > 0\)

  - <a name='29'></a>__::math::special::fresnel\_C__ *x*

    Compute the Fresnel cosine integral for real argument x

      * float *x*

        Argument for the function

  - <a name='30'></a>__::math::special::fresnel\_S__ *x*

    Compute the Fresnel sine integral for real argument x

      * float *x*

        Argument for the function

  - <a name='31'></a>__::math::special::sinc__ *x*

    Compute the sinc function for real argument x

      * float *x*

        Argument for the function

  - <a name='32'></a>__::math::special::legendre__ *n*

    Return the Legendre polynomial of degree n \(see [THE ORTHOGONAL
    POLYNOMIALS](#section4)\)

      * int *n*

        Degree of the polynomial

  - <a name='33'></a>__::math::special::chebyshev__ *n*

    Return the Chebyshev polynomial of degree n \(of the first kind\)

      * int *n*

        Degree of the polynomial

  - <a name='34'></a>__::math::special::laguerre__ *alpha* *n*

    Return the Laguerre polynomial of degree n with parameter alpha

      * float *alpha*

        Parameter of the Laguerre polynomial

      * int *n*

        Degree of the polynomial

  - <a name='35'></a>__::math::special::hermite__ *n*

    Return the Hermite polynomial of degree n

      * int *n*

        Degree of the polynomial

# <a name='section4'></a>THE ORTHOGONAL POLYNOMIALS

For dealing with the classical families of orthogonal polynomials, the package
relies on the *math::polynomials* package\. To evaluate the polynomial at some
coordinate, use the *evalPolyn* command:

    set leg2 [::math::special::legendre 2]
    puts "Value at x=$x: [::math::polynomials::evalPolyn $leg2 $x]"

The return value from the *legendre* and other commands is actually the
definition of the corresponding polynomial as used in that package\.

# <a name='section5'></a>REMARKS ON THE IMPLEMENTATION

It should be noted, that the actual implementation of J0 and J1 depends on
straightforward Gaussian quadrature formulas\. The \(absolute\) accuracy of the
results is of the order 1\.0e\-4 or better\. The main reason to implement them like
that was that it was fast to do \(the formulas are simple\) and the computations
are fast too\.

The implementation of J1/2 does not suffer from this: this function can be
expressed exactly in terms of elementary functions\.

The functions J0 and J1 are the ones you will encounter most frequently in
practice\.

The computation of I\_n is based on Miller's algorithm for computing the minimal
function from recurrence relations\.

The computation of the Gamma and Beta functions relies on the combinatorics
package, whereas that of the error functions relies on the statistics package\.

The computation of the complete elliptic integrals uses the AGM algorithm\.

Much information about these functions can be found in:

Abramowitz and Stegun: *Handbook of Mathematical Functions* \(Dover, ISBN
486\-61272\-4\)

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: special* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Bessel functions](\.\./\.\./\.\./\.\./index\.md\#bessel\_functions), [error
function](\.\./\.\./\.\./\.\./index\.md\#error\_function),
[math](\.\./\.\./\.\./\.\./index\.md\#math), [special
functions](\.\./\.\./\.\./\.\./index\.md\#special\_functions)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/statistics.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571

[//000000001]: # (math::statistics \- Tcl Math Library)
[//000000002]: # (Generated from file 'statistics\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (math::statistics\(n\) 1 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::statistics \- Basic statistical functions and procedures

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [GENERAL PROCEDURES](#section2)

  - [MULTIVARIATE LINEAR REGRESSION](#section3)

  - [STATISTICAL DISTRIBUTIONS](#section4)

  - [DATA MANIPULATION](#section5)

  - [PLOT PROCEDURES](#section6)

  - [THINGS TO DO](#section7)

  - [EXAMPLES](#section8)

  - [Bugs, Ideas, Feedback](#section9)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require math::statistics 1  

[__::math::statistics::mean__ *data*](#1)  
[__::math::statistics::min__ *data*](#2)  
[__::math::statistics::max__ *data*](#3)  
[__::math::statistics::number__ *data*](#4)  
[__::math::statistics::stdev__ *data*](#5)  
[__::math::statistics::var__ *data*](#6)  
[__::math::statistics::pstdev__ *data*](#7)  
[__::math::statistics::pvar__ *data*](#8)  
[__::math::statistics::median__ *data*](#9)  
[__::math::statistics::basic\-stats__ *data*](#10)  
[__::math::statistics::histogram__ *limits* *values* ?weights?](#11)  
[__::math::statistics::histogram\-alt__ *limits* *values* ?weights?](#12)  
[__::math::statistics::corr__ *data1* *data2*](#13)  
[__::math::statistics::interval\-mean\-stdev__ *data* *confidence*](#14)  
[__::math::statistics::t\-test\-mean__ *data* *est\_mean* *est\_stdev* *alpha*](#15)  
[__::math::statistics::test\-normal__ *data* *significance*](#16)  
[__::math::statistics::lillieforsFit__ *data*](#17)  
[__::math::statistics::test\-Duckworth__ *list1* *list2* *significance*](#18)  
[__::math::statistics::test\-anova\-F__ *alpha* *args*](#19)  
[__::math::statistics::test\-Tukey\-range__ *alpha* *args*](#20)  
[__::math::statistics::test\-Dunnett__ *alpha* *control* *args*](#21)  
[__::math::statistics::quantiles__ *data* *confidence*](#22)  
[__::math::statistics::quantiles__ *limits* *counts* *confidence*](#23)  
[__::math::statistics::autocorr__ *data*](#24)  
[__::math::statistics::crosscorr__ *data1* *data2*](#25)  
[__::math::statistics::mean\-histogram\-limits__ *mean* *stdev* *number*](#26)  
[__::math::statistics::minmax\-histogram\-limits__ *min* *max* *number*](#27)  
[__::math::statistics::linear\-model__ *xdata* *ydata* *intercept*](#28)  
[__::math::statistics::linear\-residuals__ *xdata* *ydata* *intercept*](#29)  
[__::math::statistics::test\-2x2__ *n11* *n21* *n12* *n22*](#30)  
[__::math::statistics::print\-2x2__ *n11* *n21* *n12* *n22*](#31)  
[__::math::statistics::control\-xbar__ *data* ?nsamples?](#32)  
[__::math::statistics::control\-Rchart__ *data* ?nsamples?](#33)  
[__::math::statistics::test\-xbar__ *control* *data*](#34)  
[__::math::statistics::test\-Rchart__ *control* *data*](#35)  
[__::math::statistics::test\-Kruskal\-Wallis__ *confidence* *args*](#36)  
[__::math::statistics::analyse\-Kruskal\-Wallis__ *args*](#37)  
[__::math::statistics::test\-Levene__ *groups*](#38)  
[__::math::statistics::test\-Brown\-Forsythe__ *groups*](#39)  
[__::math::statistics::group\-rank__ *args*](#40)  
[__::math::statistics::test\-Wilcoxon__ *sample\_a* *sample\_b*](#41)  
[__::math::statistics::spearman\-rank__ *sample\_a* *sample\_b*](#42)  
[__::math::statistics::spearman\-rank\-extended__ *sample\_a* *sample\_b*](#43)  
[__::math::statistics::kernel\-density__ *data* opt *\-option value* \.\.\.](#44)  
[__::math::statistics::bootstrap__ *data* *sampleSize* ?numberSamples?](#45)  
[__::math::statistics::wasserstein\-distance__ *prob1* *prob2*](#46)  
[__::math::statistics::kl\-divergence__ *prob1* *prob2*](#47)  
[__::math::statistics::logistic\-model__ *xdata* *ydata*](#48)  
[__::math::statistics::logistic\-probability__ *coeffs* *x*](#49)  
[__::math::statistics::tstat__ *dof* ?alpha?](#50)  
[__::math::statistics::mv\-wls__ *wt1* *weights\_and\_values*](#51)  
[__::math::statistics::mv\-ols__ *values*](#52)  
[__::math::statistics::pdf\-normal__ *mean* *stdev* *value*](#53)  
[__::math::statistics::pdf\-lognormal__ *mean* *stdev* *value*](#54)  
[__::math::statistics::pdf\-exponential__ *mean* *value*](#55)  
[__::math::statistics::pdf\-uniform__ *xmin* *xmax* *value*](#56)  
[__::math::statistics::pdf\-triangular__ *xmin* *xmax* *value*](#57)  
[__::math::statistics::pdf\-symmetric\-triangular__ *xmin* *xmax* *value*](#58)  
[__::math::statistics::pdf\-gamma__ *alpha* *beta* *value*](#59)  
[__::math::statistics::pdf\-poisson__ *mu* *k*](#60)  
[__::math::statistics::pdf\-chisquare__ *df* *value*](#61)  
[__::math::statistics::pdf\-student\-t__ *df* *value*](#62)  
[__::math::statistics::pdf\-gamma__ *a* *b* *value*](#63)  
[__::math::statistics::pdf\-beta__ *a* *b* *value*](#64)  
[__::math::statistics::pdf\-weibull__ *scale* *shape* *value*](#65)  
[__::math::statistics::pdf\-gumbel__ *location* *scale* *value*](#66)  
[__::math::statistics::pdf\-pareto__ *scale* *shape* *value*](#67)  
[__::math::statistics::pdf\-cauchy__ *location* *scale* *value*](#68)  
[__::math::statistics::pdf\-laplace__ *location* *scale* *value*](#69)  
[__::math::statistics::pdf\-kumaraswamy__ *a* *b* *value*](#70)  
[__::math::statistics::pdf\-negative\-binomial__ *r* *p* *value*](#71)  
[__::math::statistics::cdf\-normal__ *mean* *stdev* *value*](#72)  
[__::math::statistics::cdf\-lognormal__ *mean* *stdev* *value*](#73)  
[__::math::statistics::cdf\-exponential__ *mean* *value*](#74)  
[__::math::statistics::cdf\-uniform__ *xmin* *xmax* *value*](#75)  
[__::math::statistics::cdf\-triangular__ *xmin* *xmax* *value*](#76)  
[__::math::statistics::cdf\-symmetric\-triangular__ *xmin* *xmax* *value*](#77)  
[__::math::statistics::cdf\-students\-t__ *degrees* *value*](#78)  
[__::math::statistics::cdf\-gamma__ *alpha* *beta* *value*](#79)  
[__::math::statistics::cdf\-poisson__ *mu* *k*](#80)  
[__::math::statistics::cdf\-beta__ *a* *b* *value*](#81)  
[__::math::statistics::cdf\-weibull__ *scale* *shape* *value*](#82)  
[__::math::statistics::cdf\-gumbel__ *location* *scale* *value*](#83)  
[__::math::statistics::cdf\-pareto__ *scale* *shape* *value*](#84)  
[__::math::statistics::cdf\-cauchy__ *location* *scale* *value*](#85)  
[__::math::statistics::cdf\-F__ *nf1* *nf2* *value*](#86)  
[__::math::statistics::cdf\-laplace__ *location* *scale* *value*](#87)  
[__::math::statistics::cdf\-kumaraswamy__ *a* *b* *value*](#88)  
[__::math::statistics::cdf\-negative\-binomial__ *r* *p* *value*](#89)  
[__::math::statistics::empirical\-distribution__ *values*](#90)  
[__::math::statistics::random\-normal__ *mean* *stdev* *number*](#91)  
[__::math::statistics::random\-lognormal__ *mean* *stdev* *number*](#92)  
[__::math::statistics::random\-exponential__ *mean* *number*](#93)  
[__::math::statistics::random\-uniform__ *xmin* *xmax* *number*](#94)  
[__::math::statistics::random\-triangular__ *xmin* *xmax* *number*](#95)  
[__::math::statistics::random\-symmetric\-triangular__ *xmin* *xmax* *number*](#96)  
[__::math::statistics::random\-gamma__ *alpha* *beta* *number*](#97)  
[__::math::statistics::random\-poisson__ *mu* *number*](#98)  
[__::math::statistics::random\-chisquare__ *df* *number*](#99)  
[__::math::statistics::random\-student\-t__ *df* *number*](#100)  
[__::math::statistics::random\-beta__ *a* *b* *number*](#101)  
[__::math::statistics::random\-weibull__ *scale* *shape* *number*](#102)  
[__::math::statistics::random\-gumbel__ *location* *scale* *number*](#103)  
[__::math::statistics::random\-pareto__ *scale* *shape* *number*](#104)  
[__::math::statistics::random\-cauchy__ *location* *scale* *number*](#105)  
[__::math::statistics::random\-laplace__ *location* *scale* *number*](#106)  
[__::math::statistics::random\-kumaraswamy__ *a* *b* *number*](#107)  
[__::math::statistics::random\-negative\-binomial__ *r* *p* *number*](#108)  
[__::math::statistics::histogram\-uniform__ *xmin* *xmax* *limits* *number*](#109)  
[__::math::statistics::incompleteGamma__ *x* *p* ?tol?](#110)  
[__::math::statistics::incompleteBeta__ *a* *b* *x* ?tol?](#111)  
[__::math::statistics::estimate\-pareto__ *values*](#112)  
[__::math::statistics::estimate\-exponential__ *values*](#113)  
[__::math::statistics::estimate\-laplace__ *values*](#114)  
[__::math::statistics::estimante\-negative\-binomial__ *r* *values*](#115)  
[__::math::statistics::filter__ *varname* *data* *expression*](#116)  
[__::math::statistics::map__ *varname* *data* *expression*](#117)  
[__::math::statistics::samplescount__ *varname* *list* *expression*](#118)  
[__::math::statistics::subdivide__](#119)  
[__::math::statistics::plot\-scale__ *canvas* *xmin* *xmax* *ymin* *ymax*](#120)  
[__::math::statistics::plot\-xydata__ *canvas* *xdata* *ydata* *tag*](#121)  
[__::math::statistics::plot\-xyline__ *canvas* *xdata* *ydata* *tag*](#122)  
[__::math::statistics::plot\-tdata__ *canvas* *tdata* *tag*](#123)  
[__::math::statistics::plot\-tline__ *canvas* *tdata* *tag*](#124)  
[__::math::statistics::plot\-histogram__ *canvas* *counts* *limits* *tag*](#125)  

# <a name='description'></a>DESCRIPTION

The __math::statistics__ package contains functions and procedures for basic
statistical data analysis, such as:

  - Descriptive statistical parameters \(mean, minimum, maximum, standard
    deviation\)

  - Estimates of the distribution in the form of histograms and quantiles

  - Basic testing of hypotheses

  - Probability and cumulative density functions

It is meant to help in developing data analysis applications or doing ad hoc
data analysis, it is not in itself a full application, nor is it intended to
rival with full \(non\-\)commercial statistical packages\.

The purpose of this document is to describe the implemented procedures and
provide some examples of their usage\. As there is ample literature on the
algorithms involved, we refer to relevant text books for more explanations\. The
package contains a fairly large number of public procedures\. They can be
distinguished in three sets: general procedures, procedures that deal with
specific statistical distributions, list procedures to select or transform data
and simple plotting procedures \(these require Tk\)\. *Note:* The data that need
to be analyzed are always contained in a simple list\. Missing values are
represented as empty list elements\. *Note:* With version 1\.0\.1 a mistake in
the procs *pdf\-lognormal*, *cdf\-lognormal* and *random\-lognormal* has been
corrected\. In previous versions the argument for the standard deviation was
actually used as if it was the variance\.

# <a name='section2'></a>GENERAL PROCEDURES

The general statistical procedures are:

  - <a name='1'></a>__::math::statistics::mean__ *data*

    Determine the *mean* value of the given list of data\.

      * list *data*

        \- List of data

  - <a name='2'></a>__::math::statistics::min__ *data*

    Determine the *[minimum](\.\./\.\./\.\./\.\./index\.md\#minimum)* value of the
    given list of data\.

      * list *data*

        \- List of data

  - <a name='3'></a>__::math::statistics::max__ *data*

    Determine the *[maximum](\.\./\.\./\.\./\.\./index\.md\#maximum)* value of the
    given list of data\.

      * list *data*

        \- List of data

  - <a name='4'></a>__::math::statistics::number__ *data*

    Determine the *number* of non\-missing data in the given list

      * list *data*

        \- List of data

  - <a name='5'></a>__::math::statistics::stdev__ *data*

    Determine the *sample standard deviation* of the data in the given list

      * list *data*

        \- List of data

  - <a name='6'></a>__::math::statistics::var__ *data*

    Determine the *sample variance* of the data in the given list

      * list *data*

        \- List of data

  - <a name='7'></a>__::math::statistics::pstdev__ *data*

    Determine the *population standard deviation* of the data in the given
    list

      * list *data*

        \- List of data

  - <a name='8'></a>__::math::statistics::pvar__ *data*

    Determine the *population variance* of the data in the given list

      * list *data*

        \- List of data

  - <a name='9'></a>__::math::statistics::median__ *data*

    Determine the *median* of the data in the given list \(Note that this
    requires sorting the data, which may be a costly operation\)

      * list *data*

        \- List of data

  - <a name='10'></a>__::math::statistics::basic\-stats__ *data*

    Determine a list of all the descriptive parameters: mean, minimum, maximum,
    number of data, sample standard deviation, sample variance, population
    standard deviation and population variance\.

    \(This routine is called whenever either or all of the basic statistical
    parameters are required\. Hence all calculations are done and the relevant
    values are returned\.\)

      * list *data*

        \- List of data

  - <a name='11'></a>__::math::statistics::histogram__ *limits* *values* ?weights?

    Determine histogram information for the given list of data\. Returns a list
    consisting of the number of values that fall into each interval\. \(The first
    interval consists of all values lower than the first limit, the last
    interval consists of all values greater than the last limit\. There is one
    more interval than there are limits\.\)

    Optionally, you can use weights to influence the histogram\.

      * list *limits*

        \- List of upper limits \(in ascending order\) for the intervals of the
        histogram\.

      * list *values*

        \- List of data

      * list *weights*

        \- List of weights, one weight per value

  - <a name='12'></a>__::math::statistics::histogram\-alt__ *limits* *values* ?weights?

    Alternative implementation of the histogram procedure: the open end of the
    intervals is at the lower bound instead of the upper bound\.

      * list *limits*

        \- List of upper limits \(in ascending order\) for the intervals of the
        histogram\.

      * list *values*

        \- List of data

      * list *weights*

        \- List of weights, one weight per value

  - <a name='13'></a>__::math::statistics::corr__ *data1* *data2*

    Determine the correlation coefficient between two sets of data\.

      * list *data1*

        \- First list of data

      * list *data2*

        \- Second list of data

  - <a name='14'></a>__::math::statistics::interval\-mean\-stdev__ *data* *confidence*

    Return the interval containing the mean value and one containing the
    standard deviation with a certain level of confidence \(assuming a normal
    distribution\)

      * list *data*

        \- List of raw data values \(small sample\)

      * float *confidence*

        \- Confidence level \(0\.95 or 0\.99 for instance\)

  - <a name='15'></a>__::math::statistics::t\-test\-mean__ *data* *est\_mean* *est\_stdev* *alpha*

    Test whether the mean value of a sample is in accordance with the estimated
    normal distribution with a certain probability\. Returns 1 if the test
    succeeds or 0 if the mean is unlikely to fit the given distribution\.

      * list *data*

        \- List of raw data values \(small sample\)

      * float *est\_mean*

        \- Estimated mean of the distribution

      * float *est\_stdev*

        \- Estimated stdev of the distribution

      * float *alpha*

        \- Probability level \(0\.95 or 0\.99 for instance\)

  - <a name='16'></a>__::math::statistics::test\-normal__ *data* *significance*

    Test whether the given data follow a normal distribution with a certain
    level of significance\. Returns 1 if the data are normally distributed within
    the level of significance, returns 0 if not\. The underlying test is the
    Lilliefors test\. Smaller values of the significance mean a stricter testing\.

      * list *data*

        \- List of raw data values

      * float *significance*

        \- Significance level \(one of 0\.01, 0\.05, 0\.10, 0\.15 or 0\.20\)\. For
        compatibility reasons the values "1\-significance", 0\.80, 0\.85, 0\.90,
        0\.95 or 0\.99 are also accepted\.

    Compatibility issue: the original implementation and documentation used the
    term "confidence" and used a value 1\-significance \(see ticket 2812473fff\)\.
    This has been corrected as of version 0\.9\.3\.

  - <a name='17'></a>__::math::statistics::lillieforsFit__ *data*

    Returns the goodness of fit to a normal distribution according to
    Lilliefors\. The higher the number, the more likely the data are indeed
    normally distributed\. The test requires at least *five* data points\.

      * list *data*

        \- List of raw data values

  - <a name='18'></a>__::math::statistics::test\-Duckworth__ *list1* *list2* *significance*

    Determine if two data sets have the same median according to the
    Tukey\-Duckworth test\. The procedure returns 0 if the medians are unequal, 1
    if they are equal, \-1 if the test can not be conducted \(the smallest value
    must be in a different set than the greatest value\)\. \# \# Arguments: \# list1
    Values in the first data set \# list2 Values in the second data set \#
    significance Significance level \(either 0\.05, 0\.01 or 0\.001\) \# \# Returns:
    Test whether the given data follow a normal distribution with a certain
    level of significance\. Returns 1 if the data are normally distributed within
    the level of significance, returns 0 if not\. The underlying test is the
    Lilliefors test\. Smaller values of the significance mean a stricter testing\.

      * list *list1*

        \- First list of data

      * list *list2*

        \- Second list of data

      * float *significance*

        \- Significance level \(either 0\.05, 0\.01 or 0\.001\)

  - <a name='19'></a>__::math::statistics::test\-anova\-F__ *alpha* *args*

    Determine if two or more groups with normally distributed data have the same
    means\. The procedure returns 0 if the means are likely unequal, 1 if they
    are\. This is a one\-way ANOVA test\. The groups may also be stored in a nested
    list: The procedure returns a list of the comparison results for each pair
    of groups\. Each element of this list contains: the index of the first group
    and that of the second group, whether the means are likely to be different
    \(1\) or not \(0\) and the confidence interval the conclusion is based on\. The
    groups may also be stored in a nested list:

        test-anova-F 0.05 $A $B $C
        #
        # Or equivalently:
        #
        test-anova-F 0.05 [list $A $B $C]

      * float *alpha*

        \- Significance level

      * list *args*

        \- Two or more groups of data to be checked

  - <a name='20'></a>__::math::statistics::test\-Tukey\-range__ *alpha* *args*

    Determine if two or more groups with normally distributed data have the same
    means, using Tukey's range test\. It is complementary to the ANOVA test\. The
    procedure returns a list of the comparison results for each pair of groups\.
    Each element of this list contains: the index of the first group and that of
    the second group, whether the means are likely to be different \(1\) or not
    \(0\) and the confidence interval the conclusion is based on\. The groups may
    also be stored in a nested list, just as with the ANOVA test\.

      * float *alpha*

        \- Significance level \- either 0\.05 or 0\.01

      * list *args*

        \- Two or more groups of data to be checked

  - <a name='21'></a>__::math::statistics::test\-Dunnett__ *alpha* *control* *args*

    Determine if one or more groups with normally distributed data have the same
    means as the group of control data, using Dunnett's test\. It is
    complementary to the ANOVA test\. The procedure returns a list of the
    comparison results for each group with the control group\. Each element of
    this list contains: whether the means are likely to be different \(1\) or not
    \(0\) and the confidence interval the conclusion is based on\. The groups may
    also be stored in a nested list, just as with the ANOVA test\.

    Note: some care is required if there is only one group to compare the
    control with:

        test-Dunnett-F 0.05 $control [list $A]

    Otherwise the group A is split up into groups of one element \- this is due
    to an ambiguity\.

      * float *alpha*

        \- Significance level \- either 0\.05 or 0\.01

      * list *args*

        \- One or more groups of data to be checked

  - <a name='22'></a>__::math::statistics::quantiles__ *data* *confidence*

    Return the quantiles for a given set of data

      * list *data*

        \- List of raw data values

      * float *confidence*

        \- Confidence level \(0\.95 or 0\.99 for instance\) or a list of confidence
        levels\.

  - <a name='23'></a>__::math::statistics::quantiles__ *limits* *counts* *confidence*

    Return the quantiles based on histogram information \(alternative to the call
    with two arguments\)

      * list *limits*

        \- List of upper limits from histogram

      * list *counts*

        \- List of counts for for each interval in histogram

      * float *confidence*

        \- Confidence level \(0\.95 or 0\.99 for instance\) or a list of confidence
        levels\.

  - <a name='24'></a>__::math::statistics::autocorr__ *data*

    Return the autocorrelation function as a list of values \(assuming
    equidistance between samples, about 1/2 of the number of raw data\)

    The correlation is determined in such a way that the first value is always 1
    and all others are equal to or smaller than 1\. The number of values involved
    will diminish as the "time" \(the index in the list of returned values\)
    increases

      * list *data*

        \- Raw data for which the autocorrelation must be determined

  - <a name='25'></a>__::math::statistics::crosscorr__ *data1* *data2*

    Return the cross\-correlation function as a list of values \(assuming
    equidistance between samples, about 1/2 of the number of raw data\)

    The correlation is determined in such a way that the values can never exceed
    1 in magnitude\. The number of values involved will diminish as the "time"
    \(the index in the list of returned values\) increases\.

      * list *data1*

        \- First list of data

      * list *data2*

        \- Second list of data

  - <a name='26'></a>__::math::statistics::mean\-histogram\-limits__ *mean* *stdev* *number*

    Determine reasonable limits based on mean and standard deviation for a
    histogram Convenience function \- the result is suitable for the histogram
    function\.

      * float *mean*

        \- Mean of the data

      * float *stdev*

        \- Standard deviation

      * int *number*

        \- Number of limits to generate \(defaults to 8\)

  - <a name='27'></a>__::math::statistics::minmax\-histogram\-limits__ *min* *max* *number*

    Determine reasonable limits based on a minimum and maximum for a histogram

    Convenience function \- the result is suitable for the histogram function\.

      * float *min*

        \- Expected minimum

      * float *max*

        \- Expected maximum

      * int *number*

        \- Number of limits to generate \(defaults to 8\)

  - <a name='28'></a>__::math::statistics::linear\-model__ *xdata* *ydata* *intercept*

    Determine the coefficients for a linear regression between two series of
    data \(the model: Y = A \+ B\*X\)\. Returns a list of parameters describing the
    fit

      * list *xdata*

        \- List of independent data

      * list *ydata*

        \- List of dependent data to be fitted

      * boolean *intercept*

        \- \(Optional\) compute the intercept \(1, default\) or fit to a line through
        the origin \(0\)

        The result consists of the following list:

          + \(Estimate of\) Intercept A

          + \(Estimate of\) Slope B

          + Standard deviation of Y relative to fit

          + Correlation coefficient R2

          + Number of degrees of freedom df

          + Standard error of the intercept A

          + Significance level of A

          + Standard error of the slope B

          + Significance level of B

  - <a name='29'></a>__::math::statistics::linear\-residuals__ *xdata* *ydata* *intercept*

    Determine the difference between actual data and predicted from the linear
    model\.

    Returns a list of the differences between the actual data and the predicted
    values\.

      * list *xdata*

        \- List of independent data

      * list *ydata*

        \- List of dependent data to be fitted

      * boolean *intercept*

        \- \(Optional\) compute the intercept \(1, default\) or fit to a line through
        the origin \(0\)

  - <a name='30'></a>__::math::statistics::test\-2x2__ *n11* *n21* *n12* *n22*

    Determine if two set of samples, each from a binomial distribution, differ
    significantly or not \(implying a different parameter\)\.

    Returns the "chi\-square" value, which can be used to the determine the
    significance\.

      * int *n11*

        \- Number of outcomes with the first value from the first sample\.

      * int *n21*

        \- Number of outcomes with the first value from the second sample\.

      * int *n12*

        \- Number of outcomes with the second value from the first sample\.

      * int *n22*

        \- Number of outcomes with the second value from the second sample\.

  - <a name='31'></a>__::math::statistics::print\-2x2__ *n11* *n21* *n12* *n22*

    Determine if two set of samples, each from a binomial distribution, differ
    significantly or not \(implying a different parameter\)\.

    Returns a short report, useful in an interactive session\.

      * int *n11*

        \- Number of outcomes with the first value from the first sample\.

      * int *n21*

        \- Number of outcomes with the first value from the second sample\.

      * int *n12*

        \- Number of outcomes with the second value from the first sample\.

      * int *n22*

        \- Number of outcomes with the second value from the second sample\.

  - <a name='32'></a>__::math::statistics::control\-xbar__ *data* ?nsamples?

    Determine the control limits for an xbar chart\. The number of data in each
    subsample defaults to 4\. At least 20 subsamples are required\.

    Returns the mean, the lower limit, the upper limit and the number of data
    per subsample\.

      * list *data*

        \- List of observed data

      * int *nsamples*

        \- Number of data per subsample

  - <a name='33'></a>__::math::statistics::control\-Rchart__ *data* ?nsamples?

    Determine the control limits for an R chart\. The number of data in each
    subsample \(nsamples\) defaults to 4\. At least 20 subsamples are required\.

    Returns the mean range, the lower limit, the upper limit and the number of
    data per subsample\.

      * list *data*

        \- List of observed data

      * int *nsamples*

        \- Number of data per subsample

  - <a name='34'></a>__::math::statistics::test\-xbar__ *control* *data*

    Determine if the data exceed the control limits for the xbar chart\.

    Returns a list of subsamples \(their indices\) that indeed violate the limits\.

      * list *control*

        \- Control limits as returned by the "control\-xbar" procedure

      * list *data*

        \- List of observed data

  - <a name='35'></a>__::math::statistics::test\-Rchart__ *control* *data*

    Determine if the data exceed the control limits for the R chart\.

    Returns a list of subsamples \(their indices\) that indeed violate the limits\.

      * list *control*

        \- Control limits as returned by the "control\-Rchart" procedure

      * list *data*

        \- List of observed data

  - <a name='36'></a>__::math::statistics::test\-Kruskal\-Wallis__ *confidence* *args*

    Check if the population medians of two or more groups are equal with a given
    confidence level, using the Kruskal\-Wallis test\.

      * float *confidence*

        \- Confidence level to be used \(0\-1\)

      * list *args*

        \- Two or more lists of data

  - <a name='37'></a>__::math::statistics::analyse\-Kruskal\-Wallis__ *args*

    Compute the statistical parameters for the Kruskal\-Wallis test\. Returns the
    Kruskal\-Wallis statistic and the probability that that value would occur
    assuming the medians of the populations are equal\.

      * list *args*

        \- Two or more lists of data

  - <a name='38'></a>__::math::statistics::test\-Levene__ *groups*

    Compute the Levene statistic to determine if groups of data have the same
    variance \(are homoscadastic\) or not\. The data are organised in groups\. This
    version uses the mean of the data as the measure to determine the
    deviations\. The statistic is equivalent to an F statistic with degrees of
    freedom k\-1 and N\-k, k being the number of groups and N the total number of
    data\.

      * list *groups*

        \- List of groups of data

  - <a name='39'></a>__::math::statistics::test\-Brown\-Forsythe__ *groups*

    Compute the Brown\-Forsythe statistic to determine if groups of data have the
    same variance \(are homoscadastic\) or not\. Like the Levene test, but this
    version uses the median of the data\.

      * list *groups*

        \- List of groups of data

  - <a name='40'></a>__::math::statistics::group\-rank__ *args*

    Rank the groups of data with respect to the complete set\. Returns a list
    consisting of the group ID, the value and the rank \(possibly a rational
    number, in case of ties\) for each data item\.

      * list *args*

        \- Two or more lists of data

  - <a name='41'></a>__::math::statistics::test\-Wilcoxon__ *sample\_a* *sample\_b*

    Compute the Wilcoxon test statistic to determine if two samples have the
    same median or not\. \(The statistic can be regarded as standard normal, if
    the sample sizes are both larger than 10\.\) Returns the value of this
    statistic\.

      * list *sample\_a*

        \- List of data comprising the first sample

      * list *sample\_b*

        \- List of data comprising the second sample

  - <a name='42'></a>__::math::statistics::spearman\-rank__ *sample\_a* *sample\_b*

    Return the Spearman rank correlation as an alternative to the ordinary
    \(Pearson's\) correlation coefficient\. The two samples should have the same
    number of data\.

      * list *sample\_a*

        \- First list of data

      * list *sample\_b*

        \- Second list of data

  - <a name='43'></a>__::math::statistics::spearman\-rank\-extended__ *sample\_a* *sample\_b*

    Return the Spearman rank correlation as an alternative to the ordinary
    \(Pearson's\) correlation coefficient as well as additional data\. The two
    samples should have the same number of data\. The procedure returns the
    correlation coefficient, the number of data pairs used and the z\-score, an
    approximately standard normal statistic, indicating the significance of the
    correlation\.

      * list *sample\_a*

        \- First list of data

      * list *sample\_b*

        \- Second list of data

  - <a name='44'></a>__::math::statistics::kernel\-density__ *data* opt *\-option value* \.\.\.

    Return the density function based on kernel density estimation\. The
    procedure is controlled by a small set of options, each of which is given a
    reasonable default\.

    The return value consists of three lists: the centres of the bins, the
    associated probability density and a list of computational parameters \(begin
    and end of the interval, mean and standard deviation and the used
    bandwidth\)\. The computational parameters can be used for further analysis\.

      * list *data*

        \- The data to be examined

      * list *args*

        \- Option\-value pairs:

          + __\-weights__ *weights*

            Per data point the weight \(default: 1 for all data\)

          + __\-bandwidth__ *value*

            Bandwidth to be used for the estimation \(default: determined from
            standard deviation\)

          + __\-number__ *value*

            Number of bins to be returned \(default: 100\)

          + __\-interval__ *\{begin end\}*

            Begin and end of the interval for which the density is returned
            \(default: mean \+/\- 3\*standard deviation\)

          + __\-kernel__ *function*

            Kernel to be used \(One of: gaussian, cosine, epanechnikov, uniform,
            triangular, biweight, logistic; default: gaussian\)

  - <a name='45'></a>__::math::statistics::bootstrap__ *data* *sampleSize* ?numberSamples?

    Create a subsample or subsamples from a given list of data\. The data in the
    samples are chosen from this list \- multiples may occur\. If there is only
    one subsample, the sample itself is returned \(as a list of "sampleSize"
    values\), otherwise a list of samples is returned\.

      * list *data*

        List of values to chose from

      * int *sampleSize*

        Number of values per sample

      * int *numberSamples*

        Number of samples \(default: 1\)

  - <a name='46'></a>__::math::statistics::wasserstein\-distance__ *prob1* *prob2*

    Compute the Wasserstein distance or earth mover's distance for two
    equidstantly spaced histograms or probability densities\. The histograms need
    not to be normalised to sum to one, but they must have the same number of
    entries\.

    Note: the histograms are assumed to be based on the same equidistant
    intervals\. As the bounds are not passed, the value is expressed in the
    length of the intervals\.

      * list *prob1*

        List of values for the first histogram/probability density

      * list *prob2*

        List of values for the second histogram/probability density

  - <a name='47'></a>__::math::statistics::kl\-divergence__ *prob1* *prob2*

    Compute the Kullback\-Leibler \(KL\) divergence for two equidstantly spaced
    histograms or probability densities\. The histograms need not to be
    normalised to sum to one, but they must have the same number of entries\.

    Note: the histograms are assumed to be based on the same equidistant
    intervals\. As the bounds are not passed, the value is expressed in the
    length of the intervals\.

    Note also that the KL divergence is not symmetric and that the second
    histogram should not contain zeroes in places where the first histogram has
    non\-zero values\.

      * list *prob1*

        List of values for the first histogram/probability density

      * list *prob2*

        List of values for the second histogram/probability density

  - <a name='48'></a>__::math::statistics::logistic\-model__ *xdata* *ydata*

    Estimate the coefficients of the logistic model that fits the data best\. The
    data consist of independent x\-values and the outcome 0 or 1 for each of the
    x\-values\. The result can be used to estimate the probability that a certain
    x\-value gives 1\.

      * list *xdata*

        List of values for which the success \(1\) or failure \(0\) is known

      * list *ydata*

        List of successes or failures corresponding to each value in *xdata*\.

  - <a name='49'></a>__::math::statistics::logistic\-probability__ *coeffs* *x*

    Calculate the probability of success for the value *x* given the
    coefficients of the logistic model\.

      * list *coeffs*

        List of coefficients as determine by the __logistic\-model__ command

      * float *x*

        X\-value for which the probability needs to be determined

# <a name='section3'></a>MULTIVARIATE LINEAR REGRESSION

Besides the linear regression with a single independent variable, the statistics
package provides two procedures for doing ordinary least squares \(OLS\) and
weighted least squares \(WLS\) linear regression with several variables\. They were
written by Eric Kemp\-Benedict\.

In addition to these two, it provides a procedure \(tstat\) for calculating the
value of the t\-statistic for the specified number of degrees of freedom that is
required to demonstrate a given level of significance\.

Note: These procedures depend on the math::linearalgebra package\.

*Description of the procedures*

  - <a name='50'></a>__::math::statistics::tstat__ *dof* ?alpha?

    Returns the value of the t\-distribution t\* satisfying

        P(t*)  =  1 - alpha/2
        P(-t*) =  alpha/2

    for the number of degrees of freedom dof\.

    Given a sample of normally\-distributed data x, with an estimate xbar for the
    mean and sbar for the standard deviation, the alpha confidence interval for
    the estimate of the mean can be calculated as

        ( xbar - t* sbar , xbar + t* sbar)

    The return values from this procedure can be compared to an estimated
    t\-statistic to determine whether the estimated value of a parameter is
    significantly different from zero at the given confidence level\.

      * int *dof*

        Number of degrees of freedom

      * float *alpha*

        Confidence level of the t\-distribution\. Defaults to 0\.05\.

  - <a name='51'></a>__::math::statistics::mv\-wls__ *wt1* *weights\_and\_values*

    Carries out a weighted least squares linear regression for the data points
    provided, with weights assigned to each point\.

    The linear model is of the form

        y = b0 + b1 * x1 + b2 * x2 ... + bN * xN + error

    and each point satisfies

        yi = b0 + b1 * xi1 + b2 * xi2 + ... + bN * xiN + Residual_i

    The procedure returns a list with the following elements:

      * The r\-squared statistic

      * The adjusted r\-squared statistic

      * A list containing the estimated coefficients b1, \.\.\. bN, b0 \(The
        constant b0 comes last in the list\.\)

      * A list containing the standard errors of the coefficients

      * A list containing the 95% confidence bounds of the coefficients, with
        each set of bounds returned as a list with two values

    Arguments:

      * list *weights\_and\_values*

        A list consisting of: the weight for the first observation, the data for
        the first observation \(as a sublist\), the weight for the second
        observation \(as a sublist\) and so on\. The sublists of data are organised
        as lists of the value of the dependent variable y and the independent
        variables x1, x2 to xN\.

  - <a name='52'></a>__::math::statistics::mv\-ols__ *values*

    Carries out an ordinary least squares linear regression for the data points
    provided\.

    This procedure simply calls ::mvlinreg::wls with the weights set to 1\.0, and
    returns the same information\.

*Example of the use:*

    # Store the value of the unicode value for the "+/-" character
    set pm "\u00B1"

    # Provide some data
    set data {{  -.67  14.18  60.03 -7.5  }
              { 36.97  15.52  34.24 14.61 }
              {-29.57  21.85  83.36 -7.   }
              {-16.9   11.79  51.67 -6.56 }
              { 14.09  16.24  36.97 -12.84}
              { 31.52  20.93  45.99 -25.4 }
              { 24.05  20.69  50.27  17.27}
              { 22.23  16.91  45.07  -4.3 }
              { 40.79  20.49  38.92  -.73 }
              {-10.35  17.24  58.77  18.78}}

    # Call the ols routine
    set results [::math::statistics::mv-ols $data]

    # Pretty-print the results
    puts "R-squared: [lindex $results 0]"
    puts "Adj R-squared: [lindex $results 1]"
    puts "Coefficients $pm s.e. -- \[95% confidence interval\]:"
    foreach val [lindex $results 2] se [lindex $results 3] bounds [lindex $results 4] {
        set lb [lindex $bounds 0]
        set ub [lindex $bounds 1]
        puts "   $val $pm $se -- \[$lb to $ub\]"
    }

# <a name='section4'></a>STATISTICAL DISTRIBUTIONS

In the literature a large number of probability distributions can be found\. The
statistics package supports:

  - The normal or Gaussian distribution as well as the log\-normal distribution

  - The uniform distribution \- equal probability for all data within a given
    interval

  - The exponential distribution \- useful as a model for certain extreme\-value
    distributions\.

  - The gamma distribution \- based on the incomplete Gamma integral

  - The beta distribution

  - The chi\-square distribution

  - The student's T distribution

  - The Poisson distribution

  - The Pareto distribution

  - The Gumbel distribution

  - The Weibull distribution

  - The Cauchy distribution

  - The F distribution \(only the cumulative density function\)

  - PM \- binomial\.

In principle for each distribution one has procedures for:

  - The probability density \(pdf\-\*\)

  - The cumulative density \(cdf\-\*\)

  - Quantiles for the given distribution \(quantiles\-\*\)

  - Histograms for the given distribution \(histogram\-\*\)

  - List of random values with the given distribution \(random\-\*\)

The following procedures have been implemented:

  - <a name='53'></a>__::math::statistics::pdf\-normal__ *mean* *stdev* *value*

    Return the probability of a given value for a normal distribution with given
    mean and standard deviation\.

      * float *mean*

        \- Mean value of the distribution

      * float *stdev*

        \- Standard deviation of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='54'></a>__::math::statistics::pdf\-lognormal__ *mean* *stdev* *value*

    Return the probability of a given value for a log\-normal distribution with
    given mean and standard deviation\.

      * float *mean*

        \- Mean value of the distribution

      * float *stdev*

        \- Standard deviation of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='55'></a>__::math::statistics::pdf\-exponential__ *mean* *value*

    Return the probability of a given value for an exponential distribution with
    given mean\.

      * float *mean*

        \- Mean value of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='56'></a>__::math::statistics::pdf\-uniform__ *xmin* *xmax* *value*

    Return the probability of a given value for a uniform distribution with
    given extremes\.

      * float *xmin*

        \- Minimum value of the distribution

      * float *xmin*

        \- Maximum value of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='57'></a>__::math::statistics::pdf\-triangular__ *xmin* *xmax* *value*

    Return the probability of a given value for a triangular distribution with
    given extremes\. If the argument min is lower than the argument max, then
    smaller values have higher probability and vice versa\. In the first case the
    probability density function is of the form *f\(x\) = 2\(1\-x\)* and the other
    case it is of the form *f\(x\) = 2x*\.

      * float *xmin*

        \- Minimum value of the distribution

      * float *xmin*

        \- Maximum value of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='58'></a>__::math::statistics::pdf\-symmetric\-triangular__ *xmin* *xmax* *value*

    Return the probability of a given value for a symmetric triangular
    distribution with given extremes\.

      * float *xmin*

        \- Minimum value of the distribution

      * float *xmin*

        \- Maximum value of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='59'></a>__::math::statistics::pdf\-gamma__ *alpha* *beta* *value*

    Return the probability of a given value for a Gamma distribution with given
    shape and rate parameters

      * float *alpha*

        \- Shape parameter

      * float *beta*

        \- Rate parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='60'></a>__::math::statistics::pdf\-poisson__ *mu* *k*

    Return the probability of a given number of occurrences in the same interval
    \(k\) for a Poisson distribution with given mean \(mu\)

      * float *mu*

        \- Mean number of occurrences

      * int *k*

        \- Number of occurences

  - <a name='61'></a>__::math::statistics::pdf\-chisquare__ *df* *value*

    Return the probability of a given value for a chi square distribution with
    given degrees of freedom

      * float *df*

        \- Degrees of freedom

      * float *value*

        \- Value for which the probability is required

  - <a name='62'></a>__::math::statistics::pdf\-student\-t__ *df* *value*

    Return the probability of a given value for a Student's t distribution with
    given degrees of freedom

      * float *df*

        \- Degrees of freedom

      * float *value*

        \- Value for which the probability is required

  - <a name='63'></a>__::math::statistics::pdf\-gamma__ *a* *b* *value*

    Return the probability of a given value for a Gamma distribution with given
    shape and rate parameters

      * float *a*

        \- Shape parameter

      * float *b*

        \- Rate parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='64'></a>__::math::statistics::pdf\-beta__ *a* *b* *value*

    Return the probability of a given value for a Beta distribution with given
    shape parameters

      * float *a*

        \- First shape parameter

      * float *b*

        \- Second shape parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='65'></a>__::math::statistics::pdf\-weibull__ *scale* *shape* *value*

    Return the probability of a given value for a Weibull distribution with
    given scale and shape parameters

      * float *location*

        \- Scale parameter

      * float *scale*

        \- Shape parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='66'></a>__::math::statistics::pdf\-gumbel__ *location* *scale* *value*

    Return the probability of a given value for a Gumbel distribution with given
    location and shape parameters

      * float *location*

        \- Location parameter

      * float *scale*

        \- Shape parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='67'></a>__::math::statistics::pdf\-pareto__ *scale* *shape* *value*

    Return the probability of a given value for a Pareto distribution with given
    scale and shape parameters

      * float *scale*

        \- Scale parameter

      * float *shape*

        \- Shape parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='68'></a>__::math::statistics::pdf\-cauchy__ *location* *scale* *value*

    Return the probability of a given value for a Cauchy distribution with given
    location and shape parameters\. Note that the Cauchy distribution has no
    finite higher\-order moments\.

      * float *location*

        \- Location parameter

      * float *scale*

        \- Shape parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='69'></a>__::math::statistics::pdf\-laplace__ *location* *scale* *value*

    Return the probability of a given value for a Laplace distribution with
    given location and shape parameters\. The Laplace distribution consists of
    two exponential functions, is peaked and has heavier tails than the normal
    distribution\.

      * float *location*

        \- Location parameter \(mean\)

      * float *scale*

        \- Shape parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='70'></a>__::math::statistics::pdf\-kumaraswamy__ *a* *b* *value*

    Return the probability of a given value for a Kumaraswamy distribution with
    given parameters a and b\. The Kumaraswamy distribution is related to the
    Beta distribution, but has a tractable cumulative distribution function\.

      * float *a*

        \- Parameter a

      * float *b*

        \- Parameter b

      * float *value*

        \- Value for which the probability is required

  - <a name='71'></a>__::math::statistics::pdf\-negative\-binomial__ *r* *p* *value*

    Return the probability of a given value for a negative binomial distribution
    with an allowed number of failures and the probability of success\.

      * int *r*

        \- Allowed number of failures \(at least 1\)

      * float *p*

        \- Probability of success

      * int *value*

        \- Number of successes for which the probability is to be returned

  - <a name='72'></a>__::math::statistics::cdf\-normal__ *mean* *stdev* *value*

    Return the cumulative probability of a given value for a normal distribution
    with given mean and standard deviation, that is the probability for values
    up to the given one\.

      * float *mean*

        \- Mean value of the distribution

      * float *stdev*

        \- Standard deviation of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='73'></a>__::math::statistics::cdf\-lognormal__ *mean* *stdev* *value*

    Return the cumulative probability of a given value for a log\-normal
    distribution with given mean and standard deviation, that is the probability
    for values up to the given one\.

      * float *mean*

        \- Mean value of the distribution

      * float *stdev*

        \- Standard deviation of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='74'></a>__::math::statistics::cdf\-exponential__ *mean* *value*

    Return the cumulative probability of a given value for an exponential
    distribution with given mean\.

      * float *mean*

        \- Mean value of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='75'></a>__::math::statistics::cdf\-uniform__ *xmin* *xmax* *value*

    Return the cumulative probability of a given value for a uniform
    distribution with given extremes\.

      * float *xmin*

        \- Minimum value of the distribution

      * float *xmin*

        \- Maximum value of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='76'></a>__::math::statistics::cdf\-triangular__ *xmin* *xmax* *value*

    Return the cumulative probability of a given value for a triangular
    distribution with given extremes\. If xmin < xmax, then lower values have a
    higher probability and vice versa, see also *pdf\-triangular*

      * float *xmin*

        \- Minimum value of the distribution

      * float *xmin*

        \- Maximum value of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='77'></a>__::math::statistics::cdf\-symmetric\-triangular__ *xmin* *xmax* *value*

    Return the cumulative probability of a given value for a symmetric
    triangular distribution with given extremes\.

      * float *xmin*

        \- Minimum value of the distribution

      * float *xmin*

        \- Maximum value of the distribution

      * float *value*

        \- Value for which the probability is required

  - <a name='78'></a>__::math::statistics::cdf\-students\-t__ *degrees* *value*

    Return the cumulative probability of a given value for a Student's t
    distribution with given number of degrees\.

      * int *degrees*

        \- Number of degrees of freedom

      * float *value*

        \- Value for which the probability is required

  - <a name='79'></a>__::math::statistics::cdf\-gamma__ *alpha* *beta* *value*

    Return the cumulative probability of a given value for a Gamma distribution
    with given shape and rate parameters\.

      * float *alpha*

        \- Shape parameter

      * float *beta*

        \- Rate parameter

      * float *value*

        \- Value for which the cumulative probability is required

  - <a name='80'></a>__::math::statistics::cdf\-poisson__ *mu* *k*

    Return the cumulative probability of a given number of occurrences in the
    same interval \(k\) for a Poisson distribution with given mean \(mu\)\.

      * float *mu*

        \- Mean number of occurrences

      * int *k*

        \- Number of occurences

  - <a name='81'></a>__::math::statistics::cdf\-beta__ *a* *b* *value*

    Return the cumulative probability of a given value for a Beta distribution
    with given shape parameters

      * float *a*

        \- First shape parameter

      * float *b*

        \- Second shape parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='82'></a>__::math::statistics::cdf\-weibull__ *scale* *shape* *value*

    Return the cumulative probability of a given value for a Weibull
    distribution with given scale and shape parameters\.

      * float *scale*

        \- Scale parameter

      * float *shape*

        \- Shape parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='83'></a>__::math::statistics::cdf\-gumbel__ *location* *scale* *value*

    Return the cumulative probability of a given value for a Gumbel distribution
    with given location and scale parameters\.

      * float *location*

        \- Location parameter

      * float *scale*

        \- Scale parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='84'></a>__::math::statistics::cdf\-pareto__ *scale* *shape* *value*

    Return the cumulative probability of a given value for a Pareto distribution
    with given scale and shape parameters

      * float *scale*

        \- Scale parameter

      * float *shape*

        \- Shape parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='85'></a>__::math::statistics::cdf\-cauchy__ *location* *scale* *value*

    Return the cumulative probability of a given value for a Cauchy distribution
    with given location and scale parameters\.

      * float *location*

        \- Location parameter

      * float *scale*

        \- Scale parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='86'></a>__::math::statistics::cdf\-F__ *nf1* *nf2* *value*

    Return the cumulative probability of a given value for an F distribution
    with nf1 and nf2 degrees of freedom\.

      * float *nf1*

        \- Degrees of freedom for the numerator

      * float *nf2*

        \- Degrees of freedom for the denominator

      * float *value*

        \- Value for which the probability is required

  - <a name='87'></a>__::math::statistics::cdf\-laplace__ *location* *scale* *value*

    Return the cumulative probability of a given value for a Laplace
    distribution with given location and shape parameters\. The Laplace
    distribution consists of two exponential functions, is peaked and has
    heavier tails than the normal distribution\.

      * float *location*

        \- Location parameter \(mean\)

      * float *scale*

        \- Shape parameter

      * float *value*

        \- Value for which the probability is required

  - <a name='88'></a>__::math::statistics::cdf\-kumaraswamy__ *a* *b* *value*

    Return the cumulative probability of a given value for a Kumaraswamy
    distribution with given parameters a and b\. The Kumaraswamy distribution is
    related to the Beta distribution, but has a tractable cumulative
    distribution function\.

      * float *a*

        \- Parameter a

      * float *b*

        \- Parameter b

      * float *value*

        \- Value for which the probability is required

  - <a name='89'></a>__::math::statistics::cdf\-negative\-binomial__ *r* *p* *value*

    Return the cumulative probability of a given value for a negative binomial
    distribution with an allowed number of failures and the probability of
    success\.

      * int *r*

        \- Allowed number of failures \(at least 1\)

      * float *p*

        \- Probability of success

      * int *value*

        \- Greatest number of successes

  - <a name='90'></a>__::math::statistics::empirical\-distribution__ *values*

    Return a list of values and their empirical probability\. The values are
    sorted in increasing order\. \(The implementation follows the description at
    the corresponding Wikipedia page\)

      * list *values*

        \- List of data to be examined

  - <a name='91'></a>__::math::statistics::random\-normal__ *mean* *stdev* *number*

    Return a list of "number" random values satisfying a normal distribution
    with given mean and standard deviation\.

      * float *mean*

        \- Mean value of the distribution

      * float *stdev*

        \- Standard deviation of the distribution

      * int *number*

        \- Number of values to be returned

  - <a name='92'></a>__::math::statistics::random\-lognormal__ *mean* *stdev* *number*

    Return a list of "number" random values satisfying a log\-normal distribution
    with given mean and standard deviation\.

      * float *mean*

        \- Mean value of the distribution

      * float *stdev*

        \- Standard deviation of the distribution

      * int *number*

        \- Number of values to be returned

  - <a name='93'></a>__::math::statistics::random\-exponential__ *mean* *number*

    Return a list of "number" random values satisfying an exponential
    distribution with given mean\.

      * float *mean*

        \- Mean value of the distribution

      * int *number*

        \- Number of values to be returned

  - <a name='94'></a>__::math::statistics::random\-uniform__ *xmin* *xmax* *number*

    Return a list of "number" random values satisfying a uniform distribution
    with given extremes\.

      * float *xmin*

        \- Minimum value of the distribution

      * float *xmax*

        \- Maximum value of the distribution

      * int *number*

        \- Number of values to be returned

  - <a name='95'></a>__::math::statistics::random\-triangular__ *xmin* *xmax* *number*

    Return a list of "number" random values satisfying a triangular distribution
    with given extremes\. If xmin < xmax, then lower values have a higher
    probability and vice versa \(see also *pdf\-triangular*\.

      * float *xmin*

        \- Minimum value of the distribution

      * float *xmax*

        \- Maximum value of the distribution

      * int *number*

        \- Number of values to be returned

  - <a name='96'></a>__::math::statistics::random\-symmetric\-triangular__ *xmin* *xmax* *number*

    Return a list of "number" random values satisfying a symmetric triangular
    distribution with given extremes\.

      * float *xmin*

        \- Minimum value of the distribution

      * float *xmax*

        \- Maximum value of the distribution

      * int *number*

        \- Number of values to be returned

  - <a name='97'></a>__::math::statistics::random\-gamma__ *alpha* *beta* *number*

    Return a list of "number" random values satisfying a Gamma distribution with
    given shape and rate parameters\.

      * float *alpha*

        \- Shape parameter

      * float *beta*

        \- Rate parameter

      * int *number*

        \- Number of values to be returned

  - <a name='98'></a>__::math::statistics::random\-poisson__ *mu* *number*

    Return a list of "number" random values satisfying a Poisson distribution
    with given mean\.

      * float *mu*

        \- Mean of the distribution

      * int *number*

        \- Number of values to be returned

  - <a name='99'></a>__::math::statistics::random\-chisquare__ *df* *number*

    Return a list of "number" random values satisfying a chi square distribution
    with given degrees of freedom\.

      * float *df*

        \- Degrees of freedom

      * int *number*

        \- Number of values to be returned

  - <a name='100'></a>__::math::statistics::random\-student\-t__ *df* *number*

    Return a list of "number" random values satisfying a Student's t
    distribution with given degrees of freedom\.

      * float *df*

        \- Degrees of freedom

      * int *number*

        \- Number of values to be returned

  - <a name='101'></a>__::math::statistics::random\-beta__ *a* *b* *number*

    Return a list of "number" random values satisfying a Beta distribution with
    given shape parameters\.

      * float *a*

        \- First shape parameter

      * float *b*

        \- Second shape parameter

      * int *number*

        \- Number of values to be returned

  - <a name='102'></a>__::math::statistics::random\-weibull__ *scale* *shape* *number*

    Return a list of "number" random values satisfying a Weibull distribution
    with given scale and shape parameters\.

      * float *scale*

        \- Scale parameter

      * float *shape*

        \- Shape parameter

      * int *number*

        \- Number of values to be returned

  - <a name='103'></a>__::math::statistics::random\-gumbel__ *location* *scale* *number*

    Return a list of "number" random values satisfying a Gumbel distribution
    with given location and scale parameters\.

      * float *location*

        \- Location parameter

      * float *scale*

        \- Scale parameter

      * int *number*

        \- Number of values to be returned

  - <a name='104'></a>__::math::statistics::random\-pareto__ *scale* *shape* *number*

    Return a list of "number" random values satisfying a Pareto distribution
    with given scale and shape parameters\.

      * float *scale*

        \- Scale parameter

      * float *shape*

        \- Shape parameter

      * int *number*

        \- Number of values to be returned

  - <a name='105'></a>__::math::statistics::random\-cauchy__ *location* *scale* *number*

    Return a list of "number" random values satisfying a Cauchy distribution
    with given location and scale parameters\.

      * float *location*

        \- Location parameter

      * float *scale*

        \- Scale parameter

      * int *number*

        \- Number of values to be returned

  - <a name='106'></a>__::math::statistics::random\-laplace__ *location* *scale* *number*

    Return a list of "number" random values satisfying a Laplace distribution
    with given location and shape parameters\. The Laplace distribution consists
    of two exponential functions, is peaked and has heavier tails than the
    normal distribution\.

      * float *location*

        \- Location parameter \(mean\)

      * float *scale*

        \- Shape parameter

      * int *number*

        \- Number of values to be returned

  - <a name='107'></a>__::math::statistics::random\-kumaraswamy__ *a* *b* *number*

    Return a list of "number" random values satisying a Kumaraswamy distribution
    with given parameters a and b\. The Kumaraswamy distribution is related to
    the Beta distribution, but has a tractable cumulative distribution function\.

      * float *a*

        \- Parameter a

      * float *b*

        \- Parameter b

      * int *number*

        \- Number of values to be returned

  - <a name='108'></a>__::math::statistics::random\-negative\-binomial__ *r* *p* *number*

    Return a list of "number" random values satisying a negative binomial
    distribution\.

      * int *r*

        \- Allowed number of failures \(at least 1\)

      * float *p*

        \- Probability of success

      * int *number*

        \- Number of values to be returned

  - <a name='109'></a>__::math::statistics::histogram\-uniform__ *xmin* *xmax* *limits* *number*

    Return the expected histogram for a uniform distribution\.

      * float *xmin*

        \- Minimum value of the distribution

      * float *xmax*

        \- Maximum value of the distribution

      * list *limits*

        \- Upper limits for the buckets in the histogram

      * int *number*

        \- Total number of "observations" in the histogram

  - <a name='110'></a>__::math::statistics::incompleteGamma__ *x* *p* ?tol?

    Evaluate the incomplete Gamma integral

                  1       / x               p-1
    P(p,x) =  --------   |   dt exp(-t) * t
              Gamma(p)  / 0

      * float *x*

        \- Value of x \(limit of the integral\)

      * float *p*

        \- Value of p in the integrand

      * float *tol*

        \- Required tolerance \(default: 1\.0e\-9\)

  - <a name='111'></a>__::math::statistics::incompleteBeta__ *a* *b* *x* ?tol?

    Evaluate the incomplete Beta integral

      * float *a*

        \- First shape parameter

      * float *b*

        \- Second shape parameter

      * float *x*

        \- Value of x \(limit of the integral\)

      * float *tol*

        \- Required tolerance \(default: 1\.0e\-9\)

  - <a name='112'></a>__::math::statistics::estimate\-pareto__ *values*

    Estimate the parameters for the Pareto distribution that comes closest to
    the given values\. Returns the estimated scale and shape parameters, as well
    as the standard error for the shape parameter\.

      * list *values*

        \- List of values, assumed to be distributed according to a Pareto
        distribution

  - <a name='113'></a>__::math::statistics::estimate\-exponential__ *values*

    Estimate the parameter for the exponential distribution that comes closest
    to the given values\. Returns an estimate of the one parameter and of the
    standard error\.

      * list *values*

        \- List of values, assumed to be distributed according to an exponential
        distribution

  - <a name='114'></a>__::math::statistics::estimate\-laplace__ *values*

    Estimate the parameters for the Laplace distribution that comes closest to
    the given values\. Returns an estimate of respectively the location and scale
    parameters, based on maximum likelihood\.

      * list *values*

        \- List of values, assumed to be distributed according to an exponential
        distribution

  - <a name='115'></a>__::math::statistics::estimante\-negative\-binomial__ *r* *values*

    Estimate the probability of success for the negative binomial distribution
    that comes closest to the given values\. The allowed number of failures must
    be given\.

      * int *r*

        \- Allowed number of failures \(at least 1\)

      * int *number*

        \- List of values, assumed to be distributed according to a negative
        binomial distribution\.

TO DO: more function descriptions to be added

# <a name='section5'></a>DATA MANIPULATION

The data manipulation procedures act on lists or lists of lists:

  - <a name='116'></a>__::math::statistics::filter__ *varname* *data* *expression*

    Return a list consisting of the data for which the logical expression is
    true \(this command works analogously to the command
    __[foreach](\.\./\.\./\.\./\.\./index\.md\#foreach)__\)\.

      * string *varname*

        \- Name of the variable used in the expression

      * list *data*

        \- List of data

      * string *expression*

        \- Logical expression using the variable name

  - <a name='117'></a>__::math::statistics::map__ *varname* *data* *expression*

    Return a list consisting of the data that are transformed via the
    expression\.

      * string *varname*

        \- Name of the variable used in the expression

      * list *data*

        \- List of data

      * string *expression*

        \- Expression to be used to transform \(map\) the data

  - <a name='118'></a>__::math::statistics::samplescount__ *varname* *list* *expression*

    Return a list consisting of the *counts* of all data in the sublists of
    the "list" argument for which the expression is true\.

      * string *varname*

        \- Name of the variable used in the expression

      * list *data*

        \- List of sublists, each containing the data

      * string *expression*

        \- Logical expression to test the data \(defaults to "true"\)\.

  - <a name='119'></a>__::math::statistics::subdivide__

    Routine *PM* \- not implemented yet

# <a name='section6'></a>PLOT PROCEDURES

The following simple plotting procedures are available:

  - <a name='120'></a>__::math::statistics::plot\-scale__ *canvas* *xmin* *xmax* *ymin* *ymax*

    Set the scale for a plot in the given canvas\. All plot routines expect this
    function to be called first\. There is no automatic scaling provided\.

      * widget *canvas*

        \- Canvas widget to use

      * float *xmin*

        \- Minimum x value

      * float *xmax*

        \- Maximum x value

      * float *ymin*

        \- Minimum y value

      * float *ymax*

        \- Maximum y value

  - <a name='121'></a>__::math::statistics::plot\-xydata__ *canvas* *xdata* *ydata* *tag*

    Create a simple XY plot in the given canvas \- the data are shown as a
    collection of dots\. The tag can be used to manipulate the appearance\.

      * widget *canvas*

        \- Canvas widget to use

      * float *xdata*

        \- Series of independent data

      * float *ydata*

        \- Series of dependent data

      * string *tag*

        \- Tag to give to the plotted data \(defaults to xyplot\)

  - <a name='122'></a>__::math::statistics::plot\-xyline__ *canvas* *xdata* *ydata* *tag*

    Create a simple XY plot in the given canvas \- the data are shown as a line
    through the data points\. The tag can be used to manipulate the appearance\.

      * widget *canvas*

        \- Canvas widget to use

      * list *xdata*

        \- Series of independent data

      * list *ydata*

        \- Series of dependent data

      * string *tag*

        \- Tag to give to the plotted data \(defaults to xyplot\)

  - <a name='123'></a>__::math::statistics::plot\-tdata__ *canvas* *tdata* *tag*

    Create a simple XY plot in the given canvas \- the data are shown as a
    collection of dots\. The horizontal coordinate is equal to the index\. The tag
    can be used to manipulate the appearance\. This type of presentation is
    suitable for autocorrelation functions for instance or for inspecting the
    time\-dependent behaviour\.

      * widget *canvas*

        \- Canvas widget to use

      * list *tdata*

        \- Series of dependent data

      * string *tag*

        \- Tag to give to the plotted data \(defaults to xyplot\)

  - <a name='124'></a>__::math::statistics::plot\-tline__ *canvas* *tdata* *tag*

    Create a simple XY plot in the given canvas \- the data are shown as a line\.
    See plot\-tdata for an explanation\.

      * widget *canvas*

        \- Canvas widget to use

      * list *tdata*

        \- Series of dependent data

      * string *tag*

        \- Tag to give to the plotted data \(defaults to xyplot\)

  - <a name='125'></a>__::math::statistics::plot\-histogram__ *canvas* *counts* *limits* *tag*

    Create a simple histogram in the given canvas

      * widget *canvas*

        \- Canvas widget to use

      * list *counts*

        \- Series of bucket counts

      * list *limits*

        \- Series of upper limits for the buckets

      * string *tag*

        \- Tag to give to the plotted data \(defaults to xyplot\)

# <a name='section7'></a>THINGS TO DO

The following procedures are yet to be implemented:

  - F\-test\-stdev

  - interval\-mean\-stdev

  - histogram\-normal

  - histogram\-exponential

  - test\-histogram

  - test\-corr

  - quantiles\-\*

  - fourier\-coeffs

  - fourier\-residuals

  - onepar\-function\-fit

  - onepar\-function\-residuals

  - plot\-linear\-model

  - subdivide

# <a name='section8'></a>EXAMPLES

The code below is a small example of how you can examine a set of data:

    # Simple example:
    # - Generate data (as a cheap way of getting some)
    # - Perform statistical analysis to describe the data
    #
    package require math::statistics

    #
    # Two auxiliary procs
    #
    proc pause {time} {
       set wait 0
       after [expr {$time*1000}] {set ::wait 1}
       vwait wait
    }

    proc print-histogram {counts limits} {
       foreach count $counts limit $limits {
          if { $limit != {} } {
             puts [format "<%12.4g\t%d" $limit $count]
             set prev_limit $limit
          } else {
             puts [format ">%12.4g\t%d" $prev_limit $count]
          }
       }
    }

    #
    # Our source of arbitrary data
    #
    proc generateData { data1 data2 } {
       upvar 1 $data1 _data1
       upvar 1 $data2 _data2

       set d1 0.0
       set d2 0.0
       for { set i 0 } { $i < 100 } { incr i } {
          set d1 [expr {10.0-2.0*cos(2.0*3.1415926*$i/24.0)+3.5*rand()}]
          set d2 [expr {0.7*$d2+0.3*$d1+0.7*rand()}]
          lappend _data1 $d1
          lappend _data2 $d2
       }
       return {}
    }

    #
    # The analysis session
    #
    package require Tk
    console show
    canvas .plot1
    canvas .plot2
    pack   .plot1 .plot2 -fill both -side top

    generateData data1 data2

    puts "Basic statistics:"
    set b1 [::math::statistics::basic-stats $data1]
    set b2 [::math::statistics::basic-stats $data2]
    foreach label {mean min max number stdev var} v1 $b1 v2 $b2 {
       puts "$label\t$v1\t$v2"
    }
    puts "Plot the data as function of \"time\" and against each other"
    ::math::statistics::plot-scale .plot1  0 100  0 20
    ::math::statistics::plot-scale .plot2  0 20   0 20
    ::math::statistics::plot-tline .plot1 $data1
    ::math::statistics::plot-tline .plot1 $data2
    ::math::statistics::plot-xydata .plot2 $data1 $data2

    puts "Correlation coefficient:"
    puts [::math::statistics::corr $data1 $data2]

    pause 2
    puts "Plot histograms"
    .plot2 delete all
    ::math::statistics::plot-scale .plot2  0 20 0 100
    set limits         [::math::statistics::minmax-histogram-limits 7 16]
    set histogram_data [::math::statistics::histogram $limits $data1]
    ::math::statistics::plot-histogram .plot2 $histogram_data $limits

    puts "First series:"
    print-histogram $histogram_data $limits

    pause 2
    set limits         [::math::statistics::minmax-histogram-limits 0 15 10]
    set histogram_data [::math::statistics::histogram $limits $data2]
    ::math::statistics::plot-histogram .plot2 $histogram_data $limits d2
    .plot2 itemconfigure d2 -fill red

    puts "Second series:"
    print-histogram $histogram_data $limits

    puts "Autocorrelation function:"
    set  autoc [::math::statistics::autocorr $data1]
    puts [::math::statistics::map $autoc {[format "%.2f" $x]}]
    puts "Cross-correlation function:"
    set  crossc [::math::statistics::crosscorr $data1 $data2]
    puts [::math::statistics::map $crossc {[format "%.2f" $x]}]

    ::math::statistics::plot-scale .plot1  0 100 -1  4
    ::math::statistics::plot-tline .plot1  $autoc "autoc"
    ::math::statistics::plot-tline .plot1  $crossc "crossc"
    .plot1 itemconfigure autoc  -fill green
    .plot1 itemconfigure crossc -fill yellow

    puts "Quantiles: 0.1, 0.2, 0.5, 0.8, 0.9"
    puts "First:  [::math::statistics::quantiles $data1 {0.1 0.2 0.5 0.8 0.9}]"
    puts "Second: [::math::statistics::quantiles $data2 {0.1 0.2 0.5 0.8 0.9}]"

If you run this example, then the following should be clear:

  - There is a strong correlation between two time series, as displayed by the
    raw data and especially by the correlation functions\.

  - Both time series show a significant periodic component

  - The histograms are not very useful in identifying the nature of the time
    series \- they do not show the periodic nature\.

# <a name='section9'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: statistics* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[data analysis](\.\./\.\./\.\./\.\./index\.md\#data\_analysis),
[mathematics](\.\./\.\./\.\./\.\./index\.md\#mathematics),
[statistics](\.\./\.\./\.\./\.\./index\.md\#statistics)

# <a name='category'></a>CATEGORY

Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/symdiff.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

[//000000001]: # (math::calculus::symdiff \- Symbolic differentiation for Tcl)
[//000000002]: # (Generated from file 'symdiff\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2010 by Kevin B\. Kenny <kennykb@acm\.org>)
[//000000004]: # (Redistribution permitted under the terms of the Open Publication License <http://www\.opencontent\.org/openpub/>)
[//000000005]: # (math::calculus::symdiff\(n\) 1\.0\.1 tcllib "Symbolic differentiation for Tcl")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::calculus::symdiff \- Symbolic differentiation for Tcl

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Procedures](#section2)

  - [Expressions](#section3)

  - [Examples](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require grammar::aycock 1\.0  
package require math::calculus::symdiff 1\.0\.1  

[__math::calculus::symdiff::symdiff__ *expression* *variable*](#1)  
[__math::calculus::jacobian__ *variableDict*](#2)  

# <a name='description'></a>DESCRIPTION

The __math::calculus::symdiff__ package provides a symbolic differentiation
facility for Tcl math expressions\. It is useful for providing derivatives to
packages that either require the Jacobian of a set of functions or else are more
efficient or stable when the Jacobian is provided\.

# <a name='section2'></a>Procedures

The __math::calculus::symdiff__ package exports the two procedures:

  - <a name='1'></a>__math::calculus::symdiff::symdiff__ *expression* *variable*

    Differentiates the given *expression* with respect to the specified
    *variable*\. \(See [Expressions](#section3) below for a discussion of
    the subset of Tcl math expressions that are acceptable to
    __math::calculus::symdiff__\.\) The result is a Tcl expression that
    evaluates the derivative\. Returns an error if *expression* is not a
    well\-formed expression or is not differentiable\.

  - <a name='2'></a>__math::calculus::jacobian__ *variableDict*

    Computes the Jacobian of a system of equations\. The system is given by the
    dictionary *variableDict*, whose keys are the names of variables in the
    system, and whose values are Tcl expressions giving the values of those
    variables\. \(See [Expressions](#section3) below for a discussion of the
    subset of Tcl math expressions that are acceptable to
    __math::calculus::symdiff__\. The result is a list of lists: the i'th
    element of the j'th sublist is the partial derivative of the i'th variable
    with respect to the j'th variable\. Returns an error if any of the
    expressions cannot be differentiated, or if *variableDict* is not a
    well\-formed dictionary\.

# <a name='section3'></a>Expressions

The __math::calculus::symdiff__ package accepts only a small subset of the
expressions that are acceptable to Tcl commands such as __expr__ or
__if__\. Specifically, the only constructs accepted are:

  - Floating\-point constants such as __5__ or __3\.14159e\+00__\.

  - References to Tcl variable using $\-substitution\. The variable names must
    consist of alphanumerics and underscores: the __$\{\.\.\.\}__ notation is not
    accepted\.

  - Parentheses\.

  - The __\+__, __\-__, __\*__, __/__\. and __\*\*__ operators\.

  - Calls to the functions __acos__, __asin__, __atan__,
    __atan2__, __cos__, __cosh__, __exp__, __hypot__,
    __[log](\.\./log/log\.md)__, __log10__, __pow__, __sin__,
    __sinh__\. __sqrt__, __tan__, and __tanh__\.

Command substitution, backslash substitution, and argument expansion are not
accepted\.

# <a name='section4'></a>Examples

    math::calculus::symdiff::symdiff {($a*$x+$b)*($c*$x+$d)} x
    ==> (($c * (($a * $x) + $b)) + ($a * (($c * $x) + $d)))
    math::calculus::symdiff::jacobian {x {$a * $x + $b * $y}
                             y {$c * $x + $d * $y}}
    ==> {{$a} {$b}} {{$c} {$d}}

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: calculus* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[math::calculus](calculus\.md), [math::interpolate](interpolate\.md)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2010 by Kevin B\. Kenny <kennykb@acm\.org>
Redistribution permitted under the terms of the Open Publication License <http://www\.opencontent\.org/openpub/>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































Deleted embedded/md/tcllib/files/modules/math/trig.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299

[//000000001]: # (math::trig \- Tcl Math Library)
[//000000002]: # (Generated from file 'trig\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2018 Arjen Markus)
[//000000004]: # (math::trig\(n\) 1\.0\.0 tcllib "Tcl Math Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

math::trig \- Trigonometric anf hyperbolic functions

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [FUNCTIONS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require math::trig 1\.0\.0  

[__::math::trig::radian\_reduced__ *angle*](#1)  
[__::math::trig::degree\_reduced__ *angle*](#2)  
[__::math::trig::cosec__ *angle*](#3)  
[__::math::trig::sec__ *angle*](#4)  
[__::math::trig::cotan__ *angle*](#5)  
[__::math::trig::acosec__ *value*](#6)  
[__::math::trig::asec__ *value*](#7)  
[__::math::trig::acotan__ *value*](#8)  
[__::math::trig::cosech__ *value*](#9)  
[__::math::trig::sech__ *value*](#10)  
[__::math::trig::cotanh__ *value*](#11)  
[__::math::trig::asinh__ *value*](#12)  
[__::math::trig::acosh__ *value*](#13)  
[__::math::trig::atanh__ *value*](#14)  
[__::math::trig::acosech__ *value*](#15)  
[__::math::trig::asech__ *value*](#16)  
[__::math::trig::acotanh__ *value*](#17)  
[__::math::trig::sind__ *angle*](#18)  
[__::math::trig::cosd__ *angle*](#19)  
[__::math::trig::tand__ *angle*](#20)  
[__::math::trig::cosecd__ *angle*](#21)  
[__::math::trig::secd__ *angle*](#22)  
[__::math::trig::cotand__ *angle*](#23)  

# <a name='description'></a>DESCRIPTION

The *math::trig* package defines a set of trigonomic and hyperbolic functions
and their inverses\. In addition it defines versions of the trigonomic functions
that take arguments in degrees instead of radians\.

For easy use these functions may be imported into the *tcl::mathfunc*
namespace, so that they can be used directly in the *expr* command\.

# <a name='section2'></a>FUNCTIONS

The functions *radian\_reduced* and *degree\_reduced* return a reduced angle,
in respectively radians and degrees, in the intervals \[0, 2pi\) and \[0, 360\):

  - <a name='1'></a>__::math::trig::radian\_reduced__ *angle*

    Return the equivalent angle in the interval \[0, 2pi\)\.

      * float *angle*

        Angle \(in radians\)

  - <a name='2'></a>__::math::trig::degree\_reduced__ *angle*

    Return the equivalent angle in the interval \[0, 360\)\.

      * float *angle*

        Angle \(in degrees\)

The following trigonomic functions are defined in addition to the ones defined
in the *expr* command:

  - <a name='3'></a>__::math::trig::cosec__ *angle*

    Calculate the cosecant of the angle \(1/cos\(angle\)\)

      * float *angle*

        Angle \(in radians\)

  - <a name='4'></a>__::math::trig::sec__ *angle*

    Calculate the secant of the angle \(1/sin\(angle\)\)

      * float *angle*

        Angle \(in radians\)

  - <a name='5'></a>__::math::trig::cotan__ *angle*

    Calculate the cotangent of the angle \(1/tan\(angle\)\)

      * float *angle*

        Angle \(in radians\)

For these functions also the inverses are defined:

  - <a name='6'></a>__::math::trig::acosec__ *value*

    Calculate the arc cosecant of the value

      * float *value*

        Value of the argument

  - <a name='7'></a>__::math::trig::asec__ *value*

    Calculate the arc secant of the value

      * float *value*

        Value of the argument

  - <a name='8'></a>__::math::trig::acotan__ *value*

    Calculate the arc cotangent of the value

      * float *value*

        Value of the argument

The following hyperbolic and inverse hyperbolic functions are defined:

  - <a name='9'></a>__::math::trig::cosech__ *value*

    Calculate the hyperbolic cosecant of the value \(1/sinh\(value\)\)

      * float *value*

        Value of the argument

  - <a name='10'></a>__::math::trig::sech__ *value*

    Calculate the hyperbolic secant of the value \(1/cosh\(value\)\)

      * float *value*

        Value of the argument

  - <a name='11'></a>__::math::trig::cotanh__ *value*

    Calculate the hyperbolic cotangent of the value \(1/tanh\(value\)\)

      * float *value*

        Value of the argument

  - <a name='12'></a>__::math::trig::asinh__ *value*

    Calculate the arc hyperbolic sine of the value

      * float *value*

        Value of the argument

  - <a name='13'></a>__::math::trig::acosh__ *value*

    Calculate the arc hyperbolic cosine of the value

      * float *value*

        Value of the argument

  - <a name='14'></a>__::math::trig::atanh__ *value*

    Calculate the arc hyperbolic tangent of the value

      * float *value*

        Value of the argument

  - <a name='15'></a>__::math::trig::acosech__ *value*

    Calculate the arc hyperbolic cosecant of the value

      * float *value*

        Value of the argument

  - <a name='16'></a>__::math::trig::asech__ *value*

    Calculate the arc hyperbolic secant of the value

      * float *value*

        Value of the argument

  - <a name='17'></a>__::math::trig::acotanh__ *value*

    Calculate the arc hyperbolic cotangent of the value

      * float *value*

        Value of the argument

The following versions of the common trigonometric functions and their inverses
are defined:

  - <a name='18'></a>__::math::trig::sind__ *angle*

    Calculate the sine of the angle \(in degrees\)

      * float *angle*

        Angle \(in degrees\)

  - <a name='19'></a>__::math::trig::cosd__ *angle*

    Calculate the cosine of the angle \(in degrees\)

      * float *angle*

        Angle \(in radians\)

  - <a name='20'></a>__::math::trig::tand__ *angle*

    Calculate the cotangent of the angle \(in degrees\)

      * float *angle*

        Angle \(in degrees\)

  - <a name='21'></a>__::math::trig::cosecd__ *angle*

    Calculate the cosecant of the angle \(in degrees\)

      * float *angle*

        Angle \(in degrees\)

  - <a name='22'></a>__::math::trig::secd__ *angle*

    Calculate the secant of the angle \(in degrees\)

      * float *angle*

        Angle \(in degrees\)

  - <a name='23'></a>__::math::trig::cotand__ *angle*

    Calculate the cotangent of the angle \(in degrees\)

      * float *angle*

        Angle \(in degrees\)

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *math :: trig* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[math](\.\./\.\./\.\./\.\./index\.md\#math),
[trigonometry](\.\./\.\./\.\./\.\./index\.md\#trigonometry)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2018 Arjen Markus
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/md4/md4.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201

[//000000001]: # (md4 \- MD4 Message\-Digest Algorithm)
[//000000002]: # (Generated from file 'md4\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (md4\(n\) 1\.0\.7 tcllib "MD4 Message\-Digest Algorithm")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

md4 \- MD4 Message\-Digest Algorithm

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PROGRAMMING INTERFACE](#section3)

  - [EXAMPLES](#section4)

  - [REFERENCES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require md4 ?1\.0\.7?  

[__::md4::md4__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]](#1)  
[__::md4::hmac__ ?*\-hex*? *\-key key* \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]](#2)  
[__::md4::MD4Init__](#3)  
[__::md4::MD4Update__ *token* *data*](#4)  
[__::md4::MD4Final__ *token*](#5)  
[__::md4::HMACInit__ *key*](#6)  
[__::md4::HMACUpdate__ *token* *data*](#7)  
[__::md4::HMACFinal__ *token*](#8)  

# <a name='description'></a>DESCRIPTION

This package is an implementation in Tcl of the MD4 message\-digest algorithm as
described in RFC 1320 \(1\) and \(2\)\. This algorithm takes an arbitrary quantity of
data and generates a 128\-bit message digest from the input\. The MD4 algorithm is
faster but potentially weaker than the related MD5 algorithm \(3\)\.

If you have __critcl__ and have built the __tcllibc__ package then the
implementation of the hashing function will be performed by compiled code\.
Alternatively if __cryptkit__ is available this will be used\. If no
accelerator package can be found then the pure\-tcl implementation is used\. The
programming interface remains the same in all cases\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::md4::md4__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

    Calculate the MD4 digest of the data given in string\. This is returned as a
    binary string by default\. Giving the *\-hex* option will return a
    hexadecimal encoded version of the digest\.

    The data to be hashed can be specified either as a string argument to the
    md4 command, or as a filename or a pre\-opened channel\. If the *\-filename*
    argument is given then the file is opened, the data read and hashed and the
    file is closed\. If the *\-channel* argument is given then data is read from
    the channel until the end of file\. The channel is not closed\.

    Only one of *\-file*, *\-channel* or *string* should be given\.

  - <a name='2'></a>__::md4::hmac__ ?*\-hex*? *\-key key* \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

    Calculate an Hashed Message Authentication digest \(HMAC\) using the MD4
    digest algorithm\. HMACs are described in RFC 2104 \(4\) and provide an MD4
    digest that includes a key\. All options other than *\-key* are as for the
    __::md4::md4__ command\.

# <a name='section3'></a>PROGRAMMING INTERFACE

For the programmer, the MD4 hash can be viewed as a bucket into which one pours
data\. When you have finished, you extract a value that is derived from the data
that was poured into the bucket\. The programming interface to the MD4 hash
operates on a token \(equivalent to the bucket\)\. You call __MD4Init__ to
obtain a token and then call __MD4Update__ as many times as required to add
data to the hash\. To release any resources and obtain the hash value, you then
call __MD4Final__\. An equivalent set of functions gives you a keyed digest
\(HMAC\)\.

  - <a name='3'></a>__::md4::MD4Init__

    Begins a new MD4 hash\. Returns a token ID that must be used for the
    remaining functions\.

  - <a name='4'></a>__::md4::MD4Update__ *token* *data*

    Add data to the hash identified by token\. Calling *MD4Update $token
    "abcd"* is equivalent to calling *MD4Update $token "ab"* followed by
    *MD4Update $token "cb"*\. See [EXAMPLES](#section4)\.

  - <a name='5'></a>__::md4::MD4Final__ *token*

    Returns the hash value and releases any resources held by this token\. Once
    this command completes the token will be invalid\. The result is a binary
    string of 16 bytes representing the 128 bit MD4 digest value\.

  - <a name='6'></a>__::md4::HMACInit__ *key*

    This is equivalent to the __::md4::MD4Init__ command except that it
    requires the key that will be included in the HMAC\.

  - <a name='7'></a>__::md4::HMACUpdate__ *token* *data*

  - <a name='8'></a>__::md4::HMACFinal__ *token*

    These commands are identical to the MD4 equivalent commands\.

# <a name='section4'></a>EXAMPLES

    % md4::md4 -hex "Tcl does MD4"
    858da9b31f57648a032230447bd15f25

    % md4::hmac -hex -key Sekret "Tcl does MD4"
    c324088e5752872689caedf2a0464758

    % set tok [md4::MD4Init]
    ::md4::1
    % md4::MD4Update $tok "Tcl "
    % md4::MD4Update $tok "does "
    % md4::MD4Update $tok "MD4"
    % md4::Hex [md4::MD4Final $tok]
    858da9b31f57648a032230447bd15f25

# <a name='section5'></a>REFERENCES

  1. Rivest, R\., "The MD4 Message Digest Algorithm", RFC 1320, MIT, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1320\.txt](http://www\.rfc\-editor\.org/rfc/rfc1320\.txt)\)

  1. Rivest, R\., "The MD4 message digest algorithm", in A\.J\. Menezes and S\.A\.
     Vanstone, editors, Advances in Cryptology \- CRYPTO '90 Proceedings, pages
     303\-311, Springer\-Verlag, 1991\.

  1. Rivest, R\., "The MD5 Message\-Digest Algorithm", RFC 1321, MIT and RSA Data
     Security, Inc, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1321\.txt](http://www\.rfc\-editor\.org/rfc/rfc1321\.txt)\)

  1. Krawczyk, H\., Bellare, M\. and Canetti, R\. "HMAC: Keyed\-Hashing for Message
     Authentication", RFC 2104, February 1997\.
     \([http://www\.rfc\-editor\.org/rfc/rfc2104\.txt](http://www\.rfc\-editor\.org/rfc/rfc2104\.txt)\)

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *md4* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[md5](\.\./md5/md5\.md), [sha1](\.\./sha1/sha1\.md)

# <a name='keywords'></a>KEYWORDS

[hashing](\.\./\.\./\.\./\.\./index\.md\#hashing),
[md4](\.\./\.\./\.\./\.\./index\.md\#md4),
[message\-digest](\.\./\.\./\.\./\.\./index\.md\#message\_digest), [rfc
1320](\.\./\.\./\.\./\.\./index\.md\#rfc\_1320), [rfc
1321](\.\./\.\./\.\./\.\./index\.md\#rfc\_1321), [rfc
2104](\.\./\.\./\.\./\.\./index\.md\#rfc\_2104),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/md5/md5.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

[//000000001]: # (md5 \- MD5 Message\-Digest Algorithm)
[//000000002]: # (Generated from file 'md5\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (md5\(n\) 2\.0\.8 tcllib "MD5 Message\-Digest Algorithm")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

md5 \- MD5 Message\-Digest Algorithm

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PROGRAMMING INTERFACE](#section3)

  - [EXAMPLES](#section4)

  - [REFERENCES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require md5 ?2\.0\.7?  

[__::md5::md5__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]](#1)  
[__::md5::hmac__ ?*\-hex*? *\-key key* \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]](#2)  
[__::md5::MD5Init__](#3)  
[__::md5::MD5Update__ *token* *data*](#4)  
[__::md5::MD5Final__ *token*](#5)  
[__::md5::HMACInit__ *key*](#6)  
[__::md5::HMACUpdate__ *token* *data*](#7)  
[__::md5::HMACFinal__ *token*](#8)  

# <a name='description'></a>DESCRIPTION

This package is an implementation in Tcl of the MD5 message\-digest algorithm as
described in RFC 1321 \(1\)\. This algorithm takes an arbitrary quantity of data
and generates a 128\-bit message digest from the input\. The MD5 algorithm is
related to the MD4 algorithm \(2\) but has been strengthened against certain types
of potential attack\. MD5 should be used in preference to MD4 for new
applications\.

If you have __critcl__ and have built the __tcllibc__ package then the
implementation of the hashing function will be performed by compiled code\.
Alternatively if you have either __cryptkit__ or __Trf__ then either of
these can be used to accelerate the digest computation\. If no suitable compiled
package is available then the pure\-Tcl implementation wil be used\. The
programming interface remains the same in all cases\.

*Note* the previous version of this package always returned a hex encoded
string\. This has been changed to simplify the programming interface and to make
this version more compatible with other implementations\. To obtain the previous
usage, either explicitly specify package version 1 or use the *\-hex* option to
the __md5__ command\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::md5::md5__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

    Calculate the MD5 digest of the data given in string\. This is returned as a
    binary string by default\. Giving the *\-hex* option will return a
    hexadecimal encoded version of the digest\.

    The data to be hashed can be specified either as a string argument to the
    __md5__ command, or as a filename or a pre\-opened channel\. If the
    *\-filename* argument is given then the file is opened, the data read and
    hashed and the file is closed\. If the *\-channel* argument is given then
    data is read from the channel until the end of file\. The channel is not
    closed\.

    Only one of *\-file*, *\-channel* or *string* should be given\.

  - <a name='2'></a>__::md5::hmac__ ?*\-hex*? *\-key key* \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

    Calculate an Hashed Message Authentication digest \(HMAC\) using the MD5
    digest algorithm\. HMACs are described in RFC 2104 \(3\) and provide an MD5
    digest that includes a key\. All options other than *\-key* are as for the
    __::md5::md5__ command\.

# <a name='section3'></a>PROGRAMMING INTERFACE

For the programmer, the MD5 hash can be viewed as a bucket into which one pours
data\. When you have finished, you extract a value that is derived from the data
that was poured into the bucket\. The programming interface to the MD5 hash
operates on a token \(equivalent to the bucket\)\. You call __MD5Init__ to
obtain a token and then call __MD5Update__ as many times as required to add
data to the hash\. To release any resources and obtain the hash value, you then
call __MD5Final__\. An equivalent set of functions gives you a keyed digest
\(HMAC\)\.

  - <a name='3'></a>__::md5::MD5Init__

    Begins a new MD5 hash\. Returns a token ID that must be used for the
    remaining functions\.

  - <a name='4'></a>__::md5::MD5Update__ *token* *data*

    Add data to the hash identified by token\. Calling *MD5Update $token
    "abcd"* is equivalent to calling *MD5Update $token "ab"* followed by
    *MD5Update $token "cb"*\. See [EXAMPLES](#section4)\.

  - <a name='5'></a>__::md5::MD5Final__ *token*

    Returns the hash value and releases any resources held by this token\. Once
    this command completes the token will be invalid\. The result is a binary
    string of 16 bytes representing the 128 bit MD5 digest value\.

  - <a name='6'></a>__::md5::HMACInit__ *key*

    This is equivalent to the __::md5::MD5Init__ command except that it
    requires the key that will be included in the HMAC\.

  - <a name='7'></a>__::md5::HMACUpdate__ *token* *data*

  - <a name='8'></a>__::md5::HMACFinal__ *token*

    These commands are identical to the MD5 equivalent commands\.

# <a name='section4'></a>EXAMPLES

    % md5::md5 -hex "Tcl does MD5"
    8AAC1EE01E20BB347104FABB90310433

    % md5::hmac -hex -key Sekret "Tcl does MD5"
    35BBA244FD56D3EDF5F3C47474DACB5D

    % set tok [md5::MD5Init]
    ::md5::1
    % md5::MD5Update $tok "Tcl "
    % md5::MD5Update $tok "does "
    % md5::MD5Update $tok "MD5"
    % md5::Hex [md5::MD5Final $tok]
    8AAC1EE01E20BB347104FABB90310433

# <a name='section5'></a>REFERENCES

  1. Rivest, R\., "The MD5 Message\-Digest Algorithm", RFC 1321, MIT and RSA Data
     Security, Inc, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1321\.txt](http://www\.rfc\-editor\.org/rfc/rfc1321\.txt)\)

  1. Rivest, R\., "The MD4 Message Digest Algorithm", RFC 1320, MIT, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1320\.txt](http://www\.rfc\-editor\.org/rfc/rfc1320\.txt)\)

  1. Krawczyk, H\., Bellare, M\. and Canetti, R\. "HMAC: Keyed\-Hashing for Message
     Authentication", RFC 2104, February 1997\.
     \([http://www\.rfc\-editor\.org/rfc/rfc2104\.txt](http://www\.rfc\-editor\.org/rfc/rfc2104\.txt)\)

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *md5* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[md4](\.\./md4/md4\.md), [sha1](\.\./sha1/sha1\.md)

# <a name='keywords'></a>KEYWORDS

[hashing](\.\./\.\./\.\./\.\./index\.md\#hashing),
[md5](\.\./\.\./\.\./\.\./index\.md\#md5),
[message\-digest](\.\./\.\./\.\./\.\./index\.md\#message\_digest), [rfc
1320](\.\./\.\./\.\./\.\./index\.md\#rfc\_1320), [rfc
1321](\.\./\.\./\.\./\.\./index\.md\#rfc\_1321), [rfc
2104](\.\./\.\./\.\./\.\./index\.md\#rfc\_2104),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/md5crypt/md5crypt.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

[//000000001]: # (md5crypt \- MD5\-based password encryption)
[//000000002]: # (Generated from file 'md5crypt\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (md5crypt\(n\) 1\.1\.0 tcllib "MD5\-based password encryption")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

md5crypt \- MD5\-based password encryption

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [SALT](#section3)

  - [EXAMPLES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require md5 2\.0  
package require md5crypt ?1\.1\.0?  

[__::md5crypt::md5crypt__ *password* *salt*](#1)  
[__::md5crypt::aprcrypt__ *password* *salt*](#2)  
[__::md5crypt::salt__ ?*length*?](#3)  

# <a name='description'></a>DESCRIPTION

This package provides an implementation of the MD5\-crypt password encryption
algorithm as pioneered by FreeBSD and currently in use as a replacement for the
unix crypt\(3\) function in many modern systems\. An implementation of the closely
related Apache MD5\-crypt is also available\. The output of these commands are
compatible with the BSD and OpenSSL implementation of md5crypt and the Apache 2
htpasswd program\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::md5crypt::md5crypt__ *password* *salt*

    Generate a BSD compatible md5\-encoded password hash from the plaintext
    password and a random salt \(see SALT\)\.

  - <a name='2'></a>__::md5crypt::aprcrypt__ *password* *salt*

    Generate an Apache compatible md5\-encoded password hash from the plaintext
    password and a random salt \(see SALT\)\.

  - <a name='3'></a>__::md5crypt::salt__ ?*length*?

    Generate a random salt string suitable for use with the __md5crypt__ and
    __aprcrypt__ commands\.

# <a name='section3'></a>SALT

The salt passed to either of the encryption schemes implemented here is checked
to see if it begins with the encryption scheme magic string \(either "$1$" for
MD5\-crypt or "$apr1$" for Apache crypt\)\. If so, this is removed\. The remaining
characters up to the next $ and up to a maximum of 8 characters are then used as
the salt\. The salt text should probably be restricted the set of ASCII
alphanumeric characters plus "\./" \(dot and forward\-slash\) \- this is to preserve
maximum compatability with the unix password file format\.

If a password is being generated rather than checked from a password file then
the __salt__ command may be used to generate a random salt\.

# <a name='section4'></a>EXAMPLES

    % md5crypt::md5crypt password 01234567
    $1$01234567$b5lh2mHyD2PdJjFfALlEz1

    % md5crypt::aprcrypt password 01234567
    $apr1$01234567$IXBaQywhAhc0d75ZbaSDp/

    % md5crypt::md5crypt password [md5crypt::salt]
    $1$dFmvyRmO$T.V3OmzqeEf3hqJp2WFcb.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *md5crypt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[md5](\.\./md5/md5\.md)

# <a name='keywords'></a>KEYWORDS

[hashing](\.\./\.\./\.\./\.\./index\.md\#hashing),
[md5](\.\./\.\./\.\./\.\./index\.md\#md5),
[md5crypt](\.\./\.\./\.\./\.\./index\.md\#md5crypt),
[message\-digest](\.\./\.\./\.\./\.\./index\.md\#message\_digest),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































Deleted embedded/md/tcllib/files/modules/mime/mime.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390

[//000000001]: # (mime \- Mime)
[//000000002]: # (Generated from file 'mime\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 1999\-2000 Marshall T\. Rose)
[//000000004]: # (mime\(n\) 1\.6\.3 tcllib "Mime")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

mime \- Manipulation of MIME body parts

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [KNOWN BUGS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require mime ?1\.6\.3?  

[__::mime::initialize__ ?__\-canonical__ *type/subtype* ?__\-param__ \{*key value*\}\.\.\.? ?__\-encoding__ *value*? ?__\-header__ \{*key value*\}\.\.\.?? \(__\-file__ *name* &#124; __\-string__ *value* &#124; __\-parts__ \{*token1* \.\.\. *tokenN*\}\)](#1)  
[__::mime::finalize__ *token* ?__\-subordinates__ __all__ &#124; __dynamic__ &#124; __none__?](#2)  
[__::mime::getproperty__ *token* ?*property* &#124; __\-names__?](#3)  
[__::mime::getheader__ *token* ?*key* &#124; __\-names__?](#4)  
[__::mime::setheader__ *token* *key value* ?__\-mode__ __write__ &#124; __append__ &#124; __delete__?](#5)  
[__::mime::getbody__ *token* ?__\-decode__? ?__\-command__ *callback* ?__\-blocksize__ *octets*??](#6)  
[__::mime::copymessage__ *token* *channel*](#7)  
[__::mime::buildmessage__ *token*](#8)  
[__::mime::parseaddress__ *string*](#9)  
[__::mime::parsedatetime__ \(*string* &#124; __\-now__\) *property*](#10)  
[__::mime::mapencoding__ *encoding\_name*](#11)  
[__::mime::reversemapencoding__ *charset\_type*](#12)  

# <a name='description'></a>DESCRIPTION

The __mime__ library package provides the commands to create and manipulate
MIME body parts\.

  - <a name='1'></a>__::mime::initialize__ ?__\-canonical__ *type/subtype* ?__\-param__ \{*key value*\}\.\.\.? ?__\-encoding__ *value*? ?__\-header__ \{*key value*\}\.\.\.?? \(__\-file__ *name* &#124; __\-string__ *value* &#124; __\-parts__ \{*token1* \.\.\. *tokenN*\}\)

    This command creates a MIME part and returns a token representing it\.

      * If the __\-canonical__ option is present, then the body is in
        canonical \(raw\) form and is found by consulting either the
        __\-file__, __\-string__, or __\-parts__ option\.

        In addition, both the __\-param__ and __\-header__ options may
        occur zero or more times to specify __Content\-Type__ parameters
        \(e\.g\., __charset__\) and header keyword/values \(e\.g\.,
        __Content\-Disposition__\), respectively\.

        Also, __\-encoding__, if present, specifies the
        __Content\-Transfer\-Encoding__ when copying the body\.

      * If the __\-canonical__ option is not present, then the MIME part
        contained in either the __\-file__ or the __\-string__ option is
        parsed, dynamically generating subordinates as appropriate\.

  - <a name='2'></a>__::mime::finalize__ *token* ?__\-subordinates__ __all__ &#124; __dynamic__ &#124; __none__?

    This command destroys the MIME part represented by *token*\. It returns an
    empty string\.

    If the __\-subordinates__ option is present, it specifies which
    subordinates should also be destroyed\. The default value is __dynamic__,
    destroying all subordinates which were created by __::mime::initialize__
    together with the containing body part\.

  - <a name='3'></a>__::mime::getproperty__ *token* ?*property* &#124; __\-names__?

    This command returns a string or a list of strings containing the properties
    of a MIME part\. If the command is invoked with the name of a specific
    property, then the corresponding value is returned; instead, if
    __\-names__ is specified, a list of all properties is returned;
    otherwise, a serialized array of properties and values is returned\.

    The possible properties are:

      * __content__

        The type/subtype describing the content

      * __encoding__

        The "Content\-Transfer\-Encoding"

      * __params__

        A list of "Content\-Type" parameters

      * __parts__

        A list of tokens for the part's subordinates\. This property is present
        only if the MIME part has subordinates\.

      * __size__

        The approximate size of the content \(unencoded\)

  - <a name='4'></a>__::mime::getheader__ *token* ?*key* &#124; __\-names__?

    This command returns the header of a MIME part, as a list of strings\.

    A header consists of zero or more key/value pairs\. Each value is a list
    containing one or more strings\.

    If this command is invoked with the name of a specific *key*, then a list
    containing the corresponding value\(s\) is returned; instead, if \-names is
    specified, a list of all keys is returned; otherwise, a serialized array of
    keys and values is returned\. Note that when a key is specified \(e\.g\.,
    "Subject"\), the list returned usually contains exactly one string; however,
    some keys \(e\.g\., "Received"\) often occur more than once in the header,
    accordingly the list returned usually contains more than one string\.

  - <a name='5'></a>__::mime::setheader__ *token* *key value* ?__\-mode__ __write__ &#124; __append__ &#124; __delete__?

    This command writes, appends to, or deletes the *value* associated with a
    *key* in the header\. It returns a list of strings containing the previous
    value associated with the key\.

    The value for __\-mode__ is one of:

      * __write__

        The *key*/*value* is either created or overwritten \(the default\)\.

      * __append__

        A new *value* is appended for the *key* \(creating it as necessary\)\.

      * __delete__

        All values associated with the key are removed \(the *value* parameter
        is ignored\)\.

  - <a name='6'></a>__::mime::getbody__ *token* ?__\-decode__? ?__\-command__ *callback* ?__\-blocksize__ *octets*??

    This command returns a string containing the body of the leaf MIME part
    represented by *token* in canonical form\.

    If the __\-command__ option is present, then it is repeatedly invoked
    with a fragment of the body as this:

        uplevel #0 $callback [list "data" $fragment]

    \(The __\-blocksize__ option, if present, specifies the maximum size of
    each fragment passed to the callback\.\)

    When the end of the body is reached, the callback is invoked as:

        uplevel #0 $callback "end"

    Alternatively, if an error occurs, the callback is invoked as:

        uplevel #0 $callback [list "error" reason]

    Regardless, the return value of the final invocation of the callback is
    propagated upwards by __::mime::getbody__\.

    If the __\-command__ option is absent, then the return value of
    __::mime::getbody__ is a string containing the MIME part's entire body\.

    If the option __\-decode__ is absent the return value computed above is
    returned as is\. This means that it will be in the charset specified for the
    token and not the usual utf\-8\. If the option __\-decode__ is present
    however the command will use the charset information associated with the
    token to convert the string from its encoding into utf\-8 before returning
    it\.

  - <a name='7'></a>__::mime::copymessage__ *token* *channel*

    This command copies the MIME represented by *token* part to the specified
    *channel*\. The command operates synchronously, and uses fileevent to allow
    asynchronous operations to proceed independently\. It returns an empty
    string\.

  - <a name='8'></a>__::mime::buildmessage__ *token*

    This command returns the MIME part represented by *token* as a string\. It
    is similar to __::mime::copymessage__, only it returns the data as a
    return string instead of writing to a channel\.

  - <a name='9'></a>__::mime::parseaddress__ *string*

    This command takes a string containing one or more 822\-style address
    specifications and returns a list of serialized arrays, one element for each
    address specified in the argument\. If the string contains more than one
    address they will be separated by commas\.

    Each serialized array contains the properties below\. Note that one or more
    of these properties may be empty\.

      * __address__

        local@domain

      * __comment__

        822\-style comment

      * __domain__

        the domain part \(rhs\)

      * __error__

        non\-empty on a parse error

      * __group__

        this address begins a group

      * __friendly__

        user\-friendly rendering

      * __local__

        the local part \(lhs\)

      * __memberP__

        this address belongs to a group

      * __phrase__

        the phrase part

      * __proper__

        822\-style address specification

      * __route__

        822\-style route specification \(obsolete\)

  - <a name='10'></a>__::mime::parsedatetime__ \(*string* &#124; __\-now__\) *property*

    This command takes a string containing an 822\-style date\-time specification
    and returns the specified property as a serialized array\.

    The list of properties and their ranges are:

      * __hour__

        0 \.\. 23

      * __lmonth__

        January, February, \.\.\., December

      * __lweekday__

        Sunday, Monday, \.\.\. Saturday

      * __mday__

        1 \.\. 31

      * __min__

        0 \.\. 59

      * __mon__

        1 \.\. 12

      * __month__

        Jan, Feb, \.\.\., Dec

      * __proper__

        822\-style date\-time specification

      * __rclock__

        elapsed seconds between then and now

      * __sec__

        0 \.\. 59

      * __wday__

        0 \.\. 6 \(Sun \.\. Mon\)

      * __weekday__

        Sun, Mon, \.\.\., Sat

      * __yday__

        1 \.\. 366

      * __year__

        1900 \.\.\.

      * __zone__

        \-720 \.\. 720 \(minutes east of GMT\)

  - <a name='11'></a>__::mime::mapencoding__ *encoding\_name*

    This commansd maps tcl encodings onto the proper names for their MIME
    charset type\. This is only done for encodings whose charset types were
    known\. The remaining encodings return "" for now\.

  - <a name='12'></a>__::mime::reversemapencoding__ *charset\_type*

    This command maps MIME charset types onto tcl encoding names\. Those that are
    unknown return ""\.

# <a name='section2'></a>KNOWN BUGS

  - Tcllib Bug \#447037

    This problem affects only people which are using Tcl and Mime on a 64\-bit
    system\. The currently recommended fix for this problem is to upgrade to Tcl
    version 8\.4\. This version has extended 64 bit support and the bug does not
    appear anymore\.

    The problem could have been generally solved by requiring the use of Tcl 8\.4
    for this package\. We decided against this solution as it would force a large
    number of unaffected users to upgrade their Tcl interpreter for no reason\.

    See [Ticket 447037](/tktview?name=447037) for additional information\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *mime* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[ftp](\.\./ftp/ftp\.md), [http](\.\./\.\./\.\./\.\./index\.md\#http),
[pop3](\.\./pop3/pop3\.md), [smtp](smtp\.md)

# <a name='keywords'></a>KEYWORDS

[email](\.\./\.\./\.\./\.\./index\.md\#email),
[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[mail](\.\./\.\./\.\./\.\./index\.md\#mail), [mime](\.\./\.\./\.\./\.\./index\.md\#mime),
[net](\.\./\.\./\.\./\.\./index\.md\#net), [rfc
2045](\.\./\.\./\.\./\.\./index\.md\#rfc\_2045), [rfc
2046](\.\./\.\./\.\./\.\./index\.md\#rfc\_2046), [rfc
2049](\.\./\.\./\.\./\.\./index\.md\#rfc\_2049), [rfc
821](\.\./\.\./\.\./\.\./index\.md\#rfc\_821), [rfc
822](\.\./\.\./\.\./\.\./index\.md\#rfc\_822), [smtp](\.\./\.\./\.\./\.\./index\.md\#smtp)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 1999\-2000 Marshall T\. Rose
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/mime/smtp.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277

[//000000001]: # (smtp \- smtp client)
[//000000002]: # (Generated from file 'smtp\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 1999\-2000 Marshall T\. Rose and others)
[//000000004]: # (smtp\(n\) 1\.5 tcllib "smtp client")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

smtp \- Client\-side tcl implementation of the smtp protocol

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Authentication](#section2)

  - [EXAMPLE](#section3)

  - [TLS Security Considerations](#section4)

  - [REFERENCES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl  
package require mime ?1\.5\.4?  
package require smtp ?1\.5?  

[__::smtp::sendmessage__ *token* *option*\.\.\.](#1)  

# <a name='description'></a>DESCRIPTION

The __smtp__ library package provides the client side of the Simple Mail
Transfer Protocol \(SMTP\) \(1\) \(2\)\.

  - <a name='1'></a>__::smtp::sendmessage__ *token* *option*\.\.\.

    This command sends the MIME part \(see package __[mime](mime\.md)__\)
    represented by *token* to an SMTP server\. *options* is a list of options
    and their associated values\. The recognized options are:

      * __\-servers__

        A list of SMTP servers\. The default is __localhost__\.

        If multiple servers are specified they are tried in sequence\. Note that
        the __\-ports__ are iterated over in tandem with the servers\. If
        there are not enough ports for the number of servers the default port
        \(see below\) is used\. If there are more ports than servers the
        superfluous ports are ignored\.

      * __\-ports__

        A list of SMTP ports\. The default is __25__\.

        See option __\-servers__ above regardig the behaviour for then
        multiple servers and ports are specified\.

      * __\-client__

        The name to use as our hostname when connecting to the server\. By
        default this is either localhost if one of the servers is localhost, or
        is set to the string returned by __info hostname__\.

      * __\-queue__

        Indicates that the SMTP server should be asked to queue the message for
        later processing\. A boolean value\.

      * __\-atleastone__

        Indicates that the SMTP server must find at least one recipient
        acceptable for the message to be sent\. A boolean value\.

      * __\-originator__

        A string containing an 822\-style address specification\. If present the
        header isn't examined for an originator address\.

      * __\-recipients__

        A string containing one or more 822\-style address specifications\. If
        present the header isn't examined for recipient addresses\)\. If the
        string contains more than one address they will be separated by commas\.

      * __\-header__

        A list containing two elements, an smtp header and its associated value
        \(the \-header option may occur zero or more times\)\.

      * __\-usetls__

        This package supports the RFC 3207 TLS extension \(3\) by default provided
        the tls package is available\. You can turn this off with this boolean
        option\.

      * __\-tlsimport__

        This boolean flag is __false__ by default\. When this flag is set the
        package will import TLS on a sucessfully opened channel\. This is needed
        for connections using native TLS negotiation instead of
        __STARTTLS__\. The __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__
        package is automatically required when needed\.

      * __\-tlspolicy__

        This option lets you specify a command to be called if an error occurs
        during TLS setup\. The command is called with the SMTP code and
        diagnostic message appended\. The command should return 'secure' or
        'insecure' where insecure will cause the package to continue on the
        unencrypted channel\. Returning 'secure' will cause the socket to be
        closed and the next server in the __\-servers__ list to be tried\.

      * __\-username__

      * __\-password__

        If your SMTP server requires authentication \(RFC 2554 \(4\)\) before
        accepting mail you can use __\-username__ and __\-password__ to
        provide your authentication details to the server\. Currently this
        package supports DIGEST\-MD5, CRAM\-MD5, LOGIN and PLAIN authentication
        methods\. The most secure method will be tried first and each method
        tried in turn until we are either authorized or we run out of methods\.
        Note that if the server permits a TLS connection, then the authorization
        will occur after we begin using the secure channel\.

        Please also read the section on [Authentication](#section2), it
        details the necessary prequisites, i\.e\. packages needed to support these
        options and authentication\.

    If the __\-originator__ option is not present, the originator address is
    taken from __From__ \(or __Resent\-From__\); similarly, if the
    __\-recipients__ option is not present, recipient addresses are taken
    from __To__, __cc__, and __Bcc__ \(or __Resent\-To__, and so
    on\)\. Note that the header key/values supplied by the __\-header__ option
    \(not those present in the MIME part\) are consulted\. Regardless, header
    key/values are added to the outgoing message as necessary to ensure that a
    valid 822\-style message is sent\.

    The command returns a list indicating which recipients were unacceptable to
    the SMTP server\. Each element of the list is another list, containing the
    address, an SMTP error code, and a textual diagnostic\. Depending on the
    __\-atleastone__ option and the intended recipients, a non\-empty list may
    still indicate that the message was accepted by the server\.

# <a name='section2'></a>Authentication

Beware\. SMTP authentication uses __[SASL](\.\./sasl/sasl\.md)__\. I\.e\. if
the user has to authenticate a connection, i\.e\. use the options __\-user__
and __\-password__ \(see above\) it is necessary to have the __sasl__
package available so that __smtp__ can load it\.

This is a soft dependency because not everybody requires authentication, and
__sasl__ depends on a lot of the cryptographic \(secure\) hashes, i\.e\. all of
__[md5](\.\./md5/md5\.md)__, __[otp](\.\./otp/otp\.md)__,
__[md4](\.\./md4/md4\.md)__, __[sha1](\.\./sha1/sha1\.md)__, and
__[ripemd160](\.\./ripemd/ripemd160\.md)__\.

# <a name='section3'></a>EXAMPLE

    proc send_simple_message {recipient email_server subject body} {
        package require smtp
        package require mime

        set token [mime::initialize -canonical text/plain \
    	-string $body]
        mime::setheader $token Subject $subject
        smtp::sendmessage $token \
    	-recipients $recipient -servers $email_server
        mime::finalize $token
    }

    send_simple_message someone@somewhere.com localhost \
        "This is the subject." "This is the message."

# <a name='section4'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section5'></a>REFERENCES

  1. Jonathan B\. Postel, "SIMPLE MAIL TRANSFER PROTOCOL", RFC 821, August 1982\.
     \([http://www\.rfc\-editor\.org/rfc/rfc821\.txt](http://www\.rfc\-editor\.org/rfc/rfc821\.txt)\)

  1. J\. Klensin, "Simple Mail Transfer Protocol", RFC 2821, April 2001\.
     \([http://www\.rfc\-editor\.org/rfc/rfc2821\.txt](http://www\.rfc\-editor\.org/rfc/rfc2821\.txt)\)

  1. P\. Hoffman, "SMTP Service Extension for Secure SMTP over Transport Layer
     Security", RFC 3207, February 2002\.
     \([http://www\.rfc\-editor\.org/rfc/rfc3207\.txt](http://www\.rfc\-editor\.org/rfc/rfc3207\.txt)\)

  1. J\. Myers, "SMTP Service Extension for Authentication", RFC 2554, March
     1999\.
     \([http://www\.rfc\-editor\.org/rfc/rfc2554\.txt](http://www\.rfc\-editor\.org/rfc/rfc2554\.txt)\)

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *smtp* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[ftp](\.\./ftp/ftp\.md), [http](\.\./\.\./\.\./\.\./index\.md\#http),
[mime](mime\.md), [pop3](\.\./pop3/pop3\.md)

# <a name='keywords'></a>KEYWORDS

[email](\.\./\.\./\.\./\.\./index\.md\#email),
[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[mail](\.\./\.\./\.\./\.\./index\.md\#mail), [mime](\.\./\.\./\.\./\.\./index\.md\#mime),
[net](\.\./\.\./\.\./\.\./index\.md\#net), [rfc
2554](\.\./\.\./\.\./\.\./index\.md\#rfc\_2554), [rfc
2821](\.\./\.\./\.\./\.\./index\.md\#rfc\_2821), [rfc
3207](\.\./\.\./\.\./\.\./index\.md\#rfc\_3207), [rfc
821](\.\./\.\./\.\./\.\./index\.md\#rfc\_821), [rfc
822](\.\./\.\./\.\./\.\./index\.md\#rfc\_822), [smtp](\.\./\.\./\.\./\.\./index\.md\#smtp),
[tls](\.\./\.\./\.\./\.\./index\.md\#tls)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 1999\-2000 Marshall T\. Rose and others
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/multiplexer/multiplexer.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

[//000000001]: # (multiplexer \- One\-to\-many communication with sockets\.)
[//000000002]: # (Generated from file 'multiplexer\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (multiplexer\(n\) 0\.2 tcllib "One\-to\-many communication with sockets\.")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

multiplexer \- One\-to\-many communication with sockets\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require logger  
package require multiplexer ?0\.2?  

[__::multiplexer::create__](#1)  
[__$\{multiplexer\_instance\}::Init__ *port*](#2)  
[__$\{multiplexer\_instance\}::Config__ *key* *value*](#3)  
[__$\{multiplexer\_instance\}::AddFilter__ *cmdprefix*](#4)  
[__cmdprefix__ *data* *chan* *clientaddress* *clientport*](#5)  
[__$\{multiplexer\_instance\}::AddAccessFilter__ *cmdprefix*](#6)  
[__cmdprefix__ *chan* *clientaddress* *clientport*](#7)  
[__$\{multiplexer\_instance\}::AddExitFilter__ *cmdprefix*](#8)  
[__cmdprefix__ *chan* *clientaddress* *clientport*](#9)  

# <a name='description'></a>DESCRIPTION

The __multiplexer__ package provides a generic system for one\-to\-many
communication utilizing sockets\. For example, think of a chat system where one
user sends a message which is then broadcast to all the other connected users\.

It is possible to have different multiplexers running concurrently\.

  - <a name='1'></a>__::multiplexer::create__

    The __create__ command creates a new multiplexer 'instance'\. For
    example:

        set mp [::multiplexer::create]

    This instance can then be manipulated like so:

        ${mp}::Init 35100

  - <a name='2'></a>__$\{multiplexer\_instance\}::Init__ *port*

    This starts the multiplexer listening on the specified port\.

  - <a name='3'></a>__$\{multiplexer\_instance\}::Config__ *key* *value*

    Use __Config__ to configure the multiplexer instance\. Configuration
    options currently include:

      * __sendtoorigin__

        A boolean flag\. If __true__, the sender will receive a copy of the
        sent message\. Defaults to __false__\.

      * __debuglevel__

        Sets the debug level to use for the multiplexer instance, according to
        those specified by the __[logger](\.\./log/logger\.md)__ package
        \(debug, info, notice, warn, error, critical\)\.

  - <a name='4'></a>__$\{multiplexer\_instance\}::AddFilter__ *cmdprefix*

    Command to add a filter for data that passes through the multiplexer
    instance\. The registered *cmdprefix* is called when data arrives at a
    multiplexer instance\. If there is more than one filter command registered at
    the instance they will be called in the order of registristation, and each
    filter will get the result of the preceding filter as its argument\. The
    first filter gets the incoming data as its argument\. The result returned by
    the last filter is the data which will be broadcast to all clients of the
    multiplexer instance\. The command prefix is called as

      * <a name='5'></a>__cmdprefix__ *data* *chan* *clientaddress* *clientport*

        Takes the incoming *data*, modifies it, and returns that as its
        result\. The last three arguments contain information about the client
        which sent the data to filter: The channel connecting us to the client,
        its ip\-address, and its ip\-port\.

  - <a name='6'></a>__$\{multiplexer\_instance\}::AddAccessFilter__ *cmdprefix*

    Command to add an access filter\. The registered *cmdprefix* is called when
    a new client socket tries to connect to the multixer instance\. If there is
    more than one access filter command registered at the instance they will be
    called in the order of registristation\. If any of the called commands
    returns __\-1__ the access to the multiplexer instance is denied and the
    client channel is closed immediately\. Any other result grants the client
    access to the multiplexer instance\. The command prefix is called as

      * <a name='7'></a>__cmdprefix__ *chan* *clientaddress* *clientport*

        The arguments contain information about the client which tries to
        connected to the instance: The channel connecting us to the client, its
        ip\-address, and its ip\-port\.

  - <a name='8'></a>__$\{multiplexer\_instance\}::AddExitFilter__ *cmdprefix*

    Adds filter to be run when client socket generates an EOF condition\. The
    registered *cmdprefix* is called when a client socket of the multixer
    signals EOF\. If there is more than one exit filter command registered at the
    instance they will be called in the order of registristation\. Errors thrown
    by an exit filter are ignored, but logged\. Any result returned by an exit
    filter is ignored\. The command prefix is called as

      * <a name='9'></a>__cmdprefix__ *chan* *clientaddress* *clientport*

        The arguments contain information about the client which signaled the
        EOF: The channel connecting us to the client, its ip\-address, and its
        ip\-port\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *multiplexer* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[chat](\.\./\.\./\.\./\.\./index\.md\#chat),
[multiplexer](\.\./\.\./\.\./\.\./index\.md\#multiplexer)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































Deleted embedded/md/tcllib/files/modules/namespacex/namespacex.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

[//000000001]: # (namespacex \- Namespace utility commands)
[//000000002]: # (Generated from file 'namespacex\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 200? Neil Madden \(http://wiki\.tcl\.tk/12790\))
[//000000004]: # (Copyright &copy; 200? Various \(http://wiki\.tcl\.tk/1489\))
[//000000005]: # (Copyright &copy; 2010 Documentation, Andreas Kupries)
[//000000006]: # (namespacex\(n\) 0\.2 tcllib "Namespace utility commands")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

namespacex \- Namespace utility commands

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require namespacex ?0\.2?  

[__::namespacex hook add__ ?*namespace*? *cmdprefix*](#1)  
[__::namespacex hook proc__ ?*namespace*? *arguments* *body*](#2)  
[__::namespacex hook on__ ?*namespace*? *guardcmdprefix* *actioncmdprefix*](#3)  
[__::namespacex hook next__ *arg*\.\.\.](#4)  
[__::namespacex import fromns__ *cmdname ?*newname* \.\.\.?*](#5)  
[__::namespacex info allchildren__ *namespace*](#6)  
[__::namespacex info allvars__ *namespace*](#7)  
[__::namespacex normalize__ *namespace*](#8)  
[__::namespacex info vars__ *namespace* ?*pattern*?](#9)  
[__::namespacex state get__ *namespace*](#10)  
[__::namespacex state set__ *namespace* *dict*](#11)  
[__::namespacex state drop__ *namespace*](#12)  
[__::namespacex strip__ *prefix* *namespaces*](#13)  

# <a name='description'></a>DESCRIPTION

This package provides a number of utility commands for working with namespaces\.
The commands fall into four categories:

  1. Hook commands provide and manipulate a chain of commands which replaces the
     single regular __[namespace
     unknown](\.\./\.\./\.\./\.\./index\.md\#namespace\_unknown)__ handler\.

  1. An import command provides the ability to import any command from another
     namespace\.

  1. Information commands allow querying of variables and child namespaces\.

  1. State commands provide a means to serialize variable values in a namespace\.

# <a name='section2'></a>Commands

  - <a name='1'></a>__::namespacex hook add__ ?*namespace*? *cmdprefix*

    Adds the *cmdprefix* to the chain of unknown command handlers that are
    invoked when the *namespace* would otherwise invoke its unknown handler\.
    If *namespace* is not specified, then *cmdprefix* is added to the chain
    of handlers for the namespace of the caller\.

    The chain of *cmdprefix* are executed in reverse order of addition,
    *i\.e\.* the most recently added *cmdprefix* is executed first\. When
    executed, *cmdprefix* has additional arguments appended to it as would any
    namespace unknown handler\.

  - <a name='2'></a>__::namespacex hook proc__ ?*namespace*? *arguments* *body*

    Adds an anonymous procedure to the chain of namespace unknown handlers for
    the *namespace*\.

    If *namespace* is not specified, then the handler is added to the chain of
    handlers for the namespace of the caller\.

    The *arguments* and *body* are specified as for the core
    __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ command\.

  - <a name='3'></a>__::namespacex hook on__ ?*namespace*? *guardcmdprefix* *actioncmdprefix*

    Adds a guarded action to the chain of namespace unknown handlers for the
    *namespace*\.

    If *namespace* is not specified, then the handler is added to the chain of
    handlers for the namespace of the caller\.

    The *guardcmdprefix* is executed first\. If it returns a value that can be
    interpreted as false, then the next unknown hander in the chain is executed\.
    Otherwise, *actioncmdprefix* is executed and the return value of the
    handler is the value returned by *actioncmdprefix*\.

    When executed, both *guardcmdprefix* and *actioncmdprefix* have the same
    additional arguments appended as for any namespace unknown handler\.

  - <a name='4'></a>__::namespacex hook next__ *arg*\.\.\.

    This command is available to namespace hooks to execute the next hook in the
    chain of handlers for the namespace\.

  - <a name='5'></a>__::namespacex import fromns__ *cmdname ?*newname* \.\.\.?*

    Imports the command *cmdname* from the *fromns* namespace into the
    namespace of the caller\. The *cmdname* command is imported even if the
    *fromns* did not originally export the command\.

    If *newname* is specified, then the imported command will be known by that
    name\. Otherwise, the command retains is original name as given by
    *cmdname*\.

    Additional pairs of *cmdname* / *newname* arguments may also be
    specified\.

  - <a name='6'></a>__::namespacex info allchildren__ *namespace*

    Returns a list containing the names of all child namespaces in the specified
    *namespace* and its children\. The names are all fully qualified\.

  - <a name='7'></a>__::namespacex info allvars__ *namespace*

    Returns a list containing the names of all variables in the specified
    *namespace* and its children\. The names are all given relative to
    *namespace*, and *not* fully qualified\.

  - <a name='8'></a>__::namespacex normalize__ *namespace*

    Returns the absolute name of *namespace*, which is resolved relative to
    the namespace of the caller, with all unneeded colon characters removed\.

  - <a name='9'></a>__::namespacex info vars__ *namespace* ?*pattern*?

    Returns a list containing the names of all variables in the specified
    *namespace*\. If the *pattern* argument is specified, then only variables
    matching *pattern* are returned\. Matching is determined using the same
    rules as for __string match__\.

  - <a name='10'></a>__::namespacex state get__ *namespace*

    Returns a dictionary holding the names and values of all variables in the
    specified *namespace* and its child namespaces\.

    Note that the names are all relative to *namespace*, and *not* fully
    qualified\.

  - <a name='11'></a>__::namespacex state set__ *namespace* *dict*

    Takes a dictionary holding the names and values for a set of variables and
    replaces the current state of the specified *namespace* and its child
    namespaces with this state\. The result of the command is the empty string\.

  - <a name='12'></a>__::namespacex state drop__ *namespace*

    Unsets all variables in the specified *namespace* and its child
    namespaces\. The result of the command is the empty string\.

  - <a name='13'></a>__::namespacex strip__ *prefix* *namespaces*

    Each item in *namespaces* must be the absolute normalized name of a child
    namespace of namespace *prefix*\. Returns the corresponding list of
    relative names of child namespaces\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *namespacex* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[extended namespace](\.\./\.\./\.\./\.\./index\.md\#extended\_namespace),
[info](\.\./\.\./\.\./\.\./index\.md\#info), [namespace
unknown](\.\./\.\./\.\./\.\./index\.md\#namespace\_unknown), [namespace
utilities](\.\./\.\./\.\./\.\./index\.md\#namespace\_utilities), [state
\(de\)serialization](\.\./\.\./\.\./\.\./index\.md\#state\_de\_serialization), [unknown
hooking](\.\./\.\./\.\./\.\./index\.md\#unknown\_hooking),
[utilities](\.\./\.\./\.\./\.\./index\.md\#utilities)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 200? Neil Madden \(http://wiki\.tcl\.tk/12790\)  
Copyright &copy; 200? Various \(http://wiki\.tcl\.tk/1489\)  
Copyright &copy; 2010 Documentation, Andreas Kupries
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/ncgi/ncgi.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353

[//000000001]: # (ncgi \- CGI Support)
[//000000002]: # (Generated from file 'ncgi\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (ncgi\(n\) 1\.4\.4 tcllib "CGI Support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ncgi \- Procedures to manipulate CGI values\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require ncgi ?1\.4\.4?  

[__::ncgi::cookie__ *cookie*](#1)  
[__::ncgi::decode__ *str*](#2)  
[__::ncgi::empty__ *name*](#3)  
[__::ncgi::exists__ *name*](#4)  
[__::ncgi::encode__ *string*](#5)  
[__::ncgi::header__ ?*type*? *args*](#6)  
[__::ncgi::import__ *cginame* ?*tclname*?](#7)  
[__::ncgi::importAll__ *args*](#8)  
[__::ncgi::importFile__ *cmd* *cginame* ?*filename*?](#9)  
[__::ncgi::input__ ?*fakeinput*? ?*fakecookie*?](#10)  
[__::ncgi::multipart__ *type query*](#11)  
[__::ncgi::nvlist__](#12)  
[__::ncgi::names__](#13)  
[__::ncgi::parse__](#14)  
[__::ncgi::parseMimeValue__ *value*](#15)  
[__::ncgi::query__](#16)  
[__::ncgi::redirect__ *url*](#17)  
[__::ncgi::reset__ *query type*](#18)  
[__::ncgi::setCookie__ *args*](#19)  
[__::ncgi::setDefaultValue__ *key defvalue*](#20)  
[__::ncgi::setDefaultValueList__ *key defvaluelist*](#21)  
[__::ncgi::setValue__ *key value*](#22)  
[__::ncgi::setValueList__ *key valuelist*](#23)  
[__::ncgi::type__](#24)  
[__::ncgi::urlStub__ ?*url*?](#25)  
[__::ncgi::value__ *key* ?*default*?](#26)  
[__::ncgi::valueList__ *key* ?*default*?](#27)  

# <a name='description'></a>DESCRIPTION

The __ncgi__ package provides commands that manipulate CGI values\. These are
values that come from Web forms and are processed either by CGI scripts or web
pages with embedded Tcl code\. Use the __ncgi__ package to query these
values, set and get cookies, and encode and decode www\-url\-encoded values\.

In the simplest case, a CGI script first calls __::ncgi::parse__ and then
calls __::ncgi::value__ to get different form values\. If a CGI value is
repeated, you should use __::ncgi::valueList__ to get back the complete list
of values\.

An alternative to __::ncgi::parse__ is __::ncgi::input__, which has
semantics similar to Don Libes' __cgi\_input__ procedure\.
__::ncgi::input__ restricts repeated CGI values to have names that end with
"List"\. In this case, __::ncgi::value__ will return the complete list of
values, and __::ncgi::input__ will raise errors if it find repeated form
elements without the right name\.

The __::ncgi::reset__ procedure can be used in test suites and Web servers
to initialize the source of the CGI values\. Otherwise the values are read in
from the CGI environment\.

The complete set of procedures is described below\.

  - <a name='1'></a>__::ncgi::cookie__ *cookie*

    Return a list of values for *cookie*, if any\. It is possible that more
    than one cookie with the same name can be present, so this procedure returns
    a list\.

  - <a name='2'></a>__::ncgi::decode__ *str*

    Decode strings in www\-url\-encoding, which represents special characters with
    a %xx sequence, where xx is the character code in hex\.

  - <a name='3'></a>__::ncgi::empty__ *name*

    Returns 1 if the CGI variable *name* is not present or has the empty
    string as its value\.

  - <a name='4'></a>__::ncgi::exists__ *name*

    The return value is a boolean\. It returns __0__ if the CGI variable
    *name* is not present, and __1__ otherwise\.

  - <a name='5'></a>__::ncgi::encode__ *string*

    Encode *string* into www\-url\-encoded format\.

  - <a name='6'></a>__::ncgi::header__ ?*type*? *args*

    Output the CGI header to standard output\. This emits a Content\-Type: header
    and additional headers based on *args*, which is a list of header names
    and header values\. The *type* defaults to "text/html"\.

  - <a name='7'></a>__::ncgi::import__ *cginame* ?*tclname*?

    This creates a variable in the current scope with the value of the CGI
    variable *cginame*\. The name of the variable is *tclname*, or
    *cginame* if *tclname* is empty \(default\)\.

  - <a name='8'></a>__::ncgi::importAll__ *args*

    This imports several CGI variables as Tcl variables\. If *args* is empty,
    then every CGI value is imported\. Otherwise each CGI variable listed in
    *args* is imported\.

  - <a name='9'></a>__::ncgi::importFile__ *cmd* *cginame* ?*filename*?

    This provides information about an uploaded file from a form input field of
    type __file__ with name *cginame*\. *cmd* can be one of
    __\-server__ __\-client__, __\-type__ or __\-data__\.

      * __\-client__ *cginame*

        returns the filename as sent by the client\.

      * __\-type__ *cginame*

        returns the mime type of the uploaded file\.

      * __\-data__ *cginame*

        returns the contents of the file\.

      * __\-server__ *cginame* *filename*

        writes the file contents to a local temporary file \(or *filename* if
        supplied\) and returns the name of the file\. The caller is responsible
        for deleting this file after use\.

  - <a name='10'></a>__::ncgi::input__ ?*fakeinput*? ?*fakecookie*?

    This reads and decodes the CGI values from the environment\. It restricts
    repeated form values to have a trailing "List" in their name\. The CGI values
    are obtained later with the __::ncgi::value__ procedure\.

  - <a name='11'></a>__::ncgi::multipart__ *type query*

    This procedure parses a multipart/form\-data *query*\. This is used by
    __::ncgi::nvlist__ and not normally called directly\. It returns an
    alternating list of names and structured values\. Each structure value is in
    turn a list of two elements\. The first element is meta\-data from the
    multipart/form\-data structure\. The second element is the form value\. If you
    use __::ncgi::value__ you just get the form value\. If you use
    __::ncgi::valueList__ you get the structured value with meta data and
    the value\.

    The *type* is the whole Content\-Type, including the parameters like
    *boundary*\. This returns a list of names and values that describe the
    multipart data\. The values are a nested list structure that has some
    descriptive information first, and the actual form value second\. The
    descriptive information is list of header names and values that describe the
    content\.

  - <a name='12'></a>__::ncgi::nvlist__

    This returns all the query data as a name, value list\. In the case of
    multipart/form\-data, the values are structured as described in
    __::ncgi::multipart__\.

  - <a name='13'></a>__::ncgi::names__

    This returns all names found in the query data, as a list\.
    __::ncgi::multipart__\.

  - <a name='14'></a>__::ncgi::parse__

    This reads and decodes the CGI values from the environment\. The CGI values
    are obtained later with the __::ncgi::value__ procedure\. IF a CGI value
    is repeated, then you should use __::ncgi::valueList__ to get the
    complete list of values\.

  - <a name='15'></a>__::ncgi::parseMimeValue__ *value*

    This decodes the Content\-Type and other MIME headers that have the form of
    "primary value; param=val; p2=v2" It returns a list, where the first element
    is the primary value, and the second element is a list of parameter names
    and values\.

  - <a name='16'></a>__::ncgi::query__

    This returns the raw query data\.

  - <a name='17'></a>__::ncgi::redirect__ *url*

    Generate a response that causes a 302 redirect by the Web server\. The
    *url* is the new URL that is the target of the redirect\. The URL will be
    qualified with the current server and current directory, if necessary, to
    convert it into a full URL\.

  - <a name='18'></a>__::ncgi::reset__ *query type*

    Set the query data and Content\-Type for the current CGI session\. This is
    used by the test suite and by Web servers to initialize the ncgi module so
    it does not try to read standard input or use environment variables to get
    its data\. If neither *query* or *type* are specified, then the
    __ncgi__ module will look in the standard CGI environment for its data\.

  - <a name='19'></a>__::ncgi::setCookie__ *args*

    Set a cookie value that will be returned as part of the reply\. This must be
    done before __::ncgi::header__ or __::ncgi::redirect__ is called in
    order for the cookie to be returned properly\. The *args* are a set of
    flags and values:

      * __\-name__ *name*

      * __\-value__ *value*

      * __\-expires__ *date*

      * __\-path__ *path restriction*

      * __\-domain__ *domain restriction*

  - <a name='20'></a>__::ncgi::setDefaultValue__ *key defvalue*

    Set a CGI value if it does not already exists\. This affects future calls to
    __::ncgi::value__ \(but not future calls to __::ncgi::nvlist__\)\. If
    the CGI value already is present, then this procedure has no side effects\.

  - <a name='21'></a>__::ncgi::setDefaultValueList__ *key defvaluelist*

    Like __::ncgi::setDefaultValue__ except that the value already has list
    structure to represent multiple checkboxes or a multi\-selection\.

  - <a name='22'></a>__::ncgi::setValue__ *key value*

    Set a CGI value, overriding whatever was present in the CGI environment
    already\. This affects future calls to __::ncgi::value__ \(but not future
    calls to __::ncgi::nvlist__\)\.

  - <a name='23'></a>__::ncgi::setValueList__ *key valuelist*

    Like __::ncgi::setValue__ except that the value already has list
    structure to represent multiple checkboxes or a multi\-selection\.

  - <a name='24'></a>__::ncgi::type__

    Returns the Content\-Type of the current CGI values\.

  - <a name='25'></a>__::ncgi::urlStub__ ?*url*?

    Returns the current URL, but without the protocol, server, and port\. If
    *url* is specified, then it defines the URL for the current session\. That
    value will be returned by future calls to __::ncgi::urlStub__

  - <a name='26'></a>__::ncgi::value__ *key* ?*default*?

    Return the CGI value identified by *key*\. If the CGI value is not present,
    then the *default* value is returned instead\. This value defaults to the
    empty string\.

    If the form value *key* is repeated, then there are two cases: if
    __::ncgi::parse__ was called, then __::ncgi::value__ only returns
    the first value associated with *key*\. If __::ncgi::input__ was
    called, then __::ncgi::value__ returns a Tcl list value and *key* must
    end in "List" \(e\.g\., "skuList"\)\. In the case of multipart/form\-data, this
    procedure just returns the value of the form element\. If you want the
    meta\-data associated with each form value, then use
    __::ncgi::valueList__\.

  - <a name='27'></a>__::ncgi::valueList__ *key* ?*default*?

    Like __::ncgi::value__, but this always returns a list of values \(even
    if there is only one value\)\. In the case of multipart/form\-data, this
    procedure returns a list of two elements\. The first element is meta\-data in
    the form of a parameter, value list\. The second element is the form value\.

# <a name='section2'></a>EXAMPLES

Uploading a file

    HTML:
    <html>
    <form action="/cgi-bin/upload.cgi" method="POST" enctype="multipart/form-data">
    Path: <input type="file" name="filedata"><br>
    Name: <input type="text" name="filedesc"><br>
    <input type="submit">
    </form>
    </html>

    TCL: upload.cgi
    #!/usr/local/bin/tclsh

    ::ncgi::parse
    set filedata [::ncgi::value filedata]
    set filedesc [::ncgi::value filedesc]

    puts "<html> File uploaded at <a href=\"/images/$filedesc\">$filedesc</a> </html>"

    set filename /www/images/$filedesc

    set fh [open $filename w]
    puts -nonewline $fh $filedata
    close $fh

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *ncgi* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[html](\.\./html/html\.md)

# <a name='keywords'></a>KEYWORDS

[CGI](\.\./\.\./\.\./\.\./index\.md\#cgi), [cookie](\.\./\.\./\.\./\.\./index\.md\#cookie),
[form](\.\./\.\./\.\./\.\./index\.md\#form), [html](\.\./\.\./\.\./\.\./index\.md\#html)

# <a name='category'></a>CATEGORY

CGI programming
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/nettool/nettool.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

[//000000001]: # (nettool \- nettool)
[//000000002]: # (Generated from file 'nettool\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2015\-2018 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (nettool\(n\) 0\.5\.2 tcllib "nettool")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

nettool \- Tools for networked applications

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require nettool ?0\.5\.2?  
package require twapi 3\.1  
package require ip 0\.1  
package require platform 0\.1  

[__::cat__ *filename*](#1)  
[__::nettool::allocate\_port__ *startingport*](#2)  
[__::nettool::arp\_table__](#3)  
[__::nettool::broadcast\_list__](#4)  
[__::nettool::claim\_port__ *port* ?*protocol*?](#5)  
[__::nettool::cpuinfo__ *args*](#6)  
[__::nettool::find\_port__ *startingport*](#7)  
[__::nettool::hwid\_list__](#8)  
[__::nettool::ip\_list__](#9)  
[__::nettool::mac\_list__](#10)  
[__::nettool::network\_list__](#11)  
[__::nettool::port\_busy__ *port*](#12)  
[__::nettool::release\_port__ *port* ?*protocol*?](#13)  
[__::nettool::status__](#14)  
[__::nettool::user\_data\_root__ *appname*](#15)  

# <a name='description'></a>DESCRIPTION

The __nettool__ package consists of a Pure\-tcl set of tools to perform
common network functions that would normally require different packages or calls
to exec, in a standard Tcl interface\. At present nettool has reference
implementations for the following operating systems: Windows, MacOSX, and Linux
\(debian\)\.

# <a name='section2'></a>Commands

  - <a name='1'></a>__::cat__ *filename*

    Dump the contents of a file as a result\.

  - <a name='2'></a>__::nettool::allocate\_port__ *startingport*

    Attempt to allocate *startingport*, or, if busy, advance the port number
    sequentially until a free port is found, and claim that port\. This command
    uses a built\-in database of known ports to avoid returning a port which is
    in common use\. \(For example: http \(80\)\)

  - <a name='3'></a>__::nettool::arp\_table__

    Dump the contents of this computer's Address Resolution Protocol \(ARP\)
    table\. The result will be a Tcl formatted list: *macid* *ipaddrlist* \.\.\.

  - <a name='4'></a>__::nettool::broadcast\_list__

    Returns a list of broadcast addresses \(suitable for UDP multicast\) that this
    computer is associated with\.

  - <a name='5'></a>__::nettool::claim\_port__ *port* ?*protocol*?

    Mark *port* as busy, optionally as either __tcp__ \(default\) or
    __udp__\.

  - <a name='6'></a>__::nettool::cpuinfo__ *args*

    If no arguments are given, return a key/value list describing the CPU of the
    present machine\. Included in the matrix is info on the number of
    cores/processors that are available for parallel tasking, installed physical
    RAM, and processor family\.

    The exact contents are platform specific\.

    For Linux, information is drawn from /proc/cpuinfo and /proc/meminfo\.

    For MacOSX, information is drawn from sysctl

    For Windows, information is draw from TWAPI\.

    If arguments are given, the result with be a key/value list limited to the
    fields requested\.

    Canonical fields for all platforms:

      * cpus

        Count of CPUs/cores/execution units

      * speed

        Clock speed of processor\(s\) in Mhz

      * memory

        Installed RAM \(in MB\)

      * vendor

        Manufacturer

  - <a name='7'></a>__::nettool::find\_port__ *startingport*

    Return *startingport* if it is available, or the next free port after
    *startingport*\. Note: Unlike __::nettool::allocate\_port__, this
    command does not claim the port\.

    This command uses a built\-in database of known ports to avoid returning a
    port which is in common use\. \(For example: http \(80\)\)

  - <a name='8'></a>__::nettool::hwid\_list__

    Return a list of hardware specific identifiers from this computer\. The
    source and content will vary by platform\.

    For MacOSX, the motherboard serial number and macids for all network devices
    is returned\.

    For Windows, the volume serial number of C and macids for all network
    devices is returned\.

    For Linux, macids for all network devices is returned\.

  - <a name='9'></a>__::nettool::ip\_list__

    Return a list of IP addresses associated with this computer\.

  - <a name='10'></a>__::nettool::mac\_list__

    Return a list of MACIDs for the network cards attached to this machine\. The
    MACID of the primary network card is returned first\.

  - <a name='11'></a>__::nettool::network\_list__

    Return a list of networks associated with this computer\. Networks are
    formated with __ip::nativeToPrefix__\.

  - <a name='12'></a>__::nettool::port\_busy__ *port*

    Return true if *port* is claimed, false otherwise\.

  - <a name='13'></a>__::nettool::release\_port__ *port* ?*protocol*?

    Mark *port* as not busy, optionally as either __tcp__ \(default\) or
    __udp__\.

  - <a name='14'></a>__::nettool::status__

    Return a key/value list describing the status of the computer\. The output is
    designed to be comparable to the output of __top__ for all platforms\.

    Common fields include:

      * load

        Processes per processing unit

      * memory\_total

        Total physical RAM \(MB\)

      * memory\_free

        Total physical RAM unused \(MB\)

  - <a name='15'></a>__::nettool::user\_data\_root__ *appname*

    Return a fully qualified path to a folder where *appname* should store
    it's data\. The path is not created, only computed, by this command\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *odie* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[nettool](\.\./\.\./\.\./\.\./index\.md\#nettool),
[odie](\.\./\.\./\.\./\.\./index\.md\#odie)

# <a name='category'></a>CATEGORY

System

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2015\-2018 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/nmea/nmea.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182

[//000000001]: # (nmea \- NMEA protocol implementation)
[//000000002]: # (Generated from file 'nmea\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006\-2009, Aaron Faupell <afaupell@users\.sourceforge\.net>)
[//000000004]: # (nmea\(n\) 1\.0\.0 tcllib "NMEA protocol implementation")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

nmea \- Process NMEA data

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require nmea ?1\.0\.0?  

[__::nmea::input__ *sentence*](#1)  
[__::nmea::open\_port__ *port* ?speed?](#2)  
[__::nmea::close\_port__](#3)  
[__::nmea::configure\_port__ *settings*](#4)  
[__::nmea::open\_file__ *file* ?rate?](#5)  
[__::nmea::close\_file__](#6)  
[__::nmea::do\_line__](#7)  
[__::nmea::rate__](#8)  
[__::nmea::log__ ?file?](#9)  
[__::nmea::checksum__ *data*](#10)  
[__::nmea::write__ *sentence* *data*](#11)  
[__::nmea::event__ *setence* ?command?](#12)  

# <a name='description'></a>DESCRIPTION

This package provides a standard interface for writing software which recieves
NMEA standard input data\. It allows for reading data from COM ports, files, or
programmatic input\. It also supports the checksumming and logging of incoming
data\. After parsing, input is dispatched to user defined handler commands for
processing\. To define a handler, see the
__[event](\.\./\.\./\.\./\.\./index\.md\#event)__ command\. There are no GPS
specific functions in this package\. NMEA data consists of a sentence type,
followed by a list of data\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::nmea::input__ *sentence*

    Processes and dispatches the supplied sentence\. If *sentence* contains no
    commas it is treated as a Tcl list, otherwise it must be standard comma
    delimited NMEA data, with an optional checksum and leading __$__\.

        nmea::input {$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39}
        nmea::input [list GPGSA A 3 04 05  09 12 "" "" 24 "" "" ""  2.5 1.3 2.1]

  - <a name='2'></a>__::nmea::open\_port__ *port* ?speed?

    Open the specified COM port and read NMEA sentences when available\. Port
    speed is set to 4800bps by default or to *speed*\.

  - <a name='3'></a>__::nmea::close\_port__

    Close the com port connection if one is open\.

  - <a name='4'></a>__::nmea::configure\_port__ *settings*

    Changes the current port settings\. *settings* has the same format as
    fconfigure \-mode\.

  - <a name='5'></a>__::nmea::open\_file__ *file* ?rate?

    Open file *file* and read NMEA sentences, one per line, at the rate
    specified by ?rate? in milliseconds\. The file format may omit the leading
    __$__ and/or the checksum\. If rate is <= 0 \(the default\) then lines will
    only be processed when a call to __do\_line__ is made\.

  - <a name='6'></a>__::nmea::close\_file__

    Close the open file if one exists\.

  - <a name='7'></a>__::nmea::do\_line__

    If there is a currently open file, this command will read and process a
    single line from it\. Returns the number of lines read\.

  - <a name='8'></a>__::nmea::rate__

    Sets the rate at which lines are processed from the open file, in
    milliseconds\. The rate remains consistant across files, there does not need
    to be a file currently open to use this command\. Set to 0 to disable
    automatic line processing\.

  - <a name='9'></a>__::nmea::log__ ?file?

    Starts or stops input logging\. If a file name is specified then all NMEA
    data recieved on the open port will be logged to the ?file? in append mode\.
    If file is an empty string then any logging will be stopped\. If no file is
    specified then returns a boolean value indicating if logging is currently
    enabled\. Data written to the port by __write__, data read from files, or
    input made using __input__, is not logged\.

  - <a name='10'></a>__::nmea::checksum__ *data*

    Returns the checksum of the supplied data\.

  - <a name='11'></a>__::nmea::write__ *sentence* *data*

    If there is a currently open port, this command will write the specified
    sentence and data to the port in proper NMEA checksummed format\.

  - <a name='12'></a>__::nmea::event__ *setence* ?command?

    Registers a handler proc for a given NMEA *sentence*\. There may be at most
    one handler per sentence, any existing handler is replaced\. If no command is
    specified, returns the name of the current handler for the given *setence*
    or an empty string if none exists\. In addition to the incoming sentences
    there are 2 builtin types, EOF and DEFAULT\. The handler for the DEFAULT
    setence is invoked if there is not a specific handler for that sentence\. The
    EOF handler is invoked when End Of File is reached on the open file or port\.

    The handler procedures, with the exception of the builtin types,must take
    exactly one argument, which is a list of the data values\. The DEFAULT
    handler should have two arguments, the sentence type and the data values\.
    The EOF handler has no arguments\.

        nmea::event gpgsa parse_sat_detail
        nmea::event default handle_unknown

        proc parse_sat_detail {data} {
            puts [lindex $data 1]
        }

        proc handle_unknown {name data} {
            puts "unknown data type $name"
        }

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nmea* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[gps](\.\./\.\./\.\./\.\./index\.md\#gps), [nmea](\.\./\.\./\.\./\.\./index\.md\#nmea)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006\-2009, Aaron Faupell <afaupell@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/nns/nns_auto.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

[//000000001]: # (nameserv::auto \- Name service facility)
[//000000002]: # (Generated from file 'nns\_auto\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (nameserv::auto\(n\) 0\.3 tcllib "Name service facility")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

nameserv::auto \- Name service facility, Client Extension

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [OPTIONS](#section3)

  - [EVENTS](#section4)

  - [DESIGN](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require nameserv::auto ?0\.3?  
package require nameserv  

# <a name='description'></a>DESCRIPTION

Please read the document *[Name service facility,
introduction](nns\_intro\.md)* first\.

This package provides the *exact* same API as is provided by package
__[nameserv](nns\_client\.md)__, i\.e\. the regular name service client\. It
differs from the former by taking measures to ensure that longer\-lived data,
i\.e\. bound names, continuous and unfullfilled async searches, survive the loss
of the connection to the name server as much as is possible\.

This means that the bound names and continuous and unfullfilled async searches
are remembered client\-side and automatically re\-entered into the server when the
connection comes back after its loss\. For bound names there is one important
limitation to such restoration: It is possible that a name of this client was
bound by a different client while the connection was gone\. Such names are fully
lost, and the best the package can and will do is to inform the user of this\.

# <a name='section2'></a>API

The user\-visible API is mainly identical to the API of
__[nameserv](nns\_client\.md)__ and is therefore not described here\.
Please read the documentation of __[nameserv](nns\_client\.md)__\.

The differences are explained below, in the sections [OPTIONS](#section3)
and [EVENTS](#section4)\.

# <a name='section3'></a>OPTIONS

This package supports all the options of package
__[nameserv](nns\_client\.md)__, plus one more\. The additional option
allows the user to specify the time interval between attempts to restore a lost
connection\.

  - __\-delay__ *milliseconds*

    The value of this option is an integer value > 0 which specifies the
    interval to wait between attempts to restore a lost connection, in
    milliseconds\. The default value is __1000__, i\.e\. one second\.

# <a name='section4'></a>EVENTS

This package generates all of the events of package
__[nameserv](nns\_client\.md)__, plus two more\. Both events are generated
for the tag *[nameserv](nns\_client\.md)*\.

  - *lost\-name*

    This event is generated when a bound name is truly lost, i\.e\. could not be
    restored after the temporary loss of the connection to the name server\. It
    indicates that a different client took ownership of the name while this
    client was out of contact\.

    The detail information of the event will be a Tcl dictionary containing two
    keys, __name__, and __data__\. Their values hold all the information
    about the lost name\.

  - *re\-connection*

    This event is generated when the connection to the server is restored\. The
    remembered data has been restored when the event is posted\.

    The event has no detail information\.

# <a name='section5'></a>DESIGN

The package is implemented on top of the regular nameservice client, i\.e\.
package __[nameserv](nns\_client\.md)__\. It detects the loss of the
connection by listening for *lost\-connection* events, on the tag
*[nameserv](nns\_client\.md)*\.

It reacts to such events by starting a periodic timer and trying to reconnect to
the server whenver this timer triggers\. On success the timer is canceled, a
*re\-connection* event generated, and the package proceeds to re\-enter the
remembered bound names and continuous searches\.

Another loss of the connection, be it during or after re\-entering the remembered
information simply restarts the timer and subsequent reconnection attempts\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nameserv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[nameserv\(n\)](nns\_client\.md)

# <a name='keywords'></a>KEYWORDS

[automatic](\.\./\.\./\.\./\.\./index\.md\#automatic),
[client](\.\./\.\./\.\./\.\./index\.md\#client), [name
service](\.\./\.\./\.\./\.\./index\.md\#name\_service),
[reconnect](\.\./\.\./\.\./\.\./index\.md\#reconnect),
[restore](\.\./\.\./\.\./\.\./index\.md\#restore)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/nns/nns_client.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373

[//000000001]: # (nameserv \- Name service facility)
[//000000002]: # (Generated from file 'nns\_client\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (nameserv\(n\) 0\.4\.2 tcllib "Name service facility")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

nameserv \- Name service facility, Client

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [CONNECTION HANDLING](#section3)

  - [EVENTS](#section4)

  - [OPTIONS](#section5)

  - [ASYNCHRONOUS AND CONTINUOUS SEARCHES](#section6)

  - [HISTORY](#section7)

  - [Bugs, Ideas, Feedback](#section8)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require nameserv ?0\.4\.2?  
package require comm  
package require logger  

[__::nameserv::bind__ *name* *data*](#1)  
[__::nameserv::release__](#2)  
[__::nameserv::search__ ?__\-async__&#124;__\-continuous__? ?*pattern*?](#3)  
[__::nameserv::protocol__](#4)  
[__::nameserv::server\_protocol__](#5)  
[__::nameserv::server\_features__](#6)  
[__::nameserv::cget__ __\-option__](#7)  
[__::nameserv::configure__](#8)  
[__::nameserv::configure__ __\-option__](#9)  
[__::nameserv::configure__ __\-option__ *value*\.\.\.](#10)  
[__$result__ __destroy__](#11)  
[__$result__ __filled__](#12)  
[__$result__ __get__ *name*](#13)  
[__$result__ __names__](#14)  
[__$result__ __size__](#15)  
[__$result__ __getall__ ?*pattern*?](#16)  

# <a name='description'></a>DESCRIPTION

Please read *[Name service facility, introduction](nns\_intro\.md)* first\.

This package provides a client for the name service facility implemented by the
package __[nameserv::server](nns\_server\.md)__\.

This service is built in top of and for the package
__[comm](\.\./comm/comm\.md)__\. It has nothing to do with the Internet's
Domain Name System\. If the reader is looking for a package dealing with that
please see Tcllib's packages __[dns](\.\./dns/tcllib\_dns\.md)__ and
__resolv__\.

# <a name='section2'></a>API

The package exports eight commands, as specified below:

  - <a name='1'></a>__::nameserv::bind__ *name* *data*

    The caller of this command registers the given *name* as its name in the
    configured name service, and additionally associates a piece of *data*
    with it\. The service does nothing with this information beyond storing it
    and delivering it as part of search results\. The meaning is entirely up to
    the applications using the name service\.

    A generally useful choice would for example be an identifier for a
    communication endpoint managed by the package
    __[comm](\.\./comm/comm\.md)__\. Anybody retrieving the name becomes
    immediately able to talk to this endpoint, i\.e\. the registering application\.

    Of further importance is that a caller can register itself under more than
    one name, and each name can have its own piece of *data*\.

    Note that the name service, and thwerefore this command, will throw an error
    if the chosen name is already registered\.

  - <a name='2'></a>__::nameserv::release__

    Invoking this command releases all names \(and their data\) registered by all
    previous calls to __::nameserv::bind__ of this client\. Note that the
    name service will run this command implicitly when it loses the connection
    to this client\.

  - <a name='3'></a>__::nameserv::search__ ?__\-async__&#124;__\-continuous__? ?*pattern*?

    This command searches the name service for all registered names matching the
    specified glob\-*pattern*\. If not specified the pattern defaults to
    __\*__, matching everything\. The result of the command is a dictionary
    mapping the matching names to the data associated with them at
    *[bind](\.\./\.\./\.\./\.\./index\.md\#bind)*\-time\.

    If either option __\-async__ or __\-continuous__ were specified the
    result of this command changes and becomes the Tcl command of an object
    holding the actual result\. These two options are supported if and only if
    the service the client is connected to supports the protocol feature
    *Search/Continuous*\.

    For __\-async__ the result object is asynchronously filled with the
    entries matching the pattern at the time of the search and then not modified
    any more\. The option __\-continuous__ extends this behaviour by
    additionally continuously monitoring the service for the addition and
    removal of entries which match the pattern, and updating the object's
    contents appropriately\.

    *Note* that the caller is responsible for configuring the object with a
    callback for proper notification when the current result \(or further
    changes\) arrive\.

    For more information about this object see section [ASYNCHRONOUS AND
    CONTINUOUS SEARCHES](#section6)\.

  - <a name='4'></a>__::nameserv::protocol__

    This command returns the highest version of the name service protocol
    supported by the package\.

  - <a name='5'></a>__::nameserv::server\_protocol__

    This command returns the highest version of the name service protocol
    supported by the name service the client is currently connected to\.

  - <a name='6'></a>__::nameserv::server\_features__

    This command returns a list containing the names of the features of the name
    service protocol which are supported by the name service the client is
    currently connected to\.

  - <a name='7'></a>__::nameserv::cget__ __\-option__

    This command returns the currently configured value for the specified
    __\-option__\. The list of supported options and their meaning can be
    found in section [OPTIONS](#section5)\.

  - <a name='8'></a>__::nameserv::configure__

    In this form the command returns a dictionary of all supported options, and
    their current values\. The list of supported options and their meaning can be
    found in section [OPTIONS](#section5)\.

  - <a name='9'></a>__::nameserv::configure__ __\-option__

    In this form the command is an alias for "__::nameserv::cget__
    __\-option__"\. The list of supported options and their meaning can be
    found in section [OPTIONS](#section5)\.

  - <a name='10'></a>__::nameserv::configure__ __\-option__ *value*\.\.\.

    In this form the command is used to configure one or more of the supported
    options\. At least one option has to be specified, and each option is
    followed by its new value\. The list of supported options and their meaning
    can be found in section [OPTIONS](#section5)\.

    This form can be used only as long as the client has not contacted the name
    service yet\. After contact has been made reconfiguration is not possible
    anymore\. This means that this form of the command is for the initalization
    of the client before it use\. The command forcing a contact with the name
    service are

      * __[bind](\.\./\.\./\.\./\.\./index\.md\#bind)__

      * __release__

      * __search__

      * __server\_protocol__

      * __server\_features__

# <a name='section3'></a>CONNECTION HANDLING

The client automatically connects to the service when one of the commands below
is run for the first time, or whenever one of the commands is run after the
connection was lost, when it was lost\.

  - __[bind](\.\./\.\./\.\./\.\./index\.md\#bind)__

  - __release__

  - __search__

  - __server\_protocol__

  - __server\_features__

Since version 0\.2 of the client it will generate an event when the connection is
lost, allowing higher layers to perform additional actions\. This is done via the
support package __[uevent](\.\./uev/uevent\.md)__\. This and all other name
service related packages hereby reserve the uevent\-tag *nameserv*\. All their
events will be posted to that tag\.

# <a name='section4'></a>EVENTS

This package generates only one event, *lost\-connection*\. The detail
information provided to that event is a Tcl dictionary\. The only key contained
in the dictionnary is __reason__, and its value will be a string describing
why the connection was lost\. This string is supplied by the underlying
communication package, i\.e\. __[comm](\.\./comm/comm\.md)__\.

# <a name='section5'></a>OPTIONS

The options supported by the client are for the specification of which name
service to contact, i\.e\. of the location of the name service\. They are:

  - __\-host__ *name*&#124;*ipaddress*

    This option specifies the host name service to contact is running on, either
    by *name*, or by *ipaddress*\. The initial default is __localhost__,
    i\.e\. it is expected to contact a name service running on the same host as
    the application using this package\.

  - __\-port__ *number*

    This option specifies the port the name service to contact is listening on\.
    It has to be a positive integer number \(> 0\) not greater than 65536
    \(unsigned short\)\. The initial default is the number returned by the command
    __::nameserv::common::port__, as provided by the package
    __::nameserv::common__\.

# <a name='section6'></a>ASYNCHRONOUS AND CONTINUOUS SEARCHES

Asynchronous and continuous searches are invoked by using either option
__\-async__ or __\-continuous__ as argument to the command
__::nameserv::search__\.

*Note* that these two options are supported if and only if the service the
client is connected to supports the protocol feature *Search/Continuous*\. The
service provided by the package __::nameserv::server__ does this since
version 0\.3\.

For such searches the result of the search command is the Tcl command of an
object holding the actual result\. The API provided by these objects is:

  - Options:

      * __\-command__ *command\_prefix*

        This option has to be set if a user of the result object wishes to get
        asynchronous notifications when the search result or changes to it
        arrive\.

        *Note* that while it is possible to poll for the arrival of the
        initial search result via the method __filled__, and for subsequent
        changes by comparing the output of method __getall__ against a saved
        copy, this is not the recommended behaviour\. Setting the
        __\-command__ callback and processing the notifications as they
        arrive is much more efficient\.

        The *command\_prefix* is called with two arguments, the type of change,
        and the data of the change\. The type is either __add__ or
        __remove__, indicating new data, or deleted data, respectively\. The
        data of the change is always a dictionary listing the added/removed
        names and their associated data\.

        The first change reported for a search is always the set of matching
        entries at the time of the search\.

  - Methods:

      * <a name='11'></a>__$result__ __destroy__

        Destroys the object and cancels any continuous monitoring of the service
        the object may have had active\.

      * <a name='12'></a>__$result__ __filled__

        The result is a boolean value indicating whether the search result has
        already arrived \(__True__\), or not \(__False__\)\.

      * <a name='13'></a>__$result__ __get__ *name*

        Returns the data associated with the given *name* at
        *[bind](\.\./\.\./\.\./\.\./index\.md\#bind)*\-time\.

      * <a name='14'></a>__$result__ __names__

        Returns a list containing all names known to the object at the time of
        the invokation\.

      * <a name='15'></a>__$result__ __size__

        Returns an integer value specifying the size of the result at the time
        of the invokation\.

      * <a name='16'></a>__$result__ __getall__ ?*pattern*?

        Returns a dictionary containing the search result at the time of the
        invokation, mapping the matching names to the data associated with them
        at *[bind](\.\./\.\./\.\./\.\./index\.md\#bind)*\-time\.

# <a name='section7'></a>HISTORY

  - 0\.3\.1

    Fixed SF Bug 1954771\.

  - 0\.3

    Extended the client with the ability to perform asynchronous and continuous
    searches\.

  - 0\.2

    Extended the client with the ability to generate events when it loses its
    connection to the name service\. Based on package
    __[uevent](\.\./uev/uevent\.md)__\.

  - 0\.1

    Initial implementation of the client\.

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nameserv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[nameserv::common\(n\)](nns\_common\.md),
[nameserv::server\(n\)](nns\_server\.md)

# <a name='keywords'></a>KEYWORDS

[client](\.\./\.\./\.\./\.\./index\.md\#client), [name
service](\.\./\.\./\.\./\.\./index\.md\#name\_service)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/nns/nns_common.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101

[//000000001]: # (nameserv::common \- Name service facility)
[//000000002]: # (Generated from file 'nns\_common\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (nameserv::common\(n\) 0\.1 tcllib "Name service facility")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

nameserv::common \- Name service facility, shared definitions

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8  
package require nameserv::common ?0\.1?  

[__::nameserv::common::port__](#1)  

# <a name='description'></a>DESCRIPTION

Please read *[Name service facility, introduction](nns\_intro\.md)* first\.

This package is internal and of no interest to users\. It provides the commands
of the name service facility which are shared by the client and server
implemented by the packages __[nameserv::server](nns\_server\.md)__ and
__[nameserv](nns\_client\.md)__ \(the client\)\.

This service is built in top of and for the package
__[comm](\.\./comm/comm\.md)__\. It has nothing to do with the Internet's
Domain Name System\. If the reader is looking for a package dealing with that
please see Tcllib's packages __[dns](\.\./dns/tcllib\_dns\.md)__ and
__resolv__\.

# <a name='section2'></a>API

The package exports a single command, as specified below:

  - <a name='1'></a>__::nameserv::common::port__

    The result returned by the command is the id of the default TCP/IP port a
    nameservice server will listen on, and a name service client will try to
    connect to\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nameserv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

nameserv::client\(n\), [nameserv::server\(n\)](nns\_server\.md)

# <a name='keywords'></a>KEYWORDS

[client](\.\./\.\./\.\./\.\./index\.md\#client), [name
service](\.\./\.\./\.\./\.\./index\.md\#name\_service),
[server](\.\./\.\./\.\./\.\./index\.md\#server)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































Deleted embedded/md/tcllib/files/modules/nns/nns_intro.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158

[//000000001]: # (nns\_intro \- Name service facility)
[//000000002]: # (Generated from file 'nns\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (nns\_intro\(n\) 1\.0 tcllib "Name service facility")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

nns\_intro \- Name service facility, introduction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Applications](#section2)

  - [Packages](#section3)

  - [Internals](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

*[nns](\.\./\.\./apps/nns\.md)* \(short for *nano nameservice*\) is a facility
built for the package __[comm](\.\./comm/comm\.md)__, adding a simple name
service to it\. It is also built on top of __[comm](\.\./comm/comm\.md)__,
using it for the exchange of messages between the client and server parts\.

This name service facility has nothing to do with the Internet's *Domain Name
System*, otherwise known as *[DNS](\.\./\.\./\.\./\.\./index\.md\#dns)*\. If the
reader is looking for a package dealing with that please see either of the
packages __[dns](\.\./dns/tcllib\_dns\.md)__ and __resolv__, both found
in Tcllib too\.

Tcllib provides 2 applications and 4 packages which are working together and
provide access to the facility at different levels\.

# <a name='section2'></a>Applications

The application __[nnsd](\.\./\.\./apps/nnsd\.md)__ provides a simple name
server which can be run by anybody anywhere on their system, as they see fit\. It
is also an example on the use of the server\-side package
__[nameserv::server](nns\_server\.md)__\.

Complementing this server is the __[nns](\.\./\.\./apps/nns\.md)__ client
application\. A possible, but no very sensible use would be to enter name/port
bindings into a server from a shell script\. Not sensible, as shell scripts
normally do not provide a __[comm](\.\./comm/comm\.md)__\-based service\.

The only case for this to make some sense would be in a shell script wrapped
around a Tcl script FOO which is using comm, to register the listening port used
by FOO\. However even there it would much more sensible to extend FOO to use the
nameservice directly\. And in regard on how to that
__[nns](\.\./\.\./apps/nns\.md)__ can be used as both example and template\.
Beyond that it may also be useful to perform nameservice queries from shell
scripts\.

The third application, __[nnslog](\.\./\.\./apps/nnslog\.md)__ is a stripped
down form of the __[nns](\.\./\.\./apps/nns\.md)__ client application\. It is
reduced to perform a continuous search for all changes and logs all received
events to stdout\.

Both clients use the __[nameserv::auto](nns\_auto\.md)__ package to
automatically hande the loss and restoration of the connection to the server\.

# <a name='section3'></a>Packages

The two main packages implementing the service are
__[nameserv](nns\_client\.md)__ and
__[nameserv::server](nns\_server\.md)__, i\.e\. client and server\. The
latter has not much of an API, just enough to start, stop, and configure it\. See
the application __[nnsd](\.\./\.\./apps/nnsd\.md)__ on how to use it\.

The basic client, in package __[nameserv](nns\_client\.md)__, provides the
main API to manipulate and query the service\. An example of its use is the
application __[nns](\.\./\.\./apps/nns\.md)__\.

The second client package, __[nameserv::auto](nns\_auto\.md)__ is API
compatible to the basic client, but provides the additional functionality that
it will automatically restore data like bound names when the connection to the
name service was lost and then reestablished\. I\.e\. it automatically detects the
loss of the server and re\-enters the data when the server comes back\.

The package __[nameserv::common](nns\_common\.md)__ is of no interest to
users\. It is an internal package containing code and definitions common to the
packages __[nameserv](nns\_client\.md)__ and
__[nameserv::server](nns\_server\.md)__\.

All packages use the __[uevent](\.\./uev/uevent\.md)__ package for the
reporting of special circumstances via events, and reserve the uevent\-tag
*[nameserv](nns\_client\.md)* for their exclusive use\. All their events will
be posted to that tag\.

# <a name='section4'></a>Internals

The document *[Name service facility, client/server
protocol](nns\_protocol\.md)* specifies the protocol used by the packages
__[nameserv](nns\_client\.md)__ and
__[nameserv::server](nns\_server\.md)__ to talk to each other\. It is of no
interest to users of either the packages or applications\.

Developers wishing to modify and/or extend or to just understand the internals
of the nameservice facility however are strongly advised to read it\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nameserv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[nameserv\(n\)](nns\_client\.md), [nameserv::auto\(n\)](nns\_auto\.md),
[nameserv::common\(n\)](nns\_common\.md),
[nameserv::protocol\(n\)](nns\_protocol\.md),
[nameserv::server\(n\)](nns\_server\.md), [nnsd\(n\)](\.\./\.\./apps/nnsd\.md),
nss\(n\)

# <a name='keywords'></a>KEYWORDS

[client](\.\./\.\./\.\./\.\./index\.md\#client), [name
service](\.\./\.\./\.\./\.\./index\.md\#name\_service),
[server](\.\./\.\./\.\./\.\./index\.md\#server)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































Deleted embedded/md/tcllib/files/modules/nns/nns_protocol.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216

[//000000001]: # (nameserv::protocol \- Name service facility)
[//000000002]: # (Generated from file 'nns\_protocol\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (nameserv::protocol\(n\) 0\.1 tcllib "Name service facility")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

nameserv::protocol \- Name service facility, client/server protocol

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Nano Name Service Protocol Version 1](#section2)

      - [Basic Layer](#subsection1)

      - [Message Layer](#subsection2)

  - [Nano Name Service Protocol Extension: Continuous Search](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__Bind__ *name* *data*](#1)  
[__Release__](#2)  
[__Search__ *pattern*](#3)  
[__ProtocolVersion__](#4)  
[__ProtocolFeatures__](#5)  
[__Search/Continuous/Start__ *tag* *pattern*](#6)  
[__Search/Continuous/Stop__ *tag*](#7)  
[__Search/Continuous/Change__ *tag* __add__&#124;__remove__ *response*](#8)  

# <a name='description'></a>DESCRIPTION

The packages __[nameserv::server](nns\_server\.md)__,
__[nameserv](nns\_client\.md)__, and
__[nameserv::common](nns\_common\.md)__ provide a simple unprotected name
service facility for use in small trusted environments\.

Please read *[Name service facility, introduction](nns\_intro\.md)* first\.

This document contains the specification of the network protocol which is used
by client and server to talk to each other, enabling implementations of the same
protocol in other languages\.

# <a name='section2'></a>Nano Name Service Protocol Version 1

This protocol defines the basic set of messages to be supported by a name
service, also called the *Core* feature\.

## <a name='subsection1'></a>Basic Layer

The basic communication between client and server is done using the
remote\-execution protocol specified by the Tcl package
__[comm](\.\./comm/comm\.md)__\. The relevant document specifying its
on\-the\-wire protocol can be found in *[comm\_wire](\.\./comm/comm\_wire\.md)*\.

All the scripts exchanged via this protocol are single commands in list form and
thus can be interpreted as plain messages instead of as Tcl commands\. The
commands/messages specified in the next section are the only commands understood
by the server\-side\. Command and variable substitutions are not allowed within
the messages, i\.e\. arguments have to be literal values\.

The protocol is synchronous\. I\.e\. for each message sent a response is expected,
and has to be generated\. All messages are sent by the client\. The server does
not sent messages, only responses to messages\.

## <a name='subsection2'></a>Message Layer

  - <a name='1'></a>__Bind__ *name* *data*

    The client sends this message when it registers itself at the service with a
    *name* and some associated *data*\. The server has to send an error
    response if the *name* is already in use\. Otherwise the response has to be
    an empty string\.

    The server has to accept multiple names for the same client\.

  - <a name='2'></a>__Release__

    The client sends this message to unregister all names it is known under at
    the service\. The response has to be an empty string, always\.

  - <a name='3'></a>__Search__ *pattern*

    The client sends this message to search the service for names matching the
    glob\-*pattern*\. The response has to be a dictionary containing the
    matching names as keys, and mapping them to the data associated with it at
    __Bind__\-time\.

  - <a name='4'></a>__ProtocolVersion__

    The client sends this message to query the service for the highest version
    of the name service protocol it supports\. The response has to be a positive
    integer number\.

    Servers supporting only *Nano Name Service Protocol Version 1* have to
    return __1__\.

  - <a name='5'></a>__ProtocolFeatures__

    The client sends this message to query the service for the features of the
    name service protocol it supports\. The response has to be a list containing
    feature names\.

    Servers supporting only *Nano Name Service Protocol Version 1* have to
    return __\{Core\}__\.

# <a name='section3'></a>Nano Name Service Protocol Extension: Continuous Search

This protocol defines an extended set of messages to be supported by a name
service, also called the *Search/Continuous* feature\. This feature defines
additional messages between client and server, and is otherwise identical to
version 1 of the protocol\. See the last section for the details of our
foundation\.

A service supporting this feature has to put the feature name
__Search/Continuous__ into the list of features returned by the message
*ProtocolFeatures*\.

For this extension the protocol is asynchronous\. No direct response is expected
for any of the messages in the extension\. Furthermore the server will start
sending messages on its own, instead of only responses to messages, and the
client has to be able to handle these notifications\.

  - <a name='6'></a>__Search/Continuous/Start__ *tag* *pattern*

    The client sends this message to start searching the service for names
    matching the glob\-*pattern*\. In contrast to the regular *Search* request
    this one asks the server to continuously monitor the database for the
    addition and removal of matching entries and to notify the client of all
    such changes\. The particular search is identified by the *tag*\.

    No direct response is expected, rather the clients expect to be notified of
    changes via explicit *Search/Continuous/Result* messages generated by the
    service\.

    It is further expected that the *tag* information is passed unchanged to
    the *Search/Continuous/Result* messages\. This tagging of the results
    enables clients to start multiple searches and distinguish between the
    different results\.

  - <a name='7'></a>__Search/Continuous/Stop__ *tag*

    The client sends this message to stop the continuous search identified by
    the *tag*\.

  - <a name='8'></a>__Search/Continuous/Change__ *tag* __add__&#124;__remove__ *response*

    This message is sent by the service to clients with active continuous
    searches to transfer found changes\. The first such message for a new
    continuous search has to contains the current set of matching entries\.

    To ensure this a service has to generate an __add__\-message with an
    empty *response* if there were no matching entries at the time\.

    The *response* has to be a dictionary containing the matching names as
    keys, and mapping them to the data associated with it at __Bind__\-time\.
    The argument coming before the response tells the client whether the names
    in the response were added or removed from the service\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nameserv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[comm\_wire\(n\)](\.\./comm/comm\_wire\.md), [nameserv\(n\)](nns\_client\.md),
[nameserv::server\(n\)](nns\_server\.md)

# <a name='keywords'></a>KEYWORDS

[comm](\.\./\.\./\.\./\.\./index\.md\#comm), [name
service](\.\./\.\./\.\./\.\./index\.md\#name\_service),
[protocol](\.\./\.\./\.\./\.\./index\.md\#protocol)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/nns/nns_server.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

[//000000001]: # (nameserv::server \- Name service facility)
[//000000002]: # (Generated from file 'nns\_server\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (nameserv::server\(n\) 0\.3\.2 tcllib "Name service facility")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

nameserv::server \- Name service facility, Server

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [OPTIONS](#section3)

  - [HISTORY](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require nameserv::server ?0\.3\.2?  
package require comm  
package require interp  
package require logger  

[__::nameserv::server::start__](#1)  
[__::nameserv::server::stop__](#2)  
[__::nameserv::server::active?__](#3)  
[__::nameserv::server::cget__ __\-option__](#4)  
[__::nameserv::server::configure__](#5)  
[__::nameserv::server::configure__ __\-option__](#6)  
[__::nameserv::server::configure__ __\-option__ *value*\.\.\.](#7)  

# <a name='description'></a>DESCRIPTION

Please read *[Name service facility, introduction](nns\_intro\.md)* first\.

This package provides an implementation of the serviver side of the name service
facility queried by the client provided by the package
__[nameserv](nns\_client\.md)__\. All information required by the server
will be held in memory\. There is no persistent state\.

This service is built in top of and for the package
__[comm](\.\./comm/comm\.md)__\. It has nothing to do with the Internet's
Domain Name System\. If the reader is looking for a package dealing with that
please see Tcllib's packages __[dns](\.\./dns/tcllib\_dns\.md)__ and
__resolv__\.

This server supports the *Core* protocol feature, and since version 0\.3 the
*Search/Continuous* feature as well\.

# <a name='section2'></a>API

The package exports five commands, as specified below:

  - <a name='1'></a>__::nameserv::server::start__

    This command starts the server and causes it to listen on the configured
    port\. From now on clients are able to connect and make requests\. The result
    of the command is the empty string\.

    Note that any incoming requests will only be handled if the application the
    server is part of does enter an event loop after this command has been run\.

  - <a name='2'></a>__::nameserv::server::stop__

    Invoking this command stops the server and releases all information it had\.
    Existing connections are shut down, and no new connections will be accepted
    any longer\. The result of the command is the empty string\.

  - <a name='3'></a>__::nameserv::server::active?__

    This command returns a boolean value indicating the state of the server\. The
    result will be __true__ if the server is active, i\.e\. has been started,
    and __false__ otherwise\.

  - <a name='4'></a>__::nameserv::server::cget__ __\-option__

    This command returns the currently configured value for the specified
    __\-option__\. The list of supported options and their meaning can be
    found in section [OPTIONS](#section3)\.

  - <a name='5'></a>__::nameserv::server::configure__

    In this form the command returns a dictionary of all supported options, and
    their current values\. The list of supported options and their meaning can be
    found in section [OPTIONS](#section3)\.

  - <a name='6'></a>__::nameserv::server::configure__ __\-option__

    In this form the command is an alias for "__::nameserv::server::cget__
    __\-option__"\. The list of supported options and their meaning can be
    found in section [OPTIONS](#section3)\.

  - <a name='7'></a>__::nameserv::server::configure__ __\-option__ *value*\.\.\.

    In this form the command is used to configure one or more of the supported
    options\. At least one option has to be specified, and each option is
    followed by its new value\. The list of supported options and their meaning
    can be found in section [OPTIONS](#section3)\.

    This form can be used only if the server is not active, i\.e\. has not been
    started yet, or has been stopped\. While the server is active it cannot be
    reconfigured\.

# <a name='section3'></a>OPTIONS

The options supported by the server are for the specification of the TCP port to
listen on, and whether to accept non\-local connections or not\. They are:

  - __\-localonly__ *bool*

    This option specifies whether to accept only local connections \(\-localonly
    1\) or remote connections as well \(\-localonly 0\)\. The default is to accept
    only local connections\.

  - __\-port__ *number*

    This option specifies the port the name service will listen on after it has
    been started\. It has to be a positive integer number \(> 0\) not greater than
    65536 \(unsigned short\)\. The initial default is the number returned by the
    command __::nameserv::server::common::port__, as provided by the package
    __::nameserv::server::common__\.

# <a name='section4'></a>HISTORY

  - 0\.3

    Extended the server with the ability to perform asynchronous and continuous
    searches\.

  - 0\.2

    Changed name of \-local switch to \-localonly\.

  - 0\.1

    Initial implementation of the server\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nameserv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

nameserv::client\(n\), [nameserv::common\(n\)](nns\_common\.md)

# <a name='keywords'></a>KEYWORDS

[name service](\.\./\.\./\.\./\.\./index\.md\#name\_service),
[server](\.\./\.\./\.\./\.\./index\.md\#server)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/nntp/nntp.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391

[//000000001]: # (nntp \- Tcl NNTP Client Library)
[//000000002]: # (Generated from file 'nntp\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (nntp\(n\) 1\.5\.1 tcllib "Tcl NNTP Client Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

nntp \- Tcl client for the NNTP protocol

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLE](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require nntp ?0\.2\.1?  

[__::nntp::nntp__ ?*host*? ?*port*? ?*nntpName*?](#1)  
[*nntpName* __method__ ?*arg arg \.\.\.*?](#2)  
[*nntpName* __article__ ?*msgid*?](#3)  
[*nntpName* __authinfo__ ?*user*? ?*pass*?](#4)  
[*nntpName* __body__ ?*msgid*?](#5)  
[*nntpName* __configure__](#6)  
[*nntpName* __configure__ *option*](#7)  
[*nntpName* __configure__ *option* *value* \.\.\.](#8)  
[*nntpName* __cget__ *option*](#9)  
[*nntpName* __date__](#10)  
[*nntpName* __group__ ?*group*?](#11)  
[*nntpName* __head__ ?*msgid*?](#12)  
[*nntpName* __help__](#13)  
[*nntpName* __last__](#14)  
[*nntpName* __list__](#15)  
[*nntpName* __listgroup__ ?*group*?](#16)  
[*nntpName* __mode\_reader__](#17)  
[*nntpName* __newgroups__ *since*](#18)  
[*nntpName* __newnews__](#19)  
[*nntpName* __newnews__ *since*](#20)  
[*nntpName* __newnews__ *group* ?*since*?](#21)  
[*nntpName* __next__](#22)  
[*nntpName* __post__ *article*](#23)  
[*nntpName* __slave__](#24)  
[*nntpName* __stat__ ?*msgid*?](#25)  
[*nntpName* __quit__](#26)  
[*nntpName* __xgtitle__ ?*group\_pattern*?](#27)  
[*nntpName* __xhdr__ *field* ?*range*?](#28)  
[*nntpName* __xover__ ?*range*?](#29)  
[*nntpName* __xpat__ *field* *range* ?*pattern\_list*?](#30)  

# <a name='description'></a>DESCRIPTION

The package __nntp__ provides a simple Tcl\-only client library for the NNTP
protocol\. It works by opening the standard NNTP socket on the server, and then
providing a Tcl API to access the NNTP protocol commands\. All server errors are
returned as Tcl errors \(thrown\) which must be caught with the Tcl __catch__
command\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::nntp::nntp__ ?*host*? ?*port*? ?*nntpName*?

    The command opens a socket connection to the specified NNTP server and
    creates a new nntp object with an associated global Tcl command whose name
    is *nntpName*\. This command may be used to access the various NNTP
    protocol commands for the new connection\. The default *port* number is
    "119" and the default *host* is "news"\. These defaults can be overridden
    with the environment variables __NNTPPORT__ and __NNTPHOST__
    respectively\.

    Some of the commands supported by this package are not part of the nntp rfc
    977
    \([http://www\.rfc\-editor\.org/rfc/rfc977\.txt](http://www\.rfc\-editor\.org/rfc/rfc977\.txt)\)
    and will not be available \(or implemented\) on all nntp servers\.

    The access command *nntpName* has the following general form:

      * <a name='2'></a>*nntpName* __method__ ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.

  - <a name='3'></a>*nntpName* __article__ ?*msgid*?

    Query the server for article *msgid* from the current group\. The article
    is returned as a valid tcl list which contains the headers, followed by a
    blank line, and then followed by the body of the article\. Each element in
    the list is one line of the article\.

  - <a name='4'></a>*nntpName* __authinfo__ ?*user*? ?*pass*?

    Send authentication information \(username and password\) to the server\.

  - <a name='5'></a>*nntpName* __body__ ?*msgid*?

    Query the server for the body of the article *msgid* from the current
    group\. The body of the article is returned as a valid tcl list\. Each element
    in the list is one line of the body of the article\.

  - <a name='6'></a>*nntpName* __configure__

  - <a name='7'></a>*nntpName* __configure__ *option*

  - <a name='8'></a>*nntpName* __configure__ *option* *value* \.\.\.

  - <a name='9'></a>*nntpName* __cget__ *option*

    Query and configure options of the nntp connection object\. Currently only
    one option is supported, __\-binary__\. When set articles are retrieved as
    binary data instead of text\. The only methods affected by this are
    __article__ and __body__\.

    One application of this option would be the download of articles containing
    yEnc encoded images\. Although encoded the data is still mostly binary and
    retrieving it as text will corrupt the information\.

    See package __[yencode](\.\./base64/yencode\.md)__ for both encoder and
    decoder of such data\.

  - <a name='10'></a>*nntpName* __date__

    Query the server for the servers current date\. The date is returned in the
    format *YYYYMMDDHHMMSS*\.

  - <a name='11'></a>*nntpName* __group__ ?*group*?

    Optionally set the current group, and retrieve information about the
    currently selected group\. Returns the estimated number of articles in the
    group followed by the number of the first article in the group, followed by
    the last article in the group, followed by the name of the group\.

  - <a name='12'></a>*nntpName* __head__ ?*msgid*?

    Query the server for the headers of the article *msgid* from the current
    group\. The headers of the article are returned as a valid tcl list\. Each
    element in the list is one line of the headers of the article\.

  - <a name='13'></a>*nntpName* __help__

    Retrieves a list of the commands that are supported by the news server that
    is currently attached to\.

  - <a name='14'></a>*nntpName* __last__

    Sets the current article pointer to point to the previous message \(if there
    is one\) and returns the msgid of that message\.

  - <a name='15'></a>*nntpName* __list__

    Returns a tcl list of valid newsgroups and associated information\. Each
    newsgroup is returned as an element in the tcl list with the following
    format:

        group last first p

    where <group> is the name of the newsgroup, <last> is the number of the last
    known article currently in that newsgroup, <first> is the number of the
    first article currently in the newsgroup, and <p> is either 'y' or 'n'
    indicating whether posting to this newsgroup is allowed \('y'\) or prohibited
    \('n'\)\.

    The <first> and <last> fields will always be numeric\. They may have leading
    zeros\. If the <last> field evaluates to less than the <first> field, there
    are no articles currently on file in the newsgroup\.

  - <a name='16'></a>*nntpName* __listgroup__ ?*group*?

    Query the server for a list of all the messages \(message numbers\) in the
    group specified by the argument *group* or by the current group if the
    *group* argument was not passed\.

  - <a name='17'></a>*nntpName* __mode\_reader__

    Query the server for its nntp 'MODE READER' response string\.

  - <a name='18'></a>*nntpName* __newgroups__ *since*

    Query the server for a list of all the new newsgroups created since the time
    specified by the argument *since*\. The argument *since* can be any time
    string that is understood by __clock scan__\. The tcl list of newsgroups
    is returned in a similar form to the list of groups returned by the
    __nntpName list__ command\. Each element of the list has the form:

        group last first p

    where <group> is the name of the newsgroup, <last> is the number of the last
    known article currently in that newsgroup, <first> is the number of the
    first article currently in the newsgroup, and <p> is either 'y' or 'n'
    indicating whether posting to this newsgroup is allowed \('y'\) or prohibited
    \('n'\)\.

  - <a name='19'></a>*nntpName* __newnews__

    Query the server for a list of new articles posted to the current group in
    the last day\.

  - <a name='20'></a>*nntpName* __newnews__ *since*

    Query the server for a list of new articles posted to the current group
    since the time specified by the argument *since*\. The argument *since*
    can be any time string that is understood by __clock scan__\.

  - <a name='21'></a>*nntpName* __newnews__ *group* ?*since*?

    Query the server for a list of new articles posted to the group specified by
    the argument *group* since the time specified by the argument *since*
    \(or in the past day if no *since* argument is passed\. The argument
    *since* can be any time string that is understood by __clock scan__\.

  - <a name='22'></a>*nntpName* __next__

    Sets the current article pointer to point to the next message \(if there is
    one\) and returns the msgid of that message\.

  - <a name='23'></a>*nntpName* __post__ *article*

    Posts an article of the form specified in RFC 1036
    \([http://www\.rfc\-editor\.org/rfc/rfc1036\.txt](http://www\.rfc\-editor\.org/rfc/rfc1036\.txt),
    successor to RFC 850\) to the current news group\.

  - <a name='24'></a>*nntpName* __slave__

    Identifies a connection as being made from a slave nntp server\. This might
    be used to indicate that the connection is serving multiple people and
    should be given priority\. Actual use is entirely implementation dependent
    and may vary from server to server\.

  - <a name='25'></a>*nntpName* __stat__ ?*msgid*?

    The stat command is similar to the article command except that no text is
    returned\. When selecting by message number within a group, the stat command
    serves to set the current article pointer without sending text\. The returned
    acknowledgment response will contain the message\-id, which may be of some
    value\. Using the stat command to select by message\-id is valid but of
    questionable value, since a selection by message\-id does NOT alter the
    "current article pointer"

  - <a name='26'></a>*nntpName* __quit__

    Gracefully close the connection after sending a NNTP QUIT command down the
    socket\.

  - <a name='27'></a>*nntpName* __xgtitle__ ?*group\_pattern*?

    Returns a tcl list where each element is of the form:

        newsgroup description

    If a *group\_pattern* is specified then only newsgroups that match the
    pattern will have their name and description returned\.

  - <a name='28'></a>*nntpName* __xhdr__ *field* ?*range*?

    Returns the specified header field value for the current message or for a
    list of messages from the current group\. *field* is the title of a field
    in the header such as from, subject, date, etc\. If *range* is not
    specified or is "" then the current message is queried\. The command returns
    a list of elements where each element has the form of:

        msgid value

    Where msgid is the number of the message and value is the value set for the
    queried field\. The *range* argument can be in any of the following forms:

      * __""__

        The current message is queried\.

      * *msgid1*\-*msgid2*

        All messages between *msgid1* and *msgid2* \(including *msgid1* and
        *msgid2*\) are queried\.

      * *msgid1* *msgid2*

        All messages between *msgid1* and *msgid2* \(including *msgid1* and
        *msgid2*\) are queried\.

  - <a name='29'></a>*nntpName* __xover__ ?*range*?

    Returns header information for the current message or for a range of
    messages from the current group\. The information is returned in a tcl list
    where each element is of the form:

        msgid subject from date idstring bodysize headersize xref

    If *range* is not specified or is "" then the current message is queried\.
    The *range* argument can be in any of the following forms:

      * __""__

        The current message is queried\.

      * *msgid1*\-*msgid2*

        All messages between *msgid1* and *msgid2* \(including *msgid1* and
        *msgid2*\) are queried\.

      * *msgid1* *msgid2*

        All messages between *msgid1* and *msgid2* \(including *msgid1* and
        *msgid2*\) are queried\.

  - <a name='30'></a>*nntpName* __xpat__ *field* *range* ?*pattern\_list*?

    Returns the specified header field value for a specified message or for a
    list of messages from the current group where the messages match the
    pattern\(s\) given in the pattern\_list\. *field* is the title of a field in
    the header such as from, subject, date, etc\. The information is returned in
    a tcl list where each element is of the form:

        msgid value

    Where msgid is the number of the message and value is the value set for the
    queried field\. The *range* argument can be in any of the following forms:

      * *msgid*

        The message specified by *msgid* is queried\.

      * *msgid1*\-*msgid2*

        All messages between *msgid1* and *msgid2* \(including *msgid1* and
        *msgid2*\) are queried\.

      * *msgid1* *msgid2*

        All messages between *msgid1* and *msgid2* \(including *msgid1* and
        *msgid2*\) are queried\.

# <a name='section3'></a>EXAMPLE

A bigger example for posting a single article\.

    package require nntp
    set n [nntp::nntp NNTP_SERVER]
    $n post "From: USER@DOMAIN.EXT (USER_FULL)
    Path: COMPUTERNAME!USERNAME
    Newsgroups: alt.test
    Subject: Tcl test post -ignore
    Message-ID: <[pid][clock seconds]
    @COMPUTERNAME>
    Date: [clock format [clock seconds] -format "%a, %d %
    b %y %H:%M:%S GMT" -gmt true]

    Test message body"

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nntp* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[news](\.\./\.\./\.\./\.\./index\.md\#news), [nntp](\.\./\.\./\.\./\.\./index\.md\#nntp),
[nntpclient](\.\./\.\./\.\./\.\./index\.md\#nntpclient), [rfc
1036](\.\./\.\./\.\./\.\./index\.md\#rfc\_1036), [rfc
977](\.\./\.\./\.\./\.\./index\.md\#rfc\_977)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/ntp/ntp_time.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

[//000000001]: # (ntp\_time \- Network Time Facilities)
[//000000002]: # (Generated from file 'ntp\_time\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (ntp\_time\(n\) 1\.2\.1 tcllib "Network Time Facilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ntp\_time \- Tcl Time Service Client

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [AUTHORS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.0  
package require time ?1\.2\.1?  

[__::time::gettime__ ?*options*? *timeserver* ?*port*?](#1)  
[__::time::getsntp__ ?*options*? *timeserver* ?*port*?](#2)  
[__::time::configure__ ?*options*?](#3)  
[__::time::cget__ *name*](#4)  
[__::time::unixtime__ *token*](#5)  
[__::time::status__ *token*](#6)  
[__::time::error__ *token*](#7)  
[__::time::reset__ *token* *?reason?*](#8)  
[__::time::wait__ *token*](#9)  
[__::time::cleanup__ *token*](#10)  

# <a name='description'></a>DESCRIPTION

This package implements a client for the RFC 868 TIME protocol
\([http://www\.rfc\-editor\.org/rfc/rfc868\.txt](http://www\.rfc\-editor\.org/rfc/rfc868\.txt)\)
and also a minimal client for the RFC 2030 Simple Network Time Protocol
\([http://www\.rfc\-editor\.org/rfc/rfc2030\.txt](http://www\.rfc\-editor\.org/rfc/rfc2030\.txt)\)\.
RFC 868 returns the time in seconds since 1 January 1900 to either tcp or udp
clients\. RFC 2030 also gives this time but also provides a fractional part which
is not used in this client\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::time::gettime__ ?*options*? *timeserver* ?*port*?

    Get the time from *timeserver*\. You may specify any of the options listed
    for the __configure__ command here\. This command returns a token which
    must then be used with the remaining commands in this package\. Once you have
    finished, you should use __[cleanup](\.\./\.\./\.\./\.\./index\.md\#cleanup)__
    to release all resources\. The default port is __37__\.

  - <a name='2'></a>__::time::getsntp__ ?*options*? *timeserver* ?*port*?

    Get the time from an SNTP server\. This accepts exactly the same arguments as
    __::time::gettime__ except that the default port is __123__\. The
    result is a token as per __::time::gettime__ and should be handled in
    the same way\.

    Note that it is unlikely that any SNTP server will reply using tcp so you
    will require the __tcludp__ or the __ceptcl__ package\. If a suitable
    package can be loaded then the udp protocol will be used by default\.

  - <a name='3'></a>__::time::configure__ ?*options*?

    Called with no arguments this command returns all the current configuration
    options and values\. Otherwise it should be called with pairs of option name
    and value\.

      * __\-protocol__ *number*

        Set the default network protocol\. This defaults to udp if the tcludp
        package is available\. Otherwise it will use tcp\.

      * __\-port__ *number*

        Set the default port to use\. RFC 868 uses port __37__, RFC 2030 uses
        port __123__\.

      * __\-timeout__ *number*

        Set the default timeout value in milliseconds\. The default is 10
        seconds\.

      * __\-command__ *number*

        Set a command procedure to be run when a reply is received\. The
        procedure is called with the time token appended to the argument list\.

      * __\-loglevel__ *number*

        Set the logging level\. The default is 'warning'\.

  - <a name='4'></a>__::time::cget__ *name*

    Get the current value for the named configuration option\.

  - <a name='5'></a>__::time::unixtime__ *token*

    Format the returned time for the unix epoch\. RFC 868 time defines time 0 as
    1 Jan 1900, while unix time defines time 0 as 1 Jan 1970\. This command
    converts the reply to unix time\.

  - <a name='6'></a>__::time::status__ *token*

    Returns the status flag\. For a successfully completed query this will be
    *ok*\. May be *error* or *timeout* or *eof*\. See also
    __::time::error__

  - <a name='7'></a>__::time::error__ *token*

    Returns the error message provided for requests whose status is *error*\.
    If there is no error message then an empty string is returned\.

  - <a name='8'></a>__::time::reset__ *token* *?reason?*

    Reset or cancel the query optionally specfying the reason to record for the
    __[error](\.\./\.\./\.\./\.\./index\.md\#error)__ command\.

  - <a name='9'></a>__::time::wait__ *token*

    Wait for a query to complete and return the status upon completion\.

  - <a name='10'></a>__::time::cleanup__ *token*

    Remove all state variables associated with the request\.

    % set tok [::time::gettime ntp2a.mcc.ac.uk]
    % set t [::time::unixtime $tok]
    % ::time::cleanup $tok

    % set tok [::time::getsntp pool.ntp.org]
    % set t [::time::unixtime $tok]
    % ::time::cleanup $tok

    proc on_time {token} {
       if {[time::status $token] eq "ok"} {
          puts [clock format [time::unixtime $token]]
       } else {
          puts [time::error $token]
       }
       time::cleanup $token
    }
    time::getsntp -command on_time pool.ntp.org

# <a name='section3'></a>AUTHORS

Pat Thoyts

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *ntp* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

ntp

# <a name='keywords'></a>KEYWORDS

[NTP](\.\./\.\./\.\./\.\./index\.md\#ntp), [SNTP](\.\./\.\./\.\./\.\./index\.md\#sntp),
[rfc 2030](\.\./\.\./\.\./\.\./index\.md\#rfc\_2030), [rfc
868](\.\./\.\./\.\./\.\./index\.md\#rfc\_868), [time](\.\./\.\./\.\./\.\./index\.md\#time)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/oauth/oauth.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265

[//000000001]: # (oauth \- oauth)
[//000000002]: # (Generated from file 'oauth\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2014 Javi P\. <hxm@eggdrop\.es>)
[//000000004]: # (oauth\(n\) 1\.0\.3 tcllib "oauth")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

oauth \- oauth API base signature

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [TLS Security Considerations](#section2)

  - [Commands](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require oauth ?1\.0\.3?  

[__::oauth::config__](#1)  
[__::oauth::config__ ?*options*\.\.\.?](#2)  
[__::oauth::header__ *baseURL* ?*postQuery*?](#3)  
[__::oauth::query__ *baseURL* ?*postQuery*?](#4)  

# <a name='description'></a>DESCRIPTION

The __oauth__ package provides a simple Tcl\-only library for communication
with [oauth](http://oauth\.net) APIs\. This current version of the package
supports the Oauth 1\.0 Protocol, as specified in [RFC
5849](http://tools\.ietf\.org/rfc/rfc5849\.txt)\.

# <a name='section2'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section3'></a>Commands

  - <a name='1'></a>__::oauth::config__

    When this command is invoked without arguments it returns a dictionary
    containing the current values of all options\.

  - <a name='2'></a>__::oauth::config__ ?*options*\.\.\.?

    When invoked with arguments, options followed by their values, it is used to
    set and query various parameters of application and client, like proxy host
    and user agent for the HTTP requests\. The detailed list of options is below:

      * __\-accesstoken__ *string*

        This is the user's token\.

      * __\-accesstokensecret__ *string*

        This is the user's secret token\.

      * __\-consumerkey__ *string*

        This is the public token of your app\.

      * __\-consumersecret__ *string*

        This is the private token of your app\.

      * __\-debug__ *bool*

        The default value is __off__\. If you change this option to
        __on__, the basic signature just created will be printed to stdout,
        among other debug output\.

      * __\-oauthversion__ *version*

        This is the version of the OAuth protocol to use\. At the moment only
        __1\.0__ is supported, the default\.

      * __\-proxyhost__ *hostname*

        You can set up a proxy host for send contact the oauth's api server\.

      * __\-proxyport__ *port\-number*

        Port number of your proxy\.

      * __\-signmethod__ *method*

        The signature method to use\. OAuth 1\.0 only supports __HMAC\-SHA1__,
        the default\.

      * __\-timeout__ *milliseconds*

        Timeout in milliseconds for your query\. The default value is
        __6000__, i\.e\. 6 seconds\.

      * __\-urlencoding__ *encoding*

        The encoding used for creating the x\-url\-encoded URLs with
        __::http::formatQuery__\. The default is __utf\-8__, as specified
        by [RFC 2718](http://tools\.ietf\.org/rfc/rfc2718\.txt)\.

  - <a name='3'></a>__::oauth::header__ *baseURL* ?*postQuery*?

    This command is the base signature creator\. With proper settings for various
    tokens and secrets \(See __::oauth::config__\) the result is the base
    authentication string to send to the server\.

    You do not need to call this procedure to create the query because
    __::oauth::query__ \(see below\) will do for it for you\. Doing so is
    useful for debugging purposes, though\.

      * url *baseURL*

        This argument is the URI path to the OAuth API server\. If you plan send
        a GET query, you should provide a full path\.

    HTTP GET
    ::oauth::header {https://api.twitter.com/1.1/users/lookup.json?screen_name=AbiertaMente}

      * url\-encoded\-string *postQuery*

        When you have to send a header in POST format, you have to put the query
        string into this argument\.

    ::oauth::header {https://api.twitter.com/1.1/friendships/create.json} {user_id=158812437&follow=true}

  - <a name='4'></a>__::oauth::query__ *baseURL* ?*postQuery*?

    This procedure will use the settings made with __::oauth::config__ to
    create the basic authentication and then send the command to the server API\.
    It takes the same arguments as __::oauth::header__\.

    The returned result will be a list containing 2 elements\. The first element
    will be a dictionary containing the HTTP header data response\. This allows
    you, for example, to check the X\-Rate\-Limit from OAuth\. The second element
    will be the raw data returned from API server\. This string is usually a json
    object which can be further decoded with the functions of package
    __[json](\.\./json/json\.md)__, or any other json\-parser for Tcl\.

    Here is an example of how it would work in Twitter\. Do not forget to replace
    the placeholder tokens and keys of the example with your own tokens and keys
    when trying it out\.

    % package require oauth
    % package require json
    % oauth::config -consumerkey {your_consumer_key} -consumersecret {your_consumer_key_secret} -accesstoken {your_access_token} -accesstokensecret {your_access_token_secret}

    % set response [oauth::query https://api.twitter.com/1.1/users/lookup.json?screen_name=AbiertaMente]
    % set jsondata [lindex $response 1]
    % set data [json::json2dict $jsondata]
    $ set data [lindex $data 0]
    % dict for {key val} $data {puts "$key => $val"}
    id => 158812437
    id_str => 158812437
    name => Un Librepensador
    screen_name => AbiertaMente
    location => Explico mis tuits ahí →
    description => 160Caracteres para un SMS y contaba mi vida entera sin recortar vocales. Ahora en Twitter, podemos usar hasta 140 y a mí me sobrarían 20 para contaros todo lo q
    url => http://t.co/SGs3k9odBn
    entities => url {urls {{url http://t.co/SGs3k9odBn expanded_url http://librepensamiento.es display_url librepensamiento.es indices {0 22}}}} description {urls {}}
    protected => false
    followers_count => 72705
    friends_count => 53099
    listed_count => 258
    created_at => Wed Jun 23 18:29:58 +0000 2010
    favourites_count => 297
    utc_offset => 7200
    time_zone => Madrid
    geo_enabled => false
    verified => false
    statuses_count => 8996
    lang => es
    status => created_at {Sun Oct 12 08:02:38 +0000 2014} id 521209314087018496 id_str 521209314087018496 text {@thesamethanhim http://t.co/WFoXOAofCt} source {<a href="http://twitter.com" rel="nofollow">Twitter Web Client</a>} truncated false in_reply_to_status_id 521076457490350081 in_reply_to_status_id_str 521076457490350081 in_reply_to_user_id 2282730867 in_reply_to_user_id_str 2282730867 in_reply_to_screen_name thesamethanhim geo null coordinates null place null contributors null retweet_count 0 favorite_count 0 entities {hashtags {} symbols {} urls {{url http://t.co/WFoXOAofCt expanded_url http://www.elmundo.es/internacional/2014/03/05/53173dc1268e3e3f238b458a.html display_url elmundo.es/internacional/… indices {16 38}}} user_mentions {{screen_name thesamethanhim name Ἑλένη id 2282730867 id_str 2282730867 indices {0 15}}}} favorited false retweeted false possibly_sensitive false lang und
    contributors_enabled => false
    is_translator => true
    is_translation_enabled => false
    profile_background_color => 709397
    profile_background_image_url => http://pbs.twimg.com/profile_background_images/704065051/9309c02aa2728bdf543505ddbd408e2e.jpeg
    profile_background_image_url_https => https://pbs.twimg.com/profile_background_images/704065051/9309c02aa2728bdf543505ddbd408e2e.jpeg
    profile_background_tile => true
    profile_image_url => http://pbs.twimg.com/profile_images/2629816665/8035fb81919b840c5cc149755d3d7b0b_normal.jpeg
    profile_image_url_https => https://pbs.twimg.com/profile_images/2629816665/8035fb81919b840c5cc149755d3d7b0b_normal.jpeg
    profile_banner_url => https://pbs.twimg.com/profile_banners/158812437/1400828874
    profile_link_color => FF3300
    profile_sidebar_border_color => FFFFFF
    profile_sidebar_fill_color => A0C5C7
    profile_text_color => 333333
    profile_use_background_image => true
    default_profile => false
    default_profile_image => false
    following => true
    follow_request_sent => false
    notifications => false

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *oauth* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[RFC 2718](\.\./\.\./\.\./\.\./index\.md\#rfc\_2718), [RFC
5849](\.\./\.\./\.\./\.\./index\.md\#rfc\_5849),
[oauth](\.\./\.\./\.\./\.\./index\.md\#oauth),
[twitter](\.\./\.\./\.\./\.\./index\.md\#twitter)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2014 Javi P\. <hxm@eggdrop\.es>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/oometa/oometa.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214

[//000000001]: # (oometa \- Data registry for TclOO frameworks)
[//000000002]: # (Generated from file 'oometa\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2015 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (oometa\(n\) 0\.7\.1 tcllib "Data registry for TclOO frameworks")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

oometa \- oo::meta A data registry for classess

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Usage](#section2)

  - [Concept](#section3)

  - [COMMANDS](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[__oo::meta::info__](#1)  
[__oo::meta::info branchget__ ?*key*? ?\.\.\.?](#2)  
[__oo::meta::info branchset__ ?*key\.\.\.*? *key* *value*](#3)  
[__oo::meta::info dump__ *class*](#4)  
[__oo::meta::info__ *class* __is__ *type* ?*args*?](#5)  
[__oo::meta::info__ *class* __[merge](\.\./\.\./\.\./\.\./index\.md\#merge)__ ?*dict*? ?*dict*? ?*\.\.\.*?](#6)  
[__oo::meta::info__ *class* __rebuild__](#7)  
[__oo::meta::metadata__ *class*](#8)  
[__oo::define meta__](#9)  
[__oo::class method meta__](#10)  
[__oo::object method meta__](#11)  
[__oo::object method meta cget__ ?*field*? ?*\.\.\.*? *field*](#12)  

# <a name='description'></a>DESCRIPTION

The __oo::meta__ package provides a data registry service for TclOO classes\.

# <a name='section2'></a>Usage

    oo::class create animal {
      meta set biodata animal: 1
    }
    oo::class create mammal {
      superclass animal
      meta set biodata mammal: 1
    }
    oo::class create cat {
      superclass mammal
      meta set biodata diet: carnivore
    }

    cat create felix
    puts [felix meta dump biodata]
    > animal: 1 mammal: 1 diet: carnivore

    felix meta set biodata likes: {birds mice}
    puts [felix meta get biodata]
    > animal: 1 mammal: 1 diet: carnivore likes: {bird mice}

    # Modify a class
    mammal meta set biodata metabolism: warm-blooded
    puts [felix meta get biodata]
    > animal: 1 mammal: 1 metabolism: warm-blooded diet: carnivore likes: {birds mice}

    # Overwrite class info
    felix meta set biodata mammal: yes
    puts [felix meta get biodata]
    > animal: 1 mammal: yes metabolism: warm-blooded diet: carnivore likes: {birds mice}

# <a name='section3'></a>Concept

The concept behind __oo::meta__ is that each class contributes a snippet of
*local* data\. When __oo::meta::metadata__ is called, the system walks
through the linear ancestry produced by __oo::meta::ancestors__, and
recursively combines all of that local data for all of a class' ancestors into a
single dict\. Instances of oo::object can also combine class data with a local
dict stored in the *meta* variable\.

# <a name='section4'></a>COMMANDS

  - <a name='1'></a>__oo::meta::info__

    __oo::meta::info__ is intended to work on the metadata of a class in a
    manner similar to if the aggregate pieces where assembled into a single
    dict\. The system mimics all of the standard dict commands, and addes the
    following:

  - <a name='2'></a>__oo::meta::info branchget__ ?*key*? ?\.\.\.?

    Returns a dict representation of the element at *args*, but with any
    trailing : removed from field names\.

    ::oo::meta::info $myclass set option color {default: green widget: colorselect}
    puts [::oo::meta::info $myclass get option color]
    > {default: green widget: color}
    puts [::oo::meta::info $myclass branchget option color]
    > {default green widget color}

  - <a name='3'></a>__oo::meta::info branchset__ ?*key\.\.\.*? *key* *value*

    Merges *dict* with any other information contaned at node ?*key\.\.\.*?,
    and adding a trailing : to all field names\.

    ::oo::meta::info $myclass branchset option color {default green widget colorselect}
    puts [::oo::meta::info $myclass get option color]
    > {default: green widget: color}

  - <a name='4'></a>__oo::meta::info dump__ *class*

    Returns the complete snapshot of a class metadata, as producted by
    __oo::meta::metadata__

  - <a name='5'></a>__oo::meta::info__ *class* __is__ *type* ?*args*?

    Returns a boolean true or false if the element ?*args*? would match
    __string is__ *type* *value*

    ::oo::meta::info $myclass set constant mammal 1
    puts [::oo::meta::info $myclass is true constant mammal]
    > 1

  - <a name='6'></a>__oo::meta::info__ *class* __[merge](\.\./\.\./\.\./\.\./index\.md\#merge)__ ?*dict*? ?*dict*? ?*\.\.\.*?

    Combines all of the arguments into a single dict, which is then stored as
    the new local representation for this class\.

  - <a name='7'></a>__oo::meta::info__ *class* __rebuild__

    Forces the meta system to destroy any cached representation of a class'
    metadata before the next access to __oo::meta::metadata__

  - <a name='8'></a>__oo::meta::metadata__ *class*

    Returns an aggregate picture of the metadata for *class*, combining its
    *local* data with the *local* data from its ancestors\.

  - <a name='9'></a>__oo::define meta__

    The package injects a command __oo::define::meta__ which works to
    provide a class in the process of definition access to
    __oo::meta::info__, but without having to look the name up\.

    oo::define myclass {
      meta set foo bar: baz
    }

  - <a name='10'></a>__oo::class method meta__

    The package injects a new method __meta__ into __oo::class__ which
    works to provide a class instance access to __oo::meta::info__\.

  - <a name='11'></a>__oo::object method meta__

    The package injects a new method __meta__ into __oo::object__\.
    __oo::object__ combines the data for its class \(as provided by
    __oo::meta::metadata__\), with a local variable *meta* to produce a
    local picture of metadata\. This method provides the following additional
    commands:

  - <a name='12'></a>__oo::object method meta cget__ ?*field*? ?*\.\.\.*? *field*

    Attempts to locate a singlar leaf, and return its value\. For single option
    lookups, this is faster than __my meta getnull__ ?*field*? ?*\.\.\.*?
    *field*\], because it performs a search instead directly instead of
    producing the recursive merge product between the class metadata, the local
    *meta* variable, and THEN performing the search\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *tcloo* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[TOOL](\.\./\.\./\.\./\.\./index\.md\#tool), [TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)

# <a name='category'></a>CATEGORY

TclOO

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2015 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/ooutil/ooutil.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219

[//000000001]: # (oo::util \- Utility commands for TclOO)
[//000000002]: # (Generated from file 'ooutil\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011\-2015 Andreas Kupries, BSD licensed)
[//000000004]: # (oo::util\(n\) 1\.2\.2 tcllib "Utility commands for TclOO")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

oo::util \- Utility commands for TclOO

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [AUTHORS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require oo::util ?1\.2\.2?  

[__mymethod__ *method* ?*arg*\.\.\.?](#1)  
[__classmethod__ *name* *arguments* *body*](#2)  
[__classvariable__ ?*arg*\.\.\.?](#3)  
[__link__ *method*\.\.\.](#4)  
[__link__ \{*alias* *method*\}\.\.\.](#5)  
[__ooutil::singleton__ ?*arg*\.\.\.?](#6)  

# <a name='description'></a>DESCRIPTION

This package provides a convenience command for the easy specification of
instance methods as callback commands, like timers, file events, Tk bindings,
etc\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__mymethod__ *method* ?*arg*\.\.\.?

    This command is available within instance methods\. It takes a method name
    and, possibly, arguments for the method and returns a command prefix which,
    when executed, will invoke the named method of the object we are in, with
    the provided arguments, and any others supplied at the time of actual
    invokation\.

    Note: The command is equivalent to and named after the command provided by
    the OO package __[snit](\.\./snit/snit\.md)__ for the same purpose\.

  - <a name='2'></a>__classmethod__ *name* *arguments* *body*

    This command is available within class definitions\. It takes a method name
    and, possibly, arguments for the method and creates a method on the class,
    available to a user of the class and of derived classes\.

    Note: The command is equivalent to the command __typemethod__ provided
    by the OO package __[snit](\.\./snit/snit\.md)__ for the same purpose\.

    Example

        oo::class create ActiveRecord {
            classmethod find args { puts "[self] called with arguments: $args" }
        }
        oo::class create Table {
            superclass ActiveRecord
        }
        puts [Table find foo bar]
        # ======
        # which will write
        # ======
        # ::Table called with arguments: foo bar

  - <a name='3'></a>__classvariable__ ?*arg*\.\.\.?

    This command is available within instance methods\. It takes a series of
    variable names and makes them available in the method's scope\. The
    originating scope for the variables is the class \(instance\) the object
    instance belongs to\. In other words, the referenced variables are shared
    between all instances of their class\.

    Note: The command is roughly equivalent to the command __typevariable__
    provided by the OO package __[snit](\.\./snit/snit\.md)__ for the same
    purpose\. The difference is that it cannot be used in the class definition
    itself\.

    Example:

        % oo::class create Foo {
            method bar {z} {
                classvariable x y
                return [incr x $z],[incr y]
            }
        }
        ::Foo
        % Foo create a
        ::a
        % Foo create b
        ::b
        % a bar 2
        2,1
        % a bar 3
        5,2
        % b bar 7
        12,3
        % b bar -1
        11,4
        % a bar 0
        11,5

  - <a name='4'></a>__link__ *method*\.\.\.

  - <a name='5'></a>__link__ \{*alias* *method*\}\.\.\.

    This command is available within instance methods\. It takes a list of method
    names and/or pairs of alias\- and method\-name and makes the named methods
    available to all instance methods without requiring the __my__ command\.

    The alias name under which the method becomes available defaults to the
    method name, except where explicitly specified through an alias/method pair\.

    Examples:

        link foo
        # The method foo is now directly accessible as foo instead of my foo.

        link {bar foo}
        # The method foo is now directly accessible as bar.

        link a b c
        # The methods a, b, and c all become directly acessible under their
        # own names.

    The main use of this command is expected to be in instance constructors, for
    convenience, or to set up some methods for use in a mini DSL\.

  - <a name='6'></a>__ooutil::singleton__ ?*arg*\.\.\.?

    This command is a meta\-class, i\.e\. a variant of the builtin
    __oo::class__ which ensures that it creates only a single instance of
    the classes defined with it\.

    Syntax and results are like for __oo::class__\.

    Example:

        % oo::class create example {
           self mixin singleton
           method foo {} {self}
        }
        ::example
        % [example new] foo
        ::oo::Obj22
        % [example new] foo
        ::oo::Obj22

# <a name='section3'></a>AUTHORS

Donal Fellows, Andreas Kupries

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *oo::util* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[snit\(n\)](\.\./snit/snit\.md)

# <a name='keywords'></a>KEYWORDS

[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo),
[callback](\.\./\.\./\.\./\.\./index\.md\#callback), [class
methods](\.\./\.\./\.\./\.\./index\.md\#class\_methods), [class
variables](\.\./\.\./\.\./\.\./index\.md\#class\_variables), [command
prefix](\.\./\.\./\.\./\.\./index\.md\#command\_prefix),
[currying](\.\./\.\./\.\./\.\./index\.md\#currying), [method
reference](\.\./\.\./\.\./\.\./index\.md\#method\_reference), [my
method](\.\./\.\./\.\./\.\./index\.md\#my\_method),
[singleton](\.\./\.\./\.\./\.\./index\.md\#singleton)

# <a name='category'></a>CATEGORY

Utility

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011\-2015 Andreas Kupries, BSD licensed
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/otp/otp.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

[//000000001]: # (otp \- RFC 2289 A One\-Time Password System)
[//000000002]: # (Generated from file 'otp\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (otp\(n\) 1\.0\.0 tcllib "RFC 2289 A One\-Time Password System")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

otp \- One\-Time Passwords

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [REFERENCES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require otp ?1\.0\.0?  

[__::otp::otp\-md4__ ?*\-hex*? ?*\-words*? *\-seed seed* *\-count count* *data*](#1)  
[__::otp::otp\-md5__ ?*\-hex*? ?*\-words*? *\-seed seed* *\-count count* *data*](#2)  
[__::otp::otp\-sha1__ ?*\-hex*? ?*\-words*? *\-seed seed* *\-count count* *data*](#3)  
[__::otp::otp\-rmd160__ ?*\-hex*? ?*\-words*? *\-seed seed* *\-count count* *data*](#4)  

# <a name='description'></a>DESCRIPTION

This package is an implementation in Tcl of the One\-Time Password system as
described in RFC 2289 \(1\)\. This system uses message\-digest algorithms to
sequentially hash a passphrase to create single\-use passwords\. The resulting
data is then provided to the user as either hexadecimal digits or encoded using
a dictionary of 2048 words\. This system is used by OpenBSD for secure login and
can be used as a SASL mechanism for authenticating users\.

In this implementation we provide support for four algorithms that are included
in the tcllib distribution: MD5 \(2\), MD4 \(3\), RIPE\-MD160 \(4\) and SHA\-1 \(5\)\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::otp::otp\-md4__ ?*\-hex*? ?*\-words*? *\-seed seed* *\-count count* *data*

  - <a name='2'></a>__::otp::otp\-md5__ ?*\-hex*? ?*\-words*? *\-seed seed* *\-count count* *data*

  - <a name='3'></a>__::otp::otp\-sha1__ ?*\-hex*? ?*\-words*? *\-seed seed* *\-count count* *data*

  - <a name='4'></a>__::otp::otp\-rmd160__ ?*\-hex*? ?*\-words*? *\-seed seed* *\-count count* *data*

# <a name='section3'></a>EXAMPLES

    % otp::otp-md5 -count 99 -seed host67821 "My Secret Pass Phrase"
    (binary gibberish)
    % otp::otp-md5 -words -count 99 -seed host67821 "My Secret Pass Phrase"
    SOON ARAB BURG LIMB FILE WAD
    % otp::otp-md5 -hex -count 99 -seed host67821 "My Secret Pass Phrase"
    e249b58257c80087

# <a name='section4'></a>REFERENCES

  1. Haller, N\. et al\., "A One\-Time Password System", RFC 2289, February 1998\.
     [http://www\.rfc\-editor\.org/rfc/rfc2289\.txt](http://www\.rfc\-editor\.org/rfc/rfc2289\.txt)

  1. Rivest, R\., "The MD5 Message\-Digest Algorithm", RFC 1321, MIT and RSA Data
     Security, Inc, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1321\.txt](http://www\.rfc\-editor\.org/rfc/rfc1321\.txt)\)

  1. Rivest, R\., "The MD4 Message Digest Algorithm", RFC 1320, MIT, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1320\.txt](http://www\.rfc\-editor\.org/rfc/rfc1320\.txt)\)

  1. H\. Dobbertin, A\. Bosselaers, B\. Preneel, "RIPEMD\-160, a strengthened
     version of RIPEMD"
     [http://www\.esat\.kuleuven\.ac\.be/~cosicart/pdf/AB\-9601/AB\-9601\.pdf](http://www\.esat\.kuleuven\.ac\.be/~cosicart/pdf/AB\-9601/AB\-9601\.pdf)

  1. "Secure Hash Standard", National Institute of Standards and Technology,
     U\.S\. Department Of Commerce, April 1995\.
     \([http://www\.itl\.nist\.gov/fipspubs/fip180\-1\.htm](http://www\.itl\.nist\.gov/fipspubs/fip180\-1\.htm)\)

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *otp* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[SASL](\.\./sasl/sasl\.md), [md4](\.\./md4/md4\.md), [md5](\.\./md5/md5\.md),
[ripemd160](\.\./ripemd/ripemd160\.md), [sha1](\.\./sha1/sha1\.md)

# <a name='keywords'></a>KEYWORDS

[hashing](\.\./\.\./\.\./\.\./index\.md\#hashing),
[message\-digest](\.\./\.\./\.\./\.\./index\.md\#message\_digest),
[password](\.\./\.\./\.\./\.\./index\.md\#password), [rfc
2289](\.\./\.\./\.\./\.\./index\.md\#rfc\_2289),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































Deleted embedded/md/tcllib/files/modules/page/page_intro.md.

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

[//000000001]: # (page\_intro \- Parser generator tools)
[//000000002]: # (Generated from file 'page\_intro\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (page\_intro\(n\) 1\.0 tcllib "Parser generator tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

page\_intro \- page introduction

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

*[page](\.\./\.\./\.\./\.\./index\.md\#page)* \(short for *parser generator*\)
stands for a set of related packages which help in the construction of parser
generators, and other utilities doing text processing\.

They are mainly geared towards supporting the Tcllib application
__[page](\.\./\.\./apps/page\.md)__, with the package __page::pluginmgr__
in a central role as the plugin management for the application\. The other
packages are performing low\-level text processing and utility tasks geared
towards parser generation and mainly accessed by
__[page](\.\./\.\./apps/page\.md)__ through plugins\.

The packages implementing the plugins are not documented as regular packages, as
they cannot be loaded into a general interpreter, like tclsh, without extensive
preparation of the interpreter\. Preparation which is done for them by the plugin
manager\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *page* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[page](\.\./\.\./\.\./\.\./index\.md\#page), [parser
generator](\.\./\.\./\.\./\.\./index\.md\#parser\_generator), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing)

# <a name='category'></a>CATEGORY

Page Parser Generator

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































Deleted embedded/md/tcllib/files/modules/page/page_pluginmgr.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814

[//000000001]: # (page\_pluginmgr \- Parser generator tools)
[//000000002]: # (Generated from file 'page\_pluginmgr\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (page\_pluginmgr\(n\) 1\.0 tcllib "Parser generator tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

page\_pluginmgr \- page plugin manager

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [CONFIG PLUGIN API](#section3)

  - [READER PLUGIN API](#section4)

  - [WRITER PLUGIN API](#section5)

  - [TRANSFORM PLUGIN API](#section6)

  - [PREDEFINED PLUGINS](#section7)

  - [FEATURES](#section8)

  - [Bugs, Ideas, Feedback](#section9)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require page::pluginmgr ?0\.2?  
package require fileutil  

[__::page::pluginmgr::reportvia__ *cmd*](#1)  
[__::page::pluginmgr::report__ *level* *text* ?*from* ?*to*??](#2)  
[__::page::pluginmgr::log__ *cmd*](#3)  
[__::page::pluginmgr::configuration__ *name*](#4)  
[__::page::pluginmgr::reader__ *name*](#5)  
[__::page::pluginmgr::rconfigure__ *dict*](#6)  
[__::page::pluginmgr::rtimeable__](#7)  
[__::page::pluginmgr::rtime__](#8)  
[__::page::pluginmgr::rgettime__](#9)  
[__::page::pluginmgr::rhelp__](#10)  
[__::page::pluginmgr::rlabel__](#11)  
[__::page::pluginmgr::read__ *read* *eof* ?*complete*?](#12)  
[*read* *num*](#13)  
[*eof*](#14)  
[*done*](#15)  
[__::page::pluginmgr::writer__ *name*](#16)  
[__::page::pluginmgr::wconfigure__ *dict*](#17)  
[__::page::pluginmgr::wtimeable__](#18)  
[__::page::pluginmgr::wtime__](#19)  
[__::page::pluginmgr::wgettime__](#20)  
[__::page::pluginmgr::whelp__](#21)  
[__::page::pluginmgr::wlabel__](#22)  
[__::page::pluginmgr::write__ *chan* *data*](#23)  
[__::page::pluginmgr::transform__ *name*](#24)  
[__::page::pluginmgr::tconfigure__ *id* *dict*](#25)  
[__::page::pluginmgr::ttimeable__ *id*](#26)  
[__::page::pluginmgr::ttime__ *id*](#27)  
[__::page::pluginmgr::tgettime__ *id*](#28)  
[__::page::pluginmgr::thelp__ *id*](#29)  
[__::page::pluginmgr::tlabel__ *id*](#30)  
[__::page::pluginmgr::transform\_do__ *id* *data*](#31)  
[__page\_cdefinition__](#32)  
[__page\_rfeature__ *name*](#33)  
[__page\_rtime__](#34)  
[__page\_rgettime__](#35)  
[__page\_rlabel__](#36)  
[__page\_rhelp__](#37)  
[__page\_roptions__](#38)  
[__page\_rconfigure__ *option* *value*](#39)  
[__page\_rrun__](#40)  
[__page\_read__ *num*](#41)  
[__page\_read\_done__](#42)  
[__page\_eof__](#43)  
[__page\_info__ *text* ?*from* ?*to*??](#44)  
[__page\_warning__ *text* ?*from* ?*to*??](#45)  
[__page\_error__ *text* ?*from* ?*to*??](#46)  
[__page\_log\_info__ *text*](#47)  
[__page\_log\_warning__ *text*](#48)  
[__page\_log\_error__ *text*](#49)  
[__page\_wfeature__](#50)  
[__page\_wtime__](#51)  
[__page\_wgettime__](#52)  
[__page\_wlabel__](#53)  
[__page\_whelp__](#54)  
[__page\_woptions__](#55)  
[__page\_wconfigure__ *option* *value*](#56)  
[__page\_wrun__ *chan* *data*](#57)  
[__page\_info__ *text* ?*from* ?*to*??](#58)  
[__page\_warning__ *text* ?*from* ?*to*??](#59)  
[__page\_error__ *text* ?*from* ?*to*??](#60)  
[__page\_log\_info__ *text*](#61)  
[__page\_log\_warning__ *text*](#62)  
[__page\_log\_error__ *text*](#63)  
[__page\_tfeature__](#64)  
[__page\_ttime__](#65)  
[__page\_tgettime__](#66)  
[__page\_tlabel__](#67)  
[__page\_thelp__](#68)  
[__page\_toptions__](#69)  
[__page\_tconfigure__ *option* *value*](#70)  
[__page\_trun__ *chan* *data*](#71)  
[__page\_info__ *text* ?*from* ?*to*??](#72)  
[__page\_warning__ *text* ?*from* ?*to*??](#73)  
[__page\_error__ *text* ?*from* ?*to*??](#74)  
[__page\_log\_info__ *text*](#75)  
[__page\_log\_warning__ *text*](#76)  
[__page\_log\_error__ *text*](#77)  

# <a name='description'></a>DESCRIPTION

This package provides the plugin manager central to the
__[page](\.\./\.\./apps/page\.md)__ application\. It manages the various
reader, writer, configuration, and transformation plugins which actually process
the text \(read, transform, and write\)\.

All plugins are loaded into slave interpreters specially prepared for them\.
While implemented using packages they need this special environment and are not
usable in a plain interpreter, like tclsh\. Because of that they are only
described in general terms in section [PREDEFINED PLUGINS](#section7), and
not documented as regular packages\. It is expected that they follow the APIs
specified in the sections

  1. [CONFIG PLUGIN API](#section3)

  1. [READER PLUGIN API](#section4)

  1. [WRITER PLUGIN API](#section5)

  1. [TRANSFORM PLUGIN API](#section6)

as per their type\.

# <a name='section2'></a>API

  - <a name='1'></a>__::page::pluginmgr::reportvia__ *cmd*

    This command defines the callback command used by
    __::page::pluginmgr::report__ \(see below\) to report input errors and
    warnings\. The default is to write such reports to the standard error
    channel\.

  - <a name='2'></a>__::page::pluginmgr::report__ *level* *text* ?*from* ?*to*??

    This command is used to report input errors and warnings\. By default such
    reports are written to the standard error\. This can be changed by setting a
    user\-specific callback command with __::page::pluginmgr::reportvia__
    \(see above\)\.

    The arguments *level* and *text* specify both the importance of the
    message, and the message itself\. For the former see the package
    __[logger](\.\./log/logger\.md)__ for the allowed values\.

    The optional argument *from* and *to* can be used by the caller to
    indicate the location \(or range\) in the input where the reported problem
    occured\. Each is a list containing two elements, the line and the column in
    the input, in this order\.

  - <a name='3'></a>__::page::pluginmgr::log__ *cmd*

    This command defines a log callback command to be used by loaded plugins for
    the reporting of internal errors, warnings, and general information\.
    Specifying the empty string as callback disables logging\.

    Note: The *cmd* has to be created by the
    __[logger](\.\./log/logger\.md)__ package, or follow the same API as
    such\.

    The command returns the empty string as its result\.

  - <a name='4'></a>__::page::pluginmgr::configuration__ *name*

    This command loads the named configuration plugin, retrieves the options
    encoded in it, and then immediately unloads it again\.

    If the *name* is the path to a file, then this files will be tried to be
    loaded as a plugin first, and, if that fails, opened and its contents read
    as a list of options and their arguments, separated by spaces, tabs and
    newlines, possibly quotes with single and double quotes\.

    See section [CONFIG PLUGIN API](#section3) for the API expected of
    configuration plugins\.

    The result of the command is the list of options retrieved\.

  - <a name='5'></a>__::page::pluginmgr::reader__ *name*

    This command loads the named reader plugin and initializes it\. The result of
    the command is a list of options the plugin understands\.

    Only a single reader plugin can be loaded\. Loading another reader plugin
    causes the previously loaded reader plugin to be de\-initialized and
    unloaded\.

    See section [READER PLUGIN API](#section4) for the API expected of
    reader plugins\.

  - <a name='6'></a>__::page::pluginmgr::rconfigure__ *dict*

    This commands configures the loaded reader plugin\. The options and their
    values are provided as a Tcl dictionary\. The result of the command is the
    empty string\.

  - <a name='7'></a>__::page::pluginmgr::rtimeable__

    This commands checks if the loaded reader plugin is able to collect timing
    statistics\. The result of the command is a boolean flag\. The result is
    __true__ if the plugin can be timed, and __false__ otherwise\.

  - <a name='8'></a>__::page::pluginmgr::rtime__

    This command activates the collection of timing statistics in the loaded
    reader plugin\.

  - <a name='9'></a>__::page::pluginmgr::rgettime__

    This command retrieves the collected timing statistics of the loaded reader
    plugin after it was executed\.

  - <a name='10'></a>__::page::pluginmgr::rhelp__

    This command retrieves the help string of the loaded reader plugin\. This is
    expected to be in *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format\.

  - <a name='11'></a>__::page::pluginmgr::rlabel__

    This command retrieves the human\-readable name of the loaded reader plugin\.

  - <a name='12'></a>__::page::pluginmgr::read__ *read* *eof* ?*complete*?

    This command invokes the loaded reader plugin to process the input, and
    returns the results of the plugin as its own result\. The input is accessible
    through the callback commands *read*, and *eof*\. The optional *done*
    can be used to intrecept when the plugin has completed its processing\. All
    arguments are command prefixes\.

    The plugin will invoke the various callbacks in the following situations:

      * <a name='13'></a>*read* *num*

        is invoked whenever input to process is needed, with the number of
        characters/bytes it asks for\. The result is expected to be the input the
        plugin is in need of\.

      * <a name='14'></a>*eof*

        is invoked by the plugin to check if the input has reached the of the
        stream\. The result is expected to be a boolean flag, __true__ when
        the input has hit EOF, and __false__ otherwise\.

      * <a name='15'></a>*done*

        is invoked when the plugin has completed the processing of the input\.

  - <a name='16'></a>__::page::pluginmgr::writer__ *name*

    This command loads the named writer plugin and initializes it\. The result of
    the command is a list of options the plugin understands\.

    Only a single reader plugin can be loaded\. Loading another reader plugin
    causes the previously loaded reader plugin to be de\-initialized and
    unloaded\.

    See section [WRITER PLUGIN API](#section5) for the API expected of
    writer plugins\.

  - <a name='17'></a>__::page::pluginmgr::wconfigure__ *dict*

    This commands configures the loaded writer plugin\. The options and their
    values are provided as a Tcl dictionary\. The result of the command is the
    empty string\.

  - <a name='18'></a>__::page::pluginmgr::wtimeable__

    This commands checks if the loaded writer plugin is able to measure
    execution times\. The result of the command is a boolean flag\. The result is
    __true__ if the plugin can be timed, and __false__ otherwise\.

  - <a name='19'></a>__::page::pluginmgr::wtime__

    This command activates the collection of timing statistics in the loaded
    writer plugin\.

  - <a name='20'></a>__::page::pluginmgr::wgettime__

    This command retrieves the collected timing statistics of the loaded writer
    plugin after it was executed\.

  - <a name='21'></a>__::page::pluginmgr::whelp__

    This command retrieves the help string of the loaded writer plugin\. This is
    expected to be in *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format\.

  - <a name='22'></a>__::page::pluginmgr::wlabel__

    This command retrieves the human\-readable name of the loaded writer plugin\.

  - <a name='23'></a>__::page::pluginmgr::write__ *chan* *data*

    The loaded writer plugin is invoked to generate the output\. It is given the
    *data* to generate the outpout from, and the Tcl handle *chan* of the
    channel to write the generated output to\. The command returns th empty
    string as its result\.

  - <a name='24'></a>__::page::pluginmgr::transform__ *name*

    This command loads the named transformation plugin and initializes it\. The
    result of the command is a 2\-element list containing the plugin id and a
    list of options the plugin understands, in this order\.

    Multiple transformations plugins can be loaded and are identified by
    handles\.

    See section [TRANSFORM PLUGIN API](#section6) for the API expected of
    transformation plugins\.

  - <a name='25'></a>__::page::pluginmgr::tconfigure__ *id* *dict*

    This commands configures the identified transformation plugin\. The options
    and their values are provided as a Tcl dictionary\. The result of the command
    is the empty string\.

  - <a name='26'></a>__::page::pluginmgr::ttimeable__ *id*

    This commands checks if the identified transformation plugin is able to
    collect timing statistics\. The result of the command is a boolean flag\. The
    result is __true__ if the plugin can be timed, and __false__
    otherwise\.

  - <a name='27'></a>__::page::pluginmgr::ttime__ *id*

    This command activates the collection of timing statistics in the identified
    transformation plugin\.

  - <a name='28'></a>__::page::pluginmgr::tgettime__ *id*

    This command retrieves the collected timing statistics of the identified
    transformation plugin after it was executed\.

  - <a name='29'></a>__::page::pluginmgr::thelp__ *id*

    This command retrieves the help string of the identified transformation
    plugin\. This is expected to be in
    *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format\.

  - <a name='30'></a>__::page::pluginmgr::tlabel__ *id*

    This command retrieves the human\-readable name of the identified
    transformation plugin\.

  - <a name='31'></a>__::page::pluginmgr::transform\_do__ *id* *data*

    The identified transformation plugin is invoked to process the specified
    *data*\. The result of the plugin is returned as the result of the command\.

# <a name='section3'></a>CONFIG PLUGIN API

Configuration plugins are expected to provide a single command, described below\.

  - <a name='32'></a>__page\_cdefinition__

    This command of a configuration plugin is called by the plugin manager to
    execute it\. Its result has to be a list of options and values to process\.

Configuration plugins do not expect the environment to provide any special
commands\.

It is expected that a configuration plugin __FOO__ is implemented by the
package __page::config::__FOO____\.

Configuration plugins are loaded, executed, and unloaded in one step, they are
not kept in memory\. The command for doing this is
__::page::pluginmgr::configuration__\.

# <a name='section4'></a>READER PLUGIN API

Reader plugins are expected to provide the following commands, described below\.

  - <a name='33'></a>__page\_rfeature__ *name*

    This command takes a feature *name* and returns a boolean flag indicating
    whether the feature is supported by the plugin, or not\. The result has to be
    __true__ if the feature is supported, and __false__ otherwise\.

    See section [FEATURES](#section8) for the possible features the plugin
    manager will ask for\.

  - <a name='34'></a>__page\_rtime__

    This command is invoked to activate the collection of timing statistics\.

  - <a name='35'></a>__page\_rgettime__

    This command is invoked to retrieve the collected timing statistics\.

  - <a name='36'></a>__page\_rlabel__

    This command is invoked to retrieve a human\-readable label for the plugin\.

  - <a name='37'></a>__page\_rhelp__

    This command is invoked to retrieve a help text for plugin\. The text is
    expected to be in *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format\.

  - <a name='38'></a>__page\_roptions__

    This command is invoked to retrieve the options understood by the plugin\.

  - <a name='39'></a>__page\_rconfigure__ *option* *value*

    This command is invoked to reconfigure the plugin, specifically the given
    *option* is set to the new *value*\.

  - <a name='40'></a>__page\_rrun__

    This command is invoked to process the input stream per the current plugin
    configuration\. The result of the command is the result of the processing\.

Reader plugins expect the environment to provide the following special commands\.

  - <a name='41'></a>__page\_read__ *num*

    This command is invoked to read *num* characters/bytes from the input\. Its
    result has to be read characters/bytes\.

  - <a name='42'></a>__page\_read\_done__

    This command is invoked to signal that the plugin has completed the
    processing of the input\.

  - <a name='43'></a>__page\_eof__

    This command is invoked to check if the input stream has reached its end\.
    Its result has to be a boolean flag, __true__ when the input has reached
    the end, __false__ otherwise\.

  - <a name='44'></a>__page\_info__ *text* ?*from* ?*to*??

    Invoked to report some information to the user\. May indicate a location or
    range in the input\. Each piece of location data, if provided, is a 2\-element
    list containing line and column numbers\.

  - <a name='45'></a>__page\_warning__ *text* ?*from* ?*to*??

    Invoked to report a warning to the user\. May indicate a location or range in
    the input\. Each piece of location data, if provided, is a 2\-element list
    containing line and column numbers\.

  - <a name='46'></a>__page\_error__ *text* ?*from* ?*to*??

    Invoked to report an error to the user\. May indicate a location or range in
    the input\. Each piece of location data, if provided, is a 2\-element list
    containing line and column numbers\.

  - <a name='47'></a>__page\_log\_info__ *text*

    Invoked to report some internal information\.

  - <a name='48'></a>__page\_log\_warning__ *text*

    Invoked to report an internal warning\.

  - <a name='49'></a>__page\_log\_error__ *text*

    Invoked to report an internal error\.

It is expected that a reader plugin __FOO__ is implemented by the package
__page::reader::__FOO____\.

Reader plugins are loaded by the command __::page::pluginmgr::reader__\. At
most one reader plugin can be kept in memory\.

# <a name='section5'></a>WRITER PLUGIN API

Writer plugins are expected to provide the following commands, described below\.

  - <a name='50'></a>__page\_wfeature__

    This command takes a feature *name* and returns a boolean flag indicating
    whether the feature is supported by the plugin, or not\. The result has to be
    __true__ if the feature is supported, and __false__ otherwise\.

    See section [FEATURES](#section8) for the possible features the plugin
    manager will ask for\.

  - <a name='51'></a>__page\_wtime__

    This command is invoked to activate the collection of timing statistics\.

  - <a name='52'></a>__page\_wgettime__

    This command is invoked to retrieve the collected timing statistics\.

  - <a name='53'></a>__page\_wlabel__

    This command is invoked to retrieve a human\-readable label for the plugin\.

  - <a name='54'></a>__page\_whelp__

    This command is invoked to retrieve a help text for plugin\. The text is
    expected to be in *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format\.

  - <a name='55'></a>__page\_woptions__

    This command is invoked to retrieve the options understood by the plugin\.

  - <a name='56'></a>__page\_wconfigure__ *option* *value*

    This command is invoked to reconfigure the plugin, specifically the given
    *option* is set to the new *value*\.

  - <a name='57'></a>__page\_wrun__ *chan* *data*

    This command is invoked to process the specified *data* and write it to
    the output stream *chan*\. The latter is a Tcl channel handle opened for
    writing\. The result of the command is the empty string\.

Writer plugins expect the environment to provide the following special commands\.

  - <a name='58'></a>__page\_info__ *text* ?*from* ?*to*??

    Invoked to report some information to the user\. May indicate a location or
    range in the input\. Each piece of location data, if provided, is a 2\-element
    list containing line and column numbers\.

  - <a name='59'></a>__page\_warning__ *text* ?*from* ?*to*??

    Invoked to report a warning to the user\. May indicate a location or range in
    the input\. Each piece of location data, if provided, is a 2\-element list
    containing line and column numbers\.

  - <a name='60'></a>__page\_error__ *text* ?*from* ?*to*??

    Invoked to report an error to the user\. May indicate a location or range in
    the input\. Each piece of location data, if provided, is a 2\-element list
    containing line and column numbers\.

  - <a name='61'></a>__page\_log\_info__ *text*

    Invoked to report some internal information\.

  - <a name='62'></a>__page\_log\_warning__ *text*

    Invoked to report an internal warning\.

  - <a name='63'></a>__page\_log\_error__ *text*

    Invoked to report an internal error\.

It is expected that a writer plugin __FOO__ is implemented by the package
__page::writer::__FOO____\.

Writer plugins are loaded by the command __::page::pluginmgr::writer__\. At
most one writer plugin can be kept in memory\.

# <a name='section6'></a>TRANSFORM PLUGIN API

page::transform::\* Transformation plugins are expected to provide the following
commands, described below\.

  - <a name='64'></a>__page\_tfeature__

    This command takes a feature *name* and returns a boolean flag indicating
    whether the feature is supported by the plugin, or not\. The result has to be
    __true__ if the feature is supported, and __false__ otherwise\.

    See section [FEATURES](#section8) for the possible features the plugin
    manager will ask for\.

  - <a name='65'></a>__page\_ttime__

    This command is invoked to activate the collection of timing statistics\.

  - <a name='66'></a>__page\_tgettime__

    This command is invoked to retrieve the collected timing statistics\.

  - <a name='67'></a>__page\_tlabel__

    This command is invoked to retrieve a human\-readable label for the plugin\.

  - <a name='68'></a>__page\_thelp__

    This command is invoked to retrieve a help text for plugin\. The text is
    expected to be in *[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools)* format\.

  - <a name='69'></a>__page\_toptions__

    This command is invoked to retrieve the options understood by the plugin\.

  - <a name='70'></a>__page\_tconfigure__ *option* *value*

    This command is invoked to reconfigure the plugin, specifically the given
    *option* is set to the new *value*\.

  - <a name='71'></a>__page\_trun__ *chan* *data*

    This command is invoked to process the specified *data* and write it to
    the output stream *chan*\. The latter is a Tcl channel handle opened for
    writing\. The result of the command is the empty string\.

Transformation plugins expect the environment to provide the following special
commands\.

  - <a name='72'></a>__page\_info__ *text* ?*from* ?*to*??

    Invoked to report some information to the user\. May indicate a location or
    range in the input\. Each piece of location data, if provided, is a 2\-element
    list containing line and column numbers\.

  - <a name='73'></a>__page\_warning__ *text* ?*from* ?*to*??

    Invoked to report a warning to the user\. May indicate a location or range in
    the input\. Each piece of location data, if provided, is a 2\-element list
    containing line and column numbers\.

  - <a name='74'></a>__page\_error__ *text* ?*from* ?*to*??

    Invoked to report an error to the user\. May indicate a location or range in
    the input\. Each piece of location data, if provided, is a 2\-element list
    containing line and column numbers\.

  - <a name='75'></a>__page\_log\_info__ *text*

    Invoked to report some internal information\.

  - <a name='76'></a>__page\_log\_warning__ *text*

    Invoked to report an internal warning\.

  - <a name='77'></a>__page\_log\_error__ *text*

    Invoked to report an internal error\.

It is expected that a transformation plugin __FOO__ is implemented by the
package __page::transform::__FOO____\.

Transformation plugins are loaded by the command
__::page::pluginmgr::transform__\. More than one transformation plugin can be
kept in memory\.

# <a name='section7'></a>PREDEFINED PLUGINS

The following predefined plugins are known, i\.e\. provided by the page module\.

  - Configuration

      * peg

        Returns a set of options to configure the
        __[page](\.\./\.\./apps/page\.md)__ application for the processing of
        a PEG grammar and the generation of ME code\. See the packages
        __grammar\_peg__, __grammar\_me__ and relations for more details\.

  - Reader

      * hb

        Expects a so\-called *half\-baked PEG container* as input and returns
        the equivalent abstract syntax tree\. See the writer plugin *hb* for
        the plugin generating this type of input\.

      * lemon

        Expects a grammar specification as understood by Richar Hipp's LEMON
        parser generator and returns an abstract syntax tree for it\.

      * peg

        Expects a grammar specification in the form of a parsing expression
        grammar \(PEG\) and returns an abstract syntax tree for it\.

      * ser

        Expect the serialized form of a parsing expression grammar as generated
        by the package __[grammar::peg](\.\./grammar\_peg/peg\.md)__ as
        input, converts it into an equivalent abstract syntax tree and returns
        that\.

      * treeser

        Expects the serialized form of a tree as generated by the package
        __[struct::tree](\.\./struct/struct\_tree\.md)__ as input and
        returns it, after validation\.

  - Writer

      * hb

        Expects an abstract syntax tree for a parsing expression grammar as
        input and writes it out in the form of a so\-called *half\-baked PEG
        container*\.

      * identity

        Takes any input and writes it as is\.

      * mecpu

        Expects symbolic assembler code for the MatchEngine CPU \(See the package
        __[grammar::me::cpu](\.\./grammar\_me/me\_cpu\.md)__ and relatives\)
        and writes it out as Tcl code for a parser\.

      * me

        Expects an abstract syntax tree for a parsing expression grammar as
        input and writes it out as Tcl code for the MatchEngine \(See the package
        __grammar::me__ and relatives\) which parses input in that grammar\.

      * null

        Takes any input and writes nothing\. The logical equivalent of /dev/null\.

      * peg

        Expects an abstract syntax tree for a parsing expression grammar as
        input and writes it out in the form of a canonical PEG which can be read
        by the reader plugin *peg*\.

      * ser

        Expects an abstract syntax tree for a parsing expression grammar as
        input and writes it out as a serialized PEG container which can be read
        by the reader plugin *ser*\.

      * tpc

        Expects an abstract syntax tree for a parsing expression grammar as
        input and writes it out as Tcl code initializing a PEG container as
        provided by the package
        __[grammar::peg](\.\./grammar\_peg/peg\.md)__\.

      * tree

        Takes any serialized tree \(per package
        __[struct::tree](\.\./struct/struct\_tree\.md)__\) as input and
        writes it out in a generic indented format\.

  - Transformation

      * mecpu

        Takes an abstract syntax tree for a parsing expression grammer as input,
        generates symbolic assembler code for the MatchEngine CPU, and returns
        that as its result \(See the package
        __[grammar::me::cpu](\.\./grammar\_me/me\_cpu\.md)__ and relatives\)\.

      * reachable

        Takes an abstract syntax tree for a parsing expression grammer as input,
        performs a reachability analysis, and returns the modified and annotated
        tree\.

      * realizable

        Takes an abstract syntax tree for a parsing expression grammer as input,
        performs an analysis of realizability, and returns the modified and
        annotated tree\.

# <a name='section8'></a>FEATURES

The plugin manager currently checks the plugins for only one feature,
__timeable__\. A plugin supporting this feature is assumed to be able to
collect timing statistics on request\.

# <a name='section9'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *page* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[page](\.\./\.\./\.\./\.\./index\.md\#page), [parser
generator](\.\./\.\./\.\./\.\./index\.md\#parser\_generator), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing)

# <a name='category'></a>CATEGORY

Page Parser Generator

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/page/page_util_flow.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

[//000000001]: # (page\_util\_flow \- Parser generator tools)
[//000000002]: # (Generated from file 'page\_util\_flow\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (page\_util\_flow\(n\) 1\.0 tcllib "Parser generator tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

page\_util\_flow \- page dataflow/treewalker utility

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [FLOW API](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require page::util::flow ?0\.1?  
package require snit  

[__::page::util::flow__ *start* *flowvar* *nodevar* *script*](#1)  
[*flow* __visit__ *node*](#2)  
[*flow* __visitl__ *nodelist*](#3)  
[*flow* __visita__ *node*\.\.\.](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a single utility command for easy dataflow based
manipulation of arbitrary data structures, especially abstract syntax trees\.

# <a name='section2'></a>API

  - <a name='1'></a>__::page::util::flow__ *start* *flowvar* *nodevar* *script*

    This command contains the core logic to drive the walking of an arbitrary
    data structure which can partitioned into separate parts\. Examples of such
    structures are trees and graphs\.

    The command makes no assumptions at all about the API of the structure to be
    walked, except that that its parts, here called *nodes*, are identified by
    strings\. These strings are taken as is, from the arguments, and the body,
    and handed back to the body, without modification\.

    Access to the actual data structure, and all decisions regarding which nodes
    to visit in what order are delegated to the body of the loop, i\.e\. the
    *script*\.

    The body is invoked first for the nodes in the start\-set specified via
    *start*\), and from then on for the nodes the body has requested to be
    visited\. The command stops when the set of nodes to visit becomes empty\.
    Note that a node can be visited more than once\. The body has complete
    control about this\.

    The body is invoked in the context of the caller\. The variable named by
    *nodevar* will be set to the current node, and the variable named by
    *flowvar* will be set to the command of the flow object through which the
    body can request the nodes to visit next\. The API provided by this object is
    described in the next section, [FLOW API](#section3)\.

    Note that the command makes no promises regarding the order in which nodes
    are visited, excpt that the nodes requested to be visited by the current
    iteration will be visited afterward, in some order\.

# <a name='section3'></a>FLOW API

This section describes the API provided by the flow object made accessible to
the body script of __::page::util::flow__\.

  - <a name='2'></a>*flow* __visit__ *node*

    Invoking this method requests that the node *n* is visited after the
    current iteration\.

  - <a name='3'></a>*flow* __visitl__ *nodelist*

    Invoking this method requests that all the nodes found in the list
    *nodelist* are visited after the current iteration\.

  - <a name='4'></a>*flow* __visita__ *node*\.\.\.

    This is the variadic arguments form of the method __visitl__, see above\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *page* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[dataflow](\.\./\.\./\.\./\.\./index\.md\#dataflow), [graph
walking](\.\./\.\./\.\./\.\./index\.md\#graph\_walking),
[page](\.\./\.\./\.\./\.\./index\.md\#page), [parser
generator](\.\./\.\./\.\./\.\./index\.md\#parser\_generator), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing), [tree
walking](\.\./\.\./\.\./\.\./index\.md\#tree\_walking)

# <a name='category'></a>CATEGORY

Page Parser Generator

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































Deleted embedded/md/tcllib/files/modules/page/page_util_norm_lemon.md.

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
89
90
91
92
93

[//000000001]: # (page\_util\_norm\_lemon \- Parser generator tools)
[//000000002]: # (Generated from file 'page\_util\_norm\_lemon\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (page\_util\_norm\_lemon\(n\) 1\.0 tcllib "Parser generator tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

page\_util\_norm\_lemon \- page AST normalization, LEMON

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require page::util::norm\_lemon ?0\.1?  
package require snit  

[__::page::util::norm::lemon__ *tree*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a single utility command which takes an AST for a lemon
grammar and normalizes it in various ways\. The result is called a *Normalized
Lemon Grammar Tree*\.

*Note* that this package can only be used from within a plugin managed by the
package __page::pluginmgr__\.

# <a name='section2'></a>API

  - <a name='1'></a>__::page::util::norm::lemon__ *tree*

    This command assumes the *tree* object contains for a lemon grammar\. It
    normalizes this tree in place\. The result is called a *Normalized Lemon
    Grammar Tree*\.

    The exact operations performed are left undocumented for the moment\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *page* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[graph walking](\.\./\.\./\.\./\.\./index\.md\#graph\_walking),
[lemon](\.\./\.\./\.\./\.\./index\.md\#lemon),
[normalization](\.\./\.\./\.\./\.\./index\.md\#normalization),
[page](\.\./\.\./\.\./\.\./index\.md\#page), [parser
generator](\.\./\.\./\.\./\.\./index\.md\#parser\_generator), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing), [tree
walking](\.\./\.\./\.\./\.\./index\.md\#tree\_walking)

# <a name='category'></a>CATEGORY

Page Parser Generator

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































Deleted embedded/md/tcllib/files/modules/page/page_util_norm_peg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140

[//000000001]: # (page\_util\_norm\_peg \- Parser generator tools)
[//000000002]: # (Generated from file 'page\_util\_norm\_peg\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (page\_util\_norm\_peg\(n\) 1\.0 tcllib "Parser generator tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

page\_util\_norm\_peg \- page AST normalization, PEG

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require page::util::norm\_peg ?0\.1?  
package require snit  

[__::page::util::norm::peg__ *tree*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a single utility command which takes an AST for a parsing
expression grammar and normalizes it in various ways\. The result is called a
*Normalized PE Grammar Tree*\.

*Note* that this package can only be used from within a plugin managed by the
package __page::pluginmgr__\.

# <a name='section2'></a>API

  - <a name='1'></a>__::page::util::norm::peg__ *tree*

    This command assumes the *tree* object contains for a parsing expression
    grammar\. It normalizes this tree in place\. The result is called a
    *Normalized PE Grammar Tree*\.

    The following operations are performd

      1. The data for all terminals is stored in their grandparental nodes\. The
         terminal nodes and their parents are removed\. Type information is
         dropped\.

      1. All nodes which have exactly one child are irrelevant and are removed,
         with the exception of the root node\. The immediate child of the root is
         irrelevant as well, and removed as well\.

      1. The name of the grammar is moved from the tree node it is stored in to
         an attribute of the root node, and the tree node removed\.

         The node keeping the start expression separate is removed as irrelevant
         and the root node of the start expression tagged with a marker
         attribute, and its handle saved in an attribute of the root node for
         quick access\.

      1. Nonterminal hint information is moved from nodes into attributes, and
         the now irrelevant nodes are deleted\.

         *Note:* This transformation is dependent on the removal of all nodes
         with exactly one child, as it removes the all 'Attribute' nodes
         already\. Otherwise this transformation would have to put the
         information into the grandparental node\.

         The default mode given to the nonterminals is __value__\.

         Like with the global metadata definition specific information is moved
         out out of nodes into attributes, the now irrelevant nodes are deleted,
         and the root nodes of all definitions are tagged with marker
         attributes\. This provides us with a mapping from nonterminal names to
         their defining nodes as well, which is saved in an attribute of the
         root node for quick reference\.

         At last the range in the input covered by a definition is computed\. The
         left extent comes from the terminal for the nonterminal symbol it
         defines\. The right extent comes from the rightmost child under the
         definition\. While this not an expression tree yet the location data is
         sound already\.

      1. The remaining nodes under all definitions are transformed into proper
         expression trees\. First character ranges, followed by unary operations,
         characters, and nonterminals\. At last the tree is flattened by the
         removal of superfluous inner nodes\.

         The order matters, to shed as much nodes as possible early, and to
         avoid unnecessary work later\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *page* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [graph
walking](\.\./\.\./\.\./\.\./index\.md\#graph\_walking),
[normalization](\.\./\.\./\.\./\.\./index\.md\#normalization),
[page](\.\./\.\./\.\./\.\./index\.md\#page), [parser
generator](\.\./\.\./\.\./\.\./index\.md\#parser\_generator), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing), [tree
walking](\.\./\.\./\.\./\.\./index\.md\#tree\_walking)

# <a name='category'></a>CATEGORY

Page Parser Generator

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































Deleted embedded/md/tcllib/files/modules/page/page_util_peg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

[//000000001]: # (page\_util\_peg \- Parser generator tools)
[//000000002]: # (Generated from file 'page\_util\_peg\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (page\_util\_peg\(n\) 1\.0 tcllib "Parser generator tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

page\_util\_peg \- page PEG transformation utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require page::util::peg ?0\.1?  
package require snit  

[__::page::util::peg::symbolNodeOf__ *tree* *node*](#1)  
[__::page::util::peg::symbolOf__ *tree* *node*](#2)  
[__::page::util::peg::updateUndefinedDueRemoval__ *tree*](#3)  
[__::page::util::peg::flatten__ *treequery* *tree*](#4)  
[__::page::util::peg::getWarnings__ *tree*](#5)  
[__::page::util::peg::printWarnings__ *msg*](#6)  
[__::page::util::peg::peOf__ *tree* *eroot*](#7)  
[__::page::util::peg::printTclExpr__ *pe*](#8)  

# <a name='description'></a>DESCRIPTION

This package provides a few common operations to PEG transformations\. They
assume a *Normalized PE Grammar Tree* as input, see the package
__page::util::norm::peg__, possibly augmented with attributes coming from
transformations not in conflict with the base definition\.

# <a name='section2'></a>API

  - <a name='1'></a>__::page::util::peg::symbolNodeOf__ *tree* *node*

    Given an arbitrary expression *node* in the AST *tree* it determines the
    node \(itself or an ancestor\) containing the name of the nonterminal symbol
    the node belongs to, and returns its id\. The result is either the root of
    the tree \(for the start expression\), or a definition node\.

  - <a name='2'></a>__::page::util::peg::symbolOf__ *tree* *node*

    As __::page::util::peg::symbolNodeOf__, but returns the symbol name
    instead of the node\.

  - <a name='3'></a>__::page::util::peg::updateUndefinedDueRemoval__ *tree*

    The removal of nodes in the AST *tree* can cause symbols to lose one or
    more users\.

        A used by B and C,
        B is reachable,
        C is not,

        so A now loses the node in the expression for C calling it,
        or rather, not calling it anymore.

    This command updates the cross\-references and which nonterminals are now
    undefined\.

  - <a name='4'></a>__::page::util::peg::flatten__ *treequery* *tree*

    This commands flattens nested sequence and choice operators in the AST
    *tree*, re\-using the __[treeql](\.\./treeql/treeql\.md)__ object
    *treequery* to run the query determining which nodes to cut\.

  - <a name='5'></a>__::page::util::peg::getWarnings__ *tree*

    This command looks at the attributes of the AST *tree* for problems with
    the grammar and issues warnings\. They do not prevent us from writing the
    grammar, but still represent problems with it the user should be made aware
    of\.

    The result of the command is a dictionary mapping nonterminal names to their
    associated warnings\.

  - <a name='6'></a>__::page::util::peg::printWarnings__ *msg*

    The argument of the command is a dictionary mapping nonterminal names to
    their associated warnings, as generated by, for example, the command
    __::page::util::peg::getWarnings__\.

    The warnings contained therein are formatted and then printed via the log
    command __page\_info__\. This means that this command can be used only
    from within a plugin managed by the package __page::pluginmgr__\.

  - <a name='7'></a>__::page::util::peg::peOf__ *tree* *eroot*

    This command converts the parsing expression starting at the node *eroot*
    in the AST *tree* into a nested list\. The exact syntax of this list
    specified by the package __[grammar::peg](\.\./grammar\_peg/peg\.md)__\.

  - <a name='8'></a>__::page::util::peg::printTclExpr__ *pe*

    This command converts the parsing expression contained in the nested list
    *pe* into a Tcl string which can be placed into a Tcl script\. See the
    package __[grammar::peg](\.\./grammar\_peg/peg\.md)__ for the exact
    syntax of *pe*\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *page* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [page](\.\./\.\./\.\./\.\./index\.md\#page),
[parser generator](\.\./\.\./\.\./\.\./index\.md\#parser\_generator), [parsing
expression grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation)

# <a name='category'></a>CATEGORY

Page Parser Generator

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































Deleted embedded/md/tcllib/files/modules/page/page_util_quote.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

[//000000001]: # (page\_util\_quote \- Parser generator tools)
[//000000002]: # (Generated from file 'page\_util\_quote\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (page\_util\_quote\(n\) 1\.0 tcllib "Parser generator tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

page\_util\_quote \- page character quoting utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require page::util::quote ?0\.1?  
package require snit  

[__::page::util::quote::unquote__ *char*](#1)  
[__::page::util::quote::quote'tcl__ *char*](#2)  
[__::page::util::quote::quote'tclstr__ *char*](#3)  
[__::page::util::quote::quote'tclcom__ *char*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a few utility commands to convert characters into various
forms\.

# <a name='section2'></a>API

  - <a name='1'></a>__::page::util::quote::unquote__ *char*

    A character, as stored in an abstract syntax tree by a PEG processor \(See
    the packages __grammar::peg::interpreter__, __grammar::me__, and
    their relations\), i\.e\. in some quoted form, is converted into the equivalent
    Tcl character\. The character is returned as the result of the command\.

  - <a name='2'></a>__::page::util::quote::quote'tcl__ *char*

    This command takes a Tcl character \(internal representation\) and converts it
    into a string which is accepted by the Tcl parser, will regenerate the
    character in question and is 7bit ASCII\. The string is returned as the
    result of this command\.

  - <a name='3'></a>__::page::util::quote::quote'tclstr__ *char*

    This command takes a Tcl character \(internal representation\) and converts it
    into a string which is accepted by the Tcl parser and will generate a human
    readable representation of the character in question\. The string is returned
    as the result of this command\.

    The string does not use any unprintable characters\. It may use
    backslash\-quoting\. High UTF characters are quoted to avoid problems with the
    still prevalent ascii terminals\. It is assumed that the string will be used
    in a double\-quoted environment\.

  - <a name='4'></a>__::page::util::quote::quote'tclcom__ *char*

    This command takes a Tcl character \(internal representation\) and converts it
    into a string which is accepted by the Tcl parser when used within a Tcl
    comment\. The string is returned as the result of this command\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *page* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[page](\.\./\.\./\.\./\.\./index\.md\#page), [parser
generator](\.\./\.\./\.\./\.\./index\.md\#parser\_generator),
[quoting](\.\./\.\./\.\./\.\./index\.md\#quoting), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing)

# <a name='category'></a>CATEGORY

Page Parser Generator

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































Deleted embedded/md/tcllib/files/modules/pki/pki.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271

[//000000001]: # (pki \- public key encryption)
[//000000002]: # (Generated from file 'pki\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2010, 2011, 2012, 2013, Roy Keene, Andreas Kupries)
[//000000004]: # (pki\(n\) 0\.10 tcllib "public key encryption")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pki \- Implementation of the public key cipher

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [REFERENCES](#section4)

  - [AUTHORS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pki ?0\.10?  

[__::pki::encrypt__ ?*\-binary*? ?*\-hex*? ?*\-pad*? ?*\-nopad*? ?*\-priv*? ?*\-pub*? ?*\-\-*? *input* *key*](#1)  
[__::pki::decrypt__ ?*\-binary*? ?*\-hex*? ?*\-unpad*? ?*\-nounpad*? ?*\-priv*? ?*\-pub*? ?*\-\-*? *input* *key*](#2)  
[__::pki::sign__ *input* *key* ?*algo*?](#3)  
[__::pki::verify__ *signedmessage* *plaintext* *key* ?*algo*?](#4)  
[__::pki::key__ *key* ?*password*? ?*encodePem*?](#5)  
[__::pki::pkcs::parse\_key__ *key* ?*password*?](#6)  
[__::pki::x509::parse\_cert__ *cert*](#7)  
[__::pki::rsa::generate__ *bitlength* ?*exponent*?](#8)  
[__::pki::x509::verify\_cert__ *cert* *trustedcerts* ?*intermediatecerts*?](#9)  
[__::pki::x509::validate\_cert__ *cert* ?__\-sign\_message__ *dn\_of\_signer*? ?__\-encrypt\_message__ *dn\_of\_signer*? ?__\-sign\_cert__ *dn\_to\_be\_signed* *ca\_depth*? ?__\-ssl__ *dn*?](#10)  
[__::pki::pkcs::create\_csr__ *keylist* *namelist* ?*encodePem*? ?*algo*?](#11)  
[__::pki::pkcs::parse\_csr__ *csr*](#12)  
[__::pki::x509::create\_cert__ *signreqlist* *cakeylist* *serial\_number* *notBefore* *notAfter* *isCA* *extensions* ?*encodePem*? ?*algo*?](#13)  

# <a name='description'></a>DESCRIPTION

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::pki::encrypt__ ?*\-binary*? ?*\-hex*? ?*\-pad*? ?*\-nopad*? ?*\-priv*? ?*\-pub*? ?*\-\-*? *input* *key*

    Encrypt a message using PKI \(probably RSA\)\. Requires the caller to specify
    either __\-priv__ to encrypt with the private key or __\-pub__ to
    encrypt with the public key\. The default option is to pad and return in hex\.
    One of __\-pub__ or __\-priv__ must be specified\. The __\-hex__
    option causes the data to be returned in encoded as a hexidecimal string,
    while the __\-binary__ option causes the data to be returned as a binary
    string\. If they are specified multiple times, the last one specified is
    used\. The __\-pad__ option causes the data to be padded per PKCS\#1 prior
    to being encrypted\. The __\-nopad__ inhibits this behaviour\. If they are
    specified multiple times, the last one specified is used\. The input to
    encrypt is specified as *input*\. The *key* parameter, holding the key to
    use, is a return value from either __::pki::pkcs::parse\_key__,
    __::pki::x509::parse\_cert__, or __::pki::rsa::generate__\.

    Mapping to OpenSSL's __openssl__ application:

      1. "openssl rsautl \-encrypt" == "::pki::encrypt \-binary \-pub"

      1. "openssl rsautl \-sign" == "::pki::encrypt \-binary \-priv"

  - <a name='2'></a>__::pki::decrypt__ ?*\-binary*? ?*\-hex*? ?*\-unpad*? ?*\-nounpad*? ?*\-priv*? ?*\-pub*? ?*\-\-*? *input* *key*

    Decrypt a message using PKI \(probably RSA\)\. See __::pki::encrypt__ for
    option handling\.

    Mapping to OpenSSL's __openssl__ application:

      1. "openssl rsautl \-decrypt" == "::pki::decrypt \-binary \-priv"

      1. "openssl rsautl \-verify" == "::pki::decrypt \-binary \-pub"

  - <a name='3'></a>__::pki::sign__ *input* *key* ?*algo*?

    Digitally sign message *input* using the private *key*\.

    If *algo* is ommited "sha1" is assumed\. Possible values for *algo*
    include "__md5__", "__sha1__", "__sha256__", and "__raw__"\.

    Specifying "__raw__" for *algo* will inhibit the building of an ASN\.1
    structure to encode which hashing algorithm was chosen\. *Attention*: In
    this case the corresponding __pkgi::verify__ must be called __with__
    algorithm information\. Conversely, specifying a non\-"__raw__" algorithm
    here means that the corresponding __pkgi::verify__ invokation has to be
    made *without* algorithm information\.

    The *input* should be the plain text, hashing will be performed on it\.

    The *key* should include the private key\.

  - <a name='4'></a>__::pki::verify__ *signedmessage* *plaintext* *key* ?*algo*?

    Verify a digital signature using a public *key*\. Returns true or false\.

    *Attention*: The algorithm information *algo* has to be specified if and
    only if the __pki::sign__ which generated the *signedmessage* was
    called with algorithm "__raw__"\. This inhibited the building of the
    ASN\.1 structure encoding the chosen hashing algorithm\. Conversely, if a
    proper algorithm was specified during signing then you *must not* specify
    an algorithm here\.

  - <a name='5'></a>__::pki::key__ *key* ?*password*? ?*encodePem*?

    Convert a key structure into a serialized PEM \(default\) or DER encoded
    private key suitable for other applications\. For RSA keys this means PKCS\#1\.

  - <a name='6'></a>__::pki::pkcs::parse\_key__ *key* ?*password*?

    Convert a PKCS\#1 private *key* into a usable key, i\.e\. one which can be
    used as argument for __::pki::encrypt__, __::pki::decrypt__,
    __::pki::sign__, and __::pki::verify__\.

  - <a name='7'></a>__::pki::x509::parse\_cert__ *cert*

    Convert an X\.509 certificate to a usable \(public\) key, i\.e\. one which can be
    used as argument for __::pki:encrypt__, __::pki::decrypt__, and
    __::pki::verify__\. The *cert* argument can be either PEM or DER
    encoded\.

  - <a name='8'></a>__::pki::rsa::generate__ *bitlength* ?*exponent*?

    Generate a new RSA key pair, the parts of which can be used as argument for
    __::pki::encrypt__, __::pki::decrypt__, __::pki::sign__, and
    __::pki::verify__\. The *bitlength* argument is the length of the
    public key modulus\. The *exponent* argument should generally not be
    specified unless you really know what you are doing\.

  - <a name='9'></a>__::pki::x509::verify\_cert__ *cert* *trustedcerts* ?*intermediatecerts*?

    Verify that a trust can be found between the certificate specified in the
    *cert* argument and one of the certificates specified in the list of
    certificates in the *trustedcerts* argument\. \(Eventually the chain can be
    through untrusted certificates listed in the *intermediatecerts* argument,
    but this is currently unimplemented\)\. The certificates specified in the
    *cert* and *trustedcerts* option should be parsed \(from
    __::pki::x509::parse\_cert__\)\.

  - <a name='10'></a>__::pki::x509::validate\_cert__ *cert* ?__\-sign\_message__ *dn\_of\_signer*? ?__\-encrypt\_message__ *dn\_of\_signer*? ?__\-sign\_cert__ *dn\_to\_be\_signed* *ca\_depth*? ?__\-ssl__ *dn*?

    Validate that a certificate is valid to be used in some capacity\. If
    multiple options are specified they must all be met for this procedure to
    return "true"\. Currently, only the __\-sign\_cert__ option is functional\.
    Arguments for the __\-sign\_cert__ option are *dn\_to\_be\_signed* and
    *ca\_depth*\. The *dn\_to\_be\_signed* is the distinguished from the subject
    of a certificate to verify that the certificate specified in the *cert*
    argument can sign\. The *ca\_depth* argument is used to indicate at which
    depth the verification should be done at\. Some certificates are limited to
    how far down the chain they can be used to verify a given certificate\.

  - <a name='11'></a>__::pki::pkcs::create\_csr__ *keylist* *namelist* ?*encodePem*? ?*algo*?

    Generate a certificate signing request from a key pair specified in the
    *keylist* argument\. The *namelist* argument is a list of "name" followed
    by "value" pairs to encoding as the requested distinguished name in the CSR\.
    The *encodePem* option specifies whether or not the result should be PEM
    encoded or DER encoded\. A "true" value results in the result being PEM
    encoded, while any other value 9results in the the result being DER encoded\.
    DER encoding is the default\. The *algo* argument specifies the hashing
    algorithm we should use to sign this certificate signing request with\. The
    default is "sha1"\. Other possible values include "md5" and "sha256"\.

  - <a name='12'></a>__::pki::pkcs::parse\_csr__ *csr*

    Parse a Certificate Signing Request\. The *csr* argument can be either PEM
    or DER encoded\.

  - <a name='13'></a>__::pki::x509::create\_cert__ *signreqlist* *cakeylist* *serial\_number* *notBefore* *notAfter* *isCA* *extensions* ?*encodePem*? ?*algo*?

    Sign a signing request \(usually from __::pki::pkcs::create\_csr__ or
    __::pki::pkcs::parse\_csr__\) with a Certificate Authority \(CA\)
    certificate\. The *signreqlist* argument should be the parsed signing
    request\. The *cakeylist* argument should be the parsed CA certificate\. The
    *serial\_number* argument should be a serial number unique to this
    certificate from this certificate authority\. The *notBefore* and
    *notAfter* arguments should contain the time before and after which
    \(respectively\) the certificate should be considered invalid\. The time should
    be encoded as something __clock format__ will accept \(i\.e\., the results
    of __clock seconds__ and __clock add__\)\. The *isCA* argument is a
    boolean argumen describing whether or not the signed certificate should be a
    a CA certificate\. If specified as true the "id\-ce\-basicConstraints"
    extension is added with the arguments of "critical" being true, "allowCA"
    being true, and caDepth being \-1 \(infinite\)\. The *extensions* argument is
    a list of extensions and their parameters that should be encoded into the
    created certificate\. Currently only one extension is understood
    \("id\-ce\-basicConstraints"\)\. It accepts three arguments *critical*
    *allowCA* *caDepth*\. The *critical* argument to this extension \(and
    any extension\) whether or not the validator should reject the certificate as
    invalid if it does not understand the extension \(if set to "true"\) or should
    ignore the extension \(if set to "false"\)\. The *allowCA* argument is used
    to specify as a boolean value whether or not we can be used a certificate
    authority \(CA\)\. The *caDepth* argument indicates how many children CAs can
    be children of this CA in a depth\-wise fashion\. A value of "0" for the
    *caDepth* argument means that this CA cannot sign a CA certificate and
    have the result be valid\. A value of "\-1" indicates infinite depth\.

# <a name='section3'></a>EXAMPLES





# <a name='section4'></a>REFERENCES

# <a name='section5'></a>AUTHORS

Roy Keene

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *rsa* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[aes\(n\)](\.\./aes/aes\.md), [blowfish\(n\)](\.\./blowfish/blowfish\.md),
[des\(n\)](\.\./des/des\.md), [md5\(n\)](\.\./md5/md5\.md),
[sha1\(n\)](\.\./sha1/sha1\.md)

# <a name='keywords'></a>KEYWORDS

[cipher](\.\./\.\./\.\./\.\./index\.md\#cipher), [data
integrity](\.\./\.\./\.\./\.\./index\.md\#data\_integrity),
[encryption](\.\./\.\./\.\./\.\./index\.md\#encryption), [public key
cipher](\.\./\.\./\.\./\.\./index\.md\#public\_key\_cipher),
[rsa](\.\./\.\./\.\./\.\./index\.md\#rsa),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2010, 2011, 2012, 2013, Roy Keene, Andreas Kupries
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pluginmgr/pluginmgr.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399

[//000000001]: # (pluginmgr \- Plugin management)
[//000000002]: # (Generated from file 'pluginmgr\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pluginmgr\(n\) 0\.3 tcllib "Plugin management")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pluginmgr \- Manage a plugin

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PUBLIC API](#section2)

      - [PACKAGE COMMANDS](#subsection1)

      - [OBJECT COMMAND](#subsection2)

      - [OBJECT METHODS](#subsection3)

      - [OBJECT CONFIGURATION](#subsection4)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require pluginmgr ?0\.3?  

[__::pluginmgr__ *objectName* ?*option value*\.\.\.?](#1)  
[__::pluginmgr::paths__ *objectName* *name*\.\.\.](#2)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#3)  
[*objectName* __clone__](#4)  
[*objectName* __configure__](#5)  
[*objectName* __configure__ *option*](#6)  
[*objectName* __configure__ __\-option__ *value*\.\.\.](#7)  
[*objectName* __cget__ __\-option__](#8)  
[*objectName* __destroy__](#9)  
[*objectName* __do__ *arg*\.\.\.](#10)  
[*objectName* __interpreter__](#11)  
[*objectName* __plugin__](#12)  
[*objectName* __load__ *string*](#13)  
[*objectName* __unload__](#14)  
[*objectName* __list__](#15)  
[*objectName* __path__ *path*](#16)  
[*objectName* __paths__](#17)  

# <a name='description'></a>DESCRIPTION

This package provides commands and objects for the generic management of plugins
which can be loaded into an application\.

To avoid the implementation of yet another system to locate Tcl code the system
provides by this package is built on top of the regular package management
system\. Each plugin is considered as a package and a simple invokation of
__package require__ is enough to locate and load it, if it exists\. The only
time we will need additional paths is when a plugin manager is part of a wrapped
application and has to be able to search for plugins existing outside of that
application\. For this situation the package provides a command to create a
general set of such paths based on names for the plugin manager and/or
application in question\.

The main contribution of this package is a generic framework which allows the
easy declaration of

  1. How to translate a plugin name to the name of the package implementing it,
     and vice versa\.

  1. The list of commands a plugin has to provide as API, and also of more
     complex checks as code\.

  1. The list of commands expected by the plugin from the environment\.

This then allows the easy generation of plugin managers customized to particular
types of plugins for an application\.

It should be noted that all plugin code is considered untrusted and will always
be executed within a safe interpreter\. The interpreter is enabled enough to
allow plugins the loading of all additional packages they may need\.

# <a name='section2'></a>PUBLIC API

## <a name='subsection1'></a>PACKAGE COMMANDS

  - <a name='1'></a>__::pluginmgr__ *objectName* ?*option value*\.\.\.?

    This command creates a new plugin manager object with an associated Tcl
    command whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [OBJECT COMMAND](#subsection2) and [OBJECT
    METHODS](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

    The options and their values coming after the name of the object are used to
    set the initial configuration of the mamager object, specifying the
    applicable plugins and their API\.

  - <a name='2'></a>__::pluginmgr::paths__ *objectName* *name*\.\.\.

    This utility command adds a set of paths to the specified object, based on
    the given *name*s\. It will search for:

      1. The environment variable __*name*\_PLUGINS__\. Its contents will be
         interpreted as a list of package paths\. The entries have to be
         separated by either __:__ \(unix\) or __;__ \(windows\)\.

         The name will be converted to upper\-case letters\.

      1. The registry entry "HKEY\_LOCAL\_MACHINE\\SOFTWARE\\*name*\\PLUGINS"\. Its
         contents will be interpreted as a list of package paths\. The entries
         have to be separated by __;__\. This item is considered only when on
         Windows \(tm\)\.

         The casing of letters is not changed\.

      1. The registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\*name*\\PLUGINS"\. Its
         contents will be interpreted as a list of package paths\. The entries
         have to be separated by __;__\. This item is considered only when on
         Windows \(tm\)\.

         The casing of letters is not changed\.

      1. The directory "~/\.*name*/plugin"\.

      1. The directory "~/\.*name*/plugins"\.

         The casing of letters is not changed\.

    and add all the paths found that way to the list of package paths maintained
    by the object\.

    If *name* is namespaced each item in the list will be repeated per prefix
    of *name*, with conversion of :\-sequences into the proper separator
    \(underscore for environment variables, backslash for registry entries, and /
    for directories\)\.

    Examples:

        ::pluginmgr::paths ::obj docidx

        => env  DOCIDX_PLUGINS
           reg  HKEY_LOCAL_MACHINE\SOFTWARE\docidx\PLUGINS
           reg  HKEY_CURRENT_USER\SOFTWARE\docidx\PLUGINS
           path ~/.docidx/plugins

        ::pluginmgr::paths ::obj doctools::idx

        => env  DOCTOOLS_PLUGINS
           env  DOCTOOLS_IDX_PLUGINS
           reg  HKEY_LOCAL_MACHINE\SOFTWARE\doctools\PLUGINS
           reg  HKEY_LOCAL_MACHINE\SOFTWARE\doctools\idx\PLUGINS
           reg  HKEY_CURRENT_USER\SOFTWARE\doctools\PLUGINS
           reg  HKEY_CURRENT_USER\SOFTWARE\doctools\idx\PLUGINS
           path ~/.doctools/plugin
           path ~/.doctools/idx/plugin

## <a name='subsection2'></a>OBJECT COMMAND

All commands created by the command __::pluginmgr__ \(See section [PACKAGE
COMMANDS](#subsection1)\) have the following general form and may be used to
invoke various operations on their plugin manager object\.

  - <a name='3'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [OBJECT METHODS](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>OBJECT METHODS

  - <a name='4'></a>*objectName* __clone__

    This method creates a new plugin management object and returns the
    associated object command\. The generated object is a clone of the object the
    method was invoked on\. I\.e\. the new object will have the same configuration
    as the current object\. With regard to state, if the current object has a
    plugin loaded then this plugin and all associated state is moved to the
    generated clone and the current object is reset into the base state \(no
    plugin loaded\)\. In this manner a configured plugin manager is also a factory
    for loaded plugins\.

  - <a name='5'></a>*objectName* __configure__

    The method returns a list of all known options and their current values when
    called without any arguments\.

  - <a name='6'></a>*objectName* __configure__ *option*

    The method behaves like the method __cget__ when called with a single
    argument and returns the value of the option specified by said argument\.

  - <a name='7'></a>*objectName* __configure__ __\-option__ *value*\.\.\.

    The method reconfigures the specified __option__s of the object, setting
    them to the associated *value*s, when called with an even number of
    arguments, at least two\.

    The legal options are described in the section [OBJECT
    CONFIGURATION](#subsection4)\.

  - <a name='8'></a>*objectName* __cget__ __\-option__

    This method expects a legal configuration option as argument and will return
    the current value of that option for the object the method was invoked for\.

    The legal configuration options are described in section [OBJECT
    CONFIGURATION](#subsection4)\.

  - <a name='9'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='10'></a>*objectName* __do__ *arg*\.\.\.

    This method interprets its list of arguments as the words of a command and
    invokes this command in the execution context of the plugin\. The result of
    the invoked command is made the result of the method\. The call will fail
    with an error if no valid plugin has been loaded into the manager object\.

  - <a name='11'></a>*objectName* __interpreter__

    This method returns the handle of the safe interpreter the current plugin is
    loaded into\. An empty string as return value signals that the manager
    currently has no valid plugin loaded\.

  - <a name='12'></a>*objectName* __plugin__

    This method returns the name of the plugin currently loaded\. An empty string
    as return value signals that the manager currently has no valid plugin
    loaded\.

  - <a name='13'></a>*objectName* __load__ *string*

    This method loads, validates, and initializes a named plugin into the
    manager object\.

    The algorithm to locate and load the plugin employed is:

      1. If the *string* contains the path to an existing file then this file
         is taken as the implementation of the plugin\.

      1. Otherwise the plugin name is translated into a package name via the
         value of the option __\-pattern__ and then loaded through the
         regular package management\.

      1. The load fails\.

    The algorithm to validate and initialize the loaded code is:

      1. If the option __\-api__ is non\-empty introspection commands are used
         to ascertain that the plugin provides the listed commands\.

      1. If the option __\-check__ is non\-empty the specified command prefix
         is called\.

      1. If either of the above fails the candidate plugin is unloaded again

      1. Otherwise all the commands specified via the option __\-cmds__ are
         installed in the plugin\.

    A previously loaded plugin is discarded, but only if the new plugin was
    found and sucessfully validated and initialized\. Note that there will be no
    intereference between old and new plugin as both will be put into separate
    safe interpreters\.

  - <a name='14'></a>*objectName* __unload__

    This method unloads the currently loaded plugin\. It returns the empty
    string\. The call will be silently ignored if no plugin is loaded at all\.

  - <a name='15'></a>*objectName* __list__

    This method uses the contents of the option __\-pattern__ to find all
    packages which can be plugins under the purview of this manager object\. It
    translates their names into plugin names and returns a list containing them\.

  - <a name='16'></a>*objectName* __path__ *path*

    This methods adds the specified *path* to the list of additional package
    paths to look at when searching for a plugin\. It returns the empty string\.
    Duplicate paths are ignored, i\.e\. each path is added only once\. Paths are
    made absolute, but are not normalized\.

  - <a name='17'></a>*objectName* __paths__

    This method returns a list containing all additional paths which have been
    added to the plugin manager object since its creation\.

## <a name='subsection4'></a>OBJECT CONFIGURATION

All plugin manager objects understand the following configuration options:

  - __\-pattern__ *string*

    The value of this option is a glob pattern which has to contain exactly one
    '\*'\-operator\. All packages whose names match this pattern are the plugins
    recognized by the manager object\. And vice versa, the replacement of the
    '\*'\-operator with a plugin name will yield the name of the package
    implementing that plugin\.

    This option has no default, except if option __\-name__ was set\. It has
    to be set before attempting to load a plugin, either directly, or through
    option __\-name__\.

  - __\-api__ *list*

    The value of this option is a list of command names, and any plugin loaded
    has to provide these commands\. Names which are not fully qualified are
    considered to be rooted in the global namespace\. If empty no expectations
    are made on the plugin\. The default value is the empty list\.

  - __\-check__ *cmdprefix*

    The value of this option is interpreted as a command prefix\. Its purpose is
    to perform complex checks on a loaded plugin package to validate it, which
    go beyond a simple list of provided commands\.

    It is called with the manager object command as the only argument and has to
    return a boolean value\. A value of __true__ will be interpreted to mean
    that the candidate plugin passed the test\. The call will happen if and only
    if the candidate plugin already passed the basic API check specified through
    the option __\-api__\.

    The default value is the empty list, which causes the manager object to
    suppress the call and to assume the candidate plugin passes\.

  - __\-cmds__ *dict*

    The value of this option is a dictionary\. It specifies the commands which
    will be made available to the plugin \(as keys\), and the trusted commands in
    the environment which implement them \(as values\)\. The trusted commands will
    be executed in the interpreter specified by the option __\-cmdip__\. The
    default value is the empty dictionary\.

  - __\-cmdip__ *ipspec*

    The value of this option is the path of the interpreter where the trusted
    commands given to the plugin will be executed in\. The default is the empty
    string, referring to the current interpreter\.

  - __\-setup__ *cmdprefix*

    The value of this option is interpreted as a command prefix\.

    It is called whenever a new safe interpreter for a plugin has been created,
    but before a plugin is loaded\. It is provided with the manager object
    command and the interpreter handle as its only arguments\. Any return value
    will be ignored\.

    Its purpose is give a user of the plugin management the ability to define
    commands, packages, etc\. a chosen plugin may need while being loaded\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pluginmgr* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[plugin management](\.\./\.\./\.\./\.\./index\.md\#plugin\_management), [plugin
search](\.\./\.\./\.\./\.\./index\.md\#plugin\_search)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/png/png.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217

[//000000001]: # (png \- Image manipulation)
[//000000002]: # (Generated from file 'png\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004, Code: Aaron Faupell <afaupell@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2004, Doc:  Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (png\(n\) 0\.3 tcllib "Image manipulation")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

png \- PNG querying and manipulation of meta data

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require crc32  
package require png ?0\.3?  

[__::png::validate__ *file*](#1)  
[__::png::isPNG__ *file*](#2)  
[__::png::imageInfo__ *file*](#3)  
[__::png::getTimestamp__ *file*](#4)  
[__::png::setTimestamp__ *file* *time*](#5)  
[__::png::getComments__ *file*](#6)  
[__::png::removeComments__ *file*](#7)  
[__::png::addComment__ *file* *keyword* *text*](#8)  
[__::png::addComment__ *file* *keyword* *lang* *keyword2* *text*](#9)  
[__::png::getPixelDimension__ *file*](#10)  
[__::png::image__ *file*](#11)  
[__::png::write__ *file* *data*](#12)  

# <a name='description'></a>DESCRIPTION

This package provides commands to query and modify PNG images\. PNG stands for
*Portable Network Graphics* and is specified at
[http://www\.libpng\.org/pub/png/spec/1\.2](http://www\.libpng\.org/pub/png/spec/1\.2)\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::png::validate__ *file*

    Returns a value indicating if *file* is a valid PNG file\. The file is
    checked for PNG signature, each chunks checksum is verified, existence of a
    data chunk is verified, first chunk is checked for header, last chunk is
    checked for ending\. Things *not* checked for are: validity of values
    within a chunk, multiple header chunks, noncontiguous data chunks, end chunk
    before actual eof\. This procedure can take lots of time\.

    Possible return values:

      * OK

        File is a valid PNG file\.

      * SIG

        no/broken PNG signature\.

      * BADLEN

        corrupt chunk length\.

      * EOF

        premature end of file\.

      * NOHDR

        missing header chunk\.

      * CKSUM

        crc mismatch\.

      * NODATA

        missing data chunk\(s\)\.

      * NOEND

        missing end marker\.

  - <a name='2'></a>__::png::isPNG__ *file*

    Returns a boolean value indicating if the file *file* starts with a PNG
    signature\. This is a much faster and less intensive check than
    __::png::validate__ as it does not check if the PNG data is valid\.

  - <a name='3'></a>__::png::imageInfo__ *file*

    Returns a dictionary with keys __width__, __height__, __depth__,
    __color__, __compression__, __filter__, and __interlace__\.
    The values are the associated properties of the PNG image in *file*\.
    Throws an error if file is not a PNG image, or if the checksum of the header
    is invalid\. For information on interpreting the values for the returned
    properties see
    [http://www\.libpng\.org/pub/png/spec/1\.2/PNG\-Chunks\.html](http://www\.libpng\.org/pub/png/spec/1\.2/PNG\-Chunks\.html)\.

  - <a name='4'></a>__::png::getTimestamp__ *file*

    Returns the epoch time if a timestamp chunk is found in the PNG image
    contained in the *file*, otherwise returns the empty string\. Does not
    attempt to verify the checksum of the timestamp chunk\. Throws an error if
    the *file* is not a valid PNG image\.

  - <a name='5'></a>__::png::setTimestamp__ *file* *time*

    Writes a new timestamp to the *file*, either replacing the old timestamp,
    or adding one just before the data chunks if there was no previous
    timestamp\. *time* is the new time in the gmt epoch format\. Throws an error
    if *file* is not a valid PNG image\.

  - <a name='6'></a>__::png::getComments__ *file*

    Currently supports only uncompressed comments\. Does not attempt to verify
    the checksums of the comment chunks\. Returns a list where each element is a
    comment\. Each comment is itself a list\. The list for a plain text comment
    consists of 2 elements: the human readable keyword, and the text data\. A
    unicode \(international\) comment consists of 4 elements: the human readable
    keyword, the language identifier, the translated keyword, and the unicode
    text data\. Throws an error if *file* is not a valid PNG image\.

  - <a name='7'></a>__::png::removeComments__ *file*

    Removes all comments from the PNG image in *file*\. Beware \- This uses
    memory equal to the file size minus comments, to hold the intermediate
    result\. Throws an error if *file* is not a valid PNG image\.

  - <a name='8'></a>__::png::addComment__ *file* *keyword* *text*

    Adds a plain *text* comment to the PNG image in *file*, just before the
    first data chunk\. Will throw an error if no data chunk is found\. *keyword*
    has to be less than 80 characters long to conform to the PNG specification\.

  - <a name='9'></a>__::png::addComment__ *file* *keyword* *lang* *keyword2* *text*

    Adds a unicode \(international\) comment to the PNG image in *file*, just
    before the first data chunk\. Will throw an error if no data chunk is found\.
    *keyword* has to be less than 80 characters long to conform to the PNG
    specification\. *keyword2* is the translated *keyword*, in the language
    specified by the language identifier *lang*\.

  - <a name='10'></a>__::png::getPixelDimension__ *file*

    Returns a dictionary with keys __ppux__, __ppuy__ and __unit__
    if the information is present\. Otherwise, it returns the empty string\.

    The values of __ppux__ and __ppuy__ return the pixel per unit value
    in X or Y direction\.

    The allowed values for key __unit__ are __meter__ and
    __unknown__\. In the case of meter, the dpi value can be calculated by
    multiplying with the conversion factor __0\.0254__\.

  - <a name='11'></a>__::png::image__ *file*

    Given a PNG file returns the image in the list of scanlines format used by
    Tk\_GetColor\.

  - <a name='12'></a>__::png::write__ *file* *data*

    Takes a list of scanlines in the Tk\_GetColor format and writes the
    represented image to *file*\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *png* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[comment](\.\./\.\./\.\./\.\./index\.md\#comment),
[image](\.\./\.\./\.\./\.\./index\.md\#image), [png](\.\./\.\./\.\./\.\./index\.md\#png),
[timestamp](\.\./\.\./\.\./\.\./index\.md\#timestamp)

# <a name='category'></a>CATEGORY

File formats

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004, Code: Aaron Faupell <afaupell@users\.sourceforge\.net>  
Copyright &copy; 2004, Doc:  Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pop3/pop3.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309

[//000000001]: # (pop3 \- Tcl POP3 Client Library)
[//000000002]: # (Generated from file 'pop3\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (pop3\(n\) 1\.9 tcllib "Tcl POP3 Client Library")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pop3 \- Tcl client for POP3 email protocol

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [TLS Security Considerations](#section2)

  - [API](#section3)

  - [Secure mail transfer](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require pop3 ?1\.9?  

[__::pop3::open__ ?__\-msex__ 0&#124;1? ?__\-retr\-mode__ retr&#124;list&#124;slow? ?__\-socketcmd__ cmdprefix? ?__\-stls__ 0&#124;1? ?__\-tls\-callback__ stls\-callback\-command? *host username password* ?*port*?](#1)  
[__::pop3::config__ *chan*](#2)  
[__::pop3::status__ *chan*](#3)  
[__::pop3::last__ *chan*](#4)  
[__::pop3::retrieve__ *chan startIndex* ?*endIndex*?](#5)  
[__::pop3::delete__ *chan startIndex* ?*endIndex*?](#6)  
[__::pop3::list__ *chan* ?*msg*?](#7)  
[__::pop3::top__ *chan* *msg* *n*](#8)  
[__::pop3::uidl__ *chan* ?*msg*?](#9)  
[__::pop3::capa__ *chan*](#10)  
[__::pop3::close__ *chan*](#11)  

# <a name='description'></a>DESCRIPTION

The __pop3__ package provides a simple Tcl\-only client library for the POP3
email protocol as specified in [RFC
1939](http://www\.rfc\-editor\.org/rfc/rfc1939\.txt)\. It works by opening the
standard POP3 socket on the server, transmitting the username and password, then
providing a Tcl API to access the POP3 protocol commands\. All server errors are
returned as Tcl errors \(thrown\) which must be caught with the Tcl __catch__
command\.

# <a name='section2'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section3'></a>API

  - <a name='1'></a>__::pop3::open__ ?__\-msex__ 0&#124;1? ?__\-retr\-mode__ retr&#124;list&#124;slow? ?__\-socketcmd__ cmdprefix? ?__\-stls__ 0&#124;1? ?__\-tls\-callback__ stls\-callback\-command? *host username password* ?*port*?

    Open a socket connection to the server specified by *host*, transmit the
    *username* and *password* as login information to the server\. The
    default port number is __110__, which can be overridden using the
    optional *port* argument\. The return value is a channel used by all of the
    other ::pop3 functions\.

    The command recognizes three options

      * __\-msex__ boolean

        Setting this option tells the package that the server we are talking to
        is an MS Exchange server \(which has some oddities we have to work
        around\)\. The default is __False__\.

      * __\-retr\-mode__ retr&#124;list&#124;slow

        The retrieval mode determines how exactly messages are read from the
        server\. The allowed values are __retr__, __list__ and
        __slow__\. The default is __retr__\. See __::pop3::retrieve__
        for more information\.

      * __\-socketcmd__ cmdprefix

        This option allows the user to overide the use of the builtin
        __[socket](\.\./\.\./\.\./\.\./index\.md\#socket)__ command with any
        API\-compatible command\. The envisioned main use is the securing of the
        new connection via SSL, through the specification of the command
        __tls::socket__\. This command is specially recognized as well,
        changing the default port of the connection to __995__\.

      * __\-stls__ boolean

        Setting this option tells the package to secure the connection using SSL
        or TLS\. It performs STARTTLS as described in IETF RFC 2595, it first
        opens a normal, unencrypted connection and then negotiates a SSLv3 or
        TLSv1 connection\. If the connection cannot be secured, the connection
        will be closed and an error will be returned

      * __\-tls\-callback__ stls\-callback\-command

        This option allows the user to overide the __tls::callback__ used
        during the __\-stls__ SSL/TLS handshake\. See the TLS manual for
        details on how to implement this callback\.

  - <a name='2'></a>__::pop3::config__ *chan*

    Returns the configuration of the pop3 connection identified by the channel
    handle *chan* as a serialized array\.

  - <a name='3'></a>__::pop3::status__ *chan*

    Query the server for the status of the mail spool\. The status is returned as
    a list containing two elements, the first is the number of email messages on
    the server and the second is the size \(in octets, 8 bit blocks\) of the
    entire mail spool\.

  - <a name='4'></a>__::pop3::last__ *chan*

    Query the server for the last email message read from the spool\. This value
    includes all messages read from all clients connecting to the login account\.
    This command may not be supported by the email server, in which case the
    server may return 0 or an error\.

  - <a name='5'></a>__::pop3::retrieve__ *chan startIndex* ?*endIndex*?

    Retrieve a range of messages from the server\. If the *endIndex* is not
    specified, only one message will be retrieved\. The return value is a list
    containing each message as a separate element\. See the *startIndex* and
    *endIndex* descriptions below\.

    The retrieval mode determines how exactly messages are read from the server\.
    The mode __retr__ assumes that the RETR command delivers the size of the
    message as part of the command status and uses this to read the message
    efficiently\. In mode __list__ RETR does not deliver the size, but the
    LIST command does and we use this to retrieve the message size before the
    actual retrieval, which can then be done efficiently\. In the last mode,
    __slow__, the system is unable to obtain the size of the message to
    retrieve in any manner and falls back to reading the message from the server
    line by line\.

    It should also be noted that the system checks upon the configured mode and
    falls back to the slower modes if the above assumptions are not true\.

  - <a name='6'></a>__::pop3::delete__ *chan startIndex* ?*endIndex*?

    Delete a range of messages from the server\. If the *endIndex* is not
    specified, only one message will be deleted\. Note, the indices are not
    reordered on the server, so if you delete message 1, then the first message
    in the queue is message 2 \(message index 1 is no longer valid\)\. See the
    *startIndex* and *endIndex* descriptions below\.

      * *startIndex*

        The *startIndex* may be an index of a specific message starting with
        the index 1, or it have any of the following values:

          + __start__

            This is a logical value for the first message in the spool,
            equivalent to the value 1\.

          + __next__

            The message immediately following the last message read, see
            __::pop3::last__\.

          + __end__

            The most recent message in the spool \(the end of the spool\)\. This is
            useful to retrieve only the most recent message\.

      * *endIndex*

        The *endIndex* is an optional parameter and defaults to the value
        "\-1", which indicates to only retrieve the one message specified by
        *startIndex*\. If specified, it may be an index of a specific message
        starting with the index "1", or it may have any of the following values:

          + __last__

            The message is the last message read by a POP3 client, see
            __::pop3::last__\.

          + __end__

            The most recent message in the spool \(the end of the spool\)\.

  - <a name='7'></a>__::pop3::list__ *chan* ?*msg*?

    Returns the scan listing of the mailbox\. If parameter *msg* is given, then
    the listing only for that message is returned\.

  - <a name='8'></a>__::pop3::top__ *chan* *msg* *n*

    Optional POP3 command, not all servers may support this\. __::pop3::top__
    retrieves headers of a message, specified by parameter *msg*, and number
    of *n* lines from the message body\.

  - <a name='9'></a>__::pop3::uidl__ *chan* ?*msg*?

    Optional POP3 command, not all servers may support this\.
    __::pop3::uidl__ returns the uid listing of the mailbox\. If the
    parameter *msg* is specified, then the listing only for that message is
    returned\.

  - <a name='10'></a>__::pop3::capa__ *chan*

    Optional POP3 command, not all servers may support this\.
    __::pop3::capa__ returns a list of the capabilities of the server\. TOP,
    SASL, UIDL, LOGIN\-DELAY and STLS are typical capabilities\. See IETF RFC
    2449\.

  - <a name='11'></a>__::pop3::close__ *chan*

    Gracefully close the connect after sending a POP3 QUIT command down the
    socket\.

# <a name='section4'></a>Secure mail transfer

A pop3 connection can be secured with SSL/TLS by requiring the package
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ and then using either the option
__\-socketcmd__ or the option __\-stls__ of the command
__pop3::open__\. The first method, option __\-socketcmd__, will force the
use of the __tls::socket__ command when opening the connection\. This is
suitable for POP3 servers which expect SSL connections only\. These will
generally be listening on port 995\.

    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...

    # Create secured pop3 channel
    pop3::open -socketcmd tls::socket \
    	$thehost $theuser $thepassword

    ...

The second method, option __\-stls__, will connect to the standard POP3 port
and then perform an STARTTLS handshake\. This will only work for POP3 servers
which have this capability\. The package will confirm that the server supports
STARTTLS and the handshake was performed correctly before proceeding with
authentication\.

    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...

    # Create secured pop3 channel
    pop3::open -stls 1 \
    	$thehost $theuser $thepassword

    ...

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pop3* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[email](\.\./\.\./\.\./\.\./index\.md\#email), [mail](\.\./\.\./\.\./\.\./index\.md\#mail),
[pop](\.\./\.\./\.\./\.\./index\.md\#pop), [pop3](\.\./\.\./\.\./\.\./index\.md\#pop3),
[rfc 1939](\.\./\.\./\.\./\.\./index\.md\#rfc\_1939),
[secure](\.\./\.\./\.\./\.\./index\.md\#secure), [ssl](\.\./\.\./\.\./\.\./index\.md\#ssl),
[tls](\.\./\.\./\.\./\.\./index\.md\#tls)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pop3d/pop3d.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309

[//000000001]: # (pop3d \- Tcl POP3 Server Package)
[//000000002]: # (Generated from file 'pop3d\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2005 Reinhard Max  <max@suse\.de>)
[//000000005]: # (pop3d\(n\) 1\.1\.0 tcllib "Tcl POP3 Server Package")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pop3d \- Tcl POP3 server implementation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Options](#section2)

  - [Authentication](#section3)

  - [Mailboxes](#section4)

  - [Secure mail transfer](#section5)

  - [References](#section6)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require pop3d ?1\.1\.0?  

[__::pop3d::new__ ?*serverName*?](#1)  
[__serverName__ *option* ?*arg arg \.\.\.*?](#2)  
[*serverName* __up__](#3)  
[*serverName* __down__](#4)  
[*serverName* __destroy__ ?*mode*?](#5)  
[*serverName* __configure__](#6)  
[*serverName* __configure__ *\-option*](#7)  
[*serverName* __configure__ *\-option value*\.\.\.](#8)  
[*serverName* __cget__ *\-option*](#9)  
[*serverName* __conn__ list](#10)  
[*serverName* __conn__ state *id*](#11)  
[*authCmd* __exists__ *name*](#12)  
[*authCmd* __lookup__ *name*](#13)  
[*storageCmd* __dele__ *mbox* *msgList*](#14)  
[*storageCmd* __lock__ *mbox*](#15)  
[*storageCmd* __unlock__ *mbox*](#16)  
[*storageCmd* __size__ *mbox* ?*msgId*?](#17)  
[*storageCmd* __stat__ *mbox*](#18)  
[*storageCmd* __get__ *mbox* *msgId*](#19)  

# <a name='description'></a>DESCRIPTION

  - <a name='1'></a>__::pop3d::new__ ?*serverName*?

    This command creates a new server object with an associated global Tcl
    command whose name is *serverName*\.

The command __serverName__ may be used to invoke various operations on the
server\. It has the following general form:

  - <a name='2'></a>__serverName__ *option* ?*arg arg \.\.\.*?

    *Option* and the *arg*s determine the exact behavior of the command\.

A pop3 server can be started on any port the caller has permission for from the
operating system\. The default port will be 110, which is the port defined by the
standard specified in RFC 1939
\([http://www\.rfc\-editor\.org/rfc/rfc1939\.txt](http://www\.rfc\-editor\.org/rfc/rfc1939\.txt)\)\.
After creating, configuring and starting a the server object will listen for and
accept connections on that port and handle them according to the POP3 protocol\.

*Note:* The server provided by this module will handle only the basic protocol
by itself\. For the higher levels of user authentication and handling of the
actual mailbox contents callbacks will be invoked\.

The following commands are possible for server objects:

  - <a name='3'></a>*serverName* __up__

    After this call the server will listen for connections on its configured
    port\.

  - <a name='4'></a>*serverName* __down__

    After this call the server will stop listening for connections\. This does
    not affect existing connections\.

  - <a name='5'></a>*serverName* __destroy__ ?*mode*?

    Destroys the server object\. Currently open connections are handled depending
    on the chosen mode\. The provided *mode*s are:

      * __kill__

        Destroys the server immediately, and forcefully closes all currently
        open connections\. This is the default mode\.

      * __defer__

        Stops the server from accepting new connections and will actually
        destroy it only after the last of the currently open connections for the
        server is closed\.

  - <a name='6'></a>*serverName* __configure__

    Returns a list containing all options and their current values in a format
    suitable for use by the command __array set__\. The options themselves
    are described in section [Options](#section2)\.

  - <a name='7'></a>*serverName* __configure__ *\-option*

    Returns the current value of the specified option\. This is an alias for the
    method __cget__\. The options themselves are described in section
    [Options](#section2)\.

  - <a name='8'></a>*serverName* __configure__ *\-option value*\.\.\.

    Sets the specified option to the provided value\. The options themselves are
    described in section [Options](#section2)\.

  - <a name='9'></a>*serverName* __cget__ *\-option*

    Returns the current value of the specified option\. The options themselves
    are described in section [Options](#section2)\.

  - <a name='10'></a>*serverName* __conn__ list

    Returns a list containing the ids of all connections currently open\.

  - <a name='11'></a>*serverName* __conn__ state *id*

    Returns a list suitable for \[__array set__\] containing the state of the
    connection referenced by *id*\.

# <a name='section2'></a>Options

The following options are available to pop3 server objects\.

  - __\-port__ *port*

    Defines the *port* to listen on for new connections\. Default is 110\. This
    option is a bit special\. If *port* is set to "0" the server, or rather the
    operating system, will select a free port on its own\. When querying
    __\-port__ the id of this chosen port will be returned\. Changing the port
    while the server is up will neither change the returned value, nor will it
    change on which port the server is listening on\. Only after resetting the
    server via a call to __down__ followed by a call to __up__ will the
    new port take effect\. It is at that time that the value returned when
    querying __\-port__ will change too\.

  - __\-auth__ *command*

    Defines a *command* prefix to call whenever the authentication of a user
    is required\. If no such command is specified the server will reject all
    users\. The interface which has to be provided by the command prefix is
    described in section [Authentication](#section3)\.

  - __\-storage__ *command*

    Defines a *command* prefix to call whenever the handling of mailbox
    contents is required\. If no such command is specified the server will claim
    that all mailboxes are empty\. The interface which has to be provided by the
    command prefix is described in section [Mailboxes](#section4)\.

  - __\-socket__ *command*

    Defines a *command* prefix to call for opening the listening socket\. This
    can be used to make the pop3 server listen on a SSL socket as provided by
    the __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__ package, see the command
    __tls::socket__\.

# <a name='section3'></a>Authentication

Here we describe the interface which has to be provided by the authentication
callback so that pop3 servers following the interface of this module are able to
use it\.

  - <a name='12'></a>*authCmd* __exists__ *name*

    This method is given a user*name* and has to return a boolean value
    telling whether or not the specified user exists\.

  - <a name='13'></a>*authCmd* __lookup__ *name*

    This method is given a user*name* and has to return a two\-element list
    containing the password for this user and a storage reference, in this
    order\.

    The storage reference is passed unchanged to the storage callback, see
    sections [Options](#section2) and [Mailboxes](#section4) for
    either the option defining it and or the interface to provide, respectively\.

# <a name='section4'></a>Mailboxes

Here we describe the interface which has to be provided by the storage callback
so that pop3 servers following the interface of this module are able to use it\.
The *mbox* argument is the storage reference as returned by the __lookup__
method of the authentication command, see section
[Authentication](#section3)\.

  - <a name='14'></a>*storageCmd* __dele__ *mbox* *msgList*

    Deletes the messages whose numeric ids are contained in the *msgList* from
    the mailbox specified via *mbox*\.

  - <a name='15'></a>*storageCmd* __lock__ *mbox*

    This method locks the specified mailbox for use by a single connection to
    the server\. This is necessary to prevent havoc if several connections to the
    same mailbox are open\. The complementary method is __unlock__\. The
    command will return true if the lock could be set successfully or false if
    not\.

  - <a name='16'></a>*storageCmd* __unlock__ *mbox*

    This is the complementary method to __lock__, it revokes the lock on the
    specified mailbox\.

  - <a name='17'></a>*storageCmd* __size__ *mbox* ?*msgId*?

    Determines the size of the message specified through its id in *msgId*, in
    bytes, and returns this number\. The command will return the size of the
    whole maildrop if no message id was specified\.

  - <a name='18'></a>*storageCmd* __stat__ *mbox*

    Determines the number of messages in the specified mailbox and returns this
    number\.

  - <a name='19'></a>*storageCmd* __get__ *mbox* *msgId*

    Returns a handle for the specified message\. This handle is a mime token
    following the interface described in the documentation of package
    __[mime](\.\./mime/mime\.md)__\. The pop3 server will use the
    functionality of the mime token to send the mail to the requestor at the
    other end of a pop3 connection\.

# <a name='section5'></a>Secure mail transfer

The option __\-socket__ \(see [Options](#section2)\) enables users of the
package to override how the server opens its listening socket\. The envisioned
main use is the specification of the __tls::socket__ command, see package
__[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__, to secure the communication\.

    package require tls
    tls::init \
    	...

    pop3d::new S -socket tls::socket
    ...

# <a name='section6'></a>References

  1. [RFC 1939](http://www\.rfc\-editor\.org/rfc/rfc1939\.txt)

  1. [RFC 2449](http://www\.rfc\-editor\.org/rfc/rfc2449\.txt)

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pop3d* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[network](\.\./\.\./\.\./\.\./index\.md\#network),
[pop3](\.\./\.\./\.\./\.\./index\.md\#pop3),
[protocol](\.\./\.\./\.\./\.\./index\.md\#protocol), [rfc
1939](\.\./\.\./\.\./\.\./index\.md\#rfc\_1939),
[secure](\.\./\.\./\.\./\.\./index\.md\#secure), [ssl](\.\./\.\./\.\./\.\./index\.md\#ssl),
[tls](\.\./\.\./\.\./\.\./index\.md\#tls)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>  
Copyright &copy; 2005 Reinhard Max  <max@suse\.de>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pop3d/pop3d_dbox.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201

[//000000001]: # (pop3d::dbox \- Tcl POP3 Server Package)
[//000000002]: # (Generated from file 'pop3d\_dbox\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pop3d::dbox\(n\) 1\.0\.2 tcllib "Tcl POP3 Server Package")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pop3d::dbox \- Simple mailbox database for pop3d

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require pop3d::dbox ?1\.0\.2?  

[__::pop3d::dbox::new__ ?*dbName*?](#1)  
[__dbName__ *option* ?*arg arg \.\.\.*?](#2)  
[*dbName* __destroy__](#3)  
[*dbName* __base__ *base*](#4)  
[*dbName* __add__ *mbox*](#5)  
[*dbName* __remove__ *mbox*](#6)  
[*dbName* __move__ *old new*](#7)  
[*dbName* __list__](#8)  
[*dbName* __exists__ *mbox*](#9)  
[*dbName* __locked__ *mbox*](#10)  
[*dbName* __lock__ *mbox*](#11)  
[*dbName* __unlock__ *mbox*](#12)  
[*dbName* __stat__ *mbox*](#13)  
[*dbName* __size__ *mbox* ?*msgId*?](#14)  
[*dbName* __dele__ *mbox msgList*](#15)  
[*storageCmd* __get__ *mbox* *msgId*](#16)  

# <a name='description'></a>DESCRIPTION

The package __pop3d::dbox__ provides simple/basic mailbox management
facilities\. Each mailbox object manages a single base directory whose
subdirectories represent the managed mailboxes\. Mails in a mailbox are
represented by files in a mailbox directory, where each of these files contains
a single mail, both headers and body, in RFC 822
\([http://www\.rfc\-editor\.org/rfc/rfc822\.txt](http://www\.rfc\-editor\.org/rfc/rfc822\.txt)\)
conformant format\.

Any mailbox object following the interface described below can be used in
conjunction with the pop3 server core provided by the package
__[pop3d](pop3d\.md)__\. It is especially possible to directly use the
objects created by this package in the storage callback of pop3 servers
following the same interface as servers created by the package
__[pop3d](pop3d\.md)__\.

  - <a name='1'></a>__::pop3d::dbox::new__ ?*dbName*?

    This command creates a new database object with an associated global Tcl
    command whose name is *dbName*\.

The command __dbName__ may be used to invoke various operations on the
database\. It has the following general form:

  - <a name='2'></a>__dbName__ *option* ?*arg arg \.\.\.*?

    *Option* and the *arg*s determine the exact behavior of the command\.

The following commands are possible for database objects:

  - <a name='3'></a>*dbName* __destroy__

    Destroys the mailbox database and all transient data\. The directory
    associated with the object is not destroyed\.

  - <a name='4'></a>*dbName* __base__ *base*

    Defines the base directory containing the mailboxes to manage\. If this
    method is not called none of the following methods will work\.

  - <a name='5'></a>*dbName* __add__ *mbox*

    Adds a mailbox of name *mbox* to the database\. The name must be a valid
    path component\.

  - <a name='6'></a>*dbName* __remove__ *mbox*

    Removes the mailbox specified through *mbox*, and the mails contained
    therein, from the database\. This method will fail if the specified mailbox
    is locked\.

  - <a name='7'></a>*dbName* __move__ *old new*

    Changes the name of the mailbox *old* to *new*\.

  - <a name='8'></a>*dbName* __list__

    Returns a list containing the names of all mailboxes in the directory
    associated with the database\.

  - <a name='9'></a>*dbName* __exists__ *mbox*

    Returns true if the mailbox with name *mbox* exists in the database, or
    false if not\.

  - <a name='10'></a>*dbName* __locked__ *mbox*

    Checks if the mailbox specified through *mbox* is currently locked\.

  - <a name='11'></a>*dbName* __lock__ *mbox*

    This method locks the specified mailbox for use by a single connection to
    the server\. This is necessary to prevent havoc if several connections to the
    same mailbox are open\. The complementary method is __unlock__\. The
    command will return true if the lock could be set successfully or false if
    not\.

  - <a name='12'></a>*dbName* __unlock__ *mbox*

    This is the complementary method to __lock__, it revokes the lock on the
    specified mailbox\.

  - <a name='13'></a>*dbName* __stat__ *mbox*

    Determines the number of messages in the specified mailbox and returns this
    number\. This method fails if the mailbox *mbox* is not locked\.

  - <a name='14'></a>*dbName* __size__ *mbox* ?*msgId*?

    Determines the size of the message specified through its id in *msgId*, in
    bytes, and returns this number\. The command will return the size of the
    whole maildrop if no message id was specified\. If specified the *msgId*
    has to be in the range "1 \.\.\. \[*dbName* __stat__\]" or this call will
    fail\. If __stat__ was not called before this call, __size__ will
    assume that there are zero messages in the mailbox\.

  - <a name='15'></a>*dbName* __dele__ *mbox msgList*

    Deletes the messages whose numeric ids are contained in the *msgList* from
    the mailbox specified via *mbox*\. The *msgList* must not be empty or
    this call will fail\. The numeric ids in *msgList* have to be in the range
    "1 \.\.\. \[*dbName* __stat__\]" or this call will fail\. If __stat__
    was not called before this call, __dele__ will assume that there are
    zero messages in the mailbox\.

  - <a name='16'></a>*storageCmd* __get__ *mbox* *msgId*

    Returns a handle for the specified message\. This handle is a mime token
    following the interface described in the documentation of package
    __[mime](\.\./mime/mime\.md)__\. The token is *read\-only*\. In other
    words, the caller is allowed to do anything with the token except to modify
    it\. The *msgId* has to be in the range "1 \.\.\. \[*dbName* __stat__\]"
    or this call will fail\. If __stat__ was not called before this call,
    __get__ will assume that there are zero messages in the mailbox\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pop3d* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[network](\.\./\.\./\.\./\.\./index\.md\#network),
[pop3](\.\./\.\./\.\./\.\./index\.md\#pop3),
[protocol](\.\./\.\./\.\./\.\./index\.md\#protocol), [rfc
822](\.\./\.\./\.\./\.\./index\.md\#rfc\_822)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pop3d/pop3d_udb.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

[//000000001]: # (pop3d::udb \- Tcl POP3 Server Package)
[//000000002]: # (Generated from file 'pop3d\_udb\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pop3d::udb\(n\) 1\.0\.1 tcllib "Tcl POP3 Server Package")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pop3d::udb \- Simple user database for pop3d

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require pop3d::udb ?1\.0\.1?  

[__::pop3d::udb::new__ ?*dbName*?](#1)  
[__dbName__ *option* ?*arg arg \.\.\.*?](#2)  
[*dbName* __destroy__](#3)  
[*dbName* __add__ *user pwd storage*](#4)  
[*dbName* __remove__ *user*](#5)  
[*dbName* __rename__ *user newName*](#6)  
[*dbName* __lookup__ *user*](#7)  
[*dbName* __exists__ *user*](#8)  
[*dbName* __who__](#9)  
[*dbName* __save__ ?*file*?](#10)  
[*dbName* __read__ *file*](#11)  

# <a name='description'></a>DESCRIPTION

The package __pop3d::udb__ provides simple in memory databases which can be
used in conjunction with the pop3 server core provided by the package
__[pop3d](pop3d\.md)__\. The databases will use the names of users as keys
and associates passwords and storage references with them\.

Objects created by this package can be directly used in the authentication
callback of pop3 servers following the same interface as servers created by the
package __[pop3d](pop3d\.md)__\.

  - <a name='1'></a>__::pop3d::udb::new__ ?*dbName*?

    This command creates a new database object with an associated global Tcl
    command whose name is *dbName*\.

The command __dbName__ may be used to invoke various operations on the
database\. It has the following general form:

  - <a name='2'></a>__dbName__ *option* ?*arg arg \.\.\.*?

    *Option* and the *arg*s determine the exact behavior of the command\.

The following commands are possible for database objects:

  - <a name='3'></a>*dbName* __destroy__

    Destroys the database object\.

  - <a name='4'></a>*dbName* __add__ *user pwd storage*

    Add a new user or changes the data of an existing user\. Stores *password*
    and *storage* reference for the given *user*\.

  - <a name='5'></a>*dbName* __remove__ *user*

    Removes the specified *user* from the database\.

  - <a name='6'></a>*dbName* __rename__ *user newName*

    Changes the name of the specified *user* to *newName*\.

  - <a name='7'></a>*dbName* __lookup__ *user*

    Searches the database for the specified *user* and returns a two\-element
    list containing the associated password and storage reference, in this
    order\. Throws an error if the user could not be found\. This is the interface
    as expected by the authentication callback of package
    __[pop3d](pop3d\.md)__\.

  - <a name='8'></a>*dbName* __exists__ *user*

    Returns true if the specified *user* is known to the database, else false\.

  - <a name='9'></a>*dbName* __who__

    Returns a list of users known to the database\.

  - <a name='10'></a>*dbName* __save__ ?*file*?

    Saves the contents of the database into the given *file*\. If the file is
    not specified the system will use the path last used in a call to *dbName*
    __read__\. The generated file can be read by the __read__ method\.

  - <a name='11'></a>*dbName* __read__ *file*

    Reads the specified *file* and adds the contained user definitions to the
    database\. As the file is actually
    __[source](\.\./\.\./\.\./\.\./index\.md\#source)__'d a safe interpreter is
    employed to safeguard against malicious code\. This interpreter knows the
    __add__ command for adding users and their associated data to this
    database\. This command has the same argument signature as the method
    __add__\. The path of the *file* is remembered internally so that it
    can be used in the next call of *dbName* __save__ without an argument\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pop3d* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[network](\.\./\.\./\.\./\.\./index\.md\#network),
[pop3](\.\./\.\./\.\./\.\./index\.md\#pop3),
[protocol](\.\./\.\./\.\./\.\./index\.md\#protocol)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































Deleted embedded/md/tcllib/files/modules/practcl/practcl.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744

[//000000001]: # (practcl \- The The Proper Rational API for C to Tool Command Language Module)
[//000000002]: # (Generated from file 'practcl\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2016\-2018 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (practcl\(n\) 0\.16\.4 tcllib "The The Proper Rational API for C to Tool Command Language Module")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

practcl \- The Practcl Module

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [Classes](#section3)

      - [Class practcl::doctool](#subsection1)

      - [Class practcl::metaclass](#subsection2)

      - [Class practcl::toolset](#subsection3)

      - [Class practcl::toolset\.gcc](#subsection4)

      - [Class practcl::toolset\.msvc](#subsection5)

      - [Class practcl::make\_obj](#subsection6)

      - [Class practcl::object](#subsection7)

      - [Class practcl::dynamic](#subsection8)

      - [Class practcl::product](#subsection9)

      - [Class practcl::product\.cheader](#subsection10)

      - [Class practcl::product\.csource](#subsection11)

      - [Class practcl::product\.clibrary](#subsection12)

      - [Class practcl::product\.dynamic](#subsection13)

      - [Class practcl::product\.critcl](#subsection14)

      - [Class practcl::module](#subsection15)

      - [Class practcl::project](#subsection16)

      - [Class practcl::library](#subsection17)

      - [Class practcl::tclkit](#subsection18)

      - [Class practcl::distribution](#subsection19)

      - [Class practcl::distribution\.snapshot](#subsection20)

      - [Class practcl::distribution\.fossil](#subsection21)

      - [Class practcl::distribution\.git](#subsection22)

      - [Class practcl::subproject](#subsection23)

      - [Class practcl::subproject\.source](#subsection24)

      - [Class practcl::subproject\.teapot](#subsection25)

      - [Class practcl::subproject\.kettle](#subsection26)

      - [Class practcl::subproject\.critcl](#subsection27)

      - [Class practcl::subproject\.sak](#subsection28)

      - [Class practcl::subproject\.practcl](#subsection29)

      - [Class practcl::subproject\.binary](#subsection30)

      - [Class practcl::subproject\.tea](#subsection31)

      - [Class practcl::subproject\.library](#subsection32)

      - [Class practcl::subproject\.external](#subsection33)

      - [Class practcl::subproject\.core](#subsection34)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require TclOO 1\.0  

[proc __practcl::cat__ *fname*](#1)  
[proc __practcl::docstrip__ *text*](#2)  
[proc __putb__ ?*map*? *text*](#3)  
[proc __[Proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ *name* *arglist* *body*](#4)  
[proc __noop__ ?*args*?](#5)  
[proc __practcl::debug__ ?*args*?](#6)  
[proc __practcl::doexec__ ?*args*?](#7)  
[proc __practcl::doexec\_in__ *path* ?*args*?](#8)  
[proc __practcl::dotclexec__ ?*args*?](#9)  
[proc __practcl::domake__ *path* ?*args*?](#10)  
[proc __practcl::domake\.tcl__ *path* ?*args*?](#11)  
[proc __practcl::fossil__ *path* ?*args*?](#12)  
[proc __practcl::fossil\_status__ *dir*](#13)  
[proc __practcl::os__](#14)  
[proc __practcl::mkzip__ *exename* *barekit* *vfspath*](#15)  
[proc __practcl::sort\_dict__ *list*](#16)  
[proc __practcl::local\_os__](#17)  
[proc __practcl::config\.tcl__ *path*](#18)  
[proc __practcl::read\_configuration__ *path*](#19)  
[proc __practcl::tcllib\_require__ *pkg* ?*args*?](#20)  
[proc __practcl::platform::tcl\_core\_options__ *os*](#21)  
[proc __practcl::platform::tk\_core\_options__ *os*](#22)  
[proc __practcl::read\_rc\_file__ *filename* ?*localdat* ____?](#23)  
[proc __practcl::read\_sh\_subst__ *line* *info*](#24)  
[proc __practcl::read\_sh\_file__ *filename* ?*localdat* ____?](#25)  
[proc __practcl::read\_Config\.sh__ *filename*](#26)  
[proc __practcl::read\_Makefile__ *filename*](#27)  
[proc __practcl::cputs__ *varname* ?*args*?](#28)  
[proc __practcl::tcl\_to\_c__ *body*](#29)  
[proc __practcl::\_tagblock__ *text* ?*style* __tcl__? ?*note* ____?](#30)  
[proc __practcl::de\_shell__ *data*](#31)  
[proc __practcl::grep__ *pattern* ?*files* ____?](#32)  
[proc __practcl::file\_lexnormalize__ *sp*](#33)  
[proc __practcl::file\_relative__ *base* *dst*](#34)  
[proc __practcl::findByPattern__ *basedir* *patterns*](#35)  
[proc __practcl::log__ *fname* *comment*](#36)  
[proc __practcl::\_pkgindex\_simpleIndex__ *path*](#37)  
[proc __practcl::\_pkgindex\_directory__ *path*](#38)  
[proc __practcl::\_pkgindex\_path\_subdir__ *path*](#39)  
[proc __practcl::pkgindex\_path__ ?*args*?](#40)  
[proc __practcl::installDir__ *d1* *d2*](#41)  
[proc __practcl::copyDir__ *d1* *d2* ?*toplevel* __1__?](#42)  
[proc __practcl::buildModule__ *modpath*](#43)  
[proc __practcl::installModule__ *modpath* *DEST*](#44)  
[proc __practcl::trigger__ ?*args*?](#45)  
[proc __practcl::depends__ ?*args*?](#46)  
[proc __practcl::target__ *name* *info* ?*action* ____?](#47)  
[method __constructor__](#48)  
[method __argspec__ *argspec*](#49)  
[method __[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ *block*](#50)  
[method __keyword\.Annotation__ *resultvar* *commentblock* *type* *name* *body*](#51)  
[method __keyword\.Class__ *resultvar* *commentblock* *name* *body*](#52)  
[method __keyword\.class__ *resultvar* *commentblock* *name* *body*](#53)  
[method __keyword\.Class\_Method__ *resultvar* *commentblock* *name* ?*args*?](#54)  
[method __keyword\.method__ *resultvar* *commentblock* *name* ?*args*?](#55)  
[method __keyword\.proc__ *commentblock* *name* *argspec*](#56)  
[method __reset__](#57)  
[method __Main__](#58)  
[method __section\.method__ *keyword* *method* *minfo*](#59)  
[method __section\.annotation__ *type* *name* *iinfo*](#60)  
[method __section\.class__ *class\_name* *class\_info*](#61)  
[method __section\.command__ *procinfo*](#62)  
[method __[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage)__ ?__header *value*__? ?__footer *value*__? ?__authors *list*__?](#63)  
[method __scan\_text__ *text*](#64)  
[method __scan\_file__ *filename*](#65)  
[method __\_MorphPatterns__](#66)  
[method __[define](\.\./\.\./\.\./\.\./index\.md\#define)__ *submethod* ?*args*?](#67)  
[method __graft__ ?*args*?](#68)  
[method __initialize__](#69)  
[method __link__ *command* ?*args*?](#70)  
[method __morph__ *classname*](#71)  
[method __script__ *script*](#72)  
[method __select__](#73)  
[method __[source](\.\./\.\./\.\./\.\./index\.md\#source)__ *filename*](#74)  
[classmethod __select__ *object*](#75)  
[method __config\.sh__](#76)  
[method __BuildDir__ *PWD*](#77)  
[method __MakeDir__ *srcdir*](#78)  
[method __read\_configuration__](#79)  
[method __build\-cflags__ *PROJECT* *DEFS* *namevar* *versionvar* *defsvar*](#80)  
[method __critcl__ ?*args*?](#81)  
[method __Autoconf__](#82)  
[method __BuildDir__ *PWD*](#83)  
[method __ConfigureOpts__](#84)  
[method __MakeDir__ *srcdir*](#85)  
[method __make \{\} autodetect__](#86)  
[method __make \{\} clean__](#87)  
[method __make \{\} compile__](#88)  
[method __make \{\} install__ *DEST*](#89)  
[method __build\-compile\-sources__ *PROJECT* *COMPILE* *CPPCOMPILE* *INCLUDES*](#90)  
[method __build\-Makefile__ *path* *PROJECT*](#91)  
[method __build\-library__ *outfile* *PROJECT*](#92)  
[method __build\-tclsh__ *outfile* *PROJECT* ?*path* __auto__?](#93)  
[method __BuildDir__ *PWD*](#94)  
[method __make \{\} autodetect__](#95)  
[method __make \{\} clean__](#96)  
[method __make \{\} compile__](#97)  
[method __make \{\} install__ *DEST*](#98)  
[method __MakeDir__ *srcdir*](#99)  
[method __NmakeOpts__](#100)  
[method __constructor__ *module\_object* *name* *info* ?*action\_body* ____?](#101)  
[method __[do](\.\./\.\./\.\./\.\./index\.md\#do)__](#102)  
[method __check__](#103)  
[method __output__](#104)  
[method __reset__](#105)  
[method __triggers__](#106)  
[method __constructor__ *parent* ?*args*?](#107)  
[method __child__ *method*](#108)  
[method __go__](#109)  
[method __cstructure__ *name* *definition* ?*argdat* ____?](#110)  
[method __include__ *header*](#111)  
[method __include\_dir__ ?*args*?](#112)  
[method __include\_directory__ ?*args*?](#113)  
[method __c\_header__ *body*](#114)  
[method __c\_code__ *body*](#115)  
[method __c\_function__ *header* *body* ?*info* ____?](#116)  
[method __c\_tcloomethod__ *name* *body* ?*arginfo* ____?](#117)  
[method __cmethod__ *name* *body* ?*arginfo* ____?](#118)  
[method __c\_tclproc\_nspace__ *nspace*](#119)  
[method __c\_tclcmd__ *name* *body* ?*arginfo* ____?](#120)  
[method __c\_tclproc\_raw__ *name* *body* ?*arginfo* ____?](#121)  
[method __tcltype__ *name* *argdat*](#122)  
[method __project\-compile\-products__](#123)  
[method __implement__ *path*](#124)  
[method __initialize__](#125)  
[method __linktype__](#126)  
[method __generate\-cfile\-constant__](#127)  
[method __generate\-cfile\-header__](#128)  
[method __generate\-cfile\-tclapi__](#129)  
[method __generate\-loader\-module__](#130)  
[method __Collate\_Source__ *CWD*](#131)  
[method __select__](#132)  
[classmethod __select__ *object*](#133)  
[method __code__ *section* *body*](#134)  
[method __Collate\_Source__ *CWD*](#135)  
[method __project\-compile\-products__](#136)  
[method __generate\-debug__ ?*spaces* ____?](#137)  
[method __generate\-cfile\-constant__](#138)  
[method __generate\-cfile\-public\-structure__](#139)  
[method __generate\-cfile\-header__](#140)  
[method __generate\-cfile\-global__](#141)  
[method __generate\-cfile\-private\-typedef__](#142)  
[method __generate\-cfile\-private\-structure__](#143)  
[method __generate\-cfile\-functions__](#144)  
[method __generate\-cfile\-tclapi__](#145)  
[method __generate\-hfile\-public\-define__](#146)  
[method __generate\-hfile\-public\-macro__](#147)  
[method __generate\-hfile\-public\-typedef__](#148)  
[method __generate\-hfile\-public\-structure__](#149)  
[method __generate\-hfile\-public\-headers__](#150)  
[method __generate\-hfile\-public\-function__](#151)  
[method __generate\-hfile\-public\-includes__](#152)  
[method __generate\-hfile\-public\-verbatim__](#153)  
[method __generate\-loader\-external__](#154)  
[method __generate\-loader\-module__](#155)  
[method __generate\-stub\-function__](#156)  
[method __IncludeAdd__ *headervar* ?*args*?](#157)  
[method __generate\-tcl\-loader__](#158)  
[method __generate\-tcl\-pre__](#159)  
[method __generate\-tcl\-post__](#160)  
[method __linktype__](#161)  
[method __Ofile__ *filename*](#162)  
[method __project\-static\-packages__](#163)  
[method __toolset\-include\-directory__](#164)  
[method __target__ *method* ?*args*?](#165)  
[method __project\-compile\-products__](#166)  
[method __generate\-loader\-module__](#167)  
[method __project\-compile\-products__](#168)  
[method __linker\-products__ *configdict*](#169)  
[method __initialize__](#170)  
[variable __make\_object__](#171)  
[method __\_MorphPatterns__](#172)  
[method __add__ ?*args*?](#173)  
[method __install\-headers__ ?*args*?](#174)  
[method __make \{\} \_preamble__](#175)  
[method __make \{\} pkginfo__](#176)  
[method __make \{\} objects__](#177)  
[method __make \{\} object__ *name*](#178)  
[method __make \{\} reset__](#179)  
[method __make \{\} trigger__ ?*args*?](#180)  
[method __make \{\} depends__ ?*args*?](#181)  
[method __make \{\} filename__ *name*](#182)  
[method __make \{\} target__ *name* *Info* *body*](#183)  
[method __make \{\} todo__](#184)  
[method __make \{\} do__](#185)  
[method __child__ *which*](#186)  
[method __generate\-c__](#187)  
[method __generate\-h__](#188)  
[method __generate\-loader__](#189)  
[method __initialize__](#190)  
[method __implement__ *path*](#191)  
[method __linktype__](#192)  
[method __\_MorphPatterns__](#193)  
[method __constructor__ ?*args*?](#194)  
[method __add\_object__ *object*](#195)  
[method __add\_project__ *pkg* *info* ?*oodefine* ____?](#196)  
[method __add\_tool__ *pkg* *info* ?*oodefine* ____?](#197)  
[method __build\-tclcore__](#198)  
[method __child__ *which*](#199)  
[method __linktype__](#200)  
[method __project__ *pkg* ?*args*?](#201)  
[method __tclcore__](#202)  
[method __tkcore__](#203)  
[method __[tool](\.\./tool/tool\.md)__ *pkg* ?*args*?](#204)  
[method __clean__ *PATH*](#205)  
[method __project\-compile\-products__](#206)  
[method __go__](#207)  
[method __generate\-decls__ *pkgname* *path*](#208)  
[method __implement__ *path*](#209)  
[method __generate\-make__ *path*](#210)  
[method __linktype__](#211)  
[method __package\-ifneeded__ ?*args*?](#212)  
[method __shared\_library__ ?*filename* ____?](#213)  
[method __static\_library__ ?*filename* ____?](#214)  
[method __build\-tclkit\_main__ *PROJECT* *PKG\_OBJS*](#215)  
[method __Collate\_Source__ *CWD*](#216)  
[method __wrap__ *PWD* *exename* *vfspath* ?*args*?](#217)  
[classmethod __Sandbox__ *object*](#218)  
[classmethod __select__ *object*](#219)  
[classmethod __claim\_option__](#220)  
[classmethod __claim\_object__ *object*](#221)  
[classmethod __claim\_path__ *path*](#222)  
[method __scm\_info__](#223)  
[method __DistroMixIn__](#224)  
[method __Sandbox__](#225)  
[method __SrcDir__](#226)  
[method __ScmTag__](#227)  
[method __ScmClone__](#228)  
[method __ScmUnpack__](#229)  
[method __ScmUpdate__](#230)  
[method __Unpack__](#231)  
[classmethod __claim\_object__ *object*](#232)  
[classmethod __claim\_option__](#233)  
[classmethod __claim\_path__ *path*](#234)  
[method __ScmUnpack__](#235)  
[classmethod __claim\_object__ *obj*](#236)  
[classmethod __claim\_option__](#237)  
[classmethod __claim\_path__ *path*](#238)  
[method __scm\_info__](#239)  
[method __ScmClone__](#240)  
[method __ScmTag__](#241)  
[method __ScmUnpack__](#242)  
[method __ScmUpdate__](#243)  
[classmethod __claim\_object__ *obj*](#244)  
[classmethod __claim\_option__](#245)  
[classmethod __claim\_path__ *path*](#246)  
[method __ScmTag__](#247)  
[method __ScmUnpack__](#248)  
[method __ScmUpdate__](#249)  
[method __\_MorphPatterns__](#250)  
[method __BuildDir__ *PWD*](#251)  
[method __child__ *which*](#252)  
[method __compile__](#253)  
[method __go__](#254)  
[method __install__ ?*args*?](#255)  
[method __linktype__](#256)  
[method __linker\-products__ *configdict*](#257)  
[method __linker\-external__ *configdict*](#258)  
[method __linker\-extra__ *configdict*](#259)  
[method __env\-bootstrap__](#260)  
[method __env\-exec__](#261)  
[method __env\-install__](#262)  
[method __env\-load__](#263)  
[method __env\-present__](#264)  
[method __sources__](#265)  
[method __[update](\.\./\.\./\.\./\.\./index\.md\#update)__](#266)  
[method __unpack__](#267)  
[method __env\-bootstrap__](#268)  
[method __env\-present__](#269)  
[method __linktype__](#270)  
[method __env\-bootstrap__](#271)  
[method __env\-install__](#272)  
[method __env\-present__](#273)  
[method __install__ *DEST*](#274)  
[method __kettle__ *path* ?*args*?](#275)  
[method __install__ *DEST*](#276)  
[method __install__ *DEST*](#277)  
[method __env\-bootstrap__](#278)  
[method __env\-install__](#279)  
[method __env\-present__](#280)  
[method __install__ *DEST*](#281)  
[method __install\-module__ *DEST* ?*args*?](#282)  
[method __env\-bootstrap__](#283)  
[method __env\-install__](#284)  
[method __install__ *DEST*](#285)  
[method __install\-module__ *DEST* ?*args*?](#286)  
[method __clean__](#287)  
[method __env\-install__](#288)  
[method __project\-compile\-products__](#289)  
[method __ComputeInstall__](#290)  
[method __go__](#291)  
[method __linker\-products__ *configdict*](#292)  
[method __project\-static\-packages__](#293)  
[method __BuildDir__ *PWD*](#294)  
[method __compile__](#295)  
[method __Configure__](#296)  
[method __install__ *DEST*](#297)  
[method __install__ *DEST*](#298)  
[method __install__ *DEST*](#299)  
[method __env\-bootstrap__](#300)  
[method __env\-present__](#301)  
[method __env\-install__](#302)  
[method __go__](#303)  
[method __linktype__](#304)  

# <a name='description'></a>DESCRIPTION

The Practcl module is a tool for integrating large modules for C API Tcl code
that requires custom Tcl types and TclOO objects\.

The concept with Practcl is that is a single file package that can assist any
tcl based project with distribution, compilation, linking, VFS preparation,
executable assembly, and installation\. Practcl also allows one project to invoke
the build system from another project, allowing complex projects such as a
statically linked basekit to be assembled with relative ease\.

Practcl ships as a single file, and aside from a Tcl 8\.6 interpreter, has no
external dependencies\.

Making a practcl project

# <a name='section2'></a>Commands

  - <a name='1'></a>proc __practcl::cat__ *fname*

    Concatenate a file

  - <a name='2'></a>proc __practcl::docstrip__ *text*

    Strip the global comments from tcl code\. Used to prevent the documentation
    markup comments from clogging up files intended for distribution in machine
    readable format\.

  - <a name='3'></a>proc __putb__ ?*map*? *text*

    Append a line of text to a variable\. Optionally apply a string mapping\.

  - <a name='4'></a>proc __[Proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ *name* *arglist* *body*

    Generate a proc if no command already exists by that name

  - <a name='5'></a>proc __noop__ ?*args*?

    A command to do nothing\. A handy way of negating an instruction without
    having to comment it completely out\. It's also a handy attachment point for
    an object to be named later

  - <a name='6'></a>proc __practcl::debug__ ?*args*?

  - <a name='7'></a>proc __practcl::doexec__ ?*args*?

    Drop in a static copy of Tcl

  - <a name='8'></a>proc __practcl::doexec\_in__ *path* ?*args*?

  - <a name='9'></a>proc __practcl::dotclexec__ ?*args*?

  - <a name='10'></a>proc __practcl::domake__ *path* ?*args*?

  - <a name='11'></a>proc __practcl::domake\.tcl__ *path* ?*args*?

  - <a name='12'></a>proc __practcl::fossil__ *path* ?*args*?

  - <a name='13'></a>proc __practcl::fossil\_status__ *dir*

  - <a name='14'></a>proc __practcl::os__

  - <a name='15'></a>proc __practcl::mkzip__ *exename* *barekit* *vfspath*

    Build a zipfile\. On tcl8\.6 this invokes the native Zip implementation on
    older interpreters this invokes zip via exec

  - <a name='16'></a>proc __practcl::sort\_dict__ *list*

    Dictionary sort a key/value list\. Needed because pre tcl8\.6 does not have
    *lsort \-stride 2*

  - <a name='17'></a>proc __practcl::local\_os__

    Returns a dictionary describing the local operating system\. Fields return
    include:

      * download \- Filesystem path where fossil repositories and source tarballs
        are downloaded for the current user

      * EXEEXT \- The extension to give to executables\. \(i\.e\. \.exe on windows\)

      * fossil\_mirror \- A URI for a local network web server who acts as a
        fossil repository mirror

      * local\_install \- Filesystem path where packages for local consumption by
        the current user are installed

      * prefix \- The prefix as given to the Tcl core/TEA for installation to
        local\_install in \./configure

      * sandbox \- The file location where this project unpacks external projects

      * TEACUP\_PROFILE \- The ActiveState/Teacup canonical name for this platform
        \(i\.e\. win32\-ix86 macosx10\.5\-i386\-x86\_84\)

      * TEACUP\_OS \- The local operating system \(windows, macosx, openbsd, etc\)\.
        Gives the same answer as tcl\.m4, except that macosx is given as macosx
        instead of Darwin\.

      * TEA\_PLATFORM \- The platform returned by uname \-s\-uname \-r \(on Unix\), or
        "windows" on Windows

      * TEACUP\_ARCH \- The processor architecture for the local os \(i\.e\. ix86,
        x86\_64\)

      * TEACUP\_ARCH \- The processor architecture for the local os \(i\.e\. ix86,
        x86\_64\)

      * teapot \- Filesystem path where teapot package files are downloaded for
        the current user

      * userhome \- File path to store localized preferences, cache download
        files, etc for the current user

    This command uses a combination of local checks with Exec, any tclConfig\.sh
    file that is resident, autoconf data where already computed, and data
    gleaned from a file named practcl\.rc in userhome\. The location for userhome
    varies by platform and operating system:

      * Windows: ::env\(LOCALAPPDATA\)/Tcl

      * Macos: ~/Library/Application Support/Tcl

      * Other: ~/tcl

  - <a name='18'></a>proc __practcl::config\.tcl__ *path*

    A transparent call to ::practcl::read\_configuration to preserve backward
    compadibility with older copies of Practcl

  - <a name='19'></a>proc __practcl::read\_configuration__ *path*

    Detect local platform\. This command looks for data gleaned by autoconf or
    autosetup in the path specified, or perform its own logic tests if neither
    has been run\. A file named config\.site present in the location indicates
    that this project is cross compiling, and the data stored in that file is
    used for the compiler and linker\.

    This command looks for information from the following files, in the
    following order:

      * config\.tcl \- A file generated by autoconf/configure in newer editions of
        TEA, encoded as a Tcl script\.

      * config\.site \- A file containing cross compiler information, encoded as a
        SH script

      * ::env\(VisualStudioVersion\) \- On Windows, and environmental value that
        indicates MS Visual Studio is installed

    This command returns a dictionary containing all of the data cleaned from
    the sources above\. In the absence of any guidance this command returns the
    same output as ::practcl::local\_os\. In this mode, if the environmental
    variable VisualStudioVersion exists, this command will provide a template of
    fields that are appropriate for compiling on Windows under Microsoft Visual
    Studio\. The USEMSVC flag in the dictionary is a boolean flag to indicate if
    this is indeed the case\.

  - <a name='20'></a>proc __practcl::tcllib\_require__ *pkg* ?*args*?

    Try to load a package, and failing that retrieve tcllib

  - <a name='21'></a>proc __practcl::platform::tcl\_core\_options__ *os*

    Return the string to pass to \./configure to compile the Tcl core for the
    given OS\.

      * windows: \-\-with\-tzdata \-\-with\-encoding utf\-8

      * macosx: \-\-enable\-corefoundation=yes \-\-enable\-framework=no \-\-with\-tzdata
        \-\-with\-encoding utf\-8

      * other: \-\-with\-tzdata \-\-with\-encoding utf\-8

  - <a name='22'></a>proc __practcl::platform::tk\_core\_options__ *os*

  - <a name='23'></a>proc __practcl::read\_rc\_file__ *filename* ?*localdat* ____?

    Read a stylized key/value list stored in a file

  - <a name='24'></a>proc __practcl::read\_sh\_subst__ *line* *info*

    Converts a XXX\.sh file into a series of Tcl variables

  - <a name='25'></a>proc __practcl::read\_sh\_file__ *filename* ?*localdat* ____?

  - <a name='26'></a>proc __practcl::read\_Config\.sh__ *filename*

    A simpler form of read\_sh\_file tailored to pulling data from
    \(tcl&#124;tk\)Config\.sh

  - <a name='27'></a>proc __practcl::read\_Makefile__ *filename*

    A simpler form of read\_sh\_file tailored to pulling data from a Makefile

  - <a name='28'></a>proc __practcl::cputs__ *varname* ?*args*?

    Append arguments to a buffer The command works like puts in that each call
    will also insert a line feed\. Unlike puts, blank links in the interstitial
    are suppressed

  - <a name='29'></a>proc __practcl::tcl\_to\_c__ *body*

  - <a name='30'></a>proc __practcl::\_tagblock__ *text* ?*style* __tcl__? ?*note* ____?

  - <a name='31'></a>proc __practcl::de\_shell__ *data*

  - <a name='32'></a>proc __practcl::grep__ *pattern* ?*files* ____?

    Search for the pattern *pattern* amongst $files

  - <a name='33'></a>proc __practcl::file\_lexnormalize__ *sp*

  - <a name='34'></a>proc __practcl::file\_relative__ *base* *dst*

    Calculate a relative path between base and dst

    Example:

        ::practcl::file_relative ~/build/tcl/unix ~/build/tcl/library
        > ../library

  - <a name='35'></a>proc __practcl::findByPattern__ *basedir* *patterns*

  - <a name='36'></a>proc __practcl::log__ *fname* *comment*

    Record an event in the practcl log

  - <a name='37'></a>proc __practcl::\_pkgindex\_simpleIndex__ *path*

  - <a name='38'></a>proc __practcl::\_pkgindex\_directory__ *path*

    Return true if the pkgindex file contains any statement other than "package
    ifneeded" and/or if any package ifneeded loads a DLL

  - <a name='39'></a>proc __practcl::\_pkgindex\_path\_subdir__ *path*

    Helper function for ::practcl::pkgindex\_path

  - <a name='40'></a>proc __practcl::pkgindex\_path__ ?*args*?

    Index all paths given as though they will end up in the same virtual file
    system

  - <a name='41'></a>proc __practcl::installDir__ *d1* *d2*

    Delete the contents of *d2*, and then recusively Ccopy the contents of
    *d1* to *d2*\.

  - <a name='42'></a>proc __practcl::copyDir__ *d1* *d2* ?*toplevel* __1__?

    Recursively copy the contents of *d1* to *d2*

  - <a name='43'></a>proc __practcl::buildModule__ *modpath*

  - <a name='44'></a>proc __practcl::installModule__ *modpath* *DEST*

    Install a module from MODPATH to the directory specified\. *dpath* is
    assumed to be the fully qualified path where module is to be placed\. Any
    existing files will be deleted at that path\. If the path is symlink the
    process will return with no error and no action\. If the module has contents
    in the build/ directory that are newer than the \.tcl files in the module
    source directory, and a build/build\.tcl file exists, the build/build\.tcl
    file is run\. If the source directory includes a file named index\.tcl, the
    directory is assumed to be in the tao style of modules, and the entire
    directory \(and all subdirectories\) are copied verbatim\. If no index\.tcl file
    is present, all \.tcl files are copied from the module source directory, and
    a pkgIndex\.tcl file is generated if non yet exists\. I a folder named htdocs
    exists in the source directory, that directory is copied verbatim to the
    destination\.

  - <a name='45'></a>proc __practcl::trigger__ ?*args*?

    Trigger build targets, and recompute dependencies

    Internals:

        ::practcl::LOCAL make trigger {*}$args
        foreach {name obj} [::practcl::LOCAL make objects] {
          set ::make($name) [$obj do]
        }

  - <a name='46'></a>proc __practcl::depends__ ?*args*?

    Calculate if a dependency for any of the arguments needs to be fulfilled or
    rebuilt\.

    Internals:

        ::practcl::LOCAL make depends {*}$args

  - <a name='47'></a>proc __practcl::target__ *name* *info* ?*action* ____?

    Declare a build product\. This proc is just a shorthand for
    *::practcl::LOCAL make task $name $info $action*

    Registering a build product with this command will create an entry in the
    global array, and populate a value in the global array\.

    Internals:

        set obj [::practcl::LOCAL make task $name $info $action]
        set ::make($name) 0
        set filename [$obj define get filename]
        if {$filename ne {}} {
          set ::target($name) $filename
        }

# <a name='section3'></a>Classes

## <a name='subsection1'></a>Class  practcl::doctool

    { set authors {
       {John Doe} {jdoe@illustrious.edu}
       {Tom RichardHarry} {tomdickharry@illustrius.edu}
     }
     # Create the object
     ::practcl::doctool create AutoDoc
     set fout [open [file join $moddir module.tcl] w]
     foreach file [glob [file join $srcdir *.tcl]] {
       set content [::practcl::cat [file join $srcdir $file]]
        # Scan the file
        AutoDoc scan_text $content
        # Strip the comments from the distribution
        puts $fout [::practcl::docstrip $content]
     }
     # Write out the manual page
     set manout [open [file join $moddir module.man] w]
     dict set args header [string map $modmap [::practcl::cat [file join $srcdir manual.txt]]]
     dict set args footer [string map $modmap [::practcl::cat [file join $srcdir footer.txt]]]
     dict set args authors $authors
     puts $manout [AutoDoc manpage {*}$args]
     close $manout


    }

Tool for build scripts to dynamically generate manual files from comments in
source code files

__Methods__

  - <a name='48'></a>method __constructor__

  - <a name='49'></a>method __argspec__ *argspec*

    Process an argument list into an informational dict\. This method also
    understands non\-positional arguments expressed in the notation of Tip 471
    [https://core\.tcl\-lang\.org/tips/doc/trunk/tip/479\.md](https://core\.tcl\-lang\.org/tips/doc/trunk/tip/479\.md)\.

    The output will be a dictionary of all of the fields and whether the fields
    are __positional__, __mandatory__, and whether they have a
    __default__ value\.

    Example:

    my argspec {a b {c 10}}

    > a {positional 1 mandatory 1} b {positional 1 mandatory 1} c {positional 1 mandatory 0 default 10}

  - <a name='50'></a>method __[comment](\.\./\.\./\.\./\.\./index\.md\#comment)__ *block*

    Convert a block of comments into an informational dictionary\. If lines in
    the comment start with a single word ending in a colon, all subsequent lines
    are appended to a dictionary field of that name\. If no fields are given, all
    of the text is appended to the __description__ field\.

    Example:

    my comment {Does something cool}
    > description {Does something cool}

    my comment {
    title : Something really cool
    author : Sean Woods
    author : John Doe
    description :
    This does something really cool!
    }
    > description {This does something really cool!}
      title {Something really cool}
      author {Sean Woods
      John Doe}

  - <a name='51'></a>method __keyword\.Annotation__ *resultvar* *commentblock* *type* *name* *body*

  - <a name='52'></a>method __keyword\.Class__ *resultvar* *commentblock* *name* *body*

    Process an oo::objdefine call that modifies the class object itself

  - <a name='53'></a>method __keyword\.class__ *resultvar* *commentblock* *name* *body*

    Process an oo::define, clay::define, etc statement\.

  - <a name='54'></a>method __keyword\.Class\_Method__ *resultvar* *commentblock* *name* ?*args*?

    Process a statement for a clay style class method

  - <a name='55'></a>method __keyword\.method__ *resultvar* *commentblock* *name* ?*args*?

    Process a statement for a tcloo style object method

  - <a name='56'></a>method __keyword\.proc__ *commentblock* *name* *argspec*

    Process a proc statement

  - <a name='57'></a>method __reset__

    Reset the state of the object and its embedded coroutine

  - <a name='58'></a>method __Main__

    Main body of the embedded coroutine for the object

  - <a name='59'></a>method __section\.method__ *keyword* *method* *minfo*

    Generate the manual page text for a method or proc

  - <a name='60'></a>method __section\.annotation__ *type* *name* *iinfo*

  - <a name='61'></a>method __section\.class__ *class\_name* *class\_info*

    Generate the manual page text for a class

  - <a name='62'></a>method __section\.command__ *procinfo*

    Generate the manual page text for the commands section

  - <a name='63'></a>method __[manpage](\.\./\.\./\.\./\.\./index\.md\#manpage)__ ?__header *value*__? ?__footer *value*__? ?__authors *list*__?

    Generate the manual page\. Returns the completed text suitable for saving in
    \.man file\. The header argument is a block of doctools text to go in before
    the machine generated section\. footer is a block of doctools text to go in
    after the machine generated section\. authors is a list of individual authors
    and emails in the form of AUTHOR EMAIL ?AUTHOR EMAIL?\.\.\.

  - <a name='64'></a>method __scan\_text__ *text*

    Scan a block of text

  - <a name='65'></a>method __scan\_file__ *filename*

    Scan a file of text

## <a name='subsection2'></a>Class  practcl::metaclass

The metaclass for all practcl objects

__Methods__

  - <a name='66'></a>method __\_MorphPatterns__

  - <a name='67'></a>method __[define](\.\./\.\./\.\./\.\./index\.md\#define)__ *submethod* ?*args*?

  - <a name='68'></a>method __graft__ ?*args*?

  - <a name='69'></a>method __initialize__

  - <a name='70'></a>method __link__ *command* ?*args*?

  - <a name='71'></a>method __morph__ *classname*

  - <a name='72'></a>method __script__ *script*

  - <a name='73'></a>method __select__

  - <a name='74'></a>method __[source](\.\./\.\./\.\./\.\./index\.md\#source)__ *filename*

## <a name='subsection3'></a>Class  practcl::toolset

Ancestor\-less class intended to be a mixin which defines a family of build
related behaviors that are modified when targetting either gcc or msvc

__Class Methods__

  - <a name='75'></a>classmethod __select__ *object*

    Perform the selection for the toolset mixin

__Methods__

  - <a name='76'></a>method __config\.sh__

    find or fake a key/value list describing this project

  - <a name='77'></a>method __BuildDir__ *PWD*

    Compute the location where the product will be built

  - <a name='78'></a>method __MakeDir__ *srcdir*

    Return where the Makefile is located relative to *srcdir*\. For this
    implementation the MakeDir is always srcdir\.

  - <a name='79'></a>method __read\_configuration__

    Read information about the build process for this package\. For this
    implementation, data is sought in the following locations in the following
    order: config\.tcl \(generated by practcl\.\) PKGConfig\.sh\. The Makefile

    If the Makefile needs to be consulted, but does not exist, the Configure
    method is invoked

  - <a name='80'></a>method __build\-cflags__ *PROJECT* *DEFS* *namevar* *versionvar* *defsvar*

    method DEFS This method populates 4 variables: name \- The name of the
    package version \- The version of the package defs \- C flags passed to the
    compiler includedir \- A list of paths to feed to the compiler for finding
    headers

  - <a name='81'></a>method __critcl__ ?*args*?

    Invoke critcl in an external process

## <a name='subsection4'></a>Class  practcl::toolset\.gcc

*ancestors*: __practcl::toolset__

__Methods__

  - <a name='82'></a>method __Autoconf__

  - <a name='83'></a>method __BuildDir__ *PWD*

  - <a name='84'></a>method __ConfigureOpts__

  - <a name='85'></a>method __MakeDir__ *srcdir*

    Detect what directory contains the Makefile template

  - <a name='86'></a>method __make \{\} autodetect__

  - <a name='87'></a>method __make \{\} clean__

  - <a name='88'></a>method __make \{\} compile__

  - <a name='89'></a>method __make \{\} install__ *DEST*

  - <a name='90'></a>method __build\-compile\-sources__ *PROJECT* *COMPILE* *CPPCOMPILE* *INCLUDES*

  - <a name='91'></a>method __build\-Makefile__ *path* *PROJECT*

  - <a name='92'></a>method __build\-library__ *outfile* *PROJECT*

    Produce a static or dynamic library

  - <a name='93'></a>method __build\-tclsh__ *outfile* *PROJECT* ?*path* __auto__?

    Produce a static executable

## <a name='subsection5'></a>Class  practcl::toolset\.msvc

*ancestors*: __practcl::toolset__

__Methods__

  - <a name='94'></a>method __BuildDir__ *PWD*

    MSVC always builds in the source directory

  - <a name='95'></a>method __make \{\} autodetect__

    Do nothing

  - <a name='96'></a>method __make \{\} clean__

  - <a name='97'></a>method __make \{\} compile__

  - <a name='98'></a>method __make \{\} install__ *DEST*

  - <a name='99'></a>method __MakeDir__ *srcdir*

    Detect what directory contains the Makefile template

  - <a name='100'></a>method __NmakeOpts__

## <a name='subsection6'></a>Class  practcl::make\_obj

*ancestors*: __practcl::metaclass__

A build deliverable object\. Normally an object file, header, or tcl script which
must be compiled or generated in some way

__Methods__

  - <a name='101'></a>method __constructor__ *module\_object* *name* *info* ?*action\_body* ____?

  - <a name='102'></a>method __[do](\.\./\.\./\.\./\.\./index\.md\#do)__

  - <a name='103'></a>method __check__

  - <a name='104'></a>method __output__

  - <a name='105'></a>method __reset__

  - <a name='106'></a>method __triggers__

## <a name='subsection7'></a>Class  practcl::object

*ancestors*: __practcl::metaclass__

A generic Practcl object

__Methods__

  - <a name='107'></a>method __constructor__ *parent* ?*args*?

  - <a name='108'></a>method __child__ *method*

  - <a name='109'></a>method __go__

## <a name='subsection8'></a>Class  practcl::dynamic

Dynamic blocks do not generate their own \.c files, instead the contribute to the
amalgamation of the main library file

__Methods__

  - <a name='110'></a>method __cstructure__ *name* *definition* ?*argdat* ____?

    Parser functions

  - <a name='111'></a>method __include__ *header*

  - <a name='112'></a>method __include\_dir__ ?*args*?

  - <a name='113'></a>method __include\_directory__ ?*args*?

  - <a name='114'></a>method __c\_header__ *body*

  - <a name='115'></a>method __c\_code__ *body*

  - <a name='116'></a>method __c\_function__ *header* *body* ?*info* ____?

  - <a name='117'></a>method __c\_tcloomethod__ *name* *body* ?*arginfo* ____?

  - <a name='118'></a>method __cmethod__ *name* *body* ?*arginfo* ____?

    Alias to classic name

  - <a name='119'></a>method __c\_tclproc\_nspace__ *nspace*

  - <a name='120'></a>method __c\_tclcmd__ *name* *body* ?*arginfo* ____?

  - <a name='121'></a>method __c\_tclproc\_raw__ *name* *body* ?*arginfo* ____?

    Alias to classic name

  - <a name='122'></a>method __tcltype__ *name* *argdat*

  - <a name='123'></a>method __project\-compile\-products__

    Module interactions

  - <a name='124'></a>method __implement__ *path*

  - <a name='125'></a>method __initialize__

    Practcl internals

  - <a name='126'></a>method __linktype__

  - <a name='127'></a>method __generate\-cfile\-constant__

  - <a name='128'></a>method __generate\-cfile\-header__

  - <a name='129'></a>method __generate\-cfile\-tclapi__

    Generate code that provides implements Tcl API calls

  - <a name='130'></a>method __generate\-loader\-module__

    Generate code that runs when the package/module is initialized into the
    interpreter

  - <a name='131'></a>method __Collate\_Source__ *CWD*

  - <a name='132'></a>method __select__

    Once an object marks itself as some flavor of dynamic, stop trying to morph
    it into something else

## <a name='subsection9'></a>Class  practcl::product

A deliverable for the build system

__Class Methods__

  - <a name='133'></a>classmethod __select__ *object*

__Methods__

  - <a name='134'></a>method __code__ *section* *body*

  - <a name='135'></a>method __Collate\_Source__ *CWD*

  - <a name='136'></a>method __project\-compile\-products__

  - <a name='137'></a>method __generate\-debug__ ?*spaces* ____?

  - <a name='138'></a>method __generate\-cfile\-constant__

  - <a name='139'></a>method __generate\-cfile\-public\-structure__

    Populate const static data structures

  - <a name='140'></a>method __generate\-cfile\-header__

  - <a name='141'></a>method __generate\-cfile\-global__

  - <a name='142'></a>method __generate\-cfile\-private\-typedef__

  - <a name='143'></a>method __generate\-cfile\-private\-structure__

  - <a name='144'></a>method __generate\-cfile\-functions__

    Generate code that provides subroutines called by Tcl API methods

  - <a name='145'></a>method __generate\-cfile\-tclapi__

    Generate code that provides implements Tcl API calls

  - <a name='146'></a>method __generate\-hfile\-public\-define__

  - <a name='147'></a>method __generate\-hfile\-public\-macro__

  - <a name='148'></a>method __generate\-hfile\-public\-typedef__

  - <a name='149'></a>method __generate\-hfile\-public\-structure__

  - <a name='150'></a>method __generate\-hfile\-public\-headers__

  - <a name='151'></a>method __generate\-hfile\-public\-function__

  - <a name='152'></a>method __generate\-hfile\-public\-includes__

  - <a name='153'></a>method __generate\-hfile\-public\-verbatim__

  - <a name='154'></a>method __generate\-loader\-external__

  - <a name='155'></a>method __generate\-loader\-module__

  - <a name='156'></a>method __generate\-stub\-function__

  - <a name='157'></a>method __IncludeAdd__ *headervar* ?*args*?

  - <a name='158'></a>method __generate\-tcl\-loader__

  - <a name='159'></a>method __generate\-tcl\-pre__

    This methods generates any Tcl script file which is required to
    pre\-initialize the C library

  - <a name='160'></a>method __generate\-tcl\-post__

  - <a name='161'></a>method __linktype__

  - <a name='162'></a>method __Ofile__ *filename*

  - <a name='163'></a>method __project\-static\-packages__

    Methods called by the master project

  - <a name='164'></a>method __toolset\-include\-directory__

    Methods called by the toolset

  - <a name='165'></a>method __target__ *method* ?*args*?

## <a name='subsection10'></a>Class  practcl::product\.cheader

*ancestors*: __practcl::product__

A product which generated from a C header file\. Which is to say, nothing\.

__Methods__

  - <a name='166'></a>method __project\-compile\-products__

  - <a name='167'></a>method __generate\-loader\-module__

## <a name='subsection11'></a>Class  practcl::product\.csource

*ancestors*: __practcl::product__

A product which generated from a C source file\. Normally an object \(\.o\) file\.

__Methods__

  - <a name='168'></a>method __project\-compile\-products__

## <a name='subsection12'></a>Class  practcl::product\.clibrary

*ancestors*: __practcl::product__

A product which is generated from a compiled C library\. Usually a \.a or a \.dylib
file, but in complex cases may actually just be a conduit for one project to
integrate the source code of another

__Methods__

  - <a name='169'></a>method __linker\-products__ *configdict*

## <a name='subsection13'></a>Class  practcl::product\.dynamic

*ancestors*: __practcl::dynamic__ __practcl::product__

A product which is generated from C code that itself is generated by practcl or
some other means\. This C file may or may not produce its own \.o file, depending
on whether it is eligible to become part of an amalgamation

__Methods__

  - <a name='170'></a>method __initialize__

## <a name='subsection14'></a>Class  practcl::product\.critcl

*ancestors*: __practcl::dynamic__ __practcl::product__

A binary product produced by critcl\. Note: The implementation is not written
yet, this class does nothing\.

## <a name='subsection15'></a>Class  practcl::module

*ancestors*: __practcl::object__ __practcl::product\.dynamic__

In the end, all C code must be loaded into a module This will either be a
dynamically loaded library implementing a tcl extension, or a compiled in
segment of a custom shell/app

__Variable__

  - <a name='171'></a>variable __make\_object__

__Methods__

  - <a name='172'></a>method __\_MorphPatterns__

  - <a name='173'></a>method __add__ ?*args*?

  - <a name='174'></a>method __install\-headers__ ?*args*?

  - <a name='175'></a>method __make \{\} \_preamble__

  - <a name='176'></a>method __make \{\} pkginfo__

  - <a name='177'></a>method __make \{\} objects__

    Return a dictionary of all handles and associated objects

  - <a name='178'></a>method __make \{\} object__ *name*

    Return the object associated with handle *name*

  - <a name='179'></a>method __make \{\} reset__

    Reset all deputy objects

  - <a name='180'></a>method __make \{\} trigger__ ?*args*?

    Exercise the triggers method for all handles listed

  - <a name='181'></a>method __make \{\} depends__ ?*args*?

    Exercise the check method for all handles listed

  - <a name='182'></a>method __make \{\} filename__ *name*

    Return the file name of the build product for the listed handle

  - <a name='183'></a>method __make \{\} target__ *name* *Info* *body*

  - <a name='184'></a>method __make \{\} todo__

    Return a list of handles for object which return true for the do method

  - <a name='185'></a>method __make \{\} do__

    For each target exercise the action specified in the *action* definition
    if the *do* method returns true

  - <a name='186'></a>method __child__ *which*

  - <a name='187'></a>method __generate\-c__

    This methods generates the contents of an amalgamated \.c file which
    implements the loader for a batch of tools

  - <a name='188'></a>method __generate\-h__

    This methods generates the contents of an amalgamated \.h file which
    describes the public API of this module

  - <a name='189'></a>method __generate\-loader__

  - <a name='190'></a>method __initialize__

  - <a name='191'></a>method __implement__ *path*

  - <a name='192'></a>method __linktype__

## <a name='subsection16'></a>Class  practcl::project

*ancestors*: __practcl::module__

A toplevel project that is a collection of other projects

__Methods__

  - <a name='193'></a>method __\_MorphPatterns__

  - <a name='194'></a>method __constructor__ ?*args*?

  - <a name='195'></a>method __add\_object__ *object*

  - <a name='196'></a>method __add\_project__ *pkg* *info* ?*oodefine* ____?

  - <a name='197'></a>method __add\_tool__ *pkg* *info* ?*oodefine* ____?

  - <a name='198'></a>method __build\-tclcore__

    Compile the Tcl core\. If the define *tk* is true, compile the Tk core as
    well

  - <a name='199'></a>method __child__ *which*

  - <a name='200'></a>method __linktype__

  - <a name='201'></a>method __project__ *pkg* ?*args*?

    Exercise the methods of a sub\-object

  - <a name='202'></a>method __tclcore__

  - <a name='203'></a>method __tkcore__

  - <a name='204'></a>method __[tool](\.\./tool/tool\.md)__ *pkg* ?*args*?

## <a name='subsection17'></a>Class  practcl::library

*ancestors*: __practcl::project__

A toplevel project that produces a library

__Methods__

  - <a name='205'></a>method __clean__ *PATH*

  - <a name='206'></a>method __project\-compile\-products__

  - <a name='207'></a>method __go__

  - <a name='208'></a>method __generate\-decls__ *pkgname* *path*

  - <a name='209'></a>method __implement__ *path*

  - <a name='210'></a>method __generate\-make__ *path*

    Backward compadible call

  - <a name='211'></a>method __linktype__

  - <a name='212'></a>method __package\-ifneeded__ ?*args*?

    Create a "package ifneeded" Args are a list of aliases for which this
    package will answer to

  - <a name='213'></a>method __shared\_library__ ?*filename* ____?

  - <a name='214'></a>method __static\_library__ ?*filename* ____?

## <a name='subsection18'></a>Class  practcl::tclkit

*ancestors*: __practcl::library__

A toplevel project that produces a self\-contained executable

__Methods__

  - <a name='215'></a>method __build\-tclkit\_main__ *PROJECT* *PKG\_OBJS*

  - <a name='216'></a>method __Collate\_Source__ *CWD*

  - <a name='217'></a>method __wrap__ *PWD* *exename* *vfspath* ?*args*?

    Wrap an executable

## <a name='subsection19'></a>Class  practcl::distribution

Standalone class to manage code distribution This class is intended to be mixed
into another class \(Thus the lack of ancestors\)

__Class Methods__

  - <a name='218'></a>classmethod __Sandbox__ *object*

  - <a name='219'></a>classmethod __select__ *object*

  - <a name='220'></a>classmethod __claim\_option__

  - <a name='221'></a>classmethod __claim\_object__ *object*

  - <a name='222'></a>classmethod __claim\_path__ *path*

__Methods__

  - <a name='223'></a>method __scm\_info__

  - <a name='224'></a>method __DistroMixIn__

  - <a name='225'></a>method __Sandbox__

  - <a name='226'></a>method __SrcDir__

  - <a name='227'></a>method __ScmTag__

  - <a name='228'></a>method __ScmClone__

  - <a name='229'></a>method __ScmUnpack__

  - <a name='230'></a>method __ScmUpdate__

  - <a name='231'></a>method __Unpack__

## <a name='subsection20'></a>Class  practcl::distribution\.snapshot

*ancestors*: __practcl::distribution__

A file distribution from zip, tarball, or other non\-scm archive format

__Class Methods__

  - <a name='232'></a>classmethod __claim\_object__ *object*

  - <a name='233'></a>classmethod __claim\_option__

  - <a name='234'></a>classmethod __claim\_path__ *path*

__Methods__

  - <a name='235'></a>method __ScmUnpack__

## <a name='subsection21'></a>Class  practcl::distribution\.fossil

*ancestors*: __practcl::distribution__

A file distribution based on fossil

__Class Methods__

  - <a name='236'></a>classmethod __claim\_object__ *obj*

    Check for markers in the metadata

  - <a name='237'></a>classmethod __claim\_option__

  - <a name='238'></a>classmethod __claim\_path__ *path*

    Check for markers in the source root

__Methods__

  - <a name='239'></a>method __scm\_info__

  - <a name='240'></a>method __ScmClone__

    Clone the source

  - <a name='241'></a>method __ScmTag__

  - <a name='242'></a>method __ScmUnpack__

  - <a name='243'></a>method __ScmUpdate__

## <a name='subsection22'></a>Class  practcl::distribution\.git

*ancestors*: __practcl::distribution__

A file distribution based on git

__Class Methods__

  - <a name='244'></a>classmethod __claim\_object__ *obj*

  - <a name='245'></a>classmethod __claim\_option__

  - <a name='246'></a>classmethod __claim\_path__ *path*

__Methods__

  - <a name='247'></a>method __ScmTag__

  - <a name='248'></a>method __ScmUnpack__

  - <a name='249'></a>method __ScmUpdate__

## <a name='subsection23'></a>Class  practcl::subproject

*ancestors*: __practcl::module__

A subordinate project

__Methods__

  - <a name='250'></a>method __\_MorphPatterns__

  - <a name='251'></a>method __BuildDir__ *PWD*

  - <a name='252'></a>method __child__ *which*

  - <a name='253'></a>method __compile__

  - <a name='254'></a>method __go__

  - <a name='255'></a>method __install__ ?*args*?

    Install project into the local build system

  - <a name='256'></a>method __linktype__

  - <a name='257'></a>method __linker\-products__ *configdict*

  - <a name='258'></a>method __linker\-external__ *configdict*

  - <a name='259'></a>method __linker\-extra__ *configdict*

  - <a name='260'></a>method __env\-bootstrap__

    Methods for packages/tools that can be downloaded possibly built and used
    internally by this Practcl process Load the facility into the interpreter

  - <a name='261'></a>method __env\-exec__

    Return a file path that exec can call

  - <a name='262'></a>method __env\-install__

    Install the tool into the local environment

  - <a name='263'></a>method __env\-load__

    Do whatever is necessary to get the tool into the local environment

  - <a name='264'></a>method __env\-present__

    Check if tool is available for load/already loaded

  - <a name='265'></a>method __sources__

  - <a name='266'></a>method __[update](\.\./\.\./\.\./\.\./index\.md\#update)__

  - <a name='267'></a>method __unpack__

## <a name='subsection24'></a>Class  practcl::subproject\.source

*ancestors*: __practcl::subproject__ __practcl::library__

A project which the kit compiles and integrates the source for itself

__Methods__

  - <a name='268'></a>method __env\-bootstrap__

  - <a name='269'></a>method __env\-present__

  - <a name='270'></a>method __linktype__

## <a name='subsection25'></a>Class  practcl::subproject\.teapot

*ancestors*: __practcl::subproject__

a copy from the teapot

__Methods__

  - <a name='271'></a>method __env\-bootstrap__

  - <a name='272'></a>method __env\-install__

  - <a name='273'></a>method __env\-present__

  - <a name='274'></a>method __install__ *DEST*

## <a name='subsection26'></a>Class  practcl::subproject\.kettle

*ancestors*: __practcl::subproject__

__Methods__

  - <a name='275'></a>method __kettle__ *path* ?*args*?

  - <a name='276'></a>method __install__ *DEST*

## <a name='subsection27'></a>Class  practcl::subproject\.critcl

*ancestors*: __practcl::subproject__

__Methods__

  - <a name='277'></a>method __install__ *DEST*

## <a name='subsection28'></a>Class  practcl::subproject\.sak

*ancestors*: __practcl::subproject__

__Methods__

  - <a name='278'></a>method __env\-bootstrap__

  - <a name='279'></a>method __env\-install__

  - <a name='280'></a>method __env\-present__

  - <a name='281'></a>method __install__ *DEST*

  - <a name='282'></a>method __install\-module__ *DEST* ?*args*?

## <a name='subsection29'></a>Class  practcl::subproject\.practcl

*ancestors*: __practcl::subproject__

__Methods__

  - <a name='283'></a>method __env\-bootstrap__

  - <a name='284'></a>method __env\-install__

  - <a name='285'></a>method __install__ *DEST*

  - <a name='286'></a>method __install\-module__ *DEST* ?*args*?

## <a name='subsection30'></a>Class  practcl::subproject\.binary

*ancestors*: __practcl::subproject__

A subordinate binary package

__Methods__

  - <a name='287'></a>method __clean__

  - <a name='288'></a>method __env\-install__

  - <a name='289'></a>method __project\-compile\-products__

  - <a name='290'></a>method __ComputeInstall__

  - <a name='291'></a>method __go__

  - <a name='292'></a>method __linker\-products__ *configdict*

  - <a name='293'></a>method __project\-static\-packages__

  - <a name='294'></a>method __BuildDir__ *PWD*

  - <a name='295'></a>method __compile__

  - <a name='296'></a>method __Configure__

  - <a name='297'></a>method __install__ *DEST*

## <a name='subsection31'></a>Class  practcl::subproject\.tea

*ancestors*: __practcl::subproject\.binary__

A subordinate TEA based binary package

## <a name='subsection32'></a>Class  practcl::subproject\.library

*ancestors*: __practcl::subproject\.binary__ __practcl::library__

A subordinate C library built by this project

__Methods__

  - <a name='298'></a>method __install__ *DEST*

## <a name='subsection33'></a>Class  practcl::subproject\.external

*ancestors*: __practcl::subproject\.binary__

A subordinate external C library

__Methods__

  - <a name='299'></a>method __install__ *DEST*

## <a name='subsection34'></a>Class  practcl::subproject\.core

*ancestors*: __practcl::subproject\.binary__

__Methods__

  - <a name='300'></a>method __env\-bootstrap__

  - <a name='301'></a>method __env\-present__

  - <a name='302'></a>method __env\-install__

  - <a name='303'></a>method __go__

  - <a name='304'></a>method __linktype__

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *practcl* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[practcl](\.\./\.\./\.\./\.\./index\.md\#practcl)

# <a name='category'></a>CATEGORY

TclOO

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2016\-2018 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/processman/processman.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

[//000000001]: # (processman \- processman)
[//000000002]: # (Generated from file 'processman\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2015 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (processman\(n\) 0\.1 tcllib "processman")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

processman \- Tool for automating the period callback of commands

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Commands](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require twapi 3\.1  
package require cron 1\.1  
package require processman ?0\.1?  

[__::processman::find\_exe__ *name*](#1)  
[__::processman::kill__ *id*](#2)  
[__::processman::kill\_all__](#3)  
[__::processman::killexe__ *name*](#4)  
[__::processman::onexit__ *id* *cmd*](#5)  
[__::processman::priority__ *id* *level*](#6)  
[__::processman::process\_list__](#7)  
[__::processman::process\_list__ *id*](#8)  
[__::processman::spawn__ *id* *cmd* *args*](#9)  

# <a name='description'></a>DESCRIPTION

The __processman__ package provides a Pure\-tcl set of utilities to manage
child processes in a platform\-generic nature\.

# <a name='section2'></a>Commands

  - <a name='1'></a>__::processman::find\_exe__ *name*

    Locate an executable by the name of *name* in the system path\. On windows,
    also add the \.exe extention if not given\.

  - <a name='2'></a>__::processman::kill__ *id*

    Kill a child process *id*\.

  - <a name='3'></a>__::processman::kill\_all__

    Kill all processes spawned by this program

  - <a name='4'></a>__::processman::killexe__ *name*

    Kill a process identified by the executable\. On Unix, this triggers a
    killall\. On windows, __twapi::get\_process\_ids__ is used to map a name
    one or more IDs, which are then killed\.

  - <a name='5'></a>__::processman::onexit__ *id* *cmd*

    Arrange to execute the script *cmd* when this programe detects that
    process *id* as terminated\.

  - <a name='6'></a>__::processman::priority__ *id* *level*

    Mark process *id* with the priorty *level*\. Valid levels: low, high,
    default\.

    On Unix, the process is tagged using the __nice__ command\.

    On Windows, the process is modifed via the __twapi::set\_priority\_class__

  - <a name='7'></a>__::processman::process\_list__

    Return a list of processes that have been triggered by this program, as well
    as a boolean flag to indicate if the process is still running\.

  - <a name='8'></a>__::processman::process\_list__ *id*

    Return true if process *id* is still running, false otherwise\.

  - <a name='9'></a>__::processman::spawn__ *id* *cmd* *args*

    Start a child process, identified by *id*\. *cmd* is the name of the
    command to execute\. *args* are arguments to pass to that command\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *odie* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[odie](\.\./\.\./\.\./\.\./index\.md\#odie),
[processman](\.\./\.\./\.\./\.\./index\.md\#processman)

# <a name='category'></a>CATEGORY

System

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2015 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































Deleted embedded/md/tcllib/files/modules/profiler/profiler.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173

[//000000001]: # (profiler \- Tcl Profiler)
[//000000002]: # (Generated from file 'profiler\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (profiler\(n\) 0\.5 tcllib "Tcl Profiler")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

profiler \- Tcl source code profiler

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require profiler ?0\.5?  

[__::profiler::init__](#1)  
[__::profiler::dump__ *pattern*](#2)  
[__::profiler::print__ ?*pattern*?](#3)  
[__::profiler::reset__ ?*pattern*?](#4)  
[__::profiler::suspend__ ?*pattern*?](#5)  
[__::profiler::resume__ ?*pattern*?](#6)  
[__::profiler::new\-disabled__](#7)  
[__::profiler::new\-enabled__](#8)  
[__::profiler::sortFunctions__ *key*](#9)  

# <a name='description'></a>DESCRIPTION

The __profiler__ package provides a simple Tcl source code profiler\. It is a
function\-level profiler; that is, it collects only function\-level information,
not the more detailed line\-level information\. It operates by redefining the Tcl
__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ command\. Profiling is initiated
via the __::profiler::init__ command\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::profiler::init__

    Initiate profiling\. All procedures created after this command is called will
    be profiled\. To profile an entire application, this command must be called
    before any other commands\.

  - <a name='2'></a>__::profiler::dump__ *pattern*

    Dump profiling information for the all functions matching *pattern*\. If no
    pattern is specified, information for all functions will be returned\. The
    result is a list of key/value pairs that maps function names to information
    about that function\. The information about each function is in turn a list
    of key/value pairs\. The keys used and their values are:

      * __totalCalls__

        The total number of times *functionName* was called\.

      * __callerDist__

        A list of key/value pairs mapping each calling function that called
        *functionName* to the number of times it called *functionName*\.

      * __compileTime__

        The runtime, in clock clicks, of *functionName* the first time that it
        was called\.

      * __totalRuntime__

        The sum of the runtimes of all calls of *functionName*\.

      * __averageRuntime__

        Average runtime of *functionName*\.

      * __descendantTime__

        Sum of the time spent in descendants of *functionName*\.

      * __averageDescendantTime__

        Average time spent in descendants of *functionName*\.

  - <a name='3'></a>__::profiler::print__ ?*pattern*?

    Print profiling information for all functions matching *pattern*\. If no
    pattern is specified, information about all functions will be displayed\. The
    return result is a human readable display of the profiling information\.

  - <a name='4'></a>__::profiler::reset__ ?*pattern*?

    Reset profiling information for all functions matching *pattern*\. If no
    pattern is specified, information will be reset for all functions\.

  - <a name='5'></a>__::profiler::suspend__ ?*pattern*?

    Suspend profiling for all functions matching *pattern*\. If no pattern is
    specified, profiling will be suspended for all functions\. It stops gathering
    profiling information after this command is issued\. However, it does not
    erase any profiling information that has been gathered previously\. Use
    resume command to re\-enable profiling\.

  - <a name='6'></a>__::profiler::resume__ ?*pattern*?

    Resume profiling for all functions matching *pattern*\. If no pattern is
    specified, profiling will be resumed for all functions\. This command should
    be invoked after suspending the profiler in the code\.

  - <a name='7'></a>__::profiler::new\-disabled__

    Change the initial profiling state for new procedures\. Invoking this command
    disables profiling for all procedures created after this command until
    __new\-enabled__ is invoked\. Activate profiling of specific procedures
    via __resume__\.

  - <a name='8'></a>__::profiler::new\-enabled__

    Change the initial profiling state for new procedures\. Invoking this command
    enables profiling for all procedures created after this command until
    __new\-disabled__ is invoked\. Prevent profiling of specific procedures
    via __suspend__\.

  - <a name='9'></a>__::profiler::sortFunctions__ *key*

    Return a list of functions sorted by a particular profiling statistic\.
    Supported values for *key* are: __calls__, __exclusiveTime__,
    __compileTime__, __nonCompileTime__, __totalRuntime__,
    __avgExclusiveTime__, and __avgRuntime__\. The return result is a
    list of lists, where each sublist consists of a function name and the value
    of *key* for that function\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *profiler* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[performance](\.\./\.\./\.\./\.\./index\.md\#performance),
[profile](\.\./\.\./\.\./\.\./index\.md\#profile),
[speed](\.\./\.\./\.\./\.\./index\.md\#speed)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_astree.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

[//000000001]: # (pt::ast \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_astree\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::ast\(n\) 1\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::ast \- Abstract Syntax Tree Serialization

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [AST serialization format](#section3)

      - [Example](#subsection1)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::ast ?1\.1?  

[__::pt::ast__ __verify__ *serial* ?*canonvar*?](#1)  
[__::pt::ast__ __verify\-as\-canonical__ *serial*](#2)  
[__::pt::ast__ __canonicalize__ *serial*](#3)  
[__::pt::ast__ __print__ *serial*](#4)  
[__::pt::ast__ __bottomup__ *cmdprefix* *ast*](#5)  
[__cmdprefix__ *ast*](#6)  
[__::pt::ast__ __topdown__ *cmdprefix* *pe*](#7)  
[__::pt::ast__ __equal__ *seriala* *serialb*](#8)  
[__::pt::ast__ __new0__ *s* *loc* ?*child*\.\.\.?](#9)  
[__::pt::ast__ __new__ *s* *start* *end* ?*child*\.\.\.?](#10)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides commands to work with the serializations of abstract
syntax trees as managed by the Parser Tools, and specified in section [AST
serialization format](#section3)\.

This is a supporting package in the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_support\.png)

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::ast__ __verify__ *serial* ?*canonvar*?

    This command verifies that the content of *serial* is a valid
    serialization of an abstract syntax tree and will throw an error if that is
    not the case\. The result of the command is the empty string\.

    If the argument *canonvar* is specified it is interpreted as the name of a
    variable in the calling context\. This variable will be written to if and
    only if *serial* is a valid regular serialization\. Its value will be a
    boolean, with __True__ indicating that the serialization is not only
    valid, but also *canonical*\. __False__ will be written for a valid,
    but non\-canonical serialization\.

    For the specification of serializations see the section [AST serialization
    format](#section3)\.

  - <a name='2'></a>__::pt::ast__ __verify\-as\-canonical__ *serial*

    This command verifies that the content of *serial* is a valid
    *canonical* serialization of an abstract syntax tree and will throw an
    error if that is not the case\. The result of the command is the empty
    string\.

    For the specification of canonical serializations see the section [AST
    serialization format](#section3)\.

  - <a name='3'></a>__::pt::ast__ __canonicalize__ *serial*

    This command assumes that the content of *serial* is a valid *regular*
    serialization of an abstract syntax and will throw an error if that is not
    the case\.

    It will then convert the input into the *canonical* serialization of the
    contained tree and return it as its result\. If the input is already
    canonical it will be returned unchanged\.

    For the specification of regular and canonical serializations see the
    section [AST serialization format](#section3)\.

  - <a name='4'></a>__::pt::ast__ __print__ *serial*

    This command assumes that the argument *serial* contains a valid
    serialization of an abstract syntax tree and returns a string containing
    that tree in a human readable form\.

    The exact format of this form is not specified and cannot be relied on for
    parsing or other machine\-based activities\.

    For the specification of serializations see the section [AST serialization
    format](#section3)\.

  - <a name='5'></a>__::pt::ast__ __bottomup__ *cmdprefix* *ast*

    This command walks the abstract syntax tree *ast* from the bottom up to
    the root, invoking the command prefix *cmdprefix* for each node\. This
    implies that the children of a node N are handled before N\.

    The command prefix has the signature

      * <a name='6'></a>__cmdprefix__ *ast*

        I\.e\. it is invoked with the ast node the walk is currently at\.

        The result returned by the command prefix replaces *ast* in the node
        it was a child of, allowing transformations of the tree\.

        This also means that for all inner node the contents of the children
        elements are the results of the command prefix invoked for the children
        of this node\.

  - <a name='7'></a>__::pt::ast__ __topdown__ *cmdprefix* *pe*

    This command walks the abstract syntax tree *ast* from the root down to
    the leaves, invoking the command prefix *cmdprefix* for each node\. This
    implies that the children of a node N are handled after N\.

    The command prefix has the same signature as for __bottomup__, see
    above\.

    The result returned by the command prefix is *ignored*\.

  - <a name='8'></a>__::pt::ast__ __equal__ *seriala* *serialb*

    This command tests the two sbstract syntax trees *seriala* and *serialb*
    for structural equality\. The result of the command is a boolean value\. It
    will be set to __true__ if the trees are identical, and __false__
    otherwise\.

    String equality is usable only if we can assume that the two trees are pure
    Tcl lists\.

  - <a name='9'></a>__::pt::ast__ __new0__ *s* *loc* ?*child*\.\.\.?

    This command command constructs the ast for a nonterminal node refering
    refering to the symbol *s* at position *loc* in the input, and the set
    of child nodes *child* \.\.\., from left right\. The latter may be empty\. The
    constructed node is returned as the result of the command\. The end position
    is *loc*\-1, i\.e\. one character before the start\. This type of node is
    possible for rules containing optional parts\.

  - <a name='10'></a>__::pt::ast__ __new__ *s* *start* *end* ?*child*\.\.\.?

    This command command constructs the ast for a nonterminal node refering to
    the symbol *s* covering the range of positions *start* to *end* in the
    input, and the set of child nodes *child* \.\.\., from left right\. The latter
    may be empty\. The constructed node is returned as the result of the command\.

# <a name='section3'></a>AST serialization format

Here we specify the format used by the Parser Tools to serialize Abstract Syntax
Trees \(ASTs\) as immutable values for transport, comparison, etc\.

Each node in an AST represents a nonterminal symbol of a grammar, and the range
of tokens/characters in the input covered by it\. ASTs do not contain terminal
symbols, i\.e\. tokens/characters\. These can be recovered from the input given a
symbol's location\.

We distinguish between *regular* and *canonical* serializations\. While a
tree may have more than one regular serialization only exactly one of them will
be *canonical*\.

  - Regular serialization

      1. The serialization of any AST is the serialization of its root node\.

      1. The serialization of any node is a Tcl list containing at least three
         elements\.

           1) The first element is the name of the nonterminal symbol stored in
              the node\.

           1) The second and third element are the locations of the first and
              last token in the token stream the node represents \(covers\)\.

                1. Locations are provided as non\-negative integer offsets from
                   the beginning of the token stream, with the first token found
                   in the stream located at offset 0 \(zero\)\.

                1. The end location has to be equal to or larger than the start
                   location\.

           1) All elements after the first three represent the children of the
              node, which are themselves nodes\. This means that the
              serializations of nodes without children, i\.e\. leaf nodes, have
              exactly three elements\. The children are stored in the list with
              the leftmost child first, and the rightmost child last\.

  - Canonical serialization

    The canonical serialization of an abstract syntax tree has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this tree\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection1'></a>Example

Assuming the parsing expression grammar below

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

and the input string

    120+5

then a parser should deliver the abstract syntax tree below \(except for
whitespace\)

    set ast {Expression 0 4
        {Factor 0 4
            {Term 0 2
                {Number 0 2
                    {Digit 0 0}
                    {Digit 1 1}
                    {Digit 2 2}
                }
            }
            {AddOp 3 3}
            {Term 4 4
                {Number 4 4
                    {Digit 4 4}
                }
            }
        }
    }

Or, more graphical

![](\.\./\.\./\.\./\.\./image/expr\_ast\.png)

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_cparam_config_critcl.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

[//000000001]: # (pt::cparam::configuration::critcl \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_cparam\_config\_critcl\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::cparam::configuration::critcl\(n\) 1\.0\.2 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::cparam::configuration::critcl \- C/PARAM, Canned configuration, Critcl

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::cparam::configuration::critcl ?1\.0\.2?  

[__::pt::cparam::configuration::critcl__ __def__ *name* *pkg* *version* *cmdprefix*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package is an adjunct to
__[pt::peg::to::cparam](pt\_peg\_to\_cparam\.md)__, to make the use of this
highly configurable package easier by providing a canned configuration\. When
applied this configuration causes the package
__[pt::peg::to::cparam](pt\_peg\_to\_cparam\.md)__ to generate
__critcl__\-based parser packages\.

It is a supporting package in the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_support\.png)

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::cparam::configuration::critcl__ __def__ *name* *pkg* *version* *cmdprefix*

    The command applies the configuration provided by this package to the
    *cmdprefix*, causing the creation of __critcl__\-based parsers whose
    class is *name*, in package *pkg* with *version*\.

    The use of a command prefix as API allows application of the configuration
    to not only __[pt::peg::to::cparam](pt\_peg\_to\_cparam\.md)__
    \(__pt::peg::to::cparam configure__\), but also export manager instances
    and PEG containers \(__$export configuration set__ and __\[$container
    exporter\] configuration set__ respectively\)\.

    Or anything other command prefix accepting two arguments, option and value\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_cparam_config_tea.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

[//000000001]: # (pt::cparam::configuration::tea \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_cparam\_config\_tea\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::cparam::configuration::tea\(n\) 0\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::cparam::configuration::tea \- C/PARAM, Canned configuration, TEA

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::cparam::configuration::tea ?0\.1?  

[__::pt::cparam::configuration::tea__ __def__ *name* *pkg* *version* *cmdprefix*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package is an adjunct to
__[pt::peg::to::cparam](pt\_peg\_to\_cparam\.md)__, to make the use of this
highly configurable package easier by providing a canned configuration\. When
applied this configuration causes the package
__[pt::peg::to::cparam](pt\_peg\_to\_cparam\.md)__ to generate plain parser
code ready for inclusion into a *TEA*\-based C extension\.

It is a supporting package in the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_support\.png)

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::cparam::configuration::tea__ __def__ *name* *pkg* *version* *cmdprefix*

    The command applies the configuration provided by this package to the
    *cmdprefix*, causing the creation of __tea__\-based parsers whose class
    is *name*, in package *pkg* with *version*\.

    The use of a command prefix as API allows application of the configuration
    to not only __[pt::peg::to::cparam](pt\_peg\_to\_cparam\.md)__
    \(__pt::peg::to::cparam configure__\), but also export manager instances
    and PEG containers \(__$export configuration set__ and __\[$container
    exporter\] configuration set__ respectively\)\.

    Or anything other command prefix accepting two arguments, option and value\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_from_api.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506

[//000000001]: # (pt\_import\_api \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_from\_api\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt\_import\_api\(i\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt\_import\_api \- Parser Tools Import API

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Converter API](#section2)

  - [Plugin API](#section3)

  - [Usage](#section4)

  - [PEG serialization format](#section5)

      - [Example](#subsection1)

  - [PE serialization format](#section6)

      - [Example](#subsection2)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

[__CONVERTER__ __convert__ *text*](#1)  
[__IncludeFile__ *currentfile* *path*](#2)  
[__::import__ *text*](#3)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This document describes two APIs\. First the API shared by all packages for the
conversion of some other format into Parsing Expression Grammars , and then the
API shared by the packages which implement the import plugins sitting on top of
the conversion packages\.

Its intended audience are people who wish to create their own converter for some
type of input, and/or an import plugin for their or some other converter\.

It resides in the Import section of the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_import\.png)

# <a name='section2'></a>Converter API

Any \(grammar\) import converter has to follow the rules set out below:

  1. A converter is a package\. Its name is arbitrary, however it is recommended
     to put it under the __::pt::peg::from__ namespace\.

  1. The package provides either a single Tcl command following the API outlined
     below, or a class command whose instances follow the same API\. The commands
     which follow the API are called *converter commands*\.

  1. A converter command has to provide the following single method with the
     given signature and semantic\. Converter commands are allowed to provide
     more methods of their own, but not less, and they may not provide different
     semantics for the standardized method\.

       - <a name='1'></a>__CONVERTER__ __convert__ *text*

         This method has to accept some *text*, a parsing expression grammar
         in some format\. The result of the method has to be the canonical
         serialization of a parsing expression grammar, as specified in section
         [PEG serialization format](#section5), the result of reading and
         converting the input text\.

# <a name='section3'></a>Plugin API

Any \(grammar\) import plugin has to follow the rules set out below:

  1. A plugin is a package\.

  1. The name of a plugin package has the form pt::peg::import::__FOO__,
     where __FOO__ is the name of the format the plugin will accept input
     for\.

  1. The plugin can expect that the package __pt::peg::import::plugin__ is
     present, as indicator that it was invoked from a genuine plugin manager\.

     It is recommended that a plugin does check for the presence of this
     package\.

  1. The plugin can expect that a command named __IncludeFile__ is present,
     with the signature

       - <a name='2'></a>__IncludeFile__ *currentfile* *path*

         This command has to be invoked by the plugin when it has to process an
         included file, if the format has the concept of such\.

         The plugin has to supply the following arguments

           * string *currentfile*

             The path of the file it is currently processing\. This may be the
             empty string if no such is known\.

           * string *path*

             The path of the include file as specified in the include directive
             being processed\.

         The result of the command will be a 5\-element list containing

           1) A boolean flag indicating the success \(__True__\) or failure
              \(__False__\) of the operation\.

           1) In case of success the contents of the included file, and the
              empty string otherwise\.

           1) The resolved, i\.e\. absolute path of the included file, if
              possible, or the unchanged *path* argument\. This is for display
              in an error message, or as the *currentfile* argument of another
              call to __IncludeFile__ should this file contain more files\.

           1) In case of success an empty string, and for failure a code
              indicating the reason for it, one of

                * notfound

                  The specified file could not be found\.

                * notread

                  The specified file was found, but not be read into memory\.

           1) An empty string in case of success of a __notfound__ failure,
              and an additional error message describing the reason for a
              __notread__ error in more detail\.

  1. A plugin has to provide a single command, in the global namespace, with the
     signature shown below\. Plugins are allowed to provide more commands of
     their own, but not less, and they may not provide different semantics for
     the standardized command\.

       - <a name='3'></a>__::import__ *text*

         This command has to accept the a text containing a parsing expression
         grammar in some format\. The result of the command has to be the result
         of the converter invoked by the plugin for the input grammar, the
         canonical serialization of the parsing expression grammar contained in
         the input\.

           * string *text*

             This argument will contain the parsing expression grammar for which
             to generate the serialization\. The specification of what a
             *canonical* serialization is can be found in the section [PEG
             serialization format](#section5)\.

  1. A single usage cycle of a plugin consists of an invokation of the command
     __[import](\.\./\.\./\.\./\.\./index\.md\#import)__\. This call has to leave
     the plugin in a state where another usage cycle can be run without
     problems\.

# <a name='section4'></a>Usage

To use a converter do

    # Get the converter (single command here, not class)
    package require the-converter-package

    # Perform the conversion
    set serial [theconverter convert $thegrammartext]

    ... process the result ...

To use a plugin __FOO__ do

    # Get an import plugin manager
    package require pt::peg::import
    pt::peg::import I

    # Run the plugin, and the converter inside.
    set serial [I import serial $thegrammartext FOO]

    ... process the result ...

# <a name='section5'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section6)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section6)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection2'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_introduction.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223

[//000000001]: # (pt\_introduction \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_introduction\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt\_introduction\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt\_introduction \- Introduction to Parser Tools

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Parser Tools Architecture](#section2)

      - [User Packages](#subsection1)

      - [Core Packages](#subsection2)

      - [Support Packages](#subsection3)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

# <a name='description'></a>DESCRIPTION

Welcome to the Parser Tools, a system for the creation and manipulation of
parsers and the grammars driving them\.

What are your goals which drove you here ?

  1. Do you simply wish to create a parser for some language ?

     In that case have a look at our parser generator application,
     __[pt](\.\./\.\./apps/pt\.md)__, or, for a slightly deeper access, the
     package underneath it, __[pt::pgen](pt\_pgen\.md)__\.

  1. Do you wish to know more about the architecture of the system ?

     This is described in the section [Parser Tools
     Architecture](#section2), below

  1. Is your interest in the theoretical background upon which the packages and
     tools are build ?

     See the *[Introduction to Parsing Expression
     Grammars](pt\_peg\_introduction\.md)*\.

# <a name='section2'></a>Parser Tools Architecture

The system can be split into roughly three layers, as seen in the figure below

![](\.\./\.\./\.\./\.\./image/architecture\.png) These layers are, from high to low:

  1. At the top we have the application and the packages using the packages of
     the layer below to implement common usecases\. One example is the
     aforementioned __[pt::pgen](pt\_pgen\.md)__ which provides a parser
     generator\.

     The list of packages belonging to this layer can be found in section [User
     Packages](#subsection1)

  1. In this layer we have the packages which provide the core of the
     functionality for the whole system\. They are, in essence, a set of blocks
     which can be combined in myriad ways, like Lego \(tm\)\. The packages in the
     previous level are 'just' pre\-fabricated combinations to cover the most
     important use cases\.

     The list of packages belonging to this layer can be found in section [Core
     Packages](#subsection2)

  1. Last, but not least is the layer containing support packages providing
     generic functionality which not necessarily belong into the module\.

     The list of packages belonging to this layer can be found in section
     [Support Packages](#subsection3)

## <a name='subsection1'></a>User Packages

  - __[pt::pgen](pt\_pgen\.md)__

## <a name='subsection2'></a>Core Packages

This layer is further split into six sections handling the storage, import,
export, transformation, and execution of grammars, plus grammar specific support
packages\.

  - Storage

      * __[pt::peg::container](pt\_peg\_container\.md)__

  - Export

      * __[pt::peg::export](pt\_peg\_export\.md)__

      * __[pt::peg::export::container](pt\_peg\_export\_container\.md)__

      * __[pt::peg::export::json](pt\_peg\_export\_json\.md)__

      * __[pt::peg::export::peg](pt\_peg\_export\_peg\.md)__

      * __[pt::peg::to::container](pt\_peg\_to\_container\.md)__

      * __[pt::peg::to::json](pt\_peg\_to\_json\.md)__

      * __[pt::peg::to::peg](pt\_peg\_to\_peg\.md)__

      * __[pt::peg::to::param](pt\_peg\_to\_param\.md)__

      * __[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__

      * __[pt::peg::to::cparam](pt\_peg\_to\_cparam\.md)__

  - Import

      * __[pt::peg::import](pt\_peg\_import\.md)__

      * __[pt::peg::import::container](pt\_peg\_import\_container\.md)__

      * __[pt::peg::import::json](pt\_peg\_import\_json\.md)__

      * __[pt::peg::import::peg](pt\_peg\_import\_peg\.md)__

      * __[pt::peg::from::container](pt\_peg\_from\_container\.md)__

      * __[pt::peg::from::json](pt\_peg\_from\_json\.md)__

      * __[pt::peg::from::peg](pt\_peg\_from\_peg\.md)__

  - Transformation

  - Execution

      * __[pt::peg::interp](pt\_peg\_interp\.md)__

      * __[pt::rde](pt\_rdengine\.md)__

  - Support

      * __[pt::tclparam::configuration::snit](pt\_tclparam\_config\_snit\.md)__

      * __[pt::tclparam::configuration::tcloo](pt\_tclparam\_config\_tcloo\.md)__

      * __[pt::cparam::configuration::critcl](pt\_cparam\_config\_critcl\.md)__

      * __[pt::ast](pt\_astree\.md)__

      * __[pt::pe](pt\_pexpression\.md)__

      * __[pt::peg](pt\_pegrammar\.md)__

## <a name='subsection3'></a>Support Packages

  - __[pt::peg::container::peg](pt\_peg\_container\_peg\.md)__

  - __text::write__

  - __configuration__

  - __paths__

  - __char__

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_json_language.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501

[//000000001]: # (pt::json\_language \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_json\_language\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::json\_language\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::json\_language \- The JSON Grammar Exchange Format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [Example](#subsection1)

  - [PEG serialization format](#section2)

      - [Example](#subsection2)

  - [PE serialization format](#section3)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

The __json__ format for parsing expression grammars was written as a data
exchange format not bound to Tcl\. It was defined to allow the exchange of
grammars with PackRat/PEG based parser generators for other languages\.

It is formally specified by the rules below:

  1. The JSON of any PEG is a JSON object\.

  1. This object holds a single key, __pt::grammar::peg__, and its value\.
     This value holds the contents of the grammar\.

  1. The contents of the grammar are a JSON object holding the set of
     nonterminal symbols and the starting expression\. The relevant keys and
     their values are

       - __rules__

         The value is a JSON object whose keys are the names of the nonterminal
         symbols known to the grammar\.

           1) Each nonterminal symbol may occur only once\.

           1) The empty string is not a legal nonterminal symbol\.

           1) The value for each symbol is a JSON object itself\. The relevant
              keys and their values in this dictionary are

                * __is__

                  The value is a JSON string holding the Tcl serialization of
                  the parsing expression describing the symbols sentennial
                  structure, as specified in the section [PE serialization
                  format](#section3)\.

                * __mode__

                  The value is a JSON holding holding one of three values
                  specifying how a parser should handle the semantic value
                  produced by the symbol\.

                    + __value__

                      The semantic value of the nonterminal symbol is an
                      abstract syntax tree consisting of a single node node for
                      the nonterminal itself, which has the ASTs of the symbol's
                      right hand side as its children\.

                    + __leaf__

                      The semantic value of the nonterminal symbol is an
                      abstract syntax tree consisting of a single node node for
                      the nonterminal, without any children\. Any ASTs generated
                      by the symbol's right hand side are discarded\.

                    + __void__

                      The nonterminal has no semantic value\. Any ASTs generated
                      by the symbol's right hand side are discarded \(as well\)\.

       - __start__

         The value is a JSON string holding the Tcl serialization of the start
         parsing expression of the grammar, as specified in the section [PE
         serialization format](#section3)\.

  1. The terminal symbols of the grammar are specified implicitly as the set of
     all terminal symbols used in the start expression and on the RHS of the
     grammar rules\.

As an aside to the advanced reader, this is pretty much the same as the Tcl
serialization of PE grammars, as specified in section [PEG serialization
format](#section2), except that the Tcl dictionaries and lists of that
format are mapped to JSON objects and arrays\. Only the parsing expressions
themselves are not translated further, but kept as JSON strings containing a
nested Tcl list, and there is no concept of canonicity for the JSON either\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

a JSON serialization for it is

    {
        "pt::grammar::peg" : {
            "rules" : {
                "AddOp"     : {
                    "is"   : "\/ {t -} {t +}",
                    "mode" : "value"
                },
                "Digit"     : {
                    "is"   : "\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}",
                    "mode" : "value"
                },
                "Expression" : {
                    "is"   : "\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}",
                    "mode" : "value"
                },
                "Factor"    : {
                    "is"   : "x {n Term} {* {x {n AddOp} {n Term}}}",
                    "mode" : "value"
                },
                "MulOp"     : {
                    "is"   : "\/ {t *} {t \/}",
                    "mode" : "value"
                },
                "Number"    : {
                    "is"   : "x {? {n Sign}} {+ {n Digit}}",
                    "mode" : "value"
                },
                "Sign"      : {
                    "is"   : "\/ {t -} {t +}",
                    "mode" : "value"
                },
                "Term"      : {
                    "is"   : "n Number",
                    "mode" : "value"
                }
            },
            "start" : "n Expression"
        }
    }

and a Tcl serialization of the same is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

The similarity of the latter to the JSON should be quite obvious\.

# <a name='section2'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section3)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section3)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section3'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_param.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644

[//000000001]: # (pt::param \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_param\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::param\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::param \- PackRat Machine Specification

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Architectural State](#section2)

  - [Instruction Set](#section3)

      - [Input Handling](#subsection1)

      - [Character Processing](#subsection2)

      - [Error Handling](#subsection3)

      - [Status Control](#subsection4)

      - [Location Handling](#subsection5)

      - [Nonterminal Execution](#subsection6)

      - [Value Construction](#subsection7)

      - [AST Construction](#subsection8)

      - [Control Flow](#subsection9)

  - [Interaction of the Instructions with the Architectural
    State](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

Welcome to the PackRat Machine \(short:
*[PARAM](\.\./\.\./\.\./\.\./index\.md\#param)*\), a virtual machine geared towards
the support of recursive descent parsers, especially packrat parsers\. Towards
this end it has features like the caching and reuse of partial results, the
caching of the encountered input, and the ability to backtrack in both input and
AST creation\.

This document specifies the machine in terms of its architectural state and
instruction set\.

# <a name='section2'></a>Architectural State

Any PARAM implementation has to manage at least the following state:

  - *Input* \(IN\)

    This is the channel the characters to process are read from\.

    This part of the machine's state is used and modified by the instructions
    defined in the section [Input Handling](#subsection1)\.

  - *Current Character* \(CC\)

    The character from the *input* currently tested against its possible
    alternatives\.

    This part of the machine's state is used and modified by the instructions
    defined in the section [Character Processing](#subsection2)\.

  - *Current Location* \(CL\)

    The location of the *current character* in the *input*, as offset
    relative to the beginning of the input\. Character offsets are counted from
    __0__\.

    This part of the machine's state is used and modified by the instructions
    defined in the sections [Character Processing](#subsection2),
    [Location Handling](#subsection5), and [Nonterminal
    Execution](#subsection6)\.

  - *Location Stack* \(LS\)

    A stack of locations in the *input*, saved for possible backtracking\.

    This part of the machine's state is used and modified by the instructions
    defined in the sections [Character Processing](#subsection2),
    [Location Handling](#subsection5), and [Nonterminal
    Execution](#subsection6)\.

  - *Status* \(ST\)

    The status of the last attempt of testing the *input*, indicating either
    success or failure\.

    This part of the machine's state is used and modified by the instructions
    defined in the sections [Status Control](#subsection4), [Character
    Processing](#subsection2), and [Nonterminal
    Execution](#subsection6)\.

  - *Semantic Value* \(SV\)

    The current semantic value, either empty, or a node for AST constructed from
    the input\.

    This part of the machine's state is used and modified by the instructions
    defined in the sections [Value Construction](#subsection7), and [AST
    Construction](#subsection8)\.

  - *AST Reduction Stack* \(ARS\)

    The stack of partial ASTs constructed during the processing of nonterminal
    symbols\.

    This part of the machine's state is used and modified by the instructions
    defined in the sections [Value Construction](#subsection7), and [AST
    Construction](#subsection8)\.

  - *AST Stack* \(AS\)

    The stack of reduction stacks, saved for possible backtracking\.

    This part of the machine's state is used and modified by the instructions
    defined in the sections [Value Construction](#subsection7), and [AST
    Construction](#subsection8)\.

  - *Error Status* \(ER\)

    The machine's current knowledge of errors\. This is either empty, or set to a
    pair of location in the input and the set of messages for that location\.

    *Note* that this part of the machine's state can be set even if the last
    test of the *current character* was successful\. For example, the
    \*\-operator \(matching a sub\-expression zero or more times\) in a PEG is always
    successful, even if it encounters a problem further in the input and has to
    backtrack\. Such problems must not be forgotten when continuing the parsing\.

    This part of the machine's state is used and modified by the instructions
    defined in the sections [Error Handling](#subsection3), [Character
    Processing](#subsection2), and [Nonterminal
    Execution](#subsection6)\.

  - *Error Stack* \(ES\)

    The stack of error stati, saved for backtracking\. This enables the machine
    to merge current and older error stati when performing backtracking in
    choices after an failed match\.

    This part of the machine's state is used and modified by the instructions
    defined in the sections [Error Handling](#subsection3), [Character
    Processing](#subsection2), and [Nonterminal
    Execution](#subsection6)\.

  - *Nonterminal Cache* \(NC\)

    A cache of machine states keyed by pairs name of nonterminal symbol and
    location in the input\. Each pair \(N, L\) is associated with a 4\-tuple holding
    the values to use for CL, ST, SV, and ER after the nonterminal N was parsed
    starting from the location L\. It is a performance aid for backtracking
    parsers, allowing them to avoid an expensive reparsing of complex
    nonterminal symbols if they have been encountered before at a given
    location\.

    The key location is where machine started the attempt to match the named
    nonterminal symbol, and the location in the saved 4\-tuple is where machine
    ended up after the attempt completed, independent of the success of the
    attempt\.

    This part of the machine's state is used and modified by the instructions
    defined in the section [Nonterminal Execution](#subsection6)\.

  - *Terminal Cache* \(TC\)

    A cache of characters read from IN, with their location in IN as pair of
    line and column, keyed by the location in IN, this time as character offset
    from the beginning of IN\. It is a performance aid for backtracking parsers,
    allowing them to avoid a possibly expensive rereading of characters from IN,
    or even enabling backtracking at, i\.e\. in the case of IN not randomly
    seekable\.

    This part of the machine's state is used and modified by the instructions
    defined in the section [Input Handling](#subsection1)\.

# <a name='section3'></a>Instruction Set

With the machine's architectural state specified it is now possible to specify
the instruction set operating on that state and to be implemented by any
realization of the PARAM\. The 37 instructions are grouped roughly by the state
they influence and/or query during their execution\.

## <a name='subsection1'></a>Input Handling

The instructions in this section mainly access IN, pulling the characters to
process into the machine\.

  - __input\_next__ *msg*

    This method reads the next character, i\.e\. the character after CL, from IN\.
    If successful this character becomes CC, CL is advanced by one, ES is
    cleared, and the operation is recorded as a success in ST\.

    The operation may read the character from IN if the next character is not
    yet known to TC\. If successful the new character is stored in TC, with its
    location \(line, column\), and the operation otherwise behaves as specified
    above\. Future reads from the same location, possible due to backtracking,
    will then be satisfied from TC instead of IN\.

    If, on the other hand, the end of IN was reached, the operation is recorded
    as failed in ST, CL is left unchanged, and the pair of CL and *msg*
    becomes the new ES\.

## <a name='subsection2'></a>Character Processing

The instructions in this section mainly access CC, testing it against character
classes, ranges, and individual characters\.

  - __test\_alnum__

    This instruction implements the special PE operator "alnum", which checks if
    CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_alpha__

    This instruction implements the special PE operator "alpha", which checks if
    CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_ascii__

    This instruction implements the special PE operator "ascii", which checks if
    CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_char__ *char*

    This instruction implements the character matching operator, i\.e\. it checks
    if CC is *char*\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_ddigit__

    This instruction implements the special PE operator "ddigit", which checks
    if CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_digit__

    This instruction implements the special PE operator "digit", which checks if
    CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_graph__

    This instruction implements the special PE operator "graph", which checks if
    CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_lower__

    This instruction implements the special PE operator "lower", which checks if
    CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_print__

    This instruction implements the special PE operator "print", which checks if
    CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_punct__

    This instruction implements the special PE operator "punct", which checks if
    CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_range__ *chars* *chare*

    This instruction implements the range matching operator, i\.e\. it checks if
    CC falls into the interval of characters spanned up by the two characters
    from *chars* to *chare*, both inclusive\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_space__

    This instruction implements the special PE operator "space", which checks if
    CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_upper__

    This instruction implements the special PE operator "upper", which checks if
    CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_wordchar__

    This instruction implements the special PE operator "wordchar", which checks
    if CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

  - __test\_xdigit__

    This instruction implements the special PE operator "xdigit", which checks
    if CC falls into the character class of the same name, or not\.

    Success and failure of the test are both recorded directly in ST\. Success
    further clears ES, wheras failure sets the pair of CL and expected input
    \(encoded as a leaf parsing expression\) as the new ES and then rewinds CL by
    one character, preparing the machine for another parse attempt by a possible
    alternative\.

## <a name='subsection3'></a>Error Handling

The instructions in this section mainly access ER and ES\.

  - __error\_clear__

    This instruction clears ER\.

  - __error\_push__

    This instruction makes a copy of ER and pushes it on ES\.

  - __error\_pop\_merge__

    This instruction takes the topmost entry of ES and merges the error status
    it contains with ES, making the result the new ES\.

    The merge is governed by four rules, with the merge result

      1. Empty if both states are empty\.

      1. The non\-empty state if only one of the two states is non\-empty\.

      1. The state with the larger location, if the two states specify different
         locations\.

      1. The pair of the location shared by the two states, and the set\-union of
         their messages for states at the same location\.

  - __error\_nonterminal__ *symbol*

    This is a guarded instruction\. It does nothing if either ES is empty, or if
    the location in ES is not just past the last location saved in LS\. Otherwise
    it sets the pair of that location and the nonterminal *symbol* as the new
    ES\.

    *Note*: In the above "just past" means "that location plus one", or also
    "the location of the next character after that location"\.

## <a name='subsection4'></a>Status Control

The instructions in this section directly manipulate ST\.

  - __status\_ok__

    This instruction sets ST to __true__, recording a success\.

  - __status\_fail__

    This instruction sets ST to __false__, recording a failure\.

  - __status\_negate__

    This instruction negates ST, turning a failure into a success and vice
    versa\.

## <a name='subsection5'></a>Location Handling

The instructions in this section access CL and LS\.

  - __loc\_push__

    This instruction makes a copy of CL and pushes it on LS\.

  - __loc\_pop\_discard__

    This instructions pops the last saved location from LS\.

  - __loc\_pop\_rewind__

    This instruction pops the last saved location from LS and restores it as CL\.

## <a name='subsection6'></a>Nonterminal Execution

The instructions in this section access and manipulate NC\.

  - __symbol\_restore__ *symbol*

    This instruction checks if NC contains data for the nonterminal *symbol*
    at CL, or not\. The result of the instruction is a boolean flag, with
    __True__ indicating that data was found in the cache\. In that case the
    instruction has further updated the architectural state of the machine with
    the cached information, namely CL, ST, ER, and SV\.

    The method with which the instruction's result is transformed into control
    flow is left undefined and the responsibility of the implementation\.

  - __symbol\_save__ *symbol*

    This instructions saves the current settings of CL, ST, ER, and SV in NC,
    using the pair of nonterminal *symbol* and the last location saved in LS
    as key\.

## <a name='subsection7'></a>Value Construction

The instructions in this section manipulate SV\.

  - __value\_clear__

    This instruction clears SV\.

  - __value\_leaf__ *symbol*

    This instruction constructs an AST node for *symbol* covering the range of
    IN from one character after the last location saved on LS to CL and stores
    it in SV\. \.\.\.

  - __value\_reduce__ *symbol*

    This instruction generally behaves like __value\_nonterminal\_leaf__,
    except that it takes all AST nodes on ARS, if any, and makes them the
    children of the new node, with the last node saved on ARS becoming the
    right\-most / last child\. Note that ARS is not modfied by this operation\.

## <a name='subsection8'></a>AST Construction

The instructions in this section manipulate ARS and AS\.

  - __ast\_value\_push__

    This instruction makes a copy of SV and pushes it on ARS\.

  - __ast\_push__

    This instruction pushes the current state of ARS on AS and then clears ARS\.

  - __ast\_pop\_rewind__

    This instruction pops the last entry saved on AS and restores it as the new
    state of ARS\.

  - __ast\_pop\_discard__

    This instruction pops the last entry saved on AS\.

## <a name='subsection9'></a>Control Flow

Normally this section would contain the specifications of the control flow
instructions of the PARAM, i\.e\. \(un\)conditional jumps and the like\. However,
this part of the PARAM is intentionally left unspecified\. This allows the
implementations to freely choose how to implement control flow\.

The implementation of this machine in Parser Tools, i\.e the package
__[pt::rde](pt\_rdengine\.md)__, is not only coded in Tcl, but also relies
on Tcl commands to provide it with control flow \(instructions\)\.

# <a name='section4'></a>Interaction of the Instructions with the Architectural State

    Instruction		Inputs				Outputs
    ======================= =======================		====================
    ast_pop_discard		AS			->	AS
    ast_pop_rewind		AS			->	AS, ARS
    ast_push		ARS, AS			->	AS
    ast_value_push		SV, ARS			->	ARS
    ======================= =======================		====================
    error_clear		-			->	ER
    error_nonterminal sym	ER, LS			->	ER
    error_pop_merge   	ES, ER			->	ER
    error_push		ES, ER			->	ES
    ======================= =======================		====================
    input_next msg		IN			->	TC, CL, CC, ST, ER
    ======================= =======================		====================
    loc_pop_discard		LS			->	LS
    loc_pop_rewind		LS			->	LS, CL
    loc_push		CL, LS			->	LS
    ======================= =======================		====================
    status_fail		-			->	ST
    status_negate		ST			->	ST
    status_ok		-			->	ST
    ======================= =======================		====================
    symbol_restore sym	NC			->	CL, ST, ER, SV
    symbol_save    sym	CL, ST, ER, SV LS	->	NC
    ======================= =======================		====================
    test_alnum  		CC			->	ST, ER
    test_alpha		CC			->	ST, ER
    test_ascii		CC			->	ST, ER
    test_char char		CC			->	ST, ER
    test_ddigit		CC			->	ST, ER
    test_digit		CC			->	ST, ER
    test_graph		CC			->	ST, ER
    test_lower		CC			->	ST, ER
    test_print		CC			->	ST, ER
    test_punct		CC			->	ST, ER
    test_range chars chare	CC			->	ST, ER
    test_space		CC			->	ST, ER
    test_upper		CC			->	ST, ER
    test_wordchar		CC			->	ST, ER
    test_xdigit		CC			->	ST, ER
    ======================= =======================		====================
    value_clear		-			->	SV
    value_leaf symbol	LS, CL			->	SV
    value_reduce symbol	ARS, LS, CL		->	SV
    ======================= =======================		====================

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer), [virtual
machine](\.\./\.\./\.\./\.\./index\.md\#virtual\_machine)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_parse_peg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

[//000000001]: # (pt\_parse\_peg \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_parse\_peg\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt\_parse\_peg\(i\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt\_parse\_peg \- Parser Tools PEG Parser

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Class API](#section2)

  - [Instances API](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::parse::peg 1  

[__pt::parse::peg__ ?*objectName*?](#1)  
[*objectName* __destroy__](#2)  
[*objectName* __parse__ *chan*](#3)  
[*objectName* __parset__ *text*](#4)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides a class whose instances are parsers for parsing expression
grammars in textual form\.

# <a name='section2'></a>Class API

  - <a name='1'></a>__pt::parse::peg__ ?*objectName*?

    The class command constructs parser instances, i\.e\. objects\. The result of
    the command is the fully\-qualified name of the instance command\.

    If no *objectName* is specified the class will generate and use an
    automatic name\. If the *objectName* was specified, but is not fully
    qualified the command will be created in the current namespace\.

# <a name='section3'></a>Instances API

All parser instances provide at least the methods shown below:

  - <a name='2'></a>*objectName* __destroy__

    This method destroys the parser instance, releasing all claimed memory and
    other resources, and deleting the instance command\.

    The result of the command is the empty string\.

  - <a name='3'></a>*objectName* __parse__ *chan*

    This method runs the parser using the contents of *chan* as input
    \(starting at the current location in the channel\), until parsing is not
    possible anymore, either because parsing has completed, or run into a syntax
    error\.

    Note here that the Parser Tools are based on Tcl 8\.5\+\. In other words, the
    channel argument is not restricted to files, sockets, etc\. We have the full
    power of *reflected channels* available\.

    It should also be noted that the parser pulls the characters from the input
    stream as it needs them\. If a parser created by this package has to be
    operated in a push aka event\-driven manner it will be necessary to go to Tcl
    8\.6\+ and use the __[coroutine::auto](\.\./coroutine/coro\_auto\.md)__ to
    wrap it into a coroutine where __[read](\.\./\.\./\.\./\.\./index\.md\#read)__
    is properly changed for push\-operation\.

    Upon successful completion the command returns an abstract syntax tree as
    its result\. This AST is in the form specified in section __AST
    serialization format__\. As a plain nested Tcl\-list it can then be
    processed with any Tcl commands the user likes, doing transformations,
    semantic checks, etc\. To help in this the package
    __[pt::ast](pt\_astree\.md)__ provides a set of convenience commands
    for validation of the tree's basic structure, printing it for debugging, and
    walking it either from the bottom up, or top down\.

    When encountering a syntax error the command will throw an error instead\.
    This error will be a 4\-element Tcl\-list, containing, in the order listed
    below:

      1. The string __pt::rde__ identifying it as parser runtime error\.

      1. The location of the parse error, as character offset from the beginning
         of the parsed input\.

      1. The location of parse error, now as a 2\-element list containing
         line\-number and column in the line\.

      1. A set of atomic parsing expressions indicating encoding the characters
         and/or nonterminal symbols the parser expected to see at the location
         of the parse error, but did not get\. For the specification of atomic
         parsing expressions please see the section __PE serialization
         format__\.

  - <a name='4'></a>*objectName* __parset__ *text*

    This method runs the parser using the string in *text* as input\. In all
    other ways it behaves like the method __parse__, shown above\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_parser_api.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444

[//000000001]: # (pt\_parser\_api \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_parser\_api\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt\_parser\_api\(i\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt\_parser\_api \- Parser API

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Class API](#section2)

  - [Instance API](#section3)

  - [Usage](#section4)

  - [AST serialization format](#section5)

      - [Example](#subsection1)

  - [PE serialization format](#section6)

      - [Example](#subsection2)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

[__className__ ?*objectName*?](#1)  
[*objectName* __destroy__](#2)  
[*objectName* __parse__ *chan*](#3)  
[*objectName* __parset__ *text*](#4)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This document describes the API shared by the grammar interpreter provided by
the package __[pt::peg::interp](pt\_peg\_interp\.md)__ and the parsers
generated by the __[pt](\.\./\.\./apps/pt\.md)__ application for the result
formats __critcl__, __snit__, and __oo__ regarding access to the
actual parsing functionality\.

Its intended audience are people who wish to create a parser for some language
of theirs and then use that parser within a Tcl\-based package or application\.

It resides in the User Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_user\_pkg\.png)

# <a name='section2'></a>Class API

  - <a name='1'></a>__className__ ?*objectName*?

    The class command constructs parser instances, i\.e\. objects\. The result of
    the command is the fully\-qualified name of the instance command\.

    If no *objectName* is specified the class will generate and use an
    automatic name\. If the *objectName* was specified, but is not fully
    qualified the command will be created in the current namespace\.

# <a name='section3'></a>Instance API

All parser instances provide at least the methods shown below:

  - <a name='2'></a>*objectName* __destroy__

    This method destroys the parser instance, releasing all claimed memory and
    other resources, and deleting the instance command\.

    The result of the command is the empty string\.

  - <a name='3'></a>*objectName* __parse__ *chan*

    This method runs the parser using the contents of *chan* as input
    \(starting at the current location in the channel\), until parsing is not
    possible anymore, either because parsing has completed, or run into a syntax
    error\.

    Note here that the Parser Tools are based on Tcl 8\.5\+\. In other words, the
    channel argument is not restricted to files, sockets, etc\. We have the full
    power of *reflected channels* available\.

    It should also be noted that the parser pulls the characters from the input
    stream as it needs them\. If a parser created by this package has to be
    operated in a push aka event\-driven manner it will be necessary to go to Tcl
    8\.6\+ and use the __[coroutine::auto](\.\./coroutine/coro\_auto\.md)__ to
    wrap it into a coroutine where __[read](\.\./\.\./\.\./\.\./index\.md\#read)__
    is properly changed for push\-operation\.

    Upon successful completion the command returns an abstract syntax tree as
    its result\. This AST is in the form specified in section [AST serialization
    format](#section5)\. As a plain nested Tcl\-list it can then be processed
    with any Tcl commands the user likes, doing transformations, semantic
    checks, etc\. To help in this the package __[pt::ast](pt\_astree\.md)__
    provides a set of convenience commands for validation of the tree's basic
    structure, printing it for debugging, and walking it either from the bottom
    up, or top down\.

    When encountering a syntax error the command will throw an error instead\.
    This error will be a 4\-element Tcl\-list, containing, in the order listed
    below:

      1. The string __pt::rde__ identifying it as parser runtime error\.

      1. The location of the parse error, as character offset from the beginning
         of the parsed input\.

      1. The location of parse error, now as a 2\-element list containing
         line\-number and column in the line\.

      1. A set of atomic parsing expressions indicating encoding the characters
         and/or nonterminal symbols the parser expected to see at the location
         of the parse error, but did not get\. For the specification of atomic
         parsing expressions please see the section [PE serialization
         format](#section6)\.

  - <a name='4'></a>*objectName* __parset__ *text*

    This method runs the parser using the string in *text* as input\. In all
    other ways it behaves like the method __parse__, shown above\.

# <a name='section4'></a>Usage

A generated parser is used like this

    package require the-parser-package ;# Generated by result-formats 'critcl', 'snit' or 'oo' of 'pt'.
    set parser [the-parser-class]

    set ast [$parser parse $channel]
    ... process the abstract syntax tree ...

When using a grammar interpreter for parsing some differences creep in

    package require the-grammar-package ;# Generated by result-format 'container' of 'pt'.
    set grammar [the-grammar-class]

    package require pt::peg::interp
    set parser [pt::peg::interp]

    $parser use $grammar

    set ast [$parser parse $channel]
    $parser destroy

    ... process the abstract syntax tree ...

# <a name='section5'></a>AST serialization format

Here we specify the format used by the Parser Tools to serialize Abstract Syntax
Trees \(ASTs\) as immutable values for transport, comparison, etc\.

Each node in an AST represents a nonterminal symbol of a grammar, and the range
of tokens/characters in the input covered by it\. ASTs do not contain terminal
symbols, i\.e\. tokens/characters\. These can be recovered from the input given a
symbol's location\.

We distinguish between *regular* and *canonical* serializations\. While a
tree may have more than one regular serialization only exactly one of them will
be *canonical*\.

  - Regular serialization

      1. The serialization of any AST is the serialization of its root node\.

      1. The serialization of any node is a Tcl list containing at least three
         elements\.

           1) The first element is the name of the nonterminal symbol stored in
              the node\.

           1) The second and third element are the locations of the first and
              last token in the token stream the node represents \(covers\)\.

                1. Locations are provided as non\-negative integer offsets from
                   the beginning of the token stream, with the first token found
                   in the stream located at offset 0 \(zero\)\.

                1. The end location has to be equal to or larger than the start
                   location\.

           1) All elements after the first three represent the children of the
              node, which are themselves nodes\. This means that the
              serializations of nodes without children, i\.e\. leaf nodes, have
              exactly three elements\. The children are stored in the list with
              the leftmost child first, and the rightmost child last\.

  - Canonical serialization

    The canonical serialization of an abstract syntax tree has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this tree\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection1'></a>Example

Assuming the parsing expression grammar below

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

and the input string

    120+5

then a parser should deliver the abstract syntax tree below \(except for
whitespace\)

    set ast {Expression 0 4
        {Factor 0 4
            {Term 0 2
                {Number 0 2
                    {Digit 0 0}
                    {Digit 1 1}
                    {Digit 2 2}
                }
            }
            {AddOp 3 3}
            {Term 4 4
                {Number 4 4
                    {Digit 4 4}
                }
            }
        }
    }

Or, more graphical

![](\.\./\.\./\.\./\.\./image/expr\_ast\.png)

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection2'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_container.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681

[//000000001]: # (pt::peg::container \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_peg\_container\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::container\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::container \- PEG Storage

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [Class API](#subsection1)

      - [Object API](#subsection2)

  - [PEG serialization format](#section2)

      - [Example](#subsection3)

  - [PE serialization format](#section3)

      - [Example](#subsection4)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit  
package require pt::peg::container ?1?  

[__::pt::peg__ *objectName* ?__=__&#124;__:=__&#124;__<\-\-__&#124;__as__&#124;__deserialize__ *src*?](#1)  
[*objectName* __destroy__](#2)  
[*objectName* __clear__](#3)  
[*objectName* __importer__](#4)  
[*objectName* __importer__ *object*](#5)  
[*objectName* __exporter__](#6)  
[*objectName* __exporter__ *object*](#7)  
[*objectName* __=__ *source*](#8)  
[*objectName* __\-\->__ *destination*](#9)  
[*objectName* __serialize__ ?*format*?](#10)  
[*objectName* __deserialize =__ *data* ?*format*?](#11)  
[*objectName* __deserialize \+=__ *data* ?*format*?](#12)  
[*objectName* __start__](#13)  
[*objectName* __start__ *pe*](#14)  
[*objectName* __nonterminals__](#15)  
[*objectName* __modes__](#16)  
[*objectName* __modes__ *dict*](#17)  
[*objectName* __rules__](#18)  
[*objectName* __rules__ *dict*](#19)  
[*objectName* __add__ ?*nt*\.\.\.?](#20)  
[*objectName* __remove__ ?*nt*\.\.\.?](#21)  
[*objectName* __exists__ *nt*](#22)  
[*objectName* __rename__ *ntold* *ntnew*](#23)  
[*objectName* __mode__ *nt*](#24)  
[*objectName* __mode__ *nt* *mode*](#25)  
[*objectName* __rule__ *nt*](#26)  
[*objectName* __rule__ *nt* *pe*](#27)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides a container class for parsing expression grammars, with
each instance storing a single grammar and allowing the user to manipulate and
query its definition\.

It resides in the Storage section of the Core Layer of Parser Tools, and is one
of the three pillars the management of parsing expression grammars resides on\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_container\.png) The other two pillars are,
as shown above

  1. *[PEG Import](pt\_peg\_import\.md)*, and

  1. *[PEG Export](pt\_peg\_export\.md)*

Packages related to this are:

  - __[pt::rde](pt\_rdengine\.md)__

    This package provides an implementation of PARAM, a virtual machine for the
    parsing of a channel, geared towards the needs of handling PEGs\.

  - __[pt::peg::interp](pt\_peg\_interp\.md)__

    This package implements an interpreter for PEGs on top of the virtual
    machine provided by __pt::peg::rde__

## <a name='subsection1'></a>Class API

The package exports the API described here\.

  - <a name='1'></a>__::pt::peg__ *objectName* ?__=__&#124;__:=__&#124;__<\-\-__&#124;__as__&#124;__deserialize__ *src*?

    The command creates a new container object for a parsing expression grammar
    and returns the fully qualified name of the object command as its result\.
    The API of this object command is described in the section [Object
    API](#subsection2)\. It may be used to invoke various operations on the
    object\.

    The new container will be empty if no *src* is specified\. Otherwise it
    will contain a copy of the grammar contained in the *src*\. All operators
    except __deserialize__ interpret *src* as a container object command\.
    The __deserialize__ operator interprets *src* as the serialization of
    a parsing expression grammar instead, as specified in section [PEG
    serialization format](#section2)\.

    An empty grammar has no nonterminal symbols, and the start expression is the
    empty expression, i\.e\. epsilon\. It is *valid*, but not *useful*\.

## <a name='subsection2'></a>Object API

All objects created by this package provide the following methods for the
manipulation and querying of their contents:

  - <a name='2'></a>*objectName* __destroy__

    This method destroys the object, releasing all claimed memory, and deleting
    the associated object command\.

  - <a name='3'></a>*objectName* __clear__

    This method resets the object to contain the empty grammar\. It does *not*
    destroy the object itself\.

  - <a name='4'></a>*objectName* __importer__

    This method returns the import manager object currently attached to the
    container, if any\.

  - <a name='5'></a>*objectName* __importer__ *object*

    This method attaches the *object* as import manager to the container, and
    returns it as the result of the command\. Note that the *object* is *not*
    put into ownership of the container\. I\.e\., destruction of the container will
    *not* destroy the *object*\.

    It is expected that *object* provides a method named __import text__
    which takes a text and a format name, and returns the canonical
    serialization of the table of contents contained in the text, assuming the
    given format\.

  - <a name='6'></a>*objectName* __exporter__

    This method returns the export manager object currently attached to the
    container, if any\.

  - <a name='7'></a>*objectName* __exporter__ *object*

    This method attaches the *object* as export manager to the container, and
    returns it as the result of the command\. Note that the *object* is *not*
    put into ownership of the container\. I\.e\., destruction of the container will
    *not* destroy the *object*\.

    It is expected that *object* provides a method named __export object__
    which takes the container and a format name, and returns a text encoding
    table of contents stored in the container, in the given format\. It is
    further expected that the *object* will use the container's method
    __serialize__ to obtain the serialization of the table of contents from
    which to generate the text\.

  - <a name='8'></a>*objectName* __=__ *source*

    This method assigns the contents of the PEG object *source* to ourselves,
    overwriting the existing definition\. This is the assignment operator for
    grammars\.

    This operation is in effect equivalent to

    > *objectName* __deserialize =__ \[*source* __serialize__\]

  - <a name='9'></a>*objectName* __\-\->__ *destination*

    This method assigns our contents to the PEG object *destination*,
    overwriting the existing definition\. This is the reverse assignment operator
    for grammars\.

    This operation is in effect equivalent to

    > *destination* __deserialize =__ \[*objectName* __serialize__\]

  - <a name='10'></a>*objectName* __serialize__ ?*format*?

    This method returns our grammar in some textual form usable for transfer,
    persistent storage, etc\. If no *format* is not specified the returned
    result is the canonical serialization of the grammar, as specified in the
    section [PEG serialization format](#section2)\.

    Otherwise the object will use the attached export manager to convert the
    data to the specified format\. In that case the method will fail with an
    error if the container has no export manager attached to it\.

  - <a name='11'></a>*objectName* __deserialize =__ *data* ?*format*?

    This is the complementary method to __serialize__\. It replaces the
    current definition with the grammar contained in the *data*\. If no
    *format* was specified it is assumed to be the regular serialization of a
    grammar, as specified in the section [PEG serialization
    format](#section2)

    Otherwise the object will use the attached import manager to convert the
    data from the specified format to a serialization it can handle\. In that
    case the method will fail with an error if the container has no import
    manager attached to it\.

    The result of the method is the empty string\.

  - <a name='12'></a>*objectName* __deserialize \+=__ *data* ?*format*?

    This method behaves like __deserialize =__ in its essentials, except
    that it merges the grammar in the *data* to its contents instead of
    replacing it\. The method will fail with an error and leave the grammar
    unchanged if merging is not possible, i\.e\. would produce an invalid grammar\.

    The result of the method is the empty string\.

  - <a name='13'></a>*objectName* __start__

    This method returns the current start expression of the grammar\.

  - <a name='14'></a>*objectName* __start__ *pe*

    This method defines the *start expression* of the grammar\. It replaces the
    current start expression with the parsing expression *pe*, and returns the
    new start expression\.

    The method will fail with an error and leave the grammar unchanged if *pe*
    does not contain a valid parsing expression as specified in the section [PE
    serialization format](#section3)\.

  - <a name='15'></a>*objectName* __nonterminals__

    This method returns the set of all nonterminal symbols known to the grammar\.

  - <a name='16'></a>*objectName* __modes__

    This method returns a dictionary mapping the set of all nonterminal symbols
    known to the grammar to their semantic modes\.

  - <a name='17'></a>*objectName* __modes__ *dict*

    This method takes a dictionary mapping a set of nonterminal symbols known to
    the grammar to their semantic modes, and returns the new full mapping of
    nonterminal symbols to semantic modes\.

    The method will fail with an error if any of the nonterminal symbols in the
    dictionary is not known to the grammar, or the empty string, i\.e\. an invalid
    nonterminal symbol, or if any the chosen *mode*s is not one of the legal
    values\.

  - <a name='18'></a>*objectName* __rules__

    This method returns a dictionary mapping the set of all nonterminal symbols
    known to the grammar to their parsing expressions \(right\-hand sides\)\.

  - <a name='19'></a>*objectName* __rules__ *dict*

    This method takes a dictionary mapping a set of nonterminal symbols known to
    the grammar to their parsing expressions \(right\-hand sides\), and returns the
    new full mapping of nonterminal symbols to parsing expressions\.

    The method will fail with an error any of the nonterminal symbols in the
    dictionary is not known to the grammar, or the empty string, i\.e\. an invalid
    nonterminal symbol, or any of the chosen parsing expressions is not a valid
    parsing expression as specified in the section [PE serialization
    format](#section3)\.

  - <a name='20'></a>*objectName* __add__ ?*nt*\.\.\.?

    This method adds the nonterminal symbols *nt*, etc\. to the grammar, and
    defines default semantic mode and expression for it \(__value__ and
    __epsilon__ respectively\)\. The method returns the empty string as its
    result\.

    The method will fail with an error and leaves the grammar unchanged if any
    of the nonterminal symbols are either already defined in our grammar, or are
    the empty string \(an invalid nonterminal symbol\)\.

    The method does nothing if no symbol was specified as argument\.

  - <a name='21'></a>*objectName* __remove__ ?*nt*\.\.\.?

    This method removes the named nonterminal symbols *nt*, etc\. from the set
    of nonterminal symbols known to our grammar\. The method returns the empty
    string as its result\.

    The method will fail with an error and leave the grammar unchanged if any of
    the nonterminal symbols is not known to the grammar, or is the empty string,
    i\.e\. an invalid nonterminal symbol\.

  - <a name='22'></a>*objectName* __exists__ *nt*

    This method tests whether the nonterminal symbol *nt* is known to our
    grammar or not\. The result is a boolean value\. It will be set to
    __true__ if *nt* is known, and __false__ otherwise\.

    The method will fail with an error if *nt* is the empty string, i\.e\. an
    invalid nonterminal symbol\.

  - <a name='23'></a>*objectName* __rename__ *ntold* *ntnew*

    This method renames the nonterminal symbol *ntold* to *ntnew*\. The
    method returns the empty string as its result\.

    The method will fail with an error and leave the grammar unchanged if either
    *ntold* is not known to the grammar, or *ntnew* is already known, or any
    of them is the empty string, i\.e\. an invalid nonterminal symbol\.

  - <a name='24'></a>*objectName* __mode__ *nt*

    This method returns the current semantic mode for the nonterminal symbol
    *nt*\.

    The method will fail with an error if *nt* is not known to the grammar, or
    the empty string, i\.e\. an invalid nonterminal symbol\.

  - <a name='25'></a>*objectName* __mode__ *nt* *mode*

    This mode sets the semantic mode for the nonterminal symbol *nt*, and
    returns the new mode\. The method will fail with an error if *nt* is not
    known to the grammar, or the empty string, i\.e\. an invalid nonterminal
    symbol, or the chosen *mode* is not one of the legal values\.

    The following modes are legal:

      * __value__

        The semantic value of the nonterminal symbol is an abstract syntax tree
        consisting of a single node node for the nonterminal itself, which has
        the ASTs of the symbol's right hand side as its children\.

      * __leaf__

        The semantic value of the nonterminal symbol is an abstract syntax tree
        consisting of a single node node for the nonterminal, without any
        children\. Any ASTs generated by the symbol's right hand side are
        discarded\.

      * __void__

        The nonterminal has no semantic value\. Any ASTs generated by the
        symbol's right hand side are discarded \(as well\)\.

  - <a name='26'></a>*objectName* __rule__ *nt*

    This method returns the current parsing expression \(right\-hand side\) for the
    nonterminal symbol *nt*\.

    The method will fail with an error if *nt* is not known to the grammar, or
    the empty string, i\.e\. an invalid nonterminal symbol\.

  - <a name='27'></a>*objectName* __rule__ *nt* *pe*

    This method set the parsing expression \(right\-hand side\) of the nonterminal
    *nt* to *pe*, and returns the new parsing expression\.

    The method will fail with an error if *nt* is not known to the grammar, or
    the empty string, i\.e\. an invalid nonterminal symbol, or *pe* does not
    contain a valid parsing expression as specified in the section [PE
    serialization format](#section3)\.

# <a name='section2'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section3)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section3)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection3'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section3'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection4'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_container_peg.md.

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
89
90
91
92
93
94
95

[//000000001]: # (pt::peg::container::peg \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_peg\_container\_peg\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::container::peg\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::container::peg \- PEG Storage\. Canned PEG grammar specification

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit  
package require pt::peg::container::peg ?1?  
package require pt::peg::container  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides a sub\-type of
__[pt::peg::container](pt\_peg\_container\.md)__ which is preloaded with a
parsing expression grammar describing a textual format for parsing expression
grammars\.

The sub\-type provides the exact same API as
__[pt::peg::container](pt\_peg\_container\.md)__\. Instead of duplicating
its contents the reader is asked to read the referenced document\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_export.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524

[//000000001]: # (pt::peg::export \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_peg\_export\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::export\(n\) 1\.0\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::export \- PEG Export

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

  - [PEG serialization format](#section3)

      - [Example](#subsection4)

  - [PE serialization format](#section4)

      - [Example](#subsection5)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit  
package require struct::map  
package require pt::peg  
package require pluginmgr  
package require pt::peg::export ?1\.0\.1?  

[__::pt::peg::export__ *objectName*](#1)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __export serial__ *serial* ?*format*?](#4)  
[*objectName* __export object__ *object* ?*format*?](#5)  
[*objectName* __configuration names__](#6)  
[*objectName* __configuration get__](#7)  
[*objectName* __configuration set__ *name* ?*value*?](#8)  
[*objectName* __configuration unset__ *pattern*\.\.\.](#9)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides a manager for parsing expression grammars, with each
instance handling a set of plugins for the export of them to other formats, i\.e\.
their conversion to, for example *[nroff](\.\./\.\./\.\./\.\./index\.md\#nroff)*,
*[HTML](\.\./\.\./\.\./\.\./index\.md\#html)*, etc\.

It resides in the Export section of the Core Layer of Parser Tools, and is one
of the three pillars the management of parsing expression grammars resides on\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_export\.png) The other two pillars are, as
shown above

  1. *[PEG Import](pt\_peg\_import\.md)*, and

  1. *[PEG Storage](pt\_peg\_container\.md)*

For information about the data structure which is the major input to the manager
objects provided by this package see the section [PEG serialization
format](#section3)\.

The plugin system of this class is based on the package
__[pluginmgr](\.\./pluginmgr/pluginmgr\.md)__, and configured to look for
plugins using

  1. the environment variable __GRAMMAR\_PEG\_EXPORT\_PLUGINS__,

  1. the environment variable __GRAMMAR\_PEG\_PLUGINS__,

  1. the environment variable __GRAMMAR\_PLUGINS__,

  1. the path "~/\.grammar/peg/export/plugin"

  1. the path "~/\.grammar/peg/plugin"

  1. the path "~/\.grammar/plugin"

  1. the path "~/\.grammar/peg/export/plugins"

  1. the path "~/\.grammar/peg/plugins"

  1. the path "~/\.grammar/plugins"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\GRAMMAR\\PEG\\EXPORT\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\GRAMMAR\\PEG\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\GRAMMAR\\PLUGINS"

The last three are used only when the package is run on a machine using the
Windows\(tm\) operating system\.

The whole system is delivered with three predefined export plugins, namely

  - container

    See *PEG Export Plugin\. To CONTAINER format* for details\.

  - json

    See *PEG Export Plugin\. To JSON format* for details\.

  - peg

    See *PEG Export Plugin\. To PEG format* for details\.

For readers wishing to write their own export plugin for some format, i\.e\.
*plugin writer*s, reading and understanding the *[Parser Tools Export
API](pt\_to\_api\.md)* specification is an absolute necessity, as it documents
the interaction between this package and its plugins in detail\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__::pt::peg::export__ *objectName*

    This command creates a new export manager object with an associated Tcl
    command whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

## <a name='subsection2'></a>Object command

All objects created by the __::pt::peg::export__ command have the following
general form:

  - <a name='2'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='4'></a>*objectName* __export serial__ *serial* ?*format*?

    This method takes the canonical serialization of a parsing expression
    grammar stored in *serial* and converts it to the specified *format*,
    using the export plugin for the format\. This will fail with an error if no
    plugin could be found for the format\. The string generated by the conversion
    process is returned as the result of this method\.

    If no format is specified the method defaults to __text__\.

    The specification of what a *canonical* serialization is can be found in
    the section [PEG serialization format](#section3)\.

    The plugin has to conform to the interface documented in the *[Parser
    Tools Export API](pt\_to\_api\.md)* specification\.

  - <a name='5'></a>*objectName* __export object__ *object* ?*format*?

    This method is a convenient wrapper around the __export serial__ method
    described by the previous item\. It expects that *object* is an object
    command supporting a __serialize__ method returning the canonical
    serialization of a parsing expression grammar\. It invokes that method, feeds
    the result into __export serial__ and returns the resulting string as
    its own result\.

  - <a name='6'></a>*objectName* __configuration names__

    This method returns a list containing the names of all configuration options
    currently known to the object\.

  - <a name='7'></a>*objectName* __configuration get__

    This method returns a dictionary containing the names and values of all
    configuration options currently known to the object\.

  - <a name='8'></a>*objectName* __configuration set__ *name* ?*value*?

    This method sets the configuration option *name* to the specified
    *value* and returns the new value of the option\.

    If no value is specified it simply returns the current value, without
    changing it\.

    Note that these configuration options and their values are simply passed to
    a plugin when the actual export is performed\. It is the plugin which checks
    the validity, not the manager\.

  - <a name='9'></a>*objectName* __configuration unset__ *pattern*\.\.\.

    This method unsets all configuration options matching the specified glob
    *pattern*s\. If no pattern is specified it will unset all currently defined
    configuration options\.

# <a name='section3'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section4)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section4)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection4'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section4'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection5'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_export_container.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535

[//000000001]: # (pt::peg::export::container \- Parser Tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::export::container\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::export::container \- PEG Export Plugin\. Write CONTAINER format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Configuration](#section3)

  - [Grammar Container](#section4)

      - [Example](#subsection1)

  - [PEG serialization format](#section5)

      - [Example](#subsection2)

  - [PE serialization format](#section6)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::export::container ?1?  
package require pt::peg::to::container  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the parsing expression grammar export plugin for the
generation of CONTAINER markup\.

It resides in the Export section of the Core Layer of Parser Tools and is
intended to be used by __[pt::peg::export](pt\_peg\_export\.md)__, the
export manager, sitting between it and the corresponding core conversion
functionality provided by
__[pt::peg::to::container](pt\_peg\_to\_container\.md)__\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_eplugins\.png)

While the direct use of this package with a regular interpreter is possible,
this is strongly disrecommended and requires a number of contortions to provide
the expected environment\. The proper way to use this functionality depends on
the situation:

  1. In an untrusted environment the proper access is through the package
     __[pt::peg::export](pt\_peg\_export\.md)__ and the export manager
     objects it provides\.

  1. In a trusted environment however simply use the package
     __[pt::peg::to::container](pt\_peg\_to\_container\.md)__ and access the
     core conversion functionality directly\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Plugin API
found in the *[Parser Tools Export API](pt\_to\_api\.md)* specification\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a parsing expression
    grammar, as specified in section [PEG serialization format](#section5),
    and contained in *serial*, the *configuration*, a dictionary, and
    generates CONTAINER markup encoding the grammar\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Configuration

The CONTAINER export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - enum *mode*

    The value of this configuration variable controls which methods of
    __[pt::peg](pt\_pegrammar\.md)__ instances the plugin will use to
    specify the grammar\. There are two legal values

      * __bulk__

        In this mode the methods __start__, __add__, __modes__, and
        __rules__ are used to specify the grammar in a bulk manner, i\.e\. as
        a set of nonterminal symbols, and two dictionaries mapping from the
        symbols to their semantic modes and parsing expressions\.

        This mode is the default\.

      * __incremental__

        In this mode the methods __start__, __add__, __mode__, and
        __rule__ are used to specify the grammar piecemal, with each
        nonterminal having its own block of defining commands\.

  - string *template*

    If this configuration variable is set it is assumed to contain a string into
    which to put the generated code and other configuration data\. The various
    locations are expected to be specified with the following placeholders:

      * __@user@__

        To be replaced with the value of the configuration variable
        __user__\.

      * __@format@__

        To be replaced with the the constant __CONTAINER__\.

      * __@file@__

        To be replaced with the value of the configuration variable
        __file__\.

      * __@name@__

        To be replaced with the value of the configuration variable
        __name__\.

      * __@mode@__

        To be replaced with the value of the configuration variable
        __mode__\.

      * __@code@__

        To be replaced with the generated code\.

    If this configuration variable is not set, or empty, then the plugin falls
    back to a standard template, which is defined as "__@code@__"\.

*Note* that this plugin may ignore the standard configuration variables
__user__, __format__, __file__, and their values, depending on the
chosen template\.

The content of the standard configuration variable __name__, if set, is used
as name of the grammar in the output\. Otherwise the plugin falls back to the
default name __a\_pe\_grammar__\.

# <a name='section4'></a>Grammar Container

The __container__ format is another form of describing parsing expression
grammars\. While data in this format is executable it does not constitute a
parser for the grammar\. It always has to be used in conjunction with the package
__[pt::peg::interp](pt\_peg\_interp\.md)__, a grammar interpreter\.

The format represents grammars by a __snit::type__, i\.e\. class, whose
instances are API\-compatible to the instances of the
__[pt::peg::container](pt\_peg\_container\.md)__ package, and which are
preloaded with the grammar in question\.

It has no direct formal specification beyond what was said above\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

one possible CONTAINER serialization for it is

    snit::type a_pe_grammar {
        constructor {} {
            install myg using pt::peg::container ${selfns}::G
            $myg start {n Expression}
            $myg add   AddOp Digit Expression Factor MulOp Number Sign Term
            $myg modes {
                AddOp      value
                Digit      value
                Expression value
                Factor     value
                MulOp      value
                Number     value
                Sign       value
                Term       value
            }
            $myg rules {
                AddOp      {/ {t -} {t +}}
                Digit      {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}
                Expression {/ {x {t \50} {n Expression} {t \51}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}}
                Factor     {x {n Term} {* {x {n AddOp} {n Term}}}}
                MulOp      {/ {t *} {t /}}
                Number     {x {? {n Sign}} {+ {n Digit}}}
                Sign       {/ {t -} {t +}}
                Term       {n Number}
            }
            return
        }

        component myg
        delegate method * to myg
    }

# <a name='section5'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section6)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section6)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[CONTAINER](\.\./\.\./\.\./\.\./index\.md\#container),
[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_export_json.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580

[//000000001]: # (pt::peg::export::json \- Parser Tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::export::json\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::export::json \- PEG Export Plugin\. Write JSON format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Configuration](#section3)

  - [JSON Grammar Exchange Format](#section4)

      - [Example](#subsection1)

  - [PEG serialization format](#section5)

      - [Example](#subsection2)

  - [PE serialization format](#section6)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::export::json ?1?  
package require pt::peg::to::json  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the parsing expression grammar export plugin for the
generation of JSON markup\.

It resides in the Export section of the Core Layer of Parser Tools and is
intended to be used by __[pt::peg::export](pt\_peg\_export\.md)__, the
export manager, sitting between it and the corresponding core conversion
functionality provided by __[pt::peg::to::json](pt\_peg\_to\_json\.md)__\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_eplugins\.png)

While the direct use of this package with a regular interpreter is possible,
this is strongly disrecommended and requires a number of contortions to provide
the expected environment\. The proper way to use this functionality depends on
the situation:

  1. In an untrusted environment the proper access is through the package
     __[pt::peg::export](pt\_peg\_export\.md)__ and the export manager
     objects it provides\.

  1. In a trusted environment however simply use the package
     __[pt::peg::to::json](pt\_peg\_to\_json\.md)__ and access the core
     conversion functionality directly\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Plugin API
found in the *[Parser Tools Export API](pt\_to\_api\.md)* specification\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a parsing expression
    grammar, as specified in section [PEG serialization format](#section5),
    and contained in *serial*, the *configuration*, a dictionary, and
    generates JSON markup encoding the grammar\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Configuration

The JSON export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - boolean *indented*

    If this flag is set the plugin will break the generated JSON code across
    lines and indent it according to its inner structure, with each key of a
    dictionary on a separate line\.

    If this flag is not set \(the default\), the whole JSON object will be written
    on a single line, with minimum spacing between all elements\.

  - boolean *aligned*

    If this flag is set the generator ensures that the values for the keys in a
    dictionary are vertically aligned with each other, for a nice table effect\.
    To make this work this also implies that __indented__ is set\.

    If this flag is not set \(the default\), the output is formatted as per the
    value of __indented__, without trying to align the values for dictionary
    keys\.

*Note* that this plugin ignores the standard configuration variables
__user__, __format__, __file__, and __name__, and their values\.

# <a name='section4'></a>JSON Grammar Exchange Format

The __json__ format for parsing expression grammars was written as a data
exchange format not bound to Tcl\. It was defined to allow the exchange of
grammars with PackRat/PEG based parser generators for other languages\.

It is formally specified by the rules below:

  1. The JSON of any PEG is a JSON object\.

  1. This object holds a single key, __pt::grammar::peg__, and its value\.
     This value holds the contents of the grammar\.

  1. The contents of the grammar are a JSON object holding the set of
     nonterminal symbols and the starting expression\. The relevant keys and
     their values are

       - __rules__

         The value is a JSON object whose keys are the names of the nonterminal
         symbols known to the grammar\.

           1) Each nonterminal symbol may occur only once\.

           1) The empty string is not a legal nonterminal symbol\.

           1) The value for each symbol is a JSON object itself\. The relevant
              keys and their values in this dictionary are

                * __is__

                  The value is a JSON string holding the Tcl serialization of
                  the parsing expression describing the symbols sentennial
                  structure, as specified in the section [PE serialization
                  format](#section6)\.

                * __mode__

                  The value is a JSON holding holding one of three values
                  specifying how a parser should handle the semantic value
                  produced by the symbol\.

                    + __value__

                      The semantic value of the nonterminal symbol is an
                      abstract syntax tree consisting of a single node node for
                      the nonterminal itself, which has the ASTs of the symbol's
                      right hand side as its children\.

                    + __leaf__

                      The semantic value of the nonterminal symbol is an
                      abstract syntax tree consisting of a single node node for
                      the nonterminal, without any children\. Any ASTs generated
                      by the symbol's right hand side are discarded\.

                    + __void__

                      The nonterminal has no semantic value\. Any ASTs generated
                      by the symbol's right hand side are discarded \(as well\)\.

       - __start__

         The value is a JSON string holding the Tcl serialization of the start
         parsing expression of the grammar, as specified in the section [PE
         serialization format](#section6)\.

  1. The terminal symbols of the grammar are specified implicitly as the set of
     all terminal symbols used in the start expression and on the RHS of the
     grammar rules\.

As an aside to the advanced reader, this is pretty much the same as the Tcl
serialization of PE grammars, as specified in section [PEG serialization
format](#section5), except that the Tcl dictionaries and lists of that
format are mapped to JSON objects and arrays\. Only the parsing expressions
themselves are not translated further, but kept as JSON strings containing a
nested Tcl list, and there is no concept of canonicity for the JSON either\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

a JSON serialization for it is

    {
        "pt::grammar::peg" : {
            "rules" : {
                "AddOp"     : {
                    "is"   : "\/ {t -} {t +}",
                    "mode" : "value"
                },
                "Digit"     : {
                    "is"   : "\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}",
                    "mode" : "value"
                },
                "Expression" : {
                    "is"   : "\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}",
                    "mode" : "value"
                },
                "Factor"    : {
                    "is"   : "x {n Term} {* {x {n AddOp} {n Term}}}",
                    "mode" : "value"
                },
                "MulOp"     : {
                    "is"   : "\/ {t *} {t \/}",
                    "mode" : "value"
                },
                "Number"    : {
                    "is"   : "x {? {n Sign}} {+ {n Digit}}",
                    "mode" : "value"
                },
                "Sign"      : {
                    "is"   : "\/ {t -} {t +}",
                    "mode" : "value"
                },
                "Term"      : {
                    "is"   : "n Number",
                    "mode" : "value"
                }
            },
            "start" : "n Expression"
        }
    }

and a Tcl serialization of the same is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

The similarity of the latter to the JSON should be quite obvious\.

# <a name='section5'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section6)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section6)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [JSON](\.\./\.\./\.\./\.\./index\.md\#json),
[LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_), [PEG](\.\./\.\./\.\./\.\./index\.md\#peg),
[TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl), [context\-free
languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_export_peg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576

[//000000001]: # (pt::peg::export::peg \- Parser Tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::export::peg\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::export::peg \- PEG Export Plugin\. Write PEG format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Configuration](#section3)

  - [PEG Specification Language](#section4)

      - [Example](#subsection1)

  - [PEG serialization format](#section5)

      - [Example](#subsection2)

  - [PE serialization format](#section6)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::export::peg ?1?  
package require pt::peg::to::peg  

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the parsing expression grammar export plugin for the
generation of PEG markup\.

It resides in the Export section of the Core Layer of Parser Tools and is
intended to be used by __[pt::peg::export](pt\_peg\_export\.md)__, the
export manager, sitting between it and the corresponding core conversion
functionality provided by __[pt::peg::to::peg](pt\_peg\_to\_peg\.md)__\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_eplugins\.png)

While the direct use of this package with a regular interpreter is possible,
this is strongly disrecommended and requires a number of contortions to provide
the expected environment\. The proper way to use this functionality depends on
the situation:

  1. In an untrusted environment the proper access is through the package
     __[pt::peg::export](pt\_peg\_export\.md)__ and the export manager
     objects it provides\.

  1. In a trusted environment however simply use the package
     __[pt::peg::to::peg](pt\_peg\_to\_peg\.md)__ and access the core
     conversion functionality directly\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Plugin API
found in the *[Parser Tools Export API](pt\_to\_api\.md)* specification\.

  - <a name='1'></a>__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a parsing expression
    grammar, as specified in section [PEG serialization format](#section5),
    and contained in *serial*, the *configuration*, a dictionary, and
    generates PEG markup encoding the grammar\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Configuration

The PEG export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - string *template*

    If this configuration variable is set it is assumed to contain a string into
    which to put the generated text and other configuration data\. The various
    locations are expected to be specified with the following placeholders:

      * __@user@__

        To be replaced with the value of the configuration variable
        __user__\.

      * __@format@__

        To be replaced with the the constant __PEG__\.

      * __@file@__

        To be replaced with the value of the configuration variable
        __file__\.

      * __@name@__

        To be replaced with the value of the configuration variable
        __name__\.

      * __@code@__

        To be replaced with the generated text\.

    If this configuration variable is not set, or empty, then the plugin falls
    back to a standard template, which is defined as "__@code@__"\.

*Note* that this plugin may ignore the standard configuration variables
__user__, __format__, __file__, and their values, depending on the
chosen template\.

The content of the standard configuration variable __name__, if set, is used
as name of the grammar in the output\. Otherwise the plugin falls back to the
default name __a\_pe\_grammar__\.

# <a name='section4'></a>PEG Specification Language

__peg__, a language for the specification of parsing expression grammars is
meant to be human readable, and writable as well, yet strict enough to allow its
processing by machine\. Like any computer language\. It was defined to make
writing the specification of a grammar easy, something the other formats found
in the Parser Tools do not lend themselves too\.

It is formally specified by the grammar shown below, written in itself\. For a
tutorial / introduction to the language please go and read the *[PEG Language
Tutorial](pt\_peg\_language\.md)*\.

    PEG pe-grammar-for-peg (Grammar)

    	# --------------------------------------------------------------------
            # Syntactical constructs

            Grammar         <- WHITESPACE Header Definition* Final EOF ;

            Header          <- PEG Identifier StartExpr ;
            Definition      <- Attribute? Identifier IS Expression SEMICOLON ;
            Attribute       <- (VOID / LEAF) COLON ;
            Expression      <- Sequence (SLASH Sequence)* ;
            Sequence        <- Prefix+ ;
            Prefix          <- (AND / NOT)? Suffix ;
            Suffix          <- Primary (QUESTION / STAR / PLUS)? ;
            Primary         <- ALNUM / ALPHA / ASCII / CONTROL / DDIGIT / DIGIT
                            /  GRAPH / LOWER / PRINTABLE / PUNCT / SPACE / UPPER
                            /  WORDCHAR / XDIGIT
                            / Identifier
                            /  OPEN Expression CLOSE
                            /  Literal
                            /  Class
                            /  DOT
                            ;
            Literal         <- APOSTROPH  (!APOSTROPH  Char)* APOSTROPH  WHITESPACE
                            /  DAPOSTROPH (!DAPOSTROPH Char)* DAPOSTROPH WHITESPACE ;
            Class           <- OPENB (!CLOSEB Range)* CLOSEB WHITESPACE ;
            Range           <- Char TO Char / Char ;

            StartExpr       <- OPEN Expression CLOSE ;
    void:   Final           <- "END" WHITESPACE SEMICOLON WHITESPACE ;

            # --------------------------------------------------------------------
            # Lexing constructs

            Identifier      <- Ident WHITESPACE ;
    leaf:   Ident           <- ([_:] / <alpha>) ([_:] / <alnum>)* ;
            Char            <- CharSpecial / CharOctalFull / CharOctalPart
                            /  CharUnicode / CharUnescaped
                            ;

    leaf:   CharSpecial     <- "\\" [nrt'"\[\]\\] ;
    leaf:   CharOctalFull   <- "\\" [0-2][0-7][0-7] ;
    leaf:   CharOctalPart   <- "\\" [0-7][0-7]? ;
    leaf:   CharUnicode     <- "\\" 'u' HexDigit (HexDigit (HexDigit HexDigit?)?)? ;
    leaf:   CharUnescaped   <- !"\\" . ;

    void:   HexDigit        <- [0-9a-fA-F] ;

    void:   TO              <- '-'           ;
    void:   OPENB           <- "["           ;
    void:   CLOSEB          <- "]"           ;
    void:   APOSTROPH       <- "'"           ;
    void:   DAPOSTROPH      <- '"'           ;
    void:   PEG             <- "PEG" !([_:] / <alnum>) WHITESPACE ;
    void:   IS              <- "<-"    WHITESPACE ;
    leaf:   VOID            <- "void"  WHITESPACE ; # Implies that definition has no semantic value.
    leaf:   LEAF            <- "leaf"  WHITESPACE ; # Implies that definition has no terminals.
    void:   SEMICOLON       <- ";"     WHITESPACE ;
    void:   COLON           <- ":"     WHITESPACE ;
    void:   SLASH           <- "/"     WHITESPACE ;
    leaf:   AND             <- "&"     WHITESPACE ;
    leaf:   NOT             <- "!"     WHITESPACE ;
    leaf:   QUESTION        <- "?"     WHITESPACE ;
    leaf:   STAR            <- "*"     WHITESPACE ;
    leaf:   PLUS            <- "+"     WHITESPACE ;
    void:   OPEN            <- "("     WHITESPACE ;
    void:   CLOSE           <- ")"     WHITESPACE ;
    leaf:   DOT             <- "."     WHITESPACE ;

    leaf:   ALNUM           <- "<alnum>"    WHITESPACE ;
    leaf:   ALPHA           <- "<alpha>"    WHITESPACE ;
    leaf:   ASCII           <- "<ascii>"    WHITESPACE ;
    leaf:   CONTROL         <- "<control>"  WHITESPACE ;
    leaf:   DDIGIT          <- "<ddigit>"   WHITESPACE ;
    leaf:   DIGIT           <- "<digit>"    WHITESPACE ;
    leaf:   GRAPH           <- "<graph>"    WHITESPACE ;
    leaf:   LOWER           <- "<lower>"    WHITESPACE ;
    leaf:   PRINTABLE       <- "<print>"    WHITESPACE ;
    leaf:   PUNCT           <- "<punct>"    WHITESPACE ;
    leaf:   SPACE           <- "<space>"    WHITESPACE ;
    leaf:   UPPER           <- "<upper>"    WHITESPACE ;
    leaf:   WORDCHAR        <- "<wordchar>" WHITESPACE ;
    leaf:   XDIGIT          <- "<xdigit>"   WHITESPACE ;

    void:   WHITESPACE      <- (" " / "\t" / EOL / COMMENT)* ;
    void:   COMMENT         <- '#' (!EOL .)* EOL ;
    void:   EOL             <- "\n\r" / "\n" / "\r" ;
    void:   EOF             <- !. ;

            # --------------------------------------------------------------------
    END;

## <a name='subsection1'></a>Example

Our example specifies the grammar for a basic 4\-operation calculator\.

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

Using higher\-level features of the notation, i\.e\. the character classes
\(predefined and custom\), this example can be rewritten as

    PEG calculator (Expression)
        Sign       <- [-+] 						;
        Number     <- Sign? <ddigit>+				;
        Expression <- '(' Expression ')' / (Factor (MulOp Factor)*)	;
        MulOp      <- [*/]						;
        Factor     <- Term (AddOp Term)*				;
        AddOp      <- [-+]						;
        Term       <- Number					;
    END;

# <a name='section5'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section6)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section6)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_from_container.md.

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

[//000000001]: # (pt::peg::from::container \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_peg\_from\_container\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::from::container\(n\) 0 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::from::container \- PEG Conversion\. From CONTAINER format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package does not exist\. There is no need for it\. The CONTAINER format for
parsing expression grammars is a piece of Tcl code which, then sourced, provides
a class whose instances have the grammar we wish to import loaded\. Another way
of looking at this is, the CONTAINER output is its own import package\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_from_json.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542

[//000000001]: # (pt::peg::from::json \- Parser Tools)
[//000000002]: # (Generated from file 'from\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::from::json\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::from::json \- PEG Conversion\. Read JSON format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [JSON Grammar Exchange Format](#section3)

      - [Example](#subsection1)

  - [PEG serialization format](#section4)

      - [Example](#subsection2)

  - [PE serialization format](#section5)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::from::json ?1?  
package require pt::peg  
package require json  

[__pt::peg::from::json__ __convert__ *text*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the converter from JSON markup to parsing expression
grammars\.

It resides in the Import section of the Core Layer of Parser Tools, and can be
used either directly with the other packages of this layer, or indirectly
through the import manager provided by
__[pt::peg::import](pt\_peg\_import\.md)__\. The latter is intented for use
in untrusted environments and done through the corresponding import plugin
__[pt::peg::import::json](pt\_peg\_import\_json\.md)__ sitting between
converter and import manager\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_iplugins\.png)

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Converter
API found in the *[Parser Tools Import API](pt\_from\_api\.md)*
specification\.

  - <a name='1'></a>__pt::peg::from::json__ __convert__ *text*

    This command takes the JSON markup encoding a parsing expression grammar and
    contained in *text*, and generates the canonical serialization of said
    grammar, as specified in section [PEG serialization format](#section4)\.
    The created value is then returned as the result of the command\.

# <a name='section3'></a>JSON Grammar Exchange Format

The __json__ format for parsing expression grammars was written as a data
exchange format not bound to Tcl\. It was defined to allow the exchange of
grammars with PackRat/PEG based parser generators for other languages\.

It is formally specified by the rules below:

  1. The JSON of any PEG is a JSON object\.

  1. This object holds a single key, __pt::grammar::peg__, and its value\.
     This value holds the contents of the grammar\.

  1. The contents of the grammar are a JSON object holding the set of
     nonterminal symbols and the starting expression\. The relevant keys and
     their values are

       - __rules__

         The value is a JSON object whose keys are the names of the nonterminal
         symbols known to the grammar\.

           1) Each nonterminal symbol may occur only once\.

           1) The empty string is not a legal nonterminal symbol\.

           1) The value for each symbol is a JSON object itself\. The relevant
              keys and their values in this dictionary are

                * __is__

                  The value is a JSON string holding the Tcl serialization of
                  the parsing expression describing the symbols sentennial
                  structure, as specified in the section [PE serialization
                  format](#section5)\.

                * __mode__

                  The value is a JSON holding holding one of three values
                  specifying how a parser should handle the semantic value
                  produced by the symbol\.

                    + __value__

                      The semantic value of the nonterminal symbol is an
                      abstract syntax tree consisting of a single node node for
                      the nonterminal itself, which has the ASTs of the symbol's
                      right hand side as its children\.

                    + __leaf__

                      The semantic value of the nonterminal symbol is an
                      abstract syntax tree consisting of a single node node for
                      the nonterminal, without any children\. Any ASTs generated
                      by the symbol's right hand side are discarded\.

                    + __void__

                      The nonterminal has no semantic value\. Any ASTs generated
                      by the symbol's right hand side are discarded \(as well\)\.

       - __start__

         The value is a JSON string holding the Tcl serialization of the start
         parsing expression of the grammar, as specified in the section [PE
         serialization format](#section5)\.

  1. The terminal symbols of the grammar are specified implicitly as the set of
     all terminal symbols used in the start expression and on the RHS of the
     grammar rules\.

As an aside to the advanced reader, this is pretty much the same as the Tcl
serialization of PE grammars, as specified in section [PEG serialization
format](#section4), except that the Tcl dictionaries and lists of that
format are mapped to JSON objects and arrays\. Only the parsing expressions
themselves are not translated further, but kept as JSON strings containing a
nested Tcl list, and there is no concept of canonicity for the JSON either\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

a JSON serialization for it is

    {
        "pt::grammar::peg" : {
            "rules" : {
                "AddOp"     : {
                    "is"   : "\/ {t -} {t +}",
                    "mode" : "value"
                },
                "Digit"     : {
                    "is"   : "\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}",
                    "mode" : "value"
                },
                "Expression" : {
                    "is"   : "\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}",
                    "mode" : "value"
                },
                "Factor"    : {
                    "is"   : "x {n Term} {* {x {n AddOp} {n Term}}}",
                    "mode" : "value"
                },
                "MulOp"     : {
                    "is"   : "\/ {t *} {t \/}",
                    "mode" : "value"
                },
                "Number"    : {
                    "is"   : "x {? {n Sign}} {+ {n Digit}}",
                    "mode" : "value"
                },
                "Sign"      : {
                    "is"   : "\/ {t -} {t +}",
                    "mode" : "value"
                },
                "Term"      : {
                    "is"   : "n Number",
                    "mode" : "value"
                }
            },
            "start" : "n Expression"
        }
    }

and a Tcl serialization of the same is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

The similarity of the latter to the JSON should be quite obvious\.

# <a name='section4'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section5)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section5)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section5'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [JSON](\.\./\.\./\.\./\.\./index\.md\#json),
[LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_), [PEG](\.\./\.\./\.\./\.\./index\.md\#peg),
[TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl), [context\-free
languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression), [format
conversion](\.\./\.\./\.\./\.\./index\.md\#format\_conversion),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_from_peg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518

[//000000001]: # (pt::peg::from::peg \- Parser Tools)
[//000000002]: # (Generated from file 'from\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::from::peg\(n\) 1\.0\.3 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::from::peg \- PEG Conversion\. Read PEG format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [PEG Specification Language](#section3)

      - [Example](#subsection1)

  - [PEG serialization format](#section4)

      - [Example](#subsection2)

  - [PE serialization format](#section5)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::from::peg ?1\.0\.3?  

[__pt::peg::from::peg__ __convert__ *text*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the converter from PEG markup to parsing expression
grammars\.

It resides in the Import section of the Core Layer of Parser Tools, and can be
used either directly with the other packages of this layer, or indirectly
through the import manager provided by
__[pt::peg::import](pt\_peg\_import\.md)__\. The latter is intented for use
in untrusted environments and done through the corresponding import plugin
__[pt::peg::import::peg](pt\_peg\_import\_peg\.md)__ sitting between
converter and import manager\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_iplugins\.png)

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Converter
API found in the *[Parser Tools Import API](pt\_from\_api\.md)*
specification\.

  - <a name='1'></a>__pt::peg::from::peg__ __convert__ *text*

    This command takes the PEG markup encoding a parsing expression grammar and
    contained in *text*, and generates the canonical serialization of said
    grammar, as specified in section [PEG serialization format](#section4)\.
    The created value is then returned as the result of the command\.

# <a name='section3'></a>PEG Specification Language

__peg__, a language for the specification of parsing expression grammars is
meant to be human readable, and writable as well, yet strict enough to allow its
processing by machine\. Like any computer language\. It was defined to make
writing the specification of a grammar easy, something the other formats found
in the Parser Tools do not lend themselves too\.

It is formally specified by the grammar shown below, written in itself\. For a
tutorial / introduction to the language please go and read the *[PEG Language
Tutorial](pt\_peg\_language\.md)*\.

    PEG pe-grammar-for-peg (Grammar)

    	# --------------------------------------------------------------------
            # Syntactical constructs

            Grammar         <- WHITESPACE Header Definition* Final EOF ;

            Header          <- PEG Identifier StartExpr ;
            Definition      <- Attribute? Identifier IS Expression SEMICOLON ;
            Attribute       <- (VOID / LEAF) COLON ;
            Expression      <- Sequence (SLASH Sequence)* ;
            Sequence        <- Prefix+ ;
            Prefix          <- (AND / NOT)? Suffix ;
            Suffix          <- Primary (QUESTION / STAR / PLUS)? ;
            Primary         <- ALNUM / ALPHA / ASCII / CONTROL / DDIGIT / DIGIT
                            /  GRAPH / LOWER / PRINTABLE / PUNCT / SPACE / UPPER
                            /  WORDCHAR / XDIGIT
                            / Identifier
                            /  OPEN Expression CLOSE
                            /  Literal
                            /  Class
                            /  DOT
                            ;
            Literal         <- APOSTROPH  (!APOSTROPH  Char)* APOSTROPH  WHITESPACE
                            /  DAPOSTROPH (!DAPOSTROPH Char)* DAPOSTROPH WHITESPACE ;
            Class           <- OPENB (!CLOSEB Range)* CLOSEB WHITESPACE ;
            Range           <- Char TO Char / Char ;

            StartExpr       <- OPEN Expression CLOSE ;
    void:   Final           <- "END" WHITESPACE SEMICOLON WHITESPACE ;

            # --------------------------------------------------------------------
            # Lexing constructs

            Identifier      <- Ident WHITESPACE ;
    leaf:   Ident           <- ([_:] / <alpha>) ([_:] / <alnum>)* ;
            Char            <- CharSpecial / CharOctalFull / CharOctalPart
                            /  CharUnicode / CharUnescaped
                            ;

    leaf:   CharSpecial     <- "\\" [nrt'"\[\]\\] ;
    leaf:   CharOctalFull   <- "\\" [0-2][0-7][0-7] ;
    leaf:   CharOctalPart   <- "\\" [0-7][0-7]? ;
    leaf:   CharUnicode     <- "\\" 'u' HexDigit (HexDigit (HexDigit HexDigit?)?)? ;
    leaf:   CharUnescaped   <- !"\\" . ;

    void:   HexDigit        <- [0-9a-fA-F] ;

    void:   TO              <- '-'           ;
    void:   OPENB           <- "["           ;
    void:   CLOSEB          <- "]"           ;
    void:   APOSTROPH       <- "'"           ;
    void:   DAPOSTROPH      <- '"'           ;
    void:   PEG             <- "PEG" !([_:] / <alnum>) WHITESPACE ;
    void:   IS              <- "<-"    WHITESPACE ;
    leaf:   VOID            <- "void"  WHITESPACE ; # Implies that definition has no semantic value.
    leaf:   LEAF            <- "leaf"  WHITESPACE ; # Implies that definition has no terminals.
    void:   SEMICOLON       <- ";"     WHITESPACE ;
    void:   COLON           <- ":"     WHITESPACE ;
    void:   SLASH           <- "/"     WHITESPACE ;
    leaf:   AND             <- "&"     WHITESPACE ;
    leaf:   NOT             <- "!"     WHITESPACE ;
    leaf:   QUESTION        <- "?"     WHITESPACE ;
    leaf:   STAR            <- "*"     WHITESPACE ;
    leaf:   PLUS            <- "+"     WHITESPACE ;
    void:   OPEN            <- "("     WHITESPACE ;
    void:   CLOSE           <- ")"     WHITESPACE ;
    leaf:   DOT             <- "."     WHITESPACE ;

    leaf:   ALNUM           <- "<alnum>"    WHITESPACE ;
    leaf:   ALPHA           <- "<alpha>"    WHITESPACE ;
    leaf:   ASCII           <- "<ascii>"    WHITESPACE ;
    leaf:   CONTROL         <- "<control>"  WHITESPACE ;
    leaf:   DDIGIT          <- "<ddigit>"   WHITESPACE ;
    leaf:   DIGIT           <- "<digit>"    WHITESPACE ;
    leaf:   GRAPH           <- "<graph>"    WHITESPACE ;
    leaf:   LOWER           <- "<lower>"    WHITESPACE ;
    leaf:   PRINTABLE       <- "<print>"    WHITESPACE ;
    leaf:   PUNCT           <- "<punct>"    WHITESPACE ;
    leaf:   SPACE           <- "<space>"    WHITESPACE ;
    leaf:   UPPER           <- "<upper>"    WHITESPACE ;
    leaf:   WORDCHAR        <- "<wordchar>" WHITESPACE ;
    leaf:   XDIGIT          <- "<xdigit>"   WHITESPACE ;

    void:   WHITESPACE      <- (" " / "\t" / EOL / COMMENT)* ;
    void:   COMMENT         <- '#' (!EOL .)* EOL ;
    void:   EOL             <- "\n\r" / "\n" / "\r" ;
    void:   EOF             <- !. ;

            # --------------------------------------------------------------------
    END;

## <a name='subsection1'></a>Example

Our example specifies the grammar for a basic 4\-operation calculator\.

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

Using higher\-level features of the notation, i\.e\. the character classes
\(predefined and custom\), this example can be rewritten as

    PEG calculator (Expression)
        Sign       <- [-+] 						;
        Number     <- Sign? <ddigit>+				;
        Expression <- '(' Expression ')' / (Factor (MulOp Factor)*)	;
        MulOp      <- [*/]						;
        Factor     <- Term (AddOp Term)*				;
        AddOp      <- [-+]						;
        Term       <- Number					;
    END;

# <a name='section4'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section5)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section5)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section5'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression), [format
conversion](\.\./\.\./\.\./\.\./index\.md\#format\_conversion),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_import.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543

[//000000001]: # (pt::peg::import \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_peg\_import\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::import\(n\) 1\.0\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::import \- PEG Import

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

  - [PEG serialization format](#section3)

      - [Example](#subsection4)

  - [PE serialization format](#section4)

      - [Example](#subsection5)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require Tcl 8\.5  
package require snit  
package require fileutil::paths  
package require pt::peg  
package require pluginmgr  
package require pt::peg::import ?1\.0\.1?  

[__::pt::peg::import__ *objectName*](#1)  
[__objectName__ __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __import text__ *text* ?*format*?](#4)  
[*objectName* __import file__ *path* ?*format*?](#5)  
[*objectName* __import object text__ *object* *text* ?*format*?](#6)  
[*objectName* __import object file__ *object* *path* ?*format*?](#7)  
[*objectName* __includes__](#8)  
[*objectName* __include add__ *path*](#9)  
[*objectName* __include remove__ *path*](#10)  
[*objectName* __include clear__](#11)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides a manager for parsing expression grammars, with each
instance handling a set of plugins for the import of them from other formats,
i\.e\. their conversion from, for example *peg*, *container*,
*[json](\.\./\.\./\.\./\.\./index\.md\#json)*, etc\.

It resides in the Import section of the Core Layer of Parser Tools, and is one
of the three pillars the management of parsing expression grammars resides on\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_import\.png) The other two pillars are, as
shown above

  1. *[PEG Export](pt\_peg\_export\.md)*, and

  1. *[PEG Storage](pt\_peg\_container\.md)*

For information about the data structure which is the major output of the
manager objects provided by this package see the section [PEG serialization
format](#section3)\.

The plugin system of our class is based on the package
__[pluginmgr](\.\./pluginmgr/pluginmgr\.md)__, and configured to look for
plugins using

  1. the environment variable __GRAMMAR\_PEG\_IMPORT\_PLUGINS__,

  1. the environment variable __GRAMMAR\_PEG\_PLUGINS__,

  1. the environment variable __GRAMMAR\_PLUGINS__,

  1. the path "~/\.grammar/peg/import/plugin"

  1. the path "~/\.grammar/peg/plugin"

  1. the path "~/\.grammar/plugin"

  1. the path "~/\.grammar/peg/import/plugins"

  1. the path "~/\.grammar/peg/plugins"

  1. the path "~/\.grammar/plugins"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\GRAMMAR\\PEG\\IMPORT\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\GRAMMAR\\PEG\\PLUGINS"

  1. the registry entry "HKEY\_CURRENT\_USER\\SOFTWARE\\GRAMMAR\\PLUGINS"

The last three are used only when the package is run on a machine using the
Windows\(tm\) operating system\.

The whole system is delivered with three predefined import plugins, namely

  - container

    See *[PEG Import Plugin\. From CONTAINER
    format](pt\_peg\_import\_container\.md)* for details\.

  - json

    See *PEG Import Plugin\. From JSON format* for details\.

  - peg

    See *PEG Import Plugin\. From PEG format* for details\.

For readers wishing to write their own import plugin for some format, i\.e\.
*plugin writer*s, reading and understanding the *Parser Tools Impport API*
specification is an absolute necessity, as it documents the interaction between
this package and its plugins in detail\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__::pt::peg::import__ *objectName*

    This command creates a new import manager object with an associated Tcl
    command whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The object command will be created under the
    current namespace if the *objectName* is not fully qualified, and in the
    specified namespace otherwise\.

## <a name='subsection2'></a>Object command

All objects created by the __::pt::peg::import__ command have the following
general form:

  - <a name='2'></a>__objectName__ __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object it is invoked for\.

  - <a name='4'></a>*objectName* __import text__ *text* ?*format*?

    This method takes the *text* and converts it from the specified *format*
    to the canonical serialization of a parsing expression grammar using the
    import plugin for the format\. An error is thrown if no plugin could be found
    for the format\. The serialization generated by the conversion process is
    returned as the result of this method\.

    If no format is specified the method defaults to __text__\.

    The specification of what a *canonical* serialization is can be found in
    the section [PEG serialization format](#section3)\.

    The plugin has to conform to the interface documented in the *[Parser
    Tools Import API](pt\_from\_api\.md)* specification\.

  - <a name='5'></a>*objectName* __import file__ *path* ?*format*?

    This method is a convenient wrapper around the __import text__ method
    described by the previous item\. It reads the contents of the specified file
    into memory, feeds the result into __import text__ and returns the
    resulting serialization as its own result\.

  - <a name='6'></a>*objectName* __import object text__ *object* *text* ?*format*?

    This method is a convenient wrapper around the __import text__ method
    described by the previous item\. It expects that *object* is an object
    command supporting a __deserialize__ method expecting the canonical
    serialization of a parsing expression grammar\. It imports the text using
    __import text__ and then feeds the resulting serialization into the
    *object* via __deserialize__\. This method returns the empty string as
    it result\.

  - <a name='7'></a>*objectName* __import object file__ *object* *path* ?*format*?

    This method behaves like __import object text__, except that it reads
    the text to convert from the specified file instead of being given it as
    argument\.

  - <a name='8'></a>*objectName* __includes__

    This method returns a list containing the currently specified paths to use
    to search for include files when processing input\. The order of paths in the
    list corresponds to the order in which they are used, from first to last,
    and also corresponds to the order in which they were added to the object\.

  - <a name='9'></a>*objectName* __include add__ *path*

    This methods adds the specified *path* to the list of paths to use to
    search for include files when processing input\. The path is added to the end
    of the list, causing it to be searched after all previously added paths\. The
    result of the command is the empty string\.

    The method does nothing if the path is already known\.

  - <a name='10'></a>*objectName* __include remove__ *path*

    This methods removes the specified *path* from the list of paths to use to
    search for include files when processing input\. The result of the command is
    the empty string\.

    The method does nothing if the path is not known\.

  - <a name='11'></a>*objectName* __include clear__

    This method clears the list of paths to use to search for include files when
    processing input\. The result of the command is the empty string\.

# <a name='section3'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section4)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section4)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection4'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section4'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection5'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_import_container.md.

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

[//000000001]: # (pt::peg::import::container \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_peg\_import\_container\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::import::container\(n\) 0 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::import::container \- PEG Import Plugin\. From CONTAINER format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package does not exist\. There is no need for it\. The CONTAINER format for
parsing expression grammars is a piece of Tcl code which, then sourced, provides
a class whose instances have the grammar we wish to import loaded\. Another way
of looking at this is, the CONTAINER output is its own import package\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_import_json.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551

[//000000001]: # (pt::peg::import::json \- Parser Tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::import::json\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::import::json \- PEG Import Plugin\. Read JSON format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [JSON Grammar Exchange Format](#section3)

      - [Example](#subsection1)

  - [PEG serialization format](#section4)

      - [Example](#subsection2)

  - [PE serialization format](#section5)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::import::json ?1?  
package require pt::peg::to::json  

[__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *text*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the parsing expression grammar import plugin processing
JSON markup\.

It resides in the Import section of the Core Layer of Parser Tools and is
intended to be used by __[pt::peg::import](pt\_peg\_import\.md)__, the
import manager, sitting between it and the corresponding core conversion
functionality provided by
__[pt::peg::from::json](pt\_peg\_from\_json\.md)__\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_iplugins\.png)

While the direct use of this package with a regular interpreter is possible,
this is strongly disrecommended and requires a number of contortions to provide
the expected environment\. The proper way to use this functionality depends on
the situation:

  1. In an untrusted environment the proper access is through the package
     __[pt::peg::import](pt\_peg\_import\.md)__ and the import manager
     objects it provides\.

  1. In a trusted environment however simply use the package
     __[pt::peg::from::json](pt\_peg\_from\_json\.md)__ and access the core
     conversion functionality directly\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Plugin API
found in the *[Parser Tools Import API](pt\_from\_api\.md)* specification\.

  - <a name='1'></a>__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *text*

    This command takes the JSON markup encoding a parsing expression grammar and
    contained in *text*, and generates the canonical serialization of said
    grammar, as specified in section [PEG serialization format](#section4)\.
    The created value is then returned as the result of the command\.

# <a name='section3'></a>JSON Grammar Exchange Format

The __json__ format for parsing expression grammars was written as a data
exchange format not bound to Tcl\. It was defined to allow the exchange of
grammars with PackRat/PEG based parser generators for other languages\.

It is formally specified by the rules below:

  1. The JSON of any PEG is a JSON object\.

  1. This object holds a single key, __pt::grammar::peg__, and its value\.
     This value holds the contents of the grammar\.

  1. The contents of the grammar are a JSON object holding the set of
     nonterminal symbols and the starting expression\. The relevant keys and
     their values are

       - __rules__

         The value is a JSON object whose keys are the names of the nonterminal
         symbols known to the grammar\.

           1) Each nonterminal symbol may occur only once\.

           1) The empty string is not a legal nonterminal symbol\.

           1) The value for each symbol is a JSON object itself\. The relevant
              keys and their values in this dictionary are

                * __is__

                  The value is a JSON string holding the Tcl serialization of
                  the parsing expression describing the symbols sentennial
                  structure, as specified in the section [PE serialization
                  format](#section5)\.

                * __mode__

                  The value is a JSON holding holding one of three values
                  specifying how a parser should handle the semantic value
                  produced by the symbol\.

                    + __value__

                      The semantic value of the nonterminal symbol is an
                      abstract syntax tree consisting of a single node node for
                      the nonterminal itself, which has the ASTs of the symbol's
                      right hand side as its children\.

                    + __leaf__

                      The semantic value of the nonterminal symbol is an
                      abstract syntax tree consisting of a single node node for
                      the nonterminal, without any children\. Any ASTs generated
                      by the symbol's right hand side are discarded\.

                    + __void__

                      The nonterminal has no semantic value\. Any ASTs generated
                      by the symbol's right hand side are discarded \(as well\)\.

       - __start__

         The value is a JSON string holding the Tcl serialization of the start
         parsing expression of the grammar, as specified in the section [PE
         serialization format](#section5)\.

  1. The terminal symbols of the grammar are specified implicitly as the set of
     all terminal symbols used in the start expression and on the RHS of the
     grammar rules\.

As an aside to the advanced reader, this is pretty much the same as the Tcl
serialization of PE grammars, as specified in section [PEG serialization
format](#section4), except that the Tcl dictionaries and lists of that
format are mapped to JSON objects and arrays\. Only the parsing expressions
themselves are not translated further, but kept as JSON strings containing a
nested Tcl list, and there is no concept of canonicity for the JSON either\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

a JSON serialization for it is

    {
        "pt::grammar::peg" : {
            "rules" : {
                "AddOp"     : {
                    "is"   : "\/ {t -} {t +}",
                    "mode" : "value"
                },
                "Digit"     : {
                    "is"   : "\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}",
                    "mode" : "value"
                },
                "Expression" : {
                    "is"   : "\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}",
                    "mode" : "value"
                },
                "Factor"    : {
                    "is"   : "x {n Term} {* {x {n AddOp} {n Term}}}",
                    "mode" : "value"
                },
                "MulOp"     : {
                    "is"   : "\/ {t *} {t \/}",
                    "mode" : "value"
                },
                "Number"    : {
                    "is"   : "x {? {n Sign}} {+ {n Digit}}",
                    "mode" : "value"
                },
                "Sign"      : {
                    "is"   : "\/ {t -} {t +}",
                    "mode" : "value"
                },
                "Term"      : {
                    "is"   : "n Number",
                    "mode" : "value"
                }
            },
            "start" : "n Expression"
        }
    }

and a Tcl serialization of the same is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

The similarity of the latter to the JSON should be quite obvious\.

# <a name='section4'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section5)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section5)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section5'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [JSON](\.\./\.\./\.\./\.\./index\.md\#json),
[LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_), [PEG](\.\./\.\./\.\./\.\./index\.md\#peg),
[TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl), [context\-free
languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[import](\.\./\.\./\.\./\.\./index\.md\#import),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_import_peg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528

[//000000001]: # (pt::peg::import::peg \- Parser Tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::import::peg\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::import::peg \- PEG Import Plugin\. Read PEG format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [PEG Specification Language](#section3)

      - [Example](#subsection1)

  - [PEG serialization format](#section4)

      - [Example](#subsection2)

  - [PE serialization format](#section5)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::import::peg ?1?  
package require pt::peg::to::peg  

[__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *text*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the parsing expression grammar import plugin processing
PEG markup\.

It resides in the Import section of the Core Layer of Parser Tools and is
intended to be used by __[pt::peg::import](pt\_peg\_import\.md)__, the
import manager, sitting between it and the corresponding core conversion
functionality provided by __[pt::peg::from::peg](pt\_peg\_from\_peg\.md)__\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_iplugins\.png)

While the direct use of this package with a regular interpreter is possible,
this is strongly disrecommended and requires a number of contortions to provide
the expected environment\. The proper way to use this functionality depends on
the situation:

  1. In an untrusted environment the proper access is through the package
     __[pt::peg::import](pt\_peg\_import\.md)__ and the import manager
     objects it provides\.

  1. In a trusted environment however simply use the package
     __[pt::peg::from::peg](pt\_peg\_from\_peg\.md)__ and access the core
     conversion functionality directly\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Plugin API
found in the *[Parser Tools Import API](pt\_from\_api\.md)* specification\.

  - <a name='1'></a>__[import](\.\./\.\./\.\./\.\./index\.md\#import)__ *text*

    This command takes the PEG markup encoding a parsing expression grammar and
    contained in *text*, and generates the canonical serialization of said
    grammar, as specified in section [PEG serialization format](#section4)\.
    The created value is then returned as the result of the command\.

# <a name='section3'></a>PEG Specification Language

__peg__, a language for the specification of parsing expression grammars is
meant to be human readable, and writable as well, yet strict enough to allow its
processing by machine\. Like any computer language\. It was defined to make
writing the specification of a grammar easy, something the other formats found
in the Parser Tools do not lend themselves too\.

It is formally specified by the grammar shown below, written in itself\. For a
tutorial / introduction to the language please go and read the *[PEG Language
Tutorial](pt\_peg\_language\.md)*\.

    PEG pe-grammar-for-peg (Grammar)

    	# --------------------------------------------------------------------
            # Syntactical constructs

            Grammar         <- WHITESPACE Header Definition* Final EOF ;

            Header          <- PEG Identifier StartExpr ;
            Definition      <- Attribute? Identifier IS Expression SEMICOLON ;
            Attribute       <- (VOID / LEAF) COLON ;
            Expression      <- Sequence (SLASH Sequence)* ;
            Sequence        <- Prefix+ ;
            Prefix          <- (AND / NOT)? Suffix ;
            Suffix          <- Primary (QUESTION / STAR / PLUS)? ;
            Primary         <- ALNUM / ALPHA / ASCII / CONTROL / DDIGIT / DIGIT
                            /  GRAPH / LOWER / PRINTABLE / PUNCT / SPACE / UPPER
                            /  WORDCHAR / XDIGIT
                            / Identifier
                            /  OPEN Expression CLOSE
                            /  Literal
                            /  Class
                            /  DOT
                            ;
            Literal         <- APOSTROPH  (!APOSTROPH  Char)* APOSTROPH  WHITESPACE
                            /  DAPOSTROPH (!DAPOSTROPH Char)* DAPOSTROPH WHITESPACE ;
            Class           <- OPENB (!CLOSEB Range)* CLOSEB WHITESPACE ;
            Range           <- Char TO Char / Char ;

            StartExpr       <- OPEN Expression CLOSE ;
    void:   Final           <- "END" WHITESPACE SEMICOLON WHITESPACE ;

            # --------------------------------------------------------------------
            # Lexing constructs

            Identifier      <- Ident WHITESPACE ;
    leaf:   Ident           <- ([_:] / <alpha>) ([_:] / <alnum>)* ;
            Char            <- CharSpecial / CharOctalFull / CharOctalPart
                            /  CharUnicode / CharUnescaped
                            ;

    leaf:   CharSpecial     <- "\\" [nrt'"\[\]\\] ;
    leaf:   CharOctalFull   <- "\\" [0-2][0-7][0-7] ;
    leaf:   CharOctalPart   <- "\\" [0-7][0-7]? ;
    leaf:   CharUnicode     <- "\\" 'u' HexDigit (HexDigit (HexDigit HexDigit?)?)? ;
    leaf:   CharUnescaped   <- !"\\" . ;

    void:   HexDigit        <- [0-9a-fA-F] ;

    void:   TO              <- '-'           ;
    void:   OPENB           <- "["           ;
    void:   CLOSEB          <- "]"           ;
    void:   APOSTROPH       <- "'"           ;
    void:   DAPOSTROPH      <- '"'           ;
    void:   PEG             <- "PEG" !([_:] / <alnum>) WHITESPACE ;
    void:   IS              <- "<-"    WHITESPACE ;
    leaf:   VOID            <- "void"  WHITESPACE ; # Implies that definition has no semantic value.
    leaf:   LEAF            <- "leaf"  WHITESPACE ; # Implies that definition has no terminals.
    void:   SEMICOLON       <- ";"     WHITESPACE ;
    void:   COLON           <- ":"     WHITESPACE ;
    void:   SLASH           <- "/"     WHITESPACE ;
    leaf:   AND             <- "&"     WHITESPACE ;
    leaf:   NOT             <- "!"     WHITESPACE ;
    leaf:   QUESTION        <- "?"     WHITESPACE ;
    leaf:   STAR            <- "*"     WHITESPACE ;
    leaf:   PLUS            <- "+"     WHITESPACE ;
    void:   OPEN            <- "("     WHITESPACE ;
    void:   CLOSE           <- ")"     WHITESPACE ;
    leaf:   DOT             <- "."     WHITESPACE ;

    leaf:   ALNUM           <- "<alnum>"    WHITESPACE ;
    leaf:   ALPHA           <- "<alpha>"    WHITESPACE ;
    leaf:   ASCII           <- "<ascii>"    WHITESPACE ;
    leaf:   CONTROL         <- "<control>"  WHITESPACE ;
    leaf:   DDIGIT          <- "<ddigit>"   WHITESPACE ;
    leaf:   DIGIT           <- "<digit>"    WHITESPACE ;
    leaf:   GRAPH           <- "<graph>"    WHITESPACE ;
    leaf:   LOWER           <- "<lower>"    WHITESPACE ;
    leaf:   PRINTABLE       <- "<print>"    WHITESPACE ;
    leaf:   PUNCT           <- "<punct>"    WHITESPACE ;
    leaf:   SPACE           <- "<space>"    WHITESPACE ;
    leaf:   UPPER           <- "<upper>"    WHITESPACE ;
    leaf:   WORDCHAR        <- "<wordchar>" WHITESPACE ;
    leaf:   XDIGIT          <- "<xdigit>"   WHITESPACE ;

    void:   WHITESPACE      <- (" " / "\t" / EOL / COMMENT)* ;
    void:   COMMENT         <- '#' (!EOL .)* EOL ;
    void:   EOL             <- "\n\r" / "\n" / "\r" ;
    void:   EOF             <- !. ;

            # --------------------------------------------------------------------
    END;

## <a name='subsection1'></a>Example

Our example specifies the grammar for a basic 4\-operation calculator\.

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

Using higher\-level features of the notation, i\.e\. the character classes
\(predefined and custom\), this example can be rewritten as

    PEG calculator (Expression)
        Sign       <- [-+] 						;
        Number     <- Sign? <ddigit>+				;
        Expression <- '(' Expression ')' / (Factor (MulOp Factor)*)	;
        MulOp      <- [*/]						;
        Factor     <- Term (AddOp Term)*				;
        AddOp      <- [-+]						;
        Term       <- Number					;
    END;

# <a name='section4'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section5)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section5)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section5'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[import](\.\./\.\./\.\./\.\./index\.md\#import),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar),
[plugin](\.\./\.\./\.\./\.\./index\.md\#plugin), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_interp.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441

[//000000001]: # (pt::peg::interp \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_peg\_interp\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::interp\(n\) 1\.0\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::interp \- Interpreter for parsing expression grammars

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [Class API](#subsection1)

      - [Object API](#subsection2)

  - [AST serialization format](#section2)

      - [Example](#subsection3)

  - [PE serialization format](#section3)

      - [Example](#subsection4)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::interp ?1\.0\.1?  
package require pt::rde ?1?  
package require snit  

[__::pt::peg::interp__ *objectName* *grammar*](#1)  
[*objectName* __use__ *grammar*](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __parse__ *chan*](#4)  
[*objectName* __parset__ *text*](#5)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides a class whose instances are Packrat parsers configurable
with a parsing expression grammar\. The grammar is executed directly, i\.e\.
interpreted, with the underlying runtime provided by the package
__[pt::rde](pt\_rdengine\.md)__, basing everything on the PARAM\.

Like the supporting runtime this package resides in the Execution section of the
Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_transform\.png)

The interpreted grammar is copied from an instance of
__[pt::peg::container](pt\_peg\_container\.md)__, or anything providing the
same API, like the container classes created by
__[pt::peg::to::container](pt\_peg\_to\_container\.md)__ or the associated
export plugin
__[pt::peg::export::container](pt\_peg\_export\_container\.md)__\.

## <a name='subsection1'></a>Class API

The package exports the API described here\.

  - <a name='1'></a>__::pt::peg::interp__ *objectName* *grammar*

    The command creates a new parser object and returns the fully qualified name
    of the object command as its result\. The API of this object command is
    described in the section [Object API](#subsection2)\. It may be used to
    invoke various operations on the object\.

    This new parser is configured for the execution of an empty PEG\. To
    configure the object for any other PEG use the method __use__ of the
    [Object API](#subsection2)\.

## <a name='subsection2'></a>Object API

All objects created by this package provide the following methods\.

  - <a name='2'></a>*objectName* __use__ *grammar*

    This method configures the grammar interpreter / parser for the execution of
    the PEG stored in *grammar*, an object which is API\-compatible to
    instances of __[pt::peg::container](pt\_peg\_container\.md)__\. The
    parser copies the relevant information of the grammar, and does *not* take
    ownership of the object\.

    The information of any previously used grammar is overwritten\.

    The result of the method the empty string\.

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the parser instance, releasing all claimed memory and
    other resources, and deleting the instance command\.

    The result of the command is the empty string\.

  - <a name='4'></a>*objectName* __parse__ *chan*

    This method runs the parser using the contents of *chan* as input
    \(starting at the current location in the channel\), until parsing is not
    possible anymore, either because parsing has completed, or run into a syntax
    error\.

    Note here that the Parser Tools are based on Tcl 8\.5\+\. In other words, the
    channel argument is not restricted to files, sockets, etc\. We have the full
    power of *reflected channels* available\.

    It should also be noted that the parser pulls the characters from the input
    stream as it needs them\. If a parser created by this package has to be
    operated in a push aka event\-driven manner it will be necessary to go to Tcl
    8\.6\+ and use the __[coroutine::auto](\.\./coroutine/coro\_auto\.md)__ to
    wrap it into a coroutine where __[read](\.\./\.\./\.\./\.\./index\.md\#read)__
    is properly changed for push\-operation\.

    Upon successful completion the command returns an abstract syntax tree as
    its result\. This AST is in the form specified in section [AST serialization
    format](#section2)\. As a plain nested Tcl\-list it can then be processed
    with any Tcl commands the user likes, doing transformations, semantic
    checks, etc\. To help in this the package __[pt::ast](pt\_astree\.md)__
    provides a set of convenience commands for validation of the tree's basic
    structure, printing it for debugging, and walking it either from the bottom
    up, or top down\.

    When encountering a syntax error the command will throw an error instead\.
    This error will be a 4\-element Tcl\-list, containing, in the order listed
    below:

      1. The string __pt::rde__ identifying it as parser runtime error\.

      1. The location of the parse error, as character offset from the beginning
         of the parsed input\.

      1. The location of parse error, now as a 2\-element list containing
         line\-number and column in the line\.

      1. A set of atomic parsing expressions indicating encoding the characters
         and/or nonterminal symbols the parser expected to see at the location
         of the parse error, but did not get\. For the specification of atomic
         parsing expressions please see the section [PE serialization
         format](#section3)\.

  - <a name='5'></a>*objectName* __parset__ *text*

    This method runs the parser using the string in *text* as input\. In all
    other ways it behaves like the method __parse__, shown above\.

# <a name='section2'></a>AST serialization format

Here we specify the format used by the Parser Tools to serialize Abstract Syntax
Trees \(ASTs\) as immutable values for transport, comparison, etc\.

Each node in an AST represents a nonterminal symbol of a grammar, and the range
of tokens/characters in the input covered by it\. ASTs do not contain terminal
symbols, i\.e\. tokens/characters\. These can be recovered from the input given a
symbol's location\.

We distinguish between *regular* and *canonical* serializations\. While a
tree may have more than one regular serialization only exactly one of them will
be *canonical*\.

  - Regular serialization

      1. The serialization of any AST is the serialization of its root node\.

      1. The serialization of any node is a Tcl list containing at least three
         elements\.

           1) The first element is the name of the nonterminal symbol stored in
              the node\.

           1) The second and third element are the locations of the first and
              last token in the token stream the node represents \(covers\)\.

                1. Locations are provided as non\-negative integer offsets from
                   the beginning of the token stream, with the first token found
                   in the stream located at offset 0 \(zero\)\.

                1. The end location has to be equal to or larger than the start
                   location\.

           1) All elements after the first three represent the children of the
              node, which are themselves nodes\. This means that the
              serializations of nodes without children, i\.e\. leaf nodes, have
              exactly three elements\. The children are stored in the list with
              the leftmost child first, and the rightmost child last\.

  - Canonical serialization

    The canonical serialization of an abstract syntax tree has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this tree\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection3'></a>Example

Assuming the parsing expression grammar below

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

and the input string

    120+5

then a parser should deliver the abstract syntax tree below \(except for
whitespace\)

    set ast {Expression 0 4
        {Factor 0 4
            {Term 0 2
                {Number 0 2
                    {Digit 0 0}
                    {Digit 1 1}
                    {Digit 2 2}
                }
            }
            {AddOp 3 3}
            {Term 4 4
                {Number 4 4
                    {Digit 4 4}
                }
            }
        }
    }

Or, more graphical

![](\.\./\.\./\.\./\.\./image/expr\_ast\.png)

# <a name='section3'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection4'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_introduction.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

[//000000001]: # (pt::pegrammar \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_peg\_introduction\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::pegrammar\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::pegrammar \- Introduction to Parsing Expression Grammars

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Formal definition](#section2)

  - [References](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

Welcome to the introduction to *[Parsing Expression
Grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar)*s \(short:
*[PEG](\.\./\.\./\.\./\.\./index\.md\#peg)*\), the formalism used by the Parser
Tools\. It is assumed that the reader has a basic knowledge of parsing theory,
i\.e\. *Context\-Free Grammars* \(short: *[CFG](\.\./\.\./\.\./\.\./index\.md\#cfg)*\),
*languages*, and associated terms like
*[LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_)*, *LR\(k\)*,
*[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)* and *nonterminal*
*symbols*, etc\. We do not intend to recapitulate such basic definitions or
terms like *useful*, *reachable*, \(left/right\) *recursive*, *nullable*,
first/last/follow sets, etc\. Please see the [References](#section3) at the
end instead if you are in need of places and books which provide such background
information\.

PEGs are formally very similar to CFGs, with terminal and nonterminal symbols,
start symbol, and rules defining the structure of each nonterminal symbol\. The
main difference lies in the choice\(sic\!\) of *choice* operators\. Where CFGs use
an *unordered choice* to represent alternatives PEGs use *prioritized
choice*\. Which is fancy way of saying that a parser has to try the first
alternative first and can try the other alternatives if only if it fails for the
first, and so on\.

On the CFG side this gives rise to LL\(k\) and LR\(k\) for making the choice
*deterministic* with a bounded *lookahead* of k terminal symbols, where LL
is in essence *topdown* aka *[recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent)* parsing, and LR
*bottomup* aka *shift reduce* parsing\.

On the PEG side we can parse input with recursive descent and *backtracking*
of failed choices, the latter of which amounts to unlimited lookahead\. By
additionally recording the success or failure of nonterminals at the specific
locations they were tried at and reusing this information after backtracking we
can avoid the exponential blowup of running time usually associated with
backtracking and keep the parsing linear\. The memory requirements are of course
higher due to this cache, as we are trading space for time\.

This is the basic concept behind *packrat parsers*\.

A limitation pure PEGs share with LL\(k\) CFGs is that *left\-recursive* grammars
cannot be parsed, with the associated recursive descent parser entering an
infinite recursion\. This limitation is usually overcome by extending pure PEGs
with explicit operators to specify repetition, zero or more, and one or more,
or, formally spoken, for the *kleene closure* and *positive kleene closure*\.
This is what the Parser Tools are doing\.

Another extension, specific to Parser Tools, is a set of operators which map
more or less directly to various character classes built into Tcl, i\.e\. the
classes reachable via __string is__\.

The remainder of this document consists of the formal definition of PEGs for the
mathematically inclined, and an appendix listing references to places with more
information on PEGs specifically, and parsing in general\.

# <a name='section2'></a>Formal definition

For the mathematically inclined, a Parsing Expression Grammar is a 4\-tuple
\(VN,VT,R,eS\) where

  - VN is a set of *nonterminal symbols*,

  - VT is a set of *terminal symbols*,

  - R is a finite set of rules, where each rule is a pair \(A,e\), A in VN, and
    *[e](\.\./\.\./\.\./\.\./index\.md\#e)* a *[parsing
    expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression)*\.

  - eS is a parsing expression, the *start expression*\.

Further constraints are

  - The intersection of VN and VT is empty\.

  - For all A in VT exists exactly one pair \(A,e\) in R\. In other words, R is a
    function from nonterminal symbols to parsing expressions\.

Parsing expressions are inductively defined via

  - The empty string \(epsilon\) is a parsing expression\.

  - A terminal symbol *a* is a parsing expression\.

  - A nonterminal symbol *A* is a parsing expression\.

  - *e1**e2* is a parsing expression for parsing expressions *e1* and
    *2*\. This is called *sequence*\.

  - *e1*/*e2* is a parsing expression for parsing expressions *e1* and
    *2*\. This is called *ordered choice*\.

  - *[e](\.\./\.\./\.\./\.\./index\.md\#e)*\* is a parsing expression for parsing
    expression *[e](\.\./\.\./\.\./\.\./index\.md\#e)*\. This is called
    *zero\-or\-more repetitions*, also known as *kleene closure*\.

  - *[e](\.\./\.\./\.\./\.\./index\.md\#e)*\+ is a parsing expression for parsing
    expression *[e](\.\./\.\./\.\./\.\./index\.md\#e)*\. This is called *one\-or\-more
    repetitions*, also known as *positive kleene closure*\.

  - \!*[e](\.\./\.\./\.\./\.\./index\.md\#e)* is a parsing expression for parsing
    expression *e1*\. This is called a *not lookahead predicate*\.

  - &*[e](\.\./\.\./\.\./\.\./index\.md\#e)* is a parsing expression for parsing
    expression *e1*\. This is called an *and lookahead predicate*\.

PEGs are used to define a grammatical structure for streams of symbols over VT\.
They are a modern phrasing of older formalisms invented by Alexander Birham\.
These formalisms were called TS \(TMG recognition scheme\), and gTS \(generalized
TS\)\. Later they were renamed to TPDL \(Top\-Down Parsing Languages\) and gTPDL
\(generalized TPDL\)\.

They can be easily implemented by recursive descent parsers with backtracking\.
This makes them relatives of LL\(k\) Context\-Free Grammars\.

# <a name='section3'></a>References

  1. [The Packrat Parsing and Parsing Expression Grammars
     Page](http://www\.pdos\.lcs\.mit\.edu/~baford/packrat/), by Bryan Ford,
     Massachusetts Institute of Technology\. This is the main entry page to PEGs,
     and their realization through Packrat Parsers\.

  1. [http://en\.wikipedia\.org/wiki/Parsing\_expression\_grammar](http://en\.wikipedia\.org/wiki/Parsing\_expression\_grammar)
     Wikipedia's entry about Parsing Expression Grammars\.

  1. [Parsing Techniques \- A Practical Guide
     ](http://www\.cs\.vu\.nl/~dick/PTAPG\.html), an online book offering a
     clear, accessible, and thorough discussion of many different parsing
     techniques with their interrelations and applicabilities, including error
     recovery techniques\.

  1. [Compilers and Compiler Generators](http://scifac\.ru\.ac\.za/compilers/),
     an online book using CoCo/R, a generator for recursive descent parsers\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_language.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496

[//000000001]: # (pt::peg\_language \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_peg\_language\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg\_language\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg\_language \- PEG Language Tutorial

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [What is it?](#section2)

  - [The elements of the language](#section3)

      - [Basic structure](#subsection1)

      - [Names](#subsection2)

      - [Rules](#subsection3)

      - [Expressions](#subsection4)

      - [Whitespace and comments](#subsection5)

      - [Nonterminal attributes](#subsection6)

  - [PEG Specification Language](#section4)

      - [Example](#subsection7)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

Welcome to the tutorial / introduction for the [PEG Specification
Language](#section4)\. If you are already familiar with the language we are
about to discuss, and only wish to refresh your memory you can, of course, skip
ahead to the aforementioned section and just read the full formal specification\.

# <a name='section2'></a>What is it?

__peg__, a language for the specification of parsing expression grammars is
meant to be human readable, and writable as well, yet strict enough to allow its
processing by machine\. Like any computer language\. It was defined to make
writing the specification of a grammar easy, something the other formats found
in the Parser Tools do not lend themselves too\.

# <a name='section3'></a>The elements of the language

## <a name='subsection1'></a>Basic structure

The general outline of a textual PEG is

    PEG <<name>> (<<start-expression>>)
       <<rules>>
    END;

*Note*: We are using text in double angle\-brackets as place\-holders for things
not yet explained\.

## <a name='subsection2'></a>Names

Names are mostly used to identify the nonterminal symbols of the grammar, i\.e\.
that which occurs on the left\-hand side of a <rule>\. The exception to that is
the name given after the keyword __PEG__ \(see previous section\), which is
the name of the whole grammar itself\.

The structure of a name is simple:

  1. It begins with a letter, underscore, or colon, followed by

  1. zero or more letters, digits, underscores, or colons\.

Or, in formal textual notation:

    ([_:] / <alpha>) ([_:] / <alnum>)*

Examples of names:

    Hello
    ::world
    _:submarine55_

Examples of text which are *not* names:

    12
    .bogus
    0wrong
    @location

## <a name='subsection3'></a>Rules

The main body of the text of a grammar specification is taken up by the rules\.
Each rule defines the sentence structure of one nonterminal symbol\. Their basic
structure is

    <<name>>  <-  <<expression>> ;

The <name> specifies the nonterminal symbol to be defined, the <expression>
after the arrow \(<\-\) then declares its structure\.

Note that each rule ends in a single semicolon, even the last\. I\.e\. the
semicolon is a rule *terminator*, not a separator\.

We can have as many rules as we like, as long as we define each nonterminal
symbol at most once, and have at least one rule for each nonterminal symbol
which occured in an expression, i\.e\. in either the start expression of the
grammar, or the right\-hande side of a rule\.

## <a name='subsection4'></a>Expressions

The *parsing* expressions are the meat of any specification\. They declare the
structure of the whole document \(<<start\-expression>>\), and of all nonterminal
symbols\.

All expressions are made up out of *atomic expressions* and *operators*
combining them\. We have operators for choosing between alternatives, repetition
of parts, and for look\-ahead constraints\. There is no explicit operator for the
sequencing \(also known as *concatenation*\) of parts however\. This is specified
by simply placing the parts adjacent to each other\.

Here are the operators, from highest to lowest priority \(i\.e\. strength of
binding\):

    # Binary operators.

    <<expression-1>>     <<expression-2>>  # sequence. parse 1, then 2.
    <<expression-1>>  /  <<expression-2>>  # alternative. try to parse 1, and parse 2 if 1 failed to parse.

    # Prefix operators. Lookahead constraints. Same priority.

    & <<expression>>  # Parse expression, ok on successful parse.
    ! <<expression>>  # Ditto, except ok on failure to parse.

    # Suffix operators. Repetition. Same priority.

    <<expression>> ?  # Parse expression none, or once (repeat 0 or 1).
    <<expression>> *  # Parse expression zero or more times.
    <<expression>> +  # Parse expression one or more times.

    # Expression nesting

    ( <<expression>> ) # Put an expression in parens to change its priority.

With this we can now deconstruct the formal expression for names given in
section [Names](#subsection2):

    ([_:] / <alpha>) ([_:] / <alnum>)*

It is a sequence of two parts,

    [_:] / <alpha>

and

    ([_:] / <alnum>)*

The parentheses around the parts kept their inner alternatives bound together
against the normally higher priority of the sequence\. Each of the two parts is
an alternative, with the second part additionally repeated zero or more times,
leaving us with the three atomic expressions

    [_:]
    <alpha>
    <alnum>

And *atomic expressions* are our next topic\. They fall into three classes:

  1. names, i\.e\. nonterminal symbols,

  1. string literals, and

  1. character classes\.

Names we know about already, or see section [Names](#subsection2) for a
refresher\.

String literals are simple\. They are delimited by \(i\.e\. start and end with\)
either a single or double\-apostroph, and in between the delimiters we can have
any character but the delimiter itself\. They can be empty as well\. Examples of
strings are

    ''
    ""
    'hello'
    "umbra"
    "'"
    '"'

The last two examples show how to place any of the delimiters into a string\.

For the last, but not least of our atomic expressions, character classes, we
have a number of predefined classes, shown below, and the ability to construct
or own\. The predefined classes are:

    <alnum>    # Any unicode alphabet or digit character (string is alnum).
    <alpha>    # Any unicode alphabet character (string is alpha).
    <ascii>    # Any unicode character below codepoint 0x80 (string is ascii).
    <control>  # Any unicode control character (string is control).
    <ddigit>   # The digit characters [0-9].
    <digit>    # Any unicode digit character (string is digit).
    <graph>    # Any unicode printing character, except space (string is graph).
    <lower>    # Any unicode lower-case alphabet character (string is lower).
    <print>    # Any unicode printing character, incl. space (string is print).
    <punct>    # Any unicode punctuation character (string is punct).
    <space>    # Any unicode space character (string is space).
    <upper>    # Any unicode upper-case alphabet character (string is upper).
    <wordchar> # Any unicode word character (string is wordchar).
    <xdigit>   # The hexadecimal digit characters [0-9a-fA-F].
    .          # Any character, except end of input.

And the syntax of custom\-defined character classes is

    [ <<range>>* ]

where each range is either a single character, or of the form

    <<character>> - <character>>

Examples for character classes we have seen already in the course of this
introduction are

    [_:]
    [0-9]
    [0-9a-fA-F]

We are nearly done with expressions\. The only piece left is to tell how the
characters in character classes and string literals are specified\.

Basically characters in the input stand for themselves, and in addition to that
we several types of escape syntax to to repesent control characters, or
characters outside of the encoding the text is in\.

All the escaped forms are started with a backslash character \('\\', unicode
codepoint 0x5C\)\. This is then followed by a series of octal digits, or 'u' and
hexedecimal digits, or a regular character from a fixed set for various control
characters\. Some examples:

    \n \r \t \' \" \[ \] \\ #
    \000 up to \277         # octal escape, all ascii character, leading 0's can be removed.
    \u2CA7                  # hexadecimal escape, all unicode characters.
    #                       # Here 2ca7 <=> Koptic Small Letter Tau

## <a name='subsection5'></a>Whitespace and comments

One issue not touched upon so far is whitespace and comments\.

Whitespace is any unicode space character, i\.e\. anything in the character class
<space>, and comments\. The latter are sequences of characters starting with a
'\#' \(hash, unicode codepoint 0x23\) and ending at the next end\-of\-line\.

Whitespace can be freely used between all syntactical elements of a grammar
specification\. It cannot be used inside of syntactical elements, like names,
string literals, predefined character classes, etc\.

## <a name='subsection6'></a>Nonterminal attributes

Lastly, a more advanced topic\. In the section [Rules](#subsection3) we gave
the structure of a rule as

    <<name>>  <-  <<expression>> ;

This is not quite true\. It is possible to associate a semantic mode with the
nonterminal in the rule, by writing it before the name, separated from it by a
colon, i\.e\. writing

    <<mode>> : <<name>>  <-  <<expression>> ;

is also allowed\. This mode is optional\. The known modes and their meanings are:

  - __value__

    The semantic value of the nonterminal symbol is an abstract syntax tree
    consisting of a single node node for the nonterminal itself, which has the
    ASTs of the symbol's right hand side as its children\.

  - __leaf__

    The semantic value of the nonterminal symbol is an abstract syntax tree
    consisting of a single node node for the nonterminal, without any children\.
    Any ASTs generated by the symbol's right hand side are discarded\.

  - __void__

    The nonterminal has no semantic value\. Any ASTs generated by the symbol's
    right hand side are discarded \(as well\)\.

Of these three modes only __leaf__ and __void__ can be specified
directly\. __value__ is implicitly specified by the absence of a mode before
the nonterminal\.

Now, with all the above under our belt it should be possible to not only read,
but understand the formal specification of the text representation shown in the
next section, written in itself\.

# <a name='section4'></a>PEG Specification Language

__peg__, a language for the specification of parsing expression grammars is
meant to be human readable, and writable as well, yet strict enough to allow its
processing by machine\. Like any computer language\. It was defined to make
writing the specification of a grammar easy, something the other formats found
in the Parser Tools do not lend themselves too\.

It is formally specified by the grammar shown below, written in itself\. For a
tutorial / introduction to the language please go and read the *PEG Language
Tutorial*\.

    PEG pe-grammar-for-peg (Grammar)

    	# --------------------------------------------------------------------
            # Syntactical constructs

            Grammar         <- WHITESPACE Header Definition* Final EOF ;

            Header          <- PEG Identifier StartExpr ;
            Definition      <- Attribute? Identifier IS Expression SEMICOLON ;
            Attribute       <- (VOID / LEAF) COLON ;
            Expression      <- Sequence (SLASH Sequence)* ;
            Sequence        <- Prefix+ ;
            Prefix          <- (AND / NOT)? Suffix ;
            Suffix          <- Primary (QUESTION / STAR / PLUS)? ;
            Primary         <- ALNUM / ALPHA / ASCII / CONTROL / DDIGIT / DIGIT
                            /  GRAPH / LOWER / PRINTABLE / PUNCT / SPACE / UPPER
                            /  WORDCHAR / XDIGIT
                            / Identifier
                            /  OPEN Expression CLOSE
                            /  Literal
                            /  Class
                            /  DOT
                            ;
            Literal         <- APOSTROPH  (!APOSTROPH  Char)* APOSTROPH  WHITESPACE
                            /  DAPOSTROPH (!DAPOSTROPH Char)* DAPOSTROPH WHITESPACE ;
            Class           <- OPENB (!CLOSEB Range)* CLOSEB WHITESPACE ;
            Range           <- Char TO Char / Char ;

            StartExpr       <- OPEN Expression CLOSE ;
    void:   Final           <- "END" WHITESPACE SEMICOLON WHITESPACE ;

            # --------------------------------------------------------------------
            # Lexing constructs

            Identifier      <- Ident WHITESPACE ;
    leaf:   Ident           <- ([_:] / <alpha>) ([_:] / <alnum>)* ;
            Char            <- CharSpecial / CharOctalFull / CharOctalPart
                            /  CharUnicode / CharUnescaped
                            ;

    leaf:   CharSpecial     <- "\\" [nrt'"\[\]\\] ;
    leaf:   CharOctalFull   <- "\\" [0-2][0-7][0-7] ;
    leaf:   CharOctalPart   <- "\\" [0-7][0-7]? ;
    leaf:   CharUnicode     <- "\\" 'u' HexDigit (HexDigit (HexDigit HexDigit?)?)? ;
    leaf:   CharUnescaped   <- !"\\" . ;

    void:   HexDigit        <- [0-9a-fA-F] ;

    void:   TO              <- '-'           ;
    void:   OPENB           <- "["           ;
    void:   CLOSEB          <- "]"           ;
    void:   APOSTROPH       <- "'"           ;
    void:   DAPOSTROPH      <- '"'           ;
    void:   PEG             <- "PEG" !([_:] / <alnum>) WHITESPACE ;
    void:   IS              <- "<-"    WHITESPACE ;
    leaf:   VOID            <- "void"  WHITESPACE ; # Implies that definition has no semantic value.
    leaf:   LEAF            <- "leaf"  WHITESPACE ; # Implies that definition has no terminals.
    void:   SEMICOLON       <- ";"     WHITESPACE ;
    void:   COLON           <- ":"     WHITESPACE ;
    void:   SLASH           <- "/"     WHITESPACE ;
    leaf:   AND             <- "&"     WHITESPACE ;
    leaf:   NOT             <- "!"     WHITESPACE ;
    leaf:   QUESTION        <- "?"     WHITESPACE ;
    leaf:   STAR            <- "*"     WHITESPACE ;
    leaf:   PLUS            <- "+"     WHITESPACE ;
    void:   OPEN            <- "("     WHITESPACE ;
    void:   CLOSE           <- ")"     WHITESPACE ;
    leaf:   DOT             <- "."     WHITESPACE ;

    leaf:   ALNUM           <- "<alnum>"    WHITESPACE ;
    leaf:   ALPHA           <- "<alpha>"    WHITESPACE ;
    leaf:   ASCII           <- "<ascii>"    WHITESPACE ;
    leaf:   CONTROL         <- "<control>"  WHITESPACE ;
    leaf:   DDIGIT          <- "<ddigit>"   WHITESPACE ;
    leaf:   DIGIT           <- "<digit>"    WHITESPACE ;
    leaf:   GRAPH           <- "<graph>"    WHITESPACE ;
    leaf:   LOWER           <- "<lower>"    WHITESPACE ;
    leaf:   PRINTABLE       <- "<print>"    WHITESPACE ;
    leaf:   PUNCT           <- "<punct>"    WHITESPACE ;
    leaf:   SPACE           <- "<space>"    WHITESPACE ;
    leaf:   UPPER           <- "<upper>"    WHITESPACE ;
    leaf:   WORDCHAR        <- "<wordchar>" WHITESPACE ;
    leaf:   XDIGIT          <- "<xdigit>"   WHITESPACE ;

    void:   WHITESPACE      <- (" " / "\t" / EOL / COMMENT)* ;
    void:   COMMENT         <- '#' (!EOL .)* EOL ;
    void:   EOL             <- "\n\r" / "\n" / "\r" ;
    void:   EOF             <- !. ;

            # --------------------------------------------------------------------
    END;

## <a name='subsection7'></a>Example

Our example specifies the grammar for a basic 4\-operation calculator\.

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

Using higher\-level features of the notation, i\.e\. the character classes
\(predefined and custom\), this example can be rewritten as

    PEG calculator (Expression)
        Sign       <- [-+] 						;
        Number     <- Sign? <ddigit>+				;
        Expression <- '(' Expression ')' / (Factor (MulOp Factor)*)	;
        MulOp      <- [*/]						;
        Factor     <- Term (AddOp Term)*				;
        AddOp      <- [-+]						;
        Term       <- Number					;
    END;

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_op.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248

[//000000001]: # (pt\_peg\_op \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_peg\_op\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt\_peg\_op\(i\) 1\.1\.0 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt\_peg\_op \- Parser Tools PE Grammar Utility Operations

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::op ?1\.1\.0?  

[__::peg::peg::op__ __called__ *container*](#1)  
[__::peg::peg::op__ __dechain__ *container*](#2)  
[__::peg::peg::op__ __drop unreachable__ *container*](#3)  
[__::peg::peg::op__ __drop unrealizable__ *container*](#4)  
[__::peg::peg::op__ __flatten__ *container*](#5)  
[__::peg::peg::op__ __minimize__ *container*](#6)  
[__::peg::peg::op__ __modeopt__ *container*](#7)  
[__::peg::peg::op__ __reachable__ *container*](#8)  
[__::peg::peg::op__ __realizable__ *container*](#9)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides a number of utility commands manipulating a PE grammar
\(container\) in various ways\.

# <a name='section2'></a>API

  - <a name='1'></a>__::peg::peg::op__ __called__ *container*

    This command determines the static call structure for the nonterminal
    symbols of the grammar stored in the *container*\.

    The result of the command is a dictionary mapping from each symbol to the
    symbols it calls\. The empty string is the key used to represent the start
    expression of the grammar\.

    The grammar in the container is not modified\.

    The *container* instance has to expose a method API as is provided by the
    package __[pt::peg::container](pt\_peg\_container\.md)__\.

  - <a name='2'></a>__::peg::peg::op__ __dechain__ *container*

    This command simplifies all symbols which just chain to a different symbol
    by inlining the right hand side of the called symbol in its callers\. This
    works if and only the modes match properly, per the decision table below\.

        caller called | dechain | notes
        --------------+---------+-----------------------
        value  value  |  yes    |  value is passed
        value  leaf   |  yes    |  value is passed
        value  void   |  yes    |  caller is implied void
        leaf   value  |  no     |  generated value was discarded, inlined would not. called may be implied void.
        leaf   leaf   |  no     |  s.a.
        leaf   void   |  no     |  s.a.
        void   value  |  no     |  caller drops value, inlined would not.
        void   leaf   |  no     |  s.a.
        void   void   |  yes    |

    The result of the command is the empty string\.

    The grammar in the container is directly modified\. If that is not wanted, a
    copy of the original container has to be used\.

    The *container* instance has to expose a method API as is provided by the
    package __[pt::peg::container](pt\_peg\_container\.md)__\.

  - <a name='3'></a>__::peg::peg::op__ __drop unreachable__ *container*

    This command removes all symbols from the grammar which are not
    __reachable__\.

    The result of the command is the empty string\.

    The grammar in the container is directly modified\. If that is not wanted, a
    copy of the original container has to be used\.

    The *container* instance has to expose a method API as is provided by the
    package __[pt::peg::container](pt\_peg\_container\.md)__\.

  - <a name='4'></a>__::peg::peg::op__ __drop unrealizable__ *container*

    This command removes all symbols from the grammar which are not
    __realizable__\.

    The result of the command is the empty string\.

    The grammar in the container is directly modified\. If that is not wanted, a
    copy of the original container has to be used\.

    The *container* instance has to expose a method API as is provided by the
    package __[pt::peg::container](pt\_peg\_container\.md)__\.

  - <a name='5'></a>__::peg::peg::op__ __flatten__ *container*

    This command flattens \(see __[pt::pe::op](pt\_pexpr\_op\.md)__\) all
    expressions in the grammar, i\.e\. the start expression and the right hand
    sides of all nonterminal symbols\.

    The result of the command is the empty string\.

    The grammar in the container is directly modified\. If that is not wanted, a
    copy of the original container has to be used\.

    The *container* instance has to expose a method API as is provided by the
    package __[pt::peg::container](pt\_peg\_container\.md)__\.

  - <a name='6'></a>__::peg::peg::op__ __minimize__ *container*

    This command reduces the provided grammar by applying most of the other
    methods of this package\.

    After flattening the expressions it removes unreachable and unrealizable
    symbols, flattens the expressions again, then optimizes the symbol modes
    before collapsing symbol chains as much as possible\.

    The result of the command is the empty string\.

    The grammar in the container is directly modified\. If that is not wanted, a
    copy of the original container has to be used\.

    The *container* instance has to expose a method API as is provided by the
    package __[pt::peg::container](pt\_peg\_container\.md)__\.

  - <a name='7'></a>__::peg::peg::op__ __modeopt__ *container*

    This command optimizes the semantic modes of non\-terminal symbols according
    to the two rules below\.

      1. If a symbol X with mode __value__ calls no other symbols, i\.e\. uses
         only terminal symbols in whatever combination, then this can be
         represented simpler by using mode __leaf__\.

      1. If a symbol X is only called from symbols with modes __leaf__ or
         __void__ then this symbol should have mode __void__ also, as
         any AST it could generate will be discarded anyway\.

    The result of the command is the empty string\.

    The grammar in the container is directly modified\. If that is not wanted, a
    copy of the original container has to be used\.

    The *container* instance has to expose a method API as is provided by the
    package __[pt::peg::container](pt\_peg\_container\.md)__\.

  - <a name='8'></a>__::peg::peg::op__ __reachable__ *container*

    This command computes the set of all nonterminal symbols which are reachable
    from the start expression of the grammar\. This is essentially the transitive
    closure over __called__ and the symbol's right hand sides, beginning
    with the start expression\.

    The result of the command is the list of reachable symbols\.

    The grammar in the container is not modified\.

    The *container* instance has to expose a method API as is provided by the
    package __[pt::peg::container](pt\_peg\_container\.md)__\.

  - <a name='9'></a>__::peg::peg::op__ __realizable__ *container*

    This command computes the set of all nonterminal symbols which are
    realizable, i\.e\. can derive pure terminal phrases\. This is done iteratively,
    starting with state unrealizable for all and any, and then updating all
    symbols which are realizable, propagating changes, until nothing changes any
    more\.

    The result of the command is the list of realizable symbols\.

    The grammar in the container is not modified\.

    The *container* instance has to expose a method API as is provided by the
    package __[pt::peg::container](pt\_peg\_container\.md)__\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_to_container.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555

[//000000001]: # (pt::peg::to::container \- Parser Tools)
[//000000002]: # (Generated from file 'to\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::to::container\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::to::container \- PEG Conversion\. Write CONTAINER format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Options](#section3)

  - [Grammar Container](#section4)

      - [Example](#subsection1)

  - [PEG serialization format](#section5)

      - [Example](#subsection2)

  - [PE serialization format](#section6)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::to::container ?1?  
package require pt::peg  
package require text::write  
package require char  

[__pt::peg::to::container__ __reset__](#1)  
[__pt::peg::to::container__ __configure__](#2)  
[__pt::peg::to::container__ __configure__ *option*](#3)  
[__pt::peg::to::container__ __configure__ *option* *value*\.\.\.](#4)  
[__pt::peg::to::container__ __convert__ *serial*](#5)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the converter from parsing expression grammars to
CONTAINER markup\.

It resides in the Export section of the Core Layer of Parser Tools, and can be
used either directly with the other packages of this layer, or indirectly
through the export manager provided by
__[pt::peg::export](pt\_peg\_export\.md)__\. The latter is intented for use
in untrusted environments and done through the corresponding export plugin
__[pt::peg::export::container](pt\_peg\_export\_container\.md)__ sitting
between converter and export manager\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_eplugins\.png)

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Converter
API found in the *[Parser Tools Export API](pt\_to\_api\.md)* specification\.

  - <a name='1'></a>__pt::peg::to::container__ __reset__

    This command resets the configuration of the package to its default
    settings\.

  - <a name='2'></a>__pt::peg::to::container__ __configure__

    This command returns a dictionary containing the current configuration of
    the package\.

  - <a name='3'></a>__pt::peg::to::container__ __configure__ *option*

    This command returns the current value of the specified configuration
    *option* of the package\. For the set of legal options, please read the
    section [Options](#section3)\.

  - <a name='4'></a>__pt::peg::to::container__ __configure__ *option* *value*\.\.\.

    This command sets the given configuration *option*s of the package, to the
    specified *value*s\. For the set of legal options, please read the section
    [Options](#section3)\.

  - <a name='5'></a>__pt::peg::to::container__ __convert__ *serial*

    This command takes the canonical serialization of a parsing expression
    grammar, as specified in section [PEG serialization format](#section5),
    and contained in *serial*, and generates CONTAINER markup encoding the
    grammar, per the current package configuration\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Options

The converter to the CONTAINER format recognizes the following options and
changes its behaviour as they specify\.

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-mode__ __bulk__&#124;__incremental__

    The value of this option controls which methods of
    __[pt::peg::container](pt\_peg\_container\.md)__ instances are used to
    specify the grammar, i\.e\. preload it into the container\. There are two legal
    values, as listed below\. The default is __bulk__\.

      * __bulk__

        In this mode the methods __start__, __add__, __modes__, and
        __rules__ are used to specify the grammar in a bulk manner, i\.e\. as
        a set of nonterminal symbols, and two dictionaries mapping from the
        symbols to their semantic modes and parsing expressions\.

        This mode is the default\.

      * __incremental__

        In this mode the methods __start__, __add__, __mode__, and
        __rule__ are used to specify the grammar piecemal, with each
        nonterminal having its own block of defining commands\.

  - __\-template__ string

    The value of this option is a string into which to put the generated code
    and the other configuration settings\. The various locations for user\-data
    are expected to be specified with the placeholders listed below\. The default
    value is "__@code@__"\.

      * __@user@__

        To be replaced with the value of the option __\-user__\.

      * __@format@__

        To be replaced with the the constant __CONTAINER__\.

      * __@file@__

        To be replaced with the value of the option __\-file__\.

      * __@name@__

        To be replaced with the value of the option __\-name__\.

      * __@mode@__

        To be replaced with the value of the option __\-mode__\.

      * __@code@__

        To be replaced with the generated code\.

# <a name='section4'></a>Grammar Container

The __container__ format is another form of describing parsing expression
grammars\. While data in this format is executable it does not constitute a
parser for the grammar\. It always has to be used in conjunction with the package
__[pt::peg::interp](pt\_peg\_interp\.md)__, a grammar interpreter\.

The format represents grammars by a __snit::type__, i\.e\. class, whose
instances are API\-compatible to the instances of the
__[pt::peg::container](pt\_peg\_container\.md)__ package, and which are
preloaded with the grammar in question\.

It has no direct formal specification beyond what was said above\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

one possible CONTAINER serialization for it is

    snit::type a_pe_grammar {
        constructor {} {
            install myg using pt::peg::container ${selfns}::G
            $myg start {n Expression}
            $myg add   AddOp Digit Expression Factor MulOp Number Sign Term
            $myg modes {
                AddOp      value
                Digit      value
                Expression value
                Factor     value
                MulOp      value
                Number     value
                Sign       value
                Term       value
            }
            $myg rules {
                AddOp      {/ {t -} {t +}}
                Digit      {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}
                Expression {/ {x {t \50} {n Expression} {t \51}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}}
                Factor     {x {n Term} {* {x {n AddOp} {n Term}}}}
                MulOp      {/ {t *} {t /}}
                Number     {x {? {n Sign}} {+ {n Digit}}}
                Sign       {/ {t -} {t +}}
                Term       {n Number}
            }
            return
        }

        component myg
        delegate method * to myg
    }

# <a name='section5'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section6)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section6)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[CONTAINER](\.\./\.\./\.\./\.\./index\.md\#container),
[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression), [format
conversion](\.\./\.\./\.\./\.\./index\.md\#format\_conversion),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_to_cparam.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611

[//000000001]: # (pt::peg::to::cparam \- Parser Tools)
[//000000002]: # (Generated from file 'to\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::to::cparam\(n\) 1\.1\.2 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::to::cparam \- PEG Conversion\. Write CPARAM format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Options](#section3)

  - [C/PARAM code representation of parsing expression grammars](#section4)

      - [Example](#subsection1)

  - [PEG serialization format](#section5)

      - [Example](#subsection2)

  - [PE serialization format](#section6)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::to::cparam ?1\.1\.2?  

[__pt::peg::to::cparam__ __reset__](#1)  
[__pt::peg::to::cparam__ __configure__](#2)  
[__pt::peg::to::cparam__ __configure__ *option*](#3)  
[__pt::peg::to::cparam__ __configure__ *option* *value*\.\.\.](#4)  
[__pt::peg::to::cparam__ __convert__ *serial*](#5)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the converter from parsing expression grammars to CPARAM
markup\.

It resides in the Export section of the Core Layer of Parser Tools, and can be
used either directly with the other packages of this layer, or indirectly
through the export manager provided by
__[pt::peg::export](pt\_peg\_export\.md)__\. The latter is intented for use
in untrusted environments and done through the corresponding export plugin
__pt::peg::export::cparam__ sitting between converter and export manager\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_eplugins\.png)

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Converter
API found in the *[Parser Tools Export API](pt\_to\_api\.md)* specification\.

  - <a name='1'></a>__pt::peg::to::cparam__ __reset__

    This command resets the configuration of the package to its default
    settings\.

  - <a name='2'></a>__pt::peg::to::cparam__ __configure__

    This command returns a dictionary containing the current configuration of
    the package\.

  - <a name='3'></a>__pt::peg::to::cparam__ __configure__ *option*

    This command returns the current value of the specified configuration
    *option* of the package\. For the set of legal options, please read the
    section [Options](#section3)\.

  - <a name='4'></a>__pt::peg::to::cparam__ __configure__ *option* *value*\.\.\.

    This command sets the given configuration *option*s of the package, to the
    specified *value*s\. For the set of legal options, please read the section
    [Options](#section3)\.

  - <a name='5'></a>__pt::peg::to::cparam__ __convert__ *serial*

    This command takes the canonical serialization of a parsing expression
    grammar, as specified in section [PEG serialization format](#section5),
    and contained in *serial*, and generates CPARAM markup encoding the
    grammar, per the current package configuration\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Options

The converter to C code recognizes the following configuration variables and
changes its behaviour as they specify\.

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-template__ string

    The value of this option is a string into which to put the generated text
    and the other configuration settings\. The various locations for user\-data
    are expected to be specified with the placeholders listed below\. The default
    value is "__@code@__"\.

      * __@user@__

        To be replaced with the value of the option __\-user__\.

      * __@format@__

        To be replaced with the the constant __C/PARAM__\.

      * __@file@__

        To be replaced with the value of the option __\-file__\.

      * __@name@__

        To be replaced with the value of the option __\-name__\.

      * __@code@__

        To be replaced with the generated Tcl code\.

    The following options are special, in that they will occur within the
    generated code, and are replaced there as well\.

      * __@statedecl@__

        To be replaced with the value of the option __state\-decl__\.

      * __@stateref@__

        To be replaced with the value of the option __state\-ref__\.

      * __@strings@__

        To be replaced with the value of the option __string\-varname__\.

      * __@self@__

        To be replaced with the value of the option __self\-command__\.

      * __@def@__

        To be replaced with the value of the option __fun\-qualifier__\.

      * __@ns@__

        To be replaced with the value of the option __namespace__\.

      * __@main@__

        To be replaced with the value of the option __main__\.

      * __@prelude@__

        To be replaced with the value of the option __prelude__\.

  - __\-state\-decl__ string

    A C string representing the argument declaration to use in the generated
    parsing functions to refer to the parsing state\. In essence type and
    argument name\. The default value is the string __RDE\_PARAM p__\.

  - __\-state\-ref__ string

    A C string representing the argument named used in the generated parsing
    functions to refer to the parsing state\. The default value is the string
    __p__\.

  - __\-self\-command__ string

    A C string representing the reference needed to call the generated parser
    function \(methods \.\.\.\) from another parser fonction, per the chosen
    framework \(template\)\. The default value is the empty string\.

  - __\-fun\-qualifier__ string

    A C string containing the attributes to give to the generated functions
    \(methods \.\.\.\), per the chosen framework \(template\)\. The default value is
    __static__\.

  - __\-namespace__ string

    The name of the C namespace the parser functions \(methods, \.\.\.\) shall reside
    in, or a general prefix to add to the function names\. The default value is
    the empty string\.

  - __\-main__ string

    The name of the main function \(method, \.\.\.\) to be called by the chosen
    framework \(template\) to start parsing input\. The default value is
    __\_\_main__\.

  - __\-string\-varname__ string

    The name of the variable used for the table of strings used by the generated
    parser, i\.e\. error messages, symbol names, etc\. The default value is
    __p\_string__\.

  - __\-prelude__ string

    A snippet of code to be inserted at the head of each generated parsing
    function\. The default value is the empty string\.

  - __\-indent__ integer

    The number of characters to indent each line of the generated code by\. The
    default value is __0__\.

  - __\-comments__ boolean

    A flag controlling the generation of code comments containing the original
    parsing expression a parsing function is for\. The default value is
    __on__\.

While the high parameterizability of this converter, as shown by the multitude
of options it supports, is an advantage to the advanced user, allowing her to
customize the output of the converter as needed, a novice user will likely not
see the forest for the trees\.

To help these latter users an adjunct package is provided, containing a canned
configuration which will generate immediately useful full parsers\. It is

  - __[pt::cparam::configuration::critcl](pt\_cparam\_config\_critcl\.md)__

    Generated parsers are embedded into a __Critcl__\-based framework\.

# <a name='section4'></a>C/PARAM code representation of parsing expression grammars

The __c__ format is executable code, a parser for the grammar\. The parser
implementation is written in C and can be tweaked to the users' needs through a
multitude of options\.

The __critcl__ format, for example, is implemented as a canned configuration
of these options on top of the generator for __c__\.

The bulk of such a framework has to be specified through the option
__\-template__\. The additional options

  - __\-fun\-qualifier__ string

  - __\-main__ string

  - __\-namespace__ string

  - __\-prelude__ string

  - __\-self\-command__ string

  - __\-state\-decl__ string

  - __\-state\-ref__ string

  - __\-string\-varname__ string

provide code snippets which help to glue framework and generated code together\.
Their placeholders are in the *generated* code\. Further the options

  - __\-indent__ integer

  - __\-comments__ boolean

allow for the customization of the code indent \(default none\), and whether to
generate comments showing the parsing expressions a function is for \(default
on\)\.

## <a name='subsection1'></a>Example

We are forgoing an example of this representation, with apologies\. It would be
way to large for this document\.

# <a name='section5'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section6)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section6)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[CPARAM](\.\./\.\./\.\./\.\./index\.md\#cparam),
[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression), [format
conversion](\.\./\.\./\.\./\.\./index\.md\#format\_conversion),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_to_json.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610

[//000000001]: # (pt::peg::to::json \- Parser Tools)
[//000000002]: # (Generated from file 'to\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::to::json\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::to::json \- PEG Conversion\. Write JSON format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Options](#section3)

  - [JSON Grammar Exchange Format](#section4)

      - [Example](#subsection1)

  - [PEG serialization format](#section5)

      - [Example](#subsection2)

  - [PE serialization format](#section6)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::to::json ?1?  
package require pt::peg  
package require json::write  

[__pt::peg::to::json__ __reset__](#1)  
[__pt::peg::to::json__ __configure__](#2)  
[__pt::peg::to::json__ __configure__ *option*](#3)  
[__pt::peg::to::json__ __configure__ *option* *value*\.\.\.](#4)  
[__pt::peg::to::json__ __convert__ *serial*](#5)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the converter from parsing expression grammars to JSON
markup\.

It resides in the Export section of the Core Layer of Parser Tools, and can be
used either directly with the other packages of this layer, or indirectly
through the export manager provided by
__[pt::peg::export](pt\_peg\_export\.md)__\. The latter is intented for use
in untrusted environments and done through the corresponding export plugin
__[pt::peg::export::json](pt\_peg\_export\_json\.md)__ sitting between
converter and export manager\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_eplugins\.png)

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Converter
API found in the *[Parser Tools Export API](pt\_to\_api\.md)* specification\.

  - <a name='1'></a>__pt::peg::to::json__ __reset__

    This command resets the configuration of the package to its default
    settings\.

  - <a name='2'></a>__pt::peg::to::json__ __configure__

    This command returns a dictionary containing the current configuration of
    the package\.

  - <a name='3'></a>__pt::peg::to::json__ __configure__ *option*

    This command returns the current value of the specified configuration
    *option* of the package\. For the set of legal options, please read the
    section [Options](#section3)\.

  - <a name='4'></a>__pt::peg::to::json__ __configure__ *option* *value*\.\.\.

    This command sets the given configuration *option*s of the package, to the
    specified *value*s\. For the set of legal options, please read the section
    [Options](#section3)\.

  - <a name='5'></a>__pt::peg::to::json__ __convert__ *serial*

    This command takes the canonical serialization of a parsing expression
    grammar, as specified in section [PEG serialization format](#section5),
    and contained in *serial*, and generates JSON markup encoding the grammar,
    per the current package configuration\. The created string is then returned
    as the result of the command\.

# <a name='section3'></a>Options

The converter to the JSON grammar exchange format recognizes the following
configuration variables and changes its behaviour as they specify\.

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-indented__ boolean

    If this option is set the system will break the generated JSON across lines
    and indent it according to its inner structure, with each key of a
    dictionary on a separate line\.

    If the option is not set \(the default\), the whole JSON object will be
    written on a single line, with minimum spacing between all elements\.

  - __\-aligned__ boolean

    If this option is set the system will ensure that the values for the keys in
    a dictionary are vertically aligned with each other, for a nice table
    effect\. To make this work this also implies that __\-indented__ is set\.

    If the option is not set \(the default\), the output is formatted as per the
    value of __indented__, without trying to align the values for dictionary
    keys\.

# <a name='section4'></a>JSON Grammar Exchange Format

The __json__ format for parsing expression grammars was written as a data
exchange format not bound to Tcl\. It was defined to allow the exchange of
grammars with PackRat/PEG based parser generators for other languages\.

It is formally specified by the rules below:

  1. The JSON of any PEG is a JSON object\.

  1. This object holds a single key, __pt::grammar::peg__, and its value\.
     This value holds the contents of the grammar\.

  1. The contents of the grammar are a JSON object holding the set of
     nonterminal symbols and the starting expression\. The relevant keys and
     their values are

       - __rules__

         The value is a JSON object whose keys are the names of the nonterminal
         symbols known to the grammar\.

           1) Each nonterminal symbol may occur only once\.

           1) The empty string is not a legal nonterminal symbol\.

           1) The value for each symbol is a JSON object itself\. The relevant
              keys and their values in this dictionary are

                * __is__

                  The value is a JSON string holding the Tcl serialization of
                  the parsing expression describing the symbols sentennial
                  structure, as specified in the section [PE serialization
                  format](#section6)\.

                * __mode__

                  The value is a JSON holding holding one of three values
                  specifying how a parser should handle the semantic value
                  produced by the symbol\.

                    + __value__

                      The semantic value of the nonterminal symbol is an
                      abstract syntax tree consisting of a single node node for
                      the nonterminal itself, which has the ASTs of the symbol's
                      right hand side as its children\.

                    + __leaf__

                      The semantic value of the nonterminal symbol is an
                      abstract syntax tree consisting of a single node node for
                      the nonterminal, without any children\. Any ASTs generated
                      by the symbol's right hand side are discarded\.

                    + __void__

                      The nonterminal has no semantic value\. Any ASTs generated
                      by the symbol's right hand side are discarded \(as well\)\.

       - __start__

         The value is a JSON string holding the Tcl serialization of the start
         parsing expression of the grammar, as specified in the section [PE
         serialization format](#section6)\.

  1. The terminal symbols of the grammar are specified implicitly as the set of
     all terminal symbols used in the start expression and on the RHS of the
     grammar rules\.

As an aside to the advanced reader, this is pretty much the same as the Tcl
serialization of PE grammars, as specified in section [PEG serialization
format](#section5), except that the Tcl dictionaries and lists of that
format are mapped to JSON objects and arrays\. Only the parsing expressions
themselves are not translated further, but kept as JSON strings containing a
nested Tcl list, and there is no concept of canonicity for the JSON either\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

a JSON serialization for it is

    {
        "pt::grammar::peg" : {
            "rules" : {
                "AddOp"     : {
                    "is"   : "\/ {t -} {t +}",
                    "mode" : "value"
                },
                "Digit"     : {
                    "is"   : "\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}",
                    "mode" : "value"
                },
                "Expression" : {
                    "is"   : "\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}",
                    "mode" : "value"
                },
                "Factor"    : {
                    "is"   : "x {n Term} {* {x {n AddOp} {n Term}}}",
                    "mode" : "value"
                },
                "MulOp"     : {
                    "is"   : "\/ {t *} {t \/}",
                    "mode" : "value"
                },
                "Number"    : {
                    "is"   : "x {? {n Sign}} {+ {n Digit}}",
                    "mode" : "value"
                },
                "Sign"      : {
                    "is"   : "\/ {t -} {t +}",
                    "mode" : "value"
                },
                "Term"      : {
                    "is"   : "n Number",
                    "mode" : "value"
                }
            },
            "start" : "n Expression"
        }
    }

and a Tcl serialization of the same is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

The similarity of the latter to the JSON should be quite obvious\.

# <a name='section5'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section6)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section6)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [JSON](\.\./\.\./\.\./\.\./index\.md\#json),
[LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_), [PEG](\.\./\.\./\.\./\.\./index\.md\#peg),
[TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl), [context\-free
languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression), [format
conversion](\.\./\.\./\.\./\.\./index\.md\#format\_conversion),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_to_param.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255

[//000000001]: # (pt::peg::to::param \- Parser Tools)
[//000000002]: # (Generated from file 'to\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::to::param\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::to::param \- PEG Conversion\. Write PARAM format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Options](#section3)

  - [PARAM code representation of parsing expression grammars](#section4)

      - [Example](#subsection1)

  - [PEG serialization format](#section5)

      - [Example](#subsection2)

  - [PE serialization format](#section6)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::to::param ?1?  
package require pt::peg  
package require pt::pe  

[__pt::peg::to::param__ __reset__](#1)  
[__pt::peg::to::param__ __configure__](#2)  
[__pt::peg::to::param__ __configure__ *option*](#3)  
[__pt::peg::to::param__ __configure__ *option* *value*\.\.\.](#4)  
[__pt::peg::to::param__ __convert__ *serial*](#5)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the converter from parsing expression grammars to PARAM
markup\.

It resides in the Export section of the Core Layer of Parser Tools, and can be
used either directly with the other packages of this layer, or indirectly
through the export manager provided by
__[pt::peg::export](pt\_peg\_export\.md)__\. The latter is intented for use
in untrusted environments and done through the corresponding export plugin
__pt::peg::export::param__ sitting between converter and export manager\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_eplugins\.png)

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Converter
API found in the *[Parser Tools Export API](pt\_to\_api\.md)* specification\.

  - <a name='1'></a>__pt::peg::to::param__ __reset__

    This command resets the configuration of the package to its default
    settings\.

  - <a name='2'></a>__pt::peg::to::param__ __configure__

    This command returns a dictionary containing the current configuration of
    the package\.

  - <a name='3'></a>__pt::peg::to::param__ __configure__ *option*

    This command returns the current value of the specified configuration
    *option* of the package\. For the set of legal options, please read the
    section [Options](#section3)\.

  - <a name='4'></a>__pt::peg::to::param__ __configure__ *option* *value*\.\.\.

    This command sets the given configuration *option*s of the package, to the
    specified *value*s\. For the set of legal options, please read the section
    [Options](#section3)\.

  - <a name='5'></a>__pt::peg::to::param__ __convert__ *serial*

    This command takes the canonical serialization of a parsing expression
    grammar, as specified in section [PEG serialization format](#section5),
    and contained in *serial*, and generates PARAM markup encoding the
    grammar, per the current package configuration\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Options

The converter to PARAM markup recognizes the following configuration variables
and changes its behaviour as they specify\.

  - __\-template__ string

    The value of this configuration variable is a string into which to put the
    generated text and the other configuration settings\. The various locations
    for user\-data are expected to be specified with the placeholders listed
    below\. The default value is "__@code@__"\.

      * __@user@__

        To be replaced with the value of the configuration variable
        __\-user__\.

      * __@format@__

        To be replaced with the the constant __PARAM__\.

      * __@file@__

        To be replaced with the value of the configuration variable
        __\-file__\.

      * __@name@__

        To be replaced with the value of the configuration variable
        __\-name__\.

      * __@code@__

        To be replaced with the generated text\.

  - __\-name__ string

    The value of this configuration variable is the name of the grammar for
    which the conversion is run\. The default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this configuration variable is the name of the user for which
    the conversion is run\. The default value is __unknown__\.

  - __\-file__ string

    The value of this configuration variable is the name of the file or other
    entity from which the grammar came, for which the conversion is run\. The
    default value is __unknown__\.

# <a name='section4'></a>PARAM code representation of parsing expression grammars

The PARAM code representation of parsing expression grammars is assembler\-like
text using the instructions of the virtual machine documented in the *[PackRat
Machine Specification](pt\_param\.md)*, plus a few more for control flow \(jump
ok, jump fail, call symbol, return\)\.

It is not really useful, except possibly as a tool demonstrating how a grammar
is compiled in general, without getting distracted by the incidentials of a
framework, i\.e\. like the supporting C and Tcl code generated by the other
PARAM\-derived formats\.

It has no direct formal specification beyond what was said above\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

one possible PARAM serialization for it is

    # -*- text -*-
    # Parsing Expression Grammar 'TEMPLATE'.
    # Generated for unknown, from file 'TEST'

    #
    # Grammar Start Expression
    #

    <<MAIN>>:
             call              sym_Expression
             halt

    #
    # value Symbol 'AddOp'
    #

    sym_AddOp:
    # /
    #     '-'
    #     '+'

             symbol_restore    AddOp
      found! jump              found_7
             loc_push

             call              choice_5

       fail! value_clear
         ok! value_leaf        AddOp
             symbol_save       AddOp
             error_nonterminal AddOp
             loc_pop_discard

    found_7:
         ok! ast_value_push
             return

    choice_5:
    # /
    #     '-'
    #     '+'

             error_clear

             loc_push
             error_push

             input_next        "t -"
         ok! test_char         "-"

             error_pop_merge
         ok! jump              oknoast_4

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t +"
         ok! test_char         "+"

             error_pop_merge
         ok! jump              oknoast_4

             loc_pop_rewind
             status_fail
             return

    oknoast_4:
             loc_pop_discard
             return
    #
    # value Symbol 'Digit'
    #

    sym_Digit:
    # /
    #     '0'
    #     '1'
    #     '2'
    #     '3'
    #     '4'
    #     '5'
    #     '6'
    #     '7'
    #     '8'
    #     '9'

             symbol_restore    Digit
      found! jump              found_22
             loc_push

             call              choice_20

       fail! value_clear
         ok! value_leaf        Digit
             symbol_save       Digit
             error_nonterminal Digit
             loc_pop_discard

    found_22:
         ok! ast_value_push
             return

    choice_20:
    # /
    #     '0'
    #     '1'
    #     '2'
    #     '3'
    #     '4'
    #     '5'
    #     '6'
    #     '7'
    #     '8'
    #     '9'

             error_clear

             loc_push
             error_push

             input_next        "t 0"
         ok! test_char         "0"

             error_pop_merge
         ok! jump              oknoast_19

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t 1"
         ok! test_char         "1"

             error_pop_merge
         ok! jump              oknoast_19

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t 2"
         ok! test_char         "2"

             error_pop_merge
         ok! jump              oknoast_19

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t 3"
         ok! test_char         "3"

             error_pop_merge
         ok! jump              oknoast_19

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t 4"
         ok! test_char         "4"

             error_pop_merge
         ok! jump              oknoast_19

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t 5"
         ok! test_char         "5"

             error_pop_merge
         ok! jump              oknoast_19

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t 6"
         ok! test_char         "6"

             error_pop_merge
         ok! jump              oknoast_19

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t 7"
         ok! test_char         "7"

             error_pop_merge
         ok! jump              oknoast_19

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t 8"
         ok! test_char         "8"

             error_pop_merge
         ok! jump              oknoast_19

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t 9"
         ok! test_char         "9"

             error_pop_merge
         ok! jump              oknoast_19

             loc_pop_rewind
             status_fail
             return

    oknoast_19:
             loc_pop_discard
             return
    #
    # value Symbol 'Expression'
    #

    sym_Expression:
    # /
    #     x
    #         '\('
    #         (Expression)
    #         '\)'
    #     x
    #         (Factor)
    #         *
    #             x
    #                 (MulOp)
    #                 (Factor)

             symbol_restore    Expression
      found! jump              found_46
             loc_push
             ast_push

             call              choice_44

       fail! value_clear
         ok! value_reduce      Expression
             symbol_save       Expression
             error_nonterminal Expression
             ast_pop_rewind
             loc_pop_discard

    found_46:
         ok! ast_value_push
             return

    choice_44:
    # /
    #     x
    #         '\('
    #         (Expression)
    #         '\)'
    #     x
    #         (Factor)
    #         *
    #             x
    #                 (MulOp)
    #                 (Factor)

             error_clear

             ast_push
             loc_push
             error_push

             call              sequence_27

             error_pop_merge
         ok! jump              ok_43

             ast_pop_rewind
             loc_pop_rewind
             ast_push
             loc_push
             error_push

             call              sequence_40

             error_pop_merge
         ok! jump              ok_43

             ast_pop_rewind
             loc_pop_rewind
             status_fail
             return

    ok_43:
             ast_pop_discard
             loc_pop_discard
             return

    sequence_27:
    # x
    #     '\('
    #     (Expression)
    #     '\)'

             loc_push
             error_clear

             error_push

             input_next        "t ("
         ok! test_char         "("

             error_pop_merge
       fail! jump              failednoast_29
             ast_push
             error_push

             call              sym_Expression

             error_pop_merge
       fail! jump              failed_28
             error_push

             input_next        "t )"
         ok! test_char         ")"

             error_pop_merge
       fail! jump              failed_28

             ast_pop_discard
             loc_pop_discard
             return

    failed_28:
             ast_pop_rewind

    failednoast_29:
             loc_pop_rewind
             return

    sequence_40:
    # x
    #     (Factor)
    #     *
    #         x
    #             (MulOp)
    #             (Factor)

             ast_push
             loc_push
             error_clear

             error_push

             call              sym_Factor

             error_pop_merge
       fail! jump              failed_41
             error_push

             call              kleene_37

             error_pop_merge
       fail! jump              failed_41

             ast_pop_discard
             loc_pop_discard
             return

    failed_41:
             ast_pop_rewind
             loc_pop_rewind
             return

    kleene_37:
    # *
    #     x
    #         (MulOp)
    #         (Factor)

             loc_push
             error_push

             call              sequence_34

             error_pop_merge
       fail! jump              failed_38
             loc_pop_discard
             jump              kleene_37

    failed_38:
             loc_pop_rewind
             status_ok
             return

    sequence_34:
    # x
    #     (MulOp)
    #     (Factor)

             ast_push
             loc_push
             error_clear

             error_push

             call              sym_MulOp

             error_pop_merge
       fail! jump              failed_35
             error_push

             call              sym_Factor

             error_pop_merge
       fail! jump              failed_35

             ast_pop_discard
             loc_pop_discard
             return

    failed_35:
             ast_pop_rewind
             loc_pop_rewind
             return
    #
    # value Symbol 'Factor'
    #

    sym_Factor:
    # x
    #     (Term)
    #     *
    #         x
    #             (AddOp)
    #             (Term)

             symbol_restore    Factor
      found! jump              found_60
             loc_push
             ast_push

             call              sequence_57

       fail! value_clear
         ok! value_reduce      Factor
             symbol_save       Factor
             error_nonterminal Factor
             ast_pop_rewind
             loc_pop_discard

    found_60:
         ok! ast_value_push
             return

    sequence_57:
    # x
    #     (Term)
    #     *
    #         x
    #             (AddOp)
    #             (Term)

             ast_push
             loc_push
             error_clear

             error_push

             call              sym_Term

             error_pop_merge
       fail! jump              failed_58
             error_push

             call              kleene_54

             error_pop_merge
       fail! jump              failed_58

             ast_pop_discard
             loc_pop_discard
             return

    failed_58:
             ast_pop_rewind
             loc_pop_rewind
             return

    kleene_54:
    # *
    #     x
    #         (AddOp)
    #         (Term)

             loc_push
             error_push

             call              sequence_51

             error_pop_merge
       fail! jump              failed_55
             loc_pop_discard
             jump              kleene_54

    failed_55:
             loc_pop_rewind
             status_ok
             return

    sequence_51:
    # x
    #     (AddOp)
    #     (Term)

             ast_push
             loc_push
             error_clear

             error_push

             call              sym_AddOp

             error_pop_merge
       fail! jump              failed_52
             error_push

             call              sym_Term

             error_pop_merge
       fail! jump              failed_52

             ast_pop_discard
             loc_pop_discard
             return

    failed_52:
             ast_pop_rewind
             loc_pop_rewind
             return
    #
    # value Symbol 'MulOp'
    #

    sym_MulOp:
    # /
    #     '*'
    #     '/'

             symbol_restore    MulOp
      found! jump              found_67
             loc_push

             call              choice_65

       fail! value_clear
         ok! value_leaf        MulOp
             symbol_save       MulOp
             error_nonterminal MulOp
             loc_pop_discard

    found_67:
         ok! ast_value_push
             return

    choice_65:
    # /
    #     '*'
    #     '/'

             error_clear

             loc_push
             error_push

             input_next        "t *"
         ok! test_char         "*"

             error_pop_merge
         ok! jump              oknoast_64

             loc_pop_rewind
             loc_push
             error_push

             input_next        "t /"
         ok! test_char         "/"

             error_pop_merge
         ok! jump              oknoast_64

             loc_pop_rewind
             status_fail
             return

    oknoast_64:
             loc_pop_discard
             return
    #
    # value Symbol 'Number'
    #

    sym_Number:
    # x
    #     ?
    #         (Sign)
    #     +
    #         (Digit)

             symbol_restore    Number
      found! jump              found_80
             loc_push
             ast_push

             call              sequence_77

       fail! value_clear
         ok! value_reduce      Number
             symbol_save       Number
             error_nonterminal Number
             ast_pop_rewind
             loc_pop_discard

    found_80:
         ok! ast_value_push
             return

    sequence_77:
    # x
    #     ?
    #         (Sign)
    #     +
    #         (Digit)

             ast_push
             loc_push
             error_clear

             error_push

             call              optional_70

             error_pop_merge
       fail! jump              failed_78
             error_push

             call              poskleene_73

             error_pop_merge
       fail! jump              failed_78

             ast_pop_discard
             loc_pop_discard
             return

    failed_78:
             ast_pop_rewind
             loc_pop_rewind
             return

    optional_70:
    # ?
    #     (Sign)

             loc_push
             error_push

             call              sym_Sign

             error_pop_merge
       fail! loc_pop_rewind
         ok! loc_pop_discard
             status_ok
             return

    poskleene_73:
    # +
    #     (Digit)

             loc_push

             call              sym_Digit

       fail! jump              failed_74

    loop_75:
             loc_pop_discard
             loc_push
             error_push

             call              sym_Digit

             error_pop_merge
         ok! jump              loop_75
             status_ok

    failed_74:
             loc_pop_rewind
             return
    #
    # value Symbol 'Sign'
    #

    sym_Sign:
    # /
    #     '-'
    #     '+'

             symbol_restore    Sign
      found! jump              found_86
             loc_push

             call              choice_5

       fail! value_clear
         ok! value_leaf        Sign
             symbol_save       Sign
             error_nonterminal Sign
             loc_pop_discard

    found_86:
         ok! ast_value_push
             return
    #
    # value Symbol 'Term'
    #

    sym_Term:
    # (Number)

             symbol_restore    Term
      found! jump              found_89
             loc_push
             ast_push

             call              sym_Number

       fail! value_clear
         ok! value_reduce      Term
             symbol_save       Term
             error_nonterminal Term
             ast_pop_rewind
             loc_pop_discard

    found_89:
         ok! ast_value_push
             return

    #
    #

# <a name='section5'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section6)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section6)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PARAM](\.\./\.\./\.\./\.\./index\.md\#param), [PEG](\.\./\.\./\.\./\.\./index\.md\#peg),
[TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl), [context\-free
languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression), [format
conversion](\.\./\.\./\.\./\.\./index\.md\#format\_conversion),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_to_peg.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597

[//000000001]: # (pt::peg::to::peg \- Parser Tools)
[//000000002]: # (Generated from file 'to\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::to::peg\(n\) 1\.0\.2 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::to::peg \- PEG Conversion\. Write PEG format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Options](#section3)

  - [PEG Specification Language](#section4)

      - [Example](#subsection1)

  - [PEG serialization format](#section5)

      - [Example](#subsection2)

  - [PE serialization format](#section6)

      - [Example](#subsection3)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::to::peg ?1\.0\.2?  
package require pt::peg  
package require pt::pe  
package require text::write  

[__pt::peg::to::peg__ __reset__](#1)  
[__pt::peg::to::peg__ __configure__](#2)  
[__pt::peg::to::peg__ __configure__ *option*](#3)  
[__pt::peg::to::peg__ __configure__ *option* *value*\.\.\.](#4)  
[__pt::peg::to::peg__ __convert__ *serial*](#5)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the converter from parsing expression grammars to PEG
markup\.

It resides in the Export section of the Core Layer of Parser Tools, and can be
used either directly with the other packages of this layer, or indirectly
through the export manager provided by
__[pt::peg::export](pt\_peg\_export\.md)__\. The latter is intented for use
in untrusted environments and done through the corresponding export plugin
__[pt::peg::export::peg](pt\_peg\_export\_peg\.md)__ sitting between
converter and export manager\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_eplugins\.png)

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Converter
API found in the *[Parser Tools Export API](pt\_to\_api\.md)* specification\.

  - <a name='1'></a>__pt::peg::to::peg__ __reset__

    This command resets the configuration of the package to its default
    settings\.

  - <a name='2'></a>__pt::peg::to::peg__ __configure__

    This command returns a dictionary containing the current configuration of
    the package\.

  - <a name='3'></a>__pt::peg::to::peg__ __configure__ *option*

    This command returns the current value of the specified configuration
    *option* of the package\. For the set of legal options, please read the
    section [Options](#section3)\.

  - <a name='4'></a>__pt::peg::to::peg__ __configure__ *option* *value*\.\.\.

    This command sets the given configuration *option*s of the package, to the
    specified *value*s\. For the set of legal options, please read the section
    [Options](#section3)\.

  - <a name='5'></a>__pt::peg::to::peg__ __convert__ *serial*

    This command takes the canonical serialization of a parsing expression
    grammar, as specified in section [PEG serialization format](#section5),
    and contained in *serial*, and generates PEG markup encoding the grammar,
    per the current package configuration\. The created string is then returned
    as the result of the command\.

# <a name='section3'></a>Options

The converter to the PEG language recognizes the following options and changes
its behaviour as they specify\.

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

  - __\-template__ string

    The value of this option is a string into which to put the generated text
    and the values of the other options\. The various locations for user\-data are
    expected to be specified with the placeholders listed below\. The default
    value is "__@code@__"\.

      * __@user@__

        To be replaced with the value of the option __\-user__\.

      * __@format@__

        To be replaced with the the constant __PEG__\.

      * __@file@__

        To be replaced with the value of the option __\-file__\.

      * __@name@__

        To be replaced with the value of the option __\-name__\.

      * __@code@__

        To be replaced with the generated text\.

# <a name='section4'></a>PEG Specification Language

__peg__, a language for the specification of parsing expression grammars is
meant to be human readable, and writable as well, yet strict enough to allow its
processing by machine\. Like any computer language\. It was defined to make
writing the specification of a grammar easy, something the other formats found
in the Parser Tools do not lend themselves too\.

It is formally specified by the grammar shown below, written in itself\. For a
tutorial / introduction to the language please go and read the *[PEG Language
Tutorial](pt\_peg\_language\.md)*\.

    PEG pe-grammar-for-peg (Grammar)

    	# --------------------------------------------------------------------
            # Syntactical constructs

            Grammar         <- WHITESPACE Header Definition* Final EOF ;

            Header          <- PEG Identifier StartExpr ;
            Definition      <- Attribute? Identifier IS Expression SEMICOLON ;
            Attribute       <- (VOID / LEAF) COLON ;
            Expression      <- Sequence (SLASH Sequence)* ;
            Sequence        <- Prefix+ ;
            Prefix          <- (AND / NOT)? Suffix ;
            Suffix          <- Primary (QUESTION / STAR / PLUS)? ;
            Primary         <- ALNUM / ALPHA / ASCII / CONTROL / DDIGIT / DIGIT
                            /  GRAPH / LOWER / PRINTABLE / PUNCT / SPACE / UPPER
                            /  WORDCHAR / XDIGIT
                            / Identifier
                            /  OPEN Expression CLOSE
                            /  Literal
                            /  Class
                            /  DOT
                            ;
            Literal         <- APOSTROPH  (!APOSTROPH  Char)* APOSTROPH  WHITESPACE
                            /  DAPOSTROPH (!DAPOSTROPH Char)* DAPOSTROPH WHITESPACE ;
            Class           <- OPENB (!CLOSEB Range)* CLOSEB WHITESPACE ;
            Range           <- Char TO Char / Char ;

            StartExpr       <- OPEN Expression CLOSE ;
    void:   Final           <- "END" WHITESPACE SEMICOLON WHITESPACE ;

            # --------------------------------------------------------------------
            # Lexing constructs

            Identifier      <- Ident WHITESPACE ;
    leaf:   Ident           <- ([_:] / <alpha>) ([_:] / <alnum>)* ;
            Char            <- CharSpecial / CharOctalFull / CharOctalPart
                            /  CharUnicode / CharUnescaped
                            ;

    leaf:   CharSpecial     <- "\\" [nrt'"\[\]\\] ;
    leaf:   CharOctalFull   <- "\\" [0-2][0-7][0-7] ;
    leaf:   CharOctalPart   <- "\\" [0-7][0-7]? ;
    leaf:   CharUnicode     <- "\\" 'u' HexDigit (HexDigit (HexDigit HexDigit?)?)? ;
    leaf:   CharUnescaped   <- !"\\" . ;

    void:   HexDigit        <- [0-9a-fA-F] ;

    void:   TO              <- '-'           ;
    void:   OPENB           <- "["           ;
    void:   CLOSEB          <- "]"           ;
    void:   APOSTROPH       <- "'"           ;
    void:   DAPOSTROPH      <- '"'           ;
    void:   PEG             <- "PEG" !([_:] / <alnum>) WHITESPACE ;
    void:   IS              <- "<-"    WHITESPACE ;
    leaf:   VOID            <- "void"  WHITESPACE ; # Implies that definition has no semantic value.
    leaf:   LEAF            <- "leaf"  WHITESPACE ; # Implies that definition has no terminals.
    void:   SEMICOLON       <- ";"     WHITESPACE ;
    void:   COLON           <- ":"     WHITESPACE ;
    void:   SLASH           <- "/"     WHITESPACE ;
    leaf:   AND             <- "&"     WHITESPACE ;
    leaf:   NOT             <- "!"     WHITESPACE ;
    leaf:   QUESTION        <- "?"     WHITESPACE ;
    leaf:   STAR            <- "*"     WHITESPACE ;
    leaf:   PLUS            <- "+"     WHITESPACE ;
    void:   OPEN            <- "("     WHITESPACE ;
    void:   CLOSE           <- ")"     WHITESPACE ;
    leaf:   DOT             <- "."     WHITESPACE ;

    leaf:   ALNUM           <- "<alnum>"    WHITESPACE ;
    leaf:   ALPHA           <- "<alpha>"    WHITESPACE ;
    leaf:   ASCII           <- "<ascii>"    WHITESPACE ;
    leaf:   CONTROL         <- "<control>"  WHITESPACE ;
    leaf:   DDIGIT          <- "<ddigit>"   WHITESPACE ;
    leaf:   DIGIT           <- "<digit>"    WHITESPACE ;
    leaf:   GRAPH           <- "<graph>"    WHITESPACE ;
    leaf:   LOWER           <- "<lower>"    WHITESPACE ;
    leaf:   PRINTABLE       <- "<print>"    WHITESPACE ;
    leaf:   PUNCT           <- "<punct>"    WHITESPACE ;
    leaf:   SPACE           <- "<space>"    WHITESPACE ;
    leaf:   UPPER           <- "<upper>"    WHITESPACE ;
    leaf:   WORDCHAR        <- "<wordchar>" WHITESPACE ;
    leaf:   XDIGIT          <- "<xdigit>"   WHITESPACE ;

    void:   WHITESPACE      <- (" " / "\t" / EOL / COMMENT)* ;
    void:   COMMENT         <- '#' (!EOL .)* EOL ;
    void:   EOL             <- "\n\r" / "\n" / "\r" ;
    void:   EOF             <- !. ;

            # --------------------------------------------------------------------
    END;

## <a name='subsection1'></a>Example

Our example specifies the grammar for a basic 4\-operation calculator\.

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

Using higher\-level features of the notation, i\.e\. the character classes
\(predefined and custom\), this example can be rewritten as

    PEG calculator (Expression)
        Sign       <- [-+] 						;
        Number     <- Sign? <ddigit>+				;
        Expression <- '(' Expression ')' / (Factor (MulOp Factor)*)	;
        MulOp      <- [*/]						;
        Factor     <- Term (AddOp Term)*				;
        AddOp      <- [-+]						;
        Term       <- Number					;
    END;

# <a name='section5'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section6)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section6)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection2'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection3'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression), [format
conversion](\.\./\.\./\.\./\.\./index\.md\#format\_conversion),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_peg_to_tclparam.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585

[//000000001]: # (pt::peg::to::tclparam \- Parser Tools)
[//000000002]: # (Generated from file 'to\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg::to::tclparam\(n\) 1\.0\.3 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg::to::tclparam \- PEG Conversion\. Write TCLPARAM format

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Options](#section3)

  - [Tcl/PARAM code representation of parsing expression
    grammars](#section4)

  - [PEG serialization format](#section5)

      - [Example](#subsection1)

  - [PE serialization format](#section6)

      - [Example](#subsection2)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg::to::tclparam ?1\.0\.3?  

[__pt::peg::to::tclparam__ __reset__](#1)  
[__pt::peg::to::tclparam__ __configure__](#2)  
[__pt::peg::to::tclparam__ __configure__ *option*](#3)  
[__pt::peg::to::tclparam__ __configure__ *option* *value*\.\.\.](#4)  
[__pt::peg::to::tclparam__ __convert__ *serial*](#5)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package implements the converter from parsing expression grammars to
TCLPARAM markup\.

It resides in the Export section of the Core Layer of Parser Tools, and can be
used either directly with the other packages of this layer, or indirectly
through the export manager provided by
__[pt::peg::export](pt\_peg\_export\.md)__\. The latter is intented for use
in untrusted environments and done through the corresponding export plugin
__pt::peg::export::tclparam__ sitting between converter and export manager\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_eplugins\.png)

# <a name='section2'></a>API

The API provided by this package satisfies the specification of the Converter
API found in the *[Parser Tools Export API](pt\_to\_api\.md)* specification\.

  - <a name='1'></a>__pt::peg::to::tclparam__ __reset__

    This command resets the configuration of the package to its default
    settings\.

  - <a name='2'></a>__pt::peg::to::tclparam__ __configure__

    This command returns a dictionary containing the current configuration of
    the package\.

  - <a name='3'></a>__pt::peg::to::tclparam__ __configure__ *option*

    This command returns the current value of the specified configuration
    *option* of the package\. For the set of legal options, please read the
    section [Options](#section3)\.

  - <a name='4'></a>__pt::peg::to::tclparam__ __configure__ *option* *value*\.\.\.

    This command sets the given configuration *option*s of the package, to the
    specified *value*s\. For the set of legal options, please read the section
    [Options](#section3)\.

  - <a name='5'></a>__pt::peg::to::tclparam__ __convert__ *serial*

    This command takes the canonical serialization of a parsing expression
    grammar, as specified in section [PEG serialization format](#section5),
    and contained in *serial*, and generates TCLPARAM markup encoding the
    grammar, per the current package configuration\. The created string is then
    returned as the result of the command\.

# <a name='section3'></a>Options

The converter to Tcl/PARAM markup recognizes the following configuration
variables and changes its behaviour as they specify\.

  - __\-template__ string

    The value of this configuration variable is a string into which to put the
    generated text and the other configuration settings\. The various locations
    for user\-data are expected to be specified with the placeholders listed
    below\. The default value is "__@code@__"\.

      * __@user@__

        To be replaced with the value of the configuration variable
        __\-user__\.

      * __@format@__

        To be replaced with the the constant __Tcl/PARAM__\.

      * __@file@__

        To be replaced with the value of the configuration variable
        __\-file__\.

      * __@name@__

        To be replaced with the value of the configuration variable
        __\-name__\.

      * __@code@__

        To be replaced with the generated Tcl code\.

    The following configuration variables are special, in that they will occur
    within the generated code, and are replaced there as well\.

      * __@runtime@__

        To be replaced with the value of the configuration variable
        __runtime\-command__\.

      * __@self@__

        To be replaced with the value of the configuration variable
        __self\-command__\.

      * __@def@__

        To be replaced with the value of the configuration variable
        __proc\-command__\.

      * __@ns@__

        To be replaced with the value of the configuration variable
        __namespace__\.

      * __@main@__

        To be replaced with the value of the configuration variable
        __main__\.

      * __@prelude@__

        To be replaced with the value of the configuration variable
        __prelude__\.

  - __\-name__ string

    The value of this configuration variable is the name of the grammar for
    which the conversion is run\. The default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this configuration variable is the name of the user for which
    the conversion is run\. The default value is __unknown__\.

  - __\-file__ string

    The value of this configuration variable is the name of the file or other
    entity from which the grammar came, for which the conversion is run\. The
    default value is __unknown__\.

  - __\-runtime\-command__ string

    A Tcl string representing the Tcl command or reference to it used to call
    PARAM instruction from parser procedures, per the chosen framework
    \(template\)\. The default value is the empty string\.

  - __\-self\-command__ string

    A Tcl string representing the Tcl command or reference to it used to call
    the parser procedures \(methods \.\.\.\) from another parser procedure, per the
    chosen framework \(template\)\. The default value is the empty string\.

  - __\-proc\-command__ string

    The name of the Tcl command used to define procedures \(methods \.\.\.\), per the
    chosen framework \(template\)\. The default value is __proc__\.

  - __\-namespace__ string

    The name of the namespace the parser procedures \(methods, \.\.\.\) shall reside
    in, including the trailing '::' needed to separate it from the actual
    procedure name\. The default value is __::__\.

  - __\-main__ string

    The name of the main procedure \(method, \.\.\.\) to be called by the chosen
    framework \(template\) to start parsing input\. The default value is
    __\_\_main__\.

  - __\-prelude__ string

    A snippet of code to be insert at the head of each generated parsing
    command\. The default value is the empty string\.

  - __\-indent__ integer

    The number of characters to indent each line of the generated code by\. The
    default value is __0__\.

While the high parameterizability of this converter, as shown by the multitude
of options it supports, is an advantage to the advanced user, allowing her to
customize the output of the converter as needed, a novice user will likely not
see the forest for the trees\.

To help these latter users two adjunct packages are provided, each containing a
canned configuration which will generate immediately useful full parsers\. These
are

  - __[pt::tclparam::configuration::snit](pt\_tclparam\_config\_snit\.md)__

    Generated parsers are classes based on the
    __[snit](\.\./snit/snit\.md)__ package, i\.e\. snit::type's\.

  - __[pt::tclparam::configuration::tcloo](pt\_tclparam\_config\_tcloo\.md)__

    Generated parsers are classes based on the
    __[OO](\.\./\.\./\.\./\.\./index\.md\#oo)__ package\.

# <a name='section4'></a>Tcl/PARAM code representation of parsing expression grammars

The Tcl/PARAM representation of parsing expression grammars is Tcl code whose
execution will parse input per the grammar\. The code is based on the virtual
machine documented in the *[PackRat Machine Specification](pt\_param\.md)*,
using its instructions and a few more to handle control flow\.

Note that the generated code by itself is not functional\. It expects to be
embedded into a framework which provides services like the PARAM state,
implementations for the PARAM instructions, etc\. The bulk of such a framework
has to be specified through the option __\-template__\. The additional options

  - __\-indent__ integer

  - __\-main__ string

  - __\-namespace__ string

  - __\-prelude__ string

  - __\-proc\-command__ string

  - __\-runtime\-command__ string

  - __\-self\-command__ string

provide code snippets which help to glue framework and generated code together\.
Their placeholders are in the *generated* code\.

# <a name='section5'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section6)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section6)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section6'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection2'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg),
[TCLPARAM](\.\./\.\./\.\./\.\./index\.md\#tclparam),
[TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl), [context\-free
languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression), [format
conversion](\.\./\.\./\.\./\.\./index\.md\#format\_conversion),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_pegrammar.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455

[//000000001]: # (pt::peg \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_pegrammar\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::peg\(n\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::peg \- Parsing Expression Grammar Serialization

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [PEG serialization format](#section3)

      - [Example](#subsection1)

  - [PE serialization format](#section4)

      - [Example](#subsection2)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::peg ?1?  
package require pt::pe  

[__::pt::peg__ __verify__ *serial* ?*canonvar*?](#1)  
[__::pt::peg__ __verify\-as\-canonical__ *serial*](#2)  
[__::pt::peg__ __canonicalize__ *serial*](#3)  
[__::pt::peg__ __print__ *serial*](#4)  
[__::pt::peg__ __merge__ *seriala* *serialb*](#5)  
[__::pt::peg__ __equal__ *seriala* *serialb*](#6)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides commands to work with the serializations of parsing
expression grammars as managed by the Parser Tools, and specified in section
[PEG serialization format](#section3)\.

This is a supporting package in the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_support\.png)

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::peg__ __verify__ *serial* ?*canonvar*?

    This command verifies that the content of *serial* is a valid
    serialization of a parsing expression and will throw an error if that is not
    the case\. The result of the command is the empty string\.

    If the argument *canonvar* is specified it is interpreted as the name of a
    variable in the calling context\. This variable will be written to if and
    only if *serial* is a valid regular serialization\. Its value will be a
    boolean, with __True__ indicating that the serialization is not only
    valid, but also *canonical*\. __False__ will be written for a valid,
    but non\-canonical serialization\.

    For the specification of serializations see the section [PE serialization
    format](#section4)\.

  - <a name='2'></a>__::pt::peg__ __verify\-as\-canonical__ *serial*

    This command verifies that the content of *serial* is a valid
    *canonical* serialization of a PEG and will throw an error if that is not
    the case\. The result of the command is the empty string\.

    For the specification of canonical serializations see the section [PEG
    serialization format](#section3)\.

  - <a name='3'></a>__::pt::peg__ __canonicalize__ *serial*

    This command assumes that the content of *serial* is a valid *regular*
    serialization of a PEG and will throw an error if that is not the case\.

    It will then convert the input into the *canonical* serialization of the
    contained PEG and return it as its result\. If the input is already canonical
    it will be returned unchanged\.

    For the specification of regular and canonical serializations see the
    section [PEG serialization format](#section3)\.

  - <a name='4'></a>__::pt::peg__ __print__ *serial*

    This command assumes that the argument *serial* contains a valid
    serialization of a parsing expression and returns a string containing that
    PE in a human readable form\.

    The exact format of this form is not specified and cannot be relied on for
    parsing or other machine\-based activities\.

    For the specification of serializations see the section [PEG serialization
    format](#section3)\.

  - <a name='5'></a>__::pt::peg__ __merge__ *seriala* *serialb*

    This command accepts the regular serializations of two grammars and uses
    them to create their union\. The result of the command is the canonical
    serialization of this unified grammar\.

    A merge errors occurs if for any nonterminal symbol S occuring in both input
    grammars the two input grammars specify different semantic modes\.

    The semantic mode of each nonterminal symbol S is the semantic mode of S in
    any of its input grammars\. The previous rule made sure that for symbols
    occuring in both grammars these values are identical\.

    The right\-hand side of each nonterminal symbol S occuring in both input
    grammars is the choice between the right\-hand sides of S in the input
    grammars, with the parsing expression of S in *seriala* coming first,
    except if both expressions are identical\. In that case the first expression
    is taken\.

    The right\-hand side of each nonterminal symbol S occuring in only one of the
    input grammars is the right\-hand side of S in its input grammar\.

    The start expression of the unified grammar is the choice between the start
    expressions of the input grammars, with the start expression of *seriala*
    coming first, except if both expressions are identical\. In that case the
    first expression is taken

  - <a name='6'></a>__::pt::peg__ __equal__ *seriala* *serialb*

    This command tests the two grammars *seriala* and *serialb* for
    structural equality\. The result of the command is a boolean value\. It will
    be set to __true__ if the expressions are identical, and __false__
    otherwise\.

    String equality is usable only if we can assume that the two grammars are
    pure Tcl lists and dictionaries\.

# <a name='section3'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section4)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section4)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section4'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection2'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_pexpr_op.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288

[//000000001]: # (pt::pe::op \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_pexpr\_op\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::pe::op\(n\) 1\.0\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::pe::op \- Parsing Expression Utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [PE serialization format](#section3)

      - [Example](#subsection1)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::pe::op ?1\.0\.1?  
package require pt::pe ?1?  
package require struct::set  

[__::pt::pe::op__ __drop__ *dropset* *pe*](#1)  
[__::pt::pe::op__ __rename__ *nt* *ntnew* *pe*](#2)  
[__::pt::pe::op__ __called__ *pe*](#3)  
[__::pt::pe::op__ __flatten__ *pe*](#4)  
[__::pt::pe::op__ __fusechars__ *pe*](#5)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides additional commands to work with the serializations of
parsing expressions as managed by the PEG and related packages, and specified in
section [PE serialization format](#section3)\.

This is an internal package, for use by the higher level packages handling PEGs,
their conversion into and out of various other formats, or other uses\.

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::pe::op__ __drop__ *dropset* *pe*

    This command removes all occurences of any of the nonterminals symbols in
    the set *dropset* from the parsing expression *pe*, and simplifies it\.
    This may result in the expression becoming "epsilon", i\.e\. matching nothing\.

  - <a name='2'></a>__::pt::pe::op__ __rename__ *nt* *ntnew* *pe*

    This command renames all occurences of the nonterminal *nt* in the parsing
    expression *pe* into *ntnew*\.

  - <a name='3'></a>__::pt::pe::op__ __called__ *pe*

    This command extracts the set of all nonterminal symbols used, i\.e\.
    'called', in the parsing expression *pe*\.

  - <a name='4'></a>__::pt::pe::op__ __flatten__ *pe*

    This command transforms the parsing expression by eliminating sequences
    nested in sequences, and choices in choices, lifting the children of the
    nested expression into the parent\. It further eliminates all sequences and
    choices with only one child, as these are redundant\.

    The resulting parsing expression is returned as the result of the command\.

  - <a name='5'></a>__::pt::pe::op__ __fusechars__ *pe*

    This command transforms the parsing expression by fusing adjacent terminals
    in sequences and adjacent terminals and ranges in choices, it \(re\)constructs
    highlevel *strings* and *character classes*\.

    The resulting pseudo\-parsing expression is returned as the result of the
    command and may contain the pseudo\-operators __str__ for character
    sequences, aka strings, and __cl__ for character choices, aka character
    classes\.

    The result is called a *pseudo\-parsing expression* because it is not a
    true parsing expression anymore, and will fail a check with __::pt::peg
    verify__ if the new pseudo\-operators are present in the result, but is
    otherwise of sound structure for a parsing expression\. Notably, the commands
    __::pt::peg bottomup__ and __::pt::peg topdown__ will process them
    without trouble\.

# <a name='section3'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection1'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_pexpression.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487

[//000000001]: # (pt::pe \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_pexpression\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::pe\(n\) 1\.0\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::pe \- Parsing Expression Serialization

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [PE serialization format](#section3)

      - [Example](#subsection1)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::pe ?1\.0\.1?  
package require char  

[__::pt::pe__ __verify__ *serial* ?*canonvar*?](#1)  
[__::pt::pe__ __verify\-as\-canonical__ *serial*](#2)  
[__::pt::pe__ __canonicalize__ *serial*](#3)  
[__::pt::pe__ __print__ *serial*](#4)  
[__::pt::pe__ __bottomup__ *cmdprefix* *pe*](#5)  
[__cmdprefix__ *pe* *op* *arguments*](#6)  
[__::pt::pe__ __topdown__ *cmdprefix* *pe*](#7)  
[__::pt::pe__ __equal__ *seriala* *serialb*](#8)  
[__::pt::pe__ __epsilon__](#9)  
[__::pt::pe__ __dot__](#10)  
[__::pt::pe__ __alnum__](#11)  
[__::pt::pe__ __alpha__](#12)  
[__::pt::pe__ __ascii__](#13)  
[__::pt::pe__ __control__](#14)  
[__::pt::pe__ __digit__](#15)  
[__::pt::pe__ __graph__](#16)  
[__::pt::pe__ __lower__](#17)  
[__::pt::pe__ __print__](#18)  
[__::pt::pe__ __punct__](#19)  
[__::pt::pe__ __space__](#20)  
[__::pt::pe__ __upper__](#21)  
[__::pt::pe__ __wordchar__](#22)  
[__::pt::pe__ __xdigit__](#23)  
[__::pt::pe__ __ddigit__](#24)  
[__::pt::pe__ __terminal__ *t*](#25)  
[__::pt::pe__ __range__ *ta* *tb*](#26)  
[__::pt::pe__ __nonterminal__ *nt*](#27)  
[__::pt::pe__ __choice__ *pe*\.\.\.](#28)  
[__::pt::pe__ __sequence__ *pe*\.\.\.](#29)  
[__::pt::pe__ __repeat0__ *pe*](#30)  
[__::pt::pe__ __repeat1__ *pe*](#31)  
[__::pt::pe__ __optional__ *pe*](#32)  
[__::pt::pe__ __ahead__ *pe*](#33)  
[__::pt::pe__ __notahead__ *pe*](#34)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides commands to work with the serializations of parsing
expressions as managed by the Parser Tools, and specified in section [PE
serialization format](#section3)\.

This is a supporting package in the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_support\.png)

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::pe__ __verify__ *serial* ?*canonvar*?

    This command verifies that the content of *serial* is a valid
    serialization of a parsing expression and will throw an error if that is not
    the case\. The result of the command is the empty string\.

    If the argument *canonvar* is specified it is interpreted as the name of a
    variable in the calling context\. This variable will be written to if and
    only if *serial* is a valid regular serialization\. Its value will be a
    boolean, with __True__ indicating that the serialization is not only
    valid, but also *canonical*\. __False__ will be written for a valid,
    but non\-canonical serialization\.

    For the specification of serializations see the section [PE serialization
    format](#section3)\.

  - <a name='2'></a>__::pt::pe__ __verify\-as\-canonical__ *serial*

    This command verifies that the content of *serial* is a valid
    *canonical* serialization of a parsing expression and will throw an error
    if that is not the case\. The result of the command is the empty string\.

    For the specification of canonical serializations see the section [PE
    serialization format](#section3)\.

  - <a name='3'></a>__::pt::pe__ __canonicalize__ *serial*

    This command assumes that the content of *serial* is a valid *regular*
    serialization of a parsing expression and will throw an error if that is not
    the case\.

    It will then convert the input into the *canonical* serialization of this
    parsing expression and return it as its result\. If the input is already
    canonical it will be returned unchanged\.

    For the specification of regular and canonical serializations see the
    section [PE serialization format](#section3)\.

  - <a name='4'></a>__::pt::pe__ __print__ *serial*

    This command assumes that the argument *serial* contains a valid
    serialization of a parsing expression and returns a string containing that
    PE in a human readable form\.

    The exact format of this form is not specified and cannot be relied on for
    parsing or other machine\-based activities\.

    For the specification of serializations see the section [PE serialization
    format](#section3)\.

  - <a name='5'></a>__::pt::pe__ __bottomup__ *cmdprefix* *pe*

    This command walks the parsing expression *pe* from the bottom up to the
    root, invoking the command prefix *cmdprefix* for each partial expression\.
    This implies that the children of a parsing expression PE are handled before
    PE\.

    The command prefix has the signature

      * <a name='6'></a>__cmdprefix__ *pe* *op* *arguments*

        I\.e\. it is invoked with the parsing expression *pe* the walk is
        currently at, the *op*'erator in the *pe*, and the operator's
        *arguments*\.

        The result returned by the command prefix replaces *pe* in the parsing
        expression it was a child of, allowing transformations of the expression
        tree\.

        This also means that for all inner parsing expressions the contents of
        *arguments* are the results of the command prefix invoked for the
        children of this inner parsing expression\.

  - <a name='7'></a>__::pt::pe__ __topdown__ *cmdprefix* *pe*

    This command walks the parsing expression *pe* from the root down to the
    leaves, invoking the command prefix *cmdprefix* for each partial
    expression\. This implies that the children of a parsing expression PE are
    handled after PE\.

    The command prefix has the same signature as for __bottomup__, see
    above\.

    The result returned by the command prefix is *ignored*\.

  - <a name='8'></a>__::pt::pe__ __equal__ *seriala* *serialb*

    This command tests the two parsing expressions *seriala* and *serialb*
    for structural equality\. The result of the command is a boolean value\. It
    will be set to __true__ if the expressions are identical, and
    __false__ otherwise\.

    String equality is usable only if we can assume that the two parsing
    expressions are pure Tcl lists\.

  - <a name='9'></a>__::pt::pe__ __epsilon__

    This command constructs the atomic parsing expression for epsilon\.

  - <a name='10'></a>__::pt::pe__ __dot__

    This command constructs the atomic parsing expression for dot\.

  - <a name='11'></a>__::pt::pe__ __alnum__

    This command constructs the atomic parsing expression for alnum\.

  - <a name='12'></a>__::pt::pe__ __alpha__

    This command constructs the atomic parsing expression for alpha\.

  - <a name='13'></a>__::pt::pe__ __ascii__

    This command constructs the atomic parsing expression for ascii\.

  - <a name='14'></a>__::pt::pe__ __control__

    This command constructs the atomic parsing expression for control\.

  - <a name='15'></a>__::pt::pe__ __digit__

    This command constructs the atomic parsing expression for digit\.

  - <a name='16'></a>__::pt::pe__ __graph__

    This command constructs the atomic parsing expression for graph\.

  - <a name='17'></a>__::pt::pe__ __lower__

    This command constructs the atomic parsing expression for lower\.

  - <a name='18'></a>__::pt::pe__ __print__

    This command constructs the atomic parsing expression for print\.

  - <a name='19'></a>__::pt::pe__ __punct__

    This command constructs the atomic parsing expression for punct\.

  - <a name='20'></a>__::pt::pe__ __space__

    This command constructs the atomic parsing expression for space\.

  - <a name='21'></a>__::pt::pe__ __upper__

    This command constructs the atomic parsing expression for upper\.

  - <a name='22'></a>__::pt::pe__ __wordchar__

    This command constructs the atomic parsing expression for wordchar\.

  - <a name='23'></a>__::pt::pe__ __xdigit__

    This command constructs the atomic parsing expression for xdigit\.

  - <a name='24'></a>__::pt::pe__ __ddigit__

    This command constructs the atomic parsing expression for ddigit\.

  - <a name='25'></a>__::pt::pe__ __terminal__ *t*

    This command constructs the atomic parsing expression for the terminal
    symbol *t*\.

  - <a name='26'></a>__::pt::pe__ __range__ *ta* *tb*

    This command constructs the atomic parsing expression for the range of
    terminal symbols *ta* \.\.\. *tb*\.

  - <a name='27'></a>__::pt::pe__ __nonterminal__ *nt*

    This command constructs the atomic parsing expression for the nonterminal
    symbol *nt*\.

  - <a name='28'></a>__::pt::pe__ __choice__ *pe*\.\.\.

    This command constructs the parsing expression representing the ordered or
    prioritized choice between the argument parsing expressions\. The first
    argument has the highest priority\.

  - <a name='29'></a>__::pt::pe__ __sequence__ *pe*\.\.\.

    This command constructs the parsing expression representing the sequence of
    the argument parsing expression\. The first argument is the first element of
    the sequence\.

  - <a name='30'></a>__::pt::pe__ __repeat0__ *pe*

    This command constructs the parsing expression representing the zero or more
    repetition of the argument parsing expression *pe*, also known as the
    kleene closure\.

  - <a name='31'></a>__::pt::pe__ __repeat1__ *pe*

    This command constructs the parsing expression representing the one or more
    repetition of the argument parsing expression *pe*, also known as the
    positive kleene closure\.

  - <a name='32'></a>__::pt::pe__ __optional__ *pe*

    This command constructs the parsing expression representing the optionality
    of the argument parsing expression *pe*\.

  - <a name='33'></a>__::pt::pe__ __ahead__ *pe*

    This command constructs the parsing expression representing the positive
    lookahead of the argument parsing expression *pe*\.

  - <a name='34'></a>__::pt::pe__ __notahead__ *pe*

    This command constructs the parsing expression representing the negative
    lookahead of the argument parsing expression *pe*\.

# <a name='section3'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection1'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_pgen.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260

[//000000001]: # (pt::pgen \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_pgen\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::pgen\(n\) 1\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::pgen \- Parser Generator

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Example](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::pgen ?1\.1?  

[__::pt::pgen__ *inputformat* *text* *resultformat* ?*options\.\.\.*?](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides a command implementing a *[parser
generator](\.\./\.\./\.\./\.\./index\.md\#parser\_generator)* taking parsing expression
grammars as input\.

It is the implementation of method __generate__ of
__[pt](\.\./\.\./apps/pt\.md)__, the *[Parser Tools
Application](\.\./\.\./apps/pt\.md)*\.

As such the intended audience of this document are people wishing to modify
and/or extend this part of __[pt](\.\./\.\./apps/pt\.md)__'s functionality\.
Users of __[pt](\.\./\.\./apps/pt\.md)__ on the other hand are hereby refered
to the applications' manpage, i\.e\. *[Parser Tools
Application](\.\./\.\./apps/pt\.md)*\.

It resides in the User Package Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_user\_pkg\.png)

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::pgen__ *inputformat* *text* *resultformat* ?*options\.\.\.*?

    This command takes the parsing expression grammar in *text* \(in the format
    specified by *inputformat*\), and returns the same grammar in the format
    *resultformat* as the result of the command\.

    The two known input formats are __peg__ and __json__\. Introductions
    to them, including their formal specifications, can be found in the *[PEG
    Language Tutorial](pt\_peg\_language\.md)* and *[The JSON Grammar
    Exchange Format](pt\_json\_language\.md)*\. The packages used to parse these
    formats are

      * __peg__

        __[pt::peg::from::peg](pt\_peg\_from\_peg\.md)__

      * __json__

        __[pt::peg::from::json](pt\_peg\_from\_json\.md)__

    On the output side the known formats, and the packages used to generate them
    are

      * __c__

        __[pt::peg::to::cparam](pt\_peg\_to\_cparam\.md)__

      * __container__

        __[pt::peg::to::container](pt\_peg\_to\_container\.md)__

      * __critcl__

        __[pt::peg::to::cparam](pt\_peg\_to\_cparam\.md)__ \+
        __[pt::cparam::configuration::critcl](pt\_cparam\_config\_critcl\.md)__

      * __json__

        __[pt::peg::to::json](pt\_peg\_to\_json\.md)__

      * __oo__

        __[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__ \+
        __[pt::tclparam::configuration::tcloo](pt\_tclparam\_config\_tcloo\.md)__

      * __peg__

        __[pt::peg::to::peg](pt\_peg\_to\_peg\.md)__

      * __snit__

        __[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__ \+
        __[pt::tclparam::configuration::snit](pt\_tclparam\_config\_snit\.md)__

    The options supported by each of these formats are documented with their
    respective packages\.

# <a name='section3'></a>Example

In this section we are working a complete example, starting with a PEG grammar
and ending with running the parser generated from it over some input, following
the outline shown in the figure below:

![](\.\./\.\./\.\./\.\./image/flow\.png) Our grammar, assumed to the stored in the
file "calculator\.peg" is

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

From this we create a snit\-based parser using the script "gen"

    package require Tcl 8.5
    package require fileutil
    package require pt::pgen

    lassign $argv name
    set grammar [fileutil::cat $name.peg]
    set pclass  [pt::pgen peg $gr snit -class $name -file  $name.peg -name  $name]
    fileutil::writeFile $name.tcl $pclass
    exit 0

calling it like

    tclsh8.5 gen calculator

which leaves us with the parser package and class written to the file
"calculator\.tcl"\. Assuming that this package is then properly installed in a
place where Tcl can find it we can now use this class via a script like

    package require calculator

    lassign $argv input
    set channel [open $input r]

    set parser [calculator]
    set ast [$parser parse $channel]
    $parser destroy
    close $channel

    ... now process the returned abstract syntax tree ...

where the abstract syntax tree stored in the variable will look like

    set ast {Expression 0 4
        {Factor 0 4
            {Term 0 2
                {Number 0 2
                    {Digit 0 0}
                    {Digit 1 1}
                    {Digit 2 2}
                }
            }
            {AddOp 3 3}
            {Term 4 4
                {Number 4 4
                    {Digit 4 4}
                }
            }
        }
    }

assuming that the input file and channel contained the text

    120+5

A more graphical representation of the tree would be

![](\.\./\.\./\.\./\.\./image/expr\_ast\.png) Regardless, at this point it is the
user's responsibility to work with the tree to reach whatever goal she desires\.
I\.e\. analyze it, transform it, etc\. The package
__[pt::ast](pt\_astree\.md)__ should be of help here, providing commands
to walk such ASTs structures in various ways\.

One important thing to note is that the parsers used here return a data
structure representing the structure of the input per the grammar underlying the
parser\. There are *no* callbacks during the parsing process, i\.e\. no *parsing
actions*, as most other parsers will have\.

Going back to the last snippet of code, the execution of the parser for some
input, note how the parser instance follows the specified *[Parser
API](pt\_parser\_api\.md)*\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_rdengine.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948

[//000000001]: # (pt::rde \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_rdengine\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::rde\(n\) 1\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::rde \- Parsing Runtime Support, PARAM based

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

      - [Class API](#subsection1)

      - [Object API](#subsection2)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::rde ?1\.1?  
package require snit  
package require struct::stack 1\.5  
package require pt::ast 1\.1  

[__::pt::rde__ *objectName*](#1)  
[*objectName* __destroy__](#2)  
[*objectName* __reset__ *chan*](#3)  
[*objectName* __complete__](#4)  
[*objectName* __chan__](#5)  
[*objectName* __line__](#6)  
[*objectName* __column__](#7)  
[*objectName* __current__](#8)  
[*objectName* __location__](#9)  
[*objectName* __locations__](#10)  
[*objectName* __ok__](#11)  
[*objectName* __value__](#12)  
[*objectName* __error__](#13)  
[*objectName* __errors__](#14)  
[*objectName* __tokens__ ?*from* ?*to*??](#15)  
[*objectName* __symbols__](#16)  
[*objectName* __known__](#17)  
[*objectName* __reducible__](#18)  
[*objectName* __asts__](#19)  
[*objectName* __ast__](#20)  
[*objectName* __position__ *loc*](#21)  
[*objectName* __i\_input\_next__ *msg*](#22)  
[*objectName* __i\_test\_alnum__](#23)  
[*objectName* __i\_test\_alpha__](#24)  
[*objectName* __i\_test\_ascii__](#25)  
[*objectName* __i\_test\_char__ *char*](#26)  
[*objectName* __i\_test\_ddigit__](#27)  
[*objectName* __i\_test\_digit__](#28)  
[*objectName* __i\_test\_graph__](#29)  
[*objectName* __i\_test\_lower__](#30)  
[*objectName* __i\_test\_print__](#31)  
[*objectName* __i\_test\_punct__](#32)  
[*objectName* __i\_test\_range__ *chars* *chare*](#33)  
[*objectName* __i\_test\_space__](#34)  
[*objectName* __i\_test\_upper__](#35)  
[*objectName* __i\_test\_wordchar__](#36)  
[*objectName* __i\_test\_xdigit__](#37)  
[*objectName* __i\_error\_clear__](#38)  
[*objectName* __i\_error\_push__](#39)  
[*objectName* __i\_error\_pop\_merge__](#40)  
[*objectName* __i\_error\_nonterminal__ *symbol*](#41)  
[*objectName* __i\_status\_ok__](#42)  
[*objectName* __i\_status\_fail__](#43)  
[*objectName* __i\_status\_negate__](#44)  
[*objectName* __i\_loc\_push__](#45)  
[*objectName* __i\_loc\_pop\_discard__](#46)  
[*objectName* __i\_loc\_pop\_rewind__](#47)  
[*objectName* __i:ok\_loc\_pop\_rewind__](#48)  
[*objectName* __i\_loc\_pop\_rewind/discard__](#49)  
[*objectName* __i\_symbol\_restore__ *symbol*](#50)  
[*objectName* __i\_symbol\_save__ *symbol*](#51)  
[*objectName* __i\_value\_clear__](#52)  
[*objectName* __i\_value\_clear/leaf__](#53)  
[*objectName* __i\_value\_clear/reduce__](#54)  
[*objectName* __i:ok\_ast\_value\_push__](#55)  
[*objectName* __i\_ast\_push__](#56)  
[*objectName* __i\_ast\_pop\_rewind__](#57)  
[*objectName* __i:fail\_ast\_pop\_rewind__](#58)  
[*objectName* __i\_ast\_pop\_rewind/discard__](#59)  
[*objectName* __i\_ast\_pop\_discard__](#60)  
[*objectName* __i\_ast\_pop\_discard/rewind__](#61)  
[*objectName* __i:ok\_continue__](#62)  
[*objectName* __i:fail\_continue__](#63)  
[*objectName* __i:fail\_return__](#64)  
[*objectName* __i:ok\_return__](#65)  
[*objectName* __si:void\_state\_push__](#66)  
[*objectName* __si:void2\_state\_push__](#67)  
[*objectName* __si:value\_state\_push__](#68)  
[*objectName* __si:void\_state\_merge__](#69)  
[*objectName* __si:void\_state\_merge\_ok__](#70)  
[*objectName* __si:value\_state\_merge__](#71)  
[*objectName* __si:value\_notahead\_start__](#72)  
[*objectName* __si:void\_notahead\_exit__](#73)  
[*objectName* __si:value\_notahead\_exit__](#74)  
[*objectName* __si:kleene\_abort__](#75)  
[*objectName* __si:kleene\_close__](#76)  
[*objectName* __si:voidvoid\_branch__](#77)  
[*objectName* __si:voidvalue\_branch__](#78)  
[*objectName* __si:valuevoid\_branch__](#79)  
[*objectName* __si:valuevalue\_branch__](#80)  
[*objectName* __si:voidvoid\_part__](#81)  
[*objectName* __si:voidvalue\_part__](#82)  
[*objectName* __si:valuevalue\_part__](#83)  
[*objectName* __si:value\_symbol\_start__ *symbol*](#84)  
[*objectName* __si:value\_void\_symbol\_start__ *symbol*](#85)  
[*objectName* __si:void\_symbol\_start__ *symbol*](#86)  
[*objectName* __si:void\_void\_symbol\_start__ *symbol*](#87)  
[*objectName* __si:reduce\_symbol\_end__ *symbol*](#88)  
[*objectName* __si:void\_leaf\_symbol\_end__ *symbol*](#89)  
[*objectName* __si:value\_leaf\_symbol\_end__ *symbol*](#90)  
[*objectName* __si:value\_clear\_symbol\_end__ *symbol*](#91)  
[*objectName* __si:void\_clear\_symbol\_end__ *symbol*](#92)  
[*objectName* __si:next\_char__ *tok*](#93)  
[*objectName* __si:next\_range__ *toks* *toke*](#94)  
[*objectName* __si:next\_alnum__](#95)  
[*objectName* __si:next\_alpha__](#96)  
[*objectName* __si:next\_ascii__](#97)  
[*objectName* __si:next\_ddigit__](#98)  
[*objectName* __si:next\_digit__](#99)  
[*objectName* __si:next\_graph__](#100)  
[*objectName* __si:next\_lower__](#101)  
[*objectName* __si:next\_print__](#102)  
[*objectName* __si:next\_punct__](#103)  
[*objectName* __si:next\_space__](#104)  
[*objectName* __si:next\_upper__](#105)  
[*objectName* __si:next\_wordchar__](#106)  
[*objectName* __si:next\_xdigit__](#107)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides a class whose instances provide the runtime support for
recursive descent parsers with backtracking, as is needed for the execution of,
for example, parsing expression grammars\. It implements the *[PackRat Machine
Specification](pt\_param\.md)*, as such that document is *required* reading
to understand both this manpage, and the package itself\. The description below
does make numerous shorthand references to the PARAM's instructions and the
various parts of its architectural state\.

The package resides in the Execution section of the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_transform\.png)

Note: This package not only has the standard Tcl implementation, but also an
accelerator, i\.e\. a C implementation, based on Critcl\.

## <a name='subsection1'></a>Class API

The package exports the API described here\.

  - <a name='1'></a>__::pt::rde__ *objectName*

    The command creates a new runtime object for a recursive descent parser with
    backtracking and returns the fully qualified name of the object command as
    its result\. The API of this object command is described in the section
    [Object API](#subsection2)\. It may be used to invoke various operations
    on the object\.

## <a name='subsection2'></a>Object API

All objects created by this package provide the following 63 methods for the
manipulation and querying of their state, which is, in essence the architectural
state of a PARAM\.

First some general methods and the state accessors\.

  - <a name='2'></a>*objectName* __destroy__

    This method destroys the object, releasing all claimed memory, and deleting
    the associated object command\.

  - <a name='3'></a>*objectName* __reset__ *chan*

    This method resets the state of the runtme to its defaults, preparing it for
    the parsing of the character in the channel *chan*, which becomes IN\.

    Note here that the Parser Tools are based on Tcl 8\.5\+\. In other words, the
    channel argument is not restricted to files, sockets, etc\. We have the full
    power of *reflected channels* available\.

    It should also be noted that the parser pulls the characters from the input
    stream as it needs them\. If a parser created by this package has to be
    operated in a push aka event\-driven manner it will be necessary to go to Tcl
    8\.6\+ and use the __[coroutine::auto](\.\./coroutine/coro\_auto\.md)__ to
    wrap it into a coroutine where __[read](\.\./\.\./\.\./\.\./index\.md\#read)__
    is properly changed for push\-operation\.

  - <a name='4'></a>*objectName* __complete__

    This method completes parsing, either returning the AST made from the
    elements of ARS, or throwing an error containing the current ER\.

  - <a name='5'></a>*objectName* __chan__

    This method returns the handle of the channel which is IN\.

  - <a name='6'></a>*objectName* __line__

    This method returns the line number for the position IN is currently at\.
    Note that this may not match with the line number for CL, due to
    backtracking\.

  - <a name='7'></a>*objectName* __column__

    This method returns the column for the position IN is currently at\. Note
    that this may not match with the column for CL, due to backtracking\.

  - <a name='8'></a>*objectName* __current__

    This method returns CC\.

  - <a name='9'></a>*objectName* __location__

    This method returns CL\.

  - <a name='10'></a>*objectName* __locations__

    This method returns the LS\. The topmost entry of the stack will be the first
    element of the returned list\.

  - <a name='11'></a>*objectName* __ok__

    This method returns ST\.

  - <a name='12'></a>*objectName* __value__

    This method returns SV\.

  - <a name='13'></a>*objectName* __error__

    This method returns ER\. This is either the empty string for an empty ER, or
    a list of 2 elements, the location the error is for, and a set of messages
    which specify which symbols were expected at the location\. The messages are
    encoded as one of the possible atomic parsing expressions \(special
    operators, terminal, range, and nonterminal operator\)\.

  - <a name='14'></a>*objectName* __errors__

    This method returns ES\. The topmost entry of the stack will be the first
    element of the returned list\. Each entry is encoded as described for
    __error__\.

  - <a name='15'></a>*objectName* __tokens__ ?*from* ?*to*??

    This method returns the part of TC for the range of locations of IN starting
    at *from* and ending at *to*\. If *to* is not specified it is taken as
    identical to *from*\. If neither argument is specified the whole of TC is
    returned\.

    Each token in the returned list is a list of three elements itself,
    containing the character at the location, and the associated line and column
    numbers, in this order\.

  - <a name='16'></a>*objectName* __symbols__

    This method returns a dictionary containing NC\. Keys are two\-element lists
    containing nonterminal symbol and location, in this order\. The values are
    4\-tuples containing CL, ST, ER, and SV, in this order\. ER is encoded as
    specified for the method __error__\.

  - <a name='17'></a>*objectName* __known__

    This method returns a list containing the keys of SC\. They are encoded in
    the same manner as is done by method __symbols__\.

  - <a name='18'></a>*objectName* __reducible__

    This method returns ARS\. The topmost entry of the stack will be the first
    element of the returned list

  - <a name='19'></a>*objectName* __asts__

    This method returns AS\. The topmost entry of the stack will be the first
    element of the returned list

  - <a name='20'></a>*objectName* __ast__

    This is a convenience method returning the topmost element of ARS\.

  - <a name='21'></a>*objectName* __position__ *loc*

    This method returns the line and column numbers for the specified location
    of IN, assuming that this location has already been reached during the
    parsing process\.

The following methods implement all PARAM instructions\. They all have the prefix
"i\_"\.

The control flow is mainly provided by Tcl's builtin commands, like __if__,
__while__, etc\., plus a few guarded variants of PARAM instructions and Tcl
commands\.\. That means that these instruction variants will do nothing if their
guard condition is not fulfilled\. They can be recognized by the prefix "i:ok\_"
and "i:fail\_", which denote the value ST has to have for the instruction to
execute\.

The instructions are listed in the same order they occur in the *[PackRat
Machine Specification](pt\_param\.md)*, with the guard variants listed after
their regular implementation, if any, or in their place\.

  - <a name='22'></a>*objectName* __i\_input\_next__ *msg*

    This method implements the PARAM instruction __input\_next__\.

  - <a name='23'></a>*objectName* __i\_test\_alnum__

    This method implements the PARAM instruction __test\_alnum__\.

  - <a name='24'></a>*objectName* __i\_test\_alpha__

    This method implements the PARAM instruction __test\_alpha__\.

  - <a name='25'></a>*objectName* __i\_test\_ascii__

    This method implements the PARAM instruction __test\_ascii__\.

  - <a name='26'></a>*objectName* __i\_test\_char__ *char*

    This method implements the PARAM instruction __test\_char__\.

  - <a name='27'></a>*objectName* __i\_test\_ddigit__

    This method implements the PARAM instruction __test\_ddigit__\.

  - <a name='28'></a>*objectName* __i\_test\_digit__

    This method implements the PARAM instruction __test\_digit__\.

  - <a name='29'></a>*objectName* __i\_test\_graph__

    This method implements the PARAM instruction __test\_graph__\.

  - <a name='30'></a>*objectName* __i\_test\_lower__

    This method implements the PARAM instruction __test\_lower__\.

  - <a name='31'></a>*objectName* __i\_test\_print__

    This method implements the PARAM instruction __test\_print__\.

  - <a name='32'></a>*objectName* __i\_test\_punct__

    This method implements the PARAM instruction __test\_punct__\.

  - <a name='33'></a>*objectName* __i\_test\_range__ *chars* *chare*

    This method implements the PARAM instruction __test\_range__\.

  - <a name='34'></a>*objectName* __i\_test\_space__

    This method implements the PARAM instruction __test\_space__\.

  - <a name='35'></a>*objectName* __i\_test\_upper__

    This method implements the PARAM instruction __test\_upper__\.

  - <a name='36'></a>*objectName* __i\_test\_wordchar__

    This method implements the PARAM instruction __test\_wordchar__\.

  - <a name='37'></a>*objectName* __i\_test\_xdigit__

    This method implements the PARAM instruction __test\_xdigit__\.

  - <a name='38'></a>*objectName* __i\_error\_clear__

    This method implements the PARAM instruction __error\_clear__\.

  - <a name='39'></a>*objectName* __i\_error\_push__

    This method implements the PARAM instruction __error\_push__\.

  - <a name='40'></a>*objectName* __i\_error\_pop\_merge__

    This method implements the PARAM instruction __error\_pop\_merge__\.

  - <a name='41'></a>*objectName* __i\_error\_nonterminal__ *symbol*

    This method implements the PARAM instruction __error\_nonterminal__\.

  - <a name='42'></a>*objectName* __i\_status\_ok__

    This method implements the PARAM instruction __status\_ok__\.

  - <a name='43'></a>*objectName* __i\_status\_fail__

    This method implements the PARAM instruction __status\_fail__\.

  - <a name='44'></a>*objectName* __i\_status\_negate__

    This method implements the PARAM instruction __status\_negate__\.

  - <a name='45'></a>*objectName* __i\_loc\_push__

    This method implements the PARAM instruction __loc\_push__\.

  - <a name='46'></a>*objectName* __i\_loc\_pop\_discard__

    This method implements the PARAM instruction __loc\_pop\_discard__\.

  - <a name='47'></a>*objectName* __i\_loc\_pop\_rewind__

    This method implements the PARAM instruction __loc\_pop\_rewind__\.

  - <a name='48'></a>*objectName* __i:ok\_loc\_pop\_rewind__

    This guarded method, a variant of __i\_loc\_pop\_rewind__, executes only
    for "ST == ok"\.

  - <a name='49'></a>*objectName* __i\_loc\_pop\_rewind/discard__

    This method is a convenient combination of control flow and the two PARAM
    instructions __loc\_pop\_rewind__ and __loc\_pop\_discard__\. The former
    is executed for "ST == fail", the latter for "ST == ok"\.

  - <a name='50'></a>*objectName* __i\_symbol\_restore__ *symbol*

    This method implements the PARAM instruction __symbol\_restore__\.

    The boolean result of the check is returned as the result of the method and
    can be used with standard Tcl control flow commands\.

  - <a name='51'></a>*objectName* __i\_symbol\_save__ *symbol*

    This method implements the PARAM instruction __symbol\_save__\.

  - <a name='52'></a>*objectName* __i\_value\_clear__

    This method implements the PARAM instruction __value\_clear__\.

  - <a name='53'></a>*objectName* __i\_value\_clear/leaf__

    This method is a convenient combination of control flow and the two PARAM
    instructions __value\_clear__ and __value\_leaf__\. The former is
    executed for "ST == fail", the latter for "ST == ok"\.

  - <a name='54'></a>*objectName* __i\_value\_clear/reduce__

    This method is a convenient combination of control flow and the two PARAM
    instructions __value\_clear__ and __value\_reduce__\. The former is
    executed for "ST == fail", the latter for "ST == ok"\.

  - <a name='55'></a>*objectName* __i:ok\_ast\_value\_push__

    This method implements a guarded variant of the the PARAM instruction
    __ast\_value\_push__, which executes only for "ST == ok"\.

  - <a name='56'></a>*objectName* __i\_ast\_push__

    This method implements the PARAM instruction __ast\_push__\.

  - <a name='57'></a>*objectName* __i\_ast\_pop\_rewind__

    This method implements the PARAM instruction __ast\_pop\_rewind__\.

  - <a name='58'></a>*objectName* __i:fail\_ast\_pop\_rewind__

    This guarded method, a variant of __i\_ast\_pop\_rewind__, executes only
    for "ST == fail"\.

  - <a name='59'></a>*objectName* __i\_ast\_pop\_rewind/discard__

    This method is a convenient combination of control flow and the two PARAM
    instructions __ast\_pop\_rewind__ and __ast\_pop\_discard__\. The former
    is executed for "ST == fail", the latter for "ST == ok"\.

  - <a name='60'></a>*objectName* __i\_ast\_pop\_discard__

    This method implements the PARAM instruction __ast\_pop\_discard__\.

  - <a name='61'></a>*objectName* __i\_ast\_pop\_discard/rewind__

    This method is a convenient combination of control flow and the two PARAM
    instructions __ast\_pop\_discard__ and __ast\_pop\_rewind__\. The former
    is executed for "ST == fail", the latter for "ST == ok"\.

  - <a name='62'></a>*objectName* __i:ok\_continue__

    This guarded method executes only for "ST == ok"\. Then it aborts the current
    iteration of the innermost loop in the calling Tcl procedure\.

  - <a name='63'></a>*objectName* __i:fail\_continue__

    This guarded method executes only for "ST == fail"\. Then it aborts the
    current iteration of the innermost loop in the calling Tcl procedure\.

  - <a name='64'></a>*objectName* __i:fail\_return__

    This guarded method executes only for "ST == fail"\. Then it aborts the
    calling Tcl procedure\.

  - <a name='65'></a>*objectName* __i:ok\_return__

    This guarded method executes only for "ST == ok"\. Then it aborts the calling
    Tcl procedure\.

The next set of methods are *super instructions*, meaning that each implements
a longer sequence of instructions commonly used in parsers\. The combinated
instructions of the previous set, i\.e\. those with names matching the pattern
"i\_\*/\*", are actually super instructions as well, albeit with limited scope,
handling 2 instructions with their control flow\. The upcoming set is much
broader in scope, folding as much as six or more PARAM instructions into a
single method call\.

In this we can see the reasoning behind their use well:

  1. By using less instructions the generated parsers become smaller, as the
     common parts are now truly part of the common runtime, and not explicitly
     written in the parser's code over and over again\.

  1. Using less instructions additionally reduces the overhead associated with
     calls into the runtime, i\.e\. the cost of method dispatch and of setting up
     the variable context\.

  1. Another effect of the super instructions is that their internals can be
     optimized as well, especially regarding control flow, and stack use, as the
     runtime internals are accessible to all instructions folded into the
     sequence\.

  - <a name='66'></a>*objectName* __si:void\_state\_push__

    This method combines

        i_loc_push
        i_error_clear
        i_error_push

    Parsers use it at the beginning of *void* sequences and choices with a
    *void* initial branch\.

  - <a name='67'></a>*objectName* __si:void2\_state\_push__

    This method combines

        i_loc_push
        i_error_clear
        i_error_push

    Parsers use it at the beginning of optional and repeated expressions\.

  - <a name='68'></a>*objectName* __si:value\_state\_push__

    This method combines

        i_ast_push
        i_loc_push
        i_error_clear
        i_error_push

    Parsers use it at the beginning of sequences generating an AST and choices
    with an initial branch generating an AST\.

  - <a name='69'></a>*objectName* __si:void\_state\_merge__

    This method combines

        i_error_pop_merge
        i_loc_pop_rewind/discard

    Parsers use it at the end of void sequences and choices whose last branch is
    void\.

  - <a name='70'></a>*objectName* __si:void\_state\_merge\_ok__

    This method combines

        i_error_pop_merge
        i_loc_pop_rewind/discard
        i_status_ok

    Parsers use it at the end of optional expressions

  - <a name='71'></a>*objectName* __si:value\_state\_merge__

    This method combines

        i_error_pop_merge
        i_ast_pop_rewind/discard
        i_loc_pop_rewind/discard

    Parsers use it at the end of sequences generating ASTs and choices whose
    last branch generates an AST

  - <a name='72'></a>*objectName* __si:value\_notahead\_start__

    This method combines

        i_loc_push
        i_ast_push

    Parsers use it at the beginning of negative lookahead predicates which
    generate ASTs\.

  - <a name='73'></a>*objectName* __si:void\_notahead\_exit__

    This method combines

        i_loc_pop_rewind
        i_status_negate

    Parsers use it at the end of void negative lookahead predicates\.

  - <a name='74'></a>*objectName* __si:value\_notahead\_exit__

    This method combines

        i_ast_pop_discard/rewind
        i_loc_pop_rewind
        i_status_negate

    Parsers use it at the end of negative lookahead predicates which generate
    ASTs\.

  - <a name='75'></a>*objectName* __si:kleene\_abort__

    This method combines

        i_loc_pop_rewind/discard
        i:fail_return

    Parsers use it to stop a positive repetition when its first, required,
    expression fails\.

  - <a name='76'></a>*objectName* __si:kleene\_close__

    This method combines

        i_error_pop_merge
        i_loc_pop_rewind/discard
        i:fail_status_ok
        i:fail_return

    Parsers use it at the end of repetitions\.

  - <a name='77'></a>*objectName* __si:voidvoid\_branch__

    This method combines

        i_error_pop_merge
        i:ok_loc_pop_discard
        i:ok_return
        i_loc_rewind
        i_error_push

    Parsers use it when transiting between branches of a choice when both are
    void\.

  - <a name='78'></a>*objectName* __si:voidvalue\_branch__

    This method combines

        i_error_pop_merge
        i:ok_loc_pop_discard
        i:ok_return
        i_ast_push
        i_loc_rewind
        i_error_push

    Parsers use it when transiting between branches of a choice when the failing
    branch is void, and the next to test generates an AST\.

  - <a name='79'></a>*objectName* __si:valuevoid\_branch__

    This method combines

        i_error_pop_merge
        i_ast_pop_rewind/discard
        i:ok_loc_pop_discard
        i:ok_return
        i_loc_rewind
        i_error_push

    Parsers use it when transiting between branches of a choice when the failing
    branch generates an AST, and the next to test is void\.

  - <a name='80'></a>*objectName* __si:valuevalue\_branch__

    This method combines

        i_error_pop_merge
        i_ast_pop_discard
        i:ok_loc_pop_discard
        i:ok_return
        i_ast_rewind
        i_loc_rewind
        i_error_push

    Parsers use it when transiting between branches of a choice when both
    generate ASTs\.

  - <a name='81'></a>*objectName* __si:voidvoid\_part__

    This method combines

        i_error_pop_merge
        i:fail_loc_pop_rewind
        i:fail_return
        i_error_push

    Parsers use it when transiting between parts of a sequence and both are
    void\.

  - <a name='82'></a>*objectName* __si:voidvalue\_part__

    This method combines

        i_error_pop_merge
        i:fail_loc_pop_rewind
        i:fail_return
        i_ast_push
        i_error_push

    Parsers use it when transiting between parts of a sequence and the
    sucessfully matched part is void, and after it an AST is generated\.

  - <a name='83'></a>*objectName* __si:valuevalue\_part__

    This method combines

        i_error_pop_merge
        i:fail_ast_pop_rewind
        i:fail_loc_pop_rewind
        i:fail_return
        i_error_push

    Parsers use it when transiting between parts of a sequence and both parts
    generate ASTs\.

  - <a name='84'></a>*objectName* __si:value\_symbol\_start__ *symbol*

    This method combines

        if/found? i_symbol_restore $symbol
        i:found:ok_ast_value_push
        i:found_return
        i_loc_push
        i_ast_push

    Parsers use it at the beginning of a nonterminal symbol generating an AST,
    whose right\-hand side may have generated an AST as well\.

  - <a name='85'></a>*objectName* __si:value\_void\_symbol\_start__ *symbol*

    This method combines

        if/found? i_symbol_restore $symbol
        i:found:ok_ast_value_push
        i:found_return
        i_loc_push
        i_ast_push

    Parsers use it at the beginning of a void nonterminal symbol whose
    right\-hand side may generate an AST\.

  - <a name='86'></a>*objectName* __si:void\_symbol\_start__ *symbol*

    This method combines

        if/found? i_symbol_restore $symbol
        i:found_return
        i_loc_push
        i_ast_push

    Parsers use it at the beginning of a nonterminal symbol generating an AST
    whose right\-hand side is void\.

  - <a name='87'></a>*objectName* __si:void\_void\_symbol\_start__ *symbol*

    This method combines

        if/found? i_symbol_restore $symbol
        i:found_return
        i_loc_push

    Parsers use it at the beginning of a void nonterminal symbol whose
    right\-hand side is void as well\.

  - <a name='88'></a>*objectName* __si:reduce\_symbol\_end__ *symbol*

    This method combines

        i_value_clear/reduce $symbol
        i_symbol_save        $symbol
        i_error_nonterminal  $symbol
        i_ast_pop_rewind
        i_loc_pop_discard
        i:ok_ast_value_push

    Parsers use it at the end of a non\-terminal symbol generating an AST using
    the AST generated by the right\-hand side as child\.

  - <a name='89'></a>*objectName* __si:void\_leaf\_symbol\_end__ *symbol*

    This method combines

        i_value_clear/leaf  $symbol
        i_symbol_save       $symbol
        i_error_nonterminal $symbol
        i_loc_pop_discard
        i:ok_ast_value_push

    Parsers use it at the end of a non\-terminal symbol generating an AST whose
    right\-hand side is void\.

  - <a name='90'></a>*objectName* __si:value\_leaf\_symbol\_end__ *symbol*

    This method combines

        i_value_clear/leaf  $symbol
        i_symbol_save       $symbol
        i_error_nonterminal $symbol
        i_loc_pop_discard
        i_ast_pop_rewind
        i:ok_ast_value_push

    Parsers use it at the end of a non\-terminal symbol generating an AST
    discarding the AST generated by the right\-hand side\.

  - <a name='91'></a>*objectName* __si:value\_clear\_symbol\_end__ *symbol*

    This method combines

        i_value_clear
        i_symbol_save       $symbol
        i_error_nonterminal $symbol
        i_loc_pop_discard
        i_ast_pop_rewind

    Parsers use it at the end of a void non\-terminal symbol, discarding the AST
    generated by the right\-hand side\.

  - <a name='92'></a>*objectName* __si:void\_clear\_symbol\_end__ *symbol*

    This method combines

        i_value_clear
        i_symbol_save       $symbol
        i_error_nonterminal $symbol
        i_loc_pop_discard

    Parsers use it at the end of a void non\-terminal symbol with a void
    right\-hand side\.

  - <a name='93'></a>*objectName* __si:next\_char__ *tok*

  - <a name='94'></a>*objectName* __si:next\_range__ *toks* *toke*

  - <a name='95'></a>*objectName* __si:next\_alnum__

  - <a name='96'></a>*objectName* __si:next\_alpha__

  - <a name='97'></a>*objectName* __si:next\_ascii__

  - <a name='98'></a>*objectName* __si:next\_ddigit__

  - <a name='99'></a>*objectName* __si:next\_digit__

  - <a name='100'></a>*objectName* __si:next\_graph__

  - <a name='101'></a>*objectName* __si:next\_lower__

  - <a name='102'></a>*objectName* __si:next\_print__

  - <a name='103'></a>*objectName* __si:next\_punct__

  - <a name='104'></a>*objectName* __si:next\_space__

  - <a name='105'></a>*objectName* __si:next\_upper__

  - <a name='106'></a>*objectName* __si:next\_wordchar__

  - <a name='107'></a>*objectName* __si:next\_xdigit__

    These methods all combine

        i_input_next $msg
        i:fail_return

    with the appropriate __i\_test\_xxx__ instruction\. Parsers use them for
    handling atomic expressions\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_tclparam_config_nx.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

[//000000001]: # (pt::tclparam::configuration::nx \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_tclparam\_config\_nx\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::tclparam::configuration::nx\(n\) 1\.0\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::tclparam::configuration::nx \- Tcl/PARAM, Canned configuration, NX

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::tclparam::configuration::nx ?1\.0\.1?  

[__::pt::tclparam::configuration::nx__ __def__ *name* *pkg* *version* *cmdprefix*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package is an adjunct to
__[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__, to make the use of
this highly configurable package easier by providing a canned configuration\.
When applied this configuration causes the package
__[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__ to generate
__NX__\-based parser packages\.

It is a supporting package in the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_support\.png)

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::tclparam::configuration::nx__ __def__ *name* *pkg* *version* *cmdprefix*

    The command applies the configuration provided by this package to the
    *cmdprefix*, causing the creation of __NX__\-based parsers whose class
    is *name*, in package *pkg* with *version*\.

    The use of a command prefix as API allows application of the configuration
    to not only __[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__
    \(__pt::peg::to::tclparam configure__\), but also export manager instances
    and PEG containers \(__$export configuration set__ and __\[$container
    exporter\] configuration set__ respectively\)\.

    Or anything other command prefix accepting two arguments, option and value\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_tclparam_config_snit.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

[//000000001]: # (pt::tclparam::configuration::snit \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_tclparam\_config\_snit\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::tclparam::configuration::snit\(n\) 1\.0\.2 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::tclparam::configuration::snit \- Tcl/PARAM, Canned configuration, Snit

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::tclparam::configuration::snit ?1\.0\.2?  

[__::pt::tclparam::configuration::snit__ __def__ *name* *pkg* *version* *cmdprefix*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package is an adjunct to
__[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__, to make the use of
this highly configurable package easier by providing a canned configuration\.
When applied this configuration causes the package
__[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__ to generate
__[snit](\.\./snit/snit\.md)__\-based parser packages\.

It is a supporting package in the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_support\.png)

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::tclparam::configuration::snit__ __def__ *name* *pkg* *version* *cmdprefix*

    The command applies the configuration provided by this package to the
    *cmdprefix*, causing the creation of
    __[snit](\.\./snit/snit\.md)__\-based parsers whose class is *name*,
    in package *pkg* with *version*\.

    The use of a command prefix as API allows application of the configuration
    to not only __[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__
    \(__pt::peg::to::tclparam configure__\), but also export manager instances
    and PEG containers \(__$export configuration set__ and __\[$container
    exporter\] configuration set__ respectively\)\.

    Or anything other command prefix accepting two arguments, option and value\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_tclparam_config_tcloo.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

[//000000001]: # (pt::tclparam::configuration::tcloo \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_tclparam\_config\_tcloo\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::tclparam::configuration::tcloo\(n\) 1\.0\.4 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::tclparam::configuration::tcloo \- Tcl/PARAM, Canned configuration, Tcloo

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::tclparam::configuration::tcloo ?1\.0\.4?  

[__::pt::tclparam::configuration::tcloo__ __def__ *name* *pkg* *version* *cmdprefix*](#1)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package is an adjunct to
__[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__, to make the use of
this highly configurable package easier by providing a canned configuration\.
When applied this configuration causes the package
__[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__ to generate
__[OO](\.\./\.\./\.\./\.\./index\.md\#oo)__\-based parser packages\.

It is a supporting package in the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_support\.png)

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::tclparam::configuration::tcloo__ __def__ *name* *pkg* *version* *cmdprefix*

    The command applies the configuration provided by this package to the
    *cmdprefix*, causing the creation of
    __[OO](\.\./\.\./\.\./\.\./index\.md\#oo)__\-based parsers whose class is
    *name*, in package *pkg* with *version*\.

    The use of a command prefix as API allows application of the configuration
    to not only __[pt::peg::to::tclparam](pt\_peg\_to\_tclparam\.md)__
    \(__pt::peg::to::tclparam configure__\), but also export manager instances
    and PEG containers \(__$export configuration set__ and __\[$container
    exporter\] configuration set__ respectively\)\.

    Or anything other command prefix accepting two arguments, option and value\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_to_api.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531

[//000000001]: # (pt\_export\_api \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_to\_api\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt\_export\_api\(i\) 1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt\_export\_api \- Parser Tools Export API

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Converter API](#section2)

  - [Plugin API](#section3)

  - [Options](#section4)

  - [Usage](#section5)

  - [PEG serialization format](#section6)

      - [Example](#subsection1)

  - [PE serialization format](#section7)

      - [Example](#subsection2)

  - [Bugs, Ideas, Feedback](#section8)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  

[__CONVERTER__ __reset__](#1)  
[__CONVERTER__ __configure__](#2)  
[__CONVERTER__ __configure__ *option*](#3)  
[__CONVERTER__ __configure__ *option* *value*\.\.\.](#4)  
[__CONVERTER__ __convert__ *serial*](#5)  
[__::export__ *serial* *configuration*](#6)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This document describes two APIs\. First the API shared by all packages for the
conversion of Parsing Expression Grammars into some other format, and then the
API shared by the packages which implement the export plugins sitting on top of
the conversion packages\.

Its intended audience are people who wish to create their own converter for some
type of output, and/or an export plugin for their or some other converter\.

It resides in the Export section of the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_export\.png)

# <a name='section2'></a>Converter API

Any \(grammar\) export converter has to follow the rules set out below:

  1. A converter is a package\. Its name is arbitrary, however it is recommended
     to put it under the __::pt::peg::to__ namespace\.

  1. The package provides either a single Tcl command following the API outlined
     below, or a class command whose instances follow the same API\. The commands
     which follow the API are called *converter commands*\.

  1. A converter command has to provide the following three methods with the
     given signatures and semantics\. Converter commands are allowed to provide
     more methods of their own, but not less, and they may not provide different
     semantics for the standardized methods\.

       - <a name='1'></a>__CONVERTER__ __reset__

         This method has to reset the configuration of the converter to its
         default settings\. The result of the method has to be the empty string\.

       - <a name='2'></a>__CONVERTER__ __configure__

         This method, in this form, has to return a dictionary containing the
         current configuration of the converter\.

       - <a name='3'></a>__CONVERTER__ __configure__ *option*

         This method, in this form, has to return the current value of the
         specified configuration *option* of the converter\.

         Please read the section [Options](#section4) for the set of
         standard options any converter has to accept\. Any other options
         accepted by a specific converter will be described in its manpage\.

       - <a name='4'></a>__CONVERTER__ __configure__ *option* *value*\.\.\.

         This command, in this form, sets the specified *option*s of the
         converter to the given *value*s\.

         Please read the section [Options](#section4) for the set of
         standard options a converter has to accept\. Any other options accepted
         by a specific converter will be described in its manpage\.

       - <a name='5'></a>__CONVERTER__ __convert__ *serial*

         This method has to accept the canonical serialization of a parsing
         expression grammar, as specified in section [PEG serialization
         format](#section6), and contained in *serial*\. The result of the
         method has to be the result of converting the input grammar into
         whatever the converter is for, per its configuration\.

# <a name='section3'></a>Plugin API

Any \(grammar\) export plugin has to follow the rules set out below:

  1. A plugin is a package\.

  1. The name of a plugin package has the form pt::peg::export::__FOO__,
     where __FOO__ is the name of the format the plugin will generate output
     for\.

  1. The plugin can expect that the package __pt::peg::export::plugin__ is
     present, as indicator that it was invoked from a genuine plugin manager\.

     It is recommended that a plugin does check for the presence of this
     package\.

  1. A plugin has to provide a single command, in the global namespace, with the
     signature shown below\. Plugins are allowed to provide more command of their
     own, but not less, and they may not provide different semantics for the
     standardized command\.

       - <a name='6'></a>__::export__ *serial* *configuration*

         This command has to accept the canonical serialization of a parsing
         expression grammar and the configuration for the converter invoked by
         the plugin\. The result of the command has to be the result of the
         converter invoked by the plugin for th input grammar and configuration\.

           * string *serial*

             This argument will contain the *canonical* serialization of the
             parsing expression grammar for which to generate the output\. The
             specification of what a *canonical* serialization is can be found
             in the section [PEG serialization format](#section6)\.

           * dictionary *configuration*

             This argument will contain the configuration to configure the
             converter with before invoking it, as a dictionary mapping from
             options to values\.

             Please read the section [Options](#section4) for the set of
             standard options any converter has to accept, and thus any plugin
             as well\. Any other options accepted by a specific plugin will be
             described in its manpage\.

  1. A single usage cycle of a plugin consists of an invokation of the command
     __[export](\.\./\.\./\.\./\.\./index\.md\#export)__\. This call has to leave
     the plugin in a state where another usage cycle can be run without
     problems\.

# <a name='section4'></a>Options

Each export converter and plugin for an export converter has to accept the
options below in their __configure__ method\. Converters are allowed to
ignore the contents of these options when performing a conversion, but they must
not reject them\. Plugins are expected to pass the options given to them to the
converter they are invoking\.

  - __\-file__ string

    The value of this option is the name of the file or other entity from which
    the grammar came, for which the command is run\. The default value is
    __unknown__\.

  - __\-name__ string

    The value of this option is the name of the grammar we are processing\. The
    default value is __a\_pe\_grammar__\.

  - __\-user__ string

    The value of this option is the name of the user for which the command is
    run\. The default value is __unknown__\.

# <a name='section5'></a>Usage

To use a converter do

    # Get the converter (single command here, not class)
    package require the-converter-package

    # Provide a configuration
    theconverter configure ...

    # Perform the conversion
    set result [theconverter convert $thegrammarserial]

    ... process the result ...

To use a plugin __FOO__ do

    # Get an export plugin manager
    package require pt::peg::export
    pt::peg::export E

    # Provide a configuration
    E configuration set ...

    # Run the plugin, and the converter inside.
    set result [E export serial $grammarserial FOO]

    ... process the result ...

# <a name='section6'></a>PEG serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expression Grammars as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a PEG
may have more than one regular serialization only exactly one of them will be
*canonical*\.

  - regular serialization

      1. The serialization of any PEG is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __pt::grammar::peg__, and its
         value\. This value holds the contents of the grammar\.

      1. The contents of the grammar are a Tcl dictionary holding the set of
         nonterminal symbols and the starting expression\. The relevant keys and
         their values are

           * __rules__

             The value is a Tcl dictionary whose keys are the names of the
             nonterminal symbols known to the grammar\.

               1) Each nonterminal symbol may occur only once\.

               1) The empty string is not a legal nonterminal symbol\.

               1) The value for each symbol is a Tcl dictionary itself\. The
                  relevant keys and their values in this dictionary are

                    + __is__

                      The value is the serialization of the parsing expression
                      describing the symbols sentennial structure, as specified
                      in the section [PE serialization format](#section7)\.

                    + __mode__

                      The value can be one of three values specifying how a
                      parser should handle the semantic value produced by the
                      symbol\.

                        - __value__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal itself, which has the ASTs of the
                          symbol's right hand side as its children\.

                        - __leaf__

                          The semantic value of the nonterminal symbol is an
                          abstract syntax tree consisting of a single node node
                          for the nonterminal, without any children\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded\.

                        - __void__

                          The nonterminal has no semantic value\. Any ASTs
                          generated by the symbol's right hand side are
                          discarded \(as well\)\.

           * __start__

             The value is the serialization of the start parsing expression of
             the grammar, as specified in the section [PE serialization
             format](#section7)\.

      1. The terminal symbols of the grammar are specified implicitly as the set
         of all terminal symbols used in the start expression and on the RHS of
         the grammar rules\.

  - canonical serialization

    The canonical serialization of a grammar has the format as specified in the
    previous item, and then additionally satisfies the constraints below, which
    make it unique among all the possible serializations of this grammar\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

      1. The string representation of the value is the canonical representation
         of a Tcl dictionary\. I\.e\. it does not contain superfluous whitespace\.

## <a name='subsection1'></a>Example

Assuming the following PEG for simple mathematical expressions

    PEG calculator (Expression)
        Digit      <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
        Sign       <- '-' / '+'                                     ;
        Number     <- Sign? Digit+                                  ;
        Expression <- Term (AddOp Term)*                            ;
        MulOp      <- '*' / '/'                                     ;
        Term       <- Factor (MulOp Factor)*                        ;
        AddOp      <- '+'/'-'                                       ;
        Factor     <- '(' Expression ')' / Number                   ;
    END;

then its canonical serialization \(except for whitespace\) is

    pt::grammar::peg {
        rules {
            AddOp      {is {/ {t -} {t +}}                                                                mode value}
            Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
            Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
            Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
            MulOp      {is {/ {t *} {t /}}                                                                mode value}
            Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
            Sign       {is {/ {t -} {t +}}                                                                mode value}
            Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
        }
        start {n Expression}
    }

# <a name='section7'></a>PE serialization format

Here we specify the format used by the Parser Tools to serialize Parsing
Expressions as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
parsing expression may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - Regular serialization

      * __Atomic Parsing Expressions__

          1. The string __epsilon__ is an atomic parsing expression\. It
             matches the empty string\.

          1. The string __dot__ is an atomic parsing expression\. It matches
             any character\.

          1. The string __alnum__ is an atomic parsing expression\. It
             matches any Unicode alphabet or digit character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __alpha__ is an atomic parsing expression\. It
             matches any Unicode alphabet character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ascii__ is an atomic parsing expression\. It
             matches any Unicode character below U0080\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __control__ is an atomic parsing expression\. It
             matches any Unicode control character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __digit__ is an atomic parsing expression\. It
             matches any Unicode digit character\. Note that this includes
             characters outside of the \[0\.\.9\] range\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __graph__ is an atomic parsing expression\. It
             matches any Unicode printing character, except for space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __lower__ is an atomic parsing expression\. It
             matches any Unicode lower\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __print__ is an atomic parsing expression\. It
             matches any Unicode printing character, including space\. This is a
             custom extension of PEs based on Tcl's builtin command __string
             is__\.

          1. The string __punct__ is an atomic parsing expression\. It
             matches any Unicode punctuation character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __space__ is an atomic parsing expression\. It
             matches any Unicode space character\. This is a custom extension of
             PEs based on Tcl's builtin command __string is__\.

          1. The string __upper__ is an atomic parsing expression\. It
             matches any Unicode upper\-case alphabet character\. This is a custom
             extension of PEs based on Tcl's builtin command __string is__\.

          1. The string __wordchar__ is an atomic parsing expression\. It
             matches any Unicode word character\. This is any alphanumeric
             character \(see alnum\), and any connector punctuation characters
             \(e\.g\. underscore\)\. This is a custom extension of PEs based on Tcl's
             builtin command __string is__\.

          1. The string __xdigit__ is an atomic parsing expression\. It
             matches any hexadecimal digit character\. This is a custom extension
             of PEs based on Tcl's builtin command __string is__\.

          1. The string __ddigit__ is an atomic parsing expression\. It
             matches any decimal digit character\. This is a custom extension of
             PEs based on Tcl's builtin command __regexp__\.

          1. The expression \[list t __x__\] is an atomic parsing expression\.
             It matches the terminal string __x__\.

          1. The expression \[list n __A__\] is an atomic parsing expression\.
             It matches the nonterminal __A__\.

      * __Combined Parsing Expressions__

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list / __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *ordered choice*, aka *prioritized choice*\.

          1. For parsing expressions __e1__, __e2__, \.\.\. the result of
             \[list x __e1__ __e2__ \.\.\. \] is a parsing expression as
             well\. This is the *sequence*\.

          1. For a parsing expression __e__ the result of \[list \* __e__\]
             is a parsing expression as well\. This is the *kleene closure*,
             describing zero or more repetitions\.

          1. For a parsing expression __e__ the result of \[list \+ __e__\]
             is a parsing expression as well\. This is the *positive kleene
             closure*, describing one or more repetitions\.

          1. For a parsing expression __e__ the result of \[list & __e__\]
             is a parsing expression as well\. This is the *and lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list \! __e__\]
             is a parsing expression as well\. This is the *not lookahead
             predicate*\.

          1. For a parsing expression __e__ the result of \[list ? __e__\]
             is a parsing expression as well\. This is the *optional input*\.

  - Canonical serialization

    The canonical serialization of a parsing expression has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this parsing expression\.

      1. The string representation of the value is the canonical representation
         of a pure Tcl list\. I\.e\. it does not contain superfluous whitespace\.

      1. Terminals are *not* encoded as ranges \(where start and end of the
         range are identical\)\.

## <a name='subsection2'></a>Example

Assuming the parsing expression shown on the right\-hand side of the rule

    Expression <- Term (AddOp Term)*

then its canonical serialization \(except for whitespace\) is

    {x {n Term} {* {x {n AddOp} {n Term}}}}

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/pt/pt_util.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

[//000000001]: # (pt::util \- Parser Tools)
[//000000002]: # (Generated from file 'pt\_util\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (pt::util\(n\) 1\.1 tcllib "Parser Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

pt::util \- General utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require pt::ast ?1\.1?  

[__::pt::util__ __error2readable__ *error* *text*](#1)  
[__::pt::util__ __error2position__ *error* *text*](#2)  
[__::pt::util__ __error2text__ *error*](#3)  

# <a name='description'></a>DESCRIPTION

Are you lost ? Do you have trouble understanding this document ? In that case
please read the overview provided by the *[Introduction to Parser
Tools](pt\_introduction\.md)*\. This document is the entrypoint to the whole
system the current package is a part of\.

This package provides general utility commands\.

This is a supporting package in the Core Layer of Parser Tools\.

![](\.\./\.\./\.\./\.\./image/arch\_core\_support\.png)

# <a name='section2'></a>API

  - <a name='1'></a>__::pt::util__ __error2readable__ *error* *text*

    This command takes the structured form of a syntax *error* as thrown by
    parser runtimes and the input *text* to the parser which caused that error
    and returns a string describing the error in a human\-readable form\.

    The input *text* is required to convert the character position of the
    error into a more readable line/column format, and to provide excerpts of
    the input around the error position\.

  - <a name='2'></a>__::pt::util__ __error2position__ *error* *text*

    This command takes the structured form of a syntax *error* as thrown by
    parser runtimes and the input *text* to the parser which caused that error
    and returns a 2\-element list containing the line number and column index for
    the error's character position in the input, in this order\.

  - <a name='3'></a>__::pt::util__ __error2text__ *error*

    This command takes the structured form of a syntax *error* as thrown by
    parser runtimes and returns a list of strings, each describing a possible
    expected input in a human\-readable form\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *pt* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[EBNF](\.\./\.\./\.\./\.\./index\.md\#ebnf), [LL\(k\)](\.\./\.\./\.\./\.\./index\.md\#ll\_k\_),
[PEG](\.\./\.\./\.\./\.\./index\.md\#peg), [TDPL](\.\./\.\./\.\./\.\./index\.md\#tdpl),
[context\-free languages](\.\./\.\./\.\./\.\./index\.md\#context\_free\_languages),
[expression](\.\./\.\./\.\./\.\./index\.md\#expression),
[grammar](\.\./\.\./\.\./\.\./index\.md\#grammar),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching),
[parser](\.\./\.\./\.\./\.\./index\.md\#parser), [parsing
expression](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression), [parsing expression
grammar](\.\./\.\./\.\./\.\./index\.md\#parsing\_expression\_grammar), [push down
automaton](\.\./\.\./\.\./\.\./index\.md\#push\_down\_automaton), [recursive
descent](\.\./\.\./\.\./\.\./index\.md\#recursive\_descent),
[state](\.\./\.\./\.\./\.\./index\.md\#state), [top\-down parsing
languages](\.\./\.\./\.\./\.\./index\.md\#top\_down\_parsing\_languages),
[transducer](\.\./\.\./\.\./\.\./index\.md\#transducer)

# <a name='category'></a>CATEGORY

Parsing and Grammars

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































Deleted embedded/md/tcllib/files/modules/rc4/rc4.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161

[//000000001]: # (rc4 \- RC4 Stream Cipher)
[//000000002]: # (Generated from file 'rc4\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (rc4\(n\) 1\.1\.0 tcllib "RC4 Stream Cipher")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

rc4 \- Implementation of the RC4 stream cipher

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PROGRAMMING INTERFACE](#section3)

  - [EXAMPLES](#section4)

  - [AUTHORS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require rc4 ?1\.1\.0?  

[__::rc4::rc4__ ?*\-hex*? *\-key keyvalue* ?*\-command lst*? ?*\-out channel*? \[ *\-in channel* &#124; *\-infile filename* &#124; *string* \]](#1)  
[__::rc4::RC4Init__ *keydata*](#2)  
[__::rc4::RC4__ *Key* *data*](#3)  
[__::rc4::RC4Final__ *Key*](#4)  

# <a name='description'></a>DESCRIPTION

This package is an implementation in Tcl of the RC4 stream cipher developed by
Ron Rivest of RSA Data Security Inc\. The cipher was a trade secret of RSA but
was reverse\-engineered and published to the internet in 1994\. It is used in a
number of network protocols for securing communications\. To evade trademark
restrictions this cipher is sometimes known as ARCFOUR\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::rc4::rc4__ ?*\-hex*? *\-key keyvalue* ?*\-command lst*? ?*\-out channel*? \[ *\-in channel* &#124; *\-infile filename* &#124; *string* \]

    Perform the RC4 algorithm on either the data provided by the argument or on
    the data read from the *\-in* channel\. If an *\-out* channel is given then
    the result will be written to this channel\. Giving the *\-hex* option will
    return a hexadecimal encoded version of the result if not using an *\-out*
    channel\.

    The data to be processes can be specified either as a string argument to the
    rc4 command, or as a filename or a pre\-opened channel\. If the *\-infile*
    argument is given then the file is opened, the data read and processed and
    the file is closed\. If the *\-in* argument is given then data is read from
    the channel until the end of file\. The channel is not closed\. If the
    *\-out* argument is given then the processing result is written to this
    channel\.

    If *\-command* is provided then the rc4 command does not return anything\.
    Instead the command provided is called with the rc4 result data appended as
    the final parameter\. This is most useful when reading from Tcl channels as a
    fileevent is setup on the channel and the data processed in chunks

    Only one of *\-infile*, *\-in* or *string* should be given\.

# <a name='section3'></a>PROGRAMMING INTERFACE

  - <a name='2'></a>__::rc4::RC4Init__ *keydata*

    Initialize a new RC4 key\. The *keydata* is any amount of binary data and
    is used to initialize the cipher internal state\.

  - <a name='3'></a>__::rc4::RC4__ *Key* *data*

    Encrypt or decrypt the input data using the key obtained by calling
    __RC4Init__\.

  - <a name='4'></a>__::rc4::RC4Final__ *Key*

    This should be called to clean up resources associated with *Key*\. Once
    this function has been called the key is destroyed\.

# <a name='section4'></a>EXAMPLES

    % set keydata [binary format H* 0123456789abcdef]
    % rc4::rc4 -hex -key $keydata HelloWorld
    3cf1ae8b7f1c670b612f
    % rc4::rc4 -hex -key $keydata [binary format H* 3cf1ae8b7f1c670b612f]
    HelloWorld

    set Key [rc4::RC4Init "key data"]
    append ciphertext [rc4::RC4 $Key $plaintext]
    append ciphertext [rc4::RC4 $Key $additional_plaintext]
    rc4::RC4Final $Key

    proc ::Finish {myState data} {
        DoStuffWith $myState $data
    }
    rc4::rc4 -in $socket -command [list ::Finish $ApplicationState]

# <a name='section5'></a>AUTHORS

Pat Thoyts

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *rc4* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[aes\(n\)](\.\./aes/aes\.md), [blowfish\(n\)](\.\./blowfish/blowfish\.md),
[des\(n\)](\.\./des/des\.md)

# <a name='keywords'></a>KEYWORDS

[arcfour](\.\./\.\./\.\./\.\./index\.md\#arcfour), [data
integrity](\.\./\.\./\.\./\.\./index\.md\#data\_integrity),
[encryption](\.\./\.\./\.\./\.\./index\.md\#encryption),
[rc4](\.\./\.\./\.\./\.\./index\.md\#rc4),
[security](\.\./\.\./\.\./\.\./index\.md\#security), [stream
cipher](\.\./\.\./\.\./\.\./index\.md\#stream\_cipher)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/rcs/rcs.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322

[//000000001]: # (rcs \- RCS low level utilities)
[//000000002]: # (Generated from file 'rcs\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2005, Colin McCormack <coldstore@users\.sourceforge\.net>)
[//000000005]: # (rcs\(n\) 2\.0\.2 tcllib "RCS low level utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

rcs \- RCS low level utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [TEXT DICT DATA STRUCTURE](#section3)

  - [RCS PATCH FORMAT](#section4)

  - [RCS PATCH COMMAND LIST](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require rcs ?0\.1?  

[__::rcs::text2dict__ *text*](#1)  
[__::rcs::dict2text__ *dict*](#2)  
[__::rcs::file2dict__ *filename*](#3)  
[__::rcs::dict2file__ *filename* *dict*](#4)  
[__::rcs::decodeRcsPatch__ *text*](#5)  
[__::rcs::encodeRcsPatch__ *pcmds*](#6)  
[__::rcs::applyRcsPatch__ *text* *pcmds*](#7)  

# <a name='description'></a>DESCRIPTION

The *Revision Control System*, short *[RCS](\.\./\.\./\.\./\.\./index\.md\#rcs)*,
is a set of applications and related data formats which allow a system to
persist the history of changes to a text\. It, and its relative SCCS are the
basis for many other such systems, like *[CVS](\.\./\.\./\.\./\.\./index\.md\#cvs)*,
etc\.

This package *does not* implement RCS\.

It only provides a number of low level commands which should be useful in the
implementation of any revision management system, namely:

  1. The conversion of texts into and out of a data structures which allow the
     easy modification of such text by *patches*, i\.e\. sequences of
     instructions for the transformation of one text into an other\.

  1. And the conversion of one particular format for patches, the so\-called
     *RCS patches*, into and out of data structures which allow their easy
     application to texts\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::rcs::text2dict__ *text*

    Converts the argument *text* into a dictionary containing and representing
    the same text in an indexed form and returns that dictionary as its result\.
    More information about the format of the result can be found in section
    [TEXT DICT DATA STRUCTURE](#section3)\. This command returns the
    *canonical* representation of the input\.

  - <a name='2'></a>__::rcs::dict2text__ *dict*

    This command provides the complementary operation to
    __::rcs::text2dict__\. It converts a dictionary in the form described in
    section [TEXT DICT DATA STRUCTURE](#section3) back into a text and
    returns that text as its result\. The command does accept non\-canonical
    representations of the text as its input\.

  - <a name='3'></a>__::rcs::file2dict__ *filename*

    This command is identical to __::rcs::text2dict__, except that it reads
    the text to convert from the file with path *filename*\. The file has to
    exist and must be readable as well\.

  - <a name='4'></a>__::rcs::dict2file__ *filename* *dict*

    This command is identical to __::rcs::2dict2text__, except that it
    stores the resulting text in the file with path *filename*\. The file is
    created if it did not exist, and must be writable\. The result of the command
    is the empty string\.

  - <a name='5'></a>__::rcs::decodeRcsPatch__ *text*

    Converts the *text* argument into a patch command list \(PCL\) as specified
    in the section [RCS PATCH COMMAND LIST](#section5) and returns this
    list as its result\. It is assumed that the input text is in *[diff \-n
    format](\.\./\.\./\.\./\.\./index\.md\#diff\_n\_format)*, also known as *[RCS
    patch](\.\./\.\./\.\./\.\./index\.md\#rcs\_patch)* format, as specified in the
    section [RCS PATCH FORMAT](#section4)\. Please note that the command
    ignores no\-ops in the input, in other words the resulting PCL contains only
    instructions doing something\.

  - <a name='6'></a>__::rcs::encodeRcsPatch__ *pcmds*

    This command provides the complementary operation to
    __::rcs::decodeRcsPatch__\. It convert a patch comand list \(PCL\) list as
    specified in the section [RCS PATCH COMMAND LIST](#section5) back into
    a text in [RCS PATCH FORMAT](#section4) and returns that text as its
    result\.

    Note that this command and __::rcs::decodeRcsPatch__ are not exactly
    complementary, as the latter strips no\-ops from its input, which the encoder
    cannot put back anymore into the generated RCS patch\. In other words, the
    result of a decode/encode step may not match the original input at the
    character level, but it will match it at the functional level\.

  - <a name='7'></a>__::rcs::applyRcsPatch__ *text* *pcmds*

    This operation applies a patch in the form of a PCL to a text given in the
    form of a dictionary and returns the modified text, again as dictionary, as
    its result\.

    To handle actual text use the commands __::rcs::text2dict__ \(or
    equivalent\) and __::rcs::decodeRcsPatch__ to transform the inputs into
    data structures acceptable to this command\. Analogously use the command
    __::rcs::dict2text__ \(or equivalent\) to transform the result of this
    command into actuall text as required\.

# <a name='section3'></a>TEXT DICT DATA STRUCTURE

A text dictionary is a dictionary whose keys are integer numbers and text
strings as the associated values\. The keys represent the line numbers of a text
and the values the text of that line\. Note that one text can have many
representations as a dictionary, as the index values only have to be properly
ordered for reconstruction, their exact values do not matter\. Similarly the
strings may actually span multiple physical lines\.

The text

    Hello World,
    how are you ?
    Fine, and you ?

for example can be represented by

    {{1 {Hello World,}} {2 {how are you ?}} {3 {Fine, and you ?}}}

or

    {{5 {Hello World,}} {8 {how are you ?}} {9 {Fine, and you ?}}}

or

    {{-1 {Hello World,
    how are you ?}} {4 {Fine, and you ?}}}

The first dictionary is the *canonical* representation of the text, with line
numbers starting at __1__, increasing in steps of __1__ and without
gaps, and each value representing exactly one physical line\.

All the commands creating dictionaries from text will return the canonical
representation of their input text\. The commands taking a dictionary and
returning text will generally accept all representations, canonical or not\.

The result of applying a patch to a text dictionary will in general cause the
dictionary to become non\-canonical\.

# <a name='section4'></a>RCS PATCH FORMAT

A *[patch](\.\./\.\./\.\./\.\./index\.md\#patch)* is in general a series of
instructions how to transform an input text T into a different text T', and also
encoded in text form as well\.

The text format for patches understood by this package is a very simple one,
known under the names *[RCS patch](\.\./\.\./\.\./\.\./index\.md\#rcs\_patch)* or
*[diff \-n format](\.\./\.\./\.\./\.\./index\.md\#diff\_n\_format)*\.

Patches in this format contain only two different commands, for the deletion of
old text, and addition of new text\. The replacement of some text by a different
text is handled as combination of a deletion following by an addition\.

The format is line oriented, with each line containing either a command or text
data associated with the preceding command\. The first line of a *[RCS
patch](\.\./\.\./\.\./\.\./index\.md\#rcs\_patch)* is always a command line\.

The commands are:

  - ""

    The empty line is a command which does nothing\.

  - "a__start__ __n__"

    A line starting with the character __a__ is a command for the addition
    of text to the output\. It is followed by __n__ lines of text data\. When
    applying the patch the data is added just between the lines __start__
    and __start__\+1\. The same effect is had by appending the data to the
    existing text on line __start__\. A non\-existing line __start__ is
    created\.

  - "d__start__ __n__"

    A line starting with the character __d__ is a command for the deletion
    of text from the output\. When applied it deletes __n__ lines of text,
    and the first line deleted is at index __start__\.

Note that the line indices __start__ always refer to the text which is
transformed as it is in its original state, without taking the precending
changes into account\.

Note also that the instruction have to be applied in the order they occur in the
patch, or in a manner which produces the same result as in\-order application\.

This is the format of results returned by the command
__::rcs::decodeRcsPatch__ and accepted by the commands
__::rcs::encodeRcsPatch__ and __::rcs::appplyRcsPatch__ resp\. Note
however that the decoder will strip no\-op commands, and the encoder will not
generate no\-ops, making them not fully complementary at the textual level, only
at the functional level\.

And example of a RCS patch is

    d1 2
    d4 1
    a4 2
    The named is the mother of all things.

    a11 3
    They both may be called deep and profound.
    Deeper and more profound,
    The door of all subtleties!

# <a name='section5'></a>RCS PATCH COMMAND LIST

Patch command lists \(sort: PCL's\) are the data structures generated by patch
decoder command and accepted by the patch encoder and applicator commands\. They
represent RCS patches in the form of Tcl data structures\.

A PCL is a list where each element represents a single patch instruction, either
an addition, or a deletion\. The elements are lists themselves, where the first
item specifies the command and the remainder represent the arguments of the
command\.

  - a

    This is the instruction for the addition of text\. It has two arguments, the
    index of the line where to add the text, and the text to add, in this order\.

  - d

    This is the instruction for the deletion of text\. It has two arguments, the
    index of the line where to start deleting text, and the number of lines to
    delete, in this order\.

This is the format returned by the patch decoder command and accepted as input
by the patch encoder and applicator commands\.

An example for a patch command is shown below, it represents the example RCS
patch found in section [RCS PATCH FORMAT](#section4)\.

    {{d 1 2} {d 4 1} {a 4 {The named is the mother of all things.

    }} {a 11 {They both may be called deep and profound.
    Deeper and more profound,
    The door of all subtleties!}}}

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *rcs* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[struct](\.\./\.\./\.\./\.\./index\.md\#struct),
[textutil](\.\./textutil/textutil\.md)

# <a name='keywords'></a>KEYWORDS

[CVS](\.\./\.\./\.\./\.\./index\.md\#cvs), [RCS](\.\./\.\./\.\./\.\./index\.md\#rcs), [RCS
patch](\.\./\.\./\.\./\.\./index\.md\#rcs\_patch),
[SCCS](\.\./\.\./\.\./\.\./index\.md\#sccs), [diff \-n
format](\.\./\.\./\.\./\.\./index\.md\#diff\_n\_format),
[patching](\.\./\.\./\.\./\.\./index\.md\#patching), [text
conversion](\.\./\.\./\.\./\.\./index\.md\#text\_conversion), [text
differences](\.\./\.\./\.\./\.\./index\.md\#text\_differences)

# <a name='category'></a>CATEGORY

Text processing

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>  
Copyright &copy; 2005, Colin McCormack <coldstore@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/report/report.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458

[//000000001]: # (report \- Matrix reports)
[//000000002]: # (Generated from file 'report\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002\-2014 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (report\(n\) 0\.3\.2 tcllib "Matrix reports")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

report \- Create and manipulate report objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [REGIONS](#section2)

  - [LINES](#section3)

  - [TEMPLATES](#section4)

  - [STYLES](#section5)

  - [REPORT METHODS](#section6)

  - [EXAMPLES](#section7)

  - [Bugs, Ideas, Feedback](#section8)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require report ?0\.3\.2?  

[__::report::report__ *reportName* *columns* ?__style__ *style arg\.\.\.*?](#1)  
[__reportName__ *option* ?*arg arg \.\.\.*?](#2)  
[__::report::defstyle__ *styleName arguments script*](#3)  
[__::report::rmstyle__ *styleName*](#4)  
[__::report::stylearguments__ *styleName*](#5)  
[__::report::stylebody__ *styleName*](#6)  
[__::report::styles__](#7)  
[*reportName* __destroy__](#8)  
[*reportName* *templatecode* __disable__&#124;__enable__](#9)  
[*reportName* *templatecode* __enabled__](#10)  
[*reportName* *templatecode* __get__](#11)  
[*reportName* *templatecode* __set__ *templatedata*](#12)  
[*reportName* __tcaption__ ?*size*?](#13)  
[*reportName* __bcaption__ *size*](#14)  
[*reportName* __size__ *column* ?*number*&#124;__dyn__?](#15)  
[*reportName* __sizes__ ?*size\-list*?](#16)  
[*reportName* __pad__ *column* ?__left__&#124;__right__&#124;__both__ ?*padstring*??](#17)  
[*reportName* __justify__ *column* ?__left__&#124;__right__&#124;__center__?](#18)  
[*reportName* __printmatrix__ *matrix*](#19)  
[*reportName* __printmatrix2channel__ *matrix chan*](#20)  
[*reportName* __[columns](\.\./\.\./\.\./\.\./index\.md\#columns)__](#21)  

# <a name='description'></a>DESCRIPTION

This package provides report objects which can be used by the formatting methods
of matrix objects to generate tabular reports of the matrix in various forms\.
The report objects defined here break each report down into three
[REGIONS](#section2) and ten classes of
*[lines](\.\./\.\./\.\./\.\./index\.md\#lines)* \(various separator\- and data\-lines\)\.
See the following section for more detailed explanations\.

  - <a name='1'></a>__::report::report__ *reportName* *columns* ?__style__ *style arg\.\.\.*?

    Creates a new report object for a report having *columns* columns with an
    associated global Tcl command whose name is *reportName*\. This command may
    be used to invoke various configuration operations on the report\. It has the
    following general form:

      * <a name='2'></a>__reportName__ *option* ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.
        See section [REPORT METHODS](#section6) for more explanations\. If
        no __style__ is specified the report will use the builtin style
        __plain__ as its default configuration\.

  - <a name='3'></a>__::report::defstyle__ *styleName arguments script*

    Defines the new style *styleName*\. See section [STYLES](#section5)
    for more information\.

  - <a name='4'></a>__::report::rmstyle__ *styleName*

    Deletes the style *styleName*\. Trying to delete an unknown or builtin
    style will result in an error\. Beware, this command will not check that
    there are no other styles depending on the deleted one\. Deleting a style
    which is still used by another style FOO will result in a runtime error when
    FOO is applied to a newly instantiated report\.

  - <a name='5'></a>__::report::stylearguments__ *styleName*

    This introspection command returns the list of arguments associated with the
    style *styleName*\.

  - <a name='6'></a>__::report::stylebody__ *styleName*

    This introspection command returns the script associated with the style
    *styleName*\.

  - <a name='7'></a>__::report::styles__

    This introspection command returns a list containing the names of all styles
    known to the package at the time of the call\. The order of the names in the
    list reflects the order in which the styles were created\. In other words,
    the first item is the predefined style __plain__, followed by the first
    style defined by the user, and so on\.

# <a name='section2'></a>REGIONS

The three regions are the *top caption*, *data area* and *bottom caption*\.
These are, roughly speaking, the title, the values to report and a title at the
bottom\. The size of the caption regions can be specified by the user as the
number of rows they occupy in the matrix to format\. The size of the data area is
specified implicitly\.

# <a name='section3'></a>LINES

[TEMPLATES](#section4) are associated with each of the ten line classes,
defining the formatting for this kind of line\. The user is able to enable and
disable the separator lines at will, but not the data lines\. Their usage is
solely determined by the number of rows contained in the three regions\. Data
lines and all enabled separators must have a template associated with them\.

Note that the data\-lines in a report and the rows in the matrix the report was
generated from are *not* in a 1:1 relationship if any row in the matrix has a
height greater than one\.

The different kinds of lines and the codes used by the report methods to address
them are:

  - __top__

    The topmost line of a report\. Separates the report from anything which came
    before it\. The user can enable the usage of this line at will\.

  - __topdatasep__

    This line is used to separate the data rows in the top caption region, if it
    contains more than one row and the user enabled its usage\.

  - __topcapsep__

    This line is used to separate the top caption and data regions, if the top
    caption is not empty and the user enabled its usage\.

  - __datasep__

    This line is used to separate the data rows in the data region, if it
    contains more than one row and the user enabled its usage\.

  - __botcapsep__

    This line is used to separate the data and bottom caption regions, if the
    bottom caption is not empty and the user enabled its usage\.

  - __botdatasep__

    This line is used to separate the data rows in the bottom caption region, if
    it contains more than one row and the user enabled its usage\.

  - __bottom__

    The bottommost line of a report\. Separates the report from anything which
    comes after it\. The user can enable the usage of this line at will\.

  - __topdata__

    This line defines the format of data lines in the top caption region of the
    report\.

  - __data__

    This line defines the format of data lines in the data region of the report\.

  - __botdata__

    This line defines the format of data lines in the bottom caption region of
    the report\.

# <a name='section4'></a>TEMPLATES

Each template is a list of strings used to format the line it is associated
with\. For a report containing __n__ columns a template for a data line has
to contain "__n__\+1" items and a template for a separator line
"2\*__n__\+1" items\.

The items in a data template specify the strings used to separate the column
information\. Together with the corresponding items in the separator templates
they form the vertical lines in the report\.

*Note* that the corresponding items in all defined templates have to be of
equal length\. This will be checked by the report object\. The first item defines
the leftmost vertical line and the last item defines the rightmost vertical
line\. The item at index __k__ \("1",\.\.\.,"__n__\-2"\) separates the
information in the columns "__k__\-1" and "__k__"\.

The items in a separator template having an even\-numbered index \("0","2",\.\.\.\)
specify the column separators\. The item at index "2\*__k__"
\("0","2",\.\.\.,"2\*__n__"\) corresponds to the items at index "__k__" in the
data templates\.

The items in a separator template having an odd\-numbered index \("1","3",\.\.\.\)
specify the strings used to form the horizontal lines in the separator lines\.
The item at index "2\*__k__\+1" \("1","3",\.\.\.,"2\*__n__\+1"\) corresponds to
column "__k__"\. When generating the horizontal lines the items are
replicated to be at least as long as the size of their column and then cut to
the exact size\.

# <a name='section5'></a>STYLES

Styles are a way for the user of this package to define common configurations
for report objects and then use them later during the actual instantiation of
report objects\. They are defined as tcl scripts which when executed configure
the report object into the requested configuration\.

The command to define styles is __::report::defstyle__\. Its last argument is
the tcl __script__ performing the actual reconfiguration of the report
object to obtain the requested style\.

In this script the names of all previously defined styles are available as
commands, as are all commands found in a safe interpreter and the configuration
methods of report objects\. The latter implicitly operate on the object currently
executing the style script\. The __arguments__ declared here are available in
the __script__ as variables\. When calling the command of a previously
declared style all the arguments expected by it have to be defined in the call\.

# <a name='section6'></a>REPORT METHODS

The following commands are possible for report objects:

  - <a name='8'></a>*reportName* __destroy__

    Destroys the report, including its storage space and associated command\.

  - <a name='9'></a>*reportName* *templatecode* __disable__&#124;__enable__

    Enables or disables the usage of the template addressed by the
    *templatecode*\. Only the codes for separator lines are allowed here\. It is
    not possible to enable or disable data lines\.

    Enabling a template causes the report to check all used templates for
    inconsistencies in the definition of the vertical lines \(See section
    [TEMPLATES](#section4)\)\.

  - <a name='10'></a>*reportName* *templatecode* __enabled__

    Returns the whether the template addressed by the *templatecode* is
    currently enabled or not\.

  - <a name='11'></a>*reportName* *templatecode* __get__

    Returns the template currently associated with the kind of line addressed by
    the *templatecode*\. All known templatecodes are allowed here\.

  - <a name='12'></a>*reportName* *templatecode* __set__ *templatedata*

    Sets the template associated with the kind of line addressed by the
    *templatecode* to the new value in *templatedata*\. See section
    [TEMPLATES](#section4) for constraints on the length of templates\.

  - <a name='13'></a>*reportName* __tcaption__ ?*size*?

    Specifies the *size* of the top caption region as the number rows it
    occupies in the matrix to be formatted\. Only numbers greater than or equal
    to zero are allowed\. If no *size* is specified the command will return the
    current size instead\.

    Setting the size of the top caption to a value greater than zero enables the
    corresponding data template and causes the report to check all used
    templates for inconsistencies in the definition of the vertical lines \(See
    section [TEMPLATES](#section4)\)\.

  - <a name='14'></a>*reportName* __bcaption__ *size*

    Specifies the *size* of the bottom caption region as the number rows it
    occupies in the matrix to be formatted\. Only numbers greater than or equal
    to zero are allowed\. If no *size* is specified the command will return the
    current size instead\.

    Setting the size of the bottom caption to a value greater than zero enables
    the corresponding data template and causes the report to check all used
    templates for inconsistencies in the definition of the vertical lines \(See
    section [TEMPLATES](#section4)\)\.

  - <a name='15'></a>*reportName* __size__ *column* ?*number*&#124;__dyn__?

    Specifies the size of the *column* in the output\. The value __dyn__
    means that the columnwidth returned by the matrix to be formatted for the
    specified column shall be used\. The formatting of the column is dynamic\. If
    a fixed *number* is used instead of __dyn__ it means that the column
    has a width of that many characters \(padding excluded\)\. Only numbers greater
    than zero are allowed here\.

    If no size specification is given the command will return the current size
    of the *column* instead\.

  - <a name='16'></a>*reportName* __sizes__ ?*size\-list*?

    This method allows the user to specify the sizes of all columns in one call\.
    Its argument is a list containing the sizes to associate with the columns\.
    The first item is associated with column 0, the next with column 1, and so
    on\.

    If no *size\-list* is specified the command will return a list containing
    the currently set sizes instead\.

  - <a name='17'></a>*reportName* __pad__ *column* ?__left__&#124;__right__&#124;__both__ ?*padstring*??

    This method allows the user to specify padding on the left, right or both
    sides of a *column*\. If the *padstring* is not specified it defaults to
    a single space character\. *Note*: An alternative way of specifying the
    padding is to use vertical separator strings longer than one character in
    the templates \(See section [TEMPLATES](#section4)\)\.

    If no pad specification is given at all the command will return the current
    state of padding for the column instead\. This will be a list containing two
    elements, the first element the left padding, the second describing the
    right padding\.

  - <a name='18'></a>*reportName* __justify__ *column* ?__left__&#124;__right__&#124;__center__?

    Declares how the cell values for a *column* are filled into the report
    given the specified size of a column in the report\.

    For __left__ and __right__ justification a cell value shorter than
    the width of the column is bound with its named edge to the same edge of the
    column\. The other side is filled with spaces\. In the case of __center__
    the spaces are placed to both sides of the value and the left number of
    spaces is at most one higher than the right number of spaces\.

    For a value longer than the width of the column the value is cut at the
    named edge\. This means for __left__ justification that the *tail*
    \(i\.e\. the __right__ part\) of the value is made visible in the output\.
    For __center__ the value is cut at both sides to fit into the column and
    the number of characters cut at the left side of the value is at most one
    less than the number of characters cut from the right side\.

    If no justification was specified the command will return the current
    justification for the column instead\.

  - <a name='19'></a>*reportName* __printmatrix__ *matrix*

    Formats the *matrix* according to the configuration of the report and
    returns the resulting string\. The matrix has to have the same number of
    columns as the report\. The matrix also has to have enough rows so that the
    top and bottom caption regions do not overlap\. The data region is allowed to
    be empty\.

  - <a name='20'></a>*reportName* __printmatrix2channel__ *matrix chan*

    Formats the *matrix* according to the configuration of the report and
    writes the result into the channel *chan*\. The matrix has to have the same
    number of columns as the report\. The matrix also has to have enough rows so
    that the top and bottom caption regions do not overlap\. The data region is
    allowed to be empty\.

  - <a name='21'></a>*reportName* __[columns](\.\./\.\./\.\./\.\./index\.md\#columns)__

    Returns the number of columns in the report\.

The methods __size__, __pad__ and __justify__ all take a column
index as their first argument\. This index is allowed to use all the forms of an
index as accepted by the __lindex__ command\. The allowed range for indices
is "0,\.\.\.,\[__reportName__ columns\]\-1"\.

# <a name='section7'></a>EXAMPLES

Our examples define some generally useful report styles\.

A simple table with lines surrounding all information and vertical separators,
but without internal horizontal separators\.

        ::report::defstyle simpletable {} {
    	data	set [split "[string repeat "| "   [columns]]|"]
    	top	set [split "[string repeat "+ - " [columns]]+"]
    	bottom	set [top get]
    	top	enable
    	bottom	enable
        }

An extension of a __simpletable__, see above, with a title area\.

        ::report::defstyle captionedtable {{n 1}} {
    	simpletable
    	topdata   set [data get]
    	topcapsep set [top get]
    	topcapsep enable
    	tcaption $n
        }

Given the definitions above now an example which actually formats a matrix into
a tabular report\. It assumes that the matrix actually contains useful data\.

    % ::struct::matrix m
    % # ... fill m with data, assume 5 columns
    % ::report::report r 5 style captionedtable 1
    % r printmatrix m
    +---+-------------------+-------+-------+--------+
    |000|VERSIONS:          |2:8.4a3|1:8.4a3|1:8.4a3%|
    +---+-------------------+-------+-------+--------+
    |001|CATCH return ok    |7      |13     |53.85   |
    |002|CATCH return error |68     |91     |74.73   |
    |003|CATCH no catch used|7      |14     |50.00   |
    |004|IF if true numeric |12     |33     |36.36   |
    |005|IF elseif          |15     |47     |31.91   |
    |   |true numeric       |       |       |        |
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % m format 2string r

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *report* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[matrix](\.\./\.\./\.\./\.\./index\.md\#matrix),
[report](\.\./\.\./\.\./\.\./index\.md\#report),
[table](\.\./\.\./\.\./\.\./index\.md\#table)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002\-2014 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/rest/rest.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579

[//000000001]: # (rest \- A framework for RESTful web services)
[//000000002]: # (Generated from file 'rest\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (rest\(n\) 1\.3\.1 tcllib "A framework for RESTful web services")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

rest \- define REST web APIs and call them inline or asychronously

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Simple usage](#section2)

  - [Interface usage](#section3)

  - [Examples](#section4)

  - [INCLUDED](#section5)

  - [TLS](#section6)

  - [TLS Security Considerations](#section7)

  - [Bugs, Ideas, Feedback](#section8)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require rest ?1\.3\.1?  

[__::rest::simple__ *url* *query* ?*config*? ?*body*?](#1)  
[__::rest::get__ *url* *query* ?*config*? ?*body*?](#2)  
[__::rest::post__ *url* *query* ?*config*? ?*body*?](#3)  
[__::rest::patch__ *url* *query* ?*config*? ?*body*?](#4)  
[__::rest::head__ *url* *query* ?*config*? ?*body*?](#5)  
[__::rest::put__ *url* *query* ?*config*? ?*body*?](#6)  
[__::rest::delete__ *url* *query* ?*config*? ?*body*?](#7)  
[__::rest::save__ *name* *file*](#8)  
[__::rest::describe__ *name*](#9)  
[__::rest::parameters__ *url* ?*key*?](#10)  
[__::rest::parse\_opts__ *static* *required* *optional* *words*](#11)  
[__::rest::substitute__ *string* *var*](#12)  
[__::rest::create\_interface__ *name*](#13)  

# <a name='description'></a>DESCRIPTION

There are two types of usage this package supports: *simple calls*, and
complete *interfaces*\. In an *interface* you specify a set of rules and then
the package builds the commands which correspond to the REST methods\. These
commands can have many options such as input and output transformations and data
type specific formatting\. This results in a cleaner and simpler script\. On the
other hand, while a *simple call* is easier and quicker to implement it is
also less featureful\. It takes the url and a few options about the command and
returns the result directly\. Any formatting or checking is up to rest of the
script\.

# <a name='section2'></a>Simple usage

In simple usage you make calls using the http method procedures and then check
or process the returned data yourself

  - <a name='1'></a>__::rest::simple__ *url* *query* ?*config*? ?*body*?

  - <a name='2'></a>__::rest::get__ *url* *query* ?*config*? ?*body*?

  - <a name='3'></a>__::rest::post__ *url* *query* ?*config*? ?*body*?

  - <a name='4'></a>__::rest::patch__ *url* *query* ?*config*? ?*body*?

  - <a name='5'></a>__::rest::head__ *url* *query* ?*config*? ?*body*?

  - <a name='6'></a>__::rest::put__ *url* *query* ?*config*? ?*body*?

  - <a name='7'></a>__::rest::delete__ *url* *query* ?*config*? ?*body*?

    These commands are all equivalent except for the http method used\. If you
    use __simple__ then the method should be specified as an option in the
    *config* dictionary\. If that is not done it defaults to __get__\. If a
    *body* is needed then the *config* dictionary must be present, however
    it is allowed to be empty\.

    The *config* dictionary supports the following keys

      * __auth__

      * __content\-type__

      * __cookie__

      * __error\-body__

      * __format__

      * __headers__

      * __method__

    Two quick examples:

    Example 1, Yahoo Boss:

        set appid APPID
        set search tcl
        set res [rest::get http://boss.yahooapis.com/ysearch/web/v1/$search [list appid $appid]]
        set res [rest::format_json $res]

    Example 2, Twitter:

        set url   http://twitter.com/statuses/update.json
        set query [list status $text]
        set res [rest::simple $url $query {
            method post
            auth   {basic user password}
            format json
        }]

# <a name='section3'></a>Interface usage

An interface to a REST API consists of a series of definitions of REST calls
contained in an array\. The name of that array becomes a namespace containing the
defined commands\. Each key of the array specifies the name of the call, with the
associated configuration a dictionary, i\.e\. key/value pairs\. The acceptable
keys, i\.e\. legal configuration options are described below\. After creating the
definitions in the array simply calling __rest::create\_interface__ with the
array as argument will then create the desired commands\.

Example, Yahoo Weather:

    package require rest

    set yweather(forecast) {
       url      http://weather.yahooapis.com/forecastrss
       req_args { p: }
       opt_args { u: }
    }
    rest::create_interface yweather
    puts [yweather::forecast -p 94089]

  - <a name='8'></a>__::rest::save__ *name* *file*

    This command saves a copy of the dynamically created procedures for all the
    API calls specified in the array variable *name* to the *file*, for
    later loading\.

    The result of the command is the empty string

  - <a name='9'></a>__::rest::describe__ *name*

    This command prints a description of all API calls specified in the array
    variable *name* to the channel __stdout__\.

    The result of the command is the empty string\.

  - <a name='10'></a>__::rest::parameters__ *url* ?*key*?

    This command parses an *url* query string into a dictionary and returns
    said dictionary as its result\.

    If *key* is specified the command will not return the entire dictionary,
    but only the value of that *key*\.

  - <a name='11'></a>__::rest::parse\_opts__ *static* *required* *optional* *words*

    This command implements a custom parserfor command options\.

      * dict *static*

        A dictionary of options and their values that are always present in the
        output\.

      * list *required*

        A list of options that must be supplied by *words*

      * list *optional*

        A list of options that may appear in the *words*, but are not
        required\. The elements must be in one of three forms:

          + name

            The option may be present or not, no default\.

          + name:

            When present the option requires an argument\.

          + name:value

            When not present use __value__ as default\.

      * list *words*

        The words to parse into options and values\.

    The result of the command is a list containing two elements\. The first
    element is a dictionary containing the parsed options and their values\. The
    second element is a list of the remaining words\.

  - <a name='12'></a>__::rest::substitute__ *string* *var*

    This command takes a *string*, substitutes values for any option
    identifiers found inside and returns the modified string as its results\.

    The values to substitute are found in the variable *var*, which is
    expected to contain a dictionary mapping from the option identifiers to
    replace to their values\. *Note* that option identifiers which have no key
    in *var* are replaced with the empty string\.

    The option identifiers in *string* have to follow the syntax __%\.\.\.%__
    where __\.\.\.__ may contain any combination of lower\-case alphanumeric
    characters, plus underscore, colon and dash\.

  - <a name='13'></a>__::rest::create\_interface__ *name*

    This command creates procedures for all the API calls specified in the array
    variable *name*\.

    The name of that array becomes a namespace containing the defined commands\.
    Each key of the array specifies the name of the call, with the associated
    configuration a dictionary, i\.e\. key/value pairs\. The legal keys and their
    meanings are:

      * __url__

        The value of this *required* option must be the target of the http
        request\.

      * __description__

        The value of this option must be a short string describing the call\.
        Default to the empty string, if not specified\. Used only by
        __::rest::describe__\.

      * __body__

        The value of this option indicates if arguments are required for the
        call's request body or not\. The acceptable values are listed below\.
        Defaults to __optional__ if not specified\.

          + __none__

            The call has no request body, none must be supplied\.

          + __optional__

            A request body can be supplied, but is not required\.

          + __required__

            A request body must be supplied\.

          + __argument__

            This value must be followed by the name of an option, treating the
            entire string as a list\. The request body will be used as the value
            of that option\.

          + __mime\_multipart__

            A request body must be supplied and will be interpreted as each
            argument representing one part of a mime/multipart document\.
            Arguments must be lists containing 2 elements, a list of header keys
            and values, and the mime part body, in this order\.

      * __method__

        The value of this option must be the name of the HTTP method to call on
        the url\. Defaults to GET, if not specified\. The acceptable values are
        __GET__, __POST__, and __PUT__, regardless of letter\-case\.

      * __copy__

        When present the value of this option specifies the name of a previously
        defined call\. The definition of that call is copied to the current call,
        except for the options specified by the current call itself\.

      * __unset__

        When present the value of this option contains a list of options in the
        current call\. These options are removed from the definition\. Use this
        after __copy__ing an existing definition to remove options, instead
        of overriding their value\.

      * __headers__

        Specification of additional header fields\. The value of this option must
        be a dictionary, interpreted to contain the new header fields and their
        values\. The default is to not add any additional headers\.

      * __content\-type__

        The value of this option specifies the content type for the request
        data\.

      * __req\_args__

        The value of this option is a list naming the required arguments of the
        call\. Names ending in a colon will require a value\.

      * __opt\_args__

        The value of this option a list naming the arguments that may be present
        for a call but are not required\.

      * __static\_args__

        The value of this option a list naming the arguments that are always the
        same\. No sense in troubling the user with these\. A leading dash
        \(__\-__\) is allowed but not required to maintain consistency with the
        command line\.

      * __auth__

        The value of this option specifies how to authenticate the calls\. No
        authentication is done if the option is not specified\.

          + __basic__

            The user may configure the *basic authentication* by overriding
            the procedure __basic\_auth__ in the namespace of interface\. This
            procedure takes two arguments, the username and password, in this
            order\.

          + __sign__

            The value must actually be a list with the second element the name
            of a procedure which will be called to perform request signing\.

      * __callback__

        If this option is present then the method will be created as an
        *async* call\. Such calls will return immediately with the value of the
        associated http token instead of the call's result\. The event loop must
        be active to use this option\.

        The value of this option is treated as a command prefix which is invoked
        when the HTTP call is complete\. The prefix will receive at least two
        additional arguments, the name of the calling procedure and the status
        of the result \(one of __OK__ or __ERROR__\), in this order\.

        In case of __OK__ a third argument is added, the data associated
        with the result\.

        If and only if the __ERROR__ is a redirection, the location
        redirected to will be added as argument\. Further, if the configuration
        key __error\-body__ is set to __true__ the data associated with
        the result will be added as argument as well\.

        The http request header will be available in that procedure via
        __upvar token token__\.

      * __cookie__

        The value of this option is a list of cookies to be passed in the http
        header\. This is a shortcut to the __headers__ option\.

      * __input\_transform__

        The value of this option is a command prefix or script to perform a
        transformation on the query before invoking the call\. A script transform
        is wrapped into an automatically generated internal procedure\.

        If not specified no transformation is done\.

        The command \(prefix\) must accept a single argument, the query \(a
        dictionary\) to transform, and must return the modified query \(again as
        dictionary\) as its result\. The request body is accessible in the
        transform command via __upvar body body__\.

      * __format__

      * __result__

        The value of this option specifies the format of the returned data\.
        Defaults to __auto__ if not specified\. The acceptable values are:

          + __auto__

            Auto detect between __xml__ and __json__\.

          + __discard__

          + __json__

          + __raw__

          + __rss__

            This is formatted as a special case of __xml__\.

          + __tdom__

          + __xml__

      * __pre\_transform__

        The value of this option is a command prefix or script to perform a
        transformation on the result of a call \(*before* the application of
        the output transform as per __format__\)\. A script transform is
        wrapped into an automatically generated internal procedure\.

        If not specified no transformation is done\.

        The command \(prefix\) must accept a single argument, the result to
        transform, and must return the modified result as its result\.

        The http request header is accessible in the transform command via
        __upvar token token__

      * __post\_transform__

        The value of this option is a command prefix or script to perform a
        transformation on the result of a call \(*after* the application of the
        output transform as per __format__\)\. A script transform is wrapped
        into an automatically generated internal procedure\.

        If not specified no transformation is done\.

        The command \(prefix\) must accept a single argument, the result to
        transform, and must return the modified result as its result\.

        The http request header is accessible in the transform command via
        __upvar token token__

      * __check\_result__

        The value of this option must be list of two expressions, either of
        which may be empty\.

        The first expression is checks the OK condition, it must return
        __true__ when the result is satisfactory, and __false__
        otherwise\.

        The second expression is the ERROR condition, it must return
        __false__ unless there is an error, then it has to return
        __true__\.

      * __error\_body__

        The value of this option determines whether to return the response when
        encountering an HTTP error, or not\. The default is to not return the
        response body on error\.

        See __callback__ above for more information\.

# <a name='section4'></a>Examples

Yahoo Geo:

    set ygeo(parse) {
        url http://wherein.yahooapis.com/v1/document
        method post
        body { arg documentContent }
    }
    ygeo::parse "san jose ca"
    # "san jose ca" will be interpreted as if it were specified as the -documentContent option

Google Docs:

    set gdocs(upload) {
        url http://docs.google.com/feeds/default/private/full
        body mime_multipart
    }
    gdocs::upload [list {Content-Type application/atom+xml} $xml] [list {Content-Type image/jpeg} $filedata]

Delicious:

    set delicious(updated) {
        url https://api.del.icio.us/v1/posts/update
        auth basic
    }

    rest::create_interface flickr

    flickr::basic_auth username password

Flickr:

    set flickr(auth.getToken) {
       url http://api.flickr.com/services/rest/
       req_args { api_key: secret: }
       auth { sign do_signature }
    }

    rest::create_interface flickr

    proc ::flickr::do_signature {query} {
        # perform some operations on the query here
        return $query
    }

# <a name='section5'></a>INCLUDED

The package provides functional but incomplete implementations for the following
services:

  - __del\.icio\.us__

  - __facebook__

  - __flickr__

  - __twitter__

  - __google calendar__

  - __yahoo boss__

  - __yahoo weather__

Please either read the package's implementation, or use __rest::describe__
after loading it for their details\.

Do not forget developers' documentation on the respective sites either\.

# <a name='section6'></a>TLS

The __rest__ package can be used with
*[https](\.\./\.\./\.\./\.\./index\.md\#https)*\-secured services, by requiring the
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package and then registering it with
the __[http](\.\./\.\./\.\./\.\./index\.md\#http)__ package it is sitting on top
of\. Example

    package require tls
    http::register https 443 ::tls::socket

# <a name='section7'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *rest* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/ripemd/ripemd128.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

[//000000001]: # (ripemd128 \- RIPEMD Message\-Digest Algorithm)
[//000000002]: # (Generated from file 'ripemd128\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (ripemd128\(n\) 1\.0\.5 tcllib "RIPEMD Message\-Digest Algorithm")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ripemd128 \- RIPEMD\-128 Message\-Digest Algorithm

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PROGRAMMING INTERFACE](#section3)

  - [EXAMPLES](#section4)

  - [REFERENCES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require ripemd128 ?1\.0\.5?  

[__::ripemd::ripemd128__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]](#1)  
[__::ripemd::hmac128__ ?*\-hex*? *\-key key* \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]](#2)  
[__::ripemd::RIPEMD128Init__](#3)  
[__::ripemd::RIPEMD128Update__ *token* *data*](#4)  
[__::ripemd::RIPEMD128Final__ *token*](#5)  
[__::ripemd::RIPEHMAC128Init__ *key*](#6)  
[__::ripemd::RIPEHMAC128Update__ *token* *data*](#7)  
[__::ripemd::RIPEHMAC128Final__ *token*](#8)  

# <a name='description'></a>DESCRIPTION

This package is an implementation in Tcl of the RIPEMD\-128 message\-digest
algorithm \(1\)\. This algorithm takes an arbitrary quantity of data and generates
a 128\-bit message digest from the input\. The RIPEMD\-128 algorithm is based upon
the MD4 algorithm \(2, 4\) but has been cryptographically strengthened against
weaknesses that have been found in MD4 \(4\)\. RIPEMD\-128 has been designed to be a
drop\-in replacement for MD4 and MD5 \(5\)\. If security is the major consideration,
then RIPEMD\-160 or SHA1 should be considered\.

This package will use __Trf__ to accelerate the digest computation if
available\. In the absence of an accelerator package the pure\-Tcl implementation
will be used\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::ripemd::ripemd128__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

    Calculate the RIPEMD\-128 digest of the data given in string\. This is
    returned as a binary string by default\. Giving the *\-hex* option will
    return a hexadecimal encoded version of the digest\.

    The data to be hashed can be specified either as a string argument to the
    ripemd128 command, or as a filename or a pre\-opened channel\. If the
    *\-filename* argument is given then the file is opened, the data read and
    hashed and the file is closed\. If the *\-channel* argument is given then
    data is read from the channel until the end of file\. The channel is not
    closed\.

    Only one of *\-file*, *\-channel* or *string* should be given\.

  - <a name='2'></a>__::ripemd::hmac128__ ?*\-hex*? *\-key key* \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

    Calculate an Hashed Message Authentication digest \(HMAC\) using the
    RIPEMD\-128 digest algorithm\. HMACs are described in RFC 2104 \(6\) and provide
    a RIPEMD\-128 digest that includes a key\. All options other than *\-key* are
    as for the __::ripemd::ripemd128__ command\.

# <a name='section3'></a>PROGRAMMING INTERFACE

For the programmer, hash functions can be viewed as a bucket into which one
pours data\. When you have finished, you extract a value that is uniquely derived
from the data that was poured into the bucket\. The programming interface to the
hash operates on a token \(equivalent to the bucket\)\. You call
__RIPEMD128Init__ to obtain a token and then call __RIPEMD128Update__ as
many times as required to add data to the hash\. To release any resources and
obtain the hash value, you then call __RIPEMD128Final__\. An equivalent set
of functions gives you a keyed digest \(HMAC\)\.

If you have __critcl__ and have built the __tcllibc__ package then the
implementation of the hashing function will be performed by compiled code\.
Alternatively if both the Trf and Memchan extensions are available then these
will be used\. Finally the package will revert to a pure\-Tcl implementation\. The
programming interface remains the same, however\.

  - <a name='3'></a>__::ripemd::RIPEMD128Init__

    Begins a new RIPEMD\-128 hash\. Returns a token ID that must be used for the
    remaining functions\.

  - <a name='4'></a>__::ripemd::RIPEMD128Update__ *token* *data*

    Add data to the hash identified by token\. Calling *RIPEMD128Update $token
    "abcd"* is equivalent to calling *RIPEMD128Update $token "ab"* followed
    by *RIPEMD128Update $token "cb"*\. See [EXAMPLES](#section4)\.

  - <a name='5'></a>__::ripemd::RIPEMD128Final__ *token*

    Returns the hash value and releases any resources held by this token\. Once
    this command completes the token will be invalid\. The result is a binary
    string of 16 bytes representing the 128 bit RIPEMD\-128 digest value\.

  - <a name='6'></a>__::ripemd::RIPEHMAC128Init__ *key*

    This is equivalent to the __::ripemd::RIPEMD128Init__ command except
    that it requires the key that will be included in the HMAC\.

  - <a name='7'></a>__::ripemd::RIPEHMAC128Update__ *token* *data*

  - <a name='8'></a>__::ripemd::RIPEHMAC128Final__ *token*

    These commands are identical to the RIPEMD128 equivalent commands\.

# <a name='section4'></a>EXAMPLES

    % ripemd::ripemd128 -hex "Tcl does RIPEMD-128"
    3cab177bae65205d81e7978f63556c63

    % ripemd::hmac128 -hex -key Sekret "Tcl does RIPEMD-128"
    b359dc5971a05beea0be7b106b30e389

    % set tok [ripemd::RIPEMD128Init]
    ::ripemd::1
    % ripemd::RIPEMD128Update $tok "Tcl "
    % ripemd::RIPEMD128Update $tok "does "
    % ripemd::RIPEMD128Update $tok "RIPEMD-128"
    % ripemd::Hex [ripemd::RIPEMD128Final $tok]
    3cab177bae65205d81e7978f63556c63

# <a name='section5'></a>REFERENCES

  1. H\. Dobbertin, A\. Bosselaers, B\. Preneel, "RIPEMD\-160, a strengthened
     version of RIPEMD"
     [http://www\.esat\.kuleuven\.ac\.be/~cosicart/pdf/AB\-9601/AB\-9601\.pdf](http://www\.esat\.kuleuven\.ac\.be/~cosicart/pdf/AB\-9601/AB\-9601\.pdf)

  1. Rivest, R\., "The MD4 Message Digest Algorithm", RFC 1320, MIT, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1320\.txt](http://www\.rfc\-editor\.org/rfc/rfc1320\.txt)\)

  1. Rivest, R\., "The MD4 message digest algorithm", in A\.J\. Menezes and S\.A\.
     Vanstone, editors, Advances in Cryptology \- CRYPTO '90 Proceedings, pages
     303\-311, Springer\-Verlag, 1991\.

  1. Dobbertin, H\., "Cryptanalysis of MD4", Journal of Cryptology vol 11 \(4\),
     pp\. 253\-271 \(1998\)

  1. Rivest, R\., "The MD5 Message\-Digest Algorithm", RFC 1321, MIT and RSA Data
     Security, Inc, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1321\.txt](http://www\.rfc\-editor\.org/rfc/rfc1321\.txt)\)

  1. Krawczyk, H\., Bellare, M\. and Canetti, R\. "HMAC: Keyed\-Hashing for Message
     Authentication", RFC 2104, February 1997\.
     \([http://www\.rfc\-editor\.org/rfc/rfc2104\.txt](http://www\.rfc\-editor\.org/rfc/rfc2104\.txt)\)

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *ripemd* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[md4](\.\./md4/md4\.md), [md5](\.\./md5/md5\.md),
[ripemd160](ripemd160\.md), [sha1](\.\./sha1/sha1\.md)

# <a name='keywords'></a>KEYWORDS

[RIPEMD](\.\./\.\./\.\./\.\./index\.md\#ripemd),
[hashing](\.\./\.\./\.\./\.\./index\.md\#hashing),
[md4](\.\./\.\./\.\./\.\./index\.md\#md4),
[message\-digest](\.\./\.\./\.\./\.\./index\.md\#message\_digest), [rfc
1320](\.\./\.\./\.\./\.\./index\.md\#rfc\_1320), [rfc
1321](\.\./\.\./\.\./\.\./index\.md\#rfc\_1321), [rfc
2104](\.\./\.\./\.\./\.\./index\.md\#rfc\_2104),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/ripemd/ripemd160.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206

[//000000001]: # (ripemd160 \- RIPEMD Message\-Digest Algorithm)
[//000000002]: # (Generated from file 'ripemd160\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (ripemd160\(n\) 1\.0\.5 tcllib "RIPEMD Message\-Digest Algorithm")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

ripemd160 \- RIPEMD\-160 Message\-Digest Algorithm

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PROGRAMMING INTERFACE](#section3)

  - [EXAMPLES](#section4)

  - [REFERENCES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require ripemd160 ?1\.0\.5?  

[__::ripemd::ripemd160__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]](#1)  
[__::ripemd::hmac160__ ?*\-hex*? *\-key key* \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]](#2)  
[__::ripemd::RIPEMD160Init__](#3)  
[__::ripemd::RIPEMD160Update__ *token* *data*](#4)  
[__::ripemd::RIPEMD160Final__ *token*](#5)  
[__::ripemd::RIPEHMAC160Init__ *key*](#6)  
[__::ripemd::RIPEHMAC160Update__ *token* *data*](#7)  
[__::ripemd::RIPEHMAC160Final__ *token*](#8)  

# <a name='description'></a>DESCRIPTION

This package is an implementation in Tcl of the RIPEMD\-160 message\-digest
algorithm \(1\)\. This algorithm takes an arbitrary quantity of data and generates
a 160\-bit message digest from the input\. The RIPEMD\-160 algorithm is based upon
the MD4 algorithm \(2, 4\) but has been cryptographically strengthened against
weaknesses that have been found in MD4 \(4\)\.

This package will use __cryptkit__ or __Trf__ to accelerate the digest
computation if either package is available\. In the absence of an accelerator
package the pure\-Tcl implementation will be used\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::ripemd::ripemd160__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

    Calculate the RIPEMD\-160 digest of the data given in string\. This is
    returned as a binary string by default\. Giving the *\-hex* option will
    return a hexadecimal encoded version of the digest\.

    The data to be hashed can be specified either as a string argument to the
    ripemd160 command, or as a filename or a pre\-opened channel\. If the
    *\-filename* argument is given then the file is opened, the data read and
    hashed and the file is closed\. If the *\-channel* argument is given then
    data is read from the channel until the end of file\. The channel is not
    closed\.

    Only one of *\-file*, *\-channel* or *string* should be given\.

  - <a name='2'></a>__::ripemd::hmac160__ ?*\-hex*? *\-key key* \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

    Calculate an Hashed Message Authentication digest \(HMAC\) using the
    RIPEMD\-160 digest algorithm\. HMACs are described in RFC 2104 \(5\) and provide
    a RIPEMD\-160 digest that includes a key\. All options other than *\-key* are
    as for the __::ripemd::ripemd160__ command\.

# <a name='section3'></a>PROGRAMMING INTERFACE

For the programmer, hash functions can be viewed as a bucket into which one
pours data\. When you have finished, you extract a value that is uniquely derived
from the data that was poured into the bucket\. The programming interface to the
hash operates on a token \(equivalent to the bucket\)\. You call
__RIPEMD160Init__ to obtain a token and then call __RIPEMD160Update__ as
many times as required to add data to the hash\. To release any resources and
obtain the hash value, you then call __RIPEMD160Final__\. An equivalent set
of functions gives you a keyed digest \(HMAC\)\.

  - <a name='3'></a>__::ripemd::RIPEMD160Init__

    Begins a new RIPEMD\-160 hash\. Returns a token ID that must be used for the
    remaining functions\.

  - <a name='4'></a>__::ripemd::RIPEMD160Update__ *token* *data*

    Add data to the hash identified by token\. Calling *RIPEMD160Update $token
    "abcd"* is equivalent to calling *RIPEMD160Update $token "ab"* followed
    by *RIPEMD160Update $token "cb"*\. See [EXAMPLES](#section4)\.

  - <a name='5'></a>__::ripemd::RIPEMD160Final__ *token*

    Returns the hash value and releases any resources held by this token\. Once
    this command completes the token will be invalid\. The result is a binary
    string of 16 bytes representing the 160 bit RIPEMD\-160 digest value\.

  - <a name='6'></a>__::ripemd::RIPEHMAC160Init__ *key*

    This is equivalent to the __::ripemd::RIPEMD160Init__ command except
    that it requires the key that will be included in the HMAC\.

  - <a name='7'></a>__::ripemd::RIPEHMAC160Update__ *token* *data*

  - <a name='8'></a>__::ripemd::RIPEHMAC160Final__ *token*

    These commands are identical to the RIPEMD160 equivalent commands\.

# <a name='section4'></a>EXAMPLES

    % ripemd::ripemd160 -hex "Tcl does RIPEMD-160"
    0829dea75a1a7074c702896723fe37763481a0a7

    % ripemd::hmac160 -hex -key Sekret "Tcl does RIPEMD-160"
    bf0c927231733686731dddb470b64a9c23f7f53b

    % set tok [ripemd::RIPEMD160Init]
    ::ripemd::1
    % ripemd::RIPEMD160Update $tok "Tcl "
    % ripemd::RIPEMD160Update $tok "does "
    % ripemd::RIPEMD160Update $tok "RIPEMD-160"
    % ripemd::Hex [ripemd::RIPEMD160Final $tok]
    0829dea75a1a7074c702896723fe37763481a0a7

# <a name='section5'></a>REFERENCES

  1. H\. Dobbertin, A\. Bosselaers, B\. Preneel, "RIPEMD\-160, a strengthened
     version of RIPEMD"
     [http://www\.esat\.kuleuven\.ac\.be/~cosicart/pdf/AB\-9601/AB\-9601\.pdf](http://www\.esat\.kuleuven\.ac\.be/~cosicart/pdf/AB\-9601/AB\-9601\.pdf)

  1. Rivest, R\., "The MD4 Message Digest Algorithm", RFC 1320, MIT, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1320\.txt](http://www\.rfc\-editor\.org/rfc/rfc1320\.txt)\)

  1. Rivest, R\., "The MD4 message digest algorithm", in A\.J\. Menezes and S\.A\.
     Vanstone, editors, Advances in Cryptology \- CRYPTO '90 Proceedings, pages
     303\-311, Springer\-Verlag, 1991\.

  1. Dobbertin, H\., "Cryptanalysis of MD4", Journal of Cryptology vol 11 \(4\),
     pp\. 253\-271 \(1998\)

  1. Krawczyk, H\., Bellare, M\. and Canetti, R\. "HMAC: Keyed\-Hashing for Message
     Authentication", RFC 2104, February 1997\.
     \([http://www\.rfc\-editor\.org/rfc/rfc2104\.txt](http://www\.rfc\-editor\.org/rfc/rfc2104\.txt)\)

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *ripemd* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[md4](\.\./md4/md4\.md), [md5](\.\./md5/md5\.md),
[ripemd128](ripemd128\.md), [sha1](\.\./sha1/sha1\.md)

# <a name='keywords'></a>KEYWORDS

[RIPEMD](\.\./\.\./\.\./\.\./index\.md\#ripemd),
[hashing](\.\./\.\./\.\./\.\./index\.md\#hashing),
[md4](\.\./\.\./\.\./\.\./index\.md\#md4),
[message\-digest](\.\./\.\./\.\./\.\./index\.md\#message\_digest), [rfc
1320](\.\./\.\./\.\./\.\./index\.md\#rfc\_1320), [rfc
1321](\.\./\.\./\.\./\.\./index\.md\#rfc\_1321), [rfc
2104](\.\./\.\./\.\./\.\./index\.md\#rfc\_2104),
[security](\.\./\.\./\.\./\.\./index\.md\#security)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/sasl/gtoken.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

[//000000001]: # (SASL::XGoogleToken \- Simple Authentication and Security Layer \(SASL\))
[//000000002]: # (Generated from file 'gtoken\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (SASL::XGoogleToken\(n\) 1\.0\.1 tcllib "Simple Authentication and Security Layer \(SASL\)")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

SASL::XGoogleToken \- Implementation of SASL NTLM mechanism for Tcl

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [TLS Security Considerations](#section2)

  - [AUTHORS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require SASL::XGoogleToken ?1\.0\.1?  

# <a name='description'></a>DESCRIPTION

This package provides the XGoogleToken authentication mechanism for the Simple
Authentication and Security Layer \(SASL\)\.

Please read the documentation for package __sasl__ for details\.

# <a name='section2'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section3'></a>AUTHORS

Pat Thoyts

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *sasl* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[SASL](\.\./\.\./\.\./\.\./index\.md\#sasl),
[XGoogleToken](\.\./\.\./\.\./\.\./index\.md\#xgoogletoken),
[authentication](\.\./\.\./\.\./\.\./index\.md\#authentication)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































Deleted embedded/md/tcllib/files/modules/sasl/ntlm.md.

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

[//000000001]: # (SASL::NTLM \- Simple Authentication and Security Layer \(SASL\))
[//000000002]: # (Generated from file 'ntlm\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005\-2006, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (SASL::NTLM\(n\) 1\.1\.2 tcllib "Simple Authentication and Security Layer \(SASL\)")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

SASL::NTLM \- Implementation of SASL NTLM mechanism for Tcl

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [REFERENCES](#section2)

  - [AUTHORS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require SASL::NTLM ?1\.1\.2?  

# <a name='description'></a>DESCRIPTION

This package provides the NTLM authentication mechanism for the Simple
Authentication and Security Layer \(SASL\)\.

Please read the documentation for package __sasl__ for details\.

# <a name='section2'></a>REFERENCES

  1. No official specification is available\. However,
     [http://davenport\.sourceforge\.net/ntlm\.html](http://davenport\.sourceforge\.net/ntlm\.html)
     provides a good description\.

# <a name='section3'></a>AUTHORS

Pat Thoyts

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *sasl* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[NTLM](\.\./\.\./\.\./\.\./index\.md\#ntlm), [SASL](\.\./\.\./\.\./\.\./index\.md\#sasl),
[authentication](\.\./\.\./\.\./\.\./index\.md\#authentication)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005\-2006, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































Deleted embedded/md/tcllib/files/modules/sasl/sasl.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371

[//000000001]: # (SASL \- Simple Authentication and Security Layer \(SASL\))
[//000000002]: # (Generated from file 'sasl\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005\-2006, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (SASL\(n\) 1\.3\.3 tcllib "Simple Authentication and Security Layer \(SASL\)")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

SASL \- Implementation of SASL mechanisms for Tcl

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [OPTIONS](#section3)

  - [CALLBACK PROCEDURE](#section4)

  - [MECHANISMS](#section5)

  - [EXAMPLES](#section6)

  - [REFERENCES](#section7)

  - [AUTHORS](#section8)

  - [Bugs, Ideas, Feedback](#section9)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require SASL ?1\.3\.3?  

[__::SASL::new__ *option value ?\.\.\.?*](#1)  
[__::SASL::configure__ *option value* ?*\.\.\.*?](#2)  
[__::SASL::step__ *context* *challenge* ?*\.\.\.*?](#3)  
[__::SASL::response__ *context*](#4)  
[__::SASL::reset__ *context*](#5)  
[__::SASL::cleanup__ *context*](#6)  
[__::SASL::mechanisms__ ?*type*? ?*minimum*?](#7)  
[__::SASL::register__ *mechanism* *preference* *clientproc* ?*serverproc*?](#8)  

# <a name='description'></a>DESCRIPTION

The Simple Authentication and Security Layer \(SASL\) is a framework for providing
authentication and authorization to comunications protocols\. The SASL framework
is structured to permit negotiation among a number of authentication mechanisms\.
SASL may be used in SMTP, IMAP and HTTP authentication\. It is also in use in
XMPP, LDAP and BEEP\. See [MECHANISMS](#section5) for the set of available
SASL mechanisms provided with tcllib\.

The SASL framework operates using a simple multi\-step challenge response
mechanism\. All the mechanisms work the same way although the number of steps may
vary\. In this implementation a callback procedure must be provided from which
the SASL framework will obtain users details\. See [CALLBACK
PROCEDURE](#section4) for details of this procedure\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::SASL::new__ *option value ?\.\.\.?*

    Contruct a new SASL context\. See [OPTIONS](#section3) for details of
    the possible options to this command\. A context token is required for most
    of the SASL procedures\.

  - <a name='2'></a>__::SASL::configure__ *option value* ?*\.\.\.*?

    Modify and inspect the SASL context option\. See [OPTIONS](#section3)
    for further details\.

  - <a name='3'></a>__::SASL::step__ *context* *challenge* ?*\.\.\.*?

    This is the core procedure for using the SASL framework\. The __step__
    procedure should be called until it returns 0\. Each step takes a server
    challenge string and the response is calculated and stored in the context\.
    Each mechanism may require one or more steps\. For some steps there may be no
    server challenge required in which case an empty string should be provided
    for this parameter\. All mechanisms should accept an initial empty challenge\.

  - <a name='4'></a>__::SASL::response__ *context*

    Returns the next response string that should be sent to the server\.

  - <a name='5'></a>__::SASL::reset__ *context*

    Re\-initialize the SASL context\. Discards any internal state and permits the
    token to be reused\.

  - <a name='6'></a>__::SASL::cleanup__ *context*

    Release all resources associated with the SASL context\. The context token
    may not be used again after this procedure has been called\.

  - <a name='7'></a>__::SASL::mechanisms__ ?*type*? ?*minimum*?

    Returns a list of all the available SASL mechanisms\. The list is sorted by
    the mechanism preference value \(see __register__\) with the preferred
    mechanisms and the head of the list\. Any mechanism with a preference value
    less than the*minimum* \(which defaults to 0\) is removed from the returned
    list\. This permits a security threshold to be set\. Mechanisms with a
    preference less that 25 transmit authentication are particularly susceptible
    to eavesdropping and should not be provided unless a secure channel is in
    use \(eg: tls\)\.

    The *type* parameter may be one of *client* or *server* and defaults
    to *client*\. Only mechanisms that have an implementation matching the
    *type* are returned \(this permits servers to correctly declare support
    only for mechanisms that actually provide a server implementation\)\.

  - <a name='8'></a>__::SASL::register__ *mechanism* *preference* *clientproc* ?*serverproc*?

    New mechanisms can be added to the package by registering the mechanism name
    and the implementing procedures\. The server procedure is optional\. The
    preference value is an integer that is used to order the list returned by
    the __mechanisms__ command\. Higher values indicate a preferred
    mechanism\. If the mechanism is already registered then the recorded values
    are updated\.

# <a name='section3'></a>OPTIONS

  - __\-callback__

    Specify a command to be evaluated when the SASL mechanism requires
    information about the user\. The command is called with the current SASL
    context and a name specifying the information desired\. See
    [EXAMPLES](#section6)\.

  - __\-mechanism__

    Set the SASL mechanism to be used\. See __mechanisms__ for a list of
    supported authentication mechanisms\.

  - __\-service__

    Set the service type for this context\. Some mechanisms may make use of this
    parameter \(eg DIGEST\-MD5, GSSAPI and Kerberos\)\. If not set it defaults to an
    empty string\. If the __\-type__ is set to 'server' then this option
    should be set to a valid service identity\. Some examples of valid service
    names are smtp, ldap, beep and xmpp\.

  - __\-server__

    This option is used to set the server name used in SASL challenges when
    operating as a SASL server\.

  - __\-type__

    The context type may be one of 'client' or 'server'\. The default is to
    operate as a client application and respond to server challenges\. Mechanisms
    may be written to support server\-side SASL and setting this option will
    cause each __step__ to issue the next challenge\. A new context must be
    created for each incoming client connection when in server mode\.

# <a name='section4'></a>CALLBACK PROCEDURE

When the SASL framework requires any user details it will call the procedure
provided when the context was created with an argument that specfies the item of
information required\.

In all cases a single response string should be returned\.

  - login

    The callback procedure should return the users authorization identity\.
    Return an empty string unless this is to be different to the authentication
    identity\. Read \[1\] for a discussion about the specific meaning of
    authorization and authentication identities within SASL\.

  - username

    The callback procedure should return the users authentication identity\. Read
    \[1\] for a discussion about the specific meaning of authorization and
    authentication identities within SASL\.

  - password

    The callback procedure should return the password that matches the
    authentication identity as used within the current realm\.

    For server mechanisms the password callback should always be called with the
    authentication identity and the realm as the first two parameters\.

  - realm

    Some SASL mechanisms use realms to partition authentication identities\. The
    realm string is protocol dependent and is often the current DNS domain or in
    the case of the NTLM mechanism it is the Windows NT domain name\.

  - hostname

    Returns the client host name \- typically \[info host\]\.

# <a name='section5'></a>MECHANISMS

  - ANONYMOUS

    As used in FTP this mechanism only passes an email address for
    authentication\. The ANONYMOUS mechanism is specified in \[2\]\.

  - PLAIN

    This is the simplest mechanism\. The users authentication details are
    transmitted in plain text\. This mechanism should not be provided unless an
    encrypted link is in use \- typically after SSL or TLS has been negotiated\.

  - LOGIN

    The LOGIN \[1\] mechanism transmits the users details with base64 encoding\.
    This is no more secure than PLAIN and likewise should not be used without a
    secure link\.

  - CRAM\-MD5

    This mechanism avoids sending the users password over the network in plain
    text by hashing the password with a server provided random value \(known as a
    nonce\)\. A disadvantage of this mechanism is that the server must maintain a
    database of plaintext passwords for comparison\. CRAM\-MD5 was defined in \[4\]\.

  - DIGEST\-MD5

    This mechanism improves upon the CRAM\-MD5 mechanism by avoiding the need for
    the server to store plaintext passwords\. With digest authentication the
    server needs to store the MD5 digest of the users password which helps to
    make the system more secure\. As in CRAM\-MD5 the password is hashed with a
    server nonce and other data before being transmitted across the network\.
    Specified in \[3\]\.

  - OTP

    OTP is the One\-Time Password system described in RFC 2289 \[6\]\. This
    mechanism is secure against replay attacks and also avoids storing password
    or password equivalents on the server\. Only a digest of a seed and a
    passphrase is ever transmitted across the network\. Requires the
    __[otp](\.\./otp/otp\.md)__ package from tcllib and one or more of the
    cryptographic digest packages \(md5 or sha\-1 are the most commonly used\)\.

  - NTLM

    This is a proprietary protocol developed by Microsoft \[5\] and is in common
    use for authenticating users in a Windows network environment\. NTLM uses DES
    encryption and MD4 digests of the users password to authenticate a
    connection\. Certain weaknesses have been found in NTLM and thus there are a
    number of versions of the protocol\. As this mechanism has additional
    dependencies it is made available as a separate sub\-package\. To enable this
    mechanism your application must load the __[SASL::NTLM](ntlm\.md)__
    package\.

  - X\-GOOGLE\-TOKEN

    This is a proprietary protocol developed by Google and used for
    authenticating users for the Google Talk service\. This mechanism makes a
    pair of HTTP requests over an SSL channel and so this mechanism depends upon
    the availability of the tls and http packages\. To enable this mechanism your
    application must load the __[SASL::XGoogleToken](gtoken\.md)__
    package\. In addition you are recommended to make use of the autoproxy
    package to handle HTTP proxies reasonably transparently\.

  - SCRAM

    This is a protocol specified in RFC 5802 \[7\]\. To enable this mechanism your
    application must load the __[SASL::SCRAM](scram\.md)__ package\.

# <a name='section6'></a>EXAMPLES

See the examples subdirectory for more complete samples using SASL with network
protocols\. The following should give an idea how the SASL commands are to be
used\. In reality this should be event driven\. Each time the __step__ command
is called, the last server response should be provided as the command argument
so that the SASL mechanism can take appropriate action\.

    proc ClientCallback {context command args} {
        switch -exact -- $command {
            login    { return "" }
            username { return $::tcl_platform(user) }
            password { return "SecRet" }
            realm    { return "" }
            hostname { return [info host] }
            default  { return -code error unxpected }
        }
    }

    proc Demo {{mech PLAIN}} {
        set ctx [SASL::new -mechanism $mech -callback ClientCallback]
        set challenge ""
        while {1} {
            set more_steps [SASL::step $ctx challenge]
            puts "Send '[SASL::response $ctx]'"
            puts "Read server response into challenge var"
            if {!$more_steps} {break}
        }
        SASL::cleanup $ctx
    }

# <a name='section7'></a>REFERENCES

  1. Myers, J\. "Simple Authentication and Security Layer \(SASL\)", RFC 2222,
     October 1997\.
     \([http://www\.ietf\.org/rfc/rfc2222\.txt](http://www\.ietf\.org/rfc/rfc2222\.txt)\)

  1. Newman, C\. "Anonymous SASL Mechanism", RFC 2245, November 1997\.
     \([http://www\.ietf\.org/rfc/rfc2245\.txt](http://www\.ietf\.org/rfc/rfc2245\.txt)\)

  1. Leach, P\., Newman, C\. "Using Digest Authentication as a SASL Mechanism",
     RFC 2831, May 2000,
     \([http://www\.ietf\.org/rfc/rfc2831\.txt](http://www\.ietf\.org/rfc/rfc2831\.txt)\)

  1. Klensin, J\., Catoe, R\. and Krumviede, P\., "IMAP/POP AUTHorize Extension for
     Simple Challenge/Response" RFC 2195, September 1997\.
     \([http://www\.ietf\.org/rfc/rfc2195\.txt](http://www\.ietf\.org/rfc/rfc2195\.txt)\)

  1. No official specification is available\. However,
     [http://davenport\.sourceforge\.net/ntlm\.html](http://davenport\.sourceforge\.net/ntlm\.html)
     provides a good description\.

  1. Haller, N\. et al\., "A One\-Time Password System", RFC 2289, February 1998,
     \([http://www\.ieft\.org/rfc/rfc2289\.txt](http://www\.ieft\.org/rfc/rfc2289\.txt)\)

  1. Newman, C\. et al\., "Salted Challenge Response Authentication Mechanism
     \(SCRAM\) SASL and GSS\-API Mechanisms", RFC 5802, July 2010,
     \([http://www\.ieft\.org/rfc/rfc5802\.txt](http://www\.ieft\.org/rfc/rfc5802\.txt)\)

# <a name='section8'></a>AUTHORS

Pat Thoyts

# <a name='section9'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *sasl* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[SASL](\.\./\.\./\.\./\.\./index\.md\#sasl),
[authentication](\.\./\.\./\.\./\.\./index\.md\#authentication)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005\-2006, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/sasl/scram.md.

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

[//000000001]: # (SASL::SCRAM \- Simple Authentication and Security Layer \(SASL\))
[//000000002]: # (Generated from file 'scram\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2013 Sergei Golovan <sgolovan@nes\.ru>)
[//000000004]: # (SASL::SCRAM\(n\) 0\.1 tcllib "Simple Authentication and Security Layer \(SASL\)")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

SASL::SCRAM \- Implementation of SASL SCRAM mechanism for Tcl

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [REFERENCES](#section2)

  - [AUTHORS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require SASL::SCRAM ?0\.1?  

# <a name='description'></a>DESCRIPTION

This package provides the SCRAM authentication mechanism for the Simple
Authentication and Security Layer \(SASL\)\.

Please read the documentation for package __sasl__ for details\.

# <a name='section2'></a>REFERENCES

  1. Newman, C\. et al\., "Salted Challenge Response Authentication Mechanism
     \(SCRAM\) SASL and GSS\-API Mechanisms", RFC 5802, July 2010,
     \([http://www\.ieft\.org/rfc/rfc5802\.txt](http://www\.ieft\.org/rfc/rfc5802\.txt)\)

# <a name='section3'></a>AUTHORS

Sergei Golovan

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *sasl* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[SASL](\.\./\.\./\.\./\.\./index\.md\#sasl), [SCRAM](\.\./\.\./\.\./\.\./index\.md\#scram),
[authentication](\.\./\.\./\.\./\.\./index\.md\#authentication)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2013 Sergei Golovan <sgolovan@nes\.ru>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































Deleted embedded/md/tcllib/files/modules/sha1/sha1.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217

[//000000001]: # (sha1 \- SHA\-x Message\-Digest Algorithm)
[//000000002]: # (Generated from file 'sha1\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (sha1\(n\) 2\.0\.4 tcllib "SHA\-x Message\-Digest Algorithm")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

sha1 \- SHA1 Message\-Digest Algorithm

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PROGRAMMING INTERFACE](#section3)

  - [EXAMPLES](#section4)

  - [REFERENCES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require sha1 ?2\.0\.4?  

[__::sha1::sha1__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#1)  
[__::sha1::hmac__ *key* *string*](#2)  
[__::sha1::hmac__ ?__\-hex&#124;\-bin__? __\-key key__ \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#3)  
[__::sha1::SHA1Init__](#4)  
[__::sha1::SHA1Update__ *token* *data*](#5)  
[__::sha1::SHA1Final__ *token*](#6)  
[__::sha1::HMACInit__ *key*](#7)  
[__::sha1::HMACUpdate__ *token* *data*](#8)  
[__::sha1::HMACFinal__ *token*](#9)  

# <a name='description'></a>DESCRIPTION

This package provides an implementation in Tcl of the SHA1 message\-digest
algorithm as specified by FIPS PUB 180\-1 \(1\)\. This algorithm takes a message and
generates a 160\-bit digest from the input\. The SHA1 algorithm is related to the
MD4 algorithm \(2\) but has been strengthend against certain types of
cryptographic attack\. SHA1 should be used in preference to MD4 or MD5 in new
applications\.

This package also includes support for creating keyed message\-digests using the
HMAC algorithm from RFC 2104 \(3\) with SHA1 as the message\-digest\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::sha1::sha1__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]

    The command takes a message and returns the SHA1 digest of this message as a
    hexadecimal string\. You may request the result as binary data by giving
    *\-bin*\.

    The data to be hashed can be specified either as a string argument to the
    __sha1__ command, or as a filename or a pre\-opened channel\. If the
    *\-filename* argument is given then the file is opened, the data read and
    hashed and the file is closed\. If the *\-channel* argument is given then
    data is read from the channel until the end of file\. The channel is not
    closed\. *NOTE* use of the channel or filename options results in the
    internal use of __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__\. To avoid
    nested event loops in Tk or tclhttpd applications you should use the
    incremental programming API \(see below\)\.

    Only one of *\-file*, *\-channel* or *string* should be given\.

    If the *string* to hash can be mistaken for an option \(leading dash "\-"\),
    use the option __\-\-__ before it to terminate option processing and force
    interpretation as a string\.

  - <a name='2'></a>__::sha1::hmac__ *key* *string*

  - <a name='3'></a>__::sha1::hmac__ ?__\-hex&#124;\-bin__? __\-key key__ \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]

    Calculate an Hashed Message Authentication digest \(HMAC\) using the SHA1
    digest algorithm\. HMACs are described in RFC 2104 \(3\) and provide an SHA1
    digest that includes a key\. All options other than *\-key* are as for the
    __::sha1::sha1__ command\.

    If the *string* to hash can be mistaken for an option \(leading dash "\-"\),
    use the option __\-\-__ before it to terminate option processing and force
    interpretation as a string\.

# <a name='section3'></a>PROGRAMMING INTERFACE

For the programmer, the SHA1 hash can be viewed as a bucket into which one pours
data\. When you have finished, you extract a value that is derived from the data
that was poured into the bucket\. The programming interface to the SHA1 hash
operates on a token \(equivalent to the bucket\)\. You call __SHA1Init__ to
obtain a token and then call __SHA1Update__ as many times as required to add
data to the hash\. To release any resources and obtain the hash value, you then
call __SHA1Final__\. An equivalent set of functions gives you a keyed digest
\(HMAC\)\.

If you have __critcl__ and have built the __tcllibc__ package then the
implementation of the hashing function will be performed by compiled code\.
Failing that if you have the __Trf__ package then this can be used otherwise
there is a pure\-tcl equivalent\. The programming interface remains the same in
all cases\.

  - <a name='4'></a>__::sha1::SHA1Init__

    Begins a new SHA1 hash\. Returns a token ID that must be used for the
    remaining functions\.

  - <a name='5'></a>__::sha1::SHA1Update__ *token* *data*

    Add data to the hash identified by token\. Calling *SHA1Update $token
    "abcd"* is equivalent to calling *SHA1Update $token "ab"* followed by
    *SHA1Update $token "cb"*\. See [EXAMPLES](#section4)\.

  - <a name='6'></a>__::sha1::SHA1Final__ *token*

    Returns the hash value and releases any resources held by this token\. Once
    this command completes the token will be invalid\. The result is a binary
    string of 20 bytes representing the 160 bit SHA1 digest value\.

  - <a name='7'></a>__::sha1::HMACInit__ *key*

    This is equivalent to the __::sha1::SHA1Init__ command except that it
    requires the key that will be included in the HMAC\.

  - <a name='8'></a>__::sha1::HMACUpdate__ *token* *data*

  - <a name='9'></a>__::sha1::HMACFinal__ *token*

    These commands are identical to the SHA1 equivalent commands\.

# <a name='section4'></a>EXAMPLES

    % sha1::sha1 "Tcl does SHA1"
    285a6a91c45a9066bf39fcf24425796ef0b2a8bf

    % sha1::hmac Sekret "Tcl does SHA1"
    ae6251fa51b95b18cba2be95eb031d07475ff03c

    % set tok [sha1::SHA1Init]
    ::sha1::1
    % sha1::SHA1Update $tok "Tcl "
    % sha1::SHA1Update $tok "does "
    % sha1::SHA1Update $tok "SHA1"
    % sha1::Hex [sha1::SHA1Final $tok]
    285a6a91c45a9066bf39fcf24425796ef0b2a8bf

# <a name='section5'></a>REFERENCES

  1. "Secure Hash Standard", National Institute of Standards and Technology,
     U\.S\. Department Of Commerce, April 1995\.
     \([http://www\.itl\.nist\.gov/fipspubs/fip180\-1\.htm](http://www\.itl\.nist\.gov/fipspubs/fip180\-1\.htm)\)

  1. Rivest, R\., "The MD4 Message Digest Algorithm", RFC 1320, MIT, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1320\.txt](http://www\.rfc\-editor\.org/rfc/rfc1320\.txt)\)

  1. Krawczyk, H\., Bellare, M\. and Canetti, R\. "HMAC: Keyed\-Hashing for Message
     Authentication", RFC 2104, February 1997\.
     \([http://www\.rfc\-editor\.org/rfc/rfc2104\.txt](http://www\.rfc\-editor\.org/rfc/rfc2104\.txt)\)

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *sha1* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[md4](\.\./md4/md4\.md), [md5](\.\./md5/md5\.md),
[ripemd128](\.\./ripemd/ripemd128\.md), [ripemd160](\.\./ripemd/ripemd160\.md)

# <a name='keywords'></a>KEYWORDS

[FIPS 180\-1](\.\./\.\./\.\./\.\./index\.md\#fips\_180\_1),
[hashing](\.\./\.\./\.\./\.\./index\.md\#hashing),
[message\-digest](\.\./\.\./\.\./\.\./index\.md\#message\_digest), [rfc
2104](\.\./\.\./\.\./\.\./index\.md\#rfc\_2104),
[security](\.\./\.\./\.\./\.\./index\.md\#security),
[sha1](\.\./\.\./\.\./\.\./index\.md\#sha1)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/sha1/sha256.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229

[//000000001]: # (sha256 \- SHA\-x Message\-Digest Algorithm)
[//000000002]: # (Generated from file 'sha256\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (sha256\(n\) 1\.0\.4 tcllib "SHA\-x Message\-Digest Algorithm")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

sha256 \- SHA256 Message\-Digest Algorithm

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [PROGRAMMING INTERFACE](#section3)

  - [EXAMPLES](#section4)

  - [REFERENCES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require sha256 ?1\.0\.4?  

[__::sha2::sha256__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#1)  
[__::sha2::sha224__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#2)  
[__::sha2::hmac__ *key* *string*](#3)  
[__::sha2::hmac__ ?__\-hex&#124;\-bin__? __\-key key__ \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#4)  
[__::sha2::SHA256Init__](#5)  
[__::sha2::SHA224Init__](#6)  
[__::sha2::SHA256Update__ *token* *data*](#7)  
[__::sha2::SHA256Final__ *token*](#8)  
[__::sha2::SHA224Final__ *token*](#9)  
[__::sha2::HMACInit__ *key*](#10)  
[__::sha2::HMACUpdate__ *token* *data*](#11)  
[__::sha2::HMACFinal__ *token*](#12)  

# <a name='description'></a>DESCRIPTION

This package provides an implementation in Tcl of the SHA256 and SHA224
message\-digest algorithms as specified by FIPS PUB 180\-1 \(1\)\. These algorithms
take a message and generates a 256\-bit \(224\-bit\) digest from the input\. The SHA2
algorithms are related to the SHA1 algorithm\.

This package also includes support for creating keyed message\-digests using the
HMAC algorithm from RFC 2104 \(3\) with SHA256 as the message\-digest\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::sha2::sha256__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]

    The command takes a message and returns the SHA256 digest of this message as
    a hexadecimal string\. You may request the result as binary data by giving
    *\-bin*\.

    The data to be hashed can be specified either as a string argument to the
    __sha256__ command, or as a filename or a pre\-opened channel\. If the
    *\-filename* argument is given then the file is opened, the data read and
    hashed and the file is closed\. If the *\-channel* argument is given then
    data is read from the channel until the end of file\. The channel is not
    closed\. *NOTE* use of the channel or filename options results in the
    internal use of __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__\. To avoid
    nested event loops in Tk or tclhttpd applications you should use the
    incremental programming API \(see below\)\.

    Only one of *\-file*, *\-channel* or *string* should be given\.

    If the *string* to hash can be mistaken for an option \(leading dash "\-"\),
    use the option __\-\-__ before it to terminate option processing and force
    interpretation as a string\.

  - <a name='2'></a>__::sha2::sha224__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]

    Like __::sha2::sha256__, except that the SHA224 digest is returned\.

  - <a name='3'></a>__::sha2::hmac__ *key* *string*

  - <a name='4'></a>__::sha2::hmac__ ?__\-hex&#124;\-bin__? __\-key key__ \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]

    Calculate an Hashed Message Authentication digest \(HMAC\) using the SHA256
    digest algorithm\. HMACs are described in RFC 2104 \(3\) and provide an SHA256
    digest that includes a key\. All options other than *\-key* are as for the
    __::sha2::sha256__ command\.

    If the *string* to hash can be mistaken for an option \(leading dash "\-"\),
    use the option __\-\-__ before it to terminate option processing and force
    interpretation as a string\.

# <a name='section3'></a>PROGRAMMING INTERFACE

For the programmer, the SHA256 hash can be viewed as a bucket into which one
pours data\. When you have finished, you extract a value that is derived from the
data that was poured into the bucket\. The programming interface to the SHA256
hash operates on a token \(equivalent to the bucket\)\. You call __SHA256Init__
to obtain a token and then call __SHA256Update__ as many times as required
to add data to the hash\. To release any resources and obtain the hash value, you
then call __SHA256Final__\. An equivalent set of functions gives you a keyed
digest \(HMAC\)\.

If you have __critcl__ and have built the __tcllibc__ package then the
implementation of the hashing function will be performed by compiled code\.
Failing that there is a pure\-tcl equivalent\. The programming interface remains
the same in all cases\.

  - <a name='5'></a>__::sha2::SHA256Init__

  - <a name='6'></a>__::sha2::SHA224Init__

    Begins a new SHA256/SHA224 hash\. Returns a token ID that must be used for
    the remaining functions\.

  - <a name='7'></a>__::sha2::SHA256Update__ *token* *data*

    Add data to the hash identified by token\. Calling *SHA256Update $token
    "abcd"* is equivalent to calling *SHA256Update $token "ab"* followed by
    *SHA256Update $token "cb"*\. See [EXAMPLES](#section4)\. Note that this
    command is used for both SHA256 and SHA224\. Only the initialization and
    finalization commands of both hashes differ\.

  - <a name='8'></a>__::sha2::SHA256Final__ *token*

  - <a name='9'></a>__::sha2::SHA224Final__ *token*

    Returns the hash value and releases any resources held by this token\. Once
    this command completes the token will be invalid\. The result is a binary
    string of 32/28 bytes representing the 256/224 bit SHA256 / SHA224 digest
    value\.

  - <a name='10'></a>__::sha2::HMACInit__ *key*

    This is equivalent to the __::sha2::SHA256Init__ command except that it
    requires the key that will be included in the HMAC\.

  - <a name='11'></a>__::sha2::HMACUpdate__ *token* *data*

  - <a name='12'></a>__::sha2::HMACFinal__ *token*

    These commands are identical to the SHA256 equivalent commands\.

# <a name='section4'></a>EXAMPLES

    % sha2::sha256 "Tcl does SHA256"
    0b91043ee484abd83c3e4b08d6034d71b937026379f0f59bda6e625e6e214789

    % sha2::hmac Sekret "Tcl does SHA256"
    4f9352c64d655e8a36abe73e6163a9d7a54039877c1c92ec90b07d48d4e854e0

    % set tok [sha2::SHA256Init]
    ::sha2::1
    % sha2::SHA256Update $tok "Tcl "
    % sha2::SHA256Update $tok "does "
    % sha2::SHA256Update $tok "SHA256"
    % sha2::Hex [sha2::SHA256Final $tok]
    0b91043ee484abd83c3e4b08d6034d71b937026379f0f59bda6e625e6e214789

# <a name='section5'></a>REFERENCES

  1. "Secure Hash Standard", National Institute of Standards and Technology,
     U\.S\. Department Of Commerce, April 1995\.
     \([http://www\.itl\.nist\.gov/fipspubs/fip180\-1\.htm](http://www\.itl\.nist\.gov/fipspubs/fip180\-1\.htm)\)

  1. Rivest, R\., "The MD4 Message Digest Algorithm", RFC 1320, MIT, April 1992\.
     \([http://www\.rfc\-editor\.org/rfc/rfc1320\.txt](http://www\.rfc\-editor\.org/rfc/rfc1320\.txt)\)

  1. Krawczyk, H\., Bellare, M\. and Canetti, R\. "HMAC: Keyed\-Hashing for Message
     Authentication", RFC 2104, February 1997\.
     \([http://www\.rfc\-editor\.org/rfc/rfc2104\.txt](http://www\.rfc\-editor\.org/rfc/rfc2104\.txt)\)

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *sha1* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[md4](\.\./md4/md4\.md), [md5](\.\./md5/md5\.md),
[ripemd128](\.\./ripemd/ripemd128\.md),
[ripemd160](\.\./ripemd/ripemd160\.md), [sha1](sha1\.md)

# <a name='keywords'></a>KEYWORDS

[FIPS 180\-1](\.\./\.\./\.\./\.\./index\.md\#fips\_180\_1),
[hashing](\.\./\.\./\.\./\.\./index\.md\#hashing),
[message\-digest](\.\./\.\./\.\./\.\./index\.md\#message\_digest), [rfc
2104](\.\./\.\./\.\./\.\./index\.md\#rfc\_2104),
[security](\.\./\.\./\.\./\.\./index\.md\#security),
[sha256](\.\./\.\./\.\./\.\./index\.md\#sha256)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/simulation/annealing.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243

[//000000001]: # (simulation::annealing \- Tcl Simulation Tools)
[//000000002]: # (Generated from file 'annealing\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (simulation::annealing\(n\) 0\.2 tcllib "Tcl Simulation Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

simulation::annealing \- Simulated annealing

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [TIPS](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.4?  
package require simulation::annealing 0\.2  

[__::simulation::annealing::getOption__ *keyword*](#1)  
[__::simulation::annealing::hasOption__ *keyword*](#2)  
[__::simulation::annealing::setOption__ *keyword* *value*](#3)  
[__::simulation::annealing::findMinimum__ *args*](#4)  
[__::simulation::annealing::findCombinatorialMinimum__ *args*](#5)  

# <a name='description'></a>DESCRIPTION

The technique of *simulated annealing* provides methods to estimate the global
optimum of a function\. It is described in some detail on the Wiki
[http://wiki\.tcl\.tk/\.\.\.](http://wiki\.tcl\.tk/\.\.\.)\. The idea is simple:

  - randomly select points within a given search space

  - evaluate the function to be optimised for each of these points and select
    the point that has the lowest \(or highest\) function value or \- sometimes \-
    accept a point that has a less optimal value\. The chance by which such a
    non\-optimal point is accepted diminishes over time\.

  - Accepting less optimal points means the method does not necessarily get
    stuck in a local optimum and theoretically it is capable of finding the
    global optimum within the search space\.

The method resembles the cooling of material, hence the name\.

The package *simulation::annealing* offers the command *findMinimum*:

    puts [::simulation::annealing::findMinimum  -trials 300  -parameters {x -5.0 5.0 y -5.0 5.0}  -function {$x*$x+$y*$y+sin(10.0*$x)+4.0*cos(20.0*$y)}]

prints the estimated minimum value of the function f\(x,y\) =
*x\*\*2\+y\*\*2\+sin\(10\*x\)\+4\*cos\(20\*y\)* and the values of x and y where the minimum
was attained:

    result -4.9112922923 x -0.181647676593 y 0.155743646974

# <a name='section2'></a>PROCEDURES

The package defines the following auxiliary procedures:

  - <a name='1'></a>__::simulation::annealing::getOption__ *keyword*

    Get the value of an option given as part of the *findMinimum* command\.

      * string *keyword*

        Given keyword \(without leading minus\)

  - <a name='2'></a>__::simulation::annealing::hasOption__ *keyword*

    Returns 1 if the option is available, 0 if not\.

      * string *keyword*

        Given keyword \(without leading minus\)

  - <a name='3'></a>__::simulation::annealing::setOption__ *keyword* *value*

    Set the value of the given option\.

      * string *keyword*

        Given keyword \(without leading minus\)

      * string *value*

        \(New\) value for the option

The main procedures are *findMinimum* and *findCombinatorialMinimum*:

  - <a name='4'></a>__::simulation::annealing::findMinimum__ *args*

    Find the minimum of a function using simulated annealing\. The function and
    the method's parameters is given via a list of keyword\-value pairs\.

      * int *n*

        List of keyword\-value pairs, all of which are available during the
        execution via the *getOption* command\.

  - <a name='5'></a>__::simulation::annealing::findCombinatorialMinimum__ *args*

    Find the minimum of a function of discrete variables using simulated
    annealing\. The function and the method's parameters is given via a list of
    keyword\-value pairs\.

      * int *n*

        List of keyword\-value pairs, all of which are available during the
        execution via the *getOption* command\.

The *findMinimum* command predefines the following options:

  - *\-parameters list*: triples defining parameters and ranges

  - *\-function expr*: expression defining the function

  - *\-code body*: body of code to define the function \(takes precedence over
    *\-function*\)\. The code should set the variable "result"

  - *\-init code*: code to be run at start up *\-final code*: code to be run
    at the end *\-trials n*: number of trials before reducing the temperature
    *\-reduce factor*: reduce the temperature by this factor \(between 0 and 1\)
    *\-initial\-temp t*: initial temperature *\-scale s*: scale of the function
    \(order of magnitude of the values\) *\-estimate\-scale y/n*: estimate the
    scale \(only if *\-scale* is not present\) *\-verbose y/n*: print detailed
    information on progress to the report file \(1\) or not \(0\) *\-reportfile
    file*: opened file to print to \(defaults to stdout\)

Any other options can be used via the getOption procedure in the body\. The
*findCombinatorialMinimum* command predefines the following options:

  - *\-number\-params n*: number of binary parameters \(the solution space
    consists of lists of 1s and 0s\)\. This is a required option\.

  - *\-initial\-values*: list of 1s and 0s constituting the start of the search\.

The other predefined options are identical to those of *findMinimum*\.

# <a name='section3'></a>TIPS

The procedure *findMinimum* works by constructing a temporary procedure that
does the actual work\. It loops until the point representing the estimated
optimum does not change anymore within the given number of trials\. As the
temperature gets lower and lower the chance of accepting a point with a higher
value becomes lower too, so the procedure will in practice terminate\.

It is possible to optimise over a non\-rectangular region, but some care must be
taken:

  - If the point is outside the region of interest, you can specify a very high
    value\.

  - This does mean that the automatic determination of a scale factor is out of
    the question \- the high function values that force the point inside the
    region would distort the estimation\.

Here is an example of finding an optimum inside a circle:

    puts [::simulation::annealing::findMinimum  -trials 3000  -reduce 0.98  -parameters {x -5.0 5.0 y -5.0 5.0}  -code {
            if { hypot($x-5.0,$y-5.0) < 4.0 } {
                set result [expr {$x*$x+$y*$y+sin(10.0*$x)+4.0*cos(20.0*$y)}]
            } else {
                set result 1.0e100
            }
        }]

The method is theoretically capable of determining the global optimum, but often
you need to use a large number of trials and a slow reduction of temperature to
get reliable and repeatable estimates\.

You can use the *\-final* option to use a deterministic optimization method,
once you are sure you are near the required optimum\.

The *findCombinatorialMinimum* procedure is suited for situations where the
parameters have the values 0 or 1 \(and there can be many of them\)\. Here is an
example:

  - We have a function that attains an absolute minimum if the first ten numbers
    are 1 and the rest is 0:

    proc cost {params} {
        set cost 0
        foreach p [lrange $params 0 9] {
            if { $p == 0 } {
                incr cost
            }
        }
        foreach p [lrange $params 10 end] {
            if { $p == 1 } {
                incr cost
            }
        }
        return $cost
    }

  - We want to find the solution that gives this minimum for various lengths of
    the solution vector *params*:

    foreach n {100 1000 10000} {
        break
        puts "Problem size: $n"
        puts [::simulation::annealing::findCombinatorialMinimum  -trials 300  -verbose 0  -number-params $n  -code {set result [cost $params]}]
    }

  - As the vector grows, the computation time increases, but the procedure will
    stop if some kind of equilibrium is reached\. To achieve a useful solution
    you may want to try different values of the trials parameter for instance\.
    Also ensure that the function to be minimized depends on all or most
    parameters \- see the source code for a counter example and run that\.

# <a name='keywords'></a>KEYWORDS

[math](\.\./\.\./\.\./\.\./index\.md\#math),
[optimization](\.\./\.\./\.\./\.\./index\.md\#optimization), [simulated
annealing](\.\./\.\./\.\./\.\./index\.md\#simulated\_annealing)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008 Arjen Markus <arjenmarkus@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/simulation/montecarlo.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239

[//000000001]: # (simulation::montecarlo \- Tcl Simulation Tools)
[//000000002]: # (Generated from file 'montecarlo\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (simulation::montecarlo\(n\) 0\.1 tcllib "Tcl Simulation Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

simulation::montecarlo \- Monte Carlo simulations

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [TIPS](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.4?  
package require simulation::montecarlo 0\.1  
package require simulation::random  
package require math::statistics  

[__::simulation::montecarlo::getOption__ *keyword*](#1)  
[__::simulation::montecarlo::hasOption__ *keyword*](#2)  
[__::simulation::montecarlo::setOption__ *keyword* *value*](#3)  
[__::simulation::montecarlo::setTrialResult__ *values*](#4)  
[__::simulation::montecarlo::setExpResult__ *values*](#5)  
[__::simulation::montecarlo::getTrialResults__](#6)  
[__::simulation::montecarlo::getExpResult__](#7)  
[__::simulation::montecarlo::transposeData__ *values*](#8)  
[__::simulation::montecarlo::integral2D__ *\.\.\.*](#9)  
[__::simulation::montecarlo::singleExperiment__ *args*](#10)  

# <a name='description'></a>DESCRIPTION

The technique of *Monte Carlo simulations* is basically simple:

  - generate random values for one or more parameters\.

  - evaluate the model of some system you are interested in and record the
    interesting results for each realisation of these parameters\.

  - after a suitable number of such trials, deduce an overall characteristic of
    the model\.

You can think of a model of a network of computers, an ecosystem of some kind or
in fact anything that can be quantitatively described and has some stochastic
element in it\.

The package *simulation::montecarlo* offers a basic framework for such a
modelling technique:

    #
    # MC experiments:
    # Determine the mean and median of a set of points and compare them
    #
    ::simulation::montecarlo::singleExperiment -init {
        package require math::statistics

        set prng [::simulation::random::prng_Normal 0.0 1.0]
    } -loop {
        set numbers {}
        for { set i 0 } { $i < [getOption samples] } { incr i } {
            lappend numbers [$prng]
        }
        set mean   [::math::statistics::mean $numbers]
        set median [::math::statistics::median $numbers] ;# ? Exists?
        setTrialResult [list $mean $median]
    } -final {
        set result [getTrialResults]
        set means   {}
        set medians {}
        foreach r $result {
            foreach {m M} $r break
            lappend means   $m
            lappend medians $M
        }
        puts [getOption reportfile] "Correlation: [::math::statistics::corr $means $medians]"

    } -trials 100 -samples 10 -verbose 1 -columns {Mean Median}

This example attemps to find out how well the median value and the mean value of
a random set of numbers correlate\. Sometimes a median value is a more robust
characteristic than a mean value \- especially if you have a statistical
distribution with "fat" tails\.

# <a name='section2'></a>PROCEDURES

The package defines the following auxiliary procedures:

  - <a name='1'></a>__::simulation::montecarlo::getOption__ *keyword*

    Get the value of an option given as part of the *singeExperiment* command\.

      * string *keyword*

        Given keyword \(without leading minus\)

  - <a name='2'></a>__::simulation::montecarlo::hasOption__ *keyword*

    Returns 1 if the option is available, 0 if not\.

      * string *keyword*

        Given keyword \(without leading minus\)

  - <a name='3'></a>__::simulation::montecarlo::setOption__ *keyword* *value*

    Set the value of the given option\.

      * string *keyword*

        Given keyword \(without leading minus\)

      * string *value*

        \(New\) value for the option

  - <a name='4'></a>__::simulation::montecarlo::setTrialResult__ *values*

    Store the results of the trial for later analysis

      * list *values*

        List of values to be stored

  - <a name='5'></a>__::simulation::montecarlo::setExpResult__ *values*

    Set the results of the entire experiment \(typically used in the final
    phase\)\.

      * list *values*

        List of values to be stored

  - <a name='6'></a>__::simulation::montecarlo::getTrialResults__

    Get the results of all individual trials for analysis \(typically used in the
    final phase or after completion of the command\)\.

  - <a name='7'></a>__::simulation::montecarlo::getExpResult__

    Get the results of the entire experiment \(typically used in the final phase
    or even after completion of the *singleExperiment* command\)\.

  - <a name='8'></a>__::simulation::montecarlo::transposeData__ *values*

    Interchange columns and rows of a list of lists and return the result\.

      * list *values*

        List of lists of values

There are two main procedures: *integral2D* and *singleExperiment*\.

  - <a name='9'></a>__::simulation::montecarlo::integral2D__ *\.\.\.*

    Integrate a function over a two\-dimensional region using a Monte Carlo
    approach\.

    Arguments PM

  - <a name='10'></a>__::simulation::montecarlo::singleExperiment__ *args*

    Iterate code over a number of trials and store the results\. The iteration is
    gouverned by parameters given via a list of keyword\-value pairs\.

      * int *n*

        List of keyword\-value pairs, all of which are available during the
        execution via the *getOption* command\.

The *singleExperiment* command predefines the following options:

  - *\-init code*: code to be run at start up

  - *\-loop body*: body of code that defines the computation to be run time and
    again\. The code should use *setTrialResult* to store the results of each
    trial \(typically a list of numbers, but the interpretation is up to the
    implementation\)\. Note: Required keyword\.

  - *\-final code*: code to be run at the end

  - *\-trials n*: number of trials in the experiment \(required\)

  - *\-reportfile file*: opened file to send the output to \(default: stdout\)

  - *\-verbose*: write the intermediate results \(1\) or not \(0\) \(default: 0\)

  - *\-analysis proc*: either "none" \(no automatic analysis\), standard \(basic
    statistics of the trial results and a correlation matrix\) or the name of a
    procedure that will take care of the analysis\.

  - *\-columns list*: list of column names, useful for verbose output and the
    analysis

Any other options can be used via the getOption procedure in the body\.

# <a name='section3'></a>TIPS

The procedure *singleExperiment* works by constructing a temporary procedure
that does the actual work\. It loops for the given number of trials\.

As it constructs a temporary procedure, local variables defined at the start
continue to exist in the loop\.

# <a name='keywords'></a>KEYWORDS

[math](\.\./\.\./\.\./\.\./index\.md\#math), [montecarlo
simulation](\.\./\.\./\.\./\.\./index\.md\#montecarlo\_simulation), [stochastic
modelling](\.\./\.\./\.\./\.\./index\.md\#stochastic\_modelling)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008 Arjen Markus <arjenmarkus@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/simulation/simulation_random.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288

[//000000001]: # (simulation::random \- Tcl Simulation Tools)
[//000000002]: # (Generated from file 'simulation\_random\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>)
[//000000004]: # (simulation::random\(n\) 0\.4 tcllib "Tcl Simulation Tools")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

simulation::random \- Pseudo\-random number generators

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [PROCEDURES](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl ?8\.4?  
package require simulation::random 0\.4  

[__::simulation::random::prng\_Bernoulli__ *p*](#1)  
[__::simulation::random::prng\_Discrete__ *n*](#2)  
[__::simulation::random::prng\_Poisson__ *lambda*](#3)  
[__::simulation::random::prng\_Uniform__ *min* *max*](#4)  
[__::simulation::random::prng\_Triangular__ *min* *max*](#5)  
[__::simulation::random::prng\_SymmTriangular__ *min* *max*](#6)  
[__::simulation::random::prng\_Exponential__ *min* *mean*](#7)  
[__::simulation::random::prng\_Normal__ *mean* *stdev*](#8)  
[__::simulation::random::prng\_Pareto__ *min* *steep*](#9)  
[__::simulation::random::prng\_Gumbel__ *min* *f*](#10)  
[__::simulation::random::prng\_chiSquared__ *df*](#11)  
[__::simulation::random::prng\_Disk__ *rad*](#12)  
[__::simulation::random::prng\_Sphere__ *rad*](#13)  
[__::simulation::random::prng\_Ball__ *rad*](#14)  
[__::simulation::random::prng\_Rectangle__ *length* *width*](#15)  
[__::simulation::random::prng\_Block__ *length* *width* *depth*](#16)  

# <a name='description'></a>DESCRIPTION

This package consists of commands to generate pseudo\-random number generators\.
These new commands deliver

  - numbers that are distributed normally, uniformly, according to a Pareto or
    Gumbel distribution and so on

  - coordinates of points uniformly spread inside a sphere or a rectangle

For example:

    set p [::simulation::random::prng_Normal -1.0 10.0]

produces a new command \(whose name is stored in the variable "p"\) that generates
normally distributed numbers with a mean of \-1\.0 and a standard deviation of
10\.0\.

# <a name='section2'></a>PROCEDURES

The package defines the following public procedures for *discrete*
distributions:

  - <a name='1'></a>__::simulation::random::prng\_Bernoulli__ *p*

    Create a command \(PRNG\) that generates numbers with a Bernoulli
    distribution: the value is either 1 or 0, with a chance p to be 1

      * float *p*

        Chance the outcome is 1

  - <a name='2'></a>__::simulation::random::prng\_Discrete__ *n*

    Create a command \(PRNG\) that generates numbers 0 to n\-1 with equal
    probability\.

      * int *n*

        Number of different values \(ranging from 0 to n\-1\)

  - <a name='3'></a>__::simulation::random::prng\_Poisson__ *lambda*

    Create a command \(PRNG\) that generates numbers according to the Poisson
    distribution\.

      * float *lambda*

        Mean number per time interval

The package defines the following public procedures for *continuous*
distributions:

  - <a name='4'></a>__::simulation::random::prng\_Uniform__ *min* *max*

    Create a command \(PRNG\) that generates uniformly distributed numbers between
    "min" and "max"\.

      * float *min*

        Minimum number that will be generated

      * float *max*

        Maximum number that will be generated

  - <a name='5'></a>__::simulation::random::prng\_Triangular__ *min* *max*

    Create a command \(PRNG\) that generates triangularly distributed numbers
    between "min" and "max"\. If the argument min is lower than the argument max,
    then smaller values have higher probability and vice versa\. In the first
    case the probability density function is of the form *f\(x\) = 2\(1\-x\)* and
    the other case it is of the form *f\(x\) = 2x*\.

      * float *min*

        Minimum number that will be generated

      * float *max*

        Maximum number that will be generated

  - <a name='6'></a>__::simulation::random::prng\_SymmTriangular__ *min* *max*

    Create a command \(PRNG\) that generates numbers distributed according to a
    symmetric triangle around the mean of "min" and "max"\.

      * float *min*

        Minimum number that will be generated

      * float *max*

        Maximum number that will be generated

  - <a name='7'></a>__::simulation::random::prng\_Exponential__ *min* *mean*

    Create a command \(PRNG\) that generates exponentially distributed numbers
    with a given minimum value and a given mean value\.

      * float *min*

        Minimum number that will be generated

      * float *mean*

        Mean value for the numbers

  - <a name='8'></a>__::simulation::random::prng\_Normal__ *mean* *stdev*

    Create a command \(PRNG\) that generates normally distributed numbers with a
    given mean value and a given standard deviation\.

      * float *mean*

        Mean value for the numbers

      * float *stdev*

        Standard deviation

  - <a name='9'></a>__::simulation::random::prng\_Pareto__ *min* *steep*

    Create a command \(PRNG\) that generates numbers distributed according to
    Pareto with a given minimum value and a given distribution steepness\.

      * float *min*

        Minimum number that will be generated

      * float *steep*

        Steepness of the distribution

  - <a name='10'></a>__::simulation::random::prng\_Gumbel__ *min* *f*

    Create a command \(PRNG\) that generates numbers distributed according to
    Gumbel with a given minimum value and a given scale factor\. The probability
    density function is:

    P(v) = exp( -exp(f*(v-min)))

      * float *min*

        Minimum number that will be generated

      * float *f*

        Scale factor for the values

  - <a name='11'></a>__::simulation::random::prng\_chiSquared__ *df*

    Create a command \(PRNG\) that generates numbers distributed according to the
    chi\-squared distribution with df degrees of freedom\. The mean is 0 and the
    standard deviation is 1\.

      * float *df*

        Degrees of freedom

The package defines the following public procedures for random point sets:

  - <a name='12'></a>__::simulation::random::prng\_Disk__ *rad*

    Create a command \(PRNG\) that generates \(x,y\)\-coordinates for points
    uniformly spread over a disk of given radius\.

      * float *rad*

        Radius of the disk

  - <a name='13'></a>__::simulation::random::prng\_Sphere__ *rad*

    Create a command \(PRNG\) that generates \(x,y,z\)\-coordinates for points
    uniformly spread over the surface of a sphere of given radius\.

      * float *rad*

        Radius of the disk

  - <a name='14'></a>__::simulation::random::prng\_Ball__ *rad*

    Create a command \(PRNG\) that generates \(x,y,z\)\-coordinates for points
    uniformly spread within a ball of given radius\.

      * float *rad*

        Radius of the ball

  - <a name='15'></a>__::simulation::random::prng\_Rectangle__ *length* *width*

    Create a command \(PRNG\) that generates \(x,y\)\-coordinates for points
    uniformly spread over a rectangle\.

      * float *length*

        Length of the rectangle \(x\-direction\)

      * float *width*

        Width of the rectangle \(y\-direction\)

  - <a name='16'></a>__::simulation::random::prng\_Block__ *length* *width* *depth*

    Create a command \(PRNG\) that generates \(x,y,z\)\-coordinates for points
    uniformly spread over a block

      * float *length*

        Length of the block \(x\-direction\)

      * float *width*

        Width of the block \(y\-direction\)

      * float *depth*

        Depth of the block \(z\-direction\)

# <a name='keywords'></a>KEYWORDS

[math](\.\./\.\./\.\./\.\./index\.md\#math), [random
numbers](\.\./\.\./\.\./\.\./index\.md\#random\_numbers),
[simulation](\.\./\.\./\.\./\.\./index\.md\#simulation), [statistical
distribution](\.\./\.\./\.\./\.\./index\.md\#statistical\_distribution)

# <a name='category'></a>CATEGORY

Mathematics

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Arjen Markus <arjenmarkus@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/smtpd/smtpd.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324

[//000000001]: # (smtpd \- Tcl SMTP Server Package)
[//000000002]: # (Generated from file 'smtpd\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (smtpd\(n\) 1\.5 tcllib "Tcl SMTP Server Package")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

smtpd \- Tcl SMTP server implementation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [SECURITY](#section2)

  - [TLS Security Considerations](#section3)

  - [COMMANDS](#section4)

  - [CALLBACKS](#section5)

  - [VARIABLES](#section6)

  - [AUTHOR](#section7)

  - [LICENSE](#section8)

  - [Bugs, Ideas, Feedback](#section9)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require smtpd ?1\.5?  

[__::smtpd::start__ ?*myaddr*? ?*port*?](#1)  
[__::smtpd::stop__](#2)  
[__::smptd::configure__ ?*option* *value*? ?*option* *value* *\.\.\.*?](#3)  
[__::smtpd::cget__ ?*option*?](#4)  

# <a name='description'></a>DESCRIPTION

The __smtpd__ package provides a simple Tcl\-only server library for the
Simple Mail Transfer Protocol as described in RFC 821
\([http://www\.rfc\-editor\.org/rfc/rfc821\.txt](http://www\.rfc\-editor\.org/rfc/rfc821\.txt)\)
and RFC 2821
\([http://www\.rfc\-editor\.org/rfc/rfc2821\.txt](http://www\.rfc\-editor\.org/rfc/rfc2821\.txt)\)\.
By default the server will bind to the default network address and the standard
SMTP port \(25\)\.

This package was designed to permit testing of Mail User Agent code from a
developers workstation\. *It does not attempt to deliver mail to your mailbox\.*
Instead users of this package are expected to write a procedure that will be
called when mail arrives\. Once this procedure returns, the server has nothing
further to do with the mail\.

# <a name='section2'></a>SECURITY

On Unix platforms binding to the SMTP port requires root privileges\. I would not
recommend running any script\-based server as root unless there is some method
for dropping root privileges immediately after the socket is bound\. Under
Windows platforms, it is not necessary to have root or administrator privileges
to bind low numbered sockets\. However, security on these platforms is weak
anyway\.

In short, this code should probably not be used as a permanently running Mail
Transfer Agent on an Internet connected server, even though we are careful not
to evaluate remote user input\. There are many other well tested and security
audited programs that can be used as mail servers for internet connected hosts\.

# <a name='section3'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section4'></a>COMMANDS

  - <a name='1'></a>__::smtpd::start__ ?*myaddr*? ?*port*?

    Start the service listening on *port* or the default port 25\. If
    *myaddr* is given as a domain\-style name or numerical dotted\-quad IP
    address then the server socket will be bound to that network interface\. By
    default the server is bound to all network interfaces\. For example:

    set sock [::smtpd::start [info hostname] 0]

    will bind to the hosts internet interface on the first available port\.

    At present the package only supports a single instance of a SMTP server\.
    This could be changed if required at the cost of making the package a little
    more complicated to read\. If there is a good reason for running multiple
    SMTP services then it will only be necessary to fix the __options__
    array and the __::smtpd::stopped__ variable usage\.

    As the server code uses __fileevent__\(n\) handlers to process the input
    on sockets you will need to run the event loop\. This means either you should
    be running from within __wish__\(1\) or you should
    __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__\(n\) on the
    __::smtpd::stopped__ variable which is set when the server is stopped\.

  - <a name='2'></a>__::smtpd::stop__

    Halt the server and release the listening socket\. If the server has not been
    started then this command does nothing\. The __::smtpd::stopped__
    variable is set for use with
    __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__\(n\)\.

    It should be noted that stopping the server does not disconnect any
    currently active sessions as these are operating over an independent
    channel\. Only explicitly tracking and closing these sessions, or exiting the
    server process will close down all the running sessions\. This is similar to
    the usual unix daemon practice where the server performs a __fork__\(2\)
    and the client session continues on the child process\.

  - <a name='3'></a>__::smptd::configure__ ?*option* *value*? ?*option* *value* *\.\.\.*?

    Set configuration options for the SMTP server\. Most values are the name of a
    callback procedure to be called at various points in the SMTP protocol\. See
    the [CALLBACKS](#section5) section for details of the procedures\.

      * __\-banner__ *text*

        Text of a custom banner message\. The default banner is "tcllib smtpd
        1\.5"\. Note that changing the banner does not affect the bracketing text
        in the full greeting, printing status 220, server\-address, and
        timestamp\.

      * __\-validate\_host__ *proc*

        Callback to authenticate new connections based on the ip\-address of the
        client\.

      * __\-validate\_sender__ *proc*

        Callback to authenticate new connections based on the senders email
        address\.

      * __\-validate\_recipient__ *proc*

        Callback to validate and authorize a recipient email address

      * __\-deliverMIME__ *proc*

        Callback used to deliver mail as a mime token created by the tcllib
        __[mime](\.\./mime/mime\.md)__ package\.

      * __\-deliver__ *proc*

        Callback used to deliver email\. This option has no effect if the
        __\-deliverMIME__ option has been set\.

  - <a name='4'></a>__::smtpd::cget__ ?*option*?

    If no *option* is specified the command will return a list of all options
    and their current values\. If an option is specified it will return the value
    of that option\.

# <a name='section5'></a>CALLBACKS

  - __validate\_host__ callback

    This procedure is called with the clients ip address as soon as a connection
    request has been accepted and before any protocol commands are processed\. If
    you wish to deny access to a specific host then an error should be returned
    by this callback\. For example:

    proc validate_host {ipnum} {
       if {[string match "192.168.1.*" $ipnum]} {
          error "go away!"
       }
    }

    If access is denied the client will receive a standard message that includes
    the text of your error, such as:

    550 Access denied: I hate you.

    As per the SMTP protocol, the connection is not closed but we wait for the
    client to send a QUIT command\. Any other commands cause a __503 Bad
    Sequence__ error\.

  - __validate\_sender__ callback

    The validate\_sender callback is called with the senders mail address during
    processing of a MAIL command to allow you to accept or reject mail based
    upon the declared sender\. To reject mail you should throw an error\. For
    example, to reject mail from user "denied":

    proc validate_sender {address} {
       eval array set addr [mime::parseaddress $address]
       if {[string match "denied" $addr(local)]} {
            error "mailbox $addr(local) denied"
       }
       return
    }

    The content of any error message will not be passed back to the client\.

  - __validate\_recipient__ callback

    The validate\_recipient callback is similar to the validate\_sender callback
    and permits you to verify a local mailbox and accept mail for a local user
    address during RCPT command handling\. To reject mail, throw an error as
    above\. The error message is ignored\.

  - __deliverMIME__ callback

    The deliverMIME callback is called once a mail message has been successfully
    passed to the server\. A mime token is constructed from the sender,
    recipients and data and the users procedure it called with this single
    argument\. When the call returns, the mime token is cleaned up so if the user
    wishes to preserve the data she must make a copy\.

    proc deliverMIME {token} {
        set sender [lindex [mime::getheader $token From] 0]
        set recipients [lindex [mime::getheader $token To] 0]
        set mail "From $sender [clock format [clock seconds]]"
        append mail "\n" [mime::buildmessage $token]
        puts $mail
    }

  - __deliver__ callback

    The deliver callback is called once a mail message has been successfully
    passed to the server and there is no \-deliverMIME option set\. The procedure
    is called with the sender, a list of recipients and the text of the mail as
    a list of lines\. For example:

    proc deliver {sender recipients data} {
       set mail "From $sender  [clock format [clock seconds]]"
       append mail "\n" [join $data "\n"]
       puts "$mail"
    }

    Note that the DATA command will return an error if no sender or recipient
    has yet been defined\.

# <a name='section6'></a>VARIABLES

  - __::smtpd::stopped__

    This variable is set to __true__ during the __::smtpd::stop__
    command to permit the use of the
    __[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)__\(n\) command\.

# <a name='section7'></a>AUTHOR

Written by Pat Thoyts
[mailto:patthoyts@users\.sourceforge\.net](mailto:patthoyts@users\.sourceforge\.net)\.

# <a name='section8'></a>LICENSE

This software is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE\. See the file "license\.terms" for more details\.

# <a name='section9'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *smtpd* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[rfc 2821](\.\./\.\./\.\./\.\./index\.md\#rfc\_2821), [rfc
821](\.\./\.\./\.\./\.\./index\.md\#rfc\_821),
[services](\.\./\.\./\.\./\.\./index\.md\#services),
[smtp](\.\./\.\./\.\./\.\./index\.md\#smtp), [smtpd](\.\./\.\./\.\./\.\./index\.md\#smtpd),
[socket](\.\./\.\./\.\./\.\./index\.md\#socket),
[vwait](\.\./\.\./\.\./\.\./index\.md\#vwait)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/snit/snit.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416

[//000000001]: # (snit \- Snit's Not Incr Tcl, OO system)
[//000000002]: # (Generated from file 'snit\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003\-2009, by William H\. Duquette)
[//000000004]: # (snit\(n\) 2\.3\.2 tcllib "Snit's Not Incr Tcl, OO system")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

snit \- Snit's Not Incr Tcl

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [SNIT VERSIONS](#section2)

  - [REFERENCE](#section3)

      - [Type and Widget Definitions](#subsection1)

      - [The Type Command](#subsection2)

      - [Standard Type Methods](#subsection3)

      - [The Instance Command](#subsection4)

      - [Standard Instance Methods](#subsection5)

      - [Commands for use in Object Code](#subsection6)

      - [Components and Delegation](#subsection7)

      - [Type Components and Delegation](#subsection8)

      - [The Tk Option Database](#subsection9)

      - [Macros and Meta\-programming](#subsection10)

      - [Validation Types](#subsection11)

      - [Defining Validation Types](#subsection12)

  - [CAVEATS](#section4)

  - [KNOWN BUGS](#section5)

  - [HISTORY](#section6)

  - [CREDITS](#section7)

  - [Bugs, Ideas, Feedback](#section8)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit ?2\.3\.2?  

[__snit::type__ *name* *definition*](#1)  
[__typevariable__ *name* ?__\-array__? ?*value*?](#2)  
[__typemethod__ *name* *arglist* *body*](#3)  
[__typeconstructor__ *body*](#4)  
[__variable__ *name* ?__\-array__? ?*value*?](#5)  
[__[method](\.\./\.\./\.\./\.\./index\.md\#method)__ *name* *arglist* *body*](#6)  
[__option__ *namespec* ?*defaultValue*?](#7)  
[__option__ *namespec* ?*options\.\.\.*?](#8)  
[__constructor__ *arglist* *body*](#9)  
[__destructor__ *body*](#10)  
[__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ *name* *args* *body*](#11)  
[__delegate__ __method__ *name* __to__ *comp* ?__as__ *target*?](#12)  
[__delegate__ __method__ *name* ?__to__ *comp*? __using__ *pattern*](#13)  
[__delegate__ __method__ __\*__ ?__to__ *comp*? ?__using__ *pattern*? ?__except__ *exceptions*?](#14)  
[__delegate__ __option__ *namespec* __to__ *comp*](#15)  
[__delegate__ __option__ *namespec* __to__ *comp* __as__ *target*](#16)  
[__delegate__ __option__ __\*__ __to__ *comp*](#17)  
[__delegate__ __option__ __\*__ __to__ *comp* __except__ *exceptions*](#18)  
[__component__ *comp* ?__\-public__ *method*? ?__\-inherit__ *flag*?](#19)  
[__delegate__ __typemethod__ *name* __to__ *comp* ?__as__ *target*?](#20)  
[__delegate__ __typemethod__ *name* ?__to__ *comp*? __using__ *pattern*](#21)  
[__delegate__ __typemethod__ __\*__ ?__to__ *comp*? ?__using__ *pattern*? ?__except__ *exceptions*?](#22)  
[__typecomponent__ *comp* ?__\-public__ *typemethod*? ?__\-inherit__ *flag*?](#23)  
[__pragma__ ?*options\.\.\.*?](#24)  
[__expose__ *comp*](#25)  
[__expose__ *comp* __as__ *method*](#26)  
[__onconfigure__ *name* *arglist* *body*](#27)  
[__oncget__ *name* *body*](#28)  
[__snit::widget__ *name* *definition*](#29)  
[__widgetclass__ *name*](#30)  
[__hulltype__ *type*](#31)  
[__snit::widgetadaptor__ *name* *definition*](#32)  
[__snit::typemethod__ *type* *name* *arglist* *body*](#33)  
[__snit::method__ *type* *name* *arglist* *body*](#34)  
[__snit::macro__ *name* *arglist* *body*](#35)  
[__snit::compile__ *which* *type* *body*](#36)  
[__$type__ *typemethod* *args*\.\.\.](#37)  
[__$type__ __create__ *name* ?*option* *value* \.\.\.?](#38)  
[__$type__ __info typevars__ ?*pattern*?](#39)  
[__$type__ __info typemethods__ ?*pattern*?](#40)  
[__$type__ __info args__ *method*](#41)  
[__$type__ __info body__ *method*](#42)  
[__$type__ __info default__ *method* *aname* *varname*](#43)  
[__$type__ __info instances__ ?*pattern*?](#44)  
[__$type__ __destroy__](#45)  
[__$object__ *method* *args\.\.\.*](#46)  
[__$object__ __configure__ ?*option*? ?*value*? \.\.\.](#47)  
[__$object__ __configurelist__ *optionlist*](#48)  
[__$object__ __cget__ *option*](#49)  
[__$object__ __destroy__](#50)  
[__$object__ __info type__](#51)  
[__$object__ __info vars__ ?*pattern*?](#52)  
[__$object__ __info typevars__ ?*pattern*?](#53)  
[__$object__ __info typemethods__ ?*pattern*?](#54)  
[__$object__ __info options__ ?*pattern*?](#55)  
[__$object__ __info methods__ ?*pattern*?](#56)  
[__$object__ __info args__ *method*](#57)  
[__$object__ __info body__ *method*](#58)  
[__$object__ __info default__ *method* *aname* *varname*](#59)  
[__mymethod__ *name* ?*args\.\.\.*?](#60)  
[__mytypemethod__ *name* ?*args\.\.\.*?](#61)  
[__myproc__ *name* ?*args\.\.\.*?](#62)  
[__myvar__ *name*](#63)  
[__mytypevar__ *name*](#64)  
[__from__ *argvName* *option* ?*defvalue*?](#65)  
[__install__ *compName* __using__ *objType* *objName* *args\.\.\.*](#66)  
[__installhull__ __using__ *widgetType* *args\.\.\.*](#67)  
[__installhull__ *name*](#68)  
[__variable__ *name*](#69)  
[__typevariable__ *name*](#70)  
[__varname__ *name*](#71)  
[__typevarname__ *name*](#72)  
[__codename__ *name*](#73)  
[__snit::boolean__ __validate__ ?*value*?](#74)  
[__snit::boolean__ *name*](#75)  
[__snit::double__ __validate__ ?*value*?](#76)  
[__snit::double__ *name* ?*option* *value*\.\.\.?](#77)  
[__snit::enum__ __validate__ ?*value*?](#78)  
[__snit::enum__ *name* ?*option* *value*\.\.\.?](#79)  
[__snit::fpixels__ __validate__ ?*value*?](#80)  
[__snit::fpixels__ *name* ?*option* *value*\.\.\.?](#81)  
[__snit::integer__ __validate__ ?*value*?](#82)  
[__snit::integer__ *name* ?*option* *value*\.\.\.?](#83)  
[__snit::listtype__ __validate__ ?*value*?](#84)  
[__snit::listtype__ *name* ?*option* *value*\.\.\.?](#85)  
[__snit::pixels__ __validate__ ?*value*?](#86)  
[__snit::pixels__ *name* ?*option* *value*\.\.\.?](#87)  
[__snit::stringtype__ __validate__ ?*value*?](#88)  
[__snit::stringtype__ *name* ?*option* *value*\.\.\.?](#89)  
[__snit::window__ __validate__ ?*value*?](#90)  
[__snit::window__ *name*](#91)  

# <a name='description'></a>DESCRIPTION

Snit is a pure Tcl object and megawidget system\. It's unique among Tcl object
systems in that it's based not on inheritance but on delegation\. Object systems
based on inheritance only allow you to inherit from classes defined using the
same system, which is limiting\. In Tcl, an object is anything that acts like an
object; it shouldn't matter how the object was implemented\. Snit is intended to
help you build applications out of the materials at hand; thus, Snit is designed
to be able to incorporate and build on any object, whether it's a hand\-coded
object, a __[Tk](\.\./\.\./\.\./\.\./index\.md\#tk)__ widget, an __[Incr
Tcl](\.\./\.\./\.\./\.\./index\.md\#incr\_tcl)__ object, a
__[BWidget](\.\./\.\./\.\./\.\./index\.md\#bwidget)__ or almost anything else\.

This man page is intended to be a reference only; see the accompanying
__[snitfaq](snitfaq\.md)__ for a gentler, more tutorial introduction to
Snit concepts\.

# <a name='section2'></a>SNIT VERSIONS

This man page covers both Snit 2\.2 and Snit 1\.3\. The primary difference between
the two versions is simply that Snit 2\.2 contains speed optimizations based on
new features of Tcl 8\.5; Snit 1\.3 supports all of Tcl 8\.3, 8\.4 and Tcl 8\.5\.
There are a few minor inconsistencies; they are flagged in the body of the man
page with the label "Snit 1\.x Incompatibility"; they are also discussed in the
__[snitfaq](snitfaq\.md)__\.

# <a name='section3'></a>REFERENCE

## <a name='subsection1'></a>Type and Widget Definitions

Snit provides the following commands for defining new types:

  - <a name='1'></a>__snit::type__ *name* *definition*

    Defines a new abstract data type called *name*\. If *name* is not a fully
    qualified command name, it is assumed to be a name in the namespace in which
    the __snit::type__ command was called \(usually the global namespace\)\. It
    returns the fully qualified name of the new type\.

    The type name is then a command that is used to create objects of the new
    type, along with other activities\.

    The __snit::type__ *definition* block is a script that may contain the
    following definitions:

      * <a name='2'></a>__typevariable__ *name* ?__\-array__? ?*value*?

        Defines a type variable with the specified *name*, and optionally the
        specified *value*\. Type variables are shared by all instances of the
        type\. If the __\-array__ option is included, then *value* should be
        a dictionary; it will be assigned to the variable using __array
        set__\.

      * <a name='3'></a>__typemethod__ *name* *arglist* *body*

        Defines a type method, a subcommand of the new type command, with the
        specified name, argument list, and body\. The *arglist* is a normal Tcl
        argument list and may contain default arguments and the __args__
        argument; however, it may not contain the argument names __type__,
        __self__, __selfns__, or __win__\.

        The variable __type__ is automatically defined in the *body* to
        the type's fully\-qualified name\. In addition, type variables are
        automatically visible in the *body* of every type method\.

        If the *name* consists of two or more tokens, Snit handles it
        specially:

            typemethod {a b} {arg} { puts "Got $arg" }

        This statement implicitly defines a type method called __a__ which
        has a subcommand __b__\. __b__ is called like this:

            $type a b "Hello, world!"

        __a__ may have any number of subcommands\. This makes it possible to
        define a hierarchical command structure; see
        __[method](\.\./\.\./\.\./\.\./index\.md\#method)__, below, for more
        examples\.

        Type methods can call commands from the namespace in which the type is
        defined without importing them, e\.g\., if the type name is
        __::parentns::typename__, then the type's type methods can call
        __::parentns::someproc__ just as __someproc__\. *Snit 1\.x
        Incompatibility:* This does not work in Snit 1\.x, as it depends on
        __namespace path__, a new command in Tcl 8\.5\.

        *Snit 1\.x Incompatibility:* In Snit 1\.x, the following following two
        calls to this type method are equivalent:

            $type a b "Hello, world!"
            $type {a b} "Hello, world!"

        In Snit 2\.2, the second form is invalid\.

      * <a name='4'></a>__typeconstructor__ *body*

        The type constructor's *body* is executed once when the type is first
        defined; it is typically used to initialize array\-valued type variables
        and to add entries to [The Tk Option Database](#subsection9)\.

        The variable __type__ is automatically defined in the *body*, and
        contains the type's fully\-qualified name\. In addition, type variables
        are automatically visible in the *body* of the type constructor\.

        A type may define at most one type constructor\.

        The type constructor can call commands from the namespace in which the
        type is defined without importing them, e\.g\., if the type name is
        __::parentns::typename__, then the type constructor can call
        __::parentns::someproc__ just as __someproc__\. *Snit 1\.x
        Incompatibility:* This does not work in Snit 1\.x, as it depends on
        __namespace path__, a new command in Tcl 8\.5\.

      * <a name='5'></a>__variable__ *name* ?__\-array__? ?*value*?

        Defines an instance variable, a private variable associated with each
        instance of this type, and optionally its initial value\. If the
        __\-array__ option is included, then *value* should be a
        dictionary; it will be assigned to the variable using __array set__\.

      * <a name='6'></a>__[method](\.\./\.\./\.\./\.\./index\.md\#method)__ *name* *arglist* *body*

        Defines an instance method, a subcommand of each instance of this type,
        with the specified name, argument list and body\. The *arglist* is a
        normal Tcl argument list and may contain default arguments and the
        __args__ argument\.

        The method is implicitly passed the following arguments as well:
        __type__, which contains the fully\-qualified type name;
        __self__, which contains the current instance command name;
        __selfns__, which contains the name of the instance's private
        namespace; and __win__, which contains the original instance name\.
        Consequently, the *arglist* may not contain the argument names
        __type__, __self__, __selfns__, or __win__\.

        An instance method defined in this way is said to be *locally
        defined*\.

        Type and instance variables are automatically visible in all instance
        methods\. If the type has locally defined options, the __options__
        array is also visible\.

        If the *name* consists of two or more tokens, Snit handles it
        specially:

            method {a b} {} { ... }

        This statement implicitly defines a method called __a__ which has a
        subcommand __b__\. __b__ is called like this:

            $self a b "Hello, world!"

        __a__ may have any number of subcommands\. This makes it possible to
        define a hierarchical command structure:

            % snit::type dog {
                method {tail wag}   {} {return "Wag, wag"}
                method {tail droop} {} {return "Droop, droop"}
            }
            ::dog
            % dog spot
            ::spot
            % spot tail wag
            Wag, wag
            % spot tail droop
            Droop, droop
            %

        What we've done is implicitly defined a "tail" method with subcommands
        "wag" and "droop"\. Consequently, it's an error to define "tail"
        explicitly\.

        Methods can call commands from the namespace in which the type is
        defined without importing them, e\.g\., if the type name is
        __::parentns::typename__, then the type's methods can call
        __::parentns::someproc__ just as __someproc__\. *Snit 1\.x
        Incompatibility:* This does not work in Snit 1\.x, as it depends on
        __namespace path__, a new command in Tcl 8\.5\.

        *Snit 1\.x Incompatibility:* In Snit 1\.x, the following following two
        calls to this method are equivalent:

            $self a b "Hello, world!"
            $self {a b} "Hello, world!"

        In Snit 2\.2, the second form is invalid\.

      * <a name='7'></a>__option__ *namespec* ?*defaultValue*?

      * <a name='8'></a>__option__ *namespec* ?*options\.\.\.*?

        Defines an option for instances of this type, and optionally gives it an
        initial value\. The initial value defaults to the empty string if no
        *defaultValue* is specified\.

        An option defined in this way is said to be *locally defined*\.

        The *namespec* is a list defining the option's name, resource name,
        and class name, e\.g\.:

            option {-font font Font} {Courier 12}

        The option name must begin with a hyphen, and must not contain any upper
        case letters\. The resource name and class name are optional; if not
        specified, the resource name defaults to the option name, minus the
        hyphen, and the class name defaults to the resource name with the first
        letter capitalized\. Thus, the following statement is equivalent to the
        previous example:

            option -font {Courier 12}

        See [The Tk Option Database](#subsection9) for more information
        about resource and class names\.

        Options are normally set and retrieved using the standard instance
        methods __configure__ and __cget__; within instance code \(method
        bodies, etc\.\), option values are available through the __options__
        array:

            set myfont $options(-font)

        If the type defines any option handlers \(e\.g\.,
        __\-configuremethod__\), then it should probably use __configure__
        and __cget__ to access its options to avoid subtle errors\.

        The __option__ statement may include the following options:

          + __\-default__ *defvalue*

            Defines the option's default value; the option's default value will
            be "" otherwise\.

          + __\-readonly__ *flag*

            The *flag* can be any Boolean value recognized by Tcl\. If *flag*
            is true, then the option is read\-only\-\-it can only be set using
            __configure__ or __configurelist__ at creation time, i\.e\.,
            in the type's constructor\.

          + __\-type__ *type*

            Every locally\-defined option may define its validation type, which
            may be either the name of a validation type or a specification for a
            validation subtype

            For example, an option may declare that its value must be an integer
            by specifying __snit::integer__ as its validation type:

                option -number -type snit::integer

            It may also declare that its value is an integer between 1 and 10 by
            specifying a validation subtype:

                option -number -type {snit::integer -min 1 -max 10}

            If a validation type or subtype is defined for an option, then it
            will be used to validate the option's value whenever it is changed
            by the object's __configure__ or __configurelist__ methods\.
            In addition, all such options will have their values validated
            automatically immediately after the constructor executes\.

            Snit defines a family of validation types and subtypes, and it's
            quite simple to define new ones\. See [Validation
            Types](#subsection11) for the complete list, and [Defining
            Validation Types](#subsection12) for an explanation of how to
            define your own\.

          + __\-cgetmethod__ *methodName*

            Every locally\-defined option may define a __\-cgetmethod__; it is
            called when the option's value is retrieved using the __cget__
            method\. Whatever the method's *body* returns will be the return
            value of the call to __cget__\.

            The named method must take one argument, the option name\. For
            example, this code is equivalent to \(though slower than\) Snit's
            default handling of __cget__:

                option -font -cgetmethod GetOption
                method GetOption {option} {
                    return $options($option)
                }

            Note that it's possible for any number of options to share a
            __\-cgetmethod__\.

          + __\-configuremethod__ *methodName*

            Every locally\-defined option may define a __\-configuremethod__;
            it is called when the option's value is set using the
            __configure__ or __configurelist__ methods\. It is the named
            method's responsibility to save the option's value; in other words,
            the value will not be saved to the __options\(\)__ array unless
            the method saves it there\.

            The named method must take two arguments, the option name and its
            new value\. For example, this code is equivalent to \(though slower
            than\) Snit's default handling of __configure__:

                option -font -configuremethod SetOption
                method SetOption {option value} {
                    set options($option) $value
                }

            Note that it's possible for any number of options to share a single
            __\-configuremethod__\.

          + __\-validatemethod__ *methodName*

            Every locally\-defined option may define a __\-validatemethod__;
            it is called when the option's value is set using the
            __configure__ or __configurelist__ methods, just before the
            __\-configuremethod__ \(if any\)\. It is the named method's
            responsibility to validate the option's new value, and to throw an
            error if the value is invalid\.

            The named method must take two arguments, the option name and its
            new value\. For example, this code verifies that __\-flag__'s
            value is a valid Boolean value:

                option -font -validatemethod CheckBoolean
                method CheckBoolean {option value} {
                    if {![string is boolean -strict $value]} {
                        error "option $option must have a boolean value."
                    }
                }

            Note that it's possible for any number of options to share a single
            __\-validatemethod__\.

      * <a name='9'></a>__constructor__ *arglist* *body*

        The constructor definition specifies a *body* of code to be executed
        when a new instance is created\. The *arglist* is a normal Tcl argument
        list and may contain default arguments and the __args__ argument\.

        As with methods, the arguments __type__, __self__,
        __selfns__, and __win__ are defined implicitly, and all type and
        instance variables are automatically visible in its *body*\.

        If the *definition* doesn't explicitly define the constructor, Snit
        defines one implicitly\. If the type declares at least one option
        \(whether locally or by delegation\), the default constructor will be
        defined as follows:

            constructor {args} {
                $self configurelist $args
            }

        For standard Tk widget behavior, the argument list should be the single
        name __args__, as shown\.

        If the *definition* defines neither a constructor nor any options, the
        default constructor is defined as follows:

            constructor {} {}

        As with methods, the constructor can call commands from the namespace in
        which the type is defined without importing them, e\.g\., if the type name
        is __::parentns::typename__, then the constructor can call
        __::parentns::someproc__ just as __someproc__\. *Snit 1\.x
        Incompatibility:* This does not work in Snit 1\.x, as it depends on
        __namespace path__, a new command in Tcl 8\.5\.

      * <a name='10'></a>__destructor__ *body*

        The destructor is used to code any actions that must take place when an
        instance of the type is destroyed: typically, the destruction of
        anything created in the constructor\.

        The destructor takes no explicit arguments; as with methods, the
        arguments __type__, __self__, __selfns__, and __win__,
        are defined implicitly, and all type and instance variables are
        automatically visible in its *body*\. As with methods, the destructor
        can call commands from the namespace in which the type is defined
        without importing them, e\.g\., if the type name is
        __::parentns::typename__, then the destructor can call
        __::parentns::someproc__ just as __someproc__\. *Snit 1\.x
        Incompatibility:* This does not work in Snit 1\.x, as it depends on
        __namespace path__, a new command in Tcl 8\.5\.

      * <a name='11'></a>__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ *name* *args* *body*

        Defines a new Tcl procedure in the type's namespace\.

        The defined proc differs from a normal Tcl proc in that all type
        variables are automatically visible\. The proc can access instance
        variables as well, provided that it is passed __selfns__ \(with
        precisely that name\) as one of its arguments\.

        Although they are not implicitly defined for procs, the argument names
        __type__, __self__, and __win__ should be avoided\.

        As with methods and typemethods, procs can call commands from the
        namespace in which the type is defined without importing them, e\.g\., if
        the type name is __::parentns::typename__, then the proc can call
        __::parentns::someproc__ just as __someproc__\. *Snit 1\.x
        Incompatibility:* This does not work in Snit 1\.x, as it depends on
        __namespace path__, a new command in Tcl 8\.5\.

      * <a name='12'></a>__delegate__ __method__ *name* __to__ *comp* ?__as__ *target*?

        Delegates method *name* to component *comp*\. That is, when method
        *name* is called on an instance of this type, the method and its
        arguments will be passed to the named component's command instead\. That
        is, the following statement

            delegate method wag to tail

        is roughly equivalent to this explicitly defined method:

            method wag {args} {
                uplevel $tail wag $args
            }

        As with methods, the *name* may have multiple tokens; in this case,
        the last token of the name is assumed to be the name of the component's
        method\.

        The optional __as__ clause allows you to specify the delegated
        method name and possibly add some arguments:

            delegate method wagtail to tail as "wag briskly"

        A method cannot be both locally defined and delegated\.

        __Note:__ All forms of __delegate method__ can delegate to both
        instance components and type components\.

      * <a name='13'></a>__delegate__ __method__ *name* ?__to__ *comp*? __using__ *pattern*

        In this form of the __delegate__ statement, the __using__ clause
        is used to specify the precise form of the command to which method
        *name* name is delegated\. In this form, the __to__ clause is
        optional, since the chosen command might not involve any particular
        component\.

        The value of the __using__ clause is a list that may contain any or
        all of the following substitution codes; these codes are substituted
        with the described value to build the delegated command prefix\. Note
        that the following two statements are equivalent:

            delegate method wag to tail
            delegate method wag to tail using "%c %m"

        Each element of the list becomes a single element of the delegated
        command\-\-it is never reparsed as a string\.

        Substitutions:

          + __%%__

            This is replaced with a single "%"\. Thus, to pass the string "%c" to
            the command as an argument, you'd write "%%c"\.

          + __%c__

            This is replaced with the named component's command\.

          + __%m__

            This is replaced with the final token of the method *name*; if the
            method *name* has one token, this is identical to __%M__\.

          + __%M__

            This is replaced by the method *name*; if the *name* consists of
            multiple tokens, they are joined by space characters\.

          + __%j__

            This is replaced by the method *name*; if the *name* consists of
            multiple tokens, they are joined by underscores \("\_"\)\.

          + __%t__

            This is replaced with the fully qualified type name\.

          + __%n__

            This is replaced with the name of the instance's private namespace\.

          + __%s__

            This is replaced with the name of the instance command\.

          + __%w__

            This is replaced with the original name of the instance command; for
            Snit widgets and widget adaptors, it will be the Tk window name\. It
            remains constant, even if the instance command is renamed\.

      * <a name='14'></a>__delegate__ __method__ __\*__ ?__to__ *comp*? ?__using__ *pattern*? ?__except__ *exceptions*?

        The form __delegate method \*__ delegates all unknown method names to
        the specified *comp*onent\. The __except__ clause can be used to
        specify a list of *exceptions*, i\.e\., method names that will not be so
        delegated\. The __using__ clause is defined as given above\. In this
        form, the statement must contain the __to__ clause, the
        __using__ clause, or both\.

        In fact, the "\*" can be a list of two or more tokens whose last element
        is "\*", as in the following example:

            delegate method {tail *} to tail

        This implicitly defines the method __tail__ whose subcommands will
        be delegated to the __tail__ component\.

      * <a name='15'></a>__delegate__ __option__ *namespec* __to__ *comp*

      * <a name='16'></a>__delegate__ __option__ *namespec* __to__ *comp* __as__ *target*

      * <a name='17'></a>__delegate__ __option__ __\*__ __to__ *comp*

      * <a name='18'></a>__delegate__ __option__ __\*__ __to__ *comp* __except__ *exceptions*

        Defines a delegated option; the *namespec* is defined as for the
        __option__ statement\. When the __configure__,
        __configurelist__, or __cget__ instance method is used to set or
        retrieve the option's value, the equivalent __configure__ or
        __cget__ command will be applied to the component as though the
        option was defined with the following __\-configuremethod__ and
        __\-cgetmethod__:

            method ConfigureMethod {option value} {
                $comp configure $option $value
            }

            method CgetMethod {option} {
                return [$comp cget $option]
            }

        Note that delegated options never appear in the __options__ array\.

        If the __as__ clause is specified, then the *target* option name
        is used in place of *name*\.

        The form __delegate option \*__ delegates all unknown options to the
        specified *comp*onent\. The __except__ clause can be used to
        specify a list of *exceptions*, i\.e\., option names that will not be so
        delegated\.

        Warning: options can only be delegated to a component if it supports the
        __configure__ and __cget__ instance methods\.

        An option cannot be both locally defined and delegated\. TBD: Continue
        from here\.

      * <a name='19'></a>__component__ *comp* ?__\-public__ *method*? ?__\-inherit__ *flag*?

        Explicitly declares a component called *comp*, and automatically
        defines the component's instance variable\.

        If the __\-public__ option is specified, then the option is made
        public by defining a *method* whose subcommands are delegated to the
        component e\.g\., specifying __\-public mycomp__ is equivalent to the
        following:

            component mycomp
            delegate method {mymethod *} to mycomp

        If the __\-inherit__ option is specified, then *flag* must be a
        Boolean value; if *flag* is true then all unknown methods and options
        will be delegated to this component\. The name __\-inherit__ implies
        that instances of this new type inherit, in a sense, the methods and
        options of the component\. That is, __\-inherit yes__ is equivalent
        to:

            component mycomp
            delegate option * to mycomp
            delegate method * to mycomp

      * <a name='20'></a>__delegate__ __typemethod__ *name* __to__ *comp* ?__as__ *target*?

        Delegates type method *name* to type component *comp*\. That is, when
        type method *name* is called on this type, the type method and its
        arguments will be passed to the named type component's command instead\.
        That is, the following statement

            delegate typemethod lostdogs to pound

        is roughly equivalent to this explicitly defined method:

            typemethod lostdogs {args} {
                uplevel $pound lostdogs $args
            }

        As with type methods, the *name* may have multiple tokens; in this
        case, the last token of the name is assumed to be the name of the
        component's method\.

        The optional __as__ clause allows you to specify the delegated
        method name and possibly add some arguments:

            delegate typemethod lostdogs to pound as "get lostdogs"

        A type method cannot be both locally defined and delegated\.

      * <a name='21'></a>__delegate__ __typemethod__ *name* ?__to__ *comp*? __using__ *pattern*

        In this form of the __delegate__ statement, the __using__ clause
        is used to specify the precise form of the command to which type method
        *name* name is delegated\. In this form, the __to__ clause is
        optional, since the chosen command might not involve any particular type
        component\.

        The value of the __using__ clause is a list that may contain any or
        all of the following substitution codes; these codes are substituted
        with the described value to build the delegated command prefix\. Note
        that the following two statements are equivalent:

            delegate typemethod lostdogs to pound
            delegate typemethod lostdogs to pound using "%c %m"

        Each element of the list becomes a single element of the delegated
        command\-\-it is never reparsed as a string\.

        Substitutions:

          + __%%__

            This is replaced with a single "%"\. Thus, to pass the string "%c" to
            the command as an argument, you'd write "%%c"\.

          + __%c__

            This is replaced with the named type component's command\.

          + __%m__

            This is replaced with the final token of the type method *name*;
            if the type method *name* has one token, this is identical to
            __%M__\.

          + __%M__

            This is replaced by the type method *name*; if the *name*
            consists of multiple tokens, they are joined by space characters\.

          + __%j__

            This is replaced by the type method *name*; if the *name*
            consists of multiple tokens, they are joined by underscores \("\_"\)\.

          + __%t__

            This is replaced with the fully qualified type name\.

      * <a name='22'></a>__delegate__ __typemethod__ __\*__ ?__to__ *comp*? ?__using__ *pattern*? ?__except__ *exceptions*?

        The form __delegate typemethod \*__ delegates all unknown type method
        names to the specified type component\. The __except__ clause can be
        used to specify a list of *exceptions*, i\.e\., type method names that
        will not be so delegated\. The __using__ clause is defined as given
        above\. In this form, the statement must contain the __to__ clause,
        the __using__ clause, or both\.

        __Note:__ By default, Snit interprets __$type foo__, where
        __foo__ is not a defined type method, as equivalent to __$type
        create foo__, where __foo__ is the name of a new instance of the
        type\. If you use __delegate typemethod \*__, then the __create__
        type method must always be used explicitly\.

        The "\*" can be a list of two or more tokens whose last element is "\*",
        as in the following example:

            delegate typemethod {tail *} to tail

        This implicitly defines the type method __tail__ whose subcommands
        will be delegated to the __tail__ type component\.

      * <a name='23'></a>__typecomponent__ *comp* ?__\-public__ *typemethod*? ?__\-inherit__ *flag*?

        Explicitly declares a type component called *comp*, and automatically
        defines the component's type variable\. A type component is an arbitrary
        command to which type methods and instance methods can be delegated; the
        command's name is stored in a type variable\.

        If the __\-public__ option is specified, then the type component is
        made public by defining a *typemethod* whose subcommands are delegated
        to the type component, e\.g\., specifying __\-public mytypemethod__ is
        equivalent to the following:

            typecomponent mycomp
            delegate typemethod {mytypemethod *} to mycomp

        If the __\-inherit__ option is specified, then *flag* must be a
        Boolean value; if *flag* is true then all unknown type methods will be
        delegated to this type component\. \(See the note on "delegate typemethod
        \*", above\.\) The name __\-inherit__ implies that this type inherits,
        in a sense, the behavior of the type component\. That is, __\-inherit
        yes__ is equivalent to:

            typecomponent mycomp
            delegate typemethod * to mycomp

      * <a name='24'></a>__pragma__ ?*options\.\.\.*?

        The __pragma__ statement provides control over how Snit generates a
        type\. It takes the following options; in each case, *flag* must be a
        Boolean value recognized by Tcl, e\.g\., __0__, __1__,
        __yes__, __no__, and so on\.

        By setting the __\-hastypeinfo__, __\-hastypedestroy__, and
        __\-hasinstances__ pragmas to false and defining appropriate type
        methods, you can create an ensemble command without any extraneous
        behavior\.

          + __\-canreplace__ *flag*

            If false \(the default\) Snit will not create an instance of a
            __snit::type__ that has the same name as an existing command;
            this prevents subtle errors\. Setting this pragma to true restores
            the behavior of Snit V0\.93 and earlier versions\.

          + __\-hastypeinfo__ *flag*

            If true \(the default\), the generated type will have a type method
            called __[info](\.\./\.\./\.\./\.\./index\.md\#info)__ that is used
            for type introspection; the
            __[info](\.\./\.\./\.\./\.\./index\.md\#info)__ type method is
            documented below\. If false, it will not\.

          + __\-hastypedestroy__ *flag*

            If true \(the default\), the generated type will have a type method
            called __destroy__ that is used to destroy the type and all of
            its instances\. The __destroy__ type method is documented below\.
            If false, it will not\.

          + __\-hastypemethods__ *flag*

            If true \(the default\), the generated type's type command will have
            subcommands \(type methods\) as usual\. If false, the type command will
            serve only to create instances of the type; the first argument is
            the instance name\.

            This pragma and __\-hasinstances__ cannot both be set false\.

          + __\-hasinstances__ *flag*

            If true \(the default\), the generated type will have a type method
            called __create__ that is used to create instances of the type,
            along with a variety of instance\-related features\. If false, it will
            not\.

            This pragma and __\-hastypemethods__ cannot both be set false\.

          + __\-hasinfo__ *flag*

            If true \(the default\), instances of the generated type will have an
            instance method called __info__ that is used for instance
            introspection; the __info__ method is documented below\. If
            false, it will not\.

          + __\-simpledispatch__ *flag*

            This pragma is intended to make simple, heavily\-used abstract data
            types \(e\.g\., stacks and queues\) more efficient\.

            If false \(the default\), instance methods are dispatched normally\. If
            true, a faster dispatching scheme is used instead\. The speed comes
            at a price; with __\-simpledispatch yes__ you get the following
            limitations:

              - Methods cannot be delegated\.

              - __uplevel__ and __upvar__ do not work as expected: the
                caller's scope is two levels up rather than one\.

              - The option\-handling methods \(__cget__, __configure__,
                and __configurelist__\) are very slightly slower\.

      * <a name='25'></a>__expose__ *comp*

      * <a name='26'></a>__expose__ *comp* __as__ *method*

        __Deprecated\.__ To expose component *comp* publicly, use
        __component__'s __\-public__ option\.

      * <a name='27'></a>__onconfigure__ *name* *arglist* *body*

        __Deprecated\.__ Define __option__'s __\-configuremethod__
        option instead\.

        As of version 0\.95, the following definitions,

            option -myoption
            onconfigure -myoption {value} {
                # Code to save the option's value
            }

        are implemented as follows:

            option -myoption -configuremethod _configure-myoption
            method _configure-myoption {_option value} {
                # Code to save the option's value
            }

      * <a name='28'></a>__oncget__ *name* *body*

        __Deprecated\.__ Define __option__'s __\-cgetmethod__ option
        instead\.

        As of version 0\.95, the following definitions,

            option -myoption
            oncget -myoption {
                # Code to return the option's value
            }

        are implemented as follows:

            option -myoption -cgetmethod _cget-myoption
            method _cget-myoption {_option} {
                # Code to return the option's value
            }

  - <a name='29'></a>__snit::widget__ *name* *definition*

    This command defines a Snit megawidget type with the specified *name*\. The
    *definition* is defined as for __snit::type__\. A __snit::widget__
    differs from a __snit::type__ in these ways:

      * Every instance of a __snit::widget__ has an automatically\-created
        component called __hull__, which is normally a Tk frame widget\.
        Other widgets created as part of the megawidget will be created within
        this widget\.

        The hull component is initially created with the requested widget name;
        then Snit does some magic, renaming the hull component and installing
        its own instance command in its place\. The hull component's new name is
        saved in an instance variable called __hull__\.

      * The name of an instance must be valid Tk window name, and the parent
        window must exist\.

    A __snit::widget__ definition can include any of statements allowed in a
    __snit::type__ definition, and may also include the following:

      * <a name='30'></a>__widgetclass__ *name*

        Sets the __snit::widget__'s widget class to *name*, overriding the
        default\. See [The Tk Option Database](#subsection9) for more
        information\.

      * <a name='31'></a>__hulltype__ *type*

        Determines the kind of widget used as the __snit::widget__'s hull\.
        The *type* may be __frame__ \(the default\), __toplevel__,
        __labelframe__; the qualified equivalents of these,
        __tk::frame__, __tk::toplevel__, and __tk::labelframe__; or,
        if available, the equivalent Tile widgets: __ttk::frame__,
        __ttk::toplevel__, and __ttk::labelframe__\. In practice, any
        widget that supports the __\-class__ option can be used as a hull
        widget by __lappend__'ing its name to the variable
        __snit::hulltypes__\.

  - <a name='32'></a>__snit::widgetadaptor__ *name* *definition*

    This command defines a Snit megawidget type with the specified name\. It
    differs from __snit::widget__ in that the instance's __hull__
    component is not created automatically, but is created in the constructor
    and installed using the __installhull__ command\. Once the hull is
    installed, its instance command is renamed and replaced as with normal
    __snit::widget__s\. The original command is again accessible in the
    instance variable __hull__\.

    Note that in general it is not possible to change the *widget class* of a
    __snit::widgetadaptor__'s hull widget\.

    See [The Tk Option Database](#subsection9) for information on how
    __snit::widgetadaptor__s interact with the option database\.

  - <a name='33'></a>__snit::typemethod__ *type* *name* *arglist* *body*

    Defines a new type method \(or redefines an existing type method\) for a
    previously existing *type*\.

  - <a name='34'></a>__snit::method__ *type* *name* *arglist* *body*

    Defines a new instance method \(or redefines an existing instance method\) for
    a previously existing *type*\. Note that delegated instance methods can't
    be redefined\.

  - <a name='35'></a>__snit::macro__ *name* *arglist* *body*

    Defines a Snit macro with the specified *name*, *arglist*, and *body*\.
    Macros are used to define new type and widget definition statements in terms
    of the statements defined in this man page\.

    A macro is simply a Tcl proc that is defined in the slave interpreter used
    to compile type and widget definitions\. Thus, macros have access to all of
    the type and widget definition statements\. See [Macros and
    Meta\-programming](#subsection10) for more details\.

    The macro *name* cannot be the same as any standard Tcl command, or any
    Snit type or widget definition statement, e\.g\., you can't redefine the
    __[method](\.\./\.\./\.\./\.\./index\.md\#method)__ or __delegate__
    statements, or the standard __[set](\.\./\.\./\.\./\.\./index\.md\#set)__,
    __[list](\.\./\.\./\.\./\.\./index\.md\#list)__, or
    __[string](\.\./\.\./\.\./\.\./index\.md\#string)__ commands\.

  - <a name='36'></a>__snit::compile__ *which* *type* *body*

    Snit defines a type, widget, or widgetadaptor by "compiling" the definition
    into a Tcl script; this script is then evaluated in the Tcl interpreter,
    which actually defines the new type\.

    This command exposes the "compiler"\. Given a definition *body* for the
    named *type*, where *which* is __type__, __widget__, or
    __widgetadaptor__, __snit::compile__ returns a list of two elements\.
    The first element is the fully qualified type name; the second element is
    the definition script\.

    __snit::compile__ is useful when additional processing must be done on
    the Snit\-generated code\-\-if it must be instrumented, for example, or run
    through the TclDevKit compiler\. In addition, the returned script could be
    saved in a "\.tcl" file and used to define the type as part of an application
    or library, thus saving the compilation overhead at application start\-up\.
    Note that the same version of Snit must be used at run\-time as at
    compile\-time\.

## <a name='subsection2'></a>The Type Command

A type or widget definition creates a type command, which is used to create
instances of the type\. The type command has this form:

  - <a name='37'></a>__$type__ *typemethod* *args*\.\.\.

    The *typemethod* can be any of the [Standard Type
    Methods](#subsection3) \(e\.g\., __create__\), or any type method
    defined in the type definition\. The subsequent *args* depend on the
    specific *typemethod* chosen\.

    The type command is most often used to create new instances of the type;
    hence, the __create__ method is assumed if the first argument to the
    type command doesn't name a valid type method, unless the type definition
    includes __delegate typemethod \*__ or the __\-hasinstances__ pragma
    is set to false\.

    Furthermore, if the __\-hastypemethods__ pragma is false, then Snit type
    commands can be called with no arguments at all; in this case, the type
    command creates an instance with an automatically generated name\. In other
    words, provided that the __\-hastypemethods__ pragma is false and the
    type has instances, the following commands are equivalent:

        snit::type dog { ... }

        set mydog [dog create %AUTO%]
        set mydog [dog %AUTO%]
        set mydog [dog]

    This doesn't work for Snit widgets, for obvious reasons\.

    *Snit 1\.x Incompatibility:* In Snit 1\.x, the above behavior is available
    whether __\-hastypemethods__ is true \(the default\) or false\.

## <a name='subsection3'></a>Standard Type Methods

In addition to any type methods in the type's definition, all type and widget
commands will usually have at least the following subcommands:

  - <a name='38'></a>__$type__ __create__ *name* ?*option* *value* \.\.\.?

    Creates a new instance of the type, giving it the specified *name* and
    calling the type's constructor\.

    For __snit::type__s, if *name* is not a fully\-qualified command name,
    it is assumed to be a name in the namespace in which the call to
    __snit::type__ appears\. The method returns the fully\-qualified instance
    name\.

    For __snit::widget__s and __snit::widgetadaptor__s, *name* must be
    a valid widget name; the method returns the widget name\.

    So long as *name* does not conflict with any defined type method name the
    __create__ keyword may be omitted, unless the type definition includes
    __delegate typemethod \*__ or the __\-hasinstances__ pragma is set to
    false\.

    If the *name* includes the string __%AUTO%__, it will be replaced with
    the string __$type$counter__ where __$type__ is the type name and
    __$counter__ is a counter that increments each time __%AUTO%__ is
    used for this type\.

    By default, any arguments following the *name* will be a list of
    *option* names and their *value*s; however, a type's constructor can
    specify a different argument list\.

    As of Snit V0\.95, __create__ will throw an error if the *name* is the
    same as any existing command\-\-note that this was always true for
    __snit::widget__s and __snit::widgetadaptor__s\. You can restore the
    previous behavior using the __\-canreplace__ pragma\.

  - <a name='39'></a>__$type__ __info typevars__ ?*pattern*?

    Returns a list of the type's type variables \(excluding Snit internal
    variables\); all variable names are fully\-qualified\.

    If *pattern* is given, it's used as a __string match__ pattern; only
    names that match the pattern are returned\.

  - <a name='40'></a>__$type__ __info typemethods__ ?*pattern*?

    Returns a list of the names of the type's type methods\. If the type has
    hierarchical type methods, whether locally\-defined or delegated, only the
    first word of each will be included in the list\.

    If the type definition includes __delegate typemethod \*__, the list will
    include only the names of those implicitly delegated type methods that have
    been called at least once and are still in the type method cache\.

    If *pattern* is given, it's used as a __string match__ pattern; only
    names that match the pattern are returned\.

  - <a name='41'></a>__$type__ __info args__ *method*

    Returns a list containing the names of the arguments to the type's
    *method*, in order\. This method cannot be applied to delegated type
    methods\.

  - <a name='42'></a>__$type__ __info body__ *method*

    Returns the body of typemethod *method*\. This method cannot be applied to
    delegated type methods\.

  - <a name='43'></a>__$type__ __info default__ *method* *aname* *varname*

    Returns a boolean value indicating whether the argument *aname* of the
    type's *method* has a default value \(__true__\) or not \(__false__\)\.
    If the argument has a default its value is placed into the variable
    *varname*\.

  - <a name='44'></a>__$type__ __info instances__ ?*pattern*?

    Returns a list of the type's instances\. For __snit::type__s, it will be
    a list of fully\-qualified instance names; for __snit::widget__s, it will
    be a list of Tk widget names\.

    If *pattern* is given, it's used as a __string match__ pattern; only
    names that match the pattern are returned\.

    *Snit 1\.x Incompatibility:* In Snit 1\.x, the full multi\-word names of
    hierarchical type methods are included in the return value\.

  - <a name='45'></a>__$type__ __destroy__

    Destroys the type's instances, the type's namespace, and the type command
    itself\.

## <a name='subsection4'></a>The Instance Command

A Snit type or widget's __create__ type method creates objects of the type;
each object has a unique name that is also a Tcl command\. This command is used
to access the object's methods and data, and has this form:

  - <a name='46'></a>__$object__ *method* *args\.\.\.*

    The *method* can be any of the [Standard Instance
    Methods](#subsection5), or any instance method defined in the type
    definition\. The subsequent *args* depend on the specific *method*
    chosen\.

## <a name='subsection5'></a>Standard Instance Methods

In addition to any delegated or locally\-defined instance methods in the type's
definition, all Snit objects will have at least the following subcommands:

  - <a name='47'></a>__$object__ __configure__ ?*option*? ?*value*? \.\.\.

    Assigns new values to one or more options\. If called with one argument, an
    *option* name, returns a list describing the option, as Tk widgets do; if
    called with no arguments, returns a list of lists describing all options, as
    Tk widgets do\.

    Warning: This information will be available for delegated options only if
    the component to which they are delegated has a __configure__ method
    that returns this same kind of information\.

    Note: Snit defines this method only if the type has at least one option\.

  - <a name='48'></a>__$object__ __configurelist__ *optionlist*

    Like __configure__, but takes one argument, a list of options and their
    values\. It's mostly useful in the type constructor, but can be used
    anywhere\.

    Note: Snit defines this method only if the type has at least one option\.

  - <a name='49'></a>__$object__ __cget__ *option*

    Returns the option's value\.

    Note: Snit defines this method only if the type has at least one option\.

  - <a name='50'></a>__$object__ __destroy__

    Destroys the object, calling the __destructor__ and freeing all related
    memory\.

    *Note:* The __destroy__ method isn't defined for __snit::widget__
    or __snit::widgetadaptor__ objects; instances of these are destroyed by
    calling __[Tk](\.\./\.\./\.\./\.\./index\.md\#tk)__'s __destroy__ command,
    just as normal widgets are\.

  - <a name='51'></a>__$object__ __info type__

    Returns the instance's type\.

  - <a name='52'></a>__$object__ __info vars__ ?*pattern*?

    Returns a list of the object's instance variables \(excluding Snit internal
    variables\)\. The names are fully qualified\.

    If *pattern* is given, it's used as a __string match__ pattern; only
    names that match the pattern are returned\.

  - <a name='53'></a>__$object__ __info typevars__ ?*pattern*?

    Returns a list of the object's type's type variables \(excluding Snit
    internal variables\)\. The names are fully qualified\.

    If *pattern* is given, it's used as a __string match__ pattern; only
    names that match the pattern are returned\.

  - <a name='54'></a>__$object__ __info typemethods__ ?*pattern*?

    Returns a list of the names of the type's type methods\. If the type has
    hierarchical type methods, whether locally\-defined or delegated, only the
    first word of each will be included in the list\.

    If the type definition includes __delegate typemethod \*__, the list will
    include only the names of those implicitly delegated type methods that have
    been called at least once and are still in the type method cache\.

    If *pattern* is given, it's used as a __string match__ pattern; only
    names that match the pattern are returned\.

    *Snit 1\.x Incompatibility:* In Snit 1\.x, the full multi\-word names of
    hierarchical type methods are included in the return value\.

  - <a name='55'></a>__$object__ __info options__ ?*pattern*?

    Returns a list of the object's option names\. This always includes local
    options and explicitly delegated options\. If unknown options are delegated
    as well, and if the component to which they are delegated responds to
    __$object configure__ like Tk widgets do, then the result will include
    all possible unknown options that can be delegated to the component\.

    If *pattern* is given, it's used as a __string match__ pattern; only
    names that match the pattern are returned\.

    Note that the return value might be different for different instances of the
    same type, if component object types can vary from one instance to another\.

  - <a name='56'></a>__$object__ __info methods__ ?*pattern*?

    Returns a list of the names of the instance's methods\. If the type has
    hierarchical methods, whether locally\-defined or delegated, only the first
    word of each will be included in the list\.

    If the type definition includes __delegate method \*__, the list will
    include only the names of those implicitly delegated methods that have been
    called at least once and are still in the method cache\.

    If *pattern* is given, it's used as a __string match__ pattern; only
    names that match the pattern are returned\.

    *Snit 1\.x Incompatibility:* In Snit 1\.x, the full multi\-word names of
    hierarchical type methods are included in the return value\.

  - <a name='57'></a>__$object__ __info args__ *method*

    Returns a list containing the names of the arguments to the instance's
    *method*, in order\. This method cannot be applied to delegated methods\.

  - <a name='58'></a>__$object__ __info body__ *method*

    Returns the body of the instance's method *method*\. This method cannot be
    applied to delegated methods\.

  - <a name='59'></a>__$object__ __info default__ *method* *aname* *varname*

    Returns a boolean value indicating whether the argument *aname* of the
    instance's *method* has a default value \(__true__\) or not
    \(__false__\)\. If the argument has a default its value is placed into the
    variable *varname*\.

## <a name='subsection6'></a>Commands for use in Object Code

Snit defines the following commands for use in your object code: that is, for
use in type methods, instance methods, constructors, destructors, onconfigure
handlers, oncget handlers, and procs\. They do not reside in the ::snit::
namespace; instead, they are created with the type, and can be used without
qualification\.

  - <a name='60'></a>__mymethod__ *name* ?*args\.\.\.*?

    The __mymethod__ command is used for formatting callback commands to be
    passed to other objects\. It returns a command that when called will invoke
    method *name* with the specified arguments, plus of course any arguments
    added by the caller\. In other words, both of the following commands will
    cause the object's __dosomething__ method to be called when the
    __$button__ is pressed:

        $button configure -command [list $self dosomething myargument]

        $button configure -command [mymethod dosomething myargument]

    The chief distinction between the two is that the latter form will not break
    if the object's command is renamed\.

  - <a name='61'></a>__mytypemethod__ *name* ?*args\.\.\.*?

    The __mytypemethod__ command is used for formatting callback commands to
    be passed to other objects\. It returns a command that when called will
    invoke type method *name* with the specified arguments, plus of course any
    arguments added by the caller\. In other words, both of the following
    commands will cause the object's __dosomething__ type method to be
    called when __$button__ is pressed:

        $button configure -command [list $type dosomething myargument]

        $button configure -command [mytypemethod dosomething myargument]

    Type commands cannot be renamed, so in practice there's little difference
    between the two forms\. __mytypemethod__ is provided for parallelism with
    __mymethod__\.

  - <a name='62'></a>__myproc__ *name* ?*args\.\.\.*?

    The __myproc__ command is used for formatting callback commands to be
    passed to other objects\. It returns a command that when called will invoke
    the type proc *name* with the specified arguments, plus of course any
    arguments added by the caller\. In other words, both of the following
    commands will cause the object's __dosomething__ proc to be called when
    __$button__ is pressed:

        $button configure -command [list ${type}::dosomething myargument]

        $button configure -command [myproc dosomething myargument]

  - <a name='63'></a>__myvar__ *name*

    Given an instance variable name, returns the fully qualified name\. Use this
    if you're passing the variable to some other object, e\.g\., as a
    __\-textvariable__ to a Tk label widget\.

  - <a name='64'></a>__mytypevar__ *name*

    Given an type variable name, returns the fully qualified name\. Use this if
    you're passing the variable to some other object, e\.g\., as a
    __\-textvariable__ to a Tk label widget\.

  - <a name='65'></a>__from__ *argvName* *option* ?*defvalue*?

    The __from__ command plucks an option value from a list of options and
    their values, such as is passed into a type's __constructor__\.
    *argvName* must be the name of a variable containing such a list;
    *option* is the name of the specific option\.

    __from__ looks for *option* in the option list\. If it is found, it and
    its value are removed from the list, and the value is returned\. If
    *option* doesn't appear in the list, then the *defvalue* is returned\. If
    the option is locally\-defined option, and *defvalue* is not specified,
    then the option's default value as specified in the type definition will be
    returned instead\.

  - <a name='66'></a>__install__ *compName* __using__ *objType* *objName* *args\.\.\.*

    Creates a new object of type *objType* called *objName* and installs it
    as component *compName*, as described in [Components and
    Delegation](#subsection7)\. Any additional *args\.\.\.* are passed along
    with the name to the *objType* command\. If this is a __snit::type__,
    then the following two commands are equivalent:

        install myComp using myObjType $self.myComp args...

        set myComp [myObjType $self.myComp args...]

    Note that whichever method is used, *compName* must still be declared in
    the type definition using __component__, or must be referenced in at
    least one __delegate__ statement\.

    If this is a __snit::widget__ or __snit::widgetadaptor__, and if
    options have been delegated to component *compName*, then those options
    will receive default values from the Tk option database\. Note that it
    doesn't matter whether the component to be installed is a widget or not\. See
    [The Tk Option Database](#subsection9) for more information\.

    __install__ cannot be used to install type components; just assign the
    type component's command name to the type component's variable instead\.

  - <a name='67'></a>__installhull__ __using__ *widgetType* *args\.\.\.*

  - <a name='68'></a>__installhull__ *name*

    The constructor of a __snit::widgetadaptor__ must create a widget to be
    the object's hull component; the widget is installed as the hull component
    using this command\. Note that the installed widget's name must be
    __$win__\. This command has two forms\.

    The first form specifies the *widgetType* and the *args\.\.\.* \(that is,
    the hardcoded option list\) to use in creating the hull\. Given this form,
    __installhull__ creates the hull widget, and initializes any options
    delegated to the hull from the Tk option database\.

    In the second form, the hull widget has already been created; note that its
    name must be "$win"\. In this case, the Tk option database is *not* queried
    for any options delegated to the hull\. The longer form is preferred;
    however, the shorter form allows the programmer to adapt a widget created
    elsewhere, which is sometimes useful\. For example, it can be used to adapt a
    "page" widget created by a __BWidgets__ tabbed notebook or pages manager
    widget\.

    See [The Tk Option Database](#subsection9) for more information about
    __snit::widgetadaptor__s and the option database\.

  - <a name='69'></a>__variable__ *name*

    Normally, instance variables are defined in the type definition along with
    the options, methods, and so forth; such instance variables are
    automatically visible in all instance code \(e\.g\., method bodies\)\. However,
    instance code can use the __variable__ command to declare instance
    variables that don't appear in the type definition, and also to bring
    variables from other namespaces into scope in the usual way\.

    It's generally clearest to define all instance variables in the type
    definition, and omit declaring them in methods and so forth\.

    Note that this is an instance\-specific version of the standard Tcl
    __::variable__ command\.

  - <a name='70'></a>__typevariable__ *name*

    Normally, type variables are defined in the type definition, along with the
    instance variables; such type variables are automatically visible in all of
    the type's code\. However, type methods, instance methods and so forth can
    use __typevariable__ to declare type variables that don't appear in the
    type definition\.

    It's generally clearest to declare all type variables in the type
    definition, and omit declaring them in methods, type methods, etc\.

  - <a name='71'></a>__varname__ *name*

    __Deprecated\.__ Use __myvar__ instead\.

    Given an instance variable name, returns the fully qualified name\. Use this
    if you're passing the variable to some other object, e\.g\., as a
    __\-textvariable__ to a Tk label widget\.

  - <a name='72'></a>__typevarname__ *name*

    __Deprecated\.__ Use __mytypevar__ instead\.

    Given a type variable name, returns the fully qualified name\. Use this if
    you're passing the type variable to some other object, e\.g\., as a
    __\-textvariable__ to a Tk label widget\.

  - <a name='73'></a>__codename__ *name*

    __Deprecated\.__ Use __myproc__ instead\. Given the name of a proc
    \(but not a type or instance method\), returns the fully\-qualified command
    name, suitable for passing as a callback\.

## <a name='subsection7'></a>Components and Delegation

When an object includes other objects, as when a toolbar contains buttons or a
GUI object contains an object that references a database, the included object is
called a component\. The standard way to handle component objects owned by a Snit
object is to declare them using __component__, which creates a component
instance variable\. In the following example, a __dog__ object has a
__tail__ object:

    snit::type dog {
        component mytail

        constructor {args} {
            set mytail [tail %AUTO% -partof $self]
            $self configurelist $args
        }

        method wag {} {
            $mytail wag
        }
    }

    snit::type tail {
        option -length 5
        option -partof
        method wag {} { return "Wag, wag, wag."}
    }

Because the __tail__ object's name is stored in an instance variable, it's
easily accessible in any method\.

The __install__ command provides an alternate way to create and install the
component:

    snit::type dog {
        component mytail

        constructor {args} {
            install mytail using tail %AUTO% -partof $self
            $self configurelist $args
        }

        method wag {} {
            $mytail wag
        }
    }

For __snit::type__s, the two methods are equivalent; for
__snit::widget__s and __snit::widgetadaptor__s, the __install__
command properly initializes the widget's options by querying [The Tk Option
Database](#subsection9)\.

In the above examples, the __dog__ object's __wag__ method simply calls
the __tail__ component's __wag__ method\. In OO jargon, this is called
delegation\. Snit provides an easier way to do this:

    snit::type dog {
        delegate method wag to mytail

        constructor {args} {
            install mytail using tail %AUTO% -partof $self
            $self configurelist $args
        }
    }

The __delegate__ statement in the type definition implicitly defines the
instance variable __mytail__ to hold the component's name \(though it's good
form to use __component__ to declare it explicitly\); it also defines the
__dog__ object's __wag__ method, delegating it to the __mytail__
component\.

If desired, all otherwise unknown methods can be delegated to a specific
component:

        snit::type dog {
    	delegate method * to mytail

    	constructor {args} {
    	    set mytail [tail %AUTO% -partof $self]
    	    $self configurelist $args
    	}

    	method bark { return "Bark, bark, bark!" }
        }

In this case, a __dog__ object will handle its own __bark__ method; but
__wag__ will be passed along to __mytail__\. Any other method, being
recognized by neither __dog__ nor __tail__, will simply raise an error\.

Option delegation is similar to method delegation, except for the interactions
with the Tk option database; this is described in [The Tk Option
Database](#subsection9)\.

## <a name='subsection8'></a>Type Components and Delegation

The relationship between type components and instance components is identical to
that between type variables and instance variables, and that between type
methods and instance methods\. Just as an instance component is an instance
variable that holds the name of a command, so a type component is a type
variable that holds the name of a command\. In essence, a type component is a
component that's shared by every instance of the type\.

Just as __delegate method__ can be used to delegate methods to instance
components, as described in [Components and Delegation](#subsection7), so
__delegate typemethod__ can be used to delegate type methods to type
components\.

Note also that as of Snit 0\.95 __delegate method__ can delegate methods to
both instance components and type components\.

## <a name='subsection9'></a>The Tk Option Database

This section describes how Snit interacts with the Tk option database, and
assumes the reader has a working knowledge of the option database and its uses\.
The book *Practical Programming in Tcl and Tk* by Welch et al has a good
introduction to the option database, as does *Effective Tcl/Tk Programming*\.

Snit is implemented so that most of the time it will simply do the right thing
with respect to the option database, provided that the widget developer does the
right thing by Snit\. The body of this section goes into great deal about what
Snit requires\. The following is a brief statement of the requirements, for
reference\.

  - If the __snit::widget__'s default widget class is not what is desired,
    set it explicitly using __widgetclass__ in the widget definition\.

  - When defining or delegating options, specify the resource and class names
    explicitly when if the defaults aren't what you want\.

  - Use __installhull using__ to install the hull for
    __snit::widgetadaptor__s\.

  - Use __install__ to install all other components\.

The interaction of Tk widgets with the option database is a complex thing; the
interaction of Snit with the option database is even more so, and repays
attention to detail\.

__Setting the widget class:__ Every Tk widget has a widget class\. For Tk
widgets, the widget class name is the just the widget type name with an initial
capital letter, e\.g\., the widget class for __button__ widgets is "Button"\.

Similarly, the widget class of a __snit::widget__ defaults to the
unqualified type name with the first letter capitalized\. For example, the widget
class of

    snit::widget ::mylibrary::scrolledText { ... }

is "ScrolledText"\. The widget class can also be set explicitly using the
__widgetclass__ statement within the __snit::widget__ definition\.

Any widget can be used as the __hulltype__ provided that it supports the
__\-class__ option for changing its widget class name\. See the discussion of
the __hulltype__ command, above\. The user may pass __\-class__ to the
widget at instantion\.

The widget class of a __snit::widgetadaptor__ is just the widget class of
its hull widget; this cannot be changed unless the hull widget supports
__\-class__, in which case it will usually make more sense to use
__snit::widget__ rather than __snit::widgetadaptor__\.

__Setting option resource names and classes:__ In Tk, every option has three
names: the option name, the resource name, and the class name\. The option name
begins with a hyphen and is all lowercase; it's used when creating widgets, and
with the __configure__ and __cget__ commands\.

The resource and class names are used to initialize option default values by
querying the Tk option database\. The resource name is usually just the option
name minus the hyphen, but may contain uppercase letters at word boundaries; the
class name is usually just the resource name with an initial capital, but not
always\. For example, here are the option, resource, and class names for several
__[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget options:

    -background         background         Background
    -borderwidth        borderWidth        BorderWidth
    -insertborderwidth  insertBorderWidth  BorderWidth
    -padx               padX               Pad

As is easily seen, sometimes the resource and class names can be inferred from
the option name, but not always\.

Snit options also have a resource name and a class name\. By default, these names
follow the rule given above: the resource name is the option name without the
hyphen, and the class name is the resource name with an initial capital\. This is
true for both locally\-defined options and explicitly delegated options:

        snit::widget mywidget {
            option -background
            delegate option -borderwidth to hull
            delegate option * to text
    	# ...
        }

In this case, the widget class name is "Mywidget"\. The widget has the following
options: __\-background__, which is locally defined, and
__\-borderwidth__, which is explicitly delegated; all other widgets are
delegated to a component called "text", which is probably a Tk
__[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget\. If so, __mywidget__
has all the same options as a __[text](\.\./\.\./\.\./\.\./index\.md\#text)__
widget\. The option, resource, and class names are as follows:

    -background  background  Background
    -borderwidth borderwidth Borderwidth
    -padx        padX        Pad

Note that the locally defined option, __\-background__, happens to have the
same three names as the standard Tk __\-background__ option; and
__\-pad__, which is delegated implicitly to the __text__ component, has
the same three names for __mywidget__ as it does for the
__[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget\. __\-borderwidth__, on
the other hand, has different resource and class names than usual, because the
internal word "width" isn't capitalized\. For consistency, it should be; this is
done as follows:

        snit::widget mywidget {
    	option -background
    	delegate option {-borderwidth borderWidth} to hull
    	delegate option * to text
    	# ...
        }

The class name will default to "BorderWidth", as expected\.

Suppose, however, that __mywidget__ also delegated __\-padx__ and
__\-pady__ to the hull\. In this case, both the resource name and the class
name must be specified explicitly:

        snit::widget mywidget {
    	option -background
    	delegate option {-borderwidth borderWidth} to hull
    	delegate option {-padx padX Pad} to hull
    	delegate option {-pady padY Pad} to hull
    	delegate option * to text
    	# ...
        }

__Querying the option database:__ If you set your widgetclass and option
names as described above, Snit will query the option database when each instance
is created, and will generally do the right thing when it comes to querying the
option database\. The remainder of this section goes into the gory details\.

__Initializing locally defined options:__ When an instance of a snit::widget
is created, its locally defined options are initialized as follows: each
option's resource and class names are used to query the Tk option database\. If
the result is non\-empty, it is used as the option's default; otherwise, the
default hardcoded in the type definition is used\. In either case, the default
can be overridden by the caller\. For example,

        option add *Mywidget.texture pebbled

        snit::widget mywidget {
    	option -texture smooth
    	# ...
        }

        mywidget .mywidget -texture greasy

Here, __\-texture__ would normally default to "smooth", but because of the
entry added to the option database it defaults to "pebbled"\. However, the caller
has explicitly overridden the default, and so the new widget will be "greasy"\.

__Initializing options delegated to the hull:__ A __snit::widget__'s
hull is a widget, and given that its class has been set it is expected to query
the option database for itself\. The only exception concerns options that are
delegated to it with a different name\. Consider the following code:

        option add *Mywidget.borderWidth 5
        option add *Mywidget.relief sunken
        option add *Mywidget.hullbackground red
        option add *Mywidget.background green

        snit::widget mywidget {
    	delegate option -borderwidth to hull
    	delegate option -hullbackground to hull as -background
    	delegate option * to hull
    	# ...
        }

        mywidget .mywidget

        set A [.mywidget cget -relief]
        set B [.mywidget cget -hullbackground]
        set C [.mywidget cget -background]
        set D [.mywidget cget -borderwidth]

The question is, what are the values of variables A, B, C and D?

The value of A is "sunken"\. The hull is a Tk frame that has been given the
widget class "Mywidget"; it will automatically query the option database and
pick up this value\. Since the __\-relief__ option is implicitly delegated to
the hull, Snit takes no action\.

The value of B is "red"\. The hull will automatically pick up the value "green"
for its __\-background__ option, just as it picked up the __\-relief__
value\. However, Snit knows that __\-hullbackground__ is mapped to the hull's
__\-background__ option; hence, it queries the option database for
__\-hullbackground__ and gets "red" and updates the hull accordingly\.

The value of C is also "red", because __\-background__ is implicitly
delegated to the hull; thus, retrieving it is the same as retrieving
__\-hullbackground__\. Note that this case is unusual; in practice,
__\-background__ would probably be explicitly delegated to some other
component\.

The value of D is "5", but not for the reason you think\. Note that as it is
defined above, the resource name for __\-borderwidth__ defaults to
"borderwidth", whereas the option database entry is "borderWidth"\. As with
__\-relief__, the hull picks up its own __\-borderwidth__ option before
Snit does anything\. Because the option is delegated under its own name, Snit
assumes that the correct thing has happened, and doesn't worry about it any
further\.

For __snit::widgetadaptor__s, the case is somewhat altered\. Widget adaptors
retain the widget class of their hull, and the hull is not created automatically
by Snit\. Instead, the __snit::widgetadaptor__ must call __installhull__
in its constructor\. The normal way to do this is as follows:

        snit::widgetadaptor mywidget {
    	# ...
    	constructor {args} {
    	    # ...
    	    installhull using text -foreground white
    	    #
    	}
    	#...
        }

In this case, the __installhull__ command will create the hull using a
command like this:

    set hull [text $win -foreground white]

The hull is a __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget, so its
widget class is "Text"\. Just as with __snit::widget__ hulls, Snit assumes
that it will pick up all of its normal option values automatically; options
delegated from a different name are initialized from the option database in the
same way\.

__Initializing options delegated to other components:__ Non\-hull components
are matched against the option database in two ways\. First, a component widget
remains a widget still, and therefore is initialized from the option database in
the usual way\. Second, the option database is queried for all options delegated
to the component, and the component is initialized accordingly\-\-provided that
the __install__ command is used to create it\.

Before option database support was added to Snit, the usual way to create a
component was to simply create it in the constructor and assign its command name
to the component variable:

        snit::widget mywidget {
    	delegate option -background to myComp

    	constructor {args} {
    	    set myComp [text $win.text -foreground black]
    	}
        }

The drawback of this method is that Snit has no opportunity to initialize the
component properly\. Hence, the following approach is now used:

        snit::widget mywidget {
    	delegate option -background to myComp

    	constructor {args} {
    	    install myComp using text $win.text -foreground black
    	}
        }

The __install__ command does the following:

  - Builds a list of the options explicitly included in the __install__
    command \-\- in this case, __\-foreground__\.

  - Queries the option database for all options delegated explicitly to the
    named component\.

  - Creates the component using the specified command, after inserting into it a
    list of options and values read from the option database\. Thus, the
    explicitly included options \(__\-foreground__\) will override anything
    read from the option database\.

  - If the widget definition implicitly delegated options to the component using
    __delegate option \*__, then Snit calls the newly created component's
    __configure__ method to receive a list of all of the component's
    options\. From this Snit builds a list of options implicitly delegated to the
    component that were not explicitly included in the __install__ command\.
    For all such options, Snit queries the option database and configures the
    component accordingly\.

__Non\-widget components:__ The option database is never queried for
__snit::type__s, since it can only be queried given a Tk widget name\.
However, __snit::widget__s can have non\-widget components\. And if options
are delegated to those components, and if the __install__ command is used to
install those components, then they will be initialized from the option database
just as widget components are\.

## <a name='subsection10'></a>Macros and Meta\-programming

The __snit::macro__ command enables a certain amount of meta\-programming
with Snit classes\. For example, suppose you like to define properties: instance
variables that have set/get methods\. Your code might look like this:

    snit::type dog {
        variable mood happy

        method getmood {} {
            return $mood
        }

        method setmood {newmood} {
            set mood $newmood
        }
    }

That's nine lines of text per property\. Or, you could define the following
__snit::macro__:

    snit::macro property {name initValue} {
        variable $name $initValue

        method get$name {} "return $name"

        method set$name {value} "set $name \$value"
    }

Note that a __snit::macro__ is just a normal Tcl proc defined in the slave
interpreter used to compile type and widget definitions; as a result, it has
access to all the commands used to define types and widgets\.

Given this new macro, you can define a property in one line of code:

    snit::type dog {
        property mood happy
    }

Within a macro, the commands __variable__ and
__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ refer to the Snit type\-definition
commands, not the standard Tcl commands\. To get the standard Tcl commands, use
__\_variable__ and __\_proc__\.

Because a single slave interpreter is used for compiling all Snit types and
widgets in the application, there's the possibility of macro name collisions\. If
you're writing a reuseable package using Snit, and you use some
__snit::macro__s, define them in your package namespace:

    snit::macro mypkg::property {name initValue} { ... }

    snit::type dog {
        mypkg::property mood happy
    }

This leaves the global namespace open for application authors\.

## <a name='subsection11'></a>Validation Types

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__ is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    snit::integer validate 5     ;# Does nothing
    snit::integer validate 5.0   ;# Throws an error (not an integer!)

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error\.

Snit defines a family of validation types, all of which are implemented as
__snit::type__'s\. They can be used as is; in addition, their instances serve
as parameterized subtypes\. For example, a probability is a number between 0\.0
and 1\.0 inclusive:

    snit::double probability -min 0.0 -max 1.0

The example above creates an instance of __snit::double__\-\-a validation
subtype\-\-called __probability__, which can be used to validate probability
values:

    probability validate 0.5   ;# Does nothing
    probability validate 7.9   ;# Throws an error

Validation subtypes can be defined explicitly, as in the above example; when a
locally\-defined option's __\-type__ is specified, they may also be created on
the fly:

    snit::enum ::dog::breed -values {mutt retriever sheepdog}

    snit::type dog {
        # Define subtypes on the fly...
        option -breed -type {
            snit::enum -values {mutt retriever sheepdog}
        }

        # Or use predefined subtypes...
        option -breed -type ::dog::breed
    }

Any object that has a __validate__ method with the semantics described above
can be used as a validation type; see [Defining Validation
Types](#subsection12) for information on how to define new ones\.

Snit defines the following validation types:

  - <a name='74'></a>__snit::boolean__ __validate__ ?*value*?

  - <a name='75'></a>__snit::boolean__ *name*

    Validates Tcl boolean values: 1, 0, __on__, __off__, __yes__,
    __no__, __true__, __false__\. It's possible to define
    subtypes\-\-that is, instances\-\-of __snit::boolean__, but as it has no
    options there's no reason to do so\.

  - <a name='76'></a>__snit::double__ __validate__ ?*value*?

  - <a name='77'></a>__snit::double__ *name* ?*option* *value*\.\.\.?

    Validates floating\-point values\. Subtypes may be created with the following
    options:

      * __\-min__ *min*

        Specifies a floating\-point minimum bound; a value is invalid if it is
        strictly less than *min*\.

      * __\-max__ *max*

        Specifies a floating\-point maximum bound; a value is invalid if it is
        strictly greater than *max*\.

  - <a name='78'></a>__snit::enum__ __validate__ ?*value*?

  - <a name='79'></a>__snit::enum__ *name* ?*option* *value*\.\.\.?

    Validates that a value comes from an enumerated list\. The base type is of
    little use by itself, as only subtypes actually have an enumerated list to
    validate against\. Subtypes may be created with the following options:

      * __\-values__ *list*

        Specifies a list of valid values\. A value is valid if and only if it's
        included in the list\.

  - <a name='80'></a>__snit::fpixels__ __validate__ ?*value*?

  - <a name='81'></a>__snit::fpixels__ *name* ?*option* *value*\.\.\.?

    *Tk programs only\.* Validates screen distances, in any of the forms
    accepted by __winfo fpixels__\. Subtypes may be created with the
    following options:

      * __\-min__ *min*

        Specifies a minimum bound; a value is invalid if it is strictly less
        than *min*\. The bound may be expressed in any of the forms accepted by
        __winfo fpixels__\.

      * __\-max__ *max*

        Specifies a maximum bound; a value is invalid if it is strictly greater
        than *max*\. The bound may be expressed in any of the forms accepted by
        __winfo fpixels__\.

  - <a name='82'></a>__snit::integer__ __validate__ ?*value*?

  - <a name='83'></a>__snit::integer__ *name* ?*option* *value*\.\.\.?

    Validates integer values\. Subtypes may be created with the following
    options:

      * __\-min__ *min*

        Specifies an integer minimum bound; a value is invalid if it is strictly
        less than *min*\.

      * __\-max__ *max*

        Specifies an integer maximum bound; a value is invalid if it is strictly
        greater than *max*\.

  - <a name='84'></a>__snit::listtype__ __validate__ ?*value*?

  - <a name='85'></a>__snit::listtype__ *name* ?*option* *value*\.\.\.?

    Validates Tcl lists\. Subtypes may be created with the following options:

      * __\-minlen__ *min*

        Specifies a minimum list length; the value is invalid if it has fewer
        than *min* elements\. Defaults to 0\.

      * __\-maxlen__ *max*

        Specifies a maximum list length; the value is invalid if it more than
        *max* elements\.

      * __\-type__ *type*

        Specifies the type of the list elements; *type* must be the name of a
        validation type or subtype\. In the following example, the value of
        __\-numbers__ must be a list of integers\.

    option -numbers -type {snit::listtype -type snit::integer}

        Note that this option doesn't support defining new validation subtypes
        on the fly; that is, the following code will not work \(yet, anyway\):

    option -numbers -type {
        snit::listtype -type {snit::integer -min 5}
    }

        Instead, define the subtype explicitly:

    snit::integer gt4 -min 5

    snit::type mytype {
        option -numbers -type {snit::listtype -type gt4}
    }

  - <a name='86'></a>__snit::pixels__ __validate__ ?*value*?

  - <a name='87'></a>__snit::pixels__ *name* ?*option* *value*\.\.\.?

    *Tk programs only\.* Validates screen distances, in any of the forms
    accepted by __winfo pixels__\. Subtypes may be created with the following
    options:

      * __\-min__ *min*

        Specifies a minimum bound; a value is invalid if it is strictly less
        than *min*\. The bound may be expressed in any of the forms accepted by
        __winfo pixels__\.

      * __\-max__ *max*

        Specifies a maximum bound; a value is invalid if it is strictly greater
        than *max*\. The bound may be expressed in any of the forms accepted by
        __winfo pixels__\.

  - <a name='88'></a>__snit::stringtype__ __validate__ ?*value*?

  - <a name='89'></a>__snit::stringtype__ *name* ?*option* *value*\.\.\.?

    Validates Tcl strings\. The base type is of little use by itself, since very
    Tcl value is also a valid string\. Subtypes may be created with the following
    options:

      * __\-minlen__ *min*

        Specifies a minimum string length; the value is invalid if it has fewer
        than *min* characters\. Defaults to 0\.

      * __\-maxlen__ *max*

        Specifies a maximum string length; the value is invalid if it has more
        than *max* characters\.

      * __\-glob__ *pattern*

        Specifies a __string match__ pattern; the value is invalid if it
        doesn't match the pattern\.

      * __\-regexp__ *regexp*

        Specifies a regular expression; the value is invalid if it doesn't match
        the regular expression\.

      * __\-nocase__ *flag*

        By default, both __\-glob__ and __\-regexp__ matches are
        case\-sensitive\. If __\-nocase__ is set to true, then both
        __\-glob__ and __\-regexp__ matches are case\-insensitive\.

  - <a name='90'></a>__snit::window__ __validate__ ?*value*?

  - <a name='91'></a>__snit::window__ *name*

    *Tk programs only\.* Validates Tk window names\. The value must cause
    __winfo exists__ to return true; otherwise, the value is invalid\. It's
    possible to define subtypes\-\-that is, instances\-\-of __snit::window__,
    but as it has no options at present there's no reason to do so\.

## <a name='subsection12'></a>Defining Validation Types

There are three ways to define a new validation type: as a subtype of one of
Snit's validation types, as a validation type command, and as a full\-fledged
validation type similar to those provided by Snit\. Defining subtypes of Snit's
validation types is described above, under [Validation
Types](#subsection11)\.

The next simplest way to create a new validation type is as a validation type
command\. A validation type is simply an object that has a __validate__
method; the __validate__ method must take one argument, a value, return the
value if it is valid, and throw an error with __\-errorcode__ INVALID if the
value is invalid\. This can be done with a simple
__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__\. For example, the
__snit::boolean__ validate type could have been implemented like this:

    proc ::snit::boolean {"validate" value} {
        if {![string is boolean -strict $value]} {
            return -code error -errorcode INVALID  "invalid boolean \"$value\", should be one of: 1, 0, ..."
        }

        return $value
    }

A validation type defined in this way cannot be subtyped, of course; but for
many applications this will be sufficient\.

Finally, one can define a full\-fledged, subtype\-able validation type as a
__snit::type__\. Here's a skeleton to get you started:

    snit::type myinteger {
        # First, define any options you'd like to use to define
        # subtypes.  Give them defaults such that they won't take
        # effect if they aren't used, and marked them "read-only".
        # After all, you shouldn't be changing their values after
        # a subtype is defined.
        #
        # For example:

        option -min -default "" -readonly 1
        option -max -default "" -readonly 1

        # Next, define a "validate" type method which should do the
        # validation in the basic case.  This will allow the
        # type command to be used as a validation type.

        typemethod validate {value} {
            if {![string is integer -strict $value]} {
                return -code error -errorcode INVALID  "invalid value \"$value\", expected integer"
            }

            return $value
        }

        # Next, the constructor should validate the subtype options,
        # if any.  Since they are all readonly, we don't need to worry
        # about validating the options on change.

        constructor {args} {
            # FIRST, get the options
            $self configurelist $args

            # NEXT, validate them.

            # I'll leave this to your imagination.
        }

        # Next, define a "validate" instance method; its job is to
        # validate values for subtypes.

        method validate {value} {
            # First, call the type method to do the basic validation.
            $type validate $value

            # Now we know it's a valid integer.

            if {("" != $options(-min) && $value < $options(-min))  ||
                ("" != $options(-max) && $value > $options(-max))} {
                # It's out of range; format a detailed message about
                # the error, and throw it.

                set msg "...."

                return -code error -errorcode INVALID $msg
            }

            # Otherwise, if it's valid just return it.
            return $valid
        }
    }

And now you have a type that can be subtyped\.

The file "validate\.tcl" in the Snit distribution defines all of Snit's
validation types; you can find the complete implementation for
__snit::integer__ and the other types there, to use as examples for your own
types\.

# <a name='section4'></a>CAVEATS

If you have problems, find bugs, or new ideas you are hereby cordially invited
to submit a report of your problem, bug, or idea as explained in the section
[Bugs, Ideas, Feedback](#section8) below\.

Additionally, you might wish to join the Snit mailing list; see
[http://www\.wjduquette\.com/snit](http://www\.wjduquette\.com/snit) for
details\.

One particular area to watch is using __snit::widgetadaptor__ to adapt
megawidgets created by other megawidget packages; correct widget destruction
depends on the order of the <Destroy> bindings\. The wisest course is simply not
to do this\.

# <a name='section5'></a>KNOWN BUGS

  - Error stack traces returned by Snit 1\.x are extremely ugly and typically
    contain far too much information about Snit internals\. The error messages
    are much improved in Snit 2\.2\.

  - Also see the Project Trackers as explained in the section [Bugs, Ideas,
    Feedback](#section8) below\.

# <a name='section6'></a>HISTORY

During the course of developing Notebook \(See
[http://www\.wjduquette\.com/notebook](http://www\.wjduquette\.com/notebook)\),
my Tcl\-based personal notebook application, I found I was writing it as a
collection of objects\. I wasn't using any particular object\-oriented framework;
I was just writing objects in pure Tcl following the guidelines in my Guide to
Object Commands \(see
[http://www\.wjduquette\.com/tcl/objects\.html](http://www\.wjduquette\.com/tcl/objects\.html)\),
along with a few other tricks I'd picked up since\. And though it was working
well, it quickly became tiresome because of the amount of boilerplate code
associated with each new object type\.

So that was one thing\-\-tedium is a powerful motivator\. But the other thing I
noticed is that I wasn't using inheritance at all, and I wasn't missing it\.
Instead, I was using delegation: objects that created other objects and
delegated methods to them\.

And I said to myself, "This is getting tedious\.\.\.there has got to be a better
way\." And one afternoon, on a whim, I started working on Snit, an object system
that works the way Tcl works\. Snit doesn't support inheritance, but it's great
at delegation, and it makes creating megawidgets easy\.

If you have any comments or suggestions \(or bug reports\!\) don't hesitate to send
me e\-mail at [will@wjduquette\.com](will@wjduquette\.com)\. In addition,
there's a Snit mailing list; you can find out more about it at the Snit home
page \(see [http://www\.wjduquette\.com/snit](http://www\.wjduquette\.com/snit)\)\.

# <a name='section7'></a>CREDITS

Snit has been designed and implemented from the very beginning by William H\.
Duquette\. However, much credit belongs to the following people for using Snit
and providing me with valuable feedback: Rolf Ade, Colin McCormack, Jose
Nazario, Jeff Godfrey, Maurice Diamanti, Egon Pasztor, David S\. Cargo, Tom
Krehbiel, Michael Cleverly, Andreas Kupries, Marty Backe, Andy Goth, Jeff Hobbs,
Brian Griffin, Donal Fellows, Miguel Sofer, Kenneth Green, and Anton Kovalenko\.
If I've forgotten anyone, my apologies; let me know and I'll add your name to
the list\.

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *snit* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[BWidget](\.\./\.\./\.\./\.\./index\.md\#bwidget), [C\+\+](\.\./\.\./\.\./\.\./index\.md\#c\_),
[Incr Tcl](\.\./\.\./\.\./\.\./index\.md\#incr\_tcl),
[Snit](\.\./\.\./\.\./\.\./index\.md\#snit),
[adaptors](\.\./\.\./\.\./\.\./index\.md\#adaptors),
[class](\.\./\.\./\.\./\.\./index\.md\#class), [mega
widget](\.\./\.\./\.\./\.\./index\.md\#mega\_widget),
[object](\.\./\.\./\.\./\.\./index\.md\#object), [object
oriented](\.\./\.\./\.\./\.\./index\.md\#object\_oriented),
[type](\.\./\.\./\.\./\.\./index\.md\#type),
[widget](\.\./\.\./\.\./\.\./index\.md\#widget), [widget
adaptors](\.\./\.\./\.\./\.\./index\.md\#widget\_adaptors)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003\-2009, by William H\. Duquette
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/snit/snitfaq.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758

[//000000001]: # (snitfaq \- Snit's Not Incr Tcl, OO system)
[//000000002]: # (Generated from file 'snitfaq\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003\-2006, by William H\. Duquette)
[//000000004]: # (snitfaq\(n\) 2\.2 tcllib "Snit's Not Incr Tcl, OO system")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

snitfaq \- Snit Frequently Asked Questions

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [OVERVIEW](#section2)

      - [What is this document?](#subsection1)

      - [What is Snit?](#subsection2)

      - [What version of Tcl does Snit require?](#subsection3)

      - [Where can I download Snit?](#subsection4)

      - [What are Snit's goals?](#subsection5)

      - [How is Snit different from other OO frameworks?](#subsection6)

      - [What can I do with Snit?](#subsection7)

  - [SNIT VERSIONS](#section3)

      - [Which version of Snit should I use?](#subsection8)

      - [How do I select the version of Snit I want to use?](#subsection9)

      - [How are Snit 1\.3 and Snit 2\.2 incompatible?](#subsection10)

      - [Are there other differences between Snit 1\.x and Snit
        2\.2?](#subsection11)

  - [OBJECTS](#section4)

      - [What is an object?](#subsection12)

      - [What is an abstract data type?](#subsection13)

      - [What kinds of abstract data types does Snit
        provide?](#subsection14)

      - [What is a snit::type?](#subsection15)

      - [What is a snit::widget?, the short story](#subsection16)

      - [What is a snit::widgetadaptor?, the short story](#subsection17)

      - [How do I create an instance of a snit::type?](#subsection18)

      - [How do I refer to an object indirectly?](#subsection19)

      - [How can I generate the object name automatically?](#subsection20)

      - [Can types be renamed?](#subsection21)

      - [Can objects be renamed?](#subsection22)

      - [How do I destroy a Snit object?](#subsection23)

  - [INSTANCE METHODS](#section5)

      - [What is an instance method?](#subsection24)

      - [How do I define an instance method?](#subsection25)

      - [How does a client call an instance method?](#subsection26)

      - [How does an instance method call another instance
        method?](#subsection27)

      - [Are there any limitations on instance method
        names?](#subsection28)

      - [What is a hierarchical method?](#subsection29)

      - [How do I define a hierarchical method?](#subsection30)

      - [How do I call hierarchical methods?](#subsection31)

      - [How do I make an instance method private?](#subsection32)

      - [Are there any limitations on instance method
        arguments?](#subsection33)

      - [What implicit arguments are passed to each instance
        method?](#subsection34)

      - [What is $type?](#subsection35)

      - [What is $self?](#subsection36)

      - [What is $selfns?](#subsection37)

      - [What is $win?](#subsection38)

      - [How do I pass an instance method as a callback?](#subsection39)

      - [How do I delegate instance methods to a component?](#subsection40)

  - [INSTANCE VARIABLES](#section6)

      - [What is an instance variable?](#subsection41)

      - [How is a scalar instance variable defined?](#subsection42)

      - [How is an array instance variable defined?](#subsection43)

      - [What happens if I don't initialize an instance
        variable?](#subsection44)

      - [Are there any limitations on instance variable
        names?](#subsection45)

      - [Do I need to declare my instance variables in my
        methods?](#subsection46)

      - [How do I pass an instance variable's name to another
        object?](#subsection47)

      - [How do I make an instance variable public?](#subsection48)

  - [OPTIONS](#section7)

      - [What is an option?](#subsection49)

      - [How do I define an option?](#subsection50)

      - [How can a client set options at object creation?](#subsection51)

      - [How can a client retrieve an option's value?](#subsection52)

      - [How can a client set options after object
        creation?](#subsection53)

      - [How should an instance method access an option
        value?](#subsection54)

      - [How can I make an option read\-only?](#subsection55)

      - [How can I catch accesses to an option's value?](#subsection56)

      - [What is a \-cgetmethod?](#subsection57)

      - [How can I catch changes to an option's value?](#subsection58)

      - [What is a \-configuremethod?](#subsection59)

      - [How can I validate an option's value?](#subsection60)

      - [What is a \-validatemethod?](#subsection61)

  - [TYPE VARIABLES](#section8)

      - [What is a type variable?](#subsection62)

      - [How is a scalar type variable defined?](#subsection63)

      - [How is an array\-valued type variable defined?](#subsection64)

      - [What happens if I don't initialize a type
        variable?](#subsection65)

      - [Are there any limitations on type variable names?](#subsection66)

      - [Do I need to declare my type variables in my
        methods?](#subsection67)

      - [How do I pass a type variable's name to another
        object?](#subsection68)

      - [How do I make a type variable public?](#subsection69)

  - [TYPE METHODS](#section9)

      - [What is a type method?](#subsection70)

      - [How do I define a type method?](#subsection71)

      - [How does a client call a type method?](#subsection72)

      - [Are there any limitations on type method names?](#subsection73)

      - [How do I make a type method private?](#subsection74)

      - [Are there any limitations on type method
        arguments?](#subsection75)

      - [How does an instance or type method call a type
        method?](#subsection76)

      - [How do I pass a type method as a callback?](#subsection77)

      - [Can type methods be hierarchical?](#subsection78)

  - [PROCS](#section10)

      - [What is a proc?](#subsection79)

      - [How do I define a proc?](#subsection80)

      - [Are there any limitations on proc names?](#subsection81)

      - [How does a method call a proc?](#subsection82)

      - [How can I pass a proc to another object as a
        callback?](#subsection83)

  - [TYPE CONSTRUCTORS](#section11)

      - [What is a type constructor?](#subsection84)

      - [How do I define a type constructor?](#subsection85)

  - [CONSTRUCTORS](#section12)

      - [What is a constructor?](#subsection86)

      - [How do I define a constructor?](#subsection87)

      - [What does the default constructor do?](#subsection88)

      - [Can I choose a different set of arguments for the
        constructor?](#subsection89)

      - [Are there any limitations on constructor
        arguments?](#subsection90)

      - [Is there anything special about writing the
        constructor?](#subsection91)

  - [DESTRUCTORS](#section13)

      - [What is a destructor?](#subsection92)

      - [How do I define a destructor?](#subsection93)

      - [Are there any limitations on destructor arguments?](#subsection94)

      - [What implicit arguments are passed to the
        destructor?](#subsection95)

      - [Must components be destroyed explicitly?](#subsection96)

      - [Is there any special about writing a destructor?](#subsection97)

  - [COMPONENTS](#section14)

      - [What is a component?](#subsection98)

      - [How do I declare a component?](#subsection99)

      - [How is a component named?](#subsection100)

      - [Are there any limitations on component names?](#subsection101)

      - [What is an owned component?](#subsection102)

      - [What does the install command do?](#subsection103)

      - [Must owned components be created in the
        constructor?](#subsection104)

      - [Are there any limitations on component object
        names?](#subsection105)

      - [Must I destroy the components I own?](#subsection106)

      - [Can I expose a component's object command as part of my
        interface?](#subsection107)

      - [How do I expose a component's object command?](#subsection108)

  - [TYPE COMPONENTS](#section15)

      - [What is a type component?](#subsection109)

      - [How do I declare a type component?](#subsection110)

      - [How do I install a type component?](#subsection111)

      - [Are there any limitations on type component
        names?](#subsection112)

  - [DELEGATION](#section16)

      - [What is delegation?](#subsection113)

      - [How can I delegate a method to a component
        object?](#subsection114)

      - [Can I delegate to a method with a different name?](#subsection115)

      - [Can I delegate to a method with additional
        arguments?](#subsection116)

      - [Can I delegate a method to something other than an
        object?](#subsection117)

      - [How can I delegate a method to a type component
        object?](#subsection118)

      - [How can I delegate a type method to a type component
        object?](#subsection119)

      - [How can I delegate an option to a component
        object?](#subsection120)

      - [Can I delegate to an option with a different
        name?](#subsection121)

      - [How can I delegate any unrecognized method or option to a component
        object?](#subsection122)

      - [How can I delegate all but certain methods or options to a
        component?](#subsection123)

      - [Can a hierarchical method be delegated?](#subsection124)

  - [WIDGETS](#section17)

      - [What is a snit::widget?](#subsection125)

      - [How do I define a snit::widget?](#subsection126)

      - [How do snit::widgets differ from snit::types?](#subsection127)

      - [What is a hull component?](#subsection128)

      - [How can I set the hull type for a snit::widget?](#subsection129)

      - [How should I name widgets which are components of a
        snit::widget?](#subsection130)

  - [WIDGET ADAPTORS](#section18)

      - [What is a snit::widgetadaptor?](#subsection131)

      - [How do I define a snit::widgetadaptor?](#subsection132)

      - [Can I adapt a widget created elsewhere in the
        program?](#subsection133)

      - [Can I adapt another megawidget?](#subsection134)

  - [THE TK OPTION DATABASE](#section19)

      - [What is the Tk option database?](#subsection135)

      - [Do snit::types use the Tk option database?](#subsection136)

      - [What is my snit::widget's widget class?](#subsection137)

      - [What is my snit::widgetadaptor's widget class?](#subsection138)

      - [What are option resource and class names?](#subsection139)

      - [What are the resource and class names for my megawidget's
        options?](#subsection140)

      - [How does Snit initialize my megawidget's locally\-defined
        options?](#subsection141)

      - [How does Snit initialize delegated options?](#subsection142)

      - [How does Snit initialize options delegated to the
        hull?](#subsection143)

      - [How does Snit initialize options delegated to other
        components?](#subsection144)

      - [What happens if I install a non\-widget as a component of
        widget?](#subsection145)

  - [ENSEMBLE COMMANDS](#section20)

      - [What is an ensemble command?](#subsection146)

      - [How can I create an ensemble command using Snit?](#subsection147)

      - [How can I create an ensemble command using an instance of a
        snit::type?](#subsection148)

      - [How can I create an ensemble command using a
        snit::type?](#subsection149)

  - [PRAGMAS](#section21)

      - [What is a pragma?](#subsection150)

      - [How do I set a pragma?](#subsection151)

      - [How can I get rid of the "info" type method?](#subsection152)

      - [How can I get rid of the "destroy" type method?](#subsection153)

      - [How can I get rid of the "create" type method?](#subsection154)

      - [How can I get rid of type methods altogether?](#subsection155)

      - [Why can't I create an object that replaces an old object with the same
        name?](#subsection156)

      - [How can I make my simple type run faster?](#subsection157)

  - [MACROS](#section22)

      - [What is a macro?](#subsection158)

      - [What are macros good for?](#subsection159)

      - [How do I do conditional compilation?](#subsection160)

      - [How do I define new type definition syntax?](#subsection161)

      - [Are there are restrictions on macro names?](#subsection162)

  - [Bugs, Ideas, Feedback](#section23)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

# <a name='section2'></a>OVERVIEW

## <a name='subsection1'></a>What is this document?

This is an atypical FAQ list, in that few of the questions are frequently asked\.
Rather, these are the questions I think a newcomer to Snit should be asking\.
This file is not a complete reference to Snit, however; that information is in
the __[snit](snit\.md)__ man page\.

## <a name='subsection2'></a>What is Snit?

Snit is a framework for defining abstract data types and megawidgets in pure
Tcl\. The name "Snit" stands for "Snit's Not Incr Tcl", signifying that Snit
takes a different approach to defining objects than does Incr Tcl, the best
known object framework for Tcl\. Had I realized that Snit would become at all
popular, I'd probably have chosen something else\.

The primary purpose of Snit is to be *object glue*\-\-to help you compose
diverse objects from diverse sources into types and megawidgets with clean,
convenient interfaces so that you can more easily build your application\.

Snit isn't about theoretical purity or minimalist design; it's about being able
to do powerful things easily and consistently without having to think about
them\-\-so that you can concentrate on building your application\.

Snit isn't about implementing thousands of nearly identical carefully\-specified
lightweight thingamajigs\-\-not as individual Snit objects\. Traditional Tcl
methods will be much faster, and not much more complicated\. But Snit *is*
about implementing a clean interface to manage a collection of thousands of
nearly identical carefully\-specified lightweight thingamajigs \(e\.g\., think of
the text widget and text tags, or the canvas widget and canvas objects\)\. Snit
lets you hide the details of just how those thingamajigs are stored\-\-so that you
can ignore it, and concentrate on building your application\.

Snit isn't a way of life, a silver bullet, or the Fountain of Youth\. It's just a
way of managing complexity\-\-and of managing some of the complexity of managing
complexity\-\-so that you can concentrate on building your application\.

## <a name='subsection3'></a>What version of Tcl does Snit require?

Snit 1\.3 requires Tcl 8\.3 or later; Snit 2\.2 requires Tcl 8\.5 or later\. See
[SNIT VERSIONS](#section3) for the differences between Snit 1\.3 and Snit
2\.2\.

## <a name='subsection4'></a>Where can I download Snit?

Snit is part of Tcllib, the standard Tcl library, so you might already have it\.
It's also available at the Snit Home Page,
[http://www\.wjduquette\.com/snit](http://www\.wjduquette\.com/snit)\.

## <a name='subsection5'></a>What are Snit's goals?

  - A Snit object should be at least as efficient as a hand\-coded Tcl object
    \(see
    [http://www\.wjduquette\.com/tcl/objects\.html](http://www\.wjduquette\.com/tcl/objects\.html)\)\.

  - The fact that Snit was used in an object's implementation should be
    transparent \(and irrelevant\) to clients of that object\.

  - Snit should be able to encapsulate objects from other sources, particularly
    Tk widgets\.

  - Snit megawidgets should be \(to the extent possible\) indistinguishable in
    interface from Tk widgets\.

  - Snit should be Tclish\-\-that is, rather than trying to emulate C\+\+,
    Smalltalk, or anything else, it should try to emulate Tcl itself\.

  - It should have a simple, easy\-to\-use, easy\-to\-remember syntax\.

## <a name='subsection6'></a>How is Snit different from other OO frameworks?

Snit is unique among Tcl object systems in that it is based not on inheritance
but on delegation\. Object systems based on inheritance only allow you to inherit
from classes defined using the same system, and that's a shame\. In Tcl, an
object is anything that acts like an object; it shouldn't matter how the object
was implemented\. I designed Snit to help me build applications out of the
materials at hand; thus, Snit is designed to be able to incorporate and build on
any object, whether it's a hand\-coded object, a Tk widget, an Incr Tcl object, a
BWidget or almost anything else\.

Note that you can achieve the effect of inheritance using
[COMPONENTS](#section14) and [DELEGATION](#section16)\-\-and you can
inherit from anything that looks like a Tcl object\.

## <a name='subsection7'></a>What can I do with Snit?

Using Snit, a programmer can:

  - Create abstract data types and Tk megawidgets\.

  - Define instance variables, type variables, and Tk\-style options\.

  - Define constructors, destructors, instance methods, type methods, procs\.

  - Assemble a type out of component types\. Instance methods and options can be
    delegated to the component types automatically\.

# <a name='section3'></a>SNIT VERSIONS

## <a name='subsection8'></a>Which version of Snit should I use?

The current Snit distribution includes two versions, Snit 1\.3 and Snit 2\.2\. The
reason that both are included is that Snit 2\.2 takes advantage of a number of
new features of Tcl 8\.5 to improve run\-time efficiency; as a side\-effect, the
ugliness of Snit's error messages and stack traces has been reduced
considerably\. The cost of using Snit 2\.2, of course, is that you must target Tcl
8\.5\.

Snit 1\.3, on the other hand, lacks Snit 2\.2's optimizations, but requires only
Tcl 8\.3 and later\.

In short, if you're targetting Tcl 8\.3 or 8\.4 you should use Snit 1\.3\. If you
can afford to target Tcl 8\.5, you should definitely use Snit 2\.2\. If you will be
targetting both, you can use Snit 1\.3 exclusively, or \(if your code is
unaffected by the minor incompatibilities between the two versions\) you can use
Snit 1\.3 for Tcl 8\.4 and Snit 2\.2 for Tcl 8\.5\.

## <a name='subsection9'></a>How do I select the version of Snit I want to use?

To always use Snit 1\.3 \(or a later version of Snit 1\.x\), invoke Snit as follows:

    package require snit 1.3

To always use Snit 2\.2 \(or a later version of Snit 2\.x\), say this instead:

    package require snit 2.2

Note that if you request Snit 2\.2 explicitly, your application will halt with
Tcl 8\.4, since Snit 2\.2 is unavailable for Tcl 8\.4\.

If you wish your application to always use the latest available version of Snit,
don't specify a version number:

    package require snit

Tcl will find and load the latest version that's available relative to the
version of Tcl being used\. In this case, be careful to avoid using any
incompatible features\.

## <a name='subsection10'></a>How are Snit 1\.3 and Snit 2\.2 incompatible?

To the extent possible, Snit 2\.2 is intended to be a drop\-in replacement for
Snit 1\.3\. Unfortunately, some incompatibilities were inevitable because Snit 2\.2
uses Tcl 8\.5's new __namespace ensemble__ mechanism to implement subcommand
dispatch\. This approach is much faster than the mechanism used in Snit 1\.3, and
also results in much better error messages; however, it also places new
constraints on the implementation\.

There are four specific incompatibilities between Snit 1\.3 and Snit 2\.2\.

  - Snit 1\.3 supports implicit naming of objects\. Suppose you define a new
    __snit::type__ called __dog__\. You can create instances of
    __dog__ in three ways:

    dog spot               ;# Explicit naming
    set obj1 [dog %AUTO%]  ;# Automatic naming
    set obj2 [dog]         ;# Implicit naming

    In Snit 2\.2, type commands are defined using the __namespace ensemble__
    mechanism; and __namespace ensemble__ doesn't allow an ensemble command
    to be called without a subcommand\. In short, using __namespace
    ensemble__ there's no way to support implicit naming\.

    All is not lost, however\. If the type has no type methods, then the type
    command is a simple command rather than an ensemble, and __namespace
    ensemble__ is not used\. In this case, implicit naming is still possible\.

    In short, you can have implicit naming if you're willing to do without type
    methods \(including the standard type methods, like __$type info__\)\. To
    do so, use the __\-hastypemethods__ pragma:

    pragma -hastypemethods 0

  - Hierarchical methods and type methods are implemented differently in Snit
    2\.2\.

    A hierarchical method is an instance method which has subcommands; these
    subcommands are themselves methods\. The Tk text widget's __tag__ command
    and its subcommands are examples of hierarchical methods\. You can implement
    such subcommands in Snit simply by including multiple words in the method
    names:

    method {tag configure} {tag args} { ... }

    method {tag cget} {tag option} {...}

    Here we've implicitly defined a __tag__ method which has two
    subcommands, __configure__ and __cget__\.

    In Snit 1\.3, hierarchical methods could be called in two ways:

    $obj tag cget -myoption      ;# The good way
    $obj {tag cget} -myoption    ;# The weird way

    In the second call, we see that a hierarchical method or type method is
    simply one whose name contains multiple words\.

    In Snit 2\.2 this is no longer the case, and the "weird" way of calling
    hierarchical methods and type methods no longer works\.

  - The third incompatibility derives from the second\. In Snit 1\.3, hierarchical
    methods were also simply methods whose name contains multiple words\. As a
    result, __$obj info methods__ returned the full names of all
    hierarchical methods\. In the example above, the list returned by __$obj
    info methods__ would include __tag configure__ and __tag cget__
    but not __tag__, since __tag__ is defined only implicitly\.

    In Snit 2\.2, hierarchical methods and type methods are no longer simply ones
    whose name contains multiple words; in the above example, the list returned
    by __$obj info methods__ would include __tag__ but not __tag
    configure__ or __tag cget__\.

  - The fourth incompatibility is due to a new feature\. Snit 2\.2 uses the new
    __namespace path__ command so that a type's code can call any command
    defined in the type's parent namespace without qualification or importation\.
    For example, suppose you have a package called __mypackage__ which
    defines a number of commands including a type, __::mypackage::mytype__\.
    Thanks to __namespace path__, the type's code can call any of the other
    commands defined in __::mypackage::__\.

    This is extremely convenient\. However, it also means that commands defined
    in the parent namespace, __::mypackage::__ can block the type's access
    to identically named commands in the global namespace\. This can lead to
    bugs\. For example, Tcllib includes a type called __::tie::std::file__\.
    This type's code calls the standard
    __[file](\.\./\.\./\.\./\.\./index\.md\#file)__ command\. When run with Snit
    2\.2, the code broke\-\- the type's command, __::tie::std::file__, is
    itself a command in the type's parent namespace, and so instead of calling
    the standard __[file](\.\./\.\./\.\./\.\./index\.md\#file)__ command, the type
    found itself calling itself\.

## <a name='subsection11'></a>Are there other differences between Snit 1\.x and Snit 2\.2?

Yes\.

  - Method dispatch is considerably faster\.

  - Many error messages and stack traces are cleaner\.

  - The __\-simpledispatch__ pragma is obsolete, and ignored if present\. In
    Snit 1\.x, __\-simpledispatch__ substitutes a faster mechanism for method
    dispatch, at the cost of losing certain features\. Snit 2\.2 method dispatch
    is faster still in all cases, so __\-simpledispatch__ is no longer
    needed\.

  - In Snit 2\.2, a type's code \(methods, type methods, etc\.\) can call commands
    from the type's parent namespace without qualifying or importing them, i\.e\.,
    type __::parentns::mytype__'s code can call __::parentns::someproc__
    as just __someproc__\.

    This is extremely useful when a type is defined as part of a larger package,
    and shares a parent namespace with the rest of the package; it means that
    the type can call other commands defined by the package without any extra
    work\.

    This feature depends on the new Tcl 8\.5 __namespace path__ command,
    which is why it hasn't been implemented for V1\.x\. V1\.x code can achieve
    something similar by placing

    namespace import [namespace parent]::*

    in a type constructor\. This is less useful, however, as it picks up only
    those commands which have already been exported by the parent namespace at
    the time the type is defined\.

# <a name='section4'></a>OBJECTS

## <a name='subsection12'></a>What is an object?

A full description of object\-oriented programming is beyond the scope of this
FAQ, obviously\. In simple terms, an object is an instance of an abstract data
type\-\-a coherent bundle of code and data\. There are many ways to represent
objects in Tcl/Tk; the best known examples are the Tk widgets\.

A Tk widget is an object; it is represented by a Tcl command\. The object's
methods are subcommands of the Tcl command\. The object's properties are options
accessed using the __configure__ and __cget__ methods\. Snit uses the
same conventions as Tk widgets do\.

## <a name='subsection13'></a>What is an abstract data type?

In computer science terms, an abstract data type is a complex data structure
along with a set of operations\-\-a stack, a queue, a binary tree, etc\-\-that is to
say, in modern terms, an object\. In systems that include some form of
inheritance the word *[class](\.\./\.\./\.\./\.\./index\.md\#class)* is usually used
instead of *abstract data type*, but as Snit doesn't implement inheritance as
it's ordinarily understood the older term seems more appropriate\. Sometimes this
is called *object\-based* programming as opposed to object\-oriented
programming\. Note that you can easily create the effect of inheritance using
[COMPONENTS](#section14) and [DELEGATION](#section16)\.

In Snit, as in Tk, a *[type](\.\./\.\./\.\./\.\./index\.md\#type)* is a command that
creates instances \-\- objects \-\- which belong to the type\. Most types define some
number of *options* which can be set at creation time, and usually can be
changed later\.

Further, an *instance* is also a Tcl command\-\-a command that gives access to
the operations which are defined for that abstract data type\. Conventionally,
the operations are defined as subcommands of the instance command\. For example,
to insert text into a Tk text widget, you use the text widget's __insert__
subcommand:

    # Create a text widget and insert some text in it.
    text .mytext -width 80 -height 24
    .mytext insert end "Howdy!"

In this example, __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ is the
*[type](\.\./\.\./\.\./\.\./index\.md\#type)* command and __\.mytext__ is the
*instance* command\.

In Snit, object subcommands are generally called [INSTANCE
METHODS](#section5)\.

## <a name='subsection14'></a>What kinds of abstract data types does Snit provide?

Snit allows you to define three kinds of abstract data type:

  - __snit::type__

  - __snit::widget__

  - __snit::widgetadaptor__

## <a name='subsection15'></a>What is a snit::type?

A __snit::type__ is a non\-GUI abstract data type, e\.g\., a stack or a queue\.
__snit::type__s are defined using the __snit::type__ command\. For
example, if you were designing a kennel management system for a dog breeder,
you'd need a dog type\.

    % snit::type dog {
        # ...
    }
    ::dog
    %

This definition defines a new command \(__::dog__, in this case\) that can be
used to define dog objects\.

An instance of a __snit::type__ can have [INSTANCE METHODS](#section5),
[INSTANCE VARIABLES](#section6), [OPTIONS](#section7), and
[COMPONENTS](#section14)\. The type itself can have [TYPE
METHODS](#section9), [TYPE VARIABLES](#section8), [TYPE
COMPONENTS](#section15), and [PROCS](#section10)\.

## <a name='subsection16'></a>What is a snit::widget?, the short story

A __snit::widget__ is a Tk megawidget built using Snit; it is very similar
to a __snit::type__\. See [WIDGETS](#section17)\.

## <a name='subsection17'></a>What is a snit::widgetadaptor?, the short story

A __snit::widgetadaptor__ uses Snit to wrap an existing widget type \(e\.g\., a
Tk label\), modifying its interface to a lesser or greater extent\. It is very
similar to a __snit::widget__\. See [WIDGET ADAPTORS](#section18)\.

## <a name='subsection18'></a>How do I create an instance of a snit::type?

You create an instance of a __snit::type__ by passing the new instance's
name to the type's create method\. In the following example, we create a
__dog__ object called __spot__\.

    % snit::type dog {
        # ....
    }
    ::dog
    % dog create spot
    ::spot
    %

In general, the __create__ method name can be omitted so long as the
instance name doesn't conflict with any defined [TYPE METHODS](#section9)\.
\(See [TYPE COMPONENTS](#section15) for the special case in which this
doesn't work\.\) So the following example is identical to the previous example:

    % snit::type dog {
        # ....
    }
    ::dog
    % dog spot
    ::spot
    %

This document generally uses the shorter form\.

If the __dog__ type defines [OPTIONS](#section7), these can usually be
given defaults at creation time:

    % snit::type dog {
        option -breed mongrel
        option -color brown

        method bark {} { return "$self barks." }
    }
    ::dog
    % dog create spot -breed dalmation -color spotted
    ::spot
    % spot cget -breed
    dalmation
    % spot cget -color
    spotted
    %

Once created, the instance name now names a new Tcl command that is used to
manipulate the object\. For example, the following code makes the dog bark:

    % spot bark
    ::spot barks.
    %

## <a name='subsection19'></a>How do I refer to an object indirectly?

Some programmers prefer to save the object name in a variable, and reference it
that way\. For example,

    % snit::type dog { ... }
    ::dog
    % set d [dog spot -breed dalmation -color spotted]
    ::spot
    % $d cget -breed
    dalmation
    % $d bark
    ::spot barks.
    %

If you prefer this style, you might prefer to have Snit generate the instance's
name automatically\.

## <a name='subsection20'></a>How can I generate the object name automatically?

If you'd like Snit to generate an object name for you, use the __%AUTO%__
keyword as the requested name:

    % snit::type dog { ... }
    ::dog
    % set d [dog %AUTO%]
    ::dog2
    % $d bark
    ::dog2 barks.
    %

The __%AUTO%__ keyword can be embedded in a longer string:

    % set d [dog obj_%AUTO%]
    ::obj_dog4
    % $d bark
    ::obj_dog4 barks.
    %

## <a name='subsection21'></a>Can types be renamed?

Tcl's __rename__ command renames other commands\. It's a common technique in
Tcl to modify an existing command by renaming it and defining a new command with
the original name; the new command usually calls the renamed command\.

__snit::type__ commands, however, should never be renamed; to do so breaks
the connection between the type and its objects\.

## <a name='subsection22'></a>Can objects be renamed?

Tcl's __rename__ command renames other commands\. It's a common technique in
Tcl to modify an existing command by renaming it and defining a new command with
the original name; the new command usually calls the renamed command\.

All Snit objects \(including *widgets* and *widgetadaptors*\) can be renamed,
though this flexibility has some consequences:

  - In an instance method, the implicit argument __self__ will always
    contain the object's current name, so instance methods can always call other
    instance methods using __$self__\.

  - If the object is renamed, however, then __$self__'s value will change\.
    Therefore, don't use __$self__ for anything that will break if
    __$self__ changes\. For example, don't pass a callback command to another
    object like this:

    .btn configure -command [list $self ButtonPress]

    You'll get an error if __\.btn__ calls your command after your object is
    renamed\.

  - Instead, your object should define its callback command like this:

    .btn configure -command [mymethod ButtonPress]

    The __mymethod__ command returns code that will call the desired method
    safely; the caller of the callback can add additional arguments to the end
    of the command as usual\.

  - Every object has a private namespace; the name of this namespace is
    available in method bodies, etc\., as the value of the implicit argument
    __selfns__\. This value is constant for the life of the object\. Use
    __$selfns__ instead of __$self__ if you need a unique token to
    identify the object\.

  - When a __snit::widget__'s instance command is renamed, its Tk window
    name remains the same \-\- and is still extremely important\. Consequently, the
    Tk window name is available in method bodies as the value of the implicit
    argument __win__\. This value is constant for the life of the object\.
    When creating child windows, it's best to use __$win\.child__ rather than
    __$self\.child__ as the name of the child window\.

## <a name='subsection23'></a>How do I destroy a Snit object?

Any Snit object of any type can be destroyed by renaming it to the empty string
using the Tcl __rename__ command\.

Snit megawidgets \(i\.e\., instances of __snit::widget__ and
__snit::widgetadaptor__\) can be destroyed like any other widget: by using
the Tk __destroy__ command on the widget or on one of its ancestors in the
window hierarchy\.

Every instance of a __snit::type__ has a __destroy__ method:

    % snit::type dog { ... }
    ::dog
    % dog spot
    ::spot
    % spot bark
    ::spot barks.
    % spot destroy
    % spot barks
    invalid command name "spot"
    %

Finally, every Snit type has a type method called __destroy__; calling it
destroys the type and all of its instances:

    % snit::type dog { ... }
    ::dog
    % dog spot
    ::spot
    % spot bark
    ::spot barks.
    % dog destroy
    % spot bark
    invalid command name "spot"
    % dog fido
    invalid command name "dog"
    %

# <a name='section5'></a>INSTANCE METHODS

## <a name='subsection24'></a>What is an instance method?

An instance method is a procedure associated with a specific object and called
as a subcommand of the object's command\. It is given free access to all of the
object's type variables, instance variables, and so forth\.

## <a name='subsection25'></a>How do I define an instance method?

Instance methods are defined in the type definition using the
__[method](\.\./\.\./\.\./\.\./index\.md\#method)__ statement\. Consider the
following code that might be used to add dogs to a computer simulation:

    % snit::type dog {
        method bark {} {
            return "$self barks."
        }

        method chase {thing} {
            return "$self chases $thing."
        }
    }
    ::dog
    %

A dog can bark, and it can chase things\.

The __[method](\.\./\.\./\.\./\.\./index\.md\#method)__ statement looks just like
a normal Tcl __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__, except that it
appears in a __snit::type__ definition\. Notice that every instance method
gets an implicit argument called __self__; this argument contains the
object's name\. \(There's more on implicit method arguments below\.\)

## <a name='subsection26'></a>How does a client call an instance method?

The method name becomes a subcommand of the object\. For example, let's put a
simulated dog through its paces:

    % dog spot
    ::spot
    % spot bark
    ::spot barks.
    % spot chase cat
    ::spot chases cat.
    %

## <a name='subsection27'></a>How does an instance method call another instance method?

If method A needs to call method B on the same object, it does so just as a
client does: it calls method B as a subcommand of the object itself, using the
object name stored in the implicit argument __self__\.

Suppose, for example, that our dogs never chase anything without barking at
them:

    % snit::type dog {
        method bark {} {
            return "$self barks."
        }

        method chase {thing} {
            return "$self chases $thing.  [$self bark]"
        }
    }
    ::dog
    % dog spot
    ::spot
    % spot bark
    ::spot barks.
    % spot chase cat
    ::spot chases cat.  ::spot barks.
    %

## <a name='subsection28'></a>Are there any limitations on instance method names?

Not really, so long as you avoid the standard instance method names:
__configure__, __configurelist__, __cget__, __destroy__, and
__info__\. Also, method names consisting of multiple words define
hierarchical methods\.

## <a name='subsection29'></a>What is a hierarchical method?

An object's methods are subcommands of the object's instance command\.
Hierarchical methods allow an object's methods to have subcommands of their own;
and these can in turn have subcommands, and so on\. This allows the programmer to
define a tree\-shaped command structure, such as is used by many of the Tk
widgets\-\-the subcommands of the Tk __[text](\.\./\.\./\.\./\.\./index\.md\#text)__
widget's __tag__ method are hierarchical methods\.

## <a name='subsection30'></a>How do I define a hierarchical method?

Define methods whose names consist of multiple words\. These words define the
hierarchy implicitly\. For example, the following code defines a __tag__
method with subcommands __cget__ and __configure__:

    snit::widget mytext {
        method {tag configure} {tag args} { ... }

        method {tag cget} {tag option} {...}
    }

Note that there is no explicit definition for the __tag__ method; it is
implicit in the definition of __tag configure__ and __tag cget__\. If you
tried to define __tag__ explicitly in this example, you'd get an error\.

## <a name='subsection31'></a>How do I call hierarchical methods?

As subcommands of subcommands\.

    % mytext .text
    .text
    % .text tag configure redtext -foreground red -background black
    % .text tag cget redtext -foreground
    red
    %

## <a name='subsection32'></a>How do I make an instance method private?

It's often useful to define private methods, that is, instance methods intended
to be called only by other methods of the same object\.

Snit doesn't implement any access control on instance methods, so all methods
are *de facto* public\. Conventionally, though, the names of public methods
begin with a lower\-case letter, and the names of private methods begin with an
upper\-case letter\.

For example, suppose our simulated dogs only bark in response to other stimuli;
they never bark just for fun\. So the __bark__ method becomes __Bark__ to
indicate that it is private:

    % snit::type dog {
        # Private by convention: begins with uppercase letter.
        method Bark {} {
            return "$self barks."
        }

        method chase {thing} {
            return "$self chases $thing. [$self Bark]"
        }
    }
    ::dog
    % dog fido
    ::fido
    % fido chase cat
    ::fido chases cat. ::fido barks.
    %

## <a name='subsection33'></a>Are there any limitations on instance method arguments?

Method argument lists are defined just like normal Tcl
__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ argument lists; in particular,
they can include arguments with default values and the __args__ argument\.

However, every method also has a number of implicit arguments provided by Snit
in addition to those explicitly defined\. The names of these implicit arguments
may not used to name explicit arguments\.

## <a name='subsection34'></a>What implicit arguments are passed to each instance method?

The arguments implicitly passed to every method are __type__,
__selfns__, __win__, and __self__\.

## <a name='subsection35'></a>What is $type?

The implicit argument __type__ contains the fully qualified name of the
object's type:

    % snit::type thing {
        method mytype {} {
            return $type
        }
    }
    ::thing
    % thing something
    ::something
    % something mytype
    ::thing
    %

## <a name='subsection36'></a>What is $self?

The implicit argument __self__ contains the object's fully qualified name\.

If the object's command is renamed, then __$self__ will change to match in
subsequent calls\. Thus, your code should not assume that __$self__ is
constant unless you know for sure that the object will never be renamed\.

    % snit::type thing {
        method myself {} {
            return $self
        }
    }
    ::thing
    % thing mutt
    ::mutt
    % mutt myself
    ::mutt
    % rename mutt jeff
    % jeff myself
    ::jeff
    %

## <a name='subsection37'></a>What is $selfns?

Each Snit object has a private namespace in which to store its [INSTANCE
VARIABLES](#section6) and [OPTIONS](#section7)\. The implicit argument
__selfns__ contains the name of this namespace; its value never changes, and
is constant for the life of the object, even if the object's name changes:

    % snit::type thing {
        method myNameSpace {} {
            return $selfns
        }
    }
    ::thing
    % thing jeff
    ::jeff
    % jeff myNameSpace
    ::thing::Snit_inst3
    % rename jeff mutt
    % mutt myNameSpace
    ::thing::Snit_inst3
    %

The above example reveals how Snit names an instance's private namespace;
however, you should not write code that depends on the specific naming
convention, as it might change in future releases\.

## <a name='subsection38'></a>What is $win?

The implicit argument __win__ is defined for all Snit methods, though it
really makes sense only for those of [WIDGETS](#section17) and [WIDGET
ADAPTORS](#section18)\. __$win__ is simply the original name of the
object, whether it's been renamed or not\. For widgets and widgetadaptors, it is
also therefore the name of a Tk window\.

When a __snit::widgetadaptor__ is used to modify the interface of a widget
or megawidget, it must rename the widget's original command and replace it with
its own\.

Thus, using __win__ whenever the Tk window name is called for means that a
__snit::widget__ or __snit::widgetadaptor__ can be adapted by a
__snit::widgetadaptor__\. See [WIDGETS](#section17) for more
information\.

## <a name='subsection39'></a>How do I pass an instance method as a callback?

It depends on the context\.

Suppose in my application I have a __dog__ object named __fido__, and I
want __fido__ to bark when a Tk button called __\.bark__ is pressed\. In
this case, I create the callback command in the usual way, using
__[list](\.\./\.\./\.\./\.\./index\.md\#list)__:

    button .bark -text "Bark!" -command [list fido bark]

In typical Tcl style, we use a callback to hook two independent components
together\. But suppose that the __dog__ object has a graphical interface and
owns the button itself? In this case, the __dog__ must pass one of its own
instance methods to the button it owns\. The obvious thing to do is this:

    % snit::widget dog {
        constructor {args} {
            #...
            button $win.barkbtn -text "Bark!" -command [list $self bark]
            #...
        }
    }
    ::dog
    %

\(Note that in this example, our __dog__ becomes a __snit::widget__,
because it has GUI behavior\. See [WIDGETS](#section17) for more\.\) Thus, if
we create a __dog__ called __\.spot__, it will create a Tk button called
__\.spot\.barkbtn__; when pressed, the button will call __$self bark__\.

Now, this will work\-\-provided that __\.spot__ is never renamed to something
else\. But surely renaming widgets is abnormal? And so it is\-\-unless
__\.spot__ is the hull component of a __snit::widgetadaptor__\. If it is,
then it will be renamed, and __\.spot__ will become the name of the
__snit::widgetadaptor__ object\. When the button is pressed, the command
__$self bark__ will be handled by the __snit::widgetadaptor__, which
might or might not do the right thing\.

There's a safer way to do it, and it looks like this:

    % snit::widget dog {
        constructor {args} {
            #...
            button $win.barkbtn -text "Bark!" -command [mymethod bark]
            #...
        }
    }
    ::dog
    %

The command __mymethod__ takes any number of arguments, and can be used like
__[list](\.\./\.\./\.\./\.\./index\.md\#list)__ to build up a callback command;
the only difference is that __mymethod__ returns a form of the command that
won't change even if the instance's name changes\.

On the other hand, you might prefer to allow a widgetadaptor to override a
method such that your renamed widget will call the widgetadaptor's method
instead of its own\. In this case, using __\[list $self bark\]__ will do what
you want\.\.\.but this is a technique which should be used only in carefully
controlled circumstances\.

## <a name='subsection40'></a>How do I delegate instance methods to a component?

See [DELEGATION](#section16)\.

# <a name='section6'></a>INSTANCE VARIABLES

## <a name='subsection41'></a>What is an instance variable?

An instance variable is a private variable associated with some particular Snit
object\. Instance variables can be scalars or arrays\.

## <a name='subsection42'></a>How is a scalar instance variable defined?

Scalar instance variables are defined in the type definition using the
__variable__ statement\. You can simply name it, or you can initialize it
with a value:

    snit::type mytype {
        # Define variable "greeting" and initialize it with "Howdy!"
        variable greeting "Howdy!"
    }

## <a name='subsection43'></a>How is an array instance variable defined?

Array instance variables are also defined in the type definition using the
__variable__ command\. You can initialize them at the same time by specifying
the __\-array__ option:

    snit::type mytype {
        # Define array variable "greetings"
        variable greetings -array {
            formal "Good Evening"
            casual "Howdy!"
        }
    }

## <a name='subsection44'></a>What happens if I don't initialize an instance variable?

Variables do not really exist until they are given values\. If you do not
initialize a variable when you define it, then you must be sure to assign a
value to it \(in the constructor, say, or in some method\) before you reference
it\.

## <a name='subsection45'></a>Are there any limitations on instance variable names?

Just a few\.

First, every Snit object has a built\-in instance variable called
__options__, which should never be redefined\.

Second, all names beginning with "Snit\_" are reserved for use by Snit internal
code\.

Third, instance variable names containing the namespace delimiter \(__::__\)
are likely to cause great confusion\.

## <a name='subsection46'></a>Do I need to declare my instance variables in my methods?

No\. Once you've defined an instance variable in the type definition, it can be
used in any instance code \(instance methods, the constructor, and the
destructor\) without declaration\. This differs from normal Tcl practice, in which
all non\-local variables in a proc need to be declared\.

There is a speed penalty to having all instance variables implicitly available
in all instance code\. Even though your code need not declare the variables
explicitly, Snit must still declare them, and that takes time\. If you have ten
instance variables, a method that uses none of them must still pay the
declaration penalty for all ten\. In most cases, the additional runtime cost is
negligible\. If extreme cases, you might wish to avoid it; there are two methods
for doing so\.

The first is to define a single instance variable, an array, and store all of
your instance data in the array\. This way, you're only paying the declaration
penalty for one variable\-\-and you probably need the variable most of the time
anyway\. This method breaks down if your instance variables include multiple
arrays; in Tcl 8\.5, however, the __[dict](\.\./\.\./\.\./\.\./index\.md\#dict)__
command might come to your rescue\.

The second method is to declare your instance variables explicitly in your
instance code, while *not* including them in the type definition:

    snit::type dog {
        constructor {} {
            variable mood

            set mood happy
        }

        method setmood {newMood} {
            variable mood

            set mood $newMood
        }

        method getmood {} {
            variable mood

            return $mood
        }
    }

This allows you to ensure that only the required variables are included in each
method, at the cost of longer code and run\-time errors when you forget to
declare a variable you need\.

## <a name='subsection47'></a>How do I pass an instance variable's name to another object?

In Tk, it's common to pass a widget a variable name; for example, Tk label
widgets have a __\-textvariable__ option which names the variable which will
contain the widget's text\. This allows the program to update the label's value
just by assigning a new value to the variable\.

If you naively pass the instance variable name to the label widget, you'll be
confused by the result; Tk will assume that the name names a global variable\.
Instead, you need to provide a fully\-qualified variable name\. From within an
instance method or a constructor, you can fully qualify the variable's name
using the __myvar__ command:

    snit::widget mywidget {
        variable labeltext ""

        constructor {args} {
            # ...

            label $win.label -textvariable [myvar labeltext]

            # ...
        }
    }

## <a name='subsection48'></a>How do I make an instance variable public?

Practically speaking, you don't\. Instead, you'll implement public variables as
[OPTIONS](#section7)\. Alternatively, you can write [INSTANCE
METHODS](#section5) to set and get the variable's value\.

# <a name='section7'></a>OPTIONS

## <a name='subsection49'></a>What is an option?

A type's options are the equivalent of what other object\-oriented languages
would call public member variables or properties: they are data values which can
be retrieved and \(usually\) set by the clients of an object\.

Snit's implementation of options follows the Tk model fairly exactly, except
that __snit::type__ objects usually don't interact with [THE TK OPTION
DATABASE](#section19); __snit::widget__ and __snit::widgetadaptor__
objects, on the other hand, always do\.

## <a name='subsection50'></a>How do I define an option?

Options are defined in the type definition using the __option__ statement\.
Consider the following type, to be used in an application that manages a list of
dogs for a pet store:

    snit::type dog {
        option -breed -default mongrel
        option -color -default brown
        option -akc   -default 0
        option -shots -default 0
    }

According to this, a dog has four notable properties: a breed, a color, a flag
that says whether it's pedigreed with the American Kennel Club, and another flag
that says whether it has had its shots\. The default dog, evidently, is a brown
mutt\.

There are a number of options you can specify when defining an option; if
__\-default__ is the only one, you can omit the word __\-default__ as
follows:

    snit::type dog {
        option -breed mongrel
        option -color brown
        option -akc   0
        option -shots 0
    }

If no __\-default__ value is specified, the option's default value will be
the empty string \(but see [THE TK OPTION DATABASE](#section19)\)\.

The Snit man page refers to options like these as "locally defined" options\.

## <a name='subsection51'></a>How can a client set options at object creation?

The normal convention is that the client may pass any number of options and
their values after the object's name at object creation\. For example, the
__::dog__ command defined in the previous answer can now be used to create
individual dogs\. Any or all of the options may be set at creation time\.

    % dog spot -breed beagle -color "mottled" -akc 1 -shots 1
    ::spot
    % dog fido -shots 1
    ::fido
    %

So __::spot__ is a pedigreed beagle; __::fido__ is a typical mutt, but
his owners evidently take care of him, because he's had his shots\.

*Note:* If the type defines a constructor, it can specify a different
object\-creation syntax\. See [CONSTRUCTORS](#section12) for more
information\.

## <a name='subsection52'></a>How can a client retrieve an option's value?

Retrieve option values using the __cget__ method:

    % spot cget -color
    mottled
    % fido cget -breed
    mongrel
    %

## <a name='subsection53'></a>How can a client set options after object creation?

Any number of options may be set at one time using the __configure__
instance method\. Suppose that closer inspection shows that ::fido is not a brown
mongrel, but rather a rare Arctic Boar Hound of a lovely dun color:

    % fido configure -color dun -breed "Arctic Boar Hound"
    % fido cget -color
    dun
    % fido cget -breed
    Arctic Boar Hound

Alternatively, the __configurelist__ method takes a list of options and
values; occasionally this is more convenient:

    % set features [list -color dun -breed "Arctic Boar Hound"]
    -color dun -breed {Arctic Boar Hound}
    % fido configurelist $features
    % fido cget -color
    dun
    % fido cget -breed
    Arctic Boar Hound
    %

In Tcl 8\.5, the __\*__ keyword can be used with __configure__ in this
case:

    % set features [list -color dun -breed "Arctic Boar Hound"]
    -color dun -breed {Arctic Boar Hound}
    % fido configure {*}$features
    % fido cget -color
    dun
    % fido cget -breed
    Arctic Boar Hound
    %

The results are the same\.

## <a name='subsection54'></a>How should an instance method access an option value?

There are two ways an instance method can set and retrieve an option's value\.
One is to use the __configure__ and __cget__ methods, as shown below\.

    % snit::type dog {
        option -weight 10

        method gainWeight {} {
            set wt [$self cget -weight]
            incr wt
            $self configure -weight $wt
        }
    }
    ::dog
    % dog fido
    ::fido
    % fido cget -weight
    10
    % fido gainWeight
    % fido cget -weight
    11
    %

Alternatively, Snit provides a built\-in array instance variable called
__options__\. The indices are the option names; the values are the option
values\. The method __gainWeight__ can thus be rewritten as follows:

    method gainWeight {} {
        incr options(-weight)
    }

As you can see, using the __options__ variable involves considerably less
typing and is the usual way to do it\. But if you use __\-configuremethod__ or
__\-cgetmethod__ \(described in the following answers\), you might wish to use
the __configure__ and __cget__ methods anyway, just so that any special
processing you've implemented is sure to get done\. Also, if the option is
delegated to a component then __configure__ and __cget__ are the only
way to access it without accessing the component directly\. See
[DELEGATION](#section16) for more information\.

## <a name='subsection55'></a>How can I make an option read\-only?

Define the option with __\-readonly yes__\.

Suppose you've got an option that determines how instances of your type are
constructed; it must be set at creation time, after which it's constant\. For
example, a dog never changes its breed; it might or might not have had its
shots, and if not can have them at a later time\. __\-breed__ should be
read\-only, but __\-shots__ should not be\.

    % snit::type dog {
        option -breed -default mongrel -readonly yes
        option -shots -default no
    }
    ::dog
    % dog fido -breed retriever
    ::fido
    % fido configure -shots yes
    % fido configure -breed terrier
    option -breed can only be set at instance creation
    %

## <a name='subsection56'></a>How can I catch accesses to an option's value?

Define a __\-cgetmethod__ for the option\.

## <a name='subsection57'></a>What is a \-cgetmethod?

A __\-cgetmethod__ is a method that's called whenever the related option's
value is queried via the __cget__ instance method\. The handler can compute
the option's value, retrieve it from a database, or do anything else you'd like
it to do\.

Here's what the default behavior would look like if written using a
__\-cgetmethod__:

    snit::type dog {
        option -color -default brown -cgetmethod GetOption

        method GetOption {option} {
            return $options($option)
        }
    }

Any instance method can be used, provided that it takes one argument, the name
of the option whose value is to be retrieved\.

## <a name='subsection58'></a>How can I catch changes to an option's value?

Define a __\-configuremethod__ for the option\.

## <a name='subsection59'></a>What is a \-configuremethod?

A __\-configuremethod__ is a method that's called whenever the related option
is given a new value via the __configure__ or __configurelist__ instance
methods\. The method can pass the value on to some other object, store it in a
database, or do anything else you'd like it to do\.

Here's what the default configuration behavior would look like if written using
a __\-configuremethod__:

    snit::type dog {
        option -color -default brown -configuremethod SetOption

        method SetOption {option value} {
            set options($option) $value
        }
    }

Any instance method can be used, provided that it takes two arguments, the name
of the option and the new value\.

Note that if your method doesn't store the value in the __options__ array,
the __options__ array won't get updated\.

## <a name='subsection60'></a>How can I validate an option's value?

Define a __\-validatemethod__\.

## <a name='subsection61'></a>What is a \-validatemethod?

A __\-validatemethod__ is a method that's called whenever the related option
is given a new value via the __configure__ or __configurelist__ instance
methods\. It's the method's responsibility to determine whether the new value is
valid, and throw an error if it isn't\. The __\-validatemethod__, if any, is
called before the value is stored in the __options__ array; in particular,
it's called before the __\-configuremethod__, if any\.

For example, suppose an option always takes a Boolean value\. You can ensure that
the value is in fact a valid Boolean like this:

    % snit::type dog {
        option -shots -default no -validatemethod BooleanOption

        method BooleanOption {option value} {
            if {![string is boolean -strict $value]} {
                error "expected a boolean value, got \"$value\""
            }
        }
    }
    ::dog
    % dog fido
    % fido configure -shots yes
    % fido configure -shots NotABooleanValue
    expected a boolean value, got "NotABooleanValue"
    %

Note that the same __\-validatemethod__ can be used to validate any number of
boolean options\.

Any method can be a __\-validatemethod__ provided that it takes two
arguments, the option name and the new option value\.

# <a name='section8'></a>TYPE VARIABLES

## <a name='subsection62'></a>What is a type variable?

A type variable is a private variable associated with a Snit type rather than
with a particular instance of the type\. In C\+\+ and Java, the term *static
member variable* is used for the same notion\. Type variables can be scalars or
arrays\.

## <a name='subsection63'></a>How is a scalar type variable defined?

Scalar type variables are defined in the type definition using the
__typevariable__ statement\. You can simply name it, or you can initialize it
with a value:

    snit::type mytype {
        # Define variable "greeting" and initialize it with "Howdy!"
        typevariable greeting "Howdy!"
    }

Every object of type __mytype__ now has access to a single variable called
__greeting__\.

## <a name='subsection64'></a>How is an array\-valued type variable defined?

Array\-valued type variables are also defined using the __typevariable__
command; to initialize them, include the __\-array__ option:

    snit::type mytype {
        # Define typearray variable "greetings"
        typevariable greetings -array {
            formal "Good Evening"
            casual "Howdy!"
        }
    }

## <a name='subsection65'></a>What happens if I don't initialize a type variable?

Variables do not really exist until they are given values\. If you do not
initialize a variable when you define it, then you must be sure to assign a
value to it \(in the type constructor, say\) before you reference it\.

## <a name='subsection66'></a>Are there any limitations on type variable names?

Type variable names have the same restrictions as the names of [INSTANCE
VARIABLES](#section6) do\.

## <a name='subsection67'></a>Do I need to declare my type variables in my methods?

No\. Once you've defined a type variable in the type definition, it can be used
in [INSTANCE METHODS](#section5) or [TYPE METHODS](#section9) without
declaration\. This differs from normal Tcl practice, in which all non\-local
variables in a proc need to be declared\.

Type variables are subject to the same speed/readability tradeoffs as instance
variables; see [Do I need to declare my instance variables in my
methods?](#subsection46)

## <a name='subsection68'></a>How do I pass a type variable's name to another object?

In Tk, it's common to pass a widget a variable name; for example, Tk label
widgets have a __\-textvariable__ option which names the variable which will
contain the widget's text\. This allows the program to update the label's value
just by assigning a new value to the variable\.

If you naively pass a type variable name to the label widget, you'll be confused
by the result; Tk will assume that the name names a global variable\. Instead,
you need to provide a fully\-qualified variable name\. From within an instance
method or a constructor, you can fully qualify the type variable's name using
the __mytypevar__ command:

    snit::widget mywidget {
        typevariable labeltext ""

        constructor {args} {
            # ...

            label $win.label -textvariable [mytypevar labeltext]

            # ...
        }
    }

## <a name='subsection69'></a>How do I make a type variable public?

There are two ways to do this\. The preferred way is to write a pair of [TYPE
METHODS](#section9) to set and query the type variable's value\.

Type variables are stored in the type's namespace, which has the same name as
the type itself\. Thus, you can also publicize the type variable's name in your
documentation so that clients can access it directly\. For example,

    snit::type mytype {
        typevariable myvariable
    }

    set ::mytype::myvariable "New Value"

# <a name='section9'></a>TYPE METHODS

## <a name='subsection70'></a>What is a type method?

A type method is a procedure associated with the type itself rather than with
any specific instance of the type, and called as a subcommand of the type
command\.

## <a name='subsection71'></a>How do I define a type method?

Type methods are defined in the type definition using the __typemethod__
statement:

    snit::type dog {
        # List of pedigreed dogs
        typevariable pedigreed

        typemethod pedigreedDogs {} {
            return $pedigreed
        }
    }

Suppose the __dog__ type maintains a list of the names of the dogs that have
pedigrees\. The __pedigreedDogs__ type method returns this list\.

The __typemethod__ statement looks just like a normal Tcl
__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__, except that it appears in a
__snit::type__ definition\. Notice that every type method gets an implicit
argument called __type__, which contains the fully\-qualified type name\.

## <a name='subsection72'></a>How does a client call a type method?

The type method name becomes a subcommand of the type's command\. For example,
assuming that the constructor adds each pedigreed dog to the list of
__pedigreedDogs__,

    snit::type dog {
        option -pedigreed 0

        # List of pedigreed dogs
        typevariable pedigreed

        typemethod pedigreedDogs {} {
            return $pedigreed
        }

        # ...
    }

    dog spot -pedigreed 1
    dog fido

    foreach dog [dog pedigreedDogs] { ... }

## <a name='subsection73'></a>Are there any limitations on type method names?

Not really, so long as you avoid the standard type method names: __create__,
__destroy__, and __info__\.

## <a name='subsection74'></a>How do I make a type method private?

It's sometimes useful to define private type methods, that is, type methods
intended to be called only by other type or instance methods of the same object\.

Snit doesn't implement any access control on type methods; by convention, the
names of public methods begin with a lower\-case letter, and the names of private
methods begin with an upper\-case letter\.

Alternatively, a Snit __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ can be used
as a private type method; see [PROCS](#section10)\.

## <a name='subsection75'></a>Are there any limitations on type method arguments?

Method argument lists are defined just like normal Tcl proc argument lists; in
particular, they can include arguments with default values and the __args__
argument\.

However, every type method is called with an implicit argument called
__type__ that contains the name of the type command\. In addition, type
methods should by convention avoid using the names of the arguments implicitly
defined for [INSTANCE METHODS](#section5)\.

## <a name='subsection76'></a>How does an instance or type method call a type method?

If an instance or type method needs to call a type method, it should use
__$type__ to do so:

    snit::type dog {

        typemethod pedigreedDogs {} { ... }

        typemethod printPedigrees {} {
            foreach obj [$type pedigreedDogs] { ... }
        }
    }

## <a name='subsection77'></a>How do I pass a type method as a callback?

It's common in Tcl to pass a snippet of code to another object, for it to call
later\. Because types cannot be renamed, you can just use the type name, or, if
the callback is registered from within a type method, __type__\. For example,
suppose we want to print a list of pedigreed dogs when a Tk button is pushed:

    button .btn -text "Pedigrees" -command [list dog printPedigrees]
    pack .btn

Alternatively, from a method or type method you can use the __mytypemethod__
command, just as you would use __mymethod__ to define a callback command for
[INSTANCE METHODS](#section5)\.

## <a name='subsection78'></a>Can type methods be hierarchical?

Yes, you can define hierarchical type methods in just the same way as you can
define hierarchical instance methods\. See [INSTANCE METHODS](#section5) for
more\.

# <a name='section10'></a>PROCS

## <a name='subsection79'></a>What is a proc?

A Snit __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ is really just a Tcl proc
defined within the type's namespace\. You can use procs for private code that
isn't related to any particular instance\.

## <a name='subsection80'></a>How do I define a proc?

Procs are defined by including a __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__
statement in the type definition:

    snit::type mytype {
        # Pops and returns the first item from the list stored in the
        # listvar, updating the listvar
       proc pop {listvar} { ... }

       # ...
    }

## <a name='subsection81'></a>Are there any limitations on proc names?

Any name can be used, so long as it does not begin with __Snit\___; names
beginning with __Snit\___ are reserved for Snit's own use\. However, the wise
programmer will avoid __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ names
\(__[set](\.\./\.\./\.\./\.\./index\.md\#set)__,
__[list](\.\./\.\./\.\./\.\./index\.md\#list)__, __if__, etc\.\) that would
shadow standard Tcl command names\.

__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ names, being private, should begin
with a capital letter according to convention; however, as there are typically
no public __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__s in the type's namespace
it doesn't matter much either way\.

## <a name='subsection82'></a>How does a method call a proc?

Just like it calls any Tcl command\. For example,

    snit::type mytype {
        # Pops and returns the first item from the list stored in the
        # listvar, updating the listvar
        proc pop {listvar} { ... }

        variable requestQueue {}

        # Get one request from the queue and process it.
        method processRequest {} {
            set req [pop requestQueue]
        }
    }

## <a name='subsection83'></a>How can I pass a proc to another object as a callback?

The __myproc__ command returns a callback command for the
__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__, just as __mymethod__ does for
a method\.

# <a name='section11'></a>TYPE CONSTRUCTORS

## <a name='subsection84'></a>What is a type constructor?

A type constructor is a body of code that initializes the type as a whole,
rather like a C\+\+ static initializer\. The body of a type constructor is executed
once when the type is defined, and never again\.

A type can have at most one type constructor\.

## <a name='subsection85'></a>How do I define a type constructor?

A type constructor is defined by using the __typeconstructor__ statement in
the type definition\. For example, suppose the type uses an array\-valued type
variable as a look\-up table, and the values in the array have to be computed at
start\-up\.

    % snit::type mytype {
        typevariable lookupTable

        typeconstructor {
            array set lookupTable {key value...}
        }
    }

# <a name='section12'></a>CONSTRUCTORS

## <a name='subsection86'></a>What is a constructor?

In object\-oriented programming, an object's constructor is responsible for
initializing the object completely at creation time\. The constructor receives
the list of options passed to the __snit::type__ command's __create__
method and can then do whatever it likes\. That might include computing instance
variable values, reading data from files, creating other objects, updating type
and instance variables, and so forth\.

The constructor's return value is ignored \(unless it's an error, of course\)\.

## <a name='subsection87'></a>How do I define a constructor?

A constructor is defined by using the __constructor__ statement in the type
definition\. Suppose that it's desired to keep a list of all pedigreed dogs\. The
list can be maintained in a type variable and retrieved by a type method\.
Whenever a dog is created, it can add itself to the list\-\-provided that it's
registered with the American Kennel Club\.

    % snit::type dog {
        option -akc 0

        typevariable akcList {}

        constructor {args} {
            $self configurelist $args

            if {$options(-akc)} {
                lappend akcList $self
            }
        }

        typemethod akclist {} {
            return $akcList
        }
    }
    ::dog
    % dog spot -akc 1
    ::spot
    % dog fido
    ::fido
    % dog akclist
    ::spot
    %

## <a name='subsection88'></a>What does the default constructor do?

If you don't provide a constructor explicitly, you get the default constructor,
which is identical to the explicitly\-defined constructor shown here:

    snit::type dog {
        constructor {args} {
            $self configurelist $args
        }
    }

When the constructor is called, __args__ will be set to the list of
arguments that follow the object's name\. The constructor is allowed to interpret
this list any way it chooses; the normal convention is to assume that it's a
list of option names and values, as shown in the example above\. If you simply
want to save the option values, you should use the __configurelist__ method,
as shown\.

## <a name='subsection89'></a>Can I choose a different set of arguments for the constructor?

Yes, you can\. For example, suppose we wanted to be sure that the breed was
explicitly stated for every dog at creation time, and couldn't be changed
thereafter\. One way to do that is as follows:

    % snit::type dog {
        variable breed

        option -color brown
        option -akc 0

        constructor {theBreed args} {
            set breed $theBreed
            $self configurelist $args
        }

        method breed {} { return $breed }
    }
    ::dog
    % dog spot dalmatian -color spotted -akc 1
    ::spot
    % spot breed
    dalmatian

The drawback is that this syntax is non\-standard, and may limit the
compatibility of your new type with other people's code\. For example, Snit
assumes that it can create [COMPONENTS](#section14) using the standard
creation syntax\.

## <a name='subsection90'></a>Are there any limitations on constructor arguments?

Constructor argument lists are subject to the same limitations as those on
instance method argument lists\. It has the same implicit arguments, and can
contain default values and the __args__ argument\.

## <a name='subsection91'></a>Is there anything special about writing the constructor?

Yes\. Writing the constructor can be tricky if you're delegating options to
components, and there are specific issues relating to __snit::widget__s and
__snit::widgetadaptor__s\. See [DELEGATION](#section16),
[WIDGETS](#section17), [WIDGET ADAPTORS](#section18), and [THE TK
OPTION DATABASE](#section19)\.

# <a name='section13'></a>DESTRUCTORS

## <a name='subsection92'></a>What is a destructor?

A destructor is a special kind of method that's called when an object is
destroyed\. It's responsible for doing any necessary clean\-up when the object
goes away: destroying [COMPONENTS](#section14), closing files, and so
forth\.

## <a name='subsection93'></a>How do I define a destructor?

Destructors are defined by using the __destructor__ statement in the type
definition\.

Suppose we're maintaining a list of pedigreed dogs; then we'll want to remove
dogs from it when they are destroyed\.

    snit::type dog {
        option -akc 0

        typevariable akcList {}

        constructor {args} {
            $self configurelist $args

            if {$options(-akc)} {
                lappend akcList $self
            }
        }

        destructor {
            set ndx [lsearch $akcList $self]

            if {$ndx != -1} {
                set akcList [lreplace $akcList $ndx $ndx]
            }
        }

        typemethod akclist {} {
            return $akcList
        }
    }

## <a name='subsection94'></a>Are there any limitations on destructor arguments?

Yes; a destructor has no explicit arguments\.

## <a name='subsection95'></a>What implicit arguments are passed to the destructor?

The destructor gets the same implicit arguments that are passed to [INSTANCE
METHODS](#section5): __type__, __selfns__, __win__, and
__self__\.

## <a name='subsection96'></a>Must components be destroyed explicitly?

Yes and no\.

Any Tk widgets created by a __snit::widget__ or __snit::widgetadaptor__
will be destroyed automatically by Tk when the megawidget is destroyed, in
keeping with normal Tk behavior \(destroying a parent widget destroys the whole
tree\)\.

Components of normal __snit::types__, on the other hand, are never destroyed
automatically, nor are non\-widget components of Snit megawidgets\. If your object
creates them in its constructor, then it should generally destroy them in its
destructor\.

## <a name='subsection97'></a>Is there any special about writing a destructor?

Yes\. If an object's constructor throws an error, the object's destructor will be
called to clean up; this means that the object might not be completely
constructed when the destructor is called\. This can cause the destructor to
throw its own error; the result is usually misleading, confusing, and unhelpful\.
Consequently, it's important to write your destructor so that it's fail\-safe\.

For example, a __dog__ might create a __tail__ component; the component
will need to be destroyed\. But suppose there's an error while processing the
creation options\-\-the destructor will be called, and there will be no
__tail__ to destroy\. The simplest solution is generally to catch and ignore
any errors while destroying components\.

    snit::type dog {
        component tail

        constructor {args} {
            $self configurelist $args

            set tail [tail %AUTO%]
        }

        destructor {
            catch {$tail destroy}
        }
    }

# <a name='section14'></a>COMPONENTS

## <a name='subsection98'></a>What is a component?

Often an object will create and manage a number of other objects\. A Snit
megawidget, for example, will often create a number of Tk widgets\. These objects
are part of the main object; it is composed of them, so they are called
components of the object\.

But Snit also has a more precise meaning for [COMPONENT](#section14)\. The
components of a Snit object are those objects to which methods or options can be
delegated\. \(See [DELEGATION](#section16) for more information about
delegation\.\)

## <a name='subsection99'></a>How do I declare a component?

First, you must decide what role a component plays within your object, and give
the role a name\. Then, you declare the component using its role name and the
__component__ statement\. The __component__ statement declares an
*instance variable* which is used to store the component's command name when
the component is created\.

For example, suppose your __dog__ object creates a __tail__ object \(the
better to wag with, no doubt\):

    snit::type dog {
        component mytail

        constructor {args} {
            # Create and save the component's command
            set mytail [tail %AUTO% -partof $self]
            $self configurelist $args
        }

        method wag {} {
            $mytail wag
        }
    }

As shown here, it doesn't matter what the __tail__ object's real name is;
the __dog__ object refers to it by its component name\.

The above example shows one way to delegate the __wag__ method to the
__mytail__ component; see [DELEGATION](#section16) for an easier way\.

## <a name='subsection100'></a>How is a component named?

A component has two names\. The first name is that of the component variable;
this represents the role the component object plays within the Snit object\. This
is the component name proper, and is the name used to refer to the component
within Snit code\. The second name is the name of the actual component object
created by the Snit object's constructor\. This second name is always a Tcl
command name, and is referred to as the component's object name\.

In the example in the previous question, the component name is __mytail__;
the __mytail__ component's object name is chosen automatically by Snit since
__%AUTO%__ was used when the component object was created\.

## <a name='subsection101'></a>Are there any limitations on component names?

Yes\. __snit::widget__ and __snit::widgetadaptor__ objects have a special
component called the __hull__ component; thus, the name __hull__ should
be used for no other purpose\.

Otherwise, since component names are in fact instance variable names they must
follow the rules for [INSTANCE VARIABLES](#section6)\.

## <a name='subsection102'></a>What is an owned component?

An *owned* component is a component whose object command's lifetime is
controlled by the __snit::type__ or __snit::widget__\.

As stated above, a component is an object to which our object can delegate
methods or options\. Under this definition, our object will usually create its
component objects, but not necessarily\. Consider the following: a dog object has
a tail component; but tail knows that it's part of the dog:

    snit::type dog {
        component mytail

        constructor {args} {
            set mytail [tail %AUTO% -partof $self]
            $self configurelist $args
        }

        destructor {
            catch {$mytail destroy}
        }

        delegate method wagtail to mytail as wag

        method bark {} {
            return "$self barked."
        }
    }

     snit::type tail {
         component mydog
         option -partof -readonly yes

         constructor {args} {
             $self configurelist $args
             set mydog $options(-partof)
         }

         method wag {} {
             return "Wag, wag."
         }

         method pull {} {
             $mydog bark
         }
     }

Thus, if you ask a dog to wag its tail, it tells its tail to wag; and if you
pull the dog's tail, the tail tells the dog to bark\. In this scenario, the tail
is a component of the dog, and the dog is a component of the tail, but the dog
owns the tail and not the other way around\.

## <a name='subsection103'></a>What does the install command do?

The __install__ command creates an owned component using a specified
command, and assigns the result to the component's instance variable\. For
example:

    snit::type dog {
        component mytail

        constructor {args} {
            # set mytail [tail %AUTO% -partof $self]
            install mytail using tail %AUTO% -partof $self
            $self configurelist $args
        }
    }

In a __snit::type__'s code, the __install__ command shown above is
equivalent to the __set mytail__ command that's commented out\. In a
__snit::widget__'s or __snit::widgetadaptor__'s, code, however, the
__install__ command also queries [THE TK OPTION DATABASE](#section19)
and initializes the new component's options accordingly\. For consistency, it's a
good idea to get in the habit of using __install__ for all owned components\.

## <a name='subsection104'></a>Must owned components be created in the constructor?

No, not necessarily\. In fact, there's no reason why an object can't destroy and
recreate a component multiple times over its own lifetime\.

## <a name='subsection105'></a>Are there any limitations on component object names?

Yes\.

Component objects which are Tk widgets or megawidgets must have valid Tk window
names\.

Component objects which are not widgets or megawidgets must have fully\-qualified
command names, i\.e\., names which include the full namespace of the command\. Note
that Snit always creates objects with fully qualified names\.

Next, the object names of components and owned by your object must be unique\.
This is no problem for widget components, since widget names are always unique;
but consider the following code:

    snit::type tail { ... }

    snit::type dog {
        delegate method wag to mytail

        constructor {} {
            install mytail using tail mytail
        }
    }

This code uses the component name, __mytail__, as the component object name\.
This is not good, and here's why: Snit instance code executes in the Snit type's
namespace\. In this case, the __mytail__ component is created in the
__::dog::__ namespace, and will thus have the name __::dog::mytail__\.

Now, suppose you create two dogs\. Both dogs will attempt to create a tail called
__::dog::mytail__\. The first will succeed, and the second will fail, since
Snit won't let you create an object if its name is already a command\. Here are
two ways to avoid this situation:

First, if the component type is a __snit::type__ you can specify
__%AUTO%__ as its name, and be guaranteed to get a unique name\. This is the
safest thing to do:

    install mytail using tail %AUTO%

If the component type isn't a __snit::type__ you can create the component in
the object's instance namespace:

    install mytail using tail ${selfns}::mytail

Make sure you pick a unique name within the instance namespace\.

## <a name='subsection106'></a>Must I destroy the components I own?

That depends\. When a parent widget is destroyed, all child widgets are destroyed
automatically\. Thus, if your object is a __snit::widget__ or
__snit::widgetadaptor__ you don't need to destroy any components that are
widgets, because they will generally be children or descendants of your
megawidget\.

If your object is an instance of __snit::type__, though, none of its owned
components will be destroyed automatically, nor will be non\-widget components of
a __snit::widget__ be destroyed automatically\. All such owned components
must be destroyed explicitly, or they won't be destroyed at all\.

## <a name='subsection107'></a>Can I expose a component's object command as part of my interface?

Yes, and there are two ways to do it\. The most appropriate way is usually to use
[DELEGATION](#section16)\. Delegation allows you to pass the options and
methods you specify along to particular components\. This effectively hides the
components from the users of your type, and ensures good encapsulation\.

However, there are times when it's appropriate, not to mention simpler, just to
make the entire component part of your type's public interface\.

## <a name='subsection108'></a>How do I expose a component's object command?

When you declare the component, specify the __component__ statement's
__\-public__ option\. The value of this option is the name of a method which
will be delegated to your component's object command\.

For example, supposed you've written a combobox megawidget which owns a listbox
widget, and you want to make the listbox's entire interface public\. You can do
it like this:

    snit::widget combobox {
         component listbox -public listbox

         constructor {args} {
             install listbox using listbox $win.listbox ....
         }
    }

    combobox .mycombo
    .mycombo listbox configure -width 30

Your comobox widget, __\.mycombo__, now has a __listbox__ method which
has all of the same subcommands as the listbox widget itself\. Thus, the above
code sets the listbox component's width to 30\.

Usually you'll let the method name be the same as the component name; however,
you can name it anything you like\.

# <a name='section15'></a>TYPE COMPONENTS

## <a name='subsection109'></a>What is a type component?

A type component is a component that belongs to the type itself instead of to a
particular instance of the type\. The relationship between components and type
components is the same as the relationship between [INSTANCE
VARIABLES](#section6) and [TYPE VARIABLES](#section8)\. Both [INSTANCE
METHODS](#section5) and [TYPE METHODS](#section9) can be delegated to
type components\.

Once you understand [COMPONENTS](#section14) and
[DELEGATION](#section16), type components are just more of the same\.

## <a name='subsection110'></a>How do I declare a type component?

Declare a type component using the __typecomponent__ statement\. It takes the
same options \(__\-inherit__ and __\-public__\) as the __component__
statement does, and defines a type variable to hold the type component's object
command\.

Suppose in your model you've got many dogs, but only one veterinarian\. You might
make the veterinarian a type component\.

    snit::type veterinarian { ... }

    snit::type dog {
        typecomponent vet

        # ...
    }

## <a name='subsection111'></a>How do I install a type component?

Just use the __[set](\.\./\.\./\.\./\.\./index\.md\#set)__ command to assign the
component's object command to the type component\. Because types \(even
__snit::widget__ types\) are not widgets, and do not have options anyway, the
extra features of the __install__ command are not needed\.

You'll usually install type components in the type constructor, as shown here:

    snit::type veterinarian { ... }

    snit::type dog {
        typecomponent vet

        typeconstructor {
            set vet [veterinarian %AUTO%]
        }
    }

## <a name='subsection112'></a>Are there any limitations on type component names?

Yes, the same as on [INSTANCE VARIABLES](#section6), [TYPE
VARIABLES](#section8), and normal [COMPONENTS](#section14)\.

# <a name='section16'></a>DELEGATION

## <a name='subsection113'></a>What is delegation?

Delegation, simply put, is when you pass a task you've been given to one of your
assistants\. \(You do have assistants, don't you?\) Snit objects can do the same
thing\. The following example shows one way in which the __dog__ object can
delegate its __wag__ method and its __\-taillength__ option to its
__tail__ component\.

    snit::type dog {
        variable mytail

        option -taillength -configuremethod SetTailOption -cgetmethod GetTailOption

        method SetTailOption {option value} {
             $mytail configure $option $value
        }

        method GetTailOption {option} {
             $mytail cget $option
        }

        method wag {} {
            $mytail wag
        }

        constructor {args} {
            install mytail using tail %AUTO% -partof $self
            $self configurelist $args
        }

    }

This is the hard way to do it, by it demonstrates what delegation is all about\.
See the following answers for the easy way to do it\.

Note that the constructor calls the __configurelist__ method
__[after](\.\./\.\./\.\./\.\./index\.md\#after)__ it creates its __tail__;
otherwise, if __\-taillength__ appeared in the list of __args__ we'd get
an error\.

## <a name='subsection114'></a>How can I delegate a method to a component object?

Delegation occurs frequently enough that Snit makes it easy\. Any method can be
delegated to any component or type component by placing a single
__delegate__ statement in the type definition\. \(See
[COMPONENTS](#section14) and [TYPE COMPONENTS](#section15) for more
information about component names\.\)

For example, here's a much better way to delegate the __dog__ object's
__wag__ method:

    % snit::type dog {
        delegate method wag to mytail

        constructor {} {
            install mytail using tail %AUTO%
        }
    }
    ::dog
    % snit::type tail {
        method wag {} { return "Wag, wag, wag."}
    }
    ::tail
    % dog spot
    ::spot
    % spot wag
    Wag, wag, wag.

This code has the same effect as the code shown under the previous question:
when a __dog__'s __wag__ method is called, the call and its arguments
are passed along automatically to the __tail__ object\.

Note that when a component is mentioned in a __delegate__ statement, the
component's instance variable is defined implicitly\. However, it's still good
practice to declare it explicitly using the __component__ statement\.

Note also that you can define a method name using the
__[method](\.\./\.\./\.\./\.\./index\.md\#method)__ statement, or you can define
it using __delegate__; you can't do both\.

## <a name='subsection115'></a>Can I delegate to a method with a different name?

Suppose you wanted to delegate the __dog__'s __wagtail__ method to the
__tail__'s __wag__ method\. After all you wag the tail, not the dog\. It's
easily done:

    snit::type dog {
        delegate method wagtail to mytail as wag

        constructor {args} {
            install mytail using tail %AUTO% -partof $self
            $self configurelist $args
        }
    }

## <a name='subsection116'></a>Can I delegate to a method with additional arguments?

Suppose the __tail__'s __wag__ method takes as an argument the number of
times the tail should be wagged\. You want to delegate the __dog__'s
__wagtail__ method to the __tail__'s __wag__ method, specifying that
the tail should be wagged exactly three times\. This is easily done, too:

    snit::type dog {
        delegate method wagtail to mytail as {wag 3}
        # ...
    }

    snit::type tail {
        method wag {count} {
            return [string repeat "Wag " $count]
        }
        # ...
    }

## <a name='subsection117'></a>Can I delegate a method to something other than an object?

Normal method delegation assumes that you're delegating a method \(a subcommand
of an object command\) to a method of another object \(a subcommand of a different
object command\)\. But not all Tcl objects follow Tk conventions, and not
everything you'd to which you'd like to delegate a method is necessary an
object\. Consequently, Snit makes it easy to delegate a method to pretty much
anything you like using the __delegate__ statement's __using__ clause\.

Suppose your dog simulation stores dogs in a database, each dog as a single
record\. The database API you're using provides a number of commands to manage
records; each takes the record ID \(a string you choose\) as its first argument\.
For example, __saverec__ saves a record\. If you let the record ID be the
name of the dog object, you can delegate the dog's __save__ method to the
__saverec__ command as follows:

    snit::type dog {
        delegate method save using {saverec %s}
    }

The __%s__ is replaced with the instance name when the __save__ method
is called; any additional arguments are the appended to the resulting command\.

The __using__ clause understands a number of other %\-conversions; in
addition to the instance name, you can substitute in the method name
\(__%m__\), the type name \(__%t__\), the instance namespace \(__%n__\),
the Tk window name \(__%w__\), and, if a component or typecomponent name was
given in the __delegate__ statement, the component's object command
\(__%c__\)\.

## <a name='subsection118'></a>How can I delegate a method to a type component object?

Just exactly as you would to a component object\. The __delegate method__
statement accepts both component and type component names in its __to__
clause\.

## <a name='subsection119'></a>How can I delegate a type method to a type component object?

Use the __delegate typemethod__ statement\. It works like __delegate
method__, with these differences: first, it defines a type method instead of
an instance method; second, the __using__ clause ignores the __%s__,
__%n__, and __%w__ %\-conversions\.

Naturally, you can't delegate a type method to an instance component\.\.\.Snit
wouldn't know which instance should receive it\.

## <a name='subsection120'></a>How can I delegate an option to a component object?

The first question in this section \(see [DELEGATION](#section16)\) shows one
way to delegate an option to a component; but this pattern occurs often enough
that Snit makes it easy\. For example, every __tail__ object has a
__\-length__ option; we want to allow the creator of a __dog__ object to
set the tail's length\. We can do this:

    % snit::type dog {
        delegate option -length to mytail

        constructor {args} {
            install mytail using tail %AUTO% -partof $self
            $self configurelist $args
        }
    }
    ::dog
    % snit::type tail {
        option -partof
        option -length 5
    }
    ::tail
    % dog spot -length 7
    ::spot
    % spot cget -length
    7

This produces nearly the same result as the __\-configuremethod__ and
__\-cgetmethod__ shown under the first question in this section: whenever a
__dog__ object's __\-length__ option is set or retrieved, the underlying
__tail__ object's option is set or retrieved in turn\.

Note that you can define an option name using the __option__ statement, or
you can define it using __delegate__; you can't do both\.

## <a name='subsection121'></a>Can I delegate to an option with a different name?

In the previous answer we delegated the __dog__'s __\-length__ option
down to its __tail__\. This is, of course, wrong\. The dog has a length, and
the tail has a length, and they are different\. What we'd really like to do is
give the __dog__ a __\-taillength__ option, but delegate it to the
__tail__'s __\-length__ option:

    snit::type dog {
        delegate option -taillength to mytail as -length

        constructor {args} {
            set mytail [tail %AUTO% -partof $self]
            $self configurelist $args
        }
    }

## <a name='subsection122'></a>How can I delegate any unrecognized method or option to a component object?

It may happen that a Snit object gets most of its behavior from one of its
components\. This often happens with __snit::widgetadaptors__, for example,
where we wish to slightly the modify the behavior of an existing widget\. To
carry on with our __dog__ example, however, suppose that we have a
__snit::type__ called __animal__ that implements a variety of animal
behaviors\-\-moving, eating, sleeping, and so forth\. We want our __dog__
objects to inherit these same behaviors, while adding dog\-like behaviors of its
own\. Here's how we can give a __dog__ methods and options of its own while
delegating all other methods and options to its __animal__ component:

    snit::type dog {
        delegate option * to animal
        delegate method * to animal

        option -akc 0

        constructor {args} {
            install animal using animal %AUTO% -name $self
            $self configurelist $args
        }

        method wag {} {
            return "$self wags its tail"
        }
    }

That's it\. A __dog__ is now an __animal__ that has a __\-akc__ option
and can __wag__ its tail\.

Note that we don't need to specify the full list of method names or option names
that __animal__ will receive\. It gets anything __dog__ doesn't
recognize\-\-and if it doesn't recognize it either, it will simply throw an error,
just as it should\.

You can also delegate all unknown type methods to a type component using
__delegate typemethod \*__\.

## <a name='subsection123'></a>How can I delegate all but certain methods or options to a component?

In the previous answer, we said that every __dog__ is an __animal__ by
delegating all unknown methods and options to the __animal__ component\. But
what if the __animal__ type has some methods or options that we'd like to
suppress?

One solution is to explicitly delegate all the options and methods, and forgo
the convenience of __delegate method \*__ and __delegate option \*__\. But
if we wish to suppress only a few options or methods, there's an easier way:

    snit::type dog {
        delegate option * to animal except -numlegs
        delegate method * to animal except {fly climb}

        # ...

        constructor {args} {
            install animal using animal %AUTO% -name $self -numlegs 4
            $self configurelist $args
        }

        # ...
    }

Dogs have four legs, so we specify that explicitly when we create the
__animal__ component, and explicitly exclude __\-numlegs__ from the set
of delegated options\. Similarly, dogs can neither __fly__ nor __climb__,
so we exclude those __animal__ methods as shown\.

## <a name='subsection124'></a>Can a hierarchical method be delegated?

Yes; just specify multiple words in the delegated method's name:

    snit::type tail {
        method wag {} {return "Wag, wag"}
        method droop {} {return "Droop, droop"}
    }

    snit::type dog {
        delegate method {tail wag} to mytail
        delegate method {tail droop} to mytail

        # ...

        constructor {args} {
            install mytail using tail %AUTO%
            $self configurelist $args
        }

        # ...
    }

Unrecognized hierarchical methods can also be delegated; the following code
delegates all subcommands of the "tail" method to the "mytail" component:

    snit::type dog {
        delegate method {tail *} to mytail

        # ...
    }

# <a name='section17'></a>WIDGETS

## <a name='subsection125'></a>What is a snit::widget?

A __snit::widget__ is the Snit version of what Tcl programmers usually call
a *megawidget*: a widget\-like object usually consisting of one or more Tk
widgets all contained within a Tk frame\.

A __snit::widget__ is also a special kind of __snit::type__\. Just about
everything in this FAQ list that relates to __snit::types__ also applies to
__snit::widgets__\.

## <a name='subsection126'></a>How do I define a snit::widget?

__snit::widgets__ are defined using the __snit::widget__ command, just
as __snit::types__ are defined by the __snit::type__ command\.

The body of the definition can contain all of the same kinds of statements, plus
a couple of others which will be mentioned below\.

## <a name='subsection127'></a>How do snit::widgets differ from snit::types?

  - The name of an instance of a __snit::type__ can be any valid Tcl command
    name, in any namespace\. The name of an instance of a __snit::widget__
    must be a valid Tk widget name, and its parent widget must already exist\.

  - An instance of a __snit::type__ can be destroyed by calling its
    __destroy__ method\. Instances of a __snit::widget__ have no destroy
    method; use the Tk __destroy__ command instead\.

  - Every instance of a __snit::widget__ has one predefined component called
    its __hull__ component\. The hull is usually a Tk
    __[frame](\.\./\.\./\.\./\.\./index\.md\#frame)__ or __toplevel__ widget;
    any other widgets created as part of the __snit::widget__ will usually
    be contained within the hull\.

  - __snit::widget__s can have their options receive default values from
    [THE TK OPTION DATABASE](#section19)\.

## <a name='subsection128'></a>What is a hull component?

Snit can't create a Tk widget object; only Tk can do that\. Thus, every instance
of a __snit::widget__ must be wrapped around a genuine Tk widget; this Tk
widget is called the *hull component*\. Snit effectively piggybacks the
behavior you define \(methods, options, and so forth\) on top of the hull
component so that the whole thing behaves like a standard Tk widget\.

For __snit::widget__s the hull component must be a Tk widget that defines
the __\-class__ option\.

__snit::widgetadaptor__s differ from __snit::widget__s chiefly in that
any kind of widget can be used as the hull component; see [WIDGET
ADAPTORS](#section18)\.

## <a name='subsection129'></a>How can I set the hull type for a snit::widget?

A __snit::widget__'s hull component will usually be a Tk
__[frame](\.\./\.\./\.\./\.\./index\.md\#frame)__ widget; however, it may be any
Tk widget that defines the __\-class__ option\. You can explicitly choose the
hull type you prefer by including the __hulltype__ command in the widget
definition:

    snit::widget mytoplevel {
        hulltype toplevel

        # ...
    }

If no __hulltype__ command appears, the hull will be a
__[frame](\.\./\.\./\.\./\.\./index\.md\#frame)__\.

By default, Snit recognizes the following hull types: the Tk widgets
__[frame](\.\./\.\./\.\./\.\./index\.md\#frame)__, __labelframe__,
__toplevel__, and the Tile widgets __ttk::frame__,
__ttk::labelframe__, and __ttk::toplevel__\. To enable the use of some
other kind of widget as the hull type, you can __lappend__ the widget
command to the variable __snit::hulltypes__ \(always provided the widget
defines the __\-class__ option\. For example, suppose Tk gets a new widget
type called a __prettyframe__:

    lappend snit::hulltypes prettyframe

    snit::widget mywidget {
        hulltype prettyframe

        # ...
    }

## <a name='subsection130'></a>How should I name widgets which are components of a snit::widget?

Every widget, whether a genuine Tk widget or a Snit megawidget, has to have a
valid Tk window name\. When a __snit::widget__ is first created, its instance
name, __self__, is a Tk window name; however, if the __snit::widget__ is
used as the hull component by a __snit::widgetadaptor__ its instance name
will be changed to something else\. For this reason, every __snit::widget__
method, constructor, destructor, and so forth is passed another implicit
argument, __win__, which is the window name of the megawidget\. Any children
should be named using __win__ as the root\.

Thus, suppose you're writing a toolbar widget, a frame consisting of a number of
buttons placed side\-by\-side\. It might look something like this:

    snit::widget toolbar {
        delegate option * to hull

        constructor {args} {
            button $win.open -text Open -command [mymethod open]
            button $win.save -text Save -command [mymethod save]

            # ....

            $self configurelist $args

        }
    }

See also the question on renaming objects, toward the top of this file\.

# <a name='section18'></a>WIDGET ADAPTORS

## <a name='subsection131'></a>What is a snit::widgetadaptor?

A __snit::widgetadaptor__ is a kind of __snit::widget__\. Whereas a
__snit::widget__'s hull is automatically created and is always a Tk frame, a
__snit::widgetadaptor__ can be based on any Tk widget\-\-or on any Snit
megawidget, or even \(with luck\) on megawidgets defined using some other package\.

It's called a *widget adaptor* because it allows you to take an existing
widget and customize its behavior\.

## <a name='subsection132'></a>How do I define a snit::widgetadaptor?

Use the __snit::widgetadaptor__ command\. The definition for a
__snit::widgetadaptor__ looks just like that for a __snit::type__ or
__snit::widget__, except that the constructor must create and install the
hull component\.

For example, the following code creates a read\-only text widget by the simple
device of turning its __insert__ and __delete__ methods into no\-ops\.
Then, we define new methods, __ins__ and __del__, which get delegated to
the hull component as __insert__ and __delete__\. Thus, we've adapted the
text widget and given it new behavior while still leaving it fundamentally a
text widget\.

    ::snit::widgetadaptor rotext {

        constructor {args} {
            # Create the text widget; turn off its insert cursor
            installhull using text -insertwidth 0

            # Apply any options passed at creation time.
            $self configurelist $args
        }

        # Disable the text widget's insert and delete methods, to
        # make this readonly.
        method insert {args} {}
        method delete {args} {}

        # Enable ins and del as synonyms, so the program can insert and
        # delete.
        delegate method ins to hull as insert
        delegate method del to hull as delete

        # Pass all other methods and options to the real text widget, so
        # that the remaining behavior is as expected.
        delegate method * to hull
        delegate option * to hull
    }

The most important part is in the constructor\. Whereas __snit::widget__
creates the hull for you, __snit::widgetadaptor__ cannot \-\- it doesn't know
what kind of widget you want\. So the first thing the constructor does is create
the hull component \(a Tk text widget in this case\), and then installs it using
the __installhull__ command\.

*Note:* There is no instance command until you create one by installing a hull
component\. Any attempt to pass methods to __$self__ prior to calling
__installhull__ will fail\.

## <a name='subsection133'></a>Can I adapt a widget created elsewhere in the program?

Yes\.

At times, it can be convenient to adapt a pre\-existing widget instead of
creating your own\. For example, the Bwidget __PagesManager__ widget manages
a set of __[frame](\.\./\.\./\.\./\.\./index\.md\#frame)__ widgets, only one of
which is visible at a time\. The application chooses which
__[frame](\.\./\.\./\.\./\.\./index\.md\#frame)__ is visible\. All of the These
__[frame](\.\./\.\./\.\./\.\./index\.md\#frame)__s are created by the
__PagesManager__ itself, using its __add__ method\. It's convenient to
adapt these frames to do what we'd like them to do\.

In a case like this, the Tk widget will already exist when the
__snit::widgetadaptor__ is created\. Snit provides an alternate form of the
__installhull__ command for this purpose:

    snit::widgetadaptor pageadaptor {
        constructor {args} {
            # The widget already exists; just install it.
            installhull $win

            # ...
        }
    }

## <a name='subsection134'></a>Can I adapt another megawidget?

Maybe\. If the other megawidget is a __snit::widget__ or
__snit::widgetadaptor__, then yes\. If it isn't then, again, maybe\. You'll
have to try it and see\. You're most likely to have trouble with widget
destruction\-\-you have to make sure that your megawidget code receives the
__<Destroy>__ event before the megawidget you're adapting does\.

# <a name='section19'></a>THE TK OPTION DATABASE

## <a name='subsection135'></a>What is the Tk option database?

The Tk option database is a database of default option values maintained by Tk
itself; every Tk application has one\. The concept of the option database derives
from something called the X Windows resource database; however, the option
database is available in every Tk implementation, including those which do not
use the X Windows system \(e\.g\., Microsoft Windows\)\.

Full details about the Tk option database are beyond the scope of this document;
both *Practical Programming in Tcl and Tk* by Welch, Jones, and Hobbs, and
*Effective Tcl/Tk Programming* by Harrison and McClennan\., have good
introductions to it\.

Snit is implemented so that most of the time it will simply do the right thing
with respect to the option database, provided that the widget developer does the
right thing by Snit\. The body of this section goes into great deal about what
Snit requires\. The following is a brief statement of the requirements, for
reference\.

  - If the widget's default widget class is not what is desired, set it
    explicitly using the __widgetclass__ statement in the widget definition\.

  - When defining or delegating options, specify the resource and class names
    explicitly when necessary\.

  - Use the __installhull using__ command to create and install the hull for
    __snit::widgetadaptor__s\.

  - Use the __install__ command to create and install all components which
    are widgets\.

  - Use the __install__ command to create and install components which
    aren't widgets if you'd like them to receive option values from the option
    database\.

The interaction of Tk widgets with the option database is a complex thing; the
interaction of Snit with the option database is even more so, and repays
attention to detail\.

## <a name='subsection136'></a>Do snit::types use the Tk option database?

No, they don't; querying the option database requires a Tk window name, and
__snit::type__s don't have one\.

If you create an instance of a __snit::type__ as a component of a
__snit::widget__ or __snit::widgetadaptor__, on the other hand, and if
any options are delegated to the component, and if you use __install__ to
create and install it, then the megawidget will query the option database on the
__snit::type__'s behalf\. This might or might not be what you want, so take
care\.

## <a name='subsection137'></a>What is my snit::widget's widget class?

Every Tk widget has a "widget class": a name that is used when adding option
settings to the database\. For Tk widgets, the widget class is the same as the
widget command name with an initial capital\. For example, the widget class of
the Tk __button__ widget is __Button__\.

Similarly, the widget class of a __snit::widget__ defaults to the
unqualified type name with the first letter capitalized\. For example, the widget
class of

    snit::widget ::mylibrary::scrolledText { ... }

is __ScrolledText__\.

The widget class can also be set explicitly using the __widgetclass__
statement within the __snit::widget__ definition:

    snit::widget ::mylibrary::scrolledText {
        widgetclass Text

        # ...
    }

The above definition says that a __scrolledText__ megawidget has the same
widget class as an ordinary __[text](\.\./\.\./\.\./\.\./index\.md\#text)__
widget\. This might or might not be a good idea, depending on how the rest of the
megawidget is defined, and how its options are delegated\.

## <a name='subsection138'></a>What is my snit::widgetadaptor's widget class?

The widget class of a __snit::widgetadaptor__ is just the widget class of
its hull widget; Snit has no control over this\.

Note that the widget class can be changed only for
__[frame](\.\./\.\./\.\./\.\./index\.md\#frame)__ and __toplevel__ widgets,
which is why these are the valid hull types for __snit::widget__s\.

Try to use __snit::widgetadaptor__s only to make small modifications to
another widget's behavior\. Then, it will usually not make sense to change the
widget's widget class anyway\.

## <a name='subsection139'></a>What are option resource and class names?

Every Tk widget option has three names: the option name, the resource name, and
the class name\. The option name begins with a hyphen and is all lowercase; it's
used when creating widgets, and with the __configure__ and __cget__
commands\.

The resource and class names are used to initialize option default values by
querying the option database\. The resource name is usually just the option name
minus the hyphen, but may contain uppercase letters at word boundaries; the
class name is usually just the resource name with an initial capital, but not
always\. For example, here are the option, resource, and class names for several
Tk __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget options:

    -background         background         Background
    -borderwidth        borderWidth        BorderWidth
    -insertborderwidth  insertBorderWidth  BorderWidth
    -padx               padX               Pad

As is easily seen, sometimes the resource and class names can be inferred from
the option name, but not always\.

## <a name='subsection140'></a>What are the resource and class names for my megawidget's options?

For options implicitly delegated to a component using __delegate option \*__,
the resource and class names will be exactly those defined by the component\. The
__configure__ method returns these names, along with the option's default
and current values:

    % snit::widget mytext {
        delegate option * to text

        constructor {args} {
            install text using text .text
            # ...
        }

        # ...
    }
    ::mytext
    % mytext .text
    .text
    % .text configure -padx
    -padx padX Pad 1 1
    %

For all other options \(whether locally defined or explicitly delegated\), the
resource and class names can be defined explicitly, or they can be allowed to
have default values\.

By default, the resource name is just the option name minus the hyphen; the the
class name is just the option name with an initial capital letter\. For example,
suppose we explicitly delegate "\-padx":

    % snit::widget mytext {
        option -myvalue 5

        delegate option -padx to text
        delegate option * to text

        constructor {args} {
            install text using text .text
            # ...
        }

        # ...
    }
    ::mytext
    % mytext .text
    .text
    % .text configure -myvalue
    -myvalue myvalue Myvalue 5 5
    % .text configure -padx
    -padx padx Padx 1 1
    %

Here the resource and class names are chosen using the default rules\. Often
these rules are sufficient, but in the case of "\-padx" we'd most likely prefer
that the option's resource and class names are the same as for the built\-in Tk
widgets\. This is easily done:

    % snit::widget mytext {
        delegate option {-padx padX Pad} to text

        # ...
    }
    ::mytext
    % mytext .text
    .text
    % .text configure -padx
    -padx padX Pad 1 1
    %

## <a name='subsection141'></a>How does Snit initialize my megawidget's locally\-defined options?

The option database is queried for each of the megawidget's locally\-defined
options, using the option's resource and class name\. If the result isn't "",
then it replaces the default value given in widget definition\. In either case,
the default can be overridden by the caller\. For example,

    option add *Mywidget.texture pebbled

    snit::widget mywidget {
        option -texture smooth
        # ...
    }

    mywidget .mywidget -texture greasy

Here, __\-texture__ would normally default to "smooth", but because of the
entry added to the option database it defaults to "pebbled"\. However, the caller
has explicitly overridden the default, and so the new widget will be "greasy"\.

## <a name='subsection142'></a>How does Snit initialize delegated options?

That depends on whether the options are delegated to the hull, or to some other
component\.

## <a name='subsection143'></a>How does Snit initialize options delegated to the hull?

A __snit::widget__'s hull is a widget, and given that its class has been set
it is expected to query the option database for itself\. The only exception
concerns options that are delegated to it with a different name\. Consider the
following code:

    option add *Mywidget.borderWidth 5
    option add *Mywidget.relief sunken
    option add *Mywidget.hullbackground red
    option add *Mywidget.background green

    snit::widget mywidget {
        delegate option -borderwidth to hull
        delegate option -hullbackground to hull as -background
        delegate option * to hull
        # ...
    }

    mywidget .mywidget

    set A [.mywidget cget -relief]
    set B [.mywidget cget -hullbackground]
    set C [.mywidget cget -background]
    set D [.mywidget cget -borderwidth]

The question is, what are the values of variables A, B, C and D?

The value of A is "sunken"\. The hull is a Tk frame which has been given the
widget class __Mywidget__; it will automatically query the option database
and pick up this value\. Since the __\-relief__ option is implicitly delegated
to the hull, Snit takes no action\.

The value of B is "red"\. The hull will automatically pick up the value "green"
for its __\-background__ option, just as it picked up the __\-relief__
value\. However, Snit knows that __\-hullbackground__ is mapped to the hull's
__\-background__ option; hence, it queries the option database for
__\-hullbackground__ and gets "red" and updates the hull accordingly\.

The value of C is also "red", because __\-background__ is implicitly
delegated to the hull; thus, retrieving it is the same as retrieving
__\-hullbackground__\. Note that this case is unusual; the __\-background__
option should probably have been excluded using the delegate statement's
__except__ clause, or \(more likely\) delegated to some other component\.

The value of D is "5", but not for the reason you think\. Note that as it is
defined above, the resource name for __\-borderwidth__ defaults to
__borderwidth__, whereas the option database entry is __borderWidth__,
in accordance with the standard Tk naming for this option\. As with
__\-relief__, the hull picks up its own __\-borderwidth__ option before
Snit does anything\. Because the option is delegated under its own name, Snit
assumes that the correct thing has happened, and doesn't worry about it any
further\. To avoid confusion, the __\-borderwidth__ option should have been
delegated like this:

    delegate option {-borderwidth borderWidth BorderWidth} to hull

For __snit::widgetadaptor__s, the case is somewhat altered\. Widget adaptors
retain the widget class of their hull, and the hull is not created automatically
by Snit\. Instead, the __snit::widgetadaptor__ must call __installhull__
in its constructor\. The normal way to do this is as follows:

    snit::widgetadaptor mywidget {
        # ...
        constructor {args} {
            # ...
            installhull using text -foreground white
            # ...
        }
        # ...
    }

In this case, the __installhull__ command will create the hull using a
command like this:

    set hull [text $win -foreground white]

The hull is a __[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget, so its
widget class is __Text__\. Just as with __snit::widget__ hulls, Snit
assumes that it will pick up all of its normal option values automatically,
without help from Snit\. Options delegated from a different name are initialized
from the option database in the same way as described above\.

In earlier versions of Snit, __snit::widgetadaptor__s were expected to call
__installhull__ like this:

    installhull [text $win -foreground white]

This form still works\-\-but Snit will not query the option database as described
above\.

## <a name='subsection144'></a>How does Snit initialize options delegated to other components?

For hull components, Snit assumes that Tk will do most of the work
automatically\. Non\-hull components are somewhat more complicated, because they
are matched against the option database twice\.

A component widget remains a widget still, and is therefore initialized from the
option database in the usual way\. A
__[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget remains a
__[text](\.\./\.\./\.\./\.\./index\.md\#text)__ widget whether it is a component
of a megawidget or not, and will be created as such\.

But then, the option database is queried for all options delegated to the
component, and the component is initialized accordingly\-\-provided that the
__install__ command is used to create it\.

Before option database support was added to Snit, the usual way to create a
component was to simply create it in the constructor and assign its command name
to the component variable:

    snit::widget mywidget {
        delegate option -background to myComp

        constructor {args} {
            set myComp [text $win.text -foreground black]
        }
    }

The drawback of this method is that Snit has no opportunity to initialize the
component properly\. Hence, the following approach is now used:

    snit::widget mywidget {
        delegate option -background to myComp

        constructor {args} {
            install myComp using text $win.text -foreground black
        }
    }

The __install__ command does the following:

  - Builds a list of the options explicitly included in the __install__
    command\-\-in this case, __\-foreground__\.

  - Queries the option database for all options delegated explicitly to the
    named component\.

  - Creates the component using the specified command, after inserting into it a
    list of options and values read from the option database\. Thus, the
    explicitly included options \(like __\-foreground__\) will override
    anything read from the option database\.

  - If the widget definition implicitly delegated options to the component using
    __delegate option \*__, then Snit calls the newly created component's
    __configure__ method to receive a list of all of the component's
    options\. From this Snit builds a list of options implicitly delegated to the
    component which were not explicitly included in the __install__ command\.
    For all such options, Snit queries the option database and configures the
    component accordingly\.

You don't really need to know all of this; just use __install__ to install
your components, and Snit will try to do the right thing\.

## <a name='subsection145'></a>What happens if I install a non\-widget as a component of widget?

A __snit::type__ never queries the option database\. However, a
__snit::widget__ can have non\-widget components\. And if options are
delegated to those components, and if the __install__ command is used to
install those components, then they will be initialized from the option database
just as widget components are\.

However, when used within a megawidget, __install__ assumes that the created
component uses a reasonably standard widget\-like creation syntax\. If it doesn't,
don't use __install__\.

# <a name='section20'></a>ENSEMBLE COMMANDS

## <a name='subsection146'></a>What is an ensemble command?

An ensemble command is a command with subcommands\. Snit objects are all ensemble
commands; however, the term more usually refers to commands like the standard
Tcl commands __[string](\.\./\.\./\.\./\.\./index\.md\#string)__,
__[file](\.\./\.\./\.\./\.\./index\.md\#file)__, and __clock__\. In a sense,
these are singleton objects\-\-there's only one instance of them\.

## <a name='subsection147'></a>How can I create an ensemble command using Snit?

There are two ways\-\-as a __snit::type__, or as an instance of a
__snit::type__\.

## <a name='subsection148'></a>How can I create an ensemble command using an instance of a snit::type?

Define a type whose [INSTANCE METHODS](#section5) are the subcommands of
your ensemble command\. Then, create an instance of the type with the desired
name\.

For example, the following code uses [DELEGATION](#section16) to create a
work\-alike for the standard __[string](\.\./\.\./\.\./\.\./index\.md\#string)__
command:

    snit::type ::mynamespace::mystringtype {
        delegate method * to stringhandler

        constructor {} {
            set stringhandler string
        }
    }

    ::mynamespace::mystringtype mystring

We create the type in a namespace, so that the type command is hidden; then we
create a single instance with the desired name\-\- __mystring__, in this case\.

This method has two drawbacks\. First, it leaves the type command floating about\.
More seriously, your shiny new ensemble command will have __info__ and
__destroy__ subcommands that you probably have no use for\. But read on\.

## <a name='subsection149'></a>How can I create an ensemble command using a snit::type?

Define a type whose [TYPE METHODS](#section9) are the subcommands of your
ensemble command\.

For example, the following code uses [DELEGATION](#section16) to create a
work\-alike for the standard __[string](\.\./\.\./\.\./\.\./index\.md\#string)__
command:

    snit::type mystring {
        delegate typemethod * to stringhandler

        typeconstructor {
            set stringhandler string
        }
    }

Now the type command itself is your ensemble command\.

This method has only one drawback, and though it's major, it's also
surmountable\. Your new ensemble command will have __create__, __info__
and __destroy__ subcommands you don't want\. And worse yet, since the
__create__ method can be implicit, users of your command will accidentally
be creating instances of your __mystring__ type if they should mispell one
of the subcommands\. The command will succeed\-\-the first time\-\-but won't do
what's wanted\. This is very bad\.

The work around is to set some [PRAGMAS](#section21), as shown here:

    snit::type mystring {
        pragma -hastypeinfo    no
        pragma -hastypedestroy no
        pragma -hasinstances   no

        delegate typemethod * to stringhandler

        typeconstructor {
            set stringhandler string
        }
    }

Here we've used the __pragma__ statement to tell Snit that we don't want the
__info__ typemethod or the __destroy__ typemethod, and that our type has
no instances; this eliminates the __create__ typemethod and all related
code\. As a result, our ensemble command will be well\-behaved, with no unexpected
subcommands\.

# <a name='section21'></a>PRAGMAS

## <a name='subsection150'></a>What is a pragma?

A pragma is an option you can set in your type definitions that affects how the
type is defined and how it works once it is defined\.

## <a name='subsection151'></a>How do I set a pragma?

Use the __pragma__ statement\. Each pragma is an option with a value; each
time you use the __pragma__ statement you can set one or more of them\.

## <a name='subsection152'></a>How can I get rid of the "info" type method?

Set the __\-hastypeinfo__ pragma to __no__:

    snit::type dog {
        pragma -hastypeinfo no
        # ...
    }

Snit will refrain from defining the __info__ type method\.

## <a name='subsection153'></a>How can I get rid of the "destroy" type method?

Set the __\-hastypedestroy__ pragma to __no__:

    snit::type dog {
        pragma -hastypedestroy no
        # ...
    }

Snit will refrain from defining the __destroy__ type method\.

## <a name='subsection154'></a>How can I get rid of the "create" type method?

Set the __\-hasinstances__ pragma to __no__:

    snit::type dog {
        pragma -hasinstances no
        # ...
    }

Snit will refrain from defining the __create__ type method; if you call the
type command with an unknown method name, you'll get an error instead of a new
instance of the type\.

This is useful if you wish to use a __snit::type__ to define an ensemble
command rather than a type with instances\.

Pragmas __\-hastypemethods__ and __\-hasinstances__ cannot both be false
\(or there'd be nothing left\)\.

## <a name='subsection155'></a>How can I get rid of type methods altogether?

Normal Tk widget type commands don't have subcommands; all they do is create
widgets\-\-in Snit terms, the type command calls the __create__ type method
directly\. To get the same behavior from Snit, set the __\-hastypemethods__
pragma to __no__:

    snit::type dog {
        pragma -hastypemethods no
        #...
    }

    # Creates ::spot
    dog spot

    # Tries to create an instance called ::create
    dog create spot

Pragmas __\-hastypemethods__ and __\-hasinstances__ cannot both be false
\(or there'd be nothing left\)\.

## <a name='subsection156'></a>Why can't I create an object that replaces an old object with the same name?

Up until Snit 0\.95, you could use any name for an instance of a
__snit::type__, even if the name was already in use by some other object or
command\. You could do the following, for example:

    snit::type dog { ... }

    dog proc

You now have a new dog named "proc", which is probably not something that you
really wanted to do\. As a result, Snit now throws an error if your chosen
instance name names an existing command\. To restore the old behavior, set the
__\-canreplace__ pragma to __yes__:

    snit::type dog {
        pragma -canreplace yes
        # ...
    }

## <a name='subsection157'></a>How can I make my simple type run faster?

In Snit 1\.x, you can set the __\-simpledispatch__ pragma to __yes__\.

Snit 1\.x method dispatch is both flexible and fast, but the flexibility comes
with a price\. If your type doesn't require the flexibility, the
__\-simpledispatch__ pragma allows you to substitute a simpler dispatch
mechanism that runs quite a bit faster\. The limitations are these:

  - Methods cannot be delegated\.

  - __uplevel__ and __upvar__ do not work as expected: the caller's
    scope is two levels up rather than one\.

  - The option\-handling methods \(__cget__, __configure__, and
    __configurelist__\) are very slightly slower\.

In Snit 2\.2, the __\-simpledispatch__ macro is obsolete, and ignored; all
Snit 2\.2 method dispatch is faster than Snit 1\.x's __\-simpledispatch__\.

# <a name='section22'></a>MACROS

## <a name='subsection158'></a>What is a macro?

A Snit macro is nothing more than a Tcl proc that's defined in the Tcl
interpreter used to compile Snit type definitions\.

## <a name='subsection159'></a>What are macros good for?

You can use Snit macros to define new type definition syntax, and to support
conditional compilation\.

## <a name='subsection160'></a>How do I do conditional compilation?

Suppose you want your type to use a fast C extension if it's available;
otherwise, you'll fallback to a slower Tcl implementation\. You want to define
one set of methods in the first case, and another set in the second case\. But
how can your type definition know whether the fast C extension is available or
not?

It's easily done\. Outside of any type definition, define a macro that returns 1
if the extension is available, and 0 otherwise:

    if {$gotFastExtension} {
        snit::macro fastcode {} {return 1}
    } else {
        snit::macro fastcode {} {return 0}
    }

Then, use your macro in your type definition:

    snit::type dog {

        if {[fastcode]} {
            # Fast methods
            method bark {} {...}
            method wagtail {} {...}
        } else {
            # Slow methods
            method bark {} {...}
            method wagtail {} {...}
        }
    }

## <a name='subsection161'></a>How do I define new type definition syntax?

Use a macro\. For example, your __snit::widget__'s __\-background__ option
should be propagated to a number of component widgets\. You could implement that
like this:

    snit::widget mywidget {
        option -background -default white -configuremethod PropagateBackground

        method PropagateBackground {option value} {
            $comp1 configure $option $value
            $comp2 configure $option $value
            $comp3 configure $option $value
        }
    }

For one option, this is fine; if you've got a number of options, it becomes
tedious and error prone\. So package it as a macro:

    snit::macro propagate {option "to" components} {
        option $option -configuremethod Propagate$option

        set body "\n"

        foreach comp $components {
            append body "\$$comp configure $option \$value\n"
        }

        method Propagate$option {option value} $body
    }

Then you can use it like this:

    snit::widget mywidget {
        option -background default -white
        option -foreground default -black

        propagate -background to {comp1 comp2 comp3}
        propagate -foreground to {comp1 comp2 comp3}
    }

## <a name='subsection162'></a>Are there are restrictions on macro names?

Yes, there are\. You can't redefine any standard Tcl commands or Snit type
definition statements\. You can use any other command name, including the name of
a previously defined macro\.

If you're using Snit macros in your application, go ahead and name them in the
global namespace, as shown above\. But if you're using them to define types or
widgets for use by others, you should define your macros in the same namespace
as your types or widgets\. That way, they won't conflict with other people's
macros\.

If my fancy __snit::widget__ is called __::mylib::mywidget__, for
example, then I should define my __propagate__ macro as
__::mylib::propagate__:

    snit::macro mylib::propagate {option "to" components} { ... }

    snit::widget ::mylib::mywidget {
        option -background default -white
        option -foreground default -black

        mylib::propagate -background to {comp1 comp2 comp3}
        mylib::propagate -foreground to {comp1 comp2 comp3}
    }

# <a name='section23'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *snit* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[BWidget](\.\./\.\./\.\./\.\./index\.md\#bwidget), [C\+\+](\.\./\.\./\.\./\.\./index\.md\#c\_),
[Incr Tcl](\.\./\.\./\.\./\.\./index\.md\#incr\_tcl),
[adaptors](\.\./\.\./\.\./\.\./index\.md\#adaptors),
[class](\.\./\.\./\.\./\.\./index\.md\#class), [mega
widget](\.\./\.\./\.\./\.\./index\.md\#mega\_widget),
[object](\.\./\.\./\.\./\.\./index\.md\#object), [object
oriented](\.\./\.\./\.\./\.\./index\.md\#object\_oriented),
[widget](\.\./\.\./\.\./\.\./index\.md\#widget), [widget
adaptors](\.\./\.\./\.\./\.\./index\.md\#widget\_adaptors)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003\-2006, by William H\. Duquette
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/soundex/soundex.md.

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
89
90
91
92
93

[//000000001]: # (soundex \- Soundex)
[//000000002]: # (Generated from file 'soundex\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; ????, Algorithm: Donald E\. Knuth)
[//000000004]: # (Copyright &copy; 2003, Documentation: Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (Copyright &copy; 1998, Tcl port: Evan Rempel <erempel@uvic\.ca>)
[//000000006]: # (soundex\(n\) 1\.0 tcllib "Soundex")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

soundex \- Soundex

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require soundex ?1\.0?  

[__::soundex::knuth__ *string*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides soundex algorithms which allow the comparison of words
based on their phonetic likeness\.

Currently only an algorithm by Knuth is provided, which is tuned to english
names and words\.

  - <a name='1'></a>__::soundex::knuth__ *string*

    Computes the soundex code of the input *string* using Knuth's algorithm
    and returns it as the result of the command\.

# <a name='section2'></a>EXAMPLES

    % ::soundex::knuth Knuth
    K530

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *soundex* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[knuth](\.\./\.\./\.\./\.\./index\.md\#knuth),
[soundex](\.\./\.\./\.\./\.\./index\.md\#soundex), [text
comparison](\.\./\.\./\.\./\.\./index\.md\#text\_comparison), [text
likeness](\.\./\.\./\.\./\.\./index\.md\#text\_likeness)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; ????, Algorithm: Donald E\. Knuth  
Copyright &copy; 2003, Documentation: Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>  
Copyright &copy; 1998, Tcl port: Evan Rempel <erempel@uvic\.ca>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































Deleted embedded/md/tcllib/files/modules/stooop/stooop.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256

[//000000001]: # (stooop \- Simple Tcl Only Object Oriented Programming)
[//000000002]: # (Generated from file 'stooop\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (stooop\(n\) 4\.4\.1 tcllib "Simple Tcl Only Object Oriented Programming")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

stooop \- Object oriented extension\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [DEBUGGING](#section2)

  - [EXAMPLES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require stooop ?4\.4\.1?  

[__::stooop::class__ *name body*](#1)  
[__::stooop::new__ *class* ?*arg arg \.\.\.*?](#2)  
[__::stooop::delete__ *object* ?*object \.\.\.*?](#3)  
[__::stooop::virtual__ __proc__ *name* \{__this__ ?*arg arg \.\.\.*?\} ?*body*?](#4)  
[__::stooop::classof__ *object*](#5)  
[__::stooop::new__ *object*](#6)  
[__::stooop::printObjects__ ?*pattern*?](#7)  
[__::stooop::record__](#8)  
[__::stooop::report__ ?*pattern*?](#9)  

# <a name='description'></a>DESCRIPTION

This package provides commands to extend Tcl in an object oriented manner, using
a familiar C\+\+ like syntax and behaviour\. Stooop only introduces a few new
commands: __[class](\.\./\.\./\.\./\.\./index\.md\#class)__, __new__,
__delete__, __virtual__ and __classof__\. Along with a few coding
conventions, that is basically all you need to know to use stooop\. Stooop is
meant to be as simple to use as possible\.

This manual is very succinct and is to be used as a quick reminder for the
programmer, who should have read the thorough
[stooop\_man\.html](stooop\_man\.html) HTML documentation at this point\.

  - <a name='1'></a>__::stooop::class__ *name body*

    This command creates a class\. The body, similar in contents to a Tcl
    namespace \(which a class actually also is\), contains member procedure
    definitions\. Member procedures can also be defined outside the class body,
    by prefixing their name with __class::__, as you would proceed with
    namespace procedures\.

      * __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ *class* \{__this__ ?*arg arg \.\.\.*?\} ?*base* \{?*arg arg \.\.\.*?\} \.\.\.? *body*

        This is the constructor procedure for the class\. It is invoked following
        a __new__ invocation on the class\. It must have the same name as the
        class and a first argument named __this__\. Any number of base
        classes specifications, including arguments to be passed to their
        constructor, are allowed before the actual body of the procedure\.

      * __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ ~*class* \{__this__\} *body*

        This is the destructor procedure for the class\. It is invoked following
        a __delete__ invocation\. Its name must be the concatenation of a
        single __~__ character followed by the class name \(as in C\+\+\)\. It
        must have a single argument named __this__\.

      * __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ *name* \{__this__ ?*arg arg \.\.\.*?\} *body*

        This is a member procedure of the class, as its first argument is named
        __this__\. It allows a simple access of member data for the object
        referenced by __this__ inside the procedure\. For example:

            set ($this,data) 0

      * __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ *name* \{?*arg arg \.\.\.*?\} *body*

        This is a static \(as in C\+\+\) member procedure of the class, as its first
        argument is not named __this__\. Static \(global\) class data can be
        accessed as in:

            set (data) 0

      * __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ *class* \{__this copy__\} *body*

        This is the optional copy procedure for the class\. It must have the same
        name as the class and exactly 2 arguments named __this__ and
        __copy__\. It is invoked following a __new__ invocation on an
        existing object of the class\.

  - <a name='2'></a>__::stooop::new__ *class* ?*arg arg \.\.\.*?

    This command is used to create an object\. The first argument is the class
    name and is followed by the arguments needed by the corresponding class
    constructor\. A unique identifier for the object just created is returned\.

  - <a name='3'></a>__::stooop::delete__ *object* ?*object \.\.\.*?

    This command is used to delete one or several objects\. It takes one or more
    object identifiers as argument\(s\)\.

  - <a name='4'></a>__::stooop::virtual__ __proc__ *name* \{__this__ ?*arg arg \.\.\.*?\} ?*body*?

    The __virtual__ specifier may be used on member procedures to achieve
    dynamic binding\. A procedure in a base class can then be redefined
    \(overloaded\) in the derived class\(es\)\. If the base class procedure is
    invoked on an object, it is actually the derived class procedure which is
    invoked, if it exists\. If the base class procedure has no body, then it is
    considered to be a pure virtual and the derived class procedure is always
    invoked\.

  - <a name='5'></a>__::stooop::classof__ *object*

    This command returns the class of the existing object passed as single
    parameter\.

  - <a name='6'></a>__::stooop::new__ *object*

    This command is used to create an object by copying an existing object\. The
    copy constructor of the corresponding class is invoked if it exists,
    otherwise a simple copy of the copied object data members is performed\.

# <a name='section2'></a>DEBUGGING

  - Environment variables

      * __STOOOPCHECKDATA__

        Setting this variable to any true value will cause stooop to check for
        invalid member or class data access\.

      * __STOOOPCHECKPROCEDURES__

        Setting this variable to any true value will cause stooop to check for
        invalid member procedure arguments and pure interface classes
        instanciation\.

      * __STOOOPCHECKALL__

        Setting this variable to any true value will cause stooop to activate
        both procedure and data member checking\.

      * __STOOOPCHECKOBJECTS__

        Setting this variable to any true value will cause stooop to activate
        object checking\. The following stooop namespace procedures then become
        available for debugging: __printObjects__,
        __[record](\.\./\.\./\.\./\.\./index\.md\#record)__ and
        __[report](\.\./report/report\.md)__\.

      * __STOOOPTRACEPROCEDURES__

        Setting this environment variable to either __stdout__,
        __stderr__ or a file name, activates procedure tracing\. The stooop
        library will then output to the specified channel 1 line of
        informational text for each member procedure invocation\.

      * __STOOOPTRACEPROCEDURESFORMAT__

        Defines the trace procedures output format\. Defaults to __"class: %C,
        procedure: %p, object: %O, arguments: %a"__\.

      * __STOOOPTRACEDATA__

        Setting this environment variable to either __stdout__,
        __stderr__ or a file name, activates data tracing\. The stooop
        library will then output to the specified channel 1 line of
        informational text for each member data access\.

      * __STOOOPTRACEDATAFORMAT__

        Defines the trace data output format\. Defaults to __"class: %C,
        procedure: %p, array: %A, object: %O, member: %m, operation: %o, value:
        %v"__\.

      * __STOOOPTRACEDATAOPERATIONS__

        When tracing data output, by default, all read, write and unsetting
        accesses are reported, but the user can set this variable to any
        combination of the letters __r__, __w__, and __u__ for more
        specific tracing \(please refer to the
        __[trace](\.\./\.\./\.\./\.\./index\.md\#trace)__ Tcl manual page for more
        information\)\.

      * __STOOOPTRACEALL__

        Setting this environment variable to either __stdout__,
        __stderr__ or a file name, enables both procedure and data tracing\.

  - <a name='7'></a>__::stooop::printObjects__ ?*pattern*?

    Prints an ordered list of existing objects, in creation order, oldest first\.
    Each output line contains the class name, object identifier and the
    procedure within which the creation occurred\. The optional pattern argument
    \(as in the Tcl __string match__ command\) can be used to limit the output
    to matching class names\.

  - <a name='8'></a>__::stooop::record__

    When invoked, a snapshot of all existing stooop objects is taken\. Reporting
    can then be used at a later time to see which objects were created or
    deleted in the interval\.

  - <a name='9'></a>__::stooop::report__ ?*pattern*?

    Prints the created and deleted objects since the __::stooop::record__
    procedure was invoked last\. If present, the pattern argument limits the
    output to matching class names\.

# <a name='section3'></a>EXAMPLES

Please see the full HTML documentation in
[stooop\_man\.html](stooop\_man\.html)\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *stooop* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[C\+\+](\.\./\.\./\.\./\.\./index\.md\#c\_), [class](\.\./\.\./\.\./\.\./index\.md\#class),
[object](\.\./\.\./\.\./\.\./index\.md\#object), [object
oriented](\.\./\.\./\.\./\.\./index\.md\#object\_oriented)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/stooop/switched.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293

[//000000001]: # (switched \- Simple Tcl Only Object Oriented Programming)
[//000000002]: # (Generated from file 'switched\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (switched\(n\) 2\.2\.1 tcllib "Simple Tcl Only Object Oriented Programming")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

switched \- switch/option management\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require switched ?2\.2\.1?  

[__<switched>__ __complete__ *this*](#1)  
[__<switched>__ __options__ *this*](#2)  
[__<switched>__ __set\-__option____ *this* *value*](#3)  

# <a name='description'></a>DESCRIPTION

The __switched__ class serves as base class for user classes with switch /
option configuration procedures\. It provides facilities for managing options
through a simple interface\.

For example:

    set vehicle [new car -length 4.5 -width 2 -power 100 -fuel diesel]
    puts "my car was running on [switched::cget $vehicle -fuel]"
    switched::configure $vehicle -power 40 -fuel electricity
    puts "but is now running on clean [switched::cget $vehicle -fuel]"

Of course, as you might have guessed, the __car__ class is derived from the
__switched__ class\. Let us see how it works:

    class car {
        proc car {this args} switched {$args} {
            # car specific initialization code here
            switched::complete $this
        }
        ...
    }

The switched class constructor takes the optional configuration option / value
pairs as parameters\. The switched class layer then completely manages the
switched options: it checks their validity, stores their values and provides a
clean interface to the user layer configuration setting procedures\.

The switched class members available to the programmer are:

  - <a name='1'></a>__<switched>__ __complete__ *this*

    This procedure is used to tell the switched layer that the derived class
    object \(a car in the examples\) is completely built\. At that time, the
    initial configuration of the switched object occurs, using default option
    values \(see procedure __options__\) eventually overridden by construction
    time values, passed at the time of the __new__ operator invocation\. This
    procedure must be called only once, usually around or at the end of the
    derived class constructor\. \(*Note*: Also check the __complete__ data
    member later in this chapter\)\.

  - <a name='2'></a>__<switched>__ __options__ *this*

    This procedure must return the configuration description for *all* options
    that the switched object will accept\. It is a pure virtual member procedure
    and therefore its implementation is *mandatory* in the derived class
    layer\. The procedure must return a list of lists\. Each list pertains to a
    single option and is composed of the switch name, the default value for the
    option and an optional initial value\. For example:

    class car {
        ...
        proc options {this} {
            return [list [list -fuel petrol petrol] [list -length {} {}] [list -power {} {}] [list -width {} {}] ]
        }
        proc set-fuel {this value} {
            ...
        }
        ...
    }

    In this case, 4 options are specified: __fuel__, __length__,
    __power__ and __width__\. The default and initial values for the
    __fuel__ option are identical and set to __petrol__\. For the other
    options, values are all empty\.

    For each option, there must be a corresponding __set\-__option____
    procedure defined in the derived class layer\. For example, since we defined
    a __fuel__ option, there is a __set\-fuel__ procedure in the car
    class\. The parameters always are the object identifier \(since this is not a
    static procedure, but rather a dynamically defined virtual one\), followed by
    the new value for the option\. A __set\-__option____ procedure is only
    invoked if the new value differs from the current one \(a caching scheme for
    improving performance\), or if there is no initial value set in the
    __options__ procedure for that option\.

    In this procedure, if the initial value differs from the default value or is
    omitted, then initial configuration is forced and the corresponding
    __set\-__option____ procedure is invoked by the switched
    __complete__ procedure located at the end of the derived class
    constructor\. For example:

    class car {
        ...
        proc options {this} {
            return [list [list -fuel petrol] [list -length {} {}] [list -power 100 50] [list -width {} {}] ]
        }
        ...
    }

    In this case, configuration is forced on the __fuel__ and __power__
    options, that is the corresponding __set\-__option____ procedures
    will be invoked when the switched object is constructed \(see
    __set\-__option____ procedures documentation below\)\.

    For the __fuel__ option, since there is no initial value, the
    __set\-__fuel____ procedure is called with the default value
    \(__petrol__\) as argument\. For the __power__ option, since the
    initial value differs from the default value, the __set\-__power____
    procedure is called with the initial value as argument \(__50__\)\.

    For the other options, since the initial values \(last elements of the option
    lists\) are identical to their default values, the corresponding
    __set\-__option____ procedures will not be invoked\. It is the
    programmer's responsibility to insure that the initial option values are
    correct\.

  - <a name='3'></a>__<switched>__ __set\-__option____ *this* *value*

    These procedures may be viewed as dynamic virtual functions\. There must be
    one implementation per supported option, as returned by the __options__
    procedure\. For example:

    class car {
        ...
        proc options {this} {
            return [list ...
                [list -width {} {}] ]
        }
        ...
        proc set-width {this value} {
            ...
        }
        ...
    }

    Since the __\-width__ option was listed in the __options__ procedure,
    a __set\-width__ procedure implementation is provided, which of course
    would proceed to set the width of the car \(and would modify the looks of a
    graphical representation, for example\)\.

    As you add a supported __option__ in the list returned by the
    __options__ procedure, the corresponding __set\-__option____
    procedure may be called as soon as the switched object is complete, which
    occurs when the switched level __complete__ procedure is invoked\. For
    example:

    class car {
        proc car {this args} switched {args} {
            ...
            switched::complete $this
       }
        ...
        proc options {this} {
            return [list [list -fuel petrol] [list -length 4.5] [list -power 350] [list -width 1.8] ]
        }
        proc set-fuel {this value} {
            ...
        }
        proc set-length {this value} {
            ...
        }
        proc set-power {this value} {
            ...
        }
        proc set-width {this value} {
            ...
        }
    }

    new car

    In this case, a new car is created with no options, which causes the car
    constructor to be called, which in turns calls the switched level
    __complete__ procedure after the car object layer is completely
    initialized\. At this point, since there are no initial values in any option
    list in the options procedure, the __set\-fuel__ procedure is called with
    its default value of __petrol__ as parameter, followed by the
    __set\-length__ call with __4\.5__ value, __set\-power__ with
    __350__ value and finally with __set\-width__ with __1\.8__ as
    parameter\. This is a good way to test the __set\-__option____
    procedures when debugging, and when done, just fill\-in the initial option
    values\.

    The switched layer checks that an option is valid \(that is, listed in the
    __options__ procedure\) but obviously does not check the validity of the
    value passed to the __set\-__option____ procedure, which should throw
    an error \(for example by using the Tcl error command\) if the value is
    invalid\.

    The switched layer also keeps track of the options current values, so that a
    __set\-__option____ procedure is called only when the corresponding
    option value passed as parameter is different from the current value \(see
    __\-option__ data members description\)\.

  - __\-option__

    The __\-option__ data member is an options current value\. There is one
    for each option listed in the options procedure\. It is a read\-only value
    which the switched layer checks against when an option is changed\. It is
    rarely used at the layer derived from switched, except in the few cases,
    such as in the following example:

    ...
    proc car::options {this} {
        return {
            ...
            {-manufacturer {} {}}
            ...
        }
    }

    proc car::set-manufacturer {this value} {}

    proc car::printData {this} {
        puts "manufacturer: $switched::($this,-manufacturer)"
        ...
    }

    In this case, the manufacturer's name is stored at the switched layer level
    \(this is why the set\-manufacturer procedure has nothing to do\) and later
    retrieved in the printData procedure\.

  - __complete__

    The __complete__ data member \(not to be confused with the
    __complete__ procedure\) is a boolean\. Its initial value is __false__
    and it is set to __true__ at the very end of the switched
    __complete__ procedure\. It becomes useful when some options should be
    set at construction time only and not dynamically, as the following example
    shows:

    proc car::set-width {this value} {
        if {$switched::($this,complete)} {
            error {option -width cannot be set dynamically}
        }
        ...
    }

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *stooop* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[C\+\+](\.\./\.\./\.\./\.\./index\.md\#c\_), [class](\.\./\.\./\.\./\.\./index\.md\#class),
[object](\.\./\.\./\.\./\.\./index\.md\#object), [object
oriented](\.\./\.\./\.\./\.\./index\.md\#object\_oriented)

# <a name='category'></a>CATEGORY

Programming tools
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/string/token.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140

[//000000001]: # (string::token \- Text and string utilities)
[//000000002]: # (Generated from file 'token\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (string::token\(n\) 1 tcllib "Text and string utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

string::token \- Regex based iterative lexing

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require string::token ?1?  
package require fileutil  

[__::string token text__ *lex* *string*](#1)  
[__::string token file__ *lex* *path*](#2)  
[__::string token chomp__ *lex* *startvar* *string* *resultvar*](#3)  

# <a name='description'></a>DESCRIPTION

This package provides commands for regular expression based lexing
\(tokenization\) of strings\.

The complete set of procedures is described below\.

  - <a name='1'></a>__::string token text__ *lex* *string*

    This command takes an ordered dictionary *lex* mapping regular expressions
    to labels, and tokenizes the *string* according to this dictionary\.

    The result of the command is a list of tokens, where each token is a
    3\-element list of label, start\- and end\-index in the *string*\.

    The command will throw an error if it is not able to tokenize the whole
    string\.

  - <a name='2'></a>__::string token file__ *lex* *path*

    This command is a convenience wrapper around __::string token text__
    above, and __fileutil::cat__, enabling the easy tokenization of whole
    files\. *Note* that this command loads the file wholly into memory before
    starting to process it\.

    If the file is too large for this mode of operation a command directly based
    on __::string token chomp__ below will be necessary\.

  - <a name='3'></a>__::string token chomp__ *lex* *startvar* *string* *resultvar*

    This command is the work horse underlying __::string token text__ above\.
    It is exposed to enable users to write their own lexers, which, for example
    may apply different lexing dictionaries according to some internal state,
    etc\.

    The command takes an ordered dictionary *lex* mapping regular expressions
    to labels, a variable *startvar* which indicates where to start lexing in
    the input *string*, and a result variable *resultvar* to extend\.

    The result of the command is a tri\-state numeric code indicating one of

      * __0__

        No token found\.

      * __1__

        Token found\.

      * __2__

        End of string reached\.

    Note that recognition of a token from *lex* is started at the character
    index in *startvar*\.

    If a token was recognized \(status __1__\) the command will update the
    index in *startvar* to point to the first character of the *string* past
    the recognized token, and it will further extend the *resultvar* with a
    3\-element list containing the label associated with the regular expression
    of the token, and the start\- and end\-character\-indices of the token in
    *string*\.

    Neither *startvar* nor *resultvar* will be updated if no token is
    recognized at all\.

    Note that the regular expressions are applied \(tested\) in the order they are
    specified in *lex*, and the first matching pattern stops the process\.
    Because of this it is recommended to specify the patterns to lex with from
    the most specific to the most general\.

    Further note that all regex patterns are implicitly prefixed with the
    constraint escape __A__ to ensure that a match starts exactly at the
    character index found in *startvar*\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[lexing](\.\./\.\./\.\./\.\./index\.md\#lexing),
[regex](\.\./\.\./\.\./\.\./index\.md\#regex),
[string](\.\./\.\./\.\./\.\./index\.md\#string),
[tokenization](\.\./\.\./\.\./\.\./index\.md\#tokenization)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































Deleted embedded/md/tcllib/files/modules/string/token_shell.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170

[//000000001]: # (string::token::shell \- Text and string utilities)
[//000000002]: # (Generated from file 'token\_shell\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (string::token::shell\(n\) 1\.2 tcllib "Text and string utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

string::token::shell \- Parsing of shell command line

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require string::token::shell ?1\.2?  
package require string::token ?1?  
package require fileutil  

[__::string token shell__ ?__\-indices__? ?__\-partial__? ?\-\-? *string*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a command which parses a line of text using basic
__sh__\-syntax into a list of words\.

The complete set of procedures is described below\.

  - <a name='1'></a>__::string token shell__ ?__\-indices__? ?__\-partial__? ?\-\-? *string*

    This command parses the input *string* under the assumption of it
    following basic __sh__\-syntax\. The result of the command is a list of
    words in the *string*\. An error is thrown if the input does not follow the
    allowed syntax\. The behaviour can be modified by specifying any of the two
    options __\-indices__ and __\-partial__\.

      * __\-\-__

        When specified option parsing stops at this point\. This option is needed
        if the input *string* may start with dash\. In other words, this is
        pretty much required if *string* is user input\.

      * __\-indices__

        When specified the output is not a list of words, but a list of 4\-tuples
        describing the words\. Each tuple contains the type of the word, its
        start\- and end\-indices in the input, and the actual text of the word\.

        Note that the length of the word as given by the indices can differ from
        the length of the word found in the last element of the tuple\. The
        indices describe the words extent in the input, including delimiters,
        intra\-word quoting, etc\. whereas for the actual text of the word
        delimiters are stripped, intra\-word quoting decoded, etc\.

        The possible token types are

          + __PLAIN__

            Plain word, not quoted\.

          + __D:QUOTED__

            Word is delimited by double\-quotes\.

          + __S:QUOTED__

            Word is delimited by single\-quotes\.

          + __D:QUOTED:PART__

          + __S:QUOTED:PART__

            Like the previous types, but the word has no closing quote, i\.e\. is
            incomplete\. These token types can occur if and only if the option
            __\-partial__ was specified, and only for the last word of the
            result\. If the option __\-partial__ was not specified such
            incomplete words cause the command to thrown an error instead\.

      * __\-partial__

        When specified the parser will accept an incomplete quoted word \(i\.e\.
        without closing quote\) at the end of the line as valid instead of
        throwing an error\.

    The basic shell syntax accepted here are unquoted, single\- and double\-quoted
    words, separated by whitespace\. Leading and trailing whitespace are possible
    too, and stripped\. Shell variables in their various forms are *not*
    recognized, nor are sub\-shells\. As for the recognized forms of words, see
    below for the detailed specification\.

      * __single\-quoted word__

        A single\-quoted word begins with a single\-quote character, i\.e\.
        __'__ \(ASCII 39\) followed by zero or more unicode characters not a
        single\-quote, and then closed by a single\-quote\.

        The word must be followed by either the end of the string, or
        whitespace\. A word cannot directly follow the word\.

      * __double\-quoted word__

        A double\-quoted word begins with a double\-quote character, i\.e\.
        __"__ \(ASCII 34\) followed by zero or more unicode characters not a
        double\-quote, and then closed by a double\-quote\.

        Contrary to single\-quoted words a double\-quote can be embedded into the
        word, by prefacing, i\.e\. escaping, i\.e\. quoting it with a backslash
        character __\\__ \(ASCII 92\)\. Similarly a backslash character must be
        quoted with itself to be inserted literally\.

      * __unquoted word__

        Unquoted words are not delimited by quotes and thus cannot contain
        whitespace or single\-quote characters\. Double\-quote and backslash
        characters can be put into unquoted words, by quting them like for
        double\-quoted words\.

      * __whitespace__

        Whitespace is any unicode space character\. This is equivalent to
        __string is space__, or the regular expression \\\\s\.

        Whitespace may occur before the first word, or after the last word\.
        Whitespace must occur between adjacent words\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[bash](\.\./\.\./\.\./\.\./index\.md\#bash),
[lexing](\.\./\.\./\.\./\.\./index\.md\#lexing),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing),
[shell](\.\./\.\./\.\./\.\./index\.md\#shell),
[string](\.\./\.\./\.\./\.\./index\.md\#string),
[tokenization](\.\./\.\./\.\./\.\./index\.md\#tokenization)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/stringprep/stringprep.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

[//000000001]: # (stringprep \- Preparation of Internationalized Strings)
[//000000002]: # (Generated from file 'stringprep\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2009, Sergei Golovan <sgolovan@nes\.ru>)
[//000000004]: # (stringprep\(n\) 1\.0\.1 tcllib "Preparation of Internationalized Strings")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

stringprep \- Implementation of stringprep

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [REFERENCES](#section4)

  - [AUTHORS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require stringprep 1\.0\.1  

[__::stringprep::register__ *profile* ?*\-mapping list*? ?*\-normalization form*? ?*\-prohibited list*? ?*\-prohibitedList list*? ?*\-prohibitedCommand command*? ?*\-prohibitedBidi boolean*?](#1)  
[__::stringprep::stringprep__ *profile* *string*](#2)  
[__::stringprep::compare__ *profile* *string1* *string2*](#3)  

# <a name='description'></a>DESCRIPTION

This is an implementation in Tcl of the Preparation of Internationalized Strings
\("stringprep"\)\. It allows to define stringprep profiles and use them to prepare
Unicode strings for comparison as defined in RFC\-3454\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::stringprep::register__ *profile* ?*\-mapping list*? ?*\-normalization form*? ?*\-prohibited list*? ?*\-prohibitedList list*? ?*\-prohibitedCommand command*? ?*\-prohibitedBidi boolean*?

    Register the __stringprep__ profile named *profile*\. Options are the
    following\.

    Option *\-mapping* specifies __stringprep__ mapping tables\. This
    parameter takes list of tables from appendix B of RFC\-3454\. The usual list
    values are \{B\.1 B\.2\} or \{B\.1 B\.3\} where B\.1 contains characters which
    commonly map to nothing, B\.3 specifies case folding, and B\.2 is used in
    profiles with unicode normalization form KC\. Defult value is \{\} which means
    no mapping\.

    Option *\-normalization* takes a string and if it is nonempty then it uses
    as a name of Unicode normalization form\. Any value of "D", "C", "KD" or "KC"
    may be used, though RFC\-3454 defines only two options: no normalization or
    normalization using form KC\.

    Option *\-prohibited* takes a list of RFC\-3454 tables with prohibited
    characters\. Current version does allow to prohibit either all tables from
    C\.3 to C\.9 or neither of them\. An example of this list for RFC\-3491 is \{A\.1
    C\.1\.2 C\.2\.2 C\.3 C\.4 C\.5 C\.6 C\.7 C\.8 C\.9\}\.

    Option *\-prohibitedList* specifies a list of additional prohibited
    characters\. The list contains not characters themselves but their Unicode
    numbers\. For example, Nodeprep specification from RFC\-3920 forbids the
    following codes: \{0x22 0x26 0x27 0x2f 0x3a 0x3c 0x3e 0x40\} \(\\" \\& \\' / : < >
    @\)\.

    Option *\-prohibitedCommand* specifies a command which is called for every
    character code in mapped and normalized string\. If the command returns true
    then the character is considered prohibited\. This option is useful when a
    list for *\-prohibitedList* is too large\.

    Option *\-prohibitedBidi* takes boolean value and if it is true then the
    bidirectional character processing rules defined in section 6 of RFC\-3454
    are used\.

  - <a name='2'></a>__::stringprep::stringprep__ *profile* *string*

    Performs __stringprep__ operations defined in profile *profile* to
    string *string*\. Result is a prepared string or one of the following
    errors: *invalid\_profile* \(profile *profile* is not defined\),
    *prohibited\_character* \(string *string* contains a prohibited character\)
    or *prohibited\_bidi* \(string *string* contains a prohibited
    bidirectional sequence\)\.

  - <a name='3'></a>__::stringprep::compare__ *profile* *string1* *string2*

    Compares two unicode strings prepared accordingly to __stringprep__
    profile *profile*\. The command returns 0 if prepared strings are equal, \-1
    if *string1* is lexicographically less than *string2*, or 1 if
    *string1* is lexicographically greater than *string2*\.

# <a name='section3'></a>EXAMPLES

Nameprep profile definition \(see RFC\-3491\):

    ::stringprep::register nameprep  -mapping {B.1 B.2}  -normalization KC  -prohibited {A.1 C.1.2 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9}  -prohibitedBidi 1

Nodeprep and resourceprep profile definitions \(see RFC\-3920\):

    ::stringprep::register nodeprep  -mapping {B.1 B.2}  -normalization KC  -prohibited {A.1 C.1.1 C.1.2 C.2.1 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9}  -prohibitedList {0x22 0x26 0x27 0x2f 0x3a 0x3c 0x3e 0x40}  -prohibitedBidi 1

    ::stringprep::register resourceprep  -mapping {B.1}  -normalization KC  -prohibited {A.1 C.1.2 C.2.1 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9}  -prohibitedBidi 1

# <a name='section4'></a>REFERENCES

  1. "Preparation of Internationalized Strings \('stringprep'\)",
     \([http://www\.ietf\.org/rfc/rfc3454\.txt](http://www\.ietf\.org/rfc/rfc3454\.txt)\)

  1. "Nameprep: A Stringprep Profile for Internationalized Domain Names \(IDN\)",
     \([http://www\.ietf\.org/rfc/rfc3491\.txt](http://www\.ietf\.org/rfc/rfc3491\.txt)\)

  1. "Extensible Messaging and Presence Protocol \(XMPP\): Core",
     \([http://www\.ietf\.org/rfc/rfc3920\.txt](http://www\.ietf\.org/rfc/rfc3920\.txt)\)

# <a name='section5'></a>AUTHORS

Sergei Golovan

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *stringprep* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[unicode\(n\)](unicode\.md)

# <a name='keywords'></a>KEYWORDS

[stringprep](\.\./\.\./\.\./\.\./index\.md\#stringprep),
[unicode](\.\./\.\./\.\./\.\./index\.md\#unicode)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2009, Sergei Golovan <sgolovan@nes\.ru>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/stringprep/stringprep_data.md.

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

[//000000001]: # (stringprep::data \- Preparation of Internationalized Strings)
[//000000002]: # (Generated from file 'stringprep\_data\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2009, Sergei Golovan <sgolovan@nes\.ru>)
[//000000004]: # (stringprep::data\(n\) 1\.0\.1 tcllib "Preparation of Internationalized Strings")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

stringprep::data \- stringprep data tables, generated, internal

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require stringprep::data 1\.0\.1  

# <a name='description'></a>DESCRIPTION

The __stringprep::data__ package is a helper for
__[stringprep](stringprep\.md)__, providing it with the data tables
needed to perform its functions\. It is an *internal* package which should not
be accessed on its own\. Because of that it has no publicly documented API
either\. Its implementation is generated by a script\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *stringprep* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[stringprep](\.\./\.\./\.\./\.\./index\.md\#stringprep),
[unicode](\.\./\.\./\.\./\.\./index\.md\#unicode)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2009, Sergei Golovan <sgolovan@nes\.ru>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































Deleted embedded/md/tcllib/files/modules/stringprep/unicode.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

[//000000001]: # (unicode \- Unicode normalization)
[//000000002]: # (Generated from file 'unicode\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007, Sergei Golovan <sgolovan@nes\.ru>)
[//000000004]: # (unicode\(n\) 1\.0\.0 tcllib "Unicode normalization")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

unicode \- Implementation of Unicode normalization

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [REFERENCES](#section4)

  - [AUTHORS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require unicode 1\.0  

[__::unicode::fromstring__ *string*](#1)  
[__::unicode::tostring__ *uclist*](#2)  
[__::unicode::normalize__ *form* *uclist*](#3)  
[__::unicode::normalizeS__ *form* *string*](#4)  

# <a name='description'></a>DESCRIPTION

This is an implementation in Tcl of the Unicode normalization forms\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::unicode::fromstring__ *string*

    Converts *string* to list of integer Unicode character codes which is used
    in __unicode__ for internal string representation\.

  - <a name='2'></a>__::unicode::tostring__ *uclist*

    Converts list of integers *uclist* back to Tcl string\.

  - <a name='3'></a>__::unicode::normalize__ *form* *uclist*

    Normalizes Unicode characters list *ulist* according to *form* and
    returns the normalized list\. Form *form* takes one of the following
    values: *D* \(canonical decomposition\), *C* \(canonical decomposition,
    followed by canonical composition\), *KD* \(compatibility decomposition\), or
    *KC* \(compatibility decomposition, followed by canonical composition\)\.

  - <a name='4'></a>__::unicode::normalizeS__ *form* *string*

    A shortcut to ::unicode::tostring \[unicode::normalize \\$form
    \[::unicode::fromstring \\$string\]\]\. Normalizes Tcl string and returns
    normalized string\.

# <a name='section3'></a>EXAMPLES

    % ::unicode::fromstring "\u0410\u0411\u0412\u0413"
    1040 1041 1042 1043
    % ::unicode::tostring {49 50 51 52 53}
    12345
    %

    % ::unicode::normalize D {7692 775}
    68 803 775
    % ::unicode::normalizeS KD "\u1d2c"
    A
    %

# <a name='section4'></a>REFERENCES

  1. "Unicode Standard Annex \#15: Unicode Normalization Forms",
     \([http://unicode\.org/reports/tr15/](http://unicode\.org/reports/tr15/)\)

# <a name='section5'></a>AUTHORS

Sergei Golovan

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *stringprep* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[stringprep\(n\)](stringprep\.md)

# <a name='keywords'></a>KEYWORDS

[normalization](\.\./\.\./\.\./\.\./index\.md\#normalization),
[unicode](\.\./\.\./\.\./\.\./index\.md\#unicode)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007, Sergei Golovan <sgolovan@nes\.ru>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































Deleted embedded/md/tcllib/files/modules/stringprep/unicode_data.md.

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

[//000000001]: # (unicode::data \- Preparation of Internationalized Strings)
[//000000002]: # (Generated from file 'unicode\_data\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007, Sergei Golovan <sgolovan@nes\.ru>)
[//000000004]: # (unicode::data\(n\) 1\.0\.0 tcllib "Preparation of Internationalized Strings")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

unicode::data \- unicode data tables, generated, internal

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require unicode::data 1\.0\.0  

# <a name='description'></a>DESCRIPTION

The __unicode::data__ package is a helper for
__[unicode](unicode\.md)__, providing it with the data tables needed to
perform its functions\. It is an *internal* package which should not be
accessed on its own\. Because of that it has no publicly documented API either\.
Its implementation is generated by a script\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *stringprep* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[stringprep](\.\./\.\./\.\./\.\./index\.md\#stringprep),
[unicode](\.\./\.\./\.\./\.\./index\.md\#unicode)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007, Sergei Golovan <sgolovan@nes\.ru>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































Deleted embedded/md/tcllib/files/modules/struct/disjointset.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240

[//000000001]: # (struct::disjointset \- Tcl Data Structures)
[//000000002]: # (Generated from file 'disjointset\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (struct::disjointset\(n\) 1\.1 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::disjointset \- Disjoint set data structure

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require struct::disjointset ?1\.1?  

[__::struct::disjointset__ *disjointsetName*](#1)  
[*disjointsetName* *option* ?*arg arg \.\.\.*?](#2)  
[*disjointsetName* __add\-element__ *item*](#3)  
[*disjointsetName* __add\-partition__ *elements*](#4)  
[*disjointsetName* __partitions__](#5)  
[*disjointsetName* __num\-partitions__](#6)  
[*disjointsetName* __equal__ *a* *b*](#7)  
[*disjointsetName* __merge__ *a* *b*](#8)  
[*disjointsetName* __find__ *e*](#9)  
[*disjointsetName* __exemplars__](#10)  
[*disjointsetName* __find\-exemplar__ *e*](#11)  
[*disjointsetName* __destroy__](#12)  

# <a name='description'></a>DESCRIPTION

This package provides *disjoint sets*\. An alternative name for this kind of
structure is *merge\-find*\.

Normally when dealing with sets and their elements the question is "Is this
element E contained in this set S?", with both E and S known\.

Here the question is "Which of several sets contains the element E?"\. I\.e\. while
the element is known, the set is not, and we wish to find it quickly\. It is not
quite the inverse of the original question, but close\. Another operation which
is often wanted is that of quickly merging two sets into one, with the result
still fast for finding elements\. Hence the alternative term *merge\-find* for
this\.

Why now is this named a *disjoint\-set* ? Because another way of describing the
whole situation is that we have

  - a finite *[set](\.\./\.\./\.\./\.\./index\.md\#set)* S, containing

  - a number of *elements* E, split into

  - a set of *partitions* P\. The latter term applies, because the intersection
    of each pair P, P' of partitions is empty, with the union of all partitions
    covering the whole set\.

  - An alternative name for the *partitions* would be *equvalence classes*,
    and all elements in the same class are considered as equal\.

Here is a pictorial representation of the concepts listed above:

    +-----------------+ The outer lines are the boundaries of the set S.
    |           /     | The inner regions delineated by the skewed lines
    |  *       /   *  | are the partitions P. The *'s denote the elements
    |      *  / \     | E in the set, each in a single partition, their
    |*       /   \    | equivalence class.
    |       /  *  \   |
    |      / *   /    |
    | *   /\  * /     |
    |    /  \  /      |
    |   /    \/  *    |
    |  / *    \       |
    | /     *  \      |
    +-----------------+

For more information see
[http://en\.wikipedia\.org/wiki/Disjoint\_set\_data\_structure](http://en\.wikipedia\.org/wiki/Disjoint\_set\_data\_structure)\.

# <a name='section2'></a>API

The package exports a single command, __::struct::disjointset__\. All
functionality provided here can be reached through a subcommand of this command\.

  - <a name='1'></a>__::struct::disjointset__ *disjointsetName*

    Creates a new disjoint set object with an associated global Tcl command
    whose name is *disjointsetName*\. This command may be used to invoke
    various operations on the disjointset\. It has the following general form:

      * <a name='2'></a>*disjointsetName* *option* ?*arg arg \.\.\.*?

        The __option__ and the *arg*s determine the exact behavior of the
        command\. The following commands are possible for disjointset objects:

  - <a name='3'></a>*disjointsetName* __add\-element__ *item*

    Creates a new partition in the specified disjoint set, and fills it with the
    single item *item*\. The command maintains the integrity of the disjoint
    set, i\.e\. it verifies that none of the *elements* are already part of the
    disjoint set and throws an error otherwise\.

    The result of this method is the empty string\.

    This method runs in constant time\.

  - <a name='4'></a>*disjointsetName* __add\-partition__ *elements*

    Creates a new partition in specified disjoint set, and fills it with the
    values found in the set of *elements*\. The command maintains the integrity
    of the disjoint set, i\.e\. it verifies that none of the *elements* are
    already part of the disjoint set and throws an error otherwise\.

    The result of the command is the empty string\.

    This method runs in time proportional to the size of *elements*\]\.

  - <a name='5'></a>*disjointsetName* __partitions__

    Returns the set of partitions the named disjoint set currently consists of\.
    The form of the result is a list of lists; the inner lists contain the
    elements of the partitions\.

    This method runs in time O\(N\*alpha\(N\)\), where N is the number of elements in
    the disjoint set and alpha is the inverse Ackermann function\.

  - <a name='6'></a>*disjointsetName* __num\-partitions__

    Returns the number of partitions the named disjoint set currently consists
    of\.

    This method runs in constant time\.

  - <a name='7'></a>*disjointsetName* __equal__ *a* *b*

    Determines if the two elements *a* and *b* of the disjoint set belong to
    the same partition\. The result of the method is a boolean value,
    __True__ if the two elements are contained in the same partition, and
    __False__ otherwise\.

    An error will be thrown if either *a* or *b* are not elements of the
    disjoint set\.

    This method runs in amortized time O\(alpha\(N\)\), where N is the number of
    elements in the larger partition and alpha is the inverse Ackermann
    function\.

  - <a name='8'></a>*disjointsetName* __merge__ *a* *b*

    Determines the partitions the elements *a* and *b* are contained in and
    merges them into a single partition\. If the two elements were already
    contained in the same partition nothing will change\.

    The result of the method is the empty string\.

    This method runs in amortized time O\(alpha\(N\)\), where N is the number of
    items in the larger of the partitions being merged\. The worst case time is
    O\(N\)\.

  - <a name='9'></a>*disjointsetName* __find__ *e*

    Returns a list of the members of the partition of the disjoint set which
    contains the element *e*\.

    This method runs in O\(N\*alpha\(N\)\) time, where N is the total number of items
    in the disjoint set and alpha is the inverse Ackermann function, See
    __find\-exemplar__ for a faster method, if all that is needed is a unique
    identifier for the partition, rather than an enumeration of all its
    elements\.

  - <a name='10'></a>*disjointsetName* __exemplars__

    Returns a list containing an exemplar of each partition in the disjoint set\.
    The exemplar is a member of the partition, chosen arbitrarily\.

    This method runs in O\(N\*alpha\(N\)\) time, where N is the total number of items
    in the disjoint set and alpha is the inverse Ackermann function\.

  - <a name='11'></a>*disjointsetName* __find\-exemplar__ *e*

    Returns the exemplar of the partition of the disjoint set containing the
    element *e*\. Throws an error if *e* is not found in the disjoint set\.
    The exemplar is an arbitrarily chosen member of the partition\. The only
    operation that will change the exemplar of any partition is __merge__\.

    This method runs in O\(alpha\(N\)\) time, where N is the number of items in the
    partition containing E, and alpha is the inverse Ackermann function\.

  - <a name='12'></a>*disjointsetName* __destroy__

    Destroys the disjoint set object and all associated memory\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: disjointset* of
the [Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also
report any ideas for enhancements you may have for either package and/or
documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[disjoint set](\.\./\.\./\.\./\.\./index\.md\#disjoint\_set), [equivalence
class](\.\./\.\./\.\./\.\./index\.md\#equivalence\_class),
[find](\.\./\.\./\.\./\.\./index\.md\#find), [merge
find](\.\./\.\./\.\./\.\./index\.md\#merge\_find),
[partition](\.\./\.\./\.\./\.\./index\.md\#partition), [partitioned
set](\.\./\.\./\.\./\.\./index\.md\#partitioned\_set),
[union](\.\./\.\./\.\./\.\./index\.md\#union)

# <a name='category'></a>CATEGORY

Data structures
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/graph.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885

[//000000001]: # (struct::graph \- Tcl Data Structures)
[//000000002]: # (Generated from file 'graph\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002\-2009,2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (struct::graph\(n\) 2\.4\.3 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::graph \- Create and manipulate directed graph objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Changes for 2\.0](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require struct::graph ?2\.4\.3?  
package require struct::list ?1\.5?  
package require struct::set ?2\.2\.3?  

[__::struct::graph__ ?*graphName*? ?__=__&#124;__:=__&#124;__as__&#124;__deserialize__ *source*?](#1)  
[__graphName__ *option* ?*arg arg \.\.\.*?](#2)  
[*graphName* __=__ *sourcegraph*](#3)  
[*graphName* __\-\->__ *destgraph*](#4)  
[*graphName* __append__ *key* *value*](#5)  
[*graphName* __deserialize__ *serialization*](#6)  
[*graphName* __destroy__](#7)  
[*graphName* __arc append__ *arc* *key* *value*](#8)  
[*graphName* __arc attr__ *key*](#9)  
[*graphName* __arc attr__ *key* __\-arcs__ *list*](#10)  
[*graphName* __arc attr__ *key* __\-glob__ *globpattern*](#11)  
[*graphName* __arc attr__ *key* __\-regexp__ *repattern*](#12)  
[*graphName* __arc delete__ *arc* ?*arc* \.\.\.?](#13)  
[*graphName* __arc exists__ *arc*](#14)  
[*graphName* __arc flip__ *arc*](#15)  
[*graphName* __arc get__ *arc* *key*](#16)  
[*graphName* __arc getall__ *arc* ?*pattern*?](#17)  
[*graphName* __arc getunweighted__](#18)  
[*graphName* __arc getweight__ *arc*](#19)  
[*graphName* __arc keys__ *arc* ?*pattern*?](#20)  
[*graphName* __arc keyexists__ *arc* *key*](#21)  
[*graphName* __arc insert__ *start* *end* ?*child*?](#22)  
[*graphName* __arc lappend__ *arc* *key* *value*](#23)  
[*graphName* __arc rename__ *arc* *newname*](#24)  
[*graphName* __arc set__ *arc* *key* ?*value*?](#25)  
[*graphName* __arc setunweighted__ ?*weight*?](#26)  
[*graphName* __arc setweight__ *arc* *weight*](#27)  
[*graphName* __arc unsetweight__ *arc*](#28)  
[*graphName* __arc hasweight__ *arc*](#29)  
[*graphName* __arc source__ *arc*](#30)  
[*graphName* __arc target__ *arc*](#31)  
[*graphName* __arc nodes__ *arc*](#32)  
[*graphName* __arc move\-source__ *arc* *newsource*](#33)  
[*graphName* __arc move\-target__ *arc* *newtarget*](#34)  
[*graphName* __arc move__ *arc* *newsource* *newtarget*](#35)  
[*graphName* __arc unset__ *arc* *key*](#36)  
[*graphName* __arc weights__](#37)  
[*graphName* __arcs__ ?\-key *key*? ?\-value *value*? ?\-filter *cmdprefix*? ?\-in&#124;\-out&#124;\-adj&#124;\-inner&#124;\-embedding *node node\.\.\.*?](#38)  
[*graphName* __lappend__ *key* *value*](#39)  
[*graphName* __node append__ *node* *key* *value*](#40)  
[*graphName* __node attr__ *key*](#41)  
[*graphName* __node attr__ *key* __\-nodes__ *list*](#42)  
[*graphName* __node attr__ *key* __\-glob__ *globpattern*](#43)  
[*graphName* __node attr__ *key* __\-regexp__ *repattern*](#44)  
[*graphName* __node degree__ ?\-in&#124;\-out? *node*](#45)  
[*graphName* __node delete__ *node* ?*node*\.\.\.?](#46)  
[*graphName* __node exists__ *node*](#47)  
[*graphName* __node get__ *node* *key*](#48)  
[*graphName* __node getall__ *node* ?*pattern*?](#49)  
[*graphName* __node keys__ *node* ?*pattern*?](#50)  
[*graphName* __node keyexists__ *node* *key*](#51)  
[*graphName* __node insert__ ?*node*\.\.\.?](#52)  
[*graphName* __node lappend__ *node* *key* *value*](#53)  
[*graphName* __node opposite__ *node* *arc*](#54)  
[*graphName* __node rename__ *node* *newname*](#55)  
[*graphName* __node set__ *node* *key* ?*value*?](#56)  
[*graphName* __node unset__ *node* *key*](#57)  
[*graphName* __nodes__ ?\-key *key*? ?\-value *value*? ?\-filter *cmdprefix*? ?\-in&#124;\-out&#124;\-adj&#124;\-inner&#124;\-embedding *node* *node*\.\.\.?](#58)  
[*graphName* __get__ *key*](#59)  
[*graphName* __getall__ ?*pattern*?](#60)  
[*graphName* __keys__ ?*pattern*?](#61)  
[*graphName* __keyexists__ *key*](#62)  
[*graphName* __serialize__ ?*node*\.\.\.?](#63)  
[*graphName* __set__ *key* ?*value*?](#64)  
[*graphName* __swap__ *node1* *node2*](#65)  
[*graphName* __unset__ *key*](#66)  
[*graphName* __walk__ *node* ?\-order *order*? ?\-type *type*? ?\-dir *direction*? \-command *cmd*](#67)  

# <a name='description'></a>DESCRIPTION

A directed graph is a structure containing two collections of elements, called
*nodes* and *arcs* respectively, together with a relation \("connectivity"\)
that places a general structure upon the nodes and arcs\.

Each arc is connected to two nodes, one of which is called the
*[source](\.\./\.\./\.\./\.\./index\.md\#source)* and the other the *target*\. This
imposes a direction upon the arc, which is said to go from the source to the
target\. It is allowed that source and target of an arc are the same node\. Such
an arc is called a *[loop](\.\./\.\./\.\./\.\./index\.md\#loop)*\. Whenever a node is
either the source or target of an arc both are said to be
*[adjacent](\.\./\.\./\.\./\.\./index\.md\#adjacent)*\. This extends into a relation
between nodes, i\.e\. if two nodes are connected through at least one arc they are
said to be *[adjacent](\.\./\.\./\.\./\.\./index\.md\#adjacent)* too\.

Each node can be the source and target for any number of arcs\. The former are
called the *outgoing arcs* of the node, the latter the *incoming arcs* of
the node\. The number of arcs in either set is called the *in\-degree* resp\. the
*out\-degree* of the node\.

In addition to maintaining the node and arc relationships, this graph
implementation allows any number of named *attributes* to be associated with
the graph itself, and each node or arc\.

*Note:* The major version of the package
__[struct](\.\./\.\./\.\./\.\./index\.md\#struct)__ has been changed to version
2\.0, due to backward incompatible changes in the API of this module\. Please read
the section [Changes for 2\.0](#section2) for a full list of all changes,
incompatible and otherwise\.

*Note:* A C\-implementation of the command can be had from the location
[http://www\.purl\.org/NET/schlenker/tcl/cgraph](http://www\.purl\.org/NET/schlenker/tcl/cgraph)\.
See also [http://wiki\.tcl\.tk/cgraph](http://wiki\.tcl\.tk/cgraph)\. This
implementation uses a bit less memory than the tcl version provided here
directly, and is faster\. Its support is limited to versions of the package
before 2\.0\.

As of version 2\.2 of this package a critcl based C implementation is available
from here as well\. This implementation however requires Tcl 8\.4 to run\.

The main command of the package is:

  - <a name='1'></a>__::struct::graph__ ?*graphName*? ?__=__&#124;__:=__&#124;__as__&#124;__deserialize__ *source*?

    The command creates a new graph object with an associated global Tcl command
    whose name is *graphName*\. This command may be used to invoke various
    operations on the graph\. It has the following general form:

      * <a name='2'></a>__graphName__ *option* ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.

    If *graphName* is not specified a unique name will be generated by the
    package itself\. If a *source* is specified the new graph will be
    initialized to it\. For the operators __=__, __:=__, and __as__
    the *source* argument is interpreted as the name of another graph object,
    and the assignment operator __=__ will be executed\. For the operator
    __deserialize__ the *source* is a serialized graph object and
    __deserialize__ will be executed\.

    In other words

        ::struct::graph mygraph = b

    is equivalent to

        ::struct::graph mygraph
        mygraph = b

    and

        ::struct::graph mygraph deserialize $b

    is equivalent to

        ::struct::graph mygraph
        mygraph deserialize $b

The following commands are possible for graph objects:

  - <a name='3'></a>*graphName* __=__ *sourcegraph*

    This is the *assignment* operator for graph objects\. It copies the graph
    contained in the graph object *sourcegraph* over the graph data in
    *graphName*\. The old contents of *graphName* are deleted by this
    operation\.

    This operation is in effect equivalent to

    > *graphName* __deserialize__ \[*sourcegraph* __serialize__\]

    The operation assumes that the *sourcegraph* provides the method
    __serialize__ and that this method returns a valid graph serialization\.

  - <a name='4'></a>*graphName* __\-\->__ *destgraph*

    This is the *reverse assignment* operator for graph objects\. It copies the
    graph contained in the graph object *graphName* over the graph data in the
    object *destgraph*\. The old contents of *destgraph* are deleted by this
    operation\.

    This operation is in effect equivalent to

    > *destgraph* __deserialize__ \[*graphName* __serialize__\]

    The operation assumes that the *destgraph* provides the method
    __deserialize__ and that this method takes a graph serialization\.

  - <a name='5'></a>*graphName* __append__ *key* *value*

    Appends a *value* to one of the keyed values associated with the graph\.
    Returns the new value given to the attribute *key*\.

  - <a name='6'></a>*graphName* __deserialize__ *serialization*

    This is the complement to __serialize__\. It replaces the graph data in
    *graphName* with the graph described by the *serialization* value\. The
    old contents of *graphName* are deleted by this operation\.

  - <a name='7'></a>*graphName* __destroy__

    Destroys the graph, including its storage space and associated command\.

  - <a name='8'></a>*graphName* __arc append__ *arc* *key* *value*

    Appends a *value* to one of the keyed values associated with an *arc*\.
    Returns the new value given to the attribute *key*\.

  - <a name='9'></a>*graphName* __arc attr__ *key*

  - <a name='10'></a>*graphName* __arc attr__ *key* __\-arcs__ *list*

  - <a name='11'></a>*graphName* __arc attr__ *key* __\-glob__ *globpattern*

  - <a name='12'></a>*graphName* __arc attr__ *key* __\-regexp__ *repattern*

    This method retrieves the value of the attribute named *key*, for all arcs
    in the graph \(matching the restriction specified via one of the possible
    options\) and having the specified attribute\.

    The result is a dictionary mapping from arc names to the value of attribute
    *key* at that arc\. Arcs not having the attribute *key*, or not passing a
    specified restriction, are not listed in the result\.

    The possible restrictions are:

      * __\-arcs__

        The value is a list of arcs\. Only the arcs mentioned in this list are
        searched for the attribute\.

      * __\-glob__

        The value is a glob pattern\. Only the arcs in the graph whose names
        match this pattern are searched for the attribute\.

      * __\-regexp__

        The value is a regular expression\. Only the arcs in the graph whose
        names match this pattern are searched for the attribute\.

  - <a name='13'></a>*graphName* __arc delete__ *arc* ?*arc* \.\.\.?

    Remove the specified arcs from the graph\.

  - <a name='14'></a>*graphName* __arc exists__ *arc*

    Return true if the specified *arc* exists in the graph\.

  - <a name='15'></a>*graphName* __arc flip__ *arc*

    Reverses the direction of the named *arc*, i\.e\. the source and target
    nodes of the arc are exchanged with each other\.

  - <a name='16'></a>*graphName* __arc get__ *arc* *key*

    Returns the value associated with the key *key* for the *arc*\.

  - <a name='17'></a>*graphName* __arc getall__ *arc* ?*pattern*?

    Returns a dictionary \(suitable for use with \[__array set__\]\) for the
    *arc*\. If the *pattern* is specified only the attributes whose names
    match the pattern will be part of the returned dictionary\. The pattern is a
    __glob__ pattern\.

  - <a name='18'></a>*graphName* __arc getunweighted__

    Returns a list containing the names of all arcs in the graph which have no
    weight associated with them\.

  - <a name='19'></a>*graphName* __arc getweight__ *arc*

    Returns the weight associated with the *arc*\. Throws an error if the arc
    has no weight associated with it\.

  - <a name='20'></a>*graphName* __arc keys__ *arc* ?*pattern*?

    Returns a list of keys for the *arc*\. If the *pattern* is specified only
    the attributes whose names match the pattern will be part of the returned
    list\. The pattern is a __glob__ pattern\.

  - <a name='21'></a>*graphName* __arc keyexists__ *arc* *key*

    Return true if the specified *key* exists for the *arc*\.

  - <a name='22'></a>*graphName* __arc insert__ *start* *end* ?*child*?

    Insert an arc named *child* into the graph beginning at the node *start*
    and ending at the node *end*\. If the name of the new arc is not specified
    the system will generate a unique name of the form *arc**x*\.

  - <a name='23'></a>*graphName* __arc lappend__ *arc* *key* *value*

    Appends a *value* \(as a list\) to one of the keyed values associated with
    an *arc*\. Returns the new value given to the attribute *key*\.

  - <a name='24'></a>*graphName* __arc rename__ *arc* *newname*

    Renames the arc *arc* to *newname*\. An error is thrown if either the arc
    does not exist, or a arc with name *newname* does exist\. The result of the
    command is the new name of the arc\.

  - <a name='25'></a>*graphName* __arc set__ *arc* *key* ?*value*?

    Set or get one of the keyed values associated with an arc\. An arc may have
    any number of keyed values associated with it\. If *value* is not
    specified, this command returns the current value assigned to the key; if
    *value* is specified, this command assigns that value to the key, and
    returns that value\.

  - <a name='26'></a>*graphName* __arc setunweighted__ ?*weight*?

    Sets the weight of all arcs without a weight to *weight*\. Returns the
    empty string as its result\. If not present *weight* defaults to __0__\.

  - <a name='27'></a>*graphName* __arc setweight__ *arc* *weight*

    Sets the weight of the *arc* to *weight*\. Returns *weight*\.

  - <a name='28'></a>*graphName* __arc unsetweight__ *arc*

    Removes the weight of the *arc*, if present\. Does nothing otherwise\.
    Returns the empty string\.

  - <a name='29'></a>*graphName* __arc hasweight__ *arc*

    Determines if the *arc* has a weight associated with it\. The result is a
    boolean value, __True__ if a weight is defined, and __False__
    otherwise\.

  - <a name='30'></a>*graphName* __arc source__ *arc*

    Return the node the given *arc* begins at\.

  - <a name='31'></a>*graphName* __arc target__ *arc*

    Return the node the given *arc* ends at\.

  - <a name='32'></a>*graphName* __arc nodes__ *arc*

    Return the nodes the given *arc* begins and ends at, as a two\-element
    list\.

  - <a name='33'></a>*graphName* __arc move\-source__ *arc* *newsource*

    Changes the source node of the arc to *newsource*\. It can be said that the
    arc rotates around its target node\.

  - <a name='34'></a>*graphName* __arc move\-target__ *arc* *newtarget*

    Changes the target node of the arc to *newtarget*\. It can be said that the
    arc rotates around its source node\.

  - <a name='35'></a>*graphName* __arc move__ *arc* *newsource* *newtarget*

    Changes both source and target nodes of the arc to *newsource*, and
    *newtarget* resp\.

  - <a name='36'></a>*graphName* __arc unset__ *arc* *key*

    Remove a keyed value from the arc *arc*\. The method will do nothing if the
    *key* does not exist\.

  - <a name='37'></a>*graphName* __arc weights__

    Returns a dictionary whose keys are the names of all arcs which have a
    weight associated with them, and the values are these weights\.

  - <a name='38'></a>*graphName* __arcs__ ?\-key *key*? ?\-value *value*? ?\-filter *cmdprefix*? ?\-in&#124;\-out&#124;\-adj&#124;\-inner&#124;\-embedding *node node\.\.\.*?

    Returns a list of arcs in the graph\. If no restriction is specified a list
    containing all arcs is returned\. Restrictions can limit the list of returned
    arcs based on the nodes that are connected by the arc, on the keyed values
    associated with the arc, or both\. A general filter command can be used as
    well\. The restrictions that involve connected nodes take a variable number
    of nodes as argument, specified after the name of the restriction itself\.

    The restrictions imposed by either __\-in__, __\-out__, __\-adj__,
    __\-inner__, or __\-embedding__ are applied first\. Specifying more
    than one of them is illegal\.

    After that the restrictions set via __\-key__ \(and __\-value__\) are
    applied\. Specifying more than one __\-key__ \(and __\-value__\) is
    illegal\. Specifying __\-value__ alone, without __\-key__ is illegal as
    well\.

    Any restriction set through __\-filter__ is applied last\. Specifying more
    than one __\-filter__ is illegal\.

    Coming back to the restrictions based on a set of nodes, the command
    recognizes the following switches:

      * __\-in__

        Return a list of all arcs whose target is one of the nodes in the set of
        nodes\. I\.e\. it computes the union of all incoming arcs of the nodes in
        the set\.

      * __\-out__

        Return a list of all arcs whose source is one of the nodes in the set of
        nodes\. I\.e\. it computes the union of all outgoing arcs of the nodes in
        the set\.

      * __\-adj__

        Return a list of all arcs adjacent to at least one of the nodes in the
        set\. This is the union of the nodes returned by __\-in__ and
        __\-out__\.

      * __\-inner__

        Return a list of all arcs which are adjacent to two of the nodes in the
        set\. This is the set of arcs in the subgraph spawned by the specified
        nodes\.

      * __\-embedding__

        Return a list of all arcs adjacent to exactly one of the nodes in the
        set\. This is the set of arcs connecting the subgraph spawned by the
        specified nodes to the rest of the graph\.

    *Attention*: After the above options any word with a leading dash which is
    not a valid option is treated as a node name instead of an invalid option to
    error out on\. This condition holds until either a valid option terminates
    the list of nodes, or the end of the command is reached, whichever comes
    first\.

    The remaining filter options are:

      * __\-key__ *key*

        Limit the list of arcs that are returned to those arcs that have an
        associated key *key*\.

      * __\-value__ *value*

        This restriction can only be used in combination with __\-key__\. It
        limits the list of arcs that are returned to those arcs whose associated
        key *key* has the value *value*\.

      * __\-filter__ *cmdrefix*

        Limit the list of arcs that are returned to those arcs that pass the
        test\. The command in *cmdprefix* is called with two arguments, the
        name of the graph object, and the name of the arc in question\. It is
        executed in the context of the caller and has to return a boolean value\.
        Arcs for which the command returns __false__ are removed from the
        result list before it is returned to the caller\.

  - <a name='39'></a>*graphName* __lappend__ *key* *value*

    Appends a *value* \(as a list\) to one of the keyed values associated with
    the graph\. Returns the new value given to the attribute *key*\.

  - <a name='40'></a>*graphName* __node append__ *node* *key* *value*

    Appends a *value* to one of the keyed values associated with an *node*\.
    Returns the new value given to the attribute *key*\.

  - <a name='41'></a>*graphName* __node attr__ *key*

  - <a name='42'></a>*graphName* __node attr__ *key* __\-nodes__ *list*

  - <a name='43'></a>*graphName* __node attr__ *key* __\-glob__ *globpattern*

  - <a name='44'></a>*graphName* __node attr__ *key* __\-regexp__ *repattern*

    This method retrieves the value of the attribute named *key*, for all
    nodes in the graph \(matching the restriction specified via one of the
    possible options\) and having the specified attribute\.

    The result is a dictionary mapping from node names to the value of attribute
    *key* at that node\. Nodes not having the attribute *key*, or not passing
    a specified restriction, are not listed in the result\.

    The possible restrictions are:

      * __\-nodes__

        The value is a list of nodes\. Only the nodes mentioned in this list are
        searched for the attribute\.

      * __\-glob__

        The value is a glob pattern\. Only the nodes in the graph whose names
        match this pattern are searched for the attribute\.

      * __\-regexp__

        The value is a regular expression\. Only the nodes in the graph whose
        names match this pattern are searched for the attribute\.

  - <a name='45'></a>*graphName* __node degree__ ?\-in&#124;\-out? *node*

    Return the number of arcs adjacent to the specified *node*\. If one of the
    restrictions __\-in__ or __\-out__ is given only the incoming resp\.
    outgoing arcs are counted\.

  - <a name='46'></a>*graphName* __node delete__ *node* ?*node*\.\.\.?

    Remove the specified nodes from the graph\. All of the nodes' arcs will be
    removed as well to prevent unconnected arcs\.

  - <a name='47'></a>*graphName* __node exists__ *node*

    Return true if the specified *node* exists in the graph\.

  - <a name='48'></a>*graphName* __node get__ *node* *key*

    Return the value associated with the key *key* for the *node*\.

  - <a name='49'></a>*graphName* __node getall__ *node* ?*pattern*?

    Returns a dictionary \(suitable for use with \[__array set__\]\) for the
    *node*\. If the *pattern* is specified only the attributes whose names
    match the pattern will be part of the returned dictionary\. The pattern is a
    __glob__ pattern\.

  - <a name='50'></a>*graphName* __node keys__ *node* ?*pattern*?

    Returns a list of keys for the *node*\. If the *pattern* is specified
    only the attributes whose names match the pattern will be part of the
    returned list\. The pattern is a __glob__ pattern\.

  - <a name='51'></a>*graphName* __node keyexists__ *node* *key*

    Return true if the specified *key* exists for the *node*\.

  - <a name='52'></a>*graphName* __node insert__ ?*node*\.\.\.?

    Insert one or more nodes into the graph\. The new nodes have no arcs
    connected to them\. If no node is specified one node will be inserted, and
    the system will generate a unique name of the form *node**x* for it\.

  - <a name='53'></a>*graphName* __node lappend__ *node* *key* *value*

    Appends a *value* \(as a list\) to one of the keyed values associated with
    an *node*\. Returns the new value given to the attribute *key*\.

  - <a name='54'></a>*graphName* __node opposite__ *node* *arc*

    Return the node at the other end of the specified *arc*, which has to be
    adjacent to the given *node*\.

  - <a name='55'></a>*graphName* __node rename__ *node* *newname*

    Renames the node *node* to *newname*\. An error is thrown if either the
    node does not exist, or a node with name *newname* does exist\. The result
    of the command is the new name of the node\.

  - <a name='56'></a>*graphName* __node set__ *node* *key* ?*value*?

    Set or get one of the keyed values associated with a node\. A node may have
    any number of keyed values associated with it\. If *value* is not
    specified, this command returns the current value assigned to the key; if
    *value* is specified, this command assigns that value to the key\.

  - <a name='57'></a>*graphName* __node unset__ *node* *key*

    Remove a keyed value from the node *node*\. The method will do nothing if
    the *key* does not exist\.

  - <a name='58'></a>*graphName* __nodes__ ?\-key *key*? ?\-value *value*? ?\-filter *cmdprefix*? ?\-in&#124;\-out&#124;\-adj&#124;\-inner&#124;\-embedding *node* *node*\.\.\.?

    Return a list of nodes in the graph\. Restrictions can limit the list of
    returned nodes based on neighboring nodes, or based on the keyed values
    associated with the node\. The restrictions that involve neighboring nodes
    have a list of nodes as argument, specified after the name of the
    restriction itself\.

    The possible restrictions are the same as for method __arcs__\. Note that
    while the exact meanings change slightly, as they operate on nodes instead
    of arcs, the general behaviour is the same, especially when it comes to the
    handling of words with a leading dash in node lists\.

    The command recognizes:

      * __\-in__

        Return a list of all nodes with at least one outgoing arc ending in a
        node found in the specified set of nodes\. Alternatively specified as the
        set of source nodes for the __\-in__ arcs of the node set\. The
        *incoming neighbours*\.

      * __\-out__

        Return a list of all nodes with at least one incoming arc starting in a
        node found in the specified set of nodes\. Alternatively specified as the
        set of target nodes for the __\-out__ arcs of the node set\. The
        *outgoing neighbours*\.

      * __\-adj__

        This is the union of the nodes returned by __\-in__ and __\-out__\.
        The *neighbours*\.

      * __\-inner__

        The set of neighbours \(see __\-adj__ above\) which are also in the set
        of nodes\. I\.e\. the intersection between the set of nodes and the
        neighbours per __\-adj__\.

      * __\-embedding__

        The set of neighbours \(see __\-adj__ above\) which are not in the set
        of nodes\. I\.e\. the difference between the neighbours as per
        __\-adj__, and the set of nodes\.

      * __\-key__ *key*

        Limit the list of nodes that are returned to those nodes that have an
        associated key *key*\.

      * __\-value__ *value*

        This restriction can only be used in combination with __\-key__\. It
        limits the list of nodes that are returned to those nodes whose
        associated key *key* has the value *value*\.

      * __\-filter__ *cmdrefix*

        Limit the list of nodes that are returned to those nodes that pass the
        test\. The command in *cmdprefix* is called with two arguments, the
        name of the graph object, and the name of the node in question\. It is
        executed in the context of the caller and has to return a boolean value\.
        Nodes for which the command returns __false__ are removed from the
        result list before it is returned to the caller\.

  - <a name='59'></a>*graphName* __get__ *key*

    Return the value associated with the key *key* for the graph\.

  - <a name='60'></a>*graphName* __getall__ ?*pattern*?

    Returns a dictionary \(suitable for use with \[__array set__\]\) for the
    whole graph\. If the *pattern* is specified only the attributes whose names
    match the pattern will be part of the returned dictionary\. The pattern is a
    __glob__ pattern\.

  - <a name='61'></a>*graphName* __keys__ ?*pattern*?

    Returns a list of keys for the whole graph\. If the *pattern* is specified
    only the attributes whose names match the pattern will be part of the
    returned list\. The pattern is a __glob__ pattern\.

  - <a name='62'></a>*graphName* __keyexists__ *key*

    Return true if the specified *key* exists for the whole graph\.

  - <a name='63'></a>*graphName* __serialize__ ?*node*\.\.\.?

    This method serializes the sub\-graph spanned up by the *node*s\. In other
    words it returns a tcl value completely describing that graph\. If no nodes
    are specified the whole graph will be serialized\. This allows, for example,
    the transfer of graph objects \(or parts thereof\) over arbitrary channels,
    persistence, etc\. This method is also the basis for both the copy
    constructor and the assignment operator\.

    The result of this method has to be semantically identical over all
    implementations of the graph interface\. This is what will enable us to copy
    graph data between different implementations of the same interface\.

    The result is a list containing a multiple of three items, plus one\! In
    other words, '\[llength $serial\] % 3 == 1'\. Valid values include 1, 4, 7, \.\.\.

    The last element of the list is a dictionary containing the attributes
    associated with the whole graph\. Regarding the other elements; each triple
    consists of

      1. The name of the node to be described,

      1. A dictionary containing the attributes associated with the node,

      1. And a list describing all the arcs starting at that node\.

    The elements of the arc list are lists containing three or four elements
    each, i\.e\.

      1. The name of the arc described by the element,

      1. A reference to the destination node of the arc\. This reference is an
         integer number given the index of that node in the main serialization
         list\. As that it is greater than or equal to zero, less than the length
         of the serialization, and a multiple of three\. *Note:* For internal
         consistency no arc name may be used twice, whether in the same node, or
         at some other node\. This is a global consistency requirement for the
         serialization\.

      1. And a dictionary containing the attributes associated with the arc\.

      1. The weight associated with the arc\. This value is optional\. Its
         non\-presence means that the arc in question has no weight associated
         with it\.

         *Note:* This information is new, compared to the serialization of
         __[graph](\.\./\.\./\.\./\.\./index\.md\#graph)__ 2\.3 and earlier\. By
         making it an optional element the new format is maximally compatible
         with the old\. This means that any graph not using weights will generate
         a serialization which is still understood by the older graph package\. A
         serialization will not be understood any longer by the older packages
         if, and only if the graph it was generated from actually has arcs with
         weights\.

    For all attribute dictionaries they keys are the names of the attributes,
    and the values are the values for each name\.

    *Note:* The order of the nodes in the serialization has no relevance, nor
    has the order of the arcs per node\.

        # A possible serialization for the graph structure
        #
        #        d -----> %2
        #       /         ^ \
        #      /         /   \
        #     /         b     \
        #    /         /       \
        #  %1 <- a - %0         e
        #    ^         \\      /
        #     \\        c     /
        #      \\        \\  /
        #       \\        v v
        #        f ------ %3
        # is
        #
        # %3 {} {{f 6 {}}} %0 {} {{a 6 {}} {b 9 {}} {c 0 {}}} %1 {} {{d 9 {}}} %2 {} {{e 0 {}}} {}
        #
        # This assumes that the graph has neither attribute data nor weighted arcs.

  - <a name='64'></a>*graphName* __set__ *key* ?*value*?

    Set or get one of the keyed values associated with a graph\. A graph may have
    any number of keyed values associated with it\. If *value* is not
    specified, this command returns the current value assigned to the key; if
    *value* is specified, this command assigns that value to the key\.

  - <a name='65'></a>*graphName* __swap__ *node1* *node2*

    Swap the position of *node1* and *node2* in the graph\.

  - <a name='66'></a>*graphName* __unset__ *key*

    Remove a keyed value from the graph\. The method will do nothing if the
    *key* does not exist\.

  - <a name='67'></a>*graphName* __walk__ *node* ?\-order *order*? ?\-type *type*? ?\-dir *direction*? \-command *cmd*

    Perform a breadth\-first or depth\-first walk of the graph starting at the
    node *node* going in either the direction of outgoing or opposite to the
    incoming arcs\.

    The type of walk, breadth\-first or depth\-first, is determined by the value
    of *type*; __bfs__ indicates breadth\-first, __dfs__ indicates
    depth\-first\. Depth\-first is the default\.

    The order of the walk, pre\-order, post\-order or both\-order is determined by
    the value of *order*; __pre__ indicates pre\-order, __post__
    indicates post\-order, __both__ indicates both\-order\. Pre\-order is the
    default\. Pre\-order walking means that a node is visited before any of its
    neighbors \(as defined by the *direction*, see below\)\. Post\-order walking
    means that a parent is visited after any of its neighbors\. Both\-order
    walking means that a node is visited before *and* after any of its
    neighbors\. The combination of a breadth\-first walk with post\- or both\-order
    is illegal\.

    The direction of the walk is determined by the value of *dir*;
    __backward__ indicates the direction opposite to the incoming arcs,
    __forward__ indicates the direction of the outgoing arcs\.

    As the walk progresses, the command *cmd* will be evaluated at each node,
    with the mode of the call \(__enter__ or __leave__\) and values
    *graphName* and the name of the current node appended\. For a pre\-order
    walk, all nodes are __enter__ed, for a post\-order all nodes are left\. In
    a both\-order walk the first visit of a node __enter__s it, the second
    visit __leave__s it\.

# <a name='section2'></a>Changes for 2\.0

The following noteworthy changes have occurred:

  1. The API for accessing attributes and their values has been simplified\.

     All functionality regarding the default attribute "data" has been removed\.
     This default attribute does not exist anymore\. All accesses to attributes
     have to specify the name of the attribute in question\. This backward
     *incompatible* change allowed us to simplify the signature of all methods
     handling attributes\.

     Especially the flag __\-key__ is not required anymore, even more, its
     use is now forbidden\. Please read the documentation for the arc and node
     methods __set__, __get__, __getall__, __unset__,
     __append__, __lappend__, __keyexists__ and __keys__ for a
     description of the new API's\.

  1. The methods __keys__ and __getall__ now take an optional pattern
     argument and will return only attribute data for keys matching this
     pattern\.

  1. Arcs and nodes can now be renamed\. See the documentation for the methods
     __arc rename__ and __node rename__\.

  1. The structure has been extended with API's for the serialization and
     deserialization of graph objects, and a number of operations based on them
     \(graph assignment, copy construction\)\.

     Please read the documentation for the methods __serialize__,
     __deserialize__, __=__, and __\-\->__, and the documentation on
     the construction of graph objects\.

     Beyond the copying of whole graph objects these new API's also enable the
     transfer of graph objects over arbitrary channels and for easy persistence\.

  1. A new method, __attr__, was added to both __arc__ and __node__
     allowing the query and retrieval of attribute data without regard to arc
     and node relationships\.

  1. Both methods __arcs__ and __nodes__ have been extended with the
     ability to select arcs and nodes based on an arbitrary filtering criterium\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: graph* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[adjacent](\.\./\.\./\.\./\.\./index\.md\#adjacent),
[arc](\.\./\.\./\.\./\.\./index\.md\#arc), [cgraph](\.\./\.\./\.\./\.\./index\.md\#cgraph),
[degree](\.\./\.\./\.\./\.\./index\.md\#degree),
[edge](\.\./\.\./\.\./\.\./index\.md\#edge), [graph](\.\./\.\./\.\./\.\./index\.md\#graph),
[loop](\.\./\.\./\.\./\.\./index\.md\#loop),
[neighbour](\.\./\.\./\.\./\.\./index\.md\#neighbour),
[node](\.\./\.\./\.\./\.\./index\.md\#node),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[subgraph](\.\./\.\./\.\./\.\./index\.md\#subgraph),
[vertex](\.\./\.\./\.\./\.\./index\.md\#vertex)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002\-2009,2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/graph1.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410

[//000000001]: # (struct::graph\_v1 \- Tcl Data Structures)
[//000000002]: # (Generated from file 'graph1\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (struct::graph\_v1\(n\) 1\.2\.1 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::graph\_v1 \- Create and manipulate directed graph objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require struct::graph ?1\.2\.1?  

[__graphName__ *option* ?*arg arg \.\.\.*?](#1)  
[*graphName* __destroy__](#2)  
[*graphName* __arc append__ *arc* ?\-key *key*? *value*](#3)  
[*graphName* __arc delete__ *arc* ?*arc* \.\.\.?](#4)  
[*graphName* __arc exists__ *arc*](#5)  
[*graphName* __arc get__ *arc* ?\-key *key*?](#6)  
[*graphName* __arc getall__ *arc*](#7)  
[*graphName* __arc keys__ *arc*](#8)  
[*graphName* __arc keyexists__ *arc* ?\-key *key*?](#9)  
[*graphName* __arc insert__ *start* *end* ?*child*?](#10)  
[*graphName* __arc lappend__ *arc* ?\-key *key*? *value*](#11)  
[*graphName* __arc set__ *arc* ?\-key *key*? ?*value*?](#12)  
[*graphName* __arc source__ *arc*](#13)  
[*graphName* __arc target__ *arc*](#14)  
[*graphName* __arc unset__ *arc* ?\-key *key*?](#15)  
[*graphName* __arcs__ ?\-key *key*? ?\-value *value*? ?\-in&#124;\-out&#124;\-adj&#124;\-inner&#124;\-embedding *nodelist*?](#16)  
[*graphName* __node append__ *node* ?\-key *key*? *value*](#17)  
[*graphName* __node degree__ ?\-in&#124;\-out? *node*](#18)  
[*graphName* __node delete__ *node* ?*node* \.\.\.?](#19)  
[*graphName* __node exists__ *node*](#20)  
[*graphName* __node get__ *node* ?\-key *key*?](#21)  
[*graphName* __node getall__ *node*](#22)  
[*graphName* __node keys__ *node*](#23)  
[*graphName* __node keyexists__ *node* ?\-key *key*?](#24)  
[*graphName* __node insert__ ?*child*?](#25)  
[*graphName* __node lappend__ *node* ?\-key *key*? *value*](#26)  
[*graphName* __node opposite__ *node* *arc*](#27)  
[*graphName* __node set__ *node* ?\-key *key*? ?*value*?](#28)  
[*graphName* __node unset__ *node* ?\-key *key*?](#29)  
[*graphName* __nodes__ ?\-key *key*? ?\-value *value*? ?\-in&#124;\-out&#124;\-adj&#124;\-inner&#124;\-embedding *nodelist*?](#30)  
[*graphName* __get__ ?\-key *key*?](#31)  
[*graphName* __getall__](#32)  
[*graphName* __keys__](#33)  
[*graphName* __keyexists__ ?\-key *key*?](#34)  
[*graphName* __set__ ?\-key *key*? ?*value*?](#35)  
[*graphName* __swap__ *node1* *node2*](#36)  
[*graphName* __unset__ ?\-key *key*?](#37)  
[*graphName* __walk__ *node* ?\-order *order*? ?\-type *type*? ?\-dir *direction*? \-command *cmd*](#38)  

# <a name='description'></a>DESCRIPTION

The __::struct::graph__ command creates a new graph object with an
associated global Tcl command whose name is *graphName*\. This command may be
used to invoke various operations on the graph\. It has the following general
form:

  - <a name='1'></a>__graphName__ *option* ?*arg arg \.\.\.*?

    *Option* and the *arg*s determine the exact behavior of the command\.

A directed graph is a structure containing two collections of elements, called
*nodes* and *arcs* respectively, together with a relation \("connectivity"\)
that places a general structure upon the nodes and arcs\.

Each arc is connected to two nodes, one of which is called the *source* and
the other the *target*\. This imposes a direction upon the arc, which is said
to go from the source to the target\. It is allowed that source and target of an
arc are the same node\. Such an arc is called a *loop*\. Whenever a node is
source or target of an arc both are said to be *adjacent*\. This extends into a
relation between nodes, i\.e\. if two nodes are connected through at least one arc
they are said to be *adjacent* too\.

Each node can be the source and target for any number of arcs\. The former are
called the *outgoing arcs* of the node, the latter the *incoming arcs* of
the node\. The number of edges in either set is called the *in\-* resp\. the
*out\-degree* of the node\.

In addition to maintaining the node and arc relationships, this graph
implementation allows any number of keyed values to be associated with each node
and arc\.

The following commands are possible for graph objects:

  - <a name='2'></a>*graphName* __destroy__

    Destroy the graph, including its storage space and associated command\.

  - <a name='3'></a>*graphName* __arc append__ *arc* ?\-key *key*? *value*

    Appends a *value* to one of the keyed values associated with an *arc*\.
    If no *key* is specified, the key __data__ is assumed\.

  - <a name='4'></a>*graphName* __arc delete__ *arc* ?*arc* \.\.\.?

    Remove the specified arcs from the graph\.

  - <a name='5'></a>*graphName* __arc exists__ *arc*

    Return true if the specified *arc* exists in the graph\.

  - <a name='6'></a>*graphName* __arc get__ *arc* ?\-key *key*?

    Return the value associated with the key *key* for the *arc*\. If no key
    is specified, the key __data__ is assumed\.

  - <a name='7'></a>*graphName* __arc getall__ *arc*

    Returns a serialized list of key/value pairs \(suitable for use with
    \[__array set__\]\) for the *arc*\.

  - <a name='8'></a>*graphName* __arc keys__ *arc*

    Returns a list of keys for the *arc*\.

  - <a name='9'></a>*graphName* __arc keyexists__ *arc* ?\-key *key*?

    Return true if the specified *key* exists for the *arc*\. If no *key*
    is specified, the key __data__ is assumed\.

  - <a name='10'></a>*graphName* __arc insert__ *start* *end* ?*child*?

    Insert an arc named *child* into the graph beginning at the node *start*
    and ending at the node *end*\. If the name of the new arc is not specified
    the system will generate a unique name of the form *arc**x*\.

  - <a name='11'></a>*graphName* __arc lappend__ *arc* ?\-key *key*? *value*

    Appends a *value* \(as a list\) to one of the keyed values associated with
    an *arc*\. If no *key* is specified, the key __data__ is assumed\.

  - <a name='12'></a>*graphName* __arc set__ *arc* ?\-key *key*? ?*value*?

    Set or get one of the keyed values associated with an arc\. If no key is
    specified, the key __data__ is assumed\. Each arc that is added to a
    graph has the empty string assigned to the key __data__ automatically\.
    An arc may have any number of keyed values associated with it\. If *value*
    is not specified, this command returns the current value assigned to the
    key; if *value* is specified, this command assigns that value to the key\.

  - <a name='13'></a>*graphName* __arc source__ *arc*

    Return the node the given *arc* begins at\.

  - <a name='14'></a>*graphName* __arc target__ *arc*

    Return the node the given *arc* ends at\.

  - <a name='15'></a>*graphName* __arc unset__ *arc* ?\-key *key*?

    Remove a keyed value from the arc *arc*\. If no key is specified, the key
    __data__ is assumed\.

  - <a name='16'></a>*graphName* __arcs__ ?\-key *key*? ?\-value *value*? ?\-in&#124;\-out&#124;\-adj&#124;\-inner&#124;\-embedding *nodelist*?

    Return a list of arcs in the graph\. If no restriction is specified a list
    containing all arcs is returned\. Restrictions can limit the list of returned
    arcs based on the nodes that are connected by the arc, on the keyed values
    associated with the arc, or both\. The restrictions that involve connected
    nodes have a list of nodes as argument, specified after the name of the
    restriction itself\.

      * __\-in__

        Return a list of all arcs whose target is one of the nodes in the
        *nodelist*\.

      * __\-out__

        Return a list of all arcs whose source is one of the nodes in the
        *nodelist*\.

      * __\-adj__

        Return a list of all arcs adjacent to at least one of the nodes in the
        *nodelist*\. This is the union of the nodes returned by __\-in__ and
        __\-out__\.

      * __\-inner__

        Return a list of all arcs adjacent to two of the nodes in the
        *nodelist*\. This is the set of arcs in the subgraph spawned by the
        specified nodes\.

      * __\-embedding__

        Return a list of all arcs adjacent to exactly one of the nodes in the
        *nodelist*\. This is the set of arcs connecting the subgraph spawned by
        the specified nodes to the rest of the graph\.

      * __\-key__ *key*

        Limit the list of arcs that are returned to those arcs that have an
        associated key *key*\.

      * __\-value__ *value*

        This restriction can only be used in combination with __\-key__\. It
        limits the list of arcs that are returned to those arcs whose associated
        key *key* has the value *value*\.

    The restrictions imposed by either __\-in__, __\-out__, __\-adj__,
    __\-inner__, or __\-embedded__ are applied first\. Specifying more than
    one of them is illegal\. At last the restrictions set via __\-key__ \(and
    __\-value__\) are applied\. Specifying more than one __\-key__ \(and
    __\-value__\) is illegal\.

  - <a name='17'></a>*graphName* __node append__ *node* ?\-key *key*? *value*

    Appends a *value* to one of the keyed values associated with an *node*\.
    If no *key* is specified, the key __data__ is assumed\.

  - <a name='18'></a>*graphName* __node degree__ ?\-in&#124;\-out? *node*

    Return the number of arcs adjacent to the specified *node*\. If one of the
    restrictions __\-in__ or __\-out__ is given only the incoming resp\.
    outgoing arcs are counted\.

  - <a name='19'></a>*graphName* __node delete__ *node* ?*node* \.\.\.?

    Remove the specified nodes from the graph\. All of the nodes' arcs will be
    removed as well to prevent unconnected arcs\.

  - <a name='20'></a>*graphName* __node exists__ *node*

    Return true if the specified *node* exists in the graph\.

  - <a name='21'></a>*graphName* __node get__ *node* ?\-key *key*?

    Return the value associated with the key *key* for the *node*\. If no key
    is specified, the key __data__ is assumed\.

  - <a name='22'></a>*graphName* __node getall__ *node*

    Returns a serialized list of key/value pairs \(suitable for use with
    \[__array set__\]\) for the *node*\.

  - <a name='23'></a>*graphName* __node keys__ *node*

    Returns a list of keys for the *node*\.

  - <a name='24'></a>*graphName* __node keyexists__ *node* ?\-key *key*?

    Return true if the specified *key* exists for the *node*\. If no *key*
    is specified, the key __data__ is assumed\.

  - <a name='25'></a>*graphName* __node insert__ ?*child*?

    Insert a node named *child* into the graph\. The nodes has no arcs
    connected to it\. If the name of the new child is not specified the system
    will generate a unique name of the form *node**x*\.

  - <a name='26'></a>*graphName* __node lappend__ *node* ?\-key *key*? *value*

    Appends a *value* \(as a list\) to one of the keyed values associated with
    an *node*\. If no *key* is specified, the key __data__ is assumed\.

  - <a name='27'></a>*graphName* __node opposite__ *node* *arc*

    Return the node at the other end of the specified *arc*, which has to be
    adjacent to the given *node*\.

  - <a name='28'></a>*graphName* __node set__ *node* ?\-key *key*? ?*value*?

    Set or get one of the keyed values associated with a node\. If no key is
    specified, the key __data__ is assumed\. Each node that is added to a
    graph has the empty string assigned to the key __data__ automatically\. A
    node may have any number of keyed values associated with it\. If *value* is
    not specified, this command returns the current value assigned to the key;
    if *value* is specified, this command assigns that value to the key\.

  - <a name='29'></a>*graphName* __node unset__ *node* ?\-key *key*?

    Remove a keyed value from the node *node*\. If no key is specified, the key
    __data__ is assumed\.

  - <a name='30'></a>*graphName* __nodes__ ?\-key *key*? ?\-value *value*? ?\-in&#124;\-out&#124;\-adj&#124;\-inner&#124;\-embedding *nodelist*?

    Return a list of nodes in the graph\. Restrictions can limit the list of
    returned nodes based on neighboring nodes, or based on the keyed values
    associated with the node\. The restrictions that involve neighboring nodes
    have a list of nodes as argument, specified after the name of the
    restriction itself\.

    The possible restrictions are the same as for method __arcs__\. The set
    of nodes to return is computed as the union of all source and target nodes
    for all the arcs satisfying the restriction as defined for __arcs__\.

  - <a name='31'></a>*graphName* __get__ ?\-key *key*?

    Return the value associated with the key *key* for the graph\. If no key is
    specified, the key __data__ is assumed\.

  - <a name='32'></a>*graphName* __getall__

    Returns a serialized list of key/value pairs \(suitable for use with
    \[__array set__\]\) for the whole graph\.

  - <a name='33'></a>*graphName* __keys__

    Returns a list of keys for the whole graph\.

  - <a name='34'></a>*graphName* __keyexists__ ?\-key *key*?

    Return true if the specified *key* exists for the whole graph\. If no
    *key* is specified, the key __data__ is assumed\.

  - <a name='35'></a>*graphName* __set__ ?\-key *key*? ?*value*?

    Set or get one of the keyed values associated with a graph\. If no key is
    specified, the key __data__ is assumed\. Each graph has the empty string
    assigned to the key __data__ automatically\. A graph may have any number
    of keyed values associated with it\. If *value* is not specified, this
    command returns the current value assigned to the key; if *value* is
    specified, this command assigns that value to the key\.

  - <a name='36'></a>*graphName* __swap__ *node1* *node2*

    Swap the position of *node1* and *node2* in the graph\.

  - <a name='37'></a>*graphName* __unset__ ?\-key *key*?

    Remove a keyed value from the graph\. If no key is specified, the key
    __data__ is assumed\.

  - <a name='38'></a>*graphName* __walk__ *node* ?\-order *order*? ?\-type *type*? ?\-dir *direction*? \-command *cmd*

    Perform a breadth\-first or depth\-first walk of the graph starting at the
    node *node* going in either the direction of outgoing or opposite to the
    incoming arcs\.

    The type of walk, breadth\-first or depth\-first, is determined by the value
    of *type*; __bfs__ indicates breadth\-first, __dfs__ indicates
    depth\-first\. Depth\-first is the default\.

    The order of the walk, pre\-order, post\-order or both\-order is determined by
    the value of *order*; __pre__ indicates pre\-order, __post__
    indicates post\-order, __both__ indicates both\-order\. Pre\-order is the
    default\. Pre\-order walking means that a node is visited before any of its
    neighbors \(as defined by the *direction*, see below\)\. Post\-order walking
    means that a parent is visited after any of its neighbors\. Both\-order
    walking means that a node is visited before *and* after any of its
    neighbors\. The combination of a bread\-first walk with post\- or both\-order is
    illegal\.

    The direction of the walk is determined by the value of *dir*;
    __backward__ indicates the direction opposite to the incoming arcs,
    __forward__ indicates the direction of the outgoing arcs\.

    As the walk progresses, the command *cmd* will be evaluated at each node,
    with the mode of the call \(__enter__ or __leave__\) and values
    *graphName* and the name of the current node appended\. For a pre\-order
    walk, all nodes are __enter__ed, for a post\-order all nodes are left\. In
    a both\-order walk the first visit of a node __enter__s it, the second
    visit __leave__s it\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: graph* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[cgraph](\.\./\.\./\.\./\.\./index\.md\#cgraph),
[graph](\.\./\.\./\.\./\.\./index\.md\#graph)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/graphops.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469

[//000000001]: # (struct::graph::op \- Tcl Data Structures)
[//000000002]: # (Generated from file 'graphops\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008 Alejandro Paz <vidriloco@gmail\.com>)
[//000000004]: # (Copyright &copy; 2008 \(docs\) Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (Copyright &copy; 2009 Michal Antoniewski <antoniewski\.m@gmail\.com>)
[//000000006]: # (struct::graph::op\(n\) 0\.11\.3 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::graph::op \- Operation for \(un\)directed graph objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Operations](#section2)

  - [Background theory and terms](#section3)

      - [Shortest Path Problem](#subsection1)

      - [Travelling Salesman Problem](#subsection2)

      - [Matching Problem](#subsection3)

      - [Cut Problems](#subsection4)

      - [K\-Center Problem](#subsection5)

      - [Flow Problems](#subsection6)

      - [Approximation algorithm](#subsection7)

  - [References](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require struct::graph::op ?0\.11\.3?  

[__struct::graph::op::toAdjacencyMatrix__ *g*](#1)  
[__struct::graph::op::toAdjacencyList__ *G* ?*options*\.\.\.?](#2)  
[__struct::graph::op::kruskal__ *g*](#3)  
[__struct::graph::op::prim__ *g*](#4)  
[__struct::graph::op::isBipartite?__ *g* ?*bipartvar*?](#5)  
[__struct::graph::op::tarjan__ *g*](#6)  
[__struct::graph::op::connectedComponents__ *g*](#7)  
[__struct::graph::op::connectedComponentOf__ *g* *n*](#8)  
[__struct::graph::op::isConnected?__ *g*](#9)  
[__struct::graph::op::isCutVertex?__ *g* *n*](#10)  
[__struct::graph::op::isBridge?__ *g* *a*](#11)  
[__struct::graph::op::isEulerian?__ *g* ?*tourvar*?](#12)  
[__struct::graph::op::isSemiEulerian?__ *g* ?*pathvar*?](#13)  
[__struct::graph::op::dijkstra__ *g* *start* ?*options*\.\.\.?](#14)  
[__struct::graph::op::distance__ *g* *origin* *destination* ?*options*\.\.\.?](#15)  
[__struct::graph::op::eccentricity__ *g* *n* ?*options*\.\.\.?](#16)  
[__struct::graph::op::radius__ *g* ?*options*\.\.\.?](#17)  
[__struct::graph::op::diameter__ *g* ?*options*\.\.\.?](#18)  
[__struct::graph::op::BellmanFord__ *G* *startnode*](#19)  
[__struct::graph::op::Johnsons__ *G* ?*options*\.\.\.?](#20)  
[__struct::graph::op::FloydWarshall__ *G*](#21)  
[__struct::graph::op::MetricTravellingSalesman__ *G*](#22)  
[__struct::graph::op::Christofides__ *G*](#23)  
[__struct::graph::op::GreedyMaxMatching__ *G*](#24)  
[__struct::graph::op::MaxCut__ *G* *U* *V*](#25)  
[__struct::graph::op::UnweightedKCenter__ *G* *k*](#26)  
[__struct::graph::op::WeightedKCenter__ *G* *nodeWeights* *W*](#27)  
[__struct::graph::op::GreedyMaxIndependentSet__ *G*](#28)  
[__struct::graph::op::GreedyWeightedMaxIndependentSet__ *G* *nodeWeights*](#29)  
[__struct::graph::op::VerticesCover__ *G*](#30)  
[__struct::graph::op::EdmondsKarp__ *G* *s* *t*](#31)  
[__struct::graph::op::BusackerGowen__ *G* *desiredFlow* *s* *t*](#32)  
[__struct::graph::op::ShortestsPathsByBFS__ *G* *s* *outputFormat*](#33)  
[__struct::graph::op::BFS__ *G* *s* ?*outputFormat*\.\.\.?](#34)  
[__struct::graph::op::MinimumDiameterSpanningTree__ *G*](#35)  
[__struct::graph::op::MinimumDegreeSpanningTree__ *G*](#36)  
[__struct::graph::op::MaximumFlowByDinic__ *G* *s* *t* *blockingFlowAlg*](#37)  
[__struct::graph::op::BlockingFlowByDinic__ *G* *s* *t*](#38)  
[__struct::graph::op::BlockingFlowByMKM__ *G* *s* *t*](#39)  
[__struct::graph::op::createResidualGraph__ *G* *f*](#40)  
[__struct::graph::op::createAugmentingNetwork__ *G* *f* *path*](#41)  
[__struct::graph::op::createLevelGraph__ *Gf* *s*](#42)  
[__struct::graph::op::TSPLocalSearching__ *G* *C*](#43)  
[__struct::graph::op::TSPLocalSearching3Approx__ *G* *C*](#44)  
[__struct::graph::op::createSquaredGraph__ *G*](#45)  
[__struct::graph::op::createCompleteGraph__ *G* *originalEdges*](#46)  

# <a name='description'></a>DESCRIPTION

The package described by this document, __struct::graph::op__, is a
companion to the package __[struct::graph](graph\.md)__\. It provides a
series of common operations and algorithms applicable to \(un\)directed graphs\.

Despite being a companion the package is not directly dependent on
__[struct::graph](graph\.md)__, only on the API defined by that package\.
I\.e\. the operations of this package can be applied to any and all graph objects
which provide the same API as the objects created through
__[struct::graph](graph\.md)__\.

# <a name='section2'></a>Operations

  - <a name='1'></a>__struct::graph::op::toAdjacencyMatrix__ *g*

    This command takes the graph *g* and returns a nested list containing the
    adjacency matrix of *g*\.

    The elements of the outer list are the rows of the matrix, the inner
    elements are the column values in each row\. The matrix has "__n__\+1"
    rows and columns, with the first row and column \(index 0\) containing the
    name of the node the row/column is for\. All other elements are boolean
    values, __True__ if there is an arc between the 2 nodes of the
    respective row and column, and __False__ otherwise\.

    Note that the matrix is symmetric\. It does not represent the directionality
    of arcs, only their presence between nodes\. It is also unable to represent
    parallel arcs in *g*\.

  - <a name='2'></a>__struct::graph::op::toAdjacencyList__ *G* ?*options*\.\.\.?

    Procedure creates for input graph *G*, it's representation as
    *[Adjacency List](\.\./\.\./\.\./\.\./index\.md\#adjacency\_list)*\. It handles
    both directed and undirected graphs \(default is undirected\)\. It returns
    dictionary that for each node \(key\) returns list of nodes adjacent to it\.
    When considering weighted version, for each adjacent node there is also
    weight of the edge included\.

      * Arguments:

          + Graph object *G* \(input\)

            A graph to convert into an *[Adjacency
            List](\.\./\.\./\.\./\.\./index\.md\#adjacency\_list)*\.

      * Options:

          + __\-directed__

            By default *G* is operated as if it were an *Undirected graph*\.
            Using this option tells the command to handle *G* as the directed
            graph it is\.

          + __\-weights__

            By default any weight information the graph *G* may have is
            ignored\. Using this option tells the command to put weight
            information into the result\. In that case it is expected that all
            arcs have a proper weight, and an error is thrown if that is not the
            case\.

  - <a name='3'></a>__struct::graph::op::kruskal__ *g*

    This command takes the graph *g* and returns a list containing the names
    of the arcs in *g* which span up a minimum weight spanning tree \(MST\), or,
    in the case of an un\-connected graph, a minimum weight spanning forest
    \(except for the 1\-vertex components\)\. Kruskal's algorithm is used to compute
    the tree or forest\. This algorithm has a time complexity of *O\(E\*log E\)*
    or *O\(E\* log V\)*, where *V* is the number of vertices and
    *[E](\.\./\.\./\.\./\.\./index\.md\#e)* is the number of edges in graph *g*\.

    The command will throw an error if one or more arcs in *g* have no weight
    associated with them\.

    A note regarding the result, the command refrains from explicitly listing
    the nodes of the MST as this information is implicitly provided in the arcs
    already\.

  - <a name='4'></a>__struct::graph::op::prim__ *g*

    This command takes the graph *g* and returns a list containing the names
    of the arcs in *g* which span up a minimum weight spanning tree \(MST\), or,
    in the case of an un\-connected graph, a minimum weight spanning forest
    \(except for the 1\-vertex components\)\. Prim's algorithm is used to compute
    the tree or forest\. This algorithm has a time complexity between *O\(E\+V\*log
    V\)* and *O\(V\*V\)*, depending on the implementation \(Fibonacci heap \+
    Adjacency list versus Adjacency Matrix\)\. As usual *V* is the number of
    vertices and *[E](\.\./\.\./\.\./\.\./index\.md\#e)* the number of edges in
    graph *g*\.

    The command will throw an error if one or more arcs in *g* have no weight
    associated with them\.

    A note regarding the result, the command refrains from explicitly listing
    the nodes of the MST as this information is implicitly provided in the arcs
    already\.

  - <a name='5'></a>__struct::graph::op::isBipartite?__ *g* ?*bipartvar*?

    This command takes the graph *g* and returns a boolean value indicating
    whether it is bipartite \(__true__\) or not \(__false__\)\. If the
    variable *bipartvar* is specified the two partitions of the graph are
    there as a list, if, and only if the graph is bipartit\. If it is not the
    variable, if specified, is not touched\.

  - <a name='6'></a>__struct::graph::op::tarjan__ *g*

    This command computes the set of *strongly connected* components \(SCCs\) of
    the graph *g*\. The result of the command is a list of sets, each of which
    contains the nodes for one of the SCCs of *g*\. The union of all SCCs
    covers the whole graph, and no two SCCs intersect with each other\.

    The graph *g* is *acyclic* if all SCCs in the result contain only a
    single node\. The graph *g* is *strongly connected* if the result
    contains only a single SCC containing all nodes of *g*\.

  - <a name='7'></a>__struct::graph::op::connectedComponents__ *g*

    This command computes the set of *connected* components \(CCs\) of the graph
    *g*\. The result of the command is a list of sets, each of which contains
    the nodes for one of the CCs of *g*\. The union of all CCs covers the whole
    graph, and no two CCs intersect with each other\.

    The graph *g* is *connected* if the result contains only a single SCC
    containing all nodes of *g*\.

  - <a name='8'></a>__struct::graph::op::connectedComponentOf__ *g* *n*

    This command computes the *connected* component \(CC\) of the graph *g*
    containing the node *n*\. The result of the command is a sets which
    contains the nodes for the CC of *n* in *g*\.

    The command will throw an error if *n* is not a node of the graph *g*\.

  - <a name='9'></a>__struct::graph::op::isConnected?__ *g*

    This is a convenience command determining whether the graph *g* is
    *connected* or not\. The result is a boolean value, __true__ if the
    graph is connected, and __false__ otherwise\.

  - <a name='10'></a>__struct::graph::op::isCutVertex?__ *g* *n*

    This command determines whether the node *n* in the graph *g* is a
    *[cut vertex](\.\./\.\./\.\./\.\./index\.md\#cut\_vertex)* \(aka *[articulation
    point](\.\./\.\./\.\./\.\./index\.md\#articulation\_point)*\)\. The result is a
    boolean value, __true__ if the node is a cut vertex, and __false__
    otherwise\.

    The command will throw an error if *n* is not a node of the graph *g*\.

  - <a name='11'></a>__struct::graph::op::isBridge?__ *g* *a*

    This command determines whether the arc *a* in the graph *g* is a
    *[bridge](\.\./\.\./\.\./\.\./index\.md\#bridge)* \(aka *[cut
    edge](\.\./\.\./\.\./\.\./index\.md\#cut\_edge)*, or
    *[isthmus](\.\./\.\./\.\./\.\./index\.md\#isthmus)*\)\. The result is a boolean
    value, __true__ if the arc is a bridge, and __false__ otherwise\.

    The command will throw an error if *a* is not an arc of the graph *g*\.

  - <a name='12'></a>__struct::graph::op::isEulerian?__ *g* ?*tourvar*?

    This command determines whether the graph *g* is *eulerian* or not\. The
    result is a boolean value, __true__ if the graph is eulerian, and
    __false__ otherwise\.

    If the graph is eulerian and *tourvar* is specified then an euler tour is
    computed as well and stored in the named variable\. The tour is represented
    by the list of arcs traversed, in the order of traversal\.

  - <a name='13'></a>__struct::graph::op::isSemiEulerian?__ *g* ?*pathvar*?

    This command determines whether the graph *g* is *semi\-eulerian* or not\.
    The result is a boolean value, __true__ if the graph is semi\-eulerian,
    and __false__ otherwise\.

    If the graph is semi\-eulerian and *pathvar* is specified then an euler
    path is computed as well and stored in the named variable\. The path is
    represented by the list of arcs traversed, in the order of traversal\.

  - <a name='14'></a>__struct::graph::op::dijkstra__ *g* *start* ?*options*\.\.\.?

    This command determines distances in the weighted *g* from the node
    *start* to all other nodes in the graph\. The options specify how to
    traverse graphs, and the format of the result\.

    Two options are recognized

      * __\-arcmode__ mode

        The accepted mode values are __directed__ and __undirected__\.
        For directed traversal all arcs are traversed from source to target\. For
        undirected traversal all arcs are traversed in the opposite direction as
        well\. Undirected traversal is the default\.

      * __\-outputformat__ format

        The accepted format values are __distances__ and __tree__\. In
        both cases the result is a dictionary keyed by the names of all nodes in
        the graph\. For __distances__ the value is the distance of the node
        to *start*, whereas for __tree__ the value is the path from the
        node to *start*, excluding the node itself, but including *start*\.
        Tree format is the default\.

  - <a name='15'></a>__struct::graph::op::distance__ *g* *origin* *destination* ?*options*\.\.\.?

    This command determines the \(un\)directed distance between the two nodes
    *origin* and *destination* in the graph *g*\. It accepts the option
    __\-arcmode__ of __struct::graph::op::dijkstra__\.

  - <a name='16'></a>__struct::graph::op::eccentricity__ *g* *n* ?*options*\.\.\.?

    This command determines the \(un\)directed
    *[eccentricity](\.\./\.\./\.\./\.\./index\.md\#eccentricity)* of the node *n*
    in the graph *g*\. It accepts the option __\-arcmode__ of
    __struct::graph::op::dijkstra__\.

    The \(un\)directed *[eccentricity](\.\./\.\./\.\./\.\./index\.md\#eccentricity)*
    of a node is the maximal \(un\)directed distance between the node and any
    other node in the graph\.

  - <a name='17'></a>__struct::graph::op::radius__ *g* ?*options*\.\.\.?

    This command determines the \(un\)directed
    *[radius](\.\./\.\./\.\./\.\./index\.md\#radius)* of the graph *g*\. It accepts
    the option __\-arcmode__ of __struct::graph::op::dijkstra__\.

    The \(un\)directed *[radius](\.\./\.\./\.\./\.\./index\.md\#radius)* of a graph is
    the minimal \(un\)directed
    *[eccentricity](\.\./\.\./\.\./\.\./index\.md\#eccentricity)* of all nodes in
    the graph\.

  - <a name='18'></a>__struct::graph::op::diameter__ *g* ?*options*\.\.\.?

    This command determines the \(un\)directed
    *[diameter](\.\./\.\./\.\./\.\./index\.md\#diameter)* of the graph *g*\. It
    accepts the option __\-arcmode__ of __struct::graph::op::dijkstra__\.

    The \(un\)directed *[diameter](\.\./\.\./\.\./\.\./index\.md\#diameter)* of a
    graph is the maximal \(un\)directed
    *[eccentricity](\.\./\.\./\.\./\.\./index\.md\#eccentricity)* of all nodes in
    the graph\.

  - <a name='19'></a>__struct::graph::op::BellmanFord__ *G* *startnode*

    Searching for [shortests paths](#subsection1) between chosen node and
    all other nodes in graph *G*\. Based on relaxation method\. In comparison to
    __struct::graph::op::dijkstra__ it doesn't need assumption that all
    weights on edges in input graph *G* have to be positive\.

    That generality sets the complexity of algorithm to \- *O\(V\*E\)*, where
    *V* is the number of vertices and *[E](\.\./\.\./\.\./\.\./index\.md\#e)* is
    number of edges in graph *G*\.

      * Arguments:

          + Graph object *G* \(input\)

            Directed, connected and edge weighted graph *G*, without any
            negative cycles \( presence of cycles with the negative sum of weight
            means that there is no shortest path, since the total weight becomes
            lower each time the cycle is traversed \)\. Negative weights on edges
            are allowed\.

          + Node *startnode* \(input\)

            The node for which we find all shortest paths to each other node in
            graph *G*\.

      * Result:

        Dictionary containing for each node \(key\) distances to each other node
        in graph *G*\.

    *Note:* If algorithm finds a negative cycle, it will return error message\.

  - <a name='20'></a>__struct::graph::op::Johnsons__ *G* ?*options*\.\.\.?

    Searching for [shortest paths](#subsection1) between all pairs of
    vertices in graph\. For sparse graphs asymptotically quicker than
    __struct::graph::op::FloydWarshall__ algorithm\. Johnson's algorithm uses
    __struct::graph::op::BellmanFord__ and
    __struct::graph::op::dijkstra__ as subprocedures\.

    Time complexity: *O\(n\*\*2\*log\(n\) \+n\*m\)*, where *n* is the number of nodes
    and *m* is the number of edges in graph *G*\.

      * Arguments:

          + Graph object *G* \(input\)

            Directed graph *G*, weighted on edges and not containing any
            cycles with negative sum of weights \( the presence of such cycles
            means there is no shortest path, since the total weight becomes
            lower each time the cycle is traversed \)\. Negative weights on edges
            are allowed\.

      * Options:

          + __\-filter__

            Returns only existing distances, cuts all *Inf* values for
            non\-existing connections between pairs of nodes\.

      * Result:

        Dictionary containing distances between all pairs of vertices\.

  - <a name='21'></a>__struct::graph::op::FloydWarshall__ *G*

    Searching for [shortest paths](#subsection1) between all pairs of edges
    in weighted graphs\.

    Time complexity: *O\(V^3\)* \- where *V* is number of vertices\.

    Memory complexity: *O\(V^2\)*\.

      * Arguments:

          + Graph object *G* \(input\)

            Directed and weighted graph *G*\.

      * Result:

        Dictionary containing shortest distances to each node from each node\.

    *Note:* Algorithm finds solutions dynamically\. It compares all possible
    paths through the graph between each pair of vertices\. Graph shouldn't
    possess any cycle with negative sum of weights \(the presence of such cycles
    means there is no shortest path, since the total weight becomes lower each
    time the cycle is traversed\)\.

    On the other hand algorithm can be used to find those cycles \- if any
    shortest distance found by algorithm for any nodes *v* and *u* \(when
    *v* is the same node as *u*\) is negative, that node surely belong to at
    least one negative cycle\.

  - <a name='22'></a>__struct::graph::op::MetricTravellingSalesman__ *G*

    Algorithm for solving a metric variation of [Travelling salesman
    problem](#subsection2)\. *TSP problem* is *NP\-Complete*, so there is
    no efficient algorithm to solve it\. Greedy methods are getting extremely
    slow, with the increase in the set of nodes\.

      * Arguments:

          + Graph object *G* \(input\)

            Undirected, weighted graph *G*\.

      * Result:

        Approximated solution of minimum *Hamilton Cycle* \- closed path
        visiting all nodes, each exactly one time\.

    *Note:* [It's 2\-approximation algorithm\.](#subsection7)

  - <a name='23'></a>__struct::graph::op::Christofides__ *G*

    Another algorithm for solving [metric *TSP problem*](#subsection2)\.
    Christofides implementation uses *Max Matching* for reaching better
    approximation factor\.

      * Arguments:

          + Graph Object *G* \(input\)

            Undirected, weighted graph *G*\.

      * Result:

        Approximated solution of minimum *Hamilton Cycle* \- closed path
        visiting all nodes, each exactly one time\.

    *Note:* [It's is a 3/2 approximation algorithm\. ](#subsection7)

  - <a name='24'></a>__struct::graph::op::GreedyMaxMatching__ *G*

    *Greedy Max Matching* procedure, which finds [maximal
    matching](#subsection3) \(not maximum\) for given graph *G*\. It adds
    edges to solution, beginning from edges with the lowest cost\.

      * Arguments:

          + Graph Object *G* \(input\)

            Undirected graph *G*\.

      * Result:

        Set of edges \- the max matching for graph *G*\.

  - <a name='25'></a>__struct::graph::op::MaxCut__ *G* *U* *V*

    Algorithm solving a [Maximum Cut Problem](#subsection4)\.

      * Arguments:

          + Graph Object *G* \(input\)

            The graph to cut\.

          + List *U* \(output\)

            Variable storing first set of nodes \(cut\) given by solution\.

          + List *V* \(output\)

            Variable storing second set of nodes \(cut\) given by solution\.

      * Result:

        Algorithm returns number of edges between found two sets of nodes\.

    *Note:* *MaxCut* is a [2\-approximation algorithm\.](#subsection7)

  - <a name='26'></a>__struct::graph::op::UnweightedKCenter__ *G* *k*

    Approximation algorithm that solves a [k\-center problem](#subsection5)\.

      * Arguments:

          + Graph Object *G* \(input\)

            Undirected complete graph *G*, which satisfies triangle
            inequality\.

          + Integer *k* \(input\)

            Positive integer that sets the number of nodes that will be included
            in *k\-center*\.

      * Result:

        Set of nodes \- *k* center for graph *G*\.

    *Note:* *UnweightedKCenter* is a [2\-approximation
    algorithm\.](#subsection7)

  - <a name='27'></a>__struct::graph::op::WeightedKCenter__ *G* *nodeWeights* *W*

    Approximation algorithm that solves a weighted version of [k\-center
    problem](#subsection5)\.

      * Arguments:

          + Graph Object *G* \(input\)

            Undirected complete graph *G*, which satisfies triangle
            inequality\.

          + Integer *W* \(input\)

            Positive integer that sets the maximum possible weight of
            *k\-center* found by algorithm\.

          + List *nodeWeights* \(input\)

            List of nodes and its weights in graph *G*\.

      * Result:

        Set of nodes, which is solution found by algorithm\.

    *Note:**WeightedKCenter* is a [3\-approximation
    algorithm\.](#subsection7)

  - <a name='28'></a>__struct::graph::op::GreedyMaxIndependentSet__ *G*

    A *maximal independent set* is an *[independent
    set](\.\./\.\./\.\./\.\./index\.md\#independent\_set)* such that adding any other
    node to the set forces the set to contain an edge\.

    Algorithm for input graph *G* returns set of nodes \(list\), which are
    contained in Max Independent Set found by algorithm\.

  - <a name='29'></a>__struct::graph::op::GreedyWeightedMaxIndependentSet__ *G* *nodeWeights*

    Weighted variation of *Maximal Independent Set*\. It takes as an input
    argument not only graph *G* but also set of weights for all vertices in
    graph *G*\.

    *Note:* Read also *Maximal Independent Set* description for more info\.

  - <a name='30'></a>__struct::graph::op::VerticesCover__ *G*

    *Vertices cover* is a set of vertices such that each edge of the graph is
    incident to at least one vertex of the set\. This 2\-approximation algorithm
    searches for minimum *vertices cover*, which is a classical optimization
    problem in computer science and is a typical example of an *NP\-hard*
    optimization problem that has an approximation algorithm\. For input graph
    *G* algorithm returns the set of edges \(list\), which is Vertex Cover found
    by algorithm\.

  - <a name='31'></a>__struct::graph::op::EdmondsKarp__ *G* *s* *t*

    Improved Ford\-Fulkerson's algorithm, computing the [maximum
    flow](#subsection6) in given flow network *G*\.

      * Arguments:

          + Graph Object *G* \(input\)

            Weighted and directed graph\. Each edge should have set integer
            attribute considered as maximum throughputs that can be carried by
            that link \(edge\)\.

          + Node *s* \(input\)

            The node that is a source for graph *G*\.

          + Node *t* \(input\)

            The node that is a sink for graph *G*\.

      * Result:

        Procedure returns the dictionary containing throughputs for all edges\.
        For each key \( the edge between nodes *u* and *v* in the form of
        *list u v* \) there is a value that is a throughput for that key\. Edges
        where throughput values are equal to 0 are not returned \( it is like
        there was no link in the flow network between nodes connected by such
        edge\)\.

    The general idea of algorithm is finding the shortest augumenting paths in
    graph *G*, as long as they exist, and for each path updating the edge's
    weights along that path, with maximum possible throughput\. The final
    \(maximum\) flow is found when there is no other augumenting path from source
    to sink\.

    *Note:* Algorithm complexity : *O\(V\*E\)*, where *V* is the number of
    nodes and *[E](\.\./\.\./\.\./\.\./index\.md\#e)* is the number of edges in
    graph *G*\.

  - <a name='32'></a>__struct::graph::op::BusackerGowen__ *G* *desiredFlow* *s* *t*

    Algorithm finds solution for a [minimum cost flow
    problem](#subsection6)\. So, the goal is to find a flow, whose max value
    can be *desiredFlow*, from source node *s* to sink node *t* in given
    flow network *G*\. That network except throughputs at edges has also
    defined a non\-negative cost on each edge \- cost of using that edge when
    directing flow with that edge \( it can illustrate e\.g\. fuel usage, time or
    any other measure dependent on usages \)\.

      * Arguments:

          + Graph Object *G* \(input\)

            Flow network \(directed graph\), each edge in graph should have two
            integer attributes: *cost* and *throughput*\.

          + Integer *desiredFlow* \(input\)

            Max value of the flow for that network\.

          + Node *s* \(input\)

            The source node for graph *G*\.

          + Node *t* \(input\)

            The sink node for graph *G*\.

      * Result:

        Dictionary containing values of used throughputs for each edge \( key \)\.
        found by algorithm\.

    *Note:* Algorithm complexity : *O\(V\*\*2\*desiredFlow\)*, where *V* is the
    number of nodes in graph *G*\.

  - <a name='33'></a>__struct::graph::op::ShortestsPathsByBFS__ *G* *s* *outputFormat*

    Shortest pathfinding algorithm using BFS method\. In comparison to
    __struct::graph::op::dijkstra__ it can work with negative weights on
    edges\. Of course negative cycles are not allowed\. Algorithm is better than
    dijkstra for sparse graphs, but also there exist some pathological cases
    \(those cases generally don't appear in practise\) that make time complexity
    increase exponentially with the growth of the number of nodes\.

      * Arguments:

          + Graph Object *G* \(input\)

            Input graph\.

          + Node *s* \(input\)

            Source node for which all distances to each other node in graph
            *G* are computed\.

      * Options and result:

          + __distances__

            When selected *outputFormat* is __distances__ \- procedure
            returns dictionary containing distances between source node *s*
            and each other node in graph *G*\.

          + __paths__

            When selected *outputFormat* is __paths__ \- procedure returns
            dictionary containing for each node *v*, a list of nodes, which is
            a path between source node *s* and node *v*\.

  - <a name='34'></a>__struct::graph::op::BFS__ *G* *s* ?*outputFormat*\.\.\.?

    Breadth\-First Search \- algorithm creates the BFS Tree\. Memory and time
    complexity: *O\(V \+ E\)*, where *V* is the number of nodes and
    *[E](\.\./\.\./\.\./\.\./index\.md\#e)* is number of edges\.

      * Arguments:

          + Graph Object *G* \(input\)

            Input graph\.

          + Node *s* \(input\)

            Source node for BFS procedure\.

      * Options and result:

          + __graph__

            When selected __outputFormat__ is __graph__ \- procedure
            returns a graph structure \(__[struct::graph](graph\.md)__\),
            which is equivalent to BFS tree found by algorithm\.

          + __tree__

            When selected __outputFormat__ is __tree__ \- procedure
            returns a tree structure
            \(__[struct::tree](struct\_tree\.md)__\), which is equivalent to
            BFS tree found by algorithm\.

  - <a name='35'></a>__struct::graph::op::MinimumDiameterSpanningTree__ *G*

    The goal is to find for input graph *G*, the *spanning tree* that has
    the minimum *[diameter](\.\./\.\./\.\./\.\./index\.md\#diameter)* value\.

    General idea of algorithm is to run *[BFS](\.\./\.\./\.\./\.\./index\.md\#bfs)*
    over all vertices in graph *G*\. If the diameter *d* of the tree is odd,
    then we are sure that tree given by *[BFS](\.\./\.\./\.\./\.\./index\.md\#bfs)*
    is minimum \(considering diameter value\)\. When, diameter *d* is even, then
    optimal tree can have minimum
    *[diameter](\.\./\.\./\.\./\.\./index\.md\#diameter)* equal to *d* or *d\-1*\.

    In that case, what algorithm does is rebuilding the tree given by
    *[BFS](\.\./\.\./\.\./\.\./index\.md\#bfs)*, by adding a vertice between root
    node and root's child node \(nodes\), such that subtree created with child
    node as root node is the greatest one \(has the greatests height\)\. In the
    next step for such rebuilded tree, we run again
    *[BFS](\.\./\.\./\.\./\.\./index\.md\#bfs)* with new node as root node\. If the
    height of the tree didn't changed, we have found a better solution\.

    For input graph *G* algorithm returns the graph structure
    \(__[struct::graph](graph\.md)__\) that is a spanning tree with minimum
    diameter found by algorithm\.

  - <a name='36'></a>__struct::graph::op::MinimumDegreeSpanningTree__ *G*

    Algorithm finds for input graph *G*, a spanning tree *T* with the
    minimum possible degree\. That problem is *NP\-hard*, so algorithm is an
    approximation algorithm\.

    Let *V* be the set of nodes for graph *G* and let *W* be any subset of
    *V*\. Lets assume also that *OPT* is optimal solution and *ALG* is
    solution found by algorithm for input graph *G*\.

    It can be proven that solution found with the algorithm must fulfil
    inequality:

    *\(\(&#124;W&#124; \+ k \- 1\) / &#124;W&#124;\) <= ALG <= 2\*OPT \+ log2\(n\) \+ 1*\.

      * Arguments:

          + Graph Object *G* \(input\)

            Undirected simple graph\.

      * Result:

        Algorithm returns graph structure, which is equivalent to spanning tree
        *T* found by algorithm\.

  - <a name='37'></a>__struct::graph::op::MaximumFlowByDinic__ *G* *s* *t* *blockingFlowAlg*

    Algorithm finds [maximum flow](#subsection6) for the flow network
    represented by graph *G*\. It is based on the blocking\-flow finding
    methods, which give us different complexities what makes a better fit for
    different graphs\.

      * Arguments:

          + Graph Object *G* \(input\)

            Directed graph *G* representing the flow network\. Each edge should
            have attribute *throughput* set with integer value\.

          + Node *s* \(input\)

            The source node for the flow network *G*\.

          + Node *t* \(input\)

            The sink node for the flow network *G*\.

      * Options:

          + __dinic__

            Procedure will find maximum flow for flow network *G* using
            Dinic's algorithm \(__struct::graph::op::BlockingFlowByDinic__\)
            for blocking flow computation\.

          + __mkm__

            Procedure will find maximum flow for flow network *G* using
            Malhotra, Kumar and Maheshwari's algorithm
            \(__struct::graph::op::BlockingFlowByMKM__\) for blocking flow
            computation\.

      * Result:

        Algorithm returns dictionary containing it's flow value for each edge
        \(key\) in network *G*\.

    *Note:* __struct::graph::op::BlockingFlowByDinic__ gives *O\(m\*n^2\)*
    complexity and __struct::graph::op::BlockingFlowByMKM__ gives *O\(n^3\)*
    complexity, where *n* is the number of nodes and *m* is the number of
    edges in flow network *G*\.

  - <a name='38'></a>__struct::graph::op::BlockingFlowByDinic__ *G* *s* *t*

    Algorithm for given network *G* with source *s* and sink *t*, finds a
    [blocking flow](#subsection6), which can be used to obtain a
    *[maximum flow](\.\./\.\./\.\./\.\./index\.md\#maximum\_flow)* for that network
    *G*\.

      * Arguments:

          + Graph Object *G* \(input\)

            Directed graph *G* representing the flow network\. Each edge should
            have attribute *throughput* set with integer value\.

          + Node *s* \(input\)

            The source node for the flow network *G*\.

          + Node *t* \(input\)

            The sink node for the flow network *G*\.

      * Result:

        Algorithm returns dictionary containing it's blocking flow value for
        each edge \(key\) in network *G*\.

    *Note:* Algorithm's complexity is *O\(n\*m\)*, where *n* is the number of
    nodes and *m* is the number of edges in flow network *G*\.

  - <a name='39'></a>__struct::graph::op::BlockingFlowByMKM__ *G* *s* *t*

    Algorithm for given network *G* with source *s* and sink *t*, finds a
    [blocking flow](#subsection6), which can be used to obtain a
    *[maximum flow](\.\./\.\./\.\./\.\./index\.md\#maximum\_flow)* for that
    *[network](\.\./\.\./\.\./\.\./index\.md\#network)* *G*\.

      * Arguments:

          + Graph Object *G* \(input\)

            Directed graph *G* representing the flow network\. Each edge should
            have attribute *throughput* set with integer value\.

          + Node *s* \(input\)

            The source node for the flow network *G*\.

          + Node *t* \(input\)

            The sink node for the flow network *G*\.

      * Result:

        Algorithm returns dictionary containing it's blocking flow value for
        each edge \(key\) in network *G*\.

    *Note:* Algorithm's complexity is *O\(n^2\)*, where *n* is the number of
    nodes in flow network *G*\.

  - <a name='40'></a>__struct::graph::op::createResidualGraph__ *G* *f*

    Procedure creates a *[residual
    graph](\.\./\.\./\.\./\.\./index\.md\#residual\_graph)* \(or [residual
    network](#subsection6) \) for network *G* and given flow *f*\.

      * Arguments:

          + Graph Object *G* \(input\)

            Flow network \(directed graph where each edge has set attribute:
            *throughput* \)\.

          + dictionary *f* \(input\)

            Current flows in flow network *G*\.

      * Result:

        Procedure returns graph structure that is a *[residual
        graph](\.\./\.\./\.\./\.\./index\.md\#residual\_graph)* created from input flow
        network *G*\.

  - <a name='41'></a>__struct::graph::op::createAugmentingNetwork__ *G* *f* *path*

    Procedure creates an [augmenting network](#subsection6) for a given
    residual network *G* , flow *f* and augmenting path *path*\.

      * Arguments:

          + Graph Object *G* \(input\)

            Residual network \(directed graph\), where for every edge there are
            set two attributes: throughput and cost\.

          + Dictionary *f* \(input\)

            Dictionary which contains for every edge \(key\), current value of the
            flow on that edge\.

          + List *path* \(input\)

            Augmenting path, set of edges \(list\) for which we create the network
            modification\.

      * Result:

        Algorithm returns graph structure containing the modified augmenting
        network\.

  - <a name='42'></a>__struct::graph::op::createLevelGraph__ *Gf* *s*

    For given residual graph *Gf* procedure finds the [level
    graph](#subsection6)\.

      * Arguments:

          + Graph Object *Gf* \(input\)

            Residual network, where each edge has it's attribute *throughput*
            set with certain value\.

          + Node *s* \(input\)

            The source node for the residual network *Gf*\.

      * Result:

        Procedure returns a *[level
        graph](\.\./\.\./\.\./\.\./index\.md\#level\_graph)* created from input
        *residual network*\.

  - <a name='43'></a>__struct::graph::op::TSPLocalSearching__ *G* *C*

    Algorithm is a *heuristic of local searching* for *Travelling Salesman
    Problem*\. For some solution of *TSP problem*, it checks if it's possible
    to find a better solution\. As *TSP* is well known NP\-Complete problem, so
    algorithm is a approximation algorithm \(with 2 approximation factor\)\.

      * Arguments:

          + Graph Object *G* \(input\)

            Undirected and complete graph with attributes "weight" set on each
            single edge\.

          + List *C* \(input\)

            A list of edges being *Hamiltonian cycle*, which is solution of
            *TSP Problem* for graph *G*\.

      * Result:

        Algorithm returns the best solution for *TSP problem*, it was able to
        find\.

    *Note:* The solution depends on the choosing of the beginning cycle *C*\.
    It's not true that better cycle assures that better solution will be found,
    but practise shows that we should give starting cycle with as small sum of
    weights as possible\.

  - <a name='44'></a>__struct::graph::op::TSPLocalSearching3Approx__ *G* *C*

    Algorithm is a *heuristic of local searching* for *Travelling Salesman
    Problem*\. For some solution of *TSP problem*, it checks if it's possible
    to find a better solution\. As *TSP* is well known NP\-Complete problem, so
    algorithm is a approximation algorithm \(with 3 approximation factor\)\.

      * Arguments:

          + Graph Object *G* \(input\)

            Undirected and complete graph with attributes "weight" set on each
            single edge\.

          + List *C* \(input\)

            A list of edges being *Hamiltonian cycle*, which is solution of
            *TSP Problem* for graph *G*\.

      * Result:

        Algorithm returns the best solution for *TSP problem*, it was able to
        find\.

    *Note:* In practise 3\-approximation algorithm turns out to be far more
    effective than 2\-approximation, but it gives worser approximation factor\.
    Further heuristics of local searching \(e\.g\. 4\-approximation\) doesn't give
    enough boost to square the increase of approximation factor, so 2 and 3
    approximations are mainly used\.

  - <a name='45'></a>__struct::graph::op::createSquaredGraph__ *G*

    X\-Squared graph is a graph with the same set of nodes as input graph *G*,
    but a different set of edges\. X\-Squared graph has edge *\(u,v\)*, if and
    only if, the distance between *u* and *v* nodes is not greater than X
    and *u \!= v*\.

    Procedure for input graph *G*, returns its two\-squared graph\.

    *Note:* Distances used in choosing new set of edges are considering the
    number of edges, not the sum of weights at edges\.

  - <a name='46'></a>__struct::graph::op::createCompleteGraph__ *G* *originalEdges*

    For input graph *G* procedure adds missing arcs to make it a *[complete
    graph](\.\./\.\./\.\./\.\./index\.md\#complete\_graph)*\. It also holds in variable
    *originalEdges* the set of arcs that graph *G* possessed before that
    operation\.

# <a name='section3'></a>Background theory and terms

## <a name='subsection1'></a>Shortest Path Problem

  - Definition \(*single\-pair shortest path problem*\):

    Formally, given a weighted graph \(let *V* be the set of vertices, and
    *[E](\.\./\.\./\.\./\.\./index\.md\#e)* a set of edges\), and one vertice *v*
    of *V*, find a path *P* from *v* to a *v'* of V so that the sum of
    weights on edges along the path is minimal among all paths connecting v to
    v'\.

  - Generalizations:

      * *The single\-source shortest path problem*, in which we have to find
        shortest paths from a source vertex v to all other vertices in the
        graph\.

      * *The single\-destination shortest path problem*, in which we have to
        find shortest paths from all vertices in the graph to a single
        destination vertex v\. This can be reduced to the single\-source shortest
        path problem by reversing the edges in the graph\.

      * *The all\-pairs shortest path problem*, in which we have to find
        shortest paths between every pair of vertices v, v' in the graph\.

    *Note:* The result of *Shortest Path problem* can be *Shortest Path
    tree*, which is a subgraph of a given \(possibly weighted\) graph constructed
    so that the distance between a selected root node and all other nodes is
    minimal\. It is a tree because if there are two paths between the root node
    and some vertex v \(i\.e\. a cycle\), we can delete the last edge of the longer
    path without increasing the distance from the root node to any node in the
    subgraph\.

## <a name='subsection2'></a>Travelling Salesman Problem

  - Definition:

    For given edge\-weighted \(weights on edges should be positive\) graph the goal
    is to find the cycle that visits each node in graph exactly once
    \(*Hamiltonian cycle*\)\.

  - Generalizations:

      * *Metric TSP* \- A very natural restriction of the *TSP* is to require
        that the distances between cities form a *metric*, i\.e\., they satisfy
        *the triangle inequality*\. That is, for any 3 cities *A*, *B* and
        *[C](\.\./\.\./\.\./\.\./index\.md\#c)*, the distance between *A* and
        *[C](\.\./\.\./\.\./\.\./index\.md\#c)* must be at most the distance from
        *A* to *B* plus the distance from *B* to
        *[C](\.\./\.\./\.\./\.\./index\.md\#c)*\. Most natural instances of *TSP*
        satisfy this constraint\.

      * *Euclidean TSP* \- Euclidean TSP, or *planar TSP*, is the *TSP*
        with the distance being the ordinary *Euclidean distance*\. *Euclidean
        TSP* is a particular case of *TSP* with *triangle inequality*,
        since distances in plane obey triangle inequality\. However, it seems to
        be easier than general *TSP* with *triangle inequality*\. For
        example, *the minimum spanning tree* of the graph associated with an
        instance of *Euclidean TSP* is a *Euclidean minimum spanning tree*,
        and so can be computed in expected *O\(n log n\)* time for *n* points
        \(considerably less than the number of edges\)\. This enables the simple
        *2\-approximation algorithm* for TSP with triangle inequality above to
        operate more quickly\.

      * *Asymmetric TSP* \- In most cases, the distance between two nodes in
        the *TSP* network is the same in both directions\. The case where the
        distance from *A* to *B* is not equal to the distance from *B* to
        *A* is called *asymmetric TSP*\. A practical application of an
        *asymmetric TSP* is route optimisation using street\-level routing
        \(asymmetric due to one\-way streets, slip\-roads and motorways\)\.

## <a name='subsection3'></a>Matching Problem

  - Definition:

    Given a graph *G = \(V,E\)*, a matching or *edge\-independent set* *M* in
    *G* is a set of pairwise non\-adjacent edges, that is, no two edges share a
    common vertex\. A vertex is *matched* if it is incident to an edge in the
    *matching M*\. Otherwise the vertex is *unmatched*\.

  - Generalizations:

      * *Maximal matching* \- a matching *M* of a graph G with the property
        that if any edge not in *M* is added to *M*, it is no longer a
        *[matching](\.\./\.\./\.\./\.\./index\.md\#matching)*, that is, *M* is
        maximal if it is not a proper subset of any other
        *[matching](\.\./\.\./\.\./\.\./index\.md\#matching)* in graph G\. In other
        words, a *matching M* of a graph G is maximal if every edge in G has a
        non\-empty intersection with at least one edge in *M*\.

      * *Maximum matching* \- a matching that contains the largest possible
        number of edges\. There may be many *maximum matchings*\. The *matching
        number* of a graph G is the size of a *maximum matching*\. Note that
        every *maximum matching* is *maximal*, but not every *maximal
        matching* is a *maximum matching*\.

      * *Perfect matching* \- a matching which matches all vertices of the
        graph\. That is, every vertex of the graph is incident to exactly one
        edge of the matching\. Every *perfect matching* is
        *[maximum](\.\./\.\./\.\./\.\./index\.md\#maximum)* and hence *maximal*\.
        In some literature, the term *complete matching* is used\. A *perfect
        matching* is also a *minimum\-size edge cover*\. Moreover, the size of
        a *maximum matching* is no larger than the size of a *minimum edge
        cover*\.

      * *Near\-perfect matching* \- a matching in which exactly one vertex is
        unmatched\. This can only occur when the graph has an odd number of
        vertices, and such a *[matching](\.\./\.\./\.\./\.\./index\.md\#matching)*
        must be *[maximum](\.\./\.\./\.\./\.\./index\.md\#maximum)*\. If, for every
        vertex in a graph, there is a near\-perfect matching that omits only that
        vertex, the graph is also called *factor\-critical*\.

  - Related terms:

      * *Alternating path* \- given a matching *M*, an *alternating path*
        is a path in which the edges belong alternatively to the matching and
        not to the matching\.

      * *[Augmenting path](\.\./\.\./\.\./\.\./index\.md\#augmenting\_path)* \- given
        a matching *M*, an *[augmenting
        path](\.\./\.\./\.\./\.\./index\.md\#augmenting\_path)* is an *alternating
        path* that starts from and ends on free \(unmatched\) vertices\.

## <a name='subsection4'></a>Cut Problems

  - Definition:

    A *cut* is a partition of the vertices of a graph into two *disjoint
    subsets*\. The *cut\-set* of the *cut* is the set of edges whose end
    points are in different subsets of the partition\. Edges are said to be
    crossing the cut if they are in its *cut\-set*\.

    Formally:

      * a *cut* *C = \(S,T\)* is a partition of *V* of a graph *G = \(V,
        E\)*\.

      * an *s\-t cut* *C = \(S,T\)* of a *[flow
        network](\.\./\.\./\.\./\.\./index\.md\#flow\_network)* *N = \(V, E\)* is a cut
        of *N* such that *s* is included in *S* and *t* is included in
        *T*, where *s* and *t* are the
        *[source](\.\./\.\./\.\./\.\./index\.md\#source)* and the *sink* of *N*
        respectively\.

      * The *cut\-set* of a *cut C = \(S,T\)* is such set of edges from graph
        *G = \(V, E\)* that each edge *\(u, v\)* satisfies condition that *u*
        is included in *S* and *v* is included in *T*\.

    In an *unweighted undirected* graph, the size or weight of a cut is the
    number of edges crossing the cut\. In a *weighted graph*, the same term is
    defined by the sum of the weights of the edges crossing the cut\.

    In a *[flow network](\.\./\.\./\.\./\.\./index\.md\#flow\_network)*, an *s\-t
    cut* is a cut that requires the
    *[source](\.\./\.\./\.\./\.\./index\.md\#source)* and the *sink* to be in
    different subsets, and its *cut\-set* only consists of edges going from the
    *source's* side to the *sink's* side\. The capacity of an *s\-t cut* is
    defined by the sum of capacity of each edge in the *cut\-set*\.

    The *cut* of a graph can sometimes refer to its *cut\-set* instead of the
    partition\.

  - Generalizations:

      * *Minimum cut* \- A cut is minimum if the size of the cut is not larger
        than the size of any other cut\.

      * *Maximum cut* \- A cut is maximum if the size of the cut is not smaller
        than the size of any other cut\.

      * *Sparsest cut* \- The *Sparsest cut problem* is to bipartition the
        vertices so as to minimize the ratio of the number of edges across the
        cut divided by the number of vertices in the smaller half of the
        partition\.

## <a name='subsection5'></a>K\-Center Problem

  - Definitions:

      * *Unweighted K\-Center*

        For any set *S* \( which is subset of *V* \) and node *v*, let the
        *connect\(v,S\)* be the cost of cheapest edge connecting *v* with any
        node in *S*\. The goal is to find such *S*, that *&#124;S&#124; = k* and
        *max\_v\{connect\(v,S\)\}* is possibly small\.

        In other words, we can use it i\.e\. for finding best locations in the
        city \( nodes of input graph \) for placing k buildings, such that those
        buildings will be as close as possible to all other locations in town\.

      * *Weighted K\-Center*

        The variation of *unweighted k\-center problem*\. Besides the fact graph
        is edge\-weighted, there are also weights on vertices of input graph
        *G*\. We've got also restriction *W*\. The goal is to choose such set
        of nodes *S* \( which is a subset of *V* \), that it's total weight is
        not greater than *W* and also function: *max\_v \{ min\_u \{ cost\(u,v\)
        \}\}* has the smallest possible worth \( *v* is a node in *V* and
        *u* is a node in *S* \)\.

## <a name='subsection6'></a>Flow Problems

  - Definitions:

      * *the maximum flow problem* \- the goal is to find a feasible flow
        through a single\-source, single\-sink flow network that is maximum\. The
        *maximum flow problem* can be seen as a special case of more complex
        network flow problems, such as the *circulation problem*\. The maximum
        value of an *s\-t flow* is equal to the minimum capacity of an *s\-t
        cut* in the network, as stated in the *max\-flow min\-cut theorem*\.

        More formally for flow network *G = \(V,E\)*, where for each edge *\(u,
        v\)* we have its throuhgput *c\(u,v\)* defined\. As
        *[flow](\.\./\.\./\.\./\.\./index\.md\#flow)* *F* we define set of
        non\-negative integer attributes *f\(u,v\)* assigned to edges, satisfying
        such conditions:

          1. for each edge *\(u, v\)* in *G* such condition should be
             satisfied: 0 <= f\(u,v\) <= c\(u,v\)

          1. Network *G* has source node *s* such that the flow *F* is
             equal to the sum of outcoming flow decreased by the sum of incoming
             flow from that source node *s*\.

          1. Network *G* has sink node *t* such that the the *\-F* value is
             equal to the sum of the incoming flow decreased by the sum of
             outcoming flow from that sink node *t*\.

          1. For each node that is not a
             *[source](\.\./\.\./\.\./\.\./index\.md\#source)* or *sink* the sum
             of incoming flow and sum of outcoming flow should be equal\.

      * *the minimum cost flow problem* \- the goal is finding the cheapest
        possible way of sending a certain amount of flow through a *[flow
        network](\.\./\.\./\.\./\.\./index\.md\#flow\_network)*\.

      * *[blocking flow](\.\./\.\./\.\./\.\./index\.md\#blocking\_flow)* \- a
        *[blocking flow](\.\./\.\./\.\./\.\./index\.md\#blocking\_flow)* for a
        *residual network* *Gf* we name such flow *b* in *Gf* that:

          1. Each path from *sink* to
             *[source](\.\./\.\./\.\./\.\./index\.md\#source)* is the shortest path
             in *Gf*\.

          1. Each shortest path in *Gf* contains an edge with fully used
             throughput in *Gf\+b*\.

      * *residual network* \- for a flow network *G* and flow *f*
        *residual network* is built with those edges, which can send larger
        flow\. It contains only those edges, which can send flow larger than 0\.

      * *level network* \- it has the same set of nodes as *[residual
        graph](\.\./\.\./\.\./\.\./index\.md\#residual\_graph)*, but has only those
        edges *\(u,v\)* from *Gf* for which such equality is satisfied:
        *distance\(s,u\)\+1 = distance\(s,v\)*\.

      * *[augmenting network](\.\./\.\./\.\./\.\./index\.md\#augmenting\_network)* \-
        it is a modification of *residual network* considering the new flow
        values\. Structure stays unchanged but values of throughputs and costs at
        edges are different\.

## <a name='subsection7'></a>Approximation algorithm

  - k\-approximation algorithm:

    Algorithm is a k\-approximation, when for *ALG* \(solution returned by
    algorithm\) and *OPT* \(optimal solution\), such inequality is true:

      * for minimalization problems: *ALG/OPT <= k*

      * for maximalization problems: *OPT/ALG <= k*

# <a name='section4'></a>References

  1. [Adjacency matrix](http://en\.wikipedia\.org/wiki/Adjacency\_matrix)

  1. [Adjacency list](http://en\.wikipedia\.org/wiki/Adjacency\_list)

  1. [Kruskal's
     algorithm](http://en\.wikipedia\.org/wiki/Kruskal%27s\_algorithm)

  1. [Prim's algorithm](http://en\.wikipedia\.org/wiki/Prim%27s\_algorithm)

  1. [Bipartite graph](http://en\.wikipedia\.org/wiki/Bipartite\_graph)

  1. [Strongly connected
     components](http://en\.wikipedia\.org/wiki/Strongly\_connected\_components)

  1. [Tarjan's strongly connected components
     algorithm](http://en\.wikipedia\.org/wiki/Tarjan%27s\_strongly\_connected\_components\_algorithm)

  1. [Cut vertex](http://en\.wikipedia\.org/wiki/Cut\_vertex)

  1. [Bridge](http://en\.wikipedia\.org/wiki/Bridge\_\(graph\_theory\))

  1. [Bellman\-Ford's
     algorithm](http://en\.wikipedia\.org/wiki/Bellman\-Ford\_algorithm)

  1. [Johnson's algorithm](http://en\.wikipedia\.org/wiki/Johnson\_algorithm)

  1. [Floyd\-Warshall's
     algorithm](http://en\.wikipedia\.org/wiki/Floyd\-Warshall\_algorithm)

  1. [Travelling Salesman
     Problem](http://en\.wikipedia\.org/wiki/Travelling\_salesman\_problem)

  1. [Christofides
     Algorithm](http://en\.wikipedia\.org/wiki/Christofides\_algorithm)

  1. [Max Cut](http://en\.wikipedia\.org/wiki/Maxcut)

  1. [Matching](http://en\.wikipedia\.org/wiki/Matching)

  1. [Max Independent
     Set](http://en\.wikipedia\.org/wiki/Maximal\_independent\_set)

  1. [Vertex Cover](http://en\.wikipedia\.org/wiki/Vertex\_cover\_problem)

  1. [Ford\-Fulkerson's
     algorithm](http://en\.wikipedia\.org/wiki/Ford\-Fulkerson\_algorithm)

  1. [Maximum Flow
     problem](http://en\.wikipedia\.org/wiki/Maximum\_flow\_problem)

  1. [Busacker\-Gowen's
     algorithm](http://en\.wikipedia\.org/wiki/Minimum\_cost\_flow\_problem)

  1. [Dinic's algorithm](http://en\.wikipedia\.org/wiki/Dinic's\_algorithm)

  1. [K\-Center
     problem](http://www\.csc\.kth\.se/~viggo/wwwcompendium/node128\.html)

  1. [BFS](http://en\.wikipedia\.org/wiki/Breadth\-first\_search)

  1. [Minimum Degree Spanning
     Tree](http://en\.wikipedia\.org/wiki/Degree\-constrained\_spanning\_tree)

  1. [Approximation
     algorithm](http://en\.wikipedia\.org/wiki/Approximation\_algorithm)

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: graph* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[adjacency list](\.\./\.\./\.\./\.\./index\.md\#adjacency\_list), [adjacency
matrix](\.\./\.\./\.\./\.\./index\.md\#adjacency\_matrix),
[adjacent](\.\./\.\./\.\./\.\./index\.md\#adjacent), [approximation
algorithm](\.\./\.\./\.\./\.\./index\.md\#approximation\_algorithm),
[arc](\.\./\.\./\.\./\.\./index\.md\#arc), [articulation
point](\.\./\.\./\.\./\.\./index\.md\#articulation\_point), [augmenting
network](\.\./\.\./\.\./\.\./index\.md\#augmenting\_network), [augmenting
path](\.\./\.\./\.\./\.\./index\.md\#augmenting\_path),
[bfs](\.\./\.\./\.\./\.\./index\.md\#bfs),
[bipartite](\.\./\.\./\.\./\.\./index\.md\#bipartite), [blocking
flow](\.\./\.\./\.\./\.\./index\.md\#blocking\_flow),
[bridge](\.\./\.\./\.\./\.\./index\.md\#bridge), [complete
graph](\.\./\.\./\.\./\.\./index\.md\#complete\_graph), [connected
component](\.\./\.\./\.\./\.\./index\.md\#connected\_component), [cut
edge](\.\./\.\./\.\./\.\./index\.md\#cut\_edge), [cut
vertex](\.\./\.\./\.\./\.\./index\.md\#cut\_vertex),
[degree](\.\./\.\./\.\./\.\./index\.md\#degree), [degree constrained spanning
tree](\.\./\.\./\.\./\.\./index\.md\#degree\_constrained\_spanning\_tree),
[diameter](\.\./\.\./\.\./\.\./index\.md\#diameter),
[dijkstra](\.\./\.\./\.\./\.\./index\.md\#dijkstra),
[distance](\.\./\.\./\.\./\.\./index\.md\#distance),
[eccentricity](\.\./\.\./\.\./\.\./index\.md\#eccentricity),
[edge](\.\./\.\./\.\./\.\./index\.md\#edge), [flow
network](\.\./\.\./\.\./\.\./index\.md\#flow\_network),
[graph](\.\./\.\./\.\./\.\./index\.md\#graph),
[heuristic](\.\./\.\./\.\./\.\./index\.md\#heuristic), [independent
set](\.\./\.\./\.\./\.\./index\.md\#independent\_set),
[isthmus](\.\./\.\./\.\./\.\./index\.md\#isthmus), [level
graph](\.\./\.\./\.\./\.\./index\.md\#level\_graph), [local
searching](\.\./\.\./\.\./\.\./index\.md\#local\_searching),
[loop](\.\./\.\./\.\./\.\./index\.md\#loop),
[matching](\.\./\.\./\.\./\.\./index\.md\#matching), [max
cut](\.\./\.\./\.\./\.\./index\.md\#max\_cut), [maximum
flow](\.\./\.\./\.\./\.\./index\.md\#maximum\_flow), [minimal spanning
tree](\.\./\.\./\.\./\.\./index\.md\#minimal\_spanning\_tree), [minimum cost
flow](\.\./\.\./\.\./\.\./index\.md\#minimum\_cost\_flow), [minimum degree spanning
tree](\.\./\.\./\.\./\.\./index\.md\#minimum\_degree\_spanning\_tree), [minimum diameter
spanning tree](\.\./\.\./\.\./\.\./index\.md\#minimum\_diameter\_spanning\_tree),
[neighbour](\.\./\.\./\.\./\.\./index\.md\#neighbour),
[node](\.\./\.\./\.\./\.\./index\.md\#node),
[radius](\.\./\.\./\.\./\.\./index\.md\#radius), [residual
graph](\.\./\.\./\.\./\.\./index\.md\#residual\_graph), [shortest
path](\.\./\.\./\.\./\.\./index\.md\#shortest\_path), [squared
graph](\.\./\.\./\.\./\.\./index\.md\#squared\_graph), [strongly connected
component](\.\./\.\./\.\./\.\./index\.md\#strongly\_connected\_component),
[subgraph](\.\./\.\./\.\./\.\./index\.md\#subgraph), [travelling
salesman](\.\./\.\./\.\./\.\./index\.md\#travelling\_salesman),
[vertex](\.\./\.\./\.\./\.\./index\.md\#vertex), [vertex
cover](\.\./\.\./\.\./\.\./index\.md\#vertex\_cover)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008 Alejandro Paz <vidriloco@gmail\.com>  
Copyright &copy; 2008 \(docs\) Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>  
Copyright &copy; 2009 Michal Antoniewski <antoniewski\.m@gmail\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/matrix.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536

[//000000001]: # (struct::matrix \- Tcl Data Structures)
[//000000002]: # (Generated from file 'matrix\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002\-2013,2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (struct::matrix\(n\) 2\.0\.4 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::matrix \- Create and manipulate matrix objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require struct::matrix ?2\.0\.4?  

[__::struct::matrix__ ?*matrixName*? ?__=__&#124;__:=__&#124;__as__&#124;__deserialize__ *source*?](#1)  
[__matrixName__ *option* ?*arg arg \.\.\.*?](#2)  
[*matrixName* __=__ *sourcematrix*](#3)  
[*matrixName* __\-\->__ *destmatrix*](#4)  
[*matrixName* __add column__ ?*values*?](#5)  
[*matrixName* __add row__ ?*values*?](#6)  
[*matrixName* __add columns__ *n*](#7)  
[*matrixName* __add rows__ *n*](#8)  
[*matrixName* __cells__](#9)  
[*matrixName* __cellsize__ *column row*](#10)  
[*matrixName* __columns__](#11)  
[*matrixName* __columnwidth__ *column*](#12)  
[*matrixName* __delete column__ *column*](#13)  
[*matrixName* __delete columns__ *n*](#14)  
[*matrixName* __delete row__ *row*](#15)  
[*matrixName* __delete rows__ *n*](#16)  
[*matrixName* __deserialize__ *serialization*](#17)  
[*matrixName* __destroy__](#18)  
[*matrixName* __format 2string__ ?*report*?](#19)  
[*matrixName* __format 2chan__ ??*report*? *channel*?](#20)  
[*matrixName* __get cell__ *column row*](#21)  
[*matrixName* __get column__ *column*](#22)  
[*matrixName* __get rect__ *column\_tl row\_tl column\_br row\_br*](#23)  
[*matrixName* __get row__ *row*](#24)  
[*matrixName* __insert column__ *column* ?*values*?](#25)  
[*matrixName* __insert row__ *row* ?*values*?](#26)  
[*matrixName* __link__ ?\-transpose? *arrayvar*](#27)  
[*matrixName* __links__](#28)  
[*matrixName* __rowheight__ *row*](#29)  
[*matrixName* __rows__](#30)  
[*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __all__ *pattern*](#31)  
[*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __column__ *column pattern*](#32)  
[*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __row__ *row pattern*](#33)  
[*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __rect__ *column\_tl row\_tl column\_br row\_br pattern*](#34)  
[*matrixName* __serialize__ ?*column\_tl row\_tl column\_br row\_br*?](#35)  
[*matrixName* __set cell__ *column row value*](#36)  
[*matrixName* __set column__ *column values*](#37)  
[*matrixName* __set rect__ *column row values*](#38)  
[*matrixName* __set row__ *row values*](#39)  
[*matrixName* __sort columns__ ?__\-increasing__&#124;__\-decreasing__? *row*](#40)  
[*matrixName* __sort rows__ ?__\-increasing__&#124;__\-decreasing__? *column*](#41)  
[*matrixName* __swap columns__ *column\_a column\_b*](#42)  
[*matrixName* __swap rows__ *row\_a row\_b*](#43)  
[*matrixName* __transpose__](#44)  
[*matrixName* __unlink__ *arrayvar*](#45)  

# <a name='description'></a>DESCRIPTION

A matrix is a rectangular collection of cells, i\.e\. organized in rows and
columns\. Each cell contains exactly one value of arbitrary form\. The cells in
the matrix are addressed by pairs of integer numbers, with the first \(left\)
number in the pair specifying the column and the second \(right\) number
specifying the row the cell is in\. These indices are counted from 0 upward\. The
special non\-numeric index __end__ refers to the last row or column in the
matrix, depending on the context\. Indices of the form __end__\-__number__
are counted from the end of the row or column, like they are for standard Tcl
lists\. Trying to access non\-existing cells causes an error\.

The matrices here are created empty, i\.e\. they have neither rows nor columns\.
The user then has to add rows and columns as needed by his application\. A
specialty of this structure is the ability to export an array\-view onto its
contents\. Such can be used by tkTable, for example, to link the matrix into the
display\.

The main command of the package is:

  - <a name='1'></a>__::struct::matrix__ ?*matrixName*? ?__=__&#124;__:=__&#124;__as__&#124;__deserialize__ *source*?

    The command creates a new matrix object with an associated global Tcl
    command whose name is *matrixName*\. This command may be used to invoke
    various operations on the matrix\. It has the following general form:

      * <a name='2'></a>__matrixName__ *option* ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.

    If *matrixName* is not specified a unique name will be generated by the
    package itself\. If a *source* is specified the new matrix will be
    initialized to it\. For the operators __=__, __:=__, and __as__
    the argument *source* is interpreted as the name of another matrix object,
    and the assignment operator __=__ will be executed\. For
    __deserialize__ the *source* is a serialized matrix object and
    __deserialize__ will be executed\.

    In other words

        ::struct::matrix mymatrix = b

    is equivalent to

        ::struct::matrix mymatrix
        mymatrix = b

    and

        ::struct::matrix mymatrix deserialize $b

    is equivalent to

        ::struct::matrix mymatrix
        mymatrix deserialize $b

The following commands are possible for matrix objects:

  - <a name='3'></a>*matrixName* __=__ *sourcematrix*

    This is the assignment operator for matrix objects\. It copies the matrix
    contained in the matrix object *sourcematrix* over the matrix data in
    *matrixName*\. The old contents of *matrixName* are deleted by this
    operation\.

    This operation is in effect equivalent to

    > *matrixName* __deserialize__ \[*sourcematrix* __serialize__\]

  - <a name='4'></a>*matrixName* __\-\->__ *destmatrix*

    This is the reverse assignment operator for matrix objects\. It copies the
    matrix contained in the matrix object *matrixName* over the matrix data in
    the object *destmatrix*\. The old contents of *destmatrix* are deleted by
    this operation\.

    This operation is in effect equivalent to

    > *destmatrix* __deserialize__ \[*matrixName* __serialize__\]

  - <a name='5'></a>*matrixName* __add column__ ?*values*?

    Extends the matrix by one column and then acts like __set column__ \(see
    below\) on this new column if there were *values* supplied\. Without
    *values* the new cells will be set to the empty string\. The new column is
    appended immediately behind the last existing column\.

  - <a name='6'></a>*matrixName* __add row__ ?*values*?

    Extends the matrix by one row and then acts like __set row__ \(see below\)
    on this new row if there were *values* supplied\. Without *values* the
    new cells will be set to the empty string\. The new row is appended
    immediately behind the last existing row\.

  - <a name='7'></a>*matrixName* __add columns__ *n*

    Extends the matrix by *n* columns\. The new cells will be set to the empty
    string\. The new columns are appended immediately behind the last existing
    column\. A value of *n* equal to or smaller than 0 is not allowed\.

  - <a name='8'></a>*matrixName* __add rows__ *n*

    Extends the matrix by *n* rows\. The new cells will be set to the empty
    string\. The new rows are appended immediately behind the last existing row\.
    A value of *n* equal to or smaller than 0 is not allowed\.

  - <a name='9'></a>*matrixName* __cells__

    Returns the number of cells currently managed by the matrix\. This is the
    product of __rows__ and __columns__\.

  - <a name='10'></a>*matrixName* __cellsize__ *column row*

    Returns the length of the string representation of the value currently
    contained in the addressed cell\.

  - <a name='11'></a>*matrixName* __columns__

    Returns the number of columns currently managed by the matrix\.

  - <a name='12'></a>*matrixName* __columnwidth__ *column*

    Returns the length of the longest string representation of all the values
    currently contained in the cells of the addressed column if these are all
    spanning only one line\. For cell values spanning multiple lines the length
    of their longest line goes into the computation\.

    *Note:* The command recognizes ANSI color control sequences and excludes
    them from the width of a line, as they are logically of zero width\.

  - <a name='13'></a>*matrixName* __delete column__ *column*

    Deletes the specified column from the matrix and shifts all columns with
    higher indices one index down\.

  - <a name='14'></a>*matrixName* __delete columns__ *n*

    Deletes *n* columns from the right of the matrix\. The value of *n* has
    to satisfy the constraint "0 < *n* < \[__matrixName__ __columns__\]"

  - <a name='15'></a>*matrixName* __delete row__ *row*

    Deletes the specified row from the matrix and shifts all row with higher
    indices one index down\.

  - <a name='16'></a>*matrixName* __delete rows__ *n*

    Deletes *n* rows from the bottom of the matrix\. The value of *n* has to
    satisfy the constraint "0 < *n* < \[__matrixName__ __rows__\]"

  - <a name='17'></a>*matrixName* __deserialize__ *serialization*

    This is the complement to __serialize__\. It replaces matrix data in
    *matrixName* with the matrix described by the *serialization* value\. The
    old contents of *matrixName* are deleted by this operation\.

  - <a name='18'></a>*matrixName* __destroy__

    Destroys the matrix, including its storage space and associated command\.

  - <a name='19'></a>*matrixName* __format 2string__ ?*report*?

    Formats the matrix using the specified report object and returns the string
    containing the result of this operation\. The report has to support the
    __printmatrix__ method\. If no *report* is specified the system will
    use an internal report definition to format the matrix\.

  - <a name='20'></a>*matrixName* __format 2chan__ ??*report*? *channel*?

    Formats the matrix using the specified report object and writes the string
    containing the result of this operation into the channel\. The report has to
    support the __printmatrix2channel__ method\. If no *report* is
    specified the system will use an internal report definition to format the
    matrix\. If no *channel* is specified the system will use __stdout__\.

  - <a name='21'></a>*matrixName* __get cell__ *column row*

    Returns the value currently contained in the cell identified by row and
    column index\.

  - <a name='22'></a>*matrixName* __get column__ *column*

    Returns a list containing the values from all cells in the column identified
    by the index\. The contents of the cell in row 0 are stored as the first
    element of this list\.

  - <a name='23'></a>*matrixName* __get rect__ *column\_tl row\_tl column\_br row\_br*

    Returns a list of lists of cell values\. The values stored in the result come
    from the sub\-matrix whose top\-left and bottom\-right cells are specified by
    *column\_tl, row\_tl* and *column\_br, row\_br* resp\. Note that the
    following equations have to be true: "*column\_tl* <= *column\_br*" and
    "*row\_tl* <= *row\_br*"\. The result is organized as follows: The outer
    list is the list of rows, its elements are lists representing a single row\.
    The row with the smallest index is the first element of the outer list\. The
    elements of the row lists represent the selected cell values\. The cell with
    the smallest index is the first element in each row list\.

  - <a name='24'></a>*matrixName* __get row__ *row*

    Returns a list containing the values from all cells in the row identified by
    the index\. The contents of the cell in column 0 are stored as the first
    element of this list\.

  - <a name='25'></a>*matrixName* __insert column__ *column* ?*values*?

    Extends the matrix by one column and then acts like __set column__ \(see
    below\) on this new column if there were *values* supplied\. Without
    *values* the new cells will be set to the empty string\. The new column is
    inserted just before the column specified by the given index\. This means, if
    *column* is less than or equal to zero, then the new column is inserted at
    the beginning of the matrix, before the first column\. If *column* has the
    value __end__, or if it is greater than or equal to the number of
    columns in the matrix, then the new column is appended to the matrix, behind
    the last column\. The old column at the chosen index and all columns with
    higher indices are shifted one index upward\.

  - <a name='26'></a>*matrixName* __insert row__ *row* ?*values*?

    Extends the matrix by one row and then acts like __set row__ \(see below\)
    on this new row if there were *values* supplied\. Without *values* the
    new cells will be set to the empty string\. The new row is inserted just
    before the row specified by the given index\. This means, if *row* is less
    than or equal to zero, then the new row is inserted at the beginning of the
    matrix, before the first row\. If *row* has the value __end__, or if it
    is greater than or equal to the number of rows in the matrix, then the new
    row is appended to the matrix, behind the last row\. The old row at that
    index and all rows with higher indices are shifted one index upward\.

  - <a name='27'></a>*matrixName* __link__ ?\-transpose? *arrayvar*

    Links the matrix to the specified array variable\. This means that the
    contents of all cells in the matrix is stored in the array too, with all
    changes to the matrix propagated there too\. The contents of the cell
    *\(column,row\)* is stored in the array using the key *column,row*\. If the
    option __\-transpose__ is specified the key *row,column* will be used
    instead\. It is possible to link the matrix to more than one array\. Note that
    the link is bidirectional, i\.e\. changes to the array are mirrored in the
    matrix too\.

  - <a name='28'></a>*matrixName* __links__

    Returns a list containing the names of all array variables the matrix was
    linked to through a call to method __link__\.

  - <a name='29'></a>*matrixName* __rowheight__ *row*

    Returns the height of the specified row in lines\. This is the highest number
    of lines spanned by a cell over all cells in the row\.

  - <a name='30'></a>*matrixName* __rows__

    Returns the number of rows currently managed by the matrix\.

  - <a name='31'></a>*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __all__ *pattern*

    Searches the whole matrix for cells matching the *pattern* and returns a
    list with all matches\. Each item in the aforementioned list is a list itself
    and contains the column and row index of the matching cell, in this order\.
    The results are ordered by column first and row second, both times in
    ascending order\. This means that matches to the left and the top of the
    matrix come before matches to the right and down\.

    The type of the pattern \(string, glob, regular expression\) is determined by
    the option after the __search__ keyword\. If no option is given it
    defaults to __\-exact__\.

    If the option __\-nocase__ is specified the search will be
    case\-insensitive\.

  - <a name='32'></a>*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __column__ *column pattern*

    Like __search all__, but the search is restricted to the specified
    column\.

  - <a name='33'></a>*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __row__ *row pattern*

    Like __search all__, but the search is restricted to the specified row\.

  - <a name='34'></a>*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __rect__ *column\_tl row\_tl column\_br row\_br pattern*

    Like __search all__, but the search is restricted to the specified
    rectangular area of the matrix\.

  - <a name='35'></a>*matrixName* __serialize__ ?*column\_tl row\_tl column\_br row\_br*?

    This method serializes the sub\-matrix spanned up by the rectangle
    specification\. In other words it returns a tcl *value* completely
    describing that matrix\. If no rectangle is specified the whole matrix will
    be serialized\. This allows, for example, the transfer of matrix objects \(or
    parts thereof\) over arbitrary channels, persistence, etc\. This method is
    also the basis for both the copy constructor and the assignment operator\.

    The result of this method has to be semantically identical over all
    implementations of the matrix interface\. This is what will enable us to copy
    matrix data between different implementations of the same interface\.

    The result is a list containing exactly three items\.

    The first two elements of the list specify the number of rows and columns of
    the matrix, in that order\. The values integer numbers greater than or equal
    to zero\.

    The last element of the list contains the values of the matrix cells we have
    serialized, in the form of a value like it is returned by the __get
    rect__\. However empty cells to the right and bottom of the matrix can be
    left out of that value as the size information in the serialization allows
    the receiver the creation of a matrix with the proper size despite the
    missing values\.

        # A possible serialization for the matrix structure
        #
        # | a b d g |
        # | c e     |
        # | f       |
        #
        # is
        #
        # 3 4 {{a b d g} {c e} {f}}

  - <a name='36'></a>*matrixName* __set cell__ *column row value*

    Sets the value in the cell identified by row and column index to the data in
    the third argument\.

  - <a name='37'></a>*matrixName* __set column__ *column values*

    Sets the values in the cells identified by the column index to the elements
    of the list provided as the third argument\. Each element of the list is
    assigned to one cell, with the first element going into the cell in row 0
    and then upward\. If there are less values in the list than there are rows
    the remaining rows are set to the empty string\. If there are more values in
    the list than there are rows the superfluous elements are ignored\. The
    matrix is not extended by this operation\.

  - <a name='38'></a>*matrixName* __set rect__ *column row values*

    Takes a list of lists of cell values and writes them into the submatrix
    whose top\-left cell is specified by the two indices\. If the sublists of the
    outerlist are not of equal length the shorter sublists will be filled with
    empty strings to the length of the longest sublist\. If the submatrix
    specified by the top\-left cell and the number of rows and columns in the
    *values* extends beyond the matrix we are modifying the over\-extending
    parts of the values are ignored, i\.e\. essentially cut off\. This subcommand
    expects its input in the format as returned by __get rect__\.

  - <a name='39'></a>*matrixName* __set row__ *row values*

    Sets the values in the cells identified by the row index to the elements of
    the list provided as the third argument\. Each element of the list is
    assigned to one cell, with the first element going into the cell in column 0
    and then upward\. If there are less values in the list than there are columns
    the remaining columns are set to the empty string\. If there are more values
    in the list than there are columns the superfluous elements are ignored\. The
    matrix is not extended by this operation\.

  - <a name='40'></a>*matrixName* __sort columns__ ?__\-increasing__&#124;__\-decreasing__? *row*

    Sorts the columns in the matrix using the data in the specified *row* as
    the key to sort by\. The options __\-increasing__ and __\-decreasing__
    have the same meaning as for __lsort__\. If no option is specified
    __\-increasing__ is assumed\.

  - <a name='41'></a>*matrixName* __sort rows__ ?__\-increasing__&#124;__\-decreasing__? *column*

    Sorts the rows in the matrix using the data in the specified *column* as
    the key to sort by\. The options __\-increasing__ and __\-decreasing__
    have the same meaning as for __lsort__\. If no option is specified
    __\-increasing__ is assumed\.

  - <a name='42'></a>*matrixName* __swap columns__ *column\_a column\_b*

    Swaps the contents of the two specified columns\.

  - <a name='43'></a>*matrixName* __swap rows__ *row\_a row\_b*

    Swaps the contents of the two specified rows\.

  - <a name='44'></a>*matrixName* __transpose__

    Transposes the contents of the matrix, i\.e\. swaps rows for columns and vice
    versa\.

  - <a name='45'></a>*matrixName* __unlink__ *arrayvar*

    Removes the link between the matrix and the specified arrayvariable, if
    there is one\.

# <a name='section2'></a>EXAMPLES

The examples below assume a 5x5 matrix M with the first row containing the
values 1 to 5, with 1 in the top\-left cell\. Each other row contains the contents
of the row above it, rotated by one cell to the right\.

    % M get rect 0 0 4 4
    {{1 2 3 4 5} {5 1 2 3 4} {4 5 1 2 3} {3 4 5 1 2} {2 3 4 5 1}}

    % M set rect 1 1 {{0 0 0} {0 0 0} {0 0 0}}
    % M get rect 0 0 4 4
    {{1 2 3 4 5} {5 0 0 0 4} {4 0 0 0 3} {3 0 0 0 2} {2 3 4 5 1}}

Assuming that the style definitions in the example section of the manpage for
the package __[report](\.\./report/report\.md)__ are loaded into the
interpreter now an example which formats a matrix into a tabular report\. The
code filling the matrix with data is not shown\. contains useful data\.

    % ::struct::matrix m
    % # ... fill m with data, assume 5 columns
    % ::report::report r 5 style captionedtable 1
    % m format 2string r
    +---+-------------------+-------+-------+--------+
    |000|VERSIONS:          |2:8.4a3|1:8.4a3|1:8.4a3%|
    +---+-------------------+-------+-------+--------+
    |001|CATCH return ok    |7      |13     |53.85   |
    |002|CATCH return error |68     |91     |74.73   |
    |003|CATCH no catch used|7      |14     |50.00   |
    |004|IF if true numeric |12     |33     |36.36   |
    |005|IF elseif          |15     |47     |31.91   |
    |   |true numeric       |       |       |        |
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % r printmatrix m

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: matrix* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[matrix](\.\./\.\./\.\./\.\./index\.md\#matrix)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002\-2013,2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/matrix1.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417

[//000000001]: # (struct::matrix\_v1 \- Tcl Data Structures)
[//000000002]: # (Generated from file 'matrix1\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002,2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (struct::matrix\_v1\(n\) 1\.2\.2 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::matrix\_v1 \- Create and manipulate matrix objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require struct::matrix ?1\.2\.2?  

[__matrixName__ *option* ?*arg arg \.\.\.*?](#1)  
[*matrixName* __add column__ ?*values*?](#2)  
[*matrixName* __add row__ ?*values*?](#3)  
[*matrixName* __add columns__ *n*](#4)  
[*matrixName* __add rows__ *n*](#5)  
[*matrixName* __cells__](#6)  
[*matrixName* __cellsize__ *column row*](#7)  
[*matrixName* __columns__](#8)  
[*matrixName* __columnwidth__ *column*](#9)  
[*matrixName* __delete column__ *column*](#10)  
[*matrixName* __delete row__ *row*](#11)  
[*matrixName* __destroy__](#12)  
[*matrixName* __format 2string__ ?*report*?](#13)  
[*matrixName* __format 2chan__ ??*report*? *channel*?](#14)  
[*matrixName* __get cell__ *column row*](#15)  
[*matrixName* __get column__ *column*](#16)  
[*matrixName* __get rect__ *column\_tl row\_tl column\_br row\_br*](#17)  
[*matrixName* __get row__ *row*](#18)  
[*matrixName* __insert column__ *column* ?*values*?](#19)  
[*matrixName* __insert row__ *row* ?*values*?](#20)  
[*matrixName* __link__ ?\-transpose? *arrayvar*](#21)  
[*matrixName* __links__](#22)  
[*matrixName* __rowheight__ *row*](#23)  
[*matrixName* __rows__](#24)  
[*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __all__ *pattern*](#25)  
[*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __column__ *column pattern*](#26)  
[*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __row__ *row pattern*](#27)  
[*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __rect__ *column\_tl row\_tl column\_br row\_br pattern*](#28)  
[*matrixName* __set cell__ *column row value*](#29)  
[*matrixName* __set column__ *column values*](#30)  
[*matrixName* __set rect__ *column row values*](#31)  
[*matrixName* __set row__ *row values*](#32)  
[*matrixName* __sort columns__ ?__\-increasing__&#124;__\-decreasing__? *row*](#33)  
[*matrixName* __sort rows__ ?__\-increasing__&#124;__\-decreasing__? *column*](#34)  
[*matrixName* __swap columns__ *column\_a column\_b*](#35)  
[*matrixName* __swap rows__ *row\_a row\_b*](#36)  
[*matrixName* __unlink__ *arrayvar*](#37)  

# <a name='description'></a>DESCRIPTION

The __::struct::matrix__ command creates a new matrix object with an
associated global Tcl command whose name is *matrixName*\. This command may be
used to invoke various operations on the matrix\. It has the following general
form:

  - <a name='1'></a>__matrixName__ *option* ?*arg arg \.\.\.*?

    *Option* and the *arg*s determine the exact behavior of the command\.

A matrix is a rectangular collection of cells, i\.e\. organized in rows and
columns\. Each cell contains exactly one value of arbitrary form\. The cells in
the matrix are addressed by pairs of integer numbers, with the first \(left\)
number in the pair specifying the column and the second \(right\) number
specifying the row the cell is in\. These indices are counted from 0 upward\. The
special non\-numeric index __end__ refers to the last row or column in the
matrix, depending on the context\. Indices of the form __end__\-__number__
are counted from the end of the row or column, like they are for standard Tcl
lists\. Trying to access non\-existing cells causes an error\.

The matrices here are created empty, i\.e\. they have neither rows nor columns\.
The user then has to add rows and columns as needed by his application\. A
specialty of this structure is the ability to export an array\-view onto its
contents\. Such can be used by tkTable, for example, to link the matrix into the
display\.

The following commands are possible for matrix objects:

  - <a name='2'></a>*matrixName* __add column__ ?*values*?

    Extends the matrix by one column and then acts like __setcolumn__ \(see
    below\) on this new column if there were *values* supplied\. Without
    *values* the new cells will be set to the empty string\. The new column is
    appended immediately behind the last existing column\.

  - <a name='3'></a>*matrixName* __add row__ ?*values*?

    Extends the matrix by one row and then acts like __setrow__ \(see below\)
    on this new row if there were *values* supplied\. Without *values* the
    new cells will be set to the empty string\. The new row is appended
    immediately behind the last existing row\.

  - <a name='4'></a>*matrixName* __add columns__ *n*

    Extends the matrix by *n* columns\. The new cells will be set to the empty
    string\. The new columns are appended immediately behind the last existing
    column\. A value of *n* equal to or smaller than 0 is not allowed\.

  - <a name='5'></a>*matrixName* __add rows__ *n*

    Extends the matrix by *n* rows\. The new cells will be set to the empty
    string\. The new rows are appended immediately behind the last existing row\.
    A value of *n* equal to or smaller than 0 is not allowed\.

  - <a name='6'></a>*matrixName* __cells__

    Returns the number of cells currently managed by the matrix\. This is the
    product of __rows__ and __columns__\.

  - <a name='7'></a>*matrixName* __cellsize__ *column row*

    Returns the length of the string representation of the value currently
    contained in the addressed cell\.

  - <a name='8'></a>*matrixName* __columns__

    Returns the number of columns currently managed by the matrix\.

  - <a name='9'></a>*matrixName* __columnwidth__ *column*

    Returns the length of the longest string representation of all the values
    currently contained in the cells of the addressed column if these are all
    spanning only one line\. For cell values spanning multiple lines the length
    of their longest line goes into the computation\.

  - <a name='10'></a>*matrixName* __delete column__ *column*

    Deletes the specified column from the matrix and shifts all columns with
    higher indices one index down\.

  - <a name='11'></a>*matrixName* __delete row__ *row*

    Deletes the specified row from the matrix and shifts all row with higher
    indices one index down\.

  - <a name='12'></a>*matrixName* __destroy__

    Destroys the matrix, including its storage space and associated command\.

  - <a name='13'></a>*matrixName* __format 2string__ ?*report*?

    Formats the matrix using the specified report object and returns the string
    containing the result of this operation\. The report has to support the
    __printmatrix__ method\. If no *report* is specified the system will
    use an internal report definition to format the matrix\.

  - <a name='14'></a>*matrixName* __format 2chan__ ??*report*? *channel*?

    Formats the matrix using the specified report object and writes the string
    containing the result of this operation into the channel\. The report has to
    support the __printmatrix2channel__ method\. If no *report* is
    specified the system will use an internal report definition to format the
    matrix\. If no *channel* is specified the system will use __stdout__\.

  - <a name='15'></a>*matrixName* __get cell__ *column row*

    Returns the value currently contained in the cell identified by row and
    column index\.

  - <a name='16'></a>*matrixName* __get column__ *column*

    Returns a list containing the values from all cells in the column identified
    by the index\. The contents of the cell in row 0 are stored as the first
    element of this list\.

  - <a name='17'></a>*matrixName* __get rect__ *column\_tl row\_tl column\_br row\_br*

    Returns a list of lists of cell values\. The values stored in the result come
    from the sub\-matrix whose top\-left and bottom\-right cells are specified by
    *column\_tl, row\_tl* and *column\_br, row\_br* resp\. Note that the
    following equations have to be true: "*column\_tl* <= *column\_br*" and
    "*row\_tl* <= *row\_br*"\. The result is organized as follows: The outer
    list is the list of rows, its elements are lists representing a single row\.
    The row with the smallest index is the first element of the outer list\. The
    elements of the row lists represent the selected cell values\. The cell with
    the smallest index is the first element in each row list\.

  - <a name='18'></a>*matrixName* __get row__ *row*

    Returns a list containing the values from all cells in the row identified by
    the index\. The contents of the cell in column 0 are stored as the first
    element of this list\.

  - <a name='19'></a>*matrixName* __insert column__ *column* ?*values*?

    Extends the matrix by one column and then acts like __setcolumn__ \(see
    below\) on this new column if there were *values* supplied\. Without
    *values* the new cells will be set to the empty string\. The new column is
    inserted just before the column specified by the given index\. This means, if
    *column* is less than or equal to zero, then the new column is inserted at
    the beginning of the matrix, before the first column\. If *column* has the
    value __end__, or if it is greater than or equal to the number of
    columns in the matrix, then the new column is appended to the matrix, behind
    the last column\. The old column at the chosen index and all columns with
    higher indices are shifted one index upward\.

  - <a name='20'></a>*matrixName* __insert row__ *row* ?*values*?

    Extends the matrix by one row and then acts like __setrow__ \(see below\)
    on this new row if there were *values* supplied\. Without *values* the
    new cells will be set to the empty string\. The new row is inserted just
    before the row specified by the given index\. This means, if *row* is less
    than or equal to zero, then the new row is inserted at the beginning of the
    matrix, before the first row\. If *row* has the value __end__, or if it
    is greater than or equal to the number of rows in the matrix, then the new
    row is appended to the matrix, behind the last row\. The old row at that
    index and all rows with higher indices are shifted one index upward\.

  - <a name='21'></a>*matrixName* __link__ ?\-transpose? *arrayvar*

    Links the matrix to the specified array variable\. This means that the
    contents of all cells in the matrix is stored in the array too, with all
    changes to the matrix propagated there too\. The contents of the cell
    *\(column,row\)* is stored in the array using the key *column,row*\. If the
    option __\-transpose__ is specified the key *row,column* will be used
    instead\. It is possible to link the matrix to more than one array\. Note that
    the link is bidirectional, i\.e\. changes to the array are mirrored in the
    matrix too\.

  - <a name='22'></a>*matrixName* __links__

    Returns a list containing the names of all array variables the matrix was
    linked to through a call to method __link__\.

  - <a name='23'></a>*matrixName* __rowheight__ *row*

    Returns the height of the specified row in lines\. This is the highest number
    of lines spanned by a cell over all cells in the row\.

  - <a name='24'></a>*matrixName* __rows__

    Returns the number of rows currently managed by the matrix\.

  - <a name='25'></a>*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __all__ *pattern*

    Searches the whole matrix for cells matching the *pattern* and returns a
    list with all matches\. Each item in the aforementioned list is a list itself
    and contains the column and row index of the matching cell, in this order\.
    The results are ordered by column first and row second, both times in
    ascending order\. This means that matches to the left and the top of the
    matrix come before matches to the right and down\.

    The type of the pattern \(string, glob, regular expression\) is determined by
    the option after the __search__ keyword\. If no option is given it
    defaults to __\-exact__\.

    If the option __\-nocase__ is specified the search will be
    case\-insensitive\.

  - <a name='26'></a>*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __column__ *column pattern*

    Like __search all__, but the search is restricted to the specified
    column\.

  - <a name='27'></a>*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __row__ *row pattern*

    Like __search all__, but the search is restricted to the specified row\.

  - <a name='28'></a>*matrixName* __search__ ?\-nocase? ?\-exact&#124;\-glob&#124;\-regexp? __rect__ *column\_tl row\_tl column\_br row\_br pattern*

    Like __search all__, but the search is restricted to the specified
    rectangular area of the matrix\.

  - <a name='29'></a>*matrixName* __set cell__ *column row value*

    Sets the value in the cell identified by row and column index to the data in
    the third argument\.

  - <a name='30'></a>*matrixName* __set column__ *column values*

    Sets the values in the cells identified by the column index to the elements
    of the list provided as the third argument\. Each element of the list is
    assigned to one cell, with the first element going into the cell in row 0
    and then upward\. If there are less values in the list than there are rows
    the remaining rows are set to the empty string\. If there are more values in
    the list than there are rows the superfluous elements are ignored\. The
    matrix is not extended by this operation\.

  - <a name='31'></a>*matrixName* __set rect__ *column row values*

    Takes a list of lists of cell values and writes them into the submatrix
    whose top\-left cell is specified by the two indices\. If the sublists of the
    outerlist are not of equal length the shorter sublists will be filled with
    empty strings to the length of the longest sublist\. If the submatrix
    specified by the top\-left cell and the number of rows and columns in the
    *values* extends beyond the matrix we are modifying the over\-extending
    parts of the values are ignored, i\.e\. essentially cut off\. This subcommand
    expects its input in the format as returned by __getrect__\.

  - <a name='32'></a>*matrixName* __set row__ *row values*

    Sets the values in the cells identified by the row index to the elements of
    the list provided as the third argument\. Each element of the list is
    assigned to one cell, with the first element going into the cell in column 0
    and then upward\. If there are less values in the list than there are columns
    the remaining columns are set to the empty string\. If there are more values
    in the list than there are columns the superfluous elements are ignored\. The
    matrix is not extended by this operation\.

  - <a name='33'></a>*matrixName* __sort columns__ ?__\-increasing__&#124;__\-decreasing__? *row*

    Sorts the columns in the matrix using the data in the specified *row* as
    the key to sort by\. The options __\-increasing__ and __\-decreasing__
    have the same meaning as for __lsort__\. If no option is specified
    __\-increasing__ is assumed\.

  - <a name='34'></a>*matrixName* __sort rows__ ?__\-increasing__&#124;__\-decreasing__? *column*

    Sorts the rows in the matrix using the data in the specified *column* as
    the key to sort by\. The options __\-increasing__ and __\-decreasing__
    have the same meaning as for __lsort__\. If no option is specified
    __\-increasing__ is assumed\.

  - <a name='35'></a>*matrixName* __swap columns__ *column\_a column\_b*

    Swaps the contents of the two specified columns\.

  - <a name='36'></a>*matrixName* __swap rows__ *row\_a row\_b*

    Swaps the contents of the two specified rows\.

  - <a name='37'></a>*matrixName* __unlink__ *arrayvar*

    Removes the link between the matrix and the specified arrayvariable, if
    there is one\.

# <a name='section2'></a>EXAMPLES

The examples below assume a 5x5 matrix M with the first row containing the
values 1 to 5, with 1 in the top\-left cell\. Each other row contains the contents
of the row above it, rotated by one cell to the right\.

    % M getrect 0 0 4 4
    {{1 2 3 4 5} {5 1 2 3 4} {4 5 1 2 3} {3 4 5 1 2} {2 3 4 5 1}}

    % M setrect 1 1 {{0 0 0} {0 0 0} {0 0 0}}
    % M getrect 0 0 4 4
    {{1 2 3 4 5} {5 0 0 0 4} {4 0 0 0 3} {3 0 0 0 2} {2 3 4 5 1}}

Assuming that the style definitions in the example section of the manpage for
the package __[report](\.\./report/report\.md)__ are loaded into the
interpreter now an example which formats a matrix into a tabular report\. The
code filling the matrix with data is not shown\. contains useful data\.

    % ::struct::matrix m
    % # ... fill m with data, assume 5 columns
    % ::report::report r 5 style captionedtable 1
    % m format 2string r
    +---+-------------------+-------+-------+--------+
    |000|VERSIONS:          |2:8.4a3|1:8.4a3|1:8.4a3%|
    +---+-------------------+-------+-------+--------+
    |001|CATCH return ok    |7      |13     |53.85   |
    |002|CATCH return error |68     |91     |74.73   |
    |003|CATCH no catch used|7      |14     |50.00   |
    |004|IF if true numeric |12     |33     |36.36   |
    |005|IF elseif          |15     |47     |31.91   |
    |   |true numeric       |       |       |        |
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % r printmatrix m

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: matrix* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[matrix](\.\./\.\./\.\./\.\./index\.md\#matrix)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002,2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/pool.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419

[//000000001]: # (struct::pool \- Tcl Data Structures)
[//000000002]: # (Generated from file 'pool\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002, Erik Leunissen <e\.leunissen@hccnet\.nl>)
[//000000004]: # (struct::pool\(n\) 1\.2\.3 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::pool \- Create and manipulate pool objects \(of discrete items\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [POOLS AND ALLOCATION](#section2)

  - [ITEMS](#section3)

  - [POOL OBJECT COMMAND](#section4)

  - [EXAMPLES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require struct::pool ?1\.2\.3?  

[__::struct::pool__ ?*poolName*? ?*maxsize*?](#1)  
[__poolName__ *option* ?*arg arg \.\.\.*?](#2)  
[*poolName* __add__ *itemName1* ?*itemName2 itemName3 \.\.\.*?](#3)  
[*poolName* __clear__ ?__\-force__?](#4)  
[*poolName* __destroy__ ?__\-force__?](#5)  
[*poolName* __info__ *type* ?*arg*?](#6)  
[*poolName* __maxsize__ ?*maxsize*?](#7)  
[*poolName* __release__ *itemName*](#8)  
[*poolName* __remove__ *itemName* ?__\-force__?](#9)  
[*poolName* __request__ itemVar ?options?](#10)  

# <a name='description'></a>DESCRIPTION

This package provides pool objects which can be used to manage finite
collections of discrete items\.

  - <a name='1'></a>__::struct::pool__ ?*poolName*? ?*maxsize*?

    Creates a new pool object\. If no *poolName* is supplied, then the new pool
    will be named pool__X__, where X is a positive integer\. The optional
    second argument *maxsize* has to be a positive integer indicating the
    maximum size of the pool; this is the maximum number of items the pool may
    hold\. The default for this value is __10__\.

    The pool object has an associated global Tcl command whose name is
    *poolName*\. This command may be used to invoke various configuration
    operations on the report\. It has the following general form:

      * <a name='2'></a>__poolName__ *option* ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.
        See section [POOL OBJECT COMMAND](#section4) for a detailed list of
        options and their behaviour\.

# <a name='section2'></a>POOLS AND ALLOCATION

The purpose of the pool command and the pool object command that it generates,
is to manage pools of discrete items\. Examples of a pool of discrete items are:

  - the seats in a cinema, theatre, train etc\.\. for which visitors/travelers can
    make a reservation;

  - the dynamic IP\-addresses that an ISP can dole out to subscribers;

  - a car rental's collection of cars, which can be rented by customers;

  - the class rooms in a school building, which need to be scheduled;

  - the database connections available to client\-threads in a web\-server
    application;

  - the books in a library that customers can borrow;

  - etc \.\.\.

The common denominator in the examples is that there is a more or less fixed
number of items \(seats, IP\-addresses, cars, \.\.\.\) that are supposed to be
allocated on a more or less regular basis\. An item can be allocated only once at
a time\. An item that is allocated, must be released before it can be
re\-allocated\. While several items in a pool are being allocated and released
continuously, the total number of items in the pool remains constant\.

Keeping track of which items are allocated, and by whom, is the purpose of the
pool command and its subordinates\.

*Pool parlance*: If we say that an item is *allocated*, it means that the
item is *busy*, *owned* or *occupied*; it is not available anymore\. If an
item is *free*, it is *available*\. Deallocating an item is equivalent to
setting free or releasing an item\. The person or entity to which the item has
been allotted is said to own the item\.

# <a name='section3'></a>ITEMS

*Discrete items*

The __[pool](\.\./\.\./\.\./\.\./index\.md\#pool)__ command is designed for
*discrete items only*\. Note that there are pools where allocation occurs on a
non\-discrete basis, for example computer memory\. There are also pools from which
the shares that are doled out are not expected to be returned, for example a
charity fund or a pan of soup from which you may receive a portion\. Finally,
there are even pools from which nothing is ever allocated or returned, like a
swimming pool or a cesspool\.

*Unique item names*

A pool cannot manage duplicate item names\. Therefore, items in a pool must have
unique names\.

*Item equivalence*

From the point of view of the manager of a pool, items are equivalent\. The
manager of a pool is indifferent about which entity/person occupies a given
item\. However, clients may have preferences for a particular item, based on some
item property they know\.

*Preferences*

A future owner may have a preference for a particular item\. Preference based
allocation is supported \(see the __\-prefer__ option to the request
subcommand\)\. A preference for a particular item is most likely to result from
variability among features associated with the items\. Note that the pool
commands themselves are not designed to manage such item properties\. If item
properties play a role in an application, they should be managed separately\.

# <a name='section4'></a>POOL OBJECT COMMAND

The following subcommands and corresponding arguments are available to any pool
object command\.

  - <a name='3'></a>*poolName* __add__ *itemName1* ?*itemName2 itemName3 \.\.\.*?

    This command adds the items on the command line to the pool\. If duplicate
    item names occur on the command line, an error is raised\. If one or more of
    the items already exist in the pool, this also is considered an error\.

  - <a name='4'></a>*poolName* __clear__ ?__\-force__?

    Removes all items from the pool\. If there are any allocated items at the
    time when the command is invoked, an error is raised\. This behaviour may be
    modified through the __\-force__ argument\. If it is supplied on the
    command line, the pool will be cleared regardless the allocation state of
    its items\.

  - <a name='5'></a>*poolName* __destroy__ ?__\-force__?

    Destroys the pool data structure, all associated variables and the
    associated pool object command\. By default, the command checks whether any
    items are still allocated and raises an error if such is the case\. This
    behaviour may be modified through the argument __\-force__\. If it is
    supplied on the command line, the pool data structure will be destroyed
    regardless allocation state of its items\.

  - <a name='6'></a>*poolName* __info__ *type* ?*arg*?

    Returns various information about the pool for further programmatic use\. The
    *type* argument indicates the type of information requested\. Only the type
    __allocID__ uses an additional argument\.

      * __allocID__ *itemName*

        returns the allocID of the item whose name is *itemName*\. Free items
        have an allocation id of __\-1__\.

      * __allitems__

        returns a list of all items in the pool\.

      * __allocstate__

        Returns a list of key\-value pairs, where the keys are the items and the
        values are the corresponding allocation id's\. Free items have an
        allocation id of __\-1__\.

      * __cursize__

        returns the current pool size, i\.e\. the number of items in the pool\.

      * __freeitems__

        returns a list of items that currently are not allocated\.

      * __maxsize__

        returns the maximum size of the pool\.

  - <a name='7'></a>*poolName* __maxsize__ ?*maxsize*?

    Sets or queries the maximum size of the pool, depending on whether the
    *maxsize* argument is supplied or not\. If *maxsize* is supplied, the
    maximum size of the pool will be set to that value\. If no argument is
    supplied, the current maximum size of the pool is returned\. In this variant,
    the command is an alias for:

    __poolName info maxsize__\.

    The *maxsize* argument has to be a positive integer\.

  - <a name='8'></a>*poolName* __release__ *itemName*

    Releases the item whose name is *itemName* that was allocated previously\.
    An error is raised if the item was not allocated at the time when the
    command was issued\.

  - <a name='9'></a>*poolName* __remove__ *itemName* ?__\-force__?

    Removes the item whose name is *itemName* from the pool\. If the item was
    allocated at the time when the command was invoked, an error is raised\. This
    behaviour may be modified through the optional argument __\-force__\. If
    it is supplied on the command line, the item will be removed regardless its
    allocation state\.

  - <a name='10'></a>*poolName* __request__ itemVar ?options?

    Handles a request for an item, taking into account a possible preference for
    a particular item\. There are two possible outcomes depending on the
    availability of items:

      1. The request is honoured, an item is allocated and the variable whose
         name is passed with the argument *itemVar* will be set to the name of
         the item that was allocated\. The command returns 1\.

      1. The request is denied\. No item is allocated\. The variable whose name is
         itemVar is not set\. Attempts to read *itemVar* may raise an error if
         the variable was not defined before issuing the request\. The command
         returns 0\.

    The return values from this command are meant to be inspected\. The examples
    below show how to do this\. Failure to check the return value may result in
    erroneous behaviour\. If no preference for a particular item is supplied
    through the option __\-prefer__ \(see below\), then all requests are
    honoured as long as items are available\.

    The following options are supported:

      * __\-allocID__ *allocID*

        If the request is honoured, an item will be allocated to the entity
        identified by allocID\. If the allocation state of an item is queried, it
        is this allocation ID that will be returned\. If the option
        __\-allocID__ is not supplied, the item will be given to and owned by
        __dummyID__\. Allocation id's may be anything except the value \-1,
        which is reserved for free items\.

      * __\-prefer__ *preferredItem*

        This option modifies the allocation strategy as follows: If the item
        whose name is *preferredItem* is not allocated at the time when the
        command is invoked, the request is honoured \(return value is 1\)\. If the
        item was allocated at the time when the command was invoked, the request
        is denied \(return value is 0\)\.

# <a name='section5'></a>EXAMPLES

Two examples are provided\. The first one mimics a step by step interactive tclsh
session, where each step is explained\. The second example shows the usage in a
server application that talks to a back\-end application\.

*Example 1*

This example presents an interactive tclsh session which considers the case of a
Car rental's collection of cars\. Ten steps explain its usage in chronological
order, from the creation of the pool, via the most important stages in the usage
of a pool, to the final destruction\.

*Note aside:*

In this example, brand names are used to label the various items\. However, a
brand name could be regarded as a property of an item\. Because the pool command
is not designed to manage properties of items, they need to be managed
separately\. In the latter case the items should be labeled with more neutral
names such as: car1, car2, car3 , etc \.\.\. and a separate database or array
should hold the brand names associated with the car labels\.

    1. Load the package into an interpreter
    % package require pool
    0.1

    2. Create a pool object called `CarPool' with a maximum size of 55 items (cars):
    % pool CarPool 55
    CarPool

    4. Add items to the pool:
    % CarPool add Toyota Trabant Chrysler1 Chrysler2 Volkswagen

    5. Somebody crashed the Toyota. Remove it from the pool as follows:
    % CarPool remove Toyota

    6. Acquired a new car for the pool. Add it as follows:
    % CarPool add Nissan

    7. Check whether the pool was adjusted correctly:
    % CarPool info allitems
    Trabant Chrysler1 Chrysler2 Volkswagen Nissan

Suspend the interactive session temporarily, and show the programmatic use of
the request subcommand:

    # Mrs. Swift needs a car. She doesn't have a preference for a
    # particular car. We'll issue a request on her behalf as follows:
    if { [CarPool request car -allocID "Mrs. Swift"] }  {
        # request was honoured, process the variable `car'
        puts "$car has been allocated to [CarPool info allocID $car]."
    } else {
        # request was denied
         puts "No car available."
    }

Note how the __if__ command uses the value returned by the __request__
subcommand\.

    # Suppose Mr. Wiggly has a preference for the Trabant:
    if { [CarPool request car -allocID "Mr. Wiggly" -prefer Trabant] }  {
        # request was honoured, process the variable `car'
        puts "$car has been allocated to [CarPool info allocID $car]."
    } else {
        # request was denied
         puts "The Trabant was not available."
    }

Resume the interactive session:

    8. When the car is returned then you can render it available by:
    % CarPool release Trabant

    9. When done, you delete the pool.
    % CarPool destroy
    Couldn't destroy `CarPool' because some items are still allocated.

    Oops, forgot that Mrs. Swift still occupies a car.

    10. We force the destruction of the pool as follows:
    % CarPool destroy -force

*Example 2*

This example describes the case from which the author's need for pool management
originated\. It is an example of a server application that receives requests from
client applications\. The client requests are dispatched onto a back\-end
application before being returned to the client application\. In many cases there
are a few equivalent instances of back\-end applications to which a client
request may be passed along\. The file descriptors that identify the channels to
these back\-end instances make up a pool of connections\. A particular connection
may be allocated to just one client request at a time\.

    # Create the pool of connections (pipes)
    set maxpipes 10
    pool Pipes $maxpipes
    for {set i 0} {$i < $maxpipes} {incr i} {
        set fd [open "|backendApplication" w+]
        Pipes add $fd
    }

    # A client request comes in. The request is identified as `clientX'.
    # Dispatch it onto an instance of a back-end application
    if { [Pipes request fd -allocID clientX] } {
        # a connection was allocated
        # communicate to the back-end application via the variable `fd'
        puts $fd "someInstruction"
        # ...... etc.
    } else {
        # all connections are currently occupied
        # store the client request in a queue for later processing,
        # or return a 'Server busy' message to the client.
    }

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: pool* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[discrete items](\.\./\.\./\.\./\.\./index\.md\#discrete\_items),
[finite](\.\./\.\./\.\./\.\./index\.md\#finite),
[pool](\.\./\.\./\.\./\.\./index\.md\#pool), [struct](\.\./\.\./\.\./\.\./index\.md\#struct)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002, Erik Leunissen <e\.leunissen@hccnet\.nl>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/prioqueue.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155

[//000000001]: # (struct::prioqueue \- Tcl Data Structures)
[//000000002]: # (Generated from file 'prioqueue\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003 Michael Schlenker <mic42@users\.sourceforge\.net>)
[//000000004]: # (struct::prioqueue\(n\) 1\.4 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::prioqueue \- Create and manipulate prioqueue objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require struct::prioqueue ?1\.4?  

[__::struct::prioqueue__ ?__\-ascii&#124;\-dictionary&#124;\-integer&#124;\-real__? ?*prioqueueName*?](#1)  
[*prioqueueName* __option__ ?*arg arg \.\.\.*?](#2)  
[*prioqueueName* __clear__](#3)  
[*prioqueueName* __[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__ *item*](#4)  
[*prioqueueName* __destroy__](#5)  
[*prioqueueName* __get__ ?*count*?](#6)  
[*prioqueueName* __peek__ ?*count*?](#7)  
[*prioqueueName* __peekpriority__ ?*count*?](#8)  
[*prioqueueName* __put__ *item prio* ?*item prio \.\.\.*?](#9)  
[*prioqueueName* __size__](#10)  

# <a name='description'></a>DESCRIPTION

This package implements a simple priority queue using nested tcl lists\.

The command __::struct::prioqueue__ creates a new priority queue with
default priority key type *\-integer*\. This means that keys given to the
__put__ subcommand must have this type\.

This also sets the priority ordering\. For key types *\-ascii* and
*\-dictionary* the data is sorted in ascending order \(as with __lsort__
*\-increasing*\), thereas for *\-integer* and *\-real* the data is sorted in
descending order \(as with __lsort__ *\-decreasing*\)\.

Prioqueue names are unrestricted, but may be recognized as options if no
priority type is given\.

  - <a name='1'></a>__::struct::prioqueue__ ?__\-ascii&#124;\-dictionary&#124;\-integer&#124;\-real__? ?*prioqueueName*?

    The __::struct::prioqueue__ command creates a new prioqueue object with
    an associated global Tcl command whose name is *prioqueueName*\. This
    command may be used to invoke various operations on the prioqueue\. It has
    the following general form:

  - <a name='2'></a>*prioqueueName* __option__ ?*arg arg \.\.\.*?

    __option__ and the *arg*s determine the exact behavior of the command\.
    The following commands are possible for prioqueue objects:

  - <a name='3'></a>*prioqueueName* __clear__

    Remove all items from the prioqueue\.

  - <a name='4'></a>*prioqueueName* __[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__ *item*

    Remove the selected item from this priority queue\.

  - <a name='5'></a>*prioqueueName* __destroy__

    Destroy the prioqueue, including its storage space and associated command\.

  - <a name='6'></a>*prioqueueName* __get__ ?*count*?

    Return the front *count* items of the prioqueue \(but not their priorities\)
    and remove them from the prioqueue\. If *count* is not specified, it
    defaults to 1\. If *count* is 1, the result is a simple string; otherwise,
    it is a list\. If specified, *count* must be greater than or equal to 1\. If
    there are no or too few items in the prioqueue, this command will throw an
    error\.

  - <a name='7'></a>*prioqueueName* __peek__ ?*count*?

    Return the front *count* items of the prioqueue \(but not their
    priorities\), without removing them from the prioqueue\. If *count* is not
    specified, it defaults to 1\. If *count* is 1, the result is a simple
    string; otherwise, it is a list\. If specified, *count* must be greater
    than or equal to 1\. If there are no or too few items in the queue, this
    command will throw an error\.

  - <a name='8'></a>*prioqueueName* __peekpriority__ ?*count*?

    Return the front *count* items priority keys, without removing them from
    the prioqueue\. If *count* is not specified, it defaults to 1\. If *count*
    is 1, the result is a simple string; otherwise, it is a list\. If specified,
    *count* must be greater than or equal to 1\. If there are no or too few
    items in the queue, this command will throw an error\.

  - <a name='9'></a>*prioqueueName* __put__ *item prio* ?*item prio \.\.\.*?

    Put the *item* or items specified into the prioqueue\. *prio* must be a
    valid priority key for this type of prioqueue, otherwise an error is thrown
    and no item is added\. Items are inserted at their priority ranking\. Items
    with equal priority are added in the order they were added\.

  - <a name='10'></a>*prioqueueName* __size__

    Return the number of items in the prioqueue\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: prioqueue* of
the [Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also
report any ideas for enhancements you may have for either package and/or
documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[ordered list](\.\./\.\./\.\./\.\./index\.md\#ordered\_list),
[prioqueue](\.\./\.\./\.\./\.\./index\.md\#prioqueue), [priority
queue](\.\./\.\./\.\./\.\./index\.md\#priority\_queue)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003 Michael Schlenker <mic42@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/queue.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

[//000000001]: # (struct::queue \- Tcl Data Structures)
[//000000002]: # (Generated from file 'queue\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (struct::queue\(n\) 1\.4\.5 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::queue \- Create and manipulate queue objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require struct::queue ?1\.4\.5?  

[*queueName* __option__ ?*arg arg \.\.\.*?](#1)  
[*queueName* __clear__](#2)  
[*queueName* __destroy__](#3)  
[*queueName* __get__ ?*count*?](#4)  
[*queueName* __peek__ ?*count*?](#5)  
[*queueName* __put__ *item* ?*item \.\.\.*?](#6)  
[*queueName* __unget__ *item*](#7)  
[*queueName* __size__](#8)  

# <a name='description'></a>DESCRIPTION

The __::struct__ namespace contains a commands for processing finite queues\.

It exports a single command, __::struct::queue__\. All functionality provided
here can be reached through a subcommand of this command\.

*Note:* As of version 1\.4\.1 of this package a critcl based C implementation is
available\. This implementation however requires Tcl 8\.4 to run\.

The __::struct::queue__ command creates a new queue object with an
associated global Tcl command whose name is *queueName*\. This command may be
used to invoke various operations on the queue\. It has the following general
form:

  - <a name='1'></a>*queueName* __option__ ?*arg arg \.\.\.*?

    *Option* and the *arg*s determine the exact behavior of the command\. The
    following commands are possible for queue objects:

  - <a name='2'></a>*queueName* __clear__

    Remove all items from the queue\.

  - <a name='3'></a>*queueName* __destroy__

    Destroy the queue, including its storage space and associated command\.

  - <a name='4'></a>*queueName* __get__ ?*count*?

    Return the front *count* items of the queue and remove them from the
    queue\. If *count* is not specified, it defaults to 1\. If *count* is 1,
    the result is a simple string; otherwise, it is a list\. If specified,
    *count* must be greater than or equal to 1\. If there are not enough items
    in the queue to fulfull the request, this command will throw an error\.

  - <a name='5'></a>*queueName* __peek__ ?*count*?

    Return the front *count* items of the queue, without removing them from
    the queue\. If *count* is not specified, it defaults to 1\. If *count* is
    1, the result is a simple string; otherwise, it is a list\. If specified,
    *count* must be greater than or equal to 1\. If there are not enough items
    in the queue to fulfull the request, this command will throw an error\.

  - <a name='6'></a>*queueName* __put__ *item* ?*item \.\.\.*?

    Put the *item* or items specified into the queue\. If more than one
    *item* is given, they will be added in the order they are listed\.

  - <a name='7'></a>*queueName* __unget__ *item*

    Put the *item* into the queue, at the front, i\.e\. before any other items
    already in the queue\. This makes this operation the complement to the method
    __get__\.

  - <a name='8'></a>*queueName* __size__

    Return the number of items in the queue\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: queue* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[graph](\.\./\.\./\.\./\.\./index\.md\#graph), [list](\.\./\.\./\.\./\.\./index\.md\#list),
[matrix](\.\./\.\./\.\./\.\./index\.md\#matrix),
[pool](\.\./\.\./\.\./\.\./index\.md\#pool),
[prioqueue](\.\./\.\./\.\./\.\./index\.md\#prioqueue),
[record](\.\./\.\./\.\./\.\./index\.md\#record), [set](\.\./\.\./\.\./\.\./index\.md\#set),
[skiplist](\.\./\.\./\.\./\.\./index\.md\#skiplist),
[stack](\.\./\.\./\.\./\.\./index\.md\#stack), [tree](\.\./\.\./\.\./\.\./index\.md\#tree)

# <a name='category'></a>CATEGORY

Data structures
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/record.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432

[//000000001]: # (struct::record \- Tcl Data Structures)
[//000000002]: # (Generated from file 'record\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002, Brett Schwarz <brett\_schwarz@yahoo\.com>)
[//000000004]: # (struct::record\(n\) 1\.2\.2 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::record \- Define and create records \(similar to 'C' structures\)

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [RECORD MEMBERS](#section2)

      - [Getting Values](#subsection1)

      - [Setting Values](#subsection2)

      - [Alias access](#subsection3)

  - [RECORD COMMAND](#section3)

  - [INSTANCE COMMAND](#section4)

  - [EXAMPLES](#section5)

      - [Example 1 \- Contact Information](#subsection4)

      - [Example 2 \- Linked List](#subsection5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require struct::record ?1\.2\.2?  

[__record define__ *recordName* *recordMembers* ?*instanceName1 instanceName2 \.\.\.*?](#1)  
[__record show__ *record*](#2)  
[__record show__ *instances* *recordName*](#3)  
[__record show__ *members* *recordName*](#4)  
[__record show__ *values* *instanceName*](#5)  
[__record exists__ *record* *recordName*](#6)  
[__record exists__ *instance* *instanceName*](#7)  
[__record delete__ *record* *recordName*](#8)  
[__record delete__ *instance* *instanceName*](#9)  
[*instanceName* __cget__ \-*member*](#10)  
[*instanceName* __cget__ \-*member1* \-*member2*](#11)  
[*instanceName* __cget__](#12)  
[*instanceName* __configure__](#13)  
[*instanceName*](#14)  
[*instanceName* __configure__ \-*member* *value*](#15)  
[*instanceName* __configure__ \-*member1* *value1* \-*member2* *value2*](#16)  
[*recordName* *instanceName*&#124;__\#auto__ ?*\-member1 value1 \-member2 value2 \.\.\.*?](#17)  
[*instanceName* __cget__ ?*\-member1 \-member2 \.\.\.*?](#18)  
[*instanceName* __configure__ ?*\-member1 value1 \-member2 value2 \.\.\.*?](#19)  

# <a name='description'></a>DESCRIPTION

The __::struct::record__ package provides a mechanism to group variables
together as one data structure, similar to a *[C](\.\./\.\./\.\./\.\./index\.md\#c)*
structure\. The members of a record can be variables or other records\. However, a
record can not contain circular records, i\.e\. records that contain the same
record as a member\.

This package was structured so that it is very similar to how Tk objects work\.
Each record definition creates a record object that encompasses that definition\.
Subsequently, that record object can create instances of that record\. These
instances can then be manipulated with the __cget__ and __configure__
methods\.

The package only contains one top level command, but several sub commands \(see
below\)\. It also obeys the namespace in which the record was defined, hence the
objects returned are fully qualified\.

  - <a name='1'></a>__record define__ *recordName* *recordMembers* ?*instanceName1 instanceName2 \.\.\.*?

    Defines a record\. *recordName* is the name of the record, and is also used
    as an object command\. This object command is used to create instances of the
    record definition\. The *recordMembers* are the members of the record that
    make up the record definition\. These are variables and other records\. If
    optional *instanceName* args are specified, then an instance is generated
    after the definition is created for each *instanceName*\.

  - <a name='2'></a>__record show__ *record*

    Returns a list of records that have been defined\.

  - <a name='3'></a>__record show__ *instances* *recordName*

    Returns the instances that have been instantiated by *recordName*\.

  - <a name='4'></a>__record show__ *members* *recordName*

    Returns the members that are defined for record *recordName*\. It returns
    the same format as how the records were defined\.

  - <a name='5'></a>__record show__ *values* *instanceName*

    Returns a list of values that are set for the instance *instanceName*\. The
    output is a list of key/value pairs\. If there are nested records, then the
    values of the nested records will itself be a list\.

  - <a name='6'></a>__record exists__ *record* *recordName*

    Tests for the existence of a *record* with the name *recordName*\.

  - <a name='7'></a>__record exists__ *instance* *instanceName*

    Tests for the existence of a *instance* with the name *instanceName*\.

  - <a name='8'></a>__record delete__ *record* *recordName*

    Deletes *recordName*, and all instances of *recordName*\. It will return
    an error if the record does not exist\.

  - <a name='9'></a>__record delete__ *instance* *instanceName*

    Deletes *instance* with the name of *instanceName*\. It will return an
    error if the instance does not exist\. Note that this recursively deletes any
    nested instances as well\.

# <a name='section2'></a>RECORD MEMBERS

Record members can either be variables, or other records, However, the same
record can not be nested witin itself \(circular\)\. To define a nested record, you
need to specify the __record__ keyword, along the with name of the record,
and the name of the instance of that nested record \(within the container\)\. For
example, it would look like this:

    # this is the nested record
    record define mynestedrecord {
        nest1
        nest2
    }

    # This is the main record
    record define myrecord {
        mem1
        mem2
        {record mynestedrecord mem3}
    }

You can also assign default or initial values to the members of a record, by
enclosing the member entry in braces:

    record define myrecord {
        mem1
        {mem2 5}
    }

All instances created from this record definition will initially have __5__
as the value for member *mem2*\. If no default is given, then the value will be
the empty string\.

## <a name='subsection1'></a>Getting Values

To get a value of a member, there are several ways to do this\.

  - <a name='10'></a>*instanceName* __cget__ \-*member*

    In this form the built\-in __cget__ instance method returns the value of
    the specified *member*\. Note the leading dash\.

    To reach a nested member use *dot notation*:

    > *instanceName* __cget__ \-mem3\.nest1

  - <a name='11'></a>*instanceName* __cget__ \-*member1* \-*member2*

    In this form the built\-in __cget__ instance method returns a list
    containing the values of both specified members, in the order of
    specification\.

  - <a name='12'></a>*instanceName* __cget__

  - <a name='13'></a>*instanceName* __configure__

  - <a name='14'></a>*instanceName*

    These forms are all equivalent\. They return a dictionary of all members and
    the associated values\.

## <a name='subsection2'></a>Setting Values

To set a value of a member, there are several ways to do this\.

  - <a name='15'></a>*instanceName* __configure__ \-*member* *value*

    In this form the built\-in __configure__ instance method sets the
    specified *member* to the given *value*\. Note the leading dash\.

    To reach a nested member use *dot notation*:

    > *instanceName* __configure__ \-mem3\.nest1 value

  - <a name='16'></a>*instanceName* __configure__ \-*member1* *value1* \-*member2* *value2*

    In this form the built\-in __configure__ instance method sets all
    specified members to the associated values\.

## <a name='subsection3'></a>Alias access

In the original implementation, access was done by using dot notation similar to
how *[C](\.\./\.\./\.\./\.\./index\.md\#c)* structures are accessed\. However, there
was a concensus to make the interface more Tcl like, which made sense\. However,
the original alias access still exists\. It might prove to be helpful to some\.

Basically, for every member of every instance, an alias is created\. This alias
is used to get and set values for that member\. An example will illustrate the
point, using the above defined records:

    % # Create an instance first
    % myrecord inst1
    ::inst1

    % # To get a member of an instance, just use the alias. It behaves
    % # like a Tcl command:
    % inst1.mem1

    % # To set a member via the alias, just include a value. And optionally
    % # the equal sign - syntactic sugar.
    % inst1.mem1 = 5
    5

    % inst1.mem1
    5

    % # For nested records, just continue with the dot notation.
    % # note, no equal sign.
    % inst1.mem3.nest1 10
    10

    % inst1.mem3.nest1
    10

    % # just the instance by itself gives all member/values pairs for that
    % # instance
    % inst1
    -mem1 5 -mem2 {} -mem3 {-nest1 10 -nest2 {}}

    % # and to get all members within the nested record
    % inst1.mem3
    -nest1 10 -nest2 {}

# <a name='section3'></a>RECORD COMMAND

The following subcommands and corresponding arguments are available to any
record command:

  - <a name='17'></a>*recordName* *instanceName*&#124;__\#auto__ ?*\-member1 value1 \-member2 value2 \.\.\.*?

    Using the *recordName* object command that was created from the record
    definition, instances of the record definition can be created\. Once an
    instance is created, it inherits the members of the record definition, very
    similar to how objects work\. During instance generation, an object command
    for the instance is created as well, using *instanceName*\.

    This object command is used to access the data members of the instance\.
    During the instantiation, while values for that instance may be given, when
    done, *all* values must be given, and be given as key/value pairs, like
    for method __configure__\. Nested records have to be in list format\.

    Optionally, __\#auto__ can be used in place of *instanceName*\. When
    __\#auto__ is used, the instance name will be automatically generated,
    and of the form __recordName__N____, where __N__ is a unique
    integer \(starting at 0\) that is generated\.

# <a name='section4'></a>INSTANCE COMMAND

The following subcommands and corresponding arguments are available to any
record instance command:

  - <a name='18'></a>*instanceName* __cget__ ?*\-member1 \-member2 \.\.\.*?

    Each instance has the method __cget__\. This is very similar to how Tk
    widget's __cget__ command works\. It queries the values of the members
    for that particular instance\. If no arguments are given, then a dictionary
    is returned\.

  - <a name='19'></a>*instanceName* __configure__ ?*\-member1 value1 \-member2 value2 \.\.\.*?

    Each instance has the method __configure__\. This is very similar to how
    Tk widget's __configure__ command works\. It sets the values of the
    particular members for that particular instance\. If no arguments are given,
    then a dictionary list is returned\.

# <a name='section5'></a>EXAMPLES

Two examples are provided to give a good illustration on how to use this
package\.

## <a name='subsection4'></a>Example 1 \- Contact Information

Probably the most obvious example would be to hold contact information, such as
addresses, phone numbers, comments, etc\. Since a person can have multiple phone
numbers, multiple email addresses, etc, we will use nested records to define
these\. So, the first thing we do is define the nested records:

    ##
    ##  This is an interactive example, to see what is returned by
    ##  each command as well.
    ##

    % namespace import ::struct::record::*

    % # define a nested record. Notice that country has default 'USA'.
    % record define locations {
        street
        street2
        city
        state
        zipcode
        {country USA}
        phone
    }
    ::locations
    % # Define the main record. Notice that it uses the location record twice.
    % record define contacts {
        first
        middle
        last
        {record locations home}
        {record locations work}
    }
    ::contacts
    % # Create an instance for the contacts record.
    % contacts cont1
    ::cont1
    % # Display some introspection values
    % record show records
    ::contacts ::locations
    % #
    % record show values cont1
    -first {} -middle {} -last {} -home {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}} -work {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}}
    % #
    % record show instances contacts
    ::cont1
    % #
    % cont1 config
    -first {} -middle {} -last {} -home {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}} -work {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}}
    % #
    % cont1 cget
    -first {} -middle {} -last {} -home {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}} -work {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}}
    % # copy one record to another record
    % record define contacts2 [record show members contacts]
    ::contacts2
    % record show members contacts2
    first middle last {record locations home} {record locations work}
    % record show members contacts
    first middle last {record locations home} {record locations work}
    %

## <a name='subsection5'></a>Example 2 \- Linked List

This next example just illustrates a simple linked list

    % # define a very simple record for linked list
    % record define linkedlist {
        value
        next
    }
    ::linkedlist
    % linkedlist lstart
    ::lstart
    % lstart config -value 1 -next [linkedlist #auto]
    % [lstart cget -next] config -value 2 -next [linkedlist #auto]
    % [[lstart cget -next] cget -next] config -value 3 -next "end"
    % set next lstart
    lstart
    % while 1 {
        lappend values [$next cget -value]
        set next [$next cget -next]
        if {[string match "end" $next]} break
    }
    % puts "$values"
    1 2 3
    % # cleanup linked list
    % # We could just use delete record linkedlist also
    % foreach I [record show instances linkedlist] {
        record delete instance $I
    }
    % record show instances linkedlist
    %

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: record* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[data structures](\.\./\.\./\.\./\.\./index\.md\#data\_structures),
[record](\.\./\.\./\.\./\.\./index\.md\#record),
[struct](\.\./\.\./\.\./\.\./index\.md\#struct)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002, Brett Schwarz <brett\_schwarz@yahoo\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/skiplist.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

[//000000001]: # (struct::skiplist \- Tcl Data Structures)
[//000000002]: # (Generated from file 'skiplist\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2000 Keith Vetter)
[//000000004]: # (struct::skiplist\(n\) 1\.3 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::skiplist \- Create and manipulate skiplists

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require struct::skiplist ?1\.3?  

[__skiplistName__ *option* ?*arg arg \.\.\.*?](#1)  
[*skiplistName* __delete__ *node* ?*node*\.\.\.?](#2)  
[*skiplistName* __destroy__](#3)  
[*skiplistName* __insert__ *key value*](#4)  
[*skiplistName* __search__ *node* ?__\-key__ *key*?](#5)  
[*skiplistName* __size__](#6)  
[*skiplistName* __walk__ *cmd*](#7)  

# <a name='description'></a>DESCRIPTION

The __::struct::skiplist__ command creates a new skiplist object with an
associated global Tcl command whose name is *skiplistName*\. This command may
be used to invoke various operations on the skiplist\. It has the following
general form:

  - <a name='1'></a>__skiplistName__ *option* ?*arg arg \.\.\.*?

    *Option* and the *arg*s determine the exact behavior of the command\.

Skip lists are an alternative data structure to binary trees\. They can be used
to maintain ordered lists over any sequence of insertions and deletions\. Skip
lists use randomness to achieve probabilistic balancing, and as a result the
algorithms for insertion and deletion in skip lists are much simpler and faster
than those for binary trees\.

To read more about skip lists see Pugh, William\. *Skip lists: a probabilistic
alternative to balanced trees* In: Communications of the ACM, June 1990, 33\(6\)
668\-676\.

Currently, the key can be either a number or a string, and comparisons are
performed with the built in greater than operator\. The following commands are
possible for skiplist objects:

  - <a name='2'></a>*skiplistName* __delete__ *node* ?*node*\.\.\.?

    Remove the specified nodes from the skiplist\.

  - <a name='3'></a>*skiplistName* __destroy__

    Destroy the skiplist, including its storage space and associated command\.

  - <a name='4'></a>*skiplistName* __insert__ *key value*

    Insert a node with the given *key* and *value* into the skiplist\. If a
    node with that key already exists, then the that node's value is updated and
    its node level is returned\. Otherwise a new node is created and 0 is
    returned\.

  - <a name='5'></a>*skiplistName* __search__ *node* ?__\-key__ *key*?

    Search for a given key in a skiplist\. If not found then 0 is returned\. If
    found, then a two element list of 1 followed by the node's value is retuned\.

  - <a name='6'></a>*skiplistName* __size__

    Return a count of the number of nodes in the skiplist\.

  - <a name='7'></a>*skiplistName* __walk__ *cmd*

    Walk the skiplist from the first node to the last\. At each node, the command
    *cmd* will be evaluated with the key and value of the current node
    appended\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: skiplist* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[skiplist](\.\./\.\./\.\./\.\./index\.md\#skiplist)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2000 Keith Vetter
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/stack.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150

[//000000001]: # (struct::stack \- Tcl Data Structures)
[//000000002]: # (Generated from file 'stack\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (struct::stack\(n\) 1\.5\.3 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::stack \- Create and manipulate stack objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require struct::stack ?1\.5\.3?  

[*stackName* __option__ ?*arg arg \.\.\.*?](#1)  
[*stackName* __clear__](#2)  
[*stackName* __destroy__](#3)  
[*stackName* __get__](#4)  
[*stackName* __getr__](#5)  
[*stackName* __peek__ ?*count*?](#6)  
[*stackName* __peekr__ ?*count*?](#7)  
[*stackName* __trim__ ?*newsize*?](#8)  
[*stackName* __trim\*__ ?*newsize*?](#9)  
[*stackName* __pop__ ?*count*?](#10)  
[*stackName* __push__ *item* ?*item\.\.\.*?](#11)  
[*stackName* __size__](#12)  

# <a name='description'></a>DESCRIPTION

The __::struct__ namespace contains a commands for processing finite stacks\.

It exports a single command, __::struct::stack__\. All functionality provided
here can be reached through a subcommand of this command\.

*Note:* As of version 1\.3\.3 of this package a critcl based C implementation is
available\. This implementation however requires Tcl 8\.4 to run\.

The __::struct::stack__ command creates a new stack object with an
associated global Tcl command whose name is *stackName*\. This command may be
used to invoke various operations on the stack\. It has the following general
form:

  - <a name='1'></a>*stackName* __option__ ?*arg arg \.\.\.*?

    *Option* and the *arg*s determine the exact behavior of the command\. The
    following commands are possible for stack objects:

  - <a name='2'></a>*stackName* __clear__

    Remove all items from the stack\.

  - <a name='3'></a>*stackName* __destroy__

    Destroy the stack, including its storage space and associated command\.

  - <a name='4'></a>*stackName* __get__

    Returns the whole contents of the stack as a list, without removing them
    from the stack\.

  - <a name='5'></a>*stackName* __getr__

    A variant of __get__, which returns the contents in reversed order\.

  - <a name='6'></a>*stackName* __peek__ ?*count*?

    Return the top *count* items of the stack, without removing them from the
    stack\. If *count* is not specified, it defaults to 1\. If *count* is 1,
    the result is a simple string; otherwise, it is a list\. If specified,
    *count* must be greater than or equal to 1\. If there are not enoughs items
    on the stack to fulfull the request, this command will throw an error\.

  - <a name='7'></a>*stackName* __peekr__ ?*count*?

    A variant of __peek__, which returns the items in reversed order\.

  - <a name='8'></a>*stackName* __trim__ ?*newsize*?

    Shrinks the stack to contain at most *newsize* elements and returns a list
    containing the elements which were removed\. Nothing is done if the stack is
    already at the specified size, or smaller\. In that case the result is the
    empty list\.

  - <a name='9'></a>*stackName* __trim\*__ ?*newsize*?

    A variant of __trim__ which performs the shrinking, but does not return
    the removed elements\.

  - <a name='10'></a>*stackName* __pop__ ?*count*?

    Return the top *count* items of the stack, and remove them from the stack\.
    If *count* is not specified, it defaults to 1\. If *count* is 1, the
    result is a simple string; otherwise, it is a list\. If specified, *count*
    must be greater than or equal to 1\. If there are not enoughs items on the
    stack to fulfull the request, this command will throw an error\.

  - <a name='11'></a>*stackName* __push__ *item* ?*item\.\.\.*?

    Push the *item* or items specified onto the stack\. If more than one
    *item* is given, they will be pushed in the order they are listed\.

  - <a name='12'></a>*stackName* __size__

    Return the number of items on the stack\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: stack* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[graph](\.\./\.\./\.\./\.\./index\.md\#graph),
[matrix](\.\./\.\./\.\./\.\./index\.md\#matrix),
[queue](\.\./\.\./\.\./\.\./index\.md\#queue), [tree](\.\./\.\./\.\./\.\./index\.md\#tree)

# <a name='category'></a>CATEGORY

Data structures
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/struct_list.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720

[//000000001]: # (struct::list \- Tcl Data Structures)
[//000000002]: # (Generated from file 'struct\_list\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2003\-2005 by Kevin B\. Kenny\. All rights reserved)
[//000000004]: # (Copyright &copy; 2003\-2012 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (struct::list\(n\) 1\.8\.4 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::list \- Procedures for manipulating lists

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [LONGEST COMMON SUBSEQUENCE AND FILE COMPARISON](#section3)

  - [TABLE JOIN](#section4)

  - [REFERENCES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require struct::list ?1\.8\.4?  

[__::struct::list__ __longestCommonSubsequence__ *sequence1* *sequence2* ?*maxOccurs*?](#1)  
[__::struct::list__ __longestCommonSubsequence2__ *sequence1 sequence2* ?*maxOccurs*?](#2)  
[__::struct::list__ __lcsInvert__ *lcsData* *len1* *len2*](#3)  
[__::struct::list__ __lcsInvert2__ *lcs1* *lcs2* *len1* *len2*](#4)  
[__::struct::list__ __lcsInvertMerge__ *lcsData* *len1* *len2*](#5)  
[__::struct::list__ __lcsInvertMerge2__ *lcs1* *lcs2* *len1* *len2*](#6)  
[__::struct::list__ __reverse__ *sequence*](#7)  
[__::struct::list__ __shuffle__ *list*](#8)  
[__::struct::list__ __assign__ *sequence* *varname* ?*varname*?\.\.\.](#9)  
[__::struct::list__ __flatten__ ?__\-full__? ?__\-\-__? *sequence*](#10)  
[__::struct::list__ __map__ *sequence* *cmdprefix*](#11)  
[__::struct::list__ __mapfor__ *var* *sequence* *script*](#12)  
[__::struct::list__ __filter__ *sequence* *cmdprefix*](#13)  
[__::struct::list__ __filterfor__ *var* *sequence* *expr*](#14)  
[__::struct::list__ __split__ *sequence* *cmdprefix* ?*passVar* *failVar*?](#15)  
[__::struct::list__ __fold__ *sequence* *initialvalue* *cmdprefix*](#16)  
[__::struct::list__ __shift__ *listvar*](#17)  
[__::struct::list__ __iota__ *n*](#18)  
[__::struct::list__ __equal__ *a* *b*](#19)  
[__::struct::list__ __repeat__ *size* *element1* ?*element2* *element3*\.\.\.?](#20)  
[__::struct::list__ __repeatn__ *value* *size*\.\.\.](#21)  
[__::struct::list__ __dbJoin__ ?__\-inner__&#124;__\-left__&#124;__\-right__&#124;__\-full__? ?__\-keys__ *varname*? \{*keycol* *table*\}\.\.\.](#22)  
[__::struct::list__ __dbJoinKeyed__ ?__\-inner__&#124;__\-left__&#124;__\-right__&#124;__\-full__? ?__\-keys__ *varname*? *table*\.\.\.](#23)  
[__::struct::list__ __swap__ *listvar* *i* *j*](#24)  
[__::struct::list__ __firstperm__ *list*](#25)  
[__::struct::list__ __nextperm__ *perm*](#26)  
[__::struct::list__ __permutations__ *list*](#27)  
[__::struct::list__ __foreachperm__ *var* *list* *body*](#28)  

# <a name='description'></a>DESCRIPTION

The __::struct::list__ namespace contains several useful commands for
processing Tcl lists\. Generally speaking, they implement algorithms more complex
or specialized than the ones provided by Tcl itself\.

It exports only a single command, __struct::list__\. All functionality
provided here can be reached through a subcommand of this command\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::struct::list__ __longestCommonSubsequence__ *sequence1* *sequence2* ?*maxOccurs*?

    Returns the longest common subsequence of elements in the two lists
    *sequence1* and *sequence2*\. If the *maxOccurs* parameter is provided,
    the common subsequence is restricted to elements that occur no more than
    *maxOccurs* times in *sequence2*\.

    The return value is a list of two lists of equal length\. The first sublist
    is of indices into *sequence1*, and the second sublist is of indices into
    *sequence2*\. Each corresponding pair of indices corresponds to equal
    elements in the sequences; the sequence returned is the longest possible\.

  - <a name='2'></a>__::struct::list__ __longestCommonSubsequence2__ *sequence1 sequence2* ?*maxOccurs*?

    Returns an approximation to the longest common sequence of elements in the
    two lists *sequence1* and *sequence2*\. If the *maxOccurs* parameter is
    omitted, the subsequence computed is exactly the longest common subsequence;
    otherwise, the longest common subsequence is approximated by first
    determining the longest common sequence of only those elements that occur no
    more than *maxOccurs* times in *sequence2*, and then using that result
    to align the two lists, determining the longest common subsequences of the
    sublists between the two elements\.

    As with __longestCommonSubsequence__, the return value is a list of two
    lists of equal length\. The first sublist is of indices into *sequence1*,
    and the second sublist is of indices into *sequence2*\. Each corresponding
    pair of indices corresponds to equal elements in the sequences\. The sequence
    approximates the longest common subsequence\.

  - <a name='3'></a>__::struct::list__ __lcsInvert__ *lcsData* *len1* *len2*

    This command takes a description of a longest common subsequence
    \(*lcsData*\), inverts it, and returns the result\. Inversion means here that
    as the input describes which parts of the two sequences are identical the
    output describes the differences instead\.

    To be fully defined the lengths of the two sequences have to be known and
    are specified through *len1* and *len2*\.

    The result is a list where each element describes one chunk of the
    differences between the two sequences\. This description is a list containing
    three elements, a type and two pairs of indices into *sequence1* and
    *sequence2* respectively, in this order\. The type can be one of three
    values:

      * __added__

        Describes an addition\. I\.e\. items which are missing in *sequence1* can
        be found in *sequence2*\. The pair of indices into *sequence1*
        describes where the added range had been expected to be in
        *sequence1*\. The first index refers to the item just before the added
        range, and the second index refers to the item just after the added
        range\. The pair of indices into *sequence2* describes the range of
        items which has been added to it\. The first index refers to the first
        item in the range, and the second index refers to the last item in the
        range\.

      * __deleted__

        Describes a deletion\. I\.e\. items which are in *sequence1* are missing
        from *sequence2*\. The pair of indices into *sequence1* describes the
        range of items which has been deleted\. The first index refers to the
        first item in the range, and the second index refers to the last item in
        the range\. The pair of indices into *sequence2* describes where the
        deleted range had been expected to be in *sequence2*\. The first index
        refers to the item just before the deleted range, and the second index
        refers to the item just after the deleted range\.

      * __changed__

        Describes a general change\. I\.e a range of items in *sequence1* has
        been replaced by a different range of items in *sequence2*\. The pair
        of indices into *sequence1* describes the range of items which has
        been replaced\. The first index refers to the first item in the range,
        and the second index refers to the last item in the range\. The pair of
        indices into *sequence2* describes the range of items replacing the
        original range\. Again the first index refers to the first item in the
        range, and the second index refers to the last item in the range\.

        sequence 1 = {a b r a c a d a b r a}
        lcs 1      =   {1 2   4 5     8 9 10}
        lcs 2      =   {0 1   3 4     5 6 7}
        sequence 2 =   {b r i c a     b r a c}

        Inversion  = {{deleted  {0  0} {-1 0}}
                      {changed  {3  3}  {2 2}}
                      {deleted  {6  7}  {4 5}}
                      {added   {10 11}  {8 8}}}

    *Notes:*

      * An index of __\-1__ in a *deleted* chunk refers to just before the
        first element of the second sequence\.

      * Also an index equal to the length of the first sequence in an *added*
        chunk refers to just behind the end of the sequence\.

  - <a name='4'></a>__::struct::list__ __lcsInvert2__ *lcs1* *lcs2* *len1* *len2*

    Similar to __lcsInvert__\. Instead of directly taking the result of a
    call to __longestCommonSubsequence__ this subcommand expects the indices
    for the two sequences in two separate lists\.

  - <a name='5'></a>__::struct::list__ __lcsInvertMerge__ *lcsData* *len1* *len2*

    Similar to __lcsInvert__\. It returns essentially the same structure as
    that command, except that it may contain chunks of type __unchanged__
    too\.

    These new chunks describe the parts which are unchanged between the two
    sequences\. This means that the result of this command describes both the
    changed and unchanged parts of the two sequences in one structure\.

        sequence 1 = {a b r a c a d a b r a}
        lcs 1      =   {1 2   4 5     8 9 10}
        lcs 2      =   {0 1   3 4     5 6 7}
        sequence 2 =   {b r i c a     b r a c}

        Inversion/Merge  = {{deleted   {0  0} {-1 0}}
                            {unchanged {1  2}  {0 1}}
                            {changed   {3  3}  {2 2}}
                            {unchanged {4  5}  {3 4}}
                            {deleted   {6  7}  {4 5}}
                            {unchanged {8 10}  {5 7}}
                            {added    {10 11}  {8 8}}}

  - <a name='6'></a>__::struct::list__ __lcsInvertMerge2__ *lcs1* *lcs2* *len1* *len2*

    Similar to __lcsInvertMerge__\. Instead of directly taking the result of
    a call to __longestCommonSubsequence__ this subcommand expects the
    indices for the two sequences in two separate lists\.

  - <a name='7'></a>__::struct::list__ __reverse__ *sequence*

    The subcommand takes a single *sequence* as argument and returns a new
    sequence containing the elements of the input sequence in reverse order\.

  - <a name='8'></a>__::struct::list__ __shuffle__ *list*

    The subcommand takes a *list* and returns a copy of that list with the
    elements it contains in random order\. Every possible ordering of elements is
    equally likely to be generated\. The Fisher\-Yates shuffling algorithm is used
    internally\.

  - <a name='9'></a>__::struct::list__ __assign__ *sequence* *varname* ?*varname*?\.\.\.

    The subcommand assigns the first __n__ elements of the input
    *sequence* to the one or more variables whose names were listed after the
    sequence, where __n__ is the number of specified variables\.

    If there are more variables specified than there are elements in the
    *sequence* the empty string will be assigned to the superfluous variables\.

    If there are more elements in the *sequence* than variable names specified
    the subcommand returns a list containing the unassigned elements\. Else an
    empty list is returned\.

        tclsh> ::struct::list assign {a b c d e} foo bar
        c d e
        tclsh> set foo
        a
        tclsh> set bar
        b

  - <a name='10'></a>__::struct::list__ __flatten__ ?__\-full__? ?__\-\-__? *sequence*

    The subcommand takes a single *sequence* and returns a new sequence where
    one level of nesting was removed from the input sequence\. In other words,
    the sublists in the input sequence are replaced by their elements\.

    The subcommand will remove any nesting it finds if the option __\-full__
    is specified\.

        tclsh> ::struct::list flatten {1 2 3 {4 5} {6 7} {{8 9}} 10}
        1 2 3 4 5 6 7 {8 9} 10
        tclsh> ::struct::list flatten -full {1 2 3 {4 5} {6 7} {{8 9}} 10}
        1 2 3 4 5 6 7 8 9 10

  - <a name='11'></a>__::struct::list__ __map__ *sequence* *cmdprefix*

    The subcommand takes a *sequence* to operate on and a command prefix
    \(*cmdprefix*\) specifying an operation, applies the command prefix to each
    element of the sequence and returns a sequence consisting of the results of
    that application\.

    The command prefix will be evaluated with a single word appended to it\. The
    evaluation takes place in the context of the caller of the subcommand\.

        tclsh> # squaring all elements in a list

        tclsh> proc sqr {x} {expr {$x*$x}}
        tclsh> ::struct::list map {1 2 3 4 5} sqr
        1 4 9 16 25

        tclsh> # Retrieving the second column from a matrix
        tclsh> # given as list of lists.

        tclsh> proc projection {n list} {::lindex $list $n}
        tclsh> ::struct::list map {{a b c} {1 2 3} {d f g}} {projection 1}
        b 2 f

  - <a name='12'></a>__::struct::list__ __mapfor__ *var* *sequence* *script*

    The subcommand takes a *sequence* to operate on and a tcl *script*,
    applies the script to each element of the sequence and returns a sequence
    consisting of the results of that application\.

    The script will be evaluated as is, and has access to the current list
    element through the specified iteration variable *var*\. The evaluation
    takes place in the context of the caller of the subcommand\.

            tclsh> # squaring all elements in a list

            tclsh> ::struct::list mapfor x {1 2 3 4 5} {
        	expr {$x * $x}
            }
            1 4 9 16 25

            tclsh> # Retrieving the second column from a matrix
            tclsh> # given as list of lists.

            tclsh> ::struct::list mapfor x {{a b c} {1 2 3} {d f g}} {
        	lindex $x 1
            }
            b 2 f

  - <a name='13'></a>__::struct::list__ __filter__ *sequence* *cmdprefix*

    The subcommand takes a *sequence* to operate on and a command prefix
    \(*cmdprefix*\) specifying an operation, applies the command prefix to each
    element of the sequence and returns a sequence consisting of all elements of
    the *sequence* for which the command prefix returned __true__\. In
    other words, this command filters out all elements of the input *sequence*
    which fail the test the *cmdprefix* represents, and returns the remaining
    elements\.

    The command prefix will be evaluated with a single word appended to it\. The
    evaluation takes place in the context of the caller of the subcommand\.

        tclsh> # removing all odd numbers from the input

        tclsh> proc even {x} {expr {($x % 2) == 0}}
        tclsh> ::struct::list filter {1 2 3 4 5} even
        2 4

    *Note:* The __filter__ is a specialized application of __fold__
    where the result is extended with the current item or not, depending o nthe
    result of the test\.

  - <a name='14'></a>__::struct::list__ __filterfor__ *var* *sequence* *expr*

    The subcommand takes a *sequence* to operate on and a tcl expression
    \(*expr*\) specifying a condition, applies the conditionto each element of
    the sequence and returns a sequence consisting of all elements of the
    *sequence* for which the expression returned __true__\. In other words,
    this command filters out all elements of the input *sequence* which fail
    the test the condition *expr* represents, and returns the remaining
    elements\.

    The expression will be evaluated as is, and has access to the current list
    element through the specified iteration variable *var*\. The evaluation
    takes place in the context of the caller of the subcommand\.

        tclsh> # removing all odd numbers from the input

        tclsh> ::struct::list filterfor x {1 2 3 4 5} {($x % 2) == 0}
        2 4

  - <a name='15'></a>__::struct::list__ __split__ *sequence* *cmdprefix* ?*passVar* *failVar*?

    This is a variant of method __filter__, see above\. Instead of returning
    just the elements passing the test we get lists of both passing and failing
    elements\.

    If no variable names are specified then the result of the command will be a
    list containing the list of passing elements, and the list of failing
    elements, in this order\. Otherwise the lists of passing and failing elements
    are stored into the two specified variables, and the result will be a list
    containing two numbers, the number of elements passing the test, and the
    number of elements failing, in this order\.

    The interface to the test is the same as used by __filter__\.

  - <a name='16'></a>__::struct::list__ __fold__ *sequence* *initialvalue* *cmdprefix*

    The subcommand takes a *sequence* to operate on, an arbitrary string
    *initial value* and a command prefix \(*cmdprefix*\) specifying an
    operation\.

    The command prefix will be evaluated with two words appended to it\. The
    second of these words will always be an element of the sequence\. The
    evaluation takes place in the context of the caller of the subcommand\.

    It then reduces the sequence into a single value through repeated
    application of the command prefix and returns that value\. This reduction is
    done by

      * __1__

        Application of the command to the initial value and the first element of
        the list\.

      * __2__

        Application of the command to the result of the last call and the second
        element of the list\.

      * __\.\.\.__

      * __i__

        Application of the command to the result of the last call and the
        __i__'th element of the list\.

      * __\.\.\.__

      * __end__

        Application of the command to the result of the last call and the last
        element of the list\. The result of this call is returned as the result
        of the subcommand\.

        tclsh> # summing the elements in a list.
        tclsh> proc + {a b} {expr {$a + $b}}
        tclsh> ::struct::list fold {1 2 3 4 5} 0 +
        15

  - <a name='17'></a>__::struct::list__ __shift__ *listvar*

    The subcommand takes the list contained in the variable named by *listvar*
    and shifts it down one element\. After the call *listvar* will contain a
    list containing the second to last elements of the input list\. The first
    element of the ist is returned as the result of the command\. Shifting the
    empty list does nothing\.

  - <a name='18'></a>__::struct::list__ __iota__ *n*

    The subcommand returns a list containing the integer numbers in the range
    __\[0,n\)__\. The element at index __i__ of the list contain the number
    __i__\.

    For "*n* == __0__" an empty list will be returned\.

  - <a name='19'></a>__::struct::list__ __equal__ *a* *b*

    The subcommand compares the two lists *a* and *b* for equality\. In other
    words, they have to be of the same length and have to contain the same
    elements in the same order\. If an element is a list the same definition of
    equality applies recursively\.

    A boolean value will be returned as the result of the command\. This value
    will be __true__ if the two lists are equal, and __false__ else\.

  - <a name='20'></a>__::struct::list__ __repeat__ *size* *element1* ?*element2* *element3*\.\.\.?

    The subcommand creates a list of length "*size* \* *number of elements*"
    by repeating *size* times the sequence of elements *element1*
    *element2* *\.\.\.*\. *size* must be a positive integer,
    *element*__n__ can be any Tcl value\. Note that __repeat 1 arg
    \.\.\.__ is identical to __list arg \.\.\.__, though the *arg* is required
    with __repeat__\.

    *Examples:*

        tclsh> ::struct::list repeat 3 a
        a a a
        tclsh> ::struct::list repeat 3 [::struct::list repeat 3 0]
        {0 0 0} {0 0 0} {0 0 0}
        tclsh> ::struct::list repeat 3 a b c
        a b c a b c a b c
        tclsh> ::struct::list repeat 3 [::struct::list repeat 2 a] b c
        {a a} b c {a a} b c {a a} b c

  - <a name='21'></a>__::struct::list__ __repeatn__ *value* *size*\.\.\.

    The subcommand creates a \(nested\) list containing the *value* in all
    positions\. The exact size and degree of nesting is determined by the
    *size* arguments, all of which have to be integer numbers greater than or
    equal to zero\.

    A single argument *size* which is a list of more than one element will be
    treated as if more than argument *size* was specified\.

    If only one argument *size* is present the returned list will not be
    nested, of length *size* and contain *value* in all positions\. If more
    than one *size* argument is present the returned list will be nested, and
    of the length specified by the last *size* argument given to it\. The
    elements of that list are defined as the result of __Repeat__ for the
    same arguments, but with the last *size* value removed\.

    An empty list will be returned if no *size* arguments are present\.

        tclsh> ::struct::list repeatn  0 3 4
        {0 0 0} {0 0 0} {0 0 0} {0 0 0}
        tclsh> ::struct::list repeatn  0 {3 4}
        {0 0 0} {0 0 0} {0 0 0} {0 0 0}
        tclsh> ::struct::list repeatn  0 {3 4 5}
        {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}}

  - <a name='22'></a>__::struct::list__ __dbJoin__ ?__\-inner__&#124;__\-left__&#124;__\-right__&#124;__\-full__? ?__\-keys__ *varname*? \{*keycol* *table*\}\.\.\.

    The method performs a table join according to relational algebra\. The
    execution of any of the possible outer join operation is triggered by the
    presence of either option __\-left__, __\-right__, or __\-full__\.
    If none of these options is present a regular inner join will be performed\.
    This can also be triggered by specifying __\-inner__\. The various
    possible join operations are explained in detail in section [TABLE
    JOIN](#section4)\.

    If the __\-keys__ is present its argument is the name of a variable to
    store the full list of found keys into\. Depending on the exact nature of the
    input table and the join mode the output table may not contain all the keys
    by default\. In such a case the caller can declare a variable for this
    information and then insert it into the output table on its own, as she will
    have more information about the placement than this command\.

    What is left to explain is the format of the arguments\.

    The *keycol* arguments are the indices of the columns in the tables which
    contain the key values to use for the joining\. Each argument applies to the
    table following immediately after it\. The columns are counted from
    __0__, which references the first column\. The table associated with the
    column index has to have at least *keycol*\+1 columns\. An error will be
    thrown if there are less\.

    The *table* arguments represent a table or matrix of rows and columns of
    values\. We use the same representation as generated and consumed by the
    methods __get rect__ and __set rect__ of
    __[matrix](\.\./\.\./\.\./\.\./index\.md\#matrix)__ objects\. In other words,
    each argument is a list, representing the whole matrix\. Its elements are
    lists too, each representing a single rows of the matrix\. The elements of
    the row\-lists are the column values\.

    The table resulting from the join operation is returned as the result of the
    command\. We use the same representation as described above for the input
    *table*s\.

  - <a name='23'></a>__::struct::list__ __dbJoinKeyed__ ?__\-inner__&#124;__\-left__&#124;__\-right__&#124;__\-full__? ?__\-keys__ *varname*? *table*\.\.\.

    The operations performed by this method are the same as described above for
    __dbJoin__\. The only difference is in the specification of the keys to
    use\. Instead of using column indices separate from the table here the keys
    are provided within the table itself\. The row elements in each *table* are
    not the lists of column values, but a two\-element list where the second
    element is the regular list of column values and the first element is the
    key to use\.

  - <a name='24'></a>__::struct::list__ __swap__ *listvar* *i* *j*

    The subcommand exchanges the elements at the indices *i* and *j* in the
    list stored in the variable named by *listvar*\. The list is modified in
    place, and also returned as the result of the subcommand\.

  - <a name='25'></a>__::struct::list__ __firstperm__ *list*

    This subcommand returns the lexicographically first permutation of the input
    *list*\.

  - <a name='26'></a>__::struct::list__ __nextperm__ *perm*

    This subcommand accepts a permutation of a set of elements \(provided by
    *perm*\) and returns the next permutatation in lexicographic sequence\.

    The algorithm used here is by Donal E\. Knuth, see section
    [REFERENCES](#section5) for details\.

  - <a name='27'></a>__::struct::list__ __permutations__ *list*

    This subcommand returns a list containing all permutations of the input
    *list* in lexicographic order\.

  - <a name='28'></a>__::struct::list__ __foreachperm__ *var* *list* *body*

    This subcommand executes the script *body* once for each permutation of
    the specified *list*\. The permutations are visited in lexicographic order,
    and the variable *var* is set to the permutation for which *body* is
    currently executed\. The result of the loop command is the empty string\.

# <a name='section3'></a>LONGEST COMMON SUBSEQUENCE AND FILE COMPARISON

The __longestCommonSubsequence__ subcommand forms the core of a flexible
system for doing differential comparisons of files, similar to the capability
offered by the Unix command __[diff](\.\./\.\./\.\./\.\./index\.md\#diff)__\. While
this procedure is quite rapid for many tasks of file comparison, its performance
degrades severely if *sequence2* contains many equal elements \(as, for
instance, when using this procedure to compare two files, a quarter of whose
lines are blank\. This drawback is intrinsic to the algorithm used \(see the
Reference for details\)\.

One approach to dealing with the performance problem that is sometimes effective
in practice is arbitrarily to exclude elements that appear more than a certain
number of times\. This number is provided as the *maxOccurs* parameter\. If
frequent lines are excluded in this manner, they will not appear in the common
subsequence that is computed; the result will be the longest common subsequence
of infrequent elements\. The procedure __longestCommonSubsequence2__
implements this heuristic\. It functions as a wrapper around
__longestCommonSubsequence__; it computes the longest common subsequence of
infrequent elements, and then subdivides the subsequences that lie between the
matches to approximate the true longest common subsequence\.

# <a name='section4'></a>TABLE JOIN

This is an operation from relational algebra for relational databases\.

The easiest way to understand the regular inner join is that it creates the
cartesian product of all the tables involved first and then keeps only all those
rows in the resulting table for which the values in the specified key columns
are equal to each other\.

Implementing this description naively, i\.e\. as described above will generate a
*huge* intermediate result\. To avoid this the cartesian product and the
filtering of row are done at the same time\. What is required is a fast way to
determine if a key is present in a table\. In a true database this is done
through indices\. Here we use arrays internally\.

An *outer* join is an extension of the inner join for two tables\. There are
three variants of outerjoins, called *left*, *right*, and *full* outer
joins\. Their result always contains all rows from an inner join and then some
additional rows\.

  1. For the left outer join the additional rows are all rows from the left
     table for which there is no key in the right table\. They are joined to an
     empty row of the right table to fit them into the result\.

  1. For the right outer join the additional rows are all rows from the right
     table for which there is no key in the left table\. They are joined to an
     empty row of the left table to fit them into the result\.

  1. The full outer join combines both left and right outer join\. In other
     words, the additional rows are as defined for left outer join, and right
     outer join, combined\.

We extend all the joins from two to __n__ tables \(__n__ > 2\) by
executing

    (...((table1 join table2) join table3) ...) join tableN

Examples for all the joins:

    Inner Join

    {0 foo}              {0 bagel}    {0 foo   0 bagel}
    {1 snarf} inner join {1 snatz}  = {1 snarf 1 snatz}
    {2 blue}             {3 driver}

    Left Outer Join

    {0 foo}                   {0 bagel}    {0 foo   0 bagel}
    {1 snarf} left outer join {1 snatz}  = {1 snarf 1 snatz}
    {2 blue}                  {3 driver}   {2 blue  {} {}}

    Right Outer Join

    {0 foo}                    {0 bagel}    {0 foo   0 bagel}
    {1 snarf} right outer join {1 snatz}  = {1 snarf 1 snatz}
    {2 blue}                   {3 driver}   {{} {}   3 driver}

    Full Outer Join

    {0 foo}                   {0 bagel}    {0 foo   0 bagel}
    {1 snarf} full outer join {1 snatz}  = {1 snarf 1 snatz}
    {2 blue}                  {3 driver}   {2 blue  {} {}}
                                           {{} {}   3 driver}

# <a name='section5'></a>REFERENCES

  1. J\. W\. Hunt and M\. D\. McIlroy, "An algorithm for differential file
     comparison," Comp\. Sci\. Tech\. Rep\. \#41, Bell Telephone Laboratories \(1976\)\.
     Available on the Web at the second author's personal site:
     [http://www\.cs\.dartmouth\.edu/~doug/](http://www\.cs\.dartmouth\.edu/~doug/)

  1. Donald E\. Knuth, "Fascicle 2b of 'The Art of Computer Programming' volume
     4"\. Available on the Web at the author's personal site:
     [http://www\-cs\-faculty\.stanford\.edu/~knuth/fasc2b\.ps\.gz](http://www\-cs\-faculty\.stanford\.edu/~knuth/fasc2b\.ps\.gz)\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: list* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Fisher\-Yates](\.\./\.\./\.\./\.\./index\.md\#fisher\_yates),
[assign](\.\./\.\./\.\./\.\./index\.md\#assign),
[common](\.\./\.\./\.\./\.\./index\.md\#common),
[comparison](\.\./\.\./\.\./\.\./index\.md\#comparison),
[diff](\.\./\.\./\.\./\.\./index\.md\#diff),
[differential](\.\./\.\./\.\./\.\./index\.md\#differential),
[equal](\.\./\.\./\.\./\.\./index\.md\#equal),
[equality](\.\./\.\./\.\./\.\./index\.md\#equality),
[filter](\.\./\.\./\.\./\.\./index\.md\#filter), [first
permutation](\.\./\.\./\.\./\.\./index\.md\#first\_permutation),
[flatten](\.\./\.\./\.\./\.\./index\.md\#flatten),
[folding](\.\./\.\./\.\./\.\./index\.md\#folding), [full outer
join](\.\./\.\./\.\./\.\./index\.md\#full\_outer\_join), [generate
permutations](\.\./\.\./\.\./\.\./index\.md\#generate\_permutations), [inner
join](\.\./\.\./\.\./\.\./index\.md\#inner\_join),
[join](\.\./\.\./\.\./\.\./index\.md\#join), [left outer
join](\.\./\.\./\.\./\.\./index\.md\#left\_outer\_join),
[list](\.\./\.\./\.\./\.\./index\.md\#list), [longest common
subsequence](\.\./\.\./\.\./\.\./index\.md\#longest\_common\_subsequence),
[map](\.\./\.\./\.\./\.\./index\.md\#map), [next
permutation](\.\./\.\./\.\./\.\./index\.md\#next\_permutation), [outer
join](\.\./\.\./\.\./\.\./index\.md\#outer\_join),
[permutation](\.\./\.\./\.\./\.\./index\.md\#permutation),
[reduce](\.\./\.\./\.\./\.\./index\.md\#reduce),
[repeating](\.\./\.\./\.\./\.\./index\.md\#repeating),
[repetition](\.\./\.\./\.\./\.\./index\.md\#repetition),
[reshuffle](\.\./\.\./\.\./\.\./index\.md\#reshuffle),
[reverse](\.\./\.\./\.\./\.\./index\.md\#reverse), [right outer
join](\.\./\.\./\.\./\.\./index\.md\#right\_outer\_join),
[shuffle](\.\./\.\./\.\./\.\./index\.md\#shuffle),
[subsequence](\.\./\.\./\.\./\.\./index\.md\#subsequence),
[swapping](\.\./\.\./\.\./\.\./index\.md\#swapping)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2003\-2005 by Kevin B\. Kenny\. All rights reserved  
Copyright &copy; 2003\-2012 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/struct_map.md.

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
89
90
91
92
93
94
95
96
97
98

[//000000001]: # (struct::map \- )
[//000000002]: # (Generated from file 'struct\_map\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (struct::map\(n\) 1 tcllib "")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::map \- Manage key/value maps

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

# <a name='synopsis'></a>SYNOPSIS

package require struct::map ?1?  

[__::struct::map__ *mapName*](#1)  
[__mapName__ __method__ ?*arg arg \.\.\.*?](#2)  
[*mapName* __get__](#3)  
[*mapName* __names__](#4)  
[*mapName* __set__ *name* ?*value*?](#5)  
[*mapName* __unset__ ?*pattern*\.\.\.?](#6)  

# <a name='description'></a>DESCRIPTION

Provides a snit class whose instances manage a key/value map\. In other words, an
object wrapper around Tcl arrays\.

# <a name='section2'></a>API

The main command provides construction of maps:

  - <a name='1'></a>__::struct::map__ *mapName*

    Creates a new, empty map with an associated global Tcl command whose name is
    *mapName*\. It may be used to invoke various operations on the map\. It has
    the following general form:

      * <a name='2'></a>__mapName__ __method__ ?*arg arg \.\.\.*?

        __method__ and *arg*uments determine the exact behavior of the
        command\.

    If *mapName* is specified as __%AUTO%__ a unique name will be
    generated by the package itself\. The result of the command is the
    fully\-qualified name of the instance command\.

The following commands are possible for map objects:

  - <a name='3'></a>*mapName* __get__

    Returns the entire map as a Tcl dictionary\.

  - <a name='4'></a>*mapName* __names__

    Returns the list of all keys known to the map, in arbitrary order\.

  - <a name='5'></a>*mapName* __set__ *name* ?*value*?

    Sets key *name* to the specified *value*, if the value specified\.
    Returns the value for the key\. Throws an error if the key is not known\.

  - <a name='6'></a>*mapName* __unset__ ?*pattern*\.\.\.?

    Removes all keys matching at least one of the glob *pattern*s from the
    map\. If no pattern is specified all keys are removed\. In other words, the
    default pattern is __\*__\. The result of the command is the empty string\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: list* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































Deleted embedded/md/tcllib/files/modules/struct/struct_set.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189

[//000000001]: # (struct::set \- Tcl Data Structures)
[//000000002]: # (Generated from file 'struct\_set\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (struct::set\(n\) 2\.2\.3 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::set \- Procedures for manipulating sets

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [REFERENCES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.0  
package require struct::set ?2\.2\.3?  

[__::struct::set__ __empty__ *set*](#1)  
[__::struct::set__ __size__ *set*](#2)  
[__::struct::set__ __contains__ *set* *item*](#3)  
[__::struct::set__ __union__ ?*set1*\.\.\.?](#4)  
[__::struct::set__ __intersect__ ?*set1*\.\.\.?](#5)  
[__::struct::set__ __difference__ *set1* *set2*](#6)  
[__::struct::set__ __symdiff__ *set1* *set2*](#7)  
[__::struct::set__ __intersect3__ *set1* *set2*](#8)  
[__::struct::set__ __equal__ *set1* *set2*](#9)  
[__::struct::set__ __include__ *svar* *item*](#10)  
[__::struct::set__ __exclude__ *svar* *item*](#11)  
[__::struct::set__ __add__ *svar* *set*](#12)  
[__::struct::set__ __subtract__ *svar* *set*](#13)  
[__::struct::set__ __subsetof__ *A* *B*](#14)  

# <a name='description'></a>DESCRIPTION

The __::struct::set__ namespace contains several useful commands for
processing finite sets\.

It exports only a single command, __struct::set__\. All functionality
provided here can be reached through a subcommand of this command\.

*Note:* As of version 2\.2 of this package a critcl based C implementation is
available\. This implementation however requires Tcl 8\.4 to run\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::struct::set__ __empty__ *set*

    Returns a boolean value indicating if the *set* is empty \(__true__\),
    or not \(__false__\)\.

  - <a name='2'></a>__::struct::set__ __size__ *set*

    Returns an integer number greater than or equal to zero\. This is the number
    of elements in the *set*\. In other words, its cardinality\.

  - <a name='3'></a>__::struct::set__ __contains__ *set* *item*

    Returns a boolean value indicating if the *set* contains the element
    *item* \(__true__\), or not \(__false__\)\.

  - <a name='4'></a>__::struct::set__ __union__ ?*set1*\.\.\.?

    Computes the set containing the union of *set1*, *set2*, etc\., i\.e\.
    "*set1* \+ *set2* \+ \.\.\.", and returns this set as the result of the
    command\.

  - <a name='5'></a>__::struct::set__ __intersect__ ?*set1*\.\.\.?

    Computes the set containing the intersection of *set1*, *set2*, etc\.,
    i\.e\. "*set1* \* *set2* \* \.\.\.", and returns this set as the result of the
    command\.

  - <a name='6'></a>__::struct::set__ __difference__ *set1* *set2*

    Computes the set containing the difference of *set1* and *set2*, i\.e\.
    \("*set1* \- *set2*"\) and returns this set as the result of the command\.

  - <a name='7'></a>__::struct::set__ __symdiff__ *set1* *set2*

    Computes the set containing the symmetric difference of *set1* and
    *set2*, i\.e\. \("\(*set1* \- *set2*\) \+ \(*set2* \- *set1*\)"\) and returns
    this set as the result of the command\.

  - <a name='8'></a>__::struct::set__ __intersect3__ *set1* *set2*

    This command is a combination of the methods __intersect__ and
    __difference__\. It returns a three\-element list containing
    "*set1*\**set2*", "*set1*\-*set2*", and "*set2*\-*set1*", in this
    order\. In other words, the intersection of the two parameter sets, and their
    differences\.

  - <a name='9'></a>__::struct::set__ __equal__ *set1* *set2*

    Returns a boolean value indicating if the two sets are equal \(__true__\)
    or not \(__false__\)\.

  - <a name='10'></a>__::struct::set__ __include__ *svar* *item*

    The element *item* is added to the set specified by the variable name in
    *svar*\. The return value of the command is empty\. This is the equivalent
    of __lappend__ for sets\. If the variable named by *svar* does not
    exist it will be created\.

  - <a name='11'></a>__::struct::set__ __exclude__ *svar* *item*

    The element *item* is removed from the set specified by the variable name
    in *svar*\. The return value of the command is empty\. This is a
    near\-equivalent of __lreplace__ for sets\.

  - <a name='12'></a>__::struct::set__ __add__ *svar* *set*

    All the element of *set* are added to the set specified by the variable
    name in *svar*\. The return value of the command is empty\. This is like the
    method __include__, but for the addition of a whole set\. If the variable
    named by *svar* does not exist it will be created\.

  - <a name='13'></a>__::struct::set__ __subtract__ *svar* *set*

    All the element of *set* are removed from the set specified by the
    variable name in *svar*\. The return value of the command is empty\. This is
    like the method __exclude__, but for the removal of a whole set\.

  - <a name='14'></a>__::struct::set__ __subsetof__ *A* *B*

    Returns a boolean value indicating if the set *A* is a true subset of or
    equal to the set *B* \(__true__\), or not \(__false__\)\.

# <a name='section3'></a>REFERENCES

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: set* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[cardinality](\.\./\.\./\.\./\.\./index\.md\#cardinality),
[difference](\.\./\.\./\.\./\.\./index\.md\#difference),
[emptiness](\.\./\.\./\.\./\.\./index\.md\#emptiness),
[exclusion](\.\./\.\./\.\./\.\./index\.md\#exclusion),
[inclusion](\.\./\.\./\.\./\.\./index\.md\#inclusion),
[intersection](\.\./\.\./\.\./\.\./index\.md\#intersection),
[membership](\.\./\.\./\.\./\.\./index\.md\#membership),
[set](\.\./\.\./\.\./\.\./index\.md\#set), [symmetric
difference](\.\./\.\./\.\./\.\./index\.md\#symmetric\_difference),
[union](\.\./\.\./\.\./\.\./index\.md\#union)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/struct_tree.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713

[//000000001]: # (struct::tree \- Tcl Data Structures)
[//000000002]: # (Generated from file 'struct\_tree\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002\-2004,2012 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (struct::tree\(n\) 2\.1\.1 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::tree \- Create and manipulate tree objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Tree CLASS API](#subsection1)

      - [Tree OBJECT API](#subsection2)

      - [Changes for 2\.0](#subsection3)

  - [EXAMPLES](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require struct::tree ?2\.1\.1?  
package require struct::list ?1\.5?  

[__::struct::tree__ ?*treeName*? ?__=__&#124;__:=__&#124;__as__&#124;__deserialize__ *source*?](#1)  
[__treeName__ __option__ ?*arg arg \.\.\.*?](#2)  
[__::struct::tree::prune__](#3)  
[*treeName* __=__ *sourcetree*](#4)  
[*treeName* __\-\->__ *desttree*](#5)  
[*treeName* __ancestors__ *node*](#6)  
[*treeName* __append__ *node* *key* *value*](#7)  
[*treeName* __attr__ *key*](#8)  
[*treeName* __attr__ *key* __\-nodes__ *list*](#9)  
[*treeName* __attr__ *key* __\-glob__ *globpattern*](#10)  
[*treeName* __attr__ *key* __\-regexp__ *repattern*](#11)  
[*treeName* __children__ ?__\-all__? *node* ?__filter__ *cmdprefix*?](#12)  
[*treeName* __cut__ *node*](#13)  
[*treeName* __delete__ *node* ?*node* \.\.\.?](#14)  
[*treeName* __depth__ *node*](#15)  
[*treeName* __descendants__ *node* ?__filter__ *cmdprefix*?](#16)  
[*treeName* __deserialize__ *serialization*](#17)  
[*treeName* __destroy__](#18)  
[*treeName* __exists__ *node*](#19)  
[*treeName* __get__ *node* *key*](#20)  
[*treeName* __getall__ *node* ?*pattern*?](#21)  
[*treeName* __keys__ *node* ?*pattern*?](#22)  
[*treeName* __keyexists__ *node* *key*](#23)  
[*treeName* __index__ *node*](#24)  
[*treeName* __insert__ *parent* *index* ?*child* ?*child* \.\.\.??](#25)  
[*treeName* __isleaf__ *node*](#26)  
[*treeName* __lappend__ *node* *key* *value*](#27)  
[*treeName* __leaves__](#28)  
[*treeName* __move__ *parent* *index* *node* ?*node* \.\.\.?](#29)  
[*treeName* __next__ *node*](#30)  
[*treeName* __numchildren__ *node*](#31)  
[*treeName* __nodes__](#32)  
[*treeName* __parent__ *node*](#33)  
[*treeName* __previous__ *node*](#34)  
[*treeName* __rename__ *node* *newname*](#35)  
[*treeName* __rootname__](#36)  
[*treeName* __serialize__ ?*node*?](#37)  
[*treeName* __set__ *node* *key* ?*value*?](#38)  
[*treeName* __size__ ?*node*?](#39)  
[*treeName* __splice__ *parent* *from* ?*to*? ?*child*?](#40)  
[*treeName* __swap__ *node1* *node2*](#41)  
[*treeName* __unset__ *node* *key*](#42)  
[*treeName* __walk__ *node* ?__\-order__ *order*? ?__\-type__ *type*? *loopvar* *script*](#43)  
[*treeName* __walkproc__ *node* ?__\-order__ *order*? ?__\-type__ *type*? *cmdprefix*](#44)  

# <a name='description'></a>DESCRIPTION

A tree is a collection of named elements, called nodes, one of which is
distinguished as a root, along with a relation \("parenthood"\) that places a
hierarchical structure on the nodes\. \(Data Structures and Algorithms; Aho,
Hopcroft and Ullman; Addison\-Wesley, 1987\)\. In addition to maintaining the node
relationships, this tree implementation allows any number of keyed values to be
associated with each node\.

The element names can be arbitrary strings\.

A tree is thus similar to an array, but with three important differences:

  1. Trees are accessed through an object command, whereas arrays are accessed
     as variables\. \(This means trees cannot be local to a procedure\.\)

  1. Trees have a hierarchical structure, whereas an array is just an unordered
     collection\.

  1. Each node of a tree has a separate collection of attributes and values\.
     This is like an array where every value is a dictionary\.

*Note:* The major version of the package
__[struct](\.\./\.\./\.\./\.\./index\.md\#struct)__ has been changed to version
2\.0, due to backward incompatible changes in the API of this module\. Please read
the section [Changes for 2\.0](#subsection3) for a full list of all changes,
incompatible and otherwise\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Tree CLASS API

The main commands of the package are:

  - <a name='1'></a>__::struct::tree__ ?*treeName*? ?__=__&#124;__:=__&#124;__as__&#124;__deserialize__ *source*?

    The command creates a new tree object with an associated global Tcl command
    whose name is *treeName*\. This command may be used to invoke various
    operations on the tree\. It has the following general form:

      * <a name='2'></a>__treeName__ __option__ ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.

    If *treeName* is not specified a unique name will be generated by the
    package itself\. If a *source* is specified the new tree will be
    initialized to it\. For the operators __=__, __:=__, and __as__
    *source* is interpreted as the name of another tree object, and the
    assignment operator __=__ will be executed\. For __deserialize__ the
    *source* is a serialized tree object and __deserialize__ will be
    executed\.

    In other words

        ::struct::tree mytree = b

    is equivalent to

        ::struct::tree mytree
        mytree = b

    and

        ::struct::tree mytree deserialize $b

    is equivalent to

        ::struct::tree mytree
        mytree deserialize $b

  - <a name='3'></a>__::struct::tree::prune__

    This command is provided outside of the tree methods, as it is not a tree
    method per se\. It however interacts tightly with the method __walk__\.
    When used in the walk script it causes the traversal to ignore the children
    of the node we are currently at\. This command cannot be used with the
    traversal modes which look at children before their parent, i\.e\.
    __post__ and __in__\. The only applicable orders of traversal are
    __pre__ and __both__\. An error is thrown if the command and chosen
    order of traversal do not fit\.

## <a name='subsection2'></a>Tree OBJECT API

Two general observations beforehand:

  1. The root node of the tree can be used in most places where a node is asked
     for\. The default name of the rootnode is "root", but this can be changed
     with the method __rename__ \(see below\)\. Whatever the current name for
     the root node of the tree is, it can be retrieved by calling the method
     __rootname__\.

  1. The method __insert__ is the only way to create new nodes, and they are
     automatically added to a parent\. A tree object cannot have nodes without a
     parent, save the root node\.

And now the methods supported by tree objects created by this package:

  - <a name='4'></a>*treeName* __=__ *sourcetree*

    This is the assignment operator for tree objects\. It copies the tree
    contained in the tree object *sourcetree* over the tree data in
    *treeName*\. The old contents of *treeName* are deleted by this
    operation\.

    This operation is in effect equivalent to

    > *treeName* __deserialize__ \[*sourcetree* __serialize__\]

  - <a name='5'></a>*treeName* __\-\->__ *desttree*

    This is the reverse assignment operator for tree objects\. It copies the tree
    contained in the tree object *treeName* over the tree data in the object
    *desttree*\. The old contents of *desttree* are deleted by this
    operation\.

    This operation is in effect equivalent to

    > *desttree* __deserialize__ \[*treeName* __serialize__\]

  - <a name='6'></a>*treeName* __ancestors__ *node*

    This method extends the method __parent__ and returns a list containing
    all ancestor nodes to the specified *node*\. The immediate ancestor, in
    other words, parent node, is the first element in that list, its parent the
    second element, and so on until the root node is reached, making it the last
    element of the returned list\.

  - <a name='7'></a>*treeName* __append__ *node* *key* *value*

    Appends a *value* to one of the keyed values associated with an node\.
    Returns the new value given to the attribute *key*\.

  - <a name='8'></a>*treeName* __attr__ *key*

  - <a name='9'></a>*treeName* __attr__ *key* __\-nodes__ *list*

  - <a name='10'></a>*treeName* __attr__ *key* __\-glob__ *globpattern*

  - <a name='11'></a>*treeName* __attr__ *key* __\-regexp__ *repattern*

    This method retrieves the value of the attribute named *key*, for all
    nodes in the tree \(matching the restriction specified via one of the
    possible options\) and having the specified attribute\.

    The result is a dictionary mapping from node names to the value of attribute
    *key* at that node\. Nodes not having the attribute *key*, or not passing
    a specified restriction, are not listed in the result\.

    The possible restrictions are:

      * __\-nodes__

        The value is a list of nodes\. Only the nodes mentioned in this list are
        searched for the attribute\.

      * __\-glob__

        The value is a glob pattern\. Only the nodes in the tree whose names
        match this pattern are searched for the attribute\.

      * __\-regexp__

        The value is a regular expression\. Only the nodes in the tree whose
        names match this pattern are searched for the attribute\.

  - <a name='12'></a>*treeName* __children__ ?__\-all__? *node* ?__filter__ *cmdprefix*?

    Return a list of the children of *node*\. If the option __\-all__ is
    specified, then not only the direct children, but their children, and so on
    are returned in the result\. If a filter command is specified only those
    nodes are listed in the final result which pass the test\. The command in
    *cmdprefix* is called with two arguments, the name of the tree object, and
    the name of the node in question\. It is executed in the context of the
    caller and has to return a boolean value\. Nodes for which the command
    returns __false__ are removed from the result list before it is returned
    to the caller\.

    Some examples:

            mytree insert root end 0 ; mytree set 0 volume 30
            mytree insert root end 1
            mytree insert root end 2
            mytree insert 0    end 3
            mytree insert 0    end 4
            mytree insert 4    end 5 ; mytree set 5 volume 50
            mytree insert 4    end 6

            proc vol {t n} {
        	$t keyexists $n volume
            }
            proc vgt40 {t n} {
        	if {![$t keyexists $n volume]} {return 0}
        	expr {[$t get $n volume] > 40}
            }

            tclsh> lsort [mytree children -all root filter vol]
            0 5

            tclsh> lsort [mytree children -all root filter vgt40]
            5

            tclsh> lsort [mytree children root filter vol]
            0

            tclsh> puts ([lsort [mytree children root filter vgt40]])
            ()

  - <a name='13'></a>*treeName* __cut__ *node*

    Removes the node specified by *node* from the tree, but not its children\.
    The children of *node* are made children of the parent of the *node*, at
    the index at which *node* was located\.

  - <a name='14'></a>*treeName* __delete__ *node* ?*node* \.\.\.?

    Removes the specified nodes from the tree\. All of the nodes' children will
    be removed as well to prevent orphaned nodes\.

  - <a name='15'></a>*treeName* __depth__ *node*

    Return the number of steps from node *node* to the root node\.

  - <a name='16'></a>*treeName* __descendants__ *node* ?__filter__ *cmdprefix*?

    This method extends the method __children__ and returns a list
    containing all nodes descending from *node*, and passing the filter, if
    such was specified\.

    This is actually the same as "*treeName* __children__ __\-all__"\.
    __descendants__ should be prefered, and "children \-all" will be
    deprecated sometime in the future\.

  - <a name='17'></a>*treeName* __deserialize__ *serialization*

    This is the complement to __serialize__\. It replaces tree data in
    *treeName* with the tree described by the *serialization* value\. The old
    contents of *treeName* are deleted by this operation\.

  - <a name='18'></a>*treeName* __destroy__

    Destroy the tree, including its storage space and associated command\.

  - <a name='19'></a>*treeName* __exists__ *node*

    Returns true if the specified node exists in the tree\.

  - <a name='20'></a>*treeName* __get__ *node* *key*

    Returns the value associated with the key *key* for the node *node*\.

  - <a name='21'></a>*treeName* __getall__ *node* ?*pattern*?

    Returns a dictionary \(suitable for use with \[__array set__\]\) containing
    the attribute data for the *node*\. If the glob *pattern* is specified
    only the attributes whose names match the pattern will be part of the
    dictionary\.

  - <a name='22'></a>*treeName* __keys__ *node* ?*pattern*?

    Returns a list of keys for the *node*\. If the *pattern* is specified
    only the attributes whose names match the pattern will be part of the
    returned list\. The pattern is a __glob__ pattern\.

  - <a name='23'></a>*treeName* __keyexists__ *node* *key*

    Return true if the specified *key* exists for the *node*\.

  - <a name='24'></a>*treeName* __index__ *node*

    Returns the index of *node* in its parent's list of children\. For example,
    if a node has *nodeFoo*, *nodeBar*, and *nodeBaz* as children, in that
    order, the index of *nodeBar* is 1\.

  - <a name='25'></a>*treeName* __insert__ *parent* *index* ?*child* ?*child* \.\.\.??

    Insert one or more nodes into the tree as children of the node *parent*\.
    The nodes will be added in the order they are given\. If *parent* is
    __root__, it refers to the root of the tree\. The new nodes will be added
    to the *parent* node's child list at the index given by *index*\. The
    *index* can be __end__ in which case the new nodes will be added after
    the current last child\. Indices of the form "end\-__n__" are accepted as
    well\.

    If any of the specified children already exist in *treeName*, those nodes
    will be moved from their original location to the new location indicated by
    this command\.

    If no *child* is specified, a single node will be added, and a name will
    be generated for the new node\. The generated name is of the form
    *node*__x__, where __x__ is a number\. If names are specified they
    must neither contain whitespace nor colons \(":"\)\.

    The return result from this command is a list of nodes added\.

  - <a name='26'></a>*treeName* __isleaf__ *node*

    Returns true if *node* is a leaf of the tree \(if *node* has no
    children\), false otherwise\.

  - <a name='27'></a>*treeName* __lappend__ *node* *key* *value*

    Appends a *value* \(as a list\) to one of the keyed values associated with
    an *node*\. Returns the new value given to the attribute *key*\.

  - <a name='28'></a>*treeName* __leaves__

    Return a list containing all leaf nodes known to the tree\.

  - <a name='29'></a>*treeName* __move__ *parent* *index* *node* ?*node* \.\.\.?

    Make the specified nodes children of *parent*, inserting them into the
    parent's child list at the index given by *index*\. Note that the command
    will take all nodes out of the tree before inserting them under the new
    parent, and that it determines the position to place them into after the
    removal, before the re\-insertion\. This behaviour is important when it comes
    to moving one or more nodes to a different index without changing their
    parent node\.

  - <a name='30'></a>*treeName* __next__ *node*

    Return the right sibling of *node*, or the empty string if *node* was
    the last child of its parent\.

  - <a name='31'></a>*treeName* __numchildren__ *node*

    Return the number of immediate children of *node*\.

  - <a name='32'></a>*treeName* __nodes__

    Return a list containing all nodes known to the tree\.

  - <a name='33'></a>*treeName* __parent__ *node*

    Return the parent of *node*\.

  - <a name='34'></a>*treeName* __previous__ *node*

    Return the left sibling of *node*, or the empty string if *node* was the
    first child of its parent\.

  - <a name='35'></a>*treeName* __rename__ *node* *newname*

    Renames the node *node* to *newname*\. An error is thrown if either the
    node does not exist, or a node with name *newname* does exist\. The result
    of the command is the new name of the node\.

  - <a name='36'></a>*treeName* __rootname__

    Returns the name of the root node of the tree\.

  - <a name='37'></a>*treeName* __serialize__ ?*node*?

    This method serializes the sub\-tree starting at *node*\. In other words it
    returns a tcl *value* completely describing the tree starting at *node*\.
    This allows, for example, the transfer of tree objects \(or parts thereof\)
    over arbitrary channels, persistence, etc\. This method is also the basis for
    both the copy constructor and the assignment operator\.

    The result of this method has to be semantically identical over all
    implementations of the tree interface\. This is what will enable us to copy
    tree data between different implementations of the same interface\.

    The result is a list containing containing a multiple of three elements\. It
    is like a serialized array except that there are two values following each
    key\. They are the names of the nodes in the serialized tree\. The two values
    are a reference to the parent node and the attribute data, in this order\.

    The reference to the parent node is the empty string for the root node of
    the tree\. For all other nodes it is the index of the parent node in the
    list\. This means that they are integers, greater than or equal to zero, less
    than the length of the list, and multiples of three\. The order of the nodes
    in the list is important insofar as it is used to reconstruct the lists of
    children for each node\. The children of a node have to be listed in the
    serialization in the same order as they are listed in their parent in the
    tree\.

    The attribute data of a node is a dictionary, i\.e\. a list of even length
    containing a serialized array\. For a node without attribute data the
    dictionary is the empty list\.

    *Note:* While the current implementation returns the root node as the
    first element of the list, followed by its children and their children in a
    depth\-first traversal this is not necessarily true for other
    implementations\. The only information a reader of the serialized data can
    rely on for the structure of the tree is that the root node is signaled by
    the empty string for the parent reference, that all other nodes refer to
    their parent through the index in the list, and that children occur in the
    same order as in their parent\.

        A possible serialization for the tree structure

                    +- d
              +- a -+
        root -+- b  +- e
              +- c
        is

        {root {} {} a 0 {} d 3 {} e 3 {} b 0 {} c 0 {}}

        The above assumes that none of the nodes have attributes.

  - <a name='38'></a>*treeName* __set__ *node* *key* ?*value*?

    Set or get one of the keyed values associated with a node\. A node may have
    any number of keyed values associated with it\. If *value* is not
    specified, this command returns the current value assigned to the key; if
    *value* is specified, this command assigns that value to the key, and
    returns it\.

  - <a name='39'></a>*treeName* __size__ ?*node*?

    Return a count of the number of descendants of the node *node*; if no node
    is specified, __root__ is assumed\.

  - <a name='40'></a>*treeName* __splice__ *parent* *from* ?*to*? ?*child*?

    Insert a node named *child* into the tree as a child of the node
    *parent*\. If *parent* is __root__, it refers to the root of the
    tree\. The new node will be added to the parent node's child list at the
    index given by *from*\. The children of *parent* which are in the range
    of the indices *from* and *to* are made children of *child*\. If the
    value of *to* is not specified it defaults to __end__\. If no name is
    given for *child*, a name will be generated for the new node\. The
    generated name is of the form *node*__x__, where __x__ is a
    number\. The return result from this command is the name of the new node\.

    The arguments *from* and *to* are regular list indices, i\.e\. the form
    "end\-__n__" is accepted as well\.

  - <a name='41'></a>*treeName* __swap__ *node1* *node2*

    Swap the position of *node1* and *node2* in the tree\.

  - <a name='42'></a>*treeName* __unset__ *node* *key*

    Removes a keyed value from the node *node*\. The method will do nothing if
    the *key* does not exist\.

  - <a name='43'></a>*treeName* __walk__ *node* ?__\-order__ *order*? ?__\-type__ *type*? *loopvar* *script*

    Perform a breadth\-first or depth\-first walk of the tree starting at the node
    *node*\. The type of walk, breadth\-first or depth\-first, is determined by
    the value of *type*; __bfs__ indicates breadth\-first, __dfs__
    indicates depth\-first\. Depth\-first is the default\. The order of the walk,
    pre\-, post\-, both\- or in\-order is determined by the value of *order*;
    __pre__ indicates pre\-order, __post__ indicates post\-order,
    __both__ indicates both\-order and __in__ indicates in\-order\.
    Pre\-order is the default\.

    Pre\-order walking means that a parent node is visited before any of its
    children\. For example, a breadth\-first search starting from the root will
    visit the root, followed by all of the root's children, followed by all of
    the root's grandchildren\. Post\-order walking means that a parent node is
    visited after any of its children\. Both\-order walking means that a parent
    node is visited before *and* after any of its children\. In\-order walking
    means that a parent node is visited after its first child and before the
    second\. This is a generalization of in\-order walking for binary trees and
    will do the right thing if a binary tree is walked\. The combination of a
    breadth\-first walk with in\-order is illegal\.

    As the walk progresses, the *script* will be evaluated at each node\. The
    evaluation takes place in the context of the caller of the method\. Regarding
    loop variables, these are listed in *loopvar*\. If one only one variable is
    specified it will be set to the id of the node\. When two variables are
    specified, i\.e\. *loopvar* is a true list, then the first variable will be
    set to the action performed at the node, and the other to the id of the node
    itself\. All loop variables are created in the context of the caller\.

    There are three possible actions: __enter__, __leave__, or
    __visit__\. __enter__ actions occur during pre\-order walks;
    __leave__ actions occur during post\-order walks; __visit__ actions
    occur during in\-order walks\. In a both\-order walk, the command will be
    evaluated twice for each node; the action is __enter__ for the first
    evaluation, and __leave__ for the second\.

    *Note*: The __enter__ action for a node is always performed before the
    walker will look at the children of that node\. This means that changes made
    by the *script* to the children of the node will immediately influence the
    walker and the steps it will take\.

    Any other manipulation, for example of nodes higher in the tree \(i\.e already
    visited\), or upon leaving will have undefined results\. They may succeed,
    error out, silently compute the wrong result, or anything in between\.

    At last a small table showing the relationship between the various options
    and the possible actions\.

        order       type    actions         notes
        -----       ----    -----           -----
        pre         dfs     enter           parent before children
        post        dfs     leave           parent after children
        in          dfs     visit           parent between first and second child.
        both        dfs     enter, leave    parent before and after children
        -----       ----    -----           -----
        pre         bfs     enter           parent before children
        post        bfs     leave           parent after children
        in          bfs             -- illegal --
        both        bfs     enter, leave    parent before and after children
        -----       ----    -----           -----

    Note the command __::struct::tree::prune__\. This command can be used in
    the walk script to force the command to ignore the children of the node we
    are currently at\. It will throw an error if the order of traversal is either
    __post__ or __in__ as these modes visit the children before their
    parent, making pruning non\-sensical\.

  - <a name='44'></a>*treeName* __walkproc__ *node* ?__\-order__ *order*? ?__\-type__ *type*? *cmdprefix*

    This method is like method __walk__ in all essentials, except the
    interface to the user code\. This method invokes a command prefix with three
    additional arguments \(tree, node, and action\), instead of evaluating a
    script and passing the node via a loop variable\.

## <a name='subsection3'></a>Changes for 2\.0

The following noteworthy changes have occurred:

  1. The API for accessing attributes and their values has been simplified\.

     All functionality regarding the default attribute "data" has been removed\.
     This default attribute does not exist anymore\. All accesses to attributes
     have to specify the name of the attribute in question\. This backward
     *incompatible* change allowed us to simplify the signature of all methods
     handling attributes\.

     Especially the flag __\-key__ is not required anymore, even more, its
     use is now forbidden\. Please read the documentation for the methods
     __set__, __get__, __getall__, __unset__, __append__,
     __lappend__, __keyexists__ and __keys__ for a description of
     the new API's\.

  1. The methods __keys__ and __getall__ now take an optional pattern
     argument and will return only attribute data for keys matching this
     pattern\.

  1. Nodes can now be renamed\. See the documentation for the method
     __rename__\.

  1. The structure has been extended with API's for the serialization and
     deserialization of tree objects, and a number of operations based on them
     \(tree assignment, copy construction\)\.

     Please read the documentation for the methods __serialize__,
     __deserialize__, __=__, and __\-\->__, and the documentation on
     the construction of tree objects\.

     Beyond the copying of whole tree objects these new API's also enable the
     transfer of tree objects over arbitrary channels and for easy persistence\.

  1. The walker API has been streamlined and made more similar to the command
     __[foreach](\.\./\.\./\.\./\.\./index\.md\#foreach)__\. In detail:

       - The superfluous option __\-command__ has been removed\.

       - Ditto for the place holders\. Instead of the placeholders two loop
         variables have to be specified to contain node and action information\.

       - The old command argument has been documented as a script now, which it
         was in the past too\.

       - The fact that __enter__ actions are called before the walker looks
         at the children of a node has been documented now\. In other words it is
         now officially allowed to manipulate the list of children for a node
         under *these* circumstances\. It has been made clear that changes
         under any other circumstances will have undefined results, from
         silently computing the wrong result to erroring out\.

  1. A new method, __attr__, was added allowing the query and retrieval of
     attribute data without regard to the node relationship\.

  1. The method __children__ has been extended with the ability to select
     from the children of the node based on an arbitrary filtering criterium\.
     Another extension is the ability to look not only at the immediate children
     of the node, but the whole tree below it\.

# <a name='section3'></a>EXAMPLES

The following example demonstrates the creation of new nodes:

    mytree insert root end 0   ; # Create node 0, as child of the root
    mytree insert root end 1 2 ; # Ditto nodes 1 & 2
    mytree insert 0    end 3   ; # Now create node 3 as child of node 0
    mytree insert 0    end     ; # Create another child of 0, with a
    #                              generated name. The name is returned
    #                              as the result of the command.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: tree* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[breadth\-first](\.\./\.\./\.\./\.\./index\.md\#breadth\_first),
[depth\-first](\.\./\.\./\.\./\.\./index\.md\#depth\_first),
[in\-order](\.\./\.\./\.\./\.\./index\.md\#in\_order),
[node](\.\./\.\./\.\./\.\./index\.md\#node),
[post\-order](\.\./\.\./\.\./\.\./index\.md\#post\_order),
[pre\-order](\.\./\.\./\.\./\.\./index\.md\#pre\_order),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization),
[tree](\.\./\.\./\.\./\.\./index\.md\#tree)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002\-2004,2012 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/struct/struct_tree1.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322

[//000000001]: # (struct::tree\_v1 \- Tcl Data Structures)
[//000000002]: # (Generated from file 'struct\_tree1\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2002 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (struct::tree\_v1\(n\) 1\.2\.2 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

struct::tree\_v1 \- Create and manipulate tree objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require struct::tree ?1\.2\.2?  

[__treeName__ __option__ ?*arg arg \.\.\.*?](#1)  
[*treeName* __append__ *node* ?\-key *key*? *value*](#2)  
[*treeName* __children__ *node*](#3)  
[*treeName* __cut__ *node*](#4)  
[*treeName* __delete__ *node* ?*node* \.\.\.?](#5)  
[*treeName* __depth__ *node*](#6)  
[*treeName* __destroy__](#7)  
[*treeName* __exists__ *node*](#8)  
[*treeName* __get__ *node* ?__\-key__ *key*?](#9)  
[*treeName* __getall__ *node*](#10)  
[*treeName* __keys__ *node*](#11)  
[*treeName* __keyexists__ *node* ?\-key *key*?](#12)  
[*treeName* __index__ *node*](#13)  
[*treeName* __insert__ *parent* *index* ?*child* ?*child* \.\.\.??](#14)  
[*treeName* __isleaf__ *node*](#15)  
[*treeName* __lappend__ *node* ?\-key *key*? *value*](#16)  
[*treeName* __move__ *parent* *index* *node* ?*node* \.\.\.?](#17)  
[*treeName* __next__ *node*](#18)  
[*treeName* __numchildren__ *node*](#19)  
[*treeName* __parent__ *node*](#20)  
[*treeName* __previous__ *node*](#21)  
[*treeName* __set__ *node* ?__\-key__ *key*? ?*value*?](#22)  
[*treeName* __size__ ?*node*?](#23)  
[*treeName* __splice__ *parent* *from* ?*to*? ?*child*?](#24)  
[*treeName* __swap__ *node1* *node2*](#25)  
[*treeName* __unset__ *node* ?__\-key__ *key*?](#26)  
[*treeName* __walk__ *node* ?__\-order__ *order*? ?__\-type__ *type*? __\-command__ *cmd*](#27)  

# <a name='description'></a>DESCRIPTION

The __::struct::tree__ command creates a new tree object with an associated
global Tcl command whose name is *treeName*\. This command may be used to
invoke various operations on the tree\. It has the following general form:

  - <a name='1'></a>__treeName__ __option__ ?*arg arg \.\.\.*?

    *Option* and the *arg*s determine the exact behavior of the command\.

A tree is a collection of named elements, called nodes, one of which is
distinguished as a root, along with a relation \("parenthood"\) that places a
hierarchical structure on the nodes\. \(Data Structures and Algorithms; Aho,
Hopcroft and Ullman; Addison\-Wesley, 1987\)\. In addition to maintaining the node
relationships, this tree implementation allows any number of keyed values to be
associated with each node\.

The element names can be arbitrary strings\.

A tree is thus similar to an array, but with three important differences:

  1. Trees are accessed through an object command, whereas arrays are accessed
     as variables\. \(This means trees cannot be local to a procedure\.\)

  1. Trees have a hierarchical structure, whereas an array is just an unordered
     collection\.

  1. Each node of a tree has a separate collection of attributes and values\.
     This is like an array where every value is a dictionary\.

The following commands are possible for tree objects:

  - <a name='2'></a>*treeName* __append__ *node* ?\-key *key*? *value*

    Appends a *value* to one of the keyed values associated with an node\. If
    no *key* is specified, the key __data__ is assumed\.

  - <a name='3'></a>*treeName* __children__ *node*

    Return a list of the children of *node*\.

  - <a name='4'></a>*treeName* __cut__ *node*

    Removes the node specified by *node* from the tree, but not its children\.
    The children of *node* are made children of the parent of the *node*, at
    the index at which *node* was located\.

  - <a name='5'></a>*treeName* __delete__ *node* ?*node* \.\.\.?

    Removes the specified nodes from the tree\. All of the nodes' children will
    be removed as well to prevent orphaned nodes\.

  - <a name='6'></a>*treeName* __depth__ *node*

    Return the number of steps from node *node* to the root node\.

  - <a name='7'></a>*treeName* __destroy__

    Destroy the tree, including its storage space and associated command\.

  - <a name='8'></a>*treeName* __exists__ *node*

    Returns true if the specified node exists in the tree\.

  - <a name='9'></a>*treeName* __get__ *node* ?__\-key__ *key*?

    Return the value associated with the key *key* for the node *node*\. If
    no key is specified, the key __data__ is assumed\.

  - <a name='10'></a>*treeName* __getall__ *node*

    Returns a serialized list of key/value pairs \(suitable for use with
    \[__array set__\]\) for the *node*\.

  - <a name='11'></a>*treeName* __keys__ *node*

    Returns a list of keys for the *node*\.

  - <a name='12'></a>*treeName* __keyexists__ *node* ?\-key *key*?

    Return true if the specified *key* exists for the *node*\. If no *key*
    is specified, the key __data__ is assumed\.

  - <a name='13'></a>*treeName* __index__ *node*

    Returns the index of *node* in its parent's list of children\. For example,
    if a node has *nodeFoo*, *nodeBar*, and *nodeBaz* as children, in that
    order, the index of *nodeBar* is 1\.

  - <a name='14'></a>*treeName* __insert__ *parent* *index* ?*child* ?*child* \.\.\.??

    Insert one or more nodes into the tree as children of the node *parent*\.
    The nodes will be added in the order they are given\. If *parent* is
    __root__, it refers to the root of the tree\. The new nodes will be added
    to the *parent* node's child list at the index given by *index*\. The
    *index* can be __end__ in which case the new nodes will be added after
    the current last child\.

    If any of the specified children already exist in *treeName*, those nodes
    will be moved from their original location to the new location indicated by
    this command\.

    If no *child* is specified, a single node will be added, and a name will
    be generated for the new node\. The generated name is of the form
    *node*__x__, where __x__ is a number\. If names are specified they
    must neither contain whitespace nor colons \(":"\)\.

    The return result from this command is a list of nodes added\.

  - <a name='15'></a>*treeName* __isleaf__ *node*

    Returns true if *node* is a leaf of the tree \(if *node* has no
    children\), false otherwise\.

  - <a name='16'></a>*treeName* __lappend__ *node* ?\-key *key*? *value*

    Appends a *value* \(as a list\) to one of the keyed values associated with
    an *node*\. If no *key* is specified, the key __data__ is assumed\.

  - <a name='17'></a>*treeName* __move__ *parent* *index* *node* ?*node* \.\.\.?

    Make the specified nodes children of *parent*, inserting them into the
    parent's child list at the index given by *index*\. Note that the command
    will take all nodes out of the tree before inserting them under the new
    parent, and that it determines the position to place them into after the
    removal, before the re\-insertion\. This behaviour is important when it comes
    to moving one or more nodes to a different index without changing their
    parent node\.

  - <a name='18'></a>*treeName* __next__ *node*

    Return the right sibling of *node*, or the empty string if *node* was
    the last child of its parent\.

  - <a name='19'></a>*treeName* __numchildren__ *node*

    Return the number of immediate children of *node*\.

  - <a name='20'></a>*treeName* __parent__ *node*

    Return the parent of *node*\.

  - <a name='21'></a>*treeName* __previous__ *node*

    Return the left sibling of *node*, or the empty string if *node* was the
    first child of its parent\.

  - <a name='22'></a>*treeName* __set__ *node* ?__\-key__ *key*? ?*value*?

    Set or get one of the keyed values associated with a node\. If no key is
    specified, the key __data__ is assumed\. Each node that is added to a
    tree has the value "" assigned to the key __data__ automatically\. A node
    may have any number of keyed values associated with it\. If *value* is not
    specified, this command returns the current value assigned to the key; if
    *value* is specified, this command assigns that value to the key\.

  - <a name='23'></a>*treeName* __size__ ?*node*?

    Return a count of the number of descendants of the node *node*; if no node
    is specified, __root__ is assumed\.

  - <a name='24'></a>*treeName* __splice__ *parent* *from* ?*to*? ?*child*?

    Insert a node named *child* into the tree as a child of the node
    *parent*\. If *parent* is __root__, it refers to the root of the
    tree\. The new node will be added to the parent node's child list at the
    index given by *from*\. The children of *parent* which are in the range
    of the indices *from* and *to* are made children of *child*\. If the
    value of *to* is not specified it defaults to __end__\. If no name is
    given for *child*, a name will be generated for the new node\. The
    generated name is of the form *node*__x__, where __x__ is a
    number\. The return result from this command is the name of the new node\.

  - <a name='25'></a>*treeName* __swap__ *node1* *node2*

    Swap the position of *node1* and *node2* in the tree\.

  - <a name='26'></a>*treeName* __unset__ *node* ?__\-key__ *key*?

    Removes a keyed value from the node *node*\. If no key is specified, the
    key __data__ is assumed\.

  - <a name='27'></a>*treeName* __walk__ *node* ?__\-order__ *order*? ?__\-type__ *type*? __\-command__ *cmd*

    Perform a breadth\-first or depth\-first walk of the tree starting at the node
    *node*\. The type of walk, breadth\-first or depth\-first, is determined by
    the value of *type*; __bfs__ indicates breadth\-first, __dfs__
    indicates depth\-first\. Depth\-first is the default\. The order of the walk,
    pre\-, post\-, both\- or in\-order is determined by the value of *order*;
    __pre__ indicates pre\-order, __post__ indicates post\-order,
    __both__ indicates both\-order and __in__ indicates in\-order\.
    Pre\-order is the default\.

    Pre\-order walking means that a parent node is visited before any of its
    children\. For example, a breadth\-first search starting from the root will
    visit the root, followed by all of the root's children, followed by all of
    the root's grandchildren\. Post\-order walking means that a parent node is
    visited after any of its children\. Both\-order walking means that a parent
    node is visited before *and* after any of its children\. In\-order walking
    means that a parent node is visited after its first child and before the
    second\. This is a generalization of in\-order walking for binary trees and
    will do the right thing if a binary is walked\. The combination of a
    breadth\-first walk with in\-order is illegal\.

    As the walk progresses, the command *cmd* will be evaluated at each node\.
    Percent substitution will be performed on *cmd* before evaluation, just as
    in a __[bind](\.\./\.\./\.\./\.\./index\.md\#bind)__ script\. The following
    substitutions are recognized:

      * __%%__

        Insert the literal % character\.

      * __%t__

        Name of the tree object\.

      * __%n__

        Name of the current node\.

      * __%a__

        Name of the action occurring; one of __enter__, __leave__, or
        __visit__\. __enter__ actions occur during pre\-order walks;
        __leave__ actions occur during post\-order walks; __visit__
        actions occur during in\-order walks\. In a both\-order walk, the command
        will be evaluated twice for each node; the action is __enter__ for
        the first evaluation, and __leave__ for the second\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *struct :: tree* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[tree](\.\./\.\./\.\./\.\./index\.md\#tree)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2002 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/tar/tar.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

[//000000001]: # (tar \- Tar file handling)
[//000000002]: # (Generated from file 'tar\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (tar\(n\) 0\.11 tcllib "Tar file handling")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tar \- Tar file creation, extraction & manipulation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require tar ?0\.11?  

[__::tar::contents__ *tarball* ?__\-chan__?](#1)  
[__::tar::stat__ *tarball* ?file? ?__\-chan__?](#2)  
[__::tar::untar__ *tarball* *args*](#3)  
[__::tar::get__ *tarball* *fileName* ?__\-chan__?](#4)  
[__::tar::create__ *tarball* *files* *args*](#5)  
[__::tar::add__ *tarball* *files* *args*](#6)  
[__::tar::remove__ *tarball* *files*](#7)  

# <a name='description'></a>DESCRIPTION

Note: Starting with version 0\.8 the tar reader commands \(contents, stats, get,
untar\) support the GNU LongName extension \(header type 'L'\) for large paths\.

  - <a name='1'></a>__::tar::contents__ *tarball* ?__\-chan__?

    Returns a list of the files contained in *tarball*\. The order is not
    sorted and depends on the order files were stored in the archive\.

    If the option __\-chan__ is present *tarball* is interpreted as an open
    channel\. It is assumed that the channel was opened for reading, and
    configured for binary input\. The command will *not* close the channel\.

  - <a name='2'></a>__::tar::stat__ *tarball* ?file? ?__\-chan__?

    Returns a nested dict containing information on the named ?file? in
    *tarball*, or all files if none is specified\. The top level are pairs of
    filename and info\. The info is a dict with the keys "__mode__
    __uid__ __gid__ __size__ __mtime__ __type__
    __linkname__ __uname__ __gname__ __devmajor__
    __devminor__"

        % ::tar::stat tarball.tar
        foo.jpg {mode 0644 uid 1000 gid 0 size 7580 mtime 811903867 type file linkname {} uname user gname wheel devmajor 0 devminor 0}

    If the option __\-chan__ is present *tarball* is interpreted as an open
    channel\. It is assumed that the channel was opened for reading, and
    configured for binary input\. The command will *not* close the channel\.

  - <a name='3'></a>__::tar::untar__ *tarball* *args*

    Extracts *tarball*\. *\-file* and *\-glob* limit the extraction to files
    which exactly match or pattern match the given argument\. No error is thrown
    if no files match\. Returns a list of filenames extracted and the file size\.
    The size will be null for non regular files\. Leading path seperators are
    stripped so paths will always be relative\.

      * __\-dir__ dirName

        Directory to extract to\. Uses __pwd__ if none is specified

      * __\-file__ fileName

        Only extract the file with this name\. The name is matched against the
        complete path stored in the archive including directories\.

      * __\-glob__ pattern

        Only extract files patching this glob style pattern\. The pattern is
        matched against the complete path stored in the archive\.

      * __\-nooverwrite__

        Dont overwrite files that already exist

      * __\-nomtime__

        Leave the file modification time as the current time instead of setting
        it to the value in the archive\.

      * __\-noperms__

        In Unix, leave the file permissions as the current umask instead of
        setting them to the values in the archive\.

      * __\-chan__

        If this option is present *tarball* is interpreted as an open channel\.
        It is assumed that the channel was opened for reading, and configured
        for binary input\. The command will *not* close the channel\.

        % foreach {file size} [::tar::untar tarball.tar -glob *.jpg] {
        puts "Extracted $file ($size bytes)"
        }

  - <a name='4'></a>__::tar::get__ *tarball* *fileName* ?__\-chan__?

    Returns the contents of *fileName* from the *tarball*\.

        % set readme [::tar::get tarball.tar doc/README] {
        % puts $readme
        }

    If the option __\-chan__ is present *tarball* is interpreted as an open
    channel\. It is assumed that the channel was opened for reading, and
    configured for binary input\. The command will *not* close the channel\.

    An error is thrown when *fileName* is not found in the tar archive\.

  - <a name='5'></a>__::tar::create__ *tarball* *files* *args*

    Creates a new tar file containing the *files*\. *files* must be specified
    as a single argument which is a proper list of filenames\.

      * __\-dereference__

        Normally __create__ will store links as an actual link pointing at a
        file that may or may not exist in the archive\. Specifying this option
        will cause the actual file point to by the link to be stored instead\.

      * __\-chan__

        If this option is present *tarball* is interpreted as an open channel\.
        It is assumed that the channel was opened for writing, and configured
        for binary output\. The command will *not* close the channel\.

        % ::tar::create new.tar [glob -nocomplain file*]
        % ::tar::contents new.tar
        file1 file2 file3

  - <a name='6'></a>__::tar::add__ *tarball* *files* *args*

    Appends *files* to the end of the existing *tarball*\. *files* must be
    specified as a single argument which is a proper list of filenames\.

      * __\-dereference__

        Normally __add__ will store links as an actual link pointing at a
        file that may or may not exist in the archive\. Specifying this option
        will cause the actual file point to by the link to be stored instead\.

      * __\-prefix__ string

        Normally __add__ will store files under exactly the name specified
        as argument\. Specifying a ?\-prefix? causes the *string* to be
        prepended to every name\.

      * __\-quick__

        The only sure way to find the position in the *tarball* where new
        files can be added is to read it from start, but if *tarball* was
        written with a "blocksize" of 1 \(as this package does\) then one can
        alternatively find this position by seeking from the end\. The ?\-quick?
        option tells __add__ to do the latter\.

  - <a name='7'></a>__::tar::remove__ *tarball* *files*

    Removes *files* from the *tarball*\. No error will result if the file
    does not exist in the tarball\. Directory write permission and free disk
    space equivalent to at least the size of the tarball will be needed\.

        % ::tar::remove new.tar {file2 file3}
        % ::tar::contents new.tar
        file3

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *tar* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[archive](\.\./\.\./\.\./\.\./index\.md\#archive), [tape
archive](\.\./\.\./\.\./\.\./index\.md\#tape\_archive),
[tar](\.\./\.\./\.\./\.\./index\.md\#tar)

# <a name='category'></a>CATEGORY

File formats
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/tepam/tepam_argument_dialogbox.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910

[//000000001]: # (tepam::argument\_dialogbox \- Tcl's Enhanced Procedure and Argument Manager)
[//000000002]: # (Generated from file 'tepam\_argument\_dialogbox\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2013, Andreas Drollinger)
[//000000004]: # (tepam::argument\_dialogbox\(n\) 0\.5\.0 tcllib "Tcl's Enhanced Procedure and Argument Manager")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tepam::argument\_dialogbox \- TEPAM argument\_dialogbox, reference manual

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [ARGUMENT DIALOGBOX CALL](#section2)

      - [Context Definition Items](#subsection1)

      - [Formatting and Display Options](#subsection2)

      - [Global Custom Data Validation](#subsection3)

      - [Data Entry Widget Items](#subsection4)

      - [Entry Widget Item Attributes](#subsection5)

  - [APPLICATION SPECIFIC ENTRY WIDGETS](#section3)

  - [VARIABLES](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require Tk 8\.3  
package require tepam ?0\.5?  

[__tepam::argument\_dialogbox__ *item\_name item\_attributes ?item\_name item\_attributes? ?\.\.\.?*](#1)  
[__tepam::argument\_dialogbox__ \{*item\_name item\_attributes ?item\_name item\_attributes? ?\.\.\.?*\}](#2)  

# <a name='description'></a>DESCRIPTION

# <a name='section2'></a>ARGUMENT DIALOGBOX CALL

The TEPAM __argument\_dialogbox__ is a flexible and easily usable data entry
form generator that is available if Tk has been loaded\. Each data entry element
of a form is defined via a *data entry item* that can be provided to
__argument\_dialogbox__ in two formats:

  - <a name='1'></a>__tepam::argument\_dialogbox__ *item\_name item\_attributes ?item\_name item\_attributes? ?\.\.\.?*

    Using this first format, each *data entry item* is defined via a pair of
    two arguments\. The first one is the *item name* that defines the entry
    widget that has to be used in the form\. The second argument, called *item
    attributes*, specifies the variable which is attributed to the data entry
    element as well as eventual formatting and context information\.

    The __argument\_dialogbox__ returns __ok__ if the entered data have
    been acknowledged \(via the *OK* button\) and validated by a data checker\.
    If the entered data have been rejected \(via the *Cancel* button\) the
    __argument\_dialogbox__ returns __cancel__\.

    A small example illustrates how the __argument\_dialogbox__ can be
    employed:

    > set DialogResult \[__tepam::argument\_dialogbox__ \\  
    > &nbsp;&nbsp;&nbsp;__\-title__ "Itinerary selection" \\  
    > &nbsp;&nbsp;&nbsp;__\-file__ \{*\-label "Itinerary report" \-variable report\_file*\} \\  
    > &nbsp;&nbsp;&nbsp;__\-frame__ \{*\-label "Itinerary start"*\} \\  
    > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-comment__ \{*\-text "Specify your itinerary start location"*\} \\  
    > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-entry__ \{*\-label "City" \-variable start\_city \-type string*\} \\  
    > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-entry__ \{*\-label "Street" \-variable start\_street \-type string \-optional 1*\} \\  
    > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-entry__ \{*\-label "Street number" \-variable start\_street\_nbr \-type integer \-optional 1*\} \\  
    > &nbsp;&nbsp;&nbsp;__\-frame__ \{*\-label "Itinerary destination"*\} \\  
    > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-comment__ \{*\-text "Specify your itinerary destination"*\} \\  
    > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-entry__ \{*\-label "City" \-variable dest\_city \-type string*\} \\  
    > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-entry__ \{*\-label "Street" \-variable dest\_street \-type string \-optional 1*\} \\  
    > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-entry__ \{*\-label "Street number" \-variable dest\_street\_nbr \-type integer \-optional 1*\} \\  
    > &nbsp;&nbsp;&nbsp;__\-frame__ \{\} \\  
    > &nbsp;&nbsp;&nbsp;__\-checkbutton__ \{*\-label "Don't use highways" \-variable no\_highway*\}\]

    This example opens a dialog box that has the title *Itinerary selection*\.
    A first entry widget in this box allows selecting a report file\. It follows
    two frames to define respectively an itinerary start and end location\. Each
    of these locations that are described with a comment has three entry widgets
    to specify respectively the city, street and the street number\. Bellow the
    second frame there is a check button that allows specifying if eventual
    highways should be ignored\.

  - <a name='2'></a>__tepam::argument\_dialogbox__ \{*item\_name item\_attributes ?item\_name item\_attributes? ?\.\.\.?*\}

    Sometimes it is simpler to provide all the data entry item definitions in
    form of a single list to __argument\_dialogbox__, and not as individual
    arguments\. The second format that is supported by __argument\_dialogbox__
    corresponds exactly to the first one, except that all item definitions are
    packed into a single list that is provided to __argument\_dialogbox__\.
    The previous example can therefore also be written in the following way:

    > set DialogResult \[__tepam::argument\_dialogbox \{__  
    > &nbsp;&nbsp;&nbsp;__\-title__ "Itinerary selection"  
    > &nbsp;&nbsp;&nbsp;__\-file__ \{*\-label "Itinerary report" \-variable report\_file*\}  
    > &nbsp;&nbsp;&nbsp;\.\.\.  
    > &nbsp;&nbsp;&nbsp;__\-checkbutton__ \{*\-label "Don't use highways" \-variable no\_highway*\} __\}__\]

The commands __argument\_dialogbox__ as well as
__[procedure](\.\./\.\./\.\./\.\./index\.md\#procedure)__ are exported from the
namespace __tepam__\. To use these commands without the __tepam::__
namespace prefix, it is sufficient to import them into the main namespace:

> __namespace import tepam::\*__  
>   
> set DialogResult \[__argument\_dialogbox__ \\  
> &nbsp;&nbsp;&nbsp;\-title "Itinerary selection"  
> &nbsp;&nbsp;&nbsp;\.\.\.

The following subsections explain the different argument item types that are
accepted by the __argument\_dialogbox__, classified into three groups\. The
first data entry item definition format will be used in the remaining document,
knowing that this format can always be transformed into the second format by
putting all arguments into a single list that is then provided to
__argument\_dialogbox__\.

## <a name='subsection1'></a>Context Definition Items

The first item group allows specifying some context aspects of an argument
dialog box\. These items are taking a simple character string as item attribute:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-<argument\_name>__ *string* \\  
> &nbsp;&nbsp;&nbsp;\.\.\.

The following items are classified into this group:

  - \-title *string*

    The dialog box window title which is by default *Dialog* can be changed
    with the *\-title* item:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-title__ "System configuration" \\  
> &nbsp;&nbsp;&nbsp;\.\.\.

  - \-window *string*

    The argument dialog box uses by default *\.dialog* as dialog top level
    window\. This path can be changed with the *\-window* item:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-window__ \.dialog \\  
> &nbsp;&nbsp;&nbsp;\.\.\.

  - \-parent *string*

    By defining a parent window, the argument dialog box will be displayed
    beside this one\. Without explicit parent window definition, the top\-level
    window will be considered as parent window\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-parent__ \.my\_appl \\  
> &nbsp;&nbsp;&nbsp;\.\.\.

  - \-context *string*

    If a context is defined the dialog box state, e\.g\. the entered data as well
    as the window size and position, is restored the next time the argument
    dialog box is called\. The assignment of a context allows saving the dialog
    box state in its context to distinguish between different usages of the
    argument dialog box\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-context__ destination\_definitions \\  
> &nbsp;&nbsp;&nbsp;\.\.\.

## <a name='subsection2'></a>Formatting and Display Options

Especially for big, complex forms it becomes important that the different data
entry widgets are graphically well organized and commented to provide an
immediate and clear overview to the user\. A couple of items allow structuring
and commenting the dialog boxes\.

The items of this classification group require as item attributes a definition
list, which contains itself attribute name and value pairs:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;&nbsp;__\-<argument\_name>__ \{   
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*?\-<attribute\_name> <attribute\_value>?*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*?\-<attribute\_name> <attribute\_value>?*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*?\.\.\.?*  
>   
> &nbsp;&nbsp;&nbsp;\}  
> &nbsp;&nbsp;&nbsp;\.\.\.

The following items are classified into this group:

  - \-frame *list*

    The *\-frame* item allows packing all following entry widgets into a
    labeled frame, until a next frame item is defined or until the last entry
    widget has been defined\. It recognizes the following attributes inside the
    item attribute list:

      * \-label *string*

        An optional frame label can be specified with the *\-label* statement\.

    Example:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;&nbsp;__\-frame__ \{*\-label "Destination address"*\}  
> &nbsp;&nbsp;&nbsp;\.\.\.

    To close an open frame without opening a new one, an empty list has to be
    provided to the *\-frame* statement\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;&nbsp;__\-frame__ \{\}  
> &nbsp;&nbsp;&nbsp;\.\.\.

  - \-sep \[const \{\{\}\}\]

    Entry widgets can be separated with the *\-sep* statement which doesn't
    require additional definitions\. The related definition list has to exist,
    but its content is ignored\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;&nbsp;__\-sep__ \{\}  
> &nbsp;&nbsp;&nbsp;\.\.\.

  - \-comment *string*

    Comments and descriptions can be added with the *\-text* attribute of the
    *\-comment* item\. Please note that each entry widget itself can also
    contain a *\-text* attribute for comments and descriptions\. But the
    *\-comment* item allows for example adding a description between two
    frames\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;&nbsp;__\-comment__ \{*\-text "Specify bellow the destination address"*\}  
> &nbsp;&nbsp;&nbsp;\.\.\.

  - \-yscroll __0__&#124;__1__&#124;__auto__

    This attribute allows controlling an eventual vertical scrollbar\. Setting it
    to __0__ will permanently disable the scrollbar, setting it to __1__
    will enable it\. By default it is set to __auto__\. The scrollbar is
    enabled in this mode only if the vertical data entry form size exceeds 66%
    of the screen height\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;&nbsp;__\-yscroll__ __auto__  
> &nbsp;&nbsp;&nbsp;\.\.\.

## <a name='subsection3'></a>Global Custom Data Validation

This item group allows specifying global custom checks to validate the entered
data\.

  - \-validatecommand *script*

    Custom data checks can be performed via validation commands that are defined
    with the *\-validatecommand* item\. Example:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-entry \{\-label "Your comment" \-variable YourCom\} \\  
> &nbsp;&nbsp;&nbsp;__\-validatecommand__ \{IllegalWordDetector $YourCom\}

    The validation command is executed in the context of the calling procedure,
    once all the basic data checks have been performed and data variables are
    assigned\. All data is accessed via the data variables\. Note that there is
    also an entry widget specific attribute *\-validatecommand* that allows
    declaring custom checks for specific data entries\.

    The attribute *\-validatecommand* can be repeated to declare multiple
    custom checks\.

  - \-validatecommand\_error\_text *string*

    This item allows overriding the default error message for a global custom
    argument validation \(defined by *\-validatecommand*\)\. Also this attribute
    can be repeated in case multiple checks are declared\.

  - \-validatecommand2 *script*

  - \-validatecommand2\_error\_text *string*

    These items are mainly for TEPAM internal usage\.

    These items corrspond respectively to *\-validatecommand* and
    *\-validatecommand\_error\_text*\. However, the data validation is not
    performed in the next upper stack level, but two stack levels higher\.

## <a name='subsection4'></a>Data Entry Widget Items

Data entry widgets are created with the widget items\. These items require as
item attributes a definition list, which contains itself attribute name and
value pairs:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\.\.\.  
> &nbsp;&nbsp;&nbsp;__\-<argument\_name>__ \{   
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*?\-<attribute\_name> <attribute\_value>?*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*?\-<attribute\_name> <attribute\_value>?*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*?\.\.\.?*  
>   
> &nbsp;&nbsp;&nbsp;\}  
> &nbsp;&nbsp;&nbsp;\.\.\.

The attribute list can contain various attributes to describe and comment an
entry widget and to constrain its entered value\. All entry widgets are accepting
a common set of attributes that are described in the section [Entry Widget Item
Attributes](#subsection5)\.

TEPAM defines a rich set of entry widgets\. If necessary, this set can be
extended with additional application specific entry widgets \(see [APPLICATION
SPECIFIC ENTRY WIDGETS](#section3)\):

  - \-entry *list*

    The *\-entry* item generates the simplest but most universal data entry
    widget\. It allows entering any kind of data in form of single line strings\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-entry__ \{\-label Name \-variable Entry\}

  - \-text *list*

    The *\-text* item generates a multi line text entry widget\. The widget
    height can be selected with the *\-height* attribute\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-text__ \{\-label Name \-variable Text \-height 5\}

  - \-checkbox *list*

    A group of check boxes is created with the *\-checkbox* item\. The number of
    check boxes and their option values are specified with a list assigned to
    the *\-choices* attribute or via a variable declared with the
    *\-choicevariable* attribute:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-checkbox__ \{\-label "Font sytle" \-variable FontStyle \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{bold italic underline\} \-default italic\}

    If the labels of the check boxes should differ from the option values, their
    labels can be defined with the *\-choicelabels* attribute:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-checkbox__ \{\-label "Font sytle" \-variable FontStyle \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{bold italic underline\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choicelabels \{Bold Italic Underline\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-default italic\}

    In contrast to a radio box group, a check box group allows selecting
    simultaneously several choice options\. The selection is stored for this
    reason inside the defined variable in form of a list, even if only one
    choice option has been selected\.

  - \-radiobox *list*

    A group of radio boxes is created with the *\-radiobox* item\. The number of
    radio boxes and their option values are specified with a list assigned to
    the *\-choices* attribute or via a variable declared with the
    *\-choicevariable* attribute\.

    In contrast to a check box group, a radio box group allows selecting
    simultaneously only one choice option\. The selected option value is stored
    directly, and not in form of a list, inside the defined variable\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-radiobox__ \{\-label "Text adjustment" \-variable Adjustment \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{left center right\} \-default left\}

    If the labels of the radio boxes should differ from the option values, their
    labels can be defined with the *\-choicelabels* attribute:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-radiobox__ \{\-label "Text adjustment" \-variable Adjustment \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{left center right\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choicelabels \{Left Center Right\} \-default left\}

  - \-checkbutton *list*

    The *\-checkbutton* entry widget allows activating or deactivating a single
    choice option\. The result written into the variable will either be __0__
    if the check button was not activated or __1__ if it was activated\. An
    eventually provided default value has also to be either __0__ or
    __1__\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-checkbutton__ \{\-label Capitalize \-variable Capitalize \-default 1\}

Several types of list and combo boxes are available to handle selection lists\.

  - \-combobox *list*

    The combobox is a combination of a normal entry widget together with a
    drop\-down list box\. The combobox allows selecting from this drop\-down list
    box a single element\. The list of the available elements can be provided
    either as a list to the *\-choices* attribute, or via a variable that is
    specified with the *\-choicevariable* attribute\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-combobox__ \{\-label "Text size" \-variable Size \-choices \{8 9 10 12 15 18\} \-default 12\}

    And here is an example of using a variable to define the selection list:

> set TextSizes \{8 9 10 12 15 18\}  
> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-combobox__ \{\-label "Text size" \-variable Size \-choicevariable TextSizes \-default 12\}

  - \-listbox *list*

    In contrast to the combo box, the list box is always displayed by the
    *listbox* entry widget\. Only one element is selectable unless the
    *\-multiple\_selection* attribute is set\. The list box height can be
    selected with the *\-height* attribute\. If the height is not explicitly
    defined, the list box height is automatically adapted to the argument dialog
    box size\. The first example uses a variable to define the available choices:

> set set AvailableSizes  
> for \{set k 0\} \{$k<16\} \{incr k\} \{lappend AvailableSizes \[expr 1<<$k\]\}  
>   
> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-listbox__ \{\-label "Distance" \-variable Distance \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choicevariable AvailableSizes \-default 6 \-height 5\}

    Here is a multi\-element selection example\. Please note that also the default
    selection can contain multiple elements:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-listbox__ \{\-label "Text styles" \-variable Styles \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{bold italic underline overstrike\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choicelabels \{Bold Italic Underline Overstrike\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-default \{bold underline\} \-multiple\_selection 1 \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-height 3\}

  - \-disjointlistbox *list*

    A disjoint list box has to be used instead of a normal list box if the
    selection order is important\. The disjoint list box entry widget has in fact
    two list boxes, one to select elements and one to display the selected
    elements in the chosen order\.

    Disjoint listboxes allow always selecting multiple elements\. With the
    exception of the *\-multiple\_selection* attribute, disjointed list boxes
    are accepting the same attributes as the normal listbox, e\.g\. *\-height,
    \-choices, \-choicevariable, \-default*\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-disjointlistbox__ \{\-label "Preferred scripting languages" \-variable Languages \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-comment "Please select your preferred languages in the order" \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{JavaScript Lisp Lua Octave PHP Perl Python Ruby Scheme Tcl\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-default \{Tcl Perl Python\}\}

The file and directory selectors are building a next group of data entry
widgets\. A paragraph of section [Entry Widget Item
Attributes](#subsection5) explains the widget specific attributes that allow
specifying the targeted file types, active directory etc\.

  - \-file *list*

    The item *\-file* creates a group composed by an entry widget together with
    a button that allows opening a file browser\. The data type *file* is
    automatically selected for this entry if no data type has been explicitly
    defined with the *\-type* attribute\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-file__ \{\-label "Image file" \-variable ImageF \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-filetypes \{\{"GIF" \{\*\.gif\}\} \{"JPG" \{\*\.jpg\}\}\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-initialfile "picture\.gif"\}

  - \-existingfile *list*

    The item *\-existingfile* creates a group composed by an entry widget
    together with a button that allows opening a browser to select an existing
    file\. The data type *existingfile* is automatically selected for this
    entry if no data type has been explicitly defined with the *\-type*
    attribute\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-existingfile__ \{\-label "Image file" \-variable ImageF \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-filetypes \{\{"GIF" \{\*\.gif\}\} \{"JPG" \{\*\.jpg\}\}\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-initialfile "picture\.gif"\}

  - \-directory *list*

    The item *\-directory* creates a group composed by an entry widget together
    with a button that allows opening a directory browser\. The data type
    *directory* is automatically selected for this entry if no data type has
    been explicitly defined with the *\-type* attribute\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-directory__ \{\-label "Report directory" \-variable ReportDir\}

  - \-existingdirectory *list*

    The item *\-existingdirectory* creates a group composed by an entry widget
    together with a button that allows opening a browser to select an existing
    directory\. The data type *existingdirectory* is automatically selected for
    this entry if no data type has been explicitly defined with the *\-type*
    attribute\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-existingdirectory__ \{\-label "Report directory" \-variable ReportDir\}

Finally, there is a last group of some other special data entry widgets\.

  - \-color *list*

    The color selector is composed by an entry widget together with a button
    that allows opening a color browser\. The data type *color* is
    automatically selected for this entry widget type if no data type has been
    explicitly defined with the *\-type* attribute\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-color__ \{\-label "Background color" \-variable Color \-default red\}

  - \-font *list*

    The font selector is composed by an entry widget together with a button that
    allows opening a font browser\. The data type *font* is automatically
    selected for this entry widget type if no data type has been explicitly
    defined with the *\-type* attribute\. The entry widget displays an example
    text in the format of the selected font\.

    The font browser allows selecting by default the font families provided by
    the __font families__ Tk command as well as a reasonable set of
    different font sizes between 6 points and 40 points\. Different sets of font
    families and font sizes can be specified respectively via the
    *\-font\_families* or *\-font\_sizes* attributes\.

    If no default font is provided via the *\-default* attribute, the default
    font of the label widget to display the selected font will be used as
    default selected font\. If the font family of this label widget is not part
    of the available families the first available family is used as default\. If
    the font size of this label widget is not part of the available sizes the
    next close available size is selected as default size\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-font__ \{\-label "Font" \-variable Font \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-font\_sizes \{8 10 12 16\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-default \{Arial 20 italic\}\}

## <a name='subsection5'></a>Entry Widget Item Attributes

All the entry widget items are accepting the following attributes:

  - \-text *string*

    Eventual descriptions and comments specified with the *\-text* attribute
    are displayed above the entry widget\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-entry \{__\-text "Please enter your name bellow"__ \-variable Name\}

  - \-label *string*

    The label attribute creates left to the entry widget a label using the
    provided string as label text:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-entry \{__\-label Name__ \-variable Name\}

  - \-variable *string*

    All entry widgets require a specified variable\. After accepting the entered
    information with the OK button, the entry widget data is stored inside the
    defined variables\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-existingdirectory \{\-label "Report directory" __\-variable ReportDir__\}

  - \-default *string*

    Eventual default data for the entry widgets can be provided via the
    *\-default* attribute\. The default value is overridden if an argument
    dialog box with a defined context is called another time\. The value
    acknowledged in a previous call will be used in this case as default value\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-checkbox \{\-label "Font sytle" \-variable FontStyle \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{bold italic underline\} __\-default italic__\}

  - \-optional __0__&#124;__1__

    Data can be specified as optional or mandatory with the *\-optional*
    attribute that requires either __0__ \(mandatory\) or __1__ \(optional\)
    as attribute data\.

    In case an entry is optional and no data has been entered, e\.g\. the entry
    contains an empty character string, the entry will be considered as
    undefined and the assigned variable will not be defined\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-entry \{\-label "City" \-variable start\_city \-type string\} \\  
> &nbsp;&nbsp;&nbsp;\-entry \{\-label "Street" \-variable start\_street \-type string __\-optional 0__\} \\  
> &nbsp;&nbsp;&nbsp;\-entry \{\-label "Street number" \-variable start\_street\_nbr \-type integer __\-optional 1__\} \\

  - \-type *string*

    If the data type is defined with the *\-type* attribute the argument dialog
    box will automatically perform a data type check after acknowledging the
    entered values and before the dialog box is closed\. If a type incompatible
    value is found an error message box appears and the user can correct the
    value\.

    The argument dialog box accepts all types that have been specified by the
    TEPAM package and that are also used by
    __[tepam::procedure](tepam\_procedure\.md)__ \(see the
    *tepam::procedure reference manual*\)\.

    Some entry widgets like the file and directory widgets, as well as the color
    and font widgets are specifying automatically the default data type if no
    type has been specified explicitly with the *\-type* attribute\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;__\-entry__ \{\-label "Street number" \-variable start\_street\_nbr __\-type integer__\} \\

  - \-range *string*

    Values can be constrained with the *\-range* attribute\. The valid range is
    defined with a list containing the minimum valid value and a maximum valid
    value\.

    The *\-range* attribute has to be used only for numerical arguments, like
    integers and doubles\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-entry \{\-label Month \-variable Month \-type integer __\-range \{1 12\}__\}

  - \-validatecommand *string*

    Custom argument value validations can be performed via specific validation
    commands that are defined with the *\-validatecommand* attribute\. The
    provided validation command can be a complete script in which the pattern
    *%P* is placeholder for the argument value that has to be validated\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-entry \{\-label "Your comment" \-variable YourCom \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-validatecommand__ "IllegalWordDetector %P"\}

    While the purpose of this custom argument validation attribute is the
    validation of a specific argument, there is also a global data validation
    attribute *\-validatecommand* that allows performing validation that
    involves multiple arguments\.

  - \-validatecommand\_error\_text *string*

    This attribute allows overriding the default error message for a custom
    argument validation \(defined by *\-validatecommand*\)\.

Some other attributes are supported by the list and combo boxes as well as by
the radio and check buttons\.

  - \-choices *string*

    Choice lists can directly be defined with the *\-choices* attribute\. This
    way to define choice lists is especially adapted for smaller, fixed
    selection lists\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-listbox \{\-label "Text styles" \-variable Styles \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-choices \{bold italic underline\}__ \-default underline

  - \-choicelabels *string* *\(only check and radio buttons\)*

    If the labels of the check and radio boxes should differ from the option
    values, they can be defined with the *\-choicelabels* attribute:

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-checkbox \{\-label "Font sytle" \-variable FontStyle \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{bold italic underline\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-choicelabels \{Bold Italic Underline\}__

  - \-choicevariable *string*

    Another way to define the choice lists is using the *\-choicevariable*
    attribute\. This way to define choice lists is especially adapted for huge
    and eventually variable selection lists\.

> set TextSizes \{8 9 10 12 15 18\}  
> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-combobox \{\-label "Text size" \-variable Size __\-choicevariable TextSizes__\}

  - \-multiple\_selection __0__&#124;__1__

    The list box item \(__\-listbox__\) allows by default selecting only one
    list element\. By setting the *\-multiple\_selection* attribute to __1__,
    multiple elements can be selected\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-listbox \{\-label "Text styles" \-variable Styles \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{bold italic underline\} \-default underline \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-multiple\_selection 1__ \-height 3\}

Some additional attributes are supported by the file and directory selection
widgets\.

  - \-filetypes *string*

    The file type attribute is used by the __\-file__ and
    __\-existingfile__ items to define the file endings that are searched by
    the file browser\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-file \{\-label "Image file" \-variable ImageF \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-filetypes \{\{"GIF" \{\*\.gif\}\} \{"JPG" \{\*\.jpg\}\}\}__\}

  - \-initialfile *string*

    The initial file used by the file browsers of the __\-file__ and
    __\-existingfile__ widgets are by default the file defined with the
    *\-default* attribute, unless a file is specified with the *\-initialfile*
    attribute\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-file \{\-variable ImageF __\-initialfile "picture\.gif"__\}

  - \-activedir *string*

    The *\-activedir* attribute will override the default active search
    directory used by the file browsers of all file and directory entry widgets\.
    The default active search directory is defined by the directory of a
    specified initial file \(*\-initialfile*\) if defined, and otherwise by the
    directory of the default file/directory, specified with the *\-default*
    attribute\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-file "\-variable ImageF __\-activedir $pwd__"

Finally, there is a last attribute supported by some widgets:

  - \-height *string*

    All widgets containing a selection list \(__\-listbox__,
    __\-disjointlistbox__, __\-font__\) as well as the multi line
    __\-text__ widget are accepting the *\-height* attribute that defines
    the number of displayed rows of the selection lists\.

> tepam::argument\_dialogbox \\  
> &nbsp;&nbsp;&nbsp;\-listbox \{\-label "Text size" \-variable Size \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{8 9 10 12 15 18\} \-default 12 __\-height 3__\}

    If the no height has been explicitly specified the height of the widget will
    be dynamically adapted to the argument dialog box size\.

# <a name='section3'></a>APPLICATION SPECIFIC ENTRY WIDGETS

An application specific entry widget can be made available to the argument
dialog box by adding a dedicated procedure to the __tepam__ namespace\. This
procedure has three arguments; the first one is the widget path, the second one
a subcommand and the third argument has various purposes:

> *proc* tepam::ad\_form\(<WidgetName>\) \{W Command \{Par ""\}\} \{  
> &nbsp;&nbsp;&nbsp;*upvar Option Option; \# if required*  
> &nbsp;&nbsp;&nbsp;*variable argument\_dialogbox; \# if required*  
> &nbsp;&nbsp;&nbsp;switch $Command \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"create" <CreateCommandSequence>  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"set\_choice" <SetChoiceCommandSequence>  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"set" <SetCommandv>  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"get" <GetCommandSequence>  
> &nbsp;&nbsp;&nbsp;\}  
> \}

__Argument\_dialogbox__ takes care about the *\-label* and *\-text*
attributes for all entry widgets\. For any data entry widget it creates a frame
into which the data entry widget components can be placed\. The path to this
frame is provided via the *W* argument\.

The entry widget procedure has to support 3 mandatory and an optional command
that are selected via the argument *Command*:

  - *create*

    The entry widget is called a first time with the command *create* to build
    the data entry widget\.

    The frames that are made available by __argument\_dialogbox__ for the
    entry widgets are by default only extendable in the X direction\. To make
    them also extendable in the Y direction, for example for extendable list
    boxes, the command __ad\_form\(make\_expandable\) $W__ has to be executed
    when an entry widget is built\.

  - *set\_choice*

    The entry widget procedure is only called with the *set\_choice* command if
    the *\-choices* or *\-choicevariable* has been specified\. The command is
    therefore only relevant for list and combo boxes\.

    The available selection list that is either specified with the *\-choices*
    or *\-choicevariable* attribute is provided via the *Par* argument to the
    entry widget procedure\. This list can be used to initialize an available
    choice list\.

  - *set*

    If a default value is either defined via the *\-default* attribute or via a
    preceding call the entry widget procedure is called with the *set*
    command\. The argument *Par* contains in this case the value to which the
    entry widget has to be initialized\.

  - *get*

    The entry widget procedure command *get* has to return the current value
    of the entry widget\.

Eventually specified entry widget item attributes are available via the
__Option__ array variable of the calling procedure\. This variable becomes
accessible inside the entry widget procedure via the __upvar__ command\.

There may be a need to store some information in a variable\. The array variable
__argument\_dialogbox__ has to be used for this purpose together with array
indexes starting with *"$W,"*, e\.g\. *argument\_dialogbox\($W,values\)*\.

Examples of entry widget procedures are directly provided by the TEPAM package
source file that specifies the standard entry widget procedures\. The simplest
procedure is the one for the basic *entry* widget:

    proc tepam::ad_form(entry) {W Command {Par ""}} {
       switch $Command {
          "create" {pack [entry \$W.entry] -fill x \
                            -expand yes -pady 4 -side left}
          "set" {\$W.entry insert 0 $Par}
          "get" {return [\$W.entry get]}
       }
    }

It is also possible to relay on an existing entry widget procedure to derive a
new, more specific one\. The *radiobox* widget is used for example, to create a
new entry widget that allows selecting either *left*, *center* or *right*\.
The original *radiobox* widget is called with the *set\_choice* command
immediately after the *create* command, to define the fixed list of selection
options\.

    proc tepam::ad_form(rcl) {W Command {Par ""}} {
       set Res [ad_form(radiobox) $W $Command $Par]
       if {$Command=="create"} {
          ad_form(radiobox) $W set_choice {left center right}
       }
       return $Res
    }

Please consult the TEPAM package source file to find additional and more complex
examples of entry widget procedures\.

# <a name='section4'></a>VARIABLES

The __argument\_dialogbox__ is using two variables inside the namespace
__::tepam__:

  - __argument\_dialogbox__

    Application specific entry widget procedures can use this array variable to
    store their own data, using as index the widget path provided to the
    procedure, e\.g\. *argument\_dialogbox\($W,<sub\_index>\)*\.

  - __last\_parameters__

    This array variable is only used by an argument dialog box if its context
    has been specified via the *\-context* attribute\. The argument dialog box
    position and size as well as its entered data are stored inside this
    variable if the data are acknowledged and the form is closed\. This allows
    the form to restore its previous state once it is called another time\.

    To reuse the saved parameters not just in the actual application session but
    also in another one, it is sufficient to store the __last\_parameter__
    array variable contents in a configuration file which is loaded the next
    time an application is launched\.

# <a name='seealso'></a>SEE ALSO

[tepam\(n\)](tepam\_introduction\.md),
[tepam::procedure\(n\)](tepam\_procedure\.md)

# <a name='keywords'></a>KEYWORDS

[data entry form](\.\./\.\./\.\./\.\./index\.md\#data\_entry\_form), [parameter entry
form](\.\./\.\./\.\./\.\./index\.md\#parameter\_entry\_form)

# <a name='category'></a>CATEGORY

Argument entry form, mega widget

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2013, Andreas Drollinger
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/tepam/tepam_doc_gen.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557

[//000000001]: # (tepam::doc\_gen \- Tcl's Enhanced Procedure and Argument Manager)
[//000000002]: # (Generated from file 'tepam\_doc\_gen\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2013, Andreas Drollinger)
[//000000004]: # (tepam::doc\_gen\(n\) 0\.5\.0 tcllib "Tcl's Enhanced Procedure and Argument Manager")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tepam::doc\_gen \- TEPAM DOC Generation, reference manual

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [ARGUMENTS](#section2)

  - [PREDEFINED DOCUMENT FORMATS](#section3)

      - [TXT \- Text format](#subsection1)

      - [HTML \- HTML format](#subsection2)

      - [POD \- Perl document format](#subsection3)

      - [DT \- TclLib DocTools format](#subsection4)

  - [ADDING SUPPORT FOR NEW DOCUMENT FORMATS](#section4)

  - [EXAMPLES](#section5)

      - [tepam::doc\_gen::generate](#subsection5)

      - [tepam::doc\_gen::patch](#subsection6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require tepam 0\.5  
package require tepam::doc\_gen ?0\.1?  

[__tepam::doc\_gen::generate__ ?\-format *format*? ?\-style *style*? ?\-header\_footer? ?\-dest\_file *dest\_file*? *name*](#1)  
[__tepam::doc\_gen::patch__ ?\-format *format*? ?\-style *style*? ?\-search\_pattern *search\_pattern*? ?\-src\_string *src\_string* &#124; \-src\_file *src\_file*? ?\-dest\_file *dest\_file*? ?name?](#2)  

# <a name='description'></a>DESCRIPTION

This package generates documentations of TEPAM procedures \(procedures that have
been declared with __[tepam::procedure](tepam\_procedure\.md)__\)\. The
documents are generated in the classic UNIX document style using the following
document sections: Name, Synopsis, Description, Arguments and Example\. __TEPAM
Doc Gen__ provides support for various document formats\. Support for
additional formats can be added if necessary\.

The __TEPAM Doc Gen__ package provides the following commands:

  - <a name='1'></a>__tepam::doc\_gen::generate__ ?\-format *format*? ?\-style *style*? ?\-header\_footer? ?\-dest\_file *dest\_file*? *name*

    This command generates the documentation for a specified procedure
    \(*name*\) in one of the supported formats \(TXT, HTML, POD \(Perl Doc\), DT
    \(TclLib DocTool\), or in a custom specific format\. The format is specified
    via ?format?\. The flag ?\-header\_footer? adds to the documentation file
    header and footer\. If ?dest\_file? is specified the documentation is stored
    in a file \(the file header and footer are added automatically in this case\)
    and the file name is returned\. Otherwise the documentation string is
    returned by __generate__\.

  - <a name='2'></a>__tepam::doc\_gen::patch__ ?\-format *format*? ?\-style *style*? ?\-search\_pattern *search\_pattern*? ?\-src\_string *src\_string* &#124; \-src\_file *src\_file*? ?\-dest\_file *dest\_file*? ?name?

    This command inserts procedure documentations into an existing master
    document at the locations indicated by insertion placeholders which are
    matching the pattern of ?search\_pattern?\. The existing master document is
    either provided as data to the argument \(?src\_string?\) or via a file
    \(?src\_file?\)\. The final document is returned by
    __[patch](\.\./\.\./\.\./\.\./index\.md\#patch)__ if no destination file is
    defined \(?dest\_file?\)\. Otherwise, the document is stored in the specified
    file, and the number of insertion placeholders that could be handled
    successfully is returned\.

    Any insertion placeholders of the master document are handled by default\. By
    defining the argument ?name? the documentation insertion will be restricted
    to a particular procedure\.

# <a name='section2'></a>ARGUMENTS

  - ?\-format *format*?

    Specifies the documentation format\. __TEPAM Doc Gen__ provides support
    for the following formats:

      * TXT \- Text format \(default\)

      * HTML

      * POD \- Perl Plain Old Documentation format \(PerlPOD\)

      * DT \- TclLib DocTool format

    Section [ADDING SUPPORT FOR NEW DOCUMENT FORMATS](#section4) shows how
    support for additional formats can be added\.

  - ?\-style *style*?

    The documentation is by default generated in Tcl style \(e\.g\. __command
    arg1 arg2 \.\.\.__\)\. C\-style documentation can be generated by setting this
    argument to 'C' \(e\.g\. __command\(arg1,arg2,\.\.\.\)__\)\.

  - ?\-dest\_file *dest\_file*?

    If ?dest\_file? is defined the documentation is written into the specified
    destination file\. Otherwise the documentation string is returned by the
    commands __generate__ and
    __[patch](\.\./\.\./\.\./\.\./index\.md\#patch)__\.

  - *name* / ?name?

    This is the name of the procedure for which the documentation has to be
    generated\. This is a mandatory argument for __generate__, but an
    optional argument for __[patch](\.\./\.\./\.\./\.\./index\.md\#patch)__\.

  - ?\-header\_footer?

    __Generate__ adds to the generated procedure documentation the file
    header and footer only if a file is generated\. By selecting the flag
    ?\-header\_footer? the header and footer are also generated if the
    documentation is returned as string by __generate__\.

  - ?\-src\_string *src\_string* &#124; \-src\_file *src\_file*?

    __[Patch](\.\./\.\./\.\./\.\./index\.md\#patch)__ inserts procedure
    documentations into an existing document that is either provided as string
    to the argument \(?src\_string?\) or as a file \(?src\_file?\)\. One of these two
    arguments need to be specified\.

  - ?\-search\_pattern *search\_pattern*?

    The argument ?search\_pattern? defines the documentation insertion
    placeholder used in a document\. It is a regular expression accepted by
    __regexp__ and needs to contain a parenthesized sub\-expression that
    contains the procedure name for which the documentation needs to be
    inserted\.

    The default insertion placeholder pattern is *\\\{\!\(\.\*?\)\!\\\}*, which means
    that the procedure name will be embedded between *\{\!* and *\!\}*\. The
    section [EXAMPLES](#section5) contains a custom insertion placeholder
    pattern example\.

# <a name='section3'></a>PREDEFINED DOCUMENT FORMATS

__TEPAM Doc Gen__ pre\-defines the following document formats:

## <a name='subsection1'></a>TXT \- Text format

The documentation will be generated in a simple text format if this format is
selected\. The format can be customized via the following variable:

  - __tepam::doc\_gen::Option\(TXT,MaxLineLength\)__

    Default: 80

    This variable defines the line wrapping limit \(character position\)\.

## <a name='subsection2'></a>HTML \- HTML format

__TEPAM Doc Gen__ generates CSS styled HTML files\. The HTML documentation
can be customized via the following variable:

  - __tepam::doc\_gen::Option\(HTML,CssFile\)__

    Default: "tepam\_doc\_stylesheet\.css"

    This variable specifies the CSS stylesheet file that is referred by the
    generated HTML files\.

The CSS stylesheet can be customized to change the documentation formatting\. A
good starting point to create a customized CSS stylesheet is to use the CSS file
provided by the __TEPAM Doc Gen__ example/demo\. The HTML documentation uses
the following CSS class styles:

  - *h1\.tepam\_page\_title* \- Document page title\. Only used by __generate__
    if a file is created or if the header and footer are built \(flag
    ?\-header\_footer? selected\)\.

  - *div\.tepam\_command\_help* \- Documentation container\. The entire procedure
    documentation is placed inside this container\.

  - *p\.tepam\_section\_title* \- Section title \(e\.g\. *Name*, *Synopsis*,
    *Description*, \.\.\.\)

  - *p\.tepam\_sub\_section\_title* \- Sub\-section title \(used to separate the
    documentation of multiple sub\-procedures\)

  - *p\.tepam\_name* \- Name section

  - *p\.tepam\_synopsis* \- Synopsis section

  - *p\.tepam\_description* \- Single description paragraph

  - *ul\.tepam\_description\_list* \- Item of a HTML bulleted/unordered list
    inside the description section

  - *dt\.tepam\_argument* \- Item of a HTML description list used to list the
    procedure arguments

  - *p\.tepam\_argument\_description* \- Argument description paragraph

  - *p\.tepam\_argument\_attribute* \- Argument attribute line

  - *pre\.tepam\_example* \- Example section

## <a name='subsection3'></a>POD \- Perl document format

The documentation is generated in the Perl Plain Old Documentation format
\(PerlPOD\) if this format is selected\.

## <a name='subsection4'></a>DT \- TclLib DocTools format

The documentation is generated in the Tcllib DocTools format if this format is
selected\.

# <a name='section4'></a>ADDING SUPPORT FOR NEW DOCUMENT FORMATS

Support for a new document format can be added by defining in the
__tepam::doc\_gen__ namespace a set of procedures that generate the different
document components\.

The following documentation listing contains tokens that refer to the different
document generation procedures:

> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<01>*  
> &nbsp;*<03> <20s>*   NAME*<20e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<30s>*       message\_box \- Displays text in a message box*<30e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<20s>*   SYNOPSYS*<20e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<40s>*       message\_box \[\-mtype <mtype>\] <text>*<40e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<20s>*   DESCRIPTION*<20e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<21s>     message\_box<21e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<54s>       message\_box \[\-mtype <mtype>\] <text><54e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<50s>*       This procedure allows displaying a text in an message box\. The following  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**       message types are supported:*<50e>*  
> &nbsp;*<51> <53s>*       \* Info*<53e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<53s>*       \* Warning*<53e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<53s>*       \* Error*<53e>*                                           *<52>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<50s>*       If the text parameter is use multiple times the different texts are  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**       concatenated to create the message text\.*<50e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<20s>*   ARGUMENTS*<20e>*  
> &nbsp;*<60> <62s>*       \[\-mtype <mtype>\]*<62e>*  
> &nbsp;*<63> <65s>*          Message type*<65e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<66s>*          Default: "Warning"*<66e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<66s>*          Multiple: yes*<66e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<66s>*          Choices: Info, Warning, Error*<66e>*                  *<64>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<62s>*       <text>*<62e>*  
> &nbsp;*<63> <65s>*          One or multiple text lines to display*<65e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<66s>*          Type: string*<66e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<66s>*          Multiple: yes*<66e>*                                  *<64><61>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<20s>*   EXAMPLE*<20e>*  
> &nbsp;*<70> <72s>*       message\_box "Please save first the document"*<72e>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<73s>*       \-> 1*<73e>*                                              *<71><04>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<02>*

There are 2 types of document generation procedures:

  - Content generation procedures \(e\.g\. <40s>\.\.\.<40e>\)

    These procedures generate some document content based on the text that is
    provided as procedure argument\. The listing above shows two tokens for these
    procedures to indicate the beginning and the end of the generated content\.

  - Control generation procedures \(e\.g\. <03>\)

    These procedures generate control constructs, for example to generate the
    prolog code and epilog code for lists, sections, etc\. These procedures have
    no argument\.

The following set of procedures needs to be defined to provide support for a new
document format:

  - *01* \- __gen\($Format,Header\)__ \{*Text*\}

    Only called if __doc\_gen__ generates a file or if it is called with the
    flag ?\-header\_footer?\. The procedure creates the file header\. The provided
    parameter is the procedure name for which the documentation has to be
    generated\.

  - *02* \- __gen\($Format,Footer\)__ \{*Text*\}

    Only called if __doc\_gen__ generates a file or if it is called with the
    flag ?\-header\_footer?\. The procedure creates the file footer\.

  - *03* \- __gen\($Format,Begin\)__ \{\}

    Generates the documentation prolog \(preamble\)

  - *04* \- __gen\($Format,End\)__ \{\}

    Generates the documentation epilog

  - *20* \- __gen\($Format,SectionTitle\)__ \{*Text*\}

    Generates a section title \(e\.g\. *Name*, *Synopsis*, *Description*,
    \.\.\.\)\. The raw title text is provided as parameter

  - *21* \- __gen\($Format,SubSectionTitle\)__ \{*Text*\}

    Generates a sub\-section title\. Sub\-sections are used if a single
    documentation is generated for multiple sub\-commands to make a separation
    between them\. The raw title text is provided as parameter

  - *30* \- __gen\($Format,Name\)__ \{*Text*\}

    Generates the name section \(without title\)\. The raw section text is provided
    as parameter\.

  - *40* \- __gen\($Format,Synopsis\)__ \{*Text*\}

    Generates the synopsis section \(without title\)\. The section text provided as
    parameter is pre\-formatted \(the argument strings are generated by
    __gen\($Format,ArgumentString\)__\)\.

  - *50* \- __gen\($Format,Description\)__ \{*Text*\}

    Generates a description paragraph\. The raw paragraph text is provided as
    parameter\.

  - *51* \- __gen\($Format,DescriptionListBegin\)__ \{\}

    Generates the prolog of a bulleted/unordered list inside the description
    section\. This prolog is usually the start code of a list structure\.

  - *52* \- __gen\($Format,DescriptionListEnd\)__ \{\}

    Generates the epilog of a bulleted/unordered list inside the description
    section\. This epilog is usually the end code of a list structure\.

  - *53* \- __gen\($Format,DescriptionListItem\)__ \{*Text*\}

    Generates a text item in a bulleted/unordered description list\. The raw item
    text is provided as parameter\.

  - *54* \- __gen\($Format,DescriptionSynopsis\)__ \{*Text*\}

    Generates the synopsis line on the beginning of the description section\. The
    command can return an empty string if no synopsys line is required at this
    place\.

    Some formats \(e\.g\. Tcl DocTools\) require that the synopsis line is defined
    in the description section, to build then automatically the synopsis
    section\. The section text provided as parameter is pre\-formatted \(the
    argument strings are generated by __gen\($Format,ArgumentString\)__\)\.

  - *60* \- __gen\($Format,ArgumentListBegin\)__ \{\}

    Generates the prolog of argument list \(definition/non\-bulleted list\)\. This
    prolog is usually the start code of a definition list\.

  - *61* \- __gen\($Format,ArgumentListEnd\)__ \{\}

    Generates the epilog of the argument list\. This epilog is usually the end
    string of a list structure\.

  - *62* \- __gen\($Format,ArgumentListItem\)__ \{Name IsOptional IsNamed Type\}

    Generates an argument item line inside the argument list\. This command can
    rely on __gen\($Format,ArgumentDetailBegin\)__ since the parameters are
    identical\.

  - *63* \- __gen\($Format,ArgumentDetailBegin\)__ \{\}

    Generates the argument details prolog \(preamble\)\.

  - *64* \- __gen\($Format,ArgumentDetailEnd\)__ \{\}

    Generates the argument details epilog

  - *65* \- __gen\($Format,ArgumentDescription\)__ \{*Text*\}

    Generates the argument description \(single paragraph\)\.

  - *66* \- __gen\($Format,ArgumentAttribute\)__ \{*Text*\}

    Generates a single argument attribute string\. The command is called
    individually for each attribute\.

  - *70* \- __gen\($Format,ExampleBegin\)__ \{\}

    Generates the example section prolog \(preamble\)

  - *71* \- __gen\($Format,ExampleEnd\)__ \{\}

    Generates the example section epilog

  - *72* \- __gen\($Format,ExampleCommandLine\)__ \{*Text*\}

    Generates a single command line in the example section\. The command is
    called for each individual command line\.

  - *73* \- __gen\($Format,ExampleResultLine\)__ \{*Text*\}

    Generates a command result line

  - *80* \- __gen\($Format,ArgumentString\)__ \{Name IsOptional IsNamed Type\}

    Generates the part of the command line or the synopsis that is specific to
    an argument\. The generated string has to indicate if an argument is
    optional, named and if it is a flag\.

    The following parameters are provided to this procedure:

      * *Name*

        Name of the argument

      * *IsOptional*

        If true \(=__1__\) the argument is optional which should be indicated
        by the generated string \(for example by putting the argument into
        brackets \{\[\]\} or into question marks '?'\):

> gen\(TXT,ArgumentString\) mtype 1 0 string \-> *"\[mtype\]"*

      * *IsNamed*

        If true \(=__1__\) an argument is a named argument \(option\)\. The
        generated string should in this case contain the argument/option name,
        followed by the argument itself:

> gen\(TXT,ArgumentString\) mtype 0 1 string \-> *"\-mtype <mtype>"*

        Named arguments can also be optional:

> gen\(TXT,ArgumentString\) mtype 1 1 string \-> *"\[\-mtype <mtype>\]"*

      * *Type*

        Indicates the type of the argument\. If the type is set to __none__
        the argument is a flag, which needs to be indicated by the generated
        string\. Example:

> gen\(TXT,ArgumentString\) close 1 1 none \-> *"\[\-close\]"*

# <a name='section5'></a>EXAMPLES

## <a name='subsection5'></a>tepam::doc\_gen::generate

The __TEPAM Doc Gen__ package can be explored by generating the
documentation of the command __tepam::doc\_gen::generate__\. The following
example generates the document in text format \(default format\):

> __tepam::doc\_gen::generate__ tepam::doc\_gen::generate

The next example generates the documentation in HTML format:

> __tepam::doc\_gen::generate__ \-format HTML tepam::doc\_gen::generate

The flag ?header\_footer? adds also the file header and footer:

> __tepam::doc\_gen::generate__ \-format HTML \-header\_footer tepam::doc\_gen::generate

The documentation can directly be stored in a file\. The file header and footer
are automatically generated in this way:

> __tepam::doc\_gen::generate__ \-format HTML \-dest\_file doc\_gen\.html tepam::doc\_gen::generate

The generated HTML file refers a CSS stylesheet file \(default:
tepam\_doc\_stylesheet\.css\)\. To display the HTML file correctly this CSS
stylesheet file needs to be copied into the directory of the generated HTML
file\.

The Tcl DOC Tools format can be used as intermediate format to generate other
formats, for example HTML:

> *\# Generate the documentation in Tcl Doc Tool format*  
> set dt \[__tepam::doc\_gen::generate__ \-format DT \-header\_footer tepam::doc\_gen::generate\]  
> **  
> *\# Create a new doc tools object \(HTML format\)*  
> package require doctools  
> ::doctools::new myDoc \-format html  
> **  
> *\# Open the HTML file, and write the HTML formatted documentation*  
> set fHtml \[open doc\_gen\.dt\.html w\]  
> puts $fHtml \[myDoc format $dt\]  
> close $fHtml

## <a name='subsection6'></a>tepam::doc\_gen::patch

While __generate__ provides a limited number of possibilities to vary the
document structure, __[patch](\.\./\.\./\.\./\.\./index\.md\#patch)__ offers more
flexibility\. Multiple documentations for different procedures and meta
information can for example be added\.

The following listing shows how the
__[patch](\.\./\.\./\.\./\.\./index\.md\#patch)__ command works\. It defines first
a HTML master document string that contains 2 procedure documentation
placeholders \(*\{\*<ProcedureName>\*\}*\)\. There placeholders are replaced by
__[patch](\.\./\.\./\.\./\.\./index\.md\#patch)__ with the generated documentation
of the referred procedures\. Since nonstandard placeholders are used,
__[patch](\.\./\.\./\.\./\.\./index\.md\#patch)__ is called with an explicit
placeholder pattern definition \(argument *search\_pattern*\)\.

> *\# Define the HTML master document*  
> set HtmlMasterDoc \{\\  
> <html>  
> &nbsp;&nbsp;<head>  
> &nbsp;&nbsp;&nbsp;&nbsp;<title>tepam::doc\_gen</title>  
> &nbsp;&nbsp;&nbsp;&nbsp;<link rel="stylesheet" href="tepam\_doc\_stylesheet\.css">  
> &nbsp;&nbsp;&nbsp;&nbsp;<meta content="documentation" name="keywords"></meta>  
> &nbsp;&nbsp;</head>  
> &nbsp;&nbsp;<body>  
> &nbsp;&nbsp;&nbsp;&nbsp;<h1>tepam::doc\_gen</h1>  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<h2>Generate</h2>  
> __\{\*tepam::doc\_gen::generate\*\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<h2>Patch</h2>  
> __\{\*tepam::doc\_gen::patch\*\}__  
> &nbsp;&nbsp;</body>  
> <html>\\  
> \}  
> **  
> *\# Patch the master document: This will replace the placeholders by the *  
> *\# procedure documentation divisions:*  
>   
> __tepam::doc\_gen::patch__ \-format HTML \-search\_pattern \{\\\{\\\*\(\.\*?\)\\\*\\\}\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-src\_string $HtmlMasterDoc \-dest\_file tepam\_doc\_gen\.html

# <a name='seealso'></a>SEE ALSO

[tepam\(n\)](tepam\_introduction\.md),
[tepam::procedure\(n\)](tepam\_procedure\.md)

# <a name='keywords'></a>KEYWORDS

[automatic documentation](\.\./\.\./\.\./\.\./index\.md\#automatic\_documentation),
[documentation](\.\./\.\./\.\./\.\./index\.md\#documentation), [procedure
documentation](\.\./\.\./\.\./\.\./index\.md\#procedure\_documentation)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2013, Andreas Drollinger
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/tepam/tepam_introduction.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468

[//000000001]: # (tepam \- Tcl's Enhanced Procedure and Argument Manager)
[//000000002]: # (Generated from file 'tepam\_introduction\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2013, Andreas Drollinger)
[//000000004]: # (tepam\(n\) 0\.5\.0 tcllib "Tcl's Enhanced Procedure and Argument Manager")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tepam \- An introduction into TEPAM, Tcl's Enhanced Procedure and Argument
Manager

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [OVERVIEW](#section2)

  - [PROCEDURE DECLARATION](#section3)

  - [PROCEDURE HELP](#section4)

  - [PROCEDURE CALL](#section5)

  - [INTERACTIVE PROCEDURE CALLS](#section6)

  - [FLEXIBLE ARGUMENT DIALOG BOX](#section7)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

This document is an informal introduction into TEPAM, the Tcl's Enhanced
Procedure and Argument Manager\. Detailed information to the TEPAM package is
provided in the *tepam::procedure* and *tepam::argument\_dialogbox* reference
manuals\.

# <a name='section2'></a>OVERVIEW

This package provides a new Tcl procedure declaration syntax that simplifies the
implementation of procedure subcommands and the handling of the different types
of procedure arguments like flags or switches, options, unnamed arguments,
optional and mandatory options and arguments, default values, etc\. Procedure
declarations can be enriched with detailed information about the procedure and
its arguments\. This information is used for the following purposes:

First of all, a preamble is added in front of the body of a procedure that is
declared with TEPAM\. This preamble calls an argument manager that that uses the
provided information to check the validity of the argument types and values
before the procedure body is executed\. Then, the information is used to generate
help and usage texts if requested, or to generate clear error message in case an
argument validation fails\. The information also allows generating automatically
graphical forms that allows an interactive definition of all arguments, in case
a procedure is called interactively\. And finally, the additional information
helps self\-commenting in a clean way the declaration of a procedure and of all
its arguments\.

The graphical form generator that creates the necessary argument specification
forms for the interactive procedure calls is also available for other purposes
than for procedure argument specifications\. It allows creating code efficiently
complex parameter entry forms that are usable independently from TEPAM's new
procedure definition method\.

Here is a short overview about all major TEPAM features:

  - New self\-documenting procedure declaration syntax: The additional
    information to declare properly a procedure has not to be provided with
    additional statements, but can be added in a natural syntax directly into
    the procedure header\.

  - Easy way to specify subcommands: A subcommand is declared like a procedure,
    simply with a procedure name composed by a base name followed by a
    subcommand name\. Sub\-subcommands are created identically using simply
    procedure names composed by 3 words\.

  - Flexible usage of flags \(switches\), options \(named arguments\) and unnamed
    arguments\. Option names are optionally automatically completed\.

  - Support for default values, mandatory/optional options and arguments, choice
    lists, value ranges, multiple usable options/arguments\.

  - Choice of a *named arguments first, unnamed arguments later* procedure
    calling style \(typical for Tcl commands\) or of an *unnamed arguments first,
    named arguments later* procedure calling style \(typical for Tk commands\)\.

  - In case the *named arguments first, unnamed arguments later* style \(Tcl\)
    is selected: Clear separation between options and arguments via the "\-\-"
    flag\. The unnamed arguments can optionally be accessed as options \(named
    arguments\)\.

  - Automatic type and value check before the procedure body is executed, taking
    into account validation ranges, choice lists and custom validation commands\.
    Generation of clear error message if necessary\.

  - Many predefined types exist \(integer, boolean, double, color, file, font,
    \.\.\.\)\. Other application specific types can easily be added\.

  - Automatic help and usage text generation if a procedure is called with the
    *\-help* flag\.

  - Automatic generation of an interactive argument definition form, in case a
    procedure is called with the *\-interactive* flag\.

  - Procedure calls can be logged which is useful to get for interactively
    called procedures the command call lines\.

  - Powerful and code efficient generation of complex parameter definition
    forms\.

# <a name='section3'></a>PROCEDURE DECLARATION

TEPAM's procedure declaration syntax is simple and self\-explaining\. Instead of
declaring a procedure with the Tcl key word
__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__, a procedure is declared with the
TEPAM command __[procedure](\.\./\.\./\.\./\.\./index\.md\#procedure)__ which
takes as __[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ also 3 arguments: The
procedure name, the procedure header and the procedure body\.

The following example declares the subcommand
__[message](\.\./\.\./\.\./\.\./index\.md\#message)__ of the procedure
__display__\. This command has several named and unnamed arguments:

> __[tepam::procedure](tepam\_procedure\.md)__ \{display message\} \{  
> &nbsp;&nbsp;&nbsp;\-return            \-  
> &nbsp;&nbsp;&nbsp;\-short\_description "Displays a simple message box"  
> &nbsp;&nbsp;&nbsp;\-description       "This procedure allows displaying a configurable message box\."  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-mtype \-default Warning \-choices \{Info Warning Error\} \-description "Message type"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-font \-type font \-default \{Arial 10 italic\} \-description "Message text font"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-level \-type integer \-optional \-range \{1 10\} \-description "Message level"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-fg \-type color \-default black \-description "Message color"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-bg \-type color \-optional \-description "Background color"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-no\_border \-type none \-description "Use a splash window style \(no border\)"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-log\_file \-type file \-optional \-description "Optional message log file"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{text \-type string \-multiple \-description "Multiple text lines to display"\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;*puts "display message:"*  
> &nbsp;&nbsp;&nbsp;*foreach var \{mtype font level fg bg no\_border log\_file text\} \{*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*if \{\[info exists $var\]\} \{*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*puts  "  $var=\[set $var\]"*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\}*  
> &nbsp;&nbsp;&nbsp;*\}*  
> \}

A call of procedure that has been declared in this way will first invoke the
TEPAM argument manager, before the procedure body is executed\. The argument
manager parses the provided arguments, validates them, completes them eventually
with some default values, and makes them finally available to the procedure body
as local variables\. In case an argument is missing or has a wrong type, the
argument manager generates an error message that explains the reason for the
error\.

As the example above shows, the TEPAM command
__[procedure](\.\./\.\./\.\./\.\./index\.md\#procedure)__ accepts subcommand
definitions as procedure name and allows defining much more information than
just the argument list inside the procedure header\. The procedure body on the
other hand is identical between a command declared with
__[proc](\.\./\.\./\.\./\.\./index\.md\#proc)__ and a command declared with
__[procedure](\.\./\.\./\.\./\.\./index\.md\#procedure)__\.

The procedure header allows defining in addition to the arguments some procedure
attributes, like a description, information concerning the return value, etc\.
This information is basically used for the automatic generation of comprehensive
help and usage texts\.

A list of argument definition statements assigned to the *\-args* argument is
defining the procedure arguments\. Each argument definition statement starts with
the argument name, optionally followed by some argument attributes\.

Three types of arguments can be defined: Unnamed arguments, named arguments and
flags\. The distinction between the named and unnamed arguments is made by the
first argument name character which is simply "\-" for named arguments\. A flag is
defined as named argument that has the type *none*\.

Named and unnamed arguments are mandatory, unless they are declared with the
*\-optional* flag and unless they have a default value specified with the
*\-default* option\. Named arguments and the last unnamed argument can have the
attribute *\-multiple*, which means that they can be defined multiple times\.
The expected argument data type is specified with the *\-type* option\. TEPAM
defines a large set of standard data types which can easily be completed with
application specific data types\.

The argument declaration order has only an importance for unnamed arguments that
are by default parsed after the named arguments \(Tcl style\)\. A variable allows
changing this behavior in a way that unnamed arguments are parsed first, before
the named arguments \(Tk style\)\.

# <a name='section4'></a>PROCEDURE HELP

The declared procedure can simply be called with the *\-help* option to get the
information about the usage of the procedure and its arguments:

> __display message__ \-help  
> &nbsp;&nbsp;*\->*  
> *NAME*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*display message \- Displays a simple message box*  
> *SYNOPSYS*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*display message*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\[\-mtype <mtype>\] :*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Message type, default: "Warning", choices: \{Info Warning Error\}*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\[\-font <font>\] :*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Message text font, type: font, default: Arial 10 italic*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\[\-level <level>\] :*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Message level, type: integer, range: 1\.\.10*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\[\-fg <fg>\] :*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Message color, type: color, default: black*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\[\-bg <bg>\] :*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Background color, type: color*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\[\-no\_border \] :*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Use a splash window style \(no border\)*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\[\-log\_file <log\_file>\] :*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Optional message log file, type: file*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<text> :*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Multiple text lines to display, type: string*  
> *DESCRIPTION*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*This procedure allows displaying a configurable message box\.*

# <a name='section5'></a>PROCEDURE CALL

The specified procedure can be called in many ways\. The following listing shows
some valid procedure calls:

> __display message__ "The document hasn't yet been saved\!"  
> *\-> display message:*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*mtype=Warning*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*font=Arial 10 italic*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*fg=black*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*no\_border=0*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*text=\{The document hasn't yet been saved\!\}*  
>   
>   
> __display message__ \-fg red \-bg black "Please save first the document"  
> *\-> display message:*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*mtype=Warning*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*font=Arial 10 italic*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*fg=red*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*bg=black*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*no\_border=0*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*text=\{Please save first the document\}*  
>   
>   
> __display message__ \-mtype Error \-no\_border "Why is here no border?"  
> *\-> display message:*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*mtype=Error*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*font=Arial 10 italic*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*fg=black*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*no\_border=1*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*text=\{Why is here no border?\}*  
>   
>   
> __display message__ \-font \{Courier 12\} \-level 10 \\  
> &nbsp;&nbsp;&nbsp;"Is there enough space?" "Reduce otherwise the font size\!"  
> *\-> display message:*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*mtype=Warning*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*font=Courier 12*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*level=10*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*fg=black*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*no\_border=0*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*text=\{Is there enough space?\} \{Reduce otherwise the font size\!\}*

The next lines show how wrong arguments are recognized\. The *text* argument
that is mandatory is missing in the first procedure call:

> __display message__ \-font \{Courier 12\}  
> &nbsp;&nbsp;*\-> display message: Required argument is missing: text*

Only known arguments are accepted:

> __display message__ \-category warning Hello  
> &nbsp;&nbsp;*\-> display message: Argument '\-category' not known*

Argument types are automatically checked and an error message is generated in
case the argument value has not the expected type:

> __display message__ \-fg MyColor "Hello"  
> &nbsp;&nbsp;*\-> display message: Argument 'fg' requires type 'color'\.  Provided value: 'MyColor'*

Selection choices have to be respected \.\.\.

> __display message__ \-mtype Fatal Hello  
> &nbsp;&nbsp;*\-> display message: Argument \(mtype\) has to be one of the  following elements: Info, Warning, Error*

\.\.\. as well as valid value ranges:

> __display message__ \-level 12 Hello  
> &nbsp;&nbsp;*\-> display message: Argument \(level\) has to be between 1 and 10*

# <a name='section6'></a>INTERACTIVE PROCEDURE CALLS

The most intuitive way to call the procedure is using an form that allows
specifying all arguments interactively\. This form will automatically be
generated if the declared procedure is called with the *\-interactive* flag\. To
use this feature the Tk library has to be loaded\.

> __display message__ \-interactive

The generated form contains for each argument a data entry widget that is
adapted to the argument type\. Check buttons are used to specify flags, radio
boxes for tiny choice lists, disjoint list boxes for larger choice lists and
files, directories, fonts and colors can be selected with dedicated browsers\.

After acknowledging the specified argument data via an OK button, the entered
data are first validated, before the provided arguments are transformed into
local variables and the procedure body is executed\. In case the entered data are
invalid, a message appears and the user can correct them until they are valid\.

The procedure calls can optionally be logged in a variable\. This is for example
useful to get the command call lines of interactively called procedures\.

# <a name='section7'></a>FLEXIBLE ARGUMENT DIALOG BOX

The form generator that creates in the previous example the argument dialog box
for the interactive procedure call is also available for other purposes than for
the definition of procedure arguments\. If Tk has been loaded TEPAM provides and
argument dialog box that allows creating complex parameter definition forms in a
very efficient way\.

The following example tries to illustrate the simplicity to create complex data
entry forms\. It creates an input mask that allows specifying a file to copy, a
destination folder as well as a checkbox that allows specifying if an eventual
existing file can be overwritten\. Comfortable browsers can be used to select
files and directories\. And finally, the form offers also the possibility to
accept and decline the selection\. Here is the code snippet that is doing all
this:

> __[tepam::argument\_dialogbox](tepam\_argument\_dialogbox\.md)__ \\  
> &nbsp;&nbsp;&nbsp;__\-existingfile__ \{\-label "Source file" \-variable SourceFile\} \\  
> &nbsp;&nbsp;&nbsp;__\-existingdirectory__ \{\-label "Destination folder" \-variable DestDir\} \\  
> &nbsp;&nbsp;&nbsp;__\-checkbutton__ \{\-label "Overwrite existing file" \-variable Overwrite\}

The __argument\_dialogbox__ returns __ok__ if the entered data are
validated\. It will return __cancel__ if the data entry has been canceled\.
After the validation of the entered data, the __argument\_dialogbox__ defines
all the specified variables with the entered data inside the calling context\.

An __argument\_dialogbox__ requires a pair of arguments for each variable
that it has to handle\. The first argument defines the entry widget type used to
select the variable's value and the second one is a lists of attributes related
to the variable and the entry widget\.

Many entry widget types are available: Beside the simple generic entries, there
are different kinds of list and combo boxes available, browsers for existing and
new files and directories, check and radio boxes and buttons, as well as color
and font pickers\. If necessary, additional entry widgets can be defined\.

The attribute list contains pairs of attribute names and attribute data\. The
primary attribute is *\-variable* used to specify the variable in the calling
context into which the entered data has to be stored\. Another often used
attribute is *\-label* that allows adding a label to the data entry widget\.
Other attributes are available that allow specifying default values, the
expected data types, valid data ranges, etc\.

The next example of a more complex argument dialog box provides a good overview
about the different available entry widget types and parameter attributes\. The
example contains also some formatting instructions like *\-frame* and *\-sep*
which allows organizing the different entry widgets in frames and sections:

> set ChoiceList \{"Choice 1" "Choice 2" "Choice 3" "Choice 4" "Choice 5" "Choice 6"\}  
>   
> set Result \[__[tepam::argument\_dialogbox](tepam\_argument\_dialogbox\.md)__ \\  
> &nbsp;&nbsp;&nbsp;__\-title__ "System configuration" \\  
> &nbsp;&nbsp;&nbsp;__\-context__ test\_1 \\  
> &nbsp;&nbsp;&nbsp;__\-frame__ \{\-label "Entries"\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-entry__ \{\-label Entry1 \-variable Entry1\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-entry__ \{\-label Entry2 \-variable Entry2 \-default "my default"\} \\  
> &nbsp;&nbsp;&nbsp;__\-frame__ \{\-label "Listbox & combobox"\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-listbox__ \{\-label "Listbox, single selection" \-variable Listbox1 \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{1 2 3 4 5 6 7 8\} \-default 1 \-height 3\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-listbox__ \{\-label "Listbox, multiple selection" \-variable Listbox2  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choicevariable ChoiceList \-default \{"Choice 2" "Choice 3"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-multiple\_selection 1 \-height 3\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-disjointlistbox__ \{\-label "Disjoined listbox" \-variable DisJntListbox  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choicevariable ChoiceList \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-default \{"Choice 3" "Choice 5"\} \-height 3\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-combobox__ \{\-label "Combobox" \-variable Combobox \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{1 2 3 4 5 6 7 8\} \-default 3\} \\  
> &nbsp;&nbsp;&nbsp;__\-frame__ \{\-label "Checkbox, radiobox and checkbutton"\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-checkbox__ \{\-label Checkbox \-variable Checkbox  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{bold italic underline\} \-choicelabels \{Bold Italic Underline\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-default italic\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-radiobox__ \{\-label Radiobox \-variable Radiobox  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-choices \{bold italic underline\} \-choicelabels \{Bold Italic Underline\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-default underline\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-checkbutton__ \{\-label CheckButton \-variable Checkbutton \-default 1\} \\  
> &nbsp;&nbsp;&nbsp;__\-frame__ \{\-label "Files & directories"\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-existingfile__ \{\-label "Input file" \-variable InputFile\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-file__ \{\-label "Output file" \-variable OutputFile\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-sep__ \{\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-existingdirectory__ \{\-label "Input directory" \-variable InputDirectory\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-directory__ \{\-label "Output irectory" \-variable OutputDirectory\} \\  
> &nbsp;&nbsp;&nbsp;__\-frame__ \{\-label "Colors and fonts"\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-color__ \{\-label "Background color" \-variable Color \-default red\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-sep__ \{\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-font__ \{\-label "Font" \-variable Font \-default \{Courier 12 italic\}\}\]

The __argument\_dialogbox__ defines all the specified variables with the
entered data and returns __ok__ if the data have been validated via the Ok
button\. If the data entry is cancelled by activating the Cancel button, the
__argument\_dialogbox__ returns __cancel__\.

> if \{$Result=="cancel"\} \{  
> &nbsp;&nbsp;&nbsp;puts "Canceled"  
> \} else \{ \# $Result=="ok"  
> &nbsp;&nbsp;&nbsp;puts "Arguments: "  
> &nbsp;&nbsp;&nbsp;foreach Var \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Entry1 Entry2  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Listbox1 Listbox2 DisJntListbox  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Combobox Checkbox Radiobox Checkbutton  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InputFile OutputFile InputDirectory OutputDirectory  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Color Font  
> &nbsp;&nbsp;&nbsp;\} \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts "  $Var: '\[set $Var\]'"  
> &nbsp;&nbsp;&nbsp;\}  
> \}  
> *\-> Arguments:*  
> &nbsp;&nbsp;&nbsp;*Entry1: 'Hello, this is a trial'*  
> &nbsp;&nbsp;&nbsp;*Entry2: 'my default'*  
> &nbsp;&nbsp;&nbsp;*Listbox1: '1'*  
> &nbsp;&nbsp;&nbsp;*Listbox2: '\{Choice 2\} \{Choice 3\}'*  
> &nbsp;&nbsp;&nbsp;*DisJntListbox: '\{Choice 3\} \{Choice 5\}'*  
> &nbsp;&nbsp;&nbsp;*Combobox: '3'*  
> &nbsp;&nbsp;&nbsp;*Checkbox: 'italic'*  
> &nbsp;&nbsp;&nbsp;*Radiobox: 'underline'*  
> &nbsp;&nbsp;&nbsp;*Checkbutton: '1'*  
> &nbsp;&nbsp;&nbsp;*InputFile: 'c:\\tepam\\in\.txt'*  
> &nbsp;&nbsp;&nbsp;*OutputFile: 'c:\\tepam\\out\.txt'*  
> &nbsp;&nbsp;&nbsp;*InputDirectory: 'c:\\tepam\\input'*  
> &nbsp;&nbsp;&nbsp;*OutputDirectory: 'c:\\tepam\\output'*  
> &nbsp;&nbsp;&nbsp;*Color: 'red'*  
> &nbsp;&nbsp;&nbsp;*Font: 'Courier 12 italic'*

# <a name='seealso'></a>SEE ALSO

[tepam::argument\_dialogbox\(n\)](tepam\_argument\_dialogbox\.md),
[tepam::procedure\(n\)](tepam\_procedure\.md)

# <a name='keywords'></a>KEYWORDS

[argument integrity](\.\./\.\./\.\./\.\./index\.md\#argument\_integrity), [argument
validation](\.\./\.\./\.\./\.\./index\.md\#argument\_validation),
[arguments](\.\./\.\./\.\./\.\./index\.md\#arguments), [entry
mask](\.\./\.\./\.\./\.\./index\.md\#entry\_mask), [parameter entry
form](\.\./\.\./\.\./\.\./index\.md\#parameter\_entry\_form),
[procedure](\.\./\.\./\.\./\.\./index\.md\#procedure),
[subcommand](\.\./\.\./\.\./\.\./index\.md\#subcommand)

# <a name='category'></a>CATEGORY

Procedures, arguments, parameters, options

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2013, Andreas Drollinger
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/tepam/tepam_procedure.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321

[//000000001]: # (tepam::procedure \- Tcl's Enhanced Procedure and Argument Manager)
[//000000002]: # (Generated from file 'tepam\_procedure\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2013, Andreas Drollinger)
[//000000004]: # (tepam::procedure\(n\) 0\.5\.0 tcllib "Tcl's Enhanced Procedure and Argument Manager")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tepam::procedure \- TEPAM procedure, reference manual

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [TERMINOLOGY](#section2)

  - [PROCEDURE DECLARATION](#section3)

      - [Procedure Attributes](#subsection1)

      - [Argument Declaration](#subsection2)

  - [VARIABLES](#section4)

  - [ARGUMENT TYPES](#section5)

      - [Predefined Argument Types](#subsection3)

      - [Defining Application Specific Argument Types](#subsection4)

  - [PROCEDURE CALLS](#section6)

      - [Help](#subsection5)

      - [Interactive Procedure Call](#subsection6)

      - [Unnamed Arguments](#subsection7)

      - [Named Arguments](#subsection8)

      - [Unnamed Arguments First, Named Arguments Later \(Tk
        Style\)](#subsection9)

      - [Named Arguments First, Unnamed Arguments Later \(Tcl
        Style\)](#subsection10)

      - [Raw Argument List](#subsection11)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.3  
package require tepam ?0\.5?  

[__tepam::procedure__ *name* *attributes* *body*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides an alternative way to declare Tcl procedures and to manage
its arguments\. There is a lot of benefit to declare a procedure with TEPAM
rather than with the Tcl standard command __proc__: TEPAM allows specifying
inside the procedure declaration all information that is required to generate
comprehensive documentations and help support\. The information is also used by
an automatically invoked argument checker that validates the provided procedure
arguments before the procedure body is executed\. Finally, a procedure can be
called interactively which will open a graphical form that allows specifying the
procedure arguments\.

TEPAM simplifies also the handling of the different types of argument, like the
*named arguments* \(often also called *options*\) and the *unnamed
arguments*\. TEPAM supports the *named first, unnamed later* style \(typical
Tcl command style\) as well as also the *unnamed first, named later* style
\(typical Tk command style\)\. TEPAM takes care about default values for arguments,
optional arguments, multiple applicable arguments, etc\. and eliminates the need
to check the validity of the argument inside the procedure bodies\.

An informal overview of all the TEPAM procedure declaration and calling features
as well as a short introduction into TEPAM is provided by *tepam\(n\)*\.

# <a name='section2'></a>TERMINOLOGY

The exact meaning of several terms that are used in this document will be
shortly explained to avoid any ambiguities and misunderstandings\.

  - *Subcommand*

    The usage of subcommands is heavily used in the Tcl language\. Several
    commands are incorporated into a single main command and are selectable via
    the first argument\.

    The __string__ command is an example of such a command that implements
    for example subcommands to check a character string length, to compare
    strings, to extract substrings, etc:

    > __string length__ *string*  
    > __string compare__ *string* *string*  
    > __string range__ *string* *first* *last*  
    > \.\.\.

    TEPAM provides a framework that allows implementing easily such subcommands
    in form of Tcl procedures\. It allows not only defining a first level of
    subcommands, but also a higher level of subcommands\. The __string__
    command class check could be implemented as independent sub\-sub\-commands of
    the __string__ command:

    > __string is alnum__ *string*  
    > __string is integer__ *string*  
    > __string is double__ *string*  
    > \.\.\.

  - *Procedure attribute*

    TEPAM allows attaching to a declared procedure different kind of attributes\.
    Some of these attributes are *just* used for documentation purposes, but
    other attributes specify the way how the procedure has to be called\. Also
    the procedure arguments are defined in form of a procedure attribute\.

  - *Argument*

    TEPAM uses the term *argument* for the parameters of a procedure\.

    The following example calls the subcommand __string compare__ with
    several arguments:

    > __string compare__ *\-nocase \-length 3 "emphasized" "emphasised"*

    The following paragraphs discuss these different argument types\.

  - *Named argument*

    Some parameters, as *\-length 3* of the subcommand __string compare__
    have to be provided as pairs of argument names and argument values\. This
    parameter type is often also called *option*\.

    TEPAM uses the term *named argument* for such options as well as for the
    flags \(see next item\)\.

  - *Flag, switch*

    Another parameter type is the *flag* or the *switch*\. Flags are provided
    simply by naming the flag leading with the '\-' character\. The *\-nocase* of
    the previous __string compare__ example is such a flag\.

    *Flags* are considered by TEPAM like a special form of *named
    arguments*\.

  - *Unnamed argument*

    For the other parameters, e\.g\. the ones for which the argument name has not
    to be mentioned, TEPAM uses the term *unnamed argument*\. The previous
    __string compare__ example uses for the two provided character strings
    two *unnamed arguments*\.

  - *Argument attribute*

    TEPAM allows describing the purpose of each procedure argument with
    *argument attributes*\. While some of them are just documenting the
    attributes, most attributes are used by an argument manager to control and
    validate the arguments that are provided during a procedure call\. Argument
    attributes are used to specify default values, parameter classes \(integer,
    xdigit, font, \.\.\.\), choice validation lists, value ranges, etc\.

  - *Named arguments first, unnamed arguments later*

    The __string compare__ command of the previous example requires that the
    *named arguments* \(options, flags\) are provided first\. The two mandatory
    \(unnamed\) arguments have to be provided as last argument\.

    > __string compare__ *\-nocase \-length 3 Water $Text*

    This is the usual Tcl style \(exceptions exist\) which is referred in the
    TEPAM documentation as *named arguments first, unnamed arguments later
    style*\.

  - *Unnamed arguments first, named arguments later*

    In contrast to most Tcl commands, Tk uses generally \(exceptions exist also
    here\) a different calling style where the *unnamed arguments* have to be
    provided first, before the *named arguments* have to be provided:

    > __pack__ *\.ent1 \.ent2 \-fill x \-expand yes \-side left*

    This style is referred in the TEPAM documentation as *unnamed arguments
    first, named arguments later style*\.

# <a name='section3'></a>PROCEDURE DECLARATION

TEPAM allows declaring new Tcl procedures with the command
__tepam::procedure__ that has similar to the standard Tcl command
__proc__ also 3 arguments:

  - <a name='1'></a>__tepam::procedure__ *name* *attributes* *body*

The TEPAM procedure declaration syntax is demonstrated by the following example:

> __tepam::procedure__ \{display message\} \{  
> &nbsp;&nbsp;&nbsp;\-short\_description  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Displays a simple message box"  
> &nbsp;&nbsp;&nbsp;\-description  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"This procedure allows displaying a configurable\\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message box\. The default message type that is\\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;created is a warning, but also errors and info can\\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;be generated\.  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The procedure accepts multiple text lines\."  
> &nbsp;&nbsp;&nbsp;\-example  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{display message \-mtype Warning "Save first your job"\}  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-mtype \-choices \{Info Warning Error\} \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-default Warning \-description "Message type"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{text   \-type string \-multiple \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\-description "Multiple text lines to display"\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;puts "Message type: $mtype"  
> &nbsp;&nbsp;&nbsp;puts "Message: $text"  
> \}

The 3 arguments of __procedure__ are:

  - *name*

    The procedure name can be used in very flexible ways\. Procedure names can
    have namespace qualifiers\. By providing a two element name list as procedure
    name, a subcommand of a procedure will be declared\. It is even possible to
    declare sub\-sub\-commands of a procedure by providing name lists with three
    elements\.

    Here are some valid procedure declarations using different procedure names
    \(the attribute and body arguments are empty for simplicity\):

> *\# Simple procedure name:*  
> tepam::procedure __display\_message__ \{\} \{\}  
> **  
> *\# Procedure declared in the main namespace:*  
> tepam::procedure __::display\_message__ \{\} \{\}  
> **  
> *\# Procedure in the namespace* __::ns__*:*  
> tepam::procedure __::ns::display\_message__ \{\} \{\}  
> **  
> *\# Declaration of the subcommand* __message__ *of the procedure* __display__*:*  
> tepam::procedure __\{display message\}__ \{\} \{\}

  - *attributes*

    All procedure attributes are provided in form of an option list that
    contains pairs of option names and option values\. The example above has as
    procedure attribute a short and a normal description, but also the procedure
    arguments are defined in form of a procedure attribute\.

    Most procedure attributes are providing information for documentation
    purposes\. But some of them affect also the way how the procedure can be
    called\. The section [Procedure Attributes](#subsection1) discusses in
    detail the available procedure attributes\.

    The procedure arguments are defined in form of a special procedure
    attribute\. Most of the information provided in the argument definition is
    not just used for documentation purposes\. This information is in fact used
    by the TEPAM argument manager to handle and validate the various forms of
    arguments that are provided during the procedure calls\. The section
    [Argument Declaration](#subsection2) discusses in detail all the
    argument definition attributes\.

  - *body*

    This is the normal procedure body\. The declared arguments will be available
    to the procedure body in form of variables\.

    The procedure body will only be executed if the provided set of arguments
    could be validated by the TEPAM argument manager\.

> tepam::procedure \{display\_message\} \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-__mtype__ \-default Warning \-choices \{Warning Error\}\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{__text__ \-type string\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;puts "Message type: __$mtype__"  
> &nbsp;&nbsp;&nbsp;puts "Message: __$text__"  
> \}

The commands __[procedure](\.\./\.\./\.\./\.\./index\.md\#procedure)__ as well as
__argument\_dialogbox__ are exported from the namespace __tepam__\. To use
these commands without the __tepam::__ namespace prefix, it is sufficient to
import them into the main namespace:

> __namespace import tepam::\*__  
>   
> __[procedure](\.\./\.\./\.\./\.\./index\.md\#procedure)__ \{display\_message\} \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\.\.\.

## <a name='subsection1'></a>Procedure Attributes

The first group of attributes affect the behavior of the declared procedure:

  - \-named\_arguments\_first __0__&#124;__1__

    This attribute defines the calling style of a procedure\. TEPAM uses by
    default the *named arguments first, unnamed arguments later* style \(Tcl\)\.
    This default behavior can globally be changed by setting the variable
    __tepam::named\_arguments\_first__ to __0__\. This global calling style
    can be changed individually for a procedure with the
    *\-named\_arguments\_first* attribute\.

  - \-auto\_argument\_name\_completion __0__&#124;__1__

    The declared procedures will by default automatically try to match
    eventually abbreviated argument names to the defined arguments names\. This
    default behavior can globally be changed by setting the variable
    __tepam::auto\_argument\_name\_completion__ to __0__\. This global
    setting of the automatic argument name completion can be changed
    individually for a procedure with the *\-auto\_argument\_name\_completion*
    procedure attribute\.

  - \-interactive\_display\_format __extended__&#124;__short__

    A procedure declared with the TEPAM __procedure__ command can always be
    called with the __\-interactive__ option\. By doing so, a graphical form
    will be generated that allows specifying all procedure argument values\.
    There are two display modes for these interactive forms\. While the
    *extended* mode is more adapted for small procedure argument sets, the
    __short__ form is more adequate for huge procedure argument sets\.

    The choice to use short or extended forms can be globally configured via the
    variable __tepam::interactive\_display\_format__\. This global setting can
    then be changed individually for a procedure with the
    *\-interactive\_display\_format* procedure attribute\.

  - \-args *list*

    The procedure arguments are declared via the *\-args* attribute\. An
    argument is defined via a list having as first element the argument name,
    followed by eventual argument attributes\. All these argument definition
    lists are packaged themselves into a global list that is assigned to the
    *\-args* attribute\.

    The argument definition syntax will be described more in detail in the
    following sub section\.

The next attributes allow specifying custom argument checks as well as custom
error messages in case these checks are failing:

  - \-validatecommand *script*

    Custom argument validations can be performed via specific validation
    commands that are defined with the *\-validatecommand* attribute\.

    Validation command declaration example:

> tepam::procedure \{display\_message\} \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{text \-type string \-description "Message text"\} \}  
> &nbsp;&nbsp;&nbsp;__\-validatecommand \{IllegalWordDetector $text\}__  
> \} \{  
> \}

    The validation command is executed in the context of the declared procedure
    body\. The different argument values are accessed via the argument names\.
    Note there is also an argument attribute *\-validatecommand* that allows
    declaring custom checks for specific arguments\.

    The attribute *\-validatecommand* can be repeated to declare multiple
    custom checks\.

  - \-validatecommand\_error\_text *string*

    This attribute allows overriding the default error message for a custom
    argument validation \(defined by *\-validatecommand*\)\. Also this attribute
    can be repeated in case multiple argument checks are declared\.

The following attribute allows controlling the logging settings for an
individual procedure:

  - \-command\_log __0__&#124;__1__&#124;__"interactive"__

    This argument configures the logging of the procedure calls into the list
    variable __tepam::ProcedureCallLogList__\. The default configuration
    defined by the variable __tepam::command\_log__ will be used if this
    argument is not defined in a procedure declaration\.

    Setting this argument to __0__ will disable any procedure call loggings,
    setting it to __1__ will log any procedure calls and setting it to
    __interactive__ will log just the procedures that are called
    interactively \(procedures called with the __\-interactive__ flag\)\.

The next group of procedure attributes is just used for the purpose of
documentation and help text generation:

  - \-category *string*

    A category can be assigned to a procedure for documentation purposes\. Any
    string is accepted as category\.

  - \-short\_description *string*

    The short description of a procedure is used in the documentation summary of
    a generated procedure list as well as in the NAME section of a generated
    procedure manual page\.

  - \-description *string*

    The \(full\) description assigned to a procedure is used to create user manual
    and help pages\.

  - \-return *string*

    The *\-return* attribute allows defining the expected return value of a
    procedure \(used for documentation purposes\)\.

  - \-example *string*

    A help text or manual page of a procedure can be enriched with eventual
    examples, using the *\-example* attribute\.

## <a name='subsection2'></a>Argument Declaration

The following example shows the structure that is used for the argument
definitions in the context of a procedure declaration:

> tepam::procedure \{display\_message\} \{  
> &nbsp;&nbsp;&nbsp;\-args __\{__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{\-mtype \-default Warning \-choices \{Info Warning Error\} \-description "Message type"\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{\-font \-type font \-default \{Arial 10 italic\} \-description "Message text font"\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{\-level \-type integer \-optional \-range \{1 10\} \-description "Message level"\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{\-fg \-type color \-optional \-description "Message color"\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{\-log\_file \-type file \-optional \-description "Optional message log file"\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{text \-type string \-multiple \-description "Multiple text lines to display"\}__  
> &nbsp;&nbsp;&nbsp;__\}__  
>   
> \} \{  
> \}

Each of the procedure arguments is declared with a list that has as first
element the argument name, followed by eventual attributes\. The argument
definition syntax can be formalized in the following way:

> tepam::procedure <name> \{  
> &nbsp;&nbsp;&nbsp;\-args __\{__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{<argument\_name\_1> <arg\_attr\_name\_1a> <arg\_attr\_value\_1a>  <arg\_attr\_name\_1b> <arg\_attr\_value\_1b> \.\.\.\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{<argument\_name\_2> <arg\_attr\_name\_2a> <arg\_attr\_value\_2a>  <arg\_attr\_name\_2b> <arg\_attr\_value\_2b> \.\.\.\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\.\.\.__  
> &nbsp;&nbsp;&nbsp;__\}__  
>   
> \} <body>

The argument names and attributes have to be used in the following way:

  - Argument name \(*<argument\_name\_<n>>*\)

    The provided argument name specifies whether the argument is an *unnamed
    argument* or a *named argument*\. In addition to this, an argument name
    can also be blank to indicate an argument comment, or it can start with \# to
    indicate a section comment\.

      * *"<Name>"*

        This is the simplest form of an argument name: An argument whose name is
        not starting with '\-' is an *unnamed argument*\. The parameter provided
        during a procedure call will be assigned to a variable with the name
        *<Name>*\.

> tepam::procedure \{print\_string\} \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{__[text](\.\./\.\./\.\./\.\./index\.md\#text)__ \-type string \-description "This is an unnamed argument"\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;puts __$text__  
> \}  
>   
> print\_string __"Hello"__  
> &nbsp;*\-> Hello*

      * *"\-<Name>"*

        An argument whose name starts with '\-' is a *named argument* \(also
        called *option*\)\. The parameter provided during a procedure call will
        be assigned to a variable with the name *<Name>* \(not *\-<Name>*\)\.

> tepam::procedure \{print\_string\} \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{__\-text__ \-type string \-description "This is a named argument"\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;puts __$text__  
> \}  
>   
> print\_string __\-text "Hello"__  
> &nbsp;*\-> Hello*

      * *"\-\-"*

        This flag allows clearly specifying the end of the named arguments and
        the beginning of the unnamed arguments, in case the *named arguments
        first, unnamed arguments later style \(Tcl\)* has been selected\.

        If the *unnamed arguments first, named arguments later style \(Tk\)*
        style is selected, this flag is ignored if the unnamed arguments have
        already been parsed\. Otherwise it will be assigned to the corresponding
        unnamed argument\.

      * *"\-"* or *""*

        A blank argument name \(either '\-' or *''*\) starts a comment for the
        following arguments\.

> tepam::procedure \{print\_time\} \{  
> &nbsp;&nbsp;&nbsp;\-interactive\_display\_format short  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{hours \-type integer \-description "Hour"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{minutes \-type integer \-description "Minute"\}  
>   
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{\- The following arguments are optional:\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{seconds \-type integer \-default 0 \-description "Seconds"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{milliseconds \-type integer \-default 0 \-description "Milliseconds"\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;puts "$\{hour\}h$\{minutes\}:\[expr $seconds\+0\.001\*$milliseconds\]"  
> \}

        Argument comments are basically used in the graphical argument
        definition forms that are created if a procedure is called
        interactively\.

      * *"\#\*"*

        An argument definition list that starts with '\#' is considered as a
        section comment\. The argument definition list will be trimmed from the
        '\#' characters and the remaining string will be used as section comment\.

        Section comments can be used to structure visually the argument
        definition code\. Section comments are also used to structure the
        generated help texts and the interactive argument definition forms\.

> tepam::procedure \{complex\_multiply\} \{  
> &nbsp;&nbsp;&nbsp;\-description "This function perform a complex multiplication"  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{\#\#\#\# First complex number \#\#\#\#\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-r0 \-type double \-description "First number real part"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-i0 \-type double \-description "First number imaginary part"\}  
>   
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{\#\#\#\# Second complex number \#\#\#\#\}__  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-r1 \-type double \-description "Second number real part"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-i1 \-type double \-description "Second number imaginary part"\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;return \[expr $r0\*$r1 \- $i0\*$i1\]  
> \}

  - Argument attributes \(*<arg\_attr\_name\_<mn>> <arg\_attr\_value\_<mn>>*\)

    The following argument attributes are supported:

      * \-description *string*

        The description argument attribute is used for documentation purpose\.
        Interactive argument definition forms use this attribute to provide
        explanations for an argument\.

      * \-type *type*

        The type argument attribute allows assigning the argument either to a
        predefined data type, or to an application specific data type\. The
        argument values that are provided during a procedure call are
        automatically checked with respect to the defined argument type\.

        The section [ARGUMENT TYPES](#section5) provides a list of
        predefined data types and explains how application specific types can be
        specified\.

        The argument type *none* has a special meaning\. An argument that has
        the type *none* is handled as a *flag*\. A flag is always optional
        and its related variable contains the logical value __1__ if the
        flag has been defined during the procedure call, or otherwise __0__\.

      * \-default *value*

        Eventual default values can be defined with the \-default argument
        attribute\. Arguments with default values are automatically optional
        arguments\.

      * \-optional&#124;\-mandatory

        Arguments are by default mandatory, unless a default value is defined\.
        The flag *\-optional* transforms an argument into an optional argument\.

        In case an optional argument is not defined during a procedure call, the
        corresponding variable will not be defined\. The flag *\-mandatory* is
        the opposite to *\-optional*\. This flag exists only for completion
        reason, since an argument is anyway mandatory by default\.

      * \-multiple

        Arguments that have the *\-multiple* attribute can be defined multiple
        times during a procedure call\. The values that are provided during a
        procedure call for such an argument are stored in a list variable\. This
        is even the case if such an argument is only defined once during a
        procedure call\.

        The *\-multiple* attribute can be attributed to unnamed arguments and
        to named arguments\. The pair of argument name/argument value has to be
        repeated for each provided value in case of a named argument\. In case
        the argument with the *\-multiple* attribute is an unnamed argument,
        this one has to be the absolute last one of all unnamed arguments\.

      * \-choices *list*

        A possible set of valid argument values can be attributed to an argument
        via the *\-choices* attribute\. The argument value provided during a
        procedure call will be checked against the provided choice values\.

      * \-choicelabels *list*

        An eventual short description can be attributed to each choice option
        with the *\-choicelabels* attribute\. These descriptions will be used in
        the generated help texts and as radio and check box labels for the
        interactive calls\.

        The *\-choicelabels* attribute is optional, but if it is defined, its
        list needs to have the identical size as the *\-choices* argument list\.

      * \-range *\{double double\}*

        Another argument constraint can be defined with the *\-range*
        attribute\. The valid range is defined with a list containing the minimum
        valid value and a maximum valid value\. The *\-range* attribute has to
        be used only for numerical arguments, like integers and doubles\.

      * \-validatecommand *script*

        Custom argument value validations can be performed via specific
        validation commands that are defined with the *\-validatecommand*
        attribute\. The provided validation command can be a complete script in
        which the pattern *%P* is replaced by the argument value that has to
        be validated\.

        Validation command declaration example:

> tepam::procedure \{display\_message\} \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{text \-type string \-description "Message text" \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-validatecommand \{IllegalWordDetector %P\}__\}  
> \} \{  
> \}

        While the purpose of this custom argument validation attribute is the
        validation of a specific argument, there is also a global attribute
        *\-validatecommand* that allows performing validation that involves
        multiple arguments\.

      * \-validatecommand\_error\_text *string*

        This attribute allows overriding the default error message for a custom
        argument validation \(defined by *\-validatecommand*\)\.

      * \-widget *string*

        The widgets that allow defining the different arguments in case of an
        interactive procedure call are normally selected automatically in
        function of the argument type\. The *\-widget* attribute allows
        specifying explicitly a certain widget type for an argument\.

      * \-auxargs *list*

        In case a procedure is called interactively, additional argument
        attributes can be provided to the interactive argument definition form
        via the *\-auxargs* attribute that is itself a list of attribute
        name/attribute value pairs:

            -auxargs {-<arg_attr_name_1a> <arg_attr_value_1a> \
                      -<arg_attr_name_1b> <arg_attr_value_1b>
                      ...
            }

        For example, if a procedure takes as argument a file name it may be
        beneficial to specify the required file type for the interactive
        argument definition form\. This information can be provided via the
        *\-auxargs* attribute to the argument definition form:

> tepam::procedure LoadPicture \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{FileName \-type existingfile \-description "Picture file" \\  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\-auxargs \{\-filetypes \{\{"GIF" \{\*\.gif\}\} \{"JPG" \{\*\.jpg\}\} \}\}__\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> \}

      * \-auxargs\_commands *script*

        If the auxiliary argument attributes are not static but have to be
        dynamically adaptable, the *\-auxargs\_commands* allows defining them
        via commands that are executed during a procedure call\. A list of pairs
        of auxiliary attribute names and commands has to be provided to the
        *\-auxargs\_commands* attribute\. The provided commands are executed in
        the context of the calling procedure\.

            -auxargs_commands {-<arg_attr_name_1a> <arg_attr_command_1a> \
                               -<arg_attr_name_1b> <arg_attr_command_1b>
                               ...
            }

# <a name='section4'></a>VARIABLES

Several variables defined inside the __::tepam__ namespace impact the mode
of operation of the procedures that have been declared with the TEPAM
__procedure__ command\.

  - __named\_arguments\_first__

    This variable defines the general calling style of the procedures\. It is by
    default set to __1__ which selects the *named arguments first, unnamed
    arguments later* style \(Tcl style\)\.

    By setting this variable to __0__, the *named arguments first, unnamed
    arguments later* style is globally selected \(Tk style\):

        set tepam::named_arguments_first 0

    While this variable defines the general calling style, the procedure
    attribute *\-named\_arguments\_first* can adapt this style individually for
    each declared procedure\.

  - __auto\_argument\_name\_completion__

    This variable controls the general automatic argument name matching mode\. By
    default it is set to __1__, meaning that the called procedures are
    trying to match eventually abbreviated argument names with the declared
    argument names\.

    By setting this variable to __0__ the automatic argument name matching
    mode is disabled:

        set tepam::auto_argument_name_completion 0

    While this variable defines the general matching mode, the procedure
    attribute *\-auto\_argument\_name\_completion* can adapt this mode
    individually for each declared procedure\.

  - __interactive\_display\_format__

    A procedure declared via the TEPAM __procedure__ command can always be
    called with the __\-interactive__ switch\. By doing so, a graphical form
    will be generated that allows entering interactively all procedure
    arguments\.

    There are two display modes for these interactive forms\. The *extended*
    mode which is the default mode is more adapted for small procedure argument
    sets\. The __short__ form is more adequate for huge procedure argument
    sets:

        set tepam::interactive_display_format "short"

    The choice to use short or extended forms can be globally configured via the
    variable __interactive\_display\_format__\. This global setting can be
    changed individually for a procedure with the procedure attribute
    *\-interactive\_display\_format*\.

  - __help\_line\_length__

    The maximum line length used by the procedure help text generator can be
    specified with this variable\. The default length which is set to 80
    \(characters\) can easily be adapted to the need of an application:

        set tepam::help_line_length 120

    Since this variable is applied directly during the help text generation, its
    value can continuously be adapted to the current need\.

  - __command\_log__

    Procedure calls can be logged inside the list variable
    __tepam::ProcedureCallLogList__\. The variable __tepam::command\_log__
    controls the default logging settings for any procedures\. The following
    configurations are supported:

      * *0*: Disables any procedure call loggings

      * *1*: Enables any procedure call loggings

      * *"interactive"*: Will log any procedures called interactively \(e\.g\.
        procedures called with the \-interactive flag\)\. This is the default
        configuration\.

    This default logging configuration can be changed individually for each
    procedure with the *\-command\_log* attribute\.

# <a name='section5'></a>ARGUMENT TYPES

TEPAM provides a comprehensive set of procedure argument types\. They can easily
be completed with application specific types if necessary\.

## <a name='subsection3'></a>Predefined Argument Types

To remember, a type can be assigned to each specified procedure argument:

> tepam::procedure \{warning\} \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-font __\-type font__ \-default \{Arial 10 italic\}\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-severity\_level __\-type integer__ \-optional \-range \{1 10\}\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-fg __\-type color__ \-optional \-description "Message color"\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{text __\-type string__ \-multiple \-description "Multiple text lines to display"\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;\.\.\.  
> \}

There are some *special purpose types* that are building the first category of
predefined argument types:

  - __none__ A *flag*, also called *switch*, is defined as a named
    argument that has the type __none__\. Flags are always optional and the
    default value of the assigned variable is set to __0__\. In contrast to
    the \(normal\) named arguments, no argument value has to be provided to a
    flag\.

> tepam::procedure flag\_test \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__\{\-flag \-type none \-description "This is a flag"\}__  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;puts __$flag__  
> \}  
>   
> flag\_test  
> *\-> 0*  
>   
> flag\_test \-flag  
> *\-> 1*

    Since no argument value has to be provided to a flag, also no data check is
    performed for this argument type\.

  - __string__ __String__ is a generic argument data type\. Any data
    string can be provided to a string type argument and no data type checks are
    therefore performed\. The string type allows defining single line strings
    during the interactive procedure calls\.

  - __text__ __Text__ is identical to __string__ with the only
    difference that it allows entering multi line strings during interactive
    procedure calls\.

  - __\{\}__ A __blank__ argument type signifies an undefined argument
    type\. This is the default argument type that will be used if no type has
    been explicitly specified\. An argument that has a __blank__ type behaves
    identically than an argument that has a __string__ type, e\.g\. no
    argument data checks are performed\. The only difference is that the data
    type __string__ is mentioned in the generated help documentation, while
    this is not the case for the __blank__ type\.

Several *numerical types* are defined by TEPAM\. The type validation procedures
are using the __string is <type> \-strict__ commands to check the validity of
the provided arguments, which assures that no empty strings are accepted as
argument value\. The type validation expression for the numerical types and the
argument types to which this expression is applied are:

> string is __<type\_to\_check>__ \-strict *<argument\_value>*

  - *boolean*

  - *integer*

  - *double*

Empty strings are accepted as argument value for all the alpha numeric argument
types\. The argument types that are falling into this category and validation
expression used for them are:

> string is *<type\_to\_check>* *<argument\_value>*

  - *alnum*

  - *alpha*

  - *ascii*

  - *control*

  - *digit*

  - *graph*

  - *lower*

  - *print*

  - *punct*

  - *space*

  - *upper*

  - *wordchar*

  - *xdigit*

In addition to the data types checked with the __string is <type>__
commands, TEPAM specifies some other useful data types:

  - *char* Each string that has a length of 1 character meets the
    *character* type\. The type check is made with the following expression:

> expr \[string length *<argument\_value>*\]==1

  - *color* Any character strings that are accepted by Tk as a color are
    considered as valid color argument\. Please note that the Tk package has to
    be loaded to use the type *color*\. TEPAM is using the following command to
    validate the color type:

> expr \!\[catch \{winfo rgb \. *<argument\_value>*\}\]

  - *font* Any character strings that are accepted by Tk as a font are
    considered as valid font argument\. Please note that the Tk package has to be
    loaded to use the *font* type\. TEPAM is using the following command to
    validate the color type:

        expr ![catch {font measure <argument_value> ""}]

  - *file* Any strings that are not containing one of the following characters
    are considered as valid file names: \* ? " < >\. It is not necessary that the
    file and its containing directory exist\. Zero\-length strings are not
    considered as valid file names\.

    The following expression is used to validate the file names:

        expr [string length <argument_value>]>0 && ![regexp {[\"*?<>:]} <argument_value>]

  - *existingfile* The argument is valid if it matches with an existing file\.
    The following check is performed to validate the arguments of this type:

        file exists <argument_value>

  - *directory* The directory argument is validated exactly in the same way as
    the file arguments\.

  - *existingdirectory* The argument is valid if it matches with an existing
    directory\. The following check is performed to validate the arguments of
    this type:

        file isdirectory <argument_value>

## <a name='subsection4'></a>Defining Application Specific Argument Types

To add support for a new application specific argument type it is just necessary
to add into the namespace __tepam__ a validation function
__Validation\(<type>\)__\. This function requires one argument\. It has to
returns __1__ if the provided argument matches with the relevant data type\.
The function has to return otherwise __0__\.

The validation command section of the "tepam\.tcl" package provides sufficient
examples of validation functions, since it implements the ones for the standard
TEPAM types\.

The following additional code snippet shows the validation function for a custom
argument type that requires values that have a character string length of
exactly 2:

    proc tepam::Validate(two_char) {v} {expr {[string length $v]==2}}

# <a name='section6'></a>PROCEDURE CALLS

## <a name='subsection5'></a>Help

Each procedure can be called with the *\-help* flag\. The procedure will then
print a generated help text to *stdout* and will then return without
performing any additional actions\.

Taking the first procedure declared in [PROCEDURE CALLS](#section6), the
help request and the printed help text would be:

> __display message \-help__  
> *\->*  
> *NAME*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*display message \- Displays a simple message box*  
> *SYNOPSIS*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*display message*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*\[\-mtype <mtype>\]*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Message type, default: "Warning", choices: \{Info, Warning, Error\}*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<text>*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Multiple text lines to display, type: string*  
> *DESCRIPTION*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*This procedure allows displaying a configurable message box\. The default*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*message type that is created is a warning, but also errors and info can*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*be generated\.*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*The procedure accepts multiple text lines\.*  
> *EXAMPLE*  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*display message \-mtype Warning "Save first your job"*

The argument manager is checking if the last provided argument is *\-help* and
generates the requested help message if this is the case\. So, also the following
example will print the help message:

> __display message \-mtype Info "It is 7:00" \-help__

On the other hand, the following call will result in an error:

> __display message \-help \-mtype Info "It is 7:00"__  
> *\->*  
> *display message: Argument '\-help' not known*

## <a name='subsection6'></a>Interactive Procedure Call

If Tk has been loaded a procedure can be called with the *\-interactive* flag
to open a graphical form that allows specifying interactively all procedure
arguments\. The following example assures that the Tk library is loaded and shows
the command line to call interactively the procedure declared in [PROCEDURE
CALLS](#section6):

> package require Tk  
> __display message \-interactive__

Also the *\-interactive* flag has to be placed at the last argument position as
this is also required for the *\-help* flag\. Arguments defined before the
*\-interactive* flag will be ignored\. The following example is therefore also a
valid interactive procedure call:

> __display message__ \-mtype Info "It is 7:00" __\-interactive__

## <a name='subsection7'></a>Unnamed Arguments

Unnamed arguments are typically provided to the called procedure as simple
parameters\. This procedure calling form requires that the provided arguments are
strictly following the order of the specified arguments\. Several parameters can
be assigned to the last argument if this one has the *\-multiple* attribute\.
So, the following declared procedure \.\.\.

    tepam::procedure {display_message} {
       -args {
          {mtype -choices {Info Warning Error}}
          {text -type string -multiple}
       }
    } {
       puts "$mtype: [join $text]"
    }

\.\.\. can for example be called in the following ways:

> __display\_message Info "It is PM 7:00\."__  
> *\-> Info: It is PM 7:00\.*  
>   
> __display\_message Info "It is PM 7:00\." "You should go home\."__  
> *\-> Info: It is PM 7:00\. You should go home\.*

The nice thing is that unnamed arguments can also be called as named arguments,
which can be handy, for example if the exact specified argument order is not
known to a user:

> __display\_message \-mtype Info \-text "It is PM 7:00\."__  
> *\-> Info: It is PM 7:00\.*  
>   
> __display\_message \-text "It is PM 7:00\." \-mtype Info__  
> *\-> Info: It is PM 7:00\.*  
>   
> __display\_message \-mtype Info \-text "It is PM 7:00\." \-text "You should go home\."__  
> *\-> Info: It is PM 7:00\. You should go home\.*  
>   
> __display\_message \-text "It is PM 7:00\." \-text "You should go home\." \-mtype Info__  
> *\-> Info: It is PM 7:00\. You should go home\.*

## <a name='subsection8'></a>Named Arguments

Named arguments have to be provided to a procedure in form of a parameter pairs
composed by the argument names and the argument values\. The order how they are
provided during a procedure call is irrelevant and has not to match with the
argument specification order\.

The following declared procedure \.\.\.

    tepam::procedure {display_message} {
       -args {
          {-mtype -choices {Info Warning Error}}
          {-text -type string -multiple}
       }
    } {
       puts "$mtype: [join $text]"
    }

\.\.\. can be called in the following ways:

> __display\_message \-mtype Info \-text "It is PM 7:00\."__  
> *\-> Info: It is PM 7:00\.*  
>   
> __display\_message \-text "It is PM 7:00\." \-mtype Info__  
> *\-> Info: It is PM 7:00\.*  
>   
> __display\_message \-mtype Info \-text "It is PM 7:00\." \-text "You should go home\."__  
> *\-> Info: It is PM 7:00\. You should go home\.*  
>   
> __display\_message \-text "It is PM 7:00\." \-text "You should go home\." \-mtype Info__  
> *\-> Info: It is PM 7:00\. You should go home\.*

Also named arguments that have not the *\-multiple* attribute can be provided
multiple times\. Only the last provided argument will be retained in such a case:

> __display\_message \-mtype Info \-text "It is PM 7:00\." \-mtype Warning__  
> *\-> Warning: It is PM 7:00\.*

## <a name='subsection9'></a>Unnamed Arguments First, Named Arguments Later \(Tk Style\)

A procedure that has been defined while the variable
__tepam::named\_arguments\_first__ was set to 1, or with the procedure
attribute *\-named\_arguments\_first* set to 1 has to be called in the Tcl style\.
The following procedure declaration will be used in this section to illustrate
the meaning of this calling style:

> __set tepam::named\_arguments\_first 1__  
> tepam::procedure my\_proc \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-n1 \-default ""\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-n2 \-default ""\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{u1 \-default ""\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{u2 \-default ""\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;puts "n1:'$n1', n2:'$n2', u1:'$u1', u2:'$u2'"  
> \}

The unnamed arguments are placed at the end of procedure call, after the named
arguments:

> my\_proc __\-n1 N1 \-n2 N2 U1 U2__  
> *\-> n1:'N1', n2:'N2', u1:'U1', u2:'U2'*

The argument parser considers the first argument that doesn't start with the '\-'
character as well as all following arguments as unnamed argument:

> my\_proc __U1 U2__  
> *\-> n1:'', n2:'', u1:'U1', u2:'U2'*

Named arguments can be defined multiple times\. If the named argument has the
*\-multiply* attribute, all argument values will be collected in a list\.
Otherwise, only the last provided attribute value will be retained:

> my\_proc __\-n1 N1 \-n2 N2 \-n1 M1 U1 U2__  
> *\-> n1:'M1', n2:'N2', u1:'U1', u2:'U2'*

The name of the first unnamed argument has therefore not to start with the '\-'
character\. The unnamed argument is otherwise considered as name of another named
argument\. This is especially important if the first unnamed argument is given by
a variable that can contain any character strings:

> my\_proc __\-n1 N1 \-n2 N2 "\->" "<\-"__  
> *\-> my\_proc: Argument '\->' not known*  
>   
> set U1 "\->"  
> my\_proc __\-n1 N1 \-n2 N2 $U1 U2__  
> my\_proc: Argument '\->' not known

The '\-\-' flag allows separating unambiguously the unnamed arguments from the
named arguments\. All data after the '\-\-' flag will be considered as unnamed
argument:

> my\_proc __\-n1 N1 \-n2 N2 \-\- "\->" "<\-"__  
> *\-> n1:'N1', n2:'N2', u1:'\->', u2:'<\-'*  
>   
> set U1 "\->"  
> my\_proc __\-n1 N1 \-n2 N2 \-\- $U1 U2__  
> *\-> n1:'N1', n2:'N2', u1:'\->', u2:'<\-'*

## <a name='subsection10'></a>Named Arguments First, Unnamed Arguments Later \(Tcl Style\)

The Tk calling style will be chosen if a procedure is defined while the variable
__tepam::named\_arguments\_first__ is set to 0, or if the procedure attribute
*\-named\_arguments\_first* has been set to 0\. The following procedure will be
used in this section to illustrate this calling style:

> __set tepam::named\_arguments\_first 0__  
> tepam::procedure my\_proc \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-n1 \-default ""\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-n2 \-default ""\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{u1\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{u2 \-default "" \-multiple\}  
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;puts "n1:'$n1', n2:'$n2', u1:'$u1', u2:'$u2'"  
> \}

The unnamed arguments have to be provided first in this case\. The named
arguments are provided afterwards:

> my\_proc __U1 U2 \-n1 N1 \-n2 N2__  
> *\-> n1:'N1', n1:'N1', u1:'U1', u2:'U2'*

The argument parser will assign to each defined unnamed argument a value before
it switches to read the named arguments\. This default behavior changes a bit if
there are unnamed arguments that are optional or that can take multiple values\.

An argument value will only be assigned to an unnamed argument that is optional
\(that has either the *\-optional* attribute or that has a default value\), if
the value is not beginning with the '\-' character or if no named arguments are
defined\. The value that starts with '\-' is otherwise considered as the name of a
named argument\.

Argument values are assigned to an argument that has the *\-multiple* attribute
as long as the parameter value doesn't starts with the '\-' character\.

Values that start with the '\-' character can therefore not be assigned to
optional unnamed arguments, which restricts the usage of the Tcl procedure
calling style\. The Tk style may be preferable in some cases, since it allows
separating unambiguously the named arguments from the unnamed ones with the '\-\-'
flag\.

Let's explore in a bit less theoretically the ways how the previously defined
procedure can be called: The first example calls the procedure without any
parameters, which leads to an error since *u1* is a mandatory argument:

> my\_proc  
> *\-> my\_proc: Required argument is missing: u1*

The procedure call is valid if one parameter is provided for *u1*:

> my\_proc __U1__  
> *\-> n1:'', n2:'', u1:'U1', u2:''*

If more parameters are provided that are not starting with the '\-' character,
they will be attributed to the unnamed arguments\. *U2* will receive 3 of these
parameters, since it accepts multiple values:

> my\_proc __U1 U2 U3 U4__  
> *\-> n1:'', n2:'', u1:'U1', u2:'U2 U3 U4'*

As soon as one parameter starts with '\-' and all unnamed arguments have been
assigned, the argument manager tries to interpret the parameter as name of a
named argument\. The procedure call will fail if a value beginning with '\-' is
assigned to an unnamed argument:

> my\_proc __U1 U2 U3 U4 \-U5__  
> *\-> my\_proc: Argument '\-U5' not known*

The attribution of a parameter to a named argument will fail if there are
undefined unnamed \(non optional\) arguments\. The name specification will in this
case simply be considered as a parameter value that is attributed to the
*next* unnamed argument\. This was certainly not the intention in the following
example:

> my\_proc __\-n1 N1__  
> *\-> n1:'', n2:'', u1:'\-n1', u2:'N1'*

The situation is completely different if values have already been assigned to
all mandatory unnamed arguments\. A parameter beginning with the '\-' character
will in this case be considered as a name identifier for a named argument:

> my\_proc __U1 \-n1 N1__  
> *\-> n1:'N1', n2:'', u1:'U1', u2:''*

No unnamed arguments are allowed behind the named arguments:

> my\_proc __U1 \-n1 N1 U2__  
> *\-> my\_proc: Argument 'U2' is not an option*

The '\-\-' flag has no special meaning if not all mandatory arguments have got
assigned a value\. This flag will simply be attributed to one of the unnamed
arguments:

> my\_proc __\-\- \-n1 N1__  
> *\-> n1:'N1', n2:'', u1:'\-\-', u2:''*

But the '\-\-' flag is simply ignored if the argument parser has started to handle
the named arguments:

> my\_proc __U1 \-\- \-n1 N1__  
> *\-> n1:'N1', n2:'', u1:'U1', u2:''*  
>   
> my\_proc __U1 \-n1 N1 \-\- \-n2 N2__  
> *\-> n1:'N1', n2:'N2', u1:'U1', u2:''*

## <a name='subsection11'></a>Raw Argument List

It may be necessary sometimes that the procedure body is able to access the
entire list of arguments provided during a procedure call\. This can happen via
the __args__ variable that contains always the unprocessed argument list:

> tepam::procedure \{display\_message\} \{  
> &nbsp;&nbsp;&nbsp;\-args \{  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{\-mtype \-choices \{Warning Error\} \-default Warning\}  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\{text \-type string \-multiple\}  
>   
> &nbsp;&nbsp;&nbsp;\}  
> \} \{  
> &nbsp;&nbsp;&nbsp;puts "args: __$args__"  
> \}  
> display\_message \-mtype Warning "It is 7:00"  
> *\-> args: \-mtype Warning \{It is 7:00\}*

# <a name='seealso'></a>SEE ALSO

[tepam\(n\)](tepam\_introduction\.md),
[tepam::argument\_dialogbox\(n\)](tepam\_argument\_dialogbox\.md)

# <a name='keywords'></a>KEYWORDS

[argument integrity](\.\./\.\./\.\./\.\./index\.md\#argument\_integrity), [argument
validation](\.\./\.\./\.\./\.\./index\.md\#argument\_validation),
[arguments](\.\./\.\./\.\./\.\./index\.md\#arguments),
[procedure](\.\./\.\./\.\./\.\./index\.md\#procedure),
[subcommand](\.\./\.\./\.\./\.\./index\.md\#subcommand)

# <a name='category'></a>CATEGORY

Procedures, arguments, parameters, options

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2013, Andreas Drollinger
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/term/ansi_cattr.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275

[//000000001]: # (term::ansi::code::attr \- Terminal control)
[//000000002]: # (Generated from file 'ansi\_cattr\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::ansi::code::attr\(n\) 0\.1 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::ansi::code::attr \- ANSI attribute sequences

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Introspection](#subsection1)

      - [Attributes](#subsection2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term::ansi::code ?0\.1?  
package require term::ansi::code::attr ?0\.1?  

[__::term::ansi::code::attr::names__](#1)  
[__::term::ansi::code::attr::import__ ?*ns*? ?*arg*\.\.\.?](#2)  
[__::term::ansi::code::attr::fgblack__](#3)  
[__::term::ansi::code::attr::fgred__](#4)  
[__::term::ansi::code::attr::fggreen__](#5)  
[__::term::ansi::code::attr::fgyellow__](#6)  
[__::term::ansi::code::attr::fgblue__](#7)  
[__::term::ansi::code::attr::fgmagenta__](#8)  
[__::term::ansi::code::attr::fgcyan__](#9)  
[__::term::ansi::code::attr::fgwhite__](#10)  
[__::term::ansi::code::attr::fgdefault__](#11)  
[__::term::ansi::code::attr::bgblack__](#12)  
[__::term::ansi::code::attr::bgred__](#13)  
[__::term::ansi::code::attr::bggreen__](#14)  
[__::term::ansi::code::attr::bgyellow__](#15)  
[__::term::ansi::code::attr::bgblue__](#16)  
[__::term::ansi::code::attr::bgmagenta__](#17)  
[__::term::ansi::code::attr::bgcyan__](#18)  
[__::term::ansi::code::attr::bgwhite__](#19)  
[__::term::ansi::code::attr::bgdefault__](#20)  
[__::term::ansi::code::attr::bold__](#21)  
[__::term::ansi::code::attr::dim__](#22)  
[__::term::ansi::code::attr::italic__](#23)  
[__::term::ansi::code::attr::underline__](#24)  
[__::term::ansi::code::attr::blink__](#25)  
[__::term::ansi::code::attr::revers__](#26)  
[__::term::ansi::code::attr::hidden__](#27)  
[__::term::ansi::code::attr::strike__](#28)  
[__::term::ansi::code::attr::nobold__](#29)  
[__::term::ansi::code::attr::noitalic__](#30)  
[__::term::ansi::code::attr::nounderline__](#31)  
[__::term::ansi::code::attr::noblink__](#32)  
[__::term::ansi::code::attr::norevers__](#33)  
[__::term::ansi::code::attr::nohidden__](#34)  
[__::term::ansi::code::attr::nostrike__](#35)  
[__::term::ansi::code::attr::reset__](#36)  

# <a name='description'></a>DESCRIPTION

This package provides symbolic names for the ANSI attribute control codes\. For
each control code a single command is provided which returns this code as its
result\. None of the commands of this package write to a channel; that is handled
by higher level packages, like __[term::ansi::send](ansi\_send\.md)__\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Introspection

  - <a name='1'></a>__::term::ansi::code::attr::names__

    This command is for introspection\. It returns as its result a list
    containing the names of all attribute commands\.

  - <a name='2'></a>__::term::ansi::code::attr::import__ ?*ns*? ?*arg*\.\.\.?

    This command imports some or all attribute commands into the namespace
    *ns*\. This is by default the namespace *attr*\. Note that this is
    relative namespace name, placing the imported command into a child of the
    current namespace\. By default all commands are imported, this can howver be
    restricted by listing the names of the wanted commands after the namespace
    argument\.

## <a name='subsection2'></a>Attributes

  - <a name='3'></a>__::term::ansi::code::attr::fgblack__

    Set text color to *Black*\.

  - <a name='4'></a>__::term::ansi::code::attr::fgred__

    Set text color to *Red*\.

  - <a name='5'></a>__::term::ansi::code::attr::fggreen__

    Set text color to *Green*\.

  - <a name='6'></a>__::term::ansi::code::attr::fgyellow__

    Set text color to *Yellow*\.

  - <a name='7'></a>__::term::ansi::code::attr::fgblue__

    Set text color to *Blue*\.

  - <a name='8'></a>__::term::ansi::code::attr::fgmagenta__

    Set text color to *Magenta*\.

  - <a name='9'></a>__::term::ansi::code::attr::fgcyan__

    Set text color to *Cyan*\.

  - <a name='10'></a>__::term::ansi::code::attr::fgwhite__

    Set text color to *White*\.

  - <a name='11'></a>__::term::ansi::code::attr::fgdefault__

    Set default text color \(*Black*\)\.

  - <a name='12'></a>__::term::ansi::code::attr::bgblack__

    Set background to *Black*\.

  - <a name='13'></a>__::term::ansi::code::attr::bgred__

    Set background to *Red*\.

  - <a name='14'></a>__::term::ansi::code::attr::bggreen__

    Set background to *Green*\.

  - <a name='15'></a>__::term::ansi::code::attr::bgyellow__

    Set background to *Yellow*\.

  - <a name='16'></a>__::term::ansi::code::attr::bgblue__

    Set background to *Blue*\.

  - <a name='17'></a>__::term::ansi::code::attr::bgmagenta__

    Set background to *Magenta*\.

  - <a name='18'></a>__::term::ansi::code::attr::bgcyan__

    Set background to *Cyan*\.

  - <a name='19'></a>__::term::ansi::code::attr::bgwhite__

    Set background to *White*\.

  - <a name='20'></a>__::term::ansi::code::attr::bgdefault__

    Set default background \(Transparent\)\.

  - <a name='21'></a>__::term::ansi::code::attr::bold__

    Bold on\.

  - <a name='22'></a>__::term::ansi::code::attr::dim__

    Dim on\.

  - <a name='23'></a>__::term::ansi::code::attr::italic__

    Italics on\.

  - <a name='24'></a>__::term::ansi::code::attr::underline__

    Underscore on\.

  - <a name='25'></a>__::term::ansi::code::attr::blink__

    Blink on\.

  - <a name='26'></a>__::term::ansi::code::attr::revers__

    Reverse on\.

  - <a name='27'></a>__::term::ansi::code::attr::hidden__

    Hidden on\.

  - <a name='28'></a>__::term::ansi::code::attr::strike__

    Strike\-through on\.

  - <a name='29'></a>__::term::ansi::code::attr::nobold__

    Bold off\.

  - <a name='30'></a>__::term::ansi::code::attr::noitalic__

    Italics off\.

  - <a name='31'></a>__::term::ansi::code::attr::nounderline__

    Underscore off\.

  - <a name='32'></a>__::term::ansi::code::attr::noblink__

    Blink off\.

  - <a name='33'></a>__::term::ansi::code::attr::norevers__

    Reverse off\.

  - <a name='34'></a>__::term::ansi::code::attr::nohidden__

    Hidden off\.

  - <a name='35'></a>__::term::ansi::code::attr::nostrike__

    Strike\-through off\.

  - <a name='36'></a>__::term::ansi::code::attr::reset__

    Reset all attributes to their default values\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[ansi](\.\./\.\./\.\./\.\./index\.md\#ansi), [attribute
control](\.\./\.\./\.\./\.\./index\.md\#attribute\_control), [color
control](\.\./\.\./\.\./\.\./index\.md\#color\_control),
[control](\.\./\.\./\.\./\.\./index\.md\#control),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/term/ansi_cctrl.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569

[//000000001]: # (term::ansi::code::ctrl \- Terminal control)
[//000000002]: # (Generated from file 'ansi\_cctrl\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::ansi::code::ctrl\(n\) 0\.2 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::ansi::code::ctrl \- ANSI control sequences

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Introspection](#subsection1)

      - [Sequences](#subsection2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term::ansi::code ?0\.2?  
package require term::ansi::code::ctrl ?0\.2?  

[__::term::ansi::code::ctrl::names__](#1)  
[__::term::ansi::code::ctrl::import__ ?*ns*? ?*arg*\.\.\.?](#2)  
[__::term::ansi::code::ctrl::eeol__](#3)  
[__::term::ansi::code::ctrl::esol__](#4)  
[__::term::ansi::code::ctrl::el__](#5)  
[__::term::ansi::code::ctrl::ed__](#6)  
[__::term::ansi::code::ctrl::eu__](#7)  
[__::term::ansi::code::ctrl::es__](#8)  
[__::term::ansi::code::ctrl::sd__](#9)  
[__::term::ansi::code::ctrl::su__](#10)  
[__::term::ansi::code::ctrl::ch__](#11)  
[__::term::ansi::code::ctrl::sc__](#12)  
[__::term::ansi::code::ctrl::rc__](#13)  
[__::term::ansi::code::ctrl::sca__](#14)  
[__::term::ansi::code::ctrl::rca__](#15)  
[__::term::ansi::code::ctrl::st__](#16)  
[__::term::ansi::code::ctrl::ct__](#17)  
[__::term::ansi::code::ctrl::cat__](#18)  
[__::term::ansi::code::ctrl::qdc__](#19)  
[__::term::ansi::code::ctrl::qds__](#20)  
[__::term::ansi::code::ctrl::qcp__](#21)  
[__::term::ansi::code::ctrl::rd__](#22)  
[__::term::ansi::code::ctrl::elw__](#23)  
[__::term::ansi::code::ctrl::dlw__](#24)  
[__::term::ansi::code::ctrl::eg__](#25)  
[__::term::ansi::code::ctrl::lg__](#26)  
[__::term::ansi::code::ctrl::scs0__ *tag*](#27)  
[__::term::ansi::code::ctrl::scs1__ *tag*](#28)  
[__::term::ansi::code::ctrl::sda__ *arg*\.\.\.](#29)  
[__::term::ansi::code::ctrl::sda\_fgblack__](#30)  
[__::term::ansi::code::ctrl::sda\_fgred__](#31)  
[__::term::ansi::code::ctrl::sda\_fggreen__](#32)  
[__::term::ansi::code::ctrl::sda\_fgyellow__](#33)  
[__::term::ansi::code::ctrl::sda\_fgblue__](#34)  
[__::term::ansi::code::ctrl::sda\_fgmagenta__](#35)  
[__::term::ansi::code::ctrl::sda\_fgcyan__](#36)  
[__::term::ansi::code::ctrl::sda\_fgwhite__](#37)  
[__::term::ansi::code::ctrl::sda\_fgdefault__](#38)  
[__::term::ansi::code::ctrl::sda\_bgblack__](#39)  
[__::term::ansi::code::ctrl::sda\_bgred__](#40)  
[__::term::ansi::code::ctrl::sda\_bggreen__](#41)  
[__::term::ansi::code::ctrl::sda\_bgyellow__](#42)  
[__::term::ansi::code::ctrl::sda\_bgblue__](#43)  
[__::term::ansi::code::ctrl::sda\_bgmagenta__](#44)  
[__::term::ansi::code::ctrl::sda\_bgcyan__](#45)  
[__::term::ansi::code::ctrl::sda\_bgwhite__](#46)  
[__::term::ansi::code::ctrl::sda\_bgdefault__](#47)  
[__::term::ansi::code::ctrl::sda\_bold__](#48)  
[__::term::ansi::code::ctrl::sda\_dim__](#49)  
[__::term::ansi::code::ctrl::sda\_italic__](#50)  
[__::term::ansi::code::ctrl::sda\_underline__](#51)  
[__::term::ansi::code::ctrl::sda\_blink__](#52)  
[__::term::ansi::code::ctrl::sda\_revers__](#53)  
[__::term::ansi::code::ctrl::sda\_hidden__](#54)  
[__::term::ansi::code::ctrl::sda\_strike__](#55)  
[__::term::ansi::code::ctrl::sda\_nobold__](#56)  
[__::term::ansi::code::ctrl::sda\_noitalic__](#57)  
[__::term::ansi::code::ctrl::sda\_nounderline__](#58)  
[__::term::ansi::code::ctrl::sda\_noblink__](#59)  
[__::term::ansi::code::ctrl::sda\_norevers__](#60)  
[__::term::ansi::code::ctrl::sda\_nohidden__](#61)  
[__::term::ansi::code::ctrl::sda\_nostrike__](#62)  
[__::term::ansi::code::ctrl::sda\_reset__](#63)  
[__::term::ansi::send::fcp__ *row* *col*](#64)  
[__::term::ansi::code::ctrl::cu__ ?*n*?](#65)  
[__::term::ansi::code::ctrl::cd__ ?*n*?](#66)  
[__::term::ansi::code::ctrl::cf__ ?*n*?](#67)  
[__::term::ansi::code::ctrl::cb__ ?*n*?](#68)  
[__::term::ansi::code::ctrl::ss__ ?*s* *e*?](#69)  
[__::term::ansi::code::ctrl::skd__ *code* *str*](#70)  
[__::term::ansi::code::ctrl::title__ *str*](#71)  
[__::term::ansi::code::ctrl::gron__](#72)  
[__::term::ansi::code::ctrl::groff__](#73)  
[__::term::ansi::code::ctrl::tlc__](#74)  
[__::term::ansi::code::ctrl::trc__](#75)  
[__::term::ansi::code::ctrl::brc__](#76)  
[__::term::ansi::code::ctrl::blc__](#77)  
[__::term::ansi::code::ctrl::ltj__](#78)  
[__::term::ansi::code::ctrl::ttj__](#79)  
[__::term::ansi::code::ctrl::rtj__](#80)  
[__::term::ansi::code::ctrl::btj__](#81)  
[__::term::ansi::code::ctrl::fwj__](#82)  
[__::term::ansi::code::ctrl::hl__](#83)  
[__::term::ansi::code::ctrl::vl__](#84)  
[__::term::ansi::code::ctrl::groptim__ *str*](#85)  
[__::term::ansi::code::ctrl::clear__](#86)  
[__::term::ansi::code::ctrl::init__](#87)  
[__::term::ansi::code::ctrl::showat__ *row* *col* *text*](#88)  

# <a name='description'></a>DESCRIPTION

This package provides symbolic names for the ANSI control sequences\. For each
sequence a single command is provided which returns the sequence as its result\.
None of the commands of this package write to a channel; that is handled by
higher level packages, like __[term::ansi::send](ansi\_send\.md)__\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Introspection

  - <a name='1'></a>__::term::ansi::code::ctrl::names__

    This command is for introspection\. It returns as its result a list
    containing the names of all attribute commands\.

  - <a name='2'></a>__::term::ansi::code::ctrl::import__ ?*ns*? ?*arg*\.\.\.?

    This command imports some or all attribute commands into the namespace
    *ns*\. This is by default the namespace *ctrl*\. Note that this is
    relative namespace name, placing the imported command into a child of the
    current namespace\. By default all commands are imported, this can howver be
    restricted by listing the names of the wanted commands after the namespace
    argument\.

## <a name='subsection2'></a>Sequences

  - <a name='3'></a>__::term::ansi::code::ctrl::eeol__

    Erase \(to\) End Of Line

  - <a name='4'></a>__::term::ansi::code::ctrl::esol__

    Erase \(to\) Start Of Line

  - <a name='5'></a>__::term::ansi::code::ctrl::el__

    Erase \(current\) Line

  - <a name='6'></a>__::term::ansi::code::ctrl::ed__

    Erase Down \(to bottom\)

  - <a name='7'></a>__::term::ansi::code::ctrl::eu__

    Erase Up \(to top\)

  - <a name='8'></a>__::term::ansi::code::ctrl::es__

    Erase Screen

  - <a name='9'></a>__::term::ansi::code::ctrl::sd__

    Scroll Down

  - <a name='10'></a>__::term::ansi::code::ctrl::su__

    Scroll Up

  - <a name='11'></a>__::term::ansi::code::ctrl::ch__

    Cursor Home

  - <a name='12'></a>__::term::ansi::code::ctrl::sc__

    Save Cursor

  - <a name='13'></a>__::term::ansi::code::ctrl::rc__

    Restore Cursor \(Unsave\)

  - <a name='14'></a>__::term::ansi::code::ctrl::sca__

    Save Cursor \+ Attributes

  - <a name='15'></a>__::term::ansi::code::ctrl::rca__

    Restore Cursor \+ Attributes

  - <a name='16'></a>__::term::ansi::code::ctrl::st__

    Set Tab \(@ current position\)

  - <a name='17'></a>__::term::ansi::code::ctrl::ct__

    Clear Tab \(@ current position\)

  - <a name='18'></a>__::term::ansi::code::ctrl::cat__

    Clear All Tabs

  - <a name='19'></a>__::term::ansi::code::ctrl::qdc__

    Query Device Code

  - <a name='20'></a>__::term::ansi::code::ctrl::qds__

    Query Device Status

  - <a name='21'></a>__::term::ansi::code::ctrl::qcp__

    Query Cursor Position

  - <a name='22'></a>__::term::ansi::code::ctrl::rd__

    Reset Device

  - <a name='23'></a>__::term::ansi::code::ctrl::elw__

    Enable Line Wrap

  - <a name='24'></a>__::term::ansi::code::ctrl::dlw__

    Disable Line Wrap

  - <a name='25'></a>__::term::ansi::code::ctrl::eg__

    Enter Graphics Mode

  - <a name='26'></a>__::term::ansi::code::ctrl::lg__

    Exit Graphics Mode

  - <a name='27'></a>__::term::ansi::code::ctrl::scs0__ *tag*

    Set default character set

  - <a name='28'></a>__::term::ansi::code::ctrl::scs1__ *tag*

    Set alternate character set Select Character Set\.

    Choose which character set is used for either default \(scs0\) or alternate
    font \(scs1\)\. This does not change whether default or alternate font are
    used, only their definition\.

    The legal tags, and their meanings, are:

      * A

        United Kingdom Set

      * B

        ASCII Set

      * 0

        Special Graphics

      * 1

        Alternate Character ROM Standard Character Set

      * 2

        Alternate Character ROM Special Graphics

  - <a name='29'></a>__::term::ansi::code::ctrl::sda__ *arg*\.\.\.

    Set Display Attributes\. The arguments are the code sequences for the
    possible attributes, as provided by the package
    __[term::ansi::code::attr](ansi\_cattr\.md)__\. For convenience this
    package also provides additional commands each setting a single specific
    attribute\.

  - <a name='30'></a>__::term::ansi::code::ctrl::sda\_fgblack__

    Set text color to *Black*\.

  - <a name='31'></a>__::term::ansi::code::ctrl::sda\_fgred__

    Set text color to *Red*\.

  - <a name='32'></a>__::term::ansi::code::ctrl::sda\_fggreen__

    Set text color to *Green*\.

  - <a name='33'></a>__::term::ansi::code::ctrl::sda\_fgyellow__

    Set text color to *Yellow*\.

  - <a name='34'></a>__::term::ansi::code::ctrl::sda\_fgblue__

    Set text color to *Blue*\.

  - <a name='35'></a>__::term::ansi::code::ctrl::sda\_fgmagenta__

    Set text color to *Magenta*\.

  - <a name='36'></a>__::term::ansi::code::ctrl::sda\_fgcyan__

    Set text color to *Cyan*\.

  - <a name='37'></a>__::term::ansi::code::ctrl::sda\_fgwhite__

    Set text color to *White*\.

  - <a name='38'></a>__::term::ansi::code::ctrl::sda\_fgdefault__

    Set default text color \(*Black*\)\.

  - <a name='39'></a>__::term::ansi::code::ctrl::sda\_bgblack__

    Set background to *Black*\.

  - <a name='40'></a>__::term::ansi::code::ctrl::sda\_bgred__

    Set background to *Red*\.

  - <a name='41'></a>__::term::ansi::code::ctrl::sda\_bggreen__

    Set background to *Green*\.

  - <a name='42'></a>__::term::ansi::code::ctrl::sda\_bgyellow__

    Set background to *Yellow*\.

  - <a name='43'></a>__::term::ansi::code::ctrl::sda\_bgblue__

    Set background to *Blue*\.

  - <a name='44'></a>__::term::ansi::code::ctrl::sda\_bgmagenta__

    Set background to *Magenta*\.

  - <a name='45'></a>__::term::ansi::code::ctrl::sda\_bgcyan__

    Set background to *Cyan*\.

  - <a name='46'></a>__::term::ansi::code::ctrl::sda\_bgwhite__

    Set background to *White*\.

  - <a name='47'></a>__::term::ansi::code::ctrl::sda\_bgdefault__

    Set default background \(Transparent\)\.

  - <a name='48'></a>__::term::ansi::code::ctrl::sda\_bold__

    Bold on\.

  - <a name='49'></a>__::term::ansi::code::ctrl::sda\_dim__

    Dim on\.

  - <a name='50'></a>__::term::ansi::code::ctrl::sda\_italic__

    Italics on\.

  - <a name='51'></a>__::term::ansi::code::ctrl::sda\_underline__

    Underscore on\.

  - <a name='52'></a>__::term::ansi::code::ctrl::sda\_blink__

    Blink on\.

  - <a name='53'></a>__::term::ansi::code::ctrl::sda\_revers__

    Reverse on\.

  - <a name='54'></a>__::term::ansi::code::ctrl::sda\_hidden__

    Hidden on\.

  - <a name='55'></a>__::term::ansi::code::ctrl::sda\_strike__

    Strike\-through on\.

  - <a name='56'></a>__::term::ansi::code::ctrl::sda\_nobold__

    Bold off\.

  - <a name='57'></a>__::term::ansi::code::ctrl::sda\_noitalic__

    Italics off\.

  - <a name='58'></a>__::term::ansi::code::ctrl::sda\_nounderline__

    Underscore off\.

  - <a name='59'></a>__::term::ansi::code::ctrl::sda\_noblink__

    Blink off\.

  - <a name='60'></a>__::term::ansi::code::ctrl::sda\_norevers__

    Reverse off\.

  - <a name='61'></a>__::term::ansi::code::ctrl::sda\_nohidden__

    Hidden off\.

  - <a name='62'></a>__::term::ansi::code::ctrl::sda\_nostrike__

    Strike\-through off\.

  - <a name='63'></a>__::term::ansi::code::ctrl::sda\_reset__

    Reset all attributes to their default values\.

  - <a name='64'></a>__::term::ansi::send::fcp__ *row* *col*

    Force Cursor Position \(aka Go To\)\.

  - <a name='65'></a>__::term::ansi::code::ctrl::cu__ ?*n*?

    Cursor Up\. *n* defaults to 1\.

  - <a name='66'></a>__::term::ansi::code::ctrl::cd__ ?*n*?

    Cursor Down\. *n* defaults to 1\.

  - <a name='67'></a>__::term::ansi::code::ctrl::cf__ ?*n*?

    Cursor Forward\. *n* defaults to 1\.

  - <a name='68'></a>__::term::ansi::code::ctrl::cb__ ?*n*?

    Cursor Backward\. *n* defaults to 1\.

  - <a name='69'></a>__::term::ansi::code::ctrl::ss__ ?*s* *e*?

    Scroll Screen \(entire display, or between rows start end, inclusive\)\.

  - <a name='70'></a>__::term::ansi::code::ctrl::skd__ *code* *str*

    Set Key Definition\.

  - <a name='71'></a>__::term::ansi::code::ctrl::title__ *str*

    Set the terminal title\.

  - <a name='72'></a>__::term::ansi::code::ctrl::gron__

    Switch to character/box graphics\. I\.e\. switch to the alternate font\.

  - <a name='73'></a>__::term::ansi::code::ctrl::groff__

    Switch to regular characters\. I\.e\. switch to the default font\.

  - <a name='74'></a>__::term::ansi::code::ctrl::tlc__

    Character graphics, Top Left Corner\.

  - <a name='75'></a>__::term::ansi::code::ctrl::trc__

    Character graphics, Top Right Corner\.

  - <a name='76'></a>__::term::ansi::code::ctrl::brc__

    Character graphics, Bottom Right Corner\.

  - <a name='77'></a>__::term::ansi::code::ctrl::blc__

    Character graphics, Bottom Left Corner\.

  - <a name='78'></a>__::term::ansi::code::ctrl::ltj__

    Character graphics, Left T Junction\.

  - <a name='79'></a>__::term::ansi::code::ctrl::ttj__

    Character graphics, Top T Junction\.

  - <a name='80'></a>__::term::ansi::code::ctrl::rtj__

    Character graphics, Right T Junction\.

  - <a name='81'></a>__::term::ansi::code::ctrl::btj__

    Character graphics, Bottom T Junction\.

  - <a name='82'></a>__::term::ansi::code::ctrl::fwj__

    Character graphics, Four\-Way Junction\.

  - <a name='83'></a>__::term::ansi::code::ctrl::hl__

    Character graphics, Horizontal Line\.

  - <a name='84'></a>__::term::ansi::code::ctrl::vl__

    Character graphics, Vertical Line\.

  - <a name='85'></a>__::term::ansi::code::ctrl::groptim__ *str*

    Optimize character graphics\. The generator commands above create way to many
    superfluous commands shifting into and out of the graphics mode\. This
    command removes all shifts which are not needed\. To this end it also knows
    which characters will look the same in both modes, to handle strings created
    outside of this package\.

  - <a name='86'></a>__::term::ansi::code::ctrl::clear__

    Clear screen\. In essence a sequence of CursorHome \+ EraseDown\.

  - <a name='87'></a>__::term::ansi::code::ctrl::init__

    Initialize default and alternate fonts to ASCII and box graphics\.

  - <a name='88'></a>__::term::ansi::code::ctrl::showat__ *row* *col* *text*

    Format the block of text for display at the specified location\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[ansi](\.\./\.\./\.\./\.\./index\.md\#ansi), [attribute
control](\.\./\.\./\.\./\.\./index\.md\#attribute\_control), [color
control](\.\./\.\./\.\./\.\./index\.md\#color\_control),
[control](\.\./\.\./\.\./\.\./index\.md\#control),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/term/ansi_cmacros.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

[//000000001]: # (term::ansi::code::macros \- Terminal control)
[//000000002]: # (Generated from file 'ansi\_cmacros\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::ansi::code::macros\(n\) 0\.1 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::ansi::code::macros \- Macro sequences

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Introspection](#subsection1)

      - [Sequences](#subsection2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require textutil::repeat  
package require textutil::tabify  
package require term::ansi::code::macros ?0\.1?  

[__::term::ansi::code::macros::names__](#1)  
[__::term::ansi::code::macros::import__ ?*ns*? ?*arg*\.\.\.?](#2)  
[__::term::ansi::code::macros::menu__ *menu*](#3)  
[__::term::ansi::code::macros::frame__ *string*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides higher level control sequences for more complex shapes\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Introspection

  - <a name='1'></a>__::term::ansi::code::macros::names__

    This command is for introspection\. It returns as its result a list
    containing the names of all attribute commands\.

  - <a name='2'></a>__::term::ansi::code::macros::import__ ?*ns*? ?*arg*\.\.\.?

    This command imports some or all attribute commands into the namespace
    *ns*\. This is by default the namespace *macros*\. Note that this is
    relative namespace name, placing the imported command into a child of the
    current namespace\. By default all commands are imported, this can howver be
    restricted by listing the names of the wanted commands after the namespace
    argument\.

## <a name='subsection2'></a>Sequences

  - <a name='3'></a>__::term::ansi::code::macros::menu__ *menu*

    The description of a menu is converted into a formatted rectangular block of
    text, with the menu command characters highlighted using bold red text\. The
    result is returned as the result of the command\.

    The description, *menu*, is a dictionary mapping from menu label to
    command character\.

  - <a name='4'></a>__::term::ansi::code::macros::frame__ *string*

    The paragraph of text contained in the string is padded with spaces at the
    right margin, after normalizing internal tabs, and then put into a frame
    made of box\-graphics\. The result is returned as the result of the command\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[ansi](\.\./\.\./\.\./\.\./index\.md\#ansi),
[control](\.\./\.\./\.\./\.\./index\.md\#control),
[frame](\.\./\.\./\.\./\.\./index\.md\#frame), [menu](\.\./\.\./\.\./\.\./index\.md\#menu),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































Deleted embedded/md/tcllib/files/modules/term/ansi_code.md.

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
89
90
91
92
93
94
95
96
97
98

[//000000001]: # (term::ansi::code \- Terminal control)
[//000000002]: # (Generated from file 'ansi\_code\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::ansi::code\(n\) 0\.2 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::ansi::code \- Helper for control sequences

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term::ansi::code ?0\.2?  

[__::term::ansi::code::esc__ *str*](#1)  
[__::term::ansi::code::escb__ *str*](#2)  
[__::term::ansi::code::define__ *name* *escape* *code*](#3)  
[__::term::ansi::code::const__ *name* *code*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides commands enabling the definition of control sequences in
an easy manner\.

  - <a name='1'></a>__::term::ansi::code::esc__ *str*

    This command returns the argument string, prefixed with the ANSI escape
    character, "\\033\."

  - <a name='2'></a>__::term::ansi::code::escb__ *str*

    This command returns the argument string, prefixed with a common ANSI escape
    sequence, "\\033\["\.

  - <a name='3'></a>__::term::ansi::code::define__ *name* *escape* *code*

    This command defines a procedure *name* which returns the control sequence
    *code*, beginning with the specified escape sequence, either __esc__,
    or __escb__\.

  - <a name='4'></a>__::term::ansi::code::const__ *name* *code*

    This command defines a procedure *name* which returns the control sequence
    *code*\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[control](\.\./\.\./\.\./\.\./index\.md\#control),
[declare](\.\./\.\./\.\./\.\./index\.md\#declare),
[define](\.\./\.\./\.\./\.\./index\.md\#define),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































Deleted embedded/md/tcllib/files/modules/term/ansi_ctrlu.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

[//000000001]: # (term::ansi::ctrl::unix \- Terminal control)
[//000000002]: # (Generated from file 'ansi\_ctrlu\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006\-2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::ansi::ctrl::unix\(n\) 0\.1\.1 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::ansi::ctrl::unix \- Control operations and queries

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Introspection](#subsection1)

      - [Operations](#subsection2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term::ansi::ctrl::unix ?0\.1\.1?  

[__::term::ansi::ctrl::unix::import__ ?*ns*? ?*arg*\.\.\.?](#1)  
[__::term::ansi::ctrl::unix::raw__](#2)  
[__::term::ansi::ctrl::unix::cooked__](#3)  
[__::term::ansi::ctrl::unix::columns__](#4)  
[__::term::ansi::ctrl::unix::rows__](#5)  

# <a name='description'></a>DESCRIPTION

*WARNING*: This package is unix\-specific and depends on the availability of
two unix system commands for terminal control, i\.e\. __stty__ and
__tput__, both of which have to be found in the __$PATH__\. If any of
these two commands is missing the loading of the package will fail\.

The package provides commands to switch the standard input of the current
process between *[raw](\.\./\.\./\.\./\.\./index\.md\#raw)* and
*[cooked](\.\./\.\./\.\./\.\./index\.md\#cooked)* input modes, and to query the size
of terminals, i\.e\. the available number of columns and lines\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Introspection

  - <a name='1'></a>__::term::ansi::ctrl::unix::import__ ?*ns*? ?*arg*\.\.\.?

    This command imports some or all attribute commands into the namespace
    *ns*\. This is by default the namespace *ctrl*\. Note that this is
    relative namespace name, placing the imported command into a child of the
    current namespace\. By default all commands are imported, this can howver be
    restricted by listing the names of the wanted commands after the namespace
    argument\.

## <a name='subsection2'></a>Operations

  - <a name='2'></a>__::term::ansi::ctrl::unix::raw__

    This command switches the standard input of the current process to
    *[raw](\.\./\.\./\.\./\.\./index\.md\#raw)* input mode\. This means that from
    then on all characters typed by the user are immediately reported to the
    application instead of waiting in the OS buffer until the Enter/Return key
    is received\.

  - <a name='3'></a>__::term::ansi::ctrl::unix::cooked__

    This command switches the standard input of the current process to
    *[cooked](\.\./\.\./\.\./\.\./index\.md\#cooked)* input mode\. This means that
    from then on all characters typed by the user are kept in OS buffers for
    editing until the Enter/Return key is received\.

  - <a name='4'></a>__::term::ansi::ctrl::unix::columns__

    This command queries the terminal connected to the standard input for the
    number of columns available for display\.

  - <a name='5'></a>__::term::ansi::ctrl::unix::rows__

    This command queries the terminal connected to the standard input for the
    number of rows \(aka lines\) available for display\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[ansi](\.\./\.\./\.\./\.\./index\.md\#ansi),
[columns](\.\./\.\./\.\./\.\./index\.md\#columns),
[control](\.\./\.\./\.\./\.\./index\.md\#control),
[cooked](\.\./\.\./\.\./\.\./index\.md\#cooked), [input
mode](\.\./\.\./\.\./\.\./index\.md\#input\_mode),
[lines](\.\./\.\./\.\./\.\./index\.md\#lines), [raw](\.\./\.\./\.\./\.\./index\.md\#raw),
[rows](\.\./\.\./\.\./\.\./index\.md\#rows),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006\-2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































Deleted embedded/md/tcllib/files/modules/term/ansi_send.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554

[//000000001]: # (term::ansi::send \- Terminal control)
[//000000002]: # (Generated from file 'ansi\_send\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::ansi::send\(n\) 0\.2 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::ansi::send \- Output of ANSI control sequences to terminals

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term::ansi::send ?0\.2?  

[__::term::ansi::send::import__ ?*ns*? *\.\.\.*](#1)  
[__::term::ansi::send::eeol__](#2)  
[__::term::ansi::send::esol__](#3)  
[__::term::ansi::send::el__](#4)  
[__::term::ansi::send::ed__](#5)  
[__::term::ansi::send::eu__](#6)  
[__::term::ansi::send::es__](#7)  
[__::term::ansi::send::sd__](#8)  
[__::term::ansi::send::su__](#9)  
[__::term::ansi::send::ch__](#10)  
[__::term::ansi::send::sc__](#11)  
[__::term::ansi::send::rc__](#12)  
[__::term::ansi::send::sca__](#13)  
[__::term::ansi::send::rca__](#14)  
[__::term::ansi::send::st__](#15)  
[__::term::ansi::send::ct__](#16)  
[__::term::ansi::send::cat__](#17)  
[__::term::ansi::send::qdc__](#18)  
[__::term::ansi::send::qds__](#19)  
[__::term::ansi::send::qcp__](#20)  
[__::term::ansi::send::rd__](#21)  
[__::term::ansi::send::elw__](#22)  
[__::term::ansi::send::dlw__](#23)  
[__::term::ansi::send::eg__](#24)  
[__::term::ansi::send::lg__](#25)  
[__::term::ansi::send::scs0__ *tag*](#26)  
[__::term::ansi::send::scs1__ *tag*](#27)  
[__::term::ansi::send::sda__ *arg*\.\.\.](#28)  
[__::term::ansi::send::sda\_fgblack__](#29)  
[__::term::ansi::send::sda\_fgred__](#30)  
[__::term::ansi::send::sda\_fggreen__](#31)  
[__::term::ansi::send::sda\_fgyellow__](#32)  
[__::term::ansi::send::sda\_fgblue__](#33)  
[__::term::ansi::send::sda\_fgmagenta__](#34)  
[__::term::ansi::send::sda\_fgcyan__](#35)  
[__::term::ansi::send::sda\_fgwhite__](#36)  
[__::term::ansi::send::sda\_fgdefault__](#37)  
[__::term::ansi::send::sda\_bgblack__](#38)  
[__::term::ansi::send::sda\_bgred__](#39)  
[__::term::ansi::send::sda\_bggreen__](#40)  
[__::term::ansi::send::sda\_bgyellow__](#41)  
[__::term::ansi::send::sda\_bgblue__](#42)  
[__::term::ansi::send::sda\_bgmagenta__](#43)  
[__::term::ansi::send::sda\_bgcyan__](#44)  
[__::term::ansi::send::sda\_bgwhite__](#45)  
[__::term::ansi::send::sda\_bgdefault__](#46)  
[__::term::ansi::send::sda\_bold__](#47)  
[__::term::ansi::send::sda\_dim__](#48)  
[__::term::ansi::send::sda\_italic__](#49)  
[__::term::ansi::send::sda\_underline__](#50)  
[__::term::ansi::send::sda\_blink__](#51)  
[__::term::ansi::send::sda\_revers__](#52)  
[__::term::ansi::send::sda\_hidden__](#53)  
[__::term::ansi::send::sda\_strike__](#54)  
[__::term::ansi::send::sda\_nobold__](#55)  
[__::term::ansi::send::sda\_noitalic__](#56)  
[__::term::ansi::send::sda\_nounderline__](#57)  
[__::term::ansi::send::sda\_noblink__](#58)  
[__::term::ansi::send::sda\_norevers__](#59)  
[__::term::ansi::send::sda\_nohidden__](#60)  
[__::term::ansi::send::sda\_nostrike__](#61)  
[__::term::ansi::send::sda\_reset__](#62)  
[__::term::ansi::send::fcp__ *row* *col*](#63)  
[__::term::ansi::send::cu__ ?*n*?](#64)  
[__::term::ansi::send::cd__ ?*n*?](#65)  
[__::term::ansi::send::cf__ ?*n*?](#66)  
[__::term::ansi::send::cb__ ?*n*?](#67)  
[__::term::ansi::send::ss__ ?*s* *e*?](#68)  
[__::term::ansi::send::skd__ *code* *str*](#69)  
[__::term::ansi::send::title__ *str*](#70)  
[__::term::ansi::send::gron__](#71)  
[__::term::ansi::send::groff__](#72)  
[__::term::ansi::send::tlc__](#73)  
[__::term::ansi::send::trc__](#74)  
[__::term::ansi::send::brc__](#75)  
[__::term::ansi::send::blc__](#76)  
[__::term::ansi::send::ltj__](#77)  
[__::term::ansi::send::ttj__](#78)  
[__::term::ansi::send::rtj__](#79)  
[__::term::ansi::send::btj__](#80)  
[__::term::ansi::send::fwj__](#81)  
[__::term::ansi::send::hl__](#82)  
[__::term::ansi::send::vl__](#83)  
[__::term::ansi::send::groptim__ *str*](#84)  
[__::term::ansi::send::clear__](#85)  
[__::term::ansi::send::init__](#86)  
[__::term::ansi::send::showat__ *row* *col* *text*](#87)  

# <a name='description'></a>DESCRIPTION

This package provides commands to send ANSI terminal control sequences to a
terminal\. All commands come in two variants, one for sending to any channel, the
other for sending to *stdout*\.

The commands are defined using the control sequences provided by the package
__[term::ansi::code::ctrl](ansi\_cctrl\.md)__\. They have the same
arguments as the commands they are based on, with the exception of the variant
for sending to any channel\. Their first argument is always a channel handle,
then followed by the original arguments\. Below we will list only the variant
sending to *stdout*\.

  - <a name='1'></a>__::term::ansi::send::import__ ?*ns*? *\.\.\.*

    Imports the commands of this package into the namespace *ns*\. If not
    specified it defaults to *send*\. Note that this default is a relative
    namespace name, i\.e\. the actual namespace will be created under the current
    namespace\.

    By default all commands will be imported, this can however be restricted to
    specific commands, by listing them after the namespace to import them into\.

  - <a name='2'></a>__::term::ansi::send::eeol__

    Erase \(to\) End Of Line\.

  - <a name='3'></a>__::term::ansi::send::esol__

    Erase \(to\) Start Of Line\.

  - <a name='4'></a>__::term::ansi::send::el__

    Erase \(current\) Line\.

  - <a name='5'></a>__::term::ansi::send::ed__

    Erase Down \(to bottom\)\.

  - <a name='6'></a>__::term::ansi::send::eu__

    Erase Up \(to top\)\.

  - <a name='7'></a>__::term::ansi::send::es__

    Erase Screen\.

  - <a name='8'></a>__::term::ansi::send::sd__

    Scroll Down\.

  - <a name='9'></a>__::term::ansi::send::su__

    Scroll Up\.

  - <a name='10'></a>__::term::ansi::send::ch__

    Cursor Home\.

  - <a name='11'></a>__::term::ansi::send::sc__

    Save Cursor\. Note: Only one saved position can be handled\. This is no
    unlimited stack\. Saving before restoring will overwrite the saved data\.

  - <a name='12'></a>__::term::ansi::send::rc__

    Restore Cursor \(Unsave\)\.

  - <a name='13'></a>__::term::ansi::send::sca__

    Save Cursor \+ Attributes\.

  - <a name='14'></a>__::term::ansi::send::rca__

    Restore Cursor \+ Attributes\.

  - <a name='15'></a>__::term::ansi::send::st__

    Set Tab \(@ current position\)\.

  - <a name='16'></a>__::term::ansi::send::ct__

    Clear Tab \(@ current position\)\.

  - <a name='17'></a>__::term::ansi::send::cat__

    Clear All Tabs\.

  - <a name='18'></a>__::term::ansi::send::qdc__

    Query Device Code\.

  - <a name='19'></a>__::term::ansi::send::qds__

    Query Device Status\.

  - <a name='20'></a>__::term::ansi::send::qcp__

    Query Cursor Position\.

  - <a name='21'></a>__::term::ansi::send::rd__

    Reset Device\.

  - <a name='22'></a>__::term::ansi::send::elw__

    Enable Line Wrap\.

  - <a name='23'></a>__::term::ansi::send::dlw__

    Disable Line Wrap\.

  - <a name='24'></a>__::term::ansi::send::eg__

    Enter Graphics Mode\.

  - <a name='25'></a>__::term::ansi::send::lg__

    Exit Graphics Mode\.

  - <a name='26'></a>__::term::ansi::send::scs0__ *tag*

  - <a name='27'></a>__::term::ansi::send::scs1__ *tag*

    Select Character Set\.

    Choose which character set is used for default \(scs0\) and alternate font
    \(scs1\)\. This does not change whether default or alternate font are used,
    just their definitions\.

    The legal tags, and their meanings, are:

      * A

        United Kingdom Set

      * B

        ASCII Set

      * 0

        Special Graphics

      * 1

        Alternate Character ROM Standard Character Set

      * 2

        Alternate Character ROM Special Graphics

  - <a name='28'></a>__::term::ansi::send::sda__ *arg*\.\.\.

    Set Display Attributes\. The arguments are the code sequences for the
    possible attributes, as provided by the package
    __[term::ansi::code::attr](ansi\_cattr\.md)__\. For convenience this
    package also provides additional commands each setting a single specific
    attribute\.

  - <a name='29'></a>__::term::ansi::send::sda\_fgblack__

    Set text color to *Black*\.

  - <a name='30'></a>__::term::ansi::send::sda\_fgred__

    Set text color to *Red*\.

  - <a name='31'></a>__::term::ansi::send::sda\_fggreen__

    Set text color to *Green*\.

  - <a name='32'></a>__::term::ansi::send::sda\_fgyellow__

    Set text color to *Yellow*\.

  - <a name='33'></a>__::term::ansi::send::sda\_fgblue__

    Set text color to *Blue*\.

  - <a name='34'></a>__::term::ansi::send::sda\_fgmagenta__

    Set text color to *Magenta*\.

  - <a name='35'></a>__::term::ansi::send::sda\_fgcyan__

    Set text color to *Cyan*\.

  - <a name='36'></a>__::term::ansi::send::sda\_fgwhite__

    Set text color to *White*\.

  - <a name='37'></a>__::term::ansi::send::sda\_fgdefault__

    Set default text color \(*Black*\)\.

  - <a name='38'></a>__::term::ansi::send::sda\_bgblack__

    Set background to *Black*\.

  - <a name='39'></a>__::term::ansi::send::sda\_bgred__

    Set background to *Red*\.

  - <a name='40'></a>__::term::ansi::send::sda\_bggreen__

    Set background to *Green*\.

  - <a name='41'></a>__::term::ansi::send::sda\_bgyellow__

    Set background to *Yellow*\.

  - <a name='42'></a>__::term::ansi::send::sda\_bgblue__

    Set background to *Blue*\.

  - <a name='43'></a>__::term::ansi::send::sda\_bgmagenta__

    Set background to *Magenta*\.

  - <a name='44'></a>__::term::ansi::send::sda\_bgcyan__

    Set background to *Cyan*\.

  - <a name='45'></a>__::term::ansi::send::sda\_bgwhite__

    Set background to *White*\.

  - <a name='46'></a>__::term::ansi::send::sda\_bgdefault__

    Set default background \(Transparent\)\.

  - <a name='47'></a>__::term::ansi::send::sda\_bold__

    Bold on\.

  - <a name='48'></a>__::term::ansi::send::sda\_dim__

    Dim on\.

  - <a name='49'></a>__::term::ansi::send::sda\_italic__

    Italics on\.

  - <a name='50'></a>__::term::ansi::send::sda\_underline__

    Underscore on\.

  - <a name='51'></a>__::term::ansi::send::sda\_blink__

    Blink on\.

  - <a name='52'></a>__::term::ansi::send::sda\_revers__

    Reverse on\.

  - <a name='53'></a>__::term::ansi::send::sda\_hidden__

    Hidden on\.

  - <a name='54'></a>__::term::ansi::send::sda\_strike__

    Strike\-through on\.

  - <a name='55'></a>__::term::ansi::send::sda\_nobold__

    Bold off\.

  - <a name='56'></a>__::term::ansi::send::sda\_noitalic__

    Italics off\.

  - <a name='57'></a>__::term::ansi::send::sda\_nounderline__

    Underscore off\.

  - <a name='58'></a>__::term::ansi::send::sda\_noblink__

    Blink off\.

  - <a name='59'></a>__::term::ansi::send::sda\_norevers__

    Reverse off\.

  - <a name='60'></a>__::term::ansi::send::sda\_nohidden__

    Hidden off\.

  - <a name='61'></a>__::term::ansi::send::sda\_nostrike__

    Strike\-through off\.

  - <a name='62'></a>__::term::ansi::send::sda\_reset__

    Reset all attributes to their default values\.

  - <a name='63'></a>__::term::ansi::send::fcp__ *row* *col*

    Force Cursor Position \(aka Go To\)\.

  - <a name='64'></a>__::term::ansi::send::cu__ ?*n*?

    Cursor Up\. *n* defaults to 1\.

  - <a name='65'></a>__::term::ansi::send::cd__ ?*n*?

    Cursor Down\. *n* defaults to 1\.

  - <a name='66'></a>__::term::ansi::send::cf__ ?*n*?

    Cursor Forward\. *n* defaults to 1\.

  - <a name='67'></a>__::term::ansi::send::cb__ ?*n*?

    Cursor Backward\. *n* defaults to 1\.

  - <a name='68'></a>__::term::ansi::send::ss__ ?*s* *e*?

    Scroll Screen \(entire display, or between rows start end, inclusive\)\.

  - <a name='69'></a>__::term::ansi::send::skd__ *code* *str*

    Set Key Definition\.

  - <a name='70'></a>__::term::ansi::send::title__ *str*

    Set the terminal title\.

  - <a name='71'></a>__::term::ansi::send::gron__

    Switch to character/box graphics\. I\.e\. switch to the alternate font\.

  - <a name='72'></a>__::term::ansi::send::groff__

    Switch to regular characters\. I\.e\. switch to the default font\.

  - <a name='73'></a>__::term::ansi::send::tlc__

    Character graphics, Top Left Corner\.

  - <a name='74'></a>__::term::ansi::send::trc__

    Character graphics, Top Right Corner\.

  - <a name='75'></a>__::term::ansi::send::brc__

    Character graphics, Bottom Right Corner\.

  - <a name='76'></a>__::term::ansi::send::blc__

    Character graphics, Bottom Left Corner\.

  - <a name='77'></a>__::term::ansi::send::ltj__

    Character graphics, Left T Junction\.

  - <a name='78'></a>__::term::ansi::send::ttj__

    Character graphics, Top T Junction\.

  - <a name='79'></a>__::term::ansi::send::rtj__

    Character graphics, Right T Junction\.

  - <a name='80'></a>__::term::ansi::send::btj__

    Character graphics, Bottom T Junction\.

  - <a name='81'></a>__::term::ansi::send::fwj__

    Character graphics, Four\-Way Junction\.

  - <a name='82'></a>__::term::ansi::send::hl__

    Character graphics, Horizontal Line\.

  - <a name='83'></a>__::term::ansi::send::vl__

    Character graphics, Vertical Line\.

  - <a name='84'></a>__::term::ansi::send::groptim__ *str*

    Optimize character graphics\. The generator commands above create way to many
    superfluous commands shifting into and out of the graphics mode\. This
    command removes all shifts which are not needed\. To this end it also knows
    which characters will look the same in both modes, to handle strings created
    outside of this package\.

  - <a name='85'></a>__::term::ansi::send::clear__

    Clear screen\. In essence a sequence of CursorHome \+ EraseDown\.

  - <a name='86'></a>__::term::ansi::send::init__

    Initialize default and alternate fonts to ASCII and box graphics\.

  - <a name='87'></a>__::term::ansi::send::showat__ *row* *col* *text*

    Show the block of text at the specified location\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[character output](\.\./\.\./\.\./\.\./index\.md\#character\_output),
[control](\.\./\.\./\.\./\.\./index\.md\#control),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/term/imenu.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

[//000000001]: # (term::interact::menu \- Terminal control)
[//000000002]: # (Generated from file 'imenu\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::interact::menu\(n\) 0\.1 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::interact::menu \- Terminal widget, menu

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Class API](#section2)

  - [Object API](#section3)

  - [Configuration](#section4)

  - [Interaction](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term::interact::menu ?0\.1?  

[__term::interact::menu__ *object* *dict* ?*options*\.\.\.?](#1)  
[*object* __interact__](#2)  
[*object* __done__](#3)  
[*object* __clear__](#4)  
[*object* __configure__](#5)  
[*object* __configure__ *option*](#6)  
[*object* __configure__ *option* *value*\.\.\.](#7)  
[*object* __cget__ *option*](#8)  

# <a name='description'></a>DESCRIPTION

This package provides a class for the creation of a simple menu control\.

# <a name='section2'></a>Class API

The package exports a single command, the class command, enabling the creation
of menu instances\. Its API is:

  - <a name='1'></a>__term::interact::menu__ *object* *dict* ?*options*\.\.\.?

    This command creates a new menu object with the name *object*, initializes
    it, and returns the fully qualified name of the object command as its
    result\.

    The argument is the menu to show, possibly followed by configuration options
    and their values\. The options are explained in the section
    [Configuration](#section4)\. The menu is a dictionary maping labels to
    symbolic action codes\.

# <a name='section3'></a>Object API

The objects created by the class command provide the methods listed below:

  - <a name='2'></a>*object* __interact__

    Shows the menu in the screen at the configured location and starts
    interacting with it\. This opens its own event loop for the processing of
    incoming characters\. The method returns when the interaction has completed\.
    See section [Interaction](#section5) for a description of the possible
    interaction\.

    The method returns the symbolic action of the menu item selected by the user
    at the end of the interaction\.

  - <a name='3'></a>*object* __done__

    This method can be used by user supplied actions to terminate the
    interaction with the object\.

  - <a name='4'></a>*object* __clear__

    This method can be used by user supplied actions to remove the menu from the
    terminal\.

  - <a name='5'></a>*object* __configure__

  - <a name='6'></a>*object* __configure__ *option*

  - <a name='7'></a>*object* __configure__ *option* *value*\.\.\.

  - <a name='8'></a>*object* __cget__ *option*

    Standard methods to retrieve and configure the options of the menu\.

# <a name='section4'></a>Configuration

A menu instance recognizes the following options:

  - __\-in__ chan

    Specifies the channel to read character sequences from\. Defaults to
    __stdin__\.

  - __\-out__ chan

    Specifies the channel to write the menu contents to\. Defaults to
    __stdout__\.

  - __\-column__ int

    Specifies the column of the terminal where the left margin of the menu
    display should appear\. Defaults to 0, i\.e\. the left\-most column\.

  - __\-line__ int

    Specifies the line of the terminal where the top margin of the menu display
    should appear\. Defaults to 0, i\.e\. the top\-most line\.

  - __\-height__ int

    Specifies the number of lines of text to show at most in the display\.
    Defaults to 25\.

  - __\-actions__ dict

    Specifies a dictionary containing additional actions, using character
    sequences as keys\. Note that these sequences cannot override the hardwired
    sequences described in section [Interaction](#section5)\.

  - __\-hilitleft__ int

  - __\-hilitright__ int

    By default the entire selected menu entry is highlighted in revers output\.
    However, when present these two options restrict revers dispay to the
    specified sub\-range of the entry\.

  - __\-framed__ bool

    By default the menu is shown using only header and footer out of characters
    box graphics\. If this flag is set the menu is fully enclosed in a box\.

# <a name='section5'></a>Interaction

A menu object recognizes the control sequences listed below and acts as
described\. The user can supply more control sequences to act on via the
configuration, but is not able to overide these defaults\.

  - Cursor Up

    The selection is moved up one entry, except if the first entry of the menu
    is already selected\.

  - Cursor Down

    The selection is moved down one entry, except if the last entry of the menu
    is already selected\.

  - Enter/Return

    The interaction with the object is terminated\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[control](\.\./\.\./\.\./\.\./index\.md\#control),
[menu](\.\./\.\./\.\./\.\./index\.md\#menu),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal), [text
display](\.\./\.\./\.\./\.\./index\.md\#text\_display)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/term/ipager.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

[//000000001]: # (term::interact::pager \- Terminal control)
[//000000002]: # (Generated from file 'ipager\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::interact::pager\(n\) 0\.1 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::interact::pager \- Terminal widget, paging

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Class API](#section2)

  - [Object API](#section3)

  - [Configuration](#section4)

  - [Interaction](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term::interact::pager ?0\.1?  

[__term::interact::pager__ *object* *text* ?*options*\.\.\.?](#1)  
[*object* __interact__](#2)  
[*object* __done__](#3)  
[*object* __clear__](#4)  
[*object* __text__ *text*](#5)  
[*object* __configure__](#6)  
[*object* __configure__ *option*](#7)  
[*object* __configure__ *option* *value*\.\.\.](#8)  
[*object* __cget__ *option*](#9)  

# <a name='description'></a>DESCRIPTION

This package provides a class for the creation of a simple paging text display\.

# <a name='section2'></a>Class API

The package exports a single command, the class command, enabling the creation
of pager instances\. Its API is:

  - <a name='1'></a>__term::interact::pager__ *object* *text* ?*options*\.\.\.?

    This command creates a new pager object with the name *object*,
    initializes it, and returns the fully qualified name of the object command
    as its result\.

    The argument is the text to show, possibly followed by configuration options
    and their values\. The options are explained in the section
    [Configuration](#section4)\.

# <a name='section3'></a>Object API

The objects created by the class command provide the methods listed below:

  - <a name='2'></a>*object* __interact__

    Show the pager in the screen at the configured location and start
    interacting with it\. This opens its own event loop for the processing of
    incoming characters\. The method returns when the interaction has completed\.
    See section [Interaction](#section5) for a description of the possible
    interaction\.

  - <a name='3'></a>*object* __done__

    This method can be used by user supplied actions to terminate the
    interaction with the object\.

  - <a name='4'></a>*object* __clear__

    This method can be used by user supplied actions to remove the pager from
    the terminal\.

  - <a name='5'></a>*object* __text__ *text*

    This method can be used to change the text shown by the pager\. The pager
    will reset the dispay to show the first line of the text at the top\.

  - <a name='6'></a>*object* __configure__

  - <a name='7'></a>*object* __configure__ *option*

  - <a name='8'></a>*object* __configure__ *option* *value*\.\.\.

  - <a name='9'></a>*object* __cget__ *option*

    Standard methods to retrieve and configure the options of the pager\.

# <a name='section4'></a>Configuration

A pager instance recognizes the following options:

  - __\-in__ chan

    Specifies the channel to read character sequences from\. Defaults to
    __stdin__\.

  - __\-out__ chan

    Specifies the channel to write the pager contents to\. Defaults to
    __stdout__\.

  - __\-column__ int

    Specifies the column of the terminal where the left margin of the pager
    display should appear\. Defaults to 0, i\.e\. the left\-most column\.

  - __\-line__ int

    Specifies the line of the terminal where the top margin of the pager display
    should appear\. Defaults to 0, i\.e\. the top\-most line\.

  - __\-height__ int

    Specifies the number of lines of text to show at most in the display\.
    Defaults to 25\.

  - __\-actions__ dict

    Specifies a dictionary containing additional actions, using character
    sequences as keys\. Note that these sequences cannot override the hardwired
    sequences described in section [Interaction](#section5)\.

# <a name='section5'></a>Interaction

A pager object recognizes the control sequences listed below and acts as
described\. The user can supply more control sequences to act on via the
configuration, but is not able to overide these defaults\.

  - Cursor Up

    The text is scrolled down a single line, making one more line visible at the
    top\. The pager will not react if the first line of the text is already
    shown\.

  - Cursor Down

    The text is scrolled up a single line, making one more line visible at the
    bottom\. The pager will not react if the last line of the text is already
    shown\.

  - Page Up

    The text is scrolled down a page\. The pager will not react if the first line
    of the text is already shown\.

  - Page Down

    The text is scrolled up a page\. The pager will not react if the last line of
    the text is already shown\.

  - Enter/Return

    The interaction with the object is terminated\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[control](\.\./\.\./\.\./\.\./index\.md\#control),
[pager](\.\./\.\./\.\./\.\./index\.md\#pager),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal), [text
display](\.\./\.\./\.\./\.\./index\.md\#text\_display)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/term/receive.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

[//000000001]: # (term::receive \- Terminal control)
[//000000002]: # (Generated from file 'receive\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::receive\(n\) 0\.1 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::receive \- General input from terminals

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term::receive ?0\.1?  

[__::term::receive::getch__ ?*chan*?](#1)  
[__::term::receive::listen__ *cmd* ?*chan*?](#2)  
[*cmd* __process__ *string*](#3)  
[*cmd* __eof__](#4)  
[__::term::receive::unlisten__ ?*chan*?](#5)  

# <a name='description'></a>DESCRIPTION

This package provides the most primitive commands for receiving characters to a
terminal\. They are in essence convenient wrappers around the builtin commands
__[read](\.\./\.\./\.\./\.\./index\.md\#read)__ and __fileevent__\.

  - <a name='1'></a>__::term::receive::getch__ ?*chan*?

    This command reads a single character from the channel with handle *chan*
    and returns it as the result of the command\.

    If not specified *chan* defaults to __stdin__\.

    It is the responsibility of the caller to make sure that the channel can
    provide single characters\. On unix this can be done, for example, by using
    the command of package __[term::ansi::ctrl::unix](ansi\_ctrlu\.md)__\.

  - <a name='2'></a>__::term::receive::listen__ *cmd* ?*chan*?

    This command sets up a filevent listener for the channel with handle
    *chan* and invokes the command prefix *cmd* whenever characters have
    been received, or EOF was reached\.

    If not specified *chan* defaults to __stdin__\.

    The signature of the command prefix is

      * <a name='3'></a>*cmd* __process__ *string*

        This method is invoked when characters were received, and *string*
        holds them for processing\.

      * <a name='4'></a>*cmd* __eof__

        This method is invoked when EOF was reached on the channel we listen on\.
        It will be the last call to be received by the callback\.

  - <a name='5'></a>__::term::receive::unlisten__ ?*chan*?

    This command disables the filevent listener for the channel with handle
    *chan*\.

    If not specified *chan* defaults to __stdin__\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[character input](\.\./\.\./\.\./\.\./index\.md\#character\_input),
[control](\.\./\.\./\.\./\.\./index\.md\#control), [get
character](\.\./\.\./\.\./\.\./index\.md\#get\_character),
[listener](\.\./\.\./\.\./\.\./index\.md\#listener),
[receiver](\.\./\.\./\.\./\.\./index\.md\#receiver),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































Deleted embedded/md/tcllib/files/modules/term/term.md.

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

[//000000001]: # (term \- Terminal control)
[//000000002]: # (Generated from file 'term\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term\(n\) 0\.1 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term \- General terminal control

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term ?0\.1?  

# <a name='description'></a>DESCRIPTION

It is planned to have this package provide highlevel general terminal control
commands, in the vein of ncurses or similar packages\. Currently nothing has been
implemented however\. I\.e\. this package is empty\. It can be loaded, yet provides
nothing\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[control](\.\./\.\./\.\./\.\./index\.md\#control),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































Deleted embedded/md/tcllib/files/modules/term/term_bind.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

[//000000001]: # (term::receive::bind \- Terminal control)
[//000000002]: # (Generated from file 'term\_bind\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::receive::bind\(n\) 0\.1 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::receive::bind \- Keyboard dispatch from terminals

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Class API](#section2)

  - [Object API](#section3)

  - [Notes](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term::receive::bind ?0\.1?  

[__term::receive::bind__ *object* ?*map*?](#1)  
[*object* __map__ *str* *cmd*](#2)  
[*object* __default__ *cmd*](#3)  
[*object* __listen__ ?*chan*?](#4)  
[*object* __unlisten__ ?*chan*?](#5)  
[*object* __reset__](#6)  
[*object* __next__ *char*](#7)  
[*object* __process__ *str*](#8)  
[*object* __eof__](#9)  

# <a name='description'></a>DESCRIPTION

This package provides a class for the creation of simple dispatchers from
character sequences to actions\. Internally each dispatcher is in essence a
deterministic finite automaton with tree structure\.

# <a name='section2'></a>Class API

The package exports a single command, the class command, enabling the creation
of dispatcher instances\. Its API is:

  - <a name='1'></a>__term::receive::bind__ *object* ?*map*?

    This command creates a new dispatcher object with the name *object*,
    initializes it, and returns the fully qualified name of the object command
    as its result\.

    The argument is a dictionary mapping from strings, i\.e\. character sequences
    to the command prefices to invoke when the sequence is found in the input
    stream\.

# <a name='section3'></a>Object API

The objects created by the class command provide the methods listed below:

  - <a name='2'></a>*object* __map__ *str* *cmd*

    This method adds an additional mapping from the string *str* to the action
    *cmd*\. The mapping will take effect immediately should the processor be in
    a prefix of *str*, or at the next reset operation\. The action is a command
    prefix and will be invoked with one argument appended to it, the character
    sequence causing the invokation\. It is executed in the global namespace\.

  - <a name='3'></a>*object* __default__ *cmd*

    This method defines a default action *cmd* which will be invoked whenever
    an unknown character sequence is encountered\. The command prefix is handled
    in the same as the regular action defined via method __map__\.

  - <a name='4'></a>*object* __listen__ ?*chan*?

    This methods sets up a filevent listener for the channel with handle
    *chan* and invokes the dispatcher object whenever characters have been
    received, or EOF was reached\.

    If not specified *chan* defaults to __stdin__\.

  - <a name='5'></a>*object* __unlisten__ ?*chan*?

    This methods removes the filevent listener for the channel with handle
    *chan*\.

    If not specified *chan* defaults to __stdin__\.

  - <a name='6'></a>*object* __reset__

    This method resets the character processor to the beginning of the tree\.

  - <a name='7'></a>*object* __next__ *char*

    This method causes the character processor to process the character *c*\.
    This may simply advance the internal state, or invoke an associated action
    for a recognized sequence\.

  - <a name='8'></a>*object* __process__ *str*

    This method causes the character processor to process the character sequence
    *str*, advancing the internal state and invoking action as necessary\. This
    is a callback for __listen__\.

  - <a name='9'></a>*object* __eof__

    This method causes the character processor to handle EOF on the input\. This
    is currently no\-op\. This is a callback for __listen__\.

# <a name='section4'></a>Notes

The simplicity of the DFA means that it is not possible to recognize a character
sequence with has a another recognized character sequence as its prefix\.

In other words, the set of recognized strings has to form a *prefix code*\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[character input](\.\./\.\./\.\./\.\./index\.md\#character\_input),
[control](\.\./\.\./\.\./\.\./index\.md\#control),
[dispatcher](\.\./\.\./\.\./\.\./index\.md\#dispatcher),
[listener](\.\./\.\./\.\./\.\./index\.md\#listener),
[receiver](\.\./\.\./\.\./\.\./index\.md\#receiver),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/term/term_send.md.

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

[//000000001]: # (term::send \- Terminal control)
[//000000002]: # (Generated from file 'term\_send\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (term::send\(n\) 0\.1 tcllib "Terminal control")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

term::send \- General output to terminals

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require term::send ?0\.1?  

[__::term::send::wrch__ *chan* *str*](#1)  
[__::term::send::wr__ *str*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides the most primitive commands for sending characters to a
terminal\. They are in essence convenient wrappers around the builtin command
__puts__\.

  - <a name='1'></a>__::term::send::wrch__ *chan* *str*

    Send the text *str* to the channel specified by the handle *chan*\. In
    contrast to the builtin command __puts__ this command does not terminate
    the string with a line terminator\. It also forces an flush of Tcl internal
    and OS buffers to ensure that the characters are processed immediately\.

  - <a name='2'></a>__::term::send::wr__ *str*

    This convenience command is like __::term::send::wrch__, except that the
    destination channel is fixed to *stdout*\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *term* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[character output](\.\./\.\./\.\./\.\./index\.md\#character\_output),
[control](\.\./\.\./\.\./\.\./index\.md\#control),
[terminal](\.\./\.\./\.\./\.\./index\.md\#terminal)

# <a name='category'></a>CATEGORY

Terminal control

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































Deleted embedded/md/tcllib/files/modules/textutil/adjust.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224

[//000000001]: # (textutil::adjust \- Text and string utilities, macro processing)
[//000000002]: # (Generated from file 'adjust\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (textutil::adjust\(n\) 0\.7\.3 tcllib "Text and string utilities, macro processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

textutil::adjust \- Procedures to adjust, indent, and undent paragraphs

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil::adjust ?0\.7\.3?  

[__::textutil::adjust::adjust__ *string* ?*option value\.\.\.*?](#1)  
[__::textutil::adjust::readPatterns__ *filename*](#2)  
[__::textutil::adjust::listPredefined__](#3)  
[__::textutil::adjust::getPredefined__ *filename*](#4)  
[__::textutil::adjust::indent__ *string* *prefix* ?*skip*?](#5)  
[__::textutil::adjust::undent__ *string*](#6)  

# <a name='description'></a>DESCRIPTION

The package __textutil::adjust__ provides commands that manipulate strings
or texts \(a\.k\.a\. long strings or string with embedded newlines or paragraphs\),
adjusting, or indenting them\.

The complete set of procedures is described below\.

  - <a name='1'></a>__::textutil::adjust::adjust__ *string* ?*option value\.\.\.*?

    Do a justification on the *string* according to the options\. The string is
    taken as one big paragraph, ignoring any newlines\. Then the line is
    formatted according to the options used, and the command returns a new
    string with enough lines to contain all the printable chars in the input
    string\. A line is a set of characters between the beginning of the string
    and a newline, or between 2 newlines, or between a newline and the end of
    the string\. If the input string is small enough, the returned string won't
    contain any newlines\.

    Together with __::textutil::adjust::indent__ it is possible to create
    properly wrapped paragraphs with arbitrary indentations\.

    By default, any occurrence of space or tabulation characters are replaced by
    a single space so that each word in a line is separated from the next one by
    exactly one space character, and this forms a *real* line\. Each *real*
    line is placed in a *logical* line, which has exactly a given length \(see
    the option __\-length__ below\)\. The *real* line may be shorter\. Again
    by default, trailing spaces are ignored before returning the string \(see the
    option __\-full__ below\)\.

    The following options may be used after the *string* parameter, and change
    the way the command places a *real* line in a *logical* line\.

      * __\-full__ *boolean*

        If set to __false__ \(default\), trailing space characters are deleted
        before returning the string\. If set to __true__, any trailing space
        characters are left in the string\.

      * __\-hyphenate__ *boolean*

        If set to __false__ \(default\), no hyphenation will be done\. If set
        to __true__, the command will try to hyphenate the last word of a
        line\. *Note*: Hyphenation patterns must be loaded prior, using the
        command __::textutil::adjust::readPatterns__\.

      * __\-justify__ __center&#124;left&#124;plain&#124;right__

        Sets the justification of the returned string to either __left__
        \(default\), __center__, __plain__ or __right__\. The
        justification means that any line in the returned string but the last
        one is build according to the value\. If the justification is set to
        __plain__ and the number of printable chars in the last line is less
        than 90% of the length of a line \(see the option __\-length__\), then
        this line is justified with the __left__ value, avoiding the
        expansion of this line when it is too small\. The meaning of each value
        is:

          + __center__

            The real line is centered in the logical line\. If needed, a set of
            space characters are added at the beginning \(half of the needed set\)
            and at the end \(half of the needed set\) of the line if required \(see
            the option __\-full__\)\.

          + __left__

            The real line is set on the left of the logical line\. It means that
            there are no space chars at the beginning of this line\. If required,
            all needed space chars are added at the end of the line \(see the
            option __\-full__\)\.

          + __plain__

            The real line is exactly set in the logical line\. It means that
            there are no leading or trailing space chars\. All the needed space
            chars are added in the *real* line, between 2 \(or more\) words\.

          + __right__

            The real line is set on the right of the logical line\. It means that
            there are no space chars at the end of this line, and there may be
            some space chars at the beginning, despite of the __\-full__
            option\.

      * __\-length__ *integer*

        Set the length of the *logical* line in the string to *integer*\.
        *integer* must be a positive integer value\. Defaults to __72__\.

      * __\-strictlength__ *boolean*

        If set to __false__ \(default\), a line can exceed the specified
        __\-length__ if a single word is longer than __\-length__\. If set
        to __true__, words that are longer than __\-length__ are split so
        that no line exceeds the specified __\-length__\.

  - <a name='2'></a>__::textutil::adjust::readPatterns__ *filename*

    Loads the internal storage for hyphenation patterns with the contents of the
    file *filename*\. This has to be done prior to calling command
    __::textutil::adjust::adjust__ with "__\-hyphenate__ __true__",
    or the hyphenation process will not work correctly\.

    The package comes with a number of predefined pattern files, and the command
    __::textutil::adjust::listPredefined__ can be used to find out their
    names\.

  - <a name='3'></a>__::textutil::adjust::listPredefined__

    This command returns a list containing the names of the hyphenation files
    coming with this package\.

  - <a name='4'></a>__::textutil::adjust::getPredefined__ *filename*

    Use this command to query the package for the full path name of the
    hyphenation file *filename* coming with the package\. Only the filenames
    found in the list returned by __::textutil::adjust::listPredefined__ are
    legal arguments for this command\.

  - <a name='5'></a>__::textutil::adjust::indent__ *string* *prefix* ?*skip*?

    Each line in the *string* is indented by adding the string *prefix* at
    its beginning\. The modified string is returned as the result of the command\.

    If *skip* is specified the first *skip* lines are left untouched\. The
    default for *skip* is __0__, causing the modification of all lines\.
    Negative values for *skip* are treated like __0__\. In other words,
    *skip* > __0__ creates a hanging indentation\.

    Together with __::textutil::adjust::adjust__ it is possible to create
    properly wrapped paragraphs with arbitrary indentations\.

  - <a name='6'></a>__::textutil::adjust::undent__ *string*

    The command computes the common prefix for all lines in *string*
    consisting solely out of whitespace, removes this from each line and returns
    the modified string\.

    Lines containing only whitespace are always reduced to completely empty
    lines\. They and empty lines are also ignored when computing the prefix to
    remove\.

    Together with __::textutil::adjust::adjust__ it is possible to create
    properly wrapped paragraphs with arbitrary indentations\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

regexp\(n\), split\(n\), string\(n\)

# <a name='keywords'></a>KEYWORDS

[TeX](\.\./\.\./\.\./\.\./index\.md\#tex),
[adjusting](\.\./\.\./\.\./\.\./index\.md\#adjusting),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[hyphenation](\.\./\.\./\.\./\.\./index\.md\#hyphenation),
[indenting](\.\./\.\./\.\./\.\./index\.md\#indenting),
[justification](\.\./\.\./\.\./\.\./index\.md\#justification),
[paragraph](\.\./\.\./\.\./\.\./index\.md\#paragraph),
[string](\.\./\.\./\.\./\.\./index\.md\#string),
[undenting](\.\./\.\./\.\./\.\./index\.md\#undenting)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/textutil/expander.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485

[//000000001]: # (textutil::expander \- Text and string utilities, macro processing)
[//000000002]: # (Generated from file 'expander\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; William H\. Duquette, http://www\.wjduquette\.com/expand)
[//000000004]: # (textutil::expander\(n\) 1\.3\.1 tcllib "Text and string utilities, macro processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

textutil::expander \- Procedures to process templates and expand text\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXPANDER API](#section2)

  - [TUTORIAL](#section3)

      - [Basics](#subsection1)

      - [Embedding Macros](#subsection2)

      - [Writing Macro Commands](#subsection3)

      - [Changing the Expansion Brackets](#subsection4)

      - [Customized Macro Expansion](#subsection5)

      - [Using the Context Stack](#subsection6)

  - [HISTORY](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil::expander ?1\.3\.1?  

[__::textutil::expander__ *expanderName*](#1)  
[*expanderName* __cappend__ *text*](#2)  
[*expanderName* __cget__ *varname*](#3)  
[*expanderName* __cis__ *cname*](#4)  
[*expanderName* __cname__](#5)  
[*expanderName* __cpop__ *cname*](#6)  
[*expanderName* __ctopandclear__](#7)  
[*expanderName* __cpush__ *cname*](#8)  
[*expanderName* __cset__ *varname* *value*](#9)  
[*expanderName* __cvar__ *varname*](#10)  
[*expanderName* __errmode__ *newErrmode*](#11)  
[*expanderName* __evalcmd__ ?*newEvalCmd*?](#12)  
[*expanderName* __expand__ *string* ?*brackets*?](#13)  
[*expanderName* __lb__ ?*newbracket*?](#14)  
[*expanderName* __rb__ ?*newbracket*?](#15)  
[*expanderName* __reset__](#16)  
[*expanderName* __setbrackets__ *lbrack rbrack*](#17)  
[*expanderName* __textcmd__ ?*newTextCmd*?](#18)  
[*expanderName* __where__](#19)  

# <a name='description'></a>DESCRIPTION

The Tcl __[subst](\.\./\.\./\.\./\.\./index\.md\#subst)__ command is often used to
support a kind of template processing\. Given a string with embedded variables or
function calls, __[subst](\.\./\.\./\.\./\.\./index\.md\#subst)__ will interpolate
the variable and function values, returning the new string:

    % set greeting "Howdy"
    Howdy
    % proc place {} {return "World"}
    % subst {$greeting, [place]!}
    Howdy, World!
    %

By defining a suitable set of Tcl commands,
__[subst](\.\./\.\./\.\./\.\./index\.md\#subst)__ can be used to implement a
markup language similar to HTML\.

The __[subst](\.\./\.\./\.\./\.\./index\.md\#subst)__ command is efficient, but it
has three drawbacks for this kind of template processing:

  - There's no way to identify and process the plain text between two embedded
    Tcl commands; that makes it difficult to handle plain text in a
    context\-sensitive way\.

  - Embedded commands are necessarily bracketed by __\[__ and __\]__; it's
    convenient to be able to choose different brackets in special cases\. Someone
    producing web pages that include a large quantity of Tcl code examples might
    easily prefer to use __<<__ and __>>__ as the embedded code
    delimiters instead\.

  - There's no easy way to handle incremental input, as one might wish to do
    when reading data from a socket\.

At present, expander solves the first two problems; eventually it will solve the
third problem as well\.

The following section describes the command API to the expander; this is
followed by the tutorial sections, see [TUTORIAL](#section3)\.

# <a name='section2'></a>EXPANDER API

The __textutil::expander__ package provides only one command, described
below\. The rest of the section is taken by a description of the methods for the
expander objects created by this command\.

  - <a name='1'></a>__::textutil::expander__ *expanderName*

    The command creates a new expander object with an associated Tcl command
    whose name is *expanderName*\. This command may be used to invoke various
    operations on the graph\. If the *expanderName* is not fully qualified it
    is interpreted as relative to the current namespace\. The command has the
    following general form:

    > *expanderName* option ?*arg arg \.\.\.*?

    *Option* and the *arg*s determine the exact behavior of the command\.

The following commands are possible for expander objects:

  - <a name='2'></a>*expanderName* __cappend__ *text*

    Appends a string to the output in the current context\. This command should
    rarely be used by macros or application code\.

  - <a name='3'></a>*expanderName* __cget__ *varname*

    Retrieves the value of variable *varname*, defined in the current context\.

  - <a name='4'></a>*expanderName* __cis__ *cname*

    Determines whether or not the name of the current context is *cname*\.

  - <a name='5'></a>*expanderName* __cname__

    Returns the name of the current context\.

  - <a name='6'></a>*expanderName* __cpop__ *cname*

    Pops a context from the context stack, returning all accumulated output in
    that context\. The context must be named *cname*, or an error results\.

  - <a name='7'></a>*expanderName* __ctopandclear__

    Returns the output currently captured in the topmost context and clears that
    buffer\. This is similar to a combination of __cpop__ followed by
    __cpush__, except that internal state \(brackets\) is preserved here\.

  - <a name='8'></a>*expanderName* __cpush__ *cname*

    Pushes a context named *cname* onto the context stack\. The context must be
    popped by __cpop__ before expansion ends or an error results\.

  - <a name='9'></a>*expanderName* __cset__ *varname* *value*

    Sets variable *varname* to *value* in the current context\.

  - <a name='10'></a>*expanderName* __cvar__ *varname*

    Retrieves the internal variable name of context variable *varname*; this
    allows the variable to be passed to commands like __lappend__\.

  - <a name='11'></a>*expanderName* __errmode__ *newErrmode*

    Sets the macro expansion error mode to one of __nothing__,
    __macro__, __error__, or __fail__; the default value is
    __fail__\. The value determines what the expander does if an error is
    detected during expansion of a macro\.

      * __fail__

        The error propagates normally and can be caught or ignored by the
        application\.

      * __error__

        The macro expands into a detailed error message, and expansion
        continues\.

      * __macro__

        The macro expands to itself; that is, it is passed along to the output
        unchanged\.

      * __nothing__

        The macro expands to the empty string, and is effectively ignored\.

  - <a name='12'></a>*expanderName* __evalcmd__ ?*newEvalCmd*?

    Returns the current evaluation command, which defaults to __uplevel
    \#0__\. If specified, *newEvalCmd* will be saved for future use and then
    returned; it must be a Tcl command expecting one additional argument: the
    macro to evaluate\.

  - <a name='13'></a>*expanderName* __expand__ *string* ?*brackets*?

    Expands the input string, replacing embedded macros with their expanded
    values, and returns the expanded string\.

    Note that this method pushes a new \(empty\) context on the stack of contexts
    while it is running, and removes it on return\.

    If *brackets* is given, it must be a list of two strings; the items will
    be used as the left and right macro expansion bracket sequences for this
    expansion only\.

  - <a name='14'></a>*expanderName* __lb__ ?*newbracket*?

    Returns the current value of the left macro expansion bracket; this is for
    use as or within a macro, when the bracket needs to be included in the
    output text\. If *newbracket* is specified, it becomes the new bracket, and
    is returned\.

  - <a name='15'></a>*expanderName* __rb__ ?*newbracket*?

    Returns the current value of the right macro expansion bracket; this is for
    use as or within a macro, when the bracket needs to be included in the
    output text\. If *newbracket* is specified, it becomes the new bracket, and
    is returned\.

  - <a name='16'></a>*expanderName* __reset__

    Resets all expander settings to their initial values\. Unusual results are
    likely if this command is called from within a call to __expand__\.

  - <a name='17'></a>*expanderName* __setbrackets__ *lbrack rbrack*

    Sets the left and right macro expansion brackets\. This command is for use as
    or within a macro, or to permanently change the bracket definitions\. By
    default, the brackets are __\[__ and __\]__, but any non\-empty string
    can be used; for example, __<__ and __>__ or __\(\*__ and
    __\*\)__ or even __Hello,__ and __World\!__\.

  - <a name='18'></a>*expanderName* __textcmd__ ?*newTextCmd*?

    Returns the current command for processing plain text, which defaults to the
    empty string, meaning *identity*\. If specified, *newTextCmd* will be
    saved for future use and then returned; it must be a Tcl command expecting
    one additional argument: the text to process\. The expander object will this
    command for all plain text it encounters, giving the user of the object the
    ability to process all plain text in some standard way before writing it to
    the output\. The object expects that the command returns the processed plain
    text\.

    *Note* that the combination of "__textcmd__ *plaintext*" is run
    through the *evalcmd* for the actual evaluation\. In other words, the
    *textcmd* is treated as a special macro implicitly surrounding all plain
    text in the template\.

  - <a name='19'></a>*expanderName* __where__

    Returns a three\-element list containing the current character position,
    line, and column the expander is at in the processing of the current input
    string\.

# <a name='section3'></a>TUTORIAL

## <a name='subsection1'></a>Basics

To begin, create an expander object:

    % package require textutil::expander
    1.2
    % ::textutil::expander myexp
    ::myexp
    %

The created __::myexp__ object can be used to expand text strings containing
embedded Tcl commands\. By default, embedded commands are delimited by square
brackets\. Note that expander doesn't attempt to interpolate variables, since
variables can be referenced by embedded commands:

    % set greeting "Howdy"
    Howdy
    % proc place {} {return "World"}
    % ::myexp expand {[set greeting], [place]!}
    Howdy, World!
    %

## <a name='subsection2'></a>Embedding Macros

An expander macro is simply a Tcl script embedded within a text string\. Expander
evaluates the script in the global context, and replaces it with its result
string\. For example,

        % set greetings {Howdy Hi "What's up"}
        Howdy Hi "What's up"
        % ::myexp expand {There are many ways to say "Hello, World!":
        [set result {}
        foreach greeting $greetings {
    	append result "$greeting, World!\\n"
        }
        set result]
        And that's just a small sample!}
        There are many ways to say "Hello, World!":
        Howdy, World!
        Hi, World!
        What's up, World!

        And that's just a small sample!
        %

## <a name='subsection3'></a>Writing Macro Commands

More typically, *macro commands* are used to create a markup language\. A macro
command is just a Tcl command that returns an output string\. For example, expand
can be used to implement a generic document markup language that can be
retargeted to HTML or any other output format:

    % proc bold {} {return "<b>"}
    % proc /bold {} {return "</b>"}
    % ::myexp expand {Some of this text is in [bold]boldface[/bold]}
    Some of this text is in <b>boldface</b>
    %

The above definitions of __bold__ and __/bold__ returns HTML, but such
commands can be as complicated as needed; they could, for example, decide what
to return based on the desired output format\.

## <a name='subsection4'></a>Changing the Expansion Brackets

By default, embedded macros are enclosed in square brackets, __\[__ and
__\]__\. If square brackets need to be included in the output, the input can
contain the __lb__ and __rb__ commands\. Alternatively, or if square
brackets are objectionable for some other reason, the macro expansion brackets
can be changed to any pair of non\-empty strings\.

The __setbrackets__ command changes the brackets permanently\. For example,
you can write pseudo\-html by change them to __<__ and __>__:

    % ::myexp setbrackets < >
    % ::myexp expand {<bold>This is boldface</bold>}
    <b>This is boldface</b>

Alternatively, you can change the expansion brackets temporarily by passing the
desired brackets to the __expand__ command:

    % ::myexp setbrackets "\\[" "\\]"
    % ::myexp expand {<bold>This is boldface</bold>} {< >}
    <b>This is boldface</b>
    %

## <a name='subsection5'></a>Customized Macro Expansion

By default, macros are evaluated using the Tcl __uplevel \#0__ command, so
that the embedded code executes in the global context\. The application can
provide a different evaluation command using __evalcmd__; this allows the
application to use a safe interpreter, for example, or even to evaluated
something other than Tcl code\. There is one caveat: to be recognized as valid, a
macro must return 1 when passed to Tcl's "info complete" command\.

For example, the following code "evaluates" each macro by returning the macro
text itself\.

    proc identity {macro} {return $macro}
    ::myexp evalcmd identity

## <a name='subsection6'></a>Using the Context Stack

Often it's desirable to define a pair of macros which operate in some way on the
plain text between them\. Consider a set of macros for adding footnotes to a web
page: one could have implement something like this:

    Dr. Pangloss, however, thinks that this is the best of all
    possible worlds.[footnote "See Candide, by Voltaire"]

The __footnote__ macro would, presumably, assign a number to this footnote
and save the text to be formatted later on\. However, this solution is ugly if
the footnote text is long or should contain additional markup\. Consider the
following instead:

    Dr. Pangloss, however, thinks that this is the best of all
    possible worlds.[footnote]See [bookTitle "Candide"], by
    [authorsName "Voltaire"], for more information.[/footnote]

Here the footnote text is contained between __footnote__ and
__/footnote__ macros, continues onto a second line, and contains several
macros of its own\. This is both clearer and more flexible; however, with the
features presented so far there's no easy way to do it\. That's the purpose of
the context stack\.

All macro expansion takes place in a particular context\. Here, the
__footnote__ macro pushes a new context onto the context stack\. Then, all
expanded text gets placed in that new context\. __/footnote__ retrieves it by
popping the context\. Here's a skeleton implementation of these two macros:

    proc footnote {} {
        ::myexp cpush footnote
    }

    proc /footnote {} {
        set footnoteText [::myexp cpop footnote]

        # Save the footnote text, and return an appropriate footnote
        # number and link.
    }

The __cpush__ command pushes a new context onto the stack; the argument is
the context's name\. It can be any string, but would typically be the name of the
macro itself\. Then, __cpop__ verifies that the current context has the
expected name, pops it off of the stack, and returns the accumulated text\.

Expand provides several other tools related to the context stack\. Suppose the
first macro in a context pair takes arguments or computes values which the
second macro in the pair needs\. After calling __cpush__, the first macro can
define one or more context variables; the second macro can retrieve their values
any time before calling __cpop__\. For example, suppose the document must
specify the footnote number explicitly:

    proc footnote {footnoteNumber} {
        ::myexp cpush footnote
        ::myexp csave num $footnoteNumber
        # Return an appropriate link
    }

    proc /footnote {} {
        set footnoteNumber [::myexp cget num]
        set footnoteText [::myexp cpop footnote]

        # Save the footnote text and its footnoteNumber for future
        # output.
    }

At times, it might be desirable to define macros that are valid only within a
particular context pair; such macros should verify that they are only called
within the correct context using either __cis__ or __cname__\.

# <a name='section4'></a>HISTORY

__expander__ was written by William H\. Duquette; it is a repackaging of the
central algorithm of the expand macro processing tool\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

\[uri, http://www\.wjduquette\.com/expand, regexp,
[split](\.\./\.\./\.\./\.\./index\.md\#split),
[string](\.\./\.\./\.\./\.\./index\.md\#string)

# <a name='keywords'></a>KEYWORDS

[string](\.\./\.\./\.\./\.\./index\.md\#string), [template
processing](\.\./\.\./\.\./\.\./index\.md\#template\_processing), [text
expansion](\.\./\.\./\.\./\.\./index\.md\#text\_expansion)

# <a name='category'></a>CATEGORY

Documentation tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; William H\. Duquette, http://www\.wjduquette\.com/expand
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/textutil/patch.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

[//000000001]: # (textutil::patch \- Text and string utilities)
[//000000002]: # (Generated from file 'patch\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (textutil::patch\(n\) 0\.1 tcllib "Text and string utilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

textutil::patch \- Application of uni\-diff patches to directory trees

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil::patch ?0\.1?  

[__::textutil::patch::apply__ *basedirectory* *striplevel* *patch* *reportcmd*](#1)  
[__\{\*\}reportcmd__ __apply__ *filename*](#2)  
[__\{\*\}reportcmd__ __fail__ *filename* *hunk* *expected* *seen*](#3)  
[__\{\*\}reportcmd__ __fail\-already__ *filename* *hunk*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a single command which applies a patch in [unified
format](https://www\.gnu\.org/software/diffutils/manual/html\_node/Detailed\-Unified\.html)
to a directory tree\.

  - <a name='1'></a>__::textutil::patch::apply__ *basedirectory* *striplevel* *patch* *reportcmd*

    Applies the *patch* \(text of the path, not file\) to the files in the
    *basedirectory* using the specified *striplevel*\. The result of the
    command is the empty string\.

    The *striplevel* argument is equivalent to option __\-p__ of the
    __[patch](\.\./\.\./\.\./\.\./index\.md\#patch)__ command\.

    Errors are thrown when the *patch* does not parse, and nothing is done to
    the files in *basedirectory*\.

    All activities during the application of the patch, including the inability
    to apply a hunk are reported through the command prefix *reportcmd*
    instead\. Files with problems are left unchanged\. Note however that this does
    *not prevent* changes to files with no problems, before and after the
    problematic file\(s\)\.

    The command prefix is called in 3 possible forms:

      * <a name='2'></a>__\{\*\}reportcmd__ __apply__ *filename*

        The caller begins operation on file *fname*, applying all hunks
        collected for said file\.

      * <a name='3'></a>__\{\*\}reportcmd__ __fail__ *filename* *hunk* *expected* *seen*

        Application of hunk number *hunk* of file *filename* has failed\. The
        command expected to find the text *expected*, and saw *seen*
        instead\.

      * <a name='4'></a>__\{\*\}reportcmd__ __fail\-already__ *filename* *hunk*

        Application of hunk number *hunk* of file *filename* has failed\. The
        command believes that this hunk has already been applied to the file\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[diff \-ruN](\.\./\.\./\.\./\.\./index\.md\#diff\_run), [diff, unified
format](\.\./\.\./\.\./\.\./index\.md\#diff\_unified\_format),
[fossil](\.\./\.\./\.\./\.\./index\.md\#fossil), [git](\.\./\.\./\.\./\.\./index\.md\#git),
[patch](\.\./\.\./\.\./\.\./index\.md\#patch), [unified format
diff](\.\./\.\./\.\./\.\./index\.md\#unified\_format\_diff)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































Deleted embedded/md/tcllib/files/modules/textutil/repeat.md.

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
89
90

[//000000001]: # (textutil::repeat \- Text and string utilities, macro processing)
[//000000002]: # (Generated from file 'repeat\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (textutil::repeat\(n\) 0\.7\.1 tcllib "Text and string utilities, macro processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

textutil::repeat \- Procedures to repeat strings\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil::repeat ?0\.7?  

[__::textutil::repeat::strRepeat__ *text* *num*](#1)  
[__::textutil::repeat::blank__ *num*](#2)  

# <a name='description'></a>DESCRIPTION

The package __textutil::repeat__ provides commands to generate long strings
by repeating a shorter string many times\.

The complete set of procedures is described below\.

  - <a name='1'></a>__::textutil::repeat::strRepeat__ *text* *num*

    This command returns a string containing the *text* repeated *num*
    times\. The repetitions are joined without characters between them\. A value
    of *num* <= 0 causes the command to return an empty string\.

    *Note*: If the Tcl core the package is loaded in provides the command
    __string repeat__ then this command will be implemented in its terms,
    for maximum possible speed\. Otherwise a fast implementation in Tcl will be
    used\.

  - <a name='2'></a>__::textutil::repeat::blank__ *num*

    A convenience command\. Returns a string of *num* spaces\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

regexp\(n\), split\(n\), string\(n\)

# <a name='keywords'></a>KEYWORDS

[blanks](\.\./\.\./\.\./\.\./index\.md\#blanks),
[repetition](\.\./\.\./\.\./\.\./index\.md\#repetition),
[string](\.\./\.\./\.\./\.\./index\.md\#string)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































Deleted embedded/md/tcllib/files/modules/textutil/tabify.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114

[//000000001]: # (textutil::tabify \- Text and string utilities, macro processing)
[//000000002]: # (Generated from file 'tabify\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (textutil::tabify\(n\) 0\.7 tcllib "Text and string utilities, macro processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

textutil::tabify \- Procedures to \(un\)tabify strings

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil::tabify ?0\.7?  

[__::textutil::tabify::tabify__ *string* ?*num*?](#1)  
[__::textutil::tabify::tabify2__ *string* ?*num*?](#2)  
[__::textutil::tabify::untabify__ *string* ?*num*?](#3)  
[__::textutil::tabify::untabify2__ *string* ?*num*?](#4)  

# <a name='description'></a>DESCRIPTION

The package __textutil::tabify__ provides commands that convert between
tabulation and ordinary whitespace in strings\.

The complete set of procedures is described below\.

  - <a name='1'></a>__::textutil::tabify::tabify__ *string* ?*num*?

    Tabify the *string* by replacing any substring of *num* space chars by a
    tabulation and return the result as a new string\. *num* defaults to 8\.

  - <a name='2'></a>__::textutil::tabify::tabify2__ *string* ?*num*?

    Similar to __::textutil::tabify__ this command tabifies the *string*
    and returns the result as a new string\. A different algorithm is used
    however\. Instead of replacing any substring of *num* spaces this command
    works more like an editor\. *num* defaults to 8\.

    Each line of the text in *string* is treated as if there are tabstops
    every *num* columns\. Only sequences of space characters containing more
    than one space character and found immediately before a tabstop are replaced
    with tabs\.

  - <a name='3'></a>__::textutil::tabify::untabify__ *string* ?*num*?

    Untabify the *string* by replacing any tabulation char by a substring of
    *num* space chars and return the result as a new string\. *num* defaults
    to 8\.

  - <a name='4'></a>__::textutil::tabify::untabify2__ *string* ?*num*?

    Untabify the *string* by replacing any tabulation char by a substring of
    at most *num* space chars and return the result as a new string\. Unlike
    __textutil::tabify::untabify__ each tab is not replaced by a fixed
    number of space characters\. The command overlays each line in the *string*
    with tabstops every *num* columns instead and replaces tabs with just
    enough space characters to reach the next tabstop\. This is the complement of
    the actions taken by __::textutil::tabify::tabify2__\. *num* defaults
    to 8\.

    There is one asymmetry though: A tab can be replaced with a single space,
    but not the other way around\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

regexp\(n\), split\(n\), string\(n\)

# <a name='keywords'></a>KEYWORDS

[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[string](\.\./\.\./\.\./\.\./index\.md\#string),
[tabstops](\.\./\.\./\.\./\.\./index\.md\#tabstops)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































Deleted embedded/md/tcllib/files/modules/textutil/textutil.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404

[//000000001]: # (textutil \- Text and string utilities, macro processing)
[//000000002]: # (Generated from file 'textutil\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (textutil\(n\) 0\.8 tcllib "Text and string utilities, macro processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

textutil \- Procedures to manipulate texts and strings\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil ?0\.8?  

[__::textutil::adjust__ *string args*](#1)  
[__::textutil::adjust::readPatterns__ *filename*](#2)  
[__::textutil::adjust::listPredefined__](#3)  
[__::textutil::adjust::getPredefined__ *filename*](#4)  
[__::textutil::indent__ *string* *prefix* ?*skip*?](#5)  
[__::textutil::undent__ *string*](#6)  
[__::textutil::splitn__ *string* ?*len*?](#7)  
[__::textutil::splitx__ *string* ?*regexp*?](#8)  
[__::textutil::tabify__ *string* ?*num*?](#9)  
[__::textutil::tabify2__ *string* ?*num*?](#10)  
[__::textutil::trim__ *string* ?*regexp*?](#11)  
[__::textutil::trimleft__ *string* ?*regexp*?](#12)  
[__::textutil::trimright__ *string* ?*regexp*?](#13)  
[__::textutil::trimPrefix__ *string* *prefix*](#14)  
[__::textutil::trimEmptyHeading__ *string*](#15)  
[__::textutil::untabify__ *string* ?*num*?](#16)  
[__::textutil::untabify2__ *string* ?*num*?](#17)  
[__::textutil::strRepeat__ *text num*](#18)  
[__::textutil::blank__ *num*](#19)  
[__::textutil::chop__ *string*](#20)  
[__::textutil::tail__ *string*](#21)  
[__::textutil::cap__ *string*](#22)  
[__::textutil::uncap__ *string*](#23)  
[__::textutil::longestCommonPrefixList__ *list*](#24)  
[__::textutil::longestCommonPrefix__ ?*string*\.\.\.?](#25)  

# <a name='description'></a>DESCRIPTION

The package __textutil__ provides commands that manipulate strings or texts
\(a\.k\.a\. long strings or string with embedded newlines or paragraphs\)\. It is
actually a bundle providing the commands of the six packages

  - __[textutil::adjust](adjust\.md)__

  - __[textutil::repeat](repeat\.md)__

  - __[textutil::split](textutil\_split\.md)__

  - __[textutil::string](textutil\_string\.md)__

  - __[textutil::tabify](tabify\.md)__

  - __[textutil::trim](trim\.md)__

in the namespace __textutil__\.

The bundle is *deprecated*, and it will be removed in a future release of
Tcllib, after the next release\. It is recommended to use the relevant sub
packages instead for whatever functionality is needed by the using package or
application\.

The complete set of procedures is described below\.

  - <a name='1'></a>__::textutil::adjust__ *string args*

    Do a justification on the *string* according to *args*\. The string is
    taken as one big paragraph, ignoring any newlines\. Then the line is
    formatted according to the options used, and the command return a new string
    with enough lines to contain all the printable chars in the input string\. A
    line is a set of chars between the beginning of the string and a newline, or
    between 2 newlines, or between a newline and the end of the string\. If the
    input string is small enough, the returned string won't contain any
    newlines\.

    Together with __::textutil::indent__ it is possible to create properly
    wrapped paragraphs with arbitrary indentations\.

    By default, any occurrence of spaces characters or tabulation are replaced
    by a single space so each word in a line is separated from the next one by
    exactly one space char, and this forms a *real* line\. Each *real* line
    is placed in a *logical* line, which have exactly a given length \(see
    __\-length__ option below\)\. The *real* line may have a lesser length\.
    Again by default, any trailing spaces are ignored before returning the
    string \(see __\-full__ option below\)\. The following options may be used
    after the *string* parameter, and change the way the command place a
    *real* line in a *logical* line\.

      * \-full *boolean*

        If set to __false__, any trailing space chars are deleted before
        returning the string\. If set to __true__, any trailing space chars
        are left in the string\. Default to __false__\.

      * __\-hyphenate__ *boolean*

        if set to __false__, no hyphenation will be done\. If set to
        __true__, the last word of a line is tried to be hyphenated\.
        Defaults to __false__\. Note: hyphenation patterns must be loaded
        prior, using the command __::textutil::adjust::readPatterns__\.

      * __\-justify__ __center&#124;left&#124;plain&#124;right__

        Set the justification of the returned string to __center__,
        __left__, __plain__ or __right__\. By default, it is set to
        __left__\. The justification means that any line in the returned
        string but the last one is build according to the value\. If the
        justification is set to __plain__ and the number of printable chars
        in the last line is less than 90% of the length of a line \(see
        __\-length__\), then this line is justified with the __left__
        value, avoiding the expansion of this line when it is too small\. The
        meaning of each value is:

          + __center__

            The real line is centered in the logical line\. If needed, a set of
            space characters are added at the beginning \(half of the needed set\)
            and at the end \(half of the needed set\) of the line if required \(see
            the option __\-full__\)\.

          + __left__

            The real line is set on the left of the logical line\. It means that
            there are no space chars at the beginning of this line\. If required,
            all needed space chars are added at the end of the line \(see the
            option __\-full__\)\.

          + __plain__

            The real line is exactly set in the logical line\. It means that
            there are no leading or trailing space chars\. All the needed space
            chars are added in the *real* line, between 2 \(or more\) words\.

          + __right__

            The real line is set on the right of the logical line\. It means that
            there are no space chars at the end of this line, and there may be
            some space chars at the beginning, despite of the __\-full__
            option\.

      * __\-length__ *integer*

        Set the length of the *logical* line in the string to *integer*\.
        *integer* must be a positive integer value\. Defaults to __72__\.

      * __\-strictlength__ *boolean*

        If set to __false__, a line can exceed the specified __\-length__
        if a single word is longer than __\-length__\. If set to __true__,
        words that are longer than __\-length__ are split so that no line
        exceeds the specified __\-length__\. Defaults to __false__\.

  - <a name='2'></a>__::textutil::adjust::readPatterns__ *filename*

    Loads the internal storage for hyphenation patterns with the contents of the
    file *filename*\. This has to be done prior to calling command
    __::textutil::adjust__ with "__\-hyphenate__ __true__", or the
    hyphenation process will not work correctly\.

    The package comes with a number of predefined pattern files, and the command
    __::textutil::adjust::listPredefined__ can be used to find out their
    names\.

  - <a name='3'></a>__::textutil::adjust::listPredefined__

    This command returns a list containing the names of the hyphenation files
    coming with this package\.

  - <a name='4'></a>__::textutil::adjust::getPredefined__ *filename*

    Use this command to query the package for the full path name of the
    hyphenation file *filename* coming with the package\. Only the filenames
    found in the list returned by __::textutil::adjust::listPredefined__ are
    legal arguments for this command\.

  - <a name='5'></a>__::textutil::indent__ *string* *prefix* ?*skip*?

    Each line in the *string* indented by adding the string *prefix* at its
    beginning\. The modified string is returned as the result of the command\.

    If *skip* is specified the first *skip* lines are left untouched\. The
    default for *skip* is __0__, causing the modification of all lines\.
    Negative values for *skip* are treated like __0__\. In other words,
    *skip* > __0__ creates a hanging indentation\.

    Together with __::textutil::adjust__ it is possible to create properly
    wrapped paragraphs with arbitrary indentations\.

  - <a name='6'></a>__::textutil::undent__ *string*

    The command computes the common prefix for all lines in *string*
    consisting solely out of whitespace, removes this from each line and returns
    the modified string\.

    Lines containing only whitespace are always reduced to completely empty
    lines\. They and empty lines are also ignored when computing the prefix to
    remove\.

    Together with __::textutil::adjust__ it is possible to create properly
    wrapped paragraphs with arbitrary indentations\.

  - <a name='7'></a>__::textutil::splitn__ *string* ?*len*?

    This command splits the given *string* into chunks of *len* characters
    and returns a list containing these chunks\. The argument *len* defaults to
    __1__ if none is specified\. A negative length is not allowed and will
    cause the command to throw an error\. Providing an empty string as input is
    allowed, the command will then return an empty list\. If the length of the
    *string* is not an entire multiple of the chunk length, then the last
    chunk in the generated list will be shorter than *len*\.

  - <a name='8'></a>__::textutil::splitx__ *string* ?*regexp*?

    Split the *string* and return a list\. The string is split according to the
    regular expression *regexp* instead of a simple list of chars\. Note that
    if you add parenthesis into the *regexp*, the parentheses part of
    separator would be added into list as additional element\. If the *string*
    is empty the result is the empty list, like for
    __[split](\.\./\.\./\.\./\.\./index\.md\#split)__\. If *regexp* is empty the
    *string* is split at every character, like
    __[split](\.\./\.\./\.\./\.\./index\.md\#split)__ does\. The regular expression
    *regexp* defaults to "\[\\\\t \\\\r\\\\n\]\+"\.

  - <a name='9'></a>__::textutil::tabify__ *string* ?*num*?

    Tabify the *string* by replacing any substring of *num* space chars by a
    tabulation and return the result as a new string\. *num* defaults to 8\.

  - <a name='10'></a>__::textutil::tabify2__ *string* ?*num*?

    Similar to __::textutil::tabify__ this command tabifies the *string*
    and returns the result as a new string\. A different algorithm is used
    however\. Instead of replacing any substring of *num* spaces this command
    works more like an editor\. *num* defaults to 8\.

    Each line of the text in *string* is treated as if there are tabstops
    every *num* columns\. Only sequences of space characters containing more
    than one space character and found immediately before a tabstop are replaced
    with tabs\.

  - <a name='11'></a>__::textutil::trim__ *string* ?*regexp*?

    Remove in *string* any leading and trailing substring according to the
    regular expression *regexp* and return the result as a new string\. This
    apply on any *line* in the string, that is any substring between 2 newline
    chars, or between the beginning of the string and a newline, or between a
    newline and the end of the string, or, if the string contain no newline,
    between the beginning and the end of the string\. The regular expression
    *regexp* defaults to "\[ \\\\t\]\+"\.

  - <a name='12'></a>__::textutil::trimleft__ *string* ?*regexp*?

    Remove in *string* any leading substring according to the regular
    expression *regexp* and return the result as a new string\. This apply on
    any *line* in the string, that is any substring between 2 newline chars,
    or between the beginning of the string and a newline, or between a newline
    and the end of the string, or, if the string contain no newline, between the
    beginning and the end of the string\. The regular expression *regexp*
    defaults to "\[ \\\\t\]\+"\.

  - <a name='13'></a>__::textutil::trimright__ *string* ?*regexp*?

    Remove in *string* any trailing substring according to the regular
    expression *regexp* and return the result as a new string\. This apply on
    any *line* in the string, that is any substring between 2 newline chars,
    or between the beginning of the string and a newline, or between a newline
    and the end of the string, or, if the string contain no newline, between the
    beginning and the end of the string\. The regular expression *regexp*
    defaults to "\[ \\\\t\]\+"\.

  - <a name='14'></a>__::textutil::trimPrefix__ *string* *prefix*

    Removes the *prefix* from the beginning of *string* and returns the
    result\. The *string* is left unchanged if it doesn't have *prefix* at
    its beginning\.

  - <a name='15'></a>__::textutil::trimEmptyHeading__ *string*

    Looks for empty lines \(including lines consisting of only whitespace\) at the
    beginning of the *string* and removes it\. The modified string is returned
    as the result of the command\.

  - <a name='16'></a>__::textutil::untabify__ *string* ?*num*?

    Untabify the *string* by replacing any tabulation char by a substring of
    *num* space chars and return the result as a new string\. *num* defaults
    to 8\.

  - <a name='17'></a>__::textutil::untabify2__ *string* ?*num*?

    Untabify the *string* by replacing any tabulation char by a substring of
    at most *num* space chars and return the result as a new string\. Unlike
    __textutil::untabify__ each tab is not replaced by a fixed number of
    space characters\. The command overlays each line in the *string* with
    tabstops every *num* columns instead and replaces tabs with just enough
    space characters to reach the next tabstop\. This is the complement of the
    actions taken by __::textutil::tabify2__\. *num* defaults to 8\.

    There is one asymmetry though: A tab can be replaced with a single space,
    but not the other way around\.

  - <a name='18'></a>__::textutil::strRepeat__ *text num*

    The implementation depends on the core executing the package\. Used
    __string repeat__ if it is present, or a fast tcl implementation if it
    is not\. Returns a string containing the *text* repeated *num* times\. The
    repetitions are joined without characters between them\. A value of *num*
    <= 0 causes the command to return an empty string\.

  - <a name='19'></a>__::textutil::blank__ *num*

    A convenience command\. Returns a string of *num* spaces\.

  - <a name='20'></a>__::textutil::chop__ *string*

    A convenience command\. Removes the last character of *string* and returns
    the shortened string\.

  - <a name='21'></a>__::textutil::tail__ *string*

    A convenience command\. Removes the first character of *string* and returns
    the shortened string\.

  - <a name='22'></a>__::textutil::cap__ *string*

    Capitalizes the first character of *string* and returns the modified
    string\.

  - <a name='23'></a>__::textutil::uncap__ *string*

    The complementary operation to __::textutil::cap__\. Forces the first
    character of *string* to lower case and returns the modified string\.

  - <a name='24'></a>__::textutil::longestCommonPrefixList__ *list*

  - <a name='25'></a>__::textutil::longestCommonPrefix__ ?*string*\.\.\.?

    Computes the longest common prefix for either the *string*s given to the
    command, or the strings specified in the single *list*, and returns it as
    the result of the command\.

    If no strings were specified the result is the empty string\. If only one
    string was specified, the string itself is returned, as it is its own
    longest common prefix\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

regexp\(n\), split\(n\), string\(n\)

# <a name='keywords'></a>KEYWORDS

[TeX](\.\./\.\./\.\./\.\./index\.md\#tex),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[hyphenation](\.\./\.\./\.\./\.\./index\.md\#hyphenation),
[indenting](\.\./\.\./\.\./\.\./index\.md\#indenting),
[paragraph](\.\./\.\./\.\./\.\./index\.md\#paragraph), [regular
expression](\.\./\.\./\.\./\.\./index\.md\#regular\_expression),
[string](\.\./\.\./\.\./\.\./index\.md\#string),
[trimming](\.\./\.\./\.\./\.\./index\.md\#trimming)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/textutil/textutil_split.md.

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
89
90
91
92
93
94
95
96
97

[//000000001]: # (textutil::split \- Text and string utilities, macro processing)
[//000000002]: # (Generated from file 'textutil\_split\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (textutil::split\(n\) 0\.8 tcllib "Text and string utilities, macro processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

textutil::split \- Procedures to split texts

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil::split ?0\.8?  

[__::textutil::split::splitn__ *string* ?*len*?](#1)  
[__::textutil::split::splitx__ *string* ?*regexp*?](#2)  

# <a name='description'></a>DESCRIPTION

The package __textutil::split__ provides commands that split strings by size
and arbitrary regular expressions\.

The complete set of procedures is described below\.

  - <a name='1'></a>__::textutil::split::splitn__ *string* ?*len*?

    This command splits the given *string* into chunks of *len* characters
    and returns a list containing these chunks\. The argument *len* defaults to
    __1__ if none is specified\. A negative length is not allowed and will
    cause the command to throw an error\. Providing an empty string as input is
    allowed, the command will then return an empty list\. If the length of the
    *string* is not an entire multiple of the chunk length, then the last
    chunk in the generated list will be shorter than *len*\.

  - <a name='2'></a>__::textutil::split::splitx__ *string* ?*regexp*?

    This command splits the *string* and return a list\. The string is split
    according to the regular expression *regexp* instead of a simple list of
    chars\. *Note*: When parentheses are used in the *regexp*, i\.e\. regex
    capture groups, then these groups will be added into the result list as
    additional elements\. If the *string* is empty the result is the empty
    list, like for __[split](\.\./\.\./\.\./\.\./index\.md\#split)__\. If
    *regexp* is empty the *string* is split at every character, like
    __[split](\.\./\.\./\.\./\.\./index\.md\#split)__ does\. The regular expression
    *regexp* defaults to "\[\\\\t \\\\r\\\\n\]\+"\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

regexp\(n\), split\(n\), string\(n\)

# <a name='keywords'></a>KEYWORDS

[regular expression](\.\./\.\./\.\./\.\./index\.md\#regular\_expression),
[split](\.\./\.\./\.\./\.\./index\.md\#split),
[string](\.\./\.\./\.\./\.\./index\.md\#string)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































Deleted embedded/md/tcllib/files/modules/textutil/textutil_string.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

[//000000001]: # (textutil::string \- Text and string utilities, macro processing)
[//000000002]: # (Generated from file 'textutil\_string\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (textutil::string\(n\) 0\.8 tcllib "Text and string utilities, macro processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

textutil::string \- Procedures to manipulate texts and strings\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil::string ?0\.8?  

[__::textutil::string::chop__ *string*](#1)  
[__::textutil::string::tail__ *string*](#2)  
[__::textutil::string::cap__ *string*](#3)  
[__::textutil::string::capEachWord__ *string*](#4)  
[__::textutil::string::uncap__ *string*](#5)  
[__::textutil::string::longestCommonPrefixList__ *list*](#6)  
[__::textutil::string::longestCommonPrefix__ ?*string*\.\.\.?](#7)  

# <a name='description'></a>DESCRIPTION

The package __textutil::string__ provides miscellaneous string manipulation
commands\.

The complete set of procedures is described below\.

  - <a name='1'></a>__::textutil::string::chop__ *string*

    A convenience command\. Removes the last character of *string* and returns
    the shortened string\.

  - <a name='2'></a>__::textutil::string::tail__ *string*

    A convenience command\. Removes the first character of *string* and returns
    the shortened string\.

  - <a name='3'></a>__::textutil::string::cap__ *string*

    Capitalizes the first character of *string* and returns the modified
    string\.

  - <a name='4'></a>__::textutil::string::capEachWord__ *string*

    Capitalizes the first character of word of the *string* and returns the
    modified string\. Words quoted with either backslash or dollar\-sign are left
    untouched\.

  - <a name='5'></a>__::textutil::string::uncap__ *string*

    The complementary operation to __::textutil::string::cap__\. Forces the
    first character of *string* to lower case and returns the modified string\.

  - <a name='6'></a>__::textutil::string::longestCommonPrefixList__ *list*

  - <a name='7'></a>__::textutil::string::longestCommonPrefix__ ?*string*\.\.\.?

    Computes the longest common prefix for either the *string*s given to the
    command, or the strings specified in the single *list*, and returns it as
    the result of the command\.

    If no strings were specified the result is the empty string\. If only one
    string was specified, the string itself is returned, as it is its own
    longest common prefix\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

regexp\(n\), split\(n\), string\(n\)

# <a name='keywords'></a>KEYWORDS

[capitalize](\.\./\.\./\.\./\.\./index\.md\#capitalize),
[chop](\.\./\.\./\.\./\.\./index\.md\#chop), [common
prefix](\.\./\.\./\.\./\.\./index\.md\#common\_prefix),
[formatting](\.\./\.\./\.\./\.\./index\.md\#formatting),
[prefix](\.\./\.\./\.\./\.\./index\.md\#prefix),
[string](\.\./\.\./\.\./\.\./index\.md\#string),
[uncapitalize](\.\./\.\./\.\./\.\./index\.md\#uncapitalize)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































Deleted embedded/md/tcllib/files/modules/textutil/trim.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

[//000000001]: # (textutil::trim \- Text and string utilities, macro processing)
[//000000002]: # (Generated from file 'trim\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (textutil::trim\(n\) 0\.7 tcllib "Text and string utilities, macro processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

textutil::trim \- Procedures to trim strings

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require textutil::trim ?0\.7?  

[__::textutil::trim::trim__ *string* ?*regexp*?](#1)  
[__::textutil::trim::trimleft__ *string* ?*regexp*?](#2)  
[__::textutil::trim::trimright__ *string* ?*regexp*?](#3)  
[__::textutil::trim::trimPrefix__ *string* *prefix*](#4)  
[__::textutil::trim::trimEmptyHeading__ *string*](#5)  

# <a name='description'></a>DESCRIPTION

The package __textutil::trim__ provides commands that trim strings using
arbitrary regular expressions\.

The complete set of procedures is described below\.

  - <a name='1'></a>__::textutil::trim::trim__ *string* ?*regexp*?

    Remove in *string* any leading and trailing substring according to the
    regular expression *regexp* and return the result as a new string\. This is
    done for all *lines* in the string, that is any substring between 2
    newline chars, or between the beginning of the string and a newline, or
    between a newline and the end of the string, or, if the string contain no
    newline, between the beginning and the end of the string\. The regular
    expression *regexp* defaults to "\[ \\\\t\]\+"\.

  - <a name='2'></a>__::textutil::trim::trimleft__ *string* ?*regexp*?

    Remove in *string* any leading substring according to the regular
    expression *regexp* and return the result as a new string\. This apply on
    any *line* in the string, that is any substring between 2 newline chars,
    or between the beginning of the string and a newline, or between a newline
    and the end of the string, or, if the string contain no newline, between the
    beginning and the end of the string\. The regular expression *regexp*
    defaults to "\[ \\\\t\]\+"\.

  - <a name='3'></a>__::textutil::trim::trimright__ *string* ?*regexp*?

    Remove in *string* any trailing substring according to the regular
    expression *regexp* and return the result as a new string\. This apply on
    any *line* in the string, that is any substring between 2 newline chars,
    or between the beginning of the string and a newline, or between a newline
    and the end of the string, or, if the string contain no newline, between the
    beginning and the end of the string\. The regular expression *regexp*
    defaults to "\[ \\\\t\]\+"\.

  - <a name='4'></a>__::textutil::trim::trimPrefix__ *string* *prefix*

    Removes the *prefix* from the beginning of *string* and returns the
    result\. The *string* is left unchanged if it doesn't have *prefix* at
    its beginning\.

  - <a name='5'></a>__::textutil::trim::trimEmptyHeading__ *string*

    Looks for empty lines \(including lines consisting of only whitespace\) at the
    beginning of the *string* and removes it\. The modified string is returned
    as the result of the command\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *textutil* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

regexp\(n\), split\(n\), string\(n\)

# <a name='keywords'></a>KEYWORDS

[prefix](\.\./\.\./\.\./\.\./index\.md\#prefix), [regular
expression](\.\./\.\./\.\./\.\./index\.md\#regular\_expression),
[string](\.\./\.\./\.\./\.\./index\.md\#string),
[trimming](\.\./\.\./\.\./\.\./index\.md\#trimming)

# <a name='category'></a>CATEGORY

Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































Deleted embedded/md/tcllib/files/modules/tie/tie.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515

[//000000001]: # (tie \- Tcl Data Structures)
[//000000002]: # (Generated from file 'tie\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tie\(n\) 1\.1 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tie \- Array persistence

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [USING TIES](#section2)

      - [TIE API](#subsection1)

      - [STANDARD DATA SOURCE TYPES](#subsection2)

  - [CREATING NEW DATA SOURCES](#section3)

      - [DATA SOURCE OBJECTS](#subsection3)

      - [REGISTERING A NEW DATA SOURCE CLASS](#subsection4)

      - [DATA SOURCE CLASS](#subsection5)

      - [DATA SOURCE OBJECT API](#subsection6)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require tie ?1\.1?  

[__::tie::tie__ *arrayvarname* *options*\.\.\. *dstype* *dsname*\.\.\.](#1)  
[__::tie::untie__ *arrayvarname* ?*token*?](#2)  
[__::tie::info__ __ties__ *arrayvarname*](#3)  
[__::tie::info__ __types__](#4)  
[__::tie::info__ __type__ *dstype*](#5)  
[__::tie::register__ *dsclasscmd* __as__ *dstype*](#6)  
[__dsclasscmd__ *objname* ?*dsname*\.\.\.?](#7)  
[__ds__ __destroy__](#8)  
[__ds__ __names__](#9)  
[__ds__ __size__](#10)  
[__ds__ __get__](#11)  
[__ds__ __set__ *dict*](#12)  
[__ds__ __unset__ ?*pattern*?](#13)  
[__ds__ __setv__ *index* *value*](#14)  
[__ds__ __unsetv__ *index*](#15)  
[__ds__ __getv__ *index*](#16)  

# <a name='description'></a>DESCRIPTION

The __tie__ package provides a framework for the creation of persistent Tcl
array variables\. It should be noted that the provided mechanism is generic
enough to also allow its usage for the distribution of the contents of Tcl
arrays over multiple threads and processes, i\.e\. communication\.

This, persistence and communication, is accomplished by *tying*\) a Tcl array
variable to a *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*\. Examples
of data sources are other Tcl arrays and files\.

It should be noted that a single Tcl array variable can be tied to more than one
*[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*\. It is this feature
which allows the framework to be used for communication as well\. Just tie
several Tcl arrays in many client processes to a Tcl array in a server and all
changes to any of them will be distributed to all\. Less centralized variants of
this are of course possible as well\.

# <a name='section2'></a>USING TIES

## <a name='subsection1'></a>TIE API

This section describes the basic API used to establish and remove ties between
Tcl array variables and data sources\. This interface is the only one a casual
user has to be concerned about\. The following sections about the various
internal interfaces can be safely skipped\.

  - <a name='1'></a>__::tie::tie__ *arrayvarname* *options*\.\.\. *dstype* *dsname*\.\.\.

    This command establishes a tie between the Tcl array whose name is provided
    by the argument *arrayvarname* and the *[data
    source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* identified by the *dstype*
    and its series of *dsname* arguments\. All changes made to the Tcl array
    after this command returns will be saved to the *[data
    source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* for safekeeping \(or
    distribution\)\.

    The result of the command is always a token which identifies the new tie\.
    This token can be used later to destroy this specific tie\.

      * varname *arrayvarname* \(in\)

        The name of the Tcl array variable to connect the new tie to\.

      * name&#124;command *dstype* \(in\)

        This argument specifies the type of the *[data
        source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* we wish to access\. The
        *dstype* can be one of __log__, __array__,
        __remotearray__, __file__, __growfile__, or __dsource__;
        in addition, the programmer can register additional data source types\.
        Each *dstype* is followed by one or more arguments that identify the
        *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* to which the
        array is to be tied\.

      * string *dsname* \(in\)

        The series of *dsname* arguments coming after the *dstype*
        identifies the *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*
        we wish to connect to, and has to be appropriate for the chosen type\.

    The command understands a number of additional options which guide the
    process of setting up the connection between Tcl array and *[data
    source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*\.

      * __\-open__

        The Tcl array for the new tie is *loaded* from the *[data
        source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*, and the previously
        existing contents of the Tcl array are erased\. Care is taken to *not*
        erase the previous contents should the creation of the tie fail\.

        This option and the option __\-save__ exclude each other\. If neither
        this nor option __\-save__ are specified then this option is assumed
        as default\.

      * __\-save__

        The Tcl array for the new tie is *saved* to the *[data
        source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*, and the previously
        existing contents of the *[data
        source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* are erased\.

        This option and the option __\-open__ exclude each other\. If neither
        this nor option __\-open__ are specified then option __\-open__ is
        assumed as default\.

      * __\-merge__

        Using this option prevents the erasure of any previously existing
        content and merges the data instead\. It can be specified in conjunction
        with either __\-open__ or __\-save__\. They determine how data
        existing in both Tcl array and *[data
        source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*, i\.e duplicates, are
        dealt with\.

        When used with __\-open__ data in the *[data
        source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* has precedence\. In other
        words, for duplicates the data in the *[data
        source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* is loaded into the Tcl
        array\.

        When used with __\-save__ data in the Tcl array has precedence\. In
        other words, for duplicates the data in the Tcl array is saved into the
        *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*\.

  - <a name='2'></a>__::tie::untie__ *arrayvarname* ?*token*?

    This command dissolves one or more ties associated with the Tcl array named
    by *arrayvarname*\. If no *token* is specified then all ties to that Tcl
    array are dissolved\. Otherwise only the tie the token stands for is removed,
    if it is actually connected to the array\. Trying to remove a specific tie
    not belonging to the provided array will cause an error\.

    It should be noted that while severing a tie will destroy management
    information internal to the package the *[data
    source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* which was handled by the tie
    will not be touched, only closed\.

    After the command returns none of changes made to the array will be saved to
    the *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* anymore\.

    The result of the command is an empty string\.

      * varname *arrayname* \(in\)

        The name of a Tcl array variable which may have ties\.

      * handle *token* \(in\)

        A handle representing a specific tie\. This argument is optional\.

  - <a name='3'></a>__::tie::info__ __ties__ *arrayvarname*

    This command returns a list of ties associated with the Tcl array variable
    named by *arrayvarname*\. The result list will be empty if the variable has
    no ties associated with it\.

  - <a name='4'></a>__::tie::info__ __types__

    This command returns a dictionary of registered types, and the class
    commands they are associated with\.

  - <a name='5'></a>__::tie::info__ __type__ *dstype*

    This command returns the fully resolved class command for a type name\. This
    means that the command will follow a chain of type definitions ot its end\.

## <a name='subsection2'></a>STANDARD DATA SOURCE TYPES

This package provides the six following types as examples and standard data
sources\.

  - __log__

    This *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* does not
    maintain any actual data, nor persistence\. It does not accept any
    identifying arguments\. All changes are simply logged to __stdout__\.

  - __array__

    This *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* uses a regular
    Tcl array as the origin of the persistent data\. It accepts a single
    identifying argument, the name of this Tcl array\. All changes are mirrored
    to that array\.

  - __remotearray__

    This *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* is similar to
    __array__\. The difference is that the Tcl array to which we are
    mirroring is not directly accessible, but through a
    __[send](\.\./\.\./\.\./\.\./index\.md\#send)__\-like command\.

    It accepts three identifying arguments, the name of the other Tcl array, the
    command prefix for the __[send](\.\./\.\./\.\./\.\./index\.md\#send)__\-like
    accessor command, and an identifier for the remote entity hosting the array,
    in this order\. All changes are mirrored to that array, via the command
    prefix\. All commands will be executed in the context of the global
    namespace\.

    __[send](\.\./\.\./\.\./\.\./index\.md\#send)__\-like means that the command
    prefix has to have __[send](\.\./\.\./\.\./\.\./index\.md\#send)__ syntax and
    semantics\. I\.e\. it is a channel over which we can send arbitrary commands to
    some other entity\. The remote array *[data
    source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* however uses only the
    commands __[set](\.\./\.\./\.\./\.\./index\.md\#set)__, __unset__,
    __array exists__, __array names__, __array set__, and __array
    get__ to retrieve and set values in the remote array\.

    The command prefix and the entity id are separate to allow the data source
    to use options like __\-async__ when assembling the actual commands\.

    Examples of command prefixes, listed with the id of the remote entity,
    without options\. In reality only the part before the id is the command
    prefix:

      * __[send](\.\./\.\./\.\./\.\./index\.md\#send)__ *tkname*

        The Tcl array is in a remote interpreter and is accessed via Tk's X
        communication\.

      * __comm::comm send__ *hostportid*

        The Tcl array is in a remote interpreter and is accessed through a
        socket\.

      * __thread::send__ *threadid*

        The Tcl array is in a remote interpreter in a different thread of this
        process\.

  - __file__

    This *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* uses a single
    file as origin of the persistent data\. It accepts a single identifying
    argument, the path to this file\. The file has to be both readable and
    writable\. It may not exist, the *[data
    source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* will create it in that case\.
    This \(and only this\) situation will require that the directory for the file
    exists and is writable as well\.

    All changes are saved in the file, as proper Tcl commands, one command per
    operation\. In other words, the file will always contain a proper Tcl script\.

    If the file exists when the tie using it is set up, then it will be
    compacted, i\.e\. superfluous operations are removed, if the operations log
    stored in it contains either at least one operation clearing the whole
    array, or at least 1\.5 times more operations than entries in the loaded
    array\.

  - __growfile__

    This *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* is like
    __file__ in terms of the storage medium for the array data, and how it
    is configured\. In constrast to the former it however assumes and ensures
    that the tied array will never shrink\. I\.e\. the creation of new array
    entries, and the modification of existing entries is allowed, but the
    deletion of entries is not, and causes the data source to throw errors\.

    This restriction allows us to simplify both file format and access to the
    file radically\. For one, the file is read only once and the internal cache
    cannot be invalidated\. Second, writing data is reduced to a simple append,
    and no compaction step is necessary\. The format of the contents is the
    string representation of a dictionary which can be incrementally extended
    forever at the end\.

  - __dsource__

    This *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* uses an
    explicitly specified *data source object* as the source for the persistent
    data\. It accepts a single identifying argument, the command prefix, i\.e\.
    object command\.

    To use this type it is necessary to know how the framework manages ties and
    what [data source objects](#subsection3) are\.

    All changes are delegated to the specified object\.

# <a name='section3'></a>CREATING NEW DATA SOURCES

This section is of no interest to the casual user of ties\. Only developers
wishing to create new data sources have to know the information provided herein\.

## <a name='subsection3'></a>DATA SOURCE OBJECTS

All ties are represented internally by an in\-memory object which mediates
between the tie framework and the specific *[data
source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*, like an array, file, etc\. This
is the *data source object*\.

Its class, the [data source class](#subsection5) is *not* generic, but
specific to the type of the *[data
source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*\. Writing a new *[data
source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* requires us to write such a
class, and then registering it with the framework as a new type\.

The following subsections describe the various APIs a [data source
class](#subsection5) and the objects it generates will have to follow to be
compatible with the tie framework\.

Data source objects are normally automatically created and destroyed by the
framework when a tie is created, or removed\. This management can be explicitly
bypassed through the usage of the "dsource" type\. The *[data
source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* for this type is a *data source
object* itself, and this object is outside of the scope of the tie framework
and not managed by it\. In other words, this type allows the creation of ties
which talk to pre\-existing *data source object*s, and these objects will
survive the removal of the ties using them as well\.

## <a name='subsection4'></a>REGISTERING A NEW DATA SOURCE CLASS

After a [data source class](#subsection5) has been written it is necessary
to register it as a new type with the framework\.

  - <a name='6'></a>__::tie::register__ *dsclasscmd* __as__ *dstype*

    Using this command causes the tie framework to remember the class command
    *dsclasscmd* of a [data source class](#subsection5) under the type
    name *dstype*\.

    After the call the argument *dstype* of the basic user command
    __::tie::tie__ will accept *dstype* as a type name and translate it
    internally to the appropriate class command for the creation of [data
    source objects](#subsection3) for the new *[data
    source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*\.

## <a name='subsection5'></a>DATA SOURCE CLASS

Each data source class is represented by a single command, also called the
*class command*, or *object creation command*\. Its syntax is

  - <a name='7'></a>__dsclasscmd__ *objname* ?*dsname*\.\.\.?

    The first argument of the class command is the name of the *data source
    object* to create\. The framework itself will always supply the string
    __%AUTO%__, to signal that the class command has to generate not only
    the object, but the object name as well\.

    This is followed by a series of arguments identifying the data source the
    new object is for\. These are the same *dsname* arguments which are given
    to the basic user command __::tie::tie__\. Their actual meaning is
    dependent on the *data source class*\.

    The result of the class command has to be the fully\-qualified name of the
    new *data source object*, i\.e\. the name of the *object command*\. The
    interface this command has to follow is described in the section [DATA
    SOURCE OBJECT API](#subsection6)

## <a name='subsection6'></a>DATA SOURCE OBJECT API

Please read the section [DATA SOURCE CLASS](#subsection5) first, to know
how to generate new *object commands*\.

Each *object command* for a *[data
source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* object has to provide at least
the methods listed below for proper inter\-operation with the tie framework\. Note
that the names of most of the methods match the subcommands of the builtin
__[array](\.\./\.\./\.\./\.\./index\.md\#array)__ command\.

  - <a name='8'></a>__ds__ __destroy__

    This method is called when the object __ds__ is destroyed\. It now has to
    release all its internal resources associated with the external data source\.

  - <a name='9'></a>__ds__ __names__

    This command has to return a list containing the names of all keys found in
    the *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* the object talks
    to\. This is equivalent to __array names__\.

  - <a name='10'></a>__ds__ __size__

    This command has to return an integer number specifying the number of keys
    found in the *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* the
    object talks to\. This is equivalent to __array size__\.

  - <a name='11'></a>__ds__ __get__

    This command has to return a dictionary containing the data found in the
    *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* the object talks to\.
    This is equivalent to __array get__\.

  - <a name='12'></a>__ds__ __set__ *dict*

    This command takes a dictionary and adds its contents to the data source the
    object talks to\. This is equivalent to __array set__\.

  - <a name='13'></a>__ds__ __unset__ ?*pattern*?

    This command takes a pattern and removes all elements whose keys matching it
    from the *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)*\. If no
    pattern is specified it defaults to __\*__, causing the removal of all
    elements\. This is nearly equivalent to __array unset__\.

  - <a name='14'></a>__ds__ __setv__ *index* *value*

    This command has to save the *value* in the *[data
    source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* the object talks to, under
    the key *index*\.

    The result of the command is ignored\. If an error is thrown then this error
    will show up as error of the set operation which caused the method call\.

  - <a name='15'></a>__ds__ __unsetv__ *index*

    This command has to remove the value under the key *index* from the
    *[data source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* the object talks to\.

    The result of the command is ignored\. If an error is thrown then this error
    will show up as error of the unset operation which caused the method call\.

  - <a name='16'></a>__ds__ __getv__ *index*

    This command has to return the value for the key *index* in the *[data
    source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* the object talks to\.

And here a small table comparing the *[data
source](\.\./\.\./\.\./\.\./index\.md\#data\_source)* methods to the regular Tcl
commands for accessing an array\.

    Regular Tcl             Data source
    -----------             -----------
    array names a           ds names
    array size  a           ds size
    array get   a           ds get
    array set   a dict      ds set   dict
    array unset a pattern   ds unset ?pattern?
    -----------             -----------
    set a($idx) $val        ds setv   idx val
    unset a($idx)           ds unsetv idx
    $a($idx)                ds getv   idx
    -----------             -----------

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *tie* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[array](\.\./\.\./\.\./\.\./index\.md\#array),
[database](\.\./\.\./\.\./\.\./index\.md\#database),
[file](\.\./\.\./\.\./\.\./index\.md\#file),
[metakit](\.\./\.\./\.\./\.\./index\.md\#metakit),
[persistence](\.\./\.\./\.\./\.\./index\.md\#persistence),
[tie](\.\./\.\./\.\./\.\./index\.md\#tie), [untie](\.\./\.\./\.\./\.\./index\.md\#untie)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004\-2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/tie/tie_std.md.

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

[//000000001]: # (tie \- Tcl Data Structures)
[//000000002]: # (Generated from file 'tie\_std\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008\-2015 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tie\(n\) 1\.1 tcllib "Tcl Data Structures")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tie \- Array persistence, standard data sources

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require tie::std::log ?1\.0?  
package require tie::std::array ?1\.0?  
package require tie::std::rarray ?1\.0\.1?  
package require tie::std::file ?1\.0\.4?  
package require tie::std::growfile ?1\.0?  
package require tie::std::dsource ?1\.0?  

# <a name='description'></a>DESCRIPTION

The packages listed as requirements for this document are internal packages
providing the standard data sources of package __[tie](tie\.md)__, as
described in section *STANDARD DATA SOURCE TYPES* of
__[tie](tie\.md)__'s documentation\.

They are automatically loaded and registered by __[tie](tie\.md)__ when
it itself is requested, and as such there is no need to request them on their
own, although it is possible to do so\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *tie* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[array](\.\./\.\./\.\./\.\./index\.md\#array),
[database](\.\./\.\./\.\./\.\./index\.md\#database),
[file](\.\./\.\./\.\./\.\./index\.md\#file),
[metakit](\.\./\.\./\.\./\.\./index\.md\#metakit),
[persistence](\.\./\.\./\.\./\.\./index\.md\#persistence),
[tie](\.\./\.\./\.\./\.\./index\.md\#tie), [untie](\.\./\.\./\.\./\.\./index\.md\#untie)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008\-2015 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































Deleted embedded/md/tcllib/files/modules/tiff/tiff.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267

[//000000001]: # (tiff \- TIFF image manipulation)
[//000000002]: # (Generated from file 'tiff\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005\-2006, Aaron Faupell <afaupell@users\.sourceforge\.net>)
[//000000004]: # (tiff\(n\) 0\.2\.1 tcllib "TIFF image manipulation")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tiff \- TIFF reading, writing, and querying and manipulation of meta data

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [VARIABLES](#section3)

  - [LIMITATIONS](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require tiff ?0\.2\.1?  

[__::tiff::isTIFF__ *file*](#1)  
[__::tiff::byteOrder__ *file*](#2)  
[__::tiff::numImages__ *file*](#3)  
[__::tiff::dimensions__ *file* ?image?](#4)  
[__::tiff::imageInfo__ *file* ?image?](#5)  
[__::tiff::entries__ *file* ?image?](#6)  
[__::tiff::getEntry__ *file* *entry* ?image?](#7)  
[__::tiff::addEntry__ *file* *entry* ?image?](#8)  
[__::tiff::deleteEntry__ *file* *entry* ?image?](#9)  
[__::tiff::getImage__ *file* ?image?](#10)  
[__::tiff::writeImage__ *image* *file* ?entry?](#11)  
[__::tiff::nametotag__ *names*](#12)  
[__::tiff::tagtoname__ *tags*](#13)  
[__::tiff::debug__ *file*](#14)  

# <a name='description'></a>DESCRIPTION

This package provides commands to query, modify, read, and write TIFF images\.
TIFF stands for *Tagged Image File Format* and is a standard for lossless
storage of photographical images and associated metadata\. It is specified at
[http://partners\.adobe\.com/public/developer/tiff/index\.html](http://partners\.adobe\.com/public/developer/tiff/index\.html)\.

Multiple images may be stored in a single TIFF file\. The ?image? options to the
functions in this package are for accessing images other than the first\. Data in
a TIFF image is stored as a series of tags having a numerical value, which are
represented in either a 4 digit hexadecimal format or a string name\. For a
reference on defined tags and their meanings see
[http://www\.awaresystems\.be/imaging/tiff/tifftags\.html](http://www\.awaresystems\.be/imaging/tiff/tifftags\.html)

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::tiff::isTIFF__ *file*

    Returns a boolean value indicating if *file* is a TIFF image\.

  - <a name='2'></a>__::tiff::byteOrder__ *file*

    Returns either __big__ or __little__\. Throws an error if *file* is
    not a TIFF image\.

  - <a name='3'></a>__::tiff::numImages__ *file*

    Returns the number of images in *file*\. Throws an error if *file* is not
    a TIFF image\.

  - <a name='4'></a>__::tiff::dimensions__ *file* ?image?

    Returns the dimensions of image number ?image? in *file* as a list of the
    horizontal and vertical pixel count\. Throws an error if *file* is not a
    TIFF image\.

  - <a name='5'></a>__::tiff::imageInfo__ *file* ?image?

    Returns a dictionary with keys __ImageWidth__, __ImageLength__,
    __BitsPerSample__, __Compression__,
    __PhotometricInterpretation__, __ImageDescription__,
    __Orientation__, __XResolution__, __YResolution__,
    __ResolutionUnit__, __DateTime__, __Artist__, and
    __HostComputer__\. The values are the associated properties of the TIFF
    ?image? in *file*\. Values may be empty if the associated tag is not
    present in the file\.

        puts [::tiff::imageInfo photo.tif]

        ImageWidth 686 ImageLength 1024 BitsPerSample {8 8 8} Compression 1
        PhotometricInterpretation 2 ImageDescription {} Orientation 1
        XResolution 170.667 YResolution 170.667 ResolutionUnit 2 DateTime {2005:12:28 19:44:45}
        Artist {} HostComputer {}

    There is nothing special about these tags, this is simply a convience
    procedure which calls __getEntry__ with common entries\. Throws an error
    if *file* is not a TIFF image\.

  - <a name='6'></a>__::tiff::entries__ *file* ?image?

    Returns a list of all entries in the given *file* and ?image? in
    hexadecimal format\. Throws an error if *file* is not a TIFF image\.

  - <a name='7'></a>__::tiff::getEntry__ *file* *entry* ?image?

    Returns the value of *entry* from image ?image? in the TIFF *file*\.
    *entry* may be a list of multiple entries\. If an entry does not exist, an
    empty string is returned

        set data [::tiff::getEntry photo.tif {0131 0132}]
        puts "file was written at [lindex $data 0] with software [lindex $data 1]"

    Throws an error if *file* is not a TIFF image\.

  - <a name='8'></a>__::tiff::addEntry__ *file* *entry* ?image?

    Adds the specified entries to the image named by ?image? \(default 0\), or
    optionally __all__\. *entry* must be a list where each element is a
    list of tag, type, and value\. If a tag already exists, it is overwritten\.

        ::tiff::addEntry photo.tif {{010e 2 "an example photo"} {013b 2 "Aaron F"}}

    The data types are defined as follows

      * __1__

        BYTE \(8 bit unsigned integer\)

      * __2__

        ASCII

      * __3__

        SHORT \(16 bit unsigned integer\)

      * __4__

        LONG \(32 bit unsigned integer\)

      * __5__

        RATIONAL

      * __6__

        SBYTE \(8 bit signed byte\)

      * __7__

        UNDEFINED \(uninterpreted binary data\)

      * __8__

        SSHORT \(signed 16 bit integer\)

      * __9__

        SLONG \(signed 32 bit integer\)

      * __10__

        SRATIONAL

      * __11__

        FLOAT \(32 bit floating point number\)

      * __12__

        DOUBLE \(64 bit floating point number\)

    Throws an error if *file* is not a TIFF image\.

  - <a name='9'></a>__::tiff::deleteEntry__ *file* *entry* ?image?

    Deletes the specified entries from the image named by ?image? \(default 0\),
    or optionally __all__\. Throws an error if *file* is not a TIFF image\.

  - <a name='10'></a>__::tiff::getImage__ *file* ?image?

    Returns the name of a Tk image containing the image at index ?image? from
    *file* Throws an error if *file* is not a TIFF image, or if image is an
    unsupported format\. Supported formats are uncompressed 24 bit RGB and
    uncompressed 8 bit palette\.

  - <a name='11'></a>__::tiff::writeImage__ *image* *file* ?entry?

    Writes the contents of the Tk image *image* to a tiff file *file*\. Files
    are written in the 24 bit uncompressed format, with big endian byte order\.
    Additional entries to be added to the image may be specified, in the same
    format as __tiff::addEntry__

  - <a name='12'></a>__::tiff::nametotag__ *names*

    Returns a list with *names* translated from string to 4 digit format\. 4
    digit names in the input are passed through unchanged\. Strings without a
    defined tag name will throw an error\.

  - <a name='13'></a>__::tiff::tagtoname__ *tags*

    Returns a list with *tags* translated from 4 digit to string format\. If a
    tag does not have a defined name it is passed through unchanged\.

  - <a name='14'></a>__::tiff::debug__ *file*

    Prints everything we know about the given file in a nice format\.

# <a name='section3'></a>VARIABLES

The mapping of 4 digit tag names to string names uses the array
::tiff::tiff\_tags\. The reverse mapping uses the array ::tiff::tiff\_sgat\.

# <a name='section4'></a>LIMITATIONS

  1. Cannot write exif ifd

  1. Reading limited to uncompressed 8 bit rgb and 8 bit palletized images

  1. Writing limited to uncompressed 8 bit rgb

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *tiff* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[image](\.\./\.\./\.\./\.\./index\.md\#image), [tif](\.\./\.\./\.\./\.\./index\.md\#tif),
[tiff](\.\./\.\./\.\./\.\./index\.md\#tiff)

# <a name='category'></a>CATEGORY

File formats

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2005\-2006, Aaron Faupell <afaupell@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/tool/meta.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219

[//000000001]: # (oo::util \- Utility commands for TclOO)
[//000000002]: # (Generated from file 'meta\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011\-2015 Andreas Kupries, BSD licensed)
[//000000004]: # (oo::util\(n\) 1\.2\.2 tcllib "Utility commands for TclOO")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

oo::util \- Utility commands for TclOO

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [AUTHORS](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require oo::util ?1\.2\.2?  

[__mymethod__ *method* ?*arg*\.\.\.?](#1)  
[__classmethod__ *name* *arguments* *body*](#2)  
[__classvariable__ ?*arg*\.\.\.?](#3)  
[__link__ *method*\.\.\.](#4)  
[__link__ \{*alias* *method*\}\.\.\.](#5)  
[__ooutil::singleton__ ?*arg*\.\.\.?](#6)  

# <a name='description'></a>DESCRIPTION

This package provides a convenience command for the easy specification of
instance methods as callback commands, like timers, file events, Tk bindings,
etc\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__mymethod__ *method* ?*arg*\.\.\.?

    This command is available within instance methods\. It takes a method name
    and, possibly, arguments for the method and returns a command prefix which,
    when executed, will invoke the named method of the object we are in, with
    the provided arguments, and any others supplied at the time of actual
    invokation\.

    Note: The command is equivalent to and named after the command provided by
    the OO package __[snit](\.\./snit/snit\.md)__ for the same purpose\.

  - <a name='2'></a>__classmethod__ *name* *arguments* *body*

    This command is available within class definitions\. It takes a method name
    and, possibly, arguments for the method and creates a method on the class,
    available to a user of the class and of derived classes\.

    Note: The command is equivalent to the command __typemethod__ provided
    by the OO package __[snit](\.\./snit/snit\.md)__ for the same purpose\.

    Example

        oo::class create ActiveRecord {
            classmethod find args { puts "[self] called with arguments: $args" }
        }
        oo::class create Table {
            superclass ActiveRecord
        }
        puts [Table find foo bar]
        # ======
        # which will write
        # ======
        # ::Table called with arguments: foo bar

  - <a name='3'></a>__classvariable__ ?*arg*\.\.\.?

    This command is available within instance methods\. It takes a series of
    variable names and makes them available in the method's scope\. The
    originating scope for the variables is the class \(instance\) the object
    instance belongs to\. In other words, the referenced variables are shared
    between all instances of their class\.

    Note: The command is roughly equivalent to the command __typevariable__
    provided by the OO package __[snit](\.\./snit/snit\.md)__ for the same
    purpose\. The difference is that it cannot be used in the class definition
    itself\.

    Example:

        % oo::class create Foo {
            method bar {z} {
                classvariable x y
                return [incr x $z],[incr y]
            }
        }
        ::Foo
        % Foo create a
        ::a
        % Foo create b
        ::b
        % a bar 2
        2,1
        % a bar 3
        5,2
        % b bar 7
        12,3
        % b bar -1
        11,4
        % a bar 0
        11,5

  - <a name='4'></a>__link__ *method*\.\.\.

  - <a name='5'></a>__link__ \{*alias* *method*\}\.\.\.

    This command is available within instance methods\. It takes a list of method
    names and/or pairs of alias\- and method\-name and makes the named methods
    available to all instance methods without requiring the __my__ command\.

    The alias name under which the method becomes available defaults to the
    method name, except where explicitly specified through an alias/method pair\.

    Examples:

        link foo
        # The method foo is now directly accessible as foo instead of my foo.

        link {bar foo}
        # The method foo is now directly accessible as bar.

        link a b c
        # The methods a, b, and c all become directly acessible under their
        # own names.

    The main use of this command is expected to be in instance constructors, for
    convenience, or to set up some methods for use in a mini DSL\.

  - <a name='6'></a>__ooutil::singleton__ ?*arg*\.\.\.?

    This command is a meta\-class, i\.e\. a variant of the builtin
    __oo::class__ which ensures that it creates only a single instance of
    the classes defined with it\.

    Syntax and results are like for __oo::class__\.

    Example:

        % oo::class create example {
           self mixin singleton
           method foo {} {self}
        }
        ::example
        % [example new] foo
        ::oo::Obj22
        % [example new] foo
        ::oo::Obj22

# <a name='section3'></a>AUTHORS

Donal Fellows, Andreas Kupries

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *oo::util* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[snit\(n\)](\.\./snit/snit\.md)

# <a name='keywords'></a>KEYWORDS

[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo),
[callback](\.\./\.\./\.\./\.\./index\.md\#callback), [class
methods](\.\./\.\./\.\./\.\./index\.md\#class\_methods), [class
variables](\.\./\.\./\.\./\.\./index\.md\#class\_variables), [command
prefix](\.\./\.\./\.\./\.\./index\.md\#command\_prefix),
[currying](\.\./\.\./\.\./\.\./index\.md\#currying), [method
reference](\.\./\.\./\.\./\.\./index\.md\#method\_reference), [my
method](\.\./\.\./\.\./\.\./index\.md\#my\_method),
[singleton](\.\./\.\./\.\./\.\./index\.md\#singleton)

# <a name='category'></a>CATEGORY

Utility

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011\-2015 Andreas Kupries, BSD licensed
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/tool/tool.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313

[//000000001]: # (tool \- Standardized OO Framework for development)
[//000000002]: # (Generated from file 'tool\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2015 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (tool\(n\) 0\.4\.2 tcllib "Standardized OO Framework for development")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tool \- TclOO Library \(TOOL\) Framework

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Keywords](#section2)

  - [Public Object Methods](#section3)

  - [Private Object Methods](#section4)

  - [AUTHORS](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require sha1  
package require dicttool  
package require oo::meta  
package require oo::dialect  

[tool::define __class\_method__ *arglist* *body*](#1)  
[tool::define __[array](\.\./\.\./\.\./\.\./index\.md\#array)__ *name* *contents*](#2)  
[tool::define __array\_ensemble__ *methodname* *varname* ?cases?](#3)  
[tool::define __dict\_ensemble__ *methodname* *varname* ?cases?](#4)  
[tool::define __[method](\.\./\.\./\.\./\.\./index\.md\#method)__ *methodname* *arglist* *body*](#5)  
[tool::define __option__ *name* *dictopts*](#6)  
[tool::define __property__ ?branch? *field* *value*](#7)  
[tool::define __variable__ *name* *value*](#8)  
[*object* __cget__ *option*](#9)  
[*object* __configure__ ?keyvaluelist?](#10)  
[*object* __configure__ *field* *value* ?field? ?value? ?\.\.\.?](#11)  
[*object* __configurelist__ ?keyvaluelist?](#12)  
[*object* __forward__ *stub* *forward*](#13)  
[*object* __graft__ *stub* *forward*](#14)  
[*object* __InitializePublic__](#15)  
[*object* __Eval\_Script__ ?script?](#16)  
[*object* __Option\_Default__ *field*](#17)  

# <a name='description'></a>DESCRIPTION

This module implements the Tcl Object Oriented Library framework, or *TOOL*\.
It is intended to be a general purpose framework that is useable in its own
right, and easily extensible\.

TOOL defines a metaclass with provides several additional keywords to the TclOO
description langauge, default behaviors for its consituent objects, and top\-down
integration with the capabilities provided by the __oo::meta__ package\.

The TOOL metaclass was build with the __oo::dialect__ package, and thus can
be used as the basis for additional metaclasses\. As a metaclass, TOOL has it's
own "class" class, "object" class, and define namespace\.

    package require tool

    # tool::class workds just like oo::class
    tool::class create myclass {
    }

    # tool::define works just like oo::define
    tool::define myclass method noop {} {}

    # tool::define and tool::class understand additional keywords
    tool::define myclass array_ensemble mysettings mysettings {}

    # And tool interoperates with oo::define
    oo::define myclass method do_something {} { return something }

    # TOOL and TclOO objects are interchangeable
    oo::class create myooclass {
      superclass myclass
    }

Several manual pages go into more detail about specific keywords and methods\.

  - __tool::array\_ensemble__

  - __[tool::dict\_ensemble](tool\_dict\_ensemble\.md)__

  - __tool::method\_ensemble__

  - __tool::object__

  - __tool::option\_handling__

# <a name='section2'></a>Keywords

TOOL adds new \(or modifies\) keywords used in the definitions of classes\.
However, the new keywords are only available via calls to *tool::class create*
or *tool::define*

  - <a name='1'></a>tool::define __class\_method__ *arglist* *body*

    Defines a method for the class object itself\. This method will be passed on
    to descendents of the class, unlike __self method__\.

  - <a name='2'></a>tool::define __[array](\.\./\.\./\.\./\.\./index\.md\#array)__ *name* *contents*

    Declares a variable *name* which will be initialized as an array,
    populated with *contents* for objects of this class, as well as any
    objects for classes which are descendents of this class\.

  - <a name='3'></a>tool::define __array\_ensemble__ *methodname* *varname* ?cases?

    Declares a method ensemble *methodname* which will control access to
    variable *varname*\. Cases are a key/value list of method names and bodies
    which will be overlaid on top of the standard template\. See
    __tool::array\_ensemble__\.

    One method name is reserved: __initialize__\. __initialize__ Declares
    the initial values to be populated in the array, as a key/value list, and
    will not be expressed as a method for the ensemble\.

  - <a name='4'></a>tool::define __dict\_ensemble__ *methodname* *varname* ?cases?

    Declares a method ensemble *methodname* which will control access to
    variable *varname*\. Cases are a key/value list of method names and bodies
    which will be overlaid on top of the standard template\. See
    __[tool::dict\_ensemble](tool\_dict\_ensemble\.md)__\.

    One method name is reserved: __initialize__\. __initialize__ Declares
    the initial values to be populated in the array, as a key/value list, and
    will not be expressed as a method for the ensemble\.

  - <a name='5'></a>tool::define __[method](\.\./\.\./\.\./\.\./index\.md\#method)__ *methodname* *arglist* *body*

    If *methodname* contains ::, the method is considered to be part of a
    method ensemble\. See __tool::method\_ensembles__\. Otherwise this command
    behaves exactly like the standard __oo::define__
    __[method](\.\./\.\./\.\./\.\./index\.md\#method)__ command\.

  - <a name='6'></a>tool::define __option__ *name* *dictopts*

    Declares an option\. *dictopts* is a key/value list defining parameters for
    the option\. See __tool::option\_handling__\.

    tool::class create myclass {
      option color {
        post-command: {puts [list %self%'s %field% is now %value%]}
        default: green
      }
    }
    myclass create foo
    foo configure color purple
    > foo's color is now purple

  - <a name='7'></a>tool::define __property__ ?branch? *field* *value*

    Defines a new leaf in the class metadata tree\. With no branch, the leaf will
    appear in the *const* section, accessible by either the object's
    __property__ method, or via __oo::meta::info__ *class* __get
    const__ *field*:

  - <a name='8'></a>tool::define __variable__ *name* *value*

    Declares a variable *name* which will be initialized with the value
    *value* for objects of this class, as well as any objects for classes
    which are descendents of this class\.

# <a name='section3'></a>Public Object Methods

The TOOL object mother of all classes defines several methods to enforces
consistent behavior throughout the framework\.

  - <a name='9'></a>*object* __cget__ *option*

    Return the value of this object's option *option*\. If the __property
    options\_strict__ is true for this class, calling an option which was not
    declared by the __option__ keyword will throw an error\. In all other
    cases if the value is present in the object's *options* array that value
    is returned\. If it does not exist, the object will attempt to retrieve a
    property of the same name\.

  - <a name='10'></a>*object* __configure__ ?keyvaluelist?

  - <a name='11'></a>*object* __configure__ *field* *value* ?field? ?value? ?\.\.\.?

    This command will inject new values into the objects *options* array,
    according to the rules as set forth by the option descriptions\. See
    __tool::option\_handling__ for details\. __configure__ will strip
    leading \-'s off of field names, allowing it to behave in a quasi\-backward
    compatible manner to tk options\.

  - <a name='12'></a>*object* __configurelist__ ?keyvaluelist?

    This command will inject new values into the objects *options* array,
    according to the rules as set forth by the option descriptions\. This command
    will perform validation and alternate storage rules\. It will not invoke
    trigger rules\. See __tool::option\_handling__ for details\.

  - <a name='13'></a>*object* __forward__ *stub* *forward*

    A passthrough to __oo:objdefine \[self\] forward__

  - <a name='14'></a>*object* __graft__ *stub* *forward*

    Delegates the *<stub>* method to the object or command designated by
    *forward*

    tool::object create A
    tool::object create B
    A graft buddy B
    A configure color red
    B configure color blue
    A cget color
    > red
    A <buddy> cget color
    > blue

# <a name='section4'></a>Private Object Methods

  - <a name='15'></a>*object* __InitializePublic__

    Consults the metadata for the class to ensure every array, option, and
    variable which has been declared but not initialized is initialized with the
    default value\. This method is called by the constructor and the morph
    method\. It is safe to invoke multiple times\.

  - <a name='16'></a>*object* __Eval\_Script__ ?script?

    Executes a block of text within the namespace of the object\. Lines that
    begin with a \# are ignored as comments\. Commands that begin with :: are
    interpreted as calling a global command\. All other Tcl commands that lack a
    "my" prefix are given one, to allow the script to exercise internal methods\.
    This method is intended for configuration scripts, where the object's
    methods are intepreting a domain specific language\.

    tool::class myclass {
      constructor script {
        my Eval_Script $script
      }
      method node {nodename info} {
        my variable node
        dict set node $nodename $info
      }
      method get {args} {
        my variable node
        return [dict get $node $args]
      }
    }
    myclass create movies {
      # This block of code is executed by the object
      node {The Day the Earth Stood Still} {
        date: 1952
        characters: {GORT Klatoo}
      }
    }
    movies get {The Day the Earth Stood Still} date:
    > 1952

  - <a name='17'></a>*object* __Option\_Default__ *field*

    Computes the default value for an option\. See __tool::option\_handling__\.

# <a name='section5'></a>AUTHORS

Sean Woods

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *tcloo* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[TOOL](\.\./\.\./\.\./\.\./index\.md\#tool), [TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo),
[framework](\.\./\.\./\.\./\.\./index\.md\#framework)

# <a name='category'></a>CATEGORY

TclOO

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2015 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/tool/tool_dict_ensemble.md.

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

[//000000001]: # (tool::dict\_ensemble \- Standardized OO Framework for development)
[//000000002]: # (Generated from file 'tool\_dict\_ensemble\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2015 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (tool::dict\_ensemble\(n\) 0\.4\.2 tcllib "Standardized OO Framework for development")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tool::dict\_ensemble \- Dictionary Tools

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [AUTHORS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require tool ?0\.4\.2?  

[*object* *ensemble* __add__ *field*](#1)  

# <a name='description'></a>DESCRIPTION

The __dict\_ensemble__ command is a keyword added by
__[tool](tool\.md)__\. It defines a public variable \(stored as a dict\),
and an access function to manipulated and access the values stored in that dict\.

  - <a name='1'></a>*object* *ensemble* __add__ *field*

    \] *value* *value \.\.\.*\] Adds elements to a list maintained with the
    *field* leaf of the dict maintained my this ensemble\. Declares a variable
    *name* which will be initialized as an array, populated with *contents*
    for objects of this class, as well as any objects for classes which are
    descendents of this class\.

# <a name='section2'></a>AUTHORS

Sean Woods

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *tool* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[TOOL](\.\./\.\./\.\./\.\./index\.md\#tool), [TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)

# <a name='category'></a>CATEGORY

Utility

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2015 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































Deleted embedded/md/tcllib/files/modules/transfer/connect.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291

[//000000001]: # (transfer::connect \- Data transfer facilities)
[//000000002]: # (Generated from file 'connect\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (transfer::connect\(n\) 0\.2 tcllib "Data transfer facilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

transfer::connect \- Connection setup

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

      - [Options](#subsection4)

  - [Secure connections](#section3)

  - [TLS Security Considerations](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit ?1\.0?  
package require transfer::connect ?0\.2?  

[__transfer::connect__ *objectName* ?*options*\.\.\.?](#1)  
[*objectName* __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __connect__ *command*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides objects holding enough information to enable them to
either actively connect to a counterpart, or to passively wait for a connection
from said counterpart\. I\.e\. any object created by this packages is always in one
of two complementary modes, called *[active](\.\./\.\./\.\./\.\./index\.md\#active)*
\(the object initiates the connection\) and
*[passive](\.\./\.\./\.\./\.\./index\.md\#passive)* \(the object receives the
connection\)\.

Of the two objects in a connecting pair one has to be configured for
*[active](\.\./\.\./\.\./\.\./index\.md\#active)* mode, and the other then has to be
configured for *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)* mode\. This
establishes which of the two partners connects to whom \(the
*[active](\.\./\.\./\.\./\.\./index\.md\#active)* to the other\), or, who is waiting
on whom \(the *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)* on the other\)\. Note
that this is completely independent of the direction of any data transmission
using the connection after it has been established\. An active object can, after
establishing the connection, either transmit or receive data\. Equivalently the
passive object can do the same after the waiting for its partner has ended\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__transfer::connect__ *objectName* ?*options*\.\.\.?

    This command creates a new connection object with an associated Tcl command
    whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The set of supported *options* is explained in
    section [Options](#subsection4)\.

    The object command will be created under the current namespace if the
    *objectName* is not fully qualified, and in the specified namespace
    otherwise\. The fully qualified name of the object command is returned as the
    result of the command\.

## <a name='subsection2'></a>Object command

All objects created by the __::transfer::connect__ command have the
following general form:

  - <a name='2'></a>*objectName* __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object\. This is safe to do for an
    *[active](\.\./\.\./\.\./\.\./index\.md\#active)* object when a connection has
    been started, as the completion callback is synchronous\. For a
    *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)* object currently waiting for
    its partner to establish the connection however this is not safe and will
    cause errors later on, when the connection setup completes and tries to
    access the now missing data structures of the destroyed object\.

  - <a name='4'></a>*objectName* __connect__ *command*

    This method starts the connection setup per the configuration of the object\.
    When the connection is established the callback *command* will be invoked
    with one additional argument, the channel handle of the socket over which
    data can be transfered\.

    The detailed behaviour of the method depends on the configured mode\.

      * *[active](\.\./\.\./\.\./\.\./index\.md\#active)*

        The connection setup is done synchronously\. The object waits until the
        connection is established\. The method returns the empty string as its
        result\.

      * *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)*

        The connection setup is done asynchronously\. The method returns
        immediately after a listening socket has been set up\. The connection
        will be established in the background\. The method returns the port
        number of the listening socket, for use by the caller\. One important use
        is the transfer of this information to the counterpart so that it knows
        where it has to connect to\.

        This is necessary as the object might have been configured for port
        __0__, allowing the operating system to choose the actual port it
        will listen on\.

        The listening port is closed immediately when the connection was
        established by the partner, to keep the time interval small within which
        a third party can connect to the port too\. Even so it is recommended to
        use additional measures in the protocol outside of the connect and
        transfer object to ensure that a connection is not used with an
        unidentified/unauthorized partner One possibility for this is the use of
        SSL/TLS\. See the option __\-socketcmd__ and section [Secure
        connections](#section3) for information on how to do this\.

## <a name='subsection4'></a>Options

Connection objects support the set of options listed below\.

  - __\-mode__ *mode*

    This option specifies the mode the object is in\. It is optional and defaults
    to __active__ mode\. The two possible modes are:

      * __active__

        In this mode the two options __\-host__ and __\-port__ are
        relevant and specify the host and TCP port the object has to connect to\.
        The host is given by either name or IP address\.

      * __passive__

        In this mode the option __\-host__ has no relevance and is ignored
        should it be configured\. The only option the object needs is
        __\-port__, and it specifies the TCP port on which the listening
        socket is opened to await the connection from the partner\.

  - __\-host__ *hostname\-or\-ipaddr*

    This option specifies the host to connect to in
    *[active](\.\./\.\./\.\./\.\./index\.md\#active)* mode, either by name or
    ip\-address\. An object configured for
    *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)* mode ignores this option\.

  - __\-port__ *int*

    For *[active](\.\./\.\./\.\./\.\./index\.md\#active)* mode this option specifies
    the port the object is expected to connect to\. For
    *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)* mode however it is the port
    where the object creates the listening socket waiting for a connection\. It
    defaults to __0__, which allows the OS to choose the actual port to
    listen on\.

  - __\-socketcmd__ *command*

    This option allows the user to specify which command to use to open a
    socket\. The default is to use the builtin __::socket__\. Any compatible
    with that command is allowed\.

    The envisioned main use is the specfication of __tls::socket__\. I\.e\.
    this option allows the creation of secure transfer channels, without making
    this package explicitly dependent on the
    __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__ package\.

    See also section [Secure connections](#section3)\.

  - __\-encoding__ encodingname

  - __\-eofchar__ eofspec

  - __\-translation__ transspec

    These options are the same as are recognized by the builtin command
    __fconfigure__\. They provide the configuration to be set for the channel
    between the two partners after it has been established, but before the
    callback is invoked \(See method __connect__\)\.

# <a name='section3'></a>Secure connections

One way to secure connections made by objects of this package is to require the
package __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__ and then configure the
option __\-socketcmd__ to force the use of command __tls::socket__ to
open the socket\.

    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...

    # Create a connector with secure socket setup,
    transfer::connect C -socketcmd tls::socket ...
    ...

# <a name='section4'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *transfer* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[active](\.\./\.\./\.\./\.\./index\.md\#active),
[channel](\.\./\.\./\.\./\.\./index\.md\#channel),
[connection](\.\./\.\./\.\./\.\./index\.md\#connection),
[passive](\.\./\.\./\.\./\.\./index\.md\#passive),
[secure](\.\./\.\./\.\./\.\./index\.md\#secure), [ssl](\.\./\.\./\.\./\.\./index\.md\#ssl),
[tls](\.\./\.\./\.\./\.\./index\.md\#tls),
[transfer](\.\./\.\./\.\./\.\./index\.md\#transfer)

# <a name='category'></a>CATEGORY

Transfer module

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/transfer/copyops.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

[//000000001]: # (transfer::copy \- Data transfer facilities)
[//000000002]: # (Generated from file 'copyops\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (transfer::copy\(n\) 0\.2 tcllib "Data transfer facilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

transfer::copy \- Data transfer foundation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require transfer::copy ?0\.2?  

[__transfer::copy::do__ __chan__&#124;__string__ *data* *outchannel* ?*options*\.\.\.?](#1)  
[__transfer::copy::chan__ *channel* *outchannel* ?*options*\.\.\.?](#2)  
[__transfer::copy::string__ *string* *outchannel* ?*options*\.\.\.?](#3)  
[__transfer::copy::doChan__ *channel* *outchannel* *optvar*](#4)  
[__transfer::copy::doString__ *string* *outchannel* *optvar*](#5)  
[__transfer::copy::options__ *outchannel* *optionlist* *optvar*](#6)  

# <a name='description'></a>DESCRIPTION

This package provides a number of commands for the asynchronous of information
contained in either a string or channel\. The main point of this package is that
the commands here provide a nicer callback API than the builtin command
__fcopy__, making the use of these facilities simpler than the builtin\.

# <a name='section2'></a>API

  - <a name='1'></a>__transfer::copy::do__ __chan__&#124;__string__ *data* *outchannel* ?*options*\.\.\.?

    This command transfers the information in *data* to the *outchannel*,
    according to the *options*\. The type of the information in *data* is
    determined by the first argument\.

    The options available to this command are the same as are available to the
    command __transfer::copy::options__, and explained there\.

      * __chan__

        The argument *data* contains the handle of a channel and the actual
        infomration to transfer is read from that channel\.

      * __string__

        The argument *data* contains a string and this is the information to
        be transfered\.

  - <a name='2'></a>__transfer::copy::chan__ *channel* *outchannel* ?*options*\.\.\.?

    This command is a shorter and more direct form for the command
    __transfer::copy::do chan__\.

  - <a name='3'></a>__transfer::copy::string__ *string* *outchannel* ?*options*\.\.\.?

    This command is a shorter and more direct form for the command
    __transfer::copy::do string__\.

  - <a name='4'></a>__transfer::copy::doChan__ *channel* *outchannel* *optvar*

    This command is an alternate form of __transfer::copy::chan__ which
    reads its options out of the array variable named by *optvar* instead of
    from a variable length argument list\.

  - <a name='5'></a>__transfer::copy::doString__ *string* *outchannel* *optvar*

    This command is an alternate form of __transfer::copy::string__ which
    reads its options out of the array variable named by *optvar* instead of
    from a variable length argument list\.

  - <a name='6'></a>__transfer::copy::options__ *outchannel* *optionlist* *optvar*

    This command is the option processor used by all the commands above which
    read their options from a variable length argument list\. It first reads
    default settings from the channel handle *outchannel*, then processes the
    list of options in *optionlist*, at last stores the results in the array
    variable named by *optvar*\. The contents of that variable are in a format
    which is directly understood by all the commands above which read their
    options out of an array variable\.

    The recognized options are:

      * __\-blocksize__ *int*

        This option specifies the size of the chunks to transfer in one
        operation\. It is optional and defaults to the value of
        __\-buffersize__ as configured for the output channel\.

        If specified its value has to be an integer number greater than zero\.

      * __\-command__ *commandprefix*

        This option specifies the completion callback of the operation\. This
        option has to be specified\. An error will be thrown if it is not, or if
        the empty list was specified as argument to it\.

        Its value has to be a command prefix, i\.e\. a list whose first word is
        the command to execute, followed by words containing fixed arguments\.
        When the callback is invoked one or two additional arguments are
        appended to the prefix\. The first argument is the number of bytes which
        were transfered\. The optional second argument is an error message and
        added if and only if an error occured during the the transfer\.

      * __\-progress__ *commandprefix*

        This option specifies the progress callback of the operation\. It is
        optional and defaults to the empty list\. This last possibility signals
        that no feedback was asked for and disabled it\.

        Its value has to be a command prefix, see above, __\-command__ for a
        more detailed explanation\. When the callback is invoked a single
        additional arguments is appended to the prefix\. This argument is the
        number of bytes which were transfered so far\.

      * __\-size__ *int*

        This option specifies the number of bytes to read from the input data
        and transfer\. It is optional and defaults to "Transfer everything"\. Its
        value has to be an integer number and any value less than zero has the
        same meaning, i\.e\. to transfer all available data\. Any other value is
        the amount of bytes to transfer\.

        All transfer commands will throw error an when their user tries to
        transfer more data than is available in the input\. This happens
        immediately, before the transfer is actually started, should the input
        be a string\. Otherwise the, i\.e\. for a channel as input, the error is
        thrown the moment the underflow condition is actually detected\.

      * __\-encoding__ *encodingname*

      * __\-eofchar__ *eofspec*

      * __\-translation__ *transspec*

        These options are the same as are recognized by the builtin command
        __fconfigure__ and provide the settings for the output channel which
        are to be active during the transfer, and only then\. I\.e\. the settings
        of the output channel before the transfer are saved, and restored at the
        end of a transfer, regardless of its success or failure\. None of these
        options are required, and they default to the settings of the output
        channel if not specified\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *transfer* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel](\.\./\.\./\.\./\.\./index\.md\#channel),
[copy](\.\./\.\./\.\./\.\./index\.md\#copy),
[transfer](\.\./\.\./\.\./\.\./index\.md\#transfer)

# <a name='category'></a>CATEGORY

Transfer module

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/transfer/ddest.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186

[//000000001]: # (transfer::data::destination \- Data transfer facilities)
[//000000002]: # (Generated from file 'ddest\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (transfer::data::destination\(n\) 0\.2 tcllib "Data transfer facilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

transfer::data::destination \- Data destination

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Object command](#subsection1)

      - [Object methods](#subsection2)

      - [Options](#subsection3)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit ?1\.0?  
package require transfer::data::destination ?0\.2?  

[__transfer::data::destination__ *objectName* ?*options*\.\.\.?](#1)  
[*objectName* __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __put__ *chunk*](#4)  
[*objectName* __done__](#5)  
[*objectName* __valid__ *msgvar*](#6)  
[*objectName* __receive__ *channel* *done*](#7)  

# <a name='description'></a>DESCRIPTION

This package provides objects mainly describing the destination of a data
transfer\. They are also able to initiate the reception of information from a
channel into the described destination\.

# <a name='section2'></a>API

  - <a name='1'></a>__transfer::data::destination__ *objectName* ?*options*\.\.\.?

    This command creates a new data destination object with an associated Tcl
    command whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection1) and [Object
    methods](#subsection2)\. The set of supported *options* is explained in
    section [Options](#subsection3)\.

    The object command will be created under the current namespace if the
    *objectName* is not fully qualified, and in the specified namespace
    otherwise\. The fully qualified name of the object command is returned as the
    result of the command\.

## <a name='subsection1'></a>Object command

All objects created by the __::transfer::data::destination__ command have
the following general form:

  - <a name='2'></a>*objectName* __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection2) for
    the detailed specifications\.

## <a name='subsection2'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object\. Doing so while the object is busy with the
    reception of information from a channel will cause errors later on, when the
    reception completes and tries to access the now missing data structures of
    the destroyed object\.

  - <a name='4'></a>*objectName* __put__ *chunk*

    The main receptor method\. Saves the received *chunk* of data into the
    configured destination\. It has to be called for each piece of data received\.

  - <a name='5'></a>*objectName* __done__

    The secondary receptor method\. Finalizes the receiver\. It has to be called
    when the receiving channel signals EOF\. Afterward neither itself nor method
    __put__ can be called anymore\.

  - <a name='6'></a>*objectName* __valid__ *msgvar*

    This method checks the configuration of the object for validity\. It returns
    a boolean flag as result, whose value is __True__ if the object is
    valid, and __False__ otherwise\. In the latter case the variable whose
    name is stored in *msgvar* is set to an error message describing the
    problem found with the configuration\. Otherwise this variable is not
    touched\.

  - <a name='7'></a>*objectName* __receive__ *channel* *done*

    This method initiates the reception of data from the specified *channel*\.
    The received data will be stored into the configured destination, via calls
    to the methods __put__ and __done__\. When the reception completes
    the command prefix *done* is invoked, with the number of received
    characters appended to it as the sole additional argument\.

## <a name='subsection3'></a>Options

All data destinations support the options listed below\. It should be noted that
all are semi\-exclusive, each specifying a different type of destination and
associated information\. If these options are specified more than once then the
last option specified is used to actually configure the object\.

  - __\-channel__ *handle*

    This option specifies that the destination of the data is a channel, and its
    associated argument is the handle of the channel to write the received data
    to\.

  - __\-file__ *path*

    This option specifies that the destination of the data is a file, and its
    associated argument is the path of the file to write the received data to\.

  - __\-variable__ *varname*

    This option specifies that the destination of the data is a variable, and
    its associated argument contains the name of the variable to write the
    received data to\. The variable is assumed to be global or namespaced,
    anchored at the global namespace\.

  - __\-progress__ *command*

    This option, if specified, defines a command to be invoked for each chunk of
    bytes received, allowing the user to monitor the progress of the reception
    of the data\. The callback is always invoked with one additional argument,
    the number of bytes received so far\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *transfer* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel](\.\./\.\./\.\./\.\./index\.md\#channel),
[copy](\.\./\.\./\.\./\.\./index\.md\#copy), [data
destination](\.\./\.\./\.\./\.\./index\.md\#data\_destination),
[transfer](\.\./\.\./\.\./\.\./index\.md\#transfer)

# <a name='category'></a>CATEGORY

Transfer module

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/transfer/dsource.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229

[//000000001]: # (transfer::data::source \- Data transfer facilities)
[//000000002]: # (Generated from file 'dsource\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (transfer::data::source\(n\) 0\.2 tcllib "Data transfer facilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

transfer::data::source \- Data source

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

      - [Options](#subsection4)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit ?1\.0?  
package require transfer::copy ?0\.2?  
package require transfer::data::source ?0\.2?  

[__transfer::data::source__ *objectName* ?*options*\.\.\.?](#1)  
[*objectName* __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __type__](#4)  
[*objectName* __data__](#5)  
[*objectName* __size__](#6)  
[*objectName* __valid__ *msgvar*](#7)  
[*objectName* __transmit__ *channel* *blocksize* *done*](#8)  

# <a name='description'></a>DESCRIPTION

This package provides objects mainly describing the origin of some data to
transfer\. They are also able to initiate transfers of the described information
to a channel using the foundation package
__[transfer::copy](copyops\.md)__\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__transfer::data::source__ *objectName* ?*options*\.\.\.?

    This command creates a new data source object with an associated Tcl command
    whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The set of supported *options* is explained in
    section [Options](#subsection4)\.

    The object command will be created under the current namespace if the
    *objectName* is not fully qualified, and in the specified namespace
    otherwise\. The fully qualified name of the object command is returned as the
    result of the command\.

## <a name='subsection2'></a>Object command

All objects created by the __::transfer::data::source__ command have the
following general form:

  - <a name='2'></a>*objectName* __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object\. Doing so while a transfer initiated by the
    object is active is safe as all data required for the transfer itself was
    copied, and the completion of the transfer will not try to access the
    initiating object anymore\. i\.e\. the transfer is completely separate from the
    source object itself\.

  - <a name='4'></a>*objectName* __type__

    This method returns a string describing the type of the data the object is
    refering to\. The possible values and their meanings are:

      * __undefined__

        No data was specified at all, or it was specified incompletely\. The
        object does not know the type\.

      * __string__

        The data to transfer is contained in a string\.

      * __channel__

        The data to transfer is contained in a channel\.

  - <a name='5'></a>*objectName* __data__

    This method returns a value depending on the type of the data the object
    refers to, through which the data can be accessed\. The method throws an
    error if the type is __undefined__\. For type __string__ the returned
    result is the data itself, whereas for type __channel__ the returned
    result is the handle of the channel containing the data\.

  - <a name='6'></a>*objectName* __size__

    This method returns a value depending on the type of the data the object
    refers to, the size of the data\. The method throws an error if the type is
    __undefined__\. Return of a negative value signals that the object is
    unable to determine an absolute size upfront \(like for data in a channel\)\.

  - <a name='7'></a>*objectName* __valid__ *msgvar*

    This method checks the configuration of the object for validity\. It returns
    a boolean flag as result, whose value is __True__ if the object is
    valid, and __False__ otherwise\. In the latter case the variable whose
    name is stored in *msgvar* is set to an error message describing the
    problem found with the configuration\. Otherwise this variable is not
    touched\.

  - <a name='8'></a>*objectName* __transmit__ *channel* *blocksize* *done*

    This method initiates a transfer of the referenced data to the specified
    *channel*\. When the transfer completes the command prefix *done* is
    invoked, per the rules for the option __\-command__ of command
    __transfer::copy::do__ in the package
    __[transfer::copy](copyops\.md)__\. The *blocksize* specifies the
    size of the chunks to transfer in one go\. See the option __\-blocksize__
    of command __transfer::copy::do__ in the package
    __[transfer::copy](copyops\.md)__\.

## <a name='subsection4'></a>Options

All data sources support the options listed below\. It should be noted that the
first four options are semi\-exclusive, each specifying a different type of data
source and associated content\. If these options are specified more than once
then the last option specified is used to actually configure the object\.

  - __\-string__ *text*

    This option specifies that the source of the data is an immediate string,
    and its associated argument contains the string in question\.

  - __\-channel__ *handle*

    This option specifies that the source of the data is a channel, and its
    associated argument is the handle of the channel containing the data\.

  - __\-file__ *path*

    This option specifies that the source of the data is a file, and its
    associated argument is the path of the file containing the data\.

  - __\-variable__ *varname*

    This option specifies that the source of the data is a string stored in a
    variable, and its associated argument contains the name of the variable in
    question\. The variable is assumed to be global or namespaced, anchored at
    the global namespace\.

  - __\-size__ *int*

    This option specifies the size of the data transfer\. It is optional and
    defaults to \-1\. This value, and any other value less than zero signals to
    transfer all the data from the source\.

  - __\-progress__ *command*

    This option, if specified, defines a command to be invoked for each chunk of
    bytes transmitted, allowing the user to monitor the progress of the
    transmission of the data\. The callback is always invoked with one additional
    argument, the number of bytes transmitted so far\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *transfer* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel](\.\./\.\./\.\./\.\./index\.md\#channel),
[copy](\.\./\.\./\.\./\.\./index\.md\#copy), [data
source](\.\./\.\./\.\./\.\./index\.md\#data\_source),
[transfer](\.\./\.\./\.\./\.\./index\.md\#transfer)

# <a name='category'></a>CATEGORY

Transfer module

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/transfer/receiver.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337

[//000000001]: # (transfer::receiver \- Data transfer facilities)
[//000000002]: # (Generated from file 'receiver\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (transfer::receiver\(n\) 0\.2 tcllib "Data transfer facilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

transfer::receiver \- Data source

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

      - [Options](#subsection4)

  - [Secure connections](#section3)

  - [TLS Security Considerations](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit ?1\.0?  
package require transfer::data::destination ?0\.2?  
package require transfer::connect ?0\.2?  
package require transfer::receiver ?0\.2?  

[__transfer::receiver__ *object* ?*options*\.\.\.?](#1)  
[__transfer::receiver__ __stream channel__ *chan* *host* *port* ?*arg*\.\.\.?](#2)  
[__transfer::receiver__ __stream file__ *path* *host* *port* ?*arg*\.\.\.?](#3)  
[*objectName* __method__ ?*arg arg \.\.\.*?](#4)  
[*objectName* __destroy__](#5)  
[*objectName* __start__](#6)  
[*objectName* __busy__](#7)  

# <a name='description'></a>DESCRIPTION

This package pulls data destinations and connection setup together into a
combined object for the reception of information coming in over a socket\. These
objects understand all the options from objects created by the packages
__[transfer::data::destination](ddest\.md)__ and
__[transfer::connect](connect\.md)__\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__transfer::receiver__ *object* ?*options*\.\.\.?

    This command creates a new receiver object with an associated Tcl command
    whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The set of supported *options* is explained in
    section [Options](#subsection4)\.

    The object command will be created under the current namespace if the
    *objectName* is not fully qualified, and in the specified namespace
    otherwise\. The fully qualified name of the object command is returned as the
    result of the command\.

  - <a name='2'></a>__transfer::receiver__ __stream channel__ *chan* *host* *port* ?*arg*\.\.\.?

    This method creates a fire\-and\-forget transfer for the data coming from the
    source at host/port \(details below\) and writing to the channel *chan*,
    starting at the current seek location\. The channel is configured to use
    binary translation and encoding for the transfer\. The channel is *not*
    closed when the transfer has completed\. This is left to the completion
    callback\.

    If both *host* and *port* are provided an __active__ connection to
    the data source is made\. If only a *port* is specified \(with *host* the
    empty string\) then a __passive__ connection is made instead, i\.e\. the
    receiver then waits for a conneciton by the transmitter\.

    Any arguments after the port are treated as options and are used to
    configure the internal receiver object\. See the section
    [Options](#subsection4) for a list of the supported options and their
    meaning\. *Note* however that the signature of the command prefix specified
    for the __\-command__ callback differs from the signature for the same
    option of the receiver object\. This callback is only given the number of
    bytes and transfered, and possibly an error message\. No reference to the
    internally used receiver object is made\.

    The result returned by the command is the empty string if it was set to make
    an *[active](\.\./\.\./\.\./\.\./index\.md\#active)* connection, and the port
    the internal receiver object is listening on otherwise, i\.e when it is
    configured to connect *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)*ly\. See
    also the package __[transfer::connect](connect\.md)__ and the
    description of the method __connect__ for where this behaviour comes
    from\.

  - <a name='3'></a>__transfer::receiver__ __stream file__ *path* *host* *port* ?*arg*\.\.\.?

    This method is like __stream channel__, except that the received data is
    written to the file *path*, replacing any prior content\.

## <a name='subsection2'></a>Object command

All objects created by the __::transfer::receiver__ command have the
following general form:

  - <a name='4'></a>*objectName* __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='5'></a>*objectName* __destroy__

    This method destroys the object\. Doing so while a reception is on progress
    will cause errors later on, when the reception completes and tries to access
    the now missing data structures of the destroyed object\.

  - <a name='6'></a>*objectName* __start__

    This method initiates the data reception, setting up the connection first
    and then copying the received information into the destination\. The method
    will throw an error if a reception is already/still in progress\. I\.e\. it is
    not possible to run two receptions in parallel, only in sequence\. Errors
    will also be thrown if the configuration of the data destination is invalid,
    or if no completion callback was specified\.

    The result returned by the method is the empty string for an object
    configured to make an *[active](\.\./\.\./\.\./\.\./index\.md\#active)*
    connection, and the port the object is listening on otherwise, i\.e when it
    is configured to connect *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)*ly\.
    See also the package __[transfer::connect](connect\.md)__ and the
    description of the method __connect__ for where this behaviour comes
    from\.

  - <a name='7'></a>*objectName* __busy__

    This method returns a boolean value telling us whether a reception is in
    progress \(__True__\), or not \(__False__\)\.

## <a name='subsection4'></a>Options

All receiver objects support the union of the options supported by their connect
and data destination components, plus one of their own\. See also the
documentation for the packages
__[transfer::data::destination](ddest\.md)__ and
__[transfer::connect](connect\.md)__\.

  - __\-command__ *cmdprefix*

    This option specifies the command to invoke when the reception of the
    information has been completed\. The arguments given to this command are the
    same as given to the completion callback of the command
    __transfer::copy::do__ provided by the package
    __[transfer::copy](copyops\.md)__\.

  - __\-mode__ *mode*

    This option specifies the mode the object is in\. It is optional and defaults
    to __active__ mode\. The two possible modes are:

      * __active__

        In this mode the two options __\-host__ and __\-port__ are
        relevant and specify the host and TCP port the object has to connect to\.
        The host is given by either name or IP address\.

      * __passive__

        In this mode the option __\-host__ has no relevance and is ignored
        should it be configured\. The only option the object needs is
        __\-port__, and it specifies the TCP port on which the listening
        socket is opened to await the connection from the partner\.

  - __\-host__ *hostname\-or\-ipaddr*

    This option specifies the host to connect to in
    *[active](\.\./\.\./\.\./\.\./index\.md\#active)* mode, either by name or
    ip\-address\. An object configured for
    *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)* mode ignores this option\.

  - __\-port__ *int*

    For *[active](\.\./\.\./\.\./\.\./index\.md\#active)* mode this option specifies
    the port the object is expected to connect to\. For
    *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)* mode however it is the port
    where the object creates the listening socket waiting for a connection\. It
    defaults to __0__, which allows the OS to choose the actual port to
    listen on\.

  - __\-socketcmd__ *command*

    This option allows the user to specify which command to use to open a
    socket\. The default is to use the builtin __::socket__\. Any compatible
    with that command is allowed\.

    The envisioned main use is the specfication of __tls::socket__\. I\.e\.
    this option allows the creation of secure transfer channels, without making
    this package explicitly dependent on the
    __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__ package\.

    See also section [Secure connections](#section3)\.

  - __\-encoding__ encodingname

  - __\-eofchar__ eofspec

  - __\-translation__ transspec

    These options are the same as are recognized by the builtin command
    __fconfigure__\. They provide the configuration to be set for the channel
    between the two partners after it has been established, but before the
    callback is invoked \(See method __connect__\)\.

  - __\-channel__ *handle*

    This option specifies that the destination of the data is a channel, and its
    associated argument is the handle of the channel to write the received data
    to\.

  - __\-file__ *path*

    This option specifies that the destination of the data is a file, and its
    associated argument is the path of the file to write the received data to\.

  - __\-variable__ *varname*

    This option specifies that the destination of the data is a variable, and
    its associated argument contains the name of the variable to write the
    received data to\. The variable is assumed to be global or namespaced,
    anchored at the global namespace\.

  - __\-progress__ *command*

    This option, if specified, defines a command to be invoked for each chunk of
    bytes received, allowing the user to monitor the progress of the reception
    of the data\. The callback is always invoked with one additional argument,
    the number of bytes received so far\.

# <a name='section3'></a>Secure connections

One way to secure connections made by objects of this package is to require the
package __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__ and then configure the
option __\-socketcmd__ to force the use of command __tls::socket__ to
open the socket\.

    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...

    # Create a connector with secure socket setup,
    transfer::receiver R -socketcmd tls::socket ...
    ...

# <a name='section4'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *transfer* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel](\.\./\.\./\.\./\.\./index\.md\#channel),
[copy](\.\./\.\./\.\./\.\./index\.md\#copy), [data
destination](\.\./\.\./\.\./\.\./index\.md\#data\_destination),
[receiver](\.\./\.\./\.\./\.\./index\.md\#receiver),
[secure](\.\./\.\./\.\./\.\./index\.md\#secure), [ssl](\.\./\.\./\.\./\.\./index\.md\#ssl),
[tls](\.\./\.\./\.\./\.\./index\.md\#tls),
[transfer](\.\./\.\./\.\./\.\./index\.md\#transfer)

# <a name='category'></a>CATEGORY

Transfer module

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/transfer/tqueue.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

[//000000001]: # (transfer::copy::queue \- Data transfer facilities)
[//000000002]: # (Generated from file 'tqueue\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (transfer::copy::queue\(n\) 0\.1 tcllib "Data transfer facilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

transfer::copy::queue \- Queued transfers

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

  - [Options](#section3)

  - [Use](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit ?1\.0?  
package require struct::queue ?1\.4?  
package require transfer::copy ?0\.2?  
package require transfer::copy::queue ?0\.1?  

[__transfer::copy::queue__ *objectName* *outchannel* ?*options*\.\.\.?](#1)  
[*objectName* __method__ ?*arg arg \.\.\.*?](#2)  
[*objectName* __destroy__](#3)  
[*objectName* __busy__](#4)  
[*objectName* __pending__](#5)  
[*objectName* __put__ *request*](#6)  

# <a name='description'></a>DESCRIPTION

This package provides objects which serialize transfer requests for a single
channel by means of a fifo queue\. Accumulated requests are executed in order of
entrance, with the first request reaching an idle object starting the execution
in general\. New requests can be added while the object is active and are defered
until all requests entered before them have been completed successfully\.

When a request causes a transfer error execution stops and all requests coming
after it are not served\. Currently this means that their completion callbacks
are never triggered at all\.

*NOTE*: Not triggering the completion callbacks of the unserved requests after
an error stops the queue object is something I am not fully sure that it makes
sense\. It forces the user of the queue to remember the callbacks as well and run
them\. Because otherwise everything in the system which depends on getting a
notification about the status of a request will hang in the air\. I am slowly
convincing myself that it is more sensible to trigger the relevant completion
callbacks with an error message about the queue abort, and 0 bytes transfered\.

All transfer requests are of the form

    {type data options...}

where *type* is in \{__chan__, __string__\}, and *data* specifies the
information to transfer\. For __chan__ the data is the handle of the channel
containing the actual information to transfer, whereas for __string__
*data* contains directly the information to transfer\. The *options* are a
list of them and their values, and are the same as are accepted by the low\-level
copy operations of the package __[transfer::copy](copyops\.md)__\. Note
how just prepending the request with __transfer::copy::do__ and inserting a
channel handle in between *data* and *options* easily transforms it from a
pure data structure into a command whose evaluation will perform the request\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__transfer::copy::queue__ *objectName* *outchannel* ?*options*\.\.\.?

    This command creates a new queue object for the management of the channel
    *outchannel*, with an associated Tcl command whose name is *objectName*\.
    This *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in
    full detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The set of supported *options* is explained in
    section [Options](#section3)\.

    The object command will be created under the current namespace if the
    *objectName* is not fully qualified, and in the specified namespace
    otherwise\. The fully qualified name of the object command is returned as the
    result of the command\.

## <a name='subsection2'></a>Object command

All objects created by the __::transfer::copy::queue__ command have the
following general form:

  - <a name='2'></a>*objectName* __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='3'></a>*objectName* __destroy__

    This method destroys the object\. Doing so while the object is busy will
    cause errors later on, when the currently executed request completes and
    tries to access the now missing data structures of the destroyed object\.

  - <a name='4'></a>*objectName* __busy__

    This method returns a boolean value telling us if the object is currently
    serving a request \(i\.e\. *busy*, value __True__\), or not \(i\.e\.
    *[idle](\.\./\.\./\.\./\.\./index\.md\#idle)*, value __False__\)\.

  - <a name='5'></a>*objectName* __pending__

    This method returns the number of requests currently waiting in the queue
    for their execution\. A request currently served is not counted as waiting\.

  - <a name='6'></a>*objectName* __put__ *request*

    This method enters the transfer *request* into the object's queue of
    waiting requests\. If the object is *[idle](\.\./\.\./\.\./\.\./index\.md\#idle)*
    it will become *busy*, immediately servicing the request\. Otherwise
    servicing the new request will be defered until all preceding requests have
    been served\.

# <a name='section3'></a>Options

The only option known is __\-on\-status\-change__\. It is optional and defaults
to the empty list, disabling the reporting of status changes\. Otherwise its
argument is a command prefix which is invoked whenever the internal status of
the object changed\. The callback is invoked with two additional arguments, the
result of the methods __pending__ and __busy__, in this order\. This
allows any user to easily know, for example, when the object has processed all
outstanding requests\.

# <a name='section4'></a>Use

A possible application of this package and class is within a HTTP 1\.1 server,
managing the results waiting for transfer to the client\.

It should be noted that in this application the system also needs an additional
data structure which keeps track of outstanding results as they may come back in
a different order than the requests from the client, and releases them to the
actual queue in the proper order\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *transfer* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel](\.\./\.\./\.\./\.\./index\.md\#channel),
[copy](\.\./\.\./\.\./\.\./index\.md\#copy), [queue](\.\./\.\./\.\./\.\./index\.md\#queue),
[transfer](\.\./\.\./\.\./\.\./index\.md\#transfer)

# <a name='category'></a>CATEGORY

Transfer module

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/transfer/transmitter.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350

[//000000001]: # (transfer::transmitter \- Data transfer facilities)
[//000000002]: # (Generated from file 'transmitter\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (transfer::transmitter\(n\) 0\.2 tcllib "Data transfer facilities")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

transfer::transmitter \- Data source

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [Package commands](#subsection1)

      - [Object command](#subsection2)

      - [Object methods](#subsection3)

      - [Options](#subsection4)

  - [Secure connections](#section3)

  - [TLS Security Considerations](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require snit ?1\.0?  
package require transfer::copy ?0\.2?  
package require transfer::data::source ?0\.2?  
package require transfer::connect ?0\.2?  
package require transfer::transmitter ?0\.2?  

[__transfer::transmitter__ *objectName* ?*options*\.\.\.?](#1)  
[__transfer::transmitter__ __stream channel__ *chan* *host* *port* ?*arg*\.\.\.?](#2)  
[__transfer::transmitter__ __stream file__ *path* *host* *port* ?*arg*\.\.\.?](#3)  
[*objectName* __method__ ?*arg arg \.\.\.*?](#4)  
[*objectName* __destroy__](#5)  
[*objectName* __start__](#6)  
[*objectName* __busy__](#7)  

# <a name='description'></a>DESCRIPTION

This package pulls data sources and connection setup together into a combined
object for the transmission of information over a socket\. These objects
understand all the options from objects created by the packages
__[transfer::data::source](dsource\.md)__ and
__[transfer::connect](connect\.md)__\.

# <a name='section2'></a>API

## <a name='subsection1'></a>Package commands

  - <a name='1'></a>__transfer::transmitter__ *objectName* ?*options*\.\.\.?

    This command creates a new transmitter object with an associated Tcl command
    whose name is *objectName*\. This
    *[object](\.\./\.\./\.\./\.\./index\.md\#object)* command is explained in full
    detail in the sections [Object command](#subsection2) and [Object
    methods](#subsection3)\. The set of supported *options* is explained in
    section [Options](#subsection4)\.

    The object command will be created under the current namespace if the
    *objectName* is not fully qualified, and in the specified namespace
    otherwise\. The fully qualified name of the object command is returned as the
    result of the command\.

  - <a name='2'></a>__transfer::transmitter__ __stream channel__ *chan* *host* *port* ?*arg*\.\.\.?

    This method creates a fire\-and\-forget transfer for the data contained in the
    channel *chan*, starting at the current seek location\. The channel is
    configured to use binary translation and encoding for the transfer\. The
    channel is automatically closed when the transfer has completed\.

    If both *host* and *port* are provided an __active__ connection to
    the destination is made\. If only a *port* is specified \(with *host* the
    empty string\) then a __passive__ connection is made instead\.

    Any arguments after the port are treated as options and are used to
    configure the internal transmitter object\. See the section
    [Options](#subsection4) for a list of the supported options and their
    meaning\. *Note* however that the signature of the command prefix specified
    for the __\-command__ callback differs from the signature for the same
    option of the transmitter object\. This callback is only given the number of
    bytes and transfered, and possibly an error message\. No reference to the
    internally used transmitter object is made\.

    The result returned by the command is the empty string if it was set to make
    an *[active](\.\./\.\./\.\./\.\./index\.md\#active)* connection, and the port
    the internal transmitter object is listening on otherwise, i\.e when it is
    configured to connect *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)*ly\. See
    also the package __[transfer::connect](connect\.md)__ and the
    description of the method __connect__ for where this behaviour comes
    from\.

  - <a name='3'></a>__transfer::transmitter__ __stream file__ *path* *host* *port* ?*arg*\.\.\.?

    This method is like __stream channel__, except that the data contained
    in the file *path* is transfered\.

## <a name='subsection2'></a>Object command

All objects created by the __::transfer::transmitter__ command have the
following general form:

  - <a name='4'></a>*objectName* __method__ ?*arg arg \.\.\.*?

    The method __method__ and its *arg*'uments determine the exact
    behavior of the command\. See section [Object methods](#subsection3) for
    the detailed specifications\.

## <a name='subsection3'></a>Object methods

  - <a name='5'></a>*objectName* __destroy__

    This method destroys the object\. Doing so while a transmission is in
    progress will cause errors later on, when the transmission completes and
    tries to access the now missing data structures of the destroyed object\.

  - <a name='6'></a>*objectName* __start__

    This method initiates the data transmission, setting up the connection first
    and then copying the information\. The method will throw an error if a
    transmission is already/still in progress\. I\.e\. it is not possible to run
    two transmissions in parallel on a single object, only in sequence\. Multiple
    transmitter objects are needed to manage parallel transfers, one per
    transmission\. Errors will also be thrown if the configuration of the data
    source is invalid, or if no completion callback was specified\.

    The result returned by the method is the empty string for an object
    configured to make an *[active](\.\./\.\./\.\./\.\./index\.md\#active)*
    connection, and the port the object is listening on otherwise, i\.e when it
    is configured to connect *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)*ly\.
    See also the package __[transfer::connect](connect\.md)__ and the
    description of the method __connect__ for where this behaviour comes
    from\.

  - <a name='7'></a>*objectName* __busy__

    This method returns a boolean value telling us whether a transmission is in
    progress \(__True__\), or not \(__False__\)\.

## <a name='subsection4'></a>Options

All transmitter objects support the union of the options supported by their
connect and data source components, plus two of their own\. See also the
documentation for the packages __[transfer::data::source](dsource\.md)__
and __[transfer::connect](connect\.md)__\.

  - __\-blocksize__ *int*

    This option specifies the size of the chunks to be transmitted in one block\.
    Usage is optional, its default value is __1024__\.

  - __\-command__ *cmdprefix*

    This option specifies the command to invoke when the transmission of the
    information has been completed\. The arguments given to this command are the
    same as given to the completion callback of the command
    __transfer::copy::do__ provided by the package
    __[transfer::copy](copyops\.md)__\.

  - __\-mode__ *mode*

    This option specifies the mode the object is in\. It is optional and defaults
    to __active__ mode\. The two possible modes are:

      * __active__

        In this mode the two options __\-host__ and __\-port__ are
        relevant and specify the host and TCP port the object has to connect to\.
        The host is given by either name or IP address\.

      * __passive__

        In this mode the option __\-host__ has no relevance and is ignored
        should it be configured\. The only option the object needs is
        __\-port__, and it specifies the TCP port on which the listening
        socket is opened to await the connection from the partner\.

  - __\-host__ *hostname\-or\-ipaddr*

    This option specifies the host to connect to in
    *[active](\.\./\.\./\.\./\.\./index\.md\#active)* mode, either by name or
    ip\-address\. An object configured for
    *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)* mode ignores this option\.

  - __\-port__ *int*

    For *[active](\.\./\.\./\.\./\.\./index\.md\#active)* mode this option specifies
    the port the object is expected to connect to\. For
    *[passive](\.\./\.\./\.\./\.\./index\.md\#passive)* mode however it is the port
    where the object creates the listening socket waiting for a connection\. It
    defaults to __0__, which allows the OS to choose the actual port to
    listen on\.

  - __\-socketcmd__ *command*

    This option allows the user to specify which command to use to open a
    socket\. The default is to use the builtin __::socket__\. Any compatible
    with that command is allowed\.

    The envisioned main use is the specfication of __tls::socket__\. I\.e\.
    this option allows the creation of secure transfer channels, without making
    this package explicitly dependent on the
    __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__ package\.

    See also section [Secure connections](#section3)\.

  - __\-encoding__ encodingname

  - __\-eofchar__ eofspec

  - __\-translation__ transspec

    These options are the same as are recognized by the builtin command
    __fconfigure__\. They provide the configuration to be set for the channel
    between the two partners after it has been established, but before the
    callback is invoked \(See method __connect__\)\.

  - __\-string__ *text*

    This option specifies that the source of the data is an immediate string,
    and its associated argument contains the string in question\.

  - __\-channel__ *handle*

    This option specifies that the source of the data is a channel, and its
    associated argument is the handle of the channel containing the data\.

  - __\-file__ *path*

    This option specifies that the source of the data is a file, and its
    associated argument is the path of the file containing the data\.

  - __\-variable__ *varname*

    This option specifies that the source of the data is a string stored in a
    variable, and its associated argument contains the name of the variable in
    question\. The variable is assumed to be global or namespaced, anchored at
    the global namespace\.

  - __\-size__ *int*

    This option specifies the size of the data transfer\. It is optional and
    defaults to \-1\. This value, and any other value less than zero signals to
    transfer all the data from the source\.

  - __\-progress__ *command*

    This option, if specified, defines a command to be invoked for each chunk of
    bytes transmitted, allowing the user to monitor the progress of the
    transmission of the data\. The callback is always invoked with one additional
    argument, the number of bytes transmitted so far\.

# <a name='section3'></a>Secure connections

One way to secure connections made by objects of this package is to require the
package __[tls](\.\./\.\./\.\./\.\./index\.md\#tls)__ and then configure the
option __\-socketcmd__ to force the use of command __tls::socket__ to
open the socket\.

    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...

    # Create a connector with secure socket setup,
    transfer::transmitter T -socketcmd tls::socket ...
    ...

# <a name='section4'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *transfer* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel](\.\./\.\./\.\./\.\./index\.md\#channel),
[copy](\.\./\.\./\.\./\.\./index\.md\#copy), [data
source](\.\./\.\./\.\./\.\./index\.md\#data\_source),
[secure](\.\./\.\./\.\./\.\./index\.md\#secure), [ssl](\.\./\.\./\.\./\.\./index\.md\#ssl),
[tls](\.\./\.\./\.\./\.\./index\.md\#tls),
[transfer](\.\./\.\./\.\./\.\./index\.md\#transfer),
[transmitter](\.\./\.\./\.\./\.\./index\.md\#transmitter)

# <a name='category'></a>CATEGORY

Transfer module

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2006\-2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/treeql/treeql.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705

[//000000001]: # (treeql \- Tree Query Language)
[//000000002]: # (Generated from file 'treeql\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004 Colin McCormack <coldstore@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000005]: # (treeql\(n\) 1\.3\.1 tcllib "Tree Query Language")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

treeql \- Query tree objects

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [TreeQL CLASS API](#subsection1)

      - [TreeQL OBJECT API](#subsection2)

  - [The Tree Query Language](#section3)

      - [TreeQL Concepts](#subsection3)

      - [Structural generators](#subsection4)

      - [Attribute Filters](#subsection5)

      - [Attribute Mutators](#subsection6)

      - [Attribute String Accessors](#subsection7)

      - [Sub\-queries](#subsection8)

      - [Node Set Operators](#subsection9)

      - [Node Set Iterators](#subsection10)

      - [Typed node support](#subsection11)

  - [Examples](#section4)

  - [References](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require snit  
package require struct::list  
package require struct::set  
package require treeql ?1\.3\.1?  

[__treeql__ *objectname* __\-tree__ *tree* ?__\-query__ *query*? ?__\-nodes__ *nodes*? ?*args*\.\.\.?](#1)  
[*qo* __query__ *args*\.\.\.](#2)  
[*qo* __result__](#3)  
[*qo* __discard__](#4)  

# <a name='description'></a>DESCRIPTION

This package provides objects which can be used to query and transform tree
objects following the API of tree objects created by the package
__[struct::tree](\.\./struct/struct\_tree\.md)__\.

The tree query and manipulation language used here, TreeQL, is inspired by Cost
\(See section [References](#section5) for more information\)\.

__treeql__, the package, is a fairly thin query facility over
tree\-structured data types\. It implements an ordered set of nodes \(really a
list\) which are generated and filtered through the application of TreeQL
operators to each node in turn\.

# <a name='section2'></a>API

## <a name='subsection1'></a>TreeQL CLASS API

The command __treeql__ is a __[snit](\.\./snit/snit\.md)__::type which
implements the Treeql Query Language\. This means that it follows the API for
class commands as specified by the package __[snit](\.\./snit/snit\.md)__\.
Its general syntax is

  - <a name='1'></a>__treeql__ *objectname* __\-tree__ *tree* ?__\-query__ *query*? ?__\-nodes__ *nodes*? ?*args*\.\.\.?

    The command creates a new tree query object and returns the fully qualified
    name of the object command as its result\. The API the returned command is
    following is described in the section [TreeQL OBJECT API](#subsection2)

    Each query object is associated with a single *tree* object\. This is the
    object all queries will be run against\.

    If the option __\-nodes__ was specified then its argument is treated as a
    list of nodes\. This list is used to initialize the node set\. It defaults to
    the empty list\.

    If the option __\-query__ was specified then its argument will be
    interpreted as an object, the *parent query* of this query\. It defaults to
    the object itself\. All queries will be interpreted in the environment of
    this object\.

    Any arguments coming after the options are treated as a query and run
    immediately, after the *node set* has been initialized\. This uses the same
    syntax for the query as the method __query__\.

    The operations of the TreeQL available for this are explained in the section
    about [The Tree Query Language](#section3)\. This section also explains
    the term *node set* used above\.

## <a name='subsection2'></a>TreeQL OBJECT API

As __treeql__ has been implemented in __[snit](\.\./snit/snit\.md)__
all the standard methods of __[snit](\.\./snit/snit\.md)__\-based classes
are available to the user and therefore not listed here\. Please read the
documentation for __[snit](\.\./snit/snit\.md)__ for what they are and what
functionality they provide

The methods provided by the package __treeql__ itself are listed and
explained below\.

  - <a name='2'></a>*qo* __query__ *args*\.\.\.

    This method interprets its arguments as a series of TreeQL operators and
    interpretes them from the left to right \(i\.e\. first to last\)\. Note that the
    first operator uses the *node set* currently known to the object to
    perform its actions\. In other words, the *node set* is *not* cleared, or
    modified in other ways, before the query is run\. This allows the user to run
    several queries one after the other and have each use the results of the
    last\. Any initialization has to be done by any query itself, using TreeQL
    operators\. The result of the method is the *node set* after the last
    operator of the query has been executed\.

    *Note* that uncaught errors will leave the *node set* of the object in
    an intermediate state, per the TreeQL operators which were executed
    successfully before the error occurred\.

    The above means in detail that:

      1. The first argument is interpreted as the name of a query operator, the
         number of arguments required by that operator is then determined, and
         taken from the immediately following arguments\.

         Because of this operators cannot have optional arguments, all arguments
         have to be present as defined\. Failure to do this will, at least,
         confuse the query interpreter, but more likely cause errors\.

      1. The operator is applied to the current node set, yielding a new node
         set, and/or manipulating the tree object the query object is connected
         to\.

      1. The arguments used \(i\.e\. operator name and arguments\) are removed from
         the list of method arguments, and then the whole process is repeated
         from step \[1\], until the list of arguments is empty or an error
         occurred\.

            # q is the query object.

            q query root children get data

            # The above query
            # - Resets the node set to the root node - root
            # - Adds the children of root to the set - children
            # - Replaces the node set with the       - get data
            #   values for the attribute 'data',
            #   for all nodes in the set which
            #   have such an attribute.
            # - And returns this information.

            # Below we can see the same query, but rewritten
            # to show the structure as it is seen by the query
            # interpreter.

            q query \
        	    root \
        	    children \
        	    get data

    The operators of the TreeQL language available for this are explained in the
    section about [The Tree Query Language](#section3)\. This section also
    explains the term *node set* used above\.

  - <a name='3'></a>*qo* __result__

    This method returns a list containing the current node set\.

  - <a name='4'></a>*qo* __discard__

    This method returns the current node set \(like method __result__\), but
    also destroys the query object \(*qo*\)\. This is useful when constructing
    and using sub\-queries \(%AUTO% objects immediately destroyed after use\)\.

# <a name='section3'></a>The Tree Query Language

This and the following sections specify the Tree Query Language used by the
query objects of this package in detail\.

First we explain the general concepts underneath the language which are required
to comprehend it\. This is followed by the specifications for all the available
query operators\. They fall into eight categories, and each category has its own
section\.

  1. [TreeQL Concepts](#subsection3)

  1. [Structural generators](#subsection4)

  1. [Attribute Filters](#subsection5)

  1. [Attribute Mutators](#subsection6)

  1. [Attribute String Accessors](#subsection7)

  1. [Sub\-queries](#subsection8)

  1. [Node Set Operators](#subsection9)

  1. [Node Set Iterators](#subsection10)

  1. [Typed node support](#subsection11)

## <a name='subsection3'></a>TreeQL Concepts

The main concept which has to be understood is that of the *node set*\. Each
query object maintains exactly one such *node set*, and essentially all
operators use it and input argument and for their result\. This structure simply
contains the handles of all nodes which are currently of interest to the query
object\. To name it a *[set](\.\./\.\./\.\./\.\./index\.md\#set)* is a bit of a
misnomer, because

  1. A node \(handle\) can occur in the structure more than once, and

  1. the order of nodes in the structure is important as well\. Whenever an
     operator processes all nodes in the node set it will do so in the order
     they occur in the structure\.

Regarding the possible multiple occurrence of a node, consider a node set
containing two nodes A and B, both having node P as their immediate parent\.
Application of the TreeQL operator "parent" will then add P to the new node set
twice, once per node it was parent of\. I\.e\. the new node set will then be \{P P\}\.

## <a name='subsection4'></a>Structural generators

All tree\-structural operators locate nodes in the tree based on a structural
relation ship to the nodes currently in the set and then replace the current
node set with the set of nodes found Nodes which fulfill such a relationship
multiple times are added to the result as often as they fulfill the
relationship\.

It is important to note that the found nodes are collected in a separate storage
area while processing the node set, and are added to \(or replacing\) the current
node set only after the current node set has been processed completely\. In other
words, the new nodes are *not* processed by the operator as well and do not
affect the iteration\.

When describing an operator the variable __N__ will be used to refer to any
node in the node set\.

  - __ancestors__

    Replaces the current node set with the ancestors for all nodes __N__ in
    the node set, should __N__ have a parent\. In other words, nodes without
    a parent do not contribute to the new node set\. In other words, uses all
    nodes on the path from node __N__ to root, in this order \(root last\),
    for all nodes __N__ in the node set\. This includes the root, but not the
    node itself\.

  - __rootpath__

    Replaces the current node set with the ancestors for all nodes __N__ in
    the node set, should __N__ have a parent\. In other words, nodes without
    a parent do not contribute to the new node set\. In contrast to the operator
    __ancestors__ the nodes are added in reverse order however, i\.e\. the
    root node first\.

  - __parent__

    Replaces the current node set with the parent of node __N__, for all
    nodes __N__ in the node set, should __N__ have a parent\. In other
    words, nodes without a parent do not contribute to the new node set\.

  - __children__

    Replaces the current node set with the immediate children of node __N__,
    for all nodes __N__ in the node set, should __N__ have children\. In
    other words, nodes without children do not contribute to the new node set\.

  - __left__

    Replaces the current node set with the previous/left sibling for all nodes
    __N__ in the node set, should __N__ have siblings to the left\. In
    other words, nodes without left siblings do not contribute to the new node
    set\.

  - __right__

    Replaces the current node set with the next/right sibling for all nodes
    __N__ in the node set, should __N__ have siblings to the right\. In
    other words, nodes without right siblings do not contribute to the new node
    set\.

  - __prev__

    Replaces the current node set with all previous/left siblings of node
    __N__, for all nodes __N__ in the node set, should __N__ have
    siblings to the left\. In other words, nodes without left siblings are
    ignored\. The left sibling adjacent to the node is added first, and the
    leftmost sibling last \(reverse tree order\)\.

  - __esib__

    Replaces the current node set with all previous/left siblings of node
    __N__, for all nodes __N__ in the node set, should __N__ have
    siblings to the left\. In other words, nodes without left siblings are
    ignored\. The leftmost sibling is added first, and the left sibling adjacent
    to the node last \(tree order\)\.

    The method name is a shorthand for *Earlier SIBling*\.

  - __next__

    Replaces the current node set with all next/right siblings of node
    __N__, for all nodes __N__ in the node set, should __N__ have
    siblings to the right\. In other words, nodes without right siblings do not
    contribute to the new node set\. The right sibling adjacent to the node is
    added first, and the rightmost sibling last \(tree order\)\.

  - __root__

    Replaces the current node set with a node set containing a single node, the
    root of the tree\.

  - __tree__

    Replaces the current node set with a node set containing all nodes found in
    the tree\. The nodes are added in pre\-order \(parent first, then children, the
    latter from left to right, first to last\)\.

  - __descendants__

    Replaces the current node set with the nodes in all subtrees rooted at node
    __N__, for all nodes __N__ in the node set, should __N__ have
    children\. In other words, nodes without children do not contribute to the
    new node set\.

    This is like the operator __children__, but covers the children of
    children as well, i\.e\. all the *proper descendants*\. "Rooted at __N__"
    means that __N__ itself is not added to the new set, which is also
    implied by *proper descendants*\.

  - __subtree__

    Like operator __descendants__, but includes the node __N__\. In other
    words:

    Replaces the current node set with the nodes of the subtree of node
    __N__, for all nodes __N__ in the node set, should __N__ have
    children\. In other words, nodes without children do not contribute to the
    new node set\. I\.e this is like the operator __children__, but covers the
    children of children, etc\. as well\. "Of __N__" means that __N__
    itself is added to the new set\.

  - __forward__

    Replaces the current node set with the nodes in the subtrees rooted at the
    right siblings of node __N__, for all nodes __N__ in the node set,
    should __N__ have right siblings, and they children\. In other words,
    nodes without right siblings, and them without children are ignored\.

    This is equivalent to the operator sequence

        next descendants

  - __later__

    This is an alias for the operator __forward__\.

  - __backward__

    Replaces the current node set with the nodes in the flattened previous
    subtrees, in reverse tree order\.

    This is nearly equivalent to the operator sequence

        prev descendants

    The only difference is that this uses the nodes in reverse order\.

  - __earlier__

    Replaces the current node set with the nodes in the flattened previous
    subtrees, in tree order\.

    This is equivalent to the operator sequence

        prev subtree

## <a name='subsection5'></a>Attribute Filters

These operators filter the node set by reference to attributes of nodes and
their properties\. Filter means that all nodes not fulfilling the criteria are
removed from the node set\. In other words, the node set is replaced by the set
of nodes fulfilling the filter criteria\.

  - __hasatt__ *attr*

    Reduces the node set to nodes which have an attribute named *attr*\.

  - __withatt__ *attr* *value*

    Reduces the node set to nodes which have an attribute named *attr*, and
    where the value of that attribute is equal to *value* \(The "==" operator
    is __string equal \-nocase__\)\.

  - __withatt\!__ *attr* *val*

    This is the same as __withatt__, but all nodes in the node set have to
    have the attribute, and the "==" operator is __string equal__, i\.e\. no
    __\-nocase__\. The operator will fail with an error if they don't have the
    attribute\.

  - __attof__ *attr* *vals*

    Reduces the node set to nodes which which have an attribute named *attr*
    and where the value of that attribute is contained in the list *vals* of
    legal values\. The contained\-in operator used here does glob matching \(using
    the attribute value as pattern\) and ignores the case of the attribute value,
    *but not* for the elements of *vals*\.

  - __attmatch__ *attr* *match*

    Same as __withatt__, but __string match__ is used as the "=="
    operator, and *match* is the pattern checked for\.

    *Note* that *match* is a interpreted as a partial argument *list* for
    __string match__\. This means that it is interpreted as a list containing
    the pattern, and the pattern element can be preceded by options understand
    by __string match__, like __\-nocase__\. This is especially important
    should the pattern contain spaces\. It has to be wrapped into a list for
    correct interpretation by this operator

## <a name='subsection6'></a>Attribute Mutators

These operators change node attributes within the underlying tree\. In other
words, all these operators have *side effects*\.

  - __set__ *attr* *val*

    Sets the attribute *attr* to the value *val*, for all nodes __N__ in
    the node set\. The operator will fail if a node does not have an attribute
    named *attr*\. The tree will be left in a partially modified state\.

  - __unset__ *attr*

    Unsets the attribute *attr*, for all nodes __N__ in the node set\. The
    operator will fail if a node does not have an attribute named *attr*\. The
    tree will be left in a partially modified state\.

## <a name='subsection7'></a>Attribute String Accessors

These operators retrieve the values of node attributes from the underlying tree\.
The collected results are stored in the node set, but are not actually nodes\.

In other words, they redefine the semantics of the node set stored by the query
object to contain non\-node data after their completion\.

The query interpreter will terminate after it has finished processing one of
these operators, silently discarding any later query elements\. It also means
that our talk about maintenance of a node set is not quite true\. It is a node
set while the interpreter is processing commands, but can be left as an
attribute value set at the end of query processing\.

  - __string__ *op* *attr*

    Applies the string operator *op* to the attribute named *attr*, for all
    nodes __N__ in the node set, collects the results of that application
    and places them into the node set\.

    The operator will fail if a node does not have an attribute named *attr*\.

    The argument *op* is interpreted as partial argument list for the builtin
    command __[string](\.\./\.\./\.\./\.\./index\.md\#string)__\. Its first word
    has to be any of the sub\-commands understood by
    __[string](\.\./\.\./\.\./\.\./index\.md\#string)__\. This has to be followed
    by all arguments required for the subcommand, except the last\. that last
    argument is supplied by the attribute value\.

  - __get__ *pattern*

    For all nodes __N__ in the node set it determines all their attributes
    with names matching the glob *pattern*, then the values of these
    attributes, at last it replaces the node set with the list of these
    attribute values\.

  - __attlist__

    This is a convenience definition for the operator __getvals \*__\. In
    other words, it replaces the node set with a list of the attribute values
    for all attributes for all nodes __N__ in the node set\.

  - __attrs__ *glob*

    Replaces the current node set with a list of attribute lists, one attribute
    list per for all nodes __N__ in the node set\.

  - __attval__ *attname*

    Reduces the current node set with the operator __hasatt__, and then
    replaces it with a list containing the values of the attribute named
    *attname* for all nodes __N__ in the node set\.

## <a name='subsection8'></a>Sub\-queries

Sub\-queries yield node sets which are then used to augment, reduce or replace
the current node set\.

  - __andq__ *query*

    Replaces the node set with the set\-intersection of the node set generated by
    the sub\-query *query* and itself\.

    The execution of the sub\-query uses the current node set as its own initial
    node set\.

  - __orq__ *query*

    Replaces the node set with the set\-union of the node set generated by the
    sub\-query *query* and itself\. Duplicate nodes are removed\.

    The execution of the sub\-query uses the current node set as its own initial
    node set\.

  - __notq__ *query*

    Replaces the node set with the set of nodes generated by the sub\-query
    *query* which are also not in the current node set\. In other word the set
    difference of itself and the node set generated by the sub\-query\.

    The execution of the sub\-query uses the current node set as its own initial
    node set\.

## <a name='subsection9'></a>Node Set Operators

These operators change the node set directly, without referring to the tree\.

  - __unique__

    Removes duplicate nodes from the node set, preserving order\. In other words,
    the earliest occurrence of a node handle is preserved, every other
    occurrence is removed\.

  - __select__

    Replaces the current node set with a node set containing only the first node
    from the current node set

  - __transform__ *query* *var* *body*

    First it interprets the sub\-query *query*, using the current node set as
    its initial node set\. Then it iterates over the result of that query,
    binding the handle of each node to the variable named in *var*, and
    executing the script *body*\. The collected results of these executions is
    made the new node set, replacing the current one\.

    The script *body* is executed in the context of the caller\.

  - __map__ *var* *body*

    Iterates over the current node set, binding the handle of each node to the
    variable named in *var*, and executing the script *body*\. The collected
    results of these executions is made the new node set, replacing the current
    one\.

    The script *body* is executed in the context of the caller\.

  - __quote__ *val*

    Appends the literal value *val* to the current node set\.

  - __replace__ *val*

    Replaces the current node set with the literal list value *val*\.

## <a name='subsection10'></a>Node Set Iterators

  - __foreach__ *query* *var* *body*

    Interprets the sub\-query *query*, then performs the equivalent of operator
    __over__ on the nodes in the node set created by that query\. The current
    node set is not changed, except through side effects from the script
    *body*\.

    The script *body* is executed in the context of the caller\.

  - __with__ *query* *body*

    Interprets the *query*, then runs the script *body* on the node set
    generated by the query\. At last it restores the current node set as it was
    before the execution of the query\.

    The script *body* is executed in the context of the caller\.

  - __over__ *var* *body*

    Executes the script *body* for each node in the node set, with the
    variable named by *var* bound to the name of the current node\. The script
    *body* is executed in the context of the caller\.

    This is like the builtin
    __[foreach](\.\./\.\./\.\./\.\./index\.md\#foreach)__, with the node set as
    the source of the list to iterate over\.

    The results of executing the *body* are ignored\.

  - __delete__

    Deletes all the nodes contained in the current node set from the tree\.

## <a name='subsection11'></a>Typed node support

These filters and accessors assume the existence of an attribute called
__@type__, and are short\-hand forms useful for cost\-like tree query, html
tree editing, and so on\.

  - __nodetype__

    Returns the node type of nodes\. Attribute string accessor\. This is
    equivalent to

        get @type

  - __oftype__ *t*

    Reduces the node set to nodes whose type is equal to *t*, with letter case
    ignored\.

  - __nottype__ *t*

    Reduces the node set to nodes whose type is not equal to *t*, with letter
    case ignored\.

  - __oftypes__ *attrs*

    Reduces set to nodes whose @type is an element in the list *attrs* of
    types\. The value of @type is used as a glob pattern, and letter case is
    relevant\.

# <a name='section4'></a>Examples

\.\.\. TODO \.\.\.

# <a name='section5'></a>References

  1. [COST](http://wiki\.tcl\.tk/COST) on the Tcler's Wiki\.

  1. [TreeQL](http://wiki\.tcl\.tk/treeql) on the Tcler's Wiki\. Discuss this
     package there\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *treeql* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Cost](\.\./\.\./\.\./\.\./index\.md\#cost), [DOM](\.\./\.\./\.\./\.\./index\.md\#dom),
[TreeQL](\.\./\.\./\.\./\.\./index\.md\#treeql),
[XPath](\.\./\.\./\.\./\.\./index\.md\#xpath), [XSLT](\.\./\.\./\.\./\.\./index\.md\#xslt),
[structured queries](\.\./\.\./\.\./\.\./index\.md\#structured\_queries),
[tree](\.\./\.\./\.\./\.\./index\.md\#tree), [tree query
language](\.\./\.\./\.\./\.\./index\.md\#tree\_query\_language)

# <a name='category'></a>CATEGORY

Data structures

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004 Colin McCormack <coldstore@users\.sourceforge\.net>  
Copyright &copy; 2004 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/try/tcllib_throw.md.

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
89
90
91

[//000000001]: # (throw \- Forward compatibility implementation of \[throw\])
[//000000002]: # (Generated from file 'tcllib\_throw\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2015 Miguel Martínez López, BSD licensed)
[//000000004]: # (throw\(n\) 1 tcllib "Forward compatibility implementation of \[throw\]")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

throw \- throw \- Throw an error exception with a message

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require throw ?1?  

[__::throw__ *error\_code* *error\_message*](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a forward\-compatibility implementation of Tcl 8\.6's throw
command \(TIP 329\), for Tcl 8\.5\. The code was directly pulled from Tcl 8\.6
revision ?, when try/finally was implemented as Tcl procedure instead of in C\.

  - <a name='1'></a>__::throw__ *error\_code* *error\_message*

    throw is merely a reordering of the arguments of the error command\. It
    throws an error with the indicated error code and error message\.

# <a name='section2'></a>EXAMPLES

> __throw__ \{MYERROR CODE\} "My error message"

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *try* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

error\(n\)

# <a name='keywords'></a>KEYWORDS

[error](\.\./\.\./\.\./\.\./index\.md\#error),
[return](\.\./\.\./\.\./\.\./index\.md\#return),
[throw](\.\./\.\./\.\./\.\./index\.md\#throw)

# <a name='category'></a>CATEGORY

Utility

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2015 Miguel Martínez López, BSD licensed
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































Deleted embedded/md/tcllib/files/modules/try/tcllib_try.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

[//000000001]: # (try \- Forward compatibility implementation of \[try\])
[//000000002]: # (Generated from file 'tcllib\_try\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008 Donal K\. Fellows, BSD licensed)
[//000000004]: # (try\(n\) 1 tcllib "Forward compatibility implementation of \[try\]")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

try \- try \- Trap and process errors and exceptions

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [EXAMPLES](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require try ?1?  

[__::try__ *body* ?*handler\.\.\.*? ?__finally__ *script*?](#1)  

# <a name='description'></a>DESCRIPTION

This package provides a forward\-compatibility implementation of Tcl 8\.6's
try/finally command \(TIP 329\), for Tcl 8\.5\. The code was directly pulled from
Tcl 8\.6 revision ?, when try/finally was implemented as Tcl procedure instead of
in C\.

  - <a name='1'></a>__::try__ *body* ?*handler\.\.\.*? ?__finally__ *script*?

    This command executes the script *body* and, depending on what the outcome
    of that script is \(normal exit, error, or some other exceptional result\),
    runs a handler script to deal with the case\. Once that has all happened, if
    the __finally__ clause is present, the *script* it includes will be
    run and the result of the handler \(or the *body* if no handler matched\) is
    allowed to continue to propagate\. Note that the __finally__ clause is
    processed even if an error occurs and irrespective of which, if any,
    *handler* is used\.

    The *handler* clauses are each expressed as several words, and must have
    one of the following forms:

      * __on__ *code variableList script*

        This clause matches if the evaluation of *body* completed with the
        exception code *code*\. The *code* may be expressed as an integer or
        one of the following literal words: __ok__, __error__,
        __return__, __break__, or __continue__\. Those literals
        correspond to the integers 0 through 4 respectively\.

      * __trap__ *pattern variableList script*

        This clause matches if the evaluation of *body* resulted in an error
        and the prefix of the __\-errorcode__ from the interpreter's status
        dictionary is equal to the *pattern*\. The number of prefix words taken
        from the __\-errorcode__ is equal to the list\-length of *pattern*,
        and inter\-word spaces are normalized in both the __\-errorcode__ and
        *pattern* before comparison\.

        The *variableList* word in each *handler* is always interpreted as a
        list of variable names\. If the first word of the list is present and
        non\-empty, it names a variable into which the result of the evaluation
        of *body* \(from the main __try__\) will be placed; this will
        contain the human\-readable form of any errors\. If the second word of the
        list is present and non\-empty, it names a variable into which the
        options dictionary of the interpreter at the moment of completion of
        execution of *body* will be placed\.

        The *script* word of each *handler* is also always interpreted the
        same: as a Tcl script to evaluate if the clause is matched\. If
        *script* is a literal __\-__ and the *handler* is not the last
        one, the *script* of the following *handler* is invoked instead
        \(just like with the __switch__ command\)\.

        Note that *handler* clauses are matched against in order, and that the
        first matching one is always selected\. At most one *handler* clause
        will selected\. As a consequence, an __on error__ will mask any
        subsequent __trap__ in the __try__\. Also note that __on
        error__ is equivalent to __trap \{\}__\.

        If an exception \(i\.e\. any non\-__ok__ result\) occurs during the
        evaluation of either the *handler* or the __finally__ clause, the
        original exception's status dictionary will be added to the new
        exception's status dictionary under the __\-during__ key\.

# <a name='section2'></a>EXAMPLES

Ensure that a file is closed no matter what:

> set f \[open /some/file/name a\]  
> __try__ \{  
> &nbsp;&nbsp;&nbsp;&nbsp;puts \\$f "some message"  
> &nbsp;&nbsp;&nbsp;&nbsp;\# \.\.\.  
> \} __finally__ \{  
> &nbsp;&nbsp;&nbsp;&nbsp;close \\$f  
> \}

Handle different reasons for a file to not be openable for reading:

> __try__ \{  
> &nbsp;&nbsp;&nbsp;&nbsp;set f \[open /some/file/name\]  
> \} __trap__ \{POSIX EISDIR\} \{\} \{  
> &nbsp;&nbsp;&nbsp;&nbsp;puts "failed to open /some/file/name: it's a directory"  
> \} __trap__ \{POSIX ENOENT\} \{\} \{  
> &nbsp;&nbsp;&nbsp;&nbsp;puts "failed to open /some/file/name: it doesn't exist"  
> \}

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *try* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

catch\(n\), error\(n\), return\(n\), [throw\(n\)](tcllib\_throw\.md)

# <a name='keywords'></a>KEYWORDS

[cleanup](\.\./\.\./\.\./\.\./index\.md\#cleanup),
[error](\.\./\.\./\.\./\.\./index\.md\#error),
[exception](\.\./\.\./\.\./\.\./index\.md\#exception),
[final](\.\./\.\./\.\./\.\./index\.md\#final), [resource
management](\.\./\.\./\.\./\.\./index\.md\#resource\_management)

# <a name='category'></a>CATEGORY

Utility

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008 Donal K\. Fellows, BSD licensed
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/udpcluster/udpcluster.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

[//000000001]: # (udpcluster \- Lightweight UDP based tool for cluster node discovery)
[//000000002]: # (Generated from file 'udpcluster\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2016\-2018 Sean Woods <yoda@etoyoc\.com>)
[//000000004]: # (udpcluster\(n\) 0\.3\.3 tcllib "Lightweight UDP based tool for cluster node discovery")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

udpcluster \- UDP Peer\-to\-Peer cluster

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Bugs, Ideas, Feedback](#section2)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require udpcluster ?0\.3\.3?  
package require ip  
package require nettool  
package require comm  
package require interp  
package require dicttool  
package require cron  

# <a name='description'></a>DESCRIPTION

This package is a lightweight alternative to Zeroconf\. It utilizes UDP packets
to populate a table of services provided by each node on a local network\. Each
participant broadcasts a key/value list in plain UTF\-8 which lists what ports
are open, and what protocols are expected on those ports\. Developers are free to
add any additional key/value pairs beyond those\.

Using udpcluster\.

For every service you wish to publish invoke:

    cluster::publish echo@[cluster::macid] {port 10000 protocol echo}

To query what services are available on the local network:

    set results [cluster::search PATTERN]
    # And inside that result...
    echo@LOCALMACID {
       port 10000
       protocol echo
    }

To unpublish a service:

    cluster::unpublish echo@[cluster::macid]

Results will Historical Notes:

This tool was originally known as nns::cluster, but as development progressed,
it was clear that it wasn't interacting with any of the other facilities in NNS\.

# <a name='section2'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *nameserv* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[name service](\.\./\.\./\.\./\.\./index\.md\#name\_service),
[server](\.\./\.\./\.\./\.\./index\.md\#server)

# <a name='category'></a>CATEGORY

Networking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2016\-2018 Sean Woods <yoda@etoyoc\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































Deleted embedded/md/tcllib/files/modules/uev/uevent.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228

[//000000001]: # (uevent \- User events)
[//000000002]: # (Generated from file 'uevent\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2012 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (uevent\(n\) 0\.3\.1 tcllib "User events")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

uevent \- User events

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require uevent ?0\.3\.1?  
package require logger  

[__::uevent::bind__ *tag* *event* *command*](#1)  
[__[command](\.\./\.\./\.\./\.\./index\.md\#command)__ *tag* *event* *details*](#2)  
[__::uevent::unbind__ *token*](#3)  
[__::uevent::generate__ *tag* *event* ?*details*?](#4)  
[__::uevent::list__](#5)  
[__::uevent::list__ *tag*](#6)  
[__::uevent::list__ *tag* *event*](#7)  
[__::uevent::watch::tag::add__ *pattern* *command*](#8)  
[__\{\*\}command__ __bound__ *tag*](#9)  
[__\{\*\}command__ __unbound__ *tag*](#10)  
[__::uevent::watch::tag::remove__ *token*](#11)  
[__::uevent::watch::event::add__ *tag\_pattern* *event\_pattern* *command*](#12)  
[__\{\*\}command__ __bound__ *tag* *event*](#13)  
[__\{\*\}command__ __unbound__ *tag* *event*](#14)  
[__::uevent::watch::event::remove__ *token*](#15)  

# <a name='description'></a>DESCRIPTION

This package provides a general facility for the handling of user events\. Allows
the binding of arbitrary commands to arbitrary events on arbitrary tags, removal
of bindings, and event generation\.

The main difference to the event system built into the Tcl/Tk core is that the
latter can generate only virtual events, and only for widgets\. It is not
possible to use the builtin facilities to bind to events on arbitrary
\(pseudo\-\)objects, nor is it able to generate events for such\.

Here we can, by assuming that each object in question is represented by its own
tag\. Which is possible as we allow arbitrary tags\.

More differences:

  1. The package uses only a two\-level hierarchy, tags and events, to handle
     everything, whereas the Tcl/Tk system uses three levels, i\.e\. objects,
     tags, and events, with a n:m relationship between objects and tags\.

  1. This package triggers all bound commands for a tag/event combination, and
     they are independent of each other\. A bound command cannot force the event
     processing core to abort the processing of command coming after it\.

# <a name='section2'></a>API

The package exports eight commands, as specified below\. Note that when the
package is used from within Tcl 8\.5\+ all the higher commands are ensembles, i\.e\.
the :: separators can be replaceed by spaces\.

  - <a name='1'></a>__::uevent::bind__ *tag* *event* *command*

    Using this command registers the *command* prefix to be triggered when the
    *event* occurs for the *tag*\. The result of the command is an opaque
    token representing the binding\. Note that if the same combination of
    <*tag*,*event*,*command*> is used multiple times the same token is
    returned by every call\.

    The signature of the *command* prefix is

      * <a name='2'></a>__[command](\.\./\.\./\.\./\.\./index\.md\#command)__ *tag* *event* *details*

    where *details* contains the argument\(s\) of the event\. Its contents are
    event specific and have to be agreed upon between actual event generator and
    consumer\. This package simply transfers the information and does not perform
    any processing beyond that\.

  - <a name='3'></a>__::uevent::unbind__ *token*

    This command releases the event binding represented by the *token*\. The
    token has to be the result of a call to __::uevent::bind__\. The result
    of the command is the empty string\.

  - <a name='4'></a>__::uevent::generate__ *tag* *event* ?*details*?

    This command generates an *event* for the *tag*, triggering all commands
    bound to that combination\. The *details* argument is simply passed
    unchanged to all event handlers\. It is the responsibility of the code
    generating and consuming the event to have an agreement about the format and
    contents of the information carried therein\. The result of the command is
    the empty string\.

    Note that all bound commands are triggered, independently of each other\. The
    event handlers cannot assume a specific order\. They are also *not* called
    synchronously with the invokation of this command, but simply put into the
    event queue for processing when the system returns to the event loop\.

    Generating an event for an unknown tag, or for a <*tag*,*event*>
    combination which has no commands bound to it is allowed, such calls will be
    ignored\.

  - <a name='5'></a>__::uevent::list__

    In this form the command returns a list containing the names of all tags
    which have events with commands bound to them\.

  - <a name='6'></a>__::uevent::list__ *tag*

    In this format the command returns a list containing the names of all events
    for the *tag* with commands bound to them\. Specifying an unknown tag, i\.e\.
    a tag without event and commands, will cause the command to throw an error\.

  - <a name='7'></a>__::uevent::list__ *tag* *event*

    In this format the command returns a list containing all commands bound to
    the *event* for the *tag*\. Specifying an unknown tag or unknown event,
    will cause the command to throw an error\.

  - <a name='8'></a>__::uevent::watch::tag::add__ *pattern* *command*

    This command sets up a sort of reverse events\. Events generated, i\.e\. the
    *command* prefix invoked, when observers bind to and unbind from specific
    tags\.

    Note that the command prefix is only invoked twice per tag, first when the
    first command is bound to any event of the tag, and second when the last
    command bound to the tag is removed\.

    The signature of the *command* prefix is

      * <a name='9'></a>__\{\*\}command__ __bound__ *tag*

      * <a name='10'></a>__\{\*\}command__ __unbound__ *tag*

    The result of the command is a token representing the watcher\.

  - <a name='11'></a>__::uevent::watch::tag::remove__ *token*

    This command removes a watcher for \(un\)bind events on tags\.

    The result of the command is the empty string\.

  - <a name='12'></a>__::uevent::watch::event::add__ *tag\_pattern* *event\_pattern* *command*

    This command sets up a sort of reverse events\. Events generated, i\.e\. the
    *command* prefix invoked, when observers bind to and unbind from specific
    combinations of tags and events\.

    Note that the command prefix is only invoked twice per tag/event
    combination, first when the first command is bound to it, and second when
    the last command bound to the it is removed\.

    The signature of the *command* prefix is

      * <a name='13'></a>__\{\*\}command__ __bound__ *tag* *event*

      * <a name='14'></a>__\{\*\}command__ __unbound__ *tag* *event*

    The result of the command is a token representing the watcher\.

  - <a name='15'></a>__::uevent::watch::event::remove__ *token*

    This command removes a watcher for \(un\)bind events on tag/event
    combinations\.

    The result of the command is the empty string\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *uevent* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[hook\(n\)](\.\./hook/hook\.md)

# <a name='keywords'></a>KEYWORDS

[bind](\.\./\.\./\.\./\.\./index\.md\#bind), [event](\.\./\.\./\.\./\.\./index\.md\#event),
[generate event](\.\./\.\./\.\./\.\./index\.md\#generate\_event),
[hook](\.\./\.\./\.\./\.\./index\.md\#hook), [unbind](\.\./\.\./\.\./\.\./index\.md\#unbind)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2012 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/uev/uevent_onidle.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104

[//000000001]: # (uevent::onidle \- User events)
[//000000002]: # (Generated from file 'uevent\_onidle\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (uevent::onidle\(n\) 0\.1 tcllib "User events")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

uevent::onidle \- Request merging and deferal to idle time

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Examples](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require uevent::onidle ?0\.1?  
package require logger  

[__::uevent::onidle__ *objectName* *commandprefix*](#1)  
[*objectName* __request__](#2)  

# <a name='description'></a>DESCRIPTION

This package provides objects which can merge multiple requestes for an action
and execute the action the moment the system \(event loop\) becomes idle\. The
action to be run is configured during object construction\.

# <a name='section2'></a>API

The package exports a class, __uevent::onidle__, as specified below\.

  - <a name='1'></a>__::uevent::onidle__ *objectName* *commandprefix*

    The command creates a new *onidle* object with an associated global Tcl
    command whose name is *objectName*\. This command may be used to invoke
    various operations on the object\.

    The *commandprefix* is the action to perform when the event loop is idle
    and the user asked for it using the method __request__ \(See below\)\.

The object commands created by the class commands above have the form:

  - <a name='2'></a>*objectName* __request__

    This method requests the execution of the command prefix specified during
    the construction of *objectName* the next time the event loop is idle\.
    Multiple requests are merged and cause only one execution of the command
    prefix\.

# <a name='section3'></a>Examples

Examples of this type of deferal are buried in the \(C\-level\) implementations all
the Tk widgets, defering geometry calculations and window redraw activity in
this manner\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *uevent* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[callback](\.\./\.\./\.\./\.\./index\.md\#callback),
[deferal](\.\./\.\./\.\./\.\./index\.md\#deferal),
[event](\.\./\.\./\.\./\.\./index\.md\#event), [idle](\.\./\.\./\.\./\.\./index\.md\#idle),
[merge](\.\./\.\./\.\./\.\./index\.md\#merge),
[on\-idle](\.\./\.\./\.\./\.\./index\.md\#on\_idle)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































Deleted embedded/md/tcllib/files/modules/units/units.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394

[//000000001]: # (units \- Convert and manipulate quantities with units)
[//000000002]: # (Generated from file 'units\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2000\-2005 Mayo Foundation)
[//000000004]: # (units\(n\) 1\.2 tcllib "Convert and manipulate quantities with units")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

units \- unit conversion

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [UNIT STRING FORMAT](#section3)

      - [Example Valid Unit Strings](#subsection1)

  - [SI UNITS](#section4)

      - [SI Base Units](#subsection2)

      - [SI Derived Units with Special Names](#subsection3)

      - [SI Prefixes](#subsection4)

      - [Non\-SI Units](#subsection5)

      - [Quantities and Derived Units with Special Names](#subsection6)

  - [REFERENCES](#section5)

  - [AUTHORS](#section6)

  - [Bugs, Ideas, Feedback](#section7)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.1  
package require units ?2\.1?  

[__::units::convert__ *value* *targetUnits*](#1)  
[__::units::reduce__ *unitString*](#2)  
[__::units::new__ *name* *baseUnits*](#3)  

# <a name='description'></a>DESCRIPTION

This library provides a conversion facility from a variety of scientific and
engineering shorthand notations into floating point numbers\. This allows
application developers to easily convert values with different units into
uniformly scaled numbers\.

The units conversion facility is also able to convert between compatible units\.
If, for example, a application is expecting a value in *ohms* \(Resistance\),
and the user specifies units of *milliwebers/femtocoulomb*, the conversion
routine will handle it appropriately\. An error will be generated if an incorrect
conversion is attempted\.

Values are scaled from one set of units to another by dimensional analysis\. Both
the value units and the target units are reduced into primitive units and a
scale factor\. Units are checked for compatibility, and the scale factors are
applied by multiplication and division\. This technique is extremely flexible and
quite robust\.

New units and new unit abbreviations can be defined in terms of existing units
and abbreviations\. It is also possible to define a new primitive unit, although
that will probably be unnecessary\. New units will most commonly be defined to
accommodate non\-SI measurement systems, such as defining the unit *inch* as
*2\.54 cm*\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::units::convert__ *value* *targetUnits*

    Converts the *value* string into a floating point number, scaled to the
    specified *targetUnits*\. The *value* string may contain a number and
    units\. If units are specified, then they must be compatible with the
    *targetUnits*\. If units are not specified for the *value*, then it will
    be scaled to the target units\. For example,

        % ::units::convert "2.3 miles" km
        3.7014912
        % ::units::convert 300m/s miles/hour
        671.080887616
        % ::units::convert "1.0 m kg/s^2" newton
        1.0
        % ::units::convert 1.0 millimeter
        1000.0

  - <a name='2'></a>__::units::reduce__ *unitString*

    Returns a unit string consisting of a scale factor followed by a space
    separated list of sorted and reduced primitive units\. The reduced unit
    string may include a forward\-slash \(separated from the surrounding primitive
    subunits by spaces\) indicating that the remaining subunits are in the
    denominator\. Generates an error if the *unitString* is invalid\.

        % ::units::reduce pascal
        1000.0 gram / meter second second

  - <a name='3'></a>__::units::new__ *name* *baseUnits*

    Creates a new unit conversion with the specified name\. The new unit *name*
    must be only alphabetic \(upper or lower case\) letters\. The *baseUnits*
    string can consist of any valid units conversion string, including constant
    factors, numerator and denominator parts, units with prefixes, and
    exponents\. The baseUnits may contain any number of subunits, but it must
    reduce to primitive units\. BaseUnits could also be the string *\-primitive*
    to represent a new kind of quantity which cannot be derived from other
    units\. But you probably would not do that unless you have discovered some
    kind of new universal property\.

        % ::units::new furlong "220 yards"
        % ::units::new fortnight "14 days"
        % ::units::convert 100m/s furlongs/fortnight
        601288.475303

# <a name='section3'></a>UNIT STRING FORMAT

Value and unit string format is quite flexible\. It is possible to define
virtually any combination of units, prefixes, and powers\. Valid unit strings
must conform to these rules\.

  - A unit string consists of an optional scale factor followed by zero or more
    subunits\. The scale factor must be a valid floating point number, and may or
    may not be separated from the subunits\. The scale factor could be negative\.

  - Subunits are separated form each other by one or more separator characters,
    which are space \(" "\), hyphen \("\-"\), asterisk \("\*"\), and forward\-slash
    \("/"\)\. Sure, go ahead and complain about using a minus sign \("\-"\) to
    represent multiplication\. It just isn't sound mathematics, and, by rights,
    we should require everyone to use the asterisk \("\*"\) to separate all units\.
    But the bottom line is that complex unit strings like *m\-kg/s^2* are
    pleasantly readable\.

  - The forward\-slash seperator \("/"\) indicates that following subunits are in
    the denominator\. There can be at most one forward\-slash separator\.

  - Subunits can be floating point scale factors, but with the exception of the
    leading scale factor, they must be surrounded by valid separators\. Subunit
    scale factors cannot be negative\. \(Remember that the hyphen is a unit
    separator\.\)

  - Subunits can be valid units or abbreviations\. They may include a prefix\.
    They may include a plural suffix "s" or "es"\. They may also include a power
    string denoted by a circumflex \("^"\), followed by a integer, after the unit
    name \(or plural suffix, if there is one\)\. Negative exponents are not
    allowed\. \(Remember that the hyphen is a unit separator\.\)

## <a name='subsection1'></a>Example Valid Unit Strings

    Unit String              Reduced Unit String
    ------------------------------------------------------------
    meter                    1.0 meter
    kilometer                1000.0 meter
    km                       1000.0 meter
    km/s                     1000.0 meter / second
    /microsecond             1000000.0 / second
    /us                      1000000.0 / second
    kg-m/s^2                 1000.0 gram meter / second second
    30second                 30.0 second
    30 second                30.0 second
    30 seconds               30.0 second
    200*meter/20.5*second    9.75609756098 meter / second

# <a name='section4'></a>SI UNITS

The standard SI units are predefined according to *NIST Special* *Publication
330* \. Standard units for both SI Base Units \(Table 1\) and SI Derived Units
with Special Names \(Tables 3a and 3b\) are included here for reference\. Each
standard unit name and abbreviation are included in this package\.

## <a name='subsection2'></a>SI Base Units

    Quantity                Unit Name    Abbr.
    ---------------------------------------------
    Length                  meter        m
    Mass                    kilogram     kg
    Time                    second       s
    Current                 ampere       A
    Temperature             kelvin       K
    Amount                  mole         mol
    Luminous Intensity      candela      cd

## <a name='subsection3'></a>SI Derived Units with Special Names

    Quantity                Unit Name    Abbr.   Units     Base Units
    --------------------------------------------------------------------
    plane angle             radian      rad     m/m       m/m
    solid angle             steradian   sr      m^2/m^2   m^2/m^2
    frequency               hertz       Hz                /s
    force                   newton      N                 m-kg/s^2
    pressure                pascal      Pa      N/m^2     kg/m-s^2
    energy, work            joule       J       N-m       m^2-kg/s^2
    power, radiant flux     watt        W       J/s       m^2-kg/s^3
    electric charge         coulomb     C                 s-A
    electric potential      volt        V       W/A       m^2-kg/s^3-A
    capacitance             farad       F       C/V       s^4-A^2/m^2-kg
    electric resistance     ohm                 V/A       m^2-kg/s^3-A^2
    electric conductance    siemens     S       A/V       s^3-A^2/m^2-kg
    magnetic flux           weber       Wb      V-s       m^2-kg/s^2-A
    magnetic flux density   tesla       T       Wb/m^2    kg/s^2-A
    inductance              henry       H       Wb/A      m^2-kg/s^2-A^2
    luminous flux           lumen       lm                cd-sr
    illuminance             lux         lx      lm/m^2    cd-sr/m^2
    activity (of a
    radionuclide)           becquerel   Bq                /s
    absorbed dose           gray        Gy      J/kg      m^2/s^2
    dose equivalent         sievert     Sv      J/kg      m^2/s^2

Note that the SI unit kilograms is actually implemented as grams because 1e\-6
kilogram = 1 milligram, not 1 microkilogram\. The abbreviation for Electric
Resistance \(ohms\), which is the omega character, is not supported\.

Also note that there is no support for Celsius or Farenheit temperature\. The
units conversion routines can only scale values with multiplication and
division, so it is not possible to convert from thermodynamic temperature
\(kelvins\) to absolute degrees Celsius or Farenheit\. Conversion of thermodynamic
quantities, such as thermal expansion \(per unit temperature\), however, are easy
to add to the units library\.

SI Units can have a multiple or sub\-multiple prefix\. The prefix or its
abbreviation should appear before the unit, without spaces\. Compound prefixes
are not allowed, and a prefix should never be used alone\. These prefixes are
defined in Table 5 of *Special Publication* *330* \.

## <a name='subsection4'></a>SI Prefixes

    Prefix Name     Abbr.   Factor
    ---------------------------------------
    yotta           Y       1e24
    zetta           Z       1e21
    exa             E       1e18
    peta            P       1e15
    tera            T       1e12
    giga            G       1e9
    mega            M       1e6
    kilo            k       1e3
    hecto           h       1e2
    deka            da      1e1
    deca                    1e1

    deci            d       1e-1
    centi           c       1e-2
    milli           m       1e-3
    micro           u       1e-6
    nano            n       1e-9
    pico            p       1e-12
    femto           f       1e-15
    atto            a       1e-18
    zepto           z       1e-21
    yocto           y       1e-24

Note that we define the same prefix with both the USA \("deka"\) and non\-USA
\("deca"\) spellings\. Also note that we take the liberty of allowing "micro" to be
typed as a "u" instead of the Greek character mu\.

Many non\-SI units are commonly used in applications\. Appendix B\.8 of *NIST
Special Publication 811* lists many non\-SI conversion factors\. It is not
possible to include all possible unit definitions in this package\. In some
cases, many different conversion factors exist for a given unit, depending on
the context\. \(The appendix lists over 40 conversions for British thermal units\!\)
Application specific conversions can always be added using the __new__
command, but some well known and often used conversions are included in this
package\.

## <a name='subsection5'></a>Non\-SI Units

    Unit Name            Abbr.    Base Units
    --------------------------------------------------
    angstrom                      1.0E-10 m
    astronomicalUnit     AU       1.495979E11 m
    atmosphere                    1.01325E5 Pa
    bar                           1.0E5 Pa
    calorie                       4.1868 J
    curie                         3.7E10 Bq
    day                           8.64E4 s
    degree                        1.745329E-2 rad
    erg                           1.0E-7 J
    faraday                       9.648531 C
    fermi                         1.0E-15 m
    foot                 ft       3.048E-1 m
    gauss                         1.0E-4 T
    gilbert                       7.957747E-1 A
    grain                gr       6.479891E-5 kg
    hectare              ha       1.0E4 m^2
    hour                 h        3.6E3 s
    inch                 in       2.54E-2 m
    lightYear                     9.46073E15 m
    liter                L        1.0E-3 m^3
    maxwell              Mx       1.0E-8 Wb
    mho                           1.0 S
    micron                        1.0E-6 m
    mil                           2.54E-5 m
    mile                 mi       1.609344E3 m
    minute               min      6.0E1 s
    parsec               pc       3.085E16 m
    pica                          4.233333E-3 m
    pound                lb       4.535924E-1 kg
    revolution                    6.283185 rad
    revolutionPerMinute  rpm      1.047198E-1 rad/s
    yard                 yd       9.144E-1 m
    year                          3.1536E7 s

## <a name='subsection6'></a>Quantities and Derived Units with Special Names

This units conversion package is limited specifically to unit reduction,
comparison, and scaling\. This package does not consider any of the quantity
names for either base or derived units\. A similar implementation or an extension
in a typed or object\-oriented language might introduce user defined types for
the quantities\. Quantity type checking could be used, for example, to ensure
that all *length* values properly reduced to *meters*, or that all
*velocity* values properly reduced to *meters/second*\.

A C implementation of this package has been created to work in conjunction with
the Simplified Wrapper Interface Generator
\([http://www\.swig\.org/](http://www\.swig\.org/)\)\. That package \(units\.i\)
exploits SWIG's typemap system to automatically convert script quantity strings
into floating point quantities\. Function arguments are specified as quantity
types \(e\.g\., *typedef float Length*\), and target units \(expected by the C
application code\) are specified in an associative array\. Default units are also
defined for each quantity type, and are applied to any unit\-less quantity
strings\.

A units system enhanced with quantity type checking might benefit from inclusion
of other derived types which are expressed in terms of special units, as
illustrated in Table 2 of *NIST Publication* *330* \. The quantity *area*,
for example, could be defined as units properly reducing to *meter^2*,
although the utility of defining a unit named *square meter* is arguable\.

# <a name='section5'></a>REFERENCES

The unit names, abbreviations, and conversion values are derived from those
published by the United States Department of Commerce Technology Administration,
National Institute of Standards and Technology \(NIST\) in *NIST Special
Publication 330: The International System of* *Units \(SI\)* and *NIST Special
Publication 811: Guide for* *the Use of the International System of Units
\(SI\)* \. Both of these publications are available \(as of December 2000\) from
[http://physics\.nist\.gov/cuu/Reference/contents\.html](http://physics\.nist\.gov/cuu/Reference/contents\.html)

The ideas behind implementation of this package is based in part on code written
in 1993 by Adrian Mariano which performed dimensional analysis of unit strings
using fixed size tables of C structs\. After going missing in the late 1990's,
Adrian's code has reappeared in the GNU Units program at
[http://www\.gnu\.org/software/units/](http://www\.gnu\.org/software/units/)

# <a name='section6'></a>AUTHORS

Robert W\. Techentin

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *units* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[angle](\.\./\.\./\.\./\.\./index\.md\#angle),
[constants](\.\./\.\./\.\./\.\./index\.md\#constants),
[conversion](\.\./\.\./\.\./\.\./index\.md\#conversion),
[distance](\.\./\.\./\.\./\.\./index\.md\#distance),
[radians](\.\./\.\./\.\./\.\./index\.md\#radians),
[unit](\.\./\.\./\.\./\.\./index\.md\#unit)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2000\-2005 Mayo Foundation
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/uri/uri.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522

[//000000001]: # (uri \- Tcl Uniform Resource Identifier Management)
[//000000002]: # (Generated from file 'uri\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (uri\(n\) 1\.2\.7 tcllib "Tcl Uniform Resource Identifier Management")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

uri \- URI utilities

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [SCHEMES](#section3)

  - [EXTENDING](#section4)

  - [QUIRK OPTIONS](#section5)

      - [BACKWARD COMPATIBILITY](#subsection1)

      - [NEW DESIGNS](#subsection2)

      - [DEFAULT VALUES](#subsection3)

  - [EXAMPLES](#section6)

  - [CREDITS](#section7)

  - [Bugs, Ideas, Feedback](#section8)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require uri ?1\.2\.7?  

[__uri::setQuirkOption__ *option* ?*value*?](#1)  
[__uri::split__ *url* ?*defaultscheme*?](#2)  
[__uri::join__ ?*key* *value*?\.\.\.](#3)  
[__uri::resolve__ *base* *url*](#4)  
[__uri::isrelative__ *url*](#5)  
[__uri::geturl__ *url* ?*options*\.\.\.?](#6)  
[__uri::canonicalize__ *uri*](#7)  
[__uri::register__ *schemeList* *script*](#8)  

# <a name='description'></a>DESCRIPTION

This package does two things\.

First, it provides a number of commands for manipulating URLs/URIs and fetching
data specified by them\. For fetching data this package analyses the requested
URL/URI and then dispatches it to the appropriate package
\(__[http](\.\./\.\./\.\./\.\./index\.md\#http)__,
__[ftp](\.\./ftp/ftp\.md)__, \.\.\.\) for actual retrieval\. Currently these
commands are defined for the schemes *[http](\.\./\.\./\.\./\.\./index\.md\#http)*,
*[https](\.\./\.\./\.\./\.\./index\.md\#https)*,
*[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)*,
*[mailto](\.\./\.\./\.\./\.\./index\.md\#mailto)*,
*[news](\.\./\.\./\.\./\.\./index\.md\#news)*,
*[ldap](\.\./\.\./\.\./\.\./index\.md\#ldap)*, *ldaps* and
*[file](\.\./\.\./\.\./\.\./index\.md\#file)*\. The package __uri::urn__ adds
scheme *[urn](\.\./\.\./\.\./\.\./index\.md\#urn)*\.

Second, it provides regular expressions for a number of __registered__
URL/URI schemes\. Registered schemes are currently
*[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)*,
*[ldap](\.\./\.\./\.\./\.\./index\.md\#ldap)*, *ldaps*,
*[file](\.\./\.\./\.\./\.\./index\.md\#file)*,
*[http](\.\./\.\./\.\./\.\./index\.md\#http)*,
*[https](\.\./\.\./\.\./\.\./index\.md\#https)*,
*[gopher](\.\./\.\./\.\./\.\./index\.md\#gopher)*,
*[mailto](\.\./\.\./\.\./\.\./index\.md\#mailto)*,
*[news](\.\./\.\./\.\./\.\./index\.md\#news)*,
*[wais](\.\./\.\./\.\./\.\./index\.md\#wais)* and
*[prospero](\.\./\.\./\.\./\.\./index\.md\#prospero)*\. The package __uri::urn__
adds scheme *[urn](\.\./\.\./\.\./\.\./index\.md\#urn)*\.

The commands of the package conform to RFC 3986
\([https://www\.rfc\-editor\.org/rfc/rfc3986\.txt](https://www\.rfc\-editor\.org/rfc/rfc3986\.txt)\),
with the exception of a loophole arising from RFC 1630 and described in RFC 3986
Sections 5\.2\.2 and 5\.4\.2\. The loophole allows a relative URI to include a scheme
if it is the same as the scheme of the base URI against which it is resolved\.
RFC 3986 recommends avoiding this usage\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__uri::setQuirkOption__ *option* ?*value*?

    __uri::setQuirkOption__ is an accessor command for a number of "quirk
    options"\. The command has the same semantics as the command
    __[set](\.\./\.\./\.\./\.\./index\.md\#set)__: when called with one argument
    it reads an existing value; with two arguments it writes a new value\. The
    value of a "quirk option" is boolean: the value __false__ requests
    conformance with RFC 3986, while __true__ requests use of the quirk\. See
    section [QUIRK OPTIONS](#section5) for discussion of the different
    options and their purpose\.

  - <a name='2'></a>__uri::split__ *url* ?*defaultscheme*?

    __uri::split__ takes a *url*, decodes it and then returns a list of
    key/value pairs suitable for __array set__ containing the constituents
    of the *url*\. If the scheme is missing from the *url* it defaults to the
    value of *defaultscheme* if it was specified, or
    *[http](\.\./\.\./\.\./\.\./index\.md\#http)* else\. Currently the schemes
    *[http](\.\./\.\./\.\./\.\./index\.md\#http)*,
    *[https](\.\./\.\./\.\./\.\./index\.md\#https)*,
    *[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)*,
    *[mailto](\.\./\.\./\.\./\.\./index\.md\#mailto)*,
    *[news](\.\./\.\./\.\./\.\./index\.md\#news)*,
    *[ldap](\.\./\.\./\.\./\.\./index\.md\#ldap)*, *ldaps* and
    *[file](\.\./\.\./\.\./\.\./index\.md\#file)* are supported by the package
    itself\. See section [EXTENDING](#section4) on how to expand that range\.

    The set of constituents of a URL \(= the set of keys in the returned
    dictionary\) is dependent on the scheme of the URL\. The only key which is
    therefore always present is __scheme__\. For the following schemes the
    constituents and their keys are known:

      * ftp

        __user__, __pwd__, __host__, __port__, __path__,
        __type__, __pbare__\. The pbare is optional\.

      * http\(s\)

        __user__, __pwd__, __host__, __port__, __path__,
        __query__, __fragment__, __pbare__\. The pbare is optional\.

      * file

        __path__, __host__\. The host is optional\.

      * mailto

        __user__, __host__\. The host is optional\.

      * ldap\(s\)

        __host__, __port__, __dn__, __attrs__, __scope__,
        __filter__, __extensions__

      * news

        Either __message\-id__ or __newsgroup\-name__\.

    For discussion of the boolean __pbare__ see options *NoInitialSlash*
    and *NoExtraKeys* in [QUIRK OPTIONS](#section5)\.

    The constituents are returned as slices of the argument *url*, without
    removal of percent\-encoding \("url\-encoding"\) or other adaptations\. Notably,
    on Windows® the __path__ in scheme
    *[file](\.\./\.\./\.\./\.\./index\.md\#file)* is not a valid local filename\. See
    [EXAMPLES](#section6) for more information\.

  - <a name='3'></a>__uri::join__ ?*key* *value*?\.\.\.

    __uri::join__ takes a list of key/value pairs \(generated by
    __uri::split__, for example\) and returns the canonical URL they
    represent\. Currently the schemes *[http](\.\./\.\./\.\./\.\./index\.md\#http)*,
    *[https](\.\./\.\./\.\./\.\./index\.md\#https)*,
    *[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)*,
    *[mailto](\.\./\.\./\.\./\.\./index\.md\#mailto)*,
    *[news](\.\./\.\./\.\./\.\./index\.md\#news)*,
    *[ldap](\.\./\.\./\.\./\.\./index\.md\#ldap)*, *ldaps* and
    *[file](\.\./\.\./\.\./\.\./index\.md\#file)* are supported by the package
    itself\. See section [EXTENDING](#section4) on how to expand that range\.

    The arguments are expected to be slices of a valid URL, with
    percent\-encoding \("url\-encoding"\) and any other necessary adaptations\.
    Notably, on Windows the __path__ in scheme
    *[file](\.\./\.\./\.\./\.\./index\.md\#file)* is not a valid local filename\. See
    [EXAMPLES](#section6) for more information\.

  - <a name='4'></a>__uri::resolve__ *base* *url*

    __uri::resolve__ resolves the specified *url* relative to *base*, in
    conformance with RFC 3986\. In other words: a non\-relative *url* is
    returned unchanged, whereas for a relative *url* the missing parts are
    taken from *base* and prepended to it\. The result of this operation is
    returned\. For an empty *url* the result is *base*, without its URI
    fragment \(if any\)\. The command is available for schemes
    *[http](\.\./\.\./\.\./\.\./index\.md\#http)*,
    *[https](\.\./\.\./\.\./\.\./index\.md\#https)*,
    *[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)*, and
    *[file](\.\./\.\./\.\./\.\./index\.md\#file)*\.

  - <a name='5'></a>__uri::isrelative__ *url*

    __uri::isrelative__ determines whether the specified *url* is absolute
    or relative\. The command is available for a *url* of any scheme\.

  - <a name='6'></a>__uri::geturl__ *url* ?*options*\.\.\.?

    __uri::geturl__ decodes the specified *url* and then dispatches the
    request to the package appropriate for the scheme found in the URL\. The
    command assumes that the package to handle the given scheme either has the
    same name as the scheme itself \(including possible capitalization\) followed
    by __::geturl__, or, in case of this failing, has the same name as the
    scheme itself \(including possible capitalization\)\. It further assumes that
    whatever package was loaded provides a __geturl__\-command in the
    namespace of the same name as the package itself\. This command is called
    with the given *url* and all given *options*\. Currently __geturl__
    does not handle any options itself\.

    *Note:* *[file](\.\./\.\./\.\./\.\./index\.md\#file)*\-URLs are an exception to
    the rule described above\. They are handled internally\.

    It is not possible to specify results of the command\. They depend on the
    __geturl__\-command for the scheme the request was dispatched to\.

  - <a name='7'></a>__uri::canonicalize__ *uri*

    __uri::canonicalize__ returns the canonical form of a URI\. The canonical
    form of a URI is one where relative path specifications, i\.e\. "\." and "\.\.",
    have been resolved\. The command is available for all URI schemes that have
    __uri::split__ and __uri::join__ commands\. The command returns a
    canonicalized URI if the URI scheme has a __path__ component \(i\.e\.
    *[http](\.\./\.\./\.\./\.\./index\.md\#http)*,
    *[https](\.\./\.\./\.\./\.\./index\.md\#https)*,
    *[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)*, and
    *[file](\.\./\.\./\.\./\.\./index\.md\#file)*\)\. For schemes that have
    __uri::split__ and __uri::join__ commands but no __path__
    component \(i\.e\. *[mailto](\.\./\.\./\.\./\.\./index\.md\#mailto)*,
    *[news](\.\./\.\./\.\./\.\./index\.md\#news)*,
    *[ldap](\.\./\.\./\.\./\.\./index\.md\#ldap)*, and *ldaps*\), the command
    returns the *uri* unchanged\.

  - <a name='8'></a>__uri::register__ *schemeList* *script*

    __uri::register__ registers the first element of *schemeList* as a new
    scheme and the remaining elements as aliases for this scheme\. It creates the
    namespace for the scheme and executes the *script* in the new namespace\.
    The script has to declare variables containing regular expressions relevant
    to the scheme\. At least the variable __schemepart__ has to be declared
    as that one is used to extend the variables keeping track of the registered
    schemes\.

# <a name='section3'></a>SCHEMES

In addition to the commands mentioned above this package provides regular
expression to recognize URLs for a number of URL schemes\.

For each supported scheme a namespace of the same name as the scheme itself is
provided inside of the namespace *uri* containing the variable __url__
whose contents are a regular expression to recognize URLs of that scheme\.
Additional variables may contain regular expressions for parts of URLs for that
scheme\.

The variable __uri::schemes__ contains a list of all registered schemes\.
Currently these are *[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)*,
*[ldap](\.\./\.\./\.\./\.\./index\.md\#ldap)*, *ldaps*,
*[file](\.\./\.\./\.\./\.\./index\.md\#file)*,
*[http](\.\./\.\./\.\./\.\./index\.md\#http)*,
*[https](\.\./\.\./\.\./\.\./index\.md\#https)*,
*[gopher](\.\./\.\./\.\./\.\./index\.md\#gopher)*,
*[mailto](\.\./\.\./\.\./\.\./index\.md\#mailto)*,
*[news](\.\./\.\./\.\./\.\./index\.md\#news)*,
*[wais](\.\./\.\./\.\./\.\./index\.md\#wais)* and
*[prospero](\.\./\.\./\.\./\.\./index\.md\#prospero)*\.

# <a name='section4'></a>EXTENDING

Extending the range of schemes supported by __uri::split__ and
__uri::join__ is easy because both commands do not handle the request by
themselves but dispatch it to another command in the *uri* namespace using the
scheme of the URL as criterion\.

__uri::split__ and __uri::join__ call __Split\[string totitle
<scheme>\]__ and __Join\[string totitle <scheme>\]__ respectively\.

The provision of split and join commands is sufficient to extend the commands
__uri::canonicalize__ and __uri::geturl__ \(the latter subject to the
availability of a suitable package with a __geturl__ command\)\. In contrast,
to extend the command __uri::resolve__ to a new scheme, the command itself
must be modified\.

To extend the range of schemes for which pattern information is available, use
the command __uri::register__\.

An example of a package that provides both commands and pattern information for
a new scheme is __uri::urn__, which adds scheme
*[urn](\.\./\.\./\.\./\.\./index\.md\#urn)*\.

# <a name='section5'></a>QUIRK OPTIONS

The value of a "quirk option" is boolean: the value __false__ requests
conformance with RFC 3986, while __true__ requests use of the quirk\. Use
command __uri::setQuirkOption__ to access the values of quirk options\.

Quirk options are useful both for allowing backwards compatibility when a
command specification changes, and for adding useful features that are not
included in RFC specifications\. The following quirk options are currently
defined:

  - *NoInitialSlash*

    This quirk option concerns the leading character of __path__ \(if
    non\-empty\) in the schemes *[http](\.\./\.\./\.\./\.\./index\.md\#http)*,
    *[https](\.\./\.\./\.\./\.\./index\.md\#https)*, and
    *[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)*\.

    RFC 3986 defines __path__ in an absolute URI to have an initial "/",
    unless the value of __path__ is the empty string\. For the scheme
    *[file](\.\./\.\./\.\./\.\./index\.md\#file)*, all versions of package
    __uri__ follow this rule\. The quirk option *NoInitialSlash* does not
    apply to scheme *[file](\.\./\.\./\.\./\.\./index\.md\#file)*\.

    For the schemes *[http](\.\./\.\./\.\./\.\./index\.md\#http)*,
    *[https](\.\./\.\./\.\./\.\./index\.md\#https)*, and
    *[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)*, versions of __uri__ before
    1\.2\.7 define the __path__ *NOT* to include an initial "/"\. When the
    quirk option *NoInitialSlash* is __true__ \(the default\), this behavior
    is also used in version 1\.2\.7\. To use instead values of __path__ as
    defined by RFC 3986, set this quirk option to __false__\.

    This setting does not affect RFC 3986 conformance\. If *NoInitialSlash* is
    __true__, then the value of __path__ in the schemes
    *[http](\.\./\.\./\.\./\.\./index\.md\#http)*,
    *[https](\.\./\.\./\.\./\.\./index\.md\#https)*, or
    *[ftp](\.\./\.\./\.\./\.\./index\.md\#ftp)*, cannot distinguish between URIs in
    which the full "RFC 3986 path" is the empty string "" or a single slash "/"
    respectively\. The missing information is recorded in an additional
    __uri::split__ key __pbare__\.

    The boolean __pbare__ is defined when quirk options *NoInitialSlash*
    and *NoExtraKeys* have values __true__ and __false__ respectively\.
    In this case, if the value of __path__ is the empty string "",
    __pbare__ is __true__ if the full "RFC 3986 path" is "", and
    __pbare__ is __false__ if the full "RFC 3986 path" is "/"\.

    Using this quirk option *NoInitialSlash* is a matter of preference\.

  - *NoExtraKeys*

    This quirk option permits full backward compatibility with versions of
    __uri__ before 1\.2\.7, by omitting the __uri::split__ key
    __pbare__ described above \(see quirk option *NoInitialSlash*\)\. The
    outcome is greater backward compatibility of the __uri::split__ command,
    but an inability to distinguish between URIs in which the full "RFC 3986
    path" is the empty string "" or a single slash "/" respectively \- i\.e\. a
    minor non\-conformance with RFC 3986\.

    If the quirk option *NoExtraKeys* is __false__ \(the default\), command
    __uri::split__ returns an additional key __pbare__, and the commands
    comply with RFC 3986\. If the quirk option *NoExtraKeys* is __true__,
    the key __pbare__ is not defined and there is not full conformance with
    RFC 3986\.

    Using the quirk option *NoExtraKeys* is *NOT* recommended, because if
    set to __true__ it will reduce conformance with RFC 3986\. The option is
    included only for compatibility with code, written for earlier versions of
    __uri__, that needs values of __path__ without a leading "/", *AND
    ALSO* cannot tolerate unexpected keys in the results of __uri::split__\.

  - *HostAsDriveLetter*

    When handling the scheme *[file](\.\./\.\./\.\./\.\./index\.md\#file)* on the
    Windows platform, versions of __uri__ before 1\.2\.7 use the __host__
    field to represent a Windows drive letter and the colon that follows it, and
    the __path__ field to represent the filename path after the colon\. Such
    URIs are invalid, and are not recognized by any RFC\. When the quirk option
    *HostAsDriveLetter* is __true__, this behavior is also used in version
    1\.2\.7\. To use *[file](\.\./\.\./\.\./\.\./index\.md\#file)* URIs on Windows that
    conform to RFC 3986, set this quirk option to __false__ \(the default\)\.

    Using this quirk is *NOT* recommended, because if set to __true__ it
    will cause the __uri__ commands to expect and produce invalid URIs\. The
    option is included only for compatibility with legacy code\.

  - *RemoveDoubleSlashes*

    When a URI is canonicalized by __uri::canonicalize__, its __path__
    is normalized by removal of segments "\." and "\.\."\. RFC 3986 does not mandate
    the removal of empty segments "" \(i\.e\. the merger of double slashes, which
    is a feature of filename normalization but not of URI __path__
    normalization\): it treats URIs with excess slashes as referring to different
    resources\. When the quirk option *RemoveDoubleSlashes* is __true__
    \(the default\), empty segments will be removed from __path__\. To prevent
    removal, and thereby conform to RFC 3986, set this quirk option to
    __false__\.

    Using this quirk is a matter of preference\. A URI with double slashes in its
    path was most likely generated by error, certainly so if it has a
    straightforward mapping to a file on a server\. In some cases it may be
    better to sanitize the URI; in others, to keep the URI and let the server
    handle the possible error\.

## <a name='subsection1'></a>BACKWARD COMPATIBILITY

To behave as similarly as possible to versions of __uri__ earlier than
1\.2\.7, set the following quirk options:

  - __uri::setQuirkOption__ *NoInitialSlash* 1

  - __uri::setQuirkOption__ *NoExtraKeys* 1

  - __uri::setQuirkOption__ *HostAsDriveLetter* 1

  - __uri::setQuirkOption__ *RemoveDoubleSlashes* 0

In code that can tolerate the return by __uri::split__ of an additional key
__pbare__, set

  - __uri::setQuirkOption__ *NoExtraKeys* 0

in order to achieve greater compliance with RFC 3986\.

## <a name='subsection2'></a>NEW DESIGNS

For new projects, the following settings are recommended:

  - __uri::setQuirkOption__ *NoInitialSlash* 0

  - __uri::setQuirkOption__ *NoExtraKeys* 0

  - __uri::setQuirkOption__ *HostAsDriveLetter* 0

  - __uri::setQuirkOption__ *RemoveDoubleSlashes* 0&#124;1

## <a name='subsection3'></a>DEFAULT VALUES

The default values for package __uri__ version 1\.2\.7 are intended to be a
compromise between backwards compatibility and improved features\. Different
default values may be chosen in future versions of package __uri__\.

  - __uri::setQuirkOption__ *NoInitialSlash* 1

  - __uri::setQuirkOption__ *NoExtraKeys* 0

  - __uri::setQuirkOption__ *HostAsDriveLetter* 0

  - __uri::setQuirkOption__ *RemoveDoubleSlashes* 1

# <a name='section6'></a>EXAMPLES

A Windows® local filename such as "__C:\\Other Files\\startup\.txt__" is not
suitable for use as the __path__ element of a URI in the scheme
*[file](\.\./\.\./\.\./\.\./index\.md\#file)*\.

The Tcl command __file normalize__ will convert the backslashes to forward
slashes\. To generate a valid __path__ for the scheme
*[file](\.\./\.\./\.\./\.\./index\.md\#file)*, the normalized filename must be
prepended with "__/__", and then any characters that do not match the
__regexp__ bracket expression

    [a-zA-Z0-9$_.+!*'(,)?:@&=-]

must be percent\-encoded\.

The result in this example is "__/C:/Other%20Files/startup\.txt__" which is a
valid value for __path__\.

    % uri::join path /C:/Other%20Files/startup.txt scheme file

    file:///C:/Other%20Files/startup.txt

    % uri::split file:///C:/Other%20Files/startup.txt

    path /C:/Other%20Files/startup.txt scheme file

On UNIX® systems filenames begin with "__/__" which is also used as the
directory separator\. The only action needed to convert a filename to a valid
__path__ is percent\-encoding\.

# <a name='section7'></a>CREDITS

Original code \(regular expressions\) by Andreas Kupries\. Modularisation by Steve
Ball, also the split/join/resolve functionality\. RFC 3986 conformance by Keith
Nash\.

# <a name='section8'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *uri* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[fetching information](\.\./\.\./\.\./\.\./index\.md\#fetching\_information),
[file](\.\./\.\./\.\./\.\./index\.md\#file), [ftp](\.\./\.\./\.\./\.\./index\.md\#ftp),
[gopher](\.\./\.\./\.\./\.\./index\.md\#gopher),
[http](\.\./\.\./\.\./\.\./index\.md\#http), [https](\.\./\.\./\.\./\.\./index\.md\#https),
[ldap](\.\./\.\./\.\./\.\./index\.md\#ldap),
[mailto](\.\./\.\./\.\./\.\./index\.md\#mailto),
[news](\.\./\.\./\.\./\.\./index\.md\#news),
[prospero](\.\./\.\./\.\./\.\./index\.md\#prospero), [rfc
1630](\.\./\.\./\.\./\.\./index\.md\#rfc\_1630), [rfc
2255](\.\./\.\./\.\./\.\./index\.md\#rfc\_2255), [rfc
2396](\.\./\.\./\.\./\.\./index\.md\#rfc\_2396), [rfc
3986](\.\./\.\./\.\./\.\./index\.md\#rfc\_3986), [uri](\.\./\.\./\.\./\.\./index\.md\#uri),
[url](\.\./\.\./\.\./\.\./index\.md\#url), [wais](\.\./\.\./\.\./\.\./index\.md\#wais),
[www](\.\./\.\./\.\./\.\./index\.md\#www)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/uri/urn-scheme.md.

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

[//000000001]: # (uri\_urn \- Tcl Uniform Resource Identifier Management)
[//000000002]: # (Generated from file 'urn\-scheme\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (uri\_urn\(n\) 1\.0\.3 tcllib "Tcl Uniform Resource Identifier Management")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

uri\_urn \- URI utilities, URN scheme

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require uri::urn ?1\.0\.3?  

[__uri::urn::quote__ *url*](#1)  
[__uri::urn::unquote__ *url*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides two commands to quote and unquote the disallowed
characters for url using the *[urn](\.\./\.\./\.\./\.\./index\.md\#urn)* scheme,
registers the scheme with the package __[uri](uri\.md)__, and provides
internal helpers which will be automatically used by the commands
__uri::split__ and __uri::join__ of package __[uri](uri\.md)__ to
handle urls using the *[urn](\.\./\.\./\.\./\.\./index\.md\#urn)* scheme\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__uri::urn::quote__ *url*

    This command quotes the characters disallowed by the
    *[urn](\.\./\.\./\.\./\.\./index\.md\#urn)* scheme \(per RFC 2141 sec2\.2\) in the
    *url* and returns the modified url as its result\.

  - <a name='2'></a>__uri::urn::unquote__ *url*

    This commands performs the reverse of __::uri::urn::quote__\. It takes an
    *[urn](\.\./\.\./\.\./\.\./index\.md\#urn)* url, removes the quoting from all
    disallowed characters, and returns the modified urls as its result\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *uri* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[rfc 2141](\.\./\.\./\.\./\.\./index\.md\#rfc\_2141),
[uri](\.\./\.\./\.\./\.\./index\.md\#uri), [url](\.\./\.\./\.\./\.\./index\.md\#url),
[urn](\.\./\.\./\.\./\.\./index\.md\#urn)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































Deleted embedded/md/tcllib/files/modules/uuid/uuid.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102

[//000000001]: # (uuid \- uuid)
[//000000002]: # (Generated from file 'uuid\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2004, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (uuid\(n\) 1\.0\.6 tcllib "uuid")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

uuid \- UUID generation and comparison

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [REFERENCES](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require uuid ?1\.0\.6?  

[__::uuid::uuid generate__](#1)  
[__::uuid::uuid equal__ *id1* *id2*](#2)  

# <a name='description'></a>DESCRIPTION

This package provides a generator of universally unique identifiers \(UUID\) also
known as globally unique identifiers \(GUID\)\. This implementation follows the
draft specification from \(1\) although this is actually an expired draft
document\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::uuid::uuid generate__

    Creates a type 4 uuid by MD5 hashing a number of bits of variant data
    including the time and hostname\. Returns the string representation of the
    new uuid\.

  - <a name='2'></a>__::uuid::uuid equal__ *id1* *id2*

    Compares two uuids and returns true if both arguments are the same uuid\.

# <a name='section3'></a>EXAMPLES

    % uuid::uuid generate
    b12dc22c-5c36-41d2-57da-e29d0ef5839c

# <a name='section4'></a>REFERENCES

  1. Paul J\. Leach, "UUIDs and GUIDs", February 1998\.
     \([http://www\.opengroup\.org/dce/info/draft\-leach\-uuids\-guids\-01\.txt](http://www\.opengroup\.org/dce/info/draft\-leach\-uuids\-guids\-01\.txt)\)

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *uuid* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[GUID](\.\./\.\./\.\./\.\./index\.md\#guid), [UUID](\.\./\.\./\.\./\.\./index\.md\#uuid)

# <a name='category'></a>CATEGORY

Hashes, checksums, and encryption

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2004, Pat Thoyts <patthoyts@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/cc_amex.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155

[//000000001]: # (valtype::creditcard::amex \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::creditcard::amex\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::creditcard::amex \- Validation for AMEX creditcard number

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::luhn  
package require valtype::creditcard::amex ?1?  

[__valtype::creditcard::amex__ __validate__ *value*](#1)  
[__valtype::creditcard::amex__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for an AMEX creditcard number\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::creditcard::amex validate .... ;# Does nothing
    valtype::creditcard::amex validate .... ;# Throws an error (bad American Expresss creditcard number).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::creditcard::amex__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::creditcard::amex__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __CREDITCARD AMEX__\. This is then
followed by values detailing the reason for the failure\. The full set of
__\-errorCode__s which can be thrown by this package are:

  - INVALID CREDITCARD AMEX CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be an AMEX creditcard number\.

  - INVALID CREDITCARD AMEX CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

  - INVALID CREDITCARD AMEX LENGTH

    The input value is of the wrong length to be an AMEX creditcard number\.

  - INVALID CREDITCARD AMEX PREFIX

    The input value does not start with the magic value\(s\) required for it to be
    an AMEX creditcard number\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[AMEX](\.\./\.\./\.\./\.\./index\.md\#amex), [American
Express](\.\./\.\./\.\./\.\./index\.md\#american\_express),
[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[bank](\.\./\.\./\.\./\.\./index\.md\#bank), [card for
credit](\.\./\.\./\.\./\.\./index\.md\#card\_for\_credit), [credit
card](\.\./\.\./\.\./\.\./index\.md\#credit\_card),
[finance](\.\./\.\./\.\./\.\./index\.md\#finance), [isA](\.\./\.\./\.\./\.\./index\.md\#isa)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/cc_discover.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

[//000000001]: # (valtype::creditcard::discover \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::creditcard::discover\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::creditcard::discover \- Validation for Discover creditcard number

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::luhn  
package require valtype::creditcard::discover ?1?  

[__valtype::creditcard::discover__ __validate__ *value*](#1)  
[__valtype::creditcard::discover__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for a Discover creditcard number\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::creditcard::discover validate .... ;# Does nothing
    valtype::creditcard::discover validate .... ;# Throws an error (bad Discover creditcard number).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::creditcard::discover__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::creditcard::discover__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __CREDITCARD DISCOVER__\. This is
then followed by values detailing the reason for the failure\. The full set of
__\-errorCode__s which can be thrown by this package are:

  - INVALID CREDITCARD DISCOVER CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be a Discover creditcard number\.

  - INVALID CREDITCARD DISCOVER CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

  - INVALID CREDITCARD DISCOVER LENGTH

    The input value is of the wrong length to be a Discover creditcard number\.

  - INVALID CREDITCARD DISCOVER PREFIX

    The input value does not start with the magic value\(s\) required for it to be
    a Discover creditcard number\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[Discover](\.\./\.\./\.\./\.\./index\.md\#discover),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[bank](\.\./\.\./\.\./\.\./index\.md\#bank), [card for
credit](\.\./\.\./\.\./\.\./index\.md\#card\_for\_credit), [credit
card](\.\./\.\./\.\./\.\./index\.md\#credit\_card),
[finance](\.\./\.\./\.\./\.\./index\.md\#finance), [isA](\.\./\.\./\.\./\.\./index\.md\#isa)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/cc_mastercard.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155

[//000000001]: # (valtype::creditcard::mastercard \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::creditcard::mastercard\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::creditcard::mastercard \- Validation for Mastercard creditcard number

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::luhn  
package require valtype::creditcard::mastercard ?1?  

[__valtype::creditcard::mastercard__ __validate__ *value*](#1)  
[__valtype::creditcard::mastercard__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for a Mastercard creditcard
number\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::creditcard::mastercard validate .... ;# Does nothing
    valtype::creditcard::mastercard validate .... ;# Throws an error (bad Mastercard creditcard number).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::creditcard::mastercard__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::creditcard::mastercard__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __CREDITCARD MASTERCARD__\. This is
then followed by values detailing the reason for the failure\. The full set of
__\-errorCode__s which can be thrown by this package are:

  - INVALID CREDITCARD MASTERCARD CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be a Mastercard creditcard number\.

  - INVALID CREDITCARD MASTERCARD CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

  - INVALID CREDITCARD MASTERCARD LENGTH

    The input value is of the wrong length to be a Mastercard creditcard number\.

  - INVALID CREDITCARD MASTERCARD PREFIX

    The input value does not start with the magic value\(s\) required for it to be
    a Mastercard creditcard number\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[MasterCard](\.\./\.\./\.\./\.\./index\.md\#mastercard),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[bank](\.\./\.\./\.\./\.\./index\.md\#bank), [card for
credit](\.\./\.\./\.\./\.\./index\.md\#card\_for\_credit), [credit
card](\.\./\.\./\.\./\.\./index\.md\#credit\_card),
[finance](\.\./\.\./\.\./\.\./index\.md\#finance), [isA](\.\./\.\./\.\./\.\./index\.md\#isa)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/cc_visa.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

[//000000001]: # (valtype::creditcard::visa \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::creditcard::visa\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::creditcard::visa \- Validation for VISA creditcard number

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::luhn  
package require valtype::creditcard::visa ?1?  

[__valtype::creditcard::visa__ __validate__ *value*](#1)  
[__valtype::creditcard::visa__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for a VISA creditcard number\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::creditcard::visa validate .... ;# Does nothing
    valtype::creditcard::visa validate .... ;# Throws an error (bad VISA creditcard number).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::creditcard::visa__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::creditcard::visa__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __CREDITCARD VISA__\. This is then
followed by values detailing the reason for the failure\. The full set of
__\-errorCode__s which can be thrown by this package are:

  - INVALID CREDITCARD VISA CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be a VISA creditcard number\.

  - INVALID CREDITCARD VISA CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

  - INVALID CREDITCARD VISA LENGTH

    The input value is of the wrong length to be a VISA creditcard number\.

  - INVALID CREDITCARD VISA PREFIX

    The input value does not start with the magic value\(s\) required for it to be
    a VISA creditcard number\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[VISA](\.\./\.\./\.\./\.\./index\.md\#visa),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[bank](\.\./\.\./\.\./\.\./index\.md\#bank), [card for
credit](\.\./\.\./\.\./\.\./index\.md\#card\_for\_credit), [credit
card](\.\./\.\./\.\./\.\./index\.md\#credit\_card),
[finance](\.\./\.\./\.\./\.\./index\.md\#finance), [isA](\.\./\.\./\.\./\.\./index\.md\#isa)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/ean13.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

[//000000001]: # (valtype::gs1::ean13 \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::gs1::ean13\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::gs1::ean13 \- Validation for EAN13

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::gs1::ean13 ?1?  

[__valtype::gs1::ean13__ __validate__ *value*](#1)  
[__valtype::gs1::ean13__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for an EAN13\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::gs1::ean13 validate .... ;# Does nothing
    valtype::gs1::ean13 validate .... ;# Throws an error (bad EAN13).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::gs1::ean13__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::gs1::ean13__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __EAN13__\. This is then followed by
values detailing the reason for the failure\. The full set of __\-errorCode__s
which can be thrown by this package are:

  - INVALID EAN13 CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be an EAN13\.

  - INVALID EAN13 CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

  - INVALID EAN13 LENGTH

    The input value is of the wrong length to be an EAN13\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[EAN](\.\./\.\./\.\./\.\./index\.md\#ean), [EAN13](\.\./\.\./\.\./\.\./index\.md\#ean13),
[European Article Number](\.\./\.\./\.\./\.\./index\.md\#european\_article\_number),
[International Article
Number](\.\./\.\./\.\./\.\./index\.md\#international\_article\_number),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[isA](\.\./\.\./\.\./\.\./index\.md\#isa)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/iban.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

[//000000001]: # (valtype::iban \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::iban\(n\) 1\.7 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::iban \- Validation for IBAN

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::iban ?1\.7?  

[__valtype::iban__ __validate__ *value*](#1)  
[__valtype::iban__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for an IBAN\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::iban validate .... ;# Does nothing
    valtype::iban validate .... ;# Throws an error (bad International Bank Account Number).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::iban__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::iban__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __IBAN__\. This is then followed by
values detailing the reason for the failure\. The full set of __\-errorCode__s
which can be thrown by this package are:

  - INVALID IBAN CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be an IBAN\.

  - INVALID IBAN CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[IBAN](\.\./\.\./\.\./\.\./index\.md\#iban), [International Bank Account
Number](\.\./\.\./\.\./\.\./index\.md\#international\_bank\_account\_number),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[bank](\.\./\.\./\.\./\.\./index\.md\#bank),
[finance](\.\./\.\./\.\./\.\./index\.md\#finance), [isA](\.\./\.\./\.\./\.\./index\.md\#isa)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/imei.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150

[//000000001]: # (valtype::imei \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::imei\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::imei \- Validation for IMEI

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::luhn  
package require valtype::imei ?1?  

[__valtype::imei__ __validate__ *value*](#1)  
[__valtype::imei__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for an IMEI\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::imei validate .... ;# Does nothing
    valtype::imei validate .... ;# Throws an error (bad International Mobile Equipment Identity (IMEI) number).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::imei__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::imei__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __IMEI__\. This is then followed by
values detailing the reason for the failure\. The full set of __\-errorCode__s
which can be thrown by this package are:

  - INVALID IMEI CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be an IMEI\.

  - INVALID IMEI CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

  - INVALID IMEI LENGTH

    The input value is of the wrong length to be an IMEI\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[IMEI](\.\./\.\./\.\./\.\./index\.md\#imei), [International Mobile Equipment
Identity](\.\./\.\./\.\./\.\./index\.md\#international\_mobile\_equipment\_identity),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[cell\-phone](\.\./\.\./\.\./\.\./index\.md\#cell\_phone),
[isA](\.\./\.\./\.\./\.\./index\.md\#isa), [mobile
phone](\.\./\.\./\.\./\.\./index\.md\#mobile\_phone),
[phone](\.\./\.\./\.\./\.\./index\.md\#phone)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/isbn.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

[//000000001]: # (valtype::isbn \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::isbn\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::isbn \- Validation for ISBN

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::isbn ?1?  

[__valtype::isbn__ __validate__ *value*](#1)  
[__valtype::isbn__ __checkdigit__ *value*](#2)  
[__valtype::isbn__ __13of__ *value*](#3)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for an ISBN\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::isbn validate .... ;# Does nothing
    valtype::isbn validate .... ;# Throws an error (bad ISBN).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::isbn__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::isbn__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

  - <a name='3'></a>__valtype::isbn__ __13of__ *value*

    This method expects an old\-style 10\-digit ISBN and returns the canonical
    modern 13\-digit ISBN\. This is used by __validate__ to canonicalize the
    input, so that all parts of the system after the validation can expect to
    work with modern 13\-digit ISBNs\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __ISBN__\. This is then followed by
values detailing the reason for the failure\. The full set of __\-errorCode__s
which can be thrown by this package are:

  - INVALID ISBN CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be an ISBN\.

  - INVALID ISBN CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

  - INVALID ISBN LENGTH

    The input value is of the wrong length to be an ISBN\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Book Number](\.\./\.\./\.\./\.\./index\.md\#book\_number),
[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[EAN](\.\./\.\./\.\./\.\./index\.md\#ean), [EAN13](\.\./\.\./\.\./\.\./index\.md\#ean13),
[European Article Number](\.\./\.\./\.\./\.\./index\.md\#european\_article\_number),
[ISBN](\.\./\.\./\.\./\.\./index\.md\#isbn), [International Article
Number](\.\./\.\./\.\./\.\./index\.md\#international\_article\_number), [International
Standard Book
Number](\.\./\.\./\.\./\.\./index\.md\#international\_standard\_book\_number),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[isA](\.\./\.\./\.\./\.\./index\.md\#isa)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/luhn.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142

[//000000001]: # (valtype::luhn \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::luhn\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::luhn \- Validation for plain number with a LUHN checkdigit

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::luhn ?1?  

[__valtype::luhn__ __validate__ *value*](#1)  
[__valtype::luhn__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for a plain number with a LUHN
checkdigit\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::luhn validate .... ;# Does nothing
    valtype::luhn validate .... ;# Throws an error (bad luhn checkdigit).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::luhn__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::luhn__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __LUHN__\. This is then followed by
values detailing the reason for the failure\. The full set of __\-errorCode__s
which can be thrown by this package are:

  - INVALID LUHN CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be a plain number with a LUHN
    checkdigit\.

  - INVALID LUHN CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[isA](\.\./\.\./\.\./\.\./index\.md\#isa), [luhn](\.\./\.\./\.\./\.\./index\.md\#luhn)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/luhn5.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

[//000000001]: # (valtype::luhn5 \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::luhn5\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::luhn5 \- Validation for plain number with a LUHN5 checkdigit

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::luhn5 ?1?  

[__valtype::luhn5__ __validate__ *value*](#1)  
[__valtype::luhn5__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for a plain number with a LUHN5
checkdigit\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::luhn5 validate .... ;# Does nothing
    valtype::luhn5 validate .... ;# Throws an error (bad luhn5 checkdigit).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::luhn5__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::luhn5__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __LUHN5__\. This is then followed by
values detailing the reason for the failure\. The full set of __\-errorCode__s
which can be thrown by this package are:

  - INVALID LUHN5 CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be a plain number with a LUHN5
    checkdigit\.

  - INVALID LUHN5 CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[isA](\.\./\.\./\.\./\.\./index\.md\#isa), [luhn](\.\./\.\./\.\./\.\./index\.md\#luhn),
[luhn\-5](\.\./\.\./\.\./\.\./index\.md\#luhn\_5)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/usnpi.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

[//000000001]: # (valtype::usnpi \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::usnpi\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::usnpi \- Validation for USNPI

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::luhn  
package require valtype::usnpi ?1?  

[__valtype::usnpi__ __validate__ *value*](#1)  
[__valtype::usnpi__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for an USNPI\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::usnpi validate .... ;# Does nothing
    valtype::usnpi validate .... ;# Throws an error (bad US National Provider Identifier (US-NPI) number).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::usnpi__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::usnpi__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __USNPI__\. This is then followed by
values detailing the reason for the failure\. The full set of __\-errorCode__s
which can be thrown by this package are:

  - INVALID USNPI CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be an USNPI\.

  - INVALID USNPI CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

  - INVALID USNPI LENGTH

    The input value is of the wrong length to be an USNPI\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[NPI](\.\./\.\./\.\./\.\./index\.md\#npi), [National Provider
Identifier](\.\./\.\./\.\./\.\./index\.md\#national\_provider\_identifier),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[US\-NPI](\.\./\.\./\.\./\.\./index\.md\#us\_npi),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[isA](\.\./\.\./\.\./\.\./index\.md\#isa),
[medicare](\.\./\.\./\.\./\.\./index\.md\#medicare)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/valtype_common.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

[//000000001]: # (valtype::common \- Validation types)
[//000000002]: # (Generated from file 'valtype\_common\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::common\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::common \- Validation, common code

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require valtype::common ?1?  

[__valtype::common::reject__ *code* *text*](#1)  
[__valtype::common::badchar__ *code* ?*text*?](#2)  
[__valtype::common::badcheck__ *code* ?*text*?](#3)  
[__valtype::common::badlength__ *code* *lengths* ?*text*?](#4)  
[__valtype::common::badprefix__ *code* *prefixes* ?*text*?](#5)  

# <a name='description'></a>DESCRIPTION

This package implements a number of common commands used by the validation types
in this module\. These commands essentially encapsulate the throwing of
validation errors, ensuring that a proper __\-errorcode__ is used\. See
section [Error Codes](#section3)\.

# <a name='section2'></a>API

  - <a name='1'></a>__valtype::common::reject__ *code* *text*

    The core command of this package it throws an __INVALID__ error with the
    specified *text*\. The first argument is a list of codes extending the
    __INVALID__ with detail information\.

  - <a name='2'></a>__valtype::common::badchar__ *code* ?*text*?

    This command throws an __INVALID CHAR__ error with the specified
    *text*\. The first argument is a list of codes providing details\. These are
    inserted between the codes __INVALID__ and __CHARACTER__\.

  - <a name='3'></a>__valtype::common::badcheck__ *code* ?*text*?

    This command throws an __INVALID CHECK\-DIGIT__ error with the specified
    *text*, if any, extended by the standard text "the check digit is
    incorrect"\. The first argument is a list of codes providing details\. These
    are inserted between the codes __INVALID__ and __CHECK\_DIGIT__\.

  - <a name='4'></a>__valtype::common::badlength__ *code* *lengths* ?*text*?

    This command throws an __INVALID LENGTH__ error with the specified
    *text*, if any, extended by the standard text "incorrect length, expected
    \.\.\. character\(s\)"\. The first argument is a list of codes providing details\.
    These are inserted between the codes __INVALID__ and __LENGTH__\. The
    argument *lengths* is a list of the input lengths which had been expected,
    i\.e\. these are the valid lengths\.

  - <a name='5'></a>__valtype::common::badprefix__ *code* *prefixes* ?*text*?

    This command throws an __INVALID PREFIX__ error with the specified
    *text*, if any, extended by the standard text "incorrect prefix, expected
    \.\.\."\. The first argument is a list of codes providing details\. These are
    inserted between the codes __INVALID__ and __PREFIX__\. The argument
    *prefixes* is a list of the input prefixes which had been expected, i\.e\.
    these are the valid prefixes\.

# <a name='section3'></a>Error Codes

The errors thrown by the commands of this package all use the __\-errorcode__
__INVALID__ to distinguish the input validation failures they represent from
package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. This is supplied by the caller\. This is then followed
by values detailing the reason for the failure\. The full set of
__\-errorCode__s which can be thrown by this package are shown below, with
__<>__ a placeholder for both the caller\-supplied type\-information, the type
description\.

  - INVALID __<>__ CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be a __<>__\.

  - INVALID __<>__ CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

  - INVALID __<>__ LENGTH

    The input value is of the wrong length to be a __<>__\.

  - INVALID __<>__ PREFIX

    The input value does not start with the magic value\(s\) required for it to be
    a __<>__\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[isA](\.\./\.\./\.\./\.\./index\.md\#isa)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































Deleted embedded/md/tcllib/files/modules/valtype/verhoeff.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

[//000000001]: # (valtype::verhoeff \- Validation types)
[//000000002]: # (Generated from file 'vtype\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (valtype::verhoeff\(n\) 1 tcllib "Validation types")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

valtype::verhoeff \- Validation for plain number with a VERHOEFF checkdigit

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Error Codes](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require snit 2  
package require valtype::common  
package require valtype::verhoeff ?1?  

[__valtype::verhoeff__ __validate__ *value*](#1)  
[__valtype::verhoeff__ __checkdigit__ *value*](#2)  

# <a name='description'></a>DESCRIPTION

This package implements a snit validation type for a plain number with a
VERHOEFF checkdigit\.

A validation type is an object that can be used to validate Tcl values of a
particular kind\. For example, __snit::integer__, a validation type defined
by the __[snit](\.\./snit/snit\.md)__ package is used to validate that a
Tcl value is an integer\.

Every validation type has a __validate__ method which is used to do the
validation\. This method must take a single argument, the value to be validated;
further, it must do nothing if the value is valid, but throw an error if the
value is invalid:

    valtype::verhoeff validate .... ;# Does nothing
    valtype::verhoeff validate .... ;# Throws an error (bad verhoeff checkdigit).

The __validate__ method will always return the validated value on success,
and throw the __\-errorcode__ INVALID on error, possibly with additional
elements which provide more details about the problem\.

# <a name='section2'></a>API

The API provided by this package satisfies the specification of snit validation
types found in the documentation of *[Snit's Not Incr
Tcl](\.\./snit/snit\.md)*\.

  - <a name='1'></a>__valtype::verhoeff__ __validate__ *value*

    This method validates the *value* and returns it, possibly in a canonical
    form, if it passes\. If the value does not pass the validation an error is
    thrown\.

  - <a name='2'></a>__valtype::verhoeff__ __checkdigit__ *value*

    This method computes a check digit for the *value*\. Before doing so it is
    validated, except for a checkdigit\. If the value does not pass the
    validation no check digit is calculated and an error is thrown instead\.

# <a name='section3'></a>Error Codes

As said in the package description, the errors thrown by the commands of this
package in response to input validation failures use the __\-errorcode__
INVALID to distinguish themselves from package internal errors\.

To provide more detailed information about why the validation failed the
__\-errorCode__ goes actually beyond that\. First, it will contain a code
detailing the type itself\. Here this is __VERHOEFF__\. This is then followed
by values detailing the reason for the failure\. The full set of
__\-errorCode__s which can be thrown by this package are:

  - INVALID VERHOEFF CHARACTER

    The input value contained one or more bad characters, i\.e\. characters which
    must not occur in the input for it to be a plain number with a VERHOEFF
    checkdigit\.

  - INVALID VERHOEFF CHECK\-DIGIT

    The check digit of the input value is wrong\. This usually signals a
    data\-entry error, with digits transposed, forgotten, etc\. Of course, th
    input may be an outright fake too\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *valtype* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Checking](\.\./\.\./\.\./\.\./index\.md\#checking),
[Testing](\.\./\.\./\.\./\.\./index\.md\#testing), [Type
checking](\.\./\.\./\.\./\.\./index\.md\#type\_checking),
[Validation](\.\./\.\./\.\./\.\./index\.md\#validation), [Value
checking](\.\./\.\./\.\./\.\./index\.md\#value\_checking),
[isA](\.\./\.\./\.\./\.\./index\.md\#isa),
[verhoeff](\.\./\.\./\.\./\.\./index\.md\#verhoeff)

# <a name='category'></a>CATEGORY

Validation, Type checking

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/cat.md.

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
89
90
91
92
93
94
95
96
97
98

[//000000001]: # (tcl::chan::cat \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'cat\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::cat\(n\) 1\.0\.3 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::cat \- Concatenation channel

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::core ?1?  
package require tcl::chan::cat ?1\.0\.3?  

[__::tcl::chan::cat__ *chan*\.\.\.](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::cat__ package provides a command creating concatenation
channels\. These are non\-seekable channels owning a list of subordinate channels
whose contents they return in order, until all are exhausted\. In this manner the
channel is the concatentation of the contents of all the sub\-ordinate channels\.

Note that the created channels take ownership of the channels they were
constructed with\. Whenever they have exhausted one of their channel it will be
closed\. Similarly, closing the cat channel will close all the sub\-ordinates it
still has\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::core](\.\./virtchannel\_core/core\.md)__ framework\.

Event handling is delegated to the currently active sub\-channel\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::cat__ *chan*\.\.\.

    This command creates the concatenation channel using all the provided
    channels, and returns its handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[concatenation channel](\.\./\.\./\.\./\.\./index\.md\#concatenation\_channel),
[reflected channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/facade.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126

[//000000001]: # (tcl::chan::facade \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'facade\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::facade\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::facade \- Facade channel

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require logger  
package require tcl::chan::core ?1?  
package require tcl::chan::facade ?1?  

[__::tcl::chan::facade__ *chan*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::facade__ package provides a command creating facades to
other channels\. These are channels which own a single subordinate channel and
delegate all operations to\.

The main use for facades is the debugging of actions on a channel\. While most of
the information could be tracked by a virtual channel transformation it does not
have access to the event\-related operation, and furthermore they are only
available in Tcl 8\.6\.

Therefore this channel, usable with Tcl 8\.5, and having access to everything
going on for a channel\.

The intercepted actions on channel are logged through package
__[logger](\.\./log/logger\.md)__\.

Beyond that facades provide the following additional channel configuration
options:

  - __\-self__

    The TclOO object handling the facade\.

  - __\-fd__

    The handle of the subordinate, i\.e\. wrapped channel\.

  - __\-used__

    The last time the wrapped channel was read from or written to by the facade,
    as per __clock milliseconds__\. A value of __0__ indicates that the
    subordinate channel was not accessed at all, yet\.

  - __\-created__

    The time the facade was created, as per __clock milliseconds__\.

  - __\-user__

    A free\-form value identifying the user of the facade and its wrapped
    channel\.

Of these only option __\-user__ is writable\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::facade__ *chan*

    This command creates the facade channel around the provided channel
    *chan*, and returns its handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[concatenation channel](\.\./\.\./\.\./\.\./index\.md\#concatenation\_channel),
[reflected channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/halfpipe.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128

[//000000001]: # (tcl::chan::halfpipe \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'halfpipe\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009, 2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::halfpipe\(n\) 1\.0\.1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::halfpipe \- In\-memory channel, half of a fifo2

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Options](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::halfpipe ?1\.0\.1?  

[__::tcl::chan::halfpipe__ ?__\-option__ *value*\.\.\.?](#1)  
[*objectCmd* __put__ *bytes*](#2)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::halfpipe__ package provides a command creating one half of
a __[tcl::chan::fifo2](tcllib\_fifo2\.md)__ pair\. Writing into such a
channel invokes a set of callbacks which then handle the data\. This is similar
to a channel handler, except having a much simpler API\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::halfpipe__ ?__\-option__ *value*\.\.\.?

    This command creates a halfpipe channel and configures it with the callbacks
    to run when the channel is closed, data was written to it, or ran empty\. See
    the section [Options](#section3) for the list of options and associated
    semantics\. The result of the command is a list containing two elements, the
    handle of the new channel, and the object command of the channel handler, in
    this order\. The latter is supplied to the caller to provide her with access
    to the __put__ method for adding data to the channel\.

    Two halfpipes with a bit of glue logic in the callbacks make for one
    __[tcl::chan::fifo2](tcllib\_fifo2\.md)__\.

  - <a name='2'></a>*objectCmd* __put__ *bytes*

    This method of the channel handler object puts the data *bytes* into the
    channel so that it can be read from it\.

# <a name='section3'></a>Options

  - __\-close\-command__ cmdprefix

    This callback is invoked when the channel is closed\. A single argument is
    supplied, the handle of the channel being closed\. The result of the callback
    is ignored\.

  - __\-write\-command__ cmdprefix

    This callback is invoked when data is written to the channel\. Two arguments
    are supplied, the handle of the channel written to, and the data written\.
    The result of the callback is ignored\.

  - __\-empty\-command__ cmdprefix

    This callback is invoked when the channel has run out of data to read\. A
    single argument is supplied, the handle of the channel\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[callbacks](\.\./\.\./\.\./\.\./index\.md\#callbacks),
[fifo](\.\./\.\./\.\./\.\./index\.md\#fifo), [in\-memory
channel](\.\./\.\./\.\./\.\./index\.md\#in\_memory\_channel), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009, 2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/nullzero.md.

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
89
90
91
92
93
94
95
96

[//000000001]: # (tcl::chan::nullzero \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'nullzero\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::nullzero\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::nullzero \- Null/Zero channel combination

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::nullzero ?1?  

[__::tcl::chan::nullzero__](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::nullzero__ package provides a command creating channels,
which are a combination of null and zero devices\. They immediately forget
whatever is written to them, and on reading return an infinite stream of null
characters\.

Packages related to this are __[tcl::chan::null](tcllib\_null\.md)__ and
__[tcl::chan::zero](tcllib\_zero\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::nullzero__

    This command creates a new nullzero channel and returns its handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[/dev/null](\.\./\.\./\.\./\.\./index\.md\#\_dev\_null),
[/dev/zero](\.\./\.\./\.\./\.\./index\.md\#\_dev\_zero),
[null](\.\./\.\./\.\./\.\./index\.md\#null), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel),
[zero](\.\./\.\./\.\./\.\./index\.md\#zero)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/randseed.md.

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
89
90
91
92
93
94
95

[//000000001]: # (tcl::randomseed \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'randseed\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::randomseed\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::randomseed \- Utilities for random channels

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::randomseed ?1?  

[__::tcl::randomseed__](#1)  
[__::tcl::combine__ *seed1* *seed2*](#2)  

# <a name='description'></a>DESCRIPTION

The __tcl::randomseed__ package provides a a few utility commands to help
with the seeding of __[tcl::chan::random](tcllib\_random\.md)__ channels\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::randomseed__

    This command creates returns a list of seed integers suitable as seed
    argument for random channels\. The numbers are derived from the process id,
    current time, and Tcl random number generator\.

  - <a name='2'></a>__::tcl::combine__ *seed1* *seed2*

    This command takes to seed lists and combines them into a single list by
    XORing them elementwise, modulo 256\. If the lists are not of equial length
    the shorter of the two is padded with 0s before merging\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[/dev/random](\.\./\.\./\.\./\.\./index\.md\#\_dev\_random),
[merge](\.\./\.\./\.\./\.\./index\.md\#merge),
[random](\.\./\.\./\.\./\.\./index\.md\#random), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel),
[seed](\.\./\.\./\.\./\.\./index\.md\#seed), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/std.md.

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
89
90
91
92
93
94

[//000000001]: # (tcl::chan::std \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'std\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::std\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::std \- Standard I/O, unification of stdin and stdout

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::core ?1?  
package require tcl::chan::std ?1?  

[__::tcl::chan::std__](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::std__ package provides a command creating a standard
channel which unifies stdin and stdout into a single read\- and writable channel\.
The result is not seek\-able, like the original standard channels\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::core](\.\./virtchannel\_core/core\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::std__

    This command creates the std channel and returns its handle\.

    The channel is created only once, on the first call, and all future calls
    simply return this handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[reflected channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [standard
io](\.\./\.\./\.\./\.\./index\.md\#standard\_io),
[stdin](\.\./\.\./\.\./\.\./index\.md\#stdin),
[stdout](\.\./\.\./\.\./\.\./index\.md\#stdout), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2011 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/tcllib_fifo.md.

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
89
90
91
92
93
94

[//000000001]: # (tcl::chan::fifo \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'tcllib\_fifo\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::fifo\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::fifo \- In\-memory fifo channel

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::fifo ?1?  

[__::tcl::chan::fifo__](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::fifo__ package provides a command creating channels which
live purely in memory\. Access is fifo\-like, i\.e\. things are read out of the
channel in the order they were written to it\. This is equivalent to the fifo
channels provided by the package __Memchan__, except that this is written in
pure Tcl, not C\. On the other hand, __Memchan__ is usable with Tcl 8\.4 and
before, whereas this package requires Tcl 8\.5 or higher, and
__[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::fifo__

    This command creates a new fifo channel and returns its handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[fifo](\.\./\.\./\.\./\.\./index\.md\#fifo), [in\-memory
channel](\.\./\.\./\.\./\.\./index\.md\#in\_memory\_channel), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/tcllib_fifo2.md.

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
89
90
91
92
93
94
95
96
97
98
99
100

[//000000001]: # (tcl::chan::fifo2 \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'tcllib\_fifo2\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::fifo2\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::fifo2 \- In\-memory interconnected fifo channels

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::halfpipe ?1?  
package require tcl::chan::fifo2 ?1?  

[__::tcl::chan::fifo2__](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::fifo2__ package provides a command creating pairs of
channels which live purely in memory and are connected to each other in a fifo
manner\. What is written to one half of the pair can be read from the other half,
in the same order\. One particular application for this is communication between
threads, with one half of the pair moved to the thread to talk to\. This is
equivalent to the fifo2 channels provided by the package __Memchan__, except
that this is written in pure Tcl, not C\. On the other hand, __Memchan__ is
usable with Tcl 8\.4 and before, whereas this package requires Tcl 8\.5 or higher,
and __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::fifo2__

    This command creates a new connected pair of fifo channels and returns their
    handles, as a list containing two elements\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[connected fifos](\.\./\.\./\.\./\.\./index\.md\#connected\_fifos),
[fifo](\.\./\.\./\.\./\.\./index\.md\#fifo), [in\-memory
channel](\.\./\.\./\.\./\.\./index\.md\#in\_memory\_channel), [inter\-thread
communication](\.\./\.\./\.\./\.\./index\.md\#inter\_thread\_communication), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/tcllib_memchan.md.

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
89
90
91
92
93
94
95

[//000000001]: # (tcl::chan::memchan \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'tcllib\_memchan\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009\-2017 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::memchan\(n\) 1\.0\.4 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::memchan \- In\-memory channel

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::memchan ?1\.0\.4?  

[__::tcl::chan::memchan__](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::memchan__ package provides a command creating channels
which live purely in memory\. They provide random\-access, i\.e\. are seekable\. This
is equivalent to the memchan channels provided by the package __Memchan__,
except that this is written in pure Tcl, not C\. On the other hand,
__Memchan__ is usable with Tcl 8\.4 and before, whereas this package requires
Tcl 8\.5 or higher, and __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__\.

Packages related to this are __[tcl::chan::string](tcllib\_string\.md)__
and __[tcl::chan::variable](tcllib\_variable\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::memchan__

    This command creates a new memchan channel and returns its handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[in\-memory channel](\.\./\.\./\.\./\.\./index\.md\#in\_memory\_channel), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009\-2017 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/tcllib_null.md.

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
89
90
91
92
93
94
95
96

[//000000001]: # (tcl::chan::null \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'tcllib\_null\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::null\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::null \- Null channel

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::null ?1?  

[__::tcl::chan::null__](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::null__ package provides a command creating null channels,
i\.e\. write\-only channels which immediately forget whatever is written to them\.
This is equivalent to the null channels provided by the package __Memchan__,
except that this is written in pure Tcl, not C\. On the other hand,
__Memchan__ is usable with Tcl 8\.4 and before, whereas this package requires
Tcl 8\.5 or higher, and __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__\.

Packages related to this are __[tcl::chan::zero](tcllib\_zero\.md)__ and
__[tcl::chan::nullzero](nullzero\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::null__

    This command creates a new null channel and returns its handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[/dev/null](\.\./\.\./\.\./\.\./index\.md\#\_dev\_null),
[null](\.\./\.\./\.\./\.\./index\.md\#null), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/tcllib_random.md.

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
89
90
91
92
93
94
95
96

[//000000001]: # (tcl::chan::random \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'tcllib\_random\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::random\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::random \- Random channel

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::random ?1?  

[__::tcl::chan::random__ *seed*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::random__ package provides a command creating random
channels, i\.e\. read\-only channels which return an infinite stream of
pseudo\-random characters upon reading\. This is similar to the random channels
provided by the package __Memchan__, except that this is written in pure
Tcl, not C, and uses a much simpler generator as well\. On the other hand,
__Memchan__ is usable with Tcl 8\.4 and before, whereas this package requires
Tcl 8\.5 or higher, and TclOO\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::random__ *seed*

    This command creates a new random channel and returns its handle\. The seed
    is a list of integer numbers used to initialize the internal feedback shift
    register of the generator\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[/dev/random](\.\./\.\./\.\./\.\./index\.md\#\_dev\_random),
[random](\.\./\.\./\.\./\.\./index\.md\#random), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/tcllib_string.md.

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
89
90
91
92
93
94
95

[//000000001]: # (tcl::chan::string \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'tcllib\_string\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::string\(n\) 1\.0\.3 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::string \- Read\-only in\-memory channel

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::string ?1\.0\.3?  

[__::tcl::chan::string__ *content*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::string__ package provides a command creating channels which
live purely in memory\. They provide random\-access, i\.e\. are seekable\. In
contrast to the channels created by
__[tcl::chan::memchan](tcllib\_memchan\.md)__ they are read\-only however,
their content is provided at the time of construction and immutable afterward\.

Packages related to this are __[tcl::chan::memchan](tcllib\_memchan\.md)__
and __[tcl::chan::variable](tcllib\_variable\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::string__ *content*

    This command creates a new string channel and returns its handle\. The
    channel provides random read\-only access to the *content* string\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[in\-memory channel](\.\./\.\./\.\./\.\./index\.md\#in\_memory\_channel), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/tcllib_variable.md.

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
89
90
91
92
93
94
95
96
97

[//000000001]: # (tcl::chan::variable \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'tcllib\_variable\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::variable\(n\) 1\.0\.4 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::variable \- In\-memory channel using variable for storage

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::variable ?1\.0\.4?  

[__::tcl::chan::variable__ *varname*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::variable__ package provides a command creating channels
which live purely in memory\. They provide random\-access, i\.e\. are seekable\. In
contrast to the channels created by
__[tcl::chan::memchan](tcllib\_memchan\.md)__ the data is not hidden in
the channel however, but stored in an associated variable, specified at the time
of construction\.

Packages related to this are __[tcl::chan::memchan](tcllib\_memchan\.md)__
and __[tcl::chan::string](tcllib\_string\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::variable__ *varname*

    This command creates a new variable channel and returns its handle\. The
    content of the channel is stored in the associated namespace variable
    *varname*\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[in\-memory channel](\.\./\.\./\.\./\.\./index\.md\#in\_memory\_channel), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/tcllib_zero.md.

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
89
90
91
92
93
94
95
96

[//000000001]: # (tcl::chan::zero \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'tcllib\_zero\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::zero\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::zero \- Zero channel

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::zero ?1?  

[__::tcl::chan::zero__](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::zero__ package provides a command creating zero channels,
i\.e\. read\-only channels which return an infinite stream of null characters upon
reading\. This is equivalent to the zero channels provided by the package
__Memchan__, except that this is written in pure Tcl, not C\. On the other
hand, __Memchan__ is usable with Tcl 8\.4 and before, whereas this package
requires Tcl 8\.5 or higher, and TclOO\.

Packages related to this are __[tcl::chan::null](tcllib\_null\.md)__ and
__[tcl::chan::nullzero](nullzero\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::zero__

    This command creates a new zero channel and returns its handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[/dev/zero](\.\./\.\./\.\./\.\./index\.md\#\_dev\_zero), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel),
[zero](\.\./\.\./\.\./\.\./index\.md\#zero)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_base/textwindow.md.

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
89
90
91

[//000000001]: # (tcl::chan::textwindow \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'textwindow\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::textwindow\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::textwindow \- Textwindow channel

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::events ?1?  
package require tcl::chan::textwindow ?1?  

[__::tcl::chan::textwindow__ *widget*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::textwindow__ package provides a command creating write\-only
channels connected to text widgets\. Anything written to the channel is printed
into the associated widget\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the channel handler is a sub\-class of the
__[tcl::chan::events](\.\./virtchannel\_core/events\.md)__ framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::chan::textwindow__ *widget*

    This command creates a new textwindow channel and returns its handle\. Data
    written to this channel will appear in the associated *widget*\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[Tk](\.\./\.\./\.\./\.\./index\.md\#tk), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [text
widget](\.\./\.\./\.\./\.\./index\.md\#text\_widget), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_core/core.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

[//000000001]: # (tcl::chan::core \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'core\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::core\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::core \- Basic reflected/virtual channel support

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Class API](#section2)

  - [Instance API](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::core ?1?  

[__::tcl::chan::core__ *objectName*](#1)  
[*objectName* __initialize__ *thechannel* *mode*](#2)  
[*objectName* __finalize__ *thechannel*](#3)  
[*objectName* __destroy__](#4)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::core__ package provides a
__[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing common
behaviour needed by virtually every reflected or virtual channel
\(initialization, finalization\)\.

This class expects to be used as either superclass of a concrete channel class,
or to be mixed into such a class\.

# <a name='section2'></a>Class API

  - <a name='1'></a>__::tcl::chan::core__ *objectName*

    This command creates a new channel core object with an associated global Tcl
    command whose name is *objectName*\. This command may be used to invoke
    various operations on the object, as described in the section for the
    [Instance API](#section3)\.

# <a name='section3'></a>Instance API

The API of channel core instances provides only two methods, both corresponding
to channel handler commands \(For reference see [TIP
219](http:/tip\.tcl\.tk/219)\)\. They expect to be called from whichever object
instance the channel core was made a part of\.

  - <a name='2'></a>*objectName* __initialize__ *thechannel* *mode*

    This method implements standard behaviour for the __initialize__ method
    of channel handlers\. Using introspection it finds the handler methods
    supported by the instance and returns a list containing their names, as
    expected by the support for reflected channels in the Tcl core\.

    It further remembers the channel handle in an instance variable for access
    by sub\-classes\.

  - <a name='3'></a>*objectName* __finalize__ *thechannel*

    This method implements standard behaviour for the __finalize__ method of
    channel handlers\. It simply destroys itself\.

  - <a name='4'></a>*objectName* __destroy__

    Destroying the channel core instance closes the channel it was initialized
    for, see the method __initialize__\. When destroyed from within a call of
    __finalize__ this does not happen, under the assumption that the channel
    is being destroyed by Tcl\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[reflected channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_core/events.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132

[//000000001]: # (tcl::chan::events \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'events\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::chan::events\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::chan::events \- Event support for reflected/virtual channels

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Class API](#section2)

  - [Instance API](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::chan::core ?1?  
package require tcl::chan::events ?1?  

[__::tcl::chan::events__ *objectName*](#1)  
[*objectName* __finalize__ *thechannel*](#2)  
[*objectName* __watch__ *thechannel* *eventmask*](#3)  
[*objectName* __allow__ *eventname*\.\.\.](#4)  
[*objectName* __disallow__ *eventname*\.\.\.](#5)  

# <a name='description'></a>DESCRIPTION

The __tcl::chan::events__ package provides a
__[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing common
behaviour needed by virtually every reflected or virtual channel supporting
event driven IO\. It is a sub\-class of __[tcl::chan::core](core\.md)__,
inheriting all of its behaviour\.

This class expects to be used as either superclass of a concrete channel class,
or to be mixed into such a class\.

# <a name='section2'></a>Class API

  - <a name='1'></a>__::tcl::chan::events__ *objectName*

    This command creates a new channel event core object with an associated
    global Tcl command whose name is *objectName*\. This command may be used to
    invoke various operations on the object, as described in the section for the
    [Instance API](#section3)\.

# <a name='section3'></a>Instance API

The API of channel event core instances provides only four methods, two
corresponding to channel handler commands \(For reference see [TIP
219](http:/tip\.tcl\.tk/219)\), and the other two for use by sub\-classes to
control event generation\. They former expect to be called from whichever object
instance the channel event core was made a part of\.

  - <a name='2'></a>*objectName* __finalize__ *thechannel*

    This method implements standard behaviour for the __finalize__ method of
    channel handlers\. It overrides the behaviour inherited from
    __[tcl::chan::core](core\.md)__ and additionally disables any and all
    event generation before destroying itself\.

  - <a name='3'></a>*objectName* __watch__ *thechannel* *eventmask*

    This method implements standard behaviour for the __watch__ method of
    channel handlers\. Called by the IO system whenever the interest in event
    changes it updates the instance state to activate and/or suppress the
    generation of the events of \(non\-\)interest\.

  - <a name='4'></a>*objectName* __allow__ *eventname*\.\.\.

  - <a name='5'></a>*objectName* __disallow__ *eventname*\.\.\.

    These two methods are exported to sub\-classes, so that their instances can
    notify their event core of the events the channel they implement can \(allow\)
    or cannot \(disallow\) generate\. Together with the information about the
    events requested by Tcl's IO system coming in through the __watch__
    method the event core is able to determine which events it should \(not\)
    generate and act accordingly\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[event management](\.\./\.\./\.\./\.\./index\.md\#event\_management), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_core/transformcore.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

[//000000001]: # (tcl::transform::core \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'transformcore\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::core\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::core \- Basic reflected/virtual channel transform support

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Class API](#section2)

  - [Instance API](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.5  
package require TclOO  
package require tcl::transform::core ?1?  

[__::tcl::transform::core__ *objectName*](#1)  
[*objectName* __initialize__ *thechannel* *mode*](#2)  
[*objectName* __finalize__ *thechannel*](#3)  
[*objectName* __destroy__](#4)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::core__ package provides a
__[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing common
behaviour needed by virtually every reflected or virtual channel transformation
\(initialization, finalization\)\.

This class expects to be used as either superclass of a concrete channel class,
or to be mixed into such a class\.

# <a name='section2'></a>Class API

  - <a name='1'></a>__::tcl::transform::core__ *objectName*

    This command creates a new transform core object with an associated global
    Tcl command whose name is *objectName*\. This command may be used to invoke
    various operations on the object, as described in the section for the
    [Instance API](#section3)\.

# <a name='section3'></a>Instance API

The API of transform core instances provides only two methods, both
corresponding to transform handler commands \(For reference see [TIP
230](http:/tip\.tcl\.tk/230)\)\. They expect to be called from whichever object
instance the transform core was made a part of\.

  - <a name='2'></a>*objectName* __initialize__ *thechannel* *mode*

    This method implements standard behaviour for the __initialize__ method
    of transform handlers\. Using introspection it finds the handler methods
    supported by the instance and returns a list containing their names, as
    expected by the support for reflected transformation in the Tcl core\.

    It further remembers the channel handle in an instance variable for access
    by sub\-classes\.

  - <a name='3'></a>*objectName* __finalize__ *thechannel*

    This method implements standard behaviour for the __finalize__ method of
    channel handlers\. It simply destroys itself\.

  - <a name='4'></a>*objectName* __destroy__

    Destroying the transform core instance closes the channel and transform it
    was initialized for, see the method __initialize__\. When destroyed from
    within a call of __finalize__ this does not happen, under the assumption
    that the channel and transform are being destroyed by Tcl\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[reflected channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
219](\.\./\.\./\.\./\.\./index\.md\#tip\_219), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/adler32.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

[//000000001]: # (tcl::transform::adler32 \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'adler32\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::adler32\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::adler32 \- Adler32 transformation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::adler32 ?1?  

[__::tcl::transform::adler32__ *chan* __\-option__ *value*\.\.\.](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::adler32__ package provides a command creating a
channel transformation which passes the read and written bytes through unchanged
\(like __[tcl::transform::identity](identity\.md)__\), but additionally
continuously computes the adler32 checksums of the data it has seen for each
direction and stores them in Tcl variables specified at construction time\.

Related transformations in this module are
__[tcl::transform::counter](vt\_counter\.md)__,
__[tcl::transform::crc32](vt\_crc32\.md)__,
__[tcl::transform::identity](identity\.md)__, and
__[tcl::transform::observe](observe\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::adler32__ *chan* __\-option__ *value*\.\.\.

    This command creates an adler32 checksumming transformation on top of the
    channel *chan* and returns its handle\. The accepted options are

      * __\-read\-variable__ varname

        The value of the option is the name of a global or namespaced variable,
        the location where the transformation has to store the adler32 checksum
        of the data read from the channel\.

        If not specified, or the empty string, the checksum of the read
        direction is not saved\.

      * __\-write\-variable__ varname

        The value of the option is the name of a global or namespaced variable,
        the location where the transformation has to store the adler32 checksum
        of the data written to the channel\.

        If not specified, or the empty string, the checksum of the write
        direction is not saved\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[adler32](\.\./\.\./\.\./\.\./index\.md\#adler32), [channel
transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[checksum](\.\./\.\./\.\./\.\./index\.md\#checksum), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/hex.md.

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
89
90
91
92
93
94
95

[//000000001]: # (tcl::transform::hex \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'hex\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::hex\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::hex \- Hexadecimal encoding transformation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::hex ?1?  

[__::tcl::transform::hex__ *chan*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::hex__ package provides a command creating a channel
transformation which hex encodes data written to it, and decodes the data read
from it\.

A related transformations in this module is
__[tcl::transform::base64](vt\_base64\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::hex__ *chan*

    This command creates a hex transformation on top of the channel *chan* and
    returns its handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[hexadecimal](\.\./\.\./\.\./\.\./index\.md\#hexadecimal), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/identity.md.

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
89
90
91
92
93
94
95
96
97
98
99
100

[//000000001]: # (tcl::transform::identity \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'identity\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::identity\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::identity \- Identity transformation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::identity ?1?  

[__::tcl::transform::identity__ *chan*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::identity__ package provides a command creating an
identity channel transformation, which does nothing but pass the read and
written bytes through it unchanged\. Not really useful in an application, however
as the prototypical observer transformation its code is a useful starting point
for any other observers people may wish to write\.

The transformations in this module which derived from identity's code are
__[tcl::transform::adler32](adler32\.md)__,
__[tcl::transform::counter](vt\_counter\.md)__,
__[tcl::transform::crc32](vt\_crc32\.md)__, and
__[tcl::transform::observe](observe\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::identity__ *chan*

    This command creates an identity transformation on top of the channel
    *chan* and returns its handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[identity](\.\./\.\./\.\./\.\./index\.md\#identity), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/limitsize.md.

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
89
90
91
92
93
94
95
96
97

[//000000001]: # (tcl::transform::limitsize \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'limitsize\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::limitsize\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::limitsize \- limiting input

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::limitsize ?1?  

[__::tcl::transform::limitsize__ *chan* *max*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::limitsize__ package provides a command creating a
channel transformation which limits the number of characters which can be read
from the channel\. A generator for an artificial EOF\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::limitsize__ *chan* *max*

    This command creates a size limiting transformation on top of the channel
    *chan* and returns its handle\.

    *max* is the number of bytes which can be read from the channel before EOF
    is signaled by the transformation\. Note that popping the transformation
    clears the EOF it generated as well\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[limitsize](\.\./\.\./\.\./\.\./index\.md\#limitsize), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [size
limit](\.\./\.\./\.\./\.\./index\.md\#size\_limit), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/observe.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102

[//000000001]: # (tcl::transform::observe \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'observe\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::observe\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::observe \- Observer transformation, stream copy

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::observe ?1?  

[__::tcl::transform::observe__ *chan* *logw* *logr*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::observer__ package provides a command creating a
channel transformation which passes the read and written bytes through unchanged
\(like __[tcl::transform::identity](identity\.md)__\), but additionally
copies the data it has seen for each direction into channels specified at
construction time\.

Related transformations in this module are
__[tcl::transform::adler32](adler32\.md)__,
__[tcl::transform::counter](vt\_counter\.md)__,
__[tcl::transform::crc32](vt\_crc32\.md)__, and
__[tcl::transform::identity](identity\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::observe__ *chan* *logw* *logr*

    This command creates an observer transformation on top of the channel
    *chan* and returns its handle\. The channel handles *logr* and *logw*
    are there the data is copied to\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[observer](\.\./\.\./\.\./\.\./index\.md\#observer), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [stream
copy](\.\./\.\./\.\./\.\./index\.md\#stream\_copy), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/rot.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

[//000000001]: # (tcl::transform::rot \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'rot\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::rot\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::rot \- rot\-encryption

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::rot ?1?  

[__::tcl::transform::rot__ *chan* *key*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::rot__ package provides a command creating a channel
transformation which performs primitive encryption \(on writing\) and decryption
\(on reading\) on the alphabetic characters\. The algorithm is the Caesar\-cipher, a
specific variant of which is rot13\.

A related transformations in this module is
__[tcl::transform::otp](vt\_otp\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::rot__ *chan* *key*

    This command creates a rot encryption transformation on top of the channel
    *chan* and returns its handle\.

    The "*key*" specifies how far characters are rotated in the alphabet, and
    is wrapped to the range "0\.\.\.25"\.

    Note that this transformation affects only bytes in the ranges ASCII
    65\.\.\.90, and 97\.\.\.122, i\.e\. the upper\- and lower\-case alphabetic characters,
    i\.e\. "A\.\.\.Z" and "a\.\.\.z"\. All other bytes are passed through unchanged\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[caesar cipher](\.\./\.\./\.\./\.\./index\.md\#caesar\_cipher), [channel
transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[cipher](\.\./\.\./\.\./\.\./index\.md\#cipher),
[decryption](\.\./\.\./\.\./\.\./index\.md\#decryption),
[encryption](\.\./\.\./\.\./\.\./index\.md\#encryption), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel),
[rot](\.\./\.\./\.\./\.\./index\.md\#rot), [rot13](\.\./\.\./\.\./\.\./index\.md\#rot13),
[tip 230](\.\./\.\./\.\./\.\./index\.md\#tip\_230),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/spacer.md.

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
89
90
91
92
93
94
95
96
97

[//000000001]: # (tcl::transform::spacer \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'spacer\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::spacer\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::spacer \- Space insertation and removal

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::spacer ?1?  

[__::tcl::transform::spacer__ *chan* *n* ?*space*?](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::spacer__ package provides a command creating a channel
transformation which adds spacing to the data written to it, and removes such
spacing from the data read from it\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::spacer__ *chan* *n* ?*space*?

    This command creates a spacer transformation on top of the channel *chan*
    and returns its handle\.

    The *space* character sequence will be added every *n* bytes of data
    written, and on the read side the same is done in reverse, removing the
    spacing\. If *space* is not specified it defaults to a single space
    character \(ASCII 32\)\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[reflected channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel),
[spacing](\.\./\.\./\.\./\.\./index\.md\#spacing), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/tcllib_zlib.md.

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
89
90
91
92
93
94
95
96
97
98

[//000000001]: # (tcl::transform::zlib \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'tcllib\_zlib\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::zlib\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::zlib \- zlib \(de\)compression

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::zlib ?1?  

[__::tcl::transform::zlib__ *chan* ?*level*?](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::zlib__ package provides a command creating a channel
transformation which zlib compresses the written data, and decompresses on
reading\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::zlib__ *chan* ?*level*?

    This command creates a zlib compressor transformation on top of the channel
    *chan* and returns its handle\.

    The *level* specifies how much effort is put into the compression, from
    __0__ to __9__, and defaults to __4__\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[compression](\.\./\.\./\.\./\.\./index\.md\#compression),
[decompression](\.\./\.\./\.\./\.\./index\.md\#decompression), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230), [tip
234](\.\./\.\./\.\./\.\./index\.md\#tip\_234),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel),
[zlib](\.\./\.\./\.\./\.\./index\.md\#zlib)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/vt_base64.md.

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
89
90
91
92
93
94
95
96

[//000000001]: # (tcl::transform::base64 \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'vt\_base64\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::base64\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::base64 \- Base64 encoding transformation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::base64 ?1?  

[__::tcl::transform::base64__ *chan*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::base64__ package provides a command creating a channel
transformation which base64 encodes data written to it, and decodes the data
read from it\.

A related transformations in this module is
__[tcl::transform::hex](hex\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::base64__ *chan*

    This command creates a base64 transformation on top of the channel *chan*
    and returns its handle\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[base64](\.\./\.\./\.\./\.\./index\.md\#base64), [channel
transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230), [tip
317](\.\./\.\./\.\./\.\./index\.md\#tip\_317),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/vt_counter.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

[//000000001]: # (tcl::transform::counter \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'vt\_counter\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::counter\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::counter \- Counter transformation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::counter ?1?  

[__::tcl::transform::counter__ *chan* __\-option__ *value*\.\.\.](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::counterr__ package provides a command creating a
channel transformation which passes the read and written bytes through unchanged
\(like __[tcl::transform::identity](identity\.md)__\), but additionally
counts the bytes it has seen for each direction and stores these counts in Tcl
variables specified at construction time\.

Related transformations in this module are
__[tcl::transform::adler32](adler32\.md)__,
__[tcl::transform::crc32](vt\_crc32\.md)__,
__[tcl::transform::identity](identity\.md)__, and
__[tcl::transform::observe](observe\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::counter__ *chan* __\-option__ *value*\.\.\.

    This command creates a counter transformation on top of the channel *chan*
    and returns its handle\. The accepted options are

      * __\-read\-variable__ varname

        The value of the option is the name of a global or namespaced variable,
        the location where the transformation has to store the byte count of the
        data read from the channel\.

        If not specified, or the empty string, the counter of the read direction
        is not saved\.

      * __\-write\-variable__ varname

        The value of the option is the name of a global or namespaced variable,
        the location where the transformation has to store the byte count of the
        data written to the channel\.

        If not specified, or the empty string, the counter of the write
        direction is not saved\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[counter](\.\./\.\./\.\./\.\./index\.md\#counter), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/vt_crc32.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

[//000000001]: # (tcl::transform::crc32 \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'vt\_crc32\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::crc32\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::crc32 \- Crc32 transformation

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::crc32 ?1?  

[__::tcl::transform::crc32__ *chan* __\-option__ *value*\.\.\.](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::crc32__ package provides a command creating a channel
transformation which passes the read and written bytes through unchanged \(like
__[tcl::transform::identity](identity\.md)__\), but additionally
continuously computes the crc32 checksums of the data it has seen for each
direction and stores them in Tcl variables specified at construction time\. The
checksum in question is zlib's crc32\.

Related transformations in this module are
__[tcl::transform::adler32](adler32\.md)__,
__[tcl::transform::counter](vt\_counter\.md)__,
__[tcl::transform::identity](identity\.md)__, and
__[tcl::transform::observe](observe\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::crc32__ *chan* __\-option__ *value*\.\.\.

    This command creates a crc32 checksumming transformation on top of the
    channel *chan* and returns its handle\. The accepted options are

      * __\-read\-variable__ varname

        The value of the option is the name of a global or namespaced variable,
        the location where the transformation has to store the crc32 checksum of
        the data read from the channel\.

        If not specified, or the empty string, the checksum of the read
        direction is not saved\.

      * __\-write\-variable__ varname

        The value of the option is the name of a global or namespaced variable,
        the location where the transformation has to store the crc32 checksum of
        the data written to the channel\.

        If not specified, or the empty string, the checksum of the write
        direction is not saved\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[checksum](\.\./\.\./\.\./\.\./index\.md\#checksum),
[crc32](\.\./\.\./\.\./\.\./index\.md\#crc32), [reflected
channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































Deleted embedded/md/tcllib/files/modules/virtchannel_transform/vt_otp.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

[//000000001]: # (tcl::transform::otp \- Reflected/virtual channel support)
[//000000002]: # (Generated from file 'vt\_otp\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (tcl::transform::otp\(n\) 1 tcllib "Reflected/virtual channel support")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

tcl::transform::otp \- Encryption via one\-time pad

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require tcl::transform::core ?1?  
package require tcl::transform::otp ?1?  

[__::tcl::transform::otp__ *chan* *keychanw* *keychanr*](#1)  

# <a name='description'></a>DESCRIPTION

The __tcl::transform::otp__ package provides a command creating a channel
transformation which uses externally provided one\-time pads to perform
encryption \(on writing\) and decryption \(on reading\)\.

A related transformations in this module is
__[tcl::transform::rot](rot\.md)__\.

The internal __[TclOO](\.\./\.\./\.\./\.\./index\.md\#tcloo)__ class implementing
the transform handler is a sub\-class of the
__[tcl::transform::core](\.\./virtchannel\_core/transformcore\.md)__
framework\.

# <a name='section2'></a>API

  - <a name='1'></a>__::tcl::transform::otp__ *chan* *keychanw* *keychanr*

    This command creates a one\-time pad based encryption transformation on top
    of the channel *chan* and returns its handle\.

    The two channels *keychanw* and *keychanr* contain the one\-time pads for
    the write and read directions, respectively\. Their contents are reads and
    xored with the bytes written to and read from the channel\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *virtchannel* of the
[Tcllib Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report
any ideas for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[channel transformation](\.\./\.\./\.\./\.\./index\.md\#channel\_transformation),
[cipher](\.\./\.\./\.\./\.\./index\.md\#cipher),
[decryption](\.\./\.\./\.\./\.\./index\.md\#decryption),
[encryption](\.\./\.\./\.\./\.\./index\.md\#encryption), [one time
pad](\.\./\.\./\.\./\.\./index\.md\#one\_time\_pad), [otp](\.\./\.\./\.\./\.\./index\.md\#otp),
[reflected channel](\.\./\.\./\.\./\.\./index\.md\#reflected\_channel), [tip
230](\.\./\.\./\.\./\.\./index\.md\#tip\_230),
[transformation](\.\./\.\./\.\./\.\./index\.md\#transformation), [virtual
channel](\.\./\.\./\.\./\.\./index\.md\#virtual\_channel),
[xor](\.\./\.\./\.\./\.\./index\.md\#xor)

# <a name='category'></a>CATEGORY

Channels

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































Deleted embedded/md/tcllib/files/modules/websocket/websocket.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508

[//000000001]: # (websocket \- websocket client and server)
[//000000002]: # (Generated from file 'websocket\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (websocket\(n\) 1\.3\.1 tcllib "websocket client and server")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

websocket \- Tcl implementation of the websocket protocol

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Callbacks](#section2)

  - [API](#section3)

  - [Examples](#section4)

  - [TLS Security Considerations](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Category](#category)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require http 2\.7  
package require logger  
package require sha1  
package require base64  
package require websocket ?1\.3\.1?  

[__::websocket::open__ *url* *handler* ?*options*?](#1)  
[__::websocket::send__ *sock* *type* ?*msg*? ?*final*?](#2)  
[__::websocket::server__ *sock*](#3)  
[__::websocket::live__ *sock* *path* *cb* ?*proto*?](#4)  
[__::websocket::test__ *srvSock* *cliSock* *path* ?*hdrs*? ?*qry*?](#5)  
[__::websocket::upgrade__ *sock*](#6)  
[__::websocket::takeover__ *sock* *handler* ?*server*?](#7)  
[__::websocket::conninfo__ *sock* *what*](#8)  
[__::websocket::find__ ?*host*? ?*port*?](#9)  
[__::websocket::configure__ *sock* *args*](#10)  
[__::websocket::loglevel__ ?*loglvl*?](#11)  
[__::websocket::close__ *sock* ?*code*? ?*reason*?](#12)  

# <a name='description'></a>DESCRIPTION

NOTE: THIS DOCUMENTATION IS WORK IN PROGRESS\.\.\.

The websocket library is a pure Tcl implementation of the WebSocket
specification covering the needs of both clients and servers\. Websockets provide
a way to upgrade a regular HTTP connection into a long\-lived and continuous
binary or text communication between the client and the server\. The library
offers a high\-level interface to receive and send data as specified in RFC 6455
\(v\. 13 of the protocol\), relieving callers from all necessary protocol framing
and reassembly\. It implements the ping facility specified by the standard,
together with levers to control it\. Pings are server\-driven and ensure the
liveness of the connection across home \(NAT\) networks\. The library has a number
of introspection facilities to inquire about the current state of the
connection, but also to receive notifications of incoming pings, if necessary\.
Finally, the library contains a number of helper procedures to facilitate the
upgrading handshaking in existing web servers\.

Central to the library is the procedure __websocket::takeover__ that will
take over a regular socket and treat it as a WebSocket, thus performing all
necessary protocol framing, packetisation and reassembly in servers and clients\.
The procedure also takes a handler, a command that will be called back each time
a \(possibly reassembled\) packet from the remote end is ready for delivery at the
original caller\. While exported by the package, the command
__websocket::takeover__ is seldom called in applications, since the package
provides other commands that are specifically tuned for the needs of clients and
servers\.

Typically, clients will open a connection to a remote server by providing a
WebSocket URL \(*ws:* or *wss:* schemes\) and the handler described above to
the command __websocket::open__\. The opening procedure is a wrapper around
the latest http::geturl implementations: it arranges to keep the socket created
within the http library opened for reuse, but confiscates it from its \(internal\)
map of known sockets for its own use\.

Servers will start by registering themselves through the command
__::websocket::server__ and a number of handlers for paths using the command
__::websocket::live__\. Then for each incoming client connection, they should
test the incoming request to detect if it is an upgrade request using
__::websocket::test__ and perform the final handshake to place the socket
connection under the control of the websocket library and its central procedure
using __::websocket::upgrade__\.

Apart from these main commands, the package provides a number of commands for
introspection and basic operations on the websockets that it has under its
control\. As WebSockets connections are long\-lived, most remaining communication
with the library will be by way of callbacks, i\.e\. commands that are triggered
whenever important events within the library have occur, but mostly whenever
data has been received on a WebSocket\.

# <a name='section2'></a>Callbacks

A number of commands of the library take a handler handler command as an
argument, a command which will be called back upon reception of data, but also
upon important events within the library or events resulting from control
messages sent by the remote end\. For each callback being performed, the
following arguments will be appended:

  - *sock*

    The identifier of the WebSocket, as returned for example by
    __::websocket::open__

  - *type*

    A textual type describing the event or message content, can be one of the
    following

      * __text__

        Complete text message

      * __binary__

        Complete binary message

      * __ping__

        Incoming ping message

      * __connect__

        Notification of successful connection to server

      * __disconnect__

        Disconnection from remote end

      * __close__

        Pending closure of connection

  - *msg*

    Will contain the data of the message, whenever this is relevant, i\.e\. when
    the *type* is __text__, __binary__ or __ping__ and whenever
    there is data available\.

# <a name='section3'></a>API

  - <a name='1'></a>__::websocket::open__ *url* *handler* ?*options*?

    This command is used in clients to open a WebSocket to a remote
    websocket\-enabled HTTP server\. The URL provided as an argument in *url*
    should start with ws: or wss:, which are the WebSockets counterpart of http:
    and https:\. The *handler* is a command that will be called back on data
    reception or whenever important events occur during the life of the
    websocket\. __::websocket::open__ will return a socket which serves as
    both the identifier of the websocket and of the physical low\-level socket to
    the server\. This socket can be used in a number of other commands for
    introspection or for controlling the behaviour of the library\. Being
    essentially a wrapper around the __::http::geturl__ command, this
    command provides mostly the same set of dash\-led options than
    __::http::geturl__\. Documented below are the options that differ from
    __::http::geturl__ and which are specific to the WebSocket library\.

      * \-headers

        This option is supported, knowing that a number of headers will be
        automatically added internally in the library in order to be able to
        handshake the upgrading of the socket from a regular HTTP socket to a
        WebSocket with the server\.

      * \-validate

        This option is not supported as it has no real point for WebSockets\.

      * \-handler

        This option is used internally by the websocket library and cannot be
        used\.

      * \-command

        This option is used internally by the websocket library and cannot be
        used\.

      * \-protocol

        This option specifies a list of application protocols to handshake with
        the server\. This protocols might help the server triggering application
        specific features\.

      * \-timeout

        This option is supported, but will implemented as part of the library to
        enable a number of finalising cleanups\.

  - <a name='2'></a>__::websocket::send__ *sock* *type* ?*msg*? ?*final*?

    This command will send a fragment or a control message to the remote end of
    the WebSocket identified by *sock*\. The type of the message specified in
    *type* can either be an integer according to the specification or
    \(preferrably\) one of the following case insensitive strings: "text",
    "binary" or "ping"\. The content of the message to send to the remote end is
    contained in *msg* and message fragmentation is made possible by the
    setting the argument *final* to non\-true, knowing that the type of each
    fragment has then to be the same\. The command returns the number of bytes
    that were effectively sent, or \-1 on errors\. Serious errors, such as when
    *sock* does not identify a known WebSocket or when the connection is not
    stable yet will generate errors that must be catched\.

  - <a name='3'></a>__::websocket::server__ *sock*

    This command registers the \(accept\) socket *sock* as the identifier fo an
    HTTP server that is capable of doing WebSockets\. Paths onto which this
    server will listen for incoming connections should be declared using
    __::websocket::live__\.

  - <a name='4'></a>__::websocket::live__ *sock* *path* *cb* ?*proto*?

    This procedure registers callbacks that will be performed on a WebSocket
    compliant server registered with __::websocket::server__ whenever a
    client connects to a matching path and protocol\. *sock* is the listening
    socket of the websocket compliant server declared using
    __::websocket::server__\. *path* is a glob\-style path to match in
    client request, whenever this will occur\. *cb* is the command to callback
    \(see Callbacks\)\. *proto* is a glob\-style protocol name matcher\.

  - <a name='5'></a>__::websocket::test__ *srvSock* *cliSock* *path* ?*hdrs*? ?*qry*?

    This procedure will test if the connection from an incoming client on socket
    *cliSock* and on the path *path* is the opening of a WebSocket stream
    within a known server *srvSock*\. The incoming request is not upgraded at
    once, instead a \(temporary\) context for the incoming connection is created\.
    This allows server code to perform a number of actions, if necessary, before
    the WebSocket stream connection goes live\. The text is made by analysing the
    content of the headers *hdrs* which should contain a dictionary list of
    the HTTP headers of the incoming client connection\. The command will return
    __1__ if this is an incoming WebSocket upgrade request and __0__
    otherwise\.

  - <a name='6'></a>__::websocket::upgrade__ *sock*

    Upgrade the socket *sock* that had been deemed by
    __::websocket::test__ to be a WebSocket connection request to a true
    WebSocket as recognised by this library\. As a result, the necessary
    connection handshake will be sent to the client, and the command will
    arrange for relevant callbacks to be made during the life of the WebSocket,
    notably using the specifications described by __::websocket::live__\.

  - <a name='7'></a>__::websocket::takeover__ *sock* *handler* ?*server*?

    Take over the existing opened socket *sock* to implement sending and
    receiving WebSocket framing on top of the socket\. The procedure arranges for
    *handler* to be called back whenever messages, control messages or other
    important internal events are received or occured\. *server* defaults to
    __0__ and can be set to __1__ \(or a boolean that evaluates to true\)
    to specify that this is a WebSocket within a server\. Apart from
    specificities in the protocol, servers should ping their clients at regular
    intervals in order to keep the connection opened at all time\. When
    *server* is set to true, the library will arrange to send these pings
    automatically\.

  - <a name='8'></a>__::websocket::conninfo__ *sock* *what*

    Provides callers with some introspection facilities in order to get some
    semi\-internal information about an existing websocket connection\. Depending
    on the value of the *what* argument, the procedure returns the following
    piece of information:

      * __peername__

        Name \(preferred\) or IP of remote end\.

      * __sockname__

        or __name__ Name or IP of local end\.

      * __closed__

        __1__ if the connection is closed, __0__ otherwise

      * __client__

        __1__ if the connection is a client websocket, __0__ otherwise

      * __server__

        __1__ if the connection is a server websocket, __0__ otherwise

      * __type__

        __server__ if the connection is a server websocket, __client__
        otherwise\.

      * __handler__

        The handler command associated to the websocket

      * __state__

        The state of the websocket, which can be one of:

          + __CONNECTING__

            Connection to remote end is in progress\.

          + __CONNECTED__

            Connection is connected to remote end\.

          + __CLOSED__

            Connection is closed\.

  - <a name='9'></a>__::websocket::find__ ?*host*? ?*port*?

    Look among existing websocket connections for the ones that match the
    hostname and port number filters passed as parameters\. This lookup takes the
    remote end into account and the *host* argument is matched both against
    the hostname \(whenever available\) and the IP address of the remote end\. Both
    the *host* and *port* arguments are glob\-style string matching filters
    and default to __\*__, i\.e\. will match any host and/or port number\.

  - <a name='10'></a>__::websocket::configure__ *sock* *args*

    This command takes a number of dash\-led options \(and their values\) to
    configure the behaviour of an existing websocket connection\. The recognised
    options are the following \(they can be shortened to the lowest common
    denominator\):

      * __\-keepalive__

        is the number of seconds between each keepalive pings being sent along
        the connection\. A zero or negative number will effectively turn off the
        feature\. In servers, __\-keepalive__ defaults to 30 seconds, and in
        clients, no pings are initiated\.

      * __\-ping__

        is the text that is used during the automated pings\. This text defaults
        to the empty string, leading to an empty ping\.

  - <a name='11'></a>__::websocket::loglevel__ ?*loglvl*?

    Set or query the log level of the library, which defaults to error\. Logging
    is built on top of the logger module, and the library makes use of the
    following levels: __debug__, __info__, __notice__, __warn__
    and __error__\. When called with no argument, this procedure will simply
    return the current log level\. Otherwise *loglvl* should contain the
    desired log level\.

  - <a name='12'></a>__::websocket::close__ *sock* ?*code*? ?*reason*?

    Gracefully close a websocket that was directly or indirectly passed to
    __::websocket::takeover__\. The procedure will optionally send the
    *code* and describing *reason* as part of the closure handshake\. Good
    defaults are provided, so that reasons for a number of known codes will be
    sent back\. Only the first 125 characters of a reason string will be kept and
    sent as part of the handshake\. The known codes are:

      * __1000__

        Normal closure \(the default *code* when none provided\)\.

      * __1001__

        Endpoint going away

      * __1002__

        Protocol Error

      * __1003__

        Received incompatible data type

      * __1006__

        Abnormal closure

      * __1007__

        Received data not consistent with type

      * __1008__

        Policy violation

      * __1009__

        Received message too big

      * __1010__

        Missing extension

      * __1011__

        Unexpected condition

      * __1015__

        TLS handshake error

# <a name='section4'></a>Examples

The following example opens a websocket connection to the echo service, waits
400ms to ensure that the connection is really established and sends a single
textual message which should be echoed back by the echo service\. A real example
would probably use the __connect__ callback to know when connection to the
remote server has been establish and would only send data at that time\.

    package require websocket
    ::websocket::loglevel debug

    proc handler { sock type msg } {
        switch -glob -nocase -- $type {
    	co* {
    	    puts "Connected on $sock"
    	}
    	te* {
    	    puts "RECEIVED: $msg"
    	}
    	cl* -
    	dis* {
    	}
        }

    }

    proc test { sock } {
        puts "[::websocket::conninfo $sock type] from [::websocket::conninfo $sock sockname] to [::websocket::conninfo $sock peername]"

        ::websocket::send $sock text "Testing, testing..."
    }

    set sock [::websocket::open ws://echo.websocket.org/ handler]
    after 400 test $sock
    vwait forever

# <a name='section5'></a>TLS Security Considerations

This package uses the __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ package to
handle the security for __https__ urls and other socket connections\.

Policy decisions like the set of protocols to support and what ciphers to use
are not the responsibility of __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__, nor
of this package itself however\. Such decisions are the responsibility of
whichever application is using the package, and are likely influenced by the set
of servers the application will talk to as well\.

For example, in light of the recent [POODLE
attack](http://googleonlinesecurity\.blogspot\.co\.uk/2014/10/this\-poodle\-bites\-exploiting\-ssl\-30\.html)
discovered by Google many servers will disable support for the SSLv3 protocol\.
To handle this change the applications using
__[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ must be patched, and not this
package, nor __[TLS](\.\./\.\./\.\./\.\./index\.md\#tls)__ itself\. Such a patch
may be as simple as generally activating __tls1__ support, as shown in the
example below\.

    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *websocket* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[http](\.\./\.\./\.\./\.\./index\.md\#http)

# <a name='keywords'></a>KEYWORDS

[http](\.\./\.\./\.\./\.\./index\.md\#http),
[internet](\.\./\.\./\.\./\.\./index\.md\#internet),
[net](\.\./\.\./\.\./\.\./index\.md\#net), [rfc
6455](\.\./\.\./\.\./\.\./index\.md\#rfc\_6455)

# <a name='category'></a>CATEGORY

Networking
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/wip/wip.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398

[//000000001]: # (wip \- Word Interpreter)
[//000000002]: # (Generated from file 'wip\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2007\-2010 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (wip\(n\) 2\.2 tcllib "Word Interpreter")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

wip \- Word Interpreter

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [GENERAL BEHAVIOUR](#section2)

  - [CLASS API](#section3)

  - [OBJECT API](#section4)

  - [EXAMPLES](#section5)

  - [Bugs, Ideas, Feedback](#section6)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require wip ?2\.2?  
package require snit ?1\.3?  
package require struct::set  

[__::wip__ *wipName* *engine* *arg*\.\.\.](#1)  
[__def__ *name*](#2)  
[__def__ *name* *method\_prefix*](#3)  
[__wipName__ *option* ?*arg arg \.\.\.*?](#4)  
[__wip::dsl__ ?*suffix*?](#5)  
[*wipName* __def__ *name* ?*method\_prefix*?](#6)  
[*wipName* __defl__ *names*](#7)  
[*wipName* __defd__ *dict*](#8)  
[*wipName* __deflva__ *name*\.\.\.](#9)  
[*wipName* __defdva__ \(*name* *method\_prefix*\)\.\.\.](#10)  
[*wipName* __undefl__ *names*](#11)  
[*wipName* __undefva__ *name*\.\.\.](#12)  
[*wipName* __unknown__ *cmdprefix*](#13)  
[*wipName* __runl__ *wordlist*](#14)  
[*wipName* __run__ *word*\.\.\.](#15)  
[*wipName* __run\_next__](#16)  
[*wipName* __run\_next\_while__ *acceptable*](#17)  
[*wipName* __run\_next\_until__ *rejected*](#18)  
[*wipName* __run\_next\_if__ *acceptable*](#19)  
[*wipName* __run\_next\_ifnot__ *rejected*](#20)  
[*wipName* __next__](#21)  
[*wipName* __peek__](#22)  
[*wipName* __peekall__](#23)  
[*wipName* __insertl__ *at* *wordlist*](#24)  
[*wipName* __replacel__ *wordlist*](#25)  
[*wipName* __pushl__ *wordlist*](#26)  
[*wipName* __addl__ *wordlist*](#27)  
[*wipName* __insert__ *at* *word*\.\.\.](#28)  
[*wipName* __replace__ *word*\.\.\.](#29)  
[*wipName* __push__ *word*\.\.\.](#30)  
[*wipName* __add__ *word*\.\.\.](#31)  

# <a name='description'></a>DESCRIPTION

This package provides a micro interpreter for lists of words\. Domain specific
languages based on this will have a bit of a Forth feel, with the input stream
segmented into words and any other structuring left to whatever the language
desired\. Note that we have here in essence only the core dispatch loop, and no
actual commands whatsoever, making this definitely only a Forth feel and not an
actual Forth\.

The idea is derived from Colin McCormack's
__[treeql](\.\./treeql/treeql\.md)__ processor, modified to require less
boiler plate within the command implementations, at the expense of, likely,
execution speed\. In addition the interface between processor core and commands
is more complex too\.

# <a name='section2'></a>GENERAL BEHAVIOUR

Word interpreters have a mappping from the names of the language commands they
shall recognize to the methods in the engine to invoke for them, and possibly
fixed arguments for these methods\. This mapping is largely static, however it is
possible to change it during the execution of a word list \(= program\)\.

At the time a language command is defined the word interpreter will use
__[snit](\.\./snit/snit\.md)__'s introspection capabilities to determine
the number of arguments expected by the method of the egnine, and together with
the number of fixed arguments supplied in the method prefix of the mapping it
then knows how many arguments the language command is expecting\. This is the
command's *arity*\. Variable\-argument methods \(i\.e\. with the last argument
named *args*\) are *not* allowed and will cause the word interpreter to throw
an error at definition time\.

Note that while I said __[snit](\.\./snit/snit\.md)__'s abilities the
engine object can be written in any way, as long as it understands the method
__info args__, which takes a method name and returns the list of arguments
for that method\.

When executing a list of words \(aka program\) the first word is always taken as
the name of a language command, and the next words as its arguments, per the
*arity* of the command\. Command and argument words are removed from the list
and then associated method of the engine is executed with the argument words\.
The process then repeats using the then\-first word of the list\.

Note that the methods implementing the language commands may have full access to
the list of words and are allowed to manipulate as they see fit\.

  1. This means, for example, that while we cannot specify variable\-argument
     methods directly they can consume words after their fixed arguments before
     returning to the execution loop\. This may be under the control of their
     fixed arguments\.

  1. Another possibility is the use of method __run\_next__ and its variants
     to execute commands coming after the current command, changing the order of
     execution\.

  1. Execution can be further changed by use of the program accessor methods
     which allow a command implementation to modify the remaining list of words
     \(insert, replace, prepend, append words\) without executing them
     immediately\.

  1. At last the basic __run__ methods save and restore an existing list of
     words when used, enabling recursive use from within command
     implementations\.

# <a name='section3'></a>CLASS API

The main command of the package is:

  - <a name='1'></a>__::wip__ *wipName* *engine* *arg*\.\.\.

    The command creates a new word interpreter object with an associated global
    Tcl command whose name is *wipName*\. If however the string __%AUTO%__
    was used as object name the package will generate its own unique name for
    the object\.

    The *engine* is the object the word interpreter will dispatch all
    recognized commands to, and the *arg*uments are a word list which defines
    an initial mapping from language words to engine methods\.

    The recognized language of this word list is

      * <a name='2'></a>__def__ *name*

        Defines *name* as command of the language, to be mapped to a method of
        the *engine* having the same name\.

      * <a name='3'></a>__def__ *name* *method\_prefix*

        Defines *name* as command of the language, to be mapped to the method
        of the *engine* named in the *method\_prefix*\.

    The returned command may be used to invoke various operations on the object\.
    It has the following general form:

      * <a name='4'></a>__wipName__ *option* ?*arg arg \.\.\.*?

        *Option* and the *arg*s determine the exact behavior of the command\.

The package additionally exports the command:

  - <a name='5'></a>__wip::dsl__ ?*suffix*?

    This command is for use within snit types which wish to use one or more wip
    interpreters as a component\. Use within the type definition installs most of
    the boilerplate needed to setup and use a word interpreter\.

    It installs a component named *wip*, and a method __wip\_setup__ for
    initializing it\. This method has to be called from within the constructor of
    the type using the word interpreter\. If further installs a series of
    procedures which make the object API of the word interpreter directly
    available to the type's methods, without having to specify the component\.

    *Note* that this does and cannot install the language to interpret, i\.e\.
    the mapping from words to engine methods\.

    It is possible to instantiate multiple word interpreter components within a
    type by using different suffices as arguments to the command\. In that case
    the name of the component changes to 'wip\___$suffix__', the setup
    command becomes 'wip\___$suffix__\_setup' and all the procedures also get
    the suffix '\___$suffix__'\.

# <a name='section4'></a>OBJECT API

The following commands are possible for word interpreter objects:

  - <a name='6'></a>*wipName* __def__ *name* ?*method\_prefix*?

    Defines a language command *name* and maps it to the method named in the
    engine's *method\_prefix*\. If the *method\_prefix* name is not specified
    it is simply the name of the language command\.

  - <a name='7'></a>*wipName* __defl__ *names*

    Defines a series of language commands, specified through the list of
    *names*, all of which are mapped to engine methods of the same name\.

  - <a name='8'></a>*wipName* __defd__ *dict*

    Defines a series of language commands, specified through the dictionary
    *dict* of names and method prefixes\.

  - <a name='9'></a>*wipName* __deflva__ *name*\.\.\.

    As method __defl__, however the list of names is specified through
    multiple arguments\.

  - <a name='10'></a>*wipName* __defdva__ \(*name* *method\_prefix*\)\.\.\.

    As method __defd__, however the dictionary of names and method prefixes
    is specified through multiple arguments\.

  - <a name='11'></a>*wipName* __undefl__ *names*

    Removes the named series of language commands from the mapping\.

  - <a name='12'></a>*wipName* __undefva__ *name*\.\.\.

    As method __undefl__, however the list of names is specified through
    multiple arguments\.

  - <a name='13'></a>*wipName* __unknown__ *cmdprefix*

    Sets the handler for unknown words to *cmdprefix*\. This command prefix
    takes one argument, the current word, and either throws some error, or
    returns the result of executing the word, as defined by the handler\. The
    default handler simply throws an error\.

  - <a name='14'></a>*wipName* __runl__ *wordlist*

    Treats the list of words in *wordlist* as a program and executes the
    contained command one by one\. The result of the command executed last is
    returned as the result of this command\.

    The *wordlist* is stored in the object for access by the other
    *run*\-methods, and the general program accessor methods \(see below\)\. A
    previously stored wordlist is saved during the execution of this method and
    restored before it returns\. This enables the recursive execution of word
    lists within word lists\.

  - <a name='15'></a>*wipName* __run__ *word*\.\.\.

    As method __runl__, however the list of words to execute is specified
    through multiple arguments\.

  - <a name='16'></a>*wipName* __run\_next__

    Low\-level method\. Determines the next word in the list of words, and its
    arguments, and then executes it\. The result of the executed word is the
    result of this method\.

    Exposed for use within command implementations\. The methods __run__ and
    __runl__ use it to execute words until their word list is exhausted\.

  - <a name='17'></a>*wipName* __run\_next\_while__ *acceptable*

    Low\-level method\. Invokes the method __run\_next__ as long as the next
    word is in the set of *acceptable* words, and the program is not empty\.
    The result of the command executed last is returned as the result of this
    command\.

    Exposed for use within command implementations to change the order of
    execution\.

  - <a name='18'></a>*wipName* __run\_next\_until__ *rejected*

    Low\-level method\. Invokes the method __run\_next__ until the next word is
    in the set of *rejected* words, and the program is not empty\. The result
    of the command executed last is returned as the result of this command\.

    Exposed for use within command implementations to change the order of
    execution\.

  - <a name='19'></a>*wipName* __run\_next\_if__ *acceptable*

    Low\-level method\. Invokes the method __run\_next__ if the next word is in
    the set of *acceptable* words, and the program is not empty\. The result of
    the command executed last is returned as the result of this command\.

    Exposed for use within command implementations to change the order of
    execution\.

  - <a name='20'></a>*wipName* __run\_next\_ifnot__ *rejected*

    Low\-level method\. Invokes the method __run\_next__ if the next word is
    not in the set of *rejected* words, and the program is not empty\. The
    result of the command executed last is returned as the result of this
    command\.

    Exposed for use within command implementations to change the order of
    execution\.

  - <a name='21'></a>*wipName* __next__

    Returns the next word in the programm\. The word is also removed\.

  - <a name='22'></a>*wipName* __peek__

    Returns the next word in the programm without removing it

  - <a name='23'></a>*wipName* __peekall__

    Returns the remaining programm in toto\.

  - <a name='24'></a>*wipName* __insertl__ *at* *wordlist*

    Basic programm accessor method\. Inserts the specified *wordlist* into the
    program, just before the word at position *at*\. Positions are counted from
    __zero__\.

  - <a name='25'></a>*wipName* __replacel__ *wordlist*

    Basic programm accessor method\. Replaces the whole stored program with the
    specified *wordlist*\.

  - <a name='26'></a>*wipName* __pushl__ *wordlist*

    Program accessor method\. The specified *wordlist* is added to the front of
    the remaining program\. Equivalent to

        $wip insertl 0 $wordlist

  - <a name='27'></a>*wipName* __addl__ *wordlist*

    Program accessor method\. The specified *wordlist* is appended at the end
    of the remaining program\. Equivalent to

        $wip insertl end $wordlist

  - <a name='28'></a>*wipName* __insert__ *at* *word*\.\.\.

    Like method __insertl__, except the words are specified through multiple
    arguments\.

  - <a name='29'></a>*wipName* __replace__ *word*\.\.\.

    Like method __setl__, except the words are specified through multiple
    arguments\.

  - <a name='30'></a>*wipName* __push__ *word*\.\.\.

    Like method __pushl__, except the words are specified through multiple
    arguments\.

  - <a name='31'></a>*wipName* __add__ *word*\.\.\.

    Like method __addl__, except the words are specified through multiple
    arguments\.

# <a name='section5'></a>EXAMPLES

No examples yet\.

# <a name='section6'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *wip* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[interpreter](\.\./\.\./\.\./\.\./index\.md\#interpreter),
[list](\.\./\.\./\.\./\.\./index\.md\#list), [word](\.\./\.\./\.\./\.\./index\.md\#word)

# <a name='category'></a>CATEGORY

Programming tools

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2007\-2010 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/yaml/huddle.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642

[//000000001]: # (huddle \- HUDDLE)
[//000000002]: # (Generated from file 'huddle\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008\-2011 KATO Kanryu <kanryu6@users\.sourceforge\.net>)
[//000000004]: # (Copyright &copy; 2015 Miguel Martínez López <aplicacionamedida@gmail\.com>)
[//000000005]: # (huddle\(n\) 0\.3 tcllib "HUDDLE")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

huddle \- Create and manipulate huddle object

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [TYPE CALLBACK](#section3)

  - [How to add type](#section4)

  - [WORKING SAMPLE](#section5)

  - [LIMITATIONS](#section6)

  - [Bugs, Ideas, Feedback](#section7)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require huddle ?0\.3?  

[__huddle create__ *key* *value* ?*key value \.\.\.*?](#1)  
[__huddle list__ ?*value value \.\.\.*?](#2)  
[__huddle number__ *number*](#3)  
[__huddle string__ *string*](#4)  
[__huddle boolean__ *expression to evaluate as true or false*](#5)  
[__huddle true__](#6)  
[__huddle false__](#7)  
[__huddle null__](#8)  
[__huddle get__ *object* *key* ?*key \.\.\.*?](#9)  
[__huddle gets__ *object* *key* ?*key \.\.\.*?](#10)  
[__huddle set__ *objectVar* *key* ?*key \.\.\.*? *value*](#11)  
[__huddle remove__ *object* *key* ?*key \.\.\.*?](#12)  
[__huddle combine__ *object1* *object2* ?*object3 \.\.\.*?](#13)  
[__huddle equal__ *object1* *object2*](#14)  
[__huddle append__ *objectVar* *key* *value* ?*key value \.\.\.*?](#15)  
[__huddle append__ *objectVar* *value* ?*value \.\.\.*?](#16)  
[__huddle keys__ *object*](#17)  
[__huddle llength__ *object*](#18)  
[__huddle type__ *object* ?*key key\.\.\.*?](#19)  
[__huddle strip__ *object*](#20)  
[__huddle jsondump__ *object* ?*offset*? ?*newline*? ?*begin\_offset*?](#21)  
[__huddle compile__ *spec* *data*](#22)  
[__huddle isHuddle__ *object*](#23)  
[__huddle checkHuddle__ *object*](#24)  
[__huddle to\_node__ *object* ?*tag*?](#25)  
[__huddle wrap__ *tag* *src*](#26)  
[__huddle call__ *tag* *command* *args*](#27)  
[__huddle addType__ *callback*](#28)  
[__[callback](\.\./\.\./\.\./\.\./index\.md\#callback)__ *command* ?*args*?](#29)  
[__setting__](#30)  
[__get\_sub__ *src* *key*](#31)  
[__strip__ *src*](#32)  
[__[set](\.\./\.\./\.\./\.\./index\.md\#set)__ *src* *key* *value*](#33)  
[__[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__ *src* *key* *value*](#34)  

# <a name='description'></a>DESCRIPTION

Huddle provides a generic Tcl\-based serialization/intermediary format\.
Currently, each node is wrapped in a tag with simple type information\.

When converting huddle\-notation to other serialization formats like JSON or YAML
this type information is used to select the proper notation\. And when going from
JSON/YAML/\.\.\. to huddle their notation can be used to select the proper huddle
type\.

In that manner huddle can serve as a common intermediary format\.

    huddle-format: >
      {HUDDLE {huddle-node}}
    huddle-node: >
      {tag content}
    each content of tag means:
      s: (content is a) string
      L: list, each sub node is a huddle-node
      D: dict, each sub node is a huddle-node
    confirmed:
      - JSON
      - YAML(generally, but cannot discribe YAML-tags)
    limitation:
      - cannot discribe aliases from a node to other node.

The __huddle__ package returns data as a Tcl
__[dict](\.\./\.\./\.\./\.\./index\.md\#dict)__\. Either the
__[dict](\.\./\.\./\.\./\.\./index\.md\#dict)__ package or Tcl 8\.5 is required for
use\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__huddle create__ *key* *value* ?*key value \.\.\.*?

    Create a huddle object as a dict\. It can contain other huddle objects\.

  - <a name='2'></a>__huddle list__ ?*value value \.\.\.*?

    Create a huddle object as a list\. It can contain other huddle objects\.

  - <a name='3'></a>__huddle number__ *number*

    Create a huddle object as a number\.

  - <a name='4'></a>__huddle string__ *string*

    Create a huddle object as a string\.

  - <a name='5'></a>__huddle boolean__ *expression to evaluate as true or false*

    Create a huddle object as a boolean evaluating an expression as true or
    false\-

  - <a name='6'></a>__huddle true__

    Create a huddle object as a boolean true\.

  - <a name='7'></a>__huddle false__

    Create a huddle object as a boolean false\.

  - <a name='8'></a>__huddle null__

    Create a huddle object as a null\.

  - <a name='9'></a>__huddle get__ *object* *key* ?*key \.\.\.*?

    Almost the same as __dict get__\. Get a sub\-object from the huddle
    object\. *key* can be used to huddle\-list's index\.

  - <a name='10'></a>__huddle gets__ *object* *key* ?*key \.\.\.*?

    Get a sub\-object from the huddle object, stripped\.

  - <a name='11'></a>__huddle set__ *objectVar* *key* ?*key \.\.\.*? *value*

    Almost the same as __dict set__\. Set a sub\-object from the huddle
    object\. *key* can be used to huddle\-list's index\.

  - <a name='12'></a>__huddle remove__ *object* *key* ?*key \.\.\.*?

    Almost the same as __dict remove__\. Remove a sub\-object from the huddle
    object\. *key* can be used to huddle\-list's index\.

  - <a name='13'></a>__huddle combine__ *object1* *object2* ?*object3 \.\.\.*?

    Merging huddle objects given\.

    % set aa [huddle create a b c d]
    HUDDLE {D {a {s b} c {s d}}}
    % set bb [huddle create a k l m]
    HUDDLE {D {a {s k} l {s m}}}
    % huddle combine $aa $bb
    HUDDLE {D {a {s k} c {s d} l {s m}}}

  - <a name='14'></a>__huddle equal__ *object1* *object2*

    Comparing two huddle objects recursively\. When to equal, returns 1,
    otherwise 0\.

    % set aa [huddle create a b c d]
    HUDDLE {D {a {s b} c {s d}}}
    % set bb [huddle create c d a b]
    HUDDLE {D {c {s d} a {s b}}}
    % huddle equal $aa $bb
    1

  - <a name='15'></a>__huddle append__ *objectVar* *key* *value* ?*key value \.\.\.*?

  - <a name='16'></a>__huddle append__ *objectVar* *value* ?*value \.\.\.*?

    Appending child elements\. When for dicts, giving key/value\. When for lists,
    giving values\.

    % set aa [huddle create a b c d]
    HUDDLE {D {a {s b} c {s d}}}
    % huddle append aa a k l m
    HUDDLE {D {a {s k} c {s d} l {s m}}}
    % set bb [huddle list i j k l]
    HUDDLE {L {{s i} {s j} {s k} {s l}}}
    % huddle append bb g h i
    HUDDLE {L {{s i} {s j} {s k} {s l} {s g} {s h} {s i}}}

  - <a name='17'></a>__huddle keys__ *object*

    The same as __dict keys__\.

  - <a name='18'></a>__huddle llength__ *object*

    The same as __llength__\.

  - <a name='19'></a>__huddle type__ *object* ?*key key\.\.\.*?

    Return the element type of specified by keys\. if ?key? is not given, returns
    the type of root node\.

      * ____string____

        the node is a tcl's string\.

      * ____dict____

        the node is a dict\.

      * ____list____

        the node is a list\.

      * ____number____

        the node is a number\.

      * ____boolean____

        the node is a boolean\.

      * ____null____

        the node is a null\.

    % huddle type {HUDDLE {s str}}
    string
    % huddle type {HUDDLE {L {{s a} {s b} {s c}}}}
    list
    % huddle type {HUDDLE {D {aa {s b} cc {s d}}}} cc
    string

  - <a name='20'></a>__huddle strip__ *object*

    Stripped all tags\. Converted to normal Tcl's list/dict\.

  - <a name='21'></a>__huddle jsondump__ *object* ?*offset*? ?*newline*? ?*begin\_offset*?

    dump a json\-stream from the huddle\-object\.

      * ____offset__ ""__

        begin offset as spaces " "\.

    # normal output has some indents. some strings are escaped.
    % huddle jsondump {HUDDLE {L {{L {{s i} {s baa} {s \\k} {L {{s 1.0} {s true} {s /g} {s h}}} {L {{s g}}}}} {s t}}}}
    [
      [
        "i",
        "baa",
        "\\k",
        [
          1.0,
          true,
          "\/g",
          "h"
        ],
        ["g"]
      ],
      "t"
    ]
    # stripped output
    % huddle jsondump {HUDDLE {D {dd {D {bb {D {a {s baa} c {s {d
    a}}}} cc {D {g {s h}}}}} ee {D {i {s j} k {s 1} j {s { m\a}}}}}}} "" ""
    {"dd": {"bb": {"a": "baa","c": "d\na"},"cc": {"g": "h"}},"ee": {"i": "j","k": 1,"j": " m\\a"}}

  - <a name='22'></a>__huddle compile__ *spec* *data*

    construct a huddle object from plain old tcl values\. *spec* is defined as
    follows:

      * __string__

        data is simply a string

      * __list__

        data is a tcl list of strings

      * __dict__

        data is a tcl dict of strings

      * list list

        data is a tcl list of lists

      * list dict

        data is a tcl list of dicts

      * dict xx list

        data is a tcl dict where the value of key xx is a tcl list

      * dict \* list

        data is a tcl dict of lists *data* is plain old tcl values

    % huddle compile {dict * list} {a {1 2 3} b {4 5}}
    HUDDLE {D {a {L {{s 1} {s 2} {s 3}}} b {L {{s 4} {s 5}}}}}
    % huddle compile {dict * {list {dict d list}}} {a {{c 1} {d {2 2 2} e 3}} b {{f 4 g 5}}}
    HUDDLE {D {a {L {{D {c {s 1}}} {D {d {L {{s 2} {s 2} {s 2}}} e {s 3}}}}} b {L {{D {f {s 4} g {s 5}}}}}}}

  - <a name='23'></a>__huddle isHuddle__ *object*

    if *object* is a huddle, returns 1\. the other, returns 0\.

  - <a name='24'></a>__huddle checkHuddle__ *object*

    if *object* is not a huddle, rises an error\.

  - <a name='25'></a>__huddle to\_node__ *object* ?*tag*?

    for type\-callbacks\.

    if *object* is a huddle, returns root\-node\. the other, returns __\[list s
    $object\]__\.

    % huddle to_node str
    s str
    % huddle to_node str !!str
    !!str str
    % huddle to_node {HUDDLE {s str}}
    s str
    % huddle to_node {HUDDLE {l {a b c}}}
    l {a b c}

  - <a name='26'></a>__huddle wrap__ *tag* *src*

    for type\-callbacks\.

    Create a huddle object from *src* with specified *tag*\.

    % huddle wrap "" str
    HUDDLE str
    % huddle wrap s str
    HUDDLE {s str}

  - <a name='27'></a>__huddle call__ *tag* *command* *args*

    for type\-callbacks\.

    devolving *command* to default *tag*\-callback

  - <a name='28'></a>__huddle addType__ *callback*

    add a user\-specified\-type/tag to the huddle library\. To see "Additional
    Type"\.

      * __callback__

        callback function name for additional type\.

# <a name='section3'></a>TYPE CALLBACK

The definition of callback for user\-type\.

  - <a name='29'></a>__[callback](\.\./\.\./\.\./\.\./index\.md\#callback)__ *command* ?*args*?

      * __command__

        huddle subcomand which is needed to reply by the callback\.

      * __args__

        arguments of subcommand\. The number of list of arguments is different
        for each subcommand\.

The callback procedure shuould reply the following subcommands\.

  - <a name='30'></a>__setting__

    only returns a fixed dict of the type infomation for setting the user\-tag\.

      * __type__ typename

        typename of the type

      * __method__ \{method1 method2 method3 \.\.\.\}

        method list as huddle subcommand\. Then, you can call __\[huddle method1
        \.\.\.\]__

      * __tag__ \{tag1 child/parent tag2 child/parent \.\.\.\}

        tag list for huddle\-node as a dict\. if the type has child\-nodes, use
        "parent", otherwise use "child"\.

  - <a name='31'></a>__get\_sub__ *src* *key*

    returns a sub node specified by *key*\.

      * __src__

        a node content in huddle object\.

  - <a name='32'></a>__strip__ *src*

    returns stripped node contents\. if the type has child nodes, every node must
    be stripped\.

  - <a name='33'></a>__[set](\.\./\.\./\.\./\.\./index\.md\#set)__ *src* *key* *value*

    sets a sub\-node from the tagged\-content, and returns self\.

  - <a name='34'></a>__[remove](\.\./\.\./\.\./\.\./index\.md\#remove)__ *src* *key* *value*

    removes a sub\-node from the tagged\-content, and returns self\.

__strip__ must be defined at all types\. __get\_sub__ must be defined at
container types\. __set/remove__ shuould be defined, if you call them\.

    # callback sample for my-dict
    proc my_dict_setting {command args} {
        switch -- $command {
            setting { ; # type definition
                return {
                    type dict
                    method {create keys}
                    tag {d child D parent}
                    constructor create
                    str s
                }
                # type:   the type-name
                # method: add methods to huddle's subcommand.
                #          "get_sub/strip/set/remove/equal/append" called by huddle module.
                #          "strip" must be defined at all types.
                #          "get_sub" must be defined at container types.
                #          "set/remove/equal/append" shuould be defined, if you call them.
                # tag:    tag definition("child/parent" word is maybe obsoleted)
            }
            get_sub { ; # get a sub-node specified by "key" from the tagged-content
                foreach {src key} $args break
                return [dict get $src $key]
            }
            strip { ; # strip from the tagged-content
                foreach {src nop} $args break
                foreach {key val} $src {
                    lappend result $key [huddle strip $val]
                }
                return $result
            }
            set { ; # set a sub-node from the tagged-content
                foreach {src key value} $args break
                dict set src $key $value
                return $src
            }
            remove { ; # remove a sub-node from the tagged-content
                foreach {src key value} $args break
                return [dict remove $src $key]
            }
            equal { ; # check equal for each node
                foreach {src1 src2} $args break
                if {[llength $src1] != [llength $src2]} {return 0}
                foreach {key1 val1} $src1 {
                    if {![dict exists $src2 $key1]} {return 0}
                    if {![huddle _equal_subs $val1 [dict get $src2 $key1]]} {return 0}
                }
                return 1
            }
            append { ; # append nodes
                foreach {str src list} $args break
                if {[llength $list] % 2} {error {wrong # args: should be "huddle append objvar ?key value ...?"}}
                set resultL $src
                foreach {key value} $list {
                    if {$str ne ""} {
                        lappend resultL $key [huddle to_node $value $str]
                    } else {
                        lappend resultL $key $value
                    }
                }
                return [eval dict create $resultL]
            }
            create { ; # $args: all arguments after "huddle create"
                if {[llength $args] % 2} {error {wrong # args: should be "huddle create ?key value ...?"}}
                set resultL {}
                foreach {key value} $args {
                    lappend resultL $key [huddle to_node $value]
                }
                return [huddle wrap D $resultL]
            }
            keys {
                foreach {src nop} $args break
                return [dict keys [lindex [lindex $src 1] 1]]
            }
            default {
                error "$command is not callback for dict"
            }
        }
    }

    # inheritance sample from default dict-callback
    proc ::yaml::_huddle_mapping {command args} {
        switch -- $command {
            setting { ; # type definition
                return {
                    type dict
                    method {mapping}
                    tag {!!map parent}
                    constructor mapping
                    str !!str
                }
            }
            mapping { ; # $args: all arguments after "huddle mapping"
                if {[llength $args] % 2} {error {wrong # args: should be "huddle mapping ?key value ...?"}}
                set resultL {}
                foreach {key value} $args {
                    lappend resultL $key [huddle to_node $value !!str]
                }
                return [huddle wrap !!map $resultL]
            }
            default { ; # devolving to default dict-callback
                return [huddle call D $command $args]
            }
        }
    }

# <a name='section4'></a>How to add type

You can add huddle\-node types e\.g\. ::struct::tree\. To do so, first, define a
callback\-procedure for additional tagged\-type\. The proc get argments as
*command* and ?*args*?\. It has some switch\-sections\.

And, addType subcommand will called\.

    huddle addType my_dict_setting

# <a name='section5'></a>WORKING SAMPLE

    # create as a dict
    % set bb [huddle create a b c d]
    HUDDLE {D {a {s b} c {s d}}}

    # create as a list
    % set cc [huddle list e f g h]
    HUDDLE {L {{s e} {s f} {s g} {s h}}}
    % set bbcc [huddle create bb $bb cc $cc]
    HUDDLE {D {bb {D {a {s b} c {s d}}} cc {L {{s e} {s f} {s g} {s h}}}}}
    % set folding [huddle list $bbcc p [huddle list q r] s]
    HUDDLE {L {{D {bb {D {a {s b} c {s d}}} cc {L {{s e} {s f} {s g} {s h}}}}} {s p} {L {{s q} {s r}}} {s s}}}

    # normal Tcl's notation
    % huddle strip $folding
    {bb {a b c d} cc {e f g h}} p {q r} s

    # get a sub node
    % huddle get $folding 0 bb
    HUDDLE {D {a {s b} c {s d}}}
    % huddle gets $folding 0 bb
    a b c d

    # overwrite a node
    % huddle set folding 0 bb c kkk
    HUDDLE {L {{D {bb {D {a {s b} c {s kkk}}} cc {L {{s e} {s f} {s g} {s h}}}}} {s p} {L {{s q} {s r}}} {s s}}}

    # remove a node
    % huddle remove $folding 2 1
    HUDDLE {L {{D {bb {D {a {s b} c {s kkk}}} cc {L {{s e} {s f} {s g} {s h}}}}} {s p} {L {{s q}}} {s s}}}
    % huddle strip $folding
    {bb {a b c kkk} cc {e f g h}} p {q r} s

    # dump as a JSON stream
    % huddle jsondump $folding
    [
      {
        "bb": {
          "a": "b",
          "c": "kkk"
        },
        "cc": [
          "e",
          "f",
          "g",
          "h"
        ]
      },
      "p",
      [
        "q",
        "r"
      ],
      "s"
    ]

# <a name='section6'></a>LIMITATIONS

now printing\.

# <a name='section7'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *huddle* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[yaml](yaml\.md)

# <a name='keywords'></a>KEYWORDS

[data exchange](\.\./\.\./\.\./\.\./index\.md\#data\_exchange), [exchange
format](\.\./\.\./\.\./\.\./index\.md\#exchange\_format),
[huddle](\.\./\.\./\.\./\.\./index\.md\#huddle),
[json](\.\./\.\./\.\./\.\./index\.md\#json),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing),
[yaml](\.\./\.\./\.\./\.\./index\.md\#yaml)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008\-2011 KATO Kanryu <kanryu6@users\.sourceforge\.net>  
Copyright &copy; 2015 Miguel Martínez López <aplicacionamedida@gmail\.com>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/yaml/yaml.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242

[//000000001]: # (yaml \- YAML processing)
[//000000002]: # (Generated from file 'yaml\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008 KATO Kanryu <kanryu6@users\.sourceforge\.net>)
[//000000004]: # (yaml\(n\) 0\.4\.1 tcllib "YAML processing")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

yaml \- YAML Format Encoder/Decoder

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [COMMANDS](#section2)

  - [EXAMPLES](#section3)

  - [LIMITATIONS](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require yaml ?0\.4\.1?  

[__::yaml::yaml2dict__ ?*options*? *txt*](#1)  
[__::yaml::yaml2huddle__ ?*options*? *txt*](#2)  
[__::yaml::setOption__ ?*options*?](#3)  
[__::yaml::dict2yaml__ *dict* ?*indent*? ?*wordwrap*?](#4)  
[__::yaml::list2yaml__ *list* ?*indent*? ?*wordwrap*?](#5)  
[__::yaml::huddle2yaml__ *huddle* ?*indent*? ?*wordwrap*?](#6)  

# <a name='description'></a>DESCRIPTION

The __yaml__ package provides a simple Tcl\-only library for parsing the YAML
[http://www\.yaml\.org/](http://www\.yaml\.org/) data exchange format as
specified in [http://www\.yaml\.org/spec/1\.1/](http://www\.yaml\.org/spec/1\.1/)\.

The __yaml__ package returns data as a Tcl
__[dict](\.\./\.\./\.\./\.\./index\.md\#dict)__\. Either the
__[dict](\.\./\.\./\.\./\.\./index\.md\#dict)__ package or Tcl 8\.5 is required for
use\.

# <a name='section2'></a>COMMANDS

  - <a name='1'></a>__::yaml::yaml2dict__ ?*options*? *txt*

  - <a name='2'></a>__::yaml::yaml2huddle__ ?*options*? *txt*

    Parse yaml formatted text *txt* into a Tcl dict/huddle and return the
    value\.

      * ____\-file____

        *txt* is a filename of YAML\-stream\.

      * ____\-stream____

        *txt* is just a YAML\-stream\.

      * ____\-types__ *list*__

        The *list* is a type list for the yaml\-scalar types\.\(e\.g\. \!\!str
        \!\!timestamp \!\!integer \!\!true \.\.\.\)

            -types {timestamp integer null true false}

        In this case, if a string matched "timestamp", converted to the TCL
        internal timestamp\.\(e\.g\. "2001\-12\-15T02:59:43\.1Z" => 1008385183\)

      * ____\-m:true__ *param*__

        The *param* is two elements of list for the value of true, and
        considered strings\.

            -m:true {1 {true on + yes y}}

        In this case, the string "yes" found in YAML Stream, automatically
        converted 1\.

      * ____\-m:false__ *param*__

        The *param* is two elements of list for the value of false, and
        considered strings\.

            -m:false {0 {false off - no n}}

      * ____\-m:null__ *param*__

        The *param* is two elements of list for the value of null, and
        considered strings\.

            -m:null {"" {null nil "" ~}}

      * ____\-validate____

        Experiment,old: Output stream contains YAML's\-tag, each node\.

            % puts [::yaml::load -validate {[aaa, bbb]}]
            =>
            !!seq {{!!str aaa} {!!str bbb}}

  - <a name='3'></a>__::yaml::setOption__ ?*options*?

    Change implicit options for the library\. Now, the params are the same as
    __::yaml::yaml2dict__\. Arguments of__::yaml::yaml2dict__ is more
    priority than this setting\.

  - <a name='4'></a>__::yaml::dict2yaml__ *dict* ?*indent*? ?*wordwrap*?

  - <a name='5'></a>__::yaml::list2yaml__ *list* ?*indent*? ?*wordwrap*?

  - <a name='6'></a>__::yaml::huddle2yaml__ *huddle* ?*indent*? ?*wordwrap*?

    Convert a dict/list/huddle object into YAML stream\.

      * indent

        spaces indent of each block node\. currently default is 2\.

      * wordwrap

        word wrap for YAML stream\. currently default is 40\.

# <a name='section3'></a>EXAMPLES

An example of a yaml stream converted to Tcl\. A yaml stream is returned as a
single item with multiple elements\.

    {
    --- !<tag:clarkevans.com,2002:invoice>
    invoice: 34843
    date   : 2001-01-23
    bill-to: &id001
        given  : Chris
        family : Dumars
        address:
            lines: |
                458 Walkman Dr.
                Suite #292
            city    : Royal Oak
            state   : MI
            postal  : 48046
    ship-to: *id001
    product:
        - sku         : BL394D
          quantity    : 4
          description : Basketball
          price       : 450.00
        - sku         : BL4438H
          quantity    : 1
          description : Super Hoop
          price       : 2392.00
    tax  : 251.42
    total: 4443.52
    comments:
        Late afternoon is best.
        Backup contact is Nancy
        Billsmer @ 338-4338.
    }
    =>
    invoice 34843 date 2001-01-23 bill-to {given Chris family Dumars address {lines {458 Walkman Dr.
    Suite #292
    } city {Royal Oak} state MI postal 48046}} ship-to {given Chris family Dumars address {lines {458 Walkman Dr.
    Suite #292
    } city {Royal Oak} state MI postal 48046}} product {{sku BL394D quantity 4 description Basketball price 450.00} {sku BL4438H quantity 1 description {Super Hoop} price 2392.00}} tax 251.42 total 4443.52 comments {Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.}

An example of a yaml object converted to Tcl\. A yaml object is returned as a
multi\-element list \(a dict\)\.

    {
    ---
    - [name        , hr, avg  ]
    - [Mark McGwire, 65, 0.278]
    - [Sammy Sosa  , 63, 0.288]
    -
      Mark McGwire: {hr: 65, avg: 0.278}
      Sammy Sosa: { hr: 63, avg: 0.288}
    }
    =>
    {name hr avg} {{Mark McGwire} 65 0.278} {{Sammy Sosa} 63 0.288} {{Mark McGwire} {hr 65 avg 0.278} {Sammy Sosa} {hr 63 avg 0.288}}

# <a name='section4'></a>LIMITATIONS

tag parser not implemented\. currentry, tags are merely ignored\.

Only Anchor => Aliases ordering\. back alias\-referring is not supported\.

Too many braces, or too few braces\.

Not enough character set of line feeds\. Please use only "\\n" as line breaks\.

# <a name='section5'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *yaml* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='seealso'></a>SEE ALSO

[base64](\.\./base64/base64\.md), [huddle](huddle\.md),
[json](\.\./json/json\.md)

# <a name='keywords'></a>KEYWORDS

[data exchange](\.\./\.\./\.\./\.\./index\.md\#data\_exchange),
[huddle](\.\./\.\./\.\./\.\./index\.md\#huddle),
[parsing](\.\./\.\./\.\./\.\./index\.md\#parsing), [text
processing](\.\./\.\./\.\./\.\./index\.md\#text\_processing),
[yaml](\.\./\.\./\.\./\.\./index\.md\#yaml)

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008 KATO Kanryu <kanryu6@users\.sourceforge\.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/zip/decode.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170

[//000000001]: # (zipfile::decode \- Zip archive handling)
[//000000002]: # (Generated from file 'decode\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008\-2016 Andreas Kupries)
[//000000004]: # (zipfile::decode\(n\) 0\.7\.1 tcllib "Zip archive handling")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

zipfile::decode \- Access to zip archives

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require fileutil::decode 0\.2\.1  
package require Trf  
package require zlibtcl  
package require zipfile::decode ?0\.7\.1?  

[__::zipfile::decode::archive__](#1)  
[__::zipfile::decode::close__](#2)  
[__::zipfile::decode::comment__ *adict*](#3)  
[__::zipfile::decode::content__ *archive*](#4)  
[__::zipfile::decode::copyfile__ *adict* *path* *dst*](#5)  
[__::zipfile::decode::files__ *adict*](#6)  
[__::zipfile::decode::getfile__ *zdict* *path*](#7)  
[__::zipfile::decode::hasfile__ *adict* *path*](#8)  
[__::zipfile::decode::iszip__ *archive*](#9)  
[__::zipfile::decode::open__ *archive*](#10)  
[__::zipfile::decode::unzip__ *adict* *dstdir*](#11)  
[__::zipfile::decode::unzipfile__ *archive* *dstdir*](#12)  

# <a name='description'></a>DESCRIPTION

Note: packages Trf and zlibtcl are not required if TCL 8\.6 is available\. This
package provides commands to decompress and access the contents of zip archives\.

# <a name='section2'></a>API

  - <a name='1'></a>__::zipfile::decode::archive__

    This command decodes the last opened \(and not yet closed\) zip archive file\.
    The result of the command is a dictionary describing the contents of the
    archive\. The structure of this dictionary is not public\. Proper access
    should be made through the provided accessor command of this package\.

  - <a name='2'></a>__::zipfile::decode::close__

    This command releases all state associated with the last call of
    __::zipfile::decode::open__\. The result of the command is the empty
    string\.

  - <a name='3'></a>__::zipfile::decode::comment__ *adict*

    This command takes a dictionary describing the currently open zip archive
    file, as returned by __::zipfile::decode::archive__, and returns the
    global comment of the archive\.

  - <a name='4'></a>__::zipfile::decode::content__ *archive*

    This is a convenience command which decodes the specified zip *archive*
    file and returns the list of paths found in it as its result\.

  - <a name='5'></a>__::zipfile::decode::copyfile__ *adict* *path* *dst*

    This command takes a dictionary describing the currently open zip archive
    file, as returned by __::zipfile::decode::archive__, and copies the
    decompressed contents of the file *path* in the archive to the the file
    *dst*\. An error is thrown if the file is not found in the archive\.

  - <a name='6'></a>__::zipfile::decode::files__ *adict*

    This command takes a dictionary describing the currently open zip archive
    file, as returned by __::zipfile::decode::archive__, and returns the
    list of files found in the archive\.

  - <a name='7'></a>__::zipfile::decode::getfile__ *zdict* *path*

    This command takes a dictionary describing the currently open zip archive
    file, as returned by __::zipfile::decode::archive__, and returns the
    decompressed contents of the file *path* in the archive\. An error is
    thrown if the file is not found in the archive\.

  - <a name='8'></a>__::zipfile::decode::hasfile__ *adict* *path*

    This command takes a dictionary describing the currently open zip archive
    file, as returned by __::zipfile::decode::archive__, and check if the
    specified *path* is found in the archive\. The result of the command is a
    boolean flag, __true__ if the path is found, and __false__
    otherwise\.

  - <a name='9'></a>__::zipfile::decode::iszip__ *archive*

    This command takes the path of a presumed zip *archive* file and returns a
    boolean flag as the result of the command telling us if it actually is a zip
    archive \(__true__\), or not \(__false__\)\.

  - <a name='10'></a>__::zipfile::decode::open__ *archive*

    This command takes the path of a zip *archive* file and prepares it for
    decoding\. The result of the command is the empty string\. All important
    information is stored in global state\. If multiple open calls are made one
    after the other only the state of the last call is available to the other
    commands\.

  - <a name='11'></a>__::zipfile::decode::unzip__ *adict* *dstdir*

    This command takes a dictionary describing the currently open zip archive
    file, as returned by __::zipfile::decode::archive__, and unpacks the
    archive in the given destination directory *dstdir*\. The result of the
    command is the empty string\.

  - <a name='12'></a>__::zipfile::decode::unzipfile__ *archive* *dstdir*

    This is a convenience command which unpacks the specified zip *archive*
    file in the given destination directory *dstdir*\.

    The result of the command is the empty string\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *zipfile* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[decompression](\.\./\.\./\.\./\.\./index\.md\#decompression),
[zip](\.\./\.\./\.\./\.\./index\.md\#zip)

# <a name='category'></a>CATEGORY

File

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008\-2016 Andreas Kupries
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































Deleted embedded/md/tcllib/files/modules/zip/encode.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126

[//000000001]: # (zipfile::encode \- Zip archive handling)
[//000000002]: # (Generated from file 'encode\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008\-2009 Andreas Kupries)
[//000000004]: # (zipfile::encode\(n\) 0\.4 tcllib "Zip archive handling")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

zipfile::encode \- Generation of zip archives

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Class API](#section2)

  - [Instance API](#section3)

  - [Bugs, Ideas, Feedback](#section4)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.4  
package require logger  
package require Trf  
package require crc32  
package require snit  
package require zlibtcl  
package require fileutil  
package require zipfile::encode ?0\.4?  

[__::zipfile::encode__ ?*objectName*?](#1)  
[__<encoder>__ __comment:__ *text*](#2)  
[__<encoder>__ __file:__ *dst* *owned* *src* ?*noCompress*?](#3)  
[__<encoder>__ __write__ *archive*](#4)  

# <a name='description'></a>DESCRIPTION

This package provides a class for the generation of zip archives\.

# <a name='section2'></a>Class API

  - <a name='1'></a>__::zipfile::encode__ ?*objectName*?

    The class command constructs encoder instances, i\.e\. objects\. The result of
    the command is the fully\-qualified name of the instance command\.

    If no *objectName* is specified the class will generate and use an
    automatic name\. If the *objectName* was specified, but is not fully
    qualified the command will be created in the current namespace\.

# <a name='section3'></a>Instance API

  - <a name='2'></a>__<encoder>__ __comment:__ *text*

    This method specifies the text of the global comment for the archive\. The
    result of the method is the empty string\. In case of multiple calls to this
    method for the same encoder the data from the last call prevails over all
    previous texts\.

  - <a name='3'></a>__<encoder>__ __file:__ *dst* *owned* *src* ?*noCompress*?

    This method adds a new file to the archive\. The contents of the file are
    found in the filesystem at *src*, and will be stored in the archive under
    path *dst*\. If the file is declared as *owned* by the archive the
    original file will be deleted when the archive is constructed and written\.
    If *noCompress* is set to __true__ the file will not be compressed on
    writing\. Otherwise \(the default\) the file is compressed if it is
    advantageous\. The result of the method is an empty string\.

  - <a name='4'></a>__<encoder>__ __write__ *archive*

    This method takes the global comment and all added files, encodes them as a
    zip archive and stores the result at path *archive* in the filesystem\. All
    added files which were owned by the archive are deleted at this point\. On
    the issue of ordering, the files are added to the archive in the same order
    as they were specified via __file:__\. *Note* that this behaviour is
    new for version 0\.4 and higher\. Before 0\.4 no specific order was documented\.
    It was lexicographically sorted\. The change was made to support
    __[zip](\.\./\.\./\.\./\.\./index\.md\#zip)__\-based file formats which require
    a specific order of files in the archive, for example "\.epub"\.

# <a name='section4'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *zipfile* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[compression](\.\./\.\./\.\./\.\./index\.md\#compression),
[zip](\.\./\.\./\.\./\.\./index\.md\#zip)

# <a name='category'></a>CATEGORY

File

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2008\-2009 Andreas Kupries
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































Deleted embedded/md/tcllib/files/modules/zip/mkzip.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

[//000000001]: # (zipfile::mkzip \- Zip archive creation)
[//000000002]: # (Generated from file 'mkzip\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2009 Pat Thoyts)
[//000000004]: # (zipfile::mkzip\(n\) 1\.2\.1 tcllib "Zip archive creation")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>

# NAME

zipfile::mkzip \- Build a zip archive

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Bugs, Ideas, Feedback](#section3)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.6  
package require zipfile::mkzip ?1\.2\.1?  

[__::zipfile::mkzip::mkzip__ *zipfile* ?__\-zipkit__? ?__\-runtime__ *prefix*? ?__\-comment__ *string*? ?__\-directory__ *rootpath*? ?__\-exclude__ *exclude*? ?__\-\-__? ?*path*\.\.\.?](#1)  

# <a name='description'></a>DESCRIPTION

This package utilizes the zlib functions in Tcl 8\.6 to build zip archives\.

# <a name='section2'></a>API

  - <a name='1'></a>__::zipfile::mkzip::mkzip__ *zipfile* ?__\-zipkit__? ?__\-runtime__ *prefix*? ?__\-comment__ *string*? ?__\-directory__ *rootpath*? ?__\-exclude__ *exclude*? ?__\-\-__? ?*path*\.\.\.?

    From [http://wiki\.tcl\.tk/15158](http://wiki\.tcl\.tk/15158)

    This command constructs a zip archive from a directory tree using nothing
    but Tcl 8\.6 core features\. The resulting zip file should be compatible with
    other __[zip](\.\./\.\./\.\./\.\./index\.md\#zip)__ programs \- with the
    possible exception of unicode support\. The files generated by this command
    use utf\-8 encoding for all filenames and comments and it has been noticed
    particularly on Windows the __info\-zip__ and the Windows built\-in zip
    view have rather poor support for this part of the ZIP file specification\.
    The __7\-Zip__ program does correctly display utf8 filenames however and
    the __vfs::zip__ package will use these of course\.

    If you use

    > __::mkzip::mkzip__ mystuff\.tm \-zipkit \-directory mystuff\.vfs

    it will pack your "mystuff\.vfs/" virtual filesystem tree into a zip archive
    with a suitable header such that on unix you may mark it executable and it
    should run with tclkit\. Or you can run it with __tclsh__ or __wish__
    8\.6 if you like\.

    To change the executable header, specify the __\-runtime__ "preface"
    where preface is a file containing code you want prefixed\. For instance, on
    Windows you can create a self\-extracting zip archive using

        mkzip mystuff.exe -directory mystuff.vfs -runtime unzipsfx.exe

    The "unzipsfx\.exe" is the Info\-Zip self\-extracting stub\.

    Accepted options:

      * __\-runtime__ path

        This option specifies a file to use as prefix to the actual zip archive\.
        If specified __\-zipkit__ will be ignored\.

      * __\-zipkit__

        Instructs the command to generate a prefix which makes the archive a
        zip\-based starkit\. Ignored if __\-runtime__ is present\.

      * __\-comment__ string

        This options specifies a global comment to place into the generated
        archive\.

      * __\-directory__ path

        This option specifies the directory to place into the generated archive\.
        If specified any argument *path*s are *ignored*\.

      * __\-exclude__ list

        This option specifies a list of glob patterns\. All paths matching at
        least one of the patterns are not placed into the generated archive\.
        This option defaults to

            CVS/* */CVS/* *~ ".#*" "*/.#*"

      * __\-\-__

        This option signals the end of the options, forcing processing of all
        further words as arguments, even if they begin with a dash character\.

    Accepted arguments:

      * path *path*

        Each path is a directory or file to place into the generated archive\.
        Note however that these will be ignored when option __\-directory__
        is specified\.

# <a name='section3'></a>Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *zipfile* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# <a name='keywords'></a>KEYWORDS

[decompression](\.\./\.\./\.\./\.\./index\.md\#decompression),
[zip](\.\./\.\./\.\./\.\./index\.md\#zip)

# <a name='category'></a>CATEGORY

File

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2009 Pat Thoyts
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































Deleted embedded/md/tcllib/toc.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890

[//000000001]: # (Table of contents generated by tcllib/doctools/toc with format 'markdown')

# Table Of Contents \-\- tcllib

  - [aes](tcllib/files/modules/aes/aes\.md) Implementation of the AES block cipher

  - [ascii85](tcllib/files/modules/base64/ascii85\.md) ascii85\-encode/decode binary data

  - [asn](tcllib/files/modules/asn/asn\.md) ASN\.1 BER encoder/decoder

  - [autoproxy](tcllib/files/modules/http/autoproxy\.md) Automatic HTTP proxy usage and authentication

  - [base32](tcllib/files/modules/base32/base32\.md) base32 standard encoding

  - [base32::core](tcllib/files/modules/base32/base32core\.md) Expanding basic base32 maps

  - [base32::hex](tcllib/files/modules/base32/base32hex\.md) base32 extended hex encoding

  - [base64](tcllib/files/modules/base64/base64\.md) base64\-encode/decode binary data

  - [bee](tcllib/files/modules/bee/bee\.md) BitTorrent Serialization Format Encoder/Decoder

  - [bench](tcllib/files/modules/bench/bench\.md) bench \- Processing benchmark suites

  - [bench::in](tcllib/files/modules/bench/bench\_read\.md) bench::in \- Reading benchmark results

  - [bench::out::csv](tcllib/files/modules/bench/bench\_wcsv\.md) bench::out::csv \- Formatting benchmark results as CSV

  - [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md) bench::out::text \- Formatting benchmark results as human readable text

  - [bench\_intro](tcllib/files/modules/bench/bench\_intro\.md) bench introduction

  - [bench\_lang\_intro](tcllib/files/modules/bench/bench\_lang\_intro\.md) bench language introduction

  - [bench\_lang\_spec](tcllib/files/modules/bench/bench\_lang\_spec\.md) bench language specification

  - [bibtex](tcllib/files/modules/bibtex/bibtex\.md) Parse bibtex files

  - [blowfish](tcllib/files/modules/blowfish/blowfish\.md) Implementation of the Blowfish block cipher

  - [cache::async](tcllib/files/modules/cache/async\.md) Asynchronous in\-memory cache

  - [cksum](tcllib/files/modules/crc/cksum\.md) Calculate a cksum\(1\) compatible checksum

  - [clay](tcllib/files/modules/clay/clay\.md) A minimalist framework for large scale OO Projects

  - [clock\_iso8601](tcllib/files/modules/clock/iso8601\.md) Parsing ISO 8601 dates/times

  - [clock\_rfc2822](tcllib/files/modules/clock/rfc2822\.md) Parsing RFC 2822 dates/times

  - [cmdline](tcllib/files/modules/cmdline/cmdline\.md) Procedures to process command lines and options\.

  - [comm](tcllib/files/modules/comm/comm\.md) A remote communication facility for Tcl \(8\.3 and later\)

  - [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md) The comm wire protocol

  - [control](tcllib/files/modules/control/control\.md) Procedures for control flow structures\.

  - [coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) Coroutine based event and IO handling

  - [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md) Automatic event and IO coroutine awareness

  - [counter](tcllib/files/modules/counter/counter\.md) Procedures for counters and histograms

  - [crc16](tcllib/files/modules/crc/crc16\.md) Perform a 16bit Cyclic Redundancy Check

  - [crc32](tcllib/files/modules/crc/crc32\.md) Perform a 32bit Cyclic Redundancy Check

  - [cron](tcllib/files/modules/cron/cron\.md) Tool for automating the period callback of commands

  - [csv](tcllib/files/modules/csv/csv\.md) Procedures to handle CSV data\.

  - [debug](tcllib/files/modules/debug/debug\.md) debug narrative \- core

  - [debug::caller](tcllib/files/modules/debug/debug\_caller\.md) debug narrative \- caller

  - [debug::heartbeat](tcllib/files/modules/debug/debug\_heartbeat\.md) debug narrative \- heartbeat

  - [debug::timestamp](tcllib/files/modules/debug/debug\_timestamp\.md) debug narrative \- timestamping

  - [defer](tcllib/files/modules/defer/defer\.md) Defered execution

  - [deleg\_method](tcllib/files/modules/interp/deleg\_method\.md) Creation of comm delegates \(snit methods\)

  - [deleg\_proc](tcllib/files/modules/interp/deleg\_proc\.md) Creation of comm delegates \(procedures\)

  - [des](tcllib/files/modules/des/des\.md) Implementation of the DES and triple\-DES ciphers

  - [dicttool](tcllib/files/modules/dicttool/dicttool\.md) Dictionary Tools

  - [dns](tcllib/files/modules/dns/tcllib\_dns\.md) Tcl Domain Name Service Client

  - [docidx\_intro](tcllib/files/modules/doctools/docidx\_intro\.md) docidx introduction

  - [docidx\_lang\_cmdref](tcllib/files/modules/doctools/docidx\_lang\_cmdref\.md) docidx language command reference

  - [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) docidx language faq

  - [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) docidx language introduction

  - [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md) docidx language syntax

  - [docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md) docidx plugin API reference

  - [docstrip](tcllib/files/modules/docstrip/docstrip\.md) Docstrip style source code extraction

  - [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) Docstrip\-related utilities

  - [doctoc\_intro](tcllib/files/modules/doctools/doctoc\_intro\.md) doctoc introduction

  - [doctoc\_lang\_cmdref](tcllib/files/modules/doctools/doctoc\_lang\_cmdref\.md) doctoc language command reference

  - [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) doctoc language faq

  - [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) doctoc language introduction

  - [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md) doctoc language syntax

  - [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) doctoc plugin API reference

  - [doctools](tcllib/files/modules/doctools/doctools\.md) doctools \- Processing documents

  - [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) DocTools \- Keyword indices

  - [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) DocTools \- Tables of Contents

  - [doctools::changelog](tcllib/files/modules/doctools/changelog\.md) Processing text in Emacs ChangeLog format

  - [doctools::cvs](tcllib/files/modules/doctools/cvs\.md) Processing text in 'cvs log' format

  - [doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md) Default CSS style for HTML export plugins

  - [doctools::idx](tcllib/files/modules/doctools/docidx\.md) docidx \- Processing indices

  - [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) Holding keyword indices

  - [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) Exporting keyword indices

  - [doctools::idx::export::docidx](tcllib/files/modules/doctools2idx/export\_docidx\.md) docidx export plugin

  - [doctools::idx::export::html](tcllib/files/modules/doctools2idx/idx\_export\_html\.md) HTML export plugin

  - [doctools::idx::export::json](tcllib/files/modules/doctools2idx/idx\_export\_json\.md) JSON export plugin

  - [doctools::idx::export::nroff](tcllib/files/modules/doctools2idx/idx\_export\_nroff\.md) nroff export plugin

  - [doctools::idx::export::text](tcllib/files/modules/doctools2idx/idx\_export\_text\.md) plain text export plugin

  - [doctools::idx::export::wiki](tcllib/files/modules/doctools2idx/idx\_export\_wiki\.md) wiki export plugin

  - [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) Importing keyword indices

  - [doctools::idx::import::docidx](tcllib/files/modules/doctools2idx/import\_docidx\.md) docidx import plugin

  - [doctools::idx::import::json](tcllib/files/modules/doctools2idx/idx\_import\_json\.md) JSON import plugin

  - [doctools::idx::parse](tcllib/files/modules/doctools2idx/idx\_parse\.md) Parsing text in docidx format

  - [doctools::idx::structure](tcllib/files/modules/doctools2idx/idx\_structure\.md) Docidx serialization utilities

  - [doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) Message catalog management for the various document parsers

  - [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) Message catalog for the docidx parser \(C\)

  - [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) Message catalog for the docidx parser \(DE\)

  - [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) Message catalog for the docidx parser \(EN\)

  - [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) Message catalog for the docidx parser \(FR\)

  - [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) Message catalog for the doctoc parser \(C\)

  - [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) Message catalog for the doctoc parser \(DE\)

  - [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) Message catalog for the doctoc parser \(EN\)

  - [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md) Message catalog for the doctoc parser \(FR\)

  - [doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md) Default CSS style for NROFF export plugins

  - [doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md) Processing text in 'subst \-novariables' format

  - [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) Holding tables of contents

  - [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) doctoc \- Processing tables of contents

  - [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) Exporting tables of contents

  - [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) doctoc export plugin

  - [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) HTML export plugin

  - [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) JSON export plugin

  - [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) nroff export plugin

  - [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md) plain text export plugin

  - [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md) wiki export plugin

  - [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) Importing keyword indices

  - [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) doctoc import plugin

  - [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md) JSON import plugin

  - [doctools::toc::parse](tcllib/files/modules/doctools2toc/toc\_parse\.md) Parsing text in doctoc format

  - [doctools::toc::structure](tcllib/files/modules/doctools2toc/toc\_structure\.md) Doctoc serialization utilities

  - [doctools\_intro](tcllib/files/modules/doctools/doctools\_intro\.md) doctools introduction

  - [doctools\_lang\_cmdref](tcllib/files/modules/doctools/doctools\_lang\_cmdref\.md) doctools language command reference

  - [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) doctools language faq

  - [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) doctools language introduction

  - [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md) doctools language syntax

  - [doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md) doctools plugin API reference

  - [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) Lightweight DocTools Markup Processor

  - [dtplite](tcllib/files/apps/dtplite\.md) Lightweight DocTools Markup Processor

  - [fileutil](tcllib/files/modules/fileutil/fileutil\.md) Procedures implementing some file utilities

  - [fileutil::magic::cfront](tcllib/files/modules/fumagic/cfront\.md) Generator core for compiler of magic\(5\) files

  - [fileutil::magic::cgen](tcllib/files/modules/fumagic/cgen\.md) Generator core for compiler of magic\(5\) files

  - [fileutil::magic::filetype](tcllib/files/modules/fumagic/filetypes\.md) Procedures implementing file\-type recognition

  - [fileutil::magic::rt](tcllib/files/modules/fumagic/rtcore\.md) Runtime core for file type recognition engines written in pure Tcl

  - [fileutil::multi](tcllib/files/modules/fileutil/multi\.md) Multi\-file operation, scatter/gather, standard object

  - [fileutil::multi::op](tcllib/files/modules/fileutil/multiop\.md) Multi\-file operation, scatter/gather

  - [fileutil::paths](tcllib/files/modules/fileutil/paths\.md) Manage search path pools

  - [fileutil\_traverse](tcllib/files/modules/fileutil/traverse\.md) Iterative directory traversal

  - [ftp](tcllib/files/modules/ftp/ftp\.md) Client\-side tcl implementation of the ftp protocol

  - [ftp::geturl](tcllib/files/modules/ftp/ftp\_geturl\.md) Uri handler for ftp urls

  - [ftpd](tcllib/files/modules/ftpd/ftpd\.md) Tcl FTP server implementation

  - [generator](tcllib/files/modules/generator/generator\.md) Procedures for creating and using generators\.

  - [gpx](tcllib/files/modules/gpx/gpx\.md) Extracts waypoints, tracks and routes from GPX files

  - [grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md) Aycock\-Horspool\-Earley parser generator for Tcl

  - [grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) Create and manipulate finite automatons

  - [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) Create and use deterministic acceptors

  - [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) Execute deterministic finite automatons

  - [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md) Operations on finite automatons

  - [grammar::me::cpu](tcllib/files/modules/grammar\_me/me\_cpu\.md) Virtual machine implementation II for parsing token streams

  - [grammar::me::cpu::core](tcllib/files/modules/grammar\_me/me\_cpucore\.md) ME virtual machine state manipulation

  - [grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md) ME assembler

  - [grammar::me::tcl](tcllib/files/modules/grammar\_me/me\_tcl\.md) Virtual machine implementation I for parsing token streams

  - [grammar::me::util](tcllib/files/modules/grammar\_me/me\_util\.md) AST utilities

  - [grammar::me\_ast](tcllib/files/modules/grammar\_me/me\_ast\.md) Various representations of ASTs

  - [grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) Introduction to virtual machines for parsing token streams

  - [grammar::me\_vm](tcllib/files/modules/grammar\_me/me\_vm\.md) Virtual machine for parsing token streams

  - [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) Create and manipulate parsing expression grammars

  - [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) Interpreter for parsing expression grammars

  - [hook](tcllib/files/modules/hook/hook\.md) Hooks

  - [html](tcllib/files/modules/html/html\.md) Procedures to generate HTML structures

  - [htmlparse](tcllib/files/modules/htmlparse/htmlparse\.md) Procedures to parse HTML strings

  - [httpd](tcllib/files/modules/httpd/httpd\.md) A TclOO and coroutine based web server

  - [huddle](tcllib/files/modules/yaml/huddle\.md) Create and manipulate huddle object

  - [ident](tcllib/files/modules/ident/ident\.md) Ident protocol client

  - [imap4](tcllib/files/modules/imap4/imap4\.md) imap client\-side tcl implementation of imap protocol

  - [inifile](tcllib/files/modules/inifile/ini\.md) Parsing of Windows INI files

  - [interp](tcllib/files/modules/interp/tcllib\_interp\.md) Interp creation and aliasing

  - [irc](tcllib/files/modules/irc/irc\.md) Create IRC connection and interface\.

  - [javascript](tcllib/files/modules/javascript/javascript\.md) Procedures to generate HTML and Java Script structures\.

  - [jpeg](tcllib/files/modules/jpeg/jpeg\.md) JPEG querying and manipulation of meta data

  - [json](tcllib/files/modules/json/json\.md) JSON parser

  - [json::write](tcllib/files/modules/json/json\_write\.md) JSON generation

  - [lambda](tcllib/files/modules/lambda/lambda\.md) Utility commands for anonymous procedures

  - [lazyset](tcllib/files/modules/lazyset/lazyset\.md) Lazy evaluation

  - [ldap](tcllib/files/modules/ldap/ldap\.md) LDAP client

  - [ldapx](tcllib/files/modules/ldap/ldapx\.md) LDAP extended object interface

  - [log](tcllib/files/modules/log/log\.md) Procedures to log messages of libraries and applications\.

  - [logger](tcllib/files/modules/log/logger\.md) System to control logging of events\.

  - [logger::appender](tcllib/files/modules/log/loggerAppender\.md) Collection of predefined appenders for logger

  - [logger::utils](tcllib/files/modules/log/loggerUtils\.md) Utilities for logger

  - [map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md) Resolving geographical names with a Nominatim service

  - [map::slippy](tcllib/files/modules/map/map\_slippy\.md) Common code for slippy based map packages

  - [map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md) Management of a tile cache in the local filesystem

  - [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md) Accessing a server providing tiles for slippy\-based maps

  - [mapproj](tcllib/files/modules/mapproj/mapproj\.md) Map projection routines

  - [markdown](tcllib/files/modules/markdown/markdown\.md) Converts Markdown text to HTML

  - [math](tcllib/files/modules/math/math\.md) Tcl Math Library

  - [math::bigfloat](tcllib/files/modules/math/bigfloat\.md) Arbitrary precision floating\-point numbers

  - [math::bignum](tcllib/files/modules/math/bignum\.md) Arbitrary precision integer numbers

  - [math::calculus](tcllib/files/modules/math/calculus\.md) Integration and ordinary differential equations

  - [math::calculus::romberg](tcllib/files/modules/math/romberg\.md) Romberg integration

  - [math::calculus::symdiff](tcllib/files/modules/math/symdiff\.md) Symbolic differentiation for Tcl

  - [math::changepoint](tcllib/files/modules/math/changepoint\.md) Change point detection methods

  - [math::combinatorics](tcllib/files/modules/math/combinatorics\.md) Combinatorial functions in the Tcl Math Library

  - [math::complexnumbers](tcllib/files/modules/math/qcomplex\.md) Straightforward complex number package

  - [math::constants](tcllib/files/modules/math/constants\.md) Mathematical and numerical constants

  - [math::decimal](tcllib/files/modules/math/decimal\.md) General decimal arithmetic

  - [math::exact](tcllib/files/modules/math/exact\.md) Exact Real Arithmetic

  - [math::filters](tcllib/files/modules/math/filtergen\.md) Digital filters

  - [math::fourier](tcllib/files/modules/math/fourier\.md) Discrete and fast fourier transforms

  - [math::fuzzy](tcllib/files/modules/math/fuzzy\.md) Fuzzy comparison of floating\-point numbers

  - [math::geometry](tcllib/files/modules/math/math\_geometry\.md) Geometrical computations

  - [math::interpolate](tcllib/files/modules/math/interpolate\.md) Interpolation routines

  - [math::linearalgebra](tcllib/files/modules/math/linalg\.md) Linear Algebra

  - [math::machineparameters](tcllib/files/modules/math/machineparameters\.md) Compute double precision machine parameters\.

  - [math::numtheory](tcllib/files/modules/math/numtheory\.md) Number Theory

  - [math::optimize](tcllib/files/modules/math/optimize\.md) Optimisation routines

  - [math::PCA](tcllib/files/modules/math/pca\.md) Package for Principal Component Analysis

  - [math::polynomials](tcllib/files/modules/math/polynomials\.md) Polynomial functions

  - [math::probopt](tcllib/files/modules/math/probopt\.md) Probabilistic optimisation methods

  - [math::quasirandom](tcllib/files/modules/math/quasirandom\.md) Quasi\-random points for integration and Monte Carlo type methods

  - [math::rationalfunctions](tcllib/files/modules/math/rational\_funcs\.md) Polynomial functions

  - [math::roman](tcllib/files/modules/math/roman\.md) Tools for creating and manipulating roman numerals

  - [math::special](tcllib/files/modules/math/special\.md) Special mathematical functions

  - [math::statistics](tcllib/files/modules/math/statistics\.md) Basic statistical functions and procedures

  - [math::trig](tcllib/files/modules/math/trig\.md) Trigonometric anf hyperbolic functions

  - [md4](tcllib/files/modules/md4/md4\.md) MD4 Message\-Digest Algorithm

  - [md5](tcllib/files/modules/md5/md5\.md) MD5 Message\-Digest Algorithm

  - [md5crypt](tcllib/files/modules/md5crypt/md5crypt\.md) MD5\-based password encryption

  - [mime](tcllib/files/modules/mime/mime\.md) Manipulation of MIME body parts

  - [mpexpand](tcllib/files/modules/doctools/mpexpand\.md) Markup processor

  - [multiplexer](tcllib/files/modules/multiplexer/multiplexer\.md) One\-to\-many communication with sockets\.

  - [nameserv](tcllib/files/modules/nns/nns\_client\.md) Name service facility, Client

  - [nameserv::auto](tcllib/files/modules/nns/nns\_auto\.md) Name service facility, Client Extension

  - [nameserv::common](tcllib/files/modules/nns/nns\_common\.md) Name service facility, shared definitions

  - [nameserv::protocol](tcllib/files/modules/nns/nns\_protocol\.md) Name service facility, client/server protocol

  - [nameserv::server](tcllib/files/modules/nns/nns\_server\.md) Name service facility, Server

  - [namespacex](tcllib/files/modules/namespacex/namespacex\.md) Namespace utility commands

  - [ncgi](tcllib/files/modules/ncgi/ncgi\.md) Procedures to manipulate CGI values\.

  - [nettool](tcllib/files/modules/nettool/nettool\.md) Tools for networked applications

  - [nmea](tcllib/files/modules/nmea/nmea\.md) Process NMEA data

  - [nns](tcllib/files/apps/nns\.md) Name service facility, Commandline Client Application

  - [nns\_intro](tcllib/files/modules/nns/nns\_intro\.md) Name service facility, introduction

  - [nnsd](tcllib/files/apps/nnsd\.md) Name service facility, Commandline Server Application

  - [nnslog](tcllib/files/apps/nnslog\.md) Name service facility, Commandline Logging Client Application

  - [nntp](tcllib/files/modules/nntp/nntp\.md) Tcl client for the NNTP protocol

  - [ntp\_time](tcllib/files/modules/ntp/ntp\_time\.md) Tcl Time Service Client

  - [oauth](tcllib/files/modules/oauth/oauth\.md) oauth API base signature

  - [oo::util](tcllib/files/modules/tool/meta\.md) Utility commands for TclOO

  - [oo::util](tcllib/files/modules/ooutil/ooutil\.md) Utility commands for TclOO

  - [oometa](tcllib/files/modules/oometa/oometa\.md) oo::meta A data registry for classess

  - [otp](tcllib/files/modules/otp/otp\.md) One\-Time Passwords

  - [page](tcllib/files/apps/page\.md) Parser Generator

  - [page\_intro](tcllib/files/modules/page/page\_intro\.md) page introduction

  - [page\_pluginmgr](tcllib/files/modules/page/page\_pluginmgr\.md) page plugin manager

  - [page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md) page dataflow/treewalker utility

  - [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) page AST normalization, LEMON

  - [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md) page AST normalization, PEG

  - [page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) page PEG transformation utilities

  - [page\_util\_quote](tcllib/files/modules/page/page\_util\_quote\.md) page character quoting utilities

  - [picoirc](tcllib/files/modules/irc/picoirc\.md) Small and simple embeddable IRC client\.

  - [pki](tcllib/files/modules/pki/pki\.md) Implementation of the public key cipher

  - [pluginmgr](tcllib/files/modules/pluginmgr/pluginmgr\.md) Manage a plugin

  - [png](tcllib/files/modules/png/png\.md) PNG querying and manipulation of meta data

  - [pop3](tcllib/files/modules/pop3/pop3\.md) Tcl client for POP3 email protocol

  - [pop3d](tcllib/files/modules/pop3d/pop3d\.md) Tcl POP3 server implementation

  - [pop3d::dbox](tcllib/files/modules/pop3d/pop3d\_dbox\.md) Simple mailbox database for pop3d

  - [pop3d::udb](tcllib/files/modules/pop3d/pop3d\_udb\.md) Simple user database for pop3d

  - [practcl](tcllib/files/modules/practcl/practcl\.md) The Practcl Module

  - [processman](tcllib/files/modules/processman/processman\.md) Tool for automating the period callback of commands

  - [profiler](tcllib/files/modules/profiler/profiler\.md) Tcl source code profiler

  - [pt](tcllib/files/apps/pt\.md) Parser Tools Application

  - [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) Abstract Syntax Tree Serialization

  - [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) C/PARAM, Canned configuration, Critcl

  - [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) C/PARAM, Canned configuration, TEA

  - [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) The JSON Grammar Exchange Format

  - [pt::param](tcllib/files/modules/pt/pt\_param\.md) PackRat Machine Specification

  - [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) Parsing Expression Serialization

  - [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) Parsing Expression Utilities

  - [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) Parsing Expression Grammar Serialization

  - [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) PEG Storage

  - [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) PEG Storage\. Canned PEG grammar specification

  - [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) PEG Export

  - [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) PEG Export Plugin\. Write CONTAINER format

  - [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) PEG Export Plugin\. Write JSON format

  - [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) PEG Export Plugin\. Write PEG format

  - [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) PEG Conversion\. From CONTAINER format

  - [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) PEG Conversion\. Read JSON format

  - [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) PEG Conversion\. Read PEG format

  - [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) PEG Import

  - [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) PEG Import Plugin\. From CONTAINER format

  - [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) PEG Import Plugin\. Read JSON format

  - [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) PEG Import Plugin\. Read PEG format

  - [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) Interpreter for parsing expression grammars

  - [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) PEG Conversion\. Write CONTAINER format

  - [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) PEG Conversion\. Write CPARAM format

  - [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) PEG Conversion\. Write JSON format

  - [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) PEG Conversion\. Write PARAM format

  - [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) PEG Conversion\. Write PEG format

  - [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) PEG Conversion\. Write TCLPARAM format

  - [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) PEG Language Tutorial

  - [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) Introduction to Parsing Expression Grammars

  - [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) Parser Generator

  - [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) Parsing Runtime Support, PARAM based

  - [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) Tcl/PARAM, Canned configuration, NX

  - [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) Tcl/PARAM, Canned configuration, Snit

  - [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) Tcl/PARAM, Canned configuration, Tcloo

  - [pt::util](tcllib/files/modules/pt/pt\_util\.md) General utilities

  - [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) Parser Tools Export API

  - [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) Parser Tools Import API

  - [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) Introduction to Parser Tools

  - [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) Parser Tools PEG Parser

  - [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) Parser API

  - [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md) Parser Tools PE Grammar Utility Operations

  - [rc4](tcllib/files/modules/rc4/rc4\.md) Implementation of the RC4 stream cipher

  - [rcs](tcllib/files/modules/rcs/rcs\.md) RCS low level utilities

  - [report](tcllib/files/modules/report/report\.md) Create and manipulate report objects

  - [rest](tcllib/files/modules/rest/rest\.md) define REST web APIs and call them inline or asychronously

  - [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) RIPEMD\-128 Message\-Digest Algorithm

  - [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md) RIPEMD\-160 Message\-Digest Algorithm

  - [S3](tcllib/files/modules/amazon\-s3/S3\.md) Amazon S3 Web Service Interface

  - [SASL](tcllib/files/modules/sasl/sasl\.md) Implementation of SASL mechanisms for Tcl

  - [SASL::NTLM](tcllib/files/modules/sasl/ntlm\.md) Implementation of SASL NTLM mechanism for Tcl

  - [SASL::SCRAM](tcllib/files/modules/sasl/scram\.md) Implementation of SASL SCRAM mechanism for Tcl

  - [SASL::XGoogleToken](tcllib/files/modules/sasl/gtoken\.md) Implementation of SASL NTLM mechanism for Tcl

  - [sha1](tcllib/files/modules/sha1/sha1\.md) SHA1 Message\-Digest Algorithm

  - [sha256](tcllib/files/modules/sha1/sha256\.md) SHA256 Message\-Digest Algorithm

  - [simulation::annealing](tcllib/files/modules/simulation/annealing\.md) Simulated annealing

  - [simulation::montecarlo](tcllib/files/modules/simulation/montecarlo\.md) Monte Carlo simulations

  - [simulation::random](tcllib/files/modules/simulation/simulation\_random\.md) Pseudo\-random number generators

  - [smtp](tcllib/files/modules/mime/smtp\.md) Client\-side tcl implementation of the smtp protocol

  - [smtpd](tcllib/files/modules/smtpd/smtpd\.md) Tcl SMTP server implementation

  - [snit](tcllib/files/modules/snit/snit\.md) Snit's Not Incr Tcl

  - [snitfaq](tcllib/files/modules/snit/snitfaq\.md) Snit Frequently Asked Questions

  - [soundex](tcllib/files/modules/soundex/soundex\.md) Soundex

  - [stooop](tcllib/files/modules/stooop/stooop\.md) Object oriented extension\.

  - [string::token](tcllib/files/modules/string/token\.md) Regex based iterative lexing

  - [string::token::shell](tcllib/files/modules/string/token\_shell\.md) Parsing of shell command line

  - [stringprep](tcllib/files/modules/stringprep/stringprep\.md) Implementation of stringprep

  - [stringprep::data](tcllib/files/modules/stringprep/stringprep\_data\.md) stringprep data tables, generated, internal

  - [struct::disjointset](tcllib/files/modules/struct/disjointset\.md) Disjoint set data structure

  - [struct::graph](tcllib/files/modules/struct/graph\.md) Create and manipulate directed graph objects

  - [struct::graph::op](tcllib/files/modules/struct/graphops\.md) Operation for \(un\)directed graph objects

  - [struct::graph\_v1](tcllib/files/modules/struct/graph1\.md) Create and manipulate directed graph objects

  - [struct::list](tcllib/files/modules/struct/struct\_list\.md) Procedures for manipulating lists

  - [struct::map](tcllib/files/modules/struct/struct\_map\.md) Manage key/value maps

  - [struct::matrix](tcllib/files/modules/struct/matrix\.md) Create and manipulate matrix objects

  - [struct::matrix\_v1](tcllib/files/modules/struct/matrix1\.md) Create and manipulate matrix objects

  - [struct::pool](tcllib/files/modules/struct/pool\.md) Create and manipulate pool objects \(of discrete items\)

  - [struct::prioqueue](tcllib/files/modules/struct/prioqueue\.md) Create and manipulate prioqueue objects

  - [struct::queue](tcllib/files/modules/struct/queue\.md) Create and manipulate queue objects

  - [struct::record](tcllib/files/modules/struct/record\.md) Define and create records \(similar to 'C' structures\)

  - [struct::set](tcllib/files/modules/struct/struct\_set\.md) Procedures for manipulating sets

  - [struct::skiplist](tcllib/files/modules/struct/skiplist\.md) Create and manipulate skiplists

  - [struct::stack](tcllib/files/modules/struct/stack\.md) Create and manipulate stack objects

  - [struct::tree](tcllib/files/modules/struct/struct\_tree\.md) Create and manipulate tree objects

  - [struct::tree\_v1](tcllib/files/modules/struct/struct\_tree1\.md) Create and manipulate tree objects

  - [sum](tcllib/files/modules/crc/sum\.md) Calculate a sum\(1\) compatible checksum

  - [switched](tcllib/files/modules/stooop/switched\.md) switch/option management\.

  - [tar](tcllib/files/modules/tar/tar\.md) Tar file creation, extraction & manipulation

  - [tcl::chan::cat](tcllib/files/modules/virtchannel\_base/cat\.md) Concatenation channel

  - [tcl::chan::core](tcllib/files/modules/virtchannel\_core/core\.md) Basic reflected/virtual channel support

  - [tcl::chan::events](tcllib/files/modules/virtchannel\_core/events\.md) Event support for reflected/virtual channels

  - [tcl::chan::facade](tcllib/files/modules/virtchannel\_base/facade\.md) Facade channel

  - [tcl::chan::fifo](tcllib/files/modules/virtchannel\_base/tcllib\_fifo\.md) In\-memory fifo channel

  - [tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md) In\-memory interconnected fifo channels

  - [tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md) In\-memory channel, half of a fifo2

  - [tcl::chan::memchan](tcllib/files/modules/virtchannel\_base/tcllib\_memchan\.md) In\-memory channel

  - [tcl::chan::null](tcllib/files/modules/virtchannel\_base/tcllib\_null\.md) Null channel

  - [tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md) Null/Zero channel combination

  - [tcl::chan::random](tcllib/files/modules/virtchannel\_base/tcllib\_random\.md) Random channel

  - [tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md) Standard I/O, unification of stdin and stdout

  - [tcl::chan::string](tcllib/files/modules/virtchannel\_base/tcllib\_string\.md) Read\-only in\-memory channel

  - [tcl::chan::textwindow](tcllib/files/modules/virtchannel\_base/textwindow\.md) Textwindow channel

  - [tcl::chan::variable](tcllib/files/modules/virtchannel\_base/tcllib\_variable\.md) In\-memory channel using variable for storage

  - [tcl::chan::zero](tcllib/files/modules/virtchannel\_base/tcllib\_zero\.md) Zero channel

  - [tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md) Utilities for random channels

  - [tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) Adler32 transformation

  - [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md) Base64 encoding transformation

  - [tcl::transform::core](tcllib/files/modules/virtchannel\_core/transformcore\.md) Basic reflected/virtual channel transform support

  - [tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md) Counter transformation

  - [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md) Crc32 transformation

  - [tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md) Hexadecimal encoding transformation

  - [tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md) Identity transformation

  - [tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md) limiting input

  - [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md) Observer transformation, stream copy

  - [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) Encryption via one\-time pad

  - [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) rot\-encryption

  - [tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md) Space insertation and removal

  - [tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md) zlib \(de\)compression

  - [tcl\_community\_communication](tcllib/files/devdoc/tcl\_community\_communication\.md) Tcl Community \- Kind Communication

  - [tclDES](tcllib/files/modules/des/tcldes\.md) Implementation of the DES and triple\-DES ciphers

  - [tclDESjr](tcllib/files/modules/des/tcldesjr\.md) Implementation of the DES and triple\-DES ciphers

  - [tcldocstrip](tcllib/files/apps/tcldocstrip\.md) Tcl\-based Docstrip Processor

  - [tcllib\_devguide](tcllib/files/devdoc/tcllib\_devguide\.md) Tcllib \- The Developer's Guide

  - [tcllib\_install\_guide](tcllib/files/devdoc/tcllib\_installer\.md) Tcllib \- The Installer's Guide

  - [tcllib\_ip](tcllib/files/modules/dns/tcllib\_ip\.md) IPv4 and IPv6 address manipulation

  - [tcllib\_license](tcllib/files/devdoc/tcllib\_license\.md) Tcllib \- License

  - [tcllib\_releasemgr](tcllib/files/devdoc/tcllib\_releasemgr\.md) Tcllib \- The Release Manager's Guide

  - [tcllib\_sources](tcllib/files/devdoc/tcllib\_sources\.md) Tcllib \- How To Get The Sources

  - [tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager

  - [tepam::argument\_dialogbox](tcllib/files/modules/tepam/tepam\_argument\_dialogbox\.md) TEPAM argument\_dialogbox, reference manual

  - [tepam::doc\_gen](tcllib/files/modules/tepam/tepam\_doc\_gen\.md) TEPAM DOC Generation, reference manual

  - [tepam::procedure](tcllib/files/modules/tepam/tepam\_procedure\.md) TEPAM procedure, reference manual

  - [term](tcllib/files/modules/term/term\.md) General terminal control

  - [term::ansi::code](tcllib/files/modules/term/ansi\_code\.md) Helper for control sequences

  - [term::ansi::code::attr](tcllib/files/modules/term/ansi\_cattr\.md) ANSI attribute sequences

  - [term::ansi::code::ctrl](tcllib/files/modules/term/ansi\_cctrl\.md) ANSI control sequences

  - [term::ansi::code::macros](tcllib/files/modules/term/ansi\_cmacros\.md) Macro sequences

  - [term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md) Control operations and queries

  - [term::ansi::send](tcllib/files/modules/term/ansi\_send\.md) Output of ANSI control sequences to terminals

  - [term::interact::menu](tcllib/files/modules/term/imenu\.md) Terminal widget, menu

  - [term::interact::pager](tcllib/files/modules/term/ipager\.md) Terminal widget, paging

  - [term::receive](tcllib/files/modules/term/receive\.md) General input from terminals

  - [term::receive::bind](tcllib/files/modules/term/term\_bind\.md) Keyboard dispatch from terminals

  - [term::send](tcllib/files/modules/term/term\_send\.md) General output to terminals

  - [textutil](tcllib/files/modules/textutil/textutil\.md) Procedures to manipulate texts and strings\.

  - [textutil::adjust](tcllib/files/modules/textutil/adjust\.md) Procedures to adjust, indent, and undent paragraphs

  - [textutil::expander](tcllib/files/modules/textutil/expander\.md) Procedures to process templates and expand text\.

  - [textutil::patch](tcllib/files/modules/textutil/patch\.md) Application of uni\-diff patches to directory trees

  - [textutil::repeat](tcllib/files/modules/textutil/repeat\.md) Procedures to repeat strings\.

  - [textutil::split](tcllib/files/modules/textutil/textutil\_split\.md) Procedures to split texts

  - [textutil::string](tcllib/files/modules/textutil/textutil\_string\.md) Procedures to manipulate texts and strings\.

  - [textutil::tabify](tcllib/files/modules/textutil/tabify\.md) Procedures to \(un\)tabify strings

  - [textutil::trim](tcllib/files/modules/textutil/trim\.md) Procedures to trim strings

  - [throw](tcllib/files/modules/try/tcllib\_throw\.md) throw \- Throw an error exception with a message

  - [tie](tcllib/files/modules/tie/tie\_std\.md) Array persistence, standard data sources

  - [tie](tcllib/files/modules/tie/tie\.md) Array persistence

  - [tiff](tcllib/files/modules/tiff/tiff\.md) TIFF reading, writing, and querying and manipulation of meta data

  - [tool](tcllib/files/modules/tool/tool\.md) TclOO Library \(TOOL\) Framework

  - [tool::dict\_ensemble](tcllib/files/modules/tool/tool\_dict\_ensemble\.md) Dictionary Tools

  - [transfer::connect](tcllib/files/modules/transfer/connect\.md) Connection setup

  - [transfer::copy](tcllib/files/modules/transfer/copyops\.md) Data transfer foundation

  - [transfer::copy::queue](tcllib/files/modules/transfer/tqueue\.md) Queued transfers

  - [transfer::data::destination](tcllib/files/modules/transfer/ddest\.md) Data destination

  - [transfer::data::source](tcllib/files/modules/transfer/dsource\.md) Data source

  - [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) Data source

  - [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md) Data source

  - [treeql](tcllib/files/modules/treeql/treeql\.md) Query tree objects

  - [try](tcllib/files/modules/try/tcllib\_try\.md) try \- Trap and process errors and exceptions

  - [udpcluster](tcllib/files/modules/udpcluster/udpcluster\.md) UDP Peer\-to\-Peer cluster

  - [uevent](tcllib/files/modules/uev/uevent\.md) User events

  - [uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md) Request merging and deferal to idle time

  - [unicode](tcllib/files/modules/stringprep/unicode\.md) Implementation of Unicode normalization

  - [unicode::data](tcllib/files/modules/stringprep/unicode\_data\.md) unicode data tables, generated, internal

  - [units](tcllib/files/modules/units/units\.md) unit conversion

  - [uri](tcllib/files/modules/uri/uri\.md) URI utilities

  - [uri\_urn](tcllib/files/modules/uri/urn\-scheme\.md) URI utilities, URN scheme

  - [uuencode](tcllib/files/modules/base64/uuencode\.md) UU\-encode/decode binary data

  - [uuid](tcllib/files/modules/uuid/uuid\.md) UUID generation and comparison

  - [valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) Validation, common code

  - [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) Validation for AMEX creditcard number

  - [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) Validation for Discover creditcard number

  - [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) Validation for Mastercard creditcard number

  - [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) Validation for VISA creditcard number

  - [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) Validation for EAN13

  - [valtype::iban](tcllib/files/modules/valtype/iban\.md) Validation for IBAN

  - [valtype::imei](tcllib/files/modules/valtype/imei\.md) Validation for IMEI

  - [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) Validation for ISBN

  - [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) Validation for plain number with a LUHN checkdigit

  - [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) Validation for plain number with a LUHN5 checkdigit

  - [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) Validation for USNPI

  - [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md) Validation for plain number with a VERHOEFF checkdigit

  - [websocket](tcllib/files/modules/websocket/websocket\.md) Tcl implementation of the websocket protocol

  - [wip](tcllib/files/modules/wip/wip\.md) Word Interpreter

  - [xsxp](tcllib/files/modules/amazon\-s3/xsxp\.md) eXtremely Simple Xml Parser

  - [yaml](tcllib/files/modules/yaml/yaml\.md) YAML Format Encoder/Decoder

  - [yencode](tcllib/files/modules/base64/yencode\.md) Y\-encode/decode binary data

  - [zipfile::decode](tcllib/files/modules/zip/decode\.md) Access to zip archives

  - [zipfile::encode](tcllib/files/modules/zip/encode\.md) Generation of zip archives

  - [zipfile::mkzip](tcllib/files/modules/zip/mkzip\.md) Build a zip archive
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/toc.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068

[//000000001]: # (Table of contents generated by tcllib/doctools/toc with format 'markdown')

# Table Of Contents \-\-

  - [By Categories]()

      * [Argument entry form, mega widget]()

          + [tepam::argument\_dialogbox](tcllib/files/modules/tepam/tepam\_argument\_dialogbox\.md) TEPAM argument\_dialogbox, reference manual

      * [Benchmark tools]()

          + [bench](tcllib/files/modules/bench/bench\.md) bench \- Processing benchmark suites

          + [bench::in](tcllib/files/modules/bench/bench\_read\.md) bench::in \- Reading benchmark results

          + [bench::out::csv](tcllib/files/modules/bench/bench\_wcsv\.md) bench::out::csv \- Formatting benchmark results as CSV

          + [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md) bench::out::text \- Formatting benchmark results as human readable text

          + [bench\_intro](tcllib/files/modules/bench/bench\_intro\.md) bench introduction

          + [bench\_lang\_intro](tcllib/files/modules/bench/bench\_lang\_intro\.md) bench language introduction

          + [bench\_lang\_spec](tcllib/files/modules/bench/bench\_lang\_spec\.md) bench language specification

      * [CGI programming]()

          + [html](tcllib/files/modules/html/html\.md) Procedures to generate HTML structures

          + [javascript](tcllib/files/modules/javascript/javascript\.md) Procedures to generate HTML and Java Script structures\.

          + [json](tcllib/files/modules/json/json\.md) JSON parser

          + [json::write](tcllib/files/modules/json/json\_write\.md) JSON generation

          + [ncgi](tcllib/files/modules/ncgi/ncgi\.md) Procedures to manipulate CGI values\.

      * [Channels]()

          + [tcl::chan::cat](tcllib/files/modules/virtchannel\_base/cat\.md) Concatenation channel

          + [tcl::chan::core](tcllib/files/modules/virtchannel\_core/core\.md) Basic reflected/virtual channel support

          + [tcl::chan::events](tcllib/files/modules/virtchannel\_core/events\.md) Event support for reflected/virtual channels

          + [tcl::chan::facade](tcllib/files/modules/virtchannel\_base/facade\.md) Facade channel

          + [tcl::chan::fifo](tcllib/files/modules/virtchannel\_base/tcllib\_fifo\.md) In\-memory fifo channel

          + [tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md) In\-memory interconnected fifo channels

          + [tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md) In\-memory channel, half of a fifo2

          + [tcl::chan::memchan](tcllib/files/modules/virtchannel\_base/tcllib\_memchan\.md) In\-memory channel

          + [tcl::chan::null](tcllib/files/modules/virtchannel\_base/tcllib\_null\.md) Null channel

          + [tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md) Null/Zero channel combination

          + [tcl::chan::random](tcllib/files/modules/virtchannel\_base/tcllib\_random\.md) Random channel

          + [tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md) Standard I/O, unification of stdin and stdout

          + [tcl::chan::string](tcllib/files/modules/virtchannel\_base/tcllib\_string\.md) Read\-only in\-memory channel

          + [tcl::chan::textwindow](tcllib/files/modules/virtchannel\_base/textwindow\.md) Textwindow channel

          + [tcl::chan::variable](tcllib/files/modules/virtchannel\_base/tcllib\_variable\.md) In\-memory channel using variable for storage

          + [tcl::chan::zero](tcllib/files/modules/virtchannel\_base/tcllib\_zero\.md) Zero channel

          + [tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md) Utilities for random channels

          + [tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) Adler32 transformation

          + [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md) Base64 encoding transformation

          + [tcl::transform::core](tcllib/files/modules/virtchannel\_core/transformcore\.md) Basic reflected/virtual channel transform support

          + [tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md) Counter transformation

          + [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md) Crc32 transformation

          + [tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md) Hexadecimal encoding transformation

          + [tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md) Identity transformation

          + [tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md) limiting input

          + [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md) Observer transformation, stream copy

          + [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) Encryption via one\-time pad

          + [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) rot\-encryption

          + [tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md) Space insertation and removal

          + [tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md) zlib \(de\)compression

      * [Coroutine]()

          + [coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) Coroutine based event and IO handling

          + [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md) Automatic event and IO coroutine awareness

      * [Data structures]()

          + [counter](tcllib/files/modules/counter/counter\.md) Procedures for counters and histograms

          + [report](tcllib/files/modules/report/report\.md) Create and manipulate report objects

          + [struct::disjointset](tcllib/files/modules/struct/disjointset\.md) Disjoint set data structure

          + [struct::graph](tcllib/files/modules/struct/graph\.md) Create and manipulate directed graph objects

          + [struct::graph::op](tcllib/files/modules/struct/graphops\.md) Operation for \(un\)directed graph objects

          + [struct::graph\_v1](tcllib/files/modules/struct/graph1\.md) Create and manipulate directed graph objects

          + [struct::list](tcllib/files/modules/struct/struct\_list\.md) Procedures for manipulating lists

          + [struct::matrix](tcllib/files/modules/struct/matrix\.md) Create and manipulate matrix objects

          + [struct::matrix\_v1](tcllib/files/modules/struct/matrix1\.md) Create and manipulate matrix objects

          + [struct::pool](tcllib/files/modules/struct/pool\.md) Create and manipulate pool objects \(of discrete items\)

          + [struct::prioqueue](tcllib/files/modules/struct/prioqueue\.md) Create and manipulate prioqueue objects

          + [struct::queue](tcllib/files/modules/struct/queue\.md) Create and manipulate queue objects

          + [struct::record](tcllib/files/modules/struct/record\.md) Define and create records \(similar to 'C' structures\)

          + [struct::set](tcllib/files/modules/struct/struct\_set\.md) Procedures for manipulating sets

          + [struct::skiplist](tcllib/files/modules/struct/skiplist\.md) Create and manipulate skiplists

          + [struct::stack](tcllib/files/modules/struct/stack\.md) Create and manipulate stack objects

          + [struct::tree](tcllib/files/modules/struct/struct\_tree\.md) Create and manipulate tree objects

          + [struct::tree\_v1](tcllib/files/modules/struct/struct\_tree1\.md) Create and manipulate tree objects

          + [treeql](tcllib/files/modules/treeql/treeql\.md) Query tree objects

      * [debugging, tracing, and logging]()

          + [debug](tcllib/files/modules/debug/debug\.md) debug narrative \- core

          + [debug::caller](tcllib/files/modules/debug/debug\_caller\.md) debug narrative \- caller

          + [debug::heartbeat](tcllib/files/modules/debug/debug\_heartbeat\.md) debug narrative \- heartbeat

          + [debug::timestamp](tcllib/files/modules/debug/debug\_timestamp\.md) debug narrative \- timestamping

      * [Documentation tools]()

          + [docidx\_intro](tcllib/files/modules/doctools/docidx\_intro\.md) docidx introduction

          + [docidx\_lang\_cmdref](tcllib/files/modules/doctools/docidx\_lang\_cmdref\.md) docidx language command reference

          + [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) docidx language faq

          + [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) docidx language introduction

          + [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md) docidx language syntax

          + [docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md) docidx plugin API reference

          + [docstrip](tcllib/files/modules/docstrip/docstrip\.md) Docstrip style source code extraction

          + [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) Docstrip\-related utilities

          + [doctoc\_intro](tcllib/files/modules/doctools/doctoc\_intro\.md) doctoc introduction

          + [doctoc\_lang\_cmdref](tcllib/files/modules/doctools/doctoc\_lang\_cmdref\.md) doctoc language command reference

          + [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) doctoc language faq

          + [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) doctoc language introduction

          + [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md) doctoc language syntax

          + [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) doctoc plugin API reference

          + [doctools](tcllib/files/modules/doctools/doctools\.md) doctools \- Processing documents

          + [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) DocTools \- Keyword indices

          + [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) DocTools \- Tables of Contents

          + [doctools::changelog](tcllib/files/modules/doctools/changelog\.md) Processing text in Emacs ChangeLog format

          + [doctools::cvs](tcllib/files/modules/doctools/cvs\.md) Processing text in 'cvs log' format

          + [doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md) Default CSS style for HTML export plugins

          + [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) Holding keyword indices

          + [doctools::idx](tcllib/files/modules/doctools/docidx\.md) docidx \- Processing indices

          + [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) Exporting keyword indices

          + [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) Importing keyword indices

          + [doctools::idx::parse](tcllib/files/modules/doctools2idx/idx\_parse\.md) Parsing text in docidx format

          + [doctools::idx::structure](tcllib/files/modules/doctools2idx/idx\_structure\.md) Docidx serialization utilities

          + [doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) Message catalog management for the various document parsers

          + [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) Message catalog for the docidx parser \(C\)

          + [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) Message catalog for the docidx parser \(DE\)

          + [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) Message catalog for the docidx parser \(EN\)

          + [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) Message catalog for the docidx parser \(FR\)

          + [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) Message catalog for the doctoc parser \(C\)

          + [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) Message catalog for the doctoc parser \(DE\)

          + [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) Message catalog for the doctoc parser \(EN\)

          + [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md) Message catalog for the doctoc parser \(FR\)

          + [doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md) Default CSS style for NROFF export plugins

          + [doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md) Processing text in 'subst \-novariables' format

          + [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) Holding tables of contents

          + [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) doctoc \- Processing tables of contents

          + [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) Exporting tables of contents

          + [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) Importing keyword indices

          + [doctools::toc::parse](tcllib/files/modules/doctools2toc/toc\_parse\.md) Parsing text in doctoc format

          + [doctools::toc::structure](tcllib/files/modules/doctools2toc/toc\_structure\.md) Doctoc serialization utilities

          + [doctools\_intro](tcllib/files/modules/doctools/doctools\_intro\.md) doctools introduction

          + [doctools\_lang\_cmdref](tcllib/files/modules/doctools/doctools\_lang\_cmdref\.md) doctools language command reference

          + [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) doctools language faq

          + [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) doctools language introduction

          + [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md) doctools language syntax

          + [doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md) doctools plugin API reference

          + [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) Lightweight DocTools Markup Processor

          + [dtplite](tcllib/files/apps/dtplite\.md) Lightweight DocTools Markup Processor

          + [mpexpand](tcllib/files/modules/doctools/mpexpand\.md) Markup processor

          + [tcldocstrip](tcllib/files/apps/tcldocstrip\.md) Tcl\-based Docstrip Processor

          + [tepam::doc\_gen](tcllib/files/modules/tepam/tepam\_doc\_gen\.md) TEPAM DOC Generation, reference manual

          + [textutil::expander](tcllib/files/modules/textutil/expander\.md) Procedures to process templates and expand text\.

      * [File]()

          + [zipfile::decode](tcllib/files/modules/zip/decode\.md) Access to zip archives

          + [zipfile::encode](tcllib/files/modules/zip/encode\.md) Generation of zip archives

          + [zipfile::mkzip](tcllib/files/modules/zip/mkzip\.md) Build a zip archive

      * [File formats]()

          + [gpx](tcllib/files/modules/gpx/gpx\.md) Extracts waypoints, tracks and routes from GPX files

          + [jpeg](tcllib/files/modules/jpeg/jpeg\.md) JPEG querying and manipulation of meta data

          + [png](tcllib/files/modules/png/png\.md) PNG querying and manipulation of meta data

          + [tar](tcllib/files/modules/tar/tar\.md) Tar file creation, extraction & manipulation

          + [tiff](tcllib/files/modules/tiff/tiff\.md) TIFF reading, writing, and querying and manipulation of meta data

      * [Grammars and finite automata]()

          + [grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md) Aycock\-Horspool\-Earley parser generator for Tcl

          + [grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) Create and manipulate finite automatons

          + [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) Create and use deterministic acceptors

          + [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) Execute deterministic finite automatons

          + [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md) Operations on finite automatons

          + [grammar::me::cpu](tcllib/files/modules/grammar\_me/me\_cpu\.md) Virtual machine implementation II for parsing token streams

          + [grammar::me::cpu::core](tcllib/files/modules/grammar\_me/me\_cpucore\.md) ME virtual machine state manipulation

          + [grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md) ME assembler

          + [grammar::me::tcl](tcllib/files/modules/grammar\_me/me\_tcl\.md) Virtual machine implementation I for parsing token streams

          + [grammar::me::util](tcllib/files/modules/grammar\_me/me\_util\.md) AST utilities

          + [grammar::me\_ast](tcllib/files/modules/grammar\_me/me\_ast\.md) Various representations of ASTs

          + [grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) Introduction to virtual machines for parsing token streams

          + [grammar::me\_vm](tcllib/files/modules/grammar\_me/me\_vm\.md) Virtual machine for parsing token streams

          + [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) Create and manipulate parsing expression grammars

          + [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) Interpreter for parsing expression grammars

      * [Hashes, checksums, and encryption]()

          + [aes](tcllib/files/modules/aes/aes\.md) Implementation of the AES block cipher

          + [blowfish](tcllib/files/modules/blowfish/blowfish\.md) Implementation of the Blowfish block cipher

          + [cksum](tcllib/files/modules/crc/cksum\.md) Calculate a cksum\(1\) compatible checksum

          + [crc16](tcllib/files/modules/crc/crc16\.md) Perform a 16bit Cyclic Redundancy Check

          + [crc32](tcllib/files/modules/crc/crc32\.md) Perform a 32bit Cyclic Redundancy Check

          + [des](tcllib/files/modules/des/des\.md) Implementation of the DES and triple\-DES ciphers

          + [md4](tcllib/files/modules/md4/md4\.md) MD4 Message\-Digest Algorithm

          + [md5](tcllib/files/modules/md5/md5\.md) MD5 Message\-Digest Algorithm

          + [md5crypt](tcllib/files/modules/md5crypt/md5crypt\.md) MD5\-based password encryption

          + [otp](tcllib/files/modules/otp/otp\.md) One\-Time Passwords

          + [pki](tcllib/files/modules/pki/pki\.md) Implementation of the public key cipher

          + [rc4](tcllib/files/modules/rc4/rc4\.md) Implementation of the RC4 stream cipher

          + [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) RIPEMD\-128 Message\-Digest Algorithm

          + [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md) RIPEMD\-160 Message\-Digest Algorithm

          + [sha1](tcllib/files/modules/sha1/sha1\.md) SHA1 Message\-Digest Algorithm

          + [sha256](tcllib/files/modules/sha1/sha256\.md) SHA256 Message\-Digest Algorithm

          + [soundex](tcllib/files/modules/soundex/soundex\.md) Soundex

          + [sum](tcllib/files/modules/crc/sum\.md) Calculate a sum\(1\) compatible checksum

          + [tclDES](tcllib/files/modules/des/tcldes\.md) Implementation of the DES and triple\-DES ciphers

          + [tclDESjr](tcllib/files/modules/des/tcldesjr\.md) Implementation of the DES and triple\-DES ciphers

          + [uuid](tcllib/files/modules/uuid/uuid\.md) UUID generation and comparison

      * [Mathematics]()

          + [math](tcllib/files/modules/math/math\.md) Tcl Math Library

          + [math::bigfloat](tcllib/files/modules/math/bigfloat\.md) Arbitrary precision floating\-point numbers

          + [math::bignum](tcllib/files/modules/math/bignum\.md) Arbitrary precision integer numbers

          + [math::calculus](tcllib/files/modules/math/calculus\.md) Integration and ordinary differential equations

          + [math::calculus::romberg](tcllib/files/modules/math/romberg\.md) Romberg integration

          + [math::changepoint](tcllib/files/modules/math/changepoint\.md) Change point detection methods

          + [math::combinatorics](tcllib/files/modules/math/combinatorics\.md) Combinatorial functions in the Tcl Math Library

          + [math::complexnumbers](tcllib/files/modules/math/qcomplex\.md) Straightforward complex number package

          + [math::constants](tcllib/files/modules/math/constants\.md) Mathematical and numerical constants

          + [math::decimal](tcllib/files/modules/math/decimal\.md) General decimal arithmetic

          + [math::exact](tcllib/files/modules/math/exact\.md) Exact Real Arithmetic

          + [math::filters](tcllib/files/modules/math/filtergen\.md) Digital filters

          + [math::fourier](tcllib/files/modules/math/fourier\.md) Discrete and fast fourier transforms

          + [math::fuzzy](tcllib/files/modules/math/fuzzy\.md) Fuzzy comparison of floating\-point numbers

          + [math::geometry](tcllib/files/modules/math/math\_geometry\.md) Geometrical computations

          + [math::interpolate](tcllib/files/modules/math/interpolate\.md) Interpolation routines

          + [math::linearalgebra](tcllib/files/modules/math/linalg\.md) Linear Algebra

          + [math::numtheory](tcllib/files/modules/math/numtheory\.md) Number Theory

          + [math::optimize](tcllib/files/modules/math/optimize\.md) Optimisation routines

          + [math::PCA](tcllib/files/modules/math/pca\.md) Package for Principal Component Analysis

          + [math::polynomials](tcllib/files/modules/math/polynomials\.md) Polynomial functions

          + [math::probopt](tcllib/files/modules/math/probopt\.md) Probabilistic optimisation methods

          + [math::quasirandom](tcllib/files/modules/math/quasirandom\.md) Quasi\-random points for integration and Monte Carlo type methods

          + [math::rationalfunctions](tcllib/files/modules/math/rational\_funcs\.md) Polynomial functions

          + [math::roman](tcllib/files/modules/math/roman\.md) Tools for creating and manipulating roman numerals

          + [math::special](tcllib/files/modules/math/special\.md) Special mathematical functions

          + [math::statistics](tcllib/files/modules/math/statistics\.md) Basic statistical functions and procedures

          + [math::trig](tcllib/files/modules/math/trig\.md) Trigonometric anf hyperbolic functions

          + [simulation::annealing](tcllib/files/modules/simulation/annealing\.md) Simulated annealing

          + [simulation::montecarlo](tcllib/files/modules/simulation/montecarlo\.md) Monte Carlo simulations

          + [simulation::random](tcllib/files/modules/simulation/simulation\_random\.md) Pseudo\-random number generators

      * [Networking]()

          + [asn](tcllib/files/modules/asn/asn\.md) ASN\.1 BER encoder/decoder

          + [autoproxy](tcllib/files/modules/http/autoproxy\.md) Automatic HTTP proxy usage and authentication

          + [bee](tcllib/files/modules/bee/bee\.md) BitTorrent Serialization Format Encoder/Decoder

          + [dns](tcllib/files/modules/dns/tcllib\_dns\.md) Tcl Domain Name Service Client

          + [ftp](tcllib/files/modules/ftp/ftp\.md) Client\-side tcl implementation of the ftp protocol

          + [ftp::geturl](tcllib/files/modules/ftp/ftp\_geturl\.md) Uri handler for ftp urls

          + [ftpd](tcllib/files/modules/ftpd/ftpd\.md) Tcl FTP server implementation

          + [httpd](tcllib/files/modules/httpd/httpd\.md) A TclOO and coroutine based web server

          + [ident](tcllib/files/modules/ident/ident\.md) Ident protocol client

          + [imap4](tcllib/files/modules/imap4/imap4\.md) imap client\-side tcl implementation of imap protocol

          + [irc](tcllib/files/modules/irc/irc\.md) Create IRC connection and interface\.

          + [ldap](tcllib/files/modules/ldap/ldap\.md) LDAP client

          + [ldapx](tcllib/files/modules/ldap/ldapx\.md) LDAP extended object interface

          + [nameserv](tcllib/files/modules/nns/nns\_client\.md) Name service facility, Client

          + [nameserv::auto](tcllib/files/modules/nns/nns\_auto\.md) Name service facility, Client Extension

          + [nameserv::common](tcllib/files/modules/nns/nns\_common\.md) Name service facility, shared definitions

          + [nameserv::protocol](tcllib/files/modules/nns/nns\_protocol\.md) Name service facility, client/server protocol

          + [nameserv::server](tcllib/files/modules/nns/nns\_server\.md) Name service facility, Server

          + [nmea](tcllib/files/modules/nmea/nmea\.md) Process NMEA data

          + [nns](tcllib/files/apps/nns\.md) Name service facility, Commandline Client Application

          + [nns\_intro](tcllib/files/modules/nns/nns\_intro\.md) Name service facility, introduction

          + [nnsd](tcllib/files/apps/nnsd\.md) Name service facility, Commandline Server Application

          + [nnslog](tcllib/files/apps/nnslog\.md) Name service facility, Commandline Logging Client Application

          + [nntp](tcllib/files/modules/nntp/nntp\.md) Tcl client for the NNTP protocol

          + [ntp\_time](tcllib/files/modules/ntp/ntp\_time\.md) Tcl Time Service Client

          + [oauth](tcllib/files/modules/oauth/oauth\.md) oauth API base signature

          + [picoirc](tcllib/files/modules/irc/picoirc\.md) Small and simple embeddable IRC client\.

          + [pop3](tcllib/files/modules/pop3/pop3\.md) Tcl client for POP3 email protocol

          + [pop3d](tcllib/files/modules/pop3d/pop3d\.md) Tcl POP3 server implementation

          + [pop3d::dbox](tcllib/files/modules/pop3d/pop3d\_dbox\.md) Simple mailbox database for pop3d

          + [pop3d::udb](tcllib/files/modules/pop3d/pop3d\_udb\.md) Simple user database for pop3d

          + [S3](tcllib/files/modules/amazon\-s3/S3\.md) Amazon S3 Web Service Interface

          + [SASL](tcllib/files/modules/sasl/sasl\.md) Implementation of SASL mechanisms for Tcl

          + [SASL::NTLM](tcllib/files/modules/sasl/ntlm\.md) Implementation of SASL NTLM mechanism for Tcl

          + [SASL::SCRAM](tcllib/files/modules/sasl/scram\.md) Implementation of SASL SCRAM mechanism for Tcl

          + [SASL::XGoogleToken](tcllib/files/modules/sasl/gtoken\.md) Implementation of SASL NTLM mechanism for Tcl

          + [smtp](tcllib/files/modules/mime/smtp\.md) Client\-side tcl implementation of the smtp protocol

          + [smtpd](tcllib/files/modules/smtpd/smtpd\.md) Tcl SMTP server implementation

          + [tcllib\_ip](tcllib/files/modules/dns/tcllib\_ip\.md) IPv4 and IPv6 address manipulation

          + [udpcluster](tcllib/files/modules/udpcluster/udpcluster\.md) UDP Peer\-to\-Peer cluster

          + [uri](tcllib/files/modules/uri/uri\.md) URI utilities

          + [uri\_urn](tcllib/files/modules/uri/urn\-scheme\.md) URI utilities, URN scheme

          + [websocket](tcllib/files/modules/websocket/websocket\.md) Tcl implementation of the websocket protocol

      * [Page Parser Generator]()

          + [page](tcllib/files/apps/page\.md) Parser Generator

          + [page\_intro](tcllib/files/modules/page/page\_intro\.md) page introduction

          + [page\_pluginmgr](tcllib/files/modules/page/page\_pluginmgr\.md) page plugin manager

          + [page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md) page dataflow/treewalker utility

          + [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) page AST normalization, LEMON

          + [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md) page AST normalization, PEG

          + [page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) page PEG transformation utilities

          + [page\_util\_quote](tcllib/files/modules/page/page\_util\_quote\.md) page character quoting utilities

      * [Parsing and Grammars]()

          + [pt](tcllib/files/apps/pt\.md) Parser Tools Application

          + [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) Abstract Syntax Tree Serialization

          + [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) C/PARAM, Canned configuration, Critcl

          + [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) C/PARAM, Canned configuration, TEA

          + [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) The JSON Grammar Exchange Format

          + [pt::param](tcllib/files/modules/pt/pt\_param\.md) PackRat Machine Specification

          + [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) Parsing Expression Serialization

          + [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) Parsing Expression Utilities

          + [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) Parsing Expression Grammar Serialization

          + [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) PEG Storage

          + [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) PEG Storage\. Canned PEG grammar specification

          + [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) PEG Export

          + [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) PEG Export Plugin\. Write CONTAINER format

          + [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) PEG Export Plugin\. Write JSON format

          + [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) PEG Export Plugin\. Write PEG format

          + [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) PEG Conversion\. From CONTAINER format

          + [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) PEG Conversion\. Read JSON format

          + [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) PEG Conversion\. Read PEG format

          + [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) PEG Import

          + [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) PEG Import Plugin\. From CONTAINER format

          + [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) PEG Import Plugin\. Read JSON format

          + [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) PEG Import Plugin\. Read PEG format

          + [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) Interpreter for parsing expression grammars

          + [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) PEG Conversion\. Write CONTAINER format

          + [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) PEG Conversion\. Write CPARAM format

          + [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) PEG Conversion\. Write JSON format

          + [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) PEG Conversion\. Write PARAM format

          + [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) PEG Conversion\. Write PEG format

          + [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) PEG Conversion\. Write TCLPARAM format

          + [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) PEG Language Tutorial

          + [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) Introduction to Parsing Expression Grammars

          + [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) Parser Generator

          + [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) Parsing Runtime Support, PARAM based

          + [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) Tcl/PARAM, Canned configuration, NX

          + [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) Tcl/PARAM, Canned configuration, Snit

          + [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) Tcl/PARAM, Canned configuration, Tcloo

          + [pt::util](tcllib/files/modules/pt/pt\_util\.md) General utilities

          + [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) Parser Tools Export API

          + [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) Parser Tools Import API

          + [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) Introduction to Parser Tools

          + [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) Parser Tools PEG Parser

          + [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) Parser API

          + [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md) Parser Tools PE Grammar Utility Operations

      * [Procedures, arguments, parameters, options]()

          + [tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager

          + [tepam::procedure](tcllib/files/modules/tepam/tepam\_procedure\.md) TEPAM procedure, reference manual

      * [Programming tools]()

          + [clay](tcllib/files/modules/clay/clay\.md) A minimalist framework for large scale OO Projects

          + [cmdline](tcllib/files/modules/cmdline/cmdline\.md) Procedures to process command lines and options\.

          + [comm](tcllib/files/modules/comm/comm\.md) A remote communication facility for Tcl \(8\.3 and later\)

          + [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md) The comm wire protocol

          + [control](tcllib/files/modules/control/control\.md) Procedures for control flow structures\.

          + [deleg\_method](tcllib/files/modules/interp/deleg\_method\.md) Creation of comm delegates \(snit methods\)

          + [deleg\_proc](tcllib/files/modules/interp/deleg\_proc\.md) Creation of comm delegates \(procedures\)

          + [fileutil](tcllib/files/modules/fileutil/fileutil\.md) Procedures implementing some file utilities

          + [fileutil::magic::cfront](tcllib/files/modules/fumagic/cfront\.md) Generator core for compiler of magic\(5\) files

          + [fileutil::magic::cgen](tcllib/files/modules/fumagic/cgen\.md) Generator core for compiler of magic\(5\) files

          + [fileutil::magic::filetype](tcllib/files/modules/fumagic/filetypes\.md) Procedures implementing file\-type recognition

          + [fileutil::magic::rt](tcllib/files/modules/fumagic/rtcore\.md) Runtime core for file type recognition engines written in pure Tcl

          + [fileutil::multi](tcllib/files/modules/fileutil/multi\.md) Multi\-file operation, scatter/gather, standard object

          + [fileutil::multi::op](tcllib/files/modules/fileutil/multiop\.md) Multi\-file operation, scatter/gather

          + [fileutil\_traverse](tcllib/files/modules/fileutil/traverse\.md) Iterative directory traversal

          + [hook](tcllib/files/modules/hook/hook\.md) Hooks

          + [interp](tcllib/files/modules/interp/tcllib\_interp\.md) Interp creation and aliasing

          + [log](tcllib/files/modules/log/log\.md) Procedures to log messages of libraries and applications\.

          + [logger](tcllib/files/modules/log/logger\.md) System to control logging of events\.

          + [logger::appender](tcllib/files/modules/log/loggerAppender\.md) Collection of predefined appenders for logger

          + [logger::utils](tcllib/files/modules/log/loggerUtils\.md) Utilities for logger

          + [multiplexer](tcllib/files/modules/multiplexer/multiplexer\.md) One\-to\-many communication with sockets\.

          + [pluginmgr](tcllib/files/modules/pluginmgr/pluginmgr\.md) Manage a plugin

          + [profiler](tcllib/files/modules/profiler/profiler\.md) Tcl source code profiler

          + [snit](tcllib/files/modules/snit/snit\.md) Snit's Not Incr Tcl

          + [snitfaq](tcllib/files/modules/snit/snitfaq\.md) Snit Frequently Asked Questions

          + [stooop](tcllib/files/modules/stooop/stooop\.md) Object oriented extension\.

          + [switched](tcllib/files/modules/stooop/switched\.md) switch/option management\.

          + [tie](tcllib/files/modules/tie/tie\.md) Array persistence

          + [tie](tcllib/files/modules/tie/tie\_std\.md) Array persistence, standard data sources

          + [uevent](tcllib/files/modules/uev/uevent\.md) User events

          + [wip](tcllib/files/modules/wip/wip\.md) Word Interpreter

      * [System]()

          + [cron](tcllib/files/modules/cron/cron\.md) Tool for automating the period callback of commands

          + [nettool](tcllib/files/modules/nettool/nettool\.md) Tools for networked applications

          + [processman](tcllib/files/modules/processman/processman\.md) Tool for automating the period callback of commands

      * [TclOO]()

          + [oometa](tcllib/files/modules/oometa/oometa\.md) oo::meta A data registry for classess

          + [practcl](tcllib/files/modules/practcl/practcl\.md) The Practcl Module

          + [tool](tcllib/files/modules/tool/tool\.md) TclOO Library \(TOOL\) Framework

      * [Terminal control]()

          + [term](tcllib/files/modules/term/term\.md) General terminal control

          + [term::ansi::code](tcllib/files/modules/term/ansi\_code\.md) Helper for control sequences

          + [term::ansi::code::attr](tcllib/files/modules/term/ansi\_cattr\.md) ANSI attribute sequences

          + [term::ansi::code::ctrl](tcllib/files/modules/term/ansi\_cctrl\.md) ANSI control sequences

          + [term::ansi::code::macros](tcllib/files/modules/term/ansi\_cmacros\.md) Macro sequences

          + [term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md) Control operations and queries

          + [term::ansi::send](tcllib/files/modules/term/ansi\_send\.md) Output of ANSI control sequences to terminals

          + [term::interact::menu](tcllib/files/modules/term/imenu\.md) Terminal widget, menu

          + [term::interact::pager](tcllib/files/modules/term/ipager\.md) Terminal widget, paging

          + [term::receive](tcllib/files/modules/term/receive\.md) General input from terminals

          + [term::receive::bind](tcllib/files/modules/term/term\_bind\.md) Keyboard dispatch from terminals

          + [term::send](tcllib/files/modules/term/term\_send\.md) General output to terminals

      * [Text formatter plugin]()

          + [doctools::idx::export::docidx](tcllib/files/modules/doctools2idx/export\_docidx\.md) docidx export plugin

          + [doctools::idx::export::html](tcllib/files/modules/doctools2idx/idx\_export\_html\.md) HTML export plugin

          + [doctools::idx::export::json](tcllib/files/modules/doctools2idx/idx\_export\_json\.md) JSON export plugin

          + [doctools::idx::export::nroff](tcllib/files/modules/doctools2idx/idx\_export\_nroff\.md) nroff export plugin

          + [doctools::idx::export::text](tcllib/files/modules/doctools2idx/idx\_export\_text\.md) plain text export plugin

          + [doctools::idx::export::wiki](tcllib/files/modules/doctools2idx/idx\_export\_wiki\.md) wiki export plugin

          + [doctools::idx::import::docidx](tcllib/files/modules/doctools2idx/import\_docidx\.md) docidx import plugin

          + [doctools::idx::import::json](tcllib/files/modules/doctools2idx/idx\_import\_json\.md) JSON import plugin

          + [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) doctoc export plugin

          + [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) HTML export plugin

          + [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) JSON export plugin

          + [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) nroff export plugin

          + [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md) plain text export plugin

          + [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md) wiki export plugin

          + [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) doctoc import plugin

          + [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md) JSON import plugin

      * [Text processing]()

          + [ascii85](tcllib/files/modules/base64/ascii85\.md) ascii85\-encode/decode binary data

          + [base32](tcllib/files/modules/base32/base32\.md) base32 standard encoding

          + [base32::core](tcllib/files/modules/base32/base32core\.md) Expanding basic base32 maps

          + [base32::hex](tcllib/files/modules/base32/base32hex\.md) base32 extended hex encoding

          + [base64](tcllib/files/modules/base64/base64\.md) base64\-encode/decode binary data

          + [bibtex](tcllib/files/modules/bibtex/bibtex\.md) Parse bibtex files

          + [clock\_iso8601](tcllib/files/modules/clock/iso8601\.md) Parsing ISO 8601 dates/times

          + [clock\_rfc2822](tcllib/files/modules/clock/rfc2822\.md) Parsing RFC 2822 dates/times

          + [csv](tcllib/files/modules/csv/csv\.md) Procedures to handle CSV data\.

          + [htmlparse](tcllib/files/modules/htmlparse/htmlparse\.md) Procedures to parse HTML strings

          + [inifile](tcllib/files/modules/inifile/ini\.md) Parsing of Windows INI files

          + [markdown](tcllib/files/modules/markdown/markdown\.md) Converts Markdown text to HTML

          + [mime](tcllib/files/modules/mime/mime\.md) Manipulation of MIME body parts

          + [rcs](tcllib/files/modules/rcs/rcs\.md) RCS low level utilities

          + [string::token](tcllib/files/modules/string/token\.md) Regex based iterative lexing

          + [string::token::shell](tcllib/files/modules/string/token\_shell\.md) Parsing of shell command line

          + [textutil](tcllib/files/modules/textutil/textutil\.md) Procedures to manipulate texts and strings\.

          + [textutil::adjust](tcllib/files/modules/textutil/adjust\.md) Procedures to adjust, indent, and undent paragraphs

          + [textutil::patch](tcllib/files/modules/textutil/patch\.md) Application of uni\-diff patches to directory trees

          + [textutil::repeat](tcllib/files/modules/textutil/repeat\.md) Procedures to repeat strings\.

          + [textutil::split](tcllib/files/modules/textutil/textutil\_split\.md) Procedures to split texts

          + [textutil::string](tcllib/files/modules/textutil/textutil\_string\.md) Procedures to manipulate texts and strings\.

          + [textutil::tabify](tcllib/files/modules/textutil/tabify\.md) Procedures to \(un\)tabify strings

          + [textutil::trim](tcllib/files/modules/textutil/trim\.md) Procedures to trim strings

          + [uuencode](tcllib/files/modules/base64/uuencode\.md) UU\-encode/decode binary data

          + [xsxp](tcllib/files/modules/amazon\-s3/xsxp\.md) eXtremely Simple Xml Parser

          + [yencode](tcllib/files/modules/base64/yencode\.md) Y\-encode/decode binary data

      * [Transfer module]()

          + [transfer::connect](tcllib/files/modules/transfer/connect\.md) Connection setup

          + [transfer::copy](tcllib/files/modules/transfer/copyops\.md) Data transfer foundation

          + [transfer::copy::queue](tcllib/files/modules/transfer/tqueue\.md) Queued transfers

          + [transfer::data::destination](tcllib/files/modules/transfer/ddest\.md) Data destination

          + [transfer::data::source](tcllib/files/modules/transfer/dsource\.md) Data source

          + [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) Data source

          + [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md) Data source

      * [Unfiled]()

          + [cache::async](tcllib/files/modules/cache/async\.md) Asynchronous in\-memory cache

          + [fileutil::paths](tcllib/files/modules/fileutil/paths\.md) Manage search path pools

          + [generator](tcllib/files/modules/generator/generator\.md) Procedures for creating and using generators\.

          + [huddle](tcllib/files/modules/yaml/huddle\.md) Create and manipulate huddle object

          + [map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md) Resolving geographical names with a Nominatim service

          + [map::slippy](tcllib/files/modules/map/map\_slippy\.md) Common code for slippy based map packages

          + [map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md) Management of a tile cache in the local filesystem

          + [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md) Accessing a server providing tiles for slippy\-based maps

          + [mapproj](tcllib/files/modules/mapproj/mapproj\.md) Map projection routines

          + [math::calculus::symdiff](tcllib/files/modules/math/symdiff\.md) Symbolic differentiation for Tcl

          + [math::machineparameters](tcllib/files/modules/math/machineparameters\.md) Compute double precision machine parameters\.

          + [namespacex](tcllib/files/modules/namespacex/namespacex\.md) Namespace utility commands

          + [rest](tcllib/files/modules/rest/rest\.md) define REST web APIs and call them inline or asychronously

          + [stringprep](tcllib/files/modules/stringprep/stringprep\.md) Implementation of stringprep

          + [stringprep::data](tcllib/files/modules/stringprep/stringprep\_data\.md) stringprep data tables, generated, internal

          + [struct::map](tcllib/files/modules/struct/struct\_map\.md) Manage key/value maps

          + [uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md) Request merging and deferal to idle time

          + [unicode](tcllib/files/modules/stringprep/unicode\.md) Implementation of Unicode normalization

          + [unicode::data](tcllib/files/modules/stringprep/unicode\_data\.md) unicode data tables, generated, internal

          + [units](tcllib/files/modules/units/units\.md) unit conversion

          + [yaml](tcllib/files/modules/yaml/yaml\.md) YAML Format Encoder/Decoder

      * [Utilities]()

          + [dicttool](tcllib/files/modules/dicttool/dicttool\.md) Dictionary Tools

      * [Utility]()

          + [defer](tcllib/files/modules/defer/defer\.md) Defered execution

          + [lambda](tcllib/files/modules/lambda/lambda\.md) Utility commands for anonymous procedures

          + [lazyset](tcllib/files/modules/lazyset/lazyset\.md) Lazy evaluation

          + [oo::util](tcllib/files/modules/ooutil/ooutil\.md) Utility commands for TclOO

          + [oo::util](tcllib/files/modules/tool/meta\.md) Utility commands for TclOO

          + [throw](tcllib/files/modules/try/tcllib\_throw\.md) throw \- Throw an error exception with a message

          + [tool::dict\_ensemble](tcllib/files/modules/tool/tool\_dict\_ensemble\.md) Dictionary Tools

          + [try](tcllib/files/modules/try/tcllib\_try\.md) try \- Trap and process errors and exceptions

      * [Validation, Type checking]()

          + [valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) Validation, common code

          + [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) Validation for AMEX creditcard number

          + [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) Validation for Discover creditcard number

          + [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) Validation for Mastercard creditcard number

          + [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) Validation for VISA creditcard number

          + [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) Validation for EAN13

          + [valtype::iban](tcllib/files/modules/valtype/iban\.md) Validation for IBAN

          + [valtype::imei](tcllib/files/modules/valtype/imei\.md) Validation for IMEI

          + [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) Validation for ISBN

          + [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) Validation for plain number with a LUHN checkdigit

          + [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) Validation for plain number with a LUHN5 checkdigit

          + [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) Validation for USNPI

          + [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md) Validation for plain number with a VERHOEFF checkdigit

  - [By Type]()

      * [Applications]()

          + [dtplite](tcllib/files/apps/dtplite\.md) Lightweight DocTools Markup Processor

          + [nns](tcllib/files/apps/nns\.md) Name service facility, Commandline Client Application

          + [nnsd](tcllib/files/apps/nnsd\.md) Name service facility, Commandline Server Application

          + [nnslog](tcllib/files/apps/nnslog\.md) Name service facility, Commandline Logging Client Application

          + [page](tcllib/files/apps/page\.md) Parser Generator

          + [pt](tcllib/files/apps/pt\.md) Parser Tools Application

          + [tcldocstrip](tcllib/files/apps/tcldocstrip\.md) Tcl\-based Docstrip Processor

      * [Modules]()

          + [aes]()

              - [aes](tcllib/files/modules/aes/aes\.md) Implementation of the AES block cipher

          + [amazon\-s3]()

              - [S3](tcllib/files/modules/amazon\-s3/S3\.md) Amazon S3 Web Service Interface

              - [xsxp](tcllib/files/modules/amazon\-s3/xsxp\.md) eXtremely Simple Xml Parser

          + [asn]()

              - [asn](tcllib/files/modules/asn/asn\.md) ASN\.1 BER encoder/decoder

          + [base32]()

              - [base32](tcllib/files/modules/base32/base32\.md) base32 standard encoding

              - [base32::core](tcllib/files/modules/base32/base32core\.md) Expanding basic base32 maps

              - [base32::hex](tcllib/files/modules/base32/base32hex\.md) base32 extended hex encoding

          + [base64]()

              - [ascii85](tcllib/files/modules/base64/ascii85\.md) ascii85\-encode/decode binary data

              - [base64](tcllib/files/modules/base64/base64\.md) base64\-encode/decode binary data

              - [uuencode](tcllib/files/modules/base64/uuencode\.md) UU\-encode/decode binary data

              - [yencode](tcllib/files/modules/base64/yencode\.md) Y\-encode/decode binary data

          + [bee]()

              - [bee](tcllib/files/modules/bee/bee\.md) BitTorrent Serialization Format Encoder/Decoder

          + [bench]()

              - [bench](tcllib/files/modules/bench/bench\.md) bench \- Processing benchmark suites

              - [bench::in](tcllib/files/modules/bench/bench\_read\.md) bench::in \- Reading benchmark results

              - [bench::out::csv](tcllib/files/modules/bench/bench\_wcsv\.md) bench::out::csv \- Formatting benchmark results as CSV

              - [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md) bench::out::text \- Formatting benchmark results as human readable text

              - [bench\_intro](tcllib/files/modules/bench/bench\_intro\.md) bench introduction

              - [bench\_lang\_intro](tcllib/files/modules/bench/bench\_lang\_intro\.md) bench language introduction

              - [bench\_lang\_spec](tcllib/files/modules/bench/bench\_lang\_spec\.md) bench language specification

          + [bibtex]()

              - [bibtex](tcllib/files/modules/bibtex/bibtex\.md) Parse bibtex files

          + [blowfish]()

              - [blowfish](tcllib/files/modules/blowfish/blowfish\.md) Implementation of the Blowfish block cipher

          + [cache]()

              - [cache::async](tcllib/files/modules/cache/async\.md) Asynchronous in\-memory cache

          + [clay]()

              - [clay](tcllib/files/modules/clay/clay\.md) A minimalist framework for large scale OO Projects

          + [clock]()

              - [clock\_iso8601](tcllib/files/modules/clock/iso8601\.md) Parsing ISO 8601 dates/times

              - [clock\_rfc2822](tcllib/files/modules/clock/rfc2822\.md) Parsing RFC 2822 dates/times

          + [cmdline]()

              - [cmdline](tcllib/files/modules/cmdline/cmdline\.md) Procedures to process command lines and options\.

          + [comm]()

              - [comm](tcllib/files/modules/comm/comm\.md) A remote communication facility for Tcl \(8\.3 and later\)

              - [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md) The comm wire protocol

          + [control]()

              - [control](tcllib/files/modules/control/control\.md) Procedures for control flow structures\.

          + [coroutine]()

              - [coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) Coroutine based event and IO handling

              - [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md) Automatic event and IO coroutine awareness

          + [counter]()

              - [counter](tcllib/files/modules/counter/counter\.md) Procedures for counters and histograms

          + [crc]()

              - [cksum](tcllib/files/modules/crc/cksum\.md) Calculate a cksum\(1\) compatible checksum

              - [crc16](tcllib/files/modules/crc/crc16\.md) Perform a 16bit Cyclic Redundancy Check

              - [crc32](tcllib/files/modules/crc/crc32\.md) Perform a 32bit Cyclic Redundancy Check

              - [sum](tcllib/files/modules/crc/sum\.md) Calculate a sum\(1\) compatible checksum

          + [cron]()

              - [cron](tcllib/files/modules/cron/cron\.md) Tool for automating the period callback of commands

          + [csv]()

              - [csv](tcllib/files/modules/csv/csv\.md) Procedures to handle CSV data\.

          + [debug]()

              - [debug](tcllib/files/modules/debug/debug\.md) debug narrative \- core

              - [debug::caller](tcllib/files/modules/debug/debug\_caller\.md) debug narrative \- caller

              - [debug::heartbeat](tcllib/files/modules/debug/debug\_heartbeat\.md) debug narrative \- heartbeat

              - [debug::timestamp](tcllib/files/modules/debug/debug\_timestamp\.md) debug narrative \- timestamping

          + [defer]()

              - [defer](tcllib/files/modules/defer/defer\.md) Defered execution

          + [des]()

              - [des](tcllib/files/modules/des/des\.md) Implementation of the DES and triple\-DES ciphers

              - [tclDES](tcllib/files/modules/des/tcldes\.md) Implementation of the DES and triple\-DES ciphers

              - [tclDESjr](tcllib/files/modules/des/tcldesjr\.md) Implementation of the DES and triple\-DES ciphers

          + [dicttool]()

              - [dicttool](tcllib/files/modules/dicttool/dicttool\.md) Dictionary Tools

          + [dns]()

              - [dns](tcllib/files/modules/dns/tcllib\_dns\.md) Tcl Domain Name Service Client

              - [tcllib\_ip](tcllib/files/modules/dns/tcllib\_ip\.md) IPv4 and IPv6 address manipulation

          + [docstrip]()

              - [docstrip](tcllib/files/modules/docstrip/docstrip\.md) Docstrip style source code extraction

              - [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) Docstrip\-related utilities

          + [doctools]()

              - [docidx\_intro](tcllib/files/modules/doctools/docidx\_intro\.md) docidx introduction

              - [docidx\_lang\_cmdref](tcllib/files/modules/doctools/docidx\_lang\_cmdref\.md) docidx language command reference

              - [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) docidx language faq

              - [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) docidx language introduction

              - [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md) docidx language syntax

              - [docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md) docidx plugin API reference

              - [doctoc\_intro](tcllib/files/modules/doctools/doctoc\_intro\.md) doctoc introduction

              - [doctoc\_lang\_cmdref](tcllib/files/modules/doctools/doctoc\_lang\_cmdref\.md) doctoc language command reference

              - [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) doctoc language faq

              - [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) doctoc language introduction

              - [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md) doctoc language syntax

              - [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) doctoc plugin API reference

              - [doctools](tcllib/files/modules/doctools/doctools\.md) doctools \- Processing documents

              - [doctools::changelog](tcllib/files/modules/doctools/changelog\.md) Processing text in Emacs ChangeLog format

              - [doctools::cvs](tcllib/files/modules/doctools/cvs\.md) Processing text in 'cvs log' format

              - [doctools::idx](tcllib/files/modules/doctools/docidx\.md) docidx \- Processing indices

              - [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) doctoc \- Processing tables of contents

              - [doctools\_intro](tcllib/files/modules/doctools/doctools\_intro\.md) doctools introduction

              - [doctools\_lang\_cmdref](tcllib/files/modules/doctools/doctools\_lang\_cmdref\.md) doctools language command reference

              - [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) doctools language faq

              - [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) doctools language introduction

              - [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md) doctools language syntax

              - [doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md) doctools plugin API reference

              - [mpexpand](tcllib/files/modules/doctools/mpexpand\.md) Markup processor

          + [doctools2base]()

              - [doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md) Default CSS style for HTML export plugins

              - [doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) Message catalog management for the various document parsers

              - [doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md) Default CSS style for NROFF export plugins

              - [doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md) Processing text in 'subst \-novariables' format

          + [doctools2idx]()

              - [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) DocTools \- Keyword indices

              - [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) Holding keyword indices

              - [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) Exporting keyword indices

              - [doctools::idx::export::docidx](tcllib/files/modules/doctools2idx/export\_docidx\.md) docidx export plugin

              - [doctools::idx::export::html](tcllib/files/modules/doctools2idx/idx\_export\_html\.md) HTML export plugin

              - [doctools::idx::export::json](tcllib/files/modules/doctools2idx/idx\_export\_json\.md) JSON export plugin

              - [doctools::idx::export::nroff](tcllib/files/modules/doctools2idx/idx\_export\_nroff\.md) nroff export plugin

              - [doctools::idx::export::text](tcllib/files/modules/doctools2idx/idx\_export\_text\.md) plain text export plugin

              - [doctools::idx::export::wiki](tcllib/files/modules/doctools2idx/idx\_export\_wiki\.md) wiki export plugin

              - [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) Importing keyword indices

              - [doctools::idx::import::docidx](tcllib/files/modules/doctools2idx/import\_docidx\.md) docidx import plugin

              - [doctools::idx::import::json](tcllib/files/modules/doctools2idx/idx\_import\_json\.md) JSON import plugin

              - [doctools::idx::parse](tcllib/files/modules/doctools2idx/idx\_parse\.md) Parsing text in docidx format

              - [doctools::idx::structure](tcllib/files/modules/doctools2idx/idx\_structure\.md) Docidx serialization utilities

              - [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) Message catalog for the docidx parser \(C\)

              - [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) Message catalog for the docidx parser \(DE\)

              - [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) Message catalog for the docidx parser \(EN\)

              - [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) Message catalog for the docidx parser \(FR\)

          + [doctools2toc]()

              - [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) DocTools \- Tables of Contents

              - [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) Message catalog for the doctoc parser \(C\)

              - [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) Message catalog for the doctoc parser \(DE\)

              - [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) Message catalog for the doctoc parser \(EN\)

              - [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md) Message catalog for the doctoc parser \(FR\)

              - [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) Holding tables of contents

              - [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) Exporting tables of contents

              - [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) doctoc export plugin

              - [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) HTML export plugin

              - [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) JSON export plugin

              - [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) nroff export plugin

              - [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md) plain text export plugin

              - [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md) wiki export plugin

              - [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) Importing keyword indices

              - [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) doctoc import plugin

              - [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md) JSON import plugin

              - [doctools::toc::parse](tcllib/files/modules/doctools2toc/toc\_parse\.md) Parsing text in doctoc format

              - [doctools::toc::structure](tcllib/files/modules/doctools2toc/toc\_structure\.md) Doctoc serialization utilities

          + [dtplite]()

              - [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) Lightweight DocTools Markup Processor

          + [fileutil]()

              - [fileutil](tcllib/files/modules/fileutil/fileutil\.md) Procedures implementing some file utilities

              - [fileutil::multi](tcllib/files/modules/fileutil/multi\.md) Multi\-file operation, scatter/gather, standard object

              - [fileutil::multi::op](tcllib/files/modules/fileutil/multiop\.md) Multi\-file operation, scatter/gather

              - [fileutil::paths](tcllib/files/modules/fileutil/paths\.md) Manage search path pools

              - [fileutil\_traverse](tcllib/files/modules/fileutil/traverse\.md) Iterative directory traversal

          + [ftp]()

              - [ftp](tcllib/files/modules/ftp/ftp\.md) Client\-side tcl implementation of the ftp protocol

              - [ftp::geturl](tcllib/files/modules/ftp/ftp\_geturl\.md) Uri handler for ftp urls

          + [ftpd]()

              - [ftpd](tcllib/files/modules/ftpd/ftpd\.md) Tcl FTP server implementation

          + [fumagic]()

              - [fileutil::magic::cfront](tcllib/files/modules/fumagic/cfront\.md) Generator core for compiler of magic\(5\) files

              - [fileutil::magic::cgen](tcllib/files/modules/fumagic/cgen\.md) Generator core for compiler of magic\(5\) files

              - [fileutil::magic::filetype](tcllib/files/modules/fumagic/filetypes\.md) Procedures implementing file\-type recognition

              - [fileutil::magic::rt](tcllib/files/modules/fumagic/rtcore\.md) Runtime core for file type recognition engines written in pure Tcl

          + [generator]()

              - [generator](tcllib/files/modules/generator/generator\.md) Procedures for creating and using generators\.

          + [gpx]()

              - [gpx](tcllib/files/modules/gpx/gpx\.md) Extracts waypoints, tracks and routes from GPX files

          + [grammar\_aycock]()

              - [grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md) Aycock\-Horspool\-Earley parser generator for Tcl

          + [grammar\_fa]()

              - [grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) Create and manipulate finite automatons

              - [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) Create and use deterministic acceptors

              - [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) Execute deterministic finite automatons

              - [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md) Operations on finite automatons

          + [grammar\_me]()

              - [grammar::me::cpu](tcllib/files/modules/grammar\_me/me\_cpu\.md) Virtual machine implementation II for parsing token streams

              - [grammar::me::cpu::core](tcllib/files/modules/grammar\_me/me\_cpucore\.md) ME virtual machine state manipulation

              - [grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md) ME assembler

              - [grammar::me::tcl](tcllib/files/modules/grammar\_me/me\_tcl\.md) Virtual machine implementation I for parsing token streams

              - [grammar::me::util](tcllib/files/modules/grammar\_me/me\_util\.md) AST utilities

              - [grammar::me\_ast](tcllib/files/modules/grammar\_me/me\_ast\.md) Various representations of ASTs

              - [grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) Introduction to virtual machines for parsing token streams

              - [grammar::me\_vm](tcllib/files/modules/grammar\_me/me\_vm\.md) Virtual machine for parsing token streams

          + [grammar\_peg]()

              - [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) Create and manipulate parsing expression grammars

              - [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) Interpreter for parsing expression grammars

          + [hook]()

              - [hook](tcllib/files/modules/hook/hook\.md) Hooks

          + [html]()

              - [html](tcllib/files/modules/html/html\.md) Procedures to generate HTML structures

          + [htmlparse]()

              - [htmlparse](tcllib/files/modules/htmlparse/htmlparse\.md) Procedures to parse HTML strings

          + [http]()

              - [autoproxy](tcllib/files/modules/http/autoproxy\.md) Automatic HTTP proxy usage and authentication

          + [httpd]()

              - [httpd](tcllib/files/modules/httpd/httpd\.md) A TclOO and coroutine based web server

          + [ident]()

              - [ident](tcllib/files/modules/ident/ident\.md) Ident protocol client

          + [imap4]()

              - [imap4](tcllib/files/modules/imap4/imap4\.md) imap client\-side tcl implementation of imap protocol

          + [inifile]()

              - [inifile](tcllib/files/modules/inifile/ini\.md) Parsing of Windows INI files

          + [interp]()

              - [deleg\_method](tcllib/files/modules/interp/deleg\_method\.md) Creation of comm delegates \(snit methods\)

              - [deleg\_proc](tcllib/files/modules/interp/deleg\_proc\.md) Creation of comm delegates \(procedures\)

              - [interp](tcllib/files/modules/interp/tcllib\_interp\.md) Interp creation and aliasing

          + [irc]()

              - [irc](tcllib/files/modules/irc/irc\.md) Create IRC connection and interface\.

              - [picoirc](tcllib/files/modules/irc/picoirc\.md) Small and simple embeddable IRC client\.

          + [javascript]()

              - [javascript](tcllib/files/modules/javascript/javascript\.md) Procedures to generate HTML and Java Script structures\.

          + [jpeg]()

              - [jpeg](tcllib/files/modules/jpeg/jpeg\.md) JPEG querying and manipulation of meta data

          + [json]()

              - [json](tcllib/files/modules/json/json\.md) JSON parser

              - [json::write](tcllib/files/modules/json/json\_write\.md) JSON generation

          + [lambda]()

              - [lambda](tcllib/files/modules/lambda/lambda\.md) Utility commands for anonymous procedures

          + [lazyset]()

              - [lazyset](tcllib/files/modules/lazyset/lazyset\.md) Lazy evaluation

          + [ldap]()

              - [ldap](tcllib/files/modules/ldap/ldap\.md) LDAP client

              - [ldapx](tcllib/files/modules/ldap/ldapx\.md) LDAP extended object interface

          + [log]()

              - [log](tcllib/files/modules/log/log\.md) Procedures to log messages of libraries and applications\.

              - [logger](tcllib/files/modules/log/logger\.md) System to control logging of events\.

              - [logger::appender](tcllib/files/modules/log/loggerAppender\.md) Collection of predefined appenders for logger

              - [logger::utils](tcllib/files/modules/log/loggerUtils\.md) Utilities for logger

          + [map]()

              - [map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md) Resolving geographical names with a Nominatim service

              - [map::slippy](tcllib/files/modules/map/map\_slippy\.md) Common code for slippy based map packages

              - [map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md) Management of a tile cache in the local filesystem

              - [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md) Accessing a server providing tiles for slippy\-based maps

          + [mapproj]()

              - [mapproj](tcllib/files/modules/mapproj/mapproj\.md) Map projection routines

          + [markdown]()

              - [markdown](tcllib/files/modules/markdown/markdown\.md) Converts Markdown text to HTML

          + [math]()

              - [math](tcllib/files/modules/math/math\.md) Tcl Math Library

              - [math::bigfloat](tcllib/files/modules/math/bigfloat\.md) Arbitrary precision floating\-point numbers

              - [math::bignum](tcllib/files/modules/math/bignum\.md) Arbitrary precision integer numbers

              - [math::calculus](tcllib/files/modules/math/calculus\.md) Integration and ordinary differential equations

              - [math::calculus::romberg](tcllib/files/modules/math/romberg\.md) Romberg integration

              - [math::calculus::symdiff](tcllib/files/modules/math/symdiff\.md) Symbolic differentiation for Tcl

              - [math::changepoint](tcllib/files/modules/math/changepoint\.md) Change point detection methods

              - [math::combinatorics](tcllib/files/modules/math/combinatorics\.md) Combinatorial functions in the Tcl Math Library

              - [math::complexnumbers](tcllib/files/modules/math/qcomplex\.md) Straightforward complex number package

              - [math::constants](tcllib/files/modules/math/constants\.md) Mathematical and numerical constants

              - [math::decimal](tcllib/files/modules/math/decimal\.md) General decimal arithmetic

              - [math::exact](tcllib/files/modules/math/exact\.md) Exact Real Arithmetic

              - [math::filters](tcllib/files/modules/math/filtergen\.md) Digital filters

              - [math::fourier](tcllib/files/modules/math/fourier\.md) Discrete and fast fourier transforms

              - [math::fuzzy](tcllib/files/modules/math/fuzzy\.md) Fuzzy comparison of floating\-point numbers

              - [math::geometry](tcllib/files/modules/math/math\_geometry\.md) Geometrical computations

              - [math::interpolate](tcllib/files/modules/math/interpolate\.md) Interpolation routines

              - [math::linearalgebra](tcllib/files/modules/math/linalg\.md) Linear Algebra

              - [math::machineparameters](tcllib/files/modules/math/machineparameters\.md) Compute double precision machine parameters\.

              - [math::numtheory](tcllib/files/modules/math/numtheory\.md) Number Theory

              - [math::optimize](tcllib/files/modules/math/optimize\.md) Optimisation routines

              - [math::PCA](tcllib/files/modules/math/pca\.md) Package for Principal Component Analysis

              - [math::polynomials](tcllib/files/modules/math/polynomials\.md) Polynomial functions

              - [math::probopt](tcllib/files/modules/math/probopt\.md) Probabilistic optimisation methods

              - [math::quasirandom](tcllib/files/modules/math/quasirandom\.md) Quasi\-random points for integration and Monte Carlo type methods

              - [math::rationalfunctions](tcllib/files/modules/math/rational\_funcs\.md) Polynomial functions

              - [math::roman](tcllib/files/modules/math/roman\.md) Tools for creating and manipulating roman numerals

              - [math::special](tcllib/files/modules/math/special\.md) Special mathematical functions

              - [math::statistics](tcllib/files/modules/math/statistics\.md) Basic statistical functions and procedures

              - [math::trig](tcllib/files/modules/math/trig\.md) Trigonometric anf hyperbolic functions

          + [md4]()

              - [md4](tcllib/files/modules/md4/md4\.md) MD4 Message\-Digest Algorithm

          + [md5]()

              - [md5](tcllib/files/modules/md5/md5\.md) MD5 Message\-Digest Algorithm

          + [md5crypt]()

              - [md5crypt](tcllib/files/modules/md5crypt/md5crypt\.md) MD5\-based password encryption

          + [mime]()

              - [mime](tcllib/files/modules/mime/mime\.md) Manipulation of MIME body parts

              - [smtp](tcllib/files/modules/mime/smtp\.md) Client\-side tcl implementation of the smtp protocol

          + [multiplexer]()

              - [multiplexer](tcllib/files/modules/multiplexer/multiplexer\.md) One\-to\-many communication with sockets\.

          + [namespacex]()

              - [namespacex](tcllib/files/modules/namespacex/namespacex\.md) Namespace utility commands

          + [ncgi]()

              - [ncgi](tcllib/files/modules/ncgi/ncgi\.md) Procedures to manipulate CGI values\.

          + [nettool]()

              - [nettool](tcllib/files/modules/nettool/nettool\.md) Tools for networked applications

          + [nmea]()

              - [nmea](tcllib/files/modules/nmea/nmea\.md) Process NMEA data

          + [nns]()

              - [nameserv](tcllib/files/modules/nns/nns\_client\.md) Name service facility, Client

              - [nameserv::auto](tcllib/files/modules/nns/nns\_auto\.md) Name service facility, Client Extension

              - [nameserv::common](tcllib/files/modules/nns/nns\_common\.md) Name service facility, shared definitions

              - [nameserv::protocol](tcllib/files/modules/nns/nns\_protocol\.md) Name service facility, client/server protocol

              - [nameserv::server](tcllib/files/modules/nns/nns\_server\.md) Name service facility, Server

              - [nns\_intro](tcllib/files/modules/nns/nns\_intro\.md) Name service facility, introduction

          + [nntp]()

              - [nntp](tcllib/files/modules/nntp/nntp\.md) Tcl client for the NNTP protocol

          + [ntp]()

              - [ntp\_time](tcllib/files/modules/ntp/ntp\_time\.md) Tcl Time Service Client

          + [oauth]()

              - [oauth](tcllib/files/modules/oauth/oauth\.md) oauth API base signature

          + [oometa]()

              - [oometa](tcllib/files/modules/oometa/oometa\.md) oo::meta A data registry for classess

          + [ooutil]()

              - [oo::util](tcllib/files/modules/ooutil/ooutil\.md) Utility commands for TclOO

          + [otp]()

              - [otp](tcllib/files/modules/otp/otp\.md) One\-Time Passwords

          + [page]()

              - [page\_intro](tcllib/files/modules/page/page\_intro\.md) page introduction

              - [page\_pluginmgr](tcllib/files/modules/page/page\_pluginmgr\.md) page plugin manager

              - [page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md) page dataflow/treewalker utility

              - [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) page AST normalization, LEMON

              - [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md) page AST normalization, PEG

              - [page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) page PEG transformation utilities

              - [page\_util\_quote](tcllib/files/modules/page/page\_util\_quote\.md) page character quoting utilities

          + [pki]()

              - [pki](tcllib/files/modules/pki/pki\.md) Implementation of the public key cipher

          + [pluginmgr]()

              - [pluginmgr](tcllib/files/modules/pluginmgr/pluginmgr\.md) Manage a plugin

          + [png]()

              - [png](tcllib/files/modules/png/png\.md) PNG querying and manipulation of meta data

          + [pop3]()

              - [pop3](tcllib/files/modules/pop3/pop3\.md) Tcl client for POP3 email protocol

          + [pop3d]()

              - [pop3d](tcllib/files/modules/pop3d/pop3d\.md) Tcl POP3 server implementation

              - [pop3d::dbox](tcllib/files/modules/pop3d/pop3d\_dbox\.md) Simple mailbox database for pop3d

              - [pop3d::udb](tcllib/files/modules/pop3d/pop3d\_udb\.md) Simple user database for pop3d

          + [practcl]()

              - [practcl](tcllib/files/modules/practcl/practcl\.md) The Practcl Module

          + [processman]()

              - [processman](tcllib/files/modules/processman/processman\.md) Tool for automating the period callback of commands

          + [profiler]()

              - [profiler](tcllib/files/modules/profiler/profiler\.md) Tcl source code profiler

          + [pt]()

              - [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) Abstract Syntax Tree Serialization

              - [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) C/PARAM, Canned configuration, Critcl

              - [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) C/PARAM, Canned configuration, TEA

              - [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) The JSON Grammar Exchange Format

              - [pt::param](tcllib/files/modules/pt/pt\_param\.md) PackRat Machine Specification

              - [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) Parsing Expression Serialization

              - [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) Parsing Expression Utilities

              - [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) Parsing Expression Grammar Serialization

              - [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) PEG Storage

              - [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) PEG Storage\. Canned PEG grammar specification

              - [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) PEG Export

              - [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) PEG Export Plugin\. Write CONTAINER format

              - [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) PEG Export Plugin\. Write JSON format

              - [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) PEG Export Plugin\. Write PEG format

              - [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) PEG Conversion\. From CONTAINER format

              - [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) PEG Conversion\. Read JSON format

              - [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) PEG Conversion\. Read PEG format

              - [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) PEG Import

              - [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) PEG Import Plugin\. From CONTAINER format

              - [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) PEG Import Plugin\. Read JSON format

              - [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) PEG Import Plugin\. Read PEG format

              - [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) Interpreter for parsing expression grammars

              - [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) PEG Conversion\. Write CONTAINER format

              - [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) PEG Conversion\. Write CPARAM format

              - [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) PEG Conversion\. Write JSON format

              - [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) PEG Conversion\. Write PARAM format

              - [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) PEG Conversion\. Write PEG format

              - [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) PEG Conversion\. Write TCLPARAM format

              - [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) PEG Language Tutorial

              - [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) Introduction to Parsing Expression Grammars

              - [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) Parser Generator

              - [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) Parsing Runtime Support, PARAM based

              - [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) Tcl/PARAM, Canned configuration, NX

              - [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) Tcl/PARAM, Canned configuration, Snit

              - [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) Tcl/PARAM, Canned configuration, Tcloo

              - [pt::util](tcllib/files/modules/pt/pt\_util\.md) General utilities

              - [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) Parser Tools Export API

              - [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) Parser Tools Import API

              - [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) Introduction to Parser Tools

              - [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) Parser Tools PEG Parser

              - [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) Parser API

              - [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md) Parser Tools PE Grammar Utility Operations

          + [rc4]()

              - [rc4](tcllib/files/modules/rc4/rc4\.md) Implementation of the RC4 stream cipher

          + [rcs]()

              - [rcs](tcllib/files/modules/rcs/rcs\.md) RCS low level utilities

          + [report]()

              - [report](tcllib/files/modules/report/report\.md) Create and manipulate report objects

          + [rest]()

              - [rest](tcllib/files/modules/rest/rest\.md) define REST web APIs and call them inline or asychronously

          + [ripemd]()

              - [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) RIPEMD\-128 Message\-Digest Algorithm

              - [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md) RIPEMD\-160 Message\-Digest Algorithm

          + [sasl]()

              - [SASL](tcllib/files/modules/sasl/sasl\.md) Implementation of SASL mechanisms for Tcl

              - [SASL::NTLM](tcllib/files/modules/sasl/ntlm\.md) Implementation of SASL NTLM mechanism for Tcl

              - [SASL::SCRAM](tcllib/files/modules/sasl/scram\.md) Implementation of SASL SCRAM mechanism for Tcl

              - [SASL::XGoogleToken](tcllib/files/modules/sasl/gtoken\.md) Implementation of SASL NTLM mechanism for Tcl

          + [sha1]()

              - [sha1](tcllib/files/modules/sha1/sha1\.md) SHA1 Message\-Digest Algorithm

              - [sha256](tcllib/files/modules/sha1/sha256\.md) SHA256 Message\-Digest Algorithm

          + [simulation]()

              - [simulation::annealing](tcllib/files/modules/simulation/annealing\.md) Simulated annealing

              - [simulation::montecarlo](tcllib/files/modules/simulation/montecarlo\.md) Monte Carlo simulations

              - [simulation::random](tcllib/files/modules/simulation/simulation\_random\.md) Pseudo\-random number generators

          + [smtpd]()

              - [smtpd](tcllib/files/modules/smtpd/smtpd\.md) Tcl SMTP server implementation

          + [snit]()

              - [snit](tcllib/files/modules/snit/snit\.md) Snit's Not Incr Tcl

              - [snitfaq](tcllib/files/modules/snit/snitfaq\.md) Snit Frequently Asked Questions

          + [soundex]()

              - [soundex](tcllib/files/modules/soundex/soundex\.md) Soundex

          + [stooop]()

              - [stooop](tcllib/files/modules/stooop/stooop\.md) Object oriented extension\.

              - [switched](tcllib/files/modules/stooop/switched\.md) switch/option management\.

          + [string]()

              - [string::token](tcllib/files/modules/string/token\.md) Regex based iterative lexing

              - [string::token::shell](tcllib/files/modules/string/token\_shell\.md) Parsing of shell command line

          + [stringprep]()

              - [stringprep](tcllib/files/modules/stringprep/stringprep\.md) Implementation of stringprep

              - [stringprep::data](tcllib/files/modules/stringprep/stringprep\_data\.md) stringprep data tables, generated, internal

              - [unicode](tcllib/files/modules/stringprep/unicode\.md) Implementation of Unicode normalization

              - [unicode::data](tcllib/files/modules/stringprep/unicode\_data\.md) unicode data tables, generated, internal

          + [struct]()

              - [struct::disjointset](tcllib/files/modules/struct/disjointset\.md) Disjoint set data structure

              - [struct::graph](tcllib/files/modules/struct/graph\.md) Create and manipulate directed graph objects

              - [struct::graph::op](tcllib/files/modules/struct/graphops\.md) Operation for \(un\)directed graph objects

              - [struct::graph\_v1](tcllib/files/modules/struct/graph1\.md) Create and manipulate directed graph objects

              - [struct::list](tcllib/files/modules/struct/struct\_list\.md) Procedures for manipulating lists

              - [struct::map](tcllib/files/modules/struct/struct\_map\.md) Manage key/value maps

              - [struct::matrix](tcllib/files/modules/struct/matrix\.md) Create and manipulate matrix objects

              - [struct::matrix\_v1](tcllib/files/modules/struct/matrix1\.md) Create and manipulate matrix objects

              - [struct::pool](tcllib/files/modules/struct/pool\.md) Create and manipulate pool objects \(of discrete items\)

              - [struct::prioqueue](tcllib/files/modules/struct/prioqueue\.md) Create and manipulate prioqueue objects

              - [struct::queue](tcllib/files/modules/struct/queue\.md) Create and manipulate queue objects

              - [struct::record](tcllib/files/modules/struct/record\.md) Define and create records \(similar to 'C' structures\)

              - [struct::set](tcllib/files/modules/struct/struct\_set\.md) Procedures for manipulating sets

              - [struct::skiplist](tcllib/files/modules/struct/skiplist\.md) Create and manipulate skiplists

              - [struct::stack](tcllib/files/modules/struct/stack\.md) Create and manipulate stack objects

              - [struct::tree](tcllib/files/modules/struct/struct\_tree\.md) Create and manipulate tree objects

              - [struct::tree\_v1](tcllib/files/modules/struct/struct\_tree1\.md) Create and manipulate tree objects

          + [tar]()

              - [tar](tcllib/files/modules/tar/tar\.md) Tar file creation, extraction & manipulation

          + [tepam]()

              - [tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager

              - [tepam::argument\_dialogbox](tcllib/files/modules/tepam/tepam\_argument\_dialogbox\.md) TEPAM argument\_dialogbox, reference manual

              - [tepam::doc\_gen](tcllib/files/modules/tepam/tepam\_doc\_gen\.md) TEPAM DOC Generation, reference manual

              - [tepam::procedure](tcllib/files/modules/tepam/tepam\_procedure\.md) TEPAM procedure, reference manual

          + [term]()

              - [term](tcllib/files/modules/term/term\.md) General terminal control

              - [term::ansi::code](tcllib/files/modules/term/ansi\_code\.md) Helper for control sequences

              - [term::ansi::code::attr](tcllib/files/modules/term/ansi\_cattr\.md) ANSI attribute sequences

              - [term::ansi::code::ctrl](tcllib/files/modules/term/ansi\_cctrl\.md) ANSI control sequences

              - [term::ansi::code::macros](tcllib/files/modules/term/ansi\_cmacros\.md) Macro sequences

              - [term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md) Control operations and queries

              - [term::ansi::send](tcllib/files/modules/term/ansi\_send\.md) Output of ANSI control sequences to terminals

              - [term::interact::menu](tcllib/files/modules/term/imenu\.md) Terminal widget, menu

              - [term::interact::pager](tcllib/files/modules/term/ipager\.md) Terminal widget, paging

              - [term::receive](tcllib/files/modules/term/receive\.md) General input from terminals

              - [term::receive::bind](tcllib/files/modules/term/term\_bind\.md) Keyboard dispatch from terminals

              - [term::send](tcllib/files/modules/term/term\_send\.md) General output to terminals

          + [textutil]()

              - [textutil](tcllib/files/modules/textutil/textutil\.md) Procedures to manipulate texts and strings\.

              - [textutil::adjust](tcllib/files/modules/textutil/adjust\.md) Procedures to adjust, indent, and undent paragraphs

              - [textutil::expander](tcllib/files/modules/textutil/expander\.md) Procedures to process templates and expand text\.

              - [textutil::patch](tcllib/files/modules/textutil/patch\.md) Application of uni\-diff patches to directory trees

              - [textutil::repeat](tcllib/files/modules/textutil/repeat\.md) Procedures to repeat strings\.

              - [textutil::split](tcllib/files/modules/textutil/textutil\_split\.md) Procedures to split texts

              - [textutil::string](tcllib/files/modules/textutil/textutil\_string\.md) Procedures to manipulate texts and strings\.

              - [textutil::tabify](tcllib/files/modules/textutil/tabify\.md) Procedures to \(un\)tabify strings

              - [textutil::trim](tcllib/files/modules/textutil/trim\.md) Procedures to trim strings

          + [tie]()

              - [tie](tcllib/files/modules/tie/tie\.md) Array persistence

              - [tie](tcllib/files/modules/tie/tie\_std\.md) Array persistence, standard data sources

          + [tiff]()

              - [tiff](tcllib/files/modules/tiff/tiff\.md) TIFF reading, writing, and querying and manipulation of meta data

          + [tool]()

              - [oo::util](tcllib/files/modules/tool/meta\.md) Utility commands for TclOO

              - [tool](tcllib/files/modules/tool/tool\.md) TclOO Library \(TOOL\) Framework

              - [tool::dict\_ensemble](tcllib/files/modules/tool/tool\_dict\_ensemble\.md) Dictionary Tools

          + [transfer]()

              - [transfer::connect](tcllib/files/modules/transfer/connect\.md) Connection setup

              - [transfer::copy](tcllib/files/modules/transfer/copyops\.md) Data transfer foundation

              - [transfer::copy::queue](tcllib/files/modules/transfer/tqueue\.md) Queued transfers

              - [transfer::data::destination](tcllib/files/modules/transfer/ddest\.md) Data destination

              - [transfer::data::source](tcllib/files/modules/transfer/dsource\.md) Data source

              - [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) Data source

              - [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md) Data source

          + [treeql]()

              - [treeql](tcllib/files/modules/treeql/treeql\.md) Query tree objects

          + [try]()

              - [throw](tcllib/files/modules/try/tcllib\_throw\.md) throw \- Throw an error exception with a message

              - [try](tcllib/files/modules/try/tcllib\_try\.md) try \- Trap and process errors and exceptions

          + [udpcluster]()

              - [udpcluster](tcllib/files/modules/udpcluster/udpcluster\.md) UDP Peer\-to\-Peer cluster

          + [uev]()

              - [uevent](tcllib/files/modules/uev/uevent\.md) User events

              - [uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md) Request merging and deferal to idle time

          + [units]()

              - [units](tcllib/files/modules/units/units\.md) unit conversion

          + [uri]()

              - [uri](tcllib/files/modules/uri/uri\.md) URI utilities

              - [uri\_urn](tcllib/files/modules/uri/urn\-scheme\.md) URI utilities, URN scheme

          + [uuid]()

              - [uuid](tcllib/files/modules/uuid/uuid\.md) UUID generation and comparison

          + [valtype]()

              - [valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) Validation, common code

              - [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) Validation for AMEX creditcard number

              - [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) Validation for Discover creditcard number

              - [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) Validation for Mastercard creditcard number

              - [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) Validation for VISA creditcard number

              - [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) Validation for EAN13

              - [valtype::iban](tcllib/files/modules/valtype/iban\.md) Validation for IBAN

              - [valtype::imei](tcllib/files/modules/valtype/imei\.md) Validation for IMEI

              - [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) Validation for ISBN

              - [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) Validation for plain number with a LUHN checkdigit

              - [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) Validation for plain number with a LUHN5 checkdigit

              - [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) Validation for USNPI

              - [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md) Validation for plain number with a VERHOEFF checkdigit

          + [virtchannel\_base]()

              - [tcl::chan::cat](tcllib/files/modules/virtchannel\_base/cat\.md) Concatenation channel

              - [tcl::chan::facade](tcllib/files/modules/virtchannel\_base/facade\.md) Facade channel

              - [tcl::chan::fifo](tcllib/files/modules/virtchannel\_base/tcllib\_fifo\.md) In\-memory fifo channel

              - [tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md) In\-memory interconnected fifo channels

              - [tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md) In\-memory channel, half of a fifo2

              - [tcl::chan::memchan](tcllib/files/modules/virtchannel\_base/tcllib\_memchan\.md) In\-memory channel

              - [tcl::chan::null](tcllib/files/modules/virtchannel\_base/tcllib\_null\.md) Null channel

              - [tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md) Null/Zero channel combination

              - [tcl::chan::random](tcllib/files/modules/virtchannel\_base/tcllib\_random\.md) Random channel

              - [tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md) Standard I/O, unification of stdin and stdout

              - [tcl::chan::string](tcllib/files/modules/virtchannel\_base/tcllib\_string\.md) Read\-only in\-memory channel

              - [tcl::chan::textwindow](tcllib/files/modules/virtchannel\_base/textwindow\.md) Textwindow channel

              - [tcl::chan::variable](tcllib/files/modules/virtchannel\_base/tcllib\_variable\.md) In\-memory channel using variable for storage

              - [tcl::chan::zero](tcllib/files/modules/virtchannel\_base/tcllib\_zero\.md) Zero channel

              - [tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md) Utilities for random channels

          + [virtchannel\_core]()

              - [tcl::chan::core](tcllib/files/modules/virtchannel\_core/core\.md) Basic reflected/virtual channel support

              - [tcl::chan::events](tcllib/files/modules/virtchannel\_core/events\.md) Event support for reflected/virtual channels

              - [tcl::transform::core](tcllib/files/modules/virtchannel\_core/transformcore\.md) Basic reflected/virtual channel transform support

          + [virtchannel\_transform]()

              - [tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) Adler32 transformation

              - [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md) Base64 encoding transformation

              - [tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md) Counter transformation

              - [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md) Crc32 transformation

              - [tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md) Hexadecimal encoding transformation

              - [tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md) Identity transformation

              - [tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md) limiting input

              - [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md) Observer transformation, stream copy

              - [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) Encryption via one\-time pad

              - [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) rot\-encryption

              - [tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md) Space insertation and removal

              - [tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md) zlib \(de\)compression

          + [websocket]()

              - [websocket](tcllib/files/modules/websocket/websocket\.md) Tcl implementation of the websocket protocol

          + [wip]()

              - [wip](tcllib/files/modules/wip/wip\.md) Word Interpreter

          + [yaml]()

              - [huddle](tcllib/files/modules/yaml/huddle\.md) Create and manipulate huddle object

              - [yaml](tcllib/files/modules/yaml/yaml\.md) YAML Format Encoder/Decoder

          + [zip]()

              - [zipfile::decode](tcllib/files/modules/zip/decode\.md) Access to zip archives

              - [zipfile::encode](tcllib/files/modules/zip/encode\.md) Generation of zip archives

              - [zipfile::mkzip](tcllib/files/modules/zip/mkzip\.md) Build a zip archive
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/toc0.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936

[//000000001]: # (Table of contents generated by tcllib/doctools/toc with format 'markdown')

# Table Of Contents \-\-

  - [By Categories]()

      * [Argument entry form, mega widget]()

          + [tepam::argument\_dialogbox](tcllib/files/modules/tepam/tepam\_argument\_dialogbox\.md) TEPAM argument\_dialogbox, reference manual

      * [Benchmark tools]()

          + [bench](tcllib/files/modules/bench/bench\.md) bench \- Processing benchmark suites

          + [bench::in](tcllib/files/modules/bench/bench\_read\.md) bench::in \- Reading benchmark results

          + [bench::out::csv](tcllib/files/modules/bench/bench\_wcsv\.md) bench::out::csv \- Formatting benchmark results as CSV

          + [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md) bench::out::text \- Formatting benchmark results as human readable text

          + [bench\_intro](tcllib/files/modules/bench/bench\_intro\.md) bench introduction

          + [bench\_lang\_intro](tcllib/files/modules/bench/bench\_lang\_intro\.md) bench language introduction

          + [bench\_lang\_spec](tcllib/files/modules/bench/bench\_lang\_spec\.md) bench language specification

      * [CGI programming]()

          + [html](tcllib/files/modules/html/html\.md) Procedures to generate HTML structures

          + [javascript](tcllib/files/modules/javascript/javascript\.md) Procedures to generate HTML and Java Script structures\.

          + [json](tcllib/files/modules/json/json\.md) JSON parser

          + [json::write](tcllib/files/modules/json/json\_write\.md) JSON generation

          + [ncgi](tcllib/files/modules/ncgi/ncgi\.md) Procedures to manipulate CGI values\.

      * [Channels]()

          + [tcl::chan::cat](tcllib/files/modules/virtchannel\_base/cat\.md) Concatenation channel

          + [tcl::chan::core](tcllib/files/modules/virtchannel\_core/core\.md) Basic reflected/virtual channel support

          + [tcl::chan::events](tcllib/files/modules/virtchannel\_core/events\.md) Event support for reflected/virtual channels

          + [tcl::chan::facade](tcllib/files/modules/virtchannel\_base/facade\.md) Facade channel

          + [tcl::chan::fifo](tcllib/files/modules/virtchannel\_base/tcllib\_fifo\.md) In\-memory fifo channel

          + [tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md) In\-memory interconnected fifo channels

          + [tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md) In\-memory channel, half of a fifo2

          + [tcl::chan::memchan](tcllib/files/modules/virtchannel\_base/tcllib\_memchan\.md) In\-memory channel

          + [tcl::chan::null](tcllib/files/modules/virtchannel\_base/tcllib\_null\.md) Null channel

          + [tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md) Null/Zero channel combination

          + [tcl::chan::random](tcllib/files/modules/virtchannel\_base/tcllib\_random\.md) Random channel

          + [tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md) Standard I/O, unification of stdin and stdout

          + [tcl::chan::string](tcllib/files/modules/virtchannel\_base/tcllib\_string\.md) Read\-only in\-memory channel

          + [tcl::chan::textwindow](tcllib/files/modules/virtchannel\_base/textwindow\.md) Textwindow channel

          + [tcl::chan::variable](tcllib/files/modules/virtchannel\_base/tcllib\_variable\.md) In\-memory channel using variable for storage

          + [tcl::chan::zero](tcllib/files/modules/virtchannel\_base/tcllib\_zero\.md) Zero channel

          + [tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md) Utilities for random channels

          + [tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) Adler32 transformation

          + [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md) Base64 encoding transformation

          + [tcl::transform::core](tcllib/files/modules/virtchannel\_core/transformcore\.md) Basic reflected/virtual channel transform support

          + [tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md) Counter transformation

          + [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md) Crc32 transformation

          + [tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md) Hexadecimal encoding transformation

          + [tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md) Identity transformation

          + [tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md) limiting input

          + [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md) Observer transformation, stream copy

          + [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) Encryption via one\-time pad

          + [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) rot\-encryption

          + [tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md) Space insertation and removal

          + [tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md) zlib \(de\)compression

      * [Coroutine]()

          + [coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) Coroutine based event and IO handling

          + [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md) Automatic event and IO coroutine awareness

      * [Data structures]()

          + [counter](tcllib/files/modules/counter/counter\.md) Procedures for counters and histograms

          + [report](tcllib/files/modules/report/report\.md) Create and manipulate report objects

          + [struct::disjointset](tcllib/files/modules/struct/disjointset\.md) Disjoint set data structure

          + [struct::graph](tcllib/files/modules/struct/graph\.md) Create and manipulate directed graph objects

          + [struct::graph::op](tcllib/files/modules/struct/graphops\.md) Operation for \(un\)directed graph objects

          + [struct::graph\_v1](tcllib/files/modules/struct/graph1\.md) Create and manipulate directed graph objects

          + [struct::list](tcllib/files/modules/struct/struct\_list\.md) Procedures for manipulating lists

          + [struct::matrix](tcllib/files/modules/struct/matrix\.md) Create and manipulate matrix objects

          + [struct::matrix\_v1](tcllib/files/modules/struct/matrix1\.md) Create and manipulate matrix objects

          + [struct::pool](tcllib/files/modules/struct/pool\.md) Create and manipulate pool objects \(of discrete items\)

          + [struct::prioqueue](tcllib/files/modules/struct/prioqueue\.md) Create and manipulate prioqueue objects

          + [struct::queue](tcllib/files/modules/struct/queue\.md) Create and manipulate queue objects

          + [struct::record](tcllib/files/modules/struct/record\.md) Define and create records \(similar to 'C' structures\)

          + [struct::set](tcllib/files/modules/struct/struct\_set\.md) Procedures for manipulating sets

          + [struct::skiplist](tcllib/files/modules/struct/skiplist\.md) Create and manipulate skiplists

          + [struct::stack](tcllib/files/modules/struct/stack\.md) Create and manipulate stack objects

          + [struct::tree](tcllib/files/modules/struct/struct\_tree\.md) Create and manipulate tree objects

          + [struct::tree\_v1](tcllib/files/modules/struct/struct\_tree1\.md) Create and manipulate tree objects

          + [treeql](tcllib/files/modules/treeql/treeql\.md) Query tree objects

      * [debugging, tracing, and logging]()

          + [debug](tcllib/files/modules/debug/debug\.md) debug narrative \- core

          + [debug::caller](tcllib/files/modules/debug/debug\_caller\.md) debug narrative \- caller

          + [debug::heartbeat](tcllib/files/modules/debug/debug\_heartbeat\.md) debug narrative \- heartbeat

          + [debug::timestamp](tcllib/files/modules/debug/debug\_timestamp\.md) debug narrative \- timestamping

      * [Documentation tools]()

          + [docidx\_intro](tcllib/files/modules/doctools/docidx\_intro\.md) docidx introduction

          + [docidx\_lang\_cmdref](tcllib/files/modules/doctools/docidx\_lang\_cmdref\.md) docidx language command reference

          + [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) docidx language faq

          + [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) docidx language introduction

          + [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md) docidx language syntax

          + [docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md) docidx plugin API reference

          + [docstrip](tcllib/files/modules/docstrip/docstrip\.md) Docstrip style source code extraction

          + [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) Docstrip\-related utilities

          + [doctoc\_intro](tcllib/files/modules/doctools/doctoc\_intro\.md) doctoc introduction

          + [doctoc\_lang\_cmdref](tcllib/files/modules/doctools/doctoc\_lang\_cmdref\.md) doctoc language command reference

          + [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) doctoc language faq

          + [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) doctoc language introduction

          + [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md) doctoc language syntax

          + [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) doctoc plugin API reference

          + [doctools](tcllib/files/modules/doctools/doctools\.md) doctools \- Processing documents

          + [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) DocTools \- Keyword indices

          + [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) DocTools \- Tables of Contents

          + [doctools::changelog](tcllib/files/modules/doctools/changelog\.md) Processing text in Emacs ChangeLog format

          + [doctools::cvs](tcllib/files/modules/doctools/cvs\.md) Processing text in 'cvs log' format

          + [doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md) Default CSS style for HTML export plugins

          + [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) Holding keyword indices

          + [doctools::idx](tcllib/files/modules/doctools/docidx\.md) docidx \- Processing indices

          + [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) Exporting keyword indices

          + [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) Importing keyword indices

          + [doctools::idx::parse](tcllib/files/modules/doctools2idx/idx\_parse\.md) Parsing text in docidx format

          + [doctools::idx::structure](tcllib/files/modules/doctools2idx/idx\_structure\.md) Docidx serialization utilities

          + [doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) Message catalog management for the various document parsers

          + [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) Message catalog for the docidx parser \(C\)

          + [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) Message catalog for the docidx parser \(DE\)

          + [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) Message catalog for the docidx parser \(EN\)

          + [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) Message catalog for the docidx parser \(FR\)

          + [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) Message catalog for the doctoc parser \(C\)

          + [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) Message catalog for the doctoc parser \(DE\)

          + [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) Message catalog for the doctoc parser \(EN\)

          + [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md) Message catalog for the doctoc parser \(FR\)

          + [doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md) Default CSS style for NROFF export plugins

          + [doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md) Processing text in 'subst \-novariables' format

          + [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) Holding tables of contents

          + [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) doctoc \- Processing tables of contents

          + [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) Exporting tables of contents

          + [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) Importing keyword indices

          + [doctools::toc::parse](tcllib/files/modules/doctools2toc/toc\_parse\.md) Parsing text in doctoc format

          + [doctools::toc::structure](tcllib/files/modules/doctools2toc/toc\_structure\.md) Doctoc serialization utilities

          + [doctools\_intro](tcllib/files/modules/doctools/doctools\_intro\.md) doctools introduction

          + [doctools\_lang\_cmdref](tcllib/files/modules/doctools/doctools\_lang\_cmdref\.md) doctools language command reference

          + [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) doctools language faq

          + [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) doctools language introduction

          + [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md) doctools language syntax

          + [doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md) doctools plugin API reference

          + [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) Lightweight DocTools Markup Processor

          + [dtplite](tcllib/files/apps/dtplite\.md) Lightweight DocTools Markup Processor

          + [mpexpand](tcllib/files/modules/doctools/mpexpand\.md) Markup processor

          + [tcldocstrip](tcllib/files/apps/tcldocstrip\.md) Tcl\-based Docstrip Processor

          + [tepam::doc\_gen](tcllib/files/modules/tepam/tepam\_doc\_gen\.md) TEPAM DOC Generation, reference manual

          + [textutil::expander](tcllib/files/modules/textutil/expander\.md) Procedures to process templates and expand text\.

      * [File]()

          + [zipfile::decode](tcllib/files/modules/zip/decode\.md) Access to zip archives

          + [zipfile::encode](tcllib/files/modules/zip/encode\.md) Generation of zip archives

          + [zipfile::mkzip](tcllib/files/modules/zip/mkzip\.md) Build a zip archive

      * [File formats]()

          + [gpx](tcllib/files/modules/gpx/gpx\.md) Extracts waypoints, tracks and routes from GPX files

          + [jpeg](tcllib/files/modules/jpeg/jpeg\.md) JPEG querying and manipulation of meta data

          + [png](tcllib/files/modules/png/png\.md) PNG querying and manipulation of meta data

          + [tar](tcllib/files/modules/tar/tar\.md) Tar file creation, extraction & manipulation

          + [tiff](tcllib/files/modules/tiff/tiff\.md) TIFF reading, writing, and querying and manipulation of meta data

      * [Grammars and finite automata]()

          + [grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md) Aycock\-Horspool\-Earley parser generator for Tcl

          + [grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) Create and manipulate finite automatons

          + [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) Create and use deterministic acceptors

          + [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) Execute deterministic finite automatons

          + [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md) Operations on finite automatons

          + [grammar::me::cpu](tcllib/files/modules/grammar\_me/me\_cpu\.md) Virtual machine implementation II for parsing token streams

          + [grammar::me::cpu::core](tcllib/files/modules/grammar\_me/me\_cpucore\.md) ME virtual machine state manipulation

          + [grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md) ME assembler

          + [grammar::me::tcl](tcllib/files/modules/grammar\_me/me\_tcl\.md) Virtual machine implementation I for parsing token streams

          + [grammar::me::util](tcllib/files/modules/grammar\_me/me\_util\.md) AST utilities

          + [grammar::me\_ast](tcllib/files/modules/grammar\_me/me\_ast\.md) Various representations of ASTs

          + [grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) Introduction to virtual machines for parsing token streams

          + [grammar::me\_vm](tcllib/files/modules/grammar\_me/me\_vm\.md) Virtual machine for parsing token streams

          + [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) Create and manipulate parsing expression grammars

          + [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) Interpreter for parsing expression grammars

      * [Hashes, checksums, and encryption]()

          + [aes](tcllib/files/modules/aes/aes\.md) Implementation of the AES block cipher

          + [blowfish](tcllib/files/modules/blowfish/blowfish\.md) Implementation of the Blowfish block cipher

          + [cksum](tcllib/files/modules/crc/cksum\.md) Calculate a cksum\(1\) compatible checksum

          + [crc16](tcllib/files/modules/crc/crc16\.md) Perform a 16bit Cyclic Redundancy Check

          + [crc32](tcllib/files/modules/crc/crc32\.md) Perform a 32bit Cyclic Redundancy Check

          + [des](tcllib/files/modules/des/des\.md) Implementation of the DES and triple\-DES ciphers

          + [md4](tcllib/files/modules/md4/md4\.md) MD4 Message\-Digest Algorithm

          + [md5](tcllib/files/modules/md5/md5\.md) MD5 Message\-Digest Algorithm

          + [md5crypt](tcllib/files/modules/md5crypt/md5crypt\.md) MD5\-based password encryption

          + [otp](tcllib/files/modules/otp/otp\.md) One\-Time Passwords

          + [pki](tcllib/files/modules/pki/pki\.md) Implementation of the public key cipher

          + [rc4](tcllib/files/modules/rc4/rc4\.md) Implementation of the RC4 stream cipher

          + [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) RIPEMD\-128 Message\-Digest Algorithm

          + [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md) RIPEMD\-160 Message\-Digest Algorithm

          + [sha1](tcllib/files/modules/sha1/sha1\.md) SHA1 Message\-Digest Algorithm

          + [sha256](tcllib/files/modules/sha1/sha256\.md) SHA256 Message\-Digest Algorithm

          + [soundex](tcllib/files/modules/soundex/soundex\.md) Soundex

          + [sum](tcllib/files/modules/crc/sum\.md) Calculate a sum\(1\) compatible checksum

          + [tclDES](tcllib/files/modules/des/tcldes\.md) Implementation of the DES and triple\-DES ciphers

          + [tclDESjr](tcllib/files/modules/des/tcldesjr\.md) Implementation of the DES and triple\-DES ciphers

          + [uuid](tcllib/files/modules/uuid/uuid\.md) UUID generation and comparison

      * [Mathematics]()

          + [math](tcllib/files/modules/math/math\.md) Tcl Math Library

          + [math::bigfloat](tcllib/files/modules/math/bigfloat\.md) Arbitrary precision floating\-point numbers

          + [math::bignum](tcllib/files/modules/math/bignum\.md) Arbitrary precision integer numbers

          + [math::calculus](tcllib/files/modules/math/calculus\.md) Integration and ordinary differential equations

          + [math::calculus::romberg](tcllib/files/modules/math/romberg\.md) Romberg integration

          + [math::changepoint](tcllib/files/modules/math/changepoint\.md) Change point detection methods

          + [math::combinatorics](tcllib/files/modules/math/combinatorics\.md) Combinatorial functions in the Tcl Math Library

          + [math::complexnumbers](tcllib/files/modules/math/qcomplex\.md) Straightforward complex number package

          + [math::constants](tcllib/files/modules/math/constants\.md) Mathematical and numerical constants

          + [math::decimal](tcllib/files/modules/math/decimal\.md) General decimal arithmetic

          + [math::exact](tcllib/files/modules/math/exact\.md) Exact Real Arithmetic

          + [math::filters](tcllib/files/modules/math/filtergen\.md) Digital filters

          + [math::fourier](tcllib/files/modules/math/fourier\.md) Discrete and fast fourier transforms

          + [math::fuzzy](tcllib/files/modules/math/fuzzy\.md) Fuzzy comparison of floating\-point numbers

          + [math::geometry](tcllib/files/modules/math/math\_geometry\.md) Geometrical computations

          + [math::interpolate](tcllib/files/modules/math/interpolate\.md) Interpolation routines

          + [math::linearalgebra](tcllib/files/modules/math/linalg\.md) Linear Algebra

          + [math::numtheory](tcllib/files/modules/math/numtheory\.md) Number Theory

          + [math::optimize](tcllib/files/modules/math/optimize\.md) Optimisation routines

          + [math::PCA](tcllib/files/modules/math/pca\.md) Package for Principal Component Analysis

          + [math::polynomials](tcllib/files/modules/math/polynomials\.md) Polynomial functions

          + [math::probopt](tcllib/files/modules/math/probopt\.md) Probabilistic optimisation methods

          + [math::quasirandom](tcllib/files/modules/math/quasirandom\.md) Quasi\-random points for integration and Monte Carlo type methods

          + [math::rationalfunctions](tcllib/files/modules/math/rational\_funcs\.md) Polynomial functions

          + [math::roman](tcllib/files/modules/math/roman\.md) Tools for creating and manipulating roman numerals

          + [math::special](tcllib/files/modules/math/special\.md) Special mathematical functions

          + [math::statistics](tcllib/files/modules/math/statistics\.md) Basic statistical functions and procedures

          + [math::trig](tcllib/files/modules/math/trig\.md) Trigonometric anf hyperbolic functions

          + [simulation::annealing](tcllib/files/modules/simulation/annealing\.md) Simulated annealing

          + [simulation::montecarlo](tcllib/files/modules/simulation/montecarlo\.md) Monte Carlo simulations

          + [simulation::random](tcllib/files/modules/simulation/simulation\_random\.md) Pseudo\-random number generators

      * [Networking]()

          + [asn](tcllib/files/modules/asn/asn\.md) ASN\.1 BER encoder/decoder

          + [autoproxy](tcllib/files/modules/http/autoproxy\.md) Automatic HTTP proxy usage and authentication

          + [bee](tcllib/files/modules/bee/bee\.md) BitTorrent Serialization Format Encoder/Decoder

          + [dns](tcllib/files/modules/dns/tcllib\_dns\.md) Tcl Domain Name Service Client

          + [ftp](tcllib/files/modules/ftp/ftp\.md) Client\-side tcl implementation of the ftp protocol

          + [ftp::geturl](tcllib/files/modules/ftp/ftp\_geturl\.md) Uri handler for ftp urls

          + [ftpd](tcllib/files/modules/ftpd/ftpd\.md) Tcl FTP server implementation

          + [httpd](tcllib/files/modules/httpd/httpd\.md) A TclOO and coroutine based web server

          + [ident](tcllib/files/modules/ident/ident\.md) Ident protocol client

          + [imap4](tcllib/files/modules/imap4/imap4\.md) imap client\-side tcl implementation of imap protocol

          + [irc](tcllib/files/modules/irc/irc\.md) Create IRC connection and interface\.

          + [ldap](tcllib/files/modules/ldap/ldap\.md) LDAP client

          + [ldapx](tcllib/files/modules/ldap/ldapx\.md) LDAP extended object interface

          + [nameserv](tcllib/files/modules/nns/nns\_client\.md) Name service facility, Client

          + [nameserv::auto](tcllib/files/modules/nns/nns\_auto\.md) Name service facility, Client Extension

          + [nameserv::common](tcllib/files/modules/nns/nns\_common\.md) Name service facility, shared definitions

          + [nameserv::protocol](tcllib/files/modules/nns/nns\_protocol\.md) Name service facility, client/server protocol

          + [nameserv::server](tcllib/files/modules/nns/nns\_server\.md) Name service facility, Server

          + [nmea](tcllib/files/modules/nmea/nmea\.md) Process NMEA data

          + [nns](tcllib/files/apps/nns\.md) Name service facility, Commandline Client Application

          + [nns\_intro](tcllib/files/modules/nns/nns\_intro\.md) Name service facility, introduction

          + [nnsd](tcllib/files/apps/nnsd\.md) Name service facility, Commandline Server Application

          + [nnslog](tcllib/files/apps/nnslog\.md) Name service facility, Commandline Logging Client Application

          + [nntp](tcllib/files/modules/nntp/nntp\.md) Tcl client for the NNTP protocol

          + [ntp\_time](tcllib/files/modules/ntp/ntp\_time\.md) Tcl Time Service Client

          + [oauth](tcllib/files/modules/oauth/oauth\.md) oauth API base signature

          + [picoirc](tcllib/files/modules/irc/picoirc\.md) Small and simple embeddable IRC client\.

          + [pop3](tcllib/files/modules/pop3/pop3\.md) Tcl client for POP3 email protocol

          + [pop3d](tcllib/files/modules/pop3d/pop3d\.md) Tcl POP3 server implementation

          + [pop3d::dbox](tcllib/files/modules/pop3d/pop3d\_dbox\.md) Simple mailbox database for pop3d

          + [pop3d::udb](tcllib/files/modules/pop3d/pop3d\_udb\.md) Simple user database for pop3d

          + [S3](tcllib/files/modules/amazon\-s3/S3\.md) Amazon S3 Web Service Interface

          + [SASL](tcllib/files/modules/sasl/sasl\.md) Implementation of SASL mechanisms for Tcl

          + [SASL::NTLM](tcllib/files/modules/sasl/ntlm\.md) Implementation of SASL NTLM mechanism for Tcl

          + [SASL::SCRAM](tcllib/files/modules/sasl/scram\.md) Implementation of SASL SCRAM mechanism for Tcl

          + [SASL::XGoogleToken](tcllib/files/modules/sasl/gtoken\.md) Implementation of SASL NTLM mechanism for Tcl

          + [smtp](tcllib/files/modules/mime/smtp\.md) Client\-side tcl implementation of the smtp protocol

          + [smtpd](tcllib/files/modules/smtpd/smtpd\.md) Tcl SMTP server implementation

          + [tcllib\_ip](tcllib/files/modules/dns/tcllib\_ip\.md) IPv4 and IPv6 address manipulation

          + [udpcluster](tcllib/files/modules/udpcluster/udpcluster\.md) UDP Peer\-to\-Peer cluster

          + [uri](tcllib/files/modules/uri/uri\.md) URI utilities

          + [uri\_urn](tcllib/files/modules/uri/urn\-scheme\.md) URI utilities, URN scheme

          + [websocket](tcllib/files/modules/websocket/websocket\.md) Tcl implementation of the websocket protocol

      * [Page Parser Generator]()

          + [page](tcllib/files/apps/page\.md) Parser Generator

          + [page\_intro](tcllib/files/modules/page/page\_intro\.md) page introduction

          + [page\_pluginmgr](tcllib/files/modules/page/page\_pluginmgr\.md) page plugin manager

          + [page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md) page dataflow/treewalker utility

          + [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) page AST normalization, LEMON

          + [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md) page AST normalization, PEG

          + [page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) page PEG transformation utilities

          + [page\_util\_quote](tcllib/files/modules/page/page\_util\_quote\.md) page character quoting utilities

      * [Parsing and Grammars]()

          + [pt](tcllib/files/apps/pt\.md) Parser Tools Application

          + [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) Abstract Syntax Tree Serialization

          + [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) C/PARAM, Canned configuration, Critcl

          + [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) C/PARAM, Canned configuration, TEA

          + [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) The JSON Grammar Exchange Format

          + [pt::param](tcllib/files/modules/pt/pt\_param\.md) PackRat Machine Specification

          + [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) Parsing Expression Serialization

          + [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) Parsing Expression Utilities

          + [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) Parsing Expression Grammar Serialization

          + [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) PEG Storage

          + [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) PEG Storage\. Canned PEG grammar specification

          + [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) PEG Export

          + [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) PEG Export Plugin\. Write CONTAINER format

          + [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) PEG Export Plugin\. Write JSON format

          + [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) PEG Export Plugin\. Write PEG format

          + [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) PEG Conversion\. From CONTAINER format

          + [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) PEG Conversion\. Read JSON format

          + [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) PEG Conversion\. Read PEG format

          + [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) PEG Import

          + [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) PEG Import Plugin\. From CONTAINER format

          + [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) PEG Import Plugin\. Read JSON format

          + [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) PEG Import Plugin\. Read PEG format

          + [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) Interpreter for parsing expression grammars

          + [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) PEG Conversion\. Write CONTAINER format

          + [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) PEG Conversion\. Write CPARAM format

          + [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) PEG Conversion\. Write JSON format

          + [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) PEG Conversion\. Write PARAM format

          + [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) PEG Conversion\. Write PEG format

          + [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) PEG Conversion\. Write TCLPARAM format

          + [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) PEG Language Tutorial

          + [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) Introduction to Parsing Expression Grammars

          + [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) Parser Generator

          + [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) Parsing Runtime Support, PARAM based

          + [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) Tcl/PARAM, Canned configuration, NX

          + [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) Tcl/PARAM, Canned configuration, Snit

          + [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) Tcl/PARAM, Canned configuration, Tcloo

          + [pt::util](tcllib/files/modules/pt/pt\_util\.md) General utilities

          + [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) Parser Tools Export API

          + [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) Parser Tools Import API

          + [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) Introduction to Parser Tools

          + [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) Parser Tools PEG Parser

          + [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) Parser API

          + [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md) Parser Tools PE Grammar Utility Operations

      * [Procedures, arguments, parameters, options]()

          + [tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager

          + [tepam::procedure](tcllib/files/modules/tepam/tepam\_procedure\.md) TEPAM procedure, reference manual

      * [Programming tools]()

          + [clay](tcllib/files/modules/clay/clay\.md) A minimalist framework for large scale OO Projects

          + [cmdline](tcllib/files/modules/cmdline/cmdline\.md) Procedures to process command lines and options\.

          + [comm](tcllib/files/modules/comm/comm\.md) A remote communication facility for Tcl \(8\.3 and later\)

          + [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md) The comm wire protocol

          + [control](tcllib/files/modules/control/control\.md) Procedures for control flow structures\.

          + [deleg\_method](tcllib/files/modules/interp/deleg\_method\.md) Creation of comm delegates \(snit methods\)

          + [deleg\_proc](tcllib/files/modules/interp/deleg\_proc\.md) Creation of comm delegates \(procedures\)

          + [fileutil](tcllib/files/modules/fileutil/fileutil\.md) Procedures implementing some file utilities

          + [fileutil::magic::cfront](tcllib/files/modules/fumagic/cfront\.md) Generator core for compiler of magic\(5\) files

          + [fileutil::magic::cgen](tcllib/files/modules/fumagic/cgen\.md) Generator core for compiler of magic\(5\) files

          + [fileutil::magic::filetype](tcllib/files/modules/fumagic/filetypes\.md) Procedures implementing file\-type recognition

          + [fileutil::magic::rt](tcllib/files/modules/fumagic/rtcore\.md) Runtime core for file type recognition engines written in pure Tcl

          + [fileutil::multi](tcllib/files/modules/fileutil/multi\.md) Multi\-file operation, scatter/gather, standard object

          + [fileutil::multi::op](tcllib/files/modules/fileutil/multiop\.md) Multi\-file operation, scatter/gather

          + [fileutil\_traverse](tcllib/files/modules/fileutil/traverse\.md) Iterative directory traversal

          + [hook](tcllib/files/modules/hook/hook\.md) Hooks

          + [interp](tcllib/files/modules/interp/tcllib\_interp\.md) Interp creation and aliasing

          + [log](tcllib/files/modules/log/log\.md) Procedures to log messages of libraries and applications\.

          + [logger](tcllib/files/modules/log/logger\.md) System to control logging of events\.

          + [logger::appender](tcllib/files/modules/log/loggerAppender\.md) Collection of predefined appenders for logger

          + [logger::utils](tcllib/files/modules/log/loggerUtils\.md) Utilities for logger

          + [multiplexer](tcllib/files/modules/multiplexer/multiplexer\.md) One\-to\-many communication with sockets\.

          + [pluginmgr](tcllib/files/modules/pluginmgr/pluginmgr\.md) Manage a plugin

          + [profiler](tcllib/files/modules/profiler/profiler\.md) Tcl source code profiler

          + [snit](tcllib/files/modules/snit/snit\.md) Snit's Not Incr Tcl

          + [snitfaq](tcllib/files/modules/snit/snitfaq\.md) Snit Frequently Asked Questions

          + [stooop](tcllib/files/modules/stooop/stooop\.md) Object oriented extension\.

          + [switched](tcllib/files/modules/stooop/switched\.md) switch/option management\.

          + [tie](tcllib/files/modules/tie/tie\.md) Array persistence

          + [tie](tcllib/files/modules/tie/tie\_std\.md) Array persistence, standard data sources

          + [uevent](tcllib/files/modules/uev/uevent\.md) User events

          + [wip](tcllib/files/modules/wip/wip\.md) Word Interpreter

      * [System]()

          + [cron](tcllib/files/modules/cron/cron\.md) Tool for automating the period callback of commands

          + [nettool](tcllib/files/modules/nettool/nettool\.md) Tools for networked applications

          + [processman](tcllib/files/modules/processman/processman\.md) Tool for automating the period callback of commands

      * [TclOO]()

          + [oometa](tcllib/files/modules/oometa/oometa\.md) oo::meta A data registry for classess

          + [practcl](tcllib/files/modules/practcl/practcl\.md) The Practcl Module

          + [tool](tcllib/files/modules/tool/tool\.md) TclOO Library \(TOOL\) Framework

      * [Terminal control]()

          + [term](tcllib/files/modules/term/term\.md) General terminal control

          + [term::ansi::code](tcllib/files/modules/term/ansi\_code\.md) Helper for control sequences

          + [term::ansi::code::attr](tcllib/files/modules/term/ansi\_cattr\.md) ANSI attribute sequences

          + [term::ansi::code::ctrl](tcllib/files/modules/term/ansi\_cctrl\.md) ANSI control sequences

          + [term::ansi::code::macros](tcllib/files/modules/term/ansi\_cmacros\.md) Macro sequences

          + [term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md) Control operations and queries

          + [term::ansi::send](tcllib/files/modules/term/ansi\_send\.md) Output of ANSI control sequences to terminals

          + [term::interact::menu](tcllib/files/modules/term/imenu\.md) Terminal widget, menu

          + [term::interact::pager](tcllib/files/modules/term/ipager\.md) Terminal widget, paging

          + [term::receive](tcllib/files/modules/term/receive\.md) General input from terminals

          + [term::receive::bind](tcllib/files/modules/term/term\_bind\.md) Keyboard dispatch from terminals

          + [term::send](tcllib/files/modules/term/term\_send\.md) General output to terminals

      * [Text formatter plugin]()

          + [doctools::idx::export::docidx](tcllib/files/modules/doctools2idx/export\_docidx\.md) docidx export plugin

          + [doctools::idx::export::html](tcllib/files/modules/doctools2idx/idx\_export\_html\.md) HTML export plugin

          + [doctools::idx::export::json](tcllib/files/modules/doctools2idx/idx\_export\_json\.md) JSON export plugin

          + [doctools::idx::export::nroff](tcllib/files/modules/doctools2idx/idx\_export\_nroff\.md) nroff export plugin

          + [doctools::idx::export::text](tcllib/files/modules/doctools2idx/idx\_export\_text\.md) plain text export plugin

          + [doctools::idx::export::wiki](tcllib/files/modules/doctools2idx/idx\_export\_wiki\.md) wiki export plugin

          + [doctools::idx::import::docidx](tcllib/files/modules/doctools2idx/import\_docidx\.md) docidx import plugin

          + [doctools::idx::import::json](tcllib/files/modules/doctools2idx/idx\_import\_json\.md) JSON import plugin

          + [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) doctoc export plugin

          + [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) HTML export plugin

          + [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) JSON export plugin

          + [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) nroff export plugin

          + [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md) plain text export plugin

          + [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md) wiki export plugin

          + [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) doctoc import plugin

          + [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md) JSON import plugin

      * [Text processing]()

          + [ascii85](tcllib/files/modules/base64/ascii85\.md) ascii85\-encode/decode binary data

          + [base32](tcllib/files/modules/base32/base32\.md) base32 standard encoding

          + [base32::core](tcllib/files/modules/base32/base32core\.md) Expanding basic base32 maps

          + [base32::hex](tcllib/files/modules/base32/base32hex\.md) base32 extended hex encoding

          + [base64](tcllib/files/modules/base64/base64\.md) base64\-encode/decode binary data

          + [bibtex](tcllib/files/modules/bibtex/bibtex\.md) Parse bibtex files

          + [clock\_iso8601](tcllib/files/modules/clock/iso8601\.md) Parsing ISO 8601 dates/times

          + [clock\_rfc2822](tcllib/files/modules/clock/rfc2822\.md) Parsing RFC 2822 dates/times

          + [csv](tcllib/files/modules/csv/csv\.md) Procedures to handle CSV data\.

          + [htmlparse](tcllib/files/modules/htmlparse/htmlparse\.md) Procedures to parse HTML strings

          + [inifile](tcllib/files/modules/inifile/ini\.md) Parsing of Windows INI files

          + [markdown](tcllib/files/modules/markdown/markdown\.md) Converts Markdown text to HTML

          + [mime](tcllib/files/modules/mime/mime\.md) Manipulation of MIME body parts

          + [rcs](tcllib/files/modules/rcs/rcs\.md) RCS low level utilities

          + [string::token](tcllib/files/modules/string/token\.md) Regex based iterative lexing

          + [string::token::shell](tcllib/files/modules/string/token\_shell\.md) Parsing of shell command line

          + [textutil](tcllib/files/modules/textutil/textutil\.md) Procedures to manipulate texts and strings\.

          + [textutil::adjust](tcllib/files/modules/textutil/adjust\.md) Procedures to adjust, indent, and undent paragraphs

          + [textutil::patch](tcllib/files/modules/textutil/patch\.md) Application of uni\-diff patches to directory trees

          + [textutil::repeat](tcllib/files/modules/textutil/repeat\.md) Procedures to repeat strings\.

          + [textutil::split](tcllib/files/modules/textutil/textutil\_split\.md) Procedures to split texts

          + [textutil::string](tcllib/files/modules/textutil/textutil\_string\.md) Procedures to manipulate texts and strings\.

          + [textutil::tabify](tcllib/files/modules/textutil/tabify\.md) Procedures to \(un\)tabify strings

          + [textutil::trim](tcllib/files/modules/textutil/trim\.md) Procedures to trim strings

          + [uuencode](tcllib/files/modules/base64/uuencode\.md) UU\-encode/decode binary data

          + [xsxp](tcllib/files/modules/amazon\-s3/xsxp\.md) eXtremely Simple Xml Parser

          + [yencode](tcllib/files/modules/base64/yencode\.md) Y\-encode/decode binary data

      * [Transfer module]()

          + [transfer::connect](tcllib/files/modules/transfer/connect\.md) Connection setup

          + [transfer::copy](tcllib/files/modules/transfer/copyops\.md) Data transfer foundation

          + [transfer::copy::queue](tcllib/files/modules/transfer/tqueue\.md) Queued transfers

          + [transfer::data::destination](tcllib/files/modules/transfer/ddest\.md) Data destination

          + [transfer::data::source](tcllib/files/modules/transfer/dsource\.md) Data source

          + [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) Data source

          + [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md) Data source

      * [Unfiled]()

          + [cache::async](tcllib/files/modules/cache/async\.md) Asynchronous in\-memory cache

          + [fileutil::paths](tcllib/files/modules/fileutil/paths\.md) Manage search path pools

          + [generator](tcllib/files/modules/generator/generator\.md) Procedures for creating and using generators\.

          + [huddle](tcllib/files/modules/yaml/huddle\.md) Create and manipulate huddle object

          + [map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md) Resolving geographical names with a Nominatim service

          + [map::slippy](tcllib/files/modules/map/map\_slippy\.md) Common code for slippy based map packages

          + [map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md) Management of a tile cache in the local filesystem

          + [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md) Accessing a server providing tiles for slippy\-based maps

          + [mapproj](tcllib/files/modules/mapproj/mapproj\.md) Map projection routines

          + [math::calculus::symdiff](tcllib/files/modules/math/symdiff\.md) Symbolic differentiation for Tcl

          + [math::machineparameters](tcllib/files/modules/math/machineparameters\.md) Compute double precision machine parameters\.

          + [namespacex](tcllib/files/modules/namespacex/namespacex\.md) Namespace utility commands

          + [rest](tcllib/files/modules/rest/rest\.md) define REST web APIs and call them inline or asychronously

          + [stringprep](tcllib/files/modules/stringprep/stringprep\.md) Implementation of stringprep

          + [stringprep::data](tcllib/files/modules/stringprep/stringprep\_data\.md) stringprep data tables, generated, internal

          + [struct::map](tcllib/files/modules/struct/struct\_map\.md) Manage key/value maps

          + [uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md) Request merging and deferal to idle time

          + [unicode](tcllib/files/modules/stringprep/unicode\.md) Implementation of Unicode normalization

          + [unicode::data](tcllib/files/modules/stringprep/unicode\_data\.md) unicode data tables, generated, internal

          + [units](tcllib/files/modules/units/units\.md) unit conversion

          + [yaml](tcllib/files/modules/yaml/yaml\.md) YAML Format Encoder/Decoder

      * [Utilities]()

          + [dicttool](tcllib/files/modules/dicttool/dicttool\.md) Dictionary Tools

      * [Utility]()

          + [defer](tcllib/files/modules/defer/defer\.md) Defered execution

          + [lambda](tcllib/files/modules/lambda/lambda\.md) Utility commands for anonymous procedures

          + [lazyset](tcllib/files/modules/lazyset/lazyset\.md) Lazy evaluation

          + [oo::util](tcllib/files/modules/ooutil/ooutil\.md) Utility commands for TclOO

          + [oo::util](tcllib/files/modules/tool/meta\.md) Utility commands for TclOO

          + [throw](tcllib/files/modules/try/tcllib\_throw\.md) throw \- Throw an error exception with a message

          + [tool::dict\_ensemble](tcllib/files/modules/tool/tool\_dict\_ensemble\.md) Dictionary Tools

          + [try](tcllib/files/modules/try/tcllib\_try\.md) try \- Trap and process errors and exceptions

      * [Validation, Type checking]()

          + [valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) Validation, common code

          + [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) Validation for AMEX creditcard number

          + [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) Validation for Discover creditcard number

          + [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) Validation for Mastercard creditcard number

          + [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) Validation for VISA creditcard number

          + [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) Validation for EAN13

          + [valtype::iban](tcllib/files/modules/valtype/iban\.md) Validation for IBAN

          + [valtype::imei](tcllib/files/modules/valtype/imei\.md) Validation for IMEI

          + [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) Validation for ISBN

          + [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) Validation for plain number with a LUHN checkdigit

          + [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) Validation for plain number with a LUHN5 checkdigit

          + [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) Validation for USNPI

          + [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md) Validation for plain number with a VERHOEFF checkdigit
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/toc1.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118

[//000000001]: # (Table of contents generated by tcllib/doctools/toc with format 'markdown')

# Table Of Contents \-\-

  - [Modules]()

      * [aes]()

          + [aes](tcllib/files/modules/aes/aes\.md) Implementation of the AES block cipher

      * [amazon\-s3]()

          + [S3](tcllib/files/modules/amazon\-s3/S3\.md) Amazon S3 Web Service Interface

          + [xsxp](tcllib/files/modules/amazon\-s3/xsxp\.md) eXtremely Simple Xml Parser

      * [asn]()

          + [asn](tcllib/files/modules/asn/asn\.md) ASN\.1 BER encoder/decoder

      * [base32]()

          + [base32](tcllib/files/modules/base32/base32\.md) base32 standard encoding

          + [base32::core](tcllib/files/modules/base32/base32core\.md) Expanding basic base32 maps

          + [base32::hex](tcllib/files/modules/base32/base32hex\.md) base32 extended hex encoding

      * [base64]()

          + [ascii85](tcllib/files/modules/base64/ascii85\.md) ascii85\-encode/decode binary data

          + [base64](tcllib/files/modules/base64/base64\.md) base64\-encode/decode binary data

          + [uuencode](tcllib/files/modules/base64/uuencode\.md) UU\-encode/decode binary data

          + [yencode](tcllib/files/modules/base64/yencode\.md) Y\-encode/decode binary data

      * [bee]()

          + [bee](tcllib/files/modules/bee/bee\.md) BitTorrent Serialization Format Encoder/Decoder

      * [bench]()

          + [bench](tcllib/files/modules/bench/bench\.md) bench \- Processing benchmark suites

          + [bench::in](tcllib/files/modules/bench/bench\_read\.md) bench::in \- Reading benchmark results

          + [bench::out::csv](tcllib/files/modules/bench/bench\_wcsv\.md) bench::out::csv \- Formatting benchmark results as CSV

          + [bench::out::text](tcllib/files/modules/bench/bench\_wtext\.md) bench::out::text \- Formatting benchmark results as human readable text

          + [bench\_intro](tcllib/files/modules/bench/bench\_intro\.md) bench introduction

          + [bench\_lang\_intro](tcllib/files/modules/bench/bench\_lang\_intro\.md) bench language introduction

          + [bench\_lang\_spec](tcllib/files/modules/bench/bench\_lang\_spec\.md) bench language specification

      * [bibtex]()

          + [bibtex](tcllib/files/modules/bibtex/bibtex\.md) Parse bibtex files

      * [blowfish]()

          + [blowfish](tcllib/files/modules/blowfish/blowfish\.md) Implementation of the Blowfish block cipher

      * [cache]()

          + [cache::async](tcllib/files/modules/cache/async\.md) Asynchronous in\-memory cache

      * [clay]()

          + [clay](tcllib/files/modules/clay/clay\.md) A minimalist framework for large scale OO Projects

      * [clock]()

          + [clock\_iso8601](tcllib/files/modules/clock/iso8601\.md) Parsing ISO 8601 dates/times

          + [clock\_rfc2822](tcllib/files/modules/clock/rfc2822\.md) Parsing RFC 2822 dates/times

      * [cmdline]()

          + [cmdline](tcllib/files/modules/cmdline/cmdline\.md) Procedures to process command lines and options\.

      * [comm]()

          + [comm](tcllib/files/modules/comm/comm\.md) A remote communication facility for Tcl \(8\.3 and later\)

          + [comm\_wire](tcllib/files/modules/comm/comm\_wire\.md) The comm wire protocol

      * [control]()

          + [control](tcllib/files/modules/control/control\.md) Procedures for control flow structures\.

      * [coroutine]()

          + [coroutine](tcllib/files/modules/coroutine/tcllib\_coroutine\.md) Coroutine based event and IO handling

          + [coroutine::auto](tcllib/files/modules/coroutine/coro\_auto\.md) Automatic event and IO coroutine awareness

      * [counter]()

          + [counter](tcllib/files/modules/counter/counter\.md) Procedures for counters and histograms

      * [crc]()

          + [cksum](tcllib/files/modules/crc/cksum\.md) Calculate a cksum\(1\) compatible checksum

          + [crc16](tcllib/files/modules/crc/crc16\.md) Perform a 16bit Cyclic Redundancy Check

          + [crc32](tcllib/files/modules/crc/crc32\.md) Perform a 32bit Cyclic Redundancy Check

          + [sum](tcllib/files/modules/crc/sum\.md) Calculate a sum\(1\) compatible checksum

      * [cron]()

          + [cron](tcllib/files/modules/cron/cron\.md) Tool for automating the period callback of commands

      * [csv]()

          + [csv](tcllib/files/modules/csv/csv\.md) Procedures to handle CSV data\.

      * [debug]()

          + [debug](tcllib/files/modules/debug/debug\.md) debug narrative \- core

          + [debug::caller](tcllib/files/modules/debug/debug\_caller\.md) debug narrative \- caller

          + [debug::heartbeat](tcllib/files/modules/debug/debug\_heartbeat\.md) debug narrative \- heartbeat

          + [debug::timestamp](tcllib/files/modules/debug/debug\_timestamp\.md) debug narrative \- timestamping

      * [defer]()

          + [defer](tcllib/files/modules/defer/defer\.md) Defered execution

      * [des]()

          + [des](tcllib/files/modules/des/des\.md) Implementation of the DES and triple\-DES ciphers

          + [tclDES](tcllib/files/modules/des/tcldes\.md) Implementation of the DES and triple\-DES ciphers

          + [tclDESjr](tcllib/files/modules/des/tcldesjr\.md) Implementation of the DES and triple\-DES ciphers

      * [dicttool]()

          + [dicttool](tcllib/files/modules/dicttool/dicttool\.md) Dictionary Tools

      * [dns]()

          + [dns](tcllib/files/modules/dns/tcllib\_dns\.md) Tcl Domain Name Service Client

          + [tcllib\_ip](tcllib/files/modules/dns/tcllib\_ip\.md) IPv4 and IPv6 address manipulation

      * [docstrip]()

          + [docstrip](tcllib/files/modules/docstrip/docstrip\.md) Docstrip style source code extraction

          + [docstrip\_util](tcllib/files/modules/docstrip/docstrip\_util\.md) Docstrip\-related utilities

      * [doctools]()

          + [docidx\_intro](tcllib/files/modules/doctools/docidx\_intro\.md) docidx introduction

          + [docidx\_lang\_cmdref](tcllib/files/modules/doctools/docidx\_lang\_cmdref\.md) docidx language command reference

          + [docidx\_lang\_faq](tcllib/files/modules/doctools/docidx\_lang\_faq\.md) docidx language faq

          + [docidx\_lang\_intro](tcllib/files/modules/doctools/docidx\_lang\_intro\.md) docidx language introduction

          + [docidx\_lang\_syntax](tcllib/files/modules/doctools/docidx\_lang\_syntax\.md) docidx language syntax

          + [docidx\_plugin\_apiref](tcllib/files/modules/doctools/docidx\_plugin\_apiref\.md) docidx plugin API reference

          + [doctoc\_intro](tcllib/files/modules/doctools/doctoc\_intro\.md) doctoc introduction

          + [doctoc\_lang\_cmdref](tcllib/files/modules/doctools/doctoc\_lang\_cmdref\.md) doctoc language command reference

          + [doctoc\_lang\_faq](tcllib/files/modules/doctools/doctoc\_lang\_faq\.md) doctoc language faq

          + [doctoc\_lang\_intro](tcllib/files/modules/doctools/doctoc\_lang\_intro\.md) doctoc language introduction

          + [doctoc\_lang\_syntax](tcllib/files/modules/doctools/doctoc\_lang\_syntax\.md) doctoc language syntax

          + [doctoc\_plugin\_apiref](tcllib/files/modules/doctools/doctoc\_plugin\_apiref\.md) doctoc plugin API reference

          + [doctools](tcllib/files/modules/doctools/doctools\.md) doctools \- Processing documents

          + [doctools::changelog](tcllib/files/modules/doctools/changelog\.md) Processing text in Emacs ChangeLog format

          + [doctools::cvs](tcllib/files/modules/doctools/cvs\.md) Processing text in 'cvs log' format

          + [doctools::idx](tcllib/files/modules/doctools/docidx\.md) docidx \- Processing indices

          + [doctools::toc](tcllib/files/modules/doctools/doctoc\.md) doctoc \- Processing tables of contents

          + [doctools\_intro](tcllib/files/modules/doctools/doctools\_intro\.md) doctools introduction

          + [doctools\_lang\_cmdref](tcllib/files/modules/doctools/doctools\_lang\_cmdref\.md) doctools language command reference

          + [doctools\_lang\_faq](tcllib/files/modules/doctools/doctools\_lang\_faq\.md) doctools language faq

          + [doctools\_lang\_intro](tcllib/files/modules/doctools/doctools\_lang\_intro\.md) doctools language introduction

          + [doctools\_lang\_syntax](tcllib/files/modules/doctools/doctools\_lang\_syntax\.md) doctools language syntax

          + [doctools\_plugin\_apiref](tcllib/files/modules/doctools/doctools\_plugin\_apiref\.md) doctools plugin API reference

          + [mpexpand](tcllib/files/modules/doctools/mpexpand\.md) Markup processor

      * [doctools2base]()

          + [doctools::html::cssdefaults](tcllib/files/modules/doctools2base/html\_cssdefaults\.md) Default CSS style for HTML export plugins

          + [doctools::msgcat](tcllib/files/modules/doctools2base/tcllib\_msgcat\.md) Message catalog management for the various document parsers

          + [doctools::nroff::man\_macros](tcllib/files/modules/doctools2base/nroff\_manmacros\.md) Default CSS style for NROFF export plugins

          + [doctools::tcl::parse](tcllib/files/modules/doctools2base/tcl\_parse\.md) Processing text in 'subst \-novariables' format

      * [doctools2idx]()

          + [doctools2idx\_introduction](tcllib/files/modules/doctools2idx/idx\_introduction\.md) DocTools \- Keyword indices

          + [doctools::idx](tcllib/files/modules/doctools2idx/idx\_container\.md) Holding keyword indices

          + [doctools::idx::export](tcllib/files/modules/doctools2idx/idx\_export\.md) Exporting keyword indices

          + [doctools::idx::export::docidx](tcllib/files/modules/doctools2idx/export\_docidx\.md) docidx export plugin

          + [doctools::idx::export::html](tcllib/files/modules/doctools2idx/idx\_export\_html\.md) HTML export plugin

          + [doctools::idx::export::json](tcllib/files/modules/doctools2idx/idx\_export\_json\.md) JSON export plugin

          + [doctools::idx::export::nroff](tcllib/files/modules/doctools2idx/idx\_export\_nroff\.md) nroff export plugin

          + [doctools::idx::export::text](tcllib/files/modules/doctools2idx/idx\_export\_text\.md) plain text export plugin

          + [doctools::idx::export::wiki](tcllib/files/modules/doctools2idx/idx\_export\_wiki\.md) wiki export plugin

          + [doctools::idx::import](tcllib/files/modules/doctools2idx/idx\_import\.md) Importing keyword indices

          + [doctools::idx::import::docidx](tcllib/files/modules/doctools2idx/import\_docidx\.md) docidx import plugin

          + [doctools::idx::import::json](tcllib/files/modules/doctools2idx/idx\_import\_json\.md) JSON import plugin

          + [doctools::idx::parse](tcllib/files/modules/doctools2idx/idx\_parse\.md) Parsing text in docidx format

          + [doctools::idx::structure](tcllib/files/modules/doctools2idx/idx\_structure\.md) Docidx serialization utilities

          + [doctools::msgcat::idx::c](tcllib/files/modules/doctools2idx/idx\_msgcat\_c\.md) Message catalog for the docidx parser \(C\)

          + [doctools::msgcat::idx::de](tcllib/files/modules/doctools2idx/idx\_msgcat\_de\.md) Message catalog for the docidx parser \(DE\)

          + [doctools::msgcat::idx::en](tcllib/files/modules/doctools2idx/idx\_msgcat\_en\.md) Message catalog for the docidx parser \(EN\)

          + [doctools::msgcat::idx::fr](tcllib/files/modules/doctools2idx/idx\_msgcat\_fr\.md) Message catalog for the docidx parser \(FR\)

      * [doctools2toc]()

          + [doctools2toc\_introduction](tcllib/files/modules/doctools2toc/toc\_introduction\.md) DocTools \- Tables of Contents

          + [doctools::msgcat::toc::c](tcllib/files/modules/doctools2toc/toc\_msgcat\_c\.md) Message catalog for the doctoc parser \(C\)

          + [doctools::msgcat::toc::de](tcllib/files/modules/doctools2toc/toc\_msgcat\_de\.md) Message catalog for the doctoc parser \(DE\)

          + [doctools::msgcat::toc::en](tcllib/files/modules/doctools2toc/toc\_msgcat\_en\.md) Message catalog for the doctoc parser \(EN\)

          + [doctools::msgcat::toc::fr](tcllib/files/modules/doctools2toc/toc\_msgcat\_fr\.md) Message catalog for the doctoc parser \(FR\)

          + [doctools::toc](tcllib/files/modules/doctools2toc/toc\_container\.md) Holding tables of contents

          + [doctools::toc::export](tcllib/files/modules/doctools2toc/toc\_export\.md) Exporting tables of contents

          + [doctools::toc::export::doctoc](tcllib/files/modules/doctools2toc/export\_doctoc\.md) doctoc export plugin

          + [doctools::toc::export::html](tcllib/files/modules/doctools2toc/toc\_export\_html\.md) HTML export plugin

          + [doctools::toc::export::json](tcllib/files/modules/doctools2toc/toc\_export\_json\.md) JSON export plugin

          + [doctools::toc::export::nroff](tcllib/files/modules/doctools2toc/toc\_export\_nroff\.md) nroff export plugin

          + [doctools::toc::export::text](tcllib/files/modules/doctools2toc/toc\_export\_text\.md) plain text export plugin

          + [doctools::toc::export::wiki](tcllib/files/modules/doctools2toc/toc\_export\_wiki\.md) wiki export plugin

          + [doctools::toc::import](tcllib/files/modules/doctools2toc/toc\_import\.md) Importing keyword indices

          + [doctools::toc::import::doctoc](tcllib/files/modules/doctools2toc/import\_doctoc\.md) doctoc import plugin

          + [doctools::toc::import::json](tcllib/files/modules/doctools2toc/toc\_import\_json\.md) JSON import plugin

          + [doctools::toc::parse](tcllib/files/modules/doctools2toc/toc\_parse\.md) Parsing text in doctoc format

          + [doctools::toc::structure](tcllib/files/modules/doctools2toc/toc\_structure\.md) Doctoc serialization utilities

      * [dtplite]()

          + [dtplite](tcllib/files/modules/dtplite/pkg\_dtplite\.md) Lightweight DocTools Markup Processor

      * [fileutil]()

          + [fileutil](tcllib/files/modules/fileutil/fileutil\.md) Procedures implementing some file utilities

          + [fileutil::multi](tcllib/files/modules/fileutil/multi\.md) Multi\-file operation, scatter/gather, standard object

          + [fileutil::multi::op](tcllib/files/modules/fileutil/multiop\.md) Multi\-file operation, scatter/gather

          + [fileutil::paths](tcllib/files/modules/fileutil/paths\.md) Manage search path pools

          + [fileutil\_traverse](tcllib/files/modules/fileutil/traverse\.md) Iterative directory traversal

      * [ftp]()

          + [ftp](tcllib/files/modules/ftp/ftp\.md) Client\-side tcl implementation of the ftp protocol

          + [ftp::geturl](tcllib/files/modules/ftp/ftp\_geturl\.md) Uri handler for ftp urls

      * [ftpd]()

          + [ftpd](tcllib/files/modules/ftpd/ftpd\.md) Tcl FTP server implementation

      * [fumagic]()

          + [fileutil::magic::cfront](tcllib/files/modules/fumagic/cfront\.md) Generator core for compiler of magic\(5\) files

          + [fileutil::magic::cgen](tcllib/files/modules/fumagic/cgen\.md) Generator core for compiler of magic\(5\) files

          + [fileutil::magic::filetype](tcllib/files/modules/fumagic/filetypes\.md) Procedures implementing file\-type recognition

          + [fileutil::magic::rt](tcllib/files/modules/fumagic/rtcore\.md) Runtime core for file type recognition engines written in pure Tcl

      * [generator]()

          + [generator](tcllib/files/modules/generator/generator\.md) Procedures for creating and using generators\.

      * [gpx]()

          + [gpx](tcllib/files/modules/gpx/gpx\.md) Extracts waypoints, tracks and routes from GPX files

      * [grammar\_aycock]()

          + [grammar::aycock](tcllib/files/modules/grammar\_aycock/aycock\.md) Aycock\-Horspool\-Earley parser generator for Tcl

      * [grammar\_fa]()

          + [grammar::fa](tcllib/files/modules/grammar\_fa/fa\.md) Create and manipulate finite automatons

          + [grammar::fa::dacceptor](tcllib/files/modules/grammar\_fa/dacceptor\.md) Create and use deterministic acceptors

          + [grammar::fa::dexec](tcllib/files/modules/grammar\_fa/dexec\.md) Execute deterministic finite automatons

          + [grammar::fa::op](tcllib/files/modules/grammar\_fa/faop\.md) Operations on finite automatons

      * [grammar\_me]()

          + [grammar::me::cpu](tcllib/files/modules/grammar\_me/me\_cpu\.md) Virtual machine implementation II for parsing token streams

          + [grammar::me::cpu::core](tcllib/files/modules/grammar\_me/me\_cpucore\.md) ME virtual machine state manipulation

          + [grammar::me::cpu::gasm](tcllib/files/modules/grammar\_me/gasm\.md) ME assembler

          + [grammar::me::tcl](tcllib/files/modules/grammar\_me/me\_tcl\.md) Virtual machine implementation I for parsing token streams

          + [grammar::me::util](tcllib/files/modules/grammar\_me/me\_util\.md) AST utilities

          + [grammar::me\_ast](tcllib/files/modules/grammar\_me/me\_ast\.md) Various representations of ASTs

          + [grammar::me\_intro](tcllib/files/modules/grammar\_me/me\_intro\.md) Introduction to virtual machines for parsing token streams

          + [grammar::me\_vm](tcllib/files/modules/grammar\_me/me\_vm\.md) Virtual machine for parsing token streams

      * [grammar\_peg]()

          + [grammar::peg](tcllib/files/modules/grammar\_peg/peg\.md) Create and manipulate parsing expression grammars

          + [grammar::peg::interp](tcllib/files/modules/grammar\_peg/peg\_interp\.md) Interpreter for parsing expression grammars

      * [hook]()

          + [hook](tcllib/files/modules/hook/hook\.md) Hooks

      * [html]()

          + [html](tcllib/files/modules/html/html\.md) Procedures to generate HTML structures

      * [htmlparse]()

          + [htmlparse](tcllib/files/modules/htmlparse/htmlparse\.md) Procedures to parse HTML strings

      * [http]()

          + [autoproxy](tcllib/files/modules/http/autoproxy\.md) Automatic HTTP proxy usage and authentication

      * [httpd]()

          + [httpd](tcllib/files/modules/httpd/httpd\.md) A TclOO and coroutine based web server

      * [ident]()

          + [ident](tcllib/files/modules/ident/ident\.md) Ident protocol client

      * [imap4]()

          + [imap4](tcllib/files/modules/imap4/imap4\.md) imap client\-side tcl implementation of imap protocol

      * [inifile]()

          + [inifile](tcllib/files/modules/inifile/ini\.md) Parsing of Windows INI files

      * [interp]()

          + [deleg\_method](tcllib/files/modules/interp/deleg\_method\.md) Creation of comm delegates \(snit methods\)

          + [deleg\_proc](tcllib/files/modules/interp/deleg\_proc\.md) Creation of comm delegates \(procedures\)

          + [interp](tcllib/files/modules/interp/tcllib\_interp\.md) Interp creation and aliasing

      * [irc]()

          + [irc](tcllib/files/modules/irc/irc\.md) Create IRC connection and interface\.

          + [picoirc](tcllib/files/modules/irc/picoirc\.md) Small and simple embeddable IRC client\.

      * [javascript]()

          + [javascript](tcllib/files/modules/javascript/javascript\.md) Procedures to generate HTML and Java Script structures\.

      * [jpeg]()

          + [jpeg](tcllib/files/modules/jpeg/jpeg\.md) JPEG querying and manipulation of meta data

      * [json]()

          + [json](tcllib/files/modules/json/json\.md) JSON parser

          + [json::write](tcllib/files/modules/json/json\_write\.md) JSON generation

      * [lambda]()

          + [lambda](tcllib/files/modules/lambda/lambda\.md) Utility commands for anonymous procedures

      * [lazyset]()

          + [lazyset](tcllib/files/modules/lazyset/lazyset\.md) Lazy evaluation

      * [ldap]()

          + [ldap](tcllib/files/modules/ldap/ldap\.md) LDAP client

          + [ldapx](tcllib/files/modules/ldap/ldapx\.md) LDAP extended object interface

      * [log]()

          + [log](tcllib/files/modules/log/log\.md) Procedures to log messages of libraries and applications\.

          + [logger](tcllib/files/modules/log/logger\.md) System to control logging of events\.

          + [logger::appender](tcllib/files/modules/log/loggerAppender\.md) Collection of predefined appenders for logger

          + [logger::utils](tcllib/files/modules/log/loggerUtils\.md) Utilities for logger

      * [map]()

          + [map::geocode::nominatim](tcllib/files/modules/map/map\_geocode\_nominatim\.md) Resolving geographical names with a Nominatim service

          + [map::slippy](tcllib/files/modules/map/map\_slippy\.md) Common code for slippy based map packages

          + [map::slippy::cache](tcllib/files/modules/map/map\_slippy\_cache\.md) Management of a tile cache in the local filesystem

          + [map::slippy::fetcher](tcllib/files/modules/map/map\_slippy\_fetcher\.md) Accessing a server providing tiles for slippy\-based maps

      * [mapproj]()

          + [mapproj](tcllib/files/modules/mapproj/mapproj\.md) Map projection routines

      * [markdown]()

          + [markdown](tcllib/files/modules/markdown/markdown\.md) Converts Markdown text to HTML

      * [math]()

          + [math](tcllib/files/modules/math/math\.md) Tcl Math Library

          + [math::bigfloat](tcllib/files/modules/math/bigfloat\.md) Arbitrary precision floating\-point numbers

          + [math::bignum](tcllib/files/modules/math/bignum\.md) Arbitrary precision integer numbers

          + [math::calculus](tcllib/files/modules/math/calculus\.md) Integration and ordinary differential equations

          + [math::calculus::romberg](tcllib/files/modules/math/romberg\.md) Romberg integration

          + [math::calculus::symdiff](tcllib/files/modules/math/symdiff\.md) Symbolic differentiation for Tcl

          + [math::changepoint](tcllib/files/modules/math/changepoint\.md) Change point detection methods

          + [math::combinatorics](tcllib/files/modules/math/combinatorics\.md) Combinatorial functions in the Tcl Math Library

          + [math::complexnumbers](tcllib/files/modules/math/qcomplex\.md) Straightforward complex number package

          + [math::constants](tcllib/files/modules/math/constants\.md) Mathematical and numerical constants

          + [math::decimal](tcllib/files/modules/math/decimal\.md) General decimal arithmetic

          + [math::exact](tcllib/files/modules/math/exact\.md) Exact Real Arithmetic

          + [math::filters](tcllib/files/modules/math/filtergen\.md) Digital filters

          + [math::fourier](tcllib/files/modules/math/fourier\.md) Discrete and fast fourier transforms

          + [math::fuzzy](tcllib/files/modules/math/fuzzy\.md) Fuzzy comparison of floating\-point numbers

          + [math::geometry](tcllib/files/modules/math/math\_geometry\.md) Geometrical computations

          + [math::interpolate](tcllib/files/modules/math/interpolate\.md) Interpolation routines

          + [math::linearalgebra](tcllib/files/modules/math/linalg\.md) Linear Algebra

          + [math::machineparameters](tcllib/files/modules/math/machineparameters\.md) Compute double precision machine parameters\.

          + [math::numtheory](tcllib/files/modules/math/numtheory\.md) Number Theory

          + [math::optimize](tcllib/files/modules/math/optimize\.md) Optimisation routines

          + [math::PCA](tcllib/files/modules/math/pca\.md) Package for Principal Component Analysis

          + [math::polynomials](tcllib/files/modules/math/polynomials\.md) Polynomial functions

          + [math::probopt](tcllib/files/modules/math/probopt\.md) Probabilistic optimisation methods

          + [math::quasirandom](tcllib/files/modules/math/quasirandom\.md) Quasi\-random points for integration and Monte Carlo type methods

          + [math::rationalfunctions](tcllib/files/modules/math/rational\_funcs\.md) Polynomial functions

          + [math::roman](tcllib/files/modules/math/roman\.md) Tools for creating and manipulating roman numerals

          + [math::special](tcllib/files/modules/math/special\.md) Special mathematical functions

          + [math::statistics](tcllib/files/modules/math/statistics\.md) Basic statistical functions and procedures

          + [math::trig](tcllib/files/modules/math/trig\.md) Trigonometric anf hyperbolic functions

      * [md4]()

          + [md4](tcllib/files/modules/md4/md4\.md) MD4 Message\-Digest Algorithm

      * [md5]()

          + [md5](tcllib/files/modules/md5/md5\.md) MD5 Message\-Digest Algorithm

      * [md5crypt]()

          + [md5crypt](tcllib/files/modules/md5crypt/md5crypt\.md) MD5\-based password encryption

      * [mime]()

          + [mime](tcllib/files/modules/mime/mime\.md) Manipulation of MIME body parts

          + [smtp](tcllib/files/modules/mime/smtp\.md) Client\-side tcl implementation of the smtp protocol

      * [multiplexer]()

          + [multiplexer](tcllib/files/modules/multiplexer/multiplexer\.md) One\-to\-many communication with sockets\.

      * [namespacex]()

          + [namespacex](tcllib/files/modules/namespacex/namespacex\.md) Namespace utility commands

      * [ncgi]()

          + [ncgi](tcllib/files/modules/ncgi/ncgi\.md) Procedures to manipulate CGI values\.

      * [nettool]()

          + [nettool](tcllib/files/modules/nettool/nettool\.md) Tools for networked applications

      * [nmea]()

          + [nmea](tcllib/files/modules/nmea/nmea\.md) Process NMEA data

      * [nns]()

          + [nameserv](tcllib/files/modules/nns/nns\_client\.md) Name service facility, Client

          + [nameserv::auto](tcllib/files/modules/nns/nns\_auto\.md) Name service facility, Client Extension

          + [nameserv::common](tcllib/files/modules/nns/nns\_common\.md) Name service facility, shared definitions

          + [nameserv::protocol](tcllib/files/modules/nns/nns\_protocol\.md) Name service facility, client/server protocol

          + [nameserv::server](tcllib/files/modules/nns/nns\_server\.md) Name service facility, Server

          + [nns\_intro](tcllib/files/modules/nns/nns\_intro\.md) Name service facility, introduction

      * [nntp]()

          + [nntp](tcllib/files/modules/nntp/nntp\.md) Tcl client for the NNTP protocol

      * [ntp]()

          + [ntp\_time](tcllib/files/modules/ntp/ntp\_time\.md) Tcl Time Service Client

      * [oauth]()

          + [oauth](tcllib/files/modules/oauth/oauth\.md) oauth API base signature

      * [oometa]()

          + [oometa](tcllib/files/modules/oometa/oometa\.md) oo::meta A data registry for classess

      * [ooutil]()

          + [oo::util](tcllib/files/modules/ooutil/ooutil\.md) Utility commands for TclOO

      * [otp]()

          + [otp](tcllib/files/modules/otp/otp\.md) One\-Time Passwords

      * [page]()

          + [page\_intro](tcllib/files/modules/page/page\_intro\.md) page introduction

          + [page\_pluginmgr](tcllib/files/modules/page/page\_pluginmgr\.md) page plugin manager

          + [page\_util\_flow](tcllib/files/modules/page/page\_util\_flow\.md) page dataflow/treewalker utility

          + [page\_util\_norm\_lemon](tcllib/files/modules/page/page\_util\_norm\_lemon\.md) page AST normalization, LEMON

          + [page\_util\_norm\_peg](tcllib/files/modules/page/page\_util\_norm\_peg\.md) page AST normalization, PEG

          + [page\_util\_peg](tcllib/files/modules/page/page\_util\_peg\.md) page PEG transformation utilities

          + [page\_util\_quote](tcllib/files/modules/page/page\_util\_quote\.md) page character quoting utilities

      * [pki]()

          + [pki](tcllib/files/modules/pki/pki\.md) Implementation of the public key cipher

      * [pluginmgr]()

          + [pluginmgr](tcllib/files/modules/pluginmgr/pluginmgr\.md) Manage a plugin

      * [png]()

          + [png](tcllib/files/modules/png/png\.md) PNG querying and manipulation of meta data

      * [pop3]()

          + [pop3](tcllib/files/modules/pop3/pop3\.md) Tcl client for POP3 email protocol

      * [pop3d]()

          + [pop3d](tcllib/files/modules/pop3d/pop3d\.md) Tcl POP3 server implementation

          + [pop3d::dbox](tcllib/files/modules/pop3d/pop3d\_dbox\.md) Simple mailbox database for pop3d

          + [pop3d::udb](tcllib/files/modules/pop3d/pop3d\_udb\.md) Simple user database for pop3d

      * [practcl]()

          + [practcl](tcllib/files/modules/practcl/practcl\.md) The Practcl Module

      * [processman]()

          + [processman](tcllib/files/modules/processman/processman\.md) Tool for automating the period callback of commands

      * [profiler]()

          + [profiler](tcllib/files/modules/profiler/profiler\.md) Tcl source code profiler

      * [pt]()

          + [pt::ast](tcllib/files/modules/pt/pt\_astree\.md) Abstract Syntax Tree Serialization

          + [pt::cparam::configuration::critcl](tcllib/files/modules/pt/pt\_cparam\_config\_critcl\.md) C/PARAM, Canned configuration, Critcl

          + [pt::cparam::configuration::tea](tcllib/files/modules/pt/pt\_cparam\_config\_tea\.md) C/PARAM, Canned configuration, TEA

          + [pt::json\_language](tcllib/files/modules/pt/pt\_json\_language\.md) The JSON Grammar Exchange Format

          + [pt::param](tcllib/files/modules/pt/pt\_param\.md) PackRat Machine Specification

          + [pt::pe](tcllib/files/modules/pt/pt\_pexpression\.md) Parsing Expression Serialization

          + [pt::pe::op](tcllib/files/modules/pt/pt\_pexpr\_op\.md) Parsing Expression Utilities

          + [pt::peg](tcllib/files/modules/pt/pt\_pegrammar\.md) Parsing Expression Grammar Serialization

          + [pt::peg::container](tcllib/files/modules/pt/pt\_peg\_container\.md) PEG Storage

          + [pt::peg::container::peg](tcllib/files/modules/pt/pt\_peg\_container\_peg\.md) PEG Storage\. Canned PEG grammar specification

          + [pt::peg::export](tcllib/files/modules/pt/pt\_peg\_export\.md) PEG Export

          + [pt::peg::export::container](tcllib/files/modules/pt/pt\_peg\_export\_container\.md) PEG Export Plugin\. Write CONTAINER format

          + [pt::peg::export::json](tcllib/files/modules/pt/pt\_peg\_export\_json\.md) PEG Export Plugin\. Write JSON format

          + [pt::peg::export::peg](tcllib/files/modules/pt/pt\_peg\_export\_peg\.md) PEG Export Plugin\. Write PEG format

          + [pt::peg::from::container](tcllib/files/modules/pt/pt\_peg\_from\_container\.md) PEG Conversion\. From CONTAINER format

          + [pt::peg::from::json](tcllib/files/modules/pt/pt\_peg\_from\_json\.md) PEG Conversion\. Read JSON format

          + [pt::peg::from::peg](tcllib/files/modules/pt/pt\_peg\_from\_peg\.md) PEG Conversion\. Read PEG format

          + [pt::peg::import](tcllib/files/modules/pt/pt\_peg\_import\.md) PEG Import

          + [pt::peg::import::container](tcllib/files/modules/pt/pt\_peg\_import\_container\.md) PEG Import Plugin\. From CONTAINER format

          + [pt::peg::import::json](tcllib/files/modules/pt/pt\_peg\_import\_json\.md) PEG Import Plugin\. Read JSON format

          + [pt::peg::import::peg](tcllib/files/modules/pt/pt\_peg\_import\_peg\.md) PEG Import Plugin\. Read PEG format

          + [pt::peg::interp](tcllib/files/modules/pt/pt\_peg\_interp\.md) Interpreter for parsing expression grammars

          + [pt::peg::to::container](tcllib/files/modules/pt/pt\_peg\_to\_container\.md) PEG Conversion\. Write CONTAINER format

          + [pt::peg::to::cparam](tcllib/files/modules/pt/pt\_peg\_to\_cparam\.md) PEG Conversion\. Write CPARAM format

          + [pt::peg::to::json](tcllib/files/modules/pt/pt\_peg\_to\_json\.md) PEG Conversion\. Write JSON format

          + [pt::peg::to::param](tcllib/files/modules/pt/pt\_peg\_to\_param\.md) PEG Conversion\. Write PARAM format

          + [pt::peg::to::peg](tcllib/files/modules/pt/pt\_peg\_to\_peg\.md) PEG Conversion\. Write PEG format

          + [pt::peg::to::tclparam](tcllib/files/modules/pt/pt\_peg\_to\_tclparam\.md) PEG Conversion\. Write TCLPARAM format

          + [pt::peg\_language](tcllib/files/modules/pt/pt\_peg\_language\.md) PEG Language Tutorial

          + [pt::pegrammar](tcllib/files/modules/pt/pt\_peg\_introduction\.md) Introduction to Parsing Expression Grammars

          + [pt::pgen](tcllib/files/modules/pt/pt\_pgen\.md) Parser Generator

          + [pt::rde](tcllib/files/modules/pt/pt\_rdengine\.md) Parsing Runtime Support, PARAM based

          + [pt::tclparam::configuration::nx](tcllib/files/modules/pt/pt\_tclparam\_config\_nx\.md) Tcl/PARAM, Canned configuration, NX

          + [pt::tclparam::configuration::snit](tcllib/files/modules/pt/pt\_tclparam\_config\_snit\.md) Tcl/PARAM, Canned configuration, Snit

          + [pt::tclparam::configuration::tcloo](tcllib/files/modules/pt/pt\_tclparam\_config\_tcloo\.md) Tcl/PARAM, Canned configuration, Tcloo

          + [pt::util](tcllib/files/modules/pt/pt\_util\.md) General utilities

          + [pt\_export\_api](tcllib/files/modules/pt/pt\_to\_api\.md) Parser Tools Export API

          + [pt\_import\_api](tcllib/files/modules/pt/pt\_from\_api\.md) Parser Tools Import API

          + [pt\_introduction](tcllib/files/modules/pt/pt\_introduction\.md) Introduction to Parser Tools

          + [pt\_parse\_peg](tcllib/files/modules/pt/pt\_parse\_peg\.md) Parser Tools PEG Parser

          + [pt\_parser\_api](tcllib/files/modules/pt/pt\_parser\_api\.md) Parser API

          + [pt\_peg\_op](tcllib/files/modules/pt/pt\_peg\_op\.md) Parser Tools PE Grammar Utility Operations

      * [rc4]()

          + [rc4](tcllib/files/modules/rc4/rc4\.md) Implementation of the RC4 stream cipher

      * [rcs]()

          + [rcs](tcllib/files/modules/rcs/rcs\.md) RCS low level utilities

      * [report]()

          + [report](tcllib/files/modules/report/report\.md) Create and manipulate report objects

      * [rest]()

          + [rest](tcllib/files/modules/rest/rest\.md) define REST web APIs and call them inline or asychronously

      * [ripemd]()

          + [ripemd128](tcllib/files/modules/ripemd/ripemd128\.md) RIPEMD\-128 Message\-Digest Algorithm

          + [ripemd160](tcllib/files/modules/ripemd/ripemd160\.md) RIPEMD\-160 Message\-Digest Algorithm

      * [sasl]()

          + [SASL](tcllib/files/modules/sasl/sasl\.md) Implementation of SASL mechanisms for Tcl

          + [SASL::NTLM](tcllib/files/modules/sasl/ntlm\.md) Implementation of SASL NTLM mechanism for Tcl

          + [SASL::SCRAM](tcllib/files/modules/sasl/scram\.md) Implementation of SASL SCRAM mechanism for Tcl

          + [SASL::XGoogleToken](tcllib/files/modules/sasl/gtoken\.md) Implementation of SASL NTLM mechanism for Tcl

      * [sha1]()

          + [sha1](tcllib/files/modules/sha1/sha1\.md) SHA1 Message\-Digest Algorithm

          + [sha256](tcllib/files/modules/sha1/sha256\.md) SHA256 Message\-Digest Algorithm

      * [simulation]()

          + [simulation::annealing](tcllib/files/modules/simulation/annealing\.md) Simulated annealing

          + [simulation::montecarlo](tcllib/files/modules/simulation/montecarlo\.md) Monte Carlo simulations

          + [simulation::random](tcllib/files/modules/simulation/simulation\_random\.md) Pseudo\-random number generators

      * [smtpd]()

          + [smtpd](tcllib/files/modules/smtpd/smtpd\.md) Tcl SMTP server implementation

      * [snit]()

          + [snit](tcllib/files/modules/snit/snit\.md) Snit's Not Incr Tcl

          + [snitfaq](tcllib/files/modules/snit/snitfaq\.md) Snit Frequently Asked Questions

      * [soundex]()

          + [soundex](tcllib/files/modules/soundex/soundex\.md) Soundex

      * [stooop]()

          + [stooop](tcllib/files/modules/stooop/stooop\.md) Object oriented extension\.

          + [switched](tcllib/files/modules/stooop/switched\.md) switch/option management\.

      * [string]()

          + [string::token](tcllib/files/modules/string/token\.md) Regex based iterative lexing

          + [string::token::shell](tcllib/files/modules/string/token\_shell\.md) Parsing of shell command line

      * [stringprep]()

          + [stringprep](tcllib/files/modules/stringprep/stringprep\.md) Implementation of stringprep

          + [stringprep::data](tcllib/files/modules/stringprep/stringprep\_data\.md) stringprep data tables, generated, internal

          + [unicode](tcllib/files/modules/stringprep/unicode\.md) Implementation of Unicode normalization

          + [unicode::data](tcllib/files/modules/stringprep/unicode\_data\.md) unicode data tables, generated, internal

      * [struct]()

          + [struct::disjointset](tcllib/files/modules/struct/disjointset\.md) Disjoint set data structure

          + [struct::graph](tcllib/files/modules/struct/graph\.md) Create and manipulate directed graph objects

          + [struct::graph::op](tcllib/files/modules/struct/graphops\.md) Operation for \(un\)directed graph objects

          + [struct::graph\_v1](tcllib/files/modules/struct/graph1\.md) Create and manipulate directed graph objects

          + [struct::list](tcllib/files/modules/struct/struct\_list\.md) Procedures for manipulating lists

          + [struct::map](tcllib/files/modules/struct/struct\_map\.md) Manage key/value maps

          + [struct::matrix](tcllib/files/modules/struct/matrix\.md) Create and manipulate matrix objects

          + [struct::matrix\_v1](tcllib/files/modules/struct/matrix1\.md) Create and manipulate matrix objects

          + [struct::pool](tcllib/files/modules/struct/pool\.md) Create and manipulate pool objects \(of discrete items\)

          + [struct::prioqueue](tcllib/files/modules/struct/prioqueue\.md) Create and manipulate prioqueue objects

          + [struct::queue](tcllib/files/modules/struct/queue\.md) Create and manipulate queue objects

          + [struct::record](tcllib/files/modules/struct/record\.md) Define and create records \(similar to 'C' structures\)

          + [struct::set](tcllib/files/modules/struct/struct\_set\.md) Procedures for manipulating sets

          + [struct::skiplist](tcllib/files/modules/struct/skiplist\.md) Create and manipulate skiplists

          + [struct::stack](tcllib/files/modules/struct/stack\.md) Create and manipulate stack objects

          + [struct::tree](tcllib/files/modules/struct/struct\_tree\.md) Create and manipulate tree objects

          + [struct::tree\_v1](tcllib/files/modules/struct/struct\_tree1\.md) Create and manipulate tree objects

      * [tar]()

          + [tar](tcllib/files/modules/tar/tar\.md) Tar file creation, extraction & manipulation

      * [tepam]()

          + [tepam](tcllib/files/modules/tepam/tepam\_introduction\.md) An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager

          + [tepam::argument\_dialogbox](tcllib/files/modules/tepam/tepam\_argument\_dialogbox\.md) TEPAM argument\_dialogbox, reference manual

          + [tepam::doc\_gen](tcllib/files/modules/tepam/tepam\_doc\_gen\.md) TEPAM DOC Generation, reference manual

          + [tepam::procedure](tcllib/files/modules/tepam/tepam\_procedure\.md) TEPAM procedure, reference manual

      * [term]()

          + [term](tcllib/files/modules/term/term\.md) General terminal control

          + [term::ansi::code](tcllib/files/modules/term/ansi\_code\.md) Helper for control sequences

          + [term::ansi::code::attr](tcllib/files/modules/term/ansi\_cattr\.md) ANSI attribute sequences

          + [term::ansi::code::ctrl](tcllib/files/modules/term/ansi\_cctrl\.md) ANSI control sequences

          + [term::ansi::code::macros](tcllib/files/modules/term/ansi\_cmacros\.md) Macro sequences

          + [term::ansi::ctrl::unix](tcllib/files/modules/term/ansi\_ctrlu\.md) Control operations and queries

          + [term::ansi::send](tcllib/files/modules/term/ansi\_send\.md) Output of ANSI control sequences to terminals

          + [term::interact::menu](tcllib/files/modules/term/imenu\.md) Terminal widget, menu

          + [term::interact::pager](tcllib/files/modules/term/ipager\.md) Terminal widget, paging

          + [term::receive](tcllib/files/modules/term/receive\.md) General input from terminals

          + [term::receive::bind](tcllib/files/modules/term/term\_bind\.md) Keyboard dispatch from terminals

          + [term::send](tcllib/files/modules/term/term\_send\.md) General output to terminals

      * [textutil]()

          + [textutil](tcllib/files/modules/textutil/textutil\.md) Procedures to manipulate texts and strings\.

          + [textutil::adjust](tcllib/files/modules/textutil/adjust\.md) Procedures to adjust, indent, and undent paragraphs

          + [textutil::expander](tcllib/files/modules/textutil/expander\.md) Procedures to process templates and expand text\.

          + [textutil::patch](tcllib/files/modules/textutil/patch\.md) Application of uni\-diff patches to directory trees

          + [textutil::repeat](tcllib/files/modules/textutil/repeat\.md) Procedures to repeat strings\.

          + [textutil::split](tcllib/files/modules/textutil/textutil\_split\.md) Procedures to split texts

          + [textutil::string](tcllib/files/modules/textutil/textutil\_string\.md) Procedures to manipulate texts and strings\.

          + [textutil::tabify](tcllib/files/modules/textutil/tabify\.md) Procedures to \(un\)tabify strings

          + [textutil::trim](tcllib/files/modules/textutil/trim\.md) Procedures to trim strings

      * [tie]()

          + [tie](tcllib/files/modules/tie/tie\.md) Array persistence

          + [tie](tcllib/files/modules/tie/tie\_std\.md) Array persistence, standard data sources

      * [tiff]()

          + [tiff](tcllib/files/modules/tiff/tiff\.md) TIFF reading, writing, and querying and manipulation of meta data

      * [tool]()

          + [oo::util](tcllib/files/modules/tool/meta\.md) Utility commands for TclOO

          + [tool](tcllib/files/modules/tool/tool\.md) TclOO Library \(TOOL\) Framework

          + [tool::dict\_ensemble](tcllib/files/modules/tool/tool\_dict\_ensemble\.md) Dictionary Tools

      * [transfer]()

          + [transfer::connect](tcllib/files/modules/transfer/connect\.md) Connection setup

          + [transfer::copy](tcllib/files/modules/transfer/copyops\.md) Data transfer foundation

          + [transfer::copy::queue](tcllib/files/modules/transfer/tqueue\.md) Queued transfers

          + [transfer::data::destination](tcllib/files/modules/transfer/ddest\.md) Data destination

          + [transfer::data::source](tcllib/files/modules/transfer/dsource\.md) Data source

          + [transfer::receiver](tcllib/files/modules/transfer/receiver\.md) Data source

          + [transfer::transmitter](tcllib/files/modules/transfer/transmitter\.md) Data source

      * [treeql]()

          + [treeql](tcllib/files/modules/treeql/treeql\.md) Query tree objects

      * [try]()

          + [throw](tcllib/files/modules/try/tcllib\_throw\.md) throw \- Throw an error exception with a message

          + [try](tcllib/files/modules/try/tcllib\_try\.md) try \- Trap and process errors and exceptions

      * [udpcluster]()

          + [udpcluster](tcllib/files/modules/udpcluster/udpcluster\.md) UDP Peer\-to\-Peer cluster

      * [uev]()

          + [uevent](tcllib/files/modules/uev/uevent\.md) User events

          + [uevent::onidle](tcllib/files/modules/uev/uevent\_onidle\.md) Request merging and deferal to idle time

      * [units]()

          + [units](tcllib/files/modules/units/units\.md) unit conversion

      * [uri]()

          + [uri](tcllib/files/modules/uri/uri\.md) URI utilities

          + [uri\_urn](tcllib/files/modules/uri/urn\-scheme\.md) URI utilities, URN scheme

      * [uuid]()

          + [uuid](tcllib/files/modules/uuid/uuid\.md) UUID generation and comparison

      * [valtype]()

          + [valtype::common](tcllib/files/modules/valtype/valtype\_common\.md) Validation, common code

          + [valtype::creditcard::amex](tcllib/files/modules/valtype/cc\_amex\.md) Validation for AMEX creditcard number

          + [valtype::creditcard::discover](tcllib/files/modules/valtype/cc\_discover\.md) Validation for Discover creditcard number

          + [valtype::creditcard::mastercard](tcllib/files/modules/valtype/cc\_mastercard\.md) Validation for Mastercard creditcard number

          + [valtype::creditcard::visa](tcllib/files/modules/valtype/cc\_visa\.md) Validation for VISA creditcard number

          + [valtype::gs1::ean13](tcllib/files/modules/valtype/ean13\.md) Validation for EAN13

          + [valtype::iban](tcllib/files/modules/valtype/iban\.md) Validation for IBAN

          + [valtype::imei](tcllib/files/modules/valtype/imei\.md) Validation for IMEI

          + [valtype::isbn](tcllib/files/modules/valtype/isbn\.md) Validation for ISBN

          + [valtype::luhn](tcllib/files/modules/valtype/luhn\.md) Validation for plain number with a LUHN checkdigit

          + [valtype::luhn5](tcllib/files/modules/valtype/luhn5\.md) Validation for plain number with a LUHN5 checkdigit

          + [valtype::usnpi](tcllib/files/modules/valtype/usnpi\.md) Validation for USNPI

          + [valtype::verhoeff](tcllib/files/modules/valtype/verhoeff\.md) Validation for plain number with a VERHOEFF checkdigit

      * [virtchannel\_base]()

          + [tcl::chan::cat](tcllib/files/modules/virtchannel\_base/cat\.md) Concatenation channel

          + [tcl::chan::facade](tcllib/files/modules/virtchannel\_base/facade\.md) Facade channel

          + [tcl::chan::fifo](tcllib/files/modules/virtchannel\_base/tcllib\_fifo\.md) In\-memory fifo channel

          + [tcl::chan::fifo2](tcllib/files/modules/virtchannel\_base/tcllib\_fifo2\.md) In\-memory interconnected fifo channels

          + [tcl::chan::halfpipe](tcllib/files/modules/virtchannel\_base/halfpipe\.md) In\-memory channel, half of a fifo2

          + [tcl::chan::memchan](tcllib/files/modules/virtchannel\_base/tcllib\_memchan\.md) In\-memory channel

          + [tcl::chan::null](tcllib/files/modules/virtchannel\_base/tcllib\_null\.md) Null channel

          + [tcl::chan::nullzero](tcllib/files/modules/virtchannel\_base/nullzero\.md) Null/Zero channel combination

          + [tcl::chan::random](tcllib/files/modules/virtchannel\_base/tcllib\_random\.md) Random channel

          + [tcl::chan::std](tcllib/files/modules/virtchannel\_base/std\.md) Standard I/O, unification of stdin and stdout

          + [tcl::chan::string](tcllib/files/modules/virtchannel\_base/tcllib\_string\.md) Read\-only in\-memory channel

          + [tcl::chan::textwindow](tcllib/files/modules/virtchannel\_base/textwindow\.md) Textwindow channel

          + [tcl::chan::variable](tcllib/files/modules/virtchannel\_base/tcllib\_variable\.md) In\-memory channel using variable for storage

          + [tcl::chan::zero](tcllib/files/modules/virtchannel\_base/tcllib\_zero\.md) Zero channel

          + [tcl::randomseed](tcllib/files/modules/virtchannel\_base/randseed\.md) Utilities for random channels

      * [virtchannel\_core]()

          + [tcl::chan::core](tcllib/files/modules/virtchannel\_core/core\.md) Basic reflected/virtual channel support

          + [tcl::chan::events](tcllib/files/modules/virtchannel\_core/events\.md) Event support for reflected/virtual channels

          + [tcl::transform::core](tcllib/files/modules/virtchannel\_core/transformcore\.md) Basic reflected/virtual channel transform support

      * [virtchannel\_transform]()

          + [tcl::transform::adler32](tcllib/files/modules/virtchannel\_transform/adler32\.md) Adler32 transformation

          + [tcl::transform::base64](tcllib/files/modules/virtchannel\_transform/vt\_base64\.md) Base64 encoding transformation

          + [tcl::transform::counter](tcllib/files/modules/virtchannel\_transform/vt\_counter\.md) Counter transformation

          + [tcl::transform::crc32](tcllib/files/modules/virtchannel\_transform/vt\_crc32\.md) Crc32 transformation

          + [tcl::transform::hex](tcllib/files/modules/virtchannel\_transform/hex\.md) Hexadecimal encoding transformation

          + [tcl::transform::identity](tcllib/files/modules/virtchannel\_transform/identity\.md) Identity transformation

          + [tcl::transform::limitsize](tcllib/files/modules/virtchannel\_transform/limitsize\.md) limiting input

          + [tcl::transform::observe](tcllib/files/modules/virtchannel\_transform/observe\.md) Observer transformation, stream copy

          + [tcl::transform::otp](tcllib/files/modules/virtchannel\_transform/vt\_otp\.md) Encryption via one\-time pad

          + [tcl::transform::rot](tcllib/files/modules/virtchannel\_transform/rot\.md) rot\-encryption

          + [tcl::transform::spacer](tcllib/files/modules/virtchannel\_transform/spacer\.md) Space insertation and removal

          + [tcl::transform::zlib](tcllib/files/modules/virtchannel\_transform/tcllib\_zlib\.md) zlib \(de\)compression

      * [websocket]()

          + [websocket](tcllib/files/modules/websocket/websocket\.md) Tcl implementation of the websocket protocol

      * [wip]()

          + [wip](tcllib/files/modules/wip/wip\.md) Word Interpreter

      * [yaml]()

          + [huddle](tcllib/files/modules/yaml/huddle\.md) Create and manipulate huddle object

          + [yaml](tcllib/files/modules/yaml/yaml\.md) YAML Format Encoder/Decoder

      * [zip]()

          + [zipfile::decode](tcllib/files/modules/zip/decode\.md) Access to zip archives

          + [zipfile::encode](tcllib/files/modules/zip/encode\.md) Generation of zip archives

          + [zipfile::mkzip](tcllib/files/modules/zip/mkzip\.md) Build a zip archive
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted embedded/md/toc2.md.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

[//000000001]: # (Table of contents generated by tcllib/doctools/toc with format 'markdown')

# Table Of Contents \-\-

  - [Applications]()

      * [dtplite](tcllib/files/apps/dtplite\.md) Lightweight DocTools Markup Processor

      * [nns](tcllib/files/apps/nns\.md) Name service facility, Commandline Client Application

      * [nnsd](tcllib/files/apps/nnsd\.md) Name service facility, Commandline Server Application

      * [nnslog](tcllib/files/apps/nnslog\.md) Name service facility, Commandline Logging Client Application

      * [page](tcllib/files/apps/page\.md) Parser Generator

      * [pt](tcllib/files/apps/pt\.md) Parser Tools Application

      * [tcldocstrip](tcllib/files/apps/tcldocstrip\.md) Tcl\-based Docstrip Processor
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































Added embedded/www/image/arch_core_container.png.

cannot compute difference between binary files

Added embedded/www/image/arch_core_eplugins.png.

cannot compute difference between binary files

Added embedded/www/image/arch_core_export.png.

cannot compute difference between binary files

Added embedded/www/image/arch_core_import.png.

cannot compute difference between binary files

Added embedded/www/image/arch_core_iplugins.png.

cannot compute difference between binary files

Added embedded/www/image/arch_core_support.png.

cannot compute difference between binary files

Added embedded/www/image/arch_core_transform.png.

cannot compute difference between binary files

Added embedded/www/image/arch_user_app.png.

cannot compute difference between binary files

Added embedded/www/image/arch_user_pkg.png.

cannot compute difference between binary files

Added embedded/www/image/architecture.png.

cannot compute difference between binary files

Added embedded/www/image/expr_ast.png.

cannot compute difference between binary files

Added embedded/www/image/flow.png.

cannot compute difference between binary files

Added embedded/www/image/gen_options.png.

cannot compute difference between binary files

Added embedded/www/index.html.













































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
<div class='fossil-doc' data-title='Keyword Index'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="toc.html">Table Of Contents</a>
| <a href="toc0.html">Categories</a>
| <a href="toc1.html">Modules</a>
| <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Keyword Index </h3>
<hr><div class="#doctools_idxnav">
<a href="#c1"> . </a> &#183; <a href="#c2"> / </a> &#183; <a href="#c3"> 3 </a> &#183; <a href="#c4"> A </a> &#183; <a href="#c5"> B </a> &#183; <a href="#c6"> C </a> &#183; <a href="#c7"> D </a> &#183; <a href="#c8"> E </a> &#183; <a href="#c9"> F </a> &#183; <a href="#c10"> G </a> &#183; <a href="#c11"> H </a> &#183; <a href="#c12"> I </a> &#183; <a href="#c13"> J </a> &#183; <a href="#c14"> K </a> &#183; <a href="#c15"> L </a> &#183; <a href="#c16"> M </a> &#183; <a href="#c17"> N </a> &#183; <a href="#c18"> O </a> &#183; <a href="#c19"> P </a> &#183; <a href="#c20"> Q </a> &#183; <a href="#c21"> R </a> &#183; <a href="#c22"> S </a> &#183; <a href="#c23"> T </a> &#183; <a href="#c24"> U </a> &#183; <a href="#c25"> V </a> &#183; <a href="#c26"> W </a> &#183; <a href="#c27"> X </a> &#183; <a href="#c28"> Y </a> &#183; <a href="#c29"> Z </a>
</div>
<hr><table class="#doctools_idx" width="100%">
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c1">Keywords: .</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key666"> .ddt </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key439"> .dtx </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c2">Keywords: /</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key770"> /dev/null </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key591"> /dev/random </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key114"> /dev/zero </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c3">Keywords: 3</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key298"> 3DES </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c4">Keywords: A</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key746"> abstract syntax tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_util.html"> grammar::me::util </a> &#183; <a href="tcllib/files/modules/grammar_me/me_ast.html"> grammar::me_ast </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key326"> acceptance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key323"> acceptor </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key613"> active </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key242"> adaptors </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key468"> adjacency list </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key492"> adjacency matrix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key485"> adjacent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key346"> adjusting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key668"> adler32 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key796"> aes </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key414"> after </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key777"> alias </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key522"> amazon </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/S3.html"> S3 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key823"> ambiguous </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key397"> American Express </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key398"> AMEX </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key582"> angle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key596"> anonymous procedure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key166"> ansi </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a> &#183; <a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key409"> appender </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/loggerAppender.html"> logger::appender </a> &#183; <a href="tcllib/files/modules/log/loggerUtils.html"> logger::utils </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key28"> application </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/apps/nns.html"> nns </a> &#183; <a href="tcllib/files/apps/nnsd.html"> nnsd </a> &#183; <a href="tcllib/files/apps/nnslog.html"> nnslog </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key494"> approximation algorithm </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key473"> arc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key125"> arcfour </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key736"> archive </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tar/tar.html"> tar </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key764"> argument integrity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key264"> argument processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key765"> argument validation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key763"> arguments </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key263"> argv </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key262"> argv0 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key37"> array </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key483"> articulation point </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key719"> ascii85 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/ascii85.html"> ascii85 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key427"> asn </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key318"> assembler </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key144"> assert </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key571"> assign </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key815"> AST </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_ast.html"> grammar::me_ast </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key644"> asynchronous </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key165"> attribute control </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key470"> augmenting network </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key490"> augmenting path </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key394"> authentication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/http/autoproxy.html"> autoproxy </a> &#183; <a href="tcllib/files/modules/sasl/sasl.html"> SASL </a> &#183; <a href="tcllib/files/modules/sasl/ntlm.html"> SASL::NTLM </a> &#183; <a href="tcllib/files/modules/sasl/scram.html"> SASL::SCRAM </a> &#183; <a href="tcllib/files/modules/sasl/gtoken.html"> SASL::XGoogleToken </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key515"> automatic </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key831"> automatic documentation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_doc_gen.html"> tepam::doc_gen </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key320"> automaton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key826"> aycock </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c5">Keywords: B</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key269"> bank </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key299"> base32 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base32/base32.html"> base32 </a> &#183; <a href="tcllib/files/modules/base32/base32core.html"> base32::core </a> &#183; <a href="tcllib/files/modules/base32/base32hex.html"> base32::hex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key587"> base64 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/base64.html"> base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key743"> bash </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key388"> bee </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key98"> bench language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key101"> benchmark </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key425"> ber </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key685"> Bessel functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/special.html"> math::special </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key465"> bfs </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key421"> bibliography </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key422"> bibtex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key287"> bignums </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bignum.html"> math::bignum </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key714"> bind </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key495"> bipartite </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key390"> BitTorrent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key389"> bittorrent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key282"> blanks </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/repeat.html"> textutil::repeat </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key297"> block cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key456"> blocking flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key801"> blowfish </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key363"> Book Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key702"> breadth-first </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key467"> bridge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key241"> BWidget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c6">Keywords: C</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key290"> C </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key237"> C++ </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key384"> cache </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key401"> caesar cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key784"> calculus </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key540"> callback </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a> &#183; <a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/lambda/lambda.html"> lambda </a> &#183; <a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a> &#183; <a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key721"> callbacks </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key689"> capitalize </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key267"> card for credit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key730"> cardinality </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key314"> cat </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key176"> catalog package </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key665"> catalogue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key795"> cell-phone </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key426"> cer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key22"> CFG </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key27"> CFL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key676"> CGI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key615"> cgraph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graph1.html"> struct::graph_v1 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key448"> changelog </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/changelog.html"> doctools::changelog </a> &#183; <a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key63"> channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/copyops.html"> transfer::copy </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a> &#183; <a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key277"> channel transformation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key96"> character input </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key420"> character output </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_send.html"> term::ansi::send </a> &#183; <a href="tcllib/files/modules/term/term_send.html"> term::send </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key693"> chat </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/irc/irc.html"> irc </a> &#183; <a href="tcllib/files/modules/multiplexer/multiplexer.html"> multiplexer </a> &#183; <a href="tcllib/files/modules/irc/picoirc.html"> picoirc </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key620"> checkbox </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/javascript/javascript.html"> javascript </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key618"> checkbutton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key53"> Checking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key150"> checksum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key688"> chop </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key169"> cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key149"> cksum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key240"> class </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key758"> class methods </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key761"> class variables </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key158"> cleanup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key30"> client </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_client.html"> nameserv </a> &#183; <a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a> &#183; <a href="tcllib/files/modules/nns/nns_common.html"> nameserv::common </a> &#183; <a href="tcllib/files/apps/nns.html"> nns </a> &#183; <a href="tcllib/files/modules/nns/nns_intro.html"> nns_intro </a> &#183; <a href="tcllib/files/apps/nnslog.html"> nnslog </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key523"> cloud </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/S3.html"> S3 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key265"> cmdline processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key164"> color control </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key507"> columns </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key40"> comm </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a> &#183; <a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a> &#183; <a href="tcllib/files/modules/nns/nns_protocol.html"> nameserv::protocol </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key275"> command </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key261"> command line processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key595"> command prefix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a> &#183; <a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key155"> comment </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a> &#183; <a href="tcllib/files/modules/png/png.html"> png </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key552"> common </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key690"> common prefix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key355"> communication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key554"> comparison </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key488"> complete graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key797"> complex numbers </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/qcomplex.html"> math::complexnumbers </a> &#183; <a href="tcllib/files/modules/math/fourier.html"> math::fourier </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key266"> compression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a> &#183; <a href="tcllib/files/modules/zip/encode.html"> zipfile::encode </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key751"> computations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key163"> concatenation channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key481"> connected component </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key741"> connected fifos </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key612"> connection </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key610"> constants </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key349"> CONTAINER </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key519"> contents </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key23"> context-free grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key4"> context-free languages </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key95"> control </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a> &#183; <a href="tcllib/files/modules/term/term.html"> term </a> &#183; <a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a> &#183; <a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a> &#183; <a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a> &#183; <a href="tcllib/files/modules/term/ansi_send.html"> term::ansi::send </a> &#183; <a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a> &#183; <a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a> &#183; <a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a> &#183; <a href="tcllib/files/modules/term/term_send.html"> term::send </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key224"> control structure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key20"> conversion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/math/roman.html"> math::roman </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key506"> cooked </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key675"> cookie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key64"> copy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a> &#183; <a href="tcllib/files/modules/transfer/copyops.html"> transfer::copy </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a> &#183; <a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key219"> coroutine </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a> &#183; <a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key819"> Cost </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key276"> counter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key717"> counting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key810"> CPARAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key146"> crc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key809"> crc16 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/crc16.html"> crc16 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key147"> crc32 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key270"> credit card </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key621"> cron </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cron/cron.html"> cron </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key800"> cryptography </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key406"> CSS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key49"> csv </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/csv/csv.html"> csv </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key597"> currying </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a> &#183; <a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key484"> cut edge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key486"> cut vertex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key634"> CVS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key774"> cvs </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key775"> cvs log </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key148"> cyclic redundancy check </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c7">Keywords: D</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key630"> data analysis </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/statistics.html"> math::statistics </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key61"> data destination </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key403"> data entry form </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html"> tepam::argument_dialogbox </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key205"> data exchange </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key124"> data integrity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key365"> data source </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key328"> data structures </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/record.html"> struct::record </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key34"> database </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key402"> dataflow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key639"> DE </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key76"> debug </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key769"> decimal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/decimal.html"> math::decimal </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key338"> declare </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key43"> decompression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a> &#183; <a href="tcllib/files/modules/zip/decode.html"> zipfile::decode </a> &#183; <a href="tcllib/files/modules/zip/mkzip.html"> zipfile::mkzip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key375"> decryption </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key543"> deferal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key339"> define </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key475"> degree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key476"> degree constrained spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key808"> degrees </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key39"> delegation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key700"> depth-first </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key428"> der </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key296"> DES </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key292"> deserialization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key458"> diameter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key705"> dict </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dicttool/dicttool.html"> dicttool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key563"> diff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key635"> diff -n format </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key733"> difference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key557"> differential </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key785"> differential equations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key496"> dijkstra </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key135"> directory access </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key723"> directory traversal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/traverse.html"> fileutil_traverse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key271"> Discover </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key787"> discrete items </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key623"> disjoint set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key517"> dispatcher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key479"> distance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key599"> DNS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key145"> do </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key178"> docidx </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key368"> docidx commands </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key371"> docidx language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key249"> docidx markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key369"> docidx syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key435"> docstrip </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key258"> doctoc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key512"> doctoc commands </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key511"> doctoc language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key387"> doctoc markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key546"> doctoc syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key179"> doctools </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/modules/doctools/changelog.html"> doctools::changelog </a> &#183; <a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key137"> doctools commands </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key140"> doctools language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key139"> doctools markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key138"> doctools syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key659"> document </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key185"> documentation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a> &#183; <a href="tcllib/files/modules/tepam/tepam_doc_gen.html"> tepam::doc_gen </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key816"> DOM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key754"> dom </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/xsxp.html"> xsxp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key602"> domain name service </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c8">Keywords: E</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key807"> e </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key103"> EAN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key104"> EAN13 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key825"> earley </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key3"> EBNF </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key501"> eccentricity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key460"> edge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key449"> emacs </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/changelog.html"> doctools::changelog </a> &#183; <a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key335"> email </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key729"> emptiness </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key778"> empty interpreter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key549"> EN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key254"> encoding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/ascii85.html"> ascii85 </a> &#183; <a href="tcllib/files/modules/base64/base64.html"> base64 </a> &#183; <a href="tcllib/files/modules/base64/uuencode.html"> uuencode </a> &#183; <a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key127"> encryption </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key766"> entry mask </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key560"> equal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key573"> equality </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key622"> equivalence class </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key161"> error </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_throw.html"> throw </a> &#183; <a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key683"> error function </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/special.html"> math::special </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key102"> European Article Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key542"> event </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/uev/uevent.html"> uevent </a> &#183; <a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key516"> event management </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key412"> events </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key370"> examples </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key162"> exception </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key204"> exchange format </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key731"> exclusion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key430"> execution </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key152"> exif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key415"> exit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key260"> export </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key0"> expression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key87"> extended namespace </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c9">Keywords: F</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key367"> faq </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key533"> fetching information </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key803"> FFT </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fourier.html"> math::fourier </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key608"> fifo </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key31"> file </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key116"> file recognition </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key118"> file type </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key115"> file utilities </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a> &#183; <a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a> &#183; <a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key385"> filesystem </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key223"> filter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key160"> final </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key268"> finance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key626"> find </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key788"> finite </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key325"> finite automaton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key213"> FIPS 180-1 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key561"> first permutation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key569"> Fisher-Yates </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key558"> flatten </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key393"> floating-point </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/fuzzy.html"> math::fuzzy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key141"> flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key499"> flow network </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key566"> folding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key221"> foldl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key226"> foldr </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key218"> foreach </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key616"> form </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key110"> format conversion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key657"> formatter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key247"> formatting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a> &#183; <a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a> &#183; <a href="tcllib/files/modules/textutil/tabify.html"> textutil::tabify </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key658"> formatting engine </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key802"> Fourier transform </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fourier.html"> math::fourier </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key170"> FR </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key674"> frame </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key294"> ftp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key607"> ftpd </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key606"> ftpserver </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key564"> full outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c10">Keywords: G</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key713"> generate event </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key572"> generate permutations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key250"> generation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key225"> generator </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key584"> geocoding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key197"> geodesy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/mapproj/mapproj.html"> mapproj </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key202"> geography </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key94"> get character </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key416"> gets </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key413"> global </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key531"> gopher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key408"> gps </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/gpx/gpx.html"> gpx </a> &#183; <a href="tcllib/files/modules/nmea/nmea.html"> nmea </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key669"> gpx </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/gpx/gpx.html"> gpx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key11"> grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpu.html"> grammar::me::cpu </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpucore.html"> grammar::me::cpu::core </a> &#183; <a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_tcl.html"> grammar::me::tcl </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_me/me_vm.html"> grammar::me_vm </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key305"> graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a> &#183; <a href="tcllib/files/modules/struct/graph1.html"> struct::graph_v1 </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key194"> graph walking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key419"> green threads </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key316"> grep </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key210"> GUID </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uuid/uuid.html"> uuid </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c11">Keywords: H</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key216"> hashing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a> &#183; <a href="tcllib/files/modules/otp/otp.html"> otp </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key710"> heartbeat </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key474"> heuristic </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key340"> hex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base32/base32hex.html"> base32::hex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key734"> hexadecimal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key716"> histogram </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key680"> hook </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key824"> horspool </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key18"> HTML </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key617"> html </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/javascript/javascript.html"> javascript </a> &#183; <a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key446"> http </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/http/autoproxy.html"> autoproxy </a> &#183; <a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a> &#183; <a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key588"> huddle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key504"> human readable </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key348"> hyphenation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c12">Keywords: I</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key171"> i18n </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key383"> IBAN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key433"> ident </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ident/ident.html"> ident </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key434"> identification </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ident/ident.html"> ident </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key442"> identity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key541"> idle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key121"> image </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a> &#183; <a href="tcllib/files/modules/png/png.html"> png </a> &#183; <a href="tcllib/files/modules/tiff/tiff.html"> tiff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key805"> imap </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key791"> IMEI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key291"> import </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key46"> in-memory channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key699"> in-order </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key728"> inclusion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key244"> Incr Tcl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key344"> indenting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key471"> independent set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key182"> index </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key780"> index formatter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key83"> info </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key568"> inner join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key505"> input mode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key351"> integer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/roman.html"> math::roman </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key783"> integration </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key740"> inter-thread communication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key105"> International Article Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key382"> International Bank Account Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key794"> International Mobile Equipment Identity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key364"> International Standard Book Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key175"> internationalization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key131"> internet </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a> &#183; <a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key454"> internet address </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key834"> interpolation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/interpolate.html"> math::interpolate </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key38"> interpreter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a> &#183; <a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a> &#183; <a href="tcllib/files/modules/wip/wip.html"> wip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key732"> intersection </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key750"> interval </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key451"> ip </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key360"> ipc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key453"> ipv4 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key450"> ipv6 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key744"> irc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/irc/irc.html"> irc </a> &#183; <a href="tcllib/files/modules/irc/picoirc.html"> picoirc </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key55"> isA </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key362"> ISBN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key491"> isthmus </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key222"> iterator </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c13">Keywords: J</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key207"> javascript </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/javascript/javascript.html"> javascript </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key154"> jfif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key559"> join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key153"> jpeg </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key259"> JSON </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key206"> json </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key343"> justification </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c14">Keywords: K</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key184"> keyword index </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key779"> keywords </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key285"> knuth </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c15">Keywords: L</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key177"> l10n </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key594"> lambda </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key438"> LaTeX </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key186"> latex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key196"> latitute </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key130"> ldap </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key128"> ldap client </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key503"> ldif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key69"> least squares </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key553"> left outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key193"> lemon </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key487"> level graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key257"> lexer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key697"> lexing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key725"> limitsize </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key580"> line </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key68"> linear algebra </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key67"> linear equations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key312"> linear program </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key510"> lines </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key302"> list </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/wip/wip.html"> wip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key97"> listener </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key437"> literate programming </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key15"> LL(k) </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key482"> local searching </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key174"> localization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key200"> location </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key73"> log </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a> &#183; <a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a> &#183; <a href="tcllib/files/modules/log/log.html"> log </a> &#183; <a href="tcllib/files/modules/log/logger.html"> logger </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key91"> log level </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/log.html"> log </a> &#183; <a href="tcllib/files/modules/log/logger.html"> logger </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key89"> logger </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/logger.html"> logger </a> &#183; <a href="tcllib/files/modules/log/loggerAppender.html"> logger::appender </a> &#183; <a href="tcllib/files/modules/log/loggerUtils.html"> logger::utils </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key551"> longest common subsequence </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key203"> longitude </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key457"> loop </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key59"> luhn </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key54"> luhn-5 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c16">Keywords: M</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key527"> macros </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key330"> mail </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key534"> mailto </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key526"> man_macros </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key17"> manpage </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key201"> map </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a> &#183; <a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/mapproj/mapproj.html"> mapproj </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key16"> markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools/doctools_intro.html"> doctools_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key670"> MasterCard </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key5"> matching </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key71"> math </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math.html"> math </a> &#183; <a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/bignum.html"> math::bignum </a> &#183; <a href="tcllib/files/modules/math/calculus.html"> math::calculus </a> &#183; <a href="tcllib/files/modules/math/qcomplex.html"> math::complexnumbers </a> &#183; <a href="tcllib/files/modules/math/constants.html"> math::constants </a> &#183; <a href="tcllib/files/modules/math/decimal.html"> math::decimal </a> &#183; <a href="tcllib/files/modules/math/fuzzy.html"> math::fuzzy </a> &#183; <a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a> &#183; <a href="tcllib/files/modules/math/interpolate.html"> math::interpolate </a> &#183; <a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a> &#183; <a href="tcllib/files/modules/math/optimize.html"> math::optimize </a> &#183; <a href="tcllib/files/modules/math/polynomials.html"> math::polynomials </a> &#183; <a href="tcllib/files/modules/math/rational_funcs.html"> math::rationalfunctions </a> &#183; <a href="tcllib/files/modules/math/special.html"> math::special </a> &#183; <a href="tcllib/files/modules/simulation/annealing.html"> simulation::annealing </a> &#183; <a href="tcllib/files/modules/simulation/montecarlo.html"> simulation::montecarlo </a> &#183; <a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key629"> mathematics </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fourier.html"> math::fourier </a> &#183; <a href="tcllib/files/modules/math/statistics.html"> math::statistics </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key66"> matrices </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key51"> matrix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a> &#183; <a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a> &#183; <a href="tcllib/files/modules/report/report.html"> report </a> &#183; <a href="tcllib/files/modules/struct/matrix.html"> struct::matrix </a> &#183; <a href="tcllib/files/modules/struct/matrix1.html"> struct::matrix_v1 </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key478"> max cut </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key310"> maximum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key498"> maximum flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key380"> md4 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key661"> md5 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key767"> md5crypt </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key233"> medicare </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key239"> mega widget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key727"> membership </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key673"> menu </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key539"> merge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key625"> merge find </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key111"> merging </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key361"> message </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a> &#183; <a href="tcllib/files/modules/log/log.html"> log </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key172"> message catalog </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key799"> message level </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/log.html"> log </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key173"> message package </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key215"> message-digest </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a> &#183; <a href="tcllib/files/modules/otp/otp.html"> otp </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key36"> metakit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key372"> method </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key756"> method reference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key230"> mime </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key461"> minimal spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key309"> minimum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key472"> minimum cost flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key462"> minimum degree spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key500"> minimum diameter spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key792"> mobile phone </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key667"> module </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key748"> montecarlo simulation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/montecarlo.html"> simulation::montecarlo </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key229"> move </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key227"> multi-file </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key694"> multiplexer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/multiplexer/multiplexer.html"> multiplexer </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key289"> multiprecision </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/bignum.html"> math::bignum </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key760"> my method </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c17">Keywords: N</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key29"> name service </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_client.html"> nameserv </a> &#183; <a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a> &#183; <a href="tcllib/files/modules/nns/nns_common.html"> nameserv::common </a> &#183; <a href="tcllib/files/modules/nns/nns_protocol.html"> nameserv::protocol </a> &#183; <a href="tcllib/files/modules/nns/nns_server.html"> nameserv::server </a> &#183; <a href="tcllib/files/apps/nns.html"> nns </a> &#183; <a href="tcllib/files/modules/nns/nns_intro.html"> nns_intro </a> &#183; <a href="tcllib/files/apps/nnsd.html"> nnsd </a> &#183; <a href="tcllib/files/apps/nnslog.html"> nnslog </a> &#183; <a href="tcllib/files/modules/udpcluster/udpcluster.html"> udpcluster </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key86"> namespace unknown </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key85"> namespace utilities </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key72"> narrative </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key231"> National Provider Identifier </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key489"> neighbour </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key295"> net </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key524"> nettool </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nettool/nettool.html"> nettool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key672"> network </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key532"> news </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key576"> next permutation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key407"> nmea </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nmea/nmea.html"> nmea </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key652"> nntp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key655"> nntpclient </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key143"> no-op </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key463"> node </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a> &#183; <a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key583"> nominatim </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key112"> normalization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/stringprep/unicode.html"> unicode </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key234"> NPI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key21"> nroff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key711"> NTLM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/ntlm.html"> SASL::NTLM </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key80"> NTP </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key771"> null </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key772"> number theory </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/numtheory.html"> math::numtheory </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c18">Keywords: O</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key838"> oauth </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key243"> object </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key236"> object oriented </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key650"> observer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key255"> odie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cron/cron.html"> cron </a> &#183; <a href="tcllib/files/modules/nettool/nettool.html"> nettool </a> &#183; <a href="tcllib/files/modules/processman/processman.html"> processman </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key538"> on-idle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key376"> one time pad </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key311"> optimization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a> &#183; <a href="tcllib/files/modules/simulation/annealing.html"> simulation::annealing </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key752"> ordered list </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/prioqueue.html"> struct::prioqueue </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key377"> otp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key575"> outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c19">Keywords: P</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key48"> package </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key664"> package indexing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key191"> page </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_intro.html"> page_intro </a> &#183; <a href="tcllib/files/modules/page/page_pluginmgr.html"> page_pluginmgr </a> &#183; <a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key790"> pager </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key347"> paragraph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key518"> PARAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key404"> parameter entry form </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html"> tepam::argument_dialogbox </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key9"> parser </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a> &#183; <a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a> &#183; <a href="tcllib/files/modules/amazon-s3/xsxp.html"> xsxp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key189"> parser generator </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/apps/page.html"> page </a> &#183; <a href="tcllib/files/modules/page/page_intro.html"> page_intro </a> &#183; <a href="tcllib/files/modules/page/page_pluginmgr.html"> page_pluginmgr </a> &#183; <a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key26"> parsing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpu.html"> grammar::me::cpu </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpucore.html"> grammar::me::cpu::core </a> &#183; <a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_tcl.html"> grammar::me::tcl </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_me/me_vm.html"> grammar::me_vm </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key8"> parsing expression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key14"> parsing expression grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key593"> partial application </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key627"> partition </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key628"> partitioned set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key614"> passive </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key692"> password </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/otp/otp.html"> otp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key662"> patch </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key636"> patching </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key6"> PEG </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key100"> performance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a> &#183; <a href="tcllib/files/modules/profiler/profiler.html"> profiler </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key550"> permutation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key33"> persistence </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key793"> phone </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key806"> pi </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key545"> plain text </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key579"> plane geometry </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key252"> plugin </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key180"> plugin management </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pluginmgr/pluginmgr.html"> pluginmgr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key181"> plugin search </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pluginmgr/pluginmgr.html"> pluginmgr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key704"> png </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/png/png.html"> png </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key581"> point </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key814"> polynomial functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/polynomials.html"> math::polynomials </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key304"> pool </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key445"> pop </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key444"> pop3 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key701"> post-order </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key366"> practcl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/practcl/practcl.html"> practcl </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key698"> pre-order </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key687"> prefix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key773"> prime </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/numtheory.html"> math::numtheory </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key308"> prioqueue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/prioqueue.html"> struct::prioqueue </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key753"> priority queue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/prioqueue.html"> struct::prioqueue </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key592"> proc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key41"> procedure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a> &#183; <a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key832"> procedure documentation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_doc_gen.html"> tepam::doc_gen </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key256"> processman </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/processman/processman.html"> processman </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key679"> producer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key649"> profile </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/profiler/profiler.html"> profiler </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key643"> projection </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mapproj/mapproj.html"> mapproj </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key529"> prospero </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key133"> protocol </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a> &#183; <a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a> &#183; <a href="tcllib/files/modules/nns/nns_protocol.html"> nameserv::protocol </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key830"> proxy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/http/autoproxy.html"> autoproxy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key168"> public key cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pki/pki.html"> pki </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key681"> publisher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key1"> push down automaton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c20">Keywords: Q</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key50"> queue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key604"> quoting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c21">Keywords: R</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key611"> radians </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key619"> radiobutton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key469"> radius </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key590"> random </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key642"> random numbers </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key656"> rational functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/rational_funcs.html"> math::rationalfunctions </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key508"> raw </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key123"> rc4 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key633"> RCS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key632"> RCS patch </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key411"> read </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key525"> reading </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key93"> receiver </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key514"> reconnect </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key307"> record </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/record.html"> struct::record </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key10"> recursive descent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key217"> reduce </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key251"> reference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key47"> reflected channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_core/core.html"> tcl::chan::core </a> &#183; <a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_core/transformcore.html"> tcl::transform::core </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key696"> regex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key324"> regular expression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/textutil_split.html"> textutil::split </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key322"> regular grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key321"> regular languages </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key358"> remote communication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key357"> remote execution </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key228"> remove </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key574"> repeating </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key281"> repetition </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a> &#183; <a href="tcllib/files/modules/textutil/repeat.html"> textutil::repeat </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key107"> report </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/report/report.html"> report </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key567"> reshuffle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key466"> residual graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key601"> resolver </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key159"> resource management </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key513"> restore </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key187"> return </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_throw.html"> throw </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key555"> reverse </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key332"> rfc 821 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key333"> rfc 822 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key79"> rfc 868 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key293"> rfc 959 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key654"> rfc 977 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key603"> rfc 1034 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key598"> rfc 1035 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key653"> rfc 1036 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key379"> rfc 1320 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key381"> rfc 1321 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key432"> rfc 1413 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ident/ident.html"> ident </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key600"> rfc 1886 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key443"> rfc 1939 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key77"> rfc 2030 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key812"> rfc 2045 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key813"> rfc 2046 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key811"> rfc 2049 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key214"> rfc 2104 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key578"> rfc 2141 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key129"> rfc 2251 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key535"> rfc 2255 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key691"> rfc 2289 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/otp/otp.html"> otp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key537"> rfc 2396 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key336"> rfc 2554 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key836"> RFC 2718 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key329"> rfc 2821 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key502"> rfc 2849 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key334"> rfc 3207 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key452"> rfc 3513 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key132"> rfc 4511 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key837"> RFC 5849 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key447"> rfc 6455 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key804"> rfc3501 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key341"> rfc3548 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base32/base32.html"> base32 </a> &#183; <a href="tcllib/files/modules/base32/base32hex.html"> base32::hex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key556"> right outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key378"> RIPEMD </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key350"> roman numeral </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/roman.html"> math::roman </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key786"> roots </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key400"> rot </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key399"> rot13 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key392"> rounding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fuzzy.html"> math::fuzzy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key509"> rows </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key354"> rpc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key167"> rsa </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pki/pki.html"> pki </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key431"> running </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c22">Keywords: S</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key521"> s3 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/S3.html"> S3 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key396"> SASL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/sasl.html"> SASL </a> &#183; <a href="tcllib/files/modules/sasl/ntlm.html"> SASL::NTLM </a> &#183; <a href="tcllib/files/modules/sasl/scram.html"> SASL::SCRAM </a> &#183; <a href="tcllib/files/modules/sasl/gtoken.html"> SASL::XGoogleToken </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key220"> scanl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key631"> SCCS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key768"> SCRAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/scram.html"> SASL::SCRAM </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key356"> secure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key122"> security </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a> &#183; <a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a> &#183; <a href="tcllib/files/modules/otp/otp.html"> otp </a> &#183; <a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key833"> seed </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key739"> selectionbox </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/javascript/javascript.html"> javascript </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key136"> semantic markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools/doctools_intro.html"> doctools_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key353"> send </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key109"> serialization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key65"> server </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/nns/nns_common.html"> nameserv::common </a> &#183; <a href="tcllib/files/modules/nns/nns_server.html"> nameserv::server </a> &#183; <a href="tcllib/files/modules/nns/nns_intro.html"> nns_intro </a> &#183; <a href="tcllib/files/apps/nnsd.html"> nnsd </a> &#183; <a href="tcllib/files/modules/udpcluster/udpcluster.html"> udpcluster </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key90"> service </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/logger.html"> logger </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key605"> services </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key301"> set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key441"> sha1 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key212"> sha256 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key742"> shell </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key477"> shortest path </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key570"> shuffle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key319"> simulated annealing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/annealing.html"> simulation::annealing </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key641"> simulation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key759"> singleton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key724"> size limit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key306"> skiplist </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/skiplist.html"> struct::skiplist </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key199"> slippy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key337"> smtp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key671"> smtpd </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key798"> Snit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key373"> snit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key78"> SNTP </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key352"> socket </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key284"> soundex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key436"> source </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key520"> spacing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key835"> spatial interpolation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/interpolate.html"> math::interpolate </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key684"> special functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/special.html"> math::special </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key660"> specification </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key648"> speed </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/profiler/profiler.html"> profiler </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key440"> split </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_split.html"> textutil::split </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key493"> squared graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key359"> ssl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key303"> stack </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key827"> standard io </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key2"> state </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key84"> state (de)serialization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key640"> statistical distribution </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key195"> statistics </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a> &#183; <a href="tcllib/files/modules/math/math.html"> math </a> &#183; <a href="tcllib/files/modules/math/statistics.html"> math::statistics </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key828"> stdin </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key829"> stdout </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key747"> stochastic modelling </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/montecarlo.html"> simulation::montecarlo </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key126"> stream cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key651"> stream copy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key280"> string </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a> &#183; <a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a> &#183; <a href="tcllib/files/modules/textutil/expander.html"> textutil::expander </a> &#183; <a href="tcllib/files/modules/textutil/repeat.html"> textutil::repeat </a> &#183; <a href="tcllib/files/modules/textutil/textutil_split.html"> textutil::split </a> &#183; <a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a> &#183; <a href="tcllib/files/modules/textutil/tabify.html"> textutil::tabify </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key646"> stringprep </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/stringprep/stringprep.html"> stringprep </a> &#183; <a href="tcllib/files/modules/stringprep/stringprep_data.html"> stringprep::data </a> &#183; <a href="tcllib/files/modules/stringprep/unicode_data.html"> unicode::data </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key455"> strongly connected component </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key327"> struct </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a> &#183; <a href="tcllib/files/modules/struct/record.html"> struct::record </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key142"> structure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key822"> structured queries </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key405"> style </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key762"> subcommand </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key480"> subgraph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key678"> subject </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key738"> submitbutton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/javascript/javascript.html"> javascript </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key677"> subscriber </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key565"> subsequence </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key273"> subst </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key585"> sum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key562"> swapping </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key726"> symmetric difference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key645"> synchronous </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key745"> syntax tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_util.html"> grammar::me::util </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c23">Keywords: T</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key106"> table </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/report/report.html"> report </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key157"> table of contents </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key544"> tabstops </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/tabify.html"> textutil::tabify </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key715"> tallying </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key735"> tape archive </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tar/tar.html"> tar </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key737"> tar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tar/tar.html"> tar </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key288"> tcl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/bignum.html"> math::bignum </a> &#183; <a href="tcllib/files/modules/math/decimal.html"> math::decimal </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key663"> Tcl module </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key274"> Tcl syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key245"> tcler's wiki </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key52"> tcllib </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key757"> TclOO </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a> &#183; <a href="tcllib/files/modules/tool/tool.html"> tool </a> &#183; <a href="tcllib/files/modules/tool/tool_dict_ensemble.html"> tool::dict_ensemble </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key108"> TCLPARAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key7"> TDPL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key315"> temp file </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key781"> template processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/expander.html"> textutil::expander </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key92"> terminal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/term.html"> term </a> &#183; <a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a> &#183; <a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a> &#183; <a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a> &#183; <a href="tcllib/files/modules/term/ansi_send.html"> term::ansi::send </a> &#183; <a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a> &#183; <a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a> &#183; <a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a> &#183; <a href="tcllib/files/modules/term/term_send.html"> term::send </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key313"> test </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key58"> Testing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key99"> testing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key345"> TeX </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key248"> text </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key283"> text comparison </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key638"> text conversion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key637"> text differences </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key789"> text display </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a> &#183; <a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key782"> text expansion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/expander.html"> textutil::expander </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key286"> text likeness </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key192"> text processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a> &#183; <a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/apps/page.html"> page </a> &#183; <a href="tcllib/files/modules/page/page_intro.html"> page_intro </a> &#183; <a href="tcllib/files/modules/page/page_pluginmgr.html"> page_pluginmgr </a> &#183; <a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key208"> text widget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key410"> threads </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key188"> throw </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_throw.html"> throw </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key151"> thumbnail </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key35"> tie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key120"> tif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tiff/tiff.html"> tiff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key119"> tiff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tiff/tiff.html"> tiff </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key386"> tile </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key81"> time </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key703"> timestamp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/png/png.html"> png </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key75"> timestamps </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key45"> tip 219 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_core/core.html"> tcl::chan::core </a> &#183; <a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/virtchannel_core/transformcore.html"> tcl::transform::core </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key278"> tip 230 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key548"> tip 234 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key586"> tip 317 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key209"> Tk </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key331"> tls </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key19"> TMML </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key156"> toc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key720"> toc formatter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key695"> tokenization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key776"> TOOL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/tool.html"> tool </a> &#183; <a href="tcllib/files/modules/tool/tool_dict_ensemble.html"> tool::dict_ensemble </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key13"> top-down parsing languages </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key391"> torrent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key317"> touch </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key25"> TPDL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key74"> trace </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key12"> transducer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key62"> transfer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/copyops.html"> transfer::copy </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a> &#183; <a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key279"> transformation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key718"> transmitter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key459"> travelling salesman </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key722"> traversal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/traverse.html"> fileutil_traverse </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key300"> tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_util.html"> grammar::me::util </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a> &#183; <a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a> &#183; <a href="tcllib/files/modules/struct/struct_tree1.html"> struct::tree_v1 </a> &#183; <a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key820"> tree query language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key190"> tree walking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key818"> TreeQL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key429"> trimming </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key839"> twitter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key117"> type </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a> &#183; <a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a> &#183; <a href="tcllib/files/modules/snit/snit.html"> snit </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key57"> Type checking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c24">Keywords: U</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key682"> uevent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key712"> unbind </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key686"> uncapitalize </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key342"> undenting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key647"> unicode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/stringprep/stringprep.html"> stringprep </a> &#183; <a href="tcllib/files/modules/stringprep/stringprep_data.html"> stringprep::data </a> &#183; <a href="tcllib/files/modules/stringprep/unicode.html"> unicode </a> &#183; <a href="tcllib/files/modules/stringprep/unicode_data.html"> unicode::data </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key624"> union </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a> &#183; <a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key609"> unit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key88"> unknown hooking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key32"> untie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key417"> update </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key528"> uri </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a> &#183; <a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key246"> url </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a> &#183; <a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key577"> urn </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key232"> US-NPI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key82"> utilities </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key253"> uuencode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/uuencode.html"> uuencode </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key211"> UUID </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uuid/uuid.html"> uuid </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c25">Keywords: V</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key60"> Validation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key56"> Value checking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key70"> vectors </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key749"> verhoeff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key464"> vertex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key497"> vertex cover </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key44"> virtual channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_core/core.html"> tcl::chan::core </a> &#183; <a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_core/transformcore.html"> tcl::transform::core </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key24"> virtual machine </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_cpu.html"> grammar::me::cpu </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpucore.html"> grammar::me::cpu::core </a> &#183; <a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_tcl.html"> grammar::me::tcl </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_me/me_vm.html"> grammar::me_vm </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key709"> VISA </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key418"> vwait </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c26">Keywords: W</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key530"> wais </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key235"> widget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key238"> widget adaptors </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key183"> wiki </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key272"> word </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a> &#183; <a href="tcllib/files/modules/wip/wip.html"> wip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key536"> www </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c27">Keywords: X</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key423"> x.208 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key424"> x.209 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key134"> x.500 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key395"> XGoogleToken </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/gtoken.html"> SASL::XGoogleToken </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key755"> xml </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/xsxp.html"> xsxp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key374"> xor </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key817"> XPath </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key821"> XSLT </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c28">Keywords: Y</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key589"> yaml </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key706"> ydecode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key708"> yEnc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key707"> yencode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c29">Keywords: Z</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key113"> zero </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key42"> zip </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/zip/decode.html"> zipfile::decode </a> &#183; <a href="tcllib/files/modules/zip/encode.html"> zipfile::encode </a> &#183; <a href="tcllib/files/modules/zip/mkzip.html"> zipfile::mkzip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key547"> zlib </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key198"> zoom </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
</table>

Added embedded/www/tcllib/files/apps/dtplite.html.























































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427

<div class='fossil-doc' data-title='dtplite - Documentation toolbox'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dtplite(n) 1.0.5 tcllib &quot;Documentation toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dtplite - Lightweight DocTools Markup Processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">USE CASES</a></li>
<li class="doctools_subsection"><a href="#subsection2">COMMAND LINE</a></li>
<li class="doctools_subsection"><a href="#subsection3">OPTIONS</a></li>
<li class="doctools_subsection"><a href="#subsection4">FORMATS</a></li>
<li class="doctools_subsection"><a href="#subsection5">DIRECTORY STRUCTURES</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputfile</i></a></li>
<li><a href="#2"><b class="cmd">dtplite</b> <b class="const">validate</b> <i class="arg">inputfile</i></a></li>
<li><a href="#3"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></li>
<li><a href="#4"><b class="cmd">dtplite</b> <b class="option">-merge</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The application described by this document, <b class="syscmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b>, is the
successor to the extremely simple <b class="syscmd"><a href="../modules/doctools/mpexpand.html">mpexpand</a></b>. Influenced in its
functionality by the <b class="syscmd">dtp</b> doctools processor it is much more
powerful than <b class="syscmd"><a href="../modules/doctools/mpexpand.html">mpexpand</a></b>, yet still as easy to use; definitely
easier than <b class="syscmd">dtp</b> with its myriad of subcommands and options.</p>
<p><b class="syscmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> is based upon the package <b class="package"><a href="../modules/doctools/doctools.html">doctools</a></b>, like
the other two processors.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> was written with the following three use cases in
mind.</p>
<ol class="doctools_enumerated">
<li><p>Validation of a single document, i.e. checking that it was written in
valid doctools format. This mode can also be used to get a preliminary
version of the formatted output for a single document, for display in
a browser, nroff, etc., allowing proofreading of the formatting.</p></li>
<li><p>Generation of the formatted documentation for a single package,
i.e. all the manpages, plus a table of contents and an index of
keywords.</p></li>
<li><p>An extension of the previous mode of operation, a method for the easy
generation of one documentation tree for several packages, and
especially of a unified table of contents and keyword index.</p></li>
</ol>
<p>Beyond the above we also want to make use of the customization
features provided by the HTML formatter. It is not the only format the
application should be able to generate, but we anticipiate it to be
the most commonly used, and it is one of the few which do provide
customization hooks.</p>
<p>We allow the caller to specify a header string, footer string, a
stylesheet, and data for a bar of navigation links at the top of the
generated document.
While all can be set as long as the formatting engine provides an
appropriate engine parameter (See section <span class="sectref"><a href="#subsection3">OPTIONS</a></span>) the last
two have internal processing which make them specific to HTML.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">COMMAND LINE</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputfile</i></a></dt>
<dd><p>This is the form for use case [1]. The <i class="arg">options</i> will be
explained later, in section <span class="sectref"><a href="#subsection3">OPTIONS</a></span>.</p>
<dl class="doctools_arguments">
<dt>path <i class="arg">output</i> (in)</dt>
<dd><p>This argument specifies where to write the generated document. It can
be the path to a file or directory, or <b class="const">-</b>.
The last value causes the application to write the generated
documented to <b class="const">stdout</b>.</p>
<p>If the <i class="arg">output</i> does not exist then [file dirname $output]
has to exist and must be a writable directory.
The generated document will be written to a file in that directory,
and the name of that file will be derived from the <i class="arg">inputfile</i>,
the <i class="arg">format</i>, and the value given to option <b class="option">-ext</b> (if
present).</p></dd>
<dt>(path|handle) <i class="arg">format</i> (in)</dt>
<dd><p>This argument specifies the formatting engine to use when processing
the input, and thus the format of the generated document. See section
<span class="sectref"><a href="#subsection4">FORMATS</a></span> for the possibilities recognized by the application.</p></dd>
<dt>path <i class="arg">inputfile</i> (in)</dt>
<dd><p>This argument specifies the path to the file to process. It has to
exist, must be readable, and written in <i class="term"><a href="../../../index.html#key179">doctools</a></i> format.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> <b class="const">validate</b> <i class="arg">inputfile</i></a></dt>
<dd><p>This is a simpler form for use case [1]. The &quot;validate&quot; format
generates no output at all, only syntax checks are performed. As such
the specification of an output file or other options is not necessary
and left out.</p></dd>
<dt><a name="3"><b class="cmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [2]. It differs from the form for
use case [1] by having the input documents specified through a
directory instead of a file. The other arguments are identical, except
for <i class="arg">output</i>, which now has to be the path to an existing and
writable directory.</p>
<p>The input documents are all files in <i class="arg">inputdirectory</i> or any of
its subdirectories which were recognized by <b class="cmd">fileutil::fileType</b>
as containing text in <i class="term"><a href="../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="4"><b class="cmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> <b class="option">-merge</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [3]. The only difference to the
form for use case [2] is the additional option <b class="option">-merge</b>.</p>
<p>Each such call will merge the generated documents coming from
processing the input documents under <i class="arg">inputdirectory</i> or any of
its subdirectories to the files under <i class="arg">output</i>. In this manner it
is possible to incrementally build the unified documentation for any
number of packages. Note that it is necessary to run through all the
packages twice to get fully correct cross-references (for formats
supporting them).</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OPTIONS</a></h3>
<p>This section describes all the options available to the user of the
application, with
the exception of the options <b class="option">-o</b> and <b class="option">-merge</b>. These
two were described already, in section <span class="sectref"><a href="#subsection2">COMMAND LINE</a></span>.</p>
<dl class="doctools_options">
<dt><b class="option">-exclude</b> string</dt>
<dd><p>This option specifies an exclude (glob) pattern. Any files identified
as manpages to process which match the exclude pattern are
ignored. The option can be provided multiple times, each usage adding
an additional pattern to the list of exclusions.</p></dd>
<dt><b class="option">-ext</b> string</dt>
<dd><p>If the name of an output file has to be derived from the name of an
input file it will use the name of the <i class="arg">format</i> as the extension
by default. This option here will override this however, forcing it to
use <i class="arg">string</i> as the file extension. This option is ignored if the
name of the output file is fully specified through option <b class="option">-o</b>.</p>
<p>When used multiple times only the last definition is relevant.</p></dd>
<dt><b class="option">-header</b> file</dt>
<dd><p>This option can be used if and only if the selected <i class="arg">format</i>
provides an engine parameter named &quot;header&quot;. It takes the contents of
the specified file and assign them to that parameter, for whatever use
by the engine. The HTML engine will insert the text just after the tag
<b class="const">&lt;body&gt;</b>.
If navigation buttons are present (see option <b class="option">-nav</b> below),
then the HTML generated for them is appended to the header data
originating here before the final assignment to the parameter.</p>
<p>When used multiple times only the last definition is relevant.</p></dd>
<dt><b class="option">-footer</b> file</dt>
<dd><p>Like <b class="option">-header</b>, except that: Any navigation buttons are ignored,
the corresponding required engine parameter is named &quot;footer&quot;, and the
data is inserted just before the tag <b class="const">&lt;/body&gt;</b>.</p>
<p>When used multiple times only the last definition is relevant.</p></dd>
<dt><b class="option">-style</b> file</dt>
<dd><p>This option can be used if and only if the selected <i class="arg">format</i>
provides an engine parameter named &quot;meta&quot;. When specified it will
generate a piece of HTML code declaring the <i class="arg">file</i> as the
stylesheet for the generated document and assign that to the
parameter. The HTML engine will insert this inot the document, just
after the tag <b class="const">&lt;head&gt;</b>.</p>
<p>When processing an input directory the stylesheet file is copied into
the output directory and the generated HTML will refer to the copy, to
make the result more self-contained. When processing an input file we
have no location to copy the stylesheet to and so just reference it as
specified.</p>
<p>When used multiple times only the last definition is relevant.</p></dd>
<dt><b class="option">-toc</b> path</dt>
<dd><p>This option specifies a doctoc file to use for the table of contents
instead of generating our own.</p>
<p>When used multiple times only the last definition is relevant.</p></dd>
<dt><b class="option">-pre+toc</b> label path|text</dt>
<dd></dd>
<dt><b class="option">-post+toc</b> label path|text</dt>
<dd><p>This option specifies additional doctoc files (or texts) to use in
the navigation bar.</p>
<p>Positioning and handling of multiple uses is like for options
<b class="option">-prenav</b> and <b class="option">-postnav</b>, see below.</p></dd>
<dt><b class="option">-nav</b> label url</dt>
<dd></dd>
<dt><b class="option">-prenav</b> label url</dt>
<dd><p>Use this option to specify a navigation button with <i class="arg">label</i> to
display and the <i class="arg">url</i> to link to. This option can be used if and
only if the selected <i class="arg">format</i> provides an engine parameter named
&quot;header&quot;. The HTML generated for this is appended to whatever data we
got from option <b class="option">-header</b> before it is inserted into the
generated documents.</p>
<p>When used multiple times all definitions are collected and a
navigation bar is created, with the first definition shown at the left
edge and the last definition to the right.</p>
<p>The url can be relative. In that case it is assumed to be relative
to the main files (TOC and Keyword index), and will be transformed for
all others to still link properly.</p></dd>
<dt><b class="option">-postnav</b> label url</dt>
<dd><p>Use this option to specify a navigation button with <i class="arg">label</i> to
display and the <i class="arg">url</i> to link to. This option can be used if and
only if the selected <i class="arg">format</i> provides an engine parameter named
&quot;header&quot;. The HTML generated for this is appended to whatever data we
got from option <b class="option">-header</b> before it is inserted into the
generated documents.</p>
<p>When used multiple times all definitions are collected and a
navigation bar is created, with the last definition shown at the right
edge and the first definition to the left.</p>
<p>The url can be relative. In that case it is assumed to be relative
to the main files (TOC and Keyword index), and will be transformed for
all others to still link properly.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">FORMATS</a></h3>
<p>At first the <i class="arg">format</i> argument will be treated as a path to a tcl
file containing the code for the requested formatting engine. The
argument will be treated as the name of one of the predefined formats
listed below if and only if the path does not exist.</p>
<p><em>Note a limitation</em>: If treating the format as path to the tcl
script implementing the engine was sucessful, then this script has to
implement not only the engine API for doctools, i.e.
<i class="term">doctools_api</i>, but for <i class="term">doctoc_api</i> and <i class="term">docidx_api</i>
as well. Otherwise the generation of a table of contents and of a
keyword index will fail.</p>
<p>List of predefined formats, i.e. as provided by the
package <b class="package"><a href="../modules/doctools/doctools.html">doctools</a></b>:</p>
<dl class="doctools_definitions">
<dt><b class="const">nroff</b></dt>
<dd><p>The processor generates *roff output, the standard format for unix
manpages.</p></dd>
<dt><b class="const">html</b></dt>
<dd><p>The processor generates HTML output, for usage in and display by web
browsers. This engine is currently the only one providing the various
engine parameters required for the additional customaization of the
output.</p></dd>
<dt><b class="const">tmml</b></dt>
<dd><p>The processor generates TMML output, the Tcl Manpage Markup Language,
a derivative of XML.</p></dd>
<dt><b class="const">latex</b></dt>
<dd><p>The processor generates LaTeX output.</p></dd>
<dt><b class="const">wiki</b></dt>
<dd><p>The processor generates Wiki markup as understood by <b class="syscmd">wikit</b>.</p></dd>
<dt><b class="const">list</b></dt>
<dd><p>The processor extracts the information provided by <b class="cmd">manpage_begin</b>.
This format is used internally to extract the meta data from which
both table of contents and keyword index are derived from.</p></dd>
<dt><b class="const">null</b></dt>
<dd><p>The processor does not generate any output. This is equivalent to
<b class="const">validate</b>.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">DIRECTORY STRUCTURES</a></h3>
<p>In this section we describe the directory structures generated by the
application under <i class="arg">output</i> when processing all documents in an
<i class="arg">inputdirectory</i>. In other words, this is only relevant to the use
cases [2] and [3].</p>
<dl class="doctools_definitions">
<dt>[2]</dt>
<dd><p>The following directory structure is created when processing a single
set of input documents.  The file extension used is for output in
HTML, but that is not relevant to the structure and was just used to
have proper file names.</p>
<pre class="doctools_example">
    output/
        toc.html
        index.html
        files/
            path/to/FOO.html
</pre>
<p>The last line in the example shows the document
generated for a file FOO located at</p>
<pre class="doctools_example">
    inputdirectory/path/to/FOO
</pre>
</dd>
<dt>[3]</dt>
<dd><p>When merging many packages into a unified set of documents the
generated directory structure is a bit deeper:</p>
<pre class="doctools_example">
    output
        .toc
        .idx
        .tocdoc
        .idxdoc
        .xrf
        toc.html
        index.html
        FOO1/
            ...
        FOO2/
            toc.html
            files/
                path/to/BAR.html
</pre>
<p>Each of the directories FOO1, ... contains the documents generated for
the package FOO1, ... and follows the structure shown for use case
[2]. The only exception is that there is no per-package index.</p>
<p>The files &quot;<b class="file">.toc</b>&quot;, &quot;<b class="file">.idx</b>&quot;, and &quot;<b class="file">.xrf</b>&quot; contain the
internal status of the whole output and will be read and updated by
the next invokation. Their contents will not be documented. Remove
these files when all packages wanted for the output have been
processed, i.e. when the output is complete.</p>
<p>The files &quot;<b class="file">.tocdoc</b>&quot;, and &quot;<b class="file">.idxdoc</b>&quot;, are intermediate files
in doctoc and docidx markup, respectively, containing the main table
of contents and keyword index for the set of documents before their
conversion to the chosen output format.
They are left in place, i.e. not deleted, to serve as demonstrations
of doctoc and docidx markup.</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/doctools/docidx_intro.html">docidx introduction</a>, <a href="../modules/doctools/doctoc_intro.html">doctoc introduction</a>, <a href="../modules/doctools/doctools_intro.html">doctools introduction</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key18">HTML</a>, <a href="../../../index.html#key19">TMML</a>, <a href="../../../index.html#key20">conversion</a>, <a href="../../../index.html#key178">docidx</a>, <a href="../../../index.html#key258">doctoc</a>, <a href="../../../index.html#key179">doctools</a>, <a href="../../../index.html#key17">manpage</a>, <a href="../../../index.html#key16">markup</a>, <a href="../../../index.html#key21">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/apps/nns.html.











































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229

<div class='fossil-doc' data-title='nns - Name service facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nns(n) 1.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nns - Name service facility, Commandline Client Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">USE CASES</a></li>
<li class="doctools_subsection"><a href="#subsection2">COMMAND LINE</a></li>
<li class="doctools_subsection"><a href="#subsection3">OPTIONS</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">nns</b> <b class="method">bind</b> <span class="opt">?<b class="option">-host</b> <i class="arg">host</i>?</span> <span class="opt">?<b class="option">-port</b> <i class="arg">port</i>?</span> <i class="arg">name</i> <i class="arg">data</i></a></li>
<li><a href="#2"><b class="cmd">nns</b> <b class="method">search</b> <span class="opt">?<b class="option">-host</b> <i class="arg">host</i>?</span> <span class="opt">?<b class="option">-port</b> <i class="arg">port</i>?</span> <span class="opt">?<b class="option">-continuous</b>?</span> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#3"><b class="cmd">nns</b> <b class="method">ident</b> <span class="opt">?<b class="option">-host</b> <i class="arg">host</i>?</span> <span class="opt">?<b class="option">-port</b> <i class="arg">port</i>?</span></a></li>
<li><a href="#4"><b class="cmd">nns</b> <b class="method">who</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Please read <i class="term"><a href="../modules/nns/nns_intro.html">Name service facility, introduction</a></i> first.</p>
<p>The application described by this document, <b class="syscmd">nns</b>, is a simple
command line client for the nano name service facility provided by the
Tcllib packages <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>, and <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.
Beyond that the application's sources also serve as an example of how
to use the client package <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>. All abilities of a
client are covered, from configuration to registration of names to
searching.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../index.html#key599">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../modules/dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">nns</b> was written with the following two main use cases in
mind.</p>
<ol class="doctools_enumerated">
<li><p>Registration of a name/data pair in the name service.</p></li>
<li><p>Searching the name service for entries matching a glob pattern.</p></li>
</ol>
<p>Beyond the above we also want to be able to identify the client, and
get information about the name service.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">COMMAND LINE</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">nns</b> <b class="method">bind</b> <span class="opt">?<b class="option">-host</b> <i class="arg">host</i>?</span> <span class="opt">?<b class="option">-port</b> <i class="arg">port</i>?</span> <i class="arg">name</i> <i class="arg">data</i></a></dt>
<dd><p>This form registers the <i class="arg">name</i>/<i class="arg">data</i> pair in the specified
name service. In this form the command will <em>not</em> exit to keep
the registration alive. The user has to kill it explicitly, either by
sending a signal, or through the job-control facilities of the shell
in use. It will especially survive the loss of the connection to the
name service and reestablish the <i class="arg">name</i>/<i class="arg">data</i> pair when the
connection is restored.</p>
<p>The options to specify the name service will be explained later, in
section <span class="sectref"><a href="#subsection3">OPTIONS</a></span>.</p></dd>
<dt><a name="2"><b class="cmd">nns</b> <b class="method">search</b> <span class="opt">?<b class="option">-host</b> <i class="arg">host</i>?</span> <span class="opt">?<b class="option">-port</b> <i class="arg">port</i>?</span> <span class="opt">?<b class="option">-continuous</b>?</span> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This form searches the specified name service for entries matching the
glob-<i class="arg">pattern</i> and prints them to stdout, with each entry on its
own line. If no pattern is specified it defaults to <b class="const">*</b>,
matching everything.</p>
<p>The options to specify the name service will be explained later, in
section <span class="sectref"><a href="#subsection3">OPTIONS</a></span>.</p>
<p>If the option <b class="option">-continuous</b> is specified the client will not
exit after performing the search, but start to continuously monitor
the service for changes to the set of matching entries, appropriately
updating the display as changes arrive. In that form it will
especially also survive the loss of the connection to the name service
and reestablish the search when the connection is restored.</p></dd>
<dt><a name="3"><b class="cmd">nns</b> <b class="method">ident</b> <span class="opt">?<b class="option">-host</b> <i class="arg">host</i>?</span> <span class="opt">?<b class="option">-port</b> <i class="arg">port</i>?</span></a></dt>
<dd><p>This form asks the specified name service for the version and features
of the name service protocol it supports and prints the results to
stdout.</p>
<p>The options to specify the name service will be explained later, in
section <span class="sectref"><a href="#subsection3">OPTIONS</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">nns</b> <b class="method">who</b></a></dt>
<dd><p>This form prints name, version, and protocol version of the
application to stdout.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OPTIONS</a></h3>
<p>This section describes all the options available to the user of the
application</p>
<dl class="doctools_options">
<dt><b class="option">-host</b> name|ipaddress</dt>
<dd><p>If this option is not specified it defaults to <b class="const">localhost</b>. It
specifies the name or ip-address of the host the name service to talk
to is running on.</p></dd>
<dt><b class="option">-port</b> number</dt>
<dd><p>If this option is not specified it defaults to <b class="const">38573</b>. It
specifies the TCP port the name service to talk to is listening on for
requests.</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/nns/nns_client.html">nameserv(n)</a>, <a href="../modules/nns/nns_common.html">nameserv::common(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key28">application</a>, <a href="../../../index.html#key30">client</a>, <a href="../../../index.html#key29">name service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/apps/nnsd.html.











































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

<div class='fossil-doc' data-title='nnsd - Name service facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nnsd(n) 1.0.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nnsd - Name service facility, Commandline Server Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">USE CASES</a></li>
<li class="doctools_subsection"><a href="#subsection2">COMMAND LINE</a></li>
<li class="doctools_subsection"><a href="#subsection3">OPTIONS</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">nnsd</b> <span class="opt">?<b class="option">-localonly</b> <i class="arg">flag</i>?</span> <span class="opt">?<b class="option">-port</b> <i class="arg">port</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Please read <i class="term"><a href="../modules/nns/nns_intro.html">Name service facility, introduction</a></i> first.</p>
<p>The application described by this document, <b class="syscmd"><a href="nns.html">nns</a></b>, is a simple
command line server for the nano name service facility provided by the
Tcllib packages <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>, and <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.
Beyond that the application's sources also serve as an example of how
to use the server package <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../index.html#key599">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../modules/dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">nnsd</b> was written with the following main use case in
mind.</p>
<ol class="doctools_enumerated">
<li><p>Run a nano name service on some host.</p></li>
</ol>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">COMMAND LINE</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">nnsd</b> <span class="opt">?<b class="option">-localonly</b> <i class="arg">flag</i>?</span> <span class="opt">?<b class="option">-port</b> <i class="arg">port</i>?</span></a></dt>
<dd><p>The command configures a server per the specified options and starts
it. The command will not exit on its own, as it keeps the name service
database wholly in memory. The user has to kill it explicitly, either
by sending a a signal, or through the job-control facilities of the
shell in use.</p>
<p>The options to configure the name service are explained in section
<span class="sectref"><a href="#subsection3">OPTIONS</a></span>.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OPTIONS</a></h3>
<p>This section describes all the options available to the user of the
application</p>
<dl class="doctools_options">
<dt><b class="option">-localonly</b> bool</dt>
<dd><p>If this option is not specified it defaults to <b class="const">true</b>, i.e.
acceptance of only local connections. The server will accept remote
connections, i.e. connections from other hosts, if and only if this
option is configured to <b class="const">false</b>.</p></dd>
<dt><b class="option">-port</b> number</dt>
<dd><p>If this option is not specified it defaults to <b class="const">38573</b>. It
specifies the TCP port the server has to listen on for requests.</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/nns/nns_common.html">nameserv::common(n)</a>, <a href="../modules/nns/nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key28">application</a>, <a href="../../../index.html#key29">name service</a>, <a href="../../../index.html#key65">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/apps/nnslog.html.

















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200

<div class='fossil-doc' data-title='nnslog - Name service facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nnslog(n) 1.0 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nnslog - Name service facility, Commandline Logging Client Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">USE CASES</a></li>
<li class="doctools_subsection"><a href="#subsection2">COMMAND LINE</a></li>
<li class="doctools_subsection"><a href="#subsection3">OPTIONS</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">nnslog</b> <span class="opt">?<b class="option">-host</b> <i class="arg">host</i>?</span> <span class="opt">?<b class="option">-port</b> <i class="arg">port</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Please read <i class="term"><a href="../modules/nns/nns_intro.html">Name service facility, introduction</a></i> first.</p>
<p>The application described by this document, <b class="syscmd">nnslog</b>, is a
simple command line client for the nano name service facility provided
by the Tcllib packages <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>, and <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.</p>
<p>It essentially implements &quot;<b class="syscmd"><a href="nns.html">nns</a></b> search -continuous *&quot;, but
uses a different output formatting. Instead of continuously showing
the current contents of the server in the terminal it simply logs all
received add/remove events to <b class="const">stdout</b>.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../index.html#key599">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../modules/dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">nnslog</b> was written with the following main use case in mind.</p>
<ol class="doctools_enumerated">
<li><p>Monitoring the name service for all changes and logging them in a text
terminal.</p></li>
</ol>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">COMMAND LINE</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">nnslog</b> <span class="opt">?<b class="option">-host</b> <i class="arg">host</i>?</span> <span class="opt">?<b class="option">-port</b> <i class="arg">port</i>?</span></a></dt>
<dd><p>The command connects to the specified name service, sets up a search
for all changes and then prints all received events to stdout, with
each events on its own line. The command will not exit until it is
explicitly terminated by the user. It will especially survive the loss
of the connection to the name service and reestablish the search and
log when the connection is restored.</p>
<p>The options to specify the name service will be explained later, in
section <span class="sectref"><a href="#subsection3">OPTIONS</a></span>.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OPTIONS</a></h3>
<p>This section describes all the options available to the user of the
application</p>
<dl class="doctools_options">
<dt><b class="option">-host</b> name|ipaddress</dt>
<dd><p>If this option is not specified it defaults to <b class="const">localhost</b>. It
specifies the name or ip-address of the host the name service to talk
to is running on.</p></dd>
<dt><b class="option">-port</b> number</dt>
<dd><p>If this option is not specified it defaults to <b class="const">38573</b>. It
specifies the TCP port the name service to talk to is listening on for
requests.</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/nns/nns_client.html">nameserv(n)</a>, <a href="../modules/nns/nns_common.html">nameserv::common(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key28">application</a>, <a href="../../../index.html#key30">client</a>, <a href="../../../index.html#key29">name service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/apps/page.html.







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467

<div class='fossil-doc' data-title='page - Development Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page(n) 1.0 tcllib &quot;Development Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page - Parser Generator</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">COMMAND LINE</a></li>
<li class="doctools_subsection"><a href="#subsection2">OPERATION</a></li>
<li class="doctools_subsection"><a href="#subsection3">OPTIONS</a></li>
<li class="doctools_subsection"><a href="#subsection4">PLUGINS</a></li>
<li class="doctools_subsection"><a href="#subsection5">PLUGIN LOCATIONS</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">page</b> <span class="opt">?<i class="arg">options</i>...?</span> <span class="opt">?<i class="arg">input</i> <span class="opt">?<i class="arg">output</i>?</span>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The application described by this document, <b class="syscmd">page</b>, is actually
not just a parser generator, as the name implies, but a generic tool
for the execution of arbitrary transformations on texts.</p>
<p>Its genericity comes through the use of <i class="term">plugins</i> for reading,
transforming, and writing data, and the predefined set of plugins
provided by Tcllib is for the generation of memoizing recursive
descent parsers (aka <i class="term">packrat parsers</i>) from grammar
specifications (<i class="term">Parsing Expression Grammars</i>).</p>
<p><b class="syscmd">page</b> is written on top of the package
<b class="package">page::pluginmgr</b>, wrapping its functionality into a command
line based application. All the other <b class="package">page::*</b> packages are
plugin and/or supporting packages for the generation of parsers. The
parsers themselves are based on the packages <b class="package"><a href="../modules/grammar_peg/peg.html">grammar::peg</a></b>,
<b class="package"><a href="../modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></b>, and <b class="package">grammar::mengine</b>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">COMMAND LINE</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">page</b> <span class="opt">?<i class="arg">options</i>...?</span> <span class="opt">?<i class="arg">input</i> <span class="opt">?<i class="arg">output</i>?</span>?</span></a></dt>
<dd><p>This is general form for calling <b class="syscmd">page</b>. The application will
read the contents of the file <i class="arg">input</i>, process them under the
control of the specified <i class="arg">options</i>, and then write the result to
the file <i class="arg">output</i>.</p>
<p>If <i class="arg">input</i> is the string <b class="const">-</b> the data to process will be
read from <b class="const">stdin</b> instead of a file. Analogously the result will
be written to <b class="const">stdout</b> instead of a file if <i class="arg">output</i> is the
string <b class="const">-</b>. A missing output or input specification causes the
application to assume <b class="const">-</b>.</p>
<p>The detailed specifications of the recognized <i class="arg">options</i> are
provided in section <span class="sectref"><a href="#subsection3">OPTIONS</a></span>.</p>
<dl class="doctools_arguments">
<dt>path <i class="arg">input</i> (in)</dt>
<dd><p>This argument specifies the path to the file to be processed by the
application, or <b class="const">-</b>. The last value causes the application to
read the text from <b class="const">stdin</b>. Otherwise it has to exist, and be
readable. If the argument is missing <b class="const">-</b> is assumed.</p></dd>
<dt>path <i class="arg">output</i> (in)</dt>
<dd><p>This argument specifies where to write the generated text. It can be
the path to a file, or <b class="const">-</b>. The last value causes the
application to write the generated documented to <b class="const">stdout</b>.</p>
<p>If the file <i class="arg">output</i> does not exist then
[file dirname $output] has to exist and must be a writable
directory, as the application will create the fileto write to.</p>
<p>If the argument is missing <b class="const">-</b> is assumed.</p></dd>
</dl></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">OPERATION</a></h3>
<p>... reading ... transforming ... writing - plugins - pipeline ...</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OPTIONS</a></h3>
<p>This section describes all the options available to the user of the
application. Options are always processed in order. I.e. of both
<b class="option">--help</b> and <b class="option">--version</b> are specified the option
encountered first has precedence.</p>
<p>Unknown options specified before any of the options <b class="option">-rd</b>,
<b class="option">-wr</b>, or <b class="option">-tr</b> will cause processing to abort with an
error. Unknown options coming in between these options, or after the
last of them are assumed to always take a single argument and are
associated with the last plugin option coming before them. They will
be checked after all the relevant plugins, and thus the options they
understand, are known. I.e. such unknown options cause error if and
only if the plugin option they are associated with does not understand
them, and was not superceded by a plugin option coming after.</p>
<p>Default options are used if and only if the command line did not
contain any options at all. They will set the application up as a
PEG-based parser generator. The exact list of options is</p>
<pre class="doctools_example">-c peg</pre>
<p>And now the recognized options and their arguments, if they have any:</p>
<dl class="doctools_options">
<dt><b class="option">--help</b></dt>
<dd></dd>
<dt><b class="option">-h</b></dt>
<dd></dd>
<dt><b class="option">-?</b></dt>
<dd><p>When one of these options is found on the command line all arguments
coming before or after are ignored. The application will print a short
description of the recognized options and exit.</p></dd>
<dt><b class="option">--version</b></dt>
<dd></dd>
<dt><b class="option">-V</b></dt>
<dd><p>When one of these options is found on the command line all arguments
coming before or after are ignored. The application will print its
own revision and exit.</p></dd>
<dt><b class="option">-P</b></dt>
<dd><p>This option signals the application to activate visual feedback while
reading the input.</p></dd>
<dt><b class="option">-T</b></dt>
<dd><p>This option signals the application to collect statistics while
reading the input and to print them after reading has completed,
before processing started.</p></dd>
<dt><b class="option">-D</b></dt>
<dd><p>This option signals the application to activate logging in the Safe
base, for the debugging of problems with plugins.</p></dd>
<dt><b class="option">-r</b> parser</dt>
<dd></dd>
<dt><b class="option">-rd</b> parser</dt>
<dd></dd>
<dt><b class="option">--reader</b> parser</dt>
<dd><p>These options specify the plugin the application has to use for
reading the <i class="arg">input</i>. If the options are used multiple times the
last one will be used.</p></dd>
<dt><b class="option">-w</b> generator</dt>
<dd></dd>
<dt><b class="option">-wr</b> generator</dt>
<dd></dd>
<dt><b class="option">--writer</b> generator</dt>
<dd><p>These options specify the plugin the application has to use for
generating and writing the final <i class="arg">output</i>. If the options are used
multiple times the last one will be used.</p></dd>
<dt><b class="option">-t</b> process</dt>
<dd></dd>
<dt><b class="option">-tr</b> process</dt>
<dd></dd>
<dt><b class="option">--transform</b> process</dt>
<dd><p>These options specify a plugin to run on the input. In contrast to
readers and writers each use will <em>not</em> supersede previous
uses, but add each chosen plugin to a list of transformations, either
at the front, or the end, per the last seen use of either option
<b class="option">-p</b> or <b class="option">-a</b>. The initial default is to append the new
transformations.</p></dd>
<dt><b class="option">-a</b></dt>
<dd></dd>
<dt><b class="option">--append</b></dt>
<dd><p>These options signal the application that all following
transformations should be added at the end of the list of
transformations.</p></dd>
<dt><b class="option">-p</b></dt>
<dd></dd>
<dt><b class="option">--prepend</b></dt>
<dd><p>These options signal the application that all following
transformations should be added at the beginning of the list of
transformations.</p></dd>
<dt><b class="option">--reset</b></dt>
<dd><p>This option signals the application to clear the list of
transformations. This is necessary to wipe out the default
transformations used.</p></dd>
<dt><b class="option">-c</b> file</dt>
<dd></dd>
<dt><b class="option">--configuration</b> file</dt>
<dd><p>This option causes the application to load a configuration file and/or
plugin. This is a plugin which in essence provides a pre-defined set
of commandline options. They are processed exactly as if they have
been specified in place of the option and its arguments. This means
that unknown options found at the beginning of the configuration file
are associated with the last plugin, even if that plugin was specified
before the configuration file itself. Conversely, unknown options
coming after the configuration file can be associated with a plugin
specified in the file.</p>
<p>If the argument is a file which cannot be loaded as a plugin the
application will assume that its contents are a list of options and
their arguments, separated by space, tabs, and newlines. Options and
argumentes containing spaces can be quoted via double-quotes (&quot;) and
quotes ('). The quote character can be specified within in a quoted
string by doubling it. Newlines in a quoted string are accepted as is.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">PLUGINS</a></h3>
<p><b class="syscmd">page</b> makes use of four different types of plugins, namely:
readers, writers, transformations, and configurations. Here we provide
only a basic introduction on how to use them from <b class="syscmd">page</b>. The
exact APIs provided to and expected from the plugins can be found in
the documentation for <b class="package">page::pluginmgr</b>, for those who wish to
write their own plugins.</p>
<p>Plugins are specified as arguments to the options <b class="option">-r</b>,
<b class="option">-w</b>, <b class="option">-t</b>, <b class="option">-c</b>, and their equivalent longer
forms. See the section <span class="sectref"><a href="#subsection3">OPTIONS</a></span> for reference.</p>
<p>Each such argument will be first treated as the name of a file and
this file is loaded as the plugin. If however there is no file with
that name, then it will be translated into the name of a package, and
this package is then loaded. For each type of plugins the package
management searches not only the regular paths, but a set application-
and type-specific paths as well. Please see the section
<span class="sectref"><a href="#subsection5">PLUGIN LOCATIONS</a></span> for a listing of all paths and their
sources.</p>
<dl class="doctools_definitions">
<dt><b class="option">-c</b> <i class="arg">name</i></dt>
<dd><p>Configurations. The name of the package for the plugin <i class="arg">name</i> is
&quot;page::config::<i class="arg">name</i>&quot;.</p>
<p>We have one predefined plugin:</p>
<dl class="doctools_definitions">
<dt><em>peg</em></dt>
<dd><p>It sets the application up as a parser generator accepting parsing
expression grammars and writing a packrat parser in Tcl. The actual
arguments it specifies are:</p>
<pre class="doctools_example">
	--reset
	--append
	--reader    peg
	--transform reach
	--transform use
	--writer    me
</pre>
</dd>
</dl></dd>
<dt><b class="option">-r</b> <i class="arg">name</i></dt>
<dd><p>Readers. The name of the package for the plugin <i class="arg">name</i> is
&quot;page::reader::<i class="arg">name</i>&quot;.</p>
<p>We have five predefined plugins:</p>
<dl class="doctools_definitions">
<dt><em>peg</em></dt>
<dd><p>Interprets the input as a parsing expression grammar (<i class="term"><a href="../../../index.html#key6">PEG</a></i>) and
generates a tree representation for it. Both the syntax of PEGs and
the structure of the tree representation are explained in their own
manpages.</p></dd>
<dt><em>hb</em></dt>
<dd><p>Interprets the input as Tcl code as generated by the writer plugin
<em>hb</em> and generates its tree representation.</p></dd>
<dt><em>ser</em></dt>
<dd><p>Interprets the input as the serialization of a PEG, as generated by
the writer plugin <em>ser</em>, using the package
<b class="package"><a href="../modules/grammar_peg/peg.html">grammar::peg</a></b>.</p></dd>
<dt><em>lemon</em></dt>
<dd><p>Interprets the input as a grammar specification as understood by
Richard Hipp's <i class="term"><a href="../../../index.html#key193">LEMON</a></i> parser generator and generates a tree
representation for it. Both the input syntax and the structure of the
tree representation are explained in their own manpages.</p></dd>
<dt><em>treeser</em></dt>
<dd><p>Interprets the input as the serialization of a
<b class="package"><a href="../modules/struct/struct_tree.html">struct::tree</a></b>. It is validated as such,
but nothing else. It is <em>not</em> assumed to
be the tree representation of a grammar.</p></dd>
</dl></dd>
<dt><b class="option">-w</b> <i class="arg">name</i></dt>
<dd><p>Writers. The name of the package for the plugin <i class="arg">name</i> is
&quot;page::writer::<i class="arg">name</i>&quot;.</p>
<p>We have eight predefined plugins:</p>
<dl class="doctools_definitions">
<dt><em>identity</em></dt>
<dd><p>Simply writes the incoming data as it is, without making any
changes. This is good for inspecting the raw result of a reader or
transformation.</p></dd>
<dt><em>null</em></dt>
<dd><p>Generates nothing, and ignores the incoming data structure.</p></dd>
<dt><em>tree</em></dt>
<dd><p>Assumes that the incoming data structure is a <b class="package"><a href="../modules/struct/struct_tree.html">struct::tree</a></b>
and generates an indented textual representation of all nodes, their
parental relationships, and their attribute information.</p></dd>
<dt><em>peg</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar and writes it out as a PEG. The
result is nicely formatted and partially simplified (strings as
sequences of characters). A pretty printer in essence, but can also be
used to obtain a canonical representation of the input grammar.</p></dd>
<dt><em>tpc</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar and writes out Tcl code defining a
package which defines a <b class="package"><a href="../modules/grammar_peg/peg.html">grammar::peg</a></b> object containing the
grammar when it is loaded into an interpreter.</p></dd>
<dt><em>hb</em></dt>
<dd><p>This is like the writer plugin <em>tpc</em>, but it writes only the
statements which define stat expression and grammar rules. The code
making the result a package is left out.</p></dd>
<dt><em>ser</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar, transforms it internally into a
<b class="package"><a href="../modules/grammar_peg/peg.html">grammar::peg</a></b> object and writes out its serialization.</p></dd>
<dt><em>me</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar and writes out Tcl code defining a
package which implements a memoizing recursive descent parser based on
the match engine (ME) provided by the package <b class="package">grammar::mengine</b>.</p></dd>
</dl></dd>
<dt><b class="option">-t</b> <i class="arg">name</i></dt>
<dd><p>Transformers. The name of the package for the plugin <i class="arg">name</i> is
&quot;page::transform::<i class="arg">name</i>&quot;.</p>
<p>We have two predefined plugins:</p>
<dl class="doctools_definitions">
<dt><em>reach</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar. It determines which nonterminal
symbols and rules are reachable from start-symbol/expression. All
nonterminal symbols which were not reached are removed.</p></dd>
<dt><em>use</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar. It determines which nonterminal
symbols and rules are able to generate a <em>finite</em> sequences of
terminal symbols (in the sense for a Context Free Grammar). All
nonterminal symbols which were not deemed useful in this sense are
removed.</p></dd>
</dl></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">PLUGIN LOCATIONS</a></h3>
<p>The application-specific paths searched by <b class="syscmd">page</b> either are,
or come from:</p>
<ol class="doctools_enumerated">
<li><p>The directory            &quot;<b class="file">~/.page/plugin</b>&quot;</p></li>
<li><p>The environment variable <i class="term">PAGE_PLUGINS</i></p></li>
<li><p>The registry entry       <i class="term">HKEY_LOCAL_MACHINE\SOFTWARE\PAGE\PLUGINS</i></p></li>
<li><p>The registry entry       <i class="term">HKEY_CURRENT_USER\SOFTWARE\PAGE\PLUGINS</i></p></li>
</ol>
<p>The type-specific paths searched by <b class="syscmd">page</b> either are, or come
from:</p>
<ol class="doctools_enumerated">
<li><p>The directory            &quot;<b class="file">~/.page/plugin/&lt;TYPE&gt;</b>&quot;</p></li>
<li><p>The environment variable <i class="term">PAGE_&lt;TYPE&gt;_PLUGINS</i></p></li>
<li><p>The registry entry       <i class="term">HKEY_LOCAL_MACHINE\SOFTWARE\PAGE\&lt;TYPE&gt;\PLUGINS</i></p></li>
<li><p>The registry entry       <i class="term">HKEY_CURRENT_USER\SOFTWARE\PAGE\&lt;TYPE&gt;\PLUGINS</i></p></li>
</ol>
<p>Where the placeholder <i class="term">&lt;TYPE&gt;</i> is always one of the values below,
properly capitalized.</p>
<ol class="doctools_enumerated">
<li><p>reader</p></li>
<li><p>writer</p></li>
<li><p>transform</p></li>
<li><p>config</p></li>
</ol>
<p>The registry entries are specific to the Windows(tm) platform, all
other platforms will ignore them.</p>
<p>The contents of both environment variables and registry entries are
interpreted as a list of paths, with the elements separated by either
colon (Unix), or semicolon (Windows).</p>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>page::pluginmgr</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key189">parser generator</a>, <a href="../../../index.html#key192">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/apps/pt.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680

<div class='fossil-doc' data-title='pt - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt - Parser Tools Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Command Line</a></li>
<li class="doctools_section"><a href="#section3">PEG Specification Language</a></li>
<li class="doctools_section"><a href="#section4">JSON Grammar Exchange</a></li>
<li class="doctools_section"><a href="#section5">C Parser Embedded In Tcl</a></li>
<li class="doctools_section"><a href="#section6">C Parser</a></li>
<li class="doctools_section"><a href="#section7">Snit Parser</a></li>
<li class="doctools_section"><a href="#section8">TclOO Parser</a></li>
<li class="doctools_section"><a href="#section9">Grammar Container</a></li>
<li class="doctools_section"><a href="#section10">Example</a></li>
<li class="doctools_section"><a href="#section11">Internals</a></li>
<li class="doctools_section"><a href="#section12">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pt</b> <b class="method">generate</b> <i class="arg">resultformat</i> <span class="opt">?<i class="arg">options...</i>?</span> <i class="arg">resultfile</i> <i class="arg">inputformat</i> <i class="arg">inputfile</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="../modules/pt/pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This document describes <b class="cmd">pt</b>, the main application of the module,
a <i class="term"><a href="../../../index.html#key189">parser generator</a></i>. Its intended audience are people who wish
to create a parser for some language of theirs. Should you wish to
modify the application instead, please see the section about the
application's <span class="sectref"><a href="#section11">Internals</a></span> for the basic references.</p>
<p>It resides in the User Application Layer of Parser Tools.</p>
<p><img alt="arch_user_app" src="../../../image/arch_user_app.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Command Line</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pt</b> <b class="method">generate</b> <i class="arg">resultformat</i> <span class="opt">?<i class="arg">options...</i>?</span> <i class="arg">resultfile</i> <i class="arg">inputformat</i> <i class="arg">inputfile</i></a></dt>
<dd><p>This sub-command of the application reads the parsing expression
grammar stored in the <i class="arg">inputfile</i> in the format <i class="arg">inputformat</i>,
converts it to the <i class="arg">resultformat</i> under the direction of the
(format-specific) set of options specified by the user and stores the
result in the <i class="arg">resultfile</i>.</p>
<p>The <i class="arg">inputfile</i> has to exist, while the <i class="arg">resultfile</i> may be
created, overwriting any pre-existing content of the file. Any missing
directory in the path to the <i class="arg">resultfile</i> will be created as well.</p>
<p>The exact form of the result for, and the set of options supported by
the known result-formats, are explained in the upcoming sections of
this document, with the list below providing an index mapping between
format name and its associated section. In alphabetical order:</p>
<dl class="doctools_definitions">
<dt><b class="const">c</b></dt>
<dd><p>A <i class="term">resultformat</i>. See section <span class="sectref"><a href="#section6">C Parser</a></span>.</p></dd>
<dt><b class="const">container</b></dt>
<dd><p>A <i class="term">resultformat</i>. See section <span class="sectref"><a href="#section9">Grammar Container</a></span>.</p></dd>
<dt><b class="const">critcl</b></dt>
<dd><p>A <i class="term">resultformat</i>. See section <span class="sectref"><a href="#section5">C Parser Embedded In Tcl</a></span>.</p></dd>
<dt><b class="const">json</b></dt>
<dd><p>A <i class="term">input</i>- and <i class="term">resultformat</i>. See section <span class="sectref"><a href="#section4">JSON Grammar Exchange</a></span>.</p></dd>
<dt><b class="const">oo</b></dt>
<dd><p>A <i class="term">resultformat</i>. See section <span class="sectref"><a href="#section8">TclOO Parser</a></span>.</p></dd>
<dt><b class="const">peg</b></dt>
<dd><p>A <i class="term">input</i>- and <i class="term">resultformat</i>. See section <span class="sectref"><a href="#section3">PEG Specification Language</a></span>.</p></dd>
<dt><b class="const">snit</b></dt>
<dd><p>A <i class="term">resultformat</i>. See section <span class="sectref"><a href="#section7">Snit Parser</a></span>.</p></dd>
</dl></dd>
</dl>
<p>Of the seven possible results four are parsers outright (<b class="const">c</b>,
<b class="const">critcl</b>, <b class="const">oo</b>, and <b class="const">snit</b>), one (<b class="const">container</b>)
provides code which can be used in conjunction with a generic parser
(also known as a grammar interpreter), and the last two (<b class="const">json</b>
and <b class="const">peg</b>) are doing double-duty as input formats, allowing the
transformation of grammars for exchange, reformatting, and the like.</p>
<p>The created parsers fall into three categories:</p>
<p><img alt="gen_options" src="../../../image/gen_options.png"></p>
<dl class="doctools_definitions">
<dt><b class="const">Specialized parsers implemented in C</b></dt>
<dd><p>The fastest parsers are created when using the result formats
<b class="const">c</b> and <b class="const">critcl</b>. The first returns the raw C code for the
parser, while the latter wraps it into a Tcl package using
<i class="term">CriTcl</i>.</p>
<p>This makes the latter much easier to use than the former. On the other
hand, the former can be adapted to the users' requirements through a
multitude of options, allowing for things like usage of the parser
outside of a Tcl environment, something the <b class="const">critcl</b> format
doesn't support. As such the <b class="const">c</b> format is meant for more
advanced users, or users with special needs.</p>
<p>A disadvantage of all the parsers in this section is the need to run
them through a C compiler to make them actually executable. This is
not something everyone has the necessary tools for. The parsers in the
next section are for people under such restrictions.</p></dd>
<dt><b class="const">Specialized parsers implemented in Tcl</b></dt>
<dd><p>As the parsers in this section are implemented in Tcl they are quite a
bit slower than anything from the previous section. On the other hand
this allows them to be used in pure-Tcl environments, or in
environments which allow only a limited set of binary packages. In the
latter case it will be advantageous to lobby for the inclusion of the
C-based runtime support (notes below) into the environment to reduce
the impact of Tcl's on the speed of these parsers.</p>
<p>The relevant formats are <b class="const">snit</b> and <b class="const">oo</b>. Both place their
result into a Tcl package containing a <b class="cmd">snit::type</b>, or TclOO
<b class="cmd"><a href="../../../index.html#key240">class</a></b> respectively.</p>
<p>Of the supporting runtime, which is the package <b class="package"><a href="../modules/pt/pt_rdengine.html">pt::rde</a></b>, the
user has to know nothing but that it does exist and that the parsers
are dependent on it. Knowledge of the API exported by the runtime for
the parsers' consumption is <em>not</em> required by the parsers' users.</p></dd>
<dt><b class="const">Interpreted parsing implemented in Tcl</b></dt>
<dd><p>The last category, grammar interpretation. This means that an
interpreter for parsing expression grammars takes the description of
the grammar to parse input for, and uses it guide the parsing process.
This is the slowest of the available options, as the interpreter has
to continually run through the configured grammar, whereas the
specialized parsers of the previous sections have the relevant
knowledge about the grammar baked into them.</p>
<p>The only places where using interpretation make sense is where the
grammar for some input may be changed interactively by the user, as
the interpretation allows for quick turnaround after each change,
whereas the previous methods require the generation of a whole new
parser, which is not as fast.
On the other hand, wherever the grammar to use is fixed, the previous
methods are much more advantageous as the time to generate the parser
is minuscule compared to the time the parser code is in use.</p>
<p>The relevant result format is <b class="const">container</b>.
It (quickly) generates grammar descriptions (instead of a full parser)
which match the API expected by ParserTools' grammar interpreter.
The latter is provided by the package <b class="package"><a href="../modules/pt/pt_peg_interp.html">pt::peg::interp</a></b>.</p></dd>
</dl>
<p>All the parsers generated by <b class="const">critcl</b>, <b class="const">snit</b>, and
<b class="const">oo</b>, and the grammar interpreter share a common API for access
to the actual parsing functionality, making them all
plug-compatible.
It is described in the <i class="term"><a href="../modules/pt/pt_parser_api.html">Parser API</a></i> specification document.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PEG Specification Language</a></h2>
<p><b class="const">peg</b>, a language for the specification of parsing expression
grammars is meant to be human readable, and writable as well, yet
strict enough to allow its processing by machine. Like any computer
language. It was defined to make writing the specification of a
grammar easy, something the other formats found in the Parser Tools do
not lend themselves too.</p>
<p>For either an introduction to or the formal specification of the
language, please go and read the <i class="term"><a href="../modules/pt/pt_peg_language.html">PEG Language Tutorial</a></i>.</p>
<p>When used as a result-format this format supports the following
options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-template</b> string</dt>
<dd><p>The value of this option is a string into which to put the generated
text and the values of the other options. The various locations for
user-data are expected to be specified with the placeholders listed
below. The default value is &quot;<b class="const">@code@</b>&quot;.</p>
<dl class="doctools_definitions">
<dt><b class="const">@user@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-user</b>.</p></dd>
<dt><b class="const">@format@</b></dt>
<dd><p>To be replaced with the the constant <b class="const">PEG</b>.</p></dd>
<dt><b class="const">@file@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-file</b>.</p></dd>
<dt><b class="const">@name@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-name</b>.</p></dd>
<dt><b class="const">@code@</b></dt>
<dd><p>To be replaced with the generated text.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">JSON Grammar Exchange</a></h2>
<p>The <b class="const">json</b> format for parsing expression grammars was written as
a data exchange format not bound to Tcl. It was defined to allow the
exchange of grammars with PackRat/PEG based parser generators for
other languages.</p>
<p>For the formal specification of the JSON grammar exchange format,
please go and read <i class="term"><a href="../modules/pt/pt_json_language.html">The JSON Grammar Exchange Format</a></i>.</p>
<p>When used as a result-format this format supports the following
options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-indented</b> boolean</dt>
<dd><p>If this option is set the system will break the generated JSON across
lines and indent it according to its inner structure, with each key of
a dictionary on a separate line.</p>
<p>If the option is not set (the default), the whole JSON object will be
written on a single line, with minimum spacing between all elements.</p></dd>
<dt><b class="option">-aligned</b> boolean</dt>
<dd><p>If this option is set the system will ensure that the values for the
keys in a dictionary are vertically aligned with each other, for a
nice table effect.
To make this work this also implies that <b class="option">-indented</b> is set.</p>
<p>If the option is not set (the default), the output is formatted as per
the value of <b class="variable">indented</b>, without trying to align the values for
dictionary keys.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">C Parser Embedded In Tcl</a></h2>
<p>The <b class="const">critcl</b> format is executable code, a parser for the
grammar. It is a Tcl package with the actual parser implementation
written in C and embedded in Tcl via the <b class="package">critcl</b> package.</p>
<p>This result-format supports the following options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-class</b> string</dt>
<dd><p>The value of this option is the name of the class to generate, without
leading colons.
The default value is <b class="const">CLASS</b>.</p>
<p>For a simple value <b class="variable">X</b> without colons, like CLASS, the parser
command will be <b class="variable">X</b>::<b class="variable">X</b>. Whereas for a namespaced value
<b class="variable">X::Y</b> the parser command will be <b class="variable">X::Y</b>.</p></dd>
<dt><b class="option">-package</b> string</dt>
<dd><p>The value of this option is the name of the package to generate.
The default value is <b class="const">PACKAGE</b>.</p></dd>
<dt><b class="option">-version</b> string</dt>
<dd><p>The value of this option is the version of the package to generate.
The default value is <b class="const">1</b>.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">C Parser</a></h2>
<p>The <b class="const">c</b> format is executable code, a parser for the grammar. The
parser implementation is written in C and can be tweaked to the users'
needs through a multitude of options.</p>
<p>The <b class="cmd">critcl</b> format, for example, is implemented as a canned
configuration of these options on top of the generator for <b class="const">c</b>.</p>
<p>This result-format supports the following options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-template</b> string</dt>
<dd><p>The value of this option is a string into which to put
the generated text and the other configuration settings. The various
locations for user-data are expected to be specified with the
placeholders listed below. The default value is &quot;<b class="const">@code@</b>&quot;.</p>
<dl class="doctools_definitions">
<dt><b class="const">@user@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-user</b>.</p></dd>
<dt><b class="const">@format@</b></dt>
<dd><p>To be replaced with the the constant <b class="const">C/PARAM</b>.</p></dd>
<dt><b class="const">@file@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-file</b>.</p></dd>
<dt><b class="const">@name@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-name</b>.</p></dd>
<dt><b class="const">@code@</b></dt>
<dd><p>To be replaced with the generated Tcl code.</p></dd>
</dl>
<p>The following options are special, in that they will
occur within the generated code, and are replaced there as well.</p>
<dl class="doctools_definitions">
<dt><b class="const">@statedecl@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">state-decl</b>.</p></dd>
<dt><b class="const">@stateref@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">state-ref</b>.</p></dd>
<dt><b class="const">@strings@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">string-varname</b>.</p></dd>
<dt><b class="const">@self@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">self-command</b>.</p></dd>
<dt><b class="const">@def@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">fun-qualifier</b>.</p></dd>
<dt><b class="const">@ns@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">namespace</b>.</p></dd>
<dt><b class="const">@main@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">main</b>.</p></dd>
<dt><b class="const">@prelude@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">prelude</b>.</p></dd>
</dl></dd>
<dt><b class="option">-state-decl</b> string</dt>
<dd><p>A C string representing the argument declaration to use in the
generated parsing functions to refer to the parsing state. In essence
type and argument name.
The default value is the string <b class="const">RDE_PARAM p</b>.</p></dd>
<dt><b class="option">-state-ref</b> string</dt>
<dd><p>A C string representing the argument named used in the generated
parsing functions to refer to the parsing state.
The default value is the string <b class="const">p</b>.</p></dd>
<dt><b class="option">-self-command</b> string</dt>
<dd><p>A C string representing the reference needed to call the generated
parser function (methods ...) from another parser fonction, per the
chosen framework (template).
The default value is the empty string.</p></dd>
<dt><b class="option">-fun-qualifier</b> string</dt>
<dd><p>A C string containing the attributes to give to the generated
functions (methods ...), per the chosen framework (template).
The default value is <b class="const">static</b>.</p></dd>
<dt><b class="option">-namespace</b> string</dt>
<dd><p>The name of the C namespace the parser functions (methods, ...) shall
reside in, or a general prefix to add to the function names.
The default value is the empty string.</p></dd>
<dt><b class="option">-main</b> string</dt>
<dd><p>The name of the main function (method, ...) to be called by the chosen
framework (template) to start parsing input.
The default value is <b class="const">__main</b>.</p></dd>
<dt><b class="option">-string-varname</b> string</dt>
<dd><p>The name of the variable used for the table of strings used by the
generated parser, i.e. error messages, symbol names, etc.
The default value is <b class="const">p_string</b>.</p></dd>
<dt><b class="option">-prelude</b> string</dt>
<dd><p>A snippet of code to be inserted at the head of each generated parsing
function.
The default value is the empty string.</p></dd>
<dt><b class="option">-indent</b> integer</dt>
<dd><p>The number of characters to indent each line of the generated code by.
The default value is <b class="const">0</b>.</p></dd>
<dt><b class="option">-comments</b> boolean</dt>
<dd><p>A flag controlling the generation of code comments containing the
original parsing expression a parsing function is for.
The default value is <b class="const">on</b>.</p></dd>
</dl>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Snit Parser</a></h2>
<p>The <b class="const">snit</b> format is executable code, a parser for the
grammar. It is a Tcl package holding a <b class="cmd">snit::type</b>, i.e. a class,
whose instances are parsers for the input grammar.</p>
<p>This result-format supports the following options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-class</b> string</dt>
<dd><p>The value of this option is the name of the class to generate, without
leading colons. Note, it serves double-duty as the name of the package
to generate too, if option <b class="option">-package</b> is not specified, see below.
The default value is <b class="const">CLASS</b>, applying if neither option
<b class="option">-class</b> nor <b class="option">-package</b> were specified.</p></dd>
<dt><b class="option">-package</b> string</dt>
<dd><p>The value of this option is the name of the package to generate, without
leading colons. Note, it serves double-duty as the name of the class
to generate too, if option <b class="option">-class</b> is not specified, see above.
The default value is <b class="const">PACKAGE</b>, applying if neither option
<b class="option">-package</b> nor <b class="option">-class</b> were specified.</p></dd>
<dt><b class="option">-version</b> string</dt>
<dd><p>The value of this option is the version of the package to generate.
The default value is <b class="const">1</b>.</p></dd>
</dl>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">TclOO Parser</a></h2>
<p>The <b class="const">oo</b> format is executable code, a parser for the grammar. It
is a Tcl package holding a <b class="package"><a href="../../../index.html#key757">TclOO</a></b> class, whose instances are
parsers for the input grammar.</p>
<p>This result-format supports the following options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-class</b> string</dt>
<dd><p>The value of this option is the name of the class to generate, without
leading colons. Note, it serves double-duty as the name of the package
to generate too, if option <b class="option">-package</b> is not specified, see below.
The default value is <b class="const">CLASS</b>, applying if neither option
<b class="option">-class</b> nor <b class="option">-package</b> were specified.</p></dd>
<dt><b class="option">-package</b> string</dt>
<dd><p>The value of this option is the name of the package to generate, without
leading colons. Note, it serves double-duty as the name of the class
to generate too, if option <b class="option">-class</b> is not specified, see above.
The default value is <b class="const">PACKAGE</b>, applying if neither option
<b class="option">-package</b> nor <b class="option">-class</b> were specified.</p></dd>
<dt><b class="option">-version</b> string</dt>
<dd><p>The value of this option is the version of the package to generate.
The default value is <b class="const">1</b>.</p></dd>
</dl>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">Grammar Container</a></h2>
<p>The <b class="const">container</b> format is another form of describing parsing
expression grammars. While data in this format is executable it does
not constitute a parser for the grammar. It always has to be used in
conjunction with the package <b class="package"><a href="../modules/pt/pt_peg_interp.html">pt::peg::interp</a></b>, a grammar
interpreter.</p>
<p>The format represents grammars by a <b class="cmd">snit::type</b>, i.e. class,
whose instances are API-compatible to the instances of the
<b class="package"><a href="../modules/pt/pt_peg_container.html">pt::peg::container</a></b> package, and which are preloaded with the
grammar in question.</p>
<p>This result-format supports the following options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-mode</b> <b class="const">bulk</b>|<b class="const">incremental</b></dt>
<dd><p>The value of this option controls which methods of
<b class="package"><a href="../modules/pt/pt_peg_container.html">pt::peg::container</a></b> instances are used to specify the
grammar, i.e. preload it into the container. There are two legal
values, as listed below. The default is <b class="const">bulk</b>.</p>
<dl class="doctools_definitions">
<dt><b class="const">bulk</b></dt>
<dd><p>In this mode the methods <b class="method">start</b>, <b class="method">add</b>, <b class="method">modes</b>,
and <b class="method">rules</b> are used to specify the grammar in a bulk manner,
i.e. as a set of nonterminal symbols, and two dictionaries mapping
from the symbols to their semantic modes and parsing expressions.</p>
<p>This mode is the default.</p></dd>
<dt><b class="const">incremental</b></dt>
<dd><p>In this mode the methods <b class="method">start</b>, <b class="method">add</b>, <b class="method">mode</b>,
and <b class="method">rule</b> are used to specify the grammar piecemal, with each
nonterminal having its own block of defining commands.</p></dd>
</dl></dd>
<dt><b class="option">-template</b> string</dt>
<dd><p>The value of this option is a string into which to put the generated
code and the other configuration settings. The various locations for
user-data are expected to be specified with the placeholders listed
below. The default value is &quot;<b class="const">@code@</b>&quot;.</p>
<dl class="doctools_definitions">
<dt><b class="const">@user@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-user</b>.</p></dd>
<dt><b class="const">@format@</b></dt>
<dd><p>To be replaced with the the constant <b class="const">CONTAINER</b>.</p></dd>
<dt><b class="const">@file@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-file</b>.</p></dd>
<dt><b class="const">@name@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-name</b>.</p></dd>
<dt><b class="const">@mode@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-mode</b>.</p></dd>
<dt><b class="const">@code@</b></dt>
<dd><p>To be replaced with the generated code.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section10" class="doctools_section"><h2><a name="section10">Example</a></h2>
<p>In this section we are working a complete example, starting with a PEG
grammar and ending with running the parser generated from it over some
input, following the outline shown in the figure below:</p>
<p><img alt="flow" src="../../../image/flow.png"></p>
<p>Our grammar, assumed to the stored in the file &quot;<b class="file">calculator.peg</b>&quot;
is</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>From this we create a snit-based parser
via</p>
<pre class="doctools_example">
pt generate snit calculator.tcl -class calculator -name calculator peg calculator.peg
</pre>
<p>which leaves us with the parser package and class written to the file
&quot;<b class="file">calculator.tcl</b>&quot;.
Assuming that this package is then properly installed in a place where
Tcl can find it we can now use this class via a script like</p>
<pre class="doctools_example">
    package require calculator
    lassign $argv input
    set channel [open $input r]
    set parser [calculator]
    set ast [$parser parse $channel]
    $parser destroy
    close $channel
    ... now process the returned abstract syntax tree ...
</pre>
<p>where the abstract syntax tree stored in the variable will look like</p>
<pre class="doctools_example">
set ast {Expression 0 4
    {Factor 0 4
        {Term 0 2
            {Number 0 2
                {Digit 0 0}
                {Digit 1 1}
                {Digit 2 2}
            }
        }
        {AddOp 3 3}
        {Term 4 4
            {Number 4 4
                {Digit 4 4}
            }
        }
    }
}
</pre>
<p>assuming that the input file and channel contained the text</p>
<pre class="doctools_example"> 120+5 </pre>
<p>A more graphical representation of the tree would be</p>
<p><img alt="expr_ast" src="../../../image/expr_ast.png"></p>
<p>Regardless, at this point it is the user's responsibility to work with
the tree to reach whatever goal she desires. I.e. analyze it,
transform it, etc. The package <b class="package"><a href="../modules/pt/pt_astree.html">pt::ast</a></b> should be of help
here, providing commands to walk such ASTs structures in various ways.</p>
<p>One important thing to note is that the parsers used here return a
data structure representing the structure of the input per the grammar
underlying the parser. There are <em>no</em> callbacks during the
parsing process, i.e. no <i class="term">parsing actions</i>, as most other
parsers will have.</p>
<p>Going back to the last snippet of code, the execution of the parser
for some input, note how the parser instance follows the specified
<i class="term"><a href="../modules/pt/pt_parser_api.html">Parser API</a></i>.</p>
</div>
<div id="section11" class="doctools_section"><h2><a name="section11">Internals</a></h2>
<p>This section is intended for users of the application which wish to
modify or extend it. Users only interested in the generation of
parsers can ignore it.</p>
<p>The main functionality of the application is encapsulated in the
package <b class="package"><a href="../modules/pt/pt_pgen.html">pt::pgen</a></b>. Please read it for more information.</p>
</div>
<div id="section12" class="doctools_section"><h2><a name="section12">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key3">EBNF</a>, <a href="../../../index.html#key15">LL(k)</a>, <a href="../../../index.html#key6">PEG</a>, <a href="../../../index.html#key7">TDPL</a>, <a href="../../../index.html#key4">context-free languages</a>, <a href="../../../index.html#key0">expression</a>, <a href="../../../index.html#key11">grammar</a>, <a href="../../../index.html#key5">matching</a>, <a href="../../../index.html#key9">parser</a>, <a href="../../../index.html#key8">parsing expression</a>, <a href="../../../index.html#key14">parsing expression grammar</a>, <a href="../../../index.html#key1">push down automaton</a>, <a href="../../../index.html#key10">recursive descent</a>, <a href="../../../index.html#key2">state</a>, <a href="../../../index.html#key13">top-down parsing languages</a>, <a href="../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/apps/tcldocstrip.html.





























































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270

<div class='fossil-doc' data-title='tcldocstrip - Textprocessing toolbox'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcldocstrip(n) 1.0 tcllib &quot;Textprocessing toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcldocstrip - Tcl-based Docstrip Processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">USE CASES</a></li>
<li class="doctools_subsection"><a href="#subsection2">COMMAND LINE</a></li>
<li class="doctools_subsection"><a href="#subsection3">OPTIONS</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">tcldocstrip</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">input</i> <span class="opt">?<i class="arg">guards</i>?</span></a></li>
<li><a href="#2"><b class="cmd">tcldocstrip</b> <span class="opt">?options?</span> <i class="arg">output</i> (<span class="opt">?options?</span> <i class="arg">input</i> <i class="arg">guards</i>)...</a></li>
<li><a href="#3"><b class="cmd">tcldocstrip</b> <b class="option">-guards</b> <i class="arg">input</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The application described by this document, <b class="syscmd">tcldocstrip</b>, is a
relative of <b class="syscmd"><a href="../modules/docstrip/docstrip.html">docstrip</a></b>, a simple literate programming tool for
LaTeX.</p>
<p><b class="syscmd">tcldocstrip</b> is based upon the package <b class="package"><a href="../modules/docstrip/docstrip.html">docstrip</a></b>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">tcldocstrip</b> was written with the following three use cases in
mind.</p>
<ol class="doctools_enumerated">
<li><p>Conversion of a single input file according to the listed guards into
the stripped output. This handles the most simple case of a set of
guards specifying a single document found in a single input file.</p></li>
<li><p>Stitching, or the assembly of an output from several sets of guards,
in a specific order, and possibly from different files. This is the
second common case. One document spread over several inputs, and/or
spread over different guard sets.</p></li>
<li><p>Extraction and listing of all the unique guard expressions and guards
used within a document to help a person which did not author the
document in question in familiarizing itself with it.</p></li>
</ol>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">COMMAND LINE</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">tcldocstrip</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">input</i> <span class="opt">?<i class="arg">guards</i>?</span></a></dt>
<dd><p>This is the form for use case [1]. It converts the <i class="arg">input</i>
file according to the specified <i class="arg">guards</i> and options. The result
is written to the named <i class="arg">output</i> file.
Usage of the string <b class="const">-</b> as the name of the output signals that
the result should be written to <b class="const">stdout</b>. The guards are
document-specific and have to be known to the caller. The
<i class="arg">options</i> will be explained later, in section <span class="sectref"><a href="#subsection3">OPTIONS</a></span>.</p>
<dl class="doctools_arguments">
<dt>path <i class="arg">output</i> (in)</dt>
<dd><p>This argument specifies where to write the generated document. It can
be the path to a file or directory, or <b class="const">-</b>.
The last value causes the application to write the generated
documented to <b class="const">stdout</b>.</p>
<p>If the <i class="arg">output</i> does not exist then [file dirname $output]
has to exist and must be a writable directory.</p></dd>
<dt>path <i class="arg">inputfile</i> (in)</dt>
<dd><p>This argument specifies the path to the file to process. It has to
exist, must be readable, and written in <i class="term"><a href="../../../index.html#key435">docstrip</a></i> format.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">tcldocstrip</b> <span class="opt">?options?</span> <i class="arg">output</i> (<span class="opt">?options?</span> <i class="arg">input</i> <i class="arg">guards</i>)...</a></dt>
<dd><p>This is the form for use case [2]. It differs from the form for
use case [1] by the possibility of having options before the
output file, which apply in general, and specifying more than one
inputfile, each with its own set of input specific options and guards.</p>
<p>It extracts data from the various <i class="arg">input</i> files, according to the
specified <i class="arg">options</i> and <i class="arg">guards</i>, and writes the result to the
given <i class="arg">output</i>, in the order of their specification on the command
line. Options specified before the output are global settings, whereas
the options specified before each input are valid only just for this
input file. Unspecified values are taken from the global settings, or
defaults. As for form [1] using the string <b class="const">-</b> as output
causes the application to write to stdout.
Using the string <b class="const">.</b> for an input file signals that the last
input file should be used again. This enables the assembly of the
output from one input file using multiple and different sets of
guards, without having to specify the full name of the file every
time.</p></dd>
<dt><a name="3"><b class="cmd">tcldocstrip</b> <b class="option">-guards</b> <i class="arg">input</i></a></dt>
<dd><p>This is the form for use case [3].
It determines the guards, and unique guard expressions used within the
provided <i class="arg">input</i> document. The found strings are written to
stdout, one string per line.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OPTIONS</a></h3>
<p>This section describes all the options available to the user of the
application, with the exception of the option <b class="option">-guards</b>. This
option was described already, in section <span class="sectref"><a href="#subsection2">COMMAND LINE</a></span>.</p>
<dl class="doctools_options">
<dt><b class="option">-metaprefix</b> string</dt>
<dd><p>This option is inherited from the command <b class="cmd">docstrip::extract</b>
provided by the package <b class="package"><a href="../modules/docstrip/docstrip.html">docstrip</a></b>.</p>
<p>It specifies the string by which the '%%' prefix of a metacomment line
will be replaced. Defaults to '%%'. For Tcl code this would typically
be '#'.</p></dd>
<dt><b class="option">-onerror</b> mode</dt>
<dd><p>This option is inherited from the command <b class="cmd">docstrip::extract</b>
provided by the package <b class="package"><a href="../modules/docstrip/docstrip.html">docstrip</a></b>.</p>
<p>It controls what will be done when a format error in the <i class="arg">text</i>
being processed is detected. The settings are:</p>
<dl class="doctools_definitions">
<dt><b class="const">ignore</b></dt>
<dd><p>Just ignore the error; continue as if nothing happened.</p></dd>
<dt><b class="const">puts</b></dt>
<dd><p>Write an error message to <b class="const">stderr</b>, then continue processing.</p></dd>
<dt><b class="const">throw</b></dt>
<dd><p>Throw an error. <b class="variable">::errorCode</b> is set to a list whose first element
is <b class="const">DOCSTRIP</b>, second element is the type of error, and third
element is the line number where the error is detected. This is the
default.</p></dd>
</dl></dd>
<dt><b class="option">-trimlines</b> bool</dt>
<dd><p>This option is inherited from the command <b class="cmd">docstrip::extract</b>
provided by the package <b class="package"><a href="../modules/docstrip/docstrip.html">docstrip</a></b>.</p>
<p>Controls whether <em>spaces</em> at the end of a line should be trimmed
away before the line is processed. Defaults to <b class="const">true</b>.</p></dd>
<dt><b class="option">-preamble</b> text</dt>
<dd></dd>
<dt><b class="option">-postamble</b> text</dt>
<dd></dd>
<dt><b class="option">-nopreamble</b></dt>
<dd></dd>
<dt><b class="option">-nopostamble</b></dt>
<dd><p>The -no*amble options deactivate file pre- and postambles altogether,
whereas the -*amble options specify the <em>user</em> part of the file
pre- and postambles. This part can be empty, in that case only the
standard parts are shown. This is the default.</p>
<p>Preambles, when active, are written before the actual content of a
generated file. In the same manner postambles are, when active,
written after the actual content of a generated file.</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>docstrip</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/docstrip/docstrip.html">docstrip</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key439">.dtx</a>, <a href="../../../index.html#key438">LaTeX</a>, <a href="../../../index.html#key20">conversion</a>, <a href="../../../index.html#key435">docstrip</a>, <a href="../../../index.html#key185">documentation</a>, <a href="../../../index.html#key437">literate programming</a>, <a href="../../../index.html#key16">markup</a>, <a href="../../../index.html#key436">source</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/aes/aes.html.







































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259

<div class='fossil-doc' data-title='aes - Advanced Encryption Standard (AES)'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">aes(n) 1.2.1 tcllib &quot;Advanced Encryption Standard (AES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>aes - Implementation of the AES block cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section4">MODES OF OPERATION</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section6">REFERENCES</a></li>
<li class="doctools_section"><a href="#section7">AUTHORS</a></li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">aes <span class="opt">?1.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::aes::aes</b> <span class="opt">?<i class="arg">-mode [ecb|cbc]</i>?</span> <span class="opt">?<i class="arg">-dir [encrypt|decrypt]</i>?</span> <i class="arg">-key keydata</i> <span class="opt">?<i class="arg">-iv vector</i>?</span> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> [ <i class="arg">-in channel</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">data</i> ]</a></li>
<li><a href="#2"><b class="cmd">::aes::Init</b> <i class="arg">mode</i> <i class="arg">keydata</i> <i class="arg">iv</i></a></li>
<li><a href="#3"><b class="cmd">::aes::Encrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::aes::Decrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::aes::Reset</b> <i class="arg">Key</i> <i class="arg">iv</i></a></li>
<li><a href="#6"><b class="cmd">::aes::Final</b> <i class="arg">Key</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This is an implementation in Tcl of the Advanced Encryption Standard
(AES) as published by the U.S. National Institute of Standards and
Technology [1]. AES is a 128-bit block cipher with a variable
key size of 128, 192 or 256 bits. This implementation supports ECB and
CBC modes.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::aes::aes</b> <span class="opt">?<i class="arg">-mode [ecb|cbc]</i>?</span> <span class="opt">?<i class="arg">-dir [encrypt|decrypt]</i>?</span> <i class="arg">-key keydata</i> <span class="opt">?<i class="arg">-iv vector</i>?</span> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> [ <i class="arg">-in channel</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">data</i> ]</a></dt>
<dd><p>Perform the <b class="package">aes</b> algorithm on either the data provided
by the argument or on the data read from the <i class="arg">-in</i> channel. If
an <i class="arg">-out</i> channel is given then the result will be written to
this channel.</p>
<p>The <i class="arg">-key</i> option must be given. This parameter takes a binary
string of either 16, 24 or 32 bytes in length and is used to generate the
key schedule.</p>
<p>The <i class="arg">-mode</i> and <i class="arg">-dir</i> options are optional and default to cbc
mode and encrypt respectively. The initialization vector <i class="arg">-iv</i>
takes a 16 byte binary argument which defaults to all zeros.
See <span class="sectref"><a href="#section4">MODES OF OPERATION</a></span> for more about available modes and
their uses.</p>
<p>AES is a 128-bit block cipher. This means that the data must be
provided in units that are a multiple of 16 bytes.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROGRAMMING INTERFACE</a></h2>
<p>Internal state is maintained in an opaque structure that is returned
from the <b class="cmd">Init</b> function. In ECB mode the state is not affected by
the input but for CBC mode some input dependent state is maintained
and may be reset by calling the <b class="cmd">Reset</b> function with a new
initialization vector value.</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">::aes::Init</b> <i class="arg">mode</i> <i class="arg">keydata</i> <i class="arg">iv</i></a></dt>
<dd><p>Construct a new AES key schedule using the specified key data and the
given initialization vector. The initialization vector is not used
with ECB mode but is important for CBC mode.
See <span class="sectref"><a href="#section4">MODES OF OPERATION</a></span> for details about cipher modes.</p></dd>
<dt><a name="3"><b class="cmd">::aes::Encrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></dt>
<dd><p>Use a prepared key acquired by calling <b class="cmd">Init</b> to encrypt the
provided data. The data argument should be a binary array that is a
multiple of the AES block size of 16 bytes. The result is a binary
array the same size as the input of encrypted data.</p></dd>
<dt><a name="4"><b class="cmd">::aes::Decrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></dt>
<dd><p>Decipher data using the key. Note that the same key may be used to
encrypt and decrypt data provided that the initialization vector is
reset appropriately for CBC mode.</p></dd>
<dt><a name="5"><b class="cmd">::aes::Reset</b> <i class="arg">Key</i> <i class="arg">iv</i></a></dt>
<dd><p>Reset the initialization vector. This permits the programmer to re-use
a key and avoid the cost of re-generating the key schedule where the
same key data is being used multiple times.</p></dd>
<dt><a name="6"><b class="cmd">::aes::Final</b> <i class="arg">Key</i></a></dt>
<dd><p>This should be called to clean up resources associated with <i class="arg">Key</i>.
Once this function has been called the key may not be used again.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">MODES OF OPERATION</a></h2>
<dl class="doctools_definitions">
<dt>Electronic Code Book (ECB)</dt>
<dd><p>ECB is the basic mode of all block ciphers. Each block is encrypted
independently and so identical plain text will produce identical
output when encrypted with the same key. Any encryption errors will
only affect a single block however this is vulnerable to known
plaintext attacks.</p></dd>
<dt>Cipher Block Chaining (CBC)</dt>
<dd><p>CBC mode uses the output of the last block encryption to affect the
current block. An initialization vector of the same size as the cipher
block size is used to handle the first block. The initialization
vector should be chosen randomly and transmitted as the first block of
the output. Errors in encryption affect the current block and the next
block after which the cipher will correct itself. CBC is the most
commonly used mode in software encryption. This is the default mode
of operation for this module.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<pre class="doctools_example">
% set nil_block [string repeat \\0 16]
% aes::aes -hex -mode cbc -dir encrypt -key $nil_block $nil_block
66e94bd4ef8a2c3b884cfa59ca342b2e
</pre>
<pre class="doctools_example">
set Key [aes::Init cbc $sixteen_bytes_key_data $sixteen_byte_iv]
append ciphertext [aes::Encrypt $Key $plaintext]
append ciphertext [aes::Encrypt $Key $additional_plaintext]
aes::Final $Key
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>&quot;Advanced Encryption Standard&quot;,
    Federal Information Processing Standards Publication 197, 2001
    (<a href="http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf">http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf</a>)</p></li>
</ol>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">AUTHORS</a></h2>
<p>Thorsten Schloermann, Pat Thoyts</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>aes</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../des/des.html">des(n)</a>, <a href="../md5/md5.html">md5(n)</a>, <a href="../sha1/sha1.html">sha1(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key796">aes</a>, <a href="../../../../index.html#key297">block cipher</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;<br>
Copyright &copy; 2012-2014, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/amazon-s3/S3.html.

































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280

<div class='fossil-doc' data-title='S3 - Amazon S3 Web Service Utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">S3(n) 1.0.3 tcllib &quot;Amazon S3 Web Service Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>S3 - Amazon S3 Web Service Interface</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">ERROR REPORTING</a></li>
<li class="doctools_section"><a href="#section3">COMMANDS</a></li>
<li class="doctools_section"><a href="#section4">LOW LEVEL COMMANDS</a></li>
<li class="doctools_section"><a href="#section5">HIGH LEVEL COMMANDS</a></li>
<li class="doctools_section"><a href="#section6">LIMITATIONS</a></li>
<li class="doctools_section"><a href="#section7">USAGE SUGGESTIONS</a></li>
<li class="doctools_section"><a href="#section8">FUTURE DEVELOPMENTS</a></li>
<li class="doctools_section"><a href="#section9">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section10">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">S3 <span class="opt">?1.0.3?</span></b></li>
<li>package require <b class="pkgname">sha1 1.0</b></li>
<li>package require <b class="pkgname">md5 2.0</b></li>
<li>package require <b class="pkgname">base64 2.3</b></li>
<li>package require <b class="pkgname">xsxp 1.0</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">S3::Configure</b> <span class="opt">?<b class="option">-reset</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-retries</b> <i class="arg">integer</i>?</span> <span class="opt">?<b class="option">-accesskeyid</b> <i class="arg">idstring</i>?</span> <span class="opt">?<b class="option">-secretaccesskey</b> <i class="arg">idstring</i>?</span> <span class="opt">?<b class="option">-service-access-point</b> <i class="arg">FQDN</i>?</span> <span class="opt">?<b class="option">-use-tls</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-default-compare</b> <i class="arg">always|never|exists|missing|newer|date|checksum|different</i>?</span> <span class="opt">?<b class="option">-default-separator</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-default-acl</b> <i class="arg">private|public-read|public-read-write|authenticated-read|keep|calc</i>?</span> <span class="opt">?<b class="option">-default-bucket</b> <i class="arg">bucketname</i>?</span></a></li>
<li><a href="#2"><b class="cmd">S3::SuggestBucket</b> <span class="opt">?<i class="arg">name</i>?</span></a></li>
<li><a href="#3"><b class="cmd">S3::REST</b> <i class="arg">dict</i></a></li>
<li><a href="#4"><b class="cmd">S3::ListAllMyBuckets</b> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-parse-xml</b> <i class="arg">xmlstring</i>?</span> <span class="opt">?<b class="option">-result-type</b> <i class="arg">REST|xml|pxml|dict|names|owner</i>?</span></a></li>
<li><a href="#5"><b class="cmd">S3::PutBucket</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-acl</b> <i class="arg">{}|private|public-read|public-read-write|authenticated-read</i>?</span></a></li>
<li><a href="#6"><b class="cmd">S3::DeleteBucket</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span></a></li>
<li><a href="#7"><b class="cmd">S3::GetBucket</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-parse-xml</b> <i class="arg">xmlstring</i>?</span> <span class="opt">?<b class="option">-max-count</b> <i class="arg">integer</i>?</span> <span class="opt">?<b class="option">-prefix</b> <i class="arg">prefixstring</i>?</span> <span class="opt">?<b class="option">-delimiter</b> <i class="arg">delimiterstring</i>?</span> <span class="opt">?<b class="option">-result-type</b> <i class="arg">REST|xml|pxml|names|dict</i>?</span></a></li>
<li><a href="#8"><b class="cmd">S3::Put</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-file</b> <i class="arg">filename</i>?</span> <span class="opt">?<b class="option">-content</b> <i class="arg">contentstring</i>?</span> <span class="opt">?<b class="option">-acl</b> <i class="arg">private|public-read|public-read-write|authenticated-read|calc|keep</i>?</span> <span class="opt">?<b class="option">-content-type</b> <i class="arg">contenttypestring</i>?</span> <span class="opt">?<b class="option">-x-amz-meta-*</b> <i class="arg">metadatatext</i>?</span> <span class="opt">?<b class="option">-compare</b> <i class="arg">comparemode</i>?</span></a></li>
<li><a href="#9"><b class="cmd">S3::Get</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-compare</b> <i class="arg">comparemode</i>?</span> <span class="opt">?<b class="option">-file</b> <i class="arg">filename</i>?</span> <span class="opt">?<b class="option">-content</b> <i class="arg">contentvarname</i>?</span> <span class="opt">?<b class="option">-timestamp</b> <i class="arg">aws|now</i>?</span> <span class="opt">?<b class="option">-headers</b> <i class="arg">headervarname</i>?</span></a></li>
<li><a href="#10"><b class="cmd">S3::Head</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-dict</b> <i class="arg">dictvarname</i>?</span> <span class="opt">?<b class="option">-headers</b> <i class="arg">headersvarname</i>?</span> <span class="opt">?<b class="option">-status</b> <i class="arg">statusvarname</i>?</span></a></li>
<li><a href="#11"><b class="cmd">S3::GetAcl</b> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-result-type</b> <i class="arg">REST|xml|pxml</i>?</span></a></li>
<li><a href="#12"><b class="cmd">S3::PutAcl</b> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-acl</b> <i class="arg">new-acl</i>?</span></a></li>
<li><a href="#13"><b class="cmd">S3::Delete</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-status</b> <i class="arg">statusvar</i>?</span></a></li>
<li><a href="#14"><b class="cmd">S3::Push</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-directory</b> <i class="arg">directoryname</i> <span class="opt">?<b class="option">-prefix</b> <i class="arg">prefixstring</i>?</span> <span class="opt">?<b class="option">-compare</b> <i class="arg">comparemode</i>?</span> <span class="opt">?<b class="option">-x-amz-meta-*</b> <i class="arg">metastring</i>?</span> <span class="opt">?<b class="option">-acl</b> <i class="arg">aclcode</i>?</span> <span class="opt">?<b class="option">-delete</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">throw|break|continue</i>?</span> <span class="opt">?<b class="option">-progress</b> <i class="arg">scriptprefix</i>?</span></a></li>
<li><a href="#15"><b class="cmd">S3::Pull</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-directory</b> <i class="arg">directoryname</i> <span class="opt">?<b class="option">-prefix</b> <i class="arg">prefixstring</i>?</span> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-compare</b> <i class="arg">comparemode</i>?</span> <span class="opt">?<b class="option">-delete</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-timestamp</b> <i class="arg">aws|now</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">throw|break|continue</i>?</span> <span class="opt">?<b class="option">-progress</b> <i class="arg">scriptprefix</i>?</span></a></li>
<li><a href="#16"><b class="cmd">S3::Toss</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-prefix</b> <i class="arg">prefixstring</i> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">throw|break|continue</i>?</span> <span class="opt">?<b class="option">-progress</b> <i class="arg">scriptprefix</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides access to Amazon's Simple Storage Solution web service.</p>
<p>As a quick summary, Amazon Simple Storage Solution
provides a for-fee web service allowing the storage of arbitrary data as
&quot;resources&quot; within &quot;buckets&quot; online.
See <a href="http://www.amazonaws.com/">http://www.amazonaws.com/</a> for details on that system.
Access to the service is via HTTP (SOAP or REST).  Much of this
documentation will not make sense if you're not familiar with
the terms and functionality of the Amazon S3 service.</p>
<p>This package provides services for reading and writing
the data items via the REST interface.  It also provides some
higher-level operations.  Other packages in the same distribution
provide for even more functionality.</p>
<p>Copyright 2006 Darren New. All Rights Reserved.
NO WARRANTIES OF ANY TYPE ARE PROVIDED.
COPYING OR USE INDEMNIFIES THE AUTHOR IN ALL WAYS.
This software is licensed under essentially the same
terms as Tcl. See LICENSE.txt for the terms.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">ERROR REPORTING</a></h2>
<p>The error reporting from this package makes use of $errorCode to
provide more details on what happened than simply throwing an error.
Any error caught by the S3 package (and we try to catch them all)
will return with an $errorCode being a list having at least three
elements. In all cases, the first element will be &quot;S3&quot;. The second
element will take on one of six values, with that element defining
the value of the third and subsequent elements. S3::REST does not
throw an error, but rather returns a dictionary with the keys &quot;error&quot;,
&quot;errorInfo&quot;, and &quot;errorCode&quot; set. This allows for reliable background
use. The possible second elements are these:</p>
<dl class="doctools_definitions">
<dt>usage</dt>
<dd><p>The usage of the package is incorrect. For example,
a command has been invoked which requires the library to be configured
before the library has been configured, or an invalid combination of
options has been specified. The third element of $errorCode supplies
the name of the parameter that was wrong. The fourth usually provides
the arguments that were actually supplied to the throwing proc, unless
the usage error isn't confined to a single proc.</p></dd>
<dt>local</dt>
<dd><p>Something happened on the local system which threw
an error. For example, a request to upload or download a file was made
and the file permissions denied that sort of access. The third element
of $errorCode is the original $errorCode.</p></dd>
<dt>socket</dt>
<dd><p>Something happened with the socket. It closed
prematurely, or some other condition of failure-to-communicate-with-Amazon
was detected. The third element of $errorCode is the original $errorCode,
or sometimes the message from fcopy, or ...?</p></dd>
<dt>remote</dt>
<dd><p>The Amazon web service returned an error code outside
the 2xx range in the HTTP header. In other words, everything went as
documented, except this particular case was documented not to work.
The third element is the dictionary returned from <b class="cmd">::S3::REST</b>.
Note that S3::REST itself never throws this error, but just returns
the dictionary. Most of the higher-level commands throw for convenience,
unless an argument indicates they should not. If something is documented
as &quot;not throwing an S3 remote error&quot;, it means a status return is set
rather than throwing an error if Amazon returns a non-2XX HTTP result code.</p></dd>
<dt>notyet</dt>
<dd><p>The user obeyed the documentation, but the author
has not yet gotten around to implementing this feature. (Right now,
only TLS support and sophisticated permissions fall into this category,
as well as the S3::Acl command.)</p></dd>
<dt>xml</dt>
<dd><p>The service has returned invalid XML, or XML whose
schema is unexpected. For the high-level commands that accept
service XML as input for parsing, this may also be thrown.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">COMMANDS</a></h2>
<p>This package provides several separate levels of complexity.</p>
<ul class="doctools_itemized">
<li><p>The lowest level simply takes arguments to be sent to the service,
sends them, retrieves the result, and provides it to the caller.
<em>Note:</em> This layer allows both synchronous and event-driven
processing. It depends on the MD5 and SHA1 and base64 packages
from Tcllib (available at <a href="http://core.tcl.tk/tcllib/">http://core.tcl.tk/tcllib/</a>).
Note that <b class="cmd">S3::Configure</b> is required for <b class="cmd">S3::REST</b> to
work due to the authentication portion, so we put that in the &quot;lowest level.&quot;</p></li>
<li><p>The next layer parses the results of calls, allowing for functionality
such as uploading only changed files, synchronizing directories,
and so on.  This layer depends on the <b class="package">TclXML</b> package as well as the
included <b class="package"><a href="xsxp.html">xsxp</a></b> package. These packages are package required when
these more-sophisticated routines are called, so nothing breaks if
they are not correctly installed.</p></li>
<li><p>Also included is a separate program that uses the library.
It provides code to parse $argv0 and $argv from the
command line, allowing invocation as a tclkit, etc.
(Not yet implmented.)</p></li>
<li><p>Another separate program provides a GUI interface allowing drag-and-drop
and other such functionality. (Not yet implemented.)</p></li>
<li><p>Also built on this package is the OddJob program. It is
a separate program designed to allow distribution of
computational work units over Amazon's Elastic Compute
Cloud web service.</p></li>
</ul>
<p>The goal is to have at least the bottom-most layers implemented in
pure Tcl using only that which comes from widely-available sources,
such as Tcllib.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">LOW LEVEL COMMANDS</a></h2>
<p>These commands do not require any packages not listed above.
They talk directly to the service, or they are utility or
configuration routines. Note that the &quot;xsxp&quot; package was
written to support this package, so it should be available
wherever you got this package.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">S3::Configure</b> <span class="opt">?<b class="option">-reset</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-retries</b> <i class="arg">integer</i>?</span> <span class="opt">?<b class="option">-accesskeyid</b> <i class="arg">idstring</i>?</span> <span class="opt">?<b class="option">-secretaccesskey</b> <i class="arg">idstring</i>?</span> <span class="opt">?<b class="option">-service-access-point</b> <i class="arg">FQDN</i>?</span> <span class="opt">?<b class="option">-use-tls</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-default-compare</b> <i class="arg">always|never|exists|missing|newer|date|checksum|different</i>?</span> <span class="opt">?<b class="option">-default-separator</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-default-acl</b> <i class="arg">private|public-read|public-read-write|authenticated-read|keep|calc</i>?</span> <span class="opt">?<b class="option">-default-bucket</b> <i class="arg">bucketname</i>?</span></a></dt>
<dd><p>There is one command for configuration, and that is <b class="cmd">S3::Configure</b>.
If called with no arguments, it returns a
dictionary of key/value pairs listing all current settings.  If called
with one argument, it returns the value of that single argument.  If
called with two or more arguments, it must be called with pairs of
arguments, and it applies the changes in order.  There is only one set
of configuration information per interpreter.</p>
<p>The following options are accepted:</p>
<dl class="doctools_definitions">
<dt><b class="option">-reset</b> <i class="arg">boolean</i></dt>
<dd><p>By default, false.  If true, any previous changes and any changes on the
same call before the reset option will be returned to default values.</p></dd>
<dt><b class="option">-retries</b> <i class="arg">integer</i></dt>
<dd><p>Default value is 3.
If Amazon returns a 500 error, a retry after an exponential
backoff delay will be tried this many times before finally
throwing the 500 error. This applies to each call to <b class="cmd">S3::REST</b>
from the higher-level commands, but not to <b class="cmd">S3::REST</b> itself.
That is, <b class="cmd">S3::REST</b> will always return httpstatus 500 if that's
what it receives. Functions like <b class="cmd">S3::Put</b> will retry the PUT call,
and will also retry the GET and HEAD calls used to do content comparison.
Changing this to 0 will prevent retries and their associated delays.
In addition, socket errors (i.e., errors whose errorCode starts with
&quot;S3 socket&quot;) will be similarly retried after backoffs.</p></dd>
<dt><b class="option">-accesskeyid</b> <i class="arg">idstring</i></dt>
<dd></dd>
<dt><b class="option">-secretaccesskey</b> <i class="arg">idstring</i></dt>
<dd><p>Each defaults to an empty string.
These must be set before any calls are made. This is your S3 ID.
Once you sign up for an account, go to <a href="http://www.amazonaws.com/">http://www.amazonaws.com/</a>,
sign in, go to the &quot;Your Web Services Account&quot; button, pick &quot;AWS
Access Identifiers&quot;, and your access key ID and secret access keys
will be available. All <b class="cmd">S3::REST</b> calls are authenticated.
Blame Amazon for the poor choice of names.</p></dd>
<dt><b class="option">-service-access-point</b> <i class="arg">FQDN</i></dt>
<dd><p>Defaults to &quot;s3.amazonaws.com&quot;. This is the fully-qualified domain
name of the server to contact for <b class="cmd">S3::REST</b> calls. You should
probably never need to touch this, unless someone else implements
a compatible service, or you wish to test something by pointing
the library at your own service.</p></dd>
<dt><b class="option">-slop-seconds</b> <i class="arg">integer</i></dt>
<dd><p>When comparing dates between Amazon and the local machine,
two dates within this many seconds of each other are considered
the same. Useful for clock drift correction, processing overhead
time, and so on.</p></dd>
<dt><b class="option">-use-tls</b> <i class="arg">boolean</i></dt>
<dd><p>Defaults to false. This is not yet implemented. If true, <b class="cmd">S3::REST</b> will
negotiate a TLS connection to Amazon. If false, unencrypted connections
are used.</p></dd>
<dt><b class="option">-bucket-prefix</b> <i class="arg">string</i></dt>
<dd><p>Defaults to &quot;TclS3&quot;.  This string is used by <b class="cmd">S3::SuggestBucketName</b>
if that command is passed an empty string as an argument. It is used
to distinguish different applications using the Amazon service.
Your application should always set this to keep from interfering with
the buckets of other users of Amazon S3 or with other buckets of the
same user.</p></dd>
<dt><b class="option">-default-compare</b> <i class="arg">always|never|exists|missing|newer|date|checksum|different</i></dt>
<dd><p>Defaults to &quot;always.&quot; If no -compare is specified on
<b class="cmd">S3::Put</b>, <b class="cmd">S3::Get</b>, or <b class="cmd">S3::Delete</b>, this comparison is used.
See those commands for a description of the meaning.</p></dd>
<dt><b class="option">-default-separator</b> <i class="arg">string</i></dt>
<dd><p>Defaults to &quot;/&quot;. This is currently unused. It might make sense to use
this for <b class="cmd">S3::Push</b> and <b class="cmd">S3::Pull</b>, but allowing resources to
have slashes in their names that aren't marking directories would be
problematic. Hence, this currently does nothing.</p></dd>
<dt><b class="option">-default-acl</b> <i class="arg">private|public-read|public-read-write|authenticated-read|keep|calc</i></dt>
<dd><p>Defaults to an empty string. If no -acl argument is provided to <b class="cmd">S3::Put</b> or
<b class="cmd">S3::Push</b>, this string is used
(given as the x-amz-acl header if not keep or calc). If this is also
empty, no x-amz-acl header is generated.
This is <em>not</em> used by <b class="cmd">S3::REST</b>.</p></dd>
<dt><b class="option">-default-bucket</b> <i class="arg">bucketname</i></dt>
<dd><p>If no bucket is given to <b class="cmd">S3::GetBucket</b>, <b class="cmd">S3::PutBucket</b>,
<b class="cmd">S3::Get</b>, <b class="cmd">S3::Put</b>,
<b class="cmd">S3::Head</b>, <b class="cmd">S3::Acl</b>,
<b class="cmd">S3::Delete</b>, <b class="cmd">S3::Push</b>,
<b class="cmd">S3::Pull</b>, or <b class="cmd">S3::Toss</b>, and if this configuration variable
is not an empty string (and not simply &quot;/&quot;), then this value
will be used for the bucket. This is useful if one program does
a large amount of resource manipulation within a single bucket.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">S3::SuggestBucket</b> <span class="opt">?<i class="arg">name</i>?</span></a></dt>
<dd><p>The <b class="cmd">S3::SuggestBucket</b> command accepts an optional string as
a prefix and returns a valid bucket containing the <i class="arg">name</i> argument
and the Access Key ID. This makes the name unique to the owner and
to the application (assuming the application picks a good <i class="arg">name</i> argument).
If no name is provided,
the name from <b class="cmd">S3::Configure</b> <i class="arg">-bucket-prefix</i> is used.
If that too is empty (which is not the default), an error is thrown.</p></dd>
<dt><a name="3"><b class="cmd">S3::REST</b> <i class="arg">dict</i></a></dt>
<dd><p>The <b class="cmd">S3::REST</b> command takes as an argument a dictionary and
returns a dictionary.  The return dictionary has the same keys
as the input dictionary, and includes additional keys as the result.
The presence or absence of keys in the input dictionary can control
the behavior of the routine.  It never throws an error directly, but
includes keys &quot;error&quot;, &quot;errorInfo&quot;, and &quot;errorCode&quot; if necessary.
Some keys are required, some optional. The routine can run either
in blocking or non-blocking mode, based on the presense
of <b class="option">resultvar</b> in the input dictionary. This requires
the <i class="arg">-accesskeyid</i> and <i class="arg">-secretaccesskey</i> to be configured via
<b class="cmd">S3::Configure</b> before being called.</p>
<p>The possible input keys are these:</p>
<dl class="doctools_definitions">
<dt><b class="option">verb</b> <i class="arg">GET|PUT|DELETE|HEAD</i></dt>
<dd><p>This required item indicates the verb to be used.</p></dd>
<dt><b class="option">resource</b> <i class="arg">string</i></dt>
<dd><p>This required item indicates the resource to be accessed.
A leading / is added if not there already. It will
be URL-encoded for you if necessary. Do not supply a
resource name that is already URL-encoded.</p></dd>
<dt><span class="opt">?<b class="option">rtype</b> <i class="arg">torrent|acl</i>?</span></dt>
<dd><p>This indicates a torrent or acl resource is being manipulated.
Do not include this in the <b class="option">resource</b> key, or the
&quot;?&quot; separator will get URL-encoded.</p></dd>
<dt><span class="opt">?<b class="option">parameters</b> <i class="arg">dict</i>?</span></dt>
<dd><p>This optional dictionary provides parameters added to the URL
for the transaction. The keys must be in the correct case
(which is confusing in the Amazon documentation) and the
values must be valid. This can be an empty dictionary or
omitted entirely if no parameters are desired. No other
error checking on parameters is performed.</p></dd>
<dt><span class="opt">?<b class="option">headers</b> <i class="arg">dict</i>?</span></dt>
<dd><p>This optional dictionary provides headers to be added
to the HTTP request. The keys must be in <em>lower case</em>
for the authentication to work. The values must not contain
embedded newlines or carriage returns. This is primarily
useful for adding x-amz-* headers. Since authentication
is calculated by <b class="cmd">S3::REST</b>, do not add that header here.
Since content-type gets its own key, also do not add
that header here.</p></dd>
<dt><span class="opt">?<b class="option">inbody</b> <i class="arg">contentstring</i>?</span></dt>
<dd><p>This optional item, if provided, gives the content that will
be sent. It is sent with a tranfer encoding of binary, and
only the low bytes are used, so use [encoding convertto utf-8]
if the string is a utf-8 string. This is written all in one blast,
so if you are using non-blocking mode and the <b class="option">inbody</b> is
especially large, you may wind up blocking on the write socket.</p></dd>
<dt><span class="opt">?<b class="option">infile</b> <i class="arg">filename</i>?</span></dt>
<dd><p>This optional item, if provided, and if <b class="option">inbody</b> is not provided,
names the file from which the body of the HTTP message will be
constructed. The file is opened for reading and sent progressively
by [fcopy], so it should not block in non-blocking mode
even if the file is very large. The file is transfered in
binary mode, so the bytes on your disk will match the bytes
in your resource. Due to HTTP restrictions, it must be possible to
use [file size] on this file to determine the size at the
start of the transaction.</p></dd>
<dt><span class="opt">?<b class="option">S3chan</b> <i class="arg">channel</i>?</span></dt>
<dd><p>This optional item, if provided, indicates the already-open socket
over which the transaction should be conducted. If not provided,
a connection is made to the service access point specified via
<b class="cmd">S3::Configure</b>, which is normally s3.amazonaws.com. If this
is provided, the channel is not closed at the end of the transaction.</p></dd>
<dt><span class="opt">?<b class="option">outchan</b> <i class="arg">channel</i>?</span></dt>
<dd><p>This optional item, if provided, indicates the already-open channel
to which the body returned from S3 should be written. That is,
to retrieve a large resource, open a file, set the translation mode,
and pass the channel as the value of the key outchan. Output
will be written to the channel in pieces so memory does not fill
up unnecessarily. The channel is not closed at the end of the transaction.</p></dd>
<dt><span class="opt">?<b class="option">resultvar</b> <i class="arg">varname</i>?</span></dt>
<dd><p>This optional item, if provided, indicates that <b class="cmd">S3::REST</b> should
run in non-blocking mode. The <i class="arg">varname</i> should be fully qualified
with respect to namespaces and cannot be local to a proc. If provided,
the result of the <b class="cmd">S3::REST</b> call is assigned to this variable once
everything has completed; use trace or vwait to know when this has happened.
If this key is not provided, the result is simply returned from the
call to <b class="cmd">S3::REST</b> and no calls to the eventloop are invoked from
within this call.</p></dd>
<dt><span class="opt">?<b class="option">throwsocket</b> <i class="arg">throw|return</i>?</span></dt>
<dd><p>This optional item, if provided, indicates that <b class="cmd">S3::REST</b> should
throw an error if throwmode is throw and a socket error is encountered.
It indicates that <b class="cmd">S3::REST</b> should return the error code in the
returned dictionary if a socket error is encountered and this is
set to return. If <b class="option">throwsocket</b> is set to <i class="arg">return</i> or
if the call is not blocking, then a socket error (i.e., an error
whose error code starts with &quot;S3 socket&quot; will be returned in the
dictionary as <b class="option">error</b>, <b class="option">errorInfo</b>, and <b class="option">errorCode</b>.
If a foreground call is made (i.e., <b class="option">resultvar</b> is not provided),
and this option is not provided or is set to <i class="arg">throw</i>, then
<b class="cmd"><a href="../../../../index.html#key161">error</a></b> will be invoked instead.</p></dd>
</dl>
<p>Once the call to <b class="cmd">S3::REST</b> completes, a new dict is returned,
either in the <i class="arg">resultvar</i> or as the result of execution. This dict is
a copy of the original dict with the results added as new keys. The possible
new keys are these:</p>
<dl class="doctools_definitions">
<dt><b class="option">error</b> <i class="arg">errorstring</i></dt>
<dd></dd>
<dt><b class="option">errorInfo</b> <i class="arg">errorstring</i></dt>
<dd></dd>
<dt><b class="option">errorCode</b> <i class="arg">errorstring</i></dt>
<dd><p>If an error is caught, these three keys will be set in the result.
Note that <b class="cmd">S3::REST</b> does <em>not</em> consider a non-2XX HTTP
return code as an error. The <b class="option">errorCode</b> value will be
formatted according to the <span class="sectref"><a href="#section2">ERROR REPORTING</a></span> description.
If these are present, other keys described here might not be.</p></dd>
<dt><b class="option">httpstatus</b> <i class="arg">threedigits</i></dt>
<dd><p>The three-digit code from the HTTP transaction. 2XX for good,
5XX for server error, etc.</p></dd>
<dt><b class="option">httpmessage</b> <i class="arg">text</i></dt>
<dd><p>The textual result after the status code. &quot;OK&quot; or &quot;Forbidden&quot;
or etc.</p></dd>
<dt><b class="option">outbody</b> <i class="arg">contentstring</i></dt>
<dd><p>If <i class="arg">outchan</i> was not specified, this key will hold a
reference to the (unencoded) contents of the body returned.
If Amazon returned an error (a la the httpstatus not a 2XX value),
the error message will be in <b class="option">outbody</b> or written to
<b class="option">outchan</b> as appropriate.</p></dd>
<dt><b class="option">outheaders</b> <i class="arg">dict</i></dt>
<dd><p>This contains a dictionary of headers returned by Amazon.
The keys are always lower case. It's mainly useful for
finding the x-amz-meta-* headers, if any, although things
like last-modified and content-type are also useful.
The keys of this dictionary are always lower case.
Both keys and values are trimmed of extraneous whitespace.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">HIGH LEVEL COMMANDS</a></h2>
<p>The routines in this section all make use of one or more calls
to <b class="cmd">S3::REST</b> to do their work, then parse and manage the data
in a convenient way.  All these commands throw errors
as described in <span class="sectref"><a href="#section2">ERROR REPORTING</a></span> unless otherwise noted.</p>
<p>In all these commands, all arguments are presented as name/value pairs,
in any order. All the argument names start with a hyphen.</p>
<p>There are a few options that are common to many
of the commands, and those common options are documented here.</p>
<dl class="doctools_definitions">
<dt><b class="option">-blocking</b> <i class="arg">boolean</i></dt>
<dd><p>If provided and specified as false,
then any calls to <b class="cmd">S3:REST</b> will be non-blocking,
and internally these routines will call [vwait] to get
the results. In other words, these routines will return the
same value, but they'll have event loops running while waiting
for Amazon.</p></dd>
<dt><b class="option">-parse-xml</b> <i class="arg">xmlstring</i></dt>
<dd><p>If provided, the routine skips actually communicating with
Amazon, and instead behaves as if the XML string provided
was returned as the body of the call. Since several of
these routines allow the return of data in various formats,
this argument can be used to parse existing XML to extract
the bits of information that are needed. It's also helpful
for testing.</p></dd>
<dt><b class="option">-bucket</b> <i class="arg">bucketname</i></dt>
<dd><p>Almost every high-level command needs to know what bucket
the resources are in. This option specifies that. (Only the
command to list available buckets does not require this parameter.)
This does not need to be URL-encoded, even if it contains
special or non-ASCII characters. May or may not contain leading
or trailing spaces - commands normalize the bucket. If this is
not supplied, the value is taken from <b class="cmd">S3::Configure -default-bucket</b>
if that string isn't empty. Note that spaces and slashes are
always trimmed from both ends and the rest must leave a valid bucket.</p></dd>
<dt><b class="option">-resource</b> <i class="arg">resourcename</i></dt>
<dd><p>This specifies the resource of interest within the bucket.
It may or may not start with a slash - both cases are handled.
This does not need to be URL-encoded, even if it contains
special or non-ASCII characters.</p></dd>
<dt><b class="option">-compare</b> <i class="arg">always|never|exists|missing|newer|date|checksum|different</i></dt>
<dd><p>When commands copy resources to files or files to resources, the caller may specify that the copy should be skipped if the contents are the same. This argument specifies the conditions under which the files should be copied. If it is not passed, the result of <b class="cmd">S3::Configure -default-compare</b> is used, which in turn defaults to &quot;always.&quot; The meanings of the various values are these:</p>
<dl class="doctools_definitions">
<dt><i class="arg">always</i></dt>
<dd><p>Always copy the data. This is the default.</p></dd>
<dt><i class="arg">never</i></dt>
<dd><p>Never copy the data. This is essentially a no-op, except in <b class="cmd">S3::Push</b> and <b class="cmd">S3::Pull</b> where the -delete flag might make a difference.</p></dd>
<dt><i class="arg">exists</i></dt>
<dd><p>Copy the data only if the destination already exists.</p></dd>
<dt><i class="arg">missing</i></dt>
<dd><p>Copy the data only if the destination does not already exist.</p></dd>
<dt><i class="arg">newer</i></dt>
<dd><p>Copy the data if the destination is missing, or if the date on the source is
newer than the date on the destination by at
least <b class="cmd">S3::Configure -slop-seconds</b> seconds. If the source is
Amazon, the date is taken from the Last-Modified header. If the
source is local, it is taken as the mtime of the file. If the source data
is specified in a string rather than a file, it is taken as right now,
via [clock seconds].</p></dd>
<dt><i class="arg">date</i></dt>
<dd><p>Like <i class="arg">newer</i>, except copy if the date is newer <em>or</em> older.</p></dd>
<dt><i class="arg">checksum</i></dt>
<dd><p>Calculate the MD5 checksum on the local file or string, ask Amazon for the eTag
of the resource, and copy the data if they're different. Copy the data
also if the destination is missing. Note that this can be slow with
large local files unless the C version of the MD5 support is available.</p></dd>
<dt><i class="arg">different</i></dt>
<dd><p>Copy the data if the destination does not exist.
If the destination exists and an actual file name was specified
(rather than a content string),
and the date on the file differs from the date on the resource,
copy the data.
If the data is provided as a content string, the &quot;date&quot; is treated
as &quot;right now&quot;, so it will likely always differ unless slop-seconds is large.
If the dates are the same, the MD5 checksums are compared, and the
data is copied if the checksums differ.</p></dd>
</dl>
<p>Note that &quot;newer&quot; and &quot;date&quot; don't care about the contents, and &quot;checksum&quot; doesn't care about the dates, but &quot;different&quot; checks both.</p></dd>
<dt><a name="4"><b class="cmd">S3::ListAllMyBuckets</b> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-parse-xml</b> <i class="arg">xmlstring</i>?</span> <span class="opt">?<b class="option">-result-type</b> <i class="arg">REST|xml|pxml|dict|names|owner</i>?</span></a></dt>
<dd><p>This routine performs a GET on the Amazon S3 service, which is
defined to return a list of buckets owned by the account identified
by the authorization header. (Blame Amazon for the dumb names.)</p>
<dl class="doctools_definitions">
<dt><b class="option">-blocking</b> <i class="arg">boolean</i></dt>
<dd><p>See above for standard definition.</p></dd>
<dt><b class="option">-parse-xml</b> <i class="arg">xmlstring</i></dt>
<dd><p>See above for standard definition.</p></dd>
<dt><b class="option">-result-type</b> <i class="arg">REST</i></dt>
<dd><p>The dictionary returned by <b class="cmd">S3::REST</b> is the return value of <b class="cmd">S3::ListAllMyBuckets</b>. In this case, a non-2XX httpstatus will not throw an error. You may not combine this with <i class="arg">-parse-xml</i>.</p></dd>
<dt><b class="option">-result-type</b> <i class="arg">xml</i></dt>
<dd><p>The raw XML of the body is returned as the result (with no encoding applied).</p></dd>
<dt><b class="option">-result-type</b> <i class="arg">pxml</i></dt>
<dd><p>The XML of the body as parsed by <b class="cmd">xsxp::parse</b> is returned.</p></dd>
<dt><b class="option">-result-type</b> <i class="arg">dict</i></dt>
<dd><p>A dictionary of interesting portions of the XML is returned. The dictionary contains the following keys:</p>
<dl class="doctools_definitions">
<dt>Owner/ID</dt>
<dd><p>The Amazon AWS ID (in hex) of the owner of the bucket.</p></dd>
<dt>Owner/DisplayName</dt>
<dd><p>The Amazon AWS ID's Display Name.</p></dd>
<dt>Bucket/Name</dt>
<dd><p>A list of names, one for each bucket.</p></dd>
<dt>Bucket/CreationDate</dt>
<dd><p>A list of dates, one for each bucket,
in the same order as Bucket/Name, in ISO format (as returned by Amazon).</p></dd>
</dl></dd>
<dt><b class="option">-result-type</b> <i class="arg">names</i></dt>
<dd><p>A list of bucket names is returned with all other information stripped out.
This is the default result type for this command.</p></dd>
<dt><b class="option">-result-type</b> <i class="arg">owner</i></dt>
<dd><p>A list containing two elements is returned. The first element is
the owner's ID, and the second is the owner's display name.</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">S3::PutBucket</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-acl</b> <i class="arg">{}|private|public-read|public-read-write|authenticated-read</i>?</span></a></dt>
<dd><p>This command creates a bucket if it does not already exist. Bucket names are
globally unique, so you may get a &quot;Forbidden&quot; error from Amazon even if you
cannot see the bucket in <b class="cmd">S3::ListAllMyBuckets</b>. See <b class="cmd">S3::SuggestBucket</b> for ways to minimize this risk. The x-amz-acl header comes from the <b class="option">-acl</b> option, or from <b class="cmd">S3::Configure -default-acl</b> if not specified.</p></dd>
<dt><a name="6"><b class="cmd">S3::DeleteBucket</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span></a></dt>
<dd><p>This command deletes a bucket if it is empty and you have such permission.
Note that Amazon's list of buckets is a global resource, requiring
far-flung synchronization. If you delete a bucket, it may be quite
a few minutes (or hours) before you can recreate it, yielding &quot;Conflict&quot;
errors until then.</p></dd>
<dt><a name="7"><b class="cmd">S3::GetBucket</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-parse-xml</b> <i class="arg">xmlstring</i>?</span> <span class="opt">?<b class="option">-max-count</b> <i class="arg">integer</i>?</span> <span class="opt">?<b class="option">-prefix</b> <i class="arg">prefixstring</i>?</span> <span class="opt">?<b class="option">-delimiter</b> <i class="arg">delimiterstring</i>?</span> <span class="opt">?<b class="option">-result-type</b> <i class="arg">REST|xml|pxml|names|dict</i>?</span></a></dt>
<dd><p>This lists the contents of a bucket. That is, it returns a directory
listing of resources within a bucket, rather than transfering any
user data.</p>
<dl class="doctools_definitions">
<dt><b class="option">-bucket</b> <i class="arg">bucketname</i></dt>
<dd><p>The standard bucket argument.</p></dd>
<dt><b class="option">-blocking</b> <i class="arg">boolean</i></dt>
<dd><p>The standard blocking argument.</p></dd>
<dt><b class="option">-parse-xml</b> <i class="arg">xmlstring</i></dt>
<dd><p>The standard parse-xml argument.</p></dd>
<dt><b class="option">-max-count</b> <i class="arg">integer</i></dt>
<dd><p>If supplied, this is the most number of records to be returned.
If not supplied, the code will iterate until all records have been found.
Not compatible with -parse-xml. Note that if this is supplied, only
one call to <b class="cmd">S3::REST</b> will be made. Otherwise, enough calls
will be made to exhaust the listing, buffering results in memory,
so take care if you may have huge buckets.</p></dd>
<dt><b class="option">-prefix</b> <i class="arg">prefixstring</i></dt>
<dd><p>If present, restricts listing to resources with a particular prefix. One
leading / is stripped if present.</p></dd>
<dt><b class="option">-delimiter</b> <i class="arg">delimiterstring</i></dt>
<dd><p>If present, specifies a delimiter for the listing.
The presence of this will summarize multiple resources
into one entry, as if S3 supported directories. See the
Amazon documentation for details.</p></dd>
<dt><b class="option">-result-type</b> <i class="arg">REST|xml|pxml|names|dict</i></dt>
<dd><p>This indicates the format of the return result of the command.</p>
<dl class="doctools_definitions">
<dt>REST</dt>
<dd><p>If <i class="arg">-max-count</i> is specified, the dictionary returned
from <b class="cmd">S3::REST</b> is returned. If <i class="arg">-max-count</i> is
not specified, a list of all the dictionaries returned from
the one or more calls to <b class="cmd">S3::REST</b> is returned.</p></dd>
<dt>xml</dt>
<dd><p>If <i class="arg">-max-count</i> is specified, the body returned
from <b class="cmd">S3::REST</b> is returned. If <i class="arg">-max-count</i> is
not specified, a list of all the bodies returned from
the one or more calls to <b class="cmd">S3::REST</b> is returned.</p></dd>
<dt>pxml</dt>
<dd><p>If <i class="arg">-max-count</i> is specified, the body returned
from <b class="cmd">S3::REST</b> is passed throught <b class="cmd">xsxp::parse</b> and then returned.
If <i class="arg">-max-count</i> is
not specified, a list of all the bodies returned from
the one or more calls to <b class="cmd">S3::REST</b> are each passed through
<b class="cmd">xsxp::parse</b> and then returned.</p></dd>
<dt>names</dt>
<dd><p>Returns a list of all names found in either the Contents/Key fields or
the CommonPrefixes/Prefix fields. If no <i class="arg">-delimiter</i> is specified
and no <i class="arg">-max-count</i> is specified, this returns a list of all
resources with the specified <i class="arg">-prefix</i>.</p></dd>
<dt>dict</dt>
<dd><p>Returns a dictionary. (Returns only one dictionary even if <i class="arg">-max-count</i>
wasn't specified.) The keys of the dictionary are as follows:</p>
<dl class="doctools_definitions">
<dt>Name</dt>
<dd><p>The name of the bucket (from the final call to <b class="cmd">S3::REST</b>).</p></dd>
<dt>Prefix</dt>
<dd><p>From the final call to <b class="cmd">S3::REST</b>.</p></dd>
<dt>Marker</dt>
<dd><p>From the final call to <b class="cmd">S3::REST</b>.</p></dd>
<dt>MaxKeys</dt>
<dd><p>From the final call to <b class="cmd">S3::REST</b>.</p></dd>
<dt>IsTruncated</dt>
<dd><p>From the final call to <b class="cmd">S3::REST</b>, so
always false if <i class="arg">-max-count</i> is not specified.</p></dd>
<dt>NextMarker</dt>
<dd><p>Always provided if IsTruncated is true, and
calculated of Amazon does not provide it. May be empty if IsTruncated is false.</p></dd>
<dt>Key</dt>
<dd><p>A list of names of resources in the bucket matching the <i class="arg">-prefix</i> and <i class="arg">-delimiter</i> restrictions.</p></dd>
<dt>LastModified</dt>
<dd><p>A list of times of resources in the bucket, in the same
order as Key, in the format returned by Amazon. (I.e., it is not parsed into
a seconds-from-epoch.)</p></dd>
<dt>ETag</dt>
<dd><p>A list of entity tags (a.k.a. MD5 checksums) in the same order as Key.</p></dd>
<dt>Size</dt>
<dd><p>A list of sizes in bytes of the resources, in the same order as Key.</p></dd>
<dt>Owner/ID</dt>
<dd><p>A list of owners of the resources in the bucket, in the same order as Key.</p></dd>
<dt>Owner/DisplayName</dt>
<dd><p>A list of owners of the resources in the bucket, in the same order as Key. These are the display names.</p></dd>
<dt>CommonPrefixes/Prefix</dt>
<dd><p>A list of prefixes common to multiple entities. This is present only if <i class="arg">-delimiter</i> was supplied.</p></dd>
</dl></dd>
</dl></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">S3::Put</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-file</b> <i class="arg">filename</i>?</span> <span class="opt">?<b class="option">-content</b> <i class="arg">contentstring</i>?</span> <span class="opt">?<b class="option">-acl</b> <i class="arg">private|public-read|public-read-write|authenticated-read|calc|keep</i>?</span> <span class="opt">?<b class="option">-content-type</b> <i class="arg">contenttypestring</i>?</span> <span class="opt">?<b class="option">-x-amz-meta-*</b> <i class="arg">metadatatext</i>?</span> <span class="opt">?<b class="option">-compare</b> <i class="arg">comparemode</i>?</span></a></dt>
<dd><p>This command sends data to a resource on Amazon's servers for storage,
using the HTTP PUT command. It returns 0 if the <b class="option">-compare</b> mode
prevented the transfer, 1 if the transfer worked, or throws an error
if the transfer was attempted but failed.
Server 5XX errors and S3 socket errors are retried
according to <b class="cmd">S3:Configure -retries</b> settings before throwing an error;
other errors throw immediately.</p>
<dl class="doctools_definitions">
<dt><b class="option">-bucket</b></dt>
<dd><p>This specifies the bucket into which the resource will be written.
Leading and/or trailing slashes are removed for you, as are spaces.</p></dd>
<dt><b class="option">-resource</b></dt>
<dd><p>This is the full name of the resource within the bucket. A single
leading slash is removed, but not a trailing slash.
Spaces are not trimmed.</p></dd>
<dt><b class="option">-blocking</b></dt>
<dd><p>The standard blocking flag.</p></dd>
<dt><b class="option">-file</b></dt>
<dd><p>If this is specified, the <i class="arg">filename</i> must exist, must be readable,
and must not be a special or directory file. [file size] must
apply to it and must not change for the lifetime of the call.  The
default content-type is calculated based on the name and/or contents
of the file. Specifying this is an error if <b class="option">-content</b> is
also specified, but at least one of <b class="option">-file</b> or <b class="option">-content</b> must
be specified. (The file is allowed to not exist or not be readable if
<b class="option">-compare</b> <i class="arg">never</i> is specified.)</p></dd>
<dt><b class="option">-content</b></dt>
<dd><p>If this is specified, the <i class="arg">contentstring</i> is sent as the body
of the resource. The content-type defaults to &quot;application/octet-string&quot;.
Only the low bytes are sent, so non-ASCII should use the appropriate encoding
(such as [encoding convertto utf-8]) before passing it
to this routine, if necessary. Specifying this is an error if <b class="option">-file</b>
is also specified, but at least one of <b class="option">-file</b> or <b class="option">-content</b> must
be specified.</p></dd>
<dt><b class="option">-acl</b></dt>
<dd><p>This defaults to <b class="cmd">S3::Configure -default-acl</b> if not specified.
It sets the x-amz-acl header on the PUT operation.
If the value provided is <i class="arg">calc</i>, the x-amz-acl header is
calculated based on the I/O permissions of the file to be uploaded;
it is an error to specify <i class="arg">calc</i> and <b class="option">-content</b>.
If the value provided is <i class="arg">keep</i>, the acl of the resource
is read before the PUT (or the default is used if the
resource does not exist), then set back to what it
was after the PUT (if it existed). An error will occur if
the resource is successfully written but the kept ACL cannot
be then applied. This should never happen.
<em>Note:</em>  <i class="arg">calc</i> is not currently fully implemented.</p></dd>
<dt><b class="option">-x-amz-meta-*</b></dt>
<dd><p>If any header starts with &quot;-x-amz-meta-&quot;, its contents are added to the
PUT command to be stored as metadata with the resource. Again, no
encoding is performed, and the metadata should not contain characters
like newlines, carriage returns, and so on. It is best to stick with
simple ASCII strings, or to fix the library in several places.</p></dd>
<dt><b class="option">-content-type</b></dt>
<dd><p>This overrides the content-type calculated by <b class="option">-file</b> or
sets the content-type for <b class="option">-content</b>.</p></dd>
<dt><b class="option">-compare</b></dt>
<dd><p>This is the standard compare mode argument. <b class="cmd">S3::Put</b> returns
1 if the data was copied or 0 if the data was skipped due to
the comparison mode so indicating it should be skipped.</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">S3::Get</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-compare</b> <i class="arg">comparemode</i>?</span> <span class="opt">?<b class="option">-file</b> <i class="arg">filename</i>?</span> <span class="opt">?<b class="option">-content</b> <i class="arg">contentvarname</i>?</span> <span class="opt">?<b class="option">-timestamp</b> <i class="arg">aws|now</i>?</span> <span class="opt">?<b class="option">-headers</b> <i class="arg">headervarname</i>?</span></a></dt>
<dd><p>This command retrieves data from a resource on Amazon's S3 servers,
using the HTTP GET command. It returns 0 if the <b class="option">-compare</b> mode
prevented the transfer, 1 if the transfer worked, or throws an error
if the transfer was attempted but failed. Server 5XX errors and S3 socket
errors are are retried
according to <b class="cmd">S3:Configure</b> settings before throwing an error;
other errors throw immediately. Note that this is always authenticated
as the user configured in via <b class="cmd">S3::Configure -accesskeyid</b>. Use
the Tcllib http for unauthenticated GETs.</p>
<dl class="doctools_definitions">
<dt><b class="option">-bucket</b></dt>
<dd><p>This specifies the bucket from which the resource will be read.
Leading and/or trailing slashes are removed for you, as are spaces.</p></dd>
<dt><b class="option">-resource</b></dt>
<dd><p>This is the full name of the resource within the bucket. A single
leading slash is removed, but not a trailing slash.
Spaces are not trimmed.</p></dd>
<dt><b class="option">-blocking</b></dt>
<dd><p>The standard blocking flag.</p></dd>
<dt><b class="option">-file</b></dt>
<dd><p>If this is specified, the body of the resource will be read into this file,
incrementally without pulling it entirely into memory first. The parent
directory must already exist. If the file already exists, it must be
writable. If an error is thrown part-way through the process and the
file already existed, it may be clobbered. If an error is thrown part-way
through the process and the file did not already exist, any partial
bits will be deleted. Specifying this is an error if <b class="option">-content</b>
is also specified, but at least one of <b class="option">-file</b> or <b class="option">-content</b> must
be specified.</p></dd>
<dt><b class="option">-timestamp</b></dt>
<dd><p>This is only valid in conjunction with <b class="option">-file</b>. It may be specified
as <i class="arg">now</i> or <i class="arg">aws</i>. The default is <i class="arg">now</i>. If <i class="arg">now</i>, the file's
modification date is left up to the system. If <i class="arg">aws</i>, the file's
mtime is set to match the Last-Modified header on the resource, synchronizing
the two appropriately for <b class="option">-compare</b> <i class="arg">date</i> or
<b class="option">-compare</b> <i class="arg">newer</i>.</p></dd>
<dt><b class="option">-content</b></dt>
<dd><p>If this is specified, the <i class="arg">contentvarname</i> is a variable in the caller's
scope (not necessarily global) that receives the value of the body of
the resource. No encoding is done, so if the resource (for example) represents
a UTF-8 byte sequence, use [encoding convertfrom utf-8] to get a valid
UTF-8 string. If this is specified, the <b class="option">-compare</b> is ignored unless
it is <i class="arg">never</i>, in which case no assignment to <i class="arg">contentvarname</i> is
performed. Specifying this is an error if <b class="option">-file</b> is also specified,
but at least one of <b class="option">-file</b> or <b class="option">-content</b> must be specified.</p></dd>
<dt><b class="option">-compare</b></dt>
<dd><p>This is the standard compare mode argument. <b class="cmd">S3::Get</b> returns
1 if the data was copied or 0 if the data was skipped due to
the comparison mode so indicating it should be skipped.</p></dd>
<dt><b class="option">-headers</b></dt>
<dd><p>If this is specified, the headers resulting from the fetch are stored
in the provided variable, as a dictionary. This will include content-type
and x-amz-meta-* headers, as well as the usual HTTP headers, the x-amz-id
debugging headers, and so on. If no file is fetched (due to <b class="option">-compare</b>
or other errors), no assignment to this variable is performed.</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">S3::Head</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-dict</b> <i class="arg">dictvarname</i>?</span> <span class="opt">?<b class="option">-headers</b> <i class="arg">headersvarname</i>?</span> <span class="opt">?<b class="option">-status</b> <i class="arg">statusvarname</i>?</span></a></dt>
<dd><p>This command requests HEAD from the resource.
It returns whether a 2XX code was returned as a result
of the request, never throwing an S3 remote error.
That is, if this returns 1, the resource exists and is
accessible. If this returns 0, something went wrong, and the
<b class="option">-status</b> result can be consulted for details.</p>
<dl class="doctools_definitions">
<dt><b class="option">-bucket</b></dt>
<dd><p>This specifies the bucket from which the resource will be read.
Leading and/or trailing slashes are removed for you, as are spaces.</p></dd>
<dt><b class="option">-resource</b></dt>
<dd><p>This is the full name of the resource within the bucket. A single
leading slash is removed, but not a trailing slash.
Spaces are not trimmed.</p></dd>
<dt><b class="option">-blocking</b></dt>
<dd><p>The standard blocking flag.</p></dd>
<dt><b class="option">-dict</b></dt>
<dd><p>If specified, the resulting dictionary from the <b class="cmd">S3::REST</b>
call is assigned to the indicated (not necessarily global) variable
in the caller's scope.</p></dd>
<dt><b class="option">-headers</b></dt>
<dd><p>If specified, the dictionary of headers from the result are assigned
to the indicated (not necessarily global) variable in the caller's scope.</p></dd>
<dt><b class="option">-status</b></dt>
<dd><p>If specified, the indicated (not necessarily global) variable in
the caller's scope is assigned a 2-element list. The first element is
the 3-digit HTTP status code, while the second element is
the HTTP message (such as &quot;OK&quot; or &quot;Forbidden&quot;).</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">S3::GetAcl</b> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-result-type</b> <i class="arg">REST|xml|pxml</i>?</span></a></dt>
<dd><p>This command gets the ACL of the indicated resource or throws an
error if it is unavailable.</p>
<dl class="doctools_definitions">
<dt><b class="option">-blocking</b> <i class="arg">boolean</i></dt>
<dd><p>See above for standard definition.</p></dd>
<dt><b class="option">-bucket</b></dt>
<dd><p>This specifies the bucket from which the resource will be read.
Leading and/or trailing slashes are removed for you, as are spaces.</p></dd>
<dt><b class="option">-resource</b></dt>
<dd><p>This is the full name of the resource within the bucket. A single
leading slash is removed, but not a trailing slash.
Spaces are not trimmed.</p></dd>
<dt><b class="option">-parse-xml</b> <i class="arg">xml</i></dt>
<dd><p>The XML from a previous GetACL can be passed in to be parsed into
dictionary form.  In this case, -result-type must be pxml or dict.</p></dd>
<dt><b class="option">-result-type</b> <i class="arg">REST</i></dt>
<dd><p>The dictionary returned by <b class="cmd">S3::REST</b> is the return value of
<b class="cmd">S3::GetAcl</b>.  In this case, a non-2XX httpstatus will not throw an
error.</p></dd>
<dt><b class="option">-result-type</b> <i class="arg">xml</i></dt>
<dd><p>The raw XML of the body is returned as the result (with no encoding applied).</p></dd>
<dt><b class="option">-result-type</b> <i class="arg">pxml</i></dt>
<dd><p>The XML of the body as parsed by <b class="cmd">xsxp::parse</b> is returned.</p></dd>
<dt><b class="option">-result-type</b> <i class="arg">dict</i></dt>
<dd><p>This fetches the ACL, parses it, and returns a dictionary of two elements.</p>
<p>The first element has the key &quot;owner&quot; whose value is the canonical ID of the owner of the resource.</p>
<p>The second element has the key &quot;acl&quot; whose value is a dictionary.  Each
key in the dictionary is one of Amazon's permissions, namely &quot;READ&quot;,
&quot;WRITE&quot;, &quot;READ_ACP&quot;, &quot;WRITE_ACP&quot;, or &quot;FULL_CONTROL&quot;.  Each value of each
key is a list of canonical IDs or group URLs that have that permission.
Elements are not in the list in any particular order, and not all keys
are necessarily present.  Display names are not returned, as they are
not especially useful; use pxml to obtain them if necessary.</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">S3::PutAcl</b> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-acl</b> <i class="arg">new-acl</i>?</span></a></dt>
<dd><p>This sets the ACL on the indicated resource. It returns the XML written to the ACL, or throws an error if anything went wrong.</p>
<dl class="doctools_definitions">
<dt><b class="option">-blocking</b> <i class="arg">boolean</i></dt>
<dd><p>See above for standard definition.</p></dd>
<dt><b class="option">-bucket</b></dt>
<dd><p>This specifies the bucket from which the resource will be read.
Leading and/or trailing slashes are removed for you, as are spaces.</p></dd>
<dt><b class="option">-resource</b></dt>
<dd><p>This is the full name of the resource within the bucket. A single
leading slash is removed, but not a trailing slash.
Spaces are not trimmed.</p></dd>
<dt><b class="option">-owner</b></dt>
<dd><p>If this is provided, it is assumed to match the owner of the resource.
Otherwise, a GET may need to be issued against the resource to find
the owner. If you already have the owner (such as from a call
to <b class="cmd">S3::GetAcl</b>, you can pass the value of the &quot;owner&quot; key
as the value of this option, and it will be used in the construction
of the XML.</p></dd>
<dt><b class="option">-acl</b></dt>
<dd><p>If this option is specified, it provides the ACL the caller wishes
to write to the resource. If this is not supplied or is empty,
the value is taken from <b class="cmd">S3::Configure -default-acl</b>.
The ACL is written with a PUT to the ?acl resource.</p>
<p>If the value passed to this option
starts with &quot;&lt;&quot;, it is taken to be a body to be PUT to the ACL resource.</p>
<p>If the value matches one of the standard Amazon x-amz-acl headers (i.e.,
a canned access policy), that header is translated to XML and then
applied. The canned access policies are private, public-read,
public-read-write, and authenticated-read (in lower case).</p>
<p>Otherwise, the value is assumed to be a dictionary formatted as the
&quot;acl&quot; sub-entry within the dict returns by <b class="cmd">S3::GetAcl -result-type dict</b>.
The proper XML is generated and applied to the resource.  Note that a
value containing &quot;//&quot; is assumed to be a group, a value containing &quot;@&quot;
is assumed to be an AmazonCustomerByEmail, and otherwise the value is
assumed to be a canonical Amazon ID.</p>
<p>Note that you cannot change the owner, so calling GetAcl on a resource
owned by one user and applying it via PutAcl on a resource owned by
another user may not do exactly what you expect.</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">S3::Delete</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-resource</b> <i class="arg">resourcename</i> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-status</b> <i class="arg">statusvar</i>?</span></a></dt>
<dd><p>This command deletes the specified resource from the specified bucket.
It returns 1 if the resource was deleted successfully, 0 otherwise.
It returns 0 rather than throwing an S3 remote error.</p>
<dl class="doctools_definitions">
<dt><b class="option">-bucket</b></dt>
<dd><p>This specifies the bucket from which the resource will be deleted.
Leading and/or trailing slashes are removed for you, as are spaces.</p></dd>
<dt><b class="option">-resource</b></dt>
<dd><p>This is the full name of the resource within the bucket. A single
leading slash is removed, but not a trailing slash.
Spaces are not trimmed.</p></dd>
<dt><b class="option">-blocking</b></dt>
<dd><p>The standard blocking flag.</p></dd>
<dt><b class="option">-status</b></dt>
<dd><p>If specified, the indicated (not necessarily global) variable
in the caller's scope is set to a two-element list. The first
element is the 3-digit HTTP status code. The second element
is the HTTP message (such as &quot;OK&quot; or &quot;Forbidden&quot;). Note that
Amazon's DELETE result is 204 on success, that being the
code indicating no content in the returned body.</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">S3::Push</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-directory</b> <i class="arg">directoryname</i> <span class="opt">?<b class="option">-prefix</b> <i class="arg">prefixstring</i>?</span> <span class="opt">?<b class="option">-compare</b> <i class="arg">comparemode</i>?</span> <span class="opt">?<b class="option">-x-amz-meta-*</b> <i class="arg">metastring</i>?</span> <span class="opt">?<b class="option">-acl</b> <i class="arg">aclcode</i>?</span> <span class="opt">?<b class="option">-delete</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">throw|break|continue</i>?</span> <span class="opt">?<b class="option">-progress</b> <i class="arg">scriptprefix</i>?</span></a></dt>
<dd><p>This synchronises a local directory with a remote bucket
by pushing the differences using <b class="cmd">S3::Put</b>. Note that
if something has changed in the bucket but not locally,
those changes could be lost. Thus, this is not a general
two-way synchronization primitive. (See <b class="cmd">S3::Sync</b>
for that.) Note too that resource names are case sensitive,
so changing the case of a file on a Windows machine may lead
to otherwise-unnecessary transfers.
Note that only regular files are considered, so devices, pipes, symlinks,
and directories are not copied.</p>
<dl class="doctools_definitions">
<dt><b class="option">-bucket</b></dt>
<dd><p>This names the bucket into which data will be pushed.</p></dd>
<dt><b class="option">-directory</b></dt>
<dd><p>This names the local directory from which files will be taken.
It must exist, be readable via [glob] and so on. If only
some of the files therein are readable, <b class="cmd">S3::Push</b> will PUT
those files that are readable and return in its results the list
of files that could not be opened.</p></dd>
<dt><b class="option">-prefix</b></dt>
<dd><p>This names the prefix that will be added to all resources.
That is, it is the remote equivalent of <b class="option">-directory</b>.
If it is not specified, the root of the bucket will be treated
as the remote directory. An example may clarify.</p>
<pre class="doctools_example">
S3::Push -bucket test -directory /tmp/xyz -prefix hello/world
</pre>
<p>In this example, /tmp/xyz/pdq.html will be stored as
http://s3.amazonaws.com/test/hello/world/pdq.html in Amazon's servers. Also,
/tmp/xyz/abc/def/Hello will be stored as
http://s3.amazonaws.com/test/hello/world/abc/def/Hello in Amazon's servers.
Without the <b class="option">-prefix</b> option, /tmp/xyz/pdq.html would be stored
as http://s3.amazonaws.com/test/pdq.html.</p></dd>
<dt><b class="option">-blocking</b></dt>
<dd><p>This is the standard blocking option.</p></dd>
<dt><b class="option">-compare</b></dt>
<dd><p>If present, this is passed to each invocation of <b class="cmd">S3::Put</b>.
Naturally, <b class="cmd">S3::Configure -default-compare</b> is used
if this is not specified.</p></dd>
<dt><b class="option">-x-amz-meta-*</b></dt>
<dd><p>If present, this is passed to each invocation of <b class="cmd">S3::Put</b>. All copied
files will have the same metadata.</p></dd>
<dt><b class="option">-acl</b></dt>
<dd><p>If present, this is passed to each invocation of <b class="cmd">S3::Put</b>.</p></dd>
<dt><b class="option">-delete</b></dt>
<dd><p>This defaults to false. If true, resources in the destination that
are not in the source directory are deleted with <b class="cmd">S3::Delete</b>.
Since only regular files are considered, the existance of a symlink,
pipe, device, or directory in the local source will <em>not</em>
prevent the deletion of a remote resource with a corresponding name.</p></dd>
<dt><b class="option">-error</b></dt>
<dd><p>This controls the behavior of <b class="cmd">S3::Push</b> in the event that
<b class="cmd">S3::Put</b> throws an error. Note that
errors encountered on the local file system or in reading the
list of resources in the remote bucket always throw errors.
This option allows control over &quot;partial&quot; errors, when some
files were copied and some were not. <b class="cmd">S3::Delete</b> is always
finished up, with errors simply recorded in the return result.</p>
<dl class="doctools_definitions">
<dt>throw</dt>
<dd><p>The error is rethrown with the same errorCode.</p></dd>
<dt>break</dt>
<dd><p>Processing stops without throwing an error, the error is recorded
in the return value, and the command returns with a normal return.
The calls to <b class="cmd">S3::Delete</b> are not started.</p></dd>
<dt>continue</dt>
<dd><p>This is the default. Processing continues without throwing,
recording the error in the return result, and resuming with the
next file in the local directory to be copied.</p></dd>
</dl></dd>
<dt><b class="option">-progress</b></dt>
<dd><p>If this is specified and the indicated script prefix is not empty, the
indicated script prefix will be invoked several times in the caller's
context with additional arguments at various points in the processing.
This allows progress reporting without backgrounding.  The provided
prefix will be invoked with additional arguments, with the first
additional argument indicating what part of the process is being
reported on.  The prefix is initially invoked with <i class="arg">args</i> as the
first additional argument and a dictionary representing the normalized
arguments to the <b class="cmd">S3::Push</b> call as the second additional argument.
Then the prefix is invoked with <i class="arg">local</i> as the first additional
argument and a list of suffixes of the files to be considered as the
second argument.  Then the prefix is invoked with <i class="arg">remote</i> as the
first additional argument and a list of suffixes existing in the remote
bucket as the second additional argument.  Then, for each file in the
local list, the prefix will be invoked with <i class="arg">start</i> as the first
additional argument and the common suffix as the second additional
argument.  When <b class="cmd">S3::Put</b> returns for that file, the prefix will be
invoked with <i class="arg">copy</i> as the first additional argument, the common
suffix as the second additional argument, and a third argument that will
be &quot;copied&quot; (if <b class="cmd">S3::Put</b> sent the resource), &quot;skipped&quot; (if
<b class="cmd">S3::Put</b> decided not to based on <b class="option">-compare</b>), or the errorCode
that <b class="cmd">S3::Put</b> threw due to unexpected errors (in which case the
third argument is a list that starts with &quot;S3&quot;). When all files have
been transfered, the prefix may be invoked zero or more times with
<i class="arg">delete</i> as the first additional argument and the suffix of the
resource being deleted as the second additional argument, with a third
argument being either an empty string (if the delete worked) or the
errorCode from <b class="cmd">S3::Delete</b> if it failed. Finally, the prefix
will be invoked with <i class="arg">finished</i> as the first additional argument
and the return value as the second additional argument.</p></dd>
</dl>
<p>The return result from this command is a dictionary. They keys are the
suffixes (i.e., the common portion of the path after the <b class="option">-directory</b>
and <b class="option">-prefix</b>), while the values are either &quot;copied&quot;, &quot;skipped&quot; (if
<b class="option">-compare</b> indicated not to copy the file), or the errorCode
thrown by <b class="cmd">S3::Put</b>, as appropriate. If <b class="option">-delete</b> was true,
there may also be entries for suffixes with the value &quot;deleted&quot; or
&quot;notdeleted&quot;, indicating whether the attempted <b class="cmd">S3::Delete</b>
worked or not, respectively. There is one additional pair in the return
result, whose key is the empty string and whose value is a nested dictionary.
The keys of this nested dictionary include &quot;filescopied&quot; (the number of
files successfully copied), &quot;bytescopied&quot; (the number of data bytes in
the files copied, excluding headers, metadata, etc), &quot;compareskipped&quot; (the
number of files not copied due to <b class="option">-compare</b> mode), &quot;errorskipped&quot;
(the number of files not copied due to thrown errors), &quot;filesdeleted&quot;
(the number of resources deleted due to not having corresponding files
locally, or 0 if <b class="option">-delete</b> is false), and &quot;filesnotdeleted&quot;
(the number of resources whose deletion was attempted but failed).</p>
<p>Note that this is currently implemented somewhat inefficiently.
It fetches the bucket listing (including timestamps and eTags),
then calls <b class="cmd">S3::Put</b>, which uses HEAD to find the timestamps
and eTags again. Correcting this with no API change
is planned for a future upgrade.</p></dd>
<dt><a name="15"><b class="cmd">S3::Pull</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-directory</b> <i class="arg">directoryname</i> <span class="opt">?<b class="option">-prefix</b> <i class="arg">prefixstring</i>?</span> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-compare</b> <i class="arg">comparemode</i>?</span> <span class="opt">?<b class="option">-delete</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-timestamp</b> <i class="arg">aws|now</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">throw|break|continue</i>?</span> <span class="opt">?<b class="option">-progress</b> <i class="arg">scriptprefix</i>?</span></a></dt>
<dd><p>This synchronises a remote bucket with a local directory by pulling the
differences using <b class="cmd">S3::Get</b> If something has been changed locally but not
in the bucket, those difference may be lost. This is not a general two-way
synchronization mechanism. (See <b class="cmd">S3::Sync</b> for that.)
This creates directories
if needed; new directories are created with default permissions. Note that
resource names are case sensitive, so changing the case of a file on a
Windows machine may lead to otherwise-unnecessary transfers. Also, try not
to store data in resources that end with a slash, or which are prefixes of
resources that otherwise would start with a slash; i.e., don't use this if
you store data in resources whose names have to be directories locally.</p>
<p>Note that this is currently implemented somewhat inefficiently.
It fetches the bucket listing (including timestamps and eTags),
then calls <b class="cmd">S3::Get</b>, which uses HEAD to find the timestamps
and eTags again. Correcting this with no API change
is planned for a future upgrade.</p>
<dl class="doctools_definitions">
<dt><b class="option">-bucket</b></dt>
<dd><p>This names the bucket from which data will be pulled.</p></dd>
<dt><b class="option">-directory</b></dt>
<dd><p>This names the local directory into which files will be written
It must exist, be readable via [glob], writable for file creation,
and so on. If only some of the files therein are writable,
<b class="cmd">S3::Pull</b> will GET
those files that are writable and return in its results the list
of files that could not be opened.</p></dd>
<dt><b class="option">-prefix</b></dt>
<dd><p>The prefix of resources that will be considered for retrieval.
See <b class="cmd">S3::Push</b> for more details, examples, etc. (Of course,
<b class="cmd">S3::Pull</b> reads rather than writes, but the prefix is
treated similarly.)</p></dd>
<dt><b class="option">-blocking</b></dt>
<dd><p>This is the standard blocking option.</p></dd>
<dt><b class="option">-compare</b></dt>
<dd><p>This is passed to each invocation of <b class="cmd">S3::Get</b> if provided.
Naturally, <b class="cmd">S3::Configure -default-compare</b> is
used if this is not provided.</p></dd>
<dt><b class="option">-timestamp</b></dt>
<dd><p>This is passed to each invocation of <b class="cmd">S3::Get</b> if provided.</p></dd>
<dt><b class="option">-delete</b></dt>
<dd><p>If this is specified and true, files that exist in the <b class="option">-directory</b>
that are not in the <b class="option">-prefix</b> will be deleted after all resources
have been copied. In addition, empty directories (other than the
top-level <b class="option">-directory</b>) will be deleted, as
Amazon S3 has no concept of an empty directory.</p></dd>
<dt><b class="option">-error</b></dt>
<dd><p>See <b class="cmd">S3::Push</b> for a description of this option.</p></dd>
<dt><b class="option">-progress</b></dt>
<dd><p>See <b class="cmd">S3::Push</b> for a description of this option.
It differs slightly in that local directories may be included
with a trailing slash to indicate they are directories.</p></dd>
</dl>
<p>The return value from this command is a dictionary. It
is identical in form and meaning to the description of the
return result of <b class="cmd">S3::Push</b>. It differs only in that
directories may be included, with a trailing slash in their name,
if they are empty and get deleted.</p></dd>
<dt><a name="16"><b class="cmd">S3::Toss</b> <span class="opt">?<b class="option">-bucket</b> <i class="arg">bucketname</i>?</span> <b class="option">-prefix</b> <i class="arg">prefixstring</i> <span class="opt">?<b class="option">-blocking</b> <i class="arg">boolean</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">throw|break|continue</i>?</span> <span class="opt">?<b class="option">-progress</b> <i class="arg">scriptprefix</i>?</span></a></dt>
<dd><p>This deletes some or all resources within a bucket. It would be
considered a &quot;recursive delete&quot; had Amazon implemented actual
directories.</p>
<dl class="doctools_options">
<dt><b class="option">-bucket</b></dt>
<dd><p>The bucket from which resources will be deleted.</p></dd>
<dt><b class="option"><b class="option">-blocking</b></b></dt>
<dd><p>The standard blocking option.</p></dd>
<dt><b class="option"><b class="option">-prefix</b></b></dt>
<dd><p>The prefix for resources to be deleted. Any resource that
starts with this string will be deleted. This is required.
To delete everything in the bucket, pass an empty string
for the prefix.</p></dd>
<dt><b class="option"><b class="option">-error</b></b></dt>
<dd><p>If this is &quot;throw&quot;, <b class="cmd">S3::Toss</b> rethrows any errors
it encounters.  If this is &quot;break&quot;, <b class="cmd">S3::Toss</b> returns
with a normal return after the first error, recording that
error in the return result. If this is &quot;continue&quot;, which is
the default, <b class="cmd">S3::Toss</b> continues on and lists all
errors in the return result.</p></dd>
<dt><b class="option"><b class="option">-progress</b></b></dt>
<dd><p>If this is specified and not an empty string, the script
prefix will be invoked several times in the context of the caller
with additional arguments appended.  Initially, it will be invoked
with the first additional argument being <i class="arg">args</i> and the second
being the processed list of arguments to <b class="cmd">S3::Toss</b>. Then it
is invoked with <i class="arg">remote</i> as the first additional argument and
the list of suffixes in the bucket to be deleted as the second
additional argument. Then it is invoked with the first additional
argument being <i class="arg">delete</i> and the second additional argument being
the suffix deleted and the third additional argument being &quot;deleted&quot;
or &quot;notdeleted&quot; depending on whether <b class="cmd">S3::Delete</b> threw an error.
Finally, the script prefix is invoked with a first additional argument
of &quot;finished&quot; and a second additional argument of the return value.</p></dd>
</dl>
<p>The return value is a dictionary. The keys are the suffixes of files
that <b class="cmd">S3::Toss</b> attempted to delete, and whose values are either
the string &quot;deleted&quot; or &quot;notdeleted&quot;. There is also one additional
pair, whose key is the empty string and whose value is an embedded
dictionary. The keys of this embedded dictionary include
&quot;filesdeleted&quot; and &quot;filesnotdeleted&quot;, each of which has integer values.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">LIMITATIONS</a></h2>
<ul class="doctools_itemized">
<li><p>The pure-Tcl MD5 checking is slow. If you are processing
files in the megabyte range, consider ensuring binary support is available.</p></li>
<li><p>The commands <b class="cmd">S3::Pull</b> and <b class="cmd">S3::Push</b> fetch a
directory listing which includes timestamps and MD5 hashes,
then invoke <b class="cmd">S3::Get</b> and <b class="cmd">S3::Put</b>. If
a complex <b class="option">-compare</b> mode is specified, <b class="cmd">S3::Get</b> and
<b class="cmd">S3::Put</b> will invoke a HEAD operation for each file to fetch
timestamps and MD5 hashes of each resource again. It is expected that
a future release of this package will solve this without any API changes.</p></li>
<li><p>The commands <b class="cmd">S3::Pull</b> and <b class="cmd">S3::Push</b> fetch a
directory listing without using <b class="option">-max-count</b>. The entire
directory is pulled into memory at once. For very large buckets,
this could be a performance problem. The author, at this time,
does not plan to change this behavior. Welcome to Open Source.</p></li>
<li><p><b class="cmd">S3::Sync</b> is neither designed nor implemented yet.
The intention would be to keep changes synchronised, so changes
could be made to both the bucket and the local directory and
be merged by <b class="cmd">S3::Sync</b>.</p></li>
<li><p>Nor is
<b class="option">-compare</b> <i class="arg">calc</i> fully implemented. This is primarily due to
Windows not providing a convenient method for distinguishing between
local files that are &quot;public-read&quot; or &quot;public-read-write&quot;. Assistance
figuring out TWAPI for this would be appreciated. The U**X semantics
are difficult to map directly as well. See the source for details.
Note that there are not tests for calc, since it isn't done yet.</p></li>
<li><p>The HTTP processing is implemented within the library,
rather than using a &quot;real&quot; HTTP package. Hence, multi-line headers
are not (yet) handled correctly. Do not include carriage returns or
linefeeds in x-amz-meta-* headers, content-type values, and so on.
The author does not at this time expect to improve this.</p></li>
<li><p>Internally, <b class="cmd">S3::Push</b> and <b class="cmd">S3::Pull</b> and <b class="cmd">S3::Toss</b>
are all very similar and should be refactored.</p></li>
<li><p>The idea of using <b class="option">-compare</b> <i class="arg">never</i>
<b class="option">-delete</b> <i class="arg">true</i> to delete files that have been
deleted from one place but not the other yet not copying
changed files is untested.</p></li>
</ul>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">USAGE SUGGESTIONS</a></h2>
<p>To fetch a &quot;directory&quot; out of a bucket, make changes, and store it back:</p>
<pre class="doctools_example">
file mkdir ./tempfiles
S3::Pull -bucket sample -prefix of/interest -directory ./tempfiles \
  -timestamp aws
do_my_process ./tempfiles other arguments
S3::Push -bucket sample -prefix of/interest -directory ./tempfiles \
  -compare newer -delete true
</pre>
<p>To delete files locally that were deleted off of S3 but not otherwise
update files:</p>
<pre class="doctools_example">
S3::Pull -bucket sample -prefix of/interest -directory ./myfiles \
  -compare never -delete true
</pre>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">FUTURE DEVELOPMENTS</a></h2>
<p>The author intends to work on several additional projects related to
this package, in addition to finishing the unfinished features.</p>
<p>First, a command-line program allowing browsing of buckets and
transfer of files from shell scripts and command prompts is useful.</p>
<p>Second, a GUI-based program allowing visual manipulation of
bucket and resource trees not unlike Windows Explorer would
be useful.</p>
<p>Third, a command-line (and perhaps a GUI-based) program called
&quot;OddJob&quot; that will use S3 to synchronize computation amongst
multiple servers running OddJob. An S3 bucket will be set up
with a number of scripts to run, and the OddJob program can
be invoked on multiple machines to run scripts on all the machines,
each moving on to the next unstarted task as it finishes each.
This is still being designed, and it is intended primarily
to be run on Amazon's Elastic Compute Cloud.</p>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section10" class="doctools_section"><h2><a name="section10">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>amazon-s3</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key522">amazon</a>, <a href="../../../../index.html#key523">cloud</a>, <a href="../../../../index.html#key521">s3</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>2006,2008 Darren New. All Rights Reserved. See LICENSE.TXT for terms.</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/amazon-s3/xsxp.html.





























































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<div class='fossil-doc' data-title='xsxp - Amazon S3 Web Service Utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">xsxp(n) 1.0 tcllib &quot;Amazon S3 Web Service Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>xsxp - eXtremely Simple Xml Parser</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">xsxp 1</b></li>
<li>package require <b class="pkgname">xml</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">xsxp::parse</b> <i class="arg">xml</i></a></li>
<li><a href="#2"><b class="cmd">xsxp::fetch</b> <i class="arg">pxml</i> <i class="arg">path</i> <span class="opt">?<i class="arg">part</i>?</span></a></li>
<li><a href="#3"><b class="cmd">xsxp::fetchall</b> <i class="arg">pxml_list</i> <i class="arg">path</i> <span class="opt">?<i class="arg">part</i>?</span></a></li>
<li><a href="#4"><b class="cmd">xsxp::only</b> <i class="arg">pxml</i> <i class="arg">tagname</i></a></li>
<li><a href="#5"><b class="cmd">xsxp::prettyprint</b> <i class="arg">pxml</i> <span class="opt">?<i class="arg">chan</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a simple interface to parse XML into a pure-value list.
It also provides accessor routines to pull out specific subtags,
not unlike DOM access.
This package was written for and is used by Darren New's Amazon S3 access package.</p>
<p>This is pretty lame, but I needed something like this for S3,
and at the time, TclDOM would not work with the new 8.5 Tcl
due to version number problems.</p>
<p>In addition, this is a pure-value implementation. There is no
garbage to clean up in the event of a thrown error, for example.
This simplifies the code for sufficiently small XML documents,
which is what Amazon's S3 guarantees.</p>
<p>Copyright 2006 Darren New. All Rights Reserved.
NO WARRANTIES OF ANY TYPE ARE PROVIDED.
COPYING OR USE INDEMNIFIES THE AUTHOR IN ALL WAYS.
This software is licensed under essentially the same
terms as Tcl. See LICENSE.txt for the terms.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<p>The package implements five rather simple procedures.
One parses, one is for debugging, and the rest pull various
parts of the parsed document out for processing.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">xsxp::parse</b> <i class="arg">xml</i></a></dt>
<dd><p>This parses an XML document (using the standard xml tcllib module in a SAX sort of way) and builds a data structure which it returns if the parsing succeeded. The return value is referred to herein as a &quot;pxml&quot;, or &quot;parsed xml&quot;. The list consists of two or more elements:</p>
<ul class="doctools_itemized">
<li><p>The first element is the name of the tag.</p></li>
<li><p>The second element is an array-get formatted list of key/value pairs. The keys are attribute names and the values are attribute values. This is an empty list if there are no attributes on the tag.</p></li>
<li><p>The third through end elements are the children of the node, if any. Each child is, recursively, a pxml.</p></li>
<li><p>Note that if the zero'th element, i.e. the tag name, is &quot;%PCDATA&quot;, then
the attributes will be empty and the third element will be the text of the element. In addition, if an element's contents consists only of PCDATA, it will have only one child, and all the PCDATA will be concatenated. In other words,
this parser works poorly for XML with elements that contain both child tags and PCDATA.  Since Amazon S3 does not do this (and for that matter most
uses of XML where XML is a poor choice don't do this), this is probably
not a serious limitation.</p></li>
</ul></dd>
<dt><a name="2"><b class="cmd">xsxp::fetch</b> <i class="arg">pxml</i> <i class="arg">path</i> <span class="opt">?<i class="arg">part</i>?</span></a></dt>
<dd><p><i class="arg">pxml</i> is a parsed XML, as returned from xsxp::parse.
<i class="arg">path</i> is a list of element tag names. Each element is the name
of a child to look up, optionally followed by a
hash (&quot;#&quot;) and a string of digits. An empty list or an initial empty element
selects <i class="arg">pxml</i>. If no hash sign is present, the behavior is as if &quot;#0&quot;
had been appended to that element. (In addition to a list, slashes can separate subparts where convenient.)</p>
<p>An element of <i class="arg">path</i> scans the children at the indicated level
for the n'th instance of a child whose tag matches the part of the
element before the hash sign. If an element is simply &quot;#&quot;  followed
by digits, that indexed child is selected, regardless of the tags
in the children. Hence, an element of &quot;#3&quot; will always select
the fourth child of the node under consideration.</p>
<p><i class="arg">part</i> defaults to &quot;%ALL&quot;. It can be one of the following case-sensitive terms:</p>
<dl class="doctools_definitions">
<dt>%ALL</dt>
<dd><p>returns the entire selected element.</p></dd>
<dt>%TAGNAME</dt>
<dd><p>returns lindex 0 of the selected element.</p></dd>
<dt>%ATTRIBUTES</dt>
<dd><p>returns index 1 of the selected element.</p></dd>
<dt>%CHILDREN</dt>
<dd><p>returns lrange 2 through end of the selected element,
resulting in a list of elements being returned.</p></dd>
<dt>%PCDATA</dt>
<dd><p>returns a concatenation of all the bodies of
direct children of this node whose tag is %PCDATA.
It throws an error if no such children are found. That
is, part=%PCDATA means return the textual content found
in that node but not its children nodes.</p></dd>
<dt>%PCDATA?</dt>
<dd><p>is like %PCDATA, but returns an empty string if
no PCDATA is found.</p></dd>
</dl>
<p>For example, to fetch the first bold text from the fifth paragraph of the body of your HTML file,</p>
<pre class="doctools_example">xsxp::fetch $pxml {body p#4 b} %PCDATA</pre>
</dd>
<dt><a name="3"><b class="cmd">xsxp::fetchall</b> <i class="arg">pxml_list</i> <i class="arg">path</i> <span class="opt">?<i class="arg">part</i>?</span></a></dt>
<dd><p>This iterates over each PXML in <i class="arg">pxml_list</i> (which must be a list
of pxmls) selecting the indicated path from it, building a new list
with the selected data, and returning that new list.</p>
<p>For example, <i class="arg">pxml_list</i> might be
the %CHILDREN of a particular element, and the <i class="arg">path</i> and <i class="arg">part</i>
might select from each child a sub-element in which we're interested.</p></dd>
<dt><a name="4"><b class="cmd">xsxp::only</b> <i class="arg">pxml</i> <i class="arg">tagname</i></a></dt>
<dd><p>This iterates over the direct children of <i class="arg">pxml</i> and selects only
those with <i class="arg">tagname</i> as their tag. Returns a list of matching
elements.</p></dd>
<dt><a name="5"><b class="cmd">xsxp::prettyprint</b> <i class="arg">pxml</i> <span class="opt">?<i class="arg">chan</i>?</span></a></dt>
<dd><p>This outputs to <i class="arg">chan</i> (default stdout) a pretty-printed
version of <i class="arg">pxml</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>amazon-s3</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key754">dom</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key755">xml</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>2006 Darren New. All Rights Reserved.</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/asn/asn.html.





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498

<div class='fossil-doc' data-title='asn - ASN.1 processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">asn(n) 0.8 tcllib &quot;ASN.1 processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>asn - ASN.1 BER encoder/decoder</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">ENCODER</a></li>
<li class="doctools_subsection"><a href="#subsection2">DECODER</a></li>
<li class="doctools_subsection"><a href="#subsection3">HANDLING TAGS</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">asn <span class="opt">?0.8.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::asn::asnSequence</b> <i class="arg">evalue</i>...</a></li>
<li><a href="#2"><b class="cmd">::asn::asnSequenceFromList</b> <i class="arg">elist</i></a></li>
<li><a href="#3"><b class="cmd">::asn::asnSet</b> <i class="arg">evalue</i>...</a></li>
<li><a href="#4"><b class="cmd">::asn::asnSetFromList</b> <i class="arg">elist</i></a></li>
<li><a href="#5"><b class="cmd">::asn::asnApplicationConstr</b> <i class="arg">appNumber</i> <i class="arg">evalue</i>...</a></li>
<li><a href="#6"><b class="cmd">::asn::asnApplication</b> <i class="arg">appNumber</i> <i class="arg">data</i></a></li>
<li><a href="#7"><b class="cmd">::asn::asnChoice</b> <i class="arg">appNumber</i> <i class="arg">evalue</i>...</a></li>
<li><a href="#8"><b class="cmd">::asn::asnChoiceConstr</b> <i class="arg">appNumber</i> <i class="arg">evalue</i>...</a></li>
<li><a href="#9"><b class="cmd">::asn::asnInteger</b> <i class="arg">number</i></a></li>
<li><a href="#10"><b class="cmd">::asn::asnEnumeration</b> <i class="arg">number</i></a></li>
<li><a href="#11"><b class="cmd">::asn::asnBoolean</b> <i class="arg">bool</i></a></li>
<li><a href="#12"><b class="cmd">::asn::asnContext</b> <i class="arg">context</i> <i class="arg">data</i></a></li>
<li><a href="#13"><b class="cmd">::asn::asnContextConstr</b> <i class="arg">context</i> <i class="arg">evalue</i>...</a></li>
<li><a href="#14"><b class="cmd">::asn::asnObjectIdentifier</b> <i class="arg">idlist</i></a></li>
<li><a href="#15"><b class="cmd">::asn::asnUTCTime</b> <i class="arg">utcstring</i></a></li>
<li><a href="#16"><b class="cmd">::asn::asnNull</b></a></li>
<li><a href="#17"><b class="cmd">::asn::asnBitString</b> <i class="arg">string</i></a></li>
<li><a href="#18"><b class="cmd">::asn::asnOctetString</b> <i class="arg">string</i></a></li>
<li><a href="#19"><b class="cmd">::asn::asnNumericString</b> <i class="arg">string</i></a></li>
<li><a href="#20"><b class="cmd">::asn::asnPrintableString</b> <i class="arg">string</i></a></li>
<li><a href="#21"><b class="cmd">::asn::asnIA5String</b> <i class="arg">string</i></a></li>
<li><a href="#22"><b class="cmd">::asn::asnBMPString</b> <i class="arg">string</i></a></li>
<li><a href="#23"><b class="cmd">::asn::asnUTF8String</b> <i class="arg">string</i></a></li>
<li><a href="#24"><b class="cmd">::asn::asnString</b> <i class="arg">string</i></a></li>
<li><a href="#25"><b class="cmd">::asn::defaultStringType</b> <span class="opt">?<i class="arg">type</i>?</span></a></li>
<li><a href="#26"><b class="cmd">::asn::asnPeekByte</b> <i class="arg">data_var</i> <i class="arg">byte_var</i></a></li>
<li><a href="#27"><b class="cmd">::asn::asnGetLength</b> <i class="arg">data_var</i> <i class="arg">length_var</i></a></li>
<li><a href="#28"><b class="cmd">::asn::asnGetResponse</b> <i class="arg">chan</i> <i class="arg">data_var</i></a></li>
<li><a href="#29"><b class="cmd">::asn::asnGetInteger</b> <i class="arg">data_var</i> <i class="arg">int_var</i></a></li>
<li><a href="#30"><b class="cmd">::asn::asnGetEnumeration</b> <i class="arg">data_var</i> <i class="arg">enum_var</i></a></li>
<li><a href="#31"><b class="cmd">::asn::asnGetOctetString</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></li>
<li><a href="#32"><b class="cmd">::asn::asnGetString</b> <i class="arg">data_var</i> <i class="arg">string_var</i> <span class="opt">?<i class="arg">type_var</i>?</span></a></li>
<li><a href="#33"><b class="cmd">::asn::asnGetNumericString</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></li>
<li><a href="#34"><b class="cmd">::asn::asnGetPrintableString</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></li>
<li><a href="#35"><b class="cmd">::asn::asnGetIA5String</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></li>
<li><a href="#36"><b class="cmd">::asn::asnGetBMPString</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></li>
<li><a href="#37"><b class="cmd">::asn::asnGetUTF8String</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></li>
<li><a href="#38"><b class="cmd">::asn::asnGetUTCTime</b> <i class="arg">data_var</i> <i class="arg">utc_var</i></a></li>
<li><a href="#39"><b class="cmd">::asn::asnGetBitString</b> <i class="arg">data_var</i> <i class="arg">bits_var</i></a></li>
<li><a href="#40"><b class="cmd">::asn::asnGetObjectIdentifier</b> <i class="arg">data_var</i> <i class="arg">oid_var</i></a></li>
<li><a href="#41"><b class="cmd">::asn::asnGetBoolean</b> <i class="arg">data_var</i> <i class="arg">bool_var</i></a></li>
<li><a href="#42"><b class="cmd">::asn::asnGetNull</b> <i class="arg">data_var</i></a></li>
<li><a href="#43"><b class="cmd">::asn::asnGetSequence</b> <i class="arg">data_var</i> <i class="arg">sequence_var</i></a></li>
<li><a href="#44"><b class="cmd">::asn::asnGetSet</b> <i class="arg">data_var</i> <i class="arg">set_var</i></a></li>
<li><a href="#45"><b class="cmd">::asn::asnGetApplication</b> <i class="arg">data_var</i> <i class="arg">appNumber_var</i> <span class="opt">?<i class="arg">content_var</i>?</span> <span class="opt">?<i class="arg">encodingType_var</i>?</span></a></li>
<li><a href="#46"><b class="cmd">::asn::asnGetContext</b> <i class="arg">data_var</i> <i class="arg">contextNumber_var</i> <span class="opt">?<i class="arg">content_var</i>?</span> <span class="opt">?<i class="arg">encodingType_var</i>?</span></a></li>
<li><a href="#47"><b class="cmd">::asn::asnPeekTag</b> <i class="arg">data_var</i> <i class="arg">tag_var</i> <i class="arg">tagtype_var</i> <i class="arg">constr_var</i></a></li>
<li><a href="#48"><b class="cmd">::asn::asnTag</b> <i class="arg">tagnumber</i> <span class="opt">?<i class="arg">class</i>?</span> <span class="opt">?<i class="arg">tagstyle</i>?</span></a></li>
<li><a href="#49"><b class="cmd">::asn::asnRetag</b> <i class="arg">data_var</i> <i class="arg">newTag</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">asn</b> package provides <em>partial</em> de- and encoder
commands for BER encoded ASN.1 data. It can also be used for
decoding DER, which is a restricted subset of BER.</p>
<p>ASN.1 is a standard <i class="term">Abstract Syntax Notation</i>, and BER are its
<i class="term">Basic Encoding Rules</i>.</p>
<p>See <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">http://asn1.elibel.tm.fr/en/standards/index.htm</a> for more
information about the standard.</p>
<p>Also see <a href="http://luca.ntop.org/Teaching/Appunti/asn1.html">http://luca.ntop.org/Teaching/Appunti/asn1.html</a> for
<em>A Layman's Guide to a Subset of ASN.1, BER, and DER</em>, an RSA
Laboratories Technical Note by Burton S. Kaliski Jr. (Revised November
1, 1993). A text version of this note is part of the module sources
and should be read by any implementor.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">ENCODER</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::asn::asnSequence</b> <i class="arg">evalue</i>...</a></dt>
<dd><p>Takes zero or more encoded values, packs them into an ASN sequence and
returns its encoded binary form.</p></dd>
<dt><a name="2"><b class="cmd">::asn::asnSequenceFromList</b> <i class="arg">elist</i></a></dt>
<dd><p>Takes a list of encoded values, packs them into an ASN sequence and
returns its encoded binary form.</p></dd>
<dt><a name="3"><b class="cmd">::asn::asnSet</b> <i class="arg">evalue</i>...</a></dt>
<dd><p>Takes zero or more encoded values, packs them into an ASN set and
returns its encoded binary form.</p></dd>
<dt><a name="4"><b class="cmd">::asn::asnSetFromList</b> <i class="arg">elist</i></a></dt>
<dd><p>Takes a list of encoded values, packs them into an ASN set and
returns its encoded binary form.</p></dd>
<dt><a name="5"><b class="cmd">::asn::asnApplicationConstr</b> <i class="arg">appNumber</i> <i class="arg">evalue</i>...</a></dt>
<dd><p>Takes zero or more encoded values, packs them into an ASN application
construct and returns its encoded binary form.</p></dd>
<dt><a name="6"><b class="cmd">::asn::asnApplication</b> <i class="arg">appNumber</i> <i class="arg">data</i></a></dt>
<dd><p>Takes a single encoded value <i class="arg">data</i>, packs it into an ASN
application construct and returns its encoded binary form.</p></dd>
<dt><a name="7"><b class="cmd">::asn::asnChoice</b> <i class="arg">appNumber</i> <i class="arg">evalue</i>...</a></dt>
<dd><p>Takes zero or more encoded values, packs them into an ASN choice
construct and returns its encoded binary form.</p></dd>
<dt><a name="8"><b class="cmd">::asn::asnChoiceConstr</b> <i class="arg">appNumber</i> <i class="arg">evalue</i>...</a></dt>
<dd><p>Takes zero or more encoded values, packs them into an ASN choice
construct and returns its encoded binary form.</p></dd>
<dt><a name="9"><b class="cmd">::asn::asnInteger</b> <i class="arg">number</i></a></dt>
<dd><p>Returns the encoded form of the specified integer
<i class="arg">number</i>.</p></dd>
<dt><a name="10"><b class="cmd">::asn::asnEnumeration</b> <i class="arg">number</i></a></dt>
<dd><p>Returns the encoded form of the specified enumeration id
<i class="arg">number</i>.</p></dd>
<dt><a name="11"><b class="cmd">::asn::asnBoolean</b> <i class="arg">bool</i></a></dt>
<dd><p>Returns the encoded form of the specified boolean value
<i class="arg">bool</i>.</p></dd>
<dt><a name="12"><b class="cmd">::asn::asnContext</b> <i class="arg">context</i> <i class="arg">data</i></a></dt>
<dd><p>Takes an encoded value and packs it into a constructed value with
application tag, the <i class="arg">context</i> number.</p></dd>
<dt><a name="13"><b class="cmd">::asn::asnContextConstr</b> <i class="arg">context</i> <i class="arg">evalue</i>...</a></dt>
<dd><p>Takes zero or more encoded values and packs them into a constructed
value with application tag, the <i class="arg">context</i> number.</p></dd>
<dt><a name="14"><b class="cmd">::asn::asnObjectIdentifier</b> <i class="arg">idlist</i></a></dt>
<dd><p>Takes a list of at least 2 integers describing an object identifier
(OID) value, and returns the encoded value.</p></dd>
<dt><a name="15"><b class="cmd">::asn::asnUTCTime</b> <i class="arg">utcstring</i></a></dt>
<dd><p>Returns the encoded form of the specified UTC time string.</p></dd>
<dt><a name="16"><b class="cmd">::asn::asnNull</b></a></dt>
<dd><p>Returns the NULL encoding.</p></dd>
<dt><a name="17"><b class="cmd">::asn::asnBitString</b> <i class="arg">string</i></a></dt>
<dd><p>Returns the encoded form of the specified <i class="arg">string</i>.</p></dd>
<dt><a name="18"><b class="cmd">::asn::asnOctetString</b> <i class="arg">string</i></a></dt>
<dd><p>Returns the encoded form of the specified <i class="arg">string</i>.</p></dd>
<dt><a name="19"><b class="cmd">::asn::asnNumericString</b> <i class="arg">string</i></a></dt>
<dd><p>Returns the <i class="arg">string</i> encoded as ASN.1 NumericString. Raises an
error if the <i class="arg">string</i> contains characters other than decimal
numbers and space.</p></dd>
<dt><a name="20"><b class="cmd">::asn::asnPrintableString</b> <i class="arg">string</i></a></dt>
<dd><p>Returns the <i class="arg">string</i> encoding as ASN.1 PrintableString. Raises an
error if the <i class="arg">string</i> contains characters which are not allowed by
the Printable String datatype. The allowed characters are A-Z, a-z,
0-9, space, apostrophe, colon, parentheses, plus, minus, comma,
period, forward slash, question mark, and the equals sign.</p></dd>
<dt><a name="21"><b class="cmd">::asn::asnIA5String</b> <i class="arg">string</i></a></dt>
<dd><p>Returns the <i class="arg">string</i> encoded as ASN.1 IA5String. Raises an error
if the <i class="arg">string</i> contains any characters outside of the US-ASCII
range.</p></dd>
<dt><a name="22"><b class="cmd">::asn::asnBMPString</b> <i class="arg">string</i></a></dt>
<dd><p>Returns the <i class="arg">string</i> encoded as ASN.1 Basic Multilingual Plane
string (Which is essentialy big-endian UCS2).</p></dd>
<dt><a name="23"><b class="cmd">::asn::asnUTF8String</b> <i class="arg">string</i></a></dt>
<dd><p>Returns the <i class="arg">string</i> encoded as UTF8 String. Note that some legacy
applications such as Windows CryptoAPI do not like UTF8 strings. Use
BMPStrings if you are not sure.</p></dd>
<dt><a name="24"><b class="cmd">::asn::asnString</b> <i class="arg">string</i></a></dt>
<dd><p>Returns an encoded form of <i class="arg">string</i>, choosing the most restricted
ASN.1 string type possible. If the string contains non-ASCII
characters, then there is more than one string type which can be
used. See <b class="cmd">::asn::defaultStringType</b>.</p></dd>
<dt><a name="25"><b class="cmd">::asn::defaultStringType</b> <span class="opt">?<i class="arg">type</i>?</span></a></dt>
<dd><p>Selects the string type to use for the encoding of non-ASCII
strings. Returns current default when called without argument. If the
argument <i class="arg">type</i> is supplied, it should be either <b class="const">UTF8</b> or
<b class="const">BMP</b> to choose UTF8String or BMPString respectively.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">DECODER</a></h3>
<p>General notes:</p>
<ol class="doctools_enumerated">
<li><p>Nearly all decoder commands take two arguments. These arguments are variable
names, except for <b class="cmd">::asn::asnGetResponse</b>. The first variable
contains the encoded ASN value to decode at the beginning, and more,
and the second variable is where the value is stored to. The remainder
of the input after the decoded value is stored back into the
datavariable.</p></li>
<li><p>After extraction the data variable is always modified first, before by
writing the extracted value to its variable. This means that if both
arguments refer to the same variable, it will always contain the
extracted value after the call, and not the remainder of the input.</p></li>
</ol>
<dl class="doctools_definitions">
<dt><a name="26"><b class="cmd">::asn::asnPeekByte</b> <i class="arg">data_var</i> <i class="arg">byte_var</i></a></dt>
<dd><p>Retrieve the first byte of the data, without modifing <i class="arg">data_var</i>.
This can be used to check for implicit tags.</p></dd>
<dt><a name="27"><b class="cmd">::asn::asnGetLength</b> <i class="arg">data_var</i> <i class="arg">length_var</i></a></dt>
<dd><p>Decode the length information for a block of BER data. The tag has already
to be removed from the data.</p></dd>
<dt><a name="28"><b class="cmd">::asn::asnGetResponse</b> <i class="arg">chan</i> <i class="arg">data_var</i></a></dt>
<dd><p>Reads an encoded ASN <em>sequence</em> from the channel <i class="arg">chan</i> and
stores it into the variable named by <i class="arg">data_var</i>.</p></dd>
<dt><a name="29"><b class="cmd">::asn::asnGetInteger</b> <i class="arg">data_var</i> <i class="arg">int_var</i></a></dt>
<dd><p>Assumes that an encoded integer value is at the front of the data
stored in the variable named <i class="arg">data_var</i>, extracts and stores it
into the variable named by <i class="arg">int_var</i>. Additionally removes all
bytes associated with the value from the data for further processing
by the following decoder commands.</p></dd>
<dt><a name="30"><b class="cmd">::asn::asnGetEnumeration</b> <i class="arg">data_var</i> <i class="arg">enum_var</i></a></dt>
<dd><p>Assumes that an enumeration id is at the front of the data stored in
the variable named <i class="arg">data_var</i>, and stores it into the variable
named by <i class="arg">enum_var</i>. Additionally removes all bytes associated
with the value from the data for further processing by the following
decoder commands.</p></dd>
<dt><a name="31"><b class="cmd">::asn::asnGetOctetString</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></dt>
<dd><p>Assumes that a string is at the front of the data stored in the
variable named <i class="arg">data_var</i>, and stores it into the variable named
by <i class="arg">string_var</i>. Additionally removes all bytes associated with
the value from the data for further processing by the following
decoder commands.</p></dd>
<dt><a name="32"><b class="cmd">::asn::asnGetString</b> <i class="arg">data_var</i> <i class="arg">string_var</i> <span class="opt">?<i class="arg">type_var</i>?</span></a></dt>
<dd><p>Decodes a user-readable string. This is a convenience function which
is able to automatically distinguish all supported ASN.1 string types
and convert the input value appropriately.
See <b class="cmd">::asn::asnGetPrintableString</b>, <b class="cmd">::asnGetIA5String</b>, etc.
below for the type-specific conversion commands.</p>
<p>If the optional third argument <i class="arg">type_var</i> is supplied, then the
type of the incoming string is stored in the variable named by it.</p>
<p>The function throws the error
&quot;Invalid command name asnGetSome<b class="variable">UnsupportedString</b>&quot; if the
unsupported string type <b class="variable">Unsupported</b> is encountered. You can
create the appropriate function
&quot;asn::asnGetSome<b class="variable">UnsupportedString</b>&quot; in your application if
neccessary.</p></dd>
<dt><a name="33"><b class="cmd">::asn::asnGetNumericString</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></dt>
<dd><p>Assumes that a numeric string value is at the front of the data stored
in the variable named <i class="arg">data_var</i>, and stores it into the variable
named by <i class="arg">string_var</i>. Additionally removes all bytes associated
with the value from the data for further processing by the following
decoder commands.</p></dd>
<dt><a name="34"><b class="cmd">::asn::asnGetPrintableString</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></dt>
<dd><p>Assumes that a printable string value is at the front of the data
stored in the variable named <i class="arg">data_var</i>, and stores it into the
variable named by <i class="arg">string_var</i>. Additionally removes all bytes
associated with the value from the data for further processing by the
following decoder commands.</p></dd>
<dt><a name="35"><b class="cmd">::asn::asnGetIA5String</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></dt>
<dd><p>Assumes that a IA5 (ASCII) string value is at the front of the data
stored in the variable named <i class="arg">data_var</i>, and stores it into the
variable named by <i class="arg">string_var</i>. Additionally removes all bytes
associated with the value from the data for further processing by the
following decoder commands.</p></dd>
<dt><a name="36"><b class="cmd">::asn::asnGetBMPString</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></dt>
<dd><p>Assumes that a BMP (two-byte unicode) string value is at the front of
the data stored in the variable named <i class="arg">data_var</i>, and stores it
into the variable named by <i class="arg">string_var</i>, converting it into a
proper Tcl string. Additionally removes all bytes associated with the
value from the data for further processing by the following decoder
commands.</p></dd>
<dt><a name="37"><b class="cmd">::asn::asnGetUTF8String</b> <i class="arg">data_var</i> <i class="arg">string_var</i></a></dt>
<dd><p>Assumes that a UTF8 string value is at the front of the data stored in
the variable named <i class="arg">data_var</i>, and stores it into the variable
named by <i class="arg">string_var</i>, converting it into a proper Tcl string.
Additionally removes all bytes associated with the value from the data
for further processing by the following decoder commands.</p></dd>
<dt><a name="38"><b class="cmd">::asn::asnGetUTCTime</b> <i class="arg">data_var</i> <i class="arg">utc_var</i></a></dt>
<dd><p>Assumes that a UTC time value is at the front of the data stored in the
variable named <i class="arg">data_var</i>, and stores it into the variable named
by <i class="arg">utc_var</i>. The UTC time value is stored as a string, which has to
be decoded with the usual clock scan commands.
Additionally removes all bytes associated with the
value from the data for further processing by the following decoder
commands.</p></dd>
<dt><a name="39"><b class="cmd">::asn::asnGetBitString</b> <i class="arg">data_var</i> <i class="arg">bits_var</i></a></dt>
<dd><p>Assumes that a bit string value is at the front of the data stored in the
variable named <i class="arg">data_var</i>, and stores it into the variable named
by <i class="arg">bits_var</i> as a string containing only 0 and 1.
Additionally removes all bytes associated with the
value from the data for further processing by the following decoder
commands.</p></dd>
<dt><a name="40"><b class="cmd">::asn::asnGetObjectIdentifier</b> <i class="arg">data_var</i> <i class="arg">oid_var</i></a></dt>
<dd><p>Assumes that a object identifier (OID) value is at the front of the data
stored in the variable named <i class="arg">data_var</i>, and stores it into the variable
named by <i class="arg">oid_var</i> as a list of integers.
Additionally removes all bytes associated with the
value from the data for further processing by the following decoder
commands.</p></dd>
<dt><a name="41"><b class="cmd">::asn::asnGetBoolean</b> <i class="arg">data_var</i> <i class="arg">bool_var</i></a></dt>
<dd><p>Assumes that a boolean value is at the front of the data stored in the
variable named <i class="arg">data_var</i>, and stores it into the variable named
by <i class="arg">bool_var</i>. Additionally removes all bytes associated with the
value from the data for further processing by the following decoder
commands.</p></dd>
<dt><a name="42"><b class="cmd">::asn::asnGetNull</b> <i class="arg">data_var</i></a></dt>
<dd><p>Assumes that a NULL value is at the front of the data stored in the
variable named <i class="arg">data_var</i> and removes the bytes used to encode it
from the data.</p></dd>
<dt><a name="43"><b class="cmd">::asn::asnGetSequence</b> <i class="arg">data_var</i> <i class="arg">sequence_var</i></a></dt>
<dd><p>Assumes that an ASN sequence is at the front of the data stored in the
variable named <i class="arg">data_var</i>, and stores it into the variable named
by <i class="arg">sequence_var</i>. Additionally removes all bytes associated with
the value from the data for further processing by the following
decoder commands.</p>
<p>The data in <i class="arg">sequence_var</i> is encoded binary and has to be
further decoded according to the definition of the sequence, using the
decoder commands here.</p></dd>
<dt><a name="44"><b class="cmd">::asn::asnGetSet</b> <i class="arg">data_var</i> <i class="arg">set_var</i></a></dt>
<dd><p>Assumes that an ASN set is at the front of the data stored in the
variable named <i class="arg">data_var</i>, and stores it into the variable named
by <i class="arg">set_var</i>. Additionally removes all bytes associated with the
value from the data for further processing by the following decoder
commands.</p>
<p>The data in <i class="arg">set_var</i> is encoded binary and has to be further
decoded according to the definition of the set, using the decoder
commands here.</p></dd>
<dt><a name="45"><b class="cmd">::asn::asnGetApplication</b> <i class="arg">data_var</i> <i class="arg">appNumber_var</i> <span class="opt">?<i class="arg">content_var</i>?</span> <span class="opt">?<i class="arg">encodingType_var</i>?</span></a></dt>
<dd><p>Assumes that an ASN application construct is at the front of the data
stored in the variable named <i class="arg">data_var</i>, and stores its id into
the variable named by <i class="arg">appNumber_var</i>. Additionally removes all
bytes associated with the value from the data for further processing
by the following decoder commands.
If a <i class="arg">content_var</i> is specified, then the command places all data
associated with it into the named variable, in the binary form which
can be processed using the decoder commands of this package.
If a <i class="arg">encodingType_var</i> is specified, then that var is set to 1 if
the encoding is constructed and 0 if it is primitive.</p>
<p>Otherwise it is the responsibility of the caller to decode the
remainder of the application construct based on the id retrieved by
this command, using the decoder commands of this package.</p></dd>
<dt><a name="46"><b class="cmd">::asn::asnGetContext</b> <i class="arg">data_var</i> <i class="arg">contextNumber_var</i> <span class="opt">?<i class="arg">content_var</i>?</span> <span class="opt">?<i class="arg">encodingType_var</i>?</span></a></dt>
<dd><p>Assumes that an ASN context tag construct is at the front of the data
stored in the variable named <i class="arg">data_var</i>, and stores its id into
the variable named by <i class="arg">contextNumber_var</i>. Additionally removes all
bytes associated with the value from the data for further processing
by the following decoder commands.
If a <i class="arg">content_var</i> is specified, then the command places all data
associated with it into the named variable, in the binary form which
can be processed using the decoder commands of this package.
If a <i class="arg">encodingType_var</i> is specified, then that var is set to 1 if
the encoding is constructed and 0 if it is primitive.</p>
<p>Otherwise it is the responsibility of the caller to decode the
remainder of the construct based on the id retrieved by this command,
using the decoder commands of this package.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">HANDLING TAGS</a></h3>
<p>Working with ASN.1 you often need to decode tagged values, which use a tag thats different
from the universal tag for a type. In those cases you have to replace the tag with the universal tag
used for the type, to decode the value.
To decode a tagged value use the <b class="cmd">::asn::asnRetag</b> to change the tag to the appropriate type
to use one of the decoders for primitive values.
To help with this the module contains three functions:</p>
<dl class="doctools_definitions">
<dt><a name="47"><b class="cmd">::asn::asnPeekTag</b> <i class="arg">data_var</i> <i class="arg">tag_var</i> <i class="arg">tagtype_var</i> <i class="arg">constr_var</i></a></dt>
<dd><p>The <b class="cmd">::asn::asnPeekTag</b> command can be used to take a peek at the data and decode the tag value, without
removing it from the data. The <i class="arg">tag_var</i> gets set to the tag number, while the <i class="arg">tagtype_var</i> gets set
to the class of the tag. (Either UNIVERSAL, CONTEXT, APPLICATION or PRIVATE). The <i class="arg">constr_var</i> is set to 1 if the
tag is for a constructed value, and to 0 for not constructed. It returns the length of the tag.</p></dd>
<dt><a name="48"><b class="cmd">::asn::asnTag</b> <i class="arg">tagnumber</i> <span class="opt">?<i class="arg">class</i>?</span> <span class="opt">?<i class="arg">tagstyle</i>?</span></a></dt>
<dd><p>The <b class="cmd">::asn::asnTag</b> can be used to create a tag value. The <i class="arg">tagnumber</i> gives the number of the tag, while
the <i class="arg">class</i> gives one of the classes (UNIVERSAL,CONTEXT,APPLICATION or PRIVATE). The class may be abbreviated to just the first letter (U,C,A,P),
default is UNIVERSAL.
The <i class="arg">tagstyle</i> is either C for Constructed encoding, or P for primitve encoding. It defaults to P. You can also use 1 instead of C and
0 instead of P for direct use of the values returned by <b class="cmd">::asn::asnPeekTag</b>.</p></dd>
<dt><a name="49"><b class="cmd">::asn::asnRetag</b> <i class="arg">data_var</i> <i class="arg">newTag</i></a></dt>
<dd><p>Replaces the tag in front of the data in <i class="arg">data_var</i> with <i class="arg">newTag</i>. The new Tag can be created using the <b class="cmd">::asn::asnTag</b> command.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<p>Examples for the usage of this package can be found in the
implementation of package <b class="package"><a href="../ldap/ldap.html">ldap</a></b>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>asn</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key427">asn</a>, <a href="../../../../index.html#key425">ber</a>, <a href="../../../../index.html#key426">cer</a>, <a href="../../../../index.html#key428">der</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key423">x.208</a>, <a href="../../../../index.html#key424">x.209</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Jochen Loewer &lt;loewerj@web.de&gt;<br>
Copyright &copy; 2004-2011 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/base32/base32.html.





































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

<div class='fossil-doc' data-title='base32 - Base32 encoding'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base32(n) 0.1 tcllib &quot;Base32 encoding&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base32 - base32 standard encoding</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Code map</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">base32::core <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">base32 <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::base32::encode</b> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::base32::decode</b> <i class="arg">estring</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for encoding and decoding of strings
into and out of the standard base32 encoding as specified in RFC 3548.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::base32::encode</b> <i class="arg">string</i></a></dt>
<dd><p>This command encodes the given <i class="arg">string</i> in base32 and returns the
encoded string as its result. The result may be padded with the
character <b class="const">=</b> to signal a partial encoding at the end of the
input string.</p></dd>
<dt><a name="2"><b class="cmd">::base32::decode</b> <i class="arg">estring</i></a></dt>
<dd><p>This commands takes the <i class="arg">estring</i> and decodes it under the
assumption that it is a valid base32 encoded string. The result of the
decoding is returned as the result of the command.</p>
<p>Note that while the encoder will generate only uppercase characters
this decoder accepts input in lowercase as well.</p>
<p>The command will always throw an error whenever encountering
conditions which signal some type of bogus input, namely if</p>
<ol class="doctools_enumerated">
<li><p>the input contains characters which are not valid output of a base32 encoder,</p></li>
<li><p>the length of the input is not a multiple of eight,</p></li>
<li><p>padding appears not at the end of input, but in the middle,</p></li>
<li><p>the padding has not of length six, four, three, or one characters,</p></li>
</ol></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Code map</a></h2>
<p>The code map used to convert 5-bit sequences is shown below, with the
numeric id of the bit sequences to the left and the character used to
encode it to the right. It should be noted that the characters &quot;0&quot; and
&quot;1&quot; are not used by the encoding. This is done as these characters can
be easily confused with &quot;O&quot;, &quot;o&quot; and &quot;l&quot; (L).</p>
<pre class="doctools_example">
	0 A    9 J   18 S   27 3
	1 B   10 K   19 T   28 4
	2 C   11 L   20 U   29 5
	3 D   12 M   21 V   30 6
	4 E   13 N   22 W   31 7
	5 F   14 O   23 X
	6 G   15 P   24 Y
	7 H   16 Q   25 Z
	8 I   17 R   26 2
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base32</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key299">base32</a>, <a href="../../../../index.html#key341">rfc3548</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Public domain</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/base32/base32core.html.

















































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

<div class='fossil-doc' data-title='base32::core - Base32 encoding'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base32::core(n) 0.1 tcllib &quot;Base32 encoding&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base32::core - Expanding basic base32 maps</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">base32::core <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::base32::core::define</b> <i class="arg">map</i> <i class="arg">forwvar</i> <i class="arg">backwvar</i> <i class="arg">ivar</i></a></li>
<li><a href="#2"><b class="cmd">::base32::core::valid</b> <i class="arg">string</i> <i class="arg">pattern</i> <i class="arg">mvar</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides generic commands for the construction of full
base32 mappings from a basic mapping listing just the codes and
associated characters. The full mappings, regular and inverse, created
here map to and from bit sequences, and also handle the partial
mappings at the end of a string.</p>
<p>This is in essence an internal package to be used by implementors of a
base32 en- and decoder. A regular user has no need of this package at
all.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::base32::core::define</b> <i class="arg">map</i> <i class="arg">forwvar</i> <i class="arg">backwvar</i> <i class="arg">ivar</i></a></dt>
<dd><p>This command computes full forward and backward (inverse) mappings
from the basic <i class="arg">map</i> and stores them in the variables named by
<i class="arg">forwvar</i> and <i class="arg">backwvar</i> resp. It also constructs a regexp
pattern for the detection of invalid characters in supposedly base32
encoded input and stores it in the variable named by <i class="arg">ivar</i>.</p></dd>
<dt><a name="2"><b class="cmd">::base32::core::valid</b> <i class="arg">string</i> <i class="arg">pattern</i> <i class="arg">mvar</i></a></dt>
<dd><p>This command checks if the input <i class="arg">string</i> is a valid base32
encoded string, based on the <i class="arg">pattern</i> of invalid characters as
generated by <b class="cmd">::base32::core::define</b>, and some other general
rules.</p>
<p>The result of the command is a boolean flag. Its value is <b class="const">True</b>
for a valid <i class="arg">string</i>, and <b class="const">False</b> otherwise. In the latter
case an error message describing the problem with the input is stored
into the variable named by <i class="arg">mvar</i>. The variable is not touched if
the input was found to be valid.</p>
<p>The rules checked by the command, beyond rejection of bad characters,
are:</p>
<ol class="doctools_enumerated">
<li><p>The length of the input is not a multiple of eight,</p></li>
<li><p>The padding appears not at the end of input, but in the middle,</p></li>
<li><p>The padding has not of length six, four, three, or one characters,</p></li>
</ol></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base32</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key299">base32</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Public domain</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/base32/base32hex.html.









































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

<div class='fossil-doc' data-title='base32::hex - Base32 encoding'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base32::hex(n) 0.1 tcllib &quot;Base32 encoding&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base32::hex - base32 extended hex encoding</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Code map</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">base32::core <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">base32::hex <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::base32::hex::encode</b> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::base32::hex::decode</b> <i class="arg">estring</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for encoding and decoding of strings
into and out of the extended hex base32 encoding as specified in the
RFC 3548bis draft.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::base32::hex::encode</b> <i class="arg">string</i></a></dt>
<dd><p>This command encodes the given <i class="arg">string</i> in extended hex base32 and
returns the encoded string as its result. The result may be padded
with the character <b class="const">=</b> to signal a partial encoding at the end
of the input string.</p></dd>
<dt><a name="2"><b class="cmd">::base32::hex::decode</b> <i class="arg">estring</i></a></dt>
<dd><p>This commands takes the <i class="arg">estring</i> and decodes it under the
assumption that it is a valid extended hex base32 encoded string. The
result of the decoding is returned as the result of the command.</p>
<p>Note that while the encoder will generate only uppercase characters
this decoder accepts input in lowercase as well.</p>
<p>The command will always throw an error whenever encountering
conditions which signal some type of bogus input, namely if</p>
<ol class="doctools_enumerated">
<li><p>the input contains characters which are not valid output
       of a extended hex base32 encoder,</p></li>
<li><p>the length of the input is not a multiple of eight,</p></li>
<li><p>padding appears not at the end of input, but in the middle,</p></li>
<li><p>the padding has not of length six, four, three, or one characters,</p></li>
</ol></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Code map</a></h2>
<p>The code map used to convert 5-bit sequences is shown below, with the
numeric id of the bit sequences to the left and the character used to
encode it to the right. The important feature of the extended hex
mapping is that the first 16 codes map to the digits and hex
characters.</p>
<pre class="doctools_example">
	0 0    9 9        18 I   27 R
	1 1   10 A        19 J   28 S
	2 2   11 B        20 K   29 T
	3 3   12 C        21 L   30 U
	4 4   13 D        22 M   31 V
	5 5   14 E        23 N
	6 6   15 F        24 O
	7 7        16 G   25 P
	8 8        17 H   26 Q
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base32</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key299">base32</a>, <a href="../../../../index.html#key340">hex</a>, <a href="../../../../index.html#key341">rfc3548</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Public domain</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/base64/ascii85.html.

































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div class='fossil-doc' data-title='ascii85 - Text encoding & decoding binary data'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ascii85(n) 1.0 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ascii85 - ascii85-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">References</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">ascii85 <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ascii85::encode</b> <span class="opt">?<b class="option">-maxlen</b> <i class="arg">maxlen</i>?</span> <span class="opt">?<b class="option">-wrapchar</b> <i class="arg">wrapchar</i>?</span> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::ascii85::decode</b> <i class="arg">string</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides procedures to encode binary data into ascii85 and back.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ascii85::encode</b> <span class="opt">?<b class="option">-maxlen</b> <i class="arg">maxlen</i>?</span> <span class="opt">?<b class="option">-wrapchar</b> <i class="arg">wrapchar</i>?</span> <i class="arg">string</i></a></dt>
<dd><p>Ascii85 encodes the given binary <i class="arg">string</i> and returns the encoded
result. Inserts the character <i class="arg">wrapchar</i> every <i class="arg">maxlen</i>
characters of output. <i class="arg">wrapchar</i> defaults to newline. <i class="arg">maxlen</i>
defaults to <b class="const">76</b>.</p>
<p><em>Note well</em>: If your string is not simple ascii you should fix
the string encoding before doing ascii85 encoding. See the examples.</p>
<p>The command will throw an error for negative values of <i class="arg">maxlen</i>,
or if <i class="arg">maxlen</i> is not an integer number.</p></dd>
<dt><a name="2"><b class="cmd">::ascii85::decode</b> <i class="arg">string</i></a></dt>
<dd><p>Ascii85 decodes the given <i class="arg">string</i> and returns the binary data.
The decoder ignores whitespace in the string, as well as tabs and
newlines.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<pre class="doctools_example">
% ascii85::encode &quot;Hello, world&quot;
87cURD_*#TDfTZ)
</pre>
<pre class="doctools_example">
% ascii85::encode [string repeat xyz 24]
G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G
^4U[H$X^\H?a^]
% ascii85::encode -wrapchar &quot;&quot; [string repeat xyz 24]
G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]G^4U[H$X^\H?a^]
</pre>
<pre class="doctools_example">
# NOTE: ascii85 encodes BINARY strings.
% set chemical [encoding convertto utf-8 &quot;C\u2088H\u2081\u2080N\u2084O\u2082&quot;]
% set encoded [ascii85::encode $chemical]
6fN]R8E,5Pidu\UiduhZidua
% set caffeine [encoding convertfrom utf-8 [ascii85::decode $encoded]]
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://en.wikipedia.org/wiki/Ascii85">http://en.wikipedia.org/wiki/Ascii85</a></p></li>
<li><p>Postscript Language Reference Manual, 3rd Edition, page 131.
       <a href="http://www.adobe.com/devnet/postscript/pdfs/PLRM.pdf">http://www.adobe.com/devnet/postscript/pdfs/PLRM.pdf</a></p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key719">ascii85</a>, <a href="../../../../index.html#key254">encoding</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, Emiliano Gavil&aacute;n</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/base64/base64.html.





















































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<div class='fossil-doc' data-title='base64 - Text encoding & decoding binary data'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base64(n) 2.4.2 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base64 - base64-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">base64 <span class="opt">?2.4.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::base64::encode</b> <span class="opt">?<b class="option">-maxlen</b> <i class="arg">maxlen</i>?</span> <span class="opt">?<b class="option">-wrapchar</b> <i class="arg">wrapchar</i>?</span> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::base64::decode</b> <i class="arg">string</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides procedures to encode binary data into base64 and back.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::base64::encode</b> <span class="opt">?<b class="option">-maxlen</b> <i class="arg">maxlen</i>?</span> <span class="opt">?<b class="option">-wrapchar</b> <i class="arg">wrapchar</i>?</span> <i class="arg">string</i></a></dt>
<dd><p>Base64 encodes the given binary <i class="arg">string</i> and returns the encoded
result. Inserts the character <i class="arg">wrapchar</i> every <i class="arg">maxlen</i>
characters of output. <i class="arg">wrapchar</i> defaults to newline. <i class="arg">maxlen</i>
defaults to <b class="const">76</b>.</p>
<p><em>Note</em> that if <i class="arg">maxlen</i> is set to <b class="const">0</b>, the
output will not be wrapped at all.</p>
<p><em>Note well</em>: If your string is not simple ascii you should fix
the string encoding before doing base64 encoding. See the examples.</p>
<p>The command will throw an error for negative values of <i class="arg">maxlen</i>,
or if <i class="arg">maxlen</i> is not an integer number.</p></dd>
<dt><a name="2"><b class="cmd">::base64::decode</b> <i class="arg">string</i></a></dt>
<dd><p>Base64 decodes the given <i class="arg">string</i> and returns the binary data.
The decoder ignores whitespace in the string.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<pre class="doctools_example">
% base64::encode &quot;Hello, world&quot;
SGVsbG8sIHdvcmxk
</pre>
<pre class="doctools_example">
% base64::encode [string repeat xyz 20]
eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6
eHl6eHl6eHl6
% base64::encode -wrapchar &quot;&quot; [string repeat xyz 20]
eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6
</pre>
<pre class="doctools_example">
# NOTE: base64 encodes BINARY strings.
% set chemical [encoding convertto utf-8 &quot;C\u2088H\u2081\u2080N\u2084O\u2082&quot;]
% set encoded [base64::encode $chemical]
Q+KCiEjigoHigoBO4oKET+KCgg==
% set caffeine [encoding convertfrom utf-8 [base64::decode $encoded]]
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key587">base64</a>, <a href="../../../../index.html#key254">encoding</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2000, Eric Melski<br>
Copyright &copy; 2001, Miguel Sofer</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/base64/uuencode.html.

































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<div class='fossil-doc' data-title='uuencode - Text encoding & decoding binary data'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uuencode(n) 1.1.4 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uuencode - UU-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OPTIONS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">uuencode <span class="opt">?1.1.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::uuencode::encode</b> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::uuencode::decode</b> <i class="arg">string</i></a></li>
<li><a href="#3"><b class="cmd">::uuencode::uuencode</b> <span class="opt">?<b class="option">-name</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-mode</b> <i class="arg">octal</i>?</span> (<b class="option">-file</b> <i class="arg">filename</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i>)</a></li>
<li><a href="#4"><b class="cmd">::uuencode::uudecode</b> (<b class="option">-file</b> <i class="arg">filename</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i>)</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a Tcl-only implementation of the
<b class="syscmd">uuencode(1)</b> and <b class="syscmd">uudecode(1)</b> commands. This encoding
packs binary data into printable ASCII characters.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::uuencode::encode</b> <i class="arg">string</i></a></dt>
<dd><p>returns the uuencoded data. This will encode all the data passed in
even if this is longer than the uuencode maximum line length. If the
number of input bytes is not a multiple of 3 then additional 0 bytes
are added to pad the string.</p></dd>
<dt><a name="2"><b class="cmd">::uuencode::decode</b> <i class="arg">string</i></a></dt>
<dd><p>Decodes the given encoded data. This will return any padding
characters as well and it is the callers responsibility to deal with
handling the actual length of the encoded data. (see uuencode).</p></dd>
<dt><a name="3"><b class="cmd">::uuencode::uuencode</b> <span class="opt">?<b class="option">-name</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-mode</b> <i class="arg">octal</i>?</span> (<b class="option">-file</b> <i class="arg">filename</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i>)</a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">::uuencode::uudecode</b> (<b class="option">-file</b> <i class="arg">filename</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i>)</a></dt>
<dd><p>UUDecode a file or block of data. A file may contain more than one
embedded file so the result is a list where each element is a three
element list of filename, mode value and data.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OPTIONS</a></h2>
<dl class="doctools_definitions">
<dt>-filename name</dt>
<dd><p>Cause the uuencode or uudecode commands to read their data from the
named file rather that taking a string parameter.</p></dd>
<dt>-name string</dt>
<dd><p>The uuencoded data header line contains the suggested file name to be
used when unpacking the data. Use this option to change this from the
default of &quot;data.dat&quot;.</p></dd>
<dt>-mode octal</dt>
<dd><p>The uuencoded data header line contains a suggested permissions bit
pattern expressed as an octal string. To change the default of 0644
you can set this option. For instance, 0755 would be suitable for an
executable. See <b class="syscmd">chmod(1)</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<pre class="doctools_example">
% set d [uuencode::encode &quot;Hello World!&quot;]
2&amp;5L;&amp;\\@5V]R;&amp;0A
</pre>
<pre class="doctools_example">
% uuencode::uudecode $d
Hello World!
</pre>
<pre class="doctools_example">
% set d [uuencode::uuencode -name hello.txt &quot;Hello World&quot;]
begin 644 hello.txt
+2&amp;5L;&amp;\@5V]R;&amp;0`
`
end
</pre>
<pre class="doctools_example">
% uuencode::uudecode $d
{hello.txt 644 {Hello World}}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key254">encoding</a>, <a href="../../../../index.html#key253">uuencode</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/base64/yencode.html.



















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<div class='fossil-doc' data-title='yencode - Text encoding & decoding binary data'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">yencode(n) 1.1.2 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>yencode - Y-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OPTIONS</a></li>
<li class="doctools_section"><a href="#section3">References</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">yencode <span class="opt">?1.1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::yencode::encode</b> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::yencode::decode</b> <i class="arg">string</i></a></li>
<li><a href="#3"><b class="cmd">::yencode::yencode</b> <span class="opt">?<b class="option">-name</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-line</b> <i class="arg">integer</i>?</span> <span class="opt">?<b class="option">-crc32</b> <i class="arg">boolean</i>?</span> (<b class="option">-file</b> <i class="arg">filename</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i>)</a></li>
<li><a href="#4"><b class="cmd">::yencode::ydecode</b> (<b class="option">-file</b> <i class="arg">filename</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i>)</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a Tcl-only implementation of the yEnc file
encoding. This is a recently introduced method of encoding binary
files for transmission through Usenet. This encoding packs binary data
into a format that requires an 8-bit clean transmission layer but that
escapes characters special to the <i class="term"><a href="../../../../index.html#key652">NNTP</a></i> posting protocols. See
<a href="http://www.yenc.org/">http://www.yenc.org/</a> for details concerning the algorithm.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::yencode::encode</b> <i class="arg">string</i></a></dt>
<dd><p>returns the yEnc encoded data.</p></dd>
<dt><a name="2"><b class="cmd">::yencode::decode</b> <i class="arg">string</i></a></dt>
<dd><p>Decodes the given yEnc encoded data.</p></dd>
<dt><a name="3"><b class="cmd">::yencode::yencode</b> <span class="opt">?<b class="option">-name</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-line</b> <i class="arg">integer</i>?</span> <span class="opt">?<b class="option">-crc32</b> <i class="arg">boolean</i>?</span> (<b class="option">-file</b> <i class="arg">filename</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i>)</a></dt>
<dd><p>Encode a file or block of data.</p></dd>
<dt><a name="4"><b class="cmd">::yencode::ydecode</b> (<b class="option">-file</b> <i class="arg">filename</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i>)</a></dt>
<dd><p>Decode a file or block of data. A file may contain more than one
embedded file so the result is a list where each element is a three
element list of filename, file size and data.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OPTIONS</a></h2>
<dl class="doctools_definitions">
<dt>-filename name</dt>
<dd><p>Cause the yencode or ydecode commands to read their data from the
named file rather that taking a string parameter.</p></dd>
<dt>-name string</dt>
<dd><p>The encoded data header line contains the suggested file name to be
used when unpacking the data. Use this option to change this from the
default of &quot;data.dat&quot;.</p></dd>
<dt>-line integer</dt>
<dd><p>The yencoded data header line contains records the line length used
during the encoding. Use this option to select a line length other
that the default of 128. Note that NNTP imposes a 1000 character line
length limit and some gateways may have trouble with more than 255
characters per line.</p></dd>
<dt>-crc32 boolean</dt>
<dd><p>The yEnc specification recommends the inclusion of a cyclic redundancy
check value in the footer. Use this option to change the default from
<i class="arg">true</i> to <i class="arg">false</i>.</p></dd>
</dl>
<pre class="doctools_example">
% set d [yencode::yencode -file testfile.txt]
=ybegin line=128 size=584 name=testfile.txt
 -o- data not shown -o-
=yend size=584 crc32=ded29f4f
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://www.yenc.org/yenc-draft.1.3.txt">http://www.yenc.org/yenc-draft.1.3.txt</a></p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key254">encoding</a>, <a href="../../../../index.html#key708">yEnc</a>, <a href="../../../../index.html#key706">ydecode</a>, <a href="../../../../index.html#key707">yencode</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/bee/bee.html.









































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372

<div class='fossil-doc' data-title='bee - BitTorrent'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bee(n) 0.1 tcllib &quot;BitTorrent&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bee - BitTorrent Serialization Format Encoder/Decoder</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">ENCODER</a></li>
<li class="doctools_subsection"><a href="#subsection2">DECODER</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">FORMAT DEFINITION</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">bee <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::bee::encodeString</b> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::bee::encodeNumber</b> <i class="arg">integer</i></a></li>
<li><a href="#3"><b class="cmd">::bee::encodeListArgs</b> <i class="arg">value</i>...</a></li>
<li><a href="#4"><b class="cmd">::bee::encodeList</b> <i class="arg">list</i></a></li>
<li><a href="#5"><b class="cmd">::bee::encodeDictArgs</b> <i class="arg">key</i> <i class="arg">value</i>...</a></li>
<li><a href="#6"><b class="cmd">::bee::encodeDict</b> <i class="arg">dict</i></a></li>
<li><a href="#7"><b class="cmd">::bee::decode</b> <i class="arg">string</i> <span class="opt">?<i class="arg">endvar</i>?</span> <span class="opt">?<i class="arg">start</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::bee::decodeIndices</b> <i class="arg">string</i> <span class="opt">?<i class="arg">endvar</i>?</span> <span class="opt">?<i class="arg">start</i>?</span></a></li>
<li><a href="#9"><b class="cmd">::bee::decodeChannel</b> <i class="arg">chan</i> <b class="option">-command</b> <i class="arg">cmdprefix</i> <span class="opt">?<b class="option">-exact</b>?</span> <span class="opt">?<b class="option">-prefix</b> <i class="arg">data</i>?</span></a></li>
<li><a href="#10"><b class="cmd">cmdprefix</b> <b class="method">eof</b> <i class="arg">token</i></a></li>
<li><a href="#11"><b class="cmd">cmdprefix</b> <b class="method">error</b> <i class="arg">token</i> <i class="arg">message</i></a></li>
<li><a href="#12"><b class="cmd">cmdprefix</b> <b class="method">value</b> <i class="arg">token</i> <i class="arg">value</i></a></li>
<li><a href="#13"><b class="cmd">::bee::decodeCancel</b> <i class="arg">token</i></a></li>
<li><a href="#14"><b class="cmd">::bee::decodePush</b> <i class="arg">token</i> <i class="arg">string</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">bee</b> package provides de- and encoder commands for data
in bencoding (speak 'bee'), the serialization format for data and
messages used by the BitTorrent protocol.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">ENCODER</a></h3>
<p>The package provides one encoder command for each of the basic forms,
and two commands per container, one taking a proper tcl data structure
to encode in the container, the other taking the same information as
several arguments.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::bee::encodeString</b> <i class="arg">string</i></a></dt>
<dd><p>Returns the bee-encoding of the <i class="arg">string</i>.</p></dd>
<dt><a name="2"><b class="cmd">::bee::encodeNumber</b> <i class="arg">integer</i></a></dt>
<dd><p>Returns the bee-encoding of the <i class="arg">integer</i> number.</p></dd>
<dt><a name="3"><b class="cmd">::bee::encodeListArgs</b> <i class="arg">value</i>...</a></dt>
<dd><p>Takes zero or more bee-encoded values and returns the bee-encoding of
their list.</p></dd>
<dt><a name="4"><b class="cmd">::bee::encodeList</b> <i class="arg">list</i></a></dt>
<dd><p>Takes a list of bee-encoded values and returns the bee-encoding of the
list.</p></dd>
<dt><a name="5"><b class="cmd">::bee::encodeDictArgs</b> <i class="arg">key</i> <i class="arg">value</i>...</a></dt>
<dd><p>Takes zero or more pairs of keys and values and returns the
bee-encoding of the dictionary they form. The values are expected to
be already bee-encoded, but the keys must not be. Their encoding will
be done by the command itself.</p></dd>
<dt><a name="6"><b class="cmd">::bee::encodeDict</b> <i class="arg">dict</i></a></dt>
<dd><p>Takes a dictionary list of string keys and bee-encoded values and
returns the bee-encoding of the list. Note that the keys in the input
must not be bee-encoded already. This will be done by the command
itself.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">DECODER</a></h3>
<p>The package provides two main decoder commands, one for decoding a
string expected to contain a complete data structure, the other for
the incremental decoding of bee-values arriving on a channel. The
latter command is asynchronous and provides the completed decoded
values to the user through a command callback.</p>
<dl class="doctools_definitions">
<dt><a name="7"><b class="cmd">::bee::decode</b> <i class="arg">string</i> <span class="opt">?<i class="arg">endvar</i>?</span> <span class="opt">?<i class="arg">start</i>?</span></a></dt>
<dd><p>Takes the bee-encoding in the string and returns one decoded value. In
the case of this being a container all contained values are decoded
recursively as well and the result is a properly nested tcl list
and/or dictionary.</p>
<p>If the optional <i class="arg">endvar</i> is set then it is the name of a variable
to store the index of the first character <em>after</em> the decoded
value into. In other words, if the string contains more than one value
then <i class="arg">endvar</i> can be used to obtain the position of the bee-value
after the bee-value currently decoded. together with <i class="arg">start</i>, see
below, it is possible to iterate over the string to extract all
contained values.</p>
<p>The optional <i class="arg">start</i> index defaults to <b class="const">0</b>, i.e. the
beginning of the string. It is the index of the first character of the
bee-encoded value to extract.</p></dd>
<dt><a name="8"><b class="cmd">::bee::decodeIndices</b> <i class="arg">string</i> <span class="opt">?<i class="arg">endvar</i>?</span> <span class="opt">?<i class="arg">start</i>?</span></a></dt>
<dd><p>Takes the same arguments as <b class="cmd">::bee::decode</b> and returns the same
information in <i class="arg">endvar</i>. The result however is different. Instead
of the tcl value contained in the <i class="arg">string</i> it returns a list
describing the value with respect to type and location (indices for
the first and last character of the bee-value). In case of a container
the structure also contains the same information for all the embedded
values.</p>
<p>Formally the results for the various types of bee-values are:</p>
<dl class="doctools_definitions">
<dt>string</dt>
<dd><p>A list containing three elements:</p>
<ul class="doctools_itemized">
<li><p>The constant string <b class="const">string</b>, denoting the type of the value.</p></li>
<li><p>An integer number greater than or equal to zero. This is the index of
the first character of the bee-value in the input <i class="arg">string</i>.</p></li>
<li><p>An integer number greater than or equal to zero. This is the index of
the last character of the bee-value in the input <i class="arg">string</i>.</p></li>
</ul>
<p><em>Note</em> that this information is present in the results for all
four types of bee-values, with only the first element changing
according to the type of the value.</p></dd>
<dt>integer</dt>
<dd><p>The result is like for strings, except that the type element contains
the constant string <b class="const">integer</b>.</p></dd>
<dt>list</dt>
<dd><p>The result is like before, with two exceptions: One, the type element
contains the constant string <b class="const">list</b>. And two, the result
actually contains four elements. The last element is new, and contains
the index data as described here for all elements of the bee-list.</p></dd>
<dt>dictionary</dt>
<dd><p>The result is like for strings, except that the type element contains
the constant string <b class="const">dict</b>. A fourth element is present as well,
with a slightly different structure than for lists. The element is a
dictionary mapping from the strings keys of the bee-dictionary to a
list containing two elements. The first of them is the index
information for the key, and the second element is the index
information for the value the key maps to. This structure is the only
which contains not only index data, but actual values from the
bee-string. While the index information of the keys is unique enough,
i.e. serviceable as keys, they are not easy to navigate when trying to
find particular element. Using the actual keys makes this much easier.</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::bee::decodeChannel</b> <i class="arg">chan</i> <b class="option">-command</b> <i class="arg">cmdprefix</i> <span class="opt">?<b class="option">-exact</b>?</span> <span class="opt">?<b class="option">-prefix</b> <i class="arg">data</i>?</span></a></dt>
<dd><p>The command creates a decoder for a series of bee-values arriving on
the channel <i class="arg">chan</i> and returns its handle. This handle can be used
to remove the decoder again.
Setting up another bee decoder on <i class="arg">chan</i> while a bee decoder is
still active will fail with an error message.</p>
<dl class="doctools_definitions">
<dt><b class="option">-command</b></dt>
<dd><p>The command prefix <i class="arg">cmdprefix</i> specified by the <em>required</em>
option <b class="option">-command</b> is used to report extracted values and
exceptional situations (error, and EOF on the channel).
The callback will be executed at the global level of the interpreter,
with two or three arguments. The exact call signatures are</p>
<dl class="doctools_definitions">
<dt><a name="10"><b class="cmd">cmdprefix</b> <b class="method">eof</b> <i class="arg">token</i></a></dt>
<dd><p>The decoder has reached eof on the channel <i class="arg">chan</i>. No further
invocations of the callback will be made after this. The channel has
already been closed at the time of the call, and the <i class="arg">token</i> is
not valid anymore as well.</p></dd>
<dt><a name="11"><b class="cmd">cmdprefix</b> <b class="method">error</b> <i class="arg">token</i> <i class="arg">message</i></a></dt>
<dd><p>The decoder encountered an error, which is not eof. For example a
malformed bee-value. The <i class="arg">message</i> provides details about the
error. The decoder token is in the same state as for eof,
i.e. invalid. The channel however is kept open.</p></dd>
<dt><a name="12"><b class="cmd">cmdprefix</b> <b class="method">value</b> <i class="arg">token</i> <i class="arg">value</i></a></dt>
<dd><p>The decoder received and successfully decoded a bee-value.
The format of the equivalent tcl <i class="arg">value</i> is the same as returned
by <b class="cmd">::bee::decode</b>. The channel is still open and the decoder
token is valid. This means that the callback is able to remove the
decoder.</p></dd>
</dl></dd>
<dt><b class="option">-exact</b></dt>
<dd><p>By default the decoder assumes that the remainder of the data in the
channel consists only of bee-values, and reads as much as possible per
event, without regard for boundaries between bee-values. This means
that if the the input contains non-bee data after a series of
bee-value the beginning of that data may be lost because it was
already read by the decoder, but not processed.</p>
<p>The <b class="option">-exact</b> was made for this situation. When specified the
decoder will take care to not read any characters behind the currently
processed bee-value, so that any non-bee data is kept in the channel
for further processing after removal of the decoder.</p></dd>
<dt><b class="option">-prefix</b></dt>
<dd><p>If this option is specified its value is assumed to be the beginning
of the bee-value and used to initialize the internal decoder
buffer. This feature is required if the creator of the decoder used
data from the channel to determine if it should create the decoder or
not. Without the option this data would be lost to the decoding.</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::bee::decodeCancel</b> <i class="arg">token</i></a></dt>
<dd><p>This command cancels the decoder set up by <b class="cmd">::bee::decodeChannel</b>
and represented by the handle <i class="arg">token</i>.</p></dd>
<dt><a name="14"><b class="cmd">::bee::decodePush</b> <i class="arg">token</i> <i class="arg">string</i></a></dt>
<dd><p>This command appends the <i class="arg">string</i> to the internal decoder
buffer. It is the runtime equivalent of the option <b class="option">-prefix</b> of
<b class="cmd">::bee::decodeChannel</b>. Use it to push data back into the decoder
when the <b class="method">value</b> callback used data from the channel to
determine if it should decode another bee-value or not.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">FORMAT DEFINITION</a></h2>
<p>Data in the bee serialization format is constructed from two basic
forms, and two container forms. The basic forms are strings and
integer numbers, and the containers are lists and dictionaries.</p>
<dl class="doctools_definitions">
<dt>String <i class="arg">S</i></dt>
<dd><p>A string <i class="arg">S</i> of length <i class="arg">L</i> is encoded by the string
&quot;<i class="arg">L</i><b class="const">:</b><i class="arg">S</i>&quot;, where the length is written out in textual
form.</p></dd>
<dt>Integer <i class="arg">N</i></dt>
<dd><p>An integer number <i class="arg">N</i> is encoded by the string
&quot;<b class="const">i</b><i class="arg">N</i><b class="const">e</b>&quot;.</p></dd>
<dt>List <i class="arg">v1</i> ... <i class="arg">vn</i></dt>
<dd><p>A list of the values <i class="arg">v1</i> to <i class="arg">vn</i> is encoded by the string
&quot;<b class="const">l</b><i class="arg">BV1</i>...<i class="arg">BVn</i><b class="const">e</b>&quot;
where &quot;BV<b class="variable">i</b>&quot; is the bee-encoding of the value &quot;v<b class="variable">i</b>&quot;.</p></dd>
<dt>Dict <i class="arg">k1</i> -&gt; <i class="arg">v1</i> ...</dt>
<dd><p>A dictionary mapping the string key <i class="arg">k</i><b class="variable">i</b> to the value
<i class="arg">v</i><b class="variable">i</b>, for <b class="variable">i</b> in <b class="const">1</b> ... <b class="variable">n</b>
is encoded by the string
&quot;<b class="const">d</b><i class="arg">BK</i><b class="variable">i</b><i class="arg">BV</i><b class="variable">i</b>...<b class="const">e</b>&quot;
for i in <b class="const">1</b> ... <b class="variable">n</b>, where &quot;BK<b class="variable">i</b>&quot; is the bee-encoding
of the key string &quot;k<b class="variable">i</b>&quot;.  and &quot;BV<b class="variable">i</b>&quot; is the bee-encoding of
the value &quot;v<b class="variable">i</b>&quot;.</p>
<p><em>Note</em>: The bee-encoding does not retain the order of the keys in
the input, but stores in a sorted order. The sorting is done for the
&quot;raw strings&quot;.</p></dd>
</dl>
<p>Note that the type of each encoded item can be determined immediately
from the first character of its representation:</p>
<dl class="doctools_definitions">
<dt>i</dt>
<dd><p>Integer.</p></dd>
<dt>l</dt>
<dd><p>List.</p></dd>
<dt>d</dt>
<dd><p>Dictionary.</p></dd>
<dt>[0-9]</dt>
<dd><p>String.</p></dd>
</dl>
<p>By wrapping an integer number into <b class="const">i</b>...<b class="const">e</b> the format
makes sure that they are different from strings, which all begin with
a digit.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bee</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key390">BitTorrent</a>, <a href="../../../../index.html#key388">bee</a>, <a href="../../../../index.html#key389">bittorrent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key391">torrent</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/bench/bench.html.



















































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329

<div class='fossil-doc' data-title='bench - Benchmarking/Performance tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench(n) 0.4 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench - bench - Processing benchmark suites</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Benchmark execution</a></li>
<li class="doctools_subsection"><a href="#subsection2">Result manipulation</a></li>
<li class="doctools_subsection"><a href="#subsection3">Result format</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">bench <span class="opt">?0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::bench::locate</b> <i class="arg">pattern</i> <i class="arg">paths</i></a></li>
<li><a href="#2"><b class="cmd">::bench::run</b> <span class="opt">?<i class="arg">option value</i>...?</span> <i class="arg">interp_list</i> <i class="arg">file</i>...</a></li>
<li><a href="#3"><b class="cmd">::bench::versions</b> <i class="arg">interp_list</i></a></li>
<li><a href="#4"><b class="cmd">::bench::del</b> <i class="arg">bench_result</i> <i class="arg">column</i></a></li>
<li><a href="#5"><b class="cmd">::bench::edit</b> <i class="arg">bench_result</i> <i class="arg">column</i> <i class="arg">newvalue</i></a></li>
<li><a href="#6"><b class="cmd">::bench::merge</b> <i class="arg">bench_result</i>...</a></li>
<li><a href="#7"><b class="cmd">::bench::norm</b> <i class="arg">bench_result</i> <i class="arg">column</i></a></li>
<li><a href="#8"><b class="cmd">::bench::out::raw</b> <i class="arg">bench_result</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for the execution of benchmarks written
in the bench language, and for the processing of results generated by
such execution.</p>
<p>A reader interested in the bench language itself should start with the
<i class="term"><a href="bench_lang_intro.html">bench language introduction</a></i> and proceed from there to the
formal <i class="term"><a href="bench_lang_spec.html">bench language specification</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Benchmark execution</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::bench::locate</b> <i class="arg">pattern</i> <i class="arg">paths</i></a></dt>
<dd><p>This command locates Tcl interpreters and returns a list containing
their paths. It searches them in the list of <i class="arg">paths</i> specified by
the caller, using the glob <i class="arg">pattern</i>.</p>
<p>The command resolves soft links to find the actual executables
matching the pattern. Note that only interpreters which are marked as
executable and are actually executable on the current platform are put
into the result.</p></dd>
<dt><a name="2"><b class="cmd">::bench::run</b> <span class="opt">?<i class="arg">option value</i>...?</span> <i class="arg">interp_list</i> <i class="arg">file</i>...</a></dt>
<dd><p>This command executes the benchmarks declared in the set of files,
once per Tcl interpreter specified via the <i class="arg">interp_list</i>, and per
the configuration specified by the options, and then returns the
accumulated timing results. The format of this result is described in
section <span class="sectref"><a href="#subsection3">Result format</a></span>.</p>
<p>It is assumed that the contents of the files are written in the bench
language.</p>
<p>The available options are</p>
<dl class="doctools_options">
<dt><b class="option">-errors</b> <i class="arg">flag</i></dt>
<dd><p>The argument is a boolean value. If set errors in benchmarks are
propagated to the command, aborting benchmark execution. Otherwise
they are recorded in the timing result via a special result code. The
default is to propagate and abort.</p></dd>
<dt><b class="option">-threads</b> <i class="arg">n</i></dt>
<dd><p>The argument is a non-negative integer value declaring the number of
threads to use while executing the benchmarks. The default value is
<b class="const">0</b>, to not use threads.</p></dd>
<dt><b class="option">-match</b> <i class="arg">pattern</i></dt>
<dd><p>The argument is a glob pattern. Only benchmarks whose description
matches the pattern are executed. The default is the empty string, to
execute all patterns.</p></dd>
<dt><b class="option">-rmatch</b> <i class="arg">pattern</i></dt>
<dd><p>The argument is a regular expression pattern. Only benchmarks whose
description matches the pattern are executed. The default is the empty
string, to execute all patterns.</p></dd>
<dt><b class="option">-iters</b> <i class="arg">n</i></dt>
<dd><p>The argument is positive integer number, the maximal number of
iterations for any benchmark. The default is <b class="const">1000</b>. Individual
benchmarks can override this.</p></dd>
<dt><b class="option">-pkgdir</b> <i class="arg">path</i></dt>
<dd><p>The argument is a path to an existing, readable directory. Multiple
paths can be specified, simply use the option multiple times, each
time with one of the paths to use.</p>
<p>If no paths were specified the system will behave as before.
If one or more paths are specified, say <b class="variable">N</b>, each of the specified
interpreters will be invoked <b class="variable">N</b> times, with one of the specified
paths. The chosen path is put into the interpreters' <b class="variable">auto_path</b>,
thus allowing it to find specific versions of a package.</p>
<p>In this way the use of <b class="option">-pkgdir</b> allows the user to benchmark
several different versions of a package, against one or more interpreters.</p>
<p><em>Note:</em> The empty string is allowed as a path and causes the system to
run the specified interpreters with an unmodified <b class="variable">auto_path</b>. In case
the package in question is available there as well.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::bench::versions</b> <i class="arg">interp_list</i></a></dt>
<dd><p>This command takes a list of Tcl interpreters, identified by their
path, and returns a dictionary mapping from the interpreters to their
versions. Interpreters which are not actually executable, or fail when
interrogated, are not put into the result. I.e the result may contain
less interpreters than there in the input list.</p>
<p>The command uses builtin command <b class="cmd">info patchlevel</b> to determine
the version of each interpreter.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Result manipulation</a></h3>
<dl class="doctools_definitions">
<dt><a name="4"><b class="cmd">::bench::del</b> <i class="arg">bench_result</i> <i class="arg">column</i></a></dt>
<dd><p>This command removes a column, i.e. all benchmark results for a
specific Tcl interpreter, from the specified benchmark result and
returns the modified result.</p>
<p>The benchmark results are in the format described in section
<span class="sectref"><a href="#subsection3">Result format</a></span>.</p>
<p>The column is identified by an integer number.</p></dd>
<dt><a name="5"><b class="cmd">::bench::edit</b> <i class="arg">bench_result</i> <i class="arg">column</i> <i class="arg">newvalue</i></a></dt>
<dd><p>This command renames a column in the specified benchmark result and
returns the modified result. This means that the path of the Tcl
interpreter in the identified column is changed to an arbitrary
string.</p>
<p>The benchmark results are in the format described in section
<span class="sectref"><a href="#subsection3">Result format</a></span>.</p>
<p>The column is identified by an integer number.</p></dd>
<dt><a name="6"><b class="cmd">::bench::merge</b> <i class="arg">bench_result</i>...</a></dt>
<dd><p>This commands takes one or more benchmark results, merges them into
one big result, and returns that as its result.</p>
<p>All benchmark results are in the format described in section
<span class="sectref"><a href="#subsection3">Result format</a></span>.</p></dd>
<dt><a name="7"><b class="cmd">::bench::norm</b> <i class="arg">bench_result</i> <i class="arg">column</i></a></dt>
<dd><p>This command normalizes the timing results in the specified benchmark
result and returns the modified result. This means that the cell
values are not times anymore, but factors showing how much faster or
slower the execution was relative to the baseline.</p>
<p>The baseline against which the command normalizes are the timing
results in the chosen column. This means that after the normalization
the values in this column are all <b class="const">1</b>, as these benchmarks are
neither faster nor slower than the baseline.</p>
<p>A factor less than <b class="const">1</b> indicates a benchmark which was faster
than the baseline, whereas a factor greater than <b class="const">1</b> indicates a
slower execution.</p>
<p>The benchmark results are in the format described in section
<span class="sectref"><a href="#subsection3">Result format</a></span>.</p>
<p>The column is identified by an integer number.</p></dd>
<dt><a name="8"><b class="cmd">::bench::out::raw</b> <i class="arg">bench_result</i></a></dt>
<dd><p>This command formats the specified benchmark result for output to a
file, socket, etc. This specific command does no formatting at all,
it passes the input through unchanged.</p>
<p>For other formatting styles see the packages <b class="package"><a href="bench_wtext.html">bench::out::text</a></b>
and <b class="package"><a href="bench_wcsv.html">bench::out::csv</a></b> which provide commands to format
benchmark results for human consumption, or as CSV data importable by
spread sheets, respectively.</p>
<p>Complementary, to read benchmark results from files, sockets etc. look
for the package <b class="package"><a href="bench_read.html">bench::in</a></b> and the commands provided by it.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Result format</a></h3>
<p>After the execution of a set of benchmarks the raw result returned by
this package is a Tcl dictionary containing all the relevant
information.
The dictionary is a compact representation, i.e. serialization, of a
2-dimensional table which has Tcl interpreters as columns and
benchmarks as rows. The cells of the table contain the timing
results.
The Tcl interpreters / columns are identified by their paths.
The benchmarks / rows are identified by their description.</p>
<p>The possible keys are all valid Tcl lists of two or three elements and
have one of the following forms:</p>
<dl class="doctools_definitions">
<dt>{interp *}</dt>
<dd><p>The set of keys matching this glob pattern capture the information
about all the Tcl interpreters used to run the benchmarks. The second
element of the key is the path to the interpreter.</p>
<p>The associated value is the version of the Tcl interpreter.</p></dd>
<dt>{desc *}</dt>
<dd><p>The set of keys matching this glob pattern capture the information
about all the benchmarks found in the executed benchmark suite. The
second element of the key is the description of the benchmark, which
has to be unique.</p>
<p>The associated value is irrelevant, and set to the empty string.</p></dd>
<dt>{usec * *}</dt>
<dd><p>The set of keys matching this glob pattern capture the performance
information, i.e. timing results. The second element of the key is the
description of the benchmark, the third element the path of the Tcl
interpreter which was used to run it.</p>
<p>The associated value is either one of several special result codes, or
the time it took to execute the benchmark, in microseconds. The
possible special result codes are</p>
<dl class="doctools_definitions">
<dt>ERR</dt>
<dd><p>Benchmark could not be executed, failed with a Tcl error.</p></dd>
<dt>BAD_RES</dt>
<dd><p>The benchmark could be executed, however the result from its body did
not match the declared expectations.</p></dd>
</dl></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench_intro.html">bench_intro</a>, <a href="bench_lang_intro.html">bench_lang_intro</a>, <a href="bench_lang_spec.html">bench_lang_spec</a>, bench_read, bench_wcsv, bench_wtext</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key111">merging</a>, <a href="../../../../index.html#key112">normalization</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key99">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/bench/bench_intro.html.























































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

<div class='fossil-doc' data-title='bench_intro - Benchmarking/Performance tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench_intro(n) 1.0 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench_intro - bench introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">HISTORICAL NOTES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <i class="term"><a href="bench.html">bench</a></i> (short for <em>benchmark tools</em>), is a set of
related, yet different, entities which are working together for the
easy creation and execution of performance test suites, also known as
benchmarks. These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the declaration of test cases. A test case is
represented by a tcl command declaring the various parts needed to
execute it, like setup, cleanup, the commands to test, etc.</p></li>
<li><p>A package providing the ability to execute test cases written in that
language.</p></li>
</ol>
<p>Which of the more detailed documents are relevant to the reader of
this introduction depends on their role in the benchmarking process.</p>
<ol class="doctools_enumerated">
<li><p>A <i class="term">writer</i> of benchmarks has to understand the bench language
itself. A beginner to bench should read the more informally written
<i class="term"><a href="bench_lang_intro.html">bench language introduction</a></i> first. Having digested this the
formal <i class="term"><a href="bench_lang_spec.html">bench language specification</a></i> should become
understandable. A writer experienced with bench may only need this
last document from time to time, to refresh her memory.</p></li>
<li><p>A <i class="term">user</i> of benchmark suites written in the <i class="term"><a href="bench.html">bench</a></i> language
has to know which tools are available for use.
At the bottom level sits the package <b class="package"><a href="bench.html">bench</a></b>, providing the
basic facilities to read and execute files containing benchmarks
written in the bench language, and to manipulate benchmark results.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">HISTORICAL NOTES</a></h2>
<p>This module and package have been derived from Jeff Hobbs'
<b class="syscmd">tclbench</b> application for the benchmarking of the Tcl core and
its ancestor &quot;<b class="file">runbench.tcl</b>&quot;.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, bench_lang_faq, <a href="bench_lang_intro.html">bench_lang_intro</a>, <a href="bench_lang_spec.html">bench_lang_spec</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key98">bench language</a>, <a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key99">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/bench/bench_lang_intro.html.















































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247

<div class='fossil-doc' data-title='bench_lang_intro - Benchmarking/Performance tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench_lang_intro(n) 1.0 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench_lang_intro - bench language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Fundamentals</a></li>
<li class="doctools_subsection"><a href="#subsection2">Basics</a></li>
<li class="doctools_subsection"><a href="#subsection3">Pre- and postprocessing</a></li>
<li class="doctools_subsection"><a href="#subsection4">Advanced pre- and postprocessing</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">FURTHER READING</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is an informal introduction to version 1 of the bench
language based on a multitude of examples. After reading this a
benchmark writer should be ready to understand the formal
<i class="term"><a href="bench_lang_spec.html">bench language specification</a></i>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Fundamentals</a></h3>
<p>In the broadest terms possible the <i class="term"><a href="../../../../index.html#key98">bench language</a></i> is
essentially Tcl, plus a number of commands to support the declaration
of benchmarks.
A document written in this language is a Tcl script and has the same
syntax.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basics</a></h3>
<p>One of the most simplest benchmarks which can be written in bench is</p>
<pre class="doctools_example">
bench -desc LABEL -body {
    set a b
}
</pre>
<p>This code declares a benchmark named <b class="const">LABEL</b> which measures the
time it takes to assign a value to a variable. The Tcl code doing this
assignment is the <b class="option">-body</b> of the benchmark.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Pre- and postprocessing</a></h3>
<p>Our next example demonstrates how to declare <i class="term">initialization</i> and
<i class="term"><a href="../../../../index.html#key158">cleanup</a></i> code, i.e. code computing information for the use of
the <b class="option">-body</b>, and for releasing such resources after the
measurement is done.
They are the <b class="option">-pre</b>- and the <b class="option">-post</b>-body, respectively.</p>
<p>In our example, directly drawn from the benchmark suite of Tcllib's
<b class="package"><a href="../aes/aes.html">aes</a></b> package, the concrete initialization code constructs the
key schedule used by the encryption command whose speed we measure,
and the cleanup code releases any resources bound to that schedule.</p>
<pre class="doctools_example">
bench -desc &quot;AES-${len} ECB encryption core&quot; <b class="option">-pre</b> {
    set key [aes::Init ecb $k $i]
} -body {
    aes::Encrypt $key $p
} <b class="option">-post</b> {
    aes::Final $key
}
</pre>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Advanced pre- and postprocessing</a></h3>
<p>Our last example again deals with initialization and cleanup code. To
see the difference to the regular initialization and cleanup discussed
in the last section it is necessary to know a bit more about how bench
actually measures the speed of the the <b class="option">-body</b>.</p>
<p>Instead of running the <b class="option">-body</b> just once the system actually
executes the <b class="option">-body</b> several hundred times and then returns the
average of the found execution times. This is done to remove
environmental effects like machine load from the result as much as
possible, with outliers canceling each other out in the average.</p>
<p>The drawback of doing things this way is that when we measure
operations which are not idempotent we will most likely not measure
the time for the operation we want, but of the state(s) the system is
in after the first iteration, a mixture of things we have no interest
in.</p>
<p>Should we wish, for example, to measure the time it takes to include
an element into a set, with the element not yet in the set, and the
set having specific properties like being a shared Tcl_Obj, then the
first iteration will measure the time for this. <em>However</em> all
subsequent iterations will measure the time to include an element
which is already in the set, and the Tcl_Obj holding the set will not
be shared anymore either. In the end the timings taken for the several
hundred iterations of this state will overwhelm the time taken from
the first iteration, the only one which actually measured what we
wanted.</p>
<p>The advanced initialization and cleanup codes, <b class="option">-ipre</b>- and the
<b class="option">-ipost</b>-body respectively, are present to solve this very
problem. While the regular initialization and cleanup codes are
executed before and after the whole series of iterations the advanced
codes are executed before and after each iteration of the body,
without being measured themselves. This allows them to bring the
system into the exact state the body wishes to measure.</p>
<p>Our example, directly drawn from the benchmark suite of Tcllib's
<b class="package"><a href="../struct/struct_set.html">struct::set</a></b> package, is for exactly the example we used
above to demonstrate the necessity for the advanced initialization and
cleanup. Its concrete initialization code constructs a variable
refering to a set with specific properties (The set has a string
representation, which is shared) affecting the speed of the inclusion
command, and the cleanup code releases the temporary variables created
by this initialization.</p>
<pre class="doctools_example">
bench -desc &quot;set include, missing &lt;SC&gt; x$times $n&quot; <b class="option">-ipre</b> {
    set A $sx($times,$n)
    set B $A
} -body {
    struct::set include A x
} <b class="option">-ipost</b> {
    unset A B
}
</pre>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">FURTHER READING</a></h2>
<p>Now that this document has been digested the reader, assumed to be a
<i class="term">writer</i> of benchmarks, he should be fortified enough to be able
to understand the formal <i class="term">bench language specfication</i>. It will
also serve as the detailed specification and cheat sheet for all
available commands and their syntax.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench_intro.html">bench_intro</a>, <a href="bench_lang_spec.html">bench_lang_spec</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key98">bench language</a>, <a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key370">examples</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key99">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/bench/bench_lang_spec.html.







































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

<div class='fossil-doc' data-title='bench_lang_spec - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench_lang_spec(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench_lang_spec - bench language specification</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">bench_rm</b> <i class="arg">path</i>...</a></li>
<li><a href="#2"><b class="cmd">bench_tmpfile</b></a></li>
<li><a href="#3"><b class="cmd"><a href="bench.html">bench</a></b> <i class="arg">options</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies both names and syntax of all the commands
which together are the bench language, version 1.
As this document is intended to be a reference the commands are listed
in alphabetical order, and the descriptions are relatively short.
A beginner should read the more informally written
<i class="term"><a href="bench_lang_intro.html">bench language introduction</a></i> first.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">bench_rm</b> <i class="arg">path</i>...</a></dt>
<dd><p>This command silently removes the files specified as its arguments and
then returns the empty string as its result.
The command is <em>trusted</em>, there is no checking if the specified
files are outside of whatever restricted area the benchmarks are run
in.</p></dd>
<dt><a name="2"><b class="cmd">bench_tmpfile</b></a></dt>
<dd><p>This command returns the path to a bench specific unique temporary
file. The uniqueness means that multiple calls will return different
paths. While the path may exist from previous runs, the command itself
does <em>not</em> create aynthing.</p>
<p>The base location of the temporary files is platform dependent:</p>
<dl class="doctools_definitions">
<dt>Unix, and indeterminate platform</dt>
<dd><p>&quot;<b class="file">/tmp</b>&quot;</p></dd>
<dt>Windows</dt>
<dd><p><b class="variable">$TEMP</b></p></dd>
<dt>Anything else</dt>
<dd><p>The current working directory.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd"><a href="bench.html">bench</a></b> <i class="arg">options</i>...</a></dt>
<dd><p>This command declares a single benchmark. Its result is the empty
string. All parts of the benchmark are declared via options, and their
values. The options can occur in any order. The accepted options are:</p>
<dl class="doctools_options">
<dt><b class="option">-body</b> script</dt>
<dd><p>The argument of this option declares the body of the benchmark, the
Tcl script whose performance we wish to measure. This option, and
<b class="option">-desc</b>, are the two required parts of each benchmark.</p></dd>
<dt><b class="option">-desc</b> msg</dt>
<dd><p>The argument of this option declares the name of the benchmark. It has
to be unique, or timing data from different benchmarks will be mixed
together.</p>
<p><em>Beware!</em> This requirement is not checked when benchmarks are
executed, and the system will silently produce bogus data. This
option, and <b class="option">-body</b>, are the two required parts of each
benchmark.</p></dd>
<dt><b class="option">-ipost</b> script</dt>
<dd><p>The argument of this option declares a script which is run immediately
<em>after</em> each iteration of the body. Its responsibility is to
release resources created by the body, or <b class="option">-ipre</b>-bodym which
we do not wish to live into the next iteration.</p></dd>
<dt><b class="option">-ipre</b> script</dt>
<dd><p>The argument of this option declares a script which is run immediately
<em>before</em> each iteration of the body. Its responsibility is to
create the state of the system expected by the body so that we measure
the right thing.</p></dd>
<dt><b class="option">-iterations</b> num</dt>
<dd><p>The argument of this option declares the maximum number of times to
run the <b class="option">-body</b> of the benchmark. During execution this and the
global maximum number of iterations are compared and the smaller of
the two values is used.</p>
<p>This option should be used only for benchmarks which are expected or
known to take a long time per run. I.e. reduce the number of times
they are run to keep the overall time for the execution of the whole
benchmark within manageable limits.</p></dd>
<dt><b class="option">-post</b> script</dt>
<dd><p>The argument of this option declares a script which is run
<em>after</em> all iterations of the body have been run. Its
responsibility is to release resources created by the body,
or <b class="option">-pre</b>-body.</p></dd>
<dt><b class="option">-pre</b> script</dt>
<dd><p>The argument of this option declares a script which is run
<em>before</em> any of the iterations of the body are run. Its
responsibility is to create whatever resources are needed by the body
to run without failing.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench_intro.html">bench_intro</a>, <a href="bench_lang_intro.html">bench_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key98">bench language</a>, <a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key660">specification</a>, <a href="../../../../index.html#key99">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/bench/bench_read.html.





































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

<div class='fossil-doc' data-title='bench::in - Benchmarking/Performance tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench::in(n) 0.1 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench::in - bench::in - Reading benchmark results</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">csv</b></li>
<li>package require <b class="pkgname">bench::in <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::bench::in::read</b> <i class="arg">file</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a command for reading benchmark results from
files, sockets, etc.</p>
<p>A reader interested in the creation, processing or writing of such
results should go and read
<i class="term"><a href="bench.html">bench - Processing benchmark suites</a></i> instead.</p>
<p>If the bench language itself is the actual interest please start with
the <i class="term"><a href="bench_lang_intro.html">bench language introduction</a></i> and then proceed from there
to the formal <i class="term"><a href="bench_lang_spec.html">bench language specification</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::bench::in::read</b> <i class="arg">file</i></a></dt>
<dd><p>This command reads a benchmark result from the specified <i class="arg">file</i>
and returns it as its result. The command understands the three
formats created by the commands</p>
<dl class="doctools_commands">
<dt><b class="cmd">bench::out::raw</b></dt>
<dd><p>Provided by package <b class="package"><a href="bench.html">bench</a></b>.</p></dd>
<dt><b class="cmd"><a href="bench_wcsv.html">bench::out::csv</a></b></dt>
<dd><p>Provided by package <b class="package"><a href="bench_wcsv.html">bench::out::csv</a></b>.</p></dd>
<dt><b class="cmd"><a href="bench_wtext.html">bench::out::text</a></b></dt>
<dd><p>Provided by package <b class="package"><a href="bench_wtext.html">bench::out::text</a></b>.</p></dd>
</dl>
<p>and automatically detects which format is used by the input file.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, <a href="bench_wcsv.html">bench::out::csv</a>, <a href="bench_wtext.html">bench::out::text</a>, <a href="bench_intro.html">bench_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key49">csv</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key504">human readable</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key525">reading</a>, <a href="../../../../index.html#key99">testing</a>, <a href="../../../../index.html#key248">text</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/bench/bench_wcsv.html.





















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170

<div class='fossil-doc' data-title='bench::out::csv - Benchmarking/Performance tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench::out::csv(n) 0.1.2 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench::out::csv - bench::out::csv - Formatting benchmark results as CSV</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">bench::out::csv <span class="opt">?0.1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::bench::out::csv</b> <i class="arg">bench_result</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for fomatting of benchmark results into
a CSV table importable by spread sheets.</p>
<p>A reader interested in the generation or processing of such results should
go and read <i class="term"><a href="bench.html">bench - Processing benchmark suites</a></i> instead.</p>
<p>If the bench language itself is the actual interest please start with
the <i class="term"><a href="bench_lang_intro.html">bench language introduction</a></i> and then proceed from there
to the formal <i class="term"><a href="bench_lang_spec.html">bench language specification</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::bench::out::csv</b> <i class="arg">bench_result</i></a></dt>
<dd><p>This command formats the specified benchmark result for output to a
file, socket, etc. This specific command generates CSV data importable
by spread sheets.</p>
<p>For other formatting styles see the packages <b class="package"><a href="bench.html">bench</a></b> and
<b class="package"><a href="bench_wtext.html">bench::out::text</a></b> which provide commands to format benchmark
results in raw form, or for human consumption, respectively.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, <a href="bench_wtext.html">bench::out::text</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key49">csv</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key99">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/bench/bench_wtext.html.





















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170

<div class='fossil-doc' data-title='bench::out::text - Benchmarking/Performance tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench::out::text(n) 0.1.2 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench::out::text - bench::out::text - Formatting benchmark results as human readable text</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">bench::out::text <span class="opt">?0.1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::bench::out::text</b> <i class="arg">bench_result</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for fomatting of benchmark results into
human readable text.</p>
<p>A reader interested in the generation or processing of such results should
go and read <i class="term"><a href="bench.html">bench - Processing benchmark suites</a></i> instead.</p>
<p>If the bench language itself is the actual interest please start with
the <i class="term"><a href="bench_lang_intro.html">bench language introduction</a></i> and then proceed from there
to the formal <i class="term"><a href="bench_lang_spec.html">bench language specification</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::bench::out::text</b> <i class="arg">bench_result</i></a></dt>
<dd><p>This command formats the specified benchmark result for output to a
file, socket, etc. This specific command generates human readable
text.</p>
<p>For other formatting styles see the packages <b class="package"><a href="bench.html">bench</a></b> and
<b class="package"><a href="bench_wcsv.html">bench::out::csv</a></b> which provide commands to format benchmark
results in raw form, or as importable CSV data, respectively.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, <a href="bench_wcsv.html">bench::out::csv</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key504">human readable</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key99">testing</a>, <a href="../../../../index.html#key248">text</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/bibtex/bibtex.html.



























































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253

<div class='fossil-doc' data-title='bibtex - bibtex'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bibtex(n) 0.6 tcllib &quot;bibtex&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bibtex - Parse bibtex files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">bibtex <span class="opt">?0.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::bibtex::parse</b> <span class="opt">?<i class="arg">options</i>?</span> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::bibtex::parse</b> <i class="arg">text</i></a></li>
<li><a href="#3"><b class="cmd">::bibtex::parse</b> <span class="opt">?<b class="option">-command</b> <i class="arg">cmd</i>?</span> <b class="option">-channel</b> <i class="arg">chan</i></a></li>
<li><a href="#4"><b class="cmd">::bibtex::parse</b> <span class="opt">?<b class="option">-recordcommand</b>   <i class="arg">recordcmd</i>?</span> <span class="opt">?<b class="option">-preamblecommand</b> <i class="arg">preamblecmd</i>?</span> <span class="opt">?<b class="option">-stringcommand</b>   <i class="arg">stringcmd</i>?</span> <span class="opt">?<b class="option">-commentcommand</b>  <i class="arg">commentcmd</i>?</span> <span class="opt">?<b class="option">-progresscommand</b> <i class="arg">progresscmd</i>?</span> <span class="opt">?<b class="option">-casesensitivestrings</b> <i class="arg">bool</i>?</span> (<i class="arg">text</i> | <b class="option">-channel</b> <i class="arg">chan</i>)</a></li>
<li><a href="#5"><b class="cmd">::bibtex::wait</b> <i class="arg">token</i></a></li>
<li><a href="#6"><b class="cmd">::bibtex::destroy</b> <i class="arg">token</i></a></li>
<li><a href="#7"><b class="cmd">::bibtex::addStrings</b> <i class="arg">token</i> <i class="arg">stringdict</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for the parsing of bibliographies in
BibTeX format.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::bibtex::parse</b> <span class="opt">?<i class="arg">options</i>?</span> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This is the general form of the command for parsing a
bibliography. Depending on the options used to invoke it it will
either return a token for the parser, or the parsed entries of the
input bibliography. Instead of performing an immediate parse returning
a predefined format the command can also enter an event-based parsing
style where all relevant entries in the input are reported through
callback commands, in the style of SAX.</p></dd>
<dt><a name="2"><b class="cmd">::bibtex::parse</b> <i class="arg">text</i></a></dt>
<dd><p>In this form the command will assume that the specified <i class="arg">text</i> is
a bibliography in BibTeX format, parse it, and then return a list
containing one element per record found in the bibliography. Note that
comments, string definitions, preambles, etc. will not show up in the
result.  Each element will be a list containing record type,
bibliography key and record data, in this order. The record data will
be a dictionary, its keys the keys of the record, with the associated
values.</p></dd>
<dt><a name="3"><b class="cmd">::bibtex::parse</b> <span class="opt">?<b class="option">-command</b> <i class="arg">cmd</i>?</span> <b class="option">-channel</b> <i class="arg">chan</i></a></dt>
<dd><p>In this form the command will reads the bibliography from the
specified Tcl channel <i class="arg">chan</i> and then returns the same data
structure as described above.</p>
<p>If however the option <b class="option">-command</b> is specified the result will be a
handle for the parser instead and all processing will be incremental
and happen in the background. When the input has been exhausted the
callback <i class="arg">cmd</i> will be invoked with the result of the parse. The
exact definition for the callback is</p>
<dl class="doctools_definitions">
<dt><b class="cmd">cmd</b> <i class="arg">token</i> <i class="arg">parseresult</i></dt>
<dd><p>The parse result will have the structure explained above, for the
simpler forms of the parser.</p></dd>
</dl>
<p><em>Note</em> that the parser will <em>not</em> close the channel after it
has exhausted it. This is still the responsibility of the user of the
parser.</p></dd>
<dt><a name="4"><b class="cmd">::bibtex::parse</b> <span class="opt">?<b class="option">-recordcommand</b>   <i class="arg">recordcmd</i>?</span> <span class="opt">?<b class="option">-preamblecommand</b> <i class="arg">preamblecmd</i>?</span> <span class="opt">?<b class="option">-stringcommand</b>   <i class="arg">stringcmd</i>?</span> <span class="opt">?<b class="option">-commentcommand</b>  <i class="arg">commentcmd</i>?</span> <span class="opt">?<b class="option">-progresscommand</b> <i class="arg">progresscmd</i>?</span> <span class="opt">?<b class="option">-casesensitivestrings</b> <i class="arg">bool</i>?</span> (<i class="arg">text</i> | <b class="option">-channel</b> <i class="arg">chan</i>)</a></dt>
<dd><p>This is the most low-level form for the parser. The returned result
will be a handle for the parser. During processing it will invoke the
invoke the specified callback commands for each type of data found in
the bibliography.</p>
<p>The processing will be incremental and happen in the background if,
and only if a Tcl channel <i class="arg">chan</i> is specified. For a <i class="arg">text</i>
the processing will happen immediately and all callbacks will be
invoked before the command itself returns.</p>
<p>The callbacks, i.e. <i class="arg">*cmd</i>, are all command prefixes and will be
invoked with additional arguments appended to them. The meaning of the
arguments depends on the callback and is explained below. The first
argument will however always be the handle of the parser invoking the
callback.</p>
<dl class="doctools_definitions">
<dt><b class="option">-casesensitivestrings</b></dt>
<dd><p>This option takes a boolean value. When set string macro processing
becomes case-sensitive. The default is case-insensitive string macro
processing.</p></dd>
<dt><b class="cmd">recordcmd</b> <i class="arg">token</i> <i class="arg">type</i> <i class="arg">key</i> <i class="arg">recorddict</i></dt>
<dd><p>This callback is invoked whenever the parser detects a bibliography
record in the input. Its arguments are the record type, the
bibliography key for the record, and a dictionary containing the keys
and values describing the record. Any string macros known to the
parser have already been expanded.</p></dd>
<dt><b class="cmd">preamblecmd</b> <i class="arg">token</i> <i class="arg">preambletext</i></dt>
<dd><p>This callback is invoked whenever the parser detects an @preamble
block in the input. The only additional argument is the text found in
the preamble block. By default such entries are ignored.</p></dd>
<dt><b class="cmd">stringcmd</b> <i class="arg">token</i> <i class="arg">stringdict</i></dt>
<dd><p>This callback is invoked whenever the parser detects an @string-based
macro definition in the input. The argument is a dictionary with the
macro names as keys and their replacement strings as values. By
default such definitions are added to the parser state for use in
future bibliography records.</p></dd>
<dt><b class="cmd">commentcmd</b> <i class="arg">token</i> <i class="arg">commenttext</i></dt>
<dd><p>This callback is invoked whenever the parser detects a comment in the
input. The only additional argument is the comment text. By default
such entries are ignored.</p></dd>
<dt><b class="cmd">progresscmd</b> <i class="arg">token</i> <i class="arg">percent</i></dt>
<dd><p>This callback is invoked during processing to tell the user about the
progress which has been made. Its argument is the percentage of data
processed, as integer number between <b class="const">0</b> and <b class="const">100</b>.
In the case of incremental processing the perecentage will always be
<b class="const">-1</b> as the total number of entries is not known beforehand.</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::bibtex::wait</b> <i class="arg">token</i></a></dt>
<dd><p>This command waits for the parser represented by the <i class="arg">token</i> to
complete and then returns. The returned result is the empty string.</p></dd>
<dt><a name="6"><b class="cmd">::bibtex::destroy</b> <i class="arg">token</i></a></dt>
<dd><p>This command cleans up all internal state associated with the parser
represented by the handle <i class="arg">token</i>, effectively destroying it. This
command can be called from within the parser callbacks to terminate
processing.</p></dd>
<dt><a name="7"><b class="cmd">::bibtex::addStrings</b> <i class="arg">token</i> <i class="arg">stringdict</i></a></dt>
<dd><p>This command adds the macro definitions stored in the
dictionary <i class="arg">stringdict</i> to the parser represented
by the handle <i class="arg">token</i>.</p>
<p>The dictionary keys are the macro names and the values their
replacement strings. This command has the correct signature for use as
a <b class="option">-stringcommand</b> callback in an invokation of the command
<b class="cmd">::bibtex::parse</b>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bibtex</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key421">bibliography</a>, <a href="../../../../index.html#key422">bibtex</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key192">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 for documentation, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/blowfish/blowfish.html.





































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258

<div class='fossil-doc' data-title='blowfish - Blowfish Block Cipher'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">blowfish(n) 1.0.3 tcllib &quot;Blowfish Block Cipher&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>blowfish - Implementation of the Blowfish block cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section4">MODES OF OPERATION</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section6">REFERENCES</a></li>
<li class="doctools_section"><a href="#section7">AUTHORS</a></li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">blowfish <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::blowfish::blowfish</b> <span class="opt">?<i class="arg">-mode [ecb|cbc]</i>?</span> <span class="opt">?<i class="arg">-dir [encrypt|decrypt]</i>?</span> <i class="arg">-key keydata</i> <span class="opt">?<i class="arg">-iv vector</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> <span class="opt">?<i class="arg">-pad padchar</i>?</span> [ <i class="arg">-in channel</i> | <span class="opt">?<i class="arg">--</i>?</span> <i class="arg">data</i> ]</a></li>
<li><a href="#2"><b class="cmd">::blowfish::Init</b> <i class="arg">mode</i> <i class="arg">keydata</i> <i class="arg">iv</i></a></li>
<li><a href="#3"><b class="cmd">::blowfish::Encrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::blowfish::Decrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::blowfish::Reset</b> <i class="arg">Key</i> <i class="arg">iv</i></a></li>
<li><a href="#6"><b class="cmd">::blowfish::Final</b> <i class="arg">Key</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is an implementation in Tcl of the Blowfish algorithm
developed by Bruce Schneier [1]. Blowfish is a 64-bit block cipher
designed to operate quickly on 32 bit architectures and accepting a
variable key length. This implementation supports ECB and CBC mode
blowfish encryption.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::blowfish::blowfish</b> <span class="opt">?<i class="arg">-mode [ecb|cbc]</i>?</span> <span class="opt">?<i class="arg">-dir [encrypt|decrypt]</i>?</span> <i class="arg">-key keydata</i> <span class="opt">?<i class="arg">-iv vector</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> <span class="opt">?<i class="arg">-pad padchar</i>?</span> [ <i class="arg">-in channel</i> | <span class="opt">?<i class="arg">--</i>?</span> <i class="arg">data</i> ]</a></dt>
<dd><p>Perform the <b class="package">blowfish</b> algorithm on either the data provided
by the argument or on the data read from the <i class="arg">-in</i> channel. If
an <i class="arg">-out</i> channel is given then the result will be written to
this channel.</p>
<p>The <i class="arg">-key</i> option must be given. This parameter takes a binary
string of variable length and is used to generate the <b class="package">blowfish</b>
key schedule. You should be aware that creating a key
schedule is quite an expensive operation in blowfish so it is worth
reusing the key where possible. See <b class="cmd">Reset</b>.</p>
<p>The <i class="arg">-mode</i> and <i class="arg">-dir</i> options are optional and default to cbc
mode and encrypt respectively. The initialization vector <i class="arg">-iv</i>
takes an 8 byte binary argument which defaults to 8 zeros.
See <span class="sectref"><a href="#section4">MODES OF OPERATION</a></span> for more about available modes and
their uses.</p>
<p>Blowfish is a 64-bit block cipher. This means that the data must be
provided in units that are a multiple of 8 bytes. The <b class="cmd">blowfish</b>
command will by default add nul characters to pad the input data to a
multiple of 8 bytes if necessary. The programming api commands will
never add padding and instead will raise an error if the input is not
a multiple of the block size. The <i class="arg">-pad</i> option can be used to
change the padding character or to disable padding if the empty string
is provided as the argument.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROGRAMMING INTERFACE</a></h2>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">::blowfish::Init</b> <i class="arg">mode</i> <i class="arg">keydata</i> <i class="arg">iv</i></a></dt>
<dd><p>Construct a new blowfish key schedule using the specified key data and
the given initialization vector. The initialization vector is not used
with ECB mode but is important for CBC mode.
See <span class="sectref"><a href="#section4">MODES OF OPERATION</a></span> for details about cipher modes.</p></dd>
<dt><a name="3"><b class="cmd">::blowfish::Encrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></dt>
<dd><p>Use a prepared key acquired by calling <b class="cmd">Init</b> to encrypt the
provided data. The data argument should be a binary array that is a
multiple of the block size of 8 bytes. The result is a binary
array the same size as the input of encrypted data.</p></dd>
<dt><a name="4"><b class="cmd">::blowfish::Decrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></dt>
<dd><p>Decipher data using the key. Note that the same key may be used to
encrypt and decrypt data provided that the initialization vector is
reset appropriately for CBC mode.</p></dd>
<dt><a name="5"><b class="cmd">::blowfish::Reset</b> <i class="arg">Key</i> <i class="arg">iv</i></a></dt>
<dd><p>Reset the initialization vector. This permits the programmer to re-use
a key and avoid the cost of re-generating the key schedule where the
same key data is being used multiple times.</p></dd>
<dt><a name="6"><b class="cmd">::blowfish::Final</b> <i class="arg">Key</i></a></dt>
<dd><p>This should be called to clean up resources associated with <i class="arg">Key</i>.
Once this function has been called the key may not be used again.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">MODES OF OPERATION</a></h2>
<dl class="doctools_definitions">
<dt>Electronic Code Book (ECB)</dt>
<dd><p>ECB is the basic mode of all block ciphers. Each block is encrypted
independently and so identical plain text will produce identical
output when encrypted with the same key. Any encryption errors will
only affect a single block however this is vulnerable to known
plaintext attacks.</p></dd>
<dt>Cipher Block Chaining (CBC)</dt>
<dd><p>CBC mode uses the output of the last block encryption to affect the
current block. An initialization vector of the same size as the cipher
block size is used to handle the first block. The initialization
vector should be chosen randomly and transmitted as the first block of
the output. Errors in encryption affect the current block and the next
block after which the cipher will correct itself. CBC is the most
commonly used mode in software encryption.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<pre class="doctools_example">
% blowfish::blowfish -hex -mode ecb -dir encrypt -key secret01 &quot;hello, world!&quot;
d0d8f27e7a374b9e2dbd9938dd04195a
</pre>
<pre class="doctools_example">
 set Key [blowfish::Init cbc $eight_bytes_key_data $eight_byte_iv]
 append ciphertext [blowfish::Encrypt $Key $plaintext]
 append ciphertext [blowfish::Encrypt $Key $additional_plaintext]
 blowfish::Final $Key
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Schneier, B. &quot;Applied Cryptography, 2nd edition&quot;, 1996,
    ISBN 0-471-11709-9, pub. John Wiley &amp; Sons.</p></li>
</ol>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">AUTHORS</a></h2>
<p>Frank Pilhofer, Pat Thoyts</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>blowfish</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>3des, <a href="../des/des.html">des</a>, <a href="../rc4/rc4.html">rc4</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key297">block cipher</a>, <a href="../../../../index.html#key801">blowfish</a>, <a href="../../../../index.html#key800">cryptography</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/cache/async.html.

















































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<div class='fossil-doc' data-title='cache::async - In-memory caches'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cache::async(n) 0.3 tcllib &quot;In-memory caches&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cache::async - Asynchronous in-memory cache</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">cache::async <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::cache::async</b> <i class="arg">objectName</i> <i class="arg">commandprefix</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">get</b> <i class="arg">key</i> <i class="arg">donecmdprefix</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">set</b> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">unset</b> <i class="arg">key</i></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">exists</b> <i class="arg">key</i></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">clear</b> <span class="opt">?<i class="arg">key</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects which cache data in memory, and operate
asynchronously with regard to request and responses. The objects are
agnostic with regard to cache keys and values, and unknown methods are
delegated to the provider of cached data. These two properties make it
easy to use caches as a facade for any data provider.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports a class, <b class="class">cache::async</b>, as specified
below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::cache::async</b> <i class="arg">objectName</i> <i class="arg">commandprefix</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>The command creates a new <i class="term"><a href="../../../../index.html#key384">cache</a></i> object with an associated
global Tcl command whose name is <i class="arg">objectName</i>.  This command may
be used to invoke various operations on the object.</p>
<p>The <i class="arg">commandprefix</i> is the action to perform when an user asks for
data in the cache and the cache doesn't yet know about the key. When
run the commandprefix is given three additional arguments, the string
<b class="const">get</b>, the key requested, and the cache object itself, in the
form of its object command, in this order. The execution of the action
is done in an idle-handler, decoupling it from the original request.</p>
<p>The only supported option is</p>
<dl class="doctools_options">
<dt><b class="option">-full-async-results</b></dt>
<dd><p>This option defines the behaviour of the cache for when requested keys
are known to the cache at the time of <b class="method">get</b> request. By default
such requeste are responded to asynchronously as well. Setting this
option to <b class="const">false</b> forces the cache to respond to them
synchronuously, although still through the specified callback.</p></dd>
</dl></dd>
</dl>
<p>The object commands created by the class commands above have
the form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">get</b> <i class="arg">key</i> <i class="arg">donecmdprefix</i></a></dt>
<dd><p>This method requests the data for the <i class="arg">key</i> from the cache. If the
data is not yet known the command prefix specified during construction
of the cache object is used to ask for this information.</p>
<p>Whenever the information is/becomes available the <i class="arg">donecmdprefix</i>
will be run to transfer the result to the caller. This command prefix
is invoked with either 2 or 3 arguments, i.e.</p>
<ol class="doctools_enumerated">
<li><p>The string <b class="const">set</b>, the <i class="arg">key</i>, and the value.</p></li>
<li><p>The string <b class="const">unset</b>, and the <i class="arg">key</i>.</p></li>
</ol>
<p>These two possibilities are used to either signal the value for the
<i class="arg">key</i>, or that the <i class="arg">key</i> has no value defined for it. The
latter is distinct from the cache not knowing about the <i class="arg">key</i>.</p>
<p>For a cache object configured to be fully asynchronous (default) the
<i class="arg">donecmdprefix</i> is always run in an idle-handler, decoupling it
from the request. Otherwise the callback will be invoked synchronously
when the <i class="arg">key</i> is known to the cache at the time of the
invokation.</p>
<p>Another important part of the cache's behaviour, as it is asynchronous
it is possible that multiple <b class="method">get</b> requests are issued for the
same <i class="arg">key</i> before it can respond. In that case the cache will
issue only one data request to the provider, for the first of these,
and suspend the others, and then notify all of them when the data
becomes available.</p></dd>
<dt><a name="3"><i class="arg">objectName</i> <b class="method">set</b> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">unset</b> <i class="arg">key</i></a></dt>
<dd><p>These two methods are provided to allow users of the cache to make
keys known to the cache, as either having a <i class="arg">value</i>, or as
undefined.</p>
<p>It is expected that the data provider (see <i class="arg">commandprefix</i> of the
constructor) uses them in response to data requests for unknown keys.</p>
<p>Note how this matches the cache's own API towards its caller, calling
the <i class="arg">donecmd</i> of <b class="method">get</b>-requests issued to itself with
either &quot;set key value&quot; or &quot;unset key&quot;, versus issuing
<b class="method">get</b>-requests to its own provider with itself in the place of
the <i class="arg">donecmd</i>, expecting to be called with either &quot;set key value&quot;
or &quot;unset key&quot;.</p>
<p>This also means that these methods invoke the <i class="arg">donecmd</i> of all
<b class="method">get</b>-requests waiting for information about the modified
<i class="arg">key</i>.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">exists</b> <i class="arg">key</i></a></dt>
<dd><p>This method queries the cache for knowledge about the <i class="arg">key</i> and
returns a boolean value. The result is <b class="const">true</b> if the key is
known, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">clear</b> <span class="opt">?<i class="arg">key</i>?</span></a></dt>
<dd><p>This method resets the state of either the specified <i class="arg">key</i> or of
all keys known to the cache, making it unkown. This forces future
<b class="method">get</b>-requests to reload the information from the provider.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>cache</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key644">asynchronous</a>, <a href="../../../../index.html#key384">cache</a>, <a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key645">synchronous</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/clock/iso8601.html.





































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

<div class='fossil-doc' data-title='clock_iso8601 - Date/Time Utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">clock_iso8601(n) 0.1 tcllib &quot;Date/Time Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>clock_iso8601 - Parsing ISO 8601 dates/times</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">clock::iso8601 <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::clock::iso8601 parse_date</b> <i class="arg">date</i> <i class="arg">options...</i></a></li>
<li><a href="#2"><b class="cmd">::clock::iso8601 parse_time</b> <i class="arg">time</i> <i class="arg">options...</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides functionality to parse dates and times in
ISO 8601 format.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::clock::iso8601 parse_date</b> <i class="arg">date</i> <i class="arg">options...</i></a></dt>
<dd><p>This command parses an ISO8601 date string in an unknown variant and
returns the given date/time in seconds since epoch.</p>
<p>The acceptable options are
<b class="option">-base</b>,
<b class="option">-gmt</b>,
<b class="option">-locale</b>, and
<b class="option">-timezone</b>
of the builtin command <b class="cmd">clock scan</b>.</p></dd>
<dt><a name="2"><b class="cmd">::clock::iso8601 parse_time</b> <i class="arg">time</i> <i class="arg">options...</i></a></dt>
<dd><p>This command parses a full ISO8601 timestamp string (date and time) in
an unknown variant and returns the given time in seconds since epoch.</p>
<p>The acceptable options are
<b class="option">-base</b>,
<b class="option">-gmt</b>,
<b class="option">-locale</b>, and
<b class="option">-timezone</b>
of the builtin command <b class="cmd">clock scan</b>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>clock::iso8601</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/clock/rfc2822.html.







































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147

<div class='fossil-doc' data-title='clock_rfc2822 - Date/Time Utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">clock_rfc2822(n) 0.1 tcllib &quot;Date/Time Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>clock_rfc2822 - Parsing ISO 8601 dates/times</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">clock::rfc2822 <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::clock::rfc2822 parse_date</b> <i class="arg">date</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides functionality to parse dates in
RFC 2822 format.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::clock::rfc2822 parse_date</b> <i class="arg">date</i></a></dt>
<dd><p>This command parses an RFC2822 date string and returns
the given date in seconds since epoch. An error is thrown
if the command is unable to parse the date.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>clock::rfc2822</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/cmdline/cmdline.html.



























































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<div class='fossil-doc' data-title='cmdline - Command line and option processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cmdline(n) 1.5 tcllib &quot;Command line and option processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cmdline - Procedures to process command lines and options.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">::argv handling</a></li>
<li class="doctools_section"><a href="#section3">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Error Codes</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">cmdline <span class="opt">?1.3.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::cmdline::getopt</b> <i class="arg">argvVar</i> <i class="arg">optstring</i> <i class="arg">optVar</i> <i class="arg">valVar</i></a></li>
<li><a href="#2"><b class="cmd">::cmdline::getKnownOpt</b> <i class="arg">argvVar</i> <i class="arg">optstring</i> <i class="arg">optVar</i> <i class="arg">valVar</i></a></li>
<li><a href="#3"><b class="cmd">::cmdline::getoptions</b> <i class="arg">arglistVar</i> <i class="arg">optlist</i> <span class="opt">?<i class="arg">usage</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::cmdline::getKnownOptions</b> <i class="arg">arglistVar</i> <i class="arg">optlist</i> <span class="opt">?<i class="arg">usage</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::cmdline::usage</b> <i class="arg">optlist</i> <span class="opt">?<i class="arg">usage</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::cmdline::getfiles</b> <i class="arg">patterns</i> <i class="arg">quiet</i></a></li>
<li><a href="#7"><b class="cmd">::cmdline::getArgv0</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to parse command lines and options.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">::argv handling</a></h2>
<p>One of the most common variables this package will be used with is
<b class="variable">::argv</b>, which holds the command line of the current
application. This variable has a companion <b class="variable">::argc</b> which is
initialized to the number of elements in <b class="variable">::argv</b> at the beginning
of the application.</p>
<p>The commands in this package will <em>not</em> modify the <b class="variable">::argc</b>
companion when called with <b class="variable">::argv</b>. Keeping the value consistent,
if such is desired or required, is the responsibility of the caller.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::cmdline::getopt</b> <i class="arg">argvVar</i> <i class="arg">optstring</i> <i class="arg">optVar</i> <i class="arg">valVar</i></a></dt>
<dd><p>This command works in a fashion like the standard C based <b class="cmd">getopt</b>
function.  Given an option string and a pointer to an array of args
this command will process the first argument and return info on how to
proceed. The command returns 1 if an option was found, 0 if no more
options were found, and -1 if an error occurred.</p>
<p><i class="arg">argvVar</i> contains the name of the list of arguments to
process. If options are found the list is modified and the processed
arguments are removed from the start of the list.</p>
<p><i class="arg">optstring</i> contains a list of command options that the
application will accept.  If the option ends in &quot;.arg&quot; the command
will use the next argument as an argument to the option, or extract it
from the current argument, if it is of the form &quot;option=value&quot;.
Otherwise the option is a boolean that is set to 1 if present.</p>
<p><i class="arg">optVar</i> refers to the variable the command will store the found
option into (without the leading '-' and without the .arg extension).</p>
<p><i class="arg">valVar</i> refers to the variable to store either the value for the
specified option into upon success or an error message in the case of
failure. The stored value comes from the command line for .arg
options, otherwise the value is 1.</p></dd>
<dt><a name="2"><b class="cmd">::cmdline::getKnownOpt</b> <i class="arg">argvVar</i> <i class="arg">optstring</i> <i class="arg">optVar</i> <i class="arg">valVar</i></a></dt>
<dd><p>Like <b class="cmd">::cmdline::getopt</b>, but ignores any unknown options in the
input.</p></dd>
<dt><a name="3"><b class="cmd">::cmdline::getoptions</b> <i class="arg">arglistVar</i> <i class="arg">optlist</i> <span class="opt">?<i class="arg">usage</i>?</span></a></dt>
<dd><p>Processes the set of command line options found in the list variable
named by <i class="arg">arglistVar</i> and fills in defaults for those not
specified.  This also generates an error message that lists the
allowed flags if an incorrect flag is specified. The optional
<i class="arg">usage</i>-argument contains a string to include in front of the
generated message. If not present it defaults to &quot;options:&quot;.</p>
<p><i class="arg">optlist</i> contains a list of lists where each element specifies an
option in the form: <i class="arg">flag</i> <i class="arg">default</i> <i class="arg">comment</i>.</p>
<p>If <i class="arg">flag</i> ends in &quot;.arg&quot; then the value is taken from the command
line. Otherwise it is a boolean and appears in the result if present
on the command line. If <i class="arg">flag</i> ends in &quot;.secret&quot;, it will not be
displayed in the usage.</p>
<p>The options <b class="option">-?</b>, <b class="option">-help</b>, and <b class="option">--</b> are
implicitly understood. The first two abort option processing by
throwing an error and force the generation of the usage message,
whereas the the last aborts option processing without an error,
leaving all arguments coming after for regular processing, even if
starting with a dash.</p>
<p>The result of the command is a dictionary mapping all options to their
values, be they user-specified or defaults.</p></dd>
<dt><a name="4"><b class="cmd">::cmdline::getKnownOptions</b> <i class="arg">arglistVar</i> <i class="arg">optlist</i> <span class="opt">?<i class="arg">usage</i>?</span></a></dt>
<dd><p>Like <b class="cmd">::cmdline::getoptions</b>, but ignores any unknown options in the
input.</p></dd>
<dt><a name="5"><b class="cmd">::cmdline::usage</b> <i class="arg">optlist</i> <span class="opt">?<i class="arg">usage</i>?</span></a></dt>
<dd><p>Generates and returns an error message that lists the allowed
flags. <i class="arg">optlist</i> is defined as for
<b class="cmd">::cmdline::getoptions</b>. The optional <i class="arg">usage</i>-argument
contains a string to include in front of the generated message. If not
present it defaults to &quot;options:&quot;.</p></dd>
<dt><a name="6"><b class="cmd">::cmdline::getfiles</b> <i class="arg">patterns</i> <i class="arg">quiet</i></a></dt>
<dd><p>Given a list of file <i class="arg">patterns</i> this command computes the set of
valid files.  On windows, file globbing is performed on each argument.
On Unix, only file existence is tested.  If a file argument produces
no valid files, a warning is optionally generated (set <i class="arg">quiet</i> to
true).</p>
<p>This code also uses the full path for each file.  If not given it
prepends the current working directory to the filename. This ensures
that these files will never conflict with files in a wrapped zip
file. The last sentence refers to the pro-tools.</p></dd>
<dt><a name="7"><b class="cmd">::cmdline::getArgv0</b></a></dt>
<dd><p>This command returns the &quot;sanitized&quot; version of <i class="arg">argv0</i>.  It will
strip off the leading path and removes the extension &quot;.bin&quot;. The
latter is used by the pro-apps because they must be wrapped by a shell
script.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Error Codes</a></h3>
<p>Starting with version 1.5 all errors thrown by the package have a
proper <b class="variable">::errorCode</b> for use with Tcl's <b class="cmd"><a href="../try/tcllib_try.html">try</a></b> command. This
code always has the word <b class="const">CMDLINE</b> as its first element.</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
        package require Tcl 8.5
        package require try         ;# Tcllib.
        package require cmdline 1.5 ;# First version with proper error-codes.
        # Notes:
        # - Tcl 8.6+ has 'try' as a builtin command and therefore does not
        #   need the 'try' package.
        # - Before Tcl 8.5 we cannot support 'try' and have to use 'catch'.
        #   This then requires a dedicated test (if) on the contents of
        #   ::errorCode to separate the CMDLINE USAGE signal from actual errors.
        set options {
            {a          &quot;set the atime only&quot;}
            {m          &quot;set the mtime only&quot;}
            {c          &quot;do not create non-existent files&quot;}
            {r.arg  &quot;&quot;  &quot;use time from ref_file&quot;}
            {t.arg  -1  &quot;use specified time&quot;}
        }
        set usage &quot;: MyCommandName \[options] filename ...\noptions:&quot;
        try {
            array set params [::cmdline::getoptions argv $options $usage]
        } trap {CMDLINE USAGE} {msg o} {
            # Trap the usage signal, print the message, and exit the application.
            # Note: Other errors are not caught and passed through to higher levels!
	    puts $msg
	    exit 1
        }
        if {  $params(a) } { set set_atime &quot;true&quot; }
        set has_t [expr {$params(t) != -1}]
        set has_r [expr {[string length $params(r)] &gt; 0}]
        if {$has_t &amp;&amp; $has_r} {
            return -code error &quot;Cannot specify both -r and -t&quot;
        } elseif {$has_t} {
	    ...
        }
</pre>
<p>This example, taken (and slightly modified) from the package
<b class="package"><a href="../fileutil/fileutil.html">fileutil</a></b>, shows how to use cmdline.  First, a list of
options is created, then the 'args' list is passed to cmdline for
processing.  Subsequently, different options are checked to see if
they have been passed to the script, and what their value is.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>cmdline</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key264">argument processing</a>, <a href="../../../../index.html#key263">argv</a>, <a href="../../../../index.html#key262">argv0</a>, <a href="../../../../index.html#key265">cmdline processing</a>, <a href="../../../../index.html#key261">command line processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/comm/comm.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032

<div class='fossil-doc' data-title='comm - Remote communication'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">comm(n) 4.6.3 tcllib &quot;Remote communication&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>comm - A remote communication facility for Tcl (8.3 and later)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Eval Semantics</a></li>
<li class="doctools_subsection"><a href="#subsection3">Multiple Channels</a></li>
<li class="doctools_subsection"><a href="#subsection4">Channel Configuration</a></li>
<li class="doctools_subsection"><a href="#subsection5">Id/port Assignments</a></li>
<li class="doctools_subsection"><a href="#subsection6">Execution Environment</a></li>
<li class="doctools_subsection"><a href="#subsection7">Remote Interpreters</a></li>
<li class="doctools_subsection"><a href="#subsection8">Closing Connections</a></li>
<li class="doctools_subsection"><a href="#subsection9">Callbacks</a></li>
<li class="doctools_subsection"><a href="#subsection10">Unsupported</a></li>
<li class="doctools_subsection"><a href="#subsection11">Security</a></li>
<li class="doctools_subsection"><a href="#subsection12">Blocking Semantics</a></li>
<li class="doctools_subsection"><a href="#subsection13">Asynchronous Result Generation</a></li>
<li class="doctools_subsection"><a href="#subsection14">Compatibility</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section3">Author</a></li>
<li class="doctools_section"><a href="#section4">License</a></li>
<li class="doctools_section"><a href="#section5">Bugs</a></li>
<li class="doctools_section"><a href="#section6">On Using Old Versions Of Tcl</a></li>
<li class="doctools_section"><a href="#section7">Related Work</a></li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">comm <span class="opt">?4.6.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::comm::comm send</b> <span class="opt">?-async?</span> <span class="opt">?-command <i class="arg">callback</i>?</span> <i class="arg">id</i> <i class="arg">cmd</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::comm::comm self</b></a></li>
<li><a href="#3"><b class="cmd">::comm::comm interps</b></a></li>
<li><a href="#4"><b class="cmd">::comm::comm connect</b> <span class="opt">?<i class="arg">id</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::comm::comm new</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">name value ...</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::comm::comm channels</b></a></li>
<li><a href="#7"><b class="cmd">::comm::comm config</b></a></li>
<li><a href="#8"><b class="cmd">::comm::comm config</b> <i class="arg">name</i></a></li>
<li><a href="#9"><b class="cmd">::comm::comm config</b> <span class="opt">?<i class="arg">name</i> <i class="arg">value</i> <i class="arg">...</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::comm::comm shutdown</b> <i class="arg">id</i></a></li>
<li><a href="#11"><b class="cmd">::comm::comm abort</b></a></li>
<li><a href="#12"><b class="cmd">::comm::comm destroy</b></a></li>
<li><a href="#13"><b class="cmd">::comm::comm hook</b> <i class="arg">event</i> <span class="opt">?<b class="const">+</b>?</span> <span class="opt">?<i class="arg">script</i>?</span></a></li>
<li><a href="#14"><b class="cmd">::comm::comm remoteid</b></a></li>
<li><a href="#15"><b class="cmd">::comm::comm_send</b></a></li>
<li><a href="#16"><b class="cmd">::comm::comm return_async</b></a></li>
<li><a href="#17"><b class="cmd">$future</b> <b class="method">return</b> <span class="opt">?<b class="option">-code</b> <i class="arg">code</i>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#18"><b class="cmd">$future</b> <b class="method">configure</b> <span class="opt">?<b class="option">-command</b> <span class="opt">?<i class="arg">cmdprefix</i>?</span>?</span></a></li>
<li><a href="#19"><b class="cmd">$future</b> <b class="method">cget</b> <b class="option">-command</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">comm</b> command provides an inter-interpreter remote
execution facility much like Tk's <b class="cmd">send(n)</b>, except that it uses
sockets rather than the X server for the communication path.  As a
result, <b class="package">comm</b> works with multiple interpreters, works on
Windows and Macintosh systems, and provides control over the remote
execution path.</p>
<p>These commands work just like <b class="cmd"><a href="../../../../index.html#key353">send</a></b> and <b class="cmd">winfo interps</b> :</p>
<pre class="doctools_example">
    ::comm::comm send ?-async? id cmd ?arg arg ...?
    ::comm::comm interps
</pre>
<p>This is all that is really needed to know in order to use
<b class="package">comm</b></p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Commands</a></h3>
<p>The package initializes <b class="cmd">::comm::comm</b> as the default <em>chan</em>.</p>
<p><b class="package">comm</b> names communication endpoints with an <em>id</em> unique
to each machine.  Before sending commands, the <em>id</em> of another
interpreter is needed.  Unlike Tk's send, <b class="package">comm</b> doesn't
implicitly know the <em>id</em>'s of all the interpreters on the system.
The following four methods make up the basic <b class="package">comm</b> interface.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::comm::comm send</b> <span class="opt">?-async?</span> <span class="opt">?-command <i class="arg">callback</i>?</span> <i class="arg">id</i> <i class="arg">cmd</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>This invokes the given command in the interpreter named by <i class="arg">id</i>.  The
command waits for the result and remote errors are returned unless the
<b class="option">-async</b> or <b class="option">-command</b> option is given.  If <b class="option">-async</b>
is given, send returns immediately and there is no further notification of
result.  If <b class="option">-command</b> is used, <em>callback</em> specifies a command
to invoke when the result is received.  These options are mutually
exclusive.  The callback will receive arguments in the form
<em>-option value</em>, suitable for <b class="cmd">array set</b>.
The options are: <em>-id</em>, the comm id of the interpreter that received
the command; <em>-serial</em>, a unique serial for each command sent to a
particular comm interpreter; <em>-chan</em>, the comm channel name;
<em>-code</em>, the result code of the command; <em>-errorcode</em>, the
errorcode, if any, of the command; <em>-errorinfo</em>, the errorinfo, if
any, of the command; and <em>-result</em>, the return value of the command.
If connection is lost before a reply is received, the callback will be
invoked with a connection lost message with -code equal to -1.  When
<b class="option">-command</b> is used, the command returns the unique serial for the
command.</p></dd>
<dt><a name="2"><b class="cmd">::comm::comm self</b></a></dt>
<dd><p>Returns the <em>id</em> for this channel.</p></dd>
<dt><a name="3"><b class="cmd">::comm::comm interps</b></a></dt>
<dd><p>Returns a list of all the remote <em>id</em>'s to which this channel is
connected.  <b class="package">comm</b> learns a new remote <em>id</em> when a command
is first issued it, or when a remote <em>id</em> first issues a command
to this comm channel.  <b class="cmd">::comm::comm ids</b> is an alias for this
method.</p></dd>
<dt><a name="4"><b class="cmd">::comm::comm connect</b> <span class="opt">?<i class="arg">id</i>?</span></a></dt>
<dd><p>Whereas <b class="cmd">::comm::comm send</b> will automatically connect to the
given <i class="arg">id</i>, this forces a connection to a remote <em>id</em> without
sending a command.  After this, the remote <em>id</em> will appear in
<b class="cmd">::comm::comm interps</b>.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Eval Semantics</a></h3>
<p>The evaluation semantics of <b class="cmd">::comm::comm send</b> are intended to
match Tk's <b class="cmd"><a href="../../../../index.html#key353">send</a></b> <em>exactly</em>. This means that <b class="package">comm</b>
evaluates arguments on the remote side.</p>
<p>If you find that <b class="cmd">::comm::comm send</b> doesn't work for a
particular command, try the same thing with Tk's send and see if the
result is different.  If there is a problem, please report it.  For
instance, there was had one report that this command produced an
error.  Note that the equivalent <b class="cmd"><a href="../../../../index.html#key353">send</a></b> command also produces the
same error.</p>
<pre class="doctools_example">
    % ::comm::comm send id llength {a b c}
    wrong # args: should be &quot;llength list&quot;
    % send name llength {a b c}
    wrong # args: should be &quot;llength list&quot;
</pre>
<p>The <b class="cmd">eval</b> hook (described below) can be used to change from
<b class="cmd"><a href="../../../../index.html#key353">send</a></b>'s double eval semantics to single eval semantics.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Multiple Channels</a></h3>
<p>More than one <b class="cmd">comm</b> channel (or <em>listener</em>) can be created
in each Tcl interpreter.  This allows flexibility to create full and
restricted channels.  For instance, <i class="term"><a href="../../../../index.html#key680">hook</a></i> scripts are specific
to the channel they are defined against.</p>
<dl class="doctools_definitions">
<dt><a name="5"><b class="cmd">::comm::comm new</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">name value ...</i>?</span></a></dt>
<dd><p>This creates a new channel and Tcl command with the given channel
name.  This new command controls the new channel and takes all the
same arguments as <b class="cmd">::comm::comm</b>.  Any remaining arguments are
passed to the <b class="cmd">config</b> method.  The fully qualified channel
name is returned.</p></dd>
<dt><a name="6"><b class="cmd">::comm::comm channels</b></a></dt>
<dd><p>This lists all the channels allocated in this Tcl interpreter.</p></dd>
</dl>
<p>The default configuration parameters for a new channel are:</p>
<pre class="doctools_example">
    &quot;-port 0 -local 1 -listen 0 -silent 0&quot;
</pre>
<p>The default channel <b class="cmd">::comm::comm</b> is created with:</p>
<pre class="doctools_example">
    &quot;::comm::comm new ::comm::comm -port 0 -local 1 -listen 1 -silent 0&quot;
</pre>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Channel Configuration</a></h3>
<p>The <b class="cmd">config</b> method acts similar to <b class="cmd">fconfigure</b> in that it
sets or queries configuration variables associated with a channel.</p>
<dl class="doctools_definitions">
<dt><a name="7"><b class="cmd">::comm::comm config</b></a></dt>
<dd></dd>
<dt><a name="8"><b class="cmd">::comm::comm config</b> <i class="arg">name</i></a></dt>
<dd></dd>
<dt><a name="9"><b class="cmd">::comm::comm config</b> <span class="opt">?<i class="arg">name</i> <i class="arg">value</i> <i class="arg">...</i>?</span></a></dt>
<dd><p>When given no arguments, <b class="cmd">config</b> returns a list of all variables
and their value With one argument, <b class="cmd">config</b> returns the value of
just that argument.  With an even number of arguments, the given
variables are set to the given values.</p></dd>
</dl>
<p>These configuration variables can be changed (descriptions of them are
elsewhere in this manual page):</p>
<dl class="doctools_definitions">
<dt><b class="option">-listen</b> <span class="opt">?<i class="arg">0|1</i>?</span></dt>
<dd></dd>
<dt><b class="option">-local</b>  <span class="opt">?<i class="arg">0|1</i>?</span></dt>
<dd></dd>
<dt><b class="option">-port</b>   <span class="opt">?<i class="arg">port</i>?</span></dt>
<dd></dd>
<dt><b class="option">-silent</b> <span class="opt">?<i class="arg">0|1</i>?</span></dt>
<dd></dd>
<dt><b class="option">-socketcmd</b> <span class="opt">?<i class="arg">commandname</i>?</span></dt>
<dd></dd>
<dt><b class="option">-interp</b> <span class="opt">?<i class="arg">interpreter</i>?</span></dt>
<dd></dd>
<dt><b class="option">-events</b> <span class="opt">?<i class="arg">eventlist</i>?</span></dt>
<dd></dd>
</dl>
<p>These configuration variables are read only:</p>
<dl class="doctools_definitions">
<dt><b class="option">-chan</b>    <i class="arg">chan</i></dt>
<dd></dd>
<dt><b class="option">-serial</b>  <i class="arg">n</i></dt>
<dd></dd>
<dt><b class="option">-socket</b>  sock<i class="arg">In</i></dt>
<dd></dd>
</dl>
<p>When <b class="cmd">config</b> changes the parameters of an existing channel (with
the exception of <b class="option">-interp</b> and <b class="option">-events</b>), it closes and
reopens the listening socket.
An automatically assigned channel <em>id</em> will change when this
happens.
Recycling the socket is done by invoking <b class="cmd">::comm::comm abort</b>,
which causes all active sends to terminate.</p>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Id/port Assignments</a></h3>
<p><b class="package">comm</b> uses a TCP port for endpoint <em>id</em>.  The
<b class="method">interps</b> (or <b class="method">ids</b>) method merely lists all the TCP ports
to which the channel is connected.  By default, each channel's
<em>id</em> is randomly assigned by the operating system (but usually
starts at a low value around 1024 and increases each time a new socket
is opened).  This behavior is accomplished by giving the
<b class="option">-port</b> config option a value of 0.  Alternately, a specific
TCP port number may be provided for a given channel.  As a special
case, comm contains code to allocate a a high-numbered TCP port
(&gt;10000) by using <b class="option">-port {}</b>.  Note that a channel won't be
created and initialized unless the specific port can be allocated.</p>
<p>As a special case, if the channel is configured with
<b class="option">-listen 0</b>, then it will not create a listening socket and
will use an id of <b class="const">0</b> for itself.  Such a channel is only good
for outgoing connections (although once a connection is established,
it can carry send traffic in both directions).
As another special case, if the channel is configured with
<b class="option">-silent 0</b>, then the listening side will ignore connection
attempts where the protocol negotiation phase failed, instead of
throwing an error.</p>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Execution Environment</a></h3>
<p>A communication channel in its default configuration will use the
current interpreter for the execution of all received scripts, and of
the event scripts associated with the various hooks.</p>
<p>This insecure setup can be changed by the user via the two options
<b class="option">-interp</b>, and <b class="option">-events</b>.</p>
<p>When <b class="option">-interp</b> is set all received scripts are executed in the
slave interpreter specified as the value of the option. This
interpreter is expected to exist before configuration. I.e. it is the
responsibility of the user to create it. However afterward the
communication channel takes ownership of this interpreter, and will
destroy it when the communication channel is destroyed.
Note that reconfiguration of the communication channel to either a
different interpreter or the empty string will release the ownership
<em>without</em> destroying the previously configured interpreter.  The
empty string has a special meaning, it restores the default behaviour
of executing received scripts in the current interpreter.</p>
<p><em>Also of note</em> is that replies and callbacks (a special form of
reply) are <em>not</em> considered as received scripts. They are
trusted, part of the internal machinery of comm, and therefore always
executed in the current interpreter.</p>
<p>Even if an interpreter has been configured as the execution
environment for received scripts the event scripts associated with the
various hooks will by default still be executed in the current
interpreter. To change this use the option <b class="option">-events</b> to declare
a list of the events whose scripts should be executed in the declared
interpreter as well. The contents of this option are ignored if the
communication channel is configured to execute received scripts in the
current interpreter.</p>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Remote Interpreters</a></h3>
<p>By default, each channel is restricted to accepting connections from
the local system.  This can be overridden by using the
<b class="option">-local 0</b> configuration option For such channels, the
<em>id</em> parameter takes the form <em>{ id host }</em>.</p>
<p><em>WARNING</em>: The <em>host</em> must always be specified in the same
form (e.g., as either a fully qualified domain name, plain hostname or
an IP address).</p>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Closing Connections</a></h3>
<p>These methods give control over closing connections:</p>
<dl class="doctools_definitions">
<dt><a name="10"><b class="cmd">::comm::comm shutdown</b> <i class="arg">id</i></a></dt>
<dd><p>This closes the connection to <i class="arg">id</i>, aborting all outstanding
commands in progress.  Note that nothing prevents the connection from
being immediately reopened by another incoming or outgoing command.</p></dd>
<dt><a name="11"><b class="cmd">::comm::comm abort</b></a></dt>
<dd><p>This invokes shutdown on all open connections in this comm channel.</p></dd>
<dt><a name="12"><b class="cmd">::comm::comm destroy</b></a></dt>
<dd><p>This aborts all connections and then destroys the this comm channel
itself, including closing the listening socket.  Special code allows
the default <b class="cmd">::comm::comm</b> channel to be closed such that the
<b class="cmd">::comm::comm</b> command it is not destroyed.  Doing so closes the
listening socket, preventing both incoming and outgoing commands on
the channel.  This sequence reinitializes the default channel:</p>
<pre class="doctools_example">
    &quot;::comm::comm destroy; ::comm::comm new ::comm::comm&quot;
</pre>
</dd>
</dl>
<p>When a remote connection is lost (because the remote exited or called
<b class="cmd">shutdown</b>), <b class="package">comm</b> can invoke an application callback.
This can be used to cleanup or restart an ancillary process, for
instance.  See the <i class="term">lost</i> callback below.</p>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">Callbacks</a></h3>
<p>This is a mechanism for setting hooks for particular events:</p>
<dl class="doctools_definitions">
<dt><a name="13"><b class="cmd">::comm::comm hook</b> <i class="arg">event</i> <span class="opt">?<b class="const">+</b>?</span> <span class="opt">?<i class="arg">script</i>?</span></a></dt>
<dd><p>This uses a syntax similar to Tk's <b class="cmd"><a href="../../../../index.html#key714">bind</a></b> command.  Prefixing
<i class="arg">script</i> with a <b class="const">+</b> causes the new script to be appended.
Without this, a new <i class="arg">script</i> replaces any existing script.  When
invoked without a script, no change is made.  In all cases, the new
hook script is returned by the command.</p>
<p>When an <i class="arg">event</i> occurs, the <i class="arg">script</i> associated with it is
evaluated with the listed variables in scope and available.  The
return code (<em>not</em> the return value) of the script is commonly
used decide how to further process after the hook.</p>
<p>Common variables include:</p>
<dl class="doctools_definitions">
<dt><b class="variable">chan</b></dt>
<dd><p>the name of the comm channel (and command)</p></dd>
<dt><b class="variable">id</b></dt>
<dd><p>the id of the remote in question</p></dd>
<dt><b class="variable">fid</b></dt>
<dd><p>the file id for the socket of the connection</p></dd>
</dl></dd>
</dl>
<p>These are the defined <em>events</em>:</p>
<dl class="doctools_definitions">
<dt><b class="const">connecting</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">id</b></p>
<p>This hook is invoked before making a connection to the remote named in
<i class="arg">id</i>.  An error return (via <b class="cmd"><a href="../../../../index.html#key161">error</a></b>) will abort the connection
attempt with the error.  Example:</p>
<pre class="doctools_example">
    % ::comm::comm hook connecting {
        if {[string match {*[02468]} $id]} {
            error &quot;Can't connect to even ids&quot;
        }
    }
    % ::comm::comm send 10000 puts ok
    Connect to remote failed: Can't connect to even ids
    %
</pre>
</dd>
<dt><b class="const">connected</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">fid</b>, <b class="variable">id</b>, <b class="variable">host</b>, and <b class="variable">port</b>.</p>
<p>This hook is invoked immediately after making a remote connection to
<i class="arg">id</i>, allowing arbitrary authentication over the socket named by
<i class="arg">fid</i>.  An error return (via <b class="cmd"><a href="../../../../index.html#key161">error</a></b> ) will close the
connection with the error.  <i class="arg">host</i> and <i class="arg">port</i> are merely
extracted from the <i class="arg">id</i>; changing any of these will have no effect
on the connection, however.  It is also possible to substitute and
replace <i class="arg">fid</i>.</p></dd>
<dt><b class="const">incoming</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">fid</b>, <b class="variable">addr</b>, and <b class="variable">remport</b>.</p>
<p>Hook invoked when receiving an incoming connection, allowing arbitrary
authentication over socket named by <i class="arg">fid</i>.  An error return (via
<b class="cmd"><a href="../../../../index.html#key161">error</a></b>) will close the connection with the error.  Note that the
peer is named by <i class="arg">remport</i> and <i class="arg">addr</i> but that the remote
<em>id</em> is still unknown.  Example:</p>
<pre class="doctools_example">
    ::comm::comm hook incoming {
        if {[string match 127.0.0.1 $addr]} {
            error &quot;I don't talk to myself&quot;
        }
    }
</pre>
</dd>
<dt><b class="const">eval</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">id</b>, <b class="variable">cmd</b>, and <b class="variable">buffer</b>.</p>
<p>This hook is invoked after collecting a complete script from a remote
but <em>before</em> evaluating it.  This allows complete control over
the processing of incoming commands.  <i class="arg">cmd</i> contains either
<b class="const">send</b> or <b class="const">async</b>.  <i class="arg">buffer</i> holds the script to
evaluate.  At the time the hook is called, <i class="arg">$chan remoteid</i> is
identical in value to <i class="arg">id</i>.</p>
<p>By changing <i class="arg">buffer</i>, the hook can change the script to be
evaluated.  The hook can short circuit evaluation and cause a value to
be immediately returned by using <b class="cmd"><a href="../../../../index.html#key187">return</a></b> <i class="arg">result</i> (or, from
within a procedure, <b class="cmd">return -code return</b> <i class="arg">result</i>).  An
error return (via <b class="cmd"><a href="../../../../index.html#key161">error</a></b>) will return an error result, as is if
the script caused the error.  Any other return will evaluate the
script in <i class="arg">buffer</i> as normal.  For compatibility with 3.2,
<b class="cmd">break</b> and <b class="cmd">return -code break</b> <i class="arg">result</i> is supported,
acting similarly to <b class="cmd">return {}</b> and <b class="cmd">return -code return</b>
<i class="arg">result</i>.</p>
<p>Examples:</p>
<ol class="doctools_enumerated">
<li><p>augmenting a command</p>
<pre class="doctools_example">
    % ::comm::comm send [::comm::comm self] pid
    5013
    % ::comm::comm hook eval {puts &quot;going to execute $buffer&quot;}
    % ::comm::comm send [::comm::comm self] pid
    going to execute pid
    5013
</pre>
</li>
<li><p>short circuiting a command</p>
<pre class="doctools_example">
    % ::comm::comm hook eval {puts &quot;would have executed $buffer&quot;; return 0}
    % ::comm::comm send [::comm::comm self] pid
    would have executed pid
    0
</pre>
</li>
<li><p>Replacing double eval semantics</p>
<pre class="doctools_example">
    % ::comm::comm send [::comm::comm self] llength {a b c}
    wrong # args: should be &quot;llength list&quot;
    % ::comm::comm hook eval {return [uplevel #0 $buffer]}
    return [uplevel #0 $buffer]
    % ::comm::comm send [::comm::comm self] llength {a b c}
    3
</pre>
</li>
<li><p>Using a slave interpreter</p>
<pre class="doctools_example">
    % interp create foo
    % ::comm::comm hook eval {return [foo eval $buffer]}
    % ::comm::comm send [::comm::comm self] set myvar 123
    123
    % set myvar
    can't read &quot;myvar&quot;: no such variable
    % foo eval set myvar
    123
</pre>
</li>
<li><p>Using a slave interpreter (double eval)</p>
<pre class="doctools_example">
    % ::comm::comm hook eval {return [eval foo eval $buffer]}
</pre>
</li>
<li><p>Subverting the script to execute</p>
<pre class="doctools_example">
    % ::comm::comm hook eval {
        switch -- $buffer {
            a {return A-OK}
            b {return B-OK}
            default {error &quot;$buffer is a no-no&quot;}
        }
    }
    % ::comm::comm send [::comm::comm self] pid
    pid is a no-no
    % ::comm::comm send [::comm::comm self] a
    A-OK
</pre>
</li>
</ol></dd>
<dt><b class="const">reply</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">id</b>, <b class="variable">buffer</b>, <b class="variable">ret</b>, and <b class="variable">return()</b>.</p>
<p>This hook is invoked after collecting a complete reply script from a
remote but <em>before</em> evaluating it.  This allows complete
control over the processing of replies to sent commands.  The reply
<i class="arg">buffer</i> is in one of the following forms</p>
<ul class="doctools_itemized">
<li><p>return result</p></li>
<li><p>return -code code result</p></li>
<li><p>return -code code -errorinfo info -errorcode ecode msg</p></li>
</ul>
<p>For safety reasons, this is decomposed.  The return result is in
<i class="arg">ret</i>, and the return switches are in the return array:</p>
<ul class="doctools_itemized">
<li><p><em>return(-code)</em></p></li>
<li><p><em>return(-errorinfo)</em></p></li>
<li><p><em>return(-errorcode)</em></p></li>
</ul>
<p>Any of these may be the empty string.  Modifying these four variables
can change the return value, whereas modifying <i class="arg">buffer</i> has no
effect.</p></dd>
<dt><b class="const">callback</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">id</b>, <b class="variable">buffer</b>, <b class="variable">ret</b>, and <b class="variable">return()</b>.</p>
<p>Similar to <em>reply</em>, but used for callbacks.</p></dd>
<dt><b class="const">lost</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">id</b>, and <b class="variable">reason</b>.</p>
<p>This hook is invoked when the connection to <b class="variable">id</b> is lost.  Return
value (or thrown error) is ignored.  <i class="arg">reason</i> is an explanatory
string indicating why the connection was lost.  Example:</p>
<pre class="doctools_example">
    ::comm::comm hook lost {
        global myvar
        if {$myvar(id) == $id} {
            myfunc
            return
        }
    }
</pre>
</dd>
</dl>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">Unsupported</a></h3>
<p>These interfaces may change or go away in subsequence releases.</p>
<dl class="doctools_definitions">
<dt><a name="14"><b class="cmd">::comm::comm remoteid</b></a></dt>
<dd><p>Returns the <i class="arg">id</i> of the sender of the last remote command
executed on this channel.  If used by a proc being invoked remotely,
it must be called before any events are processed.  Otherwise, another
command may get invoked and change the value.</p></dd>
<dt><a name="15"><b class="cmd">::comm::comm_send</b></a></dt>
<dd><p>Invoking this procedure will substitute the Tk <b class="cmd"><a href="../../../../index.html#key353">send</a></b> and
<b class="cmd">winfo interps</b> commands with these equivalents that use
<b class="cmd">::comm::comm</b>.</p>
<pre class="doctools_example">
    proc send {args} {
        eval ::comm::comm send $args
    }
    rename winfo tk_winfo
    proc winfo {cmd args} {
        if {![string match in* $cmd]} {
            return [eval [list tk_winfo $cmd] $args]
        }
        return [::comm::comm interps]
    }
</pre>
</dd>
</dl>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Security</a></h3>
<p>Starting with version 4.6 of the package an option <b class="option">-socketcmd</b>
is supported, allowing the user of a comm channel to specify which
command to use when opening a socket. Anything which is API-compatible
with the builtin <b class="cmd">::socket</b> (the default) can be used.</p>
<p>The envisioned main use is the specification of the <b class="cmd">tls::socket</b>
command, see package <b class="package"><a href="../../../../index.html#key331">tls</a></b>, to secure the communication.</p>
<pre class="doctools_example">
	# Load and initialize tls
	package require tls
	tls::init  -cafile /path/to/ca/cert -keyfile ...
	# Create secured comm channel
	::comm::comm new SECURE -socketcmd tls::socket -listen 1
	...
</pre>
<p>The sections <span class="sectref"><a href="#subsection6">Execution Environment</a></span> and <span class="sectref"><a href="#subsection9">Callbacks</a></span>
are also relevant to the security of the system, providing means to
restrict the execution to a specific environment, perform additional
authentication, and the like.</p>
</div>
<div id="subsection12" class="doctools_subsection"><h3><a name="subsection12">Blocking Semantics</a></h3>
<p>There is one outstanding difference between <b class="package">comm</b> and
<b class="cmd"><a href="../../../../index.html#key353">send</a></b>.  When blocking in a synchronous remote command, <b class="cmd"><a href="../../../../index.html#key353">send</a></b>
uses an internal C hook (Tk_RestrictEvents) to the event loop to look
ahead for send-related events and only process those without
processing any other events.  In contrast, <b class="package">comm</b> uses the
<b class="cmd"><a href="../../../../index.html#key418">vwait</a></b> command as a semaphore to indicate the return message has
arrived.  The difference is that a synchronous <b class="cmd"><a href="../../../../index.html#key353">send</a></b> will block
the application and prevent all events (including window related ones)
from being processed, while a synchronous <b class="cmd">::comm::comm send</b>
will block the application but still allow other events to get
processed.  In particular, <b class="cmd">after idle</b> handlers will fire
immediately when comm blocks.</p>
<p>What can be done about this?  First, note that this behavior will come
from any code using <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b> to block and wait for an event to
occur.  At the cost of multiple channel support, <b class="package">comm</b> could
be changed to do blocking I/O on the socket, giving send-like blocking
semantics.  However, multiple channel support is a very useful feature
of comm that it is deemed too important to lose.  The remaining
approaches involve a new loadable module written in C (which is
somewhat against the philosophy of <b class="cmd">comm</b>) One way would be to
create a modified version of the <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b> command that allow the
event flags passed to Tcl_DoOneEvent to be specified.  For <b class="cmd">comm</b>,
just the TCL_FILE_EVENTS would be processed.  Another way would be to
implement a mechanism like Tk_RestrictEvents, but apply it to the Tcl
event loop (since <b class="package">comm</b> doesn't require Tk).  One of these
approaches will be available in a future <b class="package">comm</b> release as an
optional component.</p>
</div>
<div id="subsection13" class="doctools_subsection"><h3><a name="subsection13">Asynchronous Result Generation</a></h3>
<p>By default the result returned by a remotely invoked command is the
result sent back to the invoker. This means that the result is
generated synchronously, and the server handling the call is blocked
for the duration of the command.</p>
<p>While this is tolerable as long as only short-running commands are
invoked on the server long-running commands, like database queries
make this a problem. One command can prevent the processing requests
of all other clients for an arbitrary period of time.</p>
<p>Before version 4.5 of comm the only solution was to rewrite the server
command to use the Tcl builtin command <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>, or one of its
relatives like <b class="cmd">tkwait</b>, to open a new event loop which processes
requests while the long-running operation is executed. This however
has its own perils, as this makes it possible to both overflow the Tcl
stack with a large number of event loop, and to have a newer requests
block the return of older ones, as the eventloop have to be unwound in
the order of their creation.</p>
<p>The proper solution is to have the invoked command indicate to
<b class="package">comm</b> that it cannot or will not deliver an immediate,
synchronous result, but will do so later. At that point the framework
can put sending the actual result on hold and continue processing
requests using the main event loop. No blocking, no nesting of event
loops. At some future date the long running operation delivers the
result to comm, via the future object, which is then forwarded to the
invoker as usual.</p>
<p>The necessary support for this solution has been added to comm since
version 4.5, in the form of the new method <b class="method">return_async</b>.</p>
<dl class="doctools_definitions">
<dt><a name="16"><b class="cmd">::comm::comm return_async</b></a></dt>
<dd><p>This command is used by a remotely invoked script to notify the comm
channel which invoked it that the result to send back to the invoker
is not generated synchronously. If this command is not called the
default/standard behaviour of comm is to send the synchronously
generated result of the script itself to the invoker.</p>
<p>The result of <b class="cmd">return_async</b> is an object. This object, called a
<i class="term">future</i> is where the result of the script has to be delivered to
when it becomes ready. When that happens it will take all the
necessary actions to deliver the result to the invoker of the script,
and then destroy itself. Should comm have lost the connection to the
invoker while the result is being computed the future will not try to
deliver the result it got, but just destroy itself. The future can be
configured with a command to call when the invoker is lost. This
enables the user to implement an early abort of the long-running
operation, should this be supported by it.</p>
<p>An example:</p>
<pre class="doctools_example">
# Procedure invoked by remote clients to run database operations.
proc select {sql} {
    # Signal the async generation of the result
    set future [::comm::comm return_async]
    # Generate an async db operation and tell it where to deliver the result.
    set query [db query -command [list $future return] $sql]
    # Tell the database system which query to cancel if the connection
    # goes away while it is running.
    $future configure -command [list db cancel $query]
    # Note: The above will work without problem only if the async
    # query will nover run its completion callback immediately, but
    # only from the eventloop. Because otherwise the future we wish to
    # configure may already be gone. If that is possible use 'catch'
    # to prevent the error from propagating.
    return
}
</pre>
<p>The API of a future object is:</p>
<dl class="doctools_definitions">
<dt><a name="17"><b class="cmd">$future</b> <b class="method">return</b> <span class="opt">?<b class="option">-code</b> <i class="arg">code</i>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Use this method to tell the future that long-running operation has
completed. Arguments are an optional return value (defaults to the
empty string), and the Tcl return code (defaults to OK).</p>
<p>The future will deliver this information to invoker, if the connection
was not lost in the meantime, and then destroy itself. If the
connection was lost it will do nothing but destroy itself.</p></dd>
<dt><a name="18"><b class="cmd">$future</b> <b class="method">configure</b> <span class="opt">?<b class="option">-command</b> <span class="opt">?<i class="arg">cmdprefix</i>?</span>?</span></a></dt>
<dd></dd>
<dt><a name="19"><b class="cmd">$future</b> <b class="method">cget</b> <b class="option">-command</b></a></dt>
<dd><p>These methods allow the user to retrieve and set a command to be
called if the connection the future belongs to has been lost.</p></dd>
</dl></dd>
</dl>
</div>
<div id="subsection14" class="doctools_subsection"><h3><a name="subsection14">Compatibility</a></h3>
<p><b class="package">comm</b> exports itself as a package.  The package version number
is in the form <em>major . minor</em>, where the major version will
only change when a non-compatible change happens to the API or
protocol.  Minor bug fixes and changes will only affect the minor
version.  To load <b class="package">comm</b> this command is usually used:</p>
<pre class="doctools_example">
    package require comm 3
</pre>
<p>Note that requiring no version (or a specific version) can also be done.</p>
<p>The revision history of <b class="package">comm</b> includes these releases:</p>
<dl class="doctools_definitions">
<dt>4.6.3</dt>
<dd><p>Fixed ticket [ced0d60fc9]. Added proper detection of eof on a
socket, properly closing it.</p></dd>
<dt>4.6.2</dt>
<dd><p>Fixed bugs 2972571 and 3066872, the first a misdetection of quoted
brace after double backslash, the other a blocking gets making for an
obvious (hinsight) DoS attack on comm channels.</p></dd>
<dt>4.6.1</dt>
<dd><p>Changed the implementation of <b class="cmd">comm::commCollect</b> to emulate
lindex's pre-Tcl 8 behaviour, i.e. it was given the ability to parse
out the first word of a list, even if the whole buffer is not a
well-formed list. Without this change the first word could only be
extracted if the whole buffer was a well-formed list (ever since Tcl
8), and in a ver-high-load situation, i.e. a server sending lots
and/or large commands very fast, this may never happen, eventually
crashing the receiver when it runs out of memory. With the change the
receiver is always able to process the first word when it becomes
well-formed, regardless of the structure of the remainder of the
buffer.</p></dd>
<dt>4.6</dt>
<dd><p>Added the option <b class="option">-socketcmd</b> enabling users to override how a
socket is opened. The envisioned main use is the specification of the
<b class="cmd">tls::socket</b> command, see package <b class="package"><a href="../../../../index.html#key331">tls</a></b>, to secure the
communication.</p></dd>
<dt>4.5.7</dt>
<dd><p>Changed handling of ports already in use to provide a proper error
message.</p></dd>
<dt>4.5.6</dt>
<dd><p>Bugfix in the replacement for <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>, made robust against of
variable names containing spaces.</p></dd>
<dt>4.5.5</dt>
<dd><p>Bugfix in the handling of hooks, typo in variable name.</p></dd>
<dt>4.5.4</dt>
<dd><p>Bugfix in the handling of the result received by the <b class="method">send</b>
method. Replaced an <em>after idle unset result</em> with an immediate
<b class="cmd">unset</b>, with the information saved to a local variable.</p>
<p>The <b class="cmd">after idle</b> can spill into a forked child process if there
is no event loop between its setup and the fork. This may bork the
child if the next event loop is the <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b> of <b class="package">comm</b>'s
<b class="method">send</b> a few lines above the <b class="cmd">after idle</b>, and the child
used the same serial number for its next request. In that case the
parent's <b class="cmd">after idle unset</b> will delete the very array element
the child is waiting for, unlocking the <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>, causing it to
access a now missing array element, instead of the expected result.</p></dd>
<dt>4.5.3</dt>
<dd><p>Bugfixes in the wrappers for the builtin <b class="cmd"><a href="../../../../index.html#key417">update</a></b> and <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>
commands.</p></dd>
<dt>4.5.2</dt>
<dd><p>Bugfix in the wrapper for the builtin <b class="cmd"><a href="../../../../index.html#key417">update</a></b> command.</p></dd>
<dt>4.5.1</dt>
<dd><p>Bugfixes in the handling of -interp for regular scripts. The handling
of the buffer was wrong for scripts which are a single statement as
list. Fixed missing argument to new command <b class="cmd">commSendReply</b>,
introduced by version 4.5. Affected debugging.</p></dd>
<dt>4.5</dt>
<dd><p>New server-side feature. The command invoked on the server can now
switch comm from the standard synchronous return of its result to an
asynchronous (defered) return. Due to the use of snit to implement the
<i class="term">future</i> objects used by this feature from this version on comm
requires at least Tcl 8.3 to run. Please read the section
<span class="sectref"><a href="#subsection13">Asynchronous Result Generation</a></span> for more details.</p></dd>
<dt>4.4.1</dt>
<dd><p>Bugfix in the execution of hooks.</p></dd>
<dt>4.4</dt>
<dd><p>Bugfixes in the handling of -interp for regular and hook
scripts. Bugfixes in channel cleanup.</p></dd>
<dt>4.3.1</dt>
<dd><p>Introduced -interp and -events to enable easy use of a slave interp
for execution of received scripts, and of event scripts.</p></dd>
<dt>4.3</dt>
<dd><p>Bugfixes, and introduces -silent to allow the user to force the
server/listening side to silently ignore connection attempts where the
protocol negotiation failed.</p></dd>
<dt>4.2</dt>
<dd><p>Bugfixes, and most important, switched to utf-8 as default encoding
for full i18n without any problems.</p></dd>
<dt>4.1</dt>
<dd><p>Rewrite of internal code to remove old pseudo-object model.  Addition
of send -command asynchronous callback option.</p></dd>
<dt>4.0</dt>
<dd><p>Per request by John LoVerso. Improved handling of error for async
invoked commands.</p></dd>
<dt>3.7</dt>
<dd><p>Moved into tcllib and placed in a proper namespace.</p></dd>
<dt>3.6</dt>
<dd><p>A bug in the looking up of the remoteid for a executed command could
be triggered when the connection was closed while several asynchronous
sends were queued to be executed.</p></dd>
<dt>3.5</dt>
<dd><p>Internal change to how reply messages from a <b class="cmd"><a href="../../../../index.html#key353">send</a></b> are handled.
Reply messages are now decoded into the <i class="arg">value</i> to pass to
<b class="cmd"><a href="../../../../index.html#key187">return</a></b>; a new return statement is then cons'd up to with this
value.  Previously, the return code was passed in from the remote as a
command to evaluate.  Since the wire protocol has not changed, this is
still the case.  Instead, the reply handling code decodes the
<b class="const">reply</b> message.</p></dd>
<dt>3.4</dt>
<dd><p>Added more source commentary, as well as documenting config variables
in this man page.  Fixed bug were loss of connection would give error
about a variable named <b class="variable">pending</b> rather than the message about
the lost connection.  <b class="cmd">comm ids</b> is now an alias for
<b class="cmd">comm interps</b> (previously, it an alias for <b class="cmd">comm chans</b>).
Since the method invocation change of 3.0, break and other exceptional
conditions were not being returned correctly from <b class="cmd">comm send</b>.
This has been fixed by removing the extra level of indirection into
the internal procedure <b class="cmd">commSend</b>.  Also added propagation of
the <i class="arg">errorCode</i> variable.  This means that these commands return
exactly as they would with <b class="cmd"><a href="../../../../index.html#key353">send</a></b>:</p>
<pre class="doctools_example">
    comm send id break
    catch {comm send id break}
    comm send id expr 1 / 0
</pre>
<p>Added a new hook for reply messages.  Reworked method invocation to
avoid the use of comm:* procedures; this also cut the invocation time
down by 40%.  Documented <b class="cmd">comm config</b> (as this manual page
still listed the defunct <b class="cmd">comm init</b>!)</p></dd>
<dt>3.3</dt>
<dd><p>Some minor bugs were corrected and the documentation was cleaned up.
Added some examples for hooks.  The return semantics of the <b class="cmd">eval</b>
hook were changed.</p></dd>
<dt>3.2</dt>
<dd><p>A new wire protocol, version 3, was added.  This is backwards
compatible with version 2 but adds an exchange of supported protocol
versions to allow protocol negotiation in the future.  Several bugs
with the hook implementation were fixed.  A new section of the man
page on blocking semantics was added.</p></dd>
<dt>3.1</dt>
<dd><p>All the documented hooks were implemented.  <b class="cmd">commLostHook</b> was
removed.  A bug in <b class="cmd">comm new</b> was fixed.</p></dd>
<dt>3.0</dt>
<dd><p>This is a new version of <b class="package">comm</b> with several major changes.
There is a new way of creating the methods available under the
<b class="cmd">comm</b> command.  The <b class="cmd">comm init</b> method has been retired
and is replaced by <b class="cmd">comm configure</b> which allows access to many
of the well-defined internal variables.  This also generalizes the
options available to <b class="cmd">comm new</b>.  Finally, there is now a
protocol version exchanged when a connection is established.  This
will allow for future on-wire protocol changes.  Currently, the
protocol version is set to 2.</p></dd>
<dt>2.3</dt>
<dd><p><b class="cmd">comm ids</b> was renamed to <b class="cmd">comm channels</b>.  General
support for <b class="cmd">comm hook</b> was fully implemented, but only the
<i class="term">lost</i> hook exists, and it was changed to follow the general
hook API.  <b class="cmd">commLostHook</b> was unsupported (replaced by
<b class="cmd">comm hook lost</b>) and <b class="cmd">commLost</b> was removed.</p></dd>
<dt>2.2</dt>
<dd><p>The <i class="term">died</i> hook was renamed <i class="term">lost</i>, to be accessed by
<b class="cmd">commLostHook</b> and an early implementation of
<b class="cmd">comm lost hook</b>.  As such, <b class="cmd">commDied</b> is now
<b class="cmd">commLost</b>.</p></dd>
<dt>2.1</dt>
<dd><p>Unsupported method <b class="cmd">comm remoteid</b> was added.</p></dd>
<dt>2.0</dt>
<dd><p><b class="package">comm</b> has been rewritten from scratch (but is fully compatible
with Comm 1.0, without the requirement to use obTcl).</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Author</a></h2>
<p>John LoVerso, John@LoVerso.Southborough.MA.US</p>
<p><em>http://www.opengroup.org/~loverso/tcl-tk/#comm</em></p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">License</a></h2>
<p>Please see the file <em>comm.LICENSE</em> that accompanied this source,
or
<a href="http://www.opengroup.org/www/dist_client/caubweb/COPYRIGHT.free.html">http://www.opengroup.org/www/dist_client/caubweb/COPYRIGHT.free.html</a>.</p>
<p>This license for <b class="package">comm</b>, new as of version 3.2, allows it to be
used for free, without any licensing fee or royalty.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs</a></h2>
<ul class="doctools_itemized">
<li><p>If there is a failure initializing a channel created with
<b class="cmd">::comm::comm new</b>, then the channel should be destroyed.
Currently, it is left in an inconsistent state.</p></li>
<li><p>There should be a way to force a channel to quiesce when changing the
configuration.</p></li>
</ul>
<p>The following items can be implemented with the existing hooks and are
listed here as a reminder to provide a sample hook in a future
version.</p>
<ul class="doctools_itemized">
<li><p>Allow easier use of a slave interp for actual command execution
(especially when operating in &quot;not local&quot; mode).</p></li>
<li><p>Add host list (xhost-like) or &quot;magic cookie&quot; (xauth-like)
authentication to initial handshake.</p></li>
</ul>
<p>The following are outstanding todo items.</p>
<ul class="doctools_itemized">
<li><p>Add an interp discovery and name-&gt;port mapping.  This is likely to be
in a separate, optional nameserver.  (See also the related work,
below.)</p></li>
<li><p>Fix the <em>{id host}</em> form so as not to be dependent upon
canonical hostnames.  This requires fixes to Tcl to resolve hostnames!</p></li>
</ul>
<p>This man page is bigger than the source file.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">On Using Old Versions Of Tcl</a></h2>
<p>Tcl7.5 under Windows contains a bug that causes the interpreter to
hang when EOF is reached on non-blocking sockets.  This can be
triggered with a command such as this:</p>
<pre class="doctools_example">
    &quot;comm send $other exit&quot;
</pre>
<p>Always make sure the channel is quiescent before closing/exiting or
use at least Tcl7.6 under Windows.</p>
<p>Tcl7.6 on the Mac contains several bugs.  It is recommended you use
at least Tcl7.6p2.</p>
<p>Tcl8.0 on UNIX contains a socket bug that can crash Tcl.  It is recommended
you use Tcl8.0p1 (or Tcl7.6p2).</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Related Work</a></h2>
<p>Tcl-DP provides an RPC-based remote execution interface, but is a
compiled Tcl extension.  See
<a href="http://www.cs.cornell.edu/Info/Projects/zeno/Projects/Tcl-DP.html">http://www.cs.cornell.edu/Info/Projects/zeno/Projects/Tcl-DP.html</a>.</p>
<p>Michael Doyle &lt;miked@eolas.com&gt; has code that implements the Tcl-DP
RPC interface using standard Tcl sockets, much like <b class="package">comm</b>.</p>
<p>Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt; uses
<b class="package">comm</b> and has built a simple nameserver as part of his Pool
library.  See <a href="http://www.purl.org/net/akupries/soft/pool/index.htm">http://www.purl.org/net/akupries/soft/pool/index.htm</a>.</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>comm</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>send(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key40">comm</a>, <a href="../../../../index.html#key355">communication</a>, <a href="../../../../index.html#key360">ipc</a>, <a href="../../../../index.html#key361">message</a>, <a href="../../../../index.html#key358">remote communication</a>, <a href="../../../../index.html#key357">remote execution</a>, <a href="../../../../index.html#key354">rpc</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key353">send</a>, <a href="../../../../index.html#key352">socket</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 1995-1998 The Open Group. All Rights Reserved.<br>
Copyright &copy; 2003-2004 ActiveState Corporation.<br>
Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/comm/comm_wire.html.





































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<div class='fossil-doc' data-title='comm_wire - Remote communication'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">comm_wire(n) 3 tcllib &quot;Remote communication&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>comm_wire - The comm wire protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Wire Protocol Version 3</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Basic Layer</a></li>
<li class="doctools_subsection"><a href="#subsection2">Basic Message Layer</a></li>
<li class="doctools_subsection"><a href="#subsection3">Negotiation Messages - Initial Handshake</a></li>
<li class="doctools_subsection"><a href="#subsection4">Script/Command Messages</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">comm</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package"><a href="comm.html">comm</a></b> command provides an inter-interpreter remote
execution facility much like Tk's <b class="cmd">send(n)</b>, except that it uses
sockets rather than the X server for the communication path.  As a
result, <b class="package"><a href="comm.html">comm</a></b> works with multiple interpreters, works on
Windows and Macintosh systems, and provides control over the remote
execution path.</p>
<p>This document contains a specification of the various versions of the
wire protocol used by comm internally for the communication between
its endpoints. It has no relevance to users of <b class="package"><a href="comm.html">comm</a></b>, only to
developers who wish to modify the package, write a compatible facility
in a different language, or some other facility based on the same
protocol.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Wire Protocol Version 3</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Basic Layer</a></h3>
<p>The basic encoding for <em>all</em> data is UTF-8. Because of this
binary data, including the NULL character, can be sent over the wire
as is, without the need for armoring it.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basic Message Layer</a></h3>
<p>On top of the <span class="sectref"><a href="#subsection1">Basic Layer</a></span> we have a
<i class="term">message oriented</i> exchange of data.
The totality of all characters written to the channel is a Tcl list,
with each element a separate <i class="term"><a href="../../../../index.html#key361">message</a></i>, each itself a list. The
messages in the overall list are separated by EOL. Note that EOL
characters can occur within the list as well. They can be
distinguished from the message-separating EOL by the fact that the
data from the beginning up to their location is not a valid Tcl list.</p>
<p>EOL is signaled through the linefeed character, i.e <b class="const">LF</b>, or,
hex <b class="const">0x0a</b>. This is following the unix convention for
line-endings.</p>
<p>As a list each message is composed of <i class="term">words</i>. Their meaning
depends on when the message was sent in the overall exchange. This is
described in the upcoming sections.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Negotiation Messages - Initial Handshake</a></h3>
<p>The command protocol is defined like this:</p>
<ul class="doctools_itemized">
<li><p>The first message send by a client to a server, when opening the
connection, contains two words. The first word is a list as well, and
contains the versions of the wire protocol the client is willing to
accept, with the most preferred version first. The second word is the
TCP port the client is listening on for connections to itself. The
value <b class="const">0</b> is used here to signal that the client will not listen
for connections, i.e. that it is purely for sending commands, and not
receiving them.</p></li>
<li><p>The first message sent by the server to the client, in response to the
message above contains only one word. This word is a list, containing
the string <b class="const">vers</b> as its first element, and the version of the
wire protocol the server has selected from the offered versions as the
second.</p></li>
</ul>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Script/Command Messages</a></h3>
<p>All messages coming after the <span class="sectref"><a href="#subsection3">initial handshake</a></span>
consist of three words. These are an instruction, a transaction id,
and the payload. The valid instructions are shown below. The
transaction ids are used by the client to match any incoming replies
to the command messages it sent. This means that a server has to copy
the transaction id from a command message to the reply it sends for
that message.</p>
<dl class="doctools_definitions">
<dt><b class="const">send</b></dt>
<dd></dd>
<dt><b class="const">async</b></dt>
<dd></dd>
<dt><b class="const">command</b></dt>
<dd><p>The payload is the Tcl script to execute on the server. It is actually
a list containing the script fragments. These fragment are
<b class="cmd">concat</b>enated together by the server to form the full script to
execute on the server side.
This emulates the Tcl &quot;eval&quot; semantics.
In most cases it is best to have only one word in the list, a list
containing the exact command.</p>
<p>Examples:</p>
<pre class="doctools_example">
    (a)     {send 1 {{array get tcl_platform}}}
    (b)     {send 1 {array get tcl_platform}}
    (c)     {send 1 {array {get tcl_platform}}}
    are all valid representations of the same command. They are
    generated via
    (a')    send {array get tcl_platform}
    (b')    send array get tcl_platform
    (c')    send array {get tcl_platform}
    respectively
</pre>
<p>Note that (a), generated by (a'), is the usual form, if only single
commands are sent by the client.
For example constructed using <b class="cmd"><a href="../../../../index.html#key302">list</a></b>, if the command contains
variable arguments. Like</p>
<pre class="doctools_example">
    send [list array get $the_variable]
</pre>
<p>These three instructions all invoke the script on the server
side. Their difference is in the treatment of result values, and thus
determines if a reply is expected.</p>
<dl class="doctools_definitions">
<dt><b class="const">send</b></dt>
<dd><p>A reply is expected. The sender is waiting for the result.</p></dd>
<dt><b class="const">async</b></dt>
<dd><p>No reply is expected, the sender has no interest in the result and is
not waiting for any.</p></dd>
<dt><b class="const">command</b></dt>
<dd><p>A reply is expected, but the sender is not waiting for it. It has
arranged to get a process-internal notification when the result
arrives.</p></dd>
</dl></dd>
<dt><b class="const">reply</b></dt>
<dd><p>Like the previous three command, however the tcl script in the payload
is highly restricted.
It has to be a syntactically valid Tcl <b class="cmd"><a href="../../../../index.html#key187">return</a></b> command. This
contains result code, value, error code, and error info.</p>
<p>Examples:</p>
<pre class="doctools_example">
    {reply 1 {return -code 0 {}}}
    {reply 1 {return -code 0 {osVersion 2.4.21-99-default byteOrder littleEndian machine i686 platform unix os Linux user andreask wordSize 4}}}
</pre>
</dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>comm</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="comm.html">comm</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key40">comm</a>, <a href="../../../../index.html#key355">communication</a>, <a href="../../../../index.html#key360">ipc</a>, <a href="../../../../index.html#key361">message</a>, <a href="../../../../index.html#key358">remote communication</a>, <a href="../../../../index.html#key357">remote execution</a>, <a href="../../../../index.html#key354">rpc</a>, <a href="../../../../index.html#key352">socket</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Docs. Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/control/control.html.

























































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<div class='fossil-doc' data-title='control - Tcl Control Flow Commands'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">control(n) 0.1.3 tcllib &quot;Tcl Control Flow Commands&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>control - Procedures for control flow structures.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">LIMITATIONS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">control <span class="opt">?0.1.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">control::control</b> <i class="arg">command</i> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">control::assert</b> <i class="arg">expr</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><b class="cmd">control::do</b> <i class="arg">body</i> <span class="opt">?<i class="arg">option test</i>?</span></a></li>
<li><a href="#4"><b class="cmd">control::no-op</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">control</b> package provides a variety of commands that provide
additional flow of control structures beyond the built-in ones
provided by Tcl.  These are commands that in many programming
languages might be considered <em>keywords</em>, or a part of the
language itself.  In Tcl, control flow structures are just commands
like everything else.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">control::control</b> <i class="arg">command</i> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The <b class="cmd">control</b> command is used as a configuration command for
customizing the other public commands of the control package.  The
<i class="arg">command</i> argument names the command to be customized.  The set of
valid <i class="arg">option</i> and subsequent arguments are determined by the
command being customized, and are documented with the command.</p></dd>
<dt><a name="2"><b class="cmd">control::assert</b> <i class="arg">expr</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>When disabled, the <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> command behaves exactly like the
<b class="cmd"><a href="../../../../index.html#key143">no-op</a></b> command.</p>
<p>When enabled, the <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> command evaluates <i class="arg">expr</i> as an
expression (in the same way that <b class="cmd">expr</b> evaluates its argument).
If evaluation reveals that <i class="arg">expr</i> is not a valid boolean
expression (according to [<b class="cmd">string is boolean -strict</b>]),
an error is raised.  If <i class="arg">expr</i> evaluates to a true boolean value
(as recognized by <b class="cmd">if</b>), then <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> returns an empty
string.  Otherwise, the remaining arguments to <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> are used
to construct a message string.  If there are no arguments, the message
string is &quot;assertion failed: $expr&quot;.  If there are arguments, they are
joined by <b class="cmd"><a href="../../../../index.html#key559">join</a></b> to form the message string.  The message string
is then appended as an argument to a callback command, and the
completed callback command is evaluated in the global namespace.</p>
<p>The <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> command can be customized by the <b class="cmd">control</b>
command in two ways:</p>
<p>[<b class="cmd">control::control assert enabled</b> <span class="opt">?<i class="arg">boolean</i>?</span>]
queries or sets whether <b class="cmd">control::assert</b> is enabled.  When called
without a <i class="arg">boolean</i> argument, a boolean value is returned
indicating whether the <b class="cmd">control::assert</b> command is enabled.  When
called with a valid boolean value as the <i class="arg">boolean</i> argument, the
<b class="cmd">control::assert</b> command is enabled or disabled to match the
argument, and an empty string is returned.</p>
<p>[<b class="cmd">control::control assert callback</b> <span class="opt">?<i class="arg">command</i>?</span>]
queries or sets the callback command that will be called by an enabled
<b class="cmd"><a href="../../../../index.html#key144">assert</a></b> on assertion failure.  When called without a
<i class="arg">command</i> argument, the current callback command is returned.
When called with a <i class="arg">command</i> argument, that argument becomes the
new assertion failure callback command.  Note that an assertion
failure callback command is always defined, even when <b class="cmd"><a href="../../../../index.html#key144">assert</a></b>
is disabled.  The default callback command is
[<b class="cmd">return -code error</b>].</p>
<p>Note that <b class="cmd">control::assert</b> has been written so that in
combination with [<b class="cmd">namespace import</b>], it is possible to
use enabled <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> commands in some namespaces and disabled
<b class="cmd"><a href="../../../../index.html#key144">assert</a></b> commands in other namespaces at the same time.  This
capability is useful so that debugging efforts can be independently
controlled module by module.</p>
<pre class="doctools_example">
% package require control
% control::control assert enabled 1
% namespace eval one namespace import ::control::assert
% control::control assert enabled 0
% namespace eval two namespace import ::control::assert
% one::assert {1 == 0}
assertion failed: 1 == 0
% two::assert {1 == 0}
</pre>
</dd>
<dt><a name="3"><b class="cmd">control::do</b> <i class="arg">body</i> <span class="opt">?<i class="arg">option test</i>?</span></a></dt>
<dd><p>The <b class="cmd"><a href="../../../../index.html#key145">do</a></b> command evaluates the script <i class="arg">body</i> repeatedly
<em>until</em> the expression <i class="arg">test</i> becomes true or as long as
(<em>while</em>) <i class="arg">test</i> is true, depending on the value of
<i class="arg">option</i> being <b class="const">until</b> or <b class="const">while</b>. If
<i class="arg">option</i> and <i class="arg">test</i> are omitted the body is evaluated exactly
once. After normal completion, <b class="cmd"><a href="../../../../index.html#key145">do</a></b> returns an empty string.
Exceptional return codes (<b class="cmd">break</b>, <b class="cmd">continue</b>, <b class="cmd"><a href="../../../../index.html#key161">error</a></b>,
etc.) during the evaluation of <i class="arg">body</i> are handled in the same way
the <b class="cmd">while</b> command handles them, except as noted in
<span class="sectref"><a href="#section3">LIMITATIONS</a></span>, below.</p></dd>
<dt><a name="4"><b class="cmd">control::no-op</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The <b class="cmd"><a href="../../../../index.html#key143">no-op</a></b> command takes any number of arguments and does
nothing.  It returns an empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LIMITATIONS</a></h2>
<p>Several of the commands provided by the <b class="cmd">control</b> package accept
arguments that are scripts to be evaluated.  Due to fundamental
limitations of Tcl's <b class="cmd">catch</b> and <b class="cmd"><a href="../../../../index.html#key187">return</a></b> commands, it is not
possible for these commands to properly evaluate the command
[<b class="cmd">return -code $code</b>] within one of those script
arguments for any value of <i class="arg">$code</i> other than <i class="arg">ok</i>.  In this
way, the commands of the <b class="cmd">control</b> package are limited as compared
to Tcl's built-in control flow commands (such as <b class="cmd">if</b>,
<b class="cmd">while</b>, etc.) and those control flow commands that can be
provided by packages coded in C.  An example of this difference:</p>
<pre class="doctools_example">
% package require control
% proc a {} {while 1 {return -code error a}}
% proc b {} {control::do {return -code error b} while 1}
% catch a
1
% catch b
0
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>control</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>break, continue, expr, if, <a href="../../../../index.html#key559">join</a>, namespace, <a href="../../../../index.html#key187">return</a>, <a href="../../../../index.html#key280">string</a>, while</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key144">assert</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key145">do</a>, <a href="../../../../index.html#key141">flow</a>, <a href="../../../../index.html#key143">no-op</a>, <a href="../../../../index.html#key142">structure</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/coroutine/coro_auto.html.

















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

<div class='fossil-doc' data-title='coroutine::auto - Coroutine utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">coroutine::auto(n) 1.1.3 tcllib &quot;Coroutine utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>coroutine::auto - Automatic event and IO coroutine awareness</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">coroutine::auto 1.1.3</b></li>
<li>package require <b class="pkgname">coroutine 1.1</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">coroutine::auto</b> package provides no commands or other
directly visible functionality.
Built on top of the package <b class="package"><a href="tcllib_coroutine.html">coroutine</a></b>, it intercepts various
builtin commands of the Tcl core to make any code using them
coroutine-oblivious, i.e. able to run inside and outside of a
coroutine without changes.</p>
<p>The commands so affected by this package are</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#key414">after</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key415">exit</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key416">gets</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key413">global</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key411">read</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key417">update</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key418">vwait</a></b></dt>
<dd></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>coroutine</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key414">after</a>, <a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key219">coroutine</a>, <a href="../../../../index.html#key412">events</a>, <a href="../../../../index.html#key415">exit</a>, <a href="../../../../index.html#key416">gets</a>, <a href="../../../../index.html#key413">global</a>, <a href="../../../../index.html#key419">green threads</a>, <a href="../../../../index.html#key411">read</a>, <a href="../../../../index.html#key410">threads</a>, <a href="../../../../index.html#key417">update</a>, <a href="../../../../index.html#key418">vwait</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Coroutine</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/coroutine/tcllib_coroutine.html.











































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

<div class='fossil-doc' data-title='coroutine - Coroutine utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">coroutine(n) 1.1.3 tcllib &quot;Coroutine utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>coroutine - Coroutine based event and IO handling</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">coroutine 1.1.3</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">coroutine::util after</b> <i class="arg">delay</i></a></li>
<li><a href="#2"><b class="cmd">coroutine::util await</b> <i class="arg">varname</i>...</a></li>
<li><a href="#3"><b class="cmd">coroutine::util create</b> <i class="arg">arg</i>...</a></li>
<li><a href="#4"><b class="cmd">coroutine::util exit</b> <span class="opt">?<i class="arg">status</i>?</span></a></li>
<li><a href="#5"><b class="cmd">coroutine::util gets</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">varname</i>?</span></a></li>
<li><a href="#6"><b class="cmd">coroutine::util global</b> <i class="arg">varname</i>...</a></li>
<li><a href="#7"><b class="cmd">coroutine::util read</b> <b class="option">-nonewline</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#8"><b class="cmd">coroutine::util update</b> <span class="opt">?<b class="const">idletasks</b>?</span></a></li>
<li><a href="#9"><b class="cmd">coroutine::util vwait</b> <i class="arg">varname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">coroutine</b> package provides coroutine-aware
implementations of various event- and channel related commands. It can
be in multiple modes:</p>
<ol class="doctools_enumerated">
<li><p>Call the commands through their ensemble, in code which is
explicitly written for use within coroutines.</p></li>
<li><p>Import the commands into a namespace, either directly, or
through <b class="cmd">namespace path</b>. This allows the use from within code
which is not coroutine-aware per se and restricted to specific
namespaces.</p></li>
</ol>
<p>A more agressive form of making code coroutine-oblivious than point 2
above is available through the package <b class="package"><a href="coro_auto.html">coroutine::auto</a></b>,
which intercepts the relevant builtin commands and changes their
implementation dependending on the context they are run in, i.e.
inside or outside of a coroutine.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>All the commands listed below are synchronous with respect to the
coroutine invoking them, i.e. this coroutine blocks until the result
is available. The overall eventloop is not blocked however.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">coroutine::util after</b> <i class="arg">delay</i></a></dt>
<dd><p>This command delays the coroutine invoking it by <i class="arg">delay</i>
milliseconds.</p></dd>
<dt><a name="2"><b class="cmd">coroutine::util await</b> <i class="arg">varname</i>...</a></dt>
<dd><p>This command is an extension form of the <b class="cmd">coroutine::util vwait</b>
command (see below) which waits on a write to one of many named
namespace variables.</p></dd>
<dt><a name="3"><b class="cmd">coroutine::util create</b> <i class="arg">arg</i>...</a></dt>
<dd><p>This command creates a new coroutine with an automatically assigned
name and causes it to run the code specified by the arguments.</p></dd>
<dt><a name="4"><b class="cmd">coroutine::util exit</b> <span class="opt">?<i class="arg">status</i>?</span></a></dt>
<dd><p>This command exits the current coroutine, causing it to return
<i class="arg">status</i>. If no status was specified the default <i class="arg">0</i> is
returned.</p></dd>
<dt><a name="5"><b class="cmd">coroutine::util gets</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">varname</i>?</span></a></dt>
<dd><p>This command reads a line from the channel <i class="arg">chan</i> and returns it
either as its result, or, if a <i class="arg">varname</i> was specified, writes it
to the named variable and returns the number of characters read.</p></dd>
<dt><a name="6"><b class="cmd">coroutine::util global</b> <i class="arg">varname</i>...</a></dt>
<dd><p>This command imports the named global variables of the coroutine into
the current scope. From the technical point of view these variables
reside in level <b class="const">#1</b> of the Tcl stack. I.e. these are not the
regular global variable in to the global namespace, and each coroutine
can have their own set, independent of all others.</p></dd>
<dt><a name="7"><b class="cmd">coroutine::util read</b> <b class="option">-nonewline</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>This command reads <i class="arg">n</i> characters from the channel <i class="arg">chan</i> and
returns them as its result. If <i class="arg">n</i> is not specified the command
will read the channel until EOF is reached.</p></dd>
<dt><a name="8"><b class="cmd">coroutine::util update</b> <span class="opt">?<b class="const">idletasks</b>?</span></a></dt>
<dd><p>This command causes the coroutine invoking it to run pending events or
idle handlers before proceeding.</p></dd>
<dt><a name="9"><b class="cmd">coroutine::util vwait</b> <i class="arg">varname</i></a></dt>
<dd><p>This command causes the coroutine calling it to wait for a write to
the named namespace variable <i class="arg">varname</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>coroutine</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key414">after</a>, <a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key219">coroutine</a>, <a href="../../../../index.html#key412">events</a>, <a href="../../../../index.html#key415">exit</a>, <a href="../../../../index.html#key416">gets</a>, <a href="../../../../index.html#key413">global</a>, <a href="../../../../index.html#key419">green threads</a>, <a href="../../../../index.html#key411">read</a>, <a href="../../../../index.html#key410">threads</a>, <a href="../../../../index.html#key417">update</a>, <a href="../../../../index.html#key418">vwait</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Coroutine</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/counter/counter.html.











































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293

<div class='fossil-doc' data-title='counter - Counters and Histograms'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">counter(n) 2.0.4 tcllib &quot;Counters and Histograms&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>counter - Procedures for counters and histograms</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">counter <span class="opt">?2.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::counter::init</b> <i class="arg">tag args</i></a></li>
<li><a href="#2"><b class="cmd">::counter::count</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">delta</i>?</span> <span class="opt">?<i class="arg">instance</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::counter::start</b> <i class="arg">tag instance</i></a></li>
<li><a href="#4"><b class="cmd">::counter::stop</b> <i class="arg">tag instance</i></a></li>
<li><a href="#5"><b class="cmd">::counter::get</b> <i class="arg">tag args</i></a></li>
<li><a href="#6"><b class="cmd">::counter::exists</b> <i class="arg">tag</i></a></li>
<li><a href="#7"><b class="cmd">::counter::names</b></a></li>
<li><a href="#8"><b class="cmd">::counter::histHtmlDisplay</b> <i class="arg">tag args</i></a></li>
<li><a href="#9"><b class="cmd">::counter::reset</b> <i class="arg">tag args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">counter</b> package provides a counter facility and can
compute statistics and histograms over the collected data.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::counter::init</b> <i class="arg">tag args</i></a></dt>
<dd><p>This defines a counter with the name <i class="arg">tag</i>.  The <i class="arg">args</i>
determines the characteristics of the counter.  The <i class="arg">args</i> are</p>
<dl class="doctools_definitions">
<dt><b class="option">-group</b> <i class="arg">name</i></dt>
<dd><p>Keep a grouped counter where the name of the histogram bucket is
passed into <b class="cmd">::counter::count</b>.</p></dd>
<dt><b class="option">-hist</b> <i class="arg">bucketsize</i></dt>
<dd><p>Accumulate the counter into histogram buckets of size
<i class="arg">bucketsize</i>.  For example, if the samples are millisecond time
values and <i class="arg">bucketsize</i> is 10, then each histogram bucket
represents time values of 0 to 10 msec, 10 to 20 msec, 20 to 30 msec,
and so on.</p></dd>
<dt><b class="option">-hist2x</b> <i class="arg">bucketsize</i></dt>
<dd><p>Accumulate the statistic into histogram buckets.  The size of the
first bucket is <i class="arg">bucketsize</i>, each other bucket holds values 2
times the size of the previous bucket.  For example, if
<i class="arg">bucketsize</i> is 10, then each histogram bucket represents time
values of 0 to 10 msec, 10 to 20 msec, 20 to 40 msec, 40 to 80 msec,
and so on.</p></dd>
<dt><b class="option">-hist10x</b> <i class="arg">bucketsize</i></dt>
<dd><p>Accumulate the statistic into histogram buckets.  The size of the
first bucket is <i class="arg">bucketsize</i>, each other bucket holds values 10
times the size of the previous bucket.  For example, if
<i class="arg">bucketsize</i> is 10, then each histogram bucket represents time
values of 0 to 10 msec, 10 to 100 msec, 100 to 1000 msec, and so on.</p></dd>
<dt><b class="option">-lastn</b> <i class="arg">N</i></dt>
<dd><p>Save the last <i class="arg">N</i> values of the counter to maintain a &quot;running
average&quot; over the last <i class="arg">N</i> values.</p></dd>
<dt><b class="option">-timehist</b> <i class="arg">secsPerMinute</i></dt>
<dd><p>Keep a time-based histogram.  The counter is summed into a histogram
bucket based on the current time.  There are 60 per-minute buckets
that have a size determined by <i class="arg">secsPerMinute</i>, which is normally
60, but for testing purposes can be less.  Every &quot;hour&quot; (i.e., 60
&quot;minutes&quot;) the contents of the per-minute buckets are summed into the
next hourly bucket.  Every 24 &quot;hours&quot; the contents of the per-hour
buckets are summed into the next daily bucket.  The counter package
keeps all time-based histograms in sync, so the first
<i class="arg">secsPerMinute</i> value seen by the package is used for all
subsequent time-based histograms.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::counter::count</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">delta</i>?</span> <span class="opt">?<i class="arg">instance</i>?</span></a></dt>
<dd><p>Increment the counter identified by <i class="arg">tag</i>.  The default increment
is 1, although you can increment by any value, integer or real, by
specifying <i class="arg">delta</i>.  You must declare each counter with
<b class="cmd">::counter::init</b> to define the characteristics of counter before
you start to use it.  If the counter type is <b class="option">-group</b>, then the
counter identified by <i class="arg">instance</i> is incremented.</p></dd>
<dt><a name="3"><b class="cmd">::counter::start</b> <i class="arg">tag instance</i></a></dt>
<dd><p>Record the starting time of an interval.  The <i class="arg">tag</i> is the name of
the counter defined as a <b class="option">-hist</b> value-based histogram.  The
<i class="arg">instance</i> is used to distinguish this interval from any other
intervals that might be overlapping this one.</p></dd>
<dt><a name="4"><b class="cmd">::counter::stop</b> <i class="arg">tag instance</i></a></dt>
<dd><p>Record the ending time of an interval.  The delta time since the
corresponding <b class="cmd">::counter::start</b> call for <i class="arg">instance</i> is
recorded in the histogram identified by <i class="arg">tag</i>.</p></dd>
<dt><a name="5"><b class="cmd">::counter::get</b> <i class="arg">tag args</i></a></dt>
<dd><p>Return statistics about a counter identified by <i class="arg">tag</i>.  The
<i class="arg">args</i> determine what value to return:</p>
<dl class="doctools_definitions">
<dt><b class="option">-total</b></dt>
<dd><p>Return the total value of the counter.  This is the default if
<i class="arg">args</i> is not specified.</p></dd>
<dt><b class="option">-totalVar</b></dt>
<dd><p>Return the name of the total variable.  Useful for specifying with
-textvariable in a Tk widget.</p></dd>
<dt><b class="option">-N</b></dt>
<dd><p>Return the number of samples accumulated into the counter.</p></dd>
<dt><b class="option">-avg</b></dt>
<dd><p>Return the average of samples accumulated into the counter.</p></dd>
<dt><b class="option">-avgn</b></dt>
<dd><p>Return the average over the last <i class="arg">N</i> samples taken.  The <i class="arg">N</i>
value is set in the <b class="cmd">::counter::init</b> call.</p></dd>
<dt><b class="option">-hist</b> <i class="arg">bucket</i></dt>
<dd><p>If <i class="arg">bucket</i> is specified, then the value in that bucket of the
histogram is returned.  Otherwise the complete histogram is returned
in array get format sorted by bucket.</p></dd>
<dt><b class="option">-histVar</b></dt>
<dd><p>Return the name of the histogram array variable.</p></dd>
<dt><b class="option">-histHour</b></dt>
<dd><p>Return the complete hourly histogram in array get format sorted by
bucket.</p></dd>
<dt><b class="option">-histHourVar</b></dt>
<dd><p>Return the name of the hourly histogram array variable.</p></dd>
<dt><b class="option">-histDay</b></dt>
<dd><p>Return the complete daily histogram in array get format sorted by
bucket.</p></dd>
<dt><b class="option">-histDayVar</b></dt>
<dd><p>Return the name of the daily histogram array variable.</p></dd>
<dt><b class="option">-resetDate</b></dt>
<dd><p>Return the clock seconds value recorded when the
counter was last reset.</p></dd>
<dt><b class="option">-all</b></dt>
<dd><p>Return an array get of the array used to store the counter.  This
includes the total, the number of samples (N), and any type-specific
information.  This does not include the histogram array.</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::counter::exists</b> <i class="arg">tag</i></a></dt>
<dd><p>Returns 1 if the counter is defined.</p></dd>
<dt><a name="7"><b class="cmd">::counter::names</b></a></dt>
<dd><p>Returns a list of all counters defined.</p></dd>
<dt><a name="8"><b class="cmd">::counter::histHtmlDisplay</b> <i class="arg">tag args</i></a></dt>
<dd><p>Generate HTML to display a histogram for a counter.  The <i class="arg">args</i>
control the format of the display.  They are:</p>
<dl class="doctools_definitions">
<dt><b class="option">-title</b> <i class="arg">string</i></dt>
<dd><p>Label to display above bar chart</p></dd>
<dt><b class="option">-unit</b> <i class="arg">unit</i></dt>
<dd><p>Specify <b class="const">minutes</b>, <b class="const">hours</b>, or <b class="const">days</b> for the
time-base histograms.  For value-based histograms, the <i class="arg">unit</i> is
used in the title.</p></dd>
<dt><b class="option">-images</b> <i class="arg">url</i></dt>
<dd><p>URL of /images directory.</p></dd>
<dt><b class="option">-gif</b> <i class="arg">filename</i></dt>
<dd><p>Image for normal histogram bars.  The <i class="arg">filename</i> is relative to
the <b class="option">-images</b> directory.</p></dd>
<dt><b class="option">-ongif</b> <i class="arg">filename</i></dt>
<dd><p>Image for the active histogram bar.  The <i class="arg">filename</i> is relative to
the <b class="option">-images</b> directory.</p></dd>
<dt><b class="option">-max</b> <i class="arg">N</i></dt>
<dd><p>Maximum number of value-based buckets to display.</p></dd>
<dt><b class="option">-height</b> <i class="arg">N</i></dt>
<dd><p>Pixel height of the highest bar.</p></dd>
<dt><b class="option">-width</b> <i class="arg">N</i></dt>
<dd><p>Pixel width of each bar.</p></dd>
<dt><b class="option">-skip</b> <i class="arg">N</i></dt>
<dd><p>Buckets to skip when labeling value-based histograms.</p></dd>
<dt><b class="option">-format</b> <i class="arg">string</i></dt>
<dd><p>Format used to display labels of buckets.</p></dd>
<dt><b class="option">-text</b> <i class="arg">boolean</i></dt>
<dd><p>If 1, a text version of the histogram is dumped, otherwise a graphical
one is generated.</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::counter::reset</b> <i class="arg">tag args</i></a></dt>
<dd><p>Resets the counter with the name <i class="arg">tag</i> to an initial state. The
<i class="arg">args</i> determine the new characteristics of the counter. They have
the same meaning as described for <b class="cmd">::counter::init</b>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>counter</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key717">counting</a>, <a href="../../../../index.html#key716">histogram</a>, <a href="../../../../index.html#key195">statistics</a>, <a href="../../../../index.html#key715">tallying</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/crc/cksum.html.



















































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233

<div class='fossil-doc' data-title='cksum - Cyclic Redundancy Checks'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cksum(n) 1.1.4 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cksum - Calculate a cksum(1) compatible checksum</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">OPTIONS</a></li>
<li class="doctools_section"><a href="#section4">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section6">AUTHORS</a></li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">cksum <span class="opt">?1.1.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::crc::cksum</b> <span class="opt">?<i class="arg">-format format</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> [ <i class="arg">-channel chan</i> | <i class="arg">-filename file</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::crc::CksumInit</b></a></li>
<li><a href="#3"><b class="cmd">::crc::CksumUpdate</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::crc::CksumFinal</b> <i class="arg">token</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a Tcl implementation of the cksum(1) algorithm
based upon information provided at in the GNU implementation of this
program as part of the GNU Textutils 2.0 package.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::crc::cksum</b> <span class="opt">?<i class="arg">-format format</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> [ <i class="arg">-channel chan</i> | <i class="arg">-filename file</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>The command takes string data or a channel or file name and returns a
checksum value calculated using the <b class="syscmd">cksum(1)</b> algorithm. The
result is formatted using the <i class="arg">format</i>(n) specifier provided or as
an unsigned integer (%u) by default.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">OPTIONS</a></h2>
<dl class="doctools_definitions">
<dt>-channel <i class="arg">name</i></dt>
<dd><p>Return a checksum for the data read from a channel. The command will
read data from the channel until the <b class="cmd">eof</b> is true. If you need
to be able to process events during this calculation see the
<span class="sectref"><a href="#section4">PROGRAMMING INTERFACE</a></span> section</p></dd>
<dt>-filename <i class="arg">name</i></dt>
<dd><p>This is a convenience option that opens the specified file, sets the
encoding to binary and then acts as if the <i class="arg">-channel</i> option had
been used. The file is closed on completion.</p></dd>
<dt>-format <i class="arg">string</i></dt>
<dd><p>Return the checksum using an alternative format template.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PROGRAMMING INTERFACE</a></h2>
<p>The cksum package implements the checksum using a context variable to
which additional data can be added at any time. This is expecially
useful in an event based environment such as a Tk application or a web
server package. Data to be checksummed may be handled incrementally
during a <b class="cmd">fileevent</b> handler in discrete chunks. This can improve
the interactive nature of a GUI application and can help to avoid
excessive memory consumption.</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">::crc::CksumInit</b></a></dt>
<dd><p>Begins a new cksum context. Returns a token ID that must be used for the
remaining functions. An optional seed may be specified if required.</p></dd>
<dt><a name="3"><b class="cmd">::crc::CksumUpdate</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd><p>Add data to the checksum identified by token. Calling
<em>CksumUpdate $token &quot;abcd&quot;</em> is equivalent to calling
<em>CksumUpdate $token &quot;ab&quot;</em> followed by
<em>CksumUpdate $token &quot;cb&quot;</em>. See <span class="sectref"><a href="#section5">EXAMPLES</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::crc::CksumFinal</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the checksum value and releases any resources held by this
token. Once this command completes the token will be invalid. The
result is a 32 bit integer value.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<pre class="doctools_example">
% crc::cksum &quot;Hello, World!&quot;
2609532967
</pre>
<pre class="doctools_example">
% crc::cksum -format 0x%X &quot;Hello, World!&quot;
0x9B8A5027
</pre>
<pre class="doctools_example">
% crc::cksum -file cksum.tcl
1828321145
</pre>
<pre class="doctools_example">
% set tok [crc::CksumInit]
% crc::CksumUpdate $tok &quot;Hello, &quot;
% crc::CksumUpdate $tok &quot;World!&quot;
% crc::CksumFinal $tok
2609532967
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="crc32.html">crc32(n)</a>, <a href="sum.html">sum(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key149">cksum</a>, <a href="../../../../index.html#key146">crc</a>, <a href="../../../../index.html#key147">crc32</a>, <a href="../../../../index.html#key148">cyclic redundancy check</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/crc/crc16.html.







































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<div class='fossil-doc' data-title='crc16 - Cyclic Redundancy Checks'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">crc16(n) 1.1.2 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>crc16 - Perform a 16bit Cyclic Redundancy Check</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">OPTIONS</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">AUTHORS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc16 <span class="opt">?1.1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></li>
<li><a href="#2"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></li>
<li><a href="#3"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></li>
<li><a href="#4"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></li>
<li><a href="#5"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></li>
<li><a href="#6"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a Tcl-only implementation of the CRC
algorithms based upon information provided at
http://www.microconsultants.com/tips/crc/crc.txt
There are a number of permutations available for calculating CRC
checksums and this package can handle all of them. Defaults are set up
for the most common cases.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></dt>
<dd></dd>
<dt><a name="3"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="6"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></dt>
<dd><p>The command takes either string data or a file name and returns a checksum
value calculated using the CRC algorithm. The command used sets up the
CRC polynomial, initial value and bit ordering for the desired
standard checksum calculation. The result is formatted
using the <i class="arg">format</i>(n) specifier provided or as an unsigned integer
(%u) by default.</p>
<p>A number of common polynomials are in use with the CRC algorithm and
the most commonly used of these are included in this package. For
convenience each of these has a command alias in the crc namespace.</p>
<p>It is possible to implement the CRC-32 checksum using this crc16
package as the implementation is sufficiently generic to extend to 32
bit checksums. As an example this has been done already - however this
is not the fastest method to implement this algorithm in Tcl and a
separate <b class="package"><a href="crc32.html">crc32</a></b> package is available.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">OPTIONS</a></h2>
<dl class="doctools_definitions">
<dt>-filename <i class="arg">name</i></dt>
<dd><p>Return a checksum for the file contents instead of for parameter data.</p></dd>
<dt>-format <i class="arg">string</i></dt>
<dd><p>Return the checksum using an alternative format template.</p></dd>
<dt>-seed <i class="arg">value</i></dt>
<dd><p>Select an alternative seed value for the CRC calculation. The default
is 0 for the CRC16 calculation and 0xFFFF for the CCITT version.
This can be useful for calculating the CRC for data
structures without first converting the whole structure into a
string. The CRC of the previous member can be used as the seed for
calculating the CRC of the next member. It is also used for
accumulating a checksum from fragments of a large message (or file)</p></dd>
<dt>-implementation <i class="arg">procname</i></dt>
<dd><p>This hook is provided to allow users to provide their own
implementation (perhaps a C compiled extension). The
procedure specfied is called with two parameters. The first is the
data to be checksummed and the second is the seed value. An
integer is expected as the result.</p>
<p>The package provides some implementations of standard CRC polynomials
for the XMODEM, CCITT and the usual CRC-16 checksum. For convenience,
additional commands have been provided that make use of these
implementations.</p></dd>
<dt>--</dt>
<dd><p>Terminate option processing.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% crc::crc16 &quot;Hello, World!&quot;
64077
</pre>
<pre class="doctools_example">
% crc::crc-ccitt &quot;Hello, World!&quot;
26586
</pre>
<pre class="doctools_example">
% crc::crc16 -format 0x%X &quot;Hello, World!&quot;
0xFA4D
</pre>
<pre class="doctools_example">
% crc::crc16 -file crc16.tcl
51675
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="cksum.html">cksum(n)</a>, <a href="crc32.html">crc32(n)</a>, <a href="sum.html">sum(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key149">cksum</a>, <a href="../../../../index.html#key146">crc</a>, <a href="../../../../index.html#key809">crc16</a>, <a href="../../../../index.html#key147">crc32</a>, <a href="../../../../index.html#key148">cyclic redundancy check</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/crc/crc32.html.

















































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248

<div class='fossil-doc' data-title='crc32 - Cyclic Redundancy Checks'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">crc32(n) 1.3.2 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>crc32 - Perform a 32bit Cyclic Redundancy Check</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">OPTIONS</a></li>
<li class="doctools_section"><a href="#section4">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section6">AUTHORS</a></li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc32 <span class="opt">?1.3.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::crc::crc32</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> [ <i class="arg">-channel chan</i> | <i class="arg">-filename file</i> | <i class="arg">message</i> ]</a></li>
<li><a href="#2"><b class="cmd">::crc::Crc32Init</b> <span class="opt">?<i class="arg">seed</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::crc::Crc32Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::crc::Crc32Final</b> <i class="arg">token</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a Tcl implementation of the CRC-32
algorithm based upon information provided at
http://www.naaccr.org/standard/crc32/document.html
If either the <b class="package">critcl</b> package or the <b class="package">Trf</b> package
are available then a compiled version may be used internally to
accelerate the checksum calculation.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::crc::crc32</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> [ <i class="arg">-channel chan</i> | <i class="arg">-filename file</i> | <i class="arg">message</i> ]</a></dt>
<dd><p>The command takes either string data or a channel or file name and
returns a checksum value calculated using the CRC-32 algorithm. The
result is formatted using the <i class="arg">format</i>(n) specifier provided. The
default is to return the value as an unsigned integer (format %u).</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">OPTIONS</a></h2>
<dl class="doctools_definitions">
<dt>-channel <i class="arg">name</i></dt>
<dd><p>Return a checksum for the data read from a channel. The command will
read data from the channel until the <b class="cmd">eof</b> is true. If you need
to be able to process events during this calculation see the
<span class="sectref"><a href="#section4">PROGRAMMING INTERFACE</a></span> section</p></dd>
<dt>-filename <i class="arg">name</i></dt>
<dd><p>This is a convenience option that opens the specified file, sets the
encoding to binary and then acts as if the <i class="arg">-channel</i> option had
been used. The file is closed on completion.</p></dd>
<dt>-format <i class="arg">string</i></dt>
<dd><p>Return the checksum using an alternative format template.</p></dd>
<dt>-seed <i class="arg">value</i></dt>
<dd><p>Select an alternative seed value for the CRC calculation. The default
is 0xffffffff. This can be useful for calculating the CRC for data
structures without first converting the whole structure into a
string. The CRC of the previous member can be used as the seed for
calculating the CRC of the next member.
Note that the crc32 algorithm includes a final XOR step. If
incremental processing is desired then this must be undone before
using the output of the algorithm as the seed for further
processing. A simpler alternative is to use the
<span class="sectref"><a href="#section4">PROGRAMMING INTERFACE</a></span> which is intended for this mode of
operation.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PROGRAMMING INTERFACE</a></h2>
<p>The CRC-32 package implements the checksum using a context variable to
which additional data can be added at any time. This is expecially
useful in an event based environment such as a Tk application or a web
server package. Data to be checksummed may be handled incrementally
during a <b class="cmd">fileevent</b> handler in discrete chunks. This can improve
the interactive nature of a GUI application and can help to avoid
excessive memory consumption.</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">::crc::Crc32Init</b> <span class="opt">?<i class="arg">seed</i>?</span></a></dt>
<dd><p>Begins a new CRC32 context. Returns a token ID that must be used for the
remaining functions. An optional seed may be specified if required.</p></dd>
<dt><a name="3"><b class="cmd">::crc::Crc32Update</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd><p>Add data to the checksum identified by token. Calling
<em>Crc32Update $token &quot;abcd&quot;</em> is equivalent to calling
<em>Crc32Update $token &quot;ab&quot;</em> followed by
<em>Crc32Update $token &quot;cb&quot;</em>. See <span class="sectref"><a href="#section5">EXAMPLES</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::crc::Crc32Final</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the checksum value and releases any resources held by this
token. Once this command completes the token will be invalid. The
result is a 32 bit integer value.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<pre class="doctools_example">
% crc::crc32 &quot;Hello, World!&quot;
3964322768
</pre>
<pre class="doctools_example">
% crc::crc32 -format 0x%X &quot;Hello, World!&quot;
0xEC4AC3D0
</pre>
<pre class="doctools_example">
% crc::crc32 -file crc32.tcl
483919716
</pre>
<pre class="doctools_example">
% set tok [crc::Crc32Init]
% crc::Crc32Update $tok &quot;Hello, &quot;
% crc::Crc32Update $tok &quot;World!&quot;
% crc::Crc32Final $tok
3964322768
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="cksum.html">cksum(n)</a>, <a href="crc16.html">crc16(n)</a>, <a href="sum.html">sum(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key149">cksum</a>, <a href="../../../../index.html#key146">crc</a>, <a href="../../../../index.html#key147">crc32</a>, <a href="../../../../index.html#key148">cyclic redundancy check</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/crc/sum.html.

































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

<div class='fossil-doc' data-title='sum - Cyclic Redundancy Checks'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sum(n) 1.1.2 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sum - Calculate a sum(1) compatible checksum</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">OPTIONS</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">AUTHORS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sum <span class="opt">?1.1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::crc::sum</b> <span class="opt">?<i class="arg">-bsd</i> | <i class="arg">-sysv</i>?</span> <span class="opt">?<i class="arg">-format fmt</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> [ <i class="arg">-filename file</i> | <i class="arg">-channel chan</i> | <i class="arg">string</i> ]</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a Tcl-only implementation of the sum(1) command
which calculates a 16 bit checksum value from the input data.  The BSD
sum algorithm is used by default but the SysV algorithm is also
available.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::crc::sum</b> <span class="opt">?<i class="arg">-bsd</i> | <i class="arg">-sysv</i>?</span> <span class="opt">?<i class="arg">-format fmt</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> [ <i class="arg">-filename file</i> | <i class="arg">-channel chan</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>The command takes string data or a file name or a channel and returns
a checksum value calculated using the <b class="syscmd">sum(1)</b> algorithm. The
result is formatted using the <i class="arg">format</i>(n) specifier provided or as
an unsigned integer (%u) by default.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">OPTIONS</a></h2>
<dl class="doctools_definitions">
<dt>-sysv</dt>
<dd><p>The SysV algorithm is fairly naive. The byte values are summed and any
overflow is discarded. The lowest 16 bits are returned as the
checksum.  Input with the same content but different ordering will
give the same result.</p></dd>
<dt>-bsd</dt>
<dd><p>This algorithm is similar to the SysV version but includes a bit rotation
step which provides a dependency on the order of the data values.</p></dd>
<dt>-filename <i class="arg">name</i></dt>
<dd><p>Return a checksum for the file contents instead of for parameter data.</p></dd>
<dt>-channel <i class="arg">chan</i></dt>
<dd><p>Return a checksum for the contents of the specified channel. The
channel must be open for reading and should be configured for binary
translation. The channel will no be closed on completion.</p></dd>
<dt>-chunksize <i class="arg">size</i></dt>
<dd><p>Set the block size used when reading data from either files or
channels. This value defaults to 4096.</p></dd>
<dt>-format <i class="arg">string</i></dt>
<dd><p>Return the checksum using an alternative format template.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% crc::sum &quot;Hello, World!&quot;
37287
</pre>
<pre class="doctools_example">
% crc::sum -format 0x%X &quot;Hello, World!&quot;
0x91A7
</pre>
<pre class="doctools_example">
% crc::sum -file sum.tcl
13392
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="cksum.html">cksum(n)</a>, <a href="crc32.html">crc32(n)</a>, sum(1)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key149">cksum</a>, <a href="../../../../index.html#key146">crc</a>, <a href="../../../../index.html#key147">crc32</a>, <a href="../../../../index.html#key148">cyclic redundancy check</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key122">security</a>, <a href="../../../../index.html#key585">sum</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/cron/cron.html.









































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292

<div class='fossil-doc' data-title='cron - cron'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cron(n) 2.0 tcllib &quot;cron&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cron - Tool for automating the period callback of commands</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">cron <span class="opt">?2.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::cron::at</b> <i class="arg">?processname?</i> <i class="arg">timecode</i> <i class="arg">command</i></a></li>
<li><a href="#2"><b class="cmd">::cron::cancel</b> <i class="arg">processname</i></a></li>
<li><a href="#3"><b class="cmd">::cron::every</b> <i class="arg">processname</i> <i class="arg">frequency</i> <i class="arg">command</i></a></li>
<li><a href="#4"><b class="cmd">::cron::in</b> <i class="arg">?processname?</i> <i class="arg">timecode</i> <i class="arg">command</i></a></li>
<li><a href="#5"><b class="cmd">::cron::object_coroutine</b> <i class="arg">object</i> <i class="arg">coroutine</i> <i class="arg">?info?</i></a></li>
<li><a href="#6"><b class="cmd">::cron::sleep</b> <i class="arg">milliseconds</i></a></li>
<li><a href="#7"><b class="cmd">::cron::task delete</b> <i class="arg">process</i></a></li>
<li><a href="#8"><b class="cmd">::cron::task exists</b> <i class="arg">process</i></a></li>
<li><a href="#9"><b class="cmd">::cron::task info</b> <i class="arg">process</i></a></li>
<li><a href="#10"><b class="cmd">::cron::task set</b> <i class="arg">process</i> <i class="arg">field</i> <i class="arg">value</i> <i class="arg">?field...?</i> <i class="arg">?value...?</i></a></li>
<li><a href="#11"><b class="cmd">::cron::wake</b> <i class="arg">?who?</i></a></li>
<li><a href="#12"><b class="cmd">::cron::clock_step</b> <i class="arg">milleseconds</i></a></li>
<li><a href="#13"><b class="cmd">::cron::clock_delay</b> <i class="arg">milleseconds</i></a></li>
<li><a href="#14"><b class="cmd">::cron::clock_sleep</b> <i class="arg">seconds</i> <i class="arg">?offset?</i></a></li>
<li><a href="#15"><b class="cmd">::cron::clock_set</b> <i class="arg">newtime</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">cron</b> package provides a Pure-tcl set of tools to allow
programs to schedule tasks to occur at regular intervals. Rather than
force each task to issue it's own call to the event loop, the cron
system mimics the cron utility in Unix: on task periodically checks to
see if something is to be done, and issues all commands for a given
time step at once.</p>
<p>Changes in version 2.0</p>
<p>While cron was originally designed to handle time scales &gt; 1 second, the
latest version's internal understand time granularity down to the millisecond,
making it easier to integrate with other timed events.
Version 2.0 also understands how to properly integrate coroutines and objects.
It also adds a facility for an external (or script driven) clock. Note that vwait style events
won't work very well with an external clock.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::cron::at</b> <i class="arg">?processname?</i> <i class="arg">timecode</i> <i class="arg">command</i></a></dt>
<dd><p>This command registers a <i class="arg">command</i> to be called at the time specified by <i class="arg">timecode</i>.
If <i class="arg">timecode</i> is expressed as an integer, the timecode is assumed to be in unixtime. All
other inputs will be interpreted by <b class="cmd">clock scan</b> and converted to unix time.
This task can be modified by subsequent calls to
this package's commands by referencing <i class="arg">processname</i>. If <i class="arg">processname</i> exists,
it will be replaced.
If <i class="arg">processname</i> is not given, one is generated and returned by the command.</p>
<pre class="doctools_example">
::cron::at start_coffee {Tomorrow at 9:00am}  {remote::exec::coffeepot power on}
::cron::at shutdown_coffee {Tomorrow at 12:00pm}  {remote::exec::coffeepot power off}
</pre>
</dd>
<dt><a name="2"><b class="cmd">::cron::cancel</b> <i class="arg">processname</i></a></dt>
<dd><p>This command unregisters the process <i class="arg">processname</i> and cancels any pending commands.
Note: processname can be a process created by either <b class="cmd">::cron::at</b> or <b class="cmd">::cron::every</b>.</p>
<pre class="doctools_example">
::cron::cancel check_mail
</pre>
</dd>
<dt><a name="3"><b class="cmd">::cron::every</b> <i class="arg">processname</i> <i class="arg">frequency</i> <i class="arg">command</i></a></dt>
<dd><p>This command registers a <i class="arg">command</i> to be called at the interval of <i class="arg">frequency</i>.
<i class="arg">frequency</i> is given in seconds. This task can be modified by subsequent calls to
this package's commands by referencing <i class="arg">processname</i>. If <i class="arg">processname</i> exists,
it will be replaced.</p>
<pre class="doctools_example">
::cron::every check_mail 900  ::imap_client::check_mail
::cron::every backup_db  3600 {::backup_procedure ::mydb}
</pre>
</dd>
<dt><a name="4"><b class="cmd">::cron::in</b> <i class="arg">?processname?</i> <i class="arg">timecode</i> <i class="arg">command</i></a></dt>
<dd><p>This command registers a <i class="arg">command</i> to be called after a delay of time specified by <i class="arg">timecode</i>.
<i class="arg">timecode</i> is expressed as an seconds.
This task can be modified by subsequent calls to
this package's commands by referencing <i class="arg">processname</i>. If <i class="arg">processname</i> exists,
it will be replaced.
If <i class="arg">processname</i> is not given, one is generated and returned by the command.</p></dd>
<dt><a name="5"><b class="cmd">::cron::object_coroutine</b> <i class="arg">object</i> <i class="arg">coroutine</i> <i class="arg">?info?</i></a></dt>
<dd><p>This command registers a <i class="arg">coroutine</i>, associated with <i class="arg">object</i> to be called
given the parameters of <i class="arg">info</i>. If now parameters are given, the coroutine is assumed
to be an idle task which will self-terminate. <i class="arg">info</i> can be given in any form compadible with
<b class="cmd">::cron::task set</b></p></dd>
<dt><a name="6"><b class="cmd">::cron::sleep</b> <i class="arg">milliseconds</i></a></dt>
<dd><p>When run within a coroutine, this command will register the coroutine for a callback
at the appointed time, and immediately yield.</p>
<p>If the ::cron::time variable is &gt; 0 this command will advance the internal time,
100ms at a time.</p>
<p>In all other cases this command will generate a fictious variable, generate an
after call, and vwait the variable:</p>
<pre class="doctools_example">
set eventid [incr ::cron::eventcount]
set var ::cron::event_#$eventid
set $var 0
::after $ms &quot;set $var 1&quot;
::vwait $var
::unset $var
</pre>
<p>Usage:</p>
<pre class="doctools_example">
::cron::sleep 250
</pre>
</dd>
<dt><a name="7"><b class="cmd">::cron::task delete</b> <i class="arg">process</i></a></dt>
<dd><p>Delete the process specified the <i class="arg">process</i></p></dd>
<dt><a name="8"><b class="cmd">::cron::task exists</b> <i class="arg">process</i></a></dt>
<dd><p>Returns true if <i class="arg">process</i> is registered with cron.</p></dd>
<dt><a name="9"><b class="cmd">::cron::task info</b> <i class="arg">process</i></a></dt>
<dd><p>Returns a dict describing <i class="arg">process</i>. See <b class="cmd">::cron::task set</b> for a description of the options.</p></dd>
<dt><a name="10"><b class="cmd">::cron::task set</b> <i class="arg">process</i> <i class="arg">field</i> <i class="arg">value</i> <i class="arg">?field...?</i> <i class="arg">?value...?</i></a></dt>
<dd><p>If <i class="arg">process</i> does not exist, it is created. Options Include:</p>
<dl class="doctools_definitions">
<b class="cmd"><a href="../../../../index.html#key275">command</a></b>
If <b class="cmd"><a href="../coroutine/tcllib_coroutine.html">coroutine</a></b> is black, a global command which implements this process. If <b class="cmd"><a href="../coroutine/tcllib_coroutine.html">coroutine</a></b> is not
black, the command to invoke to create or recreate the coroutine.
<b class="cmd"><a href="../coroutine/tcllib_coroutine.html">coroutine</a></b>
The name of the coroutine (if any) which implements this process.
<b class="cmd">frequency</b>
If -1, this process is terminated after the next event. If 0 this process should be called during every
idle event. If positive, this process should generate events periodically. The frequency is an interger number
of milleseconds between events.
<b class="cmd"><a href="../../../../index.html#key243">object</a></b>
The object associated with this process or coroutine.
<b class="cmd">scheduled</b>
If non-zero, the absolute time from the epoch (in milleseconds) that this process will trigger an event.
If zero, and the <b class="cmd">frequency</b> is also zero, this process is called every idle loop.
<b class="cmd"><a href="../../../../index.html#key431">running</a></b>
A boolean flag. If true it indicates the process never returned or yielded during the event loop,
and will not be called again until it does so.
</dl></dd>
<dt><a name="11"><b class="cmd">::cron::wake</b> <i class="arg">?who?</i></a></dt>
<dd><p>Wake up cron, and arrange for its event loop to be run during the next Idle cycle.</p>
<pre class="doctools_example">
::cron::wake {I just did something important}
</pre>
</dd>
</dl>
<p>Several utility commands are provided that are used internally within cron and for
testing cron, but may or may not be useful in the general cases.</p>
<dl class="doctools_definitions">
<dt><a name="12"><b class="cmd">::cron::clock_step</b> <i class="arg">milleseconds</i></a></dt>
<dd><p>Return a clock time absolute to the epoch which falls on the next
border between one second and the next for the value of <i class="arg">milleseconds</i></p></dd>
<dt><a name="13"><b class="cmd">::cron::clock_delay</b> <i class="arg">milleseconds</i></a></dt>
<dd><p>Return a clock time absolute to the epoch which falls on the next
border between one second and the next <i class="arg">milleseconds</i> in the future.</p></dd>
<dt><a name="14"><b class="cmd">::cron::clock_sleep</b> <i class="arg">seconds</i> <i class="arg">?offset?</i></a></dt>
<dd><p>Return a clock time absolute to the epoch which falls exactly <i class="arg">seconds</i> in
the future. If offset is given it may be positive or negative, and will shift
the final time to before or after the second would flip.</p></dd>
<dt><a name="15"><b class="cmd">::cron::clock_set</b> <i class="arg">newtime</i></a></dt>
<dd><p>Sets the internal clock for cron. This command will advance the time in 100ms
increment, triggering events, until the internal time catches up with <i class="arg">newtime</i>.</p>
<p><i class="arg">newtime</i> is expressed in absolute milleseconds since the beginning of the epoch.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>odie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key621">cron</a>, <a href="../../../../index.html#key255">odie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>System</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2016 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/csv/csv.html.



















































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313

<div class='fossil-doc' data-title='csv - CSV processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">csv(n) 0.8.1 tcllib &quot;CSV processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>csv - Procedures to handle CSV data.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">FORMAT</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLE</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">csv <span class="opt">?0.8.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::csv::iscomplete</b> <i class="arg">data</i></a></li>
<li><a href="#2"><b class="cmd">::csv::join</b> <i class="arg">values</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span> <span class="opt">?<i class="arg">delMode</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::csv::joinlist</b> <i class="arg">values</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span> <span class="opt">?<i class="arg">delMode</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::csv::joinmatrix</b> <i class="arg">matrix</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span> <span class="opt">?<i class="arg">delMode</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::csv::read2matrix</b> <span class="opt">?<b class="option">-alternate</b>?</span> <i class="arg">chan m</i> {<i class="arg">sepChar</i> ,} {<i class="arg">expand</i> none}</a></li>
<li><a href="#6"><b class="cmd">::csv::read2queue</b> <span class="opt">?<b class="option">-alternate</b>?</span> <i class="arg">chan q</i> {<i class="arg">sepChar</i> ,}</a></li>
<li><a href="#7"><b class="cmd">::csv::report</b> <i class="arg">cmd matrix</i> <span class="opt">?<i class="arg">chan</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::csv::split</b> <span class="opt">?<b class="option">-alternate</b>?</span> <i class="arg">line</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span></a></li>
<li><a href="#9"><b class="cmd">::csv::split2matrix</b> <span class="opt">?<b class="option">-alternate</b>?</span> <i class="arg">m line</i> {<i class="arg">sepChar</i> ,} {<i class="arg">expand</i> none}</a></li>
<li><a href="#10"><b class="cmd">::csv::split2queue</b> <span class="opt">?<b class="option">-alternate</b>?</span> <i class="arg">q line</i> {<i class="arg">sepChar</i> ,}</a></li>
<li><a href="#11"><b class="cmd">::csv::writematrix</b> <i class="arg">m chan</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span></a></li>
<li><a href="#12"><b class="cmd">::csv::writequeue</b> <i class="arg">q chan</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">csv</b> package provides commands to manipulate information
in CSV <span class="sectref"><a href="#section3">FORMAT</a></span> (CSV = Comma Separated Values).</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<p>The following commands are available:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::csv::iscomplete</b> <i class="arg">data</i></a></dt>
<dd><p>A predicate checking if the argument <i class="arg">data</i> is a complete csv
record. The result is a boolean flag indicating the completeness of
the data. The result is true if the data is complete.</p></dd>
<dt><a name="2"><b class="cmd">::csv::join</b> <i class="arg">values</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span> <span class="opt">?<i class="arg">delMode</i>?</span></a></dt>
<dd><p>Takes a list of values and returns a string in CSV format containing
these values. The separator character can be defined by the caller,
but this is optional. The default is &quot;,&quot;. The quoting aka delimiting character can
be defined by the caller, but this is optional. The default is '&quot;'.
By default the quoting mode <i class="arg">delMode</i> is &quot;auto&quot;, surrounding
values with <i class="arg">delChar</i> only when needed. When set to &quot;always&quot;
however, values are always surrounded by the <i class="arg">delChar</i> instead.</p></dd>
<dt><a name="3"><b class="cmd">::csv::joinlist</b> <i class="arg">values</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span> <span class="opt">?<i class="arg">delMode</i>?</span></a></dt>
<dd><p>Takes a list of lists of values and returns a string in CSV format
containing these values. The separator character can be defined by the
caller, but this is optional. The default is &quot;,&quot;. The quoting character
can be defined by the caller, but this is optional. The default is '&quot;'.
By default the quoting mode <i class="arg">delMode</i> is &quot;auto&quot;, surrounding
values with <i class="arg">delChar</i> only when needed. When set to &quot;always&quot;
however, values are always surrounded by the <i class="arg">delChar</i> instead.
Each element of the outer list is considered a record, these are
separated by newlines in the result. The elements of each record are
formatted as usual (via <b class="cmd">::csv::join</b>).</p></dd>
<dt><a name="4"><b class="cmd">::csv::joinmatrix</b> <i class="arg">matrix</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span> <span class="opt">?<i class="arg">delMode</i>?</span></a></dt>
<dd><p>Takes a <i class="arg">matrix</i> object following the API specified for the
struct::matrix package and returns a string in CSV format containing
these values. The separator character can be defined by the caller,
but this is optional. The default is &quot;,&quot;. The quoting character
can be defined by the caller, but this is optional. The default is
'&quot;'.
By default the quoting mode <i class="arg">delMode</i> is &quot;auto&quot;, surrounding
values with <i class="arg">delChar</i> only when needed. When set to &quot;always&quot;
however, values are always surrounded by the <i class="arg">delChar</i> instead.
Each row of the matrix is considered a record, these are
separated by newlines in the result. The elements of each record are
formatted as usual (via <b class="cmd">::csv::join</b>).</p></dd>
<dt><a name="5"><b class="cmd">::csv::read2matrix</b> <span class="opt">?<b class="option">-alternate</b>?</span> <i class="arg">chan m</i> {<i class="arg">sepChar</i> ,} {<i class="arg">expand</i> none}</a></dt>
<dd><p>A wrapper around <b class="cmd">::csv::split2matrix</b> (see below) reading
CSV-formatted lines from the specified channel (until EOF) and adding
them to the given matrix. For an explanation of the <i class="arg">expand</i>
argument see <b class="cmd">::csv::split2matrix</b>.</p></dd>
<dt><a name="6"><b class="cmd">::csv::read2queue</b> <span class="opt">?<b class="option">-alternate</b>?</span> <i class="arg">chan q</i> {<i class="arg">sepChar</i> ,}</a></dt>
<dd><p>A wrapper around <b class="cmd">::csv::split2queue</b> (see below) reading
CSV-formatted lines from the specified channel (until EOF) and adding
them to the given queue.</p></dd>
<dt><a name="7"><b class="cmd">::csv::report</b> <i class="arg">cmd matrix</i> <span class="opt">?<i class="arg">chan</i>?</span></a></dt>
<dd><p>A report command which can be used by the matrix methods
<b class="cmd">format 2string</b> and <b class="cmd">format 2chan</b>. For the latter this
command delegates the work to <b class="cmd">::csv::writematrix</b>. <i class="arg">cmd</i> is
expected to be either <b class="method">printmatrix</b> or
<b class="method">printmatrix2channel</b>. The channel argument, <i class="arg">chan</i>, has
to be present for the latter and must not be present for the first.</p></dd>
<dt><a name="8"><b class="cmd">::csv::split</b> <span class="opt">?<b class="option">-alternate</b>?</span> <i class="arg">line</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span></a></dt>
<dd><p>converts a <i class="arg">line</i> in CSV format into a list of the values
contained in the line. The character used to separate the values from
each other can be defined by the caller, via <i class="arg">sepChar</i>, but this
is optional. The default is &quot;,&quot;. The quoting character can be defined
by the caller, but this is optional. The default is '&quot;'.</p>
<p>If the option <b class="option">-alternate</b> is specified a slightly different
syntax is used to parse the input. This syntax is explained below, in
the section <span class="sectref"><a href="#section3">FORMAT</a></span>.</p></dd>
<dt><a name="9"><b class="cmd">::csv::split2matrix</b> <span class="opt">?<b class="option">-alternate</b>?</span> <i class="arg">m line</i> {<i class="arg">sepChar</i> ,} {<i class="arg">expand</i> none}</a></dt>
<dd><p>The same as <b class="cmd">::csv::split</b>, but appends the resulting list as a
new row to the matrix <i class="arg">m</i>, using the method <b class="cmd">add row</b>. The
expansion mode specified via <i class="arg">expand</i> determines how the command
handles a matrix with less columns than contained in <i class="arg">line</i>. The
allowed modes are:</p>
<dl class="doctools_definitions">
<dt><b class="const">none</b></dt>
<dd><p>This is the default mode. In this mode it is the responsibility of the
caller to ensure that the matrix has enough columns to contain the
full line. If there are not enough columns the list of values is
silently truncated at the end to fit.</p></dd>
<dt><b class="const">empty</b></dt>
<dd><p>In this mode the command expands an empty matrix to hold all columns
of the specified line, but goes no further. The overall effect is that
the first of a series of lines determines the number of columns in the
matrix and all following lines are truncated to that size, as if mode
<b class="const">none</b> was set.</p></dd>
<dt><b class="const">auto</b></dt>
<dd><p>In this mode the command expands the matrix as needed to hold all
columns contained in <i class="arg">line</i>. The overall effect is that after
adding a series of lines the matrix will have enough columns to hold
all columns of the longest line encountered so far.</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::csv::split2queue</b> <span class="opt">?<b class="option">-alternate</b>?</span> <i class="arg">q line</i> {<i class="arg">sepChar</i> ,}</a></dt>
<dd><p>The same as <b class="cmd">::csv::split</b>, but appending the resulting list as a
single item to the queue <i class="arg">q</i>, using the method <b class="cmd">put</b>.</p></dd>
<dt><a name="11"><b class="cmd">::csv::writematrix</b> <i class="arg">m chan</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span></a></dt>
<dd><p>A wrapper around <b class="cmd">::csv::join</b> taking all rows in the matrix
<i class="arg">m</i> and writing them CSV formatted into the channel <i class="arg">chan</i>.</p></dd>
<dt><a name="12"><b class="cmd">::csv::writequeue</b> <i class="arg">q chan</i> <span class="opt">?<i class="arg">sepChar</i>?</span> <span class="opt">?<i class="arg">delChar</i>?</span></a></dt>
<dd><p>A wrapper around <b class="cmd">::csv::join</b> taking all items in the queue
<i class="arg">q</i> (assumes that they are lists) and writing them CSV formatted
into the channel <i class="arg">chan</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">FORMAT</a></h2>
<p>The format of regular CSV files is specified as</p>
<ol class="doctools_enumerated">
<li><p>Each record of a csv file (comma-separated values, as exported e.g. by
Excel) is a set of ASCII values separated by &quot;,&quot;. For other languages
it may be &quot;;&quot; however, although this is not important for this case as
the functions provided here allow any separator character.</p></li>
<li><p>If and only if a value contains itself the separator &quot;,&quot;, then it (the
value) has to be put between &quot;&quot;. If the value does not contain the
separator character then quoting is optional.</p></li>
<li><p>If a value contains the character &quot;, that character is represented by &quot;&quot;.</p></li>
<li><p>The output string &quot;&quot; represents the value &quot;. In other words, it is
assumed that it was created through rule 3, and only this rule,
i.e. that the value was not quoted.</p></li>
</ol>
<p>An alternate format definition mainly used by MS products specifies
that the output string &quot;&quot; is a representation of the empty
string. In other words, it is assumed that the output was generated
out of the empty string by quoting it (i.e. rule 2), and not through
rule 3. This is the only difference between the regular and the
alternate format.</p>
<p>The alternate format is activated through specification of the option
<b class="option">-alternate</b> to the various split commands.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLE</a></h2>
<p>Using the regular format the record</p>
<pre class="doctools_example">
123,&quot;123,521.2&quot;,&quot;Mary says &quot;&quot;Hello, I am Mary&quot;&quot;&quot;,&quot;&quot;
</pre>
<p>is parsed into the items</p>
<pre class="doctools_example">
a) 123
b) 123,521.2
c) Mary says &quot;Hello, I am Mary&quot;
d) &quot;
</pre>
<p>Using the alternate format the result is</p>
<pre class="doctools_example">
a) 123
b) 123,521.2
c) Mary says &quot;Hello, I am Mary&quot;
d) (the empty string)
</pre>
<p>instead. As can be seen only item (d) is different, now the empty string
instead of a &quot;.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>csv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key50">queue</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key49">csv</a>, <a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key48">package</a>, <a href="../../../../index.html#key50">queue</a>, <a href="../../../../index.html#key52">tcllib</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/debug/debug.html.

























































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300

<div class='fossil-doc' data-title='debug - debug narrative'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug(n) 1.0.6 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug - debug narrative - core</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">debug <span class="opt">?1.0.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">debug.</b><b class="variable">tag</b> <i class="arg">message</i> <span class="opt">?<i class="arg">level</i>?</span></a></li>
<li><a href="#2"><b class="cmd">debug</b> <b class="method">2array</b></a></li>
<li><a href="#3"><b class="cmd">debug</b> <b class="method">define</b> <i class="arg">tag</i></a></li>
<li><a href="#4"><b class="cmd">debug</b> <b class="method">header</b> <i class="arg">text</i></a></li>
<li><a href="#5"><b class="cmd">debug</b> <b class="method">level</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">level</i>?</span> <span class="opt">?<i class="arg">fd</i>?</span></a></li>
<li><a href="#6"><b class="cmd">debug</b> <b class="method">names</b></a></li>
<li><a href="#7"><b class="cmd">debug</b> <b class="method">off</b> <i class="arg">tag</i></a></li>
<li><a href="#8"><b class="cmd">debug</b> <b class="method">on</b> <i class="arg">tag</i></a></li>
<li><a href="#9"><b class="cmd">debug</b> <b class="method">parray</b> <i class="arg">arrayvarname</i></a></li>
<li><a href="#10"><b class="cmd">debug</b> <b class="method">pdict</b> <i class="arg">dict</i></a></li>
<li><a href="#11"><b class="cmd">debug</b> <b class="method">hexl</b> <i class="arg">data</i> <span class="opt">?<i class="arg">prefix</i>?</span></a></li>
<li><a href="#12"><b class="cmd">debug</b> <b class="method">nl</b></a></li>
<li><a href="#13"><b class="cmd">debug</b> <b class="method">tab</b></a></li>
<li><a href="#14"><b class="cmd">debug</b> <b class="method">prefix</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#15"><b class="cmd">debug</b> <b class="method">setting</b> (<i class="arg">tag</i> <i class="arg">level</i>) ... <span class="opt">?<i class="arg">fd</i>?</span></a></li>
<li><a href="#16"><b class="cmd">debug</b> <b class="method">suffix</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#17"><b class="cmd">debug</b> <b class="method">trailer</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Debugging areas of interest are represented by 'tags' which have
independently settable levels of interest (an integer, higher is more
detailed).</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">debug.</b><b class="variable">tag</b> <i class="arg">message</i> <span class="opt">?<i class="arg">level</i>?</span></a></dt>
<dd><p>For each known tag the package creates a command with this signature
the user can then use to provide the debug narrative of the tag.
The narrative <i class="arg">message</i> is provided as a Tcl script whose value is
<b class="cmd"><a href="../../../../index.html#key273">subst</a></b>ed in the caller's scope if and only if the current level of
interest for the <i class="arg">tag</i> matches or exceeds the call's <i class="arg">level</i>
of detail.  This is useful, as one can place arbitrarily complex
narrative in code without unnecessarily evaluating it.</p>
<p>See methods <b class="method">level</b> and <b class="method">setting</b> for querying
and manipulating the current level of detail for tags.</p>
<p>The actually printed text consists of not only the
<i class="arg">message</i>, but also global and tag-specific prefix and suffix,
should they exist, with each line in the message having the specified
headers and trailers.</p>
<p>All these parts are <b class="cmd"><a href="../../../../index.html#key273">subst</a></b>ableTcl scripts, which are
substituted once per message before assembly.</p></dd>
<dt><a name="2"><b class="cmd">debug</b> <b class="method">2array</b></a></dt>
<dd><p>This method returns a dictionary mapping the names of all debug tags
currently known to the package to their state and log level. The
latter are encoded in a single numeric value, where a negative number
indicates an inactive tag at the level given by the absolute value, and
a positive number is an active tag at that level.</p>
<p>See also method <b class="method">settings</b> below.</p></dd>
<dt><a name="3"><b class="cmd">debug</b> <b class="method">define</b> <i class="arg">tag</i></a></dt>
<dd><p>This method registers the named <i class="arg">tag</i> with the package.  If the
tag was not known before it is placed in an inactive state. The state
of an already known tag is left untouched.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="4"><b class="cmd">debug</b> <b class="method">header</b> <i class="arg">text</i></a></dt>
<dd><p>This method defines a global <b class="cmd"><a href="../../../../index.html#key273">subst</a></b>able Tcl script which provides
a text printed before each line of output.</p>
<p>Note how this is tag-independent.</p>
<p>Further note that the header substitution happens only once per
actual printed message, i.e. all lines of the same message will have
the same actual heading text.</p>
<p>The result of the method is the specified text.</p></dd>
<dt><a name="5"><b class="cmd">debug</b> <b class="method">level</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">level</i>?</span> <span class="opt">?<i class="arg">fd</i>?</span></a></dt>
<dd><p>This method sets the detail-<i class="arg">level</i> for the <i class="arg">tag</i>, and the
channel <i class="arg">fd</i> to write the tags narration into.
The level is an integer value &gt;= 0 defaulting to <b class="const">1</b>.
The channel defaults to <b class="const">stderr</b>.</p>
<p>The result of the method is the new detail-level for the tag.</p></dd>
<dt><a name="6"><b class="cmd">debug</b> <b class="method">names</b></a></dt>
<dd><p>This method returns a list containing the names of all debug tags
currently known to the package.</p></dd>
<dt><a name="7"><b class="cmd">debug</b> <b class="method">off</b> <i class="arg">tag</i></a></dt>
<dd><p>This method registers the named <i class="arg">tag</i> with the package and sets it
inactive.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="8"><b class="cmd">debug</b> <b class="method">on</b> <i class="arg">tag</i></a></dt>
<dd><p>This method registers the named <i class="arg">tag</i> with the package, as active.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="9"><b class="cmd">debug</b> <b class="method">parray</b> <i class="arg">arrayvarname</i></a></dt>
<dd><p>This is a convenience method formatting the named array like the
builtin command <b class="cmd">parray</b>, except it returns the resulting string
instead of writing it directly to <b class="const">stdout</b>.</p>
<p>This makes it suitable for use in debug messages.</p></dd>
<dt><a name="10"><b class="cmd">debug</b> <b class="method">pdict</b> <i class="arg">dict</i></a></dt>
<dd><p>This is a convenience method formatting the dictionary similarly to
how the builtin command <b class="cmd">parray</b> does for array, and returns the
resulting string.</p>
<p>This makes it suitable for use in debug messages.</p></dd>
<dt><a name="11"><b class="cmd">debug</b> <b class="method">hexl</b> <i class="arg">data</i> <span class="opt">?<i class="arg">prefix</i>?</span></a></dt>
<dd><p>This is a convenience method formatting arbitrary data into a hex-dump
and returns the resulting string.</p>
<p>This makes it suitable for use in debug messages.</p>
<p>Each line of the dump is prefixed with <i class="arg">prefix</i>. This prefix
defaults to the empty string.</p></dd>
<dt><a name="12"><b class="cmd">debug</b> <b class="method">nl</b></a></dt>
<dd><p>This is a convenience method to insert a linefeed character (ASCII 0x0a)
into a debug message.</p></dd>
<dt><a name="13"><b class="cmd">debug</b> <b class="method">tab</b></a></dt>
<dd><p>This is a convenience method to insert a TAB character (ASCII 0x09)
into a debug message.</p></dd>
<dt><a name="14"><b class="cmd">debug</b> <b class="method">prefix</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This method is similar to the method <b class="method">header</b> above, in that it
defines <b class="cmd"><a href="../../../../index.html#key273">subst</a></b>able Tcl script which provides more text for debug
messages.</p>
<p>In contrast to <b class="method">header</b> the generated text is added to the
user's message before it is split into lines, making it a per-message
extension.</p>
<p>Furthermore the script is tag-dependent.</p>
<p>In exception to that, a script for tag <b class="const">::</b> is applied
to all messages.</p>
<p>If both global and tag-dependent prefix exist, both are
applied, with the global prefix coming before the tag-dependent
prefix.</p>
<p>Note that the prefix substitution happens only once per
actual printed message.</p>
<p>The result of the method is the empty string.</p>
<p>If the <i class="arg">tag</i> was not known at the time of the call it is
registered, and set inactive.</p></dd>
<dt><a name="15"><b class="cmd">debug</b> <b class="method">setting</b> (<i class="arg">tag</i> <i class="arg">level</i>) ... <span class="opt">?<i class="arg">fd</i>?</span></a></dt>
<dd><p>This method is a multi-tag variant of method <b class="method">level</b> above,
with the functionality of methods <b class="method">on</b>, and <b class="method">off</b> also
folded in.</p>
<p>Each named <i class="arg">tag</i> is set to the detail-<i class="arg">level</i> following
it, with a negative level deactivating the tag, and a positive level
activating it.</p>
<p>If the last argument is not followed by a level it is not
treated as tag name, but as the channel all the named tags should
print their messages to.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="16"><b class="cmd">debug</b> <b class="method">suffix</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This method is similar to the method <b class="method">trailer</b> below, in that
it defines <b class="cmd"><a href="../../../../index.html#key273">subst</a></b>able Tcl script which provides more text for
debug messages.</p>
<p>In contrast to <b class="method">trailer</b> the generated text is added to
the user's message before it is split into lines, making it a
per-message extension.</p>
<p>Furthermore the script is tag-dependent.</p>
<p>In exception to that, a script for tag <b class="const">::</b> is applied
to all messages.</p>
<p>If both global and tag-dependent suffix exist, both are
applied, with the global suffix coming after the tag-dependent suffix.</p>
<p>Note that the suffix substitution happens only once per actual
printed message.</p>
<p>The result of the method is the empty string.</p>
<p>If the <i class="arg">tag</i> was not known at the time of the call it is
registered, and set inactive.</p></dd>
<dt><a name="17"><b class="cmd">debug</b> <b class="method">trailer</b> <i class="arg">text</i></a></dt>
<dd><p>This method defines a global <b class="cmd"><a href="../../../../index.html#key273">subst</a></b>able Tcl script which provides
a text printed after each line of output (before the EOL however).</p>
<p>Note how this is tag-independent.</p>
<p>Further note that the trailer substitution happens only once
per actual printed message, i.e. all lines of the same message will
have the same actual trailing text.</p>
<p>The result of the method is the specified text.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key76">debug</a>, <a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key72">narrative</a>, <a href="../../../../index.html#key74">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200?, Colin McCormack, Wub Server Utilities<br>
Copyright &copy; 2012-2014, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/debug/debug_caller.html.













































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166

<div class='fossil-doc' data-title='debug::caller - debug narrative'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug::caller(n) 1.1 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug::caller - debug narrative - caller</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">debug::caller <span class="opt">?1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="debug.html">debug</a></b> <b class="method">caller</b> <span class="opt">?<i class="arg">args</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="debug.html">debug</a></b> <b class="method">caller</b> <span class="opt">?<i class="arg">args</i>...?</span></a></dt>
<dd><p>This method is useful in a tag-specific prefix to automatically
provide caller information for all uses of the tag. Or in a message,
when only specific places need such detail.</p>
<p>Beyond that it recognizing the various internal forms of method
calls generated by the <b class="package"><a href="../snit/snit.html">snit</a></b> OO system and rewrites these to
their original form, for better readability.
Similarly for <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>.</p>
<p>If <i class="arg">args</i> are specified then they are treated as the
integer indices of command arguments to <em>not</em> show in the
output. The referenced arguments are replaced by <b class="const">*</b> instead.
The main anticipiated use case for this is the exclusion of arguments
expected to contain large Tcl values, i.e. long lists, large
dictionaries, etc. to prevent them from overwhelming the narrative.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key76">debug</a>, <a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key72">narrative</a>, <a href="../../../../index.html#key74">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2012-2015, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/debug/debug_heartbeat.html.









































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

<div class='fossil-doc' data-title='debug::heartbeat - debug narrative'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug::heartbeat(n) 1 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug::heartbeat - debug narrative - heartbeat</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">debug::heartbeat <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">debug <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="debug.html">debug</a></b> <b class="method">heartbeat</b> <span class="opt">?<i class="arg">delta</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="debug.html">debug</a></b> <b class="method">heartbeat</b> <span class="opt">?<i class="arg">delta</i>?</span></a></dt>
<dd><p>This method activates or disables a heartbeat with which to monitor
the event loop of an event-based Tcl application.</p>
<p>It reserves the debug tag <b class="const">heartbeat</b> for its operation
and writes a message every <i class="arg">delta</i> milliseconds.</p>
<p>A <i class="arg">delta</i>-value &lt;= 0 disables the heartbeat.</p>
<p>The message produced by the heartbeat contains a sequence
counter and the time in milliseconds since the last beat, thus
providing insight into timing variationsn and deviations from the
nominal <i class="arg">delta</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key76">debug</a>, <a href="../../../../index.html#key710">heartbeat</a>, <a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key72">narrative</a>, <a href="../../../../index.html#key74">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200?, Colin McCormack, Wub Server Utilities<br>
Copyright &copy; 2012, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/debug/debug_timestamp.html.































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

<div class='fossil-doc' data-title='debug::timestamp - debug narrative'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug::timestamp(n) 1 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug::timestamp - debug narrative - timestamping</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">debug::timestamp <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">debug <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="debug.html">debug</a></b> <b class="method">timestamp</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="debug.html">debug</a></b> <b class="method">timestamp</b></a></dt>
<dd><p>This method returns millisecond timing information since a baseline or
last call, making it useful in a tag-specific prefix to automatically
provide caller information for all uses of the tag. Or in a message,
when only specific places need such detail.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key76">debug</a>, <a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key72">narrative</a>, <a href="../../../../index.html#key75">timestamps</a>, <a href="../../../../index.html#key74">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200?, Colin McCormack, Wub Server Utilities<br>
Copyright &copy; 2012, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/des/des.html.





























































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286

<div class='fossil-doc' data-title='des - Data Encryption Standard (DES)'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">des(n) 1.1 tcllib &quot;Data Encryption Standard (DES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>des - Implementation of the DES and triple-DES ciphers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section4">MODES OF OPERATION</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section6">REFERENCES</a></li>
<li class="doctools_section"><a href="#section7">AUTHORS</a></li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">des 1.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::DES::des</b> <span class="opt">?<i class="arg">-mode [ecb|cbc|cfb|ofb]</i>?</span> <span class="opt">?<i class="arg">-dir [encrypt|decrypt]</i>?</span> <i class="arg">-key keydata</i> <span class="opt">?<i class="arg">-iv vector</i>?</span> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-weak</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> [ <i class="arg">-in channel</i> | <i class="arg">data</i> ]</a></li>
<li><a href="#2"><b class="cmd">::DES::Init</b> <i class="arg">mode</i> <i class="arg">keydata</i> <i class="arg">iv</i> <span class="opt">?<i class="arg">weak</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::DES::Encrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::DES::Decrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::DES::Reset</b> <i class="arg">Key</i> <i class="arg">iv</i></a></li>
<li><a href="#6"><b class="cmd">::DES::Final</b> <i class="arg">Key</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This is an implementation in Tcl of the Data Encryption Standard (DES)
as published by the U.S. National Institute of Standards and
Technology (NIST) [1]. This implementation also supports triple
DES (3DES) extension to DES. DES is a 64-bit block cipher that uses a
56-bit key. 3DES uses a 168-bit key. DES has now officially been
superceeded by AES but is in common use in many protocols.</p>
<p>The tcllib implementation of DES and 3DES uses an implementation by
Mac Cody and is available as a separate download from [2]. For
anyone concerned about the details of exporting this code please see
the TclDES web pages. The tcllib specific code is a wrapper to the
TclDES API that presents same API for the DES cipher as for other
ciphers in the library.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::DES::des</b> <span class="opt">?<i class="arg">-mode [ecb|cbc|cfb|ofb]</i>?</span> <span class="opt">?<i class="arg">-dir [encrypt|decrypt]</i>?</span> <i class="arg">-key keydata</i> <span class="opt">?<i class="arg">-iv vector</i>?</span> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-weak</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> [ <i class="arg">-in channel</i> | <i class="arg">data</i> ]</a></dt>
<dd><p>Perform the <b class="package"><a href="../../../../index.html#key296">DES</a></b> algorithm on either the data provided
by the argument or on the data read from the <i class="arg">-in</i> channel. If
an <i class="arg">-out</i> channel is given then the result will be written to
this channel.</p>
<p>The <i class="arg">-key</i> option must be given. This parameter takes a binary
string of 8 bytes in length and is used to generate the key schedule.
In DES only 56 bits of key data are used. The highest bit from each
byte is discarded.</p>
<p>The <i class="arg">-mode</i> and <i class="arg">-dir</i> options are optional and default to cbc
mode and encrypt respectively. The initialization vector <i class="arg">-iv</i>
takes an 8 byte binary argument. This defaults to all zeros. See
<span class="sectref"><a href="#section4">MODES OF OPERATION</a></span> for more about <i class="arg">-mode</i> and the use
of the initialization vector.</p>
<p>DES is a 64-bit block cipher. This means that the data must be
provided in units that are a multiple of 8 bytes.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROGRAMMING INTERFACE</a></h2>
<p>Internal state is maintained in an opaque structure that is returned
from the <b class="cmd">Init</b> function. In ECB mode the state is not affected by
the input but for other modes some input dependent state is maintained
and may be reset by calling the <b class="cmd">Reset</b> function with a new
initialization vector value.</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">::DES::Init</b> <i class="arg">mode</i> <i class="arg">keydata</i> <i class="arg">iv</i> <span class="opt">?<i class="arg">weak</i>?</span></a></dt>
<dd><p>Construct a new DES key schedule using the specified key data and the
given initialization vector. The initialization vector is not used
with ECB mode but is important for other usage modes.
See <span class="sectref"><a href="#section4">MODES OF OPERATION</a></span>.</p>
<p>There are a small number of keys that are known to be weak when used
with DES. By default if such a key is passed in then an error will be
raised. If there is a need to accept such keys then the <i class="arg">weak</i>
parameter can be set true to avoid the error being thrown.</p></dd>
<dt><a name="3"><b class="cmd">::DES::Encrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></dt>
<dd><p>Use a prepared key acquired by calling <b class="cmd">Init</b> to encrypt the
provided data. The data argument should be a binary array that is a
multiple of the DES block size of 8 bytes. The result is a binary
array the same size as the input of encrypted data.</p></dd>
<dt><a name="4"><b class="cmd">::DES::Decrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></dt>
<dd><p>Decipher data using the key. Note that the same key may be used to
encrypt and decrypt data provided that the initialization vector is
reset appropriately for CBC mode.</p></dd>
<dt><a name="5"><b class="cmd">::DES::Reset</b> <i class="arg">Key</i> <i class="arg">iv</i></a></dt>
<dd><p>Reset the initialization vector. This permits the programmer to re-use
a key and avoid the cost of re-generating the key schedule where the
same key data is being used multiple times.</p></dd>
<dt><a name="6"><b class="cmd">::DES::Final</b> <i class="arg">Key</i></a></dt>
<dd><p>This should be called to clean up resources associated with <i class="arg">Key</i>.
Once this function has been called the key may not be used again.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">MODES OF OPERATION</a></h2>
<dl class="doctools_definitions">
<dt>Electronic Code Book (ECB)</dt>
<dd><p>ECB is the basic mode of all block ciphers. Each block is encrypted
independently and so identical plain text will produce identical
output when encrypted with the same key. Any encryption errors will
only affect a single block however this is vulnerable to known
plaintext attacks.</p></dd>
<dt>Cipher Block Chaining (CBC)</dt>
<dd><p>CBC mode uses the output of the last block encryption to affect the
current block. An initialization vector of the same size as the cipher
block size is used to handle the first block. The initialization
vector should be chosen randomly and transmitted as the first block of
the output. Errors in encryption affect the current block and the next
block after which the cipher will correct itself. CBC is the most
commonly used mode in software encryption.</p></dd>
<dt>Cipher Feedback (CFB)</dt>
<dd><p>CFB mode can be used to convert block ciphers into stream ciphers. In
CFB mode the initialization vector is encrypted and the output is then
xor'd with the plaintext stream. The result is then used as the
initialization vector for the next round. Errors will affect the
current block and the next block.</p></dd>
<dt>Output Feedback (OFB)</dt>
<dd><p>OFB is similar to CFB except that the output of the cipher is fed back
into the next round and not the xor'd plain text. This means that
errors only affect a single block but the cipher is more vulnerable to
attack.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<pre class="doctools_example">
% set ciphertext [DES::des -mode cbc -dir encrypt -key $secret $plaintext]
% set plaintext [DES::des -mode cbc -dir decrypt -key $secret $ciphertext]
</pre>
<pre class="doctools_example">
set iv [string repeat \\0 8]
set Key [DES::Init cbc \\0\\1\\2\\3\\4\\5\\6\\7 $iv]
set ciphertext [DES::Encrypt $Key &quot;somedata&quot;]
append ciphertext [DES::Encrypt $Key &quot;moredata&quot;]
DES::Reset $Key $iv
set plaintext [DES::Decrypt $Key $ciphertext]
DES::Final $Key
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>&quot;Data Encryption Standard&quot;,
    Federal Information Processing Standards Publication 46-3, 1999,
    (<a href="http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf">http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf</a>)</p></li>
<li><p>&quot;TclDES: munitions-grade Tcl scripting&quot;
    <a href="http://tcldes.sourceforge.net/">http://tcldes.sourceforge.net/</a></p></li>
</ol>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">AUTHORS</a></h2>
<p>Jochen C Loewer,
Mac Cody,
Pat Thoyts</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>des</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../aes/aes.html">aes(n)</a>, <a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../md5/md5.html">md5(n)</a>, <a href="../rc4/rc4.html">rc4(n)</a>, <a href="../sha1/sha1.html">sha1(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key298">3DES</a>, <a href="../../../../index.html#key296">DES</a>, <a href="../../../../index.html#key297">block cipher</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/des/tcldes.html.













































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150

<div class='fossil-doc' data-title='tclDES - Data Encryption Standard (DES)'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tclDES(n) 1.1 tcllib &quot;Data Encryption Standard (DES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tclDES - Implementation of the DES and triple-DES ciphers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">tclDES 1.1</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tclDES</b> package is a helper package for <b class="package"><a href="des.html">des</a></b>.</p>
<p>Please see the documentation of <b class="package"><a href="des.html">des</a></b> for details.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>des</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="des.html">des(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key298">3DES</a>, <a href="../../../../index.html#key296">DES</a>, <a href="../../../../index.html#key297">block cipher</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/des/tcldesjr.html.













































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150

<div class='fossil-doc' data-title='tclDESjr - Data Encryption Standard (DES)'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tclDESjr(n) 1.1 tcllib &quot;Data Encryption Standard (DES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tclDESjr - Implementation of the DES and triple-DES ciphers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">tclDESjr 1.1</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tclDESjr</b> package is a helper package for <b class="package"><a href="des.html">des</a></b>.</p>
<p>Please see the documentation of <b class="package"><a href="des.html">des</a></b> for details.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>des</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="des.html">des(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key298">3DES</a>, <a href="../../../../index.html#key296">DES</a>, <a href="../../../../index.html#key297">block cipher</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/dicttool/dicttool.html.













































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

<div class='fossil-doc' data-title='dicttool - Extensions to the standard "dict" command'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dicttool(n) 1.0 tcllib &quot;Extensions to the standard &quot;dict&quot; command&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dicttool - Dictionary Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">ladd</b> <i class="arg">varname</i> <i class="arg">args</i></a></li>
<li><a href="#2"><b class="cmd">ldelete</b> <i class="arg">varname</i> <i class="arg">args</i></a></li>
<li><a href="#3"><b class="cmd">dict getnull</b> <i class="arg">args</i></a></li>
<li><a href="#4"><b class="cmd">dict print</b> <i class="arg">dict</i></a></li>
<li><a href="#5"><b class="cmd">dict is_dict</b> <i class="arg">value</i></a></li>
<li><a href="#6"><b class="cmd">rmerge</b> <i class="arg">args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">dicttool</b> package enhances the standard <em>dict</em> command with several new
commands. In addition, the package also defines several &quot;creature comfort&quot; list commands as well.
Each command checks to see if a command already exists of the same name before adding itself,
just in case any of these slip into the core.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">ladd</b> <i class="arg">varname</i> <i class="arg">args</i></a></dt>
<dd><p>This command will add a new instance of each element in <i class="arg">args</i> to <i class="arg">varname</i>, but only if that element
is not already present.</p></dd>
<dt><a name="2"><b class="cmd">ldelete</b> <i class="arg">varname</i> <i class="arg">args</i></a></dt>
<dd><p>This command will add a delete all instances of each element in <i class="arg">args</i> from <i class="arg">varname</i>.</p></dd>
<dt><a name="3"><b class="cmd">dict getnull</b> <i class="arg">args</i></a></dt>
<dd><p>Operates like <b class="cmd">dict get</b>, however if the key <i class="arg">args</i> does not exist, it returns an empty
list instead of throwing an error.</p></dd>
<dt><a name="4"><b class="cmd">dict print</b> <i class="arg">dict</i></a></dt>
<dd><p>This command will produce a string representation of <i class="arg">dict</i>, with each nested branch on
a newline, and indented with two spaces for every level.</p></dd>
<dt><a name="5"><b class="cmd">dict is_dict</b> <i class="arg">value</i></a></dt>
<dd><p>This command will return true if <i class="arg">value</i> can be interpreted as a dict. The command operates in
such a way as to not force an existing dict representation to shimmer into another internal rep.</p></dd>
<dt><a name="6"><b class="cmd">rmerge</b> <i class="arg">args</i></a></dt>
<dd><p>Return a dict which is the product of a recursive merge of all of the arguments. Unlike <b class="cmd">dict merge</b>,
this command descends into all of the levels of a dict. Dict keys which end in a : indicate a leaf, which
will be interpreted as a literal value, and not descended into further.</p>
<pre class="doctools_example">
set items [dict merge {
  option {color {default: green}}
} {
  option {fruit {default: mango}}
} {
  option {color {default: blue} fruit {widget: select values: {mango apple cherry grape}}}
}]
puts [dict print $items]
</pre>
<p>Prints the following result:</p>
<pre class="doctools_example">
option {
  color {
    default: blue
  }
  fruit {
    widget: select
    values: {mango apple cherry grape}
  }
}
</pre>
</dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>dict</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key705">dict</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utilites</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/dns/tcllib_dns.html.















































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327

<div class='fossil-doc' data-title='dns - Domain Name Service'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dns(n) 1.3.5 tcllib &quot;Domain Name Service&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dns - Tcl Domain Name Service Client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">REFERENCES</a></li>
<li class="doctools_section"><a href="#section5">AUTHORS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">dns <span class="opt">?1.3.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::dns::resolve</b> <i class="arg">query</i> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::dns::configure</b> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::dns::name</b> <i class="arg">token</i></a></li>
<li><a href="#4"><b class="cmd">::dns::address</b> <i class="arg">token</i></a></li>
<li><a href="#5"><b class="cmd">::dns::cname</b> <i class="arg">token</i></a></li>
<li><a href="#6"><b class="cmd">::dns::result</b> <i class="arg">token</i></a></li>
<li><a href="#7"><b class="cmd">::dns::status</b> <i class="arg">token</i></a></li>
<li><a href="#8"><b class="cmd">::dns::error</b> <i class="arg">token</i></a></li>
<li><a href="#9"><b class="cmd">::dns::reset</b> <i class="arg">token</i></a></li>
<li><a href="#10"><b class="cmd">::dns::wait</b> <i class="arg">token</i></a></li>
<li><a href="#11"><b class="cmd">::dns::cleanup</b> <i class="arg">token</i></a></li>
<li><a href="#12"><b class="cmd">::dns::nameservers</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The dns package provides a Tcl only Domain Name Service client. You
should refer to (1) and (2) for information about the DNS protocol or
read resolver(3) to find out how the C library resolves domain names.
The intention of this package is to insulate Tcl scripts
from problems with using the system library resolver for slow name servers.
It may or may not be of practical use. Internet name resolution is a
complex business and DNS is only one part of the resolver. You may
find you are supposed to be using hosts files, NIS or WINS to name a
few other systems. This package is not a substitute for the C library
resolver - it does however implement name resolution over DNS.
The package also extends the package <b class="package"><a href="../uri/uri.html">uri</a></b> to support DNS URIs
(4) of the form <a href="dns:what.host.com">dns:what.host.com</a> or
<a href="dns://my.nameserver/what.host.com">dns://my.nameserver/what.host.com</a>. The <b class="cmd">dns::resolve</b>
command can handle DNS URIs or simple domain names as a query.</p>
<p><em>Note:</em> The package defaults to using DNS over TCP
connections. If you wish to use UDP you will need to have the
<b class="package">tcludp</b> package installed and have a version that
correctly handles binary data (&gt; 1.0.4).
This is available at <a href="http://tcludp.sourceforge.net/">http://tcludp.sourceforge.net/</a>.
If the <b class="package">udp</b> package is present then UDP will be used by default.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::dns::resolve</b> <i class="arg">query</i> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>Resolve a domain name using the <i class="term"><a href="../../../../index.html#key599">DNS</a></i> protocol. <i class="arg">query</i> is
the domain name to be lookup up. This should be either a fully
qualified domain name or a DNS URI.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">-nameserver</b> <i class="arg">hostname</i> or <b class="cmd">-server</b> <i class="arg">hostname</i></dt>
<dd><p>Specify an alternative name server for this request.</p></dd>
<dt><b class="cmd">-protocol</b> <i class="arg">tcp|udp</i></dt>
<dd><p>Specify the network protocol to use for this request. Can be one of
  <i class="arg">tcp</i> or <i class="arg">udp</i>.</p></dd>
<dt><b class="cmd">-port</b> <i class="arg">portnum</i></dt>
<dd><p>Specify an alternative port.</p></dd>
<dt><b class="cmd">-search</b> <i class="arg">domainlist</i></dt>
<dd></dd>
<dt><b class="cmd">-timeout</b> <i class="arg">milliseconds</i></dt>
<dd><p>Override the default timeout.</p></dd>
<dt><b class="cmd">-type</b> <i class="arg">TYPE</i></dt>
<dd><p>Specify the type of DNS record you are interested in. Valid values
  are A, NS, MD, MF, CNAME, SOA, MB, MG, MR, NULL, WKS, PTR, HINFO,
  MINFO, MX, TXT, SPF, SRV, AAAA, AXFR, MAILB, MAILA and *.
  See RFC1035 for details about the return values.
  See <a href="http://spf.pobox.com/">http://spf.pobox.com/</a> about SPF.
  See (3) about AAAA records and RFC2782 for details of SRV records.</p></dd>
<dt><b class="cmd">-class</b> <i class="arg">CLASS</i></dt>
<dd><p>Specify the class of domain name. This is usually IN but may be one
  of IN for internet domain names, CS, CH, HS or * for any class.</p></dd>
<dt><b class="cmd">-recurse</b> <i class="arg">boolean</i></dt>
<dd><p>Set to <i class="arg">false</i> if you do not want the name server to recursively
  act upon your request. Normally set to <i class="arg">true</i>.</p></dd>
<dt><b class="cmd">-command</b> <i class="arg">procname</i></dt>
<dd><p>Set a procedure to be called upon request completion. The procedure
  will be passed the token as its only argument.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::dns::configure</b> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>The <b class="cmd">::dns::configure</b> command is used to setup the dns
package. The server to query, the protocol and domain search path are
all set via this command. If no arguments are provided then a list of
all the current settings is returned.  If only one argument then it
must the the name of an option and the value for that option is
returned.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">-nameserver</b> <i class="arg">hostname</i></dt>
<dd><p>Set the default name server to be used by all queries. The default is
  <i class="term">localhost</i>.</p></dd>
<dt><b class="cmd">-protocol</b> <i class="arg">tcp|udp</i></dt>
<dd><p>Set the default network protocol to be used. Default is <i class="arg">tcp</i>.</p></dd>
<dt><b class="cmd">-port</b> <i class="arg">portnum</i></dt>
<dd><p>Set the default port to use on the name server. The default is 53.</p></dd>
<dt><b class="cmd">-search</b> <i class="arg">domainlist</i></dt>
<dd><p>Set the domain search list. This is currently not used.</p></dd>
<dt><b class="cmd">-timeout</b> <i class="arg">milliseconds</i></dt>
<dd><p>Set the default timeout value for DNS lookups. Default is 30 seconds.</p></dd>
<dt><b class="cmd">-loglevel</b> <i class="arg">level</i></dt>
<dd><p>Set the log level used for emitting diagnostic messages from this
  package. The default is <i class="term">warn</i>. See the <b class="package"><a href="../log/log.html">log</a></b> package
  for details of the available levels.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::dns::name</b> <i class="arg">token</i></a></dt>
<dd><p>Returns a list of all domain names returned as an answer to your query.</p></dd>
<dt><a name="4"><b class="cmd">::dns::address</b> <i class="arg">token</i></a></dt>
<dd><p>Returns a list of the address records that match your query.</p></dd>
<dt><a name="5"><b class="cmd">::dns::cname</b> <i class="arg">token</i></a></dt>
<dd><p>Returns a list of canonical names (usually just one) matching your query.</p></dd>
<dt><a name="6"><b class="cmd">::dns::result</b> <i class="arg">token</i></a></dt>
<dd><p>Returns a list of all the decoded answer records provided for your
  query. This permits you to extract the result for more unusual query types.</p></dd>
<dt><a name="7"><b class="cmd">::dns::status</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the status flag. For a successfully completed query this will be
  <em>ok</em>. May be <em>error</em> or <em>timeout</em> or <em>eof</em>.
  See also <b class="cmd">::dns::error</b></p></dd>
<dt><a name="8"><b class="cmd">::dns::error</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the error message provided for requests whose status is <em>error</em>.
  If there is no error message then an empty string is returned.</p></dd>
<dt><a name="9"><b class="cmd">::dns::reset</b> <i class="arg">token</i></a></dt>
<dd><p>Reset or cancel a DNS query.</p></dd>
<dt><a name="10"><b class="cmd">::dns::wait</b> <i class="arg">token</i></a></dt>
<dd><p>Wait for a DNS query to complete and return the status upon completion.</p></dd>
<dt><a name="11"><b class="cmd">::dns::cleanup</b> <i class="arg">token</i></a></dt>
<dd><p>Remove all state variables associated with the request.</p></dd>
<dt><a name="12"><b class="cmd">::dns::nameservers</b></a></dt>
<dd><p>Attempts to return a list of the nameservers currently configured
for the users system. On a unix machine this parses the
/etc/resolv.conf file for nameservers (if it exists) and on Windows
systems we examine certain parts of the registry. If no nameserver can
be found then the loopback address (127.0.0.1) is used as a default.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<pre class="doctools_example">
% set tok [dns::resolve www.tcl.tk]
::dns::1
% dns::status $tok
ok
% dns::address $tok
199.175.6.239
% dns::name $tok
www.tcl.tk
% dns::cleanup $tok
</pre>
<p>Using DNS URIs as queries:</p>
<pre class="doctools_example">
% set tok [dns::resolve &quot;dns:tcl.tk;type=MX&quot;]
% set tok [dns::resolve &quot;dns://l.root-servers.net/www.tcl.tk&quot;]
</pre>
<p>Reverse address lookup:</p>
<pre class="doctools_example">
% set tok [dns::resolve 127.0.0.1]
::dns::1
% dns::name $tok
localhost
% dns::cleanup $tok
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Mockapetris, P., &quot;Domain Names - Concepts and Facilities&quot;,
    RFC 1034, November 1987.
    (<a href="http://www.ietf.org/rfc/rfc1034.txt">http://www.ietf.org/rfc/rfc1034.txt</a>)</p></li>
<li><p>Mockapetris, P., &quot;Domain Names - Implementation and Specification&quot;,
    RFC 1035, November 1087.
    (<a href="http://www.ietf.org/rfc/rfc1035.txt">http://www.ietf.org/rfc/rfc1035.txt</a>)</p></li>
<li><p>Thompson, S. and Huitema, C., &quot;DNS Extensions to support IP version 6&quot;,
    RFC 1886, December 1995.
    (<a href="http://www.ietf.org/rfc/rfc1886.txt">http://www.ietf.org/rfc/rfc1886.txt</a>)</p></li>
<li><p>Josefsson, S., &quot;Domain Name System Uniform Resource Identifiers&quot;,
    Internet-Draft, October 2003,
    (<a href="http://www.ietf.org/internet-drafts/draft-josefsson-dns-url-09.txt">http://www.ietf.org/internet-drafts/draft-josefsson-dns-url-09.txt</a>)</p></li>
<li><p>Gulbrandsen, A., Vixie, P. and Esibov, L.,
    &quot;A DNS RR for specifying the location of services (DNS SRV)&quot;,
    RFC 2782, February 2000,
    (<a href="http://www.ietf.org/rfc/rfc2782.txt">http://www.ietf.org/rfc/rfc2782.txt</a>)</p></li>
<li><p>Ohta, M. &quot;Incremental Zone Transfer in DNS&quot;,
    RFC 1995, August 1996,
    (<a href="http://www.ietf.org/rfc/rfc1995.txt">http://www.ietf.org/rfc/rfc1995.txt</a>)</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>dns</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>resolver(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key599">DNS</a>, <a href="../../../../index.html#key602">domain name service</a>, <a href="../../../../index.html#key601">resolver</a>, <a href="../../../../index.html#key603">rfc 1034</a>, <a href="../../../../index.html#key598">rfc 1035</a>, <a href="../../../../index.html#key600">rfc 1886</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/dns/tcllib_ip.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472

<div class='fossil-doc' data-title='tcllib_ip - Domain Name Service'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcllib_ip(n) 1.4 tcllib &quot;Domain Name Service&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcllib_ip - IPv4 and IPv6 address manipulation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">REFERENCES</a></li>
<li class="doctools_section"><a href="#section5">AUTHORS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">ip <span class="opt">?1.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ip::version</b> <i class="arg">address</i></a></li>
<li><a href="#2"><b class="cmd">::ip::is</b> <i class="arg">class</i> <i class="arg">address</i></a></li>
<li><a href="#3"><b class="cmd">::ip::equal</b> <i class="arg">address</i> <i class="arg">address</i></a></li>
<li><a href="#4"><b class="cmd">::ip::normalize</b> <i class="arg">address</i></a></li>
<li><a href="#5"><b class="cmd">::ip::contract</b> <i class="arg">address</i></a></li>
<li><a href="#6"><b class="cmd">::ip::distance</b> <i class="arg">ipaddr1</i> <i class="arg">ipaddr2</i></a></li>
<li><a href="#7"><b class="cmd">::ip::nextIp</b> <i class="arg">ipaddr</i> <span class="opt">?<i class="arg">offset</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::ip::prefix</b> <i class="arg">address</i></a></li>
<li><a href="#9"><b class="cmd">::ip::type</b> <i class="arg">address</i></a></li>
<li><a href="#10"><b class="cmd">::ip::mask</b> <i class="arg">address</i></a></li>
<li><a href="#11"><b class="cmd">::ip::prefixToNative</b> <i class="arg">prefix</i></a></li>
<li><a href="#12"><b class="cmd">::ip::nativeToPrefix</b> <i class="arg">nativeList</i>|<i class="arg">native</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li>
<li><a href="#13"><b class="cmd">::ip::intToString</b> <i class="arg">number</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li>
<li><a href="#14"><b class="cmd">::ip::toInteger</b> <i class="arg">ipaddr</i></a></li>
<li><a href="#15"><b class="cmd">::ip::toHex</b> <i class="arg">ipaddr</i></a></li>
<li><a href="#16"><b class="cmd">::ip::maskToInt</b> <i class="arg">ipmask</i></a></li>
<li><a href="#17"><b class="cmd">::ip::broadcastAddress</b> <i class="arg">prefix</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li>
<li><a href="#18"><b class="cmd">::ip::maskToLength</b> <i class="arg">dottedMask</i>|<i class="arg">integerMask</i>|<i class="arg">hexMask</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li>
<li><a href="#19"><b class="cmd">::ip::lengthToMask</b> <i class="arg">maskLength</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li>
<li><a href="#20"><b class="cmd">::ip::nextNet</b> <i class="arg">ipaddr</i> <i class="arg">ipmask</i> <span class="opt">?<i class="arg">count</i>?</span> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li>
<li><a href="#21"><b class="cmd">::ip::isOverlap</b> <i class="arg">prefix</i> <i class="arg">prefix</i>...</a></li>
<li><a href="#22"><b class="cmd">::ip::isOverlapNative</b> <span class="opt">?<b class="option">-all</b>?</span> <span class="opt">?<b class="option">-inline</b>?</span> <span class="opt">?<b class="option">-ipv4</b>?</span> <i class="arg">hexipaddr</i> <i class="arg">hexipmask</i> <i class="arg">hexiplist</i></a></li>
<li><a href="#23"><b class="cmd">::ip::ipToLayer2Multicast</b> <i class="arg">ipaddr</i></a></li>
<li><a href="#24"><b class="cmd">::ip::ipHostFromPrefix</b> <i class="arg">prefix</i> <span class="opt">?<b class="option">-exclude</b> <i class="arg">prefixExcludeList</i>?</span></a></li>
<li><a href="#25"><b class="cmd">::ip::reduceToAggregates</b> <i class="arg">prefixlist</i></a></li>
<li><a href="#26"><b class="cmd">::ip::longestPrefixMatch</b> <i class="arg">ipaddr</i> <i class="arg">prefixlist</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></li>
<li><a href="#27"><b class="cmd">::ip::collapse</b> <i class="arg">prefixlist</i></a></li>
<li><a href="#28"><b class="cmd">::ip::subtract</b> <i class="arg">prefixlist</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a set of commands to help in parsing, displaying
and comparing internet addresses. The package can handle both IPv4 (1)
and IPv6 (2) address types.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ip::version</b> <i class="arg">address</i></a></dt>
<dd><p>Returns the protocol version of the address (4 or 6) or 0 if the
address is neither IPv4 or IPv6.</p></dd>
<dt><a name="2"><b class="cmd">::ip::is</b> <i class="arg">class</i> <i class="arg">address</i></a></dt>
<dd><p>Returns true if the address is a member of the given protocol
class. The class parameter may be either <i class="arg">ipv4</i> or <i class="arg">ipv6</i>
This is effectively a boolean equivalent of the <b class="cmd">version</b>
command. The <i class="arg">class</i> argument may be shortened to <i class="arg">4</i> or
<i class="arg">6</i>.</p></dd>
<dt><a name="3"><b class="cmd">::ip::equal</b> <i class="arg">address</i> <i class="arg">address</i></a></dt>
<dd><p>Compare two address specifications for equivalence. The arguments are
normalized and the address prefix determined (if a mask is
supplied). The normalized addresses are then compared bit-by-bit and
the procedure returns true if they match.</p></dd>
<dt><a name="4"><b class="cmd">::ip::normalize</b> <i class="arg">address</i></a></dt>
<dd><p>Convert an IPv4 or IPv6 address into a fully expanded version. There
are various shorthand ways to write internet addresses, missing out
redundant parts or digits. This procedure is the opposite of
<b class="cmd">contract</b>.</p></dd>
<dt><a name="5"><b class="cmd">::ip::contract</b> <i class="arg">address</i></a></dt>
<dd><p>Convert a <b class="cmd">normalize</b>d internet address into a more compact form
suitable for displaying to users.</p></dd>
<dt><a name="6"><b class="cmd">::ip::distance</b> <i class="arg">ipaddr1</i> <i class="arg">ipaddr2</i></a></dt>
<dd><p>This command computes the (integer) distance from IPv4 address 
<i class="arg">ipaddr1</i> to IPv4 address <i class="arg">ipaddr2</i>, i.e. &quot;ipaddr2 - ipaddr1&quot;</p>
<pre class="doctools_example">
   % ::ip::distance 1.1.1.1  1.1.1.5
   4
</pre>
</dd>
<dt><a name="7"><b class="cmd">::ip::nextIp</b> <i class="arg">ipaddr</i> <span class="opt">?<i class="arg">offset</i>?</span></a></dt>
<dd><p>This command adds the integer <i class="arg">offset</i> to the IPv4 address <i class="arg">ipaddr</i>
and returns the new IPv4 address.</p>
<pre class="doctools_example">
   % ::ip::distance 1.1.1.1  4
   1.1.1.5
</pre>
</dd>
<dt><a name="8"><b class="cmd">::ip::prefix</b> <i class="arg">address</i></a></dt>
<dd><p>Returns the address prefix generated by masking the address part with
the mask if provided. If there is no mask then it is equivalent to
calling <b class="cmd">normalize</b></p></dd>
<dt><a name="9"><b class="cmd">::ip::type</b> <i class="arg">address</i></a></dt>
<dd></dd>
<dt><a name="10"><b class="cmd">::ip::mask</b> <i class="arg">address</i></a></dt>
<dd><p>If the address supplied includes a mask then this is returned
otherwise returns an empty string.</p></dd>
<dt><a name="11"><b class="cmd">::ip::prefixToNative</b> <i class="arg">prefix</i></a></dt>
<dd><p>This command converts the string <i class="arg">prefix</i> from dotted form
(&lt;ipaddr&gt;/&lt;mask&gt; format) to native (hex) form. Returns a list
containing two elements, ipaddress and mask, in this order, in
hexadecimal notation.</p>
<pre class="doctools_example">
   % ip::prefixToNative 1.1.1.0/24
   0x01010100 0xffffff00
</pre>
</dd>
<dt><a name="12"><b class="cmd">::ip::nativeToPrefix</b> <i class="arg">nativeList</i>|<i class="arg">native</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt>
<dd><p>This command converts from native (hex) form to dotted form.
It is the complement of <b class="cmd">::ip::prefixToNative</b>.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">nativeList</i> (in)</dt>
<dd><p>List of several ip addresses in native form. The native form is a list
as returned by <b class="cmd">::ip::prefixToNative</b>.</p></dd>
<dt>list <i class="arg">native</i> (in)</dt>
<dd><p>A list as returned by <b class="cmd">::ip::prefixToNative</b>.</p></dd>
</dl>
<p>The command returns a list of addresses in dotted form if it was
called with a list of addresses. Otherwise a single address in dotted
form is returned.</p>
<pre class="doctools_example">
   % ip::nativeToPrefix {0x01010100 0xffffff00} -ipv4
   1.1.1.0/24
</pre>
</dd>
<dt><a name="13"><b class="cmd">::ip::intToString</b> <i class="arg">number</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt>
<dd><p>This command converts from an ip address specified as integer number
to dotted form.</p>
<pre class="doctools_example">
       ip::intToString 4294967295
       255.255.255.255
</pre>
</dd>
<dt><a name="14"><b class="cmd">::ip::toInteger</b> <i class="arg">ipaddr</i></a></dt>
<dd><p>This command converts a dotted form ip into an integer number.</p>
<pre class="doctools_example">
   % ::ip::toInteger 1.1.1.0
   16843008
</pre>
</dd>
<dt><a name="15"><b class="cmd">::ip::toHex</b> <i class="arg">ipaddr</i></a></dt>
<dd><p>This command converts dotted form ip into a hexadecimal number.</p>
<pre class="doctools_example">
   % ::ip::toHex 1.1.1.0
   0x01010100
</pre>
</dd>
<dt><a name="16"><b class="cmd">::ip::maskToInt</b> <i class="arg">ipmask</i></a></dt>
<dd><p>This command convert an ipmask in either dotted (255.255.255.0) form
or mask length form (24) into an integer number.</p>
<pre class="doctools_example">
   ::ip::maskToInt 24
   4294967040
</pre>
</dd>
<dt><a name="17"><b class="cmd">::ip::broadcastAddress</b> <i class="arg">prefix</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt>
<dd><p>This commands returns a broadcast address in dotted form for the given
route <i class="arg">prefix</i>, either in the form &quot;addr/mask&quot;, or in native
form. The result is in dotted form.</p>
<pre class="doctools_example">
   ::ip::broadcastAddress 1.1.1.0/24
   1.1.1.255
   ::ip::broadcastAddress {0x01010100 0xffffff00}
   0x010101ff
</pre>
</dd>
<dt><a name="18"><b class="cmd">::ip::maskToLength</b> <i class="arg">dottedMask</i>|<i class="arg">integerMask</i>|<i class="arg">hexMask</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt>
<dd><p>This command converts the dotted or integer form of an ipmask to
the mask length form.</p>
<pre class="doctools_example">
   ::ip::maskToLength 0xffffff00 -ipv4
   24
   % ::ip::maskToLength 255.255.255.0
   24
</pre>
</dd>
<dt><a name="19"><b class="cmd">::ip::lengthToMask</b> <i class="arg">maskLength</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt>
<dd><p>This command converts an ipmask in mask length form to its dotted
form.</p>
<pre class="doctools_example">
   ::ip::lengthToMask 24
   255.255.255.0
</pre>
</dd>
<dt><a name="20"><b class="cmd">::ip::nextNet</b> <i class="arg">ipaddr</i> <i class="arg">ipmask</i> <span class="opt">?<i class="arg">count</i>?</span> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt>
<dd><p>This command returns an ipaddress in the same position in the
<i class="arg">count</i> next network. The default value for <i class="arg">count</i> is
<b class="const">1</b>.</p>
<p>The address can be specified as either integer number or in dotted
form. The mask can be specified as either integer number, dotted form,
or mask length form.</p>
<p>The result is in hex form.</p></dd>
<dt><a name="21"><b class="cmd">::ip::isOverlap</b> <i class="arg">prefix</i> <i class="arg">prefix</i>...</a></dt>
<dd><p>This command checks if the given ip prefixes overlap.  All arguments
are in dotted &quot;addr/mask&quot; form. All arguments after the first prefix
are compared against the first prefix. The result is a boolean
value. It is true if an overlap was found for any of the prefixes.</p>
<pre class="doctools_example">
  % ::ip::isOverlap 1.1.1.0/24 2.1.0.1/32
  0
  ::ip::isOverlap 1.1.1.0/24 2.1.0.1/32 1.1.1.1/32
  1
</pre>
</dd>
<dt><a name="22"><b class="cmd">::ip::isOverlapNative</b> <span class="opt">?<b class="option">-all</b>?</span> <span class="opt">?<b class="option">-inline</b>?</span> <span class="opt">?<b class="option">-ipv4</b>?</span> <i class="arg">hexipaddr</i> <i class="arg">hexipmask</i> <i class="arg">hexiplist</i></a></dt>
<dd><p>This command is similar to <b class="cmd">::ip::isOverlap</b>, however the
arguments are in the native form, and the form of the result is under
greater control of the caller.
If the option <b class="option">-all</b> is specified it checks all addresses for
overlap, not only until the first one is found.
If the option <b class="option">-inline</b> is specified the command returns the
overlapping prefix instead of index values.</p>
<p>The result of the command is, depending on the specified options,</p>
<dl class="doctools_definitions">
<dt>no options</dt>
<dd><p>The index of the first overlap found, or 0 if there is none.</p></dd>
<dt>-all</dt>
<dd><p>A list containing the indices of all overlaps found, or an empty list
if there are none.</p></dd>
<dt>-inline</dt>
<dd><p>The first overlapping prefix, or an empoty string if there is none.</p></dd>
<dt>-all -inline</dt>
<dd><p>A list containing the prefixes of all overlaps found, or an empty list
if there are none.</p></dd>
</dl>
<pre class="doctools_example">
  % ::ip::isOverlapNative 0x01010100 0xffffff00 {{0x02010001 0xffffffff}}
  0
  % ::ip::isOverlapNative 0x01010100 0xffffff00 {{0x02010001 0xffffffff} {0x01010101 0xffffffff}}
  2
</pre>
</dd>
<dt><a name="23"><b class="cmd">::ip::ipToLayer2Multicast</b> <i class="arg">ipaddr</i></a></dt>
<dd><p>This command an converts ipv4 address in dotted form into a layer 2
multicast address, also in dotted form.</p>
<pre class="doctools_example">
  % ::ip::ipToLayer2Multicast 224.0.0.2
  01.00.5e.00.00.02
</pre>
</dd>
<dt><a name="24"><b class="cmd">::ip::ipHostFromPrefix</b> <i class="arg">prefix</i> <span class="opt">?<b class="option">-exclude</b> <i class="arg">prefixExcludeList</i>?</span></a></dt>
<dd><p>This command returns a host address from a prefix in the form
&quot;ipaddr/masklen&quot;, also making sure that the result is not an address
found in the <i class="arg">prefixExcludeList</i>.
The result is an ip address in dotted form.</p>
<pre class="doctools_example">
  %::ip::ipHostFromPrefix  1.1.1.5/24
  1.1.1.1
  %::ip::ipHostFromPrefix  1.1.1.1/32
  1.1.1.1
</pre>
</dd>
<dt><a name="25"><b class="cmd">::ip::reduceToAggregates</b> <i class="arg">prefixlist</i></a></dt>
<dd><p>This command finds nets that overlap and filters out the more specific
nets. The prefixes are in either addr/mask form or in native format.
The result is a list containing the non-overlapping ip prefixes from
the input.</p>
<pre class="doctools_example">
  % ::ip::reduceToAggregates {1.1.1.0/24 1.1.0.0/8  2.1.1.0/24 1.1.1.1/32 }
  1.0.0.0/8 2.1.1.0/24
</pre>
</dd>
<dt><a name="26"><b class="cmd">::ip::longestPrefixMatch</b> <i class="arg">ipaddr</i> <i class="arg">prefixlist</i> <span class="opt">?<b class="option">-ipv4</b>?</span></a></dt>
<dd><p>This command finds longest prefix match from set of prefixes, given a
specific host address. The prefixes in the list are in either native
or dotted form, whereas the host address is in either ipprefix format,
dotted form, or integer form.
The result is the prefix which is the most specific match to the host
address.</p>
<pre class="doctools_example">
  % ::ip::longestPrefixMatch 1.1.1.1 {1.1.1.0/24 1.0.0.0/8  2.1.1.0/24 1.1.1.0/28 }
  1.1.1.0/28
</pre>
</dd>
<dt><a name="27"><b class="cmd">::ip::collapse</b> <i class="arg">prefixlist</i></a></dt>
<dd><p>This commands takes a list of prefixes and returns a list prefixes
with the largest possible subnet masks covering the input, in this
manner collapsing adjacent prefixes into larger ranges.</p>
<p>This is different from <b class="cmd">::ip::reduceToAggregates</b> in that
the latter only removes specific nets from a list when they are
covered by other elements of the input whereas this command actively
merges nets into larger ranges when they are adjacent to each other.</p>
<pre class="doctools_example">
% ::ip::collapse {1.2.2.0/24 1.2.3.0/24}
1.2.2.0/23
</pre>
</dd>
<dt><a name="28"><b class="cmd">::ip::subtract</b> <i class="arg">prefixlist</i></a></dt>
<dd><p>This command takes a list of prefixes, some of which are prefixed by a
dash. These latter <i class="term">negative</i> prefixes are used to punch holes
into the ranges described by the other, <i class="term">positive</i>,
prefixes. I.e. the negative prefixes are subtracted frrom the positive
ones, resulting in a larger list of describes describing the covered
ranges only as positives.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<pre class="doctools_example">
% ip::version ::1
6
% ip::version 127.0.0.1
4
</pre>
<pre class="doctools_example">
% ip::normalize 127/8
127.0.0.0/8
% ip::contract 192.168.0.0
192.168
%
% ip::normalize fec0::1
fec0:0000:0000:0000:0000:0000:0000:0001
% ip::contract fec0:0000:0000:0000:0000:0000:0000:0001
fec0::1
</pre>
<pre class="doctools_example">
% ip::equal 192.168.0.4/16 192.168.0.0/16
1
% ip::equal fec0::1/10 fec0::fe01/10
1
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Postel, J. &quot;Internet Protocol.&quot; RFC 791,  September 1981,
    (<a href="http://www.ietf.org/rfc/rfc791.txt">http://www.ietf.org/rfc/rfc791.txt</a>)</p></li>
<li><p>Hinden, R. and Deering, S.,
    &quot;Internet Protocol Version 6 (IPv6) Addressing Architecture&quot;,
    RFC 3513, April 2003
    (<a href="http://www.ietf.org/rfc/rfc3513.txt">http://www.ietf.org/rfc/rfc3513.txt</a>)</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>dns</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>inet(3), ip(7), ipv6(7)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key454">internet address</a>, <a href="../../../../index.html#key451">ip</a>, <a href="../../../../index.html#key453">ipv4</a>, <a href="../../../../index.html#key450">ipv6</a>, <a href="../../../../index.html#key452">rfc 3513</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts<br>
Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/docstrip/docstrip.html.













































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
<div class='fossil-doc' data-title='docstrip - Literate programming tool'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docstrip(n) 1.2 tcllib &quot;Literate programming tool&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docstrip - Docstrip style source code extraction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">File format</a></li>
<li class="doctools_section"><a href="#section3">Commands</a></li>
<li class="doctools_section"><a href="#section4">Document structure</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">docstrip <span class="opt">?1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">docstrip::extract</b> <i class="arg">text</i> <i class="arg">terminals</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">docstrip::sourcefrom</b> <i class="arg">filename</i> <i class="arg">terminals</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><b class="syscmd">Docstrip</b> is a tool created to support a brand of Literate
Programming. It is most common in the (La)TeX community, where it
is being used for pretty much everything from the LaTeX core and up,
but there is nothing about <b class="syscmd">docstrip</b> which prevents using it
for other types of software.</p>
<p>In short, the basic principle of literate programming is that program
source should primarily be written and structured to suit the
developers (and advanced users who want to peek &quot;under the hood&quot;), not
to suit the whims of a compiler or corresponding source code consumer.
This means literate sources often need some kind of &quot;translation&quot; to an
illiterate form that dumb software can understand.
The <b class="package">docstrip</b> Tcl package handles this translation.</p>
<p>Even for those who do not whole-hartedly subscribe to the philosophy
behind literate programming, <b class="syscmd">docstrip</b> can bring greater
clarity to in particular:</p>
<ul class="doctools_itemized">
  
<li><p>programs employing non-obvious mathematics</p></li>
<li><p>projects where separate pieces of code, perhaps in
    different languages, need to be closely coordinated.</p></li>
</ul>
<p>The first is by providing access to much more powerful typographical
features for source code comments than are possible in plain text.
The second is because all the separate pieces of code can be kept
next to each other in the same source file.</p>
<p>The way it works is that the programmer edits directly only one or
several &quot;master&quot; source code files, from which <b class="syscmd">docstrip</b>
generates the more traditional &quot;source&quot; files compilers or the like
would expect. The master sources typically contain a large amount of
documentation of the code, sometimes even in places where the code
consumers would not allow any comments. The etymology of &quot;docstrip&quot;
is that this <em>doc</em>umentation was <em>strip</em>ped away (although
&quot;code extraction&quot; might be a better description, as it has always
been a matter of copying selected pieces of the master source rather
than deleting text from it).
The <b class="package">docstrip</b> Tcl package contains a reimplementation of
the basic extraction functionality from the <b class="syscmd">docstrip</b>
program, and thus makes it possible for a Tcl interpreter to read
and interpret the master source files directly.</p>
<p>Readers who are not previously familiar with <b class="syscmd">docstrip</b> but
want to know more about it may consult the following sources.</p>
<ol class="doctools_enumerated">
<li><p><em>The tclldoc package and class</em>,
  <a href="http://ctan.org/tex-archive/macros/latex/contrib/tclldoc/">http://ctan.org/tex-archive/macros/latex/contrib/tclldoc/</a>.</p></li>
<li><p><em>The DocStrip utility</em>,
  <a href="http://ctan.org/tex-archive/macros/latex/base/docstrip.dtx">http://ctan.org/tex-archive/macros/latex/base/docstrip.dtx</a>.</p></li>
<li><p><em>The doc and shortvrb Packages</em>,
  <a href="http://ctan.org/tex-archive/macros/latex/base/doc.dtx">http://ctan.org/tex-archive/macros/latex/base/doc.dtx</a>.</p></li>
<li><p>Chapter 14 of
  <em>The LaTeX Companion</em> (second edition),
  Addison-Wesley, 2004; ISBN 0-201-36299-6.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">File format</a></h2>
<p>The basic unit <b class="syscmd">docstrip</b> operates on are the <em>lines</em> of
a master source file. Extraction consists of selecting some of these
lines to be copied from input text to output text. The basic
distinction is that between <em>code lines</em> (which are copied and
do not begin with a percent character) and <em>comment lines</em>
(which begin with a percent character and are not copied).</p>
<pre class="doctools_example">
   docstrip::extract [join {
     {% comment}
     {% more comment !&quot;#$%&amp;/(}
     {some command}
     { % blah $blah &quot;Not a comment.&quot;}
     {% abc; this is comment}
     {# def; this is code}
     {ghi}
     {% jkl}
   } \n] {}
</pre>
<p>returns the same sequence of lines as</p>
<pre class="doctools_example">
   join {
     {some command}
     { % blah $blah &quot;Not a comment.&quot;}
     {# def; this is code}
     {ghi} &quot;&quot;
   } \n
</pre>
<p>It does not matter to <b class="syscmd">docstrip</b> what format is used for the
documentation in the comment lines, but in order to do better than
plain text comments, one typically uses some markup language. Most
commonly LaTeX is used, as that is a very established standard and
also provides the best support for mathematical formulae, but the
<b class="package">docstrip::util</b> package also gives some support for
<i class="term"><a href="../../../../index.html#key179">doctools</a></i>-like markup.</p>
<p>Besides the basic code and comment lines, there are also
<em>guard lines</em>, which begin with the two characters '%&lt;', and
<em>meta-comment lines</em>, which begin with the two characters
'%%'. Within guard lines there is furthermore the distinction between
<em>verbatim guard lines</em>, which begin with '%&lt;&lt;', and ordinary
guard lines, where the '%&lt;' is not followed by another '&lt;'. The last
category is by far the most common.</p>
<p>Ordinary guard lines conditions extraction of the code line(s) they
guard by the value of a boolean expression; the guarded block of
code lines will only be included if the expression evaluates to true.
The syntax of an ordinary guard line is one of</p>
<pre class="doctools_example">
    '%' '&lt;' STARSLASH EXPRESSION '&gt;'
    '%' '&lt;' PLUSMINUS EXPRESSION '&gt;' CODE
</pre>
<p>where</p>
<pre class="doctools_example">
    STARSLASH  ::=  '*' | '/'
    PLUSMINUS  ::=  | '+' | '-'
    EXPRESSION ::= SECONDARY | SECONDARY ',' EXPRESSION
                 | SECONDARY '|' EXPRESSION
    SECONDARY  ::= PRIMARY | PRIMARY '&amp;' SECONDARY
    PRIMARY    ::= TERMINAL | '!' PRIMARY | '(' EXPRESSION ')'
    CODE       ::= { any character except end-of-line }
</pre>
<p>Comma and vertical bar both denote 'or'. Ampersand denotes 'and'.
Exclamation mark denotes 'not'. A TERMINAL can be any nonempty string
of characters not containing '&gt;', '&amp;', '|', comma, '(', or ')',
although the <b class="syscmd">docstrip</b> manual is a bit restrictive and only
guarantees proper operation for strings of letters (although even
the LaTeX core sources make heavy use also of digits in TERMINALs).
The second argument of <b class="cmd">docstrip::extract</b> is the list of those
TERMINALs that should count as having the value 'true'; all other
TERMINALs count as being 'false' when guard expressions are evaluated.</p>
<p>In the case of a '%&lt;*<em>EXPRESSION</em>&gt;' guard, the lines guarded are
all lines up to the next '%&lt;/<em>EXPRESSION</em>&gt;' guard with the same
<em>EXPRESSION</em> (compared as strings). The blocks of code delimited
by such '*' and '/' guard lines must be properly nested.</p>
<pre class="doctools_example">
   set text [join {
      {begin}
      {%&lt;*foo&gt;}
      {1}
      {%&lt;*bar&gt;}
      {2}
      {%&lt;/bar&gt;}
      {%&lt;*!bar&gt;}
      {3}
      {%&lt;/!bar&gt;}
      {4}
      {%&lt;/foo&gt;}
      {5}
      {%&lt;*bar&gt;}
      {6}
      {%&lt;/bar&gt;}
      {end}
   } \n]
   set res [docstrip::extract $text foo]
   append res [docstrip::extract $text {foo bar}]
   append res [docstrip::extract $text bar]
</pre>
<p>sets $res to the result of</p>
<pre class="doctools_example">
   join {
      {begin}
      {1}
      {3}
      {4}
      {5}
      {end}
      {begin}
      {1}
      {2}
      {4}
      {5}
      {6}
      {end}
      {begin}
      {5}
      {6}
      {end} &quot;&quot;
   } \n
</pre>
<p>In guard lines without a '*', '/', '+', or '-' modifier after the
'%&lt;', the guard applies only to the CODE following the '&gt;' on that
single line. A '+' modifier is equivalent to no modifier. A '-'
modifier is like the case with no modifier, but the expression is
implicitly negated, i.e., the CODE of a '%&lt;-' guard line is only
included if the expression evaluates to false.</p>
<p>Metacomment lines are &quot;comment lines which should not be stripped
away&quot;, but be extracted like code lines; these are sometimes used for
copyright notices and similar material. The '%%' prefix is however
not kept, but substituted by the current <b class="option">-metaprefix</b>, which
is customarily set to some &quot;comment until end of line&quot; character (or
character sequence) of the language of the code being extracted.</p>
<pre class="doctools_example">
   set text [join {
      {begin}
      {%&lt;foo&gt; foo}
      {%&lt;+foo&gt;plusfoo}
      {%&lt;-foo&gt;minusfoo}
      {middle}
      {%% some metacomment}
      {%&lt;*foo&gt;}
      {%%another metacomment}
      {%&lt;/foo&gt;}
      {end}
   } \n]
   set res [docstrip::extract $text foo -metaprefix {# }]
   append res [docstrip::extract $text bar -metaprefix {#}]
</pre>
<p>sets $res to the result of</p>
<pre class="doctools_example">
   join {
      {begin}
      { foo}
      {plusfoo}
      {middle}
      {#  some metacomment}
      {# another metacomment}
      {end}
      {begin}
      {minusfoo}
      {middle}
      {# some metacomment}
      {end} &quot;&quot;
   } \n
</pre>
<p>Verbatim guards can be used to force code line
interpretation of a block of lines even if some of them happen to look
like any other type of lines to docstrip. A verbatim guard has the
form '%&lt;&lt;<em>END-TAG</em>' and the verbatim block is terminated by the
first line that is exactly '%<em>END-TAG</em>'.</p>
<pre class="doctools_example">
   set text [join {
      {begin}
      {%&lt;*myblock&gt;}
      {some stupid()}
      {   #computer&lt;program&gt;}
      {%&lt;&lt;QQQ-98765}
      {% These three lines are copied verbatim (including percents}
      {%% even if -metaprefix is something different than %%).}
      {%&lt;/myblock&gt;}
      {%QQQ-98765}
      {   using*strange@programming&lt;language&gt;}
      {%&lt;/myblock&gt;}
      {end}
   } \n]
   set res [docstrip::extract $text myblock -metaprefix {# }]
   append res [docstrip::extract $text {}]
</pre>
<p>sets $res to the result of</p>
<pre class="doctools_example">
   join {
      {begin}
      {some stupid()}
      {   #computer&lt;program&gt;}
      {% These three lines are copied verbatim (including percents}
      {%% even if -metaprefix is something different than %%).}
      {%&lt;/myblock&gt;}
      {   using*strange@programming&lt;language&gt;}
      {end}
      {begin}
      {end} &quot;&quot;
   } \n
</pre>
<p>The processing of verbatim guards takes place also inside blocks of
lines which due to some outer block guard will not be copied.</p>
<p>The final piece of <b class="syscmd">docstrip</b> syntax is that extraction
stops at a line that is exactly &quot;\endinput&quot;; this is often used to
avoid copying random whitespace at the end of a file. In the unlikely
case that one wants such a code line, one can protect it with a
verbatim guard.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Commands</a></h2>
<p>The package defines two commands.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">docstrip::extract</b> <i class="arg">text</i> <i class="arg">terminals</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>The <b class="cmd">extract</b> command docstrips the <i class="arg">text</i> and returns the
  extracted lines of code, as a string with each line terminated with
  a newline. The <i class="arg">terminals</i> is the list of those guard
  expression terminals which should evaluate to true.
  The available options are:</p>
<dl class="doctools_options">
  
<dt><b class="option">-annotate</b> <i class="arg">lines</i></dt>
<dd><p>Requests the specified number of lines of annotation to follow
    each extracted line in the result. Defaults to 0. Annotation lines
    are mostly useful when the extracted lines are to undergo some
    further transformation. A first annotation line is a list of three
    elements: line type, prefix removed in extraction, and prefix
    inserted in extraction. The line type is one of: 'V' (verbatim),
    'M' (metacomment), '+' (+ or no modifier guard line), '-' (-
    modifier guard line), '.' (normal line). A second annotation line
    is the source line number. A third annotation line is the current
    stack of block guards. Requesting more than three lines of
    annotation is currently not supported.</p></dd>
<dt><b class="option">-metaprefix</b> <i class="arg">string</i></dt>
<dd><p>The string by which the '%%' prefix of a metacomment line will
    be replaced. Defaults to '%%'. For Tcl code this would typically
    be '#'.</p></dd>
<dt><b class="option">-onerror</b> <i class="arg">keyword</i></dt>
<dd><p>Controls what will be done when a format error in the <i class="arg">text</i>
    being processed is detected. The settings are:</p>
<dl class="doctools_definitions">
    
<dt><b class="const">ignore</b></dt>
<dd><p>Just ignore the error; continue as if nothing happened.</p></dd>
<dt><b class="const">puts</b></dt>
<dd><p>Write an error message to <b class="const">stderr</b>, then continue
      processing.</p></dd>
<dt><b class="const">throw</b></dt>
<dd><p>Throw an error. The <b class="option">-errorcode</b> is set to a list whose
      first element is <b class="const">DOCSTRIP</b>, second element is the
      type of error, and third element is the line number where
      the error is detected. This is the default.</p></dd>
</dl></dd>
<dt><b class="option">-trimlines</b> <i class="arg">boolean</i></dt>
<dd><p>Controls whether <em>spaces</em> at the end of a line should be
    trimmed away before the line is processed. Defaults to true.</p></dd>
</dl>
<p>It should be remarked that the <i class="arg">terminals</i> are often called
  &quot;options&quot; in the context of the <b class="syscmd">docstrip</b> program, since
  these specify which optional code fragments should be included.</p></dd>
<dt><a name="2"><b class="cmd">docstrip::sourcefrom</b> <i class="arg">filename</i> <i class="arg">terminals</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>The <b class="cmd">sourcefrom</b> command is a docstripping emulation of
  <b class="cmd"><a href="../../../../index.html#key436">source</a></b>. It opens the file <i class="arg">filename</i>, reads it, closes it,
  docstrips the contents as specified by the <i class="arg">terminals</i>, and
  evaluates the result in the local context of the caller, during
  which time the <b class="cmd"><a href="../../../../index.html#key83">info</a></b> <b class="method">script</b> value will be the
  <i class="arg">filename</i>. The options are passed on to <b class="cmd">fconfigure</b> to
  configure the file before its contents are read. The
  <b class="option">-metaprefix</b> is set to '#', all other <b class="cmd">extract</b>
  options have their default values.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Document structure</a></h2>
<p>The file format (as described above) determines whether a master
source code file can be processed correctly by <b class="syscmd">docstrip</b>,
but the usefulness of the format is to no little part also dependent
on that the code and comment lines together constitute a well-formed
document.</p>
<p>For a document format that does not require any non-Tcl software, see
the <b class="cmd">ddt2man</b> command in the <b class="package">docstrip::util</b> package. It
is suggested that files employing that document format are given the
suffix &quot;<b class="file">.ddt</b>&quot;, to distinguish them from the more traditional
LaTeX-based &quot;<b class="file">.dtx</b>&quot; files.</p>
<p>Master source files with &quot;<b class="file">.dtx</b>&quot; extension are usually set up so
that they can be typeset directly by <b class="syscmd"><a href="../../../../index.html#key186">latex</a></b> without any
support from other files. This is achieved by beginning the file
with the lines</p>
<pre class="doctools_example">
   % \iffalse
   %&lt;*driver&gt;
   \documentclass{tclldoc}
   \begin{document}
   \DocInput{<em>filename.dtx</em>}
   \end{document}
   %&lt;/driver&gt;
   % \fi
</pre>
<p>or some variation thereof. The trick is that the file gets read twice.
With normal LaTeX reading rules, the first two lines are comments and
therefore ignored. The third line is the document preamble, the fourth
line begins the document body, and the sixth line ends the document,
so LaTeX stops there — non-comments below that point in
the file are never subjected to the normal LaTeX reading rules. Before
that, however, the \DocInput command on the fifth line is processed,
and that does two things: it changes the interpretation of '%' from
&quot;comment&quot; to &quot;ignored&quot;, and it inputs the file specified in the
argument (which is normally the name of the file the command is in).
It is this second time that the file is being read that the comments
and code in it are typeset.</p>
<p>The function of the \iffalse ... \fi is to skip lines two to seven
on this second time through; this is similar to the &quot;if 0 { ... }&quot;
idiom for block comments in Tcl code, and it is needed here because
(amongst other things) the \documentclass command may only be
executed once. The function of the &lt;driver&gt; guards is to prevent this
short piece of LaTeX code from being extracted by <b class="syscmd">docstrip</b>.
The total effect is that the file can function both as a LaTeX
document and as a <b class="syscmd">docstrip</b> master source code file.</p>
<p>It is not necessary to use the tclldoc document class, but that does
provide a number of features that are convenient for &quot;<b class="file">.dtx</b>&quot;
files containing Tcl code. More information on this matter can be
found in the references above.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docstrip_util.html">docstrip_util</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key439">.dtx</a>, <a href="../../../../index.html#key438">LaTeX</a>, <a href="../../../../index.html#key435">docstrip</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key437">literate programming</a>, <a href="../../../../index.html#key436">source</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003–2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/docstrip/docstrip_util.html.





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674

<div class='fossil-doc' data-title='docstrip_util - Literate programming tool'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docstrip_util(n) 1.3.1 tcllib &quot;Literate programming tool&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docstrip_util - Docstrip-related utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Package indexing commands</a></li>
<li class="doctools_section"><a href="#section3">Source processing commands</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">docstrip <span class="opt">?1.2?</span></b></li>
<li>package require <b class="pkgname">docstrip::util <span class="opt">?1.3.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pkgProvide</b> <i class="arg">name</i> <i class="arg">version</i> <i class="arg">terminals</i></a></li>
<li><a href="#2"><b class="cmd">pkgIndex</b> <span class="opt">?<i class="arg">terminal</i> ...?</span></a></li>
<li><a href="#3"><b class="cmd">fileoptions</b> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#4"><b class="cmd">docstrip::util::index_from_catalogue</b> <i class="arg">dir</i> <i class="arg">pattern</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#5"><b class="cmd">docstrip::util::modules_from_catalogue</b> <i class="arg">target</i> <i class="arg">source</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#6"><b class="cmd">docstrip::util::classical_preamble</b> <i class="arg">metaprefix</i> <i class="arg">message</i> <i class="arg">target</i> <span class="opt">?<i class="arg">source</i> <i class="arg">terminals</i> ...?</span></a></li>
<li><a href="#7"><b class="cmd">docstrip::util::classical_postamble</b> <i class="arg">metaprefix</i> <i class="arg">message</i> <i class="arg">target</i> <span class="opt">?<i class="arg">source</i> <i class="arg">terminals</i> ...?</span></a></li>
<li><a href="#8"><b class="cmd">docstrip::util::packages_provided</b> <i class="arg">text</i> <span class="opt">?<i class="arg">setup-script</i>?</span></a></li>
<li><a href="#9"><b class="cmd">docstrip::util::ddt2man</b> <i class="arg">text</i></a></li>
<li><a href="#10"><b class="cmd">docstrip::util::guards</b> <i class="arg">subcmd</i> <i class="arg">text</i></a></li>
<li><a href="#11"><b class="cmd">docstrip::util::patch</b> <i class="arg">source-var</i> <i class="arg">terminals</i> <i class="arg">fromtext</i> <i class="arg">diff</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#12"><b class="cmd">docstrip::util::thefile</b> <i class="arg">filename</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#13"><b class="cmd">docstrip::util::import_unidiff</b> <i class="arg">diff-text</i> <span class="opt">?<i class="arg">warning-var</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">docstrip::util</b> package is meant for collecting various
utility procedures that are mainly useful at installation or
development time. It is separate from the base package to avoid
overhead when the latter is used to <b class="cmd"><a href="../../../../index.html#key436">source</a></b> code.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Package indexing commands</a></h2>
<p>Like raw &quot;<b class="file">.tcl</b>&quot; files, code lines in docstrip source files can
be searched for package declarations and corresponding indices
constructed. A complication is however that one cannot tell from the
code blocks themselves which will fit together to make a working
package; normally that information would be found in an accompanying
&quot;<b class="file">.ins</b>&quot; file, but parsing one of those is not an easy task.
Therefore <b class="package">docstrip::util</b> introduces an alternative encoding
of such information, in the form of a declarative Tcl script: the
<i class="term"><a href="../../../../index.html#key665">catalogue</a></i> (of the contents in a source file).</p>
<p>The special commands which are available inside a catalogue are:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pkgProvide</b> <i class="arg">name</i> <i class="arg">version</i> <i class="arg">terminals</i></a></dt>
<dd><p>Declares that the code for a package with name <i class="arg">name</i> and
  version <i class="arg">version</i> is made up from those modules in the source
  file which are selected by the <i class="arg">terminals</i> list of guard
  expression terminals. This code should preferably not contain a
  <b class="cmd"><a href="../../../../index.html#key48">package</a></b> <b class="method">provide</b> command for the package, as one
  will be provided by the package loading mechanisms.</p></dd>
<dt><a name="2"><b class="cmd">pkgIndex</b> <span class="opt">?<i class="arg">terminal</i> ...?</span></a></dt>
<dd><p>Declares that the code for a package is made up from those modules
  in the source file which are selected by the listed guard
  expression <i class="arg">terminal</i>s. The name and version of this package is
  determined from <b class="cmd"><a href="../../../../index.html#key48">package</a></b> <b class="method">provide</b> command(s) found
  in that code (hence there must be such a command in there).</p></dd>
<dt><a name="3"><b class="cmd">fileoptions</b> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>Declares the <b class="cmd">fconfigure</b> options that should be in force when
  reading the source; this can usually be ignored for pure ASCII
  files, but if the file needs to be interpreted according to some
  other <b class="option">-encoding</b> then this is how to specify it. The
  command should normally appear first in the catalogue, as it takes
  effect only for commands following it.</p></dd>
</dl>
<p>Other Tcl commands are supported too — a catalogue is
parsed by being evaluated in a safe interpreter — but they
are rarely needed. To allow for future extensions, unknown commands
in the catalogue are silently ignored.</p>
<p>To simplify distribution of catalogues together with their source
files, the catalogue is stored <em>in the source file itself</em> as
a module selected by the terminal '<b class="const">docstrip.tcl::catalogue</b>'.
This supports both the style of collecting all catalogue lines in one
place and the style of putting each catalogue line in close proximity
of the code that it declares.</p>
<p>Putting catalogue entries next to the code they declare may look as
follows</p>
<pre class="doctools_example">
%    First there's the catalogue entry
%    \begin{tcl}
%&lt;docstrip.tcl::catalogue&gt;pkgProvide foo::bar 1.0 {foobar load}
%    \end{tcl}
%    second a metacomment used to include a copyright message
%    \begin{macrocode}
%&lt;*foobar&gt;
%% This file is placed in the public domain.
%    \end{macrocode}
%    third the package implementation
%    \begin{tcl}
namespace eval foo::bar {
   # ... some clever piece of Tcl code elided ...
%    \end{tcl}
%    which at some point may have variant code to make use of a
%    |load|able extension
%    \begin{tcl}
%&lt;*load&gt;
   load [file rootname [info script]][info sharedlibextension]
%&lt;/load&gt;
%&lt;*!load&gt;
   # ... even more clever scripted counterpart of the extension
   # also elided ...
%&lt;/!load&gt;
}
%&lt;/foobar&gt;
%    \end{tcl}
%    and that's it!
</pre>
<p>The corresponding set-up with <b class="cmd">pkgIndex</b> would be</p>
<pre class="doctools_example">
%    First there's the catalogue entry
%    \begin{tcl}
%&lt;docstrip.tcl::catalogue&gt;pkgIndex foobar load
%    \end{tcl}
%    second a metacomment used to include a copyright message
%    \begin{tcl}
%&lt;*foobar&gt;
%% This file is placed in the public domain.
%    \end{tcl}
%    third the package implementation
%    \begin{tcl}
package provide foo::bar 1.0
namespace eval foo::bar {
   # ... some clever piece of Tcl code elided ...
%    \end{tcl}
%    which at some point may have variant code to make use of a
%    |load|able extension
%    \begin{tcl}
%&lt;*load&gt;
   load [file rootname [info script]][info sharedlibextension]
%&lt;/load&gt;
%&lt;*!load&gt;
   # ... even more clever scripted counterpart of the extension
   # also elided ...
%&lt;/!load&gt;
}
%&lt;/foobar&gt;
%    \end{tcl}
%    and that's it!
</pre>
<dl class="doctools_definitions">
<dt><a name="4"><b class="cmd">docstrip::util::index_from_catalogue</b> <i class="arg">dir</i> <i class="arg">pattern</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command is a sibling of the standard <b class="cmd">pkg_mkIndex</b>
  command, in that it adds package entries to &quot;<b class="file">pkgIndex.tcl</b>&quot;
  files. The difference is that it indexes <b class="syscmd"><a href="docstrip.html">docstrip</a></b>-style
  source files rather than raw &quot;<b class="file">.tcl</b>&quot; or loadable library files.
  Only packages listed in the catalogue of a file are considered.</p>
<p>The <i class="arg">dir</i> argument is the directory in which to look for files
  (and whose &quot;<b class="file">pkgIndex.tcl</b>&quot; file should be amended).
  The <i class="arg">pattern</i> argument is a <b class="cmd">glob</b> pattern of files to look
  into; a typical value would be <b class="const">*.dtx</b> or
  <b class="const">*.{dtx,ddt}</b>. Remaining arguments are option-value pairs,
  where the supported options are:</p>
<dl class="doctools_options">
  
<dt><b class="option">-recursein</b> <i class="arg">dirpattern</i></dt>
<dd><p>If this option is given, then the <b class="cmd">index_from_catalogue</b>
    operation will be repeated in each subdirectory whose name
    matches the <i class="arg">dirpattern</i>. <b class="option">-recursein</b> <b class="const">*</b> will
    cause the entire subtree rooted at <i class="arg">dir</i> to be indexed.</p></dd>
<dt><b class="option">-sourceconf</b> <i class="arg">dictionary</i></dt>
<dd><p>Specify <b class="cmd">fileoptions</b> to use when reading the catalogues of
    files (and also for reading the packages if the catalogue does
    not contain a <b class="cmd">fileoptions</b> command). Defaults to being
    empty. Primarily useful if your system encoding is very different
    from that of the source file (e.g., one is a two-byte encoding
    and the other is a one-byte encoding). <b class="const">ascii</b> and
    <b class="const">utf-8</b> are not very different in that sense.</p></dd>
<dt><b class="option">-options</b> <i class="arg">terminals</i></dt>
<dd><p>The <i class="arg">terminals</i> is a list of terminals in addition to
    <b class="const">docstrip.tcl::catalogue</b> that should be held as true when
    extracting the catalogue. Defaults to being empty. This makes it
    possible to make use of &quot;variant sections&quot; in the catalogue
    itself, e.g. gaurd some entries with an extra &quot;experimental&quot; and
    thus prevent them from appearing in the index unless that is
    generated with &quot;experimental&quot; among the <b class="option">-options</b>.</p></dd>
<dt><b class="option">-report</b> <i class="arg">boolean</i></dt>
<dd><p>If the <i class="arg">boolean</i> is true then the return value will be a
    textual, probably multiline, report on what was done. Defaults
    to false, in which case there is no particular return value.</p></dd>
<dt><b class="option">-reportcmd</b> <i class="arg">commandPrefix</i></dt>
<dd><p>Every item in the report is handed as an extra argument to the
    command prefix. Since <b class="cmd">index_from_catalogue</b> would typically
    be used at a rather high level in installation scripts and the
    like, the <i class="arg">commandPrefix</i> defaults to
    &quot;<b class="cmd">puts</b> <b class="const">stdout</b>&quot;.
    Use <b class="cmd"><a href="../../../../index.html#key302">list</a></b> to effectively disable this feature. The return
    values from the prefix are ignored.</p></dd>
</dl>
<p>The <b class="cmd">package ifneeded</b> scripts that are generated contain
  one <b class="cmd">package require docstrip</b> command and one
  <b class="cmd">docstrip::sourcefrom</b> command. If the catalogue entry was
  of the <b class="cmd">pkgProvide</b> kind then the <b class="cmd">package ifneeded</b>
  script also contains the <b class="cmd">package provide</b> command.</p>
<p>Note that <b class="cmd">index_from_catalogue</b> never removes anything from an
  existing &quot;<b class="file">pkgIndex.tcl</b>&quot; file. Hence you may need to delete it
  (or have <b class="cmd">pkg_mkIndex</b> recreate it from scratch) before running
  <b class="cmd">index_from_catalogue</b> to update some piece of information, such
  as a package version number.</p></dd>
<dt><a name="5"><b class="cmd">docstrip::util::modules_from_catalogue</b> <i class="arg">target</i> <i class="arg">source</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command is an alternative to <b class="cmd">index_from_catalogue</b> which
  creates Tcl Module (&quot;<b class="file">.tm</b>&quot;) files rather than
  &quot;<b class="file">pkgIndex.tcl</b>&quot; entries. Since this action is more similar to
  what <b class="syscmd"><a href="docstrip.html">docstrip</a></b> classically does, it has features for
  putting pre- and postambles on the generated files.</p>
<p>The <i class="arg">source</i> argument is the name of the source file to
  generate &quot;<b class="file">.tm</b>&quot; files from. The <i class="arg">target</i> argument is the
  directory which should count as a module path, i.e., this is what
  the relative paths derived from package names are joined to. The
  supported options are:</p>
<dl class="doctools_options">
  
<dt><b class="option">-preamble</b> <i class="arg">message</i></dt>
<dd><p>A message to put in the preamble (initial block of comments) of
    generated files. Defaults to a space. May be several lines, which
    are then separated by newlines. Traditionally used for copyright
    notices or the like, but metacomment lines provide an alternative
    to that.</p></dd>
<dt><b class="option">-postamble</b> <i class="arg">message</i></dt>
<dd><p>Like <b class="option">-preamble</b>, but the message is put at the end of the
    file instead of the beginning. Defaults to being empty.</p></dd>
<dt><b class="option">-sourceconf</b> <i class="arg">dictionary</i></dt>
<dd><p>Specify <b class="cmd">fileoptions</b> to use when reading the catalogue of
    the <i class="arg">source</i> (and also for reading the packages if the
    catalogue does not contain a <b class="cmd">fileoptions</b> command). Defaults
    to being empty. Primarily useful if your system encoding is very
    different from that of the source file (e.g., one is a two-byte
    encoding and the other is a one-byte encoding). <b class="const">ascii</b> and
    <b class="const">utf-8</b> are not very different in that sense.</p></dd>
<dt><b class="option">-options</b> <i class="arg">terminals</i></dt>
<dd><p>The <i class="arg">terminals</i> is a list of terminals in addition to
    <b class="const">docstrip.tcl::catalogue</b> that should be held as true when
    extracting the catalogue. Defaults to being empty. This makes it
    possible to make use of &quot;variant sections&quot; in the catalogue
    itself, e.g. gaurd some entries with an extra &quot;experimental&quot; guard
    and thus prevent them from contributing packages unless those are
    generated with &quot;experimental&quot; among the <b class="option">-options</b>.</p></dd>
<dt><b class="option">-formatpreamble</b> <i class="arg">commandPrefix</i></dt>
<dd><p>Command prefix used to actually format the preamble. Takes four
    additional arguments <i class="arg">message</i>, <i class="arg">targetFilename</i>,
    <i class="arg">sourceFilename</i>, and <i class="arg">terminalList</i> and returns a fully
    formatted preamble. Defaults to using <b class="cmd">classical_preamble</b>
    with a <i class="arg">metaprefix</i> of '##'.</p></dd>
<dt><b class="option">-formatpostamble</b> <i class="arg">commandPrefix</i></dt>
<dd><p>Command prefix used to actually format the postamble. Takes four
    additional arguments <i class="arg">message</i>, <i class="arg">targetFilename</i>,
    <i class="arg">sourceFilename</i>, and <i class="arg">terminalList</i> and returns a fully
    formatted postamble. Defaults to using <b class="cmd">classical_postamble</b>
    with a <i class="arg">metaprefix</i> of '##'.</p></dd>
<dt><b class="option">-report</b> <i class="arg">boolean</i></dt>
<dd><p>If the <i class="arg">boolean</i> is true (which is the default) then the return
    value will be a textual, probably multiline, report on what was
    done. If it is false then there is no particular return value.</p></dd>
<dt><b class="option">-reportcmd</b> <i class="arg">commandPrefix</i></dt>
<dd><p>Every item in the report is handed as an extra argument to this
    command prefix. Defaults to <b class="cmd"><a href="../../../../index.html#key302">list</a></b>, which effectively disables
    this feature. The return values from the prefix are ignored. Use
    for example &quot;<b class="cmd">puts</b> <b class="const">stdout</b>&quot; to get report items
    written immediately to the terminal.</p></dd>
</dl>
<p>An existing file of the same name as one to be created will be
  overwritten.</p></dd>
<dt><a name="6"><b class="cmd">docstrip::util::classical_preamble</b> <i class="arg">metaprefix</i> <i class="arg">message</i> <i class="arg">target</i> <span class="opt">?<i class="arg">source</i> <i class="arg">terminals</i> ...?</span></a></dt>
<dd><p>This command returns a preamble in the classical
  <b class="syscmd"><a href="docstrip.html">docstrip</a></b> style</p>
<pre class="doctools_example">
##
## This is `TARGET',
## generated by the docstrip::util package.
##
## The original source files were:
##
## SOURCE (with options: `foo,bar')
##
## Some message line 1
## line2
## line3
</pre>
<p>if called as</p>
<pre class="doctools_example">
docstrip::util::classical_preamble {##}\
  &quot;\nSome message line 1\nline2\nline3&quot; TARGET SOURCE {foo bar}
</pre>
<p>The command supports preambles for files generated from multiple
  sources, even though <b class="cmd">modules_from_catalogue</b> at present does
  not need that.</p></dd>
<dt><a name="7"><b class="cmd">docstrip::util::classical_postamble</b> <i class="arg">metaprefix</i> <i class="arg">message</i> <i class="arg">target</i> <span class="opt">?<i class="arg">source</i> <i class="arg">terminals</i> ...?</span></a></dt>
<dd><p>This command returns a postamble in the classical
  <b class="syscmd"><a href="docstrip.html">docstrip</a></b> style</p>
<pre class="doctools_example">
## Some message line 1
## line2
## line3
##
## End of file `TARGET'.
</pre>
<p>if called as</p>
<pre class="doctools_example">
docstrip::util::classical_postamble {##}\
  &quot;Some message line 1\nline2\nline3&quot; TARGET SOURCE {foo bar}
</pre>
<p>In other words, the <i class="arg">source</i> and <i class="arg">terminals</i> arguments are
  ignored, but supported for symmetry with <b class="cmd">classical_preamble</b>.</p></dd>
<dt><a name="8"><b class="cmd">docstrip::util::packages_provided</b> <i class="arg">text</i> <span class="opt">?<i class="arg">setup-script</i>?</span></a></dt>
<dd><p>This command returns a list where every even index element is the
  name of a package <b class="cmd">provide</b>d by <i class="arg">text</i> when that is
  evaluated as a Tcl script, and the following odd index element is
  the corresponding version. It is used to do package indexing of
  extracted pieces of code, in the manner of <b class="cmd">pkg_mkIndex</b>.</p>
<p>One difference to <b class="cmd">pkg_mkIndex</b> is that the <i class="arg">text</i> gets
  evaluated in a safe interpreter. <b class="cmd">package require</b> commands
  are silently ignored, as are unknown commands (which includes
  <b class="cmd"><a href="../../../../index.html#key436">source</a></b> and <b class="cmd">load</b>). Other errors cause
  processing of the <i class="arg">text</i> to stop, in which case only those
  package declarations that had been encountered before the error
  will be included in the return value.</p>
<p>The <i class="arg">setup-script</i> argument can be used to customise the
  evaluation environment, if the code in <i class="arg">text</i> has some very
  special needs. The <i class="arg">setup-script</i> is evaluated in the local
  context of the <b class="cmd">packages_provided</b> procedure just before the
  <i class="arg">text</i> is processed. At that time, the name of the slave
  command for the safe interpreter that will do this processing is
  kept in the local variable <b class="variable">c</b>. To for example copy the
  contents of the <b class="variable">::env</b> array to the safe interpreter, one
  might use a <i class="arg">setup-script</i> of</p>
<pre class="doctools_example">  $c eval [list array set env [array get ::env]]</pre>
</dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Source processing commands</a></h2>
<p>Unlike the previous group of commands, which would use
<b class="cmd">docstrip::extract</b> to extract some code lines and then process
those further, the following commands operate on text consisting of
all types of lines.</p>
<dl class="doctools_definitions">
<dt><a name="9"><b class="cmd">docstrip::util::ddt2man</b> <i class="arg">text</i></a></dt>
<dd><p>The <b class="cmd">ddt2man</b> command reformats <i class="arg">text</i> from the general
  <b class="syscmd"><a href="docstrip.html">docstrip</a></b> format to <b class="package"><a href="../doctools/doctools.html">doctools</a></b> &quot;<b class="file">.man</b>&quot; format
  (Tcl Markup Language for Manpages). The different line types are
  treated as follows:</p>
<dl class="doctools_definitions">
  
<dt>comment and metacomment lines</dt>
<dd><p>The '%' and '%%' prefixes are removed, the rest of the text is
    kept as it is.</p></dd>
<dt>empty lines</dt>
<dd><p>These are kept as they are. (Effectively this means that they will
    count as comment lines after a comment line and as code lines
    after a code line.)</p></dd>
<dt>code lines</dt>
<dd><p><b class="cmd">example_begin</b> and <b class="cmd">example_end</b> commands are placed
    at the beginning and end of every block of consecutive code
    lines. Brackets in a code line are converted to <b class="cmd">lb</b> and
    <b class="cmd">rb</b> commands.</p></dd>
<dt>verbatim guards</dt>
<dd><p>These are processed as usual, so they do not show up in the
    result but every line in a verbatim block is treated as a code
    line.</p></dd>
<dt>other guards</dt>
<dd><p>These are treated as code lines, except that the actual guard is
    <b class="cmd">emph</b>asised.</p></dd>
</dl>
<p>At the time of writing, no project has employed <b class="package"><a href="../doctools/doctools.html">doctools</a></b>
  markup in master source files, so experience of what works well is
  not available. A source file could however look as follows</p>
<pre class="doctools_example">
% [manpage_begin gcd n 1.0]
% [keywords divisor]
% [keywords math]
% [moddesc {Greatest Common Divisor}]
% [require gcd [opt 1.0]]
% [description]
%
% [list_begin definitions]
% [call [cmd gcd] [arg a] [arg b]]
%   The [cmd gcd] procedure takes two arguments [arg a] and [arg b] which
%   must be integers and returns their greatest common divisor.
proc gcd {a b} {
%   The first step is to take the absolute values of the arguments.
%   This relieves us of having to worry about how signs will be treated
%   by the remainder operation.
   set a [expr {abs($a)}]
   set b [expr {abs($b)}]
%   The next line does all of Euclid's algorithm! We can make do
%   without a temporary variable, since $a is substituted before the
%   [lb]set a $b[rb] and thus continues to hold a reference to the
%   &quot;old&quot; value of [var a].
   while {$b&gt;0} { set b [expr { $a % [set a $b] }] }
%   In Tcl 8.3 we might want to use [cmd set] instead of [cmd return]
%   to get the slight advantage of byte-compilation.
%&lt;tcl83&gt;  set a
%&lt;!tcl83&gt;   return $a
}
% [list_end]
%
% [manpage_end]
</pre>
<p>If the above text is fed through <b class="cmd">docstrip::util::ddt2man</b> then
  the result will be a syntactically correct <b class="package"><a href="../doctools/doctools.html">doctools</a></b>
  manpage, even though its purpose is a bit different.</p>
<p>It is suggested that master source code files with <b class="package"><a href="../doctools/doctools.html">doctools</a></b>
  markup are given the suffix &quot;<b class="file">.ddt</b>&quot;, hence the &quot;ddt&quot; in
  <b class="cmd">ddt2man</b>.</p></dd>
<dt><a name="10"><b class="cmd">docstrip::util::guards</b> <i class="arg">subcmd</i> <i class="arg">text</i></a></dt>
<dd><p>The <b class="cmd">guards</b> command returns information (mostly of a
  statistical nature) about the ordinary docstrip guards that occur
  in the <i class="arg">text</i>. The <i class="arg">subcmd</i> selects what is returned.</p>
<dl class="doctools_definitions">
  
<dt><b class="method">counts</b></dt>
<dd><p>List the guard expression terminals with counts. The format of
    the return value is a dictionary which maps the terminal name to
    the number of occurencies of it in the file.</p></dd>
<dt><b class="method">exprcount</b></dt>
<dd><p>List the guard expressions with counts. The format of the return
    value is a dictionary which maps the expression to the number of
    occurencies of it in the file.</p></dd>
<dt><b class="method">exprerr</b></dt>
<dd><p>List the syntactically incorrect guard expressions (e.g.
    parentheses do not match, or a terminal is missing). The return
    value is a list, with the elements in no particular order.</p></dd>
<dt><b class="method">expressions</b></dt>
<dd><p>List the guard expressions. The return value is a list, with the
    elements in no particular order.</p></dd>
<dt><b class="method">exprmods</b></dt>
<dd><p>List the guard expressions with modifiers. The format of the return
    value is a dictionary where each index is a guard expression and
    each entry is a string with one character for every guard line that
    has this expression. The characters in the entry specify what
    modifier was used in that line: +, -, *, /, or (for guard without
    modifier:) space. This is the most primitive form of the
    information gathered by <b class="cmd">guards</b>.</p></dd>
<dt><b class="method">names</b></dt>
<dd><p>List the guard expression terminals. The return value is a list,
    with the elements in no particular order.</p></dd>
<dt><b class="method">rotten</b></dt>
<dd><p>List the malformed guard lines (this does not include lines where
    only the expression is malformed, though). The format of the return
    value is a dictionary which maps line numbers to their contents.</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">docstrip::util::patch</b> <i class="arg">source-var</i> <i class="arg">terminals</i> <i class="arg">fromtext</i> <i class="arg">diff</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command tries to apply a <b class="syscmd"><a href="../../../../index.html#key563">diff</a></b> file (for example a
  contributed patch) that was computed for a generated file to the
  <b class="syscmd"><a href="docstrip.html">docstrip</a></b> source. This can be useful if someone has
  edited a generated file, thus mistaking it for being the source.
  This command makes no presumptions which are specific for the case
  that the generated file is a Tcl script.</p>
<p><b class="cmd"><a href="../../../../index.html#key662">patch</a></b> requires that the source file to patch is kept as a
  list of lines in a variable, and the name of that variable in the
  calling context is what goes into the <i class="arg">source-var</i> argument.
  The <i class="arg">terminals</i> is the list of terminals used to extract the
  file that has been patched. The <i class="arg">diff</i> is the actual diff to
  apply (in a format as explained below) and the <i class="arg">fromtext</i> is
  the contents of the file which served as &quot;from&quot; when the diff was
  computed. Options can be used to further control the process.</p>
<p>The process works by &quot;lifting&quot; the hunks in the <i class="arg">diff</i> from
  generated to source file, and then applying them to the elements of
  the <i class="arg">source-var</i>. In order to do this lifting, it is necessary
  to determine how lines in the <i class="arg">fromtext</i> correspond to elements
  of the <i class="arg">source-var</i>, and that is where the <i class="arg">terminals</i> come
  in; the source is first <b class="cmd">extract</b>ed under the given
  <i class="arg">terminals</i>, and the result of that is then matched against
  the <i class="arg">fromtext</i>. This produces a map which translates line
  numbers stated in the <i class="arg">diff</i> to element numbers in
  <i class="arg">source-var</i>, which is what is needed to lift the hunks.</p>
<p>The reason that both the <i class="arg">terminals</i> and the <i class="arg">fromtext</i>
  must be given is twofold. First, it is very difficult to keep track
  of how many lines of preamble are supplied some other way than by
  copying lines from source files. Second, a generated file might
  contain material from several source files. Both make it impossible
  to predict what line number an extracted file would have in the
  generated file, so instead the algorithm for computing the line
  number map looks for a block of lines in the <i class="arg">fromtext</i> which
  matches what can be extracted from the source. This matching is
  affected by the following options:</p>
<dl class="doctools_options">
  
<dt><b class="option">-matching</b> <i class="arg">mode</i></dt>
<dd><p>How equal must two lines be in order to match? The supported
    <i class="arg">mode</i>s are:</p>
<dl class="doctools_definitions">
    
<dt><b class="const">exact</b></dt>
<dd><p>Lines must be equal as strings. This is the default.</p></dd>
<dt><b class="const">anyspace</b></dt>
<dd><p>All sequences of whitespace characters are converted to single
      spaces before comparing.</p></dd>
<dt><b class="const">nonspace</b></dt>
<dd><p>Only non-whitespace characters are considered when comparing.</p></dd>
<dt><b class="const">none</b></dt>
<dd><p>Any two lines are considered to be equal.</p></dd>
</dl></dd>
<dt><b class="option">-metaprefix</b> <i class="arg">string</i></dt>
<dd><p>The <b class="option">-metaprefix</b> value to use when extracting. Defaults
    to &quot;%%&quot;, but for Tcl code it is more likely that &quot;#&quot; or &quot;##&quot; had
    been used for the generated file.</p></dd>
<dt><b class="option">-trimlines</b> <i class="arg">boolean</i></dt>
<dd><p>The <b class="option">-trimlines</b> value to use when extracting. Defaults to
    true.</p></dd>
</dl>
<p>The return value is in the form of a unified diff, containing only
  those hunks which were not applied or were only partially applied;
  a comment in the header of each hunk specifies which case is at
  hand. It is normally necessary to manually review both the return
  value from <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> and the patched text itself, as this command
  cannot adjust comment lines to match new content.</p>
<p>An example use would look like</p>
<pre class="doctools_example">
set sourceL [split [docstrip::util::thefile from.dtx] \n]
set terminals {foo bar baz}
set fromtext [docstrip::util::thefile from.tcl]
set difftext [exec diff --unified from.tcl to.tcl]
set leftover [docstrip::util::patch sourceL $terminals $fromtext\
  [docstrip::util::import_unidiff $difftext] -metaprefix {#}]
set F [open to.dtx w]; puts $F [join $sourceL \n]; close $F
return $leftover
</pre>
<p>Here, &quot;<b class="file">from.dtx</b>&quot; was used as source for &quot;<b class="file">from.tcl</b>&quot;, which
  someone modified into &quot;<b class="file">to.tcl</b>&quot;. We're trying to construct a
  &quot;<b class="file">to.dtx</b>&quot; which can be used as source for &quot;<b class="file">to.tcl</b>&quot;.</p></dd>
<dt><a name="12"><b class="cmd">docstrip::util::thefile</b> <i class="arg">filename</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>The <b class="cmd">thefile</b> command opens the file <i class="arg">filename</i>, reads it to
  end, closes it, and returns the contents (dropping a final newline
  if there is one). The option-value pairs are
  passed on to <b class="cmd">fconfigure</b> to configure the open file channel
  before anything is read from it.</p></dd>
<dt><a name="13"><b class="cmd">docstrip::util::import_unidiff</b> <i class="arg">diff-text</i> <span class="opt">?<i class="arg">warning-var</i>?</span></a></dt>
<dd><p>This command parses a unified (<b class="syscmd"><a href="../../../../index.html#key563">diff</a></b> flags <b class="option">-U</b> and
  <b class="option">--unified</b>) format diff into the list-of-hunks format
  expected by <b class="cmd">docstrip::util::patch</b>. The <i class="arg">diff-text</i>
  argument is the text to parse and the <i class="arg">warning-var</i> is, if
  specified, the name in the calling context of a variable to which
  any warnings about parsing problems will be <b class="cmd">append</b>ed.</p>
<p>The return value is a list of <i class="term">hunks</i>. Each hunk is a list of
  five elements &quot;<i class="arg">start1</i> <i class="arg">end1</i> <i class="arg">start2</i> <i class="arg">end2</i>
  <i class="arg">lines</i>&quot;. <i class="arg">start1</i> and <i class="arg">end1</i> are line numbers in the
  &quot;from&quot; file of the first and last respectively lines of the hunk.
  <i class="arg">start2</i> and <i class="arg">end2</i> are the corresponding line numbers in
  the &quot;to&quot; file. Line numbers start at 1. The <i class="arg">lines</i> is a list
  with two elements for each line in the hunk; the first specifies the
  type of a line and the second is the actual line contents. The type
  is <b class="const">-</b> for lines only in the &quot;from&quot; file, <b class="const">+</b> for lines
  that are only in the &quot;to&quot; file, and <b class="const">0</b> for lines that are
  in both.</p></dd>
</dl>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docstrip.html">docstrip</a>, <a href="../doctools/doctools.html">doctools</a>, doctools_fmt</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key666">.ddt</a>, <a href="../../../../index.html#key439">.dtx</a>, <a href="../../../../index.html#key438">LaTeX</a>, <a href="../../../../index.html#key663">Tcl module</a>, <a href="../../../../index.html#key665">catalogue</a>, <a href="../../../../index.html#key563">diff</a>, <a href="../../../../index.html#key435">docstrip</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key437">literate programming</a>, <a href="../../../../index.html#key667">module</a>, <a href="../../../../index.html#key664">package indexing</a>, <a href="../../../../index.html#key662">patch</a>, <a href="../../../../index.html#key436">source</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003–2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/changelog.html.

























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

<div class='fossil-doc' data-title='doctools::changelog - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::changelog(n) 1.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::changelog - Processing text in Emacs ChangeLog format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil</b></li>
<li>package require <b class="pkgname">doctools::changelog <span class="opt">?1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::changelog::scan</b> <i class="arg">text</i></a></li>
<li><a href="#2"><b class="cmd">::doctools::changelog::flatten</b> <i class="arg">entries</i></a></li>
<li><a href="#3"><b class="cmd">::doctools::changelog::toDoctools</b> <i class="arg">title</i> <i class="arg">module</i> <i class="arg">version</i> <i class="arg">entries</i></a></li>
<li><a href="#4"><b class="cmd">::doctools::changelog::merge</b> <i class="arg">entries</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides Tcl commands for the processing and reformatting
of text in the &quot;<b class="file">ChangeLog</b>&quot; format generated by <b class="syscmd"><a href="../../../../index.html#key449">emacs</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::changelog::scan</b> <i class="arg">text</i></a></dt>
<dd><p>The command takes the <i class="arg">text</i> and parses it under the assumption
that it contains a ChangeLog as generated by <b class="syscmd"><a href="../../../../index.html#key449">emacs</a></b>. It
returns a data structure describing the contents of this ChangeLog.</p>
<p>This data structure is a list where each element describes one entry
in the ChangeLog. Each element/entry is then a list of three elements
describing the date of the entry, its author, and the comments made,
in this order. The last item in each element/entry, the comments, is a
list of sections. Each section is described by a list containing two
elements, a list of file names, and a string containing the true
comment associated with the files of the section.</p>
<pre class="doctools_example">
    {
	{
	    date
	    author
	    {
		{
		    {file ...}
		    commenttext
		}
		...
	    }
	}
	{...}
    }
</pre>
</dd>
<dt><a name="2"><b class="cmd">::doctools::changelog::flatten</b> <i class="arg">entries</i></a></dt>
<dd><p>This command converts a list of entries as generated by
<b class="cmd">change::scan</b> above into a simpler list of plain
text blocks each containing all the information of a
single entry.</p></dd>
<dt><a name="3"><b class="cmd">::doctools::changelog::toDoctools</b> <i class="arg">title</i> <i class="arg">module</i> <i class="arg">version</i> <i class="arg">entries</i></a></dt>
<dd><p>This command converts the pre-parsed ChangeLog <i class="arg">entries</i> as
generated by the command <b class="cmd">::doctools::changelog::scan</b> into a
document in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format and returns it as the result of the
command.</p>
<p>The other three arguments supply the information for the header of
that document which is not available from the changelog itself.</p></dd>
<dt><a name="4"><b class="cmd">::doctools::changelog::merge</b> <i class="arg">entries</i>...</a></dt>
<dd><p>Each argument of the command is assumed to be a pre-parsed Changelog
as generated by the command <b class="cmd">::doctools::changelog::scan</b>. This
command merges all of them into a single structure, and collapses
multiple entries for the same date and author into a single entry. The
new structure is returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key448">changelog</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key449">emacs</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/cvs.html.





















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202

<div class='fossil-doc' data-title='doctools::cvs - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::cvs(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::cvs - Processing text in 'cvs log' format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil</b></li>
<li>package require <b class="pkgname">doctools::cvs <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::cvs::scanLog</b> <i class="arg">text</i> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></li>
<li><a href="#2"><b class="cmd">::doctools::cvs::toChangeLog</b> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides Tcl commands for the processing and reformatting
text in the format generated by the <b class="syscmd"><a href="../../../../index.html#key775">cvs log</a></b> command.</p>
<p>The commands <b class="cmd">::doctools::cvs::scanLog</b>
and <b class="cmd">::doctools::cvs::toChangeLog</b> are derived from code found on
the <a href="http://wiki.tcl.tk">Tcl'ers Wiki</a>. See the references at the
end of the page.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::cvs::scanLog</b> <i class="arg">text</i> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></dt>
<dd><p>The command takes the <i class="arg">text</i> and parses it under the assumption
that it contains a CVS log as generated by <b class="syscmd"><a href="../../../../index.html#key775">cvs log</a></b>. The
resulting information is stored in the variables whose names were
specified via <i class="arg">evar</i>, <i class="arg">cvar</i>, and <i class="arg">fvar</i>.</p>
<p>Already existing information in the referenced variables is preserved,
allowing the caller to merge data from multiple logs into one
database.</p>
<dl class="doctools_arguments">
<dt>varname <i class="arg">evar</i> (in)</dt>
<dd><p>Has to refer to a scalar variable. After the call this variable will
contain a list of all the entries found in the log file. An entry is
identified through the combination of date and author, and can be
split over multiple physical entries, one per touched file.</p>
<p>It should be noted that the entries are listed in the same order as
they were found in the <i class="arg">text</i>. This is not necessarily sorted by
date or author.</p>
<p>Each item in the list is a list containing two elements, the date of
the entry, and its author, in this order. The date is formatted as
<b class="variable">year</b>/<b class="variable">month</b>/<b class="variable">day</b>.</p></dd>
<dt>varname <i class="arg">cvar</i> (in)</dt>
<dd><p>Has to refer to an array variable. Keys are strings containing the
date and author of log entries, in this order, separated by a comma.</p>
<p>The values are lists of comments made for the entry.</p></dd>
<dt>varname <i class="arg">fvar</i> (in)</dt>
<dd><p>Has to refer to an array variable. Keys are strings containing
date, author of a log entry, and a comment for that entry, in this
order, separated by commas.</p>
<p>The values are lists of the files the entry is touching.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::doctools::cvs::toChangeLog</b> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></dt>
<dd><p>]
The three arguments for this command are the same as the last three
arguments of the command <b class="cmd">::doctools::cvs::scanLog</b>. This command
however expects them to be filled with information about one or more
logs. It takes this information and converts it into a text in the
format of a ChangeLog as accepted and generated by <b class="syscmd"><a href="../../../../index.html#key449">emacs</a></b>. The
constructed text is returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>[uri, http://wiki.tcl.tk/log2changelog</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key448">changelog</a>, <a href="../../../../index.html#key774">cvs</a>, <a href="../../../../index.html#key775">cvs log</a>, <a href="../../../../index.html#key449">emacs</a>, <a href="../../../../index.html#key73">log</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/docidx.html.















































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407

<div class='fossil-doc' data-title='doctools::idx - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx(n) 1.0.5 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx - docidx - Processing indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">PACKAGE COMMANDS</a></li>
<li class="doctools_subsection"><a href="#subsection2">OBJECT COMMAND</a></li>
<li class="doctools_subsection"><a href="#subsection3">OBJECT METHODS</a></li>
<li class="doctools_subsection"><a href="#subsection4">OBJECT CONFIGURATION</a></li>
<li class="doctools_subsection"><a href="#subsection5">FORMAT MAPPING</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">PREDEFINED ENGINES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools::idx <span class="opt">?1.0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::idx::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::idx::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">cget</b> <b class="option">-option</b></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">parameters</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">search</b> <i class="arg">path</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">warnings</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of objects able to
process and convert text written in the <i class="term"><a href="../../../../index.html#key178">docidx</a></i> markup language
into any output format X for which a <i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> is
available.</p>
<p>A reader interested in the markup language itself should start with
the <i class="term"><a href="docidx_lang_intro.html">docidx language introduction</a></i> and proceed from there to
the formal specifications, i.e. the <i class="term"><a href="docidx_lang_syntax.html">docidx language syntax</a></i>
and the <i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i>.</p>
<p>If on the other hand the reader wishes to write her own formatting
engine for some format, i.e. is a <i class="term">plugin writer</i> then reading
and understanding the <i class="term"><a href="docidx_plugin_apiref.html">docidx plugin API reference</a></i> is an
absolute necessity, as that document specifies the interaction between
this package and its plugins, i.e. the formatting engines, in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command creates a new docidx object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the object.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::idx::help</b></a></dt>
<dd><p>This is a convenience command for applications wishing to provide
their user with a short description of the available formatting
commands and their meanings. It returns a string containing a standard
help text.</p></dd>
<dt><a name="3"><b class="cmd">::doctools::idx::search</b> <i class="arg">path</i></a></dt>
<dd><p>Whenever an object created by this the package has to map the name of
a format to the file containing the code for its formatting engine it
will search for the file in a number of directories stored in a
list. See section <span class="sectref"><a href="#subsection5">FORMAT MAPPING</a></span> for more explanations.</p>
<p>This list not only contains three default directories which are
declared by the package itself, but is also extensible user of the
package.
This command is the means to do so. When given a <i class="arg">path</i> to an
existing and readable directory it will prepend that directory to the
list of directories to search. This means that the <i class="arg">path</i> added
last is later searched through first.</p>
<p>An error will be thrown if the <i class="arg">path</i> either does not exist, is
not a directory, or is not readable.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">OBJECT COMMAND</a></h3>
<p>All commands created by <b class="cmd">::doctools::idx::new</b> have the following
general form and may be used to invoke various operations on their
docidx converter object.</p>
<dl class="doctools_definitions">
<dt><a name="4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the exact
behavior of the command. See section <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span> for
the detailed specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OBJECT METHODS</a></h3>
<dl class="doctools_definitions">
<dt><a name="5"><i class="arg">objectName</i> <b class="method">configure</b></a></dt>
<dd><p>The method returns a list of all known options and their current
values when called without any arguments.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>The method behaves like the method <b class="method">cget</b> when called with a
single argument and returns the value of the option specified by said
argument.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>The method reconfigures the specified <b class="option">option</b>s of the object,
setting them to the associated <i class="arg">value</i>s, when called with an even
number of arguments, at least two.</p>
<p>The legal options are described in the section
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">cget</b> <b class="option">-option</b></a></dt>
<dd><p>This method expects a legal configuration option as argument and will
return the current value of that option for the object the method was
invoked for.</p>
<p>The legal configuration options are described in section
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the <i class="arg">text</i> through the configured formatting
engine and returns the generated string as its result. An error will
be thrown if no <b class="option">-format</b> was configured for the object.</p>
<p>The method assumes that the <i class="arg">text</i> is in <i class="term"><a href="../../../../index.html#key178">docidx</a></i> format as
specified in the companion document <i class="term">docidx_fmt</i>. Errors will be
thrown otherwise.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></dt>
<dd><p>This methods add one entry to the per-object mapping from
<i class="arg">symbolic</i> filenames to the <i class="arg">actual</i> uris.
The object just stores this mapping and makes it available to the
configured formatting engine through the command <b class="cmd">dt_fmap</b>.
This command is described in more detail in the
<i class="term"><a href="docidx_plugin_apiref.html">docidx plugin API reference</a></i> which specifies the interaction
between the objects created by this package and index formatting
engines.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">parameters</b></a></dt>
<dd><p>This method returns a list containing the names of all engine
parameters provided by the configured formatting engine. It will
return an empty list if the object is not yet configured for a
specific format.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">search</b> <i class="arg">path</i></a></dt>
<dd><p>This method extends the per-object list of paths searched for index
formatting engines. See also the command <b class="cmd">::doctools::idx::search</b>
on how to extend the per-package list of paths. Note that the path
entered last will be searched first.
For more details see section <span class="sectref"><a href="#subsection5">FORMAT MAPPING</a></span>.</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></dt>
<dd><p>This method sets the <i class="arg">name</i>d engine parameter to the specified
<i class="arg">value</i>.
It will throw an error if the object is either not yet configured for
a specific format, or if the formatting engine for the configured
format does not provide a parameter with the given <i class="arg">name</i>.
The list of parameters provided by the configured formatting engine
can be retrieved through the method <b class="method">parameters</b>.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">warnings</b></a></dt>
<dd><p>This method returns a list containing all the warnings which were
generated by the configured formatting engine during the last
invocation of the method <b class="method">format</b>.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">OBJECT CONFIGURATION</a></h3>
<p>All docidx objects understand the following configuration options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> <i class="arg">file</i></dt>
<dd><p>The argument of this option is stored in the object and made available
to the configured formatting engine through the command <b class="cmd">dt_file</b>.
This command is described in more detail in the companion document
<i class="term">docidx_api</i> which specifies the API between the object and
formatting engines.</p>
<p>The default value of this option is the empty string.</p>
<p>The configured formatting engine should interpret the value as the
name of the file containing the document which is currently processed.</p></dd>
<dt><b class="option">-format</b> <i class="arg">text</i></dt>
<dd><p>The argument of this option specifies the format to generate and by
implication the formatting engine to use when converting text via the
method <b class="method">format</b>. Its default value is the empty string. The
method <b class="method">format</b> cannot be used if this option is not set to a
valid value at least once.</p>
<p>The package will immediately try to map the given name to a file
containing the code for a formatting engine generating that format. An
error will be thrown if this mapping fails. In that case a previously
configured format is left untouched.</p>
<p>The section <span class="sectref"><a href="#subsection5">FORMAT MAPPING</a></span> explains in detail how the
package and object will look for engine implementations.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">FORMAT MAPPING</a></h3>
<p>The package and object will perform the following algorithm when
trying to map a format name <i class="term">foo</i> to a file containing an
implementation of a formatting engine for <i class="term">foo</i>:</p>
<ol class="doctools_enumerated">
<li><p>If <i class="term">foo</i> is the name of an existing file then this file is
directly taken as the implementation.</p></li>
<li><p>If not, the list of per-object search paths is searched. For each
directory in the list the package checks if that directory contains a
file &quot;<b class="file">idx.<i class="term">foo</i></b>&quot;. If yes, then that file is taken as the
implementation.</p>
<p>Note that this list of paths is initially empty and can be extended
through the object method <b class="method">search</b>.</p></li>
<li><p>If not, the list of package paths is searched.
For each directory in the list the package checks if that directory
contains a file &quot;<b class="file">idx.<i class="term">foo</i></b>&quot;. If yes, then that file is taken
as the implementation.</p>
<p>This list of paths can be extended
through the command <b class="cmd">::doctools::idx::search</b>.
It contains initially one path, the subdirectory &quot;<b class="file">mpformats</b>&quot; of
the directory the package itself is located in. In other words, if the
package implementation &quot;<b class="file">docidx.tcl</b>&quot; is installed in the directory
&quot;<b class="file">/usr/local/lib/tcllib/doctools</b>&quot; then it will by default search
the directory &quot;<b class="file">/usr/local/lib/tcllib/doctools/mpformats</b>&quot; for
format implementations.</p></li>
<li><p>The mapping fails.</p></li>
</ol>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PREDEFINED ENGINES</a></h2>
<p>The package provides predefined formatting engines for the following
formats. Some of the formatting engines support engine
parameters. These will be explicitly highlighted.</p>
<dl class="doctools_definitions">
<dt>html</dt>
<dd><p>This engine generates HTML markup, for processing by web browsers and
the like. This engine supports three parameters:</p>
<dl class="doctools_definitions">
<dt>footer</dt>
<dd><p>The value for this parameter has to be valid selfcontained HTML markup
for the body section of a HTML document. The default value is the
empty string. The value is inserted into the generated output just
before the <b class="const">&lt;/body&gt;</b> tag, closing the body of the generated
HTML.</p>
<p>This can be used to insert boilerplate footer markup into the
generated document.</p></dd>
<dt>header</dt>
<dd><p>The value for this parameter has to be valid selfcontained HTML markup
for the body section of a HTML document. The default value is the
empty string. The value is inserted into the generated output just
after the <b class="const">&lt;body&gt;</b> tag, starting the body of the generated HTML.</p>
<p>This can be used to insert boilerplate header markup into the
generated document.</p></dd>
<dt>meta</dt>
<dd><p>The value for this parameter has to be valid selfcontained HTML markup
for the header section of a HTML document. The default value is the
empty string. The value is inserted into the generated output just
after the <b class="const">&lt;head&gt;</b> tag, starting the header section of the
generated HTML.</p>
<p>This can be used to insert boilerplate meta data markup into the
generated document, like references to a stylesheet, standard meta
keywords, etc.</p></dd>
</dl></dd>
<dt>latex</dt>
<dd><p>This engine generates output suitable for the <b class="syscmd"><a href="../../../../index.html#key186">latex</a></b> text
processor coming out of the TeX world.</p></dd>
<dt>list</dt>
<dd><p>This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.</p></dd>
<dt>nroff</dt>
<dd><p>This engine generates nroff output, for processing by <b class="syscmd"><a href="../../../../index.html#key21">nroff</a></b>,
or <b class="syscmd">groff</b>. The result will be standard man pages as they are
known in the unix world.</p></dd>
<dt>null</dt>
<dd><p>This engine generates no outout at all. This can be used if one just
wants to validate some input.</p></dd>
<dt>tmml</dt>
<dd><p>This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.</p></dd>
<dt>wiki</dt>
<dd><p>This engine generates Wiki markup as understood by Jean Claude
Wippler's <b class="syscmd">wikit</b> application.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a>, <a href="docidx_plugin_apiref.html">docidx_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/docidx_intro.html.





























































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

<div class='fossil-doc' data-title='docidx_intro - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_intro - docidx introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RELATED FORMATS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key178">docidx</a></i> (short for <em>documentation tables of contents</em>)
stands for a set of related, yet different, entities which are working
together for the easy creation and transformation of keyword-based
indices for documentation. These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a keyword index.
Markup is represented by Tcl commands.</p></li>
<li><p>A package providing the ability to read and transform texts written in
that markup language. It is important to note that the actual
transformation of the input text is delegated to plugins.</p></li>
<li><p>An API describing the interface between the package above and a
plugin.</p></li>
</ol>
<p>Which of the more detailed documents are relevant to the reader of
this introduction depends on their role in the documentation process.</p>
<ol class="doctools_enumerated">
<li><p>A <i class="term">writer</i> of documentation has to understand the markup language
itself. A beginner to docidx should read the more informally written
<i class="term"><a href="docidx_lang_intro.html">docidx language introduction</a></i> first. Having digested this
the formal <i class="term"><a href="docidx_lang_syntax.html">docidx language syntax</a></i> specification should
become understandable. A writer experienced with docidx may only
need the <i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i> from time to
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of docidx when handling directories of documentation,
automatically generating a proper keyword index for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#key178">docidx</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose docidx to the
user.
At the bottom level, common to both applications, however sits the
package <b class="package">doctoools::idx</b>, providing the basic facilities to
read and process files containing text in the docidx format.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the <b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b> package and its
plugins, as described in the <i class="term"><a href="docidx_plugin_apiref.html">docidx plugin API reference</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RELATED FORMATS</a></h2>
<p>docidx does not stand alone, it has two companion formats. These are
called <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> and <i class="term"><a href="../../../../index.html#key179">doctools</a></i>, and they are for the markup
of <i class="term">tables of contents</i>, and general documentation,
respectively.
They are described in their own sets of documents, starting at the
<i class="term"><a href="doctoc_intro.html">doctoc introduction</a></i> and the <i class="term"><a href="doctools_intro.html">doctools introduction</a></i>,
respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a>, <a href="docidx_plugin_apiref.html">docidx_plugin_apiref</a>, <a href="doctoc_intro.html">doctoc_intro</a>, <a href="../doctools2idx/idx_container.html">doctools::idx</a>, <a href="doctools_intro.html">doctools_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/docidx_lang_cmdref.html.



























































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

<div class='fossil-doc' data-title='docidx_lang_cmdref - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_cmdref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_cmdref - docidx language command reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></li>
<li><a href="#2"><b class="cmd">include</b> <i class="arg">filename</i></a></li>
<li><a href="#3"><b class="cmd">index_begin</b> <i class="arg">text</i> <i class="arg">title</i></a></li>
<li><a href="#4"><b class="cmd">index_end</b></a></li>
<li><a href="#5"><b class="cmd">key</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd">lb</b></a></li>
<li><a href="#7"><b class="cmd"><a href="../../../../index.html#key17">manpage</a></b> <i class="arg">file</i> <i class="arg">text</i></a></li>
<li><a href="#8"><b class="cmd">rb</b></a></li>
<li><a href="#9"><b class="cmd"><a href="../../../../index.html#key246">url</a></b> <i class="arg">url</i> <i class="arg">label</i></a></li>
<li><a href="#10"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#11"><b class="cmd">vset</b> <i class="arg">varname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies both names and syntax of all the commands
which together are the docidx markup language, version 1.
As this document is intended to be a reference the commands are listed
in alphabetical order, and the descriptions are relatively short.
A beginner should read the much more informally written
<i class="term"><a href="docidx_lang_intro.html">docidx language introduction</a></i> first.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></dt>
<dd><p>Index markup. The argument text is marked up as a comment standing
outside of the actual text of the document. Main use is in free-form
text.</p></dd>
<dt><a name="2"><b class="cmd">include</b> <i class="arg">filename</i></a></dt>
<dd><p>Templating. The contents of the named file are interpreted as text
written in the docidx markup and processed in the place of the
include command. The markup in the file has to be self-contained. It
is not possible for a markup command to cross the file boundaries.</p></dd>
<dt><a name="3"><b class="cmd">index_begin</b> <i class="arg">text</i> <i class="arg">title</i></a></dt>
<dd><p>Document structure. The command to start an index. The arguments are a
label for the whole group of documents the index refers to
(<i class="arg">text</i>) and the overall title text for the index (<i class="arg">title</i>),
without markup.</p>
<p>The label often is the name of the package (or extension) the
documents belong to.</p></dd>
<dt><a name="4"><b class="cmd">index_end</b></a></dt>
<dd><p>Document structure. Command to end an index. Anything in the document
coming after this command is in error.</p></dd>
<dt><a name="5"><b class="cmd">key</b> <i class="arg">text</i></a></dt>
<dd><p>Index structure. This command adds the keyword <i class="arg">text</i> to the
index.</p></dd>
<dt><a name="6"><b class="cmd">lb</b></a></dt>
<dd><p>Text. The command is replaced with a left bracket. Use in free-form
text. Required to avoid interpretation of a left bracket as the start
of a markup command. Its usage is restricted to the arguments of other
markup commands.</p></dd>
<dt><a name="7"><b class="cmd"><a href="../../../../index.html#key17">manpage</a></b> <i class="arg">file</i> <i class="arg">text</i></a></dt>
<dd><p>Index structure. This command adds an element to the index which
refers to a document. The document is specified through the symbolic
name <i class="arg">file</i>. The <i class="arg">text</i> argument is used to label the
reference.</p>
<p>Symbolic names are used to preserve the convertibility of this format
to any output format. The actual name of the file will be inserted by
the chosen formatting engine when converting the input. This will be
based on a mapping from symbolic to actual names given to the engine.</p></dd>
<dt><a name="8"><b class="cmd">rb</b></a></dt>
<dd><p>Text. The command is replaced with a right bracket. Use in free-form
text. Required to avoid interpretation of a right bracket as the end
of a markup command. Its usage is restricted to the arguments of other
commands.</p></dd>
<dt><a name="9"><b class="cmd"><a href="../../../../index.html#key246">url</a></b> <i class="arg">url</i> <i class="arg">label</i></a></dt>
<dd><p>Index structure. This is the second command to add an element to the
index. To refer to a document it is not using a symbolic name however,
but a (possibly format-specific) url describing the exact location of
the document indexed here.</p></dd>
<dt><a name="10"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Templating. In this form the command sets the named document variable
to the specified <i class="arg">value</i>. It does not generate output. I.e. the
command is replaced by the empty string.</p></dd>
<dt><a name="11"><b class="cmd">vset</b> <i class="arg">varname</i></a></dt>
<dd><p>Templating. In this form the command is replaced by the value of the
named document variable</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key368">docidx commands</a>, <a href="../../../../index.html#key371">docidx language</a>, <a href="../../../../index.html#key249">docidx markup</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/docidx_lang_faq.html.





































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

<div class='fossil-doc' data-title='docidx_lang_faq - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_faq(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_faq - docidx language faq</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">What is this document?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Where do I find docidx examples?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">What is this document?</a></h3>
<p>This document is currently mainly a placeholder, to be filled with
commonly asked questions about the docidx markup language
and companions, and their answers.</p>
<p>Please report any questions (and, if possible, answers) we should
consider for this document as explained in the section
<span class="sectref"><a href="#section4">Bugs, Ideas, Feedback</a></span> below.</p>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Where do I find docidx examples?</a></h3>
<p>We have no direct examples of documents written using docidx
markup. However the doctools processor <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does generate
a table of contents when processing a set of documents written in
doctools markup. The intermediate file for it uses docidx
markup and is not deleted when generation completes. Such files can
therefore serve as examples.</p>
<p><b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> is distributed as part of Tcllib, so to get it you
need one of</p>
<ol class="doctools_enumerated">
<li><p>A snapshot of Tcllib. How to retrieve such a snapshot and the
tools required for this are described at
<a href="/wiki?name=Development+Snapshots">Development Snapshots</a></p></li>
<li><p>A Tcllib release archive. They are available at the <a href="/home">home</a>
page.</p></li>
</ol>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key368">docidx commands</a>, <a href="../../../../index.html#key371">docidx language</a>, <a href="../../../../index.html#key249">docidx markup</a>, <a href="../../../../index.html#key369">docidx syntax</a>, <a href="../../../../index.html#key370">examples</a>, <a href="../../../../index.html#key367">faq</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/docidx_lang_intro.html.

































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288

<div class='fossil-doc' data-title='docidx_lang_intro - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_intro - docidx language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Fundamentals</a></li>
<li class="doctools_subsection"><a href="#subsection2">Basic structure</a></li>
<li class="doctools_subsection"><a href="#subsection3">Advanced structure</a></li>
<li class="doctools_subsection"><a href="#subsection4">Escapes</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">FURTHER READING</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is an informal introduction to version 1 of the docidx
markup language based on a multitude of examples. After reading this a
writer should be ready to understand the two parts of the formal
specification, i.e. the <i class="term"><a href="docidx_lang_syntax.html">docidx language syntax</a></i> specification
and the <i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Fundamentals</a></h3>
<p>While the <i class="term">docidx markup language</i> is quite similar to the
<i class="term">doctools markup language</i>, in the broadest terms possible,
there is one key difference. An index consists essentially only of
markup commands, with no plain text interspersed between them, except
for whitespace.</p>
<p>Each markup command is a Tcl command surrounded by a matching pair of
<b class="const">[</b> and <b class="const">]</b>. Inside of these delimiters the usual
rules for a Tcl command apply with regard to word quotation, nested
commands, continuation lines, etc. I.e.</p>
<pre class="doctools_example">
    ... [key {markup language}] ...
</pre>
<pre class="doctools_example">
  ... [manpage thefile \\
          {file description}] ...
</pre>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basic structure</a></h3>
<p>The most simple document which can be written in docidx is</p>
<pre class="doctools_example">
    [index_begin GROUPTITLE TITLE]
    [index_end]
</pre>
<p>Not very useful, but valid. This also shows us that all docidx
documents consist of only one part where we will list all keys and
their references.</p>
<p>A more useful index will contain at least keywords, or short 'keys',
i.e. the phrases which were indexed. So:</p>
<pre class="doctools_example">
[index_begin GROUPTITLE TITLE]
[<b class="cmd">key markup</b>]
[<b class="cmd">key {semantic markup}]</b>]
[<b class="cmd">key {docidx markup}</b>]
[<b class="cmd">key {docidx language}</b>]
[<b class="cmd">key {docidx commands}</b>]
[index_end]
</pre>
<p>In the above example the command <b class="cmd">key</b> is used to declare the
keyword phrases we wish to be part of the index.</p>
<p>However a truly useful index does not only list the keyword phrases,
but will also contain references to documents associated with the
keywords. Here is a made-up index for all the manpages in the module
<i class="term"><a href="../../../../index.html#key587">base64</a></i>:</p>
<pre class="doctools_example">
[index_begin tcllib/base64 {De- &amp; Encoding}]
[key base64]
[<b class="cmd">manpage base64</b>]
[key encoding]
[<b class="cmd">manpage base64</b>]
[<b class="cmd">manpage uuencode</b>]
[<b class="cmd">manpage yencode</b>]
[key uuencode]
[<b class="cmd">manpage uuencode</b>]
[key yEnc]
[<b class="cmd">manpage yencode</b>]
[key ydecode]
[<b class="cmd">manpage yencode</b>]
[key yencode]
[<b class="cmd">manpage yencode</b>]
[index_end]
</pre>
<p>In the above example the command <b class="cmd"><a href="../../../../index.html#key17">manpage</a></b> is used to insert
references to documents, using symbolic file names, with each command
belonging to the last <b class="cmd">key</b> command coming before it.</p>
<p>The other command to insert references is <b class="cmd"><a href="../../../../index.html#key246">url</a></b>. In contrast to
<b class="cmd"><a href="../../../../index.html#key17">manpage</a></b> it uses explicit (possibly format-specific) urls to
describe the location of the referenced document. As such this command
is intended for the creation of references to external documents which
could not be handled in any other way.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Advanced structure</a></h3>
<p>In all previous examples we fudged a bit regarding the markup actually
allowed to be used before the <b class="cmd">index_begin</b> command opening the
document.</p>
<p>Instead of only whitespace the two templating commands <b class="cmd">include</b>
and <b class="cmd">vset</b> are also allowed, to enable the writer to either set
and/or import configuration settings relevant to the table of
contents. I.e. it is possible to write</p>
<pre class="doctools_example">
[<b class="cmd">include FILE</b>]
[<b class="cmd">vset VAR VALUE</b>]
[index_begin GROUPTITLE TITLE]
...
[index_end]
</pre>
<p>Even more important, these two commands are allowed anywhere where a
markup command is allowed, without regard for any other
structure.</p>
<pre class="doctools_example">
[index_begin GROUPTITLE TITLE]
[<b class="cmd">include FILE</b>]
[<b class="cmd">vset VAR VALUE</b>]
...
[index_end]
</pre>
<p>The only restriction <b class="cmd">include</b> has to obey is that the contents of
the included file must be valid at the place of the inclusion. I.e. a
file included before <b class="cmd">index_begin</b> may contain only the templating
commands <b class="cmd">vset</b> and <b class="cmd">include</b>, a file included after a key
may contain only manape or url references, and other keys, etc.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Escapes</a></h3>
<p>Beyond the 6 commands shown so far we have two more available.
However their function is not the marking up of index structure, but
the insertion of characters, namely <b class="const">[</b> and <b class="const">]</b>.
These commands, <b class="cmd">lb</b> and <b class="cmd">rb</b> respectively, are required
because our use of [ and ] to bracket markup commands makes it
impossible to directly use [ and ] within the text.</p>
<p>Our example of their use are the sources of the last sentence in the
previous paragraph, with some highlighting added.</p>
<pre class="doctools_example">
  ...
  These commands, [cmd lb] and [cmd lb] respectively, are required
  because our use of [<b class="cmd">lb</b>] and [<b class="cmd">rb</b>] to bracket markup commands makes it
  impossible to directly use [<b class="cmd">lb</b>] and [<b class="cmd">rb</b>] within the text.
  ...
</pre>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">FURTHER READING</a></h2>
<p>Now that this document has been digested the reader, assumed to be a
<i class="term">writer</i> of documentation should be fortified enough to be able
to understand the formal <i class="term"><a href="docidx_lang_syntax.html">docidx language syntax</a></i>
specification as well. From here on out the
<i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i> will also serve as the
detailed specification and cheat sheet for all available commands and
their syntax.</p>
<p>To be able to validate a document while writing it, it is also
recommended to familiarize oneself with Tclapps' ultra-configurable
<b class="syscmd">dtp</b>.</p>
<p>On the other hand, docidx is perfectly suited for the automatic
generation from doctools documents, and this is the route Tcllib's
easy and simple <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> goes, creating an index for a set of
documents behind the scenes, without the writer having to do so on
their own.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key368">docidx commands</a>, <a href="../../../../index.html#key371">docidx language</a>, <a href="../../../../index.html#key249">docidx markup</a>, <a href="../../../../index.html#key369">docidx syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/docidx_lang_syntax.html.

































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

<div class='fossil-doc' data-title='docidx_lang_syntax - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_syntax(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_syntax - docidx language syntax</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Fundamentals</a></li>
<li class="doctools_section"><a href="#section3">Lexical definitions</a></li>
<li class="doctools_section"><a href="#section4">Syntax</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document contains the formal specification of the syntax of the
docidx markup language, version 1 in Backus-Naur-Form. This document
is intended to be a reference, complementing the
<i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i>.
A beginner should read the much more informally written
<i class="term"><a href="docidx_lang_intro.html">docidx language introduction</a></i> first before trying to
understand either this document or the command reference.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Fundamentals</a></h2>
<p>In the broadest terms possible the <i class="term">docidx markup language</i> is
like SGML and similar languages. A document written in this language
consists primarily of markup commands, with text embedded into it at
some places.</p>
<p>Each markup command is a just Tcl command surrounded by a matching
pair of <b class="const">[</b> and <b class="const">]</b>. Which commands are available,
and their arguments, i.e. syntax is specified in the
<i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i>.</p>
<p>In this document we specify first the lexeme, and then the syntax,
i.e. how we can mix text and markup commands with each other.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Lexical definitions</a></h2>
<p>In the syntax rules listed in the next section</p>
<ol class="doctools_enumerated">
<li><p>&lt;TEXT&gt; stands for all text except markup commands.</p></li>
<li><p>Any XXX stands for the markup command [xxx] including its
arguments. Each markup command is a Tcl command surrounded by a
matching pair of <b class="const">[</b> and <b class="const">]</b>. Inside of these
delimiters the usual rules for a Tcl command apply with regard to word
quotation, nested commands, continuation lines, etc.</p></li>
<li><p>&lt;WHITE&gt; stands for all text consisting only of spaces, newlines,
tabulators and the <b class="cmd"><a href="../../../../index.html#key155">comment</a></b> markup command.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Syntax</a></h2>
<p>The rules listed here specify only the syntax of docidx documents. The
lexical level of the language was covered in the previous section.</p>
<p>Regarding the syntax of the (E)BNF itself</p>
<ol class="doctools_enumerated">
<li><p>The construct { X } stands for zero or more occurrences of X.</p></li>
<li><p>The construct [ X ] stands for zero or one occurrence of X.</p></li>
</ol>
<p>The syntax:</p>
<pre class="doctools_example">
index     = defs
            INDEX_BEGIN
            [ contents ]
            INDEX_END
            { &lt;WHITE&gt; }
defs      = { INCLUDE | VSET | &lt;WHITE&gt; }
contents  = keyword { keyword }
keyword   = defs KEY ref { ref }
ref       = MANPAGE | URL | defs
</pre>
<p>At last a rule we were unable to capture in the EBNF syntax, as it is
about the arguments of the markup commands, something which is not
modeled here.</p>
<ol class="doctools_enumerated">
<li><p>The arguments of all markup commands have to be plain text, and/or text
markup commands, i.e. one of</p>
<ol class="doctools_enumerated">
<li><p><b class="cmd">lb</b>,</p></li>
<li><p><b class="cmd">rb</b>, or</p></li>
<li><p><b class="cmd">vset</b> (1-argument form).</p></li>
</ol>
</li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key368">docidx commands</a>, <a href="../../../../index.html#key371">docidx language</a>, <a href="../../../../index.html#key249">docidx markup</a>, <a href="../../../../index.html#key369">docidx syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/docidx_plugin_apiref.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437

<div class='fossil-doc' data-title='docidx_plugin_apiref - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_plugin_apiref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_plugin_apiref - docidx plugin API reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a></li>
<li class="doctools_section"><a href="#section3">FRONTEND COMMANDS</a></li>
<li class="doctools_section"><a href="#section4">PLUGIN COMMANDS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Management commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Formatting commands</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">dt_fmap</b> <i class="arg">symfname</i></a></li>
<li><a href="#2"><b class="cmd">dt_format</b></a></li>
<li><a href="#3"><b class="cmd">dt_read</b> <i class="arg">file</i></a></li>
<li><a href="#4"><b class="cmd">dt_source</b> <i class="arg">file</i></a></li>
<li><a href="#5"><b class="cmd">ex_cappend</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd">ex_cget</b> <i class="arg">varname</i></a></li>
<li><a href="#7"><b class="cmd">ex_cis</b> <i class="arg">cname</i></a></li>
<li><a href="#8"><b class="cmd">ex_cname</b></a></li>
<li><a href="#9"><b class="cmd">ex_cpop</b> <i class="arg">cname</i></a></li>
<li><a href="#10"><b class="cmd">ex_cpush</b> <i class="arg">cname</i></a></li>
<li><a href="#11"><b class="cmd">ex_cset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#12"><b class="cmd">ex_lb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></li>
<li><a href="#13"><b class="cmd">ex_rb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></li>
<li><a href="#14"><b class="cmd">idx_initialize</b></a></li>
<li><a href="#15"><b class="cmd">idx_listvariables</b></a></li>
<li><a href="#16"><b class="cmd">idx_numpasses</b></a></li>
<li><a href="#17"><b class="cmd">idx_postprocess</b> <i class="arg">text</i></a></li>
<li><a href="#18"><b class="cmd">idx_setup</b> <i class="arg">n</i></a></li>
<li><a href="#19"><b class="cmd">idx_shutdown</b></a></li>
<li><a href="#20"><b class="cmd">idx_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is intended for <i class="term">plugin writers</i>, i.e. developers
wishing to write an index <i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> for some output
format X.</p>
<p>It specifies the interaction between the <b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b>
package and its plugins, i.e. the interface any index formatting
engine has to comply with.</p>
<p>This document deals with version 1 of the interface.</p>
<p>A reader who is on the other hand more interested in the markup
language itself should start with the
<i class="term"><a href="docidx_lang_intro.html">docidx language introduction</a></i> and proceed from there to the
formal specifications, i.e. the <i class="term"><a href="docidx_lang_syntax.html">docidx language syntax</a></i> and
the <i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<p>The API for an index formatting engine consists of two major sections.</p>
<p>On the one side we have a set of commands through which the plugin is
able to query the frontend. These commands are provided by the
frontend and linked into the plugin interpreter. Please see section
<span class="sectref"><a href="#section3">FRONTEND COMMANDS</a></span> for their detailed specification.</p>
<p>And on the other side the plugin has to provide its own set of
commands which will then be called by the frontend in a specific
sequence while processing input. They, again, fall into two
categories, management and formatting.
Please see section <span class="sectref"><a href="#section4">PLUGIN COMMANDS</a></span> and its subsections for
their detailed specification.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">FRONTEND COMMANDS</a></h2>
<p>This section specifies the set of commands through which a plugin,
also known as an index formatting engine, is able to query the
frontend. These commands are provided by the frontend and linked into
the plugin interpreter.</p>
<p>I.e. an index formatting engine can assume that all of the following
commands are present when any of its own commands (as specified in
section <span class="sectref"><a href="#section4">PLUGIN COMMANDS</a></span>) are executed.</p>
<p>Beyond that it can also assume that it has full access to its own safe
interpreter and thus is not able to damage the other parts of the
processor, nor can it damage the filesystem.
It is however able to either kill or hang the whole process, by
exiting, or running an infinite loop.</p>
<p>Coming back to the imported commands, all the commands with prefix
<em>dt_</em> provide limited access to specific parts of the frontend,
whereas the commands with prefix <em>ex_</em> provide access to the
state of the <b class="package"><a href="../textutil/expander.html">textutil::expander</a></b> object which does the main
parsing of the input within the frontend. These commands should not be
except under very special circumstances.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">dt_fmap</b> <i class="arg">symfname</i></a></dt>
<dd><p>Query command. It returns the actual pathname to use in the output in
place of the symbolic filename <i class="arg">symfname</i>. It will return the
unchanged input if no mapping was established for <i class="arg">symfname</i>.</p>
<p>The required mappings are established with the method <b class="method">map</b> of
a frontend, as explained in section <b class="sectref">OBJECT METHODS</b>
of the documentation for the package <b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b>.</p></dd>
<dt><a name="2"><b class="cmd">dt_format</b></a></dt>
<dd><p>Query command. It returns the name of the format associated with the
index formatting engine.</p></dd>
<dt><a name="3"><b class="cmd">dt_read</b> <i class="arg">file</i></a></dt>
<dd><p>Controlled filesystem access. Returns contents of <i class="arg">file</i> for
whatever use desired by the plugin.
Only files which are either in the same directory as the file
containing the engine, or below it, can be loaded. Trying to load a
file outside of this directory causes an error.</p></dd>
<dt><a name="4"><b class="cmd">dt_source</b> <i class="arg">file</i></a></dt>
<dd><p>Controlled filesystem access. This command allows the index formatting
engine to load additional Tcl code it may need.
Only files which are either in the same directory as the file
containing the engine, or below it, can be loaded. Trying to load a
file outside of this directory causes an error.</p></dd>
<dt><a name="5"><b class="cmd">ex_cappend</b> <i class="arg">text</i></a></dt>
<dd><p>Appends a string to the output in the current context.  This command
should rarely be used by macros or application code.</p></dd>
<dt><a name="6"><b class="cmd">ex_cget</b> <i class="arg">varname</i></a></dt>
<dd><p>Retrieves the value of variable <i class="arg">varname</i>, defined in the current
context.</p></dd>
<dt><a name="7"><b class="cmd">ex_cis</b> <i class="arg">cname</i></a></dt>
<dd><p>Determines whether or not the name of the current context is
<i class="arg">cname</i>.</p></dd>
<dt><a name="8"><b class="cmd">ex_cname</b></a></dt>
<dd><p>Returns the name of the current context.</p></dd>
<dt><a name="9"><b class="cmd">ex_cpop</b> <i class="arg">cname</i></a></dt>
<dd><p>Pops a context from the context stack, returning all accumulated
output in that context.  The context must be named <i class="arg">cname</i>, or an
error results.</p></dd>
<dt><a name="10"><b class="cmd">ex_cpush</b> <i class="arg">cname</i></a></dt>
<dd><p>Pushes a context named <i class="arg">cname</i> onto the context stack.  The
context must be popped by <b class="method">cpop</b> before expansion ends or an
error results.</p></dd>
<dt><a name="11"><b class="cmd">ex_cset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Sets variable <i class="arg">varname</i> to <i class="arg">value</i> in the current context.</p></dd>
<dt><a name="12"><b class="cmd">ex_lb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></dt>
<dd><p>Returns the current value of the left macro expansion bracket; this is
for use as or within a macro, when the bracket needs to be included in
the output text.  If <i class="arg">newbracket</i> is specified, it becomes the new
bracket, and is returned.</p></dd>
<dt><a name="13"><b class="cmd">ex_rb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></dt>
<dd><p>Returns the current value of the right macro expansion bracket; this
is for use as or within a macro, when the bracket needs to be included
in the output text.  If <i class="arg">newbracket</i> is specified, it becomes the
new bracket, and is returned.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PLUGIN COMMANDS</a></h2>
<p>The plugin has to provide its own set of commands which will then be
called by the frontend in a specific sequence while processing
input. They fall into two categories, management and formatting. Their
expected names, signatures, and responsibilities are specified in the
following two subsections.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Management commands</a></h3>
<p>The management commands a plugin has to provide are used by the
frontend to</p>
<ol class="doctools_enumerated">
<li><p>initialize and shutdown the plugin</p></li>
<li><p>determine the number of passes it has
       to make over the input</p></li>
<li><p>initialize and shutdown each pass</p></li>
<li><p>query and initialize engine parameters</p></li>
</ol>
<p>After the plugin has been loaded and the frontend commands are
established the commands will be called in the following sequence:</p>
<pre class="doctools_example">
    idx_numpasses -&gt; n
    idx_listvariables -&gt; vars
    idx_varset var1 value1
    idx_varset var2 value2
    ...
    idx_varset varK valueK
    idx_initialize
    idx_setup 1
    ...
    idx_setup 2
    ...
    ...
    idx_setup n
    ...
    idx_postprocess
    idx_shutdown
    ...
</pre>
<p>I.e. first the number of passes and the set of available engine
parameters is established, followed by calls setting the
parameters. That second part is optional.</p>
<p>After that the plugin is initialized, the specified number of passes
executed, the final result run through a global post processing step
and at last the plugin is shutdown again. This can be followed by more
conversions, restarting the sequence at <b class="cmd">idx_varset</b>.</p>
<p>In each of the passes, i.e. after the calls of <b class="cmd">idx_setup</b> the
frontend will process the input and call the formatting commands as
markup is encountered. This means that the sequence of formatting
commands is determined by the grammar of the docidx markup language,
as specified in the <i class="term"><a href="docidx_lang_syntax.html">docidx language syntax</a></i> specification.</p>
<p>A different way of looking at the sequence is:</p>
<ul class="doctools_itemized">
<li><p>First some basic parameters are determined.</p></li>
<li><p>Then everything starting at the first <b class="cmd">idx_varset</b> to
<b class="cmd">idx_shutdown</b> forms a <i class="term">run</i>, the formatting of a
single input. Each run can be followed by more.</p></li>
<li><p>Embedded within each run we have one or more <i class="term">passes</i>,
each starting with <b class="cmd">idx_setup</b> and going until either the next
<b class="cmd">idx_setup</b> or <b class="cmd">idx_postprocess</b> is reached.</p>
<p>If more than one pass is required to perform the formatting only the
output of the last pass is relevant. The output of all the previous,
preparatory passes is ignored.</p></li>
</ul>
<p>The commands, their names, signatures, and responsibilities are, in
detail:</p>
<dl class="doctools_definitions">
<dt><a name="14"><b class="cmd">idx_initialize</b></a></dt>
<dd><p><em>Initialization/Shutdown</em>.
This command is called at the beginning of every conversion run, as
the first command of that run. Note that a run is not a pass, but may
consist of multiple passes.
It has to initialize the general state of the plugin, beyond the
initialization done during the load. No return value is expected, and
any returned value is ignored.</p></dd>
<dt><a name="15"><b class="cmd">idx_listvariables</b></a></dt>
<dd><p><em>Initialization/Shutdown</em> and <em>Engine parameters</em>.
Second command is called after the plugin code has been loaded,
i.e. immediately after <b class="cmd">idx_numpasses</b>.
It has to return a list containing the names of the parameters the
frontend can set to configure the engine. This list can be empty.</p></dd>
<dt><a name="16"><b class="cmd">idx_numpasses</b></a></dt>
<dd><p><em>Initialization/Shutdown</em> and <em>Pass management</em>.
First command called after the plugin code has been loaded. No other
command of the engine will be called before it.
It has to return the number of passes this engine requires to fully
process the input document. This value has to be an integer number
greater or equal to one.</p></dd>
<dt><a name="17"><b class="cmd">idx_postprocess</b> <i class="arg">text</i></a></dt>
<dd><p><em>Initialization/Shutdown</em>.
This command is called immediately after the last pass in a run. Its
argument is the result of the conversion generated by that pass. It is
provided to allow the engine to perform any global modifications of
the generated document. If no post-processing is required for a
specific format the command has to just return the argument.</p>
<p>Expected to return a value, the final result of formatting the input.</p></dd>
<dt><a name="18"><b class="cmd">idx_setup</b> <i class="arg">n</i></a></dt>
<dd><p><em>Initialization/Shutdown</em> and <em>Pass management</em>.
This command is called at the beginning of each pass over the input in
a run. Its argument is the number of the pass which has begun. Passes
are counted from <b class="const">1</b> upward.
The command has to set up the internal state of the plugin for this
particular pass. No return value is expected, and any returned value
is ignored.</p></dd>
<dt><a name="19"><b class="cmd">idx_shutdown</b></a></dt>
<dd><p><em>Initialization/Shutdown</em>.
This command is called at the end of every conversion run. It is the
last command called in a run. It has to clean up of all the
run-specific state in the plugin.
After the call the engine has to be in a state which allows the
initiation of another run without fear that information from the last
run is leaked into this new run.
No return value is expected, and any returned value is ignored.</p></dd>
<dt><a name="20"><b class="cmd">idx_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></dt>
<dd><p><em>Engine parameters</em>.
This command is called by the frontend to set an engine parameter to a
particular value.
The parameter to change is specified by <i class="arg">varname</i>, the value to
set in <i class="arg">text</i>.</p>
<p>The command has to throw an error if an unknown <i class="arg">varname</i> is
used. Only the names returned by <b class="cmd">idx_listvariables</b> have to be
considered as known.</p>
<p>The values of all engine parameters have to persist between passes and
runs.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Formatting commands</a></h3>
<p>The formatting commands have to implement the formatting for the
output format, for all the markup commands of the docidx markup
language, except <b class="cmd">lb</b>, <b class="cmd">rb</b>, <b class="cmd">vset</b>, <b class="cmd">include</b>, and
<b class="cmd"><a href="../../../../index.html#key155">comment</a></b>. These exceptions are processed by the frontend and are
never seen by the plugin. In return a command for the formatting of
plain text has to be provided, something which has no markup in the
input at all.</p>
<p>This means, that each of the five markup commands specified in the
<i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i> and outside of the set of
exceptions listed above has an equivalent formatting command which
takes the same arguments as the markup command and whose name is the
name of markup command with the prefix <em>fmt_</em> added to it.</p>
<p>All commands are expected to format their input in some way per the
semantics specified in the command reference and to return whatever
part of this that they deem necessary as their result, which will be
added to the output.</p>
<p>To avoid essentially duplicating the command reference we do not list
any of the command here and simply refer the reader to the
<i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i> for their signature and
description. The sole exception is the plain text formatter, which has
no equivalent markup command.</p>
<p>The calling sequence of formatting commands is not as rigid as for the
management commands, but determined by the grammar of the docidx
markup language, as specified in the <i class="term"><a href="docidx_lang_syntax.html">docidx language syntax</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="21"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></dt>
<dd><p><em>No associated markup command</em>.</p>
<p>Called by the frontend for any plain text encountered in the
input. It has to perform any and all special processing required for
plain text.</p>
<p>The formatted text is expected as the result of the command,
and added to the output. If no special processing is required it has
to simply return its argument without change.</p></dd>
</dl>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a>, <a href="../doctools2idx/idx_container.html">doctools::idx</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key658">formatting engine</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key780">index formatter</a>, <a href="../../../../index.html#key779">keywords</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctoc.html.















































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407

<div class='fossil-doc' data-title='doctools::toc - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc(n) 1.1.4 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc - doctoc - Processing tables of contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">PACKAGE COMMANDS</a></li>
<li class="doctools_subsection"><a href="#subsection2">OBJECT COMMAND</a></li>
<li class="doctools_subsection"><a href="#subsection3">OBJECT METHODS</a></li>
<li class="doctools_subsection"><a href="#subsection4">OBJECT CONFIGURATION</a></li>
<li class="doctools_subsection"><a href="#subsection5">FORMAT MAPPING</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">PREDEFINED ENGINES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools::toc <span class="opt">?1.1.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::toc::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::toc::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">cget</b> <b class="option">-option</b></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">parameters</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">search</b> <i class="arg">path</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">warnings</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of objects able to
process and convert text written in the <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> markup language
into any output format X for which a <i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> is
available.</p>
<p>A reader interested in the markup language itself should start with
the <i class="term"><a href="doctoc_lang_intro.html">doctoc language introduction</a></i> and proceed from there to
the formal specifications, i.e. the <i class="term"><a href="doctoc_lang_syntax.html">doctoc language syntax</a></i>
and the <i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i>.</p>
<p>If on the other hand the reader wishes to write her own formatting
engine for some format, i.e. is a <i class="term">plugin writer</i> then reading
and understanding the <i class="term"><a href="doctoc_plugin_apiref.html">doctoc plugin API reference</a></i> is an
absolute necessity, as that document specifies the interaction between
this package and its plugins, i.e. the formatting engines, in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command creates a new doctoc object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the object.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::toc::help</b></a></dt>
<dd><p>This is a convenience command for applications wishing to provide
their user with a short description of the available formatting
commands and their meanings. It returns a string containing a standard
help text.</p></dd>
<dt><a name="3"><b class="cmd">::doctools::toc::search</b> <i class="arg">path</i></a></dt>
<dd><p>Whenever an object created by this the package has to map the name of
a format to the file containing the code for its formatting engine it
will search for the file in a number of directories stored in a
list. See section <span class="sectref"><a href="#subsection5">FORMAT MAPPING</a></span> for more explanations.</p>
<p>This list not only contains three default directories which are
declared by the package itself, but is also extensible user of the
package.
This command is the means to do so. When given a <i class="arg">path</i> to an
existing and readable directory it will prepend that directory to the
list of directories to search. This means that the <i class="arg">path</i> added
last is later searched through first.</p>
<p>An error will be thrown if the <i class="arg">path</i> either does not exist, is
not a directory, or is not readable.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">OBJECT COMMAND</a></h3>
<p>All commands created by <b class="cmd">::doctools::toc::new</b> have the following
general form and may be used to invoke various operations on their
doctoc converter object.</p>
<dl class="doctools_definitions">
<dt><a name="4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the exact
behavior of the command. See section <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span> for
the detailed specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OBJECT METHODS</a></h3>
<dl class="doctools_definitions">
<dt><a name="5"><i class="arg">objectName</i> <b class="method">configure</b></a></dt>
<dd><p>The method returns a list of all known options and their current
values when called without any arguments.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>The method behaves like the method <b class="method">cget</b> when called with a
single argument and returns the value of the option specified by said
argument.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>The method reconfigures the specified <b class="option">option</b>s of the object,
setting them to the associated <i class="arg">value</i>s, when called with an even
number of arguments, at least two.</p>
<p>The legal options are described in the section
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">cget</b> <b class="option">-option</b></a></dt>
<dd><p>This method expects a legal configuration option as argument and will
return the current value of that option for the object the method was
invoked for.</p>
<p>The legal configuration options are described in section
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the <i class="arg">text</i> through the configured formatting
engine and returns the generated string as its result. An error will
be thrown if no <b class="option">-format</b> was configured for the object.</p>
<p>The method assumes that the <i class="arg">text</i> is in <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> format as
specified in the companion document <i class="term">doctoc_fmt</i>. Errors will be
thrown otherwise.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></dt>
<dd><p>This methods add one entry to the per-object mapping from
<i class="arg">symbolic</i> filenames to the <i class="arg">actual</i> uris.
The object just stores this mapping and makes it available to the
configured formatting engine through the command <b class="cmd">dt_fmap</b>.
This command is described in more detail in the
<i class="term"><a href="doctoc_plugin_apiref.html">doctoc plugin API reference</a></i> which specifies the interaction
between the objects created by this package and toc formatting
engines.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">parameters</b></a></dt>
<dd><p>This method returns a list containing the names of all engine
parameters provided by the configured formatting engine. It will
return an empty list if the object is not yet configured for a
specific format.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">search</b> <i class="arg">path</i></a></dt>
<dd><p>This method extends the per-object list of paths searched for toc
formatting engines. See also the command <b class="cmd">::doctools::toc::search</b>
on how to extend the per-package list of paths. Note that the path
entered last will be searched first.
For more details see section <span class="sectref"><a href="#subsection5">FORMAT MAPPING</a></span>.</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></dt>
<dd><p>This method sets the <i class="arg">name</i>d engine parameter to the specified
<i class="arg">value</i>.
It will throw an error if the object is either not yet configured for
a specific format, or if the formatting engine for the configured
format does not provide a parameter with the given <i class="arg">name</i>.
The list of parameters provided by the configured formatting engine
can be retrieved through the method <b class="method">parameters</b>.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">warnings</b></a></dt>
<dd><p>This method returns a list containing all the warnings which were
generated by the configured formatting engine during the last
invocation of the method <b class="method">format</b>.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">OBJECT CONFIGURATION</a></h3>
<p>All doctoc objects understand the following configuration options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> <i class="arg">file</i></dt>
<dd><p>The argument of this option is stored in the object and made available
to the configured formatting engine through the command <b class="cmd">dt_file</b>.
This command is described in more detail in the companion document
<i class="term">doctoc_api</i> which specifies the API between the object and
formatting engines.</p>
<p>The default value of this option is the empty string.</p>
<p>The configured formatting engine should interpret the value as the
name of the file containing the document which is currently processed.</p></dd>
<dt><b class="option">-format</b> <i class="arg">text</i></dt>
<dd><p>The argument of this option specifies the format to generate and by
implication the formatting engine to use when converting text via the
method <b class="method">format</b>. Its default value is the empty string. The
method <b class="method">format</b> cannot be used if this option is not set to a
valid value at least once.</p>
<p>The package will immediately try to map the given name to a file
containing the code for a formatting engine generating that format. An
error will be thrown if this mapping fails. In that case a previously
configured format is left untouched.</p>
<p>The section <span class="sectref"><a href="#subsection5">FORMAT MAPPING</a></span> explains in detail how the
package and object will look for engine implementations.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">FORMAT MAPPING</a></h3>
<p>The package and object will perform the following algorithm when
trying to map a format name <i class="term">foo</i> to a file containing an
implementation of a formatting engine for <i class="term">foo</i>:</p>
<ol class="doctools_enumerated">
<li><p>If <i class="term">foo</i> is the name of an existing file then this file is
directly taken as the implementation.</p></li>
<li><p>If not, the list of per-object search paths is searched. For each
directory in the list the package checks if that directory contains a
file &quot;<b class="file">toc.<i class="term">foo</i></b>&quot;. If yes, then that file is taken as the
implementation.</p>
<p>Note that this list of paths is initially empty and can be extended
through the object method <b class="method">search</b>.</p></li>
<li><p>If not, the list of package paths is searched.
For each directory in the list the package checks if that directory
contains a file &quot;<b class="file">toc.<i class="term">foo</i></b>&quot;. If yes, then that file is taken
as the implementation.</p>
<p>This list of paths can be extended
through the command <b class="cmd">::doctools::toc::search</b>.
It contains initially one path, the subdirectory &quot;<b class="file">mpformats</b>&quot; of
the directory the package itself is located in. In other words, if the
package implementation &quot;<b class="file">doctoc.tcl</b>&quot; is installed in the directory
&quot;<b class="file">/usr/local/lib/tcllib/doctools</b>&quot; then it will by default search
the directory &quot;<b class="file">/usr/local/lib/tcllib/doctools/mpformats</b>&quot; for
format implementations.</p></li>
<li><p>The mapping fails.</p></li>
</ol>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PREDEFINED ENGINES</a></h2>
<p>The package provides predefined formatting engines for the following
formats. Some of the formatting engines support engine
parameters. These will be explicitly highlighted.</p>
<dl class="doctools_definitions">
<dt>html</dt>
<dd><p>This engine generates HTML markup, for processing by web browsers and
the like. This engine supports three parameters:</p>
<dl class="doctools_definitions">
<dt>footer</dt>
<dd><p>The value for this parameter has to be valid selfcontained HTML markup
for the body section of a HTML document. The default value is the
empty string. The value is inserted into the generated output just
before the <b class="const">&lt;/body&gt;</b> tag, closing the body of the generated
HTML.</p>
<p>This can be used to insert boilerplate footer markup into the
generated document.</p></dd>
<dt>header</dt>
<dd><p>The value for this parameter has to be valid selfcontained HTML markup
for the body section of a HTML document. The default value is the
empty string. The value is inserted into the generated output just
after the <b class="const">&lt;body&gt;</b> tag, starting the body of the generated HTML.</p>
<p>This can be used to insert boilerplate header markup into the
generated document.</p></dd>
<dt>meta</dt>
<dd><p>The value for this parameter has to be valid selfcontained HTML markup
for the header section of a HTML document. The default value is the
empty string. The value is inserted into the generated output just
after the <b class="const">&lt;head&gt;</b> tag, starting the header section of the
generated HTML.</p>
<p>This can be used to insert boilerplate meta data markup into the
generated document, like references to a stylesheet, standard meta
keywords, etc.</p></dd>
</dl></dd>
<dt>latex</dt>
<dd><p>This engine generates output suitable for the <b class="syscmd"><a href="../../../../index.html#key186">latex</a></b> text
processor coming out of the TeX world.</p></dd>
<dt>list</dt>
<dd><p>This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.</p></dd>
<dt>nroff</dt>
<dd><p>This engine generates nroff output, for processing by <b class="syscmd"><a href="../../../../index.html#key21">nroff</a></b>,
or <b class="syscmd">groff</b>. The result will be standard man pages as they are
known in the unix world.</p></dd>
<dt>null</dt>
<dd><p>This engine generates no outout at all. This can be used if one just
wants to validate some input.</p></dd>
<dt>tmml</dt>
<dd><p>This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.</p></dd>
<dt>wiki</dt>
<dd><p>This engine generates Wiki markup as understood by Jean Claude
Wippler's <b class="syscmd">wikit</b> application.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a>, <a href="doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctoc_intro.html.



























































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189

<div class='fossil-doc' data-title='doctoc_intro - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_intro - doctoc introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RELATED FORMATS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key258">doctoc</a></i> (short for <em>documentation tables of contents</em>)
stands for a set of related, yet different, entities which are working
together for the easy creation and transformation of tables of
contents for documentation. These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a table of
contents. Markup is represented by Tcl commands.</p></li>
<li><p>A package providing the ability to read and transform texts written in
that markup language. It is important to note that the actual
transformation of the input text is delegated to plugins.</p></li>
<li><p>An API describing the interface between the package above and a
plugin.</p></li>
</ol>
<p>Which of the more detailed documents are relevant to the reader of
this introduction depends on their role in the documentation process.</p>
<ol class="doctools_enumerated">
<li><p>A <i class="term">writer</i> of documentation has to understand the markup language
itself. A beginner to doctoc should read the more informally written
<i class="term"><a href="doctoc_lang_intro.html">doctoc language introduction</a></i> first. Having digested this
the formal <i class="term"><a href="doctoc_lang_syntax.html">doctoc language syntax</a></i> specification should
become understandable. A writer experienced with doctoc may only
need the <i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i> from time to
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of doctoc when handling directories of documentation,
automatically generating a proper table of contents for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose doctoc to the
user.
At the bottom level, common to both applications, however sits the
package <b class="package">doctoools::toc</b>, providing the basic facilities to
read and process files containing text in the doctoc format.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the <b class="package"><a href="doctoc.html">doctools::toc</a></b> package and its
plugins, as described in the <i class="term"><a href="doctoc_plugin_apiref.html">doctoc plugin API reference</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RELATED FORMATS</a></h2>
<p>doctoc does not stand alone, it has two companion formats. These are
called <i class="term"><a href="../../../../index.html#key178">docidx</a></i> and <i class="term"><a href="../../../../index.html#key179">doctools</a></i>, and they are for the markup
of <i class="term">keyword indices</i>, and general documentation, respectively.
They are described in their own sets of documents, starting at the
<i class="term"><a href="docidx_intro.html">docidx introduction</a></i> and the <i class="term"><a href="doctools_intro.html">doctools introduction</a></i>,
respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a>, <a href="doctoc_plugin_apiref.html">doctoc_plugin_apiref</a>, <a href="doctoc.html">doctools::toc</a>, <a href="doctools_intro.html">doctools_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctoc_lang_cmdref.html.





































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226

<div class='fossil-doc' data-title='doctoc_lang_cmdref - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_cmdref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_cmdref - doctoc language command reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></li>
<li><a href="#2"><b class="cmd">division_end</b></a></li>
<li><a href="#3"><b class="cmd">division_start</b> <i class="arg">text</i> <span class="opt">?<i class="arg">symfile</i>?</span></a></li>
<li><a href="#4"><b class="cmd">include</b> <i class="arg">filename</i></a></li>
<li><a href="#5"><b class="cmd">item</b> <i class="arg">file</i> <i class="arg">text</i> <i class="arg">desc</i></a></li>
<li><a href="#6"><b class="cmd">lb</b></a></li>
<li><a href="#7"><b class="cmd">rb</b></a></li>
<li><a href="#8"><b class="cmd">toc_begin</b> <i class="arg">text</i> <i class="arg">title</i></a></li>
<li><a href="#9"><b class="cmd">toc_end</b></a></li>
<li><a href="#10"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#11"><b class="cmd">vset</b> <i class="arg">varname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies both names and syntax of all the commands
which together are the doctoc markup language, version 1.
As this document is intended to be a reference the commands are listed
in alphabetical order, and the descriptions are relatively short.
A beginner should read the much more informally written
<i class="term"><a href="doctoc_lang_intro.html">doctoc language introduction</a></i> first.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></dt>
<dd><p>Toc markup. The argument text is marked up as a comment standing
outside of the actual text of the document. Main use is in free-form
text.</p></dd>
<dt><a name="2"><b class="cmd">division_end</b></a></dt>
<dd><p>Toc structure. This command closes the division opened by the last
<b class="cmd">division_begin</b> command coming before it, and not yet closed.</p></dd>
<dt><a name="3"><b class="cmd">division_start</b> <i class="arg">text</i> <span class="opt">?<i class="arg">symfile</i>?</span></a></dt>
<dd><p>Toc structure. This command opens a division in the table of
contents. Its counterpart is <b class="cmd">division_end</b>. Together they allow a
user to give a table of contents additional structure.</p>
<p>The title of the new division is provided by the argument <i class="arg">text</i>.</p>
<p>If the symbolic filename <i class="arg">symfile</i> is present then the section
title should link to the referenced document, if links are supported
by the output format.</p></dd>
<dt><a name="4"><b class="cmd">include</b> <i class="arg">filename</i></a></dt>
<dd><p>Templating. The contents of the named file are interpreted as text
written in the doctoc markup and processed in the place of the
include command. The markup in the file has to be self-contained. It
is not possible for a markup command to cross the file boundaries.</p></dd>
<dt><a name="5"><b class="cmd">item</b> <i class="arg">file</i> <i class="arg">text</i> <i class="arg">desc</i></a></dt>
<dd><p>Toc structure. This command adds an individual element to the table of
contents. Each such element refers to a document. The document is
specified through the symbolic name <i class="arg">file</i>. The <i class="arg">text</i>
argument is used to label the reference, whereas the <i class="arg">desc</i>
provides a short descriptive text of that document.</p>
<p>The symbolic names are used to preserve the convertibility of this
format to any output format. The actual name of the file will be
inserted by the chosen formatting engine when converting the
input. This will be based on a mapping from symbolic to actual names
given to the engine.</p></dd>
<dt><a name="6"><b class="cmd">lb</b></a></dt>
<dd><p>Text. The command is replaced with a left bracket. Use in free-form
text. Required to avoid interpretation of a left bracket as the start
of a markup command. Its usage is restricted to the arguments of other
markup commands.</p></dd>
<dt><a name="7"><b class="cmd">rb</b></a></dt>
<dd><p>Text. The command is replaced with a right bracket. Use in free-form
text. Required to avoid interpretation of a right bracket as the end
of a markup command. Its usage is restricted to the arguments of other
commands.</p></dd>
<dt><a name="8"><b class="cmd">toc_begin</b> <i class="arg">text</i> <i class="arg">title</i></a></dt>
<dd><p>Document structure. The command to start a table of contents. The
arguments are a label for the whole group of documents the index
refers to (<i class="arg">text</i>) and the overall title text for the index
(<i class="arg">title</i>), without markup.</p>
<p>The label often is the name of the package (or extension) the
documents belong to.</p></dd>
<dt><a name="9"><b class="cmd">toc_end</b></a></dt>
<dd><p>Document structure. Command to end a table of contents. Anything in
the document coming after this command is in error.</p></dd>
<dt><a name="10"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Templating. In this form the command sets the named document variable
to the specified <i class="arg">value</i>. It does not generate output. I.e. the
command is replaced by the empty string.</p></dd>
<dt><a name="11"><b class="cmd">vset</b> <i class="arg">varname</i></a></dt>
<dd><p>Templating. In this form the command is replaced by the value of the
named document variable</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key512">doctoc commands</a>, <a href="../../../../index.html#key511">doctoc language</a>, <a href="../../../../index.html#key387">doctoc markup</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctoc_lang_faq.html.





































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

<div class='fossil-doc' data-title='doctoc_lang_faq - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_faq(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_faq - doctoc language faq</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">What is this document?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Where do I find doctoc examples?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">What is this document?</a></h3>
<p>This document is currently mainly a placeholder, to be filled with
commonly asked questions about the doctoc markup language
and companions, and their answers.</p>
<p>Please report any questions (and, if possible, answers) we should
consider for this document as explained in the section
<span class="sectref"><a href="#section4">Bugs, Ideas, Feedback</a></span> below.</p>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Where do I find doctoc examples?</a></h3>
<p>We have no direct examples of documents written using doctoc
markup. However the doctools processor <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does generate
a table of contents when processing a set of documents written in
doctools markup. The intermediate file for it uses doctoc
markup and is not deleted when generation completes. Such files can
therefore serve as examples.</p>
<p><b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> is distributed as part of Tcllib, so to get it you
need one of</p>
<ol class="doctools_enumerated">
<li><p>A snapshot of Tcllib. How to retrieve such a snapshot and the
tools required for this are described at
<a href="/wiki?name=Development+Snapshots">Development Snapshots</a></p></li>
<li><p>A Tcllib release archive. They are available at the <a href="/home">home</a>
page.</p></li>
</ol>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key512">doctoc commands</a>, <a href="../../../../index.html#key511">doctoc language</a>, <a href="../../../../index.html#key387">doctoc markup</a>, <a href="../../../../index.html#key546">doctoc syntax</a>, <a href="../../../../index.html#key370">examples</a>, <a href="../../../../index.html#key367">faq</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctoc_lang_intro.html.



































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353

<div class='fossil-doc' data-title='doctoc_lang_intro - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_intro - doctoc language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Fundamentals</a></li>
<li class="doctools_subsection"><a href="#subsection2">Basic structure</a></li>
<li class="doctools_subsection"><a href="#subsection3">Items</a></li>
<li class="doctools_subsection"><a href="#subsection4">Divisions</a></li>
<li class="doctools_subsection"><a href="#subsection5">Advanced structure</a></li>
<li class="doctools_subsection"><a href="#subsection6">Escapes</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">FURTHER READING</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is an informal introduction to version 1.1 of the doctoc
markup language based on a multitude of examples. After reading this a
writer should be ready to understand the two parts of the formal
specification, i.e. the <i class="term"><a href="doctoc_lang_syntax.html">doctoc language syntax</a></i> specification
and the <i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Fundamentals</a></h3>
<p>While the <i class="term">doctoc markup language</i> is quite similar to the
<i class="term">doctools markup language</i>, in the broadest terms possible,
there is one key difference. A table of contents consists essentially
only of markup commands, with no plain text interspersed between them,
except for whitespace.</p>
<p>Each markup command is a Tcl command surrounded by a matching pair of
<b class="const">[</b> and <b class="const">]</b>. Inside of these delimiters the usual
rules for a Tcl command apply with regard to word quotation, nested
commands, continuation lines, etc. I.e.</p>
<pre class="doctools_example">
    ... [division_start {Appendix 1}] ...
</pre>
<pre class="doctools_example">
  ... [item thefile \\
          label {file description}] ...
</pre>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basic structure</a></h3>
<p>The most simple document which can be written in doctoc is</p>
<pre class="doctools_example">
    [toc_begin GROUPTITLE TITLE]
    [toc_end]
</pre>
<p>This also shows us that all doctoc documents consist of only one
part where we will list <i class="term">items</i> and <i class="term">divisions</i>.</p>
<p>The user is free to mix these as she sees fit. This is a change from
version 1 of the language, which did not allow this mixing, but only
the use of either a series of items or a series of divisions.</p>
<p>We will discuss the commands for each of these two possibilities in
the next sections.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Items</a></h3>
<p>Use the command <b class="cmd">item</b> to put an <i class="term">item</i> into a table of
contents. This is essentially a reference to a section, subsection,
etc. in the document, or set of documents, the table of contents is
for. The command takes three arguments, a symbolic name for the file
the item is for and two text to label the item and describe the
referenced section.</p>
<p>Symbolic names are used to preserve the convertibility of this format
to any output format. The actual name of any file will be inserted by
the chosen formatting engine when converting the input, based on a
mapping from symbolic to actual names given to the engine.</p>
<p>Here a made up example for a table of contents of this document:</p>
<pre class="doctools_example">
[toc_begin Doctoc {Language Introduction}]
[<b class="cmd">item 1 DESCRIPTION</b>]
[<b class="cmd">item 1.1 {Basic structure}</b>]
[<b class="cmd">item 1.2 Items</b>]
[<b class="cmd">item 1.3 Divisions</b>]
[<b class="cmd">item 2 {FURTHER READING}</b>]
[toc_end]
</pre>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Divisions</a></h3>
<p>One thing of notice in the last example in the previous section is
that the referenced sections actually had a nested structure,
something which was expressed in the item labels, by using a common
prefix for all the sections nested under section 1.</p>
<p>This kind of structure can be made more explicit in the doctoc
language by using divisions. Instead of using a series of plain items
we use a series of divisions for the major references, and then place
the nested items inside of these.</p>
<p>Of course, instead of the nested items we can again use divisions and
thus nest arbitrarily deep.</p>
<p>A division is marked by two commands instead of one, one to start it,
the other to close the last opened division. They are:</p>
<dl class="doctools_commands">
<dt><b class="cmd">division_start</b></dt>
<dd><p>This command opens a new division. It takes one or two arguments, the
title of the division, and the symbolic name of the file it refers
to. The latter is optional.
If the symbolic filename is present then the section title should link
to the referenced document, if links are supported by the output
format.</p></dd>
<dt><b class="cmd">division_end</b></dt>
<dd><p>This command closes the last opened and not yet closed division.</p></dd>
</dl>
<p>Using this we can recast the last example like this</p>
<pre class="doctools_example">
[toc_begin Doctoc {Language Introduction}]
[<b class="cmd">division_start DESCRIPTION</b>]
[item 1 {Basic structure}]
[item 2 Items]
[item 3 Divisions]
[<b class="cmd">division_end</b>]
[<b class="cmd">division_start {FURTHER READING}</b>]
[<b class="cmd">division_end</b>]
[toc_end]
</pre>
<p>Or, to demonstrate deeper nesting</p>
<pre class="doctools_example">
[toc_begin Doctoc {Language Introduction}]
[<b class="cmd">division_start DESCRIPTION</b>]
[<b class="cmd">division_start {Basic structure}</b>]
[item 1 Do]
[item 2 Re]
[<b class="cmd">division_end</b>]
[<b class="cmd">division_start Items</b>]
[item a Fi]
[item b Fo]
[item c Fa]
[<b class="cmd">division_end</b>]
[<b class="cmd">division_start Divisions</b>]
[item 1 Sub]
[item 1 Zero]
[<b class="cmd">division_end</b>]
[<b class="cmd">division_end</b>]
[<b class="cmd">division_start {FURTHER READING}</b>]
[<b class="cmd">division_end</b>]
[toc_end]
</pre>
<p>And do not forget, it is possible to freely mix items and divisions,
and to have empty divisions.</p>
<pre class="doctools_example">
[toc_begin Doctoc {Language Introduction}]
[item 1 Do]
[<b class="cmd">division_start DESCRIPTION</b>]
[<b class="cmd">division_start {Basic structure}</b>]
[item 2 Re]
[<b class="cmd">division_end</b>]
[item a Fi]
[<b class="cmd">division_start Items</b>]
[item b Fo]
[item c Fa]
[<b class="cmd">division_end</b>]
[<b class="cmd">division_start Divisions</b>]
[<b class="cmd">division_end</b>]
[<b class="cmd">division_end</b>]
[<b class="cmd">division_start {FURTHER READING}</b>]
[<b class="cmd">division_end</b>]
[toc_end]
</pre>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Advanced structure</a></h3>
<p>In all previous examples we fudged a bit regarding the markup actually
allowed to be used before the <b class="cmd">toc_begin</b> command opening the
document.</p>
<p>Instead of only whitespace the two templating commands <b class="cmd">include</b>
and <b class="cmd">vset</b> are also allowed, to enable the writer to either set
and/or import configuration settings relevant to the table of
contents. I.e. it is possible to write</p>
<pre class="doctools_example">
[<b class="cmd">include FILE</b>]
[<b class="cmd">vset VAR VALUE</b>]
[toc_begin GROUPTITLE TITLE]
...
[toc_end]
</pre>
<p>Even more important, these two commands are allowed anywhere where a
markup command is allowed, without regard for any other
structure.</p>
<pre class="doctools_example">
[toc_begin GROUPTITLE TITLE]
[<b class="cmd">include FILE</b>]
[<b class="cmd">vset VAR VALUE</b>]
...
[toc_end]
</pre>
<p>The only restriction <b class="cmd">include</b> has to obey is that the contents of
the included file must be valid at the place of the inclusion. I.e. a
file included before <b class="cmd">toc_begin</b> may contain only the templating
commands <b class="cmd">vset</b> and <b class="cmd">include</b>, a file included in a division
may contain only items or divisions commands, etc.</p>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Escapes</a></h3>
<p>Beyond the 6 commands shown so far we have two more available.
However their function is not the marking up of toc structure, but the
insertion of characters, namely <b class="const">[</b> and <b class="const">]</b>.
These commands, <b class="cmd">lb</b> and <b class="cmd">rb</b> respectively, are required
because our use of [ and ] to bracket markup commands makes it
impossible to directly use [ and ] within the text.</p>
<p>Our example of their use are the sources of the last sentence in the
previous paragraph, with some highlighting added.</p>
<pre class="doctools_example">
  ...
  These commands, [cmd lb] and [cmd lb] respectively, are required
  because our use of [<b class="cmd">lb</b>] and [<b class="cmd">rb</b>] to bracket markup commands makes it
  impossible to directly use [<b class="cmd">lb</b>] and [<b class="cmd">rb</b>] within the text.
  ...
</pre>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">FURTHER READING</a></h2>
<p>Now that this document has been digested the reader, assumed to be a
<i class="term">writer</i> of documentation should be fortified enough to be able
to understand the formal <i class="term"><a href="doctoc_lang_syntax.html">doctoc language syntax</a></i>
specification as well. From here on out the
<i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i> will also serve as the
detailed specification and cheat sheet for all available commands and
their syntax.</p>
<p>To be able to validate a document while writing it, it is also
recommended to familiarize oneself with Tclapps' ultra-configurable
<b class="syscmd">dtp</b>.</p>
<p>On the other hand, doctoc is perfectly suited for the automatic
generation from doctools documents, and this is the route Tcllib's
easy and simple <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> goes, creating a table of contents
for a set of documents behind the scenes, without the writer having to
do so on their own.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key512">doctoc commands</a>, <a href="../../../../index.html#key511">doctoc language</a>, <a href="../../../../index.html#key387">doctoc markup</a>, <a href="../../../../index.html#key546">doctoc syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctoc_lang_syntax.html.











































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

<div class='fossil-doc' data-title='doctoc_lang_syntax - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_syntax(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_syntax - doctoc language syntax</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Fundamentals</a></li>
<li class="doctools_section"><a href="#section3">Lexical definitions</a></li>
<li class="doctools_section"><a href="#section4">Syntax</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document contains the formal specification of the syntax of the
doctoc markup language, version 1.1 in Backus-Naur-Form. This document
is intended to be a reference, complementing the
<i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i>.
A beginner should read the much more informally written
<i class="term"><a href="doctoc_lang_intro.html">doctoc language introduction</a></i> first before trying to
understand either this document or the command reference.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Fundamentals</a></h2>
<p>In the broadest terms possible the <i class="term">doctoc markup language</i> is
like SGML and similar languages. A document written in this language
consists primarily of markup commands, with text embedded into it at
some places.</p>
<p>Each markup command is a just Tcl command surrounded by a matching
pair of <b class="const">[</b> and <b class="const">]</b>. Which commands are available,
and their arguments, i.e. syntax is specified in the
<i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i>.</p>
<p>In this document we specify first the lexeme, and then the syntax,
i.e. how we can mix text and markup commands with each other.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Lexical definitions</a></h2>
<p>In the syntax rules listed in the next section</p>
<ol class="doctools_enumerated">
<li><p>&lt;TEXT&gt; stands for all text except markup commands.</p></li>
<li><p>Any XXX stands for the markup command [xxx] including its
arguments. Each markup command is a Tcl command surrounded by a
matching pair of <b class="const">[</b> and <b class="const">]</b>. Inside of these
delimiters the usual rules for a Tcl command apply with regard to word
quotation, nested commands, continuation lines, etc.</p></li>
<li><p>&lt;WHITE&gt; stands for all text consisting only of spaces, newlines,
tabulators and the <b class="cmd"><a href="../../../../index.html#key155">comment</a></b> markup command.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Syntax</a></h2>
<p>The rules listed here specify only the syntax of doctoc documents. The
lexical level of the language was covered in the previous section.</p>
<p>Regarding the syntax of the (E)BNF itself</p>
<ol class="doctools_enumerated">
<li><p>The construct { X } stands for zero or more occurrences of X.</p></li>
<li><p>The construct [ X ] stands for zero or one occurrence of X.</p></li>
</ol>
<p>The syntax:</p>
<pre class="doctools_example">
toc       = defs
            TOC_BEGIN
            contents
            TOC_END
            { &lt;WHITE&gt; }
defs      = { INCLUDE | VSET | &lt;WHITE&gt; }
contents  = { defs entry } [ defs ]
entry     = ITEM | division
division  = DIVISION_START
            contents
            DIVISION_END
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key512">doctoc commands</a>, <a href="../../../../index.html#key511">doctoc language</a>, <a href="../../../../index.html#key387">doctoc markup</a>, <a href="../../../../index.html#key546">doctoc syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctoc_plugin_apiref.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437

<div class='fossil-doc' data-title='doctoc_plugin_apiref - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_plugin_apiref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_plugin_apiref - doctoc plugin API reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a></li>
<li class="doctools_section"><a href="#section3">FRONTEND COMMANDS</a></li>
<li class="doctools_section"><a href="#section4">PLUGIN COMMANDS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Management commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Formatting commands</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">dt_fmap</b> <i class="arg">symfname</i></a></li>
<li><a href="#2"><b class="cmd">dt_format</b></a></li>
<li><a href="#3"><b class="cmd">dt_read</b> <i class="arg">file</i></a></li>
<li><a href="#4"><b class="cmd">dt_source</b> <i class="arg">file</i></a></li>
<li><a href="#5"><b class="cmd">ex_cappend</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd">ex_cget</b> <i class="arg">varname</i></a></li>
<li><a href="#7"><b class="cmd">ex_cis</b> <i class="arg">cname</i></a></li>
<li><a href="#8"><b class="cmd">ex_cname</b></a></li>
<li><a href="#9"><b class="cmd">ex_cpop</b> <i class="arg">cname</i></a></li>
<li><a href="#10"><b class="cmd">ex_cpush</b> <i class="arg">cname</i></a></li>
<li><a href="#11"><b class="cmd">ex_cset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#12"><b class="cmd">ex_lb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></li>
<li><a href="#13"><b class="cmd">ex_rb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></li>
<li><a href="#14"><b class="cmd">toc_initialize</b></a></li>
<li><a href="#15"><b class="cmd">toc_listvariables</b></a></li>
<li><a href="#16"><b class="cmd">toc_numpasses</b></a></li>
<li><a href="#17"><b class="cmd">toc_postprocess</b> <i class="arg">text</i></a></li>
<li><a href="#18"><b class="cmd">toc_setup</b> <i class="arg">n</i></a></li>
<li><a href="#19"><b class="cmd">toc_shutdown</b></a></li>
<li><a href="#20"><b class="cmd">toc_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is intended for <i class="term">plugin writers</i>, i.e. developers
wishing to write a toc <i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> for some output
format X.</p>
<p>It specifies the interaction between the <b class="package"><a href="doctoc.html">doctools::toc</a></b>
package and its plugins, i.e. the interface any toc formatting engine
has to comply with.</p>
<p>This document deals with version 1 of the interface.</p>
<p>A reader who is on the other hand more interested in the markup
language itself should start with the
<i class="term"><a href="doctoc_lang_intro.html">doctoc language introduction</a></i> and proceed from there to the
formal specifications, i.e. the <i class="term"><a href="doctoc_lang_syntax.html">doctoc language syntax</a></i> and
the <i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<p>The API for a toc formatting engine consists of two major sections.</p>
<p>On the one side we have a set of commands through which the plugin is
able to query the frontend. These commands are provided by the
frontend and linked into the plugin interpreter. Please see section
<span class="sectref"><a href="#section3">FRONTEND COMMANDS</a></span> for their detailed specification.</p>
<p>And on the other side the plugin has to provide its own set of
commands which will then be called by the frontend in a specific
sequence while processing input. They, again, fall into two
categories, management and formatting.
Please see section <span class="sectref"><a href="#section4">PLUGIN COMMANDS</a></span> and its subsections for
their detailed specification.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">FRONTEND COMMANDS</a></h2>
<p>This section specifies the set of commands through which a plugin,
also known as a toc formatting engine, is able to query the
frontend. These commands are provided by the frontend and linked into
the plugin interpreter.</p>
<p>I.e. a toc formatting engine can assume that all of the following
commands are present when any of its own commands (as specified in
section <span class="sectref"><a href="#section4">PLUGIN COMMANDS</a></span>) are executed.</p>
<p>Beyond that it can also assume that it has full access to its own safe
interpreter and thus is not able to damage the other parts of the
processor, nor can it damage the filesystem.
It is however able to either kill or hang the whole process, by
exiting, or running an infinite loop.</p>
<p>Coming back to the imported commands, all the commands with prefix
<em>dt_</em> provide limited access to specific parts of the frontend,
whereas the commands with prefix <em>ex_</em> provide access to the
state of the <b class="package"><a href="../textutil/expander.html">textutil::expander</a></b> object which does the main
parsing of the input within the frontend. These commands should not be
except under very special circumstances.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">dt_fmap</b> <i class="arg">symfname</i></a></dt>
<dd><p>Query command. It returns the actual pathname to use in the output in
place of the symbolic filename <i class="arg">symfname</i>. It will return the
unchanged input if no mapping was established for <i class="arg">symfname</i>.</p>
<p>The required mappings are established with the method <b class="method">map</b> of
a frontend, as explained in section <b class="sectref">OBJECT METHODS</b>
of the documentation for the package <b class="package"><a href="doctoc.html">doctools::toc</a></b>.</p></dd>
<dt><a name="2"><b class="cmd">dt_format</b></a></dt>
<dd><p>Query command. It returns the name of the format associated with the
toc formatting engine.</p></dd>
<dt><a name="3"><b class="cmd">dt_read</b> <i class="arg">file</i></a></dt>
<dd><p>Controlled filesystem access. Returns contents of <i class="arg">file</i> for
whatever use desired by the plugin.
Only files which are either in the same directory as the file
containing the engine, or below it, can be loaded. Trying to load a
file outside of this directory causes an error.</p></dd>
<dt><a name="4"><b class="cmd">dt_source</b> <i class="arg">file</i></a></dt>
<dd><p>Controlled filesystem access. This command allows the toc formatting
engine to load additional Tcl code it may need.
Only files which are either in the same directory as the file
containing the engine, or below it, can be loaded. Trying to load a
file outside of this directory causes an error.</p></dd>
<dt><a name="5"><b class="cmd">ex_cappend</b> <i class="arg">text</i></a></dt>
<dd><p>Appends a string to the output in the current context.  This command
should rarely be used by macros or application code.</p></dd>
<dt><a name="6"><b class="cmd">ex_cget</b> <i class="arg">varname</i></a></dt>
<dd><p>Retrieves the value of variable <i class="arg">varname</i>, defined in the current
context.</p></dd>
<dt><a name="7"><b class="cmd">ex_cis</b> <i class="arg">cname</i></a></dt>
<dd><p>Determines whether or not the name of the current context is
<i class="arg">cname</i>.</p></dd>
<dt><a name="8"><b class="cmd">ex_cname</b></a></dt>
<dd><p>Returns the name of the current context.</p></dd>
<dt><a name="9"><b class="cmd">ex_cpop</b> <i class="arg">cname</i></a></dt>
<dd><p>Pops a context from the context stack, returning all accumulated
output in that context.  The context must be named <i class="arg">cname</i>, or an
error results.</p></dd>
<dt><a name="10"><b class="cmd">ex_cpush</b> <i class="arg">cname</i></a></dt>
<dd><p>Pushes a context named <i class="arg">cname</i> onto the context stack.  The
context must be popped by <b class="method">cpop</b> before expansion ends or an
error results.</p></dd>
<dt><a name="11"><b class="cmd">ex_cset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Sets variable <i class="arg">varname</i> to <i class="arg">value</i> in the current context.</p></dd>
<dt><a name="12"><b class="cmd">ex_lb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></dt>
<dd><p>Returns the current value of the left macro expansion bracket; this is
for use as or within a macro, when the bracket needs to be included in
the output text.  If <i class="arg">newbracket</i> is specified, it becomes the new
bracket, and is returned.</p></dd>
<dt><a name="13"><b class="cmd">ex_rb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></dt>
<dd><p>Returns the current value of the right macro expansion bracket; this
is for use as or within a macro, when the bracket needs to be included
in the output text.  If <i class="arg">newbracket</i> is specified, it becomes the
new bracket, and is returned.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PLUGIN COMMANDS</a></h2>
<p>The plugin has to provide its own set of commands which will then be
called by the frontend in a specific sequence while processing
input. They fall into two categories, management and formatting. Their
expected names, signatures, and responsibilities are specified in the
following two subsections.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Management commands</a></h3>
<p>The management commands a plugin has to provide are used by the
frontend to</p>
<ol class="doctools_enumerated">
<li><p>initialize and shutdown the plugin</p></li>
<li><p>determine the number of passes it has
       to make over the input</p></li>
<li><p>initialize and shutdown each pass</p></li>
<li><p>query and initialize engine parameters</p></li>
</ol>
<p>After the plugin has been loaded and the frontend commands are
established the commands will be called in the following sequence:</p>
<pre class="doctools_example">
    toc_numpasses -&gt; n
    toc_listvariables -&gt; vars
    toc_varset var1 value1
    toc_varset var2 value2
    ...
    toc_varset varK valueK
    toc_initialize
    toc_setup 1
    ...
    toc_setup 2
    ...
    ...
    toc_setup n
    ...
    toc_postprocess
    toc_shutdown
    ...
</pre>
<p>I.e. first the number of passes and the set of available engine
parameters is established, followed by calls setting the
parameters. That second part is optional.</p>
<p>After that the plugin is initialized, the specified number of passes
executed, the final result run through a global post processing step
and at last the plugin is shutdown again. This can be followed by more
conversions, restarting the sequence at <b class="cmd">toc_varset</b>.</p>
<p>In each of the passes, i.e. after the calls of <b class="cmd">toc_setup</b> the
frontend will process the input and call the formatting commands as
markup is encountered. This means that the sequence of formatting
commands is determined by the grammar of the doctoc markup language,
as specified in the <i class="term"><a href="doctoc_lang_syntax.html">doctoc language syntax</a></i> specification.</p>
<p>A different way of looking at the sequence is:</p>
<ul class="doctools_itemized">
<li><p>First some basic parameters are determined.</p></li>
<li><p>Then everything starting at the first <b class="cmd">toc_varset</b> to
<b class="cmd">toc_shutdown</b> forms a <i class="term">run</i>, the formatting of a
single input. Each run can be followed by more.</p></li>
<li><p>Embedded within each run we have one or more <i class="term">passes</i>,
each starting with <b class="cmd">toc_setup</b> and going until either the next
<b class="cmd">toc_setup</b> or <b class="cmd">toc_postprocess</b> is reached.</p>
<p>If more than one pass is required to perform the formatting only the
output of the last pass is relevant. The output of all the previous,
preparatory passes is ignored.</p></li>
</ul>
<p>The commands, their names, signatures, and responsibilities are, in
detail:</p>
<dl class="doctools_definitions">
<dt><a name="14"><b class="cmd">toc_initialize</b></a></dt>
<dd><p><em>Initialization/Shutdown</em>.
This command is called at the beginning of every conversion run, as
the first command of that run. Note that a run is not a pass, but may
consist of multiple passes.
It has to initialize the general state of the plugin, beyond the
initialization done during the load. No return value is expected, and
any returned value is ignored.</p></dd>
<dt><a name="15"><b class="cmd">toc_listvariables</b></a></dt>
<dd><p><em>Initialization/Shutdown</em> and <em>Engine parameters</em>.
Second command is called after the plugin code has been loaded,
i.e. immediately after <b class="cmd">toc_numpasses</b>.
It has to return a list containing the names of the parameters the
frontend can set to configure the engine. This list can be empty.</p></dd>
<dt><a name="16"><b class="cmd">toc_numpasses</b></a></dt>
<dd><p><em>Initialization/Shutdown</em> and <em>Pass management</em>.
First command called after the plugin code has been loaded. No other
command of the engine will be called before it.
It has to return the number of passes this engine requires to fully
process the input document. This value has to be an integer number
greater or equal to one.</p></dd>
<dt><a name="17"><b class="cmd">toc_postprocess</b> <i class="arg">text</i></a></dt>
<dd><p><em>Initialization/Shutdown</em>.
This command is called immediately after the last pass in a run. Its
argument is the result of the conversion generated by that pass. It is
provided to allow the engine to perform any global modifications of
the generated document. If no post-processing is required for a
specific format the command has to just return the argument.</p>
<p>Expected to return a value, the final result of formatting the input.</p></dd>
<dt><a name="18"><b class="cmd">toc_setup</b> <i class="arg">n</i></a></dt>
<dd><p><em>Initialization/Shutdown</em> and <em>Pass management</em>.
This command is called at the beginning of each pass over the input in
a run. Its argument is the number of the pass which has begun. Passes
are counted from <b class="const">1</b> upward.
The command has to set up the internal state of the plugin for this
particular pass. No return value is expected, and any returned value
is ignored.</p></dd>
<dt><a name="19"><b class="cmd">toc_shutdown</b></a></dt>
<dd><p><em>Initialization/Shutdown</em>.
This command is called at the end of every conversion run. It is the
last command called in a run. It has to clean up of all the
run-specific state in the plugin.
After the call the engine has to be in a state which allows the
initiation of another run without fear that information from the last
run is leaked into this new run.
No return value is expected, and any returned value is ignored.</p></dd>
<dt><a name="20"><b class="cmd">toc_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></dt>
<dd><p><em>Engine parameters</em>.
This command is called by the frontend to set an engine parameter to a
particular value.
The parameter to change is specified by <i class="arg">varname</i>, the value to
set in <i class="arg">text</i>.</p>
<p>The command has to throw an error if an unknown <i class="arg">varname</i> is
used. Only the names returned by <b class="cmd">toc_listvariables</b> have to be
considered as known.</p>
<p>The values of all engine parameters have to persist between passes and
runs.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Formatting commands</a></h3>
<p>The formatting commands have to implement the formatting for the
output format, for all the markup commands of the doctoc markup
language, except <b class="cmd">lb</b>, <b class="cmd">rb</b>, <b class="cmd">vset</b>, <b class="cmd">include</b>, and
<b class="cmd"><a href="../../../../index.html#key155">comment</a></b>. These exceptions are processed by the frontend and are
never seen by the plugin. In return a command for the formatting of
plain text has to be provided, something which has no markup in the
input at all.</p>
<p>This means, that each of the five markup commands specified in the
<i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i> and outside of the set of
exceptions listed above has an equivalent formatting command which
takes the same arguments as the markup command and whose name is the
name of markup command with the prefix <em>fmt_</em> added to it.</p>
<p>All commands are expected to format their input in some way per the
semantics specified in the command reference and to return whatever
part of this that they deem necessary as their result, which will be
added to the output.</p>
<p>To avoid essentially duplicating the command reference we do not list
any of the command here and simply refer the reader to the
<i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i> for their signature and
description. The sole exception is the plain text formatter, which has
no equivalent markup command.</p>
<p>The calling sequence of formatting commands is not as rigid as for the
management commands, but determined by the grammar of the doctoc
markup language, as specified in the <i class="term"><a href="doctoc_lang_syntax.html">doctoc language syntax</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="21"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></dt>
<dd><p><em>No associated markup command</em>.</p>
<p>Called by the frontend for any plain text encountered in the
input. It has to perform any and all special processing required for
plain text.</p>
<p>The formatted text is expected as the result of the command,
and added to the output. If no special processing is required it has
to simply return its argument without change.</p></dd>
</dl>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a>, <a href="doctoc.html">doctools::toc</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key658">formatting engine</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key136">semantic markup</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a>, <a href="../../../../index.html#key720">toc formatter</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctools.html.































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495

<div class='fossil-doc' data-title='doctools - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools(n) 1.4.19 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools - doctools - Processing documents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">PACKAGE COMMANDS</a></li>
<li class="doctools_subsection"><a href="#subsection2">OBJECT COMMAND</a></li>
<li class="doctools_subsection"><a href="#subsection3">OBJECT METHODS</a></li>
<li class="doctools_subsection"><a href="#subsection4">OBJECT CONFIGURATION</a></li>
<li class="doctools_subsection"><a href="#subsection5">FORMAT MAPPING</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">PREDEFINED ENGINES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools <span class="opt">?1.4.19?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::new</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">cget</b> <b class="option">-option</b></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">parameters</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">search</b> <i class="arg">path</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">warnings</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of objects able to
process and convert text written in the <i class="term"><a href="../../../../index.html#key179">doctools</a></i> markup
language into any output format X for which a
<i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> is available.</p>
<p>A reader interested in the markup language itself should start with
the <i class="term"><a href="doctools_lang_intro.html">doctools language introduction</a></i> and proceed from there to
the formal specifications, i.e. the <i class="term"><a href="doctools_lang_syntax.html">doctools language syntax</a></i>
and the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i>.</p>
<p>If on the other hand the reader wishes to write her own formatting
engine for some format, i.e. is a <i class="term">plugin writer</i> then reading
and understanding the <i class="term"><a href="doctools_plugin_apiref.html">doctools plugin API reference</a></i> is an
absolute necessity, as that document specifies the interaction between
this package and its plugins, i.e. the formatting engines, in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::new</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></dt>
<dd><p>This command creates a new doctools object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the object.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::help</b></a></dt>
<dd><p>This is a convenience command for applications wishing to provide
their user with a short description of the available formatting
commands and their meanings. It returns a string containing a standard
help text.</p></dd>
<dt><a name="3"><b class="cmd">::doctools::search</b> <i class="arg">path</i></a></dt>
<dd><p>Whenever an object created by this the package has to map the name of
a format to the file containing the code for its formatting engine it
will search for the file in a number of directories stored in a
list. See section <span class="sectref"><a href="#subsection5">FORMAT MAPPING</a></span> for more explanations.</p>
<p>This list not only contains three default directories which are
declared by the package itself, but is also extensible user of the
package.
This command is the means to do so. When given a <i class="arg">path</i> to an
existing and readable directory it will prepend that directory to the
list of directories to search. This means that the <i class="arg">path</i> added
last is later searched through first.</p>
<p>An error will be thrown if the <i class="arg">path</i> either does not exist, is
not a directory, or is not readable.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">OBJECT COMMAND</a></h3>
<p>All commands created by <b class="cmd">::doctools::new</b> have the following
general form and may be used to invoke various operations on their
doctools converter object.</p>
<dl class="doctools_definitions">
<dt><a name="4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the exact
behavior of the command. See section <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span> for
the detailed specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OBJECT METHODS</a></h3>
<dl class="doctools_definitions">
<dt><a name="5"><i class="arg">objectName</i> <b class="method">configure</b></a></dt>
<dd><p>The method returns a list of all known options and their current
values when called without any arguments.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>The method behaves like the method <b class="method">cget</b> when called with a
single argument and returns the value of the option specified by said
argument.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>The method reconfigures the specified <b class="option">option</b>s of the object,
setting them to the associated <i class="arg">value</i>s, when called with an even
number of arguments, at least two.</p>
<p>The legal options are described in the section
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">cget</b> <b class="option">-option</b></a></dt>
<dd><p>This method expects a legal configuration option as argument and will
return the current value of that option for the object the method was
invoked for.</p>
<p>The legal configuration options are described in section
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the <i class="arg">text</i> through the configured formatting
engine and returns the generated string as its result. An error will
be thrown if no <b class="option">-format</b> was configured for the object.</p>
<p>The method assumes that the <i class="arg">text</i> is in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format as
specified in the companion document <i class="term">doctools_fmt</i>. Errors will
be thrown otherwise.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></dt>
<dd><p>This methods add one entry to the per-object mapping from
<i class="arg">symbolic</i> filenames to the <i class="arg">actual</i> uris.
The object just stores this mapping and makes it available to the
configured formatting engine through the command <b class="cmd">dt_fmap</b>.
This command is described in more detail in the
<i class="term"><a href="doctools_plugin_apiref.html">doctools plugin API reference</a></i> which specifies the interaction
between the objects created by this package and doctools formatting
engines.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">parameters</b></a></dt>
<dd><p>This method returns a list containing the names of all engine
parameters provided by the configured formatting engine. It will
return an empty list if the object is not yet configured for a
specific format.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">search</b> <i class="arg">path</i></a></dt>
<dd><p>This method extends the per-object list of paths searched for doctools
formatting engines. See also the command <b class="cmd">::doctools::search</b> on
how to extend the per-package list of paths. Note that the path
entered last will be searched first.
For more details see section <span class="sectref"><a href="#subsection5">FORMAT MAPPING</a></span>.</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></dt>
<dd><p>This method sets the <i class="arg">name</i>d engine parameter to the specified
<i class="arg">value</i>.
It will throw an error if the object is either not yet configured for
a specific format, or if the formatting engine for the configured
format does not provide a parameter with the given <i class="arg">name</i>.
The list of parameters provided by the configured formatting engine
can be retrieved through the method <b class="method">parameters</b>.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">warnings</b></a></dt>
<dd><p>This method returns a list containing all the warnings which were
generated by the configured formatting engine during the last
invocation of the method <b class="method">format</b>.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">OBJECT CONFIGURATION</a></h3>
<p>All doctools objects understand the following configuration options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> <i class="arg">file</i></dt>
<dd><p>The argument of this option is stored in the object and made available
to the configured formatting engine through the commands <b class="cmd">dt_file</b>
and <b class="cmd">dt_mainfile</b>.
These commands are described in more detail in the companion document
<i class="term">doctools_api</i> which specifies the API between the object and
formatting engines.</p>
<p>The default value of this option is the empty string.</p>
<p>The configured formatting engine should interpret the value as the
name of the file containing the document which is currently processed.</p></dd>
<dt><b class="option">-ibase</b> <i class="arg">file</i></dt>
<dd><p>The argument of this option is stored in the object and used as the
base path for resolution of relative include paths. If this option is
not set (empty string) the value of <b class="option">-file</b> is used instead.</p>
<p>Note that <b class="option">-file</b> and <b class="option">-ibase</b>, while similar looking,
are actually very different. The value of <b class="option">-file</b> is used by
some engines for the generation of proper relative references between
output documents (HTML). As such this is a <i class="term">destination</i>
path. The <b class="option">-ibase</b> on the other hand is used to resolve
relative include paths, and as such deals with <i class="term"><a href="../../../../index.html#key436">source</a></i> paths.</p>
<p>The default value of this option is the empty string.</p></dd>
<dt><b class="option">-module</b> <i class="arg">text</i></dt>
<dd><p>The argument of this option is stored in the object and made available
to the configured formatting engine through the command <b class="cmd">dt_module</b>.
This command is described in more detail in the companion document
<i class="term">doctools_api</i> which specifies the API between the object and
formatting engines.</p>
<p>The default value of this option is the empty string.</p>
<p>The configured formatting engine should interpret the value as the
name of the module the file containing the document which is currently
processed belongs to.</p></dd>
<dt><b class="option">-format</b> <i class="arg">text</i></dt>
<dd><p>The argument of this option specifies the format to generate and by
implication the formatting engine to use when converting text via the
method <b class="method">format</b>. Its default value is the empty string. The
method <b class="method">format</b> cannot be used if this option is not set to a
valid value at least once.</p>
<p>The package will immediately try to map the given name to a file
containing the code for a formatting engine generating that format. An
error will be thrown if this mapping fails. In that case a previously
configured format is left untouched.</p>
<p>The section <span class="sectref"><a href="#subsection5">FORMAT MAPPING</a></span> explains in detail how the
package and object will look for engine implementations.</p></dd>
<dt><b class="option">-deprecated</b> <i class="arg">boolean</i></dt>
<dd><p>This option is a boolean flag. The object will generate warnings if
this flag is set and the text given to method <b class="method">format</b> contains
the deprecated markup command <b class="cmd">strong</b>.
Its default value is <b class="const">FALSE</b>. In other words, no warnings will
be generated.</p></dd>
<dt><b class="option">-copyright</b> <i class="arg">text</i></dt>
<dd><p>The argument of this option is stored in the object and made available
to the configured formatting engine through the command <b class="cmd">dt_copyright</b>.
This command is described in more detail in the companion document
<i class="term">doctools_api</i> which specifies the API between the object and
formatting engines.</p>
<p>The default value of this option is the empty string.</p>
<p>The configured formatting engine should interpret the value as a
copyright assignment for the document which is currently processed, or
the package described by it.</p>
<p>This information must be used if and only if the engine is unable to
find any copyright assignments within the document itself. Such are
specified by the formatting command <b class="cmd">copyright</b>. This command is
described in more detail in the companion document <i class="term">doctools_fmt</i>
which specifies the <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format itself.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">FORMAT MAPPING</a></h3>
<p>The package and object will perform the following algorithm when
trying to map a format name <i class="term">foo</i> to a file containing an
implementation of a formatting engine for <i class="term">foo</i>:</p>
<ol class="doctools_enumerated">
<li><p>If <i class="term">foo</i> is the name of an existing file then this file is
directly taken as the implementation.</p></li>
<li><p>If not, the list of per-object search paths is searched. For each
directory in the list the package checks if that directory contains a
file &quot;<b class="file">fmt.<i class="term">foo</i></b>&quot;. If yes, then that file is taken as the
implementation.</p>
<p>Note that this list of paths is initially empty and can be extended
through the object method <b class="method">search</b>.</p></li>
<li><p>If not, the list of package paths is searched.
For each directory in the list the package checks if that directory
contains a file &quot;<b class="file">fmt.<i class="term">foo</i></b>&quot;. If yes, then that file is taken
as the implementation.</p>
<p>This list of paths can be extended
through the command <b class="cmd">::doctools::search</b>.
It contains initially one path, the subdirectory &quot;<b class="file">mpformats</b>&quot; of
the directory the package itself is located in.
In other words, if the package implementation &quot;<b class="file">doctools.tcl</b>&quot; is
installed in the directory &quot;<b class="file">/usr/local/lib/tcllib/doctools</b>&quot; then
it will by default search the
directory &quot;<b class="file">/usr/local/lib/tcllib/doctools/mpformats</b>&quot; for format
implementations.</p></li>
<li><p>The mapping fails.</p></li>
</ol>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PREDEFINED ENGINES</a></h2>
<p>The package provides predefined engines for the following
formats. Some of the engines support parameters. These will be
explained below as well.</p>
<dl class="doctools_definitions">
<dt>html</dt>
<dd><p>This engine generates HTML markup, for processing by web browsers and
the like. This engine supports four parameters:</p>
<dl class="doctools_definitions">
<dt>footer</dt>
<dd><p>The value for this parameter has to be valid selfcontained HTML markup
for the body section of a HTML document. The default value is the
empty string. The value is inserted into the generated output just
before the <b class="const">&lt;/body&gt;</b> tag, closing the body of the generated
HTML.</p>
<p>This can be used to insert boilerplate footer markup into the
generated document.</p></dd>
<dt>header</dt>
<dd><p>The value for this parameter has to be valid selfcontained HTML markup
for the body section of a HTML document. The default value is the
empty string. The value is inserted into the generated output just
after the <b class="const">&lt;body&gt;</b> tag, starting the body of the generated HTML.</p>
<p>This can be used to insert boilerplate header markup into the
generated document.</p></dd>
<dt>meta</dt>
<dd><p>The value for this parameter has to be valid selfcontained HTML markup
for the header section of a HTML document. The default value is the
empty string. The value is inserted into the generated output just
after the <b class="const">&lt;head&gt;</b> tag, starting the header section of the
generated HTML.</p>
<p>This can be used to insert boilerplate meta data markup into the
generated document, like references to a stylesheet, standard meta
keywords, etc.</p></dd>
<dt>xref</dt>
<dd><p>The value for this parameter has to be a list of triples specifying
cross-reference information. This information is used by the engine to
create more hyperlinks. Each triple is a list containing a pattern,
symbolic filename and fragment reference, in this order. If a pattern
is specified multiple times the last occurence of the pattern will be
used.</p>
<p>The engine will consult the xref database when encountering specific
commands and will create a link if the relevant text matches one of
the patterns. No link will be created if no match was found. The link
will go to the uri <b class="const">file#fragment</b> listed in the relevant
triple, after conversion of the symbolic file name to the actual uri
via <b class="cmd">dt_fmap</b> (see the <i class="term"><a href="doctools_plugin_apiref.html">doctools plugin API reference</a></i>).
This file-to-uri mapping was build by calls to the method <b class="method">map</b>
of the doctools object (See section <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>).</p>
<p>The following formatting commands will consult the xref database:</p>
<dl class="doctools_definitions">
<dt><b class="cmd">cmd</b> <i class="arg">word</i></dt>
<dd><p>The command will look for the patterns <b class="const">sa,</b><i class="arg">word</i>, and
<i class="arg">word</i>, in this order. If this fails if it will convert <i class="arg">word</i>
to all lowercase and try again.</p></dd>
<dt><b class="cmd">syscmd</b> <i class="arg">word</i></dt>
<dd><p>The command will look for the patterns <b class="const">sa,</b><i class="arg">word</i>, and
<i class="arg">word</i>, in this order. If this fails if it will convert <i class="arg">word</i>
to all lowercase and try again.</p></dd>
<dt><b class="cmd"><a href="../term/term.html">term</a></b> <i class="arg">word</i></dt>
<dd><p>The command will look for the patterns <b class="const">kw,</b><i class="arg">word</i>,
<b class="const">sa,</b><i class="arg">word</i>, and <i class="arg">word</i>, in this order. If this fails if
it will convert <i class="arg">word</i> to all lowercase and try again.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key48">package</a></b> <i class="arg">word</i></dt>
<dd><p>The command will look for the patterns <b class="const">sa,</b><i class="arg">word</i>,
<b class="const">kw,</b><i class="arg">word</i>, and <i class="arg">word</i>, in this order. If this fails if
it will convert <i class="arg">word</i> to all lowercase and try again.</p></dd>
<dt><b class="cmd">see_also</b> <i class="arg">word</i>...</dt>
<dd><p>The command will look for the patterns <b class="const">sa,</b><i class="arg">word</i>, and
<i class="arg">word</i>, in this order, for each <i class="arg">word</i> given to the
command. If this fails if it will convert <i class="arg">word</i> to all lowercase
and try again.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key779">keywords</a></b> <i class="arg">word</i>...</dt>
<dd><p>The command will look for the patterns <b class="const">kw,</b><i class="arg">word</i>, and
<i class="arg">word</i>, in this order, for each <i class="arg">word</i> given to the
command. If this fails if it will convert <i class="arg">word</i> to all lowercase
and try again.</p></dd>
</dl></dd>
</dl></dd>
<dt>latex</dt>
<dd><p>This engine generates output suitable for the <b class="syscmd"><a href="../../../../index.html#key186">latex</a></b> text
processor coming out of the TeX world.</p></dd>
<dt>list</dt>
<dd><p>This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.</p></dd>
<dt>nroff</dt>
<dd><p>This engine generates nroff output, for processing by <b class="syscmd"><a href="../../../../index.html#key21">nroff</a></b>,
or <b class="syscmd">groff</b>. The result will be standard man pages as they are
known in the unix world.</p></dd>
<dt>null</dt>
<dd><p>This engine generates no outout at all. This can be used if one just
wants to validate some input.</p></dd>
<dt>tmml</dt>
<dd><p>This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.</p></dd>
<dt>wiki</dt>
<dd><p>This engine generates Wiki markup as understood by Jean Claude
Wippler's <b class="syscmd">wikit</b> application.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctools_intro.html.

























































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188

<div class='fossil-doc' data-title='doctools_intro - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_intro - doctools introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RELATED FORMATS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key179">doctools</a></i> (short for <em>documentation tools</em>) stands for
a set of related, yet different, entities which are working together
for the easy creation and transformation of documentation. These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of text. Markup is
represented by Tcl commands interspersed with the actual text.</p></li>
<li><p>A package providing the ability to read and transform texts written in
that markup language. It is important to note that the actual
transformation of the input text is delegated to plugins.</p></li>
<li><p>An API describing the interface between the package above and a
plugin.</p></li>
</ol>
<p>Which of the more detailed documents are relevant to the reader of
this introduction depends on their role in the documentation process.</p>
<ol class="doctools_enumerated">
<li><p>A <i class="term">writer</i> of documentation has to understand the markup language
itself. A beginner to doctools should read the more informally written
<i class="term"><a href="doctools_lang_intro.html">doctools language introduction</a></i> first. Having digested this
the formal <i class="term"><a href="doctools_lang_syntax.html">doctools language syntax</a></i> specification should
become understandable. A writer experienced with doctools may only
need the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i> from time to
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application can be
used to validate it, and after completion it also performs the
conversion into the chosen system of visual markup, be it *roff, HTML,
plain text, wiki, etc.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#key179">doctools</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application
provided by Tcllib. A more powerful one (in terms of options and
ability to configure it) is the <b class="syscmd">dtp</b> application, provided by
Tclapps.
At the bottom level, common to both applications, however sits the
package <b class="package"><a href="doctools.html">doctools</a></b>, providing the basic facilities to read and
process files containing text in the doctools format.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the <b class="package"><a href="doctools.html">doctools</a></b> package and its plugins, as
described in the <i class="term"><a href="doctools_plugin_apiref.html">doctools plugin API reference</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RELATED FORMATS</a></h2>
<p>doctools does not stand alone, it has two companion formats. These are
called <i class="term"><a href="../../../../index.html#key178">docidx</a></i> and <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>, and they are for the markup of
<i class="term">keyword indices</i>, and <i class="term">tables of contents</i>,
respectively.
They are described in their own sets of documents, starting at the
<i class="term"><a href="docidx_intro.html">docidx introduction</a></i> and the <i class="term"><a href="doctoc_intro.html">doctoc introduction</a></i>,
respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctools.html">doctools</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctools_lang_cmdref.html.

































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528

<div class='fossil-doc' data-title='doctools_lang_cmdref - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_cmdref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_cmdref - doctools language command reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">arg</b> <i class="arg">text</i></a></li>
<li><a href="#2"><b class="cmd">arg_def</b> <i class="arg">type</i> <i class="arg">name</i> <span class="opt">?<i class="arg">mode</i>?</span></a></li>
<li><a href="#3"><b class="cmd">bullet</b></a></li>
<li><a href="#4"><b class="cmd">call</b> <i class="arg">args</i></a></li>
<li><a href="#5"><b class="cmd">category</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd"><a href="../../../../index.html#key240">class</a></b> <i class="arg">text</i></a></li>
<li><a href="#7"><b class="cmd">cmd</b> <i class="arg">text</i></a></li>
<li><a href="#8"><b class="cmd">cmd_def</b> <i class="arg">command</i></a></li>
<li><a href="#9"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></li>
<li><a href="#10"><b class="cmd">const</b> <i class="arg">text</i></a></li>
<li><a href="#11"><b class="cmd">copyright</b> <i class="arg">text</i></a></li>
<li><a href="#12"><b class="cmd">def</b> <i class="arg">text</i></a></li>
<li><a href="#13"><b class="cmd">description</b></a></li>
<li><a href="#14"><b class="cmd">enum</b></a></li>
<li><a href="#15"><b class="cmd">emph</b> <i class="arg">text</i></a></li>
<li><a href="#16"><b class="cmd">example</b> <i class="arg">text</i></a></li>
<li><a href="#17"><b class="cmd">example_begin</b></a></li>
<li><a href="#18"><b class="cmd">example_end</b></a></li>
<li><a href="#19"><b class="cmd"><a href="../../../../index.html#key31">file</a></b> <i class="arg">text</i></a></li>
<li><a href="#20"><b class="cmd">fun</b> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd"><a href="../../../../index.html#key121">image</a></b> <i class="arg">name</i> <span class="opt">?<i class="arg">label</i>?</span></a></li>
<li><a href="#22"><b class="cmd">include</b> <i class="arg">filename</i></a></li>
<li><a href="#23"><b class="cmd">item</b></a></li>
<li><a href="#24"><b class="cmd"><a href="../../../../index.html#key779">keywords</a></b> <i class="arg">args</i></a></li>
<li><a href="#25"><b class="cmd">lb</b></a></li>
<li><a href="#26"><b class="cmd">list_begin</b> <i class="arg">what</i></a></li>
<li><a href="#27"><b class="cmd">list_end</b></a></li>
<li><a href="#28"><b class="cmd">lst_item</b> <i class="arg">text</i></a></li>
<li><a href="#29"><b class="cmd">manpage_begin</b> <i class="arg">command</i> <i class="arg">section</i> <i class="arg">version</i></a></li>
<li><a href="#30"><b class="cmd">manpage_end</b></a></li>
<li><a href="#31"><b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">text</i></a></li>
<li><a href="#32"><b class="cmd">moddesc</b> <i class="arg">text</i></a></li>
<li><a href="#33"><b class="cmd">namespace</b> <i class="arg">text</i></a></li>
<li><a href="#34"><b class="cmd">nl</b></a></li>
<li><a href="#35"><b class="cmd">opt</b> <i class="arg">text</i></a></li>
<li><a href="#36"><b class="cmd">opt_def</b> <i class="arg">name</i> <span class="opt">?<i class="arg">arg</i>?</span></a></li>
<li><a href="#37"><b class="cmd">option</b> <i class="arg">text</i></a></li>
<li><a href="#38"><b class="cmd"><a href="../../../../index.html#key48">package</a></b> <i class="arg">text</i></a></li>
<li><a href="#39"><b class="cmd">para</b></a></li>
<li><a href="#40"><b class="cmd">rb</b></a></li>
<li><a href="#41"><b class="cmd">require</b> <i class="arg">package</i> <span class="opt">?<i class="arg">version</i>?</span></a></li>
<li><a href="#42"><b class="cmd">section</b> <i class="arg">name</i></a></li>
<li><a href="#43"><b class="cmd">sectref</b> <i class="arg">id</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#44"><b class="cmd">sectref-external</b> <i class="arg">text</i></a></li>
<li><a href="#45"><b class="cmd">see_also</b> <i class="arg">args</i></a></li>
<li><a href="#46"><b class="cmd">strong</b> <i class="arg">text</i></a></li>
<li><a href="#47"><b class="cmd">subsection</b> <i class="arg">name</i></a></li>
<li><a href="#48"><b class="cmd">syscmd</b> <i class="arg">text</i></a></li>
<li><a href="#49"><b class="cmd"><a href="../term/term.html">term</a></b> <i class="arg">text</i></a></li>
<li><a href="#50"><b class="cmd">titledesc</b> <i class="arg">desc</i></a></li>
<li><a href="#51"><b class="cmd">tkoption_def</b> <i class="arg">name</i> <i class="arg">dbname</i> <i class="arg">dbclass</i></a></li>
<li><a href="#52"><b class="cmd"><a href="../../../../index.html#key117">type</a></b> <i class="arg">text</i></a></li>
<li><a href="#53"><b class="cmd"><a href="../uri/uri.html">uri</a></b> <i class="arg">text</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#54"><b class="cmd">usage</b> <i class="arg">args</i></a></li>
<li><a href="#55"><b class="cmd">var</b> <i class="arg">text</i></a></li>
<li><a href="#56"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#57"><b class="cmd">vset</b> <i class="arg">varname</i></a></li>
<li><a href="#58"><b class="cmd"><a href="../../../../index.html#key235">widget</a></b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies both names and syntax of all the commands
which together are the doctools markup language, version 1.
As this document is intended to be a reference the commands are listed
in alphabetical order, and the descriptions are relatively short.
A beginner should read the much more informally written
<i class="term"><a href="doctools_lang_intro.html">doctools language introduction</a></i> first.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">arg</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as the <i class="term">argument</i> of
a command. Main uses are the highlighting of command arguments in
free-form text, and for the argument parameters of the markup commands
<b class="cmd">call</b> and <b class="cmd">usage</b>.</p></dd>
<dt><a name="2"><b class="cmd">arg_def</b> <i class="arg">type</i> <i class="arg">name</i> <span class="opt">?<i class="arg">mode</i>?</span></a></dt>
<dd><p>Text structure. List element. Argument list. Automatically closes the
previous list element. Specifies the data-<i class="arg">type</i> of the described
argument of a command, its <i class="arg">name</i> and its i/o-<i class="arg">mode</i>. The
latter is optional.</p></dd>
<dt><a name="3"><b class="cmd">bullet</b></a></dt>
<dd><p><em>Deprecated</em>. Text structure. List element. Itemized list. See
<b class="cmd">item</b> for the canonical command to open a list item in an
itemized list.</p></dd>
<dt><a name="4"><b class="cmd">call</b> <i class="arg">args</i></a></dt>
<dd><p>Text structure. List element. Definition list. Automatically closes
the previous list element. Defines the term as a command and its
arguments.
The first argument is the name of the command described by the
following free-form text, and all arguments coming after that are
descriptions of the command's arguments.
It is expected that the arguments are marked up with <b class="cmd">arg</b>,
<b class="cmd"><a href="../../../../index.html#key372">method</a></b>, <b class="cmd">option</b> etc., as is appropriate, and that the
command itself is marked up with <b class="cmd">cmd</b>.
It is expected that the formatted term is not only printed in place,
but also in the table of contents of the document, or synopsis,
depending on the output format.</p></dd>
<dt><a name="5"><b class="cmd">category</b> <i class="arg">text</i></a></dt>
<dd><p>Document information. Anywhere. This command registers its plain text
arguments as the category this document belongs to. If this command is
used multiple times the last value specified is used.</p></dd>
<dt><a name="6"><b class="cmd"><a href="../../../../index.html#key240">class</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term"><a href="../../../../index.html#key240">class</a></i>. The text may have other markup already applied to
it. Main use is the highlighting of class names in free-form text.</p></dd>
<dt><a name="7"><b class="cmd">cmd</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as the name of a
<i class="term">Tcl command</i>. The text may have other markup already applied
to it. Main uses are the highlighting of commands in free-form text,
and for the command parameters of the markup commands <b class="cmd">call</b> and
<b class="cmd">usage</b>.</p></dd>
<dt><a name="8"><b class="cmd">cmd_def</b> <i class="arg">command</i></a></dt>
<dd><p>Text structure. List element. Command list. Automatically closes the
previous list element. The argument specifies the name of the
<i class="term">Tcl command</i> to be described by the list element. Expected to
be marked up in the output as if it had been formatted with <b class="cmd">cmd</b>.</p></dd>
<dt><a name="9"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></dt>
<dd><p>Text markup. The argument text is marked up as a comment standing
outside of the actual text of the document. Main use is in free-form
text.</p></dd>
<dt><a name="10"><b class="cmd">const</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as a <i class="term">constant</i> value. The
text may have other markup already applied to it. Main use is the
highlighting of constants in free-form text.</p></dd>
<dt><a name="11"><b class="cmd">copyright</b> <i class="arg">text</i></a></dt>
<dd><p>Document information. Anywhere. The command registers the plain text
argument as a copyright assignment for the manpage. When invoked more
than once the assignments are accumulated.</p></dd>
<dt><a name="12"><b class="cmd">def</b> <i class="arg">text</i></a></dt>
<dd><p>Text structure. List element. Definition list. Automatically closes
the previous list element. The argument text is the term defined by
the new list element. Text markup can be applied to it.</p></dd>
<dt><a name="13"><b class="cmd">description</b></a></dt>
<dd><p>Document structure. This command separates the header from the
document body.  Implicitly starts a section named &quot;DESCRIPTION&quot; (See
command <b class="cmd">section</b>).</p></dd>
<dt><a name="14"><b class="cmd">enum</b></a></dt>
<dd><p>Text structure. List element. Enumerated list. Automatically closes
the previous list element.</p></dd>
<dt><a name="15"><b class="cmd">emph</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as emphasized. Main use is
for general highlighting of pieces of free-form text without attaching
special meaning to the pieces.</p></dd>
<dt><a name="16"><b class="cmd">example</b> <i class="arg">text</i></a></dt>
<dd><p>Text structure, Text markup. This command marks its argument up as an
<i class="term">example</i>. Main use is the simple embedding of examples in
free-form text. It should be used if the example does <em>not</em> need
special markup of its own. Otherwise use a sequence of
<b class="cmd">example_begin</b> ... <b class="cmd">example_end</b>.</p></dd>
<dt><a name="17"><b class="cmd">example_begin</b></a></dt>
<dd><p>Text structure. This commands starts an example. All text until the
next <b class="cmd">example_end</b> belongs to the example. Line breaks, spaces,
and tabs have to be preserved literally. Examples cannot be nested.</p></dd>
<dt><a name="18"><b class="cmd">example_end</b></a></dt>
<dd><p>Text structure. This command closes the example started by the last
<b class="cmd">example_begin</b>.</p></dd>
<dt><a name="19"><b class="cmd"><a href="../../../../index.html#key31">file</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as a <i class="term"><a href="../../../../index.html#key31">file</a></i> or
<i class="term">directory</i>, i.e. in general a <i class="term">path</i>. The text may have
other markup already applied to it. Main use is the highlighting of
paths in free-form text.</p></dd>
<dt><a name="20"><b class="cmd">fun</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term">function</i>. The text may have other markup already applied to
it. Main use is the highlighting of function names in free-form text.</p></dd>
<dt><a name="21"><b class="cmd"><a href="../../../../index.html#key121">image</a></b> <i class="arg">name</i> <span class="opt">?<i class="arg">label</i>?</span></a></dt>
<dd><p>Text markup. The argument is the symbolic name of an <i class="term"><a href="../../../../index.html#key121">image</a></i>
and replaced with the image itself, if a suitable variant is found
by the backend. The second argument, should it be present, will be
interpreted the human-readable description of the image, and put
into the output in a suitable position, if such is supported by the
format. The HTML format, for example, can place it into the <i class="term">alt</i>
attribute of image references.</p></dd>
<dt><a name="22"><b class="cmd">include</b> <i class="arg">filename</i></a></dt>
<dd><p>Templating. The contents of the named file are interpreted as text
written in the doctools markup and processed in the place of the
include command. The markup in the file has to be self-contained. It
is not possible for a markup command to cross the file boundaries.</p></dd>
<dt><a name="23"><b class="cmd">item</b></a></dt>
<dd><p>Text structure. List element. Itemized list. Automatically closes the
previous list element.</p></dd>
<dt><a name="24"><b class="cmd"><a href="../../../../index.html#key779">keywords</a></b> <i class="arg">args</i></a></dt>
<dd><p>Document information. Anywhere. This command registers all its plain text
arguments as keywords applying to this document. Each argument is a single
keyword. If this command is used multiple times all the arguments accumulate.</p></dd>
<dt><a name="25"><b class="cmd">lb</b></a></dt>
<dd><p>Text. The command is replaced with a left bracket. Use in free-form text.
Required to avoid interpretation of a left bracket as the start of a markup
command.</p></dd>
<dt><a name="26"><b class="cmd">list_begin</b> <i class="arg">what</i></a></dt>
<dd><p>Text structure. This command starts a list. The exact nature of the
list is determined by the argument <i class="arg">what</i> of the command. This
further determines which commands are have to be used to start the
list elements. Lists can be nested, i.e. it is allowed to start a new
list within a list element.</p>
<p>The allowed types (and their associated item commands) are:</p>
<dl class="doctools_definitions">
<dt><b class="const">arguments</b></dt>
<dd><p><b class="cmd">arg_def</b>.</p></dd>
<dt><b class="const">commands</b></dt>
<dd><p><b class="cmd">cmd_def</b>.</p></dd>
<dt><b class="const">definitions</b></dt>
<dd><p><b class="cmd">def</b> and <b class="cmd">call</b>.</p></dd>
<dt><b class="const">enumerated</b></dt>
<dd><p><b class="cmd">enum</b></p></dd>
<dt><b class="const">itemized</b></dt>
<dd><p><b class="cmd">item</b></p></dd>
<dt><b class="const">options</b></dt>
<dd><p><b class="cmd">opt_def</b></p></dd>
<dt><b class="const">tkoptions</b></dt>
<dd><p><b class="cmd">tkoption_def</b></p></dd>
</dl>
<p>Additionally the following names are recognized as shortcuts for some
of the regular types:</p>
<dl class="doctools_definitions">
<dt><b class="const">args</b></dt>
<dd><p>Short for <b class="const">arguments</b>.</p></dd>
<dt><b class="const">cmds</b></dt>
<dd><p>Short for <b class="const">commands</b>.</p></dd>
<dt><b class="const">enum</b></dt>
<dd><p>Short for <b class="const">enumerated</b>.</p></dd>
<dt><b class="const">item</b></dt>
<dd><p>Short for <b class="const">itemized</b>.</p></dd>
<dt><b class="const">opts</b></dt>
<dd><p>Short for <b class="const">options</b>.</p></dd>
</dl>
<p>At last the following names are still recognized for backward
compatibility, but are otherwise considered to be <em>deprecated</em>.</p>
<dl class="doctools_definitions">
<dt><b class="const">arg</b></dt>
<dd><p><em>Deprecated</em>. See <b class="const">arguments</b>.</p></dd>
<dt><b class="const">bullet</b></dt>
<dd><p><em>Deprecated</em>. See <b class="const">itemized</b>.</p></dd>
<dt><b class="const">cmd</b></dt>
<dd><p><em>Deprecated</em>. See <b class="const">commands</b>.</p></dd>
<dt><b class="const">opt</b></dt>
<dd><p><em>Deprecated</em>. See <b class="const">options</b>.</p></dd>
<dt><b class="const">tkoption</b></dt>
<dd><p><em>Deprecated</em>. See <b class="const">tkoptions</b>.</p></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">list_end</b></a></dt>
<dd><p>Text structure. This command closes the list opened by the last
<b class="cmd">list_begin</b> command coming before it.</p></dd>
<dt><a name="28"><b class="cmd">lst_item</b> <i class="arg">text</i></a></dt>
<dd><p><em>Deprecated</em>. Text structure. List element. Definition list. See
<b class="cmd">def</b> for the canonical command to open a general list item in a
definition list.</p></dd>
<dt><a name="29"><b class="cmd">manpage_begin</b> <i class="arg">command</i> <i class="arg">section</i> <i class="arg">version</i></a></dt>
<dd><p>Document structure. The command to start a manpage. The arguments are
the name of the <i class="arg">command</i> described by the manpage, the
<i class="arg">section</i> of the manpages this manpage resides in, and the
<i class="arg">version</i> of the module containing the command. All arguments have
to be plain text, without markup.</p></dd>
<dt><a name="30"><b class="cmd">manpage_end</b></a></dt>
<dd><p>Document structure. Command to end a manpage/document. Anything in the document
coming after this command is in error.</p></dd>
<dt><a name="31"><b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as the name of an
<i class="term"><a href="../../../../index.html#key243">object</a></i> <i class="term"><a href="../../../../index.html#key372">method</a></i>, i.e. subcommand of a Tcl command. The
text may have other markup already applied to it. Main uses are the
highlighting of method names in free-form text, and for the command
parameters of the markup commands <b class="cmd">call</b> and <b class="cmd">usage</b>.</p></dd>
<dt><a name="32"><b class="cmd">moddesc</b> <i class="arg">text</i></a></dt>
<dd><p>Document information. Header. Registers the plain text argument as a short
description of the module the manpage resides in.</p></dd>
<dt><a name="33"><b class="cmd">namespace</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as a namespace name. The
text may have other markup already applied to it. Main use is the
highlighting of namespace names in free-form text.</p></dd>
<dt><a name="34"><b class="cmd">nl</b></a></dt>
<dd><p><em>Deprecated</em>. Text structure. See <b class="cmd">para</b> for the canonical
command to insert paragraph breaks into the text.</p></dd>
<dt><a name="35"><b class="cmd">opt</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as <i class="term">optional</i>. The text may
have other markup already applied to it. Main use is the highlighting of
optional arguments, see the command arg <b class="cmd">arg</b>.</p></dd>
<dt><a name="36"><b class="cmd">opt_def</b> <i class="arg">name</i> <span class="opt">?<i class="arg">arg</i>?</span></a></dt>
<dd><p>Text structure. List element. Option list. Automatically closes the
previous list element. Specifies <i class="arg">name</i> and arguments of the
<i class="term">option</i> described by the list element. It is expected that the
name is marked up using <b class="cmd">option</b>.</p></dd>
<dt><a name="37"><b class="cmd">option</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as <i class="term">option</i>. The text may
have other markup already applied to it. Main use is the highlighting
of options, also known as command-switches, in either free-form text,
or the arguments of the <b class="cmd">call</b> and <b class="cmd">usage</b> commands.</p></dd>
<dt><a name="38"><b class="cmd"><a href="../../../../index.html#key48">package</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term"><a href="../../../../index.html#key48">package</a></i>. The text may have other markup already applied to
it. Main use is the highlighting of package names in free-form text.</p></dd>
<dt><a name="39"><b class="cmd">para</b></a></dt>
<dd><p>Text structure. This command breaks free-form text into
paragraphs. Each command closes the paragraph coming before it and
starts a new paragraph for the text coming after it. Higher-level
forms of structure are sections and subsections.</p></dd>
<dt><a name="40"><b class="cmd">rb</b></a></dt>
<dd><p>Text. The command is replaced with a right bracket. Use in free-form text.
Required to avoid interpretation of a right bracket as the end of a markup
command.</p></dd>
<dt><a name="41"><b class="cmd">require</b> <i class="arg">package</i> <span class="opt">?<i class="arg">version</i>?</span></a></dt>
<dd><p>Document information. Header. This command registers its argument
<i class="arg">package</i> as the name of a package or application required by the
described package or application. A minimum version can be provided as
well. This argument can be marked up. The usual markup is <b class="cmd">opt</b>.</p></dd>
<dt><a name="42"><b class="cmd">section</b> <i class="arg">name</i></a></dt>
<dd><p>Text structure. This command starts a new named document section. The
argument has to be plain text. Implicitly closes the last paragraph
coming before it and also implicitly opens the first paragraph of the
new section.</p></dd>
<dt><a name="43"><b class="cmd">sectref</b> <i class="arg">id</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>Text markup. Formats a reference to the section identified by <i class="arg">id</i>.
If no <i class="arg">text</i> is specified the title of the referenced section is
used in the output, otherwise <i class="arg">text</i> is used.</p></dd>
<dt><a name="44"><b class="cmd">sectref-external</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. Like <b class="cmd">sectref</b>, except that the section is assumed to
be in a different document and therefore doesn't need to be identified,
nor are any checks for existence made. Only the text to format is needed.</p></dd>
<dt><a name="45"><b class="cmd">see_also</b> <i class="arg">args</i></a></dt>
<dd><p>Document information. Anywhere. The command defines direct cross-references
to other documents. Each argument is a plain text label identifying the
referenced document. If this command is used multiple times all the arguments
accumulate.</p></dd>
<dt><a name="46"><b class="cmd">strong</b> <i class="arg">text</i></a></dt>
<dd><p><em>Deprecated</em>. Text markup. See <b class="cmd">emph</b> for the canonical
command to emphasize text.</p></dd>
<dt><a name="47"><b class="cmd">subsection</b> <i class="arg">name</i></a></dt>
<dd><p>Text structure. This command starts a new named subsection of a
section. The argument has to be plain text. Implicitly closes the last
paragraph coming before it and also implicitly opens the first
paragraph of the new subsection.</p></dd>
<dt><a name="48"><b class="cmd">syscmd</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as the name of an external
command. The text may have other markup already applied to it. Main
use is the highlighting of external commands in free-form text.</p></dd>
<dt><a name="49"><b class="cmd"><a href="../term/term.html">term</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as unspecific terminology.  The
text may have other markup already applied to it. Main use is the
highlighting of important terms and concepts in free-form text.</p></dd>
<dt><a name="50"><b class="cmd">titledesc</b> <i class="arg">desc</i></a></dt>
<dd><p>Document information. Header. Optional. Registers the plain text
argument as the title of the manpage. Defaults to the value registered
by <b class="cmd">moddesc</b>.</p></dd>
<dt><a name="51"><b class="cmd">tkoption_def</b> <i class="arg">name</i> <i class="arg">dbname</i> <i class="arg">dbclass</i></a></dt>
<dd><p>Text structure. List element. Widget option list. Automatically closes
the previous list element. Specifies the <i class="arg">name</i> of the option as
used in scripts, the name used by the option database (<i class="arg">dbname</i>),
and its class (<i class="arg">dbclass</i>), i.e. its type. It is expected that the
name is marked up using <b class="cmd">option</b>.</p></dd>
<dt><a name="52"><b class="cmd"><a href="../../../../index.html#key117">type</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term">data type</i>. The text may have other markup already applied to
it. Main use is the highlighting of data types in free-form text.</p></dd>
<dt><a name="53"><b class="cmd"><a href="../uri/uri.html">uri</a></b> <i class="arg">text</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>Text markup. The argument is marked up as an <i class="term"><a href="../../../../index.html#key528">uri</a></i> (i.e. a
<i class="term">uniform resource identifier</i>. The text may have other markup
already applied to it. Main use is the highlighting of uris in
free-form text. The second argument, should it be present, will be
interpreted the human-readable description of the uri. In other words,
as its label. Without an explicit label the uri will be its own label.</p></dd>
<dt><a name="54"><b class="cmd">usage</b> <i class="arg">args</i></a></dt>
<dd><p>Text markup. See <b class="cmd">call</b> for the full description, this command is
syntactically identical, as it is in its expectations for the markup
of its arguments.
In contrast to <b class="cmd">call</b> it is however not allowed to generate output
where this command occurs in the text. The command is <i class="term">silent</i>.
The formatted text may only appear in a different section of the
output, for example a table of contents, or synopsis, depending on the
output format.</p></dd>
<dt><a name="55"><b class="cmd">var</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term">variable</i>. The text may have other markup already applied to
it. Main use is the highlighting of variables in free-form text.</p></dd>
<dt><a name="56"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Templating. In this form the command sets the named document variable
to the specified <i class="arg">value</i>. It does not generate output. I.e. the
command is replaced by the empty string.</p></dd>
<dt><a name="57"><b class="cmd">vset</b> <i class="arg">varname</i></a></dt>
<dd><p>Templating. In this form the command is replaced by the value of the
named document variable</p></dd>
<dt><a name="58"><b class="cmd"><a href="../../../../index.html#key235">widget</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term"><a href="../../../../index.html#key235">widget</a></i>. The text may have other markup already applied to
it. Main use is the highlighting of widget names in free-form text.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key137">doctools commands</a>, <a href="../../../../index.html#key140">doctools language</a>, <a href="../../../../index.html#key139">doctools markup</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctools_lang_faq.html.





































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

<div class='fossil-doc' data-title='doctools_lang_faq - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_faq(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_faq - doctools language faq</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">What is this document?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Where do I find doctools examples?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">What is this document?</a></h3>
<p>This document is currently mainly a placeholder, to be filled with
commonly asked questions about the doctools markup language
and companions, and their answers.</p>
<p>Please report any questions (and, if possible, answers) we should
consider for this document as explained in the section
<span class="sectref"><a href="#section4">Bugs, Ideas, Feedback</a></span> below.</p>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Where do I find doctools examples?</a></h3>
<p>We have no direct examples of documents written using doctools
markup. However the doctools processor <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does generate
a table of contents when processing a set of documents written in
doctools markup. The intermediate file for it uses doctools
markup and is not deleted when generation completes. Such files can
therefore serve as examples.</p>
<p><b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> is distributed as part of Tcllib, so to get it you
need one of</p>
<ol class="doctools_enumerated">
<li><p>A snapshot of Tcllib. How to retrieve such a snapshot and the
tools required for this are described at
<a href="/wiki?name=Development+Snapshots">Development Snapshots</a></p></li>
<li><p>A Tcllib release archive. They are available at the <a href="/home">home</a>
page.</p></li>
</ol>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key137">doctools commands</a>, <a href="../../../../index.html#key140">doctools language</a>, <a href="../../../../index.html#key139">doctools markup</a>, <a href="../../../../index.html#key138">doctools syntax</a>, <a href="../../../../index.html#key370">examples</a>, <a href="../../../../index.html#key367">faq</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctools_lang_intro.html.



























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637

<div class='fossil-doc' data-title='doctools_lang_intro - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_intro - doctools language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Fundamentals</a></li>
<li class="doctools_subsection"><a href="#subsection2">Basic structure</a></li>
<li class="doctools_subsection"><a href="#subsection3">Advanced structure</a></li>
<li class="doctools_subsection"><a href="#subsection4">Text structure</a></li>
<li class="doctools_subsection"><a href="#subsection5">Text markup</a></li>
<li class="doctools_subsection"><a href="#subsection6">Escapes</a></li>
<li class="doctools_subsection"><a href="#subsection7">Cross-references</a></li>
<li class="doctools_subsection"><a href="#subsection8">Examples</a></li>
<li class="doctools_subsection"><a href="#subsection9">Lists</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">FURTHER READING</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is an informal introduction to version 1 of the doctools
markup language based on a multitude of examples. After reading this a
writer should be ready to understand the two parts of the formal
specification, i.e. the <i class="term"><a href="doctools_lang_syntax.html">doctools language syntax</a></i> specification
and the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Fundamentals</a></h3>
<p>In the broadest terms possible the <i class="term">doctools markup language</i>
is LaTeX-like, instead of like SGML and similar languages. A document
written in this language consists primarily of text, with markup
commands embedded into it.</p>
<p>Each markup command is a Tcl command surrounded by a matching pair of
<b class="const">[</b> and <b class="const">]</b>. Inside of these delimiters the usual
rules for a Tcl command apply with regard to word quotation, nested
commands, continuation lines, etc. I.e.</p>
<pre class="doctools_example">
  ... [list_begin enumerated] ...
</pre>
<pre class="doctools_example">
  ... [call [cmd foo] \\
          [arg bar]] ...
</pre>
<pre class="doctools_example">
  ... [term {complex concept}] ...
</pre>
<pre class="doctools_example">
  ... [opt &quot;[arg key] [arg value]&quot;] ...
</pre>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basic structure</a></h3>
<p>The most simple document which can be written in doctools is</p>
<pre class="doctools_example">
    [manpage_begin NAME SECTION VERSION]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [description]
    [vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]
</pre>
<p>This also shows us that all doctools documents are split into two
parts, the <i class="term">header</i> and the <i class="term">body</i>. Everything coming before
[<b class="cmd">description</b>] belongs to the header, and everything coming
after belongs to the body, with the whole document bracketed by the
two <b class="cmd">manpage_*</b> commands. Before and after these opening and
closing commands we have only <i class="term">whitespace</i>.</p>
<p>In the remainder of this section we will discuss only the contents of
the header, the structure of the body will be discussed in the section
<span class="sectref"><a href="#subsection4">Text structure</a></span>.</p>
<p>The header section can be empty, and otherwise may contain only an
arbitrary sequence of the four so-called <i class="term">header</i> commands, plus
<i class="term">whitespace</i>. These commands are</p>
<dl class="doctools_commands">
<dt><b class="cmd">titledesc</b></dt>
<dd></dd>
<dt><b class="cmd">moddesc</b></dt>
<dd></dd>
<dt><b class="cmd">require</b></dt>
<dd></dd>
<dt><b class="cmd">copyright</b></dt>
<dd></dd>
</dl>
<p>They provide, through their arguments, additional information about
the document, like its title, the title of the larger group the
document belongs to (if applicable), the requirements of the
documented packages (if applicable), and copyright assignments. All of
them can occur multiple times, including none, and they can be used in
any order.
However for <b class="cmd">titledesc</b> and <b class="cmd">moddesc</b> only the last occurrence
is taken. For the other two the specified information is accumulated,
in the given order. Regular text is not allowed within the header.</p>
<p>Given the above a less minimal example of a document is</p>
<pre class="doctools_example">
[manpage_begin NAME SECTION VERSION]
[<b class="cmd">copyright {YEAR AUTHOR}</b>]
[<b class="cmd">titledesc TITLE</b>]
[<b class="cmd">moddesc   MODULE_TITLE</b>]
[<b class="cmd">require   PACKAGE VERSION</b>]
[<b class="cmd">require   PACKAGE</b>]
[description]
[manpage_end]
</pre>
<p>Remember that the whitespace is optional. The document</p>
<pre class="doctools_example">
    [manpage_begin NAME SECTION VERSION]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [copyright {YEAR AUTHOR}][titledesc TITLE][moddesc MODULE_TITLE]
    [require PACKAGE VERSION][require PACKAGE][description]
    [vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]
</pre>
<p>has the same meaning as the example before.</p>
<p>On the other hand, if <i class="term">whitespace</i> is present it consists not
only of any sequence of characters containing the space character,
horizontal and vertical tabs, carriage return, and newline, but it may
contain comment markup as well, in the form of the <b class="cmd"><a href="../../../../index.html#key155">comment</a></b>
command.</p>
<pre class="doctools_example">
[<b class="cmd">comment { ... }</b>]
[manpage_begin NAME SECTION VERSION]
[copyright {YEAR AUTHOR}]
[titledesc TITLE]
[moddesc   MODULE_TITLE][<b class="cmd">comment { ... }</b>]
[require   PACKAGE VERSION]
[require   PACKAGE]
[description]
[manpage_end]
[<b class="cmd">comment { ... }</b>]
</pre>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Advanced structure</a></h3>
<p>In the simple examples of the last section we fudged a bit regarding
the markup actually allowed to be used before the <b class="cmd">manpage_begin</b>
command opening the document.</p>
<p>Instead of only whitespace the two templating commands <b class="cmd">include</b>
and <b class="cmd">vset</b> are also allowed, to enable the writer to either set
and/or import configuration settings relevant to the document. I.e. it
is possible to write</p>
<pre class="doctools_example">
[<b class="cmd">include FILE</b>]
[<b class="cmd">vset VAR VALUE</b>]
[manpage_begin NAME SECTION VERSION]
[description]
[manpage_end]
</pre>
<p>Even more important, these two commands are allowed anywhere where a
markup command is allowed, without regard for any other
structure. I.e. for example in the header as well.</p>
<pre class="doctools_example">
[manpage_begin NAME SECTION VERSION]
[<b class="cmd">include FILE</b>]
[<b class="cmd">vset VAR VALUE</b>]
[description]
[manpage_end]
</pre>
<p>The only restriction <b class="cmd">include</b> has to obey is that the contents of
the included file must be valid at the place of the inclusion. I.e. a
file included before <b class="cmd">manpage_begin</b> may contain only the
templating commands <b class="cmd">vset</b> and <b class="cmd">include</b>, a file included in
the header may contain only header commands, etc.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Text structure</a></h3>
<p>The body of the document consists mainly of text, possibly split into
sections, subsections, and paragraphs, with parts marked up to
highlight various semantic categories of text, and additional
structure through the use of examples and (nested) lists.</p>
<p>This section explains the high-level structural commands, with
everything else deferred to the following sections.</p>
<p>The simplest way of structuring the body is through the introduction
of paragraphs. The command for doing so is <b class="cmd">para</b>. Each occurrence
of this command closes the previous paragraph and automatically opens
the next. The first paragraph is automatically opened at the beginning
of the body, by <b class="cmd">description</b>. In the same manner the last
paragraph automatically ends at <b class="cmd">manpage_end</b>.</p>
<pre class="doctools_example">
[manpage_begin NAME SECTION VERSION]
[description]
 ...
[<b class="cmd">para</b>]
 ...
[<b class="cmd">para</b>]
 ...
[manpage_end]
</pre>
<p>Empty paragraphs are ignored.</p>
<p>A structure coarser than paragraphs are sections, which allow the
writer to split a document into larger, and labeled, pieces. The
command for doing so is <b class="cmd">section</b>. Each occurrence of this command
closes the previous section and automatically opens the next,
including its first paragraph. The first section is automatically
opened at the beginning of the body, by <b class="cmd">description</b> (This
section is labeled &quot;DESCRIPTION&quot;). In the same manner the last section
automatically ends at <b class="cmd">manpage_end</b>.</p>
<p>Empty sections are <em>not</em> ignored. We are free to (not) use
paragraphs within sections.</p>
<pre class="doctools_example">
[manpage_begin NAME SECTION VERSION]
[description]
 ...
[<b class="cmd">section {Section A}</b>]
 ...
[para]
 ...
[<b class="cmd">section {Section B}</b>]
 ...
[manpage_end]
</pre>
<p>Between sections and paragraphs we have subsections, to split sections.
The command for doing so is <b class="cmd">subsection</b>. Each occurrence of this
command closes the previous subsection and automatically opens the
next, including its first paragraph. A subsection is automatically
opened at the beginning of the body, by <b class="cmd">description</b>, and at the
beginning of each section. In the same manner the last subsection
automatically ends at <b class="cmd">manpage_end</b>.</p>
<p>Empty subsections are <em>not</em> ignored. We are free to (not) use
paragraphs within subsections.</p>
<pre class="doctools_example">
[manpage_begin NAME SECTION VERSION]
[description]
 ...
[section {Section A}]
 ...
[<b class="cmd">subsection {Sub 1}</b>]
 ...
[para]
 ...
[<b class="cmd">subsection {Sub 2}</b>]
 ...
[section {Section B}]
 ...
[manpage_end]
</pre>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Text markup</a></h3>
<p>Having handled the overall structure a writer can impose on the
document we now take a closer at the text in a paragraph.</p>
<p>While most often this is just the unadorned content of the document we
do have situations where we wish to highlight parts of it as some type
of thing or other, like command arguments, command names, concepts,
uris, etc.</p>
<p>For this we have a series of markup commands which take the text to
highlight as their single argument. It should be noted that while
their predominant use is the highlighting of parts of a paragraph they
can also be used to mark up the arguments of list item commands, and
of other markup commands.</p>
<p>The commands available to us are</p>
<dl class="doctools_commands">
<dt><b class="cmd">arg</b></dt>
<dd><p>Its argument is a the name of a command argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key240">class</a></b></dt>
<dd><p>Its argument is a class name.</p></dd>
<dt><b class="cmd">cmd</b></dt>
<dd><p>Its argument is a command name (Tcl command).</p></dd>
<dt><b class="cmd">const</b></dt>
<dd><p>Its argument is a constant.</p></dd>
<dt><b class="cmd">emph</b></dt>
<dd><p>General, non-semantic emphasis.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key31">file</a></b></dt>
<dd><p>Its argument is a filename / path.</p></dd>
<dt><b class="cmd">fun</b></dt>
<dd><p>Its argument is a function name.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key372">method</a></b></dt>
<dd><p>Its argument is a method name</p></dd>
<dt><b class="cmd">namespace</b></dt>
<dd><p>Its argument is namespace name.</p></dd>
<dt><b class="cmd">opt</b></dt>
<dd><p>Its argument is some optional syntax element.</p></dd>
<dt><b class="cmd">option</b></dt>
<dd><p>Its argument is a command line switch / widget option.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key48">package</a></b></dt>
<dd><p>Its argument is a package name.</p></dd>
<dt><b class="cmd">sectref</b></dt>
<dd><p>Its argument is the title of a section or subsection,
                    i.e. a section reference.</p></dd>
<dt><b class="cmd">syscmd</b></dt>
<dd><p>Its argument is a command name (external, system command).</p></dd>
<dt><b class="cmd"><a href="../term/term.html">term</a></b></dt>
<dd><p>Its argument is a concept, or general terminology.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key117">type</a></b></dt>
<dd><p>Its argument is a type name.</p></dd>
<dt><b class="cmd"><a href="../uri/uri.html">uri</a></b></dt>
<dd><p>Its argument is a uniform resource identifier, i.e an
                    external reference. A second argument can be used
                    to specify an explicit label for the reference in
                    question.</p></dd>
<dt><b class="cmd">usage</b></dt>
<dd><p>The arguments describe the syntax of a Tcl command.</p></dd>
<dt><b class="cmd">var</b></dt>
<dd><p>Its argument is a variable.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key235">widget</a></b></dt>
<dd><p>Its argument is a widget name.</p></dd>
</dl>
<p>The example demonstrating the use of text markup is an excerpt from
the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i>, with some
highlighting added.
It shows their use within a block of text, as the arguments of a list
item command (<b class="cmd">call</b>), and our ability to nest them.</p>
<pre class="doctools_example">
  ...
  [call [<b class="cmd">cmd arg_def</b>] [<b class="cmd">arg type</b>] [<b class="cmd">arg name</b>]] [<b class="cmd">opt</b> [<b class="cmd">arg mode</b>]]]
  Text structure. List element. Argument list. Automatically closes the
  previous list element. Specifies the data-[<b class="cmd">arg type</b>] of the described
  argument of a command, its [<b class="cmd">arg name</b>] and its i/o-[<b class="cmd">arg mode</b>]. The
  latter is optional.
  ...
</pre>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Escapes</a></h3>
<p>Beyond the 20 commands for simple markup shown in the previous section
we have two more available which are technically simple markup.
However their function is not the marking up of phrases as specific
types of things, but the insertion of characters, namely <b class="const">[</b>
and <b class="const">]</b>.
These commands, <b class="cmd">lb</b> and <b class="cmd">rb</b> respectively, are required
because our use of [ and ] to bracket markup commands makes it
impossible to directly use [ and ] within the text.</p>
<p>Our example of their use are the sources of the last sentence in the
previous paragraph, with some highlighting added.</p>
<pre class="doctools_example">
  ...
  These commands, [cmd lb] and [cmd lb] respectively, are required
  because our use of [<b class="cmd">lb</b>] and [<b class="cmd">rb</b>] to bracket markup commands makes it
  impossible to directly use [<b class="cmd">lb</b>] and [<b class="cmd">rb</b>] within the text.
  ...
</pre>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Cross-references</a></h3>
<p>The last two commands we have to discuss are for the declaration of
cross-references between documents, explicit and implicit. They are
<b class="cmd"><a href="../../../../index.html#key779">keywords</a></b> and <b class="cmd">see_also</b>. Both take an arbitrary number of
arguments, all of which have to be plain unmarked text. I.e. it is not
allowed to use markup on them. Both commands can be used multiple
times in a document. If that is done all arguments of all occurrences
of one of them are put together into a single set.</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#key779">keywords</a></b></dt>
<dd><p>The arguments of this command are interpreted as keywords describing
the document. A processor can use this information to create an index
indirectly linking the containing document to all documents with the
same keywords.</p></dd>
<dt><b class="cmd">see_also</b></dt>
<dd><p>The arguments of this command are interpreted as references to other
documents. A processor can format them as direct links to these
documents.</p></dd>
</dl>
<p>All the cross-reference commands can occur anywhere in the document
between <b class="cmd">manpage_begin</b> and <b class="cmd">manpage_end</b>. As such the writer
can choose whether she wants to have them at the beginning of the
body, or at its end, maybe near the place a keyword is actually
defined by the main content, or considers them as meta data which
should be in the header, etc.</p>
<p>Our example shows the sources for the cross-references of this
document, with some highlighting added. Incidentally they are found
at the end of the body.</p>
<pre class="doctools_example">
  ...
  [<b class="cmd">see_also doctools_intro</b>]
  [<b class="cmd">see_also doctools_lang_syntax</b>]
  [<b class="cmd">see_also doctools_lang_cmdref</b>]
  [<b class="cmd">keywords markup {semantic markup}</b>]
  [<b class="cmd">keywords {doctools markup} {doctools language}</b>]
  [<b class="cmd">keywords {doctools syntax} {doctools commands}</b>]
  [manpage_end]
</pre>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Examples</a></h3>
<p>Where ever we can write plain text we can write examples too. For
simple examples we have the command <b class="cmd">example</b> which takes a single
argument, the text of the argument. The example text must not contain
markup. If we wish to have markup within an example we have to use the
2-command combination <b class="cmd">example_begin</b> / <b class="cmd">example_end</b> instead.</p>
<p>The first opens an example block, the other closes it, and in between
we can write plain text and use all the regular text markup commands.
Note that text structure commands are not allowed. This also means
that it is not possible to embed examples and lists within an example.
On the other hand, we <em>can</em> use templating commands within
example blocks to read their contents from a file (Remember section
<span class="sectref"><a href="#subsection3">Advanced structure</a></span>).</p>
<p>The source for the very first example in this document (see section
<span class="sectref"><a href="#subsection1">Fundamentals</a></span>), with some highlighting added, is</p>
<pre class="doctools_example">
  [<b class="cmd">example</b> {
    ... [list_begin enumerated] ...
  }]
</pre>
<p>Using <b class="cmd">example_begin</b> / <b class="cmd">example_end</b> this would look like</p>
<pre class="doctools_example">
  [<b class="cmd">example_begin</b>]
    ... [list_begin enumerated] ...
  [<b class="cmd">example_end</b>]
</pre>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">Lists</a></h3>
<p>Where ever we can write plain text we can write lists too. The main
commands are <b class="cmd">list_begin</b> to start a list, and <b class="cmd">list_end</b> to
close one. The opening command takes an argument specifying the type
of list started it, and this in turn determines which of the eight
existing list item commands are allowed within the list to start list
items.</p>
<p>After the opening command only whitespace is allowed, until the first
list item command opens the first item of the list. Each item is a
regular series of paragraphs and is closed by either the next list
item command, or the end of the list. If closed by a list item command
this command automatically opens the next list item. A consequence of
a list item being a series of paragraphs is that all regular text
markup can be used within a list item, including examples and other
lists.</p>
<p>The list types recognized by <b class="cmd">list_begin</b> and their associated
list item commands are:</p>
<dl class="doctools_definitions">
<dt><b class="const">arguments</b></dt>
<dd><p>(<b class="cmd">arg_def</b>) This opens an <i class="term">argument (declaration) list</i>. It
is a specialized form of a term definition list where the term is an
argument name, with its type and i/o-mode.</p></dd>
<dt><b class="const">commands</b></dt>
<dd><p>(<b class="cmd">cmd_def</b>) This opens a <i class="term">command (declaration) list</i>. It
is a specialized form of a term definition list where the term is a
command name.</p></dd>
<dt><b class="const">definitions</b></dt>
<dd><p>(<b class="cmd">def</b> and <b class="cmd">call</b>) This opens a general
<i class="term">term definition list</i>. The terms defined by the list items are
specified through the argument(s) of the list item commands, either
general terms, possibly with markup (<b class="cmd">def</b>), or Tcl commands with
their syntax (<b class="cmd">call</b>).</p></dd>
<dt><b class="const">enumerated</b></dt>
<dd><p>(<b class="cmd">enum</b>) This opens a general <i class="term">enumerated list</i>.</p></dd>
<dt><b class="const">itemized</b></dt>
<dd><p>(<b class="cmd">item</b>)
This opens a general <i class="term">itemized list</i>.</p></dd>
<dt><b class="const">options</b></dt>
<dd><p>(<b class="cmd">opt_def</b>) This opens an <i class="term">option (declaration) list</i>. It
is a specialized form of a term definition list where the term is an
option name, possibly with the option's arguments.</p></dd>
<dt><b class="const">tkoptions</b></dt>
<dd><p>(<b class="cmd">tkoption_def</b>) This opens a
<i class="term">widget option (declaration) list</i>. It is a specialized form of
a term definition list where the term is the name of a configuration
option for a widget, with its name and class in the option database.</p></dd>
</dl>
<p>Our example is the source of the definition list in the previous
paragraph, with most of the content in the middle removed.</p>
<pre class="doctools_example">
  ...
  [<b class="cmd">list_begin</b> definitions]
  [<b class="cmd">def</b> [const arg]]
  ([cmd arg_def]) This opens an argument (declaration) list. It is a
  specialized form of a definition list where the term is an argument
  name, with its type and i/o-mode.
  [<b class="cmd">def</b> [const itemized]]
  ([cmd item])
  This opens a general itemized list.
  ...
  [<b class="cmd">def</b> [const tkoption]]
  ([cmd tkoption_def]) This opens a widget option (declaration) list. It
  is a specialized form of a definition list where the term is the name
  of a configuration option for a widget, with its name and class in the
  option database.
  [<b class="cmd">list_end</b>]
  ...
</pre>
<p>Note that a list cannot begin in one (sub)section and end in
another. Differently said, (sub)section breaks are not allowed within
lists and list items. An example of this <em>illegal</em> construct is</p>
<pre class="doctools_example">
  ...
  [list_begin itemized]
  [item]
  ...
  [<b class="cmd">section {ILLEGAL WITHIN THE LIST}</b>]
  ...
  [list_end]
  ...
</pre>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">FURTHER READING</a></h2>
<p>Now that this document has been digested the reader, assumed to be a
<i class="term">writer</i> of documentation should be fortified enough to be able
to understand the formal <i class="term"><a href="doctools_lang_syntax.html">doctools language syntax</a></i>
specification as well. From here on out the
<i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i> will also serve as the
detailed specification and cheat sheet for all available commands and
their syntax.</p>
<p>To be able to validate a document while writing it, it is also
recommended to familiarize oneself with one of the applications for
the processing and conversion of doctools documents, i.e. either
Tcllib's easy and simple <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b>, or Tclapps'
ultra-configurable <b class="syscmd">dtp</b>.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key137">doctools commands</a>, <a href="../../../../index.html#key140">doctools language</a>, <a href="../../../../index.html#key139">doctools markup</a>, <a href="../../../../index.html#key138">doctools syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctools_lang_syntax.html.



































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225

<div class='fossil-doc' data-title='doctools_lang_syntax - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_syntax(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_syntax - doctools language syntax</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Fundamentals</a></li>
<li class="doctools_section"><a href="#section3">Lexical definitions</a></li>
<li class="doctools_section"><a href="#section4">Syntax</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document contains the formal specification of the syntax of the
doctools markup language, version 1 in Backus-Naur-Form. This document
is intended to be a reference, complementing the
<i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i>.
A beginner should read the much more informally written
<i class="term"><a href="doctools_lang_intro.html">doctools language introduction</a></i> first before trying to
understand either this document or the command reference.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Fundamentals</a></h2>
<p>In the broadest terms possible the <i class="term">doctools markup language</i>
is LaTeX-like, instead of like SGML and similar languages. A document
written in this language consists primarily of text, with markup
commands embedded into it.</p>
<p>Each markup command is a just Tcl command surrounded by a matching
pair of <b class="const">[</b> and <b class="const">]</b>. Which commands are available,
and their arguments, i.e. syntax is specified in the
<i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i>.</p>
<p>In this document we specify first the lexeme, and then the syntax,
i.e. how we can mix text and markup commands with each other.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Lexical definitions</a></h2>
<p>In the syntax rules listed in the next section</p>
<ol class="doctools_enumerated">
<li><p>&lt;TEXT&gt; stands for all text except markup commands.</p></li>
<li><p>Any XXX stands for the markup command [xxx] including its
arguments. Each markup command is a Tcl command surrounded by a
matching pair of <b class="const">[</b> and <b class="const">]</b>. Inside of these
delimiters the usual rules for a Tcl command apply with regard to word
quotation, nested commands, continuation lines, etc.</p></li>
<li><p>&lt;WHITE&gt; stands for all text consisting only of spaces, newlines,
tabulators and the <b class="cmd"><a href="../../../../index.html#key155">comment</a></b> markup command.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Syntax</a></h2>
<p>The rules listed here specify only the syntax of doctools
documents. The lexical level of the language was covered in the
previous section.</p>
<p>Regarding the syntax of the (E)BNF itself</p>
<ol class="doctools_enumerated">
<li><p>The construct { X } stands for zero or more occurrences of X.</p></li>
<li><p>The construct [ X ] stands for zero or one occurrence of X.</p></li>
<li><p>The construct LIST_BEGIN&lt;X&gt; stands for the markup command
<b class="cmd">list_begin</b> with <b class="const">X</b> as its type argument.</p></li>
</ol>
<p>The syntax:</p>
<pre class="doctools_example">
manpage = defs
          MANPAGE_BEGIN
          header
          DESCRIPTION
          body
          MANPAGE_END
          { &lt;WHITE&gt; }
defs    = { INCLUDE | VSET | &lt;WHITE&gt; }
header  = { TITLEDESC | MODDESC | COPYRIGHT | REQUIRE | defs | xref }
xref    = KEYWORDS | SEE_ALSO | CATEGORY
body    = paras { SECTION    sbody  }
sbody   = paras { SUBSECTION ssbody }
ssbody  = paras
paras   = tblock { (PARA | NL) tblock }
tblock  = { &lt;TEXT&gt; | defs | markup | xref | an_example | a_list }
markup  = ARG     | CLASS | CMD     | CONST     | EMPH   | FILE
        | FUN     | LB    | METHOD  | NAMESPACE | OPT    | OPTION
        | PACKAGE | RB    | SECTREF | STRONG    | SYSCMD | TERM
        | TYPE    | URI   | USAGE   | VAR       | WIDGET
example = EXAMPLE
        | EXAMPLE_BEGIN extext EXAMPLE_END
extext  = { &lt;TEXT&gt; | defs | markup }
a_list  = LIST_BEGIN&lt;arguments&gt;   argd_list   LIST_END
        | LIST_BEGIN&lt;commands&gt;    cmdd_list   LIST_END
        | LIST_BEGIN&lt;definitions&gt; def_list    LIST_END
        | LIST_BEGIN&lt;enumerated&gt;  enum_list   LIST_END
        | LIST_BEGIN&lt;itemized&gt;    item_list   LIST_END
        | LIST_BEGIN&lt;options&gt;     optd_list   LIST_END
        | LIST_BEGIN&lt;tkoptions&gt;   tkoptd_list LIST_END
argd_list   = [ &lt;WHITE&gt; ] { ARG_DEF      paras }
cmdd_list   = [ &lt;WHITE&gt; ] { CMD_DEF      paras }
def_list    = [ &lt;WHITE&gt; ] { (DEF|CALL)   paras }
enum_list   = [ &lt;WHITE&gt; ] { ENUM         paras }
item_list   = [ &lt;WHITE&gt; ] { ITEM         paras }
optd_list   = [ &lt;WHITE&gt; ] { OPT_DEF      paras }
tkoptd_list = [ &lt;WHITE&gt; ] { TKOPTION_DEF paras }
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key137">doctools commands</a>, <a href="../../../../index.html#key140">doctools language</a>, <a href="../../../../index.html#key139">doctools markup</a>, <a href="../../../../index.html#key138">doctools syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/doctools_plugin_apiref.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485

<div class='fossil-doc' data-title='doctools_plugin_apiref - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_plugin_apiref(n) 1.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_plugin_apiref - doctools plugin API reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a></li>
<li class="doctools_section"><a href="#section3">FRONTEND COMMANDS</a></li>
<li class="doctools_section"><a href="#section4">PLUGIN COMMANDS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Management commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Formatting commands</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">dt_copyright</b></a></li>
<li><a href="#2"><b class="cmd">dt_file</b></a></li>
<li><a href="#3"><b class="cmd">dt_mainfile</b></a></li>
<li><a href="#4"><b class="cmd">dt_fileid</b></a></li>
<li><a href="#5"><b class="cmd">dt_fmap</b> <i class="arg">symfname</i></a></li>
<li><a href="#6"><b class="cmd">dt_format</b></a></li>
<li><a href="#7"><b class="cmd">dt_imgdata</b> <i class="arg">key</i> <i class="arg">extensions</i></a></li>
<li><a href="#8"><b class="cmd">dt_imgdst</b> <i class="arg">key</i> <i class="arg">extensions</i></a></li>
<li><a href="#9"><b class="cmd">dt_imgsrc</b> <i class="arg">key</i> <i class="arg">extensions</i></a></li>
<li><a href="#10"><b class="cmd">dt_lnesting</b></a></li>
<li><a href="#11"><b class="cmd">dt_module</b></a></li>
<li><a href="#12"><b class="cmd">dt_read</b> <i class="arg">file</i></a></li>
<li><a href="#13"><b class="cmd">dt_source</b> <i class="arg">file</i></a></li>
<li><a href="#14"><b class="cmd">dt_user</b></a></li>
<li><a href="#15"><b class="cmd">ex_cappend</b> <i class="arg">text</i></a></li>
<li><a href="#16"><b class="cmd">ex_cget</b> <i class="arg">varname</i></a></li>
<li><a href="#17"><b class="cmd">ex_cis</b> <i class="arg">cname</i></a></li>
<li><a href="#18"><b class="cmd">ex_cname</b></a></li>
<li><a href="#19"><b class="cmd">ex_cpop</b> <i class="arg">cname</i></a></li>
<li><a href="#20"><b class="cmd">ex_cpush</b> <i class="arg">cname</i></a></li>
<li><a href="#21"><b class="cmd">ex_cset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#22"><b class="cmd">ex_lb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></li>
<li><a href="#23"><b class="cmd">ex_rb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></li>
<li><a href="#24"><b class="cmd">fmt_initialize</b></a></li>
<li><a href="#25"><b class="cmd">fmt_listvariables</b></a></li>
<li><a href="#26"><b class="cmd">fmt_numpasses</b></a></li>
<li><a href="#27"><b class="cmd">fmt_postprocess</b> <i class="arg">text</i></a></li>
<li><a href="#28"><b class="cmd">fmt_setup</b> <i class="arg">n</i></a></li>
<li><a href="#29"><b class="cmd">fmt_shutdown</b></a></li>
<li><a href="#30"><b class="cmd">fmt_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></li>
<li><a href="#31"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is intended for <i class="term">plugin writers</i>, i.e. developers
wishing to write a doctools <i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> for some output
format X.</p>
<p>It specifies the interaction between the <b class="package"><a href="doctools.html">doctools</a></b> package
and its plugins, i.e. the interface any doctools formatting engine has
to comply with.</p>
<p>This document deals with version 1 of the interface.</p>
<p>A reader who is on the other hand more interested in the markup
language itself should start with the
<i class="term"><a href="doctools_lang_intro.html">doctools language introduction</a></i> and proceed from there to the
formal specifications, i.e. the <i class="term"><a href="doctools_lang_syntax.html">doctools language syntax</a></i> and
the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<p>The API for a doctools formatting engine consists of two major
sections.</p>
<p>On the one side we have a set of commands through which the plugin is
able to query the frontend. These commands are provided by the
frontend and linked into the plugin interpreter. Please see section
<span class="sectref"><a href="#section3">FRONTEND COMMANDS</a></span> for their detailed specification.</p>
<p>And on the other side the plugin has to provide its own set of
commands which will then be called by the frontend in a specific
sequence while processing input. They, again, fall into two
categories, management and formatting.
Please see section <span class="sectref"><a href="#section4">PLUGIN COMMANDS</a></span> and its subsections for
their detailed specification.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">FRONTEND COMMANDS</a></h2>
<p>This section specifies the set of commands through which a plugin,
also known as a doctools formatting engine, is able to query the
frontend. These commands are provided by the frontend and linked into
the plugin interpreter.</p>
<p>I.e. a doctools formatting engine can assume that all of the following
commands are present when any of its own commands (as specified in
section <span class="sectref"><a href="#section4">PLUGIN COMMANDS</a></span>) are executed.</p>
<p>Beyond that it can also assume that it has full access to its own safe
interpreter and thus is not able to damage the other parts of the
processor, nor can it damage the filesystem.
It is however able to either kill or hang the whole process, by
exiting, or running an infinite loop.</p>
<p>Coming back to the imported commands, all the commands with prefix
<em>dt_</em> provide limited access to specific parts of the frontend,
whereas the commands with prefix <em>ex_</em> provide access to the
state of the <b class="package"><a href="../textutil/expander.html">textutil::expander</a></b> object which does the main
parsing of the input within the frontend. These commands should not be
except under very special circumstances.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">dt_copyright</b></a></dt>
<dd><p>Query command. It returns a string containing the copyright
information the doctools processor was configured with. The relevant
option is <b class="option">-copyright</b>).</p></dd>
<dt><a name="2"><b class="cmd">dt_file</b></a></dt>
<dd><p>Query command. It returns the full path of the file containing the
input currently processed by the engine. This may be an included file.</p></dd>
<dt><a name="3"><b class="cmd">dt_mainfile</b></a></dt>
<dd><p>Query command. It returns the full path of the toplevel file containing
the input currently processed by the engine.</p></dd>
<dt><a name="4"><b class="cmd">dt_fileid</b></a></dt>
<dd><p>Query command. It returns the name of the file containing the input
currently processed by the engine, without path, nor extension.</p></dd>
<dt><a name="5"><b class="cmd">dt_fmap</b> <i class="arg">symfname</i></a></dt>
<dd><p>Query command. It returns the actual pathname to use in the output in
place of the symbolic filename <i class="arg">symfname</i>. It will return the
unchanged input if no mapping was established for <i class="arg">symfname</i>.</p>
<p>The required mappings are established with the method <b class="method">map</b> of
a frontend, as explained in section <b class="sectref">OBJECT METHODS</b>
of the documentation for the package <b class="package"><a href="doctools.html">doctools</a></b>.</p></dd>
<dt><a name="6"><b class="cmd">dt_format</b></a></dt>
<dd><p>Query command. It returns the name of the format associated with the
doctools formatting engine.</p></dd>
<dt><a name="7"><b class="cmd">dt_imgdata</b> <i class="arg">key</i> <i class="arg">extensions</i></a></dt>
<dd><p>Query command. Access to the image map. Looks for an image recorded
under the <i class="arg">key</i> and having on the specified <i class="arg">extension</i>. If a
matching image is found its data is returned as the result of the
command. Otherwise an empty string is returned.</p></dd>
<dt><a name="8"><b class="cmd">dt_imgdst</b> <i class="arg">key</i> <i class="arg">extensions</i></a></dt>
<dd><p>Query command. Access to the image map. Looks for an image recorded
under the <i class="arg">key</i> and having on the specified <i class="arg">extension</i>. If a
matching image is found its destination path in the output is returned
as the result of the command. Otherwise an empty string is returned.</p></dd>
<dt><a name="9"><b class="cmd">dt_imgsrc</b> <i class="arg">key</i> <i class="arg">extensions</i></a></dt>
<dd><p>Query command. Access to the image map. Looks for an image recorded
under the <i class="arg">key</i> and having on the specified <i class="arg">extension</i>. If a
matching image is found its origin path is returned as the result of
the command. Otherwise an empty string is returned.</p></dd>
<dt><a name="10"><b class="cmd">dt_lnesting</b></a></dt>
<dd><p>Query command. It returns the number of lists currently open.</p></dd>
<dt><a name="11"><b class="cmd">dt_module</b></a></dt>
<dd><p>Query command. It returns the name of the module the input currently
processed belongs to.</p></dd>
<dt><a name="12"><b class="cmd">dt_read</b> <i class="arg">file</i></a></dt>
<dd><p>Controlled filesystem access. Returns contents of <i class="arg">file</i> for
whatever use desired by the plugin.
Only files which are either in the same directory as the file
containing the engine, or below it, can be loaded. Trying to load a
file outside of this directory causes an error.</p></dd>
<dt><a name="13"><b class="cmd">dt_source</b> <i class="arg">file</i></a></dt>
<dd><p>Controlled filesystem access. This command allows the doctools
formatting engine to load additional Tcl code it may need.
Only files which are either in the same directory as the file
containing the engine, or below it, can be loaded. Trying to load a
file outside of this directory causes an error.</p></dd>
<dt><a name="14"><b class="cmd">dt_user</b></a></dt>
<dd><p>Query command. It returns the name of the current user as known to the
tcl interpreter the frontend controlling the formatting engine resides
in.</p></dd>
<dt><a name="15"><b class="cmd">ex_cappend</b> <i class="arg">text</i></a></dt>
<dd><p>Appends a string to the output in the current context.  This command
should rarely be used by macros or application code.</p></dd>
<dt><a name="16"><b class="cmd">ex_cget</b> <i class="arg">varname</i></a></dt>
<dd><p>Retrieves the value of variable <i class="arg">varname</i>, defined in the current
context.</p></dd>
<dt><a name="17"><b class="cmd">ex_cis</b> <i class="arg">cname</i></a></dt>
<dd><p>Determines whether or not the name of the current context is
<i class="arg">cname</i>.</p></dd>
<dt><a name="18"><b class="cmd">ex_cname</b></a></dt>
<dd><p>Returns the name of the current context.</p></dd>
<dt><a name="19"><b class="cmd">ex_cpop</b> <i class="arg">cname</i></a></dt>
<dd><p>Pops a context from the context stack, returning all accumulated
output in that context.  The context must be named <i class="arg">cname</i>, or an
error results.</p></dd>
<dt><a name="20"><b class="cmd">ex_cpush</b> <i class="arg">cname</i></a></dt>
<dd><p>Pushes a context named <i class="arg">cname</i> onto the context stack.  The
context must be popped by <b class="method">cpop</b> before expansion ends or an
error results.</p></dd>
<dt><a name="21"><b class="cmd">ex_cset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Sets variable <i class="arg">varname</i> to <i class="arg">value</i> in the current context.</p></dd>
<dt><a name="22"><b class="cmd">ex_lb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></dt>
<dd><p>Returns the current value of the left macro expansion bracket; this is
for use as or within a macro, when the bracket needs to be included in
the output text.  If <i class="arg">newbracket</i> is specified, it becomes the new
bracket, and is returned.</p></dd>
<dt><a name="23"><b class="cmd">ex_rb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></dt>
<dd><p>Returns the current value of the right macro expansion bracket; this
is for use as or within a macro, when the bracket needs to be included
in the output text.  If <i class="arg">newbracket</i> is specified, it becomes the
new bracket, and is returned.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PLUGIN COMMANDS</a></h2>
<p>The plugin has to provide its own set of commands which will then be
called by the frontend in a specific sequence while processing
input. They fall into two categories, management and formatting. Their
expected names, signatures, and responsibilities are specified in the
following two subsections.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Management commands</a></h3>
<p>The management commands a plugin has to provide are used by the
frontend to</p>
<ol class="doctools_enumerated">
<li><p>initialize and shutdown the plugin</p></li>
<li><p>determine the number of passes it has
       to make over the input</p></li>
<li><p>initialize and shutdown each pass</p></li>
<li><p>query and initialize engine parameters</p></li>
</ol>
<p>After the plugin has been loaded and the frontend commands are
established the commands will be called in the following sequence:</p>
<pre class="doctools_example">
    fmt_numpasses -&gt; n
    fmt_listvariables -&gt; vars
    fmt_varset var1 value1
    fmt_varset var2 value2
    ...
    fmt_varset varK valueK
    fmt_initialize
    fmt_setup 1
    ...
    fmt_setup 2
    ...
    ...
    fmt_setup n
    ...
    fmt_postprocess
    fmt_shutdown
    ...
</pre>
<p>I.e. first the number of passes and the set of available engine
parameters is established, followed by calls setting the
parameters. That second part is optional.</p>
<p>After that the plugin is initialized, the specified number of passes
executed, the final result run through a global post processing step
and at last the plugin is shutdown again. This can be followed by more
conversions, restarting the sequence at <b class="cmd">fmt_varset</b>.</p>
<p>In each of the passes, i.e. after the calls of <b class="cmd">fmt_setup</b> the
frontend will process the input and call the formatting commands as
markup is encountered. This means that the sequence of formatting
commands is determined by the grammar of the doctools markup language,
as specified in the <i class="term"><a href="doctools_lang_syntax.html">doctools language syntax</a></i> specification.</p>
<p>A different way of looking at the sequence is:</p>
<ul class="doctools_itemized">
<li><p>First some basic parameters are determined.</p></li>
<li><p>Then everything starting at the first <b class="cmd">fmt_varset</b> to
<b class="cmd">fmt_shutdown</b> forms a <i class="term">run</i>, the formatting of a
single input. Each run can be followed by more.</p></li>
<li><p>Embedded within each run we have one or more <i class="term">passes</i>,
each starting with <b class="cmd">fmt_setup</b> and going until either the next
<b class="cmd">fmt_setup</b> or <b class="cmd">fmt_postprocess</b> is reached.</p>
<p>If more than one pass is required to perform the formatting only the
output of the last pass is relevant. The output of all the previous,
preparatory passes is ignored.</p></li>
</ul>
<p>The commands, their names, signatures, and responsibilities are, in
detail:</p>
<dl class="doctools_definitions">
<dt><a name="24"><b class="cmd">fmt_initialize</b></a></dt>
<dd><p><em>Initialization/Shutdown</em>.
This command is called at the beginning of every conversion run, as
the first command of that run. Note that a run is not a pass, but may
consist of multiple passes.
It has to initialize the general state of the plugin, beyond the
initialization done during the load. No return value is expected, and
any returned value is ignored.</p></dd>
<dt><a name="25"><b class="cmd">fmt_listvariables</b></a></dt>
<dd><p><em>Initialization/Shutdown</em> and <em>Engine parameters</em>.
Second command is called after the plugin code has been loaded,
i.e. immediately after <b class="cmd">fmt_numpasses</b>.
It has to return a list containing the names of the parameters the
frontend can set to configure the engine. This list can be empty.</p></dd>
<dt><a name="26"><b class="cmd">fmt_numpasses</b></a></dt>
<dd><p><em>Initialization/Shutdown</em> and <em>Pass management</em>.
First command called after the plugin code has been loaded. No other
command of the engine will be called before it.
It has to return the number of passes this engine requires to fully
process the input document. This value has to be an integer number
greater or equal to one.</p></dd>
<dt><a name="27"><b class="cmd">fmt_postprocess</b> <i class="arg">text</i></a></dt>
<dd><p><em>Initialization/Shutdown</em>.
This command is called immediately after the last pass in a run. Its
argument is the result of the conversion generated by that pass. It is
provided to allow the engine to perform any global modifications of
the generated document. If no post-processing is required for a
specific format the command has to just return the argument.</p>
<p>Expected to return a value, the final result of formatting the input.</p></dd>
<dt><a name="28"><b class="cmd">fmt_setup</b> <i class="arg">n</i></a></dt>
<dd><p><em>Initialization/Shutdown</em> and <em>Pass management</em>.
This command is called at the beginning of each pass over the input in
a run. Its argument is the number of the pass which has begun. Passes
are counted from <b class="const">1</b> upward.
The command has to set up the internal state of the plugin for this
particular pass. No return value is expected, and any returned value
is ignored.</p></dd>
<dt><a name="29"><b class="cmd">fmt_shutdown</b></a></dt>
<dd><p><em>Initialization/Shutdown</em>.
This command is called at the end of every conversion run. It is the
last command called in a run. It has to clean up of all the
run-specific state in the plugin.
After the call the engine has to be in a state which allows the
initiation of another run without fear that information from the last
run is leaked into this new run.
No return value is expected, and any returned value is ignored.</p></dd>
<dt><a name="30"><b class="cmd">fmt_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></dt>
<dd><p><em>Engine parameters</em>.
This command is called by the frontend to set an engine parameter to a
particular value.
The parameter to change is specified by <i class="arg">varname</i>, the value to
set in <i class="arg">text</i>.</p>
<p>The command has to throw an error if an unknown <i class="arg">varname</i> is
used. Only the names returned by <b class="cmd">fmt_listvariables</b> have to be
considered as known.</p>
<p>The values of all engine parameters have to persist between passes and
runs.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Formatting commands</a></h3>
<p>The formatting commands have to implement the formatting for the
output format, for all the markup commands of the doctools markup
language, except <b class="cmd">lb</b>, <b class="cmd">rb</b>, <b class="cmd">vset</b>, <b class="cmd">include</b>, and
<b class="cmd"><a href="../../../../index.html#key155">comment</a></b>. These exceptions are processed by the frontend and are
never seen by the plugin. In return a command for the formatting of
plain text has to be provided, something which has no markup in the
input at all.</p>
<p>This means, that each of the 49 markup commands specified in the
<i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i> and outside of the set of
exceptions listed above has an equivalent formatting command which
takes the same arguments as the markup command and whose name is the
name of markup command with the prefix <em>fmt_</em> added to it.</p>
<p>All commands are expected to format their input in some way per the
semantics specified in the command reference and to return whatever
part of this that they deem necessary as their result, which will be
added to the output.</p>
<p>To avoid essentially duplicating the command reference we do not list
any of the command here and simply refer the reader to the
<i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i> for their signature and
description. The sole exception is the plain text formatter, which has
no equivalent markup command.</p>
<p>The calling sequence of formatting commands is not as rigid as for the
management commands, but determined by the grammar of the doctools
markup language, as specified in the <i class="term"><a href="doctools_lang_syntax.html">doctools language syntax</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="31"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></dt>
<dd><p><em>No associated markup command</em>.</p>
<p>Called by the frontend for any plain text encountered in the
input. It has to perform any and all special processing required for
plain text.</p>
<p>The formatted text is expected as the result of the command,
and added to the output. If no special processing is required it has
to simply return its argument without change.</p></dd>
</dl>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools.html">doctools</a>, <a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key659">document</a>, <a href="../../../../index.html#key657">formatter</a>, <a href="../../../../index.html#key658">formatting engine</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools/mpexpand.html.



































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

<div class='fossil-doc' data-title='mpexpand - Documentation toolbox'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">mpexpand(n) 1.0 tcllib &quot;Documentation toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>mpexpand - Markup processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">NOTES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">mpexpand</b> <span class="opt">?-module <i class="arg">module</i>?</span> <i class="arg">format</i> <i class="arg">infile</i>|- <i class="arg">outfile</i>|-</a></li>
<li><a href="#2"><b class="cmd">mpexpand.all</b> <span class="opt">?<i class="arg">-verbose</i>?</span> <span class="opt">?<i class="arg">module</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This manpage describes a processor / converter for manpages in the
doctools format as specified in <b class="cmd">doctools_fmt</b>. The processor
is based upon the package <b class="package"><a href="doctools.html">doctools</a></b>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">mpexpand</b> <span class="opt">?-module <i class="arg">module</i>?</span> <i class="arg">format</i> <i class="arg">infile</i>|- <i class="arg">outfile</i>|-</a></dt>
<dd><p>The processor takes three arguments, namely the code describing which
formatting to generate as the output, the file to read the markup
from, and the file to write the generated output into. If the
<i class="arg">infile</i> is &quot;<b class="const">-</b>&quot; the processor will read from
<b class="const">stdin</b>. If <i class="arg">outfile</i> is &quot;<b class="const">-</b>&quot; the processor will
write to <b class="const">stdout</b>.</p>
<p>If the option <i class="arg">-module</i> is present its value overrides the internal
definition of the module name.</p>
<p>The currently known output formats are</p>
<dl class="doctools_definitions">
<dt><b class="const">nroff</b></dt>
<dd><p>The processor generates *roff output, the standard format for unix
manpages.</p></dd>
<dt><b class="const">html</b></dt>
<dd><p>The processor generates HTML output, for usage in and display by web
browsers.</p></dd>
<dt><b class="const">tmml</b></dt>
<dd><p>The processor generates TMML output, the Tcl Manpage Markup Language,
a derivative of XML.</p></dd>
<dt><b class="const">latex</b></dt>
<dd><p>The processor generates LaTeX output.</p></dd>
<dt><b class="const">wiki</b></dt>
<dd><p>The processor generates Wiki markup as understood by <b class="syscmd">wikit</b>.</p></dd>
<dt><b class="const">list</b></dt>
<dd><p>The processor extracts the information provided by <b class="cmd">manpage_begin</b>.</p></dd>
<dt><b class="const">null</b></dt>
<dd><p>The processor does not generate any output.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">mpexpand.all</b> <span class="opt">?<i class="arg">-verbose</i>?</span> <span class="opt">?<i class="arg">module</i>?</span></a></dt>
<dd><p>This command uses <b class="syscmd">mpexpand</b> to generate all possible output
formats for all manpages in the current directory. The manpages are
recognized through the extension &quot;<b class="file">.man</b>&quot;. If <i class="arg">-verbose</i> is
specified the command will list its actions before executing them.</p>
<p>The <i class="arg">module</i> information is passed to <b class="cmd">mpexpand</b>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">NOTES</a></h2>
<p>Possible future formats are plain text, pdf and postscript.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>expander(n), format(n), formatter(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2003 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2base/html_cssdefaults.html.



































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161

<div class='fossil-doc' data-title='doctools::html::cssdefaults - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::html::cssdefaults(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::html::cssdefaults - Default CSS style for HTML export plugins</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::html::cssdefaults <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::html::cssdefaults::contents</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single command providing access to the text of
the default CSS style to use for HTML markup generated by the various
HTML export plugins.</p>
<p>This is an internal package of doctools, for use by <i class="term"><a href="../../../../index.html#key260">export</a></i> plugins,
i.e. the packages converting doctools related documented into other
formats, most notably <i class="term"><a href="../../../../index.html#key18">HTML</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::html::cssdefaults::contents</b></a></dt>
<dd><p>This command returns the text of the default CSS style to use for HTML
markup generated by the various HTML export plugins.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key406">CSS</a>, <a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key405">style</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2base/nroff_manmacros.html.



































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161

<div class='fossil-doc' data-title='doctools::nroff::man_macros - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::nroff::man_macros(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::nroff::man_macros - Default CSS style for NROFF export plugins</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::nroff::man_macros <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::nroff::man_macros::contents</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single command providing access to the
definition of the nroff <em>man</em> macro set to use for NROFF markup
generated by the various NROFF export plugins.</p>
<p>This is an internal package of doctools, for use by <i class="term"><a href="../../../../index.html#key260">export</a></i> plugins,
i.e. the packages converting doctools related documented into other
formats, most notably <i class="term"><a href="../../../../index.html#key21">nroff</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::nroff::man_macros::contents</b></a></dt>
<dd><p>This command returns the text of the default CSS style to use for NROFF
generated by the various NROFF export plugins.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key527">macros</a>, <a href="../../../../index.html#key526">man_macros</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key252">plugin</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2base/tcl_parse.html.

















































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264

<div class='fossil-doc' data-title='doctools::tcl::parse - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::tcl::parse(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::tcl::parse - Processing text in 'subst -novariables' format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error format</a></li>
<li class="doctools_section"><a href="#section4">Tree Structure</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::stack</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">treeql</b></li>
<li>package require <b class="pkgname">doctools::tcl::parse</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::tcl::parse</b> <b class="method">text</b> <i class="arg">tree</i> <i class="arg">text</i> <span class="opt">?<i class="arg">root</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::tcl::parse</b> <b class="method">file</b> <i class="arg">tree</i> <i class="arg">path</i> <span class="opt">?<i class="arg">root</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for parsing text with embedded Tcl
commands as accepted by the Tcl builtin command
<b class="cmd">subst -novariables</b>. The result of the parsing is an abstract
syntax tree.</p>
<p>This is an internal package of doctools, for use by the higher level
parsers processing the <i class="term"><a href="../../../../index.html#key178">docidx</a></i>, <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>, and <i class="term"><a href="../../../../index.html#key179">doctools</a></i>
markup languages.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::tcl::parse</b> <b class="method">text</b> <i class="arg">tree</i> <i class="arg">text</i> <span class="opt">?<i class="arg">root</i>?</span></a></dt>
<dd><p>The command takes the <i class="arg">text</i> and parses it under the assumption
that it contains a string acceptable to the Tcl builtin command
<b class="cmd">subst -novariables</b>. Errors are thrown otherwise during the
parsing. The format used for these errors in described in section
<span class="sectref"><a href="#section3">Error format</a></span>.</p>
<p>The command returns the empty string as it result. The actual result
of the parsing is entered into the tree structure <i class="arg">tree</i>, under
the node <i class="arg">root</i>.
If <i class="arg">root</i> is not specified the root of <i class="arg">tree</i> is used. The
<i class="arg">tree</i> has to exist and be the command of a tree object which
supports the same methods as trees created by the package
<b class="package"><a href="../struct/struct_tree.html">struct::tree</a></b>.</p>
<p>In case of errors <i class="arg">tree</i> will be left in an undefined state.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::tcl::parse</b> <b class="method">file</b> <i class="arg">tree</i> <i class="arg">path</i> <span class="opt">?<i class="arg">root</i>?</span></a></dt>
<dd><p>The same as <b class="method">text</b>, except that the text to parse is read from
the file specified by <i class="arg">path</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error format</a></h2>
<p>When the parser encounters a problem in the input
it will throw an error using the format described
here.</p>
<ol class="doctools_enumerated">
<li><p>The message will contain the reason for the problem (unexpected
character or end of input in input), the character in question, if
any, and the line and column the problem was found at, in a human
readable form. This part is not documented further as its format may
change as we see fit. It is intended for human consumption, not
machine.</p></li>
<li><p>The error code however will contain a machine-readable representation
of the problem, in the form of a 5-element list containing, in the
order listed below</p>
<ol class="doctools_enumerated">
<li><p>the constant string <b class="const">doctools::tcl::parse</b></p></li>
<li><p>the cause of the problem, one of</p>
<dl class="doctools_definitions">
<dt><b class="const">char</b></dt>
<dd><p>Unexpected character in input</p></dd>
<dt><b class="const">eof</b></dt>
<dd><p>Unexpected end of the input</p></dd>
</dl>
</li>
<li><p>The location of the problem as offset from the beginning of the input,
counted in characters. Note: Line markers count as one character.</p></li>
<li><p>The line the problem was found on (counted from 1 (one)),</p></li>
<li><p>The column the problem was found at (counted from 0 (zero))</p></li>
</ol>
</li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Tree Structure</a></h2>
<p>After successfully parsing a string the generated tree will have the
following structure:</p>
<ol class="doctools_enumerated">
<li><p>In the following items the word 'root' refers to the node which was
specified as the root of the tree when invoking either <b class="method">text</b>
or <b class="method">file</b>. This may be the actual root of the tree.</p></li>
<li><p>All the following items further ignore the possibility of pre-existing
attributes in the pre-existing nodes. If attributes exists with the
same names as the attributes used by the parser the pre-existing
values are written over. Attributes with names not clashing with the
parser's attributes are not touched.</p></li>
<li><p>The root node has no attributes.</p></li>
<li><p>All other nodes have the attributes</p>
<dl class="doctools_definitions">
<dt>type</dt>
<dd><p>The value is a string from the set { Command , Text , Word }</p></dd>
<dt>range</dt>
<dd><p>The value is either empty or a 2-element list containing integer
numbers. The numbers are the offsets of the first and last character
in the input text, of the token described by the node,.</p></dd>
<dt>line</dt>
<dd><p>The value is an integer, it describes the line in the input the token
described by the node ends on. Lines are counted from 1 (<b class="const">one</b>).</p></dd>
<dt>col</dt>
<dd><p>The value is an integer, it describes the column in the line in the
input the token described by the node ends on. Columns are counted
from 0 (<b class="const">zero</b>).</p></dd>
</dl>
</li>
<li><p>The children of the root, if any, are of type Command and Text, in
semi-alternation. This means: After a Text node a Command node has to
follow, and anything can follow a Command node, a Text or other
Command node.</p></li>
<li><p>The children of a Command node, if any, are of type Command, and Text,
and Word, they describe the arguments of the command.</p></li>
<li><p>The children of a Word node, if any, are of type Command, Text, in
semi-alternation. This means: After a Text node a Command node has to
follow, and anything can follow a Command node, a Text or other
Command node.</p></li>
<li><p>A Word node without children represents the empty string.</p></li>
<li><p>All Text nodes are leaves of the tree.</p></li>
<li><p>All leaves of the tree are either Text or Command nodes.
Word nodes cannot be leaves.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key274">Tcl syntax</a>, <a href="../../../../index.html#key275">command</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key273">subst</a>, <a href="../../../../index.html#key272">word</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2base/tcllib_msgcat.html.



































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177

<div class='fossil-doc' data-title='doctools::msgcat - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat - Message catalog management for the various document parsers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">msgcat</b></li>
<li>package require <b class="pkgname">doctools::msgcat <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::msgcat::init</b> <i class="arg">prefix</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">doctools::msgcat</b> is a support module handling
the selection of message catalogs for the various document processing
packages in the doctools system version 2. As such it is an internal
package a regular user (developer) should not be in direct contact
with.</p>
<p>If you are such please go the documentation of either</p>
<ol class="doctools_enumerated">
<li><p><b class="package">doctools::doc</b>,</p></li>
<li><p><b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b>, or</p></li>
<li><p><b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b></p></li>
</ol>
<p>Within the system architecture this package resides under the various
parser packages, and is shared by them. Underneath it, but not
explicit dependencies, are the packages providing the message catalogs
for the various languages.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::msgcat::init</b> <i class="arg">prefix</i></a></dt>
<dd><p>The command locates and loads the message catalogs for all the
languages returned by <b class="cmd">msgcat::mcpreferences</b>, provided that they
could be found. It returns an integer number describing how many
packages were found and loaded.</p>
<p>The names of the packages the command will look for have the form
&quot;doctools::msgcat::<i class="arg">prefix</i>::<b class="variable">langcode</b>&quot;, with <i class="arg">prefix</i>
the argument to the command, and the <b class="variable">langcode</b> supplied by the
result of <b class="cmd">msgcat::mcpreferences</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/export_docidx.html.















































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295

<div class='fossil-doc' data-title='doctools::idx::export::docidx - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::docidx(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::docidx - docidx export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">[docidx] notation of keyword indices</a></li>
<li class="doctools_section"><a href="#section4">Configuration</a></li>
<li class="doctools_section"><a href="#section5">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::docidx <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of docidx markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates docidx markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">[docidx] notation of keyword indices</a></h2>
<p>The docidx format for keyword indices, also called the
<i class="term">docidx markup language</i>, is too large to be covered in single
section.
The interested reader should start with the document</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/docidx_lang_intro.html">docidx language introduction</a></i></p></li>
</ol>
<p>and then proceed from there to the formal specifications, i.e. the
documents</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/docidx_lang_syntax.html">docidx language syntax</a></i> and</p></li>
<li><p><i class="term"><a href="../doctools/docidx_lang_cmdref.html">docidx language command reference</a></i>.</p></li>
</ol>
<p>to get a thorough understanding of the language.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Configuration</a></h2>
<p>The docidx export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">user</i></dt>
<dd><p>This standard configuration variable contains the name of the user
running the process which invoked the export plugin.
The plugin puts this information into the provenance comment at the
beginning of the generated document.</p></dd>
<dt>string <i class="arg">file</i></dt>
<dd><p>This standard configuration variable contains the name of the file the
index came from. This variable may not be set or contain the empty
string.
The plugin puts this information, if defined, i.e. set and not the
empty string, into the provenance comment at the beginning of the
generated document.</p></dd>
<dt>boolean <i class="arg">newlines</i></dt>
<dd><p>If this flag is set the plugin will break the generated docidx code
across lines, with each markup command on a separate line.</p>
<p>If this flag is not set (the default), the whole document will be
written on a single line, with minimum spacing between all elements.</p></dd>
<dt>boolean <i class="arg">indented</i></dt>
<dd><p>If this flag is set the plugin will indent the markup commands
according to the structure of indices. To make this work this also
implies that <b class="variable">newlines</b> is set. This effect is independent of the
value for <b class="variable">aligned</b> however.</p>
<p>If this flag is not set (the default), the output is formatted as per
the values of <b class="variable">newlines</b> and <b class="variable">aligned</b>, and no indenting is
done.</p></dd>
<dt>boolean <i class="arg">aligned</i></dt>
<dd><p>If this flag is set the generator ensures that the arguments for the
<b class="cmd"><a href="../../../../index.html#key17">manpage</a></b> and <b class="cmd"><a href="../../../../index.html#key246">url</a></b> commands in a keyword section are aligned
vertically for a nice table effect. To make this work this also
implies that <b class="variable">newlines</b> is set. This effect is independent of the
value for <b class="variable">indented</b> however.</p>
<p>If this flag is not set (the default), the output is formatted as per
the values of <b class="variable">newlines</b> and <b class="variable">indented</b>, and no alignment is
done.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">format</b>, and <b class="variable">map</b>, and their values.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_container.html.















































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439

<div class='fossil-doc' data-title='doctools::idx - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx(n) 2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx - Holding keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Concepts</a></li>
<li class="doctools_section"><a href="#section3">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::idx <span class="opt">?2?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">key add</b> <i class="arg">name</i></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">key remove</b> <i class="arg">name</i></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">key references</b> <i class="arg">name</i></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">keys</b></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">reference add</b> <i class="arg">type</i> <i class="arg">key</i> <i class="arg">name</i> <i class="arg">label</i></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">reference remove</b> <i class="arg">name</i></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">reference label</b> <i class="arg">name</i></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">reference keys</b> <i class="arg">name</i></a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">reference type</b> <i class="arg">name</i></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">references</b></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">title</b></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">title</b> <i class="arg">text</i></a></li>
<li><a href="#16"><i class="arg">objectName</i> <b class="method">label</b></a></li>
<li><a href="#17"><i class="arg">objectName</i> <b class="method">label</b> <i class="arg">text</i></a></li>
<li><a href="#18"><i class="arg">objectName</i> <b class="method">importer</b></a></li>
<li><a href="#19"><i class="arg">objectName</i> <b class="method">importer</b> <i class="arg">object</i></a></li>
<li><a href="#20"><i class="arg">objectName</i> <b class="method">exporter</b></a></li>
<li><a href="#21"><i class="arg">objectName</i> <b class="method">exporter</b> <i class="arg">object</i></a></li>
<li><a href="#22"><i class="arg">objectName</i> <b class="method">deserialize =</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#23"><i class="arg">objectName</i> <b class="method">deserialize +=</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#24"><i class="arg">objectName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">format</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to contain and programmatically
manipulate keyword indices</p>
<p>This is one of the three public pillars the management of keyword
indices resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="idx_export.html">Exporting keyword indices</a></i>, and</p></li>
<li><p><i class="term"><a href="idx_import.html">Importing keyword indices</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of keyword indices, and
their parts, see the same-named section.
For information about the data structure which is used to encode
keyword indices as values see the section
<span class="sectref"><a href="#section4">Keyword index serialization format</a></span>.
This is the only format directly known to this class. Conversions from
and to any other format are handled by export and import manager
objects. These may be attached to a container, but do not have to be,
it is merely a convenience.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key184">keyword index</a></i> consists of a (possibly empty) set of <i class="term"><a href="../../../../index.html#key779">keywords</a></i>.</p></li>
<li><p>Each keyword in the set is identified by its name.</p></li>
<li><p>Each keyword has a (possibly empty) set of <i class="term">references</i>.</p></li>
<li><p>A reference can be associated with more than one keyword.</p></li>
<li><p>A reference not associated with at least one keyword is not possible
however.</p></li>
<li><p>Each reference is identified by its target, specified as either an url
or symbolic filename, depending on the type of reference (<b class="const">url</b>,
or <b class="const">manpage</b>).</p></li>
<li><p>The type of a reference (url, or manpage) depends only on the
reference itself, and not the keywords it is associated with.</p></li>
<li><p>In addition to a type each reference has a descriptive label as
well. This label depends only on the reference itself, and not the
keywords it is associated with.</p></li>
</ol>
<p>A few notes</p>
<ol class="doctools_enumerated">
<li><p>Manpage references are intended to be used for references to the
documents the index is made for. Their target is a symbolic file name
identifying the document, and export plugins may replace symbolic with
actual file names, if specified.</p></li>
<li><p>Url references are intended on the othre hand are inteded to be used
for links to anything else, like websites. Their target is an url.</p></li>
<li><p>While url and manpage references share a namespace for their
identifiers, this should be no problem, given that manpage identifiers
are symbolic filenames and as such they should never look like urls,
the identifiers for url references.</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new container object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::doctools::idx</b> command have the
following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">key add</b> <i class="arg">name</i></a></dt>
<dd><p>This method adds the keyword <i class="arg">name</i> to the index. If the keyword
is already known nothing is done. The result of the method is the
empty string.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">key remove</b> <i class="arg">name</i></a></dt>
<dd><p>This method removes the keyword <i class="arg">name</i> from the index. If the
keyword is already gone nothing is done. Any references for whom this
keyword was the last association are removed as well.  The result of
the method is the empty string.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">key references</b> <i class="arg">name</i></a></dt>
<dd><p>This method returns a list containing the names of all references
associated with the keyword <i class="arg">name</i>. An error is thrown in the
keyword is not known to the index. The order of the references in the
list is undefined.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">keys</b></a></dt>
<dd><p>This method returns a list containing the names of all keywords known
to the index. The order of the keywords in the list is undefined.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">reference add</b> <i class="arg">type</i> <i class="arg">key</i> <i class="arg">name</i> <i class="arg">label</i></a></dt>
<dd><p>This method adds the reference <i class="arg">name</i> to the index and associates
it with the keyword <i class="arg">key</i>.
The other two arguments hold the <i class="arg">type</i> and <i class="arg">label</i> of the
reference, respectively.
The type has to match the stored information, should the reference
exist already, i.e. this information is immutable after the reference
is known. The only way to change it is delete and recreate the
reference.
The label on the other hand is automatically updated to the value of
the argument, overwriting any previously stored information.
Should the reference exists already it is simply associated with the
<i class="arg">key</i>.  If that is true already as well nothing is done, but the
<i class="arg">label</i> updated to the new value.  The result of the method is the
empty string.</p>
<p>The <i class="arg">type</i> argument has be to one of <b class="const">manpage</b> or <b class="const">url</b>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">reference remove</b> <i class="arg">name</i></a></dt>
<dd><p>The reference <i class="arg">name</i> is removed from the index. All associations
with keywords are released and the relevant reference labels removed.
The result of the method is the empty string.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">reference label</b> <i class="arg">name</i></a></dt>
<dd><p>This method returns the label associated with the reference
<i class="arg">name</i>. An error is thrown if the reference is not known.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">reference keys</b> <i class="arg">name</i></a></dt>
<dd><p>This method returns a list containing the names of all keywords
associated with the reference <i class="arg">name</i>. An error is thrown in the
reference is not known to the index. The order of the keywords in the
list is undefined.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">reference type</b> <i class="arg">name</i></a></dt>
<dd><p>This method returns the type of the reference <i class="arg">name</i>. An error is
thrown in the reference is not known to the index.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">references</b></a></dt>
<dd><p>This method returns a list containing the names of all references
known to the index. The order of the references in the list is
undefined.</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">title</b></a></dt>
<dd><p>Returns the currently defined title of the keyword index.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">title</b> <i class="arg">text</i></a></dt>
<dd><p>Sets the title of the keyword index to <i class="arg">text</i>, and returns it as
the result of the command.</p></dd>
<dt><a name="16"><i class="arg">objectName</i> <b class="method">label</b></a></dt>
<dd><p>Returns the currently defined label of the keyword index.</p></dd>
<dt><a name="17"><i class="arg">objectName</i> <b class="method">label</b> <i class="arg">text</i></a></dt>
<dd><p>Sets the label of the keyword index to <i class="arg">text</i>, and returns it as
the result of the command.</p></dd>
<dt><a name="18"><i class="arg">objectName</i> <b class="method">importer</b></a></dt>
<dd><p>Returns the import manager object currently attached to the container,
if any.</p></dd>
<dt><a name="19"><i class="arg">objectName</i> <b class="method">importer</b> <i class="arg">object</i></a></dt>
<dd><p>Attaches the <i class="arg">object</i> as import manager to the container, and
returns it as the result of the command.
Note that the <i class="arg">object</i> is <em>not</em> put into ownership of the
container. I.e., destruction of the container will <em>not</em> destroy
the <i class="arg">object</i>.</p>
<p>It is expected that <i class="arg">object</i> provides a method named
<b class="method">import text</b> which takes a text and a format name, and
returns the canonical serialization of the keyword index contained in
the text, assuming the given format.</p></dd>
<dt><a name="20"><i class="arg">objectName</i> <b class="method">exporter</b></a></dt>
<dd><p>Returns the export manager object currently attached to the container,
if any.</p></dd>
<dt><a name="21"><i class="arg">objectName</i> <b class="method">exporter</b> <i class="arg">object</i></a></dt>
<dd><p>Attaches the <i class="arg">object</i> as export manager to the container, and
returns it as the result of the command.
Note that the <i class="arg">object</i> is <em>not</em> put into ownership of the
container. I.e., destruction of the container will <em>not</em> destroy
the <i class="arg">object</i>.</p>
<p>It is expected that <i class="arg">object</i> provides a method named
<b class="method">export object</b> which takes the container and a format name,
and returns a text encoding keyword index stored in the container, in
the given format. It is further expected that the <i class="arg">object</i> will
use the container's method <b class="method">serialize</b> to obtain the
serialization of the keyword index from which to generate the text.</p></dd>
<dt><a name="22"><i class="arg">objectName</i> <b class="method">deserialize =</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method replaces the contents of the index object with the index
contained in the <i class="arg">data</i>. If no <i class="arg">format</i> was specified it is
assumed to be the regular serialization of a keyword index.</p>
<p>Otherwise the object will use the attached import manager to convert
the data from the specified format to a serialization it can handle.
In that case an error will be thrown if the container has no import
manager attached to it.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="23"><i class="arg">objectName</i> <b class="method">deserialize +=</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method behaves like <b class="method">deserialize =</b> in its essentials,
except that it merges the keyword index in the <i class="arg">data</i> to its
contents instead of replacing it.
The method will throw an error if merging is not possible, i.e. would
produce an invalid index. The existing content is left unchanged in
that case.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="24"><i class="arg">objectName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method returns the keyword index contained in the object. If no
<i class="arg">format</i> is not specified the returned result is the canonical
serialization of its contents.</p>
<p>Otherwise the object will use the attached export manager to convert
the data to the specified format.
In that case an error will be thrown if the container has no export
manager attached to it.</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key249">docidx markup</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key250">generation</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key245">tcler's wiki</a>, <a href="../../../../index.html#key248">text</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_export.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453

<div class='fossil-doc' data-title='doctools::idx::export - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export - Exporting keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Concepts</a></li>
<li class="doctools_section"><a href="#section3">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Export plugin API v2 reference</a></li>
<li class="doctools_section"><a href="#section5">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::idx::export <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::config</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::export</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">config names</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">config get</b></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#10"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the export of
keyword indices to other formats, i.e. their conversion to, for
example <i class="term"><a href="../../../../index.html#key178">docidx</a></i>, <i class="term"><a href="../../../../index.html#key18">HTML</a></i>, etc.</p>
<p>This is one of the three public pillars the management of keyword
indices resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="idx_import.html">Importing keyword indices</a></i>, and</p></li>
<li><p><i class="term"><a href="idx_container.html">Holding keyword indices</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of keyword indices, and
their parts, see the same-named section.
For information about the data structure which is the major input to
the manager objects provided by this package see the section
<span class="sectref"><a href="#section5">Keyword index serialization format</a></span>.</p>
<p>The plugin system of our class is based on the package
<b class="package"><a href="../pluginmgr/pluginmgr.html">pluginmgr</a></b>, and configured to look for plugins using</p>
<ol class="doctools_enumerated">
<li><p>the environment variable <b class="variable">DOCTOOLS_IDX_EXPORT_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">DOCTOOLS_IDX_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">DOCTOOLS_PLUGINS</b>,</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/idx/export/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/idx/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/idx/export/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/idx/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/plugins</b>&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\IDX\EXPORT\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\IDX\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\PLUGINS&quot;</p></li>
</ol>
<p>The last three are used only when the package is run on a machine
using Windows(tm) operating system.</p>
<p>The whole system is delivered with six predefined export plugins,
namely</p>
<dl class="doctools_definitions">
<dt>docidx</dt>
<dd><p>See <i class="term"><a href="export_docidx.html">docidx export plugin</a></i> for details.</p></dd>
<dt>html</dt>
<dd><p>See <i class="term">html export plugin</i> for details.</p></dd>
<dt>json</dt>
<dd><p>See <i class="term">json export plugin</i> for details.</p></dd>
<dt>nroff</dt>
<dd><p>See <i class="term"><a href="idx_export_nroff.html">nroff export plugin</a></i> for details.</p></dd>
<dt>text</dt>
<dd><p>See <i class="term">text export plugin</i> for details.</p></dd>
<dt>wiki</dt>
<dd><p>See <i class="term"><a href="idx_export_wiki.html">wiki export plugin</a></i> for details.</p></dd>
</dl>
<p>Readers wishing to write their own export plugin for some format, i.e.
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Export plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key184">keyword index</a></i> consists of a (possibly empty) set of <i class="term"><a href="../../../../index.html#key779">keywords</a></i>.</p></li>
<li><p>Each keyword in the set is identified by its name.</p></li>
<li><p>Each keyword has a (possibly empty) set of <i class="term">references</i>.</p></li>
<li><p>A reference can be associated with more than one keyword.</p></li>
<li><p>A reference not associated with at least one keyword is not possible
however.</p></li>
<li><p>Each reference is identified by its target, specified as either an url
or symbolic filename, depending on the type of reference (<b class="const">url</b>,
or <b class="const">manpage</b>).</p></li>
<li><p>The type of a reference (url, or manpage) depends only on the
reference itself, and not the keywords it is associated with.</p></li>
<li><p>In addition to a type each reference has a descriptive label as
well. This label depends only on the reference itself, and not the
keywords it is associated with.</p></li>
</ol>
<p>A few notes</p>
<ol class="doctools_enumerated">
<li><p>Manpage references are intended to be used for references to the
documents the index is made for. Their target is a symbolic file name
identifying the document, and export plugins may replace symbolic with
actual file names, if specified.</p></li>
<li><p>Url references are intended on the othre hand are inteded to be used
for links to anything else, like websites. Their target is an url.</p></li>
<li><p>While url and manpage references share a namespace for their
identifiers, this should be no problem, given that manpage identifiers
are symbolic filenames and as such they should never look like urls,
the identifiers for url references.</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::export</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new export manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::doctools::idx::export</b> command have
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method takes the canonical serialization of a keyword index
stored in <i class="arg">serial</i> and converts it to the specified <i class="arg">format</i>,
using the export plugin for the format. An error is thrown if no
plugin could be found for the format.
The string generated by the conversion process is returned as
the result of this method.</p>
<p>If no format is specified the method defaults to <b class="const">docidx</b>.</p>
<p>The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>.</p>
<p>The plugin has to conform to the interface specified in section
<span class="sectref"><a href="#section4">Export plugin API v2 reference</a></span>.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method is a convenient wrapper around the <b class="method">export serial</b>
method described by the previous item.
It expects that <i class="arg">object</i> is an object command supporting a
<b class="method">serialize</b> method returning the canonical serialization of a
keyword index. It invokes that method, feeds the result into
<b class="method">export serial</b> and returns the resulting string as its own
result.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">config names</b></a></dt>
<dd><p>This method returns a list containing the names of all configuration
variables currently known to the object.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">config get</b></a></dt>
<dd><p>This method returns a dictionary containing the names and values of
all configuration variables currently known to the object.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Export plugin API v2 reference</a></h2>
<p>Plugins are what this package uses to manage the support for any
output format beyond the
<span class="sectref"><a href="#section5">Keyword index serialization format</a></span>. Here we specify the
API the objects created by this package use to interact with their
plugins.</p>
<p>A plugin for this package has to follow the rules listed below:</p>
<ol class="doctools_enumerated">
<li><p>A plugin is a package.</p></li>
<li><p>The name of a plugin package has the form
		doctools::idx::export::<b class="variable">FOO</b>,
       where <b class="variable">FOO</b> is the name of the format the plugin will
       generate output for. This name is also the argument to provide
       to the various <b class="method">export</b> methods of export manager
       objects to get a string encoding a keyword index in that
       format.</p></li>
<li><p>The plugin can expect that the package
       <b class="package">doctools::idx::export::plugin</b> is present, as
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="10"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an export manager of <b class="package"><a href="idx_container.html">doctools::idx</a></b> has to generate
output for an index it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">serial</i></dt>
<dd><p>This argument will contain the <i class="term">canonical</i> serialization of the
index for which to generate the output.
The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>.</p></dd>
<dt>dictionary <i class="arg">configuration</i></dt>
<dd><p>This argument will contain the current configuration to apply to the
generation, as a dictionary mapping from variable names to values.</p>
<p>The following configuration variables have a predefined meaning all
plugins have to obey, although they can ignore this information at
their discretion. Any other other configuration variables recognized
by a plugin will be described in the manpage for that plugin.</p>
<dl class="doctools_definitions">
<dt>user</dt>
<dd><p>This variable is expected to contain the name of the user
           owning the process invoking the plugin.</p></dd>
<dt>format</dt>
<dd><p>This variable is expected to contain the name of the
             format whose plugin is invoked.</p></dd>
<dt>file</dt>
<dd><p>This variable, if defined by the user of the index object
           is expected to contain the name of the input file for which
           the plugin is generating its output for.</p></dd>
<dt>map</dt>
<dd><p>This variable, if defined by the user of the index object is
          expected to contain a dictionary mapping from symbolic file
          names used in the references of type <b class="const">manpage</b> to
          actual paths (or urls). A plugin has to be able to handle
          the possibility that a symbolic name is without entry in
          this mapping.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#key260">export</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key250">generation</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key245">tcler's wiki</a>, <a href="../../../../index.html#key248">text</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_export_html.html.











































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357

<div class='fossil-doc' data-title='doctools::idx::export::html - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::html(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::html - HTML export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Configuration</a></li>
<li class="doctools_section"><a href="#section4">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::html <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::html</b></li>
<li>package require <b class="pkgname">doctools::html::cssdefaults</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of HTML markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates HTML markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Configuration</a></h2>
<p>The html export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">user</i></dt>
<dd><p>This standard configuration variable contains the name of the user
running the process which invoked the export plugin.
The plugin puts this information into the provenance comment at the
beginning of the generated document.</p></dd>
<dt>string <i class="arg">file</i></dt>
<dd><p>This standard configuration variable contains the name of the file the
index came from. This variable may not be set or contain the empty
string.
The plugin puts this information, if defined, i.e. set and not the
empty string, into the provenance comment at the beginning of the
generated document.</p></dd>
<dt>dictionary <i class="arg">map</i></dt>
<dd><p>This standard configuration variable contains a dictionary mapping
from the symbolic files names in manpage references to the actual
filenames and/or urls to be used in the output.</p>
<p>Url references and symbolic file names without a mapping are used
unchanged.</p></dd>
<dt>boolean <i class="arg">newlines</i></dt>
<dd><p>If this flag is set the plugin will break the generated html code
across lines, with each markup command on a separate line.</p>
<p>If this flag is not set (the default), the whole document will be
written on a single line, with minimum spacing between all elements.</p></dd>
<dt>boolean <i class="arg">indented</i></dt>
<dd><p>If this flag is set the plugin will indent the markup commands
according to the structure of indices. To make this work this also
implies that <b class="variable">newlines</b> is set.</p>
<p>If this flag is not set (the default), the output is formatted as per
the value of <b class="variable">newlines</b>, and no indenting is done.</p></dd>
<dt>string <i class="arg">meta</i></dt>
<dd><p>This variable is meant to hold a fragment of HTML (default: empty).
The fragment it contains will be inserted into the generated output in
the &lt;head&gt; section of the document, just after the &lt;title&gt; tag.</p></dd>
<dt>string <i class="arg">header</i></dt>
<dd><p>This variable is meant to hold a fragment of HTML (default: empty).
The fragment it contains will be inserted into the generated output
just after the &lt;h1&gt; title tag in the body of the document, in the
class.header &lt;div&gt;'ision.</p></dd>
<dt>string <i class="arg">footer</i></dt>
<dd><p>This variable is meant to hold a fragment of HTML (default:
empty). The fragment it contains will be inserted into the generated
output just before the &lt;/body&gt; tag, in the class.footer &lt;div&gt;'ision.</p></dd>
<dt>dictionary <i class="arg">kwid</i></dt>
<dd><p>The value of this variable (default: empty) maps keywords to the
identifiers to use as their anchor names. Each keyword <b class="variable">FOO</b> not
found in the dictionary uses <b class="const">KW-</b><b class="variable">FOO</b> as anchor,
i.e. itself prefixed with the string <b class="const">KW-</b>.</p></dd>
<dt>string <i class="arg">sepline</i></dt>
<dd><p>The value of this variable is the string to use for the separator
comments inserted into the output when the outpout is broken across
lines and/or indented. The default string consists of 60 dashes.</p></dd>
<dt>integer <i class="arg">kwidth</i></dt>
<dd><p>This variable holds the size of the keyword column in the main table
generated by the plugin, in percent of the total width of the
table. This is an integer number in the range of 1 to 99. Choosing a
value outside of that range causes the generator to switch back to the
defauly setting, 35 percent.</p></dd>
<dt>string <i class="arg">dot</i></dt>
<dd><p>This variable contains a HTML fragment inserted between the entries of
the navigation bar, and the references associated with each keyword.
The default is the HTML entity &amp;#183; i.e. the bullet character, also
known as the &quot;Greek middle dot&quot;, i.e. the unicode character 00B7.</p></dd>
<dt>string <i class="arg">class.main</i></dt>
<dd><p>This variable contains the class name for the main &lt;div&gt;'ivision of
the generated document. The default is <b class="const">doctools</b>.</p></dd>
<dt>string <i class="arg">class.header</i></dt>
<dd><p>This variable contains the class name for the header &lt;div&gt;'ision of
the generated document. The default is <b class="const">idx-header</b>.  This
division contains the document title, the user specified <b class="variable">header</b>,
if any, a visible separator line, and the navigation bar for quick
access to each keyword section.</p></dd>
<dt>string <i class="arg">class.title</i></dt>
<dd><p>This variable contains the class name for the &lt;h1&gt; tag enclosing the
document title. The default is <b class="const">idx-title</b>.</p></dd>
<dt>string <i class="arg">class.navsep</i></dt>
<dd><p>This variable contains the class name for the &lt;hr&gt; separators in the
header and footer sections of the generated document. The default is
<b class="const">idx-navsep</b>.</p></dd>
<dt>string <i class="arg">class.navbar</i></dt>
<dd><p>This variable contains the class name for the navigation &lt;div&gt;'ision
enclosing the navigation bar of the generated document. The default is
<b class="const">idx-kwnav</b>.</p></dd>
<dt>string <i class="arg">class.contents</i></dt>
<dd><p>This variable contains the class name for the &lt;table&gt; holding the
keywords and their references in the generated document. The default
is <b class="const">idx-contents</b>.</p></dd>
<dt>string <i class="arg">class.leader</i></dt>
<dd><p>This variable contains the class name for the anchor names the plugin
inserts into the keyword table when switching from one section to the
next (Each section holds all keywords with a particular first
character). The default is <b class="const">idx-leader</b>.</p></dd>
<dt>string <i class="arg">class.row0</i></dt>
<dd><p>This variable contains the class name used to label the even rows
(&lt;tr&gt;) of the keyword table. The default is <b class="const">idx-even</b>.</p></dd>
<dt>string <i class="arg">class.row1</i></dt>
<dd><p>This variable contains the class name used to label the odd rows
(&lt;tr&gt;) of the keyword table. The default is <b class="const">idx-odd</b>.</p></dd>
<dt>string <i class="arg">class.keyword</i></dt>
<dd><p>This variable contains the class name used to label the keyword
cells/column (&lt;td&gt;) in the keyword table of the document. The default
is <b class="const">idx-keyword</b>.</p></dd>
<dt>string <i class="arg">class.refs</i></dt>
<dd><p>This variable contains the class name used to label the reference
cells/column (&lt;td&gt;) in the keyword table of the document. The default
is <b class="const">idx-refs</b>.</p></dd>
<dt>string <i class="arg">class.footer</i></dt>
<dd><p>This variable contains the class name for the footer &lt;div&gt;'ision of
the generated document. The default is <b class="const">idx-footer</b>. This
division contains a browser-visible separator line and the user
specified <b class="variable">footer</b>, if any.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variable <b class="variable">format</b>, and its value.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_export_json.html.













































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310

<div class='fossil-doc' data-title='doctools::idx::export::json - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::json(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::json - JSON export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">JSON notation of keyword indices</a></li>
<li class="doctools_section"><a href="#section4">Configuration</a></li>
<li class="doctools_section"><a href="#section5">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::json <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">textutil::adjust</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates JSON markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">JSON notation of keyword indices</a></h2>
<p>The JSON format used for keyword indices is a direct translation of
the <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>, mapping Tcl
dictionaries as JSON objects and Tcl lists as JSON arrays.
For example, the Tcl serialization</p>
<pre class="doctools_example">
doctools::idx {
	label {Keyword Index}
	keywords {
		changelog  {changelog.man cvs.man}
		conversion {doctools.man docidx.man doctoc.man apps/dtplite.man mpexpand.man}
		cvs        cvs.man
	}
	references {
		apps/dtplite.man {manpage dtplite}
		changelog.man    {manpage doctools::changelog}
		cvs.man          {manpage doctools::cvs}
		docidx.man       {manpage doctools::idx}
		doctoc.man       {manpage doctools::toc}
		doctools.man     {manpage doctools}
		mpexpand.man     {manpage mpexpand}
	}
	title {}
}
</pre>
<p>is equivalent to the JSON string</p>
<pre class="doctools_example">
{
    &quot;doctools::idx&quot; : {
        &quot;label&quot;      : &quot;Keyword Index&quot;,
        &quot;keywords&quot;   : {
            &quot;changelog&quot;  : [&quot;changelog.man&quot;,&quot;cvs.man&quot;],
            &quot;conversion&quot; : [&quot;doctools.man&quot;,&quot;docidx.man&quot;,&quot;doctoc.man&quot;,&quot;apps\/dtplite.man&quot;,&quot;mpexpand.man&quot;],
            &quot;cvs&quot;        : [&quot;cvs.man&quot;],
        },
        &quot;references&quot; : {
            &quot;apps\/dtplite.man&quot; : [&quot;manpage&quot;,&quot;dtplite&quot;],
            &quot;changelog.man&quot;     : [&quot;manpage&quot;,&quot;doctools::changelog&quot;],
            &quot;cvs.man&quot;           : [&quot;manpage&quot;,&quot;doctools::cvs&quot;],
            &quot;docidx.man&quot;        : [&quot;manpage&quot;,&quot;doctools::idx&quot;],
            &quot;doctoc.man&quot;        : [&quot;manpage&quot;,&quot;doctools::toc&quot;],
            &quot;doctools.man&quot;      : [&quot;manpage&quot;,&quot;doctools&quot;],
            &quot;mpexpand.man&quot;      : [&quot;manpage&quot;,&quot;mpexpand&quot;]
        },
        &quot;title&quot;      : &quot;&quot;
    }
}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Configuration</a></h2>
<p>The JSON export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>boolean <i class="arg">indented</i></dt>
<dd><p>If this flag is set the plugin will break the generated JSON code
across lines and indent it according to its inner structure, with each
key of a dictionary on a separate line.</p>
<p>If this flag is not set (the default), the whole JSON object will be
written on a single line, with minimum spacing between all elements.</p></dd>
<dt>boolean <i class="arg">aligned</i></dt>
<dd><p>If this flag is set the generator ensures that the values for the keys
in a dictionary are vertically aligned with each other, for a nice
table effect. To make this work this also implies that <b class="variable">indented</b>
is set.</p>
<p>If this flag is not set (the default), the output is formatted as per
the value of <b class="variable">indented</b>, without trying to align the values for
dictionary keys.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">user</b>, <b class="variable">format</b>, <b class="variable">file</b>, and <b class="variable">map</b> and
their values.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_export_nroff.html.

















































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264

<div class='fossil-doc' data-title='doctools::idx::export::nroff - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::nroff(n) 0.3 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::nroff - nroff export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Configuration</a></li>
<li class="doctools_section"><a href="#section4">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::nroff <span class="opt">?0.3?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::nroff::man_macros</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of nroff markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates nroff markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Configuration</a></h2>
<p>The nroff export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">user</i></dt>
<dd><p>This standard configuration variable contains the name of the user
running the process which invoked the export plugin.
The plugin puts this information into the provenance comment at the
beginning of the generated document.</p></dd>
<dt>string <i class="arg">file</i></dt>
<dd><p>This standard configuration variable contains the name of the file the
index came from. This variable may not be set or contain the empty
string.
The plugin puts this information, if defined, i.e. set and not the
empty string, into the provenance comment at the beginning of the
generated document.</p></dd>
<dt>boolean <i class="arg">inline</i></dt>
<dd><p>If this flag is set (default) the plugin will place the definitions of
the man macro set directly into the output.</p>
<p>If this flag is not set, the plugin will place a reference to the
definitions of the man macro set into the output, but not the macro
definitions themselves.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">format</b>, and <b class="variable">map</b>, and their values.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_export_text.html.























































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251

<div class='fossil-doc' data-title='doctools::idx::export::text - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::text(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::text - plain text export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Configuration</a></li>
<li class="doctools_section"><a href="#section4">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::text <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of plain text markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates plain text markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Configuration</a></h2>
<p>The text export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>dictionary <i class="arg">map</i></dt>
<dd><p>This standard configuration variable contains a dictionary mapping
from the symbolic files names in manpage references to the actual
filenames and/or urls to be used in the output.</p>
<p>Url references and symbolic file names without a mapping are used
unchanged.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">user</b>, <b class="variable">file</b>, and <b class="variable">format</b>, and their values.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key545">plain text</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_export_wiki.html.

















































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264

<div class='fossil-doc' data-title='doctools::idx::export::wiki - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::wiki(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::wiki - wiki export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Wiki markup</a></li>
<li class="doctools_section"><a href="#section4">Configuration</a></li>
<li class="doctools_section"><a href="#section5">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::wiki <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of wiki markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates wiki markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Wiki markup</a></h2>
<p>The basic syntax of the wiki markup generated by this plugin are
described at <a href="http://wiki.tcl.tk/14">http://wiki.tcl.tk/14</a>.</p>
<p>The plugin goes beyond the classic markup to generate proper headers
and either a table or indented list of the keywords and their
references.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Configuration</a></h2>
<p>The wiki export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>dictionary <i class="arg">map</i></dt>
<dd><p>This standard configuration variable contains a dictionary mapping
from the symbolic files names in manpage references to the actual
filenames and/or urls to be used in the output.</p>
<p>Url references and symbolic file names without a mapping are used
unchanged.</p></dd>
<dt>enum <i class="arg">style</i></dt>
<dd><p>This variable recognizes two values as legal, <b class="const">list</b> (default),
and <b class="const">table</b>.
Depending on the value the plugin generates either a list- or
table-based wiki page for the index.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">user</b>, <b class="variable">file</b> and <b class="variable">format</b>, and their values.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_import.html.

































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512

<div class='fossil-doc' data-title='doctools::idx::import - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::import(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::import - Importing keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Concepts</a></li>
<li class="doctools_section"><a href="#section3">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Import plugin API v2 reference</a></li>
<li class="doctools_section"><a href="#section5">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::idx::import <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::config</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::import</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">import text</b> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">import file</b> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">import object text</b> <i class="arg">object</i> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">import object file</b> <i class="arg">object</i> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">config names</b></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">config get</b></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">includes</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">include add</b> <i class="arg">path</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">include remove</b> <i class="arg">path</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">include clear</b></a></li>
<li><a href="#16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the import of
keyword indices from other formats, i.e. their conversion from, for
example <i class="term"><a href="../../../../index.html#key178">docidx</a></i>, <i class="term"><a href="../../../../index.html#key206">json</a></i>, etc.</p>
<p>This is one of the three public pillars the management of keyword
indices resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="idx_export.html">Exporting keyword indices</a></i>, and</p></li>
<li><p><i class="term"><a href="idx_container.html">Holding keyword indices</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of keyword indices, and
their parts, see the same-named section.
For information about the data structure which is the major output of
the manager objects provided by this package see the section
<span class="sectref"><a href="#section5">Keyword index serialization format</a></span>.</p>
<p>The plugin system of our class is based on the package
<b class="package"><a href="../pluginmgr/pluginmgr.html">pluginmgr</a></b>, and configured to look for plugins using</p>
<ol class="doctools_enumerated">
<li><p>the environment variable <b class="variable">DOCTOOLS_IDX_IMPORT_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">DOCTOOLS_IDX_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">DOCTOOLS_PLUGINS</b>,</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/idx/import/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/idx/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/idx/import/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/idx/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/plugins</b>&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\IDX\IMPORT\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\IDX\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\PLUGINS&quot;</p></li>
</ol>
<p>The last three are used only when the package is run on a machine
using Windows(tm) operating system.</p>
<p>The whole system is delivered with two predefined import plugins,
namely</p>
<dl class="doctools_definitions">
<dt>docidx</dt>
<dd><p>See <i class="term"><a href="import_docidx.html">docidx import plugin</a></i> for details.</p></dd>
<dt>json</dt>
<dd><p>See <i class="term">json import plugin</i> for details.</p></dd>
</dl>
<p>Readers wishing to write their own import plugin for some format, i.e.
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Import plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key184">keyword index</a></i> consists of a (possibly empty) set of <i class="term"><a href="../../../../index.html#key779">keywords</a></i>.</p></li>
<li><p>Each keyword in the set is identified by its name.</p></li>
<li><p>Each keyword has a (possibly empty) set of <i class="term">references</i>.</p></li>
<li><p>A reference can be associated with more than one keyword.</p></li>
<li><p>A reference not associated with at least one keyword is not possible
however.</p></li>
<li><p>Each reference is identified by its target, specified as either an url
or symbolic filename, depending on the type of reference (<b class="const">url</b>,
or <b class="const">manpage</b>).</p></li>
<li><p>The type of a reference (url, or manpage) depends only on the
reference itself, and not the keywords it is associated with.</p></li>
<li><p>In addition to a type each reference has a descriptive label as
well. This label depends only on the reference itself, and not the
keywords it is associated with.</p></li>
</ol>
<p>A few notes</p>
<ol class="doctools_enumerated">
<li><p>Manpage references are intended to be used for references to the
documents the index is made for. Their target is a symbolic file name
identifying the document, and export plugins may replace symbolic with
actual file names, if specified.</p></li>
<li><p>Url references are intended on the othre hand are inteded to be used
for links to anything else, like websites. Their target is an url.</p></li>
<li><p>While url and manpage references share a namespace for their
identifiers, this should be no problem, given that manpage identifiers
are symbolic filenames and as such they should never look like urls,
the identifiers for url references.</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::import</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new import manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::doctools::idx::import</b> command have
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">import text</b> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method takes the <i class="arg">text</i> and converts it from the specified
<i class="arg">format</i> to the canonical serialization of a keyword index using
the import plugin for the format. An error is thrown if no plugin
could be found for the format.
The serialization generated by the conversion process is returned as
the result of this method.</p>
<p>If no format is specified the method defaults to <b class="const">docidx</b>.</p>
<p>The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>.</p>
<p>The plugin has to conform to the interface specified in section
<span class="sectref"><a href="#section4">Import plugin API v2 reference</a></span>.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">import file</b> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method is a convenient wrapper around the <b class="method">import text</b>
method described by the previous item.
It reads the contents of the specified file into memory, feeds the
result into <b class="method">import text</b> and returns the resulting
serialization as its own result.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">import object text</b> <i class="arg">object</i> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method is a convenient wrapper around the <b class="method">import text</b>
method described by the previous item.
It expects that <i class="arg">object</i> is an object command supporting a
<b class="method">deserialize</b> method expecting the canonical serialization of a
keyword index.
It imports the text using <b class="method">import text</b> and then feeds the
resulting serialization into the <i class="arg">object</i> via <b class="method">deserialize</b>.
This method returns the empty string as it result.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">import object file</b> <i class="arg">object</i> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method behaves like <b class="method">import object text</b>, except that it
reads the text to convert from the specified file instead of being
given it as argument.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">config names</b></a></dt>
<dd><p>This method returns a list containing the names of all configuration
variables currently known to the object.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">config get</b></a></dt>
<dd><p>This method returns a dictionary containing the names and values of
all configuration variables currently known to the object.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">includes</b></a></dt>
<dd><p>This method returns a list containing the currently specified paths to
use to search for include files when processing input.
The order of paths in the list corresponds to the order in which they
are used, from first to last, and also corresponds to the order in
which they were added to the object.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">include add</b> <i class="arg">path</i></a></dt>
<dd><p>This methods adds the specified <i class="arg">path</i> to the list of paths to use
to search for include files when processing input. The path is added
to the end of the list, causing it to be searched after all previously
added paths. The result of the command is the empty string.</p>
<p>The method does nothing if the path is already known.</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">include remove</b> <i class="arg">path</i></a></dt>
<dd><p>This methods removes the specified <i class="arg">path</i> from the list of paths
to use to search for include files when processing input. The result
of the command is the empty string.</p>
<p>The method does nothing if the path is not known.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">include clear</b></a></dt>
<dd><p>This method clears the list of paths to use to search for include
files when processing input. The result of the command is the empty
string.</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Import plugin API v2 reference</a></h2>
<p>Plugins are what this package uses to manage the support for any input
format beyond the <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>. Here
we specify the API the objects created by this package use to interact
with their plugins.</p>
<p>A plugin for this package has to follow the rules listed below:</p>
<ol class="doctools_enumerated">
<li><p>A plugin is a package.</p></li>
<li><p>The name of a plugin package has the form
		doctools::idx::import::<b class="variable">FOO</b>,
       where <b class="variable">FOO</b> is the name of the format the plugin will
       generate output for. This name is also the argument to provide
       to the various <b class="method">import</b> methods of import manager
       objects to get a string encoding a keyword index in that
       format.</p></li>
<li><p>The plugin can expect that the package
       <b class="package">doctools::idx::export::plugin</b> is present, as
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>The plugin can expect that a command named <b class="cmd">IncludeFile</b> is
       present, with the signature</p>
<dl class="doctools_definitions">
<dt><a name="16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></dt>
<dd><p>This command has to be invoked by the plugin when it has to process an
included file, if the format has the concept of such. An example of
such a format would be <i class="term"><a href="../../../../index.html#key178">docidx</a></i>.</p>
<p>The plugin has to supply the following arguments</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">currentfile</i></dt>
<dd><p>The path of the file it is currently processing. This may be the empty
string if no such is known.</p></dd>
<dt>string <i class="arg">path</i></dt>
<dd><p>The path of the include file as specified in the include directive
being processed.</p></dd>
</dl>
<p>The result of the command will be a 5-element list containing</p>
<ol class="doctools_enumerated">
<li><p>A boolean flag indicating the success (<b class="const">True</b>) or failure
       (<b class="const">False</b>) of the operation.</p></li>
<li><p>In case of success the contents of the included file, and the
       empty string otherwise.</p></li>
<li><p>The resolved, i.e. absolute path of the included file, if
       possible, or the unchanged <i class="arg">path</i> argument. This is for
       display in an error message, or as the <i class="arg">currentfile</i>
       argument of another call to <b class="cmd">IncludeFile</b> should this file
       contain more files.</p></li>
<li><p>In case of success an empty string, and for failure a code
       indicating the reason for it, one of</p>
<dl class="doctools_definitions">
<dt>notfound</dt>
<dd><p>The specified file could not be found.</p></dd>
<dt>notread</dt>
<dd><p>The specified file was found, but not be read into memory.</p></dd>
</dl>
</li>
<li><p>An empty string in case of success of a <b class="const">notfound</b>
       failure, and an additional error message describing the reason
       for a <b class="const">notread</b> error in more detail.</p></li>
</ol></dd>
</dl>
</li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an import manager of <b class="package"><a href="idx_container.html">doctools::idx</a></b> has to parse
input for an index it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">text</i></dt>
<dd><p>This argument will contain the text encoding the index per the format
the plugin is for.</p></dd>
<dt>dictionary <i class="arg">configuration</i></dt>
<dd><p>This argument will contain the current configuration to apply to the
parsing, as a dictionary mapping from variable names to values.</p>
<p>The following configuration variables have a predefined meaning all
plugins have to obey, although they can ignore this information at
their discretion. Any other other configuration variables recognized
by a plugin will be described in the manpage for that plugin.</p>
<dl class="doctools_definitions">
<dt>user</dt>
<dd><p>This variable is expected to contain the name of the user
           owning the process invoking the plugin.</p></dd>
<dt>format</dt>
<dd><p>This variable is expected to contain the name of the
             format whose plugin is invoked.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#key291">import</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key246">url</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_import_json.html.































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287

<div class='fossil-doc' data-title='doctools::idx::import::json - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::import::json(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::import::json - JSON import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">JSON notation of keyword indices</a></li>
<li class="doctools_section"><a href="#section4">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::import::json <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index import plugin for
the parsing of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_import.html">doctools::idx::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_import.html">doctools::idx::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as JSON
markup encoding a keyword index, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that keyword index, in the form specified
in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">JSON notation of keyword indices</a></h2>
<p>The JSON format used for keyword indices is a direct translation of
the <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>, mapping Tcl
dictionaries as JSON objects and Tcl lists as JSON arrays.
For example, the Tcl serialization</p>
<pre class="doctools_example">
doctools::idx {
	label {Keyword Index}
	keywords {
		changelog  {changelog.man cvs.man}
		conversion {doctools.man docidx.man doctoc.man apps/dtplite.man mpexpand.man}
		cvs        cvs.man
	}
	references {
		apps/dtplite.man {manpage dtplite}
		changelog.man    {manpage doctools::changelog}
		cvs.man          {manpage doctools::cvs}
		docidx.man       {manpage doctools::idx}
		doctoc.man       {manpage doctools::toc}
		doctools.man     {manpage doctools}
		mpexpand.man     {manpage mpexpand}
	}
	title {}
}
</pre>
<p>is equivalent to the JSON string</p>
<pre class="doctools_example">
{
    &quot;doctools::idx&quot; : {
        &quot;label&quot;      : &quot;Keyword Index&quot;,
        &quot;keywords&quot;   : {
            &quot;changelog&quot;  : [&quot;changelog.man&quot;,&quot;cvs.man&quot;],
            &quot;conversion&quot; : [&quot;doctools.man&quot;,&quot;docidx.man&quot;,&quot;doctoc.man&quot;,&quot;apps\/dtplite.man&quot;,&quot;mpexpand.man&quot;],
            &quot;cvs&quot;        : [&quot;cvs.man&quot;],
        },
        &quot;references&quot; : {
            &quot;apps\/dtplite.man&quot; : [&quot;manpage&quot;,&quot;dtplite&quot;],
            &quot;changelog.man&quot;     : [&quot;manpage&quot;,&quot;doctools::changelog&quot;],
            &quot;cvs.man&quot;           : [&quot;manpage&quot;,&quot;doctools::cvs&quot;],
            &quot;docidx.man&quot;        : [&quot;manpage&quot;,&quot;doctools::idx&quot;],
            &quot;doctoc.man&quot;        : [&quot;manpage&quot;,&quot;doctools::toc&quot;],
            &quot;doctools.man&quot;      : [&quot;manpage&quot;,&quot;doctools&quot;],
            &quot;mpexpand.man&quot;      : [&quot;manpage&quot;,&quot;mpexpand&quot;]
        },
        &quot;title&quot;      : &quot;&quot;
    }
}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key182">index</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_introduction.html.























































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251

<div class='fossil-doc' data-title='doctools2idx_introduction - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools2idx_introduction(n) 2.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools2idx_introduction - DocTools - Keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Related formats</a></li>
<li class="doctools_section"><a href="#section3">Package Overview</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key178">docidx</a></i> (short for <em>documentation indices</em>) stands for a
set of related, yet different, entities which are working together for
the easy creation and transformation of keyword indices for
documentation.</p>
<p>These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a keyword index.
Markup is represented by Tcl commands.
Beginners should start with the
<i class="term"><a href="../doctools/docidx_lang_intro.html">docidx language introduction</a></i>.
The formal specification is split over two documents, one dealing with
the <i class="term"><a href="../doctools/docidx_lang_syntax.html">docidx language syntax</a></i>, the other a
<i class="term"><a href="../doctools/docidx_lang_cmdref.html">docidx language command reference</a></i>.</p></li>
<li><p>A set of packages for the programmatic manipulation of keyword indices
in memory, and their conversion between various formats, reading and
writing. The aforementioned markup language is one of the formats
which can be both read from and written to.</p></li>
<li><p>The system for the conversion of indices is based on a plugin
mechanism, for this we have two APIs describing the interface between
the packages above and the import/export plugins.</p></li>
</ol>
<p>Which of the more detailed documents are relevant to the reader of
this introduction depends on their role in the documentation process.</p>
<ol class="doctools_enumerated">
<li><p>A <i class="term">writer</i> of documentation has to understand the markup language
itself. A beginner to docidx should read the more informally written
<i class="term"><a href="../doctools/docidx_lang_intro.html">docidx language introduction</a></i> first. Having digested this
the formal <i class="term"><a href="../doctools/docidx_lang_syntax.html">docidx language syntax</a></i> specification should
become understandable. A writer experienced with docidx may only
need the <i class="term"><a href="../doctools/docidx_lang_cmdref.html">docidx language command reference</a></i> from time to
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of docidx when handling directories of documentation,
automatically generating a proper keyword index for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#key178">docidx</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose docidx to the
user. At the bottom level, common to both applications, however we
find the three packages providing the basic facilities to handle
keyword indices, i.e. import from textual formats, programmatic
manipulation in memory, and export to textual formats. These are</p>
<dl class="doctools_definitions">
<dt><b class="package"><a href="idx_container.html">doctools::idx</a></b></dt>
<dd><p>Programmatic manipulation of keyword indices in memory.</p></dd>
<dt><b class="package"><a href="idx_import.html">doctools::idx::import</a></b></dt>
<dd><p>Import of keyword indices from various textual formats. The set of
supported formats is extensible through plugin packages.</p></dd>
<dt><b class="package"><a href="idx_export.html">doctools::idx::export</a></b></dt>
<dd><p>Export of keyword indices to various textual formats. The set of
supported formats is extensible through plugin packages.</p></dd>
</dl>
<p>See also section <span class="sectref"><a href="#section3">Package Overview</a></span> for an overview of the
dependencies between these and other, supporting packages.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the import and export packages and their plugins.
These APIs are described in the documentation for the two relevant
packages, i.e.</p>
<ul class="doctools_itemized">
<li><p><b class="package"><a href="idx_import.html">doctools::idx::import</a></b></p></li>
<li><p><b class="package"><a href="idx_export.html">doctools::idx::export</a></b></p></li>
</ul>
</li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Related formats</a></h2>
<p>The docidx format does not stand alone, it has two companion formats.
These are called <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> and <i class="term"><a href="../../../../index.html#key179">doctools</a></i>, and they are
intended for the markup of <i class="term">tables of contents</i>, and of general
documentation, respectively.
They are described in their own sets of documents, starting at
the <i class="term">DocTools - Tables Of Contents</i> and
the <i class="term">DocTools - General</i>, respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Package Overview</a></h2>
<pre class="doctools_example">
                                    ~~~~~~~~~~~ doctools::idx ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::idx::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::idx::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
doctools::config        =                         |     |    |                  =       doctools::include       doctools::config doctools::paths
                        |                         |     |    |                  |
                doctools::idx::export::&lt;*&gt;        |     |    |          doctools::idx::import::&lt;*&gt;
                        docidx                    |     |    |                  docidx, json
                        json                      |     |    |                  |           \\
                        html                      |     |    |          doctools::idx::parse \\
                        nroff                     |     |    |                  |             \\
                        wiki                      |     |    |  +---------------+              json
                        text                      |     |    |  |               |
                                                doctools::idx::structure        |
                                                                                |
                                                                        +-------+---------------+
                                                                        |                       |
          doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat        
                |                                                                               |
          doctools::text  doctools::nroff::man_macros                                           =
                                                                                                |
                                                                                        doctools::msgcat::idx::&lt;*&gt;
                                                                                                c, en, de, fr
                                                                                                (fr == en for now)
        ~~      Interoperable objects, without actual package dependencies
        --      Package dependency, higher requires lower package
        =       Dynamic dependency through plugin system
        &lt;*&gt;     Multiple packages following the given form of naming.
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../doctools/docidx_intro.html">docidx_intro</a>, <a href="../doctools/doctoc_intro.html">doctoc_intro</a>, <a href="../doctools/doctools.html">doctools</a>, doctools2doc_introduction, <a href="../doctools2toc/toc_introduction.html">doctools2toc_introduction</a>, <a href="../doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="../doctools/doctools_lang_faq.html">doctools_lang_faq</a>, <a href="../doctools/doctools_lang_intro.html">doctools_lang_intro</a>, <a href="../doctools/doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="../doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_msgcat_c.html.











































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

<div class='fossil-doc' data-title='doctools::msgcat::idx::c - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::c(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::c - Message catalog for the docidx parser (C)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">msgcat</b></li>
<li>package require <b class="pkgname">doctools::msgcat::idx::c <span class="opt">?0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">doctools::msgcat::idx::c</b> is a
support module providing the C language message catalog
for the docidx parser in the doctools system version 2. As such it is
an internal package a regular user (developer) should not be in direct
contact with.</p>
<p>If you are such please go the documentation of either</p>
<ol class="doctools_enumerated">
<li><p><b class="package">doctools::doc</b>,</p></li>
<li><p><b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b>, or</p></li>
<li><p><b class="package"><a href="idx_container.html">doctools::idx</a></b></p></li>
</ol>
<p>Within the system architecture this package resides under the package
<b class="package"><a href="../doctools2base/tcllib_msgcat.html">doctools::msgcat</a></b> providing the general message catalog
management within the system. <em>Note</em> that there is <em>no</em>
explicit dependency between the manager and catalog packages. The
catalog is a plugin which is selected and loaded dynamically.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>This package has no exported API.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key290">C</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_msgcat_de.html.











































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

<div class='fossil-doc' data-title='doctools::msgcat::idx::de - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::de(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::de - Message catalog for the docidx parser (DE)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">msgcat</b></li>
<li>package require <b class="pkgname">doctools::msgcat::idx::de <span class="opt">?0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">doctools::msgcat::idx::de</b> is a
support module providing the DE (german) language message catalog
for the docidx parser in the doctools system version 2. As such it is
an internal package a regular user (developer) should not be in direct
contact with.</p>
<p>If you are such please go the documentation of either</p>
<ol class="doctools_enumerated">
<li><p><b class="package">doctools::doc</b>,</p></li>
<li><p><b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b>, or</p></li>
<li><p><b class="package"><a href="idx_container.html">doctools::idx</a></b></p></li>
</ol>
<p>Within the system architecture this package resides under the package
<b class="package"><a href="../doctools2base/tcllib_msgcat.html">doctools::msgcat</a></b> providing the general message catalog
management within the system. <em>Note</em> that there is <em>no</em>
explicit dependency between the manager and catalog packages. The
catalog is a plugin which is selected and loaded dynamically.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>This package has no exported API.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key639">DE</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_msgcat_en.html.











































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

<div class='fossil-doc' data-title='doctools::msgcat::idx::en - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::en(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::en - Message catalog for the docidx parser (EN)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">msgcat</b></li>
<li>package require <b class="pkgname">doctools::msgcat::idx::en <span class="opt">?0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">doctools::msgcat::idx::en</b> is a
support module providing the EN (english) language message catalog
for the docidx parser in the doctools system version 2. As such it is
an internal package a regular user (developer) should not be in direct
contact with.</p>
<p>If you are such please go the documentation of either</p>
<ol class="doctools_enumerated">
<li><p><b class="package">doctools::doc</b>,</p></li>
<li><p><b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b>, or</p></li>
<li><p><b class="package"><a href="idx_container.html">doctools::idx</a></b></p></li>
</ol>
<p>Within the system architecture this package resides under the package
<b class="package"><a href="../doctools2base/tcllib_msgcat.html">doctools::msgcat</a></b> providing the general message catalog
management within the system. <em>Note</em> that there is <em>no</em>
explicit dependency between the manager and catalog packages. The
catalog is a plugin which is selected and loaded dynamically.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>This package has no exported API.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key549">EN</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_msgcat_fr.html.











































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

<div class='fossil-doc' data-title='doctools::msgcat::idx::fr - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::fr(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::fr - Message catalog for the docidx parser (FR)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">msgcat</b></li>
<li>package require <b class="pkgname">doctools::msgcat::idx::fr <span class="opt">?0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">doctools::msgcat::idx::fr</b> is a
support module providing the FR (french) language message catalog
for the docidx parser in the doctools system version 2. As such it is
an internal package a regular user (developer) should not be in direct
contact with.</p>
<p>If you are such please go the documentation of either</p>
<ol class="doctools_enumerated">
<li><p><b class="package">doctools::doc</b>,</p></li>
<li><p><b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b>, or</p></li>
<li><p><b class="package"><a href="idx_container.html">doctools::idx</a></b></p></li>
</ol>
<p>Within the system architecture this package resides under the package
<b class="package"><a href="../doctools2base/tcllib_msgcat.html">doctools::msgcat</a></b> providing the general message catalog
management within the system. <em>Note</em> that there is <em>no</em>
explicit dependency between the manager and catalog packages. The
catalog is a plugin which is selected and loaded dynamically.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>This package has no exported API.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key170">FR</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_parse.html.











































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341

<div class='fossil-doc' data-title='doctools::idx::parse - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::parse(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::parse - Parsing text in docidx format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Parse errors</a></li>
<li class="doctools_section"><a href="#section4">[docidx] notation of keyword indices</a></li>
<li class="doctools_section"><a href="#section5">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::idx::parse <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">doctools::msgcat</b></li>
<li>package require <b class="pkgname">doctools::tcl::parse</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::stack</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::parse</b> <b class="method">text</b> <i class="arg">text</i></a></li>
<li><a href="#2"><b class="cmd">::doctools::idx::parse</b> <b class="method">file</b> <i class="arg">path</i></a></li>
<li><a href="#3"><b class="cmd">::doctools::idx::parse</b> <b class="method">includes</b></a></li>
<li><a href="#4"><b class="cmd">::doctools::idx::parse</b> <b class="method">include add</b> <i class="arg">path</i></a></li>
<li><a href="#5"><b class="cmd">::doctools::idx::parse</b> <b class="method">include remove</b> <i class="arg">path</i></a></li>
<li><a href="#6"><b class="cmd">::doctools::idx::parse</b> <b class="method">include clear</b></a></li>
<li><a href="#7"><b class="cmd">::doctools::idx::parse</b> <b class="method">vars</b></a></li>
<li><a href="#8"><b class="cmd">::doctools::idx::parse</b> <b class="method">var set</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#9"><b class="cmd">::doctools::idx::parse</b> <b class="method">var unset</b> <i class="arg">name</i></a></li>
<li><a href="#10"><b class="cmd">::doctools::idx::parse</b> <b class="method">var clear</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to parse text written in the
<i class="term"><a href="../../../../index.html#key178">docidx</a></i> markup language and convert it into the canonical
serialization of the keyword index encoded in the text.
See the section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span> for
specification of their format.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling <i class="term"><a href="../../../../index.html#key178">docidx</a></i> documents.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::parse</b> <b class="method">text</b> <i class="arg">text</i></a></dt>
<dd><p>The command takes the string contained in <i class="arg">text</i> and parses it
under the assumption that it contains a document written using the
<i class="term"><a href="../../../../index.html#key178">docidx</a></i> markup language. An error is thrown if this assumption
is found to be false. The format of these errors is described in
section <span class="sectref"><a href="#section3">Parse errors</a></span>.</p>
<p>When successful the command returns the canonical serialization of the
keyword index which was encoded in the text.
See the section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span> for
specification of that format.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::idx::parse</b> <b class="method">file</b> <i class="arg">path</i></a></dt>
<dd><p>The same as <b class="method">text</b>, except that the text to parse is read from
the file specified by <i class="arg">path</i>.</p></dd>
<dt><a name="3"><b class="cmd">::doctools::idx::parse</b> <b class="method">includes</b></a></dt>
<dd><p>This method returns the current list of search paths used when looking
for include files.</p></dd>
<dt><a name="4"><b class="cmd">::doctools::idx::parse</b> <b class="method">include add</b> <i class="arg">path</i></a></dt>
<dd><p>This method adds the <i class="arg">path</i> to the list of paths searched when
looking for an include file. The call is ignored if the path is
already in the list of paths. The method returns the empty string as
its result.</p></dd>
<dt><a name="5"><b class="cmd">::doctools::idx::parse</b> <b class="method">include remove</b> <i class="arg">path</i></a></dt>
<dd><p>This method removes the <i class="arg">path</i> from the list of paths searched
when looking for an include file. The call is ignored if the path is
not contained in the list of paths. The method returns the empty
string as its result.</p></dd>
<dt><a name="6"><b class="cmd">::doctools::idx::parse</b> <b class="method">include clear</b></a></dt>
<dd><p>This method clears the list of search paths for include files.</p></dd>
<dt><a name="7"><b class="cmd">::doctools::idx::parse</b> <b class="method">vars</b></a></dt>
<dd><p>This method returns a dictionary containing the current set of
predefined variables known to the <b class="cmd">vset</b> markup command during
processing.</p></dd>
<dt><a name="8"><b class="cmd">::doctools::idx::parse</b> <b class="method">var set</b> <i class="arg">name</i> <i class="arg">value</i></a></dt>
<dd><p>This method adds the variable <i class="arg">name</i> to the set of predefined
variables known to the <b class="cmd">vset</b> markup command during processing,
and gives it the specified <i class="arg">value</i>. The method returns the empty
string as its result.</p></dd>
<dt><a name="9"><b class="cmd">::doctools::idx::parse</b> <b class="method">var unset</b> <i class="arg">name</i></a></dt>
<dd><p>This method removes the variable <i class="arg">name</i> from the set of predefined
variables known to the <b class="cmd">vset</b> markup command during
processing. The method returns the empty string as its result.</p></dd>
<dt><a name="10"><b class="cmd">::doctools::idx::parse</b> <b class="method">var clear</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This method removes all variables matching the <i class="arg">pattern</i> from the
set of predefined variables known to the <b class="cmd">vset</b> markup command
during processing. The method returns the empty string as its result.</p>
<p>The pattern matching is done with <b class="cmd">string match</b>, and the
default pattern used when none is specified, is <b class="const">*</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Parse errors</a></h2>
<p>The format of the parse error messages thrown when encountering
violations of the <i class="term"><a href="../../../../index.html#key178">docidx</a></i> markup syntax is human readable and
not intended for processing by machines. As such it is not documented.</p>
<p><em>However</em>, the errorCode attached to the message is
machine-readable and has the following format:</p>
<ol class="doctools_enumerated">
<li><p>The error code will be a list, each element describing a single error
found in the input. The list has at least one element, possibly more.</p></li>
<li><p>Each error element will be a list containing six strings describing an
error in detail. The strings will be</p>
<ol class="doctools_enumerated">
<li><p>The path of the file the error occured in. This may be empty.</p></li>
<li><p>The range of the token the error was found at. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file). Offsets
are counted from zero.</p></li>
<li><p>The line the first character after the error is on.
Lines are counted from one.</p></li>
<li><p>The column the first character after the error is at.
Columns are counted from zero.</p></li>
<li><p>The message code of the error. This value can be used as argument to
<b class="cmd">msgcat::mc</b> to obtain a localized error message, assuming that
the application had a suitable call of <b class="cmd">doctools::msgcat::init</b> to
initialize the necessary message catalogs (See package
<b class="package"><a href="../doctools2base/tcllib_msgcat.html">doctools::msgcat</a></b>).</p></li>
<li><p>A list of details for the error, like the markup command involved. In
the case of message code <b class="const">docidx/include/syntax</b> this value is
the set of errors found in the included file, using the format
described here.</p></li>
</ol>
</li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">[docidx] notation of keyword indices</a></h2>
<p>The docidx format for keyword indices, also called the
<i class="term">docidx markup language</i>, is too large to be covered in single
section.
The interested reader should start with the document</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/docidx_lang_intro.html">docidx language introduction</a></i></p></li>
</ol>
<p>and then proceed from there to the formal specifications, i.e. the
documents</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/docidx_lang_syntax.html">docidx language syntax</a></i> and</p></li>
<li><p><i class="term"><a href="../doctools/docidx_lang_cmdref.html">docidx language command reference</a></i>.</p></li>
</ol>
<p>to get a thorough understanding of the language.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key257">lexer</a>, <a href="../../../../index.html#key9">parser</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/idx_structure.html.





















































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282

<div class='fossil-doc' data-title='doctools::idx::structure - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::structure(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::structure - Docidx serialization utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::idx::structure <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">snit</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::structure</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::idx::structure</b> <b class="method">verify-as-canonical</b> <i class="arg">serial</i></a></li>
<li><a href="#3"><b class="cmd">::doctools::idx::structure</b> <b class="method">canonicalize</b> <i class="arg">serial</i></a></li>
<li><a href="#4"><b class="cmd">::doctools::idx::structure</b> <b class="method">print</b> <i class="arg">serial</i></a></li>
<li><a href="#5"><b class="cmd">::doctools::idx::structure</b> <b class="method">merge</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to work with the serializations of
keyword indices as managed by the doctools system v2, and specified in
section <span class="sectref"><a href="#section3">Keyword index serialization format</a></span>.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling keyword indices and their conversion into and out of
various other formats, like documents written using <i class="term"><a href="../../../../index.html#key178">docidx</a></i>
markup.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::structure</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of a keyword index and will throw an
error if that is not the case. The result of the command is the empty
string.</p>
<p>If the argument <i class="arg">canonvar</i> is specified it is interpreted as the
name of a variable in the calling context. This variable will be
written to if and only if <i class="arg">serial</i> is a valid regular
serialization. Its value will be a boolean, with <b class="const">True</b>
indicating that the serialization is not only valid, but also
<i class="term">canonical</i>. <b class="const">False</b> will be written for a valid, but
non-canonical serialization.</p>
<p>For the specification of regular and canonical keyword index
serializations see the section
<span class="sectref"><a href="#section3">Keyword index serialization format</a></span>.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::idx::structure</b> <b class="method">verify-as-canonical</b> <i class="arg">serial</i></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">canonical</i> serialization of a keyword index and will throw an
error if that is not the case. The result of the command is the empty
string.</p>
<p>For the specification of canonical keyword index serializations see
the section <span class="sectref"><a href="#section3">Keyword index serialization format</a></span>.</p></dd>
<dt><a name="3"><b class="cmd">::doctools::idx::structure</b> <b class="method">canonicalize</b> <i class="arg">serial</i></a></dt>
<dd><p>This command assumes that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of a keyword index and will throw an
error if that is not the case.</p>
<p>It will then convert the input into the <i class="term">canonical</i> serialization
of the contained keyword index and return it as its result. If the
input is already canonical it will be returned unchanged.</p>
<p>For the specification of regular and canonical keyword index
serializations see the section
<span class="sectref"><a href="#section3">Keyword index serialization format</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::doctools::idx::structure</b> <b class="method">print</b> <i class="arg">serial</i></a></dt>
<dd><p>This command assumes that the argument <i class="arg">serial</i> contains a valid
regular serialization of a keyword index and returns a string
containing that index in a human readable form.</p>
<p>The exact format of this form is not specified and cannot be relied on
for parsing or other machine-based activities.</p>
<p>For the specification of regular keyword index serializations see the
section <span class="sectref"><a href="#section3">Keyword index serialization format</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::doctools::idx::structure</b> <b class="method">merge</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></dt>
<dd><p>This command accepts the regular serializations of two keyword indices
and uses them to create their union.  The result of the command is the
canonical serialization of this unified keyword index.</p>
<p>Title and label of the resulting index are taken from the index
contained in <i class="arg">serialb</i>. The set of keys, references and their
connections is the union of the set of keys and references of the two
inputs.</p>
<p>For the specification of regular and canonical keyword index
serializations see the section
<span class="sectref"><a href="#section3">Keyword index serialization format</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2idx/import_docidx.html.

















































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264

<div class='fossil-doc' data-title='doctools::idx::import::docidx - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::import::docidx(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::import::docidx - docidx import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">[docidx] notation of keyword indices</a></li>
<li class="doctools_section"><a href="#section4">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::import::docidx <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::idx::parse</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">doctools::msgcat</b></li>
<li>package require <b class="pkgname">doctools::tcl::parse</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">struct::stack</b></li>
<li>package require <b class="pkgname">struct::tree</b></li>
<li>package require <b class="pkgname">treeql</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index import plugin for
the parsing of docidx markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_import.html">doctools::idx::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_import.html">doctools::idx::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as docidx
markup encoding a keyword index, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that keyword index, in the form specified
in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">[docidx] notation of keyword indices</a></h2>
<p>The docidx format for keyword indices, also called the
<i class="term">docidx markup language</i>, is too large to be covered in single
section.
The interested reader should start with the document</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/docidx_lang_intro.html">docidx language introduction</a></i></p></li>
</ol>
<p>and then proceed from there to the formal specifications, i.e. the
documents</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/docidx_lang_syntax.html">docidx language syntax</a></i> and</p></li>
<li><p><i class="term"><a href="../doctools/docidx_lang_cmdref.html">docidx language command reference</a></i>.</p></li>
</ol>
<p>to get a thorough understanding of the language.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations. While a keyword index may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>An index serialization is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::idx</b>, and its
value. This value holds the contents of the index.</p></li>
<li><p>The contents of the index are a Tcl dictionary holding the title of
the index, a label, and the keywords and references. The relevant keys
and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the index.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the index.</p></dd>
<dt><b class="const">keywords</b></dt>
<dd><p>The value is a Tcl dictionary, using the keywords known to the index
as keys. The associated values are lists containing the identifiers of
the references associated with that particular keyword.</p>
<p>Any reference identifier used in these lists has to exist as a key in
the <b class="const">references</b> dictionary, see the next item for its
definition.</p></dd>
<dt><b class="const">references</b></dt>
<dd><p>The value is a Tcl dictionary, using the identifiers for the
references known to the index as keys. The associated values are
2-element lists containing the type and label of the reference, in
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of the keyword index.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The references listed for each keyword of the index, if any, are
listed in ascending dictionary order of their <em>labels</em>, as
generated by Tcl's builtin command <b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key182">index</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/export_doctoc.html.





























































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318

<div class='fossil-doc' data-title='doctools::toc::export::doctoc - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::doctoc(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::doctoc - doctoc export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">[doctoc] notation of tables of contents</a></li>
<li class="doctools_section"><a href="#section4">Configuration</a></li>
<li class="doctools_section"><a href="#section5">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::doctoc <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of doctoc markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section5">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates doctoc markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">[doctoc] notation of tables of contents</a></h2>
<p>The doctoc format for tables of contents, also called the
<i class="term">doctoc markup language</i>, is too large to be covered in single
section.
The interested reader should start with the document</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/doctoc_lang_intro.html">doctoc language introduction</a></i></p></li>
</ol>
<p>and then proceed from there to the formal specifications, i.e. the
documents</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/doctoc_lang_syntax.html">doctoc language syntax</a></i> and</p></li>
<li><p><i class="term"><a href="../doctools/doctoc_lang_cmdref.html">doctoc language command reference</a></i>.</p></li>
</ol>
<p>to get a thorough understanding of the language.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Configuration</a></h2>
<p>The doctoc export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">user</i></dt>
<dd><p>This standard configuration variable contains the name of the user
running the process which invoked the export plugin.
The plugin puts this information into the provenance comment at the
beginning of the generated document.</p></dd>
<dt>string <i class="arg">file</i></dt>
<dd><p>This standard configuration variable contains the name of the file the
table of contents came from. This variable may not be set or contain
the empty string.
The plugin puts this information, if defined, i.e. set and not the
empty string, into the provenance comment at the beginning of the
generated document.</p></dd>
<dt>boolean <i class="arg">newlines</i></dt>
<dd><p>If this flag is set the plugin will break the generated doctoc code
across lines, with each markup command on a separate line.</p>
<p>If this flag is not set (the default), the whole document will be
written on a single line, with minimum spacing between all elements.</p></dd>
<dt>boolean <i class="arg">indented</i></dt>
<dd><p>If this flag is set the plugin will indent the markup commands
according to the structure of tables of contents. To make this work
this also implies that <b class="variable">newlines</b> is set. This effect is
independent of the value for <b class="variable">aligned</b> however.</p>
<p>If this flag is not set (the default), the output is formatted as per
the value of <b class="variable">newlines</b>, and no indenting is done.</p></dd>
<dt>boolean <i class="arg">aligned</i></dt>
<dd><p>If this flag is set the generator ensures that the arguments for the
<b class="cmd">item</b> commands in a division are aligned vertically for a nice
table effect. To make this work this also implies that <b class="variable">newlines</b>
is set. This effect is independent of the value for <b class="variable">indented</b>
however.</p>
<p>If this flag is not set (the default), the output is formatted as per
the values of <b class="variable">newlines</b> and <b class="variable">indented</b>, and no alignment is
done.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">format</b>, and <b class="variable">map</b>, and their values.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/import_doctoc.html.

































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288

<div class='fossil-doc' data-title='doctools::toc::import::doctoc - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::import::doctoc(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::import::doctoc - doctoc import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">[doctoc] notation of tables of contents</a></li>
<li class="doctools_section"><a href="#section4">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::import::doctoc <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::toc::parse</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">doctools::msgcat</b></li>
<li>package require <b class="pkgname">doctools::tcl::parse</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">struct::stack</b></li>
<li>package require <b class="pkgname">struct::tree</b></li>
<li>package require <b class="pkgname">treeql</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents import plugin
for the parsing of doctoc markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_import.html">doctools::toc::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_import.html">doctools::toc::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as doctoc
markup encoding a table of contents, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that table of contents, in the form
specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">[doctoc] notation of tables of contents</a></h2>
<p>The doctoc format for tables of contents, also called the
<i class="term">doctoc markup language</i>, is too large to be covered in single
section.
The interested reader should start with the document</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/doctoc_lang_intro.html">doctoc language introduction</a></i></p></li>
</ol>
<p>and then proceed from there to the formal specifications, i.e. the
documents</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/doctoc_lang_syntax.html">doctoc language syntax</a></i> and</p></li>
<li><p><i class="term"><a href="../doctools/doctoc_lang_cmdref.html">doctoc language command reference</a></i>.</p></li>
</ol>
<p>to get a thorough understanding of the language.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_container.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504

<div class='fossil-doc' data-title='doctools::toc - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc(n) 2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc - Holding tables of contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Concepts</a></li>
<li class="doctools_section"><a href="#section3">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::toc <span class="opt">?2?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">struct::tree</b></li>
<li>package require <b class="pkgname">snit</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">+ reference</b> <i class="arg">id</i> <i class="arg">label</i> <i class="arg">docid</i> <i class="arg">desc</i></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">+ division</b> <i class="arg">id</i> <i class="arg">label</i> <span class="opt">?<i class="arg">docid</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">remove</b> <i class="arg">id</i></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">up</b> <i class="arg">id</i></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">next</b> <i class="arg">id</i></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">prev</b> <i class="arg">id</i></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">child</b> <i class="arg">id</i> <i class="arg">label</i> <span class="opt">?<i class="arg">...</i>?</span></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">element</b> <span class="opt">?<i class="arg">...</i>?</span></a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">children</b> <i class="arg">id</i></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">type</b> <i class="arg">id</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">full-label</b> <i class="arg">id</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">elabel</b> <i class="arg">id</i> <span class="opt">?<i class="arg">newlabel</i>?</span></a></li>
<li><a href="#16"><i class="arg">objectName</i> <b class="method">description</b> <i class="arg">id</i> <span class="opt">?<i class="arg">newdesc</i>?</span></a></li>
<li><a href="#17"><i class="arg">objectName</i> <b class="method">document</b> <i class="arg">id</i> <span class="opt">?<i class="arg">newdocid</i>?</span></a></li>
<li><a href="#18"><i class="arg">objectName</i> <b class="method">title</b></a></li>
<li><a href="#19"><i class="arg">objectName</i> <b class="method">title</b> <i class="arg">text</i></a></li>
<li><a href="#20"><i class="arg">objectName</i> <b class="method">label</b></a></li>
<li><a href="#21"><i class="arg">objectName</i> <b class="method">label</b> <i class="arg">text</i></a></li>
<li><a href="#22"><i class="arg">objectName</i> <b class="method">importer</b></a></li>
<li><a href="#23"><i class="arg">objectName</i> <b class="method">importer</b> <i class="arg">object</i></a></li>
<li><a href="#24"><i class="arg">objectName</i> <b class="method">exporter</b></a></li>
<li><a href="#25"><i class="arg">objectName</i> <b class="method">exporter</b> <i class="arg">object</i></a></li>
<li><a href="#26"><i class="arg">objectName</i> <b class="method">deserialize =</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#27"><i class="arg">objectName</i> <b class="method">deserialize +=</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#28"><i class="arg">objectName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">format</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to contain and programmatically
manipulate tables of contents.</p>
<p>This is one of the three public pillars the management of tables of
contents resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="toc_export.html">Exporting tables of contents</a></i>, and</p></li>
<li><p><i class="term">Importing tables of contents</i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of tables of contents, and
their parts, see the same-named section.
For information about the data structure which is used to encode
tables of contents as values see the section
<span class="sectref"><a href="#section4">ToC serialization format</a></span>.
This is the only format directly known to this class. Conversions from
and to any other format are handled by export and import manager
objects. These may be attached to a container, but do not have to be,
it is merely a convenience.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key157">table of contents</a></i> consists of a (possibly empty) list of
<i class="term">elements</i>.</p></li>
<li><p>Each element in the list is identified by its label.</p></li>
<li><p>Each element is either a <i class="term"><a href="../../../../index.html#key251">reference</a></i>, or a <i class="term">division</i>.</p></li>
<li><p>Each reference has an associated document, identified by a symbolic
id, and a textual description.</p></li>
<li><p>Each division may have an associated document, identified by a
symbolic id.</p></li>
<li><p>Each division consists consists of a (possibly empty) list of
<i class="term">elements</i>, with each element following the rules as specified in
item 2 and above.</p></li>
</ol>
<p>A few notes</p>
<ol class="doctools_enumerated">
<li><p>The above rules span up a tree of elements, with references as the
leaf nodes, and divisions as the inner nodes, and each element
representing an entry in the whole table of contents.</p></li>
<li><p>The identifying labels of any element E are unique within their
division (or toc), and the full label of any element E is the list of
labels for all nodes on the unique path from the root of the tree to
E, including E.</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new container object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::doctools::toc</b> command have the
following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">+ reference</b> <i class="arg">id</i> <i class="arg">label</i> <i class="arg">docid</i> <i class="arg">desc</i></a></dt>
<dd><p>This method adds a new reference element to the table of contents,
under the element specified via its handle <i class="arg">id</i>. This parent
element has to be a division element, or the root. An error is thrown
otherwise.
The new element will be externally identified by its <i class="arg">label</i>,
which has to be be unique within the parent element. An error is
thrown otherwise.</p>
<p>As a reference element it will refer to a document identified by the
symbolic <i class="arg">docid</i>. This reference must not be the empty string, an
error is thrown otherwise.
Beyond the label the element also has a longer descriptive string,
supplied via <i class="arg">desc</i>.</p>
<p>The result of the method is the handle (id) of the new element.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">+ division</b> <i class="arg">id</i> <i class="arg">label</i> <span class="opt">?<i class="arg">docid</i>?</span></a></dt>
<dd><p>This method adds a new division element to the table of contents,
under the element specified via its handle <i class="arg">id</i>. This parent
element has to be a division element, or the root. An error is thrown
otherwise.
The new element will be externally identified by its <i class="arg">label</i>,
which has to be be unique within the parent element. An error is
thrown otherwise.</p>
<p>As a division element it is can refer to a document, identified by the
symbolic <i class="arg">docid</i>, but may choose not to.</p>
<p>The result of the method is the handle (id) of the new element.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">remove</b> <i class="arg">id</i></a></dt>
<dd><p>This method removes the element identified by the handle <i class="arg">id</i> from
the table of contents.
If the element is a division all of its children, if any, are removed
as well. The root element/division of the table of contents cannot be
removed however, only its children.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">up</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns the handle of the parent for the element
identified by its handle <i class="arg">id</i>, or the empty string if <i class="arg">id</i>
refered to the root element.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">next</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns the handle of the right sibling for the element
identified by its handle <i class="arg">id</i>, or the handle of the parent if the
element has no right sibling, or the empty string if <i class="arg">id</i> refered
to the root element.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">prev</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns the handle of the left sibling for the element
identified by its handle <i class="arg">id</i>, or the handle of the parent if the
element has no left sibling, or the empty string if <i class="arg">id</i> refered
to the root element.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">child</b> <i class="arg">id</i> <i class="arg">label</i> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>This method returns the handle of a child of the element identified by
its handle <i class="arg">id</i>. The child itself is identified by a series of
labels.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">element</b> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>This method returns the handle of the element identified by a series
of labels, starting from the root of the table of contents. The series
of labels is allowed to be empty, in which case the handle of the root
element is returned.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">children</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns a list containing the handles of all children of
the element identified by the handle <i class="arg">id</i>, from first to last, in
that order.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">type</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns the type of the element, either <b class="const">reference</b>,
or <b class="const">division</b>.</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">full-label</b> <i class="arg">id</i></a></dt>
<dd><p>This method is the complement of the method <b class="method">element</b>,
converting the handle <i class="arg">id</i> of an element into a list of labels
full identifying the element within the whole table of contents.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">elabel</b> <i class="arg">id</i> <span class="opt">?<i class="arg">newlabel</i>?</span></a></dt>
<dd><p>This method queries and/or changes the label of the element identified
by the handle <i class="arg">id</i>. If the argument <i class="arg">newlabel</i> is present then
the label is changed to that value. Regardless of this, the result of
the method is the current value of the label.</p>
<p>If the label is changed the new label has to be unique within the
containing division, or an error is thrown.</p>
<p>Further, of the <i class="arg">id</i> refers to the root element of the table of
contents, then using this method is equivalent to using the method
<i class="arg">label</i>, i.e. it is accessing the global label for the whole
table.</p></dd>
<dt><a name="16"><i class="arg">objectName</i> <b class="method">description</b> <i class="arg">id</i> <span class="opt">?<i class="arg">newdesc</i>?</span></a></dt>
<dd><p>This method queries and/or changes the description of the element
identified by the handle <i class="arg">id</i>. If the argument <i class="arg">newdesc</i> is
present then the description is changed to that value. Regardless of
this, the result of the method is the current value of the description.</p>
<p>The element this method operates on has to be a reference element, or
an error will be thrown.</p></dd>
<dt><a name="17"><i class="arg">objectName</i> <b class="method">document</b> <i class="arg">id</i> <span class="opt">?<i class="arg">newdocid</i>?</span></a></dt>
<dd><p>This method queries and/or changes the document reference of the
element identified by the handle <i class="arg">id</i>.
If the argument <i class="arg">newdocid</i> is present then the description is
changed to that value. Regardless of this, the result of the method is
the current value of the document reference.</p>
<p>Setting the reference to the empty string means unsetting it, and is
allowed only for division elements. Conversely, if the result is the
empty string then the element has no document reference, and this can
happen only for division elements.</p></dd>
<dt><a name="18"><i class="arg">objectName</i> <b class="method">title</b></a></dt>
<dd><p>Returns the currently defined title of the table of contents.</p></dd>
<dt><a name="19"><i class="arg">objectName</i> <b class="method">title</b> <i class="arg">text</i></a></dt>
<dd><p>Sets the title of the table of contents to <i class="arg">text</i>, and returns it as
the result of the command.</p></dd>
<dt><a name="20"><i class="arg">objectName</i> <b class="method">label</b></a></dt>
<dd><p>Returns the currently defined label of the table of contents.</p></dd>
<dt><a name="21"><i class="arg">objectName</i> <b class="method">label</b> <i class="arg">text</i></a></dt>
<dd><p>Sets the label of the table of contents to <i class="arg">text</i>, and returns it as
the result of the command.</p></dd>
<dt><a name="22"><i class="arg">objectName</i> <b class="method">importer</b></a></dt>
<dd><p>Returns the import manager object currently attached to the container,
if any.</p></dd>
<dt><a name="23"><i class="arg">objectName</i> <b class="method">importer</b> <i class="arg">object</i></a></dt>
<dd><p>Attaches the <i class="arg">object</i> as import manager to the container, and
returns it as the result of the command.
Note that the <i class="arg">object</i> is <em>not</em> put into ownership of the
container. I.e., destruction of the container will <em>not</em> destroy
the <i class="arg">object</i>.</p>
<p>It is expected that <i class="arg">object</i> provides a method named
<b class="method">import text</b> which takes a text and a format name, and
returns the canonical serialization of the table of contents contained in
the text, assuming the given format.</p></dd>
<dt><a name="24"><i class="arg">objectName</i> <b class="method">exporter</b></a></dt>
<dd><p>Returns the export manager object currently attached to the container,
if any.</p></dd>
<dt><a name="25"><i class="arg">objectName</i> <b class="method">exporter</b> <i class="arg">object</i></a></dt>
<dd><p>Attaches the <i class="arg">object</i> as export manager to the container, and
returns it as the result of the command.
Note that the <i class="arg">object</i> is <em>not</em> put into ownership of the
container. I.e., destruction of the container will <em>not</em> destroy
the <i class="arg">object</i>.</p>
<p>It is expected that <i class="arg">object</i> provides a method named
<b class="method">export object</b> which takes the container and a format name,
and returns a text encoding table of contents stored in the container, in
the given format. It is further expected that the <i class="arg">object</i> will
use the container's method <b class="method">serialize</b> to obtain the
serialization of the table of contents from which to generate the text.</p></dd>
<dt><a name="26"><i class="arg">objectName</i> <b class="method">deserialize =</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method replaces the contents of the table object with the table
contained in the <i class="arg">data</i>. If no <i class="arg">format</i> was specified it is
assumed to be the regular serialization of a table of contents.</p>
<p>Otherwise the object will use the attached import manager to convert
the data from the specified format to a serialization it can handle.
In that case an error will be thrown if the container has no import
manager attached to it.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="27"><i class="arg">objectName</i> <b class="method">deserialize +=</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method behaves like <b class="method">deserialize =</b> in its essentials,
except that it merges the table of contents in the <i class="arg">data</i> to its
contents instead of replacing it.
The method will throw an error if merging is not possible, i.e. would
produce an invalid table. The existing content is left unchanged in
that case.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="28"><i class="arg">objectName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method returns the table of contents contained in the object. If no
<i class="arg">format</i> is not specified the returned result is the canonical
serialization of its contents.</p>
<p>Otherwise the object will use the attached export manager to convert
the data to the specified format.
In that case an error will be thrown if the container has no export
manager attached to it.</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key387">doctoc markup</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key250">generation</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key106">table</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key245">tcler's wiki</a>, <a href="../../../../index.html#key248">text</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_export.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469

<div class='fossil-doc' data-title='doctools::toc::export - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export - Exporting tables of contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Concepts</a></li>
<li class="doctools_section"><a href="#section3">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Export plugin API v2 reference</a></li>
<li class="doctools_section"><a href="#section5">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::toc::export <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::config</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::export</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">config names</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">config get</b></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#10"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the export of
tables of contents to other formats, i.e. their conversion to, for
example <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>, <i class="term"><a href="../../../../index.html#key18">HTML</a></i>, etc.</p>
<p>This is one of the three public pillars the management of tables of
contents resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term">Importing tables of contents</i>, and</p></li>
<li><p><i class="term"><a href="toc_container.html">Holding tables of contents</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of tables of contents,
and their parts, see the same-named section.
For information about the data structure which is the major input to
the manager objects provided by this package see the section
<span class="sectref"><a href="#section5">ToC serialization format</a></span>.</p>
<p>The plugin system of our class is based on the package
<b class="package"><a href="../pluginmgr/pluginmgr.html">pluginmgr</a></b>, and configured to look for plugins using</p>
<ol class="doctools_enumerated">
<li><p>the environment variable <b class="variable">DOCTOOLS_TOC_EXPORT_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">DOCTOOLS_TOC_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">DOCTOOLS_PLUGINS</b>,</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/toc/export/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/toc/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/toc/export/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/toc/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/plugins</b>&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\TOC\EXPORT\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\TOC\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\PLUGINS&quot;</p></li>
</ol>
<p>The last three are used only when the package is run on a machine
using Windows(tm) operating system.</p>
<p>The whole system is delivered with six predefined export plugins,
namely</p>
<dl class="doctools_definitions">
<dt>doctoc</dt>
<dd><p>See <i class="term"><a href="export_doctoc.html">doctoc export plugin</a></i> for details.</p></dd>
<dt>html</dt>
<dd><p>See <i class="term">html export plugin</i> for details.</p></dd>
<dt>json</dt>
<dd><p>See <i class="term">json export plugin</i> for details.</p></dd>
<dt>nroff</dt>
<dd><p>See <i class="term"><a href="../doctools2idx/idx_export_nroff.html">nroff export plugin</a></i> for details.</p></dd>
<dt>text</dt>
<dd><p>See <i class="term">text export plugin</i> for details.</p></dd>
<dt>wiki</dt>
<dd><p>See <i class="term"><a href="../doctools2idx/idx_export_wiki.html">wiki export plugin</a></i> for details.</p></dd>
</dl>
<p>Readers wishing to write their own export plugin for some format, i.e.
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Export plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key157">table of contents</a></i> consists of a (possibly empty) list of
<i class="term">elements</i>.</p></li>
<li><p>Each element in the list is identified by its label.</p></li>
<li><p>Each element is either a <i class="term"><a href="../../../../index.html#key251">reference</a></i>, or a <i class="term">division</i>.</p></li>
<li><p>Each reference has an associated document, identified by a symbolic
id, and a textual description.</p></li>
<li><p>Each division may have an associated document, identified by a
symbolic id.</p></li>
<li><p>Each division consists consists of a (possibly empty) list of
<i class="term">elements</i>, with each element following the rules as specified in
item 2 and above.</p></li>
</ol>
<p>A few notes</p>
<ol class="doctools_enumerated">
<li><p>The above rules span up a tree of elements, with references as the
leaf nodes, and divisions as the inner nodes, and each element
representing an entry in the whole table of contents.</p></li>
<li><p>The identifying labels of any element E are unique within their
division (or toc), and the full label of any element E is the list of
labels for all nodes on the unique path from the root of the tree to
E, including E.</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::export</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new export manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::doctools::toc::export</b> command have
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method takes the canonical serialization of a table of contents
stored in <i class="arg">serial</i> and converts it to the specified <i class="arg">format</i>,
using the export plugin for the format. An error is thrown if no
plugin could be found for the format.
The string generated by the conversion process is returned as
the result of this method.</p>
<p>If no format is specified the method defaults to <b class="const">doctoc</b>.</p>
<p>The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section5">ToC serialization format</a></span>.</p>
<p>The plugin has to conform to the interface specified in section
<span class="sectref"><a href="#section4">Export plugin API v2 reference</a></span>.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method is a convenient wrapper around the <b class="method">export serial</b>
method described by the previous item.
It expects that <i class="arg">object</i> is an object command supporting a
<b class="method">serialize</b> method returning the canonical serialization of a
table of contents. It invokes that method, feeds the result into
<b class="method">export serial</b> and returns the resulting string as its own
result.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">config names</b></a></dt>
<dd><p>This method returns a list containing the names of all configuration
variables currently known to the object.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">config get</b></a></dt>
<dd><p>This method returns a dictionary containing the names and values of
all configuration variables currently known to the object.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Export plugin API v2 reference</a></h2>
<p>Plugins are what this package uses to manage the support for any
output format beyond the <span class="sectref"><a href="#section5">ToC serialization format</a></span>. Here we
specify the API the objects created by this package use to interact
with their plugins.</p>
<p>A plugin for this package has to follow the rules listed below:</p>
<ol class="doctools_enumerated">
<li><p>A plugin is a package.</p></li>
<li><p>The name of a plugin package has the form
		doctools::toc::export::<b class="variable">FOO</b>,
       where <b class="variable">FOO</b> is the name of the format the plugin will
       generate output for. This name is also the argument to provide
       to the various <b class="method">export</b> methods of export manager
       objects to get a string encoding a table of contents in that
       format.</p></li>
<li><p>The plugin can expect that the package
       <b class="package">doctools::toc::export::plugin</b> is present, as
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="10"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an export manager of <b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b> has to generate
output for a table of contents it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">serial</i></dt>
<dd><p>This argument will contain the <i class="term">canonical</i> serialization of the
table of contents for which to generate the output.
The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section5">ToC serialization format</a></span>.</p></dd>
<dt>dictionary <i class="arg">configuration</i></dt>
<dd><p>This argument will contain the current configuration to apply to the
generation, as a dictionary mapping from variable names to values.</p>
<p>The following configuration variables have a predefined meaning all
plugins have to obey, although they can ignore this information at
their discretion. Any other other configuration variables recognized
by a plugin will be described in the manpage for that plugin.</p>
<dl class="doctools_definitions">
<dt>user</dt>
<dd><p>This variable is expected to contain the name of the user
           owning the process invoking the plugin.</p></dd>
<dt>format</dt>
<dd><p>This variable is expected to contain the name of the
             format whose plugin is invoked.</p></dd>
<dt>file</dt>
<dd><p>This variable, if defined by the user of the table object
           is expected to contain the name of the input file for which
           the plugin is generating its output for.</p></dd>
<dt>map</dt>
<dd><p>This variable, if defined by the user of the table object is
          expected to contain a dictionary mapping from symbolic
          document ids used in the table entries to actual paths (or
          urls). A plugin has to be able to handle the possibility
          that a document id is without entry in this mapping.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#key260">export</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key250">generation</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key106">table</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key245">tcler's wiki</a>, <a href="../../../../index.html#key248">text</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_export_html.html.































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351

<div class='fossil-doc' data-title='doctools::toc::export::html - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::html(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::html - HTML export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Configuration</a></li>
<li class="doctools_section"><a href="#section4">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::html <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::html</b></li>
<li>package require <b class="pkgname">doctools::html::cssdefaults</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of HTML markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates HTML markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Configuration</a></h2>
<p>The html export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">user</i></dt>
<dd><p>This standard configuration variable contains the name of the user
running the process which invoked the export plugin.
The plugin puts this information into the provenance comment at the
beginning of the generated document.</p></dd>
<dt>string <i class="arg">file</i></dt>
<dd><p>This standard configuration variable contains the name of the file the
table of contents came from. This variable may not be set or contain
the empty string.
The plugin puts this information, if defined, i.e. set and not the
empty string, into the provenance comment at the beginning of the
generated document.</p></dd>
<dt>dictionary <i class="arg">map</i></dt>
<dd><p>This standard configuration variable contains a dictionary mapping
from the (symbolic) document ids in reference entries to the actual
filenames and/or urls to be used in the output.</p>
<p>Document ids without a mapping are used unchanged.</p></dd>
<dt>boolean <i class="arg">newlines</i></dt>
<dd><p>If this flag is set the plugin will break the generated html code
across lines, with each markup command on a separate line.</p>
<p>If this flag is not set (the default), the whole document will be
written on a single line, with minimum spacing between all elements.</p></dd>
<dt>boolean <i class="arg">indented</i></dt>
<dd><p>If this flag is set the plugin will indent the markup commands
according to the structure of indices. To make this work this also
implies that <b class="variable">newlines</b> is set.</p>
<p>If this flag is not set (the default), the output is formatted as per
the value of <b class="variable">newlines</b>, and no indenting is done.</p></dd>
<dt>string <i class="arg">meta</i></dt>
<dd><p>This variable is meant to hold a fragment of HTML (default: empty).
The fragment it contains will be inserted into the generated output in
the &lt;head&gt; section of the document, just after the &lt;title&gt; tag.</p></dd>
<dt>string <i class="arg">header</i></dt>
<dd><p>This variable is meant to hold a fragment of HTML (default: empty).
The fragment it contains will be inserted into the generated output
just after the &lt;h1&gt; title tag in the body of the document, in the
class.header &lt;div&gt;'ision.</p></dd>
<dt>string <i class="arg">footer</i></dt>
<dd><p>This variable is meant to hold a fragment of HTML (default:
empty). The fragment it contains will be inserted into the generated
output just before the &lt;/body&gt; tag, in the class.footer &lt;div&gt;'ision.</p></dd>
<dt>dictionary <i class="arg">rid</i></dt>
<dd><p>The value of this variable (default: empty) maps references to the
identifiers to use as their anchor names. Each reference <b class="variable">FOO</b> not
found in the dictionary uses <b class="const">REF-</b><b class="variable">FOO</b> as anchor,
i.e. itself prefixed with the string <b class="const">REF-</b>.</p></dd>
<dt>string <i class="arg">sepline</i></dt>
<dd><p>The value of this variable is the string to use for the separator
comments inserted into the output when the outpout is broken across
lines and/or indented. The default string consists of 60 dashes.</p></dd>
<dt>string <i class="arg">class.main</i></dt>
<dd><p>This variable contains the class name for the main &lt;div&gt;'ivision of
the generated document. The default is <b class="const">doctools</b>.</p></dd>
<dt>string <i class="arg">class.header</i></dt>
<dd><p>This variable contains the class name for the header &lt;div&gt;'ision of
the generated document. The default is <b class="const">toc-header</b>.  This
division contains the document title, the user specified <b class="variable">header</b>,
if any, and a visible separator line.</p></dd>
<dt>string <i class="arg">class.title</i></dt>
<dd><p>This variable contains the class name for the &lt;h1&gt; tag enclosing the
document title. The default is <b class="const">toc-title</b>.</p></dd>
<dt>string <i class="arg">class.navsep</i></dt>
<dd><p>This variable contains the class name for the &lt;hr&gt; separators in the
header and footer sections of the generated document. The default is
<b class="const">toc-navsep</b>.</p></dd>
<dt>string <i class="arg">class.contents</i></dt>
<dd><p>This variable contains the class name for the XXXXX holding the
keywords and their references in the generated document. The default
is <b class="const">toc-contents</b>.</p></dd>
<dt>string <i class="arg">class.ref</i></dt>
<dd><p>This variable contains the class name for the table elements which are
references to other documents. The default is <b class="const">toc-ref</b>.</p></dd>
<dt>string <i class="arg">class.div</i></dt>
<dd><p>This variable contains the class name for the table elements which are
divisions. The default is <b class="const">toc-div</b>.</p></dd>
<dt>string <i class="arg">class.footer</i></dt>
<dd><p>This variable contains the class name for the footer &lt;div&gt;'ision of
the generated document. The default is <b class="const">toc-footer</b>. This
division contains a browser-visible separator line and the user
specified <b class="variable">footer</b>, if any.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variable <b class="variable">format</b>, and its value.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_export_json.html.





































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354

<div class='fossil-doc' data-title='doctools::toc::export::json - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::json(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::json - JSON export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">JSON notation of tables of contents</a></li>
<li class="doctools_section"><a href="#section4">Configuration</a></li>
<li class="doctools_section"><a href="#section5">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::json <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">textutil::adjust</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section5">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates JSON markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">JSON notation of tables of contents</a></h2>
<p>The JSON format used for tables of contents is a direct translation of
the <span class="sectref"><a href="#section5">ToC serialization format</a></span>, mapping Tcl dictionaries as
JSON objects and Tcl lists as JSON arrays.
For example, the Tcl serialization</p>
<pre class="doctools_example">
doctools::toc {
    items {
        {reference {
	    desc {DocTools - Tables of Contents}
	     id introduction.man
	     label doctools::toc::introduction
	}}
	{division {
	     id processing.man
	     items {
	         {reference {
		     desc {doctoc serialization utilities}
		     id structure.man
		     label doctools::toc::structure
		 }}
		 {reference {
		     desc {Parsing text in doctoc format}
		     id parse.man
		     label doctools::toc::parse
		 }}
	     }
             label Processing
        }}
    }
    label {Table of Contents} 
    title TOC
}
</pre>
<p>is equivalent to the JSON string</p>
<pre class="doctools_example">
{
    &quot;doctools::toc&quot; : {
        &quot;items&quot; : [{
            &quot;reference&quot; : {
                &quot;desc&quot;  : &quot;DocTools - Tables of Contents&quot;,
                &quot;id&quot;    : &quot;introduction.man&quot;,
                &quot;label&quot; : &quot;doctools::toc::introduction&quot;
            }
        },{
            &quot;division&quot; : {
                &quot;id&quot;    : &quot;processing.man&quot;,
                &quot;items&quot; : [{
                    &quot;reference&quot; : {
                        &quot;desc&quot;  : &quot;doctoc serialization utilities&quot;,
                        &quot;id&quot;    : &quot;structure.man&quot;,
                        &quot;label&quot; : &quot;doctools::toc::structure&quot;
                    }
                },{
                    &quot;reference&quot; : {
                        &quot;desc&quot;  : &quot;Parsing text in doctoc format&quot;,
                        &quot;id&quot;    : &quot;parse.man&quot;,
                        &quot;label&quot; : &quot;doctools::toc::parse&quot;
                    }
                }],
                &quot;label&quot; : &quot;Processing&quot;
            }
        }],
        &quot;label&quot; : &quot;Table of Contents&quot;,
        &quot;title&quot; : &quot;TOC&quot;
    }
}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Configuration</a></h2>
<p>The JSON export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>boolean <i class="arg">indented</i></dt>
<dd><p>If this flag is set the plugin will break the generated JSON code
across lines and indent it according to its inner structure, with each
key of a dictionary on a separate line.</p>
<p>If this flag is not set (the default), the whole JSON object will be
written on a single line, with minimum spacing between all elements.</p></dd>
<dt>boolean <i class="arg">aligned</i></dt>
<dd><p>If this flag is set the generator ensures that the values for the keys
in a dictionary are vertically aligned with each other, for a nice
table effect. To make this work this also implies that <b class="variable">indented</b>
is set.</p>
<p>If this flag is not set (the default), the output is formatted as per
the value of <b class="variable">indented</b>, without trying to align the values for
dictionary keys.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">user</b>, <b class="variable">format</b>, <b class="variable">file</b>, and <b class="variable">map</b> and
their values.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_export_nroff.html.

































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288

<div class='fossil-doc' data-title='doctools::toc::export::nroff - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::nroff(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::nroff - nroff export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Configuration</a></li>
<li class="doctools_section"><a href="#section4">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::nroff <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::nroff::man_macros</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of nroff markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates nroff markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Configuration</a></h2>
<p>The nroff export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">user</i></dt>
<dd><p>This standard configuration variable contains the name of the user
running the process which invoked the export plugin.
The plugin puts this information into the provenance comment at the
beginning of the generated document.</p></dd>
<dt>string <i class="arg">file</i></dt>
<dd><p>This standard configuration variable contains the name of the file the
table of contents came from. This variable may not be set or contain
the empty string.
The plugin puts this information, if defined, i.e. set and not the
empty string, into the provenance comment at the beginning of the
generated document.</p></dd>
<dt>boolean <i class="arg">inline</i></dt>
<dd><p>If this flag is set (default) the plugin will place the definitions of
the man macro set directly into the output.</p>
<p>If this flag is not set, the plugin will place a reference to the
definitions of the man macro set into the output, but not the macro
definitions themselves.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">format</b>, and <b class="variable">map</b>, and their values.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_export_text.html.





































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274

<div class='fossil-doc' data-title='doctools::toc::export::text - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::text(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::text - plain text export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Configuration</a></li>
<li class="doctools_section"><a href="#section4">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::text <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of plain text markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates plain text markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Configuration</a></h2>
<p>The text export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>dictionary <i class="arg">map</i></dt>
<dd><p>This standard configuration variable contains a dictionary mapping
from the (symbolic) document ids in reference entries to the actual
filenames and/or urls to be used in the output.</p>
<p>Document ids without a mapping are used unchanged.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">user</b>, <b class="variable">file</b>, and <b class="variable">format</b>, and their values.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key545">plain text</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_export_wiki.html.



















































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281

<div class='fossil-doc' data-title='doctools::toc::export::wiki - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::wiki(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::wiki - wiki export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Wiki markup</a></li>
<li class="doctools_section"><a href="#section4">Configuration</a></li>
<li class="doctools_section"><a href="#section5">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::wiki <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of wiki markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section5">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates wiki markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Wiki markup</a></h2>
<p>The basic syntax of the wiki markup generated by this plugin are
described at <a href="http://wiki.tcl.tk/14">http://wiki.tcl.tk/14</a>.</p>
<p>The plugin goes beyond the classic markup to generate proper headers
and indenting.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Configuration</a></h2>
<p>The wiki export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>dictionary <i class="arg">map</i></dt>
<dd><p>This standard configuration variable contains a dictionary mapping
from the (symbolic) document ids in reference entries to the actual
filenames and/or urls to be used in the output.</p>
<p>Document ids without a mapping are used unchanged.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">user</b>, <b class="variable">file</b> and <b class="variable">format</b>, and their values.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_import.html.





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530

<div class='fossil-doc' data-title='doctools::toc::import - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::import(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::import - Importing keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Concepts</a></li>
<li class="doctools_section"><a href="#section3">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Import plugin API v2 reference</a></li>
<li class="doctools_section"><a href="#section5">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::toc::import <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::config</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::import</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">import text</b> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">import file</b> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">import object text</b> <i class="arg">object</i> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">import object file</b> <i class="arg">object</i> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">config names</b></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">config get</b></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">includes</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">include add</b> <i class="arg">path</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">include remove</b> <i class="arg">path</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">include clear</b></a></li>
<li><a href="#16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the import of
tables of contents from other formats, i.e. their conversion from, for
example <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>, <i class="term"><a href="../../../../index.html#key206">json</a></i>, etc.</p>
<p>This is one of the three public pillars the management of tables of
contents resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="toc_export.html">Exporting tables of contents</a></i>, and</p></li>
<li><p><i class="term"><a href="toc_container.html">Holding tables of contents</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of tables of contents,
and their parts, see the same-named section.
For information about the data structure which is the major output of
the manager objects provided by this package see the section
<span class="sectref"><a href="#section5">ToC serialization format</a></span>.</p>
<p>The plugin system of our class is based on the package
<b class="package"><a href="../pluginmgr/pluginmgr.html">pluginmgr</a></b>, and configured to look for plugins using</p>
<ol class="doctools_enumerated">
<li><p>the environment variable <b class="variable">DOCTOOLS_TOC_IMPORT_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">DOCTOOLS_TOC_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">DOCTOOLS_PLUGINS</b>,</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/toc/import/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/toc/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/toc/import/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/toc/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.doctools/plugins</b>&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\TOC\IMPORT\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\TOC\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\DOCTOOLS\PLUGINS&quot;</p></li>
</ol>
<p>The last three are used only when the package is run on a machine
using Windows(tm) operating system.</p>
<p>The whole system is delivered with two predefined import plugins,
namely</p>
<dl class="doctools_definitions">
<dt>doctoc</dt>
<dd><p>See <i class="term"><a href="import_doctoc.html">doctoc import plugin</a></i> for details.</p></dd>
<dt>json</dt>
<dd><p>See <i class="term">json import plugin</i> for details.</p></dd>
</dl>
<p>Readers wishing to write their own import plugin for some format, i.e.
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Import plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key157">table of contents</a></i> consists of a (possibly empty) list of
<i class="term">elements</i>.</p></li>
<li><p>Each element in the list is identified by its label.</p></li>
<li><p>Each element is either a <i class="term"><a href="../../../../index.html#key251">reference</a></i>, or a <i class="term">division</i>.</p></li>
<li><p>Each reference has an associated document, identified by a symbolic
id, and a textual description.</p></li>
<li><p>Each division may have an associated document, identified by a
symbolic id.</p></li>
<li><p>Each division consists consists of a (possibly empty) list of
<i class="term">elements</i>, with each element following the rules as specified in
item 2 and above.</p></li>
</ol>
<p>A few notes</p>
<ol class="doctools_enumerated">
<li><p>The above rules span up a tree of elements, with references as the
leaf nodes, and divisions as the inner nodes, and each element
representing an entry in the whole table of contents.</p></li>
<li><p>The identifying labels of any element E are unique within their
division (or toc), and the full label of any element E is the list of
labels for all nodes on the unique path from the root of the tree to
E, including E.</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::import</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new import manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::doctools::toc::import</b> command have
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">import text</b> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method takes the <i class="arg">text</i> and converts it from the specified
<i class="arg">format</i> to the canonical serialization of a table of contents using
the import plugin for the format. An error is thrown if no plugin
could be found for the format.
The serialization generated by the conversion process is returned as
the result of this method.</p>
<p>If no format is specified the method defaults to <b class="const">doctoc</b>.</p>
<p>The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section5">ToC serialization format</a></span>.</p>
<p>The plugin has to conform to the interface specified in section
<span class="sectref"><a href="#section4">Import plugin API v2 reference</a></span>.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">import file</b> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method is a convenient wrapper around the <b class="method">import text</b>
method described by the previous item.
It reads the contents of the specified file into memory, feeds the
result into <b class="method">import text</b> and returns the resulting
serialization as its own result.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">import object text</b> <i class="arg">object</i> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method is a convenient wrapper around the <b class="method">import text</b>
method described by the previous item.
It expects that <i class="arg">object</i> is an object command supporting a
<b class="method">deserialize</b> method expecting the canonical serialization of a
table of contents.
It imports the text using <b class="method">import text</b> and then feeds the
resulting serialization into the <i class="arg">object</i> via <b class="method">deserialize</b>.
This method returns the empty string as it result.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">import object file</b> <i class="arg">object</i> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method behaves like <b class="method">import object text</b>, except that it
reads the text to convert from the specified file instead of being
given it as argument.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">config names</b></a></dt>
<dd><p>This method returns a list containing the names of all configuration
variables currently known to the object.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">config get</b></a></dt>
<dd><p>This method returns a dictionary containing the names and values of
all configuration variables currently known to the object.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">includes</b></a></dt>
<dd><p>This method returns a list containing the currently specified paths to
use to search for include files when processing input.
The order of paths in the list corresponds to the order in which they
are used, from first to last, and also corresponds to the order in
which they were added to the object.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">include add</b> <i class="arg">path</i></a></dt>
<dd><p>This methods adds the specified <i class="arg">path</i> to the list of paths to use
to search for include files when processing input. The path is added
to the end of the list, causing it to be searched after all previously
added paths. The result of the command is the empty string.</p>
<p>The method does nothing if the path is already known.</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">include remove</b> <i class="arg">path</i></a></dt>
<dd><p>This methods removes the specified <i class="arg">path</i> from the list of paths
to use to search for include files when processing input. The result
of the command is the empty string.</p>
<p>The method does nothing if the path is not known.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">include clear</b></a></dt>
<dd><p>This method clears the list of paths to use to search for include
files when processing input. The result of the command is the empty
string.</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Import plugin API v2 reference</a></h2>
<p>Plugins are what this package uses to manage the support for any input
format beyond the <span class="sectref"><a href="#section5">ToC serialization format</a></span>. Here we
specify the API the objects created by this package use to interact
with their plugins.</p>
<p>A plugin for this package has to follow the rules listed below:</p>
<ol class="doctools_enumerated">
<li><p>A plugin is a package.</p></li>
<li><p>The name of a plugin package has the form
		doctools::toc::import::<b class="variable">FOO</b>,
       where <b class="variable">FOO</b> is the name of the format the plugin will
       generate output for. This name is also the argument to provide
       to the various <b class="method">import</b> methods of import manager
       objects to get a string encoding a table of contents in that
       format.</p></li>
<li><p>The plugin can expect that the package
       <b class="package">doctools::toc::export::plugin</b> is present, as
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>The plugin can expect that a command named <b class="cmd">IncludeFile</b> is
       present, with the signature</p>
<dl class="doctools_definitions">
<dt><a name="16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></dt>
<dd><p>This command has to be invoked by the plugin when it has to process an
included file, if the format has the concept of such. An example of
such a format would be <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>.</p>
<p>The plugin has to supply the following arguments</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">currentfile</i></dt>
<dd><p>The path of the file it is currently processing. This may be the empty
string if no such is known.</p></dd>
<dt>string <i class="arg">path</i></dt>
<dd><p>The path of the include file as specified in the include directive
being processed.</p></dd>
</dl>
<p>The result of the command will be a 5-element list containing</p>
<ol class="doctools_enumerated">
<li><p>A boolean flag indicating the success (<b class="const">True</b>) or failure
       (<b class="const">False</b>) of the operation.</p></li>
<li><p>In case of success the contents of the included file, and the
       empty string otherwise.</p></li>
<li><p>The resolved, i.e. absolute path of the included file, if
       possible, or the unchanged <i class="arg">path</i> argument. This is for
       display in an error message, or as the <i class="arg">currentfile</i>
       argument of another call to <b class="cmd">IncludeFile</b> should this file
       contain more files.</p></li>
<li><p>In case of success an empty string, and for failure a code
       indicating the reason for it, one of</p>
<dl class="doctools_definitions">
<dt>notfound</dt>
<dd><p>The specified file could not be found.</p></dd>
<dt>notread</dt>
<dd><p>The specified file was found, but not be read into memory.</p></dd>
</dl>
</li>
<li><p>An empty string in case of success of a <b class="const">notfound</b>
       failure, and an additional error message describing the reason
       for a <b class="const">notread</b> error in more detail.</p></li>
</ol></dd>
</dl>
</li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an import manager of <b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b> has to parse
input for a table of contents it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">text</i></dt>
<dd><p>This argument will contain the text encoding the table of contents per
the format the plugin is for.</p></dd>
<dt>dictionary <i class="arg">configuration</i></dt>
<dd><p>This argument will contain the current configuration to apply to the
parsing, as a dictionary mapping from variable names to values.</p>
<p>The following configuration variables have a predefined meaning all
plugins have to obey, although they can ignore this information at
their discretion. Any other other configuration variables recognized
by a plugin will be described in the manpage for that plugin.</p>
<dl class="doctools_definitions">
<dt>user</dt>
<dd><p>This variable is expected to contain the name of the user
           owning the process invoking the plugin.</p></dd>
<dt>format</dt>
<dd><p>This variable is expected to contain the name of the
             format whose plugin is invoked.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#key291">import</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key106">table</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key246">url</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_import_json.html.























































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331

<div class='fossil-doc' data-title='doctools::toc::import::json - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::import::json(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::import::json - JSON import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">JSON notation of tables of contents</a></li>
<li class="doctools_section"><a href="#section4">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::import::json <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents import plugin
for the parsing of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_import.html">doctools::toc::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_import.html">doctools::toc::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as JSON
markup encoding a table of contents, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that table of contents, in the form
specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">JSON notation of tables of contents</a></h2>
<p>The JSON format used for tables of contents is a direct translation of
the <span class="sectref"><a href="#section4">ToC serialization format</a></span>, mapping Tcl dictionaries as
JSON objects and Tcl lists as JSON arrays.
For example, the Tcl serialization</p>
<pre class="doctools_example">
doctools::toc {
    items {
        {reference {
	    desc {DocTools - Tables of Contents}
	     id introduction.man
	     label doctools::toc::introduction
	}}
	{division {
	     id processing.man
	     items {
	         {reference {
		     desc {doctoc serialization utilities}
		     id structure.man
		     label doctools::toc::structure
		 }}
		 {reference {
		     desc {Parsing text in doctoc format}
		     id parse.man
		     label doctools::toc::parse
		 }}
	     }
             label Processing
        }}
    }
    label {Table of Contents} 
    title TOC
}
</pre>
<p>is equivalent to the JSON string</p>
<pre class="doctools_example">
{
    &quot;doctools::toc&quot; : {
        &quot;items&quot; : [{
            &quot;reference&quot; : {
                &quot;desc&quot;  : &quot;DocTools - Tables of Contents&quot;,
                &quot;id&quot;    : &quot;introduction.man&quot;,
                &quot;label&quot; : &quot;doctools::toc::introduction&quot;
            }
        },{
            &quot;division&quot; : {
                &quot;id&quot;    : &quot;processing.man&quot;,
                &quot;items&quot; : [{
                    &quot;reference&quot; : {
                        &quot;desc&quot;  : &quot;doctoc serialization utilities&quot;,
                        &quot;id&quot;    : &quot;structure.man&quot;,
                        &quot;label&quot; : &quot;doctools::toc::structure&quot;
                    }
                },{
                    &quot;reference&quot; : {
                        &quot;desc&quot;  : &quot;Parsing text in doctoc format&quot;,
                        &quot;id&quot;    : &quot;parse.man&quot;,
                        &quot;label&quot; : &quot;doctools::toc::parse&quot;
                    }
                }],
                &quot;label&quot; : &quot;Processing&quot;
            }
        }],
        &quot;label&quot; : &quot;Table of Contents&quot;,
        &quot;title&quot; : &quot;TOC&quot;
    }
}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_introduction.html.























































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251

<div class='fossil-doc' data-title='doctools2toc_introduction - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools2toc_introduction(n) 2.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools2toc_introduction - DocTools - Tables of Contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Related formats</a></li>
<li class="doctools_section"><a href="#section3">Package Overview</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key258">doctoc</a></i> (short for <em>documentation tables of contents</em>)
stands for a set of related, yet different, entities which are working
together for the easy creation and transformation of tables and
contents for documentation.</p>
<p>These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a table of contents.
Markup is represented by Tcl commands.
Beginners should start with the
<i class="term"><a href="../doctools/doctoc_lang_intro.html">doctoc language introduction</a></i>.
The formal specification is split over two documents, one dealing with
the <i class="term"><a href="../doctools/doctoc_lang_syntax.html">doctoc language syntax</a></i>, the other a
<i class="term"><a href="../doctools/doctoc_lang_cmdref.html">doctoc language command reference</a></i>.</p></li>
<li><p>A set of packages for the programmatic manipulation of tables of
contents in memory, and their conversion between various formats,
reading and writing. The aforementioned markup language is one of the
formats which can be both read from and written to.</p></li>
<li><p>The system for the conversion of tables of contents is based on a
plugin mechanism, for this we have two APIs describing the interface
between the packages above and the import/export plugins.</p></li>
</ol>
<p>Which of the more detailed documents are relevant to the reader of
this introduction depends on their role in the documentation process.</p>
<ol class="doctools_enumerated">
<li><p>A <i class="term">writer</i> of documentation has to understand the markup language
itself. A beginner to doctoc should read the more informally written
<i class="term"><a href="../doctools/doctoc_lang_intro.html">doctoc language introduction</a></i> first. Having digested this
the formal <i class="term"><a href="../doctools/doctoc_lang_syntax.html">doctoc language syntax</a></i> specification should
become understandable. A writer experienced with doctoc may only
need the <i class="term"><a href="../doctools/doctoc_lang_cmdref.html">doctoc language command reference</a></i> from time to
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of doctoc when handling directories of documentation,
automatically generating a proper table of contents for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose doctoc to the
user. At the bottom level, common to both applications, however we
find the three packages providing the basic facilities to handle
tables of contents, i.e. import from textual formats, programmatic
manipulation in memory, and export to textual formats. These are</p>
<dl class="doctools_definitions">
<dt><b class="package">doctoools::toc</b></dt>
<dd><p>Programmatic manipulation of tables of contents in memory.</p></dd>
<dt><b class="package">doctoools::toc::import</b></dt>
<dd><p>Import of tables of contents from various textual formats. The set of
supported formats is extensible through plugin packages.</p></dd>
<dt><b class="package">doctoools::toc::export</b></dt>
<dd><p>Export of tables of contents to various textual formats. The set of
supported formats is extensible through plugin packages.</p></dd>
</dl>
<p>See also section <span class="sectref"><a href="#section3">Package Overview</a></span> for an overview of the
dependencies between these and other, supporting packages.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the import and export packages and their plugins.
These APIs are described in the documentation for the two relevant
packages, i.e.</p>
<ul class="doctools_itemized">
<li><p><b class="package">doctoools::toc::import</b></p></li>
<li><p><b class="package">doctoools::toc::export</b></p></li>
</ul>
</li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Related formats</a></h2>
<p>The doctoc format does not stand alone, it has two companion formats.
These are called <i class="term"><a href="../../../../index.html#key178">docidx</a></i> and <i class="term"><a href="../../../../index.html#key179">doctools</a></i>, and they are
intended for the markup of <i class="term">keyword indices</i>, and of general
documentation, respectively.
They are described in their own sets of documents, starting at
the <i class="term">DocTools - Keyword Indices</i> and
the <i class="term">DocTools - General</i>, respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Package Overview</a></h2>
<pre class="doctools_example">
                                    ~~~~~~~~~~~ doctools::toc ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::toc::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::toc::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
doctools::config        =                         |     |    |                  =       doctools::include       doctools::config doctools::paths
                        |                         |     |    |                  |
                doctools::toc::export::&lt;*&gt;        |     |    |          doctools::toc::import::&lt;*&gt;
                        doctoc                    |     |    |                  doctoc, json
                        json                      |     |    |                  |           \\
                        html                      |     |    |          doctools::toc::parse \\
                        nroff                     |     |    |                  |             \\
                        wiki                      |     |    |  +---------------+              json
                        text                      |     |    |  |               |
                                                doctools::toc::structure        |
                                                                                |
                                                                        +-------+---------------+
                                                                        |                       |
          doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat        
                |                                                                               |
          doctools::text  doctools::nroff::man_macros                                           =
                                                                                                |
                                                                                        doctools::msgcat::toc::&lt;*&gt;
                                                                                                c, en, de, fr
                                                                                                (fr == en for now)
        ~~      Interoperable objects, without actual package dependencies
        --      Package dependency, higher requires lower package
        =       Dynamic dependency through plugin system
        &lt;*&gt;     Multiple packages following the given form of naming.
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../doctools/doctoc_intro.html">doctoc_intro</a>, <a href="../doctools/doctools.html">doctools</a>, doctools2doc_introduction, <a href="../doctools2idx/idx_introduction.html">doctools2idx_introduction</a>, <a href="../doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="../doctools/doctools_lang_faq.html">doctools_lang_faq</a>, <a href="../doctools/doctools_lang_intro.html">doctools_lang_intro</a>, <a href="../doctools/doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="../doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key519">contents</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key136">semantic markup</a>, <a href="../../../../index.html#key157">table of contents</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_msgcat_c.html.











































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

<div class='fossil-doc' data-title='doctools::msgcat::toc::c - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::c(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::c - Message catalog for the doctoc parser (C)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">msgcat</b></li>
<li>package require <b class="pkgname">doctools::msgcat::toc::c <span class="opt">?0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">doctools::msgcat::toc::c</b> is a
support module providing the C language message catalog
for the doctoc parser in the doctools system version 2. As such it is
an internal package a regular user (developer) should not be in direct
contact with.</p>
<p>If you are such please go the documentation of either</p>
<ol class="doctools_enumerated">
<li><p><b class="package">doctools::doc</b>,</p></li>
<li><p><b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b>, or</p></li>
<li><p><b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b></p></li>
</ol>
<p>Within the system architecture this package resides under the package
<b class="package"><a href="../doctools2base/tcllib_msgcat.html">doctools::msgcat</a></b> providing the general message catalog
management within the system. <em>Note</em> that there is <em>no</em>
explicit dependency between the manager and catalog packages. The
catalog is a plugin which is selected and loaded dynamically.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>This package has no exported API.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key290">C</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_msgcat_de.html.











































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

<div class='fossil-doc' data-title='doctools::msgcat::toc::de - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::de(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::de - Message catalog for the doctoc parser (DE)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">msgcat</b></li>
<li>package require <b class="pkgname">doctools::msgcat::toc::de <span class="opt">?0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">doctools::msgcat::toc::de</b> is a
support module providing the DE (german) language message catalog
for the doctoc parser in the doctools system version 2. As such it is
an internal package a regular user (developer) should not be in direct
contact with.</p>
<p>If you are such please go the documentation of either</p>
<ol class="doctools_enumerated">
<li><p><b class="package">doctools::doc</b>,</p></li>
<li><p><b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b>, or</p></li>
<li><p><b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b></p></li>
</ol>
<p>Within the system architecture this package resides under the package
<b class="package"><a href="../doctools2base/tcllib_msgcat.html">doctools::msgcat</a></b> providing the general message catalog
management within the system. <em>Note</em> that there is <em>no</em>
explicit dependency between the manager and catalog packages. The
catalog is a plugin which is selected and loaded dynamically.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>This package has no exported API.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key639">DE</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_msgcat_en.html.











































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

<div class='fossil-doc' data-title='doctools::msgcat::toc::en - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::en(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::en - Message catalog for the doctoc parser (EN)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">msgcat</b></li>
<li>package require <b class="pkgname">doctools::msgcat::toc::en <span class="opt">?0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">doctools::msgcat::toc::en</b> is a
support module providing the EN (english) language message catalog
for the doctoc parser in the doctools system version 2. As such it is
an internal package a regular user (developer) should not be in direct
contact with.</p>
<p>If you are such please go the documentation of either</p>
<ol class="doctools_enumerated">
<li><p><b class="package">doctools::doc</b>,</p></li>
<li><p><b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b>, or</p></li>
<li><p><b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b></p></li>
</ol>
<p>Within the system architecture this package resides under the package
<b class="package"><a href="../doctools2base/tcllib_msgcat.html">doctools::msgcat</a></b> providing the general message catalog
management within the system. <em>Note</em> that there is <em>no</em>
explicit dependency between the manager and catalog packages. The
catalog is a plugin which is selected and loaded dynamically.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>This package has no exported API.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key549">EN</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_msgcat_fr.html.











































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

<div class='fossil-doc' data-title='doctools::msgcat::toc::fr - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::fr(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::fr - Message catalog for the doctoc parser (FR)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">msgcat</b></li>
<li>package require <b class="pkgname">doctools::msgcat::toc::fr <span class="opt">?0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">doctools::msgcat::toc::fr</b> is a
support module providing the FR (french) language message catalog
for the doctoc parser in the doctools system version 2. As such it is
an internal package a regular user (developer) should not be in direct
contact with.</p>
<p>If you are such please go the documentation of either</p>
<ol class="doctools_enumerated">
<li><p><b class="package">doctools::doc</b>,</p></li>
<li><p><b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b>, or</p></li>
<li><p><b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b></p></li>
</ol>
<p>Within the system architecture this package resides under the package
<b class="package"><a href="../doctools2base/tcllib_msgcat.html">doctools::msgcat</a></b> providing the general message catalog
management within the system. <em>Note</em> that there is <em>no</em>
explicit dependency between the manager and catalog packages. The
catalog is a plugin which is selected and loaded dynamically.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>This package has no exported API.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key170">FR</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_parse.html.



























































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365

<div class='fossil-doc' data-title='doctools::toc::parse - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::parse(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::parse - Parsing text in doctoc format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Parse errors</a></li>
<li class="doctools_section"><a href="#section4">[doctoc] notation of tables of contents</a></li>
<li class="doctools_section"><a href="#section5">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::toc::parse <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">doctools::msgcat</b></li>
<li>package require <b class="pkgname">doctools::tcl::parse</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::stack</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::parse</b> <b class="method">text</b> <i class="arg">text</i></a></li>
<li><a href="#2"><b class="cmd">::doctools::toc::parse</b> <b class="method">file</b> <i class="arg">path</i></a></li>
<li><a href="#3"><b class="cmd">::doctools::toc::parse</b> <b class="method">includes</b></a></li>
<li><a href="#4"><b class="cmd">::doctools::toc::parse</b> <b class="method">include add</b> <i class="arg">path</i></a></li>
<li><a href="#5"><b class="cmd">::doctools::toc::parse</b> <b class="method">include remove</b> <i class="arg">path</i></a></li>
<li><a href="#6"><b class="cmd">::doctools::toc::parse</b> <b class="method">include clear</b></a></li>
<li><a href="#7"><b class="cmd">::doctools::toc::parse</b> <b class="method">vars</b></a></li>
<li><a href="#8"><b class="cmd">::doctools::toc::parse</b> <b class="method">var set</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#9"><b class="cmd">::doctools::toc::parse</b> <b class="method">var unset</b> <i class="arg">name</i></a></li>
<li><a href="#10"><b class="cmd">::doctools::toc::parse</b> <b class="method">var clear</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to parse text written in the
<i class="term"><a href="../../../../index.html#key258">doctoc</a></i> markup language and convert it into the canonical
serialization of the table of contents encoded in the text.
See the section <span class="sectref"><a href="#section5">ToC serialization format</a></span> for specification
of their format.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> documents.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::parse</b> <b class="method">text</b> <i class="arg">text</i></a></dt>
<dd><p>The command takes the string contained in <i class="arg">text</i> and parses it
under the assumption that it contains a document written using the
<i class="term"><a href="../../../../index.html#key258">doctoc</a></i> markup language. An error is thrown if this assumption
is found to be false. The format of these errors is described in
section <span class="sectref"><a href="#section3">Parse errors</a></span>.</p>
<p>When successful the command returns the canonical serialization of the
table of contents which was encoded in the text.
See the section <span class="sectref"><a href="#section5">ToC serialization format</a></span> for specification
of that format.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::toc::parse</b> <b class="method">file</b> <i class="arg">path</i></a></dt>
<dd><p>The same as <b class="method">text</b>, except that the text to parse is read from
the file specified by <i class="arg">path</i>.</p></dd>
<dt><a name="3"><b class="cmd">::doctools::toc::parse</b> <b class="method">includes</b></a></dt>
<dd><p>This method returns the current list of search paths used when looking
for include files.</p></dd>
<dt><a name="4"><b class="cmd">::doctools::toc::parse</b> <b class="method">include add</b> <i class="arg">path</i></a></dt>
<dd><p>This method adds the <i class="arg">path</i> to the list of paths searched when
looking for an include file. The call is ignored if the path is
already in the list of paths. The method returns the empty string as
its result.</p></dd>
<dt><a name="5"><b class="cmd">::doctools::toc::parse</b> <b class="method">include remove</b> <i class="arg">path</i></a></dt>
<dd><p>This method removes the <i class="arg">path</i> from the list of paths searched
when looking for an include file. The call is ignored if the path is
not contained in the list of paths. The method returns the empty
string as its result.</p></dd>
<dt><a name="6"><b class="cmd">::doctools::toc::parse</b> <b class="method">include clear</b></a></dt>
<dd><p>This method clears the list of search paths for include files.</p></dd>
<dt><a name="7"><b class="cmd">::doctools::toc::parse</b> <b class="method">vars</b></a></dt>
<dd><p>This method returns a dictionary containing the current set of
predefined variables known to the <b class="cmd">vset</b> markup command during
processing.</p></dd>
<dt><a name="8"><b class="cmd">::doctools::toc::parse</b> <b class="method">var set</b> <i class="arg">name</i> <i class="arg">value</i></a></dt>
<dd><p>This method adds the variable <i class="arg">name</i> to the set of predefined
variables known to the <b class="cmd">vset</b> markup command during processing,
and gives it the specified <i class="arg">value</i>. The method returns the empty
string as its result.</p></dd>
<dt><a name="9"><b class="cmd">::doctools::toc::parse</b> <b class="method">var unset</b> <i class="arg">name</i></a></dt>
<dd><p>This method removes the variable <i class="arg">name</i> from the set of predefined
variables known to the <b class="cmd">vset</b> markup command during
processing. The method returns the empty string as its result.</p></dd>
<dt><a name="10"><b class="cmd">::doctools::toc::parse</b> <b class="method">var clear</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This method removes all variables matching the <i class="arg">pattern</i> from the
set of predefined variables known to the <b class="cmd">vset</b> markup command
during processing. The method returns the empty string as its result.</p>
<p>The pattern matching is done with <b class="cmd">string match</b>, and the
default pattern used when none is specified, is <b class="const">*</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Parse errors</a></h2>
<p>The format of the parse error messages thrown when encountering
violations of the <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> markup syntax is human readable and
not intended for processing by machines. As such it is not documented.</p>
<p><em>However</em>, the errorCode attached to the message is
machine-readable and has the following format:</p>
<ol class="doctools_enumerated">
<li><p>The error code will be a list, each element describing a single error
found in the input. The list has at least one element, possibly more.</p></li>
<li><p>Each error element will be a list containing six strings describing an
error in detail. The strings will be</p>
<ol class="doctools_enumerated">
<li><p>The path of the file the error occured in. This may be empty.</p></li>
<li><p>The range of the token the error was found at. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file). Offsets
are counted from zero.</p></li>
<li><p>The line the first character after the error is on.
Lines are counted from one.</p></li>
<li><p>The column the first character after the error is at.
Columns are counted from zero.</p></li>
<li><p>The message code of the error. This value can be used as argument to
<b class="cmd">msgcat::mc</b> to obtain a localized error message, assuming that
the application had a suitable call of <b class="cmd">doctools::msgcat::init</b> to
initialize the necessary message catalogs (See package
<b class="package"><a href="../doctools2base/tcllib_msgcat.html">doctools::msgcat</a></b>).</p></li>
<li><p>A list of details for the error, like the markup command involved. In
the case of message code <b class="const">doctoc/include/syntax</b> this value is
the set of errors found in the included file, using the format
described here.</p></li>
</ol>
</li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">[doctoc] notation of tables of contents</a></h2>
<p>The doctoc format for tables of contents, also called the
<i class="term">doctoc markup language</i>, is too large to be covered in single
section.
The interested reader should start with the document</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/doctoc_lang_intro.html">doctoc language introduction</a></i></p></li>
</ol>
<p>and then proceed from there to the formal specifications, i.e. the
documents</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="../doctools/doctoc_lang_syntax.html">doctoc language syntax</a></i> and</p></li>
<li><p><i class="term"><a href="../doctools/doctoc_lang_cmdref.html">doctoc language command reference</a></i>.</p></li>
</ol>
<p>to get a thorough understanding of the language.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key257">lexer</a>, <a href="../../../../index.html#key9">parser</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/doctools2toc/toc_structure.html.





























































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318

<div class='fossil-doc' data-title='doctools::toc::structure - Documentation tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::structure(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::structure - Doctoc serialization utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::toc::structure <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">snit</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::structure</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::toc::structure</b> <b class="method">verify-as-canonical</b> <i class="arg">serial</i></a></li>
<li><a href="#3"><b class="cmd">::doctools::toc::structure</b> <b class="method">canonicalize</b> <i class="arg">serial</i></a></li>
<li><a href="#4"><b class="cmd">::doctools::toc::structure</b> <b class="method">print</b> <i class="arg">serial</i></a></li>
<li><a href="#5"><b class="cmd">::doctools::toc::structure</b> <b class="method">merge</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to work with the serializations of
tables of contents as managed by the doctools system v2, and specified
in section <span class="sectref"><a href="#section3">ToC serialization format</a></span>.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling tables of contents and their conversion into and out
of various other formats, like documents written using <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>
markup.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::structure</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of a table of contents and will throw an
error if that is not the case. The result of the command is the empty
string.</p>
<p>If the argument <i class="arg">canonvar</i> is specified it is interpreted as the
name of a variable in the calling context. This variable will be
written to if and only if <i class="arg">serial</i> is a valid regular
serialization. Its value will be a boolean, with <b class="const">True</b>
indicating that the serialization is not only valid, but also
<i class="term">canonical</i>. <b class="const">False</b> will be written for a valid, but
non-canonical serialization.</p>
<p>For the specification of regular and canonical serializations see the
section <span class="sectref"><a href="#section3">ToC serialization format</a></span>.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::toc::structure</b> <b class="method">verify-as-canonical</b> <i class="arg">serial</i></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">canonical</i> serialization of a table of contents and will throw
an error if that is not the case. The result of the command is the
empty string.</p>
<p>For the specification of canonical serializations see the section
<span class="sectref"><a href="#section3">ToC serialization format</a></span>.</p></dd>
<dt><a name="3"><b class="cmd">::doctools::toc::structure</b> <b class="method">canonicalize</b> <i class="arg">serial</i></a></dt>
<dd><p>This command assumes that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of a table of contents and will throw an
error if that is not the case.</p>
<p>It will then convert the input into the <i class="term">canonical</i> serialization
of the contained table of contents and return it as its result. If the
input is already canonical it will be returned unchanged.</p>
<p>For the specification of regular and canonical serializations see the
section <span class="sectref"><a href="#section3">ToC serialization format</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::doctools::toc::structure</b> <b class="method">print</b> <i class="arg">serial</i></a></dt>
<dd><p>This command assumes that the argument <i class="arg">serial</i> contains a valid
regular serialization of a table of contents and returns a string
containing that table in a human readable form.</p>
<p>The exact format of this form is not specified and cannot be relied on
for parsing or other machine-based activities.</p>
<p>For the specification of regular serializations see the section
<span class="sectref"><a href="#section3">ToC serialization format</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::doctools::toc::structure</b> <b class="method">merge</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></dt>
<dd><p>This command accepts the regular serializations of two tables of
contents and uses them to create their union.  The result of the
command is the canonical serialization of this unified table of
contents.</p>
<p>Title and label of the resulting table are taken from the table
contained in <i class="arg">serialb</i>.</p>
<p>The whole table and its divisions are merged recursively in the same
manner:</p>
<ol class="doctools_enumerated">
<li><p>All reference elements which occur in both divisions (identified by
their label) are unified with document id's and descriptions taken
from the second table.</p></li>
<li><p>All division elements which occur in both divisions (identified by
their label) are unified with the optional document id taken from the
second table, if any, or from the first if none is in the second. The
elements in the division are merged recursively using the same
algorithm as described in this list.</p></li>
<li><p>Type conflicts between elements, i.e. finding two elements with the
same label but different types result in a merge error.</p></li>
<li><p>All elements found in the second division but not in the first are
added to the end of the list of elements in the merge result.</p></li>
</ol>
<p>For the specification of regular and canonical serializations see the
section <span class="sectref"><a href="#section3">ToC serialization format</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a table of contents may have more than one regular serialization
only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any table of contents is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">doctools::toc</b>, and its
value. This value holds the contents of the table of contents.</p></li>
<li><p>The contents of the table of contents are a Tcl dictionary holding the
title of the table of contents, a label, and its elements. The
relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">title</b></dt>
<dd><p>The value is a string containing the title of the table of contents.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the table of contents.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the table, in the
order they are to be shown.</p>
<p>Each element is a Tcl list holding the type of the item, and its
description, in this order. An alternative description would be that
it is a Tcl dictionary holding a single key, the item type, mapped to
the item description.</p>
<p>The two legal item types and their descriptions are</p>
<dl class="doctools_definitions">
<dt><b class="const">reference</b></dt>
<dd><p>This item describes a single entry in the table of contents,
referencing a single document.
To this end its value is a Tcl dictionary containing an id for the
referenced document, a label, and a longer textual description which
can be associated with the entry.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the entry.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for this entry. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">desc</b></dt>
<dd><p>The value is a string containing a longer description for this entry.</p></dd>
</dl></dd>
<dt><b class="const">division</b></dt>
<dd><p>This item describes a group of entries in the table of contents,
inducing a hierarchy of entries.
To this end its value is a Tcl dictionary containing a label for the
group, an optional id to a document for the whole group, and the list
of entries in the group.
The relevant keys and their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">id</b></dt>
<dd><p>The value is a string containing the id of the document associated
with the whole group. This key is optional.</p></dd>
<dt><b class="const">label</b></dt>
<dd><p>The value is a string containing a label for the group. This string
also identifies the entry, and no two entries (references and
divisions) in the containing list are allowed to have the same label.</p></dd>
<dt><b class="const">items</b></dt>
<dd><p>The value is a Tcl list holding the elements of the group, in the
order they are to be shown.
This list has the same structure as the value for the keyword
<b class="const">items</b> used to describe the whole table of contents, see
above. This closes the recusrive definition of the structure, with
divisions holding the same type of elements as the whole table of
contents, including other divisions.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a table of contents has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this table of contents.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
</ol></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/dtplite/pkg_dtplite.html.





























































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430

<div class='fossil-doc' data-title='dtplite - Documentation toolbox'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dtplite(n) 1.3 tcllib &quot;Documentation toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dtplite - Lightweight DocTools Markup Processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">USE CASES</a></li>
<li class="doctools_subsection"><a href="#subsection2">COMMAND LINE</a></li>
<li class="doctools_subsection"><a href="#subsection3">OPTIONS</a></li>
<li class="doctools_subsection"><a href="#subsection4">FORMATS</a></li>
<li class="doctools_subsection"><a href="#subsection5">DIRECTORY STRUCTURES</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">dtplite <span class="opt">?1.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputfile</i></a></li>
<li><a href="#2"><b class="cmd">dtplite</b> <b class="const">validate</b> <i class="arg">inputfile</i></a></li>
<li><a href="#3"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></li>
<li><a href="#4"><b class="cmd">dtplite</b> <b class="option">-merge</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The application described by this document, <b class="syscmd">dtplite</b>, is the
successor to the extremely simple <b class="syscmd"><a href="../doctools/mpexpand.html">mpexpand</a></b>. Influenced in its
functionality by the <b class="syscmd">dtp</b> doctools processor it is much more
powerful than <b class="syscmd"><a href="../doctools/mpexpand.html">mpexpand</a></b>, yet still as easy to use; definitely
easier than <b class="syscmd">dtp</b> with its myriad of subcommands and options.</p>
<p><b class="syscmd">dtplite</b> is based upon the package <b class="package"><a href="../doctools/doctools.html">doctools</a></b>, like
the other two processors.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">dtplite</b> was written with the following three use cases in
mind.</p>
<ol class="doctools_enumerated">
<li><p>Validation of a single document, i.e. checking that it was written in
valid doctools format. This mode can also be used to get a preliminary
version of the formatted output for a single document, for display in
a browser, nroff, etc., allowing proofreading of the formatting.</p></li>
<li><p>Generation of the formatted documentation for a single package,
i.e. all the manpages, plus a table of contents and an index of
keywords.</p></li>
<li><p>An extension of the previous mode of operation, a method for the easy
generation of one documentation tree for several packages, and
especially of a unified table of contents and keyword index.</p></li>
</ol>
<p>Beyond the above we also want to make use of the customization
features provided by the HTML formatter. It is not the only format the
application should be able to generate, but we anticipiate it to be
the most commonly used, and it is one of the few which do provide
customization hooks.</p>
<p>We allow the caller to specify a header string, footer string, a
stylesheet, and data for a bar of navigation links at the top of the
generated document.
While all can be set as long as the formatting engine provides an
appropriate engine parameter (See section <span class="sectref"><a href="#subsection3">OPTIONS</a></span>) the last
two have internal processing which make them specific to HTML.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">COMMAND LINE</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputfile</i></a></dt>
<dd><p>This is the form for use case [1]. The <i class="arg">options</i> will be
explained later, in section <span class="sectref"><a href="#subsection3">OPTIONS</a></span>.</p>
<dl class="doctools_arguments">
<dt>path <i class="arg">output</i> (in)</dt>
<dd><p>This argument specifies where to write the generated document. It can
be the path to a file or directory, or <b class="const">-</b>.
The last value causes the application to write the generated
documented to <b class="const">stdout</b>.</p>
<p>If the <i class="arg">output</i> does not exist then [file dirname $output]
has to exist and must be a writable directory.
The generated document will be written to a file in that directory,
and the name of that file will be derived from the <i class="arg">inputfile</i>,
the <i class="arg">format</i>, and the value given to option <b class="option">-ext</b> (if
present).</p></dd>
<dt>(path|handle) <i class="arg">format</i> (in)</dt>
<dd><p>This argument specifies the formatting engine to use when processing
the input, and thus the format of the generated document. See section
<span class="sectref"><a href="#subsection4">FORMATS</a></span> for the possibilities recognized by the application.</p></dd>
<dt>path <i class="arg">inputfile</i> (in)</dt>
<dd><p>This argument specifies the path to the file to process. It has to
exist, must be readable, and written in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">dtplite</b> <b class="const">validate</b> <i class="arg">inputfile</i></a></dt>
<dd><p>This is a simpler form for use case [1]. The &quot;validate&quot; format
generates no output at all, only syntax checks are performed. As such
the specification of an output file or other options is not necessary
and left out.</p></dd>
<dt><a name="3"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [2]. It differs from the form for
use case [1] by having the input documents specified through a
directory instead of a file. The other arguments are identical, except
for <i class="arg">output</i>, which now has to be the path to an existing and
writable directory.</p>
<p>The input documents are all files in <i class="arg">inputdirectory</i> or any of
its subdirectories which were recognized by <b class="cmd">fileutil::fileType</b>
as containing text in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="4"><b class="cmd">dtplite</b> <b class="option">-merge</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [3]. The only difference to the
form for use case [2] is the additional option <b class="option">-merge</b>.</p>
<p>Each such call will merge the generated documents coming from
processing the input documents under <i class="arg">inputdirectory</i> or any of
its subdirectories to the files under <i class="arg">output</i>. In this manner it
is possible to incrementally build the unified documentation for any
number of packages. Note that it is necessary to run through all the
packages twice to get fully correct cross-references (for formats
supporting them).</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OPTIONS</a></h3>
<p>This section describes all the options available to the user of the
application, with
the exception of the options <b class="option">-o</b> and <b class="option">-merge</b>. These
two were described already, in section <span class="sectref"><a href="#subsection2">COMMAND LINE</a></span>.</p>
<dl class="doctools_options">
<dt><b class="option">-exclude</b> string</dt>
<dd><p>This option specifies an exclude (glob) pattern. Any files identified
as manpages to process which match the exclude pattern are
ignored. The option can be provided multiple times, each usage adding
an additional pattern to the list of exclusions.</p></dd>
<dt><b class="option">-ext</b> string</dt>
<dd><p>If the name of an output file has to be derived from the name of an
input file it will use the name of the <i class="arg">format</i> as the extension
by default. This option here will override this however, forcing it to
use <i class="arg">string</i> as the file extension. This option is ignored if the
name of the output file is fully specified through option <b class="option">-o</b>.</p>
<p>When used multiple times only the last definition is relevant.</p></dd>
<dt><b class="option">-header</b> file</dt>
<dd><p>This option can be used if and only if the selected <i class="arg">format</i>
provides an engine parameter named &quot;header&quot;. It takes the contents of
the specified file and assign them to that parameter, for whatever use
by the engine. The HTML engine will insert the text just after the tag
<b class="const">&lt;body&gt;</b>.
If navigation buttons are present (see option <b class="option">-nav</b> below),
then the HTML generated for them is appended to the header data
originating here before the final assignment to the parameter.</p>
<p>When used multiple times only the last definition is relevant.</p></dd>
<dt><b class="option">-footer</b> file</dt>
<dd><p>Like <b class="option">-header</b>, except that: Any navigation buttons are ignored,
the corresponding required engine parameter is named &quot;footer&quot;, and the
data is inserted just before the tag <b class="const">&lt;/body&gt;</b>.</p>
<p>When used multiple times only the last definition is relevant.</p></dd>
<dt><b class="option">-style</b> file</dt>
<dd><p>This option can be used if and only if the selected <i class="arg">format</i>
provides an engine parameter named &quot;meta&quot;. When specified it will
generate a piece of HTML code declaring the <i class="arg">file</i> as the
stylesheet for the generated document and assign that to the
parameter. The HTML engine will insert this inot the document, just
after the tag <b class="const">&lt;head&gt;</b>.</p>
<p>When processing an input directory the stylesheet file is copied into
the output directory and the generated HTML will refer to the copy, to
make the result more self-contained. When processing an input file we
have no location to copy the stylesheet to and so just reference it as
specified.</p>
<p>When used multiple times only the last definition is relevant.</p></dd>
<dt><b class="option">-toc</b> path|text</dt>
<dd><p>This option specifies a doctoc file (or text) to use for the table of contents
instead of generating our own.</p>
<p>When used multiple times only the last definition is relevant.</p></dd>
<dt><b class="option">-pre+toc</b> label path|text</dt>
<dd></dd>
<dt><b class="option">-post+toc</b> label path|text</dt>
<dd><p>This option specifies additional doctoc files (or texts) to use in
the navigation bar.</p>
<p>Positioning and handling of multiple uses is like for options
<b class="option">-prenav</b> and <b class="option">-postnav</b>, see below.</p></dd>
<dt><b class="option">-nav</b> label url</dt>
<dd></dd>
<dt><b class="option">-prenav</b> label url</dt>
<dd><p>Use this option to specify a navigation button with <i class="arg">label</i> to
display and the <i class="arg">url</i> to link to. This option can be used if and
only if the selected <i class="arg">format</i> provides an engine parameter named
&quot;header&quot;. The HTML generated for this is appended to whatever data we
got from option <b class="option">-header</b> before it is inserted into the
generated documents.</p>
<p>When used multiple times all definitions are collected and a
navigation bar is created, with the first definition shown at the left
edge and the last definition to the right.</p>
<p>The url can be relative. In that case it is assumed to be relative
to the main files (TOC and Keyword index), and will be transformed for
all others to still link properly.</p></dd>
<dt><b class="option">-postnav</b> label url</dt>
<dd><p>Use this option to specify a navigation button with <i class="arg">label</i> to
display and the <i class="arg">url</i> to link to. This option can be used if and
only if the selected <i class="arg">format</i> provides an engine parameter named
&quot;header&quot;. The HTML generated for this is appended to whatever data we
got from option <b class="option">-header</b> before it is inserted into the
generated documents.</p>
<p>When used multiple times all definitions are collected and a
navigation bar is created, with the last definition shown at the right
edge and the first definition to the left.</p>
<p>The url can be relative. In that case it is assumed to be relative
to the main files (TOC and Keyword index), and will be transformed for
all others to still link properly.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">FORMATS</a></h3>
<p>At first the <i class="arg">format</i> argument will be treated as a path to a tcl
file containing the code for the requested formatting engine. The
argument will be treated as the name of one of the predefined formats
listed below if and only if the path does not exist.</p>
<p><em>Note a limitation</em>: If treating the format as path to the tcl
script implementing the engine was sucessful, then this script has to
implement not only the engine API for doctools, i.e.
<i class="term">doctools_api</i>, but for <i class="term">doctoc_api</i> and <i class="term">docidx_api</i>
as well. Otherwise the generation of a table of contents and of a
keyword index will fail.</p>
<p>List of predefined formats, i.e. as provided by the
package <b class="package"><a href="../doctools/doctools.html">doctools</a></b>:</p>
<dl class="doctools_definitions">
<dt><b class="const">nroff</b></dt>
<dd><p>The processor generates *roff output, the standard format for unix
manpages.</p></dd>
<dt><b class="const">html</b></dt>
<dd><p>The processor generates HTML output, for usage in and display by web
browsers. This engine is currently the only one providing the various
engine parameters required for the additional customaization of the
output.</p></dd>
<dt><b class="const">tmml</b></dt>
<dd><p>The processor generates TMML output, the Tcl Manpage Markup Language,
a derivative of XML.</p></dd>
<dt><b class="const">latex</b></dt>
<dd><p>The processor generates LaTeX output.</p></dd>
<dt><b class="const">wiki</b></dt>
<dd><p>The processor generates Wiki markup as understood by <b class="syscmd">wikit</b>.</p></dd>
<dt><b class="const">list</b></dt>
<dd><p>The processor extracts the information provided by <b class="cmd">manpage_begin</b>.
This format is used internally to extract the meta data from which
both table of contents and keyword index are derived from.</p></dd>
<dt><b class="const">null</b></dt>
<dd><p>The processor does not generate any output. This is equivalent to
<b class="const">validate</b>.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">DIRECTORY STRUCTURES</a></h3>
<p>In this section we describe the directory structures generated by the
application under <i class="arg">output</i> when processing all documents in an
<i class="arg">inputdirectory</i>. In other words, this is only relevant to the use
cases [2] and [3].</p>
<dl class="doctools_definitions">
<dt>[2]</dt>
<dd><p>The following directory structure is created when processing a single
set of input documents.  The file extension used is for output in
HTML, but that is not relevant to the structure and was just used to
have proper file names.</p>
<pre class="doctools_example">
    output/
        toc.html
        index.html
        files/
            path/to/FOO.html
</pre>
<p>The last line in the example shows the document
generated for a file FOO located at</p>
<pre class="doctools_example">
    inputdirectory/path/to/FOO
</pre>
</dd>
<dt>[3]</dt>
<dd><p>When merging many packages into a unified set of documents the
generated directory structure is a bit deeper:</p>
<pre class="doctools_example">
    output
        .toc
        .idx
        .tocdoc
        .idxdoc
        .xrf
        toc.html
        index.html
        FOO1/
            ...
        FOO2/
            toc.html
            files/
                path/to/BAR.html
</pre>
<p>Each of the directories FOO1, ... contains the documents generated for
the package FOO1, ... and follows the structure shown for use case
[2]. The only exception is that there is no per-package index.</p>
<p>The files &quot;<b class="file">.toc</b>&quot;, &quot;<b class="file">.idx</b>&quot;, and &quot;<b class="file">.xrf</b>&quot; contain the
internal status of the whole output and will be read and updated by
the next invokation. Their contents will not be documented. Remove
these files when all packages wanted for the output have been
processed, i.e. when the output is complete.</p>
<p>The files &quot;<b class="file">.tocdoc</b>&quot;, and &quot;<b class="file">.idxdoc</b>&quot;, are intermediate files
in doctoc and docidx markup, respectively, containing the main table
of contents and keyword index for the set of documents before their
conversion to the chosen output format.
They are left in place, i.e. not deleted, to serve as demonstrations
of doctoc and docidx markup.</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../doctools/docidx_intro.html">docidx introduction</a>, <a href="../doctools/doctoc_intro.html">doctoc introduction</a>, <a href="../doctools/doctools_intro.html">doctools introduction</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/fileutil/fileutil.html.







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531

<div class='fossil-doc' data-title='fileutil - file utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil(n) 1.15 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil - Procedures implementing some file utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Warnings and Incompatibilities</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">fileutil <span class="opt">?1.15?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::lexnormalize</b> <i class="arg">path</i></a></li>
<li><a href="#2"><b class="cmd">::fileutil::fullnormalize</b> <i class="arg">path</i></a></li>
<li><a href="#3"><b class="cmd">::fileutil::test</b> <i class="arg">path</i> <i class="arg">codes</i> <span class="opt">?<i class="arg">msgvar</i>?</span> <span class="opt">?<i class="arg">label</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::fileutil::cat</b> (<span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i>)...</a></li>
<li><a href="#5"><b class="cmd">::fileutil::writeFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">data</i></a></li>
<li><a href="#6"><b class="cmd">::fileutil::appendToFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">data</i></a></li>
<li><a href="#7"><b class="cmd">::fileutil::insertIntoFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">at</i> <i class="arg">data</i></a></li>
<li><a href="#8"><b class="cmd">::fileutil::removeFromFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">at</i> <i class="arg">n</i></a></li>
<li><a href="#9"><b class="cmd">::fileutil::replaceInFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">at</i> <i class="arg">n</i> <i class="arg">data</i></a></li>
<li><a href="#10"><b class="cmd">::fileutil::updateInPlace</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">cmd</i></a></li>
<li><a href="#11"><b class="cmd">::fileutil::fileType</b> <i class="arg">filename</i></a></li>
<li><a href="#12"><b class="cmd">::fileutil::find</b> <span class="opt">?<i class="arg">basedir</i> <span class="opt">?<i class="arg">filtercmd</i>?</span>?</span></a></li>
<li><a href="#13"><b class="cmd">::fileutil::findByPattern</b> <i class="arg">basedir</i> <span class="opt">?<b class="option">-regexp</b>|<b class="option">-glob</b>?</span> <span class="opt">?<b class="option">--</b>?</span> <i class="arg">patterns</i></a></li>
<li><a href="#14"><b class="cmd">::fileutil::foreachLine</b> <i class="arg">var filename cmd</i></a></li>
<li><a href="#15"><b class="cmd">::fileutil::grep</b> <i class="arg">pattern</i> <span class="opt">?<i class="arg">files</i>?</span></a></li>
<li><a href="#16"><b class="cmd">::fileutil::install</b> <span class="opt">?<b class="option">-m</b> <i class="arg">mode</i>?</span> <i class="arg">source</i> <i class="arg">destination</i></a></li>
<li><a href="#17"><b class="cmd">::fileutil::stripN</b> <i class="arg">path</i> <i class="arg">n</i></a></li>
<li><a href="#18"><b class="cmd">::fileutil::stripPwd</b> <i class="arg">path</i></a></li>
<li><a href="#19"><b class="cmd">::fileutil::stripPath</b> <i class="arg">prefix</i> <i class="arg">path</i></a></li>
<li><a href="#20"><b class="cmd">::fileutil::jail</b> <i class="arg">jail</i> <i class="arg">path</i></a></li>
<li><a href="#21"><b class="cmd">::fileutil::touch</b> <span class="opt">?<b class="option">-a</b>?</span> <span class="opt">?<b class="option">-c</b>?</span> <span class="opt">?<b class="option">-m</b>?</span> <span class="opt">?<b class="option">-r</b> <i class="arg">ref_file</i>?</span> <span class="opt">?<b class="option">-t</b> <i class="arg">time</i>?</span> <i class="arg">filename</i> <span class="opt">?<i class="arg">...</i>?</span></a></li>
<li><a href="#22"><b class="cmd">::fileutil::tempdir</b></a></li>
<li><a href="#23"><b class="cmd">::fileutil::tempdir</b> <i class="arg">path</i></a></li>
<li><a href="#24"><b class="cmd">::fileutil::tempdirReset</b></a></li>
<li><a href="#25"><b class="cmd">::fileutil::tempfile</b> <span class="opt">?<i class="arg">prefix</i>?</span></a></li>
<li><a href="#26"><b class="cmd">::fileutil::maketempdir</b> <span class="opt">?<b class="option">-prefix</b> <i class="arg">str</i>?</span> <span class="opt">?<b class="option">-suffix</b> <i class="arg">str</i>?</span> <span class="opt">?<b class="option">-dir</b> <i class="arg">str</i>?</span></a></li>
<li><a href="#27"><b class="cmd">::fileutil::relative</b> <i class="arg">base</i> <i class="arg">dst</i></a></li>
<li><a href="#28"><b class="cmd">::fileutil::relativeUrl</b> <i class="arg">base</i> <i class="arg">dst</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides implementations of standard unix utilities.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::fileutil::lexnormalize</b> <i class="arg">path</i></a></dt>
<dd><p>This command performs purely lexical normalization on the <i class="arg">path</i> and returns
the changed path as its result. Symbolic links in the path are <em>not</em> resolved.</p>
<p>Examples:</p>
<pre class="doctools_example">
    fileutil::lexnormalize /foo/./bar
    =&gt; /foo/bar
    fileutil::lexnormalize /foo/../bar
    =&gt; /bar
</pre>
</dd>
<dt><a name="2"><b class="cmd">::fileutil::fullnormalize</b> <i class="arg">path</i></a></dt>
<dd><p>This command resolves all symbolic links in the <i class="arg">path</i> and returns
the changed path as its result.
In contrast to the builtin <b class="cmd">file normalize</b> this command
resolves a symbolic link in the last element of the path as well.</p></dd>
<dt><a name="3"><b class="cmd">::fileutil::test</b> <i class="arg">path</i> <i class="arg">codes</i> <span class="opt">?<i class="arg">msgvar</i>?</span> <span class="opt">?<i class="arg">label</i>?</span></a></dt>
<dd><p>A command for the testing of several properties of a <i class="arg">path</i>. The
properties to test for are specified in <i class="arg">codes</i>, either as a list
of keywords describing the properties, or as a string where each
letter is a shorthand for a property to test. The recognized keywords,
shorthands, and associated properties are shown in the list below. The
tests are executed in the order given to the command.</p>
<p>The result of the command is a boolean value. It will be true if and
only if the <i class="arg">path</i> passes all the specified tests.
In the case of the <i class="arg">path</i> not passing one or more test the first
failing test will leave a message in the variable referenced by
<i class="arg">msgvar</i>, if such is specified. The message will be prefixed with
<i class="arg">label</i>, if it is specified.
<em>Note</em> that the variabled referenced by <i class="arg">msgvar</i> is not touched at
all if all the tests pass.</p>
<dl class="doctools_definitions">
<dt><em>r</em>ead</dt>
<dd><p><b class="cmd">file readable</b></p></dd>
<dt><em>w</em>rite</dt>
<dd><p><b class="cmd">file writable</b></p></dd>
<dt><em>e</em>xists</dt>
<dd><p><b class="cmd">file exists</b></p></dd>
<dt>e<em>x</em>ec</dt>
<dd><p><b class="cmd">file executable</b></p></dd>
<dt><em>f</em>ile</dt>
<dd><p><b class="cmd">file isfile</b></p></dd>
<dt><em>d</em>ir</dt>
<dd><p><b class="cmd">file isdirectory</b></p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::fileutil::cat</b> (<span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i>)...</a></dt>
<dd><p>A tcl implementation of the UNIX <b class="syscmd"><a href="../../../../index.html#key314">cat</a></b> command.  Returns the
contents of the specified file(s). The arguments are files to read,
with interspersed options configuring the process. If there are
problems reading any of the files, an error will occur, and no data
will be returned.</p>
<p>The options accepted are <b class="option">-encoding</b>, <b class="option">-translation</b>,
<b class="option">-eofchar</b>, and <b class="option">--</b>. With the exception of the last all
options take a single value as argument, as specified by the tcl
builtin command <b class="cmd">fconfigure</b>. The <b class="option">--</b> has to be used to
terminate option processing before a file if that file's name begins
with a dash.</p>
<p>Each file can have its own set of options coming before it, and for
anything not specified directly the defaults are inherited from the
options of the previous file. The first file inherits the system
default for unspecified options.</p></dd>
<dt><a name="5"><b class="cmd">::fileutil::writeFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">data</i></a></dt>
<dd><p>The command replaces the current contents of the specified <i class="arg">file</i>
with <i class="arg">data</i>, with the process configured by the options. The
command accepts the same options as <b class="cmd">::fileutil::cat</b>. The
specification of a non-existent file is legal and causes the command
to create the file (and all required but missing directories).</p></dd>
<dt><a name="6"><b class="cmd">::fileutil::appendToFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">data</i></a></dt>
<dd><p>This command is like <b class="cmd">::fileutil::writeFile</b>, except that the
previous contents of <i class="arg">file</i> are not replaced, but appended to. The
command accepts the same options as <b class="cmd">::fileutil::cat</b></p></dd>
<dt><a name="7"><b class="cmd">::fileutil::insertIntoFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">at</i> <i class="arg">data</i></a></dt>
<dd><p>This comment is similar to <b class="cmd">::fileutil::appendToFile</b>, except that
the new data is not appended at the end, but inserted at a specified
location within the file. In further contrast this command has to be
given the path to an existing file. It will not create a missing file,
but throw an error instead.</p>
<p>The specified location <i class="arg">at</i> has to be an integer number in the
range <b class="const">0</b> ... [file size <i class="arg">file</i>]. <b class="const">0</b> will cause
insertion of the new data before the first character of the existing
content, whereas [file size <i class="arg">file</i>] causes insertion after
the last character of the existing content, i.e. appending.</p>
<p>The command accepts the same options as <b class="cmd">::fileutil::cat</b>.</p></dd>
<dt><a name="8"><b class="cmd">::fileutil::removeFromFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">at</i> <i class="arg">n</i></a></dt>
<dd><p>This command is the complement to <b class="cmd">::fileutil::insertIntoFile</b>, removing <i class="arg">n</i> characters from the <i class="arg">file</i>, starting at location <i class="arg">at</i>.
The specified location <i class="arg">at</i> has to be an integer number in the
range <b class="const">0</b> ... [file size <i class="arg">file</i>] - <i class="arg">n</i>. <b class="const">0</b>
will cause the removal of the new data to start with the first
character of the existing content,
whereas [file size <i class="arg">file</i>] - <i class="arg">n</i> causes the removal of
the tail of the existing content, i.e. the truncation of the file.</p>
<p>The command accepts the same options as <b class="cmd">::fileutil::cat</b>.</p></dd>
<dt><a name="9"><b class="cmd">::fileutil::replaceInFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">at</i> <i class="arg">n</i> <i class="arg">data</i></a></dt>
<dd><p>This command is a combination of <b class="cmd">::fileutil::removeFromFile</b> and
<b class="cmd">::fileutil::insertIntoFile</b>. It first removes the part of the
contents specified by the arguments <i class="arg">at</i> and <i class="arg">n</i>, and then
inserts <i class="arg">data</i> at the given location, effectively replacing the
removed by content with <i class="arg">data</i>.
All constraints imposed on <i class="arg">at</i> and <i class="arg">n</i> by
<b class="cmd">::fileutil::removeFromFile</b> and <b class="cmd">::fileutil::insertIntoFile</b>
are obeyed.</p>
<p>The command accepts the same options as <b class="cmd">::fileutil::cat</b>.</p></dd>
<dt><a name="10"><b class="cmd">::fileutil::updateInPlace</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">cmd</i></a></dt>
<dd><p>This command can be seen as the generic core functionality of
<b class="cmd">::fileutil::replaceInFile</b>.
It first reads the contents of the specified <i class="arg">file</i>, then runs the
command prefix <i class="arg">cmd</i> with that data appended to it, and at last
writes the result of that invokation back as the new contents of the
file.</p>
<p>If the executed command throws an error the <i class="arg">file</i> is not changed.</p>
<p>The command accepts the same options as <b class="cmd">::fileutil::cat</b>.</p></dd>
<dt><a name="11"><b class="cmd">::fileutil::fileType</b> <i class="arg">filename</i></a></dt>
<dd><p>An implementation of the UNIX <b class="syscmd"><a href="../../../../index.html#key31">file</a></b> command, which uses
various heuristics to guess the type of a file.  Returns a list
specifying as much type information as can be determined about the
file, from most general (eg, &quot;binary&quot; or &quot;text&quot;) to most specific (eg,
&quot;gif&quot;).  For example, the return value for a GIF file would be &quot;binary
graphic gif&quot;.  The command will detect the following types of files:
directory, empty, binary, text, script (with interpreter), executable
elf, executable dos, executable ne, executable pe, graphic gif, graphic
jpeg, graphic png, graphic tiff, graphic bitmap, html, xml (with doctype
if available), message pgp, binary pdf, text ps, text eps, binary
gravity_wave_data_frame, compressed bzip, compressed gzip, compressed
zip, compressed tar, audio wave, audio mpeg, and link. It further
detects doctools, doctoc, and docidx documentation files, and
tklib diagrams.</p></dd>
<dt><a name="12"><b class="cmd">::fileutil::find</b> <span class="opt">?<i class="arg">basedir</i> <span class="opt">?<i class="arg">filtercmd</i>?</span>?</span></a></dt>
<dd><p>An implementation of the unix command <b class="syscmd"><a href="../../../../index.html#key626">find</a></b>. Adapted from the
Tcler's Wiki. Takes at most two arguments, the path to the directory
to start searching from and a command to use to evaluate interest in
each file. The path defaults to &quot;<b class="file">.</b>&quot;, i.e. the current
directory. The command defaults to the empty string, which means that
all files are of interest. The command takes care <em>not</em> to
lose itself in infinite loops upon encountering circular link
structures. The result of the command is a list containing the paths
to the interesting files.</p>
<p>The <i class="arg">filtercmd</i>, if specified, is interpreted as a command prefix
and one argument is added to it, the name of the file or directory
find is currently looking at. Note that this name is <em>not</em> fully
qualified. It has to be joined it with the result of <b class="cmd">pwd</b> to get
an absolute filename.</p>
<p>The result of <i class="arg">filtercmd</i> is a boolean value that indicates if the
current file should be included in the list of interesting files.</p>
<p>Example:</p>
<pre class="doctools_example">
    # find .tcl files
    package require fileutil
    proc is_tcl {name} {return [string match *.tcl $name]}
    set tcl_files [fileutil::find . is_tcl]
</pre>
</dd>
<dt><a name="13"><b class="cmd">::fileutil::findByPattern</b> <i class="arg">basedir</i> <span class="opt">?<b class="option">-regexp</b>|<b class="option">-glob</b>?</span> <span class="opt">?<b class="option">--</b>?</span> <i class="arg">patterns</i></a></dt>
<dd><p>This command is based upon the <b class="package">TclX</b> command
<b class="cmd">recursive_glob</b>, except that it doesn't allow recursion over more
than one directory at a time. It uses <b class="cmd">::fileutil::find</b>
internally and is thus able to and does follow symbolic links,
something the <b class="package">TclX</b> command does not do. First argument is
the directory to start the search in, second argument is a list of
<i class="arg">patterns</i>. The command returns a list of all files reachable
through <i class="arg">basedir</i> whose names match at least one of the
patterns. The options before the pattern-list determine the style of
matching, either regexp or glob. glob-style matching is the default if
no options are given. Usage of the option <b class="option">--</b> stops option
processing. This allows the use of a leading '-' in the patterns.</p></dd>
<dt><a name="14"><b class="cmd">::fileutil::foreachLine</b> <i class="arg">var filename cmd</i></a></dt>
<dd><p>The command reads the file <i class="arg">filename</i> and executes the script
<i class="arg">cmd</i> for every line in the file. During the execution of the
script the variable <i class="arg">var</i> is set to the contents of the current
line. The return value of this command is the result of the last
invocation of the script <i class="arg">cmd</i> or the empty string if the file was
empty.</p></dd>
<dt><a name="15"><b class="cmd">::fileutil::grep</b> <i class="arg">pattern</i> <span class="opt">?<i class="arg">files</i>?</span></a></dt>
<dd><p>Implementation of <b class="syscmd"><a href="../../../../index.html#key316">grep</a></b>. Adapted from the Tcler's Wiki. The
first argument defines the <i class="arg">pattern</i> to search for. This is
followed by a list of <i class="arg">files</i> to search through. The list is
optional and <b class="const">stdin</b> will be used if it is missing. The result
of the procedures is a list containing the matches. Each match is a
single element of the list and contains filename, number and contents
of the matching line, separated by a colons.</p></dd>
<dt><a name="16"><b class="cmd">::fileutil::install</b> <span class="opt">?<b class="option">-m</b> <i class="arg">mode</i>?</span> <i class="arg">source</i> <i class="arg">destination</i></a></dt>
<dd><p>The <b class="cmd">install</b> command is similar in functionality to the <b class="syscmd">install</b>
command found on many unix systems, or the shell script
distributed with many source distributions (unix/install-sh in the Tcl
sources, for example).  It copies <i class="arg">source</i>, which can be either a
file or directory to <i class="arg">destination</i>, which should be a directory,
unless <i class="arg">source</i> is also a single file.  The <span class="opt">?-m?</span> option lets
the user specify a unix-style mode (either octal or symbolic - see
<b class="cmd">file attributes</b>.</p></dd>
<dt><a name="17"><b class="cmd">::fileutil::stripN</b> <i class="arg">path</i> <i class="arg">n</i></a></dt>
<dd><p>Removes the first <i class="arg">n</i> elements from the specified <i class="arg">path</i> and
returns the modified path. If <i class="arg">n</i> is greater than the number of
components in <i class="arg">path</i> an empty string is returned. The number of
components in a given path may be determined by performing
<b class="cmd">llength</b> on the list returned by <b class="cmd">file split</b>.</p></dd>
<dt><a name="18"><b class="cmd">::fileutil::stripPwd</b> <i class="arg">path</i></a></dt>
<dd><p>If, and only if the <i class="arg">path</i> is inside of the directory returned by
[<b class="cmd">pwd</b>] (or the current working directory itself) it is made
relative to that directory. In other words, the current working
directory is stripped from the <i class="arg">path</i>.  The possibly modified path
is returned as the result of the command. If the current working
directory itself was specified for <i class="arg">path</i> the result is the string
&quot;<b class="const">.</b>&quot;.</p></dd>
<dt><a name="19"><b class="cmd">::fileutil::stripPath</b> <i class="arg">prefix</i> <i class="arg">path</i></a></dt>
<dd><p>If, and only of the <i class="arg">path</i> is inside of the directory
&quot;<b class="file">prefix</b>&quot; (or the prefix directory itself) it is made relative to
that directory. In other words, the prefix directory is stripped from
the <i class="arg">path</i>. The possibly modified path is returned as the result
of the command.
If the prefix directory itself was specified for <i class="arg">path</i> the result
is the string &quot;<b class="const">.</b>&quot;.</p></dd>
<dt><a name="20"><b class="cmd">::fileutil::jail</b> <i class="arg">jail</i> <i class="arg">path</i></a></dt>
<dd><p>This command ensures that the <i class="arg">path</i> is not escaping the directory
<i class="arg">jail</i>. It always returns an absolute path derived from <i class="arg">path</i>
which is within <i class="arg">jail</i>.</p>
<p>If <i class="arg">path</i> is an absolute path and already within <i class="arg">jail</i> it is
returned unmodified.</p>
<p>An absolute path outside of <i class="arg">jail</i> is stripped of its root element
and then put into the <i class="arg">jail</i> by prefixing it with it. The same
happens if <i class="arg">path</i> is relative, except that nothing is stripped of
it. Before adding the <i class="arg">jail</i> prefix the <i class="arg">path</i> is lexically
normalized to prevent the caller from using <b class="const">..</b> segments in
<i class="arg">path</i> to escape the jail.</p></dd>
<dt><a name="21"><b class="cmd">::fileutil::touch</b> <span class="opt">?<b class="option">-a</b>?</span> <span class="opt">?<b class="option">-c</b>?</span> <span class="opt">?<b class="option">-m</b>?</span> <span class="opt">?<b class="option">-r</b> <i class="arg">ref_file</i>?</span> <span class="opt">?<b class="option">-t</b> <i class="arg">time</i>?</span> <i class="arg">filename</i> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>Implementation of <b class="syscmd"><a href="../../../../index.html#key317">touch</a></b>. Alter the atime and mtime of the
specified files. If <b class="option">-c</b>, do not create files if they do not
already exist. If <b class="option">-r</b>, use the atime and mtime from
<i class="arg">ref_file</i>. If <b class="option">-t</b>, use the integer clock value
<i class="arg">time</i>. It is illegal to specify both <b class="option">-r</b> and
<b class="option">-t</b>. If <b class="option">-a</b>, only change the atime. If <b class="option">-m</b>,
only change the mtime.</p>
<p><em>This command is not available for Tcl versions less than 8.3.</em></p></dd>
<dt><a name="22"><b class="cmd">::fileutil::tempdir</b></a></dt>
<dd><p>The command returns the path of a directory where the caller can
place temporary files, such as &quot;<b class="file">/tmp</b>&quot; on Unix systems. The
algorithm we use to find the correct directory is as follows:</p>
<ol class="doctools_enumerated">
<li><p>The directory set by an invokation of <b class="cmd">::fileutil::tempdir</b> with
an argument. If this is present it is tried exclusively and none of
the following item are tried.</p></li>
<li><p>The directory named in the TMPDIR environment variable.</p></li>
<li><p>The directory named in the TEMP environment variable.</p></li>
<li><p>The directory named in the TMP environment variable.</p></li>
<li><p>A platform specific location:</p>
<dl class="doctools_definitions">
<dt>Windows</dt>
<dd><p>&quot;<b class="file">C:\TEMP</b>&quot;, &quot;<b class="file">C:\TMP</b>&quot;, &quot;<b class="file">\TEMP</b>&quot;,
and &quot;<b class="file">\TMP</b>&quot; are tried in that order.</p></dd>
<dt>(classic) Macintosh</dt>
<dd><p>The TRASH_FOLDER environment variable is used.  This is most likely
not correct.</p></dd>
<dt>Unix</dt>
<dd><p>The directories &quot;<b class="file">/tmp</b>&quot;, &quot;<b class="file">/var/tmp</b>&quot;, and &quot;<b class="file">/usr/tmp</b>&quot; are
tried in that order.</p></dd>
</dl>
</li>
</ol>
<p>The algorithm utilized is mainly that used in the Python standard
library. The exception is the first item, the ability to have the
search overridden by a user-specified directory.</p></dd>
<dt><a name="23"><b class="cmd">::fileutil::tempdir</b> <i class="arg">path</i></a></dt>
<dd><p>In this mode the command sets the <i class="arg">path</i> as the first and only
directory to try as a temp. directory. See the previous item for the
use of the set directory. The command returns the empty string.</p></dd>
<dt><a name="24"><b class="cmd">::fileutil::tempdirReset</b></a></dt>
<dd><p>Invoking this command clears the information set by the
last call of [<b class="cmd">::fileutil::tempdir</b> <i class="arg">path</i>].
See the last item too.</p></dd>
<dt><a name="25"><b class="cmd">::fileutil::tempfile</b> <span class="opt">?<i class="arg">prefix</i>?</span></a></dt>
<dd><p>The command generates a temporary file name suitable for writing to,
and the associated file.  The file name will be unique, and the file
will be writable and contained in the appropriate system specific temp
directory. The name of the file will be returned as the result of the
command.</p>
<p>The code was taken from <a href="http://wiki.tcl.tk/772">http://wiki.tcl.tk/772</a>, attributed to
Igor Volobouev and anon.</p></dd>
<dt><a name="26"><b class="cmd">::fileutil::maketempdir</b> <span class="opt">?<b class="option">-prefix</b> <i class="arg">str</i>?</span> <span class="opt">?<b class="option">-suffix</b> <i class="arg">str</i>?</span> <span class="opt">?<b class="option">-dir</b> <i class="arg">str</i>?</span></a></dt>
<dd><p>The command generates a temporary directory suitable for writing to.
The directory name will be unique, and the directory will be writable
and contained in the appropriate system specific temp directory. The
name of the directory will be returned as the result of the command.</p>
<p>The three options can used to tweak the behaviour of the command:</p>
<dl class="doctools_options">
<dt><b class="option">-prefix</b> str</dt>
<dd><p>The initial, fixed part of the directory name. Defaults to <b class="const">tmp</b> if not specified.</p></dd>
<dt><b class="option">-suffix</b> str</dt>
<dd><p>The fixed tail of the directory. Defaults to the empty string if not specified.</p></dd>
<dt><b class="option">-dir</b> str</dt>
<dd><p>The directory to place the new directory into. Defaults to the result of <b class="cmd">fileutil::tempdir</b> if not specified.</p></dd>
</dl>
<p>The initial code for this was supplied by <a href="mailto:aplicacionamedida@gmail.com">Miguel Martinez Lopez</a>.</p></dd>
<dt><a name="27"><b class="cmd">::fileutil::relative</b> <i class="arg">base</i> <i class="arg">dst</i></a></dt>
<dd><p>This command takes two directory paths, both either absolute or relative
and computes the path of <i class="arg">dst</i> relative to <i class="arg">base</i>. This relative
path is returned as the result of the command. As implied in the previous
sentence, the command is not able to compute this relationship between the
arguments if one of the paths is absolute and the other relative.</p>
<p><em>Note:</em> The processing done by this command is purely lexical.
Symbolic links are <em>not</em> taken into account.</p></dd>
<dt><a name="28"><b class="cmd">::fileutil::relativeUrl</b> <i class="arg">base</i> <i class="arg">dst</i></a></dt>
<dd><p>This command takes two file paths, both either absolute or relative
and computes the path of <i class="arg">dst</i> relative to <i class="arg">base</i>, as seen
from inside of the <i class="arg">base</i>. This is the algorithm how a browser
resolves a relative link found in the currently shown file.</p>
<p>The computed relative path is returned as the result of the command.
As implied in the previous sentence, the command is not able to compute
this relationship between the arguments if one of the paths is absolute
and the other relative.</p>
<p><em>Note:</em> The processing done by this command is purely lexical.
Symbolic links are <em>not</em> taken into account.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Warnings and Incompatibilities</a></h2>
<dl class="doctools_definitions">
<dt><b class="const">1.14.9</b></dt>
<dd><p>In this version <b class="cmd">fileutil::find</b>'s broken system for handling
symlinks was replaced with one working correctly and properly
enumerating all the legal non-cyclic paths under a base directory.</p>
<p>While correct this means that certain pathological directory
hierarchies with cross-linked sym-links will now take about O(n**2)
time to enumerate whereas the original broken code managed O(n) due to
its brokenness.</p>
<p>A concrete example and extreme case is the &quot;<b class="file">/sys</b>&quot;
hierarchy under Linux where some hundred devices exist under both
&quot;<b class="file">/sys/devices</b>&quot; and &quot;<b class="file">/sys/class</b>&quot; with the two sub-hierarchies
linking to the other, generating millions of legal paths to enumerate.
The structure, reduced to three devices, roughly looks like</p>
<pre class="doctools_example">
	/sys/class/tty/tty0 --&gt; ../../dev/tty0
	/sys/class/tty/tty1 --&gt; ../../dev/tty1
	/sys/class/tty/tty2 --&gt; ../../dev/tty1
	/sys/dev/tty0/bus
	/sys/dev/tty0/subsystem --&gt; ../../class/tty
	/sys/dev/tty1/bus
	/sys/dev/tty1/subsystem --&gt; ../../class/tty
	/sys/dev/tty2/bus
	/sys/dev/tty2/subsystem --&gt; ../../class/tty
</pre>
<p>The command <b class="cmd">fileutil::find</b> currently has no way to escape
this. When having to handle such a pathological hierarchy It is
recommended to switch to package <b class="package">fileutil::traverse</b> and the
same-named command it provides, and then use the <b class="option">-prefilter</b>
option to prevent the traverser from following symbolic links, like so:</p>
<pre class="doctools_example">
    package require fileutil::traverse
    proc NoLinks {fileName} {
        if {[string equal [file type $fileName] link]} {
            return 0
        }
        return 1
    }
    fileutil::traverse T /sys/devices -prefilter NoLinks
    T foreach p {
        puts $p
    }
    T destroy
</pre>
</dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key314">cat</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key316">grep</a>, <a href="../../../../index.html#key315">temp file</a>, <a href="../../../../index.html#key313">test</a>, <a href="../../../../index.html#key317">touch</a>, <a href="../../../../index.html#key117">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/fileutil/multi.html.



















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169

<div class='fossil-doc' data-title='fileutil::multi - file utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::multi(n) 0.1 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::multi - Multi-file operation, scatter/gather, standard object</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">fileutil::multi <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">fileutil::multi::op <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">wip <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::multi</b> <span class="opt">?<i class="arg">word</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single command to perform actions on multiple
files selected by glob patterns. It is a thin layer over the package
<b class="package"><a href="multiop.html">fileutil::multi::op</a></b> which provides objects for the
same. This package simply creates a single such object and directs all
file commands to it.</p>
<p>At the core is a domain specific language allowing the easy
specification of multi-file copy and/or move and/or deletion
operations. Alternate names would be scatter/gather processor, or
maybe even assembler.
For the detailed specification of this language, and examples, please
see the documention for the package <b class="package"><a href="multiop.html">fileutil::multi::op</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<p>The main command of the package is:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::fileutil::multi</b> <span class="opt">?<i class="arg">word</i>...?</span></a></dt>
<dd><p>This command interprets the specified words as file commands to
execute. See the section <b class="sectref">FILE API</b> of the
documentation for the package <b class="package"><a href="multiop.html">fileutil::multi::op</a></b> for
the set of acceptable commands, their syntax, and semantics.</p>
<p>The result of the command is the result generated by the last file
command it executed.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key229">move</a>, <a href="../../../../index.html#key227">multi-file</a>, <a href="../../../../index.html#key228">remove</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/fileutil/multiop.html.













































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454

<div class='fossil-doc' data-title='fileutil::multi::op - file utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::multi::op(n) 0.5.3 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::multi::op - Multi-file operation, scatter/gather</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">CLASS API</a></li>
<li class="doctools_section"><a href="#section3">OBJECT API</a></li>
<li class="doctools_section"><a href="#section4">FILE API</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">fileutil::multi::op <span class="opt">?0.5.3?</span></b></li>
<li>package require <b class="pkgname">wip <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::multi::op</b> <span class="opt">?<i class="arg">opName</i>?</span> <span class="opt">?<i class="arg">word</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">opName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><b class="cmd">$opName</b> <b class="method">do</b> <span class="opt">?<i class="arg">word</i>...?</span></a></li>
<li><a href="#4"><b class="cmd">into</b> <i class="arg">directory</i></a></li>
<li><a href="#5"><b class="cmd">in</b> <i class="arg">directory</i></a></li>
<li><a href="#6"><b class="cmd">to</b> <i class="arg">directory</i></a></li>
<li><a href="#7"><b class="cmd">from</b> <i class="arg">directory</i></a></li>
<li><a href="#8"><b class="cmd">not</b> <i class="arg">pattern</i></a></li>
<li><a href="#9"><b class="cmd">for</b> <i class="arg">pattern</i></a></li>
<li><a href="#10"><b class="cmd">exclude</b> <i class="arg">pattern</i></a></li>
<li><a href="#11"><b class="cmd">but</b></a></li>
<li><a href="#12"><b class="cmd">except</b></a></li>
<li><a href="#13"><b class="cmd">as</b> <i class="arg">name</i></a></li>
<li><a href="#14"><b class="cmd">recursive</b></a></li>
<li><a href="#15"><b class="cmd">recursively</b></a></li>
<li><a href="#16"><b class="cmd"><a href="../../../../index.html#key64">copy</a></b></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#key229">move</a></b></a></li>
<li><a href="#18"><b class="cmd"><a href="../../../../index.html#key228">remove</a></b></a></li>
<li><a href="#19"><b class="cmd">expand</b></a></li>
<li><a href="#20"><b class="cmd">invoke</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#21"><b class="cmd">reset</b></a></li>
<li><a href="#22"><b class="cmd">(</b></a></li>
<li><a href="#23"><b class="cmd">)</b></a></li>
<li><a href="#24"><b class="cmd">cd</b> <i class="arg">directory</i></a></li>
<li><a href="#25"><b class="cmd">up</b></a></li>
<li><a href="#26"><b class="cmd">for-windows</b></a></li>
<li><a href="#27"><b class="cmd">for-win</b></a></li>
<li><a href="#28"><b class="cmd">for-unix</b></a></li>
<li><a href="#29"><b class="cmd">the</b> <i class="arg">pattern</i></a></li>
<li><a href="#30"><b class="cmd">the-set</b> <i class="arg">varname</i></a></li>
<li><a href="#31"><b class="cmd">-&gt;</b> <i class="arg">varname</i></a></li>
<li><a href="#32"><b class="cmd">strict</b></a></li>
<li><a href="#33"><b class="cmd">!strict</b></a></li>
<li><a href="#34"><b class="cmd">files</b></a></li>
<li><a href="#35"><b class="cmd">links</b></a></li>
<li><a href="#36"><b class="cmd">directories</b></a></li>
<li><a href="#37"><b class="cmd">dirs</b></a></li>
<li><a href="#38"><b class="cmd">all</b></a></li>
<li><a href="#39"><b class="cmd">state?</b></a></li>
<li><a href="#40"><b class="cmd">as?</b></a></li>
<li><a href="#41"><b class="cmd">excluded?</b></a></li>
<li><a href="#42"><b class="cmd">from?</b></a></li>
<li><a href="#43"><b class="cmd">into?</b></a></li>
<li><a href="#44"><b class="cmd">operation?</b></a></li>
<li><a href="#45"><b class="cmd">recursive?</b></a></li>
<li><a href="#46"><b class="cmd">strict?</b></a></li>
<li><a href="#47"><b class="cmd">type?</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects which are able to perform actions on
multiple files selected by glob patterns.</p>
<p>At the core is a domain specific language allowing the easy
specification of multi-file copy and/or move and/or deletion
operations. Alternate names would be scatter/gather processor, or
maybe even assembler.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">CLASS API</a></h2>
<p>The main command of the package is:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::fileutil::multi::op</b> <span class="opt">?<i class="arg">opName</i>?</span> <span class="opt">?<i class="arg">word</i>...?</span></a></dt>
<dd><p>The command creates a new multi-file operation object with an
associated global Tcl command whose name is <i class="arg">opName</i>.  This
command can be used to invoke the various possible file operations.
It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">opName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>If the string <b class="const">%AUTO%</b> is used as the <i class="arg">opName</i> then the
package will generate a unique name on its own.</p>
<p>If one or more <i class="arg">word</i>s are specified they are interpreted as an
initial set of file commands to execute. I.e. the method <b class="method">do</b>
of the newly constructed object is implicitly invoked using the words
as its arguments.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">OBJECT API</a></h2>
<p>The following methods are possible for multi-file operation objects:</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">$opName</b> <b class="method">do</b> <span class="opt">?<i class="arg">word</i>...?</span></a></dt>
<dd><p>This method interprets the specified words as file commands to
execute. See the section <span class="sectref"><a href="#section4">FILE API</a></span> for the set of
acceptable commands, their syntax, and semantics.</p>
<p>The result of the method is the result generated by the last file
command it executed.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">FILE API</a></h2>
<p>Both object constructor and method <b class="method">do</b> take a list of words
and interpret them as file commands to execute. The names were chosen
to allow the construction of operations as sentences in near-natural
language. Most of the commands influence just the state of the object,
i.e. are simply providing the configuration used by the command
triggering the actual action.</p>
<dl class="doctools_definitions">
<dt><a name="4"><b class="cmd">into</b> <i class="arg">directory</i></a></dt>
<dd><p>Specifies the destination directory for operations.</p></dd>
<dt><a name="5"><b class="cmd">in</b> <i class="arg">directory</i></a></dt>
<dd><p>Alias for <b class="cmd">into</b>.</p></dd>
<dt><a name="6"><b class="cmd">to</b> <i class="arg">directory</i></a></dt>
<dd><p>Alias for <b class="cmd">into</b>.</p></dd>
<dt><a name="7"><b class="cmd">from</b> <i class="arg">directory</i></a></dt>
<dd><p>Specifies the source directory for operations.</p></dd>
<dt><a name="8"><b class="cmd">not</b> <i class="arg">pattern</i></a></dt>
<dd><p>Specifies a glob pattern for paths to be excluded from the operation.</p></dd>
<dt><a name="9"><b class="cmd">for</b> <i class="arg">pattern</i></a></dt>
<dd><p>Alias for <b class="cmd">not</b>.</p></dd>
<dt><a name="10"><b class="cmd">exclude</b> <i class="arg">pattern</i></a></dt>
<dd><p>Alias for <b class="cmd">not</b>.</p></dd>
<dt><a name="11"><b class="cmd">but</b></a></dt>
<dd><p>Has no arguments of its own, but looks ahead in the list of words and
executes all <b class="cmd">not</b> commands immediately following it. This allows the
construction of &quot;but not&quot; and &quot;but exclude&quot; clauses for a more natural
sounding specification of excluded paths.</p></dd>
<dt><a name="12"><b class="cmd">except</b></a></dt>
<dd><p>A semi-alias for <b class="cmd">but</b>. Has no arguments of its own, but looks
ahead in the list of words and executes all <b class="cmd">for</b> commands
immediately following it. This allows the construction of &quot;except for&quot;
clauses for a more natural sounding specification of excluded paths.</p></dd>
<dt><a name="13"><b class="cmd">as</b> <i class="arg">name</i></a></dt>
<dd><p>Specifies a new name for the first file handled by the current
operation. I.e. for the renaming of a single file during the
operation.</p></dd>
<dt><a name="14"><b class="cmd">recursive</b></a></dt>
<dd><p>Signals that file expansion should happen in the whole directory
hierarchy and not just the directory itself.</p></dd>
<dt><a name="15"><b class="cmd">recursively</b></a></dt>
<dd><p>An alias for <b class="cmd">recursive</b>.</p></dd>
<dt><a name="16"><b class="cmd"><a href="../../../../index.html#key64">copy</a></b></a></dt>
<dd><p>Signals that the operation is the copying of files from source to
destination directory per the specified inclusion and exclusion
patterns.</p></dd>
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#key229">move</a></b></a></dt>
<dd><p>Signals that the operation is the moving of files from source to
destination directory per the specified inclusion and exclusion
patterns.</p></dd>
<dt><a name="18"><b class="cmd"><a href="../../../../index.html#key228">remove</a></b></a></dt>
<dd><p>Signals that the operation is the removal of files in the destination
directory per the specified inclusion and exclusion patterns.</p></dd>
<dt><a name="19"><b class="cmd">expand</b></a></dt>
<dd><p>Signals that there is no operation but the calculation of the set of
files from the include and exclude patterns. This operation is not
available if <b class="cmd">the-set</b> is used.</p></dd>
<dt><a name="20"><b class="cmd">invoke</b> <i class="arg">cmdprefix</i></a></dt>
<dd><p>Signals that the user-specified command prefix <i class="arg">cmdprefix</i> is the
operation to perform. The command prefix is executed at the global
level and given the source directory, destination directory, and set
of files (as dictionary mapping from source to destination files), in
this order.</p></dd>
<dt><a name="21"><b class="cmd">reset</b></a></dt>
<dd><p>Forces the object into the ground state where all parts of the
configuration have default values.</p></dd>
<dt><a name="22"><b class="cmd">(</b></a></dt>
<dd><p>Saves a copy of the current object state on a stack.</p></dd>
<dt><a name="23"><b class="cmd">)</b></a></dt>
<dd><p>Takes the state at the top of the state stack and restores it,
i.e. makes it the new current object state.</p></dd>
<dt><a name="24"><b class="cmd">cd</b> <i class="arg">directory</i></a></dt>
<dd><p>Changes the destination directory to the sub-directory <i class="arg">directory</i>
of the current destination.</p></dd>
<dt><a name="25"><b class="cmd">up</b></a></dt>
<dd><p>Changes the destination directory to the parent directory of the
current destination.</p></dd>
<dt><a name="26"><b class="cmd">for-windows</b></a></dt>
<dd><p>Checks that Windows is the current platform. Aborts processing if not.</p></dd>
<dt><a name="27"><b class="cmd">for-win</b></a></dt>
<dd><p>An alias for <b class="cmd">for-windows</b>.</p></dd>
<dt><a name="28"><b class="cmd">for-unix</b></a></dt>
<dd><p>Checks that Unix is the current platform. Aborts processing if not.</p></dd>
<dt><a name="29"><b class="cmd">the</b> <i class="arg">pattern</i></a></dt>
<dd><p>This command specifies the files to operate on per a glob pattern, and
is also the active element, i.e. the command which actually performs
the specified operation. All the other commands only modified the
object state to set the operation up, but di nothing else.</p>
<p>To allow for a more natural sounding syntax this command also looks
ahead in the list of words looks and executes several commands
immediately following it before performing its own actions.
These commands are <b class="cmd">as</b>, <b class="cmd">but</b>, <b class="cmd">exclude</b>, <b class="cmd">except</b>,
<b class="cmd">from</b>, and <b class="cmd">into</b> (and aliases). That way these commands act
like qualifiers, and still take effect as if they had been written
before this command.</p>
<p>After the operation has been performed the object state the exclude
patterns and the alias name, if specified, are reset to their default
values (i.e. empty), but nothing else.</p></dd>
<dt><a name="30"><b class="cmd">the-set</b> <i class="arg">varname</i></a></dt>
<dd><p>Like <b class="cmd">the</b>, however the set of files to use is not specified
implicitly per a glob pattern, but contained and loaded from the
specified variable. The operation <b class="cmd">expand</b> is not available
if this command is used.</p></dd>
<dt><a name="31"><b class="cmd">-&gt;</b> <i class="arg">varname</i></a></dt>
<dd><p>Saves the set of files from the last expansion into the specified
variable.</p></dd>
<dt><a name="32"><b class="cmd">strict</b></a></dt>
<dd><p>Make file expansion and definition of destination directory (<b class="cmd">in</b>
and aliases) strict, i.e. report errors for missing directories, and
empty expansion.</p></dd>
<dt><a name="33"><b class="cmd">!strict</b></a></dt>
<dd><p>Complement of <b class="cmd">strict</b>. A missing destination directory or empty
expansion are not reported as errors.</p></dd>
<dt><a name="34"><b class="cmd">files</b></a></dt>
<dd><p>Limit the search to files. Default is to accept every type of path.</p></dd>
<dt><a name="35"><b class="cmd">links</b></a></dt>
<dd><p>Limit the search to symbolic links. Default is to accept every type of path.</p></dd>
<dt><a name="36"><b class="cmd">directories</b></a></dt>
<dd><p>Limit the search to directories. Default is to accept every type of path.</p></dd>
<dt><a name="37"><b class="cmd">dirs</b></a></dt>
<dd><p>An alias for <b class="cmd">directories</b>.</p></dd>
<dt><a name="38"><b class="cmd">all</b></a></dt>
<dd><p>Accept all types of paths (default).</p></dd>
<dt><a name="39"><b class="cmd">state?</b></a></dt>
<dd><p>Returns the current state of the object as dictionary. The dictionary keys and their meanings are:</p>
<dl class="doctools_definitions">
<dt><b class="const">as</b></dt>
<dd><p>Last setting made by <b class="cmd">as</b>.</p></dd>
<dt><b class="const">excluded</b></dt>
<dd><p>List of currently known exclusion patterns.</p></dd>
<dt><b class="const">from</b></dt>
<dd><p>Current source directory, set by <b class="cmd">from</b>.</p></dd>
<dt><b class="const">into</b></dt>
<dd><p>Current destination directory, set by <b class="cmd">into</b> (and aliases).</p></dd>
<dt><b class="const">operation</b></dt>
<dd><p>Current operation to perform, set by <b class="cmd"><a href="../../../../index.html#key64">copy</a></b>, <b class="cmd"><a href="../../../../index.html#key229">move</a></b>, <b class="cmd"><a href="../../../../index.html#key228">remove</a></b>, <b class="cmd">expand</b>, or <b class="cmd">invoke</b>.</p></dd>
<dt><b class="const">recursive</b></dt>
<dd><p>Current recursion status. Set/unset by <b class="cmd">recursive</b> and <b class="cmd">!recursive</b>.</p></dd>
<dt><b class="const">strict</b></dt>
<dd><p>Current strictness. Set/unset by <b class="cmd">strict</b> and <b class="cmd">!strict</b>.</p></dd>
<dt><b class="const">type</b></dt>
<dd><p>Current path type limiter. Set by either <b class="cmd">files</b>, <b class="cmd">directories</b>, <b class="cmd">links</b>, or <b class="cmd">all</b>.</p></dd>
</dl></dd>
<dt><a name="40"><b class="cmd">as?</b></a></dt>
<dd><p>Returns the current alias name.</p></dd>
<dt><a name="41"><b class="cmd">excluded?</b></a></dt>
<dd><p>Returns the current set of exclusion patterns.</p></dd>
<dt><a name="42"><b class="cmd">from?</b></a></dt>
<dd><p>Returns the current source directory.</p></dd>
<dt><a name="43"><b class="cmd">into?</b></a></dt>
<dd><p>Returns the current destination directory.</p></dd>
<dt><a name="44"><b class="cmd">operation?</b></a></dt>
<dd><p>Returns the current operation to perform.</p></dd>
<dt><a name="45"><b class="cmd">recursive?</b></a></dt>
<dd><p>Returns the current recursion status.</p></dd>
<dt><a name="46"><b class="cmd">strict?</b></a></dt>
<dd><p>Returns the current strictness.</p></dd>
<dt><a name="47"><b class="cmd">type?</b></a></dt>
<dd><p>Returns the current path type limiter.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<p>The following examples assume that the variable <b class="variable">F</b> contains a
reference to a multi-file operation object.</p>
<pre class="doctools_example">
    $F do copy                       \\
	the  *.dll                    \\
	from c:/TDK/PrivateOpenSSL/bin \\
	to   [installdir_of tls]
</pre>
<pre class="doctools_example">
    $F do move      \\
	the  *       \\
	from /sources \\
	into /scratch  \\
	but not *.html
    # Alternatively use 'except for *.html'.
</pre>
<pre class="doctools_example">
    $F do           \\
	move         \\
	the  index    \\
	from /sources  \\
	into /scratch   \\
	as   pkgIndex.tcl
</pre>
<pre class="doctools_example">
    $F do         \\
	remove     \\
	the *.txt  \\
	in /scratch
</pre>
<p>Note that the fact that most commands just modify the object state
allows us to use more off forms as specifications instead of just
nearly-natural language sentences.
For example the second example in this section can re-arranged into:</p>
<pre class="doctools_example">
    $F do            \\
	from /sources \\
	into /scratch  \\
	but not *.html \\
	move           \\
	the  *
</pre>
<p>and the result is not only still a valid specification, but even stays
relatively readable.</p>
<p>Further note that the information collected by the commands <b class="cmd">but</b>,
<b class="cmd">except</b>, and <b class="cmd">as</b> is automatically reset after the associated
<b class="cmd">the</b> was executed. However no other state is reset in that
manner, allowing the user to avoid repetitions of unchanging
information. For example the second and third examples of this section
can be merged and rewritten into the equivalent:</p>
<pre class="doctools_example">
$F do                   \\
    move                 \\
    the  *                \\
    from /sources          \\
    into /scratch           \\
    but not *.html not index \\
    the  index               \\
    as   pkgIndex.tcl
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key229">move</a>, <a href="../../../../index.html#key227">multi-file</a>, <a href="../../../../index.html#key228">remove</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/fileutil/traverse.html.















































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279

<div class='fossil-doc' data-title='fileutil_traverse - file utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil_traverse(n) 0.6 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil_traverse - Iterative directory traversal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OPTIONS</a></li>
<li class="doctools_section"><a href="#section3">Warnings and Incompatibilities</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">fileutil::traverse <span class="opt">?0.6?</span></b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">control</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::traverse</b> <span class="opt">?<i class="arg">objectName</i>?</span> <i class="arg">path</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">$traverser</b> <b class="method">command</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><b class="cmd">$traverser</b> <b class="method">files</b></a></li>
<li><a href="#4"><b class="cmd">$traverser</b> <b class="method">foreach</b> <i class="arg">filevar</i> <i class="arg">script</i></a></li>
<li><a href="#5"><b class="cmd">$traverser</b> <b class="method">next</b> <i class="arg">filevar</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects for the programmable traversal of
directory hierarchies.
The main command exported by the package is:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::fileutil::traverse</b> <span class="opt">?<i class="arg">objectName</i>?</span> <i class="arg">path</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></dt>
<dd><p>The command creates a new traversal object with an associated global
Tcl command whose name is <i class="arg">objectName</i>. This command may be used
to invoke various operations on the traverser.
If the string <b class="const">%AUTO%</b> is used as the <i class="arg">objectName</i> then a
unique name will be generated by the package itself.</p>
<p>Regarding the recognized options see section <span class="sectref"><a href="#section2">OPTIONS</a></span>. Note
that all these options can be set only during the creation of the
traversal object. Changing them later is not possible and causes
errors to be thrown if attempted.</p>
<p>The object command has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">$traverser</b> <b class="method">command</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Command</i> and its <i class="arg">arg</i>uments determine the exact behavior of
the object.</p></dd>
</dl></dd>
</dl>
<p>The following commands are possible for traversal objects:</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">$traverser</b> <b class="method">files</b></a></dt>
<dd><p>This method is the most highlevel one provided by traversal
objects. When invoked it returns a list containing the names of all
files and directories matching the current configuration of the
traverser.</p></dd>
<dt><a name="4"><b class="cmd">$traverser</b> <b class="method">foreach</b> <i class="arg">filevar</i> <i class="arg">script</i></a></dt>
<dd><p>The highlevel <b class="method">files</b> method (see above) is based on this
mid-level method. When invoked it finds all files and directories
matching per the current configuration and executes the <i class="arg">script</i>
for each path. The current path under consideration is stored in the
variable named by <i class="arg">filevar</i>. Both variable and script live / are
executed in the context of the caller of the method. In the method
<b class="method">files</b> the script simply saves the found paths into the list
to return.</p></dd>
<dt><a name="5"><b class="cmd">$traverser</b> <b class="method">next</b> <i class="arg">filevar</i></a></dt>
<dd><p>This is the lowest possible interface to the traverser, the core all
higher methods are built on. When invoked it returns a boolean value
indicating whether it found a path matching the current configuration
(<b class="const">True</b>), or not (<b class="const">False</b>). If a path was found it is
stored into the variable named by <i class="arg">filevar</i>, in the context of the
caller.</p>
<p>The <b class="method">foreach</b> method simply calls this method in a loop
until it returned <b class="const">False</b>. This method is exposed so that we are
also able to incrementally traverse a directory hierarchy in an
event-based manner.</p>
<p>Note that the traverser does follow symbolic links, except when
doing so would cause it to enter a link-cycle. In other words, the
command takes care to <em>not</em> lose itself in infinite loops upon
encountering circular link structures. Note that even links which are
not followed will still appear in the result.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OPTIONS</a></h2>
<dl class="doctools_options">
<dt><b class="option">-prefilter</b> command_prefix</dt>
<dd><p>This callback is executed for directories. Its result determines if
the traverser recurses into the directory or not. The default is to
always recurse into all directories. The callback is invoked with a
single argument, the <em>absolute</em> path of the directory, and has to
return a boolean value, <b class="const">True</b> when the directory passes the
filter, and <b class="const">False</b> if not.</p></dd>
<dt><b class="option">-filter</b> command_prefix</dt>
<dd><p>This callback is executed for all paths. Its result determines if the
current path is a valid result, and returned by <b class="method">next</b>. The
default is to accept all paths as valid. The callback is invoked with
a single argument, the <em>absolute</em> path to check, and has to
return a boolean value, <b class="const">True</b> when the path passes the filter,
and <b class="const">False</b> if not.</p></dd>
<dt><b class="option">-errorcmd</b> command_prefix</dt>
<dd><p>This callback is executed for all paths the traverser has trouble
with. Like being unable to change into them, get their status,
etc. The default is to ignore any such problems. The callback is
invoked with a two arguments, the <em>absolute</em> path for which the
error occured, and the error message. Errors thrown by the filter
callbacks are handled through this callback too. Errors thrown by the
error callback itself are not caught and ignored, but allowed to pass
to the caller, i.e. however invoked the <b class="method">next</b>. Any other
results from the callback are ignored.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Warnings and Incompatibilities</a></h2>
<dl class="doctools_definitions">
<dt><b class="const">0.4.4</b></dt>
<dd><p>In this version the traverser's broken system for handling symlinks
was replaced with one working correctly and properly enumerating all
the legal non-cyclic paths under a base directory.</p>
<p>While correct this means that certain pathological directory
hierarchies with cross-linked sym-links will now take about O(n**2)
time to enumerate whereas the original broken code managed O(n) due to
its brokenness.</p>
<p>A concrete example and extreme case is the &quot;<b class="file">/sys</b>&quot;
hierarchy under Linux where some hundred devices exist under both
&quot;<b class="file">/sys/devices</b>&quot; and &quot;<b class="file">/sys/class</b>&quot; with the two sub-hierarchies
linking to the other, generating millions of legal paths to enumerate.
The structure, reduced to three devices, roughly looks like</p>
<pre class="doctools_example">
	/sys/class/tty/tty0 --&gt; ../../dev/tty0
	/sys/class/tty/tty1 --&gt; ../../dev/tty1
	/sys/class/tty/tty2 --&gt; ../../dev/tty1
	/sys/dev/tty0/bus
	/sys/dev/tty0/subsystem --&gt; ../../class/tty
	/sys/dev/tty1/bus
	/sys/dev/tty1/subsystem --&gt; ../../class/tty
	/sys/dev/tty2/bus
	/sys/dev/tty2/subsystem --&gt; ../../class/tty
</pre>
<p>When having to handle such a pathological hierarchy it is
recommended to use the <b class="option">-prefilter</b> option to prevent the
traverser from following symbolic links, like so:</p>
<pre class="doctools_example">
    package require fileutil::traverse
    proc NoLinks {fileName} {
        if {[string equal [file type $fileName] link]} {
            return 0
        }
        return 1
    }
    fileutil::traverse T /sys/devices -prefilter NoLinks
    T foreach p {
        puts $p
    }
    T destroy
</pre>
</dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key723">directory traversal</a>, <a href="../../../../index.html#key722">traversal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ftp/ftp.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440

<div class='fossil-doc' data-title='ftp - ftp client'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ftp(n) 2.4.13 tcllib &quot;ftp client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ftp - Client-side tcl implementation of the ftp protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">BUGS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">ftp <span class="opt">?2.4.13?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ftp::Open</b> <i class="arg">server</i> <i class="arg">user</i> <i class="arg">passwd</i> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::ftp::Close</b> <i class="arg">handle</i></a></li>
<li><a href="#3"><b class="cmd">::ftp::Cd</b> <i class="arg">handle</i> <i class="arg">directory</i></a></li>
<li><a href="#4"><b class="cmd">::ftp::Pwd</b> <i class="arg">handle</i></a></li>
<li><a href="#5"><b class="cmd">::ftp::Type</b> <i class="arg">handle</i> <span class="opt">?<b class="const">ascii|binary|tenex</b>?</span></a></li>
<li><a href="#6"><b class="cmd">::ftp::List</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::ftp::NList</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">directory</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::ftp::FileSize</b> <i class="arg">handle</i> <i class="arg">file</i></a></li>
<li><a href="#9"><b class="cmd">::ftp::ModTime</b> <i class="arg">handle</i> <i class="arg">file</i></a></li>
<li><a href="#10"><b class="cmd">::ftp::Delete</b> <i class="arg">handle</i> <i class="arg">file</i></a></li>
<li><a href="#11"><b class="cmd">::ftp::Rename</b> <i class="arg">handle</i> <i class="arg">from</i> <i class="arg">to</i></a></li>
<li><a href="#12"><b class="cmd">::ftp::Put</b> <i class="arg">handle</i> (<i class="arg">local</i> | -data <i class="arg">data</i> | -channel <i class="arg">chan</i>) <span class="opt">?<i class="arg">remote</i>?</span></a></li>
<li><a href="#13"><b class="cmd">::ftp::Append</b> <i class="arg">handle</i> (<i class="arg">local</i> | -data <i class="arg">data</i> | -channel <i class="arg">chan</i>) <span class="opt">?<i class="arg">remote</i>?</span></a></li>
<li><a href="#14"><b class="cmd">::ftp::Get</b> <i class="arg">handle</i> <i class="arg">remote</i> <span class="opt">?(<i class="arg">local</i> | -variable <i class="arg">varname</i> | -channel <i class="arg">chan</i>)?</span></a></li>
<li><a href="#15"><b class="cmd">::ftp::Reget</b> <i class="arg">handle</i> <i class="arg">remote</i> <span class="opt">?<i class="arg">local</i>?</span> <span class="opt">?<i class="arg">from</i>?</span> <span class="opt">?<i class="arg">to</i>?</span></a></li>
<li><a href="#16"><b class="cmd">::ftp::Newer</b> <i class="arg">handle</i> <i class="arg">remote</i> <span class="opt">?<i class="arg">local</i>?</span></a></li>
<li><a href="#17"><b class="cmd">::ftp::MkDir</b> <i class="arg">handle</i> <i class="arg">directory</i></a></li>
<li><a href="#18"><b class="cmd">::ftp::RmDir</b> <i class="arg">handle</i> <i class="arg">directory</i></a></li>
<li><a href="#19"><b class="cmd">::ftp::Quote</b> <i class="arg">handle</i> <i class="arg">arg1</i> <i class="arg">arg2</i> <i class="arg">...</i></a></li>
<li><a href="#20"><b class="cmd">::ftp::DisplayMsg</b> <i class="arg">handle</i> <i class="arg">msg</i> <span class="opt">?<i class="arg">state</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The ftp package provides the client side of the ftp protocol as
specified in RFC 959 (<a href="http://www.rfc-editor.org/rfc/rfc959.txt">http://www.rfc-editor.org/rfc/rfc959.txt</a>).
The package implements both active (default) and passive ftp sessions.</p>
<p>A new ftp session is started with the <b class="cmd">::ftp::Open</b> command. To
shutdown an existing ftp session use <b class="cmd">::ftp::Close</b>. All other
commands are restricted to usage in an an open ftp session. They will
generate errors if they are used out of context.  The ftp package
includes file and directory manipulating commands for remote sites. To
perform the same operations on the local site use commands built into
the core, like <b class="cmd">cd</b> or <b class="cmd"><a href="../../../../index.html#key31">file</a></b>.</p>
<p>The output of the package is controlled by two state variables,
<b class="variable">::ftp::VERBOSE</b> and <b class="variable">::ftp::DEBUG</b>. Setting
<b class="variable">::ftp::VERBOSE</b> to &quot;1&quot; forces the package to show all responses
from a remote server. The default value is &quot;0&quot;. Setting
<b class="variable">::ftp::DEBUG</b> to &quot;1&quot; enables debugging and forces the package to
show all return codes, states, state changes and &quot;real&quot; ftp
commands. The default value is &quot;0&quot;.</p>
<p>The command <b class="cmd">::ftp::DisplayMsg</b> is used to show the different
messages from the ftp session. The setting of <b class="variable">::ftp::VERBOSE</b>
determines if this command is called or not. The current
implementation of the command uses the <b class="package"><a href="../log/log.html">log</a></b> package of tcllib
to write the messages to their final destination. This means that the
behaviour of <b class="cmd">::ftp::DisplayMsg</b> can be customized without
changing its implementation. For more radical changes overwriting its
implementation by the application is of course still possible. Note
that the default implementation honors the option <b class="option">-output</b> to
<b class="cmd">::ftp::Open</b> for a session specific log command.</p>
<p><em>Caution</em>: The default implementation logs error messages like
all other messages. If this behaviour is changed to throwing an error
instead all commands in the API will change their behaviour too. In
such a case they will not return a failure code as described below but
pass the thrown error to their caller.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ftp::Open</b> <i class="arg">server</i> <i class="arg">user</i> <i class="arg">passwd</i> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>This command is used to start a FTP session by establishing a control
connection to the FTP server. The defaults are used for any option not
specified by the caller.</p>
<p>The command takes a host name <i class="arg">server</i>, a user name <i class="arg">user</i> and
a password <i class="arg">password</i> as its parameters and returns a session
handle that is an integer number greater than or equal to &quot;0&quot;, if the
connection is successfully established. Otherwise it returns &quot;-1&quot;.
The <i class="arg">server</i> parameter must be the name or internet address (in
dotted decimal notation) of the ftp server to connect to. The
<i class="arg">user</i> and <i class="arg">passwd</i> parameters must contain a valid user name
and password to complete the login process.</p>
<p>The options overwrite some default values or set special abilities:</p>
<dl class="doctools_definitions">
<dt><b class="option">-blocksize</b> <i class="arg">size</i></dt>
<dd><p>The blocksize is used during data transfer. At most <i class="arg">size</i> bytes
are transfered at once. The default value for this option is 4096.
The package will evaluate the <b class="cmd">-progress callback</b> for the
session after the transfer of each block.</p></dd>
<dt><b class="option">-timeout</b> <i class="arg">seconds</i></dt>
<dd><p>If <i class="arg">seconds</i> is non-zero, then <b class="cmd">::ftp::Open</b> sets up a timeout
which will occur after the specified number of seconds. The default
value is 600.</p></dd>
<dt><b class="option">-port</b> <i class="arg">number</i></dt>
<dd><p>The port <i class="arg">number</i> specifies an alternative remote port on the ftp
server on which the ftp service resides. Most ftp services listen for
connection requests on the default port 21. Sometimes, usually for
security reasons, port numbers other than 21 are used for ftp
connections.</p></dd>
<dt><b class="option">-mode</b> <i class="arg">mode</i></dt>
<dd><p>The transfer <i class="arg">mode</i> option determines if a file transfer occurs in
<b class="const">active</b> or <b class="const">passive</b> mode. In passive mode the client
will ask the ftp server to listen on a data port and wait for the
connection rather than to initiate the process by itself when a data
transfer request comes in. Passive mode is normally a requirement when
accessing sites via a firewall. The default mode is <b class="const">active</b>.</p></dd>
<dt><b class="option">-progress</b> <i class="arg">callback</i></dt>
<dd><p>This <i class="arg">callback</i> is evaluated whenever a block of data was
transfered. See the option <b class="option">-blocksize</b> for how to specify the
size of the transfered blocks.</p>
<p>When evaluating the <i class="arg">callback</i> one argument is appended to the
callback script, the current accumulated number of bytes transferred
so far.</p></dd>
<dt><b class="option">-command</b> <i class="arg">callback</i></dt>
<dd><p>Specifying this option places the connection into asynchronous
mode. The <i class="arg">callback</i> is evaluated after the completion of any
operation. When an operation is running no further operations must be
started until a callback has been received for the currently executing
operation.</p>
<p>When evaluating the <i class="arg">callback</i> several arguments are appended to
the callback script, namely the keyword of the operation that has
completed and any additional arguments specific to the operation.  If
an error occurred during the execution of the operation the callback is
given the keyword <b class="const">error</b>.</p></dd>
<dt><b class="option">-output</b> <i class="arg">callback</i></dt>
<dd><p>This option has no default. If it is set the default implementation of
<b class="cmd">::ftp::DisplayMsg</b> will use its value as command prefix to log
all internal messages. The callback will have three arguments appended
to it before evaluation, the id of the session, the message itself,
and the connection state, in this order.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::ftp::Close</b> <i class="arg">handle</i></a></dt>
<dd><p>This command terminates the specified ftp session. If no file transfer
is in progress, the server will close the control connection
immediately. If a file transfer is in progress however, the control
connection will remain open until the transfers completes. When that
happens the server will write the result response for the transfer to
it and close the connection afterward.</p></dd>
<dt><a name="3"><b class="cmd">::ftp::Cd</b> <i class="arg">handle</i> <i class="arg">directory</i></a></dt>
<dd><p>This command changes the current working directory on the ftp server
to a specified target <i class="arg">directory</i>.  The command returns 1 if the
current working directory was successfully changed to the specified
directory or 0 if it fails.  The target directory can be</p>
<ul class="doctools_itemized">
<li><p>a subdirectory of the current directory,</p></li>
<li><p>Two dots, <b class="const">..</b>  (as an indicator for the parent directory of
the current directory)</p></li>
<li><p>or a fully qualified path to a new working directory.</p></li>
</ul></dd>
<dt><a name="4"><b class="cmd">::ftp::Pwd</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the complete path of the current working
directory on the ftp server, or an empty string in case of an error.</p></dd>
<dt><a name="5"><b class="cmd">::ftp::Type</b> <i class="arg">handle</i> <span class="opt">?<b class="const">ascii|binary|tenex</b>?</span></a></dt>
<dd><p>This command sets the ftp file transfer type to either <b class="const">ascii</b>,
<b class="const">binary</b>, or <b class="const">tenex</b>. The command always returns the
currently set type. If called without type no change is made.</p>
<p>Currently only <b class="const">ascii</b> and <b class="const">binary</b> types are
supported. There is some early (alpha) support for Tenex mode. The
type <b class="const">ascii</b> is normally used to convert text files into a
format suitable for text editors on the platform of the destination
machine. This mainly affects end-of-line markers. The type
<b class="const">binary</b> on the other hand allows the undisturbed transfer of
non-text files, such as compressed files, images and executables.</p></dd>
<dt><a name="6"><b class="cmd">::ftp::List</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This command returns a human-readable list of files.  Wildcard
expressions such as &quot;<b class="file">*.tcl</b>&quot; are allowed.  If <i class="arg">pattern</i>
refers to a specific directory, then the contents of that directory
are returned.  If the <i class="arg">pattern</i> is not a fully-qualified path
name, the command lists entries relative to the current remote
directory.  If no <i class="arg">pattern</i> is specified, the contents of the
current remote directory is returned.</p>
<p>The listing includes any system-dependent information that the server
chooses to include. For example most UNIX systems produce output from
the command <b class="syscmd">ls -l</b>. The command returns the retrieved
information as a tcl list with one item per entry. Empty lines and
UNIX's &quot;total&quot; lines are ignored and not included in the result as
reported by this command.</p>
<p>If the command fails an empty list is returned.</p></dd>
<dt><a name="7"><b class="cmd">::ftp::NList</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">directory</i>?</span></a></dt>
<dd><p>This command has the same behavior as the <b class="cmd">::ftp::List</b> command,
except that it only retrieves an abbreviated listing. This means only
file names are returned in a sorted list.</p></dd>
<dt><a name="8"><b class="cmd">::ftp::FileSize</b> <i class="arg">handle</i> <i class="arg">file</i></a></dt>
<dd><p>This command returns the size of the specified <i class="arg">file</i> on the ftp
server. If the command fails an empty string is returned.</p>
<p><em>ATTENTION!</em> It will not work properly when in ascii mode and
is not supported by all ftp server implementations.</p></dd>
<dt><a name="9"><b class="cmd">::ftp::ModTime</b> <i class="arg">handle</i> <i class="arg">file</i></a></dt>
<dd><p>This command retrieves the time of the last modification of the
<i class="arg">file</i> on the ftp server as a system dependent integer value in
seconds or an empty string if an error occurred. Use the built-in
command <b class="cmd">clock</b> to convert the retrieves value into other formats.</p></dd>
<dt><a name="10"><b class="cmd">::ftp::Delete</b> <i class="arg">handle</i> <i class="arg">file</i></a></dt>
<dd><p>This command deletes the specified <i class="arg">file</i> on the ftp server. The
command returns 1 if the specified file was successfully deleted or 0
if it failed.</p></dd>
<dt><a name="11"><b class="cmd">::ftp::Rename</b> <i class="arg">handle</i> <i class="arg">from</i> <i class="arg">to</i></a></dt>
<dd><p>This command renames the file <i class="arg">from</i> in the current directory of
the ftp server to the specified new file name <i class="arg">to</i>. This new file
name must not be the same as any existing subdirectory or file name.
The command returns 1 if the specified file was successfully renamed
or 0 if it failed.</p></dd>
<dt><a name="12"><b class="cmd">::ftp::Put</b> <i class="arg">handle</i> (<i class="arg">local</i> | -data <i class="arg">data</i> | -channel <i class="arg">chan</i>) <span class="opt">?<i class="arg">remote</i>?</span></a></dt>
<dd><p>This command transfers a local file <i class="arg">local</i> to a remote file
<i class="arg">remote</i> on the ftp server. If the file parameters passed to the
command do not fully qualified path names the command will use the
current directory on local and remote host. If the remote file name is
unspecified, the server will use the name of the local file as the
name of the remote file. The command returns 1 to indicate a successful
transfer and 0 in the case of a failure.</p>
<p>If <b class="option">-data</b> <i class="arg">data</i> is specified instead of a local file, the
system will not transfer a file, but the <i class="arg">data</i> passed into it. In
this case the name of the remote file has to be specified.</p>
<p>If <b class="option">-channel</b> <i class="arg">chan</i> is specified instead of a local file,
the system will not transfer a file, but read the contents of the
channel <i class="arg">chan</i> and write this to the remote file. In this case the
name of the remote file has to be specified. After the transfer
<i class="arg">chan</i> will be closed.</p></dd>
<dt><a name="13"><b class="cmd">::ftp::Append</b> <i class="arg">handle</i> (<i class="arg">local</i> | -data <i class="arg">data</i> | -channel <i class="arg">chan</i>) <span class="opt">?<i class="arg">remote</i>?</span></a></dt>
<dd><p>This command behaves like <b class="cmd">::ftp::Puts</b>, but appends the
transfered information to the remote file. If the file did not exist
on the server it will be created.</p></dd>
<dt><a name="14"><b class="cmd">::ftp::Get</b> <i class="arg">handle</i> <i class="arg">remote</i> <span class="opt">?(<i class="arg">local</i> | -variable <i class="arg">varname</i> | -channel <i class="arg">chan</i>)?</span></a></dt>
<dd><p>This command retrieves a remote file <i class="arg">remote</i> on the ftp server
and stores its contents into the local file <i class="arg">local</i>. If the file
parameters passed to the command are not fully qualified path names
the command will use the current directory on local and remote
host. If the local file name is unspecified, the server will use the
name of the remote file as the name of the local file. The command
returns 1 to indicate a successful transfer and 0 in the case of a
failure. The command will throw an error if the directory the file
<i class="arg">local</i> is to be placed in does not exist.</p>
<p>If <b class="option">-variable</b> <i class="arg">varname</i> is specified, the system will
store the retrieved data into the variable <i class="arg">varname</i> instead of a
file.</p>
<p>If <b class="option">-channel</b> <i class="arg">chan</i> is specified, the system will write
the retrieved data into the channel <i class="arg">chan</i> instead of a file. The
system will <em>not</em> close <i class="arg">chan</i> after the transfer, this is
the responsibility of the caller to <b class="cmd">::ftp::Get</b>.</p></dd>
<dt><a name="15"><b class="cmd">::ftp::Reget</b> <i class="arg">handle</i> <i class="arg">remote</i> <span class="opt">?<i class="arg">local</i>?</span> <span class="opt">?<i class="arg">from</i>?</span> <span class="opt">?<i class="arg">to</i>?</span></a></dt>
<dd><p>This command behaves like <b class="cmd">::ftp::Get</b>, except that if local file
<i class="arg">local</i> exists and is smaller than remote file <i class="arg">remote</i>, the
local file is presumed to be a partially transferred copy of the
remote file and the transfer is continued from the apparent point of
failure.  The command will throw an error if the directory the file
<i class="arg">local</i> is to be placed in does not exist. This command is useful
when transferring very large files over networks that tend to drop
connections.</p>
<p>Specifying the additional byte offsets <i class="arg">from</i> and <i class="arg">to</i> will
cause the command to change its behaviour and to download exactly the
specified slice of the remote file. This mode is possible only if a
local destination is explicitly provided. Omission of <i class="arg">to</i> leads
to downloading till the end of the file.</p></dd>
<dt><a name="16"><b class="cmd">::ftp::Newer</b> <i class="arg">handle</i> <i class="arg">remote</i> <span class="opt">?<i class="arg">local</i>?</span></a></dt>
<dd><p>This command behaves like <b class="cmd">::ftp::Get</b>, except that it retrieves
the remote file only if the modification time of the remote file is
more recent than the file on the local system. If the file does not
exist on the local system, the remote file is considered newer. The
command will throw an error if the directory the file <i class="arg">local</i> is
to be placed in does not exist.</p></dd>
<dt><a name="17"><b class="cmd">::ftp::MkDir</b> <i class="arg">handle</i> <i class="arg">directory</i></a></dt>
<dd><p>This command creates the specified <i class="arg">directory</i> on the ftp
server. If the specified path is relative the new directory will be
created as a subdirectory of the current working directory. Else the
created directory will have the specified path name. The command
returns 1 to indicate a successful creation of the directory and 0 in
the case of a failure.</p></dd>
<dt><a name="18"><b class="cmd">::ftp::RmDir</b> <i class="arg">handle</i> <i class="arg">directory</i></a></dt>
<dd><p>This command removes the specified directory on the ftp server. The
remote directory has to be empty or the command will fail. The command
returns 1 to indicate a successful removal of the directory and 0 in
the case of a failure.</p></dd>
<dt><a name="19"><b class="cmd">::ftp::Quote</b> <i class="arg">handle</i> <i class="arg">arg1</i> <i class="arg">arg2</i> <i class="arg">...</i></a></dt>
<dd><p>This command is used to send an arbitrary ftp command to the
server. It cannot be used to obtain a directory listing or for
transferring files. It is included to allow an application to execute
commands on the ftp server which are not provided by this package.
The arguments are sent verbatim, i.e. as is, with no changes.</p>
<p>In contrast to the other commands in this package this command will
not parse the response it got from the ftp server but return it
verbatim to the caller.</p></dd>
<dt><a name="20"><b class="cmd">::ftp::DisplayMsg</b> <i class="arg">handle</i> <i class="arg">msg</i> <span class="opt">?<i class="arg">state</i>?</span></a></dt>
<dd><p>This command is used by the package itself to show the different
messages from the ftp sessions. The package itself declares this
command very simple, writing the messages to <b class="const">stdout</b> (if
<b class="variable">::ftp::VERBOSE</b> was set, see below) and throwing tcl errors for
error messages. It is the responsibility of the application to
overwrite it as needed. A state variable for different states assigned
to different colors is recommended by the author. The package
<b class="package"><a href="../log/log.html">log</a></b> is useful for this.</p></dd>
<dt><b class="variable">::ftp::VERBOSE</b></dt>
<dd><p>A state variable controlling the output of the package. Setting
<b class="variable">::ftp::VERBOSE</b> to &quot;1&quot; forces the package to show all responses
from a remote server. The default value is &quot;0&quot;.</p></dd>
<dt><b class="variable">::ftp::DEBUG</b></dt>
<dd><p>A state variable controlling the output of ftp. Setting
<b class="variable">::ftp::DEBUG</b> to &quot;1&quot; enables debugging and forces the package to
show all return codes, states, state changes and &quot;real&quot; ftp
commands. The default value is &quot;0&quot;.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">BUGS</a></h2>
<p>The correct execution of many commands depends upon the proper
behavior by the remote server, network and router configuration.</p>
<p>An update command placed in the procedure <b class="cmd">::ftp::DisplayMsg</b> may
run into persistent errors or infinite loops. The solution to this
problem is to use <b class="cmd">update idletasks</b> instead of <b class="cmd"><a href="../../../../index.html#key417">update</a></b>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ftp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftpd/ftpd.html">ftpd</a>, <a href="../mime/mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="../mime/smtp.html">smtp</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key294">ftp</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key293">rfc 959</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ftp/ftp_geturl.html.





















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170

<div class='fossil-doc' data-title='ftp::geturl - ftp client'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ftp::geturl(n) 0.2.2 tcllib &quot;ftp client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ftp::geturl - Uri handler for ftp urls</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">ftp::geturl <span class="opt">?0.2.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ftp::geturl</b> <i class="arg">url</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a command which wraps around the client side of
the <i class="term"><a href="../../../../index.html#key294">ftp</a></i> protocol provided by package <b class="package"><a href="ftp.html">ftp</a></b> to allow the
retrieval of urls using the <i class="term"><a href="../../../../index.html#key294">ftp</a></i> schema.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ftp::geturl</b> <i class="arg">url</i></a></dt>
<dd><p>This command can be used by the generic command <b class="cmd">::uri::geturl</b>
(See package <b class="package"><a href="../uri/uri.html">uri</a></b>) to retrieve the contents of ftp
urls. Internally it uses the commands of the package <b class="package"><a href="ftp.html">ftp</a></b> to
fulfill the request.</p>
<p>The contents of a <i class="term"><a href="../../../../index.html#key294">ftp</a></i> url are defined as follows:</p>
<dl class="doctools_definitions">
<dt><i class="term"><a href="../../../../index.html#key31">file</a></i></dt>
<dd><p>The contents of the specified file itself.</p></dd>
<dt><i class="term">directory</i></dt>
<dd><p>A listing of the contents of the directory in key value notation where
the file name is the key and its attributes the associated value.</p></dd>
<dt><i class="term">link</i></dt>
<dd><p>The attributes of the link, including the path it refers to.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ftp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftpd/ftpd.html">ftpd</a>, <a href="../mime/mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="../mime/smtp.html">smtp</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key294">ftp</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key293">rfc 959</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ftpd/ftpd.html.





































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338

<div class='fossil-doc' data-title='ftpd - Tcl FTP Server Package'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ftpd(n) 1.3 tcllib &quot;Tcl FTP Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ftpd - Tcl FTP server implementation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">CALLBACKS</a></li>
<li class="doctools_section"><a href="#section4">VARIABLES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">ftpd <span class="opt">?1.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ftpd::server</b> <span class="opt">?<i class="arg">myaddr</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::ftpd::config</b> <span class="opt">?<i class="arg">option value</i>?</span> <span class="opt">?<i class="arg">option value ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">fsCmd</i> <b class="method">append</b> <i class="arg">path</i></a></li>
<li><a href="#4"><i class="arg">fsCmd</i> <b class="method">delete</b> <i class="arg">path</i> <i class="arg">channel</i></a></li>
<li><a href="#5"><i class="arg">fsCmd</i> <b class="method">dlist</b> <i class="arg">path</i> <i class="arg">style</i> <i class="arg">channel</i></a></li>
<li><a href="#6"><i class="arg">fsCmd</i> <b class="method">exists</b> <i class="arg">path</i></a></li>
<li><a href="#7"><i class="arg">fsCmd</i> <b class="method">mkdir</b> <i class="arg">path</i> <i class="arg">channel</i></a></li>
<li><a href="#8"><i class="arg">fsCmd</i> <b class="method">mtime</b> <i class="arg">path</i> <i class="arg">channel</i></a></li>
<li><a href="#9"><i class="arg">fsCmd</i> <b class="method">permissions</b> <i class="arg">path</i></a></li>
<li><a href="#10"><i class="arg">fsCmd</i> <b class="method">rename</b> <i class="arg">path</i> <i class="arg">newpath</i> <i class="arg">channel</i></a></li>
<li><a href="#11"><i class="arg">fsCmd</i> <b class="method">retr</b> <i class="arg">path</i></a></li>
<li><a href="#12"><i class="arg">fsCmd</i> <b class="method">rmdir</b> <i class="arg">path</i> <i class="arg">channel</i></a></li>
<li><a href="#13"><i class="arg">fsCmd</i> <b class="method">size</b> <i class="arg">path</i> <i class="arg">channel</i></a></li>
<li><a href="#14"><i class="arg">fsCmd</i> <b class="method">store</b> <i class="arg">path</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">ftpd</b> package provides a simple Tcl-only server library
for the FTP protocol as specified in
RFC 959 (<a href="http://www.rfc-editor.org/rfc/rfc959.txt">http://www.rfc-editor.org/rfc/rfc959.txt</a>).
It works by listening on the standard FTP socket.  Most server errors
are returned as error messages with the appropriate code attached to
them.  Since the server code for the ftp daemon is executed in the
event loop, it is possible that a
<b class="cmd">bgerror</b> will be thrown on the server if there are problems with
the code in the module.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ftpd::server</b> <span class="opt">?<i class="arg">myaddr</i>?</span></a></dt>
<dd><p>Open a listening socket to listen to and accept ftp connections.
myaddr is an optional argument.  <i class="arg">myaddr</i> is the domain-style name
or numerical IP address of the client-side network interface to use
for the connection.</p></dd>
<dt><a name="2"><b class="cmd">::ftpd::config</b> <span class="opt">?<i class="arg">option value</i>?</span> <span class="opt">?<i class="arg">option value ...</i>?</span></a></dt>
<dd><p>The value is always the name of the command to call as the
callback. The option specifies which callback should be configured.
See section <span class="sectref"><a href="#section3">CALLBACKS</a></span> for descriptions of the arguments and
return values for each of the callbacks.</p>
<dl class="doctools_definitions">
<dt>-authIpCmd <i class="arg">proc</i></dt>
<dd><p>Callback to authenticate new connections based on the ip-address of
the peer.</p></dd>
<dt>-authUsrCmd <i class="arg">proc</i></dt>
<dd><p>Callback to authenticate new connections based on the user logging in
(and the users password).</p></dd>
<dt>-authFileCmd <i class="arg">proc</i></dt>
<dd><p>Callback to accept or deny a users access to read and write to a
specific path or file.</p></dd>
<dt>-logCmd <i class="arg">proc</i></dt>
<dd><p>Callback for log information generated by the FTP engine.</p></dd>
<dt>-fsCmd <i class="arg">proc</i></dt>
<dd><p>Callback to connect the engine to the filesystem it operates on.</p></dd>
<dt>-closeCmd <i class="arg">proc</i></dt>
<dd><p>Callback to be called when a connection is closed. This allows the
embedding application to perform its own cleanup operations.</p></dd>
<dt>-xferDoneCmd <i class="arg">proc</i></dt>
<dd><p>Callback for transfer completion notification. In other words, it is
called whenever a transfer of data to or from the client has
completed.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CALLBACKS</a></h2>
<dl class="doctools_definitions">
<dt><b class="cmd">authIpCmd</b> callback</dt>
<dd><p>The authIpCmd receives the ip-address of the peer attempting to
connect to the ftp server as its argument. It returns a 1 to allow
users from the specified IP to attempt to login and a 0 to reject the
login attempt from the specified IP.</p></dd>
<dt><b class="cmd">authUsrCmd</b> callback</dt>
<dd><p>The authUsrCmd receives the username and password as its two
arguments. It returns a 1 to accept the attempted login to the ftpd
and a 0 to reject the attempted login.</p></dd>
<dt><b class="cmd">authFileCmd</b> callback</dt>
<dd><p>The authFileCmd receives the user (that is currently logged in), the
path or filename that is about to be read or written, and
<b class="const">read</b> or <b class="const">write</b> as its three arguments.  It returns a
1 to allow the path or filename to be read or written, and a 0 to
reject the attempted read or write with a permissions error code.</p></dd>
<dt><b class="cmd">logCmd</b> callback</dt>
<dd><p>The logCmd receives a severity and a message as its two arguments.
The severities used within the ftpd package are <b class="const">note</b>,
<b class="const">debug</b>, and <b class="const">error</b>. The logCmd doesn't return
anything.</p></dd>
<dt><b class="cmd">fsCmd</b> callback</dt>
<dd><p>The fsCmd receives a subcommand, a filename or path, and optional
additional arguments (depending on the subcommand).</p>
<p>The subcommands supported by the fsCmd are:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">fsCmd</i> <b class="method">append</b> <i class="arg">path</i></a></dt>
<dd><p>The append subcommand receives the filename to append to as its
argument. It returns a writable tcl channel as its return value.</p></dd>
<dt><a name="4"><i class="arg">fsCmd</i> <b class="method">delete</b> <i class="arg">path</i> <i class="arg">channel</i></a></dt>
<dd><p>The delete subcommand receives the filename to delete, and a channel
to write to as its two arguments.  The file specified is deleted and
the appropriate ftp message is written to the channel that is passed
as the second argument.  The delete subcommand returns nothing.</p></dd>
<dt><a name="5"><i class="arg">fsCmd</i> <b class="method">dlist</b> <i class="arg">path</i> <i class="arg">style</i> <i class="arg">channel</i></a></dt>
<dd><p>The dlist subcommand receives the path that it should list the files
that are in, the style in which the files should be listed which is
either <b class="const">nlst</b> or <b class="const">list</b>, and a channel to write to as
its three arguments.  The files in the specified path are printed to
the specified channel one per line.  If the style is <b class="const">nlst</b>
only the name of the file is printed to the channel.  If the style is
<b class="const">list</b> then the file permissions, number of links to the file,
the name of the user that owns the file, the name of the group that
owns the file, the size (in bytes) of the file, the modify time of the
file, and the filename are printed out to the channel in a formatted
space separated format.  The <b class="method">dlist</b> subcommand returns
nothing.</p></dd>
<dt><a name="6"><i class="arg">fsCmd</i> <b class="method">exists</b> <i class="arg">path</i></a></dt>
<dd><p>The exists subcommand receives the name of a file to check the
existence of as its only argument.  The exists subcommand returns a 1
if the path specified exists and the path is not a directory.</p></dd>
<dt><a name="7"><i class="arg">fsCmd</i> <b class="method">mkdir</b> <i class="arg">path</i> <i class="arg">channel</i></a></dt>
<dd><p>The mkdir subcommand receives the path of a directory to create and a
channel to write to as its two arguments.  The mkdir subcommand
creates the specified directory if necessary and possible.  The mkdir
subcommand then prints the appropriate success or failure message to
the channel.  The mkdir subcommand returns nothing.</p></dd>
<dt><a name="8"><i class="arg">fsCmd</i> <b class="method">mtime</b> <i class="arg">path</i> <i class="arg">channel</i></a></dt>
<dd><p>The mtime subcommand receives the path of a file to check the modify
time on and a channel as its two arguments.  If the file exists the
mtime is printed to the channel in the proper FTP format, otherwise an
appropriate error message and code are printed to the channel.  The
mtime subcommand returns nothing.</p></dd>
<dt><a name="9"><i class="arg">fsCmd</i> <b class="method">permissions</b> <i class="arg">path</i></a></dt>
<dd><p>The permissions subcommand receives the path of a file to retrieve the
permissions of.  The permissions subcommand returns the octal file
permissions of the specified file.  The file is expected to exist.</p></dd>
<dt><a name="10"><i class="arg">fsCmd</i> <b class="method">rename</b> <i class="arg">path</i> <i class="arg">newpath</i> <i class="arg">channel</i></a></dt>
<dd><p>The rename subcommand receives the path of the current file, the new
file path, and a channel to write to as its three arguments.  The
rename subcommand renames the current file to the new file path if the
path to the new file exists, and then prints out the appropriate
message to the channel.  If the new file path doesn't exist the
appropriate error message is printed to the channel.  The rename
subcommand returns nothing.</p></dd>
<dt><a name="11"><i class="arg">fsCmd</i> <b class="method">retr</b> <i class="arg">path</i></a></dt>
<dd><p>The retr subcommand receives the path of a file to read as its only
argument.  The retr subcommand returns a readable channel that the
specified file can be read from.</p></dd>
<dt><a name="12"><i class="arg">fsCmd</i> <b class="method">rmdir</b> <i class="arg">path</i> <i class="arg">channel</i></a></dt>
<dd><p>The rmdir subcommand receives the path of a directory to remove and a
channel to write to as its two arguments.  The rmdir subcommand
removes the specified directory (if possible) and prints the
appropriate message to the channel (which may be an error if the
specified directory does not exist or is not empty).  The rmdir
subcommand returns nothing.</p></dd>
<dt><a name="13"><i class="arg">fsCmd</i> <b class="method">size</b> <i class="arg">path</i> <i class="arg">channel</i></a></dt>
<dd><p>The size subcommand receives the path of a file to get the size (in
bytes) of and a channel to write to as its two arguments.  The size
subcommand prints the appropriate code and the size of the file if the
specified path is a file, otherwise an appropriate error code and
message are printed to the channel.  The size subcommand returns
nothing.</p></dd>
<dt><a name="14"><i class="arg">fsCmd</i> <b class="method">store</b> <i class="arg">path</i></a></dt>
<dd><p>The store subcommand receives the path of a file to write as its only
argument.  The store subcommand returns a writable channel.</p></dd>
</dl></dd>
<dt><b class="cmd">closeCmd</b></dt>
<dd><p>The <b class="cmd">closeCmd</b> receives no arguments when it is invoked, and any
return value it may generate is discarded.</p></dd>
<dt><b class="cmd">xferDoneCmd</b> sock sock2 file bytes filename err</dt>
<dd><p>The <b class="cmd">xferDoneCmd</b> receives six arguments when invoked. These are,
in this order, the channel handle of the control socket for the
connection, the channel handle of the data socket used for the
transfer (already closed), the handle of the channel containing the
transfered file, the number of bytes transfered, the path of the file
which was transfered, and a (possibly empty) error message.
Any return value it may generate is discarded.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">VARIABLES</a></h2>
<dl class="doctools_definitions">
<dt><b class="variable">::ftpd::cwd</b></dt>
<dd><p>The current working directory for a session when someone first
connects to the FTPD or when the <b class="cmd">REIN</b> ftp command is received.</p></dd>
<dt><b class="variable">::ftpd::contact</b></dt>
<dd><p>The e-mail address of the person that is the contact for the ftp
server.  This address is printed out as part of the response to the
<b class="cmd">FTP HELP</b> command.</p></dd>
<dt><b class="variable">::ftpd::port</b></dt>
<dd><p>The port that the ftp server should listen on.
If port is specified as zero, the operating system will allocate an
unused port for use as a server socket; afterwards, the variable will
contain the port number that was allocated.</p></dd>
<dt><b class="variable">::ftpd::welcome</b></dt>
<dd><p>The message that is printed out when the user first connects to the
ftp server.</p></dd>
<dt><b class="variable">::ftpd::CurrentSocket</b></dt>
<dd><p>Accessible to all callbacks and all filesystem commands (which are a
special form of callback) and contains the handle of the socket
channel which was active when the callback was invoked.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ftpd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key294">ftp</a>, <a href="../../../../index.html#key607">ftpd</a>, <a href="../../../../index.html#key606">ftpserver</a>, <a href="../../../../index.html#key293">rfc 959</a>, <a href="../../../../index.html#key605">services</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/fumagic/cfront.html.













































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182

<div class='fossil-doc' data-title='fileutil::magic::cfront - file utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::cfront(n) 1.2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::cfront - Generator core for compiler of magic(5) files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">fileutil::magic::cfront <span class="opt">?1.2.0?</span></b></li>
<li>package require <b class="pkgname">fileutil::magic::cgen <span class="opt">?1.2.0?</span></b></li>
<li>package require <b class="pkgname">fileutil::magic::rt <span class="opt">?1.2.0?</span></b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::magic::cfront::compile</b> <i class="arg">path</i>...</a></li>
<li><a href="#2"><b class="cmd">::fileutil::magic::cfront::procdef</b> <i class="arg">procname</i> <i class="arg">path</i>...</a></li>
<li><a href="#3"><b class="cmd">::fileutil::magic::cfront::install</b> <i class="arg">path</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the frontend of a compiler of magic(5) files
into recognizers based on the <b class="package"><a href="rtcore.html">fileutil::magic::rt</a></b> recognizer
runtime package. For the generator backed used by this compiler see
the package <b class="package"><a href="cgen.html">fileutil::magic::cgen</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::fileutil::magic::cfront::compile</b> <i class="arg">path</i>...</a></dt>
<dd><p>This command takes the paths of one or more files and directories and
compiles all the files, and the files in all the directories into a
single recognizer for all the file types specified in these files.</p>
<p>All the files have to be in the format specified by magic(5).</p>
<p>The result of the command is a Tcl script containing the generated
recognizer.</p></dd>
<dt><a name="2"><b class="cmd">::fileutil::magic::cfront::procdef</b> <i class="arg">procname</i> <i class="arg">path</i>...</a></dt>
<dd><p>This command behaves like <b class="cmd">::fileutil::magic::cfront::compile</b>
with regard to the specified path arguments, then wraps the resulting
recognizer script into a procedure named <i class="arg">procname</i>, puts code
setting up the namespace of <i class="arg">procname</i> in front, and returns the
resulting script.</p></dd>
<dt><a name="3"><b class="cmd">::fileutil::magic::cfront::install</b> <i class="arg">path</i>...</a></dt>
<dd><p>This command uses <b class="cmd">::fileutil::magic::cfront::procdef</b> to compile
each of the paths into a recognizer procedure and installs the result
in the current interpreter.</p>
<p>The name of each new procedure is derived from the name of the
file/directory used in its creation, with file/directory &quot;<b class="file">FOO</b>&quot;
causing the creation of procedure <b class="const">::fileutil::magic::/FOO::run</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key116">file recognition</a>, <a href="../../../../index.html#key118">file type</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key230">mime</a>, <a href="../../../../index.html#key117">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/fumagic/cgen.html.





































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

<div class='fossil-doc' data-title='fileutil::magic::cgen - file utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::cgen(n) 1.2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::cgen - Generator core for compiler of magic(5) files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">fileutil::magic::cgen <span class="opt">?1.2.0?</span></b></li>
<li>package require <b class="pkgname">fileutil::magic::rt <span class="opt">?1.2.0?</span></b></li>
<li>package require <b class="pkgname">struct::tree</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::magic::cgen::2tree</b> <i class="arg">script</i></a></li>
<li><a href="#2"><b class="cmd">::fileutil::magic::cgen::treedump</b> <i class="arg">tree</i></a></li>
<li><a href="#3"><b class="cmd">::fileutil::magic::cgen::treegen</b> <i class="arg">tree</i> <i class="arg">node</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the generator backend for a compiler of magic(5)
files into recognizers based on the <b class="package"><a href="rtcore.html">fileutil::magic::rt</a></b>
recognizer runtime package. For the compiler frontend using this
generator see the package <b class="package"><a href="cfront.html">fileutil::magic::cfront</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::fileutil::magic::cgen::2tree</b> <i class="arg">script</i></a></dt>
<dd><p>This command converts the recognizer specified by the <i class="arg">script</i>
into a tree and returns the object command of that tree as its
result. It uses the package <b class="package"><a href="../struct/struct_tree.html">struct::tree</a></b> for the tree.</p>
<p>The <i class="arg">script</i> is in the format specified by magic(5).</p></dd>
<dt><a name="2"><b class="cmd">::fileutil::magic::cgen::treedump</b> <i class="arg">tree</i></a></dt>
<dd><p>This command takes a <i class="arg">tree</i> as generated by
<b class="cmd">::fileutil::magic::cgen::2tree</b> and returns a string encoding the
tree for human consumption, to aid in debugging.</p></dd>
<dt><a name="3"><b class="cmd">::fileutil::magic::cgen::treegen</b> <i class="arg">tree</i> <i class="arg">node</i></a></dt>
<dd><p>This command takes a <i class="arg">tree</i> as generated by
<b class="cmd">::fileutil::magic::cgen::2tree</b> and returns a Tcl script, the
recognizer for the file types represented by the sub-tree rooted at
the <i class="arg">node</i>.
The generated script makes extensive use of the commands provided by
the recognizer runtime package <b class="package"><a href="rtcore.html">fileutil::magic::rt</a></b> to
perform its duties.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key116">file recognition</a>, <a href="../../../../index.html#key118">file type</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key230">mime</a>, <a href="../../../../index.html#key117">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/fumagic/filetypes.html.





















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170

<div class='fossil-doc' data-title='fileutil::magic::filetype - file utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::filetype(n) 1.2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::filetype - Procedures implementing file-type recognition</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">REFERENCES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">fileutil::magic::filetype <span class="opt">?1.2.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::magic::filetype</b> <i class="arg">filename</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a command for the recognition of file types in
pure Tcl.</p>
<p>The core part of the recognizer was generated from a &quot;magic(5)&quot; file
containing the checks to perform to recognize files, and associated
file-types.</p>
<p><em>Beware!</em> This recognizer is large, about 752 Kilobyte of
generated Tcl code.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::fileutil::magic::filetype</b> <i class="arg">filename</i></a></dt>
<dd><p>This command is similar to the command <b class="cmd">fileutil::fileType</b>.</p>
<p>Returns a list containing a list of descriptions, a list of mimetype
components, and a list file extensions.  Returns an empty string if the file
content is not recognized.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="ftp://ftp.astron.com/pub/file/">File(1) sources</a>
This site contains the current sources for the file command, including
the magic definitions used by it. The latter were used by us to
generate this recognizer.</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key116">file recognition</a>, <a href="../../../../index.html#key118">file type</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key117">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/fumagic/rtcore.html.















































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327

<div class='fossil-doc' data-title='fileutil::magic::rt - file utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::rt(n) 1.2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::rt - Runtime core for file type recognition engines written in pure Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">NUMERIC TYPES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">fileutil::magic::rt <span class="opt">?1.2.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::magic::rt::&gt;</b></a></li>
<li><a href="#2"><b class="cmd">::fileutil::magic::rt::&lt;</b></a></li>
<li><a href="#3"><b class="cmd">::fileutil::magic::rt::open</b> <i class="arg">filename</i></a></li>
<li><a href="#4"><b class="cmd">::fileutil::magic::rt::close</b></a></li>
<li><a href="#5"><b class="cmd">::fileutil::magic::rt::file_start</b> <i class="arg">name</i></a></li>
<li><a href="#6"><b class="cmd">::fileutil::magic::rt::result</b> <span class="opt">?<i class="arg">msg</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::fileutil::magic::rt::resultv</b> <span class="opt">?<i class="arg">msg</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::fileutil::magic::rt::emit</b> <i class="arg">msg</i></a></li>
<li><a href="#9"><b class="cmd">::fileutil::magic::rt::offset</b> <i class="arg">where</i></a></li>
<li><a href="#10"><b class="cmd">::fileutil::magic::rt::Nv</b> <i class="arg">type</i> <i class="arg">offset</i> <span class="opt">?<i class="arg">qual</i>?</span></a></li>
<li><a href="#11"><b class="cmd">::fileutil::magic::rt::N</b> <i class="arg">type</i> <i class="arg">offset</i> <i class="arg">comp</i> <i class="arg">val</i> <span class="opt">?<i class="arg">qual</i>?</span></a></li>
<li><a href="#12"><b class="cmd">::fileutil::magic::rt::Nvx</b> <i class="arg">type</i> <i class="arg">offset</i> <span class="opt">?<i class="arg">qual</i>?</span></a></li>
<li><a href="#13"><b class="cmd">::fileutil::magic::rt::Nx</b> <i class="arg">type</i> <i class="arg">offset</i> <i class="arg">comp</i> <i class="arg">val</i> <span class="opt">?<i class="arg">qual</i>?</span></a></li>
<li><a href="#14"><b class="cmd">::fileutil::magic::rt::S</b> <i class="arg">offset</i> <i class="arg">comp</i> <i class="arg">val</i> <span class="opt">?<i class="arg">qual</i>?</span></a></li>
<li><a href="#15"><b class="cmd">::fileutil::magic::rt::Sx</b> <i class="arg">offset</i> <i class="arg">comp</i> <i class="arg">val</i> <span class="opt">?<i class="arg">qual</i>?</span></a></li>
<li><a href="#16"><b class="cmd">::fileutil::magic::rt::L</b> <i class="arg">newlevel</i></a></li>
<li><a href="#17"><b class="cmd">::fileutil::magic::rt::I</b> <i class="arg">base</i> <i class="arg">type</i> <i class="arg">delta</i></a></li>
<li><a href="#18"><b class="cmd">::fileutil::magic::rt::R</b> <i class="arg">offset</i></a></li>
<li><a href="#19"><b class="cmd">::fileutil::magic::rt::U</b> <i class="arg">fileindex</i> <i class="arg">name</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the runtime core for file type recognition
engines written in pure Tcl and is thus used by all other packages in
this module, i.e. the two frontend packages
<b class="package">fileutil::magic::mimetypes</b> and
<b class="package">fileutil::magic::filetypes</b>, and the two engine compiler
packages <b class="package"><a href="cgen.html">fileutil::magic::cgen</a></b> and
<b class="package"><a href="cfront.html">fileutil::magic::cfront</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::fileutil::magic::rt::&gt;</b></a></dt>
<dd><p>Shorthand for <b class="cmd">incr level</b>.</p></dd>
<dt><a name="2"><b class="cmd">::fileutil::magic::rt::&lt;</b></a></dt>
<dd><p>Shorthand for <b class="cmd">incr level -1</b>.</p></dd>
<dt><a name="3"><b class="cmd">::fileutil::magic::rt::open</b> <i class="arg">filename</i></a></dt>
<dd><p>This command initializes the runtime and prepares the file
<i class="arg">filename</i> for use by the system.
This command has to be invoked first, before any other command of this
package.</p>
<p>The command returns the channel handle of the opened file as its
result.</p></dd>
<dt><a name="4"><b class="cmd">::fileutil::magic::rt::close</b></a></dt>
<dd><p>This command closes the last file opened via
<b class="cmd">::fileutil::magic::rt::open</b> and shuts the runtime down.
This command has to be invoked last, after the file has been dealt
with completely.
Afterward another invokation of <b class="cmd">::fileutil::magic::rt::open</b>  is
required to process another file.</p>
<p>This command returns the empty string as its result.</p></dd>
<dt><a name="5"><b class="cmd">::fileutil::magic::rt::file_start</b> <i class="arg">name</i></a></dt>
<dd><p>This command marks the start of a magic file when debugging. It
returns the empty string as its result.</p></dd>
<dt><a name="6"><b class="cmd">::fileutil::magic::rt::result</b> <span class="opt">?<i class="arg">msg</i>?</span></a></dt>
<dd><p>This command returns the current result and stops processing.</p>
<p>If <i class="arg">msg</i> is specified its text is added to the result before it is
returned. See <b class="cmd">::fileutil::magic::rt::emit</b> for the allowed
special character sequences.</p></dd>
<dt><a name="7"><b class="cmd">::fileutil::magic::rt::resultv</b> <span class="opt">?<i class="arg">msg</i>?</span></a></dt>
<dd><p>This command returns the current result.
In contrast to <b class="cmd">::fileutil::magic::rt::result</b> processing
continues.</p>
<p>If <i class="arg">msg</i> is specified its text is added to the result before it is
returned. See <b class="cmd">::fileutil::magic::rt::emit</b> for the allowed
special character sequences.</p></dd>
<dt><a name="8"><b class="cmd">::fileutil::magic::rt::emit</b> <i class="arg">msg</i></a></dt>
<dd><p>This command adds the text <i class="arg">msg</i> to the result buffer. The
message may contain the following special character sequences. They
will be replaced with buffered values before the message is added to
the result. The command returns the empty string as its result.</p>
<dl class="doctools_definitions">
<dt><b class="const">\b</b></dt>
<dd><p>This sequence is removed</p></dd>
<dt><b class="const">%s</b></dt>
<dd><p>Replaced with the last buffered string value.</p></dd>
<dt><b class="const">%ld</b></dt>
<dd><p>Replaced with the last buffered numeric value.</p></dd>
<dt><b class="const">%d</b></dt>
<dd><p>See above.</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::fileutil::magic::rt::Nv</b> <i class="arg">type</i> <i class="arg">offset</i> <span class="opt">?<i class="arg">qual</i>?</span></a></dt>
<dd><p>This command fetches the numeric value with <i class="arg">type</i> from the
absolute location <i class="arg">offset</i> and returns it as its result. The
fetched value is further stored in the numeric buffer.</p>
<p>If <i class="arg">qual</i> is specified it is considered to be a mask and applied
to the fetched value before it is stored and returned. It has to have
the form of a partial Tcl bit-wise expression, i.e.</p>
<pre class="doctools_example">
	&amp; number
</pre>
<p>For example:</p>
<pre class="doctools_example">
	Nv lelong 0 &amp;0x8080ffff
</pre>
<p>For the possible types see section <span class="sectref"><a href="#section3">NUMERIC TYPES</a></span>.</p></dd>
<dt><a name="11"><b class="cmd">::fileutil::magic::rt::N</b> <i class="arg">type</i> <i class="arg">offset</i> <i class="arg">comp</i> <i class="arg">val</i> <span class="opt">?<i class="arg">qual</i>?</span></a></dt>
<dd><p>This command behaves mostly like <b class="cmd">::fileutil::magic::rt::Nv</b>,
except that it compares the fetched and masked value against <i class="arg">val</i>
as specified with <i class="arg">comp</i> and returns the result of that
comparison.</p>
<p>The argument <i class="arg">comp</i> has to contain one of Tcl's comparison
operators, and the comparison made will be</p>
<pre class="doctools_example">
	&lt;val&gt; &lt;comp&gt; &lt;fetched-and-masked-value&gt;
</pre>
<p>The special comparison operator <b class="const">x</b> signals that no comparison
should be done, or, in other words, that the fetched value will always
match <i class="arg">val</i>.</p></dd>
<dt><a name="12"><b class="cmd">::fileutil::magic::rt::Nvx</b> <i class="arg">type</i> <i class="arg">offset</i> <span class="opt">?<i class="arg">qual</i>?</span></a></dt>
<dd><p>This command behaves like <b class="cmd">::fileutil::magic::rt::Nv</b>, except that
it additionally remembers the location in the file after the fetch in
the calling context, for the current level, for later use by
<b class="cmd">::fileutil::magic::rt::R</b>.</p></dd>
<dt><a name="13"><b class="cmd">::fileutil::magic::rt::Nx</b> <i class="arg">type</i> <i class="arg">offset</i> <i class="arg">comp</i> <i class="arg">val</i> <span class="opt">?<i class="arg">qual</i>?</span></a></dt>
<dd><p>This command behaves like <b class="cmd">::fileutil::magic::rt::N</b>, except that
it additionally remembers the location in the file after the fetch in
the calling context, for the current, for later use by
<b class="cmd">::fileutil::magic::rt::R</b>.</p></dd>
<dt><a name="14"><b class="cmd">::fileutil::magic::rt::S</b> <i class="arg">offset</i> <i class="arg">comp</i> <i class="arg">val</i> <span class="opt">?<i class="arg">qual</i>?</span></a></dt>
<dd><p>This command behaves like <b class="cmd">::fileutil::magic::rt::N</b>, except that
it fetches and compares strings, not numeric data. The fetched value
is also stored in the internal string buffer instead of the numeric
buffer.</p></dd>
<dt><a name="15"><b class="cmd">::fileutil::magic::rt::Sx</b> <i class="arg">offset</i> <i class="arg">comp</i> <i class="arg">val</i> <span class="opt">?<i class="arg">qual</i>?</span></a></dt>
<dd><p>This command behaves like <b class="cmd">::fileutil::magic::rt::S</b>, except that
it additionally remembers the location in the file after the fetch in
the calling context, for the current level, for later use by
<b class="cmd">::fileutil::magic::rt::R</b>.</p></dd>
<dt><a name="16"><b class="cmd">::fileutil::magic::rt::L</b> <i class="arg">newlevel</i></a></dt>
<dd><p>This command sets the current level in the calling context to
<i class="arg">newlevel</i>. The command returns the empty string as its result.</p></dd>
<dt><a name="17"><b class="cmd">::fileutil::magic::rt::I</b> <i class="arg">base</i> <i class="arg">type</i> <i class="arg">delta</i></a></dt>
<dd><p>This command handles base locations specified indirectly through the
contents of the inspected file. It returns the sum of <i class="arg">delta</i> and
the value of numeric <i class="arg">type</i> fetched from the absolute location
<i class="arg">base</i>.</p>
<p>For the possible types see section <span class="sectref"><a href="#section3">NUMERIC TYPES</a></span>.</p></dd>
<dt><a name="18"><b class="cmd">::fileutil::magic::rt::R</b> <i class="arg">offset</i></a></dt>
<dd><p>This command handles base locations specified relative to the end of
the last field one level above.</p>
<p>In other words, the command computes an absolute location in the file
based on the relative <i class="arg">offset</i> and returns it as its result. The
base the offset is added to is the last location remembered for the
level in the calling context.</p></dd>
<dt><a name="19"><b class="cmd">::fileutil::magic::rt::U</b> <i class="arg">fileindex</i> <i class="arg">name</i></a></dt>
<dd><p>Use a named test script at the current level.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">NUMERIC TYPES</a></h2>
<dl class="doctools_definitions">
<dt><b class="const">byte</b></dt>
<dd><p>8-bit integer</p></dd>
<dt><b class="const">short</b></dt>
<dd><p>16-bit integer, stored in native endianess</p></dd>
<dt><b class="const">beshort</b></dt>
<dd><p>see above, stored in big endian</p></dd>
<dt><b class="const">leshort</b></dt>
<dd><p>see above, stored in small/little endian</p></dd>
<dt><b class="const">long</b></dt>
<dd><p>32-bit integer, stored in native endianess</p></dd>
<dt><b class="const">belong</b></dt>
<dd><p>see above, stored in big endian</p></dd>
<dt><b class="const">lelong</b></dt>
<dd><p>see above, stored in small/little endian</p></dd>
</dl>
<p>All of the types above exit in an unsigned form as well. The type
names are the same, with the character &quot;u&quot; added as prefix.</p>
<dl class="doctools_definitions">
<dt><b class="const">date</b></dt>
<dd><p>32-bit integer timestamp, stored in native endianess</p></dd>
<dt><b class="const">bedate</b></dt>
<dd><p>see above, stored in big endian</p></dd>
<dt><b class="const">ledate</b></dt>
<dd><p>see above, stored in small/little endian</p></dd>
<dt><b class="const">ldate</b></dt>
<dd><p>32-bit integer timestamp, stored in native endianess</p></dd>
<dt><b class="const">beldate</b></dt>
<dd><p>see above, stored in big endian</p></dd>
<dt><b class="const">leldate</b></dt>
<dd><p>see above, stored in small/little endian</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key116">file recognition</a>, <a href="../../../../index.html#key118">file type</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key230">mime</a>, <a href="../../../../index.html#key117">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/generator/generator.html.





















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
<div class='fossil-doc' data-title='generator - Tcl Generator Commands'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">generator(n) 0.1 tcllib &quot;Tcl Generator Commands&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>generator - Procedures for creating and using generators.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PRELUDE</a></li>
<li class="doctools_section"><a href="#section4">BUGS, IDEAS, FEEDBACK</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">generator <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">generator</b> <b class="method">define</b> <i class="arg">name</i> <i class="arg">params</i> <i class="arg">body</i></a></li>
<li><a href="#2"><b class="cmd">generator</b> <b class="method">yield</b> <i class="arg">arg</i> <span class="opt">?<i class="arg">args..</i>?</span></a></li>
<li><a href="#3"><b class="cmd">generator</b> <b class="method">foreach</b> <i class="arg">varList</i> <i class="arg">generator</i> <i class="arg">varList</i> <i class="arg">generator</i> <span class="opt">?...?</span> <i class="arg">body</i></a></li>
<li><a href="#4"><b class="cmd">generator</b> <b class="method">next</b> <i class="arg">generator</i> <span class="opt">?<i class="arg">varName..</i>?</span></a></li>
<li><a href="#5"><b class="cmd">generator</b> <b class="method">exists</b> <i class="arg">generator</i></a></li>
<li><a href="#6"><b class="cmd">generator</b> <b class="method">names</b></a></li>
<li><a href="#7"><b class="cmd">generator</b> <b class="method">destroy</b> <span class="opt">?<i class="arg">generator..</i>?</span></a></li>
<li><a href="#8"><b class="cmd">generator</b> <b class="method">finally</b> <i class="arg">cmd</i> <span class="opt">?<i class="arg">arg..</i>?</span></a></li>
<li><a href="#9"><b class="cmd">generator</b> <b class="method">from</b> <i class="arg">format</i> <i class="arg">value</i></a></li>
<li><a href="#10"><b class="cmd">generator</b> <b class="method">to</b> <i class="arg">format</i> <i class="arg">generator</i></a></li>
<li><a href="#11"><b class="cmd">generator</b> <b class="method">map</b> <i class="arg">function</i> <i class="arg">generator</i></a></li>
<li><a href="#12"><b class="cmd">generator</b> <b class="method">filter</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></li>
<li><a href="#13"><b class="cmd">generator</b> <b class="method">reduce</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></li>
<li><a href="#14"><b class="cmd">generator</b> <b class="method">foldl</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></li>
<li><a href="#15"><b class="cmd">generator</b> <b class="method">foldr</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></li>
<li><a href="#16"><b class="cmd">generator</b> <b class="method">all</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></li>
<li><a href="#17"><b class="cmd">generator</b> <b class="method">and</b> <i class="arg">generator</i></a></li>
<li><a href="#18"><b class="cmd">generator</b> <b class="method">any</b> <i class="arg">generator</i></a></li>
<li><a href="#19"><b class="cmd">generator</b> <b class="method">concat</b> <i class="arg">generator</i> <span class="opt">?<i class="arg">generator..</i>?</span></a></li>
<li><a href="#20"><b class="cmd">generator</b> <b class="method">concatMap</b> <i class="arg">function</i> <i class="arg">generator</i></a></li>
<li><a href="#21"><b class="cmd">generator</b> <b class="method">drop</b> <i class="arg">n</i> <i class="arg">generator</i></a></li>
<li><a href="#22"><b class="cmd">generator</b> <b class="method">dropWhile</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></li>
<li><a href="#23"><b class="cmd">generator</b> <b class="method">contains</b> <i class="arg">element</i> <i class="arg">generator</i></a></li>
<li><a href="#24"><b class="cmd">generator</b> <b class="method">foldl1</b> <i class="arg">function</i> <i class="arg">generator</i></a></li>
<li><a href="#25"><b class="cmd">generator</b> <b class="method">foldli</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></li>
<li><a href="#26"><b class="cmd">generator</b> <b class="method">foldri</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></li>
<li><a href="#27"><b class="cmd">generator</b> <b class="method">head</b> <i class="arg">generator</i></a></li>
<li><a href="#28"><b class="cmd">generator</b> <b class="method">tail</b> <i class="arg">generator</i></a></li>
<li><a href="#29"><b class="cmd">generator</b> <b class="method">init</b> <i class="arg">generator</i></a></li>
<li><a href="#30"><b class="cmd">generator</b> <b class="method">takeList</b> <i class="arg">n</i> <i class="arg">generator</i></a></li>
<li><a href="#31"><b class="cmd">generator</b> <b class="method">take</b> <i class="arg">n</i> <i class="arg">generator</i></a></li>
<li><a href="#32"><b class="cmd">generator</b> <b class="method">iterate</b> <i class="arg">function</i> <i class="arg">init</i></a></li>
<li><a href="#33"><b class="cmd">generator</b> <b class="method">last</b> <i class="arg">generator</i></a></li>
<li><a href="#34"><b class="cmd">generator</b> <b class="method">length</b> <i class="arg">generator</i></a></li>
<li><a href="#35"><b class="cmd">generator</b> <b class="method">or</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></li>
<li><a href="#36"><b class="cmd">generator</b> <b class="method">product</b> <i class="arg">generator</i></a></li>
<li><a href="#37"><b class="cmd">generator</b> <b class="method">repeat</b> <i class="arg">n</i> <i class="arg">value..</i></a></li>
<li><a href="#38"><b class="cmd">generator</b> <b class="method">sum</b> <i class="arg">generator</i></a></li>
<li><a href="#39"><b class="cmd">generator</b> <b class="method">takeWhile</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></li>
<li><a href="#40"><b class="cmd">generator</b> <b class="method">splitWhen</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></li>
<li><a href="#41"><b class="cmd">generator</b> <b class="method">scanl</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">generator</b> package provides commands to define and iterate over
generator expressions. A <em>generator</em> is a command that returns a sequence
of values. However, unlike an ordinary command that returns a list, a
generator <em>yields</em> each value and then suspends, allowing subsequent
values to be fetched on-demand. As such, generators can be used to efficiently
iterate over a set of values, without having to generate all answers in-memory.
Generators can be used to iterate over elements of a data structure, or rows
in the result set of a database query, or to decouple producer/consumer software
designs such as parsers and tokenizers, or to implement sophisticated custom
control strategies such as backtracking search. Generators reduce the need to
implement custom control structures, as many such structures can be recast as
generators, leading to both a simpler implementation and a more standardised
interface. The generator mechanism is built on top of the Tcl 8.6 coroutine
mechanism.</p>
<p>The package exports a single ensemble command, <b class="cmd">generator</b>. All
functionality is provided as subcommands of this command. The core subcommands
of the package are <b class="method">define</b>, <b class="method">yield</b>, and <b class="method">foreach</b>. The
<b class="method">define</b> command works like Tcl's <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> command, but creates a
generator procedure; that is, a procedure that returns a generator when called.
The generator itself is a command that can be called multiple times: each time
it returns the next value in the generated series. When the
series has been exhausted, the generator command returns an empty list and then
destroys itself. Rather than manually call a generator, however, the package
also provides a flexible <b class="method">foreach</b> command that loops through the values of
one or more generators. This loop construct mimicks the functionality of the
built-in Tcl <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b> command, including handling multiple return values
and looping over multiple generators at once. Writing a generator is also a
simple task, much like writing a normal procedure: simply use the <b class="method">define</b>
command to define the generator, and then call <b class="method">yield</b> instead of <b class="cmd"><a href="../../../../index.html#key187">return</a></b>.
For example, we can define a generator for looping through the integers
in a particular range:</p>
<pre class="doctools_example">
    generator define range {n m} {
        for {set i $n} {$i &lt;= $m} {incr i} { generator yield $i }
    }
    generator foreach x [range 1 10] {
        puts &quot;x = $x&quot;
    }
</pre>
<p>The above example will print the numbers from 1 to 10 in sequence, as you would
expect. The difference from a normal loop over a list is that the numbers are
only generated as they are needed. If we insert a break into the loop then any
remaining numbers in the sequence would never be generated. To illustrate, we
can define a generator that produces the sequence of natural numbers: an
infinite series. A normal procedure would never return trying to produce this
series as a list. By using a generator we only have to generate those values
which are actually used:</p>
<pre class="doctools_example">
    generator define nats {} {
        while 1 { generator yield [incr nat] }
    }
    generator foreach n [nats] {
        if {$n &gt; 100} { break }
    }
</pre>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">generator</b> <b class="method">define</b> <i class="arg">name</i> <i class="arg">params</i> <i class="arg">body</i></a></dt>
<dd><p>Creates a new generator procedure. The arguments to the command are identical to
those for <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>: a <i class="arg">name</i>, a list of parameters, and a body. The
parameter list format is identical to a procedure. In particular, default values
and the <span class="opt">?args?</span> syntax can be used as usual. Each time the resulting
generator procedure is called it creates a new generator command (coroutine)
that will yield a list of values on each call. Each result from a generator is
guaranteed to be a non-empty list of values. When a generator is exhausted it
returns an empty list and then destroys itself to free up resources. It is an
error to attempt to call an exhausted generator as the command no longer exists.</p></dd>
<dt><a name="2"><b class="cmd">generator</b> <b class="method">yield</b> <i class="arg">arg</i> <span class="opt">?<i class="arg">args..</i>?</span></a></dt>
<dd><p>Used in the definition of a generator, this command returns the next set of
values to the consumer. Once the <b class="method">yield</b> command has been called the
generator will suspend to allow the consumer to process that value. When the
next value is requested, the generator will resume as if the yield command had
just returned, and can continue processing to yield the next result. The
<b class="method">yield</b> command must be called with at least one argument, but can be called with
multiple arguments, in which case this is equivalent to calling <b class="method">yield</b>
once for each argument.</p></dd>
<dt><a name="3"><b class="cmd">generator</b> <b class="method">foreach</b> <i class="arg">varList</i> <i class="arg">generator</i> <i class="arg">varList</i> <i class="arg">generator</i> <span class="opt">?...?</span> <i class="arg">body</i></a></dt>
<dd><p>Loops through one or more generators, assigning the next values to variables and
then executing the loop body. Works much like the built-in <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b>
command, but working with generators rather than lists. Multiple generators can
be iterated over in parallel, and multiple results can be retrieved from a
single generator at once.  Like the built-in <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b>, the loop will
continue until all of the generators have been exhausted: variables for
generators that are exhausted early will be set to the empty string.</p>
<p>The <b class="method">foreach</b> command will automatically clean-up all of the generators
at the end of the loop, regardless of whether the loop terminated early or not.
This behaviour is provided as a convenience to avoid having to explicitly
clean up a generator in the usual cases. Generators can however be destroyed
before the end of the loop, in which case the loop will continue as normal until
all the other generators have been destroyed or exhausted.</p>
<p>The <b class="method">foreach</b> command does not take a snapshot of the generator. Any
changes in the state of the generator made inside the loop or by other code will
affect the state of the loop. In particular, if the code in the loop invokes the
generator to manually retrieve the next element, this element will then be
excluded from the loop, and the next iteration will continue from the element
after that one. Care should be taken to avoid concurrent updates to generators
unless this behaviour is required (e.g., in argument processing).</p></dd>
<dt><a name="4"><b class="cmd">generator</b> <b class="method">next</b> <i class="arg">generator</i> <span class="opt">?<i class="arg">varName..</i>?</span></a></dt>
<dd><p>Manually retrieves the next values from a generator. One value is retrieved for
each variable supplied and assigned to the corresponding variable. If the
generator becomes exhausted at any time then any remaining variables are set to
the empty string.</p></dd>
<dt><a name="5"><b class="cmd">generator</b> <b class="method">exists</b> <i class="arg">generator</i></a></dt>
<dd><p>Returns 1 if the generator (still) exists, or 0 otherwise.</p></dd>
<dt><a name="6"><b class="cmd">generator</b> <b class="method">names</b></a></dt>
<dd><p>Returns a list of all currently existing generator commands.</p></dd>
<dt><a name="7"><b class="cmd">generator</b> <b class="method">destroy</b> <span class="opt">?<i class="arg">generator..</i>?</span></a></dt>
<dd><p>Destroys one or more generators, freeing any associated resources.</p></dd>
<dt><a name="8"><b class="cmd">generator</b> <b class="method">finally</b> <i class="arg">cmd</i> <span class="opt">?<i class="arg">arg..</i>?</span></a></dt>
<dd><p>Used in the definition of a generator procedure, this command arranges for a
resource to be cleaned up whenever the generator is destroyed, either explicitly
or implicitly when the generator is exhausted. This command can be used like a
<b class="method">finally</b> block in the <b class="cmd"><a href="../try/tcllib_try.html">try</a></b> command, except that it is tied to the
life-cycle of the generator rather than to a particular scope. For example, if
we create a generator to iterate over the lines in a text file, we can use
<b class="method">finally</b> to ensure that the file is closed whenever the generator is
destroyed:</p>
<pre class="doctools_example">
    generator define lines file {
        set in [open $file]
        # Ensure file is always closed
        generator finally close $in
        while {[gets $in line] &gt;= 0} {
            generator yield $line
        }
    }
    generator foreach line [lines /etc/passwd] {
        puts &quot;[incr count]: $line&quot;
        if {$count &gt; 10} { break }
    }
    # File will be closed even on early exit
</pre>
<p>If you create a generator that consumes another generator (such as the standard
<b class="method">map</b> and <b class="method">filter</b> generators defined later), then you should use
a <b class="method">finally</b> command to ensure that this generator is destroyed when its
parent is. For example, the <b class="method">map</b> generator is defined as follows:</p>
<pre class="doctools_example">
    generator define map {f xs} {
        generator finally generator destroy $xs
        generator foreach x $xs { generator yield [{*}$f $x] }
    }
</pre>
</dd>
<dt><a name="9"><b class="cmd">generator</b> <b class="method">from</b> <i class="arg">format</i> <i class="arg">value</i></a></dt>
<dd><p>Creates a generator from a data structure. Currently, supported formats are
<b class="option">list</b>, <b class="option">dict</b>, or <b class="option">string</b>. The list format yields each
element in turn. For dictionaries, each key and value are yielded separately.
Finally, strings are yielded a character at a time.</p></dd>
<dt><a name="10"><b class="cmd">generator</b> <b class="method">to</b> <i class="arg">format</i> <i class="arg">generator</i></a></dt>
<dd><p>Converts a generator into a data structure. This is the reverse operation of the
<b class="method">from</b> command, and supports the same data structures. The two operations
obey the following identity laws (where <b class="method">=</b> is interpreted
appropriately):</p>
<pre class="doctools_example">
    [generator to $fmt [generator from $fmt $value]] = $value
    [generator from $fmt [generator to $fmt $gen]]   = $gen
</pre>
</dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PRELUDE</a></h2>
<p>The following commands are provided as a standard library of generator
combinators and functions that perform convenience operations on generators. The
functions in this section are loosely modelled on the equivalent functions from
the Haskell Prelude. <em>Warning:</em> most of the functions in this prelude
destroy any generator arguments they are passed as a side-effect. If you want to
have persistent generators, see the streams library.</p>
<dl class="doctools_definitions">
<dt><a name="11"><b class="cmd">generator</b> <b class="method">map</b> <i class="arg">function</i> <i class="arg">generator</i></a></dt>
<dd><p>Apply a function to every element of a generator, returning a new generator of
the results. This is the classic map function from functional programming,
applied to generators. For example, we can generate all the square numbers using
the following code (where <b class="cmd">nats</b> is defined as earlier):</p>
<pre class="doctools_example">
    proc square x { expr {$x * $x} }
    generator foreach n [generator map square [nats]] {
        puts &quot;n = $n&quot;
        if {$n &gt; 1000} { break }
    }
</pre>
</dd>
<dt><a name="12"><b class="cmd">generator</b> <b class="method">filter</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></dt>
<dd><p>Another classic functional programming gem. This command returns a generator
that yields only those items from the argument generator that satisfy the
predicate (boolean function). For example, if we had a generator <b class="variable">employees</b>
that returned a stream of dictionaries representing people, we could filter all
those whose salaries are above 100,000 dollars (or whichever currency you prefer)
using a simple filter:</p>
<pre class="doctools_example">
    proc salary&gt; {amount person} { expr {[dict get $person salary] &gt; $amount} }
    set fat-cats [generator filter {salary&gt; 100000} $employees]
</pre>
</dd>
<dt><a name="13"><b class="cmd">generator</b> <b class="method">reduce</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></dt>
<dd><p>This is the classic left-fold operation. This command takes a function, an
initial value, and a generator of values. For each element in the generator it
applies the function to the current accumulator value (the <i class="arg">zero</i> argument
initially) and that element, and then uses the result as the new accumulator
value. This process is repeated through the entire generator (eagerly) and the
final accumulator value is then returned. If we consider the function to be a
binary operator, and the zero argument to be the left identity element of that
operation, then we can consider the <b class="method">reduce</b> command as <em>folding</em>
the operator between each successive pair of values in the generator in a
left-associative fashion. For example, the sum of a sequence of numbers can be
calculated by folding a <b class="cmd">+</b> operator between them, with 0 as the identity:</p>
<pre class="doctools_example">
    # sum xs          = reduce + 0 xs
    # sum [range 1 5] = reduce + 0 [range 1 5]
    #                 = reduce + [+ 0 1] [range 2 5]
    #                 = reduce + [+ 1 2] [range 3 5]
    #                 = ...
    #                 = reduce + [+ 10 5] &lt;empty&gt;
    #                 = ((((0+1)+2)+3)+4)+5
    #                 = 15
    proc + {a b} { expr {$a + $b} }
    proc sum gen { generator reduce + 0 $gen }
    puts [sum [range 1 10]]
</pre>
<p>The <b class="method">reduce</b> operation is an extremely useful one, and a great variety of
different operations can be defined using it. For example, we can define a
factorial function as the product of a range using generators. This definition
is both very clear and also quite efficient (in both memory and running time):</p>
<pre class="doctools_example">
    proc * {x y} { expr {$x * $y} }
    proc prod gen { generator reduce * 0 $gen }
    proc fac n { prod [range 1 $n] }
</pre>
<p>However, while the <b class="method">reduce</b> operation is efficient for finite generators,
care should be taken not to apply it to an infinite generator, as this will
result in an infinite loop:</p>
<pre class="doctools_example">
    sum [nats]; # Never returns
</pre>
</dd>
<dt><a name="14"><b class="cmd">generator</b> <b class="method">foldl</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></dt>
<dd><p>This is an alias for the <b class="method">reduce</b> command.</p></dd>
<dt><a name="15"><b class="cmd">generator</b> <b class="method">foldr</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></dt>
<dd><p>This is the right-associative version of <b class="method">reduce</b>. This operation is
generally inefficient, as the entire generator needs to be evaluated into memory
(as a list) before the reduction can commence. In an eagerly evaluated language
like Tcl, this operation has limited use, and should be avoided if possible.</p></dd>
<dt><a name="16"><b class="cmd">generator</b> <b class="method">all</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></dt>
<dd><p>Returns true if all elements of the generator satisfy the given predicate.</p></dd>
<dt><a name="17"><b class="cmd">generator</b> <b class="method">and</b> <i class="arg">generator</i></a></dt>
<dd><p>Returns true if all elements of the generator are true (i.e., takes the logical
conjunction of the elements).</p></dd>
<dt><a name="18"><b class="cmd">generator</b> <b class="method">any</b> <i class="arg">generator</i></a></dt>
<dd><p>Returns true if any of the elements of the generator are true (i.e., logical
disjunction).</p></dd>
<dt><a name="19"><b class="cmd">generator</b> <b class="method">concat</b> <i class="arg">generator</i> <span class="opt">?<i class="arg">generator..</i>?</span></a></dt>
<dd><p>Returns a generator which is the concatenation of each of the argument
generators.</p></dd>
<dt><a name="20"><b class="cmd">generator</b> <b class="method">concatMap</b> <i class="arg">function</i> <i class="arg">generator</i></a></dt>
<dd><p>Given a function which maps a value to a series of values, and a generator of
values of that type, returns a generator of all of the results in one flat
series. Equivalent to <b class="method">concat</b> applied to the result of <b class="method">map</b>.</p></dd>
<dt><a name="21"><b class="cmd">generator</b> <b class="method">drop</b> <i class="arg">n</i> <i class="arg">generator</i></a></dt>
<dd><p>Removes the given number of elements from the front of the generator and returns
the resulting generator with those elements removed.</p></dd>
<dt><a name="22"><b class="cmd">generator</b> <b class="method">dropWhile</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></dt>
<dd><p>Removes all elements from the front of the generator that satisfy the predicate.</p></dd>
<dt><a name="23"><b class="cmd">generator</b> <b class="method">contains</b> <i class="arg">element</i> <i class="arg">generator</i></a></dt>
<dd><p>Returns true if the generator contains the given element. Note that this will
destroy the generator!</p></dd>
<dt><a name="24"><b class="cmd">generator</b> <b class="method">foldl1</b> <i class="arg">function</i> <i class="arg">generator</i></a></dt>
<dd><p>A version of <b class="method">foldl</b> that takes the <i class="arg">zero</i> argument from the first
element of the generator. Therefore this function is only valid on non-empty
generators.</p></dd>
<dt><a name="25"><b class="cmd">generator</b> <b class="method">foldli</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></dt>
<dd><p>A version of <b class="method">foldl</b> that supplies the integer index of each element as
the first argument to the function. The first element in the generator at this
point is given index 0.</p></dd>
<dt><a name="26"><b class="cmd">generator</b> <b class="method">foldri</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></dt>
<dd><p>Right-associative version of <b class="method">foldli</b>.</p></dd>
<dt><a name="27"><b class="cmd">generator</b> <b class="method">head</b> <i class="arg">generator</i></a></dt>
<dd><p>Returns the first element of the generator.</p></dd>
<dt><a name="28"><b class="cmd">generator</b> <b class="method">tail</b> <i class="arg">generator</i></a></dt>
<dd><p>Removes the first element of the generator, returning the rest.</p></dd>
<dt><a name="29"><b class="cmd">generator</b> <b class="method">init</b> <i class="arg">generator</i></a></dt>
<dd><p>Returns a new generator consisting of all elements except the last of the
argument generator.</p></dd>
<dt><a name="30"><b class="cmd">generator</b> <b class="method">takeList</b> <i class="arg">n</i> <i class="arg">generator</i></a></dt>
<dd><p>Returns the next <i class="arg">n</i> elements of the generator as a list. If not enough
elements are left in the generator, then just the remaining elements are
returned.</p></dd>
<dt><a name="31"><b class="cmd">generator</b> <b class="method">take</b> <i class="arg">n</i> <i class="arg">generator</i></a></dt>
<dd><p>Returns the next <i class="arg">n</i> elements of the generator as a new generator. The old
generator is destroyed.</p></dd>
<dt><a name="32"><b class="cmd">generator</b> <b class="method">iterate</b> <i class="arg">function</i> <i class="arg">init</i></a></dt>
<dd><p>Returns an infinite generator formed by repeatedly applying the function to the
initial argument. For example, the Fibonacci numbers can be defined as follows:</p>
<pre class="doctools_example">
    proc fst pair { lindex $pair 0 }
    proc snd pair { lindex $pair 1 }
    proc nextFib ab { list [snd $ab] [expr {[fst $ab] + [snd $ab]}] }
    proc fibs {} { generator map fst [generator iterate nextFib {0 1}] }
</pre>
</dd>
<dt><a name="33"><b class="cmd">generator</b> <b class="method">last</b> <i class="arg">generator</i></a></dt>
<dd><p>Returns the last element of the generator (if it exists).</p></dd>
<dt><a name="34"><b class="cmd">generator</b> <b class="method">length</b> <i class="arg">generator</i></a></dt>
<dd><p>Returns the length of the generator, destroying it in the process.</p></dd>
<dt><a name="35"><b class="cmd">generator</b> <b class="method">or</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></dt>
<dd><p>Returns 1 if any of the elements of the generator satisfy the predicate.</p></dd>
<dt><a name="36"><b class="cmd">generator</b> <b class="method">product</b> <i class="arg">generator</i></a></dt>
<dd><p>Returns the product of the numbers in a generator.</p></dd>
<dt><a name="37"><b class="cmd">generator</b> <b class="method">repeat</b> <i class="arg">n</i> <i class="arg">value..</i></a></dt>
<dd><p>Returns a generator that consists of <i class="arg">n</i> copies of the given elements. The
special value <em>Inf</em> can be used to generate an infinite sequence.</p></dd>
<dt><a name="38"><b class="cmd">generator</b> <b class="method">sum</b> <i class="arg">generator</i></a></dt>
<dd><p>Returns the sum of the values in the generator.</p></dd>
<dt><a name="39"><b class="cmd">generator</b> <b class="method">takeWhile</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></dt>
<dd><p>Returns a generator of the first elements in the argument generator that satisfy
the predicate.</p></dd>
<dt><a name="40"><b class="cmd">generator</b> <b class="method">splitWhen</b> <i class="arg">predicate</i> <i class="arg">generator</i></a></dt>
<dd><p>Splits the generator into lists of elements using the predicate to identify
delimiters. The resulting lists are returned as a generator. Elements matching
the delimiter predicate are discarded. For example, to split up a generator
using the string &quot;|&quot; as a delimiter:</p>
<pre class="doctools_example">
    set xs [generator from list {a | b | c}]
    generator split {string equal &quot;|&quot;} $xs ;# returns a then b then c
</pre>
</dd>
<dt><a name="41"><b class="cmd">generator</b> <b class="method">scanl</b> <i class="arg">function</i> <i class="arg">zero</i> <i class="arg">generator</i></a></dt>
<dd><p>Similar to <b class="method">foldl</b>, but returns a generator of all of the intermediate
values for the accumulator argument. The final element of this generator is
equivalent to <b class="method">foldl</b> called on the same arguments.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">BUGS, IDEAS, FEEDBACK</a></h2>
<p>Please report any errors in this document, or in the package it describes, to
<a href="mailto:nem@cs.nott.ac.uk">Neil Madden</a>.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key224">control structure</a>, <a href="../../../../index.html#key219">coroutine</a>, <a href="../../../../index.html#key223">filter</a>, <a href="../../../../index.html#key221">foldl</a>, <a href="../../../../index.html#key226">foldr</a>, <a href="../../../../index.html#key218">foreach</a>, <a href="../../../../index.html#key225">generator</a>, <a href="../../../../index.html#key222">iterator</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key217">reduce</a>, <a href="../../../../index.html#key220">scanl</a></p>
</div>
</div>

Added embedded/www/tcllib/files/modules/gpx/gpx.html.



















































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265

<div class='fossil-doc' data-title='gpx - GPS eXchange Format (GPX)'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">gpx(n) 0.9 tcllib &quot;GPS eXchange Format (GPX)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>gpx - Extracts waypoints, tracks and routes from GPX files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">DATA STRUCTURES</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLE</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">AUTHOR</a></li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">gpx <span class="opt">?0.9?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::gpx::Create</b> <i class="arg">gpxFilename</i> <span class="opt">?<i class="arg">rawXML</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::gpx::Cleanup</b> <i class="arg">token</i></a></li>
<li><a href="#3"><b class="cmd">::gpx::GetGPXMetadata</b> <i class="arg">token</i></a></li>
<li><a href="#4"><b class="cmd">::gpx::GetWaypointCount</b> <i class="arg">token</i></a></li>
<li><a href="#5"><b class="cmd">::gpx::GetAllWaypoints</b> <i class="arg">token</i></a></li>
<li><a href="#6"><b class="cmd">::gpx::GetTrackCount</b> <i class="arg">token</i></a></li>
<li><a href="#7"><b class="cmd">::gpx::GetTrackMetadata</b> <i class="arg">token</i> <i class="arg">whichTrack</i></a></li>
<li><a href="#8"><b class="cmd">::gpx::GetTrackPoints</b> <i class="arg">token</i> <i class="arg">whichTrack</i></a></li>
<li><a href="#9"><b class="cmd">::gpx::GetRouteCount</b> <i class="arg">token</i></a></li>
<li><a href="#10"><b class="cmd">::gpx::GetRouteMetadata</b> <i class="arg">token</i> <i class="arg">whichRoute</i></a></li>
<li><a href="#11"><b class="cmd">::gpx::GetRoutePoints</b> <i class="arg">token</i> <i class="arg">whichRoute</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This module parses and extracts waypoints, tracks, routes and
metadata from a GPX (GPS eXchange) file. Both GPX version 1.0
and 1.1 are supported.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::gpx::Create</b> <i class="arg">gpxFilename</i> <span class="opt">?<i class="arg">rawXML</i>?</span></a></dt>
<dd><p>The <b class="cmd">::gpx::Create</b> is the first command called to process GPX
data. It takes the GPX data from either the <i class="arg">rawXML</i>
parameter if present or from the contents of <i class="arg">gpxFilename</i>,
and parses it using <em>tdom</em>. It returns a token value that is used
by all the other commands.</p></dd>
<dt><a name="2"><b class="cmd">::gpx::Cleanup</b> <i class="arg">token</i></a></dt>
<dd><p>This procedure cleans up resources associated with <i class="arg">token</i>.
It is <em>strongly</em> recommended that you call this
function after you are done with a given GPX file.
Not doing so will result in memory not being freed, and
if your app calls <b class="cmd">::gpx::Create</b> enough times, the
memory leak could cause a performance hit...or worse.</p></dd>
<dt><a name="3"><b class="cmd">::gpx::GetGPXMetadata</b> <i class="arg">token</i></a></dt>
<dd><p>This procedure returns a dictionary of the metadata
associated with the GPX data identified by <i class="arg">token</i>.
The format of the metadata dictionary is described
below, but keys <em>version</em> and <em>creator</em>
will always be present.</p></dd>
<dt><a name="4"><b class="cmd">::gpx::GetWaypointCount</b> <i class="arg">token</i></a></dt>
<dd><p>This procedure returns the number of waypoints defined in the GPX
data identified by <i class="arg">token</i>.</p></dd>
<dt><a name="5"><b class="cmd">::gpx::GetAllWaypoints</b> <i class="arg">token</i></a></dt>
<dd><p>This procedure returns the a list of waypoints defined in the GPX
data identified by <i class="arg">token</i>. The format of each waypoint item
is described below.</p></dd>
<dt><a name="6"><b class="cmd">::gpx::GetTrackCount</b> <i class="arg">token</i></a></dt>
<dd><p>This procedure returns the number of tracks defined in the GPX
data identified by <i class="arg">token</i>.</p></dd>
<dt><a name="7"><b class="cmd">::gpx::GetTrackMetadata</b> <i class="arg">token</i> <i class="arg">whichTrack</i></a></dt>
<dd><p>This procedure returns a dictionary of the metadata
associated track number <i class="arg">whichTrack</i> (1 based) in
the GPX data identified by <i class="arg">token</i>.
The format of the metadata dictionary is described below.</p></dd>
<dt><a name="8"><b class="cmd">::gpx::GetTrackPoints</b> <i class="arg">token</i> <i class="arg">whichTrack</i></a></dt>
<dd><p>The procedure returns a list of track points comprising track
number <i class="arg">whichTrack</i> (1 based) in the GPX data identified by
<i class="arg">token</i>. The format of the metadata dictionary is described below.</p></dd>
<dt><a name="9"><b class="cmd">::gpx::GetRouteCount</b> <i class="arg">token</i></a></dt>
<dd><p>This procedure returns the number of routes defined in the GPX
data identified by <i class="arg">token</i>.</p></dd>
<dt><a name="10"><b class="cmd">::gpx::GetRouteMetadata</b> <i class="arg">token</i> <i class="arg">whichRoute</i></a></dt>
<dd><p>This procedure returns a dictionary of the metadata
associated route number <i class="arg">whichRoute</i> (1 based) in
the GPX data identified by <i class="arg">token</i>.
The format of the metadata dictionary is described below.</p></dd>
<dt><a name="11"><b class="cmd">::gpx::GetRoutePoints</b> <i class="arg">token</i> <i class="arg">whichRoute</i></a></dt>
<dd><p>The procedure returns a list of route points comprising route
number <i class="arg">whichRoute</i> (1 based) in the GPX data identified by
<i class="arg">token</i>. The format of the metadata dictionary is described below.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">DATA STRUCTURES</a></h2>
<dl class="doctools_definitions">
<dt>metadata dictionary</dt>
<dd><p>The metadata associated with either the GPX document, a
track, a route, a waypoint, a track point or route
point is returned in a dictionary. The keys of that
dictionary will be whatever optional GPX elements are
present. The value for each key depends on the GPX schema
for that element. For example, the value for a version
key will be a string, while for a link key will be
a sub-dictionary with keys <em>href</em> and optionally
<em>text</em> and <em>type</em>.</p></dd>
<dt>point item</dt>
<dd><p>Each item in a track or route list of points consists of
a list of three elements: <em>latitude</em>, <em>longitude</em> and
<em>metadata dictionary</em>. <em>Latitude</em> and <em>longitude</em>
are decimal numbers. The <em>metadata dictionary</em> format is
described above. For points in a track, typically there will
always be ele (elevation) and time metadata keys.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLE</a></h2>
<pre class="doctools_example">
% set token [::gpx::Create myGpxFile.gpx]
% set version [dict get [::gpx::GetGPXMetadata $token] version]
% set trackCnt [::gpx::GetTrackCount $token]
% set firstPoint [lindex [::gpx::GetTrackPoints $token 1] 0]
% lassign $firstPoint lat lon ptMetadata
% puts &quot;first point in the first track is at $lat, $lon&quot;
% if {[dict exists $ptMetadata ele]} {
     puts &quot;at elevation [dict get $ptMetadata ele] meters&quot;
  }
% ::gpx::Cleanup $token
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>GPX: the GPS Exchange Format
   (<a href="http://www.topografix.com/gpx.asp">http://www.topografix.com/gpx.asp</a>)</p></li>
<li><p>GPX 1.1 Schema Documentation (<a href="http://www.topografix.com/GPX/1/1/">http://www.topografix.com/GPX/1/1/</a>)</p></li>
<li><p>GPX 1.0 Developer's Manual (<a href="http://www.topografix.com/gpx_manual.asp">http://www.topografix.com/gpx_manual.asp</a>)</p></li>
</ol>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">AUTHOR</a></h2>
<p>Keith Vetter</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>gpx</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key408">gps</a>, <a href="../../../../index.html#key669">gpx</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, Keith Vetter &lt;kvetter@gmail.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_aycock/aycock.html.

































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240

<div class='fossil-doc' data-title='grammar::aycock - Aycock-Horspool-Earley parser generator for Tcl'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::aycock(n) 1.0 tcllib &quot;Aycock-Horspool-Earley parser generator for Tcl&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::aycock - Aycock-Horspool-Earley parser generator for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">OBJECT COMMAND</a></li>
<li class="doctools_section"><a href="#section4">DESCRIPTION</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLE</a></li>
<li class="doctools_section"><a href="#section6">KEYWORDS</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">grammar::aycock <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::aycock::parser</b> <i class="arg">grammar</i> <span class="opt">?<b class="option">-verbose</b>?</span></a></li>
<li><a href="#2"><i class="arg">parserName</i> <b class="method">parse</b> <i class="arg">symList</i> <i class="arg">valList</i> <span class="opt">?<i class="arg">clientData</i>?</span></a></li>
<li><a href="#3"><i class="arg">parserName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">parserName</i> <b class="method">terminals</b></a></li>
<li><a href="#5"><i class="arg">parserName</i> <b class="method">nonterminals</b></a></li>
<li><a href="#6"><i class="arg">parserName</i> <b class="method">save</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">grammar::aycock</b> package
implements a parser generator for the class of parsers described
in John Aycock and R. Nigel Horspool. Practical Earley Parsing.
<em>The Computer Journal,</em> <em>45</em>(6):620-630, 2002.
<a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.12.4254">http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.12.4254</a></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The <b class="package">grammar::aycock</b> package exports the single procedure:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::aycock::parser</b> <i class="arg">grammar</i> <span class="opt">?<b class="option">-verbose</b>?</span></a></dt>
<dd><p>Generates a parser for the given <i class="arg">grammar</i>, and returns its
name.  If the optional <b class="option">-verbose</b> flag is given, dumps verbose
information relating to the generated parser to the standard output.
The returned parser is an object that accepts commands as shown in
<span class="sectref"><a href="#section3">OBJECT COMMAND</a></span> below.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">OBJECT COMMAND</a></h2>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">parserName</i> <b class="method">parse</b> <i class="arg">symList</i> <i class="arg">valList</i> <span class="opt">?<i class="arg">clientData</i>?</span></a></dt>
<dd><p>Invokes a parser returned from <b class="cmd">::aycock::parser</b>. <i class="arg">symList</i> is
a list of grammar symbols representing the terminals in an input
string, and <i class="arg">valList</i> is a list of their semantic values. The
result is the semantic value of the entire string when parsed.</p></dd>
<dt><a name="3"><i class="arg">parserName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys a parser constructed by <b class="cmd">::aycock::parser</b>.</p></dd>
<dt><a name="4"><i class="arg">parserName</i> <b class="method">terminals</b></a></dt>
<dd><p>Returns a list of terminal symbols that may be presented in the
<i class="arg">symList</i> argument to the <b class="method">parse</b> object command.</p></dd>
<dt><a name="5"><i class="arg">parserName</i> <b class="method">nonterminals</b></a></dt>
<dd><p>Returns a list of nonterminal symbols that were defined in the
parser's grammar.</p></dd>
<dt><a name="6"><i class="arg">parserName</i> <b class="method">save</b></a></dt>
<dd><p>Returns a Tcl script that will reconstruct the parser without
needing all the mechanism of the parser generator at run time.
The reconstructed parser depends on a set of commands in the
package <b class="package">grammar::aycock::runtime</b>,
which is also automatically loaded
when the <b class="package">grammar::aycock</b> package is loaded.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">DESCRIPTION</a></h2>
<p>The <b class="cmd">grammar::aycock::parser</b> command accepts a grammar expressed as
a Tcl list.  The list must be structured as the concatenation of a set
of <i class="term">rule</i>s. Each <i class="term">rule</i> comprises a variable number of
elements in the list:</p>
<ul class="doctools_itemized">
<li><p>The name of the nonterminal symbol that the rule reduces.</p></li>
<li><p>The literal string, <b class="const">::=</b></p></li>
<li><p>Zero or more names of terminal or nonterminal symbols that
comprise the right-hand-side of the rule.</p></li>
<li><p>Finally, a Tcl script to execute when the rule is reduced.
Within the given script, a variable called <b class="variable">_</b> contains a list of
the semantic values of the symbols on the right-hand side. The value
returned by the script is expected to be the semantic value of the
left-hand side.  If the <i class="arg">clientData</i> parameter was passed to the
<b class="method">parse</b> method, it is available in a variable called
<b class="variable">clientData</b>.  It is permissible for the script to be the empty
string.  In this case, the semantic value of the rule will be the same
as the semantic value of the first symbol on the right-hand side.  If
the right-hand side is also empty, the semantic value will be the
empty string.</p></li>
</ul>
<p>Parsing is done with an Earley parser, which is not terribly efficient
in speed or memory consumption, but which deals effectively with
ambiguous grammars.  For this reason, the <b class="package">grammar::aycock</b> package is
perhaps best adapted to natural-language processing or the parsing of
extraordinarily complex languages in which ambiguity can be tolerated.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLE</a></h2>
<p>The following code demonstrates a trivial desk calculator, admitting
only <b class="const">+</b>, <b class="const">*</b> and parentheses as its operators.  It also
shows the format in which the lexical analyzer is expected to present
terminal symbols to the parser.</p>
<pre class="doctools_example">
set p [aycock::parser {
    start ::= E {}
    E ::= E + T {expr {[lindex $_ 0] + [lindex $_ 2]}}
    E ::= T {}
    T ::= T * F {expr {[lindex $_ 0] * [lindex $_ 2]}}
    T ::= F {}
    F ::= NUMBER {}
    F ::= ( E ) {lindex $_ 1}
}]
puts [$p parse {(  NUMBER +  NUMBER )  *  ( NUMBER +  NUMBER ) }  {{} 2      {} 3      {} {} {} 7     {} 1      {}}]
$p destroy
</pre>
<p>The example, when run, prints <b class="const">40</b>.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">KEYWORDS</a></h2>
<p>Aycock, Earley, Horspool, parser, compiler</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key823">ambiguous</a>, <a href="../../../../index.html#key826">aycock</a>, <a href="../../../../index.html#key825">earley</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key824">horspool</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 by Kevin B. Kenny &lt;kennykb@acm.org&gt;<br>
Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_fa/dacceptor.html.





















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202

<div class='fossil-doc' data-title='grammar::fa::dacceptor - Finite automaton operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa::dacceptor(n) 0.1.1 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa::dacceptor - Create and use deterministic acceptors</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">ACCEPTOR METHODS</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">grammar::fa::dacceptor <span class="opt">?0.1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::fa::dacceptor</b> <i class="arg">daName</i> <i class="arg">fa</i> <span class="opt">?<b class="option">-any</b> <i class="arg">any</i>?</span></a></li>
<li><a href="#2"><b class="cmd">daName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">daName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">daName</i> <b class="method">accept?</b> <i class="arg">symbols</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for acceptors constructed from
deterministic <i class="term">finite automatons</i> (DFA). Acceptors are objects
which can be given a string of symbols and tell if the DFA they are
constructed from would <i class="term">accept</i> that string.
For the actual creation of the DFAs the acceptors are based on we have
the packages <b class="package"><a href="fa.html">grammar::fa</a></b> and <b class="package"><a href="faop.html">grammar::fa::op</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports the API described here.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::fa::dacceptor</b> <i class="arg">daName</i> <i class="arg">fa</i> <span class="opt">?<b class="option">-any</b> <i class="arg">any</i>?</span></a></dt>
<dd><p>Creates a new deterministic acceptor with an associated global Tcl command
whose name is <i class="arg">daName</i>. This command may be used to invoke various
operations on the acceptor. It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">daName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command. See section <span class="sectref"><a href="#section3">ACCEPTOR METHODS</a></span> for more explanations.</p>
<p>The acceptor will be based on the deterministic finite automaton
stored in the object <i class="arg">fa</i>. It will keep a copy of the relevant
data of the FA in its own storage, in a form easy to use for its
purposes. This also means that changes made to the <i class="arg">fa</i> after the
construction of the acceptor <em>will not</em> influence the acceptor.</p>
<p>If <i class="arg">any</i> has been specified, then the acceptor will convert all
symbols in the input which are unknown to the base FA to that symbol
before proceeding with the processing.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">ACCEPTOR METHODS</a></h2>
<p>All acceptors provide the following methods for their manipulation:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">daName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the automaton, including its storage space and associated
command.</p></dd>
<dt><a name="4"><i class="arg">daName</i> <b class="method">accept?</b> <i class="arg">symbols</i></a></dt>
<dd><p>Takes the list of <i class="arg">symbols</i> and checks if the FA the acceptor is
based on would accept it. The result is a boolean value. <b class="const">True</b>
is returned if the symbols are accepted, and <b class="const">False</b>
otherwise. Note that bogus symbols in the input are either translated
to the <i class="arg">any</i> symbol (if specified), or cause the acceptance test
to simply fail. No errors will be thrown. The method will process only
just that prefix of the input which is enough to fully determine
(non-)acceptance.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key326">acceptance</a>, <a href="../../../../index.html#key323">acceptor</a>, <a href="../../../../index.html#key320">automaton</a>, <a href="../../../../index.html#key325">finite automaton</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key322">regular grammar</a>, <a href="../../../../index.html#key321">regular languages</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_fa/dexec.html.







































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259

<div class='fossil-doc' data-title='grammar::fa::dexec - Finite automaton operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa::dexec(n) 0.2 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa::dexec - Execute deterministic finite automatons</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">EXECUTOR METHODS</a></li>
<li class="doctools_section"><a href="#section4">EXECUTOR CALLBACK</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">grammar::fa::dexec <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::fa::dexec</b> <i class="arg">daName</i> <i class="arg">fa</i> <span class="opt">?<b class="option">-any</b> <i class="arg">any</i>?</span> <span class="opt">?<b class="option">-command</b> <i class="arg">cmdprefix</i>?</span></a></li>
<li><a href="#2"><b class="cmd">daName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">daName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">daName</i> <b class="method">put</b> <i class="arg">symbol</i></a></li>
<li><a href="#5"><i class="arg">daName</i> <b class="method">reset</b></a></li>
<li><a href="#6"><i class="arg">daName</i> <b class="method">state</b></a></li>
<li><a href="#7"><i class="arg">cmdprefix</i> <b class="method">error</b> <i class="arg">code</i> <i class="arg">message</i></a></li>
<li><a href="#8"><i class="arg">cmdprefix</i> <b class="method">final</b> <i class="arg">stateid</i></a></li>
<li><a href="#9"><i class="arg">cmdprefix</i> <b class="method">reset</b></a></li>
<li><a href="#10"><i class="arg">cmdprefix</i> <b class="method">state</b> <i class="arg">stateid</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for executors constructed from
deterministic <i class="term">finite automatons</i> (DFA). Executors are objects
which are given a string of symbols in a piecemal fashion, perform
state transitions and report back when they enter a final state, or
find an error in the input.
For the actual creation of the DFAs the executors are based on we have
the packages <b class="package"><a href="fa.html">grammar::fa</a></b> and <b class="package"><a href="faop.html">grammar::fa::op</a></b>.</p>
<p>The objects follow a push model. Symbols are pushed into the executor,
and when something important happens, i.e. error occurs, a state transition,
or a final state is entered this will be reported via the callback
specified via the option <b class="option">-command</b>. Note that conversion of
this into a pull model where the environment retrieves messages from
the object and the object uses a callback to ask for more symbols is
a trivial thing.</p>
<p><em>Side note</em>:
The acceptor objects provided by <b class="package"><a href="dacceptor.html">grammar::fa::dacceptor</a></b>
could have been implemented on top of the executors provided here, but
were not, to get a bit more performance (we avoid a number of method
calls and the time required for their dispatch).</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports the API described here.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::fa::dexec</b> <i class="arg">daName</i> <i class="arg">fa</i> <span class="opt">?<b class="option">-any</b> <i class="arg">any</i>?</span> <span class="opt">?<b class="option">-command</b> <i class="arg">cmdprefix</i>?</span></a></dt>
<dd><p>Creates a new deterministic executor with an associated global Tcl
command whose name is <i class="arg">daName</i>. This command may be used to invoke
various operations on the executor. It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">daName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command. See section <span class="sectref"><a href="#section3">EXECUTOR METHODS</a></span> for more
explanations.</p>
<p>The executor will be based on the deterministic finite automaton
stored in the object <i class="arg">fa</i>. It will keep a copy of the relevant
data of the FA in its own storage, in a form easy to use for its
purposes. This also means that changes made to the <i class="arg">fa</i> after the
construction of the executor <em>will not</em> influence the executor.</p>
<p>If <i class="arg">any</i> has been specified, then the executor will convert all
symbols in the input which are unknown to the base FA to that symbol
before proceeding with the processing.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXECUTOR METHODS</a></h2>
<p>All executors provide the following methods for their manipulation:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">daName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the automaton, including its storage space and associated
command.</p></dd>
<dt><a name="4"><i class="arg">daName</i> <b class="method">put</b> <i class="arg">symbol</i></a></dt>
<dd><p>Takes the current state of the executor and the <i class="arg">symbol</i> and
performs the appropriate state transition. Reports any errors
encountered via the command callback, as well as entering a final
state of the underlying FA.</p>
<p>When an error is reported all further invokations of <b class="method">put</b> will
do nothing, until the error condition has been cleared via an
invokation of method <b class="method">reset</b>.</p></dd>
<dt><a name="5"><i class="arg">daName</i> <b class="method">reset</b></a></dt>
<dd><p>Unconditionally sets the executor into the start state of the
underlying FA. This also clears any error condition  <b class="method">put</b> may
have encountered.</p></dd>
<dt><a name="6"><i class="arg">daName</i> <b class="method">state</b></a></dt>
<dd><p>Returns the current state of the underlying FA. This allow for
introspection without the need to pass data from the callback command.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXECUTOR CALLBACK</a></h2>
<p>The callback command <i class="arg">cmdprefix</i> given to an executor via the
option <b class="option">-command</b> will be executed by the object at the global
level, using the syntax described below. Note that <i class="arg">cmdprefix</i> is
not simply the name of a command, but a full command prefix. In other
words it may contain additional fixed argument words beyond the
command word.</p>
<dl class="doctools_definitions">
<dt><a name="7"><i class="arg">cmdprefix</i> <b class="method">error</b> <i class="arg">code</i> <i class="arg">message</i></a></dt>
<dd><p>The executor has encountered an error, and <i class="arg">message</i> contains a
human-readable text explaining the nature of the problem.
The <i class="arg">code</i> on the other hand is a fixed machine-readable text.
The following error codes can be generated by executor objects.</p>
<dl class="doctools_definitions">
<dt><b class="const">BADSYM</b></dt>
<dd><p>An unknown symbol was found in the input. This can happen if and only
if no <b class="option">-any</b> symbol was specified.</p></dd>
<dt><b class="const">BADTRANS</b></dt>
<dd><p>The underlying FA has no transition for the current combination of
input symbol and state. In other words, the executor was not able to
compute a new state for this combination.</p></dd>
</dl></dd>
<dt><a name="8"><i class="arg">cmdprefix</i> <b class="method">final</b> <i class="arg">stateid</i></a></dt>
<dd><p>The executor has entered the final state <i class="arg">stateid</i>.</p></dd>
<dt><a name="9"><i class="arg">cmdprefix</i> <b class="method">reset</b></a></dt>
<dd><p>The executor was reset.</p></dd>
<dt><a name="10"><i class="arg">cmdprefix</i> <b class="method">state</b> <i class="arg">stateid</i></a></dt>
<dd><p>The FA changed state due to a transition. <i class="arg">stateid</i> is the new state.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key320">automaton</a>, <a href="../../../../index.html#key430">execution</a>, <a href="../../../../index.html#key325">finite automaton</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key322">regular grammar</a>, <a href="../../../../index.html#key321">regular languages</a>, <a href="../../../../index.html#key431">running</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2007 Bogdan &lt;rftghost@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_fa/fa.html.





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622

<div class='fossil-doc' data-title='grammar::fa - Finite automaton operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa(n) 0.4 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa - Create and manipulate finite automatons</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">FA METHODS</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">FINITE AUTOMATONS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit 1.3</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">grammar::fa::op <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">grammar::fa <span class="opt">?0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::fa</b> <i class="arg">faName</i> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">&lt;--</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">src</i>|<b class="const">fromRegex</b> <i class="arg">re</i> <span class="opt">?<i class="arg">over</i>?</span>?</span></a></li>
<li><a href="#2"><b class="cmd">faName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">faName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">faName</i> <b class="method">clear</b></a></li>
<li><a href="#5"><i class="arg">faName</i> <b class="method">=</b> <i class="arg">srcFA</i></a></li>
<li><a href="#6"><i class="arg">faName</i> <b class="method">--&gt;</b> <i class="arg">dstFA</i></a></li>
<li><a href="#7"><i class="arg">faName</i> <b class="method">serialize</b></a></li>
<li><a href="#8"><i class="arg">faName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></li>
<li><a href="#9"><i class="arg">faName</i> <b class="method">states</b></a></li>
<li><a href="#10"><i class="arg">faName</i> <b class="method">state</b> <b class="method">add</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></li>
<li><a href="#11"><i class="arg">faName</i> <b class="method">state</b> <b class="method">delete</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></li>
<li><a href="#12"><i class="arg">faName</i> <b class="method">state</b> <b class="method">exists</b> <i class="arg">s</i></a></li>
<li><a href="#13"><i class="arg">faName</i> <b class="method">state</b> <b class="method">rename</b> <i class="arg">s</i> <i class="arg">snew</i></a></li>
<li><a href="#14"><i class="arg">faName</i> <b class="method">startstates</b></a></li>
<li><a href="#15"><i class="arg">faName</i> <b class="method">start</b> <b class="method">add</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></li>
<li><a href="#16"><i class="arg">faName</i> <b class="method">start</b> <b class="method">remove</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></li>
<li><a href="#17"><i class="arg">faName</i> <b class="method">start?</b> <i class="arg">s</i></a></li>
<li><a href="#18"><i class="arg">faName</i> <b class="method">start?set</b> <i class="arg">stateset</i></a></li>
<li><a href="#19"><i class="arg">faName</i> <b class="method">finalstates</b></a></li>
<li><a href="#20"><i class="arg">faName</i> <b class="method">final</b> <b class="method">add</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></li>
<li><a href="#21"><i class="arg">faName</i> <b class="method">final</b> <b class="method">remove</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></li>
<li><a href="#22"><i class="arg">faName</i> <b class="method">final?</b> <i class="arg">s</i></a></li>
<li><a href="#23"><i class="arg">faName</i> <b class="method">final?set</b> <i class="arg">stateset</i></a></li>
<li><a href="#24"><i class="arg">faName</i> <b class="method">symbols</b></a></li>
<li><a href="#25"><i class="arg">faName</i> <b class="method">symbols@</b> <i class="arg">s</i> <span class="opt">?<i class="arg">d</i>?</span></a></li>
<li><a href="#26"><i class="arg">faName</i> <b class="method">symbols@set</b> <i class="arg">stateset</i></a></li>
<li><a href="#27"><i class="arg">faName</i> <b class="method">symbol</b> <b class="method">add</b> <i class="arg">sym1</i> <span class="opt">?<i class="arg">sym2</i> ...?</span></a></li>
<li><a href="#28"><i class="arg">faName</i> <b class="method">symbol</b> <b class="method">delete</b> <i class="arg">sym1</i> <span class="opt">?<i class="arg">sym2</i> ...?</span></a></li>
<li><a href="#29"><i class="arg">faName</i> <b class="method">symbol</b> <b class="method">rename</b> <i class="arg">sym</i> <i class="arg">newsym</i></a></li>
<li><a href="#30"><i class="arg">faName</i> <b class="method">symbol</b> <b class="method">exists</b> <i class="arg">sym</i></a></li>
<li><a href="#31"><i class="arg">faName</i> <b class="method">next</b> <i class="arg">s</i> <i class="arg">sym</i> <span class="opt">?<b class="const">--&gt;</b> <i class="arg">next</i>?</span></a></li>
<li><a href="#32"><i class="arg">faName</i> <b class="method">!next</b> <i class="arg">s</i> <i class="arg">sym</i> <span class="opt">?<b class="const">--&gt;</b> <i class="arg">next</i>?</span></a></li>
<li><a href="#33"><i class="arg">faName</i> <b class="method">nextset</b> <i class="arg">stateset</i> <i class="arg">sym</i></a></li>
<li><a href="#34"><i class="arg">faName</i> <b class="method">is</b> <b class="method">deterministic</b></a></li>
<li><a href="#35"><i class="arg">faName</i> <b class="method">is</b> <b class="method">complete</b></a></li>
<li><a href="#36"><i class="arg">faName</i> <b class="method">is</b> <b class="method">useful</b></a></li>
<li><a href="#37"><i class="arg">faName</i> <b class="method">is</b> <b class="method">epsilon-free</b></a></li>
<li><a href="#38"><i class="arg">faName</i> <b class="method">reachable_states</b></a></li>
<li><a href="#39"><i class="arg">faName</i> <b class="method">unreachable_states</b></a></li>
<li><a href="#40"><i class="arg">faName</i> <b class="method">reachable</b> <i class="arg">s</i></a></li>
<li><a href="#41"><i class="arg">faName</i> <b class="method">useful_states</b></a></li>
<li><a href="#42"><i class="arg">faName</i> <b class="method">unuseful_states</b></a></li>
<li><a href="#43"><i class="arg">faName</i> <b class="method">useful</b> <i class="arg">s</i></a></li>
<li><a href="#44"><i class="arg">faName</i> <b class="method">epsilon_closure</b> <i class="arg">s</i></a></li>
<li><a href="#45"><i class="arg">faName</i> <b class="method">reverse</b></a></li>
<li><a href="#46"><i class="arg">faName</i> <b class="method">complete</b></a></li>
<li><a href="#47"><i class="arg">faName</i> <b class="method">remove_eps</b></a></li>
<li><a href="#48"><i class="arg">faName</i> <b class="method">trim</b> <span class="opt">?<i class="arg">what</i>?</span></a></li>
<li><a href="#49"><i class="arg">faName</i> <b class="method">determinize</b> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#50"><i class="arg">faName</i> <b class="method">minimize</b> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#51"><i class="arg">faName</i> <b class="method">complement</b></a></li>
<li><a href="#52"><i class="arg">faName</i> <b class="method">kleene</b></a></li>
<li><a href="#53"><i class="arg">faName</i> <b class="method">optional</b></a></li>
<li><a href="#54"><i class="arg">faName</i> <b class="method">union</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#55"><i class="arg">faName</i> <b class="method">intersect</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#56"><i class="arg">faName</i> <b class="method">difference</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#57"><i class="arg">faName</i> <b class="method">concatenate</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#58"><i class="arg">faName</i> <b class="method">fromRegex</b> <i class="arg">regex</i> <span class="opt">?<i class="arg">over</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a container class for
<i class="term">finite automatons</i> (Short: FA).
It allows the incremental definition of the automaton, its
manipulation and querying of the definition.
While the package provides complex operations on the automaton
(via package <b class="package"><a href="faop.html">grammar::fa::op</a></b>), it does not have the
ability to execute a definition for a stream of symbols.
Use the packages
<b class="package"><a href="dacceptor.html">grammar::fa::dacceptor</a></b> and
<b class="package"><a href="dexec.html">grammar::fa::dexec</a></b> for that.
Another package related to this is <b class="package">grammar::fa::compiler</b>. It
turns a FA into an executor class which has the definition of the FA
hardwired into it. The output of this package is configurable to suit
a large number of different implementation languages and paradigms.</p>
<p>For more information about what a finite automaton is see section
<span class="sectref"><a href="#section5">FINITE AUTOMATONS</a></span>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports the API described here.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::fa</b> <i class="arg">faName</i> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">&lt;--</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">src</i>|<b class="const">fromRegex</b> <i class="arg">re</i> <span class="opt">?<i class="arg">over</i>?</span>?</span></a></dt>
<dd><p>Creates a new finite automaton with an associated global Tcl command
whose name is <i class="arg">faName</i>. This command may be used to invoke various
operations on the automaton. It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">faName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command. See section <span class="sectref"><a href="#section3">FA METHODS</a></span> for more explanations. The
new automaton will be empty if no <i class="arg">src</i> is specified. Otherwise
it will contain a copy of the definition contained in the <i class="arg">src</i>.
The <i class="arg">src</i> has to be a FA object reference for all operators except
<b class="const">deserialize</b> and <b class="const">fromRegex</b>. The <b class="const">deserialize</b>
operator requires <i class="arg">src</i> to be the serialization of a FA instead,
and <b class="const">fromRegex</b> takes a regular expression in the form a of a
syntax tree. See <b class="cmd">::grammar::fa::op::fromRegex</b> for more detail on
that.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">FA METHODS</a></h2>
<p>All automatons provide the following methods for their manipulation:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">faName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the automaton, including its storage space and associated
command.</p></dd>
<dt><a name="4"><i class="arg">faName</i> <b class="method">clear</b></a></dt>
<dd><p>Clears out the definition of the automaton contained in <i class="arg">faName</i>,
but does <em>not</em> destroy the object.</p></dd>
<dt><a name="5"><i class="arg">faName</i> <b class="method">=</b> <i class="arg">srcFA</i></a></dt>
<dd><p>Assigns the contents of the automaton contained
in <i class="arg">srcFA</i> to <i class="arg">faName</i>, overwriting any
existing definition.
This is the assignment operator for automatons. It copies the
automaton contained in the FA object <i class="arg">srcFA</i> over the automaton
definition in <i class="arg">faName</i>. The old contents of <i class="arg">faName</i> are
deleted by this operation.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">faName</i> <b class="method">deserialize</b> [<i class="arg">srcFA</i> <b class="method">serialize</b>]
</pre>
</dd>
<dt><a name="6"><i class="arg">faName</i> <b class="method">--&gt;</b> <i class="arg">dstFA</i></a></dt>
<dd><p>This is the reverse assignment operator for automatons. It copies the
automation contained in the object <i class="arg">faName</i> over the automaton
definition in the object <i class="arg">dstFA</i>.
The old contents of <i class="arg">dstFA</i> are deleted by this operation.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">dstFA</i> <b class="method">deserialize</b> [<i class="arg">faName</i> <b class="method">serialize</b>]
</pre>
</dd>
<dt><a name="7"><i class="arg">faName</i> <b class="method">serialize</b></a></dt>
<dd><p>This method serializes the automaton stored in <i class="arg">faName</i>. In other
words it returns a tcl <em>value</em> completely describing that
automaton.
This allows, for example, the transfer of automatons over arbitrary
channels, persistence, etc.
This method is also the basis for both the copy constructor and the
assignment operator.</p>
<p>The result of this method has to be semantically identical over all
implementations of the <b class="package">grammar::fa</b> interface. This is what
will enable us to copy automatons between different implementations of
the same interface.</p>
<p>The result is a list of three elements with the following structure:</p>
<ol class="doctools_enumerated">
<li><p>The constant string <b class="const">grammar::fa</b>.</p></li>
<li><p>A list containing the names of all known input symbols. The order of
elements in this list is not relevant.</p></li>
<li><p>The last item in the list is a dictionary, however the order of the
keys is important as well. The keys are the states of the serialized
FA, and their order is the order in which to create the states when
deserializing. This is relevant to preserve the order relationship
between states.</p>
<p>The value of each dictionary entry is a list of three elements
describing the state in more detail.</p>
<ol class="doctools_enumerated">
<li><p>A boolean flag. If its value is <b class="const">true</b> then the state is a
start state, otherwise it is not.</p></li>
<li><p>A boolean flag. If its value is <b class="const">true</b> then the state is a
final state, otherwise it is not.</p></li>
<li><p>The last element is a dictionary describing the transitions for the
state. The keys are symbols (or the empty string), and the values are
sets of successor states.</p></li>
</ol>
</li>
</ol>
<p>Assuming the following FA (which describes the life of a truck driver
in a very simple way :)</p>
<pre class="doctools_example">
    Drive -- yellow --&gt; Brake -- red --&gt; (Stop) -- red/yellow --&gt; Attention -- green --&gt; Drive
    (...) is the start state.
</pre>
<p>a possible serialization is</p>
<pre class="doctools_example">
    grammar::fa \\
    {yellow red green red/yellow} \\
    {Drive     {0 0 {yellow     Brake}} \\
     Brake     {0 0 {red        Stop}} \\
     Stop      {1 0 {red/yellow Attention}} \\
     Attention {0 0 {green      Drive}}}
</pre>
<p>A possible one, because I did not care about creation order here</p></dd>
<dt><a name="8"><i class="arg">faName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></dt>
<dd><p>This is the complement to <b class="method">serialize</b>. It replaces the
automaton definition in <i class="arg">faName</i> with the automaton described by
the <i class="arg">serialization</i> value. The old contents of <i class="arg">faName</i> are
deleted by this operation.</p></dd>
<dt><a name="9"><i class="arg">faName</i> <b class="method">states</b></a></dt>
<dd><p>Returns the set of all states known to <i class="arg">faName</i>.</p></dd>
<dt><a name="10"><i class="arg">faName</i> <b class="method">state</b> <b class="method">add</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></dt>
<dd><p>Adds the states <i class="arg">s1</i>, <i class="arg">s2</i>, et cetera to the FA definition in
<i class="arg">faName</i>. The operation will fail any of the new states is already
declared.</p></dd>
<dt><a name="11"><i class="arg">faName</i> <b class="method">state</b> <b class="method">delete</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></dt>
<dd><p>Deletes the state <i class="arg">s1</i>, <i class="arg">s2</i>, et cetera, and all associated
information from the FA definition in <i class="arg">faName</i>. The latter means
that the information about in- or outbound transitions is deleted as
well. If the deleted state was a start or final state then this
information is invalidated as well. The operation will fail if the
state <i class="arg">s</i> is not known to the FA.</p></dd>
<dt><a name="12"><i class="arg">faName</i> <b class="method">state</b> <b class="method">exists</b> <i class="arg">s</i></a></dt>
<dd><p>A predicate. It tests whether the state <i class="arg">s</i> is known to the FA in
<i class="arg">faName</i>.
The result is a boolean value. It will be set to <b class="const">true</b> if the
state <i class="arg">s</i> is known, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="13"><i class="arg">faName</i> <b class="method">state</b> <b class="method">rename</b> <i class="arg">s</i> <i class="arg">snew</i></a></dt>
<dd><p>Renames the state <i class="arg">s</i> to <i class="arg">snew</i>. Fails if <i class="arg">s</i> is not a
known state. Also fails if <i class="arg">snew</i> is already known as a state.</p></dd>
<dt><a name="14"><i class="arg">faName</i> <b class="method">startstates</b></a></dt>
<dd><p>Returns the set of states which are marked as <i class="term">start</i> states,
also known as <i class="term">initial</i> states.
See <span class="sectref"><a href="#section5">FINITE AUTOMATONS</a></span> for explanations what this means.</p></dd>
<dt><a name="15"><i class="arg">faName</i> <b class="method">start</b> <b class="method">add</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></dt>
<dd><p>Mark the states <i class="arg">s1</i>, <i class="arg">s2</i>, et cetera in the FA <i class="arg">faName</i>
as <i class="term">start</i> (aka <i class="term">initial</i>).</p></dd>
<dt><a name="16"><i class="arg">faName</i> <b class="method">start</b> <b class="method">remove</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></dt>
<dd><p>Mark the states <i class="arg">s1</i>, <i class="arg">s2</i>, et cetera in the FA <i class="arg">faName</i>
as <i class="term">not start</i> (aka <i class="term">not accepting</i>).</p></dd>
<dt><a name="17"><i class="arg">faName</i> <b class="method">start?</b> <i class="arg">s</i></a></dt>
<dd><p>A predicate. It tests if the state <i class="arg">s</i> in the FA <i class="arg">faName</i> is
<i class="term">start</i> or not.
The result is a boolean value. It will be set to <b class="const">true</b> if the
state <i class="arg">s</i> is <i class="term">start</i>, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="18"><i class="arg">faName</i> <b class="method">start?set</b> <i class="arg">stateset</i></a></dt>
<dd><p>A predicate. It tests if the set of states <i class="arg">stateset</i> contains at
least one start state. They operation will fail if the set contains an
element which is not a known state.
The result is a boolean value. It will be set to <b class="const">true</b> if a
start state is present in <i class="arg">stateset</i>, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="19"><i class="arg">faName</i> <b class="method">finalstates</b></a></dt>
<dd><p>Returns the set of states which are marked as <i class="term"><a href="../../../../index.html#key160">final</a></i> states,
also known as <i class="term">accepting</i> states.
See <span class="sectref"><a href="#section5">FINITE AUTOMATONS</a></span> for explanations what this means.</p></dd>
<dt><a name="20"><i class="arg">faName</i> <b class="method">final</b> <b class="method">add</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></dt>
<dd><p>Mark the states <i class="arg">s1</i>, <i class="arg">s2</i>, et cetera in the FA <i class="arg">faName</i>
as <i class="term"><a href="../../../../index.html#key160">final</a></i> (aka <i class="term">accepting</i>).</p></dd>
<dt><a name="21"><i class="arg">faName</i> <b class="method">final</b> <b class="method">remove</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></dt>
<dd><p>Mark the states <i class="arg">s1</i>, <i class="arg">s2</i>, et cetera in the FA <i class="arg">faName</i>
as <i class="term">not final</i> (aka <i class="term">not accepting</i>).</p></dd>
<dt><a name="22"><i class="arg">faName</i> <b class="method">final?</b> <i class="arg">s</i></a></dt>
<dd><p>A predicate. It tests if the state <i class="arg">s</i> in the FA <i class="arg">faName</i> is
<i class="term"><a href="../../../../index.html#key160">final</a></i> or not.
The result is a boolean value. It will be set to <b class="const">true</b> if the
state <i class="arg">s</i> is <i class="term"><a href="../../../../index.html#key160">final</a></i>, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="23"><i class="arg">faName</i> <b class="method">final?set</b> <i class="arg">stateset</i></a></dt>
<dd><p>A predicate. It tests if the set of states <i class="arg">stateset</i> contains at
least one final state. They operation will fail if the set contains an
element which is not a known state.
The result is a boolean value. It will be set to <b class="const">true</b> if a
final state is present in <i class="arg">stateset</i>, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="24"><i class="arg">faName</i> <b class="method">symbols</b></a></dt>
<dd><p>Returns the set of all symbols known to the FA <i class="arg">faName</i>.</p></dd>
<dt><a name="25"><i class="arg">faName</i> <b class="method">symbols@</b> <i class="arg">s</i> <span class="opt">?<i class="arg">d</i>?</span></a></dt>
<dd><p>Returns the set of all symbols for which the state <i class="arg">s</i> has transitions.
If the empty symbol is present then <i class="arg">s</i> has epsilon transitions. If two
states are specified the result is the set of symbols which have transitions
from <i class="arg">s</i> to <i class="arg">t</i>. This set may be empty if there are no transitions
between the two specified states.</p></dd>
<dt><a name="26"><i class="arg">faName</i> <b class="method">symbols@set</b> <i class="arg">stateset</i></a></dt>
<dd><p>Returns the set of all symbols for which at least one state in the set
of states <i class="arg">stateset</i> has transitions.
In other words, the union of [<i class="arg">faName</i> <b class="method">symbols@</b> <b class="variable">s</b>]
for all states <b class="variable">s</b> in <i class="arg">stateset</i>.
If the empty symbol is present then at least one state contained in
<i class="arg">stateset</i> has epsilon transitions.</p></dd>
<dt><a name="27"><i class="arg">faName</i> <b class="method">symbol</b> <b class="method">add</b> <i class="arg">sym1</i> <span class="opt">?<i class="arg">sym2</i> ...?</span></a></dt>
<dd><p>Adds the symbols <i class="arg">sym1</i>, <i class="arg">sym2</i>, et cetera to the FA
definition in <i class="arg">faName</i>. The operation will fail any of the symbols
is already declared. The empty string is not allowed as a value for the symbols.</p></dd>
<dt><a name="28"><i class="arg">faName</i> <b class="method">symbol</b> <b class="method">delete</b> <i class="arg">sym1</i> <span class="opt">?<i class="arg">sym2</i> ...?</span></a></dt>
<dd><p>Deletes the symbols <i class="arg">sym1</i>, <i class="arg">sym2</i> et cetera, and all
associated information from the FA definition in <i class="arg">faName</i>. The
latter means that all transitions using the symbols are deleted as
well. The operation will fail if any of the symbols is not known to
the FA.</p></dd>
<dt><a name="29"><i class="arg">faName</i> <b class="method">symbol</b> <b class="method">rename</b> <i class="arg">sym</i> <i class="arg">newsym</i></a></dt>
<dd><p>Renames the symbol <i class="arg">sym</i> to <i class="arg">newsym</i>. Fails if <i class="arg">sym</i> is
not a known symbol. Also fails if <i class="arg">newsym</i> is already known as a
symbol.</p></dd>
<dt><a name="30"><i class="arg">faName</i> <b class="method">symbol</b> <b class="method">exists</b> <i class="arg">sym</i></a></dt>
<dd><p>A predicate. It tests whether the symbol <i class="arg">sym</i> is known to the FA
in <i class="arg">faName</i>.
The result is a boolean value. It will be set to <b class="const">true</b> if the
symbol <i class="arg">sym</i> is known, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="31"><i class="arg">faName</i> <b class="method">next</b> <i class="arg">s</i> <i class="arg">sym</i> <span class="opt">?<b class="const">--&gt;</b> <i class="arg">next</i>?</span></a></dt>
<dd><p>Define or query transition information.</p>
<p>If <i class="arg">next</i> is specified, then the method will add a transition from
the state <i class="arg">s</i> to the <i class="term">successor</i> state <i class="arg">next</i> labeled with
the symbol <i class="arg">sym</i> to the FA contained in <i class="arg">faName</i>. The
operation will fail if <i class="arg">s</i>, or <i class="arg">next</i> are not known states, or
if <i class="arg">sym</i> is not a known symbol. An exception to the latter is that
<i class="arg">sym</i> is allowed to be the empty string. In that case the new
transition is an <i class="term">epsilon transition</i> which will not consume
input when traversed. The operation will also fail if the combination
of (<i class="arg">s</i>, <i class="arg">sym</i>, and <i class="arg">next</i>) is already present in the FA.</p>
<p>If <i class="arg">next</i> was not specified, then the method will return
the set of states which can be reached from <i class="arg">s</i> through
a single transition labeled with symbol <i class="arg">sym</i>.</p></dd>
<dt><a name="32"><i class="arg">faName</i> <b class="method">!next</b> <i class="arg">s</i> <i class="arg">sym</i> <span class="opt">?<b class="const">--&gt;</b> <i class="arg">next</i>?</span></a></dt>
<dd><p>Remove one or more transitions from the Fa in <i class="arg">faName</i>.</p>
<p>If <i class="arg">next</i> was specified then the single transition from the state
<i class="arg">s</i> to the state <i class="arg">next</i> labeled with the symbol <i class="arg">sym</i> is
removed from the FA. Otherwise <em>all</em> transitions originating in
state <i class="arg">s</i> and labeled with the symbol <i class="arg">sym</i> will be removed.</p>
<p>The operation will fail if <i class="arg">s</i> and/or <i class="arg">next</i> are not known as
states. It will also fail if a non-empty <i class="arg">sym</i> is not known as
symbol. The empty string is acceptable, and allows the removal of
epsilon transitions.</p></dd>
<dt><a name="33"><i class="arg">faName</i> <b class="method">nextset</b> <i class="arg">stateset</i> <i class="arg">sym</i></a></dt>
<dd><p>Returns the set of states which can be reached by a single transition
originating in a state in the set <i class="arg">stateset</i> and labeled with the
symbol <i class="arg">sym</i>.</p>
<p>In other words, this is the union of
[<i class="arg">faName</i> next <b class="variable">s</b> <i class="arg">symbol</i>]
for all states <b class="variable">s</b> in <i class="arg">stateset</i>.</p></dd>
<dt><a name="34"><i class="arg">faName</i> <b class="method">is</b> <b class="method">deterministic</b></a></dt>
<dd><p>A predicate. It tests whether the FA in <i class="arg">faName</i> is a
deterministic FA or not.
The result is a boolean value. It will be set to <b class="const">true</b> if the
FA is deterministic, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="35"><i class="arg">faName</i> <b class="method">is</b> <b class="method">complete</b></a></dt>
<dd><p>A predicate. It tests whether the FA in <i class="arg">faName</i> is a complete FA
or not. A FA is complete if it has at least one transition per state
and symbol. This also means that a FA without symbols, or states is
also complete.
The result is a boolean value. It will be set to <b class="const">true</b> if the
FA is deterministic, and <b class="const">false</b> otherwise.</p>
<p>Note: When a FA has epsilon-transitions transitions over a symbol for
a state S can be indirect, i.e. not attached directly to S, but to a
state in the epsilon-closure of S. The symbols for such indirect
transitions count when computing completeness.</p></dd>
<dt><a name="36"><i class="arg">faName</i> <b class="method">is</b> <b class="method">useful</b></a></dt>
<dd><p>A predicate. It tests whether the FA in <i class="arg">faName</i> is an useful FA
or not. A FA is useful if all states are <i class="term">reachable</i>
and <i class="term">useful</i>.
The result is a boolean value. It will be set to <b class="const">true</b> if the
FA is deterministic, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="37"><i class="arg">faName</i> <b class="method">is</b> <b class="method">epsilon-free</b></a></dt>
<dd><p>A predicate. It tests whether the FA in <i class="arg">faName</i> is an
epsilon-free FA or not. A FA is epsilon-free if it has no epsilon
transitions. This definition means that all deterministic FAs are
epsilon-free as well, and epsilon-freeness is a necessary
pre-condition for deterministic'ness.
The result is a boolean value. It will be set to <b class="const">true</b> if the
FA is deterministic, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="38"><i class="arg">faName</i> <b class="method">reachable_states</b></a></dt>
<dd><p>Returns the set of states which are reachable from a start state by
one or more transitions.</p></dd>
<dt><a name="39"><i class="arg">faName</i> <b class="method">unreachable_states</b></a></dt>
<dd><p>Returns the set of states which are not reachable from any start state
by any number of transitions. This is</p>
<pre class="doctools_example">
	 [faName states] - [faName reachable_states]
</pre>
</dd>
<dt><a name="40"><i class="arg">faName</i> <b class="method">reachable</b> <i class="arg">s</i></a></dt>
<dd><p>A predicate. It tests whether the state <i class="arg">s</i> in the FA <i class="arg">faName</i>
can be reached from a start state by one or more transitions.
The result is a boolean value. It will be set to <b class="const">true</b> if the
state can be reached, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="41"><i class="arg">faName</i> <b class="method">useful_states</b></a></dt>
<dd><p>Returns the set of states which are able to reach a final state by
one or more transitions.</p></dd>
<dt><a name="42"><i class="arg">faName</i> <b class="method">unuseful_states</b></a></dt>
<dd><p>Returns the set of states which are not able to reach a final state by
any number of transitions. This is</p>
<pre class="doctools_example">
	 [faName states] - [faName useful_states]
</pre>
</dd>
<dt><a name="43"><i class="arg">faName</i> <b class="method">useful</b> <i class="arg">s</i></a></dt>
<dd><p>A predicate. It tests whether the state <i class="arg">s</i> in the FA <i class="arg">faName</i>
is able to reach a final state by one or more transitions.
The result is a boolean value. It will be set to <b class="const">true</b> if the
state is useful, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="44"><i class="arg">faName</i> <b class="method">epsilon_closure</b> <i class="arg">s</i></a></dt>
<dd><p>Returns the set of states which are reachable from the state <i class="arg">s</i>
in the FA <i class="arg">faName</i> by one or more epsilon transitions, i.e
transitions over the empty symbol, transitions which do not consume
input. This is called the <i class="term">epsilon closure</i> of <i class="arg">s</i>.</p></dd>
<dt><a name="45"><i class="arg">faName</i> <b class="method">reverse</b></a></dt>
<dd></dd>
<dt><a name="46"><i class="arg">faName</i> <b class="method">complete</b></a></dt>
<dd></dd>
<dt><a name="47"><i class="arg">faName</i> <b class="method">remove_eps</b></a></dt>
<dd></dd>
<dt><a name="48"><i class="arg">faName</i> <b class="method">trim</b> <span class="opt">?<i class="arg">what</i>?</span></a></dt>
<dd></dd>
<dt><a name="49"><i class="arg">faName</i> <b class="method">determinize</b> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd></dd>
<dt><a name="50"><i class="arg">faName</i> <b class="method">minimize</b> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd></dd>
<dt><a name="51"><i class="arg">faName</i> <b class="method">complement</b></a></dt>
<dd></dd>
<dt><a name="52"><i class="arg">faName</i> <b class="method">kleene</b></a></dt>
<dd></dd>
<dt><a name="53"><i class="arg">faName</i> <b class="method">optional</b></a></dt>
<dd></dd>
<dt><a name="54"><i class="arg">faName</i> <b class="method">union</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd></dd>
<dt><a name="55"><i class="arg">faName</i> <b class="method">intersect</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd></dd>
<dt><a name="56"><i class="arg">faName</i> <b class="method">difference</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd></dd>
<dt><a name="57"><i class="arg">faName</i> <b class="method">concatenate</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd></dd>
<dt><a name="58"><i class="arg">faName</i> <b class="method">fromRegex</b> <i class="arg">regex</i> <span class="opt">?<i class="arg">over</i>?</span></a></dt>
<dd><p>These methods provide more complex operations on the FA.  Please see
the same-named commands in the package <b class="package"><a href="faop.html">grammar::fa::op</a></b> for
descriptions of what they do.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">FINITE AUTOMATONS</a></h2>
<p>For the mathematically inclined, a FA is a 5-tuple (S,Sy,St,Fi,T) where</p>
<ul class="doctools_itemized">
<li><p>S is a set of <i class="term">states</i>,</p></li>
<li><p>Sy a set of <i class="term">input symbols</i>,</p></li>
<li><p>St is a subset of S, the set of <i class="term">start</i> states, also known as
<i class="term">initial</i> states.</p></li>
<li><p>Fi is a subset of S, the set of <i class="term"><a href="../../../../index.html#key160">final</a></i> states, also known as
<i class="term">accepting</i>.</p></li>
<li><p>T is a function from S x (Sy + epsilon) to {S}, the <i class="term">transition function</i>.
Here <b class="const">epsilon</b> denotes the empty input symbol and is distinct
from all symbols in Sy; and {S} is the set of subsets of S. In other
words, T maps a combination of State and Input (which can be empty) to
a set of <i class="term">successor states</i>.</p></li>
</ul>
<p>In computer theory a FA is most often shown as a graph where the nodes
represent the states, and the edges between the nodes encode the
transition function: For all n in S' = T (s, sy) we have one edge
between the nodes representing s and n resp., labeled with sy. The
start and accepting states are encoded through distinct visual
markers, i.e. they are attributes of the nodes.</p>
<p>FA's are used to process streams of symbols over Sy.</p>
<p>A specific FA is said to <i class="term">accept</i> a finite stream sy_1 sy_2
... sy_n if there is a path in the graph of the FA beginning at a
state in St and ending at a state in Fi whose edges have the labels
sy_1, sy_2, etc. to sy_n.
The set of all strings accepted by the FA is the <i class="term">language</i> of
the FA. One important equivalence is that the set of languages which
can be accepted by an FA is the set of <i class="term"><a href="../../../../index.html#key321">regular languages</a></i>.</p>
<p>Another important concept is that of deterministic FAs. A FA is said
to be <i class="term">deterministic</i> if for each string of input symbols there
is exactly one path in the graph of the FA beginning at the start
state and whose edges are labeled with the symbols in the string.
While it might seem that non-deterministic FAs to have more power of
recognition, this is not so. For each non-deterministic FA we can
construct a deterministic FA which accepts the same language (--&gt;
Thompson's subset construction).</p>
<p>While one of the premier applications of FAs is in <i class="term"><a href="../../../../index.html#key26">parsing</a></i>,
especially in the <i class="term"><a href="../../../../index.html#key257">lexer</a></i> stage (where symbols == characters),
this is not the only possibility by far.</p>
<p>Quite a lot of processes can be modeled as a FA, albeit with a
possibly large set of states. For these the notion of accepting states
is often less or not relevant at all. What is needed instead is the
ability to act to state changes in the FA, i.e. to generate some
output in response to the input.
This transforms a FA into a <i class="term">finite transducer</i>, which has an
additional set OSy of <i class="term">output symbols</i> and also an additional
<i class="term">output function</i> O which maps from &quot;S x (Sy + epsilon)&quot; to
&quot;(Osy + epsilon)&quot;, i.e a combination of state and input, possibly
empty to an output symbol, or nothing.</p>
<p>For the graph representation this means that edges are additional
labeled with the output symbol to write when this edge is traversed
while matching input. Note that for an application &quot;writing an output
symbol&quot; can also be &quot;executing some code&quot;.</p>
<p>Transducers are not handled by this package. They will get their own
package in the future.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key320">automaton</a>, <a href="../../../../index.html#key325">finite automaton</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key322">regular grammar</a>, <a href="../../../../index.html#key321">regular languages</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_fa/faop.html.





















































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458

<div class='fossil-doc' data-title='grammar::fa::op - Finite automaton operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa::op(n) 0.4 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa::op - Operations on finite automatons</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">grammar::fa::op <span class="opt">?0.4.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::fa::op::constructor</b> <i class="arg">cmd</i></a></li>
<li><a href="#2"><b class="cmd">::grammar::fa::op::reverse</b> <i class="arg">fa</i></a></li>
<li><a href="#3"><b class="cmd">::grammar::fa::op::complete</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">sink</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::grammar::fa::op::remove_eps</b> <i class="arg">fa</i></a></li>
<li><a href="#5"><b class="cmd">::grammar::fa::op::trim</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">what</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::grammar::fa::op::determinize</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::grammar::fa::op::minimize</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::grammar::fa::op::complement</b> <i class="arg">fa</i></a></li>
<li><a href="#9"><b class="cmd">::grammar::fa::op::kleene</b> <i class="arg">fa</i></a></li>
<li><a href="#10"><b class="cmd">::grammar::fa::op::optional</b> <i class="arg">fa</i></a></li>
<li><a href="#11"><b class="cmd">::grammar::fa::op::union</b> <i class="arg">fa</i> <i class="arg">fb</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#12"><b class="cmd">::grammar::fa::op::intersect</b> <i class="arg">fa</i> <i class="arg">fb</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#13"><b class="cmd">::grammar::fa::op::difference</b> <i class="arg">fa</i> <i class="arg">fb</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#14"><b class="cmd">::grammar::fa::op::concatenate</b> <i class="arg">fa</i> <i class="arg">fb</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></li>
<li><a href="#15"><b class="cmd">::grammar::fa::op::fromRegex</b> <i class="arg">fa</i> <i class="arg">regex</i> <span class="opt">?<i class="arg">over</i>?</span></a></li>
<li><a href="#16"><b class="cmd">::grammar::fa::op::toRegexp</b> <i class="arg">fa</i></a></li>
<li><a href="#17"><b class="cmd">::grammar::fa::op::toRegexp2</b> <i class="arg">fa</i></a></li>
<li><a href="#18"><b class="cmd">::grammar::fa::op::toTclRegexp</b> <i class="arg">regexp</i> <i class="arg">symdict</i></a></li>
<li><a href="#19"><b class="cmd">::grammar::fa::op::simplifyRegexp</b> <i class="arg">regexp</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a number of complex operations on finite
automatons (Short: FA),
as provided by the package <b class="package"><a href="fa.html">grammar::fa</a></b>.
The package does not provide the ability to create and/or manipulate
such FAs, nor the ability to execute a FA for a stream of symbols.
Use the packages <b class="package"><a href="fa.html">grammar::fa</a></b>
and <b class="package">grammar::fa::interpreter</b> for that.
Another package related to this is <b class="package">grammar::fa::compiler</b>
which turns a FA into an executor class which has the definition of
the FA hardwired into it.</p>
<p>For more information about what a finite automaton is see section
<em>FINITE AUTOMATONS</em> in package <b class="package"><a href="fa.html">grammar::fa</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports the API described here.  All commands modify their
first argument. I.e. whatever FA they compute is stored back into
it. Some of the operations will construct an automaton whose states
are all new, but related to the states in the source
automaton(s). These operations take variable names as optional
arguments where they will store mappings which describe the
relationship(s).
The operations can be loosely partitioned into structural and language
operations. The latter are defined in terms of the language the
automaton(s) accept, whereas the former are defined in terms of the
structural properties of the involved automaton(s). Some operations
are both.
<em>Structure operations</em></p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::fa::op::constructor</b> <i class="arg">cmd</i></a></dt>
<dd><p>This command has to be called by the user of the package before any other
operations is performed, to establish a command which can be used to
construct a FA container object. If this is not done several operations
will fail as they are unable to construct internal and transient containers
to hold state and/or partial results.</p>
<p>Any container class using this package for complex operations should set
its own class command as the constructor. See package <b class="package"><a href="fa.html">grammar::fa</a></b>
for an example.</p></dd>
<dt><a name="2"><b class="cmd">::grammar::fa::op::reverse</b> <i class="arg">fa</i></a></dt>
<dd><p>Reverses the <i class="arg">fa</i>. This is done by reversing the direction of all
transitions and swapping the sets of <i class="term">start</i> and <i class="term"><a href="../../../../index.html#key160">final</a></i>
states. The language of <i class="arg">fa</i> changes unpredictably.</p></dd>
<dt><a name="3"><b class="cmd">::grammar::fa::op::complete</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">sink</i>?</span></a></dt>
<dd><p>Completes the <i class="arg">fa</i> <i class="term">complete</i>, but nothing is done if the
<i class="arg">fa</i> is already <i class="term">complete</i>. This implies that only the first
in a series of multiple consecutive complete operations on <i class="arg">fa</i>
will perform anything. The remainder will be null operations.</p>
<p>The language of <i class="arg">fa</i> is unchanged by this operation.</p>
<p>This is done by adding a single new state, the <i class="term">sink</i>, and
transitions from all other states to that sink for all symbols they
have no transitions for. The sink itself is made complete by adding
loop transitions for all symbols.</p>
<p>Note: When a FA has epsilon-transitions transitions over a symbol for
a state S can be indirect, i.e. not attached directly to S, but to a
state in the epsilon-closure of S. The symbols for such indirect
transitions count when computing completeness of a state. In other
words, these indirectly reached symbols are <em>not</em> missing.</p>
<p>The argument <i class="arg">sink</i> provides the name for the new state and most
not be present in the <i class="arg">fa</i> if specified. If the name is not
specified the command will name the state &quot;sink<b class="variable">n</b>&quot;, where <b class="variable">n</b>
is set so that there are no collisions with existing states.</p>
<p>Note that the sink state is <i class="term">not useful</i> by definition.  In
other words, while the FA becomes complete, it is also
<i class="term">not useful</i> in the strict sense as it has a state from which
no final state can be reached.</p></dd>
<dt><a name="4"><b class="cmd">::grammar::fa::op::remove_eps</b> <i class="arg">fa</i></a></dt>
<dd><p>Removes all epsilon-transitions from the <i class="arg">fa</i> in such a manner the
the language of <i class="arg">fa</i> is unchanged. However nothing is done if the
<i class="arg">fa</i> is already <i class="term">epsilon-free</i>.
This implies that only the first in a series of multiple consecutive
complete operations on <i class="arg">fa</i> will perform anything. The remainder
will be null operations.</p>
<p><em>Note:</em> This operation may cause states to become unreachable or
not useful. These states are not removed by this operation.
Use <b class="cmd">::grammar::fa::op::trim</b> for that instead.</p></dd>
<dt><a name="5"><b class="cmd">::grammar::fa::op::trim</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">what</i>?</span></a></dt>
<dd><p>Removes unwanted baggage from <i class="arg">fa</i>.
The legal values for <i class="arg">what</i> are listed below. The command defaults
to <b class="const">!reachable|!useful</b> if no specific argument was given.</p>
<dl class="doctools_definitions">
<dt><b class="const">!reachable</b></dt>
<dd><p>Removes all states which are not reachable from a start state.</p></dd>
<dt><b class="const">!useful</b></dt>
<dd><p>Removes all states which are unable to reach a final state.</p></dd>
<dt><b class="const">!reachable&amp;!useful</b></dt>
<dd></dd>
<dt><b class="const">!(reachable|useful)</b></dt>
<dd><p>Removes all states which are not reachable from a start state and are
unable to reach a final state.</p></dd>
<dt><b class="const">!reachable|!useful</b></dt>
<dd></dd>
<dt><b class="const">!(reachable&amp;useful)</b></dt>
<dd><p>Removes all states which are not reachable from a start state or are
unable to reach a final state.</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::grammar::fa::op::determinize</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd><p>Makes the <i class="arg">fa</i> deterministic without changing the language
accepted by the <i class="arg">fa</i>. However nothing is done if the <i class="arg">fa</i> is
already <i class="term">deterministic</i>. This implies that only the first in a
series of multiple consecutive complete operations on <i class="arg">fa</i> will
perform anything. The remainder will be null operations.</p>
<p>The command will store a dictionary describing the relationship
between the new states of the resulting dfa and the states of the
input nfa in <i class="arg">mapvar</i>, if it has been specified. Keys of the
dictionary are the handles for the states of the resulting dfa, values
are sets of states from the input nfa.</p>
<p><em>Note</em>: An empty dictionary signals that the command was able to
make the <i class="arg">fa</i> deterministic without performing a full subset
construction, just by removing states and shuffling transitions around
(As part of making the FA epsilon-free).</p>
<p><em>Note</em>: The algorithm fails to make the FA deterministic in the
technical sense if the FA has no start state(s), because determinism
requires the FA to have exactly one start states.
In that situation we make a best effort; and the missing start state
will be the only condition preventing the generated result from being
<i class="term">deterministic</i>.
It should also be noted that in this case the possibilities for
trimming states from the FA are also severely reduced as we cannot
declare states unreachable.</p></dd>
<dt><a name="7"><b class="cmd">::grammar::fa::op::minimize</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd><p>Creates a FA which accepts the same language as <i class="arg">fa</i>, but has a
minimal number of states. Uses Brzozowski's method to accomplish this.</p>
<p>The command will store a dictionary describing the relationship
between the new states of the resulting minimal fa and the states of
the input fa in <i class="arg">mapvar</i>, if it has been specified. Keys of the
dictionary are the handles for the states of the resulting minimal fa,
values are sets of states from the input fa.</p>
<p><em>Note</em>: An empty dictionary signals that the command was able to
minimize the <i class="arg">fa</i> without having to compute new states. This
should happen if and only if the input FA was already minimal.</p>
<p><em>Note</em>: If the algorithm has no start or final states to work
with then the result might be technically minimal, but have a very
unexpected structure.
It should also be noted that in this case the possibilities for
trimming states from the FA are also severely reduced as we cannot
declare states unreachable.</p></dd>
</dl>
<p><em>Language operations</em>
All operations in this section require that all input FAs have at
least one start and at least one final state. Otherwise the language of
the FAs will not be defined, making the operation senseless (as it
operates on the languages of the FAs in a defined manner).</p>
<dl class="doctools_definitions">
<dt><a name="8"><b class="cmd">::grammar::fa::op::complement</b> <i class="arg">fa</i></a></dt>
<dd><p>Complements <i class="arg">fa</i>. This is possible if and only if <i class="arg">fa</i> is
<i class="term">complete</i> and <i class="term">deterministic</i>. The resulting FA accepts the
complementary language of <i class="arg">fa</i>. In other words, all inputs not
accepted by the input are accepted by the result, and vice versa.</p>
<p>The result will have all states and transitions of the input, and
different final states.</p></dd>
<dt><a name="9"><b class="cmd">::grammar::fa::op::kleene</b> <i class="arg">fa</i></a></dt>
<dd><p>Applies Kleene's closure to <i class="arg">fa</i>.
The resulting FA accepts all strings <b class="variable">S</b> for which we can find a
natural number <b class="variable">n</b> (0 inclusive) and strings <b class="variable">A1</b> ... <b class="variable">An</b>
in the language of <i class="arg">fa</i> such that <b class="variable">S</b> is the concatenation of
<b class="variable">A1</b> ... <b class="variable">An</b>.
In other words, the language of the result is the infinite union over
finite length concatenations over the language of <i class="arg">fa</i>.</p>
<p>The result will have all states and transitions of the input, and new
start and final states.</p></dd>
<dt><a name="10"><b class="cmd">::grammar::fa::op::optional</b> <i class="arg">fa</i></a></dt>
<dd><p>Makes the <i class="arg">fa</i> optional. In other words it computes the FA which
accepts the language of <i class="arg">fa</i> and the empty the word (epsilon) as
well.</p>
<p>The result will have all states and transitions of the input, and new
start and final states.</p></dd>
<dt><a name="11"><b class="cmd">::grammar::fa::op::union</b> <i class="arg">fa</i> <i class="arg">fb</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd><p>Combines the FAs <i class="arg">fa</i> and <i class="arg">fb</i> such that the resulting FA
accepts the union of the languages of the two FAs.</p>
<p>The result will have all states and transitions of the two input FAs,
and new start and final states. All states of <i class="arg">fb</i> which exist in
<i class="arg">fa</i> as well will be renamed, and the <i class="arg">mapvar</i> will contain a
mapping from the old states of <i class="arg">fb</i> to the new ones, if present.</p>
<p>It should be noted that the result will be non-deterministic, even if
the inputs are deterministic.</p></dd>
<dt><a name="12"><b class="cmd">::grammar::fa::op::intersect</b> <i class="arg">fa</i> <i class="arg">fb</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd><p>Combines the FAs <i class="arg">fa</i> and <i class="arg">fb</i> such that the resulting FA
accepts the intersection of the languages of the two FAs. In other
words, the result will accept a word if and only if the word is
accepted by both <i class="arg">fa</i> and <i class="arg">fb</i>. The result will be useful, but
not necessarily deterministic or minimal.</p>
<p>The command will store a dictionary describing the relationship
between the new states of the resulting fa and the pairs of states of
the input FAs in <i class="arg">mapvar</i>, if it has been specified. Keys of the
dictionary are the handles for the states of the resulting fa, values
are pairs of states from the input FAs. Pairs are represented by
lists. The first element in each pair will be a state in <i class="arg">fa</i>, the
second element will be drawn from <i class="arg">fb</i>.</p></dd>
<dt><a name="13"><b class="cmd">::grammar::fa::op::difference</b> <i class="arg">fa</i> <i class="arg">fb</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd><p>Combines the FAs <i class="arg">fa</i> and <i class="arg">fb</i> such that the resulting FA
accepts the difference of the languages of the two FAs. In other
words, the result will accept a word if and only if the word is
accepted by <i class="arg">fa</i>, but not by <i class="arg">fb</i>. This can also be expressed
as the intersection of <i class="arg">fa</i> with the complement of <i class="arg">fb</i>. The
result will be useful, but not necessarily deterministic or minimal.</p>
<p>The command will store a dictionary describing the relationship
between the new states of the resulting fa and the pairs of states of
the input FAs in <i class="arg">mapvar</i>, if it has been specified. Keys of the
dictionary are the handles for the states of the resulting fa, values
are pairs of states from the input FAs. Pairs are represented by
lists. The first element in each pair will be a state in <i class="arg">fa</i>, the
second element will be drawn from <i class="arg">fb</i>.</p></dd>
<dt><a name="14"><b class="cmd">::grammar::fa::op::concatenate</b> <i class="arg">fa</i> <i class="arg">fb</i> <span class="opt">?<i class="arg">mapvar</i>?</span></a></dt>
<dd><p>Combines the FAs <i class="arg">fa</i> and <i class="arg">fb</i> such that the resulting FA
accepts the cross-product of the languages of the two FAs. I.e. a word
W will be accepted by the result if there are two words A and B
accepted by <i class="arg">fa</i>, and <i class="arg">fb</i> resp. and W is the concatenation of
A and B.</p>
<p>The result FA will be non-deterministic.</p></dd>
<dt><a name="15"><b class="cmd">::grammar::fa::op::fromRegex</b> <i class="arg">fa</i> <i class="arg">regex</i> <span class="opt">?<i class="arg">over</i>?</span></a></dt>
<dd><p>Generates a non-deterministic FA which accepts the same language as
the regular expression <i class="arg">regex</i>. If the <i class="arg">over</i> is specified it
is treated as the set of symbols the regular expression and the
automaton are defined over. The command will compute the set from the
&quot;S&quot; constructors in <i class="arg">regex</i> when <i class="arg">over</i> was not
specified. This set is important if and only if the complement
operator &quot;!&quot; is used in <i class="arg">regex</i> as the complementary language of
an FA is quite different for different sets of symbols.</p>
<p>The regular expression is represented by a nested list, which forms
a syntax tree. The following structures are legal:</p>
<dl class="doctools_definitions">
<dt>{S x}</dt>
<dd><p>Atomic regular expression. Everything else is constructed from
these. Accepts the <b class="const">S</b>ymbol &quot;x&quot;.</p></dd>
<dt>{. A1 A2 ...}</dt>
<dd><p>Concatenation operator. Accepts the concatenation of the regular
expressions <b class="variable">A1</b>, <b class="variable">A2</b>, etc.</p>
<p><em>Note</em> that this operator accepts zero or more arguments. With zero
arguments the represented language is <i class="term">epsilon</i>, the empty word.</p></dd>
<dt>{| A1 A2 ...}</dt>
<dd><p>Choice operator, also called &quot;Alternative&quot;. Accepts all input accepted
by at least one of the regular expressions <b class="variable">A1</b>, <b class="variable">A2</b>, etc. In
other words, the union of <b class="variable">A1</b>, <b class="variable">A2</b>.</p>
<p><em>Note</em> that this operator accepts zero or more arguments. With zero
arguments the represented language is the <i class="term">empty</i> language,
the language without words.</p></dd>
<dt>{&amp; A1 A2 ...}</dt>
<dd><p>Intersection operator, logical and. Accepts all input accepted which
is accepted by all of the regular expressions <b class="variable">A1</b>, <b class="variable">A2</b>,
etc. In other words, the intersection of <b class="variable">A1</b>, <b class="variable">A2</b>.</p></dd>
<dt>{? A}</dt>
<dd><p>Optionality operator. Accepts the empty word and anything from the
regular expression <b class="variable">A</b>.</p></dd>
<dt>{* A}</dt>
<dd><p>Kleene closure. Accepts the empty word and any finite concatenation of
words accepted by the regular expression <b class="variable">A</b>.</p></dd>
<dt>{+ A}</dt>
<dd><p>Positive Kleene closure. Accepts any finite concatenation of words
accepted by the regular expression <b class="variable">A</b>, but not the empty word.</p></dd>
<dt>{! A}</dt>
<dd><p>Complement operator. Accepts any word not accepted by the regular
expression <b class="variable">A</b>. Note that the complement depends on the set of
symbol the result should run over. See the discussion of the argument
<i class="arg">over</i> before.</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::grammar::fa::op::toRegexp</b> <i class="arg">fa</i></a></dt>
<dd><p>This command generates and returns a regular expression which accepts
the same language as the finite automaton <i class="arg">fa</i>. The regular
expression is in the format as described above, for
<b class="cmd">::grammar::fa::op::fromRegex</b>.</p></dd>
<dt><a name="17"><b class="cmd">::grammar::fa::op::toRegexp2</b> <i class="arg">fa</i></a></dt>
<dd><p>This command has the same functionality as <b class="cmd">::grammar::fa::op::toRegexp</b>,
but uses a different algorithm to simplify the generated regular expressions.</p></dd>
<dt><a name="18"><b class="cmd">::grammar::fa::op::toTclRegexp</b> <i class="arg">regexp</i> <i class="arg">symdict</i></a></dt>
<dd><p>This command generates and returns a regular expression in Tcl syntax for the
regular expression <i class="arg">regexp</i>, if that is possible. <i class="arg">regexp</i> is in the
same format as expected by <b class="cmd">::grammar::fa::op::fromRegex</b>.</p>
<p>The command will fail and throw an error if <i class="arg">regexp</i> contains
complementation and intersection operations.</p>
<p>The argument <i class="arg">symdict</i> is a dictionary mapping symbol names to
pairs of <i class="term">syntactic type</i> and Tcl-regexp. If a symbol
occurring in the <i class="arg">regexp</i> is not listed in this dictionary then
single-character symbols are considered to designate themselves
whereas multiple-character symbols are considered to be a character
class name.</p></dd>
<dt><a name="19"><b class="cmd">::grammar::fa::op::simplifyRegexp</b> <i class="arg">regexp</i></a></dt>
<dd><p>This command simplifies a regular expression by applying the following
algorithm first to the main expression and then recursively to all
sub-expressions:</p>
<ol class="doctools_enumerated">
<li><p>Convert the expression into a finite automaton.</p></li>
<li><p>Minimize the automaton.</p></li>
<li><p>Convert the automaton back to a regular expression.</p></li>
<li><p>Choose the shorter of original expression and expression from
the previous step.</p></li>
</ol></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key320">automaton</a>, <a href="../../../../index.html#key325">finite automaton</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key322">regular grammar</a>, <a href="../../../../index.html#key321">regular languages</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_me/gasm.html.















































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439

<div class='fossil-doc' data-title='grammar::me::cpu::gasm - Grammar operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::cpu::gasm(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::cpu::gasm - ME assembler</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">DEFINITIONS</a></li>
<li class="doctools_section"><a href="#section3">API</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">grammar::me::cpu::gasm <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::me::cpu::gasm::begin</b> <i class="arg">g</i> <i class="arg">n</i> <span class="opt">?<i class="arg">mode</i>?</span> <span class="opt">?<i class="arg">note</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::grammar::me::cpu::gasm::done</b> <b class="const">--&gt;</b> <i class="arg">t</i></a></li>
<li><a href="#3"><b class="cmd">::grammar::me::cpu::gasm::state</b></a></li>
<li><a href="#4"><b class="cmd">::grammar::me::cpu::gasm::state!</b> <i class="arg">s</i></a></li>
<li><a href="#5"><b class="cmd">::grammar::me::cpu::gasm::lift</b> <i class="arg">t</i> <i class="arg">dst</i> <b class="const">=</b> <i class="arg">src</i></a></li>
<li><a href="#6"><b class="cmd">::grammar::me::cpu::gasm::Inline</b> <i class="arg">t</i> <i class="arg">node</i> <i class="arg">label</i></a></li>
<li><a href="#7"><b class="cmd">::grammar::me::cpu::gasm::Cmd</b> <i class="arg">cmd</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#8"><b class="cmd">::grammar::me::cpu::gasm::Bra</b></a></li>
<li><a href="#9"><b class="cmd">::grammar::me::cpu::gasm::Nop</b> <i class="arg">text</i></a></li>
<li><a href="#10"><b class="cmd">::grammar::me::cpu::gasm::Note</b> <i class="arg">text</i></a></li>
<li><a href="#11"><b class="cmd">::grammar::me::cpu::gasm::Jmp</b> <i class="arg">label</i></a></li>
<li><a href="#12"><b class="cmd">::grammar::me::cpu::gasm::Exit</b></a></li>
<li><a href="#13"><b class="cmd">::grammar::me::cpu::gasm::Who</b> <i class="arg">label</i></a></li>
<li><a href="#14"><b class="cmd">::grammar::me::cpu::gasm::/Label</b> <i class="arg">name</i></a></li>
<li><a href="#15"><b class="cmd">::grammar::me::cpu::gasm::/Clear</b></a></li>
<li><a href="#16"><b class="cmd">::grammar::me::cpu::gasm::/Ok</b></a></li>
<li><a href="#17"><b class="cmd">::grammar::me::cpu::gasm::/Fail</b></a></li>
<li><a href="#18"><b class="cmd">::grammar::me::cpu::gasm::/At</b> <i class="arg">name</i></a></li>
<li><a href="#19"><b class="cmd">::grammar::me::cpu::gasm::/CloseLoop</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a simple in-memory assembler. Its origin is that
of a support package for use by packages converting PEG and other
grammars into a corresponding matcher based on the ME virtual machine,
like <b class="package">page::compiler::peg::mecpu</b>. Despite that it is actually
mostly agnostic regarding the instructions, users can choose any
instruction set they like.</p>
<p>The program under construction is held in a graph structure (See
package <b class="package"><a href="../struct/graph.html">struct::graph</a></b>) during assembly and subsequent
manipulation, with instructions represented by nodes, and the flow of
execution between instructions explicitly encoded in the arcs between
them.</p>
<p>In this model jumps are not encoded explicitly, they are implicit in
the arcs. The generation of explicit jumps is left to any code
converting the graph structure into a more conventional
representation. The same goes for branches. They are implicitly
encoded by all instructions which have two outgoing arcs, whereas all
other instructions have only one outgoing arc. Their conditonality is
handled by tagging their outgoing arcs with information about the
conditions under which they are taken.</p>
<p>While the graph the assembler operates on is supplied from the
outside, i.e. external, it does manage some internal state, namely:</p>
<ol class="doctools_enumerated">
<li><p>The handle of the graph node most assembler operations will
work on, the <i class="term">anchor</i>.</p></li>
<li><p>A mapping from arbitrary strings to instructions. I.e. it is
possible to <i class="term">label</i> an instruction during assembly, and later
recall that instruction by its label.</p></li>
<li><p>The condition code to use when creating arcs between
instructions, which is one of <b class="const">always</b>, <b class="const">ok</b>, and
<b class="const">fail</b>.</p></li>
<li><p>The current operation mode, one of <b class="const">halt</b>,
<b class="const">okfail</b>, and <b class="const">!okfail</b>.</p></li>
<li><p>The name of a node in a tree. This, and the operation mode
above are the parts most heavily influenced by the needs of a grammar
compiler, as they assume some basic program structures (selected
through the operation mode), and intertwine the graph with a tree,
like the AST for the grammar to be compiled.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">DEFINITIONS</a></h2>
<p>As the graph the assembler is operating on, and the tree it is
intertwined with, are supplied to the assembler from the outside it is
necessary to specify the API expected from them, and to describe the
structures expected and/or generated by the assembler in either.</p>
<ol class="doctools_enumerated">
<li><p>Any graph object command used by the assembler has to provide
the API as specified in the documentation for the package
<b class="package"><a href="../struct/graph.html">struct::graph</a></b>.</p></li>
<li><p>Any tree object command used by the assembler has to provide
the API as specified in the documentation for the package
<b class="package"><a href="../struct/struct_tree.html">struct::tree</a></b>.</p></li>
<li><p>Any instruction (node) generated by the assembler in a graph
will have at least two, and at most three attributes:</p>
<dl class="doctools_definitions">
<dt><b class="const">instruction</b></dt>
<dd><p>The value of this attribute is the name of
the instruction. The only names currently defined by the assembler are
the three pseudo-instructions</p>
<dl class="doctools_definitions">
<dt><b class="const">NOP</b></dt>
<dd><p>This instruction does nothing. Useful for fixed
framework nodes, unchanging jump destinations, and the like. No
arguments.</p></dd>
<dt><b class="const">C</b></dt>
<dd><p>A .NOP to allow the insertion of arbitrary comments
into the instruction stream, i.e. a comment node. One argument, the
text of the comment.</p></dd>
<dt><b class="const">BRA</b></dt>
<dd><p>A .NOP serving as explicitly coded conditional
branch. No arguments.</p></dd>
</dl>
<p>However we reserve the space of all instructions whose names begin
with a &quot;.&quot; (dot) for future use by the assembler.</p></dd>
<dt><b class="const">arguments</b></dt>
<dd><p>The value of this attribute is a list of
strings, the arguments of the instruction. The contents are dependent
on the actual instruction and the assembler doesn't know or care about
them. This means for example that it has no builtin knowledge about
what instruction need which arguments and thus doesn't perform any
type of checking.</p></dd>
<dt><b class="const">expr</b></dt>
<dd><p>This attribute is optional. When it is present its
value is the name of a node in the tree intertwined with the graph.</p></dd>
</dl>
</li>
<li><p>Any arc between two instructions will have one attribute:</p>
<dl class="doctools_definitions">
<dt><b class="const">condition</b></dt>
<dd><p>The value of this attribute determines under which
condition execution will take this arc. It is one of <b class="const">always</b>,
<b class="const">ok</b>, and <b class="const">fail</b>. The first condition is used for all arcs
which are the single outgoing arc of an instruction. The other two are
used for the two outgoing arcs of an instruction which implicitly
encode a branch.</p></dd>
</dl>
</li>
<li><p>A tree node given to the assembler for cross-referencing will
be written to and given the following attributes, some fixed, some
dependent on the operation mode. All values will be references to
nodes in the instruction graph. Some of the instruction will expect
some or specific sets of these attributes.</p>
<dl class="doctools_definitions">
<dt><b class="const">gas::entry</b></dt>
<dd><p>Always written.</p></dd>
<dt><b class="const">gas::exit</b></dt>
<dd><p>Written for all modes but <b class="const">okfail</b>.</p></dd>
<dt><b class="const">gas::exit::ok</b></dt>
<dd><p>Written for mode <b class="const">okfail</b>.</p></dd>
<dt><b class="const">gas::exit::fail</b></dt>
<dd><p>Written for mode <b class="const">okfail</b>.</p></dd>
</dl>
</li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::me::cpu::gasm::begin</b> <i class="arg">g</i> <i class="arg">n</i> <span class="opt">?<i class="arg">mode</i>?</span> <span class="opt">?<i class="arg">note</i>?</span></a></dt>
<dd><p>This command starts the assembly of an instruction sequence, and
(re)initializes the state of the assembler. After completion of the
instruction sequence use <b class="cmd">::grammar::me::cpu::gasm::done</b> to
finalize the assembler.</p>
<p>It will operate on the graph <i class="arg">g</i> in the specified <i class="arg">mode</i>
(Default is <b class="const">okfail</b>). As part of the initialization it will
always create a standard .NOP instruction and label it &quot;entry&quot;. The
creation of the remaining standard instructions is
<i class="arg">mode</i>-dependent:</p>
<dl class="doctools_definitions">
<dt><b class="const">halt</b></dt>
<dd><p>An &quot;icf_halt&quot; instruction labeled &quot;exit/return&quot;.</p></dd>
<dt><b class="const">!okfail</b></dt>
<dd><p>An &quot;icf_ntreturn&quot; instruction labeled &quot;exit/return&quot;.</p></dd>
<dt><b class="const">okfail</b></dt>
<dd><p>Two .NOP instructions labeled &quot;exit/ok&quot; and
&quot;exit/fail&quot; respectively.</p></dd>
</dl>
<p>The <i class="arg">note</i>, if specified (default is not), is given to the &quot;entry&quot; .NOP instruction.</p>
<p>The node reference <i class="arg">n</i> is simply stored for use by
<b class="cmd">::grammar::me::cpu::gasm::done</b>. It has to refer to a node in the
tree <i class="arg">t</i> argument of that command.</p>
<p>After the initialization is done the &quot;entry&quot; instruction will be the
<i class="term">anchor</i>, and the condition code will be set to <b class="const">always</b>.</p>
<p>The command returns the empy string as its result.</p></dd>
<dt><a name="2"><b class="cmd">::grammar::me::cpu::gasm::done</b> <b class="const">--&gt;</b> <i class="arg">t</i></a></dt>
<dd><p>This command finalizes the creation of an instruction sequence and
then clears the state of the assembler.
<em>NOTE</em> that this <em>does not</em> delete any of the created
instructions. They can be made available to future begin/done cycles.
Further assembly will be possible only after reinitialization of the
system via <b class="cmd">::grammar::me::cpu::gasm::begin</b>.</p>
<p>Before the state is cleared selected references to selected
instructions will be written to attributes of the node <i class="arg">n</i> in the
tree <i class="arg">t</i>.
Which instructions are saved is <i class="arg">mode</i>-dependent. Both <i class="arg">mode</i>
and the destination node <i class="arg">n</i> were specified during invokation of
<b class="cmd">::grammar::me::cpu::gasm::begin</b>.</p>
<p>Independent of the mode a reference to the instruction labeled &quot;entry&quot;
will be saved to the attribute <b class="const">gas::entry</b> of <i class="arg">n</i>. The
reference to the node <i class="arg">n</i> will further be saved into the attribute
&quot;expr&quot; of the &quot;entry&quot; instruction. Beyond that</p>
<dl class="doctools_definitions">
<dt><b class="const">halt</b></dt>
<dd><p>A reference to the instruction labeled
&quot;exit/return&quot; will be saved to the attribute <b class="const">gas::exit</b> of
<i class="arg">n</i>.</p></dd>
<dt><b class="const">okfail</b></dt>
<dd><p>See <b class="const">halt</b>.</p></dd>
<dt><b class="const">!okfail</b></dt>
<dd><p>Reference to the two instructions labeled
&quot;exit/ok&quot; and &quot;exit/fail&quot; will be saved to the attributes
<b class="const">gas::exit::ok</b> and <b class="const">gas::exit::fail</b> of <i class="arg">n</i>
respectively.</p></dd>
</dl>
<p>The command returns the empy string as its result.</p></dd>
<dt><a name="3"><b class="cmd">::grammar::me::cpu::gasm::state</b></a></dt>
<dd><p>This command returns the current state of the assembler. Its format is
not documented and considered to be internal to the package.</p></dd>
<dt><a name="4"><b class="cmd">::grammar::me::cpu::gasm::state!</b> <i class="arg">s</i></a></dt>
<dd><p>This command takes a serialized assembler state <i class="arg">s</i> as returned by
<b class="cmd">::grammar::me::cpu::gasm::state</b> and makes it the current state
of the assembler.</p>
<p><em>Note</em> that this may overwrite label definitions, however all
non-conflicting label definitions in the state before are not touched
and merged with <i class="arg">s</i>.</p>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="5"><b class="cmd">::grammar::me::cpu::gasm::lift</b> <i class="arg">t</i> <i class="arg">dst</i> <b class="const">=</b> <i class="arg">src</i></a></dt>
<dd><p>This command operates on the tree <i class="arg">t</i>. It copies the contents of
the attributes <b class="const">gas::entry</b>, <b class="const">gas::exit::ok</b> and
<b class="const">gas::exit::fail</b> from the node <i class="arg">src</i> to the node <i class="arg">dst</i>.
It returns the empty string as its result.</p></dd>
<dt><a name="6"><b class="cmd">::grammar::me::cpu::gasm::Inline</b> <i class="arg">t</i> <i class="arg">node</i> <i class="arg">label</i></a></dt>
<dd><p>This command links an instruction sequence created by an earlier
begin/done pair into the current instruction sequence.</p>
<p>To this end it</p>
<ol class="doctools_enumerated">
<li><p>reads the instruction references from the attributes
<b class="const">gas::entry</b>, <b class="const">gas::exit::ok</b>, and <b class="const">gas::exit::fail</b>
from the node <i class="arg">n</i> of the tree <i class="arg">t</i> and makes them available to
assembler und the labels <i class="arg">label</i>/entry, <i class="arg">label</i>/exit::ok, and
<i class="arg">label</i>/exit::fail respectively.</p></li>
<li><p>Creates an arc from the <i class="term">anchor</i> to the node labeled
<i class="arg">label</i>/entry, and tags it with the current condition code.</p></li>
<li><p>Makes the node labeled <i class="arg">label</i>/exit/ok the new <i class="term">anchor</i>.</p></li>
</ol>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="7"><b class="cmd">::grammar::me::cpu::gasm::Cmd</b> <i class="arg">cmd</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This is the basic command to add instructions to the graph.
It creates a new instruction of type <i class="arg">cmd</i> with the given
arguments <i class="arg">arg</i>...
If the <i class="term">anchor</i> was defined it will also create an arc from the
<i class="term">anchor</i> to the new instruction using the current condition code.
After the call the new instruction will be the <i class="term">anchor</i> and the
current condition code will be set to <b class="const">always</b>.</p>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="8"><b class="cmd">::grammar::me::cpu::gasm::Bra</b></a></dt>
<dd><p>This is a convenience command to create a .BRA pseudo-instruction. It
uses <b class="cmd">::grammar::me::cpu::gasm::Cmd</b> to actually create the
instruction and inherits its behaviour.</p></dd>
<dt><a name="9"><b class="cmd">::grammar::me::cpu::gasm::Nop</b> <i class="arg">text</i></a></dt>
<dd><p>This is a convenience command to create a .NOP pseudo-instruction. It
uses <b class="cmd">::grammar::me::cpu::gasm::Cmd</b> to actually create the
instruction and inherits its behaviour.
The <i class="arg">text</i> will be saved as the first and only argument of the new
instruction.</p></dd>
<dt><a name="10"><b class="cmd">::grammar::me::cpu::gasm::Note</b> <i class="arg">text</i></a></dt>
<dd><p>This is a convenience command to create a .C pseudo-instruction,
i.e. a comment. It uses <b class="cmd">::grammar::me::cpu::gasm::Cmd</b> to
actually create the instruction and inherits its behaviour.
The <i class="arg">text</i> will be saved as the first and only argument of the new
instruction.</p></dd>
<dt><a name="11"><b class="cmd">::grammar::me::cpu::gasm::Jmp</b> <i class="arg">label</i></a></dt>
<dd><p>This command creates an arc from the <i class="term">anchor</i> to the instruction
labeled with <i class="arg">label</i>, and tags with the the current condition
code.</p>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="12"><b class="cmd">::grammar::me::cpu::gasm::Exit</b></a></dt>
<dd><p>This command creates an arc from the <i class="term">anchor</i> to one of the exit
instructions, based on the operation mode (see
<b class="cmd">::grammar::me::cpu::gasm::begin</b>), and tags it with current
condition code.</p>
<p>For mode <b class="const">okfail</b> it links to the instruction labeled either
&quot;exit/ok&quot; or &quot;exit/fail&quot;, depending on the current condition code, and
tagging it with the current condition code
For the other two modes it links to the instruction labeled
&quot;exit/return&quot;, tagging it condition code <b class="const">always</b>, independent
the current condition code.</p>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="13"><b class="cmd">::grammar::me::cpu::gasm::Who</b> <i class="arg">label</i></a></dt>
<dd><p>This command returns a reference to the instruction labeled with
<i class="arg">label</i>.</p></dd>
<dt><a name="14"><b class="cmd">::grammar::me::cpu::gasm::/Label</b> <i class="arg">name</i></a></dt>
<dd><p>This command labels the <i class="term">anchor</i> with <i class="arg">name</i>.
<em>Note</em> that an instruction can have more than one label.</p>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="15"><b class="cmd">::grammar::me::cpu::gasm::/Clear</b></a></dt>
<dd><p>This command clears the <i class="term">anchor</i>, leaving it undefined, and
further resets the current condition code to <b class="const">always</b>.</p>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="16"><b class="cmd">::grammar::me::cpu::gasm::/Ok</b></a></dt>
<dd><p>This command sets the current condition code to <b class="const">ok</b>.</p>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="17"><b class="cmd">::grammar::me::cpu::gasm::/Fail</b></a></dt>
<dd><p>This command sets the current condition code to <b class="const">fail</b>.</p>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="18"><b class="cmd">::grammar::me::cpu::gasm::/At</b> <i class="arg">name</i></a></dt>
<dd><p>This command sets the <i class="term">anchor</i> to the instruction labeled with
<i class="arg">name</i>, and further resets the current condition code to
<b class="const">always</b>.</p>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="19"><b class="cmd">::grammar::me::cpu::gasm::/CloseLoop</b></a></dt>
<dd><p>This command marks the <i class="term">anchor</i> as the last instruction in a loop
body, by creating the attribute <b class="const">LOOP</b>.</p>
<p>The command returns the empty string as its result.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key318">assembler</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key305">graph</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key300">tree</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_me/me_ast.html.









































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212

<div class='fossil-doc' data-title='grammar::me_ast - Grammar operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me_ast(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me_ast - Various representations of ASTs</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">AST VALUES</a></li>
<li class="doctools_section"><a href="#section3">AST OBJECTS</a></li>
<li class="doctools_section"><a href="#section4">EXTENDED AST OBJECTS</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies various representations for the
<i class="term"><a href="../../../../index.html#key746">abstract syntax tree</a></i>s (short <i class="term"><a href="../../../../index.html#key815">AST</a></i>) generated by
instances of ME virtual machines, independent of variant.
Please go and read the document <b class="syscmd"><a href="me_intro.html">grammar::me_intro</a></b> first if
you do not know what a ME virtual machine is.</p>
<p>ASTs and all the representations we specify distinguish between two
types of nodes, namely:</p>
<dl class="doctools_definitions">
<dt>Terminal</dt>
<dd><p>Terminal nodes refer to the terminal symbols found in the token
stream. They are always leaf nodes. I.e. terminal nodes never have
children.</p></dd>
<dt>Nonterminal</dt>
<dd><p>Nonterminal nodes represent a nonterminal symbol of the grammar used
during parsing. They can occur as leaf and inner nodes of the
tree.</p></dd>
</dl>
<p>Both types of nodes carry basic range information telling a user which
parts of the input are covered by the node by providing the location
of the first and last tokens found within the range. Locations are
provided as non-negative integer offsets from the beginning of the
token stream, with the first token found in the stream located at
offset 0 (zero).</p>
<p>The root of an AS tree can be either a terminal or nonterminal node.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">AST VALUES</a></h2>
<p>This representation of ASTs is a Tcl list. The main list represents
the root node of the tree, with the representations of the children
nested within.</p>
<p>Each node is represented by a single Tcl list containing three or more
elements. The first element is either the empty string or the name of
a nonterminal symbol (which is never the empty string). The second and
third elements are then the locations of the first and last tokens.
Any additional elements after the third are then the representations
of the children, with the leftmost child first, i.e. as the fourth
element of the list representing the node.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AST OBJECTS</a></h2>
<p>In this representation an AST is represented by a Tcl object command
whose API is compatible to the tree objects provided by the package
<b class="package"><a href="../struct/struct_tree.html">struct::tree</a></b>. I.e it has to support at least all of the
methods described by that package, and may support more.</p>
<p>Because of this the remainder of the specifications is written using
the terms of <b class="package"><a href="../struct/struct_tree.html">struct::tree</a></b>.</p>
<p>Each node of the AST directly maps to a node in the tree object. All
data beyond the child nodes, i.e. node type and input locations, are
stored in attributes of the node in the tree object. They are:</p>
<dl class="doctools_definitions">
<dt>type</dt>
<dd><p>The type of the AST node. The recognized values are <b class="const">terminal</b>
and <b class="const">nonterminal</b>.</p></dd>
<dt>range</dt>
<dd><p>The locations of the first and last token of the terminal data in the
input covered by the node. This is a list containing two locations.</p></dd>
<dt>detail</dt>
<dd><p>This attribute is present only for nonterminal nodes. It contains the
name of the nonterminal symbol stored in the node.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXTENDED AST OBJECTS</a></h2>
<p>Extended AST objects are like AST objects, with additional
information.</p>
<dl class="doctools_definitions">
<dt>detail</dt>
<dd><p>This attribute is now present at all nodes. Its contents are unchanged
for nonterminal nodes. For terminal nodes it contains a list
describing all tokens from the input which are covered by the node.</p>
<p>Each element of the list contains the token name, the associated
lexeme attribute, line number, and column index, in this order.</p></dd>
<dt>range_lc</dt>
<dd><p>This new attribute is defined for all nodes, and contains the
locations from attribute <i class="term">range</i> translated into line number and
column index. Lines are counted from 1, columns are counted from 0.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key815">AST</a>, <a href="../../../../index.html#key746">abstract syntax tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_me/me_cpu.html.































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351

<div class='fossil-doc' data-title='grammar::me::cpu - Grammar operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::cpu(n) 0.2 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::cpu - Virtual machine implementation II for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">CLASS API</a></li>
<li class="doctools_subsection"><a href="#subsection2">OBJECT API</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">grammar::me::cpu <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::me::cpu</b> <i class="arg">meName</i> <i class="arg">matchcode</i></a></li>
<li><a href="#2"><b class="cmd">meName</b> <b class="method">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">meName</i> <b class="method">lc</b> <i class="arg">location</i></a></li>
<li><a href="#4"><i class="arg">meName</i> <b class="method">tok</b> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#5"><i class="arg">meName</i> <b class="method">pc</b> <i class="arg">state</i></a></li>
<li><a href="#6"><i class="arg">meName</i> <b class="method">iseof</b> <i class="arg">state</i></a></li>
<li><a href="#7"><i class="arg">meName</i> <b class="method">at</b> <i class="arg">state</i></a></li>
<li><a href="#8"><i class="arg">meName</i> <b class="method">cc</b> <i class="arg">state</i></a></li>
<li><a href="#9"><i class="arg">meName</i> <b class="method">sv</b></a></li>
<li><a href="#10"><i class="arg">meName</i> <b class="method">ok</b></a></li>
<li><a href="#11"><i class="arg">meName</i> <b class="method">error</b></a></li>
<li><a href="#12"><i class="arg">meName</i> <b class="method">lstk</b> <i class="arg">state</i></a></li>
<li><a href="#13"><i class="arg">meName</i> <b class="method">astk</b> <i class="arg">state</i></a></li>
<li><a href="#14"><i class="arg">meName</i> <b class="method">mstk</b> <i class="arg">state</i></a></li>
<li><a href="#15"><i class="arg">meName</i> <b class="method">estk</b> <i class="arg">state</i></a></li>
<li><a href="#16"><i class="arg">meName</i> <b class="method">rstk</b> <i class="arg">state</i></a></li>
<li><a href="#17"><i class="arg">meName</i> <b class="method">nc</b> <i class="arg">state</i></a></li>
<li><a href="#18"><i class="arg">meName</i> <b class="method">ast</b></a></li>
<li><a href="#19"><i class="arg">meName</i> <b class="method">halted</b></a></li>
<li><a href="#20"><i class="arg">meName</i> <b class="method">code</b></a></li>
<li><a href="#21"><i class="arg">meName</i> <b class="method">eof</b></a></li>
<li><a href="#22"><i class="arg">meName</i> <b class="method">put</b> <i class="arg">tok</i> <i class="arg">lex</i> <i class="arg">line</i> <i class="arg">col</i></a></li>
<li><a href="#23"><i class="arg">meName</i> <b class="method">putstring</b> <i class="arg">string</i> <i class="arg">lvar</i> <i class="arg">cvar</i></a></li>
<li><a href="#24"><i class="arg">meName</i> <b class="method">run</b> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#25"><i class="arg">meName</i> <b class="method">pull</b> <i class="arg">nextcmd</i></a></li>
<li><a href="#26"><i class="arg">meName</i> <b class="method">reset</b></a></li>
<li><a href="#27"><i class="arg">meName</i> <b class="method">destroy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides an implementation of the ME virtual machine.
Please go and read the document <b class="syscmd"><a href="me_intro.html">grammar::me_intro</a></b> first if
you do not know what a ME virtual machine is.</p>
<p>This implementation provides an object-based API and the machines are
not truly tied to Tcl. A C implementation of the same API is quite
possible.</p>
<p>Internally the package actually uses the value-based machine
manipulation commands as provided by the package
<b class="package"><a href="me_cpucore.html">grammar::me::cpu::core</a></b> to perform its duties.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">CLASS API</a></h3>
<p>The package directly provides only a single command for the
construction of ME virtual machines.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::me::cpu</b> <i class="arg">meName</i> <i class="arg">matchcode</i></a></dt>
<dd><p>The command creates a new ME machine object with an associated global
Tcl command whose name is <i class="arg">meName</i>. This command may be used to
invoke various operations on the machine.
It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">meName</b> <b class="method">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>The argument <i class="arg">matchcode</i> contains the match instructions the
machine has to execute while parsing the input stream. Please read
section <b class="sectref">MATCH CODE REPRESENTATION</b> of the
documentation for the package <b class="package"><a href="me_cpucore.html">grammar::me::cpu::core</a></b> for
the specification of the structure of this value.</p>
<p>The <i class="arg">tokmap</i> argument taken by the implementation provided by the
package <b class="package"><a href="me_tcl.html">grammar::me::tcl</a></b> is here hidden inside of the match
instructions and therefore not needed.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">OBJECT API</a></h3>
<p>All ME virtual machine objects created by the class command specified
in section <span class="sectref"><a href="#subsection1">CLASS API</a></span> support the methods listed below.</p>
<p>The machines provided by this package provide methods for operation in
both push- and pull-styles. Push-style means that tokens are pushed
into the machine state when they arrive, triggering further execution
until they are consumed. In other words, this allows the machine to be
suspended and resumed at will and an arbitrary number of times, the
quasi-parallel operation of several machines, and the operation as
part of the event loop.</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">meName</i> <b class="method">lc</b> <i class="arg">location</i></a></dt>
<dd><p>This method converts the location of a token given as offset in the
input stream into the associated line number and column index. The
result of the command is a 2-element list containing the two values,
in the order mentioned in the previous sentence.
This allows higher levels to convert the location information found in
the error status and the generated AST into more human readable data.</p>
<p><em>Note</em> that the command is not able to convert locations which
have not been reached by the machine yet. In other words, if the
machine has read 7 tokens the command is able to convert the offsets
<b class="const">0</b> to <b class="const">6</b>, but nothing beyond that. This also shows that
it is not possible to convert offsets which refer to locations before
the beginning of the stream.</p></dd>
<dt><a name="4"><i class="arg">meName</i> <b class="method">tok</b> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>This method returns a Tcl list containing the part of the input stream
between the locations <i class="arg">from</i> and <i class="arg">to</i> (both inclusive). If
<i class="arg">to</i> is not specified it will default to the value of <i class="arg">from</i>.
If <i class="arg">from</i> is not specified either the whole input stream is returned.</p>
<p>Each element of the returned list is a list of four elements, the
token, its associated lexeme, line number, and column index, in this
order.
This command places the same restrictions on its location arguments as
the method <b class="method">lc</b>.</p></dd>
<dt><a name="5"><i class="arg">meName</i> <b class="method">pc</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current value of the stored program counter.</p></dd>
<dt><a name="6"><i class="arg">meName</i> <b class="method">iseof</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current value of the stored eof flag.</p></dd>
<dt><a name="7"><i class="arg">meName</i> <b class="method">at</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current location in the input stream.</p></dd>
<dt><a name="8"><i class="arg">meName</i> <b class="method">cc</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current token.</p></dd>
<dt><a name="9"><i class="arg">meName</i> <b class="method">sv</b></a></dt>
<dd><p>This command returns the current semantic value <i class="term">SV</i> stored in
the machine. This is an abstract syntax tree as specified in the
document <b class="syscmd"><a href="me_ast.html">grammar::me_ast</a></b>, section <b class="sectref">AST VALUES</b>.</p></dd>
<dt><a name="10"><i class="arg">meName</i> <b class="method">ok</b></a></dt>
<dd><p>This method returns the current match status <i class="term">OK</i>.</p></dd>
<dt><a name="11"><i class="arg">meName</i> <b class="method">error</b></a></dt>
<dd><p>This method returns the current error status <i class="term">ER</i>.</p></dd>
<dt><a name="12"><i class="arg">meName</i> <b class="method">lstk</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the location stack.</p></dd>
<dt><a name="13"><i class="arg">meName</i> <b class="method">astk</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the AST stack.</p></dd>
<dt><a name="14"><i class="arg">meName</i> <b class="method">mstk</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the AST marker stack.</p></dd>
<dt><a name="15"><i class="arg">meName</i> <b class="method">estk</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the error stack.</p></dd>
<dt><a name="16"><i class="arg">meName</i> <b class="method">rstk</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the subroutine return stack.</p></dd>
<dt><a name="17"><i class="arg">meName</i> <b class="method">nc</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the nonterminal match cache as a dictionary.</p></dd>
<dt><a name="18"><i class="arg">meName</i> <b class="method">ast</b></a></dt>
<dd><p>This method returns the current top entry of the AST stack <i class="term">AS</i>.
This is an abstract syntax tree as specified in the document
<b class="syscmd"><a href="me_ast.html">grammar::me_ast</a></b>, section <b class="sectref">AST VALUES</b>.</p></dd>
<dt><a name="19"><i class="arg">meName</i> <b class="method">halted</b></a></dt>
<dd><p>This method returns a boolean value telling the caller whether the
engine has halted execution or not. Halt means that no further
matching is possible, and the information retrieved via the other
method is final. Attempts to <b class="method">run</b> the engine will be ignored,
until a <b class="method">reset</b> is made.</p></dd>
<dt><a name="20"><i class="arg">meName</i> <b class="method">code</b></a></dt>
<dd><p>This method returns the <i class="arg">code</i> information used to construct the
object. In other words, the match program executed by the machine.</p></dd>
<dt><a name="21"><i class="arg">meName</i> <b class="method">eof</b></a></dt>
<dd><p>This method adds an end of file marker to the end of the input stream.
This signals the machine that the current contents of the input queue
are the final parts of the input and nothing will come after. Attempts
to put more characters into the queue will fail.</p></dd>
<dt><a name="22"><i class="arg">meName</i> <b class="method">put</b> <i class="arg">tok</i> <i class="arg">lex</i> <i class="arg">line</i> <i class="arg">col</i></a></dt>
<dd><p>This method adds the token <i class="arg">tok</i> to the end of the input stream,
with associated lexeme data <i class="arg">lex</i> and <i class="arg">line</i>/<i class="arg">col</i>umn
information.</p></dd>
<dt><a name="23"><i class="arg">meName</i> <b class="method">putstring</b> <i class="arg">string</i> <i class="arg">lvar</i> <i class="arg">cvar</i></a></dt>
<dd><p>This method adds each individual character in the <i class="arg">string</i> as a
token to the end of the input stream, from first to last. The lexemes
will be empty and the line/col information is computed based on the
characters encountered and the data in the variables <i class="arg">lvar</i> and
<i class="arg">cvar</i>.</p></dd>
<dt><a name="24"><i class="arg">meName</i> <b class="method">run</b> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>This methods causes the engine to execute match instructions until
either</p>
<ul class="doctools_itemized">
<li><p><i class="arg">n</i> instructions have been executed, or</p></li>
<li><p>a halt instruction was executed, or</p></li>
<li><p>the input queue is empty and the code is asking for more tokens to
process.</p></li>
</ul>
<p>If no limit <i class="arg">n</i> was set only the last two conditions are checked
for.</p></dd>
<dt><a name="25"><i class="arg">meName</i> <b class="method">pull</b> <i class="arg">nextcmd</i></a></dt>
<dd><p>This method implements pull-style operation of the machine. It causes
it to execute match instructions until either a halt instruction is
reached, or the command prefix
<i class="arg">nextcmd</i> ceases to deliver more tokens.</p>
<p>The command prefix <i class="arg">nextcmd</i> represents the input stream of
characters and is invoked by the machine whenever the a new character
from the stream is required. The instruction for handling this is
<i class="term">ict_advance</i>.
The callback has to return either the empty list, or a list of 4
elements containing the token, its lexeme attribute, and its location
as line number and column index, in this order.
The empty list is the signal that the end of the input stream has been
reached. The lexeme attribute is stored in the terminal cache, but
otherwise not used by the machine.</p>
<p>The end of the input stream for this method does not imply that method
<b class="method">eof</b> is called for the machine as a whole. By avoiding this
and still asking for an explicit call of the method it is possible to
mix push- and pull-style operation during the lifetime of the machine.</p></dd>
<dt><a name="26"><i class="arg">meName</i> <b class="method">reset</b></a></dt>
<dd><p>This method resets the machine to its initial state, discarding any
state it may have.</p></dd>
<dt><a name="27"><i class="arg">meName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method deletes the object and releases all resurces it claimed.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_me/me_cpucore.html.

































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416

<div class='fossil-doc' data-title='grammar::me::cpu::core - Grammar operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::cpu::core(n) 0.2 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::cpu::core - ME virtual machine state manipulation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">MATCH PROGRAM REPRESENTATION</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">CPU STATE</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">grammar::me::cpu::core <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">disasm</b> <i class="arg">asm</i></a></li>
<li><a href="#2"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">asm</b> <i class="arg">asm</i></a></li>
<li><a href="#3"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">new</b> <i class="arg">asm</i></a></li>
<li><a href="#4"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">lc</b> <i class="arg">state</i> <i class="arg">location</i></a></li>
<li><a href="#5"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">tok</b> <i class="arg">state</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#6"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">pc</b> <i class="arg">state</i></a></li>
<li><a href="#7"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">iseof</b> <i class="arg">state</i></a></li>
<li><a href="#8"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">at</b> <i class="arg">state</i></a></li>
<li><a href="#9"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">cc</b> <i class="arg">state</i></a></li>
<li><a href="#10"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">sv</b> <i class="arg">state</i></a></li>
<li><a href="#11"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">ok</b> <i class="arg">state</i></a></li>
<li><a href="#12"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">error</b> <i class="arg">state</i></a></li>
<li><a href="#13"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">lstk</b> <i class="arg">state</i></a></li>
<li><a href="#14"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">astk</b> <i class="arg">state</i></a></li>
<li><a href="#15"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">mstk</b> <i class="arg">state</i></a></li>
<li><a href="#16"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">estk</b> <i class="arg">state</i></a></li>
<li><a href="#17"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">rstk</b> <i class="arg">state</i></a></li>
<li><a href="#18"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">nc</b> <i class="arg">state</i></a></li>
<li><a href="#19"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">ast</b> <i class="arg">state</i></a></li>
<li><a href="#20"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">halted</b> <i class="arg">state</i></a></li>
<li><a href="#21"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">code</b> <i class="arg">state</i></a></li>
<li><a href="#22"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">eof</b> <i class="arg">statevar</i></a></li>
<li><a href="#23"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">put</b> <i class="arg">statevar</i> <i class="arg">tok</i> <i class="arg">lex</i> <i class="arg">line</i> <i class="arg">col</i></a></li>
<li><a href="#24"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">run</b> <i class="arg">statevar</i> <span class="opt">?<i class="arg">n</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides an implementation of the ME virtual machine.
Please go and read the document <b class="syscmd"><a href="me_intro.html">grammar::me_intro</a></b> first if
you do not know what a ME virtual machine is.</p>
<p>This implementation represents each ME virtual machine as a Tcl value
and provides commands to manipulate and query such values to show the
effects of executing instructions, adding tokens, retrieving state,
etc.</p>
<p>The values fully follow the paradigm of Tcl that every value is a
string and while also allowing C implementations for a proper
Tcl_ObjType to keep all the important data in native data structures.
Because of the latter it is recommended to access the state values
<em>only</em> through the commands of this package to ensure that
internal representation is not shimmered away.</p>
<p>The actual structure used by all state values is described in section
<span class="sectref"><a href="#section3">CPU STATE</a></span>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package directly provides only a single command, and all the
functionality is made available through its methods.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">disasm</b> <i class="arg">asm</i></a></dt>
<dd><p>This method returns a list containing a disassembly of the match
instructions in <i class="arg">asm</i>. The format of <i class="arg">asm</i> is specified in the
section <span class="sectref"><a href="#subsection1">MATCH PROGRAM REPRESENTATION</a></span>.</p>
<p>Each element of the result contains instruction label, instruction
name, and the instruction arguments, in this order. The label can be
the empty string. Jump destinations are shown as labels, strings and
tokens unencoded. Token names are prefixed with their numeric id, if,
and only if a tokmap is defined. The two components are separated by a
colon.</p></dd>
<dt><a name="2"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">asm</b> <i class="arg">asm</i></a></dt>
<dd><p>This method returns code in the format as specified in section
<span class="sectref"><a href="#subsection1">MATCH PROGRAM REPRESENTATION</a></span> generated from ME assembly
code <i class="arg">asm</i>, which is in the format as returned by the method
<b class="method">disasm</b>.</p></dd>
<dt><a name="3"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">new</b> <i class="arg">asm</i></a></dt>
<dd><p>This method creates state value for a ME virtual machine in its
initial state and returns it as its result.</p>
<p>The argument <i class="arg">matchcode</i> contains a Tcl representation of the
match instructions the machine has to execute while parsing the input
stream. Its format is specified in the section
<span class="sectref"><a href="#subsection1">MATCH PROGRAM REPRESENTATION</a></span>.</p>
<p>The <i class="arg">tokmap</i> argument taken by the implementation provided by the
package <b class="package"><a href="me_tcl.html">grammar::me::tcl</a></b> is here hidden inside of the match
instructions and therefore not needed.</p></dd>
<dt><a name="4"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">lc</b> <i class="arg">state</i> <i class="arg">location</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and uses it
to convert a location in the input stream (as offset) into a line
number and column index. The result of the method is a 2-element list
containing the two pieces in the order mentioned in the previous
sentence.</p>
<p><em>Note</em> that the method cannot convert locations which the machine
has not yet read from the input stream. In other words, if the machine
has read 7 characters so far it is possible to convert the offsets
<b class="const">0</b> to <b class="const">6</b>, but nothing beyond that. This also shows that
it is not possible to convert offsets which refer to locations before
the beginning of the stream.</p>
<p>This utility allows higher levels to convert the location offsets
found in the error status and the AST into more human readable data.</p></dd>
<dt><a name="5"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">tok</b> <i class="arg">state</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
a Tcl list containing the part of the input stream between the
locations <i class="arg">from</i> and <i class="arg">to</i> (both inclusive). If <i class="arg">to</i> is not
specified it will default to the value of <i class="arg">from</i>. If <i class="arg">from</i> is
not specified either the whole input stream is returned.</p>
<p>This method places the same restrictions on its location arguments as
the method <b class="method">lc</b>.</p></dd>
<dt><a name="6"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">pc</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current value of the stored program counter.</p></dd>
<dt><a name="7"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">iseof</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current value of the stored eof flag.</p></dd>
<dt><a name="8"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">at</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current location in the input stream.</p></dd>
<dt><a name="9"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">cc</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current token.</p></dd>
<dt><a name="10"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">sv</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current semantic value stored in it.
This is an abstract syntax tree as specified in the document
<b class="syscmd"><a href="me_ast.html">grammar::me_ast</a></b>, section <b class="sectref">AST VALUES</b>.</p></dd>
<dt><a name="11"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">ok</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the match status stored in it.</p></dd>
<dt><a name="12"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">error</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current error status stored in it.</p></dd>
<dt><a name="13"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">lstk</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the location stack.</p></dd>
<dt><a name="14"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">astk</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the AST stack.</p></dd>
<dt><a name="15"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">mstk</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the AST marker stack.</p></dd>
<dt><a name="16"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">estk</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the error stack.</p></dd>
<dt><a name="17"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">rstk</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the subroutine return stack.</p></dd>
<dt><a name="18"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">nc</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the nonterminal match cache as a dictionary.</p></dd>
<dt><a name="19"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">ast</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the abstract syntax tree currently at the top of the AST stack stored
in it.
This is an abstract syntax tree as specified in the document
<b class="syscmd"><a href="me_ast.html">grammar::me_ast</a></b>, section <b class="sectref">AST VALUES</b>.</p></dd>
<dt><a name="20"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">halted</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the current halt status stored in it, i.e. if the machine has stopped
or not.</p></dd>
<dt><a name="21"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">code</b> <i class="arg">state</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine and returns
the code stored in it, i.e. the instructions executed by the machine.</p></dd>
<dt><a name="22"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">eof</b> <i class="arg">statevar</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine as stored in
the variable named by <i class="arg">statevar</i> and modifies it so that the eof
flag inside is set. This signals to the machine that whatever token
are in the input queue are the last to be processed. There will be no
more.</p></dd>
<dt><a name="23"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">put</b> <i class="arg">statevar</i> <i class="arg">tok</i> <i class="arg">lex</i> <i class="arg">line</i> <i class="arg">col</i></a></dt>
<dd><p>This method takes the state value of a ME virtual machine as stored in
the variable named by <i class="arg">statevar</i> and modifies it so that the token
<i class="arg">tok</i> is added to the end of the input queue, with associated
lexeme data <i class="arg">lex</i> and <i class="arg">line</i>/<i class="arg">col</i>umn information.</p>
<p>The operation will fail with an error if the eof flag of the machine
has been set through the method <b class="method">eof</b>.</p></dd>
<dt><a name="24"><b class="cmd">::grammar::me::cpu::core</b> <b class="method">run</b> <i class="arg">statevar</i> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>This method takes the state value of a ME virtual machine as stored in
the variable named by <i class="arg">statevar</i>, executes a number of
instructions and stores the state resulting from their modifications
back into the variable.</p>
<p>The execution loop will run until either</p>
<ul class="doctools_itemized">
<li><p><i class="arg">n</i> instructions have been executed, or</p></li>
<li><p>a halt instruction was executed, or</p></li>
<li><p>the input queue is empty and the code is asking for more tokens to
process.</p></li>
</ul>
<p>If no limit <i class="arg">n</i> was set only the last two conditions are checked
for.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">MATCH PROGRAM REPRESENTATION</a></h3>
<p>A match program is represented by nested Tcl list. The first element,
<i class="term">asm</i>, is a list of integer numbers, the instructions to execute,
and their arguments. The second element, <i class="term"><a href="../../../../index.html#key304">pool</a></i>, is a list of
strings, referenced by the instructions, for error messages, token
names, etc. The third element, <i class="term">tokmap</i>, provides ordering
information for the tokens, mapping their names to their numerical
rank. This element can be empty, forcing lexicographic comparison when
matching ranges.</p>
<p>All ME instructions are encoded as integer numbers, with the mapping
given below. A number of the instructions, those which handle error
messages, have been given an additional argument to supply that
message explicitly instead of having it constructed from token names,
etc. This allows the machine state to store only the message ids
instead of the full strings.</p>
<p>Jump destination arguments are absolute indices into the <i class="term">asm</i>
element, refering to the instruction to jump to. Any string arguments
are absolute indices into the <i class="term"><a href="../../../../index.html#key304">pool</a></i> element. Tokens, characters,
messages, and token (actually character) classes to match are coded as
references into the <i class="term"><a href="../../../../index.html#key304">pool</a></i> as well.</p>
<ol class="doctools_enumerated">
<li><p>&quot;<b class="cmd">ict_advance</b> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ict_match_token</b> <i class="arg">tok</i> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ict_match_tokrange</b> <i class="arg">tokbegin</i> <i class="arg">tokend</i> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ict_match_tokclass</b> <i class="arg">code</i> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">inc_restore</b> <i class="arg">branchlabel</i> <i class="arg">nt</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">inc_save</b> <i class="arg">nt</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">icf_ntcall</b> <i class="arg">branchlabel</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">icf_ntreturn</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">iok_ok</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">iok_fail</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">iok_negate</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">icf_jalways</b> <i class="arg">branchlabel</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">icf_jok</b> <i class="arg">branchlabel</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">icf_jfail</b> <i class="arg">branchlabel</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">icf_halt</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">icl_push</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">icl_rewind</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">icl_pop</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">ier_push</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">ier_clear</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">ier_nonterminal</b> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ier_merge</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">isv_clear</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">isv_terminal</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">isv_nonterminal_leaf</b> <i class="arg">nt</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">isv_nonterminal_range</b> <i class="arg">nt</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">isv_nonterminal_reduce</b> <i class="arg">nt</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ias_push</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">ias_mark</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">ias_mrewind</b>&quot;</p></li>
<li><p>&quot;<b class="cmd">ias_mpop</b>&quot;</p></li>
</ol>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CPU STATE</a></h2>
<p>A state value is a list containing the following elements, in the order listed below:</p>
<ol class="doctools_enumerated">
<li><p><i class="term">code</i>: Match instructions, see <span class="sectref"><a href="#subsection1">MATCH PROGRAM REPRESENTATION</a></span>.</p></li>
<li><p><i class="term">pc</i>:   Program counter, <i class="term">int</i>.</p></li>
<li><p><i class="term">halt</i>: Halt flag, <i class="term">boolean</i>.</p></li>
<li><p><i class="term">eof</i>:  Eof flag, <i class="term">boolean</i></p></li>
<li><p><i class="term">tc</i>:   Terminal cache, and input queue. Structure see below.</p></li>
<li><p><i class="term">cl</i>:   Current location, <i class="term">int</i>.</p></li>
<li><p><i class="term">ct</i>:   Current token, <i class="term"><a href="../../../../index.html#key280">string</a></i>.</p></li>
<li><p><i class="term">ok</i>:   Match status, <i class="term">boolean</i>.</p></li>
<li><p><i class="term">sv</i>:   Semantic value, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">er</i>:   Error status, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">ls</i>:   Location stack, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">as</i>:   AST stack, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">ms</i>:   AST marker stack, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">es</i>:   Error stack, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">rs</i>:   Return stack, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">nc</i>:   Nonterminal cache, <i class="term">dictionary</i>.</p></li>
</ol>
<p><i class="term">tc</i>, the input queue of tokens waiting for processing and the
terminal cache containing the tokens already processing are one
unified data structure simply holding all tokens and their
information, with the current location separating that which has been
processed from that which is waiting.
Each element of the queue/cache is a list containing the token, its
lexeme information, line number, and column index, in this order.</p>
<p>All stacks have their top element aat the end, i.e. pushing an item is
equivalent to appending to the list representing the stack, and
popping it removes the last element.</p>
<p><i class="term">er</i>, the error status is either empty or a list of two elements,
a location in the input, and a list of messages, encoded as references
into the <i class="term"><a href="../../../../index.html#key304">pool</a></i> element of the <i class="term">code</i>.</p>
<p><i class="term">nc</i>, the nonterminal cache is keyed by nonterminal name and
location, each value a four-element list containing current location,
match status, semantic value, and error status, in this order.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_me/me_intro.html.



























































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173

<div class='fossil-doc' data-title='grammar::me_intro - Grammar operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me_intro(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me_intro - Introduction to virtual machines for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is an introduction to and overview of the basic
facilities for the parsing and/or matching of <i class="term">token</i>
streams. One possibility often used for the token domain are
characters.</p>
<p>The packages themselves all provide variants of one
<i class="term"><a href="../../../../index.html#key24">virtual machine</a></i>, called a <i class="term">match engine</i> (short
<i class="term">ME</i>), which has all the facilities needed for the matching and
parsing of a stream, and which are either controlled directly, or are
customized with a match program. The virtual machine is basically a
pushdown automaton, with additional elements for backtracking and/or
handling of semantic data and construction of abstract syntax trees
(<i class="term"><a href="../../../../index.html#key815">AST</a></i>).</p>
<p>Because of the high degree of similarity in the actual implementations
of the aforementioned virtual machine and the data structures they
receive and generate these common parts are specified in a separate
document which will be referenced by the documentation for packages
actually implementing it.</p>
<p>The relevant documents are:</p>
<dl class="doctools_definitions">
<dt><b class="package"><a href="me_vm.html">grammar::me_vm</a></b></dt>
<dd><p>Virtual machine specification.</p></dd>
<dt><b class="package"><a href="me_ast.html">grammar::me_ast</a></b></dt>
<dd><p>Specification of various representations used for abstract syntax
trees.</p></dd>
<dt><b class="package"><a href="me_util.html">grammar::me::util</a></b></dt>
<dd><p>Utility commands.</p></dd>
<dt><b class="package"><a href="me_tcl.html">grammar::me::tcl</a></b></dt>
<dd><p>Singleton ME virtual machine implementation tied to Tcl for control
flow and stacks. Hardwired for pull operation. Uninteruptible during
processing.</p></dd>
<dt><b class="package"><a href="me_cpu.html">grammar::me::cpu</a></b></dt>
<dd><p>Object-based ME virtual machine implementation with explicit control
flow, and stacks, using bytecodes. Suspend/Resumable. Push/pull
operation.</p></dd>
<dt><b class="package"><a href="me_cpucore.html">grammar::me::cpu::core</a></b></dt>
<dd><p>Core functionality for state manipulation and stepping used in the
bytecode based implementation of ME virtual machines.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key22">CFG</a>, <a href="../../../../index.html#key27">CFL</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key25">TPDL</a>, <a href="../../../../index.html#key23">context-free grammar</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_me/me_tcl.html.

























































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396

<div class='fossil-doc' data-title='grammar::me::tcl - Grammar operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::tcl(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::tcl - Virtual machine implementation I for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">MACHINE STATE</a></li>
<li class="doctools_section"><a href="#section4">MACHINE INSTRUCTIONS</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">grammar::me::tcl <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::me::tcl</b> <b class="method">cmd</b> <i class="arg">...</i></a></li>
<li><a href="#2"><b class="cmd">::grammar::me::tcl</b> <b class="method">init</b> <i class="arg">nextcmd</i> <span class="opt">?<i class="arg">tokmap</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::grammar::me::tcl</b> <b class="method">lc</b> <i class="arg">location</i></a></li>
<li><a href="#4"><b class="cmd">::grammar::me::tcl</b> <b class="method">tok</b> <i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::grammar::me::tcl</b> <b class="method">tokens</b></a></li>
<li><a href="#6"><b class="cmd">::grammar::me::tcl</b> <b class="method">sv</b></a></li>
<li><a href="#7"><b class="cmd">::grammar::me::tcl</b> <b class="method">ast</b></a></li>
<li><a href="#8"><b class="cmd">::grammar::me::tcl</b> <b class="method">astall</b></a></li>
<li><a href="#9"><b class="cmd">::grammar::me::tcl</b> <b class="method">ctok</b></a></li>
<li><a href="#10"><b class="cmd">::grammar::me::tcl</b> <b class="method">nc</b></a></li>
<li><a href="#11"><b class="cmd">::grammar::me::tcl</b> <b class="method">next</b></a></li>
<li><a href="#12"><b class="cmd">::grammar::me::tcl</b> <b class="method">ord</b></a></li>
<li><a href="#13"><b class="cmd">::grammar::me::tcl::ict_advance</b> <i class="arg">message</i></a></li>
<li><a href="#14"><b class="cmd">::grammar::me::tcl::ict_match_token</b> <i class="arg">tok</i> <i class="arg">message</i></a></li>
<li><a href="#15"><b class="cmd">::grammar::me::tcl::ict_match_tokrange</b> <i class="arg">tokbegin</i> <i class="arg">tokend</i> <i class="arg">message</i></a></li>
<li><a href="#16"><b class="cmd">::grammar::me::tcl::ict_match_tokclass</b> <i class="arg">code</i> <i class="arg">message</i></a></li>
<li><a href="#17"><b class="cmd">::grammar::me::tcl::inc_restore</b> <i class="arg">nt</i></a></li>
<li><a href="#18"><b class="cmd">::grammar::me::tcl::inc_save</b> <i class="arg">nt</i> <i class="arg">startlocation</i></a></li>
<li><a href="#19"><b class="cmd">::grammar::me::tcl::iok_ok</b></a></li>
<li><a href="#20"><b class="cmd">::grammar::me::tcl::iok_fail</b></a></li>
<li><a href="#21"><b class="cmd">::grammar::me::tcl::iok_negate</b></a></li>
<li><a href="#22"><b class="cmd">::grammar::me::tcl::icl_get</b></a></li>
<li><a href="#23"><b class="cmd">::grammar::me::tcl::icl_rewind</b> <i class="arg">oldlocation</i></a></li>
<li><a href="#24"><b class="cmd">::grammar::me::tcl::ier_get</b></a></li>
<li><a href="#25"><b class="cmd">::grammar::me::tcl::ier_clear</b></a></li>
<li><a href="#26"><b class="cmd">::grammar::me::tcl::ier_nonterminal</b> <i class="arg">message</i> <i class="arg">location</i></a></li>
<li><a href="#27"><b class="cmd">::grammar::me::tcl::ier_merge</b> <i class="arg">olderror</i></a></li>
<li><a href="#28"><b class="cmd">::grammar::me::tcl::isv_clear</b></a></li>
<li><a href="#29"><b class="cmd">::grammar::me::tcl::isv_terminal</b></a></li>
<li><a href="#30"><b class="cmd">::grammar::me::tcl::isv_nonterminal_leaf</b> <i class="arg">nt</i> <i class="arg">startlocation</i></a></li>
<li><a href="#31"><b class="cmd">::grammar::me::tcl::isv_nonterminal_range</b> <i class="arg">nt</i> <i class="arg">startlocation</i></a></li>
<li><a href="#32"><b class="cmd">::grammar::me::tcl::isv_nonterminal_reduce</b> <i class="arg">nt</i> <i class="arg">startlocation</i> <span class="opt">?<i class="arg">marker</i>?</span></a></li>
<li><a href="#33"><b class="cmd">::grammar::me::tcl::ias_push</b></a></li>
<li><a href="#34"><b class="cmd">::grammar::me::tcl::ias_mark</b></a></li>
<li><a href="#35"><b class="cmd">::grammar::me::tcl::ias_pop2mark</b> <i class="arg">marker</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides an implementation of the ME virtual machine.
Please go and read the document <b class="syscmd"><a href="me_intro.html">grammar::me_intro</a></b> first if
you do not know what a ME virtual machine is.</p>
<p>This implementation is tied very strongly to Tcl. All the stacks in
the machine state are handled through the Tcl stack, all control flow
is handled by Tcl commands, and the remaining machine instructions are
directly mapped to Tcl commands. Especially the matching of
nonterminal symbols is handled by Tcl procedures as well, essentially
extending the machine implementation with custom instructions.</p>
<p>Further on the implementation handles only a single machine which is
uninteruptible during execution and hardwired for pull operation. I.e.
it explicitly requests each new token through a callback, pulling them
into its state.</p>
<p>A related package is <b class="package"><a href="../grammar_peg/peg_interp.html">grammar::peg::interp</a></b> which provides a
generic interpreter / parser for parsing expression grammars (PEGs),
implemented on top of this implementation of the ME virtual machine.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The commands documented in this section do not implement any of the
instructions of the ME virtual machine. They provide the facilities
for the initialization of the machine and the retrieval of important
information.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::me::tcl</b> <b class="method">cmd</b> <i class="arg">...</i></a></dt>
<dd><p>This is an ensemble command providing access to the commands listed in
this section. See the methods themselves for detailed specifications.</p></dd>
<dt><a name="2"><b class="cmd">::grammar::me::tcl</b> <b class="method">init</b> <i class="arg">nextcmd</i> <span class="opt">?<i class="arg">tokmap</i>?</span></a></dt>
<dd><p>This command (re)initializes the machine. It returns the empty
string. This command has to be invoked before any other command of
this package.</p>
<p>The command prefix <i class="arg">nextcmd</i> represents the input stream of
characters and is invoked by the machine whenever the a new character
from the stream is required. The instruction for handling this is
<i class="term">ict_advance</i>.
The callback has to return either the empty list, or a list of 4
elements containing the token, its lexeme attribute, and its location
as line number and column index, in this order.
The empty list is the signal that the end of the input stream has been
reached. The lexeme attribute is stored in the terminal cache, but
otherwise not used by the machine.</p>
<p>The optional dictionary <i class="arg">tokmap</i> maps from tokens to integer
numbers. If present the numbers impose an order on the tokens, which
is subsequently used by <i class="term">ict_match_tokrange</i> to determine if a
token is in the specified range or not. If no token map is specified
the lexicographic order of th token names will be used instead. This
choice is especially asensible when using characters as tokens.</p></dd>
<dt><a name="3"><b class="cmd">::grammar::me::tcl</b> <b class="method">lc</b> <i class="arg">location</i></a></dt>
<dd><p>This command converts the location of a token given as offset in the
input stream into the associated line number and column index. The
result of the command is a 2-element list containing the two values,
in the order mentioned in the previous sentence.
This allows higher levels to convert the location information found in
the error status and the generated AST into more human readable data.</p>
<p><em>Note</em> that the command is not able to convert locations which
have not been reached by the machine yet. In other words, if the
machine has read 7 tokens the command is able to convert the offsets
<b class="const">0</b> to <b class="const">6</b>, but nothing beyond that. This also shows that
it is not possible to convert offsets which refer to locations before
the beginning of the stream.</p>
<p>After a call of <b class="method">init</b> the state used for the conversion is
cleared, making further conversions impossible until the machine has
read tokens again.</p></dd>
<dt><a name="4"><b class="cmd">::grammar::me::tcl</b> <b class="method">tok</b> <i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span></a></dt>
<dd><p>This command returns a Tcl list containing the part of the input
stream between the locations <i class="arg">from</i> and <i class="arg">to</i> (both
inclusive). If <i class="arg">to</i> is not specified it will default to the value
of <i class="arg">from</i>.</p>
<p>Each element of the returned list is a list of four elements, the
token, its associated lexeme, line number, and column index, in this
order.
In other words, each element has the same structure as the result of
the <i class="arg">nextcmd</i> callback given to <b class="cmd">::grammar::me::tcl::init</b></p>
<p>This command places the same restrictions on its location arguments as
<b class="cmd">::grammar::me::tcl::lc</b>.</p></dd>
<dt><a name="5"><b class="cmd">::grammar::me::tcl</b> <b class="method">tokens</b></a></dt>
<dd><p>This command returns the number of tokens currently known to the ME
virtual machine.</p></dd>
<dt><a name="6"><b class="cmd">::grammar::me::tcl</b> <b class="method">sv</b></a></dt>
<dd><p>This command returns the current semantic value <i class="term">SV</i> stored in
the machine. This is an abstract syntax tree as specified in the
document <b class="syscmd"><a href="me_ast.html">grammar::me_ast</a></b>, section <b class="sectref">AST VALUES</b>.</p></dd>
<dt><a name="7"><b class="cmd">::grammar::me::tcl</b> <b class="method">ast</b></a></dt>
<dd><p>This method returns the abstract syntax tree currently at the top of
the AST stack of the ME virtual machine. This is an abstract syntax
tree as specified in the document <b class="syscmd"><a href="me_ast.html">grammar::me_ast</a></b>, section
<b class="sectref">AST VALUES</b>.</p></dd>
<dt><a name="8"><b class="cmd">::grammar::me::tcl</b> <b class="method">astall</b></a></dt>
<dd><p>This method returns the whole stack of abstract syntax trees currently
known to the ME virtual machine. Each element of the returned list is
an abstract syntax tree as specified in the document
<b class="syscmd"><a href="me_ast.html">grammar::me_ast</a></b>, section <b class="sectref">AST VALUES</b>.
The top of the stack resides at the end of the list.</p></dd>
<dt><a name="9"><b class="cmd">::grammar::me::tcl</b> <b class="method">ctok</b></a></dt>
<dd><p>This method returns the current token considered by the ME virtual
machine.</p></dd>
<dt><a name="10"><b class="cmd">::grammar::me::tcl</b> <b class="method">nc</b></a></dt>
<dd><p>This method returns the contents of the nonterminal cache as a
dictionary mapping from &quot;<b class="variable">symbol</b>,<b class="variable">location</b>&quot; to match
information.</p></dd>
<dt><a name="11"><b class="cmd">::grammar::me::tcl</b> <b class="method">next</b></a></dt>
<dd><p>This method returns the next token callback as specified during
initialization of the ME virtual machine.</p></dd>
<dt><a name="12"><b class="cmd">::grammar::me::tcl</b> <b class="method">ord</b></a></dt>
<dd><p>This method returns a dictionary containing the <i class="arg">tokmap</i> specified
during initialization of the ME virtual machine.
<b class="variable"><b class="cmd">::grammar::me::tcl::ok</b></b>
This variable contains the current match status <i class="term">OK</i>. It is
provided as variable instead of a command because that makes access to
this information faster, and the speed of access is considered very
important here as this information is used constantly to determine the
control flow.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">MACHINE STATE</a></h2>
<p>Please go and read the document <b class="syscmd"><a href="me_vm.html">grammar::me_vm</a></b> first for a
specification of the basic ME virtual machine and its state.</p>
<p>This implementation manages the state described in that document,
except for the stacks minus the AST stack. In other words, location
stack, error stack, return stack, and ast marker stack are implicitly
managed through standard Tcl scoping, i.e. Tcl variables in
procedures, outside of this implementation.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">MACHINE INSTRUCTIONS</a></h2>
<p>Please go and read the document <b class="syscmd"><a href="me_vm.html">grammar::me_vm</a></b> first for a
specification of the basic ME virtual machine and its instruction set.</p>
<p>This implementation maps all instructions to Tcl commands in the
namespace &quot;::grammar::me::tcl&quot;, except for the stack related commands,
nonterminal symbols and control flow.
Here we simply list the commands and explain the differences to the
specified instructions, if there are any. For their semantics see the
aforementioned specification. The machine commands are <em>not</em>
reachable through the ensemble command <b class="cmd">::grammar::me::tcl</b>.</p>
<dl class="doctools_definitions">
<dt><a name="13"><b class="cmd">::grammar::me::tcl::ict_advance</b> <i class="arg">message</i></a></dt>
<dd><p>No changes.</p></dd>
<dt><a name="14"><b class="cmd">::grammar::me::tcl::ict_match_token</b> <i class="arg">tok</i> <i class="arg">message</i></a></dt>
<dd><p>No changes.</p></dd>
<dt><a name="15"><b class="cmd">::grammar::me::tcl::ict_match_tokrange</b> <i class="arg">tokbegin</i> <i class="arg">tokend</i> <i class="arg">message</i></a></dt>
<dd><p>If, and only if a token map was specified during initialization then
the arguments are the numeric representations of the smallest and
largest tokens in the range. Otherwise they are the relevant tokens
themselves and lexicographic comparison is used.</p></dd>
<dt><a name="16"><b class="cmd">::grammar::me::tcl::ict_match_tokclass</b> <i class="arg">code</i> <i class="arg">message</i></a></dt>
<dd><p>No changes.</p></dd>
<dt><a name="17"><b class="cmd">::grammar::me::tcl::inc_restore</b> <i class="arg">nt</i></a></dt>
<dd><p>Instead of taking a branchlabel the command returns a boolean value.
The result will be <b class="const">true</b> if and only if cached information was
found. The caller has to perform the appropriate branching.</p></dd>
<dt><a name="18"><b class="cmd">::grammar::me::tcl::inc_save</b> <i class="arg">nt</i> <i class="arg">startlocation</i></a></dt>
<dd><p>The command takes the start location as additional argument, as it is
managed on the Tcl stack, and not in the machine state.</p></dd>
<dt><b class="cmd">icf_ntcall</b> <i class="arg">branchlabel</i></dt>
<dd></dd>
<dt><b class="cmd">icf_ntreturn</b></dt>
<dd><p>These two instructions are not mapped to commands. They are control
flow instructions and handled in Tcl.</p></dd>
<dt><a name="19"><b class="cmd">::grammar::me::tcl::iok_ok</b></a></dt>
<dd><p>No changes.</p></dd>
<dt><a name="20"><b class="cmd">::grammar::me::tcl::iok_fail</b></a></dt>
<dd><p>No changes.</p></dd>
<dt><a name="21"><b class="cmd">::grammar::me::tcl::iok_negate</b></a></dt>
<dd><p>No changes.</p></dd>
<dt><b class="cmd">icf_jalways</b> <i class="arg">branchlabel</i></dt>
<dd></dd>
<dt><b class="cmd">icf_jok</b> <i class="arg">branchlabel</i></dt>
<dd></dd>
<dt><b class="cmd">icf_jfail</b> <i class="arg">branchlabel</i></dt>
<dd></dd>
<dt><b class="cmd">icf_halt</b></dt>
<dd><p>These four instructions are not mapped to commands. They are control
flow instructions and handled in Tcl.</p></dd>
<dt><a name="22"><b class="cmd">::grammar::me::tcl::icl_get</b></a></dt>
<dd><p>This command returns the current location <i class="term">CL</i> in the input.
It replaces <i class="term">icl_push</i>.</p></dd>
<dt><a name="23"><b class="cmd">::grammar::me::tcl::icl_rewind</b> <i class="arg">oldlocation</i></a></dt>
<dd><p>The command takes the location as argument as it comes from the
Tcl stack, not the machine state.</p></dd>
<dt><b class="cmd">icl_pop</b></dt>
<dd><p>Not mapped, the stacks are not managed by the package.</p></dd>
<dt><a name="24"><b class="cmd">::grammar::me::tcl::ier_get</b></a></dt>
<dd><p>This command returns the current error state <i class="term">ER</i>.
It replaces <i class="term">ier_push</i>.</p></dd>
<dt><a name="25"><b class="cmd">::grammar::me::tcl::ier_clear</b></a></dt>
<dd><p>No changes.</p></dd>
<dt><a name="26"><b class="cmd">::grammar::me::tcl::ier_nonterminal</b> <i class="arg">message</i> <i class="arg">location</i></a></dt>
<dd><p>The command takes the location as argument as it comes from the
Tcl stack, not the machine state.</p></dd>
<dt><a name="27"><b class="cmd">::grammar::me::tcl::ier_merge</b> <i class="arg">olderror</i></a></dt>
<dd><p>The command takes the second error state to merge as argument as it
comes from the Tcl stack, not the machine state.</p></dd>
<dt><a name="28"><b class="cmd">::grammar::me::tcl::isv_clear</b></a></dt>
<dd><p>No changes.</p></dd>
<dt><a name="29"><b class="cmd">::grammar::me::tcl::isv_terminal</b></a></dt>
<dd><p>No changes.</p></dd>
<dt><a name="30"><b class="cmd">::grammar::me::tcl::isv_nonterminal_leaf</b> <i class="arg">nt</i> <i class="arg">startlocation</i></a></dt>
<dd><p>The command takes the start location as argument as it comes from the
Tcl stack, not the machine state.</p></dd>
<dt><a name="31"><b class="cmd">::grammar::me::tcl::isv_nonterminal_range</b> <i class="arg">nt</i> <i class="arg">startlocation</i></a></dt>
<dd><p>The command takes the start location as argument as it comes from the
Tcl stack, not the machine state.</p></dd>
<dt><a name="32"><b class="cmd">::grammar::me::tcl::isv_nonterminal_reduce</b> <i class="arg">nt</i> <i class="arg">startlocation</i> <span class="opt">?<i class="arg">marker</i>?</span></a></dt>
<dd><p>The command takes start location and marker as argument as it comes
from the Tcl stack, not the machine state.</p></dd>
<dt><a name="33"><b class="cmd">::grammar::me::tcl::ias_push</b></a></dt>
<dd><p>No changes.</p></dd>
<dt><a name="34"><b class="cmd">::grammar::me::tcl::ias_mark</b></a></dt>
<dd><p>This command returns a marker for the current state of the AST stack
<i class="term">AS</i>. The marker stack is not managed by the machine.</p></dd>
<dt><a name="35"><b class="cmd">::grammar::me::tcl::ias_pop2mark</b> <i class="arg">marker</i></a></dt>
<dd><p>The command takes the marker as argument as it comes from the
Tcl stack, not the machine state. It replaces <i class="term">ias_mpop</i>.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_me/me_util.html.



































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

<div class='fossil-doc' data-title='grammar::me::util - Grammar operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::util(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::util - AST utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">grammar::me::util <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::me::util::ast2tree</b> <i class="arg">ast</i> <i class="arg">tree</i> <span class="opt">?<i class="arg">root</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::grammar::me::util::ast2etree</b> <i class="arg">ast</i> <i class="arg">mcmd</i> <i class="arg">tree</i> <span class="opt">?<i class="arg">root</i>?</span></a></li>
<li><a href="#3"><b class="cmd">mcmd</b> <b class="method">lc</b> <i class="arg">location</i></a></li>
<li><a href="#4"><b class="cmd">mcmd</b> <b class="method">tok</b> <i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::grammar::me::util::tree2ast</b> <i class="arg">tree</i> <span class="opt">?<i class="arg">root</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a number of utility command for the conversion
between the various representations of abstract syntax trees as
specified in the document <b class="syscmd"><a href="me_ast.html">grammar::me_ast</a></b>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::me::util::ast2tree</b> <i class="arg">ast</i> <i class="arg">tree</i> <span class="opt">?<i class="arg">root</i>?</span></a></dt>
<dd><p>This command converts an <i class="arg">ast</i> from value to object
representation. All nodes in the <i class="arg">ast</i> will be converted into
nodes of this <i class="arg">tree</i>, with the root of the AST a child of the node
<i class="arg">root</i>. If this node is not explicitly specified the root of the
tree is used. Existing content of tree is not touched, i.e.  neither
removed nor changed, with the exception of the specified root node,
which will gain a new child.</p></dd>
<dt><a name="2"><b class="cmd">::grammar::me::util::ast2etree</b> <i class="arg">ast</i> <i class="arg">mcmd</i> <i class="arg">tree</i> <span class="opt">?<i class="arg">root</i>?</span></a></dt>
<dd><p>This command is like <b class="cmd">::grammar::me::util::ast2tree</b>, except that
the result is in the extended object representation of the input AST.
The source of the extended information is the command prefix
<i class="arg">mcmd</i>.
It has to understand two methods, <b class="method">lc</b>, and <b class="method">tok</b>, with
the semantics specified below.</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">mcmd</b> <b class="method">lc</b> <i class="arg">location</i></a></dt>
<dd><p>Takes the location of a token given as offset in the input stream and
return a 2-element list containing the associated line number and
column index, in this order.</p></dd>
<dt><a name="4"><b class="cmd">mcmd</b> <b class="method">tok</b> <i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span></a></dt>
<dd><p>Takes one or two locations <i class="arg">from</i> and <i class="arg">to</i> as offset in the
input stream and returns a Tcl list containing the specified part of
the input stream. Both location are inclusive. If <i class="arg">to</i> is not
specified it will default to the value of <i class="arg">from</i>.</p>
<p>Each element of the returned list is a list containing the token, its
associated lexeme, the line number, and column index, in this order.</p></dd>
</dl>
<p>Both the ensemble command <b class="cmd">::grammar::me::tcl</b> provided by the
package <b class="package"><a href="me_tcl.html">grammar::me::tcl</a></b> and the objects command created by
the package <b class="package">::grammar::me::cpu</b> fit the above specification.</p></dd>
<dt><a name="5"><b class="cmd">::grammar::me::util::tree2ast</b> <i class="arg">tree</i> <span class="opt">?<i class="arg">root</i>?</span></a></dt>
<dd><p>This command converts an <i class="arg">ast</i> in (extended) object representation
into a value and returns it.
If a <i class="arg">root</i> node is specified the AST is generated from that node
downward. Otherwise the root of the tree object is used as the
starting point.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key746">abstract syntax tree</a>, <a href="../../../../index.html#key745">syntax tree</a>, <a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_me/me_vm.html.































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543

<div class='fossil-doc' data-title='grammar::me_vm - Grammar operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me_vm(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me_vm - Virtual machine for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">MACHINE STATE</a></li>
<li class="doctools_section"><a href="#section3">MACHINE INSTRUCTIONS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">TERMINAL MATCHING</a></li>
<li class="doctools_subsection"><a href="#subsection2">NONTERMINAL MATCHING</a></li>
<li class="doctools_subsection"><a href="#subsection3">UNCONDITIONAL MATCHING</a></li>
<li class="doctools_subsection"><a href="#subsection4">CONTROL FLOW</a></li>
<li class="doctools_subsection"><a href="#subsection5">INPUT LOCATION HANDLING</a></li>
<li class="doctools_subsection"><a href="#subsection6">ERROR HANDLING</a></li>
<li class="doctools_subsection"><a href="#subsection7">SEMANTIC VALUES</a></li>
<li class="doctools_subsection"><a href="#subsection8">AST STACK HANDLING</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Please go and read the document <b class="syscmd"><a href="me_intro.html">grammar::me_intro</a></b> first for
an overview of the various documents and their relations.</p>
<p>This document specifies a virtual machine for the controlled matching
and parsing of token streams, creating an
<i class="term"><a href="../../../../index.html#key746">abstract syntax tree</a></i> (short <i class="term"><a href="../../../../index.html#key815">AST</a></i>) reflecting the
structure of the input. Special machine features are the caching and
reuse of partial results, caching of the encountered input, and the
ability to backtrack in both input and AST creation.</p>
<p>These features make the specified virtual machine especially useful to
packrat parsers based on parsing expression grammars. It is however
not restricted to this type of parser. Normal LL and LR parsers can be
implemented with it as well.</p>
<p>The following sections will discuss first the abstract state kept by
ME virtual machines, and then their instruction set.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">MACHINE STATE</a></h2>
<p>A ME virtual machine manages the following state:</p>
<dl class="doctools_definitions">
<dt><i class="term">Current token</i> CT</dt>
<dd><p>The token from the input under consideration by the machine.</p>
<p>This information is used and modified by the instructions defined in
the section
<span class="sectref"><a href="#subsection1">TERMINAL MATCHING</a></span>.</p></dd>
<dt><i class="term">Current location</i> CL</dt>
<dd><p>The location of the <i class="term">current token</i> in the input stream, as
offset relative to the beginning of the stream. The first token is
considered to be at offset <b class="const">0</b>.</p>
<p>This information is implicitly used and modified by the instructions
defined in the sections
<span class="sectref"><a href="#subsection1">TERMINAL MATCHING</a></span> and
<span class="sectref"><a href="#subsection2">NONTERMINAL MATCHING</a></span>,
and can be directly queried and modified by the instructions defined
in section
<span class="sectref"><a href="#subsection5">INPUT LOCATION HANDLING</a></span>.</p></dd>
<dt><i class="term">Location stack</i> LS</dt>
<dd><p>In addition to the above a stack of locations, for backtracking.
Locations can put on the stack, removed from it, and removed with
setting the current location.</p>
<p>This information is implicitly used and modified by the instructions
defined in the sections
<span class="sectref"><a href="#subsection1">TERMINAL MATCHING</a></span> and
<span class="sectref"><a href="#subsection2">NONTERMINAL MATCHING</a></span>,
and can be directly queried and modified by the instructions defined
in section
<span class="sectref"><a href="#subsection5">INPUT LOCATION HANDLING</a></span>.</p></dd>
<dt><i class="term">Match status</i> OK</dt>
<dd><p>A boolean value, the result of the last attempt at matching input.
It is set to <b class="const">true</b> if that attempt was successful, and
<b class="const">false</b> otherwise.</p>
<p>This information is influenced by the instructions defined in the
sections
<span class="sectref"><a href="#subsection1">TERMINAL MATCHING</a></span>,
<span class="sectref"><a href="#subsection2">NONTERMINAL MATCHING</a></span>, and
<span class="sectref"><a href="#subsection3">UNCONDITIONAL MATCHING</a></span>.
It is queried by the instructions defined in the section
<span class="sectref"><a href="#subsection4">CONTROL FLOW</a></span>.</p></dd>
<dt><i class="term">Semantic value</i> SV</dt>
<dd><p>The semantic value associated with (generated by) the last attempt at
matching input. Contains either the empty string or a node for the
abstract syntax tree constructed from the input.</p>
<p>This information is influenced by the instructions defined in the
sections
<span class="sectref"><a href="#subsection7">SEMANTIC VALUES</a></span>, and
<span class="sectref"><a href="#subsection8">AST STACK HANDLING</a></span>.</p></dd>
<dt><i class="term">AST stack</i> AS</dt>
<dd><p>A stack of partial abstract syntax trees constructed by the machine
during matching.</p>
<p>This information is influenced by the instructions defined in the
sections
<span class="sectref"><a href="#subsection7">SEMANTIC VALUES</a></span>, and
<span class="sectref"><a href="#subsection8">AST STACK HANDLING</a></span>.</p></dd>
<dt><i class="term">AST Marker stack</i> MS</dt>
<dd><p>In addition to the above a stack of stacks, for backtracking. This is
actually a stack of markers into the AST stack, thus implicitly
snapshooting the state of the AST stack at some point in time. Markers
can be put on the stack, dropped from it, and used to roll back the
AST stack to an earlier state.</p>
<p>This information is influenced by the instructions defined in the
sections
<span class="sectref"><a href="#subsection7">SEMANTIC VALUES</a></span>, and
<span class="sectref"><a href="#subsection8">AST STACK HANDLING</a></span>.</p></dd>
<dt><i class="term">Error status</i> ER</dt>
<dd><p>Error information associated with the last attempt at matching
input. Contains either the empty string or a list of 2 elements, a
location in the input and a list of error messages associated with
it, in this order.</p>
<p><em>Note</em> that error information can be set even if the last attempt
at matching input was successful. For example the *-operator (matching
a sub-expression zero or more times) in a parsing expression grammar
is always successful, even if it encounters a problem further in the
input and has to backtrack. Such problems must not be forgotten when
continuing to match.</p>
<p>This information is queried and influenced by the instructions defined
in the sections
<span class="sectref"><a href="#subsection1">TERMINAL MATCHING</a></span>,
<span class="sectref"><a href="#subsection2">NONTERMINAL MATCHING</a></span>, and
<span class="sectref"><a href="#subsection6">ERROR HANDLING</a></span>.</p></dd>
<dt><i class="term">Error stack</i> ES</dt>
<dd><p>In addition to the above a stack of error information, to allow the
merging of current and older error information when performing
backtracking in choices after an unsucessful match.</p>
<p>This information is queried and influenced by the instructions defined
in the sections
<span class="sectref"><a href="#subsection1">TERMINAL MATCHING</a></span>,
<span class="sectref"><a href="#subsection2">NONTERMINAL MATCHING</a></span>, and
<span class="sectref"><a href="#subsection6">ERROR HANDLING</a></span>.</p></dd>
<dt><i class="term">Return stack</i> RS</dt>
<dd><p>A stack of program counter values, i.e. locations in the code
controlling the virtual machine, for the management of subroutine
calls, i.e. the matching of nonterminal symbols.</p>
<p>This information is queried and influenced by the instructions defined
in the section
<span class="sectref"><a href="#subsection2">NONTERMINAL MATCHING</a></span>.</p></dd>
<dt><i class="term">Nonterminal cache</i> NC</dt>
<dd><p>A cache of machine states (A 4-tuple containing a location in the
input, match status <i class="term">OK</i>, semantic value <i class="term">SV</i>, and error
status <i class="term">ER</i>) keyed by name of nonterminal symbol and location in
the input stream.</p>
<p>The key location is where machine started the attempt to match the
named nonterminal symbol, and the location in the value is where
machine ended up after the attempt completed, independent of the
success of the attempt.</p>
<p>This status is queried and influenced by the instructions defined in
the section
<span class="sectref"><a href="#subsection2">NONTERMINAL MATCHING</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">MACHINE INSTRUCTIONS</a></h2>
<p>With the machine state specified it is now possible to explain the
instruction set of ME virtual machines. They are grouped roughly by
the machine state they influence and/or query.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">TERMINAL MATCHING</a></h3>
<p>First the instructions to match tokens from the input stream, and
by extension all terminal symbols.</p>
<p>These instructions are the only ones which may retrieve a new token
from the input stream. This is a <em>may</em> and not a <em>will</em>
because the instructions will a retrieve new token if, and only if the
current location <i class="term">CL</i> is at the head of the stream.
If the machine has backtracked (see <b class="cmd">icl_rewind</b>) the instructions
will retrieve the token to compare against from the internal cache.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ict_advance</b> <i class="arg">message</i></dt>
<dd><p>This instruction tries to advance to the next token in the input
stream, i.e. the one after the current location <i class="term">CL</i>. The
instruction will fail if, and only if the end of the input stream is
reached, i.e. if there is no next token.</p>
<p>The sucess/failure of the instruction is remembered in the match
status <i class="term">OK</i>. In the case of failure the error status <i class="term">ER</i> is
set to the current location and the message <i class="arg">message</i>.
In the case of success the error status <i class="term">ER</i> is cleared, the new
token is made the current token <i class="term">CT</i>, and the new location is
made the current location <i class="term">CL</i>.</p>
<p>The argument <i class="arg">message</i> is a reference to the string to put into
the error status <i class="term">ER</i>, if such is needed.</p></dd>
<dt><b class="cmd">ict_match_token</b> <i class="arg">tok</i> <i class="arg">message</i></dt>
<dd><p>This instruction tests the current token <i class="term">CT</i> for equality
with the argument <i class="arg">tok</i> and records the result in the match
status <i class="term">OK</i>. The instruction fails if the current token is
not equal to <i class="arg">tok</i>.</p>
<p>In case of failure the error status <i class="term">ER</i> is set to the current
location <i class="term">CL</i> and the message <i class="arg">message</i>, and the
current location <i class="term">CL</i> is moved one token backwards.
Otherwise, i.e. upon success, the error status <i class="term">ER</i> is cleared
and the current location <i class="term">CL</i> is not touched.</p></dd>
<dt><b class="cmd">ict_match_tokrange</b> <i class="arg">tokbegin</i> <i class="arg">tokend</i> <i class="arg">message</i></dt>
<dd><p>This instruction tests the current token <i class="term">CT</i> for being in
the range of tokens from <i class="arg">tokbegin</i> to <i class="arg">tokend</i>
(inclusive) and records the result in the match status <i class="term">OK</i>. The
instruction fails if the current token is not inside the range.</p>
<p>In case of failure the error status <i class="term">ER</i> is set to the current
location <i class="term">CL</i> and the message <i class="arg">message</i>, and the current location
<i class="term">CL</i> is moved one token backwards.
Otherwise, i.e. upon success, the error status <i class="term">ER</i> is cleared
and the current location <i class="term">CL</i> is not touched.</p></dd>
<dt><b class="cmd">ict_match_tokclass</b> <i class="arg">code</i> <i class="arg">message</i></dt>
<dd><p>This instruction tests the current token <i class="term">CT</i> for being a member
of the token class <i class="arg">code</i> and records the result in the match
status <i class="term">OK</i>. The instruction fails if the current token is not a
member of the specified class.</p>
<p>In case of failure the error status <i class="term">ER</i> is set to the current
location <i class="term">CL</i> and the message <i class="arg">message</i>, and the
current location <i class="term">CL</i> is moved one token backwards.
Otherwise, i.e. upon success, the error status <i class="term">ER</i> is cleared
and the current location <i class="term">CL</i> is not touched.</p>
<p>Currently the following classes are legal:</p>
<dl class="doctools_definitions">
<dt>alnum</dt>
<dd><p>A token is accepted if it is a unicode alphabetical character, or a digit.</p></dd>
<dt>alpha</dt>
<dd><p>A token is accepted if it is a unicode alphabetical character.</p></dd>
<dt>digit</dt>
<dd><p>A token is accepted if it is a unicode digit character.</p></dd>
<dt>xdigit</dt>
<dd><p>A token is accepted if it is a hexadecimal digit character.</p></dd>
<dt>punct</dt>
<dd><p>A token is accepted if it is a unicode punctuation character.</p></dd>
<dt>space</dt>
<dd><p>A token is accepted if it is a unicode space character.</p></dd>
</dl></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">NONTERMINAL MATCHING</a></h3>
<p>The instructions in this section handle the matching of nonterminal
symbols. They query the nonterminal cache <i class="term">NC</i> for saved
information, and put such information into the cache.</p>
<p>The usage of the cache is a performance aid for backtracking parsers,
allowing them to avoid an expensive rematch of complex nonterminal
symbols if they have been encountered before.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">inc_restore</b> <i class="arg">branchlabel</i> <i class="arg">nt</i></dt>
<dd><p>This instruction checks if the nonterminal cache <i class="term">NC</i> contains
information about the nonterminal symbol <i class="arg">nt</i>, at the current
location <i class="term">CL</i>. If that is the case the instruction will update
the machine state (current location <i class="term">CL</i>, match status <i class="term">OK</i>,
semantic value <i class="term">SV</i>, and error status <i class="term">ER</i>) with the found
information and continue execution at the instruction refered to by
the <i class="arg">branchlabel</i>. The new current location <i class="term">CL</i> will be the
last token matched by the nonterminal symbol, i.e. belonging to it.</p>
<p>If no information was found the instruction will continue execution at
the next instruction.</p>
<p>Together with <b class="cmd">icf_ntcall</b> it is possible to generate code for
memoized and non-memoized matching of nonterminal symbols, either as
subroutine calls, or inlined in the caller.</p></dd>
<dt><b class="cmd">inc_save</b> <i class="arg">nt</i></dt>
<dd><p>This instruction saves the current state of the machine (current
location <i class="term">CL</i>, match status <i class="term">OK</i>, semantic value <i class="term">SV</i>,
and error status <i class="term">ER</i>), to the nonterminal cache <i class="term">NC</i>. It
will also pop an entry from the location stack <i class="term">LS</i> and save it
as the start location of the match.</p>
<p>It is expected to be called at the end of matching a nonterminal
symbol, with <i class="arg">nt</i> the name of the nonterminal symbol the code was
working on. This allows the instruction <b class="cmd">inc_restore</b> to check for
and retrieve the data, should we have to match this nonterminal symbol
at the same location again, during backtracking.</p></dd>
<dt><b class="cmd">icf_ntcall</b> <i class="arg">branchlabel</i></dt>
<dd><p>This instruction invokes the code for matching the nonterminal symbol
<i class="arg">nt</i> as a subroutine. To this end it stores the current program
counter <i class="term">PC</i> on the return stack <i class="term">RS</i>, the current location
<i class="term">CL</i> on the location stack <i class="term">LS</i>, and then continues
execution at the address <i class="arg">branchlabel</i>.</p>
<p>The next matching <b class="cmd">icf_ntreturn</b> will cause the execution to
continue at the instruction coming after the call.</p></dd>
<dt><b class="cmd">icf_ntreturn</b></dt>
<dd><p>This instruction will pop an entry from the return stack <i class="term">RS</i>,
assign it to the program counter <i class="term">PC</i>, and then continue
execution at the new address.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">UNCONDITIONAL MATCHING</a></h3>
<p>The instructions in this section are the remaining match
operators. They change the match status <i class="term">OK</i> directly and
unconditionally.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">iok_ok</b></dt>
<dd><p>This instruction sets the match status <i class="term">OK</i> to <b class="const">true</b>,
indicating a successful match.</p></dd>
<dt><b class="cmd">iok_fail</b></dt>
<dd><p>This instruction sets the match status <i class="term">OK</i> to <b class="const">false</b>,
indicating a failed match.</p></dd>
<dt><b class="cmd">iok_negate</b></dt>
<dd><p>This instruction negates the match status <i class="term">OK</i>, turning a failure
into a success and vice versa.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">CONTROL FLOW</a></h3>
<p>The instructions in this section implement both conditional and
unconditional control flow. The conditional jumps query the match
status <i class="term">OK</i>.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">icf_jalways</b> <i class="arg">branchlabel</i></dt>
<dd><p>This instruction sets the program counter <i class="term">PC</i> to the address
specified by <i class="arg">branchlabel</i> and then continues execution from
there. This is an unconditional jump.</p></dd>
<dt><b class="cmd">icf_jok</b> <i class="arg">branchlabel</i></dt>
<dd><p>This instruction sets the program counter <i class="term">PC</i> to the address
specified by <i class="arg">branchlabel</i>. This happens if, and only if the match
status <i class="term">OK</i> indicates a success. Otherwise it simply continues
execution at the next instruction. This is a conditional jump.</p></dd>
<dt><b class="cmd">icf_jfail</b> <i class="arg">branchlabel</i></dt>
<dd><p>This instruction sets the program counter <i class="term">PC</i> to the address
specified by <i class="arg">branchlabel</i>. This happens if, and only if the match
status <i class="term">OK</i> indicates a failure. Otherwise it simply continues
execution at the next instruction. This is a conditional jump.</p></dd>
<dt><b class="cmd">icf_halt</b></dt>
<dd><p>This instruction halts the machine and blocks any further execution.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">INPUT LOCATION HANDLING</a></h3>
<p>The instructions in this section are for backtracking, they manipulate
the current location <i class="term">CL</i> of the machine state.
They allow a user of the machine to query and save locations in the
input, and to rewind the current location <i class="term">CL</i> to saved
locations, making them one of the components enabling the
implementation of backtracking parsers.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">icl_push</b></dt>
<dd><p>This instruction pushes a copy of the current location <i class="term">CL</i> on
the location stack <i class="term">LS</i>.</p></dd>
<dt><b class="cmd">icl_rewind</b></dt>
<dd><p>This instruction pops an entry from the location stack <i class="term">LS</i> and
then moves the current location <i class="term">CL</i> back to this point in the
input.</p></dd>
<dt><b class="cmd">icl_pop</b></dt>
<dd><p>This instruction pops an entry from the location stack <i class="term">LS</i> and
discards it.</p></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">ERROR HANDLING</a></h3>
<p>The instructions in this section provide read and write access to the
error status <i class="term">ER</i> of the machine.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ier_push</b></dt>
<dd><p>This instruction pushes a copy of the current error status <i class="term">ER</i>
on the error stack <i class="term">ES</i>.</p></dd>
<dt><b class="cmd">ier_clear</b></dt>
<dd><p>This instruction clears the error status <i class="term">ER</i>.</p></dd>
<dt><b class="cmd">ier_nonterminal</b> <i class="arg">message</i></dt>
<dd><p>This instruction checks if the error status <i class="term">ER</i> contains an
error whose location is just past the location found in the top entry
of the location stack <i class="term">LS</i>.
Nothing happens if no such error is found.
Otherwise the found error is replaced by an error at the location
found on the stack, having the message <i class="arg">message</i>.</p></dd>
<dt><b class="cmd">ier_merge</b></dt>
<dd><p>This instruction pops an entry from the error stack <i class="term">ES</i>, merges
it with the current error status <i class="term">ER</i> and stores the result of
the merge as the new error status <i class="term">ER</i>.</p>
<p>The merge is performed as described below:</p>
<p>If one of the two error states is empty the other is chosen. If
neither error state is empty, and refering to different locations,
then the error state with the location further in the input is
chosen. If both error states refer to the same location their messages
are merged (with removing duplicates).</p></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">SEMANTIC VALUES</a></h3>
<p>The instructions in this section manipulate the semantic value
<i class="term">SV</i>.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">isv_clear</b></dt>
<dd><p>This instruction clears the semantic value <i class="term">SV</i>.</p></dd>
<dt><b class="cmd">isv_terminal</b></dt>
<dd><p>This instruction creates a terminal AST node for the current token
<i class="term">CT</i>, makes it the semantic value <i class="term">SV</i>, and also pushes the
node on the AST stack <i class="term">AS</i>.</p></dd>
<dt><b class="cmd">isv_nonterminal_leaf</b> <i class="arg">nt</i></dt>
<dd><p>This instruction creates a nonterminal AST node without any children
for the nonterminal <i class="arg">nt</i>, and makes it the semantic value
<i class="term">SV</i>.</p>
<p>This instruction should be executed if, and only if the match status
<i class="term">OK</i> indicates a success.
In the case of a failure <b class="cmd">isv_clear</b> should be called.</p></dd>
<dt><b class="cmd">isv_nonterminal_range</b> <i class="arg">nt</i></dt>
<dd><p>This instruction creates a nonterminal AST node for the nonterminal
<i class="arg">nt</i>, with a single terminal node as its child, and makes this AST
the semantic value <i class="term">SV</i>. The terminal node refers to the input
string from the location found on top of the location stack <i class="term">LS</i>
to the current location <i class="term">CL</i> (both inclusive).</p>
<p>This instruction should be executed if, and only if the match status
<i class="term">OK</i> indicates a success.
In the case of a failure <b class="cmd">isv_clear</b> should be called.</p></dd>
<dt><b class="cmd">isv_nonterminal_reduce</b> <i class="arg">nt</i></dt>
<dd><p>This instruction creates a nonterminal AST node for the nonterminal
<i class="arg">nt</i> and makes it the semantic value <i class="term">SV</i>.</p>
<p>All entries on the AST stack <i class="term">AS</i> above the marker found in the
top entry of the AST Marker stack <i class="term">MS</i> become children of the new
node, with the entry at the stack top becoming the rightmost child. If
the AST Marker stack <i class="term">MS</i> is empty the whole stack is used. The
AST marker stack <i class="term">MS</i> is left unchanged.</p>
<p>This instruction should be executed if, and only if the match status
<i class="term">OK</i> indicates a success.
In the case of a failure <b class="cmd">isv_clear</b> should be called.</p></dd>
</dl>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">AST STACK HANDLING</a></h3>
<p>The instructions in this section manipulate the AST stack <i class="term">AS</i>,
and the AST Marker stack <i class="term">MS</i>.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ias_push</b></dt>
<dd><p>This instruction pushes the semantic value <i class="term">SV</i> on the AST stack
<i class="term">AS</i>.</p></dd>
<dt><b class="cmd">ias_mark</b></dt>
<dd><p>This instruction pushes a marker for the current state of the AST
stack <i class="term">AS</i> on the AST Marker stack <i class="term">MS</i>.</p></dd>
<dt><b class="cmd">ias_mrewind</b></dt>
<dd><p>This instruction pops an entry from the AST Marker stack <i class="term">MS</i> and
then proceeds to pop entries from the AST stack <i class="term">AS</i> until the
state represented by the popped marker has been reached again.
Nothing is done if the AST stack <i class="term">AS</i> is already smaller than
indicated by the popped marker.</p></dd>
<dt><b class="cmd">ias_mpop</b></dt>
<dd><p>This instruction pops an entry from the AST Marker stack <i class="term">MS</i> and
discards it.</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_peg/peg.html.





















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586

<div class='fossil-doc' data-title='grammar::peg - Grammar operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::peg(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::peg - Create and manipulate parsing expression grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">TERMS &amp; CONCEPTS</a></li>
<li class="doctools_subsection"><a href="#subsection2">CONTAINER CLASS API</a></li>
<li class="doctools_subsection"><a href="#subsection3">CONTAINER OBJECT API</a></li>
<li class="doctools_subsection"><a href="#subsection4">PARSING EXPRESSIONS</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">PARSING EXPRESSION GRAMMARS</a></li>
<li class="doctools_section"><a href="#section3">REFERENCES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">grammar::peg <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::peg</b> <i class="arg">pegName</i> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">&lt;--</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">src</i>?</span></a></li>
<li><a href="#2"><i class="arg">pegName</i> <b class="method">destroy</b></a></li>
<li><a href="#3"><i class="arg">pegName</i> <b class="method">clear</b></a></li>
<li><a href="#4"><i class="arg">pegName</i> <b class="method">=</b> <i class="arg">srcPEG</i></a></li>
<li><a href="#5"><i class="arg">pegName</i> <b class="method">--&gt;</b> <i class="arg">dstPEG</i></a></li>
<li><a href="#6"><i class="arg">pegName</i> <b class="method">serialize</b></a></li>
<li><a href="#7"><i class="arg">pegName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></li>
<li><a href="#8"><i class="arg">pegName</i> <b class="method">is valid</b></a></li>
<li><a href="#9"><i class="arg">pegName</i> <b class="method">start</b> <span class="opt">?<i class="arg">pe</i>?</span></a></li>
<li><a href="#10"><i class="arg">pegName</i> <b class="method">nonterminals</b></a></li>
<li><a href="#11"><i class="arg">pegName</i> <b class="method">nonterminal add</b> <i class="arg">nt</i> <i class="arg">pe</i></a></li>
<li><a href="#12"><i class="arg">pegName</i> <b class="method">nonterminal delete</b> <i class="arg">nt1</i> <span class="opt">?<i class="arg">nt2</i> ...?</span></a></li>
<li><a href="#13"><i class="arg">pegName</i> <b class="method">nonterminal exists</b> <i class="arg">nt</i></a></li>
<li><a href="#14"><i class="arg">pegName</i> <b class="method">nonterminal rename</b> <i class="arg">nt</i> <i class="arg">ntnew</i></a></li>
<li><a href="#15"><i class="arg">pegName</i> <b class="method">nonterminal mode</b> <i class="arg">nt</i> <span class="opt">?<i class="arg">mode</i>?</span></a></li>
<li><a href="#16"><i class="arg">pegName</i> <b class="method">nonterminal rule</b> <i class="arg">nt</i></a></li>
<li><a href="#17"><i class="arg">pegName</i> <b class="method">unknown nonterminals</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a container class for
<i class="term">parsing expression grammars</i> (Short: PEG).
It allows the incremental definition of the grammar, its manipulation
and querying of the definition.
The package neither provides complex operations on the grammar, nor has
it the ability to execute a grammar definition for a stream of symbols.
Two packages related to this one are <b class="package">grammar::mengine</b> and
<b class="package">grammar::peg::interpreter</b>. The first of them defines a
general virtual machine for the matching of a character stream, and
the second implements an interpreter for parsing expression grammars
on top of that virtual machine.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">TERMS &amp; CONCEPTS</a></h3>
<p>PEGs are similar to context-free grammars, but not equivalent; in some
cases PEGs are strictly more powerful than context-free grammars (there
exist PEGs for some non-context-free languages).
The formal mathematical definition of parsing expressions and parsing
expression grammars can be found in section
<span class="sectref"><a href="#section2">PARSING EXPRESSION GRAMMARS</a></span>.</p>
<p>In short, we have <i class="term">terminal symbols</i>, which are the most basic
building blocks for <i class="term">sentences</i>, and <i class="term">nonterminal symbols</i>
with associated <i class="term">parsing expressions</i>, defining the grammatical
structure of the sentences. The two sets of symbols are distinctive,
and do not overlap. When speaking about symbols the word &quot;symbol&quot; is
often left out. The union of the sets of terminal and nonterminal
symbols is called the set of <i class="term">symbols</i>.</p>
<p>Here the set of <i class="term">terminal symbols</i> is not explicitly managed,
but implicitly defined as the set of all characters. Note that this
means that we inherit from Tcl the ability to handle all of Unicode.</p>
<p>A pair of <i class="term">nonterminal</i> and <i class="term"><a href="../../../../index.html#key8">parsing expression</a></i> is also
called a <i class="term">grammatical rule</i>, or <i class="term">rule</i> for short. In the
context of a rule the nonterminal is often called the left-hand-side
(LHS), and the parsing expression the right-hand-side (RHS).</p>
<p>The <i class="term">start expression</i> of a grammar is a parsing expression
from which all the sentences contained in the language specified by
the grammar are <i class="term">derived</i>.
To make the understanding of this term easier let us assume for a
moment that the RHS of each rule, and the start expression, is either
a sequence of symbols, or a series of alternate parsing expressions.
In the latter case the rule can be seen as a set of rules, each
providing one alternative for the nonterminal.
A parsing expression A' is now a derivation of a parsing expression A
if we pick one of the nonterminals N in the expression, and one of the
alternative rules R for N, and then replace the nonterminal in A with
the RHS of the chosen rule. Here we can see why the terminal symbols
are called such. They cannot be expanded any further, thus terminate
the process of deriving new expressions.
An example</p>
<pre class="doctools_example">
    Rules
      (1)  A &lt;- a B c
      (2a) B &lt;- d B
      (2b) B &lt;- e
    Some derivations, using starting expression A.
      A -/1/-&gt; a B c -/2a/-&gt; a d B c -/2b/-&gt; a d e c
</pre>
<p>A derived expression containing only terminal symbols is a
<i class="term">sentence</i>. The set of all sentences which can be derived from
the start expression is the <i class="term">language</i> of the grammar.</p>
<p>Some definitions for nonterminals and expressions:</p>
<ol class="doctools_enumerated">
<li><p>A nonterminal A is called <i class="term">reachable</i> if it is possible to derive
a parsing expression from the start expression which contains A.</p></li>
<li><p>A nonterminal A is called <i class="term">useful</i> if it is possible to derive a
sentence from it.</p></li>
<li><p>A nonterminal A is called <i class="term">recursive</i> if it is possible to derive
a parsing expression from it which contains A, again.</p></li>
<li><p>The <i class="term">FIRST set</i> of a nonterminal A contains all the symbols which
can occur of as the leftmost symbol in a parsing expression derived from
A. If the FIRST set contains A itself then that nonterminal is called
<i class="term">left-recursive</i>.</p></li>
<li><p>The <i class="term">LAST set</i> of a nonterminal A contains all the symbols which
can occur of as the rightmost symbol in a parsing expression derived from
A. If the LAST set contains A itself then that nonterminal is called
<i class="term">right-recursive</i>.</p></li>
<li><p>The <i class="term">FOLLOW set</i> of a nonterminal A contains all the symbols which
can occur after A in a parsing expression derived from the start
expression.</p></li>
<li><p>A nonterminal (or parsing expression) is called <i class="term">nullable</i> if the
empty sentence can be derived from it.</p></li>
</ol>
<p>And based on the above definitions for grammars:</p>
<ol class="doctools_enumerated">
<li><p>A grammar G is <i class="term">recursive</i> if and only if it contains a nonterminal
A which is recursive. The terms <i class="term">left-</i> and <i class="term">right-recursive</i>,
and <i class="term">useful</i> are analogously defined.</p></li>
<li><p>A grammar is <i class="term">minimal</i> if it contains only <i class="term">reachable</i> and
<i class="term">useful</i> nonterminals.</p></li>
<li><p>A grammar is <i class="term">wellformed</i> if it is not left-recursive. Such
grammars are also <i class="term">complete</i>, which means that they always succeed
or fail on all input sentences. For an incomplete grammar on the
other hand input sentences exist for which an attempt to match them
against the grammar will not terminate.</p></li>
<li><p>As we wish to allow ourselves to build a grammar incrementally in a
container object we will encounter stages where the RHS of one or more
rules reference symbols which are not yet known to the container. Such
a grammar we call <i class="term">invalid</i>.
We cannot use the term <i class="term">incomplete</i> as this term is already
taken, see the last item.</p></li>
</ol>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">CONTAINER CLASS API</a></h3>
<p>The package exports the API described here.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::peg</b> <i class="arg">pegName</i> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">&lt;--</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">src</i>?</span></a></dt>
<dd><p>The command creates a new container object for a parsing expression
grammar and returns the fully qualified name of the object command as
its result. The API the returned command is following is described in
the section <span class="sectref"><a href="#subsection3">CONTAINER OBJECT API</a></span>. It may be used to invoke
various operations on the container and the grammar within.</p>
<p>The new container, i.e. grammar will be empty if no <i class="arg">src</i> is
specified. Otherwise it will contain a copy of the grammar contained
in the <i class="arg">src</i>.
The <i class="arg">src</i> has to be a container object reference for all operators
except <b class="const">deserialize</b>.
The <b class="const">deserialize</b> operator requires <i class="arg">src</i> to be the
serialization of a parsing expression grammar instead.</p>
<p>An empty grammar has no nonterminal symbols, and the start expression
is the empty expression, i.e. epsilon. It is <i class="term">valid</i>, but not
<i class="term">useful</i>.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">CONTAINER OBJECT API</a></h3>
<p>All grammar container objects provide the following methods for the
manipulation of their contents:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">pegName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the grammar, including its storage space and associated
command.</p></dd>
<dt><a name="3"><i class="arg">pegName</i> <b class="method">clear</b></a></dt>
<dd><p>Clears out the definition of the grammar contained in <i class="arg">pegName</i>,
but does <em>not</em> destroy the object.</p></dd>
<dt><a name="4"><i class="arg">pegName</i> <b class="method">=</b> <i class="arg">srcPEG</i></a></dt>
<dd><p>Assigns the contents of the grammar contained in <i class="arg">srcPEG</i> to
<i class="arg">pegName</i>, overwriting any existing definition.
This is the assignment operator for grammars. It copies the grammar
contained in the grammar object <i class="arg">srcPEG</i> over the grammar
definition in <i class="arg">pegName</i>. The old contents of <i class="arg">pegName</i> are
deleted by this operation.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">pegName</i> <b class="method">deserialize</b> [<i class="arg">srcPEG</i> <b class="method">serialize</b>]
</pre>
</dd>
<dt><a name="5"><i class="arg">pegName</i> <b class="method">--&gt;</b> <i class="arg">dstPEG</i></a></dt>
<dd><p>This is the reverse assignment operator for grammars. It copies the
automation contained in the object <i class="arg">pegName</i> over the grammar
definition in the object <i class="arg">dstPEG</i>.
The old contents of <i class="arg">dstPEG</i> are deleted by this operation.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">dstPEG</i> <b class="method">deserialize</b> [<i class="arg">pegName</i> <b class="method">serialize</b>]
</pre>
</dd>
<dt><a name="6"><i class="arg">pegName</i> <b class="method">serialize</b></a></dt>
<dd><p>This method serializes the grammar stored in <i class="arg">pegName</i>. In other
words it returns a tcl <em>value</em> completely describing that
grammar.
This allows, for example, the transfer of grammars over arbitrary
channels, persistence, etc.
This method is also the basis for both the copy constructor and the
assignment operator.</p>
<p>The result of this method has to be semantically identical over all
implementations of the <b class="package">grammar::peg</b> interface. This is what
will enable us to copy grammars between different implementations of
the same interface.</p>
<p>The result is a list of four elements with the following structure:</p>
<ol class="doctools_enumerated">
<li><p>The constant string <b class="const">grammar::peg</b>.</p></li>
<li><p>A dictionary. Its keys are the names of all known nonterminal symbols,
and their associated values are the parsing expressions describing
their sentennial structure.</p></li>
<li><p>A dictionary. Its keys are the names of all known nonterminal symbols,
and their associated values hints to a matcher regarding the semantic
values produced by the symbol.</p></li>
<li><p>The last item is a parsing expression, the <i class="term">start expression</i>
of the grammar.</p></li>
</ol>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'
    Sign       &lt;- '+' / '-'
    Number     &lt;- Sign? Digit+
    Expression &lt;- '(' Expression ')' / (Factor (MulOp Factor)*)
    MulOp      &lt;- '*' / '/'
    Factor     &lt;- Term (AddOp Term)*
    AddOp      &lt;- '+'/'-'
    Term       &lt;- Number
</pre>
<p>a possible serialization is</p>
<pre class="doctools_example">
    grammar::peg \\
    {Expression {/ {x ( Expression )} {x Factor {* {x MulOp Factor}}}} \\
     Factor     {x Term {* {x AddOp Term}}} \\
     Term       Number \\
     MulOp      {/ * /} \\
     AddOp      {/ + -} \\
     Number     {x {? Sign} {+ Digit}} \\
     Sign       {/ + -} \\
     Digit      {/ 0 1 2 3 4 5 6 7 8 9} \\
    } \\
    {Expression value     Factor     value \\
     Term       value     MulOp      value \\
     AddOp      value     Number     value \\
     Sign       value     Digit      value \\
    }
    Expression
</pre>
<p>A possible one, because the order of the nonterminals in the
dictionary is not relevant.</p></dd>
<dt><a name="7"><i class="arg">pegName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></dt>
<dd><p>This is the complement to <b class="method">serialize</b>. It replaces the grammar
definition in <i class="arg">pegName</i> with the grammar described by the
<i class="arg">serialization</i> value. The old contents of <i class="arg">pegName</i> are
deleted by this operation.</p></dd>
<dt><a name="8"><i class="arg">pegName</i> <b class="method">is valid</b></a></dt>
<dd><p>A predicate. It tests whether the PEG in <i class="arg">pegName</i> is <i class="term">valid</i>.
See section <span class="sectref"><a href="#subsection1">TERMS &amp; CONCEPTS</a></span> for the definition of this
grammar property.
The result is a boolean value. It will be set to <b class="const">true</b> if
the PEG has the tested property, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="9"><i class="arg">pegName</i> <b class="method">start</b> <span class="opt">?<i class="arg">pe</i>?</span></a></dt>
<dd><p>This method defines the <i class="term">start expression</i> of the grammar. It
replaces the previously defined start expression with the parsing
expression <i class="arg">pe</i>.
The method fails and throws an error if <i class="arg">pe</i> does not contain a
valid parsing expression as specified in the section
<span class="sectref"><a href="#subsection4">PARSING EXPRESSIONS</a></span>. In that case the existing start
expression is not changed.
The method returns the empty string as its result.</p>
<p>If the method is called without an argument it will return the currently
defined start expression.</p></dd>
<dt><a name="10"><i class="arg">pegName</i> <b class="method">nonterminals</b></a></dt>
<dd><p>Returns the set of all nonterminal symbols known to the grammar.</p></dd>
<dt><a name="11"><i class="arg">pegName</i> <b class="method">nonterminal add</b> <i class="arg">nt</i> <i class="arg">pe</i></a></dt>
<dd><p>This method adds the nonterminal <i class="arg">nt</i> and its associated parsing
expression <i class="arg">pe</i> to the set of nonterminal symbols and rules of the
PEG contained in the object <i class="arg">pegName</i>.
The method fails and throws an error if either the string <i class="arg">nt</i> is
already known as a symbol of the grammar, or if <i class="arg">pe</i> does not
contain a valid parsing expression as specified in the section
<span class="sectref"><a href="#subsection4">PARSING EXPRESSIONS</a></span>. In that case the current set of
nonterminal symbols and rules is not changed.
The method returns the empty string as its result.</p></dd>
<dt><a name="12"><i class="arg">pegName</i> <b class="method">nonterminal delete</b> <i class="arg">nt1</i> <span class="opt">?<i class="arg">nt2</i> ...?</span></a></dt>
<dd><p>This method removes the named symbols <i class="arg">nt1</i>, <i class="arg">nt2</i> from the
set of nonterminal symbols of the PEG contained in the object
<i class="arg">pegName</i>.
The method fails and throws an error if any of the strings is not
known as a nonterminal symbol. In that case the current set of
nonterminal symbols is not changed.
The method returns the empty string as its result.</p>
<p>The stored grammar becomes invalid if the deleted nonterminals are
referenced by the RHS of still-known rules.</p></dd>
<dt><a name="13"><i class="arg">pegName</i> <b class="method">nonterminal exists</b> <i class="arg">nt</i></a></dt>
<dd><p>A predicate. It tests whether the nonterminal symbol <i class="arg">nt</i> is known
to the PEG in <i class="arg">pegName</i>.
The result is a boolean value. It will be set to <b class="const">true</b> if the
symbol <i class="arg">nt</i> is known, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="14"><i class="arg">pegName</i> <b class="method">nonterminal rename</b> <i class="arg">nt</i> <i class="arg">ntnew</i></a></dt>
<dd><p>This method renames the nonterminal symbol <i class="arg">nt</i> to <i class="arg">ntnew</i>.
The method fails and throws an error if either <i class="arg">nt</i> is not known
as a nonterminal, or if <i class="arg">ntnew</i> is a known symbol.
The method returns the empty string as its result.</p></dd>
<dt><a name="15"><i class="arg">pegName</i> <b class="method">nonterminal mode</b> <i class="arg">nt</i> <span class="opt">?<i class="arg">mode</i>?</span></a></dt>
<dd><p>This mode returns or sets the semantic mode associated with the
nonterminal symbol <i class="arg">nt</i>. If no <i class="arg">mode</i> is specified the
current mode of the nonterminal is returned. Otherwise the current
mode is set to <i class="arg">mode</i>.
The method fails and throws an error if <i class="arg">nt</i> is not known as a
nonterminal.
The grammar interpreter implemented by the package
<b class="package">grammar::peg::interpreter</b> recognizes the
following modes:</p>
<dl class="doctools_definitions">
<dt>value</dt>
<dd><p>The semantic value of the nonterminal is the abstract syntax tree
created from the AST's of the RHS and a node for the nonterminal
itself.</p></dd>
<dt>match</dt>
<dd><p>The semantic value of the nonterminal is an the abstract syntax tree
consisting of single a node for the string matched by the RHS. The ASTs
generated by the RHS are discarded.</p></dd>
<dt>leaf</dt>
<dd><p>The semantic value of the nonterminal is an the abstract syntax tree
consisting of single a node for the nonterminal itself. The ASTs
generated by the RHS are discarded.</p></dd>
<dt>discard</dt>
<dd><p>The nonterminal has no semantic value. The ASTs generated by the RHS
are discarded (as well).</p></dd>
</dl></dd>
<dt><a name="16"><i class="arg">pegName</i> <b class="method">nonterminal rule</b> <i class="arg">nt</i></a></dt>
<dd><p>This method returns the parsing expression associated with the
nonterminal <i class="arg">nt</i>.
The method fails and throws an error if <i class="arg">nt</i> is not known as a
nonterminal.</p></dd>
<dt><a name="17"><i class="arg">pegName</i> <b class="method">unknown nonterminals</b></a></dt>
<dd><p>This method returns a list containing the names of all nonterminal
symbols which are referenced on the RHS of a grammatical rule, but
have no rule definining their structure. In other words, a list of
the nonterminal symbols which make the grammar invalid. The grammar
is valid if this list is empty.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">PARSING EXPRESSIONS</a></h3>
<p>Various methods of PEG container objects expect a parsing expression
as their argument, or will return such. This section specifies the
format such parsing expressions are in.</p>
<ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any alphanumeric character.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any alphabetical character.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol>
<p>Examples of parsing expressions where already shown, in the
description of the method <b class="method">serialize</b>.</p>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PARSING EXPRESSION GRAMMARS</a></h2>
<p>For the mathematically inclined, a PEG is a 4-tuple (VN,VT,R,eS) where</p>
<ul class="doctools_itemized">
<li><p>VN is a set of <i class="term">nonterminal symbols</i>,</p></li>
<li><p>VT is a set of <i class="term">terminal symbols</i>,</p></li>
<li><p>R is a finite set of rules, where each rule is a pair (A,e), A in VN,
and <i class="term"><a href="../../../../index.html#key807">e</a></i> a <i class="term"><a href="../../../../index.html#key8">parsing expression</a></i>.</p></li>
<li><p>eS is a parsing expression, the <i class="term">start expression</i>.</p></li>
</ul>
<p>Further constraints are</p>
<ul class="doctools_itemized">
<li><p>The intersection of VN and VT is empty.</p></li>
<li><p>For all A in VT exists exactly one pair (A,e) in R. In other words, R
is a function from nonterminal symbols to parsing expressions.</p></li>
</ul>
<p>Parsing expression are inductively defined via</p>
<ul class="doctools_itemized">
<li><p>The empty string (epsilon) is a parsing expression.</p></li>
<li><p>A terminal symbol <i class="term">a</i> is a parsing expression.</p></li>
<li><p>A nonterminal symbol <i class="term">A</i> is a parsing expression.</p></li>
<li><p><i class="term">e1</i><i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">sequence</i>.</p></li>
<li><p><i class="term">e1</i>/<i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">ordered choice</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key807">e</a></i>* is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#key807">e</a></i>. This is called <i class="term">zero-or-more repetitions</i>, also known
as <i class="term">kleene closure</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key807">e</a></i>+ is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#key807">e</a></i>. This is called <i class="term">one-or-more repetitions</i>, also known
as <i class="term">positive kleene closure</i>.</p></li>
<li><p>!<i class="term"><a href="../../../../index.html#key807">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called a <i class="term">not lookahead predicate</i>.</p></li>
<li><p>&amp;<i class="term"><a href="../../../../index.html#key807">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called an <i class="term">and lookahead predicate</i>.</p></li>
</ul>
<p>PEGs are used to define a grammatical structure for streams of symbols
over VT. They are a modern phrasing of older formalisms invented by
Alexander Birham. These formalisms were called TS (TMG recognition
scheme), and gTS (generalized TS). Later they were renamed to TPDL
(Top-Down Parsing Languages) and gTPDL (generalized TPDL).</p>
<p>They can be easily implemented by recursive descent parsers with
backtracking. This makes them relatives of LL(k) Context-Free
Grammars.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://www.pdos.lcs.mit.edu/~baford/packrat/">The Packrat Parsing and Parsing Expression Grammars Page</a>,
by Bryan Ford, Massachusetts Institute of Technology. This is the main
entry page to PEGs, and their realization through Packrat Parsers.</p></li>
<li><p><a href="http://www.cs.vu.nl/~dick/PTAPG.html">Parsing Techniques - A Practical Guide </a>, an online book
offering a clear, accessible, and thorough discussion of many
different parsing techniques with their interrelations and
applicabilities, including error recovery techniques.</p></li>
<li><p><a href="http://scifac.ru.ac.za/compilers/">Compilers and Compiler Generators</a>, an online book using
CoCo/R, a generator for recursive descent parsers.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_peg</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/grammar_peg/peg_interp.html.





























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206

<div class='fossil-doc' data-title='grammar::peg::interp - Grammar operations and usage'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::peg::interp(n) 0.1.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::peg::interp - Interpreter for parsing expression grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">THE INTERPRETER API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">grammar::mengine <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">grammar::peg::interp <span class="opt">?0.1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::grammar::peg::interp::setup</b> <i class="arg">peg</i></a></li>
<li><a href="#2"><b class="cmd">::grammar::peg::interp::parse</b> <i class="arg">nextcmd</i> <i class="arg">errorvar</i> <i class="arg">astvar</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for the controlled matching of a
character stream via a parsing expression grammar and the creation
of an abstract syntax tree for the stream and partials.</p>
<p>It is built on top of the virtual machine provided by the package
<b class="package"><a href="../grammar_me/me_tcl.html">grammar::me::tcl</a></b> and directly interprets the parsing
expression grammar given to it.
In other words, the grammar is <em>not</em> pre-compiled but used as is.</p>
<p>The grammar to be interpreted is taken from a container object
following the interface specified by the package
<b class="package">grammar::peg::container</b>. Only the relevant parts
are copied into the state of this package.</p>
<p>It should be noted that the package provides exactly one instance
of the interpreter, and interpreting a second grammar requires
the user to either abort or complete a running interpretation, or
to put them into different Tcl interpreters.</p>
<p>Also of note is that the implementation assumes a pull-type
handling of the input. In other words, the interpreter pulls
characters from the input stream as it needs them. For usage
in a push environment, i.e. where the environment pushes new
characters as they come we have to put the engine into its
own thread.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">THE INTERPRETER API</a></h2>
<p>The package exports the following API</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::grammar::peg::interp::setup</b> <i class="arg">peg</i></a></dt>
<dd><p>This command (re)initializes the interpreter. It returns the
empty string. This command has to be invoked first, before any
matching run.</p>
<p>Its argument <i class="arg">peg</i> is the handle of an object containing the
parsing expression grammar to interpret. This grammar has to be
valid, or an error will be thrown.</p></dd>
<dt><a name="2"><b class="cmd">::grammar::peg::interp::parse</b> <i class="arg">nextcmd</i> <i class="arg">errorvar</i> <i class="arg">astvar</i></a></dt>
<dd><p>This command interprets the loaded grammar and tries to match it
against the stream of characters represented by the command prefix
<i class="arg">nextcmd</i>.</p>
<p>The command prefix <i class="arg">nextcmd</i> represents the input stream of
characters and is invoked by the interpreter whenever the a new
character from the stream is required.
The callback has to return either the empty list, or a list of 4
elements containing the token, its lexeme attribute, and its location
as line number and column index, in this order.
The empty list is the signal that the end of the input stream has been
reached. The lexeme attribute is stored in the terminal cache, but
otherwise not used by the machine.</p>
<p>The result of the command is a boolean value indicating whether the
matching process was successful (<b class="const">true</b>), or not
(<b class="const">false</b>). In the case of a match failure error information will
be stored into the variable referenced by <i class="arg">errorvar</i>. The variable
referenced by <i class="arg">astvar</i> will always contain the generated abstract
syntax tree, however in the case of an error it will be only partial
and possibly malformed.</p>
<p>The abstract syntax tree is represented by a nested list, as
described in section <b class="sectref">AST VALUES</b> of
document <i class="term"><a href="../grammar_me/me_ast.html">grammar::me_ast</a></i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_peg</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/hook/hook.html.



















































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409

<div class='fossil-doc' data-title='hook - Hooks'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">hook(n) 0.1 tcllib &quot;Hooks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>hook - Hooks</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Concepts</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Introduction</a></li>
<li class="doctools_subsection"><a href="#subsection2">Bindings</a></li>
<li class="doctools_subsection"><a href="#subsection3">Subjects and observers</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Reference</a></li>
<li class="doctools_section"><a href="#section4">Example</a></li>
<li class="doctools_section"><a href="#section5">Credits</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">hook <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">hook</b> <b class="method">bind</b> <span class="opt">?<i class="arg">subject</i>?</span> <span class="opt">?<i class="arg">hook</i>?</span> <span class="opt">?<i class="arg">observer</i>?</span> <span class="opt">?<i class="arg">cmdPrefix</i>?</span></a></li>
<li><a href="#2"><b class="cmd">hook</b> <b class="method">call</b> <i class="arg">subject</i> <i class="arg">hook</i> <span class="opt">?<i class="arg">args</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">hook</b> <b class="method">forget</b> <i class="arg">object</i></a></li>
<li><a href="#4"><b class="cmd">hook</b> <b class="method">cget</b> <i class="arg">option</i></a></li>
<li><a href="#5"><b class="cmd">hook</b> <b class="method">configure</b> <b class="option">option</b> <i class="arg">value</i> ...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the <b class="cmd">hook</b> ensemble command, which
implements the Subject/Observer pattern. It allows <i class="term">subjects</i>,
which may be <i class="term">modules</i>, <i class="term">objects</i>, <i class="term">widgets</i>, and so
forth, to synchronously call <i class="term">hooks</i> which may be bound to an
arbitrary number of subscribers, called <i class="term">observers</i>. A subject
may call any number of distinct hooks, and any number of observers can
bind callbacks to a particular hook called by a particular
subject. Hook bindings can be queried and deleted.</p>
<p>This man page is intended to be a reference only.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Introduction</a></h3>
<p>Tcl modules usually send notifications to other modules in two ways:
via Tk events, and via callback options like the text widget's
<b class="option">-yscrollcommand</b> option. Tk events are available only in Tk,
and callback options require tight coupling between the modules
sending and receiving the notification.</p>
<p>Loose coupling between sender and receiver is often desirable,
however.  In Model/View/Controller terms, a View can send a command
(stemming from user input) to the Controller, which updates the
Model. The Model can then call a hook <em>to which all relevant
Views subscribe.</em> The Model is decoupled from the Views, and indeed
need not know whether any Views actually exist.
At present, Tcl/Tk has no standard mechanism for implementing loose
coupling of this kind. This package defines a new command, <b class="cmd">hook</b>,
which implements just such a mechanism.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Bindings</a></h3>
<p>The <b class="cmd">hook</b> command manages a collection of hook bindings. A hook
binding has four elements:</p>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key678">subject</a></i>: the name of the entity that will be calling the
hook.</p></li>
<li><p>The <i class="term"><a href="../../../../index.html#key680">hook</a></i> itself. A hook usually reflects some occurrence in the
life of the <i class="term"><a href="../../../../index.html#key678">subject</a></i> that other entities might care to know
about. A <i class="term"><a href="../../../../index.html#key680">hook</a></i> has a name, and may also have arguments. Hook
names are arbitrary strings. Each <i class="term"><a href="../../../../index.html#key678">subject</a></i> must document the
names and arguments of the hooks it can call.</p></li>
<li><p>The name of the <i class="term"><a href="../../../../index.html#key650">observer</a></i> that wishes to receive the <i class="term"><a href="../../../../index.html#key680">hook</a></i>
from the <i class="term"><a href="../../../../index.html#key678">subject</a></i>.</p></li>
<li><p>A command prefix to which the <i class="term"><a href="../../../../index.html#key680">hook</a></i> arguments will be appended
when the binding is executed.</p></li>
</ol>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Subjects and observers</a></h3>
<p>For convenience, this document collectively refers to subjects and
observers as <i class="term">objects</i>, while placing no requirements on how
these <i class="term">objects</i> are actually implemented. An object can be a
<b class="package"><a href="../../../../index.html#key757">TclOO</a></b> or <b class="package"><a href="../../../../index.html#key798">Snit</a></b> or <b class="package">XOTcl</b> object, a Tcl
command, a namespace, a module, a pseudo-object managed by some other
object (as tags are managed by the Tk text widget) or simply a
well-known name.</p>
<p>Subject and observer names are arbitrary strings; however, as
<b class="cmd">hook</b> might be used at the package level, it's necessary to have
conventions that avoid name collisions between packages written by
different people.</p>
<p>Therefore, any subject or observer name used in core or package level
code should look like a Tcl command name, and should be defined in a
namespace owned by the package. Consider, for example, an ensemble
command <b class="cmd">::foo</b> that creates a set of pseudo-objects and uses
<b class="package">hook</b> to send notifications. The pseudo-objects have names
that are not commands and exist in their own namespace, rather like
file handles do. To avoid name collisions with subjects defined by
other packages, users of <b class="package">hook</b>, these <b class="cmd">::foo</b> handles
should have names like <b class="const">::foo::1</b>, <b class="const">::foo::2</b>, and so on.</p>
<p>Because object names are arbitrary strings, application code can use
whatever additional conventions are dictated by the needs of the
application.</p>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Reference</a></h2>
<p>Hook provides the following commands:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">hook</b> <b class="method">bind</b> <span class="opt">?<i class="arg">subject</i>?</span> <span class="opt">?<i class="arg">hook</i>?</span> <span class="opt">?<i class="arg">observer</i>?</span> <span class="opt">?<i class="arg">cmdPrefix</i>?</span></a></dt>
<dd><p>This subcommand is used to create, update, delete, and query hook
bindings.</p>
<p>Called with no arguments it returns a list of the subjects with
hooks to which observers are currently bound.</p>
<p>Called with one argument, a <i class="arg">subject</i>, it returns a list of
the subject's hooks to which observers are currently bound.</p>
<p>Called with two arguments, a <i class="arg">subject</i> and a <i class="arg">hook</i>, it
returns a list of the observers which are currently bound to this
<i class="arg">subject</i> and <i class="arg">hook</i>.</p>
<p>Called with three arguments, a <i class="arg">subject</i>, a <i class="arg">hook</i>, and
an <i class="arg">observer</i>, it returns the binding proper, the command prefix
to be called when the hook is called, or the empty string if there is
no such binding.</p>
<p>Called with four arguments, it creates, updates, or deletes a
binding. If <i class="arg">cmdPrefix</i> is the empty string, it deletes any
existing binding for the <i class="arg">subject</i>, <i class="arg">hook</i>, and
<i class="arg">observer</i>; nothing is returned. Otherwise, <i class="arg">cmdPrefix</i> must
be a command prefix taking as many additional arguments as are
documented for the <i class="arg">subject</i> and <i class="arg">hook</i>. The binding is added
or updated, and the observer is returned.</p>
<p>If the <i class="arg">observer</i> is the empty string, &quot;&quot;, it will create a
new binding using an automatically generated observer name of the form
<b class="const">::hook::ob</b>&lt;<b class="variable">number</b>&gt;. The automatically generated name
will be returned, and can be used to query, update, and delete the
binding as usual. If automated observer names are always used, the
observer name effectively becomes a unique binding ID.</p>
<p>It is possible to call <b class="cmd">hook bind</b> to create or delete a
binding to a <i class="arg">subject</i> and <i class="arg">hook</i> while in an observer binding
for that same <i class="arg">subject</i> and <i class="arg">hook</i>. The following rules
determine what happens when</p>
<pre class="doctools_example">
    hook bind $s $h $o $binding
</pre>
<p>is called during the execution of</p>
<pre class="doctools_example">
    hook call $s $h
</pre>
<ol class="doctools_enumerated">
<li><p>No binding is ever called after it is deleted.</p></li>
<li><p>When a binding is called, the most recently given command prefix is
always used.</p></li>
<li><p>The set of observers whose bindings are to be called is determined
when this method begins to execute, and does not change thereafter,
except that deleted bindings are not called.</p></li>
</ol>
<p>In particular:</p>
<ol class="doctools_enumerated">
<li><p>If <b class="variable">$o</b>s binding to <b class="variable">$s</b> and <b class="variable">$h</b> is deleted, and
<b class="variable">$o</b>s binding has not yet been called during this execution of</p>
<pre class="doctools_example">
    hook call $s $h
</pre>
<p>it will not be called. (Note that it might already have been called;
and in all likelihood, it is probably deleting itself.)</p></li>
<li><p>If <b class="variable">$o</b> changes the command prefix that's bound to <b class="variable">$s</b> and
<b class="variable">$h</b>, and if <b class="variable">$o</b>s binding has not yet been called during
this execution of</p>
<pre class="doctools_example">
    hook call $s $h
</pre>
<p>the new binding will be called when the time comes. (But again, it is
probably <b class="variable">$o</b>s binding that is is making the change.)</p></li>
<li><p>If a new observer is bound to <b class="variable">$s</b> and <b class="variable">$h</b>, its binding will
not be called until the next invocation of</p>
<pre class="doctools_example">
    hook call $s $h
</pre>
</li>
</ol></dd>
<dt><a name="2"><b class="cmd">hook</b> <b class="method">call</b> <i class="arg">subject</i> <i class="arg">hook</i> <span class="opt">?<i class="arg">args</i>...?</span></a></dt>
<dd><p>This command is called when the named <i class="arg">subject</i> wishes to call the
named <i class="arg">hook</i>. All relevant bindings are called with the specified
arguments in the global namespace. Note that the bindings are called
synchronously, before the command returns; this allows the <i class="arg">args</i>
to include references to entities that will be cleaned up as soon as
the hook has been called.</p>
<p>The order in which the bindings are called is not guaranteed. If
sequence among observers must be preserved, define one observer and
have its bindings call the other callbacks directly in the proper
sequence.</p>
<p>Because the <b class="cmd">hook</b> mechanism is intended to support loose
coupling, it is presumed that the <i class="arg">subject</i> has no knowledge of
the observers, nor any expectation regarding return values. This has a
number of implications:</p>
<ol class="doctools_enumerated">
<li><p><b class="cmd">hook call</b> returns the empty string.</p></li>
<li><p>Normal return values from observer bindings are ignored.</p></li>
<li><p>Errors and other exceptional returns propagate normally by
default. This will rarely be what is wanted, because the subjects
usually have no knowledge of the observers and will therefore have no
particular competence at handling their errors. That makes it an
application issue, and so applications will usually want to define an
<b class="option">-errorcommand</b>.</p></li>
</ol>
<p>If the <b class="option">-errorcommand</b> configuration option has a non-empty
value, its value will be invoked for all errors and other exceptional
returns in observer bindings. See <b class="cmd">hook configure</b>, below, for
more information on configuration options.</p></dd>
<dt><a name="3"><b class="cmd">hook</b> <b class="method">forget</b> <i class="arg">object</i></a></dt>
<dd><p>This command deletes any existing bindings in which the named
<i class="arg">object</i> appears as either the <i class="term"><a href="../../../../index.html#key678">subject</a></i> or the
<i class="term"><a href="../../../../index.html#key650">observer</a></i>.
Bindings deleted by this method will never be called again. In
particular,</p>
<ol class="doctools_enumerated">
<li><p>If an observer is forgotten during a call to <b class="cmd">hook call</b>, any
uncalled binding it might have had to the relevant subject and hook
will <em>not</em> be called subsequently.</p></li>
<li><p>If a subject <b class="variable">$s</b> is forgotten during a call to</p>
<pre class="doctools_example">hook call $s $h</pre>
<p>then <b class="cmd">hook call</b> will return as soon as the current binding
returns.  No further bindings will be called.</p></li>
</ol></dd>
<dt><a name="4"><b class="cmd">hook</b> <b class="method">cget</b> <i class="arg">option</i></a></dt>
<dd><p>This command returns the value of one of the <b class="cmd">hook</b> command's
configuration options.</p></dd>
<dt><a name="5"><b class="cmd">hook</b> <b class="method">configure</b> <b class="option">option</b> <i class="arg">value</i> ...</a></dt>
<dd><p>This command sets the value of one or more of the <b class="cmd">hook</b> command's
configuration options:</p>
<dl class="doctools_options">
<dt><b class="option">-errorcommand</b> <i class="arg">cmdPrefix</i></dt>
<dd><p>If the value of this option is the empty string, &quot;&quot;, then errors
and other exception returns in binding scripts are propagated
normally. Otherwise, it must be a command prefix taking three
additional arguments:</p>
<ol class="doctools_enumerated">
<li><p>a 4-element list {subject hook arglist observer},</p></li>
<li><p>the result string, and</p></li>
<li><p>the return options dictionary.</p></li>
</ol>
<p>Given this information, the <b class="option">-errorcommand</b> can choose to log
the error, call <b class="cmd">interp bgerror</b>, delete the errant binding
(thus preventing the error from arising a second time) and so forth.</p></dd>
<dt><b class="option">-tracecommand</b> <i class="arg">cmdPrefix</i></dt>
<dd><p>The option's value should be a command prefix taking four
arguments:</p>
<ol class="doctools_enumerated">
<li><p>a <i class="term"><a href="../../../../index.html#key678">subject</a></i>,</p></li>
<li><p>a <i class="term"><a href="../../../../index.html#key680">hook</a></i>,</p></li>
<li><p>a list of the hook's argument values, and</p></li>
<li><p>a list of <i class="term">objects</i> the hook was called for.</p></li>
</ol>
<p>The command will be called for each hook that is called. This allows
the application to trace hook execution for debugging purposes.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Example</a></h2>
<p>The <b class="cmd">::model</b> module calls the &lt;Update&gt; hook in response to
commands that change the model's data:</p>
<pre class="doctools_example">
     hook call ::model &lt;Update&gt;
</pre>
<p>The <b class="widget">.view</b> megawidget displays the model state, and needs to
know about model updates. Consequently, it subscribes to the ::model's
&lt;Update&gt; hook.</p>
<pre class="doctools_example">
     hook bind ::model &lt;Update&gt; .view [list .view ModelUpdate]
</pre>
<p>When the <b class="cmd">::model</b> calls the hook, the <b class="widget">.view</b>s
ModelUpdate subcommand will be called.</p>
<p>Later the <b class="widget">.view</b> megawidget is destroyed. In its destructor,
it tells the <i class="term"><a href="../../../../index.html#key680">hook</a></i> that it no longer exists:</p>
<pre class="doctools_example">
     hook forget .view
</pre>
<p>All bindings involving <b class="widget">.view</b> are deleted.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Credits</a></h2>
<p>Hook has been designed and implemented by William H. Duquette.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>hook</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../uev/uevent.html">uevent(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key542">event</a>, <a href="../../../../index.html#key680">hook</a>, <a href="../../../../index.html#key650">observer</a>, <a href="../../../../index.html#key679">producer</a>, <a href="../../../../index.html#key681">publisher</a>, <a href="../../../../index.html#key678">subject</a>, <a href="../../../../index.html#key677">subscriber</a>, <a href="../../../../index.html#key682">uevent</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, by William H. Duquette</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/html/html.html.





















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506

<div class='fossil-doc' data-title='html - HTML Generation'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">html(n) 1.4.4 tcllib &quot;HTML Generation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>html - Procedures to generate HTML structures</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">html <span class="opt">?1.4.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::html::author</b> <i class="arg">author</i></a></li>
<li><a href="#2"><b class="cmd">::html::bodyTag</b> <i class="arg">args</i></a></li>
<li><a href="#3"><b class="cmd">::html::cell</b> <i class="arg">param value</i> <span class="opt">?<i class="arg">tag</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::html::checkbox</b> <i class="arg">name value</i></a></li>
<li><a href="#5"><b class="cmd">::html::checkSet</b> <i class="arg">key sep list</i></a></li>
<li><a href="#6"><b class="cmd">::html::checkValue</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::html::closeTag</b></a></li>
<li><a href="#8"><b class="cmd">::html::default</b> <i class="arg">key</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#9"><b class="cmd">::html::description</b> <i class="arg">description</i></a></li>
<li><a href="#10"><b class="cmd">::html::end</b></a></li>
<li><a href="#11"><b class="cmd">::html::eval</b> <i class="arg">arg</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#12"><b class="cmd">::html::extractParam</b> <i class="arg">param key</i> <span class="opt">?<i class="arg">varName</i>?</span></a></li>
<li><a href="#13"><b class="cmd">::html::font</b> <i class="arg">args</i></a></li>
<li><a href="#14"><b class="cmd">::html::for</b> <i class="arg">start test next body</i></a></li>
<li><a href="#15"><b class="cmd">::html::foreach</b> <i class="arg">varlist1 list1</i> <span class="opt">?<i class="arg">varlist2 list2 ...</i>?</span> <i class="arg">body</i></a></li>
<li><a href="#16"><b class="cmd">::html::formValue</b> <i class="arg">name</i> <span class="opt">?<i class="arg">defvalue</i>?</span></a></li>
<li><a href="#17"><b class="cmd">::html::getFormInfo</b> <i class="arg">args</i></a></li>
<li><a href="#18"><b class="cmd">::html::getTitle</b></a></li>
<li><a href="#19"><b class="cmd">::html::h</b> <i class="arg">level string</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#20"><b class="cmd">::html::h1</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#21"><b class="cmd">::html::h2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#22"><b class="cmd">::html::h3</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#23"><b class="cmd">::html::h4</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#24"><b class="cmd">::html::h5</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#25"><b class="cmd">::html::h6</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#26"><b class="cmd">::html::hdrRow</b> <i class="arg">args</i></a></li>
<li><a href="#27"><b class="cmd">::html::head</b> <i class="arg">title</i></a></li>
<li><a href="#28"><b class="cmd">::html::headTag</b> <i class="arg">string</i></a></li>
<li><a href="#29"><b class="cmd">::html::html_entities</b> <i class="arg">string</i></a></li>
<li><a href="#30"><b class="cmd">::html::if</b> <i class="arg">expr1 body1</i> <span class="opt">?<b class="const">elseif</b> <i class="arg">expr2 body2 ...</i>?</span> <span class="opt">?<b class="const">else</b> <i class="arg">bodyN</i>?</span></a></li>
<li><a href="#31"><b class="cmd">::html::init</b> <span class="opt">?<i class="arg">list</i>?</span></a></li>
<li><a href="#32"><b class="cmd">::html::keywords</b> <i class="arg">args</i></a></li>
<li><a href="#33"><b class="cmd">::html::mailto</b> <i class="arg">email</i> <span class="opt">?<i class="arg">subject</i>?</span></a></li>
<li><a href="#34"><b class="cmd">::html::meta</b> <i class="arg">args</i></a></li>
<li><a href="#35"><b class="cmd">::html::css</b> <i class="arg">href</i></a></li>
<li><a href="#36"><b class="cmd">::html::css-clear</b></a></li>
<li><a href="#37"><b class="cmd">::html::js</b> <i class="arg">href</i></a></li>
<li><a href="#38"><b class="cmd">::html::js-clear</b></a></li>
<li><a href="#39"><b class="cmd">::html::minorList</b> <i class="arg">list</i> <span class="opt">?<i class="arg">ordered</i>?</span></a></li>
<li><a href="#40"><b class="cmd">::html::minorMenu</b> <i class="arg">list</i> <span class="opt">?<i class="arg">sep</i>?</span></a></li>
<li><a href="#41"><b class="cmd">::html::nl2br</b> <i class="arg">string</i></a></li>
<li><a href="#42"><b class="cmd">::html::openTag</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#43"><b class="cmd">::html::paramRow</b> <i class="arg">list</i> <span class="opt">?<i class="arg">rparam</i>?</span> <span class="opt">?<i class="arg">cparam</i>?</span></a></li>
<li><a href="#44"><b class="cmd">::html::passwordInput</b> <span class="opt">?<i class="arg">name</i>?</span></a></li>
<li><a href="#45"><b class="cmd">::html::passwordInputRow</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span></a></li>
<li><a href="#46"><b class="cmd">::html::quoteFormValue</b> <i class="arg">value</i></a></li>
<li><a href="#47"><b class="cmd">::html::radioSet</b> <i class="arg">key sep list</i></a></li>
<li><a href="#48"><b class="cmd">::html::radioValue</b> <i class="arg">name value</i></a></li>
<li><a href="#49"><b class="cmd">::html::refresh</b> <i class="arg">seconds url</i></a></li>
<li><a href="#50"><b class="cmd">::html::row</b> <i class="arg">args</i></a></li>
<li><a href="#51"><b class="cmd">::html::select</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></li>
<li><a href="#52"><b class="cmd">::html::selectPlain</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></li>
<li><a href="#53"><b class="cmd">::html::set</b> <i class="arg">var val</i></a></li>
<li><a href="#54"><b class="cmd">::html::submit</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span></a></li>
<li><a href="#55"><b class="cmd">::html::tableFromArray</b> <i class="arg">arrname</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">pat</i>?</span></a></li>
<li><a href="#56"><b class="cmd">::html::tableFromList</b> <i class="arg">querylist</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#57"><b class="cmd">::html::textarea</b> <i class="arg">name</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">current</i>?</span></a></li>
<li><a href="#58"><b class="cmd">::html::textInput</b> <i class="arg">name value args</i></a></li>
<li><a href="#59"><b class="cmd">::html::textInputRow</b> <i class="arg">label name value args</i></a></li>
<li><a href="#60"><b class="cmd">::html::varEmpty</b> <i class="arg">name</i></a></li>
<li><a href="#61"><b class="cmd">::html::while</b> <i class="arg">test body</i></a></li>
<li><a href="#62"><b class="cmd">::html::doctype</b> <i class="arg">id</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">html</b> provides commands that generate HTML.
These commands typically return an HTML string as their result. In
particular, they do not output their result to <b class="const">stdout</b>.</p>
<p>The command <b class="cmd">::html::init</b> should be called early to initialize
the module.  You can also use this procedure to define default values
for HTML tag parameters.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::html::author</b> <i class="arg">author</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define an author for the page.  The author is noted in a comment in
the HEAD section.</p></dd>
<dt><a name="2"><b class="cmd">::html::bodyTag</b> <i class="arg">args</i></a></dt>
<dd><p>Generate a <i class="term">body</i> tag.  The tag parameters are taken from <i class="arg">args</i> or
from the body.* attributes define with <b class="cmd">::html::init</b>.</p></dd>
<dt><a name="3"><b class="cmd">::html::cell</b> <i class="arg">param value</i> <span class="opt">?<i class="arg">tag</i>?</span></a></dt>
<dd><p>Generate a <i class="term">td</i> (or <i class="term">th</i>) tag, a value, and a closing
<i class="term">td</i> (or <i class="term">th</i>) tag. The
tag parameters come from <i class="arg">param</i> or TD.* attributes defined with
<b class="cmd">::html::init</b>.  This uses <b class="cmd">::html::font</b> to insert a standard
<i class="term">font</i> tag into the table cell. The <i class="arg">tag</i> argument defaults to &quot;td&quot;.</p></dd>
<dt><a name="4"><b class="cmd">::html::checkbox</b> <i class="arg">name value</i></a></dt>
<dd><p>Generate a <i class="term"><a href="../../../../index.html#key620">checkbox</a></i> form element with the specified name and value.
This uses <b class="cmd">::html::checkValue</b>.</p></dd>
<dt><a name="5"><b class="cmd">::html::checkSet</b> <i class="arg">key sep list</i></a></dt>
<dd><p>Generate a set of <i class="term"><a href="../../../../index.html#key620">checkbox</a></i> form elements and associated labels.  The
<i class="arg">list</i> should contain an alternating list of labels and values.
This uses <b class="cmd">::html::checkbox</b>. All the <i class="term"><a href="../../../../index.html#key620">checkbox</a></i> buttons share the
same <i class="arg">key</i> for their name. The <i class="arg">sep</i> is text used to separate
the elements.</p></dd>
<dt><a name="6"><b class="cmd">::html::checkValue</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Generate the &quot;name=<i class="arg">name</i> value=<i class="arg">value</i>&quot; for a <i class="term"><a href="../../../../index.html#key620">checkbox</a></i> form
element.  If the CGI variable <i class="arg">name</i> has the value <i class="arg">value</i>,
then SELECTED is added to the return value. <i class="arg">value</i> defaults to
&quot;1&quot;.</p></dd>
<dt><a name="7"><b class="cmd">::html::closeTag</b></a></dt>
<dd><p>Pop a tag off the stack created by <b class="cmd">::html::openTag</b> and generate
the corresponding close tag (e.g., &lt;/body&gt;).</p></dd>
<dt><a name="8"><b class="cmd">::html::default</b> <i class="arg">key</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>This procedure is used by <b class="cmd">::html::tagParam</b> to generate the name,
value list of parameters for a tag.  The <b class="cmd">::html::default</b>
procedure is used to generate default values for those items not
already in <i class="arg">param</i>.  If the value identified by <i class="arg">key</i> matches
a value in <i class="arg">param</i> then this procedure returns the empty string.
Otherwise, it returns a &quot;parameter=value&quot; string for a form element
identified by <i class="arg">key</i>.  The <i class="arg">key</i> has the form &quot;tag.parameter&quot;
(e.g., body.bgcolor).  Use <b class="cmd">::html::init</b> to register default
values. <i class="arg">param</i> defaults to the empty string.</p></dd>
<dt><a name="9"><b class="cmd">::html::description</b> <i class="arg">description</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a description <i class="term">meta</i> tag for the page.  This tag is generated
later in the call to <b class="cmd">::html::head</b>.</p></dd>
<dt><a name="10"><b class="cmd">::html::end</b></a></dt>
<dd><p>Pop all open tags from the stack and generate the corresponding close
HTML tags, (e.g., &lt;/body&gt;&lt;/html&gt;).</p></dd>
<dt><a name="11"><b class="cmd">::html::eval</b> <i class="arg">arg</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd">eval</b> command.  The
only difference is that it returns &quot;&quot; so it can be called from an HTML
template file without appending unwanted results.</p></dd>
<dt><a name="12"><b class="cmd">::html::extractParam</b> <i class="arg">param key</i> <span class="opt">?<i class="arg">varName</i>?</span></a></dt>
<dd><p>This is a parsing procedure that extracts the value of <i class="arg">key</i> from
<i class="arg">param</i>, which is a HTML-style &quot;name=quotedvalue&quot; list.
<i class="arg">varName</i> is used as the name of a Tcl variable that is changed to
have the value found in the parameters.  The function returns 1 if the
parameter was found in <i class="arg">param</i>, otherwise it returns 0.  If the
<i class="arg">varName</i> is not specified, then <i class="arg">key</i> is used as the variable
name.</p></dd>
<dt><a name="13"><b class="cmd">::html::font</b> <i class="arg">args</i></a></dt>
<dd><p>Generate a standard <i class="term">font</i> tag.  The parameters to the tag are taken
from <i class="arg">args</i> and the HTML defaults defined with <b class="cmd">::html::init</b>.</p></dd>
<dt><a name="14"><b class="cmd">::html::for</b> <i class="arg">start test next body</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd">for</b> control
structure.  Rather than evaluating the body, it returns the subst'ed
<i class="arg">body</i>. Each iteration of the loop causes another string to be
concatenated to the result value.</p></dd>
<dt><a name="15"><b class="cmd">::html::foreach</b> <i class="arg">varlist1 list1</i> <span class="opt">?<i class="arg">varlist2 list2 ...</i>?</span> <i class="arg">body</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b> control
structure.  Rather than evaluating the body, it returns the subst'ed
<i class="arg">body</i>.  Each iteration of the loop causes another string to be
concatenated to the result value.</p></dd>
<dt><a name="16"><b class="cmd">::html::formValue</b> <i class="arg">name</i> <span class="opt">?<i class="arg">defvalue</i>?</span></a></dt>
<dd><p>Return a name and value pair, where the value is initialized from
existing CGI data, if any.  The result has this form:</p>
<pre class="doctools_example">
  name=&quot;fred&quot; value=&quot;freds value&quot;
</pre>
</dd>
<dt><a name="17"><b class="cmd">::html::getFormInfo</b> <i class="arg">args</i></a></dt>
<dd><p>Generate hidden fields to capture form values.  If <i class="arg">args</i> is
empty, then hidden fields are generated for all CGI values.  Otherwise
args is a list of string match patterns for form element names.</p></dd>
<dt><a name="18"><b class="cmd">::html::getTitle</b></a></dt>
<dd><p>Return the title string, with out the surrounding <i class="term">title</i> tag,
set with a previous call to <b class="cmd">::html::title</b>.</p></dd>
<dt><a name="19"><b class="cmd">::html::h</b> <i class="arg">level string</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Generate a heading (e.g., <i class="term">h<b class="variable">level</b></i>) tag.  The <i class="arg">string</i> is nested in the
heading, and <i class="arg">param</i> is used for the tag parameters.</p></dd>
<dt><a name="20"><b class="cmd">::html::h1</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Generate an <i class="term">h1</i> tag.  See <b class="cmd">::html::h</b>.</p></dd>
<dt><a name="21"><b class="cmd">::html::h2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Generate an <i class="term">h2</i> tag.  See <b class="cmd">::html::h</b>.</p></dd>
<dt><a name="22"><b class="cmd">::html::h3</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Generate an <i class="term">h3</i> tag.  See <b class="cmd">::html::h</b>.</p></dd>
<dt><a name="23"><b class="cmd">::html::h4</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Generate an <i class="term">h4</i> tag.  See <b class="cmd">::html::h</b>.</p></dd>
<dt><a name="24"><b class="cmd">::html::h5</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Generate an <i class="term">h5</i> tag.  See <b class="cmd">::html::h</b>.</p></dd>
<dt><a name="25"><b class="cmd">::html::h6</b> <i class="arg">string</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Generate an <i class="term">h6</i> tag.  See <b class="cmd">::html::h</b>.</p></dd>
<dt><a name="26"><b class="cmd">::html::hdrRow</b> <i class="arg">args</i></a></dt>
<dd><p>Generate a table row, including <i class="term">tr</i> and <i class="term">th</i> tags.
Each value in <i class="arg">args</i> is place into its own table cell.
This uses <b class="cmd">::html::cell</b>.</p></dd>
<dt><a name="27"><b class="cmd">::html::head</b> <i class="arg">title</i></a></dt>
<dd><p>Generate the <i class="term">head</i> section that includes the page <i class="term">title</i>.
If previous calls have been made to
<b class="cmd">::html::author</b>,
<b class="cmd">::html::keywords</b>,
<b class="cmd">::html::description</b>,
or
<b class="cmd">::html::meta</b>
then additional tags are inserted into the <i class="term">head</i> section.
This leaves an open <i class="term"><a href="../../../../index.html#key617">html</a></i> tag pushed on the stack with
<b class="cmd">::html::openTag</b>.</p></dd>
<dt><a name="28"><b class="cmd">::html::headTag</b> <i class="arg">string</i></a></dt>
<dd><p>Save a tag for inclusion in the <i class="term">head</i> section generated by
<b class="cmd">::html::head</b>.  The <i class="arg">string</i> is everything in the tag except
the enclosing angle brackets, &lt; &gt;.</p></dd>
<dt><a name="29"><b class="cmd">::html::html_entities</b> <i class="arg">string</i></a></dt>
<dd><p>This command replaces all special characters in the <i class="arg">string</i> with
their HTML entities and returns the modified text.</p></dd>
<dt><a name="30"><b class="cmd">::html::if</b> <i class="arg">expr1 body1</i> <span class="opt">?<b class="const">elseif</b> <i class="arg">expr2 body2 ...</i>?</span> <span class="opt">?<b class="const">else</b> <i class="arg">bodyN</i>?</span></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd">if</b> control
structure.  Rather than evaluating the body of the branch that is
taken, it returns the subst'ed <i class="arg">body</i>.  Note that the syntax is
slightly more restrictive than that of the built-in Tcl <b class="cmd">if</b>
control structure.</p></dd>
<dt><a name="31"><b class="cmd">::html::init</b> <span class="opt">?<i class="arg">list</i>?</span></a></dt>
<dd><p><b class="cmd">::html::init</b> accepts a Tcl-style name-value list that defines
values for items with a name of the form &quot;tag.parameter&quot;.  For
example, a default with key &quot;body.bgcolor&quot; defines the background
color for the <i class="term">body</i> tag.</p></dd>
<dt><a name="32"><b class="cmd">::html::keywords</b> <i class="arg">args</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a keyword <i class="term">meta</i> tag for the page.  The <i class="term">meta</i> tag
is included in the result of <b class="cmd">::html::head</b>.</p></dd>
<dt><a name="33"><b class="cmd">::html::mailto</b> <i class="arg">email</i> <span class="opt">?<i class="arg">subject</i>?</span></a></dt>
<dd><p>Generate a hypertext link to a mailto: URL.</p></dd>
<dt><a name="34"><b class="cmd">::html::meta</b> <i class="arg">args</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a <i class="term">meta</i> tag for the page.  The <i class="arg">args</i> is a Tcl-style name,
value list that is used for the name= and value= parameters for the
<i class="term">meta</i> tag.  The <i class="term">meta</i> tag is included in the result of
<b class="cmd">::html::head</b>.</p></dd>
<dt><a name="35"><b class="cmd">::html::css</b> <i class="arg">href</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a <i class="term">link</i> tag for a linked CSS document.  The <i class="arg">href</i> 
value is a HTTP URL to a CSS document. The <i class="term">link</i> tag is included 
in the result of <b class="cmd">::html::head</b>.</p>
<p>Multiple calls of this command are allowed, enabling the use of
multiple CSS document references. In other words, the arguments
of multiple calls are accumulated, and do not overwrite each other.</p></dd>
<dt><a name="36"><b class="cmd">::html::css-clear</b></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
clear all links to CSS documents.</p>
<p>Multiple calls of this command are allowed, doing nothing after the
first of a sequence with no intervening <b class="cmd">::html::css</b>.</p></dd>
<dt><a name="37"><b class="cmd">::html::js</b> <i class="arg">href</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a <i class="term">script</i> tag for a linked JavaScript document.  The 
<i class="arg">href</i> is a HTTP URL to a JavaScript document. The <i class="term">script</i>
tag is included in the result of <b class="cmd">::html::head</b>.</p>
<p>Multiple calls of this command are allowed, enabling the use of
multiple JavaScript document references. In other words, the arguments
of multiple calls are accumulated, and do not overwrite each other.</p></dd>
<dt><a name="38"><b class="cmd">::html::js-clear</b></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
clear all links to JavaScript documents.</p>
<p>Multiple calls of this command are allowed, doing nothing after the
first of a sequence with no intervening <b class="cmd">::html::js</b>.</p></dd>
<dt><a name="39"><b class="cmd">::html::minorList</b> <i class="arg">list</i> <span class="opt">?<i class="arg">ordered</i>?</span></a></dt>
<dd><p>Generate an ordered or unordered list of links.  The <i class="arg">list</i> is a
Tcl-style name, value list of labels and urls for the links.
<i class="arg">ordered</i> is a boolean used to choose between an ordered or
unordered list. It defaults to <b class="const">false</b>.</p></dd>
<dt><a name="40"><b class="cmd">::html::minorMenu</b> <i class="arg">list</i> <span class="opt">?<i class="arg">sep</i>?</span></a></dt>
<dd><p>Generate a series of hypertext links.  The <i class="arg">list</i> is a Tcl-style
name, value list of labels and urls for the links.  The <i class="arg">sep</i> is
the text to put between each link. It defaults to &quot; | &quot;.</p></dd>
<dt><a name="41"><b class="cmd">::html::nl2br</b> <i class="arg">string</i></a></dt>
<dd><p>This command replaces all line-endings in the <i class="arg">string</i> with a
<i class="term">br</i> tag and returns the modified text.</p></dd>
<dt><a name="42"><b class="cmd">::html::openTag</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Push <i class="arg">tag</i> onto a stack and generate the opening tag for
<i class="arg">tag</i>. Use <b class="cmd">::html::closeTag</b> to pop the tag from the
stack. The second argument provides any tag arguments, as a
list whose elements are formatted to be in the form
&quot;<b class="variable">key</b>=<b class="const">value</b>&quot;.</p></dd>
<dt><a name="43"><b class="cmd">::html::paramRow</b> <i class="arg">list</i> <span class="opt">?<i class="arg">rparam</i>?</span> <span class="opt">?<i class="arg">cparam</i>?</span></a></dt>
<dd><p>Generate a table row, including <i class="term">tr</i> and <i class="term">td</i> tags. Each value in
<i class="arg">list</i> is placed into its own table cell. This uses
<b class="cmd">::html::cell</b>. The value of <i class="arg">rparam</i> is used as parameter for
the <i class="term">tr</i> tag. The value of <i class="arg">cparam</i> is passed to <b class="cmd">::html::cell</b>
as parameter for the <i class="term">td</i> tags.</p></dd>
<dt><a name="44"><b class="cmd">::html::passwordInput</b> <span class="opt">?<i class="arg">name</i>?</span></a></dt>
<dd><p>Generate an <i class="term">input</i> tag of type <i class="term"><a href="../../../../index.html#key692">password</a></i>. The <i class="arg">name</i> defaults to
&quot;password&quot;.</p></dd>
<dt><a name="45"><b class="cmd">::html::passwordInputRow</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span></a></dt>
<dd><p>Format a table row containing a label and an <i class="term">input</i> tag of type
<i class="term"><a href="../../../../index.html#key692">password</a></i>. The <i class="arg">name</i> defaults to &quot;password&quot;.</p></dd>
<dt><a name="46"><b class="cmd">::html::quoteFormValue</b> <i class="arg">value</i></a></dt>
<dd><p>Quote special characters in <i class="arg">value</i> by replacing them with HTML
entities for quotes, ampersand, and angle brackets.</p></dd>
<dt><a name="47"><b class="cmd">::html::radioSet</b> <i class="arg">key sep list</i></a></dt>
<dd><p>Generate a set of <i class="term">input</i> tags of type <i class="term">radio</i> and an associated text
label.  All the radio buttons share the same <i class="arg">key</i> for their name.
The <i class="arg">sep</i> is text used to separate the elements.  The <i class="arg">list</i>
is a Tcl-style label, value list.</p></dd>
<dt><a name="48"><b class="cmd">::html::radioValue</b> <i class="arg">name value</i></a></dt>
<dd><p>Generate the &quot;name=<i class="arg">name</i> value=<i class="arg">value</i>&quot; for a <i class="term">radio</i> form
element.  If the CGI variable <i class="arg">name</i> has the value <i class="arg">value</i>,
then SELECTED is added to the return value.</p></dd>
<dt><a name="49"><b class="cmd">::html::refresh</b> <i class="arg">seconds url</i></a></dt>
<dd><p>Set up a refresh <i class="term">meta</i> tag. Call this before <b class="cmd">::html::head</b> and the
HEAD section will contain a <i class="term">meta</i> tag that causes the document to
refresh in <i class="arg">seconds</i> seconds.  The <i class="arg">url</i> is optional.  If
specified, it specifies a new page to load after the refresh interval.</p></dd>
<dt><a name="50"><b class="cmd">::html::row</b> <i class="arg">args</i></a></dt>
<dd><p>Generate a table row, including <i class="term">tr</i> and <i class="term">td</i> tags.  Each value in
<i class="arg">args</i> is place into its own table cell. This uses
<b class="cmd">::html::cell</b>. Ignores any default information set up via
<b class="cmd">::html::init</b>.</p></dd>
<dt><a name="51"><b class="cmd">::html::select</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></dt>
<dd><p>Generate a <i class="term">select</i> form element and nested <i class="term">option</i> tags. The <i class="arg">name</i>
and <i class="arg">param</i> are used to generate the <i class="term">select</i> tag. The <i class="arg">choices</i>
list is a Tcl-style name, value list.</p></dd>
<dt><a name="52"><b class="cmd">::html::selectPlain</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></dt>
<dd><p>Like <b class="cmd">::html::select</b> except that <i class="arg">choices</i> is a Tcl list of
values used for the <i class="term">option</i> tags.  The label and the value for each
<i class="term">option</i> are the same.</p></dd>
<dt><a name="53"><b class="cmd">::html::set</b> <i class="arg">var val</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd"><a href="../../../../index.html#key301">set</a></b> command.  The
main difference is that it returns &quot;&quot; so it can be called from an HTML
template file without appending unwanted results.  The other
difference is that it must take two arguments.</p></dd>
<dt><a name="54"><b class="cmd">::html::submit</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span></a></dt>
<dd><p>Generate an <i class="term">input</i> tag of type <i class="term">submit</i>. <i class="arg">name</i> defaults to &quot;submit&quot;.</p></dd>
<dt><a name="55"><b class="cmd">::html::tableFromArray</b> <i class="arg">arrname</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">pat</i>?</span></a></dt>
<dd><p>Generate a two-column <i class="term"><a href="../../../../index.html#key106">table</a></i> and nested rows to display a Tcl array. The
table gets a heading that matches the array name, and each generated row
contains a name, value pair. The array names are sorted (<b class="cmd">lsort</b> without
special options). The argument <i class="arg">param</i> is for the <i class="term"><a href="../../../../index.html#key106">table</a></i> tag and has
to contain a pre-formatted string. The <i class="arg">pat</i> is a <b class="cmd">string match</b>
pattern used to select the array elements to show in the table. It defaults to
<b class="const">*</b>, i.e. the whole array is shown.</p></dd>
<dt><a name="56"><b class="cmd">::html::tableFromList</b> <i class="arg">querylist</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Generate a two-column <i class="term"><a href="../../../../index.html#key106">table</a></i> and nested rows to display <i class="arg">querylist</i>,
which is a Tcl dictionary. Each generated row contains a name, value pair. The
information is shown in the same order as specified in the dictionary. The
argument <i class="arg">param</i> is for the <i class="term"><a href="../../../../index.html#key106">table</a></i> tag  and has to contain a
pre-formatted string.</p></dd>
<dt><a name="57"><b class="cmd">::html::textarea</b> <i class="arg">name</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">current</i>?</span></a></dt>
<dd><p>Generate a <i class="term">textarea</i> tag wrapped around its current values.</p></dd>
<dt><a name="58"><b class="cmd">::html::textInput</b> <i class="arg">name value args</i></a></dt>
<dd><p>Generate an <i class="term">input</i> form tag with type <i class="term"><a href="../../../../index.html#key248">text</a></i>.  This uses
<b class="cmd">::html::formValue</b>.  The args is any additional tag attributes
you want to put into the <i class="term">input</i> tag.</p></dd>
<dt><a name="59"><b class="cmd">::html::textInputRow</b> <i class="arg">label name value args</i></a></dt>
<dd><p>Generate an <i class="term">input</i> form tag with type <i class="term"><a href="../../../../index.html#key248">text</a></i> formatted into a table row
with an associated label.  The args is any additional tag attributes
you want to put into the <i class="term">input</i> tag.</p></dd>
<dt><a name="60"><b class="cmd">::html::varEmpty</b> <i class="arg">name</i></a></dt>
<dd><p>This returns 1 if the named variable either does not exist or has the
empty string for its value.</p></dd>
<dt><a name="61"><b class="cmd">::html::while</b> <i class="arg">test body</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd">while</b> control
structure.  Rather than evaluating the body, it returns the subst'ed
<i class="arg">body</i>.  Each iteration of the loop causes another string to be
concatenated to the result value.</p></dd>
<dt><a name="62"><b class="cmd">::html::doctype</b> <i class="arg">id</i></a></dt>
<dd><p>This procedure can be used to build the standard DOCTYPE
declaration string. It will return the standard declaration
string for the id, or throw an error if the id is not known.
The following id's are defined:</p>
<ol class="doctools_enumerated">
<li><p>HTML32</p></li>
<li><p>HTML40</p></li>
<li><p>HTML40T</p></li>
<li><p>HTML40F</p></li>
<li><p>HTML401</p></li>
<li><p>HTML401T</p></li>
<li><p>HTML401F</p></li>
<li><p>XHTML10S</p></li>
<li><p>XHTML10T</p></li>
<li><p>XHTML10F</p></li>
<li><p>XHTML11</p></li>
<li><p>XHTMLB</p></li>
</ol></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>html</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../htmlparse/htmlparse.html">htmlparse</a>, <a href="../ncgi/ncgi.html">ncgi</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key620">checkbox</a>, <a href="../../../../index.html#key618">checkbutton</a>, <a href="../../../../index.html#key616">form</a>, <a href="../../../../index.html#key617">html</a>, <a href="../../../../index.html#key619">radiobutton</a>, <a href="../../../../index.html#key106">table</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/htmlparse/htmlparse.html.





















































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314

<div class='fossil-doc' data-title='htmlparse - HTML Parser'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">htmlparse(n) 1.2.2 tcllib &quot;HTML Parser&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>htmlparse - Procedures to parse HTML strings</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::stack 1.3</b></li>
<li>package require <b class="pkgname">cmdline 1.1</b></li>
<li>package require <b class="pkgname">htmlparse <span class="opt">?1.2.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::htmlparse::parse</b> <span class="opt">?-cmd <i class="arg">cmd</i>?</span> <span class="opt">?-vroot <i class="arg">tag</i>?</span> <span class="opt">?-split <i class="arg">n</i>?</span> <span class="opt">?-incvar <i class="arg">var</i>?</span> <span class="opt">?-queue <i class="arg">q</i>?</span> <i class="arg">html</i></a></li>
<li><a href="#2"><b class="cmd">::htmlparse::debugCallback</b> <span class="opt">?<i class="arg">clientdata</i>?</span> <i class="arg">tag slash param textBehindTheTag</i></a></li>
<li><a href="#3"><b class="cmd">::htmlparse::mapEscapes</b> <i class="arg">html</i></a></li>
<li><a href="#4"><b class="cmd">::htmlparse::2tree</b> <i class="arg">html tree</i></a></li>
<li><a href="#5"><b class="cmd">::htmlparse::removeVisualFluff</b> <i class="arg">tree</i></a></li>
<li><a href="#6"><b class="cmd">::htmlparse::removeFormDefs</b> <i class="arg">tree</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">htmlparse</b> package provides commands that allow libraries
and applications to parse HTML in a string into a representation of
their choice.</p>
<p>The following commands are available:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::htmlparse::parse</b> <span class="opt">?-cmd <i class="arg">cmd</i>?</span> <span class="opt">?-vroot <i class="arg">tag</i>?</span> <span class="opt">?-split <i class="arg">n</i>?</span> <span class="opt">?-incvar <i class="arg">var</i>?</span> <span class="opt">?-queue <i class="arg">q</i>?</span> <i class="arg">html</i></a></dt>
<dd><p>This command is the basic parser for HTML. It takes an HTML string,
parses it and invokes a command prefix for every tag encountered. It
is not necessary for the HTML to be valid for this parser to
function. It is the responsibility of the command invoked for every
tag to check this. Another responsibility of the invoked command is
the handling of tag attributes and character entities (escaped
characters). The parser provides the un-interpreted tag attributes to
the invoked command to aid in the former, and the package at large
provides a helper command, <b class="cmd">::htmlparse::mapEscapes</b>, to aid in
the handling of the latter. The parser <em>does</em> ignore leading
DOCTYPE declarations and all valid HTML comments it encounters.</p>
<p>All information beyond the HTML string itself is specified via
options, these are explained below.</p>
<p>To help understand the options, some more background information about
the parser.</p>
<p>It is capable of detecting incomplete tags in the HTML string given to
it. Under normal circumstances this will cause the parser to throw an
error, but if the option <i class="arg">-incvar</i> is used to specify a global (or
namespace) variable, the parser will store the incomplete part of the
input into this variable instead. This will aid greatly in the
handling of incrementally arriving HTML, as the parser will handle
whatever it can and defer the handling of the incomplete part until
more data has arrived.</p>
<p>Another feature of the parser are its two possible modes of
operation. The normal mode is activated if the option <i class="arg">-queue</i> is
not present on the command line invoking the parser. If it is present,
the parser will go into the incremental mode instead.</p>
<p>The main difference is that a parser in normal mode will immediately
invoke the command prefix for each tag it encounters. In incremental
mode however the parser will generate a number of scripts which invoke
the command prefix for groups of tags in the HTML string and then
store these scripts in the specified queue. It is then the
responsibility of the caller of the parser to ensure the execution of
the scripts in the queue.</p>
<p><em>Note</em>: The queue object given to the parser has to provide the
same interface as the queue defined in tcllib -&gt; struct. This means,
for example, that all queues created via that tcllib module can be
immediately used here. Still, the queue doesn't have to come from
tcllib -&gt; struct as long as the same interface is provided.</p>
<p>In both modes the parser will return an empty string to the caller.</p>
<p>The <i class="arg">-split</i> option may be given to a parser in incremental mode to
specify the size of the groups it creates. In other words, -split 5
means that each of the generated scripts will invoke the command
prefix for 5 consecutive tags in the HTML string. A parser in normal
mode will ignore this option and its value.</p>
<p>The option <i class="arg">-vroot</i> specifies a virtual root tag. A parser in
normal mode will invoke the command prefix for it immediately before
and after it processes the tags in the HTML, thus simulating that the
HTML string is enclosed in a &lt;vroot&gt; &lt;/vroot&gt; combination. In
incremental mode however the parser is unable to provide the closing
virtual root as it never knows when the input is complete. In this
case the first script generated by each invocation of the parser will
contain an invocation of the command prefix for the virtual root as
its first command.
The following options are available:</p>
<dl class="doctools_definitions">
<dt><b class="option">-cmd</b> <i class="arg">cmd</i></dt>
<dd><p>The command prefix to invoke for every tag in the HTML
string. Defaults to <i class="arg">::htmlparse::debugCallback</i>.</p></dd>
<dt><b class="option">-vroot</b> <i class="arg">tag</i></dt>
<dd><p>The virtual root tag to add around the HTML in normal mode. In
incremental mode it is the first tag in each chunk processed by the
parser, but there will be no closing tags. Defaults to
<i class="arg">hmstart</i>.</p></dd>
<dt><b class="option">-split</b> <i class="arg">n</i></dt>
<dd><p>The size of the groups produced by an incremental mode parser. Ignored
when in normal mode. Defaults to 10. Values &lt;= 0 are not allowed.</p></dd>
<dt><b class="option">-incvar</b> <i class="arg">var</i></dt>
<dd><p>The name of the variable where to store any incomplete HTML into. This
makes most sense for the incremental mode. The parser will throw an
error if it sees incomplete HTML and has no place to store it to. This
makes sense for the normal mode. Only incomplete tags are detected,
not missing tags.  Optional, defaults to 'no variable'.</p></dd>
</dl>
<dl class="doctools_definitions">
<dt><em>Interface to the command prefix</em></dt>
<dd><p>In normal mode the parser will invoke the command prefix with four
arguments appended. See <b class="cmd">::htmlparse::debugCallback</b> for a
description.</p>
<p>In incremental mode, however, the generated scripts will invoke the
command prefix with five arguments appended. The last four of these
are the same which were mentioned above. The first is a placeholder
string (<b class="const">@win@</b>) for a clientdata value to be supplied later
during the actual execution of the generated scripts. This could be a
tk window path, for example. This allows the user of this package to
preprocess HTML strings without committing them to a specific window,
object, whatever during parsing. This connection can be made
later. This also means that it is possible to cache preprocessed
HTML. Of course, nothing prevents the user of the parser from
replacing the placeholder with an empty string.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::htmlparse::debugCallback</b> <span class="opt">?<i class="arg">clientdata</i>?</span> <i class="arg">tag slash param textBehindTheTag</i></a></dt>
<dd><p>This command is the standard callback used by the parser in
<b class="cmd">::htmlparse::parse</b> if none was specified by the user. It simply
dumps its arguments to stdout.  This callback can be used for both
normal and incremental mode of the calling parser. In other words, it
accepts four or five arguments. The last four arguments are described
below. The optional fifth argument contains the clientdata value
passed to the callback by a parser in incremental mode. All callbacks
have to follow the signature of this command in the last four
arguments, and callbacks used in incremental parsing have to follow
this signature in the last five arguments.</p>
<p>The first argument, <i class="arg">clientdata</i>, is optional and present only if
this command is invoked by a parser in incremental mode. It contains
whatever the user of this package wishes.</p>
<p>The second argument, <i class="arg">tag</i>, contains the name of the tag which is
currently processed by the parser.</p>
<p>The third argument, <i class="arg">slash</i>, is either empty or contains a slash
character. It allows the callback to distinguish between opening
(slash is empty) and closing tags (slash contains a slash character).</p>
<p>The fourth argument, <i class="arg">param</i>, contains the un-interpreted list of
parameters to the tag.</p>
<p>The fifth and last argument, <i class="arg">textBehindTheTag</i>, contains the text
found by the parser behind the tag named in <i class="arg">tag</i>.</p></dd>
<dt><a name="3"><b class="cmd">::htmlparse::mapEscapes</b> <i class="arg">html</i></a></dt>
<dd><p>This command takes a HTML string, substitutes all escape sequences
with their actual characters and then returns the resulting string.
HTML strings which do not contain escape sequences are returned
unchanged.</p></dd>
<dt><a name="4"><b class="cmd">::htmlparse::2tree</b> <i class="arg">html tree</i></a></dt>
<dd><p>This command is a wrapper around <b class="cmd">::htmlparse::parse</b> which takes
an HTML string (in <i class="arg">html</i>) and converts it into a tree containing
the logical structure of the parsed document. The name of the tree is
given to the command as its second argument (<i class="arg">tree</i>). The command
does <b class="cmd">not</b> generate the tree by itself but expects that the caller
provided it with an existing and empty tree. It also expects that the
specified tree object follows the same interface as the tree object in
tcllib -&gt; struct. It doesn't have to be from tcllib -&gt; struct, but it
must provide the same interface.</p>
<p>The internal callback does some basic checking of HTML validity and
tries to recover from the most basic errors. The command returns the
contents of its second argument. Side effects are the creation and
manipulation of a tree object.</p>
<p>Each node in the generated tree represent one tag in the input. The
name of the tag is stored in the attribute <em>type</em> of the
node. Any html attributes coming with the tag are stored unmodified in
the attribute <em>data</em> of the tag. In other words, the command does
<em>not</em> parse html attributes into their names and values.</p>
<p>If a tag contains text its node will have children of type
<em>PCDATA</em> containing this text. The text will be stored in the
attribute <em>data</em> of these children.</p></dd>
<dt><a name="5"><b class="cmd">::htmlparse::removeVisualFluff</b> <i class="arg">tree</i></a></dt>
<dd><p>This command walks a tree as generated by <b class="cmd">::htmlparse::2tree</b> and
removes all the nodes which represent visual tags and not structural
ones. The purpose of the command is to make the tree easier to
navigate without getting bogged down in visual information not
relevant to the search. Its only argument is the name of the tree to
cut down.</p></dd>
<dt><a name="6"><b class="cmd">::htmlparse::removeFormDefs</b> <i class="arg">tree</i></a></dt>
<dd><p>Like <b class="cmd">::htmlparse::removeVisualFluff</b> this command is here to cut
down on the size of the tree as generated by
<b class="cmd">::htmlparse::2tree</b>. It removes all nodes representing forms and
form elements. Its only argument is the name of the tree to cut down.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>htmlparse</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../struct/struct_tree.html">struct::tree</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key617">html</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key50">queue</a>, <a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/http/autoproxy.html.































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<div class='fossil-doc' data-title='autoproxy - HTTP protocol helper modules'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">autoproxy(n) 1.5.3 tcllib &quot;HTTP protocol helper modules&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>autoproxy - Automatic HTTP proxy usage and authentication</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section3">COMMANDS</a></li>
<li class="doctools_section"><a href="#section4">OPTIONS</a></li>
<li class="doctools_section"><a href="#section5">Basic Authentication</a></li>
<li class="doctools_section"><a href="#section6">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section7">REFERENCES</a></li>
<li class="doctools_section"><a href="#section8">BUGS</a></li>
<li class="doctools_section"><a href="#section9">AUTHORS</a></li>
<li class="doctools_section"><a href="#section10">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">http <span class="opt">?2.0?</span></b></li>
<li>package require <b class="pkgname">autoproxy <span class="opt">?1.5.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::autoproxy::init</b></a></li>
<li><a href="#2"><b class="cmd">::autoproxy::cget</b> <i class="arg">-option</i></a></li>
<li><a href="#3"><b class="cmd">::autoproxy::configure</b> <span class="opt">?-option <i class="arg">value</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::autoproxy::tls_connect</b> <i class="arg">args</i></a></li>
<li><a href="#5"><b class="cmd">::autoproxy::tunnel_connect</b> <i class="arg">args</i></a></li>
<li><a href="#6"><b class="cmd">::autoproxy::tls_socket</b> <i class="arg">args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package attempts to automate the use of HTTP proxy servers in Tcl
HTTP client code. It tries to initialize the web access settings from
system standard locations and can be configured to negotiate
authentication with the proxy if required.</p>
<p>On Unix the standard for identifying the local HTTP proxy server
seems to be to use the environment variable http_proxy or ftp_proxy and
no_proxy to list those domains to be excluded from proxying.
On Windows we can retrieve the Internet Settings values from the registry
to obtain pretty much the same information.
With this information we can setup a suitable filter procedure for the
Tcl http package and arrange for automatic use of the proxy.</p>
<p>There seem to be a number of ways that the http_proxy environment
variable may be set up. Either a plain host:port or more commonly a
URL and sometimes the URL may contain authentication parameters or
these may be requested from the user or provided via http_proxy_user
and http_proxy_pass. This package attempts to deal with all these
schemes. It will do it's best to get the required parameters from the
environment or registry and if it fails can be reconfigured.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::autoproxy::init</b></a></dt>
<dd><p>Initialize the autoproxy package from system resources. Under unix
this means we look for environment variables. Under windows we look
for the same environment variables but also look at the registry
settings used by Internet Explorer.</p></dd>
<dt><a name="2"><b class="cmd">::autoproxy::cget</b> <i class="arg">-option</i></a></dt>
<dd><p>Retrieve individual package configuration options. See <span class="sectref"><a href="#section4">OPTIONS</a></span>.</p></dd>
<dt><a name="3"><b class="cmd">::autoproxy::configure</b> <span class="opt">?-option <i class="arg">value</i>?</span></a></dt>
<dd><p>Configure the autoproxy package. Calling <b class="cmd">configure</b> with no
options will return a list of all option names and values.
See <span class="sectref"><a href="#section4">OPTIONS</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::autoproxy::tls_connect</b> <i class="arg">args</i></a></dt>
<dd><p>Connect to a secure socket through a proxy. HTTP proxy servers permit
the use of the CONNECT HTTP command to open a link through the proxy
to the target machine. This function hides the details. For use with
the http package see <b class="cmd">tls_socket</b>.</p>
<p>The <i class="arg">args</i> list may contain any of the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package options but
must end with the host and port as the last two items.</p></dd>
<dt><a name="5"><b class="cmd">::autoproxy::tunnel_connect</b> <i class="arg">args</i></a></dt>
<dd><p>Connect to a target host throught a proxy. This uses the same CONNECT
HTTP command as the <b class="cmd">tls_connect</b> but does not promote the link
security once the connection is established.</p>
<p>The <i class="arg">args</i> list may contain any of the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package options but
must end with the host and port as the last two items.</p>
<p>Note that many proxy servers will permit CONNECT calls to a limited
set of ports - typically only port 443 (the secure HTTP port).</p></dd>
<dt><a name="6"><b class="cmd">::autoproxy::tls_socket</b> <i class="arg">args</i></a></dt>
<dd><p>This function is to be used to register a proxy-aware secure socket
handler for the https protocol. It may only be used with the Tcl http
package and should be registered using the http::register command (see
the examples below). The job of actually creating the tunnelled
connection is done by the tls_connect command and this may be used
when not registering with the http package.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">OPTIONS</a></h2>
<dl class="doctools_options">
<dt><b class="option">-host</b> hostname</dt>
<dd></dd>
<dt><b class="option">-proxy_host</b> hostname</dt>
<dd><p>Set the proxy hostname. This is normally set up by <b class="cmd">init</b> but may
be configured here as well.</p></dd>
<dt><b class="option">-port</b> number</dt>
<dd></dd>
<dt><b class="option">-proxy_port</b> number</dt>
<dd><p>Set the proxy port number. This is normally set up by <b class="cmd">init</b>.
e.g. <b class="cmd">configure</b> <b class="option">-port</b> <i class="arg">3128</i></p></dd>
<dt><b class="option">-no_proxy</b> list</dt>
<dd><p>You may manipulate the <b class="option">no_proxy</b> list that was setup by
<b class="cmd">init</b>. The value of this option is a tcl list of
strings that are matched against the http request host using the tcl
<b class="cmd">string match</b> command. Therefore glob patterns are permitted.
For instance, <b class="cmd">configure</b> <b class="option">-no_proxy</b> <i class="arg">*.localdomain</i></p></dd>
<dt><b class="option">-authProc</b> procedure</dt>
<dd><p>This option may be used to set an application defined procedure to be
called when <b class="cmd">configure</b> <b class="option">-basic</b> is called with either no or
insufficient authentication details. This can be used to present a
dialog to the user to request the additional information.</p></dd>
<dt><b class="option">-basic</b></dt>
<dd><p>Following options are for configuring the Basic authentication
scheme parameters. See <span class="sectref"><a href="#section5">Basic Authentication</a></span>.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Basic Authentication</a></h2>
<p>Basic is the simplest and most commonly use HTTP proxy authentication
scheme. It is described in (1 section 11) and also in (2). It offers
no privacy whatsoever and its use should be discouraged in favour of
more secure alternatives like Digest. To perform Basic authentication
the client base64 encodes the username and plaintext password
separated by a colon. This encoded text is prefixed with the word
&quot;Basic&quot; and a space.</p>
<p>The following options exists for this scheme:</p>
<dl class="doctools_options">
<dt><b class="option">-username</b> name</dt>
<dd><p>The username required to authenticate with the configured proxy.</p></dd>
<dt><b class="option">-password</b> password</dt>
<dd><p>The password required for the username specified.</p></dd>
<dt><b class="option">-realm</b> realm</dt>
<dd><p>This option is not used.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">EXAMPLES</a></h2>
<pre class="doctools_example">
package require autoproxy
autoproxy::init
autoproxy::configure -basic -username ME -password SEKRET
set tok [http::geturl http://wiki.tcl.tk/]
http::data $tok
</pre>
<pre class="doctools_example">
package require http
package require tls
package require autoproxy
autoproxy::init
http::register https 443 autoproxy::tls_socket
set tok [http::geturl https://www.example.com/]
</pre>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Berners-Lee, T., Fielding R. and Frystyk, H.
      &quot;Hypertext Transfer Protocol -- HTTP/1.0&quot;,
      RFC 1945, May 1996,
      (<a href="http://www.rfc-editor.org/rfc/rfc1945.txt">http://www.rfc-editor.org/rfc/rfc1945.txt</a>)</p></li>
<li><p>Franks, J. et al.
      &quot;HTTP Authentication: Basic and Digest Access Authentication&quot;,
      RFC 2617, June 1999
      (<a href="http://www.rfc-editor.org/rfc/rfc2617.txt">http://www.rfc-editor.org/rfc/rfc2617.txt</a>)</p></li>
</ol>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">BUGS</a></h2>
<p>At this time only Basic authentication (1) (2) is supported. It is
planned to add support for Digest (2) and NTLM in the future.</p>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section10" class="doctools_section"><h2><a name="section10">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>http :: autoproxy</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>http(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key394">authentication</a>, <a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key830">proxy</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ident/ident.html.



























































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173

<div class='fossil-doc' data-title='ident - Identification protocol client'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ident(n) 0.42 tcllib &quot;Identification protocol client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ident - Ident protocol client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">ident <span class="opt">?0.42?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ident::query</b> <i class="arg">socket</i> <span class="opt">?<i class="arg">callback</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">ident</b> package provides a client implementation of the ident
protocol as defined in
RFC 1413 (<a href="http://www.rfc-editor.org/rfc/rfc1413.txt">http://www.rfc-editor.org/rfc/rfc1413.txt</a>).</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ident::query</b> <i class="arg">socket</i> <span class="opt">?<i class="arg">callback</i>?</span></a></dt>
<dd><p>This command queries the ident daemon on the remote side of the given
socket, and returns the result of the query as a dictionary.
Interpreting the dictionary as list the first key will always be
<b class="const">resp-type</b>, and can have one of the values <b class="const">USERID</b>,
<b class="const">ERROR</b>, and <b class="const">FATAL</b>.  These <i class="term">response types</i> have
the following meanings:</p>
<dl class="doctools_definitions">
<dt>USERID</dt>
<dd><p>This indicates a successful response. Two more keys and associated
values are returned, <b class="const">opsys</b>, and <b class="const">user-id</b>.</p></dd>
<dt>ERROR</dt>
<dd><p>This means the ident server has returned an error.  A second key named
<b class="const">error</b> is present whose value contains the <b class="const">error-type</b>
field from the server response.</p></dd>
<dt>FATAL</dt>
<dd><p>Fatal errors happen when no ident server is listening on the remote
side, or when the ident server gives a response that does not conform
to the RFC. A detailed error message is returned under the
<b class="const">error</b> key.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ident</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key433">ident</a>, <a href="../../../../index.html#key434">identification</a>, <a href="../../../../index.html#key432">rfc 1413</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Reinhard Max &lt;max@tclers.tk&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/imap4/imap4.html.



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<div class='fossil-doc' data-title='imap4 - imap client'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">imap4(n) 0.5.3 tcllib &quot;imap client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>imap4 - imap client-side tcl implementation of imap protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">imap4 <span class="opt">?0.5.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::imap4::open</b> <i class="arg">hostname</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::imap4::starttls</b> <i class="arg">chan</i></a></li>
<li><a href="#3"><b class="cmd">::imap4::login</b> <i class="arg">chan</i> <i class="arg">user</i> <i class="arg">pass</i></a></li>
<li><a href="#4"><b class="cmd">::imap4::folders</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">-inline</i>?</span> <span class="opt">?<i class="arg">mboxref</i>?</span> <span class="opt">?<i class="arg">mboxname</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::imap4::select</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">mailbox</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::imap4::examine</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">mailbox</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::imap4::fetch</b> <i class="arg">chan</i> <i class="arg">range</i> <span class="opt">?<i class="arg">-inline</i>?</span> <span class="opt">?<i class="arg">attr ...</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::imap4::noop</b> <i class="arg">chan</i></a></li>
<li><a href="#9"><b class="cmd">::imap4::check</b> <i class="arg">chan</i></a></li>
<li><a href="#10"><b class="cmd">::imap4::folderinfo</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">info</i>?</span></a></li>
<li><a href="#11"><b class="cmd">::imap4::msginfo</b> <i class="arg">chan</i> <i class="arg">msgid</i> <span class="opt">?<i class="arg">info</i>?</span> <span class="opt">?<i class="arg">defval</i>?</span></a></li>
<li><a href="#12"><b class="cmd">::imap4::mboxinfo</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">info</i>?</span></a></li>
<li><a href="#13"><b class="cmd">::imap4::isableto</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">capability</i>?</span></a></li>
<li><a href="#14"><b class="cmd">::imap4::create</b> <i class="arg">chan</i> <i class="arg">mailbox</i></a></li>
<li><a href="#15"><b class="cmd">::imap4::delete</b> <i class="arg">chan</i> <i class="arg">mailbox</i></a></li>
<li><a href="#16"><b class="cmd">::imap4::rename</b> <i class="arg">chan</i> <i class="arg">oldname</i> <i class="arg">newname</i></a></li>
<li><a href="#17"><b class="cmd">::imap4::subscribe</b> <i class="arg">chan</i> <i class="arg">mailbox</i></a></li>
<li><a href="#18"><b class="cmd">::imap4::unsubscribe</b> <i class="arg">chan</i> <i class="arg">mailbox</i></a></li>
<li><a href="#19"><b class="cmd">::imap4::search</b> <i class="arg">chan</i> <i class="arg">expr</i> <span class="opt">?<i class="arg">...</i>?</span></a></li>
<li><a href="#20"><b class="cmd">::imap4::close</b> <i class="arg">chan</i></a></li>
<li><a href="#21"><b class="cmd">::imap4::cleanup</b> <i class="arg">chan</i></a></li>
<li><a href="#22"><b class="cmd">::imap4::debugmode</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">errormsg</i>?</span></a></li>
<li><a href="#23"><b class="cmd">::imap4::store</b> <i class="arg">chan</i> <i class="arg">range</i> <i class="arg">data</i> <i class="arg">flaglist</i></a></li>
<li><a href="#24"><b class="cmd">::imap4::expunge</b> <i class="arg">chan</i></a></li>
<li><a href="#25"><b class="cmd">::imap4::copy</b> <i class="arg">chan</i> <i class="arg">msgid</i> <i class="arg">mailbox</i></a></li>
<li><a href="#26"><b class="cmd">::imap4::logout</b> <i class="arg">chan</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">imap4</b> library package provides the client side of the
<em>Internet Message Access Protocol</em> (IMAP) using standard
sockets or secure connection via TLS/SSL.
The package is fully implemented in Tcl.</p>
<p>This document describes the procedures and explains their usage.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>This package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::imap4::open</b> <i class="arg">hostname</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Open a new IMAP connection and initalize the handler,
the imap communication channel (handler) is returned.</p>
<p><i class="arg">hostname</i> - mail server</p>
<p><i class="arg">port</i> - connection port, defaults to 143</p>
<p>The namespace variable <b class="option">::imap4::use_ssl</b>
can be used to establish to a secure connection
via TSL/SSL if set to true. In this case default connection port
defaults to 993.</p>
<p><em>Note:</em>
For connecting via SSL the Tcl module <em>tls</em> must be already
loaded otherwise an error is raised.</p>
<pre class="doctools_example">
    package require tls              ; # must be loaded for TLS/SSL
    set ::imap4::use_ssl 1           ; # request a secure connection
    set chan [::imap4::open $server] ; # default port is now 993 </pre>
</dd>
<dt><a name="2"><b class="cmd">::imap4::starttls</b> <i class="arg">chan</i></a></dt>
<dd><p>Use this when tasked with connecting to an unsecure port which must be
changed to a secure port prior to user login.  This feature is known
as <i class="term">STARTTLS</i>.</p></dd>
<dt><a name="3"><b class="cmd">::imap4::login</b> <i class="arg">chan</i> <i class="arg">user</i> <i class="arg">pass</i></a></dt>
<dd><p>Login using the IMAP LOGIN command, 0 is returned on successful login.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">user</i> - username</p>
<p><i class="arg">pass</i> - password</p></dd>
<dt><a name="4"><b class="cmd">::imap4::folders</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">-inline</i>?</span> <span class="opt">?<i class="arg">mboxref</i>?</span> <span class="opt">?<i class="arg">mboxname</i>?</span></a></dt>
<dd><p>Get list of matching folders, 0 is returned on success.</p>
<p>Wildcards '*' as '%' are allowed for <i class="arg">mboxref</i> and <i class="arg">mboxname</i>,
command <b class="cmd">::imap4::folderinfo</b> can be used to retrieve folder information.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">mboxref</i> - mailbox reference, defaults to &quot;&quot;</p>
<p><i class="arg">mboxname</i> - mailbox name, defaults to &quot;*&quot;</p>
<p>If <b class="option">-inline</b> is specified a compact folderlist is
returned instead of the result code. All flags are converted to
lowercase and leading special characters are removed.</p>
<pre class="doctools_example">{{Arc08 noselect} {Arc08/Private {noinferiors unmarked}} {INBOX noinferiors}}</pre>
</dd>
<dt><a name="5"><b class="cmd">::imap4::select</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">mailbox</i>?</span></a></dt>
<dd><p>Select a mailbox, 0 is returned on success.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">mailbox</i> - Path of the mailbox,  defaults to <em>INBOX</em></p>
<p>Prior to examine/select an open mailbox must be closed - see: <b class="cmd">::imap4::close</b>.</p></dd>
<dt><a name="6"><b class="cmd">::imap4::examine</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">mailbox</i>?</span></a></dt>
<dd><p>&quot;Examines&quot; a mailbox, read-only equivalent of <b class="cmd">::imap4::select</b>.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">mailbox</i> - mailbox name or path to mailbox,
defaults to <em>INBOX</em></p>
<p>Prior to examine/select an open mailbox must be closed - see: <b class="cmd">::imap4::close</b>.</p></dd>
<dt><a name="7"><b class="cmd">::imap4::fetch</b> <i class="arg">chan</i> <i class="arg">range</i> <span class="opt">?<i class="arg">-inline</i>?</span> <span class="opt">?<i class="arg">attr ...</i>?</span></a></dt>
<dd><p>Fetch attributes from messages.</p>
<p>The attributes are fetched and stored in the internal state
which can be retrieved with command <b class="cmd">::imap4::msginfo</b>, 0 is returned
on success.
If <b class="option">-inline</b> is specified, alle records are returned as list
in order as defined in the <i class="arg">attr</i> argument.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">range</i> - message index in format <em>FROM</em>:<em>TO</em></p>
<p><i class="arg">attr</i> - imap attributes to fetch</p>
<p><em>Note:</em>
If <em>FROM</em> is omitted, the 1st message is assumed,
if <em>TO</em> is ommitted the last message is assumed.
All message index ranges are 1-based.</p></dd>
<dt><a name="8"><b class="cmd">::imap4::noop</b> <i class="arg">chan</i></a></dt>
<dd><p>Send NOOP command to server. May get information as untagged data.</p>
<p><i class="arg">chan</i> - imap channel</p></dd>
<dt><a name="9"><b class="cmd">::imap4::check</b> <i class="arg">chan</i></a></dt>
<dd><p>Send CHECK command to server. Flush to disk.</p>
<p><i class="arg">chan</i> - imap channel</p></dd>
<dt><a name="10"><b class="cmd">::imap4::folderinfo</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">info</i>?</span></a></dt>
<dd><p>Get information on the recently selected folderlist.
If the <i class="arg">info</i> argument is omitted or a null string, the full list
of information available for the mailbox is returned.</p>
<p>If the required information name is suffixed with a ? character,
the command returns true if the information is available, or
false if it is not.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">info</i> - folderlist options to retrieve</p>
<p>Currently supported options:
<em>delim</em> - hierarchy delimiter only,
<em>match</em> - ref and mbox search patterns (see <b class="cmd">::imap4::folders</b>),
<em>names</em> - list of folder names only,
<em>flags</em> - list of folder names with flags in format
<em>{ {name {flags}} ... }</em> (see also compact format in function
<b class="cmd">::imap4::folders</b>).</p>
<pre class="doctools_example">
{{Arc08 {{\NoSelect}}} {Arc08/Private {{\NoInferiors} {\UnMarked}}} {INBOX {\NoInferiors}}}
</pre>
</dd>
<dt><a name="11"><b class="cmd">::imap4::msginfo</b> <i class="arg">chan</i> <i class="arg">msgid</i> <span class="opt">?<i class="arg">info</i>?</span> <span class="opt">?<i class="arg">defval</i>?</span></a></dt>
<dd><p>Get information (from previously collected using fetch) from a given
<em>msgid</em>. If the 'info' argument is omitted or a null string,
the list of available information options for the given message is
returned.</p>
<p>If the required information name is suffixed with a ? character,
the command returns true if the information is available, or
false if it is not.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">msgid</i> - message number</p>
<p><i class="arg">info</i> - imap keyword to retrieve</p>
<p><i class="arg">defval</i> - default value, returned if info is empty</p>
<p><em>Note:</em>
All message index ranges are 1-based.</p></dd>
<dt><a name="12"><b class="cmd">::imap4::mboxinfo</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">info</i>?</span></a></dt>
<dd><p>Get information on the currently selected mailbox.
If the <i class="arg">info</i> argument is omitted or a null string, the list
of available information options for the mailbox is returned.</p>
<p>If the required information name is suffixed with a ? character,
the command returns true if the information is available, or
false if it is not.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">opt</i> - mailbox option to retrieve</p>
<p>Currently supported options:
<em>EXISTS</em> (noof msgs),
<em>RECENT</em> (noof 'recent' flagged msgs),
<em>FLAGS</em></p>
<p>In conjunction with OK:
<em>PERMFLAGS</em>, <em>UIDNEXT</em>, <em>UIDVAL</em>, <em>UNSEEN</em></p>
<p>Div. states:
<em>CURRENT</em>, <em>FOUND</em>, <em>PERM</em>.</p>
<pre class="doctools_example">
    ::imap4::select $chan INBOX
    puts &quot;[::imap4::mboxinfo $chan exists] mails in INBOX&quot;</pre>
</dd>
<dt><a name="13"><b class="cmd">::imap4::isableto</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">capability</i>?</span></a></dt>
<dd><p>Test for capability.
It returns 1 if requested capability is supported, 0 otherwise.
If <i class="arg">capability</i> is omitted all capability imap
codes are retured as list.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">info</i> - imap keyword to retrieve</p>
<p><em>Note:</em>
Use the capability command to ask the server if not
already done by the user.</p></dd>
<dt><a name="14"><b class="cmd">::imap4::create</b> <i class="arg">chan</i> <i class="arg">mailbox</i></a></dt>
<dd><p>Create a new mailbox.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">mailbox</i> - mailbox name</p></dd>
<dt><a name="15"><b class="cmd">::imap4::delete</b> <i class="arg">chan</i> <i class="arg">mailbox</i></a></dt>
<dd><p>Delete a new mailbox.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">mailbox</i> - mailbox name</p></dd>
<dt><a name="16"><b class="cmd">::imap4::rename</b> <i class="arg">chan</i> <i class="arg">oldname</i> <i class="arg">newname</i></a></dt>
<dd><p>Rename a new mailbox.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">mailbox</i> - old mailbox name</p>
<p><i class="arg">mailbox</i> - new mailbox name</p></dd>
<dt><a name="17"><b class="cmd">::imap4::subscribe</b> <i class="arg">chan</i> <i class="arg">mailbox</i></a></dt>
<dd><p>Subscribe a new mailbox.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">mailbox</i> - mailbox name</p></dd>
<dt><a name="18"><b class="cmd">::imap4::unsubscribe</b> <i class="arg">chan</i> <i class="arg">mailbox</i></a></dt>
<dd><p>Unsubscribe a new mailbox.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">mailbox</i> - mailbox name</p></dd>
<dt><a name="19"><b class="cmd">::imap4::search</b> <i class="arg">chan</i> <i class="arg">expr</i> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>Search for mails matching search criterions, 0 is returned on success.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">expr</i> - imap search expression</p>
<p><em>Notes:</em>
Currently the following search expressions are handled:</p>
<p><em>Mail header flags:</em>
all mail header entries (ending with a colon &quot;:&quot;), like &quot;From:&quot;, &quot;Bcc:&quot;, ...</p>
<p><em>Imap message search flags:</em>
ANSWERED, DELETED, DRAFT, FLAGGED, RECENT,
SEEN, NEW, OLD, UNANSWERED, UNDELETED,
UNDRAFT, UNFLAGGED, UNSEEN, ALL</p>
<p><em>Imap header search flags:</em>
BODY, CC, FROM, SUBJECT, TEXT, KEYWORD, BCC</p>
<p><em>Imap conditional search flags:</em>
SMALLER, LARGER, ON, SENTBEFORE, SENTON, SENTSINCE, SINCE,
BEFORE (not implemented),
UID (not implemented)</p>
<p><em>Logical search conditions:</em>
OR, NOT</p>
<pre class="doctools_example">::imap4::search $chan larger 4000 seen
puts &quot;Found messages: [::imap4::mboxinfo $chan found]&quot;
Found messages: 1 3 6 7 8 9 13 14 15 19 20</pre>
</dd>
<dt><a name="20"><b class="cmd">::imap4::close</b> <i class="arg">chan</i></a></dt>
<dd><p>Close the mailbox. Permanently removes \Deleted messages and
return to the AUTH state.</p>
<p><i class="arg">chan</i> - imap channel</p></dd>
<dt><a name="21"><b class="cmd">::imap4::cleanup</b> <i class="arg">chan</i></a></dt>
<dd><p>Destroy an IMAP connection and free the used space.
Close the mailbox. Permanently removes \Deleted messages
and return to the AUTH state.</p>
<p><i class="arg">chan</i> - imap channel</p></dd>
<dt><a name="22"><b class="cmd">::imap4::debugmode</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">errormsg</i>?</span></a></dt>
<dd><p>Switch client into command line debug mode.</p>
<p>This is a developers mode only that pass the control to the
programmer. Every line entered is sent verbatim to the
server (after the addition of the request identifier).
The ::imap4::debug variable is automatically set to '1' on enter.</p>
<p>It's possible to execute Tcl commands starting the line
with a slash.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">errormsg</i> - optional error message to display</p></dd>
<dt><a name="23"><b class="cmd">::imap4::store</b> <i class="arg">chan</i> <i class="arg">range</i> <i class="arg">data</i> <i class="arg">flaglist</i></a></dt>
<dd><p>Alters data associated with a message in the selected
mailbox.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">range</i> - message index in format <em>FROM</em>:<em>TO</em></p>
<p><i class="arg">flaglist</i> - Flags the <i class="arg">data</i> operates on.</p>
<p><i class="arg">data</i> - The currently defined <i class="arg">data</i> items that can be
stored are shown below. <em>Note</em> that all of these data types may
also be suffixed with &quot;.SILENT&quot; to suppress the untagged FETCH
response.</p>
<dl class="doctools_definitions">
<dt>FLAGS</dt>
<dd><p>Replace the flags for the message (other than \Recent) with the
<i class="arg">flaglist</i>.</p></dd>
<dt>+FLAGS</dt>
<dd><p>Add the flags in <i class="arg">flaglist</i> to the existing flags for the message.</p></dd>
<dt>-FLAGS</dt>
<dd><p>Remove the flags in <i class="arg">flaglist</i> to the existing flags for the
message.</p></dd>
</dl>
<p>For example:</p>
<pre class="doctools_example">
	::imap4::store $chan $start_msgid:$end_msgid +FLAGS &quot;Deleted&quot;
</pre>
</dd>
<dt><a name="24"><b class="cmd">::imap4::expunge</b> <i class="arg">chan</i></a></dt>
<dd><p>Permanently removes all messages that have the \Deleted flag
set from the currently selected mailbox, without the need to close the
connection.</p>
<p><i class="arg">chan</i> - imap channel</p></dd>
<dt><a name="25"><b class="cmd">::imap4::copy</b> <i class="arg">chan</i> <i class="arg">msgid</i> <i class="arg">mailbox</i></a></dt>
<dd><p>Copies the specified message (identified by its message number)
to the named mailbox, i.e. imap folder.</p>
<p><i class="arg">chan</i> - imap channel</p>
<p><i class="arg">msgid</i> - message number</p>
<p><i class="arg">mailbox</i> - mailbox name</p></dd>
<dt><a name="26"><b class="cmd">::imap4::logout</b> <i class="arg">chan</i></a></dt>
<dd><p>Informs the server that the client is done with the connection
and closes the network connection. Permanently removes \Deleted
messages.</p>
<p>A new connection will need to be established to login once
more.</p>
<p><i class="arg">chan</i> - imap channel</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<pre class="doctools_example">
    set user myusername
    set pass xtremescrt
    set server imap.test.tld
    set FOLDER INBOX
    # Connect to server
    set imap [::imap4::open $server]
    ::imap4::login $imap $user $pass
    ::imap4::select $imap $FOLDER
    # Output all the information about that mailbox
    foreach info [::imap4::mboxinfo $imap] {
        puts &quot;$info -&gt; [::imap4::mboxinfo $imap $info]&quot;
    }
    # fetch 3 records inline
    set fields {from: to: subject: size}
    foreach rec [::imap4::fetch $imap :3 -inline {*}$fields] {
        puts -nonewline &quot;#[incr idx])&quot;
        for {set j 0} {$j&lt;[llength $fields]} {incr j} {
            puts &quot;\t[lindex $fields $j] [lindex $rec $j]&quot;
        }
    }
    # Show all the information available about the message ID 1
    puts &quot;Available info about message 1: [::imap4::msginfo $imap 1]&quot;
    # Use the capability stuff
    puts &quot;Capabilities: [::imap4::isableto $imap]&quot;
    puts &quot;Is able to imap4rev1? [::imap4::isableto $imap imap4rev1]&quot;
    # Cleanup
    ::imap4::cleanup $imap
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<p>Mark R. Crispin, &quot;INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1&quot;,
RFC 3501, March 2003, <a href="http://www.rfc-editor.org/rfc/rfc3501.txt">http://www.rfc-editor.org/rfc/rfc3501.txt</a></p>
<p>OpenSSL, <a href="http://www.openssl.org/">http://www.openssl.org/</a></p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>imap4</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.
Only a small part of rfc3501 implemented.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftp/ftp.html">ftp</a>, <a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key805">imap</a>, <a href="../mime/mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key335">email</a>, <a href="../../../../index.html#key805">imap</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key330">mail</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key804">rfc3501</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
</div>

Added embedded/www/tcllib/files/modules/inifile/ini.html.

























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

<div class='fossil-doc' data-title='inifile - Parsing of Windows INI files'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">inifile(n) 0.3 tcllib &quot;Parsing of Windows INI files&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>inifile - Parsing of Windows INI files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">inifile <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ini::open</b> <i class="arg">file</i> <span class="opt">?<b class="option">-encoding</b> <i class="arg">encoding</i>?</span> <span class="opt">?<i class="arg">access</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::ini::close</b> <i class="arg">ini</i></a></li>
<li><a href="#3"><b class="cmd">::ini::commit</b> <i class="arg">ini</i></a></li>
<li><a href="#4"><b class="cmd">::ini::revert</b> <i class="arg">ini</i></a></li>
<li><a href="#5"><b class="cmd">::ini::filename</b> <i class="arg">ini</i></a></li>
<li><a href="#6"><b class="cmd">::ini::sections</b> <i class="arg">ini</i></a></li>
<li><a href="#7"><b class="cmd">::ini::keys</b> <i class="arg">ini</i> <i class="arg">section</i></a></li>
<li><a href="#8"><b class="cmd">::ini::get</b> <i class="arg">ini</i> <i class="arg">section</i></a></li>
<li><a href="#9"><b class="cmd">::ini::exists</b> <i class="arg">ini</i> <i class="arg">section</i> <span class="opt">?<i class="arg">key</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::ini::value</b> <i class="arg">ini</i> <i class="arg">section</i> <i class="arg">key</i> <span class="opt">?<i class="arg">default</i>?</span></a></li>
<li><a href="#11"><b class="cmd">::ini::set</b> <i class="arg">ini</i> <i class="arg">section</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#12"><b class="cmd">::ini::delete</b> <i class="arg">ini</i> <i class="arg">section</i> <span class="opt">?<i class="arg">key</i>?</span></a></li>
<li><a href="#13"><b class="cmd">::ini::comment</b> <i class="arg">ini</i> <i class="arg">section</i> <span class="opt">?<i class="arg">key</i>?</span> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#14"><b class="cmd">::ini::commentchar</b> <span class="opt">?char?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides an interface for easy manipulation of Windows INI files.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ini::open</b> <i class="arg">file</i> <span class="opt">?<b class="option">-encoding</b> <i class="arg">encoding</i>?</span> <span class="opt">?<i class="arg">access</i>?</span></a></dt>
<dd><p>Opens an INI file and returns a handle that is used by other commands.
<i class="arg">access</i> is the same as the first form (non POSIX) of the <b class="const">open</b>
command, with the exception that mode <b class="const">a</b> is not supported. The
default mode is <b class="const">r+</b>.</p>
<p>The default <i class="arg">encoding</i> is the system encoding.</p></dd>
<dt><a name="2"><b class="cmd">::ini::close</b> <i class="arg">ini</i></a></dt>
<dd><p>Close the specified handle. If any changes were made and not written by
<b class="const">commit</b> they are lost.</p></dd>
<dt><a name="3"><b class="cmd">::ini::commit</b> <i class="arg">ini</i></a></dt>
<dd><p>Writes the file and all changes to disk. The sections are written in
arbitrary order. The keys in a section are written in alphabetical
order. If the ini was opened in read only mode an error will be thrown.</p></dd>
<dt><a name="4"><b class="cmd">::ini::revert</b> <i class="arg">ini</i></a></dt>
<dd><p>Rolls all changes made to the inifile object back to the last
committed state.</p></dd>
<dt><a name="5"><b class="cmd">::ini::filename</b> <i class="arg">ini</i></a></dt>
<dd><p>Returns the name of the file the <i class="arg">ini</i> object is associated with.</p></dd>
<dt><a name="6"><b class="cmd">::ini::sections</b> <i class="arg">ini</i></a></dt>
<dd><p>Returns a list of all the names of the existing sections in the file handle
specified.</p></dd>
<dt><a name="7"><b class="cmd">::ini::keys</b> <i class="arg">ini</i> <i class="arg">section</i></a></dt>
<dd><p>Returns a list of all they key names in the section and file specified.</p></dd>
<dt><a name="8"><b class="cmd">::ini::get</b> <i class="arg">ini</i> <i class="arg">section</i></a></dt>
<dd><p>Returns a list of key value pairs that exist in the section and file specified.</p></dd>
<dt><a name="9"><b class="cmd">::ini::exists</b> <i class="arg">ini</i> <i class="arg">section</i> <span class="opt">?<i class="arg">key</i>?</span></a></dt>
<dd><p>Returns a boolean value indicating the existance of the specified section as a
whole or the specified key within that section.</p></dd>
<dt><a name="10"><b class="cmd">::ini::value</b> <i class="arg">ini</i> <i class="arg">section</i> <i class="arg">key</i> <span class="opt">?<i class="arg">default</i>?</span></a></dt>
<dd><p>Returns the value of the named key and section. If specified,
the default value will be returned if the key does not exist. If the key does
not exist and no default is specified an error will be thrown.</p></dd>
<dt><a name="11"><b class="cmd">::ini::set</b> <i class="arg">ini</i> <i class="arg">section</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Sets the value of the key in the specified section. If the section does not
exist then a new one is created.</p></dd>
<dt><a name="12"><b class="cmd">::ini::delete</b> <i class="arg">ini</i> <i class="arg">section</i> <span class="opt">?<i class="arg">key</i>?</span></a></dt>
<dd><p>Removes the key or the entire section and all its keys. A section is not
automatically deleted when it has no remaining keys.</p></dd>
<dt><a name="13"><b class="cmd">::ini::comment</b> <i class="arg">ini</i> <i class="arg">section</i> <span class="opt">?<i class="arg">key</i>?</span> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>Reads and modifies comments for sections and keys. To write a section comment use an
empty string for the <i class="arg">key</i>. To remove all comments use an empty string for <i class="arg">text</i>.
<i class="arg">text</i> may consist of a list of lines or one single line. Any embedded newlines in
<i class="arg">text</i> are properly handled.  Comments may be written to nonexistant
sections or keys and will not return an error. Reading a comment from a nonexistant
section or key will return an empty string.</p></dd>
<dt><a name="14"><b class="cmd">::ini::commentchar</b> <span class="opt">?char?</span></a></dt>
<dd><p>Reads and sets the comment character. Lines that begin with this character are treated as
comments. When comments are written out each line is preceded by this character. The default
is <b class="const">;</b>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>inifile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/interp/deleg_method.html.

















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

<div class='fossil-doc' data-title='deleg_method - Interpreter utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">deleg_method(n) 0.2 tcllib &quot;Interpreter utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>deleg_method - Creation of comm delegates (snit methods)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">snit <span class="opt">?1.1?</span></b></li>
<li>package require <b class="pkgname">interp::delegate::method <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::interp::delegate::method</b> <span class="opt">?<b class="option">-async</b>?</span> <i class="arg">name</i> <i class="arg">arguments</i> <i class="arg">comm</i> <i class="arg">id</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single command for use within <b class="package"><a href="../snit/snit.html">snit</a></b>
type definition (i.e. actually a <b class="cmd">snit::macro</b>) for the convenient
creation of methods which delegate the actual work to a remote
location via a &quot;channel&quot; created by the package <b class="package"><a href="../comm/comm.html">comm</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::interp::delegate::method</b> <span class="opt">?<b class="option">-async</b>?</span> <i class="arg">name</i> <i class="arg">arguments</i> <i class="arg">comm</i> <i class="arg">id</i></a></dt>
<dd><p>This commands creates a method which is named by <i class="arg">name</i>. All
invokations of this method will delegate the actual work to the remote
location identified by the comm channel <i class="arg">comm</i> and the endpoint
<i class="arg">id</i>.</p>
<p>The name of the remote method invoked by the delegator is identical to
the name of the method itself.</p>
<p>Normally the generated method marshalls the <i class="arg">arguments</i>, and
returns the result from the remote method as its own result. If
however the option <b class="option">-async</b> was specified then the generated
method will not wait for a result and return immediately.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>interp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key40">comm</a>, <a href="../../../../index.html#key39">delegation</a>, <a href="../../../../index.html#key38">interpreter</a>, <a href="../../../../index.html#key372">method</a>, <a href="../../../../index.html#key373">snit</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/interp/deleg_proc.html.















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

<div class='fossil-doc' data-title='deleg_proc - Interpreter utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">deleg_proc(n) 0.2 tcllib &quot;Interpreter utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>deleg_proc - Creation of comm delegates (procedures)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">interp::delegate::proc <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::interp::delegate::proc</b> <span class="opt">?<b class="option">-async</b>?</span> <i class="arg">name</i> <i class="arg">arguments</i> <i class="arg">comm</i> <i class="arg">id</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single command for the convenient creation of
procedures which delegate the actual work to a remote location via a
&quot;channel&quot; created by the package <b class="package"><a href="../comm/comm.html">comm</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::interp::delegate::proc</b> <span class="opt">?<b class="option">-async</b>?</span> <i class="arg">name</i> <i class="arg">arguments</i> <i class="arg">comm</i> <i class="arg">id</i></a></dt>
<dd><p>This commands creates a procedure which is named by <i class="arg">name</i> and
returns its fully-qualified name. All invokations of this procedure
will delegate the actual work to the remote location identified by the
comm channel <i class="arg">comm</i> and the endpoint <i class="arg">id</i>.</p>
<p>The name of the remote procedure invoked by the delegator is
[namespace tail <i class="arg">name</i>]. I.e., namespace information is
stripped from the call.</p>
<p>Normally the generated procedure marshalls the <i class="arg">arguments</i>, and
returns the result from the remote procedure as its own result. If
however the option <b class="option">-async</b> was specified then the generated
procedure will not wait for a result and return immediately.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>interp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key40">comm</a>, <a href="../../../../index.html#key39">delegation</a>, <a href="../../../../index.html#key38">interpreter</a>, <a href="../../../../index.html#key41">procedure</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/interp/tcllib_interp.html.













































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182

<div class='fossil-doc' data-title='interp - Interpreter utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">interp(n) 0.1.2 tcllib &quot;Interpreter utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>interp - Interp creation and aliasing</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">interp <span class="opt">?0.1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::interp::createEmpty</b> <span class="opt">?<i class="arg">path</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::interp::snitLink</b> <i class="arg">path</i> <i class="arg">methodlist</i></a></li>
<li><a href="#3"><b class="cmd">::interp::snitDictLink</b> <i class="arg">path</i> <i class="arg">methoddict</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a number of commands for the convenient creation
of Tcl interpreters for highly restricted execution.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::interp::createEmpty</b> <span class="opt">?<i class="arg">path</i>?</span></a></dt>
<dd><p>This commands creates an empty Tcl interpreter and returns it
name. Empty means that the new interpreter has neither namespaces, nor
any commands. It is useful only for the creation of aliases.</p>
<p>If a <i class="arg">path</i> is specified then it is taken as the name of the new
interpreter.</p></dd>
<dt><a name="2"><b class="cmd">::interp::snitLink</b> <i class="arg">path</i> <i class="arg">methodlist</i></a></dt>
<dd><p>This command assumes that it was called from within a method of a snit
object, and that the command <b class="cmd">mymethod</b> is available.</p>
<p>It extends the interpreter specified by <i class="arg">path</i> with aliases for
all methods found in the <i class="arg">methodlist</i>, with the alias directing
execution to the same-named method of the snit object invoking this
command.
Each element of <i class="arg">methodlist</i> is actually interpreted as a command
prefix, with the first word of each prefix the name of the method to
link to.</p>
<p>The result of the command is the empty string.</p></dd>
<dt><a name="3"><b class="cmd">::interp::snitDictLink</b> <i class="arg">path</i> <i class="arg">methoddict</i></a></dt>
<dd><p>This command behaves like <b class="cmd">::interp::snitLink</b>, except that it
takes a dictionary mapping from commands to methods as its input, and
not a list of methods.
Like for <b class="cmd">::interp::snitLink</b> the method references are actually
command prefixes.
This command allows the creation of more complex command-method
mappings than <b class="cmd">::interp::snitLink</b>.</p>
<p>The result of the command is the empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>interp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key777">alias</a>, <a href="../../../../index.html#key778">empty interpreter</a>, <a href="../../../../index.html#key38">interpreter</a>, <a href="../../../../index.html#key372">method</a>, <a href="../../../../index.html#key373">snit</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/irc/irc.html.





























































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318

<div class='fossil-doc' data-title='irc - Low Level Tcl IRC Interface'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">irc(n) 0.6.1 tcllib &quot;Low Level Tcl IRC Interface&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>irc - Create IRC connection and interface.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Per-connection Commands</a></li>
<li class="doctools_section"><a href="#section3">Callback Commands</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl</b></li>
<li>package require <b class="pkgname">irc <span class="opt">?0.6.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::irc::config</b> <span class="opt">?key?</span> <span class="opt">?value?</span></a></li>
<li><a href="#2"><b class="cmd">::irc::connection</b></a></li>
<li><a href="#3"><b class="cmd">::irc::connections</b></a></li>
<li><a href="#4"><i class="arg">net</i> <b class="method">registerevent</b> <i class="arg">event</i> <i class="arg">script</i></a></li>
<li><a href="#5"><i class="arg">net</i> <b class="method">getevent</b> <i class="arg">event</i> <i class="arg">script</i></a></li>
<li><a href="#6"><i class="arg">net</i> <b class="method">eventexists</b> <i class="arg">event</i> <i class="arg">script</i></a></li>
<li><a href="#7"><i class="arg">net</i> <b class="method">connect</b> <i class="arg">hostname</i> <span class="opt">?port?</span></a></li>
<li><a href="#8"><i class="arg">net</i> <b class="method">config</b> <span class="opt">?key?</span> <span class="opt">?value?</span></a></li>
<li><a href="#9"><i class="arg">net</i> <b class="method">log</b> <i class="arg">level</i> <i class="arg">message</i></a></li>
<li><a href="#10"><i class="arg">net</i> <b class="method">logname</b></a></li>
<li><a href="#11"><i class="arg">net</i> <b class="method">connected</b></a></li>
<li><a href="#12"><i class="arg">net</i> <b class="method">sockname</b></a></li>
<li><a href="#13"><i class="arg">net</i> <b class="method">peername</b></a></li>
<li><a href="#14"><i class="arg">net</i> <b class="method">socket</b></a></li>
<li><a href="#15"><i class="arg">net</i> <b class="method">user</b> <i class="arg">username</i> <i class="arg">localhostname</i> <i class="arg">localdomainname</i> <i class="arg">userinfo</i></a></li>
<li><a href="#16"><i class="arg">net</i> <b class="method">nick</b> <i class="arg">nick</i></a></li>
<li><a href="#17"><i class="arg">net</i> <b class="method">ping</b> <i class="arg">target</i></a></li>
<li><a href="#18"><i class="arg">net</i> <b class="method">serverping</b></a></li>
<li><a href="#19"><i class="arg">net</i> <b class="method">join</b> <i class="arg">channel</i> <span class="opt">?<i class="arg">key</i>?</span></a></li>
<li><a href="#20"><i class="arg">net</i> <b class="method">part</b> <i class="arg">channel</i> <span class="opt">?<i class="arg">message</i>?</span></a></li>
<li><a href="#21"><i class="arg">net</i> <b class="method">quit</b> <span class="opt">?<i class="arg">message</i>?</span></a></li>
<li><a href="#22"><i class="arg">net</i> <b class="method">privmsg</b> <i class="arg">target</i> <i class="arg">message</i></a></li>
<li><a href="#23"><i class="arg">net</i> <b class="method">notice</b> <i class="arg">target</i> <i class="arg">message</i></a></li>
<li><a href="#24"><i class="arg">net</i> <b class="method">ctcp</b> <i class="arg">target</i> <i class="arg">message</i></a></li>
<li><a href="#25"><i class="arg">net</i> <b class="method">kick</b> <i class="arg">channel</i> <i class="arg">target</i> <span class="opt">?<i class="arg">message</i>?</span></a></li>
<li><a href="#26"><i class="arg">net</i> <b class="method">mode</b> <i class="arg">target</i> <i class="arg">args</i></a></li>
<li><a href="#27"><i class="arg">net</i> <b class="method">topic</b> <i class="arg">channel</i> <i class="arg">message</i></a></li>
<li><a href="#28"><i class="arg">net</i> <b class="method">invite</b> <i class="arg">channel</i> <i class="arg">target</i></a></li>
<li><a href="#29"><i class="arg">net</i> <b class="method">send</b> <i class="arg">text</i></a></li>
<li><a href="#30"><i class="arg">net</i> <b class="method">destroy</b></a></li>
<li><a href="#31"><b class="cmd">who</b> <span class="opt">?<b class="const">address</b>?</span></a></li>
<li><a href="#32"><b class="cmd">action</b></a></li>
<li><a href="#33"><b class="cmd">target</b></a></li>
<li><a href="#34"><b class="cmd">additional</b></a></li>
<li><a href="#35"><b class="cmd">header</b></a></li>
<li><a href="#36"><b class="cmd">msg</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides low-level commands to deal with the IRC protocol
(Internet Relay Chat) for immediate and interactive multi-cast
communication.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::irc::config</b> <span class="opt">?key?</span> <span class="opt">?value?</span></a></dt>
<dd><p>Sets configuration <span class="opt">?key?</span> to <span class="opt">?value?</span>. The configuration keys
currently defined are the boolean flags <b class="const">logger</b> and <b class="const">debug</b>.
<b class="const">logger</b> makes <b class="package">irc</b> use the logger package for printing
error. <b class="const">debug</b> requires <b class="const">logger</b> and prints extra debug output.
If no <span class="opt">?key?</span> or <span class="opt">?value?</span> is given the current values are returned.</p></dd>
<dt><a name="2"><b class="cmd">::irc::connection</b></a></dt>
<dd><p>The command creates a new object to deal with an IRC connection.
Creating this IRC object does not automatically create the network
connection.  It returns a new irc namespace command which can be used
to interact with the new IRC connection.  NOTE: the old form of the
connection command, which took a hostname and port as arguments, is
deprecated.  Use <b class="cmd">connect</b> instead to specify this information.</p></dd>
<dt><a name="3"><b class="cmd">::irc::connections</b></a></dt>
<dd><p>Returns a list of all the current connections that were created with
<b class="const">connection</b></p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Per-connection Commands</a></h2>
<p>In the following list of available connection methods <i class="arg">net</i>
represents a connection command as returned by
<b class="cmd">::irc::connection</b>.</p>
<dl class="doctools_definitions">
<dt><a name="4"><i class="arg">net</i> <b class="method">registerevent</b> <i class="arg">event</i> <i class="arg">script</i></a></dt>
<dd><p>Registers a callback handler for the specific event.  Events available
are those described in RFC 1459
<a href="http://www.rfc-editor.org/rfc/rfc1459.txt">http://www.rfc-editor.org/rfc/rfc1459.txt</a>.
In addition, there are several other events defined.
<b class="const">defaultcmd</b> adds a command that is called if no other callback
is present.  <b class="const">EOF</b> is called if the connection signals an End of
File condition. The events <b class="const">defaultcmd</b>, <b class="const">defaultnumeric</b>,
<b class="const">defaultevent</b>, and <b class="const">EOF</b> are required.
<i class="arg">script</i> is executed in the connection namespace, which can take
advantage of several commands (see <span class="sectref"><a href="#section3">Callback Commands</a></span>
below) to aid in the parsing of data.</p></dd>
<dt><a name="5"><i class="arg">net</i> <b class="method">getevent</b> <i class="arg">event</i> <i class="arg">script</i></a></dt>
<dd><p>Returns the current handler for the event if one exists. Otherwise an
empty string is returned.</p></dd>
<dt><a name="6"><i class="arg">net</i> <b class="method">eventexists</b> <i class="arg">event</i> <i class="arg">script</i></a></dt>
<dd><p>Returns a boolean value indicating the existence of the event handler.</p></dd>
<dt><a name="7"><i class="arg">net</i> <b class="method">connect</b> <i class="arg">hostname</i> <span class="opt">?port?</span></a></dt>
<dd><p>This causes the socket to be established.  <b class="cmd">::irc::connection</b>
created the namespace and the commands to be used, but did not
actually open the socket. This is done here.  NOTE: the older form of
'connect' did not require the user to specify a hostname and port,
which were specified with 'connection'.  That form is deprecated.</p></dd>
<dt><a name="8"><i class="arg">net</i> <b class="method">config</b> <span class="opt">?key?</span> <span class="opt">?value?</span></a></dt>
<dd><p>The same as <b class="cmd">::irc::config</b> but sets and gets options for the <i class="arg">net</i>
connection only.</p></dd>
<dt><a name="9"><i class="arg">net</i> <b class="method">log</b> <i class="arg">level</i> <i class="arg">message</i></a></dt>
<dd><p>If logger is turned on by <b class="method">config</b> this will write a log <i class="arg">message</i>
at <i class="arg">level</i>.</p></dd>
<dt><a name="10"><i class="arg">net</i> <b class="method">logname</b></a></dt>
<dd><p>Returns the name of the logger instance if logger is turned on.</p></dd>
<dt><a name="11"><i class="arg">net</i> <b class="method">connected</b></a></dt>
<dd><p>Returns a boolean value indicating if this connection is connected to a server.</p></dd>
<dt><a name="12"><i class="arg">net</i> <b class="method">sockname</b></a></dt>
<dd><p>Returns a 3 element list consisting of the ip address, the hostname, and the port
of the local end of the connection, if currently connected.</p></dd>
<dt><a name="13"><i class="arg">net</i> <b class="method">peername</b></a></dt>
<dd><p>Returns a 3 element list consisting of the ip address, the hostname, and the port
of the remote end of the connection, if currently connected.</p></dd>
<dt><a name="14"><i class="arg">net</i> <b class="method">socket</b></a></dt>
<dd><p>Return the Tcl channel for the socket used by the connection.</p></dd>
<dt><a name="15"><i class="arg">net</i> <b class="method">user</b> <i class="arg">username</i> <i class="arg">localhostname</i> <i class="arg">localdomainname</i> <i class="arg">userinfo</i></a></dt>
<dd><p>Sends USER command to server.  <i class="arg">username</i> is the username you want
to appear.  <i class="arg">localhostname</i> is the host portion of your hostname, <i class="arg">localdomainname</i>
is your domain name, and <i class="arg">userinfo</i> is a short description of who you are. The 2nd and 3rd
arguments are normally ignored by the IRC server.</p></dd>
<dt><a name="16"><i class="arg">net</i> <b class="method">nick</b> <i class="arg">nick</i></a></dt>
<dd><p>NICK command.  <i class="arg">nick</i> is the nickname you wish to use for the
particular connection.</p></dd>
<dt><a name="17"><i class="arg">net</i> <b class="method">ping</b> <i class="arg">target</i></a></dt>
<dd><p>Send a CTCP PING to <i class="arg">target</i>.</p></dd>
<dt><a name="18"><i class="arg">net</i> <b class="method">serverping</b></a></dt>
<dd><p>PING the server.</p></dd>
<dt><a name="19"><i class="arg">net</i> <b class="method">join</b> <i class="arg">channel</i> <span class="opt">?<i class="arg">key</i>?</span></a></dt>
<dd><p><i class="arg">channel</i> is the IRC channel to join.  IRC channels typically
begin with a hashmark (&quot;#&quot;) or ampersand (&quot;&amp;&quot;).</p></dd>
<dt><a name="20"><i class="arg">net</i> <b class="method">part</b> <i class="arg">channel</i> <span class="opt">?<i class="arg">message</i>?</span></a></dt>
<dd><p>Makes the client leave <i class="arg">channel</i>. Some networks may support the optional
argument <i class="arg">message</i></p></dd>
<dt><a name="21"><i class="arg">net</i> <b class="method">quit</b> <span class="opt">?<i class="arg">message</i>?</span></a></dt>
<dd><p>Instructs the IRC server to close the current connection. The package
will use a generic default if no <i class="arg">message</i> was specified.</p></dd>
<dt><a name="22"><i class="arg">net</i> <b class="method">privmsg</b> <i class="arg">target</i> <i class="arg">message</i></a></dt>
<dd><p>Sends <i class="arg">message</i> to <i class="arg">target</i>, which can be either a channel, or
another user, in which case their nick is used.</p></dd>
<dt><a name="23"><i class="arg">net</i> <b class="method">notice</b> <i class="arg">target</i> <i class="arg">message</i></a></dt>
<dd><p>Sends a <b class="const">notice</b> with message <i class="arg">message</i> to <i class="arg">target</i>,
which can be either a channel, or another user, in which case their nick is used.</p></dd>
<dt><a name="24"><i class="arg">net</i> <b class="method">ctcp</b> <i class="arg">target</i> <i class="arg">message</i></a></dt>
<dd><p>Sends a CTCP of type <i class="arg">message</i> to <i class="arg">target</i></p></dd>
<dt><a name="25"><i class="arg">net</i> <b class="method">kick</b> <i class="arg">channel</i> <i class="arg">target</i> <span class="opt">?<i class="arg">message</i>?</span></a></dt>
<dd><p>Kicks the user <i class="arg">target</i> from the channel <i class="arg">channel</i> with a <i class="arg">message</i>.
The latter can be left out.</p></dd>
<dt><a name="26"><i class="arg">net</i> <b class="method">mode</b> <i class="arg">target</i> <i class="arg">args</i></a></dt>
<dd><p>Sets the mode <i class="arg">args</i> on the target <i class="arg">target</i>. <i class="arg">target</i> may be a channel,
a channel user, or yourself.</p></dd>
<dt><a name="27"><i class="arg">net</i> <b class="method">topic</b> <i class="arg">channel</i> <i class="arg">message</i></a></dt>
<dd><p>Sets the topic on <i class="arg">channel</i> to <i class="arg">message</i> specifying an empty string
will remove the topic.</p></dd>
<dt><a name="28"><i class="arg">net</i> <b class="method">invite</b> <i class="arg">channel</i> <i class="arg">target</i></a></dt>
<dd><p>Invites <i class="arg">target</i> to join the channel <i class="arg">channel</i></p></dd>
<dt><a name="29"><i class="arg">net</i> <b class="method">send</b> <i class="arg">text</i></a></dt>
<dd><p>Sends <i class="arg">text</i> to the IRC server.</p></dd>
<dt><a name="30"><i class="arg">net</i> <b class="method">destroy</b></a></dt>
<dd><p>Deletes the connection and its associated namespace and information.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Callback Commands</a></h2>
<p>These commands can be used within callbacks</p>
<dl class="doctools_definitions">
<dt><a name="31"><b class="cmd">who</b> <span class="opt">?<b class="const">address</b>?</span></a></dt>
<dd><p>Returns the nick of the user who performed a command.  The optional
keyword <b class="const">address</b> causes the command to return the user in the
format &quot;username@address&quot;.</p></dd>
<dt><a name="32"><b class="cmd">action</b></a></dt>
<dd><p>Returns the action performed, such as KICK, PRIVMSG, MODE, etc...
Normally not useful, as callbacks are bound to a particular event.</p></dd>
<dt><a name="33"><b class="cmd">target</b></a></dt>
<dd><p>Returns the target of a particular command, such as the channel or
user to whom a PRIVMSG is sent.</p></dd>
<dt><a name="34"><b class="cmd">additional</b></a></dt>
<dd><p>Returns a list of any additional arguments after the target.</p></dd>
<dt><a name="35"><b class="cmd">header</b></a></dt>
<dd><p>Returns the entire event header (everything up to the :) as a proper list.</p></dd>
<dt><a name="36"><b class="cmd">msg</b></a></dt>
<dd><p>Returns the message portion of the command (the part after the :).</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>irc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>rfc 1459</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key693">chat</a>, <a href="../../../../index.html#key744">irc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/irc/picoirc.html.







































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243

<div class='fossil-doc' data-title='picoirc - Simple embeddable IRC interface'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">picoirc(n) 0.5.2 tcllib &quot;Simple embeddable IRC interface&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>picoirc - Small and simple embeddable IRC client.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">CALLBACK</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl</b></li>
<li>package require <b class="pkgname">picoirc <span class="opt">?0.5.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::picoirc::connect</b> <i class="arg">callback</i> <i class="arg">nick</i> <i class="arg">url</i></a></li>
<li><a href="#2"><b class="cmd">::picoirc::post</b> <i class="arg">context</i> <i class="arg">channel</i> <i class="arg">message</i></a></li>
<li><a href="#3"><b class="cmd">::picoirc::splituri</b> <i class="arg">uri</i></a></li>
<li><a href="#4"><b class="cmd">::picoirc::send</b> <i class="arg">context</i> <i class="arg">line</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a general purpose minimal IRC client suitable for
embedding in other applications. All communication with the parent
application is done via an application provided callback procedure.
Each connection has its own state so you can hook up multiple servers
in a single application instance.</p>
<p>To initiate an IRC connection you must call <b class="cmd">picoirc::connect</b>
with a callback procedure, a nick-name to use on IRC and the IRC URL
that describes the connection. This will return a variable name that
is the irc connection context. See <span class="sectref"><a href="#section3">CALLBACK</a></span> for details.</p>
<p>This package is a fairly simple IRC client. If you need something with
more capability investigate the <b class="package"><a href="irc.html">irc</a></b> package.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::picoirc::connect</b> <i class="arg">callback</i> <i class="arg">nick</i> <i class="arg">url</i></a></dt>
<dd><p>Create a new irc connection to the server specified by <i class="arg">url</i> and
login using the <i class="arg">nick</i> as the username. The <i class="arg">callback</i> must be
as specified in <span class="sectref"><a href="#section3">CALLBACK</a></span>. Returns a package-specific variable
that is used when calling other commands in this package.</p></dd>
<dt><a name="2"><b class="cmd">::picoirc::post</b> <i class="arg">context</i> <i class="arg">channel</i> <i class="arg">message</i></a></dt>
<dd><p>This should be called to process user input and send it to the
server. A number of commands are recognised when prefixed with a
forward-slash (/). Such commands are converted to IRC command
sequences and then sent.</p></dd>
<dt><a name="3"><b class="cmd">::picoirc::splituri</b> <i class="arg">uri</i></a></dt>
<dd><p>Splits an IRC scheme uniform resource indicator into its component
parts. Returns a list of server, port and channel. The default port is
6667 and there is no default channel.</p></dd>
<dt><a name="4"><b class="cmd">::picoirc::send</b> <i class="arg">context</i> <i class="arg">line</i></a></dt>
<dd><p>This command is where all raw output to the server is handled. The
default action is to write the <i class="arg">line</i> to the irc socket. However,
before this happens the callback is called with &quot;debug write&quot;. This
permits the application author to inspect the raw IRC data and if
desired to return a break error code to halt further processing. In
this way the application can override the default send via the
callback procedure.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CALLBACK</a></h2>
<p>The callback must look like:</p>
<pre class="doctools_example">
proc Callback {context state args} {
}
</pre>
<p>where context is the irc context variable name (in case you need to pass
it back to a picoirc procedure). state is one of a number of states as
described below.</p>
<dl class="doctools_options">
<dt><b class="option">init</b></dt>
<dd><p>called just before the socket is created</p></dd>
<dt><b class="option">connect</b></dt>
<dd><p>called once we have connected, before we join any channels</p></dd>
<dt><b class="option">close</b></dt>
<dd><p>called when the socket gets closed, before the context is deleted. If
an error occurs before we get connected the only argument will be the
socket error message.</p></dd>
<dt><b class="option">userlist</b> <i class="arg">channel</i> <i class="arg">nicklist</i></dt>
<dd><p>called to notify the application of an updated userlist. This is
generated when the output of the NAMES irc command is seen. The
package collects the entire output which can span a number of output
lines from the server and calls this callback when they have all been
received.</p></dd>
<dt><b class="option">chat</b> <i class="arg">target</i> <i class="arg">nick</i> <i class="arg">message</i> <i class="arg">type</i></dt>
<dd><p>called when a message arrives. <i class="arg">target</i> is the identity that the
message was targetted for. This can be the logged in nick or a channel
name. <i class="arg">nick</i> is the name of the sender of the message.
<i class="arg">message</i> is the message text. <i class="arg">type</i> is set to &quot;ACTION&quot; if the
message was sent as a CTCP ACTION</p></dd>
<dt><b class="option">system</b> <i class="arg">channel</i> <i class="arg">message</i></dt>
<dd><p>called when a system message is received</p></dd>
<dt><b class="option">topic</b> <i class="arg">channel</i> <i class="arg">topic</i></dt>
<dd><p>called when the channel topic string is seen. <i class="arg">topic</i> is the text
of the channel topic.</p></dd>
<dt><b class="option">traffic</b> <i class="arg">action</i> <i class="arg">channel</i> <i class="arg">nick</i> <span class="opt">?<i class="arg">newnick</i>?</span></dt>
<dd><p>called when users join, leave or change names.
<i class="arg">action</i> is either entered, left or nickchange and <i class="arg">nick</i>
is the user doing the action. <i class="arg">newnick</i> is
the new name if <i class="arg">action</i> is nickchange.</p>
<p><em>NOTE</em>: <i class="arg">channel</i> is often empty for these messages as nick
activities are global for the irc server. You will have
to manage the nick for all connected channels yourself.</p></dd>
<dt><b class="option">version</b></dt>
<dd><p>This is called to request a version string to use to
override the internal version. If implemented, you should
return as colon delimited string as</p>
<p>Appname:Appversion:LibraryVersion</p>
<p>For example, the default is</p>
<p>PicoIRC:[package provide picoirc]:Tcl [info patchlevel]</p></dd>
<dt><b class="option">debug</b> <i class="arg">type</i> <i class="arg">raw</i></dt>
<dd><p>called when data is either being read or written to the network
socket. <i class="arg">type</i> is set to <b class="const">read</b> when reading data and
<b class="const">write</b> if the data is to be written. <i class="arg">raw</i> is the
unprocessed IRC protocol data.</p>
<p>In both cases the application can return a break error code to
interrupt further processing of the raw data. If this is a
<b class="const">read</b> operation then the package will not handle this line. If
the operation is <b class="const">write</b> then the package will not send the
data. This callback is intended for debugging protocol issues but
could be used to redirect all input and output if desired.</p></dd>
</dl>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>rfc 1459</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key693">chat</a>, <a href="../../../../index.html#key744">irc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/javascript/javascript.html.



































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209

<div class='fossil-doc' data-title='javascript - HTML and Java Script Generation'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">javascript(n) 1.0.2 tcllib &quot;HTML and Java Script Generation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>javascript - Procedures to generate HTML and Java Script structures.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">javascript <span class="opt">?1.0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::javascript::makeSelectorWidget</b> <i class="arg">id leftLabel leftValueList rightLabel rightValueList rightNameList</i> <span class="opt">?<i class="arg">length</i>?</span> <span class="opt">?<i class="arg">minWidth</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::javascript::makeSubmitButton</b> <i class="arg">name value</i></a></li>
<li><a href="#3"><b class="cmd">::javascript::makeProtectedSubmitButton</b> <i class="arg">name value msg</i></a></li>
<li><a href="#4"><b class="cmd">::javascript::makeMasterButton</b> <i class="arg">master value slavePattern boolean</i></a></li>
<li><a href="#5"><b class="cmd">::javascript::makeParentCheckbox</b> <i class="arg">parentName childName</i></a></li>
<li><a href="#6"><b class="cmd">::javascript::makeChildCheckbox</b> <i class="arg">parentName childName</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">::javascript</b> package provides commands that generate
HTML and Java Script code.  These commands typically return an HTML
string as their result.  In particular, they do not output their
result to <b class="const">stdout</b>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::javascript::makeSelectorWidget</b> <i class="arg">id leftLabel leftValueList rightLabel rightValueList rightNameList</i> <span class="opt">?<i class="arg">length</i>?</span> <span class="opt">?<i class="arg">minWidth</i>?</span></a></dt>
<dd><p>Construct HTML code to create a dual-multi-selection megawidget.  This
megawidget consists of two side-by-side multi-selection boxes
separated by a left arrow and a right arrow button.  The right arrow
button moves all items selected in the left box to the right box.  The
left arrow button moves all items selected in the right box to the
left box.  The <i class="arg">id</i> argument is the suffix of all HTML objects in
this megawidget.  The <i class="arg">leftLabel</i> argument is the text that
appears above the left selection box.  The <i class="arg">leftValueList</i>
argument is the values of items in the left selection box.  The
<i class="arg">leftNameList</i> argument is the names to appear in the left
selection box.  The <i class="arg">rightLabel</i> argument is the text that appears
above the right selection box.  The <i class="arg">rightValueList</i> argument is
the values of items in the right selection box.  The
<i class="arg">rightNameList</i> argument is the names to appear in the right
selection box.  The <i class="arg">length</i> argument (optional) determines the
number of elts to show before adding a vertical scrollbar; it defaults
to 8.  The <i class="arg">minWidth</i> argument (optional) is the number of spaces
to determine the minimum box width; it defaults to 32.</p></dd>
<dt><a name="2"><b class="cmd">::javascript::makeSubmitButton</b> <i class="arg">name value</i></a></dt>
<dd><p>Create an HTML submit button that resets a hidden field for each
registered multi-selection box.  The <i class="arg">name</i> argument is the name
of the HTML button object to create.  The <i class="arg">value</i> argument is the
label of the HTML button object to create.</p></dd>
<dt><a name="3"><b class="cmd">::javascript::makeProtectedSubmitButton</b> <i class="arg">name value msg</i></a></dt>
<dd><p>Create an HTML submit button that prompts the user with a
continue/cancel shutdown warning before the form is submitted.  The
<i class="arg">name</i> argument is the name of the HTML button object to create.
The <i class="arg">value</i> argument is the label of the HTML button object to
create. The <i class="arg">msg</i> argument is the message to display when the
button is pressed.</p></dd>
<dt><a name="4"><b class="cmd">::javascript::makeMasterButton</b> <i class="arg">master value slavePattern boolean</i></a></dt>
<dd><p>Create an HTML button that sets its slave checkboxs to the boolean
value.  The <i class="arg">master</i> argument is the name of the child's parent
html checkbox object.  The <i class="arg">value</i> argument is the value of the
master.  The <i class="arg">slaves</i> argument is the name of child html checkbox
object to create.  The <i class="arg">boolean</i> argument is the java script
boolean value that will be given to all the slaves; it must be &quot;true&quot;
or &quot;false&quot;.</p></dd>
<dt><a name="5"><b class="cmd">::javascript::makeParentCheckbox</b> <i class="arg">parentName childName</i></a></dt>
<dd><p>Create an HTML checkbox and tie its value to that of its child
checkbox.  If the parent is unchecked, the child is automatically
unchecked.  The <i class="arg">parentName</i> argument is the name of parent html
checkbox object to create. The <i class="arg">childName</i> argument is the name of
the parent's child html checkbox object.</p></dd>
<dt><a name="6"><b class="cmd">::javascript::makeChildCheckbox</b> <i class="arg">parentName childName</i></a></dt>
<dd><p>Create an HTML checkbox and tie its value to that of its parent
checkbox.  If the child is checked, the parent is automatically
checked.  The <i class="arg">parentName</i> argument is the name of the child's
parent html checkbox object.  The <i class="arg">childName</i> argument is the name
of child html checkbox object to create.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>javascript</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../html/html.html">html</a>, <a href="../ncgi/ncgi.html">ncgi</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key620">checkbox</a>, <a href="../../../../index.html#key617">html</a>, <a href="../../../../index.html#key207">javascript</a>, <a href="../../../../index.html#key739">selectionbox</a>, <a href="../../../../index.html#key738">submitbutton</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/jpeg/jpeg.html.

































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<div class='fossil-doc' data-title='jpeg - JPEG image manipulation'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">jpeg(n) 0.5 tcllib &quot;JPEG image manipulation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>jpeg - JPEG querying and manipulation of meta data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">LIMITATIONS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">jpeg <span class="opt">?0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::jpeg::isJPEG</b> <i class="arg">file</i></a></li>
<li><a href="#2"><b class="cmd">::jpeg::imageInfo</b> <i class="arg">file</i></a></li>
<li><a href="#3"><b class="cmd">::jpeg::dimensions</b> <i class="arg">file</i></a></li>
<li><a href="#4"><b class="cmd">::jpeg::getThumbnail</b> <i class="arg">file</i></a></li>
<li><a href="#5"><b class="cmd">::jpeg::getExif</b> <i class="arg">file</i> <span class="opt">?<i class="arg">section</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::jpeg::getExifFromChannel</b> <i class="arg">channel</i> <span class="opt">?<i class="arg">section</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::jpeg::formatExif</b> <i class="arg">keys</i></a></li>
<li><a href="#8"><b class="cmd">::jpeg::exifKeys</b></a></li>
<li><a href="#9"><b class="cmd">::jpeg::removeExif</b> <i class="arg">file</i></a></li>
<li><a href="#10"><b class="cmd">::jpeg::stripJPEG</b> <i class="arg">file</i></a></li>
<li><a href="#11"><b class="cmd">::jpeg::getComments</b> <i class="arg">file</i></a></li>
<li><a href="#12"><b class="cmd">::jpeg::addComment</b> <i class="arg">file</i> <i class="arg">text</i>...</a></li>
<li><a href="#13"><b class="cmd">::jpeg::removeComments</b> <i class="arg">file</i></a></li>
<li><a href="#14"><b class="cmd">::jpeg::replaceComment</b> <i class="arg">file</i> <i class="arg">text</i></a></li>
<li><a href="#15"><b class="cmd">::jpeg::debug</b> <i class="arg">file</i></a></li>
<li><a href="#16"><b class="cmd">::jpeg::markers</b> <i class="arg">channel</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to query and modify JPEG images. JPEG
stands for <i class="term">Joint Photography Experts Group</i> and is a standard
for the lossy compression of photographical images. It is specified at
<a href="LINK_HERE">LINK_HERE</a>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::jpeg::isJPEG</b> <i class="arg">file</i></a></dt>
<dd><p>Returns a boolean value indicating if <i class="arg">file</i> is a
JPEG image.</p></dd>
<dt><a name="2"><b class="cmd">::jpeg::imageInfo</b> <i class="arg">file</i></a></dt>
<dd><p>Returns a dictionary with keys <b class="const">version</b>, <b class="const">units</b>,
<b class="const">xdensity</b>, <b class="const">ydensity</b>, <b class="const">xthumb</b>, and
<b class="const">ythumb</b>. The values are the associated properties of the JPEG
image in <i class="arg">file</i>.
Throws an error if <i class="arg">file</i> is not a JPEG image.</p></dd>
<dt><a name="3"><b class="cmd">::jpeg::dimensions</b> <i class="arg">file</i></a></dt>
<dd><p>Returns the dimensions of the JPEG <i class="arg">file</i> as a list of the
horizontal and vertical pixel count.
Throws an error if <i class="arg">file</i> is not a JPEG image.</p></dd>
<dt><a name="4"><b class="cmd">::jpeg::getThumbnail</b> <i class="arg">file</i></a></dt>
<dd><p>This procedure will return the binary thumbnail image data, if a JPEG
thumbnail is included in <i class="arg">file</i>, and the empty string
otherwise. Note that it is possible to include thumbnails in formats
other than JPEG although that is not common. The command finds
thumbnails that are encoded in either the JFXX or EXIF segments of the
JPEG information. If both are present the EXIF thumbnail will take precedence.
Throws an error if <i class="arg">file</i> is not a JPEG image.</p>
<pre class="doctools_example">
    set fh [open thumbnail.jpg w+]
    fconfigure $fh -translation binary -encoding binary
    puts -nonewline $fh [::jpeg::getThumbnail photo.jpg]
    close $fh
</pre>
</dd>
<dt><a name="5"><b class="cmd">::jpeg::getExif</b> <i class="arg">file</i> <span class="opt">?<i class="arg">section</i>?</span></a></dt>
<dd><p><i class="arg">section</i> must be one of <b class="const">main</b> or <b class="const">thumbnail</b>.
The default is <b class="const">main</b>.
Returns a dictionary containing the EXIF information for the specified section.
For example:</p>
<pre class="doctools_example">
    set exif {
	Make     Canon
	Model    {Canon DIGITAL IXUS}
	DateTime {2001:06:09 15:17:32}
    }
</pre>
<p>Throws an error if <i class="arg">file</i> is not a JPEG image.</p></dd>
<dt><a name="6"><b class="cmd">::jpeg::getExifFromChannel</b> <i class="arg">channel</i> <span class="opt">?<i class="arg">section</i>?</span></a></dt>
<dd><p>This command is as per <b class="cmd">::jpeg::getExif</b> except that it uses a
previously opened channel.  <i class="arg">channel</i> should be a seekable channel
and <i class="arg">section</i> is as described in the documentation of
<b class="cmd">::jpeg::getExif</b>.</p>
<p><em>Note</em>: The jpeg parser expects that the start of the
channel is the start of the image data. If working with an image
embedded in a container file format it may be necessary to read the
jpeg data into a temporary container: either a temporary file or a
memory channel.</p>
<p><em>Attention</em>: It is the resonsibility of the caller to close
the channel after its use.</p></dd>
<dt><a name="7"><b class="cmd">::jpeg::formatExif</b> <i class="arg">keys</i></a></dt>
<dd><p>Takes a list of key-value pairs as returned by <b class="cmd">getExif</b> and formats
many of the values into a more human readable form. As few as one key-value
may be passed in, the entire exif is not required.</p>
<pre class="doctools_example">
    foreach {key val} [::jpeg::formatExif [::jpeg::getExif photo.jpg]] {
        puts &quot;$key: $val&quot;
    }
</pre>
<pre class="doctools_example">
    array set exif [::jpeg::getExif photo.jpg]
    puts &quot;max f-stop: [::jpeg::formatExif [list MaxAperture $exif(MaxAperture)]]
</pre>
</dd>
<dt><a name="8"><b class="cmd">::jpeg::exifKeys</b></a></dt>
<dd><p>Returns a list of the EXIF keys which are currently understood.
There may be keys present in <b class="cmd">getExif</b> data that are not understood.
Those keys will appear in a 4 digit hexadecimal format.</p></dd>
<dt><a name="9"><b class="cmd">::jpeg::removeExif</b> <i class="arg">file</i></a></dt>
<dd><p>Removes the Exif data segment from the specified file and replaces
it with a standard JFIF segment.
Throws an error if <i class="arg">file</i> is not a JPEG image.</p></dd>
<dt><a name="10"><b class="cmd">::jpeg::stripJPEG</b> <i class="arg">file</i></a></dt>
<dd><p>Removes all metadata from the JPEG file leaving only
the image. This includes comments, EXIF segments, JFXX
segments, and application specific segments.
Throws an error if <i class="arg">file</i> is not a JPEG image.</p></dd>
<dt><a name="11"><b class="cmd">::jpeg::getComments</b> <i class="arg">file</i></a></dt>
<dd><p>Returns a list containing all the JPEG comments found in
the <i class="arg">file</i>.
Throws an error if <i class="arg">file</i> is not a valid JPEG image.</p></dd>
<dt><a name="12"><b class="cmd">::jpeg::addComment</b> <i class="arg">file</i> <i class="arg">text</i>...</a></dt>
<dd><p>Adds one or more plain <i class="arg">text</i> comments to the JPEG image
in <i class="arg">file</i>.
Throws an error if <i class="arg">file</i> is not a valid JPEG image.</p></dd>
<dt><a name="13"><b class="cmd">::jpeg::removeComments</b> <i class="arg">file</i></a></dt>
<dd><p>Removes all comments from the file specified.
Throws an error if <i class="arg">file</i> is not a valid JPEG image.</p></dd>
<dt><a name="14"><b class="cmd">::jpeg::replaceComment</b> <i class="arg">file</i> <i class="arg">text</i></a></dt>
<dd><p>Replaces the first comment in the file with the new <i class="arg">text</i>.
This is merely a shortcut for <b class="cmd">::jpeg::removeComments</b>
and <b class="cmd">::jpeg::addComment</b>
Throws an error if <i class="arg">file</i> is not a valid JPEG image.</p></dd>
<dt><a name="15"><b class="cmd">::jpeg::debug</b> <i class="arg">file</i></a></dt>
<dd><p>Prints everything we know about the given file in a nice format.</p></dd>
<dt><a name="16"><b class="cmd">::jpeg::markers</b> <i class="arg">channel</i></a></dt>
<dd><p>This is an internal helper command, we document it for use by advanced
users of the package. The argument <i class="arg">channel</i> is an open file
handle positioned at the start of the first marker (usually 2
bytes). The command returns a list with one element for each JFIF
marker found in the file. Each element consists of a list of the
marker name, its offset in the file, and its length. The offset points
to the beginning of the sections data, not the marker itself.  The
length is the length of the data from the offset listed to the start
of the next marker.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LIMITATIONS</a></h2>
<p>can only work with files
cant write exif data
gps exif data not parsed
makernote data not yet implemented</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>jpeg</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key155">comment</a>, <a href="../../../../index.html#key152">exif</a>, <a href="../../../../index.html#key121">image</a>, <a href="../../../../index.html#key154">jfif</a>, <a href="../../../../index.html#key153">jpeg</a>, <a href="../../../../index.html#key151">thumbnail</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2005, Code: Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;<br>
Copyright &copy; 2007, Code:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2004-2009, Doc:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2011, Code: Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/json/json.html.



























































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

<div class='fossil-doc' data-title='json - JSON'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">json(n) 1.3.3 tcllib &quot;JSON&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>json - JSON parser</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">json <span class="opt">?1.3.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::json::json2dict</b> <i class="arg">txt</i></a></li>
<li><a href="#2"><b class="cmd">::json::many-json2dict</b> <i class="arg">txt</i> <span class="opt">?<i class="arg">max</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">json</b> package provides a simple Tcl-only library for parsing the
JSON <a href="http://www.json.org/">http://www.json.org/</a> data exchange format as specified in RFC 4627
<a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>.
There is some ambiguity in parsing JSON because JSON has type information that
is not maintained by the Tcl conversion.  The <b class="package">json</b> package returns
data as a Tcl <b class="cmd"><a href="../../../../index.html#key705">dict</a></b>.  Either the <b class="package"><a href="../../../../index.html#key705">dict</a></b> package or Tcl 8.5 is
required for use.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::json::json2dict</b> <i class="arg">txt</i></a></dt>
<dd><p>Parse JSON formatted text <i class="arg">txt</i> into a Tcl dict and return
the value.</p>
<p>If <i class="arg">txt</i> contains more than one JSON entity only the
first one is returned.</p></dd>
<dt><a name="2"><b class="cmd">::json::many-json2dict</b> <i class="arg">txt</i> <span class="opt">?<i class="arg">max</i>?</span></a></dt>
<dd><p>Parse JSON formatted text <i class="arg">txt</i> containing multiple JSON entities
into a list of dictionaries and return that list.</p>
<p>If <i class="arg">max</i> is specified exactly that many entities are extracted
from <i class="arg">txt</i>. By default the command will attempt to extract all, without
limits. A value of &quot;<i class="arg">max</i> == 0&quot; does not make sense and will cause the
command to throw an error.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<p>An example of a JSON array converted to Tcl.  A JSON array is returned as a
single item with multiple elements.</p>
<pre class="doctools_example">[
    {
       &quot;precision&quot;: &quot;zip&quot;,
       &quot;Latitude&quot;:  37.7668,
       &quot;Longitude&quot;: -122.3959,
       &quot;Address&quot;:   &quot;&quot;,
       &quot;City&quot;:      &quot;SAN FRANCISCO&quot;,
       &quot;State&quot;:     &quot;CA&quot;,
       &quot;Zip&quot;:       &quot;94107&quot;,
       &quot;Country&quot;:   &quot;US&quot;
    },
    {
       &quot;precision&quot;: &quot;zip&quot;,
       &quot;Latitude&quot;:  37.371991,
       &quot;Longitude&quot;: -122.026020,
       &quot;Address&quot;:   &quot;&quot;,
       &quot;City&quot;:      &quot;SUNNYVALE&quot;,
       &quot;State&quot;:     &quot;CA&quot;,
       &quot;Zip&quot;:       &quot;94085&quot;,
       &quot;Country&quot;:   &quot;US&quot;
    }
]
=&gt;
{Country US Latitude 37.7668 precision zip State CA City {SAN FRANCISCO} Address {} Zip 94107 Longitude -122.3959} {Country US Latitude 37.371991 precision zip State CA City SUNNYVALE Address {} Zip 94085 Longitude -122.026020}
</pre>
<p>An example of a JSON object converted to Tcl.  A JSON object is returned as a
multi-element list (a dict).</p>
<pre class="doctools_example">{
    &quot;Image&quot;: {
        &quot;Width&quot;:  800,
        &quot;Height&quot;: 600,
        &quot;Title&quot;:  &quot;View from 15th Floor&quot;,
        &quot;Thumbnail&quot;: {
            &quot;Url&quot;:    &quot;http://www.example.com/image/481989943&quot;,
            &quot;Height&quot;: 125,
            &quot;Width&quot;:  &quot;100&quot;
        },
        &quot;IDs&quot;: [116, 943, 234, 38793]
    }
}
=&gt;
Image {IDs {116 943 234 38793} Thumbnail {Width 100 Height 125 Url http://www.example.com/image/481989943} Width 800 Height 600 Title {View from 15th Floor}}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>json</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key205">data exchange</a>, <a href="../../../../index.html#key204">exchange format</a>, <a href="../../../../index.html#key207">javascript</a>, <a href="../../../../index.html#key206">json</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 ActiveState Software Inc.<br>
Copyright &copy; 2009 Thomas Maeder, Glue Software Engineering AG</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/json/json_write.html.



































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

<div class='fossil-doc' data-title='json::write - JSON'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">json::write(n) 1.0.3 tcllib &quot;JSON&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>json::write - JSON generation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">json::write <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::json::write</b> <b class="method">indented</b></a></li>
<li><a href="#2"><b class="cmd">::json::write</b> <b class="method">indented</b> <i class="arg">flag</i></a></li>
<li><a href="#3"><b class="cmd">::json::write</b> <b class="method">aligned</b></a></li>
<li><a href="#4"><b class="cmd">::json::write</b> <b class="method">aligned</b> <i class="arg">flag</i></a></li>
<li><a href="#5"><b class="cmd">::json::write</b> <b class="method">string</b> <i class="arg">s</i></a></li>
<li><a href="#6"><b class="cmd">::json::write</b> <b class="method">array</b> <i class="arg">arg</i>...</a></li>
<li><a href="#7"><b class="cmd">::json::write</b> <b class="method">object</b> <i class="arg">key</i> <i class="arg">value</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">json::write</b> package provides a simple Tcl-only library
for generation of text in the JSON <a href="http://www.json.org/">http://www.json.org/</a> data
exchange format as specified in
RFC 4627 <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::json::write</b> <b class="method">indented</b></a></dt>
<dd><p>This method returns the current state of the indentation setting.</p></dd>
<dt><a name="2"><b class="cmd">::json::write</b> <b class="method">indented</b> <i class="arg">flag</i></a></dt>
<dd><p>This and the method <b class="method">aligned</b> configure the layout of the JSON
generated by the package.</p>
<p>If this <i class="arg">flag</i> is set (default) the package will break the
generated JSON code across lines and indent it according to its inner
structure, with each key of an object on a separate line.</p>
<p>If this flag is not set, the whole JSON object will be written on a
single line, with minimum spacing between all elements.</p></dd>
<dt><a name="3"><b class="cmd">::json::write</b> <b class="method">aligned</b></a></dt>
<dd><p>This method returns the current state of the alignment setting.</p></dd>
<dt><a name="4"><b class="cmd">::json::write</b> <b class="method">aligned</b> <i class="arg">flag</i></a></dt>
<dd><p>This and the method <b class="method">indented</b> configure the layout of the JSON
generated by the package.</p>
<p>If this <i class="arg">flag</i> is set (default) the package ensures that the
values for the keys in an object are vertically aligned with each
other, for a nice table effect. To make this work this also implies
that <b class="variable">indented</b> is set as well.</p>
<p>If this flag is not set, the output is formatted as per the value of
<b class="variable">indented</b>, without trying to align the values for object keys.</p></dd>
<dt><a name="5"><b class="cmd">::json::write</b> <b class="method">string</b> <i class="arg">s</i></a></dt>
<dd><p>This method takes the string <i class="arg">s</i> and returns it properly quoted
for JSON as its result.</p></dd>
<dt><a name="6"><b class="cmd">::json::write</b> <b class="method">array</b> <i class="arg">arg</i>...</a></dt>
<dd><p>This method takes a series of JSON formatted arguments and returns
them as a properly formatted JSON array as its result.</p></dd>
<dt><a name="7"><b class="cmd">::json::write</b> <b class="method">object</b> <i class="arg">key</i> <i class="arg">value</i>...</a></dt>
<dd><p>This method takes a series of key/value arguments, the values already
formatted for JSON, and returns them as a properly formatted JSON
object as its result, with the keys formatted as JSON strings.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>json</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key205">data exchange</a>, <a href="../../../../index.html#key204">exchange format</a>, <a href="../../../../index.html#key207">javascript</a>, <a href="../../../../index.html#key206">json</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013 Andreas Kupries &lt;andreas_kupries@sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/lambda/lambda.html.























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203

<div class='fossil-doc' data-title='lambda - Utility commands for anonymous procedures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">lambda(n) 1 tcllib &quot;Utility commands for anonymous procedures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>lambda - Utility commands for anonymous procedures</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">AUTHORS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">lambda <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::lambda</b> <i class="arg">arguments</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::lambda@</b> <i class="arg">namespace</i> <i class="arg">arguments</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides two convenience commands to make the writing of
anonymous procedures, i.e. lambdas more <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>-like. Instead of,
for example, to write</p>
<pre class="doctools_example">
     set f {::apply {{x} {
        ....
     }}}
</pre>
<p>with its deep nesting of braces, or</p>
<pre class="doctools_example">
     set f [list ::apply {{x y} {
        ....
     }} $value_for_x]
</pre>
<p>with a list command to insert some of the arguments of a partial
application, just write</p>
<pre class="doctools_example">
     set f [lambda {x} {
        ....
     }]
</pre>
<p>and</p>
<pre class="doctools_example">
     set f [lambda {x y} {
        ....
     } $value_for_x]
</pre>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::lambda</b> <i class="arg">arguments</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>The command constructs an anonymous procedure from the list of
arguments, body script and (optional) predefined argument values and
returns a command prefix representing this anonymous procedure.</p>
<p>When invoked the <i class="arg">body</i> is run in a new procedure scope
just underneath the global scope, with the arguments set to the values
supplied at both construction and invokation time.</p></dd>
<dt><a name="2"><b class="cmd">::lambda@</b> <i class="arg">namespace</i> <i class="arg">arguments</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>The command constructs an anonymous procedure from the namespace name,
list of arguments, body script and (optional) predefined argument
values and returns a command prefix representing this anonymous
procedure.</p>
<p>When invoked the <i class="arg">body</i> is run in a new procedure scope in
the <i class="arg">namespace</i>, with the arguments set to the values supplied at
both construction and invokation time.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AUTHORS</a></h2>
<p>Andreas Kupries</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>lambda</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>apply(n), proc(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key596">anonymous procedure</a>, <a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key595">command prefix</a>, <a href="../../../../index.html#key597">currying</a>, <a href="../../../../index.html#key594">lambda</a>, <a href="../../../../index.html#key593">partial application</a>, <a href="../../../../index.html#key592">proc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries, BSD licensed</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ldap/ldap.html.

























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524

<div class='fossil-doc' data-title='ldap - LDAP client'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ldap(n) 1.6.9 tcllib &quot;LDAP client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ldap - LDAP client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section3">COMMANDS</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">ldap <span class="opt">?1.8?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ldap::connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::ldap::secure_connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::ldap::disconnect</b> <i class="arg">handle</i></a></li>
<li><a href="#4"><b class="cmd">::ldap::starttls</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">cafile</i>?</span> <span class="opt">?<i class="arg">certfile</i>?</span> <span class="opt">?<i class="arg">keyfile</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::ldap::bind</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::ldap::bindSASL</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::ldap::unbind</b> <i class="arg">handle</i></a></li>
<li><a href="#8"><b class="cmd">::ldap::search</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></li>
<li><a href="#9"><b class="cmd">::ldap::searchInit</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></li>
<li><a href="#10"><b class="cmd">::ldap::searchNext</b> <i class="arg">handle</i></a></li>
<li><a href="#11"><b class="cmd">::ldap::searchEnd</b> <i class="arg">handle</i></a></li>
<li><a href="#12"><b class="cmd">::ldap::modify</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></li>
<li><a href="#13"><b class="cmd">::ldap::modifyMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrValToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></li>
<li><a href="#14"><b class="cmd">::ldap::add</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></li>
<li><a href="#15"><b class="cmd">::ldap::addMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></li>
<li><a href="#16"><b class="cmd">::ldap::delete</b> <i class="arg">handle</i> <i class="arg">dn</i></a></li>
<li><a href="#17"><b class="cmd">::ldap::modifyDN</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">newrdn</i> <span class="opt">?<i class="arg">deleteOld</i>?</span> <span class="opt">?<i class="arg">newSuperior</i>?</span></a></li>
<li><a href="#18"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#key451">ip</a></b> <i class="arg">handle</i></a></li>
<li><a href="#19"><b class="cmd">::ldap::info</b> <b class="cmd">bound</b> <i class="arg">handle</i></a></li>
<li><a href="#20"><b class="cmd">::ldap::info</b> <b class="cmd">bounduser</b> <i class="arg">handle</i></a></li>
<li><a href="#21"><b class="cmd">::ldap::info</b> <b class="cmd">connections</b></a></li>
<li><a href="#22"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#key331">tls</a></b> <i class="arg">handle</i></a></li>
<li><a href="#23"><b class="cmd">::ldap::info</b> <b class="cmd">saslmechanisms</b> <i class="arg">handle</i></a></li>
<li><a href="#24"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../control/control.html">control</a></b> <i class="arg">handle</i></a></li>
<li><a href="#25"><b class="cmd">::ldap::info</b> <b class="cmd">extensions</b> <i class="arg">extensions</i></a></li>
<li><a href="#26"><b class="cmd">::ldap::info</b> <b class="cmd">whoami</b> <i class="arg">handle</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">ldap</b> package provides a Tcl-only client library
for the LDAPv3 protocol as specified in
RFC 4511 (<a href="http://www.rfc-editor.org/rfc/rfc4511.txt">http://www.rfc-editor.org/rfc/rfc4511.txt</a>).
It works by opening the standard (or secure) LDAP socket on the
server, and then providing a Tcl API to access the LDAP protocol
commands.  All server errors are returned as Tcl errors (thrown) which
must be caught with the Tcl <b class="cmd">catch</b> command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ldap::connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Opens a LDAPv3 connection to the specified <i class="arg">host</i>, at the given
<i class="arg">port</i>, and returns a token for the connection. This token is the
<i class="arg">handle</i> argument for all other commands. If no <i class="arg">port</i> is
specified it will default to <b class="const">389</b>.</p>
<p>The command blocks until the connection has been established, or
establishment definitely failed.</p></dd>
<dt><a name="2"><b class="cmd">::ldap::secure_connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Like <b class="cmd">::ldap::connect</b>, except that the created connection is
secured by SSL. The port defaults to <b class="const">636</b>.  This command
depends on the availability of the package <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, which is a
SSL binding for Tcl. If <b class="package"><a href="../../../../index.html#key331">TLS</a></b> is not available, then this
command will fail.</p>
<p>The command blocks until the connection has been established, or
establishment definitely failed.</p></dd>
<dt><a name="3"><b class="cmd">::ldap::disconnect</b> <i class="arg">handle</i></a></dt>
<dd><p>Closes the ldap connection refered to by the token
<i class="arg">handle</i>. Returns the empty string as its result.</p></dd>
<dt><a name="4"><b class="cmd">::ldap::starttls</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">cafile</i>?</span> <span class="opt">?<i class="arg">certfile</i>?</span> <span class="opt">?<i class="arg">keyfile</i>?</span></a></dt>
<dd><p>Start TLS negotiation on the connection denoted by <i class="arg">handle</i>.
This is currently experimental and subject to change, more control over the TLS details
will probably be exposed later, to allow users to fine tune the negotiation according
to their security needs.</p></dd>
<dt><a name="5"><b class="cmd">::ldap::bind</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></dt>
<dd><p>This command authenticates the ldap connection refered to by the token
in <i class="arg">handle</i>, with a user name and associated password. It blocks
until a response from the ldap server arrives. Its result is the empty
string.
Both <i class="arg">name</i> and <i class="arg">passwd</i> default to the empty string if they
are not specified.
By leaving out <i class="arg">name</i> and <i class="arg">passwd</i> you can make an anonymous bind to
the ldap server.
You can issue <b class="cmd">::ldap::bind</b> again to bind with different credentials.</p></dd>
<dt><a name="6"><b class="cmd">::ldap::bindSASL</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></dt>
<dd><p>This command uses SASL authentication mechanisms to do a multistage bind.
Its otherwise identical to the standard <b class="cmd">::ldap::bind</b>.
This feature is currently experimental and subject to change. See the documentation
for the <b class="package"><a href="../sasl/sasl.html">SASL</a></b> and the &quot;<b class="file">SASL.txt</b>&quot; in the tcllib CVS repository for
details how to setup and use SASL with openldap.</p></dd>
<dt><a name="7"><b class="cmd">::ldap::unbind</b> <i class="arg">handle</i></a></dt>
<dd><p>This command asks the ldap server to release the last bind done for
the connection refered to by the token in <i class="arg">handle</i>.
The <i class="arg">handle</i> is invalid after the unbind, as the server closes the connection.
So this is effectivly just a more polite disconnect operation.</p></dd>
<dt><a name="8"><b class="cmd">::ldap::search</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></dt>
<dd><p>This command performs a LDAP search below the <i class="arg">baseObject</i> tree
using a complex LDAP search expression <i class="arg">filterString</i> and returns
the specified <i class="arg">attributes</i> of all matching objects (DNs). If the
list of <i class="arg">attributes</i> was empty all attributes are returned. The
command blocks until it has received all results.
The valid <i class="arg">options</i> are identical to the options listed for <b class="cmd">::ldap::searchInit</b>.</p>
<p>An example of a search expression is</p>
<pre class="doctools_example">
    set filterString &quot;|(cn=Linus*)(sn=Torvalds*)&quot;
</pre>
<p>The return value of the command is a list of nested dictionaries. The
first level keys are object identifiers (DNs), second levels keys are
attribute names. In other words, it is in the form</p>
<pre class="doctools_example">
    {dn1 {attr1 {val11 val12 ...} attr2 {val21...} ...}} {dn2 {a1 {v11 ...} ...}} ...
</pre>
</dd>
<dt><a name="9"><b class="cmd">::ldap::searchInit</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></dt>
<dd><p>This command initiates a LDAP search below the <i class="arg">baseObject</i> tree
using a complex LDAP search expression <i class="arg">filterString</i>.
The search gets the specified <i class="arg">attributes</i> of all matching objects (DNs).
The command itself just starts the search, to retrieve the actual results, use
<b class="cmd">::ldap::searchNext</b>.
A search can be terminated at any time by
<b class="cmd">::ldap::searchEnd</b>. This informs the server that no further results should be sent by sending and ABANDON message
and cleans up the internal state of the search.
Only one <b class="cmd">::ldap::search</b> can be active at a given time, this
includes the introspection commands <b class="cmd">::ldap::info saslmechanisms</b>, <b class="cmd">ldap::info control</b> and
<b class="cmd">ldap::info extensions</b>, which invoke a search internally.
Error responses from the server due to wrong arguments or similar things are returned
with the first <b class="cmd">::ldap::searchNext</b> call and should be checked and dealed with there.
If the list of requested <i class="arg">attributes</i> is empty all attributes will be returned.
The parameter <i class="arg">options</i> specifies the options to be used in the search,
and has the following format:</p>
<pre class="doctools_example">
    {-option1 value1 -option2 value2 ... }
</pre>
<p>Following options are available:</p>
<dl class="doctools_options">
<dt><b class="option">-scope</b> base one sub</dt>
<dd><p>Control the scope of the search to be one of <b class="const">base</b>, <b class="const">one</b>, or <b class="const">sub</b>,  to  specify  a  base
object,  one-level or  subtree  search.   The  default is <b class="const">sub</b>.</p></dd>
<dt><b class="option">-derefaliases</b> never search find always</dt>
<dd><p>Control how aliases dereferencing is done.  Should be one of <b class="const">never</b>, <b class="const">always</b>, <b class="const">search</b>,  or  <b class="const">find</b>  to
specify that aliases are never dereferenced, always dereferenced, dereferenced when searching, or
dereferenced only when locating the base object for the search.
The default is to never dereference aliases.</p></dd>
<dt><b class="option">-sizelimit</b> num</dt>
<dd><p>Determines the maximum number of entries to return in a search. If specified as
0 no limit is enforced. The server may enforce a configuration dependent sizelimit,
which may be lower than the one given by this option. The default is 0, no limit.</p></dd>
<dt><b class="option">-timelimit</b> seconds</dt>
<dd><p>Asks the server to use a timelimit of <i class="arg">seconds</i> for the search. Zero means no
limit. The default is 0, no limit.</p></dd>
<dt><b class="option">-attrsonly</b> boolean</dt>
<dd><p>If set to 1 only the attribute names but not the values will be present in the search result.
The default is to retrieve attribute names and values.</p></dd>
<dt><b class="option">-referencevar</b> varname</dt>
<dd><p>If set the search result reference LDAPURIs, if any, are returned in the given variable.
The caller can than decide to follow those references and query other LDAP servers for
further results.</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::ldap::searchNext</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the next entry from a LDAP search initiated
by <b class="cmd">::ldap::searchInit</b>. It returns only after a new result is received
or when no further results are available, but takes care to keep
the event loop alive.
The returned entry is a list with
two elements: the first is the DN of the entry, the second is the
list of attributes and values, under the format:</p>
<pre class="doctools_example">
    dn {attr1 {val11 val12 ...} attr2 {val21...} ...}
</pre>
<p>The <b class="cmd">::ldap::searchNext</b> command returns an empty list at the
end of the search.</p></dd>
<dt><a name="11"><b class="cmd">::ldap::searchEnd</b> <i class="arg">handle</i></a></dt>
<dd><p>This command terminates a LDAP search initiated
by <b class="cmd">::ldap::searchInit</b>. It also cleans up
the internal state so a new search can be initiated.
If the client has not yet received all results, the client
sends an ABANDON message to inform the server that no
further results for the previous search should to be sent.</p></dd>
<dt><a name="12"><b class="cmd">::ldap::modify</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></dt>
<dd><p>This command modifies the object <i class="arg">dn</i> on the ldap server we are
connected to via <i class="arg">handle</i>. It replaces attributes with new values,
deletes attributes, and adds new attributes with new values.
All arguments are dictionaries mapping attribute names to values. The
optional arguments default to the empty dictionary, which means that
no attributes will be deleted nor added.</p>
<dl class="doctools_arguments">
<dt>dictionary <i class="arg">attrValToReplace</i> (in)</dt>
<dd><p>No attributes will be changed if this argument is empty. The
dictionary contains the new attributes and their values. They
<em>replace all</em> attributes known to the object.</p></dd>
<dt>dictionary <i class="arg">attrToDelete</i> (in)</dt>
<dd><p>No attributes will be deleted if this argument is empty. The
dictionary values are restrictions on the deletion. An attribute
listed here will be deleted if and only if its current value at the
server matches the value specified in the dictionary, or if the value
in the dictionary is the empty string.</p></dd>
<dt>dictionary <i class="arg">attrValToAdd</i> (in)</dt>
<dd><p>No attributes will be added if this argument is empty. The dictionary
values are the values for the new attributes.</p></dd>
</dl>
<p>The command blocks until all modifications have completed. Its result
is the empty string.</p></dd>
<dt><a name="13"><b class="cmd">::ldap::modifyMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrValToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></dt>
<dd><p>This command modifies the object <i class="arg">dn</i> on the ldap server we are
connected to via <i class="arg">handle</i>. It replaces attributes with new values,
deletes attributes, and adds new attributes with new values.
All arguments are lists with the format:</p>
<pre class="doctools_example">
    attr1 {val11 val12 ...} attr2 {val21...} ...
</pre>
<p>where each value list may be empty for deleting all attributes.
The optional arguments default to empty lists of attributes to
delete and to add.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">attrValToReplace</i> (in)</dt>
<dd><p>No attributes will be changed if this argument is empty. The
dictionary contains the new attributes and their values. They
<em>replace all</em> attributes known to the object.</p></dd>
<dt>list <i class="arg">attrValToDelete</i> (in)</dt>
<dd><p>No attributes will be deleted if this argument is empty. If no
value is specified, the whole set of values for an attribute
will be deleted.</p></dd>
<dt>list <i class="arg">attrValToAdd</i> (in)</dt>
<dd><p>No attributes will be added if this argument is empty.</p></dd>
</dl>
<p>The command blocks until all modifications have completed. Its result
is the empty string.</p></dd>
<dt><a name="14"><b class="cmd">::ldap::add</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></dt>
<dd><p>This command creates a new object using the specified <i class="arg">dn</i>. The
attributes of the new object are set to the values in the list
<i class="arg">attrValueTuples</i>.
Multiple valuated attributes may be specified using multiple tuples.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="15"><b class="cmd">::ldap::addMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></dt>
<dd><p>This command is the preferred one to create
a new object using the specified <i class="arg">dn</i>. The
attributes of the new object are set to the values in the dictionary
<i class="arg">attrValueTuples</i> (which is keyed by the attribute names).
Each tuple is a list containing multiple values.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="16"><b class="cmd">::ldap::delete</b> <i class="arg">handle</i> <i class="arg">dn</i></a></dt>
<dd><p>This command removes the object specified by <i class="arg">dn</i>, and all its
attributes from the server.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="17"><b class="cmd">::ldap::modifyDN</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">newrdn</i> <span class="opt">?<i class="arg">deleteOld</i>?</span> <span class="opt">?<i class="arg">newSuperior</i>?</span></a></dt>
<dd><p>]
This command moves or copies the object specified by <i class="arg">dn</i>
to a new location in the tree of object. This location is
specified by <i class="arg">newrdn</i>, a <em>relative</em> designation,
or by <i class="arg">newrdn</i> and <i class="arg">newSuperior</i>, a <em>absolute</em> designation.
The optional argument <i class="arg">deleteOld</i> defaults to <b class="const">true</b>,
i.e. a move operation. If <i class="arg">deleteOld</i> is not set, then the
operation will create a copy of <i class="arg">dn</i> in the new location.
The optional argument <i class="arg">newSuperior</i> defaults an empty string,
meaning that the object must not be relocated in another branch of
the tree. If this argument is given, the argument <i class="arg">deleteOld</i>
must be specified also.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="18"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#key451">ip</a></b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the IP address of the remote LDAP server the handle is connected to.</p></dd>
<dt><a name="19"><b class="cmd">::ldap::info</b> <b class="cmd">bound</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns 1 if a handle has successfully completed a <b class="cmd">::ldap::bind</b>.
If no bind was done or it failed, a 0 is returned.</p></dd>
<dt><a name="20"><b class="cmd">::ldap::info</b> <b class="cmd">bounduser</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the username used in the bind operation if a handle has successfully completed a <b class="cmd">::ldap::bind</b>.
If no bound was done or it failed, an empty string is returned.</p></dd>
<dt><a name="21"><b class="cmd">::ldap::info</b> <b class="cmd">connections</b></a></dt>
<dd><p>This command returns all currently existing ldap connection handles.</p></dd>
<dt><a name="22"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#key331">tls</a></b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns 1 if the ldap connection <i class="arg">handle</i> used TLS/SSL for
connection via <b class="cmd">ldap::secure_connect</b> or completed <b class="cmd">ldap::starttls</b>, 0 otherwise.</p></dd>
<dt><a name="23"><b class="cmd">::ldap::info</b> <b class="cmd">saslmechanisms</b> <i class="arg">handle</i></a></dt>
<dd><p>Return the supported SASL mechanisms advertised by the server. Only valid in a
bound state (anonymous or other).</p></dd>
<dt><a name="24"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../control/control.html">control</a></b> <i class="arg">handle</i></a></dt>
<dd><p>Return the supported controls advertised by the server as a list of OIDs. Only valid in a bound state.
This is currently experimental and subject to change.</p></dd>
<dt><a name="25"><b class="cmd">::ldap::info</b> <b class="cmd">extensions</b> <i class="arg">extensions</i></a></dt>
<dd><p>Returns the supported LDAP extensions as list of OIDs. Only valid in a bound state.
This is currently experimental and subject to change.</p></dd>
<dt><a name="26"><b class="cmd">::ldap::info</b> <b class="cmd">whoami</b> <i class="arg">handle</i></a></dt>
<dd><p>Returns authzId for the current connection. This implements the RFC 4532
protocol extension.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<p>A small example, extracted from the test application coming with this
code.</p>
<pre class="doctools_example">
    package require ldap
    # Connect, bind, add a new object, modify it in various ways
    set handle [ldap::connect localhost 9009]
    set dn &quot;cn=Manager, o=University of Michigan, c=US&quot;
    set pw secret
    ldap::bind $handle $dn $pw
    set dn &quot;cn=Test User,ou=People,o=University of Michigan,c=US&quot;
    ldap::add $handle $dn {
	objectClass     OpenLDAPperson
	cn              {Test User}
	mail            test.user@google.com
	uid             testuid
	sn              User
	telephoneNumber +31415926535
	telephoneNumber +27182818285
    }
    set dn &quot;cn=Another User,ou=People,o=University of Michigan,c=US&quot;
    ldap::addMulti $handle $dn {
	objectClass     {OpenLDAPperson}
	cn              {{Anotther User}}
	mail            {test.user@google.com}
	uid             {testuid}
	sn              {User}
	telephoneNumber {+31415926535 +27182818285}
    }
    # Replace all attributes
    ldap::modify $handle $dn [list drink icetea uid JOLO]
    # Add some more
    ldap::modify $handle $dn {} {} [list drink water  drink orangeJuice pager &quot;+1 313 555 7671&quot;]
    # Delete
    ldap::modify $handle $dn {} [list drink water  pager &quot;&quot;]
    # Move
    ldap::modifyDN $handle $dn &quot;cn=Tester&quot;
    # Kill the test object, and shut the connection down.
    set dn &quot;cn=Tester,ou=People,o=University of Michigan,c=US&quot;
    ldap::delete $handle $dn
    ldap::unbind     $handle
    ldap::disconnect $handle
</pre>
<p>And a another example, a simple query, and processing the
results.</p>
<pre class="doctools_example">
    package require ldap
    set handle [ldap::connect ldap.acme.com 389]
    ldap::bind $handle
    set results [ldap::search $handle &quot;o=acme,dc=com&quot; &quot;(uid=jdoe)&quot; {}]
    foreach result $results {
	foreach {object attributes} $result break
	# The processing here is similar to what 'parray' does.
	# I.e. finding the longest attribute name and then
	# generating properly aligned output listing all attributes
	# and their values.
	set width 0
	set sortedAttribs {}
	foreach {type values} $attributes {
	    if {[string length $type] &gt; $width} {
		set width [string length $type]
	    }
	    lappend sortedAttribs [list $type $values]
	}
	puts &quot;object='$object'&quot;
	foreach sortedAttrib  $sortedAttribs {
	    foreach {type values} $sortedAttrib break
	    foreach value $values {
		regsub -all &quot;\[\x01-\x1f\]&quot; $value ? value
		puts [format &quot;  %-${width}s %s&quot; $type $value]
	    }
	}
	puts &quot;&quot;
    }
    ldap::unbind $handle
    ldap::disconnect $handle
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ldap</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key135">directory access</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key130">ldap</a>, <a href="../../../../index.html#key128">ldap client</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key129">rfc 2251</a>, <a href="../../../../index.html#key132">rfc 4511</a>, <a href="../../../../index.html#key134">x.500</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Jochen Loewer &lt;loewerj@web.de&gt;<br>
Copyright &copy; 2006 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ldap/ldapx.html.



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745

<div class='fossil-doc' data-title='ldapx - LDAP extended object interface'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ldapx(n) 0.2.5 tcllib &quot;LDAP extended object interface&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ldapx - LDAP extended object interface</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a></li>
<li class="doctools_section"><a href="#section3">ENTRY CLASS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Entry Instance Data</a></li>
<li class="doctools_subsection"><a href="#subsection2">Entry Options</a></li>
<li class="doctools_subsection"><a href="#subsection3">Methods for all kinds of entries</a></li>
<li class="doctools_subsection"><a href="#subsection4">Methods for standard entries only</a></li>
<li class="doctools_subsection"><a href="#subsection5">Methods for change entries only</a></li>
<li class="doctools_subsection"><a href="#subsection6">Entry Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">LDAP CLASS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection7">Ldap Instance Data</a></li>
<li class="doctools_subsection"><a href="#subsection8">Ldap Options</a></li>
<li class="doctools_subsection"><a href="#subsection9">Ldap Methods</a></li>
<li class="doctools_subsection"><a href="#subsection10">Ldap Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">LDIF CLASS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection11">Ldif Instance Data</a></li>
<li class="doctools_subsection"><a href="#subsection12">Ldif Options</a></li>
<li class="doctools_subsection"><a href="#subsection13">Ldif Methods</a></li>
<li class="doctools_subsection"><a href="#subsection14">Ldif Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">References</a></li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">ldapx <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><i class="arg">e</i> <b class="method">reset</b></a></li>
<li><a href="#2"><i class="arg">e</i> <b class="method">dn</b> <span class="opt">?<i class="arg">newdn</i>?</span></a></li>
<li><a href="#3"><i class="arg">e</i> <b class="method">rdn</b></a></li>
<li><a href="#4"><i class="arg">e</i> <b class="method">superior</b></a></li>
<li><a href="#5"><i class="arg">e</i> <b class="method">print</b></a></li>
<li><a href="#6"><i class="arg">se</i> <b class="method">isempty</b></a></li>
<li><a href="#7"><i class="arg">se</i> <b class="method">get</b> <i class="arg">attr</i></a></li>
<li><a href="#8"><i class="arg">se</i> <b class="method">get1</b> <i class="arg">attr</i></a></li>
<li><a href="#9"><i class="arg">se</i> <b class="method">set</b> <i class="arg">attr</i> <i class="arg">values</i></a></li>
<li><a href="#10"><i class="arg">se</i> <b class="method">set1</b> <i class="arg">attr</i> <i class="arg">value</i></a></li>
<li><a href="#11"><i class="arg">se</i> <b class="method">add</b> <i class="arg">attr</i> <i class="arg">values</i></a></li>
<li><a href="#12"><i class="arg">se</i> <b class="method">add1</b> <i class="arg">attr</i> <i class="arg">value</i></a></li>
<li><a href="#13"><i class="arg">se</i> <b class="method">del</b> <i class="arg">attr</i> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#14"><i class="arg">se</i> <b class="method">del1</b> <i class="arg">attr</i> <i class="arg">value</i></a></li>
<li><a href="#15"><i class="arg">se</i> <b class="method">getattr</b></a></li>
<li><a href="#16"><i class="arg">se</i> <b class="method">getall</b></a></li>
<li><a href="#17"><i class="arg">se</i> <b class="method">setall</b> <i class="arg">avpairs</i></a></li>
<li><a href="#18"><i class="arg">se</i> <b class="method">backup</b> <span class="opt">?<i class="arg">other</i>?</span></a></li>
<li><a href="#19"><i class="arg">se</i> <b class="method">swap</b></a></li>
<li><a href="#20"><i class="arg">se</i> <b class="method">restore</b> <span class="opt">?<i class="arg">other</i>?</span></a></li>
<li><a href="#21"><i class="arg">se</i> <b class="method">apply</b> <i class="arg">centry</i></a></li>
<li><a href="#22"><i class="arg">ce</i> <b class="method">change</b> <span class="opt">?<i class="arg">new</i>?</span></a></li>
<li><a href="#23"><i class="arg">ce</i> <b class="method">diff</b> <i class="arg">new</i> <span class="opt">?<i class="arg">old</i>?</span></a></li>
<li><a href="#24"><i class="arg">la</i> <b class="method">error</b> <span class="opt">?<i class="arg">newmsg</i>?</span></a></li>
<li><a href="#25"><i class="arg">la</i> <b class="method">connect</b> <i class="arg">url</i> <span class="opt">?<i class="arg">binddn</i>?</span> <span class="opt">?<i class="arg">bindpw</i>?</span></a></li>
<li><a href="#26"><i class="arg">la</i> <b class="method">disconnect</b></a></li>
<li><a href="#27"><i class="arg">la</i> <b class="method">traverse</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">attrs</i> <i class="arg">entry</i> <i class="arg">body</i></a></li>
<li><a href="#28"><i class="arg">la</i> <b class="method">search</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">attrs</i></a></li>
<li><a href="#29"><i class="arg">la</i> <b class="method">read</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">entry</i> ... <i class="arg">entry</i></a></li>
<li><a href="#30"><i class="arg">la</i> <b class="method">commit</b> <i class="arg">entry</i> ... <i class="arg">entry</i></a></li>
<li><a href="#31"><i class="arg">li</i> <b class="method">channel</b> <i class="arg">chan</i></a></li>
<li><a href="#32"><i class="arg">li</i> <b class="method">error</b> <span class="opt">?<i class="arg">newmsg</i>?</span></a></li>
<li><a href="#33"><i class="arg">li</i> <b class="method">read</b> <i class="arg">entry</i></a></li>
<li><a href="#34"><i class="arg">li</i> <b class="method">write</b> <i class="arg">entry</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">ldapx</b> package provides an extended Tcl interface to
LDAP directores and LDIF files. The <b class="package">ldapx</b> package is built
upon the <b class="package"><a href="ldap.html">ldap</a></b> package in order to get low level LDAP access.</p>
<p>LDAP access is compatible with RFC 2251
(<a href="http://www.rfc-editor.org/rfc/rfc2251.txt">http://www.rfc-editor.org/rfc/rfc2251.txt</a>).
LDIF access is compatible with RFC 2849
(<a href="http://www.rfc-editor.org/rfc/rfc2849.txt">http://www.rfc-editor.org/rfc/rfc2849.txt</a>).</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<p>The <b class="package">ldapx</b> package provides objects to interact with LDAP
directories and LDIF files with an easy to use programming interface.
It implements three <b class="package"><a href="../snit/snit.html">snit</a></b>::type classes.</p>
<p>The first class, <b class="class">entry</b>, is used to store individual entries.
Two different formats are available: the first one is the
<em>standard</em> format, which represents an entry as read from the
directory. The second format is the <em>change</em> format, which
stores differences between two standard entries.</p>
<p>With these entries, an application which wants to modify an entry
in a directory needs to read a (standard) entry from the directory,
create a fresh copy into a new (standard) entry, modify the new
copy, and then compute the differences between the two entries into
a new (change) entry, which may be commited to the directory.</p>
<p>Such kinds of modifications are so heavily used that standard entries
may contain their own copy of the original data. With such a copy,
the application described above reads a (standard) entry from the
directory, backs-up the original data, modifies the entry, and
computes the differences between the entry and its backup. These
differences are then commited to the directory.</p>
<p>Methods are provided to compute differences between two entries,
to apply differences to an entry in order to get a new entry, and
to get or set attributes in standard entries.</p>
<p>The second class is the <b class="class">ldap</b> class. It provides a method
to <b class="method">connect</b> and bind to the directory with a uniform access
to LDAP and LDAPS through an URL (ldap:// or ldaps://). The
<b class="method">traverse</b> control structure executes a body for each entry
found in the directory. The <b class="method">commit</b> method applies some
changes (represented as <b class="class">entry</b> objects) to the directory.
Since some attributes are represented as UTF-8 strings, the option
<b class="option">-utf8</b> controls which attributes must be converted and
which attributes must not be converted.</p>
<p>The last class is the <b class="class">ldif</b> class. It provides a method to
associate a standard Tcl <em>channel</em> to an LDIF object. Then,
methods <b class="method">read</b> and <b class="method">write</b> read or write entries from
or to this channel. This class can make use of standard or change
entries, according to the type of the LDIF file which may contain
either standard entries or change entries (but not both at the same
time). The option <b class="option">-utf8</b> works exactly as with the
<b class="class">ldap</b> class.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">ENTRY CLASS</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Entry Instance Data</a></h3>
<p>An instance of the <b class="class">entry</b> class keeps the following data:</p>
<dl class="doctools_definitions">
    
<dt>dn</dt>
<dd><p>This is the DN of the entry, which includes (in LDAP
	terminology) the RDN (relative DN) and the Superior parts.</p></dd>
<dt>format</dt>
<dd><p>The format may be <em>uninitialized</em> (entry not yet used),
	<em>standard</em> or <em>change</em>. Most methods check the
	format of the entry, which can be reset with the
	<b class="method">reset</b> method.</p></dd>
<dt>attrvals</dt>
<dd><p>In a <em>standard</em> entry, this is where the attributes
	and associated values are stored. Many methods provide
	access to these informations. Attribute names are always
	converted into lower case.</p></dd>
<dt>backup</dt>
<dd><p>In a <em>standard</em> entry, the backup may contain a copy
	of the dn and all attributes and values. Methods
	<b class="method">backup</b> and <b class="method">restore</b> manipulate these data,
	and method <b class="method">diff</b> may use this backup.</p></dd>
<dt>change</dt>
<dd><p>In a <em>change</em> entry, these data represent the
	modifications. Such modifications are handled by specialized
	methods such as <b class="method">apply</b> or <b class="method">commit</b>.
	Detailed format should not be used directly by programs.</p>
<p>Internally, modifications are represented as a list of
	elements, each element has one of the following formats
	(which match the corresponding LDAP operations):</p>
<ol class="doctools_enumerated">
	    
<li><p>{<b class="const">add</b> {attr1 {val1...valn} attr2 {...} ...}}</p>
<p>Addition of a new entry.</p></li>
<li><p>{<b class="const">mod</b> {modop {attr1 <span class="opt">?val1...valn?</span>} attr2 ...} {modop ...} ...}</p>
<p>Modification of one or more attributes and/or values,
		where &lt;modop&gt; can be <b class="const">modadd</b>, <b class="const">moddel</b>
		or <b class="const">modrepl</b> (see the LDAP modify operation).</p></li>
<li><p>{<b class="const">del</b>}</p>
<p>Deletion of an old entry.</p></li>
<li><p>{<b class="const">modrdn</b> newrdn deleteoldrdn <span class="opt">?newsuperior?</span>}</p>
<p>Renaming of an entry.</p></li>
</ol></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Entry Options</a></h3>
<p>No option is defined by this class.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Methods for all kinds of entries</a></h3>
<dl class="doctools_definitions">
    
<dt><a name="1"><i class="arg">e</i> <b class="method">reset</b></a></dt>
<dd><p>This method resets the entry to an uninitialized state.</p></dd>
<dt><a name="2"><i class="arg">e</i> <b class="method">dn</b> <span class="opt">?<i class="arg">newdn</i>?</span></a></dt>
<dd><p>This method returns the current DN of the entry. If the
	optional <i class="arg">newdn</i> is specified, it replaces the current
	DN of the entry.</p></dd>
<dt><a name="3"><i class="arg">e</i> <b class="method">rdn</b></a></dt>
<dd><p>This method returns the RDN part of the DN of the entry.</p></dd>
<dt><a name="4"><i class="arg">e</i> <b class="method">superior</b></a></dt>
<dd><p>This method returns the superior part of the DN of the entry.</p></dd>
<dt><a name="5"><i class="arg">e</i> <b class="method">print</b></a></dt>
<dd><p>This method returns the entry as a string ready to be printed.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Methods for standard entries only</a></h3>
<p>In all methods, attribute names are converted in lower case.</p>
<dl class="doctools_definitions">
    
<dt><a name="6"><i class="arg">se</i> <b class="method">isempty</b></a></dt>
<dd><p>This method returns 1 if the entry is empty (i.e. without
	any attribute).</p></dd>
<dt><a name="7"><i class="arg">se</i> <b class="method">get</b> <i class="arg">attr</i></a></dt>
<dd><p>This method returns all values of the attribute <i class="arg">attr</i>,
	or the empty list if the attribute is not fond.</p></dd>
<dt><a name="8"><i class="arg">se</i> <b class="method">get1</b> <i class="arg">attr</i></a></dt>
<dd><p>This method returns the first value of the attribute.</p></dd>
<dt><a name="9"><i class="arg">se</i> <b class="method">set</b> <i class="arg">attr</i> <i class="arg">values</i></a></dt>
<dd><p>This method sets the values (list <i class="arg">values</i>) of the
	attribute <i class="arg">attr</i>. If the list is empty, this method
	deletes all</p></dd>
<dt><a name="10"><i class="arg">se</i> <b class="method">set1</b> <i class="arg">attr</i> <i class="arg">value</i></a></dt>
<dd><p>This method sets the values of the attribute <i class="arg">attr</i> to
	be an unique value <i class="arg">value</i>. Previous values, if any,
	are replaced by the new value.</p></dd>
<dt><a name="11"><i class="arg">se</i> <b class="method">add</b> <i class="arg">attr</i> <i class="arg">values</i></a></dt>
<dd><p>This method adds all elements the list <i class="arg">values</i> to the
	values of the attribute <i class="arg">attr</i>.</p></dd>
<dt><a name="12"><i class="arg">se</i> <b class="method">add1</b> <i class="arg">attr</i> <i class="arg">value</i></a></dt>
<dd><p>This method adds a single value given by the parameter
	<i class="arg">value</i> to the attribute <i class="arg">attr</i>.</p></dd>
<dt><a name="13"><i class="arg">se</i> <b class="method">del</b> <i class="arg">attr</i> <span class="opt">?<i class="arg">values</i>?</span></a></dt>
<dd><p>If the optional list <i class="arg">values</i> is specified, this method
	deletes all specified values from the attribute <i class="arg">attr</i>.
	If the argument <i class="arg">values</i> is not specified, this method
	deletes all values.</p></dd>
<dt><a name="14"><i class="arg">se</i> <b class="method">del1</b> <i class="arg">attr</i> <i class="arg">value</i></a></dt>
<dd><p>This method deletes a unique <i class="arg">value</i> from the attribute
	<i class="arg">attr</i>.</p></dd>
<dt><a name="15"><i class="arg">se</i> <b class="method">getattr</b></a></dt>
<dd><p>This method returns all attributes names.</p></dd>
<dt><a name="16"><i class="arg">se</i> <b class="method">getall</b></a></dt>
<dd><p>This method returns all attributes and values from the
	entry, packed in a list of pairs &lt;attribute, list of values&gt;.</p></dd>
<dt><a name="17"><i class="arg">se</i> <b class="method">setall</b> <i class="arg">avpairs</i></a></dt>
<dd><p>This method sets at once all attributes and values. The
	format of the <i class="arg">avpairs</i> argument is the same as the one
	returned by method <b class="method">getall</b>.</p></dd>
<dt><a name="18"><i class="arg">se</i> <b class="method">backup</b> <span class="opt">?<i class="arg">other</i>?</span></a></dt>
<dd><p>This method stores in an <i class="arg">other</i> standard entry object
	a copy of the current DN and attributes/values. If the
	optional <i class="arg">other</i> argument is not specified, copy is
	done in the current entry (in a specific place, see section
	<span class="sectref"><a href="#section2">OVERVIEW</a></span>).</p></dd>
<dt><a name="19"><i class="arg">se</i> <b class="method">swap</b></a></dt>
<dd><p>This method swaps the current and backup contexts of the
	entry.</p></dd>
<dt><a name="20"><i class="arg">se</i> <b class="method">restore</b> <span class="opt">?<i class="arg">other</i>?</span></a></dt>
<dd><p>If the optional argument <i class="arg">other</i> is given, which must
	then be a <em>standard</em> entry, this method restores the
	current entry into the <i class="arg">other</i> entry. If the argument
	<i class="arg">other</i> argument is not specified, this methods restores
	the current entry from its internal backup (see section
	<span class="sectref"><a href="#section2">OVERVIEW</a></span>).</p></dd>
<dt><a name="21"><i class="arg">se</i> <b class="method">apply</b> <i class="arg">centry</i></a></dt>
<dd><p>This method applies changes defined in the <i class="arg">centry</i>
	argument, which must be a <em>change</em> entry.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Methods for change entries only</a></h3>
<dl class="doctools_definitions">
    
<dt><a name="22"><i class="arg">ce</i> <b class="method">change</b> <span class="opt">?<i class="arg">new</i>?</span></a></dt>
<dd><p>If the optional argument <i class="arg">new</i> is specified, this method
	modifies the change list (see subsection <span class="sectref"><a href="#subsection1">Entry Instance Data</a></span> for
	the exact format). In both cases, current change list is
	returned.
	Warning: values returned by this method should only be used
	by specialized methods such as <b class="method">apply</b> or
	<b class="method">commit</b>.</p></dd>
<dt><a name="23"><i class="arg">ce</i> <b class="method">diff</b> <i class="arg">new</i> <span class="opt">?<i class="arg">old</i>?</span></a></dt>
<dd><p>This method computes the differences between the <i class="arg">new</i>
	and <i class="arg">old</i> entries under the form of a change list, and
	stores this list into the current <em>change</em> entry. If
	the optional argument <i class="arg">old</i> is not specified, difference
	is computed from the entry and its internal backup (see
	section <span class="sectref"><a href="#section2">OVERVIEW</a></span>). Return value is the computed
	change list.</p></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Entry Example</a></h3>
<pre class="doctools_example">
    package require ldapx
    #
    # Create an entry and fill it as a standard entry with
    # attributes and values
    #
    ::ldapx::entry create e
    e dn &quot;uid=joe,ou=people,o=mycomp&quot;
    e set1 &quot;uid&quot;             &quot;joe&quot;
    e set  &quot;objectClass&quot;     {person anotherObjectClass}
    e set1 &quot;givenName&quot;       &quot;Joe&quot;
    e set1 &quot;sn&quot;              &quot;User&quot;
    e set  &quot;telephoneNumber&quot; {+31415926535 +2182818}
    e set1 &quot;anotherAttr&quot;     &quot;This is a beautiful day, isn't it?&quot;
    puts stdout &quot;e\n[e print]&quot;
    #
    # Create a second entry as a backup of the first, and
    # make some changes on it.
    # Entry is named automatically by snit.
    #
    set b [::ldapx::entry create %AUTO%]
    e backup $b
    puts stdout &quot;$b\n[$b print]&quot;
    $b del  &quot;anotherAttr&quot;
    $b del1 &quot;objectClass&quot; &quot;anotherObjectClass&quot;
    #
    # Create a change entry, a compute differences between first
    # and second entry.
    #
    ::ldapx::entry create c
    c diff e $b
    puts stdout &quot;$c\n[$c print]&quot;
    #
    # Apply changes to first entry. It should be the same as the
    # second entry, now.
    #
    e apply c
    ::ldapx::entry create nc
    nc diff e $b
    puts stdout &quot;nc\n[nc print]&quot;
    #
    # Clean-up
    #
    e destroy
    $b destroy
    c destroy
    nc destroy
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">LDAP CLASS</a></h2>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Ldap Instance Data</a></h3>
<p>An instance of the <b class="class">ldap</b> class keeps the following data:</p>
<dl class="doctools_definitions">
    
<dt>channel</dt>
<dd><p>This is the channel used by the <b class="package"><a href="ldap.html">ldap</a></b> package for
	communication with the LDAP server.</p></dd>
<dt>lastError</dt>
<dd><p>This variable contains the error message which appeared in
	the last method of the <b class="class">ldap</b> class (this string is
	modified in nearly all methods). The <b class="method">error</b> method
	may be used to fetch this message.</p></dd>
</dl>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Ldap Options</a></h3>
<p>A first set of options of the <b class="class">ldap</b> class is used during
search operations (methods <b class="method">traverse</b>, <b class="method">search</b> and
<b class="method">read</b>, see below).</p>
<dl class="doctools_options">
    
<dt><b class="option">-scope</b> <b class="const">base</b>|<b class="const">one</b>|<b class="const">sub</b></dt>
<dd><p>Specify the scope of the LDAP search to be one of
	<b class="const">base</b>, <b class="const">one</b> or <b class="const">sub</b> to specify
	a base object, one-level or subtree search.</p>
<p>The default is <b class="const">sub</b>.</p></dd>
<dt><b class="option">-derefaliases</b> <b class="const">never</b>|<b class="const">seach</b>|<b class="const">find</b>|<b class="const">always</b></dt>
<dd><p>Specify how aliases dereferencing is handled:
	<b class="const">never</b> is used to specify that aliases are never derefenced,
	<b class="const">always</b> that aliases are always derefenced,
	<b class="const">search</b> that aliases are dereferenced when searching,
	or <b class="const">find</b> that aliases are dereferenced only  when
	locating  the  base object for the search.</p>
<p>The default is <b class="const">never</b>.</p></dd>
<dt><b class="option">-sizelimit</b> integer</dt>
<dd><p>Specify the maximum number of entries to be retreived
	during a search. A value of <b class="const">0</b> means no limit.</p>
<p>Default is <b class="const">0</b>.</p></dd>
<dt><b class="option">-timelimit</b> integer</dt>
<dd><p>Specify the time limit for a search to complete.
	A value of <b class="const">0</b> means no limit.</p>
<p>Default is <b class="const">0</b>.</p></dd>
<dt><b class="option">-attrsonly</b> <b class="const">0</b>|<b class="const">1</b></dt>
<dd><p>Specify if only attribute names are to be retrieved (value
	<b class="const">1</b>). Normally (value <b class="const">0</b>), attribute values
	are also retrieved.</p>
<p>Default is <b class="const">0</b>.</p></dd>
</dl>
<p>The last option is used when getting entries or committing changes
in the directory:</p>
<dl class="doctools_options">
    
<dt><b class="option">-utf8</b> pattern-yes pattern-no</dt>
<dd><p>Specify which attribute values are encoded in UTF-8. This
	information is specific to the LDAP schema in use by the
	application, since some attributes such as jpegPhoto, for
	example, are not encoded in UTF-8. This option takes the
	form of a list with two regular expressions suitable for
	the <b class="cmd">regexp</b> command (anchored by ^ and $).
	The first specifies which attribute names are to be UTF-8
	encoded, and the second selects, among those, the attribute
	names which will not be UTF-8 encoded.  It is thus possible
	to say: convert all attributes, except jpegPhoto.</p>
<p>Default is {{.*} {}}, meaning: all attributes are converted,
	without exception.</p></dd>
</dl>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">Ldap Methods</a></h3>
<dl class="doctools_definitions">
    
<dt><a name="24"><i class="arg">la</i> <b class="method">error</b> <span class="opt">?<i class="arg">newmsg</i>?</span></a></dt>
<dd><p>This method returns the error message that occurred in the
	last call to a <b class="class">ldap</b> class method. If the optional
	argument <i class="arg">newmsg</i> is supplied, it becomes the last
	error message.</p></dd>
<dt><a name="25"><i class="arg">la</i> <b class="method">connect</b> <i class="arg">url</i> <span class="opt">?<i class="arg">binddn</i>?</span> <span class="opt">?<i class="arg">bindpw</i>?</span></a></dt>
<dd><p>This method connects to the LDAP server using given URL
	(which can be of the form <a href="ldap://host:port">ldap://host:port</a> or
	<a href="ldaps://host:port">ldaps://host:port</a>). If an optional <i class="arg">binddn</i>
	argument is given together with the <i class="arg">bindpw</i> argument,
	the <b class="method">connect</b> binds to the LDAP server using the
	specified DN and password.</p></dd>
<dt><a name="26"><i class="arg">la</i> <b class="method">disconnect</b></a></dt>
<dd><p>This method disconnects (and unbinds, if necessary) from
	the LDAP server.</p></dd>
<dt><a name="27"><i class="arg">la</i> <b class="method">traverse</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">attrs</i> <i class="arg">entry</i> <i class="arg">body</i></a></dt>
<dd><p>This method is a new control structure. It searches the
	LDAP directory from the specified base DN (given by the
	<i class="arg">base</i> argument) and selects entries based on the
	argument <i class="arg">filter</i>. For each entry found, this method
	fetches attributes specified by the <i class="arg">attrs</i> argument
	(or all attributes if it is an empty list), stores them in
	the <i class="arg">entry</i> instance of class <b class="class">entry</b> and executes
	the script defined by the argument <i class="arg">body</i>. Options are
	used to refine the search.</p>
<p>Caution: when this method is used, the script <i class="arg">body</i>
	cannot perform another LDAP search (methods <b class="method">traverse</b>,
	<b class="method">search</b> or <b class="method">read</b>).</p></dd>
<dt><a name="28"><i class="arg">la</i> <b class="method">search</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">attrs</i></a></dt>
<dd><p>This method searches the directory using the same way as
	method <b class="method">traverse</b>. All found entries are stored in
	newly created instances of class <b class="class">entry</b>, which are
	returned in a list. The newly created instances should be
	destroyed when they are no longer used.</p></dd>
<dt><a name="29"><i class="arg">la</i> <b class="method">read</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">entry</i> ... <i class="arg">entry</i></a></dt>
<dd><p>This method reads one or more entries, using the same search
	criteria as methods <b class="method">traverse</b> and <b class="method">search</b>.
	All attributes are stored in the entries. This method
	provides a quick way to read some entries. It returns the
	number of entries found in the directory (which may be more
	than the number of read entries). If called without any
	<i class="arg">entry</i> argument, this method just returns the number
	of entries found, without returning any data.</p></dd>
<dt><a name="30"><i class="arg">la</i> <b class="method">commit</b> <i class="arg">entry</i> ... <i class="arg">entry</i></a></dt>
<dd><p>This method commits the changes stored in the <i class="arg">entry</i>
	arguments. Each <i class="arg">entry</i> may be either a <em>change</em>
	entry, or a <em>standard</em> entry with a backup.</p>
<p>Note: in the future, this method should use the LDAP
	transaction extension provided by OpenLDAP 2.3 and later.</p></dd>
</dl>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">Ldap Example</a></h3>
<pre class="doctools_example">
    package require ldapx
    #
    # Connects to the LDAP directory
    #
    ::ldapx::ldap create l
    set url &quot;ldap://server.mycomp.com&quot;
    if {! [l connect $url &quot;cn=admin,o=mycomp&quot; &quot;mypasswd&quot;]} then {
	puts stderr &quot;error: [l error]&quot;
	exit 1
    }
    #
    # Search all entries matching some criterion
    #
    l configure -scope one
    ::ldapx::entry create e
    set n 0
    l traverse &quot;ou=people,o=mycomp&quot; &quot;(sn=Joe*)&quot; {sn givenName} e {
	puts &quot;dn: [e dn]&quot;
	puts &quot;  sn:        [e get1 sn]&quot;
	puts &quot;  givenName: [e get1 givenName]&quot;
	incr n
    }
    puts &quot;$n entries found&quot;
    e destroy
    #
    # Add a telephone number to some entries
    # Note this modification cannot be done in the &quot;traverse&quot; operation.
    #
    set lent [l search &quot;ou=people,o=mycomp&quot; &quot;(sn=Joe*)&quot; {}]
    ::ldapx::entry create c
    foreach e $lent {
	$e backup
	$e add1 &quot;telephoneNumber&quot; &quot;+31415926535&quot;
	c diff $e
	if {! [l commit c]} then {
	    puts stderr &quot;error: [l error]&quot;
	    exit 1
	}
	$e destroy
    }
    l disconnect
    l destroy
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">LDIF CLASS</a></h2>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Ldif Instance Data</a></h3>
<p>An instance of the <b class="class">ldif</b> class keeps the following data:</p>
<dl class="doctools_definitions">
    
<dt>channel</dt>
<dd><p>This is the Tcl channel used to retrieve or store LDIF file
	contents. The association between an instance and a channel
	is made by the method <b class="method">channel</b>. There is no need
	to disrupt this association when the LDIF file operation
	has ended.</p></dd>
<dt>format</dt>
<dd><p>LDIF files may contain <em>standard</em> entries or
	<em>change</em> entries, but not both. This variable contains
	the detected format of the file (when reading) or the format
	of entries written to the file (when writing).</p></dd>
<dt>lastError</dt>
<dd><p>This variable contains the error message which appeared in
	the last method of the <b class="class">ldif</b> class (this string is
	modified in nearly all methods). The <b class="method">error</b> method
	may be used to fetch this message.</p></dd>
<dt>version</dt>
<dd><p>This is the version of the LDIF file. Only version 1 is
	supported: the method <b class="method">read</b> can only read from
	version 1 files, and method <b class="method">write</b> only creates
	version 1 files.</p></dd>
</dl>
</div>
<div id="subsection12" class="doctools_subsection"><h3><a name="subsection12">Ldif Options</a></h3>
<p>This class defines two options:</p>
<dl class="doctools_options">
    
<dt><b class="option">-ignore</b> list-of-attributes</dt>
<dd><p>This option is used to ignore certain attribute names on
	reading. For example, to read OpenLDAP replica files (replog),
	one must ignore <b class="const">replica</b> and <b class="const">time</b> attributes
	since they do not conform to the RFC 2849 standard for LDIF
	files.</p>
<p>Default is empty list: no attribute is ignored.</p></dd>
<dt><b class="option">-utf8</b> pattern-yes pattern-no</dt>
<dd><p>Specify which attribute values are encoded in UTF-8. This
	information is specific to the LDAP schema in use by the
	application, since some attributes such as jpegPhoto, for
	example, are not encoded in UTF-8. This option takes the
	form of a list with two regular expressions suitable for
	the <b class="cmd">regexp</b> command (anchored by ^ and $).
	The first specifies which attribute names are to be UTF-8
	encoded, and the second selects, among those, the attribute
	names which will not be UTF-8 encoded.  It is thus possible
	to say: convert all attributes, except jpegPhoto.</p>
<p>Default is {{.*} {}}, meaning: all attributes are converted,
	without exception.</p></dd>
</dl>
</div>
<div id="subsection13" class="doctools_subsection"><h3><a name="subsection13">Ldif Methods</a></h3>
<dl class="doctools_definitions">
    
<dt><a name="31"><i class="arg">li</i> <b class="method">channel</b> <i class="arg">chan</i></a></dt>
<dd><p>This method associates the Tcl channel named <i class="arg">chan</i>
	with the LDIF instance. It resets the type of LDIF object
	to <em>uninitialized</em>.</p></dd>
<dt><a name="32"><i class="arg">li</i> <b class="method">error</b> <span class="opt">?<i class="arg">newmsg</i>?</span></a></dt>
<dd><p>This method returns the error message that occurred in the
	last call to a <b class="class">ldif</b> class method. If the optional
	argument <i class="arg">newmsg</i> is supplied, it becomes the last
	error message.</p></dd>
<dt><a name="33"><i class="arg">li</i> <b class="method">read</b> <i class="arg">entry</i></a></dt>
<dd><p>This method reads the next entry from the LDIF file and
	stores it in the <i class="arg">entry</i> object of class <b class="class">entry</b>.
	The entry may be a <em>standard</em> or <em>change</em> entry.</p></dd>
<dt><a name="34"><i class="arg">li</i> <b class="method">write</b> <i class="arg">entry</i></a></dt>
<dd><p>This method writes the entry given in the argument
	<i class="arg">entry</i> to the LDIF file.</p></dd>
</dl>
</div>
<div id="subsection14" class="doctools_subsection"><h3><a name="subsection14">Ldif Example</a></h3>
<pre class="doctools_example">
    package require ldapx
    # This examples reads a LDIF file containing entries,
    # compare them to a LDAP directory, and writes on standard
    # output an LDIF file containing changes to apply to the
    # LDAP directory to match exactly the LDIF file.
    ::ldapx::ldif create liin
    liin channel stdin
    ::ldapx::ldif create liout
    liout channel stdout
    ::ldapx::ldap create la
    if {! [la connect &quot;ldap://server.mycomp.com&quot;]} then {
	puts stderr &quot;error: [la error]&quot;
	exit 1
    }
    la configure -scope one
    # Reads LDIF file
    ::ldapx::entry create e1
    ::ldapx::entry create e2
    ::ldapx::entry create c
    while {[liin read e1] != 0} {
	set base [e1 superior]
	set id [e1 rdn]
	if {[la read $base &quot;($id)&quot; e2] == 0} then {
	    e2 reset
	}
	c diff e1 e2
	if {[llength [c change]] != 0} then {
	    liout write c
	}
    }
    la disconnect
    la destroy
    e1 destroy
    e2 destroy
    c destroy
    liout destroy
    liin destroy
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">References</a></h2>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ldap</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key135">directory access</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key130">ldap</a>, <a href="../../../../index.html#key128">ldap client</a>, <a href="../../../../index.html#key503">ldif</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key129">rfc 2251</a>, <a href="../../../../index.html#key502">rfc 2849</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Pierre David &lt;pdav@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/log/log.html.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343

<div class='fossil-doc' data-title='log - Logging facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">log(n) 1.3 tcllib &quot;Logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>log - Procedures to log messages of libraries and applications.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">LEVELS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">log <span class="opt">?1.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::log::levels</b></a></li>
<li><a href="#2"><b class="cmd">::log::lv2longform</b> <i class="arg">level</i></a></li>
<li><a href="#3"><b class="cmd">::log::lv2color</b> <i class="arg">level</i></a></li>
<li><a href="#4"><b class="cmd">::log::lv2priority</b> <i class="arg">level</i></a></li>
<li><a href="#5"><b class="cmd">::log::lv2cmd</b> <i class="arg">level</i></a></li>
<li><a href="#6"><b class="cmd">::log::lv2channel</b> <i class="arg">level</i></a></li>
<li><a href="#7"><b class="cmd">::log::lvCompare</b> <i class="arg">level1</i> <i class="arg">level2</i></a></li>
<li><a href="#8"><b class="cmd">::log::lvSuppress</b> <i class="arg">level</i> {<i class="arg">suppress</i> 1}</a></li>
<li><a href="#9"><b class="cmd">::log::lvSuppressLE</b> <i class="arg">level</i> {<i class="arg">suppress</i> 1}</a></li>
<li><a href="#10"><b class="cmd">::log::lvIsSuppressed</b> <i class="arg">level</i></a></li>
<li><a href="#11"><b class="cmd">::log::lvCmd</b> <i class="arg">level</i> <i class="arg">cmd</i></a></li>
<li><a href="#12"><b class="cmd">::log::lvCmdForall</b> <i class="arg">cmd</i></a></li>
<li><a href="#13"><b class="cmd">::log::lvChannel</b> <i class="arg">level</i> <i class="arg">chan</i></a></li>
<li><a href="#14"><b class="cmd">::log::lvChannelForall</b> <i class="arg">chan</i></a></li>
<li><a href="#15"><b class="cmd">::log::lvColor</b> <i class="arg">level</i> <i class="arg">color</i></a></li>
<li><a href="#16"><b class="cmd">::log::lvColorForall</b> <i class="arg">color</i></a></li>
<li><a href="#17"><b class="cmd">::log::log</b> <i class="arg">level</i> <i class="arg">text</i></a></li>
<li><a href="#18"><b class="cmd">::log::logarray</b> <i class="arg">level</i> <i class="arg">arrayvar</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#19"><b class="cmd">::log::loghex</b> <i class="arg">level</i> <i class="arg">text</i> <i class="arg">data</i></a></li>
<li><a href="#20"><b class="cmd">::log::logMsg</b> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd">::log::logError</b> <i class="arg">text</i></a></li>
<li><a href="#22"><b class="cmd">::log::Puts</b> <i class="arg">level</i> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">log</b> package provides commands that allow libraries and
applications to selectively log information about their internal
operation and state.</p>
<p>To use the package just execute</p>
<pre class="doctools_example">
    package require log
    log::log notice &quot;Some message&quot;
</pre>
<p>As can be seen above, each message given to the log facility is
associated with a <em>level</em> determining the importance of the
message. The user can then select which levels to log, what commands
to use for the logging of each level and the channel to write the
message to. In the following example the logging of all message with
level <b class="const">debug</b> is deactivated.</p>
<pre class="doctools_example">
    package require log
    log::lvSuppress debug
    log::log debug &quot;Unseen message&quot; ; # No output
</pre>
<p>By default all messages associated with an error-level
(<b class="const">emergency</b>, <b class="const">alert</b>, <b class="const">critical</b>, and
<b class="const">error</b>) are written to <b class="const">stderr</b>. Messages with any
other level are written to <b class="const">stdout</b>. In the following example
the log module is reconfigured to write <b class="const">debug</b> messages to
<b class="const">stderr</b> too.</p>
<pre class="doctools_example">
    package require log
    log::lvChannel debug stderr
    log::log debug &quot;Written to stderr&quot;
</pre>
<p>Each message level is also associated with a command to use when
logging a message with that level. The behaviour above for example
relies on the fact that all message levels use by default the standard
command <b class="cmd">::log::Puts</b> to log any message. In the following example
all messages of level <b class="const">notice</b> are given to the non-standard
command <b class="cmd">toText</b> for logging. This disables the channel setting
for such messages, assuming that <b class="cmd">toText</b> does not use it by
itself.</p>
<pre class="doctools_example">
    package require log
    log::lvCmd notice toText
    log::log notice &quot;Handled by \&quot;toText\&quot;&quot;
</pre>
<p>Another database maintained by this facility is a map from message
levels to colors. The information in this database has <em>no</em>
influence on the behaviour of the module. It is merely provided as a
convenience and in anticipation of the usage of this facility in
<b class="package">tk</b>-based application which may want to colorize message
logs.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The following commands are available:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::log::levels</b></a></dt>
<dd><p>Returns the names of all known levels, in alphabetical order.</p></dd>
<dt><a name="2"><b class="cmd">::log::lv2longform</b> <i class="arg">level</i></a></dt>
<dd><p>Converts any unique abbreviation of a level name to the full level
name.</p></dd>
<dt><a name="3"><b class="cmd">::log::lv2color</b> <i class="arg">level</i></a></dt>
<dd><p>Converts any level name including unique abbreviations to the
corresponding color.</p></dd>
<dt><a name="4"><b class="cmd">::log::lv2priority</b> <i class="arg">level</i></a></dt>
<dd><p>Converts any level name including unique abbreviations to the
corresponding priority.</p></dd>
<dt><a name="5"><b class="cmd">::log::lv2cmd</b> <i class="arg">level</i></a></dt>
<dd><p>Converts any level name including unique abbreviations to the command
prefix used to write messages with that level.</p></dd>
<dt><a name="6"><b class="cmd">::log::lv2channel</b> <i class="arg">level</i></a></dt>
<dd><p>Converts any level name including unique abbreviations to the channel
used by <b class="cmd">::log::Puts</b> to write messages with that level.</p></dd>
<dt><a name="7"><b class="cmd">::log::lvCompare</b> <i class="arg">level1</i> <i class="arg">level2</i></a></dt>
<dd><p>Compares two levels (including unique abbreviations) with respect to
their priority. This command can be used by the -command option of
lsort. The result is one of -1, 0 or 1 or an error. A result of -1
signals that level1 is of less priority than level2. 0 signals that
both levels have the same priority. 1 signals that level1 has higher
priority than level2.</p></dd>
<dt><a name="8"><b class="cmd">::log::lvSuppress</b> <i class="arg">level</i> {<i class="arg">suppress</i> 1}</a></dt>
<dd><p>]
(Un)suppresses the output of messages having the specified
level. Unique abbreviations for the level are allowed here too.</p></dd>
<dt><a name="9"><b class="cmd">::log::lvSuppressLE</b> <i class="arg">level</i> {<i class="arg">suppress</i> 1}</a></dt>
<dd><p>]
(Un)suppresses the output of messages having the specified level or
one of lesser priority. Unique abbreviations for the level are allowed
here too.</p></dd>
<dt><a name="10"><b class="cmd">::log::lvIsSuppressed</b> <i class="arg">level</i></a></dt>
<dd><p>Asks the package whether the specified level is currently
suppressed. Unique abbreviations of level names are allowed.</p></dd>
<dt><a name="11"><b class="cmd">::log::lvCmd</b> <i class="arg">level</i> <i class="arg">cmd</i></a></dt>
<dd><p>Defines for the specified level with which command to write the
messages having this level. Unique abbreviations of level names are
allowed. The command is actually a command prefix and this facility
will append 2 arguments before calling it, the level of the message
and the message itself, in this order.</p></dd>
<dt><a name="12"><b class="cmd">::log::lvCmdForall</b> <i class="arg">cmd</i></a></dt>
<dd><p>Defines for all known levels with which command to write the messages
having this level. The command is actually a command prefix and this
facility will append 2 arguments before calling it, the level of the
message and the message itself, in this order.</p></dd>
<dt><a name="13"><b class="cmd">::log::lvChannel</b> <i class="arg">level</i> <i class="arg">chan</i></a></dt>
<dd><p>Defines for the specified level into which channel <b class="cmd">::log::Puts</b>
(the standard command) shall write the messages having this
level. Unique abbreviations of level names are allowed. The command is
actually a command prefix and this facility will append 2 arguments
before calling it, the level of the message and the message itself, in
this order.</p></dd>
<dt><a name="14"><b class="cmd">::log::lvChannelForall</b> <i class="arg">chan</i></a></dt>
<dd><p>Defines for all known levels with which which channel
<b class="cmd">::log::Puts</b> (the standard command) shall write the messages
having this level. The command is actually a command prefix and this
facility will append 2 arguments before calling it, the level of the
message and the message itself, in this order.</p></dd>
<dt><a name="15"><b class="cmd">::log::lvColor</b> <i class="arg">level</i> <i class="arg">color</i></a></dt>
<dd><p>Defines for the specified level the color to return for it in a call
to <b class="cmd">::log::lv2color</b>. Unique abbreviations of level names are
allowed.</p></dd>
<dt><a name="16"><b class="cmd">::log::lvColorForall</b> <i class="arg">color</i></a></dt>
<dd><p>Defines for all known levels the color to return for it in a call to
<b class="cmd">::log::lv2color</b>. Unique abbreviations of level names are
allowed.</p></dd>
<dt><a name="17"><b class="cmd">::log::log</b> <i class="arg">level</i> <i class="arg">text</i></a></dt>
<dd><p>Log a message according to the specifications for commands, channels
and suppression. In other words: The command will do nothing if the
specified level is suppressed. If it is not suppressed the actual
logging is delegated to the specified command. If there is no command
specified for the level the message won't be logged. The standard
command <b class="cmd">::log::Puts</b> will write the message to the channel
specified for the given level. If no channel is specified for the
level the message won't be logged. Unique abbreviations of level names
are allowed. Errors in the actual logging command are <em>not</em>
caught, but propagated to the caller, as they may indicate
misconfigurations of the log facility or errors in the callers code
itself.</p></dd>
<dt><a name="18"><b class="cmd">::log::logarray</b> <i class="arg">level</i> <i class="arg">arrayvar</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Like <b class="cmd">::log::log</b>, but logs the contents of the specified array
variable <i class="arg">arrayvar</i>, possibly restricted to entries matching the
<i class="arg">pattern</i>. The pattern defaults to <b class="const">*</b> (i.e. all entries) if
none was specified.</p></dd>
<dt><a name="19"><b class="cmd">::log::loghex</b> <i class="arg">level</i> <i class="arg">text</i> <i class="arg">data</i></a></dt>
<dd><p>Like <b class="cmd">::log::log</b>, but assumes that <i class="arg">data</i> contains binary
data. It converts this into a mixed hex/ascii representation before
writing them to the log.</p></dd>
<dt><a name="20"><b class="cmd">::log::logMsg</b> <i class="arg">text</i></a></dt>
<dd><p>Convenience wrapper around <b class="cmd">::log::log</b>.
Equivalent to <b class="cmd">::log::log info text</b>.</p></dd>
<dt><a name="21"><b class="cmd">::log::logError</b> <i class="arg">text</i></a></dt>
<dd><p>Convenience wrapper around <b class="cmd">::log::log</b>.
Equivalent to <b class="cmd">::log::log error text</b>.</p></dd>
<dt><a name="22"><b class="cmd">::log::Puts</b> <i class="arg">level</i> <i class="arg">text</i></a></dt>
<dd><p>The standard log command, it writes messages and their levels to
user-specified channels. Assumes that the suppression checks were done
by the caller. Expects full level names, abbreviations are
<em>not allowed</em>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LEVELS</a></h2>
<p>The package currently defines the following log levels, the level of
highest importance listed first.</p>
<ul class="doctools_itemized">
<li><p>emergency</p></li>
<li><p>alert</p></li>
<li><p>critical</p></li>
<li><p>error</p></li>
<li><p>warning</p></li>
<li><p>notice</p></li>
<li><p>info</p></li>
<li><p>debug</p></li>
</ul>
<p><em>Note</em> that by default all messages with levels <b class="const">warning</b> down to
<b class="const">debug</b> are suppressed. This is done intentionally, because (we believe
that) in most situations debugging output is not wanted. Most people wish to
have such output only when actually debugging an application.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>log</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key91">log level</a>, <a href="../../../../index.html#key361">message</a>, <a href="../../../../index.html#key799">message level</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2001-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/log/logger.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469

<div class='fossil-doc' data-title='logger - Object Oriented logging facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">logger(n) 0.9.4 tcllib &quot;Object Oriented logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>logger - System to control logging of events.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">IMPLEMENTATION</a></li>
<li class="doctools_section"><a href="#section3">Logprocs and Callstack</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">logger <span class="opt">?0.9.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">logger::init</b> <i class="arg">service</i></a></li>
<li><a href="#2"><b class="cmd">logger::import</b> <span class="opt">?<b class="option">-all</b>?</span> <span class="opt">?<b class="option">-force</b>?</span> <span class="opt">?<b class="option">-prefix</b> <i class="arg">prefix</i>?</span> <span class="opt">?<b class="option">-namespace</b> <i class="arg">namespace</i>?</span> <i class="arg">service</i></a></li>
<li><a href="#3"><b class="cmd">logger::initNamespace</b> <i class="arg">ns</i> <span class="opt">?<i class="arg">level</i>?</span></a></li>
<li><a href="#4"><b class="cmd">logger::services</b></a></li>
<li><a href="#5"><b class="cmd">logger::enable</b> <i class="arg">level</i></a></li>
<li><a href="#6"><b class="cmd">logger::disable</b> <i class="arg">level</i></a></li>
<li><a href="#7"><b class="cmd">logger::setlevel</b> <i class="arg">level</i></a></li>
<li><a href="#8"><b class="cmd">logger::levels</b></a></li>
<li><a href="#9"><b class="cmd">logger::servicecmd</b> <i class="arg">service</i></a></li>
<li><a href="#10"><b class="cmd">${log}::debug</b> <i class="arg">message</i></a></li>
<li><a href="#11"><b class="cmd">${log}::info</b> <i class="arg">message</i></a></li>
<li><a href="#12"><b class="cmd">${log}::notice</b> <i class="arg">message</i></a></li>
<li><a href="#13"><b class="cmd">${log}::warn</b> <i class="arg">message</i></a></li>
<li><a href="#14"><b class="cmd">${log}::error</b> <i class="arg">message</i></a></li>
<li><a href="#15"><b class="cmd">${log}::critical</b> <i class="arg">message</i></a></li>
<li><a href="#16"><b class="cmd">${log}::alert</b> <i class="arg">message</i></a></li>
<li><a href="#17"><b class="cmd">${log}::emergency</b> <i class="arg">message</i></a></li>
<li><a href="#18"><b class="cmd">${log}::setlevel</b> <i class="arg">level</i></a></li>
<li><a href="#19"><b class="cmd">${log}::enable</b> <i class="arg">level</i></a></li>
<li><a href="#20"><b class="cmd">${log}::disable</b> <i class="arg">level</i></a></li>
<li><a href="#21"><b class="cmd">${log}::lvlchangeproc</b> <i class="arg">command</i></a></li>
<li><a href="#22"><b class="cmd">${log}::lvlchangeproc</b></a></li>
<li><a href="#23"><b class="cmd">${log}::logproc</b> <i class="arg">level</i></a></li>
<li><a href="#24"><b class="cmd">${log}::logproc</b> <i class="arg">level</i> <i class="arg">command</i></a></li>
<li><a href="#25"><b class="cmd">${log}::logproc</b> <i class="arg">level</i> <i class="arg">argname</i> <i class="arg">body</i></a></li>
<li><a href="#26"><b class="cmd">${log}::services</b></a></li>
<li><a href="#27"><b class="cmd">${log}::servicename</b></a></li>
<li><a href="#28"><b class="cmd">${log}::currentloglevel</b></a></li>
<li><a href="#29"><b class="cmd">${log}::delproc</b> <i class="arg">command</i></a></li>
<li><a href="#30"><b class="cmd">${log}::delproc</b></a></li>
<li><a href="#31"><b class="cmd">${log}::delete</b></a></li>
<li><a href="#32"><b class="cmd">${log}::trace</b> <i class="arg">command</i></a></li>
<li><a href="#33"><b class="cmd">${log}::trace</b> <b class="cmd">on</b></a></li>
<li><a href="#34"><b class="cmd">${log}::trace</b> <b class="cmd">off</b></a></li>
<li><a href="#35"><b class="cmd">${log}::trace</b> <b class="cmd">status</b> <span class="opt">?procName?</span> <span class="opt">?...?</span></a></li>
<li><a href="#36"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <i class="arg">procName</i> <span class="opt">?...?</span></a></li>
<li><a href="#37"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></li>
<li><a href="#38"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">procName</i> <span class="opt">?...?</span></a></li>
<li><a href="#39"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">logger</b> package provides a flexible system for logging messages
from different services, at priority levels, with different commands.</p>
<p>To begin using the logger package, we do the following:</p>
<pre class="doctools_example">
    package require logger
    set log [logger::init myservice]
    ${log}::notice &quot;Initialized myservice logging&quot;
    ... code ...
    ${log}::notice &quot;Ending myservice logging&quot;
    ${log}::delete
</pre>
<p>In the above code, after the package is loaded, the following things
happen:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">logger::init</b> <i class="arg">service</i></a></dt>
<dd><p>Initializes the service <i class="arg">service</i> for logging.  The service names
are actually Tcl namespace names, so they are separated with '::'.
The service name may not be the empty string or only ':'s.
When a logger service is initialized, it &quot;inherits&quot; properties from its
parents.  For instance, if there were a service <i class="term">foo</i>, and
we did a <b class="cmd">logger::init</b> <i class="arg">foo::bar</i> (to create a <i class="term">bar</i>
service underneath <i class="term">foo</i>), <i class="term">bar</i> would copy the current
configuration of the <i class="term">foo</i> service, although it would of
course, also be possible to then separately configure <i class="term">bar</i>.
If a logger service is initialized and the parent does not yet exist, the
parent is also created.
The new logger service is initialized with the default loglevel set
with <b class="cmd">logger::setlevel</b>.</p></dd>
<dt><a name="2"><b class="cmd">logger::import</b> <span class="opt">?<b class="option">-all</b>?</span> <span class="opt">?<b class="option">-force</b>?</span> <span class="opt">?<b class="option">-prefix</b> <i class="arg">prefix</i>?</span> <span class="opt">?<b class="option">-namespace</b> <i class="arg">namespace</i>?</span> <i class="arg">service</i></a></dt>
<dd><p>Import the logger service commands into the current namespace. Without the <b class="option">-all</b> option
only the commands corresponding to the log levels are imported. If <b class="option">-all</b> is given,
all the <b class="cmd">${log}::cmd</b> style commands are imported. If the import would overwrite a command
an error is returned and no command is imported. Use the <b class="option">-force</b> option to force the import
and overwrite existing commands without complaining.
If the <b class="option">-prefix</b> option is given, the commands are imported with the given <i class="arg">prefix</i>
prepended to their names.
If the <b class="option">-namespace</b> option is given, the commands are imported into the given namespace. If the
namespace does not exist, it is created. If a namespace without a leading :: is given, it is interpreted as
a child namespace to the current namespace.</p></dd>
<dt><a name="3"><b class="cmd">logger::initNamespace</b> <i class="arg">ns</i> <span class="opt">?<i class="arg">level</i>?</span></a></dt>
<dd><p>Convenience command for setting up a namespace for logging. Creates a
logger service named after the namespace <i class="arg">ns</i> (a :: prefix is
stripped), imports all the log commands into the namespace, and sets
the default logging level, either as specified by <i class="arg">level</i>, or
inherited from a service in the parent namespace, or a hardwired
default, <b class="const">warn</b>.</p></dd>
<dt><a name="4"><b class="cmd">logger::services</b></a></dt>
<dd><p>Returns a list of all the available services.</p></dd>
<dt><a name="5"><b class="cmd">logger::enable</b> <i class="arg">level</i></a></dt>
<dd><p>Globally enables logging at and &quot;above&quot; the given level.  Levels are
<b class="const">debug</b>, <b class="const">info</b>, <b class="const">notice</b>, <b class="const">warn</b>, <b class="const">error</b>,
<b class="const">critical</b>, <b class="const">alert</b>, <b class="const">emergency</b>.</p></dd>
<dt><a name="6"><b class="cmd">logger::disable</b> <i class="arg">level</i></a></dt>
<dd><p>Globally disables logging at and &quot;below&quot; the given level.  Levels are
those listed above.</p></dd>
<dt><a name="7"><b class="cmd">logger::setlevel</b> <i class="arg">level</i></a></dt>
<dd><p>Globally enable logging at and &quot;above&quot; the given level. Levels are those
listed above. This command changes the default loglevel for new loggers
created with <b class="cmd">logger::init</b>.</p></dd>
<dt><a name="8"><b class="cmd">logger::levels</b></a></dt>
<dd><p>Returns a list of the available log levels (also listed above under <b class="cmd">enable</b>).</p></dd>
<dt><a name="9"><b class="cmd">logger::servicecmd</b> <i class="arg">service</i></a></dt>
<dd><p>Returns the <b class="cmd">${log}</b> token created by <b class="cmd">logger::init</b> for this service.</p></dd>
<dt><a name="10"><b class="cmd">${log}::debug</b> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="11"><b class="cmd">${log}::info</b> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="12"><b class="cmd">${log}::notice</b> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="13"><b class="cmd">${log}::warn</b> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="14"><b class="cmd">${log}::error</b> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="15"><b class="cmd">${log}::critical</b> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="16"><b class="cmd">${log}::alert</b> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="17"><b class="cmd">${log}::emergency</b> <i class="arg">message</i></a></dt>
<dd><p>These are the commands called to actually log a message about an
event.  <b class="variable">${log}</b> is the variable obtained from <b class="cmd">logger::init</b>.</p></dd>
<dt><a name="18"><b class="cmd">${log}::setlevel</b> <i class="arg">level</i></a></dt>
<dd><p>Enable logging, in the service referenced by <b class="variable">${log}</b>, and its
children, at and above the level specified, and disable logging below
it.</p></dd>
<dt><a name="19"><b class="cmd">${log}::enable</b> <i class="arg">level</i></a></dt>
<dd><p>Enable logging, in the service referenced by <b class="variable">${log}</b>, and its
children, at and above the level specified.  Note that this does <em>not</em> disable logging below this level, so you should probably use
<b class="cmd">setlevel</b> instead.</p></dd>
<dt><a name="20"><b class="cmd">${log}::disable</b> <i class="arg">level</i></a></dt>
<dd><p>Disable logging, in the service referenced by <b class="variable">${log}</b>, and its
children, at and below the level specified. Note that this does <em>not</em> enable logging above this level,
so you should probably use <b class="cmd">setlevel</b> instead.
Disabling the loglevel <b class="const">emergency</b> switches logging off for the service and its children.</p></dd>
<dt><a name="21"><b class="cmd">${log}::lvlchangeproc</b> <i class="arg">command</i></a></dt>
<dd></dd>
<dt><a name="22"><b class="cmd">${log}::lvlchangeproc</b></a></dt>
<dd><p>Set the script to call when the log instance in question changes its log level.
If called without a command it returns the currently registered command. The command gets two arguments
appended, the old and the new loglevel. The callback is invoked after all changes have been done.
If child loggers are affected, their callbacks are called before their parents callback.</p>
<pre class="doctools_example">
 	proc lvlcallback {old new} {
 	    puts &quot;Loglevel changed from $old to $new&quot;
 	}
 	${log}::lvlchangeproc lvlcallback
 </pre>
</dd>
<dt><a name="23"><b class="cmd">${log}::logproc</b> <i class="arg">level</i></a></dt>
<dd></dd>
<dt><a name="24"><b class="cmd">${log}::logproc</b> <i class="arg">level</i> <i class="arg">command</i></a></dt>
<dd></dd>
<dt><a name="25"><b class="cmd">${log}::logproc</b> <i class="arg">level</i> <i class="arg">argname</i> <i class="arg">body</i></a></dt>
<dd><p>This command comes in three forms - the third, older one is deprecated
and may be removed from future versions of the logger package.
The current set version takes one argument, a command to be executed when the
level is called.  The callback command takes on argument, the text to
be logged. If called only with a valid level <b class="cmd">logproc</b> returns the name of the command
currently registered as callback command.
<b class="cmd">logproc</b> specifies which command will perform the actual logging
for a given level.  The logger package ships with default commands for
all log levels, but with <b class="cmd">logproc</b> it is possible to replace them
with custom code.  This would let you send your logs over the network,
to a database, or anything else.  For example:</p>
<pre class="doctools_example">
    proc logtoserver {txt} {
        variable socket
        puts $socket &quot;Notice: $txt&quot;
    }
    ${log}::logproc notice logtoserver
</pre>
<p>Trace logs are slightly different: instead of a plain text argument,
the argument provided to the logproc is a dictionary consisting of the
<b class="const">enter</b> or <b class="const">leave</b> keyword along with another dictionary of
details about the trace.  These include:</p>
<ul class="doctools_itemized">
<li><p><b class="const">proc</b> - Name of the procedure being traced.</p></li>
<li><p><b class="const">level</b> - The stack level for the procedure invocation
(from <b class="cmd"><a href="../../../../index.html#key83">info</a></b> <b class="cmd">level</b>).</p></li>
<li><p><b class="const">script</b> - The name of the file in which the procedure is
defined, or an empty string if defined in interactive mode.</p></li>
<li><p><b class="const">caller</b> - The name of the procedure calling the procedure
being traced, or an empty string if the procedure was called from the
global scope (stack level 0).</p></li>
<li><p><b class="const">procargs</b> - A dictionary consisting of the names of arguments
to the procedure paired with values given for those arguments (<b class="const">enter</b>
traces only).</p></li>
<li><p><b class="const">status</b> - The Tcl return code (e.g. <b class="const">ok</b>,
<b class="const">continue</b>, etc.) (<b class="const">leave</b> traces only).</p></li>
<li><p><b class="const">result</b> - The value returned by the procedure (<b class="const">leave</b>
traces only).</p></li>
</ul></dd>
<dt><a name="26"><b class="cmd">${log}::services</b></a></dt>
<dd><p>Returns a list of the registered logging services which are children of this service.</p></dd>
<dt><a name="27"><b class="cmd">${log}::servicename</b></a></dt>
<dd><p>Returns the name of this service.</p></dd>
<dt><a name="28"><b class="cmd">${log}::currentloglevel</b></a></dt>
<dd><p>Returns the currently enabled log level for this service. If no logging is enabled returns <b class="const">none</b>.</p></dd>
<dt><a name="29"><b class="cmd">${log}::delproc</b> <i class="arg">command</i></a></dt>
<dd></dd>
<dt><a name="30"><b class="cmd">${log}::delproc</b></a></dt>
<dd><p>Set the script to call when the log instance in question is deleted.
If called without a command it returns the currently registered command.
For example:</p>
<pre class="doctools_example">
    ${log}::delproc [list closesock $logsock]
</pre>
</dd>
<dt><a name="31"><b class="cmd">${log}::delete</b></a></dt>
<dd><p>This command deletes a particular logging service, and its children.
You must call this to clean up the resources used by a service.</p></dd>
<dt><a name="32"><b class="cmd">${log}::trace</b> <i class="arg">command</i></a></dt>
<dd><p>This command controls logging of enter/leave traces for specified procedures.
It is used to enable and disable tracing, query tracing status, and
specify procedures are to be traced.  Trace handlers are unregistered when
tracing is disabled.  As a result, there is not performance impact to a
library when tracing is disabled, just as with other log level commands.</p>
<pre class="doctools_example">
  proc tracecmd { dict } {
      puts $dict
  }
  set log [::logger::init example]
  ${log}::logproc trace tracecmd
  proc foo { args } {
      puts &quot;In foo&quot;
      bar 1
      return &quot;foo_result&quot;
  }
  proc bar { x } {
      puts &quot;In bar&quot;
      return &quot;bar_result&quot;
  }
  ${log}::trace add foo bar
  ${log}::trace on
  foo
# Output:
enter {proc ::foo level 1 script {} caller {} procargs {args {}}}
In foo
enter {proc ::bar level 2 script {} caller ::foo procargs {x 1}}
In bar
leave {proc ::bar level 2 script {} caller ::foo status ok result bar_result}
leave {proc ::foo level 1 script {} caller {} status ok result foo_result}
</pre>
</dd>
<dt><a name="33"><b class="cmd">${log}::trace</b> <b class="cmd">on</b></a></dt>
<dd><p>Turns on trace logging for procedures registered through the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b>
<b class="cmd">add</b> command.  This is similar to the <b class="cmd">enable</b> command for other
logging levels, but allows trace logging to take place at any level.
The trace logging mechanism takes advantage of the execution trace feature
of Tcl 8.4 and later.  The <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> <b class="cmd">on</b> command will return an
error if called from earlier versions of Tcl.</p></dd>
<dt><a name="34"><b class="cmd">${log}::trace</b> <b class="cmd">off</b></a></dt>
<dd><p>Turns off trace logging for procedures registered for trace logging
through the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> <b class="cmd">add</b> command.  This is similar to the
<b class="cmd">disable</b> command for other logging levels, but allows trace logging
to take place at any level.
Procedures are not unregistered, so logging for them can be turned back
on with the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> <b class="cmd">on</b> command.  There is no overhead imposed
by trace registration when trace logging is disabled.</p></dd>
<dt><a name="35"><b class="cmd">${log}::trace</b> <b class="cmd">status</b> <span class="opt">?procName?</span> <span class="opt">?...?</span></a></dt>
<dd><p>This command returns a list of the procedures currently registered for
trace logging, or a flag indicating whether or not a trace is registered
for one or more specified procedures.</p></dd>
<dt><a name="36"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <i class="arg">procName</i> <span class="opt">?...?</span></a></dt>
<dd></dd>
<dt><a name="37"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></dt>
<dd><p>This command registers one or more procedures for logging of entry/exit
traces.  Procedures can be specified via a list of procedure names or
namespace names (in which case all procedure within the namespace
are targeted by the operation).  By default, each name is first
interpreted as a procedure name or glob-style search pattern, and if
not found its interpreted as a namespace name.  The <i class="arg">-ns</i> option can
be used to force interpretation of all provided arguments as namespace names.
Procedures must be defined prior to registering them for tracing
through the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> <b class="cmd">add</b> command.  Any procedure or namespace
names/patterns that don't match any existing procedures will be
silently ignored.</p></dd>
<dt><a name="38"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">procName</i> <span class="opt">?...?</span></a></dt>
<dd></dd>
<dt><a name="39"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></dt>
<dd><p>This command unregisters one or more procedures so that they will no
longer have trace logging performed, with the same matching rules as
that of the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> <b class="cmd">add</b> command.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">IMPLEMENTATION</a></h2>
<p>The logger package is implemented in such a way as to optimize (for
Tcl 8.4 and newer) log procedures which are disabled.  They are
aliased to a proc which has no body, which is compiled to a no op in
bytecode.  This should make the peformance hit minimal.  If you really
want to pull out all the stops, you can replace the ${log} token in
your code with the actual namespace and command (${log}::warn becomes
::logger::tree::myservice::warn), so that no variable lookup is done.
This puts the performance of disabled logger commands very close to no
logging at all.</p>
<p>The &quot;object orientation&quot; is done through a hierarchy of namespaces.
Using an actual object oriented system would probably be a better way
of doing things, or at least provide for a cleaner implementation.</p>
<p>The service &quot;object orientation&quot; is done with namespaces.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Logprocs and Callstack</a></h2>
<p>The logger package takes extra care to keep the logproc out of the call stack.
This enables logprocs to execute code in the callers scope by using uplevel or
linking to local variables by using upvar. This may fire traces with all usual
side effects.</p>
<pre class="doctools_example">
     # Print caller and current vars in the calling proc
     proc log_local_var {txt} {
          set caller [info level -1]
          set vars [uplevel 1 info vars]
          foreach var [lsort $vars] {
             if {[uplevel 1 [list array exists $var]] == 1} {
             	lappend val $var &lt;Array&gt;
             } else {
             	lappend val $var [uplevel 1 [list set $var]]
             }
          }
          puts &quot;$txt&quot;
          puts &quot;Caller: $caller&quot;
          puts &quot;Variables in callers scope:&quot;
          foreach {var value} $val {
          	puts &quot;$var = $value&quot;
          }
     }
     # install as logproc
     ${log}::logproc debug log_local_var
     </pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>logger</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key91">log level</a>, <a href="../../../../index.html#key89">logger</a>, <a href="../../../../index.html#key90">service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/log/loggerAppender.html.























































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

<div class='fossil-doc' data-title='logger::appender - Object Oriented logging facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">logger::appender(n) 1.2 tcllib &quot;Object Oriented logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>logger::appender - Collection of predefined appenders for logger</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">logger::appender <span class="opt">?1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::logger::appender::console</b> <b class="option">-level</b> <i class="arg">level</i> <b class="option">-service</b> <i class="arg">service</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::logger::appender::colorConsole</b> <b class="option">-level</b> <i class="arg">level</i> <b class="option">-service</b> <i class="arg">service</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a predefined set of logger templates.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::logger::appender::console</b> <b class="option">-level</b> <i class="arg">level</i> <b class="option">-service</b> <i class="arg">service</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><dl class="doctools_options">
<dt><b class="option">-level</b> level</dt>
<dd><p>Name of the level to fill in as &quot;priority&quot; in the log procedure.</p></dd>
<dt><b class="option">-service</b> service</dt>
<dd><p>Name of the service to fill in as &quot;category&quot; in the log procedure.</p></dd>
<dt><b class="option">-appenderArgs</b> appenderArgs</dt>
<dd><p>Any additional arguments for the log procedure in list form</p></dd>
<dt><b class="option">-conversionPattern</b> conversionPattern</dt>
<dd><p>The log pattern to use (see <b class="cmd">logger::utils::createLogProc</b> for the
allowed substitutions).</p></dd>
<dt><b class="option">-procName</b> procName</dt>
<dd><p>Explicitly set the name of the created procedure.</p></dd>
<dt><b class="option">-procNameVar</b> procNameVar</dt>
<dd><p>Name of the variable to set in the calling context. This variable will
contain the name of the procedure.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::logger::appender::colorConsole</b> <b class="option">-level</b> <i class="arg">level</i> <b class="option">-service</b> <i class="arg">service</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>See <b class="cmd">::logger::appender::colorConsole</b> for a description of the
applicable options.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>logger</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key409">appender</a>, <a href="../../../../index.html#key89">logger</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/log/loggerUtils.html.

































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240

<div class='fossil-doc' data-title='logger::utils - Object Oriented logging facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">logger::utils(n) 1.3 tcllib &quot;Object Oriented logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>logger::utils - Utilities for logger</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">logger::utils <span class="opt">?1.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::logger::utils::createFormatCmd</b> <i class="arg">formatString</i></a></li>
<li><a href="#2"><b class="cmd">::logger::utils::createLogProc</b> <b class="option">-procName</b> <i class="arg">procName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::logger::utils::applyAppender</b> <b class="option">-appender</b> <i class="arg">appenderType</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#4"><b class="cmd">::logger::utils::autoApplyAppender</b> <i class="arg">command</i> <i class="arg">command-string</i> <i class="arg">log</i> <i class="arg">op</i> <i class="arg">args</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package adds template based <i class="term">appenders</i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::logger::utils::createFormatCmd</b> <i class="arg">formatString</i></a></dt>
<dd><p>This command translates <i class="arg">formatString</i> into an expandable command
string.
The following strings are the known substitutions (from log4perl)
allowed to occur in the <i class="arg">formatString</i>:</p>
<dl class="doctools_definitions">
<dt>%c</dt>
<dd><p>Category of the logging event</p></dd>
<dt>%C</dt>
<dd><p>Fully qualified name of logging event</p></dd>
<dt>%d</dt>
<dd><p>Current date in yyyy/MM/dd hh:mm:ss</p></dd>
<dt>%H</dt>
<dd><p>Hostname</p></dd>
<dt>%m</dt>
<dd><p>Message to be logged</p></dd>
<dt>%M</dt>
<dd><p>Method where logging event was issued</p></dd>
<dt>%p</dt>
<dd><p>Priority of logging event</p></dd>
<dt>%P</dt>
<dd><p>Pid of current process</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::logger::utils::createLogProc</b> <b class="option">-procName</b> <i class="arg">procName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command ...</p>
<dl class="doctools_options">
<dt><b class="option">-procName</b> procName</dt>
<dd><p>The name of the procedure to create.</p></dd>
<dt><b class="option">-conversionPattern</b> pattern</dt>
<dd><p>See <b class="cmd">::logger::utils::createFormatCmd</b> for the substitutions
allowed in the <i class="arg">pattern</i>.</p></dd>
<dt><b class="option">-category</b> category</dt>
<dd><p>The category (service).</p></dd>
<dt><b class="option">-priority</b> priority</dt>
<dd><p>The priority (level).</p></dd>
<dt><b class="option">-outputChannel</b> channel</dt>
<dd><p>channel to output on (default stdout)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::logger::utils::applyAppender</b> <b class="option">-appender</b> <i class="arg">appenderType</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command will create an appender for the specified logger
services. If no service is specified then the appender will be added
as the default appender for the specified levels. If no levels are
specified, then all levels are assumed.</p>
<dl class="doctools_options">
<dt><b class="option">-service</b> loggerservices</dt>
<dd></dd>
<dt><b class="option">-serviceCmd</b> loggerserviceCmds</dt>
<dd><p>Name of the logger instance to modify. <b class="option">-serviceCmd</b> takes as
input the return of <b class="cmd">logger::init</b>.</p></dd>
<dt><b class="option">-appender</b> appenderType</dt>
<dd><p>Type of the appender to use.
One of <b class="const">console</b>, <b class="const">colorConsole</b>.</p></dd>
<dt><b class="option">-appenderArgs</b> appenderArgs</dt>
<dd><p>Additional arguments to apply to the appender.
The argument of the option is a list of options
and their arguments.</p>
<p>For example</p>
<pre class="doctools_example">
logger::utils::applyAppender -serviceCmd $log -appender console -appenderArgs {-conversionPattern {\[%M\] \[%p\] - %m}}
</pre>
<p>The usual Tcl quoting rules apply.</p></dd>
<dt><b class="option">-levels</b> levelList</dt>
<dd><p>The list of levels to apply this appender to. If not specified all
levels are assumed.</p></dd>
</dl>
<p>Example of usage:</p>
<pre class="doctools_example">
   % set log [logger::init testLog]
   ::logger::tree::testLog
   % logger::utils::applyAppender -appender console -serviceCmd $log
   % ${log}::error &quot;this is an error&quot;
   [2005/08/22 10:14:13] [testLog] [global] [error] this is an error
</pre>
</dd>
<dt><a name="4"><b class="cmd">::logger::utils::autoApplyAppender</b> <i class="arg">command</i> <i class="arg">command-string</i> <i class="arg">log</i> <i class="arg">op</i> <i class="arg">args</i>...</a></dt>
<dd><p>This command is designed to be added via <b class="cmd">trace leave</b> to calls
of <b class="cmd">logger::init</b>. It will look at preconfigured state (via
<b class="cmd">::logger::utils::applyAppender</b>) to autocreate appenders for
newly created logger instances.
It will return its argument <i class="arg">log</i>.</p>
<p>Example of usage:</p>
<pre class="doctools_example">
  logger::utils::applyAppender -appender console
  set log [logger::init applyAppender-3]
  ${log}::error &quot;this is an error&quot;
</pre>
</dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>logger</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key409">appender</a>, <a href="../../../../index.html#key89">logger</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/map/map_geocode_nominatim.html.

























































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220

<div class='fossil-doc' data-title='map::geocode::nominatim - Mapping utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::geocode::nominatim(n) 0.1 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::geocode::nominatim - Resolving geographical names with a Nominatim service</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Options</a></li>
<li class="doctools_subsection"><a href="#subsection2">Methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">References</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">http</b></li>
<li>package require <b class="pkgname">json</b></li>
<li>package require <b class="pkgname">uri</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">map::geocode::nominatim <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::map::geocode::nominatim</b> <i class="arg">requestor</i> <span class="opt">?<b class="option">-baseurl</b> <i class="arg">url</i>?</span> <span class="opt">?<b class="option">-callback</b> <i class="arg">callback</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">error callback</i>?</span></a></li>
<li><a href="#2"><b class="cmd">$cmdprefix</b> <i class="arg">result</i></a></li>
<li><a href="#3"><b class="cmd">$cmdprefix</b> <i class="arg">errorstring</i></a></li>
<li><a href="#4"><i class="arg">requestor</i> <b class="method">search</b> <i class="arg">query</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for accessing geocoding services which implement
the <i class="term"><a href="../../../../index.html#key583">Nominatim</a></i> interface (see <span class="sectref"><a href="#section3">References</a></span>)</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::map::geocode::nominatim</b> <i class="arg">requestor</i> <span class="opt">?<b class="option">-baseurl</b> <i class="arg">url</i>?</span> <span class="opt">?<b class="option">-callback</b> <i class="arg">callback</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">error callback</i>?</span></a></dt>
<dd><p>Creates a geocoding request object <i class="arg">requestor</i>, which will send its requests to
the <i class="term"><a href="../../../../index.html#key583">Nominatim</a></i> server.</p>
<p>The result of the command is <i class="arg">name</i>.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Options</a></h3>
<dl class="doctools_options">
<dt><b class="option">-baseurl</b> <i class="arg">url</i></dt>
<dd><p>The base URL of the <i class="term"><a href="../../../../index.html#key583">Nominatim</a></i> service. Default value is <i class="term">OpenStreetMap's</i> service at
<a href="http://nominatim.openstreetmap.org/search">http://nominatim.openstreetmap.org/search</a> A possible free alternative is at
<a href="http://open.mapquestapi.com//nominatim/v1/search">http://open.mapquestapi.com//nominatim/v1/search</a></p></dd>
<dt><b class="option">-callback</b> <i class="arg">cmdprefix</i></dt>
<dd><p>A command prefix to be invoked when search result become available.
The default setting, active when nothing was specified on object creation, is to print
the <i class="arg">result</i> (see below) to <i class="term"><a href="../../../../index.html#key829">stdout</a></i>. The result of the command prefix is
ignored. Errors thrown by the command prefix are caught and cause the invokation of
the error callback (see option <b class="option">-error</b> below), with the error message as argument.</p>
<p>The signature of the command prefix is:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">$cmdprefix</b> <i class="arg">result</i></a></dt>
<dd><p>The <i class="arg">result</i> is a list of dictionaries, containing one item per hit.
Each dictionary will have the following entries:</p>
<dl class="doctools_definitions">
<dt>place_id</dt>
<dd><p>The place ID (FIXME: what's this?)</p></dd>
<dt>licence</dt>
<dd><p>The data licence string</p></dd>
<dt>osm_type</dt>
<dd><p>The OSM type of the location</p></dd>
<dt>osm_id</dt>
<dd><p>FIXME</p></dd>
<dt>boundingbox</dt>
<dd><p>The coordinates of the bounding box (min and max latitude, min and max longitude)</p></dd>
<dt>lat</dt>
<dd><p>The location's latitude</p></dd>
<dt>lon</dt>
<dd><p>The location's longitude</p></dd>
<dt>display_name</dt>
<dd><p>the location's human readable name</p></dd>
<dt>class</dt>
<dd><p>FIXME</p></dd>
<dt>type</dt>
<dd><p>FIXME</p></dd>
<dt>icon</dt>
<dd><p>FIXME</p></dd>
</dl></dd>
</dl></dd>
<dt><b class="option">-error</b> <i class="arg">cmdprefix</i></dt>
<dd><p>A command prefix to be invoked when encountering errors. Typically these are HTTP errors.
The default setting, active when nothing was specified on object creation, is to print
the <i class="arg">errorstring</i> (see below) to <i class="term">stderr</i>. The result of the command prefix is
ignored. Errors thrown by the command prefix are passed to higher levels.</p>
<p>The signature of the command prefix is:</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">$cmdprefix</b> <i class="arg">errorstring</i></a></dt>
<dd></dd>
</dl></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="4"><i class="arg">requestor</i> <b class="method">search</b> <i class="arg">query</i></a></dt>
<dd><p>This method returns a list of dictionaries, one item per hit for the specified <i class="arg">query</i>.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Nominatim">http://wiki.openstreetmap.org/wiki/Nominatim</a></p></li>
<li><p><a href="http://open.mapquestapi.com/nominatim/">http://open.mapquestapi.com/nominatim/</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key584">geocoding</a>, <a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key200">location</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key583">nominatim</a>, <a href="../../../../index.html#key65">server</a>, <a href="../../../../index.html#key246">url</a></p>
</div>
</div>

Added embedded/www/tcllib/files/modules/map/map_slippy.html.













































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278

<div class='fossil-doc' data-title='map::slippy - Mapping utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::slippy(n) 0.5 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::slippy - Common code for slippy based map packages</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Coordinate systems</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Geographic</a></li>
<li class="doctools_subsection"><a href="#subsection2">Tiles</a></li>
<li class="doctools_subsection"><a href="#subsection3">Pixels/Points</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">References</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">Tk 8.4</b></li>
<li>package require <b class="pkgname">map::slippy <span class="opt">?0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::map::slippy</b> <b class="method">length</b> <i class="arg">level</i></a></li>
<li><a href="#2"><b class="cmd">::map::slippy</b> <b class="method">tiles</b> <i class="arg">level</i></a></li>
<li><a href="#3"><b class="cmd">::map::slippy</b> <b class="method">tile size</b></a></li>
<li><a href="#4"><b class="cmd">::map::slippy</b> <b class="method">tile valid</b> <i class="arg">tile</i> <i class="arg">levels</i> <span class="opt">?<i class="arg">msgvar</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::map::slippy</b> <b class="method">geo 2tile</b> <i class="arg">geo</i></a></li>
<li><a href="#6"><b class="cmd">::map::slippy</b> <b class="method">geo 2tile.float</b> <i class="arg">geo</i></a></li>
<li><a href="#7"><b class="cmd">::map::slippy</b> <b class="method">geo 2point</b> <i class="arg">geo</i></a></li>
<li><a href="#8"><b class="cmd">::map::slippy</b> <b class="method">tile 2geo</b> <i class="arg">tile</i></a></li>
<li><a href="#9"><b class="cmd">::map::slippy</b> <b class="method">tile 2point</b> <i class="arg">tile</i></a></li>
<li><a href="#10"><b class="cmd">::map::slippy</b> <b class="method">point 2geo</b> <i class="arg">point</i></a></li>
<li><a href="#11"><b class="cmd">::map::slippy</b> <b class="method">point 2tile</b> <i class="arg">point</i></a></li>
<li><a href="#12"><b class="cmd">::map::slippy</b> <b class="method">fit geobox</b> <i class="arg">canvdim</i> <i class="arg">geobox</i> <i class="arg">zmin</i> <i class="arg">zmax</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a number of methods doing things needed by all
types of slippy-based map packages.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::map::slippy</b> <b class="method">length</b> <i class="arg">level</i></a></dt>
<dd><p>This method returns the width/height of a slippy-based map at the
specified zoom <i class="arg">level</i>, in pixels. This is, in essence, the result
of</p>
<pre class="doctools_example">
	expr { [tiles $level] * [tile size] }
</pre>
</dd>
<dt><a name="2"><b class="cmd">::map::slippy</b> <b class="method">tiles</b> <i class="arg">level</i></a></dt>
<dd><p>This method returns the width/height of a slippy-based map at the
specified zoom <i class="arg">level</i>, in <i class="term">tiles</i>.</p></dd>
<dt><a name="3"><b class="cmd">::map::slippy</b> <b class="method">tile size</b></a></dt>
<dd><p>This method returns the width/height of a tile in a slippy-based map,
in pixels.</p></dd>
<dt><a name="4"><b class="cmd">::map::slippy</b> <b class="method">tile valid</b> <i class="arg">tile</i> <i class="arg">levels</i> <span class="opt">?<i class="arg">msgvar</i>?</span></a></dt>
<dd><p>This method checks whether <i class="arg">tile</i> described a valid tile in a
slippy-based map containing that many zoom <i class="arg">levels</i>. The result is
a boolean value, <b class="const">true</b> if the tile is valid, and <b class="const">false</b>
otherwise. For the latter a message is left in the variable named by
<i class="arg">msgvar</i>, should it be specified.</p>
<p>A tile identifier as stored in <i class="arg">tile</i> is a list containing zoom
level, tile row, and tile column, in this order. The command
essentially checks this, i.e. the syntax, that the zoom level is
between 0 and &quot;<i class="arg">levels</i>-1&quot;, and that the row/col information is
within the boundaries for the zoom level, i.e. 0 ...
&quot;[tiles $zoom]-1&quot;.</p></dd>
<dt><a name="5"><b class="cmd">::map::slippy</b> <b class="method">geo 2tile</b> <i class="arg">geo</i></a></dt>
<dd><p>Converts a geographical location at a zoom level (<i class="arg">geo</i>, a list
containing zoom level, latitude, and longitude, in this order) to a
tile identifier (list containing zoom level, row, and column) at that
level. The tile identifier uses pure integer numbers for the tile
coordinates, for all geographic coordinates mapping to that tile.</p></dd>
<dt><a name="6"><b class="cmd">::map::slippy</b> <b class="method">geo 2tile.float</b> <i class="arg">geo</i></a></dt>
<dd><p>Converts a geographical location at a zoom level (<i class="arg">geo</i>, a list
containing zoom level, latitude, and longitude, in this order) to a
tile identifier (list containing zoom level, row, and column) at that
level. The tile identifier uses floating point numbers for the tile
coordinates, representing not only the tile the geographic coordinates
map to, but also the fractional location inside of that tile.</p></dd>
<dt><a name="7"><b class="cmd">::map::slippy</b> <b class="method">geo 2point</b> <i class="arg">geo</i></a></dt>
<dd><p>Converts a geographical location at a zoom level (<i class="arg">geo</i>, a list
containing zoom level, latitude, and longitude, in this order) to a
pixel position (list containing zoom level, y, and x) at that level.</p></dd>
<dt><a name="8"><b class="cmd">::map::slippy</b> <b class="method">tile 2geo</b> <i class="arg">tile</i></a></dt>
<dd><p>Converts a tile identifier at a zoom level (<i class="arg">tile</i>, list
containing zoom level, row, and column) to a geographical location
(list containing zoom level, latitude, and longitude, in this order)
at that level.</p></dd>
<dt><a name="9"><b class="cmd">::map::slippy</b> <b class="method">tile 2point</b> <i class="arg">tile</i></a></dt>
<dd><p>Converts a tile identifier at a zoom level (<i class="arg">tile</i>, a list
containing zoom level, row, and column, in this order) to a pixel
position (list containing zoom level, y, and x) at that level.</p></dd>
<dt><a name="10"><b class="cmd">::map::slippy</b> <b class="method">point 2geo</b> <i class="arg">point</i></a></dt>
<dd><p>Converts a pixel position at a zoom level (<i class="arg">point</i>, list
containing zoom level, y, and x) to a geographical location (list
containing zoom level, latitude, and longitude, in this order) at that
level.</p></dd>
<dt><a name="11"><b class="cmd">::map::slippy</b> <b class="method">point 2tile</b> <i class="arg">point</i></a></dt>
<dd><p>Converts a pixel position at a zoom level (<i class="arg">point</i>, a list
containing zoom level, y, and x, in this order) to a tile identifier
(list containing zoom level, row, and column) at that level.</p></dd>
<dt><a name="12"><b class="cmd">::map::slippy</b> <b class="method">fit geobox</b> <i class="arg">canvdim</i> <i class="arg">geobox</i> <i class="arg">zmin</i> <i class="arg">zmax</i></a></dt>
<dd><p>Calculates the zoom level (whithin the bounds <i class="arg">zmin</i> and
<i class="arg">zmax</i>) such that <i class="arg">geobox</i> (a 4-element list containing the
latitudes and longitudes lat0, lat1, lon0 and lon1 of a geo box,
in this order) fits into a viewport given by <i class="arg">canvdim</i>, a
2-element list containing the width and height of the viewport, in
this order.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Coordinate systems</a></h2>
<p>The commands of this package operate on three distinct coordinate
systems, which are explained below.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Geographic</a></h3>
<p><i class="term">Geographic</i>al coordinates are represented by <i class="term">Latitude</i> and
<i class="term"><a href="../../../../index.html#key203">Longitude</a></i>, each of which is measured in degrees, as they are
essentially angles.</p>
<p><b class="const">Zero</b> longitude is the <i class="term">Greenwich meridian</i>, with
positive values going <i class="term">east</i>, and negative values going
<i class="term">west</i>, for a total range of +/- 180 degrees. Note that +180 and
-180 longitude are the same <i class="term">meridian</i>, opposite to greenwich.</p>
<p><b class="const">zero</b> latitude the <i class="term">Equator</i>, with positive values
going <i class="term">north</i> and negative values going <i class="term">south</i>. While the
true range is +/- 90 degrees the projection used by the package
requires us to cap the range at +/- 85.05112877983284 degrees. This
means that north and south pole are not representable and not part of
any map.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Tiles</a></h3>
<p>While <span class="sectref"><a href="#subsection1">Geographic</a></span>al coordinates of the previous section are
independent of zoom level the <i class="term">tile coordinates</i> are not.</p>
<p>Generally the integer part of tile coordinates represent the
row and column number of the tile in question, wheras the fractional
parts signal how far inside the tile the location in question is, with
pure integer coordinates (no fractional part) representing the upper
left corner of the tile.</p>
<p>The zero point of the map is at the upper left corner,
regardless of zoom level, with larger coordinates going right (east)
and down (south), and smaller coordinates going left (west) and up
(north). Again regardless of zxoom level.</p>
<p>Negative tile coordinates are not allowed.</p>
<p>At zoom level 0 the whole map is represented by a single,
putting the geographic zero at 1/2, 1/2 of tile coordinates, and the
range of tile coordinates as [0...1].</p>
<p>To go from a zoom level N to the next deeper level N+1 each
tile of level N is split into its four quadrants, which then are the
tiles of level N+1.</p>
<p>This means that at zoom level N the map is sliced (horizontally
and vertically) into 2^N stripes, for a total of 4^N tiles, with tile
coordinates ranging from 0 to 2^N+1.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Pixels/Points</a></h3>
<p><i class="term">pixel coordinates</i>, also called <i class="term">point coordinates</i> are
in essence <span class="sectref"><a href="#subsection2">tile coordinates</a></span> scaled by the size of
the image representing a tile. This tile size currently has a fixed
value, <b class="const">256</b>.</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Main_Page">http://wiki.openstreetmap.org/wiki/Main_Page</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key197">geodesy</a>, <a href="../../../../index.html#key202">geography</a>, <a href="../../../../index.html#key196">latitute</a>, <a href="../../../../index.html#key200">location</a>, <a href="../../../../index.html#key203">longitude</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key199">slippy</a>, <a href="../../../../index.html#key198">zoom</a></p>
</div>
</div>

Added embedded/www/tcllib/files/modules/map/map_slippy_cache.html.







































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195

<div class='fossil-doc' data-title='map::slippy::cache - Mapping utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::slippy::cache(n) 0.2 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::slippy::cache - Management of a tile cache in the local filesystem</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">References</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">Tk 8.4</b></li>
<li>package require <b class="pkgname">img::png</b></li>
<li>package require <b class="pkgname">map::slippy</b></li>
<li>package require <b class="pkgname">map::slippy::cache <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::map::slippy::cache</b> <i class="arg">cacheName</i> <i class="arg">cachedir</i> <i class="arg">provider</i></a></li>
<li><a href="#2"><i class="arg">cacheName</i> <b class="method">valid</b> <i class="arg">tile</i> <span class="opt">?<i class="arg">msgvar</i>?</span></a></li>
<li><a href="#3"><i class="arg">cacheName</i> <b class="method">exists</b> <i class="arg">tile</i></a></li>
<li><a href="#4"><i class="arg">cacheName</i> <b class="method">get</b> <i class="arg">tile</i> <i class="arg">donecmd</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for managing a cache of tiles for
slippy-based maps in the local filesystem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::map::slippy::cache</b> <i class="arg">cacheName</i> <i class="arg">cachedir</i> <i class="arg">provider</i></a></dt>
<dd><p>Creates the cache <i class="arg">cacheName</i> and configures it with both the path
to the directory contaiing the locally cached tiles (<i class="arg">cachedir</i>),
and the command prefix from which it will pull tiles asked for and not
yet known to the cache itself (<i class="arg">provider</i>).</p>
<p>The result of the command is <i class="arg">cacheName</i>.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">cacheName</i> <b class="method">valid</b> <i class="arg">tile</i> <span class="opt">?<i class="arg">msgvar</i>?</span></a></dt>
<dd><p>This method checks the validity of a the given <i class="arg">tile</i> identifier.
This is a convenience wrapper to <b class="cmd">::map::slippy tile valid</b> and
has the same interface.</p></dd>
<dt><a name="3"><i class="arg">cacheName</i> <b class="method">exists</b> <i class="arg">tile</i></a></dt>
<dd><p>This methods tests whether the cache contains the specified <i class="arg">tile</i>
or not. The result is a boolean value, <b class="const">true</b> if the tile is
known, and <b class="const">false</b> otherwise. The tile is identified by a list
containing three elements, zoom level, row, and column number, in this
order.</p></dd>
<dt><a name="4"><i class="arg">cacheName</i> <b class="method">get</b> <i class="arg">tile</i> <i class="arg">donecmd</i></a></dt>
<dd><p>This is the main method of the cache, retrieving the image for the
specified <i class="arg">tile</i> from the cache. The tile identifier is a list
containing three elements, the zoom level, row, and column number of
the tile, in this order.</p>
<p>The command refix <i class="arg">donecmd</i> will be invoked when the cache
either knows the image for the tile or that no image will forthcoming.
It will be invoked with either 2 or 3 arguments, i.e.</p>
<ol class="doctools_enumerated">
<li><p>The string <b class="const">set</b>, the <i class="arg">tile</i>, and the image.</p></li>
<li><p>The string <b class="const">unset</b>, and the <i class="arg">tile</i>.</p></li>
</ol>
<p>These two possibilities are used to either signal the image for the
<i class="arg">tile</i>, or that the <i class="arg">tile</i> has no image defined for it.</p>
<p>When the cache has no information about the tile it will invoke the
<i class="arg">provider</i> command prefix specified during its construction,
adding three arguments: The string <b class="const">get</b>, the <i class="arg">tile</i>, and a
callback into the cache. The latter will be invoked by the provider to
either transfer the image to the cache, or signal that the tile has no
image.</p>
<p>When multiple requests for the same tile are made only one request
will be issued to the provider.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Main_Page">http://wiki.openstreetmap.org/wiki/Main_Page</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key384">cache</a>, <a href="../../../../index.html#key385">filesystem</a>, <a href="../../../../index.html#key200">location</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key199">slippy</a>, <a href="../../../../index.html#key386">tile</a>, <a href="../../../../index.html#key198">zoom</a></p>
</div>
</div>

Added embedded/www/tcllib/files/modules/map/map_slippy_fetcher.html.

















































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

<div class='fossil-doc' data-title='map::slippy::fetcher - Mapping utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::slippy::fetcher(n) 0.4 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::slippy::fetcher - Accessing a server providing tiles for slippy-based maps</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">References</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">Tk 8.4</b></li>
<li>package require <b class="pkgname">img::png</b></li>
<li>package require <b class="pkgname">map::slippy</b></li>
<li>package require <b class="pkgname">map::slippy::fetcher <span class="opt">?0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::map::slippy::fetcher</b> <i class="arg">fetcherName</i> <i class="arg">levels</i> <i class="arg">url</i></a></li>
<li><a href="#2"><i class="arg">fetcherName</i> <b class="method">levels</b></a></li>
<li><a href="#3"><i class="arg">fetcherName</i> <b class="method">tileheight</b></a></li>
<li><a href="#4"><i class="arg">fetcherName</i> <b class="method">tilewidth</b></a></li>
<li><a href="#5"><i class="arg">fetcherName</i> <b class="method">get</b> <i class="arg">tile</i> <i class="arg">donecmd</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for accessing http servers providing
tiles for slippy-based maps.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::map::slippy::fetcher</b> <i class="arg">fetcherName</i> <i class="arg">levels</i> <i class="arg">url</i></a></dt>
<dd><p>Creates the fetcher <i class="arg">fetcherName</i> and configures it with the
number of zoom <i class="arg">levels</i> supported by the tile server, and the
<i class="arg">url</i> it is listening on for tile requests.</p>
<p>The result of the command is <i class="arg">fetcherName</i>.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">fetcherName</i> <b class="method">levels</b></a></dt>
<dd><p>This method returns the number of zoom levels supported by the fetcher
object, and the tile server it is accessing.</p></dd>
<dt><a name="3"><i class="arg">fetcherName</i> <b class="method">tileheight</b></a></dt>
<dd><p>This method returns the height of tiles served, in pixels.</p></dd>
<dt><a name="4"><i class="arg">fetcherName</i> <b class="method">tilewidth</b></a></dt>
<dd><p>This method returns the width of tiles served, in pixels.</p></dd>
<dt><a name="5"><i class="arg">fetcherName</i> <b class="method">get</b> <i class="arg">tile</i> <i class="arg">donecmd</i></a></dt>
<dd><p>This is the main method of the fetcher, retrieving the image for the
specified <i class="arg">tile</i>. The tile identifier is a list containing three
elements, the zoom level, row, and column number of the tile, in this
order.</p>
<p>The command refix <i class="arg">donecmd</i> will be invoked when the fetcher
either knows the image for the tile or that no image will forthcoming.
It will be invoked with either 2 or 3 arguments, i.e.</p>
<ol class="doctools_enumerated">
<li><p>The string <b class="const">set</b>, the <i class="arg">tile</i>, and the image.</p></li>
<li><p>The string <b class="const">unset</b>, and the <i class="arg">tile</i>.</p></li>
</ol>
<p>These two possibilities are used to either signal the image for the
<i class="arg">tile</i>, or that the <i class="arg">tile</i> has no image defined for it.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Main_Page">http://wiki.openstreetmap.org/wiki/Main_Page</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key200">location</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key65">server</a>, <a href="../../../../index.html#key199">slippy</a>, <a href="../../../../index.html#key386">tile</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key198">zoom</a></p>
</div>
</div>

Added embedded/www/tcllib/files/modules/mapproj/mapproj.html.































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447

<div class='fossil-doc' data-title='mapproj - Tcl Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">mapproj(n) 0.1 tcllib &quot;Tcl Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>mapproj - Map projection routines</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Arguments</a></li>
<li class="doctools_section"><a href="#section4">Results</a></li>
<li class="doctools_section"><a href="#section5">Choosing a projection</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.4?</span></b></li>
<li>package require <b class="pkgname">math::interpolate <span class="opt">?1.0?</span></b></li>
<li>package require <b class="pkgname">math::special <span class="opt">?0.2.1?</span></b></li>
<li>package require <b class="pkgname">mapproj <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::mapproj::toPlateCarree</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#2"><b class="cmd">::mapproj::fromPlateCarree</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#3"><b class="cmd">::mapproj::toCylindricalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#4"><b class="cmd">::mapproj::fromCylindricalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#5"><b class="cmd">::mapproj::toMercator</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#6"><b class="cmd">::mapproj::fromMercator</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#7"><b class="cmd">::mapproj::toMillerCylindrical</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#8"><b class="cmd">::mapproj::fromMillerCylindrical</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#9"><b class="cmd">::mapproj::toSinusoidal</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#10"><b class="cmd">::mapproj::fromSinusoidal</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#11"><b class="cmd">::mapproj::toMollweide</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#12"><b class="cmd">::mapproj::fromMollweide</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#13"><b class="cmd">::mapproj::toEckertIV</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#14"><b class="cmd">::mapproj::fromEckertIV</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#15"><b class="cmd">::mapproj::toEckertVI</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#16"><b class="cmd">::mapproj::fromEckertVI</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#17"><b class="cmd">::mapproj::toRobinson</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#18"><b class="cmd">::mapproj::fromRobinson</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#19"><b class="cmd">::mapproj::toCassini</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#20"><b class="cmd">::mapproj::fromCassini</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#21"><b class="cmd">::mapproj::toPeirceQuincuncial</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#22"><b class="cmd">::mapproj::fromPeirceQuincuncial</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#23"><b class="cmd">::mapproj::toOrthographic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#24"><b class="cmd">::mapproj::fromOrthographic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#25"><b class="cmd">::mapproj::toStereographic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#26"><b class="cmd">::mapproj::fromStereographic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#27"><b class="cmd">::mapproj::toGnomonic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#28"><b class="cmd">::mapproj::fromGnomonic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#29"><b class="cmd">::mapproj::toAzimuthalEquidistant</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#30"><b class="cmd">::mapproj::fromAzimuthalEquidistant</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#31"><b class="cmd">::mapproj::toLambertAzimuthalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#32"><b class="cmd">::mapproj::fromLambertAzimuthalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#33"><b class="cmd">::mapproj::toHammer</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#34"><b class="cmd">::mapproj::fromHammer</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#35"><b class="cmd">::mapproj::toConicEquidistant</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#36"><b class="cmd">::mapproj::fromConicEquidistant</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#37"><b class="cmd">::mapproj::toAlbersEqualAreaConic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#38"><b class="cmd">::mapproj::fromAlbersEqualAreaConic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#39"><b class="cmd">::mapproj::toLambertConformalConic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#40"><b class="cmd">::mapproj::fromLambertConformalConic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#41"><b class="cmd">::mapproj::toLambertCylindricalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#42"><b class="cmd">::mapproj::fromLambertCylindricalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#43"><b class="cmd">::mapproj::toBehrmann</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#44"><b class="cmd">::mapproj::fromBehrmann</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#45"><b class="cmd">::mapproj::toTrystanEdwards</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#46"><b class="cmd">::mapproj::fromTrystanEdwards</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#47"><b class="cmd">::mapproj::toHoboDyer</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#48"><b class="cmd">::mapproj::fromHoboDyer</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#49"><b class="cmd">::mapproj::toGallPeters</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#50"><b class="cmd">::mapproj::fromGallPeters</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#51"><b class="cmd">::mapproj::toBalthasart</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></li>
<li><a href="#52"><b class="cmd">::mapproj::fromBalthasart</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">mapproj</b> package provides a set of procedures for
converting between world co-ordinates (latitude and longitude) and map
co-ordinates on a number of different map projections.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<p>The following commands convert between world co-ordinates and
map co-ordinates:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::mapproj::toPlateCarree</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the <em>plate carr&eacute;e</em> (cylindrical equidistant)
projection.</p></dd>
<dt><a name="2"><b class="cmd">::mapproj::fromPlateCarree</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the <em>plate carr&eacute;e</em> (cylindrical equidistant)
projection.</p></dd>
<dt><a name="3"><b class="cmd">::mapproj::toCylindricalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the cylindrical equal-area projection.</p></dd>
<dt><a name="4"><b class="cmd">::mapproj::fromCylindricalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the cylindrical equal-area projection.</p></dd>
<dt><a name="5"><b class="cmd">::mapproj::toMercator</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Mercator (cylindrical conformal) projection.</p></dd>
<dt><a name="6"><b class="cmd">::mapproj::fromMercator</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Mercator (cylindrical conformal) projection.</p></dd>
<dt><a name="7"><b class="cmd">::mapproj::toMillerCylindrical</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Miller Cylindrical projection.</p></dd>
<dt><a name="8"><b class="cmd">::mapproj::fromMillerCylindrical</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Miller Cylindrical projection.</p></dd>
<dt><a name="9"><b class="cmd">::mapproj::toSinusoidal</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the sinusoidal (Sanson-Flamsteed) projection.
projection.</p></dd>
<dt><a name="10"><b class="cmd">::mapproj::fromSinusoidal</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the sinusoidal (Sanson-Flamsteed) projection.
projection.</p></dd>
<dt><a name="11"><b class="cmd">::mapproj::toMollweide</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Mollweide projection.</p></dd>
<dt><a name="12"><b class="cmd">::mapproj::fromMollweide</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Mollweide projection.</p></dd>
<dt><a name="13"><b class="cmd">::mapproj::toEckertIV</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Eckert IV projection.</p></dd>
<dt><a name="14"><b class="cmd">::mapproj::fromEckertIV</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Eckert IV projection.</p></dd>
<dt><a name="15"><b class="cmd">::mapproj::toEckertVI</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Eckert VI projection.</p></dd>
<dt><a name="16"><b class="cmd">::mapproj::fromEckertVI</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Eckert VI projection.</p></dd>
<dt><a name="17"><b class="cmd">::mapproj::toRobinson</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Robinson projection.</p></dd>
<dt><a name="18"><b class="cmd">::mapproj::fromRobinson</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Robinson projection.</p></dd>
<dt><a name="19"><b class="cmd">::mapproj::toCassini</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Cassini (transverse cylindrical equidistant)
projection.</p></dd>
<dt><a name="20"><b class="cmd">::mapproj::fromCassini</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Cassini (transverse cylindrical equidistant)
projection.</p></dd>
<dt><a name="21"><b class="cmd">::mapproj::toPeirceQuincuncial</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Peirce Quincuncial Projection.</p></dd>
<dt><a name="22"><b class="cmd">::mapproj::fromPeirceQuincuncial</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Peirce Quincuncial Projection.</p></dd>
<dt><a name="23"><b class="cmd">::mapproj::toOrthographic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the orthographic projection.</p></dd>
<dt><a name="24"><b class="cmd">::mapproj::fromOrthographic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the orthographic projection.</p></dd>
<dt><a name="25"><b class="cmd">::mapproj::toStereographic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the stereographic (azimuthal conformal) projection.</p></dd>
<dt><a name="26"><b class="cmd">::mapproj::fromStereographic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the stereographic (azimuthal conformal) projection.</p></dd>
<dt><a name="27"><b class="cmd">::mapproj::toGnomonic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the gnomonic projection.</p></dd>
<dt><a name="28"><b class="cmd">::mapproj::fromGnomonic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the gnomonic projection.</p></dd>
<dt><a name="29"><b class="cmd">::mapproj::toAzimuthalEquidistant</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the azimuthal equidistant projection.</p></dd>
<dt><a name="30"><b class="cmd">::mapproj::fromAzimuthalEquidistant</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the azimuthal equidistant projection.</p></dd>
<dt><a name="31"><b class="cmd">::mapproj::toLambertAzimuthalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Lambert azimuthal equal-area projection.</p></dd>
<dt><a name="32"><b class="cmd">::mapproj::fromLambertAzimuthalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Lambert azimuthal equal-area projection.</p></dd>
<dt><a name="33"><b class="cmd">::mapproj::toHammer</b> <i class="arg">lambda_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Hammer projection.</p></dd>
<dt><a name="34"><b class="cmd">::mapproj::fromHammer</b> <i class="arg">lambda_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Hammer projection.</p></dd>
<dt><a name="35"><b class="cmd">::mapproj::toConicEquidistant</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the conic equidistant projection.</p></dd>
<dt><a name="36"><b class="cmd">::mapproj::fromConicEquidistant</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the conic equidistant projection.</p></dd>
<dt><a name="37"><b class="cmd">::mapproj::toAlbersEqualAreaConic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Albers equal-area conic projection.</p></dd>
<dt><a name="38"><b class="cmd">::mapproj::fromAlbersEqualAreaConic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Albers equal-area conic projection.</p></dd>
<dt><a name="39"><b class="cmd">::mapproj::toLambertConformalConic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Lambert conformal conic projection.</p></dd>
<dt><a name="40"><b class="cmd">::mapproj::fromLambertConformalConic</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">phi_1</i> <i class="arg">phi_2</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Lambert conformal conic projection.</p></dd>
</dl>
<p>Among the cylindrical equal-area projections, there are a number of
choices of standard parallels that have names:</p>
<dl class="doctools_definitions">
<dt><a name="41"><b class="cmd">::mapproj::toLambertCylindricalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Lambert cylindrical equal area projection. (standard parallel
is the Equator.)</p></dd>
<dt><a name="42"><b class="cmd">::mapproj::fromLambertCylindricalEqualArea</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Lambert cylindrical equal area projection. (standard parallel
is the Equator.)</p></dd>
<dt><a name="43"><b class="cmd">::mapproj::toBehrmann</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Behrmann cylindrical equal area projection. (standard parallels
are 30 degrees North and South)</p></dd>
<dt><a name="44"><b class="cmd">::mapproj::fromBehrmann</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Behrmann cylindrical equal area projection. (standard parallels
are 30 degrees North and South.)</p></dd>
<dt><a name="45"><b class="cmd">::mapproj::toTrystanEdwards</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Trystan Edwards cylindrical equal area projection. (standard parallels
are 37.4 degrees North and South)</p></dd>
<dt><a name="46"><b class="cmd">::mapproj::fromTrystanEdwards</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Trystan Edwards cylindrical equal area projection. (standard parallels
are 37.4 degrees North and South.)</p></dd>
<dt><a name="47"><b class="cmd">::mapproj::toHoboDyer</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Hobo-Dyer cylindrical equal area projection. (standard parallels
are 37.5 degrees North and South)</p></dd>
<dt><a name="48"><b class="cmd">::mapproj::fromHoboDyer</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Hobo-Dyer cylindrical equal area projection. (standard parallels
are 37.5 degrees North and South.)</p></dd>
<dt><a name="49"><b class="cmd">::mapproj::toGallPeters</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Gall-Peters cylindrical equal area projection. (standard parallels
are 45 degrees North and South)</p></dd>
<dt><a name="50"><b class="cmd">::mapproj::fromGallPeters</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Gall-Peters cylindrical equal area projection. (standard parallels
are 45 degrees North and South.)</p></dd>
<dt><a name="51"><b class="cmd">::mapproj::toBalthasart</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">lambda</i> <i class="arg">phi</i></a></dt>
<dd><p>Converts to the Balthasart cylindrical equal area projection. (standard parallels
are 50 degrees North and South)</p></dd>
<dt><a name="52"><b class="cmd">::mapproj::fromBalthasart</b> <i class="arg">lambda_0</i> <i class="arg">phi_0</i> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Converts from the Balthasart cylindrical equal area projection. (standard parallels
are 50 degrees North and South.)</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Arguments</a></h2>
<p>The following arguments are accepted by the projection commands:</p>
<dl class="doctools_definitions">
<dt><i class="arg">lambda</i></dt>
<dd><p>Longitude of the point to be projected, in degrees.</p></dd>
<dt><i class="arg">phi</i></dt>
<dd><p>Latitude of the point to be projected, in degrees.</p></dd>
<dt><i class="arg">lambda_0</i></dt>
<dd><p>Longitude of the center of the sheet, in degrees.  For many projections,
this figure is also the reference meridian of the projection.</p></dd>
<dt><i class="arg">phi_0</i></dt>
<dd><p>Latitude of the center of the sheet, in degrees.  For the azimuthal
projections, this figure is also the latitude of the center of the projection.</p></dd>
<dt><i class="arg">phi_1</i></dt>
<dd><p>Latitude of the first reference parallel, for projections that use reference
parallels.</p></dd>
<dt><i class="arg">phi_2</i></dt>
<dd><p>Latitude of the second reference parallel, for projections that use reference
parallels.</p></dd>
<dt><i class="arg">x</i></dt>
<dd><p>X co-ordinate of a point on the map, in units of Earth radii.</p></dd>
<dt><i class="arg">y</i></dt>
<dd><p>Y co-ordinate of a point on the map, in units of Earth radii.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Results</a></h2>
<p>For all of the procedures whose names begin with 'to', the return value
is a list comprising an <em>x</em> co-ordinate and a <em>y</em> co-ordinate.
The co-ordinates are relative to the center of the map sheet to be drawn,
measured in Earth radii at the reference location on the map.
For all of the functions whose names begin with 'from', the return value
is a list comprising the longitude and latitude, in degrees.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Choosing a projection</a></h2>
<p>This package offers a great many projections, because no single projection
is appropriate to all maps.  This section attempts to provide guidance
on how to choose a projection.</p>
<p>First, consider the type of data that you intend to display on the map.
If the data are <em>directional</em> (<em>e.g.,</em> winds, ocean currents, or
magnetic fields) then you need to use a projection that preserves
angles; these are known as <em>conformal</em> projections.  Conformal
projections include the Mercator, the Albers azimuthal equal-area,
the stereographic, and the Peirce Quincuncial projection.  If the
data are <em>thematic</em>, describing properties of land or water, such
as temperature, population density, land use, or demographics; then
you need a projection that will show these data with the areas on the map
proportional to the areas in real life.  These so-called <em>equal area</em>
projections include the various cylindrical equal area projections,
the sinusoidal projection, the Lambert azimuthal equal-area projection,
the Albers equal-area conic projection, and several of the world-map
projections (Miller Cylindrical, Mollweide, Eckert IV, Eckert VI, Robinson,
and Hammer). If the significant factor in your data is distance from a
central point or line (such as air routes), then you will do best with
an <em>equidistant</em> projection such as <em>plate carr&eacute;e</em>,
Cassini, azimuthal equidistant, or conic equidistant.  If direction from
a central point is a critical factor in your data (for instance,
air routes, radio antenna pointing), then you will almost surely want to
use one of the azimuthal projections. Appropriate choices are azimuthal
equidistant, azimuthal equal-area, stereographic, and perhaps orthographic.</p>
<p>Next, consider how much of the Earth your map will cover, and the general
shape of the area of interest.  For maps of the entire Earth,
the cylindrical equal area, Eckert IV and VI, Mollweide, Robinson, and Hammer
projections are good overall choices.  The Mercator projection is traditional,
but the extreme distortions of area at high latitudes make it
a poor choice unless a conformal projection is required. The Peirce
projection is a better choice of conformal projection, having less distortion
of landforms.  The Miller Cylindrical is a compromise designed to give
shapes similar to the traditional Mercator, but with less polar stretching.
The Peirce Quincuncial projection shows all the continents with acceptable
distortion if a reference meridian close to +20 degrees is chosen.
The Robinson projection yields attractive maps for things like political
divisions, but should be avoided in presenting scientific data, since other
projections have moe useful geometric properties.</p>
<p>If the map will cover a hemisphere, then choose stereographic,
azimuthal-equidistant, Hammer, or Mollweide projections; these all project
the hemisphere into a circle.</p>
<p>If the map will cover a large area (at least a few hundred km on a side),
but less than
a hemisphere, then you have several choices.  Azimuthal projections
are usually good (choose stereographic, azimuthal equidistant, or
Lambert azimuthal equal-area according to whether shapes, distances from
a central point, or areas are important).  Azimuthal projections (and possibly
the Cassini projection) are the only
really good choices for mapping the polar regions.</p>
<p>If the large area is in one of the temperate zones and is round or has
a primarily east-west extent, then the conic projections are good choices.
Choose the Lambert conformal conic, the conic equidistant, or the Albers
equal-area conic according to whether shape, distance, or area are the
most important parameters.  For any of these, the reference parallels
should be chosen at approximately 1/6 and 5/6 of the range of latitudes
to be displayed.  For instance, maps of the 48 coterminous United States
are attractive with reference parallels of 28.5 and 45.5 degrees.</p>
<p>If the large area is equatorial and is round or has a primarily east-west
extent, then the Mercator projection is a good choice for a conformal
projection; Lambert cylindrical equal-area and sinusoidal projections are
good equal-area projections; and the <em>plate carr&eacute;e</em> is a
good equidistant projection.</p>
<p>Large areas having a primarily North-South aspect, particularly those
spanning the Equator, need some other choices.  The Cassini projection
is a good choice for an equidistant projection (for instance, a Cassini
projection with a central meridian of 80 degrees West produces an
attractive map of the Americas). The cylindrical equal-area, Albers
equal-area conic, sinusoidal, Mollweide and Hammer
projections are possible choices for equal-area projections.
A good conformal projection in this situation is the Transverse
Mercator, which alas, is not yet implemented.</p>
<p>Small areas begin to get into a realm where the ellipticity of the
Earth affects the map scale.  This package does not attempt to
handle accurate mapping for large-scale topographic maps.  If
slight scale errors are acceptable in your application, then any
of the projections appropriate to large areas should work for
small ones as well.</p>
<p>There are a few projections that are included for their special
properties.  The orthographic projection produces views of the
Earth as seen from space.  The gnomonic projection produces a
map on which all great circles (the shortest distance between
two points on the Earth's surface) are rendered as straight lines.
While this projection is useful for navigational planning, it
has extreme distortions of shape and area, and can display
only a limited area of the Earth (substantially less than a hemisphere).</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key197">geodesy</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key643">projection</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Kevin B. Kenny &lt;kennykb@acm.org&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/markdown/markdown.html.





































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146

<div class='fossil-doc' data-title='markdown - Markdown to HTML Converter'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">markdown(n) 1.0 tcllib &quot;Markdown to HTML Converter&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>markdown - Converts Markdown text to HTML</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">textutil <span class="opt">?0.8?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::Markdown::convert</b> <i class="arg">markdown</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">Markdown</b> provides a command to convert
Markdown annotated text into HMTL.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::Markdown::convert</b> <i class="arg">markdown</i></a></dt>
<dd><p>This command takes in a block of Markdown text, and returns a block
of HTML.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/bigfloat.html.



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
<div class='fossil-doc' data-title='math::bigfloat - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::bigfloat(n) 2.0.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::bigfloat - Arbitrary precision floating-point numbers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">INTRODUCTION</a></li>
<li class="doctools_section"><a href="#section3">ARITHMETICS</a></li>
<li class="doctools_section"><a href="#section4">COMPARISONS</a></li>
<li class="doctools_section"><a href="#section5">ANALYSIS</a></li>
<li class="doctools_section"><a href="#section6">ROUNDING</a></li>
<li class="doctools_section"><a href="#section7">PRECISION</a></li>
<li class="doctools_section"><a href="#section8">WHAT ABOUT TCL 8.4 ?</a></li>
<li class="doctools_section"><a href="#section9">NAMESPACES AND OTHER PACKAGES</a></li>
<li class="doctools_section"><a href="#section10">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section11">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">math::bigfloat <span class="opt">?2.0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">fromstr</b> <i class="arg">number</i> <span class="opt">?<i class="arg">trailingZeros</i>?</span></a></li>
<li><a href="#2"><b class="cmd">tostr</b> <span class="opt">?<b class="option">-nosci</b>?</span> <i class="arg">number</i></a></li>
<li><a href="#3"><b class="cmd">fromdouble</b> <i class="arg">double</i> <span class="opt">?<i class="arg">decimals</i>?</span></a></li>
<li><a href="#4"><b class="cmd">todouble</b> <i class="arg">number</i></a></li>
<li><a href="#5"><b class="cmd">isInt</b> <i class="arg">number</i></a></li>
<li><a href="#6"><b class="cmd">isFloat</b> <i class="arg">number</i></a></li>
<li><a href="#7"><b class="cmd">int2float</b> <i class="arg">integer</i> <span class="opt">?<i class="arg">decimals</i>?</span></a></li>
<li><a href="#8"><b class="cmd">add</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#9"><b class="cmd">sub</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#10"><b class="cmd">mul</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#11"><b class="cmd">div</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#12"><b class="cmd">mod</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#13"><b class="cmd">abs</b> <i class="arg">x</i></a></li>
<li><a href="#14"><b class="cmd">opp</b> <i class="arg">x</i></a></li>
<li><a href="#15"><b class="cmd">pow</b> <i class="arg">x</i> <i class="arg">n</i></a></li>
<li><a href="#16"><b class="cmd">iszero</b> <i class="arg">x</i></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#key560">equal</a></b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#18"><b class="cmd">compare</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#19"><b class="cmd">sqrt</b> <i class="arg">x</i></a></li>
<li><a href="#20"><b class="cmd"><a href="../log/log.html">log</a></b> <i class="arg">x</i></a></li>
<li><a href="#21"><b class="cmd">exp</b> <i class="arg">x</i></a></li>
<li><a href="#22"><b class="cmd">cos</b> <i class="arg">x</i></a></li>
<li><a href="#23"><b class="cmd">sin</b> <i class="arg">x</i></a></li>
<li><a href="#24"><b class="cmd">tan</b> <i class="arg">x</i></a></li>
<li><a href="#25"><b class="cmd">cotan</b> <i class="arg">x</i></a></li>
<li><a href="#26"><b class="cmd">acos</b> <i class="arg">x</i></a></li>
<li><a href="#27"><b class="cmd">asin</b> <i class="arg">x</i></a></li>
<li><a href="#28"><b class="cmd">atan</b> <i class="arg">x</i></a></li>
<li><a href="#29"><b class="cmd">cosh</b> <i class="arg">x</i></a></li>
<li><a href="#30"><b class="cmd">sinh</b> <i class="arg">x</i></a></li>
<li><a href="#31"><b class="cmd">tanh</b> <i class="arg">x</i></a></li>
<li><a href="#32"><b class="cmd"><a href="../../../../index.html#key806">pi</a></b> <i class="arg">n</i></a></li>
<li><a href="#33"><b class="cmd">rad2deg</b> <i class="arg">radians</i></a></li>
<li><a href="#34"><b class="cmd">deg2rad</b> <i class="arg">degrees</i></a></li>
<li><a href="#35"><b class="cmd">round</b> <i class="arg">x</i></a></li>
<li><a href="#36"><b class="cmd">ceil</b> <i class="arg">x</i></a></li>
<li><a href="#37"><b class="cmd">floor</b> <i class="arg">x</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The bigfloat package provides arbitrary precision floating-point math
capabilities to the Tcl language. It is designed to work with Tcl 8.5,
but for Tcl 8.4 is provided an earlier version of this package.
See <span class="sectref"><a href="#section8">WHAT ABOUT TCL 8.4 ?</a></span> for more explanations.
By convention, we will talk about the numbers treated in this library as :</p>
<ul class="doctools_itemized">
<li><p>BigFloat for floating-point numbers of arbitrary length.</p></li>
<li><p>integers for arbitrary length signed integers, just as basic integers since Tcl 8.5.</p></li>
</ul>
<p>Each BigFloat is an interval, namely [<em>m-d, m+d</em>],
where <em>m</em> is the mantissa and <em>d</em> the uncertainty, representing the
limitation of that number's precision.
This is why we call such mathematics <em>interval computations</em>.
Just take an example in physics : when you measure a temperature, not all
digits you read are <em>significant</em>. Sometimes you just cannot trust all digits - not to mention if doubles (f.p. numbers) can handle all these digits.
BigFloat can handle this problem - trusting the digits you get - plus the ability to store numbers with an arbitrary precision.
BigFloats are internally represented at Tcl lists: this
package provides a set of procedures operating against
the internal representation in order to :</p>
<ul class="doctools_itemized">
<li><p>perform math operations on BigFloats and (optionnaly) with integers.</p></li>
<li><p>convert BigFloats from their internal representations to strings, and vice versa.</p></li>
</ul>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">INTRODUCTION</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">fromstr</b> <i class="arg">number</i> <span class="opt">?<i class="arg">trailingZeros</i>?</span></a></dt>
<dd><p>Converts <em>number</em> into a BigFloat. Its precision
is at least the number of digits provided by <em>number</em>.
If the <i class="arg">number</i> contains only digits and eventually a minus sign, it is considered as
an integer. Subsequently, no conversion is done at all.</p>
<p><i class="arg">trailingZeros</i> - the number of zeros to append at the end of the floating-point number
to get more precision. It cannot be applied to an integer.</p>
<pre class="doctools_example">
# x and y are BigFloats : the first string contained a dot, and the second an e sign
set x [fromstr -1.000000]
set y [fromstr 2000e30]
# let's see how we get integers
set t 20000000000000
# the old way (package 1.2) is still supported for backwards compatibility :
set m [fromstr 10000000000]
# but we do not need fromstr for integers anymore
set n -39
# t, m and n are integers
</pre>
<p>The <em>number</em>'s last digit is considered by the procedure to be true at +/-1,
For example, 1.00 is the interval [0.99, 1.01],
and 0.43 the interval [0.42, 0.44].
The Pi constant may be approximated by the number &quot;3.1415&quot;.
This string could be considered as the interval [3.1414 , 3.1416] by <b class="cmd">fromstr</b>.
So, when you mean 1.0 as a double, you may have to write 1.000000 to get enough precision.
To learn more about this subject, see <span class="sectref"><a href="#section7">PRECISION</a></span>.</p>
<p>For example :</p>
<pre class="doctools_example">
set x [fromstr 1.0000000000]
# the next line does the same, but smarter
set y [fromstr 1. 10]
</pre>
</dd>
<dt><a name="2"><b class="cmd">tostr</b> <span class="opt">?<b class="option">-nosci</b>?</span> <i class="arg">number</i></a></dt>
<dd><p>Returns a string form of a BigFloat, in which all digits are exacts.
<em>All exact digits</em> means a rounding may occur, for example to zero,
if the uncertainty interval does not clearly show the true digits.
<em>number</em> may be an integer, causing the command to return exactly the input argument.
With the <b class="option">-nosci</b> option, the number returned is never shown in scientific
notation, i.e. not like '3.4523e+5' but like '345230.'.</p>
<pre class="doctools_example">
puts [tostr [fromstr 0.99999]] ;# 1.0000
puts [tostr [fromstr 1.00001]] ;# 1.0000
puts [tostr [fromstr 0.002]] ;# 0.e-2
</pre>
<p>See <span class="sectref"><a href="#section7">PRECISION</a></span> for that matter.
See also <b class="cmd">iszero</b> for how to detect zeros, which is useful when performing a division.</p></dd>
<dt><a name="3"><b class="cmd">fromdouble</b> <i class="arg">double</i> <span class="opt">?<i class="arg">decimals</i>?</span></a></dt>
<dd><p>Converts a double (a simple floating-point value) to a BigFloat, with
exactly <i class="arg">decimals</i> digits.  Without the <i class="arg">decimals</i> argument,
it behaves like <b class="cmd">fromstr</b>.
Here, the only important feature you might care of is the ability
to create BigFloats with a fixed number of <i class="arg">decimals</i>.</p>
<pre class="doctools_example">
tostr [fromstr 1.111 4]
# returns : 1.111000 (3 zeros)
tostr [fromdouble 1.111 4]
# returns : 1.111
</pre>
</dd>
<dt><a name="4"><b class="cmd">todouble</b> <i class="arg">number</i></a></dt>
<dd><p>Returns a double, that may be used in <em>expr</em>,
from a BigFloat.</p></dd>
<dt><a name="5"><b class="cmd">isInt</b> <i class="arg">number</i></a></dt>
<dd><p>Returns 1 if <em>number</em> is an integer, 0 otherwise.</p></dd>
<dt><a name="6"><b class="cmd">isFloat</b> <i class="arg">number</i></a></dt>
<dd><p>Returns 1 if <em>number</em> is a BigFloat, 0 otherwise.</p></dd>
<dt><a name="7"><b class="cmd">int2float</b> <i class="arg">integer</i> <span class="opt">?<i class="arg">decimals</i>?</span></a></dt>
<dd><p>Converts an integer to a BigFloat with <em>decimals</em> trailing zeros.
The default, and minimal, number of <em>decimals</em> is 1.
When converting back to string, one decimal is lost:</p>
<pre class="doctools_example">
set n 10
set x [int2float $n]; # like fromstr 10.0
puts [tostr $x]; # prints &quot;10.&quot;
set x [int2float $n 3]; # like fromstr 10.000
puts [tostr $x]; # prints &quot;10.00&quot;
</pre>
</dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">ARITHMETICS</a></h2>
<dl class="doctools_definitions">
<dt><a name="8"><b class="cmd">add</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd></dd>
<dt><a name="9"><b class="cmd">sub</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd></dd>
<dt><a name="10"><b class="cmd">mul</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Return the sum, difference and product of <em>x</em> by <em>y</em>.
<i class="arg">x</i> - may be either a BigFloat or an integer
<i class="arg">y</i> - may be either a BigFloat or an integer
When both are integers, these commands behave like <b class="cmd">expr</b>.</p></dd>
<dt><a name="11"><b class="cmd">div</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd></dd>
<dt><a name="12"><b class="cmd">mod</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Return the quotient and the rest of <em>x</em> divided by <em>y</em>.
Each argument (<em>x</em> and <em>y</em>) can be either a BigFloat or an integer,
but you cannot divide an integer by a BigFloat
Divide by zero throws an error.</p></dd>
<dt><a name="13"><b class="cmd">abs</b> <i class="arg">x</i></a></dt>
<dd><p>Returns the absolute value of <em>x</em></p></dd>
<dt><a name="14"><b class="cmd">opp</b> <i class="arg">x</i></a></dt>
<dd><p>Returns the opposite of <em>x</em></p></dd>
<dt><a name="15"><b class="cmd">pow</b> <i class="arg">x</i> <i class="arg">n</i></a></dt>
<dd><p>Returns <em>x</em> taken to the <em>n</em>th power.
It only works if <em>n</em> is an integer.
<em>x</em> might be a BigFloat or an integer.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">COMPARISONS</a></h2>
<dl class="doctools_definitions">
<dt><a name="16"><b class="cmd">iszero</b> <i class="arg">x</i></a></dt>
<dd><p>Returns 1 if <em>x</em> is :</p>
<ul class="doctools_itemized">
<li><p>a BigFloat close enough to zero to raise &quot;divide by zero&quot;.</p></li>
<li><p>the integer 0.</p></li>
</ul>
<p>See here how numbers that are close to zero are converted to strings:</p>
<pre class="doctools_example">
tostr [fromstr 0.001] ; # -&gt; 0.e-2
tostr [fromstr 0.000000] ; # -&gt; 0.e-5
tostr [fromstr -0.000001] ; # -&gt; 0.e-5
tostr [fromstr 0.0] ; # -&gt; 0.
tostr [fromstr 0.002] ; # -&gt; 0.e-2
set a [fromstr 0.002] ; # uncertainty interval : 0.001, 0.003
tostr  $a ; # 0.e-2
iszero $a ; # false
set a [fromstr 0.001] ; # uncertainty interval : 0.000, 0.002
tostr  $a ; # 0.e-2
iszero $a ; # true
</pre>
</dd>
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#key560">equal</a></b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Returns 1 if <em>x</em> and <em>y</em> are equal, 0 elsewhere.</p></dd>
<dt><a name="18"><b class="cmd">compare</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Returns 0 if both BigFloat arguments are equal,
1 if <em>x</em> is greater than <em>y</em>,
and -1 if <em>x</em> is lower than <em>y</em>.
You would not be able to compare an integer to a BigFloat :
the operands should be both BigFloats, or both integers.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ANALYSIS</a></h2>
<dl class="doctools_definitions">
<dt><a name="19"><b class="cmd">sqrt</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="20"><b class="cmd"><a href="../log/log.html">log</a></b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="21"><b class="cmd">exp</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="22"><b class="cmd">cos</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="23"><b class="cmd">sin</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="24"><b class="cmd">tan</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="25"><b class="cmd">cotan</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="26"><b class="cmd">acos</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="27"><b class="cmd">asin</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="28"><b class="cmd">atan</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="29"><b class="cmd">cosh</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="30"><b class="cmd">sinh</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="31"><b class="cmd">tanh</b> <i class="arg">x</i></a></dt>
<dd><p>The above functions return, respectively, the following :
square root, logarithm, exponential, cosine, sine,
tangent, cotangent, arc cosine, arc sine, arc tangent, hyperbolic
cosine, hyperbolic sine, hyperbolic tangent, of a BigFloat named <em>x</em>.</p></dd>
<dt><a name="32"><b class="cmd"><a href="../../../../index.html#key806">pi</a></b> <i class="arg">n</i></a></dt>
<dd><p>Returns a BigFloat representing the Pi constant with <em>n</em> digits after the dot.
<em>n</em> is a positive integer.</p></dd>
<dt><a name="33"><b class="cmd">rad2deg</b> <i class="arg">radians</i></a></dt>
<dd></dd>
<dt><a name="34"><b class="cmd">deg2rad</b> <i class="arg">degrees</i></a></dt>
<dd><p><i class="arg">radians</i> - angle expressed in radians (BigFloat)</p>
<p><i class="arg">degrees</i> - angle expressed in degrees (BigFloat)</p>
<p>Convert an angle from radians to degrees, and <em>vice versa</em>.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">ROUNDING</a></h2>
<dl class="doctools_definitions">
<dt><a name="35"><b class="cmd">round</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="36"><b class="cmd">ceil</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="37"><b class="cmd">floor</b> <i class="arg">x</i></a></dt>
<dd><p>The above functions return the <em>x</em> BigFloat,
rounded like with the same mathematical function in <em>expr</em>,
and returns it as an integer.</p></dd>
</dl>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">PRECISION</a></h2>
<p>How do conversions work with precision ?</p>
<ul class="doctools_itemized">
<li><p>When a BigFloat is converted from string, the internal representation
holds its uncertainty as 1 at the level of the last digit.</p></li>
<li><p>During computations, the uncertainty of each result
is internally computed the closest to the reality, thus saving the memory used.</p></li>
<li><p>When converting back to string, the digits that are printed
are not subject to uncertainty. However, some rounding is done, as not doing so
causes severe problems.</p></li>
</ul>
<p>Uncertainties are kept in the internal representation of the number ;
it is recommended to use <b class="cmd">tostr</b> only for outputting data (on the screen or in a file),
and NEVER call <b class="cmd">fromstr</b> with the result of <b class="cmd">tostr</b>.
It is better to always keep operands in their internal representation.
Due to the internals of this library, the uncertainty interval may be slightly
wider than expected, but this should not cause false digits.</p>
<p>Now you may ask this question : What precision am I going to get
after calling add, sub, mul or div?
First you set a number from the string representation and,
by the way, its uncertainty is set:</p>
<pre class="doctools_example">
set a [fromstr 1.230]
# $a belongs to [1.229, 1.231]
set a [fromstr 1.000]
# $a belongs to [0.999, 1.001]
# $a has a relative uncertainty of 0.1% : 0.001(the uncertainty)/1.000(the medium value)
</pre>
<p>The uncertainty of the sum, or the difference, of two numbers, is the sum
of their respective uncertainties.</p>
<pre class="doctools_example">
set a [fromstr 1.230]
set b [fromstr 2.340]
set sum [add $a $b]]
# the result is : [3.568, 3.572] (the last digit is known with an uncertainty of 2)
tostr $sum ; # 3.57
</pre>
<p>But when, for example, we add or substract an integer to a BigFloat,
the relative uncertainty of the result is unchanged. So it is desirable
not to convert integers to BigFloats:</p>
<pre class="doctools_example">
set a [fromstr 0.999999999]
# now something dangerous
set b [fromstr 2.000]
# the result has only 3 digits
tostr [add $a $b]
# how to keep precision at its maximum
puts [tostr [add $a 2]]
</pre>
<p>For multiplication and division, the relative uncertainties of the product
or the quotient, is the sum of the relative uncertainties of the operands.
Take care of division by zero : check each divider with <b class="cmd">iszero</b>.</p>
<pre class="doctools_example">
set num [fromstr 4.00]
set denom [fromstr 0.01]
puts [iszero $denom];# true
set quotient [div $num $denom];# error : divide by zero
# opposites of our operands
puts [compare $num [opp $num]]; # 1
puts [compare $denom [opp $denom]]; # 0 !!!
# No suprise ! 0 and its opposite are the same...
</pre>
<p>Effects of the precision of a number considered equal to zero
to the cos function:</p>
<pre class="doctools_example">
puts [tostr [cos [fromstr 0. 10]]]; # -&gt; 1.000000000
puts [tostr [cos [fromstr 0. 5]]]; # -&gt; 1.0000
puts [tostr [cos [fromstr 0e-10]]]; # -&gt; 1.000000000
puts [tostr [cos [fromstr 1e-10]]]; # -&gt; 1.000000000
</pre>
<p>BigFloats with different internal representations may be converted
to the same string.</p>
<p>For most analysis functions (cosine, square root, logarithm, etc.), determining the precision
of the result is difficult.
It seems however that in many cases, the loss of precision in the result
is of one or two digits.
There are some exceptions : for example,</p>
<pre class="doctools_example">
tostr [exp [fromstr 100.0 10]]
# returns : 2.688117142e+43 which has only 10 digits of precision, although the entry
# has 14 digits of precision.
</pre>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">WHAT ABOUT TCL 8.4 ?</a></h2>
<p>If your setup do not provide Tcl 8.5 but supports 8.4, the package can still be loaded,
switching back to <em>math::bigfloat</em> 1.2. Indeed, an important function introduced in Tcl 8.5
is required - the ability to handle bignums, that we can do with <b class="cmd">expr</b>.
Before 8.5, this ability was provided by several packages,
including the pure-Tcl <em>math::bignum</em> package provided by <em>tcllib</em>.
In this case, all you need to know, is that arguments to the commands explained here,
are expected to be in their internal representation.
So even with integers, you will need to call <b class="cmd">fromstr</b>
and <b class="cmd">tostr</b> in order to convert them between string and internal representations.</p>
<pre class="doctools_example">
#
# with Tcl 8.5
# ============
set a [pi 20]
# round returns an integer and 'everything is a string' applies to integers
# whatever big they are
puts [round [mul $a 10000000000]]
#
# the same with Tcl 8.4
# =====================
set a [pi 20]
# bignums (arbitrary length integers) need a conversion hook
set b [fromstr 10000000000]
# round returns a bignum:
# before printing it, we need to convert it with 'tostr'
puts [tostr [round [mul $a $b]]]
</pre>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">NAMESPACES AND OTHER PACKAGES</a></h2>
<p>We have not yet discussed about namespaces
because we assumed that you had imported public commands into the global namespace,
like this:</p>
<pre class="doctools_example">
namespace import ::math::bigfloat::*
</pre>
<p>If you matter much about avoiding names conflicts,
I considere it should be resolved by the following :</p>
<pre class="doctools_example">
package require math::bigfloat
# beware: namespace ensembles are not available in Tcl 8.4
namespace eval ::math::bigfloat {namespace ensemble create -command ::bigfloat}
# from now, the bigfloat command takes as subcommands all original math::bigfloat::* commands
set a [bigfloat sub [bigfloat fromstr 2.000] [bigfloat fromstr 0.530]]
puts [bigfloat tostr $a]
</pre>
</div>
<div id="section10" class="doctools_section"><h2><a name="section10">EXAMPLES</a></h2>
<p>Guess what happens when you are doing some astronomy. Here is an example :</p>
<pre class="doctools_example">
# convert acurrate angles with a millisecond-rated accuracy
proc degree-angle {degrees minutes seconds milliseconds} {
    set result 0
    set div 1
    foreach factor {1 1000 60 60} var [list $milliseconds $seconds $minutes $degrees] {
        # we convert each entry var into milliseconds
        set div [expr {$div*$factor}]
        incr result [expr {$var*$div}]
    }
    return [div [int2float $result] $div]
}
# load the package
package require math::bigfloat
namespace import ::math::bigfloat::*
# work with angles : a standard formula for navigation (taking bearings)
set angle1 [deg2rad [degree-angle 20 30 40   0]]
set angle2 [deg2rad [degree-angle 21  0 50 500]]
set opposite3 [deg2rad [degree-angle 51  0 50 500]]
set sinProduct [mul [sin $angle1] [sin $angle2]]
set cosProduct [mul [cos $angle1] [cos $angle2]]
set angle3 [asin [add [mul $sinProduct [cos $opposite3]] $cosProduct]]
puts &quot;angle3 : [tostr [rad2deg $angle3]]&quot;
</pre>
</div>
<div id="section11" class="doctools_section"><h2><a name="section11">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: bignum :: float</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key751">computations</a>, <a href="../../../../index.html#key393">floating-point</a>, <a href="../../../../index.html#key750">interval</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key289">multiprecision</a>, <a href="../../../../index.html#key288">tcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008, by Stephane Arnold &lt;stephanearnold at yahoo dot fr&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/bignum.html.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343

<div class='fossil-doc' data-title='math::bignum - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::bignum(n) 3.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::bignum - Arbitrary precision integer numbers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">API</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.4?</span></b></li>
<li>package require <b class="pkgname">math::bignum <span class="opt">?3.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::bignum::fromstr</b> <i class="arg">string</i> ?<i class="arg">radix</i>?</a></li>
<li><a href="#2"><b class="cmd">::math::bignum::tostr</b> <i class="arg">bignum</i> ?<i class="arg">radix</i>?</a></li>
<li><a href="#3"><b class="cmd">::math::bignum::sign</b> <i class="arg">bignum</i></a></li>
<li><a href="#4"><b class="cmd">::math::bignum::abs</b> <i class="arg">bignum</i></a></li>
<li><a href="#5"><b class="cmd">::math::bignum::cmp</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#6"><b class="cmd">::math::bignum::iszero</b> <i class="arg">bignum</i></a></li>
<li><a href="#7"><b class="cmd">::math::bignum::lt</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#8"><b class="cmd">::math::bignum::le</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#9"><b class="cmd">::math::bignum::gt</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#10"><b class="cmd">::math::bignum::ge</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#11"><b class="cmd">::math::bignum::eq</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#12"><b class="cmd">::math::bignum::ne</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#13"><b class="cmd">::math::bignum::isodd</b> <i class="arg">bignum</i></a></li>
<li><a href="#14"><b class="cmd">::math::bignum::iseven</b> <i class="arg">bignum</i></a></li>
<li><a href="#15"><b class="cmd">::math::bignum::add</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#16"><b class="cmd">::math::bignum::sub</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#17"><b class="cmd">::math::bignum::mul</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#18"><b class="cmd">::math::bignum::divqr</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#19"><b class="cmd">::math::bignum::div</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#20"><b class="cmd">::math::bignum::rem</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#21"><b class="cmd">::math::bignum::mod</b> <i class="arg">n</i> <i class="arg">m</i></a></li>
<li><a href="#22"><b class="cmd">::math::bignum::pow</b> <i class="arg">base</i> <i class="arg">exp</i></a></li>
<li><a href="#23"><b class="cmd">::math::bignum::powm</b> <i class="arg">base</i> <i class="arg">exp</i> <i class="arg">m</i></a></li>
<li><a href="#24"><b class="cmd">::math::bignum::sqrt</b> <i class="arg">bignum</i></a></li>
<li><a href="#25"><b class="cmd">::math::bignum::rand</b> <i class="arg">bits</i></a></li>
<li><a href="#26"><b class="cmd">::math::bignum::lshift</b> <i class="arg">bignum</i> <i class="arg">bits</i></a></li>
<li><a href="#27"><b class="cmd">::math::bignum::rshift</b> <i class="arg">bignum</i> <i class="arg">bits</i></a></li>
<li><a href="#28"><b class="cmd">::math::bignum::bitand</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#29"><b class="cmd">::math::bignum::bitor</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#30"><b class="cmd">::math::bignum::bitxor</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#31"><b class="cmd">::math::bignum::setbit</b> <i class="arg">bignumVar</i> <i class="arg">bit</i></a></li>
<li><a href="#32"><b class="cmd">::math::bignum::clearbit</b> <i class="arg">bignumVar</i> <i class="arg">bit</i></a></li>
<li><a href="#33"><b class="cmd">::math::bignum::testbit</b> <i class="arg">bignum</i> <i class="arg">bit</i></a></li>
<li><a href="#34"><b class="cmd">::math::bignum::bits</b> <i class="arg">bignum</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The bignum package provides arbitrary precision integer math
(also known as &quot;big numbers&quot;) capabilities to the Tcl language.
Big numbers are internally represented at Tcl lists: this
package provides a set of procedures operating against
the internal representation in order to:</p>
<ul class="doctools_itemized">
<li><p>perform math operations</p></li>
<li><p>convert bignums from the internal representation to a string in
the desired radix and vice versa.</p></li>
</ul>
<p>But the two constants &quot;0&quot; and &quot;1&quot; are automatically converted to
the internal representation, in order to easily compare a number to zero,
or increment a big number.</p>
<p>The bignum interface is opaque, so
operations on bignums that are not returned by procedures
in this package (but created by hand) may lead to unspecified behaviours.
It's safe to treat bignums as pure values, so there is no need
to free a bignum, or to duplicate it via a special operation.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<p>This section shows some simple example. This library being just
a way to perform math operations, examples may be the simplest way
to learn how to work with it. Consult the API section of
this man page for information about individual procedures.</p>
<pre class="doctools_example">
    package require math::bignum
    # Multiplication of two bignums
    set a [::math::bignum::fromstr 88888881111111]
    set b [::math::bignum::fromstr 22222220000000]
    set c [::math::bignum::mul $a $b]
    puts [::math::bignum::tostr $c] ; # =&gt; will output 1975308271604953086420000000
    set c [::math::bignum::sqrt $c]
    puts [::math::bignum::tostr $c] ; # =&gt; will output 44444440277777
    # From/To string conversion in different radix
    set a [::math::bignum::fromstr 1100010101010111001001111010111 2]
    puts [::math::bignum::tostr $a 16] ; # =&gt; will output 62ab93d7
    # Factorial example
    proc fact n {
        # fromstr is not needed for 0 and 1
        set z 1
        for {set i 2} {$i &lt;= $n} {incr i} {
            set z [::math::bignum::mul $z [::math::bignum::fromstr $i]]
        }
        return $z
    }
    puts [::math::bignum::tostr [fact 100]]
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::bignum::fromstr</b> <i class="arg">string</i> ?<i class="arg">radix</i>?</a></dt>
<dd><p>Convert <em>string</em> into a bignum. If <em>radix</em> is omitted or zero,
the string is interpreted in hex if prefixed with
<em>0x</em>, in octal if prefixed with <em>ox</em>,
in binary if it's pefixed with <em>bx</em>, as a number in
radix 10 otherwise. If instead the <em>radix</em> argument
is specified in the range 2-36, the <em>string</em> is interpreted
in the given radix. Please note that this conversion is
not needed for two constants : <em>0</em> and <em>1</em>. (see the example)</p></dd>
<dt><a name="2"><b class="cmd">::math::bignum::tostr</b> <i class="arg">bignum</i> ?<i class="arg">radix</i>?</a></dt>
<dd><p>Convert <em>bignum</em> into a string representing the number
in the specified radix. If <em>radix</em> is omitted, the
default is 10.</p></dd>
<dt><a name="3"><b class="cmd">::math::bignum::sign</b> <i class="arg">bignum</i></a></dt>
<dd><p>Return the sign of the bignum.
The procedure returns 0 if the number is positive, 1 if it's negative.</p></dd>
<dt><a name="4"><b class="cmd">::math::bignum::abs</b> <i class="arg">bignum</i></a></dt>
<dd><p>Return the absolute value of the bignum.</p></dd>
<dt><a name="5"><b class="cmd">::math::bignum::cmp</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Compare the two bignums a and b, returning <em>0</em> if <em>a == b</em>,
<em>1</em> if <em>a &gt; b</em>, and <em>-1</em> if <em>a &lt; b</em>.</p></dd>
<dt><a name="6"><b class="cmd">::math::bignum::iszero</b> <i class="arg">bignum</i></a></dt>
<dd><p>Return true if <em>bignum</em> value is zero, otherwise false is returned.</p></dd>
<dt><a name="7"><b class="cmd">::math::bignum::lt</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return true if <em>a &lt; b</em>, otherwise false is returned.</p></dd>
<dt><a name="8"><b class="cmd">::math::bignum::le</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return true if <em>a &lt;= b</em>, otherwise false is returned.</p></dd>
<dt><a name="9"><b class="cmd">::math::bignum::gt</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return true if <em>a &gt; b</em>, otherwise false is returned.</p></dd>
<dt><a name="10"><b class="cmd">::math::bignum::ge</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return true if <em>a &gt;= b</em>, otherwise false is returned.</p></dd>
<dt><a name="11"><b class="cmd">::math::bignum::eq</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return true if <em>a == b</em>, otherwise false is returned.</p></dd>
<dt><a name="12"><b class="cmd">::math::bignum::ne</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return true if <em>a != b</em>, otherwise false is returned.</p></dd>
<dt><a name="13"><b class="cmd">::math::bignum::isodd</b> <i class="arg">bignum</i></a></dt>
<dd><p>Return true if <em>bignum</em> is odd.</p></dd>
<dt><a name="14"><b class="cmd">::math::bignum::iseven</b> <i class="arg">bignum</i></a></dt>
<dd><p>Return true if <em>bignum</em> is even.</p></dd>
<dt><a name="15"><b class="cmd">::math::bignum::add</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the sum of the two bignums <em>a</em> and <em>b</em>.</p></dd>
<dt><a name="16"><b class="cmd">::math::bignum::sub</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the difference of the two bignums <em>a</em> and <em>b</em>.</p></dd>
<dt><a name="17"><b class="cmd">::math::bignum::mul</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the product of the two bignums <em>a</em> and <em>b</em>.
The implementation uses Karatsuba multiplication if both
the numbers are bigger than a given threshold, otherwise
the direct algorith is used.</p></dd>
<dt><a name="18"><b class="cmd">::math::bignum::divqr</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return a two-elements list containing as first element
the quotient of the division between the two bignums
<em>a</em> and <em>b</em>, and the remainder of the division as second element.</p></dd>
<dt><a name="19"><b class="cmd">::math::bignum::div</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the quotient of the division between the two
bignums <em>a</em> and <em>b</em>.</p></dd>
<dt><a name="20"><b class="cmd">::math::bignum::rem</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the remainder of the division between the two
bignums <em>a</em> and <em>b</em>.</p></dd>
<dt><a name="21"><b class="cmd">::math::bignum::mod</b> <i class="arg">n</i> <i class="arg">m</i></a></dt>
<dd><p>Return <em>n</em> modulo <em>m</em>. This operation is
called modular reduction.</p></dd>
<dt><a name="22"><b class="cmd">::math::bignum::pow</b> <i class="arg">base</i> <i class="arg">exp</i></a></dt>
<dd><p>Return <em>base</em> raised to the exponent <em>exp</em>.</p></dd>
<dt><a name="23"><b class="cmd">::math::bignum::powm</b> <i class="arg">base</i> <i class="arg">exp</i> <i class="arg">m</i></a></dt>
<dd><p>Return <em>base</em> raised to the exponent <em>exp</em>,
modulo <em>m</em>. This function is often used in the field
of cryptography.</p></dd>
<dt><a name="24"><b class="cmd">::math::bignum::sqrt</b> <i class="arg">bignum</i></a></dt>
<dd><p>Return the integer part of the square root of <em>bignum</em></p></dd>
<dt><a name="25"><b class="cmd">::math::bignum::rand</b> <i class="arg">bits</i></a></dt>
<dd><p>Return a random number of at most <em>bits</em> bits.
The returned number is internally generated using Tcl's <em>expr rand()</em>
function and is not suitable where an unguessable and cryptographically
secure random number is needed.</p></dd>
<dt><a name="26"><b class="cmd">::math::bignum::lshift</b> <i class="arg">bignum</i> <i class="arg">bits</i></a></dt>
<dd><p>Return the result of left shifting <em>bignum</em>'s binary
representation of <em>bits</em> positions on the left.
This is equivalent to multiplying by 2^<em>bits</em> but much faster.</p></dd>
<dt><a name="27"><b class="cmd">::math::bignum::rshift</b> <i class="arg">bignum</i> <i class="arg">bits</i></a></dt>
<dd><p>Return the result of right shifting <em>bignum</em>'s binary
representation of <em>bits</em> positions on the right.
This is equivalent to dividing by <em>2^bits</em> but much faster.</p></dd>
<dt><a name="28"><b class="cmd">::math::bignum::bitand</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the result of doing a bitwise AND operation on a
and b. The operation is restricted to positive numbers,
including zero. When negative numbers are provided as
arguments the result is undefined.</p></dd>
<dt><a name="29"><b class="cmd">::math::bignum::bitor</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the result of doing a bitwise OR operation on a
and b. The operation is restricted to positive numbers,
including zero. When negative numbers are provided as
arguments the result is undefined.</p></dd>
<dt><a name="30"><b class="cmd">::math::bignum::bitxor</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the result of doing a bitwise XOR operation on a
and b. The operation is restricted to positive numbers,
including zero. When negative numbers are provided as
arguments the result is undefined.</p></dd>
<dt><a name="31"><b class="cmd">::math::bignum::setbit</b> <i class="arg">bignumVar</i> <i class="arg">bit</i></a></dt>
<dd><p>Set the bit at <em>bit</em> position to 1 in the bignum stored
in the variable <em>bignumVar</em>. Bit 0 is the least significant.</p></dd>
<dt><a name="32"><b class="cmd">::math::bignum::clearbit</b> <i class="arg">bignumVar</i> <i class="arg">bit</i></a></dt>
<dd><p>Set the bit at <em>bit</em> position to 0 in the bignum stored
in the variable <em>bignumVar</em>. Bit 0 is the least significant.</p></dd>
<dt><a name="33"><b class="cmd">::math::bignum::testbit</b> <i class="arg">bignum</i> <i class="arg">bit</i></a></dt>
<dd><p>Return true if the bit at the <em>bit</em> position of <em>bignum</em>
is on, otherwise false is returned. If <em>bit</em> is out of
range, it is considered as set to zero.</p></dd>
<dt><a name="34"><b class="cmd">::math::bignum::bits</b> <i class="arg">bignum</i></a></dt>
<dd><p>Return the number of bits needed to represent bignum in radix 2.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: bignum</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key287">bignums</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key289">multiprecision</a>, <a href="../../../../index.html#key288">tcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Salvatore Sanfilippo &lt;antirez at invece dot org&gt;<br>
Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus at users dot sourceforge dot net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/calculus.html.





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498

<div class='fossil-doc' data-title='math::calculus - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::calculus(n) 0.8.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::calculus - Integration and ordinary differential equations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">math::calculus 0.8.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::calculus::integral</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">nosteps</i> <i class="arg">func</i></a></li>
<li><a href="#2"><b class="cmd">::math::calculus::integralExpr</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">nosteps</i> <i class="arg">expression</i></a></li>
<li><a href="#3"><b class="cmd">::math::calculus::integral2D</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">func</i></a></li>
<li><a href="#4"><b class="cmd">::math::calculus::integral2D_accurate</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">func</i></a></li>
<li><a href="#5"><b class="cmd">::math::calculus::integral3D</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">zinterval</i> <i class="arg">func</i></a></li>
<li><a href="#6"><b class="cmd">::math::calculus::integral3D_accurate</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">zinterval</i> <i class="arg">func</i></a></li>
<li><a href="#7"><b class="cmd">::math::calculus::qk15</b> <i class="arg">xstart</i> <i class="arg">xend</i> <i class="arg">func</i> <i class="arg">nosteps</i></a></li>
<li><a href="#8"><b class="cmd">::math::calculus::qk15_detailed</b> <i class="arg">xstart</i> <i class="arg">xend</i> <i class="arg">func</i> <i class="arg">nosteps</i></a></li>
<li><a href="#9"><b class="cmd">::math::calculus::eulerStep</b> <i class="arg">t</i> <i class="arg">tstep</i> <i class="arg">xvec</i> <i class="arg">func</i></a></li>
<li><a href="#10"><b class="cmd">::math::calculus::heunStep</b> <i class="arg">t</i> <i class="arg">tstep</i> <i class="arg">xvec</i> <i class="arg">func</i></a></li>
<li><a href="#11"><b class="cmd">::math::calculus::rungeKuttaStep</b> <i class="arg">t</i> <i class="arg">tstep</i> <i class="arg">xvec</i> <i class="arg">func</i></a></li>
<li><a href="#12"><b class="cmd">::math::calculus::boundaryValueSecondOrder</b> <i class="arg">coeff_func</i> <i class="arg">force_func</i> <i class="arg">leftbnd</i> <i class="arg">rightbnd</i> <i class="arg">nostep</i></a></li>
<li><a href="#13"><b class="cmd">::math::calculus::solveTriDiagonal</b> <i class="arg">acoeff</i> <i class="arg">bcoeff</i> <i class="arg">ccoeff</i> <i class="arg">dvalue</i></a></li>
<li><a href="#14"><b class="cmd">::math::calculus::newtonRaphson</b> <i class="arg">func</i> <i class="arg">deriv</i> <i class="arg">initval</i></a></li>
<li><a href="#15"><b class="cmd">::math::calculus::newtonRaphsonParameters</b> <i class="arg">maxiter</i> <i class="arg">tolerance</i></a></li>
<li><a href="#16"><b class="cmd">::math::calculus::regula_falsi</b> <i class="arg">f</i> <i class="arg">xb</i> <i class="arg">xe</i> <i class="arg">eps</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements several simple mathematical algorithms:</p>
<ul class="doctools_itemized">
<li><p>The integration of a function over an interval</p></li>
<li><p>The numerical integration of a system of ordinary differential
equations.</p></li>
<li><p>Estimating the root(s) of an equation of one variable.</p></li>
</ul>
<p>The package is fully implemented in Tcl. No particular attention has
been paid to the accuracy of the calculations. Instead, well-known
algorithms have been used in a straightforward manner.</p>
<p>This document describes the procedures and explains their usage.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>This package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::calculus::integral</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">nosteps</i> <i class="arg">func</i></a></dt>
<dd><p>Determine the integral of the given function using the Simpson
rule. The interval for the integration is [<i class="arg">begin</i>, <i class="arg">end</i>].
The remaining arguments are:</p>
<dl class="doctools_definitions">
<dt><i class="arg">nosteps</i></dt>
<dd><p>Number of steps in which the interval is divided.</p></dd>
<dt><i class="arg">func</i></dt>
<dd><p>Function to be integrated. It should take one single argument.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::calculus::integralExpr</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">nosteps</i> <i class="arg">expression</i></a></dt>
<dd><p>Similar to the previous proc, this one determines the integral of
the given <i class="arg">expression</i> using the Simpson rule.
The interval for the integration is [<i class="arg">begin</i>, <i class="arg">end</i>].
The remaining arguments are:</p>
<dl class="doctools_definitions">
<dt><i class="arg">nosteps</i></dt>
<dd><p>Number of steps in which the interval is divided.</p></dd>
<dt><i class="arg">expression</i></dt>
<dd><p>Expression to be integrated. It should
use the variable &quot;x&quot; as the only variable (the &quot;integrate&quot;)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::calculus::integral2D</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">func</i></a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">::math::calculus::integral2D_accurate</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">func</i></a></dt>
<dd><p>The commands <b class="cmd">integral2D</b> and <b class="cmd">integral2D_accurate</b> calculate the
integral of a function of two variables over the rectangle given by the
first two arguments, each a list of three items, the start and
stop interval for the variable and the number of steps.</p>
<p>The command <b class="cmd">integral2D</b> evaluates the function at the centre of
each rectangle, whereas the command <b class="cmd">integral2D_accurate</b> uses a
four-point quadrature formula. This results in an exact integration of
polynomials of third degree or less.</p>
<p>The function must take two arguments and return the function
value.</p></dd>
<dt><a name="5"><b class="cmd">::math::calculus::integral3D</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">zinterval</i> <i class="arg">func</i></a></dt>
<dd></dd>
<dt><a name="6"><b class="cmd">::math::calculus::integral3D_accurate</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">zinterval</i> <i class="arg">func</i></a></dt>
<dd><p>The commands <b class="cmd">integral3D</b> and <b class="cmd">integral3D_accurate</b> are the
three-dimensional equivalent of <b class="cmd">integral2D</b> and <b class="cmd">integral3D_accurate</b>.
The function <em>func</em> takes three arguments and is integrated over the block in
3D space given by three intervals.</p></dd>
<dt><a name="7"><b class="cmd">::math::calculus::qk15</b> <i class="arg">xstart</i> <i class="arg">xend</i> <i class="arg">func</i> <i class="arg">nosteps</i></a></dt>
<dd><p>Determine the integral of the given function using the Gauss-Kronrod 15 points quadrature rule.
The returned value is the estimate of the integral over the interval [<i class="arg">xstart</i>, <i class="arg">xend</i>].
The remaining arguments are:</p>
<dl class="doctools_definitions">
<dt><i class="arg">func</i></dt>
<dd><p>Function to be integrated. It should take one single argument.</p></dd>
<dt><span class="opt">?nosteps?</span></dt>
<dd><p>Number of steps in which the interval is divided. Defaults to 1.</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::calculus::qk15_detailed</b> <i class="arg">xstart</i> <i class="arg">xend</i> <i class="arg">func</i> <i class="arg">nosteps</i></a></dt>
<dd><p>Determine the integral of the given function using the Gauss-Kronrod 15 points quadrature rule.
The interval for the integration is [<i class="arg">xstart</i>, <i class="arg">xend</i>].
The procedure returns a list of four values:</p>
<ul class="doctools_itemized">
<li><p>The estimate of the integral over the specified interval (I).</p></li>
<li><p>An estimate of the absolute error in I.</p></li>
<li><p>The estimate of the integral of the absolute value of the function over the interval.</p></li>
<li><p>The estimate of the integral of the absolute value of the function minus its mean over the interval.</p></li>
</ul>
<p>The remaining arguments are:</p>
<dl class="doctools_definitions">
<dt><i class="arg">func</i></dt>
<dd><p>Function to be integrated. It should take one single argument.</p></dd>
<dt><span class="opt">?nosteps?</span></dt>
<dd><p>Number of steps in which the interval is divided. Defaults to 1.</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::calculus::eulerStep</b> <i class="arg">t</i> <i class="arg">tstep</i> <i class="arg">xvec</i> <i class="arg">func</i></a></dt>
<dd><p>Set a single step in the numerical integration of a system of
differential equations. The method used is Euler's.</p>
<dl class="doctools_definitions">
<dt><i class="arg">t</i></dt>
<dd><p>Value of the independent variable (typically time)
at the beginning of the step.</p></dd>
<dt><i class="arg">tstep</i></dt>
<dd><p>Step size for the independent variable.</p></dd>
<dt><i class="arg">xvec</i></dt>
<dd><p>List (vector) of dependent values</p></dd>
<dt><i class="arg">func</i></dt>
<dd><p>Function of t and the dependent values, returning
a list of the derivatives of the dependent values. (The lengths of
xvec and the return value of &quot;func&quot; must match).</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::calculus::heunStep</b> <i class="arg">t</i> <i class="arg">tstep</i> <i class="arg">xvec</i> <i class="arg">func</i></a></dt>
<dd><p>Set a single step in the numerical integration of a system of
differential equations. The method used is Heun's.</p>
<dl class="doctools_definitions">
<dt><i class="arg">t</i></dt>
<dd><p>Value of the independent variable (typically time)
at the beginning of the step.</p></dd>
<dt><i class="arg">tstep</i></dt>
<dd><p>Step size for the independent variable.</p></dd>
<dt><i class="arg">xvec</i></dt>
<dd><p>List (vector) of dependent values</p></dd>
<dt><i class="arg">func</i></dt>
<dd><p>Function of t and the dependent values, returning
a list of the derivatives of the dependent values. (The lengths of
xvec and the return value of &quot;func&quot; must match).</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::calculus::rungeKuttaStep</b> <i class="arg">t</i> <i class="arg">tstep</i> <i class="arg">xvec</i> <i class="arg">func</i></a></dt>
<dd><p>Set a single step in the numerical integration of a system of
differential equations. The method used is Runge-Kutta 4th
order.</p>
<dl class="doctools_definitions">
<dt><i class="arg">t</i></dt>
<dd><p>Value of the independent variable (typically time)
at the beginning of the step.</p></dd>
<dt><i class="arg">tstep</i></dt>
<dd><p>Step size for the independent variable.</p></dd>
<dt><i class="arg">xvec</i></dt>
<dd><p>List (vector) of dependent values</p></dd>
<dt><i class="arg">func</i></dt>
<dd><p>Function of t and the dependent values, returning
a list of the derivatives of the dependent values. (The lengths of
xvec and the return value of &quot;func&quot; must match).</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::math::calculus::boundaryValueSecondOrder</b> <i class="arg">coeff_func</i> <i class="arg">force_func</i> <i class="arg">leftbnd</i> <i class="arg">rightbnd</i> <i class="arg">nostep</i></a></dt>
<dd><p>Solve a second order linear differential equation with boundary
values at two sides. The equation has to be of the form (the
&quot;conservative&quot; form):</p>
<pre class="doctools_example">
         d      dy     d
         -- A(x)--  +  -- B(x)y + C(x)y  =  D(x)
         dx     dx     dx
</pre>
<p>Ordinarily, such an equation would be written as:</p>
<pre class="doctools_example">
             d2y        dy
         a(x)---  + b(x)-- + c(x) y  =  D(x)
             dx2        dx
</pre>
<p>The first form is easier to discretise (by integrating over a
finite volume) than the second form. The relation between the two
forms is fairly straightforward:</p>
<pre class="doctools_example">
         A(x)  =  a(x)
         B(x)  =  b(x) - a'(x)
         C(x)  =  c(x) - B'(x)  =  c(x) - b'(x) + a''(x)
</pre>
<p>Because of the differentiation, however, it is much easier to ask
the user to provide the functions A, B and C directly.</p>
<dl class="doctools_definitions">
<dt><i class="arg">coeff_func</i></dt>
<dd><p>Procedure returning the three coefficients
(A, B, C) of the equation, taking as its one argument the x-coordinate.</p></dd>
<dt><i class="arg">force_func</i></dt>
<dd><p>Procedure returning the right-hand side
(D) as a function of the x-coordinate.</p></dd>
<dt><i class="arg">leftbnd</i></dt>
<dd><p>A list of two values: the x-coordinate of the
left boundary and the value at that boundary.</p></dd>
<dt><i class="arg">rightbnd</i></dt>
<dd><p>A list of two values: the x-coordinate of the
right boundary and the value at that boundary.</p></dd>
<dt><i class="arg">nostep</i></dt>
<dd><p>Number of steps by which to discretise the
interval.
The procedure returns a list of x-coordinates and the approximated
values of the solution.</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::calculus::solveTriDiagonal</b> <i class="arg">acoeff</i> <i class="arg">bcoeff</i> <i class="arg">ccoeff</i> <i class="arg">dvalue</i></a></dt>
<dd><p>Solve a system of linear equations Ax = b with A a tridiagonal
matrix. Returns the solution as a list.</p>
<dl class="doctools_definitions">
<dt><i class="arg">acoeff</i></dt>
<dd><p>List of values on the lower diagonal</p></dd>
<dt><i class="arg">bcoeff</i></dt>
<dd><p>List of values on the main diagonal</p></dd>
<dt><i class="arg">ccoeff</i></dt>
<dd><p>List of values on the upper diagonal</p></dd>
<dt><i class="arg">dvalue</i></dt>
<dd><p>List of values on the righthand-side</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::math::calculus::newtonRaphson</b> <i class="arg">func</i> <i class="arg">deriv</i> <i class="arg">initval</i></a></dt>
<dd><p>Determine the root of an equation given by</p>
<pre class="doctools_example">
    func(x) = 0
</pre>
<p>using the method of Newton-Raphson. The procedure takes the following
arguments:</p>
<dl class="doctools_definitions">
<dt><i class="arg">func</i></dt>
<dd><p>Procedure that returns the value the function at x</p></dd>
<dt><i class="arg">deriv</i></dt>
<dd><p>Procedure that returns the derivative of the function at x</p></dd>
<dt><i class="arg">initval</i></dt>
<dd><p>Initial value for x</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::calculus::newtonRaphsonParameters</b> <i class="arg">maxiter</i> <i class="arg">tolerance</i></a></dt>
<dd><p>Set the numerical parameters for the Newton-Raphson method:</p>
<dl class="doctools_definitions">
<dt><i class="arg">maxiter</i></dt>
<dd><p>Maximum number of iteration steps (defaults to 20)</p></dd>
<dt><i class="arg">tolerance</i></dt>
<dd><p>Relative precision (defaults to 0.001)</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::calculus::regula_falsi</b> <i class="arg">f</i> <i class="arg">xb</i> <i class="arg">xe</i> <i class="arg">eps</i></a></dt>
<dd><p>Return an estimate of the zero or one of the zeros of the function
contained in the interval [xb,xe]. The error in this estimate is of the
order of eps*abs(xe-xb), the actual error may be slightly larger.</p>
<p>The method used is the so-called <em>regula falsi</em> or
<em>false position</em> method. It is a straightforward implementation.
The method is robust, but requires that the interval brackets a zero or
at least an uneven number of zeros, so that the value of the function at
the start has a different sign than the value at the end.</p>
<p>In contrast to Newton-Raphson there is no need for the computation of
the function's derivative.</p>
<dl class="doctools_arguments">
<dt>command <i class="arg">f</i></dt>
<dd><p>Name of the command that evaluates the function for
which the zero is to be returned</p></dd>
<dt>float <i class="arg">xb</i></dt>
<dd><p>Start of the interval in which the zero is supposed
to lie</p></dd>
<dt>float <i class="arg">xe</i></dt>
<dd><p>End of the interval</p></dd>
<dt>float <i class="arg">eps</i></dt>
<dd><p>Relative allowed error (defaults to 1.0e-4)</p></dd>
</dl></dd>
</dl>
<p><em>Notes:</em></p>
<p>Several of the above procedures take the <em>names</em> of procedures as
arguments. To avoid problems with the <em>visibility</em> of these
procedures, the fully-qualified name of these procedures is determined
inside the calculus routines. For the user this has only one
consequence: the named procedure must be visible in the calling
procedure. For instance:</p>
<pre class="doctools_example">
    namespace eval ::mySpace {
       namespace export calcfunc
       proc calcfunc { x } { return $x }
    }
    #
    # Use a fully-qualified name
    #
    namespace eval ::myCalc {
       proc detIntegral { begin end } {
          return [integral $begin $end 100 ::mySpace::calcfunc]
       }
    }
    #
    # Import the name
    #
    namespace eval ::myCalc {
       namespace import ::mySpace::calcfunc
       proc detIntegral { begin end } {
          return [integral $begin $end 100 calcfunc]
       }
    }
</pre>
<p>Enhancements for the second-order boundary value problem:</p>
<ul class="doctools_itemized">
<li><p>Other types of boundary conditions (zero gradient, zero flux)</p></li>
<li><p>Other schematisation of the first-order term (now central
differences are used, but upstream differences might be useful too).</p></li>
</ul>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<p>Let us take a few simple examples:</p>
<p>Integrate x over the interval [0,100] (20 steps):</p>
<pre class="doctools_example">
proc linear_func { x } { return $x }
puts &quot;Integral: [::math::calculus::integral 0 100 20 linear_func]&quot;
</pre>
<p>For simple functions, the alternative could be:</p>
<pre class="doctools_example">
puts &quot;Integral: [::math::calculus::integralExpr 0 100 20 {$x}]&quot;
</pre>
<p>Do not forget the braces!</p>
<p>The differential equation for a dampened oscillator:</p>
<pre class="doctools_example">
x'' + rx' + wx = 0
</pre>
<p>can be split into a system of first-order equations:</p>
<pre class="doctools_example">
x' = y
y' = -ry - wx
</pre>
<p>Then this system can be solved with code like this:</p>
<pre class="doctools_example">
proc dampened_oscillator { t xvec } {
   set x  [lindex $xvec 0]
   set x1 [lindex $xvec 1]
   return [list $x1 [expr {-$x1-$x}]]
}
set xvec   { 1.0 0.0 }
set t      0.0
set tstep  0.1
for { set i 0 } { $i &lt; 20 } { incr i } {
   set result [::math::calculus::eulerStep $t $tstep $xvec dampened_oscillator]
   puts &quot;Result ($t): $result&quot;
   set t      [expr {$t+$tstep}]
   set xvec   $result
}
</pre>
<p>Suppose we have the boundary value problem:</p>
<pre class="doctools_example">
    Dy'' + ky = 0
    x = 0: y = 1
    x = L: y = 0
</pre>
<p>This boundary value problem could originate from the diffusion of a
decaying substance.</p>
<p>It can be solved with the following fragment:</p>
<pre class="doctools_example">
   proc coeffs { x } { return [list $::Diff 0.0 $::decay] }
   proc force  { x } { return 0.0 }
   set Diff   1.0e-2
   set decay  0.0001
   set length 100.0
   set y [::math::calculus::boundaryValueSecondOrder \
      coeffs force {0.0 1.0} [list $length 0.0] 100]
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: calculus</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>romberg</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key784">calculus</a>, <a href="../../../../index.html#key785">differential equations</a>, <a href="../../../../index.html#key783">integration</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key786">roots</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002,2003,2004 Arjen Markus</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/combinatorics.html.











































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

<div class='fossil-doc' data-title='math::combinatorics - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::combinatorics(n) 1.2.3 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::combinatorics - Combinatorial functions in the Tcl Math Library</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">math <span class="opt">?1.2.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::ln_Gamma</b> <i class="arg">z</i></a></li>
<li><a href="#2"><b class="cmd">::math::factorial</b> <i class="arg">x</i></a></li>
<li><a href="#3"><b class="cmd">::math::choose</b> <i class="arg">n k</i></a></li>
<li><a href="#4"><b class="cmd">::math::Beta</b> <i class="arg">z w</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package"><a href="math.html">math</a></b> package contains implementations of several
functions useful in combinatorial problems.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::ln_Gamma</b> <i class="arg">z</i></a></dt>
<dd><p>Returns the natural logarithm of the Gamma function for the argument
<i class="arg">z</i>.</p>
<p>The Gamma function is defined as the improper integral from zero to
positive infinity of</p>
<pre class="doctools_example">
  t**(x-1)*exp(-t) dt
</pre>
<p>The approximation used in the Tcl Math Library is from Lanczos,
<em>ISIAM J. Numerical Analysis, series B,</em> volume 1, p. 86.
For &quot;<b class="variable">x</b> &gt; 1&quot;, the absolute error of the result is claimed to be
smaller than 5.5*10**-10 -- that is, the resulting value of Gamma when</p>
<pre class="doctools_example">
  exp( ln_Gamma( x) )
</pre>
<p>is computed is expected to be precise to better than nine significant
figures.</p></dd>
<dt><a name="2"><b class="cmd">::math::factorial</b> <i class="arg">x</i></a></dt>
<dd><p>Returns the factorial of the argument <i class="arg">x</i>.</p>
<p>For integer <i class="arg">x</i>, 0 &lt;= <i class="arg">x</i> &lt;= 12, an exact integer result is
returned.</p>
<p>For integer <i class="arg">x</i>, 13 &lt;= <i class="arg">x</i> &lt;= 21, an exact floating-point
result is returned on machines with IEEE floating point.</p>
<p>For integer <i class="arg">x</i>, 22 &lt;= <i class="arg">x</i> &lt;= 170, the result is exact to 1
ULP.</p>
<p>For real <i class="arg">x</i>, <i class="arg">x</i> &gt;= 0, the result is approximated by
computing <i class="term">Gamma(x+1)</i> using the <b class="cmd">::math::ln_Gamma</b>
function, and the result is expected to be precise to better than nine
significant figures.</p>
<p>It is an error to present <i class="arg">x</i> &lt;= -1 or <i class="arg">x</i> &gt; 170, or a value
of <i class="arg">x</i> that is not numeric.</p></dd>
<dt><a name="3"><b class="cmd">::math::choose</b> <i class="arg">n k</i></a></dt>
<dd><p>Returns the binomial coefficient <i class="term">C(n, k)</i></p>
<pre class="doctools_example">
   C(n,k) = n! / k! (n-k)!
</pre>
<p>If both parameters are integers and the result fits in 32 bits, the
result is rounded to an integer.</p>
<p>Integer results are exact up to at least <i class="arg">n</i> = 34.  Floating point
results are precise to better than nine significant figures.</p></dd>
<dt><a name="4"><b class="cmd">::math::Beta</b> <i class="arg">z w</i></a></dt>
<dd><p>Returns the Beta function of the parameters <i class="arg">z</i> and <i class="arg">w</i>.</p>
<pre class="doctools_example">
   Beta(z,w) = Beta(w,z) = Gamma(z) * Gamma(w) / Gamma(z+w)
</pre>
<p>Results are returned as a floating point number precise to better than
nine significant digits provided that <i class="arg">w</i> and <i class="arg">z</i> are both at
least 1.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/constants.html.









































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244

<div class='fossil-doc' data-title='math::constants - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::constants(n) 1.0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::constants - Mathematical and numerical constants</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">Constants</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.3?</span></b></li>
<li>package require <b class="pkgname">math::constants <span class="opt">?1.0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::constants::constants</b> <i class="arg">args</i></a></li>
<li><a href="#2"><b class="cmd">::math::constants::print-constants</b> <i class="arg">args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package defines some common mathematical and numerical constants.
By using the package you get consistent values for numbers like pi and
ln(10).</p>
<p>It defines two commands:</p>
<ul class="doctools_itemized">
<li><p>One for importing the constants</p></li>
<li><p>One for reporting which constants are defined and what values they
actually have.</p></li>
</ul>
<p>The motivation for this package is that quite often, with
(mathematical) computations, you need a good approximation to, say,
the ratio of degrees to radians. You can, of course, define this
like:</p>
<pre class="doctools_example">
    variable radtodeg [expr {180.0/(4.0*atan(1.0))}]
</pre>
<p>and use the variable radtodeg whenever you need the conversion.</p>
<p>This has two drawbacks:</p>
<ul class="doctools_itemized">
<li><p>You need to remember the proper formula or value and that is
error-prone.</p></li>
<li><p>Especially with the use of mathematical functions like <em>atan</em>
you assume that they have been accurately implemented. This is seldom or
never the case and for each platform you can get subtle differences.</p></li>
</ul>
<p>Here is the way you can do it with the <em>math::constants</em> package:</p>
<pre class="doctools_example">
    package require math::constants
    ::math::constants::constants radtodeg degtorad
</pre>
<p>which creates two variables, radtodeg and (its reciprocal) degtorad
in the calling namespace.</p>
<p>Constants that have been defined (their values are mostly taken
from mathematical tables with more precision than usually can be
handled) include:</p>
<ul class="doctools_itemized">
<li><p>basic constants like pi, e, gamma (Euler's constant)</p></li>
<li><p>derived values like ln(10) and sqrt(2)</p></li>
<li><p>purely numerical values such as 1/3 that are included for convenience
and for the fact that certain seemingly trivial computations like:</p>
<pre class="doctools_example">
    set value [expr {3.0*$onethird}]
</pre>
<p>give <em>exactly</em> the value you expect (if IEEE arithmetic is
available).</p></li>
</ul>
<p>The full set of named constants is listed in section <span class="sectref"><a href="#section3">Constants</a></span>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::constants::constants</b> <i class="arg">args</i></a></dt>
<dd><p>Import the constants whose names are given as arguments</p></dd>
<dt><a name="2"><b class="cmd">::math::constants::print-constants</b> <i class="arg">args</i></a></dt>
<dd><p>Print the constants whose names are given as arguments on the screen
(name, value and description) or, if no arguments are given, print all
defined constants. This is mainly a convenience procedure.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Constants</a></h2>
<dl class="doctools_definitions">
<dt><b class="const">pi</b></dt>
<dd><p>Ratio of circle circumference to diameter</p></dd>
<dt><b class="const">e</b></dt>
<dd><p>Base for natural logarithm</p></dd>
<dt><b class="const">ln10</b></dt>
<dd><p>Natural logarithm of 10</p></dd>
<dt><b class="const">phi</b></dt>
<dd><p>Golden ratio</p></dd>
<dt><b class="const">gamma</b></dt>
<dd><p>Euler's constant</p></dd>
<dt><b class="const">sqrt2</b></dt>
<dd><p>Square root of 2</p></dd>
<dt><b class="const">thirdrt2</b></dt>
<dd><p>One-third power of 2</p></dd>
<dt><b class="const">sqrt3</b></dt>
<dd><p>Square root of 3</p></dd>
<dt><b class="const">radtodeg</b></dt>
<dd><p>Conversion from radians to degrees</p></dd>
<dt><b class="const">degtorad</b></dt>
<dd><p>Conversion from degrees to radians</p></dd>
<dt><b class="const">onethird</b></dt>
<dd><p>One third (0.3333....)</p></dd>
<dt><b class="const">twothirds</b></dt>
<dd><p>Two thirds (0.6666....)</p></dd>
<dt><b class="const">onesixth</b></dt>
<dd><p>One sixth (0.1666....)</p></dd>
<dt><b class="const">huge</b></dt>
<dd><p>(Approximately) largest number</p></dd>
<dt><b class="const">tiny</b></dt>
<dd><p>(Approximately) smallest number not equal zero</p></dd>
<dt><b class="const">eps</b></dt>
<dd><p>Smallest number such that 1+eps != 1</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: constants</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key610">constants</a>, <a href="../../../../index.html#key808">degrees</a>, <a href="../../../../index.html#key807">e</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key806">pi</a>, <a href="../../../../index.html#key611">radians</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/decimal.html.

































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320

<div class='fossil-doc' data-title='math::decimal - Tcl Decimal Arithmetic Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::decimal(n) 1.0.3 tcllib &quot;Tcl Decimal Arithmetic Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::decimal - General decimal arithmetic</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">API</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::decimal 1.0.3</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::decimal::fromstr</b> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::math::decimal::tostr</b> <i class="arg">decimal</i></a></li>
<li><a href="#3"><b class="cmd">::math::decimal::setVariable</b> <i class="arg">variable</i> <i class="arg">setting</i></a></li>
<li><a href="#4"><b class="cmd">::math::decimal::add</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#5"><b class="cmd">::math::decimal::+</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#6"><b class="cmd">::math::decimal::subtract</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#7"><b class="cmd">::math::decimal::-</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#8"><b class="cmd">::math::decimal::multiply</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#9"><b class="cmd">::math::decimal::*</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#10"><b class="cmd">::math::decimal::divide</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#11"><b class="cmd">::math::decimal::/</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#12"><b class="cmd">::math::decimal::divideint</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#13"><b class="cmd">::math::decimal::remainder</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#14"><b class="cmd">::math::decimal::abs</b> <i class="arg">decimal</i></a></li>
<li><a href="#15"><b class="cmd">::math::decimal::compare</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#16"><b class="cmd">::math::decimal::max</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#17"><b class="cmd">::math::decimal::maxmag</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#18"><b class="cmd">::math::decimal::min</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#19"><b class="cmd">::math::decimal::minmag</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#20"><b class="cmd">::math::decimal::plus</b> <i class="arg">a</i></a></li>
<li><a href="#21"><b class="cmd">::math::decimal::minus</b> <i class="arg">a</i></a></li>
<li><a href="#22"><b class="cmd">::math::decimal::copynegate</b> <i class="arg">a</i></a></li>
<li><a href="#23"><b class="cmd">::math::decimal::copysign</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#24"><b class="cmd">::math::decimal::is-signed</b> <i class="arg">decimal</i></a></li>
<li><a href="#25"><b class="cmd">::math::decimal::is-zero</b> <i class="arg">decimal</i></a></li>
<li><a href="#26"><b class="cmd">::math::decimal::is-NaN</b> <i class="arg">decimal</i></a></li>
<li><a href="#27"><b class="cmd">::math::decimal::is-infinite</b> <i class="arg">decimal</i></a></li>
<li><a href="#28"><b class="cmd">::math::decimal::is-finite</b> <i class="arg">decimal</i></a></li>
<li><a href="#29"><b class="cmd">::math::decimal::fma</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">c</i></a></li>
<li><a href="#30"><b class="cmd">::math::decimal::round_half_even</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></li>
<li><a href="#31"><b class="cmd">::math::decimal::round_half_up</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></li>
<li><a href="#32"><b class="cmd">::math::decimal::round_half_down</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></li>
<li><a href="#33"><b class="cmd">::math::decimal::round_down</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></li>
<li><a href="#34"><b class="cmd">::math::decimal::round_up</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></li>
<li><a href="#35"><b class="cmd">::math::decimal::round_floor</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></li>
<li><a href="#36"><b class="cmd">::math::decimal::round_ceiling</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></li>
<li><a href="#37"><b class="cmd">::math::decimal::round_05up</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The decimal package provides decimal arithmetic support for both limited
precision floating point and arbitrary precision floating point.
Additionally, integer arithmetic is supported.</p>
<p>More information and the specifications on which this package depends can be
found on the general decimal arithmetic page at http://speleotrove.com/decimal
This package provides for:</p>
<ul class="doctools_itemized">
<li><p>A new data type decimal which is represented as a list containing sign,
mantissa and exponent.</p></li>
<li><p>Arithmetic operations on those decimal numbers such as addition, subtraction,
multiplication, etc...</p></li>
</ul>
<p>Numbers are converted to decimal format using the operation ::math::decimal::fromstr.</p>
<p>Numbers are converted back to string format using the operation
::math::decimal::tostr.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<p>This section shows some simple examples. Since the purpose of this library
is to perform decimal math operations, examples may be the simplest way
to learn how to work with it and to see the difference between using this
package and sticking with expr. Consult the API section of
this man page for information about individual procedures.</p>
<pre class="doctools_example">
    package require decimal
    # Various operations on two numbers.
    # We first convert them to decimal format.
    set a [::math::decimal::fromstr 8.2]
    set b [::math::decimal::fromstr .2]
    # Then we perform our operations. Here we multiply
    set c [::math::decimal::* $a $b]
    # Finally we convert back to string format for presentation to the user.
    puts [::math::decimal::tostr $c] ; # =&gt; will output 8.4
    # Other examples
    #
    # Subtraction
    set c [::math::decimal::- $a $b]
    puts [::math::decimal::tostr $c] ; # =&gt; will output 8.0
    # Why bother using this instead of simply expr?
    puts 8.399999999999999 ; # =&gt; will output 8.399999999999999
    puts 7.999999999999999 ; # =&gt; will output 7.999999999999999
    # See http://speleotrove.com/decimal to learn more about why this happens.
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::decimal::fromstr</b> <i class="arg">string</i></a></dt>
<dd><p>Convert <em>string</em> into a decimal.</p></dd>
<dt><a name="2"><b class="cmd">::math::decimal::tostr</b> <i class="arg">decimal</i></a></dt>
<dd><p>Convert <em>decimal</em> into a string representing the number in base 10.</p></dd>
<dt><a name="3"><b class="cmd">::math::decimal::setVariable</b> <i class="arg">variable</i> <i class="arg">setting</i></a></dt>
<dd><p>Sets the <em>variable</em> to <em>setting</em>. Valid variables are:</p>
<ul class="doctools_itemized">
<li><p><i class="arg">rounding</i> - Method of rounding to use during rescale. Valid
	methods are round_half_even, round_half_up, round_half_down,
	round_down, round_up, round_floor, round_ceiling.</p></li>
<li><p><i class="arg">precision</i> - Maximum number of digits allowed in mantissa.</p></li>
<li><p><i class="arg">extended</i> - Set to 1 for extended mode. 0 for simplified mode.</p></li>
<li><p><i class="arg">maxExponent</i> - Maximum value for the exponent. Defaults to 999.</p></li>
<li><p><i class="arg">minExponent</i> - Minimum value for the exponent. Default to -998.</p></li>
</ul></dd>
<dt><a name="4"><b class="cmd">::math::decimal::add</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">::math::decimal::+</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the sum of the two decimals <em>a</em> and <em>b</em>.</p></dd>
<dt><a name="6"><b class="cmd">::math::decimal::subtract</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd></dd>
<dt><a name="7"><b class="cmd">::math::decimal::-</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the differnece of the two decimals <em>a</em> and <em>b</em>.</p></dd>
<dt><a name="8"><b class="cmd">::math::decimal::multiply</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd></dd>
<dt><a name="9"><b class="cmd">::math::decimal::*</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the product of the two decimals <em>a</em> and <em>b</em>.</p></dd>
<dt><a name="10"><b class="cmd">::math::decimal::divide</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd></dd>
<dt><a name="11"><b class="cmd">::math::decimal::/</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the quotient of the division between the two
decimals <em>a</em> and <em>b</em>.</p></dd>
<dt><a name="12"><b class="cmd">::math::decimal::divideint</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return a the integer portion of the quotient of the division between
decimals <em>a</em> and <em>b</em></p></dd>
<dt><a name="13"><b class="cmd">::math::decimal::remainder</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Return the remainder of the division between the two
decimals <em>a</em> and <em>b</em>.</p></dd>
<dt><a name="14"><b class="cmd">::math::decimal::abs</b> <i class="arg">decimal</i></a></dt>
<dd><p>Return the absolute value of the decimal.</p></dd>
<dt><a name="15"><b class="cmd">::math::decimal::compare</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Compare the two decimals a and b, returning <em>0</em> if <em>a == b</em>,
<em>1</em> if <em>a &gt; b</em>, and <em>-1</em> if <em>a &lt; b</em>.</p></dd>
<dt><a name="16"><b class="cmd">::math::decimal::max</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Compare the two decimals a and b, and return <em>a</em> if <em>a &gt;= b</em>, and <em>b</em> if <em>a &lt; b</em>.</p></dd>
<dt><a name="17"><b class="cmd">::math::decimal::maxmag</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Compare the two decimals a and b while ignoring their signs, and return <em>a</em> if <em>abs(a) &gt;= abs(b)</em>, and <em>b</em> if <em>abs(a) &lt; abs(b)</em>.</p></dd>
<dt><a name="18"><b class="cmd">::math::decimal::min</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Compare the two decimals a and b, and return <em>a</em> if <em>a &lt;= b</em>, and <em>b</em> if <em>a &gt; b</em>.</p></dd>
<dt><a name="19"><b class="cmd">::math::decimal::minmag</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Compare the two decimals a and b while ignoring their signs, and return <em>a</em> if <em>abs(a) &lt;= abs(b)</em>, and <em>b</em> if <em>abs(a) &gt; abs(b)</em>.</p></dd>
<dt><a name="20"><b class="cmd">::math::decimal::plus</b> <i class="arg">a</i></a></dt>
<dd><p>Return the result from <em>::math::decimal::+ 0 $a</em>.</p></dd>
<dt><a name="21"><b class="cmd">::math::decimal::minus</b> <i class="arg">a</i></a></dt>
<dd><p>Return the result from <em>::math::decimal::- 0 $a</em>.</p></dd>
<dt><a name="22"><b class="cmd">::math::decimal::copynegate</b> <i class="arg">a</i></a></dt>
<dd><p>Returns <em>a</em> with the sign flipped.</p></dd>
<dt><a name="23"><b class="cmd">::math::decimal::copysign</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Returns <em>a</em> with the sign set to the sign of the <em>b</em>.</p></dd>
<dt><a name="24"><b class="cmd">::math::decimal::is-signed</b> <i class="arg">decimal</i></a></dt>
<dd><p>Return the sign of the decimal.
The procedure returns 0 if the number is positive, 1 if it's negative.</p></dd>
<dt><a name="25"><b class="cmd">::math::decimal::is-zero</b> <i class="arg">decimal</i></a></dt>
<dd><p>Return true if <em>decimal</em> value is zero, otherwise false is returned.</p></dd>
<dt><a name="26"><b class="cmd">::math::decimal::is-NaN</b> <i class="arg">decimal</i></a></dt>
<dd><p>Return true if <em>decimal</em> value is NaN (not a number), otherwise false is returned.</p></dd>
<dt><a name="27"><b class="cmd">::math::decimal::is-infinite</b> <i class="arg">decimal</i></a></dt>
<dd><p>Return true if <em>decimal</em> value is Infinite, otherwise false is returned.</p></dd>
<dt><a name="28"><b class="cmd">::math::decimal::is-finite</b> <i class="arg">decimal</i></a></dt>
<dd><p>Return true if <em>decimal</em> value is finite, otherwise false is returned.</p></dd>
<dt><a name="29"><b class="cmd">::math::decimal::fma</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">c</i></a></dt>
<dd><p>Return the result from first multiplying <em>a</em> by <em>b</em> and then adding <em>c</em>. Rescaling only occurs after completion of all operations. In this way the result may vary from that returned by performing the operations individually.</p></dd>
<dt><a name="30"><b class="cmd">::math::decimal::round_half_even</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></dt>
<dd><p>Rounds <em>decimal</em> to <em>digits</em> number of decimal points with the following rules: Round to the nearest. If equidistant, round so the final digit is even.</p></dd>
<dt><a name="31"><b class="cmd">::math::decimal::round_half_up</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></dt>
<dd><p>Rounds <em>decimal</em> to <em>digits</em> number of decimal points with the following rules: Round to the nearest. If equidistant, round up.</p></dd>
<dt><a name="32"><b class="cmd">::math::decimal::round_half_down</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></dt>
<dd><p>Rounds <em>decimal</em> to <em>digits</em> number of decimal points with the following rules: Round to the nearest. If equidistant, round down.</p></dd>
<dt><a name="33"><b class="cmd">::math::decimal::round_down</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></dt>
<dd><p>Rounds <em>decimal</em> to <em>digits</em> number of decimal points with the following rules: Round toward 0.  (Truncate)</p></dd>
<dt><a name="34"><b class="cmd">::math::decimal::round_up</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></dt>
<dd><p>Rounds <em>decimal</em> to <em>digits</em> number of decimal points with the following rules: Round away from 0</p></dd>
<dt><a name="35"><b class="cmd">::math::decimal::round_floor</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></dt>
<dd><p>Rounds <em>decimal</em> to <em>digits</em> number of decimal points with the following rules: Round toward -Infinity.</p></dd>
<dt><a name="36"><b class="cmd">::math::decimal::round_ceiling</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></dt>
<dd><p>Rounds <em>decimal</em> to <em>digits</em> number of decimal points with the following rules: Round toward Infinity</p></dd>
<dt><a name="37"><b class="cmd">::math::decimal::round_05up</b> <i class="arg">decimal</i> <i class="arg">digits</i></a></dt>
<dd><p>Rounds <em>decimal</em> to <em>digits</em> number of decimal points with the following rules: Round zero or five away from 0. The same as round-up, except that rounding up only occurs if the digit to be rounded up is 0 or 5, and after overflow
the result is the same as for round-down.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>decimal</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key769">decimal</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key288">tcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Mark Alston &lt;mark at beernut dot com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/exact.html.

















































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<div class='fossil-doc' data-title='math::exact - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::exact(n) 1.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::exact - Exact Real Arithmetic</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Procedures</a></li>
<li class="doctools_section"><a href="#section3">Parameters</a></li>
<li class="doctools_section"><a href="#section4">Expressions</a></li>
<li class="doctools_section"><a href="#section5">Functions</a></li>
<li class="doctools_section"><a href="#section6">Summary</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">grammar::aycock 1.0</b></li>
<li>package require <b class="pkgname">math::exact 1.0</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::exact::exactexpr</b> <i class="arg">expr</i></a></li>
<li><a href="#2"><i class="arg">number</i> <b class="cmd">ref</b></a></li>
<li><a href="#3"><i class="arg">number</i> <b class="cmd">unref</b></a></li>
<li><a href="#4"><i class="arg">number</i> <b class="cmd">asPrint</b> <i class="arg">precision</i></a></li>
<li><a href="#5"><i class="arg">number</i> <b class="cmd">asFloat</b> <i class="arg">precision</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">exactexpr</b> command in the <b class="cmd">math::exact</b> package
allows for exact computations over the computable real numbers.
These are not arbitrary-precision calculations; rather they are
exact, with numbers represented by algorithms that produce successive
approximations. At the end of a calculation, the caller can
request a given precision for the end result, and intermediate results are
computed to whatever precision is necessary to satisfy the request.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Procedures</a></h2>
<p>The following procedure is the primary entry into the <b class="cmd">math::exact</b>
package.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::exact::exactexpr</b> <i class="arg">expr</i></a></dt>
<dd><p>Accepts a mathematical expression in Tcl syntax, and returns an object
that represents the program to calculate successive approximations to
the expression's value. The result will be referred to as an
exact real number.</p></dd>
<dt><a name="2"><i class="arg">number</i> <b class="cmd">ref</b></a></dt>
<dd><p>Increases the reference count of a given exact real number.</p></dd>
<dt><a name="3"><i class="arg">number</i> <b class="cmd">unref</b></a></dt>
<dd><p>Decreases the reference count of a given exact real number, and destroys
the number if the reference count is zero.</p></dd>
<dt><a name="4"><i class="arg">number</i> <b class="cmd">asPrint</b> <i class="arg">precision</i></a></dt>
<dd><p>Formats the given <i class="arg">number</i> for printing, with the specified <i class="arg">precision</i>.
(See below for how <i class="arg">precision</i> is interpreted). Numbers that are known to
be rational are formatted as fractions.</p></dd>
<dt><a name="5"><i class="arg">number</i> <b class="cmd">asFloat</b> <i class="arg">precision</i></a></dt>
<dd><p>Formats the given <i class="arg">number</i> for printing, with the specified <i class="arg">precision</i>.
(See below for how <i class="arg">precision</i> is interpreted). All numbers are formatted
in floating-point E format.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Parameters</a></h2>
<dl class="doctools_definitions">
<dt><i class="arg">expr</i></dt>
<dd><p>Expression to evaluate. The syntax for expressions is the same as it is in Tcl,
but the set of operations is smaller. See <span class="sectref"><a href="#section4">Expressions</a></span> below
for details.</p></dd>
<dt><i class="arg">number</i></dt>
<dd><p>The object returned by an earlier invocation of <b class="cmd">math::exact::exactexpr</b></p></dd>
<dt><i class="arg">precision</i></dt>
<dd><p>The requested 'precision' of the result. The precision is (approximately)
the absolute value of the binary exponent plus the number of bits of the
binary significand. For instance, to return results to IEEE-754 double
precision, 56 bits plus the exponent are required. Numbers between 1/2 and 2
will require a precision of 57; numbers between 1/4 and 1/2 or between 2 and 4
will require 58; numbers between 1/8 and 1/4 or between 4 and 8 will require
59; and so on.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Expressions</a></h2>
<p>The <b class="cmd">math::exact::exactexpr</b> command accepts expressions in a subset
of Tcl's syntax. The following components may be used in an expression.</p>
<ul class="doctools_itemized">
<li><p>Decimal integers.</p></li>
<li><p>Variable references with the dollar sign (<b class="const">$</b>).
The value of the variable must be the result of another call to
<b class="cmd">math::exact::exactexpr</b>. The reference count of the value
will be increased by one for each position at which it appears
in the expression.</p></li>
<li><p>The exponentiation operator (<b class="const">**</b>).</p></li>
<li><p>Unary plus (<b class="const">+</b>) and minus (<b class="const">-</b>) operators.</p></li>
<li><p>Multiplication (<b class="const">*</b>) and division (<b class="const">/</b>) operators.</p></li>
<li><p>Parentheses used for grouping.</p></li>
<li><p>Functions. See <span class="sectref"><a href="#section5">Functions</a></span> below for the functions that are
available.</p></li>
</ul>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Functions</a></h2>
<p>The following functions are available for use within exact real expressions.</p>
<dl class="doctools_definitions">
<dt><b class="const">acos(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The inverse cosine of <i class="arg">x</i>. The result is expressed in radians. 
The absolute value of <i class="arg">x</i> must be less than 1.</p></dd>
<dt><b class="const">acosh(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The inverse hyperbolic cosine of <i class="arg">x</i>. 
<i class="arg">x</i> must be greater than 1.</p></dd>
<dt><b class="const">asin(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The inverse sine of <i class="arg">x</i>. The result is expressed in radians. 
The absolute value of <i class="arg">x</i> must be less than 1.</p></dd>
<dt><b class="const">asinh(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The inverse hyperbolic sine of <i class="arg">x</i>.</p></dd>
<dt><b class="const">atan(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The inverse tangent of <i class="arg">x</i>. The result is expressed in radians.</p></dd>
<dt><b class="const">atanh(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The inverse hyperbolic tangent of <i class="arg">x</i>.
The absolute value of <i class="arg">x</i> must be less than 1.</p></dd>
<dt><b class="const">cos(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The cosine of <i class="arg">x</i>. <i class="arg">x</i> is expressed in radians.</p></dd>
<dt><b class="const">cosh(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The hyperbolic cosine of <i class="arg">x</i>.</p></dd>
<dt><b class="const">e()</b></dt>
<dd><p>The base of the natural logarithms = <b class="const">2.71828...</b></p></dd>
<dt><b class="const">exp(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The exponential function of <i class="arg">x</i>.</p></dd>
<dt><b class="const">log(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The natural logarithm of <i class="arg">x</i>. <i class="arg">x</i> must be positive.</p></dd>
<dt><b class="const">pi()</b></dt>
<dd><p>The value of pi = <b class="const">3.15159...</b></p></dd>
<dt><b class="const">sin(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The sine of <i class="arg">x</i>. <i class="arg">x</i> is expressed in radians.</p></dd>
<dt><b class="const">sinh(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The hyperbolic sine of <i class="arg">x</i>.</p></dd>
<dt><b class="const">sqrt(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The square root of <i class="arg">x</i>. <i class="arg">x</i> must be positive.</p></dd>
<dt><b class="const">tan(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The tangent of <i class="arg">x</i>. <i class="arg">x</i> is expressed in radians.</p></dd>
<dt><b class="const">tanh(</b><i class="arg">x</i><b class="const">)</b></dt>
<dd><p>The hyperbolic tangent of <i class="arg">x</i>.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Summary</a></h2>
<p>The <b class="cmd">math::exact::exactexpr</b> command provides a system that
performs exact arithmetic over computable real numbers, representing
the numbers as algorithms for successive approximation.
An example, which implements the high-school quadratic formula,
is shown below.</p>
<pre class="doctools_example">
namespace import math::exact::exactexpr
proc exactquad {a b c} {
    set d [[exactexpr {sqrt($b*$b - 4*$a*$c)}] ref]
    set r0 [[exactexpr {(-$b - $d) / (2 * $a)}] ref]
    set r1 [[exactexpr {(-$b + $d) / (2 * $a)}] ref]
    $d unref
    return [list $r0 $r1]
}
set a [[exactexpr 1] ref]
set b [[exactexpr 200] ref]
set c [[exactexpr {(-3/2) * 10**-12}] ref]
lassign [exactquad $a $b $c] r0 r1
$a unref; $b unref; $c unref
puts [list [$r0 asFloat 70] [$r1 asFloat 110]]
$r0 unref; $r1 unref
</pre>
<p>The program prints the result:</p>
<pre class="doctools_example">
-2.000000000000000075e2 7.499999999999999719e-15
</pre>
<p>Note that if IEEE-754 floating point had been used, a catastrophic
roundoff error would yield a smaller root that is a factor of two
too high:</p>
<pre class="doctools_example">
-200.0 1.4210854715202004e-14
</pre>
<p>The invocations of <b class="cmd">exactexpr</b> should be fairly self-explanatory.
The other commands of note are <b class="cmd">ref</b> and <b class="cmd">unref</b>. It is necessary
for the caller to keep track of references to exact expressions - to call
<b class="cmd">ref</b> every time an exact expression is stored in a variable and
<b class="cmd">unref</b> every time the variable goes out of scope or is overwritten.
The <b class="cmd">asFloat</b> method emits decimal digits as long as the requested
precision supports them. It terminates when the requested precision
yields an uncertainty of more than one unit in the least significant digit.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Kevin B. Kenny &lt;kennykb@acm.org&gt;<br>
Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/fourier.html.





































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<div class='fossil-doc' data-title='math::fourier - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::fourier(n) 1.0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::fourier - Discrete and fast fourier transforms</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">GENERAL INFORMATION</a></li>
<li class="doctools_section"><a href="#section3">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">math::fourier 1.0.2</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::fourier::dft</b> <i class="arg">in_data</i></a></li>
<li><a href="#2"><b class="cmd">::math::fourier::inverse_dft</b> <i class="arg">in_data</i></a></li>
<li><a href="#3"><b class="cmd">::math::fourier::lowpass</b> <i class="arg">cutoff</i> <i class="arg">in_data</i></a></li>
<li><a href="#4"><b class="cmd">::math::fourier::highpass</b> <i class="arg">cutoff</i> <i class="arg">in_data</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">math::fourier</b> package implements two versions of discrete
Fourier transforms, the ordinary transform and the fast Fourier
transform. It also provides a few simple filter procedures as an
illustrations of how such filters can be implemented.</p>
<p>The purpose of this document is to describe the implemented procedures
and provide some examples of their usage. As there is ample literature
on the algorithms involved, we refer to relevant text books for more
explanations. We also refer to the original Wiki page on the subject
which describes some of the considerations behind the current
implementation.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">GENERAL INFORMATION</a></h2>
<p>The two top-level procedures defined are</p>
<ul class="doctools_itemized">
<li><p>dft data-list</p></li>
<li><p>inverse_dft data-list</p></li>
</ul>
<p>Both take a list of <em>complex numbers</em> and apply a Discrete Fourier
Transform (DFT) or its inverse respectively to these lists of numbers.
A &quot;complex number&quot; in this case is either (i) a pair (two element list) of
numbers, interpreted as the real and imaginary parts of the complex number,
or (ii) a single number, interpreted as the real part of a complex number
whose imaginary part is zero. The return value is always in the
first format. (The DFT generally produces complex results even if the
input is purely real.) Applying first one and then the other of these
procedures to a list of complex numbers will (modulo rounding errors
due to floating point arithmetic) return the original list of numbers.</p>
<p>If the input length N is a power of two then these procedures will
utilize the O(N log N) Fast Fourier Transform algorithm. If input
length is not a power of two then the DFT will instead be computed
using a the naive quadratic algorithm.</p>
<p>Some examples:</p>
<pre class="doctools_example">
    % dft {1 2 3 4}
    {10 0.0} {-2.0 2.0} {-2 0.0} {-2.0 -2.0}
    % inverse_dft {{10 0.0} {-2.0 2.0} {-2 0.0} {-2.0 -2.0}}
    {1.0 0.0} {2.0 0.0} {3.0 0.0} {4.0 0.0}
    % dft {1 2 3 4 5}
    {15.0 0.0} {-2.5 3.44095480118} {-2.5 0.812299240582} {-2.5 -0.812299240582} {-2.5 -3.44095480118}
    % inverse_dft {{15.0 0.0} {-2.5 3.44095480118} {-2.5 0.812299240582} {-2.5 -0.812299240582} {-2.5 -3.44095480118}}
    {1.0 0.0} {2.0 8.881784197e-17} {3.0 4.4408920985e-17} {4.0 4.4408920985e-17} {5.0 -8.881784197e-17}
</pre>
<p>In the last case, the imaginary parts &lt;1e-16 would have been zero in exact
arithmetic, but aren't here due to rounding errors.</p>
<p>Internally, the procedures use a flat list format where every even
index element of a list is a real part and every odd index element
is an imaginary part. This is reflected in the variable names by Re_
and Im_ prefixes.</p>
<p>The package includes two simple filters. They have an analogue
equivalent in a simple electronic circuit, a resistor and a capacitance
in series. Using these filters requires the
<b class="package"><a href="qcomplex.html">math::complexnumbers</a></b> package.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROCEDURES</a></h2>
<p>The public Fourier transform procedures are:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::fourier::dft</b> <i class="arg">in_data</i></a></dt>
<dd><p>Determine the <em>Fourier transform</em> of the given list of complex
numbers. The result is a list of complex numbers representing the
(complex) amplitudes of the Fourier components.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">in_data</i></dt>
<dd><p>List of data</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::fourier::inverse_dft</b> <i class="arg">in_data</i></a></dt>
<dd><p>Determine the <em>inverse Fourier transform</em> of the given list of
complex numbers (interpreted as amplitudes). The result is a list of
complex numbers representing the original (complex) data</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">in_data</i></dt>
<dd><p>List of data (amplitudes)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::fourier::lowpass</b> <i class="arg">cutoff</i> <i class="arg">in_data</i></a></dt>
<dd><p>Filter the (complex) amplitudes so that high-frequency components
are suppressed. The implemented filter is a first-order low-pass filter,
the discrete equivalent of a simple electronic circuit with a resistor
and a capacitance.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">cutoff</i></dt>
<dd><p>Cut-off frequency</p></dd>
<dt>list <i class="arg">in_data</i></dt>
<dd><p>List of data (amplitudes)</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::fourier::highpass</b> <i class="arg">cutoff</i> <i class="arg">in_data</i></a></dt>
<dd><p>Filter the (complex) amplitudes so that low-frequency components
are suppressed. The implemented filter is a first-order low-pass filter,
the discrete equivalent of a simple electronic circuit with a resistor
and a capacitance.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">cutoff</i></dt>
<dd><p>Cut-off frequency</p></dd>
<dt>list <i class="arg">in_data</i></dt>
<dd><p>List of data (amplitudes)</p></dd>
</dl></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: fourier</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key803">FFT</a>, <a href="../../../../index.html#key802">Fourier transform</a>, <a href="../../../../index.html#key797">complex numbers</a>, <a href="../../../../index.html#key629">mathematics</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/fuzzy.html.







































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<div class='fossil-doc' data-title='math::fuzzy - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::fuzzy(n) 0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::fuzzy - Fuzzy comparison of floating-point numbers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">TEST CASES</a></li>
<li class="doctools_section"><a href="#section4">REFERENCES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.3?</span></b></li>
<li>package require <b class="pkgname">math::fuzzy <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::fuzzy::teq</b> <i class="arg">value1</i> <i class="arg">value2</i></a></li>
<li><a href="#2"><b class="cmd">::math::fuzzy::tne</b> <i class="arg">value1</i> <i class="arg">value2</i></a></li>
<li><a href="#3"><b class="cmd">::math::fuzzy::tge</b> <i class="arg">value1</i> <i class="arg">value2</i></a></li>
<li><a href="#4"><b class="cmd">::math::fuzzy::tle</b> <i class="arg">value1</i> <i class="arg">value2</i></a></li>
<li><a href="#5"><b class="cmd">::math::fuzzy::tlt</b> <i class="arg">value1</i> <i class="arg">value2</i></a></li>
<li><a href="#6"><b class="cmd">::math::fuzzy::tgt</b> <i class="arg">value1</i> <i class="arg">value2</i></a></li>
<li><a href="#7"><b class="cmd">::math::fuzzy::tfloor</b> <i class="arg">value</i></a></li>
<li><a href="#8"><b class="cmd">::math::fuzzy::tceil</b> <i class="arg">value</i></a></li>
<li><a href="#9"><b class="cmd">::math::fuzzy::tround</b> <i class="arg">value</i></a></li>
<li><a href="#10"><b class="cmd">::math::fuzzy::troundn</b> <i class="arg">value</i> <i class="arg">ndigits</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package Fuzzy is meant to solve common problems with floating-point
numbers in a systematic way:</p>
<ul class="doctools_itemized">
<li><p>Comparing two numbers that are &quot;supposed&quot; to be identical, like
1.0 and 2.1/(1.2+0.9) is not guaranteed to give the
intuitive result.</p></li>
<li><p>Rounding a number that is halfway two integer numbers can cause
strange errors, like int(100.0*2.8) != 28 but 27</p></li>
</ul>
<p>The Fuzzy package is meant to help sorting out this type of problems
by defining &quot;fuzzy&quot; comparison procedures for floating-point numbers.
It does so by allowing for a small margin that is determined
automatically - the margin is three times the &quot;epsilon&quot; value, that is
three times the smallest number <em>eps</em> such that 1.0 and 1.0+$eps
canbe distinguished. In Tcl, which uses double precision floating-point
numbers, this is typically 1.1e-16.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>Effectively the package provides the following procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::fuzzy::teq</b> <i class="arg">value1</i> <i class="arg">value2</i></a></dt>
<dd><p>Compares two floating-point numbers and returns 1 if their values
fall within a small range. Otherwise it returns 0.</p></dd>
<dt><a name="2"><b class="cmd">::math::fuzzy::tne</b> <i class="arg">value1</i> <i class="arg">value2</i></a></dt>
<dd><p>Returns the negation, that is, if the difference is larger than
the margin, it returns 1.</p></dd>
<dt><a name="3"><b class="cmd">::math::fuzzy::tge</b> <i class="arg">value1</i> <i class="arg">value2</i></a></dt>
<dd><p>Compares two floating-point numbers and returns 1 if their values
either fall within a small range or if the first number is larger
than the second. Otherwise it returns 0.</p></dd>
<dt><a name="4"><b class="cmd">::math::fuzzy::tle</b> <i class="arg">value1</i> <i class="arg">value2</i></a></dt>
<dd><p>Returns 1 if the two numbers are equal according to
[teq] or if the first is smaller than the second.</p></dd>
<dt><a name="5"><b class="cmd">::math::fuzzy::tlt</b> <i class="arg">value1</i> <i class="arg">value2</i></a></dt>
<dd><p>Returns the opposite of [tge].</p></dd>
<dt><a name="6"><b class="cmd">::math::fuzzy::tgt</b> <i class="arg">value1</i> <i class="arg">value2</i></a></dt>
<dd><p>Returns the opposite of [tle].</p></dd>
<dt><a name="7"><b class="cmd">::math::fuzzy::tfloor</b> <i class="arg">value</i></a></dt>
<dd><p>Returns the integer number that is lower or equal
to the given floating-point number, within a well-defined
tolerance.</p></dd>
<dt><a name="8"><b class="cmd">::math::fuzzy::tceil</b> <i class="arg">value</i></a></dt>
<dd><p>Returns the integer number that is greater or equal to the given
floating-point number, within a well-defined tolerance.</p></dd>
<dt><a name="9"><b class="cmd">::math::fuzzy::tround</b> <i class="arg">value</i></a></dt>
<dd><p>Rounds the floating-point number off.</p></dd>
<dt><a name="10"><b class="cmd">::math::fuzzy::troundn</b> <i class="arg">value</i> <i class="arg">ndigits</i></a></dt>
<dd><p>Rounds the floating-point number off to the
specified number of decimals (Pro memorie).</p></dd>
</dl>
<p>Usage:</p>
<pre class="doctools_example">
if { [teq $x $y] } { puts &quot;x == y&quot; }
if { [tne $x $y] } { puts &quot;x != y&quot; }
if { [tge $x $y] } { puts &quot;x &gt;= y&quot; }
if { [tgt $x $y] } { puts &quot;x &gt; y&quot; }
if { [tlt $x $y] } { puts &quot;x &lt; y&quot; }
if { [tle $x $y] } { puts &quot;x &lt;= y&quot; }
set fx      [tfloor $x]
set fc      [tceil  $x]
set rounded [tround $x]
set roundn  [troundn $x $nodigits]
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TEST CASES</a></h2>
<p>The problems that can occur with floating-point numbers are illustrated
by the test cases in the file &quot;fuzzy.test&quot;:</p>
<ul class="doctools_itemized">
<li><p>Several test case use the ordinary comparisons, and they
fail invariably to produce understandable results</p></li>
<li><p>One test case uses [expr] without braces ({ and }). It too
fails.</p></li>
</ul>
<p>The conclusion from this is that any expression should be surrounded by
braces, because otherwise very awkward things can happen if you need
accuracy. Furthermore, accuracy and understandable results are
enhanced by using these &quot;tolerant&quot; or fuzzy comparisons.</p>
<p>Note that besides the Tcl-only package, there is also a C-based version.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<p>Original implementation in Fortran by dr. H.D. Knoble (Penn State
University).</p>
<p>P. E. Hagerty, &quot;More on Fuzzy Floor and Ceiling,&quot;
APL QUOTE QUAD 8(4):20-24, June 1978. Note that TFLOOR=FL5 took five
years of refereed evolution (publication).</p>
<p>L. M. Breed, &quot;Definitions for Fuzzy Floor and Ceiling&quot;,
APL QUOTE QUAD 8(3):16-23, March 1978.</p>
<p>D. Knuth, Art of Computer Programming,
Vol. 1, Problem 1.2.4-5.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: fuzzy</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key393">floating-point</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key392">rounding</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/interpolate.html.





















































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362

<div class='fossil-doc' data-title='math::interpolate - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::interpolate(n) 1.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::interpolate - Interpolation routines</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">INCOMPATIBILITY WITH VERSION 1.0.3</a></li>
<li class="doctools_section"><a href="#section3">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.4?</span></b></li>
<li>package require <b class="pkgname">struct</b></li>
<li>package require <b class="pkgname">math::interpolate <span class="opt">?1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::interpolate::defineTable</b> <i class="arg">name</i> <i class="arg">colnames</i> <i class="arg">values</i></a></li>
<li><a href="#2"><b class="cmd">::math::interpolate::interp-1d-table</b> <i class="arg">name</i> <i class="arg">xval</i></a></li>
<li><a href="#3"><b class="cmd">::math::interpolate::interp-table</b> <i class="arg">name</i> <i class="arg">xval</i> <i class="arg">yval</i></a></li>
<li><a href="#4"><b class="cmd">::math::interpolate::interp-linear</b> <i class="arg">xyvalues</i> <i class="arg">xval</i></a></li>
<li><a href="#5"><b class="cmd">::math::interpolate::interp-lagrange</b> <i class="arg">xyvalues</i> <i class="arg">xval</i></a></li>
<li><a href="#6"><b class="cmd">::math::interpolate::prepare-cubic-splines</b> <i class="arg">xcoord</i> <i class="arg">ycoord</i></a></li>
<li><a href="#7"><b class="cmd">::math::interpolate::interp-cubic-splines</b> <i class="arg">coeffs</i> <i class="arg">x</i></a></li>
<li><a href="#8"><b class="cmd">::math::interpolate::interp-spatial</b> <i class="arg">xyvalues</i> <i class="arg">coord</i></a></li>
<li><a href="#9"><b class="cmd">::math::interpolate::interp-spatial-params</b> <i class="arg">max_search</i> <i class="arg">power</i></a></li>
<li><a href="#10"><b class="cmd">::math::interpolate::neville</b> <i class="arg">xlist</i> <i class="arg">ylist</i> <i class="arg">x</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements several interpolation algorithms:</p>
<ul class="doctools_itemized">
<li><p>Interpolation into a table (one or two independent variables), this is useful
for example, if the data are static, like with tables of statistical functions.</p></li>
<li><p>Linear interpolation into a given set of data (organised as (x,y) pairs).</p></li>
<li><p>Lagrange interpolation. This is mainly of theoretical interest, because there is
no guarantee about error bounds. One possible use: if you need a line or
a parabola through given points (it will calculate the values, but not return
the coefficients).</p>
<p>A variation is Neville's method which has better behaviour and error
bounds.</p></li>
<li><p>Spatial interpolation using a straightforward distance-weight method. This procedure
allows any number of spatial dimensions and any number of dependent variables.</p></li>
<li><p>Interpolation in one dimension using cubic splines.</p></li>
</ul>
<p>This document describes the procedures and explains their usage.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">INCOMPATIBILITY WITH VERSION 1.0.3</a></h2>
<p>The interpretation of the tables in the <b class="cmd">::math::interpolate::interpolate-1d-table</b> command
has been changed to be compatible with the interpretation for 2D interpolation in
the <b class="cmd">::math::interpolate::interpolate-table</b> command. As a consequence this version is
incompatible with the previous versions of the command (1.0.x).</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROCEDURES</a></h2>
<p>The interpolation package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::interpolate::defineTable</b> <i class="arg">name</i> <i class="arg">colnames</i> <i class="arg">values</i></a></dt>
<dd><p>Define a table with one or two independent variables (the distinction is implicit in
the data). The procedure returns the name of the table - this name is used whenever you
want to interpolate the values. <em>Note:</em> this procedure is a convenient wrapper for the
struct::matrix procedure. Therefore you can access the data at any location in your program.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">name</i> (in)</dt>
<dd><p>Name of the table to be created</p></dd>
<dt>list <i class="arg">colnames</i> (in)</dt>
<dd><p>List of column names</p></dd>
<dt>list <i class="arg">values</i> (in)</dt>
<dd><p>List of values (the number of elements should be a
multiple of the number of columns. See <span class="sectref"><a href="#section4">EXAMPLES</a></span> for more information on the
interpretation of the data.</p>
<p>The values must be sorted with respect to the independent variable(s).</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::interpolate::interp-1d-table</b> <i class="arg">name</i> <i class="arg">xval</i></a></dt>
<dd><p>Interpolate into the one-dimensional table &quot;name&quot; and return a list of values, one for
each dependent column.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">name</i> (in)</dt>
<dd><p>Name of an existing table</p></dd>
<dt>float <i class="arg">xval</i> (in)</dt>
<dd><p>Value of the independent <em>row</em> variable</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::interpolate::interp-table</b> <i class="arg">name</i> <i class="arg">xval</i> <i class="arg">yval</i></a></dt>
<dd><p>Interpolate into the two-dimensional table &quot;name&quot; and return the interpolated value.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">name</i> (in)</dt>
<dd><p>Name of an existing table</p></dd>
<dt>float <i class="arg">xval</i> (in)</dt>
<dd><p>Value of the independent <em>row</em> variable</p></dd>
<dt>float <i class="arg">yval</i> (in)</dt>
<dd><p>Value of the independent <em>column</em> variable</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::interpolate::interp-linear</b> <i class="arg">xyvalues</i> <i class="arg">xval</i></a></dt>
<dd><p>Interpolate linearly into the list of x,y pairs and return the interpolated value.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xyvalues</i> (in)</dt>
<dd><p>List of pairs of (x,y) values, sorted to increasing x.
They are used as the breakpoints of a piecewise linear function.</p></dd>
<dt>float <i class="arg">xval</i> (in)</dt>
<dd><p>Value of the independent variable for which the value of y
must be computed.</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::interpolate::interp-lagrange</b> <i class="arg">xyvalues</i> <i class="arg">xval</i></a></dt>
<dd><p>Use the list of x,y pairs to construct the unique polynomial of lowest degree
that passes through all points and return the interpolated value.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xyvalues</i> (in)</dt>
<dd><p>List of pairs of (x,y) values</p></dd>
<dt>float <i class="arg">xval</i> (in)</dt>
<dd><p>Value of the independent variable for which the value of y
must be computed.</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::math::interpolate::prepare-cubic-splines</b> <i class="arg">xcoord</i> <i class="arg">ycoord</i></a></dt>
<dd><p>Returns a list of coefficients for the second routine
<em>interp-cubic-splines</em> to actually interpolate.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xcoord</i></dt>
<dd><p>List of x-coordinates for the value of the
function to be interpolated is known. The coordinates must be strictly
ascending. At least three points are required.</p></dd>
<dt>list <i class="arg">ycoord</i></dt>
<dd><p>List of y-coordinates (the values of the
function at the given x-coordinates).</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::interpolate::interp-cubic-splines</b> <i class="arg">coeffs</i> <i class="arg">x</i></a></dt>
<dd><p>Returns the interpolated value at coordinate x. The coefficients are
computed by the procedure <em>prepare-cubic-splines</em>.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">coeffs</i></dt>
<dd><p>List of coefficients as returned by
prepare-cubic-splines</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>x-coordinate at which to estimate the function. Must
be between the first and last x-coordinate for which values were given.</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::interpolate::interp-spatial</b> <i class="arg">xyvalues</i> <i class="arg">coord</i></a></dt>
<dd><p>Use a straightforward interpolation method with weights as function of the
inverse distance to interpolate in 2D and N-dimensional space</p>
<p>The list xyvalues is a list of lists:</p>
<pre class="doctools_example">
    {   {x1 y1 z1 {v11 v12 v13 v14}}
	{x2 y2 z2 {v21 v22 v23 v24}}
	...
    }
</pre>
<p>The last element of each inner list is either a single number or a list in itself.
In the latter case the return value is a list with the same number of elements.</p>
<p>The method is influenced by the search radius and the power of the inverse distance</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xyvalues</i> (in)</dt>
<dd><p>List of lists, each sublist being a list of coordinates and
of dependent values.</p></dd>
<dt>list <i class="arg">coord</i> (in)</dt>
<dd><p>List of coordinates for which the values must be calculated</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::interpolate::interp-spatial-params</b> <i class="arg">max_search</i> <i class="arg">power</i></a></dt>
<dd><p>Set the parameters for spatial interpolation</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">max_search</i> (in)</dt>
<dd><p>Search radius (data points further than this are ignored)</p></dd>
<dt>integer <i class="arg">power</i> (in)</dt>
<dd><p>Power for the distance (either 1 or 2; defaults to 2)</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::interpolate::neville</b> <i class="arg">xlist</i> <i class="arg">ylist</i> <i class="arg">x</i></a></dt>
<dd><p>Interpolates between the tabulated values of a function
whose abscissae are <i class="arg">xlist</i>
and whose ordinates are <i class="arg">ylist</i> to produce an estimate for the value
of the function at <i class="arg">x</i>.  The result is a two-element list; the first
element is the function's estimated value, and the second is an estimate
of the absolute error of the result.  Neville's algorithm for polynomial
interpolation is used.  Note that a large table of values will use an
interpolating polynomial of high degree, which is likely to result in
numerical instabilities; one is better off using only a few tabulated
values near the desired abscissa.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<p><em>Example of using one-dimensional tables:</em></p>
<p>Suppose you have several tabulated functions of one variable:</p>
<pre class="doctools_example">
    x     y1     y2
  0.0    0.0    0.0
  1.0    1.0    1.0
  2.0    4.0    8.0
  3.0    9.0   27.0
  4.0   16.0   64.0
</pre>
<p>Then to estimate the values at 0.5, 1.5, 2.5 and 3.5, you can use:</p>
<pre class="doctools_example">
   set table [::math::interpolate::defineTable table1  {x y1 y2} {   -      1      2
                   0.0    0.0    0.0
                   1.0    1.0    1.0
                   2.0    4.0    8.0
                   3.0    9.0   27.0
                   4.0   16.0   64.0}]
   foreach x {0.5 1.5 2.5 3.5} {
       puts &quot;$x: [::math::interpolate::interp-1d-table $table $x]&quot;
   }
</pre>
<p>For one-dimensional tables the first row is not used. For two-dimensional
tables, the first row represents the values for the second independent variable.</p>
<p><em>Example of using the cubic splines:</em></p>
<p>Suppose the following values are given:</p>
<pre class="doctools_example">
    x       y
  0.1     1.0
  0.3     2.1
  0.4     2.2
  0.8     4.11
  1.0     4.12
</pre>
<p>Then to estimate the values at 0.1, 0.2, 0.3, ... 1.0, you can use:</p>
<pre class="doctools_example">
   set coeffs [::math::interpolate::prepare-cubic-splines  {0.1 0.3 0.4 0.8  1.0}  {1.0 2.1 2.2 4.11 4.12}]
   foreach x {0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0} {
      puts &quot;$x: [::math::interpolate::interp-cubic-splines $coeffs $x]&quot;
   }
</pre>
<p>to get the following output:</p>
<pre class="doctools_example">
0.1: 1.0
0.2: 1.68044117647
0.3: 2.1
0.4: 2.2
0.5: 3.11221507353
0.6: 4.25242647059
0.7: 5.41804227941
0.8: 4.11
0.9: 3.95675857843
1.0: 4.12
</pre>
<p>As you can see, the values at the abscissae are reproduced perfectly.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: interpolate</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key834">interpolation</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key835">spatial interpolation</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Kevn B. Kenny &lt;kennykb@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/linalg.html.























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987

<div class='fossil-doc' data-title='math::linearalgebra - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::linearalgebra(n) 1.1.5 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::linearalgebra - Linear Algebra</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">STORAGE</a></li>
<li class="doctools_section"><a href="#section4">REMARKS ON THE IMPLEMENTATION</a></li>
<li class="doctools_section"><a href="#section5">TODO</a></li>
<li class="doctools_section"><a href="#section6">NAMING CONFLICT</a></li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.4?</span></b></li>
<li>package require <b class="pkgname">math::linearalgebra <span class="opt">?1.1.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::linearalgebra::mkVector</b> <i class="arg">ndim</i> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">::math::linearalgebra::mkUnitVector</b> <i class="arg">ndim</i> <i class="arg">ndir</i></a></li>
<li><a href="#3"><b class="cmd">::math::linearalgebra::mkMatrix</b> <i class="arg">nrows</i> <i class="arg">ncols</i> <i class="arg">value</i></a></li>
<li><a href="#4"><b class="cmd">::math::linearalgebra::getrow</b> <i class="arg">matrix</i> <i class="arg">row</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></li>
<li><a href="#5"><b class="cmd">::math::linearalgebra::setrow</b> <i class="arg">matrix</i> <i class="arg">row</i> <i class="arg">newvalues</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></li>
<li><a href="#6"><b class="cmd">::math::linearalgebra::getcol</b> <i class="arg">matrix</i> <i class="arg">col</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></li>
<li><a href="#7"><b class="cmd">::math::linearalgebra::setcol</b> <i class="arg">matrix</i> <i class="arg">col</i> <i class="arg">newvalues</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></li>
<li><a href="#8"><b class="cmd">::math::linearalgebra::getelem</b> <i class="arg">matrix</i> <i class="arg">row</i> <i class="arg">col</i></a></li>
<li><a href="#9"><b class="cmd">::math::linearalgebra::setelem</b> <i class="arg">matrix</i> <i class="arg">row</i> <span class="opt">?col?</span> <i class="arg">newvalue</i></a></li>
<li><a href="#10"><b class="cmd">::math::linearalgebra::swaprows</b> <i class="arg">matrix</i> <i class="arg">irow1</i> <i class="arg">irow2</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></li>
<li><a href="#11"><b class="cmd">::math::linearalgebra::swapcols</b> <i class="arg">matrix</i> <i class="arg">icol1</i> <i class="arg">icol2</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></li>
<li><a href="#12"><b class="cmd">::math::linearalgebra::show</b> <i class="arg">obj</i> <span class="opt">?format?</span> <span class="opt">?rowsep?</span> <span class="opt">?colsep?</span></a></li>
<li><a href="#13"><b class="cmd">::math::linearalgebra::dim</b> <i class="arg">obj</i></a></li>
<li><a href="#14"><b class="cmd">::math::linearalgebra::shape</b> <i class="arg">obj</i></a></li>
<li><a href="#15"><b class="cmd">::math::linearalgebra::conforming</b> <i class="arg">type</i> <i class="arg">obj1</i> <i class="arg">obj2</i></a></li>
<li><a href="#16"><b class="cmd">::math::linearalgebra::symmetric</b> <i class="arg">matrix</i> <span class="opt">?eps?</span></a></li>
<li><a href="#17"><b class="cmd">::math::linearalgebra::norm</b> <i class="arg">vector</i> <i class="arg">type</i></a></li>
<li><a href="#18"><b class="cmd">::math::linearalgebra::norm_one</b> <i class="arg">vector</i></a></li>
<li><a href="#19"><b class="cmd">::math::linearalgebra::norm_two</b> <i class="arg">vector</i></a></li>
<li><a href="#20"><b class="cmd">::math::linearalgebra::norm_max</b> <i class="arg">vector</i> <span class="opt">?index?</span></a></li>
<li><a href="#21"><b class="cmd">::math::linearalgebra::normMatrix</b> <i class="arg">matrix</i> <i class="arg">type</i></a></li>
<li><a href="#22"><b class="cmd">::math::linearalgebra::dotproduct</b> <i class="arg">vect1</i> <i class="arg">vect2</i></a></li>
<li><a href="#23"><b class="cmd">::math::linearalgebra::unitLengthVector</b> <i class="arg">vector</i></a></li>
<li><a href="#24"><b class="cmd">::math::linearalgebra::normalizeStat</b> <i class="arg">mv</i></a></li>
<li><a href="#25"><b class="cmd">::math::linearalgebra::axpy</b> <i class="arg">scale</i> <i class="arg">mv1</i> <i class="arg">mv2</i></a></li>
<li><a href="#26"><b class="cmd">::math::linearalgebra::add</b> <i class="arg">mv1</i> <i class="arg">mv2</i></a></li>
<li><a href="#27"><b class="cmd">::math::linearalgebra::sub</b> <i class="arg">mv1</i> <i class="arg">mv2</i></a></li>
<li><a href="#28"><b class="cmd">::math::linearalgebra::scale</b> <i class="arg">scale</i> <i class="arg">mv</i></a></li>
<li><a href="#29"><b class="cmd">::math::linearalgebra::rotate</b> <i class="arg">c</i> <i class="arg">s</i> <i class="arg">vect1</i> <i class="arg">vect2</i></a></li>
<li><a href="#30"><b class="cmd">::math::linearalgebra::transpose</b> <i class="arg">matrix</i></a></li>
<li><a href="#31"><b class="cmd">::math::linearalgebra::matmul</b> <i class="arg">mv1</i> <i class="arg">mv2</i></a></li>
<li><a href="#32"><b class="cmd">::math::linearalgebra::angle</b> <i class="arg">vect1</i> <i class="arg">vect2</i></a></li>
<li><a href="#33"><b class="cmd">::math::linearalgebra::crossproduct</b> <i class="arg">vect1</i> <i class="arg">vect2</i></a></li>
<li><a href="#34"><b class="cmd">::math::linearalgebra::matmul</b> <i class="arg">mv1</i> <i class="arg">mv2</i></a></li>
<li><a href="#35"><b class="cmd">::math::linearalgebra::mkIdentity</b> <i class="arg">size</i></a></li>
<li><a href="#36"><b class="cmd">::math::linearalgebra::mkDiagonal</b> <i class="arg">diag</i></a></li>
<li><a href="#37"><b class="cmd">::math::linearalgebra::mkRandom</b> <i class="arg">size</i></a></li>
<li><a href="#38"><b class="cmd">::math::linearalgebra::mkTriangular</b> <i class="arg">size</i> <span class="opt">?uplo?</span> <span class="opt">?value?</span></a></li>
<li><a href="#39"><b class="cmd">::math::linearalgebra::mkHilbert</b> <i class="arg">size</i></a></li>
<li><a href="#40"><b class="cmd">::math::linearalgebra::mkDingdong</b> <i class="arg">size</i></a></li>
<li><a href="#41"><b class="cmd">::math::linearalgebra::mkOnes</b> <i class="arg">size</i></a></li>
<li><a href="#42"><b class="cmd">::math::linearalgebra::mkMoler</b> <i class="arg">size</i></a></li>
<li><a href="#43"><b class="cmd">::math::linearalgebra::mkFrank</b> <i class="arg">size</i></a></li>
<li><a href="#44"><b class="cmd">::math::linearalgebra::mkBorder</b> <i class="arg">size</i></a></li>
<li><a href="#45"><b class="cmd">::math::linearalgebra::mkWilkinsonW+</b> <i class="arg">size</i></a></li>
<li><a href="#46"><b class="cmd">::math::linearalgebra::mkWilkinsonW-</b> <i class="arg">size</i></a></li>
<li><a href="#47"><b class="cmd">::math::linearalgebra::solveGauss</b> <i class="arg">matrix</i> <i class="arg">bvect</i></a></li>
<li><a href="#48"><b class="cmd">::math::linearalgebra::solvePGauss</b> <i class="arg">matrix</i> <i class="arg">bvect</i></a></li>
<li><a href="#49"><b class="cmd">::math::linearalgebra::solveTriangular</b> <i class="arg">matrix</i> <i class="arg">bvect</i> <span class="opt">?uplo?</span></a></li>
<li><a href="#50"><b class="cmd">::math::linearalgebra::solveGaussBand</b> <i class="arg">matrix</i> <i class="arg">bvect</i></a></li>
<li><a href="#51"><b class="cmd">::math::linearalgebra::solveTriangularBand</b> <i class="arg">matrix</i> <i class="arg">bvect</i></a></li>
<li><a href="#52"><b class="cmd">::math::linearalgebra::determineSVD</b> <i class="arg">A</i> <i class="arg">eps</i></a></li>
<li><a href="#53"><b class="cmd">::math::linearalgebra::eigenvectorsSVD</b> <i class="arg">A</i> <i class="arg">eps</i></a></li>
<li><a href="#54"><b class="cmd">::math::linearalgebra::leastSquaresSVD</b> <i class="arg">A</i> <i class="arg">y</i> <i class="arg">qmin</i> <i class="arg">eps</i></a></li>
<li><a href="#55"><b class="cmd">::math::linearalgebra::choleski</b> <i class="arg">matrix</i></a></li>
<li><a href="#56"><b class="cmd">::math::linearalgebra::orthonormalizeColumns</b> <i class="arg">matrix</i></a></li>
<li><a href="#57"><b class="cmd">::math::linearalgebra::orthonormalizeRows</b> <i class="arg">matrix</i></a></li>
<li><a href="#58"><b class="cmd">::math::linearalgebra::dger</b> <i class="arg">matrix</i> <i class="arg">alpha</i> <i class="arg">x</i> <i class="arg">y</i> <span class="opt">?scope?</span></a></li>
<li><a href="#59"><b class="cmd">::math::linearalgebra::dgetrf</b> <i class="arg">matrix</i></a></li>
<li><a href="#60"><b class="cmd">::math::linearalgebra::det</b> <i class="arg">matrix</i></a></li>
<li><a href="#61"><b class="cmd">::math::linearalgebra::largesteigen</b> <i class="arg">matrix</i> <i class="arg">tolerance</i> <i class="arg">maxiter</i></a></li>
<li><a href="#62"><b class="cmd">::math::linearalgebra::to_LA</b> <i class="arg">mv</i></a></li>
<li><a href="#63"><b class="cmd">::math::linearalgebra::from_LA</b> <i class="arg">mv</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package offers both low-level procedures and high-level algorithms
to deal with linear algebra problems:</p>
<ul class="doctools_itemized">
<li><p>robust solution of linear equations or least squares problems</p></li>
<li><p>determining eigenvectors and eigenvalues of symmetric matrices</p></li>
<li><p>various decompositions of general matrices or matrices of a specific
form</p></li>
<li><p>(limited) support for matrices in band storage, a common type of sparse
matrices</p></li>
</ul>
<p>It arose as a re-implementation of Hume's LA package and the desire to
offer low-level procedures as found in the well-known BLAS library.
Matrices are implemented as lists of lists rather linear lists with
reserved elements, as in the original LA package, as it was found that
such an implementation is actually faster.</p>
<p>It is advisable, however, to use the procedures that are offered, such
as <em>setrow</em> and <em>getrow</em>, rather than rely on this
representation explicitly: that way it is to switch to a possibly even
faster compiled implementation that supports the same API.</p>
<p><em>Note:</em> When using this package in combination with Tk, there may
be a naming conflict, as both this package and Tk define a command
<em>scale</em>. See the <span class="sectref"><a href="#section6">NAMING CONFLICT</a></span> section below.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following public procedures (several exist as
specialised procedures, see below):</p>
<p><em>Constructing matrices and vectors</em></p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::linearalgebra::mkVector</b> <i class="arg">ndim</i> <i class="arg">value</i></a></dt>
<dd><p>Create a vector with ndim elements, each with the value <em>value</em>.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">ndim</i></dt>
<dd><p>Dimension of the vector (number of components)</p></dd>
<dt>double <i class="arg">value</i></dt>
<dd><p>Uniform value to be used (default: 0.0)</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::linearalgebra::mkUnitVector</b> <i class="arg">ndim</i> <i class="arg">ndir</i></a></dt>
<dd><p>Create a unit vector in <em>ndim</em>-dimensional space, along the
<em>ndir</em>-th direction.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">ndim</i></dt>
<dd><p>Dimension of the vector (number of components)</p></dd>
<dt>integer <i class="arg">ndir</i></dt>
<dd><p>Direction (0, ..., ndim-1)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::linearalgebra::mkMatrix</b> <i class="arg">nrows</i> <i class="arg">ncols</i> <i class="arg">value</i></a></dt>
<dd><p>Create a matrix with <em>nrows</em> rows and <em>ncols</em> columns. All
elements have the value <em>value</em>.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">nrows</i></dt>
<dd><p>Number of rows</p></dd>
<dt>integer <i class="arg">ncols</i></dt>
<dd><p>Number of columns</p></dd>
<dt>double <i class="arg">value</i></dt>
<dd><p>Uniform value to be used (default: 0.0)</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::linearalgebra::getrow</b> <i class="arg">matrix</i> <i class="arg">row</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></dt>
<dd><p>Returns a single row of a matrix as a list</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Matrix in question</p></dd>
<dt>integer <i class="arg">row</i></dt>
<dd><p>Index of the row to return</p></dd>
<dt>integer <i class="arg">imin</i></dt>
<dd><p>Minimum index of the column (default: 0)</p></dd>
<dt>integer <i class="arg">imax</i></dt>
<dd><p>Maximum index of the column (default: ncols-1)</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::linearalgebra::setrow</b> <i class="arg">matrix</i> <i class="arg">row</i> <i class="arg">newvalues</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></dt>
<dd><p>Set a single row of a matrix to new values (this list must have the same
number of elements as the number of <em>columns</em> in the matrix)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p><em>name</em> of the matrix in question</p></dd>
<dt>integer <i class="arg">row</i></dt>
<dd><p>Index of the row to update</p></dd>
<dt>list <i class="arg">newvalues</i></dt>
<dd><p>List of new values for the row</p></dd>
<dt>integer <i class="arg">imin</i></dt>
<dd><p>Minimum index of the column (default: 0)</p></dd>
<dt>integer <i class="arg">imax</i></dt>
<dd><p>Maximum index of the column (default: ncols-1)</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::math::linearalgebra::getcol</b> <i class="arg">matrix</i> <i class="arg">col</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></dt>
<dd><p>Returns a single column of a matrix as a list</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Matrix in question</p></dd>
<dt>integer <i class="arg">col</i></dt>
<dd><p>Index of the column to return</p></dd>
<dt>integer <i class="arg">imin</i></dt>
<dd><p>Minimum index of the row (default: 0)</p></dd>
<dt>integer <i class="arg">imax</i></dt>
<dd><p>Maximum index of the row (default: nrows-1)</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::linearalgebra::setcol</b> <i class="arg">matrix</i> <i class="arg">col</i> <i class="arg">newvalues</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></dt>
<dd><p>Set a single column of a matrix to new values (this list must have
the same number of elements as the number of <em>rows</em> in the matrix)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p><em>name</em> of the matrix in question</p></dd>
<dt>integer <i class="arg">col</i></dt>
<dd><p>Index of the column to update</p></dd>
<dt>list <i class="arg">newvalues</i></dt>
<dd><p>List of new values for the column</p></dd>
<dt>integer <i class="arg">imin</i></dt>
<dd><p>Minimum index of the row (default: 0)</p></dd>
<dt>integer <i class="arg">imax</i></dt>
<dd><p>Maximum index of the row (default: nrows-1)</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::linearalgebra::getelem</b> <i class="arg">matrix</i> <i class="arg">row</i> <i class="arg">col</i></a></dt>
<dd><p>Returns a single element of a matrix/vector</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Matrix or vector in question</p></dd>
<dt>integer <i class="arg">row</i></dt>
<dd><p>Row of the element</p></dd>
<dt>integer <i class="arg">col</i></dt>
<dd><p>Column of the element (not present for vectors)</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::linearalgebra::setelem</b> <i class="arg">matrix</i> <i class="arg">row</i> <span class="opt">?col?</span> <i class="arg">newvalue</i></a></dt>
<dd><p>Set a single element of a matrix (or vector) to a new value</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p><em>name</em> of the matrix in question</p></dd>
<dt>integer <i class="arg">row</i></dt>
<dd><p>Row of the element</p></dd>
<dt>integer <i class="arg">col</i></dt>
<dd><p>Column of the element (not present for vectors)</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::linearalgebra::swaprows</b> <i class="arg">matrix</i> <i class="arg">irow1</i> <i class="arg">irow2</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></dt>
<dd><p>Swap two rows in a matrix completely or only a selected part</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p><em>name</em> of the matrix in question</p></dd>
<dt>integer <i class="arg">irow1</i></dt>
<dd><p>Index of first row</p></dd>
<dt>integer <i class="arg">irow2</i></dt>
<dd><p>Index of second row</p></dd>
<dt>integer <i class="arg">imin</i></dt>
<dd><p>Minimum column index (default: 0)</p></dd>
<dt>integer <i class="arg">imin</i></dt>
<dd><p>Maximum column index (default: ncols-1)</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::linearalgebra::swapcols</b> <i class="arg">matrix</i> <i class="arg">icol1</i> <i class="arg">icol2</i> <span class="opt">?imin?</span> <span class="opt">?imax?</span></a></dt>
<dd><p>Swap two columns in a matrix completely or only a selected part</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p><em>name</em> of the matrix in question</p></dd>
<dt>integer <i class="arg">irow1</i></dt>
<dd><p>Index of first column</p></dd>
<dt>integer <i class="arg">irow2</i></dt>
<dd><p>Index of second column</p></dd>
<dt>integer <i class="arg">imin</i></dt>
<dd><p>Minimum row index (default: 0)</p></dd>
<dt>integer <i class="arg">imin</i></dt>
<dd><p>Maximum row index (default: nrows-1)</p></dd>
</dl></dd>
</dl>
<p><em>Querying matrices and vectors</em></p>
<dl class="doctools_definitions">
<dt><a name="12"><b class="cmd">::math::linearalgebra::show</b> <i class="arg">obj</i> <span class="opt">?format?</span> <span class="opt">?rowsep?</span> <span class="opt">?colsep?</span></a></dt>
<dd><p>Return a string representing the vector or matrix, for easy printing.
(There is currently no way to print fixed sets of columns)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">obj</i></dt>
<dd><p>Matrix or vector in question</p></dd>
<dt>string <i class="arg">format</i></dt>
<dd><p>Format for printing the numbers (default: %6.4f)</p></dd>
<dt>string <i class="arg">rowsep</i></dt>
<dd><p>String to use for separating rows (default: newline)</p></dd>
<dt>string <i class="arg">colsep</i></dt>
<dd><p>String to use for separating columns (default: space)</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::linearalgebra::dim</b> <i class="arg">obj</i></a></dt>
<dd><p>Returns the number of dimensions for the object (either 0 for a scalar,
1 for a vector and 2 for a matrix)</p>
<dl class="doctools_arguments">
<dt>any <i class="arg">obj</i></dt>
<dd><p>Scalar, vector, or matrix</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::math::linearalgebra::shape</b> <i class="arg">obj</i></a></dt>
<dd><p>Returns the number of elements in each dimension for the object (either
an empty list for a scalar, a single number for a vector and a list of
the number of rows and columns for a matrix)</p>
<dl class="doctools_arguments">
<dt>any <i class="arg">obj</i></dt>
<dd><p>Scalar, vector, or matrix</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::linearalgebra::conforming</b> <i class="arg">type</i> <i class="arg">obj1</i> <i class="arg">obj2</i></a></dt>
<dd><p>Checks if two objects (vector or matrix) have conforming shapes, that is
if they can be applied in an operation like addition or matrix
multiplication.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">type</i></dt>
<dd><p>Type of check:</p>
<ul class="doctools_itemized">
<li><p>&quot;shape&quot; - the two objects have the same shape (for all element-wise
operations)</p></li>
<li><p>&quot;rows&quot; - the two objects have the same number of rows (for use as A and
b in a system of linear equations <em>Ax = b</em></p></li>
<li><p>&quot;matmul&quot; - the first object has the same number of columns as the number
of rows of the second object. Useful for matrix-matrix or matrix-vector
multiplication.</p></li>
</ul></dd>
<dt>list <i class="arg">obj1</i></dt>
<dd><p>First vector or matrix (left operand)</p></dd>
<dt>list <i class="arg">obj2</i></dt>
<dd><p>Second vector or matrix (right operand)</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::linearalgebra::symmetric</b> <i class="arg">matrix</i> <span class="opt">?eps?</span></a></dt>
<dd><p>Checks if the given (square) matrix is symmetric. The argument eps
is the tolerance.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Matrix to be inspected</p></dd>
<dt>float <i class="arg">eps</i></dt>
<dd><p>Tolerance for determining approximate equality
(defaults to 1.0e-8)</p></dd>
</dl></dd>
</dl>
<p><em>Basic operations</em></p>
<dl class="doctools_definitions">
<dt><a name="17"><b class="cmd">::math::linearalgebra::norm</b> <i class="arg">vector</i> <i class="arg">type</i></a></dt>
<dd><p>Returns the norm of the given vector. The type argument can be: 1,
2, inf or max, respectively the sum of absolute values, the ordinary
Euclidean norm or the max norm.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector</i></dt>
<dd><p>Vector, list of coefficients</p></dd>
<dt>string <i class="arg">type</i></dt>
<dd><p>Type of norm (default: 2, the Euclidean norm)</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::linearalgebra::norm_one</b> <i class="arg">vector</i></a></dt>
<dd><p>Returns the L1 norm of the given vector, the sum of absolute values</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector</i></dt>
<dd><p>Vector, list of coefficients</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::linearalgebra::norm_two</b> <i class="arg">vector</i></a></dt>
<dd><p>Returns the L2 norm of the given vector, the ordinary Euclidean norm</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector</i></dt>
<dd><p>Vector, list of coefficients</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::linearalgebra::norm_max</b> <i class="arg">vector</i> <span class="opt">?index?</span></a></dt>
<dd><p>Returns the Linf norm of the given vector, the maximum absolute
coefficient</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector</i></dt>
<dd><p>Vector, list of coefficients</p></dd>
<dt>integer <i class="arg">index</i></dt>
<dd><p>(optional) if non zero, returns a list made of the maximum
value and the index where that maximum was found.
if zero, returns the maximum value.</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::linearalgebra::normMatrix</b> <i class="arg">matrix</i> <i class="arg">type</i></a></dt>
<dd><p>Returns the norm of the given matrix. The type argument can be: 1,
2, inf or max, respectively the sum of absolute values, the ordinary
Euclidean norm or the max norm.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Matrix, list of row vectors</p></dd>
<dt>string <i class="arg">type</i></dt>
<dd><p>Type of norm (default: 2, the Euclidean norm)</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::linearalgebra::dotproduct</b> <i class="arg">vect1</i> <i class="arg">vect2</i></a></dt>
<dd><p>Determine the inproduct or dot product of two vectors. These must have
the same shape (number of dimensions)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vect1</i></dt>
<dd><p>First vector, list of coefficients</p></dd>
<dt>list <i class="arg">vect2</i></dt>
<dd><p>Second vector, list of coefficients</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::linearalgebra::unitLengthVector</b> <i class="arg">vector</i></a></dt>
<dd><p>Return a vector in the same direction with length 1.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector</i></dt>
<dd><p>Vector to be normalized</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::linearalgebra::normalizeStat</b> <i class="arg">mv</i></a></dt>
<dd><p>Normalize the matrix or vector in a statistical sense: the mean of the
elements of the columns of the result is zero and the standard deviation
is 1.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">mv</i></dt>
<dd><p>Vector or matrix to be normalized in the above sense</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::linearalgebra::axpy</b> <i class="arg">scale</i> <i class="arg">mv1</i> <i class="arg">mv2</i></a></dt>
<dd><p>Return a vector or matrix that results from a &quot;daxpy&quot; operation, that
is: compute a*x+y (a a scalar and x and y both vectors or matrices of
the same shape) and return the result.</p>
<p>Specialised variants are: axpy_vect and axpy_mat (slightly faster,
but no check on the arguments)</p>
<dl class="doctools_arguments">
<dt>double <i class="arg">scale</i></dt>
<dd><p>The scale factor for the first vector/matrix (a)</p></dd>
<dt>list <i class="arg">mv1</i></dt>
<dd><p>First vector or matrix (x)</p></dd>
<dt>list <i class="arg">mv2</i></dt>
<dd><p>Second vector or matrix (y)</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::linearalgebra::add</b> <i class="arg">mv1</i> <i class="arg">mv2</i></a></dt>
<dd><p>Return a vector or matrix that is the sum of the two arguments (x+y)</p>
<p>Specialised variants are: add_vect and add_mat (slightly faster,
but no check on the arguments)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">mv1</i></dt>
<dd><p>First vector or matrix (x)</p></dd>
<dt>list <i class="arg">mv2</i></dt>
<dd><p>Second vector or matrix (y)</p></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">::math::linearalgebra::sub</b> <i class="arg">mv1</i> <i class="arg">mv2</i></a></dt>
<dd><p>Return a vector or matrix that is the difference of the two arguments
(x-y)</p>
<p>Specialised variants are: sub_vect and sub_mat (slightly faster,
but no check on the arguments)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">mv1</i></dt>
<dd><p>First vector or matrix (x)</p></dd>
<dt>list <i class="arg">mv2</i></dt>
<dd><p>Second vector or matrix (y)</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::linearalgebra::scale</b> <i class="arg">scale</i> <i class="arg">mv</i></a></dt>
<dd><p>Scale a vector or matrix and return the result, that is: compute a*x.</p>
<p>Specialised variants are: scale_vect and scale_mat (slightly faster,
but no check on the arguments)</p>
<dl class="doctools_arguments">
<dt>double <i class="arg">scale</i></dt>
<dd><p>The scale factor for the vector/matrix (a)</p></dd>
<dt>list <i class="arg">mv</i></dt>
<dd><p>Vector or matrix (x)</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::linearalgebra::rotate</b> <i class="arg">c</i> <i class="arg">s</i> <i class="arg">vect1</i> <i class="arg">vect2</i></a></dt>
<dd><p>Apply a planar rotation to two vectors and return the result as a list
of two vectors: c*x-s*y and s*x+c*y. In algorithms you can often easily
determine the cosine and sine of the angle, so it is more efficient to
pass that information directly.</p>
<dl class="doctools_arguments">
<dt>double <i class="arg">c</i></dt>
<dd><p>The cosine of the angle</p></dd>
<dt>double <i class="arg">s</i></dt>
<dd><p>The sine of the angle</p></dd>
<dt>list <i class="arg">vect1</i></dt>
<dd><p>First vector (x)</p></dd>
<dt>list <i class="arg">vect2</i></dt>
<dd><p>Seocnd vector (x)</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd">::math::linearalgebra::transpose</b> <i class="arg">matrix</i></a></dt>
<dd><p>Transpose a matrix</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Matrix to be transposed</p></dd>
</dl></dd>
<dt><a name="31"><b class="cmd">::math::linearalgebra::matmul</b> <i class="arg">mv1</i> <i class="arg">mv2</i></a></dt>
<dd><p>Multiply a vector/matrix with another vector/matrix. The result is
a matrix, if both x and y are matrices or both are vectors, in
which case the &quot;outer product&quot; is computed. If one is a vector and the
other is a matrix, then the result is a vector.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">mv1</i></dt>
<dd><p>First vector/matrix (x)</p></dd>
<dt>list <i class="arg">mv2</i></dt>
<dd><p>Second vector/matrix (y)</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">::math::linearalgebra::angle</b> <i class="arg">vect1</i> <i class="arg">vect2</i></a></dt>
<dd><p>Compute the angle between two vectors (in radians)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vect1</i></dt>
<dd><p>First vector</p></dd>
<dt>list <i class="arg">vect2</i></dt>
<dd><p>Second vector</p></dd>
</dl></dd>
<dt><a name="33"><b class="cmd">::math::linearalgebra::crossproduct</b> <i class="arg">vect1</i> <i class="arg">vect2</i></a></dt>
<dd><p>Compute the cross product of two (three-dimensional) vectors</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vect1</i></dt>
<dd><p>First vector</p></dd>
<dt>list <i class="arg">vect2</i></dt>
<dd><p>Second vector</p></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">::math::linearalgebra::matmul</b> <i class="arg">mv1</i> <i class="arg">mv2</i></a></dt>
<dd><p>Multiply a vector/matrix with another vector/matrix. The result is
a matrix, if both x and y are matrices or both are vectors, in
which case the &quot;outer product&quot; is computed. If one is a vector and the
other is a matrix, then the result is a vector.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">mv1</i></dt>
<dd><p>First vector/matrix (x)</p></dd>
<dt>list <i class="arg">mv2</i></dt>
<dd><p>Second vector/matrix (y)</p></dd>
</dl></dd>
</dl>
<p><em>Common matrices and test matrices</em></p>
<dl class="doctools_definitions">
<dt><a name="35"><b class="cmd">::math::linearalgebra::mkIdentity</b> <i class="arg">size</i></a></dt>
<dd><p>Create an identity matrix of dimension <em>size</em>.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
</dl></dd>
<dt><a name="36"><b class="cmd">::math::linearalgebra::mkDiagonal</b> <i class="arg">diag</i></a></dt>
<dd><p>Create a diagonal matrix whose diagonal elements are the elements of the
vector <em>diag</em>.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">diag</i></dt>
<dd><p>Vector whose elements are used for the diagonal</p></dd>
</dl></dd>
<dt><a name="37"><b class="cmd">::math::linearalgebra::mkRandom</b> <i class="arg">size</i></a></dt>
<dd><p>Create a square matrix whose elements are uniformly distributed random
numbers between 0 and 1 of dimension <em>size</em>.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
</dl></dd>
<dt><a name="38"><b class="cmd">::math::linearalgebra::mkTriangular</b> <i class="arg">size</i> <span class="opt">?uplo?</span> <span class="opt">?value?</span></a></dt>
<dd><p>Create a triangular matrix with non-zero elements in the upper or lower
part, depending on argument <em>uplo</em>.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
<dt>string <i class="arg">uplo</i></dt>
<dd><p>Fill the upper (U) or lower part (L)</p></dd>
<dt>double <i class="arg">value</i></dt>
<dd><p>Value to fill the matrix with</p></dd>
</dl></dd>
<dt><a name="39"><b class="cmd">::math::linearalgebra::mkHilbert</b> <i class="arg">size</i></a></dt>
<dd><p>Create a Hilbert matrix of dimension <em>size</em>.
Hilbert matrices are very ill-conditioned with respect to
eigenvalue/eigenvector problems. Therefore they
are good candidates for testing the accuracy
of algorithms and implementations.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
</dl></dd>
<dt><a name="40"><b class="cmd">::math::linearalgebra::mkDingdong</b> <i class="arg">size</i></a></dt>
<dd><p>Create a &quot;dingdong&quot; matrix of dimension <em>size</em>.
Dingdong matrices are imprecisely represented,
but have the property of being very stable in
such algorithms as Gauss elimination.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
</dl></dd>
<dt><a name="41"><b class="cmd">::math::linearalgebra::mkOnes</b> <i class="arg">size</i></a></dt>
<dd><p>Create a square matrix of dimension <em>size</em> whose entries are all 1.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
</dl></dd>
<dt><a name="42"><b class="cmd">::math::linearalgebra::mkMoler</b> <i class="arg">size</i></a></dt>
<dd><p>Create a Moler matrix of size <em>size</em>. (Moler matrices have
a very simple Choleski decomposition. It has one small eigenvalue
and it can easily upset elimination methods for systems of linear
equations.)</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
</dl></dd>
<dt><a name="43"><b class="cmd">::math::linearalgebra::mkFrank</b> <i class="arg">size</i></a></dt>
<dd><p>Create a Frank matrix of size <em>size</em>. (Frank matrices are
fairly well-behaved matrices)</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
</dl></dd>
<dt><a name="44"><b class="cmd">::math::linearalgebra::mkBorder</b> <i class="arg">size</i></a></dt>
<dd><p>Create a bordered matrix of size <em>size</em>. (Bordered matrices have
a very low rank and can upset certain specialised algorithms.)</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
</dl></dd>
<dt><a name="45"><b class="cmd">::math::linearalgebra::mkWilkinsonW+</b> <i class="arg">size</i></a></dt>
<dd><p>Create a Wilkinson W+ of size <em>size</em>. This kind of matrix
has pairs of eigenvalues that are very close together. Usually
the order (size) is odd.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
</dl></dd>
<dt><a name="46"><b class="cmd">::math::linearalgebra::mkWilkinsonW-</b> <i class="arg">size</i></a></dt>
<dd><p>Create a Wilkinson W- of size <em>size</em>. This kind of matrix
has pairs of eigenvalues with opposite signs, when the order (size)
is odd.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">size</i></dt>
<dd><p>Dimension of the matrix</p></dd>
</dl></dd>
</dl>
<p><em>Common algorithms</em></p>
<dl class="doctools_definitions">
<dt><a name="47"><b class="cmd">::math::linearalgebra::solveGauss</b> <i class="arg">matrix</i> <i class="arg">bvect</i></a></dt>
<dd><p>Solve a system of linear equations (Ax=b) using Gauss elimination.
Returns the solution (x) as a vector or matrix of the same shape as
bvect.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Square matrix (matrix A)</p></dd>
<dt>list <i class="arg">bvect</i></dt>
<dd><p>Vector or matrix whose columns are the individual
b-vectors</p></dd>
</dl></dd>
<dt><a name="48"><b class="cmd">::math::linearalgebra::solvePGauss</b> <i class="arg">matrix</i> <i class="arg">bvect</i></a></dt>
<dd><p>Solve a system of linear equations (Ax=b) using Gauss elimination with
partial pivoting. Returns the solution (x) as a vector or matrix of the
same shape as bvect.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Square matrix (matrix A)</p></dd>
<dt>list <i class="arg">bvect</i></dt>
<dd><p>Vector or matrix whose columns are the individual
b-vectors</p></dd>
</dl></dd>
<dt><a name="49"><b class="cmd">::math::linearalgebra::solveTriangular</b> <i class="arg">matrix</i> <i class="arg">bvect</i> <span class="opt">?uplo?</span></a></dt>
<dd><p>Solve a system of linear equations (Ax=b) by backward substitution. The
matrix is supposed to be upper-triangular.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Lower or upper-triangular matrix (matrix A)</p></dd>
<dt>list <i class="arg">bvect</i></dt>
<dd><p>Vector or matrix whose columns are the individual
b-vectors</p></dd>
<dt>string <i class="arg">uplo</i></dt>
<dd><p>Indicates whether the matrix is lower-triangular
(L) or upper-triangular (U). Defaults to &quot;U&quot;.</p></dd>
</dl></dd>
<dt><a name="50"><b class="cmd">::math::linearalgebra::solveGaussBand</b> <i class="arg">matrix</i> <i class="arg">bvect</i></a></dt>
<dd><p>Solve a system of linear equations (Ax=b) using Gauss elimination,
where the matrix is stored as a band matrix (<em>cf.</em> <span class="sectref"><a href="#section3">STORAGE</a></span>).
Returns the solution (x) as a vector or matrix of the same shape as
bvect.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Square matrix (matrix A; in band form)</p></dd>
<dt>list <i class="arg">bvect</i></dt>
<dd><p>Vector or matrix whose columns are the individual
b-vectors</p></dd>
</dl></dd>
<dt><a name="51"><b class="cmd">::math::linearalgebra::solveTriangularBand</b> <i class="arg">matrix</i> <i class="arg">bvect</i></a></dt>
<dd><p>Solve a system of linear equations (Ax=b) by backward substitution. The
matrix is supposed to be upper-triangular and stored in band form.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Upper-triangular matrix (matrix A)</p></dd>
<dt>list <i class="arg">bvect</i></dt>
<dd><p>Vector or matrix whose columns are the individual
b-vectors</p></dd>
</dl></dd>
<dt><a name="52"><b class="cmd">::math::linearalgebra::determineSVD</b> <i class="arg">A</i> <i class="arg">eps</i></a></dt>
<dd><p>Determines the Singular Value Decomposition of a matrix: A = U S Vtrans.
Returns a list with the matrix U, the vector of singular values S and
the matrix V.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">A</i></dt>
<dd><p>Matrix to be decomposed</p></dd>
<dt>float <i class="arg">eps</i></dt>
<dd><p>Tolerance (defaults to 2.3e-16)</p></dd>
</dl></dd>
<dt><a name="53"><b class="cmd">::math::linearalgebra::eigenvectorsSVD</b> <i class="arg">A</i> <i class="arg">eps</i></a></dt>
<dd><p>Determines the eigenvectors and eigenvalues of a real
<em>symmetric</em> matrix, using SVD. Returns a list with the matrix of
normalized eigenvectors and their eigenvalues.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">A</i></dt>
<dd><p>Matrix whose eigenvalues must be determined</p></dd>
<dt>float <i class="arg">eps</i></dt>
<dd><p>Tolerance (defaults to 2.3e-16)</p></dd>
</dl></dd>
<dt><a name="54"><b class="cmd">::math::linearalgebra::leastSquaresSVD</b> <i class="arg">A</i> <i class="arg">y</i> <i class="arg">qmin</i> <i class="arg">eps</i></a></dt>
<dd><p>Determines the solution to a least-sqaures problem Ax ~ y via singular
value decomposition. The result is the vector x.</p>
<p>Note that if you add a column of 1s to the matrix, then this column will
represent a constant like in: y = a*x1 + b*x2 + c. To force the
intercept to be zero, simply leave it out.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">A</i></dt>
<dd><p>Matrix of independent variables</p></dd>
<dt>list <i class="arg">y</i></dt>
<dd><p>List of observed values</p></dd>
<dt>float <i class="arg">qmin</i></dt>
<dd><p>Minimum singular value to be considered (defaults to 0.0)</p></dd>
<dt>float <i class="arg">eps</i></dt>
<dd><p>Tolerance (defaults to 2.3e-16)</p></dd>
</dl></dd>
<dt><a name="55"><b class="cmd">::math::linearalgebra::choleski</b> <i class="arg">matrix</i></a></dt>
<dd><p>Determine the Choleski decomposition of a symmetric positive
semidefinite matrix (this condition is not checked!). The result
is the lower-triangular matrix L such that L Lt = matrix.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Matrix to be decomposed</p></dd>
</dl></dd>
<dt><a name="56"><b class="cmd">::math::linearalgebra::orthonormalizeColumns</b> <i class="arg">matrix</i></a></dt>
<dd><p>Use the modified Gram-Schmidt method to orthogonalize and normalize
the <em>columns</em> of the given matrix and return the result.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Matrix whose columns must be orthonormalized</p></dd>
</dl></dd>
<dt><a name="57"><b class="cmd">::math::linearalgebra::orthonormalizeRows</b> <i class="arg">matrix</i></a></dt>
<dd><p>Use the modified Gram-Schmidt method to orthogonalize and normalize
the <em>rows</em> of the given matrix and return the result.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Matrix whose rows must be orthonormalized</p></dd>
</dl></dd>
<dt><a name="58"><b class="cmd">::math::linearalgebra::dger</b> <i class="arg">matrix</i> <i class="arg">alpha</i> <i class="arg">x</i> <i class="arg">y</i> <span class="opt">?scope?</span></a></dt>
<dd><p>Perform the rank 1 operation A + alpha*x*y' inline (that is: the matrix A is adjusted).
For convenience the new matrix is also returned as the result.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Matrix whose rows must be adjusted</p></dd>
<dt>double <i class="arg">alpha</i></dt>
<dd><p>Scale factor</p></dd>
<dt>list <i class="arg">x</i></dt>
<dd><p>A column vector</p></dd>
<dt>list <i class="arg">y</i></dt>
<dd><p>A column vector</p></dd>
<dt>list <i class="arg">scope</i></dt>
<dd><p>If not provided, the operation is performed on all rows/columns of A
if provided, it is expected to be the list {imin imax jmin jmax}
where:</p>
<ul class="doctools_itemized">
<li><p><i class="term">imin</i> Minimum row index</p></li>
<li><p><i class="term">imax</i> Maximum row index</p></li>
<li><p><i class="term">jmin</i> Minimum column index</p></li>
<li><p><i class="term">jmax</i> Maximum column index</p></li>
</ul></dd>
</dl></dd>
<dt><a name="59"><b class="cmd">::math::linearalgebra::dgetrf</b> <i class="arg">matrix</i></a></dt>
<dd><p>Computes an LU factorization of a general matrix, using partial,
pivoting with row interchanges. Returns the permutation vector.</p>
<p>The factorization has the form</p>
<pre class="doctools_example">
   P * A = L * U
</pre>
<p>where P is a permutation matrix, L is lower triangular with unit
diagonal elements, and U is upper triangular.
Returns the permutation vector, as a list of length n-1.
The last entry of the permutation is not stored, since it is
implicitely known, with value n (the last row is not swapped
with any other row).
At index #i of the permutation is stored the index of the row #j
which is swapped with row #i at step #i. That means that each
index of the permutation gives the permutation at each step, not the
cumulated permutation matrix, which is the product of permutations.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>On entry, the matrix to be factored.
On exit, the factors L and U from the factorization
P*A = L*U; the unit diagonal elements of L are not stored.</p></dd>
</dl></dd>
<dt><a name="60"><b class="cmd">::math::linearalgebra::det</b> <i class="arg">matrix</i></a></dt>
<dd><p>Returns the determinant of the given matrix, based on PA=LU
decomposition, i.e. Gauss partial pivotal.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Square matrix (matrix A)</p></dd>
<dt>list <i class="arg">ipiv</i></dt>
<dd><p>The pivots (optionnal).
If the pivots are not provided, a PA=LU decomposition
is performed.
If the pivots are provided, we assume that it
contains the pivots and that the matrix A contains the
L and U factors, as provided by dgterf.
b-vectors</p></dd>
</dl></dd>
<dt><a name="61"><b class="cmd">::math::linearalgebra::largesteigen</b> <i class="arg">matrix</i> <i class="arg">tolerance</i> <i class="arg">maxiter</i></a></dt>
<dd><p>Returns a list made of the largest eigenvalue (in magnitude)
and associated eigenvector.
Uses iterative Power Method as provided as algorithm #7.3.3 of Golub &amp; Van Loan.
This algorithm is used here for a dense matrix (but is usually
used for sparse matrices).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">matrix</i></dt>
<dd><p>Square matrix (matrix A)</p></dd>
<dt>double <i class="arg">tolerance</i></dt>
<dd><p>The relative tolerance of the eigenvalue (default:1.e-8).</p></dd>
<dt>integer <i class="arg">maxiter</i></dt>
<dd><p>The maximum number of iterations (default:10).</p></dd>
</dl></dd>
</dl>
<p><em>Compability with the LA package</em>
Two procedures are provided for compatibility with Hume's LA package:</p>
<dl class="doctools_definitions">
<dt><a name="62"><b class="cmd">::math::linearalgebra::to_LA</b> <i class="arg">mv</i></a></dt>
<dd><p>Transforms a vector or matrix into the format used by the original LA
package.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">mv</i></dt>
<dd><p>Matrix or vector</p></dd>
</dl></dd>
<dt><a name="63"><b class="cmd">::math::linearalgebra::from_LA</b> <i class="arg">mv</i></a></dt>
<dd><p>Transforms a vector or matrix from the format used by the original LA
package into the format used by the present implementation.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">mv</i></dt>
<dd><p>Matrix or vector as used by the LA package</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">STORAGE</a></h2>
<p>While most procedures assume that the matrices are given in full form,
the procedures <em>solveGaussBand</em> and <em>solveTriangularBand</em>
assume that the matrices are stored as <em>band matrices</em>. This
common type of &quot;sparse&quot; matrices is related to ordinary matrices as
follows:</p>
<ul class="doctools_itemized">
<li><p>&quot;A&quot; is a full-size matrix with N rows and M columns.</p></li>
<li><p>&quot;B&quot; is a band matrix, with m upper and lower diagonals and n rows.</p></li>
<li><p>&quot;B&quot; can be stored in an ordinary matrix of (2m+1) columns (one for
each off-diagonal and the main diagonal) and n rows.</p></li>
<li><p>Element i,j (i = -m,...,m; j =1,...,n) of &quot;B&quot; corresponds to element
k,j of &quot;A&quot; where k = M+i-1 and M is at least (!) n, the number of rows
in &quot;B&quot;.</p></li>
<li><p>To set element (i,j) of matrix &quot;B&quot; use:</p>
<pre class="doctools_example">
    setelem B $j [expr {$N+$i-1}] $value
</pre>
</li>
</ul>
<p>(There is no convenience procedure for this yet)</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REMARKS ON THE IMPLEMENTATION</a></h2>
<p>There is a difference between the original LA package by Hume and the
current implementation. Whereas the LA package uses a linear list, the
current package uses lists of lists to represent matrices. It turns out
that with this representation, the algorithms are faster and easier to
implement.</p>
<p>The LA package was used as a model and in fact the implementation of,
for instance, the SVD algorithm was taken from that package. The set of
procedures was expanded using ideas from the well-known BLAS library and
some algorithms were updated from the second edition of J.C. Nash's
book, Compact Numerical Methods for Computers, (Adam Hilger, 1990) that
inspired the LA package.</p>
<p>Two procedures are provided to make the transition between the two
implementations easier: <em>to_LA</em> and <em>from_LA</em>. They are
described above.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">TODO</a></h2>
<p>Odds and ends: the following algorithms have not been implemented yet:</p>
<ul class="doctools_itemized">
<li><p>determineQR</p></li>
<li><p>certainlyPositive, diagonallyDominant</p></li>
</ul>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">NAMING CONFLICT</a></h2>
<p>If you load this package in a Tk-enabled shell like wish, then the
command</p>
<pre class="doctools_example">namespace import ::math::linearalgebra</pre>
<p>results in an error
message about &quot;scale&quot;. This is due to the fact that Tk defines all
its commands in the global namespace. The solution is to import
the linear algebra commands in a namespace that is not the global one:</p>
<pre class="doctools_example">
package require math::linearalgebra
namespace eval compute {
    namespace import ::math::linearalgebra::*
    ... use the linear algebra version of scale ...
}
</pre>
<p>To use Tk's scale command in that same namespace you can rename it:</p>
<pre class="doctools_example">
namespace eval compute {
    rename ::scale scaleTk
    scaleTk .scale ...
}
</pre>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: linearalgebra</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key69">least squares</a>, <a href="../../../../index.html#key68">linear algebra</a>, <a href="../../../../index.html#key67">linear equations</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key66">matrices</a>, <a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key70">vectors</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Ed Hume &lt;http://www.hume.com/contact.us.htm&gt;<br>
Copyright &copy; 2008 Michael Buadin &lt;relaxkmike@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/machineparameters.html.































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287

<div class='fossil-doc' data-title='tclrep/machineparameters - tclrep'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tclrep/machineparameters(n) 1.0 tcllib &quot;tclrep&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tclrep/machineparameters - Compute double precision machine parameters.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLE</a></li>
<li class="doctools_section"><a href="#section3">REFERENCES</a></li>
<li class="doctools_section"><a href="#section4">CLASS API</a></li>
<li class="doctools_section"><a href="#section5">OBJECT API</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">math::machineparameters 0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">machineparameters</b> create <i class="arg">objectname</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectname</i> <b class="method">configure</b> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><i class="arg">objectname</i> <b class="method">cget</b> <i class="arg">opt</i></a></li>
<li><a href="#4"><i class="arg">objectname</i> <b class="method">destroy</b></a></li>
<li><a href="#5"><i class="arg">objectname</i> <b class="method">compute</b></a></li>
<li><a href="#6"><i class="arg">objectname</i> <b class="method">get</b> <i class="arg">key</i></a></li>
<li><a href="#7"><i class="arg">objectname</i> <b class="method">tostring</b></a></li>
<li><a href="#8"><i class="arg">objectname</i> <b class="method">print</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <em>math::machineparameters</em> package
is the Tcl equivalent of the DLAMCH LAPACK function.
In floating point systems, a floating point number is represented
by</p>
<pre class="doctools_example">
x = +/- d1 d2 ... dt basis^e
</pre>
<p>where digits satisfy</p>
<pre class="doctools_example">
0 &lt;= di &lt;= basis - 1, i = 1, t
</pre>
<p>with the convention :</p>
<ul class="doctools_itemized">
<li><p>t is the size of the mantissa</p></li>
<li><p>basis is the basis (the &quot;radix&quot;)</p></li>
</ul>
<p>The <b class="method">compute</b> method computes all machine parameters.
   Then, the <b class="method">get</b> method can be used to get each
   parameter.
   The <b class="method">print</b> method prints a report on standard output.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLE</a></h2>
<p>In the following example, one compute the parameters of a desktop
under Linux with the following Tcl 8.4.19 properties :</p>
<pre class="doctools_example">
% parray tcl_platform
tcl_platform(byteOrder) = littleEndian
tcl_platform(machine)   = i686
tcl_platform(os)        = Linux
tcl_platform(osVersion) = 2.6.24-19-generic
tcl_platform(platform)  = unix
tcl_platform(tip,268)   = 1
tcl_platform(tip,280)   = 1
tcl_platform(user)      = &lt;username&gt;
tcl_platform(wordSize)  = 4
</pre>
<p>The following example creates a machineparameters object,
   computes the properties and displays it.</p>
<pre class="doctools_example">
     set pp [machineparameters create %AUTO%]
     $pp compute
     $pp print
     $pp destroy
</pre>
<p>This prints out :</p>
<pre class="doctools_example">
     Machine parameters
     Epsilon : 1.11022302463e-16
     Beta : 2
     Rounding : proper
     Mantissa : 53
     Maximum exponent : 1024
     Minimum exponent : -1021
     Overflow threshold : 8.98846567431e+307
     Underflow threshold : 2.22507385851e-308
</pre>
<p>That compares well with the results produced by Lapack 3.1.1 :</p>
<pre class="doctools_example">
     Epsilon                      =   1.11022302462515654E-016
     Safe minimum                 =   2.22507385850720138E-308
     Base                         =    2.0000000000000000
     Precision                    =   2.22044604925031308E-016
     Number of digits in mantissa =    53.000000000000000
     Rounding mode                =   1.00000000000000000
     Minimum exponent             =   -1021.0000000000000
     Underflow threshold          =   2.22507385850720138E-308
     Largest exponent             =    1024.0000000000000
     Overflow threshold           =   1.79769313486231571E+308
     Reciprocal of safe minimum   =   4.49423283715578977E+307
</pre>
<p>The following example creates a machineparameters object,
   computes the properties and gets the epsilon for
   the machine.</p>
<pre class="doctools_example">
     set pp [machineparameters create %AUTO%]
     $pp compute
     set eps [$pp get -epsilon]
     $pp destroy
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">REFERENCES</a></h2>
<ul class="doctools_itemized">
<li><p>&quot;Algorithms to Reveal Properties of Floating-Point Arithmetic&quot;, Michael A. Malcolm, Stanford University, Communications of the ACM, Volume 15 ,  Issue 11  (November 1972), Pages: 949 - 951</p></li>
<li><p>&quot;More on Algorithms that Reveal Properties of Floating, Point Arithmetic Units&quot;, W. Morven Gentleman, University of Waterloo, Scott B. Marovich, Purdue University, Communications of the ACM, Volume 17 ,  Issue 5  (May 1974), Pages: 276 - 277</p></li>
</ul>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">CLASS API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">machineparameters</b> create <i class="arg">objectname</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>The command creates a new machineparameters object and returns the fully
qualified name of the object command as its result.</p>
<dl class="doctools_options">
<dt><b class="option">-verbose</b> <i class="arg">verbose</i></dt>
<dd><p>Set this option to 1 to enable verbose logging.
This option is mainly for debug purposes.
The default value of <i class="arg">verbose</i> is 0.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">OBJECT API</a></h2>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectname</i> <b class="method">configure</b> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>The command configure the options of the object <i class="arg">objectname</i>. The options
are the same as the static method <b class="method">create</b>.</p></dd>
<dt><a name="3"><i class="arg">objectname</i> <b class="method">cget</b> <i class="arg">opt</i></a></dt>
<dd><p>Returns the value of the option which name is <i class="arg">opt</i>. The options
are the same as the method <b class="method">create</b> and <b class="method">configure</b>.</p></dd>
<dt><a name="4"><i class="arg">objectname</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the object <i class="arg">objectname</i>.</p></dd>
<dt><a name="5"><i class="arg">objectname</i> <b class="method">compute</b></a></dt>
<dd><p>Computes the machine parameters.</p></dd>
<dt><a name="6"><i class="arg">objectname</i> <b class="method">get</b> <i class="arg">key</i></a></dt>
<dd><p>Returns the value corresponding with given key.
The following is the list of available keys.</p>
<ul class="doctools_itemized">
<li><p>-epsilon : smallest value so that 1+epsilon&gt;1 is false</p></li>
<li><p>-rounding : The rounding mode used on the machine.
The rounding occurs when more than t digits would be required to
represent the number.
Two modes can be determined with the current system :
&quot;chop&quot; means than only t digits are kept, no matter the value of the number
&quot;proper&quot; means that another rounding mode is used, be it &quot;round to nearest&quot;,
&quot;round up&quot;, &quot;round down&quot;.</p></li>
<li><p>-basis : the basis of the floating-point representation.
The basis is usually 2, i.e. binary representation (for example IEEE 754 machines),
but some machines (like HP calculators for example) uses 10, or 16, etc...</p></li>
<li><p>-mantissa : the number of bits in the mantissa</p></li>
<li><p>-exponentmax :  the largest positive exponent before overflow occurs</p></li>
<li><p>-exponentmin : the largest negative exponent before (gradual) underflow occurs</p></li>
<li><p>-vmax : largest positive value before overflow occurs</p></li>
<li><p>-vmin : largest negative value before (gradual) underflow occurs</p></li>
</ul></dd>
<dt><a name="7"><i class="arg">objectname</i> <b class="method">tostring</b></a></dt>
<dd><p>Return a report for machine parameters.</p></dd>
<dt><a name="8"><i class="arg">objectname</i> <b class="method">print</b></a></dt>
<dd><p>Print machine parameters on standard output.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Michael Baudin &lt;michael.baudin@sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/math.html.





















































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<div class='fossil-doc' data-title='math - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math(n) 1.2.5 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math - Tcl Math Library</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">BASIC COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">math <span class="opt">?1.2.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::cov</b> <i class="arg">value</i> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::math::integrate</b> <i class="arg">list of xy value pairs</i></a></li>
<li><a href="#3"><b class="cmd">::math::fibonacci</b> <i class="arg">n</i></a></li>
<li><a href="#4"><b class="cmd">::math::max</b> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::math::mean</b> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::math::min</b> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::math::product</b> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::math::random</b> <span class="opt">?<i class="arg">value1</i>?</span> <span class="opt">?<i class="arg">value2</i>?</span></a></li>
<li><a href="#9"><b class="cmd">::math::sigma</b> <i class="arg">value</i> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::math::stats</b> <i class="arg">value</i> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></li>
<li><a href="#11"><b class="cmd">::math::sum</b> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">math</b> package provides utility math functions.</p>
<p>Besides a set of basic commands, available via the package <em>math</em>,
there are more specialised packages:</p>
<ul class="doctools_itemized">
<li><p><b class="package"><a href="bigfloat.html">math::bigfloat</a></b> - Arbitrary-precision floating-point
arithmetic</p></li>
<li><p><b class="package"><a href="bignum.html">math::bignum</a></b> - Arbitrary-precision integer arithmetic</p></li>
<li><p><b class="package"><a href="romberg.html">math::calculus::romberg</a></b> - Robust integration methods for
functions of one variable, using Romberg integration</p></li>
<li><p><b class="package"><a href="calculus.html">math::calculus</a></b> - Integration of functions, solving ordinary
differential equations</p></li>
<li><p><b class="package"><a href="combinatorics.html">math::combinatorics</a></b> - Procedures for various combinatorial
functions (for instance the Gamma function and &quot;k out of n&quot;)</p></li>
<li><p><b class="package"><a href="qcomplex.html">math::complexnumbers</a></b> - Complex number arithmetic</p></li>
<li><p><b class="package"><a href="constants.html">math::constants</a></b> - A set of well-known mathematical
constants, such as Pi, E, and the golden ratio</p></li>
<li><p><b class="package"><a href="fourier.html">math::fourier</a></b> - Discrete Fourier transforms</p></li>
<li><p><b class="package"><a href="fuzzy.html">math::fuzzy</a></b> - Fuzzy comparisons of floating-point numbers</p></li>
<li><p><b class="package"><a href="math_geometry.html">math::geometry</a></b> - 2D geometrical computations</p></li>
<li><p><b class="package"><a href="interpolate.html">math::interpolate</a></b> - Various interpolation methods</p></li>
<li><p><b class="package"><a href="linalg.html">math::linearalgebra</a></b> - Linear algebra package</p></li>
<li><p><b class="package"><a href="optimize.html">math::optimize</a></b> - Optimization methods</p></li>
<li><p><b class="package"><a href="polynomials.html">math::polynomials</a></b> - Polynomial arithmetic (includes families
of classical polynomials)</p></li>
<li><p><b class="package"><a href="rational_funcs.html">math::rationalfunctions</a></b> - Arithmetic of rational functions</p></li>
<li><p><b class="package"><a href="roman.html">math::roman</a></b> - Manipulation (including arithmetic) of Roman
numerals</p></li>
<li><p><b class="package"><a href="special.html">math::special</a></b> - Approximations of special functions from
mathematical physics</p></li>
<li><p><b class="package"><a href="statistics.html">math::statistics</a></b> - Statistical operations and tests</p></li>
</ul>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">BASIC COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::cov</b> <i class="arg">value</i> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></dt>
<dd><p>Return the coefficient of variation expressed as percent of two or
more numeric values.</p></dd>
<dt><a name="2"><b class="cmd">::math::integrate</b> <i class="arg">list of xy value pairs</i></a></dt>
<dd><p>Return the area under a &quot;curve&quot; defined by a set of x,y pairs and the
error bound as a list.</p></dd>
<dt><a name="3"><b class="cmd">::math::fibonacci</b> <i class="arg">n</i></a></dt>
<dd><p>Return the <i class="arg">n</i>'th Fibonacci number.</p></dd>
<dt><a name="4"><b class="cmd">::math::max</b> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></dt>
<dd><p>Return the maximum of one or more numeric values.</p></dd>
<dt><a name="5"><b class="cmd">::math::mean</b> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></dt>
<dd><p>Return the mean, or &quot;average&quot; of one or more numeric values.</p></dd>
<dt><a name="6"><b class="cmd">::math::min</b> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></dt>
<dd><p>Return the minimum of one or more numeric values.</p></dd>
<dt><a name="7"><b class="cmd">::math::product</b> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></dt>
<dd><p>Return the product of one or more numeric values.</p></dd>
<dt><a name="8"><b class="cmd">::math::random</b> <span class="opt">?<i class="arg">value1</i>?</span> <span class="opt">?<i class="arg">value2</i>?</span></a></dt>
<dd><p>Return a random number.  If no arguments are given, the number is a
floating point value between 0 and 1.  If one argument is given, the
number is an integer value between 0 and <i class="arg">value1</i>.  If two
arguments are given, the number is an integer value between
<i class="arg">value1</i> and <i class="arg">value2</i>.</p></dd>
<dt><a name="9"><b class="cmd">::math::sigma</b> <i class="arg">value</i> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></dt>
<dd><p>Return the population standard deviation of two or more numeric
values.</p></dd>
<dt><a name="10"><b class="cmd">::math::stats</b> <i class="arg">value</i> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></dt>
<dd><p>Return the mean, standard deviation, and coefficient of variation (as
percent) as a list.</p></dd>
<dt><a name="11"><b class="cmd">::math::sum</b> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></dt>
<dd><p>Return the sum of one or more numeric values.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key195">statistics</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/math_geometry.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549

<div class='fossil-doc' data-title='math::geometry - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::geometry(n) 1.2.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::geometry - Geometrical computations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">References</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::geometry <span class="opt">?1.2.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::geometry::+</b> <i class="arg">point1</i> <i class="arg">point2</i></a></li>
<li><a href="#2"><b class="cmd">::math::geometry::-</b> <i class="arg">point1</i> <i class="arg">point2</i></a></li>
<li><a href="#3"><b class="cmd">::math::geometry::p</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#4"><b class="cmd">::math::geometry::distance</b> <i class="arg">point1</i> <i class="arg">point2</i></a></li>
<li><a href="#5"><b class="cmd">::math::geometry::length</b> <i class="arg">point</i></a></li>
<li><a href="#6"><b class="cmd">::math::geometry::s*</b> <i class="arg">factor</i> <i class="arg">point</i></a></li>
<li><a href="#7"><b class="cmd">::math::geometry::direction</b> <i class="arg">angle</i></a></li>
<li><a href="#8"><b class="cmd">::math::geometry::h</b> <i class="arg">length</i></a></li>
<li><a href="#9"><b class="cmd">::math::geometry::v</b> <i class="arg">length</i></a></li>
<li><a href="#10"><b class="cmd">::math::geometry::between</b> <i class="arg">point1</i> <i class="arg">point2</i> <i class="arg">s</i></a></li>
<li><a href="#11"><b class="cmd">::math::geometry::octant</b> <i class="arg">point</i></a></li>
<li><a href="#12"><b class="cmd">::math::geometry::rect</b> <i class="arg">nw</i> <i class="arg">se</i></a></li>
<li><a href="#13"><b class="cmd">::math::geometry::nwse</b> <i class="arg">rect</i></a></li>
<li><a href="#14"><b class="cmd">::math::geometry::angle</b> <i class="arg">line</i></a></li>
<li><a href="#15"><b class="cmd">::math::geometry::calculateDistanceToLine</b> <i class="arg">P</i> <i class="arg">line</i></a></li>
<li><a href="#16"><b class="cmd">::math::geometry::calculateDistanceToLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></li>
<li><a href="#17"><b class="cmd">::math::geometry::calculateDistanceToPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#18"><b class="cmd">::math::geometry::calculateDistanceToPolygon</b> <i class="arg">P</i> <i class="arg">polygon</i></a></li>
<li><a href="#19"><b class="cmd">::math::geometry::findClosestPointOnLine</b> <i class="arg">P</i> <i class="arg">line</i></a></li>
<li><a href="#20"><b class="cmd">::math::geometry::findClosestPointOnLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></li>
<li><a href="#21"><b class="cmd">::math::geometry::findClosestPointOnPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#22"><b class="cmd">::math::geometry::lengthOfPolyline</b> <i class="arg">polyline</i></a></li>
<li><a href="#23"><b class="cmd">::math::geometry::movePointInDirection</b> <i class="arg">P</i> <i class="arg">direction</i> <i class="arg">dist</i></a></li>
<li><a href="#24"><b class="cmd">::math::geometry::lineSegmentsIntersect</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></li>
<li><a href="#25"><b class="cmd">::math::geometry::findLineSegmentIntersection</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></li>
<li><a href="#26"><b class="cmd">::math::geometry::findLineIntersection</b> <i class="arg">line1</i> <i class="arg">line2</i></a></li>
<li><a href="#27"><b class="cmd">::math::geometry::polylinesIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i></a></li>
<li><a href="#28"><b class="cmd">::math::geometry::polylinesBoundingIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <i class="arg">granularity</i></a></li>
<li><a href="#29"><b class="cmd">::math::geometry::intervalsOverlap</b> <i class="arg">y1</i> <i class="arg">y2</i> <i class="arg">y3</i> <i class="arg">y4</i> <i class="arg">strict</i></a></li>
<li><a href="#30"><b class="cmd">::math::geometry::rectanglesOverlap</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">Q1</i> <i class="arg">Q2</i> <i class="arg">strict</i></a></li>
<li><a href="#31"><b class="cmd">::math::geometry::bbox</b> <i class="arg">polyline</i></a></li>
<li><a href="#32"><b class="cmd">::math::geometry::pointInsidePolygon</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#33"><b class="cmd">::math::geometry::pointInsidePolygonAlt</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#34"><b class="cmd">::math::geometry::rectangleInsidePolygon</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">polyline</i></a></li>
<li><a href="#35"><b class="cmd">::math::geometry::areaPolygon</b> <i class="arg">polygon</i></a></li>
<li><a href="#36"><b class="cmd">::math::geometry::translate</b> <i class="arg">vector</i> <i class="arg">polyline</i></a></li>
<li><a href="#37"><b class="cmd">::math::geometry::rotate</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></li>
<li><a href="#38"><b class="cmd">::math::geometry::reflect</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></li>
<li><a href="#39"><b class="cmd">::math::geometry::degToRad</b> <i class="arg">angle</i></a></li>
<li><a href="#40"><b class="cmd">::math::geometry::radToDeg</b> <i class="arg">angle</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">math::geometry</b> package is a collection of functions for
computations and manipulations on two-dimensional geometrical objects,
such as points, lines and polygons.</p>
<p>The geometrical objects are implemented as plain lists of coordinates.
For instance a line is defined by a list of four numbers, the x- and
y-coordinate of a first point and the x- and y-coordinates of a second
point on the line.</p>
<p>The various types of object are recognised by the number of coordinate
pairs and the context in which they are used: a list of four elements
can be regarded as an infinite line, a finite line segment but also
as a polyline of one segment and a point set of two points.</p>
<p>Currently the following types of objects are distinguished:</p>
<ul class="doctools_itemized">
<li><p><em>point</em> - a list of two coordinates representing the x- and
y-coordinates respectively.</p></li>
<li><p><em>line</em> - a list of four coordinates, interpreted as the x- and
y-coordinates of two distinct points on the line.</p></li>
<li><p><em>line segment</em> - a list of four coordinates, interpreted as the
x- and y-coordinates of the first and the last points on the line
segment.</p></li>
<li><p><em>polyline</em> - a list of an even number of coordinates,
interpreted as the x- and y-coordinates of an ordered set of points.</p></li>
<li><p><em>polygon</em> - like a polyline, but the implicit assumption is that
the polyline is closed (if the first and last points do not coincide,
the missing segment is automatically added).</p></li>
<li><p><em>point set</em> - again a list of an even number of coordinates, but
the points are regarded without any ordering.</p></li>
</ul>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::geometry::+</b> <i class="arg">point1</i> <i class="arg">point2</i></a></dt>
<dd><p>Compute the sum of the two vectors given as points and return it.
The result is a vector as well.</p></dd>
<dt><a name="2"><b class="cmd">::math::geometry::-</b> <i class="arg">point1</i> <i class="arg">point2</i></a></dt>
<dd><p>Compute the difference (point1 - point2) of the two vectors
given as points and return it. The result is a vector as well.</p></dd>
<dt><a name="3"><b class="cmd">::math::geometry::p</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Construct a point from its coordinates and return it as the
result of the command.</p></dd>
<dt><a name="4"><b class="cmd">::math::geometry::distance</b> <i class="arg">point1</i> <i class="arg">point2</i></a></dt>
<dd><p>Compute the distance between the two points and return it as the
result of the command. This is in essence the same as</p>
<pre class="doctools_example">
    math::geometry::length [math::geomtry::- point1 point2]
</pre>
</dd>
<dt><a name="5"><b class="cmd">::math::geometry::length</b> <i class="arg">point</i></a></dt>
<dd><p>Compute the length of the vector and return it as the
result of the command.</p></dd>
<dt><a name="6"><b class="cmd">::math::geometry::s*</b> <i class="arg">factor</i> <i class="arg">point</i></a></dt>
<dd><p>Scale the vector by the factor and return it as the
result of the command. This is a vector as well.</p></dd>
<dt><a name="7"><b class="cmd">::math::geometry::direction</b> <i class="arg">angle</i></a></dt>
<dd><p>Given the angle in degrees this command computes and returns
the unit vector pointing into this direction. The vector for
angle == 0 points to the right (up), and for angle == 90 up (north).</p></dd>
<dt><a name="8"><b class="cmd">::math::geometry::h</b> <i class="arg">length</i></a></dt>
<dd><p>Returns a horizontal vector on the X-axis of the specified length.
Positive lengths point to the right (east).</p></dd>
<dt><a name="9"><b class="cmd">::math::geometry::v</b> <i class="arg">length</i></a></dt>
<dd><p>Returns a vertical vector on the Y-axis of the specified length.
Positive lengths point down (south).</p></dd>
<dt><a name="10"><b class="cmd">::math::geometry::between</b> <i class="arg">point1</i> <i class="arg">point2</i> <i class="arg">s</i></a></dt>
<dd><p>Compute the point which is at relative distance <i class="arg">s</i> between the two
points and return it as the result of the command. A relative distance of
<b class="const">0</b> returns <i class="arg">point1</i>, the distance <b class="const">1</b> returns <i class="arg">point2</i>.
Distances &lt; 0 or &gt; 1 extrapolate along the line between the two point.</p></dd>
<dt><a name="11"><b class="cmd">::math::geometry::octant</b> <i class="arg">point</i></a></dt>
<dd><p>Compute the octant of the circle the point is in and return it as the result
of the command. The possible results are</p>
<ol class="doctools_enumerated">
<li><p>east</p></li>
<li><p>northeast</p></li>
<li><p>north</p></li>
<li><p>northwest</p></li>
<li><p>west</p></li>
<li><p>southwest</p></li>
<li><p>south</p></li>
<li><p>southeast</p></li>
</ol>
<p>Each octant is the arc of the circle +/- 22.5 degrees from the cardinal direction
the octant is named for.</p></dd>
<dt><a name="12"><b class="cmd">::math::geometry::rect</b> <i class="arg">nw</i> <i class="arg">se</i></a></dt>
<dd><p>Construct a rectangle from its northwest and southeast corners and return
it as the result of the command.</p></dd>
<dt><a name="13"><b class="cmd">::math::geometry::nwse</b> <i class="arg">rect</i></a></dt>
<dd><p>Extract the northwest and southeast corners of the rectangle and return
them as the result of the command (a 2-element list containing the
points, in the named order).</p></dd>
<dt><a name="14"><b class="cmd">::math::geometry::angle</b> <i class="arg">line</i></a></dt>
<dd><p>Calculate the angle from the positive x-axis to a given line
(in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">line</i></dt>
<dd><p>Coordinates of the line</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::geometry::calculateDistanceToLine</b> <i class="arg">P</i> <i class="arg">line</i></a></dt>
<dd><p>Calculate the distance of point P to the (infinite) line and return the
result</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">line</i></dt>
<dd><p>List of four numbers, the coordinates of two points
on the line</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::geometry::calculateDistanceToLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></dt>
<dd><p>Calculate the distance of point P to the (finite) line segment and
return the result.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">linesegment</i></dt>
<dd><p>List of four numbers, the coordinates of the
first and last points of the line segment</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">::math::geometry::calculateDistanceToPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Calculate the distance of point P to the polyline and
return the result. Note that a polyline needs not to be closed.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>List of numbers, the coordinates of the
vertices of the polyline</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::geometry::calculateDistanceToPolygon</b> <i class="arg">P</i> <i class="arg">polygon</i></a></dt>
<dd><p>Calculate the distance of point P to the polygon and
return the result. If the list of coordinates is not closed (first and last
points differ), it is automatically closed.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">polygon</i></dt>
<dd><p>List of numbers, the coordinates of the
vertices of the polygon</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::geometry::findClosestPointOnLine</b> <i class="arg">P</i> <i class="arg">line</i></a></dt>
<dd><p>Return the point on a line which is closest to a given point.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">line</i></dt>
<dd><p>List of four numbers, the coordinates of two points
on the line</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::geometry::findClosestPointOnLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></dt>
<dd><p>Return the point on a <em>line segment</em> which is closest to a given
point.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">linesegment</i></dt>
<dd><p>List of four numbers, the first and last
points on the line segment</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::geometry::findClosestPointOnPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Return the point on a <em>polyline</em> which is closest to a given
point.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>List of numbers, the vertices of the polyline</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::geometry::lengthOfPolyline</b> <i class="arg">polyline</i></a></dt>
<dd><p>Return the length of the <em>polyline</em> (note: it not regarded as a
polygon)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline</i></dt>
<dd><p>List of numbers, the vertices of the polyline</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::geometry::movePointInDirection</b> <i class="arg">P</i> <i class="arg">direction</i> <i class="arg">dist</i></a></dt>
<dd><p>Move a point over a given distance in a given direction and return the
new coordinates (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>Coordinates of the point to be moved</p></dd>
<dt>double <i class="arg">direction</i></dt>
<dd><p>Direction (in degrees; 0 is to the right, 90
upwards)</p></dd>
<dt>list <i class="arg">dist</i></dt>
<dd><p>Distance over which to move the point</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::geometry::lineSegmentsIntersect</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></dt>
<dd><p>Check if two line segments intersect or coincide. Returns 1 if that is
the case, 0 otherwise (in two dimensions only). If an endpoint of one segment lies on
the other segment (or is very close to the segment), they are considered to intersect</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">linesegment1</i></dt>
<dd><p>First line segment</p></dd>
<dt>list <i class="arg">linesegment2</i></dt>
<dd><p>Second line segment</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::geometry::findLineSegmentIntersection</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></dt>
<dd><p>Find the intersection point of two line segments. Return the coordinates
or the keywords &quot;coincident&quot; or &quot;none&quot; if the line segments coincide or
have no points in common (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">linesegment1</i></dt>
<dd><p>First line segment</p></dd>
<dt>list <i class="arg">linesegment2</i></dt>
<dd><p>Second line segment</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::geometry::findLineIntersection</b> <i class="arg">line1</i> <i class="arg">line2</i></a></dt>
<dd><p>Find the intersection point of two (infinite) lines. Return the coordinates
or the keywords &quot;coincident&quot; or &quot;none&quot; if the lines coincide or
have no points in common (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">line1</i></dt>
<dd><p>First line</p></dd>
<dt>list <i class="arg">line2</i></dt>
<dd><p>Second line</p></dd>
</dl>
<p>See section <span class="sectref"><a href="#section3">References</a></span> for details on the algorithm and math behind it.</p></dd>
<dt><a name="27"><b class="cmd">::math::geometry::polylinesIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i></a></dt>
<dd><p>Check if two polylines intersect or not (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>First polyline</p></dd>
<dt>list <i class="arg">polyline2</i></dt>
<dd><p>Second polyline</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::geometry::polylinesBoundingIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <i class="arg">granularity</i></a></dt>
<dd><p>Check whether two polylines intersect, but reduce
the correctness of the result to the given granularity.
Use this for faster, but weaker, intersection checking.</p>
<p>How it works:</p>
<p>Each polyline is split into a number of smaller polylines,
consisting of granularity points each. If a pair of those smaller
lines' bounding boxes intersect, then this procedure returns 1,
otherwise it returns 0.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>First polyline</p></dd>
<dt>list <i class="arg">polyline2</i></dt>
<dd><p>Second polyline</p></dd>
<dt>int <i class="arg">granularity</i></dt>
<dd><p>Number of points in each part (&lt;=1 means check
every edge)</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::geometry::intervalsOverlap</b> <i class="arg">y1</i> <i class="arg">y2</i> <i class="arg">y3</i> <i class="arg">y4</i> <i class="arg">strict</i></a></dt>
<dd><p>Check if two intervals overlap.</p>
<dl class="doctools_arguments">
<dt>double <i class="arg">y1,y2</i></dt>
<dd><p>Begin and end of first interval</p></dd>
<dt>double <i class="arg">y3,y4</i></dt>
<dd><p>Begin and end of second interval</p></dd>
<dt>logical <i class="arg">strict</i></dt>
<dd><p>Check for strict or non-strict overlap</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd">::math::geometry::rectanglesOverlap</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">Q1</i> <i class="arg">Q2</i> <i class="arg">strict</i></a></dt>
<dd><p>Check if two rectangles overlap.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P1</i></dt>
<dd><p>upper-left corner of the first rectangle</p></dd>
<dt>list <i class="arg">P2</i></dt>
<dd><p>lower-right corner of the first rectangle</p></dd>
<dt>list <i class="arg">Q1</i></dt>
<dd><p>upper-left corner of the second rectangle</p></dd>
<dt>list <i class="arg">Q2</i></dt>
<dd><p>lower-right corner of the second rectangle</p></dd>
<dt>list <i class="arg">strict</i></dt>
<dd><p>choosing strict or non-strict interpretation</p></dd>
</dl></dd>
<dt><a name="31"><b class="cmd">::math::geometry::bbox</b> <i class="arg">polyline</i></a></dt>
<dd><p>Calculate the bounding box of a polyline. Returns a list of four
coordinates: the upper-left and the lower-right corner of the box.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be examined</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">::math::geometry::pointInsidePolygon</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Determine if a point is completely inside a polygon. If the point
touches the polygon, then the point is not completely inside the
polygon.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>Coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be examined</p></dd>
</dl></dd>
<dt><a name="33"><b class="cmd">::math::geometry::pointInsidePolygonAlt</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Determine if a point is completely inside a polygon. If the point
touches the polygon, then the point is not completely inside the
polygon. <em>Note:</em> this alternative procedure uses the so-called
winding number to determine this. It handles self-intersecting polygons
in a &quot;natural&quot; way.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>Coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be examined</p></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">::math::geometry::rectangleInsidePolygon</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">polyline</i></a></dt>
<dd><p>Determine if a rectangle is completely inside a polygon. If polygon
touches the rectangle, then the rectangle is not complete inside the
polygon.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P1</i></dt>
<dd><p>Upper-left corner of the rectangle</p></dd>
<dt>list <i class="arg">P2</i></dt>
<dd><p>Lower-right corner of the rectangle</p></dd>
<dt>list <i class="arg">polygon</i></dt>
<dd><p>The polygon in question</p></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">::math::geometry::areaPolygon</b> <i class="arg">polygon</i></a></dt>
<dd><p>Calculate the area of a polygon.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polygon</i></dt>
<dd><p>The polygon in question</p></dd>
</dl></dd>
<dt><a name="36"><b class="cmd">::math::geometry::translate</b> <i class="arg">vector</i> <i class="arg">polyline</i></a></dt>
<dd><p>Translate a polyline over a given vector</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector</i></dt>
<dd><p>Translation vector</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be rotated</p></dd>
</dl></dd>
<dt><a name="37"><b class="cmd">::math::geometry::rotate</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></dt>
<dd><p>Rotate a polyline over a given angle (degrees) around the origin</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle over which to rotate the polyline (degrees)</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be translated</p></dd>
</dl></dd>
<dt><a name="38"><b class="cmd">::math::geometry::reflect</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></dt>
<dd><p>Reflect a polyline in a line through the origin at a given angle (degrees) to the x-axis</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle of the line of reflection (degrees)</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be reflected</p></dd>
</dl></dd>
<dt><a name="39"><b class="cmd">::math::geometry::degToRad</b> <i class="arg">angle</i></a></dt>
<dd><p>Convert from degrees to radians</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle in degrees</p></dd>
</dl></dd>
<dt><a name="40"><b class="cmd">::math::geometry::radToDeg</b> <i class="arg">angle</i></a></dt>
<dd><p>Convert from radians to degrees</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle in radians</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http:/wiki.tcl.tk/12070">Polygon Intersection</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Line-line_intersection">http://en.wikipedia.org/wiki/Line-line_intersection</a></p></li>
<li><p><a href="http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/">http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/</a></p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: geometry</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key582">angle</a>, <a href="../../../../index.html#key479">distance</a>, <a href="../../../../index.html#key580">line</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key579">plane geometry</a>, <a href="../../../../index.html#key581">point</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2001 by Ideogramic ApS and other parties<br>
Copyright &copy; 2004 by Arjen Markus<br>
Copyright &copy; 2010 by Andreas Kupries<br>
Copyright &copy; 2010 by Kevin Kenny</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/numtheory.html.





































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<div class='fossil-doc' data-title='math::numtheory - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::numtheory(n) 1.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::numtheory - Number Theory</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::numtheory <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">math::numtheory::isprime</b> <i class="arg">N</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is for collecting various number-theoretic operations,
though at the moment it only provides that of testing whether an
integer is a prime.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">math::numtheory::isprime</b> <i class="arg">N</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>The <b class="cmd">isprime</b> command tests whether the integer <i class="arg">N</i> is a
  prime, returning a boolean true value for prime <i class="arg">N</i> and a
  boolean false value for non-prime <i class="arg">N</i>. The formal definition of
  'prime' used is the conventional, that the number being tested is
  greater than 1 and only has trivial divisors.</p>
<p>To be precise, the return value is one of <b class="const">0</b> (if <i class="arg">N</i> is
  definitely not a prime), <b class="const">1</b> (if <i class="arg">N</i> is definitely a
  prime), and <b class="const">on</b> (if <i class="arg">N</i> is probably prime); the latter
  two are both boolean true values. The case that an integer may be
  classified as &quot;probably prime&quot; arises because the Miller-Rabin
  algorithm used in the test implementation is basically probabilistic,
  and may if we are unlucky fail to detect that a number is in fact
  composite. Options may be used to select the risk of such
  &quot;false positives&quot; in the test. <b class="const">1</b> is returned for &quot;small&quot;
  <i class="arg">N</i> (which currently means <i class="arg">N</i> &lt; 118670087467), where it is
  known that no false positives are possible.</p>
<p>The only option currently defined is:</p>
<dl class="doctools_options">
  
<dt><b class="option">-randommr</b> <i class="arg">repetitions</i></dt>
<dd><p>which controls how many times the Miller-Rabin test should be
    repeated with randomly chosen bases. Each repetition reduces the
    probability of a false positive by a factor at least 4. The
    default for <i class="arg">repetitions</i> is 4.</p></dd>
</dl>
<p>Unknown options are silently ignored.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: numtheory</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key772">number theory</a>, <a href="../../../../index.html#key773">prime</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/optimize.html.





































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386

<div class='fossil-doc' data-title='math::optimize - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::optimize(n) 1.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::optimize - Optimisation routines</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">NOTES</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">math::optimize <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::optimize::minimum</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">func</i> <i class="arg">maxerr</i></a></li>
<li><a href="#2"><b class="cmd">::math::optimize::maximum</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">func</i> <i class="arg">maxerr</i></a></li>
<li><a href="#3"><b class="cmd">::math::optimize::min_bound_1d</b> <i class="arg">func</i> <i class="arg">begin</i> <i class="arg">end</i> <span class="opt">?<b class="option">-relerror</b> <i class="arg">reltol</i>?</span> <span class="opt">?<b class="option">-abserror</b> <i class="arg">abstol</i>?</span> <span class="opt">?<b class="option">-maxiter</b> <i class="arg">maxiter</i>?</span> <span class="opt">?<b class="option">-trace</b> <i class="arg">traceflag</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::math::optimize::min_unbound_1d</b> <i class="arg">func</i> <i class="arg">begin</i> <i class="arg">end</i> <span class="opt">?<b class="option">-relerror</b> <i class="arg">reltol</i>?</span> <span class="opt">?<b class="option">-abserror</b> <i class="arg">abstol</i>?</span> <span class="opt">?<b class="option">-maxiter</b> <i class="arg">maxiter</i>?</span> <span class="opt">?<b class="option">-trace</b> <i class="arg">traceflag</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::math::optimize::solveLinearProgram</b> <i class="arg">objective</i> <i class="arg">constraints</i></a></li>
<li><a href="#6"><b class="cmd">::math::optimize::linearProgramMaximum</b> <i class="arg">objective</i> <i class="arg">result</i></a></li>
<li><a href="#7"><b class="cmd">::math::optimize::nelderMead</b> <i class="arg">objective</i> <i class="arg">xVector</i> <span class="opt">?<b class="option">-scale</b> <i class="arg">xScaleVector</i>?</span> <span class="opt">?<b class="option">-ftol</b> <i class="arg">epsilon</i>?</span> <span class="opt">?<b class="option">-maxiter</b> <i class="arg">count</i>?</span> <span class="opt">?<span class="opt">?-trace?</span> <i class="arg">flag</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements several optimisation algorithms:</p>
<ul class="doctools_itemized">
<li><p>Minimize or maximize a function over a given interval</p></li>
<li><p>Solve a linear program (maximize a linear function subject to linear
constraints)</p></li>
<li><p>Minimize a function of several variables given an initial guess for the
location of the minimum.</p></li>
</ul>
<p>The package is fully implemented in Tcl. No particular attention has
been paid to the accuracy of the calculations. Instead, the
algorithms have been used in a straightforward manner.</p>
<p>This document describes the procedures and explains their usage.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>This package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::optimize::minimum</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">func</i> <i class="arg">maxerr</i></a></dt>
<dd><p>Minimize the given (continuous) function by examining the values in the
given interval. The procedure determines the values at both ends and in the
centre of the interval and then constructs a new interval of 1/2 length
that includes the minimum. No guarantee is made that the <em>global</em>
minimum is found.</p>
<p>The procedure returns the &quot;x&quot; value for which the function is minimal.</p>
<p><em>This procedure has been deprecated - use min_bound_1d instead</em></p>
<p><i class="arg">begin</i> - Start of the interval</p>
<p><i class="arg">end</i> - End of the interval</p>
<p><i class="arg">func</i> - Name of the function to be minimized (a procedure taking
one argument).</p>
<p><i class="arg">maxerr</i> - Maximum relative error (defaults to 1.0e-4)</p></dd>
<dt><a name="2"><b class="cmd">::math::optimize::maximum</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">func</i> <i class="arg">maxerr</i></a></dt>
<dd><p>Maximize the given (continuous) function by examining the values in the
given interval. The procedure determines the values at both ends and in the
centre of the interval and then constructs a new interval of 1/2 length
that includes the maximum. No guarantee is made that the <em>global</em>
maximum is found.</p>
<p>The procedure returns the &quot;x&quot; value for which the function is maximal.</p>
<p><em>This procedure has been deprecated - use max_bound_1d instead</em></p>
<p><i class="arg">begin</i> - Start of the interval</p>
<p><i class="arg">end</i> - End of the interval</p>
<p><i class="arg">func</i> - Name of the function to be maximized (a procedure taking
one argument).</p>
<p><i class="arg">maxerr</i> - Maximum relative error (defaults to 1.0e-4)</p></dd>
<dt><a name="3"><b class="cmd">::math::optimize::min_bound_1d</b> <i class="arg">func</i> <i class="arg">begin</i> <i class="arg">end</i> <span class="opt">?<b class="option">-relerror</b> <i class="arg">reltol</i>?</span> <span class="opt">?<b class="option">-abserror</b> <i class="arg">abstol</i>?</span> <span class="opt">?<b class="option">-maxiter</b> <i class="arg">maxiter</i>?</span> <span class="opt">?<b class="option">-trace</b> <i class="arg">traceflag</i>?</span></a></dt>
<dd><p>Miminizes a function of one variable in the given interval.  The procedure
uses Brent's method of parabolic interpolation, protected by golden-section
subdivisions if the interpolation is not converging.  No guarantee is made
that a <em>global</em> minimum is found.  The function to evaluate, <i class="arg">func</i>,
must be a single Tcl command; it will be evaluated with an abscissa appended
as the last argument.</p>
<p><i class="arg">x1</i> and <i class="arg">x2</i> are the two bounds of
the interval in which the minimum is to be found.  They need not be in
increasing order.</p>
<p><i class="arg">reltol</i>, if specified, is the desired upper bound
on the relative error of the result; default is 1.0e-7.  The given value
should never be smaller than the square root of the machine's floating point
precision, or else convergence is not guaranteed.  <i class="arg">abstol</i>, if specified,
is the desired upper bound on the absolute error of the result; default
is 1.0e-10.  Caution must be used with small values of <i class="arg">abstol</i> to
avoid overflow/underflow conditions; if the minimum is expected to lie
about a small but non-zero abscissa, you consider either shifting the
function or changing its length scale.</p>
<p><i class="arg">maxiter</i> may be used to constrain the number of function evaluations
to be performed; default is 100.  If the command evaluates the function
more than <i class="arg">maxiter</i> times, it returns an error to the caller.</p>
<p><i class="arg">traceFlag</i> is a Boolean value. If true, it causes the command to
print a message on the standard output giving the abscissa and ordinate
at each function evaluation, together with an indication of what type
of interpolation was chosen.  Default is 0 (no trace).</p></dd>
<dt><a name="4"><b class="cmd">::math::optimize::min_unbound_1d</b> <i class="arg">func</i> <i class="arg">begin</i> <i class="arg">end</i> <span class="opt">?<b class="option">-relerror</b> <i class="arg">reltol</i>?</span> <span class="opt">?<b class="option">-abserror</b> <i class="arg">abstol</i>?</span> <span class="opt">?<b class="option">-maxiter</b> <i class="arg">maxiter</i>?</span> <span class="opt">?<b class="option">-trace</b> <i class="arg">traceflag</i>?</span></a></dt>
<dd><p>Miminizes a function of one variable over the entire real number line.
The procedure uses parabolic extrapolation combined with golden-section
dilatation to search for a region where a minimum exists, followed by
Brent's method of parabolic interpolation, protected by golden-section
subdivisions if the interpolation is not converging.  No guarantee is made
that a <em>global</em> minimum is found.  The function to evaluate, <i class="arg">func</i>,
must be a single Tcl command; it will be evaluated with an abscissa appended
as the last argument.</p>
<p><i class="arg">x1</i> and <i class="arg">x2</i> are two initial guesses at where the minimum
may lie.  <i class="arg">x1</i> is the starting point for the minimization, and
the difference between <i class="arg">x2</i> and <i class="arg">x1</i> is used as a hint at the
characteristic length scale of the problem.</p>
<p><i class="arg">reltol</i>, if specified, is the desired upper bound
on the relative error of the result; default is 1.0e-7.  The given value
should never be smaller than the square root of the machine's floating point
precision, or else convergence is not guaranteed.  <i class="arg">abstol</i>, if specified,
is the desired upper bound on the absolute error of the result; default
is 1.0e-10.  Caution must be used with small values of <i class="arg">abstol</i> to
avoid overflow/underflow conditions; if the minimum is expected to lie
about a small but non-zero abscissa, you consider either shifting the
function or changing its length scale.</p>
<p><i class="arg">maxiter</i> may be used to constrain the number of function evaluations
to be performed; default is 100.  If the command evaluates the function
more than <i class="arg">maxiter</i> times, it returns an error to the caller.</p>
<p><i class="arg">traceFlag</i> is a Boolean value. If true, it causes the command to
print a message on the standard output giving the abscissa and ordinate
at each function evaluation, together with an indication of what type
of interpolation was chosen.  Default is 0 (no trace).</p></dd>
<dt><a name="5"><b class="cmd">::math::optimize::solveLinearProgram</b> <i class="arg">objective</i> <i class="arg">constraints</i></a></dt>
<dd><p>Solve a <em>linear program</em> in standard form using a straightforward
implementation of the Simplex algorithm. (In the explanation below: The
linear program has N constraints and M variables).</p>
<p>The procedure returns a list of M values, the values for which the
objective function is maximal or a single keyword if the linear program
is not feasible or unbounded (either &quot;unfeasible&quot; or &quot;unbounded&quot;)</p>
<p><i class="arg">objective</i> - The M coefficients of the objective function</p>
<p><i class="arg">constraints</i> - Matrix of coefficients plus maximum values that
implement the linear constraints. It is expected to be a list of N lists
of M+1 numbers each, M coefficients and the maximum value.</p></dd>
<dt><a name="6"><b class="cmd">::math::optimize::linearProgramMaximum</b> <i class="arg">objective</i> <i class="arg">result</i></a></dt>
<dd><p>Convenience function to return the maximum for the solution found by the
solveLinearProgram procedure.</p>
<p><i class="arg">objective</i> - The M coefficients of the objective function</p>
<p><i class="arg">result</i> - The result as returned by solveLinearProgram</p></dd>
<dt><a name="7"><b class="cmd">::math::optimize::nelderMead</b> <i class="arg">objective</i> <i class="arg">xVector</i> <span class="opt">?<b class="option">-scale</b> <i class="arg">xScaleVector</i>?</span> <span class="opt">?<b class="option">-ftol</b> <i class="arg">epsilon</i>?</span> <span class="opt">?<b class="option">-maxiter</b> <i class="arg">count</i>?</span> <span class="opt">?<span class="opt">?-trace?</span> <i class="arg">flag</i>?</span></a></dt>
<dd><p>Minimizes, in unconstrained fashion, a function of several variable over all
of space.  The function to evaluate, <i class="arg">objective</i>, must be a single Tcl
command. To it will be appended as many elements as appear in the initial guess at
the location of the minimum, passed in as a Tcl list, <i class="arg">xVector</i>.</p>
<p><i class="arg">xScaleVector</i> is an initial guess at the problem scale; the first
function evaluations will be made by varying the co-ordinates in <i class="arg">xVector</i>
by the amounts in <i class="arg">xScaleVector</i>.  If <i class="arg">xScaleVector</i> is not supplied,
the co-ordinates will be varied by a factor of 1.0001 (if the co-ordinate
is non-zero) or by a constant 0.0001 (if the co-ordinate is zero).</p>
<p><i class="arg">epsilon</i> is the desired relative error in the value of the function
evaluated at the minimum. The default is 1.0e-7, which usually gives three
significant digits of accuracy in the values of the x's.</p>
<p>pp
<i class="arg">count</i> is a limit on the number of trips through the main loop of
the optimizer.  The number of function evaluations may be several times
this number.  If the optimizer fails to find a minimum to within <i class="arg">ftol</i>
in <i class="arg">maxiter</i> iterations, it returns its current best guess and an
error status. Default is to allow 500 iterations.</p>
<p><i class="arg">flag</i> is a flag that, if true, causes a line to be written to the
standard output for each evaluation of the objective function, giving
the arguments presented to the function and the value returned. Default is
false.</p>
<p>The <b class="cmd">nelderMead</b> procedure returns a list of alternating keywords and
values suitable for use with <b class="cmd">array set</b>. The meaning of the keywords is:</p>
<p><i class="arg">x</i> is the approximate location of the minimum.</p>
<p><i class="arg">y</i> is the value of the function at <i class="arg">x</i>.</p>
<p><i class="arg">yvec</i> is a vector of the best N+1 function values achieved, where
N is the dimension of <i class="arg">x</i></p>
<p><i class="arg">vertices</i> is a list of vectors giving the function arguments
corresponding to the values in <i class="arg">yvec</i>.</p>
<p><i class="arg">nIter</i> is the number of iterations required to achieve convergence or
fail.</p>
<p><i class="arg">status</i> is 'ok' if the operation succeeded, or 'too-many-iterations'
if the maximum iteration count was exceeded.</p>
<p><b class="cmd">nelderMead</b> minimizes the given function using the downhill
simplex method of Nelder and Mead.  This method is quite slow - much
faster methods for minimization are known - but has the advantage of being
extremely robust in the face of problems where the minimum lies in
a valley of complex topology.</p>
<p><b class="cmd">nelderMead</b> can occasionally find itself &quot;stuck&quot; at a point where
it can make no further progress; it is recommended that the caller
run it at least a second time, passing as the initial guess the
result found by the previous call.  The second run is usually very
fast.</p>
<p><b class="cmd">nelderMead</b> can be used in some cases for constrained optimization.
To do this, add a large value to the objective function if the parameters
are outside the feasible region.  To work effectively in this mode,
<b class="cmd">nelderMead</b> requires that the initial guess be feasible and
usually requires that the feasible region be convex.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">NOTES</a></h2>
<p>Several of the above procedures take the <em>names</em> of procedures as
arguments. To avoid problems with the <em>visibility</em> of these
procedures, the fully-qualified name of these procedures is determined
inside the optimize routines. For the user this has only one
consequence: the named procedure must be visible in the calling
procedure. For instance:</p>
<pre class="doctools_example">
    namespace eval ::mySpace {
       namespace export calcfunc
       proc calcfunc { x } { return $x }
    }
    #
    # Use a fully-qualified name
    #
    namespace eval ::myCalc {
       puts [min_bound_1d ::myCalc::calcfunc $begin $end]
    }
    #
    # Import the name
    #
    namespace eval ::myCalc {
       namespace import ::mySpace::calcfunc
       puts [min_bound_1d calcfunc $begin $end]
    }
</pre>
<p>The simple procedures <em>minimum</em> and <em>maximum</em> have been
deprecated: the alternatives are much more flexible, robust and
require less function evaluations.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<p>Let us take a few simple examples:</p>
<p>Determine the maximum of f(x) = x^3 exp(-3x), on the interval (0,10):</p>
<pre class="doctools_example">
proc efunc { x } { expr {$x*$x*$x * exp(-3.0*$x)} }
puts &quot;Maximum at: [::math::optimize::max_bound_1d efunc 0.0 10.0]&quot;
</pre>
<p>The maximum allowed error determines the number of steps taken (with
each step in the iteration the interval is reduced with a factor 1/2).
Hence, a maximum error of 0.0001 is achieved in approximately 14 steps.</p>
<p>An example of a <em>linear program</em> is:</p>
<p>Optimise the expression 3x+2y, where:</p>
<pre class="doctools_example">
   x &gt;= 0 and y &gt;= 0 (implicit constraints, part of the
                     definition of linear programs)
   x + y   &lt;= 1      (constraints specific to the problem)
   2x + 5y &lt;= 10
</pre>
<p>This problem can be solved as follows:</p>
<pre class="doctools_example">
   set solution [::math::optimize::solveLinearProgram  { 3.0   2.0 }  { { 1.0   1.0   1.0 }
        { 2.0   5.0  10.0 } } ]
</pre>
<p>Note, that a constraint like:</p>
<pre class="doctools_example">
   x + y &gt;= 1
</pre>
<p>can be turned into standard form using:</p>
<pre class="doctools_example">
   -x  -y &lt;= -1
</pre>
<p>The theory of linear programming is the subject of many a text book and
the Simplex algorithm that is implemented here is the best-known
method to solve this type of problems, but it is not the only one.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: optimize</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key312">linear program</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key310">maximum</a>, <a href="../../../../index.html#key309">minimum</a>, <a href="../../../../index.html#key311">optimization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;<br>
Copyright &copy; 2004,2005 Kevn B. Kenny &lt;kennykb@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/polynomials.html.













































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294

<div class='fossil-doc' data-title='math::polynomials - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::polynomials(n) 1.0.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::polynomials - Polynomial functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">REMARKS ON THE IMPLEMENTATION</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.3?</span></b></li>
<li>package require <b class="pkgname">math::polynomials <span class="opt">?1.0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::polynomials::polynomial</b> <i class="arg">coeffs</i></a></li>
<li><a href="#2"><b class="cmd">::math::polynomials::polynCmd</b> <i class="arg">coeffs</i></a></li>
<li><a href="#3"><b class="cmd">::math::polynomials::evalPolyn</b> <i class="arg">polynomial</i> <i class="arg">x</i></a></li>
<li><a href="#4"><b class="cmd">::math::polynomials::addPolyn</b> <i class="arg">polyn1</i> <i class="arg">polyn2</i></a></li>
<li><a href="#5"><b class="cmd">::math::polynomials::subPolyn</b> <i class="arg">polyn1</i> <i class="arg">polyn2</i></a></li>
<li><a href="#6"><b class="cmd">::math::polynomials::multPolyn</b> <i class="arg">polyn1</i> <i class="arg">polyn2</i></a></li>
<li><a href="#7"><b class="cmd">::math::polynomials::divPolyn</b> <i class="arg">polyn1</i> <i class="arg">polyn2</i></a></li>
<li><a href="#8"><b class="cmd">::math::polynomials::remainderPolyn</b> <i class="arg">polyn1</i> <i class="arg">polyn2</i></a></li>
<li><a href="#9"><b class="cmd">::math::polynomials::derivPolyn</b> <i class="arg">polyn</i></a></li>
<li><a href="#10"><b class="cmd">::math::polynomials::primitivePolyn</b> <i class="arg">polyn</i></a></li>
<li><a href="#11"><b class="cmd">::math::polynomials::degreePolyn</b> <i class="arg">polyn</i></a></li>
<li><a href="#12"><b class="cmd">::math::polynomials::coeffPolyn</b> <i class="arg">polyn</i> <i class="arg">index</i></a></li>
<li><a href="#13"><b class="cmd">::math::polynomials::allCoeffsPolyn</b> <i class="arg">polyn</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package deals with polynomial functions of one variable:</p>
<ul class="doctools_itemized">
<li><p>the basic arithmetic operations are extended to polynomials</p></li>
<li><p>computing the derivatives and primitives of these functions</p></li>
<li><p>evaluation through a general procedure or via specific procedures)</p></li>
</ul>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::polynomials::polynomial</b> <i class="arg">coeffs</i></a></dt>
<dd><p>Return an (encoded) list that defines the polynomial. A polynomial</p>
<pre class="doctools_example">
   f(x) = a + b.x + c.x**2 + d.x**3
</pre>
<p>can be defined via:</p>
<pre class="doctools_example">
   set f [::math::polynomials::polynomial [list $a $b $c $d]
</pre>
<dl class="doctools_arguments">
<dt>list <i class="arg">coeffs</i></dt>
<dd><p>Coefficients of the polynomial (in ascending
order)</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::polynomials::polynCmd</b> <i class="arg">coeffs</i></a></dt>
<dd><p>Create a new procedure that evaluates the polynomial. The name of the
polynomial is automatically generated. Useful if you need to evualuate
the polynomial many times, as the procedure consists of a single
[expr] command.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">coeffs</i></dt>
<dd><p>Coefficients of the polynomial (in ascending
order) or the polynomial definition returned by the <em>polynomial</em>
command.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::polynomials::evalPolyn</b> <i class="arg">polynomial</i> <i class="arg">x</i></a></dt>
<dd><p>Evaluate the polynomial at x.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polynomial</i></dt>
<dd><p>The polynomial's definition (as returned by
the polynomial command).
order)</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>The coordinate at which to evaluate the polynomial</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::polynomials::addPolyn</b> <i class="arg">polyn1</i> <i class="arg">polyn2</i></a></dt>
<dd><p>Return a new polynomial which is the sum of the two others.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyn1</i></dt>
<dd><p>The first polynomial operand</p></dd>
<dt>list <i class="arg">polyn2</i></dt>
<dd><p>The second polynomial operand</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::polynomials::subPolyn</b> <i class="arg">polyn1</i> <i class="arg">polyn2</i></a></dt>
<dd><p>Return a new polynomial which is the difference of the two others.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyn1</i></dt>
<dd><p>The first polynomial operand</p></dd>
<dt>list <i class="arg">polyn2</i></dt>
<dd><p>The second polynomial operand</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::math::polynomials::multPolyn</b> <i class="arg">polyn1</i> <i class="arg">polyn2</i></a></dt>
<dd><p>Return a new polynomial which is the product of the two others. If one
of the arguments is a scalar value, the other polynomial is simply
scaled.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyn1</i></dt>
<dd><p>The first polynomial operand or a scalar</p></dd>
<dt>list <i class="arg">polyn2</i></dt>
<dd><p>The second polynomial operand or a scalar</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::polynomials::divPolyn</b> <i class="arg">polyn1</i> <i class="arg">polyn2</i></a></dt>
<dd><p>Divide the first polynomial by the second polynomial and return the
result. The remainder is dropped</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyn1</i></dt>
<dd><p>The first polynomial operand</p></dd>
<dt>list <i class="arg">polyn2</i></dt>
<dd><p>The second polynomial operand</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::polynomials::remainderPolyn</b> <i class="arg">polyn1</i> <i class="arg">polyn2</i></a></dt>
<dd><p>Divide the first polynomial by the second polynomial and return the
remainder.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyn1</i></dt>
<dd><p>The first polynomial operand</p></dd>
<dt>list <i class="arg">polyn2</i></dt>
<dd><p>The second polynomial operand</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::polynomials::derivPolyn</b> <i class="arg">polyn</i></a></dt>
<dd><p>Differentiate the polynomial and return the result.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyn</i></dt>
<dd><p>The polynomial to be differentiated</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::polynomials::primitivePolyn</b> <i class="arg">polyn</i></a></dt>
<dd><p>Integrate the polynomial and return the result. The integration
constant is set to zero.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyn</i></dt>
<dd><p>The polynomial to be integrated</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::polynomials::degreePolyn</b> <i class="arg">polyn</i></a></dt>
<dd><p>Return the degree of the polynomial.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyn</i></dt>
<dd><p>The polynomial to be examined</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::math::polynomials::coeffPolyn</b> <i class="arg">polyn</i> <i class="arg">index</i></a></dt>
<dd><p>Return the coefficient of the term of the index'th degree of the
polynomial.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyn</i></dt>
<dd><p>The polynomial to be examined</p></dd>
<dt>int <i class="arg">index</i></dt>
<dd><p>The degree of the term</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::polynomials::allCoeffsPolyn</b> <i class="arg">polyn</i></a></dt>
<dd><p>Return the coefficients of the polynomial (in ascending order).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyn</i></dt>
<dd><p>The polynomial in question</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">REMARKS ON THE IMPLEMENTATION</a></h2>
<p>The implementation for evaluating the polynomials at some point uses
Horn's rule, which guarantees numerical stability and a minimum of
arithmetic operations.
To recognise that a polynomial definition is indeed a correct
definition, it consists of a list of two elements: the keyword
&quot;POLYNOMIAL&quot; and the list of coefficients in descending order. The
latter makes it easier to implement Horner's rule.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: polynomials</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key814">polynomial functions</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/qcomplex.html.























































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331

<div class='fossil-doc' data-title='math::complexnumbers - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::complexnumbers(n) 1.0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::complexnumbers - Straightforward complex number package</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">AVAILABLE PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">math::complexnumbers <span class="opt">?1.0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::complexnumbers::+</b> <i class="arg">z1</i> <i class="arg">z2</i></a></li>
<li><a href="#2"><b class="cmd">::math::complexnumbers::-</b> <i class="arg">z1</i> <i class="arg">z2</i></a></li>
<li><a href="#3"><b class="cmd">::math::complexnumbers::*</b> <i class="arg">z1</i> <i class="arg">z2</i></a></li>
<li><a href="#4"><b class="cmd">::math::complexnumbers::/</b> <i class="arg">z1</i> <i class="arg">z2</i></a></li>
<li><a href="#5"><b class="cmd">::math::complexnumbers::conj</b> <i class="arg">z1</i></a></li>
<li><a href="#6"><b class="cmd">::math::complexnumbers::real</b> <i class="arg">z1</i></a></li>
<li><a href="#7"><b class="cmd">::math::complexnumbers::imag</b> <i class="arg">z1</i></a></li>
<li><a href="#8"><b class="cmd">::math::complexnumbers::mod</b> <i class="arg">z1</i></a></li>
<li><a href="#9"><b class="cmd">::math::complexnumbers::arg</b> <i class="arg">z1</i></a></li>
<li><a href="#10"><b class="cmd">::math::complexnumbers::complex</b> <i class="arg">real</i> <i class="arg">imag</i></a></li>
<li><a href="#11"><b class="cmd">::math::complexnumbers::tostring</b> <i class="arg">z1</i></a></li>
<li><a href="#12"><b class="cmd">::math::complexnumbers::exp</b> <i class="arg">z1</i></a></li>
<li><a href="#13"><b class="cmd">::math::complexnumbers::sin</b> <i class="arg">z1</i></a></li>
<li><a href="#14"><b class="cmd">::math::complexnumbers::cos</b> <i class="arg">z1</i></a></li>
<li><a href="#15"><b class="cmd">::math::complexnumbers::tan</b> <i class="arg">z1</i></a></li>
<li><a href="#16"><b class="cmd">::math::complexnumbers::log</b> <i class="arg">z1</i></a></li>
<li><a href="#17"><b class="cmd">::math::complexnumbers::sqrt</b> <i class="arg">z1</i></a></li>
<li><a href="#18"><b class="cmd">::math::complexnumbers::pow</b> <i class="arg">z1</i> <i class="arg">z2</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The mathematical module <em>complexnumbers</em> provides a straightforward
implementation of complex numbers in pure Tcl. The philosophy is that
the user knows he or she is dealing with complex numbers in an abstract
way and wants as high a performance as can be had within the limitations
of an interpreted language.</p>
<p>Therefore the procedures defined in this package assume that the
arguments are valid (representations of) &quot;complex numbers&quot;, that is,
lists of two numbers defining the real and imaginary part of a
complex number (though this is a mere detail: rely on the
<em>complex</em> command to construct a valid number.)</p>
<p>Most procedures implement the basic arithmetic operations or elementary
functions whereas several others convert to and from different
representations:</p>
<pre class="doctools_example">
    set z [complex 0 1]
    puts &quot;z = [tostring $z]&quot;
    puts &quot;z**2 = [* $z $z]
</pre>
<p>would result in:</p>
<pre class="doctools_example">
    z = i
    z**2 = -1
</pre>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">AVAILABLE PROCEDURES</a></h2>
<p>The package implements all or most basic operations and elementary
functions.</p>
<p><em>The arithmetic operations are:</em></p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::complexnumbers::+</b> <i class="arg">z1</i> <i class="arg">z2</i></a></dt>
<dd><p>Add the two arguments and return the resulting complex number</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>First argument in the summation</p></dd>
<dt>complex <i class="arg">z2</i> (in)</dt>
<dd><p>Second argument in the summation</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::complexnumbers::-</b> <i class="arg">z1</i> <i class="arg">z2</i></a></dt>
<dd><p>Subtract the second argument from the first and return the
resulting complex number. If there is only one argument, the
opposite of z1 is returned (i.e. -z1)</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>First argument in the subtraction</p></dd>
<dt>complex <i class="arg">z2</i> (in)</dt>
<dd><p>Second argument in the subtraction (optional)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::complexnumbers::*</b> <i class="arg">z1</i> <i class="arg">z2</i></a></dt>
<dd><p>Multiply the two arguments and return the resulting complex number</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>First argument in the multiplication</p></dd>
<dt>complex <i class="arg">z2</i> (in)</dt>
<dd><p>Second argument in the multiplication</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::complexnumbers::/</b> <i class="arg">z1</i> <i class="arg">z2</i></a></dt>
<dd><p>Divide the first argument by the second and return the resulting complex
number</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>First argument (numerator) in the division</p></dd>
<dt>complex <i class="arg">z2</i> (in)</dt>
<dd><p>Second argument (denominator) in the division</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::complexnumbers::conj</b> <i class="arg">z1</i></a></dt>
<dd><p>Return the conjugate of the given complex number</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>Complex number in question</p></dd>
</dl></dd>
</dl>
<p><em>Conversion/inquiry procedures:</em></p>
<dl class="doctools_definitions">
<dt><a name="6"><b class="cmd">::math::complexnumbers::real</b> <i class="arg">z1</i></a></dt>
<dd><p>Return the real part of the given complex number</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>Complex number in question</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::complexnumbers::imag</b> <i class="arg">z1</i></a></dt>
<dd><p>Return the imaginary part of the given complex number</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>Complex number in question</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::complexnumbers::mod</b> <i class="arg">z1</i></a></dt>
<dd><p>Return the modulus of the given complex number</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>Complex number in question</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::complexnumbers::arg</b> <i class="arg">z1</i></a></dt>
<dd><p>Return the argument (&quot;angle&quot; in radians) of the given complex number</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>Complex number in question</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::complexnumbers::complex</b> <i class="arg">real</i> <i class="arg">imag</i></a></dt>
<dd><p>Construct the complex number &quot;real + imag*i&quot; and return it</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">real</i> (in)</dt>
<dd><p>The real part of the new complex number</p></dd>
<dt>float <i class="arg">imag</i> (in)</dt>
<dd><p>The imaginary part of the new complex number</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::complexnumbers::tostring</b> <i class="arg">z1</i></a></dt>
<dd><p>Convert the complex number to the form &quot;real + imag*i&quot; and return the
string</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">complex</i> (in)</dt>
<dd><p>The complex number to be converted</p></dd>
</dl></dd>
</dl>
<p><em>Elementary functions:</em></p>
<dl class="doctools_definitions">
<dt><a name="12"><b class="cmd">::math::complexnumbers::exp</b> <i class="arg">z1</i></a></dt>
<dd><p>Calculate the exponential for the given complex argument and return the
result</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>The complex argument for the function</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::complexnumbers::sin</b> <i class="arg">z1</i></a></dt>
<dd><p>Calculate the sine function for the given complex argument and return
the result</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>The complex argument for the function</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::math::complexnumbers::cos</b> <i class="arg">z1</i></a></dt>
<dd><p>Calculate the cosine function for the given complex argument and return
the result</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>The complex argument for the function</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::complexnumbers::tan</b> <i class="arg">z1</i></a></dt>
<dd><p>Calculate the tangent function for the given complex argument and
return the result</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>The complex argument for the function</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::complexnumbers::log</b> <i class="arg">z1</i></a></dt>
<dd><p>Calculate the (principle value of the) logarithm for the given complex
argument and return the result</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>The complex argument for the function</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">::math::complexnumbers::sqrt</b> <i class="arg">z1</i></a></dt>
<dd><p>Calculate the (principle value of the) square root for the given complex
argument and return the result</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>The complex argument for the function</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::complexnumbers::pow</b> <i class="arg">z1</i> <i class="arg">z2</i></a></dt>
<dd><p>Calculate &quot;z1 to the power of z2&quot; and return the result</p>
<dl class="doctools_arguments">
<dt>complex <i class="arg">z1</i> (in)</dt>
<dd><p>The complex number to be raised to a power</p></dd>
<dt>complex <i class="arg">z2</i> (in)</dt>
<dd><p>The complex power to be used</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: complexnumbers</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key797">complex numbers</a>, <a href="../../../../index.html#key71">math</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/rational_funcs.html.

































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272

<div class='fossil-doc' data-title='math::rationalfunctions - Math'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::rationalfunctions(n) 1.0.1 tcllib &quot;Math&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::rationalfunctions - Polynomial functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">REMARKS ON THE IMPLEMENTATION</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.4?</span></b></li>
<li>package require <b class="pkgname">math::rationalfunctions <span class="opt">?1.0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::rationalfunctions::rationalFunction</b> <i class="arg">num</i> <i class="arg">den</i></a></li>
<li><a href="#2"><b class="cmd">::math::rationalfunctions::ratioCmd</b> <i class="arg">num</i> <i class="arg">den</i></a></li>
<li><a href="#3"><b class="cmd">::math::rationalfunctions::evalRatio</b> <i class="arg">rational</i> <i class="arg">x</i></a></li>
<li><a href="#4"><b class="cmd">::math::rationalfunctions::addRatio</b> <i class="arg">ratio1</i> <i class="arg">ratio2</i></a></li>
<li><a href="#5"><b class="cmd">::math::rationalfunctions::subRatio</b> <i class="arg">ratio1</i> <i class="arg">ratio2</i></a></li>
<li><a href="#6"><b class="cmd">::math::rationalfunctions::multRatio</b> <i class="arg">ratio1</i> <i class="arg">ratio2</i></a></li>
<li><a href="#7"><b class="cmd">::math::rationalfunctions::divRatio</b> <i class="arg">ratio1</i> <i class="arg">ratio2</i></a></li>
<li><a href="#8"><b class="cmd">::math::rationalfunctions::derivPolyn</b> <i class="arg">ratio</i></a></li>
<li><a href="#9"><b class="cmd">::math::rationalfunctions::coeffsNumerator</b> <i class="arg">ratio</i></a></li>
<li><a href="#10"><b class="cmd">::math::rationalfunctions::coeffsDenominator</b> <i class="arg">ratio</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package deals with rational functions of one variable:</p>
<ul class="doctools_itemized">
<li><p>the basic arithmetic operations are extended to rational functions</p></li>
<li><p>computing the derivatives of these functions</p></li>
<li><p>evaluation through a general procedure or via specific procedures)</p></li>
</ul>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::rationalfunctions::rationalFunction</b> <i class="arg">num</i> <i class="arg">den</i></a></dt>
<dd><p>Return an (encoded) list that defines the rational function. A
rational function</p>
<pre class="doctools_example">
             1 + x^3
   f(x) = ------------
          1 + 2x + x^2
</pre>
<p>can be defined via:</p>
<pre class="doctools_example">
   set f [::math::rationalfunctions::rationalFunction [list 1 0 0 1]  [list 1 2 1]]
</pre>
<dl class="doctools_arguments">
<dt>list <i class="arg">num</i></dt>
<dd><p>Coefficients of the numerator of the rational
function (in ascending order)</p></dd>
<dt>list <i class="arg">den</i></dt>
<dd><p>Coefficients of the denominator of the rational
function (in ascending order)</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::rationalfunctions::ratioCmd</b> <i class="arg">num</i> <i class="arg">den</i></a></dt>
<dd><p>Create a new procedure that evaluates the rational function. The name of the
function is automatically generated. Useful if you need to evaluate
the function many times, as the procedure consists of a single
[expr] command.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">num</i></dt>
<dd><p>Coefficients of the numerator of the rational
function (in ascending order)</p></dd>
<dt>list <i class="arg">den</i></dt>
<dd><p>Coefficients of the denominator of the rational
function (in ascending order)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::rationalfunctions::evalRatio</b> <i class="arg">rational</i> <i class="arg">x</i></a></dt>
<dd><p>Evaluate the rational function at x.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">rational</i></dt>
<dd><p>The rational function's definition (as returned
by the rationalFunction command).
order)</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>The coordinate at which to evaluate the function</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::rationalfunctions::addRatio</b> <i class="arg">ratio1</i> <i class="arg">ratio2</i></a></dt>
<dd><p>Return a new rational function which is the sum of the two others.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">ratio1</i></dt>
<dd><p>The first rational function operand</p></dd>
<dt>list <i class="arg">ratio2</i></dt>
<dd><p>The second rational function operand</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::rationalfunctions::subRatio</b> <i class="arg">ratio1</i> <i class="arg">ratio2</i></a></dt>
<dd><p>Return a new rational function which is the difference of the two
others.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">ratio1</i></dt>
<dd><p>The first rational function operand</p></dd>
<dt>list <i class="arg">ratio2</i></dt>
<dd><p>The second rational function operand</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::math::rationalfunctions::multRatio</b> <i class="arg">ratio1</i> <i class="arg">ratio2</i></a></dt>
<dd><p>Return a new rational function which is the product of the two others.
If one of the arguments is a scalar value, the other rational function is
simply scaled.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">ratio1</i></dt>
<dd><p>The first rational function operand or a scalar</p></dd>
<dt>list <i class="arg">ratio2</i></dt>
<dd><p>The second rational function operand or a scalar</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::rationalfunctions::divRatio</b> <i class="arg">ratio1</i> <i class="arg">ratio2</i></a></dt>
<dd><p>Divide the first rational function by the second rational function and
return the result. The remainder is dropped</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">ratio1</i></dt>
<dd><p>The first rational function operand</p></dd>
<dt>list <i class="arg">ratio2</i></dt>
<dd><p>The second rational function operand</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::rationalfunctions::derivPolyn</b> <i class="arg">ratio</i></a></dt>
<dd><p>Differentiate the rational function and return the result.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">ratio</i></dt>
<dd><p>The rational function to be differentiated</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::rationalfunctions::coeffsNumerator</b> <i class="arg">ratio</i></a></dt>
<dd><p>Return the coefficients of the numerator of the rational function.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">ratio</i></dt>
<dd><p>The rational function to be examined</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::rationalfunctions::coeffsDenominator</b> <i class="arg">ratio</i></a></dt>
<dd><p>Return the coefficients of the denominator of the rational
function.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">ratio</i></dt>
<dd><p>The rational function to be examined</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">REMARKS ON THE IMPLEMENTATION</a></h2>
<p>The implementation of the rational functions relies on the
math::polynomials package. For further remarks see the documentation on
that package.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: rationalfunctions</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key656">rational functions</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/roman.html.





































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

<div class='fossil-doc' data-title='math::roman - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::roman() 1.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::roman - Tools for creating and manipulating roman numerals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">math::roman <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::roman::toroman</b> <i class="arg">i</i></a></li>
<li><a href="#2"><b class="cmd">::math::roman::tointeger</b> <i class="arg">r</i></a></li>
<li><a href="#3"><b class="cmd">::math::roman::sort</b> <i class="arg">list</i></a></li>
<li><a href="#4"><b class="cmd">::math::roman::expr</b> <i class="arg">args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><b class="cmd">::math::roman</b> is a pure-Tcl library for converting between integers
    and roman numerals. It also provides utility functions for sorting and performing
    arithmetic on roman numerals.</p>
<p>This code was originally harvested from the Tcler's wiki at
    http://wiki.tcl.tk/1823 and as such is free for any use for
    any purpose. Many thanks to the ingeneous folk who devised
    these clever routines and generously contributed them to the
    Tcl community.</p>
<p>While written and tested under Tcl 8.3, I expect this library
    will work under all 8.x versions of Tcl.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
    
<dt><a name="1"><b class="cmd">::math::roman::toroman</b> <i class="arg">i</i></a></dt>
<dd><p>Convert an integer to roman numerals. The result is always in
      upper case. The value zero is converted to an empty string.</p></dd>
<dt><a name="2"><b class="cmd">::math::roman::tointeger</b> <i class="arg">r</i></a></dt>
<dd><p>Convert a roman numeral into an integer.</p></dd>
<dt><a name="3"><b class="cmd">::math::roman::sort</b> <i class="arg">list</i></a></dt>
<dd><p>Sort a list of roman numerals from smallest to largest.</p></dd>
<dt><a name="4"><b class="cmd">::math::roman::expr</b> <i class="arg">args</i></a></dt>
<dd><p>Evaluate an expression where the operands are all roman numerals.</p></dd>
</dl>
<p>Of these commands both <em>toroman</em> and <em>tointeger</em> are exported
for easier use. The other two are not, as they could interfer or be
confused with existing Tcl commands.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: roman</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key351">integer</a>, <a href="../../../../index.html#key350">roman numeral</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Kenneth Green &lt;kenneth.green@gmail.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/romberg.html.





















































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<div class='fossil-doc' data-title='math::calculus::romberg - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::calculus::romberg(n) 0.6 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::calculus::romberg - Romberg integration</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">PARAMETERS</a></li>
<li class="doctools_section"><a href="#section4">OPTIONS</a></li>
<li class="doctools_section"><a href="#section5">DESCRIPTION</a></li>
<li class="doctools_section"><a href="#section6">IMPROPER INTEGRALS</a></li>
<li class="doctools_section"><a href="#section7">OTHER CHANGES OF VARIABLE</a></li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">math::calculus 0.6</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::calculus::romberg</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::math::calculus::romberg_infinity</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::math::calculus::romberg_sqrtSingLower</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></li>
<li><a href="#4"><b class="cmd">::math::calculus::romberg_sqrtSingUpper</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></li>
<li><a href="#5"><b class="cmd">::math::calculus::romberg_powerLawLower</b> <i class="arg">gamma</i> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></li>
<li><a href="#6"><b class="cmd">::math::calculus::romberg_powerLawUpper</b> <i class="arg">gamma</i> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></li>
<li><a href="#7"><b class="cmd">::math::calculus::romberg_expLower</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></li>
<li><a href="#8"><b class="cmd">::math::calculus::romberg_expUpper</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">romberg</b> procedures in the <b class="cmd"><a href="calculus.html">math::calculus</a></b> package
perform numerical integration of a function of one variable.  They
are intended to be of &quot;production quality&quot; in that they are robust,
precise, and reasonably efficient in terms of the number of function
evaluations.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The following procedures are available for Romberg integration:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::calculus::romberg</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></dt>
<dd><p>Integrates an analytic function over a given interval.</p></dd>
<dt><a name="2"><b class="cmd">::math::calculus::romberg_infinity</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></dt>
<dd><p>Integrates an analytic function over a half-infinite interval.</p></dd>
<dt><a name="3"><b class="cmd">::math::calculus::romberg_sqrtSingLower</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></dt>
<dd><p>Integrates a function that is expected to be analytic over an interval
except for the presence of an inverse square root singularity at the
lower limit.</p></dd>
<dt><a name="4"><b class="cmd">::math::calculus::romberg_sqrtSingUpper</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></dt>
<dd><p>Integrates a function that is expected to be analytic over an interval
except for the presence of an inverse square root singularity at the
upper limit.</p></dd>
<dt><a name="5"><b class="cmd">::math::calculus::romberg_powerLawLower</b> <i class="arg">gamma</i> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></dt>
<dd><p>Integrates a function that is expected to be analytic over an interval
except for the presence of a power law singularity at the
lower limit.</p></dd>
<dt><a name="6"><b class="cmd">::math::calculus::romberg_powerLawUpper</b> <i class="arg">gamma</i> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></dt>
<dd><p>Integrates a function that is expected to be analytic over an interval
except for the presence of a power law singularity at the
upper limit.</p></dd>
<dt><a name="7"><b class="cmd">::math::calculus::romberg_expLower</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></dt>
<dd><p>Integrates an exponentially growing function; the lower limit of the
region of integration may be arbitrarily large and negative.</p></dd>
<dt><a name="8"><b class="cmd">::math::calculus::romberg_expUpper</b> <i class="arg">f</i> <i class="arg">a</i> <i class="arg">b</i> <span class="opt">?<i class="arg">-option value</i>...?</span></a></dt>
<dd><p>Integrates an exponentially decaying function; the upper limit of the
region of integration may be arbitrarily large.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PARAMETERS</a></h2>
<dl class="doctools_definitions">
<dt><i class="arg">f</i></dt>
<dd><p>Function to integrate.  Must be expressed as a single Tcl command,
to which will be appended a single argument, specifically, the
abscissa at which the function is to be evaluated. The first word
of the command will be processed with <b class="cmd">namespace which</b> in the
caller's scope prior to any evaluation. Given this processing, the
command may local to the calling namespace rather than needing to be
global.</p></dd>
<dt><i class="arg">a</i></dt>
<dd><p>Lower limit of the region of integration.</p></dd>
<dt><i class="arg">b</i></dt>
<dd><p>Upper limit of the region of integration.  For the
<b class="cmd">romberg_sqrtSingLower</b>, <b class="cmd">romberg_sqrtSingUpper</b>,
<b class="cmd">romberg_powerLawLower</b>, <b class="cmd">romberg_powerLawUpper</b>,
<b class="cmd">romberg_expLower</b>, and <b class="cmd">romberg_expUpper</b> procedures,
the lower limit must be strictly less than the upper.  For
the other procedures, the limits may appear in either order.</p></dd>
<dt><i class="arg">gamma</i></dt>
<dd><p>Power to use for a power law singularity; see section
<span class="sectref"><a href="#section6">IMPROPER INTEGRALS</a></span> for details.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">OPTIONS</a></h2>
<dl class="doctools_definitions">
<dt><b class="option">-abserror</b> <i class="arg">epsilon</i></dt>
<dd><p>Requests that the integration machinery proceed at most until
the estimated absolute error of the integral is less than
<i class="arg">epsilon</i>. The error may be seriously over- or underestimated
if the function (or any of its derivatives) contains singularities;
see section <span class="sectref"><a href="#section6">IMPROPER INTEGRALS</a></span> for details. Default
is 1.0e-08.</p></dd>
<dt><b class="option">-relerror</b> <i class="arg">epsilon</i></dt>
<dd><p>Requests that the integration machinery proceed at most until
the estimated relative error of the integral is less than
<i class="arg">epsilon</i>. The error may be seriously over- or underestimated
if the function (or any of its derivatives) contains singularities;
see section <span class="sectref"><a href="#section6">IMPROPER INTEGRALS</a></span> for details.  Default is
1.0e-06.</p></dd>
<dt><b class="option">-maxiter</b> <i class="arg">m</i></dt>
<dd><p>Requests that integration terminate after at most <i class="arg">n</i> triplings of
the number of evaluations performed.  In other words, given <i class="arg">n</i>
for <b class="option">-maxiter</b>, the integration machinery will make at most
3**<i class="arg">n</i> evaluations of the function.  Default is 14, corresponding
to a limit approximately 4.8 million evaluations. (Well-behaved
functions will seldom require more than a few hundred evaluations.)</p></dd>
<dt><b class="option">-degree</b> <i class="arg">d</i></dt>
<dd><p>Requests that an extrapolating polynomial of degree <i class="arg">d</i> be used
in Romberg integration; see section <span class="sectref"><a href="#section5">DESCRIPTION</a></span> for
details. Default is 4.  Can be at most <i class="arg">m</i>-1.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">DESCRIPTION</a></h2>
<p>The <b class="cmd">romberg</b> procedure performs Romberg integration using
the modified midpoint rule. Romberg integration is an iterative
process.  At the first step, the function is evaluated at the
midpoint of the region of integration, and the value is multiplied by
the width of the interval for the coarsest possible estimate.
At the second step, the interval is divided into three parts,
and the function is evaluated at the midpoint of each part; the
sum of the values is multiplied by three.  At the third step,
nine parts are used, at the fourth twenty-seven, and so on,
tripling the number of subdivisions at each step.</p>
<p>Once the interval has been divided at least <i class="arg">d</i> times,
a polynomial is fitted to the integrals estimated in the last
<i class="arg">d</i>+1 divisions.  The integrals are considered to be a
function of the square of the width of the subintervals
(any good numerical analysis text will discuss this process
under &quot;Romberg integration&quot;).  The polynomial is extrapolated
to a step size of zero, computing a value for the integral and
an estimate of the error.</p>
<p>This process will be well-behaved only if the function is analytic
over the region of integration; there may be removable singularities
at either end of the region provided that the limit of the function
(and of all its derivatives) exists as the ends are approached.
Thus, <b class="cmd">romberg</b> may be used to integrate a function like
f(x)=sin(x)/x over an interval beginning or ending at zero.</p>
<p>Note that <b class="cmd">romberg</b> will either fail to converge or else return
incorrect error estimates if the function, or any of its derivatives,
has a singularity anywhere in the region of integration (except for
the case mentioned above).  Care must be used, therefore, in
integrating a function like 1/(1-x**2) to avoid the places
where the derivative is singular.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">IMPROPER INTEGRALS</a></h2>
<p>Romberg integration is also useful for integrating functions over
half-infinite intervals or functions that have singularities.
The trick is to make a change of variable to eliminate the
singularity, and to put the singularity at one end or the other
of the region of integration.  The <b class="cmd"><a href="calculus.html">math::calculus</a></b> package
supplies a number of <b class="cmd">romberg</b> procedures to deal with the
commoner cases.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">romberg_infinity</b></dt>
<dd><p>Integrates a function over a half-infinite interval; either
<i class="arg">a</i> or <i class="arg">b</i> may be infinite.  <i class="arg">a</i> and <i class="arg">b</i> must be
of the same sign; if you need to integrate across the axis,
say, from a negative value to positive infinity,
use <b class="cmd">romberg</b> to integrate from the negative
value to a small positive value, and then <b class="cmd">romberg_infinity</b>
to integrate from the positive value to positive infinity.  The
<b class="cmd">romberg_infinity</b> procedure works by making the change of
variable u=1/x, so that the integral from a to b of f(x) is
evaluated as the integral from 1/a to 1/b of f(1/u)/u**2.</p></dd>
<dt><b class="cmd">romberg_powerLawLower</b> and <b class="cmd">romberg_powerLawUpper</b></dt>
<dd><p>Integrate a function that has an integrable power law singularity
at either the lower or upper bound of the region of integration
(or has a derivative with a power law singularity there).
These procedures take a first parameter, <i class="arg">gamma</i>, which gives
the power law.  The function or its first derivative are presumed to diverge as
(x-<i class="arg">a</i>)**(-<i class="arg">gamma</i>) or (<i class="arg">b</i>-x)**(-<i class="arg">gamma</i>).  <i class="arg">gamma</i>
must be greater than zero and less than 1.</p>
<p>These procedures are useful not only in integrating functions
that go to infinity at one end of the region of integration, but
also functions whose derivatives do not exist at the end of
the region.  For instance, integrating f(x)=pow(x,0.25) with the
origin as one end of the region will result in the <b class="cmd">romberg</b>
procedure greatly underestimating the error in the integral.
The problem can be fixed by observing that the first derivative
of f(x), f'(x)=x**(-3/4)/4, goes to infinity at the origin.  Integrating
using <b class="cmd">romberg_powerLawLower</b> with <i class="arg">gamma</i> set to 0.75
gives much more orderly convergence.</p>
<p>These procedures operate by making the change of variable
u=(x-a)**(1-gamma) (<b class="cmd">romberg_powerLawLower</b>) or
u=(b-x)**(1-gamma) (<b class="cmd">romberg_powerLawUpper</b>).</p>
<p>To summarize the meaning of gamma:</p>
<ul class="doctools_itemized">
<li><p>If f(x) ~ x**(-a) (0 &lt; a &lt; 1), use gamma = a</p></li>
<li><p>If f'(x) ~ x**(-b) (0 &lt; b &lt; 1), use gamma = b</p></li>
</ul></dd>
<dt><b class="cmd">romberg_sqrtSingLower</b> and <b class="cmd">romberg_sqrtSingUpper</b></dt>
<dd><p>These procedures behave identically to <b class="cmd">romberg_powerLawLower</b> and
<b class="cmd">romberg_powerLawUpper</b> for the common case of <i class="arg">gamma</i>=0.5;
that is, they integrate a function with an inverse square root
singularity at one end of the interval.  They have a simpler
implementation involving square roots rather than arbitrary powers.</p></dd>
<dt><b class="cmd">romberg_expLower</b> and <b class="cmd">romberg_expUpper</b></dt>
<dd><p>These procedures are for integrating a function that grows or
decreases exponentially over a half-infinite interval.
<b class="cmd">romberg_expLower</b> handles exponentially growing functions, and
allows the lower limit of integration to be an arbitrarily large
negative number.  <b class="cmd">romberg_expUpper</b> handles exponentially
decaying functions and allows the upper limit of integration to
be an arbitrary large positive number.  The functions make the
change of variable u=exp(-x) and u=exp(x) respectively.</p></dd>
</dl>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">OTHER CHANGES OF VARIABLE</a></h2>
<p>If you need an improper integral other than the ones listed here,
a change of variable can be written in very few lines of Tcl.
Because the Tcl coding that does it is somewhat arcane,
we offer a worked example here.</p>
<p>Let's say that the function that we want to integrate is
f(x)=exp(x)/sqrt(1-x*x) (not a very natural
function, but a good example), and we want to integrate
it over the interval (-1,1).  The denominator falls to zero
at both ends of the interval. We wish to make a change of variable
from x to u
so that dx/sqrt(1-x**2) maps to du.  Choosing x=sin(u), we can
find that dx=cos(u)*du, and sqrt(1-x**2)=cos(u).  The integral
from a to b of f(x) is the integral from asin(a) to asin(b)
of f(sin(u))*cos(u).</p>
<p>We can make a function <b class="cmd">g</b> that accepts an arbitrary function
<b class="cmd">f</b> and the parameter u, and computes this new integrand.</p>
<pre class="doctools_example">
proc g { f u } {
    set x [expr { sin($u) }]
    set cmd $f; lappend cmd $x; set y [eval $cmd]
    return [expr { $y / cos($u) }]
}
</pre>
<p>Now integrating <b class="cmd">f</b> from <i class="arg">a</i> to <i class="arg">b</i> is the same
as integrating <b class="cmd">g</b> from <i class="arg">asin(a)</i> to <i class="arg">asin(b)</i>.
It's a little tricky to get <b class="cmd">f</b> consistently evaluated in
the caller's scope; the following procedure does it.</p>
<pre class="doctools_example">
proc romberg_sine { f a b args } {
    set f [lreplace $f 0 0 [uplevel 1 [list namespace which [lindex $f 0]]]]
    set f [list g $f]
    return [eval [linsert $args 0 romberg $f [expr { asin($a) }] [expr { asin($b) }]]]
}
</pre>
<p>This <b class="cmd">romberg_sine</b> procedure will do any function with
sqrt(1-x*x) in the denominator. Our sample function is
f(x)=exp(x)/sqrt(1-x*x):</p>
<pre class="doctools_example">
proc f { x } {
    expr { exp($x) / sqrt( 1. - $x*$x ) }
}
</pre>
<p>Integrating it is a matter of applying <b class="cmd">romberg_sine</b>
as we would any of the other <b class="cmd">romberg</b> procedures:</p>
<pre class="doctools_example">
foreach { value error } [romberg_sine f -1.0 1.0] break
puts [format &quot;integral is %.6g +/- %.6g&quot; $value $error]
integral is 3.97746 +/- 2.3557e-010
</pre>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: calculus</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="calculus.html">math::calculus</a>, <a href="interpolate.html">math::interpolate</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Kevin B. Kenny &lt;kennykb@acm.org&gt;. All rights reserved. Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/special.html.























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507

<div class='fossil-doc' data-title='math::special - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::special(n) 0.3 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::special - Special mathematical functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a></li>
<li class="doctools_section"><a href="#section3">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section4">THE ORTHOGONAL POLYNOMIALS</a></li>
<li class="doctools_section"><a href="#section5">REMARKS ON THE IMPLEMENTATION</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.3?</span></b></li>
<li>package require <b class="pkgname">math::special <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::special::Beta</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#2"><b class="cmd">::math::special::Gamma</b> <i class="arg">x</i></a></li>
<li><a href="#3"><b class="cmd">::math::special::erf</b> <i class="arg">x</i></a></li>
<li><a href="#4"><b class="cmd">::math::special::erfc</b> <i class="arg">x</i></a></li>
<li><a href="#5"><b class="cmd">::math::special::invnorm</b> <i class="arg">p</i></a></li>
<li><a href="#6"><b class="cmd">::math::special::J0</b> <i class="arg">x</i></a></li>
<li><a href="#7"><b class="cmd">::math::special::J1</b> <i class="arg">x</i></a></li>
<li><a href="#8"><b class="cmd">::math::special::Jn</b> <i class="arg">n</i> <i class="arg">x</i></a></li>
<li><a href="#9"><b class="cmd">::math::special::J1/2</b> <i class="arg">x</i></a></li>
<li><a href="#10"><b class="cmd">::math::special::J-1/2</b> <i class="arg">x</i></a></li>
<li><a href="#11"><b class="cmd">::math::special::I_n</b> <i class="arg">x</i></a></li>
<li><a href="#12"><b class="cmd">::math::special::cn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#13"><b class="cmd">::math::special::dn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#14"><b class="cmd">::math::special::sn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#15"><b class="cmd">::math::special::elliptic_K</b> <i class="arg">k</i></a></li>
<li><a href="#16"><b class="cmd">::math::special::elliptic_E</b> <i class="arg">k</i></a></li>
<li><a href="#17"><b class="cmd">::math::special::exponential_Ei</b> <i class="arg">x</i></a></li>
<li><a href="#18"><b class="cmd">::math::special::exponential_En</b> <i class="arg">n</i> <i class="arg">x</i></a></li>
<li><a href="#19"><b class="cmd">::math::special::exponential_li</b> <i class="arg">x</i></a></li>
<li><a href="#20"><b class="cmd">::math::special::exponential_Ci</b> <i class="arg">x</i></a></li>
<li><a href="#21"><b class="cmd">::math::special::exponential_Si</b> <i class="arg">x</i></a></li>
<li><a href="#22"><b class="cmd">::math::special::exponential_Chi</b> <i class="arg">x</i></a></li>
<li><a href="#23"><b class="cmd">::math::special::exponential_Shi</b> <i class="arg">x</i></a></li>
<li><a href="#24"><b class="cmd">::math::special::fresnel_C</b> <i class="arg">x</i></a></li>
<li><a href="#25"><b class="cmd">::math::special::fresnel_S</b> <i class="arg">x</i></a></li>
<li><a href="#26"><b class="cmd">::math::special::sinc</b> <i class="arg">x</i></a></li>
<li><a href="#27"><b class="cmd">::math::special::legendre</b> <i class="arg">n</i></a></li>
<li><a href="#28"><b class="cmd">::math::special::chebyshev</b> <i class="arg">n</i></a></li>
<li><a href="#29"><b class="cmd">::math::special::laguerre</b> <i class="arg">alpha</i> <i class="arg">n</i></a></li>
<li><a href="#30"><b class="cmd">::math::special::hermite</b> <i class="arg">n</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements several so-called special functions, like
the Gamma function, the Bessel functions and such.</p>
<p>Each function is implemented by a procedure that bears its name (well,
in close approximation):</p>
<ul class="doctools_itemized">
<li><p>J0 for the zeroth-order Bessel function of the first kind</p></li>
<li><p>J1 for the first-order Bessel function of the first kind</p></li>
<li><p>Jn for the nth-order Bessel function of the first kind</p></li>
<li><p>J1/2 for the half-order Bessel function of the first kind</p></li>
<li><p>J-1/2 for the minus-half-order Bessel function of the first kind</p></li>
<li><p>I_n for the modified Bessel function of the first kind of order n</p></li>
<li><p>Gamma for the Gamma function, erf and erfc for the error function and
the complementary error function</p></li>
<li><p>fresnel_C and fresnel_S for the Fresnel integrals</p></li>
<li><p>elliptic_K and elliptic_E (complete elliptic integrals)</p></li>
<li><p>exponent_Ei and other functions related to the so-called exponential
integrals</p></li>
<li><p>legendre, hermite: some of the classical orthogonal polynomials.</p></li>
</ul>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<p>In the following table several characteristics of the functions in this
package are summarized: the domain for the argument, the values for the
parameters and error bounds.</p>
<pre class="doctools_example">
Family       | Function    | Domain x    | Parameter   | Error bound
-------------+-------------+-------------+-------------+--------------
Bessel       | J0, J1,     | all of R    | n = integer |   &lt; 1.0e-8
             | Jn          |             |             |  (|x|&lt;20, n&lt;20)
Bessel       | J1/2, J-1/2,|  x &gt; 0      | n = integer |   exact
Bessel       | I_n         | all of R    | n = integer |   &lt; 1.0e-6
             |             |             |             |
Elliptic     | cn          | 0 &lt;= x &lt;= 1 |     --      |   &lt; 1.0e-10
functions    | dn          | 0 &lt;= x &lt;= 1 |     --      |   &lt; 1.0e-10
             | sn          | 0 &lt;= x &lt;= 1 |     --      |   &lt; 1.0e-10
Elliptic     | K           | 0 &lt;= x &lt; 1  |     --      |   &lt; 1.0e-6
integrals    | E           | 0 &lt;= x &lt; 1  |     --      |   &lt; 1.0e-6
             |             |             |             |
Error        | erf         |             |     --      |
functions    | erfc        |             |             |
             |             |             |             |
Inverse      | invnorm     | 0 &lt; x &lt; 1   |     --      |   &lt; 1.2e-9
normal       |             |             |             |
distribution |             |             |             |
             |             |             |             |
Exponential  | Ei          |  x != 0     |     --      |   &lt; 1.0e-10 (relative)
integrals    | En          |  x &gt;  0     |     --      |   as Ei
             | li          |  x &gt; 0      |     --      |   as Ei
             | Chi         |  x &gt; 0      |     --      |   &lt; 1.0e-8
             | Shi         |  x &gt; 0      |     --      |   &lt; 1.0e-8
             | Ci          |  x &gt; 0      |     --      |   &lt; 2.0e-4
             | Si          |  x &gt; 0      |     --      |   &lt; 2.0e-4
             |             |             |             |
Fresnel      | C           |  all of R   |     --      |   &lt; 2.0e-3
integrals    | S           |  all of R   |     --      |   &lt; 2.0e-3
             |             |             |             |
general      | Beta        | (see Gamma) |     --      |   &lt; 1.0e-9
             | Gamma       |  x != 0,-1, |     --      |   &lt; 1.0e-9
             |             |  -2, ...    |             |
             | sinc        |  all of R   |     --      |   exact
             |             |             |             |
orthogonal   | Legendre    |  all of R   | n = 0,1,... |   exact
polynomials  | Chebyshev   |  all of R   | n = 0,1,... |   exact
             | Laguerre    |  all of R   | n = 0,1,... |   exact
             |             |             | alpha el. R |
             | Hermite     |  all of R   | n = 0,1,... |   exact
</pre>
<p><em>Note:</em> Some of the error bounds are estimated, as no
&quot;formal&quot; bounds were available with the implemented approximation
method, others hold for the auxiliary functions used for estimating
the primary functions.</p>
<p>The following well-known functions are currently missing from the package:</p>
<ul class="doctools_itemized">
<li><p>Bessel functions of the second kind (Y_n, K_n)</p></li>
<li><p>Bessel functions of arbitrary order (and hence the Airy functions)</p></li>
<li><p>Chebyshev polynomials of the second kind (U_n)</p></li>
<li><p>The digamma function (psi)</p></li>
<li><p>The incomplete gamma and beta functions</p></li>
</ul>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::special::Beta</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Compute the Beta function for arguments &quot;x&quot; and &quot;y&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>First argument for the Beta function</p></dd>
<dt>float <i class="arg">y</i></dt>
<dd><p>Second argument for the Beta function</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::special::Gamma</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Gamma function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Gamma function</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::special::erf</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the error function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the error function</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::special::erfc</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the complementary error function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the complementary error function</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::special::invnorm</b> <i class="arg">p</i></a></dt>
<dd><p>Compute the inverse of the normal distribution function for argument &quot;p&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">p</i></dt>
<dd><p>Argument for the inverse normal distribution function
(p must be greater than 0 and lower than 1)</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::math::special::J0</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the zeroth-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::special::J1</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the first-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::special::Jn</b> <i class="arg">n</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the nth-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">n</i></dt>
<dd><p>Order of the Bessel function</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::special::J1/2</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the half-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::special::J-1/2</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the minus-half-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::special::I_n</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the modified Bessel function of the first kind of order n for
the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">x</i></dt>
<dd><p>Positive integer order of the function</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::math::special::cn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>cn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::special::dn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>dn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::math::special::sn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>sn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::special::elliptic_K</b> <i class="arg">k</i></a></dt>
<dd><p>Compute the complete elliptic integral of the first kind
for the argument &quot;k&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">k</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::special::elliptic_E</b> <i class="arg">k</i></a></dt>
<dd><p>Compute the complete elliptic integral of the second kind
for the argument &quot;k&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">k</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">::math::special::exponential_Ei</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the exponential integral of the second kind
for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x != 0)</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::special::exponential_En</b> <i class="arg">n</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the exponential integral of the first kind
for the argument &quot;x&quot; and order n</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Order of the integral (n &gt;= 0)</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt;= 0)</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::special::exponential_li</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the logarithmic integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::special::exponential_Ci</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the cosine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::special::exponential_Si</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the sine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::special::exponential_Chi</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the hyperbolic cosine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::special::exponential_Shi</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the hyperbolic sine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::special::fresnel_C</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Fresnel cosine integral for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::special::fresnel_S</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Fresnel sine integral for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::special::sinc</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the sinc function for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">::math::special::legendre</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Legendre polynomial of degree n
(see <span class="sectref"><a href="#section4">THE ORTHOGONAL POLYNOMIALS</a></span>)</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::special::chebyshev</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Chebyshev polynomial of degree n (of the first kind)</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::special::laguerre</b> <i class="arg">alpha</i> <i class="arg">n</i></a></dt>
<dd><p>Return the Laguerre polynomial of degree n with parameter alpha</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>Parameter of the Laguerre polynomial</p></dd>
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd">::math::special::hermite</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Hermite polynomial of degree n</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">THE ORTHOGONAL POLYNOMIALS</a></h2>
<p>For dealing with the classical families of orthogonal polynomials, the
package relies on the <em>math::polynomials</em> package. To evaluate the
polynomial at some coordinate, use the <em>evalPolyn</em> command:</p>
<pre class="doctools_example">
   set leg2 [::math::special::legendre 2]
   puts &quot;Value at x=$x: [::math::polynomials::evalPolyn $leg2 $x]&quot;
</pre>
<p>The return value from the <em>legendre</em> and other commands is actually
the definition of the corresponding polynomial as used in that package.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REMARKS ON THE IMPLEMENTATION</a></h2>
<p>It should be noted, that the actual implementation of J0 and J1 depends
on straightforward Gaussian quadrature formulas. The (absolute) accuracy
of the results is of the order 1.0e-4 or better. The main reason to
implement them like that was that it was fast to do (the formulas are
simple) and the computations are fast too.</p>
<p>The implementation of J1/2 does not suffer from this: this function can
be expressed exactly in terms of elementary functions.</p>
<p>The functions J0 and J1 are the ones you will encounter most frequently
in practice.</p>
<p>The computation of I_n is based on Miller's algorithm for computing the
minimal function from recurrence relations.</p>
<p>The computation of the Gamma and Beta functions relies on the
combinatorics package, whereas that of the error functions relies on the
statistics package.</p>
<p>The computation of the complete elliptic integrals uses the AGM
algorithm.</p>
<p>Much information about these functions can be found in:</p>
<p>Abramowitz and Stegun: <em>Handbook of Mathematical Functions</em>
(Dover, ISBN 486-61272-4)</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: special</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key685">Bessel functions</a>, <a href="../../../../index.html#key683">error function</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key684">special functions</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/statistics.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592

<div class='fossil-doc' data-title='math::statistics - Tcl Math Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::statistics(n) 1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::statistics - Basic statistical functions and procedures</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">GENERAL PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">MULTIVARIATE LINEAR REGRESSION</a></li>
<li class="doctools_section"><a href="#section4">STATISTICAL DISTRIBUTIONS</a></li>
<li class="doctools_section"><a href="#section5">DATA MANIPULATION</a></li>
<li class="doctools_section"><a href="#section6">PLOT PROCEDURES</a></li>
<li class="doctools_section"><a href="#section7">THINGS TO DO</a></li>
<li class="doctools_section"><a href="#section8">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section9">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">math::statistics 1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::statistics::mean</b> <i class="arg">data</i></a></li>
<li><a href="#2"><b class="cmd">::math::statistics::min</b> <i class="arg">data</i></a></li>
<li><a href="#3"><b class="cmd">::math::statistics::max</b> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::math::statistics::number</b> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::math::statistics::stdev</b> <i class="arg">data</i></a></li>
<li><a href="#6"><b class="cmd">::math::statistics::var</b> <i class="arg">data</i></a></li>
<li><a href="#7"><b class="cmd">::math::statistics::pstdev</b> <i class="arg">data</i></a></li>
<li><a href="#8"><b class="cmd">::math::statistics::pvar</b> <i class="arg">data</i></a></li>
<li><a href="#9"><b class="cmd">::math::statistics::median</b> <i class="arg">data</i></a></li>
<li><a href="#10"><b class="cmd">::math::statistics::basic-stats</b> <i class="arg">data</i></a></li>
<li><a href="#11"><b class="cmd">::math::statistics::histogram</b> <i class="arg">limits</i> <i class="arg">values</i> <span class="opt">?weights?</span></a></li>
<li><a href="#12"><b class="cmd">::math::statistics::histogram-alt</b> <i class="arg">limits</i> <i class="arg">values</i> <span class="opt">?weights?</span></a></li>
<li><a href="#13"><b class="cmd">::math::statistics::corr</b> <i class="arg">data1</i> <i class="arg">data2</i></a></li>
<li><a href="#14"><b class="cmd">::math::statistics::interval-mean-stdev</b> <i class="arg">data</i> <i class="arg">confidence</i></a></li>
<li><a href="#15"><b class="cmd">::math::statistics::t-test-mean</b> <i class="arg">data</i> <i class="arg">est_mean</i> <i class="arg">est_stdev</i> <i class="arg">alpha</i></a></li>
<li><a href="#16"><b class="cmd">::math::statistics::test-normal</b> <i class="arg">data</i> <i class="arg">significance</i></a></li>
<li><a href="#17"><b class="cmd">::math::statistics::lillieforsFit</b> <i class="arg">data</i></a></li>
<li><a href="#18"><b class="cmd">::math::statistics::test-Duckworth</b> <i class="arg">list1</i> <i class="arg">list2</i> <i class="arg">significance</i></a></li>
<li><a href="#19"><b class="cmd">::math::statistics::test-anova-F</b> <i class="arg">alpha</i> <i class="arg">args</i></a></li>
<li><a href="#20"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">data</i> <i class="arg">confidence</i></a></li>
<li><a href="#21"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">limits</i> <i class="arg">counts</i> <i class="arg">confidence</i></a></li>
<li><a href="#22"><b class="cmd">::math::statistics::autocorr</b> <i class="arg">data</i></a></li>
<li><a href="#23"><b class="cmd">::math::statistics::crosscorr</b> <i class="arg">data1</i> <i class="arg">data2</i></a></li>
<li><a href="#24"><b class="cmd">::math::statistics::mean-histogram-limits</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></li>
<li><a href="#25"><b class="cmd">::math::statistics::minmax-histogram-limits</b> <i class="arg">min</i> <i class="arg">max</i> <i class="arg">number</i></a></li>
<li><a href="#26"><b class="cmd">::math::statistics::linear-model</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></li>
<li><a href="#27"><b class="cmd">::math::statistics::linear-residuals</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></li>
<li><a href="#28"><b class="cmd">::math::statistics::test-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></li>
<li><a href="#29"><b class="cmd">::math::statistics::print-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></li>
<li><a href="#30"><b class="cmd">::math::statistics::control-xbar</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></li>
<li><a href="#31"><b class="cmd">::math::statistics::control-Rchart</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></li>
<li><a href="#32"><b class="cmd">::math::statistics::test-xbar</b> <i class="arg">control</i> <i class="arg">data</i></a></li>
<li><a href="#33"><b class="cmd">::math::statistics::test-Rchart</b> <i class="arg">control</i> <i class="arg">data</i></a></li>
<li><a href="#34"><b class="cmd">::math::statistics::test-Kruskal-Wallis</b> <i class="arg">confidence</i> <i class="arg">args</i></a></li>
<li><a href="#35"><b class="cmd">::math::statistics::analyse-Kruskal-Wallis</b> <i class="arg">args</i></a></li>
<li><a href="#36"><b class="cmd">::math::statistics::group-rank</b> <i class="arg">args</i></a></li>
<li><a href="#37"><b class="cmd">::math::statistics::test-Wilcoxon</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></li>
<li><a href="#38"><b class="cmd">::math::statistics::spearman-rank</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></li>
<li><a href="#39"><b class="cmd">::math::statistics::spearman-rank-extended</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></li>
<li><a href="#40"><b class="cmd">::math::statistics::kernel-density</b> <i class="arg">data</i> opt <i class="arg">-option value</i> ...</a></li>
<li><a href="#41"><b class="cmd">::math::statistics::tstat</b> <i class="arg">dof</i> <span class="opt">?alpha?</span></a></li>
<li><a href="#42"><b class="cmd">::math::statistics::mv-wls</b> <i class="arg">wt1</i> <i class="arg">weights_and_values</i></a></li>
<li><a href="#43"><b class="cmd">::math::statistics::mv-ols</b> <i class="arg">values</i></a></li>
<li><a href="#44"><b class="cmd">::math::statistics::pdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#45"><b class="cmd">::math::statistics::pdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#46"><b class="cmd">::math::statistics::pdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></li>
<li><a href="#47"><b class="cmd">::math::statistics::pdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></li>
<li><a href="#48"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></li>
<li><a href="#49"><b class="cmd">::math::statistics::pdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></li>
<li><a href="#50"><b class="cmd">::math::statistics::pdf-chisquare</b> <i class="arg">df</i> <i class="arg">value</i></a></li>
<li><a href="#51"><b class="cmd">::math::statistics::pdf-student-t</b> <i class="arg">df</i> <i class="arg">value</i></a></li>
<li><a href="#52"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#53"><b class="cmd">::math::statistics::pdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#54"><b class="cmd">::math::statistics::pdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#55"><b class="cmd">::math::statistics::pdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#56"><b class="cmd">::math::statistics::pdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#57"><b class="cmd">::math::statistics::pdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#58"><b class="cmd">::math::statistics::cdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#59"><b class="cmd">::math::statistics::cdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#60"><b class="cmd">::math::statistics::cdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></li>
<li><a href="#61"><b class="cmd">::math::statistics::cdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></li>
<li><a href="#62"><b class="cmd">::math::statistics::cdf-students-t</b> <i class="arg">degrees</i> <i class="arg">value</i></a></li>
<li><a href="#63"><b class="cmd">::math::statistics::cdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></li>
<li><a href="#64"><b class="cmd">::math::statistics::cdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></li>
<li><a href="#65"><b class="cmd">::math::statistics::cdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#66"><b class="cmd">::math::statistics::cdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#67"><b class="cmd">::math::statistics::cdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#68"><b class="cmd">::math::statistics::cdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#69"><b class="cmd">::math::statistics::cdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#70"><b class="cmd">::math::statistics::cdf-F</b> <i class="arg">nf1</i> <i class="arg">nf2</i> <i class="arg">value</i></a></li>
<li><a href="#71"><b class="cmd">::math::statistics::empirical-distribution</b> <i class="arg">values</i></a></li>
<li><a href="#72"><b class="cmd">::math::statistics::random-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></li>
<li><a href="#73"><b class="cmd">::math::statistics::random-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></li>
<li><a href="#74"><b class="cmd">::math::statistics::random-exponential</b> <i class="arg">mean</i> <i class="arg">number</i></a></li>
<li><a href="#75"><b class="cmd">::math::statistics::random-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">number</i></a></li>
<li><a href="#76"><b class="cmd">::math::statistics::random-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">number</i></a></li>
<li><a href="#77"><b class="cmd">::math::statistics::random-poisson</b> <i class="arg">mu</i> <i class="arg">number</i></a></li>
<li><a href="#78"><b class="cmd">::math::statistics::random-chisquare</b> <i class="arg">df</i> <i class="arg">number</i></a></li>
<li><a href="#79"><b class="cmd">::math::statistics::random-student-t</b> <i class="arg">df</i> <i class="arg">number</i></a></li>
<li><a href="#80"><b class="cmd">::math::statistics::random-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">number</i></a></li>
<li><a href="#81"><b class="cmd">::math::statistics::random-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></li>
<li><a href="#82"><b class="cmd">::math::statistics::random-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></li>
<li><a href="#83"><b class="cmd">::math::statistics::random-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></li>
<li><a href="#84"><b class="cmd">::math::statistics::random-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></li>
<li><a href="#85"><b class="cmd">::math::statistics::histogram-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">limits</i> <i class="arg">number</i></a></li>
<li><a href="#86"><b class="cmd">::math::statistics::incompleteGamma</b> <i class="arg">x</i> <i class="arg">p</i> <span class="opt">?tol?</span></a></li>
<li><a href="#87"><b class="cmd">::math::statistics::incompleteBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i> <span class="opt">?tol?</span></a></li>
<li><a href="#88"><b class="cmd">::math::statistics::estimate-pareto</b> <i class="arg">values</i></a></li>
<li><a href="#89"><b class="cmd">::math::statistics::filter</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></li>
<li><a href="#90"><b class="cmd">::math::statistics::map</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></li>
<li><a href="#91"><b class="cmd">::math::statistics::samplescount</b> <i class="arg">varname</i> <i class="arg">list</i> <i class="arg">expression</i></a></li>
<li><a href="#92"><b class="cmd">::math::statistics::subdivide</b></a></li>
<li><a href="#93"><b class="cmd">::math::statistics::plot-scale</b> <i class="arg">canvas</i> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">ymin</i> <i class="arg">ymax</i></a></li>
<li><a href="#94"><b class="cmd">::math::statistics::plot-xydata</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></li>
<li><a href="#95"><b class="cmd">::math::statistics::plot-xyline</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></li>
<li><a href="#96"><b class="cmd">::math::statistics::plot-tdata</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></li>
<li><a href="#97"><b class="cmd">::math::statistics::plot-tline</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></li>
<li><a href="#98"><b class="cmd">::math::statistics::plot-histogram</b> <i class="arg">canvas</i> <i class="arg">counts</i> <i class="arg">limits</i> <i class="arg">tag</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">math::statistics</b> package contains functions and procedures for
basic statistical data analysis, such as:</p>
<ul class="doctools_itemized">
<li><p>Descriptive statistical parameters (mean, minimum, maximum, standard
deviation)</p></li>
<li><p>Estimates of the distribution in the form of histograms and quantiles</p></li>
<li><p>Basic testing of hypotheses</p></li>
<li><p>Probability and cumulative density functions</p></li>
</ul>
<p>It is meant to help in developing data analysis applications or doing
ad hoc data analysis, it is not in itself a full application, nor is it
intended to rival with full (non-)commercial statistical packages.</p>
<p>The purpose of this document is to describe the implemented procedures
and provide some examples of their usage. As there is ample literature
on the algorithms involved, we refer to relevant text books for more
explanations.
The package contains a fairly large number of public procedures. They
can be distinguished in three sets: general procedures, procedures
that deal with specific statistical distributions, list procedures to
select or transform data and simple plotting procedures (these require
Tk).
<em>Note:</em> The data that need to be analyzed are always contained in a
simple list. Missing values are represented as empty list elements.
<em>Note:</em> With version 1.0.1 a mistake in the procs <i class="term">pdf-lognormal</i>,
<i class="term">cdf-lognormal</i> and <i class="term">random-lognormal</i> has been corrected. In
previous versions the argument for the standard deviation was actually
used as if it was the variance.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">GENERAL PROCEDURES</a></h2>
<p>The general statistical procedures are:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::statistics::mean</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">mean</i> value of the given list of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::statistics::min</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term"><a href="../../../../index.html#key309">minimum</a></i> value of the given list of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::statistics::max</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term"><a href="../../../../index.html#key310">maximum</a></i> value of the given list of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::statistics::number</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">number</i> of non-missing data in the given list</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::statistics::stdev</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">sample standard deviation</i> of the data in the
given list</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::math::statistics::var</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">sample variance</i> of the data in the given list</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::statistics::pstdev</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">population standard deviation</i> of the data
in the given list</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::statistics::pvar</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">population variance</i> of the data in the
given list</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::statistics::median</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">median</i> of the data in the given list
(Note that this requires sorting the data, which may be a
costly operation)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::statistics::basic-stats</b> <i class="arg">data</i></a></dt>
<dd><p>Determine a list of all the descriptive parameters: mean, minimum,
maximum, number of data, sample standard deviation, sample variance,
population standard deviation and population variance.</p>
<p>(This routine is called whenever either or all of the basic statistical
parameters are required. Hence all calculations are done and the
relevant values are returned.)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::statistics::histogram</b> <i class="arg">limits</i> <i class="arg">values</i> <span class="opt">?weights?</span></a></dt>
<dd><p>Determine histogram information for the given list of data. Returns a
list consisting of the number of values that fall into each interval.
(The first interval consists of all values lower than the first limit,
the last interval consists of all values greater than the last limit.
There is one more interval than there are limits.)</p>
<p>Optionally, you can use weights to influence the histogram.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">limits</i></dt>
<dd><p>- List of upper limits (in ascending order) for the
intervals of the histogram.</p></dd>
<dt>list <i class="arg">values</i></dt>
<dd><p>- List of data</p></dd>
<dt>list <i class="arg">weights</i></dt>
<dd><p>- List of weights, one weight per value</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::math::statistics::histogram-alt</b> <i class="arg">limits</i> <i class="arg">values</i> <span class="opt">?weights?</span></a></dt>
<dd><p>Alternative implementation of the histogram procedure: the open end of the intervals
is at the lower bound instead of the upper bound.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">limits</i></dt>
<dd><p>- List of upper limits (in ascending order) for the
intervals of the histogram.</p></dd>
<dt>list <i class="arg">values</i></dt>
<dd><p>- List of data</p></dd>
<dt>list <i class="arg">weights</i></dt>
<dd><p>- List of weights, one weight per value</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::statistics::corr</b> <i class="arg">data1</i> <i class="arg">data2</i></a></dt>
<dd><p>Determine the correlation coefficient between two sets of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data1</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">data2</i></dt>
<dd><p>- Second list of data</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::math::statistics::interval-mean-stdev</b> <i class="arg">data</i> <i class="arg">confidence</i></a></dt>
<dd><p>Return the interval containing the mean value and one
containing the standard deviation with a certain
level of confidence (assuming a normal distribution)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of raw data values (small sample)</p></dd>
<dt>float <i class="arg">confidence</i></dt>
<dd><p>- Confidence level (0.95 or 0.99 for instance)</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::statistics::t-test-mean</b> <i class="arg">data</i> <i class="arg">est_mean</i> <i class="arg">est_stdev</i> <i class="arg">alpha</i></a></dt>
<dd><p>Test whether the mean value of a sample is in accordance with the
estimated normal distribution with a certain probability.
Returns 1 if the test succeeds or 0 if the mean is unlikely to fit
the given distribution.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of raw data values (small sample)</p></dd>
<dt>float <i class="arg">est_mean</i></dt>
<dd><p>- Estimated mean of the distribution</p></dd>
<dt>float <i class="arg">est_stdev</i></dt>
<dd><p>- Estimated stdev of the distribution</p></dd>
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Probability level (0.95 or 0.99 for instance)</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::statistics::test-normal</b> <i class="arg">data</i> <i class="arg">significance</i></a></dt>
<dd><p>Test whether the given data follow a normal distribution
with a certain level of significance.
Returns 1 if the data are normally distributed within the level of
significance, returns 0 if not. The underlying test is the Lilliefors
test. Smaller values of the significance mean a stricter testing.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of raw data values</p></dd>
<dt>float <i class="arg">significance</i></dt>
<dd><p>- Significance level (one of 0.01, 0.05, 0.10, 0.15 or 0.20). For compatibility
reasons the values &quot;1-significance&quot;, 0.80, 0.85, 0.90, 0.95 or 0.99 are also accepted.</p></dd>
</dl>
<p>Compatibility issue: the original implementation and documentation used the term &quot;confidence&quot; and used a value
1-significance (see ticket 2812473fff). This has been corrected as of version 0.9.3.</p></dd>
<dt><a name="17"><b class="cmd">::math::statistics::lillieforsFit</b> <i class="arg">data</i></a></dt>
<dd><p>Returns the goodness of fit to a normal distribution according to
Lilliefors. The higher the number, the more likely the data are indeed
normally distributed. The test requires at least <em>five</em> data
points.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of raw data values</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::statistics::test-Duckworth</b> <i class="arg">list1</i> <i class="arg">list2</i> <i class="arg">significance</i></a></dt>
<dd><p>Determine if two data sets have the same median according to the Tukey-Duckworth test.
The procedure returns 0 if the medians are unequal, 1 if they are equal, -1 if the test can not
be conducted (the smallest value must be in a different set than the greatest value).
#
# Arguments:
#     list1           Values in the first data set
#     list2           Values in the second data set
#     significance    Significance level (either 0.05, 0.01 or 0.001)
#
# Returns:
Test whether the given data follow a normal distribution
with a certain level of significance.
Returns 1 if the data are normally distributed within the level of
significance, returns 0 if not. The underlying test is the Lilliefors
test. Smaller values of the significance mean a stricter testing.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">list1</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">list2</i></dt>
<dd><p>- Second list of data</p></dd>
<dt>float <i class="arg">significance</i></dt>
<dd><p>- Significance level (either 0.05, 0.01 or 0.001)</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::statistics::test-anova-F</b> <i class="arg">alpha</i> <i class="arg">args</i></a></dt>
<dd><p>Determine if two or more groups with normally distributed data have the same variances.
The procedure returns 0 if the variances are likely unequal, 1 if they are. This is
a one-way ANOVA test. The groups may also be stored in a nested list:</p>
<pre class="doctools_example">
    test-anova-F 0.05 $A $B $C
    #
    # Or equivalently:
    #
    test-anova-F 0.05 [list $A $B $C]
</pre>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Significance level</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more groups of data to be checked</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">data</i> <i class="arg">confidence</i></a></dt>
<dd><p>Return the quantiles for a given set of data</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of raw data values</p></dd>
<dt>float <i class="arg">confidence</i></dt>
<dd><p>- Confidence level (0.95 or 0.99 for instance) or a list of confidence levels.</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">limits</i> <i class="arg">counts</i> <i class="arg">confidence</i></a></dt>
<dd><p>Return the quantiles based on histogram information (alternative to the
call with two arguments)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">limits</i></dt>
<dd><p>- List of upper limits from histogram</p></dd>
<dt>list <i class="arg">counts</i></dt>
<dd><p>- List of counts for for each interval in histogram</p></dd>
<dt>float <i class="arg">confidence</i></dt>
<dd><p>-  Confidence level (0.95 or 0.99 for instance) or a list of confidence levels.</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::statistics::autocorr</b> <i class="arg">data</i></a></dt>
<dd><p>Return the autocorrelation function as a list of values (assuming
equidistance between samples, about 1/2 of the number of raw data)</p>
<p>The correlation is determined in such a way that the first value is
always 1 and all others are equal to or smaller than 1. The number of
values involved will diminish as the &quot;time&quot; (the index in the list of
returned values) increases</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- Raw data for which the autocorrelation must be determined</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::statistics::crosscorr</b> <i class="arg">data1</i> <i class="arg">data2</i></a></dt>
<dd><p>Return the cross-correlation function as a list of values (assuming
equidistance between samples, about 1/2 of the number of raw data)</p>
<p>The correlation is determined in such a way that the values can never
exceed 1 in magnitude. The number of values involved will diminish
as the &quot;time&quot; (the index in the list of returned values) increases.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data1</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">data2</i></dt>
<dd><p>- Second list of data</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::statistics::mean-histogram-limits</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></dt>
<dd><p>Determine reasonable limits based on mean and standard deviation
for a histogram
Convenience function - the result is suitable for the histogram function.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean of the data</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of limits to generate (defaults to 8)</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::statistics::minmax-histogram-limits</b> <i class="arg">min</i> <i class="arg">max</i> <i class="arg">number</i></a></dt>
<dd><p>Determine reasonable limits based on a minimum and maximum for a histogram</p>
<p>Convenience function - the result is suitable for the histogram function.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>- Expected minimum</p></dd>
<dt>float <i class="arg">max</i></dt>
<dd><p>- Expected maximum</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of limits to generate (defaults to 8)</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::statistics::linear-model</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></dt>
<dd><p>Determine the coefficients for a linear regression between
two series of data (the model: Y = A + B*X). Returns a list of
parameters describing the fit</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xdata</i></dt>
<dd><p>- List of independent data</p></dd>
<dt>list <i class="arg">ydata</i></dt>
<dd><p>- List of dependent data to be fitted</p></dd>
<dt>boolean <i class="arg">intercept</i></dt>
<dd><p>- (Optional) compute the intercept (1, default) or fit
to a line through the origin (0)</p>
<p>The result consists of the following list:</p>
<ul class="doctools_itemized">
<li><p>(Estimate of) Intercept A</p></li>
<li><p>(Estimate of) Slope B</p></li>
<li><p>Standard deviation of Y relative to fit</p></li>
<li><p>Correlation coefficient R2</p></li>
<li><p>Number of degrees of freedom df</p></li>
<li><p>Standard error of the intercept A</p></li>
<li><p>Significance level of A</p></li>
<li><p>Standard error of the slope B</p></li>
<li><p>Significance level of B</p></li>
</ul></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">::math::statistics::linear-residuals</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></dt>
<dd><p>Determine the difference between actual data and predicted from
the linear model.</p>
<p>Returns a list of the differences between the actual data and the
predicted values.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xdata</i></dt>
<dd><p>- List of independent data</p></dd>
<dt>list <i class="arg">ydata</i></dt>
<dd><p>- List of dependent data to be fitted</p></dd>
<dt>boolean <i class="arg">intercept</i></dt>
<dd><p>- (Optional) compute the intercept (1, default) or fit
to a line through the origin (0)</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::statistics::test-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></dt>
<dd><p>Determine if two set of samples, each from a binomial distribution,
differ significantly or not (implying a different parameter).</p>
<p>Returns the &quot;chi-square&quot; value, which can be used to the determine the
significance.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n11</i></dt>
<dd><p>- Number of outcomes with the first value from the first sample.</p></dd>
<dt>int <i class="arg">n21</i></dt>
<dd><p>- Number of outcomes with the first value from the second sample.</p></dd>
<dt>int <i class="arg">n12</i></dt>
<dd><p>- Number of outcomes with the second value from the first sample.</p></dd>
<dt>int <i class="arg">n22</i></dt>
<dd><p>- Number of outcomes with the second value from the second sample.</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::statistics::print-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></dt>
<dd><p>Determine if two set of samples, each from a binomial distribution,
differ significantly or not (implying a different parameter).</p>
<p>Returns a short report, useful in an interactive session.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n11</i></dt>
<dd><p>- Number of outcomes with the first value from the first sample.</p></dd>
<dt>int <i class="arg">n21</i></dt>
<dd><p>- Number of outcomes with the first value from the second sample.</p></dd>
<dt>int <i class="arg">n12</i></dt>
<dd><p>- Number of outcomes with the second value from the first sample.</p></dd>
<dt>int <i class="arg">n22</i></dt>
<dd><p>- Number of outcomes with the second value from the second sample.</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd">::math::statistics::control-xbar</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></dt>
<dd><p>Determine the control limits for an xbar chart. The number of data
in each subsample defaults to 4. At least 20 subsamples are required.</p>
<p>Returns the mean, the lower limit, the upper limit and the number of
data per subsample.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
<dt>int <i class="arg">nsamples</i></dt>
<dd><p>- Number of data per subsample</p></dd>
</dl></dd>
<dt><a name="31"><b class="cmd">::math::statistics::control-Rchart</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></dt>
<dd><p>Determine the control limits for an R chart. The number of data
in each subsample (nsamples) defaults to 4. At least 20 subsamples are required.</p>
<p>Returns the mean range, the lower limit, the upper limit and the number
of data per subsample.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
<dt>int <i class="arg">nsamples</i></dt>
<dd><p>- Number of data per subsample</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">::math::statistics::test-xbar</b> <i class="arg">control</i> <i class="arg">data</i></a></dt>
<dd><p>Determine if the data exceed the control limits for the xbar chart.</p>
<p>Returns a list of subsamples (their indices) that indeed violate the
limits.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">control</i></dt>
<dd><p>- Control limits as returned by the &quot;control-xbar&quot; procedure</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
</dl></dd>
<dt><a name="33"><b class="cmd">::math::statistics::test-Rchart</b> <i class="arg">control</i> <i class="arg">data</i></a></dt>
<dd><p>Determine if the data exceed the control limits for the R chart.</p>
<p>Returns a list of subsamples (their indices) that indeed violate the
limits.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">control</i></dt>
<dd><p>- Control limits as returned by the &quot;control-Rchart&quot; procedure</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">::math::statistics::test-Kruskal-Wallis</b> <i class="arg">confidence</i> <i class="arg">args</i></a></dt>
<dd><p>Check if the population medians of two or more groups are equal with a
given confidence level, using the Kruskal-Wallis test.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">confidence</i></dt>
<dd><p>- Confidence level to be used (0-1)</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more lists of data</p></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">::math::statistics::analyse-Kruskal-Wallis</b> <i class="arg">args</i></a></dt>
<dd><p>Compute the statistical parameters for the Kruskal-Wallis test.
Returns the Kruskal-Wallis statistic and the probability that that
value would occur assuming the medians of the populations are
equal.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more lists of data</p></dd>
</dl></dd>
<dt><a name="36"><b class="cmd">::math::statistics::group-rank</b> <i class="arg">args</i></a></dt>
<dd><p>Rank the groups of data with respect to the complete set.
Returns a list consisting of the group ID, the value and the rank
(possibly a rational number, in case of ties) for each data item.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more lists of data</p></dd>
</dl></dd>
<dt><a name="37"><b class="cmd">::math::statistics::test-Wilcoxon</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></dt>
<dd><p>Compute the Wilcoxon test statistic to determine if two samples have the
same median or not. (The statistic can be regarded as standard normal, if the
sample sizes are both larger than 10. Returns the value of this statistic.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">sample_a</i></dt>
<dd><p>- List of data comprising the first sample</p></dd>
<dt>list <i class="arg">sample_b</i></dt>
<dd><p>- List of data comprising the second sample</p></dd>
</dl></dd>
<dt><a name="38"><b class="cmd">::math::statistics::spearman-rank</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></dt>
<dd><p>Return the Spearman rank correlation as an alternative to the ordinary (Pearson's) correlation
coefficient. The two samples should have the same number of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">sample_a</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">sample_b</i></dt>
<dd><p>- Second list of data</p></dd>
</dl></dd>
<dt><a name="39"><b class="cmd">::math::statistics::spearman-rank-extended</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></dt>
<dd><p>Return the Spearman rank correlation as an alternative to the ordinary (Pearson's) correlation
coefficient as well as additional data. The two samples should have the same number of data.
The procedure returns the correlation coefficient, the number of data pairs used and the
z-score, an approximately standard normal statistic, indicating the significance of the correlation.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">sample_a</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">sample_b</i></dt>
<dd><p>- Second list of data</p></dd>
</dl></dd>
<dt><a name="40"><b class="cmd">::math::statistics::kernel-density</b> <i class="arg">data</i> opt <i class="arg">-option value</i> ...</a></dt>
<dd><p>]
Return the density function based on kernel density estimation. The procedure is controlled by
a small set of options, each of which is given a reasonable default.</p>
<p>The return value consists of three lists: the centres of the bins, the associated probability
density and a list of computational parameters (begin and end of the interval, mean and standard
deviation and the used bandwidth). The computational parameters can be used for further analysis.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- The data to be examined</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>- Option-value pairs:</p>
<dl class="doctools_definitions">
<dt><b class="option">-weights</b> <i class="arg">weights</i></dt>
<dd><p>Per data point the weight (default: 1 for all data)</p></dd>
<dt><b class="option">-bandwidth</b> <i class="arg">value</i></dt>
<dd><p>Bandwidth to be used for the estimation (default: determined from standard deviation)</p></dd>
<dt><b class="option">-number</b> <i class="arg">value</i></dt>
<dd><p>Number of bins to be returned (default: 100)</p></dd>
<dt><b class="option">-interval</b> <i class="arg">{begin end}</i></dt>
<dd><p>Begin and end of the interval for
which the density is returned (default: mean +/- 3*standard deviation)</p></dd>
<dt><b class="option">-kernel</b> <i class="arg">function</i></dt>
<dd><p>Kernel to be used (One of: gaussian, cosine,
epanechnikov, uniform, triangular, biweight, logistic; default: gaussian)</p></dd>
</dl></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">MULTIVARIATE LINEAR REGRESSION</a></h2>
<p>Besides the linear regression with a single independent variable, the
statistics package provides two procedures for doing ordinary
least squares (OLS) and weighted least squares (WLS) linear regression
with several variables. They were written by Eric Kemp-Benedict.</p>
<p>In addition to these two, it provides a procedure (tstat)
for calculating the value of the t-statistic for the specified number of
degrees of freedom that is required to demonstrate a given level of
significance.</p>
<p>Note: These procedures depend on the math::linearalgebra package.</p>
<p><em>Description of the procedures</em></p>
<dl class="doctools_definitions">
<dt><a name="41"><b class="cmd">::math::statistics::tstat</b> <i class="arg">dof</i> <span class="opt">?alpha?</span></a></dt>
<dd><p>Returns the value of the t-distribution t* satisfying</p>
<pre class="doctools_example">
    P(t*)  =  1 - alpha/2
    P(-t*) =  alpha/2
</pre>
<p>for the number of degrees of freedom dof.</p>
<p>Given a sample of normally-distributed data x, with an
estimate xbar for the mean and sbar for the standard deviation,
the alpha confidence interval for the estimate of the mean can
be calculated as</p>
<pre class="doctools_example">
      ( xbar - t* sbar , xbar + t* sbar)
</pre>
<p>The return values from this procedure can be compared to
an estimated t-statistic to determine whether the estimated
value of a parameter is significantly different from zero at
the given confidence level.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">dof</i></dt>
<dd><p>Number of degrees of freedom</p></dd>
<dt>float <i class="arg">alpha</i></dt>
<dd><p>Confidence level of the t-distribution. Defaults to 0.05.</p></dd>
</dl></dd>
<dt><a name="42"><b class="cmd">::math::statistics::mv-wls</b> <i class="arg">wt1</i> <i class="arg">weights_and_values</i></a></dt>
<dd><p>Carries out a weighted least squares linear regression for
the data points provided, with weights assigned to each point.</p>
<p>The linear model is of the form</p>
<pre class="doctools_example">
    y = b0 + b1 * x1 + b2 * x2 ... + bN * xN + error
</pre>
<p>and each point satisfies</p>
<pre class="doctools_example">
    yi = b0 + b1 * xi1 + b2 * xi2 + ... + bN * xiN + Residual_i
</pre>
<p>The procedure returns a list with the following elements:</p>
<ul class="doctools_itemized">
<li><p>The r-squared statistic</p></li>
<li><p>The adjusted r-squared statistic</p></li>
<li><p>A list containing the estimated coefficients b1, ... bN, b0
(The constant b0 comes last in the list.)</p></li>
<li><p>A list containing the standard errors of the coefficients</p></li>
<li><p>A list containing the 95% confidence bounds of the coefficients,
with each set of bounds returned as a list with two values</p></li>
</ul>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">weights_and_values</i></dt>
<dd><p>A list consisting of: the weight for the first observation, the data
for the first observation (as a sublist), the weight for the second
observation (as a sublist) and so on. The sublists of data are organised
as lists of the value of the dependent variable y and the independent
variables x1, x2 to xN.</p></dd>
</dl></dd>
<dt><a name="43"><b class="cmd">::math::statistics::mv-ols</b> <i class="arg">values</i></a></dt>
<dd><p>Carries out an ordinary least squares linear regression for
the data points provided.</p>
<p>This procedure simply calls ::mvlinreg::wls with the weights
set to 1.0, and returns the same information.</p></dd>
</dl>
<p><em>Example of the use:</em></p>
<pre class="doctools_example">
# Store the value of the unicode value for the &quot;+/-&quot; character
set pm &quot;\u00B1&quot;
# Provide some data
set data {{  -.67  14.18  60.03 -7.5  }
          { 36.97  15.52  34.24 14.61 }
          {-29.57  21.85  83.36 -7.   }
          {-16.9   11.79  51.67 -6.56 }
          { 14.09  16.24  36.97 -12.84}
          { 31.52  20.93  45.99 -25.4 }
          { 24.05  20.69  50.27  17.27}
          { 22.23  16.91  45.07  -4.3 }
          { 40.79  20.49  38.92  -.73 }
          {-10.35  17.24  58.77  18.78}}
# Call the ols routine
set results [::math::statistics::mv-ols $data]
# Pretty-print the results
puts &quot;R-squared: [lindex $results 0]&quot;
puts &quot;Adj R-squared: [lindex $results 1]&quot;
puts &quot;Coefficients $pm s.e. -- \[95% confidence interval\]:&quot;
foreach val [lindex $results 2] se [lindex $results 3] bounds [lindex $results 4] {
    set lb [lindex $bounds 0]
    set ub [lindex $bounds 1]
    puts &quot;   $val $pm $se -- \[$lb to $ub\]&quot;
}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">STATISTICAL DISTRIBUTIONS</a></h2>
<p>In the literature a large number of probability distributions can be
found. The statistics package supports:</p>
<ul class="doctools_itemized">
<li><p>The normal or Gaussian distribution as well as the log-normal distribution</p></li>
<li><p>The uniform distribution - equal probability for all data within a given
interval</p></li>
<li><p>The exponential distribution - useful as a model for certain
extreme-value distributions.</p></li>
<li><p>The gamma distribution - based on the incomplete Gamma integral</p></li>
<li><p>The beta distribution</p></li>
<li><p>The chi-square distribution</p></li>
<li><p>The student's T distribution</p></li>
<li><p>The Poisson distribution</p></li>
<li><p>The Pareto distribution</p></li>
<li><p>The Gumbel distribution</p></li>
<li><p>The Weibull distribution</p></li>
<li><p>The Cauchy distribution</p></li>
<li><p>The F distribution (only the cumulative density function)</p></li>
<li><p>PM - binomial.</p></li>
</ul>
<p>In principle for each distribution one has procedures for:</p>
<ul class="doctools_itemized">
<li><p>The probability density (pdf-*)</p></li>
<li><p>The cumulative density (cdf-*)</p></li>
<li><p>Quantiles for the given distribution (quantiles-*)</p></li>
<li><p>Histograms for the given distribution (histogram-*)</p></li>
<li><p>List of random values with the given distribution (random-*)</p></li>
</ul>
<p>The following procedures have been implemented:</p>
<dl class="doctools_definitions">
<dt><a name="44"><b class="cmd">::math::statistics::pdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a normal distribution with
given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="45"><b class="cmd">::math::statistics::pdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a log-normal distribution with
given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="46"><b class="cmd">::math::statistics::pdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for an exponential
distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="47"><b class="cmd">::math::statistics::pdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a uniform
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="48"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Gamma
distribution with given shape and rate parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">beta</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="49"><b class="cmd">::math::statistics::pdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></dt>
<dd><p>Return the probability of a given number of occurrences in the same
interval (k) for a Poisson distribution with given mean (mu)</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mu</i></dt>
<dd><p>- Mean number of occurrences</p></dd>
<dt>int <i class="arg">k</i></dt>
<dd><p>- Number of occurences</p></dd>
</dl></dd>
<dt><a name="50"><b class="cmd">::math::statistics::pdf-chisquare</b> <i class="arg">df</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a chi square
distribution with given degrees of freedom</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="51"><b class="cmd">::math::statistics::pdf-student-t</b> <i class="arg">df</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Student's t
distribution with given degrees of freedom</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="52"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Gamma
distribution with given shape and rate parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="53"><b class="cmd">::math::statistics::pdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Beta
distribution with given shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="54"><b class="cmd">::math::statistics::pdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Weibull
distribution with given scale and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="55"><b class="cmd">::math::statistics::pdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Gumbel
distribution with given location and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="56"><b class="cmd">::math::statistics::pdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Pareto
distribution with given scale and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="57"><b class="cmd">::math::statistics::pdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Cauchy
distribution with given location and shape parameters. Note that the Cauchy distribution
has no finite higher-order moments.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="58"><b class="cmd">::math::statistics::cdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a normal
distribution with given mean and standard deviation, that is the
probability for values up to the given one.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="59"><b class="cmd">::math::statistics::cdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a log-normal
distribution with given mean and standard deviation, that is the
probability for values up to the given one.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="60"><b class="cmd">::math::statistics::cdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for an exponential
distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="61"><b class="cmd">::math::statistics::cdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a uniform
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="62"><b class="cmd">::math::statistics::cdf-students-t</b> <i class="arg">degrees</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Student's t
distribution with given number of degrees.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">degrees</i></dt>
<dd><p>- Number of degrees of freedom</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="63"><b class="cmd">::math::statistics::cdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Gamma
distribution with given shape and rate parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">beta</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the cumulative probability is required</p></dd>
</dl></dd>
<dt><a name="64"><b class="cmd">::math::statistics::cdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></dt>
<dd><p>Return the cumulative probability of a given number of occurrences in
the same interval (k) for a Poisson distribution with given mean (mu).</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mu</i></dt>
<dd><p>- Mean number of occurrences</p></dd>
<dt>int <i class="arg">k</i></dt>
<dd><p>- Number of occurences</p></dd>
</dl></dd>
<dt><a name="65"><b class="cmd">::math::statistics::cdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Beta
distribution with given shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="66"><b class="cmd">::math::statistics::cdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Weibull
distribution with given scale and shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="67"><b class="cmd">::math::statistics::cdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Gumbel
distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="68"><b class="cmd">::math::statistics::cdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Pareto
distribution with given scale and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="69"><b class="cmd">::math::statistics::cdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Cauchy
distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="70"><b class="cmd">::math::statistics::cdf-F</b> <i class="arg">nf1</i> <i class="arg">nf2</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for an F
distribution with nf1 and nf2 degrees of freedom.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">nf1</i></dt>
<dd><p>- Degrees of freedom for the numerator</p></dd>
<dt>float <i class="arg">nf2</i></dt>
<dd><p>- Degrees of freedom for the denominator</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="71"><b class="cmd">::math::statistics::empirical-distribution</b> <i class="arg">values</i></a></dt>
<dd><p>Return a list of values and their empirical probability. The values are sorted in increasing order.
(The implementation follows the description at the corresponding Wikipedia page)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>- List of data to be examined</p></dd>
</dl></dd>
<dt><a name="72"><b class="cmd">::math::statistics::random-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a normal
distribution with given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="73"><b class="cmd">::math::statistics::random-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a log-normal
distribution with given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="74"><b class="cmd">::math::statistics::random-exponential</b> <i class="arg">mean</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying an exponential
distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="75"><b class="cmd">::math::statistics::random-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a uniform
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="76"><b class="cmd">::math::statistics::random-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Gamma distribution with given shape and rate parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">beta</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="77"><b class="cmd">::math::statistics::random-poisson</b> <i class="arg">mu</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Poisson distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mu</i></dt>
<dd><p>- Mean of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="78"><b class="cmd">::math::statistics::random-chisquare</b> <i class="arg">df</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a chi square distribution with given degrees of freedom.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="79"><b class="cmd">::math::statistics::random-student-t</b> <i class="arg">df</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Student's t distribution with given degrees of freedom.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="80"><b class="cmd">::math::statistics::random-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Beta distribution with given shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="81"><b class="cmd">::math::statistics::random-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Weibull distribution with given scale and shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="82"><b class="cmd">::math::statistics::random-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Gumbel distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="83"><b class="cmd">::math::statistics::random-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Pareto distribution with given scale and shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="84"><b class="cmd">::math::statistics::random-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Cauchy distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="85"><b class="cmd">::math::statistics::histogram-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">limits</i> <i class="arg">number</i></a></dt>
<dd><p>Return the expected histogram for a uniform distribution.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>list <i class="arg">limits</i></dt>
<dd><p>- Upper limits for the buckets in the histogram</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Total number of &quot;observations&quot; in the histogram</p></dd>
</dl></dd>
<dt><a name="86"><b class="cmd">::math::statistics::incompleteGamma</b> <i class="arg">x</i> <i class="arg">p</i> <span class="opt">?tol?</span></a></dt>
<dd><p>Evaluate the incomplete Gamma integral</p>
<pre class="doctools_example">
                    1       / x               p-1
      P(p,x) =  --------   |   dt exp(-t) * t
                Gamma(p)  / 0
</pre>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>- Value of x (limit of the integral)</p></dd>
<dt>float <i class="arg">p</i></dt>
<dd><p>- Value of p in the integrand</p></dd>
<dt>float <i class="arg">tol</i></dt>
<dd><p>- Required tolerance (default: 1.0e-9)</p></dd>
</dl></dd>
<dt><a name="87"><b class="cmd">::math::statistics::incompleteBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i> <span class="opt">?tol?</span></a></dt>
<dd><p>Evaluate the incomplete Beta integral</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>- Value of x (limit of the integral)</p></dd>
<dt>float <i class="arg">tol</i></dt>
<dd><p>- Required tolerance (default: 1.0e-9)</p></dd>
</dl></dd>
<dt><a name="88"><b class="cmd">::math::statistics::estimate-pareto</b> <i class="arg">values</i></a></dt>
<dd><p>Estimate the parameters for the Pareto distribution that comes closest to the given values.
Returns the estimated scale and shape parameters, as well as the standard error for the shape parameter.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>- List of values, assumed to be distributed according to a Pareto distribution</p></dd>
</dl></dd>
</dl>
<p>TO DO: more function descriptions to be added</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">DATA MANIPULATION</a></h2>
<p>The data manipulation procedures act on lists or lists of lists:</p>
<dl class="doctools_definitions">
<dt><a name="89"><b class="cmd">::math::statistics::filter</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></dt>
<dd><p>Return a list consisting of the data for which the logical
expression is true (this command works analogously to the command <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b>).</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">varname</i></dt>
<dd><p>- Name of the variable used in the expression</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
<dt>string <i class="arg">expression</i></dt>
<dd><p>- Logical expression using the variable name</p></dd>
</dl></dd>
<dt><a name="90"><b class="cmd">::math::statistics::map</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></dt>
<dd><p>Return a list consisting of the data that are transformed via the
expression.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">varname</i></dt>
<dd><p>- Name of the variable used in the expression</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
<dt>string <i class="arg">expression</i></dt>
<dd><p>- Expression to be used to transform (map) the data</p></dd>
</dl></dd>
<dt><a name="91"><b class="cmd">::math::statistics::samplescount</b> <i class="arg">varname</i> <i class="arg">list</i> <i class="arg">expression</i></a></dt>
<dd><p>Return a list consisting of the <i class="term">counts</i> of all data in the
sublists of the &quot;list&quot; argument for which the expression is true.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">varname</i></dt>
<dd><p>- Name of the variable used in the expression</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of sublists, each containing the data</p></dd>
<dt>string <i class="arg">expression</i></dt>
<dd><p>- Logical expression to test the data (defaults to
&quot;true&quot;).</p></dd>
</dl></dd>
<dt><a name="92"><b class="cmd">::math::statistics::subdivide</b></a></dt>
<dd><p>Routine <em>PM</em> - not implemented yet</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PLOT PROCEDURES</a></h2>
<p>The following simple plotting procedures are available:</p>
<dl class="doctools_definitions">
<dt><a name="93"><b class="cmd">::math::statistics::plot-scale</b> <i class="arg">canvas</i> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">ymin</i> <i class="arg">ymax</i></a></dt>
<dd><p>Set the scale for a plot in the given canvas. All plot routines expect
this function to be called first. There is no automatic scaling
provided.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum x value</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum x value</p></dd>
<dt>float <i class="arg">ymin</i></dt>
<dd><p>- Minimum y value</p></dd>
<dt>float <i class="arg">ymax</i></dt>
<dd><p>- Maximum y value</p></dd>
</dl></dd>
<dt><a name="94"><b class="cmd">::math::statistics::plot-xydata</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a collection of dots. The tag can be used to manipulate the
appearance.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>float <i class="arg">xdata</i></dt>
<dd><p>- Series of independent data</p></dd>
<dt>float <i class="arg">ydata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="95"><b class="cmd">::math::statistics::plot-xyline</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a line through the data points. The tag can be used to
manipulate the appearance.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">xdata</i></dt>
<dd><p>- Series of independent data</p></dd>
<dt>list <i class="arg">ydata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="96"><b class="cmd">::math::statistics::plot-tdata</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a collection of dots. The horizontal coordinate is equal to the
index. The tag can be used to manipulate the appearance.
This type of presentation is suitable for autocorrelation functions for
instance or for inspecting the time-dependent behaviour.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">tdata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="97"><b class="cmd">::math::statistics::plot-tline</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a line. See plot-tdata for an explanation.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">tdata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="98"><b class="cmd">::math::statistics::plot-histogram</b> <i class="arg">canvas</i> <i class="arg">counts</i> <i class="arg">limits</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple histogram in the given canvas</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">counts</i></dt>
<dd><p>- Series of bucket counts</p></dd>
<dt>list <i class="arg">limits</i></dt>
<dd><p>- Series of upper limits for the buckets</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
</dl>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">THINGS TO DO</a></h2>
<p>The following procedures are yet to be implemented:</p>
<ul class="doctools_itemized">
<li><p>F-test-stdev</p></li>
<li><p>interval-mean-stdev</p></li>
<li><p>histogram-normal</p></li>
<li><p>histogram-exponential</p></li>
<li><p>test-histogram</p></li>
<li><p>test-corr</p></li>
<li><p>quantiles-*</p></li>
<li><p>fourier-coeffs</p></li>
<li><p>fourier-residuals</p></li>
<li><p>onepar-function-fit</p></li>
<li><p>onepar-function-residuals</p></li>
<li><p>plot-linear-model</p></li>
<li><p>subdivide</p></li>
</ul>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">EXAMPLES</a></h2>
<p>The code below is a small example of how you can examine a set of
data:</p>
<pre class="doctools_example">
# Simple example:
# - Generate data (as a cheap way of getting some)
# - Perform statistical analysis to describe the data
#
package require math::statistics
#
# Two auxiliary procs
#
proc pause {time} {
   set wait 0
   after [expr {$time*1000}] {set ::wait 1}
   vwait wait
}
proc print-histogram {counts limits} {
   foreach count $counts limit $limits {
      if { $limit != {} } {
         puts [format &quot;&lt;%12.4g\t%d&quot; $limit $count]
         set prev_limit $limit
      } else {
         puts [format &quot;&gt;%12.4g\t%d&quot; $prev_limit $count]
      }
   }
}
#
# Our source of arbitrary data
#
proc generateData { data1 data2 } {
   upvar 1 $data1 _data1
   upvar 1 $data2 _data2
   set d1 0.0
   set d2 0.0
   for { set i 0 } { $i &lt; 100 } { incr i } {
      set d1 [expr {10.0-2.0*cos(2.0*3.1415926*$i/24.0)+3.5*rand()}]
      set d2 [expr {0.7*$d2+0.3*$d1+0.7*rand()}]
      lappend _data1 $d1
      lappend _data2 $d2
   }
   return {}
}
#
# The analysis session
#
package require Tk
console show
canvas .plot1
canvas .plot2
pack   .plot1 .plot2 -fill both -side top
generateData data1 data2
puts &quot;Basic statistics:&quot;
set b1 [::math::statistics::basic-stats $data1]
set b2 [::math::statistics::basic-stats $data2]
foreach label {mean min max number stdev var} v1 $b1 v2 $b2 {
   puts &quot;$label\t$v1\t$v2&quot;
}
puts &quot;Plot the data as function of \&quot;time\&quot; and against each other&quot;
::math::statistics::plot-scale .plot1  0 100  0 20
::math::statistics::plot-scale .plot2  0 20   0 20
::math::statistics::plot-tline .plot1 $data1
::math::statistics::plot-tline .plot1 $data2
::math::statistics::plot-xydata .plot2 $data1 $data2
puts &quot;Correlation coefficient:&quot;
puts [::math::statistics::corr $data1 $data2]
pause 2
puts &quot;Plot histograms&quot;
.plot2 delete all
::math::statistics::plot-scale .plot2  0 20 0 100
set limits         [::math::statistics::minmax-histogram-limits 7 16]
set histogram_data [::math::statistics::histogram $limits $data1]
::math::statistics::plot-histogram .plot2 $histogram_data $limits
puts &quot;First series:&quot;
print-histogram $histogram_data $limits
pause 2
set limits         [::math::statistics::minmax-histogram-limits 0 15 10]
set histogram_data [::math::statistics::histogram $limits $data2]
::math::statistics::plot-histogram .plot2 $histogram_data $limits d2
.plot2 itemconfigure d2 -fill red
puts &quot;Second series:&quot;
print-histogram $histogram_data $limits
puts &quot;Autocorrelation function:&quot;
set  autoc [::math::statistics::autocorr $data1]
puts [::math::statistics::map $autoc {[format &quot;%.2f&quot; $x]}]
puts &quot;Cross-correlation function:&quot;
set  crossc [::math::statistics::crosscorr $data1 $data2]
puts [::math::statistics::map $crossc {[format &quot;%.2f&quot; $x]}]
::math::statistics::plot-scale .plot1  0 100 -1  4
::math::statistics::plot-tline .plot1  $autoc &quot;autoc&quot;
::math::statistics::plot-tline .plot1  $crossc &quot;crossc&quot;
.plot1 itemconfigure autoc  -fill green
.plot1 itemconfigure crossc -fill yellow
puts &quot;Quantiles: 0.1, 0.2, 0.5, 0.8, 0.9&quot;
puts &quot;First:  [::math::statistics::quantiles $data1 {0.1 0.2 0.5 0.8 0.9}]&quot;
puts &quot;Second: [::math::statistics::quantiles $data2 {0.1 0.2 0.5 0.8 0.9}]&quot;
</pre>
<p>If you run this example, then the following should be clear:</p>
<ul class="doctools_itemized">
<li><p>There is a strong correlation between two time series, as displayed by
the raw data and especially by the correlation functions.</p></li>
<li><p>Both time series show a significant periodic component</p></li>
<li><p>The histograms are not very useful in identifying the nature of the time
series - they do not show the periodic nature.</p></li>
</ul>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: statistics</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key630">data analysis</a>, <a href="../../../../index.html#key629">mathematics</a>, <a href="../../../../index.html#key195">statistics</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/math/symdiff.html.





























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206

<div class='fossil-doc' data-title='math::calculus::symdiff - Symbolic differentiation for Tcl'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::calculus::symdiff(n) 1.0.1 tcllib &quot;Symbolic differentiation for Tcl&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::calculus::symdiff - Symbolic differentiation for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Procedures</a></li>
<li class="doctools_section"><a href="#section3">Expressions</a></li>
<li class="doctools_section"><a href="#section4">Examples</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">grammar::aycock 1.0</b></li>
<li>package require <b class="pkgname">math::calculus::symdiff 1.0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">math::calculus::symdiff::symdiff</b> <i class="arg">expression</i> <i class="arg">variable</i></a></li>
<li><a href="#2"><b class="cmd">math::calculus::jacobian</b> <i class="arg">variableDict</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">math::calculus::symdiff</b> package provides a symbolic differentiation
facility for Tcl math expressions. It is useful for providing derivatives
to packages that either require the Jacobian of a set of functions or else
are more efficient or stable when the Jacobian is provided.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Procedures</a></h2>
<p>The <b class="cmd">math::calculus::symdiff</b> package exports the two procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">math::calculus::symdiff::symdiff</b> <i class="arg">expression</i> <i class="arg">variable</i></a></dt>
<dd><p>Differentiates the given <i class="arg">expression</i> with respect to the specified
<i class="arg">variable</i>. (See <span class="sectref"><a href="#section3">Expressions</a></span> below for a discussion of the
subset of Tcl math expressions that are acceptable to
<b class="cmd">math::calculus::symdiff</b>.)
The result is a Tcl expression that evaluates the derivative. Returns an
error if <i class="arg">expression</i> is not a well-formed expression or is not
differentiable.</p></dd>
<dt><a name="2"><b class="cmd">math::calculus::jacobian</b> <i class="arg">variableDict</i></a></dt>
<dd><p>Computes the Jacobian of a system of equations.
The system is given by the dictionary <i class="arg">variableDict</i>, whose keys
are the names of variables in the system, and whose values are Tcl expressions
giving the values of those variables. (See <span class="sectref"><a href="#section3">Expressions</a></span> below
for a discussion of the subset of Tcl math expressions that are acceptable
to <b class="cmd">math::calculus::symdiff</b>. The result is a list of lists:
the i'th element of the j'th sublist is the partial derivative of
the i'th variable with respect to the j'th variable. Returns an error if
any of the expressions cannot be differentiated, or if <i class="arg">variableDict</i>
is not a well-formed dictionary.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Expressions</a></h2>
<p>The <b class="cmd">math::calculus::symdiff</b> package accepts only a small subset of the expressions
that are acceptable to Tcl commands such as <b class="cmd">expr</b> or <b class="cmd">if</b>.
Specifically, the only constructs accepted are:</p>
<ul class="doctools_itemized">
<li><p>Floating-point constants such as <b class="const">5</b> or <b class="const">3.14159e+00</b>.</p></li>
<li><p>References to Tcl variable using $-substitution. The variable names
must consist of alphanumerics and underscores: the <b class="const">${...}</b> notation
is not accepted.</p></li>
<li><p>Parentheses.</p></li>
<li><p>The <b class="const">+</b>, <b class="const">-</b>, <b class="const">*</b>, <b class="const">/</b>. and <b class="const">**</b>
operators.</p></li>
<li><p>Calls to the functions <b class="cmd">acos</b>, <b class="cmd">asin</b>, <b class="cmd">atan</b>,
<b class="cmd">atan2</b>, <b class="cmd">cos</b>, <b class="cmd">cosh</b>, <b class="cmd">exp</b>, <b class="cmd">hypot</b>, <b class="cmd"><a href="../log/log.html">log</a></b>,
<b class="cmd">log10</b>, <b class="cmd">pow</b>, <b class="cmd">sin</b>, <b class="cmd">sinh</b>. <b class="cmd">sqrt</b>, <b class="cmd">tan</b>,
and <b class="cmd">tanh</b>.</p></li>
</ul>
<p>Command substitution, backslash substitution, and argument expansion are
not accepted.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Examples</a></h2>
<pre class="doctools_example">
math::calculus::symdiff::symdiff {($a*$x+$b)*($c*$x+$d)} x
==&gt; (($c * (($a * $x) + $b)) + ($a * (($c * $x) + $d)))
math::calculus::symdiff::jacobian {x {$a * $x + $b * $y}
                         y {$c * $x + $d * $y}}
==&gt; {{$a} {$b}} {{$c} {$d}}
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: calculus</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="calculus.html">math::calculus</a>, <a href="interpolate.html">math::interpolate</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010 by Kevin B. Kenny &lt;kennykb@acm.org&gt;<br>
Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/md4/md4.html.







































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259

<div class='fossil-doc' data-title='md4 - MD4 Message-Digest Algorithm'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">md4(n) 1.0.6 tcllib &quot;MD4 Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>md4 - MD4 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">md4 <span class="opt">?1.0.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::md4::md4</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::md4::hmac</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::md4::MD4Init</b></a></li>
<li><a href="#4"><b class="cmd">::md4::MD4Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::md4::MD4Final</b> <i class="arg">token</i></a></li>
<li><a href="#6"><b class="cmd">::md4::HMACInit</b> <i class="arg">key</i></a></li>
<li><a href="#7"><b class="cmd">::md4::HMACUpdate</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#8"><b class="cmd">::md4::HMACFinal</b> <i class="arg">token</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is an implementation in Tcl of the MD4 message-digest
algorithm as described in RFC 1320 (1) and (2). This algorithm takes
an arbitrary quantity of data and generates a 128-bit message digest
from the input. The MD4 algorithm is faster but potentially weaker than
the related MD5 algorithm (3).</p>
<p>If you have <b class="package">critcl</b> and have built the <b class="package">tcllibc</b> package
then the implementation of the hashing function will be performed by compiled
code. Alternatively if <b class="package">cryptkit</b> is available this will be
used. If no accelerator package can be found then the pure-tcl
implementation is used. The programming interface remains the same in
all cases.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::md4::md4</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>Calculate the MD4 digest of the data given in string. This is returned
as a binary string by default. Giving the <i class="arg">-hex</i> option will
return a hexadecimal encoded version of the digest.</p>
<p>The data to be hashed can be specified either as a string argument to
the md4 command, or as a filename or a pre-opened channel. If the
<i class="arg">-filename</i> argument is given then the file is opened, the data read
and hashed and the file is closed. If the <i class="arg">-channel</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed.</p>
<p>Only one of <i class="arg">-file</i>, <i class="arg">-channel</i> or <i class="arg">string</i> should be given.</p></dd>
<dt><a name="2"><b class="cmd">::md4::hmac</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>Calculate an Hashed Message Authentication digest (HMAC) using the MD4
digest algorithm. HMACs are described in RFC 2104 (4) and provide an MD4
digest that includes a key. All options other than <i class="arg">-key</i> are as
for the <b class="cmd">::md4::md4</b> command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROGRAMMING INTERFACE</a></h2>
<p>For the programmer, the MD4 hash can be viewed as a bucket into which
one pours data. When you have finished, you extract a value that is
derived from the data that was poured into the bucket. The programming
interface to the MD4 hash operates on a token (equivalent to the
bucket). You call <b class="cmd">MD4Init</b> to obtain a token and then call
<b class="cmd">MD4Update</b> as many times as required to add data to the hash. To
release any resources and obtain the hash value, you then call
<b class="cmd">MD4Final</b>. An equivalent set of functions gives you a keyed digest (HMAC).</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">::md4::MD4Init</b></a></dt>
<dd><p>Begins a new MD4 hash. Returns a token ID that must be used for the
remaining functions.</p></dd>
<dt><a name="4"><b class="cmd">::md4::MD4Update</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd><p>Add data to the hash identified by token. Calling
<em>MD4Update $token &quot;abcd&quot;</em> is equivalent to calling
<em>MD4Update $token &quot;ab&quot;</em> followed by
<em>MD4Update $token &quot;cb&quot;</em>. See <span class="sectref"><a href="#section4">EXAMPLES</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::md4::MD4Final</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the hash value and releases any resources held by this
token. Once this command completes the token will be invalid. The
result is a binary string of 16 bytes representing the 128 bit MD4
digest value.</p></dd>
<dt><a name="6"><b class="cmd">::md4::HMACInit</b> <i class="arg">key</i></a></dt>
<dd><p>This is equivalent to the <b class="cmd">::md4::MD4Init</b> command except that
it requires the key that will be included in the HMAC.</p></dd>
<dt><a name="7"><b class="cmd">::md4::HMACUpdate</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd></dd>
<dt><a name="8"><b class="cmd">::md4::HMACFinal</b> <i class="arg">token</i></a></dt>
<dd><p>These commands are identical to the MD4 equivalent commands.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% md4::md4 -hex &quot;Tcl does MD4&quot;
858da9b31f57648a032230447bd15f25
</pre>
<pre class="doctools_example">
% md4::hmac -hex -key Sekret &quot;Tcl does MD4&quot;
c324088e5752872689caedf2a0464758
</pre>
<pre class="doctools_example">
% set tok [md4::MD4Init]
::md4::1
% md4::MD4Update $tok &quot;Tcl &quot;
% md4::MD4Update $tok &quot;does &quot;
% md4::MD4Update $tok &quot;MD4&quot;
% md4::Hex [md4::MD4Final $tok]
858da9b31f57648a032230447bd15f25
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Rivest, R., &quot;The MD4 Message Digest Algorithm&quot;, RFC 1320, MIT,
       April 1992. (<a href="http://www.rfc-editor.org/rfc/rfc1320.txt">http://www.rfc-editor.org/rfc/rfc1320.txt</a>)</p></li>
<li><p>Rivest, R., &quot;The MD4 message digest algorithm&quot;, in A.J.  Menezes
       and S.A. Vanstone, editors, Advances in Cryptology - CRYPTO '90
       Proceedings, pages 303-311, Springer-Verlag, 1991.</p></li>
<li><p>Rivest, R., &quot;The MD5 Message-Digest Algorithm&quot;, RFC 1321, MIT and
       RSA Data Security, Inc, April 1992.
	(<a href="http://www.rfc-editor.org/rfc/rfc1321.txt">http://www.rfc-editor.org/rfc/rfc1321.txt</a>)</p></li>
<li><p>Krawczyk, H., Bellare, M. and Canetti, R. &quot;HMAC: Keyed-Hashing for
      Message Authentication&quot;, RFC 2104, February 1997.
	(<a href="http://www.rfc-editor.org/rfc/rfc2104.txt">http://www.rfc-editor.org/rfc/rfc2104.txt</a>)</p></li>
</ol>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>md4</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md5/md5.html">md5</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key380">md4</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key379">rfc 1320</a>, <a href="../../../../index.html#key381">rfc 1321</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/md5/md5.html.

















































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<div class='fossil-doc' data-title='md5 - MD5 Message-Digest Algorithm'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">md5(n) 2.0.7 tcllib &quot;MD5 Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>md5 - MD5 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">md5 <span class="opt">?2.0.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::md5::md5</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::md5::hmac</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::md5::MD5Init</b></a></li>
<li><a href="#4"><b class="cmd">::md5::MD5Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::md5::MD5Final</b> <i class="arg">token</i></a></li>
<li><a href="#6"><b class="cmd">::md5::HMACInit</b> <i class="arg">key</i></a></li>
<li><a href="#7"><b class="cmd">::md5::HMACUpdate</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#8"><b class="cmd">::md5::HMACFinal</b> <i class="arg">token</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is an implementation in Tcl of the MD5 message-digest
algorithm as described in RFC 1321 (1). This algorithm takes
an arbitrary quantity of data and generates a 128-bit message digest
from the input. The MD5 algorithm is related to the MD4 algorithm (2)
but has been strengthened against certain types of potential
attack. MD5 should be used in preference to MD4 for new applications.</p>
<p>If you have <b class="package">critcl</b> and have built the <b class="package">tcllibc</b>
package then the implementation of the hashing function will be
performed by compiled code. Alternatively if you have either
<b class="package">cryptkit</b> or <b class="package">Trf</b> then either of these can be used to
accelerate the digest computation. If no suitable compiled package is
available then the pure-Tcl implementation wil be used. The
programming interface remains the same in all cases.</p>
<p><em>Note</em> the previous version of this package always returned a
hex encoded string. This has been changed to simplify the programming
interface and to make this version more compatible with other
implementations. To obtain the previous usage, either explicitly
specify package version 1 or use the <i class="arg">-hex</i> option to the
<b class="cmd">md5</b> command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::md5::md5</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>Calculate the MD5 digest of the data given in string. This is returned
as a binary string by default. Giving the <i class="arg">-hex</i> option will
return a hexadecimal encoded version of the digest.</p>
<p>The data to be hashed can be specified either as a string argument to
the <b class="cmd">md5</b> command, or as a filename or a pre-opened channel. If the
<i class="arg">-filename</i> argument is given then the file is opened, the data read
and hashed and the file is closed. If the <i class="arg">-channel</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed.</p>
<p>Only one of <i class="arg">-file</i>, <i class="arg">-channel</i> or <i class="arg">string</i> should be given.</p></dd>
<dt><a name="2"><b class="cmd">::md5::hmac</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>Calculate an Hashed Message Authentication digest (HMAC) using the MD5
digest algorithm. HMACs are described in RFC 2104 (3) and provide an MD5
digest that includes a key. All options other than <i class="arg">-key</i> are as
for the <b class="cmd">::md5::md5</b> command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROGRAMMING INTERFACE</a></h2>
<p>For the programmer, the MD5 hash can be viewed as a bucket into which
one pours data. When you have finished, you extract a value that is
derived from the data that was poured into the bucket. The programming
interface to the MD5 hash operates on a token (equivalent to the
bucket). You call <b class="cmd">MD5Init</b> to obtain a token and then call
<b class="cmd">MD5Update</b> as many times as required to add data to the hash. To
release any resources and obtain the hash value, you then call
<b class="cmd">MD5Final</b>. An equivalent set of functions gives you a keyed digest
(HMAC).</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">::md5::MD5Init</b></a></dt>
<dd><p>Begins a new MD5 hash. Returns a token ID that must be used for the
remaining functions.</p></dd>
<dt><a name="4"><b class="cmd">::md5::MD5Update</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd><p>Add data to the hash identified by token. Calling
<em>MD5Update $token &quot;abcd&quot;</em> is equivalent to calling
<em>MD5Update $token &quot;ab&quot;</em> followed by
<em>MD5Update $token &quot;cb&quot;</em>. See <span class="sectref"><a href="#section4">EXAMPLES</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::md5::MD5Final</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the hash value and releases any resources held by this
token. Once this command completes the token will be invalid. The
result is a binary string of 16 bytes representing the 128 bit MD5
digest value.</p></dd>
<dt><a name="6"><b class="cmd">::md5::HMACInit</b> <i class="arg">key</i></a></dt>
<dd><p>This is equivalent to the <b class="cmd">::md5::MD5Init</b> command except that
it requires the key that will be included in the HMAC.</p></dd>
<dt><a name="7"><b class="cmd">::md5::HMACUpdate</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd></dd>
<dt><a name="8"><b class="cmd">::md5::HMACFinal</b> <i class="arg">token</i></a></dt>
<dd><p>These commands are identical to the MD5 equivalent commands.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% md5::md5 -hex &quot;Tcl does MD5&quot;
8AAC1EE01E20BB347104FABB90310433
</pre>
<pre class="doctools_example">
% md5::hmac -hex -key Sekret &quot;Tcl does MD5&quot;
35BBA244FD56D3EDF5F3C47474DACB5D
</pre>
<pre class="doctools_example">
% set tok [md5::MD5Init]
::md5::1
% md5::MD5Update $tok &quot;Tcl &quot;
% md5::MD5Update $tok &quot;does &quot;
% md5::MD5Update $tok &quot;MD5&quot;
% md5::Hex [md5::MD5Final $tok]
8AAC1EE01E20BB347104FABB90310433
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Rivest, R., &quot;The MD5 Message-Digest Algorithm&quot;, RFC 1321, MIT and
       RSA Data Security, Inc, April 1992.
	(<a href="http://www.rfc-editor.org/rfc/rfc1321.txt">http://www.rfc-editor.org/rfc/rfc1321.txt</a>)</p></li>
<li><p>Rivest, R., &quot;The MD4 Message Digest Algorithm&quot;, RFC 1320, MIT,
       April 1992. (<a href="http://www.rfc-editor.org/rfc/rfc1320.txt">http://www.rfc-editor.org/rfc/rfc1320.txt</a>)</p></li>
<li><p>Krawczyk, H., Bellare, M. and Canetti, R. &quot;HMAC: Keyed-Hashing for
      Message Authentication&quot;, RFC 2104, February 1997.
	(<a href="http://www.rfc-editor.org/rfc/rfc2104.txt">http://www.rfc-editor.org/rfc/rfc2104.txt</a>)</p></li>
</ol>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>md5</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key661">md5</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key379">rfc 1320</a>, <a href="../../../../index.html#key381">rfc 1321</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/md5crypt/md5crypt.html.





















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<div class='fossil-doc' data-title='md5crypt - MD5-based password encryption'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">md5crypt(n) 1.1.0 tcllib &quot;MD5-based password encryption&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>md5crypt - MD5-based password encryption</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">SALT</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">md5 2.0</b></li>
<li>package require <b class="pkgname">md5crypt <span class="opt">?1.1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::md5crypt::md5crypt</b> <i class="arg">password</i> <i class="arg">salt</i></a></li>
<li><a href="#2"><b class="cmd">::md5crypt::aprcrypt</b> <i class="arg">password</i> <i class="arg">salt</i></a></li>
<li><a href="#3"><b class="cmd">::md5crypt::salt</b> <span class="opt">?<i class="arg">length</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides an implementation of the MD5-crypt password
encryption algorithm as pioneered by FreeBSD and currently in use as a
replacement for the unix crypt(3) function in many modern
systems. An implementation of the closely related Apache MD5-crypt is
also available.
The output of these commands are compatible with the BSD and OpenSSL
implementation of md5crypt and the Apache 2 htpasswd program.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::md5crypt::md5crypt</b> <i class="arg">password</i> <i class="arg">salt</i></a></dt>
<dd><p>Generate a BSD compatible md5-encoded password hash from the plaintext
password and a random salt (see SALT).</p></dd>
<dt><a name="2"><b class="cmd">::md5crypt::aprcrypt</b> <i class="arg">password</i> <i class="arg">salt</i></a></dt>
<dd><p>Generate an Apache compatible md5-encoded password hash from the plaintext
password and a random salt (see SALT).</p></dd>
<dt><a name="3"><b class="cmd">::md5crypt::salt</b> <span class="opt">?<i class="arg">length</i>?</span></a></dt>
<dd><p>Generate a random salt string suitable for use with the <b class="cmd">md5crypt</b> and
<b class="cmd">aprcrypt</b> commands.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">SALT</a></h2>
<p>The salt passed to either of the encryption schemes implemented here
is checked to see if it begins with the encryption scheme magic string
(either &quot;$1$&quot; for MD5-crypt or &quot;$apr1$&quot; for Apache crypt). If so, this
is removed. The remaining characters up to the next $ and up to a
maximum of 8 characters are then used as the salt. The salt text
should probably be restricted the set of ASCII alphanumeric characters
plus &quot;./&quot; (dot and forward-slash) - this is to preserve maximum
compatability with the unix password file format.</p>
<p>If a password is being generated rather than checked from a password
file then the <b class="cmd">salt</b> command may be used to generate a random salt.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% md5crypt::md5crypt password 01234567
$1$01234567$b5lh2mHyD2PdJjFfALlEz1
</pre>
<pre class="doctools_example">
% md5crypt::aprcrypt password 01234567
$apr1$01234567$IXBaQywhAhc0d75ZbaSDp/
</pre>
<pre class="doctools_example">
% md5crypt::md5crypt password [md5crypt::salt]
$1$dFmvyRmO$T.V3OmzqeEf3hqJp2WFcb.
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>md5crypt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md5/md5.html">md5</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key661">md5</a>, <a href="../../../../index.html#key767">md5crypt</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/mime/mime.html.

























































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364

<div class='fossil-doc' data-title='mime - Mime'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">mime(n) 1.6 tcllib &quot;Mime&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>mime - Manipulation of MIME body parts</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">KNOWN BUGS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">mime <span class="opt">?1.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::mime::initialize</b> <span class="opt">?<b class="option">-canonical</b> <i class="arg">type/subtype</i> <span class="opt">?<b class="option">-param</b> {<i class="arg">key value</i>}...?</span> <span class="opt">?<b class="option">-encoding</b> <i class="arg">value</i>?</span> <span class="opt">?<b class="option">-header</b> {<i class="arg">key value</i>}...?</span>?</span> (<b class="option">-file</b> <i class="arg">name</i> | <b class="option">-string</b> <i class="arg">value</i> | <b class="option">-parts</b> {<i class="arg">token1</i> ... <i class="arg">tokenN</i>})</a></li>
<li><a href="#2"><b class="cmd">::mime::finalize</b> <i class="arg">token</i> <span class="opt">?<b class="option">-subordinates</b> <b class="const">all</b> | <b class="const">dynamic</b> | <b class="const">none</b>?</span></a></li>
<li><a href="#3"><b class="cmd">::mime::getproperty</b> <i class="arg">token</i> <span class="opt">?<i class="arg">property</i> | <b class="option">-names</b>?</span></a></li>
<li><a href="#4"><b class="cmd">::mime::getheader</b> <i class="arg">token</i> <span class="opt">?<i class="arg">key</i> | <b class="option">-names</b>?</span></a></li>
<li><a href="#5"><b class="cmd">::mime::setheader</b> <i class="arg">token</i> <i class="arg">key value</i> <span class="opt">?<b class="option">-mode</b> <b class="const">write</b> | <b class="const">append</b> | <b class="const">delete</b>?</span></a></li>
<li><a href="#6"><b class="cmd">::mime::getbody</b> <i class="arg">token</i> <span class="opt">?<b class="option">-decode</b>?</span> <span class="opt">?<b class="option">-command</b> <i class="arg">callback</i> <span class="opt">?<b class="option">-blocksize</b> <i class="arg">octets</i>?</span>?</span></a></li>
<li><a href="#7"><b class="cmd">::mime::copymessage</b> <i class="arg">token</i> <i class="arg">channel</i></a></li>
<li><a href="#8"><b class="cmd">::mime::buildmessage</b> <i class="arg">token</i></a></li>
<li><a href="#9"><b class="cmd">::mime::parseaddress</b> <i class="arg">string</i></a></li>
<li><a href="#10"><b class="cmd">::mime::parsedatetime</b> (<i class="arg">string</i> | <b class="option">-now</b>) <i class="arg">property</i></a></li>
<li><a href="#11"><b class="cmd">::mime::mapencoding</b> <i class="arg">encoding_name</i></a></li>
<li><a href="#12"><b class="cmd">::mime::reversemapencoding</b> <i class="arg">charset_type</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">mime</b> library package provides the commands to create and
manipulate MIME body parts.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::mime::initialize</b> <span class="opt">?<b class="option">-canonical</b> <i class="arg">type/subtype</i> <span class="opt">?<b class="option">-param</b> {<i class="arg">key value</i>}...?</span> <span class="opt">?<b class="option">-encoding</b> <i class="arg">value</i>?</span> <span class="opt">?<b class="option">-header</b> {<i class="arg">key value</i>}...?</span>?</span> (<b class="option">-file</b> <i class="arg">name</i> | <b class="option">-string</b> <i class="arg">value</i> | <b class="option">-parts</b> {<i class="arg">token1</i> ... <i class="arg">tokenN</i>})</a></dt>
<dd><p>This command creates a MIME part and returns a token representing it.</p>
<ul class="doctools_itemized">
<li><p>If the <b class="option">-canonical</b> option is present, then the body is in
canonical (raw) form and is found by consulting either the
<b class="option">-file</b>, <b class="option">-string</b>, or <b class="option">-parts</b> option.</p>
<p>In addition, both the <b class="option">-param</b> and <b class="option">-header</b> options may
occur zero or more times to specify <b class="const">Content-Type</b> parameters
(e.g., <b class="const">charset</b>) and header keyword/values (e.g.,
<b class="const">Content-Disposition</b>), respectively.</p>
<p>Also, <b class="option">-encoding</b>, if present, specifies the
<b class="const">Content-Transfer-Encoding</b> when copying the body.</p></li>
<li><p>If the <b class="option">-canonical</b> option is not present, then the MIME part
contained in either the <b class="option">-file</b> or the <b class="option">-string</b> option
is parsed, dynamically generating subordinates as appropriate.</p></li>
</ul></dd>
<dt><a name="2"><b class="cmd">::mime::finalize</b> <i class="arg">token</i> <span class="opt">?<b class="option">-subordinates</b> <b class="const">all</b> | <b class="const">dynamic</b> | <b class="const">none</b>?</span></a></dt>
<dd><p>This command destroys the MIME part represented by <i class="arg">token</i>. It
returns an empty string.</p>
<p>If the <b class="option">-subordinates</b> option is present, it specifies which
subordinates should also be destroyed. The default value is
<b class="const">dynamic</b>, destroying all subordinates which were created by
<b class="cmd">::mime::initialize</b> together with the containing body part.</p></dd>
<dt><a name="3"><b class="cmd">::mime::getproperty</b> <i class="arg">token</i> <span class="opt">?<i class="arg">property</i> | <b class="option">-names</b>?</span></a></dt>
<dd><p>This command returns a string or a list of strings containing the
properties of a MIME part. If the command is invoked with the name of
a specific property, then the corresponding value is returned;
instead, if <b class="option">-names</b> is specified, a list of all properties is
returned; otherwise, a serialized array of properties and values is
returned.</p>
<p>The possible properties are:</p>
<dl class="doctools_definitions">
<dt><b class="const">content</b></dt>
<dd><p>The type/subtype describing the content</p></dd>
<dt><b class="const">encoding</b></dt>
<dd><p>The &quot;Content-Transfer-Encoding&quot;</p></dd>
<dt><b class="const">params</b></dt>
<dd><p>A list of &quot;Content-Type&quot; parameters</p></dd>
<dt><b class="const">parts</b></dt>
<dd><p>A list of tokens for the part's subordinates.  This property is
present only if the MIME part has subordinates.</p></dd>
<dt><b class="const">size</b></dt>
<dd><p>The approximate size of the content (unencoded)</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::mime::getheader</b> <i class="arg">token</i> <span class="opt">?<i class="arg">key</i> | <b class="option">-names</b>?</span></a></dt>
<dd><p>This command returns the header of a MIME part, as a list of strings.</p>
<p>A header consists of zero or more key/value pairs. Each value is a
list containing one or more strings.</p>
<p>If this command is invoked with the name of a specific <i class="arg">key</i>, then
a list containing the corresponding value(s) is returned; instead, if
-names is specified, a list of all keys is returned; otherwise, a
serialized array of keys and values is returned. Note that when a key
is specified (e.g., &quot;Subject&quot;), the list returned usually contains
exactly one string; however, some keys (e.g., &quot;Received&quot;) often occur
more than once in the header, accordingly the list returned usually
contains more than one string.</p></dd>
<dt><a name="5"><b class="cmd">::mime::setheader</b> <i class="arg">token</i> <i class="arg">key value</i> <span class="opt">?<b class="option">-mode</b> <b class="const">write</b> | <b class="const">append</b> | <b class="const">delete</b>?</span></a></dt>
<dd><p>This command writes, appends to, or deletes the <i class="arg">value</i> associated
with a <i class="arg">key</i> in the header. It returns a list of strings
containing the previous value associated with the key.</p>
<p>The value for <b class="option">-mode</b> is one of:</p>
<dl class="doctools_definitions">
<dt><b class="const">write</b></dt>
<dd><p>The <i class="arg">key</i>/<i class="arg">value</i> is either created or overwritten (the default).</p></dd>
<dt><b class="const">append</b></dt>
<dd><p>A new <i class="arg">value</i> is appended for the <i class="arg">key</i> (creating it as necessary).</p></dd>
<dt><b class="const">delete</b></dt>
<dd><p>All values associated with the key are removed (the <i class="arg">value</i>
parameter is ignored).</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::mime::getbody</b> <i class="arg">token</i> <span class="opt">?<b class="option">-decode</b>?</span> <span class="opt">?<b class="option">-command</b> <i class="arg">callback</i> <span class="opt">?<b class="option">-blocksize</b> <i class="arg">octets</i>?</span>?</span></a></dt>
<dd><p>This command returns a string containing the body of the leaf MIME
part represented by <i class="arg">token</i> in canonical form.</p>
<p>If the <b class="option">-command</b> option is present, then it is repeatedly
invoked with a fragment of the body as this:</p>
<pre class="doctools_example">
  uplevel #0 $callback [list &quot;data&quot; $fragment]
</pre>
<p>(The <b class="option">-blocksize</b> option, if present, specifies the maximum
size of each fragment passed to the callback.)</p>
<p>When the end of the body is reached, the callback is invoked as:</p>
<pre class="doctools_example">
    uplevel #0 $callback &quot;end&quot;
</pre>
<p>Alternatively, if an error occurs, the callback is invoked as:</p>
<pre class="doctools_example">
    uplevel #0 $callback [list &quot;error&quot; reason]
</pre>
<p>Regardless, the return value of the final invocation of the callback
is propagated upwards by <b class="cmd">::mime::getbody</b>.</p>
<p>If the <b class="option">-command</b> option is absent, then the return value of
<b class="cmd">::mime::getbody</b> is a string containing the MIME part's entire
body.</p>
<p>If the option <b class="option">-decode</b> is absent the return value computed
above is returned as is. This means that it will be in the charset
specified for the token and not the usual utf-8.
If the option <b class="option">-decode</b> is present however the command will use
the charset information associated with the token to convert the
string from its encoding into utf-8 before returning it.</p></dd>
<dt><a name="7"><b class="cmd">::mime::copymessage</b> <i class="arg">token</i> <i class="arg">channel</i></a></dt>
<dd><p>This command copies the MIME represented by <i class="arg">token</i> part to the
specified <i class="arg">channel</i>. The command operates synchronously, and uses
fileevent to allow asynchronous operations to proceed
independently. It returns an empty string.</p></dd>
<dt><a name="8"><b class="cmd">::mime::buildmessage</b> <i class="arg">token</i></a></dt>
<dd><p>This command returns the MIME part represented by <i class="arg">token</i> as a
string.  It is similar to <b class="cmd">::mime::copymessage</b>, only it returns
the data as a return string instead of writing to a channel.</p></dd>
<dt><a name="9"><b class="cmd">::mime::parseaddress</b> <i class="arg">string</i></a></dt>
<dd><p>This command takes a string containing one or more 822-style address
specifications and returns a list of serialized arrays, one element
for each address specified in the argument. If the string contains
more than one address they will be separated by commas.</p>
<p>Each serialized array contains the properties below. Note that one or
more of these properties may be empty.</p>
<dl class="doctools_definitions">
<dt><b class="const">address</b></dt>
<dd><p>local@domain</p></dd>
<dt><b class="const">comment</b></dt>
<dd><p>822-style comment</p></dd>
<dt><b class="const">domain</b></dt>
<dd><p>the domain part (rhs)</p></dd>
<dt><b class="const">error</b></dt>
<dd><p>non-empty on a parse error</p></dd>
<dt><b class="const">group</b></dt>
<dd><p>this address begins a group</p></dd>
<dt><b class="const">friendly</b></dt>
<dd><p>user-friendly rendering</p></dd>
<dt><b class="const">local</b></dt>
<dd><p>the local part (lhs)</p></dd>
<dt><b class="const">memberP</b></dt>
<dd><p>this address belongs to a group</p></dd>
<dt><b class="const">phrase</b></dt>
<dd><p>the phrase part</p></dd>
<dt><b class="const">proper</b></dt>
<dd><p>822-style address specification</p></dd>
<dt><b class="const">route</b></dt>
<dd><p>822-style route specification (obsolete)</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::mime::parsedatetime</b> (<i class="arg">string</i> | <b class="option">-now</b>) <i class="arg">property</i></a></dt>
<dd><p>This command takes a string containing an 822-style date-time
specification and returns the specified property as a serialized
array.</p>
<p>The list of properties and their ranges are:</p>
<dl class="doctools_definitions">
<dt><b class="const">hour</b></dt>
<dd><p>0 .. 23</p></dd>
<dt><b class="const">lmonth</b></dt>
<dd><p>January, February, ..., December</p></dd>
<dt><b class="const">lweekday</b></dt>
<dd><p>Sunday, Monday, ... Saturday</p></dd>
<dt><b class="const">mday</b></dt>
<dd><p>1 .. 31</p></dd>
<dt><b class="const">min</b></dt>
<dd><p>0 .. 59</p></dd>
<dt><b class="const">mon</b></dt>
<dd><p>1 .. 12</p></dd>
<dt><b class="const">month</b></dt>
<dd><p>Jan, Feb, ..., Dec</p></dd>
<dt><b class="const">proper</b></dt>
<dd><p>822-style date-time specification</p></dd>
<dt><b class="const">rclock</b></dt>
<dd><p>elapsed seconds between then and now</p></dd>
<dt><b class="const">sec</b></dt>
<dd><p>0 .. 59</p></dd>
<dt><b class="const">wday</b></dt>
<dd><p>0 .. 6 (Sun .. Mon)</p></dd>
<dt><b class="const">weekday</b></dt>
<dd><p>Sun, Mon, ..., Sat</p></dd>
<dt><b class="const">yday</b></dt>
<dd><p>1 .. 366</p></dd>
<dt><b class="const">year</b></dt>
<dd><p>1900 ...</p></dd>
<dt><b class="const">zone</b></dt>
<dd><p>-720 .. 720 (minutes east of GMT)</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::mime::mapencoding</b> <i class="arg">encoding_name</i></a></dt>
<dd><p>This commansd maps tcl encodings onto the proper names for their MIME
charset type.  This is only done for encodings whose charset types
were known.  The remaining encodings return &quot;&quot; for now.</p></dd>
<dt><a name="12"><b class="cmd">::mime::reversemapencoding</b> <i class="arg">charset_type</i></a></dt>
<dd><p>This command maps MIME charset types onto tcl encoding names.  Those
that are unknown return &quot;&quot;.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">KNOWN BUGS</a></h2>
<dl class="doctools_definitions">
<dt>Tcllib Bug #447037</dt>
<dd><p>This problem affects only people which are using Tcl and Mime on a
64-bit system. The currently recommended fix for this problem is to
upgrade to Tcl version 8.4. This version has extended 64 bit support
and the bug does not appear anymore.</p>
<p>The problem could have been generally solved by requiring the use of
Tcl 8.4 for this package. We decided against this solution as it would
force a large number of unaffected users to upgrade their Tcl
interpreter for no reason.</p>
<p>See <a href="/tktview?name=447037">Ticket 447037</a> for additional information.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>mime</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftp/ftp.html">ftp</a>, <a href="../../../../index.html#key446">http</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="smtp.html">smtp</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key335">email</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key330">mail</a>, <a href="../../../../index.html#key230">mime</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key812">rfc 2045</a>, <a href="../../../../index.html#key813">rfc 2046</a>, <a href="../../../../index.html#key811">rfc 2049</a>, <a href="../../../../index.html#key332">rfc 821</a>, <a href="../../../../index.html#key333">rfc 822</a>, <a href="../../../../index.html#key337">smtp</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 1999-2000 Marshall T. Rose</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/mime/smtp.html.









































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292

<div class='fossil-doc' data-title='smtp - smtp client'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">smtp(n) 1.4.5 tcllib &quot;smtp client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>smtp - Client-side tcl implementation of the smtp protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Authentication</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLE</a></li>
<li class="doctools_section"><a href="#section4">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl</b></li>
<li>package require <b class="pkgname">mime <span class="opt">?1.5.4?</span></b></li>
<li>package require <b class="pkgname">smtp <span class="opt">?1.4.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::smtp::sendmessage</b> <i class="arg">token</i> <i class="arg">option</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">smtp</b> library package provides the client side of the
Simple Mail Transfer Protocol (SMTP) (1) (2).</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::smtp::sendmessage</b> <i class="arg">token</i> <i class="arg">option</i>...</a></dt>
<dd><p>This command sends the MIME part (see package <b class="package"><a href="mime.html">mime</a></b>)
represented by <i class="arg">token</i> to an SMTP server. <i class="arg">options</i> is a list
of options and their associated values.  The recognized options are:</p>
<dl class="doctools_definitions">
<dt><b class="option">-servers</b></dt>
<dd><p>A list of SMTP servers. The default is <b class="const">localhost</b>.</p></dd>
<dt><b class="option">-ports</b></dt>
<dd><p>A list of SMTP ports. The default is <b class="const">25</b>.</p></dd>
<dt><b class="option">-client</b></dt>
<dd><p>The name to use as our hostname when connecting to the server. By
default this is either localhost if one of the servers is localhost,
or is set to the string returned by <b class="cmd">info hostname</b>.</p></dd>
<dt><b class="option">-queue</b></dt>
<dd><p>Indicates that the SMTP server should be asked to queue the message
for later processing. A boolean value.</p></dd>
<dt><b class="option">-atleastone</b></dt>
<dd><p>Indicates that the SMTP server must find at least one recipient
acceptable for the message to be sent. A boolean value.</p></dd>
<dt><b class="option">-originator</b></dt>
<dd><p>A string containing an 822-style address specification. If present the
header isn't examined for an originator address.</p></dd>
<dt><b class="option">-recipients</b></dt>
<dd><p>A string containing one or more 822-style address specifications. If
present the header isn't examined for recipient addresses). If the
string contains more than one address they will be separated by
commas.</p></dd>
<dt><b class="option">-header</b></dt>
<dd><p>A list containing two elements, an smtp header and its associated
value (the -header option may occur zero or more times).</p></dd>
<dt><b class="option">-usetls</b></dt>
<dd><p>This package supports the RFC 3207 TLS extension (3) by default provided the
tls package is available. You can turn this off with this boolean option.</p></dd>
<dt><b class="option">-tlspolicy</b></dt>
<dd><p>This option lets you specify a command to be called if an error occurs
during TLS setup. The command is called with the SMTP code and diagnostic
message appended. The command should return 'secure' or 'insecure' where
insecure will cause the package to continue on the unencrypted channel.
Returning 'secure' will cause the socket to be closed and the next server
in the <b class="option">-servers</b> list to be tried.</p></dd>
<dt><b class="option">-username</b></dt>
<dd></dd>
<dt><b class="option">-password</b></dt>
<dd><p>If your SMTP server requires authentication (RFC 2554 (4)) before
accepting mail you can use <b class="option">-username</b> and <b class="option">-password</b>
to provide your authentication details to the server. Currently this
package supports DIGEST-MD5, CRAM-MD5, LOGIN and PLAIN authentication
methods. The most secure method will be tried first and each method
tried in turn until we are either authorized or we run out of
methods. Note that if the server permits a TLS connection, then the
authorization will occur after we begin using the secure channel.</p>
<p>Please also read the section on <span class="sectref"><a href="#section2">Authentication</a></span>, it details
the necessary prequisites, i.e. packages needed to support these
options and authentication.</p></dd>
</dl>
<p>If the <b class="option">-originator</b> option is not present, the originator
address is taken from <b class="const">From</b> (or <b class="const">Resent-From</b>);
similarly, if the <b class="option">-recipients</b> option is not present,
recipient addresses are taken from <b class="const">To</b>, <b class="const">cc</b>, and
<b class="const">Bcc</b> (or <b class="const">Resent-To</b>, and so on). Note that the header
key/values supplied by the <b class="option">-header</b> option (not those present
in the MIME part) are consulted. Regardless, header key/values are
added to the outgoing message as necessary to ensure that a valid
822-style message is sent.</p>
<p>The command returns a list indicating which recipients were
unacceptable to the SMTP server. Each element of the list is another
list, containing the address, an SMTP error code, and a textual
diagnostic. Depending on the <b class="option">-atleastone</b> option and the
intended recipients, a non-empty list may still indicate that the
message was accepted by the server.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Authentication</a></h2>
<p>Beware. SMTP authentication uses <b class="package"><a href="../sasl/sasl.html">SASL</a></b>. I.e. if the user
has to authenticate a connection, i.e. use the options <b class="option">-user</b>
and <b class="option">-password</b> (see above) it is necessary to have the
<b class="package">sasl</b> package available so that <b class="package">smtp</b> can load it.</p>
<p>This is a soft dependency because not everybody requires authentication,
and <b class="package">sasl</b> depends on a lot of the cryptographic (secure) hashes,
i.e. all of <b class="package"><a href="../md5/md5.html">md5</a></b>, <b class="package"><a href="../otp/otp.html">otp</a></b>, <b class="package"><a href="../md4/md4.html">md4</a></b>, <b class="package"><a href="../sha1/sha1.html">sha1</a></b>,
and <b class="package"><a href="../ripemd/ripemd160.html">ripemd160</a></b>.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLE</a></h2>
<pre class="doctools_example">
proc send_simple_message {recipient email_server subject body} {
    package require smtp
    package require mime
    set token [mime::initialize -canonical text/plain \\
	-string $body]
    mime::setheader $token Subject $subject
    smtp::sendmessage $token \\
	-recipients $recipient -servers $email_server
    mime::finalize $token
}
send_simple_message someone@somewhere.com localhost \\
    &quot;This is the subject.&quot; &quot;This is the message.&quot;
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Jonathan B. Postel, &quot;SIMPLE MAIL TRANSFER PROTOCOL&quot;, RFC 821, August 1982.
    (<a href="http://www.rfc-editor.org/rfc/rfc821.txt">http://www.rfc-editor.org/rfc/rfc821.txt</a>)</p></li>
<li><p>J. Klensin, &quot;Simple Mail Transfer Protocol&quot;, RFC 2821, April 2001.
    (<a href="http://www.rfc-editor.org/rfc/rfc2821.txt">http://www.rfc-editor.org/rfc/rfc2821.txt</a>)</p></li>
<li><p>P. Hoffman, &quot;SMTP Service Extension for Secure SMTP over Transport
    Layer Security&quot;, RFC 3207, February 2002.
    (<a href="http://www.rfc-editor.org/rfc/rfc3207.txt">http://www.rfc-editor.org/rfc/rfc3207.txt</a>)</p></li>
<li><p>J. Myers, &quot;SMTP Service Extension for Authentication&quot;,
    RFC 2554, March 1999.
    (<a href="http://www.rfc-editor.org/rfc/rfc2554.txt">http://www.rfc-editor.org/rfc/rfc2554.txt</a>)</p></li>
</ol>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>smtp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftp/ftp.html">ftp</a>, <a href="../../../../index.html#key446">http</a>, <a href="mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key335">email</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key330">mail</a>, <a href="../../../../index.html#key230">mime</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key336">rfc 2554</a>, <a href="../../../../index.html#key329">rfc 2821</a>, <a href="../../../../index.html#key334">rfc 3207</a>, <a href="../../../../index.html#key332">rfc 821</a>, <a href="../../../../index.html#key333">rfc 822</a>, <a href="../../../../index.html#key337">smtp</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 1999-2000 Marshall T. Rose and others</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/multiplexer/multiplexer.html.









































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228

<div class='fossil-doc' data-title='multiplexer - One-to-many communication with sockets.'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">multiplexer(n) 0.2 tcllib &quot;One-to-many communication with sockets.&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>multiplexer - One-to-many communication with sockets.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">multiplexer <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::multiplexer::create</b></a></li>
<li><a href="#2"><b class="cmd">${multiplexer_instance}::Init</b> <i class="arg">port</i></a></li>
<li><a href="#3"><b class="cmd">${multiplexer_instance}::Config</b> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#4"><b class="cmd">${multiplexer_instance}::AddFilter</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#5"><b class="cmd">cmdprefix</b> <i class="arg">data</i> <i class="arg">chan</i> <i class="arg">clientaddress</i> <i class="arg">clientport</i></a></li>
<li><a href="#6"><b class="cmd">${multiplexer_instance}::AddAccessFilter</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#7"><b class="cmd">cmdprefix</b> <i class="arg">chan</i> <i class="arg">clientaddress</i> <i class="arg">clientport</i></a></li>
<li><a href="#8"><b class="cmd">${multiplexer_instance}::AddExitFilter</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#9"><b class="cmd">cmdprefix</b> <i class="arg">chan</i> <i class="arg">clientaddress</i> <i class="arg">clientport</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">multiplexer</b> package provides a generic system for one-to-many
communication utilizing sockets.  For example, think of a chat system
where one user sends a message which is then broadcast to all the
other connected users.</p>
<p>It is possible to have different multiplexers running concurrently.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::multiplexer::create</b></a></dt>
<dd><p>The <b class="cmd">create</b> command creates a new multiplexer 'instance'.  For
example:</p>
<pre class="doctools_example">set mp [::multiplexer::create]</pre>
<p>This instance can then be manipulated like so:</p>
<pre class="doctools_example">${mp}::Init 35100</pre>
</dd>
<dt><a name="2"><b class="cmd">${multiplexer_instance}::Init</b> <i class="arg">port</i></a></dt>
<dd><p>This starts the multiplexer listening on the specified port.</p></dd>
<dt><a name="3"><b class="cmd">${multiplexer_instance}::Config</b> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Use <b class="cmd">Config</b> to configure the multiplexer instance.  Configuration
options currently include:</p>
<dl class="doctools_options">
<dt><b class="option">sendtoorigin</b></dt>
<dd><p>A boolean flag. If <b class="const">true</b>, the sender will receive a copy of the
sent message.  Defaults to <b class="const">false</b>.</p></dd>
<dt><b class="option">debuglevel</b></dt>
<dd><p>Sets the debug level to use for the multiplexer instance, according to
those specified by the <b class="package"><a href="../log/logger.html">logger</a></b> package (debug, info, notice,
warn, error, critical).</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">${multiplexer_instance}::AddFilter</b> <i class="arg">cmdprefix</i></a></dt>
<dd><p>Command to add a filter for data that passes through the multiplexer
instance.
The registered <i class="arg">cmdprefix</i> is called when data arrives at a
multiplexer instance. If there is more than one filter command
registered at the instance they will be called in the order of
registristation, and each filter will get the result of the preceding
filter as its argument. The first filter gets the incoming data as its
argument. The result returned by the last filter is the data which
will be broadcast to all clients of the multiplexer instance.
The command prefix is called as</p>
<dl class="doctools_definitions">
<dt><a name="5"><b class="cmd">cmdprefix</b> <i class="arg">data</i> <i class="arg">chan</i> <i class="arg">clientaddress</i> <i class="arg">clientport</i></a></dt>
<dd><p>Takes the incoming <i class="arg">data</i>, modifies it, and returns that as its
result. The last three arguments contain information about the client
which sent the data to filter: The channel connecting us to the
client, its ip-address, and its ip-port.</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">${multiplexer_instance}::AddAccessFilter</b> <i class="arg">cmdprefix</i></a></dt>
<dd><p>Command to add an access filter.
The registered <i class="arg">cmdprefix</i> is called when a new client socket
tries to connect to the multixer instance. If there is more than one
access filter command registered at the instance they will be called
in the order of registristation. If any of the called commands returns
<b class="const">-1</b> the access to the multiplexer instance is denied and the
client channel is closed immediately. Any other result grants the
client access to the multiplexer instance.
The command prefix is called as</p>
<dl class="doctools_definitions">
<dt><a name="7"><b class="cmd">cmdprefix</b> <i class="arg">chan</i> <i class="arg">clientaddress</i> <i class="arg">clientport</i></a></dt>
<dd><p>The arguments contain information about the client which tries to
connected to the instance: The channel connecting us to the client,
its ip-address, and its ip-port.</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">${multiplexer_instance}::AddExitFilter</b> <i class="arg">cmdprefix</i></a></dt>
<dd><p>Adds filter to be run when client socket generates an EOF condition.
The registered <i class="arg">cmdprefix</i> is called when a client socket of the
multixer signals EOF. If there is more than one exit filter command
registered at the instance they will be called in the order of
registristation. Errors thrown by an exit filter are ignored, but
logged. Any result returned by an exit filter is ignored.
The command prefix is called as</p>
<dl class="doctools_definitions">
<dt><a name="9"><b class="cmd">cmdprefix</b> <i class="arg">chan</i> <i class="arg">clientaddress</i> <i class="arg">clientport</i></a></dt>
<dd><p>The arguments contain information about the client which signaled the
EOF: The channel connecting us to the client, its ip-address, and its
ip-port.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>multiplexer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key693">chat</a>, <a href="../../../../index.html#key694">multiplexer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/namespacex/namespacex.html.



















































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185

<div class='fossil-doc' data-title='namespacex - Namespace utility commands'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">namespacex(n) 0.1 tcllib &quot;Namespace utility commands&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>namespacex - Namespace utility commands</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">namespacex <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::namespacex hook add</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">cmdprefix</i></a></li>
<li><a href="#2"><b class="cmd">::namespacex hook proc</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">arguments</i> <i class="arg">body</i></a></li>
<li><a href="#3"><b class="cmd">::namespacex hook on</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">guardcmdprefix</i> <i class="arg">actioncmdprefix</i></a></li>
<li><a href="#4"><b class="cmd">::namespacex hook next</b> <i class="arg">arg</i>...</a></li>
<li><a href="#5"><b class="cmd">::namespacex info allchildren</b> <i class="arg">namespace</i></a></li>
<li><a href="#6"><b class="cmd">::namespacex info allvars</b> <i class="arg">namespace</i></a></li>
<li><a href="#7"><b class="cmd">::namespacex info vars</b> <i class="arg">namespace</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::namespacex state get</b> <i class="arg">namespace</i></a></li>
<li><a href="#9"><b class="cmd">::namespacex state set</b> <i class="arg">namespace</i> <i class="arg">dict</i></a></li>
<li><a href="#10"><b class="cmd">::namespacex state drop</b> <i class="arg">namespace</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a number of utility commands for working with
namespaces.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::namespacex hook add</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">cmdprefix</i></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::namespacex hook proc</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">arguments</i> <i class="arg">body</i></a></dt>
<dd></dd>
<dt><a name="3"><b class="cmd">::namespacex hook on</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">guardcmdprefix</i> <i class="arg">actioncmdprefix</i></a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">::namespacex hook next</b> <i class="arg">arg</i>...</a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">::namespacex info allchildren</b> <i class="arg">namespace</i></a></dt>
<dd><p>This command returns a list containing the names of all child
namespaces in the specified <i class="arg">namespace</i> and its children. The
names are all fully qualified.</p></dd>
<dt><a name="6"><b class="cmd">::namespacex info allvars</b> <i class="arg">namespace</i></a></dt>
<dd><p>This command returns a list containing the names of all variables in
the specified <i class="arg">namespace</i> and its children. The names are all
relative to <i class="arg">namespace</i>, and <em>not</em> fully qualified.</p></dd>
<dt><a name="7"><b class="cmd">::namespacex info vars</b> <i class="arg">namespace</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This command returns a list containing the names of all variables in
the specified <i class="arg">namespace</i>.</p></dd>
<dt><a name="8"><b class="cmd">::namespacex state get</b> <i class="arg">namespace</i></a></dt>
<dd><p>This command returns a dictionary holding the names and values of all
variables in the specified <i class="arg">namespace</i> and its child namespaces.</p>
<p>Note that the names are all relative to <i class="arg">namespace</i>,
and <em>not</em> fully qualified.</p></dd>
<dt><a name="9"><b class="cmd">::namespacex state set</b> <i class="arg">namespace</i> <i class="arg">dict</i></a></dt>
<dd><p>This command takes a dictionary holding the names and values for a set
of variables and replaces the current state of the specified
<i class="arg">namespace</i> and its child namespaces with this state.
The result of the command is the empty string.</p></dd>
<dt><a name="10"><b class="cmd">::namespacex state drop</b> <i class="arg">namespace</i></a></dt>
<dd><p>This command unsets all variables in the specified <i class="arg">namespace</i> and
its child namespaces.
The result of the command is the empty string.</p></dd>
</dl>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key87">extended namespace</a>, <a href="../../../../index.html#key83">info</a>, <a href="../../../../index.html#key86">namespace unknown</a>, <a href="../../../../index.html#key85">namespace utilities</a>, <a href="../../../../index.html#key84">state (de)serialization</a>, <a href="../../../../index.html#key88">unknown hooking</a>, <a href="../../../../index.html#key82">utilities</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200? Neil Madden (http://wiki.tcl.tk/12790)<br>
Copyright &copy; 200? Various (http://wiki.tcl.tk/1489)<br>
Copyright &copy; 2010 Documentation, Andreas Kupries</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ncgi/ncgi.html.







































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371

<div class='fossil-doc' data-title='ncgi - CGI Support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ncgi(n) 1.4.3 tcllib &quot;CGI Support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ncgi - Procedures to manipulate CGI values.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">ncgi <span class="opt">?1.4.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ncgi::cookie</b> <i class="arg">cookie</i></a></li>
<li><a href="#2"><b class="cmd">::ncgi::decode</b> <i class="arg">str</i></a></li>
<li><a href="#3"><b class="cmd">::ncgi::empty</b> <i class="arg">name</i></a></li>
<li><a href="#4"><b class="cmd">::ncgi::exists</b> <i class="arg">name</i></a></li>
<li><a href="#5"><b class="cmd">::ncgi::encode</b> <i class="arg">string</i></a></li>
<li><a href="#6"><b class="cmd">::ncgi::header</b> <span class="opt">?<i class="arg">type</i>?</span> <i class="arg">args</i></a></li>
<li><a href="#7"><b class="cmd">::ncgi::import</b> <i class="arg">cginame</i> <span class="opt">?<i class="arg">tclname</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::ncgi::importAll</b> <i class="arg">args</i></a></li>
<li><a href="#9"><b class="cmd">::ncgi::importFile</b> <i class="arg">cmd</i> <i class="arg">cginame</i> <span class="opt">?<i class="arg">filename</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::ncgi::input</b> <span class="opt">?<i class="arg">fakeinput</i>?</span> <span class="opt">?<i class="arg">fakecookie</i>?</span></a></li>
<li><a href="#11"><b class="cmd">::ncgi::multipart</b> <i class="arg">type query</i></a></li>
<li><a href="#12"><b class="cmd">::ncgi::nvlist</b></a></li>
<li><a href="#13"><b class="cmd">::ncgi::names</b></a></li>
<li><a href="#14"><b class="cmd">::ncgi::parse</b></a></li>
<li><a href="#15"><b class="cmd">::ncgi::parseMimeValue</b> <i class="arg">value</i></a></li>
<li><a href="#16"><b class="cmd">::ncgi::query</b></a></li>
<li><a href="#17"><b class="cmd">::ncgi::redirect</b> <i class="arg">url</i></a></li>
<li><a href="#18"><b class="cmd">::ncgi::reset</b> <i class="arg">query type</i></a></li>
<li><a href="#19"><b class="cmd">::ncgi::setCookie</b> <i class="arg">args</i></a></li>
<li><a href="#20"><b class="cmd">::ncgi::setDefaultValue</b> <i class="arg">key defvalue</i></a></li>
<li><a href="#21"><b class="cmd">::ncgi::setDefaultValueList</b> <i class="arg">key defvaluelist</i></a></li>
<li><a href="#22"><b class="cmd">::ncgi::setValue</b> <i class="arg">key value</i></a></li>
<li><a href="#23"><b class="cmd">::ncgi::setValueList</b> <i class="arg">key valuelist</i></a></li>
<li><a href="#24"><b class="cmd">::ncgi::type</b></a></li>
<li><a href="#25"><b class="cmd">::ncgi::urlStub</b> <span class="opt">?<i class="arg">url</i>?</span></a></li>
<li><a href="#26"><b class="cmd">::ncgi::value</b> <i class="arg">key</i> <span class="opt">?<i class="arg">default</i>?</span></a></li>
<li><a href="#27"><b class="cmd">::ncgi::valueList</b> <i class="arg">key</i> <span class="opt">?<i class="arg">default</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">ncgi</b> package provides commands that manipulate CGI
values.  These are values that come from Web forms and are processed
either by CGI scripts or web pages with embedded Tcl code.  Use the
<b class="package">ncgi</b> package to query these values, set and get cookies, and
encode and decode www-url-encoded values.</p>
<p>In the simplest case, a CGI script first calls <b class="cmd">::ncgi::parse</b> and
then calls <b class="cmd">::ncgi::value</b> to get different form values.  If a CGI
value is repeated, you should use <b class="cmd">::ncgi::valueList</b> to get back
the complete list of values.</p>
<p>An alternative to <b class="cmd">::ncgi::parse</b> is <b class="cmd">::ncgi::input</b>, which
has semantics similar to Don Libes' <b class="cmd">cgi_input</b> procedure.
<b class="cmd">::ncgi::input</b> restricts repeated CGI values to have names that
end with &quot;List&quot;.  In this case, <b class="cmd">::ncgi::value</b> will return the
complete list of values, and <b class="cmd">::ncgi::input</b> will raise errors if
it find repeated form elements without the right name.</p>
<p>The <b class="cmd">::ncgi::reset</b> procedure can be used in test suites and Web
servers to initialize the source of the CGI values.  Otherwise the
values are read in from the CGI environment.</p>
<p>The complete set of procedures is described below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ncgi::cookie</b> <i class="arg">cookie</i></a></dt>
<dd><p>Return a list of values for <i class="arg">cookie</i>, if any.  It is possible that
more than one cookie with the same name can be present, so this
procedure returns a list.</p></dd>
<dt><a name="2"><b class="cmd">::ncgi::decode</b> <i class="arg">str</i></a></dt>
<dd><p>Decode strings in www-url-encoding, which represents special
characters with a %xx sequence, where xx is the character code in hex.</p></dd>
<dt><a name="3"><b class="cmd">::ncgi::empty</b> <i class="arg">name</i></a></dt>
<dd><p>Returns 1 if the CGI variable <i class="arg">name</i> is not present or has the
empty string as its value.</p></dd>
<dt><a name="4"><b class="cmd">::ncgi::exists</b> <i class="arg">name</i></a></dt>
<dd><p>The return value is a boolean. It returns <b class="const">0</b> if the CGI
variable <i class="arg">name</i> is not present, and <b class="const">1</b> otherwise.</p></dd>
<dt><a name="5"><b class="cmd">::ncgi::encode</b> <i class="arg">string</i></a></dt>
<dd><p>Encode <i class="arg">string</i> into www-url-encoded format.</p></dd>
<dt><a name="6"><b class="cmd">::ncgi::header</b> <span class="opt">?<i class="arg">type</i>?</span> <i class="arg">args</i></a></dt>
<dd><p>Output the CGI header to standard output.  This emits a Content-Type:
header and additional headers based on <i class="arg">args</i>, which is a list of
header names and header values. The <i class="arg">type</i> defaults to
&quot;text/html&quot;.</p></dd>
<dt><a name="7"><b class="cmd">::ncgi::import</b> <i class="arg">cginame</i> <span class="opt">?<i class="arg">tclname</i>?</span></a></dt>
<dd><p>This creates a variable in the current scope with the value of the CGI
variable <i class="arg">cginame</i>.  The name of the variable is <i class="arg">tclname</i>, or
<i class="arg">cginame</i> if <i class="arg">tclname</i> is empty (default).</p></dd>
<dt><a name="8"><b class="cmd">::ncgi::importAll</b> <i class="arg">args</i></a></dt>
<dd><p>This imports several CGI variables as Tcl variables.  If <i class="arg">args</i> is
empty, then every CGI value is imported.  Otherwise each CGI variable
listed in <i class="arg">args</i> is imported.</p></dd>
<dt><a name="9"><b class="cmd">::ncgi::importFile</b> <i class="arg">cmd</i> <i class="arg">cginame</i> <span class="opt">?<i class="arg">filename</i>?</span></a></dt>
<dd><p>This provides information about an uploaded file from a form input
field of type <b class="const">file</b> with name <i class="arg">cginame</i>.  <i class="arg">cmd</i> can be
one of <b class="option">-server</b> <b class="option">-client</b>, <b class="option">-type</b> or
<b class="option">-data</b>.</p>
<dl class="doctools_definitions">
<dt><b class="option">-client</b> <i class="arg">cginame</i></dt>
<dd><p>returns the filename as sent by the client.</p></dd>
<dt><b class="option">-type</b> <i class="arg">cginame</i></dt>
<dd><p>returns the mime type of the uploaded file.</p></dd>
<dt><b class="option">-data</b> <i class="arg">cginame</i></dt>
<dd><p>returns the contents of the file.</p></dd>
<dt><b class="option">-server</b> <i class="arg">cginame</i> <i class="arg">filename</i></dt>
<dd><p>writes the file contents to a local temporary file (or <i class="arg">filename</i>
if supplied) and returns the name of the file. The caller is
responsible for deleting this file after use.</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::ncgi::input</b> <span class="opt">?<i class="arg">fakeinput</i>?</span> <span class="opt">?<i class="arg">fakecookie</i>?</span></a></dt>
<dd><p>This reads and decodes the CGI values from the environment.  It
restricts repeated form values to have a trailing &quot;List&quot; in their
name.  The CGI values are obtained later with the <b class="cmd">::ncgi::value</b>
procedure.</p></dd>
<dt><a name="11"><b class="cmd">::ncgi::multipart</b> <i class="arg">type query</i></a></dt>
<dd><p>This procedure parses a multipart/form-data <i class="arg">query</i>.  This is used
by <b class="cmd">::ncgi::nvlist</b> and not normally called directly.  It returns
an alternating list of names and structured values.  Each structure
value is in turn a list of two elements.  The first element is
meta-data from the multipart/form-data structure.  The second element
is the form value.  If you use <b class="cmd">::ncgi::value</b> you just get the
form value.  If you use <b class="cmd">::ncgi::valueList</b> you get the structured
value with meta data and the value.</p>
<p>The <i class="arg">type</i> is the whole Content-Type, including the parameters
like <i class="arg">boundary</i>.  This returns a list of names and values that
describe the multipart data.  The values are a nested list structure
that has some descriptive information first, and the actual form value
second.  The descriptive information is list of header names and
values that describe the content.</p></dd>
<dt><a name="12"><b class="cmd">::ncgi::nvlist</b></a></dt>
<dd><p>This returns all the query data as a name, value list.  In the case of
multipart/form-data, the values are structured as described in
<b class="cmd">::ncgi::multipart</b>.</p></dd>
<dt><a name="13"><b class="cmd">::ncgi::names</b></a></dt>
<dd><p>This returns all names found in the query data, as a list.
<b class="cmd">::ncgi::multipart</b>.</p></dd>
<dt><a name="14"><b class="cmd">::ncgi::parse</b></a></dt>
<dd><p>This reads and decodes the CGI values from the environment.  The CGI
values are obtained later with the <b class="cmd">::ncgi::value</b> procedure.  IF
a CGI value is repeated, then you should use <b class="cmd">::ncgi::valueList</b>
to get the complete list of values.</p></dd>
<dt><a name="15"><b class="cmd">::ncgi::parseMimeValue</b> <i class="arg">value</i></a></dt>
<dd><p>This decodes the Content-Type and other MIME headers that have the
form of &quot;primary value; param=val; p2=v2&quot; It returns a list, where the
first element is the primary value, and the second element is a list
of parameter names and values.</p></dd>
<dt><a name="16"><b class="cmd">::ncgi::query</b></a></dt>
<dd><p>This returns the raw query data.</p></dd>
<dt><a name="17"><b class="cmd">::ncgi::redirect</b> <i class="arg">url</i></a></dt>
<dd><p>Generate a response that causes a 302 redirect by the Web server.  The
<i class="arg">url</i> is the new URL that is the target of the redirect.  The URL
will be qualified with the current server and current directory, if
necessary, to convert it into a full URL.</p></dd>
<dt><a name="18"><b class="cmd">::ncgi::reset</b> <i class="arg">query type</i></a></dt>
<dd><p>Set the query data and Content-Type for the current CGI session.  This
is used by the test suite and by Web servers to initialize the ncgi
module so it does not try to read standard input or use environment
variables to get its data.  If neither <i class="arg">query</i> or <i class="arg">type</i> are
specified, then the <b class="package">ncgi</b> module will look in the standard
CGI environment for its data.</p></dd>
<dt><a name="19"><b class="cmd">::ncgi::setCookie</b> <i class="arg">args</i></a></dt>
<dd><p>Set a cookie value that will be returned as part of the reply.  This
must be done before <b class="cmd">::ncgi::header</b> or <b class="cmd">::ncgi::redirect</b> is
called in order for the cookie to be returned properly.  The
<i class="arg">args</i> are a set of flags and values:</p>
<dl class="doctools_definitions">
<dt><b class="option">-name</b> <i class="arg">name</i></dt>
<dd></dd>
<dt><b class="option">-value</b> <i class="arg">value</i></dt>
<dd></dd>
<dt><b class="option">-expires</b> <i class="arg">date</i></dt>
<dd></dd>
<dt><b class="option">-path</b> <i class="arg">path restriction</i></dt>
<dd></dd>
<dt><b class="option">-domain</b> <i class="arg">domain restriction</i></dt>
<dd></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::ncgi::setDefaultValue</b> <i class="arg">key defvalue</i></a></dt>
<dd><p>Set a CGI value if it does not already exists.  This affects future
calls to <b class="cmd">::ncgi::value</b> (but not future calls to
<b class="cmd">::ncgi::nvlist</b>).  If the CGI value already is present, then this
procedure has no side effects.</p></dd>
<dt><a name="21"><b class="cmd">::ncgi::setDefaultValueList</b> <i class="arg">key defvaluelist</i></a></dt>
<dd><p>Like <b class="cmd">::ncgi::setDefaultValue</b> except that the value already has
list structure to represent multiple checkboxes or a multi-selection.</p></dd>
<dt><a name="22"><b class="cmd">::ncgi::setValue</b> <i class="arg">key value</i></a></dt>
<dd><p>Set a CGI value, overriding whatever was present in the CGI
environment already.  This affects future calls to <b class="cmd">::ncgi::value</b>
(but not future calls to <b class="cmd">::ncgi::nvlist</b>).</p></dd>
<dt><a name="23"><b class="cmd">::ncgi::setValueList</b> <i class="arg">key valuelist</i></a></dt>
<dd><p>Like <b class="cmd">::ncgi::setValue</b> except that the value already has list
structure to represent multiple checkboxes or a multi-selection.</p></dd>
<dt><a name="24"><b class="cmd">::ncgi::type</b></a></dt>
<dd><p>Returns the Content-Type of the current CGI values.</p></dd>
<dt><a name="25"><b class="cmd">::ncgi::urlStub</b> <span class="opt">?<i class="arg">url</i>?</span></a></dt>
<dd><p>Returns the current URL, but without the protocol, server, and port.
If <i class="arg">url</i> is specified, then it defines the URL for the current
session.  That value will be returned by future calls to
<b class="cmd">::ncgi::urlStub</b></p></dd>
<dt><a name="26"><b class="cmd">::ncgi::value</b> <i class="arg">key</i> <span class="opt">?<i class="arg">default</i>?</span></a></dt>
<dd><p>Return the CGI value identified by <i class="arg">key</i>.  If the CGI value is not
present, then the <i class="arg">default</i> value is returned instead. This value
defaults to the empty string.</p>
<p>If the form value <i class="arg">key</i> is repeated, then there are two cases: if
<b class="cmd">::ncgi::parse</b> was called, then <b class="cmd">::ncgi::value</b> only returns
the first value associated with <i class="arg">key</i>.  If <b class="cmd">::ncgi::input</b> was
called, then <b class="cmd">::ncgi::value</b> returns a Tcl list value and
<i class="arg">key</i> must end in &quot;List&quot; (e.g., &quot;skuList&quot;).  In the case of
multipart/form-data, this procedure just returns the value of the form
element.  If you want the meta-data associated with each form value,
then use <b class="cmd">::ncgi::valueList</b>.</p></dd>
<dt><a name="27"><b class="cmd">::ncgi::valueList</b> <i class="arg">key</i> <span class="opt">?<i class="arg">default</i>?</span></a></dt>
<dd><p>Like <b class="cmd">::ncgi::value</b>, but this always returns a list of values
(even if there is only one value).  In the case of
multipart/form-data, this procedure returns a list of two elements.
The first element is meta-data in the form of a parameter, value list.
The second element is the form value.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<p>Uploading a file</p>
<pre class="doctools_example">
HTML:
&lt;html&gt;
&lt;form action=&quot;/cgi-bin/upload.cgi&quot; method=&quot;POST&quot; enctype=&quot;multipart/form-data&quot;&gt;
Path: &lt;input type=&quot;file&quot; name=&quot;filedata&quot;&gt;&lt;br&gt;
Name: &lt;input type=&quot;text&quot; name=&quot;filedesc&quot;&gt;&lt;br&gt;
&lt;input type=&quot;submit&quot;&gt;
&lt;/form&gt;
&lt;/html&gt;
TCL: upload.cgi
#!/usr/local/bin/tclsh
::ncgi::parse
set filedata [::ncgi::value filedata]
set filedesc [::ncgi::value filedesc]
puts &quot;&lt;html&gt; File uploaded at &lt;a href=\&quot;/images/$filedesc\&quot;&gt;$filedesc&lt;/a&gt; &lt;/html&gt;&quot;
set filename /www/images/$filedesc
set fh [open $filename w]
puts -nonewline $fh $filedata
close $fh
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ncgi</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../html/html.html">html</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key676">CGI</a>, <a href="../../../../index.html#key675">cookie</a>, <a href="../../../../index.html#key616">form</a>, <a href="../../../../index.html#key617">html</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/nettool/nettool.html.





















































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250

<div class='fossil-doc' data-title='nettool - nettool'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nettool(n) 0.5.1 tcllib &quot;nettool&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nettool - Tools for networked applications</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">nettool <span class="opt">?0.5.1?</span></b></li>
<li>package require <b class="pkgname">twapi 3.1</b></li>
<li>package require <b class="pkgname">ip 0.1</b></li>
<li>package require <b class="pkgname">platform 0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::cat</b> <i class="arg">filename</i></a></li>
<li><a href="#2"><b class="cmd">::nettool::allocate_port</b> <i class="arg">startingport</i></a></li>
<li><a href="#3"><b class="cmd">::nettool::arp_table</b></a></li>
<li><a href="#4"><b class="cmd">::nettool::broadcast_list</b></a></li>
<li><a href="#5"><b class="cmd">::nettool::claim_port</b> <i class="arg">port</i> <span class="opt">?<i class="arg">protocol</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::nettool::cpuinfo</b> <i class="arg">args</i></a></li>
<li><a href="#7"><b class="cmd">::nettool::find_port</b> <i class="arg">startingport</i></a></li>
<li><a href="#8"><b class="cmd">::nettool::hwid_list</b></a></li>
<li><a href="#9"><b class="cmd">::nettool::ip_list</b></a></li>
<li><a href="#10"><b class="cmd">::nettool::mac_list</b></a></li>
<li><a href="#11"><b class="cmd">::nettool::network_list</b></a></li>
<li><a href="#12"><b class="cmd">::nettool::port_busy</b> <i class="arg">port</i></a></li>
<li><a href="#13"><b class="cmd">::nettool::release_port</b> <i class="arg">port</i> <span class="opt">?<i class="arg">protocol</i>?</span></a></li>
<li><a href="#14"><b class="cmd">::nettool::status</b></a></li>
<li><a href="#15"><b class="cmd">::nettool::user_data_root</b> <i class="arg">appname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">nettool</b> package consists of a Pure-tcl set of tools
to perform common network functions that would normally require
different packages or calls to exec, in a standard Tcl interface.
At present nettool has reference implementations for the following operating
systems: Windows, MacOSX, and Linux (debian).</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::cat</b> <i class="arg">filename</i></a></dt>
<dd><p>Dump the contents of a file as a result.</p></dd>
<dt><a name="2"><b class="cmd">::nettool::allocate_port</b> <i class="arg">startingport</i></a></dt>
<dd><p>Attempt to allocate <i class="arg">startingport</i>, or, if busy, advance the port
number sequentially until a free port is found, and claim that port.
This command uses a built-in database of known ports to avoid returning a
port which is in common use. (For example: http (80))</p></dd>
<dt><a name="3"><b class="cmd">::nettool::arp_table</b></a></dt>
<dd><p>Dump the contents of this computer's Address Resolution Protocol (ARP) table.
The result will be a Tcl formatted list: <i class="arg">macid</i> <i class="arg">ipaddrlist</i> ...</p></dd>
<dt><a name="4"><b class="cmd">::nettool::broadcast_list</b></a></dt>
<dd><p>Returns a list of broadcast addresses (suitable for UDP multicast)
that this computer is associated with.</p></dd>
<dt><a name="5"><b class="cmd">::nettool::claim_port</b> <i class="arg">port</i> <span class="opt">?<i class="arg">protocol</i>?</span></a></dt>
<dd><p>Mark <i class="arg">port</i> as busy, optionally as either <b class="const">tcp</b> (default) or <b class="const">udp</b>.</p></dd>
<dt><a name="6"><b class="cmd">::nettool::cpuinfo</b> <i class="arg">args</i></a></dt>
<dd><p>If no arguments are given, return a key/value list describing the
CPU of the present machine. Included in the matrix is info on the number
of cores/processors that are available for parallel tasking, installed physical
RAM, and processor family.</p>
<p>The exact contents are platform specific.</p>
<p>For Linux, information is drawn from /proc/cpuinfo and /proc/meminfo.</p>
<p>For MacOSX, information is drawn from sysctl</p>
<p>For Windows, information is draw from TWAPI.</p>
<p>If arguments are given, the result with be a key/value list limited to the
fields requested.</p>
<p>Canonical fields for all platforms:</p>
<dl class="doctools_definitions">
<dt>cpus</dt>
<dd><p>Count of CPUs/cores/execution units</p></dd>
<dt>speed</dt>
<dd><p>Clock speed of processor(s) in Mhz</p></dd>
<dt>memory</dt>
<dd><p>Installed RAM (in MB)</p></dd>
<dt>vendor</dt>
<dd><p>Manufacturer</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::nettool::find_port</b> <i class="arg">startingport</i></a></dt>
<dd><p>Return <i class="arg">startingport</i> if it is available, or the next free port after
<i class="arg">startingport</i>. Note: Unlike <b class="cmd">::nettool::allocate_port</b>, this
command does not claim the port.</p>
<p>This command uses a built-in database of known ports to avoid returning a
port which is in common use. (For example: http (80))</p></dd>
<dt><a name="8"><b class="cmd">::nettool::hwid_list</b></a></dt>
<dd><p>Return a list of hardware specific identifiers from this computer. The source
and content will vary by platform.</p>
<p>For MacOSX, the motherboard serial number and macids for all network devices is returned.</p>
<p>For Windows, the volume serial number of C and macids for all network devices is returned.</p>
<p>For Linux, macids for all network devices is returned.</p></dd>
<dt><a name="9"><b class="cmd">::nettool::ip_list</b></a></dt>
<dd><p>Return a list of IP addresses associated with this computer.</p></dd>
<dt><a name="10"><b class="cmd">::nettool::mac_list</b></a></dt>
<dd><p>Return a list of MACIDs for the network cards attached to this machine. The MACID of the
primary network card is returned first.</p></dd>
<dt><a name="11"><b class="cmd">::nettool::network_list</b></a></dt>
<dd><p>Return a list of networks associated with this computer. Networks are formated with
<b class="cmd">ip::nativeToPrefix</b>.</p></dd>
<dt><a name="12"><b class="cmd">::nettool::port_busy</b> <i class="arg">port</i></a></dt>
<dd><p>Return true if <i class="arg">port</i> is claimed, false otherwise.</p></dd>
<dt><a name="13"><b class="cmd">::nettool::release_port</b> <i class="arg">port</i> <span class="opt">?<i class="arg">protocol</i>?</span></a></dt>
<dd><p>Mark <i class="arg">port</i> as not busy, optionally as either <b class="const">tcp</b> (default) or <b class="const">udp</b>.</p></dd>
<dt><a name="14"><b class="cmd">::nettool::status</b></a></dt>
<dd><p>Return a key/value list describing the status of the computer. The output
is designed to be comparable to the output of <b class="cmd">top</b> for all platforms.</p>
<p>Common fields include:</p>
<dl class="doctools_definitions">
<dt>load</dt>
<dd><p>Processes per processing unit</p></dd>
<dt>memory_total</dt>
<dd><p>Total physical RAM (MB)</p></dd>
<dt>memory_free</dt>
<dd><p>Total physical RAM unused (MB)</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::nettool::user_data_root</b> <i class="arg">appname</i></a></dt>
<dd><p>Return a fully qualified path to a folder where <i class="arg">appname</i> should store it's data.
The path is not created, only computed, by this command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>odie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key524">nettool</a>, <a href="../../../../index.html#key255">odie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>System</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/nmea/nmea.html.









































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<div class='fossil-doc' data-title='nmea - NMEA protocol implementation'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nmea(n) 1.0.0 tcllib &quot;NMEA protocol implementation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nmea - Process NMEA data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">nmea <span class="opt">?1.0.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::nmea::input</b> <i class="arg">sentence</i></a></li>
<li><a href="#2"><b class="cmd">::nmea::open_port</b> <i class="arg">port</i> <span class="opt">?speed?</span></a></li>
<li><a href="#3"><b class="cmd">::nmea::close_port</b></a></li>
<li><a href="#4"><b class="cmd">::nmea::configure_port</b> <i class="arg">settings</i></a></li>
<li><a href="#5"><b class="cmd">::nmea::open_file</b> <i class="arg">file</i> <span class="opt">?rate?</span></a></li>
<li><a href="#6"><b class="cmd">::nmea::close_file</b></a></li>
<li><a href="#7"><b class="cmd">::nmea::do_line</b></a></li>
<li><a href="#8"><b class="cmd">::nmea::rate</b></a></li>
<li><a href="#9"><b class="cmd">::nmea::log</b> <span class="opt">?file?</span></a></li>
<li><a href="#10"><b class="cmd">::nmea::checksum</b> <i class="arg">data</i></a></li>
<li><a href="#11"><b class="cmd">::nmea::write</b> <i class="arg">sentence</i> <i class="arg">data</i></a></li>
<li><a href="#12"><b class="cmd">::nmea::event</b> <i class="arg">setence</i> <span class="opt">?command?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a standard interface for writing software which recieves
NMEA standard input data. It allows for reading data from COM ports, files,
or programmatic input. It also supports the checksumming and logging of incoming data.
After parsing, input is dispatched to user defined handler commands for processing.
To define a handler, see the <b class="cmd"><a href="../../../../index.html#key542">event</a></b> command. There are no GPS specific functions
in this package. NMEA data consists of a sentence type, followed by a list of data.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::nmea::input</b> <i class="arg">sentence</i></a></dt>
<dd><p>Processes and dispatches the supplied sentence. If <i class="arg">sentence</i> contains no commas it is treated as a Tcl list, otherwise it must be standard comma delimited NMEA data, with an optional checksum and leading <b class="const">$</b>.</p>
<pre class="doctools_example">
nmea::input {$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39}
nmea::input [list GPGSA A 3 04 05  09 12 &quot;&quot; &quot;&quot; 24 &quot;&quot; &quot;&quot; &quot;&quot;  2.5 1.3 2.1]
</pre>
</dd>
<dt><a name="2"><b class="cmd">::nmea::open_port</b> <i class="arg">port</i> <span class="opt">?speed?</span></a></dt>
<dd><p>Open the specified COM port and read NMEA sentences when available. Port speed is set to
4800bps by default or to <i class="arg">speed</i>.</p></dd>
<dt><a name="3"><b class="cmd">::nmea::close_port</b></a></dt>
<dd><p>Close the com port connection if one is open.</p></dd>
<dt><a name="4"><b class="cmd">::nmea::configure_port</b> <i class="arg">settings</i></a></dt>
<dd><p>Changes the current port settings. <i class="arg">settings</i> has the same format as fconfigure -mode.</p></dd>
<dt><a name="5"><b class="cmd">::nmea::open_file</b> <i class="arg">file</i> <span class="opt">?rate?</span></a></dt>
<dd><p>Open file <i class="arg">file</i> and read NMEA sentences, one per line, at the rate specified by <span class="opt">?rate?</span> in milliseconds.
The file format may omit the leading <b class="const">$</b> and/or the checksum. If rate is &lt;= 0 (the default) then lines
will only be processed when a call to <b class="cmd">do_line</b> is made.</p></dd>
<dt><a name="6"><b class="cmd">::nmea::close_file</b></a></dt>
<dd><p>Close the open file if one exists.</p></dd>
<dt><a name="7"><b class="cmd">::nmea::do_line</b></a></dt>
<dd><p>If there is a currently open file, this command will read and process a single line from it.
Returns the number of lines read.</p></dd>
<dt><a name="8"><b class="cmd">::nmea::rate</b></a></dt>
<dd><p>Sets the rate at which lines are processed from the open file, in milliseconds. The rate remains
consistant across files, there does not need to be a file currently open to use this command.
Set to 0 to disable automatic line processing.</p></dd>
<dt><a name="9"><b class="cmd">::nmea::log</b> <span class="opt">?file?</span></a></dt>
<dd><p>Starts or stops input logging. If a file name is specified then all NMEA data recieved on
the open port will be logged to the <span class="opt">?file?</span> in append mode. If file is an empty string then
any logging will be stopped. If no file is specified then returns a boolean value indicating
if logging is currently enabled. Data written to the port by <b class="cmd">write</b>,
 data read from files, or input made using <b class="cmd">input</b>, is not logged.</p></dd>
<dt><a name="10"><b class="cmd">::nmea::checksum</b> <i class="arg">data</i></a></dt>
<dd><p>Returns the checksum of the supplied data.</p></dd>
<dt><a name="11"><b class="cmd">::nmea::write</b> <i class="arg">sentence</i> <i class="arg">data</i></a></dt>
<dd><p>If there is a currently open port, this command will write the specified sentence and data to the port
in proper NMEA checksummed format.</p></dd>
<dt><a name="12"><b class="cmd">::nmea::event</b> <i class="arg">setence</i> <span class="opt">?command?</span></a></dt>
<dd><p>Registers a handler proc for a given NMEA <i class="arg">sentence</i>. There may be at most one handler per
sentence, any existing handler is replaced.
If no command is specified, returns the name of the current handler for the given <i class="arg">setence</i>
or an empty string if none exists. In addition to the incoming sentences there are 2 builtin types,
EOF and DEFAULT. The handler for the DEFAULT setence is invoked if there is not a specific handler
for that sentence. The EOF handler is invoked when End Of File is reached on the open file or port.</p>
<p>The handler procedures, with the exception of the builtin types,must take exactly one argument,
which is a list of the data values.
The DEFAULT handler should have two arguments, the sentence type and the data values.
The EOF handler has no arguments.</p>
<pre class="doctools_example">
nmea::event gpgsa parse_sat_detail
nmea::event default handle_unknown
proc parse_sat_detail {data} {
    puts [lindex $data 1]
}
proc handle_unknown {name data} {
    puts &quot;unknown data type $name&quot;
}
</pre>
</dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nmea</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key408">gps</a>, <a href="../../../../index.html#key407">nmea</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009, Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/nns/nns_auto.html.





















































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<div class='fossil-doc' data-title='nameserv::auto - Name service facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::auto(n) 0.3 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::auto - Name service facility, Client Extension</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">OPTIONS</a></li>
<li class="doctools_section"><a href="#section4">EVENTS</a></li>
<li class="doctools_section"><a href="#section5">DESIGN</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">nameserv::auto <span class="opt">?0.3?</span></b></li>
<li>package require <b class="pkgname">nameserv</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Please read the document <i class="term"><a href="nns_intro.html">Name service facility, introduction</a></i>
first.</p>
<p>This package provides the <em>exact</em> same API as is provided by
package <b class="package"><a href="nns_client.html">nameserv</a></b>, i.e. the regular name service client. It
differs from the former by taking measures to ensure that longer-lived
data, i.e. bound names, continuous and unfullfilled async searches,
survive the loss of the connection to the name server as much as is
possible.</p>
<p>This means that the bound names and continuous and unfullfilled async
searches are remembered client-side and automatically re-entered into
the server when the connection comes back after its loss. For bound
names there is one important limitation to such restoration: It is
possible that a name of this client was bound by a different client
while the connection was gone. Such names are fully lost, and the best
the package can and will do is to inform the user of this.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The user-visible API is mainly identical to the API of <b class="package"><a href="nns_client.html">nameserv</a></b>
and is therefore not described here. Please read the documentation of
<b class="package"><a href="nns_client.html">nameserv</a></b>.</p>
<p>The differences are explained below, in the sections <span class="sectref"><a href="#section3">OPTIONS</a></span> and
<span class="sectref"><a href="#section4">EVENTS</a></span>.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">OPTIONS</a></h2>
<p>This package supports all the options of package <b class="package"><a href="nns_client.html">nameserv</a></b>,
plus one more. The additional option allows the user to specify the
time interval between attempts to restore a lost connection.</p>
<dl class="doctools_options">
<dt><b class="option">-delay</b> <i class="arg">milliseconds</i></dt>
<dd><p>The value of this option is an integer value &gt; 0 which specifies the
interval to wait between attempts to restore a lost connection, in
milliseconds. The default value is <b class="const">1000</b>, i.e. one second.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EVENTS</a></h2>
<p>This package generates all of the events of package <b class="package"><a href="nns_client.html">nameserv</a></b>,
plus two more. Both events are generated for the tag <i class="term"><a href="nns_client.html">nameserv</a></i>.</p>
<dl class="doctools_definitions">
<dt><i class="term">lost-name</i></dt>
<dd><p>This event is generated when a bound name is truly lost, i.e. could
not be restored after the temporary loss of the connection to the name
server. It indicates that a different client took ownership of the
name while this client was out of contact.</p>
<p>The detail information of the event will be a Tcl dictionary
containing two keys, <b class="const">name</b>, and <b class="const">data</b>. Their values hold
all the information about the lost name.</p></dd>
<dt><i class="term">re-connection</i></dt>
<dd><p>This event is generated when the connection to the server is
restored. The remembered data has been restored when the event is
posted.</p>
<p>The event has no detail information.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">DESIGN</a></h2>
<p>The package is implemented on top of the regular nameservice client,
i.e. package <b class="package"><a href="nns_client.html">nameserv</a></b>. It detects the loss of the
connection by listening for <i class="term">lost-connection</i> events, on the tag
<i class="term"><a href="nns_client.html">nameserv</a></i>.</p>
<p>It reacts to such events by starting a periodic timer and trying to
reconnect to the server whenver this timer triggers. On success the
timer is canceled, a <i class="term">re-connection</i> event generated, and the
package proceeds to re-enter the remembered bound names and continuous
searches.</p>
<p>Another loss of the connection, be it during or after re-entering the
remembered information simply restarts the timer and subsequent
reconnection attempts.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="nns_client.html">nameserv(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key515">automatic</a>, <a href="../../../../index.html#key30">client</a>, <a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key514">reconnect</a>, <a href="../../../../index.html#key513">restore</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/nns/nns_client.html.



















































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
<div class='fossil-doc' data-title='nameserv - Name service facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv(n) 0.4.2 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv - Name service facility, Client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">CONNECTION HANDLING</a></li>
<li class="doctools_section"><a href="#section4">EVENTS</a></li>
<li class="doctools_section"><a href="#section5">OPTIONS</a></li>
<li class="doctools_section"><a href="#section6">ASYNCHRONOUS AND CONTINUOUS SEARCHES</a></li>
<li class="doctools_section"><a href="#section7">HISTORY</a></li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">nameserv <span class="opt">?0.4.2?</span></b></li>
<li>package require <b class="pkgname">comm</b></li>
<li>package require <b class="pkgname">logger</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::nameserv::bind</b> <i class="arg">name</i> <i class="arg">data</i></a></li>
<li><a href="#2"><b class="cmd">::nameserv::release</b></a></li>
<li><a href="#3"><b class="cmd">::nameserv::search</b> <span class="opt">?<b class="option">-async</b>|<b class="option">-continuous</b>?</span> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::nameserv::protocol</b></a></li>
<li><a href="#5"><b class="cmd">::nameserv::server_protocol</b></a></li>
<li><a href="#6"><b class="cmd">::nameserv::server_features</b></a></li>
<li><a href="#7"><b class="cmd">::nameserv::cget</b> <b class="option">-option</b></a></li>
<li><a href="#8"><b class="cmd">::nameserv::configure</b></a></li>
<li><a href="#9"><b class="cmd">::nameserv::configure</b> <b class="option">-option</b></a></li>
<li><a href="#10"><b class="cmd">::nameserv::configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></li>
<li><a href="#11"><b class="cmd">$result</b> <b class="method">destroy</b></a></li>
<li><a href="#12"><b class="cmd">$result</b> <b class="method">filled</b></a></li>
<li><a href="#13"><b class="cmd">$result</b> <b class="method">get</b> <i class="arg">name</i></a></li>
<li><a href="#14"><b class="cmd">$result</b> <b class="method">names</b></a></li>
<li><a href="#15"><b class="cmd">$result</b> <b class="method">size</b></a></li>
<li><a href="#16"><b class="cmd">$result</b> <b class="method">getall</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Please read <i class="term"><a href="nns_intro.html">Name service facility, introduction</a></i> first.</p>
<p>This package provides a client for the name service facility
implemented by the package <b class="package"><a href="nns_server.html">nameserv::server</a></b>.</p>
<p>This service is built in top of and for the package <b class="package"><a href="../comm/comm.html">comm</a></b>.
It has nothing to do with the Internet's Domain Name System. If the
reader is looking for a package dealing with that please see Tcllib's
packages <b class="package"><a href="../dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports eight commands, as specified below:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::nameserv::bind</b> <i class="arg">name</i> <i class="arg">data</i></a></dt>
<dd><p>The caller of this command registers the given <i class="arg">name</i> as its name
in the configured name service, and additionally associates a piece of
<i class="arg">data</i> with it. The service does nothing with this information
beyond storing it and delivering it as part of search results. The
meaning is entirely up to the applications using the name service.</p>
<p>A generally useful choice would for example be an identifier for a
communication endpoint managed by the package <b class="package"><a href="../comm/comm.html">comm</a></b>. Anybody
retrieving the name becomes immediately able to talk to this endpoint,
i.e. the registering application.</p>
<p>Of further importance is that a caller can register itself under more
than one name, and each name can have its own piece of <i class="arg">data</i>.</p>
<p>Note that the name service, and thwerefore this command, will throw an
error if the chosen name is already registered.</p></dd>
<dt><a name="2"><b class="cmd">::nameserv::release</b></a></dt>
<dd><p>Invoking this command releases all names (and their data) registered
by all previous calls to <b class="cmd">::nameserv::bind</b> of this client. Note
that the name service will run this command implicitly when it loses
the connection to this client.</p></dd>
<dt><a name="3"><b class="cmd">::nameserv::search</b> <span class="opt">?<b class="option">-async</b>|<b class="option">-continuous</b>?</span> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This command searches the name service for all registered names
matching the specified glob-<i class="arg">pattern</i>. If not specified the
pattern defaults to <b class="const">*</b>, matching everything. The result of the
command is a dictionary mapping the matching names to the data
associated with them at <i class="term"><a href="../../../../index.html#key714">bind</a></i>-time.</p>
<p>If either option <b class="option">-async</b> or <b class="option">-continuous</b> were
specified the result of this command changes and becomes the Tcl
command of an object holding the actual result.
These two options are supported if and only if the service the client
is connected to supports the protocol feature
<i class="term">Search/Continuous</i>.</p>
<p>For <b class="option">-async</b> the result object is asynchronously filled with
the entries matching the pattern at the time of the search and then
not modified any more.
The option <b class="option">-continuous</b> extends this behaviour by additionally
continuously monitoring the service for the addition and removal of
entries which match the pattern, and updating the object's contents
appropriately.</p>
<p><em>Note</em> that the caller is responsible for configuring the object
with a callback for proper notification when the current result (or
further changes) arrive.</p>
<p>For more information about this object see section
<span class="sectref"><a href="#section6">ASYNCHRONOUS AND CONTINUOUS SEARCHES</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::nameserv::protocol</b></a></dt>
<dd><p>This command returns the highest version of the name service protocol
supported by the package.</p></dd>
<dt><a name="5"><b class="cmd">::nameserv::server_protocol</b></a></dt>
<dd><p>This command returns the highest version of the name service protocol
supported by the name service the client is currently connected to.</p></dd>
<dt><a name="6"><b class="cmd">::nameserv::server_features</b></a></dt>
<dd><p>This command returns a list containing the names of the features of
the name service protocol which are supported by the name service the
client is currently connected to.</p></dd>
<dt><a name="7"><b class="cmd">::nameserv::cget</b> <b class="option">-option</b></a></dt>
<dd><p>This command returns the currently configured value for the specified
<b class="option">-option</b>. The list of supported options and their meaning can
be found in section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p></dd>
<dt><a name="8"><b class="cmd">::nameserv::configure</b></a></dt>
<dd><p>In this form the command returns a dictionary of all supported
options, and their current values. The list of supported options and
their meaning can be found in section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p></dd>
<dt><a name="9"><b class="cmd">::nameserv::configure</b> <b class="option">-option</b></a></dt>
<dd><p>In this form the command is an alias for
&quot;<b class="cmd">::nameserv::cget</b> <b class="option">-option</b>]&quot;.
The list of supported options and their meaning can be found in
section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p></dd>
<dt><a name="10"><b class="cmd">::nameserv::configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>In this form the command is used to configure one or more of the
supported options. At least one option has to be specified, and each
option is followed by its new value.
The list of supported options and their meaning can be found in
section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p>
<p>This form can be used only as long as the client has not contacted the
name service yet. After contact has been made reconfiguration is not
possible anymore. This means that this form of the command is for the
initalization of the client before it use.
The command forcing a contact with the name service are</p>
<dl class="doctools_commands">
<dt><b class="cmd"><a href="../../../../index.html#key714">bind</a></b></dt>
<dd></dd>
<dt><b class="cmd">release</b></dt>
<dd></dd>
<dt><b class="cmd">search</b></dt>
<dd></dd>
<dt><b class="cmd">server_protocol</b></dt>
<dd></dd>
<dt><b class="cmd">server_features</b></dt>
<dd></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CONNECTION HANDLING</a></h2>
<p>The client automatically connects to the service when one of the
commands below is run for the first time, or whenever one of the
commands is run after the connection was lost, when it was lost.</p>
<dl class="doctools_commands">
<dt><b class="cmd"><a href="../../../../index.html#key714">bind</a></b></dt>
<dd></dd>
<dt><b class="cmd">release</b></dt>
<dd></dd>
<dt><b class="cmd">search</b></dt>
<dd></dd>
<dt><b class="cmd">server_protocol</b></dt>
<dd></dd>
<dt><b class="cmd">server_features</b></dt>
<dd></dd>
</dl>
<p>Since version 0.2 of the client it will generate an event when the
connection is lost, allowing higher layers to perform additional
actions. This is done via the support package <b class="package"><a href="../uev/uevent.html">uevent</a></b>. This
and all other name service related packages hereby reserve the
uevent-tag <i class="term">nameserv</i>. All their events will be posted to that
tag.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EVENTS</a></h2>
<p>This package generates only one event, <i class="term">lost-connection</i>. The
detail information provided to that event is a Tcl dictionary. The
only key contained in the dictionnary is <b class="const">reason</b>, and its value
will be a string describing why the connection was lost.
This string is supplied by the underlying communication package,
i.e. <b class="package"><a href="../comm/comm.html">comm</a></b>.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">OPTIONS</a></h2>
<p>The options supported by the client are for the specification of which
name service to contact, i.e. of the location of the name service.
They are:</p>
<dl class="doctools_options">
<dt><b class="option">-host</b> <i class="arg">name</i>|<i class="arg">ipaddress</i></dt>
<dd><p>This option specifies the host name service to contact is running on,
either by <i class="arg">name</i>, or by <i class="arg">ipaddress</i>. The initial default is
<b class="const">localhost</b>, i.e. it is expected to contact a name service
running on the same host as the application using this package.</p></dd>
<dt><b class="option">-port</b> <i class="arg">number</i></dt>
<dd><p>This option specifies the port the name service to contact is
listening on. It has to be a positive integer number (&gt; 0) not greater
than 65536 (unsigned short). The initial default is the number
returned by the command <b class="cmd">::nameserv::common::port</b>, as provided by
the package <b class="package">::nameserv::common</b>.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">ASYNCHRONOUS AND CONTINUOUS SEARCHES</a></h2>
<p>Asynchronous and continuous searches are invoked by using either
option <b class="option">-async</b> or <b class="option">-continuous</b> as argument to the
command <b class="cmd">::nameserv::search</b>.</p>
<p><em>Note</em> that these two options are supported if and only if the
service the client is connected to supports the protocol feature
<i class="term">Search/Continuous</i>. The service provided by the package
<b class="package">::nameserv::server</b> does this since version 0.3.</p>
<p>For such searches the result of the search command is the Tcl command
of an object holding the actual result. The API provided by these
objects is:</p>
<dl class="doctools_definitions">
<dt>Options:</dt>
<dd><dl class="doctools_options">
<dt><b class="option">-command</b> <i class="arg">command_prefix</i></dt>
<dd><p>This option has to be set if a user of the result object wishes to get
asynchronous notifications when the search result or changes to it
arrive.</p>
<p><em>Note</em> that while it is possible to poll for the arrival of the
initial search result via the method <b class="method">filled</b>, and for
subsequent changes by comparing the output of method <b class="method">getall</b>
against a saved copy, this is not the recommended behaviour. Setting
the <b class="option">-command</b> callback and processing the notifications as
they arrive is much more efficient.</p>
<p>The <i class="arg">command_prefix</i> is called with two arguments, the type of
change, and the data of the change. The type is either <b class="const">add</b> or
<b class="const">remove</b>, indicating new data, or deleted data, respectively.
The data of the change is always a dictionary listing the
added/removed names and their associated data.</p>
<p>The first change reported for a search is always the set of matching
entries at the time of the search.</p></dd>
</dl></dd>
<dt>Methods:</dt>
<dd><dl class="doctools_definitions">
<dt><a name="11"><b class="cmd">$result</b> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the object and cancels any continuous monitoring of the
service the object may have had active.</p></dd>
<dt><a name="12"><b class="cmd">$result</b> <b class="method">filled</b></a></dt>
<dd><p>The result is a boolean value indicating whether the search result has
already arrived (<b class="const">True</b>), or not (<b class="const">False</b>).</p></dd>
<dt><a name="13"><b class="cmd">$result</b> <b class="method">get</b> <i class="arg">name</i></a></dt>
<dd><p>Returns the data associated with the given <i class="arg">name</i> at
<i class="term"><a href="../../../../index.html#key714">bind</a></i>-time.</p></dd>
<dt><a name="14"><b class="cmd">$result</b> <b class="method">names</b></a></dt>
<dd><p>Returns a list containing all names known to the object at the time of
the invokation.</p></dd>
<dt><a name="15"><b class="cmd">$result</b> <b class="method">size</b></a></dt>
<dd><p>Returns an integer value specifying the size of the result at the time
of the invokation.</p></dd>
<dt><a name="16"><b class="cmd">$result</b> <b class="method">getall</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a dictionary containing the search result at the time of the
invokation, mapping the matching names to the data associated with
them at <i class="term"><a href="../../../../index.html#key714">bind</a></i>-time.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">HISTORY</a></h2>
<dl class="doctools_definitions">
<dt>0.3.1</dt>
<dd><p>Fixed SF Bug 1954771.</p></dd>
<dt>0.3</dt>
<dd><p>Extended the client with the ability to perform asynchronous and
continuous searches.</p></dd>
<dt>0.2</dt>
<dd><p>Extended the client with the ability to generate events when it loses
its connection to the name service. Based on package <b class="package"><a href="../uev/uevent.html">uevent</a></b>.</p></dd>
<dt>0.1</dt>
<dd><p>Initial implementation of the client.</p></dd>
</dl>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="nns_common.html">nameserv::common(n)</a>, <a href="nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key30">client</a>, <a href="../../../../index.html#key29">name service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/nns/nns_common.html.



















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<div class='fossil-doc' data-title='nameserv::common - Name service facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::common(n) 0.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::common - Name service facility, shared definitions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">nameserv::common <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::nameserv::common::port</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Please read <i class="term"><a href="nns_intro.html">Name service facility, introduction</a></i> first.</p>
<p>This package is internal and of no interest to users. It provides the
commands of the name service facility which are shared by the client
and server implemented by the packages <b class="package"><a href="nns_server.html">nameserv::server</a></b> and
<b class="package"><a href="nns_client.html">nameserv</a></b> (the client).</p>
<p>This service is built in top of and for the package <b class="package"><a href="../comm/comm.html">comm</a></b>.
It has nothing to do with the Internet's Domain Name System. If the
reader is looking for a package dealing with that please see Tcllib's
packages <b class="package"><a href="../dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports a single command, as specified below:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::nameserv::common::port</b></a></dt>
<dd><p>The result returned by the command is the id of the default TCP/IP
port a nameservice server will listen on, and a name service client
will try to connect to.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>nameserv::client(n), <a href="nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key30">client</a>, <a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key65">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/nns/nns_intro.html.































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

<div class='fossil-doc' data-title='nns_intro - Name service facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nns_intro(n) 1.0 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nns_intro - Name service facility, introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Applications</a></li>
<li class="doctools_section"><a href="#section3">Packages</a></li>
<li class="doctools_section"><a href="#section4">Internals</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../apps/nns.html">nns</a></i> (short for <em>nano nameservice</em>) is a facility built
for the package <b class="package"><a href="../comm/comm.html">comm</a></b>, adding a simple name service to it.
It is also built on top of <b class="package"><a href="../comm/comm.html">comm</a></b>, using it for the exchange
of messages between the client and server parts.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../../index.html#key599">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<p>Tcllib provides 2 applications and 4 packages which are working
together and provide access to the facility at different levels.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Applications</a></h2>
<p>The application <b class="syscmd"><a href="../../apps/nnsd.html">nnsd</a></b> provides a simple name server which can
be run by anybody anywhere on their system, as they see fit.
It is also an example on the use of the server-side package
<b class="package"><a href="nns_server.html">nameserv::server</a></b>.</p>
<p>Complementing this server is the <b class="syscmd"><a href="../../apps/nns.html">nns</a></b> client application.
A possible, but no very sensible use would be to enter name/port
bindings into a server from a shell script. Not sensible, as shell
scripts normally do not provide a <b class="package"><a href="../comm/comm.html">comm</a></b>-based service.</p>
<p>The only case for this to make some sense would be in a shell script
wrapped around a Tcl script FOO which is using comm, to register the
listening port used by FOO.
However even there it would much more sensible to extend FOO to use
the nameservice directly. And in regard on how to that <b class="syscmd"><a href="../../apps/nns.html">nns</a></b>
can be used as both example and template.
Beyond that it may also be useful to perform nameservice queries from
shell scripts.</p>
<p>The third application, <b class="syscmd"><a href="../../apps/nnslog.html">nnslog</a></b> is a stripped down form of the
<b class="syscmd"><a href="../../apps/nns.html">nns</a></b> client application. It is reduced to perform a continuous
search for all changes and logs all received events to stdout.</p>
<p>Both clients use the <b class="package"><a href="nns_auto.html">nameserv::auto</a></b> package to automatically
hande the loss and restoration of the connection to the server.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Packages</a></h2>
<p>The two main packages implementing the service are <b class="package"><a href="nns_client.html">nameserv</a></b>
and <b class="package"><a href="nns_server.html">nameserv::server</a></b>, i.e. client and server. The latter has
not much of an API, just enough to start, stop, and configure it. See
the application <b class="syscmd"><a href="../../apps/nnsd.html">nnsd</a></b> on how to use it.</p>
<p>The basic client, in package <b class="package"><a href="nns_client.html">nameserv</a></b>, provides the main API
to manipulate and query the service. An example of its use is the
application <b class="syscmd"><a href="../../apps/nns.html">nns</a></b>.</p>
<p>The second client package, <b class="package"><a href="nns_auto.html">nameserv::auto</a></b> is API compatible
to the basic client, but provides the additional functionality that it
will automatically restore data like bound names when the connection
to the name service was lost and then reestablished. I.e. it
automatically detects the loss of the server and re-enters the data
when the server comes back.</p>
<p>The package <b class="package"><a href="nns_common.html">nameserv::common</a></b> is of no interest to users. It
is an internal package containing code and definitions common to the
packages <b class="package"><a href="nns_client.html">nameserv</a></b> and <b class="package"><a href="nns_server.html">nameserv::server</a></b>.</p>
<p>All packages use the <b class="package"><a href="../uev/uevent.html">uevent</a></b> package for the reporting of
special circumstances via events, and reserve the uevent-tag
<i class="term"><a href="nns_client.html">nameserv</a></i> for their exclusive use. All their events will be
posted to that tag.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Internals</a></h2>
<p>The document <i class="term"><a href="nns_protocol.html">Name service facility, client/server protocol</a></i>
specifies the protocol used by the packages <b class="package"><a href="nns_client.html">nameserv</a></b> and
<b class="package"><a href="nns_server.html">nameserv::server</a></b> to talk to each other. It is of no interest
to users of either the packages or applications.</p>
<p>Developers wishing to modify and/or extend or to just understand the
internals of the nameservice facility however are strongly advised to
read it.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="nns_client.html">nameserv(n)</a>, <a href="nns_auto.html">nameserv::auto(n)</a>, <a href="nns_common.html">nameserv::common(n)</a>, <a href="nns_protocol.html">nameserv::protocol(n)</a>, <a href="nns_server.html">nameserv::server(n)</a>, <a href="../../apps/nnsd.html">nnsd(n)</a>, nss(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key30">client</a>, <a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key65">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/nns/nns_protocol.html.











































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<div class='fossil-doc' data-title='nameserv::protocol - Name service facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::protocol(n) 0.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::protocol - Name service facility, client/server protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Nano Name Service Protocol Version 1</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Basic Layer</a></li>
<li class="doctools_subsection"><a href="#subsection2">Message Layer</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Nano Name Service Protocol Extension: Continuous Search</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="method">Bind</b> <i class="arg">name</i> <i class="arg">data</i></a></li>
<li><a href="#2"><b class="method">Release</b></a></li>
<li><a href="#3"><b class="method">Search</b> <i class="arg">pattern</i></a></li>
<li><a href="#4"><b class="method">ProtocolVersion</b></a></li>
<li><a href="#5"><b class="method">ProtocolFeatures</b></a></li>
<li><a href="#6"><b class="method">Search/Continuous/Start</b> <i class="arg">tag</i> <i class="arg">pattern</i></a></li>
<li><a href="#7"><b class="method">Search/Continuous/Stop</b> <i class="arg">tag</i></a></li>
<li><a href="#8"><b class="method">Search/Continuous/Change</b> <i class="arg">tag</i> <b class="method">add</b>|<b class="method">remove</b> <i class="arg">response</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The packages <b class="package"><a href="nns_server.html">nameserv::server</a></b>, <b class="package"><a href="nns_client.html">nameserv</a></b>, and
<b class="package"><a href="nns_common.html">nameserv::common</a></b> provide a simple unprotected name service
facility for use in small trusted environments.</p>
<p>Please read <i class="term"><a href="nns_intro.html">Name service facility, introduction</a></i> first.</p>
<p>This document contains the specification of the network protocol which
is used by client and server to talk to each other, enabling
implementations of the same protocol in other languages.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Nano Name Service Protocol Version 1</a></h2>
<p>This protocol defines the basic set of messages to be supported by a
name service, also called the <i class="term">Core</i> feature.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Basic Layer</a></h3>
<p>The basic communication between client and server is done using the
remote-execution protocol specified by the Tcl package <b class="package"><a href="../comm/comm.html">comm</a></b>.
The relevant document specifying its on-the-wire protocol can be found
in <i class="term"><a href="../comm/comm_wire.html">comm_wire</a></i>.</p>
<p>All the scripts exchanged via this protocol are single commands in
list form and thus can be interpreted as plain messages instead of as
Tcl commands. The commands/messages specified in the next section are
the only commands understood by the server-side. Command and variable
substitutions are not allowed within the messages, i.e. arguments have
to be literal values.</p>
<p>The protocol is synchronous. I.e. for each message sent a response is
expected, and has to be generated. All messages are sent by the client.
The server does not sent messages, only responses to messages.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Message Layer</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="method">Bind</b> <i class="arg">name</i> <i class="arg">data</i></a></dt>
<dd><p>The client sends this message when it registers itself at the service
with a <i class="arg">name</i> and some associated <i class="arg">data</i>. The server has to
send an error response if the <i class="arg">name</i> is already in use. Otherwise
the response has to be an empty string.</p>
<p>The server has to accept multiple names for the same client.</p></dd>
<dt><a name="2"><b class="method">Release</b></a></dt>
<dd><p>The client sends this message to unregister all names it is known
under at the service. The response has to be an empty string, always.</p></dd>
<dt><a name="3"><b class="method">Search</b> <i class="arg">pattern</i></a></dt>
<dd><p>The client sends this message to search the service for names matching
the glob-<i class="arg">pattern</i>. The response has to be a dictionary containing
the matching names as keys, and mapping them to the data associated
with it at <b class="method">Bind</b>-time.</p></dd>
<dt><a name="4"><b class="method">ProtocolVersion</b></a></dt>
<dd><p>The client sends this message to query the service for the highest
version of the name service protocol it supports. The response has to
be a positive integer number.</p>
<p>Servers supporting only <i class="term">Nano Name Service Protocol Version 1</i>
have to return <b class="const">1</b>.</p></dd>
<dt><a name="5"><b class="method">ProtocolFeatures</b></a></dt>
<dd><p>The client sends this message to query the service for the features of
the name service protocol it supports. The response has to be a
list containing feature names.</p>
<p>Servers supporting only <i class="term">Nano Name Service Protocol Version 1</i>
have to return <b class="const">{Core}</b>.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Nano Name Service Protocol Extension: Continuous Search</a></h2>
<p>This protocol defines an extended set of messages to be supported by a
name service, also called the <i class="term">Search/Continuous</i> feature. This
feature defines additional messages between client and server, and is
otherwise identical to version 1 of the protocol. See the last section
for the details of our foundation.</p>
<p>A service supporting this feature has to put the feature name
<b class="const">Search/Continuous</b> into the list of features returned by the
message <i class="term">ProtocolFeatures</i>.</p>
<p>For this extension the protocol is asynchronous. No direct response is
expected for any of the messages in the extension. Furthermore the
server will start sending messages on its own, instead of only
responses to messages, and the client has to be able to handle these
notifications.</p>
<dl class="doctools_definitions">
<dt><a name="6"><b class="method">Search/Continuous/Start</b> <i class="arg">tag</i> <i class="arg">pattern</i></a></dt>
<dd><p>The client sends this message to start searching the service for names
matching the glob-<i class="arg">pattern</i>.
In contrast to the regular <i class="term">Search</i> request this one asks the
server to continuously monitor the database for the addition and
removal of matching entries and to notify the client of all such
changes. The particular search is identified by the <i class="arg">tag</i>.</p>
<p>No direct response is expected, rather the clients expect to be
notified of changes via explicit <i class="term">Search/Continuous/Result</i>
messages generated by the service.</p>
<p>It is further expected that the <i class="arg">tag</i> information is passed
unchanged to the <i class="term">Search/Continuous/Result</i> messages. This
tagging of the results enables clients to start multiple searches and
distinguish between the different results.</p></dd>
<dt><a name="7"><b class="method">Search/Continuous/Stop</b> <i class="arg">tag</i></a></dt>
<dd><p>The client sends this message to stop the continuous search identified
by the <i class="arg">tag</i>.</p></dd>
<dt><a name="8"><b class="method">Search/Continuous/Change</b> <i class="arg">tag</i> <b class="method">add</b>|<b class="method">remove</b> <i class="arg">response</i></a></dt>
<dd><p>This message is sent by the service to clients with active continuous
searches to transfer found changes. The first such message for a new
continuous search has to contains the current set of matching entries.</p>
<p>To ensure this a service has to generate an <b class="method">add</b>-message with
an empty <i class="arg">response</i> if there were no matching entries at the time.</p>
<p>The <i class="arg">response</i> has to be a dictionary containing the matching
names as keys, and mapping them to the data associated with it at
<b class="method">Bind</b>-time.
The argument coming before the response tells the client whether the
names in the response were added or removed from the service.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../comm/comm_wire.html">comm_wire(n)</a>, <a href="nns_client.html">nameserv(n)</a>, <a href="nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key40">comm</a>, <a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key133">protocol</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/nns/nns_server.html.









































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<div class='fossil-doc' data-title='nameserv::server - Name service facility'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::server(n) 0.3.2 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::server - Name service facility, Server</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">OPTIONS</a></li>
<li class="doctools_section"><a href="#section4">HISTORY</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">nameserv::server <span class="opt">?0.3.2?</span></b></li>
<li>package require <b class="pkgname">comm</b></li>
<li>package require <b class="pkgname">interp</b></li>
<li>package require <b class="pkgname">logger</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::nameserv::server::start</b></a></li>
<li><a href="#2"><b class="cmd">::nameserv::server::stop</b></a></li>
<li><a href="#3"><b class="cmd">::nameserv::server::active?</b></a></li>
<li><a href="#4"><b class="cmd">::nameserv::server::cget</b> <b class="option">-option</b></a></li>
<li><a href="#5"><b class="cmd">::nameserv::server::configure</b></a></li>
<li><a href="#6"><b class="cmd">::nameserv::server::configure</b> <b class="option">-option</b></a></li>
<li><a href="#7"><b class="cmd">::nameserv::server::configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Please read <i class="term"><a href="nns_intro.html">Name service facility, introduction</a></i> first.</p>
<p>This package provides an implementation of the serviver side of the
name service facility queried by the client provided by the package
<b class="package"><a href="nns_client.html">nameserv</a></b>. All information required by the server will be
held in memory. There is no persistent state.</p>
<p>This service is built in top of and for the package <b class="package"><a href="../comm/comm.html">comm</a></b>.
It has nothing to do with the Internet's Domain Name System. If the
reader is looking for a package dealing with that please see Tcllib's
packages <b class="package"><a href="../dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>.</p>
<p>This server supports the <i class="term">Core</i> protocol feature, and since
version 0.3 the <i class="term">Search/Continuous</i> feature as well.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports five commands, as specified below:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::nameserv::server::start</b></a></dt>
<dd><p>This command starts the server and causes it to listen on the
configured port. From now on clients are able to connect and make
requests. The result of the command is the empty string.</p>
<p>Note that any incoming requests will only be handled if the
application the server is part of does enter an event loop after this
command has been run.</p></dd>
<dt><a name="2"><b class="cmd">::nameserv::server::stop</b></a></dt>
<dd><p>Invoking this command stops the server and releases all information it
had. Existing connections are shut down, and no new connections will
be accepted any longer. The result of the command is the empty string.</p></dd>
<dt><a name="3"><b class="cmd">::nameserv::server::active?</b></a></dt>
<dd><p>This command returns a boolean value indicating the state of the
server. The result will be <b class="const">true</b> if the server is active,
i.e. has been started, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="4"><b class="cmd">::nameserv::server::cget</b> <b class="option">-option</b></a></dt>
<dd><p>This command returns the currently configured value for the specified
<b class="option">-option</b>. The list of supported options and their meaning can
be found in section <span class="sectref"><a href="#section3">OPTIONS</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::nameserv::server::configure</b></a></dt>
<dd><p>In this form the command returns a dictionary of all supported
options, and their current values. The list of supported options and
their meaning can be found in section <span class="sectref"><a href="#section3">OPTIONS</a></span>.</p></dd>
<dt><a name="6"><b class="cmd">::nameserv::server::configure</b> <b class="option">-option</b></a></dt>
<dd><p>In this form the command is an alias for
&quot;<b class="cmd">::nameserv::server::cget</b> <b class="option">-option</b>]&quot;.
The list of supported options and their meaning can be found in
section <span class="sectref"><a href="#section3">OPTIONS</a></span>.</p></dd>
<dt><a name="7"><b class="cmd">::nameserv::server::configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>In this form the command is used to configure one or more of the
supported options. At least one option has to be specified, and each
option is followed by its new value.
The list of supported options and their meaning can be found in
section <span class="sectref"><a href="#section3">OPTIONS</a></span>.</p>
<p>This form can be used only if the server is not active, i.e. has not
been started yet, or has been stopped. While the server is active it
cannot be reconfigured.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">OPTIONS</a></h2>
<p>The options supported by the server are for the specification of the
TCP port to listen on, and whether to accept non-local connections or
not.
They are:</p>
<dl class="doctools_options">
<dt><b class="option">-localonly</b> <i class="arg">bool</i></dt>
<dd><p>This option specifies whether to accept only local connections
(-localonly 1) or remote connections as well (-localonly 0). The
default is to accept only local connections.</p></dd>
<dt><b class="option">-port</b> <i class="arg">number</i></dt>
<dd><p>This option specifies the port the name service will listen on after
it has been started. It has to be a positive integer number (&gt; 0) not
greater than 65536 (unsigned short). The initial default is the number
returned by the command <b class="cmd">::nameserv::server::common::port</b>, as
provided by the package <b class="package">::nameserv::server::common</b>.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">HISTORY</a></h2>
<dl class="doctools_definitions">
<dt>0.3</dt>
<dd><p>Extended the server with the ability to perform asynchronous and
continuous searches.</p></dd>
<dt>0.2</dt>
<dd><p>Changed name of -local switch to -localonly.</p></dd>
<dt>0.1</dt>
<dd><p>Initial implementation of the server.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>nameserv::client(n), <a href="nns_common.html">nameserv::common(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key65">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/nntp/nntp.html.





























































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398

<div class='fossil-doc' data-title='nntp - Tcl NNTP Client Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nntp(n) 1.5.1 tcllib &quot;Tcl NNTP Client Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nntp - Tcl client for the NNTP protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLE</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">nntp <span class="opt">?0.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::nntp::nntp</b> <span class="opt">?<i class="arg">host</i>?</span> <span class="opt">?<i class="arg">port</i>?</span> <span class="opt">?<i class="arg">nntpName</i>?</span></a></li>
<li><a href="#2"><i class="arg">nntpName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">nntpName</i> <b class="method">article</b> <span class="opt">?<i class="arg">msgid</i>?</span></a></li>
<li><a href="#4"><i class="arg">nntpName</i> <b class="method">authinfo</b> <span class="opt">?<i class="arg">user</i>?</span> <span class="opt">?<i class="arg">pass</i>?</span></a></li>
<li><a href="#5"><i class="arg">nntpName</i> <b class="method">body</b> <span class="opt">?<i class="arg">msgid</i>?</span></a></li>
<li><a href="#6"><i class="arg">nntpName</i> <b class="method">configure</b></a></li>
<li><a href="#7"><i class="arg">nntpName</i> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#8"><i class="arg">nntpName</i> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i> ...</a></li>
<li><a href="#9"><i class="arg">nntpName</i> <b class="method">cget</b> <i class="arg">option</i></a></li>
<li><a href="#10"><i class="arg">nntpName</i> <b class="method">date</b></a></li>
<li><a href="#11"><i class="arg">nntpName</i> <b class="method">group</b> <span class="opt">?<i class="arg">group</i>?</span></a></li>
<li><a href="#12"><i class="arg">nntpName</i> <b class="method">head</b> <span class="opt">?<i class="arg">msgid</i>?</span></a></li>
<li><a href="#13"><i class="arg">nntpName</i> <b class="method">help</b></a></li>
<li><a href="#14"><i class="arg">nntpName</i> <b class="method">last</b></a></li>
<li><a href="#15"><i class="arg">nntpName</i> <b class="method">list</b></a></li>
<li><a href="#16"><i class="arg">nntpName</i> <b class="method">listgroup</b> <span class="opt">?<i class="arg">group</i>?</span></a></li>
<li><a href="#17"><i class="arg">nntpName</i> <b class="method">mode_reader</b></a></li>
<li><a href="#18"><i class="arg">nntpName</i> <b class="method">newgroups</b> <i class="arg">since</i></a></li>
<li><a href="#19"><i class="arg">nntpName</i> <b class="method">newnews</b></a></li>
<li><a href="#20"><i class="arg">nntpName</i> <b class="method">newnews</b> <i class="arg">since</i></a></li>
<li><a href="#21"><i class="arg">nntpName</i> <b class="method">newnews</b> <i class="arg">group</i> <span class="opt">?<i class="arg">since</i>?</span></a></li>
<li><a href="#22"><i class="arg">nntpName</i> <b class="method">next</b></a></li>
<li><a href="#23"><i class="arg">nntpName</i> <b class="method">post</b> <i class="arg">article</i></a></li>
<li><a href="#24"><i class="arg">nntpName</i> <b class="method">slave</b></a></li>
<li><a href="#25"><i class="arg">nntpName</i> <b class="method">stat</b> <span class="opt">?<i class="arg">msgid</i>?</span></a></li>
<li><a href="#26"><i class="arg">nntpName</i> <b class="method">quit</b></a></li>
<li><a href="#27"><i class="arg">nntpName</i> <b class="method">xgtitle</b> <span class="opt">?<i class="arg">group_pattern</i>?</span></a></li>
<li><a href="#28"><i class="arg">nntpName</i> <b class="method">xhdr</b> <i class="arg">field</i> <span class="opt">?<i class="arg">range</i>?</span></a></li>
<li><a href="#29"><i class="arg">nntpName</i> <b class="method">xover</b> <span class="opt">?<i class="arg">range</i>?</span></a></li>
<li><a href="#30"><i class="arg">nntpName</i> <b class="method">xpat</b> <i class="arg">field</i> <i class="arg">range</i> <span class="opt">?<i class="arg">pattern_list</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">nntp</b> provides a simple Tcl-only client library
for the NNTP protocol.  It works by opening the standard NNTP socket
on the server, and then providing a Tcl API to access the NNTP
protocol commands.  All server errors are returned as Tcl errors
(thrown) which must be caught with the Tcl <b class="cmd">catch</b> command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::nntp::nntp</b> <span class="opt">?<i class="arg">host</i>?</span> <span class="opt">?<i class="arg">port</i>?</span> <span class="opt">?<i class="arg">nntpName</i>?</span></a></dt>
<dd><p>The command opens a socket connection to the specified NNTP server and
creates a new nntp object with an associated global Tcl command whose
name is <i class="arg">nntpName</i>. This command may be used to access the various
NNTP protocol commands for the new connection. The default <i class="arg">port</i>
number is &quot;119&quot; and the default <i class="arg">host</i> is &quot;news&quot;. These defaults
can be overridden with the environment variables <b class="variable">NNTPPORT</b> and
<b class="variable">NNTPHOST</b> respectively.</p>
<p>Some of the commands supported by this package are not part of the
nntp rfc 977 (<a href="http://www.rfc-editor.org/rfc/rfc977.txt">http://www.rfc-editor.org/rfc/rfc977.txt</a>) and will
not be available (or implemented) on all nntp servers.</p>
<p>The access command <i class="arg">nntpName</i> has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">nntpName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl></dd>
<dt><a name="3"><i class="arg">nntpName</i> <b class="method">article</b> <span class="opt">?<i class="arg">msgid</i>?</span></a></dt>
<dd><p>Query the server for article <i class="arg">msgid</i> from the current group.  The article
is returned as a valid tcl list which contains the headers, followed by
a blank line, and then followed by the body of the article. Each element
in the list is one line of the article.</p></dd>
<dt><a name="4"><i class="arg">nntpName</i> <b class="method">authinfo</b> <span class="opt">?<i class="arg">user</i>?</span> <span class="opt">?<i class="arg">pass</i>?</span></a></dt>
<dd><p>Send authentication information (username and password) to the server.</p></dd>
<dt><a name="5"><i class="arg">nntpName</i> <b class="method">body</b> <span class="opt">?<i class="arg">msgid</i>?</span></a></dt>
<dd><p>Query the server for the body of the article <i class="arg">msgid</i> from the current
group.  The body of the article is returned as a valid tcl list. Each element
in the list is one line of the body of the article.</p></dd>
<dt><a name="6"><i class="arg">nntpName</i> <b class="method">configure</b></a></dt>
<dd></dd>
<dt><a name="7"><i class="arg">nntpName</i> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd></dd>
<dt><a name="8"><i class="arg">nntpName</i> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i> ...</a></dt>
<dd></dd>
<dt><a name="9"><i class="arg">nntpName</i> <b class="method">cget</b> <i class="arg">option</i></a></dt>
<dd><p>Query and configure options of the nntp connection object. Currently
only one option is supported, <b class="option">-binary</b>. When set articles are
retrieved as binary data instead of text. The only methods affected by
this are <b class="method">article</b> and <b class="method">body</b>.</p>
<p>One application of this option would be the download of articles
containing yEnc encoded images. Although encoded the data is still
mostly binary and retrieving it as text will corrupt the information.</p>
<p>See package <b class="package"><a href="../base64/yencode.html">yencode</a></b> for both encoder and decoder of such data.</p></dd>
<dt><a name="10"><i class="arg">nntpName</i> <b class="method">date</b></a></dt>
<dd><p>Query the server for the servers current date.  The date is returned in the
format <em>YYYYMMDDHHMMSS</em>.</p></dd>
<dt><a name="11"><i class="arg">nntpName</i> <b class="method">group</b> <span class="opt">?<i class="arg">group</i>?</span></a></dt>
<dd><p>Optionally set the current group, and retrieve information about the
currently selected group.  Returns the estimated number of articles in
the group followed by the number of the first article in the group, followed
by the last article in the group, followed by the name of the group.</p></dd>
<dt><a name="12"><i class="arg">nntpName</i> <b class="method">head</b> <span class="opt">?<i class="arg">msgid</i>?</span></a></dt>
<dd><p>Query the server for the headers of the article <i class="arg">msgid</i> from the current
group.  The headers of the article are returned as a valid tcl list. Each element
in the list is one line of the headers of the article.</p></dd>
<dt><a name="13"><i class="arg">nntpName</i> <b class="method">help</b></a></dt>
<dd><p>Retrieves a list of the commands that are supported by the news server that
is currently attached to.</p></dd>
<dt><a name="14"><i class="arg">nntpName</i> <b class="method">last</b></a></dt>
<dd><p>Sets the current article pointer to point to the previous message (if there is
one) and returns the msgid of that message.</p></dd>
<dt><a name="15"><i class="arg">nntpName</i> <b class="method">list</b></a></dt>
<dd><p>Returns a tcl list of valid newsgroups and associated information.  Each
newsgroup is returned as an element in the tcl list with the following format:</p>
<pre class="doctools_example">
      group last first p
</pre>
<p>where &lt;group&gt; is the name of the newsgroup, &lt;last&gt; is the number of
the last known article currently in that newsgroup, &lt;first&gt; is the
number of the first article currently in the newsgroup, and &lt;p&gt; is
either 'y' or 'n' indicating whether posting to this newsgroup is
allowed ('y') or prohibited ('n').</p>
<p>The &lt;first&gt; and &lt;last&gt; fields will always be numeric.  They may have
leading zeros.  If the &lt;last&gt; field evaluates to less than the
&lt;first&gt; field, there are no articles currently on file in the
newsgroup.</p></dd>
<dt><a name="16"><i class="arg">nntpName</i> <b class="method">listgroup</b> <span class="opt">?<i class="arg">group</i>?</span></a></dt>
<dd><p>Query the server for a list of all the messages (message numbers) in the
group specified by the argument <i class="arg">group</i> or by the current group if
the <i class="arg">group</i> argument was not passed.</p></dd>
<dt><a name="17"><i class="arg">nntpName</i> <b class="method">mode_reader</b></a></dt>
<dd><p>Query the server for its nntp 'MODE READER' response string.</p></dd>
<dt><a name="18"><i class="arg">nntpName</i> <b class="method">newgroups</b> <i class="arg">since</i></a></dt>
<dd><p>Query the server for a list of all the new newsgroups created since the time
specified by the argument <i class="arg">since</i>.  The argument <i class="arg">since</i> can be any
time string that is understood by <b class="cmd">clock scan</b>. The tcl list of newsgroups
is returned in a similar form to the list of groups returned by the
<b class="cmd">nntpName list</b> command.  Each element of the list has the form:</p>
<pre class="doctools_example">
      group last first p
</pre>
<p>where &lt;group&gt; is the name of the newsgroup, &lt;last&gt; is the number of
the last known article currently in that newsgroup, &lt;first&gt; is the
number of the first article currently in the newsgroup, and &lt;p&gt; is
either 'y' or 'n' indicating whether posting to this newsgroup is
allowed ('y') or prohibited ('n').</p></dd>
<dt><a name="19"><i class="arg">nntpName</i> <b class="method">newnews</b></a></dt>
<dd><p>Query the server for a list of new articles posted to the current group in the
last day.</p></dd>
<dt><a name="20"><i class="arg">nntpName</i> <b class="method">newnews</b> <i class="arg">since</i></a></dt>
<dd><p>Query the server for a list of new articles posted to the current group since
the time specified by the argument <i class="arg">since</i>.  The argument <i class="arg">since</i> can
be any time string that is understood by <b class="cmd">clock scan</b>.</p></dd>
<dt><a name="21"><i class="arg">nntpName</i> <b class="method">newnews</b> <i class="arg">group</i> <span class="opt">?<i class="arg">since</i>?</span></a></dt>
<dd><p>Query the server for a list of new articles posted to the group specified by
the argument <i class="arg">group</i> since the time specified by the argument <i class="arg">since</i>
(or in the past day if no <i class="arg">since</i> argument is passed.  The argument
<i class="arg">since</i> can be any time string that is understood by <b class="cmd">clock scan</b>.</p></dd>
<dt><a name="22"><i class="arg">nntpName</i> <b class="method">next</b></a></dt>
<dd><p>Sets the current article pointer to point to the next message (if there is
one) and returns the msgid of that message.</p></dd>
<dt><a name="23"><i class="arg">nntpName</i> <b class="method">post</b> <i class="arg">article</i></a></dt>
<dd><p>Posts an article of the form specified in
RFC 1036 (<a href="http://www.rfc-editor.org/rfc/rfc1036.txt">http://www.rfc-editor.org/rfc/rfc1036.txt</a>, successor
to RFC 850) to the current news group.</p></dd>
<dt><a name="24"><i class="arg">nntpName</i> <b class="method">slave</b></a></dt>
<dd><p>Identifies a connection as being made from a slave nntp server. This might
be used to indicate that the connection is serving multiple people and should
be given priority.  Actual use is entirely implementation dependent and may
vary from server to server.</p></dd>
<dt><a name="25"><i class="arg">nntpName</i> <b class="method">stat</b> <span class="opt">?<i class="arg">msgid</i>?</span></a></dt>
<dd><p>The stat command is similar to the article command except that no
text is returned.  When selecting by message number within a group,
the stat command serves to set the current article pointer without
sending text. The returned acknowledgment response will contain the
message-id, which may be of some value.  Using the stat command to
select by message-id is valid but of questionable value, since a
selection by message-id does NOT alter the &quot;current article pointer&quot;</p></dd>
<dt><a name="26"><i class="arg">nntpName</i> <b class="method">quit</b></a></dt>
<dd><p>Gracefully close the connection after sending a NNTP QUIT command down
the socket.</p></dd>
<dt><a name="27"><i class="arg">nntpName</i> <b class="method">xgtitle</b> <span class="opt">?<i class="arg">group_pattern</i>?</span></a></dt>
<dd><p>Returns a tcl list where each element is of the form:</p>
<pre class="doctools_example">
newsgroup description
</pre>
<p>If a <i class="arg">group_pattern</i> is specified then only newsgroups that match
the pattern will have their name and description returned.</p></dd>
<dt><a name="28"><i class="arg">nntpName</i> <b class="method">xhdr</b> <i class="arg">field</i> <span class="opt">?<i class="arg">range</i>?</span></a></dt>
<dd><p>Returns the specified header field value for the current message or for a
list of messages from the current group.  <i class="arg">field</i> is the title of a
field in the header such as from, subject, date, etc.  If <i class="arg">range</i> is
not specified or is &quot;&quot; then the current message is queried.  The command
returns a list of elements where each element has the form of:</p>
<pre class="doctools_example">
    msgid value
</pre>
<p>Where msgid is the number of the message and value is the value set for the
queried field.  The <i class="arg">range</i> argument can be in any of the following forms:</p>
<dl class="doctools_definitions">
<dt><b class="const">&quot;&quot;</b></dt>
<dd><p>The current message is queried.</p></dd>
<dt><i class="arg">msgid1</i>-<i class="arg">msgid2</i></dt>
<dd><p>All messages between <i class="arg">msgid1</i> and <i class="arg">msgid2</i>
(including <i class="arg">msgid1</i> and <i class="arg">msgid2</i>) are queried.</p></dd>
<dt><i class="arg">msgid1</i> <i class="arg">msgid2</i></dt>
<dd><p>All messages between <i class="arg">msgid1</i> and <i class="arg">msgid2</i>
(including <i class="arg">msgid1</i> and <i class="arg">msgid2</i>) are queried.</p></dd>
</dl></dd>
<dt><a name="29"><i class="arg">nntpName</i> <b class="method">xover</b> <span class="opt">?<i class="arg">range</i>?</span></a></dt>
<dd><p>Returns header information for the current message or for a range of messages
from the current group.  The information is returned in a tcl list
where each element is of the form:</p>
<pre class="doctools_example">
    msgid subject from date idstring bodysize headersize xref
</pre>
<p>If <i class="arg">range</i> is not specified or is &quot;&quot; then the current message is queried.
The <i class="arg">range</i> argument can be in any of the following forms:</p>
<dl class="doctools_definitions">
<dt><b class="const">&quot;&quot;</b></dt>
<dd><p>The current message is queried.</p></dd>
<dt><i class="arg">msgid1</i>-<i class="arg">msgid2</i></dt>
<dd><p>All messages between <i class="arg">msgid1</i> and <i class="arg">msgid2</i>
(including <i class="arg">msgid1</i> and <i class="arg">msgid2</i>) are queried.</p></dd>
<dt><i class="arg">msgid1</i> <i class="arg">msgid2</i></dt>
<dd><p>All messages between <i class="arg">msgid1</i> and <i class="arg">msgid2</i>
(including <i class="arg">msgid1</i> and <i class="arg">msgid2</i>) are queried.</p></dd>
</dl></dd>
<dt><a name="30"><i class="arg">nntpName</i> <b class="method">xpat</b> <i class="arg">field</i> <i class="arg">range</i> <span class="opt">?<i class="arg">pattern_list</i>?</span></a></dt>
<dd><p>Returns the specified header field value for a specified message or for a
list of messages from the current group where the messages match the
pattern(s) given in the pattern_list.  <i class="arg">field</i> is the title of a
field in the header such as from, subject, date, etc.  The information is
returned in a tcl list where each element is of the form:</p>
<pre class="doctools_example">
    msgid value
</pre>
<p>Where msgid is the number of the message and value is the value set for the
queried field.  The <i class="arg">range</i> argument can be in any of the following forms:</p>
<dl class="doctools_definitions">
<dt><i class="arg">msgid</i></dt>
<dd><p>The message specified by <i class="arg">msgid</i> is queried.</p></dd>
<dt><i class="arg">msgid1</i>-<i class="arg">msgid2</i></dt>
<dd><p>All messages between <i class="arg">msgid1</i> and <i class="arg">msgid2</i>
(including <i class="arg">msgid1</i> and <i class="arg">msgid2</i>) are queried.</p></dd>
<dt><i class="arg">msgid1</i> <i class="arg">msgid2</i></dt>
<dd><p>All messages between <i class="arg">msgid1</i> and <i class="arg">msgid2</i>
(including <i class="arg">msgid1</i> and <i class="arg">msgid2</i>) are queried.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLE</a></h2>
<p>A bigger example for posting a single article.</p>
<pre class="doctools_example">
    package require nntp
    set n [nntp::nntp NNTP_SERVER]
    $n post &quot;From: USER@DOMAIN.EXT (USER_FULL)
    Path: COMPUTERNAME!USERNAME
    Newsgroups: alt.test
    Subject: Tcl test post -ignore
    Message-ID: &lt;[pid][clock seconds]
    @COMPUTERNAME&gt;
    Date: [clock format [clock seconds] -format &quot;%a, %d %
    b %y %H:%M:%S GMT&quot; -gmt true]
    Test message body&quot;
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nntp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key532">news</a>, <a href="../../../../index.html#key652">nntp</a>, <a href="../../../../index.html#key655">nntpclient</a>, <a href="../../../../index.html#key653">rfc 1036</a>, <a href="../../../../index.html#key654">rfc 977</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ntp/ntp_time.html.





















































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<div class='fossil-doc' data-title='ntp_time - Network Time Facilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ntp_time(n) 1.2.1 tcllib &quot;Network Time Facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ntp_time - Tcl Time Service Client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">AUTHORS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.0</b></li>
<li>package require <b class="pkgname">time <span class="opt">?1.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::time::gettime</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">timeserver</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::time::getsntp</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">timeserver</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::time::configure</b> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::time::cget</b> <i class="arg">name</i></a></li>
<li><a href="#5"><b class="cmd">::time::unixtime</b> <i class="arg">token</i></a></li>
<li><a href="#6"><b class="cmd">::time::status</b> <i class="arg">token</i></a></li>
<li><a href="#7"><b class="cmd">::time::error</b> <i class="arg">token</i></a></li>
<li><a href="#8"><b class="cmd">::time::reset</b> <i class="arg">token</i> <i class="arg"><span class="opt">?reason?</span></i></a></li>
<li><a href="#9"><b class="cmd">::time::wait</b> <i class="arg">token</i></a></li>
<li><a href="#10"><b class="cmd">::time::cleanup</b> <i class="arg">token</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a client for the RFC 868 TIME protocol
(<a href="http://www.rfc-editor.org/rfc/rfc868.txt">http://www.rfc-editor.org/rfc/rfc868.txt</a>) and also a minimal
client for the RFC 2030 Simple Network Time Protocol
(<a href="http://www.rfc-editor.org/rfc/rfc2030.txt">http://www.rfc-editor.org/rfc/rfc2030.txt</a>).
RFC 868 returns the time in seconds since 1 January 1900
to either tcp or udp clients. RFC 2030 also gives this time but also
provides a fractional part which is not used in this client.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::time::gettime</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">timeserver</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Get the time from <i class="arg">timeserver</i>. You may specify any of the options
listed for the <b class="cmd">configure</b> command here. This command returns a
token which must then be used with the remaining commands in this
package. Once you have finished, you should use <b class="cmd"><a href="../../../../index.html#key158">cleanup</a></b> to
release all resources. The default port is <b class="const">37</b>.</p></dd>
<dt><a name="2"><b class="cmd">::time::getsntp</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">timeserver</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Get the time from an SNTP server. This accepts exactly the same
arguments as <b class="cmd">::time::gettime</b> except that the default port is
<b class="const">123</b>. The result is a token as per <b class="cmd">::time::gettime</b> and
should be handled in the same way.</p>
<p>Note that it is unlikely that any SNTP server will reply using tcp so
you will require the <b class="package">tcludp</b> or the <b class="package">ceptcl</b>
package. If a suitable package can be loaded then the udp protocol
will be used by default.</p></dd>
<dt><a name="3"><b class="cmd">::time::configure</b> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>Called with no arguments this command returns all the current
configuration options and values. Otherwise it should be called with
pairs of option name and value.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">-protocol</b> <i class="arg">number</i></dt>
<dd><p>Set the default network protocol. This defaults to udp if the tcludp
  package is available. Otherwise it will use tcp.</p></dd>
<dt><b class="cmd">-port</b> <i class="arg">number</i></dt>
<dd><p>Set the default port to use. RFC 868 uses port <b class="const">37</b>, RFC 2030 uses
port <b class="const">123</b>.</p></dd>
<dt><b class="cmd">-timeout</b> <i class="arg">number</i></dt>
<dd><p>Set the default timeout value in milliseconds. The default is 10 seconds.</p></dd>
<dt><b class="cmd">-command</b> <i class="arg">number</i></dt>
<dd><p>Set a command procedure to be run when a reply is received. The
  procedure is called with the time token appended to the argument list.</p></dd>
<dt><b class="cmd">-loglevel</b> <i class="arg">number</i></dt>
<dd><p>Set the logging level. The default is 'warning'.</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::time::cget</b> <i class="arg">name</i></a></dt>
<dd><p>Get the current value for the named configuration option.</p></dd>
<dt><a name="5"><b class="cmd">::time::unixtime</b> <i class="arg">token</i></a></dt>
<dd><p>Format the returned time for the unix epoch. RFC 868 time defines
  time 0 as 1 Jan 1900, while unix time defines time 0 as 1 Jan
  1970. This command converts the reply to unix time.</p></dd>
<dt><a name="6"><b class="cmd">::time::status</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the status flag. For a successfully completed query this will be
  <em>ok</em>. May be <em>error</em> or <em>timeout</em> or <em>eof</em>.
  See also <b class="cmd">::time::error</b></p></dd>
<dt><a name="7"><b class="cmd">::time::error</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the error message provided for requests whose status is <em>error</em>.
  If there is no error message then an empty string is returned.</p></dd>
<dt><a name="8"><b class="cmd">::time::reset</b> <i class="arg">token</i> <i class="arg"><span class="opt">?reason?</span></i></a></dt>
<dd><p>Reset or cancel the query optionally specfying the reason to record
  for the <b class="cmd"><a href="../../../../index.html#key161">error</a></b> command.</p></dd>
<dt><a name="9"><b class="cmd">::time::wait</b> <i class="arg">token</i></a></dt>
<dd><p>Wait for a query to complete and return the status upon completion.</p></dd>
<dt><a name="10"><b class="cmd">::time::cleanup</b> <i class="arg">token</i></a></dt>
<dd><p>Remove all state variables associated with the request.</p></dd>
</dl>
<pre class="doctools_example">
% set tok [::time::gettime ntp2a.mcc.ac.uk]
% set t [::time::unixtime $tok]
% ::time::cleanup $tok
</pre>
<pre class="doctools_example">
% set tok [::time::getsntp pool.ntp.org]
% set t [::time::unixtime $tok]
% ::time::cleanup $tok
</pre>
<pre class="doctools_example">
proc on_time {token} {
   if {[time::status $token] eq &quot;ok&quot;} {
      puts [clock format [time::unixtime $token]]
   } else {
      puts [time::error $token]
   }
   time::cleanup $token
}
time::getsntp -command on_time pool.ntp.org
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ntp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>ntp</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key80">NTP</a>, <a href="../../../../index.html#key78">SNTP</a>, <a href="../../../../index.html#key77">rfc 2030</a>, <a href="../../../../index.html#key79">rfc 868</a>, <a href="../../../../index.html#key81">time</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/oauth/oauth.html.





































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306

<div class='fossil-doc' data-title='oauth - oauth'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oauth(n) 1.0 tcllib &quot;oauth&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oauth - oauth API base signature</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section3">Commands</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">oauth <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::oauth::config</b></a></li>
<li><a href="#2"><b class="cmd">::oauth::config</b> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::oauth::header</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::oauth::query</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">oauth</b> package provides a simple Tcl-only library
for communication with <a href="http://oauth.net">oauth</a> APIs.
This current version of the package supports the Oauth 1.0 Protocol,
as specified in <a href="http://tools.ietf.org/rfc/rfc5849.txt">RFC 5849</a>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::oauth::config</b></a></dt>
<dd><p>When this command is invoked without arguments it returns a dictionary
containing the current values of all options.</p></dd>
<dt><a name="2"><b class="cmd">::oauth::config</b> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>When invoked with arguments, options followed by their values, it is used
to set and query various parameters of application and client, like proxy
host and user agent for the HTTP requests. The detailed list of options
is below:</p>
<dl class="doctools_options">
<dt><b class="option">-accesstoken</b> <i class="arg">string</i></dt>
<dd><p>This is the user's token.</p></dd>
<dt><b class="option">-accesstokensecret</b> <i class="arg">string</i></dt>
<dd><p>This is the user's secret token.</p></dd>
<dt><b class="option">-consumerkey</b> <i class="arg">string</i></dt>
<dd><p>This is the public token of your app.</p></dd>
<dt><b class="option">-consumersecret</b> <i class="arg">string</i></dt>
<dd><p>This is the private token of your app.</p></dd>
<dt><b class="option">-debug</b> <i class="arg">bool</i></dt>
<dd><p>The default value is <b class="const">off</b>. If you change this option to <b class="const">on</b>,
the basic signature just created will be printed to stdout, among other
debug output.</p></dd>
<dt><b class="option">-oauthversion</b> <i class="arg">version</i></dt>
<dd><p>This is the version of the OAuth protocol to use.
At the moment only <b class="const">1.0</b> is supported, the default.</p></dd>
<dt><b class="option">-proxyhost</b> <i class="arg">hostname</i></dt>
<dd><p>You can set up a proxy host for send contact the oauth's api server.</p></dd>
<dt><b class="option">-proxyport</b> <i class="arg">port-number</i></dt>
<dd><p>Port number of your proxy.</p></dd>
<dt><b class="option">-signmethod</b> <i class="arg">method</i></dt>
<dd><p>The signature method to use. OAuth 1.0 only supports <b class="const">HMAC-SHA1</b>, the default.</p></dd>
<dt><b class="option">-timeout</b> <i class="arg">milliseconds</i></dt>
<dd><p>Timeout in milliseconds for your query.
The default value is <b class="const">6000</b>, i.e. 6 seconds.</p></dd>
<dt><b class="option">-urlencoding</b> <em>encoding</em></dt>
<dd><p>The encoding used for creating the x-url-encoded URLs with
<b class="cmd">::http::formatQuery</b>. The default is <b class="const">utf-8</b>, as specified
by <a href="http://tools.ietf.org/rfc/rfc2718.txt">RFC 2718</a>.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::oauth::header</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></dt>
<dd><p>This command is the base signature creator. With proper settings for various tokens
and secrets (See <b class="cmd">::oauth::config</b>) the result is the base authentication string
to send to the server.</p>
<p>You do not need to call this procedure to create the query because
<b class="cmd">::oauth::query</b> (see below) will do for it for you.
Doing so is useful for debugging purposes, though.</p>
<dl class="doctools_arguments">
<dt>url <i class="arg">baseURL</i></dt>
<dd><p>This argument is the URI path to the OAuth API server.
If you plan send a GET query, you should provide a full path.</p>
<pre class="doctools_example">
HTTP GET 
::oauth::header {https://api.twitter.com/1.1/users/lookup.json?screen_name=AbiertaMente} 
</pre>
</dd>
<dt>url-encoded-string <i class="arg">postQuery</i></dt>
<dd><p>When you have to send a header in POST format, you have to put the query string into this argument.</p>
<pre class="doctools_example">
::oauth::header {https://api.twitter.com/1.1/friendships/create.json} {user_id=158812437&amp;follow=true}
</pre>
</dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::oauth::query</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></dt>
<dd><p>This procedure will use the settings made with <b class="cmd">::oauth::config</b> to create the
basic authentication and then send the command to the server API.
It takes the same arguments as <b class="cmd">::oauth::header</b>.</p>
<p>The returned result will be a list containing 2 elements. The first
element will be a dictionary containing the HTTP header data response.
This allows you, for example, to check the X-Rate-Limit from OAuth.
The second element will be the raw data returned from API server.
This string is usually a json object which can be further decoded with the
functions of package <b class="package"><a href="../json/json.html">json</a></b>, or any other json-parser for Tcl.</p>
<p>Here is an example of how it would work in Twitter. Do not forget to
replace the placeholder tokens and keys of the example with your own tokens
and keys when trying it out.</p>
<pre class="doctools_example">% package require oauth
% package require json
% oauth::config -consumerkey {your_consumer_key} -consumersecret {your_consumer_key_secret} -accesstoken {your_access_token} -accesstokensecret {your_access_token_secret}
% set response [oauth::query https://api.twitter.com/1.1/users/lookup.json?screen_name=AbiertaMente]
% set jsondata [lindex $response 1]
% set data [json::json2dict $jsondata]
$ set data [lindex $data 0]
% dict for {key val} $data {puts &quot;$key =&gt; $val&quot;}
id =&gt; 158812437
id_str =&gt; 158812437
name =&gt; Un Librepensador
screen_name =&gt; AbiertaMente
location =&gt; Explico mis tuits ah&iacute; →
description =&gt; 160Caracteres para un SMS y contaba mi vida entera sin recortar vocales. Ahora en Twitter, podemos usar hasta 140 y a m&iacute; me sobrar&iacute;an 20 para contaros todo lo q
url =&gt; http://t.co/SGs3k9odBn
entities =&gt; url {urls {{url http://t.co/SGs3k9odBn expanded_url http://librepensamiento.es display_url librepensamiento.es indices {0 22}}}} description {urls {}}
protected =&gt; false
followers_count =&gt; 72705
friends_count =&gt; 53099
listed_count =&gt; 258
created_at =&gt; Wed Jun 23 18:29:58 +0000 2010
favourites_count =&gt; 297
utc_offset =&gt; 7200
time_zone =&gt; Madrid
geo_enabled =&gt; false
verified =&gt; false
statuses_count =&gt; 8996
lang =&gt; es
status =&gt; created_at {Sun Oct 12 08:02:38 +0000 2014} id 521209314087018496 id_str 521209314087018496 text {@thesamethanhim http://t.co/WFoXOAofCt} source {&lt;a href=&quot;http://twitter.com&quot; rel=&quot;nofollow&quot;&gt;Twitter Web Client&lt;/a&gt;} truncated false in_reply_to_status_id 521076457490350081 in_reply_to_status_id_str 521076457490350081 in_reply_to_user_id 2282730867 in_reply_to_user_id_str 2282730867 in_reply_to_screen_name thesamethanhim geo null coordinates null place null contributors null retweet_count 0 favorite_count 0 entities {hashtags {} symbols {} urls {{url http://t.co/WFoXOAofCt expanded_url http://www.elmundo.es/internacional/2014/03/05/53173dc1268e3e3f238b458a.html display_url elmundo.es/internacional/… indices {16 38}}} user_mentions {{screen_name thesamethanhim name Ἑλένη id 2282730867 id_str 2282730867 indices {0 15}}}} favorited false retweeted false possibly_sensitive false lang und
contributors_enabled =&gt; false
is_translator =&gt; true
is_translation_enabled =&gt; false
profile_background_color =&gt; 709397
profile_background_image_url =&gt; http://pbs.twimg.com/profile_background_images/704065051/9309c02aa2728bdf543505ddbd408e2e.jpeg
profile_background_image_url_https =&gt; https://pbs.twimg.com/profile_background_images/704065051/9309c02aa2728bdf543505ddbd408e2e.jpeg
profile_background_tile =&gt; true
profile_image_url =&gt; http://pbs.twimg.com/profile_images/2629816665/8035fb81919b840c5cc149755d3d7b0b_normal.jpeg
profile_image_url_https =&gt; https://pbs.twimg.com/profile_images/2629816665/8035fb81919b840c5cc149755d3d7b0b_normal.jpeg
profile_banner_url =&gt; https://pbs.twimg.com/profile_banners/158812437/1400828874
profile_link_color =&gt; FF3300
profile_sidebar_border_color =&gt; FFFFFF
profile_sidebar_fill_color =&gt; A0C5C7
profile_text_color =&gt; 333333
profile_use_background_image =&gt; true
default_profile =&gt; false
default_profile_image =&gt; false
following =&gt; true
follow_request_sent =&gt; false
notifications =&gt; false</pre>
</dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>oauth</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key836">RFC 2718</a>, <a href="../../../../index.html#key837">RFC 5849</a>, <a href="../../../../index.html#key838">oauth</a>, <a href="../../../../index.html#key839">twitter</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2014 Javi P. &lt;hxm@eggdrop.es&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ooutil/ooutil.html.



































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273

<div class='fossil-doc' data-title='oo::util - Utility commands for TclOO'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oo::util(n) 1.2.2 tcllib &quot;Utility commands for TclOO&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oo::util - Utility commands for TclOO</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">AUTHORS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">oo::util <span class="opt">?1.2.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">mymethod</b> <i class="arg">method</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">classmethod</b> <i class="arg">name</i> <i class="arg">arguments</i> <i class="arg">body</i></a></li>
<li><a href="#3"><b class="cmd">classvariable</b> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#4"><b class="cmd">link</b> <i class="arg">method</i>...</a></li>
<li><a href="#5"><b class="cmd">link</b> {<i class="arg">alias</i> <i class="arg">method</i>}...</a></li>
<li><a href="#6"><b class="cmd">ooutil::singleton</b> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a convenience command for the easy specification
of instance methods as callback commands, like timers, file events, Tk
bindings, etc.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">mymethod</b> <i class="arg">method</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command is available within instance methods. It takes a method
name and, possibly, arguments for the method and returns a command
prefix which, when executed, will invoke the named method of the
object we are in, with the provided arguments, and any others supplied
at the time of actual invokation.</p>
<p>Note: The command is equivalent to and named after the command
provided by the OO package <b class="package"><a href="../snit/snit.html">snit</a></b> for the same purpose.</p></dd>
<dt><a name="2"><b class="cmd">classmethod</b> <i class="arg">name</i> <i class="arg">arguments</i> <i class="arg">body</i></a></dt>
<dd><p>This command is available within class definitions. It takes a method
name and, possibly, arguments for the method and creates a method on the
class, available to a user of the class and of derived classes.</p>
<p>Note: The command is equivalent to the command <b class="cmd">typemethod</b>
provided by the OO package <b class="package"><a href="../snit/snit.html">snit</a></b> for the same purpose.</p>
<p>Example</p>
<pre class="doctools_example">
oo::class create ActiveRecord {
    classmethod find args { puts &quot;[self] called with arguments: $args&quot; }
}
oo::class create Table {
    superclass ActiveRecord
}
puts [Table find foo bar]
# ======
# which will write
# ======
# ::Table called with arguments: foo bar
</pre>
</dd>
<dt><a name="3"><b class="cmd">classvariable</b> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command is available within instance methods. It takes a series
of variable names and makes them available in the method's scope. The
originating scope for the variables is the class (instance) the object
instance belongs to. In other words, the referenced variables are shared
between all instances of their class.</p>
<p>Note: The command is roughly equivalent to the command
<b class="cmd">typevariable</b> provided by the OO package <b class="package"><a href="../snit/snit.html">snit</a></b> for the
same purpose. The difference is that it cannot be used in the class
definition itself.</p>
<p>Example:</p>
<pre class="doctools_example">
% oo::class create Foo {
    method bar {z} {
        classvariable x y
        return [incr x $z],[incr y]
    }
}
::Foo
% Foo create a
::a
% Foo create b
::b
% a bar 2
2,1
% a bar 3
5,2
% b bar 7
12,3
% b bar -1
11,4
% a bar 0
11,5
</pre>
</dd>
<dt><a name="4"><b class="cmd">link</b> <i class="arg">method</i>...</a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">link</b> {<i class="arg">alias</i> <i class="arg">method</i>}...</a></dt>
<dd><p>This command is available within instance methods. It takes a list of
method names and/or pairs of alias- and method-name and makes the
named methods available to all instance methods without requiring the
<b class="cmd">my</b> command.</p>
<p>The alias name under which the method becomes available defaults
to the method name, except where explicitly specified through an
alias/method pair.</p>
<p>Examples:</p>
<pre class="doctools_example">
    link foo
    # The method foo is now directly accessible as foo instead of my foo.
    link {bar foo}
    # The method foo is now directly accessible as bar.
    link a b c
    # The methods a, b, and c all become directly acessible under their
    # own names.
</pre>
<p>The main use of this command is expected to be in instance constructors,
for convenience, or to set up some methods for use in a mini DSL.</p></dd>
<dt><a name="6"><b class="cmd">ooutil::singleton</b> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command is a meta-class, i.e. a variant of the builtin
<b class="cmd">oo::class</b> which ensures that it creates only a single
instance of the classes defined with it.</p>
<p>Syntax and results are like for <b class="cmd">oo::class</b>.</p>
<p>Example:</p>
<pre class="doctools_example">
% oo::class create example {
   self mixin singleton
   method foo {} {self}
}
::example
% [example new] foo
::oo::Obj22
% [example new] foo
::oo::Obj22
</pre>
</dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AUTHORS</a></h2>
<p>Donal Fellows, Andreas Kupries</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>oo::util</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../snit/snit.html">snit(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key757">TclOO</a>, <a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key758">class methods</a>, <a href="../../../../index.html#key761">class variables</a>, <a href="../../../../index.html#key595">command prefix</a>, <a href="../../../../index.html#key597">currying</a>, <a href="../../../../index.html#key756">method reference</a>, <a href="../../../../index.html#key760">my method</a>, <a href="../../../../index.html#key759">singleton</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011-2015 Andreas Kupries, BSD licensed</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/otp/otp.html.



























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<div class='fossil-doc' data-title='otp - RFC 2289 A One-Time Password System'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">otp(n) 1.0.0 tcllib &quot;RFC 2289 A One-Time Password System&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>otp - One-Time Passwords</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">REFERENCES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">otp <span class="opt">?1.0.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::otp::otp-md4</b> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-words</i>?</span> <i class="arg">-seed seed</i> <i class="arg">-count count</i> <i class="arg">data</i></a></li>
<li><a href="#2"><b class="cmd">::otp::otp-md5</b> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-words</i>?</span> <i class="arg">-seed seed</i> <i class="arg">-count count</i> <i class="arg">data</i></a></li>
<li><a href="#3"><b class="cmd">::otp::otp-sha1</b> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-words</i>?</span> <i class="arg">-seed seed</i> <i class="arg">-count count</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::otp::otp-rmd160</b> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-words</i>?</span> <i class="arg">-seed seed</i> <i class="arg">-count count</i> <i class="arg">data</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is an implementation in Tcl of the One-Time Password
system as described in RFC 2289 (1). This system uses message-digest
algorithms to sequentially hash a passphrase to create single-use
passwords. The resulting data is then provided to the user as either
hexadecimal digits or encoded using a dictionary of 2048 words. This
system is used by OpenBSD for secure login and can be used as a SASL
mechanism for authenticating users.</p>
<p>In this implementation we provide support for four algorithms that are
included in the tcllib distribution: MD5 (2), MD4 (3), RIPE-MD160 (4)
and SHA-1 (5).</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::otp::otp-md4</b> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-words</i>?</span> <i class="arg">-seed seed</i> <i class="arg">-count count</i> <i class="arg">data</i></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::otp::otp-md5</b> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-words</i>?</span> <i class="arg">-seed seed</i> <i class="arg">-count count</i> <i class="arg">data</i></a></dt>
<dd></dd>
<dt><a name="3"><b class="cmd">::otp::otp-sha1</b> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-words</i>?</span> <i class="arg">-seed seed</i> <i class="arg">-count count</i> <i class="arg">data</i></a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">::otp::otp-rmd160</b> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-words</i>?</span> <i class="arg">-seed seed</i> <i class="arg">-count count</i> <i class="arg">data</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<pre class="doctools_example">
% otp::otp-md5 -count 99 -seed host67821 &quot;My Secret Pass Phrase&quot;
(binary gibberish)
% otp::otp-md5 -words -count 99 -seed host67821 &quot;My Secret Pass Phrase&quot;
SOON ARAB BURG LIMB FILE WAD
% otp::otp-md5 -hex -count 99 -seed host67821 &quot;My Secret Pass Phrase&quot;
e249b58257c80087
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Haller, N. et al., &quot;A One-Time Password System&quot;, RFC 2289, February 1998.
	<a href="http://www.rfc-editor.org/rfc/rfc2289.txt">http://www.rfc-editor.org/rfc/rfc2289.txt</a></p></li>
<li><p>Rivest, R., &quot;The MD5 Message-Digest Algorithm&quot;, RFC 1321, MIT and
       RSA Data Security, Inc, April 1992.
	(<a href="http://www.rfc-editor.org/rfc/rfc1321.txt">http://www.rfc-editor.org/rfc/rfc1321.txt</a>)</p></li>
<li><p>Rivest, R., &quot;The MD4 Message Digest Algorithm&quot;, RFC 1320, MIT,
       April 1992. (<a href="http://www.rfc-editor.org/rfc/rfc1320.txt">http://www.rfc-editor.org/rfc/rfc1320.txt</a>)</p></li>
<li><p>H. Dobbertin, A. Bosselaers, B. Preneel,
        &quot;RIPEMD-160, a strengthened version of RIPEMD&quot;
        <a href="http://www.esat.kuleuven.ac.be/~cosicart/pdf/AB-9601/AB-9601.pdf">http://www.esat.kuleuven.ac.be/~cosicart/pdf/AB-9601/AB-9601.pdf</a></p></li>
<li><p>&quot;Secure Hash Standard&quot;, National Institute of Standards
        and Technology, U.S. Department Of Commerce, April 1995.
	(<a href="http://www.itl.nist.gov/fipspubs/fip180-1.htm">http://www.itl.nist.gov/fipspubs/fip180-1.htm</a>)</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>otp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../sasl/sasl.html">SASL</a>, <a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="../ripemd/ripemd160.html">ripemd160</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key692">password</a>, <a href="../../../../index.html#key691">rfc 2289</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/page/page_intro.html.









































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

<div class='fossil-doc' data-title='page_intro - Parser generator tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_intro(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_intro - page introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key191">page</a></i> (short for <em>parser generator</em>) stands for a set of
related packages which help in the construction of parser generators,
and other utilities doing text processing.</p>
<p>They are mainly geared towards supporting the Tcllib application
<b class="syscmd"><a href="../../apps/page.html">page</a></b>, with the package <b class="package">page::pluginmgr</b> in a central
role as the plugin management for the application. The other packages
are performing low-level text processing and utility tasks geared
towards parser generation and mainly accessed by <b class="syscmd"><a href="../../apps/page.html">page</a></b> through
plugins.</p>
<p>The packages implementing the plugins are not documented as regular
packages, as they cannot be loaded into a general interpreter, like
tclsh, without extensive preparation of the interpreter. Preparation
which is done for them by the plugin manager.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key192">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/page/page_pluginmgr.html.





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706

<div class='fossil-doc' data-title='page_pluginmgr - Parser generator tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_pluginmgr(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_pluginmgr - page plugin manager</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">CONFIG PLUGIN API</a></li>
<li class="doctools_section"><a href="#section4">READER PLUGIN API</a></li>
<li class="doctools_section"><a href="#section5">WRITER PLUGIN API</a></li>
<li class="doctools_section"><a href="#section6">TRANSFORM PLUGIN API</a></li>
<li class="doctools_section"><a href="#section7">PREDEFINED PLUGINS</a></li>
<li class="doctools_section"><a href="#section8">FEATURES</a></li>
<li class="doctools_section"><a href="#section9">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">page::pluginmgr <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">fileutil</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::page::pluginmgr::reportvia</b> <i class="arg">cmd</i></a></li>
<li><a href="#2"><b class="cmd">::page::pluginmgr::report</b> <i class="arg">level</i> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#3"><b class="cmd">::page::pluginmgr::log</b> <i class="arg">cmd</i></a></li>
<li><a href="#4"><b class="cmd">::page::pluginmgr::configuration</b> <i class="arg">name</i></a></li>
<li><a href="#5"><b class="cmd">::page::pluginmgr::reader</b> <i class="arg">name</i></a></li>
<li><a href="#6"><b class="cmd">::page::pluginmgr::rconfigure</b> <i class="arg">dict</i></a></li>
<li><a href="#7"><b class="cmd">::page::pluginmgr::rtimeable</b></a></li>
<li><a href="#8"><b class="cmd">::page::pluginmgr::rtime</b></a></li>
<li><a href="#9"><b class="cmd">::page::pluginmgr::rgettime</b></a></li>
<li><a href="#10"><b class="cmd">::page::pluginmgr::rhelp</b></a></li>
<li><a href="#11"><b class="cmd">::page::pluginmgr::rlabel</b></a></li>
<li><a href="#12"><b class="cmd">::page::pluginmgr::read</b> <i class="arg">read</i> <i class="arg">eof</i> <span class="opt">?<i class="arg">complete</i>?</span></a></li>
<li><a href="#13"><i class="arg">read</i> <i class="arg">num</i></a></li>
<li><a href="#14"><i class="arg">eof</i></a></li>
<li><a href="#15"><i class="arg">done</i></a></li>
<li><a href="#16"><b class="cmd">::page::pluginmgr::writer</b> <i class="arg">name</i></a></li>
<li><a href="#17"><b class="cmd">::page::pluginmgr::wconfigure</b> <i class="arg">dict</i></a></li>
<li><a href="#18"><b class="cmd">::page::pluginmgr::wtimeable</b></a></li>
<li><a href="#19"><b class="cmd">::page::pluginmgr::wtime</b></a></li>
<li><a href="#20"><b class="cmd">::page::pluginmgr::wgettime</b></a></li>
<li><a href="#21"><b class="cmd">::page::pluginmgr::whelp</b></a></li>
<li><a href="#22"><b class="cmd">::page::pluginmgr::wlabel</b></a></li>
<li><a href="#23"><b class="cmd">::page::pluginmgr::write</b> <i class="arg">chan</i> <i class="arg">data</i></a></li>
<li><a href="#24"><b class="cmd">::page::pluginmgr::transform</b> <i class="arg">name</i></a></li>
<li><a href="#25"><b class="cmd">::page::pluginmgr::tconfigure</b> <i class="arg">id</i> <i class="arg">dict</i></a></li>
<li><a href="#26"><b class="cmd">::page::pluginmgr::ttimeable</b> <i class="arg">id</i></a></li>
<li><a href="#27"><b class="cmd">::page::pluginmgr::ttime</b> <i class="arg">id</i></a></li>
<li><a href="#28"><b class="cmd">::page::pluginmgr::tgettime</b> <i class="arg">id</i></a></li>
<li><a href="#29"><b class="cmd">::page::pluginmgr::thelp</b> <i class="arg">id</i></a></li>
<li><a href="#30"><b class="cmd">::page::pluginmgr::tlabel</b> <i class="arg">id</i></a></li>
<li><a href="#31"><b class="cmd">::page::pluginmgr::transform_do</b> <i class="arg">id</i> <i class="arg">data</i></a></li>
<li><a href="#32"><b class="cmd">page_cdefinition</b></a></li>
<li><a href="#33"><b class="cmd">page_rfeature</b> <i class="arg">name</i></a></li>
<li><a href="#34"><b class="cmd">page_rtime</b></a></li>
<li><a href="#35"><b class="cmd">page_rgettime</b></a></li>
<li><a href="#36"><b class="cmd">page_rlabel</b></a></li>
<li><a href="#37"><b class="cmd">page_rhelp</b></a></li>
<li><a href="#38"><b class="cmd">page_roptions</b></a></li>
<li><a href="#39"><b class="cmd">page_rconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></li>
<li><a href="#40"><b class="cmd">page_rrun</b></a></li>
<li><a href="#41"><b class="cmd">page_read</b> <i class="arg">num</i></a></li>
<li><a href="#42"><b class="cmd">page_read_done</b></a></li>
<li><a href="#43"><b class="cmd">page_eof</b></a></li>
<li><a href="#44"><b class="cmd">page_info</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#45"><b class="cmd">page_warning</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#46"><b class="cmd">page_error</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#47"><b class="cmd">page_log_info</b> <i class="arg">text</i></a></li>
<li><a href="#48"><b class="cmd">page_log_warning</b> <i class="arg">text</i></a></li>
<li><a href="#49"><b class="cmd">page_log_error</b> <i class="arg">text</i></a></li>
<li><a href="#50"><b class="cmd">page_wfeature</b></a></li>
<li><a href="#51"><b class="cmd">page_wtime</b></a></li>
<li><a href="#52"><b class="cmd">page_wgettime</b></a></li>
<li><a href="#53"><b class="cmd">page_wlabel</b></a></li>
<li><a href="#54"><b class="cmd">page_whelp</b></a></li>
<li><a href="#55"><b class="cmd">page_woptions</b></a></li>
<li><a href="#56"><b class="cmd">page_wconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></li>
<li><a href="#57"><b class="cmd">page_wrun</b> <i class="arg">chan</i> <i class="arg">data</i></a></li>
<li><a href="#58"><b class="cmd">page_info</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#59"><b class="cmd">page_warning</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#60"><b class="cmd">page_error</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#61"><b class="cmd">page_log_info</b> <i class="arg">text</i></a></li>
<li><a href="#62"><b class="cmd">page_log_warning</b> <i class="arg">text</i></a></li>
<li><a href="#63"><b class="cmd">page_log_error</b> <i class="arg">text</i></a></li>
<li><a href="#64"><b class="cmd">page_tfeature</b></a></li>
<li><a href="#65"><b class="cmd">page_ttime</b></a></li>
<li><a href="#66"><b class="cmd">page_tgettime</b></a></li>
<li><a href="#67"><b class="cmd">page_tlabel</b></a></li>
<li><a href="#68"><b class="cmd">page_thelp</b></a></li>
<li><a href="#69"><b class="cmd">page_toptions</b></a></li>
<li><a href="#70"><b class="cmd">page_tconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></li>
<li><a href="#71"><b class="cmd">page_trun</b> <i class="arg">chan</i> <i class="arg">data</i></a></li>
<li><a href="#72"><b class="cmd">page_info</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#73"><b class="cmd">page_warning</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#74"><b class="cmd">page_error</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#75"><b class="cmd">page_log_info</b> <i class="arg">text</i></a></li>
<li><a href="#76"><b class="cmd">page_log_warning</b> <i class="arg">text</i></a></li>
<li><a href="#77"><b class="cmd">page_log_error</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the plugin manager central to the <b class="syscmd"><a href="../../apps/page.html">page</a></b>
application. It manages the various reader, writer, configuration, and
transformation plugins which actually process the text (read,
transform, and write).</p>
<p>All plugins are loaded into slave interpreters specially prepared for
them. While implemented using packages they need this special
environment and are not usable in a plain interpreter, like
tclsh. Because of that they are only described in general terms in
section <span class="sectref"><a href="#section7">PREDEFINED PLUGINS</a></span>, and not documented as regular
packages. It is expected that they follow the APIs specified in the
sections</p>
<ol class="doctools_enumerated">
<li><p><span class="sectref"><a href="#section3">CONFIG PLUGIN API</a></span></p></li>
<li><p><span class="sectref"><a href="#section4">READER PLUGIN API</a></span></p></li>
<li><p><span class="sectref"><a href="#section5">WRITER PLUGIN API</a></span></p></li>
<li><p><span class="sectref"><a href="#section6">TRANSFORM PLUGIN API</a></span></p></li>
</ol>
<p>as per their type.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::page::pluginmgr::reportvia</b> <i class="arg">cmd</i></a></dt>
<dd><p>This command defines the callback command used by
<b class="cmd">::page::pluginmgr::report</b> (see below) to report input errors and
warnings. The default is to write such reports to the standard error
channel.</p></dd>
<dt><a name="2"><b class="cmd">::page::pluginmgr::report</b> <i class="arg">level</i> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>This command is used to report input errors and warnings. By default
such reports are written to the standard error. This can be changed by
setting a user-specific callback command with
<b class="cmd">::page::pluginmgr::reportvia</b> (see above).</p>
<p>The arguments <i class="arg">level</i> and <i class="arg">text</i> specify both the importance
of the message, and the message itself. For the former see the package
<b class="package"><a href="../log/logger.html">logger</a></b> for the allowed values.</p>
<p>The optional argument <i class="arg">from</i> and <i class="arg">to</i> can be used by the
caller to indicate the location (or range) in the input where the
reported problem occured. Each is a list containing two elements, the
line and the column in the input, in this order.</p></dd>
<dt><a name="3"><b class="cmd">::page::pluginmgr::log</b> <i class="arg">cmd</i></a></dt>
<dd><p>This command defines a log callback command to be used by loaded
plugins for the reporting of internal errors, warnings, and general
information. Specifying the empty string as callback disables logging.</p>
<p>Note: The <i class="arg">cmd</i> has to be created by the <b class="package"><a href="../log/logger.html">logger</a></b> package,
or follow the same API as such.</p>
<p>The command returns the empty string as its result.</p></dd>
<dt><a name="4"><b class="cmd">::page::pluginmgr::configuration</b> <i class="arg">name</i></a></dt>
<dd><p>This command loads the named configuration plugin, retrieves the
options encoded in it, and then immediately unloads it again.</p>
<p>If the <i class="arg">name</i> is the path to a file, then this files will be tried
to be loaded as a plugin first, and, if that fails, opened and its
contents read as a list of options and their arguments, separated by
spaces, tabs and newlines, possibly quotes with single and double
quotes.</p>
<p>See section <span class="sectref"><a href="#section3">CONFIG PLUGIN API</a></span> for the API expected of
configuration plugins.</p>
<p>The result of the command is the list of options retrieved.</p></dd>
<dt><a name="5"><b class="cmd">::page::pluginmgr::reader</b> <i class="arg">name</i></a></dt>
<dd><p>This command loads the named reader plugin and initializes it. The
result of the command is a list of options the plugin understands.</p>
<p>Only a single reader plugin can be loaded. Loading another reader
plugin causes the previously loaded reader plugin to be de-initialized
and unloaded.</p>
<p>See section <span class="sectref"><a href="#section4">READER PLUGIN API</a></span> for the API expected of
reader plugins.</p></dd>
<dt><a name="6"><b class="cmd">::page::pluginmgr::rconfigure</b> <i class="arg">dict</i></a></dt>
<dd><p>This commands configures the loaded reader plugin. The options and
their values are provided as a Tcl dictionary. The result of the
command is the empty string.</p></dd>
<dt><a name="7"><b class="cmd">::page::pluginmgr::rtimeable</b></a></dt>
<dd><p>This commands checks if the loaded reader plugin is able to collect
timing statistics. The result of the command is a boolean flag. The
result is <b class="const">true</b> if the plugin can be timed, and <b class="const">false</b>
otherwise.</p></dd>
<dt><a name="8"><b class="cmd">::page::pluginmgr::rtime</b></a></dt>
<dd><p>This command activates the collection of timing statistics in the
loaded reader plugin.</p></dd>
<dt><a name="9"><b class="cmd">::page::pluginmgr::rgettime</b></a></dt>
<dd><p>This command retrieves the collected timing statistics of the loaded
reader plugin after it was executed.</p></dd>
<dt><a name="10"><b class="cmd">::page::pluginmgr::rhelp</b></a></dt>
<dd><p>This command retrieves the help string of the loaded reader
plugin. This is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="11"><b class="cmd">::page::pluginmgr::rlabel</b></a></dt>
<dd><p>This command retrieves the human-readable name of the loaded reader
plugin.</p></dd>
<dt><a name="12"><b class="cmd">::page::pluginmgr::read</b> <i class="arg">read</i> <i class="arg">eof</i> <span class="opt">?<i class="arg">complete</i>?</span></a></dt>
<dd><p>This command invokes the loaded reader plugin to process the input,
and returns the results of the plugin as its own result. The input is
accessible through the callback commands <i class="arg">read</i>, and <i class="arg">eof</i>. The
optional <i class="arg">done</i> can be used to intrecept when the plugin has
completed its processing. All arguments are command prefixes.</p>
<p>The plugin will invoke the various callbacks in the following
situations:</p>
<dl class="doctools_definitions">
<dt><a name="13"><i class="arg">read</i> <i class="arg">num</i></a></dt>
<dd><p>is invoked whenever input to process is needed, with the number of
characters/bytes it asks for. The result is expected to be the input
the plugin is in need of.</p></dd>
<dt><a name="14"><i class="arg">eof</i></a></dt>
<dd><p>is invoked by the plugin to check if the input has reached the of the
stream. The result is expected to be a boolean flag, <b class="const">true</b> when
the input has hit EOF, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="15"><i class="arg">done</i></a></dt>
<dd><p>is invoked when the plugin has completed the processing of the input.</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::page::pluginmgr::writer</b> <i class="arg">name</i></a></dt>
<dd><p>This command loads the named writer plugin and initializes it. The
result of the command is a list of options the plugin understands.</p>
<p>Only a single reader plugin can be loaded. Loading another reader
plugin causes the previously loaded reader plugin to be de-initialized
and unloaded.</p>
<p>See section <span class="sectref"><a href="#section5">WRITER PLUGIN API</a></span> for the API expected of
writer plugins.</p></dd>
<dt><a name="17"><b class="cmd">::page::pluginmgr::wconfigure</b> <i class="arg">dict</i></a></dt>
<dd><p>This commands configures the loaded writer plugin. The options and
their values are provided as a Tcl dictionary. The result of the
command is the empty string.</p></dd>
<dt><a name="18"><b class="cmd">::page::pluginmgr::wtimeable</b></a></dt>
<dd><p>This commands checks if the loaded writer plugin is able to measure
execution times. The result of the command is a boolean flag. The
result is <b class="const">true</b> if the plugin can be timed, and <b class="const">false</b>
otherwise.</p></dd>
<dt><a name="19"><b class="cmd">::page::pluginmgr::wtime</b></a></dt>
<dd><p>This command activates the collection of timing statistics in the
loaded writer plugin.</p></dd>
<dt><a name="20"><b class="cmd">::page::pluginmgr::wgettime</b></a></dt>
<dd><p>This command retrieves the collected timing statistics of the loaded
writer plugin after it was executed.</p></dd>
<dt><a name="21"><b class="cmd">::page::pluginmgr::whelp</b></a></dt>
<dd><p>This command retrieves the help string of the loaded writer
plugin. This is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="22"><b class="cmd">::page::pluginmgr::wlabel</b></a></dt>
<dd><p>This command retrieves the human-readable name of the loaded writer
plugin.</p></dd>
<dt><a name="23"><b class="cmd">::page::pluginmgr::write</b> <i class="arg">chan</i> <i class="arg">data</i></a></dt>
<dd><p>The loaded writer plugin is invoked to generate the output. It is
given the <i class="arg">data</i> to generate the outpout from, and the Tcl handle
<i class="arg">chan</i> of the channel to write the generated output to. The
command returns th empty string as its result.</p></dd>
<dt><a name="24"><b class="cmd">::page::pluginmgr::transform</b> <i class="arg">name</i></a></dt>
<dd><p>This command loads the named transformation plugin and initializes
it. The result of the command is a 2-element list containing the
plugin id and a list of options the plugin understands, in this order.</p>
<p>Multiple transformations plugins can be loaded and are identified by
handles.</p>
<p>See section <span class="sectref"><a href="#section6">TRANSFORM PLUGIN API</a></span> for the API expected of
transformation plugins.</p></dd>
<dt><a name="25"><b class="cmd">::page::pluginmgr::tconfigure</b> <i class="arg">id</i> <i class="arg">dict</i></a></dt>
<dd><p>This commands configures the identified transformation plugin. The
options and their values are provided as a Tcl dictionary. The result
of the command is the empty string.</p></dd>
<dt><a name="26"><b class="cmd">::page::pluginmgr::ttimeable</b> <i class="arg">id</i></a></dt>
<dd><p>This commands checks if the identified transformation plugin is able
to collect timing statistics. The result of the command is a boolean
flag. The result is <b class="const">true</b> if the plugin can be timed, and
<b class="const">false</b> otherwise.</p></dd>
<dt><a name="27"><b class="cmd">::page::pluginmgr::ttime</b> <i class="arg">id</i></a></dt>
<dd><p>This command activates the collection of timing statistics in the
identified transformation plugin.</p></dd>
<dt><a name="28"><b class="cmd">::page::pluginmgr::tgettime</b> <i class="arg">id</i></a></dt>
<dd><p>This command retrieves the collected timing statistics of the
identified transformation plugin after it was executed.</p></dd>
<dt><a name="29"><b class="cmd">::page::pluginmgr::thelp</b> <i class="arg">id</i></a></dt>
<dd><p>This command retrieves the help string of the identified
transformation plugin. This is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i>
format.</p></dd>
<dt><a name="30"><b class="cmd">::page::pluginmgr::tlabel</b> <i class="arg">id</i></a></dt>
<dd><p>This command retrieves the human-readable name of the identified
transformation plugin.</p></dd>
<dt><a name="31"><b class="cmd">::page::pluginmgr::transform_do</b> <i class="arg">id</i> <i class="arg">data</i></a></dt>
<dd><p>The identified transformation plugin is invoked to process the
specified <i class="arg">data</i>. The result of the plugin is returned as the
result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CONFIG PLUGIN API</a></h2>
<p>Configuration plugins are expected to provide a single command,
described below.</p>
<dl class="doctools_definitions">
<dt><a name="32"><b class="cmd">page_cdefinition</b></a></dt>
<dd><p>This command of a configuration plugin is called by the plugin manager
to execute it. Its result has to be a list of options and values to
process.</p></dd>
</dl>
<p>Configuration plugins do not expect the environment to provide any
special commands.</p>
<p>It is expected that a configuration plugin <b class="const">FOO</b> is implemented
by the package <b class="package">page::config::<b class="const">FOO</b></b>.</p>
<p>Configuration plugins are loaded, executed, and unloaded in one step,
they are not kept in memory. The command for doing this is
<b class="cmd">::page::pluginmgr::configuration</b>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">READER PLUGIN API</a></h2>
<p>Reader plugins are expected to provide the following commands,
described below.</p>
<dl class="doctools_definitions">
<dt><a name="33"><b class="cmd">page_rfeature</b> <i class="arg">name</i></a></dt>
<dd><p>This command takes a feature <i class="arg">name</i> and returns a boolean flag
indicating whether the feature is supported by the plugin, or not.
The result has to be <b class="const">true</b> if the feature is supported, and
<b class="const">false</b> otherwise.</p>
<p>See section <span class="sectref"><a href="#section8">FEATURES</a></span> for the possible features the plugin
manager will ask for.</p></dd>
<dt><a name="34"><b class="cmd">page_rtime</b></a></dt>
<dd><p>This command is invoked to activate the collection of timing
statistics.</p></dd>
<dt><a name="35"><b class="cmd">page_rgettime</b></a></dt>
<dd><p>This command is invoked to retrieve the collected timing statistics.</p></dd>
<dt><a name="36"><b class="cmd">page_rlabel</b></a></dt>
<dd><p>This command is invoked to retrieve a human-readable label for the
plugin.</p></dd>
<dt><a name="37"><b class="cmd">page_rhelp</b></a></dt>
<dd><p>This command is invoked to retrieve a help text for plugin. The text
is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="38"><b class="cmd">page_roptions</b></a></dt>
<dd><p>This command is invoked to retrieve the options understood by the
plugin.</p></dd>
<dt><a name="39"><b class="cmd">page_rconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></dt>
<dd><p>This command is invoked to reconfigure the plugin, specifically the
given <i class="arg">option</i> is set to the new <i class="arg">value</i>.</p></dd>
<dt><a name="40"><b class="cmd">page_rrun</b></a></dt>
<dd><p>This command is invoked to process the input stream per the current
plugin configuration.  The result of the command is the result of the
processing.</p></dd>
</dl>
<p>Reader plugins expect the environment to provide the following special
commands.</p>
<dl class="doctools_definitions">
<dt><a name="41"><b class="cmd">page_read</b> <i class="arg">num</i></a></dt>
<dd><p>This command is invoked to read <i class="arg">num</i> characters/bytes from the
input. Its result has to be read characters/bytes.</p></dd>
<dt><a name="42"><b class="cmd">page_read_done</b></a></dt>
<dd><p>This command is invoked to signal that the plugin has completed the
processing of the input.</p></dd>
<dt><a name="43"><b class="cmd">page_eof</b></a></dt>
<dd><p>This command is invoked to check if the input stream has reached its
end. Its result has to be a boolean flag, <b class="const">true</b> when the input
has reached the end, <b class="const">false</b> otherwise.</p></dd>
<dt><a name="44"><b class="cmd">page_info</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>Invoked to report some information to the user. May indicate a
location or range in the input. Each piece of location data, if
provided, is a 2-element list containing line and column numbers.</p></dd>
<dt><a name="45"><b class="cmd">page_warning</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>Invoked to report a warning to the user. May indicate a location or
range in the input. Each piece of location data, if provided, is a
2-element list containing line and column numbers.</p></dd>
<dt><a name="46"><b class="cmd">page_error</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>Invoked to report an error to the user. May indicate a location or
range in the input. Each piece of location data, if provided, is a
2-element list containing line and column numbers.</p></dd>
<dt><a name="47"><b class="cmd">page_log_info</b> <i class="arg">text</i></a></dt>
<dd><p>Invoked to report some internal information.</p></dd>
<dt><a name="48"><b class="cmd">page_log_warning</b> <i class="arg">text</i></a></dt>
<dd><p>Invoked to report an internal warning.</p></dd>
<dt><a name="49"><b class="cmd">page_log_error</b> <i class="arg">text</i></a></dt>
<dd><p>Invoked to report an internal error.</p></dd>
</dl>
<p>It is expected that a reader plugin <b class="const">FOO</b> is implemented
by the package <b class="package">page::reader::<b class="const">FOO</b></b>.</p>
<p>Reader plugins are loaded by the command
<b class="cmd">::page::pluginmgr::reader</b>. At most one reader plugin can be kept
in memory.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">WRITER PLUGIN API</a></h2>
<p>Writer plugins are expected to provide the following commands,
described below.</p>
<dl class="doctools_definitions">
<dt><a name="50"><b class="cmd">page_wfeature</b></a></dt>
<dd><p>This command takes a feature <i class="arg">name</i> and returns a boolean flag
indicating whether the feature is supported by the plugin, or not.
The result has to be <b class="const">true</b> if the feature is supported, and
<b class="const">false</b> otherwise.</p>
<p>See section <span class="sectref"><a href="#section8">FEATURES</a></span> for the possible features the plugin
manager will ask for.</p></dd>
<dt><a name="51"><b class="cmd">page_wtime</b></a></dt>
<dd><p>This command is invoked to activate the collection of timing
statistics.</p></dd>
<dt><a name="52"><b class="cmd">page_wgettime</b></a></dt>
<dd><p>This command is invoked to retrieve the collected timing statistics.</p></dd>
<dt><a name="53"><b class="cmd">page_wlabel</b></a></dt>
<dd><p>This command is invoked to retrieve a human-readable label for the
plugin.</p></dd>
<dt><a name="54"><b class="cmd">page_whelp</b></a></dt>
<dd><p>This command is invoked to retrieve a help text for plugin. The text
is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="55"><b class="cmd">page_woptions</b></a></dt>
<dd><p>This command is invoked to retrieve the options understood by the
plugin.</p></dd>
<dt><a name="56"><b class="cmd">page_wconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></dt>
<dd><p>This command is invoked to reconfigure the plugin, specifically the
given <i class="arg">option</i> is set to the new <i class="arg">value</i>.</p></dd>
<dt><a name="57"><b class="cmd">page_wrun</b> <i class="arg">chan</i> <i class="arg">data</i></a></dt>
<dd><p>This command is invoked to process the specified <i class="arg">data</i> and write
it to the output stream <i class="arg">chan</i>. The latter is a Tcl channel handle
opened for writing. The result of the command is the empty string.</p></dd>
</dl>
<p>Writer plugins expect the environment to provide the following special
commands.</p>
<dl class="doctools_definitions">
<dt><a name="58"><b class="cmd">page_info</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>Invoked to report some information to the user. May indicate a
location or range in the input. Each piece of location data, if
provided, is a 2-element list containing line and column numbers.</p></dd>
<dt><a name="59"><b class="cmd">page_warning</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>Invoked to report a warning to the user. May indicate a location or
range in the input. Each piece of location data, if provided, is a
2-element list containing line and column numbers.</p></dd>
<dt><a name="60"><b class="cmd">page_error</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>Invoked to report an error to the user. May indicate a location or
range in the input. Each piece of location data, if provided, is a
2-element list containing line and column numbers.</p></dd>
<dt><a name="61"><b class="cmd">page_log_info</b> <i class="arg">text</i></a></dt>
<dd><p>Invoked to report some internal information.</p></dd>
<dt><a name="62"><b class="cmd">page_log_warning</b> <i class="arg">text</i></a></dt>
<dd><p>Invoked to report an internal warning.</p></dd>
<dt><a name="63"><b class="cmd">page_log_error</b> <i class="arg">text</i></a></dt>
<dd><p>Invoked to report an internal error.</p></dd>
</dl>
<p>It is expected that a writer plugin <b class="const">FOO</b> is implemented
by the package <b class="package">page::writer::<b class="const">FOO</b></b>.</p>
<p>Writer plugins are loaded by the command
<b class="cmd">::page::pluginmgr::writer</b>. At most one writer plugin can be kept
in memory.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">TRANSFORM PLUGIN API</a></h2>
<p>page::transform::*
Transformation plugins are expected to provide the following commands,
described below.</p>
<dl class="doctools_definitions">
<dt><a name="64"><b class="cmd">page_tfeature</b></a></dt>
<dd><p>This command takes a feature <i class="arg">name</i> and returns a boolean flag
indicating whether the feature is supported by the plugin, or not.
The result has to be <b class="const">true</b> if the feature is supported, and
<b class="const">false</b> otherwise.</p>
<p>See section <span class="sectref"><a href="#section8">FEATURES</a></span> for the possible features the plugin
manager will ask for.</p></dd>
<dt><a name="65"><b class="cmd">page_ttime</b></a></dt>
<dd><p>This command is invoked to activate the collection of timing
statistics.</p></dd>
<dt><a name="66"><b class="cmd">page_tgettime</b></a></dt>
<dd><p>This command is invoked to retrieve the collected timing statistics.</p></dd>
<dt><a name="67"><b class="cmd">page_tlabel</b></a></dt>
<dd><p>This command is invoked to retrieve a human-readable label for the
plugin.</p></dd>
<dt><a name="68"><b class="cmd">page_thelp</b></a></dt>
<dd><p>This command is invoked to retrieve a help text for plugin. The text
is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="69"><b class="cmd">page_toptions</b></a></dt>
<dd><p>This command is invoked to retrieve the options understood by the
plugin.</p></dd>
<dt><a name="70"><b class="cmd">page_tconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></dt>
<dd><p>This command is invoked to reconfigure the plugin, specifically the
given <i class="arg">option</i> is set to the new <i class="arg">value</i>.</p></dd>
<dt><a name="71"><b class="cmd">page_trun</b> <i class="arg">chan</i> <i class="arg">data</i></a></dt>
<dd><p>This command is invoked to process the specified <i class="arg">data</i> and write
it to the output stream <i class="arg">chan</i>. The latter is a Tcl channel handle
opened for writing. The result of the command is the empty string.</p></dd>
</dl>
<p>Transformation plugins expect the environment to provide the following
special commands.</p>
<dl class="doctools_definitions">
<dt><a name="72"><b class="cmd">page_info</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>Invoked to report some information to the user. May indicate a
location or range in the input. Each piece of location data, if
provided, is a 2-element list containing line and column numbers.</p></dd>
<dt><a name="73"><b class="cmd">page_warning</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>Invoked to report a warning to the user. May indicate a location or
range in the input. Each piece of location data, if provided, is a
2-element list containing line and column numbers.</p></dd>
<dt><a name="74"><b class="cmd">page_error</b> <i class="arg">text</i> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>Invoked to report an error to the user. May indicate a location or
range in the input. Each piece of location data, if provided, is a
2-element list containing line and column numbers.</p></dd>
<dt><a name="75"><b class="cmd">page_log_info</b> <i class="arg">text</i></a></dt>
<dd><p>Invoked to report some internal information.</p></dd>
<dt><a name="76"><b class="cmd">page_log_warning</b> <i class="arg">text</i></a></dt>
<dd><p>Invoked to report an internal warning.</p></dd>
<dt><a name="77"><b class="cmd">page_log_error</b> <i class="arg">text</i></a></dt>
<dd><p>Invoked to report an internal error.</p></dd>
</dl>
<p>It is expected that a transformation plugin <b class="const">FOO</b> is implemented
by the package <b class="package">page::transform::<b class="const">FOO</b></b>.</p>
<p>Transformation plugins are loaded by the command
<b class="cmd">::page::pluginmgr::transform</b>. More than one transformation
plugin can be kept in memory.</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">PREDEFINED PLUGINS</a></h2>
<p>The following predefined plugins are known, i.e. provided by the page
module.</p>
<dl class="doctools_definitions">
<dt>Configuration</dt>
<dd><dl class="doctools_definitions">
<dt>peg</dt>
<dd><p>Returns a set of options to configure the <b class="syscmd"><a href="../../apps/page.html">page</a></b> application
for the processing of a PEG grammar and the generation of ME code. See
the packages <b class="package">grammar_peg</b>, <b class="package">grammar_me</b> and relations
for more details.</p></dd>
</dl></dd>
<dt>Reader</dt>
<dd><dl class="doctools_definitions">
<dt>hb</dt>
<dd><p>Expects a so-called <i class="term">half-baked PEG container</i> as input and
returns the equivalent abstract syntax tree. See the writer plugin
<i class="term">hb</i> for the plugin generating this type of input.</p></dd>
<dt>lemon</dt>
<dd><p>Expects a grammar specification as understood by Richar Hipp's LEMON
parser generator and returns an abstract syntax tree for it.</p></dd>
<dt>peg</dt>
<dd><p>Expects a grammar specification in the form of a parsing expression
grammar (PEG) and returns an abstract syntax tree for it.</p></dd>
<dt>ser</dt>
<dd><p>Expect the serialized form of a parsing expression grammar as
generated by the package <b class="package"><a href="../grammar_peg/peg.html">grammar::peg</a></b> as input, converts it
into an equivalent abstract syntax tree and returns that.</p></dd>
<dt>treeser</dt>
<dd><p>Expects the serialized form of a tree as generated by the package
<b class="package"><a href="../struct/struct_tree.html">struct::tree</a></b> as input and returns it, after validation.</p></dd>
</dl></dd>
<dt>Writer</dt>
<dd><dl class="doctools_definitions">
<dt>hb</dt>
<dd><p>Expects an abstract syntax tree for a parsing expression grammar as
input and writes it out in the form of a so-called
<i class="term">half-baked PEG container</i>.</p></dd>
<dt>identity</dt>
<dd><p>Takes any input and writes it as is.</p></dd>
<dt>mecpu</dt>
<dd><p>Expects symbolic assembler code for the MatchEngine CPU (See the
package <b class="package"><a href="../grammar_me/me_cpu.html">grammar::me::cpu</a></b> and relatives) and writes it out as
Tcl code for a parser.</p></dd>
<dt>me</dt>
<dd><p>Expects an abstract syntax tree for a parsing expression grammar as
input and writes it out as Tcl code for the MatchEngine (See the
package <b class="package">grammar::me</b> and relatives) which parses input in
that grammar.</p></dd>
<dt>null</dt>
<dd><p>Takes any input and writes nothing. The logical equivalent of
/dev/null.</p></dd>
<dt>peg</dt>
<dd><p>Expects an abstract syntax tree for a parsing expression grammar as
input and writes it out in the form of a canonical PEG which can be
read by the reader plugin <i class="term">peg</i>.</p></dd>
<dt>ser</dt>
<dd><p>Expects an abstract syntax tree for a parsing expression grammar as
input and writes it out as a serialized PEG container which can be
read by the reader plugin <i class="term">ser</i>.</p></dd>
<dt>tpc</dt>
<dd><p>Expects an abstract syntax tree for a parsing expression grammar as
input and writes it out as Tcl code initializing a PEG container as
provided by the package <b class="package"><a href="../grammar_peg/peg.html">grammar::peg</a></b>.</p></dd>
<dt>tree</dt>
<dd><p>Takes any serialized tree (per package <b class="package"><a href="../struct/struct_tree.html">struct::tree</a></b>) as
input and writes it out in a generic indented format.</p></dd>
</dl></dd>
<dt>Transformation</dt>
<dd><dl class="doctools_definitions">
<dt>mecpu</dt>
<dd><p>Takes an abstract syntax tree for a parsing expression grammer as
input, generates symbolic assembler code for the MatchEngine CPU, and
returns that as its result (See the package <b class="package"><a href="../grammar_me/me_cpu.html">grammar::me::cpu</a></b>
and relatives).</p></dd>
<dt>reachable</dt>
<dd><p>Takes an abstract syntax tree for a parsing expression grammer as
input, performs a reachability analysis, and returns the modified and
annotated tree.</p></dd>
<dt>realizable</dt>
<dd><p>Takes an abstract syntax tree for a parsing expression grammer as
input, performs an analysis of realizability, and returns the modified
and annotated tree.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">FEATURES</a></h2>
<p>The plugin manager currently checks the plugins for only one feature,
<b class="const">timeable</b>. A plugin supporting this feature is assumed to be
able to collect timing statistics on request.</p>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key192">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/page/page_util_flow.html.

















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200

<div class='fossil-doc' data-title='page_util_flow - Parser generator tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_flow(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_flow - page dataflow/treewalker utility</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">FLOW API</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">page::util::flow <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">snit</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::page::util::flow</b> <i class="arg">start</i> <i class="arg">flowvar</i> <i class="arg">nodevar</i> <i class="arg">script</i></a></li>
<li><a href="#2"><i class="arg">flow</i> <b class="method">visit</b> <i class="arg">node</i></a></li>
<li><a href="#3"><i class="arg">flow</i> <b class="method">visitl</b> <i class="arg">nodelist</i></a></li>
<li><a href="#4"><i class="arg">flow</i> <b class="method">visita</b> <i class="arg">node</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single utility command for easy dataflow based
manipulation of arbitrary data structures, especially abstract syntax
trees.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::page::util::flow</b> <i class="arg">start</i> <i class="arg">flowvar</i> <i class="arg">nodevar</i> <i class="arg">script</i></a></dt>
<dd><p>This command contains the core logic to drive the walking of an
arbitrary data structure which can partitioned into separate
parts. Examples of such structures are trees and graphs.</p>
<p>The command makes no assumptions at all about the API of the structure
to be walked, except that that its parts, here called <i class="term">nodes</i>,
are identified by strings. These strings are taken as is, from the
arguments, and the body, and handed back to the body, without
modification.</p>
<p>Access to the actual data structure, and all decisions regarding which
nodes to visit in what order are delegated to the body of the loop,
i.e. the <i class="arg">script</i>.</p>
<p>The body is invoked first for the nodes in the start-set specified via
<i class="arg">start</i>), and from then on for the nodes the body has requested to
be visited. The command stops when the set of nodes to visit becomes
empty. Note that a node can be visited more than once. The body has
complete control about this.</p>
<p>The body is invoked in the context of the caller. The variable named
by <i class="arg">nodevar</i> will be set to the current node, and the variable
named by <i class="arg">flowvar</i> will be set to the command of the flow object
through which the body can request the nodes to visit next. The API
provided by this object is described in the next section,
<span class="sectref"><a href="#section3">FLOW API</a></span>.</p>
<p>Note that the command makes no promises regarding the order in which
nodes are visited, excpt that the nodes requested to be visited by the
current iteration will be visited afterward, in some order.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">FLOW API</a></h2>
<p>This section describes the API provided by the flow object made
accessible to the body script of <b class="cmd">::page::util::flow</b>.</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">flow</i> <b class="method">visit</b> <i class="arg">node</i></a></dt>
<dd><p>Invoking this method requests that the node <i class="arg">n</i> is visited after
the current iteration.</p></dd>
<dt><a name="3"><i class="arg">flow</i> <b class="method">visitl</b> <i class="arg">nodelist</i></a></dt>
<dd><p>Invoking this method requests that all the nodes found in the list
<i class="arg">nodelist</i> are visited after the current iteration.</p></dd>
<dt><a name="4"><i class="arg">flow</i> <b class="method">visita</b> <i class="arg">node</i>...</a></dt>
<dd><p>This is the variadic arguments form of the method <b class="method">visitl</b>, see
above.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key402">dataflow</a>, <a href="../../../../index.html#key194">graph walking</a>, <a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key190">tree walking</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/page/page_util_norm_lemon.html.





































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

<div class='fossil-doc' data-title='page_util_norm_lemon - Parser generator tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_norm_lemon(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_norm_lemon - page AST normalization, LEMON</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">page::util::norm_lemon <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">snit</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::page::util::norm::lemon</b> <i class="arg">tree</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single utility command which takes an AST for a
lemon  grammar and normalizes it in various ways. The result
is called a <i class="term">Normalized Lemon Grammar Tree</i>.</p>
<p><em>Note</em> that this package can only be used from within a plugin
managed by the package <b class="package">page::pluginmgr</b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::page::util::norm::lemon</b> <i class="arg">tree</i></a></dt>
<dd><p>This command assumes the <i class="arg">tree</i> object contains for a lemon
grammar. It normalizes this tree in place. The result is called a
<i class="term">Normalized Lemon Grammar Tree</i>.</p>
<p>The exact operations performed are left undocumented for the moment.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key194">graph walking</a>, <a href="../../../../index.html#key193">lemon</a>, <a href="../../../../index.html#key112">normalization</a>, <a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key190">tree walking</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/page/page_util_norm_peg.html.

















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200

<div class='fossil-doc' data-title='page_util_norm_peg - Parser generator tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_norm_peg(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_norm_peg - page AST normalization, PEG</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">page::util::norm_peg <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">snit</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::page::util::norm::peg</b> <i class="arg">tree</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single utility command which takes an AST for a
parsing expression grammar and normalizes it in various ways. The result
is called a <i class="term">Normalized PE Grammar Tree</i>.</p>
<p><em>Note</em> that this package can only be used from within a plugin
managed by the package <b class="package">page::pluginmgr</b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::page::util::norm::peg</b> <i class="arg">tree</i></a></dt>
<dd><p>This command assumes the <i class="arg">tree</i> object contains for a
parsing expression grammar. It normalizes this tree in place.
The result is called a  <i class="term">Normalized PE Grammar Tree</i>.</p>
<p>The following operations are performd</p>
<ol class="doctools_enumerated">
<li><p>The data for all terminals is stored in their grandparental
nodes. The terminal nodes and their parents are removed. Type
information is dropped.</p></li>
<li><p>All nodes which have exactly one child are irrelevant and are
removed, with the exception of the root node. The immediate
child of the root is irrelevant as well, and removed as well.</p></li>
<li><p>The name of the grammar is moved from the tree node it is stored
in to an attribute of the root node, and the tree node removed.</p>
<p>The node keeping the start expression separate is removed as
irrelevant and the root node of the start expression tagged with
a marker attribute, and its handle saved in an attribute of the
root node for quick access.</p></li>
<li><p>Nonterminal hint information is moved from nodes into attributes,
and the now irrelevant nodes are deleted.</p>
<p><em>Note:</em> This transformation is dependent on the removal of all
nodes with exactly one child, as it removes the all 'Attribute'
nodes already. Otherwise this transformation would have to put
the information into the grandparental node.</p>
<p>The default mode given to the nonterminals is <b class="const">value</b>.</p>
<p>Like with the global metadata definition specific information
is moved out out of nodes into attributes, the now irrelevant
nodes are deleted, and the root nodes of all definitions are
tagged with marker attributes. This provides us with a mapping
from nonterminal names to their defining nodes as well, which
is saved in an attribute of the root node for quick reference.</p>
<p>At last the range in the input covered by a definition is
computed. The left extent comes from the terminal for the
nonterminal symbol it defines. The right extent comes from
the rightmost child under the definition. While this not an
expression tree yet the location data is sound already.</p></li>
<li><p>The remaining nodes under all definitions are transformed
into proper expression trees. First character ranges, followed
by unary operations, characters, and nonterminals. At last the
tree is flattened by the removal of superfluous inner nodes.</p>
<p>The order matters, to shed as much nodes as possible early, and
to avoid unnecessary work later.</p></li>
</ol></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key194">graph walking</a>, <a href="../../../../index.html#key112">normalization</a>, <a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key190">tree walking</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/page/page_util_peg.html.











































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

<div class='fossil-doc' data-title='page_util_peg - Parser generator tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_peg(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_peg - page PEG transformation utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">page::util::peg <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">snit</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::page::util::peg::symbolNodeOf</b> <i class="arg">tree</i> <i class="arg">node</i></a></li>
<li><a href="#2"><b class="cmd">::page::util::peg::symbolOf</b> <i class="arg">tree</i> <i class="arg">node</i></a></li>
<li><a href="#3"><b class="cmd">::page::util::peg::updateUndefinedDueRemoval</b> <i class="arg">tree</i></a></li>
<li><a href="#4"><b class="cmd">::page::util::peg::flatten</b> <i class="arg">treequery</i> <i class="arg">tree</i></a></li>
<li><a href="#5"><b class="cmd">::page::util::peg::getWarnings</b> <i class="arg">tree</i></a></li>
<li><a href="#6"><b class="cmd">::page::util::peg::printWarnings</b> <i class="arg">msg</i></a></li>
<li><a href="#7"><b class="cmd">::page::util::peg::peOf</b> <i class="arg">tree</i> <i class="arg">eroot</i></a></li>
<li><a href="#8"><b class="cmd">::page::util::peg::printTclExpr</b> <i class="arg">pe</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a few common operations to PEG transformations.
They assume a <i class="term">Normalized PE Grammar Tree</i> as input, see the
package <b class="package">page::util::norm::peg</b>, possibly augmented with
attributes coming from transformations not in conflict with the base
definition.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::page::util::peg::symbolNodeOf</b> <i class="arg">tree</i> <i class="arg">node</i></a></dt>
<dd><p>Given an arbitrary expression <i class="arg">node</i> in the AST <i class="arg">tree</i> it
determines the node (itself or an ancestor) containing the name of the
nonterminal symbol the node belongs to, and returns its id. The result
is either the root of the tree (for the start expression), or a
definition node.</p></dd>
<dt><a name="2"><b class="cmd">::page::util::peg::symbolOf</b> <i class="arg">tree</i> <i class="arg">node</i></a></dt>
<dd><p>As <b class="cmd">::page::util::peg::symbolNodeOf</b>, but returns the symbol name
instead of the node.</p></dd>
<dt><a name="3"><b class="cmd">::page::util::peg::updateUndefinedDueRemoval</b> <i class="arg">tree</i></a></dt>
<dd><p>The removal of nodes in the AST <i class="arg">tree</i> can cause symbols to lose
one or more users.</p>
<pre class="doctools_example">
	A used by B and C,
	B is reachable,
	C is not,
	so A now loses the node in the expression for C calling it,
	or rather, not calling it anymore.
</pre>
<p>This command updates the cross-references and which nonterminals are
now undefined.</p></dd>
<dt><a name="4"><b class="cmd">::page::util::peg::flatten</b> <i class="arg">treequery</i> <i class="arg">tree</i></a></dt>
<dd><p>This commands flattens nested sequence and choice operators in the AST
<i class="arg">tree</i>, re-using the <b class="package"><a href="../treeql/treeql.html">treeql</a></b> object <i class="arg">treequery</i> to
run the query determining which nodes to cut.</p></dd>
<dt><a name="5"><b class="cmd">::page::util::peg::getWarnings</b> <i class="arg">tree</i></a></dt>
<dd><p>This command looks at the attributes of the AST <i class="arg">tree</i> for
problems with the grammar and issues warnings. They do not prevent us
from writing the grammar, but still represent problems with it the
user should be made aware of.</p>
<p>The result of the command is a dictionary mapping nonterminal names to
their associated warnings.</p></dd>
<dt><a name="6"><b class="cmd">::page::util::peg::printWarnings</b> <i class="arg">msg</i></a></dt>
<dd><p>The argument of the command is a dictionary mapping nonterminal names
to their associated warnings, as generated by, for example, the
command <b class="cmd">::page::util::peg::getWarnings</b>.</p>
<p>The warnings contained therein are formatted and then printed via the
log command <b class="cmd">page_info</b>. This means that this command can be used
only from within a plugin managed by the package
<b class="package">page::pluginmgr</b>.</p></dd>
<dt><a name="7"><b class="cmd">::page::util::peg::peOf</b> <i class="arg">tree</i> <i class="arg">eroot</i></a></dt>
<dd><p>This command converts the parsing expression starting at the node
<i class="arg">eroot</i> in the AST <i class="arg">tree</i> into a nested list. The exact syntax
of this list specified by the package <b class="package"><a href="../grammar_peg/peg.html">grammar::peg</a></b>.</p></dd>
<dt><a name="8"><b class="cmd">::page::util::peg::printTclExpr</b> <i class="arg">pe</i></a></dt>
<dd><p>This command converts the parsing expression contained in the nested
list <i class="arg">pe</i> into a Tcl string which can be placed into a Tcl script.
See the package <b class="package"><a href="../grammar_peg/peg.html">grammar::peg</a></b> for the exact syntax of
<i class="arg">pe</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key279">transformation</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/page/page_util_quote.html.













































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182

<div class='fossil-doc' data-title='page_util_quote - Parser generator tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_quote(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_quote - page character quoting utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">page::util::quote <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">snit</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::page::util::quote::unquote</b> <i class="arg">char</i></a></li>
<li><a href="#2"><b class="cmd">::page::util::quote::quote'tcl</b> <i class="arg">char</i></a></li>
<li><a href="#3"><b class="cmd">::page::util::quote::quote'tclstr</b> <i class="arg">char</i></a></li>
<li><a href="#4"><b class="cmd">::page::util::quote::quote'tclcom</b> <i class="arg">char</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a few utility commands to convert characters
into various forms.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::page::util::quote::unquote</b> <i class="arg">char</i></a></dt>
<dd><p>A character, as stored in an abstract syntax tree by a PEG processor
(See the packages <b class="package">grammar::peg::interpreter</b>,
<b class="package">grammar::me</b>, and their relations), i.e. in some quoted form,
is converted into the equivalent Tcl character. The character is returned
as the result of the command.</p></dd>
<dt><a name="2"><b class="cmd">::page::util::quote::quote'tcl</b> <i class="arg">char</i></a></dt>
<dd><p>This command takes a Tcl character (internal representation) and
converts it into a string which is accepted by the Tcl parser, will
regenerate the character in question and is 7bit ASCII. The string is
returned as the result of this command.</p></dd>
<dt><a name="3"><b class="cmd">::page::util::quote::quote'tclstr</b> <i class="arg">char</i></a></dt>
<dd><p>This command takes a Tcl character (internal representation) and
converts it into a string which is accepted by the Tcl parser and will
generate a human readable representation of the character in question.
The string is returned as the result of this command.</p>
<p>The string does not use any unprintable characters. It may use
backslash-quoting. High UTF characters are quoted to avoid problems
with the still prevalent ascii terminals. It is assumed that the
string will be used in a double-quoted environment.</p></dd>
<dt><a name="4"><b class="cmd">::page::util::quote::quote'tclcom</b> <i class="arg">char</i></a></dt>
<dd><p>This command takes a Tcl character (internal representation) and
converts it into a string which is accepted by the Tcl parser when
used within a Tcl comment. The string is returned as the result of
this command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key604">quoting</a>, <a href="../../../../index.html#key192">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pki/pki.html.





























































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318

<div class='fossil-doc' data-title='pki - public key encryption'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pki(n) 0.10 tcllib &quot;public key encryption&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pki - Implementation of the public key cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">REFERENCES</a></li>
<li class="doctools_section"><a href="#section5">AUTHORS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pki <span class="opt">?0.10?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pki::encrypt</b> <span class="opt">?<i class="arg">-binary</i>?</span> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-pad</i>?</span> <span class="opt">?<i class="arg">-nopad</i>?</span> <span class="opt">?<i class="arg">-priv</i>?</span> <span class="opt">?<i class="arg">-pub</i>?</span> <span class="opt">?<i class="arg">--</i>?</span> <i class="arg">input</i> <i class="arg">key</i></a></li>
<li><a href="#2"><b class="cmd">::pki::decrypt</b> <span class="opt">?<i class="arg">-binary</i>?</span> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-unpad</i>?</span> <span class="opt">?<i class="arg">-nounpad</i>?</span> <span class="opt">?<i class="arg">-priv</i>?</span> <span class="opt">?<i class="arg">-pub</i>?</span> <span class="opt">?<i class="arg">--</i>?</span> <i class="arg">input</i> <i class="arg">key</i></a></li>
<li><a href="#3"><b class="cmd">::pki::sign</b> <i class="arg">input</i> <i class="arg">key</i> <span class="opt">?<i class="arg">algo</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::pki::verify</b> <i class="arg">signedmessage</i> <i class="arg">plaintext</i> <i class="arg">key</i> <span class="opt">?<i class="arg">algo</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::pki::key</b> <i class="arg">key</i> <span class="opt">?<i class="arg">password</i>?</span> <span class="opt">?<i class="arg">encodePem</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::pki::pkcs::parse_key</b> <i class="arg">key</i> <span class="opt">?<i class="arg">password</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::pki::x509::parse_cert</b> <i class="arg">cert</i></a></li>
<li><a href="#8"><b class="cmd">::pki::rsa::generate</b> <i class="arg">bitlength</i> <span class="opt">?<i class="arg">exponent</i>?</span></a></li>
<li><a href="#9"><b class="cmd">::pki::x509::verify_cert</b> <i class="arg">cert</i> <i class="arg">trustedcerts</i> <span class="opt">?<i class="arg">intermediatecerts</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::pki::x509::validate_cert</b> <i class="arg">cert</i> <span class="opt">?<b class="option">-sign_message</b> <i class="arg">dn_of_signer</i>?</span> <span class="opt">?<b class="option">-encrypt_message</b> <i class="arg">dn_of_signer</i>?</span> <span class="opt">?<b class="option">-sign_cert</b> <i class="arg">dn_to_be_signed</i> <i class="arg">ca_depth</i>?</span> <span class="opt">?<b class="option">-ssl</b> <i class="arg">dn</i>?</span></a></li>
<li><a href="#11"><b class="cmd">::pki::pkcs::create_csr</b> <i class="arg">keylist</i> <i class="arg">namelist</i> <span class="opt">?<i class="arg">encodePem</i>?</span> <span class="opt">?<i class="arg">algo</i>?</span></a></li>
<li><a href="#12"><b class="cmd">::pki::pkcs::parse_csr</b> <i class="arg">csr</i></a></li>
<li><a href="#13"><b class="cmd">::pki::x509::create_cert</b> <i class="arg">signreqlist</i> <i class="arg">cakeylist</i> <i class="arg">serial_number</i> <i class="arg">notBefore</i> <i class="arg">notAfter</i> <i class="arg">isCA</i> <i class="arg">extensions</i> <span class="opt">?<i class="arg">encodePem</i>?</span> <span class="opt">?<i class="arg">algo</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pki::encrypt</b> <span class="opt">?<i class="arg">-binary</i>?</span> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-pad</i>?</span> <span class="opt">?<i class="arg">-nopad</i>?</span> <span class="opt">?<i class="arg">-priv</i>?</span> <span class="opt">?<i class="arg">-pub</i>?</span> <span class="opt">?<i class="arg">--</i>?</span> <i class="arg">input</i> <i class="arg">key</i></a></dt>
<dd><p>Encrypt a message using PKI (probably RSA).
Requires the caller to specify either <b class="option">-priv</b> to encrypt with
the private key or <b class="option">-pub</b> to encrypt with the public key.  The
default option is to pad and return in hex.  One of <b class="option">-pub</b> or
<b class="option">-priv</b> must be specified.
The <b class="option">-hex</b> option causes the data to be returned in encoded as
a hexidecimal string, while the <b class="option">-binary</b> option causes the data
to be returned as a binary string.  If they are specified multiple
times, the last one specified is used.
The <b class="option">-pad</b> option causes the data to be padded per PKCS#1 prior
to being encrypted.  The <b class="option">-nopad</b> inhibits this behaviour.  If
they are specified multiple times, the last one specified is used.
The input to encrypt is specified as <i class="arg">input</i>.
The <i class="arg">key</i> parameter, holding the key to use, is a return value
from either
<b class="cmd">::pki::pkcs::parse_key</b>,
<b class="cmd">::pki::x509::parse_cert</b>, or
<b class="cmd">::pki::rsa::generate</b>.</p>
<p>Mapping to OpenSSL's <b class="syscmd">openssl</b> application:</p>
<ol class="doctools_enumerated">
<li><p>&quot;openssl rsautl -encrypt&quot; == &quot;::pki::encrypt -binary -pub&quot;</p></li>
<li><p>&quot;openssl rsautl -sign&quot;    == &quot;::pki::encrypt -binary -priv&quot;</p></li>
</ol></dd>
<dt><a name="2"><b class="cmd">::pki::decrypt</b> <span class="opt">?<i class="arg">-binary</i>?</span> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-unpad</i>?</span> <span class="opt">?<i class="arg">-nounpad</i>?</span> <span class="opt">?<i class="arg">-priv</i>?</span> <span class="opt">?<i class="arg">-pub</i>?</span> <span class="opt">?<i class="arg">--</i>?</span> <i class="arg">input</i> <i class="arg">key</i></a></dt>
<dd><p>Decrypt a message using PKI (probably RSA). See <b class="cmd">::pki::encrypt</b> for option handling.</p>
<p>Mapping to OpenSSL's <b class="syscmd">openssl</b> application:</p>
<ol class="doctools_enumerated">
<li><p>&quot;openssl rsautl -decrypt&quot; == &quot;::pki::decrypt -binary -priv&quot;</p></li>
<li><p>&quot;openssl rsautl -verify&quot;  == &quot;::pki::decrypt -binary -pub&quot;</p></li>
</ol></dd>
<dt><a name="3"><b class="cmd">::pki::sign</b> <i class="arg">input</i> <i class="arg">key</i> <span class="opt">?<i class="arg">algo</i>?</span></a></dt>
<dd><p>Digitally sign message <i class="arg">input</i> using the private <i class="arg">key</i>.  If <i class="arg">algo</i>
is ommited &quot;sha1&quot; is assumed.  Possible values for <i class="arg">algo</i> include
&quot;md5&quot;, &quot;sha1&quot;, &quot;sha256&quot;, and &quot;raw&quot;.  Specifyin &quot;raw&quot; for <i class="arg">algo</i> will
inhibit the building of an ASN.1 structure to encode which hashing
algorithm was chosen.
The <i class="arg">input</i> should be the plain text, hashing will be performed on it.
The <i class="arg">key</i> should include the private key.</p></dd>
<dt><a name="4"><b class="cmd">::pki::verify</b> <i class="arg">signedmessage</i> <i class="arg">plaintext</i> <i class="arg">key</i> <span class="opt">?<i class="arg">algo</i>?</span></a></dt>
<dd><p>Verify a digital signature using a public <i class="arg">key</i>.  Returns true or false.</p></dd>
<dt><a name="5"><b class="cmd">::pki::key</b> <i class="arg">key</i> <span class="opt">?<i class="arg">password</i>?</span> <span class="opt">?<i class="arg">encodePem</i>?</span></a></dt>
<dd><p>Convert a key structure into a serialized PEM (default) or DER encoded private key suitable for other applications.  For RSA keys this means PKCS#1.</p></dd>
<dt><a name="6"><b class="cmd">::pki::pkcs::parse_key</b> <i class="arg">key</i> <span class="opt">?<i class="arg">password</i>?</span></a></dt>
<dd><p>Convert a PKCS#1 private <i class="arg">key</i> into a usable key, i.e. one which
can be used as argument for
<b class="cmd">::pki::encrypt</b>,
<b class="cmd">::pki::decrypt</b>,
<b class="cmd">::pki::sign</b>, and
<b class="cmd">::pki::verify</b>.</p></dd>
<dt><a name="7"><b class="cmd">::pki::x509::parse_cert</b> <i class="arg">cert</i></a></dt>
<dd><p>Convert an X.509 certificate to a usable (public) key, i.e. one which
can be used as argument for
<b class="cmd">::pki:encrypt</b>,
<b class="cmd">::pki::decrypt</b>, and
<b class="cmd">::pki::verify</b>.
The <i class="arg">cert</i> argument can be either PEM or DER encoded.</p></dd>
<dt><a name="8"><b class="cmd">::pki::rsa::generate</b> <i class="arg">bitlength</i> <span class="opt">?<i class="arg">exponent</i>?</span></a></dt>
<dd><p>Generate a new RSA key pair, the parts of which can be used as
argument for
<b class="cmd">::pki::encrypt</b>,
<b class="cmd">::pki::decrypt</b>,
<b class="cmd">::pki::sign</b>, and
<b class="cmd">::pki::verify</b>.
The <i class="arg">bitlength</i> argument is the length of the public key modulus.
The <i class="arg">exponent</i> argument should generally not be specified unless
you really know what you are doing.</p></dd>
<dt><a name="9"><b class="cmd">::pki::x509::verify_cert</b> <i class="arg">cert</i> <i class="arg">trustedcerts</i> <span class="opt">?<i class="arg">intermediatecerts</i>?</span></a></dt>
<dd><p>Verify that a trust can be found between the certificate specified in the
<i class="arg">cert</i> argument and one of the certificates specified in the list
of certificates in the <i class="arg">trustedcerts</i> argument.  (Eventually the
chain can be through untrusted certificates listed in the <i class="arg">intermediatecerts</i>
argument, but this is currently unimplemented).
The certificates specified in the <i class="arg">cert</i> and <i class="arg">trustedcerts</i> option
should be parsed (from <b class="cmd">::pki::x509::parse_cert</b>).</p></dd>
<dt><a name="10"><b class="cmd">::pki::x509::validate_cert</b> <i class="arg">cert</i> <span class="opt">?<b class="option">-sign_message</b> <i class="arg">dn_of_signer</i>?</span> <span class="opt">?<b class="option">-encrypt_message</b> <i class="arg">dn_of_signer</i>?</span> <span class="opt">?<b class="option">-sign_cert</b> <i class="arg">dn_to_be_signed</i> <i class="arg">ca_depth</i>?</span> <span class="opt">?<b class="option">-ssl</b> <i class="arg">dn</i>?</span></a></dt>
<dd><p>Validate that a certificate is valid to be used in some capacity.  If
multiple options are specified they must all be met for this procedure
to return &quot;true&quot;.
Currently, only the <b class="option">-sign_cert</b> option is functional.
Arguments for the <b class="option">-sign_cert</b> option are <i class="arg">dn_to_be_signed</i>
and <i class="arg">ca_depth</i>.  The <i class="arg">dn_to_be_signed</i> is the distinguished from
the subject of a certificate to verify that the certificate specified in
the <i class="arg">cert</i> argument can sign.  The <i class="arg">ca_depth</i> argument is used to
indicate at which depth the verification should be done at.  Some
certificates are limited to how far down the chain they can be used to
verify a given certificate.</p></dd>
<dt><a name="11"><b class="cmd">::pki::pkcs::create_csr</b> <i class="arg">keylist</i> <i class="arg">namelist</i> <span class="opt">?<i class="arg">encodePem</i>?</span> <span class="opt">?<i class="arg">algo</i>?</span></a></dt>
<dd><p>Generate a certificate signing request from a key pair specified in
the <i class="arg">keylist</i> argument.
The <i class="arg">namelist</i> argument is a list of &quot;name&quot; followed by &quot;value&quot;
pairs to encoding as the requested distinguished name in the CSR.
The <i class="arg">encodePem</i> option specifies whether or not the result should
be PEM encoded or DER encoded.  A &quot;true&quot; value results in the result
being PEM encoded, while any other value 9results in the the result
being DER encoded.  DER encoding is the default.
The <i class="arg">algo</i> argument specifies the hashing algorithm we should use
to sign this certificate signing request with.  The default is &quot;sha1&quot;.
Other possible values include &quot;md5&quot; and &quot;sha256&quot;.</p></dd>
<dt><a name="12"><b class="cmd">::pki::pkcs::parse_csr</b> <i class="arg">csr</i></a></dt>
<dd><p>Parse a Certificate Signing Request.  The <i class="arg">csr</i> argument can be
either PEM or DER encoded.</p></dd>
<dt><a name="13"><b class="cmd">::pki::x509::create_cert</b> <i class="arg">signreqlist</i> <i class="arg">cakeylist</i> <i class="arg">serial_number</i> <i class="arg">notBefore</i> <i class="arg">notAfter</i> <i class="arg">isCA</i> <i class="arg">extensions</i> <span class="opt">?<i class="arg">encodePem</i>?</span> <span class="opt">?<i class="arg">algo</i>?</span></a></dt>
<dd><p>Sign a signing request (usually from <b class="cmd">::pki::pkcs::create_csr</b> or
<b class="cmd">::pki::pkcs::parse_csr</b>) with a Certificate Authority (CA) certificate.
The <i class="arg">signreqlist</i> argument should be the parsed signing request.
The <i class="arg">cakeylist</i> argument should be the parsed CA certificate.
The <i class="arg">serial_number</i> argument should be a serial number unique to
this certificate from this certificate authority.
The <i class="arg">notBefore</i> and <i class="arg">notAfter</i> arguments should contain the
time before and after which (respectively) the certificate should
be considered invalid.  The time should be encoded as something
<b class="cmd">clock format</b> will accept (i.e., the results of <b class="cmd">clock seconds</b>
and <b class="cmd">clock add</b>).
The <i class="arg">isCA</i> argument is a boolean argumen describing whether or not
the signed certificate should be a a CA certificate.  If specified as
true the &quot;id-ce-basicConstraints&quot; extension is added with the arguments
of &quot;critical&quot; being true, &quot;allowCA&quot; being true, and caDepth being
-1 (infinite).
The <i class="arg">extensions</i> argument is a list of extensions and their parameters
that should be encoded into the created certificate.   Currently only one
extension is understood (&quot;id-ce-basicConstraints&quot;).  It accepts three
arguments <i class="arg">critical</i> <i class="arg">allowCA</i> <i class="arg">caDepth</i>.  The <i class="arg">critical</i>
argument to this extension (and any extension) whether or not the
validator should reject the certificate as invalid if it does not
understand the extension (if set to &quot;true&quot;) or should ignore the extension
(if set to &quot;false&quot;).  The <i class="arg">allowCA</i> argument is used to specify
as a boolean value whether or not we can be used a certificate
authority (CA).  The <i class="arg">caDepth</i> argument indicates how many children
CAs can be children of this CA in a depth-wise fashion.  A value of &quot;0&quot;
for the <i class="arg">caDepth</i> argument means that this CA cannot sign a CA
certificate and have the result be valid.  A value of &quot;-1&quot; indicates
infinite depth.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<pre class="doctools_example">
</pre>
<pre class="doctools_example">
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Roy Keene</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rsa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../aes/aes.html">aes(n)</a>, <a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../des/des.html">des(n)</a>, <a href="../md5/md5.html">md5(n)</a>, <a href="../sha1/sha1.html">sha1(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key169">cipher</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key168">public key cipher</a>, <a href="../../../../index.html#key167">rsa</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, 2011, 2012, 2013, Roy Keene, Andreas Kupries</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pluginmgr/pluginmgr.html.





























































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414

<div class='fossil-doc' data-title='pluginmgr - Plugin management'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pluginmgr(n) 0.3 tcllib &quot;Plugin management&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pluginmgr - Manage a plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PUBLIC API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">PACKAGE COMMANDS</a></li>
<li class="doctools_subsection"><a href="#subsection2">OBJECT COMMAND</a></li>
<li class="doctools_subsection"><a href="#subsection3">OBJECT METHODS</a></li>
<li class="doctools_subsection"><a href="#subsection4">OBJECT CONFIGURATION</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">pluginmgr <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pluginmgr</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::pluginmgr::paths</b> <i class="arg">objectName</i> <i class="arg">name</i>...</a></li>
<li><a href="#3"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">clone</b></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">cget</b> <b class="option">-option</b></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">do</b> <i class="arg">arg</i>...</a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">interpreter</b></a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">plugin</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">load</b> <i class="arg">string</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">unload</b></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">list</b></a></li>
<li><a href="#16"><i class="arg">objectName</i> <b class="method">path</b> <i class="arg">path</i></a></li>
<li><a href="#17"><i class="arg">objectName</i> <b class="method">paths</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands and objects for the generic management
of plugins which can be loaded into an application.</p>
<p>To avoid the implementation of yet another system to locate Tcl code
the system provides by this package is built on top of the regular
package management system. Each plugin is considered as a package and
a simple invokation of <b class="cmd">package require</b> is enough to locate and
load it, if it exists. The only time we will need additional paths is
when a plugin manager is part of a wrapped application and has to be
able to search for plugins existing outside of that application. For
this situation the package provides a command to create a general set
of such paths based on names for the plugin manager and/or application
in question.</p>
<p>The main contribution of this package is a generic framework which
allows the easy declaration of</p>
<ol class="doctools_enumerated">
<li><p>How to translate a plugin name to the name of the package implementing
it, and vice versa.</p></li>
<li><p>The list of commands a plugin has to provide as API, and also of more
complex checks as code.</p></li>
<li><p>The list of commands expected by the plugin from the environment.</p></li>
</ol>
<p>This then allows the easy generation of plugin managers customized to
particular types of plugins for an application.</p>
<p>It should be noted that all plugin code is considered untrusted and
will always be executed within a safe interpreter. The interpreter is
enabled enough to allow plugins the loading of all additional packages
they may need.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pluginmgr</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></dt>
<dd><p>This command creates a new plugin manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the mamager object,
specifying the applicable plugins and their API.</p></dd>
<dt><a name="2"><b class="cmd">::pluginmgr::paths</b> <i class="arg">objectName</i> <i class="arg">name</i>...</a></dt>
<dd><p>This utility command adds a set of paths to the specified object,
based on the given <i class="arg">name</i>s.
It will search for:</p>
<ol class="doctools_enumerated">
<li><p>The environment variable <b class="variable"><i class="arg">name</i>_PLUGINS</b>. Its contents will
be interpreted as a list of package paths. The entries have to be
separated by either <b class="const">:</b> (unix) or <b class="const">;</b> (windows).</p>
<p>The name will be converted to upper-case letters.</p></li>
<li><p>The registry entry &quot;HKEY_LOCAL_MACHINE\SOFTWARE\<i class="arg">name</i>\PLUGINS&quot;.
Its contents will be interpreted as a list of package paths. The
entries have to be separated by <b class="const">;</b>. This item is considered
only when on Windows (tm).</p>
<p>The casing of letters is not changed.</p></li>
<li><p>The registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\<i class="arg">name</i>\PLUGINS&quot;.
Its contents will be interpreted as a list of package paths. The
entries have to be separated by <b class="const">;</b>. This item is considered
only when on Windows (tm).</p>
<p>The casing of letters is not changed.</p></li>
<li><p>The directory &quot;<b class="file">~/.<i class="arg">name</i>/plugin</b>&quot;.</p></li>
<li><p>The directory &quot;<b class="file">~/.<i class="arg">name</i>/plugins</b>&quot;.</p>
<p>The casing of letters is not changed.</p></li>
</ol>
<p>and add all the paths found that way to the list of package paths
maintained by the object.</p>
<p>If <i class="arg">name</i> is namespaced each item in the list will be repeated per
prefix of <i class="arg">name</i>, with conversion of :-sequences into the proper
separator (underscore for environment variables, backslash for
registry entries, and / for directories).</p>
<p>Examples:</p>
<pre class="doctools_example">
    ::pluginmgr::paths ::obj docidx
    =&gt; env  DOCIDX_PLUGINS
       reg  HKEY_LOCAL_MACHINE\SOFTWARE\docidx\PLUGINS
       reg  HKEY_CURRENT_USER\SOFTWARE\docidx\PLUGINS
       path ~/.docidx/plugins
    ::pluginmgr::paths ::obj doctools::idx
    =&gt; env  DOCTOOLS_PLUGINS
       env  DOCTOOLS_IDX_PLUGINS
       reg  HKEY_LOCAL_MACHINE\SOFTWARE\doctools\PLUGINS
       reg  HKEY_LOCAL_MACHINE\SOFTWARE\doctools\idx\PLUGINS
       reg  HKEY_CURRENT_USER\SOFTWARE\doctools\PLUGINS
       reg  HKEY_CURRENT_USER\SOFTWARE\doctools\idx\PLUGINS
       path ~/.doctools/plugin
       path ~/.doctools/idx/plugin
</pre>
</dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">OBJECT COMMAND</a></h3>
<p>All commands created by the command <b class="cmd">::pluginmgr</b> (See section
<span class="sectref"><a href="#subsection1">PACKAGE COMMANDS</a></span>) have the following general form and may
be used to invoke various operations on their plugin manager object.</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the exact
behavior of the command. See section <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span> for
the detailed specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">OBJECT METHODS</a></h3>
<dl class="doctools_definitions">
<dt><a name="4"><i class="arg">objectName</i> <b class="method">clone</b></a></dt>
<dd><p>This method creates a new plugin management object and returns the
associated object command. The generated object is a clone of the
object the method was invoked on. I.e. the new object will have the
same configuration as the current object. With regard to state, if the
current object has a plugin loaded then this plugin and all associated
state is moved to the generated clone and the current object is reset
into the base state (no plugin loaded). In this manner a configured
plugin manager is also a factory for loaded plugins.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">configure</b></a></dt>
<dd><p>The method returns a list of all known options and their current
values when called without any arguments.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>The method behaves like the method <b class="method">cget</b> when called with a
single argument and returns the value of the option specified by said
argument.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>The method reconfigures the specified <b class="option">option</b>s of the object,
setting them to the associated <i class="arg">value</i>s, when called with an even
number of arguments, at least two.</p>
<p>The legal options are described in the section
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">cget</b> <b class="option">-option</b></a></dt>
<dd><p>This method expects a legal configuration option as argument and will
return the current value of that option for the object the method was
invoked for.</p>
<p>The legal configuration options are described in section
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">do</b> <i class="arg">arg</i>...</a></dt>
<dd><p>This method interprets its list of arguments as the words of a command
and invokes this command in the execution context of the plugin.
The result of the invoked command is made the result of the method.
The call will fail with an error if no valid plugin has been loaded
into the manager object.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">interpreter</b></a></dt>
<dd><p>This method returns the handle of the safe interpreter the current
plugin is loaded into. An empty string as return value signals that
the manager currently has no valid plugin loaded.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">plugin</b></a></dt>
<dd><p>This method returns the name of the plugin currently loaded. An empty
string as return value signals that the manager currently has no valid
plugin loaded.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">load</b> <i class="arg">string</i></a></dt>
<dd><p>This method loads, validates, and initializes a named plugin into the
manager object.</p>
<p>The algorithm to locate and load the plugin employed is:</p>
<ol class="doctools_enumerated">
<li><p>If the <i class="arg">string</i> contains the path to an existing file then this
file is taken as the implementation of the plugin.</p></li>
<li><p>Otherwise the plugin name is translated into a package name via the value
of the option <b class="option">-pattern</b> and then loaded through the
regular package management.</p></li>
<li><p>The load fails.</p></li>
</ol>
<p>The algorithm to validate and initialize the loaded code is:</p>
<ol class="doctools_enumerated">
<li><p>If the option <b class="option">-api</b> is non-empty introspection commands are
used to ascertain that the plugin provides the listed commands.</p></li>
<li><p>If the option <b class="option">-check</b> is non-empty the specified command
prefix is called.</p></li>
<li><p>If either of the above fails the candidate plugin is unloaded again</p></li>
<li><p>Otherwise all the commands specified via the option
<b class="option">-cmds</b> are installed in the plugin.</p></li>
</ol>
<p>A previously loaded plugin is discarded, but only if the new plugin
was found and sucessfully validated and initialized. Note that there
will be no intereference between old and new plugin as both will be
put into separate safe interpreters.</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">unload</b></a></dt>
<dd><p>This method unloads the currently loaded plugin. It returns the empty
string. The call will be silently ignored if no plugin is loaded at
all.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">list</b></a></dt>
<dd><p>This method uses the contents of the option <b class="option">-pattern</b> to find
all packages which can be plugins under the purview of this manager
object. It translates their names into plugin names and returns a list
containing them.</p></dd>
<dt><a name="16"><i class="arg">objectName</i> <b class="method">path</b> <i class="arg">path</i></a></dt>
<dd><p>This methods adds the specified <i class="arg">path</i> to the list of additional
package paths to look at when searching for a plugin. It returns the
empty string. Duplicate paths are ignored, i.e. each path is added
only once. Paths are made absolute, but are not normalized.</p></dd>
<dt><a name="17"><i class="arg">objectName</i> <b class="method">paths</b></a></dt>
<dd><p>This method returns a list containing all additional paths which have
been added to the plugin manager object since its creation.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">OBJECT CONFIGURATION</a></h3>
<p>All plugin manager objects understand the following configuration options:</p>
<dl class="doctools_options">
<dt><b class="option">-pattern</b> <i class="arg">string</i></dt>
<dd><p>The value of this option is a glob pattern which has to contain
exactly one '*'-operator. All packages whose names match this pattern
are the plugins recognized by the manager object. And vice versa, the
replacement of the '*'-operator with a plugin name will yield the name
of the package implementing that plugin.</p>
<p>This option has no default, except if option <b class="option">-name</b> was set.
It has to be set before attempting to load a plugin, either directly,
or through option <b class="option">-name</b>.</p></dd>
<dt><b class="option">-api</b> <i class="arg">list</i></dt>
<dd><p>The value of this option is a list of command names, and any plugin
loaded has to provide these commands. Names which are not fully
qualified are considered to be rooted in the global namespace.
If empty no expectations are made on the plugin. The default value is
the empty list.</p></dd>
<dt><b class="option">-check</b> <i class="arg">cmdprefix</i></dt>
<dd><p>The value of this option is interpreted as a command prefix.
Its purpose is to perform complex checks on a loaded plugin package to
validate it, which go beyond a simple list of provided commands.</p>
<p>It is called with the manager object command as the only argument and
has to return a boolean value. A value of <b class="const">true</b> will be
interpreted to mean that the candidate plugin passed the test.
The call will happen if and only if the candidate plugin already
passed the basic API check specified through the option <b class="option">-api</b>.</p>
<p>The default value is the empty list, which causes the manager object
to suppress the call and to assume the candidate plugin passes.</p></dd>
<dt><b class="option">-cmds</b> <i class="arg">dict</i></dt>
<dd><p>The value of this option is a dictionary.  It specifies the commands
which will be made available to the plugin (as keys), and the trusted
commands in the environment which implement them (as values).
The trusted commands will be executed in the interpreter specified by
the option <b class="option">-cmdip</b>.
The default value is the empty dictionary.</p></dd>
<dt><b class="option">-cmdip</b> <i class="arg">ipspec</i></dt>
<dd><p>The value of this option is the path of the interpreter where the
trusted commands given to the plugin will be executed in.
The default is the empty string, referring to the current interpreter.</p></dd>
<dt><b class="option">-setup</b> <i class="arg">cmdprefix</i></dt>
<dd><p>The value of this option is interpreted as a command prefix.</p>
<p>It is called whenever a new safe interpreter for a plugin has been
created, but before a plugin is loaded. It is provided with the
manager object command and the interpreter handle as its only
arguments. Any return value will be ignored.</p>
<p>Its purpose is give a user of the plugin management the ability to
define commands, packages, etc. a chosen plugin may need while being
loaded.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pluginmgr</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key180">plugin management</a>, <a href="../../../../index.html#key181">plugin search</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/png/png.html.

















































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<div class='fossil-doc' data-title='png - Image manipulation'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">png(n) 0.1.2 tcllib &quot;Image manipulation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>png - PNG querying and manipulation of meta data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc32</b></li>
<li>package require <b class="pkgname">png <span class="opt">?0.1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::png::validate</b> <i class="arg">file</i></a></li>
<li><a href="#2"><b class="cmd">::png::isPNG</b> <i class="arg">file</i></a></li>
<li><a href="#3"><b class="cmd">::png::imageInfo</b> <i class="arg">file</i></a></li>
<li><a href="#4"><b class="cmd">::png::getTimestamp</b> <i class="arg">file</i></a></li>
<li><a href="#5"><b class="cmd">::png::setTimestamp</b> <i class="arg">file</i> <i class="arg">time</i></a></li>
<li><a href="#6"><b class="cmd">::png::getComments</b> <i class="arg">file</i></a></li>
<li><a href="#7"><b class="cmd">::png::removeComments</b> <i class="arg">file</i></a></li>
<li><a href="#8"><b class="cmd">::png::addComment</b> <i class="arg">file</i> <i class="arg">keyword</i> <i class="arg">text</i></a></li>
<li><a href="#9"><b class="cmd">::png::addComment</b> <i class="arg">file</i> <i class="arg">keyword</i> <i class="arg">lang</i> <i class="arg">keyword2</i> <i class="arg">text</i></a></li>
<li><a href="#10"><b class="cmd">::png::image</b> <i class="arg">file</i></a></li>
<li><a href="#11"><b class="cmd">::png::write</b> <i class="arg">file</i> <i class="arg">data</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to query and modify PNG images. PNG
stands for <i class="term">Portable Network Graphics</i> and is specified at
<a href="http://www.libpng.org/pub/png/spec/1.2">http://www.libpng.org/pub/png/spec/1.2</a>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::png::validate</b> <i class="arg">file</i></a></dt>
<dd><p>Returns a value indicating if <i class="arg">file</i> is a valid PNG file. The file
is checked for PNG signature, each chunks checksum is verified,
existence of a data chunk is verified, first chunk is checked for
header, last chunk is checked for ending. Things <em>not</em> checked
for are: validity of values within a chunk, multiple header chunks,
noncontiguous data chunks, end chunk before actual eof. This procedure
can take lots of time.</p>
<p>Possible return values:</p>
<dl class="doctools_definitions">
<dt>OK</dt>
<dd><p>File is a valid PNG file.</p></dd>
<dt>SIG</dt>
<dd><p>no/broken PNG signature.</p></dd>
<dt>BADLEN</dt>
<dd><p>corrupt chunk length.</p></dd>
<dt>EOF</dt>
<dd><p>premature end of file.</p></dd>
<dt>NOHDR</dt>
<dd><p>missing header chunk.</p></dd>
<dt>CKSUM</dt>
<dd><p>crc mismatch.</p></dd>
<dt>NODATA</dt>
<dd><p>missing data chunk(s).</p></dd>
<dt>NOEND</dt>
<dd><p>missing end marker.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::png::isPNG</b> <i class="arg">file</i></a></dt>
<dd><p>Returns a boolean value indicating if the file <i class="arg">file</i> starts with
a PNG signature. This is a much faster and less intensive check than
<b class="cmd">::png::validate</b> as it does not check if the PNG data is valid.</p></dd>
<dt><a name="3"><b class="cmd">::png::imageInfo</b> <i class="arg">file</i></a></dt>
<dd><p>Returns a dictionary with keys <b class="const">width</b>, <b class="const">height</b>,
<b class="const">depth</b>, <b class="const">color</b>, <b class="const">compression</b>, <b class="const">filter</b>, and
<b class="const">interlace</b>. The values are the associated properties of the PNG
image in <i class="arg">file</i>.
Throws an error if file is not a PNG image, or if the checksum of the
header is invalid. For information on interpreting the values for the
returned properties see
<a href="http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html">http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html</a>.</p></dd>
<dt><a name="4"><b class="cmd">::png::getTimestamp</b> <i class="arg">file</i></a></dt>
<dd><p>Returns the epoch time if a timestamp chunk is found in the PNG image
contained in the <i class="arg">file</i>, otherwise returns the empty string. Does
not attempt to verify the checksum of the timestamp chunk.
Throws an error if the <i class="arg">file</i> is not a valid PNG image.</p></dd>
<dt><a name="5"><b class="cmd">::png::setTimestamp</b> <i class="arg">file</i> <i class="arg">time</i></a></dt>
<dd><p>Writes a new timestamp to the <i class="arg">file</i>, either replacing the old
timestamp, or adding one just before the data chunks if there was no
previous timestamp. <i class="arg">time</i> is the new time in the gmt epoch
format.
Throws an error if <i class="arg">file</i> is not a valid PNG image.</p></dd>
<dt><a name="6"><b class="cmd">::png::getComments</b> <i class="arg">file</i></a></dt>
<dd><p>Currently supports only uncompressed comments. Does not attempt to
verify the checksums of the comment chunks. Returns a list where each
element is a comment. Each comment is itself a list. The list for a
plain text comment consists of 2 elements: the human readable keyword,
and the text data. A unicode (international) comment consists of 4
elements: the human readable keyword, the language identifier, the
translated keyword, and the unicode text data.
Throws an error if <i class="arg">file</i> is not a valid PNG image.</p></dd>
<dt><a name="7"><b class="cmd">::png::removeComments</b> <i class="arg">file</i></a></dt>
<dd><p>Removes all comments from the PNG image in <i class="arg">file</i>. Beware - This
uses memory equal to the file size minus comments, to hold the
intermediate result.
Throws an error if <i class="arg">file</i> is not a valid PNG image.</p></dd>
<dt><a name="8"><b class="cmd">::png::addComment</b> <i class="arg">file</i> <i class="arg">keyword</i> <i class="arg">text</i></a></dt>
<dd><p>Adds a plain <i class="arg">text</i> comment to the PNG image in <i class="arg">file</i>, just
before the first data chunk. Will throw an error if no data chunk is
found. <i class="arg">keyword</i> has to be less than 80 characters long to conform
to the PNG specification.</p></dd>
<dt><a name="9"><b class="cmd">::png::addComment</b> <i class="arg">file</i> <i class="arg">keyword</i> <i class="arg">lang</i> <i class="arg">keyword2</i> <i class="arg">text</i></a></dt>
<dd><p>Adds a unicode (international) comment to the PNG image in <i class="arg">file</i>,
just before the first data chunk. Will throw an error if no data chunk
is found. <i class="arg">keyword</i> has to be less than 80 characters long to
conform to the PNG specification. <i class="arg">keyword2</i> is the translated
<i class="arg">keyword</i>, in the language specified by the language identifier
<i class="arg">lang</i>.</p></dd>
<dt><a name="10"><b class="cmd">::png::image</b> <i class="arg">file</i></a></dt>
<dd><p>Given a PNG file returns the image in the list of scanlines format used by Tk_GetColor.</p></dd>
<dt><a name="11"><b class="cmd">::png::write</b> <i class="arg">file</i> <i class="arg">data</i></a></dt>
<dd><p>Takes a list of scanlines in the Tk_GetColor format and writes the represented image
to <i class="arg">file</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>png</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key155">comment</a>, <a href="../../../../index.html#key121">image</a>, <a href="../../../../index.html#key704">png</a>, <a href="../../../../index.html#key703">timestamp</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Code: Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;<br>
Copyright &copy; 2004, Doc:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pop3/pop3.html.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<div class='fossil-doc' data-title='pop3 - Tcl POP3 Client Library'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3(n) 1.9 tcllib &quot;Tcl POP3 Client Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3 - Tcl client for POP3 email protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section3">API</a></li>
<li class="doctools_section"><a href="#section4">Secure mail transfer</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">pop3 <span class="opt">?1.9?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pop3::open</b> <span class="opt">?<b class="option">-msex</b> 0|1?</span> <span class="opt">?<b class="option">-retr-mode</b> retr|list|slow?</span> <span class="opt">?<b class="option">-socketcmd</b> cmdprefix?</span> <span class="opt">?<b class="option">-stls</b> 0|1?</span> <span class="opt">?<b class="option">-tls-callback</b> stls-callback-command?</span> <i class="arg">host username password</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::pop3::config</b> <i class="arg">chan</i></a></li>
<li><a href="#3"><b class="cmd">::pop3::status</b> <i class="arg">chan</i></a></li>
<li><a href="#4"><b class="cmd">::pop3::last</b> <i class="arg">chan</i></a></li>
<li><a href="#5"><b class="cmd">::pop3::retrieve</b> <i class="arg">chan startIndex</i> <span class="opt">?<i class="arg">endIndex</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::pop3::delete</b> <i class="arg">chan startIndex</i> <span class="opt">?<i class="arg">endIndex</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::pop3::list</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">msg</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::pop3::top</b> <i class="arg">chan</i> <i class="arg">msg</i> <i class="arg">n</i></a></li>
<li><a href="#9"><b class="cmd">::pop3::uidl</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">msg</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::pop3::capa</b> <i class="arg">chan</i></a></li>
<li><a href="#11"><b class="cmd">::pop3::close</b> <i class="arg">chan</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">pop3</b> package provides a simple Tcl-only client library
for the POP3 email protocol as specified in
<a href="http://www.rfc-editor.org/rfc/rfc1939.txt">RFC 1939</a>.
It works by opening the standard POP3 socket on the server,
transmitting the username and password, then providing a Tcl API to
access the POP3 protocol commands.  All server errors are returned as
Tcl errors (thrown) which must be caught with the Tcl <b class="cmd">catch</b>
command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pop3::open</b> <span class="opt">?<b class="option">-msex</b> 0|1?</span> <span class="opt">?<b class="option">-retr-mode</b> retr|list|slow?</span> <span class="opt">?<b class="option">-socketcmd</b> cmdprefix?</span> <span class="opt">?<b class="option">-stls</b> 0|1?</span> <span class="opt">?<b class="option">-tls-callback</b> stls-callback-command?</span> <i class="arg">host username password</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Open a socket connection to the server specified by <i class="arg">host</i>,
transmit the <i class="arg">username</i> and <i class="arg">password</i> as login information to
the server.  The default port number is <b class="const">110</b>, which can be
overridden using the optional <i class="arg">port</i> argument.  The return value
is a channel used by all of the other ::pop3 functions.</p>
<p>The command recognizes three options</p>
<dl class="doctools_options">
<dt><b class="option">-msex</b> boolean</dt>
<dd><p>Setting this option tells the package that the server we are talking
to is an MS Exchange server (which has some oddities we have to work
around). The default is <b class="const">False</b>.</p></dd>
<dt><b class="option">-retr-mode</b> retr|list|slow</dt>
<dd><p>The retrieval mode determines how exactly messages are read from the
server.
The allowed values are <b class="const">retr</b>, <b class="const">list</b> and <b class="const">slow</b>.
The default is <b class="const">retr</b>. See <b class="cmd">::pop3::retrieve</b> for more
information.</p></dd>
<dt><b class="option">-socketcmd</b> cmdprefix</dt>
<dd><p>This option allows the user to overide the use of the builtin
<b class="cmd"><a href="../../../../index.html#key352">socket</a></b> command with any API-compatible command. The envisioned
main use is the securing of the new connection via SSL, through the
specification of the command <b class="cmd">tls::socket</b>. This command is
specially recognized as well, changing the default port of the
connection to <b class="const">995</b>.</p></dd>
<dt><b class="option">-stls</b> boolean</dt>
<dd><p>Setting this option tells the package to secure the connection using
SSL or TLS. It performs STARTTLS as described in IETF RFC 2595, it
first opens a normal, unencrypted connection and then negotiates a
SSLv3 or TLSv1 connection. If the connection cannot be secured, the
connection will be closed and an error will be returned</p></dd>
<dt><b class="option">-tls-callback</b> stls-callback-command</dt>
<dd><p>This option allows the user to overide the <b class="cmd">tls::callback</b> used during
the <b class="const">-stls</b> SSL/TLS handshake. See the TLS manual for details on how
to implement this callback.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::pop3::config</b> <i class="arg">chan</i></a></dt>
<dd><p>Returns the configuration of the pop3 connection identified by the
channel handle <i class="arg">chan</i> as a serialized array.</p></dd>
<dt><a name="3"><b class="cmd">::pop3::status</b> <i class="arg">chan</i></a></dt>
<dd><p>Query the server for the status of the mail spool.  The status is
returned as a list containing two elements, the first is the number of
email messages on the server and the second is the size (in octets, 8
bit blocks) of the entire mail spool.</p></dd>
<dt><a name="4"><b class="cmd">::pop3::last</b> <i class="arg">chan</i></a></dt>
<dd><p>Query the server for the last email message read from the spool.  This
value includes all messages read from all clients connecting to the
login account.  This command may not be supported by the email server,
in which case the server may return 0 or an error.</p></dd>
<dt><a name="5"><b class="cmd">::pop3::retrieve</b> <i class="arg">chan startIndex</i> <span class="opt">?<i class="arg">endIndex</i>?</span></a></dt>
<dd><p>Retrieve a range of messages from the server.  If the <i class="arg">endIndex</i>
is not specified, only one message will be retrieved.  The return
value is a list containing each message as a separate element.  See
the <i class="arg">startIndex</i> and <i class="arg">endIndex</i> descriptions below.</p>
<p>The retrieval mode determines how exactly messages are read from the
server. The mode <b class="const">retr</b> assumes that the RETR command delivers
the size of the message as part of the command status and uses this to
read the message efficiently. In mode <b class="const">list</b> RETR does not
deliver the size, but the LIST command does and we use this to
retrieve the message size before the actual retrieval, which can then
be done efficiently. In the last mode, <b class="const">slow</b>, the system is
unable to obtain the size of the message to retrieve in any manner and
falls back to reading the message from the server line by line.</p>
<p>It should also be noted that the system checks upon the configured
mode and falls back to the slower modes if the above assumptions are
not true.</p></dd>
<dt><a name="6"><b class="cmd">::pop3::delete</b> <i class="arg">chan startIndex</i> <span class="opt">?<i class="arg">endIndex</i>?</span></a></dt>
<dd><p>Delete a range of messages from the server.  If the <i class="arg">endIndex</i> is
not specified, only one message will be deleted.  Note, the indices
are not reordered on the server, so if you delete message 1, then the
first message in the queue is message 2 (message index 1 is no longer
valid).  See the <i class="arg">startIndex</i> and <i class="arg">endIndex</i> descriptions
below.</p>
<dl class="doctools_definitions">
<dt><i class="arg">startIndex</i></dt>
<dd><p>The <i class="arg">startIndex</i> may be an index of a specific message starting
with the index 1, or it have any of the following values:</p>
<dl class="doctools_definitions">
<dt><b class="const">start</b></dt>
<dd><p>This is a logical value for the first message in the spool, equivalent
to the value 1.</p></dd>
<dt><b class="const">next</b></dt>
<dd><p>The message immediately following the last message read, see
<b class="cmd">::pop3::last</b>.</p></dd>
<dt><b class="const">end</b></dt>
<dd><p>The most recent message in the spool (the end of the spool).  This is
useful to retrieve only the most recent message.</p></dd>
</dl></dd>
<dt><i class="arg">endIndex</i></dt>
<dd><p>The <i class="arg">endIndex</i> is an optional parameter and defaults to the value
&quot;-1&quot;, which indicates to only retrieve the one message specified by
<i class="arg">startIndex</i>.  If specified, it may be an index of a specific
message starting with the index &quot;1&quot;, or it may have any of the
following values:</p>
<dl class="doctools_definitions">
<dt><b class="const">last</b></dt>
<dd><p>The message is the last message read by a POP3 client, see
<b class="cmd">::pop3::last</b>.</p></dd>
<dt><b class="const">end</b></dt>
<dd><p>The most recent message in the spool (the end of the spool).</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::pop3::list</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">msg</i>?</span></a></dt>
<dd><p>Returns the scan listing of the mailbox. If parameter <i class="arg">msg</i> is
given, then the listing only for that message is returned.</p></dd>
<dt><a name="8"><b class="cmd">::pop3::top</b> <i class="arg">chan</i> <i class="arg">msg</i> <i class="arg">n</i></a></dt>
<dd><p>Optional POP3 command, not all servers may support this.
<b class="cmd">::pop3::top</b> retrieves headers of a message, specified by
parameter <i class="arg">msg</i>, and number of <i class="arg">n</i> lines from the message
body.</p></dd>
<dt><a name="9"><b class="cmd">::pop3::uidl</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">msg</i>?</span></a></dt>
<dd><p>Optional POP3 command, not all servers may support this.
<b class="cmd">::pop3::uidl</b> returns the uid listing of the mailbox. If the
parameter <i class="arg">msg</i> is specified, then the listing only for that
message is returned.</p></dd>
<dt><a name="10"><b class="cmd">::pop3::capa</b> <i class="arg">chan</i></a></dt>
<dd><p>Optional POP3 command, not all servers may support this.
<b class="cmd">::pop3::capa</b> returns a list of the capabilities of the server.
TOP, SASL, UIDL, LOGIN-DELAY and STLS are typical capabilities.
See IETF RFC 2449.</p></dd>
<dt><a name="11"><b class="cmd">::pop3::close</b> <i class="arg">chan</i></a></dt>
<dd><p>Gracefully close the connect after sending a POP3 QUIT command down
the socket.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Secure mail transfer</a></h2>
<p>A pop3 connection can be secured with SSL/TLS by requiring the package
<b class="package"><a href="../../../../index.html#key331">TLS</a></b> and then using either the option <b class="option">-socketcmd</b> or
the option <b class="option">-stls</b> of the command <b class="cmd">pop3::open</b>.
The first method, option <b class="option">-socketcmd</b>, will force the use
of the <b class="cmd">tls::socket</b> command when opening the connection. This is
suitable for POP3 servers which expect SSL connections only. These will
generally be listening on port 995.</p>
<pre class="doctools_example">
	package require tls
	tls::init -cafile /path/to/ca/cert -keyfile ...
	# Create secured pop3 channel
	pop3::open -socketcmd tls::socket \\
		$thehost $theuser $thepassword
	...
</pre>
<p>The second method, option <b class="option">-stls</b>, will connect to the standard POP3
port and then perform an STARTTLS handshake. This will only work for POP3
servers which have this capability. The package will confirm that the
server supports STARTTLS and the handshake was performed correctly before
proceeding with authentication.</p>
<pre class="doctools_example">
	package require tls
	tls::init -cafile /path/to/ca/cert -keyfile ...
	# Create secured pop3 channel
	pop3::open -stls 1 \\
		$thehost $theuser $thepassword
	...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key335">email</a>, <a href="../../../../index.html#key330">mail</a>, <a href="../../../../index.html#key445">pop</a>, <a href="../../../../index.html#key444">pop3</a>, <a href="../../../../index.html#key443">rfc 1939</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pop3d/pop3d.html.































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335

<div class='fossil-doc' data-title='pop3d - Tcl POP3 Server Package'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3d(n) 1.1.0 tcllib &quot;Tcl POP3 Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3d - Tcl POP3 server implementation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Options</a></li>
<li class="doctools_section"><a href="#section3">Authentication</a></li>
<li class="doctools_section"><a href="#section4">Mailboxes</a></li>
<li class="doctools_section"><a href="#section5">Secure mail transfer</a></li>
<li class="doctools_section"><a href="#section6">References</a></li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">pop3d <span class="opt">?1.1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pop3d::new</b> <span class="opt">?<i class="arg">serverName</i>?</span></a></li>
<li><a href="#2"><b class="cmd">serverName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">serverName</i> <b class="method">up</b></a></li>
<li><a href="#4"><i class="arg">serverName</i> <b class="method">down</b></a></li>
<li><a href="#5"><i class="arg">serverName</i> <b class="method">destroy</b> <span class="opt">?<i class="arg">mode</i>?</span></a></li>
<li><a href="#6"><i class="arg">serverName</i> <b class="method">configure</b></a></li>
<li><a href="#7"><i class="arg">serverName</i> <b class="method">configure</b> <i class="arg">-option</i></a></li>
<li><a href="#8"><i class="arg">serverName</i> <b class="method">configure</b> <i class="arg">-option value</i>...</a></li>
<li><a href="#9"><i class="arg">serverName</i> <b class="method">cget</b> <i class="arg">-option</i></a></li>
<li><a href="#10"><i class="arg">serverName</i> <b class="method">conn</b> list</a></li>
<li><a href="#11"><i class="arg">serverName</i> <b class="method">conn</b> state <i class="arg">id</i></a></li>
<li><a href="#12"><i class="arg">authCmd</i> <b class="method">exists</b> <i class="arg">name</i></a></li>
<li><a href="#13"><i class="arg">authCmd</i> <b class="method">lookup</b> <i class="arg">name</i></a></li>
<li><a href="#14"><i class="arg">storageCmd</i> <b class="method">dele</b> <i class="arg">mbox</i> <i class="arg">msgList</i></a></li>
<li><a href="#15"><i class="arg">storageCmd</i> <b class="method">lock</b> <i class="arg">mbox</i></a></li>
<li><a href="#16"><i class="arg">storageCmd</i> <b class="method">unlock</b> <i class="arg">mbox</i></a></li>
<li><a href="#17"><i class="arg">storageCmd</i> <b class="method">size</b> <i class="arg">mbox</i> <span class="opt">?<i class="arg">msgId</i>?</span></a></li>
<li><a href="#18"><i class="arg">storageCmd</i> <b class="method">stat</b> <i class="arg">mbox</i></a></li>
<li><a href="#19"><i class="arg">storageCmd</i> <b class="method">get</b> <i class="arg">mbox</i> <i class="arg">msgId</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pop3d::new</b> <span class="opt">?<i class="arg">serverName</i>?</span></a></dt>
<dd><p>This command creates a new server object with an associated global Tcl
command whose name is <i class="arg">serverName</i>.</p></dd>
</dl>
<p>The command <b class="cmd">serverName</b> may be used to invoke various operations
on the server.  It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">serverName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>A pop3 server can be started on any port the caller has permission for
from the operating system. The default port will be 110, which is the
port defined by the standard specified in
RFC 1939 (<a href="http://www.rfc-editor.org/rfc/rfc1939.txt">http://www.rfc-editor.org/rfc/rfc1939.txt</a>).
After creating, configuring and starting a the server object will
listen for and accept connections on that port and handle them
according to the POP3 protocol.</p>
<p><em>Note:</em> The server provided by this module will handle only the
basic protocol by itself. For the higher levels of user authentication
and handling of the actual mailbox contents callbacks will be invoked.</p>
<p>The following commands are possible for server objects:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">serverName</i> <b class="method">up</b></a></dt>
<dd><p>After this call the server will listen for connections on its configured port.</p></dd>
<dt><a name="4"><i class="arg">serverName</i> <b class="method">down</b></a></dt>
<dd><p>After this call the server will stop listening for connections. This
does not affect existing connections.</p></dd>
<dt><a name="5"><i class="arg">serverName</i> <b class="method">destroy</b> <span class="opt">?<i class="arg">mode</i>?</span></a></dt>
<dd><p>Destroys the server object. Currently open connections are handled
depending on the chosen mode.
The provided <i class="arg">mode</i>s are:</p>
<dl class="doctools_definitions">
<dt><b class="const">kill</b></dt>
<dd><p>Destroys the server immediately, and forcefully closes all currently
open connections. This is the default mode.</p></dd>
<dt><b class="const">defer</b></dt>
<dd><p>Stops the server from accepting new connections and will actually
destroy it only after the last of the currently open connections for
the server is closed.</p></dd>
</dl></dd>
<dt><a name="6"><i class="arg">serverName</i> <b class="method">configure</b></a></dt>
<dd><p>Returns a list containing all options and their current values in a
format suitable for use by the command <b class="cmd">array set</b>. The options
themselves are described in section <span class="sectref"><a href="#section2">Options</a></span>.</p></dd>
<dt><a name="7"><i class="arg">serverName</i> <b class="method">configure</b> <i class="arg">-option</i></a></dt>
<dd><p>Returns the current value of the specified option. This is an alias
for the method <b class="method">cget</b>. The options themselves are described in
section <span class="sectref"><a href="#section2">Options</a></span>.</p></dd>
<dt><a name="8"><i class="arg">serverName</i> <b class="method">configure</b> <i class="arg">-option value</i>...</a></dt>
<dd><p>Sets the specified option to the provided value. The options
themselves are described in section <span class="sectref"><a href="#section2">Options</a></span>.</p></dd>
<dt><a name="9"><i class="arg">serverName</i> <b class="method">cget</b> <i class="arg">-option</i></a></dt>
<dd><p>Returns the current value of the specified option. The options
themselves are described in section <span class="sectref"><a href="#section2">Options</a></span>.</p></dd>
<dt><a name="10"><i class="arg">serverName</i> <b class="method">conn</b> list</a></dt>
<dd><p>Returns a list containing the ids of all connections currently open.</p></dd>
<dt><a name="11"><i class="arg">serverName</i> <b class="method">conn</b> state <i class="arg">id</i></a></dt>
<dd><p>Returns a list suitable for [<b class="cmd">array set</b>] containing the
state of the connection referenced by <i class="arg">id</i>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Options</a></h2>
<p>The following options are available to pop3 server objects.</p>
<dl class="doctools_definitions">
<dt><b class="option">-port</b> <i class="arg">port</i></dt>
<dd><p>Defines the <i class="arg">port</i> to listen on for new connections. Default is
110. This option is a bit special. If <i class="arg">port</i> is set to &quot;0&quot; the
server, or rather the operating system, will select a free port on its
own. When querying <b class="option">-port</b> the id of this chosen port will be
returned. Changing the port while the server is up will neither change
the returned value, nor will it change on which port the server is
listening on. Only after resetting the server via a call to
<b class="method">down</b> followed by a call to <b class="method">up</b> will the new port take
effect. It is at that time that the value returned when querying
<b class="option">-port</b> will change too.</p></dd>
<dt><b class="option">-auth</b> <i class="arg">command</i></dt>
<dd><p>Defines a <i class="arg">command</i> prefix to call whenever the authentication of
a user is required. If no such command is specified the server will
reject all users. The interface which has to be provided by the
command prefix is described in section <span class="sectref"><a href="#section3">Authentication</a></span>.</p></dd>
<dt><b class="option">-storage</b> <i class="arg">command</i></dt>
<dd><p>Defines a <i class="arg">command</i> prefix to call whenever the handling of
mailbox contents is required. If no such command is specified the
server will claim that all mailboxes are empty. The interface which
has to be provided by the command prefix is described in section
<span class="sectref"><a href="#section4">Mailboxes</a></span>.</p></dd>
<dt><b class="option">-socket</b> <i class="arg">command</i></dt>
<dd><p>Defines a <i class="arg">command</i> prefix to call for opening the listening socket.
This can be used to make the pop3 server listen on a SSL socket
as provided by the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package, see the command <b class="cmd">tls::socket</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Authentication</a></h2>
<p>Here we describe the interface which has to be provided by the
authentication callback so that pop3 servers following the interface
of this module are able to use it.</p>
<dl class="doctools_definitions">
<dt><a name="12"><i class="arg">authCmd</i> <b class="method">exists</b> <i class="arg">name</i></a></dt>
<dd><p>This method is given a user<i class="arg">name</i> and has to return a boolean
value telling whether or not the specified user exists.</p></dd>
<dt><a name="13"><i class="arg">authCmd</i> <b class="method">lookup</b> <i class="arg">name</i></a></dt>
<dd><p>This method is given a user<i class="arg">name</i> and has to return a two-element
list containing the password for this user and a storage reference, in
this order.</p>
<p>The storage reference is passed unchanged to the storage callback, see
sections <span class="sectref"><a href="#section2">Options</a></span> and <span class="sectref"><a href="#section4">Mailboxes</a></span> for either the
option defining it and or the interface to provide, respectively.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Mailboxes</a></h2>
<p>Here we describe the interface which has to be provided by the storage
callback so that pop3 servers following the interface of this module
are able to use it. The <i class="arg">mbox</i> argument is the storage reference
as returned by the <b class="method">lookup</b> method of the authentication
command, see section <span class="sectref"><a href="#section3">Authentication</a></span>.</p>
<dl class="doctools_definitions">
<dt><a name="14"><i class="arg">storageCmd</i> <b class="method">dele</b> <i class="arg">mbox</i> <i class="arg">msgList</i></a></dt>
<dd><p>]
Deletes the messages whose numeric ids are contained in the
<i class="arg">msgList</i> from the mailbox specified via <i class="arg">mbox</i>.</p></dd>
<dt><a name="15"><i class="arg">storageCmd</i> <b class="method">lock</b> <i class="arg">mbox</i></a></dt>
<dd><p>This method locks the specified mailbox for use by a single connection
to the server. This is necessary to prevent havoc if several
connections to the same mailbox are open. The complementary method is
<b class="method">unlock</b>. The command will return true if the lock could be set
successfully or false if not.</p></dd>
<dt><a name="16"><i class="arg">storageCmd</i> <b class="method">unlock</b> <i class="arg">mbox</i></a></dt>
<dd><p>This is the complementary method to <b class="method">lock</b>, it revokes the lock
on the specified mailbox.</p></dd>
<dt><a name="17"><i class="arg">storageCmd</i> <b class="method">size</b> <i class="arg">mbox</i> <span class="opt">?<i class="arg">msgId</i>?</span></a></dt>
<dd><p>Determines the size of the message specified through its id in
<i class="arg">msgId</i>, in bytes, and returns this number. The command will
return the size of the whole maildrop if no message id was specified.</p></dd>
<dt><a name="18"><i class="arg">storageCmd</i> <b class="method">stat</b> <i class="arg">mbox</i></a></dt>
<dd><p>Determines the number of messages in the specified mailbox and returns
this number.</p></dd>
<dt><a name="19"><i class="arg">storageCmd</i> <b class="method">get</b> <i class="arg">mbox</i> <i class="arg">msgId</i></a></dt>
<dd><p>Returns a handle for the specified message. This handle is a mime
token following the interface described in the documentation of
package <b class="package"><a href="../mime/mime.html">mime</a></b>. The pop3 server will use the functionality of
the mime token to send the mail to the requestor at the other end of a
pop3 connection.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Secure mail transfer</a></h2>
<p>The option <b class="option">-socket</b> (see <span class="sectref"><a href="#section2">Options</a></span>) enables users of
the package to override how the server opens its listening socket.
The envisioned main use is the specification of the <b class="cmd">tls::socket</b>
command, see package <b class="package"><a href="../../../../index.html#key331">tls</a></b>, to secure the communication.</p>
<pre class="doctools_example">
	package require tls
	tls::init \\
		...
	pop3d::new S -socket tls::socket
	...
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://www.rfc-editor.org/rfc/rfc1939.txt">RFC 1939</a></p></li>
<li><p><a href="http://www.rfc-editor.org/rfc/rfc2449.txt">RFC 2449</a></p></li>
</ol>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3d</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key672">network</a>, <a href="../../../../index.html#key444">pop3</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key443">rfc 1939</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2005 Reinhard Max  &lt;max@suse.de&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pop3d/pop3d_dbox.html.





























































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254

<div class='fossil-doc' data-title='pop3d::dbox - Tcl POP3 Server Package'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3d::dbox(n) 1.0.2 tcllib &quot;Tcl POP3 Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3d::dbox - Simple mailbox database for pop3d</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">pop3d::dbox <span class="opt">?1.0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pop3d::dbox::new</b> <span class="opt">?<i class="arg">dbName</i>?</span></a></li>
<li><a href="#2"><b class="cmd">dbName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">dbName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">dbName</i> <b class="method">base</b> <i class="arg">base</i></a></li>
<li><a href="#5"><i class="arg">dbName</i> <b class="method">add</b> <i class="arg">mbox</i></a></li>
<li><a href="#6"><i class="arg">dbName</i> <b class="method">remove</b> <i class="arg">mbox</i></a></li>
<li><a href="#7"><i class="arg">dbName</i> <b class="method">move</b> <i class="arg">old new</i></a></li>
<li><a href="#8"><i class="arg">dbName</i> <b class="method">list</b></a></li>
<li><a href="#9"><i class="arg">dbName</i> <b class="method">exists</b> <i class="arg">mbox</i></a></li>
<li><a href="#10"><i class="arg">dbName</i> <b class="method">locked</b> <i class="arg">mbox</i></a></li>
<li><a href="#11"><i class="arg">dbName</i> <b class="method">lock</b> <i class="arg">mbox</i></a></li>
<li><a href="#12"><i class="arg">dbName</i> <b class="method">unlock</b> <i class="arg">mbox</i></a></li>
<li><a href="#13"><i class="arg">dbName</i> <b class="method">stat</b> <i class="arg">mbox</i></a></li>
<li><a href="#14"><i class="arg">dbName</i> <b class="method">size</b> <i class="arg">mbox</i> <span class="opt">?<i class="arg">msgId</i>?</span></a></li>
<li><a href="#15"><i class="arg">dbName</i> <b class="method">dele</b> <i class="arg">mbox msgList</i></a></li>
<li><a href="#16"><i class="arg">storageCmd</i> <b class="method">get</b> <i class="arg">mbox</i> <i class="arg">msgId</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">pop3d::dbox</b> provides simple/basic mailbox
management facilities. Each mailbox object manages a single base
directory whose subdirectories represent the managed mailboxes. Mails
in a mailbox are represented by files in a mailbox directory, where
each of these files contains a single mail, both headers and body, in
RFC 822 (<a href="http://www.rfc-editor.org/rfc/rfc822.txt">http://www.rfc-editor.org/rfc/rfc822.txt</a>) conformant
format.</p>
<p>Any mailbox object following the interface described below can be used
in conjunction with the pop3 server core provided by the package
<b class="package"><a href="pop3d.html">pop3d</a></b>. It is especially possible to directly use the objects
created by this package in the storage callback of pop3 servers
following the same interface as servers created by the package
<b class="package"><a href="pop3d.html">pop3d</a></b>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pop3d::dbox::new</b> <span class="opt">?<i class="arg">dbName</i>?</span></a></dt>
<dd><p>This command creates a new database object with an associated global
Tcl command whose name is <i class="arg">dbName</i>.</p></dd>
</dl>
<p>The command <b class="cmd">dbName</b> may be used to invoke various operations on
the database.  It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">dbName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>The following commands are possible for database objects:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">dbName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the mailbox database and all transient data. The directory
associated with the object is not destroyed.</p></dd>
<dt><a name="4"><i class="arg">dbName</i> <b class="method">base</b> <i class="arg">base</i></a></dt>
<dd><p>Defines the base directory containing the mailboxes to manage. If this
method is not called none of the following methods will work.</p></dd>
<dt><a name="5"><i class="arg">dbName</i> <b class="method">add</b> <i class="arg">mbox</i></a></dt>
<dd><p>Adds a mailbox of name <i class="arg">mbox</i> to the database. The name must be a
valid path component.</p></dd>
<dt><a name="6"><i class="arg">dbName</i> <b class="method">remove</b> <i class="arg">mbox</i></a></dt>
<dd><p>Removes the mailbox specified through <i class="arg">mbox</i>, and the mails
contained therein, from the database. This method will fail if the
specified mailbox is locked.</p></dd>
<dt><a name="7"><i class="arg">dbName</i> <b class="method">move</b> <i class="arg">old new</i></a></dt>
<dd><p>Changes the name of the mailbox <i class="arg">old</i> to <i class="arg">new</i>.</p></dd>
<dt><a name="8"><i class="arg">dbName</i> <b class="method">list</b></a></dt>
<dd><p>Returns a list containing the names of all mailboxes in the directory
associated with the database.</p></dd>
<dt><a name="9"><i class="arg">dbName</i> <b class="method">exists</b> <i class="arg">mbox</i></a></dt>
<dd><p>Returns true if the mailbox with name <i class="arg">mbox</i> exists in the
database, or false if not.</p></dd>
<dt><a name="10"><i class="arg">dbName</i> <b class="method">locked</b> <i class="arg">mbox</i></a></dt>
<dd><p>Checks if the mailbox specified through <i class="arg">mbox</i> is currently locked.</p></dd>
<dt><a name="11"><i class="arg">dbName</i> <b class="method">lock</b> <i class="arg">mbox</i></a></dt>
<dd><p>This method locks the specified mailbox for use by a single connection
to the server. This is necessary to prevent havoc if several
connections to the same mailbox are open. The complementary method is
<b class="method">unlock</b>. The command will return true if the lock could be set
successfully or false if not.</p></dd>
<dt><a name="12"><i class="arg">dbName</i> <b class="method">unlock</b> <i class="arg">mbox</i></a></dt>
<dd><p>This is the complementary method to <b class="method">lock</b>, it revokes the lock
on the specified mailbox.</p></dd>
<dt><a name="13"><i class="arg">dbName</i> <b class="method">stat</b> <i class="arg">mbox</i></a></dt>
<dd><p>Determines the number of messages in the specified mailbox and returns
this number. This method fails if the mailbox <i class="arg">mbox</i> is not
locked.</p></dd>
<dt><a name="14"><i class="arg">dbName</i> <b class="method">size</b> <i class="arg">mbox</i> <span class="opt">?<i class="arg">msgId</i>?</span></a></dt>
<dd><p>Determines the size of the message specified through its id in
<i class="arg">msgId</i>, in bytes, and returns this number. The command will
return the size of the whole maildrop if no message id was specified.
If specified the <i class="arg">msgId</i> has to be in the range &quot;1 ... [<i class="arg">dbName</i> <b class="method">stat</b>]&quot;
or this call will fail. If <b class="method">stat</b> was not called before this
call, <b class="method">size</b> will assume that there are zero messages in the
mailbox.</p></dd>
<dt><a name="15"><i class="arg">dbName</i> <b class="method">dele</b> <i class="arg">mbox msgList</i></a></dt>
<dd><p>Deletes the messages whose numeric ids are contained in the
<i class="arg">msgList</i> from the mailbox specified via <i class="arg">mbox</i>.
The <i class="arg">msgList</i> must not be empty or this call will fail.
The numeric ids in <i class="arg">msgList</i> have to be in the range &quot;1 ...
[<i class="arg">dbName</i> <b class="method">stat</b>]&quot; or this
call will fail. If <b class="method">stat</b> was not called
before this call, <b class="method">dele</b> will assume
that there are zero messages in the mailbox.</p></dd>
<dt><a name="16"><i class="arg">storageCmd</i> <b class="method">get</b> <i class="arg">mbox</i> <i class="arg">msgId</i></a></dt>
<dd><p>Returns a handle for the specified message. This handle is a mime
token following the interface described in the documentation of
package <b class="package"><a href="../mime/mime.html">mime</a></b>. The token is <em>read-only</em>. In other
words, the caller is allowed to do anything with the token except to
modify it.
The <i class="arg">msgId</i> has to be in the range &quot;1 ...
[<i class="arg">dbName</i> <b class="method">stat</b>]&quot; or this
call will fail. If <b class="method">stat</b> was not called
before this call, <b class="method">get</b> will assume
that there are zero messages in the mailbox.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3d</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key672">network</a>, <a href="../../../../index.html#key444">pop3</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key333">rfc 822</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pop3d/pop3d_udb.html.











































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

<div class='fossil-doc' data-title='pop3d::udb - Tcl POP3 Server Package'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3d::udb(n) 1.0.1 tcllib &quot;Tcl POP3 Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3d::udb - Simple user database for pop3d</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">pop3d::udb <span class="opt">?1.0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pop3d::udb::new</b> <span class="opt">?<i class="arg">dbName</i>?</span></a></li>
<li><a href="#2"><b class="cmd">dbName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">dbName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">dbName</i> <b class="method">add</b> <i class="arg">user pwd storage</i></a></li>
<li><a href="#5"><i class="arg">dbName</i> <b class="method">remove</b> <i class="arg">user</i></a></li>
<li><a href="#6"><i class="arg">dbName</i> <b class="method">rename</b> <i class="arg">user newName</i></a></li>
<li><a href="#7"><i class="arg">dbName</i> <b class="method">lookup</b> <i class="arg">user</i></a></li>
<li><a href="#8"><i class="arg">dbName</i> <b class="method">exists</b> <i class="arg">user</i></a></li>
<li><a href="#9"><i class="arg">dbName</i> <b class="method">who</b></a></li>
<li><a href="#10"><i class="arg">dbName</i> <b class="method">save</b> <span class="opt">?<i class="arg">file</i>?</span></a></li>
<li><a href="#11"><i class="arg">dbName</i> <b class="method">read</b> <i class="arg">file</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">pop3d::udb</b> provides simple in memory databases
which can be used in conjunction with the pop3 server core provided by
the package <b class="package"><a href="pop3d.html">pop3d</a></b>. The databases will use the names of users
as keys and associates passwords and storage references with them.</p>
<p>Objects created by this package can be directly used in the
authentication callback of pop3 servers following the same interface
as servers created by the package <b class="package"><a href="pop3d.html">pop3d</a></b>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pop3d::udb::new</b> <span class="opt">?<i class="arg">dbName</i>?</span></a></dt>
<dd><p>This command creates a new database object with an associated global
Tcl command whose name is <i class="arg">dbName</i>.</p></dd>
</dl>
<p>The command <b class="cmd">dbName</b> may be used to invoke various operations on
the database.  It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">dbName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>The following commands are possible for database objects:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">dbName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the database object.</p></dd>
<dt><a name="4"><i class="arg">dbName</i> <b class="method">add</b> <i class="arg">user pwd storage</i></a></dt>
<dd><p>Add a new user or changes the data of an existing user. Stores
<i class="arg">password</i> and <i class="arg">storage</i> reference for the given <i class="arg">user</i>.</p></dd>
<dt><a name="5"><i class="arg">dbName</i> <b class="method">remove</b> <i class="arg">user</i></a></dt>
<dd><p>Removes the specified <i class="arg">user</i> from the database.</p></dd>
<dt><a name="6"><i class="arg">dbName</i> <b class="method">rename</b> <i class="arg">user newName</i></a></dt>
<dd><p>Changes the name of the specified <i class="arg">user</i> to <i class="arg">newName</i>.</p></dd>
<dt><a name="7"><i class="arg">dbName</i> <b class="method">lookup</b> <i class="arg">user</i></a></dt>
<dd><p>Searches the database for the specified <i class="arg">user</i> and returns a
two-element list containing the associated password and storage
reference, in this order. Throws an error if the user could not be
found. This is the interface as expected by the authentication
callback of package <b class="package"><a href="pop3d.html">pop3d</a></b>.</p></dd>
<dt><a name="8"><i class="arg">dbName</i> <b class="method">exists</b> <i class="arg">user</i></a></dt>
<dd><p>Returns true if the specified <i class="arg">user</i> is known to the database,
else false.</p></dd>
<dt><a name="9"><i class="arg">dbName</i> <b class="method">who</b></a></dt>
<dd><p>Returns a list of users known to the database.</p></dd>
<dt><a name="10"><i class="arg">dbName</i> <b class="method">save</b> <span class="opt">?<i class="arg">file</i>?</span></a></dt>
<dd><p>Saves the contents of the database into the given <i class="arg">file</i>. If the
file is not specified the system will use the path last used in a call
to <i class="arg">dbName</i> <b class="method">read</b>. The generated file can be read by the
<b class="method">read</b> method.</p></dd>
<dt><a name="11"><i class="arg">dbName</i> <b class="method">read</b> <i class="arg">file</i></a></dt>
<dd><p>Reads the specified <i class="arg">file</i> and adds the contained user definitions
to the database. As the file is actually <b class="cmd"><a href="../../../../index.html#key436">source</a></b>'d a safe
interpreter is employed to safeguard against malicious code. This
interpreter knows the <b class="cmd">add</b> command for adding users and their
associated data to this database. This command has the same argument
signature as the method <b class="method">add</b>. The path of the <i class="arg">file</i> is
remembered internally so that it can be used in the next call of
<i class="arg">dbName</i> <b class="method">save</b> without an argument.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3d</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key672">network</a>, <a href="../../../../index.html#key444">pop3</a>, <a href="../../../../index.html#key133">protocol</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/practcl/practcl.html.





















































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186

<div class='fossil-doc' data-title='practcl - The The Proper Rational API for C to Tool Command Language Module'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">practcl(n) 0.1 tcllib &quot;The The Proper Rational API for C to Tool Command Language Module&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>practcl - The Practcl Module</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">TclOO 1.0</b></li>
<li>package require <b class="pkgname">practcl 0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">CPUTS</b> <i class="arg">varname</i> <i class="arg">body</i> <span class="opt">?<i class="arg">body</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">practcl::_isdirectory</b> <i class="arg">path</i></a></li>
<li><a href="#3"><b class="cmd">practcl::object</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>
<li><a href="#4"><b class="cmd">practcl::library</b> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>
<li><a href="#5"><b class="cmd">practcl::exe</b> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>
<li><a href="#6"><b class="cmd">practcl::product</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>
<li><a href="#7"><b class="cmd">practcl::cheader</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>
<li><a href="#8"><b class="cmd">practcl::csource</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>
<li><a href="#9"><b class="cmd">practcl::module</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>
<li><a href="#10"><b class="cmd">practcl::submodule</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The Practcl module is a tool for integrating large modules for C API
Tcl code that requires custom Tcl types and TclOO objects.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">CPUTS</b> <i class="arg">varname</i> <i class="arg">body</i> <span class="opt">?<i class="arg">body</i>...?</span></a></dt>
<dd><p>Appends blocks of text to a buffer. This command tries to reduce the number
of line breaks between bodies.</p></dd>
<dt><a name="2"><b class="cmd">practcl::_isdirectory</b> <i class="arg">path</i></a></dt>
<dd><p>Returns true if <i class="arg">path</i> is a directory, using the test</p></dd>
</dl>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">practcl::object</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
<dd><p>A generic Practcl object</p></dd>
<dt><a name="4"><b class="cmd">practcl::library</b> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
<dd><p>A Practcl object representing a library container</p></dd>
<dt><a name="5"><b class="cmd">practcl::exe</b> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
<dd><p>A Practcl object representing a wrapped executable</p></dd>
<dt><a name="6"><b class="cmd">practcl::product</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
<dd><p>A Practcl object representing a compiled product</p></dd>
<dt><a name="7"><b class="cmd">practcl::cheader</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
<dd><p>A Practcl object representing an externally generated c header</p></dd>
<dt><a name="8"><b class="cmd">practcl::csource</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
<dd><p>A Practcl object representing an externally generated c source file</p></dd>
<dt><a name="9"><b class="cmd">practcl::module</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
<dd><p>A Practcl object representing a dynamically generated C/H/Tcl suite</p></dd>
<dt><a name="10"><b class="cmd">practcl::submodule</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
<dd><p>A Practcl object representing a dynamically generated C/H/Tcl suite, subordinate to a module</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>practcl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key366">practcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>TclOO</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2016 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/processman/processman.html.





























































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

<div class='fossil-doc' data-title='processman - processman'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">processman(n) 0.1 tcllib &quot;processman&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>processman - Tool for automating the period callback of commands</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">twapi 3.1</b></li>
<li>package require <b class="pkgname">cron 1.1</b></li>
<li>package require <b class="pkgname">processman <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::processman::find_exe</b> <i class="arg">name</i></a></li>
<li><a href="#2"><b class="cmd">::processman::kill</b> <i class="arg">id</i></a></li>
<li><a href="#3"><b class="cmd">::processman::kill_all</b></a></li>
<li><a href="#4"><b class="cmd">::processman::killexe</b> <i class="arg">name</i></a></li>
<li><a href="#5"><b class="cmd">::processman::onexit</b> <i class="arg">id</i> <i class="arg">cmd</i></a></li>
<li><a href="#6"><b class="cmd">::processman::priority</b> <i class="arg">id</i> <i class="arg">level</i></a></li>
<li><a href="#7"><b class="cmd">::processman::process_list</b></a></li>
<li><a href="#8"><b class="cmd">::processman::process_list</b> <i class="arg">id</i></a></li>
<li><a href="#9"><b class="cmd">::processman::spawn</b> <i class="arg">id</i> <i class="arg">cmd</i> <i class="arg">args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">processman</b> package provides a Pure-tcl set of utilities
to manage child processes in a platform-generic nature.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::processman::find_exe</b> <i class="arg">name</i></a></dt>
<dd><p>Locate an executable by the name of <i class="arg">name</i> in the system path. On windows,
also add the .exe extention if not given.</p></dd>
<dt><a name="2"><b class="cmd">::processman::kill</b> <i class="arg">id</i></a></dt>
<dd><p>Kill a child process <i class="arg">id</i>.</p></dd>
<dt><a name="3"><b class="cmd">::processman::kill_all</b></a></dt>
<dd><p>Kill all processes spawned by this program</p></dd>
<dt><a name="4"><b class="cmd">::processman::killexe</b> <i class="arg">name</i></a></dt>
<dd><p>Kill a process identified by the executable. On Unix, this triggers a killall.
On windows, <b class="cmd">twapi::get_process_ids</b> is used to map a name one or more IDs,
which are then killed.</p></dd>
<dt><a name="5"><b class="cmd">::processman::onexit</b> <i class="arg">id</i> <i class="arg">cmd</i></a></dt>
<dd><p>Arrange to execute the script <i class="arg">cmd</i> when this programe detects that
process <i class="arg">id</i> as terminated.</p></dd>
<dt><a name="6"><b class="cmd">::processman::priority</b> <i class="arg">id</i> <i class="arg">level</i></a></dt>
<dd><p>Mark process <i class="arg">id</i> with the priorty <i class="arg">level</i>. Valid levels: low, high, default.</p>
<p>On Unix, the process is tagged using the <b class="cmd">nice</b> command.</p>
<p>On Windows, the process is modifed via the <b class="cmd">twapi::set_priority_class</b></p></dd>
<dt><a name="7"><b class="cmd">::processman::process_list</b></a></dt>
<dd><p>Return a list of processes that have been triggered by this program, as
well as a boolean flag to indicate if the process is still running.</p></dd>
<dt><a name="8"><b class="cmd">::processman::process_list</b> <i class="arg">id</i></a></dt>
<dd><p>Return true if process <i class="arg">id</i> is still running, false otherwise.</p></dd>
<dt><a name="9"><b class="cmd">::processman::spawn</b> <i class="arg">id</i> <i class="arg">cmd</i> <i class="arg">args</i></a></dt>
<dd><p>Start a child process, identified by <i class="arg">id</i>. <i class="arg">cmd</i> is the name
of the command to execute. <i class="arg">args</i> are arguments to pass to that command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>odie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key255">odie</a>, <a href="../../../../index.html#key256">processman</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>System</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/profiler/profiler.html.





















































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

<div class='fossil-doc' data-title='profiler - Tcl Profiler'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">profiler(n) 0.3 tcllib &quot;Tcl Profiler&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>profiler - Tcl source code profiler</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">profiler <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::profiler::init</b></a></li>
<li><a href="#2"><b class="cmd">::profiler::dump</b> <i class="arg">pattern</i></a></li>
<li><a href="#3"><b class="cmd">::profiler::print</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::profiler::reset</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::profiler::suspend</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::profiler::resume</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::profiler::sortFunctions</b> <i class="arg">key</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">profiler</b> package provides a simple Tcl source code
profiler.  It is a function-level profiler; that is, it collects only
function-level information, not the more detailed line-level
information.  It operates by redefining the Tcl <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> command.
Profiling is initiated via the <b class="cmd">::profiler::init</b> command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::profiler::init</b></a></dt>
<dd><p>Initiate profiling.  All procedures created after this command is
called will be profiled.  To profile an entire application, this
command must be called before any other commands.</p></dd>
<dt><a name="2"><b class="cmd">::profiler::dump</b> <i class="arg">pattern</i></a></dt>
<dd><p>Dump profiling information for the all functions matching
<i class="arg">pattern</i>.  If no pattern is specified, information for all
functions will be returned.  The result is a list of key/value pairs
that maps function names to information about that function.  The
information about each function is in turn a list of key/value pairs.
The keys used and their values are:</p>
<dl class="doctools_definitions">
<dt><b class="const">totalCalls</b></dt>
<dd><p>The total number of times <i class="arg">functionName</i> was called.</p></dd>
<dt><b class="const">callerDist</b></dt>
<dd><p>A list of key/value pairs mapping each calling function that called
<i class="arg">functionName</i> to the number of times it called
<i class="arg">functionName</i>.</p></dd>
<dt><b class="const">compileTime</b></dt>
<dd><p>The runtime, in clock clicks, of <i class="arg">functionName</i> the first time
that it was called.</p></dd>
<dt><b class="const">totalRuntime</b></dt>
<dd><p>The sum of the runtimes of all calls of <i class="arg">functionName</i>.</p></dd>
<dt><b class="const">averageRuntime</b></dt>
<dd><p>Average runtime of <i class="arg">functionName</i>.</p></dd>
<dt><b class="const">descendantTime</b></dt>
<dd><p>Sum of the time spent in descendants of <i class="arg">functionName</i>.</p></dd>
<dt><b class="const">averageDescendantTime</b></dt>
<dd><p>Average time spent in descendants of <i class="arg">functionName</i>.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::profiler::print</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Print profiling information for all functions matching <i class="arg">pattern</i>.
If no pattern is specified, information about all functions will be
displayed.  The return result is a human readable display of the
profiling information.</p></dd>
<dt><a name="4"><b class="cmd">::profiler::reset</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Reset profiling information for all functions matching <i class="arg">pattern</i>.
If no pattern is specified, information will be reset for all
functions.</p></dd>
<dt><a name="5"><b class="cmd">::profiler::suspend</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Suspend profiling for all functions matching <i class="arg">pattern</i>.  If no
pattern is specified, profiling will be suspended for all
functions. It stops gathering profiling information after this command
is issued. However, it does not erase any profiling information that
has been gathered previously.  Use resume command to re-enable
profiling.</p></dd>
<dt><a name="6"><b class="cmd">::profiler::resume</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Resume profiling for all functions matching <i class="arg">pattern</i>.  If no
pattern is specified, profiling will be resumed for all functions.
This command should be invoked after suspending the profiler in the
code.</p></dd>
<dt><a name="7"><b class="cmd">::profiler::sortFunctions</b> <i class="arg">key</i></a></dt>
<dd><p>Return a list of functions sorted by a particular profiling statistic.
Supported values for <i class="arg">key</i> are: <b class="const">calls</b>,
<b class="const">exclusiveTime</b>, <b class="const">compileTime</b>, <b class="const">nonCompileTime</b>,
<b class="const">totalRuntime</b>, <b class="const">avgExclusiveTime</b>, and
<b class="const">avgRuntime</b>.  The return result is a list of lists, where each
sublist consists of a function name and the value of <i class="arg">key</i> for
that function.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>profiler</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key649">profile</a>, <a href="../../../../index.html#key648">speed</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_astree.html.

















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344

<div class='fossil-doc' data-title='pt::ast - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::ast(n) 1.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::ast - Abstract Syntax Tree Serialization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">AST serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::ast <span class="opt">?1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::ast</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::pt::ast</b> <b class="method">verify-as-canonical</b> <i class="arg">serial</i></a></li>
<li><a href="#3"><b class="cmd">::pt::ast</b> <b class="method">canonicalize</b> <i class="arg">serial</i></a></li>
<li><a href="#4"><b class="cmd">::pt::ast</b> <b class="method">print</b> <i class="arg">serial</i></a></li>
<li><a href="#5"><b class="cmd">::pt::ast</b> <b class="method">bottomup</b> <i class="arg">cmdprefix</i> <i class="arg">ast</i></a></li>
<li><a href="#6"><b class="cmd">cmdprefix</b> <i class="arg">ast</i></a></li>
<li><a href="#7"><b class="cmd">::pt::ast</b> <b class="method">topdown</b> <i class="arg">cmdprefix</i> <i class="arg">pe</i></a></li>
<li><a href="#8"><b class="cmd">::pt::ast</b> <b class="method">equal</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></li>
<li><a href="#9"><b class="cmd">::pt::ast</b> <b class="method">new0</b> <i class="arg">s</i> <i class="arg">loc</i> <span class="opt">?<i class="arg">child</i>...?</span></a></li>
<li><a href="#10"><b class="cmd">::pt::ast</b> <b class="method">new</b> <i class="arg">s</i> <i class="arg">start</i> <i class="arg">end</i> <span class="opt">?<i class="arg">child</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides commands to work with the serializations of
abstract syntax trees as managed by the Parser Tools, and specified in
section <span class="sectref"><a href="#section3">AST serialization format</a></span>.</p>
<p>This is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::ast</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
serialization of an abstract syntax tree and will throw an error if
that is not the case. The result of the command is the empty string.</p>
<p>If the argument <i class="arg">canonvar</i> is specified it is interpreted as the
name of a variable in the calling context. This variable will be
written to if and only if <i class="arg">serial</i> is a valid regular
serialization. Its value will be a boolean, with <b class="const">True</b>
indicating that the serialization is not only valid, but also
<i class="term">canonical</i>. <b class="const">False</b> will be written for a valid, but
non-canonical serialization.</p>
<p>For the specification of serializations see the section
<span class="sectref"><a href="#section3">AST serialization format</a></span>.</p></dd>
<dt><a name="2"><b class="cmd">::pt::ast</b> <b class="method">verify-as-canonical</b> <i class="arg">serial</i></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">canonical</i> serialization of an abstract syntax tree and will
throw an error if that is not the case. The result of the command is
the empty string.</p>
<p>For the specification of canonical serializations see the section
<span class="sectref"><a href="#section3">AST serialization format</a></span>.</p></dd>
<dt><a name="3"><b class="cmd">::pt::ast</b> <b class="method">canonicalize</b> <i class="arg">serial</i></a></dt>
<dd><p>This command assumes that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of an abstract syntax and will throw an
error if that is not the case.</p>
<p>It will then convert the input into the <i class="term">canonical</i> serialization
of the contained tree and return it as its result. If the input is
already canonical it will be returned unchanged.</p>
<p>For the specification of regular and canonical serializations see the
section <span class="sectref"><a href="#section3">AST serialization format</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::pt::ast</b> <b class="method">print</b> <i class="arg">serial</i></a></dt>
<dd><p>This command assumes that the argument <i class="arg">serial</i> contains a valid
serialization of an abstract syntax tree and returns a string
containing that tree in a human readable form.</p>
<p>The exact format of this form is not specified and cannot be relied on
for parsing or other machine-based activities.</p>
<p>For the specification of serializations see the section
<span class="sectref"><a href="#section3">AST serialization format</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::pt::ast</b> <b class="method">bottomup</b> <i class="arg">cmdprefix</i> <i class="arg">ast</i></a></dt>
<dd><p>This command walks the abstract syntax tree <i class="arg">ast</i> from the bottom
up to the root, invoking the command prefix <i class="arg">cmdprefix</i> for each
node. This implies that the children of a node N are handled before N.</p>
<p>The command prefix has the signature</p>
<dl class="doctools_definitions">
<dt><a name="6"><b class="cmd">cmdprefix</b> <i class="arg">ast</i></a></dt>
<dd><p>I.e. it is invoked with the ast node the walk is currently at.</p>
<p>The result returned by the command prefix replaces <i class="arg">ast</i> in the
node it was a child of, allowing transformations of the tree.</p>
<p>This also means that for all inner node the contents of the children
elements are the results of the command prefix invoked for the
children of this node.</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::pt::ast</b> <b class="method">topdown</b> <i class="arg">cmdprefix</i> <i class="arg">pe</i></a></dt>
<dd><p>This command walks the abstract syntax tree <i class="arg">ast</i> from the root
down to the leaves, invoking the command prefix <i class="arg">cmdprefix</i> for
each node. This implies that the children of a node N are handled
after N.</p>
<p>The command prefix has the same signature as for <b class="method">bottomup</b>,
see above.</p>
<p>The result returned by the command prefix is <em>ignored</em>.</p></dd>
<dt><a name="8"><b class="cmd">::pt::ast</b> <b class="method">equal</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></dt>
<dd><p>This command tests the two sbstract syntax trees <i class="arg">seriala</i> and
<i class="arg">serialb</i> for structural equality. The result of the command is a
boolean value. It will be set to <b class="const">true</b> if the trees are
identical, and <b class="const">false</b> otherwise.</p>
<p>String equality is usable only if we can assume that the two trees are
pure Tcl lists.</p></dd>
<dt><a name="9"><b class="cmd">::pt::ast</b> <b class="method">new0</b> <i class="arg">s</i> <i class="arg">loc</i> <span class="opt">?<i class="arg">child</i>...?</span></a></dt>
<dd><p>This command command constructs the ast for a nonterminal node
refering refering to the symbol <i class="arg">s</i> at position <i class="arg">loc</i> in the
input, and the set of child nodes <i class="arg">child</i> ..., from left
right. The latter may be empty. The constructed node is returned as
the result of the command. The end position is <i class="arg">loc</i>-1, i.e. one
character before the start. This type of node is possible for rules
containing optional parts.</p></dd>
<dt><a name="10"><b class="cmd">::pt::ast</b> <b class="method">new</b> <i class="arg">s</i> <i class="arg">start</i> <i class="arg">end</i> <span class="opt">?<i class="arg">child</i>...?</span></a></dt>
<dd><p>This command command constructs the ast for a nonterminal node
refering to the symbol <i class="arg">s</i> covering the range of positions
<i class="arg">start</i> to <i class="arg">end</i> in the input, and the set of child nodes
<i class="arg">child</i> ..., from left right. The latter may be empty. The
constructed node is returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AST serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Abstract Syntax Trees (ASTs) as immutable values for transport,
comparison, etc.</p>
<p>Each node in an AST represents a nonterminal symbol of a grammar, and
the range of tokens/characters in the input covered by it. ASTs do not
contain terminal symbols, i.e. tokens/characters. These can be
recovered from the input given a symbol's location.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a tree may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any AST is the serialization of its root node.</p></li>
<li><p>The serialization of any node is a Tcl list containing at least three
elements.</p>
<ol class="doctools_enumerated">
<li><p>The first element is the name of the nonterminal symbol stored in the
node.</p></li>
<li><p>The second and third element are the locations of the first and last
token in the token stream the node represents (covers).</p>
<ol class="doctools_enumerated">
<li><p>Locations are provided as non-negative integer offsets from the
beginning of the token stream, with the first token found in the
stream located at offset 0 (zero).</p></li>
<li><p>The end location has to be equal to or larger than the start location.</p></li>
</ol>
</li>
<li><p>All elements after the first three represent the children of the node,
which are themselves nodes. This means that the serializations of
nodes without children, i.e. leaf nodes, have exactly three elements.
The children are stored in the list with the leftmost child first, and
the rightmost child last.</p></li>
</ol>
</li>
</ol></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of an abstract syntax tree has the format
as specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this tree.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the parsing expression grammar below</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>and the input string</p>
<pre class="doctools_example"> 120+5 </pre>
<p>then a parser should deliver the abstract syntax tree below (except for whitespace)</p>
<pre class="doctools_example">
set ast {Expression 0 4
    {Factor 0 4
        {Term 0 2
            {Number 0 2
                {Digit 0 0}
                {Digit 1 1}
                {Digit 2 2}
            }
        }
        {AddOp 3 3}
        {Term 4 4
            {Number 4 4
                {Digit 4 4}
            }
        }
    }
}
</pre>
<p>Or, more graphical</p>
<p><img alt="expr_ast" src="../../../../image/expr_ast.png"></p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_cparam_config_critcl.html.































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

<div class='fossil-doc' data-title='pt::cparam::configuration::critcl - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::cparam::configuration::critcl(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::cparam::configuration::critcl - C/PARAM, Canned configuration, Critcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::cparam::configuration::critcl <span class="opt">?1.0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::cparam::configuration::critcl</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package is an adjunct to <b class="package"><a href="pt_peg_to_cparam.html">pt::peg::to::cparam</a></b>, to make
the use of this highly configurable package easier by providing a
canned configuration. When applied this configuration causes the
package <b class="package"><a href="pt_peg_to_cparam.html">pt::peg::to::cparam</a></b> to generate
<b class="package">critcl</b>-based parser packages.</p>
<p>It is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::cparam::configuration::critcl</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>The command applies the configuration provided by this package to the
<i class="arg">cmdprefix</i>, causing the creation of <b class="package">critcl</b>-based parsers
whose class is <i class="arg">name</i>, in package <i class="arg">pkg</i> with <i class="arg">version</i>.</p>
<p>The use of a command prefix as API allows application of the
configuration to not only <b class="package"><a href="pt_peg_to_cparam.html">pt::peg::to::cparam</a></b>
(<b class="cmd">pt::peg::to::cparam configure</b>), but also export manager
instances and PEG containers (<b class="cmd">$export configuration set</b> and
<b class="cmd">[$container exporter] configuration set</b> respectively).</p>
<p>Or anything other command prefix accepting two arguments, option and
value.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_cparam_config_tea.html.































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

<div class='fossil-doc' data-title='pt::cparam::configuration::tea - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::cparam::configuration::tea(n) 0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::cparam::configuration::tea - C/PARAM, Canned configuration, TEA</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::cparam::configuration::tea <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::cparam::configuration::tea</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package is an adjunct to <b class="package"><a href="pt_peg_to_cparam.html">pt::peg::to::cparam</a></b>, to make
the use of this highly configurable package easier by providing a
canned configuration. When applied this configuration causes the
package <b class="package"><a href="pt_peg_to_cparam.html">pt::peg::to::cparam</a></b> to generate plain parser code
ready for inclusion into a <i class="term">TEA</i>-based C extension.</p>
<p>It is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::cparam::configuration::tea</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>The command applies the configuration provided by this package to the
<i class="arg">cmdprefix</i>, causing the creation of <b class="package">tea</b>-based parsers
whose class is <i class="arg">name</i>, in package <i class="arg">pkg</i> with <i class="arg">version</i>.</p>
<p>The use of a command prefix as API allows application of the
configuration to not only <b class="package"><a href="pt_peg_to_cparam.html">pt::peg::to::cparam</a></b>
(<b class="cmd">pt::peg::to::cparam configure</b>), but also export manager
instances and PEG containers (<b class="cmd">$export configuration set</b> and
<b class="cmd">[$container exporter] configuration set</b> respectively).</p>
<p>Or anything other command prefix accepting two arguments, option and
value.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_from_api.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533

<div class='fossil-doc' data-title='pt_import_api - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_import_api(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_import_api - Parser Tools Import API</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Converter API</a></li>
<li class="doctools_section"><a href="#section3">Plugin API</a></li>
<li class="doctools_section"><a href="#section4">Usage</a></li>
<li class="doctools_section"><a href="#section5">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">CONVERTER</b> <b class="method">convert</b> <i class="arg">text</i></a></li>
<li><a href="#2"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></li>
<li><a href="#3"><b class="cmd">::import</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This document describes two APIs. First the API shared by all packages
for the conversion of some other format into Parsing Expression
Grammars , and then the API shared by the packages which implement the
import plugins sitting on top of the conversion packages.</p>
<p>Its intended audience are people who wish to create their own
converter for some type of input, and/or an import plugin for their or
some other converter.</p>
<p>It resides in the Import section of the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_import" src="../../../../image/arch_core_import.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Converter API</a></h2>
<p>Any (grammar) import converter has to follow the rules set out below:</p>
<ol class="doctools_enumerated">
<li><p>A converter is a package. Its name is arbitrary, however it is
	recommended to put it under the <b class="namespace">::pt::peg::from</b>
	namespace.</p></li>
<li><p>The package provides either a single Tcl command following the
	API outlined below, or a class command whose instances follow
	the same API. The commands which follow the API are called
	<i class="term">converter commands</i>.</p></li>
<li><p>A converter command has to provide the following single method
	with the given signature and semantic. Converter commands
	are allowed to provide more methods of their own, but not
	less, and they may not provide different semantics for the
	standardized method.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">CONVERTER</b> <b class="method">convert</b> <i class="arg">text</i></a></dt>
<dd><p>This method has to accept some <i class="arg">text</i>, a parsing expression
grammar in some format.
The result of the method has to be the canonical serialization of a
parsing expression grammar, as specified in section
<span class="sectref"><a href="#section5">PEG serialization format</a></span>, the result of reading and
converting the input text.</p></dd>
</dl>
</li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Plugin API</a></h2>
<p>Any (grammar) import plugin has to follow the rules set out below:</p>
<ol class="doctools_enumerated">
<li><p>A plugin is a package.</p></li>
<li><p>The name of a plugin package has the form
		pt::peg::import::<b class="variable">FOO</b>,
	where <b class="variable">FOO</b> is the name of the format the plugin will
	accept input for.</p></li>
<li><p>The plugin can expect that the package
	<b class="package">pt::peg::import::plugin</b> is present, as
	indicator that it was invoked from a genuine plugin manager.</p>
<p>It is recommended that a plugin does check for the presence of
	this package.</p></li>
<li><p>The plugin can expect that a command named <b class="cmd">IncludeFile</b>
	is present, with the signature</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></dt>
<dd><p>This command has to be invoked by the plugin when it has to process an
included file, if the format has the concept of such.</p>
<p>The plugin has to supply the following arguments</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">currentfile</i></dt>
<dd><p>The path of the file it is currently processing. This may be the empty
string if no such is known.</p></dd>
<dt>string <i class="arg">path</i></dt>
<dd><p>The path of the include file as specified in the include directive
being processed.</p></dd>
</dl>
<p>The result of the command will be a 5-element list containing</p>
<ol class="doctools_enumerated">
<li><p>A boolean flag indicating the success (<b class="const">True</b>) or failure
       (<b class="const">False</b>) of the operation.</p></li>
<li><p>In case of success the contents of the included file, and the
       empty string otherwise.</p></li>
<li><p>The resolved, i.e. absolute path of the included file, if
       possible, or the unchanged <i class="arg">path</i> argument. This is for
       display in an error message, or as the <i class="arg">currentfile</i>
       argument of another call to <b class="cmd">IncludeFile</b> should this file
       contain more files.</p></li>
<li><p>In case of success an empty string, and for failure a code
       indicating the reason for it, one of</p>
<dl class="doctools_definitions">
<dt>notfound</dt>
<dd><p>The specified file could not be found.</p></dd>
<dt>notread</dt>
<dd><p>The specified file was found, but not be read into memory.</p></dd>
</dl>
</li>
<li><p>An empty string in case of success of a <b class="const">notfound</b>
       failure, and an additional error message describing the reason
       for a <b class="const">notread</b> error in more detail.</p></li>
</ol></dd>
</dl>
</li>
<li><p>A plugin has to provide a single command, in the global
	namespace, with the signature shown below. Plugins are allowed
	to provide more commands of their own, but not less, and they
	may not provide different semantics for the standardized
	command.</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">::import</b> <i class="arg">text</i></a></dt>
<dd><p>This command has to accept the a text containing a parsing expression
grammar in some format. The result of the command has to be the result
of the converter invoked by the plugin for the input grammar, the
canonical serialization of the parsing expression grammar contained in
the input.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">text</i></dt>
<dd><p>This argument will contain the parsing expression grammar for which to
generate the serialization.
The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section5">PEG serialization format</a></span>.</p></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of an invokation of
	the command <b class="cmd"><a href="../../../../index.html#key291">import</a></b>. This call has to leave the plugin in
	a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Usage</a></h2>
<p>To use a converter do</p>
<pre class="doctools_example">
    # Get the converter (single command here, not class)
    package require the-converter-package
    # Perform the conversion
    set serial [theconverter convert $thegrammartext]
    ... process the result ...
</pre>
<p>To use a plugin <b class="variable">FOO</b> do</p>
<pre class="doctools_example">
    # Get an import plugin manager
    package require pt::peg::import
    pt::peg::import I
    # Run the plugin, and the converter inside.
    set serial [I import serial $thegrammartext FOO]
    ... process the result ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_introduction.html.



























































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285

<div class='fossil-doc' data-title='pt_introduction - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_introduction(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_introduction - Introduction to Parser Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Parser Tools Architecture</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">User Packages</a></li>
<li class="doctools_subsection"><a href="#subsection2">Core Packages</a></li>
<li class="doctools_subsection"><a href="#subsection3">Support Packages</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Welcome to the Parser Tools, a system for the creation and
manipulation of parsers and the grammars driving them.</p>
<p>What are your goals which drove you here ?</p>
<ol class="doctools_enumerated">
<li><p>Do you simply wish to create a parser for some language ?</p>
<p>In that case have a look at our parser generator application,
<b class="cmd"><a href="../../apps/pt.html">pt</a></b>, or, for a slightly deeper access, the package underneath it,
<b class="package"><a href="pt_pgen.html">pt::pgen</a></b>.</p></li>
<li><p>Do you wish to know more about the architecture of the system ?</p>
<p>This is described in the section
<span class="sectref"><a href="#section2">Parser Tools Architecture</a></span>, below</p></li>
<li><p>Is your interest in the theoretical background upon which the packages
and tools are build ?</p>
<p>See the <i class="term"><a href="pt_peg_introduction.html">Introduction to Parsing Expression Grammars</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Parser Tools Architecture</a></h2>
<p>The system can be split into roughly three layers, as seen in the
figure below</p>
<p><img alt="architecture" src="../../../../image/architecture.png"></p>
<p>These layers are, from high to low:</p>
<ol class="doctools_enumerated">
<li><p>At the top we have the application and the packages using the packages
of the layer below to implement common usecases. One example is the
aforementioned <b class="package"><a href="pt_pgen.html">pt::pgen</a></b> which provides a parser generator.</p>
<p>The list of packages belonging to this layer can be found in section
<span class="sectref"><a href="#subsection1">User Packages</a></span></p></li>
<li><p>In this layer we have the packages which provide the core of the
functionality for the whole system. They are, in essence, a set of
blocks which can be combined in myriad ways, like Lego (tm). The
packages in the previous level are 'just' pre-fabricated combinations
to cover the most important use cases.</p>
<p>The list of packages belonging to this layer can be found in section
<span class="sectref"><a href="#subsection2">Core Packages</a></span></p></li>
<li><p>Last, but not least is the layer containing support packages providing
generic functionality which not necessarily belong into the module.</p>
<p>The list of packages belonging to this layer can be found in section
<span class="sectref"><a href="#subsection3">Support Packages</a></span></p></li>
</ol>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">User Packages</a></h3>
<dl class="doctools_definitions">
<dt><b class="package"><a href="pt_pgen.html">pt::pgen</a></b></dt>
<dd></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Core Packages</a></h3>
<p>This layer is further split into six sections handling the storage,
import, export, transformation, and execution of grammars, plus
grammar specific support packages.</p>
<dl class="doctools_definitions">
<dt>Storage</dt>
<dd><dl class="doctools_definitions">
<dt><b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b></dt>
<dd></dd>
</dl></dd>
<dt>Export</dt>
<dd><dl class="doctools_definitions">
<dt><b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_export_container.html">pt::peg::export::container</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_export_json.html">pt::peg::export::json</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_export_peg.html">pt::peg::export::peg</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_container.html">pt::peg::to::container</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_json.html">pt::peg::to::json</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_peg.html">pt::peg::to::peg</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_param.html">pt::peg::to::param</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_to_cparam.html">pt::peg::to::cparam</a></b></dt>
<dd></dd>
</dl></dd>
<dt>Import</dt>
<dd><dl class="doctools_definitions">
<dt><b class="package"><a href="pt_peg_import.html">pt::peg::import</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_import_container.html">pt::peg::import::container</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_import_json.html">pt::peg::import::json</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_import_peg.html">pt::peg::import::peg</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_from_container.html">pt::peg::from::container</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_from_json.html">pt::peg::from::json</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_peg_from_peg.html">pt::peg::from::peg</a></b></dt>
<dd></dd>
</dl></dd>
<dt>Transformation</dt>
<dd></dd>
<dt>Execution</dt>
<dd><dl class="doctools_definitions">
<dt><b class="package"><a href="pt_peg_interp.html">pt::peg::interp</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_rdengine.html">pt::rde</a></b></dt>
<dd></dd>
</dl></dd>
<dt>Support</dt>
<dd><dl class="doctools_definitions">
<dt><b class="package"><a href="pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_astree.html">pt::ast</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_pexpression.html">pt::pe</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="pt_pegrammar.html">pt::peg</a></b></dt>
<dd></dd>
</dl></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Support Packages</a></h3>
<dl class="doctools_definitions">
<dt><b class="package"><a href="pt_peg_container_peg.html">pt::peg::container::peg</a></b></dt>
<dd></dd>
<dt><b class="package">text::write</b></dt>
<dd></dd>
<dt><b class="package">configuration</b></dt>
<dd></dd>
<dt><b class="package">paths</b></dt>
<dd></dd>
<dt><b class="package">char</b></dt>
<dd></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_json_language.html.







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531

<div class='fossil-doc' data-title='pt::json_language - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::json_language(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::json_language - The JSON Grammar Exchange Format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>The <b class="const">json</b> format for parsing expression grammars was written as
a data exchange format not bound to Tcl. It was defined to allow the
exchange of grammars with PackRat/PEG based parser generators for
other languages.</p>
<p>It is formally specified by the rules below:</p>
<ol class="doctools_enumerated">
<li><p>The JSON of any PEG is a JSON object.</p></li>
<li><p>This object holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a JSON object holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a JSON object whose keys are the names of the nonterminal
symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a JSON object itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is a JSON string holding the Tcl serialization of the
parsing expression describing the symbols sentennial structure, as
specified in the section <span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value is a JSON holding holding one of three values specifying how
a parser should handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is a JSON string holding the Tcl serialization of the start
parsing expression of the grammar, as specified in the section
<span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol>
<p>As an aside to the advanced reader, this is pretty much the same as
the Tcl serialization of PE grammars, as specified in section
<span class="sectref"><a href="#section2">PEG serialization format</a></span>, except that the Tcl dictionaries
and lists of that format are mapped to JSON objects and arrays. Only
the parsing expressions themselves are not translated further, but
kept as JSON strings containing a nested Tcl list, and there is no
concept of canonicity for the JSON either.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>a JSON serialization for it is</p>
<pre class="doctools_example">
{
    &quot;pt::grammar::peg&quot; : {
        &quot;rules&quot; : {
            &quot;AddOp&quot;     : {
                &quot;is&quot;   : &quot;\/ {t -} {t +}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Digit&quot;     : {
                &quot;is&quot;   : &quot;\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Expression&quot; : {
                &quot;is&quot;   : &quot;\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Factor&quot;    : {
                &quot;is&quot;   : &quot;x {n Term} {* {x {n AddOp} {n Term}}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;MulOp&quot;     : {
                &quot;is&quot;   : &quot;\/ {t *} {t \/}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Number&quot;    : {
                &quot;is&quot;   : &quot;x {? {n Sign}} {+ {n Digit}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Sign&quot;      : {
                &quot;is&quot;   : &quot;\/ {t -} {t +}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Term&quot;      : {
                &quot;is&quot;   : &quot;n Number&quot;,
                &quot;mode&quot; : &quot;value&quot;
            }
        },
        &quot;start&quot; : &quot;n Expression&quot;
    }
}
</pre>
<p>and a Tcl serialization of the same is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
<p>The similarity of the latter to the JSON should be quite obvious.</p>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_param.html.







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579

<div class='fossil-doc' data-title='pt::param - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::param(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::param - PackRat Machine Specification</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Architectural State</a></li>
<li class="doctools_section"><a href="#section3">Instruction Set</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Input Handling</a></li>
<li class="doctools_subsection"><a href="#subsection2">Character Processing</a></li>
<li class="doctools_subsection"><a href="#subsection3">Error Handling</a></li>
<li class="doctools_subsection"><a href="#subsection4">Status Control</a></li>
<li class="doctools_subsection"><a href="#subsection5">Location Handling</a></li>
<li class="doctools_subsection"><a href="#subsection6">Nonterminal Execution</a></li>
<li class="doctools_subsection"><a href="#subsection7">Value Construction</a></li>
<li class="doctools_subsection"><a href="#subsection8">AST Construction</a></li>
<li class="doctools_subsection"><a href="#subsection9">Control Flow</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Interaction of the Instructions with the Architectural State</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>Welcome to the PackRat Machine (short: <i class="term"><a href="../../../../index.html#key518">PARAM</a></i>), a virtual
machine geared towards the support of recursive descent parsers,
especially packrat parsers. Towards this end it has features like the
caching and reuse of partial results, the caching of the encountered
input, and the ability to backtrack in both input and AST creation.</p>
<p>This document specifies the machine in terms of its architectural
state and instruction set.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Architectural State</a></h2>
<p>Any PARAM implementation has to manage at least the following state:</p>
<dl class="doctools_definitions">
<dt><i class="term">Input</i> (IN)</dt>
<dd><p>This is the channel the characters to process are read from.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the section <span class="sectref"><a href="#subsection1">Input Handling</a></span>.</p></dd>
<dt><i class="term">Current Character</i> (CC)</dt>
<dd><p>The character from the <i class="term">input</i> currently tested against its
possible alternatives.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the section <span class="sectref"><a href="#subsection2">Character Processing</a></span>.</p></dd>
<dt><i class="term">Current Location</i> (CL)</dt>
<dd><p>The location of the <i class="term">current character</i> in the <i class="term">input</i>, as
offset relative to the beginning of the input. Character offsets are
counted from <b class="const">0</b>.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the sections <span class="sectref"><a href="#subsection2">Character Processing</a></span>,
<span class="sectref"><a href="#subsection5">Location Handling</a></span>, and <span class="sectref"><a href="#subsection6">Nonterminal Execution</a></span>.</p></dd>
<dt><i class="term">Location Stack</i> (LS)</dt>
<dd><p>A stack of locations in the <i class="term">input</i>, saved for possible
backtracking.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the sections <span class="sectref"><a href="#subsection2">Character Processing</a></span>,
<span class="sectref"><a href="#subsection5">Location Handling</a></span>, and <span class="sectref"><a href="#subsection6">Nonterminal Execution</a></span>.</p></dd>
<dt><i class="term">Status</i> (ST)</dt>
<dd><p>The status of the last attempt of testing the <i class="term">input</i>, indicating
either success or failure.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the sections <span class="sectref"><a href="#subsection4">Status Control</a></span>,
<span class="sectref"><a href="#subsection2">Character Processing</a></span>, and <span class="sectref"><a href="#subsection6">Nonterminal Execution</a></span>.</p></dd>
<dt><i class="term">Semantic Value</i> (SV)</dt>
<dd><p>The current semantic value, either empty, or a node for AST
constructed from the input.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the sections <span class="sectref"><a href="#subsection7">Value Construction</a></span>, and
<span class="sectref"><a href="#subsection8">AST Construction</a></span>.</p></dd>
<dt><i class="term">AST Reduction Stack</i> (ARS)</dt>
<dd><p>The stack of partial ASTs constructed during the processing of
nonterminal symbols.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the sections <span class="sectref"><a href="#subsection7">Value Construction</a></span>, and
<span class="sectref"><a href="#subsection8">AST Construction</a></span>.</p></dd>
<dt><i class="term">AST Stack</i> (AS)</dt>
<dd><p>The stack of reduction stacks, saved for possible backtracking.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the sections <span class="sectref"><a href="#subsection7">Value Construction</a></span>, and
<span class="sectref"><a href="#subsection8">AST Construction</a></span>.</p></dd>
<dt><i class="term">Error Status</i> (ER)</dt>
<dd><p>The machine's current knowledge of errors. This is either empty, or
set to a pair of location in the input and the set of messages for
that location.</p>
<p><em>Note</em> that this part of the machine's state can be set even if
the last test of the <i class="term">current character</i> was successful. For
example, the *-operator (matching a sub-expression zero or more times)
in a PEG is always successful, even if it encounters a problem further
in the input and has to backtrack. Such problems must not be forgotten
when continuing the parsing.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the sections <span class="sectref"><a href="#subsection3">Error Handling</a></span>,
<span class="sectref"><a href="#subsection2">Character Processing</a></span>, and <span class="sectref"><a href="#subsection6">Nonterminal Execution</a></span>.</p></dd>
<dt><i class="term">Error Stack</i> (ES)</dt>
<dd><p>The stack of error stati, saved for backtracking. This enables the
machine to merge current and older error stati when performing
backtracking in choices after an failed match.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the sections <span class="sectref"><a href="#subsection3">Error Handling</a></span>,
<span class="sectref"><a href="#subsection2">Character Processing</a></span>, and <span class="sectref"><a href="#subsection6">Nonterminal Execution</a></span>.</p></dd>
<dt><i class="term">Nonterminal Cache</i> (NC)</dt>
<dd><p>A cache of machine states keyed by pairs name of nonterminal symbol
and location in the input. Each pair (N, L) is associated with a
4-tuple holding the values to use for CL, ST, SV, and ER after the
nonterminal N was parsed starting from the location L.
It is a performance aid for backtracking parsers, allowing them to
avoid an expensive reparsing of complex nonterminal symbols if they
have been encountered before at a given location.</p>
<p>The key location is where machine started the attempt to match the
named nonterminal symbol, and the location in the saved 4-tuple is
where machine ended up after the attempt completed, independent of the
success of the attempt.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the section <span class="sectref"><a href="#subsection6">Nonterminal Execution</a></span>.</p></dd>
<dt><i class="term">Terminal Cache</i> (TC)</dt>
<dd><p>A cache of characters read from IN, with their location in IN as pair
of line and column, keyed by the location in IN, this time as
character offset from the beginning of IN.
It is a performance aid for backtracking parsers, allowing them to
avoid a possibly expensive rereading of characters from IN, or even
enabling backtracking at, i.e. in the case of IN not randomly
seekable.</p>
<p>This part of the machine's state is used and modified by the
instructions defined in the section <span class="sectref"><a href="#subsection1">Input Handling</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Instruction Set</a></h2>
<p>With the machine's architectural state specified it is now possible to
specify the instruction set operating on that state and to be
implemented by any realization of the PARAM. The 37 instructions are
grouped roughly by the state they influence and/or query during their
execution.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Input Handling</a></h3>
<p>The instructions in this section mainly access IN, pulling the
characters to process into the machine.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">input_next</b> <i class="arg">msg</i></dt>
<dd><p>This method reads the next character, i.e. the character after CL,
from IN. If successful this character becomes CC, CL is advanced by
one, ES is cleared, and the operation is recorded as a success in ST.</p>
<p>The operation may read the character from IN if the next character
is not yet known to TC. If successful the new character is stored in
TC, with its location (line, column), and the operation otherwise
behaves as specified above. Future reads from the same location,
possible due to backtracking, will then be satisfied from TC instead
of IN.</p>
<p>If, on the other hand, the end of IN was reached, the operation is
recorded as failed in ST, CL is left unchanged, and the pair of CL and
<i class="arg">msg</i> becomes the new ES.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Character Processing</a></h3>
<p>The instructions in this section mainly access CC, testing it against
character classes, ranges, and individual characters.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">test_alnum</b></dt>
<dd><p>This instruction implements the special PE operator &quot;alnum&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_alpha</b></dt>
<dd><p>This instruction implements the special PE operator &quot;alpha&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_ascii</b></dt>
<dd><p>This instruction implements the special PE operator &quot;ascii&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_char</b> <i class="arg">char</i></dt>
<dd><p>This instruction implements the character matching operator, i.e. it
checks if CC is <i class="arg">char</i>.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_ddigit</b></dt>
<dd><p>This instruction implements the special PE operator &quot;ddigit&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_digit</b></dt>
<dd><p>This instruction implements the special PE operator &quot;digit&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_graph</b></dt>
<dd><p>This instruction implements the special PE operator &quot;graph&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_lower</b></dt>
<dd><p>This instruction implements the special PE operator &quot;lower&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_print</b></dt>
<dd><p>This instruction implements the special PE operator &quot;print&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_punct</b></dt>
<dd><p>This instruction implements the special PE operator &quot;punct&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_range</b> <i class="arg">chars</i> <i class="arg">chare</i></dt>
<dd><p>This instruction implements the range matching operator, i.e. it
checks if CC falls into the interval of characters spanned up by the
two characters from <i class="arg">chars</i> to <i class="arg">chare</i>, both inclusive.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_space</b></dt>
<dd><p>This instruction implements the special PE operator &quot;space&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_upper</b></dt>
<dd><p>This instruction implements the special PE operator &quot;upper&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_wordchar</b></dt>
<dd><p>This instruction implements the special PE operator &quot;wordchar&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
<dt><b class="cmd">test_xdigit</b></dt>
<dd><p>This instruction implements the special PE operator &quot;xdigit&quot;, which
checks if CC falls into the character class of the same name, or not.</p>
<p>Success and failure of the test are both recorded directly in ST.
Success further clears ES, wheras failure sets the pair of CL and
expected input (encoded as a leaf parsing expression) as the new ES
and then rewinds CL by one character, preparing the machine for
another parse attempt by a possible alternative.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Error Handling</a></h3>
<p>The instructions in this section mainly access ER and ES.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">error_clear</b></dt>
<dd><p>This instruction clears ER.</p></dd>
<dt><b class="cmd">error_push</b></dt>
<dd><p>This instruction makes a copy of ER and pushes it on ES.</p></dd>
<dt><b class="cmd">error_pop_merge</b></dt>
<dd><p>This instruction takes the topmost entry of ES and merges the error
status it contains with ES, making the result the new ES.</p>
<p>The merge is governed by four rules, with the merge result</p>
<ol class="doctools_enumerated">
<li><p>Empty if both states are empty.</p></li>
<li><p>The non-empty state if only one of the two states is non-empty.</p></li>
<li><p>The state with the larger location, if the two states specify
different locations.</p></li>
<li><p>The pair of the location shared by the two states, and the set-union
of their messages for states at the same location.</p></li>
</ol></dd>
<dt><b class="cmd">error_nonterminal</b> <i class="arg">symbol</i></dt>
<dd><p>This is a guarded instruction. It does nothing if either ES is empty,
or if the location in ES is not just past the last location saved in
LS. Otherwise it sets the pair of that location and the nonterminal
<i class="arg">symbol</i> as the new ES.</p>
<p><em>Note</em>: In the above &quot;just past&quot; means &quot;that location plus one&quot;,
or also &quot;the location of the next character after that location&quot;.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Status Control</a></h3>
<p>The instructions in this section directly manipulate ST.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">status_ok</b></dt>
<dd><p>This instruction sets ST to <b class="const">true</b>, recording a success.</p></dd>
<dt><b class="cmd">status_fail</b></dt>
<dd><p>This instruction sets ST to <b class="const">false</b>, recording a failure.</p></dd>
<dt><b class="cmd">status_negate</b></dt>
<dd><p>This instruction negates ST, turning a failure into a success and vice
versa.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Location Handling</a></h3>
<p>The instructions in this section access CL and LS.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">loc_push</b></dt>
<dd><p>This instruction makes a copy of CL and pushes it on LS.</p></dd>
<dt><b class="cmd">loc_pop_discard</b></dt>
<dd><p>This instructions pops the last saved location from LS.</p></dd>
<dt><b class="cmd">loc_pop_rewind</b></dt>
<dd><p>This instruction pops the last saved location from LS and restores it
as CL.</p></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Nonterminal Execution</a></h3>
<p>The instructions in this section access and manipulate NC.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">symbol_restore</b> <i class="arg">symbol</i></dt>
<dd><p>This instruction checks if NC contains data for the nonterminal
<i class="arg">symbol</i> at CL, or not. The result of the instruction is a boolean
flag, with <b class="const">True</b> indicating that data was found in the
cache. In that case the instruction has further updated the
architectural state of the machine with the cached information, namely
CL, ST, ER, and SV.</p>
<p>The method with which the instruction's result is transformed into
control flow is left undefined and the responsibility of the
implementation.</p></dd>
<dt><b class="cmd">symbol_save</b> <i class="arg">symbol</i></dt>
<dd><p>This instructions saves the current settings of CL, ST, ER, and SV in
NC, using the pair of nonterminal <i class="arg">symbol</i> and the last location
saved in LS as key.</p></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Value Construction</a></h3>
<p>The instructions in this section manipulate SV.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">value_clear</b></dt>
<dd><p>This instruction clears SV.</p></dd>
<dt><b class="cmd">value_leaf</b> <i class="arg">symbol</i></dt>
<dd><p>This instruction constructs an AST node for <i class="arg">symbol</i> covering the
range of IN from one character after the last location saved on LS to
CL and stores it in SV. ...</p></dd>
<dt><b class="cmd">value_reduce</b> <i class="arg">symbol</i></dt>
<dd><p>This instruction generally behaves like <b class="cmd">value_nonterminal_leaf</b>,
except that it takes all AST nodes on ARS, if any, and makes them the
children of the new node, with the last node saved on ARS becoming the
right-most / last child. Note that ARS is not modfied by this
operation.</p></dd>
</dl>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">AST Construction</a></h3>
<p>The instructions in this section manipulate ARS and AS.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">ast_value_push</b></dt>
<dd><p>This instruction makes a copy of SV and pushes it on ARS.</p></dd>
<dt><b class="cmd">ast_push</b></dt>
<dd><p>This instruction pushes the current state of ARS on AS and then clears
ARS.</p></dd>
<dt><b class="cmd">ast_pop_rewind</b></dt>
<dd><p>This instruction pops the last entry saved on AS and restores it as
the new state of ARS.</p></dd>
<dt><b class="cmd">ast_pop_discard</b></dt>
<dd><p>This instruction pops the last entry saved on AS.</p></dd>
</dl>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">Control Flow</a></h3>
<p>Normally this section would contain the specifications of the control
flow instructions of the PARAM, i.e. (un)conditional jumps and the
like. However, this part of the PARAM is intentionally left
unspecified. This allows the implementations to freely choose how to
implement control flow.</p>
<p>The implementation of this machine in Parser Tools, i.e the package
<b class="package"><a href="pt_rdengine.html">pt::rde</a></b>, is not only coded in Tcl, but also relies on Tcl
commands to provide it with control flow (instructions).</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Interaction of the Instructions with the Architectural State</a></h2>
<pre class="doctools_example">
Instruction		Inputs				Outputs
======================= =======================		====================
ast_pop_discard		AS			-&gt;	AS
ast_pop_rewind		AS			-&gt;	AS, ARS
ast_push		ARS, AS			-&gt;	AS
ast_value_push		SV, ARS			-&gt;	ARS
======================= =======================		====================
error_clear		-			-&gt;	ER
error_nonterminal sym	ER, LS			-&gt;	ER
error_pop_merge   	ES, ER			-&gt;	ER
error_push		ES, ER			-&gt;	ES
======================= =======================		====================
input_next msg		IN			-&gt;	TC, CL, CC, ST, ER
======================= =======================		====================
loc_pop_discard		LS			-&gt;	LS
loc_pop_rewind		LS			-&gt;	LS, CL
loc_push		CL, LS			-&gt;	LS
======================= =======================		====================
status_fail		-			-&gt;	ST
status_negate		ST			-&gt;	ST
status_ok		-			-&gt;	ST
======================= =======================		====================
symbol_restore sym	NC			-&gt;	CL, ST, ER, SV
symbol_save    sym	CL, ST, ER, SV LS	-&gt;	NC
======================= =======================		====================
test_alnum  		CC			-&gt;	ST, ER
test_alpha		CC			-&gt;	ST, ER
test_ascii		CC			-&gt;	ST, ER
test_char char		CC			-&gt;	ST, ER
test_ddigit		CC			-&gt;	ST, ER
test_digit		CC			-&gt;	ST, ER
test_graph		CC			-&gt;	ST, ER
test_lower		CC			-&gt;	ST, ER
test_print		CC			-&gt;	ST, ER
test_punct		CC			-&gt;	ST, ER
test_range chars chare	CC			-&gt;	ST, ER
test_space		CC			-&gt;	ST, ER
test_upper		CC			-&gt;	ST, ER
test_wordchar		CC			-&gt;	ST, ER
test_xdigit		CC			-&gt;	ST, ER
======================= =======================		====================
value_clear		-			-&gt;	SV
value_leaf symbol	LS, CL			-&gt;	SV
value_reduce symbol	ARS, LS, CL		-&gt;	SV
======================= =======================		====================
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_parse_peg.html.





























































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222

<div class='fossil-doc' data-title='pt_parse_peg - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_parse_peg(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_parse_peg - Parser Tools PEG Parser</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Class API</a></li>
<li class="doctools_section"><a href="#section3">Instances API</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::parse::peg 1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pt::parse::peg</b> <span class="opt">?<i class="arg">objectName</i>?</span></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">parse</b> <i class="arg">chan</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">parset</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a class whose instances are parsers for parsing
expression grammars in textual form.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pt::parse::peg</b> <span class="opt">?<i class="arg">objectName</i>?</span></a></dt>
<dd><p>The class command constructs parser instances, i.e. objects. The
result of the command is the fully-qualified name of the instance
command.</p>
<p>If no <i class="arg">objectName</i> is specified the class will generate and use an
automatic name. If the <i class="arg">objectName</i> was specified, but is not
fully qualified the command will be created in the current namespace.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Instances API</a></h2>
<p>All parser instances provide at least the methods shown below:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the parser instance, releasing all claimed memory
and other resources, and deleting the instance command.</p>
<p>The result of the command is the empty string.</p></dd>
<dt><a name="3"><i class="arg">objectName</i> <b class="method">parse</b> <i class="arg">chan</i></a></dt>
<dd><p>This method runs the parser using the contents of <i class="arg">chan</i> as input
(starting at the current location in the channel), until parsing is
not possible anymore, either because parsing has completed, or run
into a syntax error.</p>
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#key411">read</a></b> is properly changed for
push-operation.</p>
<p>Upon successful completion the command returns an abstract syntax tree
as its result.
This AST is in the form specified in section
<b class="sectref">AST serialization format</b>.
As a plain nested Tcl-list it can then be processed with any Tcl
commands the user likes, doing transformations, semantic checks, etc.
To help in this the package <b class="package"><a href="pt_astree.html">pt::ast</a></b> provides a set of
convenience commands for validation of the tree's basic structure,
printing it for debugging, and walking it either from the bottom up,
or top down.</p>
<p>When encountering a syntax error the command will throw an error instead.
This error will be a 4-element Tcl-list, containing, in the order
listed below:</p>
<ol class="doctools_enumerated">
<li><p>The string <b class="const">pt::rde</b> identifying it as parser runtime error.</p></li>
<li><p>The location of the parse error, as character offset from the
beginning of the parsed input.</p></li>
<li><p>The location of parse error, now as a 2-element list containing
line-number and column in the line.</p></li>
<li><p>A set of atomic parsing expressions indicating encoding the characters
and/or nonterminal symbols the parser expected to see at the location
of the parse error, but did not get.
 For the specification of atomic parsing expressions please see the
section <b class="sectref">PE serialization format</b>.</p></li>
</ol></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">parset</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the parser using the string in <i class="arg">text</i> as input.
In all other ways it behaves like the method <b class="method">parse</b>, shown
above.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_parser_api.html.























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475

<div class='fossil-doc' data-title='pt_parser_api - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_parser_api(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_parser_api - Parser API</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Class API</a></li>
<li class="doctools_section"><a href="#section3">Instance API</a></li>
<li class="doctools_section"><a href="#section4">Usage</a></li>
<li class="doctools_section"><a href="#section5">AST serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">className</b> <span class="opt">?<i class="arg">objectName</i>?</span></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">parse</b> <i class="arg">chan</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">parset</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This document describes the API shared by the grammar interpreter
provided by the package <b class="package"><a href="pt_peg_interp.html">pt::peg::interp</a></b> and the parsers
generated by the <b class="cmd"><a href="../../apps/pt.html">pt</a></b> application for the result formats
<b class="const">critcl</b>, <b class="const">snit</b>, and <b class="const">oo</b> regarding access
to the actual parsing functionality.</p>
<p>Its intended audience are people who wish to create a parser for some
language of theirs and then use that parser within a Tcl-based package
or application.</p>
<p>It resides in the User Layer of Parser Tools.</p>
<p><img alt="arch_user_pkg" src="../../../../image/arch_user_pkg.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">className</b> <span class="opt">?<i class="arg">objectName</i>?</span></a></dt>
<dd><p>The class command constructs parser instances, i.e. objects. The
result of the command is the fully-qualified name of the instance
command.</p>
<p>If no <i class="arg">objectName</i> is specified the class will generate and use an
automatic name. If the <i class="arg">objectName</i> was specified, but is not
fully qualified the command will be created in the current namespace.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Instance API</a></h2>
<p>All parser instances provide at least the methods shown below:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the parser instance, releasing all claimed memory
and other resources, and deleting the instance command.</p>
<p>The result of the command is the empty string.</p></dd>
<dt><a name="3"><i class="arg">objectName</i> <b class="method">parse</b> <i class="arg">chan</i></a></dt>
<dd><p>This method runs the parser using the contents of <i class="arg">chan</i> as input
(starting at the current location in the channel), until parsing is
not possible anymore, either because parsing has completed, or run
into a syntax error.</p>
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#key411">read</a></b> is properly changed for
push-operation.</p>
<p>Upon successful completion the command returns an abstract syntax tree
as its result.
This AST is in the form specified in section
<span class="sectref"><a href="#section5">AST serialization format</a></span>.
As a plain nested Tcl-list it can then be processed with any Tcl
commands the user likes, doing transformations, semantic checks, etc.
To help in this the package <b class="package"><a href="pt_astree.html">pt::ast</a></b> provides a set of
convenience commands for validation of the tree's basic structure,
printing it for debugging, and walking it either from the bottom up,
or top down.</p>
<p>When encountering a syntax error the command will throw an error instead.
This error will be a 4-element Tcl-list, containing, in the order
listed below:</p>
<ol class="doctools_enumerated">
<li><p>The string <b class="const">pt::rde</b> identifying it as parser runtime error.</p></li>
<li><p>The location of the parse error, as character offset from the
beginning of the parsed input.</p></li>
<li><p>The location of parse error, now as a 2-element list containing
line-number and column in the line.</p></li>
<li><p>A set of atomic parsing expressions indicating encoding the characters
and/or nonterminal symbols the parser expected to see at the location
of the parse error, but did not get.
 For the specification of atomic parsing expressions please see the
section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></li>
</ol></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">parset</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the parser using the string in <i class="arg">text</i> as input.
In all other ways it behaves like the method <b class="method">parse</b>, shown
above.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Usage</a></h2>
<p>A generated parser is used like this</p>
<pre class="doctools_example">
    package require the-parser-package ;# Generated by result-formats 'critcl', 'snit' or 'oo' of 'pt'.
    set parser [the-parser-class]
    set ast [$parser parse $channel]
    ... process the abstract syntax tree ...
</pre>
<p>When using a grammar interpreter for parsing some differences creep in</p>
<pre class="doctools_example">
    package require the-grammar-package ;# Generated by result-format 'container' of 'pt'.
    set grammar [the-grammar-class]
    package require pt::peg::interp
    set parser [pt::peg::interp]
    $parser use $grammar
    set ast [$parser parse $channel]
    $parser destroy
    ... process the abstract syntax tree ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AST serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Abstract Syntax Trees (ASTs) as immutable values for transport,
comparison, etc.</p>
<p>Each node in an AST represents a nonterminal symbol of a grammar, and
the range of tokens/characters in the input covered by it. ASTs do not
contain terminal symbols, i.e. tokens/characters. These can be
recovered from the input given a symbol's location.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a tree may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any AST is the serialization of its root node.</p></li>
<li><p>The serialization of any node is a Tcl list containing at least three
elements.</p>
<ol class="doctools_enumerated">
<li><p>The first element is the name of the nonterminal symbol stored in the
node.</p></li>
<li><p>The second and third element are the locations of the first and last
token in the token stream the node represents (covers).</p>
<ol class="doctools_enumerated">
<li><p>Locations are provided as non-negative integer offsets from the
beginning of the token stream, with the first token found in the
stream located at offset 0 (zero).</p></li>
<li><p>The end location has to be equal to or larger than the start location.</p></li>
</ol>
</li>
<li><p>All elements after the first three represent the children of the node,
which are themselves nodes. This means that the serializations of
nodes without children, i.e. leaf nodes, have exactly three elements.
The children are stored in the list with the leftmost child first, and
the rightmost child last.</p></li>
</ol>
</li>
</ol></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of an abstract syntax tree has the format
as specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this tree.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the parsing expression grammar below</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>and the input string</p>
<pre class="doctools_example"> 120+5 </pre>
<p>then a parser should deliver the abstract syntax tree below (except for whitespace)</p>
<pre class="doctools_example">
set ast {Expression 0 4
    {Factor 0 4
        {Term 0 2
            {Number 0 2
                {Digit 0 0}
                {Digit 1 1}
                {Digit 2 2}
            }
        }
        {AddOp 3 3}
        {Term 4 4
            {Number 4 4
                {Digit 4 4}
            }
        }
    }
}
</pre>
<p>Or, more graphical</p>
<p><img alt="expr_ast" src="../../../../image/expr_ast.png"></p>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_container.html.





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658

<div class='fossil-doc' data-title='pt::peg::container - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::container(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::container - PEG Storage</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Class API</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object API</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection4">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pt::peg::container <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::peg</b> <i class="arg">objectName</i> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">&lt;--</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">src</i>?</span></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">clear</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">importer</b></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">importer</b> <i class="arg">object</i></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">exporter</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">exporter</b> <i class="arg">object</i></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">=</b> <i class="arg">source</i></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">--&gt;</b> <i class="arg">destination</i></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">deserialize =</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">deserialize +=</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">start</b></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">start</b> <i class="arg">pe</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">nonterminals</b></a></li>
<li><a href="#16"><i class="arg">objectName</i> <b class="method">modes</b></a></li>
<li><a href="#17"><i class="arg">objectName</i> <b class="method">modes</b> <i class="arg">dict</i></a></li>
<li><a href="#18"><i class="arg">objectName</i> <b class="method">rules</b></a></li>
<li><a href="#19"><i class="arg">objectName</i> <b class="method">rules</b> <i class="arg">dict</i></a></li>
<li><a href="#20"><i class="arg">objectName</i> <b class="method">add</b> <span class="opt">?<i class="arg">nt</i>...?</span></a></li>
<li><a href="#21"><i class="arg">objectName</i> <b class="method">remove</b> <span class="opt">?<i class="arg">nt</i>...?</span></a></li>
<li><a href="#22"><i class="arg">objectName</i> <b class="method">exists</b> <i class="arg">nt</i></a></li>
<li><a href="#23"><i class="arg">objectName</i> <b class="method">rename</b> <i class="arg">ntold</i> <i class="arg">ntnew</i></a></li>
<li><a href="#24"><i class="arg">objectName</i> <b class="method">mode</b> <i class="arg">nt</i></a></li>
<li><a href="#25"><i class="arg">objectName</i> <b class="method">mode</b> <i class="arg">nt</i> <i class="arg">mode</i></a></li>
<li><a href="#26"><i class="arg">objectName</i> <b class="method">rule</b> <i class="arg">nt</i></a></li>
<li><a href="#27"><i class="arg">objectName</i> <b class="method">rule</b> <i class="arg">nt</i> <i class="arg">pe</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a container class for parsing expression
grammars, with each instance storing a single grammar and allowing the
user to manipulate and query its definition.</p>
<p>It resides in the Storage section of the Core Layer of Parser Tools,
and is one of the three pillars the management of parsing expression
grammars resides on.</p>
<p><img alt="arch_core_container" src="../../../../image/arch_core_container.png"></p>
<p>The other two pillars are, as shown above</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="pt_peg_import.html">PEG Import</a></i>, and</p></li>
<li><p><i class="term"><a href="pt_peg_export.html">PEG Export</a></i></p></li>
</ol>
<p>Packages related to this are:</p>
<dl class="doctools_definitions">
<dt><b class="package"><a href="pt_rdengine.html">pt::rde</a></b></dt>
<dd><p>This package provides an implementation of PARAM, a virtual machine
for the parsing of a channel, geared towards the needs of handling
PEGs.</p></dd>
<dt><b class="package"><a href="pt_peg_interp.html">pt::peg::interp</a></b></dt>
<dd><p>This package implements an interpreter for PEGs on top of the virtual
machine provided by <b class="package">pt::peg::rde</b></p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Class API</a></h3>
<p>The package exports the API described here.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::peg</b> <i class="arg">objectName</i> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">&lt;--</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">src</i>?</span></a></dt>
<dd><p>The command creates a new container object for a parsing expression
grammar and returns the fully qualified name of the object command as
its result. The API of this object command is described in the section
<span class="sectref"><a href="#subsection2">Object API</a></span>. It may be used to invoke various operations on
the object.</p>
<p>The new container will be empty if no <i class="arg">src</i> is specified. Otherwise
it will contain a copy of the grammar contained in the <i class="arg">src</i>.
All operators except <b class="const">deserialize</b> interpret <i class="arg">src</i> as a
container object command. The <b class="const">deserialize</b> operator interprets
<i class="arg">src</i> as the serialization of a parsing expression grammar
instead, as specified in section <span class="sectref"><a href="#section2">PEG serialization format</a></span>.</p>
<p>An empty grammar has no nonterminal symbols, and the start expression
is the empty expression, i.e. epsilon. It is <i class="term">valid</i>, but not
<i class="term">useful</i>.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object API</a></h3>
<p>All objects created by this package provide the following methods for
the manipulation and querying of their contents:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object, releasing all claimed memory, and
deleting the associated object command.</p></dd>
<dt><a name="3"><i class="arg">objectName</i> <b class="method">clear</b></a></dt>
<dd><p>This method resets the object to contain the empty grammar. It does
<em>not</em> destroy the object itself.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">importer</b></a></dt>
<dd><p>This method returns the import manager object currently attached to
the container, if any.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">importer</b> <i class="arg">object</i></a></dt>
<dd><p>This method attaches the <i class="arg">object</i> as import manager to the
container, and returns it as the result of the command.
Note that the <i class="arg">object</i> is <em>not</em> put into ownership of the
container. I.e., destruction of the container will <em>not</em> destroy
the <i class="arg">object</i>.</p>
<p>It is expected that <i class="arg">object</i> provides a method named
<b class="method">import text</b> which takes a text and a format name, and
returns the canonical serialization of the table of contents contained in
the text, assuming the given format.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">exporter</b></a></dt>
<dd><p>This method returns the export manager object currently attached to
the container, if any.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">exporter</b> <i class="arg">object</i></a></dt>
<dd><p>This method attaches the <i class="arg">object</i> as export manager to the
container, and returns it as the result of the command.
Note that the <i class="arg">object</i> is <em>not</em> put into ownership of the
container. I.e., destruction of the container will <em>not</em> destroy
the <i class="arg">object</i>.</p>
<p>It is expected that <i class="arg">object</i> provides a method named
<b class="method">export object</b> which takes the container and a format name,
and returns a text encoding table of contents stored in the container, in
the given format. It is further expected that the <i class="arg">object</i> will
use the container's method <b class="method">serialize</b> to obtain the
serialization of the table of contents from which to generate the text.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">=</b> <i class="arg">source</i></a></dt>
<dd><p>This method assigns the contents of the PEG object <i class="arg">source</i> to
ourselves, overwriting the existing definition. This is the assignment
operator for grammars.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">objectName</i> <b class="method">deserialize =</b> [<i class="arg">source</i> <b class="method">serialize</b>]
</pre>
</dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">--&gt;</b> <i class="arg">destination</i></a></dt>
<dd><p>This method assigns our contents to the PEG object <i class="arg">destination</i>,
overwriting the existing definition. This is the reverse assignment
operator for grammars.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">destination</i> <b class="method">deserialize =</b> [<i class="arg">objectName</i> <b class="method">serialize</b>]
</pre>
</dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method returns our grammar in some textual form usable for
transfer, persistent storage, etc. If no <i class="arg">format</i> is not specified
the returned result is the canonical serialization of the grammar, as
specified in the section <span class="sectref"><a href="#section2">PEG serialization format</a></span>.</p>
<p>Otherwise the object will use the attached export manager to convert
the data to the specified format. In that case the method will fail
with an error if the container has no export manager attached to it.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">deserialize =</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This is the complementary method to <b class="method">serialize</b>.
It replaces the current definition with the grammar contained in the
<i class="arg">data</i>. If no <i class="arg">format</i> was specified it is assumed to be the
regular serialization of a grammar, as specified in the section
<span class="sectref"><a href="#section2">PEG serialization format</a></span></p>
<p>Otherwise the object will use the attached import manager to convert
the data from the specified format to a serialization it can handle.
In that case the method will fail with an error if the container has
no import manager attached to it.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">deserialize +=</b> <i class="arg">data</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method behaves like <b class="method">deserialize =</b> in its essentials,
except that it merges the grammar in the <i class="arg">data</i> to its
contents instead of replacing it.
The method will fail with an error and leave the grammar unchanged if
merging is not possible, i.e. would produce an invalid grammar.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">start</b></a></dt>
<dd><p>This method returns the current start expression of the grammar.</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">start</b> <i class="arg">pe</i></a></dt>
<dd><p>This method defines the <i class="term">start expression</i> of the grammar. It
replaces the current start expression with the parsing expression
<i class="arg">pe</i>, and returns the new start expression.</p>
<p>The method will fail with an error and leave the grammar unchanged if
<i class="arg">pe</i> does not contain a valid parsing expression as specified in
the section <span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">nonterminals</b></a></dt>
<dd><p>This method returns the set of all nonterminal symbols known to the
grammar.</p></dd>
<dt><a name="16"><i class="arg">objectName</i> <b class="method">modes</b></a></dt>
<dd><p>This method returns a dictionary mapping the set of all nonterminal
symbols known to the grammar to their semantic modes.</p></dd>
<dt><a name="17"><i class="arg">objectName</i> <b class="method">modes</b> <i class="arg">dict</i></a></dt>
<dd><p>This method takes a dictionary mapping a set of nonterminal symbols
known to the grammar to their semantic modes, and returns the new full
mapping of nonterminal symbols to semantic modes.</p>
<p>The method will fail with an error if any of the nonterminal symbols
in the dictionary is not known to the grammar, or the empty string,
i.e. an invalid nonterminal symbol, or if any the chosen <i class="arg">mode</i>s
is not one of the legal values.</p></dd>
<dt><a name="18"><i class="arg">objectName</i> <b class="method">rules</b></a></dt>
<dd><p>This method returns a dictionary mapping the set of all nonterminal
symbols known to the grammar to their parsing expressions (right-hand
sides).</p></dd>
<dt><a name="19"><i class="arg">objectName</i> <b class="method">rules</b> <i class="arg">dict</i></a></dt>
<dd><p>This method takes a dictionary mapping a set of nonterminal symbols
known to the grammar to their parsing expressions (right-hand sides),
and returns the new full mapping of nonterminal symbols to parsing
expressions.</p>
<p>The method will fail with an error any of the nonterminal symbols in
the dictionary is not known to the grammar, or the empty string,
i.e. an invalid nonterminal symbol, or any of the chosen parsing
expressions is not a valid parsing expression as specified in the
section <span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
<dt><a name="20"><i class="arg">objectName</i> <b class="method">add</b> <span class="opt">?<i class="arg">nt</i>...?</span></a></dt>
<dd><p>This method adds the nonterminal symbols <i class="arg">nt</i>, etc. to the
grammar, and defines default semantic mode and expression for it
(<b class="const">value</b> and <b class="const">epsilon</b> respectively).
The method returns the empty string as its result.</p>
<p>The method will fail with an error and leaves the grammar unchanged if
any of the nonterminal symbols are either already defined in our
grammar, or are the empty string (an invalid nonterminal symbol).</p>
<p>The method does nothing if no symbol was specified as argument.</p></dd>
<dt><a name="21"><i class="arg">objectName</i> <b class="method">remove</b> <span class="opt">?<i class="arg">nt</i>...?</span></a></dt>
<dd><p>This method removes the named nonterminal symbols <i class="arg">nt</i>, etc. from
the set of nonterminal symbols known to our grammar.
The method returns the empty string as its result.</p>
<p>The method will fail with an error and leave the grammar unchanged if
any of the nonterminal symbols is not known to the grammar, or is the
empty string, i.e. an invalid nonterminal symbol.</p></dd>
<dt><a name="22"><i class="arg">objectName</i> <b class="method">exists</b> <i class="arg">nt</i></a></dt>
<dd><p>This method tests whether the nonterminal symbol <i class="arg">nt</i> is known
to our grammar or not.
The result is a boolean value. It will be set to <b class="const">true</b> if
<i class="arg">nt</i> is known, and <b class="const">false</b> otherwise.</p>
<p>The method will fail with an error if <i class="arg">nt</i> is the empty string,
i.e. an invalid nonterminal symbol.</p></dd>
<dt><a name="23"><i class="arg">objectName</i> <b class="method">rename</b> <i class="arg">ntold</i> <i class="arg">ntnew</i></a></dt>
<dd><p>This method renames the nonterminal symbol <i class="arg">ntold</i> to <i class="arg">ntnew</i>.
The method returns the empty string as its result.</p>
<p>The method will fail with an error and leave the grammar unchanged if
either <i class="arg">ntold</i> is not known to the grammar, or <i class="arg">ntnew</i> is
already known, or any of them is the empty string, i.e. an invalid
nonterminal symbol.</p></dd>
<dt><a name="24"><i class="arg">objectName</i> <b class="method">mode</b> <i class="arg">nt</i></a></dt>
<dd><p>This method returns the current semantic mode for the nonterminal
symbol <i class="arg">nt</i>.</p>
<p>The method will fail with an error if <i class="arg">nt</i> is not known to the
grammar, or the empty string, i.e. an invalid nonterminal symbol.</p></dd>
<dt><a name="25"><i class="arg">objectName</i> <b class="method">mode</b> <i class="arg">nt</i> <i class="arg">mode</i></a></dt>
<dd><p>This mode sets the semantic mode for the nonterminal symbol <i class="arg">nt</i>,
and returns the new mode.
The method will fail with an error if <i class="arg">nt</i> is not known to the
grammar, or the empty string, i.e. an invalid nonterminal symbol, or
the chosen <i class="arg">mode</i> is not one of the legal values.</p>
<p>The following modes are legal:</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
<dt><a name="26"><i class="arg">objectName</i> <b class="method">rule</b> <i class="arg">nt</i></a></dt>
<dd><p>This method returns the current parsing expression (right-hand side)
for the nonterminal symbol <i class="arg">nt</i>.</p>
<p>The method will fail with an error if <i class="arg">nt</i> is not known to the
grammar, or the empty string, i.e. an invalid nonterminal symbol.</p></dd>
<dt><a name="27"><i class="arg">objectName</i> <b class="method">rule</b> <i class="arg">nt</i> <i class="arg">pe</i></a></dt>
<dd><p>This method set the parsing expression (right-hand side) of the
nonterminal <i class="arg">nt</i> to <i class="arg">pe</i>, and returns the new parsing
expression.</p>
<p>The method will fail with an error if <i class="arg">nt</i> is not known to the
grammar, or the empty string, i.e. an invalid nonterminal symbol, or
<i class="arg">pe</i> does not contain a valid parsing expression as specified in
the section <span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_container_peg.html.



























































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

<div class='fossil-doc' data-title='pt::peg::container::peg - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::container::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::container::peg - PEG Storage. Canned PEG grammar specification</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pt::peg::container::peg <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::container</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a sub-type of <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b> which
is preloaded with a parsing expression grammar describing a textual
format for parsing expression grammars.</p>
<p>The sub-type provides the exact same API as
<b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>. Instead of duplicating its contents the
reader is asked to read the referenced document.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_export.html.





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530

<div class='fossil-doc' data-title='pt::peg::export - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export - PEG Export</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection4">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection5">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">configuration</b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
<li>package require <b class="pkgname">pt::peg::export <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::peg::export</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">configuration names</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">configuration get</b></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">configuration set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">configuration unset</b> <i class="arg">pattern</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a manager for parsing expression grammars, with
each instance handling a set of plugins for the export of them to
other formats, i.e. their conversion to, for example <i class="term"><a href="../../../../index.html#key21">nroff</a></i>,
<i class="term"><a href="../../../../index.html#key18">HTML</a></i>, etc.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools,
and is one of the three pillars the management of parsing expression
grammars resides on.</p>
<p><img alt="arch_core_export" src="../../../../image/arch_core_export.png"></p>
<p>The other two pillars are, as shown above</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="pt_peg_import.html">PEG Import</a></i>, and</p></li>
<li><p><i class="term"><a href="pt_peg_container.html">PEG Storage</a></i></p></li>
</ol>
<p>For information about the data structure which is the major input to
the manager objects provided by this package see the section
<span class="sectref"><a href="#section3">PEG serialization format</a></span>.</p>
<p>The plugin system of this class is based on the package
<b class="package"><a href="../pluginmgr/pluginmgr.html">pluginmgr</a></b>, and configured to look for plugins using</p>
<ol class="doctools_enumerated">
<li><p>the environment variable <b class="variable">GRAMMAR_PEG_EXPORT_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">GRAMMAR_PEG_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">GRAMMAR_PLUGINS</b>,</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/peg/export/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/peg/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/peg/export/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/peg/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/plugins</b>&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\GRAMMAR\PEG\EXPORT\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\GRAMMAR\PEG\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\GRAMMAR\PLUGINS&quot;</p></li>
</ol>
<p>The last three are used only when the package is run on a machine
using the Windows(tm) operating system.</p>
<p>The whole system is delivered with three predefined export plugins,
namely</p>
<dl class="doctools_definitions">
<dt>container</dt>
<dd><p>See <i class="term">PEG Export Plugin. To CONTAINER format</i> for details.</p></dd>
<dt>json</dt>
<dd><p>See <i class="term">PEG Export Plugin. To JSON format</i> for details.</p></dd>
<dt>peg</dt>
<dd><p>See <i class="term">PEG Export Plugin. To PEG format</i> for details.</p></dd>
</dl>
<p>For readers wishing to write their own export plugin for some format,
i.e. <i class="term">plugin writer</i>s, reading and understanding the
<i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i> specification is an absolute
necessity, as it documents the interaction between this package and
its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::peg::export</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new export manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::pt::peg::export</b> command have
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method takes the canonical serialization of a parsing expression
grammar stored in <i class="arg">serial</i> and converts it to the specified
<i class="arg">format</i>, using the export plugin for the format. This will fail
with an error if no plugin could be found for the format.
The string generated by the conversion process is returned as
the result of this method.</p>
<p>If no format is specified the method defaults to <b class="const">text</b>.</p>
<p>The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section3">PEG serialization format</a></span>.</p>
<p>The plugin has to conform to the interface documented in the
<i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i> specification.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method is a convenient wrapper around the <b class="method">export serial</b>
method described by the previous item.
It expects that <i class="arg">object</i> is an object command supporting a
<b class="method">serialize</b> method returning the canonical serialization of a
parsing expression grammar. It invokes that method, feeds the result
into <b class="method">export serial</b> and returns the resulting string as its
own result.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">configuration names</b></a></dt>
<dd><p>This method returns a list containing the names of all configuration
options currently known to the object.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">configuration get</b></a></dt>
<dd><p>This method returns a dictionary containing the names and values of
all configuration options currently known to the object.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">configuration set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration option <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the option.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that these configuration options and their values are simply
passed to a plugin when the actual export is performed. It is the
plugin which checks the validity, not the manager.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">configuration unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration options matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration options.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section4">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section4">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_export_container.html.































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543

<div class='fossil-doc' data-title='pt::peg::export::container - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export::container(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export::container - PEG Export Plugin. Write CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Configuration</a></li>
<li class="doctools_section"><a href="#section4">Grammar Container</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::export::container <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::container</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the parsing expression grammar export plugin
for the generation of CONTAINER markup.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools and
is intended to be used by <b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b>, the export
manager, sitting between it and the corresponding core conversion
functionality provided by <b class="package"><a href="pt_peg_to_container.html">pt::peg::to::container</a></b>.</p>
<p><img alt="arch_core_eplugins" src="../../../../image/arch_core_eplugins.png"></p>
<p>While the direct use of this package with a regular interpreter is
possible, this is strongly disrecommended and requires a number of
contortions to provide the expected environment.
The proper way to use this functionality depends on the situation:</p>
<ol class="doctools_enumerated">
<li><p>In an untrusted environment the proper access is through the package
<b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b> and the export manager objects it
provides.</p></li>
<li><p>In a trusted environment however simply use the package
<b class="package"><a href="pt_peg_to_container.html">pt::peg::to::container</a></b> and access the core
conversion functionality directly.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates CONTAINER markup encoding the grammar.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Configuration</a></h2>
<p>The CONTAINER export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>enum <i class="arg">mode</i></dt>
<dd><p>The value of this configuration variable controls which methods of
<b class="package"><a href="pt_pegrammar.html">pt::peg</a></b> instances the plugin will use to specify the
grammar. There are two legal values</p>
<dl class="doctools_definitions">
<dt><b class="const">bulk</b></dt>
<dd><p>In this mode the methods <b class="method">start</b>, <b class="method">add</b>, <b class="method">modes</b>,
and <b class="method">rules</b> are used to specify the grammar in a bulk manner,
i.e. as a set of nonterminal symbols, and two dictionaries mapping
from the symbols to their semantic modes and parsing expressions.</p>
<p>This mode is the default.</p></dd>
<dt><b class="const">incremental</b></dt>
<dd><p>In this mode the methods <b class="method">start</b>, <b class="method">add</b>, <b class="method">mode</b>,
and <b class="method">rule</b> are used to specify the grammar piecemal, with each
nonterminal having its own block of defining commands.</p></dd>
</dl></dd>
<dt>string <i class="arg">template</i></dt>
<dd><p>If this configuration variable is set it is assumed to contain a
string into which to put the generated code and other configuration
data. The various locations are expected to be specified with the
following placeholders:</p>
<dl class="doctools_definitions">
<dt><b class="const">@user@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">user</b>.</p></dd>
<dt><b class="const">@format@</b></dt>
<dd><p>To be replaced with the the constant <b class="const">CONTAINER</b>.</p></dd>
<dt><b class="const">@file@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">file</b>.</p></dd>
<dt><b class="const">@name@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">name</b>.</p></dd>
<dt><b class="const">@mode@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">mode</b>.</p></dd>
<dt><b class="const">@code@</b></dt>
<dd><p>To be replaced with the generated code.</p></dd>
</dl>
<p>If this configuration variable is not set, or empty, then the plugin
falls back to a standard template, which is defined as &quot;<b class="const">@code@</b>&quot;.</p></dd>
</dl>
<p><em>Note</em> that this plugin may ignore the standard configuration
variables <b class="variable">user</b>, <b class="variable">format</b>, <b class="variable">file</b>, and their values,
depending on the chosen template.</p>
<p>The content of the standard configuration variable <b class="variable">name</b>, if set,
is used as name of the grammar in the output. Otherwise the plugin
falls back to the default name <b class="const">a_pe_grammar</b>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Grammar Container</a></h2>
<p>The <b class="const">container</b> format is another form of describing parsing
expression grammars. While data in this format is executable it does
not constitute a parser for the grammar. It always has to be used in
conjunction with the package <b class="package"><a href="pt_peg_interp.html">pt::peg::interp</a></b>, a grammar
interpreter.</p>
<p>The format represents grammars by a <b class="cmd">snit::type</b>, i.e. class,
whose instances are API-compatible to the instances of the
<b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b> package, and which are preloaded with the
grammar in question.</p>
<p>It has no direct formal specification beyond what was said above.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>one possible CONTAINER serialization for it is</p>
<pre class="doctools_example">
snit::type a_pe_grammar {
    constructor {} {
        install myg using pt::peg::container ${selfns}::G
        $myg start {n Expression}
        $myg add   AddOp Digit Expression Factor MulOp Number Sign Term
        $myg modes {
            AddOp      value
            Digit      value
            Expression value
            Factor     value
            MulOp      value
            Number     value
            Sign       value
            Term       value
        }
        $myg rules {
            AddOp      {/ {t -} {t +}}
            Digit      {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}
            Expression {/ {x {t \50} {n Expression} {t \51}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}}
            Factor     {x {n Term} {* {x {n AddOp} {n Term}}}}
            MulOp      {/ {t *} {t /}}
            Number     {x {? {n Sign}} {+ {n Digit}}}
            Sign       {/ {t -} {t +}}
            Term       {n Number}
        }
        return
    }
    component myg
    delegate method * to myg
}
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key349">CONTAINER</a>, <a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_export_json.html.









































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596

<div class='fossil-doc' data-title='pt::peg::export::json - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export::json - PEG Export Plugin. Write JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Configuration</a></li>
<li class="doctools_section"><a href="#section4">JSON Grammar Exchange Format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::export::json <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the parsing expression grammar export plugin
for the generation of JSON markup.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools and
is intended to be used by <b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b>, the export
manager, sitting between it and the corresponding core conversion
functionality provided by <b class="package"><a href="pt_peg_to_json.html">pt::peg::to::json</a></b>.</p>
<p><img alt="arch_core_eplugins" src="../../../../image/arch_core_eplugins.png"></p>
<p>While the direct use of this package with a regular interpreter is
possible, this is strongly disrecommended and requires a number of
contortions to provide the expected environment.
The proper way to use this functionality depends on the situation:</p>
<ol class="doctools_enumerated">
<li><p>In an untrusted environment the proper access is through the package
<b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b> and the export manager objects it
provides.</p></li>
<li><p>In a trusted environment however simply use the package
<b class="package"><a href="pt_peg_to_json.html">pt::peg::to::json</a></b> and access the core
conversion functionality directly.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates JSON markup encoding the grammar.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Configuration</a></h2>
<p>The JSON export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>boolean <i class="arg">indented</i></dt>
<dd><p>If this flag is set the plugin will break the generated JSON code
across lines and indent it according to its inner structure, with each
key of a dictionary on a separate line.</p>
<p>If this flag is not set (the default), the whole JSON object will be
written on a single line, with minimum spacing between all elements.</p></dd>
<dt>boolean <i class="arg">aligned</i></dt>
<dd><p>If this flag is set the generator ensures that the values for the keys
in a dictionary are vertically aligned with each other, for a nice
table effect. To make this work this also implies that <b class="variable">indented</b>
is set.</p>
<p>If this flag is not set (the default), the output is formatted as per
the value of <b class="variable">indented</b>, without trying to align the values for
dictionary keys.</p></dd>
</dl>
<p><em>Note</em> that this plugin ignores the standard configuration
variables <b class="variable">user</b>, <b class="variable">format</b>, <b class="variable">file</b>, and <b class="variable">name</b>, and
their values.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">JSON Grammar Exchange Format</a></h2>
<p>The <b class="const">json</b> format for parsing expression grammars was written as
a data exchange format not bound to Tcl. It was defined to allow the
exchange of grammars with PackRat/PEG based parser generators for
other languages.</p>
<p>It is formally specified by the rules below:</p>
<ol class="doctools_enumerated">
<li><p>The JSON of any PEG is a JSON object.</p></li>
<li><p>This object holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a JSON object holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a JSON object whose keys are the names of the nonterminal
symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a JSON object itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is a JSON string holding the Tcl serialization of the
parsing expression describing the symbols sentennial structure, as
specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value is a JSON holding holding one of three values specifying how
a parser should handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is a JSON string holding the Tcl serialization of the start
parsing expression of the grammar, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol>
<p>As an aside to the advanced reader, this is pretty much the same as
the Tcl serialization of PE grammars, as specified in section
<span class="sectref"><a href="#section5">PEG serialization format</a></span>, except that the Tcl dictionaries
and lists of that format are mapped to JSON objects and arrays. Only
the parsing expressions themselves are not translated further, but
kept as JSON strings containing a nested Tcl list, and there is no
concept of canonicity for the JSON either.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>a JSON serialization for it is</p>
<pre class="doctools_example">
{
    &quot;pt::grammar::peg&quot; : {
        &quot;rules&quot; : {
            &quot;AddOp&quot;     : {
                &quot;is&quot;   : &quot;\/ {t -} {t +}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Digit&quot;     : {
                &quot;is&quot;   : &quot;\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Expression&quot; : {
                &quot;is&quot;   : &quot;\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Factor&quot;    : {
                &quot;is&quot;   : &quot;x {n Term} {* {x {n AddOp} {n Term}}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;MulOp&quot;     : {
                &quot;is&quot;   : &quot;\/ {t *} {t \/}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Number&quot;    : {
                &quot;is&quot;   : &quot;x {? {n Sign}} {+ {n Digit}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Sign&quot;      : {
                &quot;is&quot;   : &quot;\/ {t -} {t +}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Term&quot;      : {
                &quot;is&quot;   : &quot;n Number&quot;,
                &quot;mode&quot; : &quot;value&quot;
            }
        },
        &quot;start&quot; : &quot;n Expression&quot;
    }
}
</pre>
<p>and a Tcl serialization of the same is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
<p>The similarity of the latter to the JSON should be quite obvious.</p>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_export_peg.html.



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585

<div class='fossil-doc' data-title='pt::peg::export::peg - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export::peg - PEG Export Plugin. Write PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Configuration</a></li>
<li class="doctools_section"><a href="#section4">PEG Specification Language</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::export::peg <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::peg</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the parsing expression grammar export plugin
for the generation of PEG markup.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools and
is intended to be used by <b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b>, the export
manager, sitting between it and the corresponding core conversion
functionality provided by <b class="package"><a href="pt_peg_to_peg.html">pt::peg::to::peg</a></b>.</p>
<p><img alt="arch_core_eplugins" src="../../../../image/arch_core_eplugins.png"></p>
<p>While the direct use of this package with a regular interpreter is
possible, this is strongly disrecommended and requires a number of
contortions to provide the expected environment.
The proper way to use this functionality depends on the situation:</p>
<ol class="doctools_enumerated">
<li><p>In an untrusted environment the proper access is through the package
<b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b> and the export manager objects it
provides.</p></li>
<li><p>In a trusted environment however simply use the package
<b class="package"><a href="pt_peg_to_peg.html">pt::peg::to::peg</a></b> and access the core
conversion functionality directly.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates PEG markup encoding the grammar.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Configuration</a></h2>
<p>The PEG export plugin recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">template</i></dt>
<dd><p>If this configuration variable is set it is assumed to contain a
string into which to put the generated text and other configuration
data. The various locations are expected to be specified with the
following placeholders:</p>
<dl class="doctools_definitions">
<dt><b class="const">@user@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">user</b>.</p></dd>
<dt><b class="const">@format@</b></dt>
<dd><p>To be replaced with the the constant <b class="const">PEG</b>.</p></dd>
<dt><b class="const">@file@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">file</b>.</p></dd>
<dt><b class="const">@name@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">name</b>.</p></dd>
<dt><b class="const">@code@</b></dt>
<dd><p>To be replaced with the generated text.</p></dd>
</dl>
<p>If this configuration variable is not set, or empty, then the plugin
falls back to a standard template, which is defined as &quot;<b class="const">@code@</b>&quot;.</p></dd>
</dl>
<p><em>Note</em> that this plugin may ignore the standard configuration
variables <b class="variable">user</b>, <b class="variable">format</b>, <b class="variable">file</b>, and their values,
depending on the chosen template.</p>
<p>The content of the standard configuration variable <b class="variable">name</b>, if set,
is used as name of the grammar in the output. Otherwise the plugin
falls back to the default name <b class="const">a_pe_grammar</b>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PEG Specification Language</a></h2>
<p><b class="const">peg</b>, a language for the specification of parsing expression
grammars is meant to be human readable, and writable as well, yet
strict enough to allow its processing by machine. Like any computer
language. It was defined to make writing the specification of a
grammar easy, something the other formats found in the Parser Tools do
not lend themselves too.</p>
<p>It is formally specified by the grammar shown below, written in
itself. For a tutorial / introduction to the language please go and
read the <i class="term"><a href="pt_peg_language.html">PEG Language Tutorial</a></i>.</p>
<pre class="doctools_example">
PEG pe-grammar-for-peg (Grammar)
	# --------------------------------------------------------------------
        # Syntactical constructs
        Grammar         &lt;- WHITESPACE Header Definition* Final EOF ;
        Header          &lt;- PEG Identifier StartExpr ;
        Definition      &lt;- Attribute? Identifier IS Expression SEMICOLON ;
        Attribute       &lt;- (VOID / LEAF) COLON ;
        Expression      &lt;- Sequence (SLASH Sequence)* ;
        Sequence        &lt;- Prefix+ ;
        Prefix          &lt;- (AND / NOT)? Suffix ;
        Suffix          &lt;- Primary (QUESTION / STAR / PLUS)? ;
        Primary         &lt;- ALNUM / ALPHA / ASCII / CONTROL / DDIGIT / DIGIT
                        /  GRAPH / LOWER / PRINTABLE / PUNCT / SPACE / UPPER
                        /  WORDCHAR / XDIGIT
                        / Identifier
                        /  OPEN Expression CLOSE
                        /  Literal
                        /  Class
                        /  DOT
                        ;
        Literal         &lt;- APOSTROPH  (!APOSTROPH  Char)* APOSTROPH  WHITESPACE
                        /  DAPOSTROPH (!DAPOSTROPH Char)* DAPOSTROPH WHITESPACE ;
        Class           &lt;- OPENB (!CLOSEB Range)* CLOSEB WHITESPACE ;
        Range           &lt;- Char TO Char / Char ;
        StartExpr       &lt;- OPEN Expression CLOSE ;
void:   Final           &lt;- &quot;END&quot; WHITESPACE SEMICOLON WHITESPACE ;
        # --------------------------------------------------------------------
        # Lexing constructs
        Identifier      &lt;- Ident WHITESPACE ;
leaf:   Ident           &lt;- ([_:] / &lt;alpha&gt;) ([_:] / &lt;alnum&gt;)* ;
        Char            &lt;- CharSpecial / CharOctalFull / CharOctalPart
                        /  CharUnicode / CharUnescaped
                        ;
leaf:   CharSpecial     &lt;- &quot;\\&quot; [nrt'&quot;\[\]\\] ;
leaf:   CharOctalFull   &lt;- &quot;\\&quot; [0-2][0-7][0-7] ;
leaf:   CharOctalPart   &lt;- &quot;\\&quot; [0-7][0-7]? ;
leaf:   CharUnicode     &lt;- &quot;\\&quot; 'u' HexDigit (HexDigit (HexDigit HexDigit?)?)? ;
leaf:   CharUnescaped   &lt;- !&quot;\\&quot; . ;
void:   HexDigit        &lt;- [0-9a-fA-F] ;
void:   TO              &lt;- '-'           ;
void:   OPENB           &lt;- &quot;[&quot;           ;
void:   CLOSEB          &lt;- &quot;]&quot;           ;
void:   APOSTROPH       &lt;- &quot;'&quot;           ;
void:   DAPOSTROPH      &lt;- '&quot;'           ;
void:   PEG             &lt;- &quot;PEG&quot; !([_:] / &lt;alnum&gt;) WHITESPACE ;
void:   IS              &lt;- &quot;&lt;-&quot;    WHITESPACE ;
leaf:   VOID            &lt;- &quot;void&quot;  WHITESPACE ; # Implies that definition has no semantic value.
leaf:   LEAF            &lt;- &quot;leaf&quot;  WHITESPACE ; # Implies that definition has no terminals.
void:   SEMICOLON       &lt;- &quot;;&quot;     WHITESPACE ;
void:   COLON           &lt;- &quot;:&quot;     WHITESPACE ;
void:   SLASH           &lt;- &quot;/&quot;     WHITESPACE ;
leaf:   AND             &lt;- &quot;&amp;&quot;     WHITESPACE ;
leaf:   NOT             &lt;- &quot;!&quot;     WHITESPACE ;
leaf:   QUESTION        &lt;- &quot;?&quot;     WHITESPACE ;
leaf:   STAR            &lt;- &quot;*&quot;     WHITESPACE ;
leaf:   PLUS            &lt;- &quot;+&quot;     WHITESPACE ;
void:   OPEN            &lt;- &quot;(&quot;     WHITESPACE ;
void:   CLOSE           &lt;- &quot;)&quot;     WHITESPACE ;
leaf:   DOT             &lt;- &quot;.&quot;     WHITESPACE ;
leaf:   ALNUM           &lt;- &quot;&lt;alnum&gt;&quot;    WHITESPACE ;
leaf:   ALPHA           &lt;- &quot;&lt;alpha&gt;&quot;    WHITESPACE ;
leaf:   ASCII           &lt;- &quot;&lt;ascii&gt;&quot;    WHITESPACE ;
leaf:   CONTROL         &lt;- &quot;&lt;control&gt;&quot;  WHITESPACE ;
leaf:   DDIGIT          &lt;- &quot;&lt;ddigit&gt;&quot;   WHITESPACE ;
leaf:   DIGIT           &lt;- &quot;&lt;digit&gt;&quot;    WHITESPACE ;
leaf:   GRAPH           &lt;- &quot;&lt;graph&gt;&quot;    WHITESPACE ;
leaf:   LOWER           &lt;- &quot;&lt;lower&gt;&quot;    WHITESPACE ;
leaf:   PRINTABLE       &lt;- &quot;&lt;print&gt;&quot;    WHITESPACE ;
leaf:   PUNCT           &lt;- &quot;&lt;punct&gt;&quot;    WHITESPACE ;
leaf:   SPACE           &lt;- &quot;&lt;space&gt;&quot;    WHITESPACE ;
leaf:   UPPER           &lt;- &quot;&lt;upper&gt;&quot;    WHITESPACE ;
leaf:   WORDCHAR        &lt;- &quot;&lt;wordchar&gt;&quot; WHITESPACE ;
leaf:   XDIGIT          &lt;- &quot;&lt;xdigit&gt;&quot;   WHITESPACE ;
void:   WHITESPACE      &lt;- (&quot; &quot; / &quot;\t&quot; / EOL / COMMENT)* ;
void:   COMMENT         &lt;- '#' (!EOL .)* EOL ;
void:   EOL             &lt;- &quot;\n\r&quot; / &quot;\n&quot; / &quot;\r&quot; ;
void:   EOF             &lt;- !. ;
        # --------------------------------------------------------------------
END;
</pre>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Our example specifies the grammar for a basic 4-operation calculator.</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>Using higher-level features of the notation, i.e. the character
classes (predefined and custom), this example can be rewritten as</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Sign       &lt;- [-+] 						;
    Number     &lt;- Sign? &lt;ddigit&gt;+				;
    Expression &lt;- '(' Expression ')' / (Factor (MulOp Factor)*)	;
    MulOp      &lt;- [*/]						;
    Factor     &lt;- Term (AddOp Term)*				;
    AddOp      &lt;- [-+]						;
    Term       &lt;- Number					;
END;
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_from_container.html.























































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155

<div class='fossil-doc' data-title='pt::peg::from::container - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::from::container(n) 0 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::from::container - PEG Conversion. From CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package does not exist.
There is no need for it.
The CONTAINER format for parsing expression grammars is a piece of Tcl
code which, then sourced, provides a class whose instances have the
grammar we wish to import loaded.
Another way of looking at this is, the CONTAINER output is its own
import package.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_from_json.html.









































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564

<div class='fossil-doc' data-title='pt::peg::from::json - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::from::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::from::json - PEG Conversion. Read JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">JSON Grammar Exchange Format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::from::json <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pt::peg::from::json</b> <b class="method">convert</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the converter from JSON markup to
parsing expression grammars.</p>
<p>It resides in the Import section of the Core Layer of Parser Tools,
and can be used either directly with the other packages of this layer,
or indirectly through the import manager provided by
<b class="package"><a href="pt_peg_import.html">pt::peg::import</a></b>. The latter is intented for use in untrusted
environments and done through the corresponding import plugin
<b class="package"><a href="pt_peg_import_json.html">pt::peg::import::json</a></b> sitting between converter
and import manager.</p>
<p><img alt="arch_core_iplugins" src="../../../../image/arch_core_iplugins.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Converter API found in the <i class="term"><a href="pt_from_api.html">Parser Tools Import API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pt::peg::from::json</b> <b class="method">convert</b> <i class="arg">text</i></a></dt>
<dd><p>This command takes the JSON markup encoding a parsing
expression grammar and contained in <i class="arg">text</i>, and generates the
canonical serialization of said grammar, as specified in section
<span class="sectref"><a href="#section4">PEG serialization format</a></span>.
The created value is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">JSON Grammar Exchange Format</a></h2>
<p>The <b class="const">json</b> format for parsing expression grammars was written as
a data exchange format not bound to Tcl. It was defined to allow the
exchange of grammars with PackRat/PEG based parser generators for
other languages.</p>
<p>It is formally specified by the rules below:</p>
<ol class="doctools_enumerated">
<li><p>The JSON of any PEG is a JSON object.</p></li>
<li><p>This object holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a JSON object holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a JSON object whose keys are the names of the nonterminal
symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a JSON object itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is a JSON string holding the Tcl serialization of the
parsing expression describing the symbols sentennial structure, as
specified in the section <span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value is a JSON holding holding one of three values specifying how
a parser should handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is a JSON string holding the Tcl serialization of the start
parsing expression of the grammar, as specified in the section
<span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol>
<p>As an aside to the advanced reader, this is pretty much the same as
the Tcl serialization of PE grammars, as specified in section
<span class="sectref"><a href="#section4">PEG serialization format</a></span>, except that the Tcl dictionaries
and lists of that format are mapped to JSON objects and arrays. Only
the parsing expressions themselves are not translated further, but
kept as JSON strings containing a nested Tcl list, and there is no
concept of canonicity for the JSON either.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>a JSON serialization for it is</p>
<pre class="doctools_example">
{
    &quot;pt::grammar::peg&quot; : {
        &quot;rules&quot; : {
            &quot;AddOp&quot;     : {
                &quot;is&quot;   : &quot;\/ {t -} {t +}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Digit&quot;     : {
                &quot;is&quot;   : &quot;\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Expression&quot; : {
                &quot;is&quot;   : &quot;\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Factor&quot;    : {
                &quot;is&quot;   : &quot;x {n Term} {* {x {n AddOp} {n Term}}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;MulOp&quot;     : {
                &quot;is&quot;   : &quot;\/ {t *} {t \/}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Number&quot;    : {
                &quot;is&quot;   : &quot;x {? {n Sign}} {+ {n Digit}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Sign&quot;      : {
                &quot;is&quot;   : &quot;\/ {t -} {t +}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Term&quot;      : {
                &quot;is&quot;   : &quot;n Number&quot;,
                &quot;mode&quot; : &quot;value&quot;
            }
        },
        &quot;start&quot; : &quot;n Expression&quot;
    }
}
</pre>
<p>and a Tcl serialization of the same is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
<p>The similarity of the latter to the JSON should be quite obvious.</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_from_peg.html.































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543

<div class='fossil-doc' data-title='pt::peg::from::peg - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::from::peg(n) 1.0.3 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::from::peg - PEG Conversion. Read PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">PEG Specification Language</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::from::peg <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pt::peg::from::peg</b> <b class="method">convert</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the converter from PEG markup to
parsing expression grammars.</p>
<p>It resides in the Import section of the Core Layer of Parser Tools,
and can be used either directly with the other packages of this layer,
or indirectly through the import manager provided by
<b class="package"><a href="pt_peg_import.html">pt::peg::import</a></b>. The latter is intented for use in untrusted
environments and done through the corresponding import plugin
<b class="package"><a href="pt_peg_import_peg.html">pt::peg::import::peg</a></b> sitting between converter
and import manager.</p>
<p><img alt="arch_core_iplugins" src="../../../../image/arch_core_iplugins.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Converter API found in the <i class="term"><a href="pt_from_api.html">Parser Tools Import API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pt::peg::from::peg</b> <b class="method">convert</b> <i class="arg">text</i></a></dt>
<dd><p>This command takes the PEG markup encoding a parsing
expression grammar and contained in <i class="arg">text</i>, and generates the
canonical serialization of said grammar, as specified in section
<span class="sectref"><a href="#section4">PEG serialization format</a></span>.
The created value is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PEG Specification Language</a></h2>
<p><b class="const">peg</b>, a language for the specification of parsing expression
grammars is meant to be human readable, and writable as well, yet
strict enough to allow its processing by machine. Like any computer
language. It was defined to make writing the specification of a
grammar easy, something the other formats found in the Parser Tools do
not lend themselves too.</p>
<p>It is formally specified by the grammar shown below, written in
itself. For a tutorial / introduction to the language please go and
read the <i class="term"><a href="pt_peg_language.html">PEG Language Tutorial</a></i>.</p>
<pre class="doctools_example">
PEG pe-grammar-for-peg (Grammar)
	# --------------------------------------------------------------------
        # Syntactical constructs
        Grammar         &lt;- WHITESPACE Header Definition* Final EOF ;
        Header          &lt;- PEG Identifier StartExpr ;
        Definition      &lt;- Attribute? Identifier IS Expression SEMICOLON ;
        Attribute       &lt;- (VOID / LEAF) COLON ;
        Expression      &lt;- Sequence (SLASH Sequence)* ;
        Sequence        &lt;- Prefix+ ;
        Prefix          &lt;- (AND / NOT)? Suffix ;
        Suffix          &lt;- Primary (QUESTION / STAR / PLUS)? ;
        Primary         &lt;- ALNUM / ALPHA / ASCII / CONTROL / DDIGIT / DIGIT
                        /  GRAPH / LOWER / PRINTABLE / PUNCT / SPACE / UPPER
                        /  WORDCHAR / XDIGIT
                        / Identifier
                        /  OPEN Expression CLOSE
                        /  Literal
                        /  Class
                        /  DOT
                        ;
        Literal         &lt;- APOSTROPH  (!APOSTROPH  Char)* APOSTROPH  WHITESPACE
                        /  DAPOSTROPH (!DAPOSTROPH Char)* DAPOSTROPH WHITESPACE ;
        Class           &lt;- OPENB (!CLOSEB Range)* CLOSEB WHITESPACE ;
        Range           &lt;- Char TO Char / Char ;
        StartExpr       &lt;- OPEN Expression CLOSE ;
void:   Final           &lt;- &quot;END&quot; WHITESPACE SEMICOLON WHITESPACE ;
        # --------------------------------------------------------------------
        # Lexing constructs
        Identifier      &lt;- Ident WHITESPACE ;
leaf:   Ident           &lt;- ([_:] / &lt;alpha&gt;) ([_:] / &lt;alnum&gt;)* ;
        Char            &lt;- CharSpecial / CharOctalFull / CharOctalPart
                        /  CharUnicode / CharUnescaped
                        ;
leaf:   CharSpecial     &lt;- &quot;\\&quot; [nrt'&quot;\[\]\\] ;
leaf:   CharOctalFull   &lt;- &quot;\\&quot; [0-2][0-7][0-7] ;
leaf:   CharOctalPart   &lt;- &quot;\\&quot; [0-7][0-7]? ;
leaf:   CharUnicode     &lt;- &quot;\\&quot; 'u' HexDigit (HexDigit (HexDigit HexDigit?)?)? ;
leaf:   CharUnescaped   &lt;- !&quot;\\&quot; . ;
void:   HexDigit        &lt;- [0-9a-fA-F] ;
void:   TO              &lt;- '-'           ;
void:   OPENB           &lt;- &quot;[&quot;           ;
void:   CLOSEB          &lt;- &quot;]&quot;           ;
void:   APOSTROPH       &lt;- &quot;'&quot;           ;
void:   DAPOSTROPH      &lt;- '&quot;'           ;
void:   PEG             &lt;- &quot;PEG&quot; !([_:] / &lt;alnum&gt;) WHITESPACE ;
void:   IS              &lt;- &quot;&lt;-&quot;    WHITESPACE ;
leaf:   VOID            &lt;- &quot;void&quot;  WHITESPACE ; # Implies that definition has no semantic value.
leaf:   LEAF            &lt;- &quot;leaf&quot;  WHITESPACE ; # Implies that definition has no terminals.
void:   SEMICOLON       &lt;- &quot;;&quot;     WHITESPACE ;
void:   COLON           &lt;- &quot;:&quot;     WHITESPACE ;
void:   SLASH           &lt;- &quot;/&quot;     WHITESPACE ;
leaf:   AND             &lt;- &quot;&amp;&quot;     WHITESPACE ;
leaf:   NOT             &lt;- &quot;!&quot;     WHITESPACE ;
leaf:   QUESTION        &lt;- &quot;?&quot;     WHITESPACE ;
leaf:   STAR            &lt;- &quot;*&quot;     WHITESPACE ;
leaf:   PLUS            &lt;- &quot;+&quot;     WHITESPACE ;
void:   OPEN            &lt;- &quot;(&quot;     WHITESPACE ;
void:   CLOSE           &lt;- &quot;)&quot;     WHITESPACE ;
leaf:   DOT             &lt;- &quot;.&quot;     WHITESPACE ;
leaf:   ALNUM           &lt;- &quot;&lt;alnum&gt;&quot;    WHITESPACE ;
leaf:   ALPHA           &lt;- &quot;&lt;alpha&gt;&quot;    WHITESPACE ;
leaf:   ASCII           &lt;- &quot;&lt;ascii&gt;&quot;    WHITESPACE ;
leaf:   CONTROL         &lt;- &quot;&lt;control&gt;&quot;  WHITESPACE ;
leaf:   DDIGIT          &lt;- &quot;&lt;ddigit&gt;&quot;   WHITESPACE ;
leaf:   DIGIT           &lt;- &quot;&lt;digit&gt;&quot;    WHITESPACE ;
leaf:   GRAPH           &lt;- &quot;&lt;graph&gt;&quot;    WHITESPACE ;
leaf:   LOWER           &lt;- &quot;&lt;lower&gt;&quot;    WHITESPACE ;
leaf:   PRINTABLE       &lt;- &quot;&lt;print&gt;&quot;    WHITESPACE ;
leaf:   PUNCT           &lt;- &quot;&lt;punct&gt;&quot;    WHITESPACE ;
leaf:   SPACE           &lt;- &quot;&lt;space&gt;&quot;    WHITESPACE ;
leaf:   UPPER           &lt;- &quot;&lt;upper&gt;&quot;    WHITESPACE ;
leaf:   WORDCHAR        &lt;- &quot;&lt;wordchar&gt;&quot; WHITESPACE ;
leaf:   XDIGIT          &lt;- &quot;&lt;xdigit&gt;&quot;   WHITESPACE ;
void:   WHITESPACE      &lt;- (&quot; &quot; / &quot;\t&quot; / EOL / COMMENT)* ;
void:   COMMENT         &lt;- '#' (!EOL .)* EOL ;
void:   EOL             &lt;- &quot;\n\r&quot; / &quot;\n&quot; / &quot;\r&quot; ;
void:   EOF             &lt;- !. ;
        # --------------------------------------------------------------------
END;
</pre>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Our example specifies the grammar for a basic 4-operation calculator.</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>Using higher-level features of the notation, i.e. the character
classes (predefined and custom), this example can be rewritten as</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Sign       &lt;- [-+] 						;
    Number     &lt;- Sign? &lt;ddigit&gt;+				;
    Expression &lt;- '(' Expression ')' / (Factor (MulOp Factor)*)	;
    MulOp      &lt;- [*/]						;
    Factor     &lt;- Term (AddOp Term)*				;
    AddOp      &lt;- [-+]						;
    Term       &lt;- Number					;
END;
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_import.html.





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546

<div class='fossil-doc' data-title='pt::peg::import - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import - PEG Import</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection4">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection5">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">configuration</b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
<li>package require <b class="pkgname">pt::peg::import <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::peg::import</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">import text</b> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">import file</b> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">import object text</b> <i class="arg">object</i> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">import object file</b> <i class="arg">object</i> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">includes</b></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">include add</b> <i class="arg">path</i></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">include remove</b> <i class="arg">path</i></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">include clear</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a manager for parsing expression grammars, with
each instance handling a set of plugins for the import of them from
other formats, i.e. their conversion from, for example <i class="term">peg</i>,
<i class="term">container</i>, <i class="term"><a href="../../../../index.html#key206">json</a></i>, etc.</p>
<p>It resides in the Import section of the Core Layer of Parser Tools,
and is one of the three pillars the management of parsing expression
grammars resides on.</p>
<p><img alt="arch_core_import" src="../../../../image/arch_core_import.png"></p>
<p>The other two pillars are, as shown above</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="pt_peg_export.html">PEG Export</a></i>, and</p></li>
<li><p><i class="term"><a href="pt_peg_container.html">PEG Storage</a></i></p></li>
</ol>
<p>For information about the data structure which is the major output of
the manager objects provided by this package see the section
<span class="sectref"><a href="#section3">PEG serialization format</a></span>.</p>
<p>The plugin system of our class is based on the package
<b class="package"><a href="../pluginmgr/pluginmgr.html">pluginmgr</a></b>, and configured to look for plugins using</p>
<ol class="doctools_enumerated">
<li><p>the environment variable <b class="variable">GRAMMAR_PEG_IMPORT_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">GRAMMAR_PEG_PLUGINS</b>,</p></li>
<li><p>the environment variable <b class="variable">GRAMMAR_PLUGINS</b>,</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/peg/import/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/peg/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/plugin</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/peg/import/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/peg/plugins</b>&quot;</p></li>
<li><p>the path &quot;<b class="file">~/.grammar/plugins</b>&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\GRAMMAR\PEG\IMPORT\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\GRAMMAR\PEG\PLUGINS&quot;</p></li>
<li><p>the registry entry &quot;HKEY_CURRENT_USER\SOFTWARE\GRAMMAR\PLUGINS&quot;</p></li>
</ol>
<p>The last three are used only when the package is run on a machine
using the Windows(tm) operating system.</p>
<p>The whole system is delivered with three predefined import plugins,
namely</p>
<dl class="doctools_definitions">
<dt>container</dt>
<dd><p>See <i class="term"><a href="pt_peg_import_container.html">PEG Import Plugin. From CONTAINER format</a></i> for details.</p></dd>
<dt>json</dt>
<dd><p>See <i class="term">PEG Import Plugin. From JSON format</i> for details.</p></dd>
<dt>peg</dt>
<dd><p>See <i class="term">PEG Import Plugin. From PEG format</i> for details.</p></dd>
</dl>
<p>For readers wishing to write their own import plugin for some format,
i.e. <i class="term">plugin writer</i>s, reading and understanding the
<i class="term">Parser Tools Impport API</i> specification is an absolute
necessity, as it documents the interaction between this package and
its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::peg::import</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new import manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::pt::peg::import</b> command have
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">import text</b> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method takes the <i class="arg">text</i> and converts it from the specified
<i class="arg">format</i> to the canonical serialization of a parsing expression
grammar using the import plugin for the format. An error is thrown if
no plugin could be found for the format.
The serialization generated by the conversion process is returned as
the result of this method.</p>
<p>If no format is specified the method defaults to <b class="const">text</b>.</p>
<p>The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section3">PEG serialization format</a></span>.</p>
<p>The plugin has to conform to the interface documented in the
<i class="term"><a href="pt_from_api.html">Parser Tools Import API</a></i> specification.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">import file</b> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method is a convenient wrapper around the <b class="method">import text</b>
method described by the previous item.
It reads the contents of the specified file into memory, feeds the
result into <b class="method">import text</b> and returns the resulting
serialization as its own result.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">import object text</b> <i class="arg">object</i> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method is a convenient wrapper around the <b class="method">import text</b>
method described by the previous item.
It expects that <i class="arg">object</i> is an object command supporting a
<b class="method">deserialize</b> method expecting the canonical serialization of a
parsing expression grammar.
It imports the text using <b class="method">import text</b> and then feeds the
resulting serialization into the <i class="arg">object</i> via <b class="method">deserialize</b>.
This method returns the empty string as it result.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">import object file</b> <i class="arg">object</i> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></dt>
<dd><p>This method behaves like <b class="method">import object text</b>, except that it
reads the text to convert from the specified file instead of being
given it as argument.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">includes</b></a></dt>
<dd><p>This method returns a list containing the currently specified paths to
use to search for include files when processing input.
The order of paths in the list corresponds to the order in which they
are used, from first to last, and also corresponds to the order in
which they were added to the object.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">include add</b> <i class="arg">path</i></a></dt>
<dd><p>This methods adds the specified <i class="arg">path</i> to the list of paths to use
to search for include files when processing input. The path is added
to the end of the list, causing it to be searched after all previously
added paths. The result of the command is the empty string.</p>
<p>The method does nothing if the path is already known.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">include remove</b> <i class="arg">path</i></a></dt>
<dd><p>This methods removes the specified <i class="arg">path</i> from the list of paths
to use to search for include files when processing input. The result
of the command is the empty string.</p>
<p>The method does nothing if the path is not known.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">include clear</b></a></dt>
<dd><p>This method clears the list of paths to use to search for include
files when processing input. The result of the command is the empty
string.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section4">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section4">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_import_container.html.























































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155

<div class='fossil-doc' data-title='pt::peg::import::container - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import::container(n) 0 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import::container - PEG Import Plugin. From CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package does not exist.
There is no need for it.
The CONTAINER format for parsing expression grammars is a piece of Tcl
code which, then sourced, provides a class whose instances have the
grammar we wish to import loaded.
Another way of looking at this is, the CONTAINER output is its own
import package.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_import_json.html.

























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572

<div class='fossil-doc' data-title='pt::peg::import::json - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import::json - PEG Import Plugin. Read JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">JSON Grammar Exchange Format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::import::json <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the parsing expression grammar import plugin
processing JSON markup.</p>
<p>It resides in the Import section of the Core Layer of Parser Tools and
is intended to be used by <b class="package"><a href="pt_peg_import.html">pt::peg::import</a></b>, the import
manager, sitting between it and the corresponding core conversion
functionality provided by <b class="package"><a href="pt_peg_from_json.html">pt::peg::from::json</a></b>.</p>
<p><img alt="arch_core_iplugins" src="../../../../image/arch_core_iplugins.png"></p>
<p>While the direct use of this package with a regular interpreter is
possible, this is strongly disrecommended and requires a number of
contortions to provide the expected environment.
The proper way to use this functionality depends on the situation:</p>
<ol class="doctools_enumerated">
<li><p>In an untrusted environment the proper access is through the package
<b class="package"><a href="pt_peg_import.html">pt::peg::import</a></b> and the import manager objects it
provides.</p></li>
<li><p>In a trusted environment however simply use the package
<b class="package"><a href="pt_peg_from_json.html">pt::peg::from::json</a></b> and access the core
conversion functionality directly.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_from_api.html">Parser Tools Import API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i></a></dt>
<dd><p>This command takes the JSON markup encoding a parsing
expression grammar and contained in <i class="arg">text</i>, and generates the
canonical serialization of said grammar, as specified in section
<span class="sectref"><a href="#section4">PEG serialization format</a></span>.
The created value is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">JSON Grammar Exchange Format</a></h2>
<p>The <b class="const">json</b> format for parsing expression grammars was written as
a data exchange format not bound to Tcl. It was defined to allow the
exchange of grammars with PackRat/PEG based parser generators for
other languages.</p>
<p>It is formally specified by the rules below:</p>
<ol class="doctools_enumerated">
<li><p>The JSON of any PEG is a JSON object.</p></li>
<li><p>This object holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a JSON object holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a JSON object whose keys are the names of the nonterminal
symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a JSON object itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is a JSON string holding the Tcl serialization of the
parsing expression describing the symbols sentennial structure, as
specified in the section <span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value is a JSON holding holding one of three values specifying how
a parser should handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is a JSON string holding the Tcl serialization of the start
parsing expression of the grammar, as specified in the section
<span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol>
<p>As an aside to the advanced reader, this is pretty much the same as
the Tcl serialization of PE grammars, as specified in section
<span class="sectref"><a href="#section4">PEG serialization format</a></span>, except that the Tcl dictionaries
and lists of that format are mapped to JSON objects and arrays. Only
the parsing expressions themselves are not translated further, but
kept as JSON strings containing a nested Tcl list, and there is no
concept of canonicity for the JSON either.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>a JSON serialization for it is</p>
<pre class="doctools_example">
{
    &quot;pt::grammar::peg&quot; : {
        &quot;rules&quot; : {
            &quot;AddOp&quot;     : {
                &quot;is&quot;   : &quot;\/ {t -} {t +}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Digit&quot;     : {
                &quot;is&quot;   : &quot;\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Expression&quot; : {
                &quot;is&quot;   : &quot;\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Factor&quot;    : {
                &quot;is&quot;   : &quot;x {n Term} {* {x {n AddOp} {n Term}}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;MulOp&quot;     : {
                &quot;is&quot;   : &quot;\/ {t *} {t \/}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Number&quot;    : {
                &quot;is&quot;   : &quot;x {? {n Sign}} {+ {n Digit}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Sign&quot;      : {
                &quot;is&quot;   : &quot;\/ {t -} {t +}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Term&quot;      : {
                &quot;is&quot;   : &quot;n Number&quot;,
                &quot;mode&quot; : &quot;value&quot;
            }
        },
        &quot;start&quot; : &quot;n Expression&quot;
    }
}
</pre>
<p>and a Tcl serialization of the same is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
<p>The similarity of the latter to the JSON should be quite obvious.</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_import_peg.html.



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553

<div class='fossil-doc' data-title='pt::peg::import::peg - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import::peg - PEG Import Plugin. Read PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">PEG Specification Language</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::import::peg <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::peg</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the parsing expression grammar import plugin
processing PEG markup.</p>
<p>It resides in the Import section of the Core Layer of Parser Tools and
is intended to be used by <b class="package"><a href="pt_peg_import.html">pt::peg::import</a></b>, the import
manager, sitting between it and the corresponding core conversion
functionality provided by <b class="package"><a href="pt_peg_from_peg.html">pt::peg::from::peg</a></b>.</p>
<p><img alt="arch_core_iplugins" src="../../../../image/arch_core_iplugins.png"></p>
<p>While the direct use of this package with a regular interpreter is
possible, this is strongly disrecommended and requires a number of
contortions to provide the expected environment.
The proper way to use this functionality depends on the situation:</p>
<ol class="doctools_enumerated">
<li><p>In an untrusted environment the proper access is through the package
<b class="package"><a href="pt_peg_import.html">pt::peg::import</a></b> and the import manager objects it
provides.</p></li>
<li><p>In a trusted environment however simply use the package
<b class="package"><a href="pt_peg_from_peg.html">pt::peg::from::peg</a></b> and access the core
conversion functionality directly.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_from_api.html">Parser Tools Import API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i></a></dt>
<dd><p>This command takes the PEG markup encoding a parsing
expression grammar and contained in <i class="arg">text</i>, and generates the
canonical serialization of said grammar, as specified in section
<span class="sectref"><a href="#section4">PEG serialization format</a></span>.
The created value is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PEG Specification Language</a></h2>
<p><b class="const">peg</b>, a language for the specification of parsing expression
grammars is meant to be human readable, and writable as well, yet
strict enough to allow its processing by machine. Like any computer
language. It was defined to make writing the specification of a
grammar easy, something the other formats found in the Parser Tools do
not lend themselves too.</p>
<p>It is formally specified by the grammar shown below, written in
itself. For a tutorial / introduction to the language please go and
read the <i class="term"><a href="pt_peg_language.html">PEG Language Tutorial</a></i>.</p>
<pre class="doctools_example">
PEG pe-grammar-for-peg (Grammar)
	# --------------------------------------------------------------------
        # Syntactical constructs
        Grammar         &lt;- WHITESPACE Header Definition* Final EOF ;
        Header          &lt;- PEG Identifier StartExpr ;
        Definition      &lt;- Attribute? Identifier IS Expression SEMICOLON ;
        Attribute       &lt;- (VOID / LEAF) COLON ;
        Expression      &lt;- Sequence (SLASH Sequence)* ;
        Sequence        &lt;- Prefix+ ;
        Prefix          &lt;- (AND / NOT)? Suffix ;
        Suffix          &lt;- Primary (QUESTION / STAR / PLUS)? ;
        Primary         &lt;- ALNUM / ALPHA / ASCII / CONTROL / DDIGIT / DIGIT
                        /  GRAPH / LOWER / PRINTABLE / PUNCT / SPACE / UPPER
                        /  WORDCHAR / XDIGIT
                        / Identifier
                        /  OPEN Expression CLOSE
                        /  Literal
                        /  Class
                        /  DOT
                        ;
        Literal         &lt;- APOSTROPH  (!APOSTROPH  Char)* APOSTROPH  WHITESPACE
                        /  DAPOSTROPH (!DAPOSTROPH Char)* DAPOSTROPH WHITESPACE ;
        Class           &lt;- OPENB (!CLOSEB Range)* CLOSEB WHITESPACE ;
        Range           &lt;- Char TO Char / Char ;
        StartExpr       &lt;- OPEN Expression CLOSE ;
void:   Final           &lt;- &quot;END&quot; WHITESPACE SEMICOLON WHITESPACE ;
        # --------------------------------------------------------------------
        # Lexing constructs
        Identifier      &lt;- Ident WHITESPACE ;
leaf:   Ident           &lt;- ([_:] / &lt;alpha&gt;) ([_:] / &lt;alnum&gt;)* ;
        Char            &lt;- CharSpecial / CharOctalFull / CharOctalPart
                        /  CharUnicode / CharUnescaped
                        ;
leaf:   CharSpecial     &lt;- &quot;\\&quot; [nrt'&quot;\[\]\\] ;
leaf:   CharOctalFull   &lt;- &quot;\\&quot; [0-2][0-7][0-7] ;
leaf:   CharOctalPart   &lt;- &quot;\\&quot; [0-7][0-7]? ;
leaf:   CharUnicode     &lt;- &quot;\\&quot; 'u' HexDigit (HexDigit (HexDigit HexDigit?)?)? ;
leaf:   CharUnescaped   &lt;- !&quot;\\&quot; . ;
void:   HexDigit        &lt;- [0-9a-fA-F] ;
void:   TO              &lt;- '-'           ;
void:   OPENB           &lt;- &quot;[&quot;           ;
void:   CLOSEB          &lt;- &quot;]&quot;           ;
void:   APOSTROPH       &lt;- &quot;'&quot;           ;
void:   DAPOSTROPH      &lt;- '&quot;'           ;
void:   PEG             &lt;- &quot;PEG&quot; !([_:] / &lt;alnum&gt;) WHITESPACE ;
void:   IS              &lt;- &quot;&lt;-&quot;    WHITESPACE ;
leaf:   VOID            &lt;- &quot;void&quot;  WHITESPACE ; # Implies that definition has no semantic value.
leaf:   LEAF            &lt;- &quot;leaf&quot;  WHITESPACE ; # Implies that definition has no terminals.
void:   SEMICOLON       &lt;- &quot;;&quot;     WHITESPACE ;
void:   COLON           &lt;- &quot;:&quot;     WHITESPACE ;
void:   SLASH           &lt;- &quot;/&quot;     WHITESPACE ;
leaf:   AND             &lt;- &quot;&amp;&quot;     WHITESPACE ;
leaf:   NOT             &lt;- &quot;!&quot;     WHITESPACE ;
leaf:   QUESTION        &lt;- &quot;?&quot;     WHITESPACE ;
leaf:   STAR            &lt;- &quot;*&quot;     WHITESPACE ;
leaf:   PLUS            &lt;- &quot;+&quot;     WHITESPACE ;
void:   OPEN            &lt;- &quot;(&quot;     WHITESPACE ;
void:   CLOSE           &lt;- &quot;)&quot;     WHITESPACE ;
leaf:   DOT             &lt;- &quot;.&quot;     WHITESPACE ;
leaf:   ALNUM           &lt;- &quot;&lt;alnum&gt;&quot;    WHITESPACE ;
leaf:   ALPHA           &lt;- &quot;&lt;alpha&gt;&quot;    WHITESPACE ;
leaf:   ASCII           &lt;- &quot;&lt;ascii&gt;&quot;    WHITESPACE ;
leaf:   CONTROL         &lt;- &quot;&lt;control&gt;&quot;  WHITESPACE ;
leaf:   DDIGIT          &lt;- &quot;&lt;ddigit&gt;&quot;   WHITESPACE ;
leaf:   DIGIT           &lt;- &quot;&lt;digit&gt;&quot;    WHITESPACE ;
leaf:   GRAPH           &lt;- &quot;&lt;graph&gt;&quot;    WHITESPACE ;
leaf:   LOWER           &lt;- &quot;&lt;lower&gt;&quot;    WHITESPACE ;
leaf:   PRINTABLE       &lt;- &quot;&lt;print&gt;&quot;    WHITESPACE ;
leaf:   PUNCT           &lt;- &quot;&lt;punct&gt;&quot;    WHITESPACE ;
leaf:   SPACE           &lt;- &quot;&lt;space&gt;&quot;    WHITESPACE ;
leaf:   UPPER           &lt;- &quot;&lt;upper&gt;&quot;    WHITESPACE ;
leaf:   WORDCHAR        &lt;- &quot;&lt;wordchar&gt;&quot; WHITESPACE ;
leaf:   XDIGIT          &lt;- &quot;&lt;xdigit&gt;&quot;   WHITESPACE ;
void:   WHITESPACE      &lt;- (&quot; &quot; / &quot;\t&quot; / EOL / COMMENT)* ;
void:   COMMENT         &lt;- '#' (!EOL .)* EOL ;
void:   EOL             &lt;- &quot;\n\r&quot; / &quot;\n&quot; / &quot;\r&quot; ;
void:   EOF             &lt;- !. ;
        # --------------------------------------------------------------------
END;
</pre>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Our example specifies the grammar for a basic 4-operation calculator.</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>Using higher-level features of the notation, i.e. the character
classes (predefined and custom), this example can be rewritten as</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Sign       &lt;- [-+] 						;
    Number     &lt;- Sign? &lt;ddigit&gt;+				;
    Expression &lt;- '(' Expression ')' / (Factor (MulOp Factor)*)	;
    MulOp      &lt;- [*/]						;
    Factor     &lt;- Term (AddOp Term)*				;
    AddOp      &lt;- [-+]						;
    Term       &lt;- Number					;
END;
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section5">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_interp.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472

<div class='fossil-doc' data-title='pt::peg::interp - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::interp(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::interp - Interpreter for parsing expression grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Class API</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object API</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">AST serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection4">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::interp <span class="opt">?1.0.1?</span></b></li>
<li>package require <b class="pkgname">pt::rde <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">snit</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::peg::interp</b> <i class="arg">objectName</i> <i class="arg">grammar</i></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">use</b> <i class="arg">grammar</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">parse</b> <i class="arg">chan</i></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">parset</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a class whose instances are Packrat parsers
configurable with a parsing expression grammar. The grammar is
executed directly, i.e. interpreted, with the underlying runtime
provided by the package <b class="package"><a href="pt_rdengine.html">pt::rde</a></b>, basing everything on the
PARAM.</p>
<p>Like the supporting runtime this package resides in the Execution
section of the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_transform" src="../../../../image/arch_core_transform.png"></p>
<p>The interpreted grammar is copied from an instance of <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>, or anything providing the same API, like the
container classes created by <b class="package"><a href="pt_peg_to_container.html">pt::peg::to::container</a></b> or the
associated export plugin <b class="package"><a href="pt_peg_export_container.html">pt::peg::export::container</a></b>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Class API</a></h3>
<p>The package exports the API described here.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::peg::interp</b> <i class="arg">objectName</i> <i class="arg">grammar</i></a></dt>
<dd><p>The command creates a new parser object and returns the fully
qualified name of the object command as its result. The API of this
object command is described in the section <span class="sectref"><a href="#subsection2">Object API</a></span>. It
may be used to invoke various operations on the object.</p>
<p>This new parser is configured for the execution of an empty PEG. To
configure the object for any other PEG use the method <b class="method">use</b> of
the <span class="sectref"><a href="#subsection2">Object API</a></span>.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object API</a></h3>
<p>All objects created by this package provide the following methods.</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">use</b> <i class="arg">grammar</i></a></dt>
<dd><p>This method configures the grammar interpreter / parser for the
execution of the PEG stored in <i class="arg">grammar</i>, an object which is
API-compatible to instances of <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>. The
parser copies the relevant information of the grammar, and does
<em>not</em> take ownership of the object.</p>
<p>The information of any previously used grammar is overwritten.</p>
<p>The result of the method the empty string.</p></dd>
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the parser instance, releasing all claimed memory
and other resources, and deleting the instance command.</p>
<p>The result of the command is the empty string.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">parse</b> <i class="arg">chan</i></a></dt>
<dd><p>This method runs the parser using the contents of <i class="arg">chan</i> as input
(starting at the current location in the channel), until parsing is
not possible anymore, either because parsing has completed, or run
into a syntax error.</p>
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#key411">read</a></b> is properly changed for
push-operation.</p>
<p>Upon successful completion the command returns an abstract syntax tree
as its result.
This AST is in the form specified in section
<span class="sectref"><a href="#section2">AST serialization format</a></span>.
As a plain nested Tcl-list it can then be processed with any Tcl
commands the user likes, doing transformations, semantic checks, etc.
To help in this the package <b class="package"><a href="pt_astree.html">pt::ast</a></b> provides a set of
convenience commands for validation of the tree's basic structure,
printing it for debugging, and walking it either from the bottom up,
or top down.</p>
<p>When encountering a syntax error the command will throw an error instead.
This error will be a 4-element Tcl-list, containing, in the order
listed below:</p>
<ol class="doctools_enumerated">
<li><p>The string <b class="const">pt::rde</b> identifying it as parser runtime error.</p></li>
<li><p>The location of the parse error, as character offset from the
beginning of the parsed input.</p></li>
<li><p>The location of parse error, now as a 2-element list containing
line-number and column in the line.</p></li>
<li><p>A set of atomic parsing expressions indicating encoding the characters
and/or nonterminal symbols the parser expected to see at the location
of the parse error, but did not get.
 For the specification of atomic parsing expressions please see the
section <span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></li>
</ol></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">parset</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the parser using the string in <i class="arg">text</i> as input.
In all other ways it behaves like the method <b class="method">parse</b>, shown
above.</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">AST serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Abstract Syntax Trees (ASTs) as immutable values for transport,
comparison, etc.</p>
<p>Each node in an AST represents a nonterminal symbol of a grammar, and
the range of tokens/characters in the input covered by it. ASTs do not
contain terminal symbols, i.e. tokens/characters. These can be
recovered from the input given a symbol's location.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a tree may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any AST is the serialization of its root node.</p></li>
<li><p>The serialization of any node is a Tcl list containing at least three
elements.</p>
<ol class="doctools_enumerated">
<li><p>The first element is the name of the nonterminal symbol stored in the
node.</p></li>
<li><p>The second and third element are the locations of the first and last
token in the token stream the node represents (covers).</p>
<ol class="doctools_enumerated">
<li><p>Locations are provided as non-negative integer offsets from the
beginning of the token stream, with the first token found in the
stream located at offset 0 (zero).</p></li>
<li><p>The end location has to be equal to or larger than the start location.</p></li>
</ol>
</li>
<li><p>All elements after the first three represent the children of the node,
which are themselves nodes. This means that the serializations of
nodes without children, i.e. leaf nodes, have exactly three elements.
The children are stored in the list with the leftmost child first, and
the rightmost child last.</p></li>
</ol>
</li>
</ol></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of an abstract syntax tree has the format
as specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this tree.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression grammar below</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>and the input string</p>
<pre class="doctools_example"> 120+5 </pre>
<p>then a parser should deliver the abstract syntax tree below (except for whitespace)</p>
<pre class="doctools_example">
set ast {Expression 0 4
    {Factor 0 4
        {Term 0 2
            {Number 0 2
                {Digit 0 0}
                {Digit 1 1}
                {Digit 2 2}
            }
        }
        {AddOp 3 3}
        {Term 4 4
            {Number 4 4
                {Digit 4 4}
            }
        }
    }
}
</pre>
<p>Or, more graphical</p>
<p><img alt="expr_ast" src="../../../../image/expr_ast.png"></p>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_introduction.html.











































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261

<div class='fossil-doc' data-title='pt::pegrammar - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pegrammar(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pegrammar - Introduction to Parsing Expression Grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Formal definition</a></li>
<li class="doctools_section"><a href="#section3">References</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>Welcome to the introduction to <i class="term"><a href="../../../../index.html#key14">Parsing Expression Grammar</a></i>s
(short: <i class="term"><a href="../../../../index.html#key6">PEG</a></i>), the formalism used by the Parser Tools.
It is assumed that the reader has a basic knowledge of parsing theory,
i.e. <i class="term">Context-Free Grammars</i> (short: <i class="term"><a href="../../../../index.html#key22">CFG</a></i>),
<i class="term">languages</i>, and associated terms like <i class="term"><a href="../../../../index.html#key15">LL(k)</a></i>,
<i class="term">LR(k)</i>, <i class="term"><a href="../../../../index.html#key92">terminal</a></i> and <i class="term">nonterminal</i> <i class="term">symbols</i>,
etc.
We do not intend to recapitulate such basic definitions or terms like
<i class="term">useful</i>, <i class="term">reachable</i>, (left/right) <i class="term">recursive</i>,
<i class="term">nullable</i>, first/last/follow sets, etc.
Please see the <span class="sectref"><a href="#section3">References</a></span> at the end instead if you are in
need of places and books which provide such background information.</p>
<p>PEGs are formally very similar to CFGs, with terminal and nonterminal
symbols, start symbol, and rules defining the structure of each
nonterminal symbol.
The main difference lies in the choice(sic!) of <i class="term">choice</i>
operators. Where CFGs use an <i class="term">unordered choice</i> to represent
alternatives PEGs use <i class="term">prioritized choice</i>. Which is fancy way
of saying that a parser has to try the first alternative first and can
try the other alternatives if only if it fails for the first, and so
on.</p>
<p>On the CFG side this gives rise to LL(k) and LR(k) for making the
choice <i class="term">deterministic</i> with a bounded <i class="term">lookahead</i> of k
terminal symbols, where LL is in essence <i class="term">topdown</i> aka
<i class="term"><a href="../../../../index.html#key10">recursive descent</a></i> parsing, and LR <i class="term">bottomup</i> aka
<i class="term">shift reduce</i> parsing.</p>
<p>On the PEG side we can parse input with recursive descent and
<i class="term">backtracking</i> of failed choices, the latter of which amounts to
unlimited lookahead.
By additionally recording the success or failure of nonterminals at
the specific locations they were tried at and reusing this information
after backtracking we can avoid the exponential blowup of running time
usually associated with backtracking and keep the parsing linear. The
memory requirements are of course higher due to this cache, as we are
trading space for time.</p>
<p>This is the basic concept behind <i class="term">packrat parsers</i>.</p>
<p>A limitation pure PEGs share with LL(k) CFGs is that
<i class="term">left-recursive</i> grammars cannot be parsed, with the associated
recursive descent parser entering an infinite recursion.
This limitation is usually overcome by extending pure PEGs with
explicit operators to specify repetition, zero or more, and one or
more, or, formally spoken, for the <i class="term">kleene closure</i> and
<i class="term">positive kleene closure</i>.
This is what the Parser Tools are doing.</p>
<p>Another extension, specific to Parser Tools, is a set of operators
which map more or less directly to various character classes built
into Tcl, i.e. the classes reachable via <b class="cmd">string is</b>.</p>
<p>The remainder of this document consists of the formal definition of
PEGs for the mathematically inclined, and an appendix listing
references to places with more information on PEGs specifically, and
parsing in general.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Formal definition</a></h2>
<p>For the mathematically inclined, a Parsing Expression Grammar is a
4-tuple (VN,VT,R,eS) where</p>
<ul class="doctools_itemized">
<li><p>VN is a set of <i class="term">nonterminal symbols</i>,</p></li>
<li><p>VT is a set of <i class="term">terminal symbols</i>,</p></li>
<li><p>R is a finite set of rules, where each rule is a pair (A,e), A in VN,
and <i class="term"><a href="../../../../index.html#key807">e</a></i> a <i class="term"><a href="../../../../index.html#key8">parsing expression</a></i>.</p></li>
<li><p>eS is a parsing expression, the <i class="term">start expression</i>.</p></li>
</ul>
<p>Further constraints are</p>
<ul class="doctools_itemized">
<li><p>The intersection of VN and VT is empty.</p></li>
<li><p>For all A in VT exists exactly one pair (A,e) in R. In other words, R
is a function from nonterminal symbols to parsing expressions.</p></li>
</ul>
<p>Parsing expressions are inductively defined via</p>
<ul class="doctools_itemized">
<li><p>The empty string (epsilon) is a parsing expression.</p></li>
<li><p>A terminal symbol <i class="term">a</i> is a parsing expression.</p></li>
<li><p>A nonterminal symbol <i class="term">A</i> is a parsing expression.</p></li>
<li><p><i class="term">e1</i><i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">sequence</i>.</p></li>
<li><p><i class="term">e1</i>/<i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">ordered choice</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key807">e</a></i>* is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#key807">e</a></i>. This is called <i class="term">zero-or-more repetitions</i>, also known
as <i class="term">kleene closure</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key807">e</a></i>+ is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#key807">e</a></i>. This is called <i class="term">one-or-more repetitions</i>, also known
as <i class="term">positive kleene closure</i>.</p></li>
<li><p>!<i class="term"><a href="../../../../index.html#key807">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called a <i class="term">not lookahead predicate</i>.</p></li>
<li><p>&amp;<i class="term"><a href="../../../../index.html#key807">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called an <i class="term">and lookahead predicate</i>.</p></li>
</ul>
<p>PEGs are used to define a grammatical structure for streams of symbols
over VT. They are a modern phrasing of older formalisms invented by
Alexander Birham. These formalisms were called TS (TMG recognition
scheme), and gTS (generalized TS). Later they were renamed to TPDL
(Top-Down Parsing Languages) and gTPDL (generalized TPDL).</p>
<p>They can be easily implemented by recursive descent parsers with
backtracking. This makes them relatives of LL(k) Context-Free
Grammars.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://www.pdos.lcs.mit.edu/~baford/packrat/">The Packrat Parsing and Parsing Expression Grammars Page</a>,
by Bryan Ford, Massachusetts Institute of Technology. This is the main
entry page to PEGs, and their realization through Packrat Parsers.</p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Parsing_expression_grammar">http://en.wikipedia.org/wiki/Parsing_expression_grammar</a>
Wikipedia's entry about Parsing Expression Grammars.</p></li>
<li><p><a href="http://www.cs.vu.nl/~dick/PTAPG.html">Parsing Techniques - A Practical Guide </a>, an online book
offering a clear, accessible, and thorough discussion of many
different parsing techniques with their interrelations and
applicabilities, including error recovery techniques.</p></li>
<li><p><a href="http://scifac.ru.ac.za/compilers/">Compilers and Compiler Generators</a>, an online book using
CoCo/R, a generator for recursive descent parsers.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_language.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520

<div class='fossil-doc' data-title='pt::peg_language - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg_language(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg_language - PEG Language Tutorial</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">What is it?</a></li>
<li class="doctools_section"><a href="#section3">The elements of the language</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Basic structure</a></li>
<li class="doctools_subsection"><a href="#subsection2">Names</a></li>
<li class="doctools_subsection"><a href="#subsection3">Rules</a></li>
<li class="doctools_subsection"><a href="#subsection4">Expressions</a></li>
<li class="doctools_subsection"><a href="#subsection5">Whitespace and comments</a></li>
<li class="doctools_subsection"><a href="#subsection6">Nonterminal attributes</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">PEG Specification Language</a>
<ul>
<li class="doctools_subsection"><a href="#subsection7">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>Welcome to the tutorial / introduction for the
<span class="sectref"><a href="#section4">PEG Specification Language</a></span>.
If you are already familiar with the language we are about to discuss,
and only wish to refresh your memory you can, of course, skip ahead to
the aforementioned section and just read the full formal specification.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">What is it?</a></h2>
<p><b class="const">peg</b>, a language for the specification of parsing expression
grammars is meant to be human readable, and writable as well, yet
strict enough to allow its processing by machine. Like any computer
language. It was defined to make writing the specification of a
grammar easy, something the other formats found in the Parser Tools do
not lend themselves too.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">The elements of the language</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Basic structure</a></h3>
<p>The general outline of a textual PEG is</p>
<pre class="doctools_example">
PEG &lt;&lt;name&gt;&gt; (&lt;&lt;start-expression&gt;&gt;)
   &lt;&lt;rules&gt;&gt;
END;
</pre>
<p><em>Note</em>: We are using text in double angle-brackets as
place-holders for things not yet explained.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Names</a></h3>
<p>Names are mostly used to identify the nonterminal symbols of the
grammar, i.e. that which occurs on the left-hand side of a &lt;rule&gt;.
The exception to that is the name given after the keyword <b class="const">PEG</b>
(see previous section), which is the name of the whole grammar itself.</p>
<p>The structure of a name is simple:</p>
<ol class="doctools_enumerated">
<li><p>It begins with a letter, underscore, or colon, followed by</p></li>
<li><p>zero or more letters, digits, underscores, or colons.</p></li>
</ol>
<p>Or, in formal textual notation:</p>
<pre class="doctools_example">
    ([_:] / &lt;alpha&gt;) ([_:] / &lt;alnum&gt;)*
</pre>
<p>Examples of names:</p>
<pre class="doctools_example">
    Hello
    ::world
    _:submarine55_
</pre>
<p>Examples of text which are <em>not</em> names:</p>
<pre class="doctools_example">
    12
    .bogus
    0wrong
    @location
</pre>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Rules</a></h3>
<p>The main body of the text of a grammar specification is taken up by
the rules. Each rule defines the sentence structure of one nonterminal
symbol. Their basic structure is</p>
<pre class="doctools_example">
     &lt;&lt;name&gt;&gt;  &lt;-  &lt;&lt;expression&gt;&gt; ;
</pre>
<p>The &lt;name&gt; specifies the nonterminal symbol to be defined, the
&lt;expression&gt; after the arrow (&lt;-) then declares its structure.</p>
<p>Note that each rule ends in a single semicolon, even the last.
I.e. the semicolon is a rule <em>terminator</em>, not a separator.</p>
<p>We can have as many rules as we like, as long as we define each
nonterminal symbol at most once, and have at least one rule for each
nonterminal symbol which occured in an expression, i.e. in either the
start expression of the grammar, or the right-hande side of a rule.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Expressions</a></h3>
<p>The <em>parsing</em> expressions are the meat of any specification. They
declare the structure of the whole document (&lt;&lt;start-expression&gt;&gt;),
and of all nonterminal symbols.</p>
<p>All expressions are made up out of <i class="term">atomic expressions</i> and
<i class="term">operators</i> combining them. We have operators for choosing
between alternatives, repetition of parts, and for look-ahead
constraints. There is no explicit operator for the sequencing (also
known as <i class="term">concatenation</i>) of parts however. This is specified by
simply placing the parts adjacent to each other.</p>
<p>Here are the operators, from highest to lowest priority (i.e. strength
of binding):</p>
<pre class="doctools_example">
    # Binary operators.
    &lt;&lt;expression-1&gt;&gt;     &lt;&lt;expression-2&gt;&gt;  # sequence. parse 1, then 2.
    &lt;&lt;expression-1&gt;&gt;  /  &lt;&lt;expression-2&gt;&gt;  # alternative. try to parse 1, and parse 2 if 1 failed to parse.
    # Prefix operators. Lookahead constraints. Same priority.
    &amp; &lt;&lt;expression&gt;&gt;  # Parse expression, ok on successful parse.
    ! &lt;&lt;expression&gt;&gt;  # Ditto, except ok on failure to parse.
    # Suffix operators. Repetition. Same priority.
    &lt;&lt;expression&gt;&gt; ?  # Parse expression none, or once (repeat 0 or 1).
    &lt;&lt;expression&gt;&gt; *  # Parse expression zero or more times.
    &lt;&lt;expression&gt;&gt; +  # Parse expression one or more times.
    # Expression nesting
    ( &lt;&lt;expression&gt;&gt; ) # Put an expression in parens to change its priority.
</pre>
<p>With this we can now deconstruct the formal expression for names given
in section <span class="sectref"><a href="#subsection2">Names</a></span>:</p>
<pre class="doctools_example">
    ([_:] / &lt;alpha&gt;) ([_:] / &lt;alnum&gt;)*
</pre>
<p>It is a sequence of two parts,</p>
<pre class="doctools_example">    [_:] / &lt;alpha&gt; </pre>
<p>and</p>
<pre class="doctools_example">    ([_:] / &lt;alnum&gt;)* </pre>
<p>The parentheses around the parts kept their inner alternatives bound
together against the normally higher priority of the sequence. Each of
the two parts is an alternative, with the second part additionally
repeated zero or more times, leaving us with the three atomic
expressions</p>
<pre class="doctools_example">
    [_:]
    &lt;alpha&gt;
    &lt;alnum&gt;
</pre>
<p>And <i class="term">atomic expressions</i> are our next topic. They
fall into three classes:</p>
<ol class="doctools_enumerated">
<li><p>names, i.e. nonterminal symbols,</p></li>
<li><p>string literals, and</p></li>
<li><p>character classes.</p></li>
</ol>
<p>Names we know about already, or see section <span class="sectref"><a href="#subsection2">Names</a></span> for a
refresher.</p>
<p>String literals are simple. They are delimited by (i.e. start and end
with) either a single or double-apostroph, and in between the
delimiters we can have any character but the delimiter itself. They
can be empty as well. Examples of strings are</p>
<pre class="doctools_example">
    ''
    &quot;&quot;
    'hello'
    &quot;umbra&quot;
    &quot;'&quot;
    '&quot;'
</pre>
<p>The last two examples show how to place any of the delimiters into a
string.</p>
<p>For the last, but not least of our atomic expressions, character
classes, we have a number of predefined classes, shown below, and the
ability to construct or own. The predefined classes are:</p>
<pre class="doctools_example">
    &lt;alnum&gt;    # Any unicode alphabet or digit character (string is alnum).
    &lt;alpha&gt;    # Any unicode alphabet character (string is alpha).
    &lt;ascii&gt;    # Any unicode character below codepoint 0x80 (string is ascii).
    &lt;control&gt;  # Any unicode control character (string is control).
    &lt;ddigit&gt;   # The digit characters [0-9].
    &lt;digit&gt;    # Any unicode digit character (string is digit).
    &lt;graph&gt;    # Any unicode printing character, except space (string is graph).
    &lt;lower&gt;    # Any unicode lower-case alphabet character (string is lower).
    &lt;print&gt;    # Any unicode printing character, incl. space (string is print).
    &lt;punct&gt;    # Any unicode punctuation character (string is punct).
    &lt;space&gt;    # Any unicode space character (string is space).
    &lt;upper&gt;    # Any unicode upper-case alphabet character (string is upper).
    &lt;wordchar&gt; # Any unicode word character (string is wordchar).
    &lt;xdigit&gt;   # The hexadecimal digit characters [0-9a-fA-F].
    .          # Any character, except end of input.
</pre>
<p>And the syntax of custom-defined character classes is</p>
<pre class="doctools_example">
    [ &lt;&lt;range&gt;&gt;* ]
</pre>
<p>where each range is either a single character, or of the form</p>
<pre class="doctools_example">
   &lt;&lt;character&gt;&gt; - &lt;character&gt;&gt;
</pre>
<p>Examples for character classes we have seen already in the course of
this introduction are</p>
<pre class="doctools_example">
    [_:]
    [0-9]
    [0-9a-fA-F]
</pre>
<p>We are nearly done with expressions. The only piece left is to tell
how the characters in character classes and string literals are
specified.</p>
<p>Basically characters in the input stand for themselves, and in
addition to that we several types of escape syntax to to repesent
control characters, or characters outside of the encoding the text is
in.</p>
<p>All the escaped forms are started with a backslash character ('\',
unicode codepoint 0x5C). This is then followed by a series of octal
digits, or 'u' and hexedecimal digits, or a regular character from a
fixed set for various control characters. Some examples:</p>
<pre class="doctools_example">
    \n \r \t \' \&quot; \[ \] \\ #
    \000 up to \277         # octal escape, all ascii character, leading 0's can be removed.
    \u2CA7                  # hexadecimal escape, all unicode characters.
    #                       # Here 2ca7 &lt;=&gt; Koptic Small Letter Tau
</pre>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Whitespace and comments</a></h3>
<p>One issue not touched upon so far is whitespace and comments.</p>
<p>Whitespace is any unicode space character, i.e. anything in the
character class &lt;space&gt;, and comments. The latter are sequences of
characters starting with a '#' (hash, unicode codepoint 0x23) and
ending at the next end-of-line.</p>
<p>Whitespace can be freely used between all syntactical elements of a
grammar specification. It cannot be used inside of syntactical
elements, like names, string literals, predefined character classes,
etc.</p>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Nonterminal attributes</a></h3>
<p>Lastly, a more advanced topic. In the section <span class="sectref"><a href="#subsection3">Rules</a></span> we gave
the structure of a rule as</p>
<pre class="doctools_example">
     &lt;&lt;name&gt;&gt;  &lt;-  &lt;&lt;expression&gt;&gt; ;
</pre>
<p>This is not quite true. It is possible to associate a semantic mode
with the nonterminal in the rule, by writing it before the name,
separated from it by a colon, i.e. writing</p>
<pre class="doctools_example">
    &lt;&lt;mode&gt;&gt; : &lt;&lt;name&gt;&gt;  &lt;-  &lt;&lt;expression&gt;&gt; ;
</pre>
<p>is also allowed. This mode is optional. The known modes and their
meanings are:</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl>
<p>Of these three modes only <b class="const">leaf</b> and <b class="const">void</b> can be
specified directly. <b class="const">value</b> is implicitly specified by the
absence of a mode before the nonterminal.</p>
<p>Now, with all the above under our belt it should be possible to not
only read, but understand the formal specification of the text
representation shown in the next section, written in itself.</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PEG Specification Language</a></h2>
<p><b class="const">peg</b>, a language for the specification of parsing expression
grammars is meant to be human readable, and writable as well, yet
strict enough to allow its processing by machine. Like any computer
language. It was defined to make writing the specification of a
grammar easy, something the other formats found in the Parser Tools do
not lend themselves too.</p>
<p>It is formally specified by the grammar shown below, written in
itself. For a tutorial / introduction to the language please go and
read the <i class="term">PEG Language Tutorial</i>.</p>
<pre class="doctools_example">
PEG pe-grammar-for-peg (Grammar)
	# --------------------------------------------------------------------
        # Syntactical constructs
        Grammar         &lt;- WHITESPACE Header Definition* Final EOF ;
        Header          &lt;- PEG Identifier StartExpr ;
        Definition      &lt;- Attribute? Identifier IS Expression SEMICOLON ;
        Attribute       &lt;- (VOID / LEAF) COLON ;
        Expression      &lt;- Sequence (SLASH Sequence)* ;
        Sequence        &lt;- Prefix+ ;
        Prefix          &lt;- (AND / NOT)? Suffix ;
        Suffix          &lt;- Primary (QUESTION / STAR / PLUS)? ;
        Primary         &lt;- ALNUM / ALPHA / ASCII / CONTROL / DDIGIT / DIGIT
                        /  GRAPH / LOWER / PRINTABLE / PUNCT / SPACE / UPPER
                        /  WORDCHAR / XDIGIT
                        / Identifier
                        /  OPEN Expression CLOSE
                        /  Literal
                        /  Class
                        /  DOT
                        ;
        Literal         &lt;- APOSTROPH  (!APOSTROPH  Char)* APOSTROPH  WHITESPACE
                        /  DAPOSTROPH (!DAPOSTROPH Char)* DAPOSTROPH WHITESPACE ;
        Class           &lt;- OPENB (!CLOSEB Range)* CLOSEB WHITESPACE ;
        Range           &lt;- Char TO Char / Char ;
        StartExpr       &lt;- OPEN Expression CLOSE ;
void:   Final           &lt;- &quot;END&quot; WHITESPACE SEMICOLON WHITESPACE ;
        # --------------------------------------------------------------------
        # Lexing constructs
        Identifier      &lt;- Ident WHITESPACE ;
leaf:   Ident           &lt;- ([_:] / &lt;alpha&gt;) ([_:] / &lt;alnum&gt;)* ;
        Char            &lt;- CharSpecial / CharOctalFull / CharOctalPart
                        /  CharUnicode / CharUnescaped
                        ;
leaf:   CharSpecial     &lt;- &quot;\\&quot; [nrt'&quot;\[\]\\] ;
leaf:   CharOctalFull   &lt;- &quot;\\&quot; [0-2][0-7][0-7] ;
leaf:   CharOctalPart   &lt;- &quot;\\&quot; [0-7][0-7]? ;
leaf:   CharUnicode     &lt;- &quot;\\&quot; 'u' HexDigit (HexDigit (HexDigit HexDigit?)?)? ;
leaf:   CharUnescaped   &lt;- !&quot;\\&quot; . ;
void:   HexDigit        &lt;- [0-9a-fA-F] ;
void:   TO              &lt;- '-'           ;
void:   OPENB           &lt;- &quot;[&quot;           ;
void:   CLOSEB          &lt;- &quot;]&quot;           ;
void:   APOSTROPH       &lt;- &quot;'&quot;           ;
void:   DAPOSTROPH      &lt;- '&quot;'           ;
void:   PEG             &lt;- &quot;PEG&quot; !([_:] / &lt;alnum&gt;) WHITESPACE ;
void:   IS              &lt;- &quot;&lt;-&quot;    WHITESPACE ;
leaf:   VOID            &lt;- &quot;void&quot;  WHITESPACE ; # Implies that definition has no semantic value.
leaf:   LEAF            &lt;- &quot;leaf&quot;  WHITESPACE ; # Implies that definition has no terminals.
void:   SEMICOLON       &lt;- &quot;;&quot;     WHITESPACE ;
void:   COLON           &lt;- &quot;:&quot;     WHITESPACE ;
void:   SLASH           &lt;- &quot;/&quot;     WHITESPACE ;
leaf:   AND             &lt;- &quot;&amp;&quot;     WHITESPACE ;
leaf:   NOT             &lt;- &quot;!&quot;     WHITESPACE ;
leaf:   QUESTION        &lt;- &quot;?&quot;     WHITESPACE ;
leaf:   STAR            &lt;- &quot;*&quot;     WHITESPACE ;
leaf:   PLUS            &lt;- &quot;+&quot;     WHITESPACE ;
void:   OPEN            &lt;- &quot;(&quot;     WHITESPACE ;
void:   CLOSE           &lt;- &quot;)&quot;     WHITESPACE ;
leaf:   DOT             &lt;- &quot;.&quot;     WHITESPACE ;
leaf:   ALNUM           &lt;- &quot;&lt;alnum&gt;&quot;    WHITESPACE ;
leaf:   ALPHA           &lt;- &quot;&lt;alpha&gt;&quot;    WHITESPACE ;
leaf:   ASCII           &lt;- &quot;&lt;ascii&gt;&quot;    WHITESPACE ;
leaf:   CONTROL         &lt;- &quot;&lt;control&gt;&quot;  WHITESPACE ;
leaf:   DDIGIT          &lt;- &quot;&lt;ddigit&gt;&quot;   WHITESPACE ;
leaf:   DIGIT           &lt;- &quot;&lt;digit&gt;&quot;    WHITESPACE ;
leaf:   GRAPH           &lt;- &quot;&lt;graph&gt;&quot;    WHITESPACE ;
leaf:   LOWER           &lt;- &quot;&lt;lower&gt;&quot;    WHITESPACE ;
leaf:   PRINTABLE       &lt;- &quot;&lt;print&gt;&quot;    WHITESPACE ;
leaf:   PUNCT           &lt;- &quot;&lt;punct&gt;&quot;    WHITESPACE ;
leaf:   SPACE           &lt;- &quot;&lt;space&gt;&quot;    WHITESPACE ;
leaf:   UPPER           &lt;- &quot;&lt;upper&gt;&quot;    WHITESPACE ;
leaf:   WORDCHAR        &lt;- &quot;&lt;wordchar&gt;&quot; WHITESPACE ;
leaf:   XDIGIT          &lt;- &quot;&lt;xdigit&gt;&quot;   WHITESPACE ;
void:   WHITESPACE      &lt;- (&quot; &quot; / &quot;\t&quot; / EOL / COMMENT)* ;
void:   COMMENT         &lt;- '#' (!EOL .)* EOL ;
void:   EOL             &lt;- &quot;\n\r&quot; / &quot;\n&quot; / &quot;\r&quot; ;
void:   EOF             &lt;- !. ;
        # --------------------------------------------------------------------
END;
</pre>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Example</a></h3>
<p>Our example specifies the grammar for a basic 4-operation calculator.</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>Using higher-level features of the notation, i.e. the character
classes (predefined and custom), this example can be rewritten as</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Sign       &lt;- [-+] 						;
    Number     &lt;- Sign? &lt;ddigit&gt;+				;
    Expression &lt;- '(' Expression ')' / (Factor (MulOp Factor)*)	;
    MulOp      &lt;- [*/]						;
    Factor     &lt;- Term (AddOp Term)*				;
    AddOp      &lt;- [-+]						;
    Term       &lt;- Number					;
END;
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_op.html.





























































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270

<div class='fossil-doc' data-title='pt_peg_op - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_peg_op(i) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_peg_op - Parser Tools PE Grammar Utility Operations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::op 1.0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::peg::peg::op</b> <b class="method">called</b> <i class="arg">container</i></a></li>
<li><a href="#2"><b class="cmd">::peg::peg::op</b> <b class="method">dechain</b> <i class="arg">container</i></a></li>
<li><a href="#3"><b class="cmd">::peg::peg::op</b> <b class="method">drop unreachable</b> <i class="arg">container</i></a></li>
<li><a href="#4"><b class="cmd">::peg::peg::op</b> <b class="method">drop unrealizable</b> <i class="arg">container</i></a></li>
<li><a href="#5"><b class="cmd">::peg::peg::op</b> <b class="method">flatten</b> <i class="arg">container</i></a></li>
<li><a href="#6"><b class="cmd">::peg::peg::op</b> <b class="method">minimize</b> <i class="arg">container</i></a></li>
<li><a href="#7"><b class="cmd">::peg::peg::op</b> <b class="method">modeopt</b> <i class="arg">container</i></a></li>
<li><a href="#8"><b class="cmd">::peg::peg::op</b> <b class="method">reachable</b> <i class="arg">container</i></a></li>
<li><a href="#9"><b class="cmd">::peg::peg::op</b> <b class="method">realizable</b> <i class="arg">container</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a number of utility commands manipulating a PE
grammar (container) in various ways.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::peg::peg::op</b> <b class="method">called</b> <i class="arg">container</i></a></dt>
<dd><p>This command determines the static call structure for the nonterminal
symbols of the grammar stored in the <i class="arg">container</i>.</p>
<p>The result of the command is a dictionary mapping from each
symbol to the symbols it calls. The empty string is the key used to
represent the start expression of the grammar.</p>
<p>The grammar in the container is not modified.</p>
<p>The <i class="arg">container</i> instance has to expose a method API as is
provided by the package <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>.</p></dd>
<dt><a name="2"><b class="cmd">::peg::peg::op</b> <b class="method">dechain</b> <i class="arg">container</i></a></dt>
<dd><p>This command simplifies all symbols which just chain to a different
symbol by inlining the right hand side of the called symbol in its
callers. This works if and only the modes match properly, per the
decision table below.</p>
<pre class="doctools_example">
caller called | dechain | notes
--------------+---------+-----------------------
value  value  |  yes    |  value is passed
value  leaf   |  yes    |  value is passed
value  void   |  yes    |  caller is implied void
leaf   value  |  no     |  generated value was discarded, inlined would not. called may be implied void.
leaf   leaf   |  no     |  s.a.
leaf   void   |  no     |  s.a.
void   value  |  no     |  caller drops value, inlined would not.
void   leaf   |  no     |  s.a.
void   void   |  yes    |
</pre>
<p>The result of the command is the empty string.</p>
<p>The grammar in the container is directly modified. If that is
not wanted, a copy of the original container has to be used.</p>
<p>The <i class="arg">container</i> instance has to expose a method API as is
provided by the package <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>.</p></dd>
<dt><a name="3"><b class="cmd">::peg::peg::op</b> <b class="method">drop unreachable</b> <i class="arg">container</i></a></dt>
<dd><p>This command removes all symbols from the grammar which are not
<b class="method">reachable</b>.</p>
<p>The result of the command is the empty string.</p>
<p>The grammar in the container is directly modified. If that is
not wanted, a copy of the original container has to be used.</p>
<p>The <i class="arg">container</i> instance has to expose a method API as is
provided by the package <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>.</p></dd>
<dt><a name="4"><b class="cmd">::peg::peg::op</b> <b class="method">drop unrealizable</b> <i class="arg">container</i></a></dt>
<dd><p>This command removes all symbols from the grammar which are not
<b class="method">realizable</b>.</p>
<p>The result of the command is the empty string.</p>
<p>The grammar in the container is directly modified. If that is
not wanted, a copy of the original container has to be used.</p>
<p>The <i class="arg">container</i> instance has to expose a method API as is
provided by the package <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>.</p></dd>
<dt><a name="5"><b class="cmd">::peg::peg::op</b> <b class="method">flatten</b> <i class="arg">container</i></a></dt>
<dd><p>This command flattens (see <b class="package"><a href="pt_pexpr_op.html">pt::pe::op</a></b>) all expressions in
the grammar, i.e. the start expression and the right hand sides of all
nonterminal symbols.</p>
<p>The result of the command is the empty string.</p>
<p>The grammar in the container is directly modified. If that is
not wanted, a copy of the original container has to be used.</p>
<p>The <i class="arg">container</i> instance has to expose a method API as is
provided by the package <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>.</p></dd>
<dt><a name="6"><b class="cmd">::peg::peg::op</b> <b class="method">minimize</b> <i class="arg">container</i></a></dt>
<dd><p>This command reduces the provided grammar by applying most of the other methods of this package.</p>
<p>After flattening the expressions it removes unreachable and
unrealizable symbols, flattens the expressions again, then optimizes
the symbol modes before collapsing symbol chains as much as possible.</p>
<p>The result of the command is the empty string.</p>
<p>The grammar in the container is directly modified. If that is
not wanted, a copy of the original container has to be used.</p>
<p>The <i class="arg">container</i> instance has to expose a method API as is
provided by the package <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>.</p></dd>
<dt><a name="7"><b class="cmd">::peg::peg::op</b> <b class="method">modeopt</b> <i class="arg">container</i></a></dt>
<dd><p>This command optimizes the semantic modes of non-terminal symbols
according to the two rules below.</p>
<ol class="doctools_enumerated">
<li><p>If a symbol X with mode <b class="const">value</b> calls no other symbols,
        i.e. uses only terminal symbols in whatever combination, then
	this can be represented simpler by using mode <b class="const">leaf</b>.</p></li>
<li><p>If a symbol X is only called from symbols with modes
	<b class="const">leaf</b> or <b class="const">void</b> then this symbol should have mode
	<b class="const">void</b> also, as any AST it could generate will be
	discarded anyway.</p></li>
</ol>
<p>The result of the command is the empty string.</p>
<p>The grammar in the container is directly modified. If that is
not wanted, a copy of the original container has to be used.</p>
<p>The <i class="arg">container</i> instance has to expose a method API as is
provided by the package <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>.</p></dd>
<dt><a name="8"><b class="cmd">::peg::peg::op</b> <b class="method">reachable</b> <i class="arg">container</i></a></dt>
<dd><p>This command computes the set of all nonterminal symbols which are
reachable from the start expression of the grammar. This is
essentially the transitive closure over <b class="method">called</b> and the
symbol's right hand sides, beginning with the start expression.</p>
<p>The result of the command is the list of reachable symbols.</p>
<p>The grammar in the container is not modified.</p>
<p>The <i class="arg">container</i> instance has to expose a method API as is
provided by the package <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>.</p></dd>
<dt><a name="9"><b class="cmd">::peg::peg::op</b> <b class="method">realizable</b> <i class="arg">container</i></a></dt>
<dd><p>This command computes the set of all nonterminal symbols which are
realizable, i.e. can derive pure terminal phrases. This is done
iteratively, starting with state unrealizable for all and any, and
then updating all symbols which are realizable, propagating changes,
until nothing changes any more.</p>
<p>The result of the command is the list of realizable symbols.</p>
<p>The grammar in the container is not modified.</p>
<p>The <i class="arg">container</i> instance has to expose a method API as is
provided by the package <b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_to_container.html.



























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557

<div class='fossil-doc' data-title='pt::peg::to::container - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::container(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::container - PEG Conversion. Write CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Options</a></li>
<li class="doctools_section"><a href="#section4">Grammar Container</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::to::container <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">text::write</b></li>
<li>package require <b class="pkgname">char</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pt::peg::to::container</b> <b class="method">reset</b></a></li>
<li><a href="#2"><b class="cmd">pt::peg::to::container</b> <b class="method">configure</b></a></li>
<li><a href="#3"><b class="cmd">pt::peg::to::container</b> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#4"><b class="cmd">pt::peg::to::container</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></li>
<li><a href="#5"><b class="cmd">pt::peg::to::container</b> <b class="method">convert</b> <i class="arg">serial</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the converter from parsing expression grammars
to CONTAINER markup.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools,
and can be used either directly with the other packages of this layer,
or indirectly through the export manager provided by
<b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b>. The latter is intented for use in untrusted
environments and done through the corresponding export plugin
<b class="package"><a href="pt_peg_export_container.html">pt::peg::export::container</a></b> sitting between converter
and export manager.</p>
<p><img alt="arch_core_eplugins" src="../../../../image/arch_core_eplugins.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Converter API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pt::peg::to::container</b> <b class="method">reset</b></a></dt>
<dd><p>This command resets the configuration of the package to its default
settings.</p></dd>
<dt><a name="2"><b class="cmd">pt::peg::to::container</b> <b class="method">configure</b></a></dt>
<dd><p>This command returns a dictionary containing the current configuration
of the package.</p></dd>
<dt><a name="3"><b class="cmd">pt::peg::to::container</b> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>This command returns the current value of the specified configuration
<i class="arg">option</i> of the package. For the set of legal options, please read
the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">pt::peg::to::container</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></dt>
<dd><p>This command sets the given configuration <i class="arg">option</i>s of the
package, to the specified <i class="arg">value</i>s. For the set of legal options,
please read the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">pt::peg::to::container</b> <b class="method">convert</b> <i class="arg">serial</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, and generates CONTAINER markup
encoding the grammar, per the current package configuration.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Options</a></h2>
<p>The converter to the CONTAINER format recognizes the following options
and changes its behaviour as they specify.</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-mode</b> <b class="const">bulk</b>|<b class="const">incremental</b></dt>
<dd><p>The value of this option controls which methods of
<b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b> instances are used to specify the
grammar, i.e. preload it into the container. There are two legal
values, as listed below. The default is <b class="const">bulk</b>.</p>
<dl class="doctools_definitions">
<dt><b class="const">bulk</b></dt>
<dd><p>In this mode the methods <b class="method">start</b>, <b class="method">add</b>, <b class="method">modes</b>,
and <b class="method">rules</b> are used to specify the grammar in a bulk manner,
i.e. as a set of nonterminal symbols, and two dictionaries mapping
from the symbols to their semantic modes and parsing expressions.</p>
<p>This mode is the default.</p></dd>
<dt><b class="const">incremental</b></dt>
<dd><p>In this mode the methods <b class="method">start</b>, <b class="method">add</b>, <b class="method">mode</b>,
and <b class="method">rule</b> are used to specify the grammar piecemal, with each
nonterminal having its own block of defining commands.</p></dd>
</dl></dd>
<dt><b class="option">-template</b> string</dt>
<dd><p>The value of this option is a string into which to put the generated
code and the other configuration settings. The various locations for
user-data are expected to be specified with the placeholders listed
below. The default value is &quot;<b class="const">@code@</b>&quot;.</p>
<dl class="doctools_definitions">
<dt><b class="const">@user@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-user</b>.</p></dd>
<dt><b class="const">@format@</b></dt>
<dd><p>To be replaced with the the constant <b class="const">CONTAINER</b>.</p></dd>
<dt><b class="const">@file@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-file</b>.</p></dd>
<dt><b class="const">@name@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-name</b>.</p></dd>
<dt><b class="const">@mode@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-mode</b>.</p></dd>
<dt><b class="const">@code@</b></dt>
<dd><p>To be replaced with the generated code.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Grammar Container</a></h2>
<p>The <b class="const">container</b> format is another form of describing parsing
expression grammars. While data in this format is executable it does
not constitute a parser for the grammar. It always has to be used in
conjunction with the package <b class="package"><a href="pt_peg_interp.html">pt::peg::interp</a></b>, a grammar
interpreter.</p>
<p>The format represents grammars by a <b class="cmd">snit::type</b>, i.e. class,
whose instances are API-compatible to the instances of the
<b class="package"><a href="pt_peg_container.html">pt::peg::container</a></b> package, and which are preloaded with the
grammar in question.</p>
<p>It has no direct formal specification beyond what was said above.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>one possible CONTAINER serialization for it is</p>
<pre class="doctools_example">
snit::type a_pe_grammar {
    constructor {} {
        install myg using pt::peg::container ${selfns}::G
        $myg start {n Expression}
        $myg add   AddOp Digit Expression Factor MulOp Number Sign Term
        $myg modes {
            AddOp      value
            Digit      value
            Expression value
            Factor     value
            MulOp      value
            Number     value
            Sign       value
            Term       value
        }
        $myg rules {
            AddOp      {/ {t -} {t +}}
            Digit      {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}
            Expression {/ {x {t \50} {n Expression} {t \51}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}}
            Factor     {x {n Term} {* {x {n AddOp} {n Term}}}}
            MulOp      {/ {t *} {t /}}
            Number     {x {? {n Sign}} {+ {n Digit}}}
            Sign       {/ {t -} {t +}}
            Term       {n Number}
        }
        return
    }
    component myg
    delegate method * to myg
}
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key349">CONTAINER</a>, <a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_to_cparam.html.





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590

<div class='fossil-doc' data-title='pt::peg::to::cparam - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::cparam(n) 1.1.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::cparam - PEG Conversion. Write CPARAM format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Options</a></li>
<li class="doctools_section"><a href="#section4">C/PARAM code representation of parsing expression grammars</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::to::cparam <span class="opt">?1.1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pt::peg::to::cparam</b> <b class="method">reset</b></a></li>
<li><a href="#2"><b class="cmd">pt::peg::to::cparam</b> <b class="method">configure</b></a></li>
<li><a href="#3"><b class="cmd">pt::peg::to::cparam</b> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#4"><b class="cmd">pt::peg::to::cparam</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></li>
<li><a href="#5"><b class="cmd">pt::peg::to::cparam</b> <b class="method">convert</b> <i class="arg">serial</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the converter from parsing expression grammars
to CPARAM markup.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools,
and can be used either directly with the other packages of this layer,
or indirectly through the export manager provided by
<b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b>. The latter is intented for use in untrusted
environments and done through the corresponding export plugin
<b class="package">pt::peg::export::cparam</b> sitting between converter
and export manager.</p>
<p><img alt="arch_core_eplugins" src="../../../../image/arch_core_eplugins.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Converter API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pt::peg::to::cparam</b> <b class="method">reset</b></a></dt>
<dd><p>This command resets the configuration of the package to its default
settings.</p></dd>
<dt><a name="2"><b class="cmd">pt::peg::to::cparam</b> <b class="method">configure</b></a></dt>
<dd><p>This command returns a dictionary containing the current configuration
of the package.</p></dd>
<dt><a name="3"><b class="cmd">pt::peg::to::cparam</b> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>This command returns the current value of the specified configuration
<i class="arg">option</i> of the package. For the set of legal options, please read
the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">pt::peg::to::cparam</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></dt>
<dd><p>This command sets the given configuration <i class="arg">option</i>s of the
package, to the specified <i class="arg">value</i>s. For the set of legal options,
please read the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">pt::peg::to::cparam</b> <b class="method">convert</b> <i class="arg">serial</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, and generates CPARAM markup
encoding the grammar, per the current package configuration.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Options</a></h2>
<p>The converter to C code recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-template</b> string</dt>
<dd><p>The value of this option is a string into which to put
the generated text and the other configuration settings. The various
locations for user-data are expected to be specified with the
placeholders listed below. The default value is &quot;<b class="const">@code@</b>&quot;.</p>
<dl class="doctools_definitions">
<dt><b class="const">@user@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-user</b>.</p></dd>
<dt><b class="const">@format@</b></dt>
<dd><p>To be replaced with the the constant <b class="const">C/PARAM</b>.</p></dd>
<dt><b class="const">@file@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-file</b>.</p></dd>
<dt><b class="const">@name@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-name</b>.</p></dd>
<dt><b class="const">@code@</b></dt>
<dd><p>To be replaced with the generated Tcl code.</p></dd>
</dl>
<p>The following options are special, in that they will
occur within the generated code, and are replaced there as well.</p>
<dl class="doctools_definitions">
<dt><b class="const">@statedecl@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">state-decl</b>.</p></dd>
<dt><b class="const">@stateref@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">state-ref</b>.</p></dd>
<dt><b class="const">@strings@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">string-varname</b>.</p></dd>
<dt><b class="const">@self@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">self-command</b>.</p></dd>
<dt><b class="const">@def@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">fun-qualifier</b>.</p></dd>
<dt><b class="const">@ns@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">namespace</b>.</p></dd>
<dt><b class="const">@main@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">main</b>.</p></dd>
<dt><b class="const">@prelude@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">prelude</b>.</p></dd>
</dl></dd>
<dt><b class="option">-state-decl</b> string</dt>
<dd><p>A C string representing the argument declaration to use in the
generated parsing functions to refer to the parsing state. In essence
type and argument name.
The default value is the string <b class="const">RDE_PARAM p</b>.</p></dd>
<dt><b class="option">-state-ref</b> string</dt>
<dd><p>A C string representing the argument named used in the generated
parsing functions to refer to the parsing state.
The default value is the string <b class="const">p</b>.</p></dd>
<dt><b class="option">-self-command</b> string</dt>
<dd><p>A C string representing the reference needed to call the generated
parser function (methods ...) from another parser fonction, per the
chosen framework (template).
The default value is the empty string.</p></dd>
<dt><b class="option">-fun-qualifier</b> string</dt>
<dd><p>A C string containing the attributes to give to the generated
functions (methods ...), per the chosen framework (template).
The default value is <b class="const">static</b>.</p></dd>
<dt><b class="option">-namespace</b> string</dt>
<dd><p>The name of the C namespace the parser functions (methods, ...) shall
reside in, or a general prefix to add to the function names.
The default value is the empty string.</p></dd>
<dt><b class="option">-main</b> string</dt>
<dd><p>The name of the main function (method, ...) to be called by the chosen
framework (template) to start parsing input.
The default value is <b class="const">__main</b>.</p></dd>
<dt><b class="option">-string-varname</b> string</dt>
<dd><p>The name of the variable used for the table of strings used by the
generated parser, i.e. error messages, symbol names, etc.
The default value is <b class="const">p_string</b>.</p></dd>
<dt><b class="option">-prelude</b> string</dt>
<dd><p>A snippet of code to be inserted at the head of each generated parsing
function.
The default value is the empty string.</p></dd>
<dt><b class="option">-indent</b> integer</dt>
<dd><p>The number of characters to indent each line of the generated code by.
The default value is <b class="const">0</b>.</p></dd>
<dt><b class="option">-comments</b> boolean</dt>
<dd><p>A flag controlling the generation of code comments containing the
original parsing expression a parsing function is for.
The default value is <b class="const">on</b>.</p></dd>
</dl>
<p>While the high parameterizability of this converter, as shown by the
multitude of options it supports, is an advantage to the advanced
user, allowing her to customize the output of the converter as needed,
a novice user will likely not see the forest for the trees.</p>
<p>To help these latter users an adjunct package is provided, containing
a canned configuration which will generate immediately useful full
parsers. It is</p>
<dl class="doctools_definitions">
<dt><b class="package"><a href="pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></b></dt>
<dd><p>Generated parsers are embedded into a <b class="package">Critcl</b>-based framework.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">C/PARAM code representation of parsing expression grammars</a></h2>
<p>The <b class="const">c</b> format is executable code, a parser for the grammar. The
parser implementation is written in C and can be tweaked to the users'
needs through a multitude of options.</p>
<p>The <b class="cmd">critcl</b> format, for example, is implemented as a canned
configuration of these options on top of the generator for <b class="const">c</b>.</p>
<p>The bulk of such a framework has to be specified through the option
<b class="option">-template</b>. The additional options</p>
<dl class="doctools_options">
<dt><b class="option">-fun-qualifier</b> string</dt>
<dd></dd>
<dt><b class="option">-main</b> string</dt>
<dd></dd>
<dt><b class="option">-namespace</b> string</dt>
<dd></dd>
<dt><b class="option">-prelude</b> string</dt>
<dd></dd>
<dt><b class="option">-self-command</b> string</dt>
<dd></dd>
<dt><b class="option">-state-decl</b> string</dt>
<dd></dd>
<dt><b class="option">-state-ref</b> string</dt>
<dd></dd>
<dt><b class="option">-string-varname</b> string</dt>
<dd></dd>
</dl>
<p>provide code snippets which help to glue framework and generated code
together. Their placeholders are in the <em>generated</em> code.
Further the options</p>
<dl class="doctools_options">
<dt><b class="option">-indent</b> integer</dt>
<dd></dd>
<dt><b class="option">-comments</b> boolean</dt>
<dd></dd>
</dl>
<p>allow for the customization of the code indent (default none), and
whether to generate comments showing the parsing expressions a
function is for (default on).</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>We are forgoing an example of this representation, with apologies.
It would be way to large for this document.</p>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key810">CPARAM</a>, <a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_to_json.html.













































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614

<div class='fossil-doc' data-title='pt::peg::to::json - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::json - PEG Conversion. Write JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Options</a></li>
<li class="doctools_section"><a href="#section4">JSON Grammar Exchange Format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::to::json <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">json::write</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pt::peg::to::json</b> <b class="method">reset</b></a></li>
<li><a href="#2"><b class="cmd">pt::peg::to::json</b> <b class="method">configure</b></a></li>
<li><a href="#3"><b class="cmd">pt::peg::to::json</b> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#4"><b class="cmd">pt::peg::to::json</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></li>
<li><a href="#5"><b class="cmd">pt::peg::to::json</b> <b class="method">convert</b> <i class="arg">serial</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the converter from parsing expression grammars
to JSON markup.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools,
and can be used either directly with the other packages of this layer,
or indirectly through the export manager provided by
<b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b>. The latter is intented for use in untrusted
environments and done through the corresponding export plugin
<b class="package"><a href="pt_peg_export_json.html">pt::peg::export::json</a></b> sitting between converter
and export manager.</p>
<p><img alt="arch_core_eplugins" src="../../../../image/arch_core_eplugins.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Converter API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pt::peg::to::json</b> <b class="method">reset</b></a></dt>
<dd><p>This command resets the configuration of the package to its default
settings.</p></dd>
<dt><a name="2"><b class="cmd">pt::peg::to::json</b> <b class="method">configure</b></a></dt>
<dd><p>This command returns a dictionary containing the current configuration
of the package.</p></dd>
<dt><a name="3"><b class="cmd">pt::peg::to::json</b> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>This command returns the current value of the specified configuration
<i class="arg">option</i> of the package. For the set of legal options, please read
the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">pt::peg::to::json</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></dt>
<dd><p>This command sets the given configuration <i class="arg">option</i>s of the
package, to the specified <i class="arg">value</i>s. For the set of legal options,
please read the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">pt::peg::to::json</b> <b class="method">convert</b> <i class="arg">serial</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, and generates JSON markup
encoding the grammar, per the current package configuration.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Options</a></h2>
<p>The converter to the JSON grammar exchange format recognizes the
following configuration variables and changes its behaviour as they
specify.</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-indented</b> boolean</dt>
<dd><p>If this option is set the system will break the generated JSON across
lines and indent it according to its inner structure, with each key of
a dictionary on a separate line.</p>
<p>If the option is not set (the default), the whole JSON object will be
written on a single line, with minimum spacing between all elements.</p></dd>
<dt><b class="option">-aligned</b> boolean</dt>
<dd><p>If this option is set the system will ensure that the values for the
keys in a dictionary are vertically aligned with each other, for a
nice table effect.
To make this work this also implies that <b class="option">-indented</b> is set.</p>
<p>If the option is not set (the default), the output is formatted as per
the value of <b class="variable">indented</b>, without trying to align the values for
dictionary keys.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">JSON Grammar Exchange Format</a></h2>
<p>The <b class="const">json</b> format for parsing expression grammars was written as
a data exchange format not bound to Tcl. It was defined to allow the
exchange of grammars with PackRat/PEG based parser generators for
other languages.</p>
<p>It is formally specified by the rules below:</p>
<ol class="doctools_enumerated">
<li><p>The JSON of any PEG is a JSON object.</p></li>
<li><p>This object holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a JSON object holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a JSON object whose keys are the names of the nonterminal
symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a JSON object itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is a JSON string holding the Tcl serialization of the
parsing expression describing the symbols sentennial structure, as
specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value is a JSON holding holding one of three values specifying how
a parser should handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is a JSON string holding the Tcl serialization of the start
parsing expression of the grammar, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol>
<p>As an aside to the advanced reader, this is pretty much the same as
the Tcl serialization of PE grammars, as specified in section
<span class="sectref"><a href="#section5">PEG serialization format</a></span>, except that the Tcl dictionaries
and lists of that format are mapped to JSON objects and arrays. Only
the parsing expressions themselves are not translated further, but
kept as JSON strings containing a nested Tcl list, and there is no
concept of canonicity for the JSON either.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>a JSON serialization for it is</p>
<pre class="doctools_example">
{
    &quot;pt::grammar::peg&quot; : {
        &quot;rules&quot; : {
            &quot;AddOp&quot;     : {
                &quot;is&quot;   : &quot;\/ {t -} {t +}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Digit&quot;     : {
                &quot;is&quot;   : &quot;\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Expression&quot; : {
                &quot;is&quot;   : &quot;\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Factor&quot;    : {
                &quot;is&quot;   : &quot;x {n Term} {* {x {n AddOp} {n Term}}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;MulOp&quot;     : {
                &quot;is&quot;   : &quot;\/ {t *} {t \/}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Number&quot;    : {
                &quot;is&quot;   : &quot;x {? {n Sign}} {+ {n Digit}}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Sign&quot;      : {
                &quot;is&quot;   : &quot;\/ {t -} {t +}&quot;,
                &quot;mode&quot; : &quot;value&quot;
            },
            &quot;Term&quot;      : {
                &quot;is&quot;   : &quot;n Number&quot;,
                &quot;mode&quot; : &quot;value&quot;
            }
        },
        &quot;start&quot; : &quot;n Expression&quot;
    }
}
</pre>
<p>and a Tcl serialization of the same is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
<p>The similarity of the latter to the JSON should be quite obvious.</p>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_to_param.html.







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075

<div class='fossil-doc' data-title='pt::peg::to::param - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::param(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::param - PEG Conversion. Write PARAM format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Options</a></li>
<li class="doctools_section"><a href="#section4">PARAM code representation of parsing expression grammars</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::to::param <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">pt::pe</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pt::peg::to::param</b> <b class="method">reset</b></a></li>
<li><a href="#2"><b class="cmd">pt::peg::to::param</b> <b class="method">configure</b></a></li>
<li><a href="#3"><b class="cmd">pt::peg::to::param</b> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#4"><b class="cmd">pt::peg::to::param</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></li>
<li><a href="#5"><b class="cmd">pt::peg::to::param</b> <b class="method">convert</b> <i class="arg">serial</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the converter from parsing expression grammars
to PARAM markup.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools,
and can be used either directly with the other packages of this layer,
or indirectly through the export manager provided by
<b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b>. The latter is intented for use in untrusted
environments and done through the corresponding export plugin
<b class="package">pt::peg::export::param</b> sitting between converter
and export manager.</p>
<p><img alt="arch_core_eplugins" src="../../../../image/arch_core_eplugins.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Converter API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pt::peg::to::param</b> <b class="method">reset</b></a></dt>
<dd><p>This command resets the configuration of the package to its default
settings.</p></dd>
<dt><a name="2"><b class="cmd">pt::peg::to::param</b> <b class="method">configure</b></a></dt>
<dd><p>This command returns a dictionary containing the current configuration
of the package.</p></dd>
<dt><a name="3"><b class="cmd">pt::peg::to::param</b> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>This command returns the current value of the specified configuration
<i class="arg">option</i> of the package. For the set of legal options, please read
the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">pt::peg::to::param</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></dt>
<dd><p>This command sets the given configuration <i class="arg">option</i>s of the
package, to the specified <i class="arg">value</i>s. For the set of legal options,
please read the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">pt::peg::to::param</b> <b class="method">convert</b> <i class="arg">serial</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, and generates PARAM markup
encoding the grammar, per the current package configuration.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Options</a></h2>
<p>The converter to PARAM markup recognizes the following configuration
variables and changes its behaviour as they specify.</p>
<dl class="doctools_options">
<dt><b class="option">-template</b> string</dt>
<dd><p>The value of this configuration variable is a string into which to put
the generated text and the other configuration settings. The various
locations for user-data are expected to be specified with the
placeholders listed below. The default value is &quot;<b class="const">@code@</b>&quot;.</p>
<dl class="doctools_definitions">
<dt><b class="const">@user@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">-user</b>.</p></dd>
<dt><b class="const">@format@</b></dt>
<dd><p>To be replaced with the the constant <b class="const">PARAM</b>.</p></dd>
<dt><b class="const">@file@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">-file</b>.</p></dd>
<dt><b class="const">@name@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">-name</b>.</p></dd>
<dt><b class="const">@code@</b></dt>
<dd><p>To be replaced with the generated text.</p></dd>
</dl></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this configuration variable is the name of the grammar
for which the conversion is run. The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this configuration variable is the name of the user for
which the conversion is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this configuration variable is the name of the file or
other entity from which the grammar came, for which the conversion is
run. The default value is <b class="const">unknown</b>.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PARAM code representation of parsing expression grammars</a></h2>
<p>The PARAM code representation of parsing expression grammars is
assembler-like text using the instructions of the virtual machine
documented in the <i class="term"><a href="pt_param.html">PackRat Machine Specification</a></i>, plus a
few more for control flow (jump ok, jump fail, call symbol, return).</p>
<p>It is not really useful, except possibly as a tool demonstrating how a
grammar is compiled in general, without getting distracted by the
incidentials of a framework, i.e. like the supporting C and Tcl code
generated by the other PARAM-derived formats.</p>
<p>It has no direct formal specification beyond what was said above.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>one possible PARAM serialization for it is</p>
<pre class="doctools_example">
# -*- text -*-
# Parsing Expression Grammar 'TEMPLATE'.
# Generated for unknown, from file 'TEST'
#
# Grammar Start Expression
#
&lt;&lt;MAIN&gt;&gt;:
         call              sym_Expression
         halt
#
# value Symbol 'AddOp'
#
sym_AddOp:
# /
#     '-'
#     '+'
         symbol_restore    AddOp
  found! jump              found_7
         loc_push
         call              choice_5
   fail! value_clear
     ok! value_leaf        AddOp
         symbol_save       AddOp
         error_nonterminal AddOp
         loc_pop_discard
found_7:
     ok! ast_value_push
         return
choice_5:
# /
#     '-'
#     '+'
         error_clear
         loc_push
         error_push
         input_next        &quot;t -&quot;
     ok! test_char         &quot;-&quot;
         error_pop_merge
     ok! jump              oknoast_4
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t +&quot;
     ok! test_char         &quot;+&quot;
         error_pop_merge
     ok! jump              oknoast_4
         loc_pop_rewind
         status_fail
         return
oknoast_4:
         loc_pop_discard
         return
#
# value Symbol 'Digit'
#
sym_Digit:
# /
#     '0'
#     '1'
#     '2'
#     '3'
#     '4'
#     '5'
#     '6'
#     '7'
#     '8'
#     '9'
         symbol_restore    Digit
  found! jump              found_22
         loc_push
         call              choice_20
   fail! value_clear
     ok! value_leaf        Digit
         symbol_save       Digit
         error_nonterminal Digit
         loc_pop_discard
found_22:
     ok! ast_value_push
         return
choice_20:
# /
#     '0'
#     '1'
#     '2'
#     '3'
#     '4'
#     '5'
#     '6'
#     '7'
#     '8'
#     '9'
         error_clear
         loc_push
         error_push
         input_next        &quot;t 0&quot;
     ok! test_char         &quot;0&quot;
         error_pop_merge
     ok! jump              oknoast_19
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t 1&quot;
     ok! test_char         &quot;1&quot;
         error_pop_merge
     ok! jump              oknoast_19
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t 2&quot;
     ok! test_char         &quot;2&quot;
         error_pop_merge
     ok! jump              oknoast_19
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t 3&quot;
     ok! test_char         &quot;3&quot;
         error_pop_merge
     ok! jump              oknoast_19
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t 4&quot;
     ok! test_char         &quot;4&quot;
         error_pop_merge
     ok! jump              oknoast_19
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t 5&quot;
     ok! test_char         &quot;5&quot;
         error_pop_merge
     ok! jump              oknoast_19
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t 6&quot;
     ok! test_char         &quot;6&quot;
         error_pop_merge
     ok! jump              oknoast_19
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t 7&quot;
     ok! test_char         &quot;7&quot;
         error_pop_merge
     ok! jump              oknoast_19
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t 8&quot;
     ok! test_char         &quot;8&quot;
         error_pop_merge
     ok! jump              oknoast_19
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t 9&quot;
     ok! test_char         &quot;9&quot;
         error_pop_merge
     ok! jump              oknoast_19
         loc_pop_rewind
         status_fail
         return
oknoast_19:
         loc_pop_discard
         return
#
# value Symbol 'Expression'
#
sym_Expression:
# /
#     x
#         '\('
#         (Expression)
#         '\)'
#     x
#         (Factor)
#         *
#             x
#                 (MulOp)
#                 (Factor)
         symbol_restore    Expression
  found! jump              found_46
         loc_push
         ast_push
         call              choice_44
   fail! value_clear
     ok! value_reduce      Expression
         symbol_save       Expression
         error_nonterminal Expression
         ast_pop_rewind
         loc_pop_discard
found_46:
     ok! ast_value_push
         return
choice_44:
# /
#     x
#         '\('
#         (Expression)
#         '\)'
#     x
#         (Factor)
#         *
#             x
#                 (MulOp)
#                 (Factor)
         error_clear
         ast_push
         loc_push
         error_push
         call              sequence_27
         error_pop_merge
     ok! jump              ok_43
         ast_pop_rewind
         loc_pop_rewind
         ast_push
         loc_push
         error_push
         call              sequence_40
         error_pop_merge
     ok! jump              ok_43
         ast_pop_rewind
         loc_pop_rewind
         status_fail
         return
ok_43:
         ast_pop_discard
         loc_pop_discard
         return
sequence_27:
# x
#     '\('
#     (Expression)
#     '\)'
         loc_push
         error_clear
         error_push
         input_next        &quot;t (&quot;
     ok! test_char         &quot;(&quot;
         error_pop_merge
   fail! jump              failednoast_29
         ast_push
         error_push
         call              sym_Expression
         error_pop_merge
   fail! jump              failed_28
         error_push
         input_next        &quot;t )&quot;
     ok! test_char         &quot;)&quot;
         error_pop_merge
   fail! jump              failed_28
         ast_pop_discard
         loc_pop_discard
         return
failed_28:
         ast_pop_rewind
failednoast_29:
         loc_pop_rewind
         return
sequence_40:
# x
#     (Factor)
#     *
#         x
#             (MulOp)
#             (Factor)
         ast_push
         loc_push
         error_clear
         error_push
         call              sym_Factor
         error_pop_merge
   fail! jump              failed_41
         error_push
         call              kleene_37
         error_pop_merge
   fail! jump              failed_41
         ast_pop_discard
         loc_pop_discard
         return
failed_41:
         ast_pop_rewind
         loc_pop_rewind
         return
kleene_37:
# *
#     x
#         (MulOp)
#         (Factor)
         loc_push
         error_push
         call              sequence_34
         error_pop_merge
   fail! jump              failed_38
         loc_pop_discard
         jump              kleene_37
failed_38:
         loc_pop_rewind
         status_ok
         return
sequence_34:
# x
#     (MulOp)
#     (Factor)
         ast_push
         loc_push
         error_clear
         error_push
         call              sym_MulOp
         error_pop_merge
   fail! jump              failed_35
         error_push
         call              sym_Factor
         error_pop_merge
   fail! jump              failed_35
         ast_pop_discard
         loc_pop_discard
         return
failed_35:
         ast_pop_rewind
         loc_pop_rewind
         return
#
# value Symbol 'Factor'
#
sym_Factor:
# x
#     (Term)
#     *
#         x
#             (AddOp)
#             (Term)
         symbol_restore    Factor
  found! jump              found_60
         loc_push
         ast_push
         call              sequence_57
   fail! value_clear
     ok! value_reduce      Factor
         symbol_save       Factor
         error_nonterminal Factor
         ast_pop_rewind
         loc_pop_discard
found_60:
     ok! ast_value_push
         return
sequence_57:
# x
#     (Term)
#     *
#         x
#             (AddOp)
#             (Term)
         ast_push
         loc_push
         error_clear
         error_push
         call              sym_Term
         error_pop_merge
   fail! jump              failed_58
         error_push
         call              kleene_54
         error_pop_merge
   fail! jump              failed_58
         ast_pop_discard
         loc_pop_discard
         return
failed_58:
         ast_pop_rewind
         loc_pop_rewind
         return
kleene_54:
# *
#     x
#         (AddOp)
#         (Term)
         loc_push
         error_push
         call              sequence_51
         error_pop_merge
   fail! jump              failed_55
         loc_pop_discard
         jump              kleene_54
failed_55:
         loc_pop_rewind
         status_ok
         return
sequence_51:
# x
#     (AddOp)
#     (Term)
         ast_push
         loc_push
         error_clear
         error_push
         call              sym_AddOp
         error_pop_merge
   fail! jump              failed_52
         error_push
         call              sym_Term
         error_pop_merge
   fail! jump              failed_52
         ast_pop_discard
         loc_pop_discard
         return
failed_52:
         ast_pop_rewind
         loc_pop_rewind
         return
#
# value Symbol 'MulOp'
#
sym_MulOp:
# /
#     '*'
#     '/'
         symbol_restore    MulOp
  found! jump              found_67
         loc_push
         call              choice_65
   fail! value_clear
     ok! value_leaf        MulOp
         symbol_save       MulOp
         error_nonterminal MulOp
         loc_pop_discard
found_67:
     ok! ast_value_push
         return
choice_65:
# /
#     '*'
#     '/'
         error_clear
         loc_push
         error_push
         input_next        &quot;t *&quot;
     ok! test_char         &quot;*&quot;
         error_pop_merge
     ok! jump              oknoast_64
         loc_pop_rewind
         loc_push
         error_push
         input_next        &quot;t /&quot;
     ok! test_char         &quot;/&quot;
         error_pop_merge
     ok! jump              oknoast_64
         loc_pop_rewind
         status_fail
         return
oknoast_64:
         loc_pop_discard
         return
#
# value Symbol 'Number'
#
sym_Number:
# x
#     ?
#         (Sign)
#     +
#         (Digit)
         symbol_restore    Number
  found! jump              found_80
         loc_push
         ast_push
         call              sequence_77
   fail! value_clear
     ok! value_reduce      Number
         symbol_save       Number
         error_nonterminal Number
         ast_pop_rewind
         loc_pop_discard
found_80:
     ok! ast_value_push
         return
sequence_77:
# x
#     ?
#         (Sign)
#     +
#         (Digit)
         ast_push
         loc_push
         error_clear
         error_push
         call              optional_70
         error_pop_merge
   fail! jump              failed_78
         error_push
         call              poskleene_73
         error_pop_merge
   fail! jump              failed_78
         ast_pop_discard
         loc_pop_discard
         return
failed_78:
         ast_pop_rewind
         loc_pop_rewind
         return
optional_70:
# ?
#     (Sign)
         loc_push
         error_push
         call              sym_Sign
         error_pop_merge
   fail! loc_pop_rewind
     ok! loc_pop_discard
         status_ok
         return
poskleene_73:
# +
#     (Digit)
         loc_push
         call              sym_Digit
   fail! jump              failed_74
loop_75:
         loc_pop_discard
         loc_push
         error_push
         call              sym_Digit
         error_pop_merge
     ok! jump              loop_75
         status_ok
failed_74:
         loc_pop_rewind
         return
#
# value Symbol 'Sign'
#
sym_Sign:
# /
#     '-'
#     '+'
         symbol_restore    Sign
  found! jump              found_86
         loc_push
         call              choice_5
   fail! value_clear
     ok! value_leaf        Sign
         symbol_save       Sign
         error_nonterminal Sign
         loc_pop_discard
found_86:
     ok! ast_value_push
         return
#
# value Symbol 'Term'
#
sym_Term:
# (Number)
         symbol_restore    Term
  found! jump              found_89
         loc_push
         ast_push
         call              sym_Number
   fail! value_clear
     ok! value_reduce      Term
         symbol_save       Term
         error_nonterminal Term
         ast_pop_rewind
         loc_pop_discard
found_89:
     ok! ast_value_push
         return
#
#
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key518">PARAM</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_to_peg.html.













































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598

<div class='fossil-doc' data-title='pt::peg::to::peg - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::peg(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::peg - PEG Conversion. Write PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Options</a></li>
<li class="doctools_section"><a href="#section4">PEG Specification Language</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::to::peg <span class="opt">?1.0.2?</span></b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">pt::pe</b></li>
<li>package require <b class="pkgname">text::write</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pt::peg::to::peg</b> <b class="method">reset</b></a></li>
<li><a href="#2"><b class="cmd">pt::peg::to::peg</b> <b class="method">configure</b></a></li>
<li><a href="#3"><b class="cmd">pt::peg::to::peg</b> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#4"><b class="cmd">pt::peg::to::peg</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></li>
<li><a href="#5"><b class="cmd">pt::peg::to::peg</b> <b class="method">convert</b> <i class="arg">serial</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the converter from parsing expression grammars
to PEG markup.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools,
and can be used either directly with the other packages of this layer,
or indirectly through the export manager provided by
<b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b>. The latter is intented for use in untrusted
environments and done through the corresponding export plugin
<b class="package"><a href="pt_peg_export_peg.html">pt::peg::export::peg</a></b> sitting between converter
and export manager.</p>
<p><img alt="arch_core_eplugins" src="../../../../image/arch_core_eplugins.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Converter API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pt::peg::to::peg</b> <b class="method">reset</b></a></dt>
<dd><p>This command resets the configuration of the package to its default
settings.</p></dd>
<dt><a name="2"><b class="cmd">pt::peg::to::peg</b> <b class="method">configure</b></a></dt>
<dd><p>This command returns a dictionary containing the current configuration
of the package.</p></dd>
<dt><a name="3"><b class="cmd">pt::peg::to::peg</b> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>This command returns the current value of the specified configuration
<i class="arg">option</i> of the package. For the set of legal options, please read
the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">pt::peg::to::peg</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></dt>
<dd><p>This command sets the given configuration <i class="arg">option</i>s of the
package, to the specified <i class="arg">value</i>s. For the set of legal options,
please read the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">pt::peg::to::peg</b> <b class="method">convert</b> <i class="arg">serial</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, and generates PEG markup
encoding the grammar, per the current package configuration.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Options</a></h2>
<p>The converter to the PEG language recognizes the following options and
changes its behaviour as they specify.</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-template</b> string</dt>
<dd><p>The value of this option is a string into which to put the generated
text and the values of the other options. The various locations for
user-data are expected to be specified with the placeholders listed
below. The default value is &quot;<b class="const">@code@</b>&quot;.</p>
<dl class="doctools_definitions">
<dt><b class="const">@user@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-user</b>.</p></dd>
<dt><b class="const">@format@</b></dt>
<dd><p>To be replaced with the the constant <b class="const">PEG</b>.</p></dd>
<dt><b class="const">@file@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-file</b>.</p></dd>
<dt><b class="const">@name@</b></dt>
<dd><p>To be replaced with the value of the option <b class="option">-name</b>.</p></dd>
<dt><b class="const">@code@</b></dt>
<dd><p>To be replaced with the generated text.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PEG Specification Language</a></h2>
<p><b class="const">peg</b>, a language for the specification of parsing expression
grammars is meant to be human readable, and writable as well, yet
strict enough to allow its processing by machine. Like any computer
language. It was defined to make writing the specification of a
grammar easy, something the other formats found in the Parser Tools do
not lend themselves too.</p>
<p>It is formally specified by the grammar shown below, written in
itself. For a tutorial / introduction to the language please go and
read the <i class="term"><a href="pt_peg_language.html">PEG Language Tutorial</a></i>.</p>
<pre class="doctools_example">
PEG pe-grammar-for-peg (Grammar)
	# --------------------------------------------------------------------
        # Syntactical constructs
        Grammar         &lt;- WHITESPACE Header Definition* Final EOF ;
        Header          &lt;- PEG Identifier StartExpr ;
        Definition      &lt;- Attribute? Identifier IS Expression SEMICOLON ;
        Attribute       &lt;- (VOID / LEAF) COLON ;
        Expression      &lt;- Sequence (SLASH Sequence)* ;
        Sequence        &lt;- Prefix+ ;
        Prefix          &lt;- (AND / NOT)? Suffix ;
        Suffix          &lt;- Primary (QUESTION / STAR / PLUS)? ;
        Primary         &lt;- ALNUM / ALPHA / ASCII / CONTROL / DDIGIT / DIGIT
                        /  GRAPH / LOWER / PRINTABLE / PUNCT / SPACE / UPPER
                        /  WORDCHAR / XDIGIT
                        / Identifier
                        /  OPEN Expression CLOSE
                        /  Literal
                        /  Class
                        /  DOT
                        ;
        Literal         &lt;- APOSTROPH  (!APOSTROPH  Char)* APOSTROPH  WHITESPACE
                        /  DAPOSTROPH (!DAPOSTROPH Char)* DAPOSTROPH WHITESPACE ;
        Class           &lt;- OPENB (!CLOSEB Range)* CLOSEB WHITESPACE ;
        Range           &lt;- Char TO Char / Char ;
        StartExpr       &lt;- OPEN Expression CLOSE ;
void:   Final           &lt;- &quot;END&quot; WHITESPACE SEMICOLON WHITESPACE ;
        # --------------------------------------------------------------------
        # Lexing constructs
        Identifier      &lt;- Ident WHITESPACE ;
leaf:   Ident           &lt;- ([_:] / &lt;alpha&gt;) ([_:] / &lt;alnum&gt;)* ;
        Char            &lt;- CharSpecial / CharOctalFull / CharOctalPart
                        /  CharUnicode / CharUnescaped
                        ;
leaf:   CharSpecial     &lt;- &quot;\\&quot; [nrt'&quot;\[\]\\] ;
leaf:   CharOctalFull   &lt;- &quot;\\&quot; [0-2][0-7][0-7] ;
leaf:   CharOctalPart   &lt;- &quot;\\&quot; [0-7][0-7]? ;
leaf:   CharUnicode     &lt;- &quot;\\&quot; 'u' HexDigit (HexDigit (HexDigit HexDigit?)?)? ;
leaf:   CharUnescaped   &lt;- !&quot;\\&quot; . ;
void:   HexDigit        &lt;- [0-9a-fA-F] ;
void:   TO              &lt;- '-'           ;
void:   OPENB           &lt;- &quot;[&quot;           ;
void:   CLOSEB          &lt;- &quot;]&quot;           ;
void:   APOSTROPH       &lt;- &quot;'&quot;           ;
void:   DAPOSTROPH      &lt;- '&quot;'           ;
void:   PEG             &lt;- &quot;PEG&quot; !([_:] / &lt;alnum&gt;) WHITESPACE ;
void:   IS              &lt;- &quot;&lt;-&quot;    WHITESPACE ;
leaf:   VOID            &lt;- &quot;void&quot;  WHITESPACE ; # Implies that definition has no semantic value.
leaf:   LEAF            &lt;- &quot;leaf&quot;  WHITESPACE ; # Implies that definition has no terminals.
void:   SEMICOLON       &lt;- &quot;;&quot;     WHITESPACE ;
void:   COLON           &lt;- &quot;:&quot;     WHITESPACE ;
void:   SLASH           &lt;- &quot;/&quot;     WHITESPACE ;
leaf:   AND             &lt;- &quot;&amp;&quot;     WHITESPACE ;
leaf:   NOT             &lt;- &quot;!&quot;     WHITESPACE ;
leaf:   QUESTION        &lt;- &quot;?&quot;     WHITESPACE ;
leaf:   STAR            &lt;- &quot;*&quot;     WHITESPACE ;
leaf:   PLUS            &lt;- &quot;+&quot;     WHITESPACE ;
void:   OPEN            &lt;- &quot;(&quot;     WHITESPACE ;
void:   CLOSE           &lt;- &quot;)&quot;     WHITESPACE ;
leaf:   DOT             &lt;- &quot;.&quot;     WHITESPACE ;
leaf:   ALNUM           &lt;- &quot;&lt;alnum&gt;&quot;    WHITESPACE ;
leaf:   ALPHA           &lt;- &quot;&lt;alpha&gt;&quot;    WHITESPACE ;
leaf:   ASCII           &lt;- &quot;&lt;ascii&gt;&quot;    WHITESPACE ;
leaf:   CONTROL         &lt;- &quot;&lt;control&gt;&quot;  WHITESPACE ;
leaf:   DDIGIT          &lt;- &quot;&lt;ddigit&gt;&quot;   WHITESPACE ;
leaf:   DIGIT           &lt;- &quot;&lt;digit&gt;&quot;    WHITESPACE ;
leaf:   GRAPH           &lt;- &quot;&lt;graph&gt;&quot;    WHITESPACE ;
leaf:   LOWER           &lt;- &quot;&lt;lower&gt;&quot;    WHITESPACE ;
leaf:   PRINTABLE       &lt;- &quot;&lt;print&gt;&quot;    WHITESPACE ;
leaf:   PUNCT           &lt;- &quot;&lt;punct&gt;&quot;    WHITESPACE ;
leaf:   SPACE           &lt;- &quot;&lt;space&gt;&quot;    WHITESPACE ;
leaf:   UPPER           &lt;- &quot;&lt;upper&gt;&quot;    WHITESPACE ;
leaf:   WORDCHAR        &lt;- &quot;&lt;wordchar&gt;&quot; WHITESPACE ;
leaf:   XDIGIT          &lt;- &quot;&lt;xdigit&gt;&quot;   WHITESPACE ;
void:   WHITESPACE      &lt;- (&quot; &quot; / &quot;\t&quot; / EOL / COMMENT)* ;
void:   COMMENT         &lt;- '#' (!EOL .)* EOL ;
void:   EOL             &lt;- &quot;\n\r&quot; / &quot;\n&quot; / &quot;\r&quot; ;
void:   EOF             &lt;- !. ;
        # --------------------------------------------------------------------
END;
</pre>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Our example specifies the grammar for a basic 4-operation calculator.</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>Using higher-level features of the notation, i.e. the character
classes (predefined and custom), this example can be rewritten as</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Sign       &lt;- [-+] 						;
    Number     &lt;- Sign? &lt;ddigit&gt;+				;
    Expression &lt;- '(' Expression ')' / (Factor (MulOp Factor)*)	;
    MulOp      &lt;- [*/]						;
    Factor     &lt;- Term (AddOp Term)*				;
    AddOp      &lt;- [-+]						;
    Term       &lt;- Number					;
END;
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_peg_to_tclparam.html.



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561

<div class='fossil-doc' data-title='pt::peg::to::tclparam - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::tclparam(n) 1.0.3 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::tclparam - PEG Conversion. Write TCLPARAM format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Options</a></li>
<li class="doctools_section"><a href="#section4">Tcl/PARAM code representation of parsing expression grammars</a></li>
<li class="doctools_section"><a href="#section5">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::to::tclparam <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">pt::peg::to::tclparam</b> <b class="method">reset</b></a></li>
<li><a href="#2"><b class="cmd">pt::peg::to::tclparam</b> <b class="method">configure</b></a></li>
<li><a href="#3"><b class="cmd">pt::peg::to::tclparam</b> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#4"><b class="cmd">pt::peg::to::tclparam</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></li>
<li><a href="#5"><b class="cmd">pt::peg::to::tclparam</b> <b class="method">convert</b> <i class="arg">serial</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package implements the converter from parsing expression grammars
to TCLPARAM markup.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools,
and can be used either directly with the other packages of this layer,
or indirectly through the export manager provided by
<b class="package"><a href="pt_peg_export.html">pt::peg::export</a></b>. The latter is intented for use in untrusted
environments and done through the corresponding export plugin
<b class="package">pt::peg::export::tclparam</b> sitting between converter
and export manager.</p>
<p><img alt="arch_core_eplugins" src="../../../../image/arch_core_eplugins.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Converter API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pt::peg::to::tclparam</b> <b class="method">reset</b></a></dt>
<dd><p>This command resets the configuration of the package to its default
settings.</p></dd>
<dt><a name="2"><b class="cmd">pt::peg::to::tclparam</b> <b class="method">configure</b></a></dt>
<dd><p>This command returns a dictionary containing the current configuration
of the package.</p></dd>
<dt><a name="3"><b class="cmd">pt::peg::to::tclparam</b> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>This command returns the current value of the specified configuration
<i class="arg">option</i> of the package. For the set of legal options, please read
the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">pt::peg::to::tclparam</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></dt>
<dd><p>This command sets the given configuration <i class="arg">option</i>s of the
package, to the specified <i class="arg">value</i>s. For the set of legal options,
please read the section <span class="sectref"><a href="#section3">Options</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">pt::peg::to::tclparam</b> <b class="method">convert</b> <i class="arg">serial</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, and generates TCLPARAM markup
encoding the grammar, per the current package configuration.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Options</a></h2>
<p>The converter to Tcl/PARAM markup recognizes the following
configuration variables and changes its behaviour as they specify.</p>
<dl class="doctools_options">
<dt><b class="option">-template</b> string</dt>
<dd><p>The value of this configuration variable is a string into which to put
the generated text and the other configuration settings. The various
locations for user-data are expected to be specified with the
placeholders listed below. The default value is &quot;<b class="const">@code@</b>&quot;.</p>
<dl class="doctools_definitions">
<dt><b class="const">@user@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">-user</b>.</p></dd>
<dt><b class="const">@format@</b></dt>
<dd><p>To be replaced with the the constant <b class="const">Tcl/PARAM</b>.</p></dd>
<dt><b class="const">@file@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">-file</b>.</p></dd>
<dt><b class="const">@name@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">-name</b>.</p></dd>
<dt><b class="const">@code@</b></dt>
<dd><p>To be replaced with the generated Tcl code.</p></dd>
</dl>
<p>The following configuration variables are special, in that they will
occur within the generated code, and are replaced there as well.</p>
<dl class="doctools_definitions">
<dt><b class="const">@runtime@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">runtime-command</b>.</p></dd>
<dt><b class="const">@self@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">self-command</b>.</p></dd>
<dt><b class="const">@def@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">proc-command</b>.</p></dd>
<dt><b class="const">@ns@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">namespace</b>.</p></dd>
<dt><b class="const">@main@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">main</b>.</p></dd>
<dt><b class="const">@prelude@</b></dt>
<dd><p>To be replaced with the value of the configuration variable <b class="option">prelude</b>.</p></dd>
</dl></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this configuration variable is the name of the grammar
for which the conversion is run. The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this configuration variable is the name of the user for
which the conversion is run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this configuration variable is the name of the file or
other entity from which the grammar came, for which the conversion is
run. The default value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-runtime-command</b> string</dt>
<dd><p>A Tcl string representing the Tcl command or reference to it used to
call PARAM instruction from parser procedures, per the chosen
framework (template).
The default value is the empty string.</p></dd>
<dt><b class="option">-self-command</b> string</dt>
<dd><p>A Tcl string representing the Tcl command or reference to it used to
call the parser procedures (methods ...) from another parser
procedure, per the chosen framework (template).
The default value is the empty string.</p></dd>
<dt><b class="option">-proc-command</b> string</dt>
<dd><p>The name of the Tcl command used to define procedures (methods ...),
per the chosen framework (template).
The default value is <b class="const">proc</b>.</p></dd>
<dt><b class="option">-namespace</b> string</dt>
<dd><p>The name of the namespace the parser procedures (methods, ...) shall
reside in, including the trailing '::' needed to separate it from the
actual procedure name.
The default value is <b class="const">::</b>.</p></dd>
<dt><b class="option">-main</b> string</dt>
<dd><p>The name of the main procedure (method, ...) to be called by the
chosen framework (template) to start parsing input.
The default value is <b class="const">__main</b>.</p></dd>
<dt><b class="option">-prelude</b> string</dt>
<dd><p>A snippet of code to be insert at the head of each generated parsing
command.
The default value is the empty string.</p></dd>
<dt><b class="option">-indent</b> integer</dt>
<dd><p>The number of characters to indent each line of the generated code by.
The default value is <b class="const">0</b>.</p></dd>
</dl>
<p>While the high parameterizability of this converter, as shown by the
multitude of options it supports, is an advantage to the advanced
user, allowing her to customize the output of the converter as needed,
a novice user will likely not see the forest for the trees.</p>
<p>To help these latter users two adjunct packages are provided, each
containing a canned configuration which will generate immediately
useful full parsers. These are</p>
<dl class="doctools_definitions">
<dt><b class="package"><a href="pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></b></dt>
<dd><p>Generated parsers are classes based on the <b class="package"><a href="../snit/snit.html">snit</a></b> package,
i.e. snit::type's.</p></dd>
<dt><b class="package"><a href="pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></b></dt>
<dd><p>Generated parsers are classes based on the <b class="package">OO</b> package.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Tcl/PARAM code representation of parsing expression grammars</a></h2>
<p>The Tcl/PARAM representation of parsing expression grammars is Tcl
code whose execution will parse input per the grammar. The code is
based on the virtual machine documented in the
<i class="term"><a href="pt_param.html">PackRat Machine Specification</a></i>, using its instructions
and a few more to handle control flow.</p>
<p>Note that the generated code by itself is not functional. It expects
to be embedded into a framework which provides services like the PARAM
state, implementations for the PARAM instructions, etc.
The bulk of such a framework has to be specified through the option
<b class="option">-template</b>. The additional options</p>
<dl class="doctools_options">
<dt><b class="option">-indent</b> integer</dt>
<dd></dd>
<dt><b class="option">-main</b> string</dt>
<dd></dd>
<dt><b class="option">-namespace</b> string</dt>
<dd></dd>
<dt><b class="option">-prelude</b> string</dt>
<dd></dd>
<dt><b class="option">-proc-command</b> string</dt>
<dd></dd>
<dt><b class="option">-runtime-command</b> string</dt>
<dd></dd>
<dt><b class="option">-self-command</b> string</dt>
<dd></dd>
</dl>
<p>provide code snippets which help to glue framework and generated code
together. Their placeholders are in the <em>generated</em> code.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section6">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key108">TCLPARAM</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_pegrammar.html.























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475

<div class='fossil-doc' data-title='pt::peg - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg - Parsing Expression Grammar Serialization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::pe</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::peg</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::pt::peg</b> <b class="method">verify-as-canonical</b> <i class="arg">serial</i></a></li>
<li><a href="#3"><b class="cmd">::pt::peg</b> <b class="method">canonicalize</b> <i class="arg">serial</i></a></li>
<li><a href="#4"><b class="cmd">::pt::peg</b> <b class="method">print</b> <i class="arg">serial</i></a></li>
<li><a href="#5"><b class="cmd">::pt::peg</b> <b class="method">merge</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></li>
<li><a href="#6"><b class="cmd">::pt::peg</b> <b class="method">equal</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides commands to work with the serializations of
parsing expression grammars as managed by the Parser Tools, and
specified in section <span class="sectref"><a href="#section3">PEG serialization format</a></span>.</p>
<p>This is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::peg</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
serialization of a parsing expression and will throw an error if that
is not the case. The result of the command is the empty string.</p>
<p>If the argument <i class="arg">canonvar</i> is specified it is interpreted as the
name of a variable in the calling context. This variable will be
written to if and only if <i class="arg">serial</i> is a valid regular
serialization. Its value will be a boolean, with <b class="const">True</b>
indicating that the serialization is not only valid, but also
<i class="term">canonical</i>. <b class="const">False</b> will be written for a valid, but
non-canonical serialization.</p>
<p>For the specification of serializations see the section
<span class="sectref"><a href="#section4">PE serialization format</a></span>.</p></dd>
<dt><a name="2"><b class="cmd">::pt::peg</b> <b class="method">verify-as-canonical</b> <i class="arg">serial</i></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">canonical</i> serialization of a PEG and will throw an error if
that is not the case. The result of the command is the empty string.</p>
<p>For the specification of canonical serializations see the section
<span class="sectref"><a href="#section3">PEG serialization format</a></span>.</p></dd>
<dt><a name="3"><b class="cmd">::pt::peg</b> <b class="method">canonicalize</b> <i class="arg">serial</i></a></dt>
<dd><p>This command assumes that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of a PEG and will throw an error if that
is not the case.</p>
<p>It will then convert the input into the <i class="term">canonical</i> serialization
of the contained PEG and return it as its result. If the input is
already canonical it will be returned unchanged.</p>
<p>For the specification of regular and canonical serializations see the
section <span class="sectref"><a href="#section3">PEG serialization format</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::pt::peg</b> <b class="method">print</b> <i class="arg">serial</i></a></dt>
<dd><p>This command assumes that the argument <i class="arg">serial</i> contains a valid
serialization of a parsing expression and returns a string containing
that PE in a human readable form.</p>
<p>The exact format of this form is not specified and cannot be relied on
for parsing or other machine-based activities.</p>
<p>For the specification of serializations see the section
<span class="sectref"><a href="#section3">PEG serialization format</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::pt::peg</b> <b class="method">merge</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></dt>
<dd><p>This command accepts the regular serializations of two grammars and
uses them to create their union.  The result of the command is the
canonical serialization of this unified grammar.</p>
<p>A merge errors occurs if for any nonterminal symbol S occuring in both
input grammars the two input grammars specify different semantic
modes.</p>
<p>The semantic mode of each nonterminal symbol S is the semantic mode of
S in any of its input grammars. The previous rule made sure that for
symbols occuring in both grammars these values are identical.</p>
<p>The right-hand side of each nonterminal symbol S occuring in both
input grammars is the choice between the right-hand sides of S in the
input grammars, with the parsing expression of S in <i class="arg">seriala</i>
coming first, except if both expressions are identical. In that case
the first expression is taken.</p>
<p>The right-hand side of each nonterminal symbol S occuring in only one
of the input grammars is the right-hand side of S in its input
grammar.</p>
<p>The start expression of the unified grammar is the choice between the
start expressions of the input grammars, with the start expression of
<i class="arg">seriala</i> coming first, except if both expressions are identical.
In that case the first expression is taken</p></dd>
<dt><a name="6"><b class="cmd">::pt::peg</b> <b class="method">equal</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></dt>
<dd><p>This command tests the two grammars <i class="arg">seriala</i> and <i class="arg">serialb</i>
for structural equality. The result of the command is a boolean
value. It will be set to <b class="const">true</b> if the expressions are
identical, and <b class="const">false</b> otherwise.</p>
<p>String equality is usable only if we can assume that the two grammars
are pure Tcl lists and dictionaries.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section4">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section4">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_pexpr_op.html.





































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338

<div class='fossil-doc' data-title='pt::pe::op - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pe::op(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pe::op - Parsing Expression Utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::pe::op <span class="opt">?1.0.1?</span></b></li>
<li>package require <b class="pkgname">pt::pe <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">struct::set</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::pe::op</b> <b class="method">drop</b> <i class="arg">dropset</i> <i class="arg">pe</i></a></li>
<li><a href="#2"><b class="cmd">::pt::pe::op</b> <b class="method">rename</b> <i class="arg">nt</i> <i class="arg">ntnew</i> <i class="arg">pe</i></a></li>
<li><a href="#3"><b class="cmd">::pt::pe::op</b> <b class="method">called</b> <i class="arg">pe</i></a></li>
<li><a href="#4"><b class="cmd">::pt::pe::op</b> <b class="method">flatten</b> <i class="arg">pe</i></a></li>
<li><a href="#5"><b class="cmd">::pt::pe::op</b> <b class="method">fusechars</b> <i class="arg">pe</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides additional commands to work with the
serializations of parsing expressions as managed by the PEG and
related packages, and specified in section
<span class="sectref"><a href="#section3">PE serialization format</a></span>.</p>
<p>This is an internal package, for use by the higher level packages
handling PEGs, their conversion into and out of various other formats,
or other uses.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::pe::op</b> <b class="method">drop</b> <i class="arg">dropset</i> <i class="arg">pe</i></a></dt>
<dd><p>This command removes all occurences of any of the nonterminals symbols
in the set <i class="arg">dropset</i> from the parsing expression <i class="arg">pe</i>, and
simplifies it. This may result in the expression becoming &quot;epsilon&quot;,
i.e. matching nothing.</p></dd>
<dt><a name="2"><b class="cmd">::pt::pe::op</b> <b class="method">rename</b> <i class="arg">nt</i> <i class="arg">ntnew</i> <i class="arg">pe</i></a></dt>
<dd><p>This command renames all occurences of the nonterminal <i class="arg">nt</i> in the
parsing expression <i class="arg">pe</i> into <i class="arg">ntnew</i>.</p></dd>
<dt><a name="3"><b class="cmd">::pt::pe::op</b> <b class="method">called</b> <i class="arg">pe</i></a></dt>
<dd><p>This command extracts the set of all nonterminal symbols used,
i.e. 'called', in the parsing expression <i class="arg">pe</i>.</p></dd>
<dt><a name="4"><b class="cmd">::pt::pe::op</b> <b class="method">flatten</b> <i class="arg">pe</i></a></dt>
<dd><p>This command transforms the parsing expression by eliminating
sequences nested in sequences, and choices in choices, lifting the
children of the nested expression into the parent. It further
eliminates all sequences and choices with only one child, as these are
redundant.</p>
<p>The resulting parsing expression is returned as the result of the
command.</p></dd>
<dt><a name="5"><b class="cmd">::pt::pe::op</b> <b class="method">fusechars</b> <i class="arg">pe</i></a></dt>
<dd><p>This command transforms the parsing expression by fusing adjacent
terminals in sequences and adjacent terminals and ranges in choices,
it (re)constructs highlevel <i class="term">strings</i> and
<i class="term">character classes</i>.</p>
<p>The resulting pseudo-parsing expression is returned as the result of
the command and may contain the pseudo-operators <b class="const">str</b> for
character sequences, aka strings, and <b class="const">cl</b> for character
choices, aka character classes.</p>
<p>The result is called a <i class="term">pseudo-parsing expression</i> because it
is not a true parsing expression anymore, and will fail a check with
<b class="cmd">::pt::peg verify</b> if the new pseudo-operators
are present in the result, but is otherwise of sound structure for a
parsing expression.
Notably, the commands <b class="cmd">::pt::peg bottomup</b> and
<b class="cmd">::pt::peg topdown</b> will process them without
trouble.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_pexpression.html.

































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464

<div class='fossil-doc' data-title='pt::pe - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pe(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pe - Parsing Expression Serialization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::pe <span class="opt">?1.0.1?</span></b></li>
<li>package require <b class="pkgname">char</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::pe</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::pt::pe</b> <b class="method">verify-as-canonical</b> <i class="arg">serial</i></a></li>
<li><a href="#3"><b class="cmd">::pt::pe</b> <b class="method">canonicalize</b> <i class="arg">serial</i></a></li>
<li><a href="#4"><b class="cmd">::pt::pe</b> <b class="method">print</b> <i class="arg">serial</i></a></li>
<li><a href="#5"><b class="cmd">::pt::pe</b> <b class="method">bottomup</b> <i class="arg">cmdprefix</i> <i class="arg">pe</i></a></li>
<li><a href="#6"><b class="cmd">cmdprefix</b> <i class="arg">pe</i> <i class="arg">op</i> <i class="arg">arguments</i></a></li>
<li><a href="#7"><b class="cmd">::pt::pe</b> <b class="method">topdown</b> <i class="arg">cmdprefix</i> <i class="arg">pe</i></a></li>
<li><a href="#8"><b class="cmd">::pt::pe</b> <b class="method">equal</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></li>
<li><a href="#9"><b class="cmd">::pt::pe</b> <b class="method">epsilon</b></a></li>
<li><a href="#10"><b class="cmd">::pt::pe</b> <b class="method">dot</b></a></li>
<li><a href="#11"><b class="cmd">::pt::pe</b> <b class="method">alnum</b></a></li>
<li><a href="#12"><b class="cmd">::pt::pe</b> <b class="method">alpha</b></a></li>
<li><a href="#13"><b class="cmd">::pt::pe</b> <b class="method">ascii</b></a></li>
<li><a href="#14"><b class="cmd">::pt::pe</b> <b class="method">control</b></a></li>
<li><a href="#15"><b class="cmd">::pt::pe</b> <b class="method">digit</b></a></li>
<li><a href="#16"><b class="cmd">::pt::pe</b> <b class="method">graph</b></a></li>
<li><a href="#17"><b class="cmd">::pt::pe</b> <b class="method">lower</b></a></li>
<li><a href="#18"><b class="cmd">::pt::pe</b> <b class="method">print</b></a></li>
<li><a href="#19"><b class="cmd">::pt::pe</b> <b class="method">punct</b></a></li>
<li><a href="#20"><b class="cmd">::pt::pe</b> <b class="method">space</b></a></li>
<li><a href="#21"><b class="cmd">::pt::pe</b> <b class="method">upper</b></a></li>
<li><a href="#22"><b class="cmd">::pt::pe</b> <b class="method">wordchar</b></a></li>
<li><a href="#23"><b class="cmd">::pt::pe</b> <b class="method">xdigit</b></a></li>
<li><a href="#24"><b class="cmd">::pt::pe</b> <b class="method">ddigit</b></a></li>
<li><a href="#25"><b class="cmd">::pt::pe</b> <b class="method">terminal</b> <i class="arg">t</i></a></li>
<li><a href="#26"><b class="cmd">::pt::pe</b> <b class="method">range</b> <i class="arg">ta</i> <i class="arg">tb</i></a></li>
<li><a href="#27"><b class="cmd">::pt::pe</b> <b class="method">nonterminal</b> <i class="arg">nt</i></a></li>
<li><a href="#28"><b class="cmd">::pt::pe</b> <b class="method">choice</b> <i class="arg">pe</i>...</a></li>
<li><a href="#29"><b class="cmd">::pt::pe</b> <b class="method">sequence</b> <i class="arg">pe</i>...</a></li>
<li><a href="#30"><b class="cmd">::pt::pe</b> <b class="method">repeat0</b> <i class="arg">pe</i></a></li>
<li><a href="#31"><b class="cmd">::pt::pe</b> <b class="method">repeat1</b> <i class="arg">pe</i></a></li>
<li><a href="#32"><b class="cmd">::pt::pe</b> <b class="method">optional</b> <i class="arg">pe</i></a></li>
<li><a href="#33"><b class="cmd">::pt::pe</b> <b class="method">ahead</b> <i class="arg">pe</i></a></li>
<li><a href="#34"><b class="cmd">::pt::pe</b> <b class="method">notahead</b> <i class="arg">pe</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides commands to work with the serializations of
parsing expressions as managed by the Parser Tools, and specified in
section <span class="sectref"><a href="#section3">PE serialization format</a></span>.</p>
<p>This is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::pe</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
serialization of a parsing expression and will throw an error if that
is not the case. The result of the command is the empty string.</p>
<p>If the argument <i class="arg">canonvar</i> is specified it is interpreted as the
name of a variable in the calling context. This variable will be
written to if and only if <i class="arg">serial</i> is a valid regular
serialization. Its value will be a boolean, with <b class="const">True</b>
indicating that the serialization is not only valid, but also
<i class="term">canonical</i>. <b class="const">False</b> will be written for a valid, but
non-canonical serialization.</p>
<p>For the specification of serializations see the section
<span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
<dt><a name="2"><b class="cmd">::pt::pe</b> <b class="method">verify-as-canonical</b> <i class="arg">serial</i></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">canonical</i> serialization of a parsing expression and will throw
an error if that is not the case. The result of the command is the
empty string.</p>
<p>For the specification of canonical serializations see the section
<span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
<dt><a name="3"><b class="cmd">::pt::pe</b> <b class="method">canonicalize</b> <i class="arg">serial</i></a></dt>
<dd><p>This command assumes that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of a parsing expression and will throw an
error if that is not the case.</p>
<p>It will then convert the input into the <i class="term">canonical</i> serialization
of this parsing expression and return it as its result. If the input
is already canonical it will be returned unchanged.</p>
<p>For the specification of regular and canonical serializations see the
section <span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::pt::pe</b> <b class="method">print</b> <i class="arg">serial</i></a></dt>
<dd><p>This command assumes that the argument <i class="arg">serial</i> contains a valid
serialization of a parsing expression and returns a string containing
that PE in a human readable form.</p>
<p>The exact format of this form is not specified and cannot be relied on
for parsing or other machine-based activities.</p>
<p>For the specification of serializations see the section
<span class="sectref"><a href="#section3">PE serialization format</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::pt::pe</b> <b class="method">bottomup</b> <i class="arg">cmdprefix</i> <i class="arg">pe</i></a></dt>
<dd><p>This command walks the parsing expression <i class="arg">pe</i> from the bottom up
to the root, invoking the command prefix <i class="arg">cmdprefix</i> for each
partial expression. This implies that the children of a parsing
expression PE are handled before PE.</p>
<p>The command prefix has the signature</p>
<dl class="doctools_definitions">
<dt><a name="6"><b class="cmd">cmdprefix</b> <i class="arg">pe</i> <i class="arg">op</i> <i class="arg">arguments</i></a></dt>
<dd><p>I.e. it is invoked with the parsing expression <i class="arg">pe</i> the walk is
currently at, the <i class="arg">op</i>'erator in the <i class="arg">pe</i>, and the operator's
<i class="arg">arguments</i>.</p>
<p>The result returned by the command prefix replaces <i class="arg">pe</i> in the
parsing expression it was a child of, allowing transformations of the
expression tree.</p>
<p>This also means that for all inner parsing expressions the contents of
<i class="arg">arguments</i> are the results of the command prefix invoked for the
children of this inner parsing expression.</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::pt::pe</b> <b class="method">topdown</b> <i class="arg">cmdprefix</i> <i class="arg">pe</i></a></dt>
<dd><p>This command walks the parsing expression <i class="arg">pe</i> from the root down
to the leaves, invoking the command prefix <i class="arg">cmdprefix</i> for each
partial expression. This implies that the children of a parsing
expression PE are handled after PE.</p>
<p>The command prefix has the same signature as for <b class="method">bottomup</b>,
see above.</p>
<p>The result returned by the command prefix is <em>ignored</em>.</p></dd>
<dt><a name="8"><b class="cmd">::pt::pe</b> <b class="method">equal</b> <i class="arg">seriala</i> <i class="arg">serialb</i></a></dt>
<dd><p>This command tests the two parsing expressions <i class="arg">seriala</i> and
<i class="arg">serialb</i> for structural equality. The result of the command is a
boolean value. It will be set to <b class="const">true</b> if the expressions are
identical, and <b class="const">false</b> otherwise.</p>
<p>String equality is usable only if we can assume that the two parsing
expressions are pure Tcl lists.</p></dd>
<dt><a name="9"><b class="cmd">::pt::pe</b> <b class="method">epsilon</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for epsilon.</p></dd>
<dt><a name="10"><b class="cmd">::pt::pe</b> <b class="method">dot</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for dot.</p></dd>
<dt><a name="11"><b class="cmd">::pt::pe</b> <b class="method">alnum</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for alnum.</p></dd>
<dt><a name="12"><b class="cmd">::pt::pe</b> <b class="method">alpha</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for alpha.</p></dd>
<dt><a name="13"><b class="cmd">::pt::pe</b> <b class="method">ascii</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for ascii.</p></dd>
<dt><a name="14"><b class="cmd">::pt::pe</b> <b class="method">control</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for control.</p></dd>
<dt><a name="15"><b class="cmd">::pt::pe</b> <b class="method">digit</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for digit.</p></dd>
<dt><a name="16"><b class="cmd">::pt::pe</b> <b class="method">graph</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for graph.</p></dd>
<dt><a name="17"><b class="cmd">::pt::pe</b> <b class="method">lower</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for lower.</p></dd>
<dt><a name="18"><b class="cmd">::pt::pe</b> <b class="method">print</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for print.</p></dd>
<dt><a name="19"><b class="cmd">::pt::pe</b> <b class="method">punct</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for punct.</p></dd>
<dt><a name="20"><b class="cmd">::pt::pe</b> <b class="method">space</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for space.</p></dd>
<dt><a name="21"><b class="cmd">::pt::pe</b> <b class="method">upper</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for upper.</p></dd>
<dt><a name="22"><b class="cmd">::pt::pe</b> <b class="method">wordchar</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for wordchar.</p></dd>
<dt><a name="23"><b class="cmd">::pt::pe</b> <b class="method">xdigit</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for xdigit.</p></dd>
<dt><a name="24"><b class="cmd">::pt::pe</b> <b class="method">ddigit</b></a></dt>
<dd><p>This command constructs the atomic parsing expression for ddigit.</p></dd>
<dt><a name="25"><b class="cmd">::pt::pe</b> <b class="method">terminal</b> <i class="arg">t</i></a></dt>
<dd><p>This command constructs the atomic parsing expression for the terminal
symbol <i class="arg">t</i>.</p></dd>
<dt><a name="26"><b class="cmd">::pt::pe</b> <b class="method">range</b> <i class="arg">ta</i> <i class="arg">tb</i></a></dt>
<dd><p>This command constructs the atomic parsing expression for the range of
terminal symbols <i class="arg">ta</i> ... <i class="arg">tb</i>.</p></dd>
<dt><a name="27"><b class="cmd">::pt::pe</b> <b class="method">nonterminal</b> <i class="arg">nt</i></a></dt>
<dd><p>This command constructs the atomic parsing expression for the
nonterminal symbol <i class="arg">nt</i>.</p></dd>
<dt><a name="28"><b class="cmd">::pt::pe</b> <b class="method">choice</b> <i class="arg">pe</i>...</a></dt>
<dd><p>This command constructs the parsing expression representing the
ordered or prioritized choice between the argument parsing
expressions. The first argument has the highest priority.</p></dd>
<dt><a name="29"><b class="cmd">::pt::pe</b> <b class="method">sequence</b> <i class="arg">pe</i>...</a></dt>
<dd><p>This command constructs the parsing expression representing the
sequence of the argument parsing expression. The first argument is the
first element of the sequence.</p></dd>
<dt><a name="30"><b class="cmd">::pt::pe</b> <b class="method">repeat0</b> <i class="arg">pe</i></a></dt>
<dd><p>This command constructs the parsing expression representing the zero
or more repetition of the argument parsing expression <i class="arg">pe</i>, also
known as the kleene closure.</p></dd>
<dt><a name="31"><b class="cmd">::pt::pe</b> <b class="method">repeat1</b> <i class="arg">pe</i></a></dt>
<dd><p>This command constructs the parsing expression representing the one or
more repetition of the argument parsing expression <i class="arg">pe</i>, also
known as the positive kleene closure.</p></dd>
<dt><a name="32"><b class="cmd">::pt::pe</b> <b class="method">optional</b> <i class="arg">pe</i></a></dt>
<dd><p>This command constructs the parsing expression representing the
optionality of the argument parsing expression <i class="arg">pe</i>.</p></dd>
<dt><a name="33"><b class="cmd">::pt::pe</b> <b class="method">ahead</b> <i class="arg">pe</i></a></dt>
<dd><p>This command constructs the parsing expression representing the
positive lookahead of the argument parsing expression <i class="arg">pe</i>.</p></dd>
<dt><a name="34"><b class="cmd">::pt::pe</b> <b class="method">notahead</b> <i class="arg">pe</i></a></dt>
<dd><p>This command constructs the parsing expression representing the
negative lookahead of the argument parsing expression <i class="arg">pe</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_pgen.html.







































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291

<div class='fossil-doc' data-title='pt::pgen - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pgen(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pgen - Parser Generator</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Example</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::pgen <span class="opt">?1.0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::pgen</b> <i class="arg">inputformat</i> <i class="arg">text</i> <i class="arg">resultformat</i> <span class="opt">?<i class="arg">options...</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a command implementing a
<i class="term"><a href="../../../../index.html#key189">parser generator</a></i>
taking parsing expression grammars as input.</p>
<p>It is the implementation of method <b class="method">generate</b> of <b class="cmd"><a href="../../apps/pt.html">pt</a></b>, the
<i class="term"><a href="../../apps/pt.html">Parser Tools Application</a></i>.</p>
<p>As such the intended audience of this document are people wishing to
modify and/or extend this part of <b class="cmd"><a href="../../apps/pt.html">pt</a></b>'s functionality. Users of
<b class="cmd"><a href="../../apps/pt.html">pt</a></b> on the other hand are hereby refered to the applications'
manpage, i.e. <i class="term"><a href="../../apps/pt.html">Parser Tools Application</a></i>.</p>
<p>It resides in the User Package Layer of Parser Tools.</p>
<p><img alt="arch_user_pkg" src="../../../../image/arch_user_pkg.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::pgen</b> <i class="arg">inputformat</i> <i class="arg">text</i> <i class="arg">resultformat</i> <span class="opt">?<i class="arg">options...</i>?</span></a></dt>
<dd><p>This command takes the parsing expression grammar in <i class="arg">text</i> (in
the format specified by <i class="arg">inputformat</i>), and returns the same
grammar in the format <i class="arg">resultformat</i> as the result of the command.</p>
<p>The two known input formats are <b class="const">peg</b> and <b class="const">json</b>.
Introductions to them, including their formal specifications, can be
found in the <i class="term"><a href="pt_peg_language.html">PEG Language Tutorial</a></i> and
<i class="term"><a href="pt_json_language.html">The JSON Grammar Exchange Format</a></i>. The packages used to
parse these formats are</p>
<dl class="doctools_definitions">
<dt><b class="const">peg</b></dt>
<dd><p><b class="package"><a href="pt_peg_from_peg.html">pt::peg::from::peg</a></b></p></dd>
<dt><b class="const">json</b></dt>
<dd><p><b class="package"><a href="pt_peg_from_json.html">pt::peg::from::json</a></b></p></dd>
</dl>
<p>On the output side the known formats, and the packages used to
generate them are</p>
<dl class="doctools_definitions">
<dt><b class="const">c</b></dt>
<dd><p><b class="package"><a href="pt_peg_to_cparam.html">pt::peg::to::cparam</a></b></p></dd>
<dt><b class="const">container</b></dt>
<dd><p><b class="package"><a href="pt_peg_to_container.html">pt::peg::to::container</a></b></p></dd>
<dt><b class="const">critcl</b></dt>
<dd><p><b class="package"><a href="pt_peg_to_cparam.html">pt::peg::to::cparam</a></b> +
                        <b class="package"><a href="pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></b></p></dd>
<dt><b class="const">json</b></dt>
<dd><p><b class="package"><a href="pt_peg_to_json.html">pt::peg::to::json</a></b></p></dd>
<dt><b class="const">oo</b></dt>
<dd><p><b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b> +
                        <b class="package"><a href="pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></b></p></dd>
<dt><b class="const">peg</b></dt>
<dd><p><b class="package"><a href="pt_peg_to_peg.html">pt::peg::to::peg</a></b></p></dd>
<dt><b class="const">snit</b></dt>
<dd><p><b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b> +
                        <b class="package"><a href="pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></b></p></dd>
</dl>
<p>The options supported by each of these formats are documented
with their respective packages.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Example</a></h2>
<p>In this section we are working a complete example, starting with a PEG
grammar and ending with running the parser generated from it over some
input, following the outline shown in the figure below:</p>
<p><img alt="flow" src="../../../../image/flow.png"></p>
<p>Our grammar, assumed to the stored in the file &quot;<b class="file">calculator.peg</b>&quot;
is</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>From this we create a snit-based parser
using the script &quot;<b class="file">gen</b>&quot;</p>
<pre class="doctools_example">
package require Tcl 8.5
package require fileutil
package require pt::pgen
lassign $argv name
set grammar [fileutil::cat $name.peg]
set pclass  [pt::pgen peg $gr snit -class $name -file  $name.peg -name  $name]
fileutil::writeFile $name.tcl $pclass
exit 0
</pre>
<p>calling it like</p>
<pre class="doctools_example"> tclsh8.5 gen calculator </pre>
<p>which leaves us with the parser package and class written to the file
&quot;<b class="file">calculator.tcl</b>&quot;.
Assuming that this package is then properly installed in a place where
Tcl can find it we can now use this class via a script like</p>
<pre class="doctools_example">
    package require calculator
    lassign $argv input
    set channel [open $input r]
    set parser [calculator]
    set ast [$parser parse $channel]
    $parser destroy
    close $channel
    ... now process the returned abstract syntax tree ...
</pre>
<p>where the abstract syntax tree stored in the variable will look like</p>
<pre class="doctools_example">
set ast {Expression 0 4
    {Factor 0 4
        {Term 0 2
            {Number 0 2
                {Digit 0 0}
                {Digit 1 1}
                {Digit 2 2}
            }
        }
        {AddOp 3 3}
        {Term 4 4
            {Number 4 4
                {Digit 4 4}
            }
        }
    }
}
</pre>
<p>assuming that the input file and channel contained the text</p>
<pre class="doctools_example"> 120+5 </pre>
<p>A more graphical representation of the tree would be</p>
<p><img alt="expr_ast" src="../../../../image/expr_ast.png"></p>
<p>Regardless, at this point it is the user's responsibility to work with
the tree to reach whatever goal she desires. I.e. analyze it,
transform it, etc. The package <b class="package"><a href="pt_astree.html">pt::ast</a></b> should be of help
here, providing commands to walk such ASTs structures in various ways.</p>
<p>One important thing to note is that the parsers used here return a
data structure representing the structure of the input per the grammar
underlying the parser. There are <em>no</em> callbacks during the
parsing process, i.e. no <i class="term">parsing actions</i>, as most other
parsers will have.</p>
<p>Going back to the last snippet of code, the execution of the parser
for some input, note how the parser instance follows the specified
<i class="term"><a href="pt_parser_api.html">Parser API</a></i>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_rdengine.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824

<div class='fossil-doc' data-title='pt::rde - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::rde(n) 1.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::rde - Parsing Runtime Support, PARAM based</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Class API</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object API</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::rde <span class="opt">?1.1?</span></b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::stack 1.5</b></li>
<li>package require <b class="pkgname">pt::ast 1.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::rde</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">reset</b> <i class="arg">chan</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">complete</b></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">chan</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">line</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">column</b></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">current</b></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">location</b></a></li>
<li><a href="#10"><i class="arg">objectName</i> <b class="method">locations</b></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">ok</b></a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">value</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">error</b></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">errors</b></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">tokens</b> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></li>
<li><a href="#16"><i class="arg">objectName</i> <b class="method">symbols</b></a></li>
<li><a href="#17"><i class="arg">objectName</i> <b class="method">known</b></a></li>
<li><a href="#18"><i class="arg">objectName</i> <b class="method">reducible</b></a></li>
<li><a href="#19"><i class="arg">objectName</i> <b class="method">asts</b></a></li>
<li><a href="#20"><i class="arg">objectName</i> <b class="method">ast</b></a></li>
<li><a href="#21"><i class="arg">objectName</i> <b class="method">position</b> <i class="arg">loc</i></a></li>
<li><a href="#22"><i class="arg">objectName</i> <b class="method">i_input_next</b> <i class="arg">msg</i></a></li>
<li><a href="#23"><i class="arg">objectName</i> <b class="method">i_test_alnum</b></a></li>
<li><a href="#24"><i class="arg">objectName</i> <b class="method">i_test_alpha</b></a></li>
<li><a href="#25"><i class="arg">objectName</i> <b class="method">i_test_ascii</b></a></li>
<li><a href="#26"><i class="arg">objectName</i> <b class="method">i_test_char</b> <i class="arg">char</i></a></li>
<li><a href="#27"><i class="arg">objectName</i> <b class="method">i_test_ddigit</b></a></li>
<li><a href="#28"><i class="arg">objectName</i> <b class="method">i_test_digit</b></a></li>
<li><a href="#29"><i class="arg">objectName</i> <b class="method">i_test_graph</b></a></li>
<li><a href="#30"><i class="arg">objectName</i> <b class="method">i_test_lower</b></a></li>
<li><a href="#31"><i class="arg">objectName</i> <b class="method">i_test_print</b></a></li>
<li><a href="#32"><i class="arg">objectName</i> <b class="method">i_test_punct</b></a></li>
<li><a href="#33"><i class="arg">objectName</i> <b class="method">i_test_range</b> <i class="arg">chars</i> <i class="arg">chare</i></a></li>
<li><a href="#34"><i class="arg">objectName</i> <b class="method">i_test_space</b></a></li>
<li><a href="#35"><i class="arg">objectName</i> <b class="method">i_test_upper</b></a></li>
<li><a href="#36"><i class="arg">objectName</i> <b class="method">i_test_wordchar</b></a></li>
<li><a href="#37"><i class="arg">objectName</i> <b class="method">i_test_xdigit</b></a></li>
<li><a href="#38"><i class="arg">objectName</i> <b class="method">i_error_clear</b></a></li>
<li><a href="#39"><i class="arg">objectName</i> <b class="method">i_error_push</b></a></li>
<li><a href="#40"><i class="arg">objectName</i> <b class="method">i_error_pop_merge</b></a></li>
<li><a href="#41"><i class="arg">objectName</i> <b class="method">i_error_nonterminal</b> <i class="arg">symbol</i></a></li>
<li><a href="#42"><i class="arg">objectName</i> <b class="method">i_status_ok</b></a></li>
<li><a href="#43"><i class="arg">objectName</i> <b class="method">i_status_fail</b></a></li>
<li><a href="#44"><i class="arg">objectName</i> <b class="method">i_status_negate</b></a></li>
<li><a href="#45"><i class="arg">objectName</i> <b class="method">i_loc_push</b></a></li>
<li><a href="#46"><i class="arg">objectName</i> <b class="method">i_loc_pop_discard</b></a></li>
<li><a href="#47"><i class="arg">objectName</i> <b class="method">i_loc_pop_rewind</b></a></li>
<li><a href="#48"><i class="arg">objectName</i> <b class="method">i:ok_loc_pop_rewind</b></a></li>
<li><a href="#49"><i class="arg">objectName</i> <b class="method">i_loc_pop_rewind/discard</b></a></li>
<li><a href="#50"><i class="arg">objectName</i> <b class="method">i_symbol_restore</b> <i class="arg">symbol</i></a></li>
<li><a href="#51"><i class="arg">objectName</i> <b class="method">i_symbol_save</b> <i class="arg">symbol</i></a></li>
<li><a href="#52"><i class="arg">objectName</i> <b class="method">i_value_clear</b></a></li>
<li><a href="#53"><i class="arg">objectName</i> <b class="method">i_value_clear/leaf</b></a></li>
<li><a href="#54"><i class="arg">objectName</i> <b class="method">i_value_clear/reduce</b></a></li>
<li><a href="#55"><i class="arg">objectName</i> <b class="method">i:ok_ast_value_push</b></a></li>
<li><a href="#56"><i class="arg">objectName</i> <b class="method">i_ast_push</b></a></li>
<li><a href="#57"><i class="arg">objectName</i> <b class="method">i_ast_pop_rewind</b></a></li>
<li><a href="#58"><i class="arg">objectName</i> <b class="method">i:fail_ast_pop_rewind</b></a></li>
<li><a href="#59"><i class="arg">objectName</i> <b class="method">i_ast_pop_rewind/discard</b></a></li>
<li><a href="#60"><i class="arg">objectName</i> <b class="method">i_ast_pop_discard</b></a></li>
<li><a href="#61"><i class="arg">objectName</i> <b class="method">i_ast_pop_discard/rewind</b></a></li>
<li><a href="#62"><i class="arg">objectName</i> <b class="method">i:ok_continue</b></a></li>
<li><a href="#63"><i class="arg">objectName</i> <b class="method">i:fail_continue</b></a></li>
<li><a href="#64"><i class="arg">objectName</i> <b class="method">i:fail_return</b></a></li>
<li><a href="#65"><i class="arg">objectName</i> <b class="method">i:ok_return</b></a></li>
<li><a href="#66"><i class="arg">objectName</i> <b class="method">si:void_state_push</b></a></li>
<li><a href="#67"><i class="arg">objectName</i> <b class="method">si:void2_state_push</b></a></li>
<li><a href="#68"><i class="arg">objectName</i> <b class="method">si:value_state_push</b></a></li>
<li><a href="#69"><i class="arg">objectName</i> <b class="method">si:void_state_merge</b></a></li>
<li><a href="#70"><i class="arg">objectName</i> <b class="method">si:void_state_merge_ok</b></a></li>
<li><a href="#71"><i class="arg">objectName</i> <b class="method">si:value_state_merge</b></a></li>
<li><a href="#72"><i class="arg">objectName</i> <b class="method">si:value_notahead_start</b></a></li>
<li><a href="#73"><i class="arg">objectName</i> <b class="method">si:void_notahead_exit</b></a></li>
<li><a href="#74"><i class="arg">objectName</i> <b class="method">si:value_notahead_exit</b></a></li>
<li><a href="#75"><i class="arg">objectName</i> <b class="method">si:kleene_abort</b></a></li>
<li><a href="#76"><i class="arg">objectName</i> <b class="method">si:kleene_close</b></a></li>
<li><a href="#77"><i class="arg">objectName</i> <b class="method">si:voidvoid_branch</b></a></li>
<li><a href="#78"><i class="arg">objectName</i> <b class="method">si:voidvalue_branch</b></a></li>
<li><a href="#79"><i class="arg">objectName</i> <b class="method">si:valuevoid_branch</b></a></li>
<li><a href="#80"><i class="arg">objectName</i> <b class="method">si:valuevalue_branch</b></a></li>
<li><a href="#81"><i class="arg">objectName</i> <b class="method">si:voidvoid_part</b></a></li>
<li><a href="#82"><i class="arg">objectName</i> <b class="method">si:voidvalue_part</b></a></li>
<li><a href="#83"><i class="arg">objectName</i> <b class="method">si:valuevalue_part</b></a></li>
<li><a href="#84"><i class="arg">objectName</i> <b class="method">si:value_symbol_start</b> <i class="arg">symbol</i></a></li>
<li><a href="#85"><i class="arg">objectName</i> <b class="method">si:value_void_symbol_start</b> <i class="arg">symbol</i></a></li>
<li><a href="#86"><i class="arg">objectName</i> <b class="method">si:void_symbol_start</b> <i class="arg">symbol</i></a></li>
<li><a href="#87"><i class="arg">objectName</i> <b class="method">si:void_void_symbol_start</b> <i class="arg">symbol</i></a></li>
<li><a href="#88"><i class="arg">objectName</i> <b class="method">si:reduce_symbol_end</b> <i class="arg">symbol</i></a></li>
<li><a href="#89"><i class="arg">objectName</i> <b class="method">si:void_leaf_symbol_end</b> <i class="arg">symbol</i></a></li>
<li><a href="#90"><i class="arg">objectName</i> <b class="method">si:value_leaf_symbol_end</b> <i class="arg">symbol</i></a></li>
<li><a href="#91"><i class="arg">objectName</i> <b class="method">si:value_clear_symbol_end</b> <i class="arg">symbol</i></a></li>
<li><a href="#92"><i class="arg">objectName</i> <b class="method">si:void_clear_symbol_end</b> <i class="arg">symbol</i></a></li>
<li><a href="#93"><i class="arg">objectName</i> <b class="method">si:next_char</b> <i class="arg">tok</i></a></li>
<li><a href="#94"><i class="arg">objectName</i> <b class="method">si:next_range</b> <i class="arg">toks</i> <i class="arg">toke</i></a></li>
<li><a href="#95"><i class="arg">objectName</i> <b class="method">si:next_alnum</b></a></li>
<li><a href="#96"><i class="arg">objectName</i> <b class="method">si:next_alpha</b></a></li>
<li><a href="#97"><i class="arg">objectName</i> <b class="method">si:next_ascii</b></a></li>
<li><a href="#98"><i class="arg">objectName</i> <b class="method">si:next_ddigit</b></a></li>
<li><a href="#99"><i class="arg">objectName</i> <b class="method">si:next_digit</b></a></li>
<li><a href="#100"><i class="arg">objectName</i> <b class="method">si:next_graph</b></a></li>
<li><a href="#101"><i class="arg">objectName</i> <b class="method">si:next_lower</b></a></li>
<li><a href="#102"><i class="arg">objectName</i> <b class="method">si:next_print</b></a></li>
<li><a href="#103"><i class="arg">objectName</i> <b class="method">si:next_punct</b></a></li>
<li><a href="#104"><i class="arg">objectName</i> <b class="method">si:next_space</b></a></li>
<li><a href="#105"><i class="arg">objectName</i> <b class="method">si:next_upper</b></a></li>
<li><a href="#106"><i class="arg">objectName</i> <b class="method">si:next_wordchar</b></a></li>
<li><a href="#107"><i class="arg">objectName</i> <b class="method">si:next_xdigit</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a class whose instances provide the runtime
support for recursive descent parsers with backtracking, as is needed
for the execution of, for example, parsing expression grammars. It
implements the <i class="term"><a href="pt_param.html">PackRat Machine Specification</a></i>, as such that
document is <em>required</em> reading to understand both this manpage,
and the package itself. The description below does make numerous
shorthand references to the PARAM's instructions and the various parts
of its architectural state.</p>
<p>The package resides in the Execution section of the Core Layer of
Parser Tools.</p>
<p><img alt="arch_core_transform" src="../../../../image/arch_core_transform.png"></p>
<p>Note: This package not only has the standard Tcl implementation, but
also an accelerator, i.e. a C implementation, based on Critcl.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Class API</a></h3>
<p>The package exports the API described here.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::rde</b> <i class="arg">objectName</i></a></dt>
<dd><p>The command creates a new runtime object for a recursive descent
parser with backtracking and returns the fully qualified name of the
object command as its result. The API of this object command is
described in the section <span class="sectref"><a href="#subsection2">Object API</a></span>. It may be used to
invoke various operations on the object.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object API</a></h3>
<p>All objects created by this package provide the following 63 methods
for the manipulation and querying of their state, which is, in essence
the architectural state of a PARAM.</p>
<p>First some general methods and the state accessors.</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object, releasing all claimed memory, and
deleting the associated object command.</p></dd>
<dt><a name="3"><i class="arg">objectName</i> <b class="method">reset</b> <i class="arg">chan</i></a></dt>
<dd><p>This method resets the state of the runtme to its defaults, preparing
it for the parsing of the character in the channel <i class="arg">chan</i>, which
becomes IN.</p>
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#key411">read</a></b> is properly changed for
push-operation.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">complete</b></a></dt>
<dd><p>This method completes parsing, either returning the AST made from the
elements of ARS, or throwing an error containing the current ER.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">chan</b></a></dt>
<dd><p>This method returns the handle of the channel which is IN.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">line</b></a></dt>
<dd><p>This method returns the line number for the position IN is currently
at. Note that this may not match with the line number for CL, due to
backtracking.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">column</b></a></dt>
<dd><p>This method returns the column for the position IN is currently
at. Note that this may not match with the column for CL, due to
backtracking.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">current</b></a></dt>
<dd><p>This method returns CC.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">location</b></a></dt>
<dd><p>This method returns CL.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">locations</b></a></dt>
<dd><p>This method returns the LS. The topmost entry of the stack will be the
first element of the returned list.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">ok</b></a></dt>
<dd><p>This method returns ST.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">value</b></a></dt>
<dd><p>This method returns SV.</p></dd>
<dt><a name="13"><i class="arg">objectName</i> <b class="method">error</b></a></dt>
<dd><p>This method returns ER. This is either the empty string for an empty
ER, or a list of 2 elements, the location the error is for, and a set
of messages which specify which symbols were expected at the
location. The messages are encoded as one of the possible atomic
parsing expressions (special operators, terminal, range, and
nonterminal operator).</p></dd>
<dt><a name="14"><i class="arg">objectName</i> <b class="method">errors</b></a></dt>
<dd><p>This method returns ES. The topmost entry of the stack will be the
first element of the returned list. Each entry is encoded as described
for <b class="method">error</b>.</p></dd>
<dt><a name="15"><i class="arg">objectName</i> <b class="method">tokens</b> <span class="opt">?<i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span>?</span></a></dt>
<dd><p>This method returns the part of TC for the range of locations of IN
starting at <i class="arg">from</i> and ending at <i class="arg">to</i>. If <i class="arg">to</i> is not
specified it is taken as identical to <i class="arg">from</i>. If neither argument
is specified the whole of TC is returned.</p>
<p>Each token in the returned list is a list of three elements itself,
containing the character at the location, and the associated line and
column numbers, in this order.</p></dd>
<dt><a name="16"><i class="arg">objectName</i> <b class="method">symbols</b></a></dt>
<dd><p>This method returns a dictionary containing NC. Keys are two-element
lists containing nonterminal symbol and location, in this order. The
values are 4-tuples containing CL, ST, ER, and SV, in this order. ER
is encoded as specified for the method <b class="method">error</b>.</p></dd>
<dt><a name="17"><i class="arg">objectName</i> <b class="method">known</b></a></dt>
<dd><p>This method returns a list containing the keys of SC. They are
encoded in the same manner as is done by method <b class="method">symbols</b>.</p></dd>
<dt><a name="18"><i class="arg">objectName</i> <b class="method">reducible</b></a></dt>
<dd><p>This method returns ARS. The topmost entry of the stack will be the
first element of the returned list</p></dd>
<dt><a name="19"><i class="arg">objectName</i> <b class="method">asts</b></a></dt>
<dd><p>This method returns AS. The topmost entry of the stack will be the
first element of the returned list</p></dd>
<dt><a name="20"><i class="arg">objectName</i> <b class="method">ast</b></a></dt>
<dd><p>This is a convenience method returning the topmost element of ARS.</p></dd>
<dt><a name="21"><i class="arg">objectName</i> <b class="method">position</b> <i class="arg">loc</i></a></dt>
<dd><p>This method returns the line and column numbers for the specified
location of IN, assuming that this location has already been reached
during the parsing process.</p></dd>
</dl>
<p>The following methods implement all PARAM instructions. They all have
the prefix &quot;i_&quot;.</p>
<p>The control flow is mainly provided by Tcl's builtin commands, like
<b class="cmd">if</b>, <b class="cmd">while</b>, etc., plus a few guarded variants of PARAM
instructions and Tcl commands.. That means that these instruction
variants will do nothing if their guard condition is not
fulfilled. They can be recognized by the prefix &quot;i:ok_&quot; and &quot;i:fail_&quot;,
which denote the value ST has to have for the instruction to execute.</p>
<p>The instructions are listed in the same order they occur in the
<i class="term"><a href="pt_param.html">PackRat Machine Specification</a></i>, with the guard variants
listed after their regular implementation, if any, or in their place.</p>
<dl class="doctools_definitions">
<dt><a name="22"><i class="arg">objectName</i> <b class="method">i_input_next</b> <i class="arg">msg</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">input_next</b>.</p></dd>
<dt><a name="23"><i class="arg">objectName</i> <b class="method">i_test_alnum</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_alnum</b>.</p></dd>
<dt><a name="24"><i class="arg">objectName</i> <b class="method">i_test_alpha</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_alpha</b>.</p></dd>
<dt><a name="25"><i class="arg">objectName</i> <b class="method">i_test_ascii</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_ascii</b>.</p></dd>
<dt><a name="26"><i class="arg">objectName</i> <b class="method">i_test_char</b> <i class="arg">char</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_char</b>.</p></dd>
<dt><a name="27"><i class="arg">objectName</i> <b class="method">i_test_ddigit</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_ddigit</b>.</p></dd>
<dt><a name="28"><i class="arg">objectName</i> <b class="method">i_test_digit</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_digit</b>.</p></dd>
<dt><a name="29"><i class="arg">objectName</i> <b class="method">i_test_graph</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_graph</b>.</p></dd>
<dt><a name="30"><i class="arg">objectName</i> <b class="method">i_test_lower</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_lower</b>.</p></dd>
<dt><a name="31"><i class="arg">objectName</i> <b class="method">i_test_print</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_print</b>.</p></dd>
<dt><a name="32"><i class="arg">objectName</i> <b class="method">i_test_punct</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_punct</b>.</p></dd>
<dt><a name="33"><i class="arg">objectName</i> <b class="method">i_test_range</b> <i class="arg">chars</i> <i class="arg">chare</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_range</b>.</p></dd>
<dt><a name="34"><i class="arg">objectName</i> <b class="method">i_test_space</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_space</b>.</p></dd>
<dt><a name="35"><i class="arg">objectName</i> <b class="method">i_test_upper</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_upper</b>.</p></dd>
<dt><a name="36"><i class="arg">objectName</i> <b class="method">i_test_wordchar</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_wordchar</b>.</p></dd>
<dt><a name="37"><i class="arg">objectName</i> <b class="method">i_test_xdigit</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">test_xdigit</b>.</p></dd>
<dt><a name="38"><i class="arg">objectName</i> <b class="method">i_error_clear</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">error_clear</b>.</p></dd>
<dt><a name="39"><i class="arg">objectName</i> <b class="method">i_error_push</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">error_push</b>.</p></dd>
<dt><a name="40"><i class="arg">objectName</i> <b class="method">i_error_pop_merge</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">error_pop_merge</b>.</p></dd>
<dt><a name="41"><i class="arg">objectName</i> <b class="method">i_error_nonterminal</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">error_nonterminal</b>.</p></dd>
<dt><a name="42"><i class="arg">objectName</i> <b class="method">i_status_ok</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">status_ok</b>.</p></dd>
<dt><a name="43"><i class="arg">objectName</i> <b class="method">i_status_fail</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">status_fail</b>.</p></dd>
<dt><a name="44"><i class="arg">objectName</i> <b class="method">i_status_negate</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">status_negate</b>.</p></dd>
<dt><a name="45"><i class="arg">objectName</i> <b class="method">i_loc_push</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">loc_push</b>.</p></dd>
<dt><a name="46"><i class="arg">objectName</i> <b class="method">i_loc_pop_discard</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">loc_pop_discard</b>.</p></dd>
<dt><a name="47"><i class="arg">objectName</i> <b class="method">i_loc_pop_rewind</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">loc_pop_rewind</b>.</p></dd>
<dt><a name="48"><i class="arg">objectName</i> <b class="method">i:ok_loc_pop_rewind</b></a></dt>
<dd><p>This guarded method, a variant of <b class="method">i_loc_pop_rewind</b>, executes only
for &quot;ST == ok&quot;.</p></dd>
<dt><a name="49"><i class="arg">objectName</i> <b class="method">i_loc_pop_rewind/discard</b></a></dt>
<dd><p>This method is a convenient combination of control flow and the two
PARAM instructions <b class="cmd">loc_pop_rewind</b> and <b class="cmd">loc_pop_discard</b>. The former
is executed for &quot;ST == fail&quot;, the latter for &quot;ST == ok&quot;.</p></dd>
<dt><a name="50"><i class="arg">objectName</i> <b class="method">i_symbol_restore</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">symbol_restore</b>.</p>
<p>The boolean result of the check is returned as the result of
the method and can be used with standard Tcl control flow commands.</p></dd>
<dt><a name="51"><i class="arg">objectName</i> <b class="method">i_symbol_save</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">symbol_save</b>.</p></dd>
<dt><a name="52"><i class="arg">objectName</i> <b class="method">i_value_clear</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">value_clear</b>.</p></dd>
<dt><a name="53"><i class="arg">objectName</i> <b class="method">i_value_clear/leaf</b></a></dt>
<dd><p>This method is a convenient combination of control flow and the two
PARAM instructions <b class="cmd">value_clear</b> and <b class="cmd">value_leaf</b>. The former
is executed for &quot;ST == fail&quot;, the latter for &quot;ST == ok&quot;.</p></dd>
<dt><a name="54"><i class="arg">objectName</i> <b class="method">i_value_clear/reduce</b></a></dt>
<dd><p>This method is a convenient combination of control flow and the two
PARAM instructions <b class="cmd">value_clear</b> and <b class="cmd">value_reduce</b>. The former
is executed for &quot;ST == fail&quot;, the latter for &quot;ST == ok&quot;.</p></dd>
<dt><a name="55"><i class="arg">objectName</i> <b class="method">i:ok_ast_value_push</b></a></dt>
<dd><p>This method implements a guarded variant of the the PARAM instruction
<b class="cmd">ast_value_push</b>, which executes only for &quot;ST == ok&quot;.</p></dd>
<dt><a name="56"><i class="arg">objectName</i> <b class="method">i_ast_push</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">ast_push</b>.</p></dd>
<dt><a name="57"><i class="arg">objectName</i> <b class="method">i_ast_pop_rewind</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">ast_pop_rewind</b>.</p></dd>
<dt><a name="58"><i class="arg">objectName</i> <b class="method">i:fail_ast_pop_rewind</b></a></dt>
<dd><p>This guarded method, a variant of <b class="method">i_ast_pop_rewind</b>, executes only
for &quot;ST == fail&quot;.</p></dd>
<dt><a name="59"><i class="arg">objectName</i> <b class="method">i_ast_pop_rewind/discard</b></a></dt>
<dd><p>This method is a convenient combination of control flow and the two
PARAM instructions <b class="cmd">ast_pop_rewind</b> and <b class="cmd">ast_pop_discard</b>. The former
is executed for &quot;ST == fail&quot;, the latter for &quot;ST == ok&quot;.</p></dd>
<dt><a name="60"><i class="arg">objectName</i> <b class="method">i_ast_pop_discard</b></a></dt>
<dd><p>This method implements the PARAM instruction <b class="cmd">ast_pop_discard</b>.</p></dd>
<dt><a name="61"><i class="arg">objectName</i> <b class="method">i_ast_pop_discard/rewind</b></a></dt>
<dd><p>This method is a convenient combination of control flow and the two
PARAM instructions <b class="cmd">ast_pop_discard</b> and <b class="cmd">ast_pop_rewind</b>. The former
is executed for &quot;ST == fail&quot;, the latter for &quot;ST == ok&quot;.</p></dd>
<dt><a name="62"><i class="arg">objectName</i> <b class="method">i:ok_continue</b></a></dt>
<dd><p>This guarded method executes only for &quot;ST == ok&quot;. Then it aborts the
current iteration of the innermost loop in the calling Tcl procedure.</p></dd>
<dt><a name="63"><i class="arg">objectName</i> <b class="method">i:fail_continue</b></a></dt>
<dd><p>This guarded method executes only for &quot;ST == fail&quot;. Then it aborts the
current iteration of the innermost loop in the calling Tcl procedure.</p></dd>
<dt><a name="64"><i class="arg">objectName</i> <b class="method">i:fail_return</b></a></dt>
<dd><p>This guarded method executes only for &quot;ST == fail&quot;. Then it aborts the
calling Tcl procedure.</p></dd>
<dt><a name="65"><i class="arg">objectName</i> <b class="method">i:ok_return</b></a></dt>
<dd><p>This guarded method executes only for &quot;ST == ok&quot;. Then it aborts the
calling Tcl procedure.</p></dd>
</dl>
<p>The next set of methods are <i class="term">super instructions</i>, meaning that
each implements a longer sequence of instructions commonly used in
parsers. The combinated instructions of the previous set, i.e. those
with names matching the pattern &quot;i_*/*&quot;, are actually super
instructions as well, albeit with limited scope, handling 2
instructions with their control flow. The upcoming set is much broader
in scope, folding as much as six or more PARAM instructions into a
single method call.</p>
<p>In this we can see the reasoning behind their use well:</p>
<ol class="doctools_enumerated">
<li><p>By using less instructions the generated parsers become smaller, as
the common parts are now truly part of the common runtime, and not
explicitly written in the parser's code over and over again.</p></li>
<li><p>Using less instructions additionally reduces the overhead associated
with calls into the runtime, i.e. the cost of method dispatch and of
setting up the variable context.</p></li>
<li><p>Another effect of the super instructions is that their internals can
be optimized as well, especially regarding control flow, and stack
use, as the runtime internals are accessible to all instructions
folded into the sequence.</p></li>
</ol>
<dl class="doctools_definitions">
<dt><a name="66"><i class="arg">objectName</i> <b class="method">si:void_state_push</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_loc_push
i_error_clear
i_error_push
</pre>
<p>Parsers use it at the beginning of <i class="term">void</i> sequences and choices
with a <i class="term">void</i> initial branch.</p></dd>
<dt><a name="67"><i class="arg">objectName</i> <b class="method">si:void2_state_push</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_loc_push
i_error_clear
i_error_push
</pre>
<p>Parsers use it at the beginning of optional and repeated expressions.</p></dd>
<dt><a name="68"><i class="arg">objectName</i> <b class="method">si:value_state_push</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_ast_push
i_loc_push
i_error_clear
i_error_push
</pre>
<p>Parsers use it at the beginning of sequences generating an AST and
choices with an initial branch generating an AST.</p></dd>
<dt><a name="69"><i class="arg">objectName</i> <b class="method">si:void_state_merge</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_loc_pop_rewind/discard
</pre>
<p>Parsers use it at the end of void sequences and choices whose last
branch is void.</p></dd>
<dt><a name="70"><i class="arg">objectName</i> <b class="method">si:void_state_merge_ok</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_loc_pop_rewind/discard
i_status_ok
</pre>
<p>Parsers use it at the end of optional expressions</p></dd>
<dt><a name="71"><i class="arg">objectName</i> <b class="method">si:value_state_merge</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_ast_pop_rewind/discard
i_loc_pop_rewind/discard
</pre>
<p>Parsers use it at the end of sequences generating ASTs and choices
whose last branch generates an AST</p></dd>
<dt><a name="72"><i class="arg">objectName</i> <b class="method">si:value_notahead_start</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_loc_push
i_ast_push
</pre>
<p>Parsers use it at the beginning of negative lookahead predicates which
generate ASTs.</p></dd>
<dt><a name="73"><i class="arg">objectName</i> <b class="method">si:void_notahead_exit</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_loc_pop_rewind
i_status_negate
</pre>
<p>Parsers use it at the end of void negative lookahead predicates.</p></dd>
<dt><a name="74"><i class="arg">objectName</i> <b class="method">si:value_notahead_exit</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_ast_pop_discard/rewind
i_loc_pop_rewind
i_status_negate
</pre>
<p>Parsers use it at the end of negative lookahead predicates which
generate ASTs.</p></dd>
<dt><a name="75"><i class="arg">objectName</i> <b class="method">si:kleene_abort</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_loc_pop_rewind/discard
i:fail_return
</pre>
<p>Parsers use it to stop a positive repetition when its first, required, expression fails.</p></dd>
<dt><a name="76"><i class="arg">objectName</i> <b class="method">si:kleene_close</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_loc_pop_rewind/discard
i:fail_status_ok
i:fail_return
</pre>
<p>Parsers use it at the end of repetitions.</p></dd>
<dt><a name="77"><i class="arg">objectName</i> <b class="method">si:voidvoid_branch</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i:ok_loc_pop_discard
i:ok_return
i_loc_rewind
i_error_push
</pre>
<p>Parsers use it when transiting between branches of a choice when both are void.</p></dd>
<dt><a name="78"><i class="arg">objectName</i> <b class="method">si:voidvalue_branch</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i:ok_loc_pop_discard
i:ok_return
i_ast_push
i_loc_rewind
i_error_push
</pre>
<p>Parsers use it when transiting between branches of a choice when the
failing branch is void, and the next to test generates an AST.</p></dd>
<dt><a name="79"><i class="arg">objectName</i> <b class="method">si:valuevoid_branch</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_ast_pop_rewind/discard
i:ok_loc_pop_discard
i:ok_return
i_loc_rewind
i_error_push
</pre>
<p>Parsers use it when transiting between branches of a choice when the
failing branch generates an AST, and the next to test is void.</p></dd>
<dt><a name="80"><i class="arg">objectName</i> <b class="method">si:valuevalue_branch</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i_ast_pop_discard
i:ok_loc_pop_discard
i:ok_return
i_ast_rewind
i_loc_rewind
i_error_push
</pre>
<p>Parsers use it when transiting between branches of a choice when both
generate ASTs.</p></dd>
<dt><a name="81"><i class="arg">objectName</i> <b class="method">si:voidvoid_part</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i:fail_loc_pop_rewind
i:fail_return
i_error_push
</pre>
<p>Parsers use it when transiting between parts of a sequence and both
are void.</p></dd>
<dt><a name="82"><i class="arg">objectName</i> <b class="method">si:voidvalue_part</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i:fail_loc_pop_rewind
i:fail_return
i_ast_push
i_error_push
</pre>
<p>Parsers use it when transiting between parts of a sequence and the
sucessfully matched part is void, and after it an AST is generated.</p></dd>
<dt><a name="83"><i class="arg">objectName</i> <b class="method">si:valuevalue_part</b></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_error_pop_merge
i:fail_ast_pop_rewind
i:fail_loc_pop_rewind
i:fail_return
i_error_push
</pre>
<p>Parsers use it when transiting between parts of a sequence and both
parts generate ASTs.</p></dd>
<dt><a name="84"><i class="arg">objectName</i> <b class="method">si:value_symbol_start</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
if/found? i_symbol_restore $symbol
i:found:ok_ast_value_push
i:found_return
i_loc_push
i_ast_push
</pre>
<p>Parsers use it at the beginning of a nonterminal symbol generating an
AST, whose right-hand side may have generated an AST as well.</p></dd>
<dt><a name="85"><i class="arg">objectName</i> <b class="method">si:value_void_symbol_start</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
if/found? i_symbol_restore $symbol
i:found:ok_ast_value_push
i:found_return
i_loc_push
i_ast_push
</pre>
<p>Parsers use it at the beginning of a void nonterminal symbol whose
right-hand side may generate an AST.</p></dd>
<dt><a name="86"><i class="arg">objectName</i> <b class="method">si:void_symbol_start</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
if/found? i_symbol_restore $symbol
i:found_return
i_loc_push
i_ast_push
</pre>
<p>Parsers use it at the beginning of a nonterminal symbol generating an
AST whose right-hand side is void.</p></dd>
<dt><a name="87"><i class="arg">objectName</i> <b class="method">si:void_void_symbol_start</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
if/found? i_symbol_restore $symbol
i:found_return
i_loc_push
</pre>
<p>Parsers use it at  the beginning of a void nonterminal symbol whose
right-hand side is void as well.</p></dd>
<dt><a name="88"><i class="arg">objectName</i> <b class="method">si:reduce_symbol_end</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_value_clear/reduce $symbol
i_symbol_save        $symbol
i_error_nonterminal  $symbol
i_ast_pop_rewind
i_loc_pop_discard
i:ok_ast_value_push
</pre>
<p>Parsers use it at the end of a non-terminal symbol generating an AST
using the AST generated by the right-hand side as child.</p></dd>
<dt><a name="89"><i class="arg">objectName</i> <b class="method">si:void_leaf_symbol_end</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_value_clear/leaf  $symbol
i_symbol_save       $symbol
i_error_nonterminal $symbol
i_loc_pop_discard
i:ok_ast_value_push
</pre>
<p>Parsers use it at the end of a non-terminal symbol generating an AST
whose right-hand side is void.</p></dd>
<dt><a name="90"><i class="arg">objectName</i> <b class="method">si:value_leaf_symbol_end</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_value_clear/leaf  $symbol
i_symbol_save       $symbol
i_error_nonterminal $symbol
i_loc_pop_discard
i_ast_pop_rewind
i:ok_ast_value_push
</pre>
<p>Parsers use it at the end of a non-terminal symbol generating an AST
discarding the AST generated by the right-hand side.</p></dd>
<dt><a name="91"><i class="arg">objectName</i> <b class="method">si:value_clear_symbol_end</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_value_clear
i_symbol_save       $symbol
i_error_nonterminal $symbol
i_loc_pop_discard
i_ast_pop_rewind
</pre>
<p>Parsers use it at the end of a void non-terminal symbol, discarding
the AST generated by the right-hand side.</p></dd>
<dt><a name="92"><i class="arg">objectName</i> <b class="method">si:void_clear_symbol_end</b> <i class="arg">symbol</i></a></dt>
<dd><p>This method combines</p>
<pre class="doctools_example">
i_value_clear
i_symbol_save       $symbol
i_error_nonterminal $symbol
i_loc_pop_discard
</pre>
<p>Parsers use it at the end of a void non-terminal symbol with a void
right-hand side.</p></dd>
<dt><a name="93"><i class="arg">objectName</i> <b class="method">si:next_char</b> <i class="arg">tok</i></a></dt>
<dd></dd>
<dt><a name="94"><i class="arg">objectName</i> <b class="method">si:next_range</b> <i class="arg">toks</i> <i class="arg">toke</i></a></dt>
<dd></dd>
<dt><a name="95"><i class="arg">objectName</i> <b class="method">si:next_alnum</b></a></dt>
<dd></dd>
<dt><a name="96"><i class="arg">objectName</i> <b class="method">si:next_alpha</b></a></dt>
<dd></dd>
<dt><a name="97"><i class="arg">objectName</i> <b class="method">si:next_ascii</b></a></dt>
<dd></dd>
<dt><a name="98"><i class="arg">objectName</i> <b class="method">si:next_ddigit</b></a></dt>
<dd></dd>
<dt><a name="99"><i class="arg">objectName</i> <b class="method">si:next_digit</b></a></dt>
<dd></dd>
<dt><a name="100"><i class="arg">objectName</i> <b class="method">si:next_graph</b></a></dt>
<dd></dd>
<dt><a name="101"><i class="arg">objectName</i> <b class="method">si:next_lower</b></a></dt>
<dd></dd>
<dt><a name="102"><i class="arg">objectName</i> <b class="method">si:next_print</b></a></dt>
<dd></dd>
<dt><a name="103"><i class="arg">objectName</i> <b class="method">si:next_punct</b></a></dt>
<dd></dd>
<dt><a name="104"><i class="arg">objectName</i> <b class="method">si:next_space</b></a></dt>
<dd></dd>
<dt><a name="105"><i class="arg">objectName</i> <b class="method">si:next_upper</b></a></dt>
<dd></dd>
<dt><a name="106"><i class="arg">objectName</i> <b class="method">si:next_wordchar</b></a></dt>
<dd></dd>
<dt><a name="107"><i class="arg">objectName</i> <b class="method">si:next_xdigit</b></a></dt>
<dd><p>These methods all combine</p>
<pre class="doctools_example">
i_input_next $msg
i:fail_return
</pre>
<p>with the appropriate <b class="cmd">i_test_xxx</b> instruction. Parsers use them for
handling atomic expressions.</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_tclparam_config_nx.html.































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

<div class='fossil-doc' data-title='pt::tclparam::configuration::nx - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::tclparam::configuration::nx(n) 1.0.0 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::tclparam::configuration::nx - Tcl/PARAM, Canned configuration, NX</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::tclparam::configuration::nx <span class="opt">?1.0.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::tclparam::configuration::nx</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package is an adjunct to <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b>, to make
the use of this highly configurable package easier by providing a
canned configuration. When applied this configuration causes the
package <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b> to generate
<b class="package">NX</b>-based parser packages.</p>
<p>It is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::tclparam::configuration::nx</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>The command applies the configuration provided by this package to the
<i class="arg">cmdprefix</i>, causing the creation of <b class="package">NX</b>-based parsers
whose class is <i class="arg">name</i>, in package <i class="arg">pkg</i> with <i class="arg">version</i>.</p>
<p>The use of a command prefix as API allows application of the
configuration to not only <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b>
(<b class="cmd">pt::peg::to::tclparam configure</b>), but also export manager
instances and PEG containers (<b class="cmd">$export configuration set</b> and
<b class="cmd">[$container exporter] configuration set</b> respectively).</p>
<p>Or anything other command prefix accepting two arguments, option and
value.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_tclparam_config_snit.html.































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

<div class='fossil-doc' data-title='pt::tclparam::configuration::snit - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::tclparam::configuration::snit(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::tclparam::configuration::snit - Tcl/PARAM, Canned configuration, Snit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::tclparam::configuration::snit <span class="opt">?1.0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::tclparam::configuration::snit</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package is an adjunct to <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b>, to make
the use of this highly configurable package easier by providing a
canned configuration. When applied this configuration causes the
package <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b> to generate
<b class="package"><a href="../snit/snit.html">snit</a></b>-based parser packages.</p>
<p>It is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::tclparam::configuration::snit</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>The command applies the configuration provided by this package to the
<i class="arg">cmdprefix</i>, causing the creation of <b class="package"><a href="../snit/snit.html">snit</a></b>-based parsers
whose class is <i class="arg">name</i>, in package <i class="arg">pkg</i> with <i class="arg">version</i>.</p>
<p>The use of a command prefix as API allows application of the
configuration to not only <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b>
(<b class="cmd">pt::peg::to::tclparam configure</b>), but also export manager
instances and PEG containers (<b class="cmd">$export configuration set</b> and
<b class="cmd">[$container exporter] configuration set</b> respectively).</p>
<p>Or anything other command prefix accepting two arguments, option and
value.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_tclparam_config_tcloo.html.































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

<div class='fossil-doc' data-title='pt::tclparam::configuration::tcloo - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::tclparam::configuration::tcloo(n) 1.0.4 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::tclparam::configuration::tcloo - Tcl/PARAM, Canned configuration, Tcloo</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::tclparam::configuration::tcloo <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::tclparam::configuration::tcloo</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package is an adjunct to <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b>, to make
the use of this highly configurable package easier by providing a
canned configuration. When applied this configuration causes the
package <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b> to generate
<b class="package">OO</b>-based parser packages.</p>
<p>It is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::tclparam::configuration::tcloo</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>The command applies the configuration provided by this package to the
<i class="arg">cmdprefix</i>, causing the creation of <b class="package">OO</b>-based parsers
whose class is <i class="arg">name</i>, in package <i class="arg">pkg</i> with <i class="arg">version</i>.</p>
<p>The use of a command prefix as API allows application of the
configuration to not only <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b>
(<b class="cmd">pt::peg::to::tclparam configure</b>), but also export manager
instances and PEG containers (<b class="cmd">$export configuration set</b> and
<b class="cmd">[$container exporter] configuration set</b> respectively).</p>
<p>Or anything other command prefix accepting two arguments, option and
value.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_to_api.html.







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547

<div class='fossil-doc' data-title='pt_export_api - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_export_api(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_export_api - Parser Tools Export API</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Converter API</a></li>
<li class="doctools_section"><a href="#section3">Plugin API</a></li>
<li class="doctools_section"><a href="#section4">Options</a></li>
<li class="doctools_section"><a href="#section5">Usage</a></li>
<li class="doctools_section"><a href="#section6">PEG serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">PE serialization format</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">Example</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">CONVERTER</b> <b class="method">reset</b></a></li>
<li><a href="#2"><b class="cmd">CONVERTER</b> <b class="method">configure</b></a></li>
<li><a href="#3"><b class="cmd">CONVERTER</b> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#4"><b class="cmd">CONVERTER</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></li>
<li><a href="#5"><b class="cmd">CONVERTER</b> <b class="method">convert</b> <i class="arg">serial</i></a></li>
<li><a href="#6"><b class="cmd">::export</b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This document describes two APIs. First the API shared by all packages
for the conversion of Parsing Expression Grammars into some other
format, and then the API shared by the packages which implement the
export plugins sitting on top of the conversion packages.</p>
<p>Its intended audience are people who wish to create their own
converter for some type of output, and/or an export plugin for
their or some other converter.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_export" src="../../../../image/arch_core_export.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Converter API</a></h2>
<p>Any (grammar) export converter has to follow the rules set out below:</p>
<ol class="doctools_enumerated">
<li><p>A converter is a package. Its name is arbitrary, however it is
	recommended to put it under the <b class="namespace">::pt::peg::to</b>
	namespace.</p></li>
<li><p>The package provides either a single Tcl command following the
	API outlined below, or a class command whose instances follow
	the same API. The commands which follow the API are called
	<i class="term">converter commands</i>.</p></li>
<li><p>A converter command has to provide the following three methods
	with the given signatures and semantics. Converter commands
	are allowed to provide more methods of their own, but not
	less, and they may not provide different semantics for the
	standardized methods.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">CONVERTER</b> <b class="method">reset</b></a></dt>
<dd><p>This method has to reset the configuration of the converter to its
default settings. The result of the method has to be the empty
string.</p></dd>
<dt><a name="2"><b class="cmd">CONVERTER</b> <b class="method">configure</b></a></dt>
<dd><p>This method, in this form, has to return a dictionary containing the
current configuration of the converter.</p></dd>
<dt><a name="3"><b class="cmd">CONVERTER</b> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd><p>This method, in this form, has to return the current value of the
specified configuration <i class="arg">option</i> of the converter.</p>
<p>Please read the section <span class="sectref"><a href="#section4">Options</a></span> for the set of standard
options any converter has to accept.
Any other options accepted by a specific converter will be described
in its manpage.</p></dd>
<dt><a name="4"><b class="cmd">CONVERTER</b> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></dt>
<dd><p>This command, in this form, sets the specified <i class="arg">option</i>s of the
converter to the given <i class="arg">value</i>s.</p>
<p>Please read the section <span class="sectref"><a href="#section4">Options</a></span> for the set of standard
options a converter has to accept.
Any other options accepted by a specific converter will be described
in its manpage.</p></dd>
<dt><a name="5"><b class="cmd">CONVERTER</b> <b class="method">convert</b> <i class="arg">serial</i></a></dt>
<dd><p>This method has to accept the canonical serialization of a parsing
expression grammar, as specified in section
<span class="sectref"><a href="#section6">PEG serialization format</a></span>, and contained in <i class="arg">serial</i>.
The result of the method has to be the result of converting the input
grammar into whatever the converter is for, per its configuration.</p></dd>
</dl>
</li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Plugin API</a></h2>
<p>Any (grammar) export plugin has to follow the rules set out below:</p>
<ol class="doctools_enumerated">
<li><p>A plugin is a package.</p></li>
<li><p>The name of a plugin package has the form
		pt::peg::export::<b class="variable">FOO</b>,
	where <b class="variable">FOO</b> is the name of the format the plugin will
	generate output for.</p></li>
<li><p>The plugin can expect that the package
	<b class="package">pt::peg::export::plugin</b> is present, as
	indicator that it was invoked from a genuine plugin manager.</p>
<p>It is recommended that a plugin does check for the presence of
	this package.</p></li>
<li><p>A plugin has to provide a single command, in the global
	namespace, with the signature shown below. Plugins are allowed
	to provide more command of their own, but not less, and they
	may not provide different semantics for the standardized
	command.</p>
<dl class="doctools_definitions">
<dt><a name="6"><b class="cmd">::export</b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command has to accept the canonical serialization of a parsing
expression grammar and the configuration for the converter invoked by
the plugin. The result of the command has to be the result of the
converter invoked by the plugin for th input grammar and
configuration.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">serial</i></dt>
<dd><p>This argument will contain the <i class="term">canonical</i> serialization of the
parsing expression grammar for which to generate the output.
The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section6">PEG serialization format</a></span>.</p></dd>
<dt>dictionary <i class="arg">configuration</i></dt>
<dd><p>This argument will contain the configuration to configure the
converter with before invoking it, as a dictionary mapping from
options to values.</p>
<p>Please read the section <span class="sectref"><a href="#section4">Options</a></span> for the set of standard
options any converter has to accept, and thus any plugin as well.
Any other options accepted by a specific plugin will be described in
its manpage.</p></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of an invokation of
	the command <b class="cmd"><a href="../../../../index.html#key260">export</a></b>. This call has to leave the plugin in
	a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Options</a></h2>
<p>Each export converter and plugin for an export converter has to accept
the options below in their <b class="method">configure</b> method. Converters are
allowed to ignore the contents of these options when performing a
conversion, but they must not reject them. Plugins are expected to
pass the options given to them to the converter they are invoking.</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
<dt><b class="option">-name</b> string</dt>
<dd><p>The value of this option is the name of the grammar we are processing.
The default value is <b class="const">a_pe_grammar</b>.</p></dd>
<dt><b class="option">-user</b> string</dt>
<dd><p>The value of this option is the name of the user for which the command
is run. The default value is <b class="const">unknown</b>.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Usage</a></h2>
<p>To use a converter do</p>
<pre class="doctools_example">
    # Get the converter (single command here, not class)
    package require the-converter-package
    # Provide a configuration
    theconverter configure ...
    # Perform the conversion
    set result [theconverter convert $thegrammarserial]
    ... process the result ...
</pre>
<p>To use a plugin <b class="variable">FOO</b> do</p>
<pre class="doctools_example">
    # Get an export plugin manager
    package require pt::peg::export
    pt::peg::export E
    # Provide a configuration
    E configuration set ...
    # Run the plugin, and the converter inside.
    set result [E export serial $grammarserial FOO]
    ... process the result ...
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PEG serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expression Grammars as immutable values for transport,
comparison, etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a PEG may have more than one regular serialization only exactly
one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>regular serialization</dt>
<dd><ol class="doctools_enumerated">
<li><p>The serialization of any PEG is a nested Tcl dictionary.</p></li>
<li><p>This dictionary holds a single key, <b class="const">pt::grammar::peg</b>, and its
value. This value holds the contents of the grammar.</p></li>
<li><p>The contents of the grammar are a Tcl dictionary holding the set of
nonterminal symbols and the starting expression. The relevant keys and
their values are</p>
<dl class="doctools_definitions">
<dt><b class="const">rules</b></dt>
<dd><p>The value is a Tcl dictionary whose keys are the names of the
nonterminal symbols known to the grammar.</p>
<ol class="doctools_enumerated">
<li><p>Each nonterminal symbol may occur only once.</p></li>
<li><p>The empty string is not a legal nonterminal symbol.</p></li>
<li><p>The value for each symbol is a Tcl dictionary itself. The relevant
keys and their values in this dictionary are</p>
<dl class="doctools_definitions">
<dt><b class="const">is</b></dt>
<dd><p>The value is the serialization of the parsing expression describing
the symbols sentennial structure, as specified in the section
<span class="sectref"><a href="#section7">PE serialization format</a></span>.</p></dd>
<dt><b class="const">mode</b></dt>
<dd><p>The value can be one of three values specifying how a parser should
handle the semantic value produced by the symbol.</p>
<dl class="doctools_definitions">
<dt><b class="const">value</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal itself,
which has the ASTs of the symbol's right hand side as its children.</p></dd>
<dt><b class="const">leaf</b></dt>
<dd><p>The semantic value of the nonterminal symbol is an abstract syntax
tree consisting of a single node node for the nonterminal, without any
children. Any ASTs generated by the symbol's right hand side are
discarded.</p></dd>
<dt><b class="const">void</b></dt>
<dd><p>The nonterminal has no semantic value. Any ASTs generated by the
symbol's right hand side are discarded (as well).</p></dd>
</dl></dd>
</dl>
</li>
</ol></dd>
<dt><b class="const">start</b></dt>
<dd><p>The value is the serialization of the start parsing expression of the
grammar, as specified in the section <span class="sectref"><a href="#section7">PE serialization format</a></span>.</p></dd>
</dl>
</li>
<li><p>The terminal symbols of the grammar are specified implicitly as the
set of all terminal symbols used in the start expression and on the
RHS of the grammar rules.</p></li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a grammar has the format as specified
in the previous item, and then additionally satisfies the constraints
below, which make it unique among all the possible serializations of
this grammar.</p>
<ol class="doctools_enumerated">
<li><p>The keys found in all the nested Tcl dictionaries are sorted in
ascending dictionary order, as generated by Tcl's builtin command
<b class="cmd">lsort -increasing -dict</b>.</p></li>
<li><p>The string representation of the value is the canonical representation
of a Tcl dictionary. I.e. it does not contain superfluous whitespace.</p></li>
</ol></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example</a></h3>
<p>Assuming the following PEG for simple mathematical expressions</p>
<pre class="doctools_example">
PEG calculator (Expression)
    Digit      &lt;- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9'       ;
    Sign       &lt;- '-' / '+'                                     ;
    Number     &lt;- Sign? Digit+                                  ;
    Expression &lt;- Term (AddOp Term)*                            ;
    MulOp      &lt;- '*' / '/'                                     ;
    Term       &lt;- Factor (MulOp Factor)*                        ;
    AddOp      &lt;- '+'/'-'                                       ;
    Factor     &lt;- '(' Expression ')' / Number                   ;
END;
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
pt::grammar::peg {
    rules {
        AddOp      {is {/ {t -} {t +}}                                                                mode value}
        Digit      {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}}                mode value}
        Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}}                                        mode value}
        Factor     {is {/ {x {t (} {n Expression} {t )}} {n Number}}                                  mode value}
        MulOp      {is {/ {t *} {t /}}                                                                mode value}
        Number     {is {x {? {n Sign}} {+ {n Digit}}}                                                 mode value}
        Sign       {is {/ {t -} {t +}}                                                                mode value}
        Term       {is {x {n Factor} {* {x {n MulOp} {n Factor}}}}                                    mode value}
    }
    start {n Expression}
}
</pre>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">PE serialization format</a></h2>
<p>Here we specify the format used by the Parser Tools to serialize
Parsing Expressions as immutable values for transport, comparison,
etc.</p>
<p>We distinguish between <i class="term">regular</i> and <i class="term">canonical</i>
serializations.
While a parsing expression may have more than one regular
serialization only exactly one of them will be <i class="term">canonical</i>.</p>
<dl class="doctools_definitions">
<dt>Regular serialization</dt>
<dd><dl class="doctools_definitions">
<dt><b class="const">Atomic Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>The string <b class="const">epsilon</b> is an atomic parsing expression. It matches
the empty string.</p></li>
<li><p>The string <b class="const">dot</b> is an atomic parsing expression. It matches
any character.</p></li>
<li><p>The string <b class="const">alnum</b> is an atomic parsing expression. It matches
any Unicode alphabet or digit character. This is a custom extension of
PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">alpha</b> is an atomic parsing expression. It matches
any Unicode alphabet character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ascii</b> is an atomic parsing expression. It matches
any Unicode character below U0080. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">control</b> is an atomic parsing expression. It matches
any Unicode control character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">digit</b> is an atomic parsing expression. It matches
any Unicode digit character. Note that this includes characters
outside of the [0..9] range. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">graph</b> is an atomic parsing expression. It matches
any Unicode printing character, except for space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">lower</b> is an atomic parsing expression. It matches
any Unicode lower-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">print</b> is an atomic parsing expression. It matches
any Unicode printing character, including space. This is a custom
extension of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">punct</b> is an atomic parsing expression. It matches
any Unicode punctuation character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">space</b> is an atomic parsing expression. It matches
any Unicode space character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">upper</b> is an atomic parsing expression. It matches
any Unicode upper-case alphabet character. This is a custom extension
of PEs based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">wordchar</b> is an atomic parsing expression. It
matches any Unicode word character. This is any alphanumeric character
(see alnum), and any connector punctuation characters (e.g.
underscore). This is a custom extension of PEs based on Tcl's builtin
command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">xdigit</b> is an atomic parsing expression. It matches
any hexadecimal digit character. This is a custom extension of PEs
based on Tcl's builtin command <b class="cmd">string is</b>.</p></li>
<li><p>The string <b class="const">ddigit</b> is an atomic parsing expression. It matches
any decimal digit character. This is a custom extension of PEs based
on Tcl's builtin command <b class="cmd">regexp</b>.</p></li>
<li><p>The expression
    [list t <b class="variable">x</b>]
is an atomic parsing expression. It matches the terminal string <b class="variable">x</b>.</p></li>
<li><p>The expression
    [list n <b class="variable">A</b>]
is an atomic parsing expression. It matches the nonterminal <b class="variable">A</b>.</p></li>
</ol></dd>
<dt><b class="const">Combined Parsing Expressions</b></dt>
<dd><ol class="doctools_enumerated">
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list / <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">ordered choice</i>, aka <i class="term">prioritized choice</i>.</p></li>
<li><p>For parsing expressions <b class="variable">e1</b>, <b class="variable">e2</b>, ... the result of
    [list x <b class="variable">e1</b> <b class="variable">e2</b> ... ]
is a parsing expression as well.
This is the <i class="term">sequence</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list * <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">kleene closure</i>, describing zero or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list + <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">positive kleene closure</i>, describing one or more
repetitions.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list &amp; <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">and lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ! <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">not lookahead predicate</i>.</p></li>
<li><p>For a parsing expression <b class="variable">e</b> the result of
    [list ? <b class="variable">e</b>]
is a parsing expression as well.
This is the <i class="term">optional input</i>.</p></li>
</ol></dd>
</dl></dd>
<dt>Canonical serialization</dt>
<dd><p>The canonical serialization of a parsing expression has the format as
specified in the previous item, and then additionally satisfies the
constraints below, which make it unique among all the possible
serializations of this parsing expression.</p>
<ol class="doctools_enumerated">
<li><p>The string representation of the value is the canonical representation
of a pure Tcl list. I.e. it does not contain superfluous whitespace.</p></li>
<li><p>Terminals are <em>not</em> encoded as ranges (where start and end of the
range are identical).</p></li>
</ol></dd>
</dl>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Example</a></h3>
<p>Assuming the parsing expression shown on the right-hand side of the
rule</p>
<pre class="doctools_example">
    Expression &lt;- Term (AddOp Term)*
</pre>
<p>then its canonical serialization (except for whitespace) is</p>
<pre class="doctools_example">
    {x {n Term} {* {x {n AddOp} {n Term}}}}
</pre>
</div>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/pt/pt_util.html.









































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180

<div class='fossil-doc' data-title='pt::util - Parser Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::util(n) 1.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::util - General utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::ast <span class="opt">?1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::util</b> <b class="method">error2readable</b> <i class="arg">error</i> <i class="arg">text</i></a></li>
<li><a href="#2"><b class="cmd">::pt::util</b> <b class="method">error2position</b> <i class="arg">error</i> <i class="arg">text</i></a></li>
<li><a href="#3"><b class="cmd">::pt::util</b> <b class="method">error2text</b> <i class="arg">error</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides general utility commands.</p>
<p>This is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::util</b> <b class="method">error2readable</b> <i class="arg">error</i> <i class="arg">text</i></a></dt>
<dd><p>This command takes the structured form of a syntax <i class="arg">error</i> as
thrown by parser runtimes and the input <i class="arg">text</i> to the parser which
caused that error and returns a string describing the error in a
human-readable form.</p>
<p>The input <i class="arg">text</i> is required to convert the character
position of the error into a more readable line/column format, and to
provide excerpts of the input around the error position.</p></dd>
<dt><a name="2"><b class="cmd">::pt::util</b> <b class="method">error2position</b> <i class="arg">error</i> <i class="arg">text</i></a></dt>
<dd><p>This command takes the structured form of a syntax <i class="arg">error</i> as
thrown by parser runtimes and the input <i class="arg">text</i> to the parser which
caused that error and returns a 2-element list containing the line
number and column index for the error's character position in the
input, in this order.</p></dd>
<dt><a name="3"><b class="cmd">::pt::util</b> <b class="method">error2text</b> <i class="arg">error</i></a></dt>
<dd><p>This command takes the structured form of a syntax <i class="arg">error</i> as
thrown by parser runtimes and returns a list of strings, each
describing a possible expected input in a human-readable form.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/rc4/rc4.html.

































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224

<div class='fossil-doc' data-title='rc4 - RC4 Stream Cipher'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">rc4(n) 1.1.0 tcllib &quot;RC4 Stream Cipher&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rc4 - Implementation of the RC4 stream cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">AUTHORS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">rc4 <span class="opt">?1.1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::rc4::rc4</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key keyvalue</i> <span class="opt">?<i class="arg">-command lst</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> [ <i class="arg">-in channel</i> | <i class="arg">-infile filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::rc4::RC4Init</b> <i class="arg">keydata</i></a></li>
<li><a href="#3"><b class="cmd">::rc4::RC4</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::rc4::RC4Final</b> <i class="arg">Key</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is an implementation in Tcl of the RC4 stream cipher
developed by Ron Rivest of RSA Data Security Inc. The cipher was a
trade secret of RSA but was reverse-engineered and published to the
internet in 1994. It is used in a number of network protocols for
securing communications. To evade trademark restrictions this cipher
is sometimes known as ARCFOUR.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::rc4::rc4</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key keyvalue</i> <span class="opt">?<i class="arg">-command lst</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> [ <i class="arg">-in channel</i> | <i class="arg">-infile filename</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>Perform the RC4 algorithm on either the data provided by the argument
or on the data read from the <i class="arg">-in</i> channel. If an <i class="arg">-out</i>
channel is given then the result will be written to this channel.
Giving the <i class="arg">-hex</i> option will return a hexadecimal encoded
version of the result if not using an <i class="arg">-out</i> channel.</p>
<p>The data to be processes can be specified either as a string argument to
the rc4 command, or as a filename or a pre-opened channel. If the
<i class="arg">-infile</i> argument is given then the file is opened, the data read
and processed and the file is closed. If the <i class="arg">-in</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed. If the <i class="arg">-out</i> argument is given then the
processing result is written to this channel.</p>
<p>If <i class="arg">-command</i> is provided then the rc4 command does not return
anything. Instead the command provided is called with the rc4 result data
appended as the final parameter. This is most useful when reading from Tcl
channels as a fileevent is setup on the channel and the data processed in
chunks</p>
<p>Only one of <i class="arg">-infile</i>, <i class="arg">-in</i> or <i class="arg">string</i> should be given.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROGRAMMING INTERFACE</a></h2>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">::rc4::RC4Init</b> <i class="arg">keydata</i></a></dt>
<dd><p>Initialize a new RC4 key. The <i class="arg">keydata</i> is any amount of binary
data and is used to initialize the cipher internal state.</p></dd>
<dt><a name="3"><b class="cmd">::rc4::RC4</b> <i class="arg">Key</i> <i class="arg">data</i></a></dt>
<dd><p>Encrypt or decrypt the input data using the key obtained by calling
<b class="cmd">RC4Init</b>.</p></dd>
<dt><a name="4"><b class="cmd">::rc4::RC4Final</b> <i class="arg">Key</i></a></dt>
<dd><p>This should be called to clean up resources associated with
<i class="arg">Key</i>. Once this function has been called the key is destroyed.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% set keydata [binary format H* 0123456789abcdef]
% rc4::rc4 -hex -key $keydata HelloWorld
3cf1ae8b7f1c670b612f
% rc4::rc4 -hex -key $keydata [binary format H* 3cf1ae8b7f1c670b612f]
HelloWorld
</pre>
<pre class="doctools_example">
 set Key [rc4::RC4Init &quot;key data&quot;]
 append ciphertext [rc4::RC4 $Key $plaintext]
 append ciphertext [rc4::RC4 $Key $additional_plaintext]
 rc4::RC4Final $Key
</pre>
<pre class="doctools_example">
 proc ::Finish {myState data} {
     DoStuffWith $myState $data
 }
 rc4::rc4 -in $socket -command [list ::Finish $ApplicationState]
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rc4</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../aes/aes.html">aes(n)</a>, <a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../des/des.html">des(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key125">arcfour</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key123">rc4</a>, <a href="../../../../index.html#key122">security</a>, <a href="../../../../index.html#key126">stream cipher</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/rcs/rcs.html.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<div class='fossil-doc' data-title='rcs - RCS low level utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">rcs(n) 2.0.2 tcllib &quot;RCS low level utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rcs - RCS low level utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">TEXT DICT DATA STRUCTURE</a></li>
<li class="doctools_section"><a href="#section4">RCS PATCH FORMAT</a></li>
<li class="doctools_section"><a href="#section5">RCS PATCH COMMAND LIST</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">rcs <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::rcs::text2dict</b> <i class="arg">text</i></a></li>
<li><a href="#2"><b class="cmd">::rcs::dict2text</b> <i class="arg">dict</i></a></li>
<li><a href="#3"><b class="cmd">::rcs::file2dict</b> <i class="arg">filename</i></a></li>
<li><a href="#4"><b class="cmd">::rcs::dict2file</b> <i class="arg">filename</i> <i class="arg">dict</i></a></li>
<li><a href="#5"><b class="cmd">::rcs::decodeRcsPatch</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd">::rcs::encodeRcsPatch</b> <i class="arg">pcmds</i></a></li>
<li><a href="#7"><b class="cmd">::rcs::applyRcsPatch</b> <i class="arg">text</i> <i class="arg">pcmds</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <i class="term">Revision Control System</i>, short <i class="term"><a href="../../../../index.html#key633">RCS</a></i>, is a set of
applications and related data formats which allow a system to persist
the history of changes to a text. It, and its relative SCCS are the
basis for many other such systems, like <i class="term"><a href="../../../../index.html#key634">CVS</a></i>, etc.</p>
<p>This package <em>does not</em> implement RCS.</p>
<p>It only provides a number of low level commands which should be useful
in the implementation of any revision management system, namely:</p>
<ol class="doctools_enumerated">
<li><p>The conversion of texts into and out of a data structures which allow
the easy modification of such text by <i class="term">patches</i>, i.e. sequences
of instructions for the transformation of one text into an other.</p></li>
<li><p>And the conversion of one particular format for patches, the so-called
<i class="term">RCS patches</i>, into and out of data structures which allow
their easy application to texts.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::rcs::text2dict</b> <i class="arg">text</i></a></dt>
<dd><p>Converts the argument <i class="arg">text</i> into a dictionary containing and
representing the same text in an indexed form and returns that
dictionary as its result.
More information about the format of the result can be found in
section <span class="sectref"><a href="#section3">TEXT DICT DATA STRUCTURE</a></span>. This command returns the
<i class="term">canonical</i> representation of the input.</p></dd>
<dt><a name="2"><b class="cmd">::rcs::dict2text</b> <i class="arg">dict</i></a></dt>
<dd><p>This command provides the complementary operation to
<b class="cmd">::rcs::text2dict</b>. It converts a dictionary in the form described
in section <span class="sectref"><a href="#section3">TEXT DICT DATA STRUCTURE</a></span> back into a text and
returns that text as its result. The command does accept non-canonical
representations of the text as its input.</p></dd>
<dt><a name="3"><b class="cmd">::rcs::file2dict</b> <i class="arg">filename</i></a></dt>
<dd><p>This command is identical to <b class="cmd">::rcs::text2dict</b>, except that it
reads the text to convert from the file with path <i class="arg">filename</i>. The
file has to exist and must be readable as well.</p></dd>
<dt><a name="4"><b class="cmd">::rcs::dict2file</b> <i class="arg">filename</i> <i class="arg">dict</i></a></dt>
<dd><p>This command is identical to <b class="cmd">::rcs::2dict2text</b>, except that it
stores the resulting text in the file with path <i class="arg">filename</i>. The
file is created if it did not exist, and must be writable. The result
of the command is the empty string.</p></dd>
<dt><a name="5"><b class="cmd">::rcs::decodeRcsPatch</b> <i class="arg">text</i></a></dt>
<dd><p>Converts the <i class="arg">text</i> argument into a patch command list (PCL) as
specified in the section <span class="sectref"><a href="#section5">RCS PATCH COMMAND LIST</a></span> and
returns this list as its result.
It is assumed that the input text is in <i class="term"><a href="../../../../index.html#key635">diff -n format</a></i>, also
known as <i class="term"><a href="../../../../index.html#key632">RCS patch</a></i> format, as specified in the section
<span class="sectref"><a href="#section4">RCS PATCH FORMAT</a></span>.
Please note that the command ignores no-ops in the input, in other
words the resulting PCL contains only instructions doing something.</p></dd>
<dt><a name="6"><b class="cmd">::rcs::encodeRcsPatch</b> <i class="arg">pcmds</i></a></dt>
<dd><p>This command provides the complementary operation to
<b class="cmd">::rcs::decodeRcsPatch</b>. It convert a patch comand list (PCL) list
as specified in the section <span class="sectref"><a href="#section5">RCS PATCH COMMAND LIST</a></span> back
into a text in <span class="sectref"><a href="#section4">RCS PATCH FORMAT</a></span> and returns that text as its result.</p>
<p>Note that this command and <b class="cmd">::rcs::decodeRcsPatch</b> are not exactly
complementary, as the latter strips no-ops from its input, which the
encoder cannot put back anymore into the generated RCS patch. In other
words, the result of a decode/encode step may not match the original
input at the character level, but it will match it at the functional
level.</p></dd>
<dt><a name="7"><b class="cmd">::rcs::applyRcsPatch</b> <i class="arg">text</i> <i class="arg">pcmds</i></a></dt>
<dd><p>This operation applies a patch in the form of a PCL to a text given in
the form of a dictionary and returns the modified text, again as
dictionary, as its result.</p>
<p>To handle actual text use the commands <b class="cmd">::rcs::text2dict</b> (or
equivalent) and <b class="cmd">::rcs::decodeRcsPatch</b> to transform the inputs
into data structures acceptable to this command. Analogously use the
command <b class="cmd">::rcs::dict2text</b> (or equivalent) to transform the
result of this command into actuall text as required.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TEXT DICT DATA STRUCTURE</a></h2>
<p>A text dictionary is a dictionary whose keys are integer numbers and
text strings as the associated values. The keys represent the line
numbers of a text and the values the text of that line.  Note that one
text can have many representations as a dictionary, as the index
values only have to be properly ordered for reconstruction, their
exact values do not matter. Similarly the strings may actually span
multiple physical lines.</p>
<p>The text</p>
<pre class="doctools_example">Hello World,
how are you ?
Fine, and you ?</pre>
<p>for example can be represented by</p>
<pre class="doctools_example">{{1 {Hello World,}} {2 {how are you ?}} {3 {Fine, and you ?}}}</pre>
<p>or</p>
<pre class="doctools_example">{{5 {Hello World,}} {8 {how are you ?}} {9 {Fine, and you ?}}}</pre>
<p>or</p>
<pre class="doctools_example">{{-1 {Hello World,
how are you ?}} {4 {Fine, and you ?}}}</pre>
<p>The first dictionary is the <i class="term">canonical</i> representation of the
text, with line numbers starting at <b class="const">1</b>, increasing in steps of
<b class="const">1</b> and without gaps, and each value representing exactly one
physical line.</p>
<p>All the commands creating dictionaries from text will return the
canonical representation of their input text. The commands taking a
dictionary and returning text will generally accept all
representations, canonical or not.</p>
<p>The result of applying a patch to a text dictionary will in general
cause the dictionary to become non-canonical.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">RCS PATCH FORMAT</a></h2>
<p>A <i class="term"><a href="../../../../index.html#key662">patch</a></i> is in general a series of instructions how to transform
an input text T into a different text T', and also encoded in text
form as well.</p>
<p>The text format for patches understood by this package is a very
simple one, known under the names <i class="term"><a href="../../../../index.html#key632">RCS patch</a></i> or
<i class="term"><a href="../../../../index.html#key635">diff -n format</a></i>.</p>
<p>Patches in this format contain only two different commands, for the
deletion of old text, and addition of new text. The replacement of
some text by a different text is handled as combination of a deletion
following by an addition.</p>
<p>The format is line oriented, with each line containing either a
command or text data associated with the preceding command.
The first line of a <i class="term"><a href="../../../../index.html#key632">RCS patch</a></i> is always a command line.</p>
<p>The commands are:</p>
<dl class="doctools_definitions">
<dt>&quot;&quot;</dt>
<dd><p>The empty line is a command which does nothing.</p></dd>
<dt>&quot;a<b class="variable">start</b> <b class="variable">n</b>&quot;</dt>
<dd><p>A line starting with the character <b class="const">a</b> is a command for the
addition of text to the output. It is followed by <b class="variable">n</b> lines of
text data. When applying the patch the data is added just between the
lines <b class="variable">start</b> and <b class="variable">start</b>+1. The same effect is had by
appending the data to the existing text on line <b class="variable">start</b>. A
non-existing line <b class="variable">start</b> is created.</p></dd>
<dt>&quot;d<b class="variable">start</b> <b class="variable">n</b>&quot;</dt>
<dd><p>A line starting with the character <b class="const">d</b> is a command for the
deletion of text from the output. When applied it deletes <b class="variable">n</b>
lines of text, and the first line deleted is at index <b class="variable">start</b>.</p></dd>
</dl>
<p>Note that the line indices <b class="variable">start</b> always refer to the text which
is transformed as it is in its original state, without taking the
precending changes into account.</p>
<p>Note also that the instruction have to be applied in the order they
occur in the patch, or in a manner which produces the same result as
in-order application.</p>
<p>This is the format of results returned by the command
<b class="cmd">::rcs::decodeRcsPatch</b> and accepted by the commands
<b class="cmd">::rcs::encodeRcsPatch</b> and <b class="cmd">::rcs::appplyRcsPatch</b>
resp.
Note however that the decoder will strip no-op commands, and the
encoder will not generate no-ops, making them not fully complementary
at the textual level, only at the functional level.</p>
<p>And example of a RCS patch is</p>
<pre class="doctools_example">d1 2
d4 1
a4 2
The named is the mother of all things.
a11 3
They both may be called deep and profound.
Deeper and more profound,
The door of all subtleties!</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">RCS PATCH COMMAND LIST</a></h2>
<p>Patch command lists (sort: PCL's) are the data structures generated by
patch decoder command and accepted by the patch encoder and applicator
commands. They represent RCS patches in the form of Tcl data
structures.</p>
<p>A PCL is a list where each element represents a single patch
instruction, either an addition, or a deletion. The elements are lists
themselves, where the first item specifies the command and the
remainder represent the arguments of the command.</p>
<dl class="doctools_definitions">
<dt>a</dt>
<dd><p>This is the instruction for the addition of text. It has two
arguments, the index of the line where to add the text, and the text
to add, in this order.</p></dd>
<dt>d</dt>
<dd><p>This is the instruction for the deletion of text. It has two
arguments, the index of the line where to start deleting text, and the
number of lines to delete, in this order.</p></dd>
</dl>
<p>This is the format returned by the patch decoder command and accepted
as input by the patch encoder and applicator commands.</p>
<p>An example for a patch command is shown below, it represents the
example RCS patch found in section <span class="sectref"><a href="#section4">RCS PATCH FORMAT</a></span>.</p>
<pre class="doctools_example">{{d 1 2} {d 4 1} {a 4 {The named is the mother of all things.
}} {a 11 {They both may be called deep and profound.
Deeper and more profound,
The door of all subtleties!}}}</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rcs</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../../../../index.html#key327">struct</a>, <a href="../textutil/textutil.html">textutil</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key634">CVS</a>, <a href="../../../../index.html#key633">RCS</a>, <a href="../../../../index.html#key632">RCS patch</a>, <a href="../../../../index.html#key631">SCCS</a>, <a href="../../../../index.html#key635">diff -n format</a>, <a href="../../../../index.html#key636">patching</a>, <a href="../../../../index.html#key638">text conversion</a>, <a href="../../../../index.html#key637">text differences</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2005, Colin McCormack &lt;coldstore@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/report/report.html.













































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470

<div class='fossil-doc' data-title='report - Matrix reports'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">report(n) 0.3.2 tcllib &quot;Matrix reports&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>report - Create and manipulate report objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">REGIONS</a></li>
<li class="doctools_section"><a href="#section3">LINES</a></li>
<li class="doctools_section"><a href="#section4">TEMPLATES</a></li>
<li class="doctools_section"><a href="#section5">STYLES</a></li>
<li class="doctools_section"><a href="#section6">REPORT METHODS</a></li>
<li class="doctools_section"><a href="#section7">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">report <span class="opt">?0.3.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::report::report</b> <i class="arg">reportName</i> <i class="arg">columns</i> <span class="opt">?<b class="const">style</b> <i class="arg">style arg...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">reportName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::report::defstyle</b> <i class="arg">styleName arguments script</i></a></li>
<li><a href="#4"><b class="cmd">::report::rmstyle</b> <i class="arg">styleName</i></a></li>
<li><a href="#5"><b class="cmd">::report::stylearguments</b> <i class="arg">styleName</i></a></li>
<li><a href="#6"><b class="cmd">::report::stylebody</b> <i class="arg">styleName</i></a></li>
<li><a href="#7"><b class="cmd">::report::styles</b></a></li>
<li><a href="#8"><i class="arg">reportName</i> <b class="method">destroy</b></a></li>
<li><a href="#9"><i class="arg">reportName</i> <i class="arg">templatecode</i> <b class="method">disable</b>|<b class="method">enable</b></a></li>
<li><a href="#10"><i class="arg">reportName</i> <i class="arg">templatecode</i> <b class="method">enabled</b></a></li>
<li><a href="#11"><i class="arg">reportName</i> <i class="arg">templatecode</i> <b class="method">get</b></a></li>
<li><a href="#12"><i class="arg">reportName</i> <i class="arg">templatecode</i> <b class="method">set</b> <i class="arg">templatedata</i></a></li>
<li><a href="#13"><i class="arg">reportName</i> <b class="method">tcaption</b> <span class="opt">?<i class="arg">size</i>?</span></a></li>
<li><a href="#14"><i class="arg">reportName</i> <b class="method">bcaption</b> <i class="arg">size</i></a></li>
<li><a href="#15"><i class="arg">reportName</i> <b class="cmd">size</b> <i class="arg">column</i> <span class="opt">?<i class="arg">number</i>|<b class="const">dyn</b>?</span></a></li>
<li><a href="#16"><i class="arg">reportName</i> <b class="cmd">sizes</b> <span class="opt">?<i class="arg">size-list</i>?</span></a></li>
<li><a href="#17"><i class="arg">reportName</i> <b class="cmd">pad</b> <i class="arg">column</i> <span class="opt">?<b class="const">left</b>|<b class="const">right</b>|<b class="const">both</b> <span class="opt">?<i class="arg">padstring</i>?</span>?</span></a></li>
<li><a href="#18"><i class="arg">reportName</i> <b class="cmd">justify</b> <i class="arg">column</i> <span class="opt">?<b class="const">left</b>|<b class="const">right</b>|<b class="const">center</b>?</span></a></li>
<li><a href="#19"><i class="arg">reportName</i> <b class="cmd">printmatrix</b> <i class="arg">matrix</i></a></li>
<li><a href="#20"><i class="arg">reportName</i> <b class="cmd">printmatrix2channel</b> <i class="arg">matrix chan</i></a></li>
<li><a href="#21"><i class="arg">reportName</i> <b class="cmd"><a href="../../../../index.html#key507">columns</a></b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides report objects which can be used by the
formatting methods of matrix objects to generate tabular reports of
the matrix in various forms. The report objects defined here break
each report down into three <span class="sectref"><a href="#section2">REGIONS</a></span> and ten classes of
<i class="term"><a href="../../../../index.html#key510">lines</a></i> (various separator- and data-lines). See the following
section for more detailed explanations.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::report::report</b> <i class="arg">reportName</i> <i class="arg">columns</i> <span class="opt">?<b class="const">style</b> <i class="arg">style arg...</i>?</span></a></dt>
<dd><p>Creates a new report object for a report having <i class="arg">columns</i> columns
with an associated global Tcl command whose name is
<i class="arg">reportName</i>. This command may be used to invoke various
configuration operations on the report. It has the following general
form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">reportName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command. See section <span class="sectref"><a href="#section6">REPORT METHODS</a></span> for more
explanations. If no <b class="const">style</b> is specified the report will use
the builtin style <b class="const">plain</b> as its default configuration.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::report::defstyle</b> <i class="arg">styleName arguments script</i></a></dt>
<dd><p>Defines the new style <i class="arg">styleName</i>. See section <span class="sectref"><a href="#section5">STYLES</a></span>
for more information.</p></dd>
<dt><a name="4"><b class="cmd">::report::rmstyle</b> <i class="arg">styleName</i></a></dt>
<dd><p>Deletes the style <i class="arg">styleName</i>. Trying to delete an unknown or
builtin style will result in an error. Beware, this command will not
check that there are no other styles depending on the deleted
one. Deleting a style which is still used by another style FOO will
result in a runtime error when FOO is applied to a newly instantiated
report.</p></dd>
<dt><a name="5"><b class="cmd">::report::stylearguments</b> <i class="arg">styleName</i></a></dt>
<dd><p>This introspection command returns the list of arguments associated
with the style <i class="arg">styleName</i>.</p></dd>
<dt><a name="6"><b class="cmd">::report::stylebody</b> <i class="arg">styleName</i></a></dt>
<dd><p>This introspection command returns the script associated with the
style <i class="arg">styleName</i>.</p></dd>
<dt><a name="7"><b class="cmd">::report::styles</b></a></dt>
<dd><p>This introspection command returns a list containing the names of all
styles known to the package at the time of the call. The order of the
names in the list reflects the order in which the styles were
created. In other words, the first item is the predefined style
<b class="const">plain</b>, followed by the first style defined by the user, and
so on.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">REGIONS</a></h2>
<p>The three regions are the <i class="term">top caption</i>,
<i class="term">data area</i> and <i class="term">bottom caption</i>. These are,
roughly speaking, the title, the values to report and a title at the
bottom. The size of the caption regions can be specified by the user
as the number of rows they occupy in the matrix to format. The size of
the data area is specified implicitly.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LINES</a></h2>
<p><span class="sectref"><a href="#section4">TEMPLATES</a></span> are associated with each of the ten line classes,
defining the formatting for this kind of line. The user is able to
enable and disable the separator lines at will, but not the data
lines. Their usage is solely determined by the number of rows
contained in the three regions. Data lines and all enabled separators
must have a template associated with them.</p>
<p>Note that the data-lines in a report and the rows in the matrix the
report was generated from are <em>not</em> in a 1:1 relationship if
any row in the matrix has a height greater than one.</p>
<p>The different kinds of lines and the codes used by the report methods
to address them are:</p>
<dl class="doctools_definitions">
<dt><b class="const">top</b></dt>
<dd><p>The topmost line of a report. Separates the report from anything which
came before it. The user can enable the usage of this line at will.</p></dd>
<dt><b class="const">topdatasep</b></dt>
<dd><p>This line is used to separate the data rows in the top caption region,
if it contains more than one row and the user enabled its usage.</p></dd>
<dt><b class="const">topcapsep</b></dt>
<dd><p>This line is used to separate the top caption and data regions, if the
top caption is not empty and the user enabled its usage.</p></dd>
<dt><b class="const">datasep</b></dt>
<dd><p>This line is used to separate the data rows in the data region, if it
contains more than one row and the user enabled its usage.</p></dd>
<dt><b class="const">botcapsep</b></dt>
<dd><p>This line is used to separate the data and bottom caption regions, if
the bottom caption is not empty and the user enabled its usage.</p></dd>
<dt><b class="const">botdatasep</b></dt>
<dd><p>This line is used to separate the data rows in the bottom caption
region, if it contains more than one row and the user enabled its
usage.</p></dd>
<dt><b class="const">bottom</b></dt>
<dd><p>The bottommost line of a report. Separates the report from anything
which comes after it. The user can enable the usage of this line at
will.</p></dd>
<dt><b class="const">topdata</b></dt>
<dd><p>This line defines the format of data lines in the top caption region
of the report.</p></dd>
<dt><b class="const">data</b></dt>
<dd><p>This line defines the format of data lines in the data region of the
report.</p></dd>
<dt><b class="const">botdata</b></dt>
<dd><p>This line defines the format of data lines in the bottom caption
region of the report.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TEMPLATES</a></h2>
<p>Each template is a list of strings used to format the line it is
associated with. For a report containing <b class="variable">n</b> columns a template
for a data line has to contain &quot;<b class="variable">n</b>+1&quot; items and a template for a
separator line &quot;2*<b class="variable">n</b>+1&quot; items.</p>
<p>The items in a data template specify the strings used to separate the
column information. Together with the corresponding items in the
separator templates they form the vertical lines in the report.</p>
<p><em>Note</em> that the corresponding items in all defined templates
have to be of equal length. This will be checked by the report
object. The first item defines the leftmost vertical line and the last
item defines the rightmost vertical line. The item at index <b class="variable">k</b>
(&quot;1&quot;,...,&quot;<b class="variable">n</b>-2&quot;) separates the information in the columns
&quot;<b class="variable">k</b>-1&quot; and &quot;<b class="variable">k</b>&quot;.</p>
<p>The items in a separator template having an even-numbered index
(&quot;0&quot;,&quot;2&quot;,...)  specify the column separators. The item at index
&quot;2*<b class="variable">k</b>&quot; (&quot;0&quot;,&quot;2&quot;,...,&quot;2*<b class="variable">n</b>&quot;) corresponds to the items at
index &quot;<b class="variable">k</b>&quot; in the data templates.</p>
<p>The items in a separator template having an odd-numbered index
(&quot;1&quot;,&quot;3&quot;,...) specify the strings used to form the horizontal lines in
the separator lines. The item at index &quot;2*<b class="variable">k</b>+1&quot;
(&quot;1&quot;,&quot;3&quot;,...,&quot;2*<b class="variable">n</b>+1&quot;) corresponds to column &quot;<b class="variable">k</b>&quot;. When
generating the horizontal lines the items are replicated to be at
least as long as the size of their column and then cut to the exact
size.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">STYLES</a></h2>
<p>Styles are a way for the user of this package to define common
configurations for report objects and then use them later during the
actual instantiation of report objects. They are defined as tcl
scripts which when executed configure the report object into the
requested configuration.</p>
<p>The command to define styles is <b class="cmd">::report::defstyle</b>. Its last
argument is the tcl <b class="type">script</b> performing the actual
reconfiguration of the report object to obtain the requested style.</p>
<p>In this script the names of all previously defined styles are
available as commands, as are all commands found in a safe interpreter
and the configuration methods of report objects. The latter implicitly
operate on the object currently executing the style script. The
<b class="variable">arguments</b> declared here are available in the <b class="type">script</b> as
variables. When calling the command of a previously declared style all
the arguments expected by it have to be defined in the call.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">REPORT METHODS</a></h2>
<p>The following commands are possible for report objects:</p>
<dl class="doctools_definitions">
<dt><a name="8"><i class="arg">reportName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the report, including its storage space and associated
command.</p></dd>
<dt><a name="9"><i class="arg">reportName</i> <i class="arg">templatecode</i> <b class="method">disable</b>|<b class="method">enable</b></a></dt>
<dd><p>Enables or disables the usage of the template addressed by the
<i class="arg">templatecode</i>. Only the codes for separator lines are allowed
here. It is not possible to enable or disable data lines.</p>
<p>Enabling a template causes the report to check all used templates for
inconsistencies in the definition of the vertical lines (See section
<span class="sectref"><a href="#section4">TEMPLATES</a></span>).</p></dd>
<dt><a name="10"><i class="arg">reportName</i> <i class="arg">templatecode</i> <b class="method">enabled</b></a></dt>
<dd><p>Returns the whether the template addressed by the <i class="arg">templatecode</i>
is currently enabled or not.</p></dd>
<dt><a name="11"><i class="arg">reportName</i> <i class="arg">templatecode</i> <b class="method">get</b></a></dt>
<dd><p>Returns the template currently associated with the kind of line
addressed by the <i class="arg">templatecode</i>. All known templatecodes are
allowed here.</p></dd>
<dt><a name="12"><i class="arg">reportName</i> <i class="arg">templatecode</i> <b class="method">set</b> <i class="arg">templatedata</i></a></dt>
<dd><p>Sets the template associated with the kind of line addressed by the
<i class="arg">templatecode</i> to the new value in <i class="arg">templatedata</i>. See section
<span class="sectref"><a href="#section4">TEMPLATES</a></span> for constraints on the length of templates.</p></dd>
<dt><a name="13"><i class="arg">reportName</i> <b class="method">tcaption</b> <span class="opt">?<i class="arg">size</i>?</span></a></dt>
<dd><p>Specifies the <i class="arg">size</i> of the top caption region as the number rows
it occupies in the matrix to be formatted. Only numbers greater than
or equal to zero are allowed. If no <i class="arg">size</i> is specified the
command will return the current size instead.</p>
<p>Setting the size of the top caption to a value greater than zero
enables the corresponding data template and causes the report to check
all used templates for inconsistencies in the definition of the
vertical lines (See section <span class="sectref"><a href="#section4">TEMPLATES</a></span>).</p></dd>
<dt><a name="14"><i class="arg">reportName</i> <b class="method">bcaption</b> <i class="arg">size</i></a></dt>
<dd><p>Specifies the <i class="arg">size</i> of the bottom caption region as the number
rows it occupies in the matrix to be formatted. Only numbers greater
than or equal to zero are allowed. If no <i class="arg">size</i> is specified the
command will return the current size instead.</p>
<p>Setting the size of the bottom caption to a value greater than zero
enables the corresponding data template and causes the report to check
all used templates for inconsistencies in the definition of the
vertical lines (See section <span class="sectref"><a href="#section4">TEMPLATES</a></span>).</p></dd>
<dt><a name="15"><i class="arg">reportName</i> <b class="cmd">size</b> <i class="arg">column</i> <span class="opt">?<i class="arg">number</i>|<b class="const">dyn</b>?</span></a></dt>
<dd><p>Specifies the size of the <i class="arg">column</i> in the output. The value
<b class="const">dyn</b> means that the columnwidth returned by the matrix to be
formatted for the specified column shall be used. The formatting of
the column is dynamic. If a fixed <i class="arg">number</i> is used instead of
<b class="const">dyn</b> it means that the column has a width of that many
characters (padding excluded). Only numbers greater than zero are
allowed here.</p>
<p>If no size specification is given the command will return the current
size of the <i class="arg">column</i> instead.</p></dd>
<dt><a name="16"><i class="arg">reportName</i> <b class="cmd">sizes</b> <span class="opt">?<i class="arg">size-list</i>?</span></a></dt>
<dd><p>This method allows the user to specify the sizes of all columns in one
call. Its argument is a list containing the sizes to associate with
the columns. The first item is associated with column 0, the next with
column 1, and so on.</p>
<p>If no <i class="arg">size-list</i> is specified the command will return a list
containing the currently set sizes instead.</p></dd>
<dt><a name="17"><i class="arg">reportName</i> <b class="cmd">pad</b> <i class="arg">column</i> <span class="opt">?<b class="const">left</b>|<b class="const">right</b>|<b class="const">both</b> <span class="opt">?<i class="arg">padstring</i>?</span>?</span></a></dt>
<dd><p>This method allows the user to specify padding on the left, right or
both sides of a <i class="arg">column</i>. If the <i class="arg">padstring</i> is not specified
it defaults to a single space character. <em>Note</em>: An alternative
way of specifying the padding is to use vertical separator strings
longer than one character in the templates (See section
<span class="sectref"><a href="#section4">TEMPLATES</a></span>).</p>
<p>If no pad specification is given at all the command will return the
current state of padding for the column instead. This will be a list
containing two elements, the first element the left padding, the
second describing the right padding.</p></dd>
<dt><a name="18"><i class="arg">reportName</i> <b class="cmd">justify</b> <i class="arg">column</i> <span class="opt">?<b class="const">left</b>|<b class="const">right</b>|<b class="const">center</b>?</span></a></dt>
<dd><p>Declares how the cell values for a <i class="arg">column</i> are filled into the
report given the specified size of a column in the report.</p>
<p>For <b class="const">left</b> and <b class="const">right</b> justification a cell value
shorter than the width of the column is bound with its named edge to
the same edge of the column. The other side is filled with spaces. In
the case of <b class="const">center</b> the spaces are placed to both sides of the
value and the left number of spaces is at most one higher than the
right number of spaces.</p>
<p>For a value longer than the width of the column the value is cut at
the named edge. This means for <b class="const">left</b> justification that the
<em>tail</em> (i.e. the <b class="const">right</b> part) of the value is made
visible in the output. For <b class="const">center</b> the value is cut at both
sides to fit into the column and the number of characters cut at the
left side of the value is at most one less than the number of
characters cut from the right side.</p>
<p>If no justification was specified the command will return the current
justification for the column instead.</p></dd>
<dt><a name="19"><i class="arg">reportName</i> <b class="cmd">printmatrix</b> <i class="arg">matrix</i></a></dt>
<dd><p>Formats the <i class="arg">matrix</i> according to the configuration of the report
and returns the resulting string. The matrix has to have the same
number of columns as the report. The matrix also has to have enough
rows so that the top and bottom caption regions do not overlap. The
data region is allowed to be empty.</p></dd>
<dt><a name="20"><i class="arg">reportName</i> <b class="cmd">printmatrix2channel</b> <i class="arg">matrix chan</i></a></dt>
<dd><p>Formats the <i class="arg">matrix</i> according to the configuration of the report
and writes the result into the channel <i class="arg">chan</i>. The matrix has to
have the same number of columns as the report. The matrix also has to
have enough rows so that the top and bottom caption regions do not
overlap. The data region is allowed to be empty.</p></dd>
<dt><a name="21"><i class="arg">reportName</i> <b class="cmd"><a href="../../../../index.html#key507">columns</a></b></a></dt>
<dd><p>Returns the number of columns in the report.</p></dd>
</dl>
<p>The methods <b class="method">size</b>, <b class="method">pad</b> and <b class="method">justify</b> all take
a column index as their first argument. This index is allowed to use
all the forms of an index as accepted by the <b class="cmd">lindex</b> command. The
allowed range for indices is
	&quot;0,...,[<b class="variable">reportName</b> columns]-1&quot;.</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">EXAMPLES</a></h2>
<p>Our examples define some generally useful report styles.</p>
<p>A simple table with lines surrounding all information and vertical
separators, but without internal horizontal separators.</p>
<pre class="doctools_example">
    ::report::defstyle simpletable {} {
	data	set [split &quot;[string repeat &quot;| &quot;   [columns]]|&quot;]
	top	set [split &quot;[string repeat &quot;+ - &quot; [columns]]+&quot;]
	bottom	set [top get]
	top	enable
	bottom	enable
    }
</pre>
<p>An extension of a <b class="cmd">simpletable</b>, see above, with a title area.</p>
<pre class="doctools_example">
    ::report::defstyle captionedtable {{n 1}} {
	simpletable
	topdata   set [data get]
	topcapsep set [top get]
	topcapsep enable
	tcaption $n
    }
</pre>
<p>Given the definitions above now an example which actually formats a
matrix into a tabular report. It assumes that the matrix actually
contains useful data.</p>
<pre class="doctools_example">
    % ::struct::matrix m
    % # ... fill m with data, assume 5 columns
    % ::report::report r 5 style captionedtable 1
    % r printmatrix m
    +---+-------------------+-------+-------+--------+
    |000|VERSIONS:          |2:8.4a3|1:8.4a3|1:8.4a3%|
    +---+-------------------+-------+-------+--------+
    |001|CATCH return ok    |7      |13     |53.85   |
    |002|CATCH return error |68     |91     |74.73   |
    |003|CATCH no catch used|7      |14     |50.00   |
    |004|IF if true numeric |12     |33     |36.36   |
    |005|IF elseif          |15     |47     |31.91   |
    |   |true numeric       |       |       |        |
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % m format 2string r
</pre>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>report</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key107">report</a>, <a href="../../../../index.html#key106">table</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/rest/rest.html.















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567

<div class='fossil-doc' data-title='rest - A framework for RESTful web services'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">rest(n) 1.2 tcllib &quot;A framework for RESTful web services&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rest - define REST web APIs and call them inline or asychronously</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Simple usage</a></li>
<li class="doctools_section"><a href="#section3">Interface usage</a></li>
<li class="doctools_section"><a href="#section4">Examples</a></li>
<li class="doctools_section"><a href="#section5">INCLUDED</a></li>
<li class="doctools_section"><a href="#section6">TLS</a></li>
<li class="doctools_section"><a href="#section7">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">rest <span class="opt">?1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::rest::simple</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::rest::get</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::rest::post</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::rest::head</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::rest::put</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::rest::delete</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::rest::save</b> <i class="arg">name</i> <i class="arg">file</i></a></li>
<li><a href="#8"><b class="cmd">::rest::describe</b> <i class="arg">name</i></a></li>
<li><a href="#9"><b class="cmd">::rest::parameters</b> <i class="arg">url</i> <span class="opt">?<i class="arg">key</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::rest::parse_opts</b> <i class="arg">static</i> <i class="arg">required</i> <i class="arg">optional</i> <i class="arg">words</i></a></li>
<li><a href="#11"><b class="cmd">::rest::substitute</b> <i class="arg">string</i> <i class="arg">var</i></a></li>
<li><a href="#12"><b class="cmd">::rest::create_interface</b> <i class="arg">name</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>There are two types of usage this package supports: <i class="term">simple calls</i>,
and complete <i class="term">interfaces</i>.
In an <i class="term">interface</i> you specify a set of rules and then the package
builds the commands which correspond to the REST methods. These
commands can have many options such as input and output
transformations and data type specific formatting. This results in a
cleaner and simpler script.
On the other hand, while a <i class="term">simple call</i> is easier and quicker
to implement it is also less featureful. It takes the url and a few
options about the command and returns the result directly. Any
formatting or checking is up to rest of the script.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Simple usage</a></h2>
<p>In simple usage you make calls using the http method procedures and
then check or process the returned data yourself</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::rest::simple</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::rest::get</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="3"><b class="cmd">::rest::post</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">::rest::head</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">::rest::put</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="6"><b class="cmd">::rest::delete</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd><p>These commands are all equivalent except for the http method
used.
If you use <b class="cmd">simple</b> then the method should be specified as an
option in the <i class="arg">config</i> dictionary. If that is not done it defaults
to <b class="const">get</b>. If a <i class="arg">body</i> is needed then the <i class="arg">config</i>
dictionary must be present, however it is allowed to be empty.</p>
<p>The <i class="arg">config</i> dictionary supports the following keys</p>
<dl class="doctools_definitions">
<dt><b class="const">auth</b></dt>
<dd></dd>
<dt><b class="const">content-type</b></dt>
<dd></dd>
<dt><b class="const">cookie</b></dt>
<dd></dd>
<dt><b class="const">error-body</b></dt>
<dd></dd>
<dt><b class="const">format</b></dt>
<dd></dd>
<dt><b class="const">headers</b></dt>
<dd></dd>
<dt><b class="const">method</b></dt>
<dd></dd>
</dl>
<p>Two quick examples:</p>
<p>Example 1, Yahoo Boss:</p>
<pre class="doctools_example">
    set appid APPID
    set search tcl
    set res [rest::get http://boss.yahooapis.com/ysearch/web/v1/$search [list appid $appid]]
    set res [rest::format_json $res]
</pre>
<p>Example 2, Twitter:</p>
<pre class="doctools_example">
    set url   http://twitter.com/statuses/update.json
    set query [list status $text]
    set res [rest::simple $url $query {
        method post
        auth   {basic user password}
        format json
    }]
</pre>
</dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Interface usage</a></h2>
<p>An interface to a REST API consists of a series of definitions of REST
calls contained in an array.
The name of that array becomes a namespace containing the defined
commands. Each key of the array specifies the name of the call, with
the associated configuration a dictionary, i.e. key/value pairs.
The acceptable keys, i.e. legal configuration options are described
below.
After creating the definitions in the array simply calling
<b class="cmd">rest::create_interface</b> with the array as argument will then
create the desired commands.</p>
<p>Example, Yahoo Weather:</p>
<pre class="doctools_example">
    package require rest
    set yweather(forecast) {
       url      http://weather.yahooapis.com/forecastrss
       req_args { p: }
       opt_args { u: }
    }
    rest::create_interface yweather
    puts [yweather::forecast -p 94089]
</pre>
<dl class="doctools_definitions">
<dt><a name="7"><b class="cmd">::rest::save</b> <i class="arg">name</i> <i class="arg">file</i></a></dt>
<dd><p>This command saves a copy of the dynamically created procedures for
all the API calls specified in the array variable <i class="arg">name</i> to the
<i class="arg">file</i>, for later loading.</p>
<p>The result of the command is the empty string</p></dd>
<dt><a name="8"><b class="cmd">::rest::describe</b> <i class="arg">name</i></a></dt>
<dd><p>This command prints a description of all API calls specified in the array
variable <i class="arg">name</i> to the channel <b class="const">stdout</b>.</p>
<p>The result of the command is the empty string.</p></dd>
<dt><a name="9"><b class="cmd">::rest::parameters</b> <i class="arg">url</i> <span class="opt">?<i class="arg">key</i>?</span></a></dt>
<dd><p>This command parses an <i class="arg">url</i> query string into a dictionary and
returns said dictionary as its result.</p>
<p>If <i class="arg">key</i> is specified the command will not return the
entire dictionary, but only the value of that <i class="arg">key</i>.</p></dd>
<dt><a name="10"><b class="cmd">::rest::parse_opts</b> <i class="arg">static</i> <i class="arg">required</i> <i class="arg">optional</i> <i class="arg">words</i></a></dt>
<dd><p>This command implements a custom parserfor command options.</p>
<dl class="doctools_arguments">
<dt>dict <i class="arg">static</i></dt>
<dd><p>A dictionary of options and their values that are always present in
the output.</p></dd>
<dt>list <i class="arg">required</i></dt>
<dd><p>A list of options that must be supplied by <i class="arg">words</i></p></dd>
<dt>list <i class="arg">optional</i></dt>
<dd><p>A list of options that may appear in the <i class="arg">words</i>, but are not required.
The elements must be in one of three forms:</p>
<dl class="doctools_definitions">
<dt>name</dt>
<dd><p>The option may be present or not, no default.</p></dd>
<dt>name:</dt>
<dd><p>When present the option requires an argument.</p></dd>
<dt>name:value</dt>
<dd><p>When not present use <b class="const">value</b> as default.</p></dd>
</dl></dd>
<dt>list <i class="arg">words</i></dt>
<dd><p>The words to parse into options and values.</p></dd>
</dl>
<p>The result of the command is a list containing two elements.
The first element is a dictionary containing the parsed options and
their values.  The second element is a list of the remaining words.</p></dd>
<dt><a name="11"><b class="cmd">::rest::substitute</b> <i class="arg">string</i> <i class="arg">var</i></a></dt>
<dd><p>This command takes a <i class="arg">string</i>, substitutes values for any option
identifiers found inside and returns the modified string as its
results.</p>
<p>The values to substitute are found in the variable <i class="arg">var</i>,
which is expected to contain a dictionary mapping from the option
identifiers to replace to their values.
<em>Note</em> that option identifiers which have no key in <i class="arg">var</i> are
replaced with the empty string.</p>
<p>The option identifiers in <i class="arg">string</i> have to follow the
syntax <b class="const">%...%</b> where <b class="variable">...</b> may contain any combination of
lower-case alphanumeric characters, plus underscore, colon and dash.</p></dd>
<dt><a name="12"><b class="cmd">::rest::create_interface</b> <i class="arg">name</i></a></dt>
<dd><p>This command creates procedures for all the API calls specified in the
array variable <i class="arg">name</i>.</p>
<p>The name of that array becomes a namespace containing the defined
commands. Each key of the array specifies the name of the call, with
the associated configuration a dictionary, i.e. key/value pairs.
The legal keys and their meanings are:</p>
<dl class="doctools_definitions">
<dt><b class="const">url</b></dt>
<dd><p>The value of this <em>required</em> option must be the target of the
http request.</p></dd>
<dt><b class="const">description</b></dt>
<dd><p>The value of this option must be a short string describing the call.
Default to the empty string, if not specified.
Used only by <b class="cmd">::rest::describe</b>.</p></dd>
<dt><b class="const">body</b></dt>
<dd><p>The value of this option indicates if arguments are required for the
call's request body or not. The acceptable values are listed below.
Defaults to <b class="const">optional</b> if not specified.</p>
<dl class="doctools_definitions">
<dt><b class="const">none</b></dt>
<dd><p>The call has no request body, none must be supplied.</p></dd>
<dt><b class="const">optional</b></dt>
<dd><p>A request body can be supplied, but is not required.</p></dd>
<dt><b class="const">required</b></dt>
<dd><p>A request body must be supplied.</p></dd>
<dt><b class="const">argument</b></dt>
<dd><p>This value must be followed by the name of an option, treating the
entire string as a list. The request body will be used as the value of
that option.</p></dd>
<dt><b class="const">mime_multipart</b></dt>
<dd><p>A request body must be supplied and will be interpreted as each
argument representing one part of a mime/multipart document.
Arguments must be lists containing 2 elements, a list of header keys
and values, and the mime part body, in this order.</p></dd>
</dl></dd>
<dt><b class="const">method</b></dt>
<dd><p>The value of this option must be the name of the HTTP method to call
on the url.
Defaults to GET, if not specified.
The acceptable values are <b class="const">GET</b>, <b class="const">POST</b>, and <b class="const">PUT</b>,
regardless of letter-case.</p></dd>
<dt><b class="const">copy</b></dt>
<dd><p>When present the value of this option specifies the name of a
previously defined call. The definition of that call is copied to the
current call, except for the options specified by the current call
itself.</p></dd>
<dt><b class="const">unset</b></dt>
<dd><p>When present the value of this option contains a list of options in
the current call. These options are removed from the definition. Use
this after <b class="const">copy</b>ing an existing definition to remove options,
instead of overriding their value.</p></dd>
<dt><b class="const">headers</b></dt>
<dd><p>Specification of additional header fields. The value of this option
must be a dictionary, interpreted to contain the new header fields and
their values. The default is to not add any additional headers.</p></dd>
<dt><b class="const">content-type</b></dt>
<dd><p>The value of this option specifies the content type for the request data.</p></dd>
<dt><b class="const">req_args</b></dt>
<dd><p>The value of this option is a list naming the required arguments of
the call.  Names ending in a colon will require a value.</p></dd>
<dt><b class="const">opt_args</b></dt>
<dd><p>The value of this option a list naming the arguments that may be
present for a call but are not required.</p></dd>
<dt><b class="const">static_args</b></dt>
<dd><p>The value of this option a list naming the arguments that are always
the same.  No sense in troubling the user with these.  A leading dash
(<b class="const">-</b>) is allowed but not required to maintain consistency with
the command line.</p></dd>
<dt><b class="const">auth</b></dt>
<dd><p>The value of this option specifies how to authenticate the calls.
No authentication is done if the option is not specified.</p>
<dl class="doctools_definitions">
<dt><b class="const">basic</b></dt>
<dd><p>The user may configure the <i class="term">basic authentication</i> by overriding
the procedure <b class="cmd">basic_auth</b> in the namespace of interface. This
procedure takes two arguments, the username and password, in this
order.</p></dd>
<dt><b class="const">sign</b></dt>
<dd><p>The value must actually be a list with the second element the name of
a procedure which will be called to perform request signing.</p></dd>
</dl></dd>
<dt><b class="const">callback</b></dt>
<dd><p>If this option is present then the method will be created as an
<i class="term">async</i> call. Such calls will return immediately with the value
of the associated http token instead of the call's result. The event
loop must be active to use this option.</p>
<p>The value of this option is treated as a command prefix which
is invoked when the HTTP call is complete. The prefix will receive at
least two additional arguments, the name of the calling procedure and
the status of the result (one of <b class="const">OK</b> or <b class="const">ERROR</b>), in this
order.</p>
<p>In case of <b class="const">OK</b> a third argument is added, the data
associated with the result.</p>
<p>If and only if the <b class="const">ERROR</b> is a redirection, the location
redirected to will be added as argument.
Further, if the configuration key <b class="const">error-body</b> is set to
<b class="const">true</b> the data associated with the result will be added as
argument as well.</p>
<p>The http request header will be available in that procedure via
<b class="cmd">upvar token token</b>.</p></dd>
<dt><b class="const">cookie</b></dt>
<dd><p>The value of this option is a list of cookies to be passed in the http
header. This is a shortcut to the <b class="const">headers</b> option.</p></dd>
<dt><b class="const">input_transform</b></dt>
<dd><p>The value of this option is a command prefix or script to perform a
transformation on the query before invoking the call. A script
transform is wrapped into an automatically generated internal
procedure.</p>
<p>If not specified no transformation is done.</p>
<p>The command (prefix) must accept a single argument, the query
(a dictionary) to transform, and must return the modified query (again
as dictionary) as its result.
The request body is accessible in the transform command via
<b class="cmd">upvar body body</b>.</p></dd>
<dt><b class="const">format</b></dt>
<dd></dd>
<dt><b class="const">result</b></dt>
<dd><p>The value of this option specifies the format of the returned
data.
Defaults to <b class="const">auto</b> if not specified.
The acceptable values are:</p>
<dl class="doctools_definitions">
<dt><b class="const">auto</b></dt>
<dd><p>Auto detect between <b class="const">xml</b> and <b class="const">json</b>.</p></dd>
<dt><b class="const">discard</b></dt>
<dd></dd>
<dt><b class="const">json</b></dt>
<dd></dd>
<dt><b class="const">raw</b></dt>
<dd></dd>
<dt><b class="const">rss</b></dt>
<dd><p>This is formatted as a special case of <b class="const">xml</b>.</p></dd>
<dt><b class="const">tdom</b></dt>
<dd></dd>
<dt><b class="const">xml</b></dt>
<dd></dd>
</dl></dd>
<dt><b class="const">pre_transform</b></dt>
<dd><p>The value of this option is a command prefix or script to perform a
transformation on the result of a call (<em>before</em> the application
of the output transform as per <b class="const">format</b>). A script transform is
wrapped into an automatically generated internal procedure.</p>
<p>If not specified no transformation is done.</p>
<p>The command (prefix) must accept a single argument, the result
to transform, and must return the modified result as its result.</p>
<p>The http request header is accessible in the transform command
via <b class="cmd">upvar token token</b></p></dd>
<dt><b class="const">post_transform</b></dt>
<dd><p>The value of this option is a command prefix or script to perform a
transformation on the result of a call (<em>after</em> the application
of the output transform as per <b class="const">format</b>). A script transform is
wrapped into an automatically generated internal procedure.</p>
<p>If not specified no transformation is done.</p>
<p>The command (prefix) must accept a single argument, the result
to transform, and must return the modified result as its result.</p>
<p>The http request header is accessible in the transform command
via <b class="cmd">upvar token token</b></p></dd>
<dt><b class="const">check_result</b></dt>
<dd><p>The value of this option must be list of two expressions, either of
which may be empty.</p>
<p>The first expression is checks the OK condition, it must return
<b class="const">true</b> when the result is satisfactory, and <b class="const">false</b>
otherwise.</p>
<p>The second expression is the ERROR condition, it must return
<b class="const">false</b> unless there is an error, then it has to return
<b class="const">true</b>.</p></dd>
<dt><b class="const">error_body</b></dt>
<dd><p>The value of this option determines whether to return the response
when encountering an HTTP error, or not. The default is to not return
the response body on error.</p>
<p>See <b class="const">callback</b> above for more information.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Examples</a></h2>
<p>Yahoo Geo:</p>
<pre class="doctools_example">
set ygeo(parse) {
    url http://wherein.yahooapis.com/v1/document
    method post
    body { arg documentContent }
}
ygeo::parse &quot;san jose ca&quot;
# &quot;san jose ca&quot; will be interpreted as if it were specified as the -documentContent option
</pre>
<p>Google Docs:</p>
<pre class="doctools_example">
set gdocs(upload) {
    url http://docs.google.com/feeds/default/private/full
    body mime_multipart
}
gdocs::upload [list {Content-Type application/atom+xml} $xml] [list {Content-Type image/jpeg} $filedata]
</pre>
<p>Delicious:</p>
<pre class="doctools_example">
set delicious(updated) {
    url https://api.del.icio.us/v1/posts/update
    auth basic
}
rest::create_interface flickr
flickr::basic_auth username password
</pre>
<p>Flickr:</p>
<pre class="doctools_example">
set flickr(auth.getToken) {
   url http://api.flickr.com/services/rest/
   req_args { api_key: secret: }
   auth { sign do_signature }
}
rest::create_interface flickr
proc ::flickr::do_signature {query} {
    # perform some operations on the query here
    return $query
}
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">INCLUDED</a></h2>
<p>The package provides functional but incomplete implementations for the following services:</p>
<dl class="doctools_definitions">
<dt><b class="const">del.icio.us</b></dt>
<dd></dd>
<dt><b class="const">facebook</b></dt>
<dd></dd>
<dt><b class="const">flickr</b></dt>
<dd></dd>
<dt><b class="const">twitter</b></dt>
<dd></dd>
<dt><b class="const">google calendar</b></dt>
<dd></dd>
<dt><b class="const">yahoo boss</b></dt>
<dd></dd>
<dt><b class="const">yahoo weather</b></dt>
<dd></dd>
</dl>
<p>Please either read the package's implementation, or use
<b class="cmd">rest::describe</b> after loading it for their details.</p>
<p>Do not forget developers' documentation on the respective sites either.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">TLS</a></h2>
<p>The <b class="package">rest</b> package can be used with <i class="term">https</i>-secured
services, by requiring the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package and then registering
it with the <b class="package"><a href="../../../../index.html#key446">http</a></b> package it is sitting on top of.
Example</p>
<pre class="doctools_example">
    package require tls
    http::register https 443 ::tls::socket
</pre>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rest</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ripemd/ripemd128.html.

































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272

<div class='fossil-doc' data-title='ripemd128 - RIPEMD Message-Digest Algorithm'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ripemd128(n) 1.0.5 tcllib &quot;RIPEMD Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ripemd128 - RIPEMD-128 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">ripemd128 <span class="opt">?1.0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ripemd::ripemd128</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::ripemd::hmac128</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::ripemd::RIPEMD128Init</b></a></li>
<li><a href="#4"><b class="cmd">::ripemd::RIPEMD128Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::ripemd::RIPEMD128Final</b> <i class="arg">token</i></a></li>
<li><a href="#6"><b class="cmd">::ripemd::RIPEHMAC128Init</b> <i class="arg">key</i></a></li>
<li><a href="#7"><b class="cmd">::ripemd::RIPEHMAC128Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#8"><b class="cmd">::ripemd::RIPEHMAC128Final</b> <i class="arg">token</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is an implementation in Tcl of the RIPEMD-128 message-digest
algorithm (1). This algorithm takes an arbitrary quantity of data and
generates a 128-bit message digest from the input. The RIPEMD-128
algorithm is based upon the MD4 algorithm (2, 4) but has been
cryptographically strengthened against weaknesses that have been found
in MD4 (4). RIPEMD-128 has been designed to be a drop-in replacement
for MD4 and MD5 (5). If security is the major consideration, then
RIPEMD-160 or SHA1 should be considered.</p>
<p>This package will use <b class="package">Trf</b> to
accelerate the digest computation if available. In
the absence of an accelerator package the pure-Tcl implementation will
be used.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ripemd::ripemd128</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>Calculate the RIPEMD-128 digest of the data given in string. This is
returned as a binary string by default. Giving the <i class="arg">-hex</i> option
will return a hexadecimal encoded version of the digest.</p>
<p>The data to be hashed can be specified either as a string argument to
the ripemd128 command, or as a filename or a pre-opened channel. If the
<i class="arg">-filename</i> argument is given then the file is opened, the data read
and hashed and the file is closed. If the <i class="arg">-channel</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed.</p>
<p>Only one of <i class="arg">-file</i>, <i class="arg">-channel</i> or <i class="arg">string</i> should be given.</p></dd>
<dt><a name="2"><b class="cmd">::ripemd::hmac128</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>Calculate an Hashed Message Authentication digest (HMAC) using the
RIPEMD-128 digest algorithm. HMACs are described in RFC 2104 (6) and
provide a RIPEMD-128 digest that includes a key. All options other
than <i class="arg">-key</i> are as for the <b class="cmd">::ripemd::ripemd128</b> command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROGRAMMING INTERFACE</a></h2>
<p>For the programmer, hash functions can be viewed as a bucket into which
one pours data. When you have finished, you extract a value that is
uniquely derived from the data that was poured into the bucket. The
programming interface to the hash operates on a token (equivalent to the
bucket). You call <b class="cmd">RIPEMD128Init</b> to obtain a token and then call
<b class="cmd">RIPEMD128Update</b> as many times as required to add data to the hash. To
release any resources and obtain the hash value, you then call
<b class="cmd">RIPEMD128Final</b>. An equivalent set of functions gives you a keyed
digest (HMAC).</p>
<p>If you have <b class="package">critcl</b> and have built the <b class="package">tcllibc</b>
package then the implementation of the hashing function will be
performed by compiled code. Alternatively if both the Trf and Memchan
extensions are available then these will be used. Finally the package
will revert to a pure-Tcl implementation.  The programming interface
remains the same, however.</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">::ripemd::RIPEMD128Init</b></a></dt>
<dd><p>Begins a new RIPEMD-128 hash. Returns a token ID that must be used for the
remaining functions.</p></dd>
<dt><a name="4"><b class="cmd">::ripemd::RIPEMD128Update</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd><p>Add data to the hash identified by token. Calling
<em>RIPEMD128Update $token &quot;abcd&quot;</em> is equivalent to calling
<em>RIPEMD128Update $token &quot;ab&quot;</em> followed by
<em>RIPEMD128Update $token &quot;cb&quot;</em>. See <span class="sectref"><a href="#section4">EXAMPLES</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::ripemd::RIPEMD128Final</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the hash value and releases any resources held by this
token. Once this command completes the token will be invalid. The
result is a binary string of 16 bytes representing the 128 bit
RIPEMD-128 digest value.</p></dd>
<dt><a name="6"><b class="cmd">::ripemd::RIPEHMAC128Init</b> <i class="arg">key</i></a></dt>
<dd><p>This is equivalent to the <b class="cmd">::ripemd::RIPEMD128Init</b> command
except that it requires the key that will be included in the HMAC.</p></dd>
<dt><a name="7"><b class="cmd">::ripemd::RIPEHMAC128Update</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd></dd>
<dt><a name="8"><b class="cmd">::ripemd::RIPEHMAC128Final</b> <i class="arg">token</i></a></dt>
<dd><p>These commands are identical to the RIPEMD128 equivalent commands.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% ripemd::ripemd128 -hex &quot;Tcl does RIPEMD-128&quot;
3cab177bae65205d81e7978f63556c63
</pre>
<pre class="doctools_example">
% ripemd::hmac128 -hex -key Sekret &quot;Tcl does RIPEMD-128&quot;
b359dc5971a05beea0be7b106b30e389
</pre>
<pre class="doctools_example">
% set tok [ripemd::RIPEMD128Init]
::ripemd::1
% ripemd::RIPEMD128Update $tok &quot;Tcl &quot;
% ripemd::RIPEMD128Update $tok &quot;does &quot;
% ripemd::RIPEMD128Update $tok &quot;RIPEMD-128&quot;
% ripemd::Hex [ripemd::RIPEMD128Final $tok]
3cab177bae65205d81e7978f63556c63
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>H. Dobbertin, A. Bosselaers, B. Preneel,
        &quot;RIPEMD-160, a strengthened version of RIPEMD&quot;
        <a href="http://www.esat.kuleuven.ac.be/~cosicart/pdf/AB-9601/AB-9601.pdf">http://www.esat.kuleuven.ac.be/~cosicart/pdf/AB-9601/AB-9601.pdf</a></p></li>
<li><p>Rivest, R., &quot;The MD4 Message Digest Algorithm&quot;, RFC 1320, MIT,
       April 1992. (<a href="http://www.rfc-editor.org/rfc/rfc1320.txt">http://www.rfc-editor.org/rfc/rfc1320.txt</a>)</p></li>
<li><p>Rivest, R., &quot;The MD4 message digest algorithm&quot;, in A.J.  Menezes
       and S.A. Vanstone, editors, Advances in Cryptology - CRYPTO '90
       Proceedings, pages 303-311, Springer-Verlag, 1991.</p></li>
<li><p>Dobbertin, H., &quot;Cryptanalysis of MD4&quot;, Journal of Cryptology
        vol 11 (4), pp. 253-271 (1998)</p></li>
<li><p>Rivest, R., &quot;The MD5 Message-Digest Algorithm&quot;, RFC 1321, MIT and
       RSA Data Security, Inc, April 1992.
	(<a href="http://www.rfc-editor.org/rfc/rfc1321.txt">http://www.rfc-editor.org/rfc/rfc1321.txt</a>)</p></li>
<li><p>Krawczyk, H., Bellare, M. and Canetti, R. &quot;HMAC: Keyed-Hashing for
      Message Authentication&quot;, RFC 2104, February 1997.
	(<a href="http://www.rfc-editor.org/rfc/rfc2104.txt">http://www.rfc-editor.org/rfc/rfc2104.txt</a>)</p></li>
</ol>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ripemd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="ripemd160.html">ripemd160</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key378">RIPEMD</a>, <a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key380">md4</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key379">rfc 1320</a>, <a href="../../../../index.html#key381">rfc 1321</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/ripemd/ripemd160.html.











































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261

<div class='fossil-doc' data-title='ripemd160 - RIPEMD Message-Digest Algorithm'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ripemd160(n) 1.0.5 tcllib &quot;RIPEMD Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ripemd160 - RIPEMD-160 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">ripemd160 <span class="opt">?1.0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ripemd::ripemd160</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::ripemd::hmac160</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::ripemd::RIPEMD160Init</b></a></li>
<li><a href="#4"><b class="cmd">::ripemd::RIPEMD160Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::ripemd::RIPEMD160Final</b> <i class="arg">token</i></a></li>
<li><a href="#6"><b class="cmd">::ripemd::RIPEHMAC160Init</b> <i class="arg">key</i></a></li>
<li><a href="#7"><b class="cmd">::ripemd::RIPEHMAC160Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#8"><b class="cmd">::ripemd::RIPEHMAC160Final</b> <i class="arg">token</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is an implementation in Tcl of the RIPEMD-160 message-digest
algorithm (1). This algorithm takes an arbitrary quantity of data and
generates a 160-bit message digest from the input. The RIPEMD-160
algorithm is based upon the MD4 algorithm (2, 4) but has been
cryptographically strengthened against weaknesses that have been found
in MD4 (4).</p>
<p>This package will use <b class="package">cryptkit</b> or <b class="package">Trf</b> to
accelerate the digest computation if either package is available. In
the absence of an accelerator package the pure-Tcl implementation will
be used.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ripemd::ripemd160</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>Calculate the RIPEMD-160 digest of the data given in string. This is
returned as a binary string by default. Giving the <i class="arg">-hex</i> option
will return a hexadecimal encoded version of the digest.</p>
<p>The data to be hashed can be specified either as a string argument to
the ripemd160 command, or as a filename or a pre-opened channel. If the
<i class="arg">-filename</i> argument is given then the file is opened, the data read
and hashed and the file is closed. If the <i class="arg">-channel</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed.</p>
<p>Only one of <i class="arg">-file</i>, <i class="arg">-channel</i> or <i class="arg">string</i> should be given.</p></dd>
<dt><a name="2"><b class="cmd">::ripemd::hmac160</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></dt>
<dd><p>Calculate an Hashed Message Authentication digest (HMAC) using the
RIPEMD-160 digest algorithm. HMACs are described in RFC 2104 (5) and
provide a RIPEMD-160 digest that includes a key. All options other
than <i class="arg">-key</i> are as for the <b class="cmd">::ripemd::ripemd160</b> command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROGRAMMING INTERFACE</a></h2>
<p>For the programmer, hash functions can be viewed as a bucket into which
one pours data. When you have finished, you extract a value that is
uniquely derived from the data that was poured into the bucket. The
programming interface to the hash operates on a token (equivalent to the
bucket). You call <b class="cmd">RIPEMD160Init</b> to obtain a token and then call
<b class="cmd">RIPEMD160Update</b> as many times as required to add data to the hash. To
release any resources and obtain the hash value, you then call
<b class="cmd">RIPEMD160Final</b>. An equivalent set of functions gives you a keyed
digest (HMAC).</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">::ripemd::RIPEMD160Init</b></a></dt>
<dd><p>Begins a new RIPEMD-160 hash. Returns a token ID that must be used for the
remaining functions.</p></dd>
<dt><a name="4"><b class="cmd">::ripemd::RIPEMD160Update</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd><p>Add data to the hash identified by token. Calling
<em>RIPEMD160Update $token &quot;abcd&quot;</em> is equivalent to calling
<em>RIPEMD160Update $token &quot;ab&quot;</em> followed by
<em>RIPEMD160Update $token &quot;cb&quot;</em>. See <span class="sectref"><a href="#section4">EXAMPLES</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::ripemd::RIPEMD160Final</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the hash value and releases any resources held by this
token. Once this command completes the token will be invalid. The
result is a binary string of 16 bytes representing the 160 bit
RIPEMD-160 digest value.</p></dd>
<dt><a name="6"><b class="cmd">::ripemd::RIPEHMAC160Init</b> <i class="arg">key</i></a></dt>
<dd><p>This is equivalent to the <b class="cmd">::ripemd::RIPEMD160Init</b> command
except that it requires the key that will be included in the HMAC.</p></dd>
<dt><a name="7"><b class="cmd">::ripemd::RIPEHMAC160Update</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd></dd>
<dt><a name="8"><b class="cmd">::ripemd::RIPEHMAC160Final</b> <i class="arg">token</i></a></dt>
<dd><p>These commands are identical to the RIPEMD160 equivalent commands.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% ripemd::ripemd160 -hex &quot;Tcl does RIPEMD-160&quot;
0829dea75a1a7074c702896723fe37763481a0a7
</pre>
<pre class="doctools_example">
% ripemd::hmac160 -hex -key Sekret &quot;Tcl does RIPEMD-160&quot;
bf0c927231733686731dddb470b64a9c23f7f53b
</pre>
<pre class="doctools_example">
% set tok [ripemd::RIPEMD160Init]
::ripemd::1
% ripemd::RIPEMD160Update $tok &quot;Tcl &quot;
% ripemd::RIPEMD160Update $tok &quot;does &quot;
% ripemd::RIPEMD160Update $tok &quot;RIPEMD-160&quot;
% ripemd::Hex [ripemd::RIPEMD160Final $tok]
0829dea75a1a7074c702896723fe37763481a0a7
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>H. Dobbertin, A. Bosselaers, B. Preneel,
        &quot;RIPEMD-160, a strengthened version of RIPEMD&quot;
        <a href="http://www.esat.kuleuven.ac.be/~cosicart/pdf/AB-9601/AB-9601.pdf">http://www.esat.kuleuven.ac.be/~cosicart/pdf/AB-9601/AB-9601.pdf</a></p></li>
<li><p>Rivest, R., &quot;The MD4 Message Digest Algorithm&quot;, RFC 1320, MIT,
       April 1992. (<a href="http://www.rfc-editor.org/rfc/rfc1320.txt">http://www.rfc-editor.org/rfc/rfc1320.txt</a>)</p></li>
<li><p>Rivest, R., &quot;The MD4 message digest algorithm&quot;, in A.J.  Menezes
       and S.A. Vanstone, editors, Advances in Cryptology - CRYPTO '90
       Proceedings, pages 303-311, Springer-Verlag, 1991.</p></li>
<li><p>Dobbertin, H., &quot;Cryptanalysis of MD4&quot;, Journal of Cryptology
        vol 11 (4), pp. 253-271 (1998)</p></li>
<li><p>Krawczyk, H., Bellare, M. and Canetti, R. &quot;HMAC: Keyed-Hashing for
      Message Authentication&quot;, RFC 2104, February 1997.
	(<a href="http://www.rfc-editor.org/rfc/rfc2104.txt">http://www.rfc-editor.org/rfc/rfc2104.txt</a>)</p></li>
</ol>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ripemd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="ripemd128.html">ripemd128</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key378">RIPEMD</a>, <a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key380">md4</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key379">rfc 1320</a>, <a href="../../../../index.html#key381">rfc 1321</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/sasl/gtoken.html.































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

<div class='fossil-doc' data-title='SASL::XGoogleToken - Simple Authentication and Security Layer (SASL)'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL::XGoogleToken(n) 1.0.1 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL::XGoogleToken - Implementation of SASL NTLM mechanism for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section3">AUTHORS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">SASL::XGoogleToken <span class="opt">?1.0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the XGoogleToken authentication mechanism for
the Simple Authentication and Security Layer (SASL).</p>
<p>Please read the documentation for package <b class="package">sasl</b>
for details.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key396">SASL</a>, <a href="../../../../index.html#key395">XGoogleToken</a>, <a href="../../../../index.html#key394">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/sasl/ntlm.html.

































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

<div class='fossil-doc' data-title='SASL::NTLM - Simple Authentication and Security Layer (SASL)'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL::NTLM(n) 1.1.2 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL::NTLM - Implementation of SASL NTLM mechanism for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">REFERENCES</a></li>
<li class="doctools_section"><a href="#section3">AUTHORS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">SASL::NTLM <span class="opt">?1.1.2?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the NTLM authentication mechanism for
the Simple Authentication and Security Layer (SASL).</p>
<p>Please read the documentation for package <b class="package">sasl</b>
for details.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>No official specification is available. However,
    <a href="http://davenport.sourceforge.net/ntlm.html">http://davenport.sourceforge.net/ntlm.html</a> provides a good
    description.</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key711">NTLM</a>, <a href="../../../../index.html#key396">SASL</a>, <a href="../../../../index.html#key394">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/sasl/sasl.html.





















































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394

<div class='fossil-doc' data-title='SASL - Simple Authentication and Security Layer (SASL)'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL(n) 1.3.3 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL - Implementation of SASL mechanisms for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">OPTIONS</a></li>
<li class="doctools_section"><a href="#section4">CALLBACK PROCEDURE</a></li>
<li class="doctools_section"><a href="#section5">MECHANISMS</a></li>
<li class="doctools_section"><a href="#section6">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section7">REFERENCES</a></li>
<li class="doctools_section"><a href="#section8">AUTHORS</a></li>
<li class="doctools_section"><a href="#section9">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">SASL <span class="opt">?1.3.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::SASL::new</b> <i class="arg">option value <span class="opt">?...?</span></i></a></li>
<li><a href="#2"><b class="cmd">::SASL::configure</b> <i class="arg">option value</i> <span class="opt">?<i class="arg">...</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::SASL::step</b> <i class="arg">context</i> <i class="arg">challenge</i> <span class="opt">?<i class="arg">...</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::SASL::response</b> <i class="arg">context</i></a></li>
<li><a href="#5"><b class="cmd">::SASL::reset</b> <i class="arg">context</i></a></li>
<li><a href="#6"><b class="cmd">::SASL::cleanup</b> <i class="arg">context</i></a></li>
<li><a href="#7"><b class="cmd">::SASL::mechanisms</b> <span class="opt">?<i class="arg">type</i>?</span> <span class="opt">?<i class="arg">minimum</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::SASL::register</b> <i class="arg">mechanism</i> <i class="arg">preference</i> <i class="arg">clientproc</i> <span class="opt">?<i class="arg">serverproc</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The Simple Authentication and Security Layer (SASL) is a framework
for providing authentication and authorization to comunications
protocols. The SASL framework is structured to permit negotiation
among a number of authentication mechanisms. SASL may be used in
SMTP, IMAP and HTTP authentication. It is also in use in XMPP, LDAP
and BEEP. See <span class="sectref"><a href="#section5">MECHANISMS</a></span> for the set of available SASL
mechanisms provided with tcllib.</p>
<p>The SASL framework operates using a simple multi-step challenge
response mechanism. All the mechanisms work the same way although the
number of steps may vary. In this implementation a callback procedure
must be provided from which the SASL framework will obtain users
details. See <span class="sectref"><a href="#section4">CALLBACK PROCEDURE</a></span> for details of this
procedure.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::SASL::new</b> <i class="arg">option value <span class="opt">?...?</span></i></a></dt>
<dd><p>Contruct a new SASL context. See <span class="sectref"><a href="#section3">OPTIONS</a></span> for details of the
possible options to this command. A context token is required for most
of the SASL procedures.</p></dd>
<dt><a name="2"><b class="cmd">::SASL::configure</b> <i class="arg">option value</i> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>Modify and inspect the SASL context option. See <span class="sectref"><a href="#section3">OPTIONS</a></span> for
further details.</p></dd>
<dt><a name="3"><b class="cmd">::SASL::step</b> <i class="arg">context</i> <i class="arg">challenge</i> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>This is the core procedure for using the SASL framework. The
<b class="cmd">step</b> procedure should be called until it returns 0. Each step takes a
server challenge string and the response is calculated and stored in
the context. Each mechanism may require one or more steps. For some
steps there may be no server challenge required in which case an empty
string should be provided for this parameter. All mechanisms should accept
an initial empty challenge.</p></dd>
<dt><a name="4"><b class="cmd">::SASL::response</b> <i class="arg">context</i></a></dt>
<dd><p>Returns the next response string that should be sent to the server.</p></dd>
<dt><a name="5"><b class="cmd">::SASL::reset</b> <i class="arg">context</i></a></dt>
<dd><p>Re-initialize the SASL context. Discards any internal state and
permits the token to be reused.</p></dd>
<dt><a name="6"><b class="cmd">::SASL::cleanup</b> <i class="arg">context</i></a></dt>
<dd><p>Release all resources associated with the SASL context. The context
token may not be used again after this procedure has been called.</p></dd>
<dt><a name="7"><b class="cmd">::SASL::mechanisms</b> <span class="opt">?<i class="arg">type</i>?</span> <span class="opt">?<i class="arg">minimum</i>?</span></a></dt>
<dd><p>Returns a list of all the available SASL mechanisms. The list is
sorted by the mechanism preference value (see <b class="cmd">register</b>) with the
preferred mechanisms and the head of the list. Any mechanism with a
preference value less than the<i class="arg">minimum</i> (which defaults to 0) is removed
from the returned list. This permits a security threshold to be set. Mechanisms
with a preference less that 25 transmit authentication are particularly
susceptible to eavesdropping and should not be provided unless a secure
channel is in use (eg: tls).</p>
<p>The <i class="arg">type</i> parameter
may be one of <i class="arg">client</i> or <i class="arg">server</i> and defaults to <i class="arg">client</i>.
Only mechanisms that have an implementation matching the <i class="arg">type</i> are
returned (this permits servers to correctly declare support only for
mechanisms that actually provide a server implementation).</p></dd>
<dt><a name="8"><b class="cmd">::SASL::register</b> <i class="arg">mechanism</i> <i class="arg">preference</i> <i class="arg">clientproc</i> <span class="opt">?<i class="arg">serverproc</i>?</span></a></dt>
<dd><p>New mechanisms can be added to the package by registering the
mechanism name and the implementing procedures. The server procedure
is optional. The preference value is an integer that is used to order
the list returned by the <b class="cmd">mechanisms</b> command. Higher values
indicate a preferred mechanism. If the mechanism is already registered
then the recorded values are updated.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">OPTIONS</a></h2>
<dl class="doctools_definitions">
<dt><b class="option">-callback</b></dt>
<dd><p>Specify a command to be evaluated when the SASL mechanism requires
information about the user. The command is called with the current
SASL context and a name specifying the information desired. See
<span class="sectref"><a href="#section6">EXAMPLES</a></span>.</p></dd>
<dt><b class="option">-mechanism</b></dt>
<dd><p>Set the SASL mechanism to be used. See <b class="cmd">mechanisms</b> for a list of
supported authentication mechanisms.</p></dd>
<dt><b class="option">-service</b></dt>
<dd><p>Set the service type for this context. Some mechanisms may make use of
this parameter (eg DIGEST-MD5, GSSAPI and Kerberos). If not set it
defaults to an empty string. If the <b class="option">-type</b> is set to 'server'
then this option should be set to a valid service identity. Some
examples of valid service names are smtp, ldap, beep and xmpp.</p></dd>
<dt><b class="option">-server</b></dt>
<dd><p>This option is used to set the server name used in SASL challenges
when operating as a SASL server.</p></dd>
<dt><b class="option">-type</b></dt>
<dd><p>The context type may be one of 'client' or 'server'. The default is to
operate as a client application and respond to server
challenges. Mechanisms may be written to support server-side SASL and
setting this option will cause each <b class="cmd">step</b> to issue the next
challenge. A new context must be created for each incoming client
connection when in server mode.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">CALLBACK PROCEDURE</a></h2>
<p>When the SASL framework requires any user details it will call the
procedure provided when the context was created with an argument that
specfies the item of information required.</p>
<p>In all cases a single response string should be returned.</p>
<dl class="doctools_definitions">
<dt>login</dt>
<dd><p>The callback procedure should return the users authorization identity.
Return an empty string unless this is to be different to the authentication
identity. Read [1] for a discussion about the specific meaning of
authorization and authentication identities within SASL.</p></dd>
<dt>username</dt>
<dd><p>The callback procedure should return the users authentication identity.
Read [1] for a discussion about the specific meaning of
authorization and authentication identities within SASL.</p></dd>
<dt>password</dt>
<dd><p>The callback procedure should return the password that matches the
authentication identity as used within the current realm.</p>
<p>For server mechanisms the password callback should always be called with
the authentication identity and the realm as the first two parameters.</p></dd>
<dt>realm</dt>
<dd><p>Some SASL mechanisms use realms to partition authentication identities.
The realm string is protocol dependent and is often the current DNS
domain or in the case of the NTLM mechanism it is the Windows NT domain name.</p></dd>
<dt>hostname</dt>
<dd><p>Returns the client host name - typically [info host].</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">MECHANISMS</a></h2>
<dl class="doctools_definitions">
<dt>ANONYMOUS</dt>
<dd><p>As used in FTP this mechanism only passes an email address for
authentication. The ANONYMOUS mechanism is specified in [2].</p></dd>
<dt>PLAIN</dt>
<dd><p>This is the simplest mechanism. The users authentication details are
transmitted in plain text. This mechanism should not be provided
unless an encrypted link is in use - typically after SSL or TLS has
been negotiated.</p></dd>
<dt>LOGIN</dt>
<dd><p>The LOGIN [1] mechanism transmits the users details with base64
encoding. This is no more secure than PLAIN and likewise should not be
used without a secure link.</p></dd>
<dt>CRAM-MD5</dt>
<dd><p>This mechanism avoids sending the users password over the network in
plain text by hashing the password with a server provided random value
(known as a nonce). A disadvantage of this mechanism is that the
server must maintain a database of plaintext passwords for
comparison. CRAM-MD5 was defined in [4].</p></dd>
<dt>DIGEST-MD5</dt>
<dd><p>This mechanism improves upon the CRAM-MD5 mechanism by avoiding the
need for the server to store plaintext passwords. With digest
authentication the server needs to store the MD5 digest of the users
password which helps to make the system more secure. As in CRAM-MD5
the password is hashed with a server nonce and other data before being
transmitted across the network. Specified in [3].</p></dd>
<dt>OTP</dt>
<dd><p>OTP is the One-Time Password system described in RFC 2289 [6].
This mechanism is secure against replay attacks and also avoids storing
password or password equivalents on the server. Only a digest of a seed
and a passphrase is ever transmitted across the network. Requires the
<b class="package"><a href="../otp/otp.html">otp</a></b> package from tcllib and one or more of the cryptographic
digest packages (md5 or sha-1 are the most commonly used).</p></dd>
<dt>NTLM</dt>
<dd><p>This is a proprietary protocol developed by Microsoft [5] and is
in common use for authenticating users in a Windows network
environment. NTLM uses DES encryption and MD4 digests of the users
password to authenticate a connection. Certain weaknesses have been
found in NTLM and thus there are a number of versions of the protocol.
As this mechanism has additional dependencies it is made available as
a separate sub-package. To enable this mechanism your application must
load the <b class="package"><a href="ntlm.html">SASL::NTLM</a></b> package.</p></dd>
<dt>X-GOOGLE-TOKEN</dt>
<dd><p>This is a proprietary protocol developed by Google and used for
authenticating users for the Google Talk service. This mechanism makes
a pair of HTTP requests over an SSL channel and so this mechanism
depends upon the availability of the tls and http packages. To enable
this mechanism your application must load the <b class="package"><a href="gtoken.html">SASL::XGoogleToken</a></b> package.
In addition you are recommended to make use of the autoproxy package to
handle HTTP proxies reasonably transparently.</p></dd>
<dt>SCRAM</dt>
<dd><p>This is a protocol specified in RFC 5802 [7]. To enable this mechanism
your application must load the <b class="package"><a href="scram.html">SASL::SCRAM</a></b> package.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">EXAMPLES</a></h2>
<p>See the examples subdirectory for more complete samples using SASL
with network protocols. The following should give an idea how the SASL
commands are to be used. In reality this should be event
driven. Each time the <b class="cmd">step</b> command is called, the last server
response should be provided as the command argument so that the SASL
mechanism can take appropriate action.</p>
<pre class="doctools_example">
proc ClientCallback {context command args} {
    switch -exact -- $command {
        login    { return &quot;&quot; }
        username { return $::tcl_platform(user) }
        password { return &quot;SecRet&quot; }
        realm    { return &quot;&quot; }
        hostname { return [info host] }
        default  { return -code error unxpected }
    }
}
proc Demo {{mech PLAIN}} {
    set ctx [SASL::new -mechanism $mech -callback ClientCallback]
    set challenge &quot;&quot;
    while {1} {
        set more_steps [SASL::step $ctx challenge]
        puts &quot;Send '[SASL::response $ctx]'&quot;
        puts &quot;Read server response into challenge var&quot;
        if {!$more_steps} {break}
    }
    SASL::cleanup $ctx
}
</pre>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Myers, J. &quot;Simple Authentication and Security Layer (SASL)&quot;,
    RFC 2222, October 1997.
    (<a href="http://www.ietf.org/rfc/rfc2222.txt">http://www.ietf.org/rfc/rfc2222.txt</a>)</p></li>
<li><p>Newman, C. &quot;Anonymous SASL Mechanism&quot;,
    RFC 2245, November 1997.
    (<a href="http://www.ietf.org/rfc/rfc2245.txt">http://www.ietf.org/rfc/rfc2245.txt</a>)</p></li>
<li><p>Leach, P., Newman, C. &quot;Using Digest Authentication as a SASL
    Mechanism&quot;, RFC 2831, May 2000,
    (<a href="http://www.ietf.org/rfc/rfc2831.txt">http://www.ietf.org/rfc/rfc2831.txt</a>)</p></li>
<li><p>Klensin, J., Catoe, R. and Krumviede, P.,
    &quot;IMAP/POP AUTHorize Extension for Simple Challenge/Response&quot;
    RFC 2195, September 1997.
    (<a href="http://www.ietf.org/rfc/rfc2195.txt">http://www.ietf.org/rfc/rfc2195.txt</a>)</p></li>
<li><p>No official specification is available. However,
    <a href="http://davenport.sourceforge.net/ntlm.html">http://davenport.sourceforge.net/ntlm.html</a> provides a good
    description.</p></li>
<li><p>Haller, N. et al., &quot;A One-Time Password System&quot;,
    RFC 2289, February 1998,
    (<a href="http://www.ieft.org/rfc/rfc2289.txt">http://www.ieft.org/rfc/rfc2289.txt</a>)</p></li>
<li><p>Newman, C. et al., &quot;Salted Challenge Response Authentication Mechanism (SCRAM) SASL and GSS-API Mechanisms&quot;,
    RFC 5802, July 2010,
    (<a href="http://www.ieft.org/rfc/rfc5802.txt">http://www.ieft.org/rfc/rfc5802.txt</a>)</p></li>
</ol>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key396">SASL</a>, <a href="../../../../index.html#key394">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/sasl/scram.html.

































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

<div class='fossil-doc' data-title='SASL::SCRAM - Simple Authentication and Security Layer (SASL)'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL::SCRAM(n) 0.1 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL::SCRAM - Implementation of SASL SCRAM mechanism for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">REFERENCES</a></li>
<li class="doctools_section"><a href="#section3">AUTHORS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">SASL::SCRAM <span class="opt">?0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the SCRAM authentication mechanism for
the Simple Authentication and Security Layer (SASL).</p>
<p>Please read the documentation for package <b class="package">sasl</b>
for details.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Newman, C. et al., &quot;Salted Challenge Response Authentication Mechanism (SCRAM) SASL and GSS-API Mechanisms&quot;,
    RFC 5802, July 2010,
    (<a href="http://www.ieft.org/rfc/rfc5802.txt">http://www.ieft.org/rfc/rfc5802.txt</a>)</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AUTHORS</a></h2>
<p>Sergei Golovan</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key396">SASL</a>, <a href="../../../../index.html#key768">SCRAM</a>, <a href="../../../../index.html#key394">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2013 Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/sha1/sha1.html.































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<div class='fossil-doc' data-title='sha1 - SHA-x Message-Digest Algorithm'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sha1(n) 2.0.3 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sha1 - SHA1 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sha1 <span class="opt">?2.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::sha1::sha1</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::sha1::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></li>
<li><a href="#3"><b class="cmd">::sha1::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#4"><b class="cmd">::sha1::SHA1Init</b></a></li>
<li><a href="#5"><b class="cmd">::sha1::SHA1Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#6"><b class="cmd">::sha1::SHA1Final</b> <i class="arg">token</i></a></li>
<li><a href="#7"><b class="cmd">::sha1::HMACInit</b> <i class="arg">key</i></a></li>
<li><a href="#8"><b class="cmd">::sha1::HMACUpdate</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#9"><b class="cmd">::sha1::HMACFinal</b> <i class="arg">token</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides an implementation in Tcl of the SHA1
message-digest algorithm as specified by FIPS PUB 180-1 (1). This
algorithm takes a message and generates a 160-bit digest from the
input. The SHA1 algorithm is related to the MD4 algorithm (2) but has
been strengthend against certain types of cryptographic attack. SHA1
should be used in preference to MD4 or MD5 in new applications.</p>
<p>This package also includes support for creating keyed message-digests
using the HMAC algorithm from RFC 2104 (3) with SHA1 as the
message-digest.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::sha1::sha1</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></dt>
<dd><p>The command takes a message and returns the SHA1 digest of this message
as a hexadecimal string. You may request the result as binary data by
giving <i class="arg">-bin</i>.</p>
<p>The data to be hashed can be specified either as a string argument to
the <b class="cmd">sha1</b> command, or as a filename or a pre-opened channel. If the
<i class="arg">-filename</i> argument is given then the file is opened, the data read
and hashed and the file is closed. If the <i class="arg">-channel</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed. <em>NOTE</em> use of the channel or filename
options results in the internal use of <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>. To avoid nested
event loops in Tk or tclhttpd applications you should use the
incremental programming API (see below).</p>
<p>Only one of <i class="arg">-file</i>, <i class="arg">-channel</i> or <i class="arg">string</i> should be given.</p>
<p>If the <i class="arg">string</i> to hash can be mistaken for an option
(leading dash &quot;-&quot;), use the option <b class="option">--</b> before it to terminate
option processing and force interpretation as a string.</p></dd>
<dt><a name="2"><b class="cmd">::sha1::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></dt>
<dd></dd>
<dt><a name="3"><b class="cmd">::sha1::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></dt>
<dd><p>Calculate an Hashed Message Authentication digest (HMAC) using the SHA1
digest algorithm. HMACs are described in RFC 2104 (3) and provide an SHA1
digest that includes a key. All options other than <i class="arg">-key</i> are as
for the <b class="cmd">::sha1::sha1</b> command.</p>
<p>If the <i class="arg">string</i> to hash can be mistaken for an option
(leading dash &quot;-&quot;), use the option <b class="option">--</b> before it to terminate
option processing and force interpretation as a string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROGRAMMING INTERFACE</a></h2>
<p>For the programmer, the SHA1 hash can be viewed as a bucket into which
one pours data. When you have finished, you extract a value that is
derived from the data that was poured into the bucket. The programming
interface to the SHA1 hash operates on a token (equivalent to the
bucket). You call <b class="cmd">SHA1Init</b> to obtain a token and then call
<b class="cmd">SHA1Update</b> as many times as required to add data to the hash. To
release any resources and obtain the hash value, you then call
<b class="cmd">SHA1Final</b>. An equivalent set of functions gives you a keyed digest
(HMAC).</p>
<p>If you have <b class="package">critcl</b> and have built the <b class="package">tcllibc</b> package
then the implementation of the hashing function will be performed by compiled
code. Failing that if you have the <b class="package">Trf</b> package then this can
be used otherwise there is a pure-tcl equivalent. The programming
interface remains the same in all cases.</p>
<dl class="doctools_definitions">
<dt><a name="4"><b class="cmd">::sha1::SHA1Init</b></a></dt>
<dd><p>Begins a new SHA1 hash. Returns a token ID that must be used for the
remaining functions.</p></dd>
<dt><a name="5"><b class="cmd">::sha1::SHA1Update</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd><p>Add data to the hash identified by token. Calling
<em>SHA1Update $token &quot;abcd&quot;</em> is equivalent to calling
<em>SHA1Update $token &quot;ab&quot;</em> followed by
<em>SHA1Update $token &quot;cb&quot;</em>. See <span class="sectref"><a href="#section4">EXAMPLES</a></span>.</p></dd>
<dt><a name="6"><b class="cmd">::sha1::SHA1Final</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the hash value and releases any resources held by this
token. Once this command completes the token will be invalid. The
result is a binary string of 20 bytes representing the 160 bit SHA1
digest value.</p></dd>
<dt><a name="7"><b class="cmd">::sha1::HMACInit</b> <i class="arg">key</i></a></dt>
<dd><p>This is equivalent to the <b class="cmd">::sha1::SHA1Init</b> command except that
it requires the key that will be included in the HMAC.</p></dd>
<dt><a name="8"><b class="cmd">::sha1::HMACUpdate</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd></dd>
<dt><a name="9"><b class="cmd">::sha1::HMACFinal</b> <i class="arg">token</i></a></dt>
<dd><p>These commands are identical to the SHA1 equivalent commands.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% sha1::sha1 &quot;Tcl does SHA1&quot;
285a6a91c45a9066bf39fcf24425796ef0b2a8bf
</pre>
<pre class="doctools_example">
% sha1::hmac Sekret &quot;Tcl does SHA1&quot;
ae6251fa51b95b18cba2be95eb031d07475ff03c
</pre>
<pre class="doctools_example">
% set tok [sha1::SHA1Init]
::sha1::1
% sha1::SHA1Update $tok &quot;Tcl &quot;
% sha1::SHA1Update $tok &quot;does &quot;
% sha1::SHA1Update $tok &quot;SHA1&quot;
% sha1::Hex [sha1::SHA1Final $tok]
285a6a91c45a9066bf39fcf24425796ef0b2a8bf
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>&quot;Secure Hash Standard&quot;, National Institute of Standards
        and Technology, U.S. Department Of Commerce, April 1995.
	(<a href="http://www.itl.nist.gov/fipspubs/fip180-1.htm">http://www.itl.nist.gov/fipspubs/fip180-1.htm</a>)</p></li>
<li><p>Rivest, R., &quot;The MD4 Message Digest Algorithm&quot;, RFC 1320, MIT,
       April 1992. (<a href="http://www.rfc-editor.org/rfc/rfc1320.txt">http://www.rfc-editor.org/rfc/rfc1320.txt</a>)</p></li>
<li><p>Krawczyk, H., Bellare, M. and Canetti, R. &quot;HMAC: Keyed-Hashing for
      Message Authentication&quot;, RFC 2104, February 1997.
	(<a href="http://www.rfc-editor.org/rfc/rfc2104.txt">http://www.rfc-editor.org/rfc/rfc2104.txt</a>)</p></li>
</ol>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sha1</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="../ripemd/ripemd128.html">ripemd128</a>, <a href="../ripemd/ripemd160.html">ripemd160</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key213">FIPS 180-1</a>, <a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a>, <a href="../../../../index.html#key441">sha1</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/sha1/sha256.html.

















































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<div class='fossil-doc' data-title='sha256 - SHA-x Message-Digest Algorithm'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sha256(n) 1.0.3 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sha256 - SHA256 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">PROGRAMMING INTERFACE</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sha256 <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::sha2::sha256</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::sha2::sha224</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::sha2::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></li>
<li><a href="#4"><b class="cmd">::sha2::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#5"><b class="cmd">::sha2::SHA256Init</b></a></li>
<li><a href="#6"><b class="cmd">::sha2::SHA224Init</b></a></li>
<li><a href="#7"><b class="cmd">::sha2::SHA256Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#8"><b class="cmd">::sha2::SHA256Final</b> <i class="arg">token</i></a></li>
<li><a href="#9"><b class="cmd">::sha2::SHA224Final</b> <i class="arg">token</i></a></li>
<li><a href="#10"><b class="cmd">::sha2::HMACInit</b> <i class="arg">key</i></a></li>
<li><a href="#11"><b class="cmd">::sha2::HMACUpdate</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#12"><b class="cmd">::sha2::HMACFinal</b> <i class="arg">token</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides an implementation in Tcl of the SHA256 and
SHA224 message-digest algorithms as specified by FIPS PUB 180-1
(1). These algorithms take a message and generates a 256-bit (224-bit)
digest from the input. The SHA2 algorithms are related to the SHA1
algorithm.</p>
<p>This package also includes support for creating keyed message-digests
using the HMAC algorithm from RFC 2104 (3) with SHA256 as the
message-digest.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::sha2::sha256</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></dt>
<dd><p>The command takes a message and returns the SHA256 digest of this
message as a hexadecimal string. You may request the result as binary
data by giving <i class="arg">-bin</i>.</p>
<p>The data to be hashed can be specified either as a string argument to
the <b class="cmd">sha256</b> command, or as a filename or a pre-opened channel. If the
<i class="arg">-filename</i> argument is given then the file is opened, the data read
and hashed and the file is closed. If the <i class="arg">-channel</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed. <em>NOTE</em> use of the channel or filename
options results in the internal use of <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>. To avoid nested
event loops in Tk or tclhttpd applications you should use the
incremental programming API (see below).</p>
<p>Only one of <i class="arg">-file</i>, <i class="arg">-channel</i> or <i class="arg">string</i> should be given.</p>
<p>If the <i class="arg">string</i> to hash can be mistaken for an option
(leading dash &quot;-&quot;), use the option <b class="option">--</b> before it to terminate
option processing and force interpretation as a string.</p></dd>
<dt><a name="2"><b class="cmd">::sha2::sha224</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></dt>
<dd><p>Like <b class="cmd">::sha2::sha256</b>, except that the SHA224 digest is returned.</p></dd>
<dt><a name="3"><b class="cmd">::sha2::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">::sha2::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></dt>
<dd><p>Calculate an Hashed Message Authentication digest (HMAC) using the
SHA256 digest algorithm. HMACs are described in RFC 2104 (3) and
provide an SHA256 digest that includes a key. All options other than
<i class="arg">-key</i> are as for the <b class="cmd">::sha2::sha256</b> command.</p>
<p>If the <i class="arg">string</i> to hash can be mistaken for an option
(leading dash &quot;-&quot;), use the option <b class="option">--</b> before it to terminate
option processing and force interpretation as a string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROGRAMMING INTERFACE</a></h2>
<p>For the programmer, the SHA256 hash can be viewed as a bucket into
which one pours data. When you have finished, you extract a value that
is derived from the data that was poured into the bucket. The
programming interface to the SHA256 hash operates on a token
(equivalent to the bucket). You call <b class="cmd">SHA256Init</b> to obtain a
token and then call <b class="cmd">SHA256Update</b> as many times as required to
add data to the hash. To release any resources and obtain the hash
value, you then call <b class="cmd">SHA256Final</b>. An equivalent set of
functions gives you a keyed digest (HMAC).</p>
<p>If you have <b class="package">critcl</b> and have built the <b class="package">tcllibc</b>
package then the implementation of the hashing function will be
performed by compiled code. Failing that there is a pure-tcl
equivalent. The programming interface remains the same in all cases.</p>
<dl class="doctools_definitions">
<dt><a name="5"><b class="cmd">::sha2::SHA256Init</b></a></dt>
<dd></dd>
<dt><a name="6"><b class="cmd">::sha2::SHA224Init</b></a></dt>
<dd><p>Begins a new SHA256/SHA224 hash. Returns a token ID that must be used
for the remaining functions.</p></dd>
<dt><a name="7"><b class="cmd">::sha2::SHA256Update</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd><p>Add data to the hash identified by token. Calling
<em>SHA256Update $token &quot;abcd&quot;</em> is equivalent to calling
<em>SHA256Update $token &quot;ab&quot;</em> followed by
<em>SHA256Update $token &quot;cb&quot;</em>. See <span class="sectref"><a href="#section4">EXAMPLES</a></span>.
Note that this command is used for both SHA256 and SHA224. Only the
initialization and finalization commands of both hashes differ.</p></dd>
<dt><a name="8"><b class="cmd">::sha2::SHA256Final</b> <i class="arg">token</i></a></dt>
<dd></dd>
<dt><a name="9"><b class="cmd">::sha2::SHA224Final</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the hash value and releases any resources held by this
token. Once this command completes the token will be invalid. The
result is a binary string of 32/28 bytes representing the 256/224 bit
SHA256 / SHA224 digest value.</p></dd>
<dt><a name="10"><b class="cmd">::sha2::HMACInit</b> <i class="arg">key</i></a></dt>
<dd><p>This is equivalent to the <b class="cmd">::sha2::SHA256Init</b> command except
that it requires the key that will be included in the HMAC.</p></dd>
<dt><a name="11"><b class="cmd">::sha2::HMACUpdate</b> <i class="arg">token</i> <i class="arg">data</i></a></dt>
<dd></dd>
<dt><a name="12"><b class="cmd">::sha2::HMACFinal</b> <i class="arg">token</i></a></dt>
<dd><p>These commands are identical to the SHA256 equivalent commands.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% sha2::sha256 &quot;Tcl does SHA256&quot;
0b91043ee484abd83c3e4b08d6034d71b937026379f0f59bda6e625e6e214789
</pre>
<pre class="doctools_example">
% sha2::hmac Sekret &quot;Tcl does SHA256&quot;
4f9352c64d655e8a36abe73e6163a9d7a54039877c1c92ec90b07d48d4e854e0
</pre>
<pre class="doctools_example">
% set tok [sha2::SHA256Init]
::sha2::1
% sha2::SHA256Update $tok &quot;Tcl &quot;
% sha2::SHA256Update $tok &quot;does &quot;
% sha2::SHA256Update $tok &quot;SHA256&quot;
% sha2::Hex [sha2::SHA256Final $tok]
0b91043ee484abd83c3e4b08d6034d71b937026379f0f59bda6e625e6e214789
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>&quot;Secure Hash Standard&quot;, National Institute of Standards
        and Technology, U.S. Department Of Commerce, April 1995.
	(<a href="http://www.itl.nist.gov/fipspubs/fip180-1.htm">http://www.itl.nist.gov/fipspubs/fip180-1.htm</a>)</p></li>
<li><p>Rivest, R., &quot;The MD4 Message Digest Algorithm&quot;, RFC 1320, MIT,
       April 1992. (<a href="http://www.rfc-editor.org/rfc/rfc1320.txt">http://www.rfc-editor.org/rfc/rfc1320.txt</a>)</p></li>
<li><p>Krawczyk, H., Bellare, M. and Canetti, R. &quot;HMAC: Keyed-Hashing for
      Message Authentication&quot;, RFC 2104, February 1997.
	(<a href="http://www.rfc-editor.org/rfc/rfc2104.txt">http://www.rfc-editor.org/rfc/rfc2104.txt</a>)</p></li>
</ol>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sha1</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="../ripemd/ripemd128.html">ripemd128</a>, <a href="../ripemd/ripemd160.html">ripemd160</a>, <a href="sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key213">FIPS 180-1</a>, <a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a>, <a href="../../../../index.html#key212">sha256</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/simulation/annealing.html.





























































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318

<div class='fossil-doc' data-title='simulation::annealing - Tcl Simulation Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">simulation::annealing(n) 0.2 tcllib &quot;Tcl Simulation Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>simulation::annealing - Simulated annealing</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">TIPS</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.4?</span></b></li>
<li>package require <b class="pkgname">simulation::annealing 0.2</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::simulation::annealing::getOption</b> <i class="arg">keyword</i></a></li>
<li><a href="#2"><b class="cmd">::simulation::annealing::hasOption</b> <i class="arg">keyword</i></a></li>
<li><a href="#3"><b class="cmd">::simulation::annealing::setOption</b> <i class="arg">keyword</i> <i class="arg">value</i></a></li>
<li><a href="#4"><b class="cmd">::simulation::annealing::findMinimum</b> <i class="arg">args</i></a></li>
<li><a href="#5"><b class="cmd">::simulation::annealing::findCombinatorialMinimum</b> <i class="arg">args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The technique of <em>simulated annealing</em> provides methods to
estimate the global optimum of a function. It is described in some
detail on the Wiki <a href="http://wiki.tcl.tk/...">http://wiki.tcl.tk/...</a>. The idea is simple:</p>
<ul class="doctools_itemized">
<li><p>randomly select points within a given search space</p></li>
<li><p>evaluate the function to be optimised for each of these
points and select the point that has the lowest (or highest)
function value or - sometimes - accept a point that has a less optimal
value. The chance by which such a non-optimal point is accepted diminishes over
time.</p></li>
<li><p>Accepting less optimal points means the method does not necessarily get
stuck in a local optimum and theoretically it is capable of finding the
global optimum within the search space.</p></li>
</ul>
<p>The method resembles the cooling of material, hence the name.</p>
<p>The package <i class="term">simulation::annealing</i> offers the command <i class="term">findMinimum</i>:</p>
<pre class="doctools_example">
    puts [::simulation::annealing::findMinimum  -trials 300  -parameters {x -5.0 5.0 y -5.0 5.0}  -function {$x*$x+$y*$y+sin(10.0*$x)+4.0*cos(20.0*$y)}]
</pre>
<p>prints the estimated minimum value of the function f(x,y) =
<em>x**2+y**2+sin(10*x)+4*cos(20*y)</em> and the values of x and y where
the minimum was attained:</p>
<pre class="doctools_example">
result -4.9112922923 x -0.181647676593 y 0.155743646974
</pre>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following auxiliary procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::simulation::annealing::getOption</b> <i class="arg">keyword</i></a></dt>
<dd><p>Get the value of an option given as part of the <i class="term">findMinimum</i>
command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">keyword</i></dt>
<dd><p>Given keyword (without leading minus)</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::simulation::annealing::hasOption</b> <i class="arg">keyword</i></a></dt>
<dd><p>Returns 1 if the option is available, 0 if not.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">keyword</i></dt>
<dd><p>Given keyword (without leading minus)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::simulation::annealing::setOption</b> <i class="arg">keyword</i> <i class="arg">value</i></a></dt>
<dd><p>Set the value of the given option.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">keyword</i></dt>
<dd><p>Given keyword (without leading minus)</p></dd>
<dt>string <i class="arg">value</i></dt>
<dd><p>(New) value for the option</p></dd>
</dl></dd>
</dl>
<p>The main procedures are <i class="term">findMinimum</i> and <i class="term">findCombinatorialMinimum</i>:</p>
<dl class="doctools_definitions">
<dt><a name="4"><b class="cmd">::simulation::annealing::findMinimum</b> <i class="arg">args</i></a></dt>
<dd><p>Find the minimum of a function using simulated annealing. The function
and the method's parameters is given via a list of
keyword-value pairs.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>List of keyword-value pairs, all of which are available
during the execution via the <i class="term">getOption</i> command.</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::simulation::annealing::findCombinatorialMinimum</b> <i class="arg">args</i></a></dt>
<dd><p>Find the minimum of a function of discrete variables using simulated
annealing. The function and the method's parameters is given via a list of
keyword-value pairs.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>List of keyword-value pairs, all of which are available
during the execution via the <i class="term">getOption</i> command.</p></dd>
</dl></dd>
</dl>
<p>The <i class="term">findMinimum</i> command predefines the following options:</p>
<ul class="doctools_itemized">
<li><p><i class="term">-parameters list</i>: triples defining parameters and ranges</p></li>
<li><p><i class="term">-function expr</i>: expression defining the function</p></li>
<li><p><i class="term">-code body</i>: body of code to define the function (takes
precedence over <i class="term">-function</i>). The code should set the variable
&quot;result&quot;</p></li>
<li><p><i class="term">-init code</i>: code to be run at start up
<i class="term">-final code</i>: code to be run at the end
<i class="term">-trials n</i>: number of trials before reducing the temperature
<i class="term">-reduce factor</i>: reduce the temperature by this factor (between 0 and 1)
<i class="term">-initial-temp t</i>: initial temperature
<i class="term">-scale s</i>: scale of the function (order of magnitude of the values)
<i class="term">-estimate-scale y/n</i>: estimate the scale (only if <i class="term">-scale</i>
is not present)
<i class="term">-verbose y/n</i>: print detailed information on progress to the
report file (1) or not (0)
<i class="term">-reportfile file</i>: opened file to print to (defaults to stdout)</p></li>
</ul>
<p>Any other options can be used via the getOption procedure
in the body.
The <i class="term">findCombinatorialMinimum</i> command predefines the following
options:</p>
<ul class="doctools_itemized">
<li><p><i class="term">-number-params n</i>: number of binary parameters (the solution
space consists of lists of 1s and 0s). This is a required option.</p></li>
<li><p><i class="term">-initial-values</i>: list of 1s and 0s constituting the start of
the search.</p></li>
</ul>
<p>The other predefined options are identical to those of <i class="term">findMinimum</i>.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TIPS</a></h2>
<p>The procedure <i class="term">findMinimum</i> works by constructing a temporary
procedure that does the actual work. It loops until the point
representing the estimated optimum does not change anymore within the
given number of trials. As the temperature gets lower and lower the
chance of accepting a point with a higher value becomes lower too, so
the procedure will in practice terminate.</p>
<p>It is possible to optimise over a non-rectangular region, but some care
must be taken:</p>
<ul class="doctools_itemized">
<li><p>If the point is outside the region of interest, you can specify a very
high value.</p></li>
<li><p>This does mean that the automatic determination of a scale factor is
out of the question - the high function values that force the point
inside the region would distort the estimation.</p></li>
</ul>
<p>Here is an example of finding an optimum inside a circle:</p>
<pre class="doctools_example">
    puts [::simulation::annealing::findMinimum  -trials 3000  -reduce 0.98  -parameters {x -5.0 5.0 y -5.0 5.0}  -code {
            if { hypot($x-5.0,$y-5.0) &lt; 4.0 } {
                set result [expr {$x*$x+$y*$y+sin(10.0*$x)+4.0*cos(20.0*$y)}]
            } else {
                set result 1.0e100
            }
        }]
</pre>
<p>The method is theoretically capable of determining the global optimum,
but often you need to use a large number of trials and a slow reduction
of temperature to get reliable and repeatable estimates.</p>
<p>You can use the <i class="term">-final</i> option to use a deterministic optimization
method, once you are sure you are near the required optimum.</p>
<p>The <i class="term">findCombinatorialMinimum</i> procedure is suited for situations
where the parameters have the values 0 or 1 (and there can be many of
them). Here is an example:</p>
<ul class="doctools_itemized">
<li><p>We have a function that attains an absolute minimum if the first ten
numbers are 1 and the rest is 0:</p>
<pre class="doctools_example">
proc cost {params} {
    set cost 0
    foreach p [lrange $params 0 9] {
        if { $p == 0 } {
            incr cost
        }
    }
    foreach p [lrange $params 10 end] {
        if { $p == 1 } {
            incr cost
        }
    }
    return $cost
}
</pre>
</li>
<li><p>We want to find the solution that gives this minimum for various lengths
of the solution vector <i class="term">params</i>:</p>
<pre class="doctools_example">
foreach n {100 1000 10000} {
    break
    puts &quot;Problem size: $n&quot;
    puts [::simulation::annealing::findCombinatorialMinimum  -trials 300  -verbose 0  -number-params $n  -code {set result [cost $params]}]
}
</pre>
</li>
<li><p>As the vector grows, the computation time increases, but the procedure
will stop if some kind of equilibrium is reached. To achieve a useful
solution you may want to try different values of the trials parameter
for instance. Also ensure that the function to be minimized depends on
all or most parameters - see the source code for a counter example and
run that.</p></li>
</ul>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key311">optimization</a>, <a href="../../../../index.html#key319">simulated annealing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/simulation/montecarlo.html.



































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289

<div class='fossil-doc' data-title='simulation::montecarlo - Tcl Simulation Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">simulation::montecarlo(n) 0.1 tcllib &quot;Tcl Simulation Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>simulation::montecarlo - Monte Carlo simulations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">TIPS</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.4?</span></b></li>
<li>package require <b class="pkgname">simulation::montecarlo 0.1</b></li>
<li>package require <b class="pkgname">simulation::random</b></li>
<li>package require <b class="pkgname">math::statistics</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::simulation::montecarlo::getOption</b> <i class="arg">keyword</i></a></li>
<li><a href="#2"><b class="cmd">::simulation::montecarlo::hasOption</b> <i class="arg">keyword</i></a></li>
<li><a href="#3"><b class="cmd">::simulation::montecarlo::setOption</b> <i class="arg">keyword</i> <i class="arg">value</i></a></li>
<li><a href="#4"><b class="cmd">::simulation::montecarlo::setTrialResult</b> <i class="arg">values</i></a></li>
<li><a href="#5"><b class="cmd">::simulation::montecarlo::setExpResult</b> <i class="arg">values</i></a></li>
<li><a href="#6"><b class="cmd">::simulation::montecarlo::getTrialResults</b></a></li>
<li><a href="#7"><b class="cmd">::simulation::montecarlo::getExpResult</b></a></li>
<li><a href="#8"><b class="cmd">::simulation::montecarlo::transposeData</b> <i class="arg">values</i></a></li>
<li><a href="#9"><b class="cmd">::simulation::montecarlo::integral2D</b> <i class="arg">...</i></a></li>
<li><a href="#10"><b class="cmd">::simulation::montecarlo::singleExperiment</b> <i class="arg">args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The technique of <em>Monte Carlo simulations</em> is basically simple:</p>
<ul class="doctools_itemized">
<li><p>generate random values for one or more parameters.</p></li>
<li><p>evaluate the model of some system you are interested in and record the
interesting results for each realisation of these parameters.</p></li>
<li><p>after a suitable number of such trials, deduce an overall characteristic
of the model.</p></li>
</ul>
<p>You can think of a model of a network of computers, an ecosystem of some
kind or in fact anything that can be quantitatively described and has
some stochastic element in it.</p>
<p>The package <i class="term">simulation::montecarlo</i> offers a basic framework for
such a modelling technique:</p>
<pre class="doctools_example">
#
# MC experiments:
# Determine the mean and median of a set of points and compare them
#
::simulation::montecarlo::singleExperiment -init {
    package require math::statistics
    set prng [::simulation::random::prng_Normal 0.0 1.0]
} -loop {
    set numbers {}
    for { set i 0 } { $i &lt; [getOption samples] } { incr i } {
        lappend numbers [$prng]
    }
    set mean   [::math::statistics::mean $numbers]
    set median [::math::statistics::median $numbers] ;# ? Exists?
    setTrialResult [list $mean $median]
} -final {
    set result [getTrialResults]
    set means   {}
    set medians {}
    foreach r $result {
        foreach {m M} $r break
        lappend means   $m
        lappend medians $M
    }
    puts [getOption reportfile] &quot;Correlation: [::math::statistics::corr $means $medians]&quot;
} -trials 100 -samples 10 -verbose 1 -columns {Mean Median}
</pre>
<p>This example attemps to find out how well the median value and the mean
value of a random set of numbers correlate. Sometimes a median value is
a more robust characteristic than a mean value - especially if you have
a statistical distribution with &quot;fat&quot; tails.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following auxiliary procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::simulation::montecarlo::getOption</b> <i class="arg">keyword</i></a></dt>
<dd><p>Get the value of an option given as part of the <i class="term">singeExperiment</i> command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">keyword</i></dt>
<dd><p>Given keyword (without leading minus)</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::simulation::montecarlo::hasOption</b> <i class="arg">keyword</i></a></dt>
<dd><p>Returns 1 if the option is available, 0 if not.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">keyword</i></dt>
<dd><p>Given keyword (without leading minus)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::simulation::montecarlo::setOption</b> <i class="arg">keyword</i> <i class="arg">value</i></a></dt>
<dd><p>Set the value of the given option.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">keyword</i></dt>
<dd><p>Given keyword (without leading minus)</p></dd>
<dt>string <i class="arg">value</i></dt>
<dd><p>(New) value for the option</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::simulation::montecarlo::setTrialResult</b> <i class="arg">values</i></a></dt>
<dd><p>Store the results of the trial for later analysis</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>List of values to be stored</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::simulation::montecarlo::setExpResult</b> <i class="arg">values</i></a></dt>
<dd><p>Set the results of the entire experiment (typically used in the final
phase).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>List of values to be stored</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::simulation::montecarlo::getTrialResults</b></a></dt>
<dd><p>Get the results of all individual trials for analysis (typically used in
the final phase or after completion of the command).</p></dd>
<dt><a name="7"><b class="cmd">::simulation::montecarlo::getExpResult</b></a></dt>
<dd><p>Get the results of the entire experiment (typically used in the final
phase or even after completion of the <i class="term">singleExperiment</i> command).</p></dd>
<dt><a name="8"><b class="cmd">::simulation::montecarlo::transposeData</b> <i class="arg">values</i></a></dt>
<dd><p>Interchange columns and rows of a list of lists and return the result.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>List of lists of values</p></dd>
</dl></dd>
</dl>
<p>There are two main procedures: <i class="term">integral2D</i> and <i class="term">singleExperiment</i>.</p>
<dl class="doctools_definitions">
<dt><a name="9"><b class="cmd">::simulation::montecarlo::integral2D</b> <i class="arg">...</i></a></dt>
<dd><p>Integrate a function over a two-dimensional region using a Monte Carlo
approach.</p>
<p>Arguments PM</p></dd>
<dt><a name="10"><b class="cmd">::simulation::montecarlo::singleExperiment</b> <i class="arg">args</i></a></dt>
<dd><p>Iterate code over a number of trials and store the results. The
iteration is gouverned by parameters given via a list of
keyword-value pairs.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>List of keyword-value pairs, all of which are available
during the execution via the <i class="term">getOption</i> command.</p></dd>
</dl></dd>
</dl>
<p>The <i class="term">singleExperiment</i> command predefines the following
options:</p>
<ul class="doctools_itemized">
<li><p><i class="term">-init code</i>: code to be run at start up</p></li>
<li><p><i class="term">-loop body</i>: body of code that defines the computation to
be run time and again. The code should use <i class="term">setTrialResult</i>
to store the results of each trial (typically a list of numbers,
but the interpretation is up to the implementation). Note: Required keyword.</p></li>
<li><p><i class="term">-final code</i>: code to be run at the end</p></li>
<li><p><i class="term">-trials n</i>: number of trials in the experiment (required)</p></li>
<li><p><i class="term">-reportfile file</i>: opened file to send the output to (default: stdout)</p></li>
<li><p><i class="term">-verbose</i>: write the intermediate results (1) or not (0) (default: 0)</p></li>
<li><p><i class="term">-analysis proc</i>: either &quot;none&quot; (no automatic analysis), standard
(basic statistics of the trial results and a correlation matrix) or the
name of a procedure that will take care of the analysis.</p></li>
<li><p><i class="term">-columns list</i>: list of column names, useful for verbose output
and the analysis</p></li>
</ul>
<p>Any other options can be used via the getOption procedure
in the body.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TIPS</a></h2>
<p>The procedure <i class="term">singleExperiment</i> works by constructing a
temporary procedure that does the actual work. It loops for the given
number of trials.</p>
<p>As it constructs a temporary procedure, local variables defined at the
start continue to exist in the loop.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key748">montecarlo simulation</a>, <a href="../../../../index.html#key747">stochastic modelling</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/simulation/simulation_random.html.



















































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297

<div class='fossil-doc' data-title='simulation::random - Tcl Simulation Tools'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">simulation::random(n) 0.1 tcllib &quot;Tcl Simulation Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>simulation::random - Pseudo-random number generators</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.4?</span></b></li>
<li>package require <b class="pkgname">simulation::random 0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::simulation::random::prng_Bernoulli</b> <i class="arg">p</i></a></li>
<li><a href="#2"><b class="cmd">::simulation::random::prng_Discrete</b> <i class="arg">n</i></a></li>
<li><a href="#3"><b class="cmd">::simulation::random::prng_Poisson</b> <i class="arg">lambda</i></a></li>
<li><a href="#4"><b class="cmd">::simulation::random::prng_Uniform</b> <i class="arg">min</i> <i class="arg">max</i></a></li>
<li><a href="#5"><b class="cmd">::simulation::random::prng_Exponential</b> <i class="arg">min</i> <i class="arg">mean</i></a></li>
<li><a href="#6"><b class="cmd">::simulation::random::prng_Normal</b> <i class="arg">mean</i> <i class="arg">stdev</i></a></li>
<li><a href="#7"><b class="cmd">::simulation::random::prng_Pareto</b> <i class="arg">min</i> <i class="arg">steep</i></a></li>
<li><a href="#8"><b class="cmd">::simulation::random::prng_Gumbel</b> <i class="arg">min</i> <i class="arg">f</i></a></li>
<li><a href="#9"><b class="cmd">::simulation::random::prng_chiSquared</b> <i class="arg">df</i></a></li>
<li><a href="#10"><b class="cmd">::simulation::random::prng_Disk</b> <i class="arg">rad</i></a></li>
<li><a href="#11"><b class="cmd">::simulation::random::prng_Sphere</b> <i class="arg">rad</i></a></li>
<li><a href="#12"><b class="cmd">::simulation::random::prng_Ball</b> <i class="arg">rad</i></a></li>
<li><a href="#13"><b class="cmd">::simulation::random::prng_Rectangle</b> <i class="arg">length</i> <i class="arg">width</i></a></li>
<li><a href="#14"><b class="cmd">::simulation::random::prng_Block</b> <i class="arg">length</i> <i class="arg">width</i> <i class="arg">depth</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package consists of commands to generate pseudo-random number
generators. These new commands deliver</p>
<ul class="doctools_itemized">
<li><p>numbers that are distributed normally, uniformly, according to a
Pareto or Gumbel distribution and so on</p></li>
<li><p>coordinates of points uniformly spread inside a sphere or a rectangle</p></li>
</ul>
<p>For example:</p>
<pre class="doctools_example">
    set p [::simulation::random::prng_Normal -1.0 10.0]
</pre>
<p>produces a new command (whose name is stored in the variable &quot;p&quot;) that
generates normally distributed numbers with a mean of -1.0 and a
standard deviation of 10.0.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following public procedures for <em>discrete</em>
distributions:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::simulation::random::prng_Bernoulli</b> <i class="arg">p</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers with a Bernoulli
distribution: the value is either 1 or 0, with a chance p to be 1</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">p</i></dt>
<dd><p>Chance the outcome is 1</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::simulation::random::prng_Discrete</b> <i class="arg">n</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers 0 to n-1 with equal
probability.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Number of different values (ranging from 0 to n-1)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::simulation::random::prng_Poisson</b> <i class="arg">lambda</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers according to the Poisson
distribution.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">lambda</i></dt>
<dd><p>Mean number per time interval</p></dd>
</dl></dd>
</dl>
<p>The package defines the following public procedures for <em>continuous</em> distributions:</p>
<dl class="doctools_definitions">
<dt><a name="4"><b class="cmd">::simulation::random::prng_Uniform</b> <i class="arg">min</i> <i class="arg">max</i></a></dt>
<dd><p>Create a command (PRNG) that generates uniformly distributed numbers
between &quot;min&quot; and &quot;max&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">max</i></dt>
<dd><p>Maximum number that will be generated</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::simulation::random::prng_Exponential</b> <i class="arg">min</i> <i class="arg">mean</i></a></dt>
<dd><p>Create a command (PRNG) that generates exponentially distributed numbers
with a given minimum value and a given mean value.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">mean</i></dt>
<dd><p>Mean value for the numbers</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::simulation::random::prng_Normal</b> <i class="arg">mean</i> <i class="arg">stdev</i></a></dt>
<dd><p>Create a command (PRNG) that generates normally distributed numbers
with a given mean value and a given standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>Mean value for the numbers</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>Standard deviation</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::simulation::random::prng_Pareto</b> <i class="arg">min</i> <i class="arg">steep</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers distributed according to
Pareto with a given minimum value and a given distribution steepness.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">steep</i></dt>
<dd><p>Steepness of the distribution</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::simulation::random::prng_Gumbel</b> <i class="arg">min</i> <i class="arg">f</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers distributed according to
Gumbel with a given minimum value and a given scale factor. The
probability density function is:</p>
<pre class="doctools_example">
     P(v) = exp( -exp(f*(v-min)))
</pre>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">f</i></dt>
<dd><p>Scale factor for the values</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::simulation::random::prng_chiSquared</b> <i class="arg">df</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers distributed according to
the chi-squared distribution with df degrees of freedom. The mean is 0
and the standard deviation is 1.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>Degrees of freedom</p></dd>
</dl></dd>
</dl>
<p>The package defines the following public procedures for random point sets:</p>
<dl class="doctools_definitions">
<dt><a name="10"><b class="cmd">::simulation::random::prng_Disk</b> <i class="arg">rad</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y)-coordinates for points
uniformly spread over a disk of given radius.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">rad</i></dt>
<dd><p>Radius of the disk</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::simulation::random::prng_Sphere</b> <i class="arg">rad</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y,z)-coordinates for points
uniformly spread over the surface of a sphere of given radius.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">rad</i></dt>
<dd><p>Radius of the disk</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::simulation::random::prng_Ball</b> <i class="arg">rad</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y,z)-coordinates for points
uniformly spread within a ball of given radius.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">rad</i></dt>
<dd><p>Radius of the ball</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::simulation::random::prng_Rectangle</b> <i class="arg">length</i> <i class="arg">width</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y)-coordinates for points
uniformly spread over a rectangle.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">length</i></dt>
<dd><p>Length of the rectangle (x-direction)</p></dd>
<dt>float <i class="arg">width</i></dt>
<dd><p>Width of the rectangle (y-direction)</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::simulation::random::prng_Block</b> <i class="arg">length</i> <i class="arg">width</i> <i class="arg">depth</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y,z)-coordinates for points
uniformly spread over a block</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">length</i></dt>
<dd><p>Length of the block (x-direction)</p></dd>
<dt>float <i class="arg">width</i></dt>
<dd><p>Width of the block (y-direction)</p></dd>
<dt>float <i class="arg">depth</i></dt>
<dd><p>Depth of the block (z-direction)</p></dd>
</dl></dd>
</dl>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key642">random numbers</a>, <a href="../../../../index.html#key641">simulation</a>, <a href="../../../../index.html#key640">statistical distribution</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/smtpd/smtpd.html.















































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359

<div class='fossil-doc' data-title='smtpd - Tcl SMTP Server Package'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">smtpd(n) 1.5 tcllib &quot;Tcl SMTP Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>smtpd - Tcl SMTP server implementation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">SECURITY</a></li>
<li class="doctools_section"><a href="#section3">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section4">COMMANDS</a></li>
<li class="doctools_section"><a href="#section5">CALLBACKS</a></li>
<li class="doctools_section"><a href="#section6">VARIABLES</a></li>
<li class="doctools_section"><a href="#section7">AUTHOR</a></li>
<li class="doctools_section"><a href="#section8">LICENSE</a></li>
<li class="doctools_section"><a href="#section9">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">smtpd <span class="opt">?1.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::smtpd::start</b> <span class="opt">?<i class="arg">myaddr</i>?</span> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::smtpd::stop</b></a></li>
<li><a href="#3"><b class="cmd">::smptd::configure</b> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>?</span> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> <i class="arg">...</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::smtpd::cget</b> <span class="opt">?<i class="arg">option</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">smtpd</b> package provides a simple Tcl-only server library
for the Simple Mail Transfer Protocol as described in
RFC  821 (<a href="http://www.rfc-editor.org/rfc/rfc821.txt">http://www.rfc-editor.org/rfc/rfc821.txt</a>) and
RFC 2821 (<a href="http://www.rfc-editor.org/rfc/rfc2821.txt">http://www.rfc-editor.org/rfc/rfc2821.txt</a>).
By default the server will bind to the default network address and the
standard SMTP port (25).</p>
<p>This package was designed to permit testing of Mail User Agent code
from a developers workstation. <em>It does not attempt to deliver  mail to your mailbox.</em> Instead users of this package are expected to
write a procedure that will be called when mail arrives. Once this
procedure returns, the server has nothing further to do with the mail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">SECURITY</a></h2>
<p>On Unix platforms binding to the SMTP port requires root privileges. I
would not recommend running any script-based server as root unless
there is some method for dropping root privileges immediately after
the socket is bound. Under Windows platforms, it is not necessary to
have root or administrator privileges to bind low numbered
sockets. However, security on these platforms is weak anyway.</p>
<p>In short, this code should probably not be used as a permanently
running Mail Transfer Agent on an Internet connected server, even
though we are careful not to evaluate remote user input. There are
many other well tested and security audited programs that can be used
as mail servers for internet connected hosts.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::smtpd::start</b> <span class="opt">?<i class="arg">myaddr</i>?</span> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Start the service listening on <i class="arg">port</i> or the default port 25. If
<i class="arg">myaddr</i> is given as a domain-style name or numerical
dotted-quad IP address then the server socket will be bound to that
network interface. By default the server is bound to all network
interfaces. For example:</p>
<pre class="doctools_example">
  set sock [::smtpd::start [info hostname] 0]
</pre>
<p>will bind to the hosts internet interface on the first available port.</p>
<p>At present the package only supports a single instance of a SMTP
server. This could be changed if required at the cost of making the
package a little more complicated to read. If there is a good reason
for running multiple SMTP services then it will only be necessary to
fix the <b class="variable">options</b> array and the <b class="variable">::smtpd::stopped</b> variable
usage.</p>
<p>As the server code uses <b class="cmd">fileevent</b>(n) handlers to process the
input on sockets you will need to run the event loop. This means
either you should be running from within <b class="syscmd">wish</b>(1) or you
should <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>(n) on the <b class="variable">::smtpd::stopped</b> variable which is
set when the server is stopped.</p></dd>
<dt><a name="2"><b class="cmd">::smtpd::stop</b></a></dt>
<dd><p>Halt the server and release the listening socket. If the server has
not been started then this command does nothing.
The <b class="variable">::smtpd::stopped</b> variable is set for use with
<b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>(n).</p>
<p>It should be noted that stopping the server does not disconnect any
currently active sessions as these are operating over an independent
channel. Only explicitly tracking and closing these sessions, or
exiting the server process will close down all the running
sessions. This is similar to the usual unix daemon practice where the
server performs a <b class="syscmd">fork</b>(2) and the client session continues on
the child process.</p></dd>
<dt><a name="3"><b class="cmd">::smptd::configure</b> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>?</span> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> <i class="arg">...</i>?</span></a></dt>
<dd><p>Set configuration options for the SMTP server. Most values are the
name of a callback procedure to be called at various points in the
SMTP protocol. See the <span class="sectref"><a href="#section5">CALLBACKS</a></span> section for details of the
procedures.</p>
<dl class="doctools_definitions">
<dt><b class="option">-banner</b> <i class="arg">text</i></dt>
<dd><p>Text of a custom banner message. The default banner is &quot;tcllib smtpd 1.5&quot;.
Note that changing the banner does not affect the bracketing text
in the full greeting, printing status 220, server-address, and timestamp.</p></dd>
<dt><b class="option">-validate_host</b> <i class="arg">proc</i></dt>
<dd><p>Callback to authenticate new connections based on the ip-address of
the client.</p></dd>
<dt><b class="option">-validate_sender</b> <i class="arg">proc</i></dt>
<dd><p>Callback to authenticate new connections based on the senders email
address.</p></dd>
<dt><b class="option">-validate_recipient</b> <i class="arg">proc</i></dt>
<dd><p>Callback to validate and authorize a recipient email address</p></dd>
<dt><b class="option">-deliverMIME</b> <i class="arg">proc</i></dt>
<dd><p>Callback used to deliver mail as a mime token created by the tcllib
<b class="package"><a href="../mime/mime.html">mime</a></b> package.</p></dd>
<dt><b class="option">-deliver</b> <i class="arg">proc</i></dt>
<dd><p>Callback used to deliver email. This option has no effect if
the <b class="option">-deliverMIME</b> option has been set.</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::smtpd::cget</b> <span class="opt">?<i class="arg">option</i>?</span></a></dt>
<dd><p>If no <i class="arg">option</i> is specified the command will return a list of all
options and their current values. If an option is specified it will
return the value of that option.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">CALLBACKS</a></h2>
<dl class="doctools_definitions">
<dt><b class="cmd">validate_host</b> callback</dt>
<dd><p>This procedure is called with the clients ip address as soon as a
connection request has been accepted and before any protocol commands
are processed. If you wish to deny access to a specific host then an
error should be returned by this callback. For example:</p>
<pre class="doctools_example">
 proc validate_host {ipnum} {
    if {[string match &quot;192.168.1.*&quot; $ipnum]} {
       error &quot;go away!&quot;
    }
 }
</pre>
<p>If access is denied the client will receive a standard message that
includes the text of your error, such as:</p>
<pre class="doctools_example">
 550 Access denied: I hate you.
</pre>
<p>As per the SMTP protocol, the connection is not closed but we wait for
the client to send a QUIT command. Any other commands cause a
<b class="const">503 Bad Sequence</b> error.</p></dd>
<dt><b class="cmd">validate_sender</b> callback</dt>
<dd><p>The validate_sender callback is called with the senders mail address
during processing of a MAIL command to allow you to accept or reject
mail based upon the declared sender. To reject mail you should throw
an error. For example, to reject mail from user &quot;denied&quot;:</p>
<pre class="doctools_example">
 proc validate_sender {address} {
    eval array set addr [mime::parseaddress $address]
    if {[string match &quot;denied&quot; $addr(local)]} {
         error &quot;mailbox $addr(local) denied&quot;
    }
    return
 }
</pre>
<p>The content of any error message will not be passed back to the client.</p></dd>
<dt><b class="cmd">validate_recipient</b> callback</dt>
<dd><p>The validate_recipient callback is similar to the validate_sender
callback and permits you to verify a local mailbox and accept mail for
a local user address during RCPT command handling. To reject mail,
throw an error as above. The error message is ignored.</p></dd>
<dt><b class="cmd">deliverMIME</b> callback</dt>
<dd><p>]
The deliverMIME callback is called once a mail message has been
successfully passed to the server. A mime token is constructed from
the sender, recipients and data and the users procedure it called with
this single argument. When the call returns, the mime token is cleaned
up so if the user wishes to preserve the data she must make a copy.</p>
<pre class="doctools_example">
 proc deliverMIME {token} {
     set sender [lindex [mime::getheader $token From] 0]
     set recipients [lindex [mime::getheader $token To] 0]
     set mail &quot;From $sender [clock format [clock seconds]]&quot;
     append mail &quot;\n&quot; [mime::buildmessage $token]
     puts $mail
 }
</pre>
</dd>
<dt><b class="cmd">deliver</b> callback</dt>
<dd><p>The deliver callback is called once a mail message has been
successfully passed to the server and there is no -deliverMIME option
set. The procedure is called with the sender, a list of recipients and
the text of the mail as a list of lines. For example:</p>
<pre class="doctools_example">
 proc deliver {sender recipients data} {
    set mail &quot;From $sender  [clock format [clock seconds]]&quot;
    append mail &quot;\n&quot; [join $data &quot;\n&quot;]
    puts &quot;$mail&quot;
 }
</pre>
<p>Note that the DATA command will return an error if no sender or
recipient has yet been defined.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">VARIABLES</a></h2>
<dl class="doctools_definitions">
<dt><b class="variable">::smtpd::stopped</b></dt>
<dd><p>This variable is set to <b class="const">true</b> during the <b class="cmd">::smtpd::stop</b>
command to permit the use of the <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>(n) command.</p></dd>
</dl>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">AUTHOR</a></h2>
<p>Written by Pat Thoyts <a href="mailto:patthoyts@users.sourceforge.net">mailto:patthoyts@users.sourceforge.net</a>.</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">LICENSE</a></h2>
<p>This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file
&quot;<b class="file">license.terms</b>&quot; for more details.</p>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>smtpd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key329">rfc 2821</a>, <a href="../../../../index.html#key332">rfc 821</a>, <a href="../../../../index.html#key605">services</a>, <a href="../../../../index.html#key337">smtp</a>, <a href="../../../../index.html#key671">smtpd</a>, <a href="../../../../index.html#key352">socket</a>, <a href="../../../../index.html#key418">vwait</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/snit/snit.html.













































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070

<div class='fossil-doc' data-title='snit - Snit's Not Incr Tcl, OO system'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">snit(n) 2.3.2 tcllib &quot;Snit's Not Incr Tcl, OO system&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>snit - Snit's Not Incr Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">SNIT VERSIONS</a></li>
<li class="doctools_section"><a href="#section3">REFERENCE</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Type and Widget Definitions</a></li>
<li class="doctools_subsection"><a href="#subsection2">The Type Command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Standard Type Methods</a></li>
<li class="doctools_subsection"><a href="#subsection4">The Instance Command</a></li>
<li class="doctools_subsection"><a href="#subsection5">Standard Instance Methods</a></li>
<li class="doctools_subsection"><a href="#subsection6">Commands for use in Object Code</a></li>
<li class="doctools_subsection"><a href="#subsection7">Components and Delegation</a></li>
<li class="doctools_subsection"><a href="#subsection8">Type Components and Delegation</a></li>
<li class="doctools_subsection"><a href="#subsection9">The Tk Option Database</a></li>
<li class="doctools_subsection"><a href="#subsection10">Macros and Meta-programming</a></li>
<li class="doctools_subsection"><a href="#subsection11">Validation Types</a></li>
<li class="doctools_subsection"><a href="#subsection12">Defining Validation Types</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">CAVEATS</a></li>
<li class="doctools_section"><a href="#section5">KNOWN BUGS</a></li>
<li class="doctools_section"><a href="#section6">HISTORY</a></li>
<li class="doctools_section"><a href="#section7">CREDITS</a></li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit <span class="opt">?2.3.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">snit::type</b> <i class="arg">name</i> <i class="arg">definition</i></a></li>
<li><a href="#2"><b class="cmd">typevariable</b> <i class="arg">name</i> <span class="opt">?<b class="const">-array</b>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#3"><b class="cmd">typemethod</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#4"><b class="cmd">typeconstructor</b> <i class="arg">body</i></a></li>
<li><a href="#5"><b class="cmd">variable</b> <i class="arg">name</i> <span class="opt">?<b class="const">-array</b>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#6"><b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#7"><b class="cmd">option</b> <i class="arg">namespec</i> <span class="opt">?<i class="arg">defaultValue</i>?</span></a></li>
<li><a href="#8"><b class="cmd">option</b> <i class="arg">namespec</i> <span class="opt">?<i class="arg">options...</i>?</span></a></li>
<li><a href="#9"><b class="cmd">constructor</b> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#10"><b class="cmd">destructor</b> <i class="arg">body</i></a></li>
<li><a href="#11"><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">name</i> <i class="arg">args</i> <i class="arg">body</i></a></li>
<li><a href="#12"><b class="cmd">delegate</b> <b class="const">method</b> <i class="arg">name</i> <b class="const">to</b> <i class="arg">comp</i> <span class="opt">?<b class="const">as</b> <i class="arg">target</i>?</span></a></li>
<li><a href="#13"><b class="cmd">delegate</b> <b class="const">method</b> <i class="arg">name</i> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <b class="const">using</b> <i class="arg">pattern</i></a></li>
<li><a href="#14"><b class="cmd">delegate</b> <b class="const">method</b> <b class="const">*</b> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <span class="opt">?<b class="const">using</b> <i class="arg">pattern</i>?</span> <span class="opt">?<b class="const">except</b> <i class="arg">exceptions</i>?</span></a></li>
<li><a href="#15"><b class="cmd">delegate</b> <b class="const">option</b> <i class="arg">namespec</i> <b class="const">to</b> <i class="arg">comp</i></a></li>
<li><a href="#16"><b class="cmd">delegate</b> <b class="const">option</b> <i class="arg">namespec</i> <b class="const">to</b> <i class="arg">comp</i> <b class="const">as</b> <i class="arg">target</i></a></li>
<li><a href="#17"><b class="cmd">delegate</b> <b class="const">option</b> <b class="const">*</b> <b class="const">to</b> <i class="arg">comp</i></a></li>
<li><a href="#18"><b class="cmd">delegate</b> <b class="const">option</b> <b class="const">*</b> <b class="const">to</b> <i class="arg">comp</i> <b class="const">except</b> <i class="arg">exceptions</i></a></li>
<li><a href="#19"><b class="cmd">component</b> <i class="arg">comp</i> <span class="opt">?<b class="const">-public</b> <i class="arg">method</i>?</span> <span class="opt">?<b class="const">-inherit</b> <i class="arg">flag</i>?</span></a></li>
<li><a href="#20"><b class="cmd">delegate</b> <b class="const">typemethod</b> <i class="arg">name</i> <b class="const">to</b> <i class="arg">comp</i> <span class="opt">?<b class="const">as</b> <i class="arg">target</i>?</span></a></li>
<li><a href="#21"><b class="cmd">delegate</b> <b class="const">typemethod</b> <i class="arg">name</i> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <b class="const">using</b> <i class="arg">pattern</i></a></li>
<li><a href="#22"><b class="cmd">delegate</b> <b class="const">typemethod</b> <b class="const">*</b> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <span class="opt">?<b class="const">using</b> <i class="arg">pattern</i>?</span> <span class="opt">?<b class="const">except</b> <i class="arg">exceptions</i>?</span></a></li>
<li><a href="#23"><b class="cmd">typecomponent</b> <i class="arg">comp</i> <span class="opt">?<b class="const">-public</b> <i class="arg">typemethod</i>?</span> <span class="opt">?<b class="const">-inherit</b> <i class="arg">flag</i>?</span></a></li>
<li><a href="#24"><b class="cmd">pragma</b> <span class="opt">?<i class="arg">options...</i>?</span></a></li>
<li><a href="#25"><b class="cmd">expose</b> <i class="arg">comp</i></a></li>
<li><a href="#26"><b class="cmd">expose</b> <i class="arg">comp</i> <b class="const">as</b> <i class="arg">method</i></a></li>
<li><a href="#27"><b class="cmd">onconfigure</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#28"><b class="cmd">oncget</b> <i class="arg">name</i> <i class="arg">body</i></a></li>
<li><a href="#29"><b class="cmd">snit::widget</b> <i class="arg">name</i> <i class="arg">definition</i></a></li>
<li><a href="#30"><b class="cmd">widgetclass</b> <i class="arg">name</i></a></li>
<li><a href="#31"><b class="cmd">hulltype</b> <i class="arg">type</i></a></li>
<li><a href="#32"><b class="cmd">snit::widgetadaptor</b> <i class="arg">name</i> <i class="arg">definition</i></a></li>
<li><a href="#33"><b class="cmd">snit::typemethod</b> <i class="arg">type</i> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#34"><b class="cmd">snit::method</b> <i class="arg">type</i> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#35"><b class="cmd">snit::macro</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#36"><b class="cmd">snit::compile</b> <i class="arg">which</i> <i class="arg">type</i> <i class="arg">body</i></a></li>
<li><a href="#37"><b class="cmd">$type</b> <i class="arg">typemethod</i> <i class="arg">args</i>...</a></li>
<li><a href="#38"><b class="cmd">$type</b> <b class="method">create</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#39"><b class="cmd">$type</b> <b class="method">info typevars</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#40"><b class="cmd">$type</b> <b class="method">info typemethods</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#41"><b class="cmd">$type</b> <b class="method">info args</b> <i class="arg">method</i></a></li>
<li><a href="#42"><b class="cmd">$type</b> <b class="method">info body</b> <i class="arg">method</i></a></li>
<li><a href="#43"><b class="cmd">$type</b> <b class="method">info default</b> <i class="arg">method</i> <i class="arg">aname</i> <i class="arg">varname</i></a></li>
<li><a href="#44"><b class="cmd">$type</b> <b class="method">info instances</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#45"><b class="cmd">$type</b> <b class="method">destroy</b></a></li>
<li><a href="#46"><b class="cmd">$object</b> <i class="arg">method</i> <i class="arg">args...</i></a></li>
<li><a href="#47"><b class="cmd">$object</b> <b class="method">configure</b> <span class="opt">?<i class="arg">option</i>?</span> <span class="opt">?<i class="arg">value</i>?</span> ...</a></li>
<li><a href="#48"><b class="cmd">$object</b> <b class="method">configurelist</b> <i class="arg">optionlist</i></a></li>
<li><a href="#49"><b class="cmd">$object</b> <b class="method">cget</b> <i class="arg">option</i></a></li>
<li><a href="#50"><b class="cmd">$object</b> <b class="method">destroy</b></a></li>
<li><a href="#51"><b class="cmd">$object</b> <b class="method">info type</b></a></li>
<li><a href="#52"><b class="cmd">$object</b> <b class="method">info vars</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#53"><b class="cmd">$object</b> <b class="method">info typevars</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#54"><b class="cmd">$object</b> <b class="method">info typemethods</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#55"><b class="cmd">$object</b> <b class="method">info options</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#56"><b class="cmd">$object</b> <b class="method">info methods</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#57"><b class="cmd">$object</b> <b class="method">info args</b> <i class="arg">method</i></a></li>
<li><a href="#58"><b class="cmd">$object</b> <b class="method">info body</b> <i class="arg">method</i></a></li>
<li><a href="#59"><b class="cmd">$object</b> <b class="method">info default</b> <i class="arg">method</i> <i class="arg">aname</i> <i class="arg">varname</i></a></li>
<li><a href="#60"><b class="cmd">mymethod</b> <i class="arg">name</i> <span class="opt">?<i class="arg">args...</i>?</span></a></li>
<li><a href="#61"><b class="cmd">mytypemethod</b> <i class="arg">name</i> <span class="opt">?<i class="arg">args...</i>?</span></a></li>
<li><a href="#62"><b class="cmd">myproc</b> <i class="arg">name</i> <span class="opt">?<i class="arg">args...</i>?</span></a></li>
<li><a href="#63"><b class="cmd">myvar</b> <i class="arg">name</i></a></li>
<li><a href="#64"><b class="cmd">mytypevar</b> <i class="arg">name</i></a></li>
<li><a href="#65"><b class="cmd">from</b> <i class="arg">argvName</i> <i class="arg">option</i> <span class="opt">?<i class="arg">defvalue</i>?</span></a></li>
<li><a href="#66"><b class="cmd">install</b> <i class="arg">compName</i> <b class="const">using</b> <i class="arg">objType</i> <i class="arg">objName</i> <i class="arg">args...</i></a></li>
<li><a href="#67"><b class="cmd">installhull</b> <b class="const">using</b> <i class="arg">widgetType</i> <i class="arg">args...</i></a></li>
<li><a href="#68"><b class="cmd">installhull</b> <i class="arg">name</i></a></li>
<li><a href="#69"><b class="cmd">variable</b> <i class="arg">name</i></a></li>
<li><a href="#70"><b class="cmd">typevariable</b> <i class="arg">name</i></a></li>
<li><a href="#71"><b class="cmd">varname</b> <i class="arg">name</i></a></li>
<li><a href="#72"><b class="cmd">typevarname</b> <i class="arg">name</i></a></li>
<li><a href="#73"><b class="cmd">codename</b> <i class="arg">name</i></a></li>
<li><a href="#74"><b class="cmd">snit::boolean</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#75"><b class="cmd">snit::boolean</b> <i class="arg">name</i></a></li>
<li><a href="#76"><b class="cmd">snit::double</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#77"><b class="cmd">snit::double</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></li>
<li><a href="#78"><b class="cmd">snit::enum</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#79"><b class="cmd">snit::enum</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></li>
<li><a href="#80"><b class="cmd">snit::fpixels</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#81"><b class="cmd">snit::fpixels</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></li>
<li><a href="#82"><b class="cmd">snit::integer</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#83"><b class="cmd">snit::integer</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></li>
<li><a href="#84"><b class="cmd">snit::listtype</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#85"><b class="cmd">snit::listtype</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></li>
<li><a href="#86"><b class="cmd">snit::pixels</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#87"><b class="cmd">snit::pixels</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></li>
<li><a href="#88"><b class="cmd">snit::stringtype</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#89"><b class="cmd">snit::stringtype</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></li>
<li><a href="#90"><b class="cmd">snit::window</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#91"><b class="cmd">snit::window</b> <i class="arg">name</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Snit is a pure Tcl object and megawidget system.  It's
unique among Tcl object systems in that it's based not on inheritance
but on delegation.  Object systems based on inheritance only allow you
to inherit from classes defined using the same system, which is
limiting.  In Tcl, an object is
anything that acts like an object; it shouldn't matter how the object
was implemented.  Snit is intended to help you build applications out of
the materials at hand; thus, Snit is designed to be able to
incorporate and build on any object, whether it's a hand-coded object,
a <b class="package"><a href="../../../../index.html#key209">Tk</a></b> widget, an <b class="package"><a href="../../../../index.html#key244">Incr Tcl</a></b> object,
a <b class="package"><a href="../../../../index.html#key241">BWidget</a></b> or almost anything else.</p>
<p>This man page is intended to be a reference only; see the accompanying
<b class="cmd"><a href="snitfaq.html">snitfaq</a></b> for a gentler, more tutorial introduction to Snit
concepts.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">SNIT VERSIONS</a></h2>
<p>This man page covers both Snit 2.2 and Snit 1.3.  The primary
difference between the two versions is simply that Snit 2.2 contains
speed optimizations based on new features of Tcl 8.5; Snit 1.3
supports all of Tcl 8.3, 8.4 and Tcl 8.5.  There are a few minor
inconsistencies; they are flagged in the body of the man page with the
label &quot;Snit 1.x Incompatibility&quot;; they are also discussed in the <b class="cmd"><a href="snitfaq.html">snitfaq</a></b>.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">REFERENCE</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Type and Widget Definitions</a></h3>
<p>Snit provides the following commands for defining new types:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">snit::type</b> <i class="arg">name</i> <i class="arg">definition</i></a></dt>
<dd><p>Defines a new abstract data type called <i class="arg">name</i>.  If <i class="arg">name</i> is
not a fully qualified command name, it is assumed to be a name in the
namespace in which the <b class="cmd">snit::type</b> command was called (usually the
global namespace).  It returns the fully qualified name of the new type.</p>
<p>The type name is then a command that is used to create objects of the
new type, along with other activities.</p>
<p>The <b class="cmd">snit::type</b> <i class="arg">definition</i> block is a script that may
contain the following definitions:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">typevariable</b> <i class="arg">name</i> <span class="opt">?<b class="const">-array</b>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Defines a type variable with the specified <i class="arg">name</i>, and optionally
the specified <i class="arg">value</i>.  Type variables are shared by all instances
of the type.  If the <b class="const">-array</b> option is included, then
<i class="arg">value</i> should be a dictionary; it will be
assigned to the variable using <b class="cmd">array set</b>.</p></dd>
<dt><a name="3"><b class="cmd">typemethod</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Defines a type method, a subcommand of the new type command,
with the specified name, argument list, and
body.  The <i class="arg">arglist</i> is a normal Tcl argument list and may contain
default arguments and the <b class="variable">args</b> argument; however, it may not
contain the argument names <b class="variable">type</b>, <b class="variable">self</b>, <b class="variable">selfns</b>, or
<b class="variable">win</b>.</p>
<p>The variable <b class="variable">type</b> is automatically defined in the <i class="arg">body</i> to
the type's fully-qualified name.  In addition,
type variables are automatically visible in the <i class="arg">body</i>
of every type method.</p>
<p>If the <i class="arg">name</i> consists of two or more tokens, Snit handles it specially:</p>
<pre class="doctools_example">    typemethod {a b} {arg} { puts &quot;Got $arg&quot; }
</pre>
<p>This statement implicitly defines a type method called <b class="const">a</b> which
has a subcommand <b class="const">b</b>.  <b class="const">b</b> is called like this:</p>
<pre class="doctools_example">    $type a b &quot;Hello, world!&quot;
</pre>
<p><b class="const">a</b> may have any number of subcommands.  This makes it possible
to define a hierarchical command structure; see <b class="cmd"><a href="../../../../index.html#key372">method</a></b>, below,
for more examples.</p>
<p>Type methods can call commands from the namespace in which the type is
defined without importing them, e.g., if the type name is
<b class="cmd">::parentns::typename</b>, then the type's type methods can call
<b class="cmd">::parentns::someproc</b> just as <b class="cmd">someproc</b>.
<em>Snit 1.x Incompatibility:</em> This does not work in Snit 1.x, as
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p>
<p><em>Snit 1.x Incompatibility:</em> In Snit 1.x, the following
following two calls to this type method are equivalent:</p>
<pre class="doctools_example">    $type a b &quot;Hello, world!&quot;
    $type {a b} &quot;Hello, world!&quot;
</pre>
<p>In Snit 2.2, the second form is invalid.</p></dd>
<dt><a name="4"><b class="cmd">typeconstructor</b> <i class="arg">body</i></a></dt>
<dd><p>The type constructor's <i class="arg">body</i> is executed once when the
type is first defined; it is typically used to
initialize array-valued type variables and to add
entries to <span class="sectref"><a href="#subsection9">The Tk Option Database</a></span>.</p>
<p>The variable <b class="variable">type</b> is automatically defined in the <i class="arg">body</i>,
and contains the type's fully-qualified name.  In addition,
type variables are automatically visible in the <i class="arg">body</i> of the type
constructor.</p>
<p>A type may define at most one type constructor.</p>
<p>The type constructor can call commands from the namespace in which the type is
defined without importing them, e.g., if the type name is
<b class="cmd">::parentns::typename</b>, then the type constructor can call
<b class="cmd">::parentns::someproc</b> just as <b class="cmd">someproc</b>.
<em>Snit 1.x Incompatibility:</em> This does not work in Snit 1.x, as
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p></dd>
<dt><a name="5"><b class="cmd">variable</b> <i class="arg">name</i> <span class="opt">?<b class="const">-array</b>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Defines an instance variable, a private variable associated with each
instance of this type, and optionally its initial value.
If the <b class="const">-array</b> option is included, then
<i class="arg">value</i> should be a dictionary; it will be
assigned to the variable using <b class="cmd">array set</b>.</p></dd>
<dt><a name="6"><b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Defines an instance method, a subcommand of each instance of this
type, with the specified name, argument list and body.
The <i class="arg">arglist</i> is a normal Tcl argument list and may contain
default arguments and the <b class="variable">args</b> argument.</p>
<p>The method is implicitly passed the following arguments as well:
<b class="variable">type</b>, which contains the fully-qualified type name; <b class="variable">self</b>,
which contains the current instance command name; <b class="variable">selfns</b>, which
contains the name of the instance's private namespace; and <b class="variable">win</b>,
which contains the original instance name.
Consequently, the <i class="arg">arglist</i> may not contain the argument names
<b class="const">type</b>, <b class="const">self</b>, <b class="const">selfns</b>, or <b class="const">win</b>.</p>
<p>An instance method defined in this way is said to be
<i class="term">locally defined</i>.</p>
<p>Type and instance variables are
automatically visible in all instance methods.  If the type has
locally defined options, the <b class="variable">options</b> array is also visible.</p>
<p>If the <i class="arg">name</i> consists of two or more tokens, Snit handles it specially:</p>
<pre class="doctools_example">    method {a b} {} { ... }
</pre>
<p>This statement implicitly defines a method called <b class="const">a</b> which
has a subcommand <b class="const">b</b>.  <b class="const">b</b> is called like this:</p>
<pre class="doctools_example">    $self a b &quot;Hello, world!&quot;
</pre>
<p><b class="const">a</b> may have any number of subcommands.  This makes it possible
to define a hierarchical command structure:</p>
<pre class="doctools_example">% snit::type dog {
    method {tail wag}   {} {return &quot;Wag, wag&quot;}
    method {tail droop} {} {return &quot;Droop, droop&quot;}
}
::dog
% dog spot
::spot
% spot tail wag
Wag, wag
% spot tail droop
Droop, droop
%
</pre>
<p>What we've done is implicitly defined a &quot;tail&quot; method with subcommands
&quot;wag&quot; and &quot;droop&quot;.  Consequently, it's an error to define &quot;tail&quot;
explicitly.</p>
<p>Methods can call commands from the namespace in which the type is
defined without importing them, e.g., if the type name is
<b class="cmd">::parentns::typename</b>, then the type's methods can call
<b class="cmd">::parentns::someproc</b> just as <b class="cmd">someproc</b>.
<em>Snit 1.x Incompatibility:</em> This does not work in Snit 1.x, as
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p>
<p><em>Snit 1.x Incompatibility:</em> In Snit 1.x, the following
following two calls to this method are equivalent:</p>
<pre class="doctools_example">    $self a b &quot;Hello, world!&quot;
    $self {a b} &quot;Hello, world!&quot;
</pre>
<p>In Snit 2.2, the second form is invalid.</p></dd>
<dt><a name="7"><b class="cmd">option</b> <i class="arg">namespec</i> <span class="opt">?<i class="arg">defaultValue</i>?</span></a></dt>
<dd></dd>
<dt><a name="8"><b class="cmd">option</b> <i class="arg">namespec</i> <span class="opt">?<i class="arg">options...</i>?</span></a></dt>
<dd><p>Defines an option for instances of this type, and optionally gives it
an initial value.  The initial value defaults to the empty string if
no <i class="arg">defaultValue</i> is specified.</p>
<p>An option defined in this way is said to be <i class="term">locally defined</i>.</p>
<p>The <i class="arg">namespec</i> is a list defining the option's
name, resource name, and class name, e.g.:</p>
<pre class="doctools_example">    option {-font font Font} {Courier 12}
</pre>
<p>The option name must begin with a hyphen, and must not contain any
upper case letters. The resource name and class name are optional; if
not specified, the resource name defaults to the option name, minus
the hyphen, and the class name defaults to the resource name with the
first letter capitalized.  Thus, the following statement is equivalent
to the previous example:</p>
<pre class="doctools_example">    option -font {Courier 12}
</pre>
<p>See <span class="sectref"><a href="#subsection9">The Tk Option Database</a></span> for more information about
resource and class names.</p>
<p>Options are normally set and retrieved using the standard
instance methods <b class="method">configure</b> and <b class="method">cget</b>; within instance code
(method bodies, etc.), option values are available through the
<b class="variable">options</b> array:</p>
<pre class="doctools_example">    set myfont $options(-font)
</pre>
<p>If the type defines any option handlers (e.g., <b class="const">-configuremethod</b>),
then it should probably use <b class="method">configure</b> and <b class="method">cget</b> to
access its options to avoid subtle errors.</p>
<p>The <b class="cmd">option</b> statement may include the following options:</p>
<dl class="doctools_definitions">
<dt><b class="const">-default</b> <i class="arg">defvalue</i></dt>
<dd><p>Defines the option's default value; the option's default value
will be &quot;&quot; otherwise.</p></dd>
<dt><b class="const">-readonly</b> <i class="arg">flag</i></dt>
<dd><p>The <i class="arg">flag</i> can be any Boolean value recognized by Tcl.
If <i class="arg">flag</i> is true, then the option is read-only--it can only
be set using <b class="method">configure</b> or <b class="method">configurelist</b>
at creation time, i.e., in the type's constructor.</p></dd>
<dt><b class="const">-type</b> <i class="arg">type</i></dt>
<dd><p>Every locally-defined option may define its validation type, which may
be either the name of a validation type or a specification for a
validation subtype</p>
<p>For example, an option may declare that its value must be an integer
by specifying <b class="cmd">snit::integer</b> as its validation type:</p>
<pre class="doctools_example">    option -number -type snit::integer
</pre>
<p>It may also declare that its value is an integer between 1 and 10
by specifying a validation subtype:</p>
<pre class="doctools_example">    option -number -type {snit::integer -min 1 -max 10}
</pre>
<p>If a validation type or subtype is defined for an option, then
it will be used to validate the option's value whenever it is
changed by the object's <b class="method">configure</b> or
<b class="method">configurelist</b> methods.  In addition, all such options
will have their values validated automatically immediately
after the constructor executes.</p>
<p>Snit defines a family of validation types and subtypes, and it's
quite simple to define new ones.  See
<span class="sectref"><a href="#subsection11">Validation Types</a></span> for the complete list, and
<span class="sectref"><a href="#subsection12">Defining Validation Types</a></span> for an explanation of how
to define your own.</p></dd>
<dt><b class="const">-cgetmethod</b> <i class="arg">methodName</i></dt>
<dd><p>Every locally-defined option may define a <b class="const">-cgetmethod</b>;
it is called when the option's value is retrieved using the
<b class="method">cget</b> method.  Whatever the method's <i class="arg">body</i> returns will
be the return value of the call to <b class="method">cget</b>.</p>
<p>The named method must take one argument, the option name.
For example, this code is equivalent to (though slower than)
Snit's default handling of <b class="cmd">cget</b>:</p>
<pre class="doctools_example">    option -font -cgetmethod GetOption
    method GetOption {option} {
        return $options($option)
    }
</pre>
<p>Note that it's possible for any number of options to share a
<b class="const">-cgetmethod</b>.</p></dd>
<dt><b class="const">-configuremethod</b> <i class="arg">methodName</i></dt>
<dd><p>Every locally-defined option may define a <b class="const">-configuremethod</b>;
it is called when the option's value is set using the
<b class="method">configure</b> or <b class="method">configurelist</b> methods.  It is the
named method's responsibility to save the option's value; in other
words, the value will not be saved to the <b class="variable">options()</b> array unless
the method saves it there.</p>
<p>The named method must take two arguments, the option name and
its new value.  For example, this code is equivalent to
(though slower than) Snit's default handling of <b class="cmd">configure</b>:</p>
<pre class="doctools_example">    option -font -configuremethod SetOption
    method SetOption {option value} {
        set options($option) $value
    }
</pre>
<p>Note that it's possible for any number of options to share a
single <b class="const">-configuremethod</b>.</p></dd>
<dt><b class="const">-validatemethod</b> <i class="arg">methodName</i></dt>
<dd><p>Every locally-defined option may define a <b class="const">-validatemethod</b>;
it is called when the option's value is set using the
<b class="method">configure</b> or <b class="method">configurelist</b> methods, just before
the <b class="const">-configuremethod</b> (if any).  It is the
named method's responsibility to validate the option's new value,
and to throw an error if the value is invalid.</p>
<p>The named method must take two arguments, the option name and
its new value.  For example, this code verifies that
<b class="const">-flag</b>'s value is a valid Boolean value:</p>
<pre class="doctools_example">    option -font -validatemethod CheckBoolean
    method CheckBoolean {option value} {
        if {![string is boolean -strict $value]} {
            error &quot;option $option must have a boolean value.&quot;
        }
    }
</pre>
<p>Note that it's possible for any number of options to share a
single <b class="const">-validatemethod</b>.</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">constructor</b> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>The constructor definition specifies a <i class="arg">body</i> of code to be
executed when a new instance is created.  The <i class="arg">arglist</i> is a
normal Tcl argument list and may contain default arguments and
the <b class="variable">args</b> argument.</p>
<p>As with methods, the arguments <b class="variable">type</b>, <b class="variable">self</b>, <b class="variable">selfns</b>,
and <b class="variable">win</b> are defined implicitly, and all type and instance
variables are automatically visible in its <i class="arg">body</i>.</p>
<p>If the <i class="arg">definition</i> doesn't explicitly define the constructor,
Snit defines one implicitly.  If the type declares at least one option
(whether locally or by delegation), the default constructor will
be defined as follows:</p>
<pre class="doctools_example">    constructor {args} {
        $self configurelist $args
    }
</pre>
<p>For standard Tk widget behavior, the argument list should be
the single name <b class="const">args</b>, as shown.</p>
<p>If the <i class="arg">definition</i> defines neither a constructor nor
any options, the default constructor is defined as follows:</p>
<pre class="doctools_example">    constructor {} {}
</pre>
<p>As with methods, the constructor can call commands from the namespace
in which the type is
defined without importing them, e.g., if the type name is
<b class="cmd">::parentns::typename</b>, then the constructor can call
<b class="cmd">::parentns::someproc</b> just as <b class="cmd">someproc</b>.
<em>Snit 1.x Incompatibility:</em> This does not work in Snit 1.x, as
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p></dd>
<dt><a name="10"><b class="cmd">destructor</b> <i class="arg">body</i></a></dt>
<dd><p>The destructor is used to code any actions that must take place when
an instance of the type is destroyed: typically, the destruction of
anything created in the constructor.</p>
<p>The destructor takes no explicit arguments; as with methods, the
arguments <b class="variable">type</b>, <b class="variable">self</b>, <b class="variable">selfns</b>, and <b class="variable">win</b>, are
defined implicitly, and all type and instance
variables are automatically visible in its <i class="arg">body</i>.
As with methods, the destructor can call commands from the namespace
in which the type is
defined without importing them, e.g., if the type name is
<b class="cmd">::parentns::typename</b>, then the destructor can call
<b class="cmd">::parentns::someproc</b> just as <b class="cmd">someproc</b>.
<em>Snit 1.x Incompatibility:</em> This does not work in Snit 1.x, as
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p></dd>
<dt><a name="11"><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">name</i> <i class="arg">args</i> <i class="arg">body</i></a></dt>
<dd><p>Defines a new Tcl procedure in the type's namespace.</p>
<p>The defined proc differs from a normal Tcl proc in that all type
variables are automatically visible.  The proc can access
instance variables as well, provided that it is passed
<b class="variable">selfns</b> (with precisely that name) as one of its arguments.</p>
<p>Although they are not implicitly defined for procs, the argument names
<b class="const">type</b>, <b class="const">self</b>, and <b class="const">win</b> should be avoided.</p>
<p>As with methods and typemethods, procs can call commands from the namespace
in which the type is
defined without importing them, e.g., if the type name is
<b class="cmd">::parentns::typename</b>, then the proc can call
<b class="cmd">::parentns::someproc</b> just as <b class="cmd">someproc</b>.
<em>Snit 1.x Incompatibility:</em> This does not work in Snit 1.x, as
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p></dd>
<dt><a name="12"><b class="cmd">delegate</b> <b class="const">method</b> <i class="arg">name</i> <b class="const">to</b> <i class="arg">comp</i> <span class="opt">?<b class="const">as</b> <i class="arg">target</i>?</span></a></dt>
<dd><p>Delegates method <i class="arg">name</i> to component <i class="arg">comp</i>.  That is, when
method <i class="arg">name</i> is called on an instance of this type, the method
and its arguments will be passed to the named component's command
instead.  That is, the following statement</p>
<pre class="doctools_example">    delegate method wag to tail
</pre>
<p>is roughly equivalent to this explicitly defined method:</p>
<pre class="doctools_example">    method wag {args} {
        uplevel $tail wag $args
    }
</pre>
<p>As with methods, the <i class="arg">name</i> may have multiple tokens; in this
case, the last token of the name is assumed to be the name of the
component's method.</p>
<p>The optional <b class="const">as</b> clause allows you to specify the delegated
method name and possibly add some arguments:</p>
<pre class="doctools_example">    delegate method wagtail to tail as &quot;wag briskly&quot;
</pre>
<p>A method cannot be both locally defined and delegated.</p>
<p><b class="const">Note:</b> All forms of <b class="cmd">delegate method</b> can delegate to
both instance components and type components.</p></dd>
<dt><a name="13"><b class="cmd">delegate</b> <b class="const">method</b> <i class="arg">name</i> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <b class="const">using</b> <i class="arg">pattern</i></a></dt>
<dd><p>In this form of the <b class="cmd">delegate</b> statement, the <b class="const">using</b> clause
is used to specify the precise form of the command to which method
<i class="arg">name</i> name is delegated.  In this form, the <b class="const">to</b> clause is
optional, since the chosen command might not involve any particular
component.</p>
<p>The value of the <b class="const">using</b> clause is a list that may contain
any or all of the following substitution codes; these codes are
substituted with the described value to build the delegated command
prefix.  Note that the following two statements are equivalent:</p>
<pre class="doctools_example">    delegate method wag to tail
    delegate method wag to tail using &quot;%c %m&quot;
</pre>
<p>Each element of the list becomes a single element of the delegated
command--it is never reparsed as a string.</p>
<p>Substitutions:</p>
<dl class="doctools_definitions">
<dt><b class="const">%%</b></dt>
<dd><p>This is replaced with a single &quot;%&quot;.  Thus, to pass the string &quot;%c&quot;
to the command as an argument, you'd write &quot;%%c&quot;.</p></dd>
<dt><b class="const">%c</b></dt>
<dd><p>This is replaced with the named component's command.</p></dd>
<dt><b class="const">%m</b></dt>
<dd><p>This is replaced with the final token of the method <i class="arg">name</i>; if
the method <i class="arg">name</i> has one token, this is identical to <b class="const">%M</b>.</p></dd>
<dt><b class="const">%M</b></dt>
<dd><p>This is replaced by the method <i class="arg">name</i>; if the <i class="arg">name</i> consists
of multiple tokens, they are joined by space characters.</p></dd>
<dt><b class="const">%j</b></dt>
<dd><p>This is replaced by the method <i class="arg">name</i>; if the <i class="arg">name</i> consists
of multiple tokens, they are joined by underscores (&quot;_&quot;).</p></dd>
<dt><b class="const">%t</b></dt>
<dd><p>This is replaced with the fully qualified type name.</p></dd>
<dt><b class="const">%n</b></dt>
<dd><p>This is replaced with the name of the instance's private namespace.</p></dd>
<dt><b class="const">%s</b></dt>
<dd><p>This is replaced with the name of the instance command.</p></dd>
<dt><b class="const">%w</b></dt>
<dd><p>This is replaced with the original name of the instance command; for
Snit widgets and widget adaptors, it will be the Tk window name.
It remains constant, even if the instance command is renamed.</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">delegate</b> <b class="const">method</b> <b class="const">*</b> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <span class="opt">?<b class="const">using</b> <i class="arg">pattern</i>?</span> <span class="opt">?<b class="const">except</b> <i class="arg">exceptions</i>?</span></a></dt>
<dd><p>The form <b class="cmd">delegate method *</b> delegates all unknown method names to the
specified <i class="arg">comp</i>onent.  The <b class="const">except</b> clause can be used to
specify a list of <i class="arg">exceptions</i>, i.e., method names that will not
be so delegated. The <b class="const">using</b> clause is defined as given above.
In this form, the statement must contain the <b class="const">to</b> clause, the
<b class="const">using</b> clause, or both.</p>
<p>In fact, the &quot;*&quot; can be a list of two or more tokens whose last
element is &quot;*&quot;, as in the following example:</p>
<pre class="doctools_example">    delegate method {tail *} to tail
</pre>
<p>This implicitly defines the method <b class="cmd">tail</b> whose subcommands will
be delegated to the <b class="variable">tail</b> component.</p></dd>
<dt><a name="15"><b class="cmd">delegate</b> <b class="const">option</b> <i class="arg">namespec</i> <b class="const">to</b> <i class="arg">comp</i></a></dt>
<dd></dd>
<dt><a name="16"><b class="cmd">delegate</b> <b class="const">option</b> <i class="arg">namespec</i> <b class="const">to</b> <i class="arg">comp</i> <b class="const">as</b> <i class="arg">target</i></a></dt>
<dd></dd>
<dt><a name="17"><b class="cmd">delegate</b> <b class="const">option</b> <b class="const">*</b> <b class="const">to</b> <i class="arg">comp</i></a></dt>
<dd></dd>
<dt><a name="18"><b class="cmd">delegate</b> <b class="const">option</b> <b class="const">*</b> <b class="const">to</b> <i class="arg">comp</i> <b class="const">except</b> <i class="arg">exceptions</i></a></dt>
<dd><p>Defines a delegated option; the <i class="arg">namespec</i> is defined as for the
<b class="cmd">option</b> statement.
When the <b class="method">configure</b>, <b class="method">configurelist</b>, or <b class="method">cget</b>
instance method is used to set or retrieve the option's value, the
equivalent <b class="method">configure</b> or <b class="method">cget</b> command will be applied
to the component as though the option was defined with the following
<b class="const">-configuremethod</b> and <b class="const">-cgetmethod</b>:</p>
<pre class="doctools_example">    method ConfigureMethod {option value} {
        $comp configure $option $value
    }
    method CgetMethod {option} {
        return [$comp cget $option]
    }
</pre>
<p>Note that delegated options never appear in the <b class="variable">options</b> array.</p>
<p>If the <b class="const">as</b> clause is specified, then the <i class="arg">target</i> option
name is used in place of <i class="arg">name</i>.</p>
<p>The form <b class="cmd">delegate option *</b> delegates all unknown options to the
specified <i class="arg">comp</i>onent.  The <b class="const">except</b> clause can be used to
specify a list of <i class="arg">exceptions</i>, i.e., option names that will not
be so delegated.</p>
<p>Warning: options can only be delegated to a component if it supports
the <b class="method">configure</b> and <b class="method">cget</b> instance methods.</p>
<p>An option cannot be both locally defined and delegated.
TBD: Continue from here.</p></dd>
<dt><a name="19"><b class="cmd">component</b> <i class="arg">comp</i> <span class="opt">?<b class="const">-public</b> <i class="arg">method</i>?</span> <span class="opt">?<b class="const">-inherit</b> <i class="arg">flag</i>?</span></a></dt>
<dd><p>Explicitly declares a component called <i class="arg">comp</i>, and automatically
defines the component's instance variable.</p>
<p>If the <b class="const">-public</b> option is specified, then the option is made
public by defining a <i class="arg">method</i> whose subcommands are delegated
to the component e.g., specifying <b class="const">-public mycomp</b> is
equivalent to the following:</p>
<pre class="doctools_example">    component mycomp
    delegate method {mymethod *} to mycomp
</pre>
<p>If the <b class="const">-inherit</b> option is specified, then <i class="arg">flag</i> must be a
Boolean value; if <i class="arg">flag</i> is true then all unknown methods and
options will be delegated to this component.  The name <b class="const">-inherit</b>
implies that instances of this new type inherit, in a sense, the
methods and options of the component. That is, <b class="const">-inherit yes</b> is
equivalent to:</p>
<pre class="doctools_example">    component mycomp
    delegate option * to mycomp
    delegate method * to mycomp
</pre>
</dd>
<dt><a name="20"><b class="cmd">delegate</b> <b class="const">typemethod</b> <i class="arg">name</i> <b class="const">to</b> <i class="arg">comp</i> <span class="opt">?<b class="const">as</b> <i class="arg">target</i>?</span></a></dt>
<dd><p>Delegates type method <i class="arg">name</i> to type component <i class="arg">comp</i>.  That is, when
type method <i class="arg">name</i> is called on this type, the type method
and its arguments will be passed to the named type component's command
instead.  That is, the following statement</p>
<pre class="doctools_example">    delegate typemethod lostdogs to pound
</pre>
<p>is roughly equivalent to this explicitly defined method:</p>
<pre class="doctools_example">    typemethod lostdogs {args} {
        uplevel $pound lostdogs $args
    }
</pre>
<p>As with type methods, the <i class="arg">name</i> may have multiple tokens; in this
case, the last token of the name is assumed to be the name of the
component's method.</p>
<p>The optional <b class="const">as</b> clause allows you to specify the delegated
method name and possibly add some arguments:</p>
<pre class="doctools_example">    delegate typemethod lostdogs to pound as &quot;get lostdogs&quot;
</pre>
<p>A type method cannot be both locally defined and delegated.</p></dd>
<dt><a name="21"><b class="cmd">delegate</b> <b class="const">typemethod</b> <i class="arg">name</i> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <b class="const">using</b> <i class="arg">pattern</i></a></dt>
<dd><p>In this form of the <b class="cmd">delegate</b> statement, the <b class="const">using</b> clause
is used to specify the precise form of the command to which type method
<i class="arg">name</i> name is delegated.  In this form, the <b class="const">to</b> clause is
optional, since the chosen command might not involve any particular
type component.</p>
<p>The value of the <b class="const">using</b> clause is a list that may contain
any or all of the following substitution codes; these codes are
substituted with the described value to build the delegated command
prefix.  Note that the following two statements are equivalent:</p>
<pre class="doctools_example">    delegate typemethod lostdogs to pound
    delegate typemethod lostdogs to pound using &quot;%c %m&quot;
</pre>
<p>Each element of the list becomes a single element of the delegated
command--it is never reparsed as a string.</p>
<p>Substitutions:</p>
<dl class="doctools_definitions">
<dt><b class="const">%%</b></dt>
<dd><p>This is replaced with a single &quot;%&quot;.  Thus, to pass the string &quot;%c&quot;
to the command as an argument, you'd write &quot;%%c&quot;.</p></dd>
<dt><b class="const">%c</b></dt>
<dd><p>This is replaced with the named type component's command.</p></dd>
<dt><b class="const">%m</b></dt>
<dd><p>This is replaced with the final token of the type method <i class="arg">name</i>; if
the type method <i class="arg">name</i> has one token, this is identical to <b class="const">%M</b>.</p></dd>
<dt><b class="const">%M</b></dt>
<dd><p>This is replaced by the type method <i class="arg">name</i>; if the <i class="arg">name</i> consists
of multiple tokens, they are joined by space characters.</p></dd>
<dt><b class="const">%j</b></dt>
<dd><p>This is replaced by the type method <i class="arg">name</i>; if the <i class="arg">name</i> consists
of multiple tokens, they are joined by underscores (&quot;_&quot;).</p></dd>
<dt><b class="const">%t</b></dt>
<dd><p>This is replaced with the fully qualified type name.</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">delegate</b> <b class="const">typemethod</b> <b class="const">*</b> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <span class="opt">?<b class="const">using</b> <i class="arg">pattern</i>?</span> <span class="opt">?<b class="const">except</b> <i class="arg">exceptions</i>?</span></a></dt>
<dd><p>The form <b class="cmd">delegate typemethod *</b> delegates all unknown type
method names to the
specified type component.  The <b class="const">except</b> clause can be used to
specify a list of <i class="arg">exceptions</i>, i.e., type method names that will not
be so delegated. The <b class="const">using</b> clause is defined as given above.
In this form, the statement must contain the <b class="const">to</b> clause, the
<b class="const">using</b> clause, or both.</p>
<p><b class="const">Note:</b> By default, Snit interprets <b class="cmd">$type foo</b>, where
<b class="const">foo</b> is
not a defined type method, as equivalent to <b class="cmd">$type create foo</b>, where
<b class="const">foo</b> is the name of a new instance of the type.  If you
use <b class="const">delegate typemethod *</b>, then the <b class="method">create</b> type
method must always be used explicitly.</p>
<p>The &quot;*&quot; can be a list of two or more tokens whose last
element is &quot;*&quot;, as in the following example:</p>
<pre class="doctools_example">    delegate typemethod {tail *} to tail
</pre>
<p>This implicitly defines the type method <b class="cmd">tail</b> whose subcommands will
be delegated to the <b class="variable">tail</b> type component.</p></dd>
<dt><a name="23"><b class="cmd">typecomponent</b> <i class="arg">comp</i> <span class="opt">?<b class="const">-public</b> <i class="arg">typemethod</i>?</span> <span class="opt">?<b class="const">-inherit</b> <i class="arg">flag</i>?</span></a></dt>
<dd><p>Explicitly declares a type component called <i class="arg">comp</i>, and automatically
defines the component's type variable.  A type component is an arbitrary
command to which type methods and instance methods can be delegated;
the command's name is stored in a type variable.</p>
<p>If the <b class="const">-public</b> option is specified, then the type component is made
public by defining a <i class="arg">typemethod</i> whose subcommands are delegated to
the type component, e.g., specifying <b class="const">-public mytypemethod</b>
is equivalent to the following:</p>
<pre class="doctools_example">    typecomponent mycomp
    delegate typemethod {mytypemethod *} to mycomp
</pre>
<p>If the <b class="const">-inherit</b> option is specified, then <i class="arg">flag</i> must be a
Boolean value; if <i class="arg">flag</i> is true then all unknown type methods
will be delegated to this type component. (See the note on &quot;delegate
typemethod *&quot;, above.) The name <b class="const">-inherit</b>
implies that this type inherits, in a sense, the behavior of
the type component. That is, <b class="const">-inherit yes</b> is equivalent to:</p>
<pre class="doctools_example">    typecomponent mycomp
    delegate typemethod * to mycomp
</pre>
</dd>
<dt><a name="24"><b class="cmd">pragma</b> <span class="opt">?<i class="arg">options...</i>?</span></a></dt>
<dd><p>The <b class="cmd">pragma</b> statement provides control over how Snit generates a
type.  It takes the following options; in each case, <i class="arg">flag</i> must
be a Boolean value recognized by Tcl, e.g., <b class="const">0</b>, <b class="const">1</b>,
<b class="const">yes</b>, <b class="const">no</b>, and so
on.</p>
<p>By setting the <b class="const">-hastypeinfo</b>, <b class="const">-hastypedestroy</b>, and
<b class="const">-hasinstances</b> pragmas to false and defining appropriate
type methods, you can create an ensemble command without any extraneous
behavior.</p>
<dl class="doctools_definitions">
<dt><b class="const">-canreplace</b> <i class="arg">flag</i></dt>
<dd><p>If false (the default) Snit will not create an instance of a
<b class="cmd">snit::type</b> that has the same name as an existing command; this
prevents subtle errors.  Setting this pragma to true restores the
behavior of Snit V0.93 and earlier versions.</p></dd>
<dt><b class="const">-hastypeinfo</b> <i class="arg">flag</i></dt>
<dd><p>If true (the default), the generated type will have a type method
called <b class="cmd"><a href="../../../../index.html#key83">info</a></b> that is used for type introspection; the <b class="cmd"><a href="../../../../index.html#key83">info</a></b>
type method is documented below.  If false, it will not.</p></dd>
<dt><b class="const">-hastypedestroy</b> <i class="arg">flag</i></dt>
<dd><p>If true (the default), the generated type will have a type method
called <b class="cmd">destroy</b> that is used to destroy the type and all of its
instances.  The <b class="cmd">destroy</b> type method is documented below.  If
false, it will not.</p></dd>
<dt><b class="const">-hastypemethods</b> <i class="arg">flag</i></dt>
<dd><p>If true (the default), the generated type's type command will have
subcommands (type methods) as usual.  If false, the type command
will serve only to create instances of the type; the first argument
is the instance name.</p>
<p>This pragma and <b class="const">-hasinstances</b> cannot both be set false.</p></dd>
<dt><b class="const">-hasinstances</b> <i class="arg">flag</i></dt>
<dd><p>If true (the default), the generated type will have a type method
called <b class="cmd">create</b> that is used to create instances of the type,
along with a variety of instance-related features.  If false, it will
not.</p>
<p>This pragma and <b class="const">-hastypemethods</b> cannot both be set false.</p></dd>
<dt><b class="const">-hasinfo</b> <i class="arg">flag</i></dt>
<dd><p>If true (the default), instances of the generated type will have
an instance method called <b class="method">info</b> that is used for
instance introspection; the <b class="method">info</b>
method is documented below.  If false, it will not.</p></dd>
<dt><b class="const">-simpledispatch</b> <i class="arg">flag</i></dt>
<dd><p>This pragma is intended to make simple, heavily-used abstract
data types (e.g., stacks and queues) more efficient.</p>
<p>If false (the default), instance methods are dispatched normally.  If
true, a faster dispatching scheme is used instead.
The speed comes at a price; with <b class="const">-simpledispatch yes</b> you
get the following limitations:</p>
<ul class="doctools_itemized">
<li><p>Methods cannot be delegated.</p></li>
<li><p><b class="cmd">uplevel</b> and <b class="cmd">upvar</b> do not work as expected: the
caller's scope is two levels up rather than one.</p></li>
<li><p>The option-handling methods
(<b class="cmd">cget</b>, <b class="cmd">configure</b>, and <b class="cmd">configurelist</b>) are very
slightly slower.</p></li>
</ul></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">expose</b> <i class="arg">comp</i></a></dt>
<dd></dd>
<dt><a name="26"><b class="cmd">expose</b> <i class="arg">comp</i> <b class="const">as</b> <i class="arg">method</i></a></dt>
<dd><p><b class="const">Deprecated.</b>  To expose component <i class="arg">comp</i> publicly, use
<b class="cmd">component</b>'s <b class="const">-public</b> option.</p></dd>
<dt><a name="27"><b class="cmd">onconfigure</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p><b class="const">Deprecated.</b>  Define <b class="cmd">option</b>'s <b class="const">-configuremethod</b>
option instead.</p>
<p>As of version 0.95, the following definitions,</p>
<pre class="doctools_example">    option -myoption
    onconfigure -myoption {value} {
        # Code to save the option's value
    }
</pre>
<p>are implemented as follows:</p>
<pre class="doctools_example">    option -myoption -configuremethod _configure-myoption
    method _configure-myoption {_option value} {
        # Code to save the option's value
    }
</pre>
</dd>
<dt><a name="28"><b class="cmd">oncget</b> <i class="arg">name</i> <i class="arg">body</i></a></dt>
<dd><p><b class="const">Deprecated.</b>  Define <b class="cmd">option</b>'s <b class="const">-cgetmethod</b>
option instead.</p>
<p>As of version 0.95, the following definitions,</p>
<pre class="doctools_example">    option -myoption
    oncget -myoption {
        # Code to return the option's value
    }
</pre>
<p>are implemented as follows:</p>
<pre class="doctools_example">    option -myoption -cgetmethod _cget-myoption
    method _cget-myoption {_option} {
        # Code to return the option's value
    }
</pre>
</dd>
</dl></dd>
<dt><a name="29"><b class="cmd">snit::widget</b> <i class="arg">name</i> <i class="arg">definition</i></a></dt>
<dd><p>This command defines a Snit megawidget type with the specified
<i class="arg">name</i>.  The <i class="arg">definition</i> is defined as for <b class="cmd">snit::type</b>.
 A <b class="cmd">snit::widget</b> differs from a <b class="cmd">snit::type</b>
in these ways:</p>
<ul class="doctools_itemized">
<li><p>Every instance of a <b class="cmd">snit::widget</b> has an automatically-created
component called <b class="variable">hull</b>, which is normally a Tk frame widget.
Other widgets created as part of the megawidget will be created within
this widget.</p>
<p>The hull component is initially created with the requested widget
name; then Snit does some magic, renaming the hull component and
installing its own instance command in its place.
The hull component's new name is saved in an instance variable called
<b class="variable">hull</b>.</p></li>
<li><p>The name of an instance must be valid Tk window name, and the parent
window must exist.</p></li>
</ul>
<p>A <b class="cmd">snit::widget</b> definition can include any of statements allowed
in a <b class="cmd">snit::type</b> definition, and may also include the following:</p>
<dl class="doctools_definitions">
<dt><a name="30"><b class="cmd">widgetclass</b> <i class="arg">name</i></a></dt>
<dd><p>Sets the <b class="cmd">snit::widget</b>'s widget class to <i class="arg">name</i>, overriding
the default.  See <span class="sectref"><a href="#subsection9">The Tk Option Database</a></span> for more
information.</p></dd>
<dt><a name="31"><b class="cmd">hulltype</b> <i class="arg">type</i></a></dt>
<dd><p>Determines the kind of widget used as the <b class="cmd">snit::widget</b>'s hull.
The <i class="arg">type</i> may be <b class="const">frame</b> (the default), <b class="const">toplevel</b>,
<b class="const">labelframe</b>; the qualified equivalents of these,
<b class="const">tk::frame</b>, <b class="const">tk::toplevel</b>, and <b class="const">tk::labelframe</b>;
or, if available, the equivalent Tile widgets:
<b class="const">ttk::frame</b>, <b class="const">ttk::toplevel</b>, and
<b class="const">ttk::labelframe</b>.  In practice, any widget that supports the
<b class="const">-class</b> option can be used as a hull widget by
<b class="cmd">lappend</b>'ing its name to the variable <b class="variable">snit::hulltypes</b>.</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">snit::widgetadaptor</b> <i class="arg">name</i> <i class="arg">definition</i></a></dt>
<dd><p>This command defines a Snit megawidget type with the specified name.
It differs from <b class="cmd">snit::widget</b> in that the instance's <b class="variable">hull</b>
component is not created automatically, but is created in the
constructor and installed using the <b class="cmd">installhull</b> command.  Once
the hull is installed, its instance command is renamed and replaced as
with normal <b class="cmd">snit::widget</b>s.  The original command is again
accessible in the instance variable <b class="variable">hull</b>.</p>
<p>Note that in general it is not possible to change the
<em>widget class</em> of a <b class="cmd">snit::widgetadaptor</b>'s hull widget.</p>
<p>See <span class="sectref"><a href="#subsection9">The Tk Option Database</a></span> for information on how
<b class="cmd">snit::widgetadaptor</b>s interact with the option database.</p></dd>
<dt><a name="33"><b class="cmd">snit::typemethod</b> <i class="arg">type</i> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Defines a new type method (or redefines an existing type method)
for a previously existing <i class="arg">type</i>.</p></dd>
<dt><a name="34"><b class="cmd">snit::method</b> <i class="arg">type</i> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Defines a new instance method (or redefines an existing instance
method) for a previously existing <i class="arg">type</i>.  Note that delegated
instance methods can't be redefined.</p></dd>
<dt><a name="35"><b class="cmd">snit::macro</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Defines a Snit macro with the specified <i class="arg">name</i>, <i class="arg">arglist</i>, and
<i class="arg">body</i>.  Macros are used to define new type and widget
definition statements in terms of the statements defined in this man
page.</p>
<p>A macro is simply a Tcl proc that is defined in the slave interpreter
used to compile type and widget definitions.  Thus, macros have
access to all of the type and widget definition statements.  See
<span class="sectref"><a href="#subsection10">Macros and Meta-programming</a></span> for more details.</p>
<p>The macro <i class="arg">name</i> cannot be the same as any standard Tcl command,
or any Snit type or widget definition statement, e.g., you can't
redefine the <b class="cmd"><a href="../../../../index.html#key372">method</a></b> or <b class="cmd">delegate</b> statements, or the
standard <b class="cmd"><a href="../../../../index.html#key301">set</a></b>, <b class="cmd"><a href="../../../../index.html#key302">list</a></b>, or <b class="cmd"><a href="../../../../index.html#key280">string</a></b> commands.</p></dd>
<dt><a name="36"><b class="cmd">snit::compile</b> <i class="arg">which</i> <i class="arg">type</i> <i class="arg">body</i></a></dt>
<dd><p>Snit defines a type, widget, or widgetadaptor by &quot;compiling&quot; the
definition into a Tcl script; this script is then evaluated in the
Tcl interpreter, which actually defines the new type.</p>
<p>This command exposes the &quot;compiler&quot;.  Given a definition <i class="arg">body</i>
for the named <i class="arg">type</i>, where <i class="arg">which</i> is <b class="const">type</b>,
<b class="const">widget</b>, or <b class="const">widgetadaptor</b>, <b class="cmd">snit::compile</b> returns a list
of two elements.  The first element is the fully qualified type name;
the second element is the definition script.</p>
<p><b class="cmd">snit::compile</b> is useful when additional processing
must be done on the Snit-generated code--if it must be instrumented,
for example, or run through the TclDevKit compiler.  In addition, the
returned script could be saved in a &quot;.tcl&quot; file and used to define the
type as part of an application or library, thus saving the compilation
overhead at application start-up.  Note that the
same version of Snit must be used at run-time as at compile-time.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">The Type Command</a></h3>
<p>A type or widget definition creates a type command, which is used to
create instances of the type.  The type command has this form:</p>
<dl class="doctools_definitions">
<dt><a name="37"><b class="cmd">$type</b> <i class="arg">typemethod</i> <i class="arg">args</i>...</a></dt>
<dd><p>The <i class="arg">typemethod</i> can be any of the
<span class="sectref"><a href="#subsection3">Standard Type Methods</a></span> (e.g., <b class="method">create</b>),
or any type method defined in the type
definition.
The subsequent <i class="arg">args</i> depend on the specific <i class="arg">typemethod</i>
chosen.</p>
<p>The type command is most often used to create new instances of the
type; hence, the <b class="method">create</b> method is assumed if the first
argument to the type command doesn't name a valid type method, unless
the type definition includes <b class="cmd">delegate typemethod *</b> or the
<b class="const">-hasinstances</b> pragma is set to false.</p>
<p>Furthermore, if the <b class="const">-hastypemethods</b> pragma is false, then
Snit type commands can be called with no arguments at
all; in this case, the type command creates an instance with an
automatically generated name.  In other words, provided that the
<b class="const">-hastypemethods</b> pragma is false and the type
has instances, the following commands are equivalent:</p>
<pre class="doctools_example">snit::type dog { ... }
set mydog [dog create %AUTO%]
set mydog [dog %AUTO%]
set mydog [dog]
</pre>
<p>This doesn't work for Snit widgets, for obvious reasons.</p>
<p><em>Snit 1.x Incompatibility:</em> In Snit 1.x, the above behavior is
available whether <b class="const">-hastypemethods</b> is true (the default) or false.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Standard Type Methods</a></h3>
<p>In addition to any type methods in the type's definition, all type and
widget commands will usually have at least the following subcommands:</p>
<dl class="doctools_definitions">
<dt><a name="38"><b class="cmd">$type</b> <b class="method">create</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>Creates a new instance of the type, giving it the specified <i class="arg">name</i>
and calling the type's constructor.</p>
<p>For <b class="cmd">snit::type</b>s, if <i class="arg">name</i> is not a fully-qualified command
name, it is assumed to be a name in the namespace in which the call to
<b class="cmd">snit::type</b> appears.  The method returns the fully-qualified
instance name.</p>
<p>For <b class="cmd">snit::widget</b>s and <b class="cmd">snit::widgetadaptor</b>s, <i class="arg">name</i>
must be a valid widget name; the method returns the widget name.</p>
<p>So long as <i class="arg">name</i> does not conflict with any defined type method
name the <b class="method">create</b> keyword may be omitted, unless
the type definition includes <b class="cmd">delegate typemethod *</b> or the
<b class="const">-hasinstances</b> pragma is set to false.</p>
<p>If the <i class="arg">name</i> includes the string <b class="const">%AUTO%</b>, it will be
replaced with the string <b class="const">$type$counter</b> where <b class="const">$type</b> is
the type name and <b class="const">$counter</b> is a counter that increments each
time <b class="const">%AUTO%</b> is used for this type.</p>
<p>By default, any arguments following the <i class="arg">name</i> will be a list of
<i class="arg">option</i> names and their <i class="arg">value</i>s; however, a type's
constructor can specify a different argument list.</p>
<p>As of Snit V0.95, <b class="method">create</b> will throw an error if the <i class="arg">name</i>
is the same as any existing command--note that this was always true
for <b class="cmd">snit::widget</b>s and <b class="cmd">snit::widgetadaptor</b>s.  You can
restore the previous behavior using the <b class="const">-canreplace</b> pragma.</p></dd>
<dt><a name="39"><b class="cmd">$type</b> <b class="method">info typevars</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of the type's type variables (excluding Snit internal
variables); all variable names are fully-qualified.</p>
<p>If <i class="arg">pattern</i> is given, it's used as a <b class="cmd">string match</b>
pattern; only names that match the pattern are returned.</p></dd>
<dt><a name="40"><b class="cmd">$type</b> <b class="method">info typemethods</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of the names of the  type's type methods.
If the type has hierarchical
type methods, whether locally-defined or delegated, only the first
word of each will be included in the list.</p>
<p>If the type
definition includes <b class="cmd">delegate typemethod *</b>, the list will
include only the names of those implicitly delegated type methods
that have been called at least once and are still in the type method cache.</p>
<p>If <i class="arg">pattern</i> is given, it's used as a <b class="cmd">string match</b>
pattern; only names that match the pattern are returned.</p></dd>
<dt><a name="41"><b class="cmd">$type</b> <b class="method">info args</b> <i class="arg">method</i></a></dt>
<dd><p>Returns a list containing the names of the arguments to the type's
<i class="arg">method</i>, in order. This method cannot be applied to delegated
type methods.</p></dd>
<dt><a name="42"><b class="cmd">$type</b> <b class="method">info body</b> <i class="arg">method</i></a></dt>
<dd><p>Returns the body of typemethod <i class="arg">method</i>. This method cannot be
applied to delegated type methods.</p></dd>
<dt><a name="43"><b class="cmd">$type</b> <b class="method">info default</b> <i class="arg">method</i> <i class="arg">aname</i> <i class="arg">varname</i></a></dt>
<dd><p>Returns a boolean value indicating whether the argument <i class="arg">aname</i> of
the type's <i class="arg">method</i> has a default value (<b class="const">true</b>) or not
(<b class="const">false</b>). If the argument has a default its value is placed into
the variable <i class="arg">varname</i>.</p></dd>
<dt><a name="44"><b class="cmd">$type</b> <b class="method">info instances</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of the type's instances.  For <b class="cmd">snit::type</b>s, it
will be a list of fully-qualified instance names;
for <b class="cmd">snit::widget</b>s, it will be a list of Tk widget names.</p>
<p>If <i class="arg">pattern</i> is given, it's used as a <b class="cmd">string match</b>
pattern; only names that match the pattern are returned.</p>
<p><em>Snit 1.x Incompatibility:</em>  In Snit 1.x, the full multi-word
names of hierarchical type methods are included in the return value.</p></dd>
<dt><a name="45"><b class="cmd">$type</b> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the type's instances, the type's namespace, and the type
command itself.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">The Instance Command</a></h3>
<p>A Snit type or widget's <b class="method">create</b> type method creates objects of
the type; each object has a unique name that is also a Tcl command.
This command is used to access the object's methods and data, and has
this form:</p>
<dl class="doctools_definitions">
<dt><a name="46"><b class="cmd">$object</b> <i class="arg">method</i> <i class="arg">args...</i></a></dt>
<dd><p>The <i class="arg">method</i> can be any of the
<span class="sectref"><a href="#subsection5">Standard Instance Methods</a></span>, or any instance method
defined in the type definition.
The subsequent <i class="arg">args</i> depend on the specific <i class="arg">method</i> chosen.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Standard Instance Methods</a></h3>
<p>In addition to any delegated or locally-defined instance methods in
the type's definition, all Snit objects will have at least the
following subcommands:</p>
<dl class="doctools_definitions">
<dt><a name="47"><b class="cmd">$object</b> <b class="method">configure</b> <span class="opt">?<i class="arg">option</i>?</span> <span class="opt">?<i class="arg">value</i>?</span> ...</a></dt>
<dd><p>Assigns new values to one or more options.  If called with one
argument, an <i class="arg">option</i> name, returns a list describing the option,
as Tk widgets do; if called with no arguments, returns a list of lists
describing all options, as Tk widgets do.</p>
<p>Warning: This information will be available for delegated options only
if the component to which they are delegated has a <b class="method">configure</b>
method that returns this same kind of information.</p>
<p>Note: Snit defines this method only if the type has at least one
option.</p></dd>
<dt><a name="48"><b class="cmd">$object</b> <b class="method">configurelist</b> <i class="arg">optionlist</i></a></dt>
<dd><p>Like <b class="method">configure</b>, but takes one argument, a list of options and
their values.  It's mostly useful in the type constructor, but can be
used anywhere.</p>
<p>Note: Snit defines this method only if the type has at least one
option.</p></dd>
<dt><a name="49"><b class="cmd">$object</b> <b class="method">cget</b> <i class="arg">option</i></a></dt>
<dd><p>Returns the option's value.</p>
<p>Note: Snit defines this method only if the type has at least one
option.</p></dd>
<dt><a name="50"><b class="cmd">$object</b> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the object, calling the <b class="cmd">destructor</b> and freeing all
related memory.</p>
<p><em>Note:</em>
The <b class="method">destroy</b> method isn't defined for <b class="cmd">snit::widget</b> or
<b class="cmd">snit::widgetadaptor</b> objects; instances of these are destroyed by
calling <b class="package"><a href="../../../../index.html#key209">Tk</a></b>'s <b class="cmd">destroy</b> command, just as normal
widgets are.</p></dd>
<dt><a name="51"><b class="cmd">$object</b> <b class="method">info type</b></a></dt>
<dd><p>Returns the instance's type.</p></dd>
<dt><a name="52"><b class="cmd">$object</b> <b class="method">info vars</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of the object's instance variables (excluding Snit
internal variables).  The names are fully qualified.</p>
<p>If <i class="arg">pattern</i> is given, it's used as a <b class="cmd">string match</b>
pattern; only names that match the pattern are returned.</p></dd>
<dt><a name="53"><b class="cmd">$object</b> <b class="method">info typevars</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of the object's type's type variables (excluding Snit
internal variables).  The names are fully qualified.</p>
<p>If <i class="arg">pattern</i> is given, it's used as a <b class="cmd">string match</b>
pattern; only names that match the pattern are returned.</p></dd>
<dt><a name="54"><b class="cmd">$object</b> <b class="method">info typemethods</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of the names of the  type's type methods.
If the type has hierarchical
type methods, whether locally-defined or delegated, only the first
word of each will be included in the list.</p>
<p>If the type
definition includes <b class="cmd">delegate typemethod *</b>, the list will
include only the names of those implicitly delegated type methods
that have been called at least once and are still in the type method cache.</p>
<p>If <i class="arg">pattern</i> is given, it's used as a <b class="cmd">string match</b>
pattern; only names that match the pattern are returned.</p>
<p><em>Snit 1.x Incompatibility:</em>  In Snit 1.x, the full multi-word
names of hierarchical type methods are included in the return value.</p></dd>
<dt><a name="55"><b class="cmd">$object</b> <b class="method">info options</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of the object's option names.  This always includes
local options and explicitly delegated options.  If unknown options
are delegated as well, and if the component to which they are
delegated responds to <b class="cmd">$object configure</b> like Tk widgets do,
then the result will include all possible unknown options that can
be delegated to the component.</p>
<p>If <i class="arg">pattern</i> is given, it's used as a <b class="cmd">string match</b>
pattern; only names that match the pattern are returned.</p>
<p>Note that the return value might be different for different instances
of the same type, if component object types can vary from one instance
to another.</p></dd>
<dt><a name="56"><b class="cmd">$object</b> <b class="method">info methods</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of the names of the instance's methods.
If the type has hierarchical methods, whether locally-defined or
delegated, only the first word of each will be included in the list.</p>
<p>If the type
definition includes <b class="cmd">delegate method *</b>, the list will
include only the names of those implicitly delegated methods that have
been called at least once and are still in the method cache.</p>
<p>If <i class="arg">pattern</i> is given, it's used as a <b class="cmd">string match</b>
pattern; only names that match the pattern are returned.</p>
<p><em>Snit 1.x Incompatibility:</em>  In Snit 1.x, the full multi-word
names of hierarchical type methods are included in the return value.</p></dd>
<dt><a name="57"><b class="cmd">$object</b> <b class="method">info args</b> <i class="arg">method</i></a></dt>
<dd><p>Returns a list containing the names of the arguments to the instance's
<i class="arg">method</i>, in order. This method cannot be applied to delegated methods.</p></dd>
<dt><a name="58"><b class="cmd">$object</b> <b class="method">info body</b> <i class="arg">method</i></a></dt>
<dd><p>Returns the body of the instance's method <i class="arg">method</i>. This method
cannot be applied to delegated methods.</p></dd>
<dt><a name="59"><b class="cmd">$object</b> <b class="method">info default</b> <i class="arg">method</i> <i class="arg">aname</i> <i class="arg">varname</i></a></dt>
<dd><p>Returns a boolean value indicating whether the argument <i class="arg">aname</i> of
the instance's <i class="arg">method</i> has a default value (<b class="const">true</b>) or not
(<b class="const">false</b>). If the argument has a default its value is placed into
the variable <i class="arg">varname</i>.</p></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Commands for use in Object Code</a></h3>
<p>Snit defines the following commands for use in your object code:
that is, for use in type methods, instance methods, constructors,
destructors, onconfigure handlers, oncget handlers, and procs.
They do not reside in the ::snit:: namespace; instead, they are
created with the type, and can be used without qualification.</p>
<dl class="doctools_definitions">
<dt><a name="60"><b class="cmd">mymethod</b> <i class="arg">name</i> <span class="opt">?<i class="arg">args...</i>?</span></a></dt>
<dd><p>The <b class="cmd">mymethod</b> command is used for formatting callback commands to
be passed to other objects.  It returns a command that when called
will invoke method <i class="arg">name</i> with the specified arguments, plus of
course any arguments added by the caller.  In other words, both of the
following commands will cause the object's
<b class="method">dosomething</b> method to be called when the <b class="cmd">$button</b> is pressed:</p>
<pre class="doctools_example">    $button configure -command [list $self dosomething myargument]
    $button configure -command [mymethod dosomething myargument]
</pre>
<p>The chief distinction between the two is that the latter form will not
break if the object's command is renamed.</p></dd>
<dt><a name="61"><b class="cmd">mytypemethod</b> <i class="arg">name</i> <span class="opt">?<i class="arg">args...</i>?</span></a></dt>
<dd><p>The <b class="cmd">mytypemethod</b> command is used for formatting callback commands to
be passed to other objects.  It returns a command that when called
will invoke type method <i class="arg">name</i> with the specified arguments, plus of
course any arguments added by the caller.  In other words, both of the
following commands will cause the object's <b class="method">dosomething</b> type method
to be called when <b class="cmd">$button</b> is pressed:</p>
<pre class="doctools_example">    $button configure -command [list $type dosomething myargument]
    $button configure -command [mytypemethod dosomething myargument]
</pre>
<p>Type commands cannot be renamed, so in practice there's little
difference between the two forms.  <b class="cmd">mytypemethod</b> is provided for
parallelism with <b class="cmd">mymethod</b>.</p></dd>
<dt><a name="62"><b class="cmd">myproc</b> <i class="arg">name</i> <span class="opt">?<i class="arg">args...</i>?</span></a></dt>
<dd><p>The <b class="cmd">myproc</b> command is used for formatting callback commands to
be passed to other objects.  It returns a command that when called
will invoke the type proc <i class="arg">name</i> with the specified arguments, plus of
course any arguments added by the caller.  In other words, both of the
following commands will cause the object's <b class="method">dosomething</b> proc
to be called when <b class="cmd">$button</b> is pressed:</p>
<pre class="doctools_example">    $button configure -command [list ${type}::dosomething myargument]
    $button configure -command [myproc dosomething myargument]
</pre>
</dd>
<dt><a name="63"><b class="cmd">myvar</b> <i class="arg">name</i></a></dt>
<dd><p>Given an instance variable name, returns the fully qualified name.
Use this if you're passing the variable to some other object, e.g., as
a <b class="option">-textvariable</b> to a Tk label widget.</p></dd>
<dt><a name="64"><b class="cmd">mytypevar</b> <i class="arg">name</i></a></dt>
<dd><p>Given an type variable name, returns the fully qualified name.  Use
this if you're passing the variable to some other object, e.g., as a
<b class="option">-textvariable</b> to a Tk label widget.</p></dd>
<dt><a name="65"><b class="cmd">from</b> <i class="arg">argvName</i> <i class="arg">option</i> <span class="opt">?<i class="arg">defvalue</i>?</span></a></dt>
<dd><p>The <b class="cmd">from</b> command plucks an option value from a list of options
and their values, such as is passed into a type's <b class="cmd">constructor</b>.
<i class="arg">argvName</i> must be the name of a variable containing such a list;
<i class="arg">option</i> is the name of the specific option.</p>
<p><b class="cmd">from</b> looks for <i class="arg">option</i> in the option list.  If it is found,
it and its value are removed from the list, and the value is returned.
If <i class="arg">option</i> doesn't appear in the list, then the <i class="arg">defvalue</i> is
returned.
If the option is locally-defined option, and <i class="arg">defvalue</i> is
not specified, then the option's default value as specified in the
type definition will be returned instead.</p></dd>
<dt><a name="66"><b class="cmd">install</b> <i class="arg">compName</i> <b class="const">using</b> <i class="arg">objType</i> <i class="arg">objName</i> <i class="arg">args...</i></a></dt>
<dd><p>Creates a new object of type <i class="arg">objType</i> called <i class="arg">objName</i>
and installs it as component <i class="arg">compName</i>,
as described in <span class="sectref"><a href="#subsection7">Components and Delegation</a></span>.  Any additional
<i class="arg">args...</i> are passed along with the name to the <i class="arg">objType</i>
command.
If this is a <b class="cmd">snit::type</b>, then the following two commands are
equivalent:</p>
<pre class="doctools_example">    install myComp using myObjType $self.myComp args...
    set myComp [myObjType $self.myComp args...]
</pre>
<p>Note that whichever method is used, <i class="arg">compName</i> must still be
declared in the type definition using <b class="cmd">component</b>, or must be
referenced in at least one <b class="cmd">delegate</b> statement.</p>
<p>If this is a <b class="cmd">snit::widget</b> or <b class="cmd">snit::widgetadaptor</b>, and if
options have been delegated to component <i class="arg">compName</i>, then those
options will receive default values from the Tk option database.  Note
that it doesn't matter whether the component to be installed is a
widget or not.  See <span class="sectref"><a href="#subsection9">The Tk Option Database</a></span> for more
information.</p>
<p><b class="cmd">install</b> cannot be used to install type components; just assign
the type component's command name to the type component's variable
instead.</p></dd>
<dt><a name="67"><b class="cmd">installhull</b> <b class="const">using</b> <i class="arg">widgetType</i> <i class="arg">args...</i></a></dt>
<dd></dd>
<dt><a name="68"><b class="cmd">installhull</b> <i class="arg">name</i></a></dt>
<dd><p>The constructor of a <b class="cmd">snit::widgetadaptor</b> must create a widget to
be the object's hull component; the widget is installed as the hull
component using this command.  Note that the installed widget's name
must be <b class="const">$win</b>.
This command has two forms.</p>
<p>The first form specifies the <i class="arg">widgetType</i> and the <i class="arg">args...</i>
(that is, the hardcoded option list) to use in creating the hull.
Given this form, <b class="cmd">installhull</b> creates the hull widget, and
initializes any options delegated to the hull from the Tk option
database.</p>
<p>In the second form, the hull widget has already been created; note
that its name must be &quot;$win&quot;.  In this case, the Tk option database is
<em>not</em> queried for any options delegated to the hull.
The longer form is preferred; however, the shorter form allows the
programmer to adapt a widget created elsewhere, which is sometimes
useful.  For example, it can be used to adapt a &quot;page&quot; widget created
by a <b class="package">BWidgets</b> tabbed notebook or pages manager widget.</p>
<p>See <span class="sectref"><a href="#subsection9">The Tk Option Database</a></span> for more information
about <b class="cmd">snit::widgetadaptor</b>s and the option database.</p></dd>
<dt><a name="69"><b class="cmd">variable</b> <i class="arg">name</i></a></dt>
<dd><p>Normally, instance variables are defined in the type definition along
with the options, methods, and so forth; such instance variables are
automatically visible in all instance code (e.g., method bodies).  However,
instance code can use the <b class="cmd">variable</b> command to declare instance variables
that don't appear in the type definition, and also to bring variables
from other namespaces into scope in the usual way.</p>
<p>It's generally clearest to define all instance variables in the type
definition, and omit declaring them in methods and so forth.</p>
<p>Note that this is an instance-specific version of the standard Tcl
<b class="cmd">::variable</b> command.</p></dd>
<dt><a name="70"><b class="cmd">typevariable</b> <i class="arg">name</i></a></dt>
<dd><p>Normally, type variables are defined in the type definition, along
with the instance variables; such type variables are automatically
visible in all of the type's code.  However, type methods, instance
methods and so forth can use <b class="cmd">typevariable</b> to declare type
variables that don't appear in the type definition.</p>
<p>It's generally clearest to declare all type variables in the type
definition, and omit declaring them in methods, type methods, etc.</p></dd>
<dt><a name="71"><b class="cmd">varname</b> <i class="arg">name</i></a></dt>
<dd><p><b class="const">Deprecated.</b>  Use <b class="cmd">myvar</b> instead.</p>
<p>Given an instance variable name, returns the fully qualified name.
Use this if you're passing the variable to some other object, e.g., as
a <b class="option">-textvariable</b> to a Tk label widget.</p></dd>
<dt><a name="72"><b class="cmd">typevarname</b> <i class="arg">name</i></a></dt>
<dd><p><b class="const">Deprecated.</b>  Use <b class="cmd">mytypevar</b> instead.</p>
<p>Given a type variable name, returns the fully qualified name.  Use
this if you're passing the type variable to some other object, e.g., as a
<b class="option">-textvariable</b> to a Tk label widget.</p></dd>
<dt><a name="73"><b class="cmd">codename</b> <i class="arg">name</i></a></dt>
<dd><p><b class="const">Deprecated.</b>  Use <b class="cmd">myproc</b> instead.
Given the name of a proc (but not a type or instance method), returns
the fully-qualified command name, suitable for passing as a callback.</p></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Components and Delegation</a></h3>
<p>When an object includes other objects, as when a toolbar contains
buttons or a GUI object contains an object that references a database,
the included object is called a component.  The standard way to handle
component objects owned by a Snit object is to declare them using
<b class="cmd">component</b>, which creates a component instance variable.
In the following example, a <b class="cmd">dog</b> object has a
<b class="cmd">tail</b> object:</p>
<pre class="doctools_example">    snit::type dog {
        component mytail
        constructor {args} {
            set mytail [tail %AUTO% -partof $self]
            $self configurelist $args
        }
        method wag {} {
            $mytail wag
        }
    }
    snit::type tail {
        option -length 5
        option -partof
        method wag {} { return &quot;Wag, wag, wag.&quot;}
    }
</pre>
<p>Because the <b class="cmd">tail</b> object's name is stored in an instance
variable, it's easily accessible in any method.</p>
<p>The <b class="cmd">install</b> command provides an alternate way
to create and install the component:</p>
<pre class="doctools_example">    snit::type dog {
        component mytail
        constructor {args} {
            install mytail using tail %AUTO% -partof $self
            $self configurelist $args
        }
        method wag {} {
            $mytail wag
        }
    }
</pre>
<p>For <b class="cmd">snit::type</b>s, the two methods are equivalent; for
<b class="cmd">snit::widget</b>s and <b class="cmd">snit::widgetadaptor</b>s, the <b class="cmd">install</b>
command properly initializes the widget's options by querying
<span class="sectref"><a href="#subsection9">The Tk Option Database</a></span>.</p>
<p>In the above examples, the <b class="cmd">dog</b> object's <b class="method">wag</b> method
simply calls the <b class="cmd">tail</b> component's <b class="method">wag</b> method.  In OO
jargon, this is called delegation.  Snit provides an easier way to do
this:</p>
<pre class="doctools_example">    snit::type dog {
        delegate method wag to mytail
        constructor {args} {
            install mytail using tail %AUTO% -partof $self
            $self configurelist $args
        }
    }
</pre>
<p>The <b class="cmd">delegate</b> statement in the type definition implicitly defines
the instance variable <b class="variable">mytail</b> to hold the component's name
(though it's good form to use <b class="cmd">component</b> to declare it explicitly); it
also defines the <b class="cmd">dog</b> object's <b class="method">wag</b> method, delegating it
to the <b class="variable">mytail</b> component.</p>
<p>If desired, all otherwise unknown methods can be delegated to a
specific component:</p>
<pre class="doctools_example">
    snit::type dog {
	delegate method * to mytail
	constructor {args} {
	    set mytail [tail %AUTO% -partof $self]
	    $self configurelist $args
	}
	method bark { return &quot;Bark, bark, bark!&quot; }
    }
</pre>
<p>In this case, a <b class="cmd">dog</b> object will handle its own <b class="method">bark</b>
method; but <b class="method">wag</b> will be passed along to <b class="cmd">mytail</b>.  Any
other method, being recognized by neither <b class="cmd">dog</b> nor <b class="cmd">tail</b>,
will simply raise an error.</p>
<p>Option delegation is similar to method delegation, except for the
interactions with the Tk option database; this is described in
<span class="sectref"><a href="#subsection9">The Tk Option Database</a></span>.</p>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Type Components and Delegation</a></h3>
<p>The relationship between type components and instance components is
identical to that between type variables and instance variables, and
that between type methods and instance methods.  Just as an instance
component is an instance variable that holds the name of a command, so
a type component is a type variable that holds the name of a command.
In essence, a type component is a component that's shared by every
instance of the type.</p>
<p>Just as <b class="cmd">delegate method</b> can be used to delegate methods to
instance components, as described in
<span class="sectref"><a href="#subsection7">Components and Delegation</a></span>, so <b class="cmd">delegate typemethod</b>
can be used to delegate type methods to type components.</p>
<p>Note also that as of Snit 0.95 <b class="cmd">delegate method</b> can delegate
methods to both instance components and type components.</p>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">The Tk Option Database</a></h3>
<p>This section describes how Snit interacts with the Tk option database,
and assumes the reader has a working knowledge of the option database
and its uses.  The book <em>Practical Programming in Tcl and Tk</em>
by Welch et al has a good introduction to the option database, as does
<em>Effective Tcl/Tk Programming</em>.</p>
<p>Snit is implemented so that most of the time it will simply do the
right thing with respect to the option database, provided that the
widget developer does the right thing by Snit.  The body of this
section goes into great deal about what Snit requires.  The following
is a brief statement of the requirements, for reference.</p>
<ul class="doctools_itemized">
<li><p>If the <b class="cmd">snit::widget</b>'s default widget class is not what is desired, set it
explicitly using <b class="cmd">widgetclass</b> in the widget definition.</p></li>
<li><p>When defining or delegating options, specify the resource and class
names explicitly when if the defaults aren't what you want.</p></li>
<li><p>Use <b class="cmd">installhull using</b> to install the hull for
<b class="cmd">snit::widgetadaptor</b>s.</p></li>
<li><p>Use <b class="cmd">install</b> to install all other components.</p></li>
</ul>
<p>The interaction of Tk widgets with the option database is a complex
thing; the interaction of Snit with the option database is even more
so, and repays attention to detail.</p>
<p><b class="const">Setting the widget class:</b> Every Tk widget has a widget class.
For Tk widgets, the widget class name is the just the widget type name
with an initial capital letter, e.g., the widget class for
<b class="cmd">button</b> widgets is &quot;Button&quot;.</p>
<p>Similarly, the widget class of a <b class="cmd">snit::widget</b> defaults to the
unqualified type name with the first letter capitalized.  For example,
the widget class of</p>
<pre class="doctools_example">    snit::widget ::mylibrary::scrolledText { ... }</pre>
<p>is &quot;ScrolledText&quot;.  The widget class can also be set explicitly using
the <b class="cmd">widgetclass</b> statement within the <b class="cmd">snit::widget</b>
definition.</p>
<p>Any widget can be used as the <b class="cmd">hulltype</b> provided that it supports
the <b class="const">-class</b> option for changing its widget class name.  See
the discussion of the <b class="cmd">hulltype</b> command, above.  The user may pass
<b class="const">-class</b> to the widget at instantion.</p>
<p>The widget class of a <b class="cmd">snit::widgetadaptor</b> is just the widget
class of its hull widget; this cannot be changed unless the hull
widget supports <b class="const">-class</b>, in which case it will
usually make more sense to use <b class="cmd">snit::widget</b> rather than
<b class="cmd">snit::widgetadaptor</b>.</p>
<p><b class="const">Setting option resource names and classes:</b> In Tk, every
option has three names: the option name, the resource name, and the
class name.  The option name begins with a hyphen and is all lowercase;
it's used when creating widgets, and with the <b class="cmd">configure</b> and
<b class="cmd">cget</b> commands.</p>
<p>The resource and class names are used to initialize option default
values by querying the Tk option database.  The resource name is
usually just the option name minus the hyphen, but may contain
uppercase letters at word boundaries; the class name is usually just
the resource name with an initial capital, but not always.  For
example, here are the option, resource, and class names for several
<b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget options:</p>
<pre class="doctools_example">    -background         background         Background
    -borderwidth        borderWidth        BorderWidth
    -insertborderwidth  insertBorderWidth  BorderWidth
    -padx               padX               Pad
</pre>
<p>As is easily seen, sometimes the resource and class names can be
inferred from the option name, but not always.</p>
<p>Snit options also have a resource name and a class name.  By default,
these names follow the rule given above: the resource name is the
option name without the hyphen, and the class name is the resource
name with an initial capital.  This is true for both locally-defined
options and explicitly delegated options:</p>
<pre class="doctools_example">    snit::widget mywidget {
        option -background
        delegate option -borderwidth to hull
        delegate option * to text
	# ...
    }
</pre>
<p>In this case, the widget class name is &quot;Mywidget&quot;.  The widget has the
following options: <b class="option">-background</b>, which is locally defined, and
<b class="option">-borderwidth</b>, which is explicitly delegated; all other widgets are
delegated to a component called &quot;text&quot;, which is probably a Tk
<b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget.  If so, <b class="cmd">mywidget</b> has all the same options as
a <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget.  The option, resource, and class names are as
follows:</p>
<pre class="doctools_example">    -background  background  Background
    -borderwidth borderwidth Borderwidth
    -padx        padX        Pad
</pre>
<p>Note that the locally defined option, <b class="option">-background</b>, happens to have
the same three names as the standard Tk <b class="option">-background</b> option; and
<b class="option">-pad</b>, which is delegated implicitly to the <b class="variable">text</b>
component, has the
same three names for <b class="cmd">mywidget</b> as it does for the <b class="cmd"><a href="../../../../index.html#key248">text</a></b>
widget.  <b class="option">-borderwidth</b>, on the other hand, has different resource and
class names than usual, because the internal word &quot;width&quot; isn't
capitalized.  For consistency, it should be; this is done as follows:</p>
<pre class="doctools_example">    snit::widget mywidget {
	option -background
	delegate option {-borderwidth borderWidth} to hull
	delegate option * to text
	# ...
    }
</pre>
<p>The class name will default to &quot;BorderWidth&quot;, as expected.</p>
<p>Suppose, however, that <b class="cmd">mywidget</b> also delegated
<b class="option">-padx</b> and
<b class="option">-pady</b> to the hull.  In this case, both the resource name and the
class name must be specified explicitly:</p>
<pre class="doctools_example">    snit::widget mywidget {
	option -background
	delegate option {-borderwidth borderWidth} to hull
	delegate option {-padx padX Pad} to hull
	delegate option {-pady padY Pad} to hull
	delegate option * to text
	# ...
    }
</pre>
<p><b class="const">Querying the option database:</b> If you set your widgetclass and
option names as described above, Snit will query the option database
when each instance is created, and will generally do the right thing
when it comes to querying the option database.  The remainder of this
section goes into the gory details.</p>
<p><b class="const">Initializing locally defined options:</b>
When an instance of a snit::widget is created, its locally defined
options are initialized as follows: each option's resource and class
names are used to query the Tk option database.  If the result is
non-empty, it is used as the option's default; otherwise, the default
hardcoded in the type definition is used.  In either case, the default
can be overridden by the caller.  For example,</p>
<pre class="doctools_example">    option add *Mywidget.texture pebbled
    snit::widget mywidget {
	option -texture smooth
	# ...
    }
    mywidget .mywidget -texture greasy
</pre>
<p>Here, <b class="option">-texture</b> would normally default to &quot;smooth&quot;, but because of
the entry added to the option database it defaults to &quot;pebbled&quot;.
However, the caller has explicitly overridden the default, and so the
new widget will be &quot;greasy&quot;.</p>
<p><b class="const">Initializing options delegated to the hull:</b>
A <b class="cmd">snit::widget</b>'s hull is a widget, and given that its class has
been set it is expected to query the option database for itself.  The
only exception concerns options that are delegated to it with a
different name.  Consider the following code:</p>
<pre class="doctools_example">    option add *Mywidget.borderWidth 5
    option add *Mywidget.relief sunken
    option add *Mywidget.hullbackground red
    option add *Mywidget.background green
    snit::widget mywidget {
	delegate option -borderwidth to hull
	delegate option -hullbackground to hull as -background
	delegate option * to hull
	# ...
    }
    mywidget .mywidget
    set A [.mywidget cget -relief]
    set B [.mywidget cget -hullbackground]
    set C [.mywidget cget -background]
    set D [.mywidget cget -borderwidth]
</pre>
<p>The question is, what are the values of variables A, B, C and D?</p>
<p>The value of A is &quot;sunken&quot;.  The hull is a Tk frame that has been
given the widget class &quot;Mywidget&quot;; it will automatically query the
option database and pick up this value.  Since the <b class="option">-relief</b>
option is implicitly delegated to the hull, Snit takes no action.</p>
<p>The value of B is &quot;red&quot;.  The hull will automatically pick up the
value &quot;green&quot; for its <b class="option">-background</b> option, just as it picked up the
<b class="option">-relief</b> value.  However, Snit knows that
<b class="option">-hullbackground</b> is mapped to
the hull's <b class="option">-background</b> option; hence, it queries the option database
for <b class="option">-hullbackground</b> and gets &quot;red&quot; and updates the hull
accordingly.</p>
<p>The value of C is also &quot;red&quot;, because <b class="option">-background</b> is implicitly
delegated to the hull; thus, retrieving it is the same as retrieving
<b class="option">-hullbackground</b>.  Note that this case is unusual; in practice,
<b class="option">-background</b> would probably be explicitly delegated to some other
component.</p>
<p>The value of D is &quot;5&quot;, but not for the reason you think.  Note that as
it is defined above, the resource name for <b class="option">-borderwidth</b>
defaults to &quot;borderwidth&quot;, whereas the option database entry is
&quot;borderWidth&quot;.  As with <b class="option">-relief</b>, the hull picks up its
own <b class="option">-borderwidth</b> option before Snit does anything.  Because the
option is delegated under its own name, Snit assumes that the correct
thing has happened, and doesn't worry about it any further.</p>
<p>For <b class="cmd">snit::widgetadaptor</b>s, the case is somewhat altered.  Widget
adaptors retain the widget class of their hull, and the hull is not
created automatically by Snit.  Instead, the <b class="cmd">snit::widgetadaptor</b>
must call <b class="cmd">installhull</b> in its constructor.  The normal way to do
this is as follows:</p>
<pre class="doctools_example">    snit::widgetadaptor mywidget {
	# ...
	constructor {args} {
	    # ...
	    installhull using text -foreground white
	    #
	}
	#...
    }
</pre>
<p>In this case, the <b class="cmd">installhull</b> command will create the hull using
a command like this:</p>
<pre class="doctools_example">    set hull [text $win -foreground white]
</pre>
<p>The hull is a <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget, so its widget class is &quot;Text&quot;.  Just
as with <b class="cmd">snit::widget</b> hulls, Snit assumes that it will pick up
all of its normal option values automatically; options delegated from
a different name are initialized from the option database in the same
way.</p>
<p><b class="const">Initializing options delegated to other components:</b>
Non-hull components are matched against the option database in two
ways.  First, a component widget remains a widget still, and therefore
is initialized from the option database in the usual way.
Second, the option database is queried for all options delegated to
the component, and the component is initialized accordingly--provided
that the <b class="cmd">install</b> command is used to create it.</p>
<p>Before option database support was added to Snit, the usual way to
create a component was to simply create it in the constructor and
assign its command name to the component variable:</p>
<pre class="doctools_example">    snit::widget mywidget {
	delegate option -background to myComp
	constructor {args} {
	    set myComp [text $win.text -foreground black]
	}
    }
</pre>
<p>The drawback of this method is that Snit has no opportunity to
initialize the component properly.  Hence, the following approach is
now used:</p>
<pre class="doctools_example">    snit::widget mywidget {
	delegate option -background to myComp
	constructor {args} {
	    install myComp using text $win.text -foreground black
	}
    }
</pre>
<p>The <b class="cmd">install</b> command does the following:</p>
<ul class="doctools_itemized">
<li><p>Builds a list of the options explicitly included in the <b class="cmd">install</b>
command -- in this case, <b class="option">-foreground</b>.</p></li>
<li><p>Queries the option database for all options delegated explicitly to
the named component.</p></li>
<li><p>Creates the component using the specified command, after inserting
into it a list of options and values read from the option database.
Thus, the explicitly included options (<b class="option">-foreground</b>) will override
anything read from the option database.</p></li>
<li><p>If the widget definition implicitly delegated options to the component
using <b class="cmd">delegate option *</b>, then Snit calls the newly created
component's <b class="cmd">configure</b> method to receive a list of all of the
component's options.  From this Snit builds a list of options
implicitly delegated to the component that were not explicitly
included in the <b class="cmd">install</b> command.  For all such options, Snit
queries the option database and configures the component accordingly.</p></li>
</ul>
<p><b class="const">Non-widget components:</b> The option database is never queried
for <b class="cmd">snit::type</b>s, since it can only be queried given a Tk widget
name.
However, <b class="cmd">snit::widget</b>s can have non-widget components.  And if
options are delegated to those components, and if the <b class="cmd">install</b>
command is used to install those components, then they will be
initialized from the option database just as widget components are.</p>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">Macros and Meta-programming</a></h3>
<p>The <b class="cmd">snit::macro</b> command enables a certain amount of
meta-programming with Snit classes.  For example, suppose you like to
define properties: instance variables that have set/get methods.  Your
code might look like this:</p>
<pre class="doctools_example">    snit::type dog {
        variable mood happy
        method getmood {} {
            return $mood
        }
        method setmood {newmood} {
            set mood $newmood
        }
    }
</pre>
<p>That's nine lines of text per property.  Or, you could define the
following <b class="cmd">snit::macro</b>:</p>
<pre class="doctools_example">    snit::macro property {name initValue} {
        variable $name $initValue
        method get$name {} &quot;return $name&quot;
        method set$name {value} &quot;set $name \$value&quot;
    }
</pre>
<p>Note that a <b class="cmd">snit::macro</b> is just a normal Tcl proc defined in
the slave interpreter used to compile type and widget definitions; as
a result, it has access to all the commands used to define types and
widgets.</p>
<p>Given this new macro, you can define a property in one line of code:</p>
<pre class="doctools_example">    snit::type dog {
        property mood happy
    }
</pre>
<p>Within a macro, the commands <b class="cmd">variable</b> and <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> refer to
the Snit type-definition commands, not the standard Tcl commands.  To
get the standard Tcl commands, use <b class="cmd">_variable</b> and <b class="cmd">_proc</b>.</p>
<p>Because a single slave interpreter is used for compiling all Snit
types and widgets in the application, there's the possibility of macro
name collisions.  If you're writing a reuseable package using Snit,
and you use some <b class="cmd">snit::macro</b>s, define them in your package
namespace:</p>
<pre class="doctools_example">    snit::macro mypkg::property {name initValue} { ... }
    snit::type dog {
        mypkg::property mood happy
    }
</pre>
<p>This leaves the global namespace open for application authors.</p>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Validation Types</a></h3>
<p>A validation type is an object that can be used to validate
Tcl values of a particular kind.  For example,
<b class="cmd">snit::integer</b> is used to validate that a Tcl value is
an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">    snit::integer validate 5     ;# Does nothing
    snit::integer validate 5.0   ;# Throws an error (not an integer!)
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on success,
and throw the <b class="cmd">-errorcode</b> INVALID on error.</p>
<p>Snit defines a family of validation types, all of which are
implemented as <b class="cmd">snit::type</b>'s.  They can be used as is;
in addition, their instances serve as parameterized
subtypes.  For example, a probability is a number between 0.0 and 1.0
inclusive:</p>
<pre class="doctools_example">    snit::double probability -min 0.0 -max 1.0
</pre>
<p>The example above creates an instance of <b class="cmd">snit::double</b>--a
validation subtype--called
<b class="cmd">probability</b>, which can be used to validate probability values:</p>
<pre class="doctools_example">    probability validate 0.5   ;# Does nothing
    probability validate 7.9   ;# Throws an error
</pre>
<p>Validation subtypes can be defined explicitly, as in the above
example; when a locally-defined option's <b class="const">-type</b> is specified,
they may also be created on the fly:</p>
<pre class="doctools_example">    snit::enum ::dog::breed -values {mutt retriever sheepdog}
    snit::type dog {
        # Define subtypes on the fly...
        option -breed -type {
            snit::enum -values {mutt retriever sheepdog}
        }
        # Or use predefined subtypes...
        option -breed -type ::dog::breed
    }
</pre>
<p>Any object that has a <b class="method">validate</b> method with the semantics
described above can be used as a validation type; see
<span class="sectref"><a href="#subsection12">Defining Validation Types</a></span> for information on how to define
new ones.</p>
<p>Snit defines the following validation types:</p>
<dl class="doctools_definitions">
<dt><a name="74"><b class="cmd">snit::boolean</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd></dd>
<dt><a name="75"><b class="cmd">snit::boolean</b> <i class="arg">name</i></a></dt>
<dd><p>Validates Tcl boolean values: 1, 0, <b class="const">on</b>, <b class="const">off</b>,
<b class="const">yes</b>, <b class="const">no</b>, <b class="const">true</b>, <b class="const">false</b>.
It's possible to define subtypes--that is, instances--of
<b class="cmd">snit::boolean</b>, but as it has no options there's no reason to do
so.</p></dd>
<dt><a name="76"><b class="cmd">snit::double</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd></dd>
<dt><a name="77"><b class="cmd">snit::double</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></dt>
<dd><p>Validates floating-point values.  Subtypes may be created with the
following options:</p>
<dl class="doctools_definitions">
<dt><b class="const">-min</b> <i class="arg">min</i></dt>
<dd><p>Specifies a floating-point minimum bound; a value is invalid if it is strictly
less than <i class="arg">min</i>.</p></dd>
<dt><b class="const">-max</b> <i class="arg">max</i></dt>
<dd><p>Specifies a floating-point maximum bound; a value is invalid if it is strictly
greater than <i class="arg">max</i>.</p></dd>
</dl></dd>
<dt><a name="78"><b class="cmd">snit::enum</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd></dd>
<dt><a name="79"><b class="cmd">snit::enum</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></dt>
<dd><p>Validates that a value comes from an enumerated list.  The base
type is of little use by itself, as only subtypes actually have
an enumerated list to validate against.  Subtypes may be created
with the following options:</p>
<dl class="doctools_definitions">
<dt><b class="const">-values</b> <i class="arg">list</i></dt>
<dd><p>Specifies a list of valid values.  A value is valid if and only if
it's included in the list.</p></dd>
</dl></dd>
<dt><a name="80"><b class="cmd">snit::fpixels</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd></dd>
<dt><a name="81"><b class="cmd">snit::fpixels</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></dt>
<dd><p><em>Tk programs only.</em> Validates screen distances, in any of the
forms accepted by <b class="cmd">winfo fpixels</b>. Subtypes may be created with the
following options:</p>
<dl class="doctools_definitions">
<dt><b class="const">-min</b> <i class="arg">min</i></dt>
<dd><p>Specifies a minimum bound; a value is invalid if it is strictly
less than <i class="arg">min</i>.  The bound may be expressed in any of the
forms accepted by <b class="cmd">winfo fpixels</b>.</p></dd>
<dt><b class="const">-max</b> <i class="arg">max</i></dt>
<dd><p>Specifies a maximum bound; a value is invalid if it is strictly
greater than <i class="arg">max</i>.  The bound may be expressed in any of the
forms accepted by <b class="cmd">winfo fpixels</b>.</p></dd>
</dl></dd>
<dt><a name="82"><b class="cmd">snit::integer</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd></dd>
<dt><a name="83"><b class="cmd">snit::integer</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></dt>
<dd><p>Validates integer values.  Subtypes may be created with the
following options:</p>
<dl class="doctools_definitions">
<dt><b class="const">-min</b> <i class="arg">min</i></dt>
<dd><p>Specifies an integer minimum bound; a value is invalid if it is strictly
less than <i class="arg">min</i>.</p></dd>
<dt><b class="const">-max</b> <i class="arg">max</i></dt>
<dd><p>Specifies an integer maximum bound; a value is invalid if it is strictly
greater than <i class="arg">max</i>.</p></dd>
</dl></dd>
<dt><a name="84"><b class="cmd">snit::listtype</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd></dd>
<dt><a name="85"><b class="cmd">snit::listtype</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></dt>
<dd><p>Validates Tcl lists. Subtypes may be created with the
following options:</p>
<dl class="doctools_definitions">
<dt><b class="const">-minlen</b> <i class="arg">min</i></dt>
<dd><p>Specifies a minimum list length; the value is invalid if it has
fewer than <i class="arg">min</i> elements.  Defaults to 0.</p></dd>
<dt><b class="const">-maxlen</b> <i class="arg">max</i></dt>
<dd><p>Specifies a maximum list length; the value is invalid if it
more than <i class="arg">max</i> elements.</p></dd>
<dt><b class="const">-type</b> <i class="arg">type</i></dt>
<dd><p>Specifies the type of the list elements; <i class="arg">type</i> must be
the name of a validation type or subtype.  In the
following example, the value of <b class="const">-numbers</b> must be a list
of integers.</p>
<pre class="doctools_example">    option -numbers -type {snit::listtype -type snit::integer}
</pre>
<p>Note that this option doesn't support defining new validation subtypes
on the fly; that is, the following code will not work (yet, anyway):</p>
<pre class="doctools_example">    option -numbers -type {
        snit::listtype -type {snit::integer -min 5}
    }
</pre>
<p>Instead, define the subtype explicitly:</p>
<pre class="doctools_example">    snit::integer gt4 -min 5
    snit::type mytype {
        option -numbers -type {snit::listtype -type gt4}
    }
</pre>
</dd>
</dl></dd>
<dt><a name="86"><b class="cmd">snit::pixels</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd></dd>
<dt><a name="87"><b class="cmd">snit::pixels</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></dt>
<dd><p><em>Tk programs only.</em> Validates screen distances, in any of the
forms accepted by <b class="cmd">winfo pixels</b>. Subtypes may be created with the
following options:</p>
<dl class="doctools_definitions">
<dt><b class="const">-min</b> <i class="arg">min</i></dt>
<dd><p>Specifies a minimum bound; a value is invalid if it is strictly
less than <i class="arg">min</i>.  The bound may be expressed in any of the
forms accepted by <b class="cmd">winfo pixels</b>.</p></dd>
<dt><b class="const">-max</b> <i class="arg">max</i></dt>
<dd><p>Specifies a maximum bound; a value is invalid if it is strictly
greater than <i class="arg">max</i>.  The bound may be expressed in any of the
forms accepted by <b class="cmd">winfo pixels</b>.</p></dd>
</dl></dd>
<dt><a name="88"><b class="cmd">snit::stringtype</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd></dd>
<dt><a name="89"><b class="cmd">snit::stringtype</b> <i class="arg">name</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i>...?</span></a></dt>
<dd><p>Validates Tcl strings. The base type is of little use by itself,
since very Tcl value is also a valid string.  Subtypes may be created with the
following options:</p>
<dl class="doctools_definitions">
<dt><b class="const">-minlen</b> <i class="arg">min</i></dt>
<dd><p>Specifies a minimum string length; the value is invalid if it has
fewer than <i class="arg">min</i> characters.  Defaults to 0.</p></dd>
<dt><b class="const">-maxlen</b> <i class="arg">max</i></dt>
<dd><p>Specifies a maximum string length; the value is invalid if it has
more than <i class="arg">max</i> characters.</p></dd>
<dt><b class="const">-glob</b> <i class="arg">pattern</i></dt>
<dd><p>Specifies a <b class="cmd">string match</b> pattern; the value is invalid
if it doesn't match the pattern.</p></dd>
<dt><b class="const">-regexp</b> <i class="arg">regexp</i></dt>
<dd><p>Specifies a regular expression; the value is invalid if it doesn't
match the regular expression.</p></dd>
<dt><b class="const">-nocase</b> <i class="arg">flag</i></dt>
<dd><p>By default, both <b class="const">-glob</b> and <b class="const">-regexp</b> matches are
case-sensitive.  If <b class="const">-nocase</b> is set to true, then both
<b class="const">-glob</b> and <b class="const">-regexp</b> matches are case-insensitive.</p></dd>
</dl></dd>
<dt><a name="90"><b class="cmd">snit::window</b> <b class="const">validate</b> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd></dd>
<dt><a name="91"><b class="cmd">snit::window</b> <i class="arg">name</i></a></dt>
<dd><p><em>Tk programs only.</em>  Validates Tk window names.  The value must
cause <b class="cmd">winfo exists</b> to return true; otherwise, the value is
invalid.  It's possible to define subtypes--that is, instances--of
<b class="cmd">snit::window</b>, but as it has no options at present there's no
reason to do so.</p></dd>
</dl>
</div>
<div id="subsection12" class="doctools_subsection"><h3><a name="subsection12">Defining Validation Types</a></h3>
<p>There are three ways to define a new validation type: as a subtype of
one of Snit's validation types, as a validation type command, and as
a full-fledged validation type similar to those provided by Snit.
Defining subtypes of Snit's validation types is described above,
under <span class="sectref"><a href="#subsection11">Validation Types</a></span>.</p>
<p>The next simplest way to create a new validation type is as a
validation type command.  A validation type is simply an
object that has a <b class="method">validate</b> method; the <b class="method">validate</b>
method must take one argument, a value, return the value if it is
valid, and throw an error with <b class="cmd">-errorcode</b> INVALID if the
value is invalid.  This can be done with a simple <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>.  For
example, the <b class="cmd">snit::boolean</b> validate type could have been
implemented like this:</p>
<pre class="doctools_example">    proc ::snit::boolean {&quot;validate&quot; value} {
        if {![string is boolean -strict $value]} {
            return -code error -errorcode INVALID  &quot;invalid boolean \&quot;$value\&quot;, should be one of: 1, 0, ...&quot;
        }
        return $value
    }
</pre>
<p>A validation type defined in this way cannot be subtyped, of course;
but for many applications this will be sufficient.</p>
<p>Finally, one can define a full-fledged, subtype-able validation type
as a <b class="cmd">snit::type</b>.  Here's a skeleton to get you started:</p>
<pre class="doctools_example">    snit::type myinteger {
        # First, define any options you'd like to use to define
        # subtypes.  Give them defaults such that they won't take
        # effect if they aren't used, and marked them &quot;read-only&quot;.
        # After all, you shouldn't be changing their values after
        # a subtype is defined.
        #
        # For example:
        option -min -default &quot;&quot; -readonly 1
        option -max -default &quot;&quot; -readonly 1
        # Next, define a &quot;validate&quot; type method which should do the
        # validation in the basic case.  This will allow the
        # type command to be used as a validation type.
        typemethod validate {value} {
            if {![string is integer -strict $value]} {
                return -code error -errorcode INVALID  &quot;invalid value \&quot;$value\&quot;, expected integer&quot;
            }
            return $value
        }
        # Next, the constructor should validate the subtype options,
        # if any.  Since they are all readonly, we don't need to worry
        # about validating the options on change.
        constructor {args} {
            # FIRST, get the options
            $self configurelist $args
            # NEXT, validate them.
            # I'll leave this to your imagination.
        }
        # Next, define a &quot;validate&quot; instance method; its job is to
        # validate values for subtypes.
        method validate {value} {
            # First, call the type method to do the basic validation.
            $type validate $value
            # Now we know it's a valid integer.
            if {(&quot;&quot; != $options(-min) &amp;&amp; $value &lt; $options(-min))  ||
                (&quot;&quot; != $options(-max) &amp;&amp; $value &gt; $options(-max))} {
                # It's out of range; format a detailed message about
                # the error, and throw it.
                set msg &quot;....&quot;
                return -code error -errorcode INVALID $msg
            }
            # Otherwise, if it's valid just return it.
            return $valid
        }
    }
</pre>
<p>And now you have a type that can be subtyped.</p>
<p>The file &quot;validate.tcl&quot; in the Snit distribution defines all of Snit's
validation types; you can find the complete implementation for
<b class="cmd">snit::integer</b> and the other types there, to use as examples for
your own types.</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">CAVEATS</a></h2>
<p>If you have problems, find bugs, or new ideas you are hereby cordially
invited to submit a report of your problem, bug, or idea as explained
in the section <span class="sectref"><a href="#section8">Bugs, Ideas, Feedback</a></span> below.</p>
<p>Additionally, you might wish to join the Snit mailing list;
see <a href="http://www.wjduquette.com/snit">http://www.wjduquette.com/snit</a> for details.</p>
<p>One particular area to watch is using <b class="cmd">snit::widgetadaptor</b> to
adapt megawidgets created by other megawidget packages; correct
widget destruction depends on the order of the &lt;Destroy&gt; bindings.
The wisest course is simply not to do this.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">KNOWN BUGS</a></h2>
<ul class="doctools_itemized">
<li><p>Error stack traces returned by Snit 1.x are extremely ugly and typically
contain far too much information about Snit internals.  The error
messages are much improved in Snit 2.2.</p></li>
<li><p>Also see the Project Trackers as explained in the section
<span class="sectref"><a href="#section8">Bugs, Ideas, Feedback</a></span> below.</p></li>
</ul>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">HISTORY</a></h2>
<p>During the course of developing Notebook
(See <a href="http://www.wjduquette.com/notebook">http://www.wjduquette.com/notebook</a>), my Tcl-based personal
notebook application, I found I was writing it as a collection of
objects.  I wasn't using any particular object-oriented framework; I
was just writing objects in pure Tcl following the guidelines in my
Guide to Object Commands
(see <a href="http://www.wjduquette.com/tcl/objects.html">http://www.wjduquette.com/tcl/objects.html</a>), along with a
few other tricks I'd picked up since.  And though it was working well,
it quickly became tiresome because of the amount of boilerplate
code associated with each new object type.</p>
<p>So that was one thing--tedium is a powerful motivator.  But the other
thing I noticed is that I wasn't using inheritance at all, and I
wasn't missing it.  Instead, I was using delegation: objects that
created other objects and delegated methods to them.</p>
<p>And I said to myself, &quot;This is getting tedious...there has got to be a
better way.&quot;  And one afternoon, on a whim, I started working on Snit,
an object system that works the way Tcl works.  Snit doesn't support
inheritance, but it's great at delegation, and it makes creating
megawidgets easy.</p>
<p>If you have any comments or suggestions (or bug reports!) don't
hesitate to send me e-mail at <a href="will@wjduquette.com">will@wjduquette.com</a>.  In addition,
there's a Snit mailing list; you can find out more about it at the
Snit home page (see <a href="http://www.wjduquette.com/snit">http://www.wjduquette.com/snit</a>).</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">CREDITS</a></h2>
<p>Snit has been designed and implemented from the very beginning by
William H. Duquette.  However, much credit belongs to the following
people for using Snit and providing me with valuable feedback: Rolf
Ade, Colin McCormack, Jose Nazario, Jeff Godfrey, Maurice Diamanti,
Egon Pasztor, David S. Cargo, Tom Krehbiel, Michael Cleverly,
Andreas Kupries, Marty Backe, Andy Goth, Jeff Hobbs, Brian
Griffin, Donal Fellows, Miguel Sofer, Kenneth Green,
and Anton Kovalenko.
If I've forgotten anyone, my apologies; let me know and I'll add
your name to the list.</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>snit</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key241">BWidget</a>, <a href="../../../../index.html#key237">C++</a>, <a href="../../../../index.html#key244">Incr Tcl</a>, <a href="../../../../index.html#key798">Snit</a>, <a href="../../../../index.html#key242">adaptors</a>, <a href="../../../../index.html#key240">class</a>, <a href="../../../../index.html#key239">mega widget</a>, <a href="../../../../index.html#key243">object</a>, <a href="../../../../index.html#key236">object oriented</a>, <a href="../../../../index.html#key117">type</a>, <a href="../../../../index.html#key235">widget</a>, <a href="../../../../index.html#key238">widget adaptors</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2009, by William H. Duquette</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/snit/snitfaq.html.





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246

<div class='fossil-doc' data-title='snitfaq - Snit's Not Incr Tcl, OO system'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">snitfaq(n) 2.2 tcllib &quot;Snit's Not Incr Tcl, OO system&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>snitfaq - Snit Frequently Asked Questions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">What is this document?</a></li>
<li class="doctools_subsection"><a href="#subsection2">What is Snit?</a></li>
<li class="doctools_subsection"><a href="#subsection3">What version of Tcl does Snit require?</a></li>
<li class="doctools_subsection"><a href="#subsection4">Where can I download Snit?</a></li>
<li class="doctools_subsection"><a href="#subsection5">What are Snit's goals?</a></li>
<li class="doctools_subsection"><a href="#subsection6">How is Snit different from other OO frameworks?</a></li>
<li class="doctools_subsection"><a href="#subsection7">What can I do with Snit?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">SNIT VERSIONS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection8">Which version of Snit should I use?</a></li>
<li class="doctools_subsection"><a href="#subsection9">How do I select the version of Snit I want to use?</a></li>
<li class="doctools_subsection"><a href="#subsection10">How are Snit 1.3 and Snit 2.2 incompatible?</a></li>
<li class="doctools_subsection"><a href="#subsection11">Are there other differences between Snit 1.x and Snit 2.2?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">OBJECTS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection12">What is an object?</a></li>
<li class="doctools_subsection"><a href="#subsection13">What is an abstract data type?</a></li>
<li class="doctools_subsection"><a href="#subsection14">What kinds of abstract data types does Snit provide?</a></li>
<li class="doctools_subsection"><a href="#subsection15">What is a snit::type?</a></li>
<li class="doctools_subsection"><a href="#subsection16">What is a snit::widget?, the short story</a></li>
<li class="doctools_subsection"><a href="#subsection17">What is a snit::widgetadaptor?, the short story</a></li>
<li class="doctools_subsection"><a href="#subsection18">How do I create an instance of a snit::type?</a></li>
<li class="doctools_subsection"><a href="#subsection19">How do I refer to an object indirectly?</a></li>
<li class="doctools_subsection"><a href="#subsection20">How can I generate the object name automatically?</a></li>
<li class="doctools_subsection"><a href="#subsection21">Can types be renamed?</a></li>
<li class="doctools_subsection"><a href="#subsection22">Can objects be renamed?</a></li>
<li class="doctools_subsection"><a href="#subsection23">How do I destroy a Snit object?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">INSTANCE METHODS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection24">What is an instance method?</a></li>
<li class="doctools_subsection"><a href="#subsection25">How do I define an instance method?</a></li>
<li class="doctools_subsection"><a href="#subsection26">How does a client call an instance method?</a></li>
<li class="doctools_subsection"><a href="#subsection27">How does an instance method call another instance method?</a></li>
<li class="doctools_subsection"><a href="#subsection28">Are there any limitations on instance method names?</a></li>
<li class="doctools_subsection"><a href="#subsection29">What is a hierarchical method?</a></li>
<li class="doctools_subsection"><a href="#subsection30">How do I define a hierarchical method?</a></li>
<li class="doctools_subsection"><a href="#subsection31">How do I call hierarchical methods?</a></li>
<li class="doctools_subsection"><a href="#subsection32">How do I make an instance method private?</a></li>
<li class="doctools_subsection"><a href="#subsection33">Are there any limitations on instance method arguments?</a></li>
<li class="doctools_subsection"><a href="#subsection34">What implicit arguments are passed to each instance method?</a></li>
<li class="doctools_subsection"><a href="#subsection35">What is $type?</a></li>
<li class="doctools_subsection"><a href="#subsection36">What is $self?</a></li>
<li class="doctools_subsection"><a href="#subsection37">What is $selfns?</a></li>
<li class="doctools_subsection"><a href="#subsection38">What is $win?</a></li>
<li class="doctools_subsection"><a href="#subsection39">How do I pass an instance method as a callback?</a></li>
<li class="doctools_subsection"><a href="#subsection40">How do I delegate instance methods to a component?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">INSTANCE VARIABLES</a>
<ul>
<li class="doctools_subsection"><a href="#subsection41">What is an instance variable?</a></li>
<li class="doctools_subsection"><a href="#subsection42">How is a scalar instance variable defined?</a></li>
<li class="doctools_subsection"><a href="#subsection43">How is an array instance variable defined?</a></li>
<li class="doctools_subsection"><a href="#subsection44">What happens if I don't initialize an instance variable?</a></li>
<li class="doctools_subsection"><a href="#subsection45">Are there any limitations on instance variable names?</a></li>
<li class="doctools_subsection"><a href="#subsection46">Do I need to declare my instance variables in my methods?</a></li>
<li class="doctools_subsection"><a href="#subsection47">How do I pass an instance variable's name to another object?</a></li>
<li class="doctools_subsection"><a href="#subsection48">How do I make an instance variable public?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">OPTIONS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection49">What is an option?</a></li>
<li class="doctools_subsection"><a href="#subsection50">How do I define an option?</a></li>
<li class="doctools_subsection"><a href="#subsection51">How can a client set options at object creation?</a></li>
<li class="doctools_subsection"><a href="#subsection52">How can a client retrieve an option's value?</a></li>
<li class="doctools_subsection"><a href="#subsection53">How can a client set options after object creation?</a></li>
<li class="doctools_subsection"><a href="#subsection54">How should an instance method access an option value?</a></li>
<li class="doctools_subsection"><a href="#subsection55">How can I make an option read-only?</a></li>
<li class="doctools_subsection"><a href="#subsection56">How can I catch accesses to an option's value?</a></li>
<li class="doctools_subsection"><a href="#subsection57">What is a -cgetmethod?</a></li>
<li class="doctools_subsection"><a href="#subsection58">How can I catch changes to an option's value?</a></li>
<li class="doctools_subsection"><a href="#subsection59">What is a -configuremethod?</a></li>
<li class="doctools_subsection"><a href="#subsection60">How can I validate an option's value?</a></li>
<li class="doctools_subsection"><a href="#subsection61">What is a -validatemethod?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section8">TYPE VARIABLES</a>
<ul>
<li class="doctools_subsection"><a href="#subsection62">What is a type variable?</a></li>
<li class="doctools_subsection"><a href="#subsection63">How is a scalar type variable defined?</a></li>
<li class="doctools_subsection"><a href="#subsection64">How is an array-valued type variable defined?</a></li>
<li class="doctools_subsection"><a href="#subsection65">What happens if I don't initialize a type variable?</a></li>
<li class="doctools_subsection"><a href="#subsection66">Are there any limitations on type variable names?</a></li>
<li class="doctools_subsection"><a href="#subsection67">Do I need to declare my type variables in my methods?</a></li>
<li class="doctools_subsection"><a href="#subsection68">How do I pass a type variable's name to another object?</a></li>
<li class="doctools_subsection"><a href="#subsection69">How do I make a type variable public?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section9">TYPE METHODS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection70">What is a type method?</a></li>
<li class="doctools_subsection"><a href="#subsection71">How do I define a type method?</a></li>
<li class="doctools_subsection"><a href="#subsection72">How does a client call a type method?</a></li>
<li class="doctools_subsection"><a href="#subsection73">Are there any limitations on type method names?</a></li>
<li class="doctools_subsection"><a href="#subsection74">How do I make a type method private?</a></li>
<li class="doctools_subsection"><a href="#subsection75">Are there any limitations on type method arguments?</a></li>
<li class="doctools_subsection"><a href="#subsection76">How does an instance or type method call a type method?</a></li>
<li class="doctools_subsection"><a href="#subsection77">How do I pass a type method as a callback?</a></li>
<li class="doctools_subsection"><a href="#subsection78">Can type methods be hierarchical?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section10">PROCS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection79">What is a proc?</a></li>
<li class="doctools_subsection"><a href="#subsection80">How do I define a proc?</a></li>
<li class="doctools_subsection"><a href="#subsection81">Are there any limitations on proc names?</a></li>
<li class="doctools_subsection"><a href="#subsection82">How does a method call a proc?</a></li>
<li class="doctools_subsection"><a href="#subsection83">How can I pass a proc to another object as a callback?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section11">TYPE CONSTRUCTORS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection84">What is a type constructor?</a></li>
<li class="doctools_subsection"><a href="#subsection85">How do I define a type constructor?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section12">CONSTRUCTORS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection86">What is a constructor?</a></li>
<li class="doctools_subsection"><a href="#subsection87">How do I define a constructor?</a></li>
<li class="doctools_subsection"><a href="#subsection88">What does the default constructor do?</a></li>
<li class="doctools_subsection"><a href="#subsection89">Can I choose a different set of arguments for the constructor?</a></li>
<li class="doctools_subsection"><a href="#subsection90">Are there any limitations on constructor arguments?</a></li>
<li class="doctools_subsection"><a href="#subsection91">Is there anything special about writing the constructor?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section13">DESTRUCTORS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection92">What is a destructor?</a></li>
<li class="doctools_subsection"><a href="#subsection93">How do I define a destructor?</a></li>
<li class="doctools_subsection"><a href="#subsection94">Are there any limitations on destructor arguments?</a></li>
<li class="doctools_subsection"><a href="#subsection95">What implicit arguments are passed to the destructor?</a></li>
<li class="doctools_subsection"><a href="#subsection96">Must components be destroyed explicitly?</a></li>
<li class="doctools_subsection"><a href="#subsection97">Is there any special about writing a destructor?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section14">COMPONENTS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection98">What is a component?</a></li>
<li class="doctools_subsection"><a href="#subsection99">How do I declare a component?</a></li>
<li class="doctools_subsection"><a href="#subsection100">How is a component named?</a></li>
<li class="doctools_subsection"><a href="#subsection101">Are there any limitations on component names?</a></li>
<li class="doctools_subsection"><a href="#subsection102">What is an owned component?</a></li>
<li class="doctools_subsection"><a href="#subsection103">What does the install command do?</a></li>
<li class="doctools_subsection"><a href="#subsection104">Must owned components be created in the constructor?</a></li>
<li class="doctools_subsection"><a href="#subsection105">Are there any limitations on component object names?</a></li>
<li class="doctools_subsection"><a href="#subsection106">Must I destroy the components I own?</a></li>
<li class="doctools_subsection"><a href="#subsection107">Can I expose a component's object command as part of my interface?</a></li>
<li class="doctools_subsection"><a href="#subsection108">How do I expose a component's object command?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section15">TYPE COMPONENTS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection109">What is a type component?</a></li>
<li class="doctools_subsection"><a href="#subsection110">How do I declare a type component?</a></li>
<li class="doctools_subsection"><a href="#subsection111">How do I install a type component?</a></li>
<li class="doctools_subsection"><a href="#subsection112">Are there any limitations on type component names?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section16">DELEGATION</a>
<ul>
<li class="doctools_subsection"><a href="#subsection113">What is delegation?</a></li>
<li class="doctools_subsection"><a href="#subsection114">How can I delegate a method to a component object?</a></li>
<li class="doctools_subsection"><a href="#subsection115">Can I delegate to a method with a different name?</a></li>
<li class="doctools_subsection"><a href="#subsection116">Can I delegate to a method with additional arguments?</a></li>
<li class="doctools_subsection"><a href="#subsection117">Can I delegate a method to something other than an object?</a></li>
<li class="doctools_subsection"><a href="#subsection118">How can I delegate a method to a type component object?</a></li>
<li class="doctools_subsection"><a href="#subsection119">How can I delegate a type method to a type component object?</a></li>
<li class="doctools_subsection"><a href="#subsection120">How can I delegate an option to a component object?</a></li>
<li class="doctools_subsection"><a href="#subsection121">Can I delegate to an option with a different name?</a></li>
<li class="doctools_subsection"><a href="#subsection122">How can I delegate any unrecognized method or option to a component object?</a></li>
<li class="doctools_subsection"><a href="#subsection123">How can I delegate all but certain methods or options to a component?</a></li>
<li class="doctools_subsection"><a href="#subsection124">Can a hierarchical method be delegated?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section17">WIDGETS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection125">What is a snit::widget?</a></li>
<li class="doctools_subsection"><a href="#subsection126">How do I define a snit::widget?</a></li>
<li class="doctools_subsection"><a href="#subsection127">How do snit::widgets differ from snit::types?</a></li>
<li class="doctools_subsection"><a href="#subsection128">What is a hull component?</a></li>
<li class="doctools_subsection"><a href="#subsection129">How can I set the hull type for a snit::widget?</a></li>
<li class="doctools_subsection"><a href="#subsection130">How should I name widgets which are components of a snit::widget?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section18">WIDGET ADAPTORS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection131">What is a snit::widgetadaptor?</a></li>
<li class="doctools_subsection"><a href="#subsection132">How do I define a snit::widgetadaptor?</a></li>
<li class="doctools_subsection"><a href="#subsection133">Can I adapt a widget created elsewhere in the program?</a></li>
<li class="doctools_subsection"><a href="#subsection134">Can I adapt another megawidget?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section19">THE TK OPTION DATABASE</a>
<ul>
<li class="doctools_subsection"><a href="#subsection135">What is the Tk option database?</a></li>
<li class="doctools_subsection"><a href="#subsection136">Do snit::types use the Tk option database?</a></li>
<li class="doctools_subsection"><a href="#subsection137">What is my snit::widget's widget class?</a></li>
<li class="doctools_subsection"><a href="#subsection138">What is my snit::widgetadaptor's widget class?</a></li>
<li class="doctools_subsection"><a href="#subsection139">What are option resource and class names?</a></li>
<li class="doctools_subsection"><a href="#subsection140">What are the resource and class names for my megawidget's options?</a></li>
<li class="doctools_subsection"><a href="#subsection141">How does Snit initialize my megawidget's locally-defined options?</a></li>
<li class="doctools_subsection"><a href="#subsection142">How does Snit initialize delegated options?</a></li>
<li class="doctools_subsection"><a href="#subsection143">How does Snit initialize options delegated to the hull?</a></li>
<li class="doctools_subsection"><a href="#subsection144">How does Snit initialize options delegated to other components?</a></li>
<li class="doctools_subsection"><a href="#subsection145">What happens if I install a non-widget as a component of widget?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section20">ENSEMBLE COMMANDS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection146">What is an ensemble command?</a></li>
<li class="doctools_subsection"><a href="#subsection147">How can I create an ensemble command using Snit?</a></li>
<li class="doctools_subsection"><a href="#subsection148">How can I create an ensemble command using an instance of a snit::type?</a></li>
<li class="doctools_subsection"><a href="#subsection149">How can I create an ensemble command using a snit::type?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section21">PRAGMAS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection150">What is a pragma?</a></li>
<li class="doctools_subsection"><a href="#subsection151">How do I set a pragma?</a></li>
<li class="doctools_subsection"><a href="#subsection152">How can I get rid of the &quot;info&quot; type method?</a></li>
<li class="doctools_subsection"><a href="#subsection153">How can I get rid of the &quot;destroy&quot; type method?</a></li>
<li class="doctools_subsection"><a href="#subsection154">How can I get rid of the &quot;create&quot; type method?</a></li>
<li class="doctools_subsection"><a href="#subsection155">How can I get rid of type methods altogether?</a></li>
<li class="doctools_subsection"><a href="#subsection156">Why can't I create an object that replaces an old object with the same name?</a></li>
<li class="doctools_subsection"><a href="#subsection157">How can I make my simple type run faster?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section22">MACROS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection158">What is a macro?</a></li>
<li class="doctools_subsection"><a href="#subsection159">What are macros good for?</a></li>
<li class="doctools_subsection"><a href="#subsection160">How do I do conditional compilation?</a></li>
<li class="doctools_subsection"><a href="#subsection161">How do I define new type definition syntax?</a></li>
<li class="doctools_subsection"><a href="#subsection162">Are there are restrictions on macro names?</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section23">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">What is this document?</a></h3>
<p>This is an atypical FAQ list, in that few of the questions are
frequently asked.  Rather, these are the questions I think a newcomer
to Snit should be asking.  This file is not a complete reference to
Snit, however; that information is in the <b class="cmd"><a href="snit.html">snit</a></b> man page.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">What is Snit?</a></h3>
<p>Snit is a framework for defining abstract data types and megawidgets
in pure Tcl.  The name &quot;Snit&quot; stands for &quot;Snit's Not Incr Tcl&quot;,
signifying that Snit takes a different approach to defining objects
than does Incr Tcl, the best known object framework for Tcl.  Had
I realized that Snit would become at all popular, I'd probably have
chosen something else.</p>
<p>The primary purpose of Snit is to be <i class="term">object glue</i>--to help you
compose diverse objects from diverse sources into types and
megawidgets with clean, convenient interfaces so that you can more
easily build your application.</p>
<p>Snit isn't about theoretical purity or minimalist design; it's about
being able to do powerful things easily and consistently without
having to think about them--so that you can concentrate on building
your application.</p>
<p>Snit isn't about implementing thousands of nearly identical
carefully-specified lightweight thingamajigs--not as individual Snit
objects.  Traditional Tcl methods will be much faster, and not much
more complicated.  But Snit <em>is</em> about implementing a clean interface
to manage a collection of thousands of nearly identical
carefully-specified lightweight thingamajigs (e.g., think of the text
widget and text tags, or the canvas widget and canvas objects).  Snit
lets you hide the details of just how those thingamajigs are
stored--so that you can ignore it, and concentrate on building your
application.</p>
<p>Snit isn't a way of life, a silver bullet, or the Fountain of
Youth. It's just a way of managing complexity--and of managing some of
the complexity of managing complexity--so that you can concentrate on
building your application.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">What version of Tcl does Snit require?</a></h3>
<p>Snit 1.3 requires Tcl 8.3 or later; Snit 2.2 requires Tcl 8.5 or
later.  See <span class="sectref"><a href="#section3">SNIT VERSIONS</a></span> for the differences between Snit
1.3 and Snit 2.2.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Where can I download Snit?</a></h3>
<p>Snit is part of Tcllib, the standard Tcl library, so you might already
have it.  It's also available at the Snit Home Page,
<a href="http://www.wjduquette.com/snit">http://www.wjduquette.com/snit</a>.</p>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">What are Snit's goals?</a></h3>
<ul class="doctools_itemized">
<li><p>A Snit object should be at least as efficient as a hand-coded Tcl
object (see <a href="http://www.wjduquette.com/tcl/objects.html">http://www.wjduquette.com/tcl/objects.html</a>).</p></li>
<li><p>The fact that Snit was used in an object's implementation should be
transparent (and irrelevant) to clients of that object.</p></li>
<li><p>Snit should be able to encapsulate objects from other sources,
particularly Tk widgets.</p></li>
<li><p>Snit megawidgets should be (to the extent possible) indistinguishable
in interface from Tk widgets.</p></li>
<li><p>Snit should be Tclish--that is, rather than trying to emulate C++,
Smalltalk, or anything else, it should try to emulate Tcl itself.</p></li>
<li><p>It should have a simple, easy-to-use, easy-to-remember syntax.</p></li>
</ul>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">How is Snit different from other OO frameworks?</a></h3>
<p>Snit is unique among Tcl object systems in that
it is based not on inheritance but on delegation.  Object
systems based on inheritance only allow you to inherit from classes
defined using the same system, and that's a shame.  In Tcl, an object
is anything that acts like an object; it shouldn't matter how the
object was implemented.  I designed Snit to help me build applications
out of the materials at hand; thus, Snit is designed to be able to
incorporate and build on any object, whether it's a hand-coded object,
a Tk widget, an Incr Tcl object, a BWidget or almost anything else.</p>
<p>Note that you can achieve the effect of inheritance using
<span class="sectref"><a href="#section14">COMPONENTS</a></span> and <span class="sectref"><a href="#section16">DELEGATION</a></span>--and you can inherit
from anything that looks like a Tcl object.</p>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">What can I do with Snit?</a></h3>
<p>Using Snit, a programmer can:</p>
<ul class="doctools_itemized">
<li><p>Create abstract data types and Tk megawidgets.</p></li>
<li><p>Define instance variables, type variables, and Tk-style options.</p></li>
<li><p>Define constructors, destructors, instance methods, type methods, procs.</p></li>
<li><p>Assemble a type out of component types.  Instance methods and options
can be delegated to the component types automatically.</p></li>
</ul>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">SNIT VERSIONS</a></h2>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Which version of Snit should I use?</a></h3>
<p>The current Snit distribution includes two versions, Snit 1.3 and Snit
2.2.  The reason that both are included is that Snit 2.2 takes
advantage of a number of new features of Tcl 8.5 to improve run-time
efficiency; as a side-effect, the ugliness of Snit's error messages
and stack traces has been reduced considerably.  The cost of using
Snit 2.2, of course, is that you must target Tcl 8.5.</p>
<p>Snit 1.3, on the other hand, lacks Snit 2.2's optimizations, but
requires only Tcl 8.3 and later.</p>
<p>In short, if you're targetting Tcl 8.3 or 8.4 you should use Snit 1.3.  If
you can afford to target Tcl 8.5, you should definitely use Snit 2.2.
If you will be targetting both, you can use Snit 1.3 exclusively, or
(if your code is unaffected by the minor incompatibilities between the
two versions) you can use Snit 1.3 for Tcl 8.4 and Snit 2.2 for Tcl
8.5.</p>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">How do I select the version of Snit I want to use?</a></h3>
<p>To always use Snit 1.3 (or a later version of Snit 1.x), invoke Snit
as follows:</p>
<pre class="doctools_example">package require snit 1.3
</pre>
<p>To always use Snit 2.2 (or a later version of Snit 2.x), say this
instead:</p>
<pre class="doctools_example">package require snit 2.2
</pre>
<p>Note that if you request Snit 2.2 explicitly, your application will
halt with Tcl 8.4, since Snit 2.2 is unavailable for Tcl 8.4.</p>
<p>If you wish your application to always use the latest available
version of Snit, don't specify a version number:</p>
<pre class="doctools_example">package require snit
</pre>
<p>Tcl will find and load the latest version that's available relative to
the version of Tcl being used.  In this case, be careful to avoid
using any incompatible features.</p>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">How are Snit 1.3 and Snit 2.2 incompatible?</a></h3>
<p>To the extent possible, Snit 2.2 is intended to be a drop-in
replacement for Snit 1.3. Unfortunately, some incompatibilities were
inevitable because Snit 2.2 uses Tcl 8.5's new
<b class="cmd">namespace ensemble</b> mechanism to implement subcommand dispatch.
This approach is much faster than the mechanism used in Snit 1.3, and
also results in much better error messages; however, it also places
new constraints on the implementation.</p>
<p>There are four specific incompatibilities between Snit 1.3 and Snit 2.2.</p>
<ul class="doctools_itemized">
<li><p>Snit 1.3 supports implicit naming of objects.  Suppose you define a
new <b class="cmd">snit::type</b> called <b class="cmd">dog</b>.  You can create instances of
<b class="cmd">dog</b> in three ways:</p>
<pre class="doctools_example">dog spot               ;# Explicit naming
set obj1 [dog %AUTO%]  ;# Automatic naming
set obj2 [dog]         ;# Implicit naming
</pre>
<p>In Snit 2.2, type commands are defined using the <b class="cmd">namespace ensemble</b>
mechanism; and <b class="cmd">namespace ensemble</b> doesn't allow an ensemble command
to be called without a subcommand.  In short, using
<b class="cmd">namespace ensemble</b> there's no way to support implicit naming.</p>
<p>All is not lost, however.  If the type has no type methods, then the
type command is a simple command rather than an ensemble, and
<b class="cmd">namespace ensemble</b> is not used.  In this case, implicit naming
is still possible.</p>
<p>In short, you can have implicit naming if you're willing to do without
type methods (including the standard type methods, like
<b class="cmd">$type info</b>).  To do so, use the <b class="const">-hastypemethods</b> pragma:</p>
<pre class="doctools_example">pragma -hastypemethods 0</pre>
</li>
<li><p>Hierarchical methods and type methods are implemented differently in
Snit 2.2.</p>
<p>A hierarchical method is an instance method which has
subcommands; these subcommands are themselves methods.  The Tk text
widget's <b class="cmd">tag</b> command and its subcommands are examples of
hierarchical methods.  You can implement such subcommands in Snit
simply by including multiple words in the method names:</p>
<pre class="doctools_example">method {tag configure} {tag args} { ... }
method {tag cget} {tag option} {...}
</pre>
<p>Here we've implicitly defined a <b class="cmd">tag</b> method which has two
subcommands, <b class="cmd">configure</b> and <b class="cmd">cget</b>.</p>
<p>In Snit 1.3, hierarchical methods could be called in two ways:</p>
<pre class="doctools_example">$obj tag cget -myoption      ;# The good way
$obj {tag cget} -myoption    ;# The weird way
</pre>
<p>In the second call, we see that a hierarchical method or type method
is simply one whose name contains multiple words.</p>
<p>In Snit 2.2 this is no longer the case, and the &quot;weird&quot; way of calling
hierarchical methods and type methods no longer works.</p></li>
<li><p>The third incompatibility derives from the second.  In Snit 1.3,
hierarchical methods were also simply methods whose name contains
multiple words.  As a result, <b class="cmd">$obj info methods</b> returned the
full names of all hierarchical methods.  In the example above,
the list returned by <b class="cmd">$obj info methods</b> would include
<b class="cmd">tag configure</b> and <b class="cmd">tag cget</b> but not <b class="cmd">tag</b>, since
<b class="cmd">tag</b> is defined only implicitly.</p>
<p>In Snit 2.2, hierarchical methods and type methods are no longer
simply ones whose
name contains multiple words; in the above example, the list returned
by <b class="cmd">$obj info methods</b> would include <b class="cmd">tag</b> but not
<b class="cmd">tag configure</b> or <b class="cmd">tag cget</b>.</p></li>
<li><p>The fourth incompatibility is due to a new feature.  Snit 2.2 uses
the new <b class="cmd">namespace path</b> command so that a type's code can
call any command defined in the type's parent namespace without
qualification or importation.  For example, suppose you have a
package called <b class="cmd">mypackage</b> which defines a number of commands
including a type, <b class="cmd">::mypackage::mytype</b>.  Thanks to
<b class="cmd">namespace path</b>, the type's code can call any of the other
commands defined in <b class="cmd">::mypackage::</b>.</p>
<p>This is extremely convenient.  However, it also means that commands
defined in the parent namespace, <b class="cmd">::mypackage::</b> can block the
type's access to identically named commands in the global namespace.
This can lead to bugs.  For example, Tcllib includes a type called
<b class="cmd">::tie::std::file</b>.  This type's code calls the standard
<b class="cmd"><a href="../../../../index.html#key31">file</a></b> command.  When run with Snit 2.2, the code broke--
the type's command, <b class="cmd">::tie::std::file</b>, is itself a command
in the type's parent namespace, and so instead of calling
the standard <b class="cmd"><a href="../../../../index.html#key31">file</a></b> command, the type found itself calling
itself.</p></li>
</ul>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Are there other differences between Snit 1.x and Snit 2.2?</a></h3>
<p>Yes.</p>
<ul class="doctools_itemized">
<li><p>Method dispatch is considerably faster.</p></li>
<li><p>Many error messages and stack traces are cleaner.</p></li>
<li><p>The <b class="const">-simpledispatch</b> pragma is obsolete, and ignored if
present. In Snit 1.x, <b class="const">-simpledispatch</b> substitutes a faster
mechanism for method dispatch, at the cost of losing certain features.
Snit 2.2 method dispatch is faster still in all cases, so
<b class="const">-simpledispatch</b> is no longer needed.</p></li>
<li><p>In Snit 2.2, a type's code (methods, type methods, etc.) can call commands
from the type's parent namespace without qualifying or importing
them, i.e., type <b class="cmd">::parentns::mytype</b>'s code can call
<b class="cmd">::parentns::someproc</b> as just <b class="cmd">someproc</b>.</p>
<p>This is extremely useful when a type is defined as part of a larger
package, and shares a parent namespace with the rest of the package;
it means that the type can call other commands defined by the
package without any extra work.</p>
<p>This feature depends on the new Tcl 8.5 <b class="cmd">namespace path</b> command,
which is why it hasn't been implemented for V1.x.  V1.x code can
achieve something similar by placing</p>
<pre class="doctools_example">namespace import [namespace parent]::*</pre>
<p>in a type constructor.  This is less useful, however, as it picks up
only those commands which have already been exported by the parent
namespace at the time the type is defined.</p></li>
</ul>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">OBJECTS</a></h2>
<div id="subsection12" class="doctools_subsection"><h3><a name="subsection12">What is an object?</a></h3>
<p>A full description of object-oriented programming is beyond
the scope of this FAQ, obviously.  In simple terms, an object is an instance of
an abstract data type--a coherent bundle of code and data.
There are many ways to represent objects in Tcl/Tk; the best known
examples are the Tk widgets.</p>
<p>A Tk widget is an object; it is represented by a Tcl command.
The object's methods are subcommands of the Tcl command.  The object's
properties are options accessed using the <b class="method">configure</b> and
<b class="method">cget</b> methods.  Snit uses the same conventions as Tk widgets do.</p>
</div>
<div id="subsection13" class="doctools_subsection"><h3><a name="subsection13">What is an abstract data type?</a></h3>
<p>In computer science terms, an abstract data type is a complex data
structure along with a set of operations--a stack, a queue, a
binary tree, etc--that is to say, in modern terms, an object.  In systems
that include some form of inheritance the word <i class="term"><a href="../../../../index.html#key240">class</a></i> is
usually used instead of <i class="term">abstract data type</i>, but as Snit
doesn't implement inheritance as it's ordinarily understood
the older term seems more appropriate.  Sometimes this is called
<i class="term">object-based</i> programming as opposed to object-oriented
programming.  Note that you can easily create the effect of
inheritance using <span class="sectref"><a href="#section14">COMPONENTS</a></span> and <span class="sectref"><a href="#section16">DELEGATION</a></span>.</p>
<p>In Snit, as in Tk, a <i class="term"><a href="../../../../index.html#key117">type</a></i> is a command that creates instances
-- objects -- which belong to the type.  Most types define some number
of <i class="term">options</i> which can be set at creation time, and usually can be
changed later.</p>
<p>Further, an <i class="term">instance</i> is also a Tcl command--a command that
gives access to the operations which are defined for that abstract
data type.  Conventionally, the operations are defined as subcommands
of the instance command.  For example, to insert
text into a Tk text widget, you use the text widget's <b class="method">insert</b>
subcommand:</p>
<pre class="doctools_example">    # Create a text widget and insert some text in it.
    text .mytext -width 80 -height 24
    .mytext insert end &quot;Howdy!&quot;
</pre>
<p>In this example, <b class="cmd"><a href="../../../../index.html#key248">text</a></b> is the <i class="term"><a href="../../../../index.html#key117">type</a></i> command and
<b class="cmd">.mytext</b> is the <i class="term">instance</i> command.</p>
<p>In Snit, object subcommands are generally called
<span class="sectref"><a href="#section5">INSTANCE METHODS</a></span>.</p>
</div>
<div id="subsection14" class="doctools_subsection"><h3><a name="subsection14">What kinds of abstract data types does Snit provide?</a></h3>
<p>Snit allows you to define three kinds of abstract data type:</p>
<ul class="doctools_itemized">
<li><p><b class="cmd">snit::type</b></p></li>
<li><p><b class="cmd">snit::widget</b></p></li>
<li><p><b class="cmd">snit::widgetadaptor</b></p></li>
</ul>
</div>
<div id="subsection15" class="doctools_subsection"><h3><a name="subsection15">What is a snit::type?</a></h3>
<p>A <b class="cmd">snit::type</b> is a non-GUI abstract data type, e.g., a stack or a
queue.  <b class="cmd">snit::type</b>s are defined using the <b class="cmd">snit::type</b>
command.  For example, if you were designing a kennel management
system for a dog breeder, you'd need a dog type.</p>
<pre class="doctools_example">% snit::type dog {
    # ...
}
::dog
%
</pre>
<p>This definition defines a new command (<b class="cmd">::dog</b>, in this case)
that can be used to define dog objects.</p>
<p>An instance of a <b class="cmd">snit::type</b> can have <span class="sectref"><a href="#section5">INSTANCE METHODS</a></span>,
<span class="sectref"><a href="#section6">INSTANCE VARIABLES</a></span>, <span class="sectref"><a href="#section7">OPTIONS</a></span>, and <span class="sectref"><a href="#section14">COMPONENTS</a></span>.
The type itself can have <span class="sectref"><a href="#section9">TYPE METHODS</a></span>,
<span class="sectref"><a href="#section8">TYPE VARIABLES</a></span>, <span class="sectref"><a href="#section15">TYPE COMPONENTS</a></span>, and
<span class="sectref"><a href="#section10">PROCS</a></span>.</p>
</div>
<div id="subsection16" class="doctools_subsection"><h3><a name="subsection16">What is a snit::widget?, the short story</a></h3>
<p>A <b class="cmd">snit::widget</b> is a Tk megawidget built using Snit; it is very
similar to a <b class="cmd">snit::type</b>.  See <span class="sectref"><a href="#section17">WIDGETS</a></span>.</p>
</div>
<div id="subsection17" class="doctools_subsection"><h3><a name="subsection17">What is a snit::widgetadaptor?, the short story</a></h3>
<p>A <b class="cmd">snit::widgetadaptor</b> uses Snit to wrap an existing widget type
(e.g., a Tk label), modifying its interface to a lesser or greater
extent.  It is very similar to a <b class="cmd">snit::widget</b>.
See <span class="sectref"><a href="#section18">WIDGET ADAPTORS</a></span>.</p>
</div>
<div id="subsection18" class="doctools_subsection"><h3><a name="subsection18">How do I create an instance of a snit::type?</a></h3>
<p>You create an instance of a <b class="cmd">snit::type</b> by passing the new
instance's name to the type's create method.  In the following
example, we create a <b class="cmd">dog</b> object called <b class="cmd">spot</b>.</p>
<pre class="doctools_example">% snit::type dog {
    # ....
}
::dog
% dog create spot
::spot
%
</pre>
<p>In general, the <b class="method">create</b> method name can be omitted so long as
the instance name doesn't conflict with any defined
<span class="sectref"><a href="#section9">TYPE METHODS</a></span>. (See <span class="sectref"><a href="#section15">TYPE COMPONENTS</a></span> for the
special case in which this doesn't work.)
So the following example is identical to the
previous example:</p>
<pre class="doctools_example">% snit::type dog {
    # ....
}
::dog
% dog spot
::spot
%
</pre>
<p>This document generally uses the shorter form.</p>
<p>If the <b class="cmd">dog</b> type defines <span class="sectref"><a href="#section7">OPTIONS</a></span>, these can usually be
given defaults at creation time:</p>
<pre class="doctools_example">% snit::type dog {
    option -breed mongrel
    option -color brown
    method bark {} { return &quot;$self barks.&quot; }
}
::dog
% dog create spot -breed dalmation -color spotted
::spot
% spot cget -breed
dalmation
% spot cget -color
spotted
%
</pre>
<p>Once created, the instance name now names a new Tcl command that is used
to manipulate the object.  For example, the following code makes the
dog bark:</p>
<pre class="doctools_example">% spot bark
::spot barks.
%
</pre>
</div>
<div id="subsection19" class="doctools_subsection"><h3><a name="subsection19">How do I refer to an object indirectly?</a></h3>
<p>Some programmers prefer to save the object name in a variable, and
reference it that way.  For example,</p>
<pre class="doctools_example">% snit::type dog { ... }
::dog
% set d [dog spot -breed dalmation -color spotted]
::spot
% $d cget -breed
dalmation
% $d bark
::spot barks.
%
</pre>
<p>If you prefer this style, you might prefer to have Snit
generate the instance's name automatically.</p>
</div>
<div id="subsection20" class="doctools_subsection"><h3><a name="subsection20">How can I generate the object name automatically?</a></h3>
<p>If you'd like Snit to generate an object name for you,
use the <b class="const">%AUTO%</b> keyword as the requested name:</p>
<pre class="doctools_example">% snit::type dog { ... }
::dog
% set d [dog %AUTO%]
::dog2
% $d bark
::dog2 barks.
%
</pre>
<p>The <b class="const">%AUTO%</b> keyword can be embedded in a longer string:</p>
<pre class="doctools_example">% set d [dog obj_%AUTO%]
::obj_dog4
% $d bark
::obj_dog4 barks.
%
</pre>
</div>
<div id="subsection21" class="doctools_subsection"><h3><a name="subsection21">Can types be renamed?</a></h3>
<p>Tcl's <b class="cmd">rename</b> command renames other commands.  It's a common
technique in Tcl to modify an existing command by renaming it and
defining a new command with the original name; the new command usually
calls the renamed command.</p>
<p><b class="cmd">snit::type</b> commands, however, should never be renamed; to do so breaks
the connection between the type and its objects.</p>
</div>
<div id="subsection22" class="doctools_subsection"><h3><a name="subsection22">Can objects be renamed?</a></h3>
<p>Tcl's <b class="cmd">rename</b> command renames other commands.  It's a common
technique in Tcl to modify an existing command by renaming it and
defining a new command with the original name; the new command usually
calls the renamed command.</p>
<p>All Snit objects (including <i class="term">widgets</i> and <i class="term">widgetadaptors</i>)
can be renamed, though this flexibility has some consequences:</p>
<ul class="doctools_itemized">
<li><p>In an instance method, the implicit argument <b class="variable">self</b> will always
contain the object's current name, so instance methods can always call
other instance methods using <b class="variable">$self</b>.</p></li>
<li><p>If the object is renamed, however, then <b class="variable">$self</b>'s value will change.
Therefore, don't use <b class="variable">$self</b> for anything that will break if
<b class="variable">$self</b> changes. For example, don't pass a callback command to
another object like this:</p>
<pre class="doctools_example">
    .btn configure -command [list $self ButtonPress]
</pre>
<p>You'll get an error if <b class="cmd">.btn</b> calls your command after your object is
renamed.</p></li>
<li><p>Instead, your object should define its callback command like this:</p>
<pre class="doctools_example">
    .btn configure -command [mymethod ButtonPress]
</pre>
<p>The <b class="cmd">mymethod</b> command returns code that will call the desired
method safely; the caller of the callback can add additional
arguments to the end of the command as usual.</p></li>
<li><p>Every object has a private namespace; the name of this namespace is
available in method bodies, etc., as the value of the implicit
argument <b class="variable">selfns</b>.  This value is constant for the life of the
object.  Use <b class="variable">$selfns</b> instead of <b class="variable">$self</b> if you need a
unique token to identify the object.</p></li>
<li><p>When a <b class="cmd">snit::widget</b>'s instance command is renamed, its Tk window
name remains the same -- and is still extremely
important. Consequently, the Tk window name is available in
method bodies as the value of the implicit argument <b class="variable">win</b>.
This value is constant for the
life of the object.  When creating child windows, it's best to use
<b class="variable">$win.child</b> rather than <b class="variable">$self.child</b> as the name of the
child window.</p></li>
</ul>
</div>
<div id="subsection23" class="doctools_subsection"><h3><a name="subsection23">How do I destroy a Snit object?</a></h3>
<p>Any Snit object of any type can be destroyed by renaming
it to the empty string using the Tcl <b class="cmd">rename</b> command.</p>
<p>Snit megawidgets (i.e., instances of <b class="cmd">snit::widget</b> and
<b class="cmd">snit::widgetadaptor</b>) can be destroyed like any other widget: by
using the Tk <b class="cmd">destroy</b> command on the widget or on one of its
ancestors in the window hierarchy.</p>
<p>Every instance of a <b class="cmd">snit::type</b> has a <b class="method">destroy</b> method:</p>
<pre class="doctools_example">% snit::type dog { ... }
::dog
% dog spot
::spot
% spot bark
::spot barks.
% spot destroy
% spot barks
invalid command name &quot;spot&quot;
%
</pre>
<p>Finally, every Snit type has a type method called <b class="method">destroy</b>; calling it
destroys the type and all of its instances:</p>
<pre class="doctools_example">% snit::type dog { ... }
::dog
% dog spot
::spot
% spot bark
::spot barks.
% dog destroy
% spot bark
invalid command name &quot;spot&quot;
% dog fido
invalid command name &quot;dog&quot;
%
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">INSTANCE METHODS</a></h2>
<div id="subsection24" class="doctools_subsection"><h3><a name="subsection24">What is an instance method?</a></h3>
<p>An instance method is a procedure associated with a specific object
and called as a subcommand of the object's command.  It is given free
access to all of the object's type variables, instance variables, and
so forth.</p>
</div>
<div id="subsection25" class="doctools_subsection"><h3><a name="subsection25">How do I define an instance method?</a></h3>
<p>Instance methods are defined in the type definition using
the <b class="cmd"><a href="../../../../index.html#key372">method</a></b> statement.  Consider the following code that might be
used to add dogs to a computer simulation:</p>
<pre class="doctools_example">% snit::type dog {
    method bark {} {
        return &quot;$self barks.&quot;
    }
    method chase {thing} {
        return &quot;$self chases $thing.&quot;
    }
}
::dog
%
</pre>
<p>A dog can bark, and it can chase things.</p>
<p>The <b class="cmd"><a href="../../../../index.html#key372">method</a></b> statement looks just like a normal Tcl <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>,
except that it appears in a <b class="cmd">snit::type</b> definition.  Notice that
every instance method gets an implicit argument called <b class="variable">self</b>;
this argument contains the object's name.  (There's more on
implicit method arguments below.)</p>
</div>
<div id="subsection26" class="doctools_subsection"><h3><a name="subsection26">How does a client call an instance method?</a></h3>
<p>The method name becomes a subcommand of the object.  For example,
let's put a simulated dog through its paces:</p>
<pre class="doctools_example">% dog spot
::spot
% spot bark
::spot barks.
% spot chase cat
::spot chases cat.
%
</pre>
</div>
<div id="subsection27" class="doctools_subsection"><h3><a name="subsection27">How does an instance method call another instance method?</a></h3>
<p>If method A needs to call method B on the same object, it does so just
as a client does: it calls method B as a subcommand of the object
itself, using the object name stored in the implicit argument <b class="variable">self</b>.</p>
<p>Suppose, for example, that our dogs never chase anything without
barking at them:</p>
<pre class="doctools_example">% snit::type dog {
    method bark {} {
        return &quot;$self barks.&quot;
    }
    method chase {thing} {
        return &quot;$self chases $thing.  [$self bark]&quot;
    }
}
::dog
% dog spot
::spot
% spot bark
::spot barks.
% spot chase cat
::spot chases cat.  ::spot barks.
%
</pre>
</div>
<div id="subsection28" class="doctools_subsection"><h3><a name="subsection28">Are there any limitations on instance method names?</a></h3>
<p>Not really, so long as you avoid the standard instance method names:
<b class="method">configure</b>, <b class="method">configurelist</b>, <b class="method">cget</b>,
<b class="method">destroy</b>, and <b class="method">info</b>.  Also, method names consisting of
multiple words define hierarchical methods.</p>
</div>
<div id="subsection29" class="doctools_subsection"><h3><a name="subsection29">What is a hierarchical method?</a></h3>
<p>An object's methods are subcommands of the object's instance command.
Hierarchical methods allow an object's methods to have subcommands of
their own; and these can in turn have subcommands, and so on.  This
allows the programmer to define a tree-shaped command structure, such
as is used by many of the Tk widgets--the subcommands of the
Tk <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget's <b class="cmd">tag</b> method are hierarchical methods.</p>
</div>
<div id="subsection30" class="doctools_subsection"><h3><a name="subsection30">How do I define a hierarchical method?</a></h3>
<p>Define methods whose names consist of multiple words.  These words
define the hierarchy implicitly.  For example, the following code
defines a <b class="cmd">tag</b> method with subcommands <b class="cmd">cget</b> and
<b class="cmd">configure</b>:</p>
<pre class="doctools_example">snit::widget mytext {
    method {tag configure} {tag args} { ... }
    method {tag cget} {tag option} {...}
}
</pre>
<p>Note that there is no explicit definition for the <b class="cmd">tag</b> method;
it is implicit in the definition of <b class="cmd">tag configure</b> and
<b class="cmd">tag cget</b>.  If you tried to define <b class="cmd">tag</b> explicitly in this
example, you'd get an error.</p>
</div>
<div id="subsection31" class="doctools_subsection"><h3><a name="subsection31">How do I call hierarchical methods?</a></h3>
<p>As subcommands of subcommands.</p>
<pre class="doctools_example">% mytext .text
.text
% .text tag configure redtext -foreground red -background black
% .text tag cget redtext -foreground
red
%
</pre>
</div>
<div id="subsection32" class="doctools_subsection"><h3><a name="subsection32">How do I make an instance method private?</a></h3>
<p>It's often useful to define private methods, that is, instance methods
intended to be called only by other methods of the same object.</p>
<p>Snit doesn't implement any access control on instance methods, so all
methods are <em>de facto</em> public.  Conventionally, though, the
names of public methods begin with a lower-case letter, and the names
of private methods begin with an upper-case letter.</p>
<p>For example, suppose our simulated dogs only bark in response to other
stimuli; they never bark just for fun.  So the <b class="method">bark</b> method
becomes <b class="method">Bark</b> to indicate that it is private:</p>
<pre class="doctools_example">% snit::type dog {
    # Private by convention: begins with uppercase letter.
    method Bark {} {
        return &quot;$self barks.&quot;
    }
    method chase {thing} {
        return &quot;$self chases $thing. [$self Bark]&quot;
    }
}
::dog
% dog fido
::fido
% fido chase cat
::fido chases cat. ::fido barks.
%
</pre>
</div>
<div id="subsection33" class="doctools_subsection"><h3><a name="subsection33">Are there any limitations on instance method arguments?</a></h3>
<p>Method argument lists are defined just like normal Tcl <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> argument
lists; in particular, they can include arguments with default values
 and the <b class="variable">args</b> argument.</p>
<p>However, every method also has a number of implicit arguments
provided by Snit in addition to those explicitly defined.  The names
of these implicit arguments may not used to name explicit arguments.</p>
</div>
<div id="subsection34" class="doctools_subsection"><h3><a name="subsection34">What implicit arguments are passed to each instance method?</a></h3>
<p>The arguments implicitly passed to every method are <b class="variable">type</b>,
<b class="variable">selfns</b>, <b class="variable">win</b>, and <b class="variable">self</b>.</p>
</div>
<div id="subsection35" class="doctools_subsection"><h3><a name="subsection35">What is $type?</a></h3>
<p>The implicit argument <b class="variable">type</b> contains the fully qualified name of
the object's type:</p>
<pre class="doctools_example">% snit::type thing {
    method mytype {} {
        return $type
    }
}
::thing
% thing something
::something
% something mytype
::thing
%
</pre>
</div>
<div id="subsection36" class="doctools_subsection"><h3><a name="subsection36">What is $self?</a></h3>
<p>The implicit argument <b class="variable">self</b> contains the object's fully
qualified name.</p>
<p>If the object's command is renamed, then <b class="variable">$self</b> will change to
match in subsequent calls.  Thus, your code should not assume that
<b class="variable">$self</b> is constant unless you know for sure that the object
will never be renamed.</p>
<pre class="doctools_example">% snit::type thing {
    method myself {} {
        return $self
    }
}
::thing
% thing mutt
::mutt
% mutt myself
::mutt
% rename mutt jeff
% jeff myself
::jeff
%
</pre>
</div>
<div id="subsection37" class="doctools_subsection"><h3><a name="subsection37">What is $selfns?</a></h3>
<p>Each Snit object has a private namespace in which to store its
<span class="sectref"><a href="#section6">INSTANCE VARIABLES</a></span> and <span class="sectref"><a href="#section7">OPTIONS</a></span>.  The implicit argument
<b class="variable">selfns</b> contains the name of this namespace; its value never changes, and
is constant for the life of the object, even if the object's name
changes:</p>
<pre class="doctools_example">% snit::type thing {
    method myNameSpace {} {
        return $selfns
    }
}
::thing
% thing jeff
::jeff
% jeff myNameSpace
::thing::Snit_inst3
% rename jeff mutt
% mutt myNameSpace
::thing::Snit_inst3
%
</pre>
<p>The above example reveals how Snit names an instance's private
namespace; however, you should not write code that depends on the
specific naming convention, as it might change in future releases.</p>
</div>
<div id="subsection38" class="doctools_subsection"><h3><a name="subsection38">What is $win?</a></h3>
<p>The implicit argument <b class="variable">win</b> is defined for all Snit methods,
though it really makes sense only for those of
<span class="sectref"><a href="#section17">WIDGETS</a></span> and <span class="sectref"><a href="#section18">WIDGET ADAPTORS</a></span>.  <b class="variable">$win</b> is simply
the original name of the object, whether it's been renamed or not.
For widgets and widgetadaptors, it is also therefore the name of a Tk
window.</p>
<p>When a <b class="cmd">snit::widgetadaptor</b> is used to modify the interface of a
widget or megawidget, it must rename the widget's original command and
replace it with its own.</p>
<p>Thus, using <b class="variable">win</b> whenever the Tk window name is called for
means that a <b class="cmd">snit::widget</b> or <b class="cmd">snit::widgetadaptor</b> can be
adapted by a <b class="cmd">snit::widgetadaptor</b>.  See <span class="sectref"><a href="#section17">WIDGETS</a></span> for
more information.</p>
</div>
<div id="subsection39" class="doctools_subsection"><h3><a name="subsection39">How do I pass an instance method as a callback?</a></h3>
<p>It depends on the context.</p>
<p>Suppose in my application I have a <b class="cmd">dog</b> object named <b class="cmd">fido</b>,
and I want <b class="cmd">fido</b> to bark when a Tk button called <b class="cmd">.bark</b> is
pressed.  In this case, I create the callback command in the usual
way, using <b class="cmd"><a href="../../../../index.html#key302">list</a></b>:</p>
<pre class="doctools_example">    button .bark -text &quot;Bark!&quot; -command [list fido bark]
</pre>
<p>In typical Tcl style, we use a callback to hook two independent
components together.  But suppose that the <b class="cmd">dog</b> object has
a graphical interface and owns the button itself?  In this case,
the <b class="cmd">dog</b> must pass one of its own instance methods to the
button it owns.  The obvious thing to do is this:</p>
<pre class="doctools_example">% snit::widget dog {
    constructor {args} {
        #...
        button $win.barkbtn -text &quot;Bark!&quot; -command [list $self bark]
        #...
    }
}
::dog
%
</pre>
<p>(Note that in this example, our <b class="cmd">dog</b>
becomes a <b class="cmd">snit::widget</b>, because it has GUI behavior.  See
<span class="sectref"><a href="#section17">WIDGETS</a></span> for more.)  Thus, if we create a <b class="cmd">dog</b> called
<b class="cmd">.spot</b>, it will create a Tk button called <b class="cmd">.spot.barkbtn</b>;
when pressed, the button will call <b class="cmd">$self bark</b>.</p>
<p>Now, this will work--provided that <b class="cmd">.spot</b> is never renamed to
something else.  But surely renaming widgets is
abnormal?  And so it is--unless <b class="cmd">.spot</b> is the hull component of a
<b class="cmd">snit::widgetadaptor</b>.  If it is, then it will be renamed, and
<b class="cmd">.spot</b> will become the name of the <b class="cmd">snit::widgetadaptor</b>
object.  When the button is pressed, the command <b class="cmd">$self bark</b>
will be handled by the <b class="cmd">snit::widgetadaptor</b>, which might or might
not do the right thing.</p>
<p>There's a safer way to do it, and it looks like this:</p>
<pre class="doctools_example">% snit::widget dog {
    constructor {args} {
        #...
        button $win.barkbtn -text &quot;Bark!&quot; -command [mymethod bark]
        #...
    }
}
::dog
%
</pre>
<p>The command <b class="cmd">mymethod</b> takes any number of arguments, and can be
used like <b class="cmd"><a href="../../../../index.html#key302">list</a></b> to build up a callback command; the only
difference is that <b class="cmd">mymethod</b> returns a
form of the command that won't change even if the instance's name
changes.</p>
<p>On the other hand, you might prefer to allow a widgetadaptor to
override a method such that your renamed widget will call the
widgetadaptor's method instead of its own.  In this case,
using <b class="cmd">[list $self bark]</b> will do what you want...but
this is a technique which should be used only in carefully controlled
circumstances.</p>
</div>
<div id="subsection40" class="doctools_subsection"><h3><a name="subsection40">How do I delegate instance methods to a component?</a></h3>
<p>See <span class="sectref"><a href="#section16">DELEGATION</a></span>.</p>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">INSTANCE VARIABLES</a></h2>
<div id="subsection41" class="doctools_subsection"><h3><a name="subsection41">What is an instance variable?</a></h3>
<p>An instance variable is a private variable associated with some
particular Snit object.  Instance variables can be scalars or arrays.</p>
</div>
<div id="subsection42" class="doctools_subsection"><h3><a name="subsection42">How is a scalar instance variable defined?</a></h3>
<p>Scalar instance variables are defined in the type definition using the
<b class="cmd">variable</b> statement.  You can simply name it, or you can
initialize it with a value:</p>
<pre class="doctools_example">snit::type mytype {
    # Define variable &quot;greeting&quot; and initialize it with &quot;Howdy!&quot;
    variable greeting &quot;Howdy!&quot;
}
</pre>
</div>
<div id="subsection43" class="doctools_subsection"><h3><a name="subsection43">How is an array instance variable defined?</a></h3>
<p>Array instance variables are also defined in the type definition
using the <b class="cmd">variable</b> command.  You can initialize them at the same
time by specifying the <b class="const">-array</b> option:</p>
<pre class="doctools_example">snit::type mytype {
    # Define array variable &quot;greetings&quot;
    variable greetings -array {
        formal &quot;Good Evening&quot;
        casual &quot;Howdy!&quot;
    }
}
</pre>
</div>
<div id="subsection44" class="doctools_subsection"><h3><a name="subsection44">What happens if I don't initialize an instance variable?</a></h3>
<p>Variables do not really exist until they are given values.  If you
do not initialize a variable when you define it, then you must be
sure to assign a value to it (in the constructor, say, or in some
method) before you reference it.</p>
</div>
<div id="subsection45" class="doctools_subsection"><h3><a name="subsection45">Are there any limitations on instance variable names?</a></h3>
<p>Just a few.</p>
<p>First, every Snit object has a built-in instance variable called
<b class="variable">options</b>, which should never be redefined.</p>
<p>Second, all names beginning with &quot;Snit_&quot; are reserved for
use by Snit internal code.</p>
<p>Third, instance variable names containing the namespace delimiter
(<b class="const">::</b>) are likely to cause great confusion.</p>
</div>
<div id="subsection46" class="doctools_subsection"><h3><a name="subsection46">Do I need to declare my instance variables in my methods?</a></h3>
<p>No. Once you've defined an instance variable in the type definition,
it can be used in any instance code (instance methods, the
constructor, and the destructor) without declaration.  This differs
from normal Tcl practice, in which all non-local variables in a proc
need to be declared.</p>
<p>There is a speed penalty to having all instance variables implicitly
available in all instance code.  Even though your code need not
declare the variables explicitly, Snit must still declare them,
and that takes time.  If you have ten instance variables, a method
that uses none of them must still pay the declaration penalty for
all ten.  In most cases, the additional runtime cost is negligible.
If extreme cases, you might wish to avoid it; there are two methods
for doing so.</p>
<p>The first is to define a single instance variable, an array, and store
all of your instance data in the array.  This way, you're only paying
the declaration penalty for one variable--and you probably need the
variable most of the time anyway.  This method breaks down if your
instance variables include multiple arrays; in Tcl 8.5, however,
the <b class="cmd"><a href="../../../../index.html#key705">dict</a></b> command might come to your rescue.</p>
<p>The second method is to declare your instance variables explicitly
in your instance code, while <em>not</em> including them in the type
definition:</p>
<pre class="doctools_example">snit::type dog {
    constructor {} {
        variable mood
        set mood happy
    }
    method setmood {newMood} {
        variable mood
        set mood $newMood
    }
    method getmood {} {
        variable mood
        return $mood
    }
}
</pre>
<p>This allows you to ensure that only the required variables are
included in each method, at the cost of longer code and run-time
errors when you forget to declare a variable you need.</p>
</div>
<div id="subsection47" class="doctools_subsection"><h3><a name="subsection47">How do I pass an instance variable's name to another object?</a></h3>
<p>In Tk, it's common to pass a widget a variable name; for example, Tk
label widgets have a <b class="option">-textvariable</b> option which names the
variable which will contain the widget's text.  This allows the
program to update the label's value just by assigning a new value to
the variable.</p>
<p>If you naively pass the instance variable name to the label widget,
you'll be confused by the result; Tk will assume that the name names a
global variable.  Instead, you need to provide a fully-qualified
variable name.  From within an instance method or a constructor, you
can fully qualify the variable's name using the <b class="cmd">myvar</b> command:</p>
<pre class="doctools_example">snit::widget mywidget {
    variable labeltext &quot;&quot;
    constructor {args} {
        # ...
        label $win.label -textvariable [myvar labeltext]
        # ...
    }
}
</pre>
</div>
<div id="subsection48" class="doctools_subsection"><h3><a name="subsection48">How do I make an instance variable public?</a></h3>
<p>Practically speaking, you don't.  Instead, you'll implement public
variables as <span class="sectref"><a href="#section7">OPTIONS</a></span>.
Alternatively, you can write <span class="sectref"><a href="#section5">INSTANCE METHODS</a></span> to set and get
the variable's value.</p>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">OPTIONS</a></h2>
<div id="subsection49" class="doctools_subsection"><h3><a name="subsection49">What is an option?</a></h3>
<p>A type's options are the equivalent of what other object-oriented
languages would call public member variables or properties: they are
data values which can be retrieved and (usually) set by the clients of
an object.</p>
<p>Snit's implementation of options follows the Tk model fairly exactly,
except that <b class="cmd">snit::type</b> objects usually don't interact with
<span class="sectref"><a href="#section19">THE TK OPTION DATABASE</a></span>; <b class="cmd">snit::widget</b> and
<b class="cmd">snit::widgetadaptor</b> objects, on the other hand, always do.</p>
</div>
<div id="subsection50" class="doctools_subsection"><h3><a name="subsection50">How do I define an option?</a></h3>
<p>Options are defined in the type definition using the <b class="cmd">option</b>
statement.  Consider the following type, to be used in an application
that manages a list of dogs for a pet store:</p>
<pre class="doctools_example">snit::type dog {
    option -breed -default mongrel
    option -color -default brown
    option -akc   -default 0
    option -shots -default 0
}
</pre>
<p>According to this, a dog has four notable properties: a
breed, a color, a flag that says whether it's pedigreed with the
American Kennel Club, and another flag that says whether it has had
its shots.  The default dog, evidently, is a brown mutt.</p>
<p>There are a number of options you can specify when defining an option;
if <b class="const">-default</b> is the only one, you can omit the word
<b class="const">-default</b> as follows:</p>
<pre class="doctools_example">snit::type dog {
    option -breed mongrel
    option -color brown
    option -akc   0
    option -shots 0
}
</pre>
<p>If no <b class="const">-default</b> value is specified, the option's default value
will be the empty string (but see <span class="sectref"><a href="#section19">THE TK OPTION DATABASE</a></span>).</p>
<p>The Snit man page refers to options like these as &quot;locally defined&quot; options.</p>
</div>
<div id="subsection51" class="doctools_subsection"><h3><a name="subsection51">How can a client set options at object creation?</a></h3>
<p>The normal convention is that the client may pass any number of
options and their values after the object's name at object creation.
For example, the <b class="cmd">::dog</b> command defined in the previous answer can now
be used to create individual dogs.  Any or all of the options may be
set at creation time.</p>
<pre class="doctools_example">% dog spot -breed beagle -color &quot;mottled&quot; -akc 1 -shots 1
::spot
% dog fido -shots 1
::fido
%
</pre>
<p>So <b class="cmd">::spot</b> is a pedigreed beagle; <b class="cmd">::fido</b> is a typical mutt,
but his owners evidently take care of him, because he's had his shots.</p>
<p><em>Note:</em> If the type defines a constructor, it can specify a
different object-creation syntax.  See <span class="sectref"><a href="#section12">CONSTRUCTORS</a></span> for more
information.</p>
</div>
<div id="subsection52" class="doctools_subsection"><h3><a name="subsection52">How can a client retrieve an option's value?</a></h3>
<p>Retrieve option values using the <b class="method">cget</b> method:</p>
<pre class="doctools_example">% spot cget -color
mottled
% fido cget -breed
mongrel
%
</pre>
</div>
<div id="subsection53" class="doctools_subsection"><h3><a name="subsection53">How can a client set options after object creation?</a></h3>
<p>Any number of options may be set at one time using the
<b class="method">configure</b> instance method.  Suppose that closer inspection
shows that ::fido is not a brown mongrel, but rather a rare Arctic Boar
Hound of a lovely dun color:</p>
<pre class="doctools_example">% fido configure -color dun -breed &quot;Arctic Boar Hound&quot;
% fido cget -color
dun
% fido cget -breed
Arctic Boar Hound
</pre>
<p>Alternatively, the <b class="method">configurelist</b> method takes a list of
options and values; occasionally this is more convenient:</p>
<pre class="doctools_example">% set features [list -color dun -breed &quot;Arctic Boar Hound&quot;]
-color dun -breed {Arctic Boar Hound}
% fido configurelist $features
% fido cget -color
dun
% fido cget -breed
Arctic Boar Hound
%
</pre>
<p>In Tcl 8.5, the <b class="cmd">*</b> keyword can be used with
<b class="method">configure</b> in this case:</p>
<pre class="doctools_example">% set features [list -color dun -breed &quot;Arctic Boar Hound&quot;]
-color dun -breed {Arctic Boar Hound}
% fido configure {*}$features
% fido cget -color
dun
% fido cget -breed
Arctic Boar Hound
%
</pre>
<p>The results are the same.</p>
</div>
<div id="subsection54" class="doctools_subsection"><h3><a name="subsection54">How should an instance method access an option value?</a></h3>
<p>There are two ways an instance method can set and retrieve an option's
value.  One is to use the <b class="method">configure</b> and <b class="method">cget</b>
methods, as shown below.</p>
<pre class="doctools_example">% snit::type dog {
    option -weight 10
    method gainWeight {} {
        set wt [$self cget -weight]
        incr wt
        $self configure -weight $wt
    }
}
::dog
% dog fido
::fido
% fido cget -weight
10
% fido gainWeight
% fido cget -weight
11
%
</pre>
<p>Alternatively, Snit provides a built-in array instance variable called
<b class="variable">options</b>.  The indices are the option names; the values are the
option values.  The method <b class="method">gainWeight</b> can thus be rewritten as
follows:</p>
<pre class="doctools_example">
    method gainWeight {} {
        incr options(-weight)
    }
</pre>
<p>As you can see, using the <b class="variable">options</b> variable involves considerably
less typing and is the usual way to do it.  But if you use
<b class="const">-configuremethod</b> or <b class="const">-cgetmethod</b> (described in the following
answers), you might wish to use the <b class="method">configure</b> and
<b class="method">cget</b> methods anyway, just so that any special processing you've
implemented is sure to get done.  Also, if the option is delegated to
a component then <b class="method">configure</b> and <b class="method">cget</b> are the only way
to access it without accessing the component directly.  See
<span class="sectref"><a href="#section16">DELEGATION</a></span> for more information.</p>
</div>
<div id="subsection55" class="doctools_subsection"><h3><a name="subsection55">How can I make an option read-only?</a></h3>
<p>Define the option with <b class="const">-readonly yes</b>.</p>
<p>Suppose you've got an option that determines how
instances of your type are constructed; it must be set at creation
time, after which it's constant.  For example, a dog never changes its
breed; it might or might not have had its shots, and if not can have
them at a later time.  <b class="const">-breed</b> should be read-only, but
<b class="const">-shots</b> should not be.</p>
<pre class="doctools_example">% snit::type dog {
    option -breed -default mongrel -readonly yes
    option -shots -default no
}
::dog
% dog fido -breed retriever
::fido
% fido configure -shots yes
% fido configure -breed terrier
option -breed can only be set at instance creation
%
</pre>
</div>
<div id="subsection56" class="doctools_subsection"><h3><a name="subsection56">How can I catch accesses to an option's value?</a></h3>
<p>Define a <b class="const">-cgetmethod</b> for the option.</p>
</div>
<div id="subsection57" class="doctools_subsection"><h3><a name="subsection57">What is a -cgetmethod?</a></h3>
<p>A <b class="const">-cgetmethod</b> is a method that's called whenever the related
option's value is queried via the
<b class="method">cget</b> instance method.  The handler can compute the option's
value, retrieve it from a database, or do anything else you'd like it to do.</p>
<p>Here's what the default behavior would look like if
written using a <b class="const">-cgetmethod</b>:</p>
<pre class="doctools_example">snit::type dog {
    option -color -default brown -cgetmethod GetOption
    method GetOption {option} {
        return $options($option)
    }
}
</pre>
<p>Any instance method can be used, provided that it takes one argument,
the name of the option whose value is to be retrieved.</p>
</div>
<div id="subsection58" class="doctools_subsection"><h3><a name="subsection58">How can I catch changes to an option's value?</a></h3>
<p>Define a <b class="const">-configuremethod</b> for the option.</p>
</div>
<div id="subsection59" class="doctools_subsection"><h3><a name="subsection59">What is a -configuremethod?</a></h3>
<p>A <b class="const">-configuremethod</b> is a method that's called whenever the
related option is given a new value via the <b class="method">configure</b> or
<b class="method">configurelist</b> instance methods. The method can
pass the value on to some other object, store it in a database, or do
anything else you'd like it to do.</p>
<p>Here's what the default configuration behavior would look like if
written using a <b class="const">-configuremethod</b>:</p>
<pre class="doctools_example">snit::type dog {
    option -color -default brown -configuremethod SetOption
    method SetOption {option value} {
        set options($option) $value
    }
}
</pre>
<p>Any instance method can be used, provided that it takes two arguments,
the name of the option and the new value.</p>
<p>Note that if your method doesn't store the value in the <b class="variable">options</b>
array, the <b class="variable">options</b> array won't get updated.</p>
</div>
<div id="subsection60" class="doctools_subsection"><h3><a name="subsection60">How can I validate an option's value?</a></h3>
<p>Define a <b class="const">-validatemethod</b>.</p>
</div>
<div id="subsection61" class="doctools_subsection"><h3><a name="subsection61">What is a -validatemethod?</a></h3>
<p>A <b class="const">-validatemethod</b> is a method that's called whenever the
related option is given a new value via the <b class="method">configure</b> or
<b class="method">configurelist</b> instance methods.  It's the method's
responsibility to determine whether the new value is valid, and throw
an error if it isn't.  The <b class="const">-validatemethod</b>, if any, is called
before the value is stored in the <b class="variable">options</b> array; in particular,
it's called before the <b class="const">-configuremethod</b>, if any.</p>
<p>For example, suppose an option always takes a Boolean value.  You can
ensure that the value is in fact a valid Boolean like this:</p>
<pre class="doctools_example">% snit::type dog {
    option -shots -default no -validatemethod BooleanOption
    method BooleanOption {option value} {
        if {![string is boolean -strict $value]} {
            error &quot;expected a boolean value, got \&quot;$value\&quot;&quot;
        }
    }
}
::dog
% dog fido
% fido configure -shots yes
% fido configure -shots NotABooleanValue
expected a boolean value, got &quot;NotABooleanValue&quot;
%
</pre>
<p>Note that the same <b class="const">-validatemethod</b> can be used to validate any number
of boolean options.</p>
<p>Any method can be a <b class="const">-validatemethod</b> provided that it takes
two arguments, the option name and the new option value.</p>
</div>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">TYPE VARIABLES</a></h2>
<div id="subsection62" class="doctools_subsection"><h3><a name="subsection62">What is a type variable?</a></h3>
<p>A type variable is a private variable associated with a Snit type
rather than with a particular instance of the type.  In C++ and Java,
the term <i class="term">static member variable</i> is used for the same notion.
Type variables can be scalars or arrays.</p>
</div>
<div id="subsection63" class="doctools_subsection"><h3><a name="subsection63">How is a scalar type variable defined?</a></h3>
<p>Scalar type variables are defined in the type definition using the
<b class="cmd">typevariable</b> statement.  You can simply name it, or you can
initialize it with a value:</p>
<pre class="doctools_example">
snit::type mytype {
    # Define variable &quot;greeting&quot; and initialize it with &quot;Howdy!&quot;
    typevariable greeting &quot;Howdy!&quot;
}
</pre>
<p>Every object of type <b class="cmd">mytype</b> now has access to a single variable
called <b class="variable">greeting</b>.</p>
</div>
<div id="subsection64" class="doctools_subsection"><h3><a name="subsection64">How is an array-valued type variable defined?</a></h3>
<p>Array-valued type variables are also defined using the
<b class="cmd">typevariable</b> command; to initialize them, include the
<b class="const">-array</b> option:</p>
<pre class="doctools_example">snit::type mytype {
    # Define typearray variable &quot;greetings&quot;
    typevariable greetings -array {
        formal &quot;Good Evening&quot;
        casual &quot;Howdy!&quot;
    }
}
</pre>
</div>
<div id="subsection65" class="doctools_subsection"><h3><a name="subsection65">What happens if I don't initialize a type variable?</a></h3>
<p>Variables do not really exist until they are given values.  If you
do not initialize a variable when you define it, then you must be
sure to assign a value to it (in the type constructor, say)
before you reference it.</p>
</div>
<div id="subsection66" class="doctools_subsection"><h3><a name="subsection66">Are there any limitations on type variable names?</a></h3>
<p>Type variable names have the same restrictions as
the names of <span class="sectref"><a href="#section6">INSTANCE VARIABLES</a></span> do.</p>
</div>
<div id="subsection67" class="doctools_subsection"><h3><a name="subsection67">Do I need to declare my type variables in my methods?</a></h3>
<p>No. Once you've defined a type variable in the type definition, it can
be used in <span class="sectref"><a href="#section5">INSTANCE METHODS</a></span> or <span class="sectref"><a href="#section9">TYPE METHODS</a></span> without
declaration.  This differs from normal Tcl practice, in which all
non-local variables in a proc need to be declared.</p>
<p>Type variables are subject to the same speed/readability tradeoffs
as instance variables; see
<span class="sectref"><a href="#subsection46">Do I need to declare my instance variables in my methods?</a></span></p>
</div>
<div id="subsection68" class="doctools_subsection"><h3><a name="subsection68">How do I pass a type variable's name to another object?</a></h3>
<p>In Tk, it's common to pass a widget a variable name; for example, Tk
label widgets have a <b class="option">-textvariable</b> option which names the
variable which will contain the widget's text.  This allows the
program to update the label's value just by assigning a new value to
the variable.</p>
<p>If you naively pass a type variable name to the label widget, you'll
be confused by the result; Tk will assume that the name names a global
variable.  Instead, you need to provide a fully-qualified variable
name.  From within an instance method or a constructor, you can fully
qualify the type variable's name using the <b class="cmd">mytypevar</b> command:</p>
<pre class="doctools_example">snit::widget mywidget {
    typevariable labeltext &quot;&quot;
    constructor {args} {
        # ...
        label $win.label -textvariable [mytypevar labeltext]
        # ...
    }
}
</pre>
</div>
<div id="subsection69" class="doctools_subsection"><h3><a name="subsection69">How do I make a type variable public?</a></h3>
<p>There are two ways to do this.  The preferred way is to write a pair
of <span class="sectref"><a href="#section9">TYPE METHODS</a></span> to set and query the type variable's value.</p>
<p>Type variables are stored in the type's namespace, which has
the same name as the type itself.  Thus, you can also
publicize the type variable's name in your
documentation so that clients can access it directly.  For example,</p>
<pre class="doctools_example">snit::type mytype {
    typevariable myvariable
}
set ::mytype::myvariable &quot;New Value&quot;
</pre>
</div>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">TYPE METHODS</a></h2>
<div id="subsection70" class="doctools_subsection"><h3><a name="subsection70">What is a type method?</a></h3>
<p>A type method is a procedure associated with the type itself rather
than with any specific instance of the type, and called as a
subcommand of the type command.</p>
</div>
<div id="subsection71" class="doctools_subsection"><h3><a name="subsection71">How do I define a type method?</a></h3>
<p>Type methods are defined in the type definition using the
<b class="cmd">typemethod</b> statement:</p>
<pre class="doctools_example">snit::type dog {
    # List of pedigreed dogs
    typevariable pedigreed
    typemethod pedigreedDogs {} {
        return $pedigreed
    }
}
</pre>
<p>Suppose the <b class="cmd">dog</b> type maintains a list of the names of the dogs
that have pedigrees.  The <b class="cmd">pedigreedDogs</b> type method returns this
list.</p>
<p>The <b class="cmd">typemethod</b> statement looks just like a normal Tcl
<b class="cmd"><a href="../../../../index.html#key592">proc</a></b>, except that it appears in a <b class="cmd">snit::type</b> definition.
Notice that every type method gets an implicit argument called
<b class="variable">type</b>, which contains the fully-qualified type name.</p>
</div>
<div id="subsection72" class="doctools_subsection"><h3><a name="subsection72">How does a client call a type method?</a></h3>
<p>The type method name becomes a subcommand of the type's command.  For
example, assuming that the constructor adds each pedigreed dog to the
list of <b class="variable">pedigreedDogs</b>,</p>
<pre class="doctools_example">snit::type dog {
    option -pedigreed 0
    # List of pedigreed dogs
    typevariable pedigreed
    typemethod pedigreedDogs {} {
        return $pedigreed
    }
    # ...
}
dog spot -pedigreed 1
dog fido
foreach dog [dog pedigreedDogs] { ... }
</pre>
</div>
<div id="subsection73" class="doctools_subsection"><h3><a name="subsection73">Are there any limitations on type method names?</a></h3>
<p>Not really, so long as you avoid the standard type method names:
<b class="method">create</b>, <b class="method">destroy</b>, and <b class="method">info</b>.</p>
</div>
<div id="subsection74" class="doctools_subsection"><h3><a name="subsection74">How do I make a type method private?</a></h3>
<p>It's sometimes useful to define private type methods, that is, type
methods intended to be called only by other type or instance methods
of the same object.</p>
<p>Snit doesn't implement any access control on type methods; by
convention, the names of public methods begin with a lower-case
letter, and the names of private methods begin with an upper-case
letter.</p>
<p>Alternatively, a Snit <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> can be used as a private type method; see
<span class="sectref"><a href="#section10">PROCS</a></span>.</p>
</div>
<div id="subsection75" class="doctools_subsection"><h3><a name="subsection75">Are there any limitations on type method arguments?</a></h3>
<p>Method argument lists are defined just like normal Tcl proc argument
lists; in particular, they can include arguments with default values
and the <b class="variable">args</b> argument.</p>
<p>However, every type method is called with an implicit argument called
<b class="variable">type</b> that contains the name of the type command.  In addition,
type methods should by convention avoid using the names of the
arguments implicitly defined for <span class="sectref"><a href="#section5">INSTANCE METHODS</a></span>.</p>
</div>
<div id="subsection76" class="doctools_subsection"><h3><a name="subsection76">How does an instance or type method call a type method?</a></h3>
<p>If an instance or type method needs to call a type method, it should
use <b class="variable">$type</b> to do so:</p>
<pre class="doctools_example">snit::type dog {
    typemethod pedigreedDogs {} { ... }
    typemethod printPedigrees {} {
        foreach obj [$type pedigreedDogs] { ... }
    }
}
</pre>
</div>
<div id="subsection77" class="doctools_subsection"><h3><a name="subsection77">How do I pass a type method as a callback?</a></h3>
<p>It's common in Tcl to pass a snippet of code to another object, for it
to call later.  Because types cannot be renamed, you can just
use the type name, or, if the callback is registered from within
a type method, <b class="variable">type</b>.  For example, suppose we want to print a
list of pedigreed dogs when a Tk button is pushed:</p>
<pre class="doctools_example">
button .btn -text &quot;Pedigrees&quot; -command [list dog printPedigrees]
pack .btn
</pre>
<p>Alternatively, from a method or type method you can use the
<b class="cmd">mytypemethod</b> command, just as you would use <b class="cmd">mymethod</b>
to define a callback command for <span class="sectref"><a href="#section5">INSTANCE METHODS</a></span>.</p>
</div>
<div id="subsection78" class="doctools_subsection"><h3><a name="subsection78">Can type methods be hierarchical?</a></h3>
<p>Yes, you can define hierarchical type methods in just the same way as
you can define hierarchical instance methods.  See
<span class="sectref"><a href="#section5">INSTANCE METHODS</a></span> for more.</p>
</div>
</div>
<div id="section10" class="doctools_section"><h2><a name="section10">PROCS</a></h2>
<div id="subsection79" class="doctools_subsection"><h3><a name="subsection79">What is a proc?</a></h3>
<p>A Snit <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> is really just a Tcl proc defined within the type's
namespace.  You can use procs for private code that isn't related to
any particular instance.</p>
</div>
<div id="subsection80" class="doctools_subsection"><h3><a name="subsection80">How do I define a proc?</a></h3>
<p>Procs are defined by including a <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> statement in the type
definition:</p>
<pre class="doctools_example">snit::type mytype {
    # Pops and returns the first item from the list stored in the
    # listvar, updating the listvar
   proc pop {listvar} { ... }
   # ...
}
</pre>
</div>
<div id="subsection81" class="doctools_subsection"><h3><a name="subsection81">Are there any limitations on proc names?</a></h3>
<p>Any name can be used, so long as it does not begin with <b class="const">Snit_</b>;
names beginning with <b class="const">Snit_</b> are reserved for Snit's own use.
However, the wise programmer will avoid <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> names (<b class="cmd"><a href="../../../../index.html#key301">set</a></b>,
<b class="cmd"><a href="../../../../index.html#key302">list</a></b>, <b class="cmd">if</b>, etc.) that would shadow standard Tcl
command names.</p>
<p><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> names, being private, should begin with a capital letter according
to convention; however, as there are typically no public <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>s
in the type's namespace it doesn't matter much either way.</p>
</div>
<div id="subsection82" class="doctools_subsection"><h3><a name="subsection82">How does a method call a proc?</a></h3>
<p>Just like it calls any Tcl command.  For example,</p>
<pre class="doctools_example">snit::type mytype {
    # Pops and returns the first item from the list stored in the
    # listvar, updating the listvar
    proc pop {listvar} { ... }
    variable requestQueue {}
    # Get one request from the queue and process it.
    method processRequest {} {
        set req [pop requestQueue]
    }
}
</pre>
</div>
<div id="subsection83" class="doctools_subsection"><h3><a name="subsection83">How can I pass a proc to another object as a callback?</a></h3>
<p>The <b class="cmd">myproc</b> command returns a callback command for the
<b class="cmd"><a href="../../../../index.html#key592">proc</a></b>, just as <b class="cmd">mymethod</b> does for a method.</p>
</div>
</div>
<div id="section11" class="doctools_section"><h2><a name="section11">TYPE CONSTRUCTORS</a></h2>
<div id="subsection84" class="doctools_subsection"><h3><a name="subsection84">What is a type constructor?</a></h3>
<p>A type constructor is a body of code that initializes the type as a
whole, rather like a C++ static initializer.  The body of a type
constructor is executed once when the type is defined, and never
again.</p>
<p>A type can have at most one type constructor.</p>
</div>
<div id="subsection85" class="doctools_subsection"><h3><a name="subsection85">How do I define a type constructor?</a></h3>
<p>A type constructor is defined by using the <b class="cmd">typeconstructor</b>
statement in the type definition.  For example, suppose the type uses
an array-valued type variable as a look-up table, and the values in
the array have to be computed at start-up.</p>
<pre class="doctools_example">% snit::type mytype {
    typevariable lookupTable
    typeconstructor {
        array set lookupTable {key value...}
    }
}
</pre>
</div>
</div>
<div id="section12" class="doctools_section"><h2><a name="section12">CONSTRUCTORS</a></h2>
<div id="subsection86" class="doctools_subsection"><h3><a name="subsection86">What is a constructor?</a></h3>
<p>In object-oriented programming, an object's constructor is responsible
for initializing the object completely at creation time. The constructor
receives the list of options passed to the <b class="cmd">snit::type</b> command's
<b class="method">create</b> method and can then do whatever it likes.  That might include
computing instance variable values, reading data from files, creating
other objects, updating type and instance variables, and so forth.</p>
<p>The constructor's return value is ignored (unless it's an
error, of course).</p>
</div>
<div id="subsection87" class="doctools_subsection"><h3><a name="subsection87">How do I define a constructor?</a></h3>
<p>A constructor is defined by using the <b class="cmd">constructor</b> statement in
the type definition.  Suppose that it's desired to keep a list of all
pedigreed dogs.  The list can be maintained in a
type variable and retrieved by a type method.  Whenever a dog is
created, it can add itself to the list--provided that it's registered
with the American Kennel Club.</p>
<pre class="doctools_example">% snit::type dog {
    option -akc 0
    typevariable akcList {}
    constructor {args} {
        $self configurelist $args
        if {$options(-akc)} {
            lappend akcList $self
        }
    }
    typemethod akclist {} {
        return $akcList
    }
}
::dog
% dog spot -akc 1
::spot
% dog fido
::fido
% dog akclist
::spot
%
</pre>
</div>
<div id="subsection88" class="doctools_subsection"><h3><a name="subsection88">What does the default constructor do?</a></h3>
<p>If you don't provide a constructor explicitly, you get the default
constructor, which is identical to the explicitly-defined
constructor shown here:</p>
<pre class="doctools_example">snit::type dog {
    constructor {args} {
        $self configurelist $args
    }
}
</pre>
<p>When the constructor is called, <b class="variable">args</b> will be set to the list of
arguments that follow the object's name.  The constructor is allowed
to interpret this list any way it chooses; the normal convention is
to assume that it's a list of option names and values, as shown in the
example above.  If you simply want to save the option values, you
should use the <b class="method">configurelist</b> method, as shown.</p>
</div>
<div id="subsection89" class="doctools_subsection"><h3><a name="subsection89">Can I choose a different set of arguments for the constructor?</a></h3>
<p>Yes, you can.  For example, suppose we wanted to be sure that the
breed was explicitly stated for every dog at creation time, and
couldn't be changed thereafter.  One way to do that is as follows:</p>
<pre class="doctools_example">% snit::type dog {
    variable breed
    option -color brown
    option -akc 0
    constructor {theBreed args} {
        set breed $theBreed
        $self configurelist $args
    }
    method breed {} { return $breed }
}
::dog
% dog spot dalmatian -color spotted -akc 1
::spot
% spot breed
dalmatian
</pre>
<p>The drawback is that this syntax is non-standard, and may
limit the compatibility of your new type with other people's code.
For example, Snit assumes that it can create
<span class="sectref"><a href="#section14">COMPONENTS</a></span> using the standard creation syntax.</p>
</div>
<div id="subsection90" class="doctools_subsection"><h3><a name="subsection90">Are there any limitations on constructor arguments?</a></h3>
<p>Constructor argument lists are subject to the same limitations
as those on instance method argument lists.  It has the
same implicit arguments, and can contain default values and the
<b class="variable">args</b> argument.</p>
</div>
<div id="subsection91" class="doctools_subsection"><h3><a name="subsection91">Is there anything special about writing the constructor?</a></h3>
<p>Yes.  Writing the constructor can be tricky if you're delegating
options to components, and there are specific issues relating to
<b class="cmd">snit::widget</b>s and <b class="cmd">snit::widgetadaptor</b>s.  See
<span class="sectref"><a href="#section16">DELEGATION</a></span>, <span class="sectref"><a href="#section17">WIDGETS</a></span>,
<span class="sectref"><a href="#section18">WIDGET ADAPTORS</a></span>, and <span class="sectref"><a href="#section19">THE TK OPTION DATABASE</a></span>.</p>
</div>
</div>
<div id="section13" class="doctools_section"><h2><a name="section13">DESTRUCTORS</a></h2>
<div id="subsection92" class="doctools_subsection"><h3><a name="subsection92">What is a destructor?</a></h3>
<p>A destructor is a special kind of method that's called when an object
is destroyed.  It's responsible for doing any necessary clean-up when
the object goes away: destroying <span class="sectref"><a href="#section14">COMPONENTS</a></span>, closing files,
and so forth.</p>
</div>
<div id="subsection93" class="doctools_subsection"><h3><a name="subsection93">How do I define a destructor?</a></h3>
<p>Destructors are defined by using the <b class="cmd">destructor</b> statement in the
type definition.</p>
<p>Suppose we're maintaining a list of pedigreed dogs;
then we'll want to remove dogs from it when they are destroyed.</p>
<pre class="doctools_example">snit::type dog {
    option -akc 0
    typevariable akcList {}
    constructor {args} {
        $self configurelist $args
        if {$options(-akc)} {
            lappend akcList $self
        }
    }
    destructor {
        set ndx [lsearch $akcList $self]
        if {$ndx != -1} {
            set akcList [lreplace $akcList $ndx $ndx]
        }
    }
    typemethod akclist {} {
        return $akcList
    }
}
</pre>
</div>
<div id="subsection94" class="doctools_subsection"><h3><a name="subsection94">Are there any limitations on destructor arguments?</a></h3>
<p>Yes; a destructor has no explicit arguments.</p>
</div>
<div id="subsection95" class="doctools_subsection"><h3><a name="subsection95">What implicit arguments are passed to the destructor?</a></h3>
<p>The destructor gets the same implicit arguments that are passed to
<span class="sectref"><a href="#section5">INSTANCE METHODS</a></span>: <b class="variable">type</b>, <b class="variable">selfns</b>, <b class="variable">win</b>, and
<b class="variable">self</b>.</p>
</div>
<div id="subsection96" class="doctools_subsection"><h3><a name="subsection96">Must components be destroyed explicitly?</a></h3>
<p>Yes and no.</p>
<p>Any Tk widgets created by a <b class="cmd">snit::widget</b> or
<b class="cmd">snit::widgetadaptor</b> will be destroyed automatically by Tk
when the megawidget is destroyed, in keeping with normal Tk behavior
(destroying a parent widget destroys the whole tree).</p>
<p>Components of normal <b class="cmd">snit::types</b>, on the other hand,
are never destroyed automatically, nor are non-widget components
of Snit megawidgets.  If your object creates them in its
constructor, then it should generally destroy them in its destructor.</p>
</div>
<div id="subsection97" class="doctools_subsection"><h3><a name="subsection97">Is there any special about writing a destructor?</a></h3>
<p>Yes.  If an object's constructor throws an error, the object's
destructor will be called to clean up; this means that the object
might not be completely constructed when the destructor is called.
This can cause the destructor to throw its own error; the result
is usually misleading, confusing, and unhelpful.  Consequently, it's
important to write your destructor so that it's fail-safe.</p>
<p>For example, a <b class="cmd">dog</b> might create a <b class="cmd">tail</b> component; the
component will need to be destroyed.  But suppose there's an error
while processing the creation options--the destructor will be called,
and there will be no <b class="cmd">tail</b> to destroy.  The simplest solution is
generally to catch and ignore any errors while destroying components.</p>
<pre class="doctools_example">snit::type dog {
    component tail
    constructor {args} {
        $self configurelist $args
        set tail [tail %AUTO%]
    }
    destructor {
        catch {$tail destroy}
    }
}
</pre>
</div>
</div>
<div id="section14" class="doctools_section"><h2><a name="section14">COMPONENTS</a></h2>
<div id="subsection98" class="doctools_subsection"><h3><a name="subsection98">What is a component?</a></h3>
<p>Often an object will create and manage a number of other objects.  A
Snit megawidget, for example, will often create a number of Tk
widgets.  These objects are part of the main object; it is composed
of them, so they are called components of the object.</p>
<p>But Snit also has a more precise meaning for
<span class="sectref"><a href="#section14">COMPONENT</a></span>.  The components of a Snit object are those
objects to which methods or options can be delegated.
(See <span class="sectref"><a href="#section16">DELEGATION</a></span> for more information about delegation.)</p>
</div>
<div id="subsection99" class="doctools_subsection"><h3><a name="subsection99">How do I declare a component?</a></h3>
<p>First, you must decide what role a component plays within your object,
and give the role a name.  Then, you declare the component using its
role name and the <b class="cmd">component</b> statement.  The <b class="cmd">component</b>
statement declares an <i class="term">instance variable</i> which is used to
store the component's command name when the component is created.</p>
<p>For example, suppose your <b class="cmd">dog</b> object
creates a <b class="cmd">tail</b> object (the better to wag with, no doubt):</p>
<pre class="doctools_example">snit::type dog {
    component mytail
    constructor {args} {
        # Create and save the component's command
        set mytail [tail %AUTO% -partof $self]
        $self configurelist $args
    }
    method wag {} {
        $mytail wag
    }
}
</pre>
<p>As shown here, it doesn't matter what the <b class="cmd">tail</b> object's real
name is; the <b class="cmd">dog</b> object refers to it by its component name.</p>
<p>The above example shows one way to delegate the <b class="method">wag</b> method to
the <b class="variable">mytail</b> component; see <span class="sectref"><a href="#section16">DELEGATION</a></span> for an easier way.</p>
</div>
<div id="subsection100" class="doctools_subsection"><h3><a name="subsection100">How is a component named?</a></h3>
<p>A component has two names.  The first name is that of the component
variable; this represents the role the component object plays within
the Snit object.  This is the component name proper, and is the name
used to refer to the component within Snit code.  The second name is
the name of the actual component object created by the Snit object's
constructor.  This second name is always a Tcl command name, and is
referred to as the component's object name.</p>
<p>In the example in the previous question, the component name is
<b class="const">mytail</b>; the <b class="const">mytail</b> component's object name is chosen
automatically by Snit since <b class="const">%AUTO%</b> was used when the component
object was created.</p>
</div>
<div id="subsection101" class="doctools_subsection"><h3><a name="subsection101">Are there any limitations on component names?</a></h3>
<p>Yes.  <b class="cmd">snit::widget</b> and <b class="cmd">snit::widgetadaptor</b> objects have a special
component called the <b class="variable">hull</b> component; thus, the name <b class="variable">hull</b>
should be used for no other purpose.</p>
<p>Otherwise, since component names are in fact instance variable names
they must follow the rules for <span class="sectref"><a href="#section6">INSTANCE VARIABLES</a></span>.</p>
</div>
<div id="subsection102" class="doctools_subsection"><h3><a name="subsection102">What is an owned component?</a></h3>
<p>An <i class="term">owned</i> component is a component whose object command's
lifetime is controlled by the <b class="cmd">snit::type</b> or <b class="cmd">snit::widget</b>.</p>
<p>As stated above, a component is an object to
which our object can delegate methods or options.  Under this
definition, our object will usually create its component objects,
but not necessarily.  Consider the following: a dog object has a tail
component; but tail knows that it's part of the dog:</p>
<pre class="doctools_example">snit::type dog {
    component mytail
    constructor {args} {
        set mytail [tail %AUTO% -partof $self]
        $self configurelist $args
    }
    destructor {
        catch {$mytail destroy}
    }
    delegate method wagtail to mytail as wag
    method bark {} {
        return &quot;$self barked.&quot;
    }
}
 snit::type tail {
     component mydog
     option -partof -readonly yes
     constructor {args} {
         $self configurelist $args
         set mydog $options(-partof)
     }
     method wag {} {
         return &quot;Wag, wag.&quot;
     }
     method pull {} {
         $mydog bark
     }
 }
</pre>
<p>Thus, if you ask a dog to wag its tail, it tells its tail to wag;
and if you pull the dog's tail, the tail tells the dog to bark.  In
this scenario, the tail is a component of the dog, and the dog is a
component of the tail, but the dog owns the tail and not the other way
around.</p>
</div>
<div id="subsection103" class="doctools_subsection"><h3><a name="subsection103">What does the install command do?</a></h3>
<p>The <b class="cmd">install</b> command creates an owned component using a specified
command, and assigns the result to the component's instance variable.
For example:</p>
<pre class="doctools_example">snit::type dog {
    component mytail
    constructor {args} {
        # set mytail [tail %AUTO% -partof $self]
        install mytail using tail %AUTO% -partof $self
        $self configurelist $args
    }
}
</pre>
<p>In a <b class="cmd">snit::type</b>'s code, the <b class="cmd">install</b>
command shown above is equivalent to the <b class="const">set mytail</b> command
that's commented out.  In a <b class="cmd">snit::widget</b>'s or
<b class="cmd">snit::widgetadaptor</b>'s, code, however, the
<b class="cmd">install</b> command also queries <span class="sectref"><a href="#section19">THE TK OPTION DATABASE</a></span>
and initializes the new component's options accordingly.  For consistency,
it's a good idea to get in the habit of using <b class="cmd">install</b> for all
owned components.</p>
</div>
<div id="subsection104" class="doctools_subsection"><h3><a name="subsection104">Must owned components be created in the constructor?</a></h3>
<p>No, not necessarily.  In fact, there's no reason why an
object can't destroy and recreate a component multiple times over
its own lifetime.</p>
</div>
<div id="subsection105" class="doctools_subsection"><h3><a name="subsection105">Are there any limitations on component object names?</a></h3>
<p>Yes.</p>
<p>Component objects which are Tk widgets or megawidgets must have valid
Tk window names.</p>
<p>Component objects which are not widgets or megawidgets must have
fully-qualified command names, i.e., names which include the full
namespace of the command.  Note that Snit always creates objects with
fully qualified names.</p>
<p>Next, the object names of components and owned by your object
must be unique.  This is no problem for widget components, since
widget names are always unique; but consider the following code:</p>
<pre class="doctools_example">snit::type tail { ... }
snit::type dog {
    delegate method wag to mytail
    constructor {} {
        install mytail using tail mytail
    }
}
</pre>
<p>This code uses the component name, <b class="const">mytail</b>, as the component object
name.  This is not good, and here's why: Snit instance code executes
in the Snit type's namespace.  In this case, the <b class="const">mytail</b> component is
created in the <b class="const">::dog::</b> namespace, and will thus have the name
<b class="cmd">::dog::mytail</b>.</p>
<p>Now, suppose you create two dogs.  Both dogs will attempt to
create a tail called <b class="cmd">::dog::mytail</b>.  The first will succeed,
and the second will fail, since Snit won't let you create an object if
its name is already a command.  Here are two ways to avoid this situation:</p>
<p>First, if the component type is a <b class="cmd">snit::type</b> you can
specify <b class="const">%AUTO%</b> as its name, and be guaranteed to get a unique name.
This is the safest thing to do:</p>
<pre class="doctools_example">
    install mytail using tail %AUTO%
</pre>
<p>If the component type isn't a <b class="cmd">snit::type</b> you can create
the component in the object's instance namespace:</p>
<pre class="doctools_example">
    install mytail using tail ${selfns}::mytail
</pre>
<p>Make sure you pick a unique name within the instance namespace.</p>
</div>
<div id="subsection106" class="doctools_subsection"><h3><a name="subsection106">Must I destroy the components I own?</a></h3>
<p>That depends.  When a parent widget is destroyed, all child widgets
are destroyed automatically. Thus, if your object is a <b class="cmd">snit::widget</b>
or <b class="cmd">snit::widgetadaptor</b> you don't need to destroy any components
that are widgets, because they will generally be children or
descendants of your megawidget.</p>
<p>If your object is an instance of <b class="cmd">snit::type</b>, though, none of its
owned components will be destroyed automatically, nor will be
non-widget components of a <b class="cmd">snit::widget</b> be destroyed
automatically.  All such owned components must be destroyed
explicitly, or they won't be destroyed at all.</p>
</div>
<div id="subsection107" class="doctools_subsection"><h3><a name="subsection107">Can I expose a component's object command as part of my interface?</a></h3>
<p>Yes, and there are two ways to do it.  The most appropriate way is
usually to use <span class="sectref"><a href="#section16">DELEGATION</a></span>.  Delegation allows you to pass
the options and methods you specify along to particular components.
This effectively hides the components from the users of your type, and
ensures good encapsulation.</p>
<p>However, there are times when it's appropriate, not to mention
simpler, just to make the entire component part of your type's public
interface.</p>
</div>
<div id="subsection108" class="doctools_subsection"><h3><a name="subsection108">How do I expose a component's object command?</a></h3>
<p>When you declare the component, specify the <b class="cmd">component</b>
statement's <b class="const">-public</b> option.  The value of this option is the
name of a method which will be delegated to your component's object
command.</p>
<p>For example, supposed you've written a combobox megawidget which owns
a listbox widget, and you want to make the listbox's entire interface
public.  You can do it like this:</p>
<pre class="doctools_example">snit::widget combobox {
     component listbox -public listbox
     constructor {args} {
         install listbox using listbox $win.listbox ....
     }
}
combobox .mycombo
.mycombo listbox configure -width 30
</pre>
<p>Your comobox widget, <b class="cmd">.mycombo</b>, now has a <b class="method">listbox</b> method
which has all of the same subcommands as the listbox widget itself.
Thus, the above code sets the listbox component's width to 30.</p>
<p>Usually you'll let the method name be the same as the component name;
however, you can name it anything you like.</p>
</div>
</div>
<div id="section15" class="doctools_section"><h2><a name="section15">TYPE COMPONENTS</a></h2>
<div id="subsection109" class="doctools_subsection"><h3><a name="subsection109">What is a type component?</a></h3>
<p>A type component is a component that belongs to the type itself
instead of to a particular instance of the type.  The relationship
between components and type components is the same as the
relationship between <span class="sectref"><a href="#section6">INSTANCE VARIABLES</a></span> and
<span class="sectref"><a href="#section8">TYPE VARIABLES</a></span>.  Both <span class="sectref"><a href="#section5">INSTANCE METHODS</a></span> and
<span class="sectref"><a href="#section9">TYPE METHODS</a></span> can be delegated to type components.</p>
<p>Once you understand <span class="sectref"><a href="#section14">COMPONENTS</a></span> and
<span class="sectref"><a href="#section16">DELEGATION</a></span>, type components are just more of the same.</p>
</div>
<div id="subsection110" class="doctools_subsection"><h3><a name="subsection110">How do I declare a type component?</a></h3>
<p>Declare a type component using the <b class="cmd">typecomponent</b> statement.  It
takes the same options (<b class="const">-inherit</b> and <b class="const">-public</b>) as the
<b class="cmd">component</b> statement does, and defines a type variable to hold
the type component's object command.</p>
<p>Suppose in your model you've got many dogs, but only one
veterinarian.  You might make the veterinarian a type component.</p>
<pre class="doctools_example">snit::type veterinarian { ... }
snit::type dog {
    typecomponent vet
    # ...
}
</pre>
</div>
<div id="subsection111" class="doctools_subsection"><h3><a name="subsection111">How do I install a type component?</a></h3>
<p>Just use the <b class="cmd"><a href="../../../../index.html#key301">set</a></b> command to assign the component's object
command to the type component.  Because types
(even <b class="cmd">snit::widget</b> types) are not widgets, and do not have
options anyway, the extra features of the <b class="cmd">install</b> command are
not needed.</p>
<p>You'll usually install type components in the type constructor, as
shown here:</p>
<pre class="doctools_example">snit::type veterinarian { ... }
snit::type dog {
    typecomponent vet
    typeconstructor {
        set vet [veterinarian %AUTO%]
    }
}
</pre>
</div>
<div id="subsection112" class="doctools_subsection"><h3><a name="subsection112">Are there any limitations on type component names?</a></h3>
<p>Yes, the same as on <span class="sectref"><a href="#section6">INSTANCE VARIABLES</a></span>,
<span class="sectref"><a href="#section8">TYPE VARIABLES</a></span>, and normal <span class="sectref"><a href="#section14">COMPONENTS</a></span>.</p>
</div>
</div>
<div id="section16" class="doctools_section"><h2><a name="section16">DELEGATION</a></h2>
<div id="subsection113" class="doctools_subsection"><h3><a name="subsection113">What is delegation?</a></h3>
<p>Delegation, simply put, is when you pass a task you've been given to
one of your assistants.  (You do have assistants, don't you?)  Snit
objects can do the same thing.  The following example shows one way in
which the <b class="cmd">dog</b> object can delegate its <b class="cmd">wag</b> method and its
<b class="option">-taillength</b> option to its <b class="cmd">tail</b> component.</p>
<pre class="doctools_example">snit::type dog {
    variable mytail
    option -taillength -configuremethod SetTailOption -cgetmethod GetTailOption
    method SetTailOption {option value} {
         $mytail configure $option $value
    }
    method GetTailOption {option} {
         $mytail cget $option
    }
    method wag {} {
        $mytail wag
    }
    constructor {args} {
        install mytail using tail %AUTO% -partof $self
        $self configurelist $args
    }
}
</pre>
<p>This is the hard way to do it, by it demonstrates what delegation is
all about.  See the following answers for the easy way to do it.</p>
<p>Note that the constructor calls the <b class="method">configurelist</b> method
<b class="cmd"><a href="../../../../index.html#key414">after</a></b> it creates its <b class="cmd">tail</b>; otherwise,
if <b class="option">-taillength</b> appeared in the list of <b class="variable">args</b> we'd get an
error.</p>
</div>
<div id="subsection114" class="doctools_subsection"><h3><a name="subsection114">How can I delegate a method to a component object?</a></h3>
<p>Delegation occurs frequently enough that Snit makes it easy. Any
method can be delegated to any component or type component
by placing a single <b class="cmd">delegate</b> statement in the type definition.
(See <span class="sectref"><a href="#section14">COMPONENTS</a></span> and <span class="sectref"><a href="#section15">TYPE COMPONENTS</a></span>
for more information about component names.)</p>
<p>For example, here's a much better way to delegate the <b class="cmd">dog</b>
object's <b class="cmd">wag</b> method:</p>
<pre class="doctools_example">% snit::type dog {
    delegate method wag to mytail
    constructor {} {
        install mytail using tail %AUTO%
    }
}
::dog
% snit::type tail {
    method wag {} { return &quot;Wag, wag, wag.&quot;}
}
::tail
% dog spot
::spot
% spot wag
Wag, wag, wag.
</pre>
<p>This code has the same effect as the code shown under the previous
question: when a <b class="cmd">dog</b>'s <b class="cmd">wag</b> method is called, the call and
its arguments are passed along automatically to the <b class="cmd">tail</b> object.</p>
<p>Note that when a component is mentioned in a <b class="cmd">delegate</b> statement,
the component's instance variable is defined implicitly.  However,
it's still good practice to declare it explicitly using the
<b class="cmd">component</b> statement.</p>
<p>Note also that you can define a method name using the <b class="cmd"><a href="../../../../index.html#key372">method</a></b>
statement, or you can define it using <b class="cmd">delegate</b>; you can't do
both.</p>
</div>
<div id="subsection115" class="doctools_subsection"><h3><a name="subsection115">Can I delegate to a method with a different name?</a></h3>
<p>Suppose you wanted to delegate the <b class="cmd">dog</b>'s <b class="method">wagtail</b> method to
the <b class="cmd">tail</b>'s <b class="method">wag</b> method.  After all you wag the tail, not
the dog.  It's easily done:</p>
<pre class="doctools_example">snit::type dog {
    delegate method wagtail to mytail as wag
    constructor {args} {
        install mytail using tail %AUTO% -partof $self
        $self configurelist $args
    }
}
</pre>
</div>
<div id="subsection116" class="doctools_subsection"><h3><a name="subsection116">Can I delegate to a method with additional arguments?</a></h3>
<p>Suppose the <b class="cmd">tail</b>'s <b class="method">wag</b> method takes as an argument the
number of times the tail should be wagged.  You want to delegate the
<b class="cmd">dog</b>'s <b class="method">wagtail</b> method to the <b class="cmd">tail</b>'s <b class="method">wag</b>
method, specifying that the tail should be wagged exactly three times.
This is easily done, too:</p>
<pre class="doctools_example">snit::type dog {
    delegate method wagtail to mytail as {wag 3}
    # ...
}
snit::type tail {
    method wag {count} {
        return [string repeat &quot;Wag &quot; $count]
    }
    # ...
}
</pre>
</div>
<div id="subsection117" class="doctools_subsection"><h3><a name="subsection117">Can I delegate a method to something other than an object?</a></h3>
<p>Normal method delegation assumes that you're delegating a method (a
subcommand of an object command) to a method of another object (a
subcommand of a different object command).  But not all Tcl objects
follow Tk conventions, and not everything you'd to which you'd like
to delegate a method is necessary an object.  Consequently, Snit makes
it easy to delegate a method to pretty much anything you like using
the <b class="cmd">delegate</b> statement's <b class="const">using</b> clause.</p>
<p>Suppose your dog simulation stores dogs in a database, each dog as a
single record.  The database API you're using provides a number of
commands to manage records; each takes the record ID (a string you
choose) as its first argument.  For example, <b class="cmd">saverec</b>
saves a record.  If you let the record ID be the name of the dog
object, you can delegate the dog's <b class="method">save</b> method to the
<b class="cmd">saverec</b> command as follows:</p>
<pre class="doctools_example">snit::type dog {
    delegate method save using {saverec %s}
}
</pre>
<p>The <b class="const">%s</b> is replaced with the instance name when the
<b class="method">save</b> method is called; any additional arguments are the
appended to the resulting command.</p>
<p>The <b class="const">using</b> clause understands a number of other %-conversions;
in addition to the instance name, you can substitute in the method
name (<b class="const">%m</b>), the type name (<b class="const">%t</b>), the instance
namespace (<b class="const">%n</b>), the Tk window name (<b class="const">%w</b>), and,
if a component or typecomponent name was given in the
<b class="cmd">delegate</b> statement, the component's object command
(<b class="const">%c</b>).</p>
</div>
<div id="subsection118" class="doctools_subsection"><h3><a name="subsection118">How can I delegate a method to a type component object?</a></h3>
<p>Just exactly as you would to a component object.  The
<b class="cmd">delegate method</b> statement accepts both component and type
component names in its <b class="const">to</b> clause.</p>
</div>
<div id="subsection119" class="doctools_subsection"><h3><a name="subsection119">How can I delegate a type method to a type component object?</a></h3>
<p>Use the <b class="cmd">delegate typemethod</b> statement.  It works like
<b class="cmd">delegate method</b>, with these differences: first, it defines
a type method instead of an instance method; second, the
<b class="const">using</b> clause ignores the <b class="const">%s</b>, <b class="const">%n</b>,
and <b class="const">%w</b> %-conversions.</p>
<p>Naturally, you can't delegate a type method to an instance
component...Snit wouldn't know which instance should receive it.</p>
</div>
<div id="subsection120" class="doctools_subsection"><h3><a name="subsection120">How can I delegate an option to a component object?</a></h3>
<p>The first question in this section (see <span class="sectref"><a href="#section16">DELEGATION</a></span>) shows
one way to delegate an option to a component; but this pattern occurs
often enough that Snit makes it easy.  For example, every <b class="cmd">tail</b>
object has a <b class="option">-length</b> option; we want to allow the creator of
a <b class="cmd">dog</b> object to set the tail's length.  We can do this:</p>
<pre class="doctools_example">% snit::type dog {
    delegate option -length to mytail
    constructor {args} {
        install mytail using tail %AUTO% -partof $self
        $self configurelist $args
    }
}
::dog
% snit::type tail {
    option -partof
    option -length 5
}
::tail
% dog spot -length 7
::spot
% spot cget -length
7
</pre>
<p>This produces nearly the same result as the <b class="const">-configuremethod</b> and
<b class="const">-cgetmethod</b> shown under the first question in this
section: whenever a <b class="cmd">dog</b> object's <b class="option">-length</b> option is set
or retrieved, the underlying <b class="cmd">tail</b> object's option is set or
retrieved in turn.</p>
<p>Note that you can define an option name using the <b class="cmd">option</b>
statement, or you can define it using <b class="cmd">delegate</b>; you can't do
both.</p>
</div>
<div id="subsection121" class="doctools_subsection"><h3><a name="subsection121">Can I delegate to an option with a different name?</a></h3>
<p>In the previous answer we delegated the <b class="cmd">dog</b>'s <b class="option">-length</b>
option down to its <b class="cmd">tail</b>.  This is, of course, wrong.  The dog
has a length, and the tail has a length, and they are different.  What
we'd really like to do is give the <b class="cmd">dog</b> a <b class="option">-taillength</b>
option, but delegate it to the <b class="cmd">tail</b>'s <b class="option">-length</b> option:</p>
<pre class="doctools_example">snit::type dog {
    delegate option -taillength to mytail as -length
    constructor {args} {
        set mytail [tail %AUTO% -partof $self]
        $self configurelist $args
    }
}
</pre>
</div>
<div id="subsection122" class="doctools_subsection"><h3><a name="subsection122">How can I delegate any unrecognized method or option to a component object?</a></h3>
<p>It may happen that a Snit object gets most of its behavior from one of
its components.  This often happens with <b class="cmd">snit::widgetadaptors</b>,
for example, where we wish to slightly the modify the behavior of an
existing widget.  To carry on with our <b class="cmd">dog</b> example, however, suppose
that we have a <b class="cmd">snit::type</b> called <b class="cmd">animal</b> that implements a
variety of animal behaviors--moving, eating, sleeping, and so forth.
We want our <b class="cmd">dog</b> objects to inherit these same behaviors, while
adding dog-like behaviors of its own.
Here's how we can give a <b class="cmd">dog</b> methods and options of its own
while delegating all other methods and options to its <b class="cmd">animal</b>
component:</p>
<pre class="doctools_example">snit::type dog {
    delegate option * to animal
    delegate method * to animal
    option -akc 0
    constructor {args} {
        install animal using animal %AUTO% -name $self
        $self configurelist $args
    }
    method wag {} {
        return &quot;$self wags its tail&quot;
    }
}
</pre>
<p>That's it.  A <b class="cmd">dog</b> is now an <b class="cmd">animal</b> that has a
<b class="option">-akc</b> option and can <b class="cmd">wag</b> its tail.</p>
<p>Note that we don't need to specify the full list of method names or
option names that <b class="cmd">animal</b> will receive.
It gets anything <b class="cmd">dog</b> doesn't recognize--and if it doesn't
recognize it either, it will simply throw an error, just as it should.</p>
<p>You can also delegate all unknown type methods to a type component
using <b class="cmd">delegate typemethod *</b>.</p>
</div>
<div id="subsection123" class="doctools_subsection"><h3><a name="subsection123">How can I delegate all but certain methods or options to a component?</a></h3>
<p>In the previous answer, we said that every <b class="cmd">dog</b> is
an <b class="cmd">animal</b> by delegating all unknown methods and options to the
<b class="variable">animal</b> component. But what if the <b class="cmd">animal</b> type has some
methods or options that we'd like to suppress?</p>
<p>One solution is to explicitly delegate all the options and methods,
and forgo the convenience of <b class="cmd">delegate method *</b> and
<b class="cmd">delegate option *</b>.  But if we wish to suppress only a few
options or methods, there's an easier way:</p>
<pre class="doctools_example">snit::type dog {
    delegate option * to animal except -numlegs
    delegate method * to animal except {fly climb}
    # ...
    constructor {args} {
        install animal using animal %AUTO% -name $self -numlegs 4
        $self configurelist $args
    }
    # ...
}
</pre>
<p>Dogs have four legs, so we specify that explicitly when we create the
<b class="variable">animal</b> component, and explicitly exclude <b class="option">-numlegs</b> from the
set of delegated options.  Similarly, dogs can neither
<b class="method">fly</b> nor <b class="method">climb</b>,
so we exclude those <b class="cmd">animal</b> methods as shown.</p>
</div>
<div id="subsection124" class="doctools_subsection"><h3><a name="subsection124">Can a hierarchical method be delegated?</a></h3>
<p>Yes; just specify multiple words in the delegated method's name:</p>
<pre class="doctools_example">snit::type tail {
    method wag {} {return &quot;Wag, wag&quot;}
    method droop {} {return &quot;Droop, droop&quot;}
}
snit::type dog {
    delegate method {tail wag} to mytail
    delegate method {tail droop} to mytail
    # ...
    constructor {args} {
        install mytail using tail %AUTO%
        $self configurelist $args
    }
    # ...
}
</pre>
<p>Unrecognized hierarchical methods can also be delegated; the following
code delegates all subcommands of the &quot;tail&quot; method to the &quot;mytail&quot;
component:</p>
<pre class="doctools_example">snit::type dog {
    delegate method {tail *} to mytail
    # ...
}
</pre>
</div>
</div>
<div id="section17" class="doctools_section"><h2><a name="section17">WIDGETS</a></h2>
<div id="subsection125" class="doctools_subsection"><h3><a name="subsection125">What is a snit::widget?</a></h3>
<p>A <b class="cmd">snit::widget</b> is the Snit version of what Tcl programmers
usually call a <i class="term">megawidget</i>: a widget-like object usually
consisting of one or more Tk widgets all contained within a Tk frame.</p>
<p>A <b class="cmd">snit::widget</b> is also a special kind of <b class="cmd">snit::type</b>.  Just
about everything in this FAQ list that relates to <b class="cmd">snit::types</b>
also applies to <b class="cmd">snit::widgets</b>.</p>
</div>
<div id="subsection126" class="doctools_subsection"><h3><a name="subsection126">How do I define a snit::widget?</a></h3>
<p><b class="cmd">snit::widgets</b> are defined using the <b class="cmd">snit::widget</b> command,
just as <b class="cmd">snit::types</b> are defined by the <b class="cmd">snit::type</b> command.</p>
<p>The body of the definition can contain all of the same kinds of
statements, plus a couple of others which will be mentioned below.</p>
</div>
<div id="subsection127" class="doctools_subsection"><h3><a name="subsection127">How do snit::widgets differ from snit::types?</a></h3>
<ul class="doctools_itemized">
<li><p>The name of an instance of a <b class="cmd">snit::type</b> can be any valid Tcl
command name, in any namespace.
The name of an instance of a <b class="cmd">snit::widget</b> must be a valid Tk
widget name, and its parent widget must already exist.</p></li>
<li><p>An instance of a <b class="cmd">snit::type</b> can be destroyed by calling
its <b class="cmd">destroy</b> method.  Instances of a <b class="cmd">snit::widget</b> have no
destroy method; use the Tk <b class="cmd">destroy</b> command instead.</p></li>
<li><p>Every instance of a <b class="cmd">snit::widget</b> has one predefined component
called its <b class="variable">hull</b> component.
The hull is usually a Tk <b class="cmd"><a href="../../../../index.html#key674">frame</a></b> or <b class="cmd">toplevel</b> widget; any other
widgets created as part of the <b class="cmd">snit::widget</b> will usually be
contained within the hull.</p></li>
<li><p><b class="cmd">snit::widget</b>s can have their options receive default values from
<span class="sectref"><a href="#section19">THE TK OPTION DATABASE</a></span>.</p></li>
</ul>
</div>
<div id="subsection128" class="doctools_subsection"><h3><a name="subsection128">What is a hull component?</a></h3>
<p>Snit can't create a Tk widget object; only Tk can do that.
Thus, every instance of a <b class="cmd">snit::widget</b> must be wrapped around a
genuine Tk widget; this Tk widget is called the <i class="term">hull component</i>.
Snit effectively piggybacks the behavior you define (methods, options,
and so forth) on top of the hull component so that the whole thing
behaves like a standard Tk widget.</p>
<p>For <b class="cmd">snit::widget</b>s the hull component must be a Tk widget that
defines the <b class="const">-class</b> option.</p>
<p><b class="cmd">snit::widgetadaptor</b>s differ from <b class="cmd">snit::widget</b>s chiefly in
that any kind of widget can be used as the hull component; see
<span class="sectref"><a href="#section18">WIDGET ADAPTORS</a></span>.</p>
</div>
<div id="subsection129" class="doctools_subsection"><h3><a name="subsection129">How can I set the hull type for a snit::widget?</a></h3>
<p>A <b class="cmd">snit::widget</b>'s hull component will usually be a Tk <b class="cmd"><a href="../../../../index.html#key674">frame</a></b>
widget; however, it may be any Tk widget that defines the
<b class="const">-class</b> option.  You can
explicitly choose the hull type you prefer by including the <b class="cmd">hulltype</b>
command in the widget definition:</p>
<pre class="doctools_example">snit::widget mytoplevel {
    hulltype toplevel
    # ...
}
</pre>
<p>If no <b class="cmd">hulltype</b> command appears, the hull will be a <b class="cmd"><a href="../../../../index.html#key674">frame</a></b>.</p>
<p>By default, Snit recognizes the following hull types: the Tk widgets
<b class="cmd"><a href="../../../../index.html#key674">frame</a></b>, <b class="cmd">labelframe</b>, <b class="cmd">toplevel</b>, and the Tile widgets
<b class="cmd">ttk::frame</b>, <b class="cmd">ttk::labelframe</b>, and <b class="cmd">ttk::toplevel</b>.  To
enable the use of some other kind of widget as the hull type, you can
<b class="cmd">lappend</b> the widget command to the variable <b class="variable">snit::hulltypes</b> (always
provided the widget defines the <b class="const">-class</b> option.  For example,
suppose Tk gets a new widget type called a <b class="cmd">prettyframe</b>:</p>
<pre class="doctools_example">lappend snit::hulltypes prettyframe
snit::widget mywidget {
    hulltype prettyframe
    # ...
}
</pre>
</div>
<div id="subsection130" class="doctools_subsection"><h3><a name="subsection130">How should I name widgets which are components of a snit::widget?</a></h3>
<p>Every widget, whether a genuine Tk widget or a Snit megawidget, has to
have a valid Tk window name.  When a <b class="cmd">snit::widget</b> is first
created, its instance name, <b class="variable">self</b>, is a Tk window name;
however, if the <b class="cmd">snit::widget</b> is used as the hull component by a
<b class="cmd">snit::widgetadaptor</b> its instance name will be changed to
something else.  For this reason, every <b class="cmd">snit::widget</b> method,
constructor, destructor, and so forth is passed another implicit
argument, <b class="variable">win</b>, which is the window name of the megawidget.  Any
children should be named using <b class="variable">win</b> as the root.</p>
<p>Thus, suppose you're writing a toolbar widget, a frame consisting of a
number of buttons placed side-by-side.  It might look something like
this:</p>
<pre class="doctools_example">snit::widget toolbar {
    delegate option * to hull
    constructor {args} {
        button $win.open -text Open -command [mymethod open]
        button $win.save -text Save -command [mymethod save]
        # ....
        $self configurelist $args
    }
}
</pre>
<p>See also the question on renaming objects, toward the top of this
file.</p>
</div>
</div>
<div id="section18" class="doctools_section"><h2><a name="section18">WIDGET ADAPTORS</a></h2>
<div id="subsection131" class="doctools_subsection"><h3><a name="subsection131">What is a snit::widgetadaptor?</a></h3>
<p>A <b class="cmd">snit::widgetadaptor</b> is a kind of <b class="cmd">snit::widget</b>.  Whereas
a <b class="cmd">snit::widget</b>'s hull is automatically created and is always a
Tk frame, a <b class="cmd">snit::widgetadaptor</b> can be based on any Tk
widget--or on any Snit megawidget, or even (with luck) on megawidgets
defined using some other package.</p>
<p>It's called a <i class="term">widget adaptor</i> because it allows you to take an
existing widget and customize its behavior.</p>
</div>
<div id="subsection132" class="doctools_subsection"><h3><a name="subsection132">How do I define a snit::widgetadaptor?</a></h3>
<p>Use the <b class="cmd">snit::widgetadaptor</b> command.  The definition for a
<b class="cmd">snit::widgetadaptor</b> looks just like that for a <b class="cmd">snit::type</b>
or <b class="cmd">snit::widget</b>, except that the constructor must create and
install the hull component.</p>
<p>For example, the following code creates a read-only text widget by the
simple device of turning its <b class="method">insert</b> and <b class="method">delete</b>
methods into no-ops.  Then, we define new methods, <b class="method">ins</b> and
<b class="method">del</b>,
which get delegated to the hull component as <b class="method">insert</b> and
<b class="method">delete</b>.  Thus, we've adapted the text widget and given it new
behavior while still leaving it fundamentally a text widget.</p>
<pre class="doctools_example">::snit::widgetadaptor rotext {
    constructor {args} {
        # Create the text widget; turn off its insert cursor
        installhull using text -insertwidth 0
        # Apply any options passed at creation time.
        $self configurelist $args
    }
    # Disable the text widget's insert and delete methods, to
    # make this readonly.
    method insert {args} {}
    method delete {args} {}
    # Enable ins and del as synonyms, so the program can insert and
    # delete.
    delegate method ins to hull as insert
    delegate method del to hull as delete
    # Pass all other methods and options to the real text widget, so
    # that the remaining behavior is as expected.
    delegate method * to hull
    delegate option * to hull
}
</pre>
<p>The most important part is in the constructor.
Whereas <b class="cmd">snit::widget</b> creates the hull for you,
<b class="cmd">snit::widgetadaptor</b> cannot -- it doesn't know what kind of
widget you want.  So the first thing the constructor does is create
the hull component (a Tk text widget in this case), and then installs
it using the <b class="cmd">installhull</b> command.</p>
<p><em>Note:</em> There is no instance command until you create one by
installing a hull component.  Any attempt to pass methods to <b class="variable">$self</b>
prior to calling <b class="cmd">installhull</b> will fail.</p>
</div>
<div id="subsection133" class="doctools_subsection"><h3><a name="subsection133">Can I adapt a widget created elsewhere in the program?</a></h3>
<p>Yes.</p>
<p>At times, it can be convenient to adapt a pre-existing widget instead
of creating your own.
For example, the Bwidget <b class="cmd">PagesManager</b> widget manages a
set of <b class="cmd"><a href="../../../../index.html#key674">frame</a></b> widgets, only one of which is visible at a time.
The application chooses which <b class="cmd"><a href="../../../../index.html#key674">frame</a></b> is visible.  All of the
These <b class="cmd"><a href="../../../../index.html#key674">frame</a></b>s are created by the <b class="cmd">PagesManager</b> itself, using
its <b class="method">add</b> method.  It's convenient to adapt these frames to
do what we'd like them to do.</p>
<p>In a case like this, the Tk widget will already exist when the
<b class="cmd">snit::widgetadaptor</b> is created.  Snit provides an alternate form
of the <b class="cmd">installhull</b> command for this purpose:</p>
<pre class="doctools_example">snit::widgetadaptor pageadaptor {
    constructor {args} {
        # The widget already exists; just install it.
        installhull $win
        # ...
    }
}
</pre>
</div>
<div id="subsection134" class="doctools_subsection"><h3><a name="subsection134">Can I adapt another megawidget?</a></h3>
<p>Maybe. If the other megawidget is a <b class="cmd">snit::widget</b> or
<b class="cmd">snit::widgetadaptor</b>, then yes.  If it isn't then, again, maybe.
You'll have to try it and see.  You're most likely to have trouble
with widget destruction--you have to make sure that your
megawidget code receives the <b class="const">&lt;Destroy&gt;</b> event before the
megawidget you're adapting does.</p>
</div>
</div>
<div id="section19" class="doctools_section"><h2><a name="section19">THE TK OPTION DATABASE</a></h2>
<div id="subsection135" class="doctools_subsection"><h3><a name="subsection135">What is the Tk option database?</a></h3>
<p>The Tk option database is a database of default option values
maintained by Tk itself; every Tk application has one.  The concept of
the option database derives from something called the X Windows
resource database; however, the option database is available in every
Tk implementation, including those which do not use the X Windows
system (e.g., Microsoft Windows).</p>
<p>Full details about the Tk option database are beyond the scope of this
document; both <em>Practical Programming in Tcl and Tk</em> by Welch,
Jones, and Hobbs, and <em>Effective Tcl/Tk Programming</em> by
Harrison and McClennan., have good introductions to it.</p>
<p>Snit is implemented so that most of the time it will simply do the
right thing with respect to the option database, provided that the
widget developer does the right thing by Snit.  The body of this
section goes into great deal about what Snit requires.  The following
is a brief statement of the requirements, for reference.</p>
<ul class="doctools_itemized">
<li><p>If the widget's default widget class is not what is desired, set it
explicitly using the <b class="cmd">widgetclass</b> statement in the widget
definition.</p></li>
<li><p>When defining or delegating options, specify the resource and class
names explicitly when necessary.</p></li>
<li><p>Use the <b class="cmd">installhull using</b> command to create and install the
hull for <b class="cmd">snit::widgetadaptor</b>s.</p></li>
<li><p>Use the <b class="cmd">install</b> command to create and install all
components which are widgets.</p></li>
<li><p>Use the <b class="cmd">install</b> command to create and install
components which aren't widgets if you'd like them to
receive option values from the option database.</p></li>
</ul>
<p>The interaction of Tk widgets with the option database is a complex
thing; the interaction of Snit with the option database is even more
so, and repays attention to detail.</p>
</div>
<div id="subsection136" class="doctools_subsection"><h3><a name="subsection136">Do snit::types use the Tk option database?</a></h3>
<p>No, they don't; querying the option database requires a Tk window
name, and <b class="cmd">snit::type</b>s don't have one.</p>
<p>If you create an instance of a <b class="cmd">snit::type</b> as a
component of a <b class="cmd">snit::widget</b> or <b class="cmd">snit::widgetadaptor</b>, on the
other hand, and if any options are delegated to the component,
and if you use <b class="cmd">install</b> to create and install it, then
the megawidget will query the option database on the
<b class="cmd">snit::type</b>'s behalf.  This might or might not be what you
want, so take care.</p>
</div>
<div id="subsection137" class="doctools_subsection"><h3><a name="subsection137">What is my snit::widget's widget class?</a></h3>
<p>Every Tk widget has a &quot;widget class&quot;: a name that is used when adding
option settings to the database.  For Tk widgets, the widget class is
the same as the widget command name with an initial capital.  For
example, the widget class of the Tk <b class="cmd">button</b> widget is
<b class="const">Button</b>.</p>
<p>Similarly, the widget class of a <b class="cmd">snit::widget</b> defaults to the
unqualified type name with the first letter capitalized.  For example,
the widget class of</p>
<pre class="doctools_example">snit::widget ::mylibrary::scrolledText { ... }
</pre>
<p>is <b class="const">ScrolledText</b>.</p>
<p>The widget class can also be set explicitly using the
<b class="cmd">widgetclass</b> statement within the <b class="cmd">snit::widget</b> definition:</p>
<pre class="doctools_example">snit::widget ::mylibrary::scrolledText {
    widgetclass Text
    # ...
}
</pre>
<p>The above definition says that a <b class="cmd">scrolledText</b> megawidget has the
same widget class as an ordinary <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget.  This might or
might not be a good idea, depending on how the rest of the megawidget
is defined, and how its options are delegated.</p>
</div>
<div id="subsection138" class="doctools_subsection"><h3><a name="subsection138">What is my snit::widgetadaptor's widget class?</a></h3>
<p>The widget class of a <b class="cmd">snit::widgetadaptor</b> is just the widget
class of its hull widget; Snit has no control over this.</p>
<p>Note that the widget class can be changed only for <b class="cmd"><a href="../../../../index.html#key674">frame</a></b> and
<b class="cmd">toplevel</b> widgets, which is why these are the valid hull types
for <b class="cmd">snit::widget</b>s.</p>
<p>Try to use <b class="cmd">snit::widgetadaptor</b>s only to make small modifications
to another widget's behavior.  Then, it will usually not make sense to
change the widget's widget class anyway.</p>
</div>
<div id="subsection139" class="doctools_subsection"><h3><a name="subsection139">What are option resource and class names?</a></h3>
<p>Every Tk widget option has three names: the option name, the resource
name, and the class name.
The option name begins with a hyphen and is all lowercase; it's used
when creating widgets, and with the <b class="cmd">configure</b> and <b class="cmd">cget</b>
commands.</p>
<p>The resource and class names are used to initialize option
default values by querying the option database.
The resource name is usually just the option
name minus the hyphen, but may contain uppercase letters at word
boundaries; the class name is usually just the resource
name with an initial capital, but not always.  For example, here are
the option, resource, and class names for several Tk <b class="cmd"><a href="../../../../index.html#key248">text</a></b>
widget options:</p>
<pre class="doctools_example">    -background         background         Background
    -borderwidth        borderWidth        BorderWidth
    -insertborderwidth  insertBorderWidth  BorderWidth
    -padx               padX               Pad
</pre>
<p>As is easily seen, sometimes the resource and class names can be
inferred from the option name, but not always.</p>
</div>
<div id="subsection140" class="doctools_subsection"><h3><a name="subsection140">What are the resource and class names for my megawidget's options?</a></h3>
<p>For options implicitly delegated to a component using
<b class="cmd">delegate option *</b>, the resource and class names will be
exactly those defined by the component.  The <b class="cmd">configure</b> method
returns these names, along with the option's default and current
values:</p>
<pre class="doctools_example">% snit::widget mytext {
    delegate option * to text
    constructor {args} {
        install text using text .text
        # ...
    }
    # ...
}
::mytext
% mytext .text
.text
% .text configure -padx
-padx padX Pad 1 1
%
</pre>
<p>For all other options (whether locally defined or explicitly
delegated), the resource and class names can be defined explicitly, or
they can be allowed to have default values.</p>
<p>By default, the resource name is just the option name minus the
hyphen; the the class name is just the option name with an initial
capital letter.  For example, suppose we explicitly delegate &quot;-padx&quot;:</p>
<pre class="doctools_example">% snit::widget mytext {
    option -myvalue 5
    delegate option -padx to text
    delegate option * to text
    constructor {args} {
        install text using text .text
        # ...
    }
    # ...
}
::mytext
% mytext .text
.text
% .text configure -myvalue
-myvalue myvalue Myvalue 5 5
% .text configure -padx
-padx padx Padx 1 1
%
</pre>
<p>Here the resource and class names are chosen using the default rules.
Often these rules are sufficient, but in the case of &quot;-padx&quot; we'd most
likely prefer that the option's resource and class names are the same
as for the built-in Tk widgets.  This is easily done:</p>
<pre class="doctools_example">% snit::widget mytext {
    delegate option {-padx padX Pad} to text
    # ...
}
::mytext
% mytext .text
.text
% .text configure -padx
-padx padX Pad 1 1
%
</pre>
</div>
<div id="subsection141" class="doctools_subsection"><h3><a name="subsection141">How does Snit initialize my megawidget's locally-defined options?</a></h3>
<p>The option database is queried for each of the megawidget's
locally-defined options, using the option's resource and class name.
If the result isn't &quot;&quot;, then it replaces the default value given in
widget definition.  In either case, the default can be overridden by
the caller.  For example,</p>
<pre class="doctools_example">option add *Mywidget.texture pebbled
snit::widget mywidget {
    option -texture smooth
    # ...
}
mywidget .mywidget -texture greasy
</pre>
<p>Here, <b class="const">-texture</b> would normally default to &quot;smooth&quot;, but because of
the entry added to the option database it defaults to &quot;pebbled&quot;.
However, the caller has explicitly overridden the default, and so the
new widget will be &quot;greasy&quot;.</p>
</div>
<div id="subsection142" class="doctools_subsection"><h3><a name="subsection142">How does Snit initialize delegated options?</a></h3>
<p>That depends on whether the options are delegated to the hull, or to
some other component.</p>
</div>
<div id="subsection143" class="doctools_subsection"><h3><a name="subsection143">How does Snit initialize options delegated to the hull?</a></h3>
<p>A <b class="cmd">snit::widget</b>'s hull is a widget, and given that its class has
been set it is expected to query the option database for itself.  The
only exception concerns options that are delegated to it with a
different name.  Consider the following code:</p>
<pre class="doctools_example">option add *Mywidget.borderWidth 5
option add *Mywidget.relief sunken
option add *Mywidget.hullbackground red
option add *Mywidget.background green
snit::widget mywidget {
    delegate option -borderwidth to hull
    delegate option -hullbackground to hull as -background
    delegate option * to hull
    # ...
}
mywidget .mywidget
set A [.mywidget cget -relief]
set B [.mywidget cget -hullbackground]
set C [.mywidget cget -background]
set D [.mywidget cget -borderwidth]
</pre>
<p>The question is, what are the values of variables A, B, C and D?</p>
<p>The value of A is &quot;sunken&quot;.  The hull is a Tk frame which has been
given the widget class <b class="const">Mywidget</b>; it will automatically query the
option database and pick up this value.  Since the <b class="const">-relief</b> option is
implicitly delegated to the hull, Snit takes no action.</p>
<p>The value of B is &quot;red&quot;.  The hull will automatically pick up the
value &quot;green&quot; for its <b class="const">-background</b> option, just as it picked up the
<b class="const">-relief</b> value.  However, Snit knows that <b class="const">-hullbackground</b>
is mapped to the hull's <b class="const">-background</b> option; hence, it queries
the option database for <b class="const">-hullbackground</b> and gets &quot;red&quot; and
updates the hull accordingly.</p>
<p>The value of C is also &quot;red&quot;, because <b class="const">-background</b> is implicitly
delegated to the hull; thus, retrieving it is the same as retrieving
<b class="const">-hullbackground</b>.  Note that this case is unusual; the
<b class="const">-background</b> option should probably have been excluded using the delegate
statement's <b class="const">except</b> clause, or (more likely) delegated to some other
component.</p>
<p>The value of D is &quot;5&quot;, but not for the reason you think.  Note that as
it is defined above, the resource name for <b class="const">-borderwidth</b> defaults to
<b class="const">borderwidth</b>, whereas the option database entry is
<b class="const">borderWidth</b>, in
accordance with the standard Tk naming for this option.  As with
<b class="const">-relief</b>, the hull picks up its own <b class="const">-borderwidth</b>
option before Snit
does anything.  Because the option is delegated under its own name,
Snit assumes that the correct thing has happened, and doesn't worry
about it any further.  To avoid confusion, the
<b class="const">-borderwidth</b> option
should have been delegated like this:</p>
<pre class="doctools_example">    delegate option {-borderwidth borderWidth BorderWidth} to hull
</pre>
<p>For <b class="cmd">snit::widgetadaptor</b>s, the case is somewhat altered.  Widget
adaptors retain the widget class of their hull, and the hull is not
created automatically by Snit.  Instead, the <b class="cmd">snit::widgetadaptor</b>
must call <b class="cmd">installhull</b> in its constructor.  The normal way
to do this is as follows:</p>
<pre class="doctools_example">snit::widgetadaptor mywidget {
    # ...
    constructor {args} {
        # ...
        installhull using text -foreground white
        # ...
    }
    # ...
}
</pre>
<p>In this case, the <b class="cmd">installhull</b> command will create the hull using
a command like this:</p>
<pre class="doctools_example">    set hull [text $win -foreground white]
</pre>
<p>The hull is a <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget, so its widget class is <b class="const">Text</b>.  Just
as with <b class="cmd">snit::widget</b> hulls, Snit assumes that it will pick up
all of its normal option values automatically, without help from Snit.
Options delegated from a different name are initialized from the
option database in the same way as described above.</p>
<p>In earlier versions of Snit, <b class="cmd">snit::widgetadaptor</b>s were expected
to call <b class="cmd">installhull</b> like this:</p>
<pre class="doctools_example">    installhull [text $win -foreground white]
</pre>
<p>This form still works--but Snit will not query the option database as
described above.</p>
</div>
<div id="subsection144" class="doctools_subsection"><h3><a name="subsection144">How does Snit initialize options delegated to other components?</a></h3>
<p>For hull components, Snit assumes that Tk will do most of the work
automatically.  Non-hull components are somewhat more complicated, because
they are matched against the option database twice.</p>
<p>A component widget remains a widget still, and is therefore
initialized from the option database in the usual way.  A <b class="cmd"><a href="../../../../index.html#key248">text</a></b>
widget remains a <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget whether it is a component of a
megawidget or not, and will be created as such.</p>
<p>But then, the option database is queried for all options delegated to
the component, and the component is initialized accordingly--provided
that the <b class="cmd">install</b> command is used to create it.</p>
<p>Before option database support was added to Snit, the usual way to
create a component was to simply create it in the constructor and
assign its command name to the component variable:</p>
<pre class="doctools_example">snit::widget mywidget {
    delegate option -background to myComp
    constructor {args} {
        set myComp [text $win.text -foreground black]
    }
}
</pre>
<p>The drawback of this method is that Snit has no opportunity to
initialize the component properly.  Hence, the following approach is
now used:</p>
<pre class="doctools_example">snit::widget mywidget {
    delegate option -background to myComp
    constructor {args} {
        install myComp using text $win.text -foreground black
    }
}
</pre>
<p>The <b class="cmd">install</b> command does the following:</p>
<ul class="doctools_itemized">
<li><p>Builds a list of the options explicitly included in the <b class="cmd">install</b>
command--in this case, <b class="const">-foreground</b>.</p></li>
<li><p>Queries the option database for all options delegated explicitly to
the named component.</p></li>
<li><p>Creates the component using the specified command, after inserting
into it a list of options and values read from the option database.
Thus, the explicitly included options (like <b class="const">-foreground</b>) will
override anything read from the option database.</p></li>
<li><p>If the widget definition implicitly delegated options to the component
using <b class="cmd">delegate option *</b>, then Snit calls the newly created
component's <b class="cmd">configure</b> method to receive a list of all of the
component's options.  From this Snit builds a list of options
implicitly delegated to the component which were not explicitly
included in the <b class="cmd">install</b> command.  For all such options, Snit
queries the option database and configures the component accordingly.</p></li>
</ul>
<p>You don't really need to know all of this; just use <b class="cmd">install</b> to
install your components, and Snit will try to do the right thing.</p>
</div>
<div id="subsection145" class="doctools_subsection"><h3><a name="subsection145">What happens if I install a non-widget as a component of widget?</a></h3>
<p>A <b class="cmd">snit::type</b> never queries the option database.
However, a <b class="cmd">snit::widget</b> can have non-widget components.  And if
options are delegated to those components, and if the <b class="cmd">install</b>
command is used to install those components, then they will be
initialized from the option database just as widget components are.</p>
<p>However, when used within a megawidget, <b class="cmd">install</b> assumes that the
created component uses a reasonably standard widget-like creation
syntax.  If it doesn't, don't use <b class="cmd">install</b>.</p>
</div>
</div>
<div id="section20" class="doctools_section"><h2><a name="section20">ENSEMBLE COMMANDS</a></h2>
<div id="subsection146" class="doctools_subsection"><h3><a name="subsection146">What is an ensemble command?</a></h3>
<p>An ensemble command is a command with subcommands.  Snit objects are
all ensemble commands; however, the term more usually refers to
commands like the standard Tcl commands <b class="cmd"><a href="../../../../index.html#key280">string</a></b>, <b class="cmd"><a href="../../../../index.html#key31">file</a></b>,
and <b class="cmd">clock</b>.  In a sense, these are singleton objects--there's
only one instance of them.</p>
</div>
<div id="subsection147" class="doctools_subsection"><h3><a name="subsection147">How can I create an ensemble command using Snit?</a></h3>
<p>There are two ways--as a <b class="cmd">snit::type</b>, or as an instance of
a <b class="cmd">snit::type</b>.</p>
</div>
<div id="subsection148" class="doctools_subsection"><h3><a name="subsection148">How can I create an ensemble command using an instance of a snit::type?</a></h3>
<p>Define a type whose <span class="sectref"><a href="#section5">INSTANCE METHODS</a></span> are the subcommands
of your ensemble command.  Then, create an instance of the type with
the desired name.</p>
<p>For example, the following code uses <span class="sectref"><a href="#section16">DELEGATION</a></span> to create
a work-alike for the standard <b class="cmd"><a href="../../../../index.html#key280">string</a></b> command:</p>
<pre class="doctools_example">snit::type ::mynamespace::mystringtype {
    delegate method * to stringhandler
    constructor {} {
        set stringhandler string
    }
}
::mynamespace::mystringtype mystring
</pre>
<p>We create the type in a namespace, so that the type command is hidden;
then we create a single instance with the desired name--
<b class="cmd">mystring</b>, in this case.</p>
<p>This method has two drawbacks.  First, it leaves the type command
floating about.  More seriously, your shiny new ensemble
command will have <b class="method">info</b> and <b class="method">destroy</b> subcommands that
you probably have no use for.  But read on.</p>
</div>
<div id="subsection149" class="doctools_subsection"><h3><a name="subsection149">How can I create an ensemble command using a snit::type?</a></h3>
<p>Define a type whose <span class="sectref"><a href="#section9">TYPE METHODS</a></span> are the subcommands
of your ensemble command.</p>
<p>For example, the following code uses <span class="sectref"><a href="#section16">DELEGATION</a></span> to create
a work-alike for the standard <b class="cmd"><a href="../../../../index.html#key280">string</a></b> command:</p>
<pre class="doctools_example">snit::type mystring {
    delegate typemethod * to stringhandler
    typeconstructor {
        set stringhandler string
    }
}
</pre>
<p>Now the type command itself is your ensemble command.</p>
<p>This method has only one drawback, and though it's major, it's
also surmountable.  Your new ensemble command will have
<b class="method">create</b>, <b class="method">info</b> and <b class="method">destroy</b> subcommands
you don't want.  And worse yet, since the <b class="method">create</b> method
can be implicit, users of your command will accidentally be creating
instances of your <b class="cmd">mystring</b> type if they should mispell one
of the subcommands.  The command will succeed--the first time--but
won't do what's wanted.  This is very bad.</p>
<p>The work around is to set some <span class="sectref"><a href="#section21">PRAGMAS</a></span>, as shown here:</p>
<pre class="doctools_example">snit::type mystring {
    pragma -hastypeinfo    no
    pragma -hastypedestroy no
    pragma -hasinstances   no
    delegate typemethod * to stringhandler
    typeconstructor {
        set stringhandler string
    }
}
</pre>
<p>Here we've used the <b class="cmd">pragma</b> statement to tell Snit that we don't
want the <b class="method">info</b> typemethod or the <b class="method">destroy</b> typemethod,
and that our type has no instances; this eliminates the
<b class="method">create</b> typemethod and all related code.  As
a result, our ensemble command will be well-behaved, with no
unexpected subcommands.</p>
</div>
</div>
<div id="section21" class="doctools_section"><h2><a name="section21">PRAGMAS</a></h2>
<div id="subsection150" class="doctools_subsection"><h3><a name="subsection150">What is a pragma?</a></h3>
<p>A pragma is an option you can set in your type definitions that
affects how the type is defined and how it works once it is defined.</p>
</div>
<div id="subsection151" class="doctools_subsection"><h3><a name="subsection151">How do I set a pragma?</a></h3>
<p>Use the <b class="cmd">pragma</b> statement.  Each pragma is an option with a
value; each time you use the <b class="cmd">pragma</b> statement you can set one or
more of them.</p>
</div>
<div id="subsection152" class="doctools_subsection"><h3><a name="subsection152">How can I get rid of the &quot;info&quot; type method?</a></h3>
<p>Set the <b class="const">-hastypeinfo</b> pragma to <b class="const">no</b>:</p>
<pre class="doctools_example">snit::type dog {
    pragma -hastypeinfo no
    # ...
}
</pre>
<p>Snit will refrain from defining the <b class="method">info</b> type method.</p>
</div>
<div id="subsection153" class="doctools_subsection"><h3><a name="subsection153">How can I get rid of the &quot;destroy&quot; type method?</a></h3>
<p>Set the <b class="const">-hastypedestroy</b> pragma to <b class="const">no</b>:</p>
<pre class="doctools_example">snit::type dog {
    pragma -hastypedestroy no
    # ...
}
</pre>
<p>Snit will refrain from defining the <b class="method">destroy</b> type method.</p>
</div>
<div id="subsection154" class="doctools_subsection"><h3><a name="subsection154">How can I get rid of the &quot;create&quot; type method?</a></h3>
<p>Set the <b class="const">-hasinstances</b> pragma to <b class="const">no</b>:</p>
<pre class="doctools_example">snit::type dog {
    pragma -hasinstances no
    # ...
}
</pre>
<p>Snit will refrain from defining the <b class="method">create</b> type method;
if you call the type command with an unknown method name, you'll get
an error instead of a new instance of the type.</p>
<p>This is useful if you wish to use a <b class="cmd">snit::type</b> to define
an ensemble command rather than a type with instances.</p>
<p>Pragmas <b class="const">-hastypemethods</b> and <b class="const">-hasinstances</b> cannot
both be false (or there'd be nothing left).</p>
</div>
<div id="subsection155" class="doctools_subsection"><h3><a name="subsection155">How can I get rid of type methods altogether?</a></h3>
<p>Normal Tk widget type commands don't have subcommands; all they do is
create widgets--in Snit terms, the type command calls the
<b class="method">create</b> type method directly.  To get the same behavior from
Snit, set the <b class="const">-hastypemethods</b> pragma to <b class="const">no</b>:</p>
<pre class="doctools_example">snit::type dog {
    pragma -hastypemethods no
    #...
}
# Creates ::spot
dog spot
# Tries to create an instance called ::create
dog create spot
</pre>
<p>Pragmas <b class="const">-hastypemethods</b> and <b class="const">-hasinstances</b> cannot
both be false (or there'd be nothing left).</p>
</div>
<div id="subsection156" class="doctools_subsection"><h3><a name="subsection156">Why can't I create an object that replaces an old object with the same name?</a></h3>
<p>Up until Snit 0.95, you could use any name for an instance of a
<b class="cmd">snit::type</b>, even if the name was already in use by some other
object or command.  You could do the following, for example:</p>
<pre class="doctools_example">snit::type dog { ... }
dog proc
</pre>
<p>You now have a new dog named &quot;proc&quot;, which is probably not something
that you really wanted to do.  As a result, Snit now throws an error
if your chosen instance name names an existing command.  To restore
the old behavior, set the <b class="const">-canreplace</b> pragma to <b class="const">yes</b>:</p>
<pre class="doctools_example">snit::type dog {
    pragma -canreplace yes
    # ...
}
</pre>
</div>
<div id="subsection157" class="doctools_subsection"><h3><a name="subsection157">How can I make my simple type run faster?</a></h3>
<p>In Snit 1.x, you can set the <b class="const">-simpledispatch</b> pragma to <b class="const">yes</b>.</p>
<p>Snit 1.x method dispatch is both flexible and fast, but the flexibility
comes with a price.  If your type doesn't require the flexibility, the
<b class="const">-simpledispatch</b> pragma allows you to substitute a simpler
dispatch mechanism that runs quite a bit faster.  The limitations
are these:</p>
<ul class="doctools_itemized">
<li><p>Methods cannot be delegated.</p></li>
<li><p><b class="cmd">uplevel</b> and <b class="cmd">upvar</b> do not work as expected: the
caller's scope is two levels up rather than one.</p></li>
<li><p>The option-handling methods
(<b class="cmd">cget</b>, <b class="cmd">configure</b>, and <b class="cmd">configurelist</b>) are very
slightly slower.</p></li>
</ul>
<p>In Snit 2.2, the <b class="const">-simpledispatch</b> macro is obsolete, and
ignored; all Snit 2.2 method dispatch is faster than Snit 1.x's
<b class="const">-simpledispatch</b>.</p>
</div>
</div>
<div id="section22" class="doctools_section"><h2><a name="section22">MACROS</a></h2>
<div id="subsection158" class="doctools_subsection"><h3><a name="subsection158">What is a macro?</a></h3>
<p>A Snit macro is nothing more than a Tcl proc that's defined in the
Tcl interpreter used to compile Snit type definitions.</p>
</div>
<div id="subsection159" class="doctools_subsection"><h3><a name="subsection159">What are macros good for?</a></h3>
<p>You can use Snit macros to define new type definition syntax, and to
support conditional compilation.</p>
</div>
<div id="subsection160" class="doctools_subsection"><h3><a name="subsection160">How do I do conditional compilation?</a></h3>
<p>Suppose you want your type to use a fast C extension if it's
available; otherwise, you'll fallback to a slower Tcl implementation.
You want to define one set of methods in the first case, and another
set in the second case.  But how can your type definition know whether
the fast C extension is available or not?</p>
<p>It's easily done.  Outside of any type definition, define a macro that
returns 1 if the extension is available, and 0 otherwise:</p>
<pre class="doctools_example">if {$gotFastExtension} {
    snit::macro fastcode {} {return 1}
} else {
    snit::macro fastcode {} {return 0}
}
</pre>
<p>Then, use your macro in your type definition:</p>
<pre class="doctools_example">snit::type dog {
    if {[fastcode]} {
        # Fast methods
        method bark {} {...}
        method wagtail {} {...}
    } else {
        # Slow methods
        method bark {} {...}
        method wagtail {} {...}
    }
}
</pre>
</div>
<div id="subsection161" class="doctools_subsection"><h3><a name="subsection161">How do I define new type definition syntax?</a></h3>
<p>Use a macro.  For example, your <b class="cmd">snit::widget</b>'s
<b class="const">-background</b> option should be propagated to a number
of component widgets.  You could implement that like this:</p>
<pre class="doctools_example">snit::widget mywidget {
    option -background -default white -configuremethod PropagateBackground
    method PropagateBackground {option value} {
        $comp1 configure $option $value
        $comp2 configure $option $value
        $comp3 configure $option $value
    }
}
</pre>
<p>For one option, this is fine; if you've got a number of options, it
becomes tedious and error prone.  So package it as a macro:</p>
<pre class="doctools_example">snit::macro propagate {option &quot;to&quot; components} {
    option $option -configuremethod Propagate$option
    set body &quot;\n&quot;
    foreach comp $components {
        append body &quot;\$$comp configure $option \$value\n&quot;
    }
    method Propagate$option {option value} $body
}
</pre>
<p>Then you can use it like this:</p>
<pre class="doctools_example">snit::widget mywidget {
    option -background default -white
    option -foreground default -black
    propagate -background to {comp1 comp2 comp3}
    propagate -foreground to {comp1 comp2 comp3}
}
</pre>
</div>
<div id="subsection162" class="doctools_subsection"><h3><a name="subsection162">Are there are restrictions on macro names?</a></h3>
<p>Yes, there are.  You can't redefine any standard Tcl commands or Snit
type definition statements.  You can use any other command name,
including the name of a previously defined macro.</p>
<p>If you're using Snit macros in your application, go ahead and name
them in the global namespace, as shown above.  But if you're using
them to define types or widgets for use by others, you should define
your macros in the same namespace as your types or widgets.  That way,
they won't conflict with other people's macros.</p>
<p>If my fancy <b class="cmd">snit::widget</b> is called <b class="cmd">::mylib::mywidget</b>,
for example, then I should define my <b class="cmd">propagate</b> macro as
<b class="cmd">::mylib::propagate</b>:</p>
<pre class="doctools_example">snit::macro mylib::propagate {option &quot;to&quot; components} { ... }
snit::widget ::mylib::mywidget {
    option -background default -white
    option -foreground default -black
    mylib::propagate -background to {comp1 comp2 comp3}
    mylib::propagate -foreground to {comp1 comp2 comp3}
}
</pre>
</div>
</div>
<div id="section23" class="doctools_section"><h2><a name="section23">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>snit</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key241">BWidget</a>, <a href="../../../../index.html#key237">C++</a>, <a href="../../../../index.html#key244">Incr Tcl</a>, <a href="../../../../index.html#key242">adaptors</a>, <a href="../../../../index.html#key240">class</a>, <a href="../../../../index.html#key239">mega widget</a>, <a href="../../../../index.html#key243">object</a>, <a href="../../../../index.html#key236">object oriented</a>, <a href="../../../../index.html#key235">widget</a>, <a href="../../../../index.html#key238">widget adaptors</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2006, by William H. Duquette</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/soundex/soundex.html.













































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166

<div class='fossil-doc' data-title='soundex - Soundex'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">soundex(n) 1.0 tcllib &quot;Soundex&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>soundex - Soundex</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">soundex <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::soundex::knuth</b> <i class="arg">string</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides soundex algorithms which allow the
comparison of words based on their phonetic likeness.</p>
<p>Currently only an algorithm by Knuth is provided, which
is tuned to english names and words.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::soundex::knuth</b> <i class="arg">string</i></a></dt>
<dd><p>Computes the soundex code of the input <i class="arg">string</i> using
Knuth's algorithm and returns it as the result of the
command.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<pre class="doctools_example">
    % ::soundex::knuth Knuth
    K530
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>soundex</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key285">knuth</a>, <a href="../../../../index.html#key284">soundex</a>, <a href="../../../../index.html#key283">text comparison</a>, <a href="../../../../index.html#key286">text likeness</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; ????, Algorithm: Donald E. Knuth<br>
Copyright &copy; 2003, Documentation: Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 1998, Tcl port: Evan Rempel &lt;erempel@uvic.ca&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/stooop/stooop.html.













































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294

<div class='fossil-doc' data-title='stooop - Simple Tcl Only Object Oriented Programming'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">stooop(n) 4.4.1 tcllib &quot;Simple Tcl Only Object Oriented Programming&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>stooop - Object oriented extension.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">DEBUGGING</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">stooop <span class="opt">?4.4.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::stooop::class</b> <i class="arg">name body</i></a></li>
<li><a href="#2"><b class="cmd">::stooop::new</b> <i class="arg">class</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::stooop::delete</b> <i class="arg">object</i> <span class="opt">?<i class="arg">object ...</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::stooop::virtual</b> <b class="const">proc</b> <i class="arg">name</i> {<b class="const">this</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span>} <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::stooop::classof</b> <i class="arg">object</i></a></li>
<li><a href="#6"><b class="cmd">::stooop::new</b> <i class="arg">object</i></a></li>
<li><a href="#7"><b class="cmd">::stooop::printObjects</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::stooop::record</b></a></li>
<li><a href="#9"><b class="cmd">::stooop::report</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to extend Tcl in an object oriented
manner, using a familiar C++ like syntax and behaviour. Stooop only
introduces a few new commands: <b class="cmd"><a href="../../../../index.html#key240">class</a></b>, <b class="cmd">new</b>, <b class="cmd">delete</b>,
<b class="cmd">virtual</b> and <b class="cmd">classof</b>. Along with a few coding conventions,
that is basically all you need to know to use stooop. Stooop is meant
to be as simple to use as possible.</p>
<p>This manual is very succinct and is to be used as a quick reminder for
the programmer, who should have read the thorough <a href="stooop_man.html">stooop_man.html</a>
HTML documentation at this point.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::stooop::class</b> <i class="arg">name body</i></a></dt>
<dd><p>This command creates a class. The body, similar in contents to a Tcl
namespace (which a class actually also is), contains member procedure
definitions. Member procedures can also be defined outside the class
body, by prefixing their name with <b class="const">class::</b>, as you would
proceed with namespace procedures.</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">class</i> {<b class="const">this</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span>} <span class="opt">?<i class="arg">base</i> {<span class="opt">?<i class="arg">arg arg ...</i>?</span>} ...?</span> <i class="arg">body</i></dt>
<dd><p>This is the constructor procedure for the class. It is invoked
following a <b class="cmd">new</b> invocation on the class. It must have the same
name as the class and a first argument named <b class="const">this</b>. Any number
of base classes specifications, including arguments to be passed to
their constructor, are allowed before the actual body of the
procedure.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> ~<i class="arg">class</i> {<b class="const">this</b>} <i class="arg">body</i></dt>
<dd><p>This is the destructor procedure for the class. It is invoked
following a <b class="cmd">delete</b> invocation. Its name must be the
concatenation of a single <b class="const">~</b> character followed by the class
name (as in C++). It must have a single argument named <b class="const">this</b>.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">name</i> {<b class="const">this</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span>} <i class="arg">body</i></dt>
<dd><p>This is a member procedure of the class, as its first argument is
named <b class="const">this</b>. It allows a simple access of member data for the
object referenced by <b class="const">this</b> inside the procedure. For example:</p>
<pre class="doctools_example">
   set ($this,data) 0
</pre>
</dd>
<dt><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">name</i> {<span class="opt">?<i class="arg">arg arg ...</i>?</span>} <i class="arg">body</i></dt>
<dd><p>This is a static (as in C++) member procedure of the class, as its
first argument is not named <b class="const">this</b>. Static (global) class data
can be accessed as in:</p>
<pre class="doctools_example">
   set (data) 0
</pre>
</dd>
<dt><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">class</i> {<b class="const">this copy</b>} <i class="arg">body</i></dt>
<dd><p>This is the optional copy procedure for the class. It must have the
same name as the class and exactly 2 arguments named <b class="const">this</b> and
<b class="const">copy</b>. It is invoked following a <b class="cmd">new</b> invocation on an
existing object of the class.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::stooop::new</b> <i class="arg">class</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>This command is used to create an object. The first argument is the
class name and is followed by the arguments needed by the
corresponding class constructor. A unique identifier for the object
just created is returned.</p></dd>
<dt><a name="3"><b class="cmd">::stooop::delete</b> <i class="arg">object</i> <span class="opt">?<i class="arg">object ...</i>?</span></a></dt>
<dd><p>This command is used to delete one or several objects. It takes one or
more object identifiers as argument(s).</p></dd>
<dt><a name="4"><b class="cmd">::stooop::virtual</b> <b class="const">proc</b> <i class="arg">name</i> {<b class="const">this</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span>} <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd><p>The <b class="cmd">virtual</b> specifier may be used on member procedures to
achieve dynamic binding. A procedure in a base class can then be
redefined (overloaded) in the derived class(es). If the base class
procedure is invoked on an object, it is actually the derived class
procedure which is invoked, if it exists. If the base class procedure
has no body, then it is considered to be a pure virtual and the
derived class procedure is always invoked.</p></dd>
<dt><a name="5"><b class="cmd">::stooop::classof</b> <i class="arg">object</i></a></dt>
<dd><p>This command returns the class of the existing object passed as single
parameter.</p></dd>
<dt><a name="6"><b class="cmd">::stooop::new</b> <i class="arg">object</i></a></dt>
<dd><p>This command is used to create an object by copying an existing
object. The copy constructor of the corresponding class is invoked if
it exists, otherwise a simple copy of the copied object data members
is performed.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">DEBUGGING</a></h2>
<dl class="doctools_definitions">
<dt>Environment variables</dt>
<dd><dl class="doctools_definitions">
<dt><b class="variable">STOOOPCHECKDATA</b></dt>
<dd><p>Setting this variable to any true value will cause stooop to check for
invalid member or class data access.</p></dd>
<dt><b class="variable">STOOOPCHECKPROCEDURES</b></dt>
<dd><p>Setting this variable to any true value will cause stooop to check for
invalid member procedure arguments and pure interface classes
instanciation.</p></dd>
<dt><b class="variable">STOOOPCHECKALL</b></dt>
<dd><p>Setting this variable to any true value will cause stooop to activate
both procedure and data member checking.</p></dd>
<dt><b class="variable">STOOOPCHECKOBJECTS</b></dt>
<dd><p>Setting this variable to any true value will cause stooop to activate
object checking. The following stooop namespace procedures then become
available for debugging: <b class="cmd">printObjects</b>, <b class="cmd"><a href="../../../../index.html#key307">record</a></b> and
<b class="cmd"><a href="../report/report.html">report</a></b>.</p></dd>
<dt><b class="variable">STOOOPTRACEPROCEDURES</b></dt>
<dd><p>Setting this environment variable to either <b class="const">stdout</b>,
<b class="const">stderr</b> or a file name, activates procedure tracing. The
stooop library will then output to the specified channel 1 line of
informational text for each member procedure invocation.</p></dd>
<dt><b class="variable">STOOOPTRACEPROCEDURESFORMAT</b></dt>
<dd><p>Defines the trace procedures output format. Defaults to
<b class="const">&quot;class: %C, procedure: %p, object: %O, arguments: %a&quot;</b>.</p></dd>
<dt><b class="variable">STOOOPTRACEDATA</b></dt>
<dd><p>Setting this environment variable to either <b class="const">stdout</b>,
<b class="const">stderr</b> or a file name, activates data tracing. The stooop
library will then output to the specified channel 1 line of
informational text for each member data access.</p></dd>
<dt><b class="variable">STOOOPTRACEDATAFORMAT</b></dt>
<dd><p>Defines the trace data output format. Defaults to
<b class="const">&quot;class: %C, procedure: %p, array: %A, object: %O, member: %m, operation: %o, value: %v&quot;</b>.</p></dd>
<dt><b class="variable">STOOOPTRACEDATAOPERATIONS</b></dt>
<dd><p>When tracing data output, by default, all read, write and unsetting
accesses are reported, but the user can set this variable to any
combination of the letters <b class="const">r</b>, <b class="const">w</b>, and <b class="const">u</b> for
more specific tracing (please refer to the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> Tcl manual page
for more information).</p></dd>
<dt><b class="variable">STOOOPTRACEALL</b></dt>
<dd><p>Setting this environment variable to either <b class="const">stdout</b>,
<b class="const">stderr</b> or a file name, enables both procedure and data
tracing.</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::stooop::printObjects</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Prints an ordered list of existing objects, in creation order, oldest
first. Each output line contains the class name, object identifier and
the procedure within which the creation occurred. The optional pattern
argument (as in the Tcl <b class="cmd">string match</b> command) can be used to
limit the output to matching class names.</p></dd>
<dt><a name="8"><b class="cmd">::stooop::record</b></a></dt>
<dd><p>When invoked, a snapshot of all existing stooop objects is
taken. Reporting can then be used at a later time to see which objects
were created or deleted in the interval.</p></dd>
<dt><a name="9"><b class="cmd">::stooop::report</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Prints the created and deleted objects since the <b class="cmd">::stooop::record</b>
procedure was invoked last. If present, the pattern argument limits
the output to matching class names.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<p>Please see the full HTML documentation in <a href="stooop_man.html">stooop_man.html</a>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stooop</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key237">C++</a>, <a href="../../../../index.html#key240">class</a>, <a href="../../../../index.html#key243">object</a>, <a href="../../../../index.html#key236">object oriented</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/stooop/switched.html.







































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371

<div class='fossil-doc' data-title='switched - Simple Tcl Only Object Oriented Programming'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">switched(n) 2.2.1 tcllib &quot;Simple Tcl Only Object Oriented Programming&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>switched - switch/option management.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">switched <span class="opt">?2.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">&lt;switched&gt;</b> <b class="method">complete</b> <i class="arg">this</i></a></li>
<li><a href="#2"><b class="cmd">&lt;switched&gt;</b> <b class="method">options</b> <i class="arg">this</i></a></li>
<li><a href="#3"><b class="cmd">&lt;switched&gt;</b> <b class="method">set-<b class="option">option</b></b> <i class="arg">this</i> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="class">switched</b> class serves as base class for user classes with
switch / option configuration procedures. It provides facilities for
managing options through a simple interface.</p>
<p>For example:</p>
<pre class="doctools_example">
set vehicle [new car -length 4.5 -width 2 -power 100 -fuel diesel]
puts &quot;my car was running on [switched::cget $vehicle -fuel]&quot;
switched::configure $vehicle -power 40 -fuel electricity
puts &quot;but is now running on clean [switched::cget $vehicle -fuel]&quot;
</pre>
<p>Of course, as you might have guessed, the <b class="class">car</b> class is
derived from the <b class="class">switched</b> class. Let us see how it works:</p>
<pre class="doctools_example">
class car {
    proc car {this args} switched {$args} {
        # car specific initialization code here
        switched::complete $this
    }
    ...
}
</pre>
<p>The switched class constructor takes the optional configuration
option / value pairs as parameters.
The switched class layer then completely manages the switched options:
it checks their validity, stores their values and provides a clean
interface to the user layer configuration setting procedures.</p>
<p>The switched class members available to the programmer are:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">&lt;switched&gt;</b> <b class="method">complete</b> <i class="arg">this</i></a></dt>
<dd><p>This procedure is used to tell the switched layer that the derived
class object (a car in the examples) is completely built.
At that time, the initial configuration of the switched object occurs,
using default option values (see procedure <b class="method">options</b>)
eventually overridden by construction time values, passed at the time
of the <b class="method">new</b> operator invocation.
This procedure must be called only once, usually around or at the end
of the derived class constructor.
(<em>Note</em>: Also check the <b class="variable">complete</b> data member later in this
chapter).</p></dd>
<dt><a name="2"><b class="cmd">&lt;switched&gt;</b> <b class="method">options</b> <i class="arg">this</i></a></dt>
<dd><p>This procedure must return the configuration description for
<em>all</em> options that the switched object will accept.
It is a pure virtual member procedure and therefore its implementation
is <em>mandatory</em> in the derived class layer.
The procedure must return a list of lists.
Each list pertains to a single option and is composed of the switch
name, the default value for the option and an optional initial value.
For example:</p>
<pre class="doctools_example">
class car {
    ...
    proc options {this} {
        return [list [list -fuel petrol petrol] [list -length {} {}] [list -power {} {}] [list -width {} {}] ]
    }
    proc set-fuel {this value} {
        ...
    }
    ...
}
</pre>
<p>In this case, 4 options are specified:
<b class="option">fuel</b>, <b class="option">length</b>, <b class="option">power</b> and <b class="option">width</b>.
The default and initial values for the <b class="option">fuel</b> option are
identical and set to <b class="option">petrol</b>.
For the other options, values are all empty.</p>
<p>For each option, there must be a corresponding
<b class="method">set-<b class="option">option</b></b> procedure defined in the derived class
layer.
For example, since we defined a <b class="option">fuel</b> option, there is a
<b class="method">set-fuel</b> procedure in the car class.
The parameters always are the object identifier (since this is not a
static procedure, but rather a dynamically defined virtual one),
followed by the new value for the option.
A <b class="method">set-<b class="option">option</b></b> procedure is only invoked if the new
value differs from the current one (a caching scheme for improving
performance), or if there is no initial value set in the
<b class="method">options</b> procedure for that option.</p>
<p>In this procedure, if the initial value differs from the
default value or is omitted, then initial configuration is forced and
the corresponding <b class="method">set-<b class="option">option</b></b> procedure is invoked by
the switched <b class="method">complete</b> procedure located at the end of the
derived class constructor.
For example:</p>
<pre class="doctools_example">
class car {
    ...
    proc options {this} {
        return [list [list -fuel petrol] [list -length {} {}] [list -power 100 50] [list -width {} {}] ]
    }
    ...
}
</pre>
<p>In this case, configuration is forced on the <b class="option">fuel</b> and
<b class="option">power</b> options, that is the corresponding
<b class="method">set-<b class="option">option</b></b> procedures will be invoked when the
switched object is constructed (see <b class="method">set-<b class="option">option</b></b>
procedures documentation below).</p>
<p>For the <b class="option">fuel</b> option, since there is no initial value,
the <b class="method">set-<b class="option">fuel</b></b> procedure is called with the default
value (<b class="const">petrol</b>) as argument.
For the <b class="option">power</b> option, since the initial value differs from
the default value, the <b class="method">set-<b class="option">power</b></b> procedure is called
with the initial value as argument (<b class="const">50</b>).</p>
<p>For the other options, since the initial values (last elements
of the option lists) are identical to their default values, the
corresponding <b class="method">set-<b class="option">option</b></b> procedures will not be
invoked. It is the programmer's responsibility to insure that the
initial option values are correct.</p></dd>
<dt><a name="3"><b class="cmd">&lt;switched&gt;</b> <b class="method">set-<b class="option">option</b></b> <i class="arg">this</i> <i class="arg">value</i></a></dt>
<dd><p>These procedures may be viewed as dynamic virtual functions.
There must be one implementation per supported option, as returned by
the <b class="method">options</b> procedure.
For example:</p>
<pre class="doctools_example">
class car {
    ...
    proc options {this} {
        return [list ...
            [list -width {} {}] ]
    }
    ...
    proc set-width {this value} {
        ...
    }
    ...
}
</pre>
<p>Since the <b class="option">-width</b> option was listed in the <b class="method">options</b>
procedure, a <b class="method">set-width</b> procedure implementation is provided, which
of course would proceed to set the width of the car (and would modify
the looks of a graphical representation, for example).</p>
<p>As you add a supported <b class="option">option</b> in the list returned by
the <b class="method">options</b> procedure, the corresponding
<b class="method">set-<b class="option">option</b></b> procedure may be called as soon as the
switched object is complete, which occurs when the switched level
<b class="method">complete</b> procedure is invoked.
For example:</p>
<pre class="doctools_example">
class car {
    proc car {this args} switched {args} {
        ...
        switched::complete $this
   }
    ...
    proc options {this} {
        return [list [list -fuel petrol] [list -length 4.5] [list -power 350] [list -width 1.8] ]
    }
    proc set-fuel {this value} {
        ...
    }
    proc set-length {this value} {
        ...
    }
    proc set-power {this value} {
        ...
    }
    proc set-width {this value} {
        ...
    }
}
new car
</pre>
<p>In this case, a new car is created with no options, which
causes the car constructor to be called, which in turns calls the
switched level <b class="method">complete</b> procedure after the car object layer
is completely initialized.
At this point, since there are no initial values in any option list in
the options procedure, the <b class="method">set-fuel</b> procedure is called with
its default value of <b class="const">petrol</b> as parameter, followed by the
<b class="method">set-length</b> call with <b class="const">4.5</b> value, <b class="method">set-power</b>
with <b class="const">350</b> value and finally with <b class="method">set-width</b> with
<b class="const">1.8</b> as parameter.
This is a good way to test the <b class="method">set-<b class="option">option</b></b> procedures
when debugging, and when done, just fill-in the initial option values.</p>
<p>The switched layer checks that an option is valid (that is,
listed in the <b class="method">options</b> procedure) but obviously does not check
the validity of the value passed to the <b class="method">set-<b class="option">option</b></b>
procedure, which should throw an error (for example by using the Tcl
error command) if the value is invalid.</p>
<p>The switched layer also keeps track of the options current
values, so that a <b class="method">set-<b class="option">option</b></b> procedure is called
only when the corresponding option value passed as parameter is
different from the current value (see  data members
description).</p></dd>
<dt></dt>
<dd><p>The  data member is an options current value.
There is one for each option listed in the options procedure. It is a
read-only value which the switched layer checks against when an option
is changed.
It is rarely used at the layer derived from switched, except in the
few cases, such as in the following example:</p>
<pre class="doctools_example">
...
proc car::options {this} {
    return {
        ...
        {-manufacturer {} {}}
        ...
    }
}
proc car::set-manufacturer {this value} {}
proc car::printData {this} {
    puts &quot;manufacturer: $switched::($this,-manufacturer)&quot;
    ...
}
</pre>
<p>In this case, the manufacturer's name is stored at the switched
layer level (this is why the set-manufacturer procedure has nothing to
do) and later retrieved in the printData procedure.</p></dd>
<dt></dt>
<dd><p>The  data member (not to be confused with
the <b class="method">complete</b> procedure) is a boolean.
Its initial value is <b class="const">false</b> and it is set to <b class="const">true</b> at
the very end of the switched <b class="method">complete</b> procedure.
It becomes useful when some options should be set at construction time
only and not dynamically, as the following example shows:</p>
<pre class="doctools_example">
proc car::set-width {this value} {
    if {$switched::($this,complete)} {
        error {option -width cannot be set dynamically}
    }
    ...
}
</pre>
</dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stooop</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key237">C++</a>, <a href="../../../../index.html#key240">class</a>, <a href="../../../../index.html#key243">object</a>, <a href="../../../../index.html#key236">object oriented</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/string/token.html.























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<div class='fossil-doc' data-title='string::token - Text and string utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">string::token(n) 1 tcllib &quot;Text and string utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>string::token - Regex based iterative lexing</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">string::token <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">fileutil</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::string token text</b> <i class="arg">lex</i> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::string token file</b> <i class="arg">lex</i> <i class="arg">path</i></a></li>
<li><a href="#3"><b class="cmd">::string token chomp</b> <i class="arg">lex</i> <i class="arg">startvar</i> <i class="arg">string</i> <i class="arg">resultvar</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for regular expression based lexing
(tokenization) of strings.</p>
<p>The complete set of procedures is described below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::string token text</b> <i class="arg">lex</i> <i class="arg">string</i></a></dt>
<dd><p>This command takes an ordered dictionary <i class="arg">lex</i> mapping regular
expressions to labels, and tokenizes the <i class="arg">string</i> according to
this dictionary.</p>
<p>The result of the command is a list of tokens, where each token
is a 3-element list of label, start- and end-index in the <i class="arg">string</i>.</p>
<p>The command will throw an error if it is not able to tokenize
the whole string.</p></dd>
<dt><a name="2"><b class="cmd">::string token file</b> <i class="arg">lex</i> <i class="arg">path</i></a></dt>
<dd><p>This command is a convenience wrapper around
<b class="cmd">::string token text</b> above, and <b class="cmd">fileutil::cat</b>, enabling
the easy tokenization of whole files.
<em>Note</em> that this command loads the file wholly into memory before
starting to process it.</p>
<p>If the file is too large for this mode of operation a command
directly based on <b class="cmd">::string token chomp</b> below will be
necessary.</p></dd>
<dt><a name="3"><b class="cmd">::string token chomp</b> <i class="arg">lex</i> <i class="arg">startvar</i> <i class="arg">string</i> <i class="arg">resultvar</i></a></dt>
<dd><p>This command is the work horse underlying <b class="cmd">::string token text</b>
above. It is exposed to enable users to write their own lexers, which,
for example may apply different lexing dictionaries according to some
internal state, etc.</p>
<p>The command takes an ordered dictionary <i class="arg">lex</i> mapping
regular expressions to labels, a variable <i class="arg">startvar</i> which
indicates where to start lexing in the input <i class="arg">string</i>, and a
result variable <i class="arg">resultvar</i> to extend.</p>
<p>The result of the command is a tri-state numeric code
indicating one of</p>
<dl class="doctools_definitions">
<dt><b class="const">0</b></dt>
<dd><p>No token found.</p></dd>
<dt><b class="const">1</b></dt>
<dd><p>Token found.</p></dd>
<dt><b class="const">2</b></dt>
<dd><p>End of string reached.</p></dd>
</dl>
<p>Note that recognition of a token from <i class="arg">lex</i> is started at the
character index in <i class="arg">startvar</i>.</p>
<p>If a token was recognized (status <b class="const">1</b>) the command will
update the index in <i class="arg">startvar</i> to point to the first character of
the <i class="arg">string</i> past the recognized token, and it will further extend
the <i class="arg">resultvar</i> with a 3-element list containing the label
associated with the regular expression of the token, and the start-
and end-character-indices of the token in <i class="arg">string</i>.</p>
<p>Neither <i class="arg">startvar</i> nor <i class="arg">resultvar</i> will be updated if
no token is recognized at all.</p>
<p>Note that the regular expressions are applied (tested) in the
order they are specified in <i class="arg">lex</i>, and the first matching pattern
stops the process. Because of this it is recommended to specify the
patterns to lex with from the most specific to the most general.</p>
<p>Further note that all regex patterns are implicitly prefixed
with the constraint escape <b class="const">A</b> to ensure that a match starts
exactly at the character index found in <i class="arg">startvar</i>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key697">lexing</a>, <a href="../../../../index.html#key696">regex</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key695">tokenization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/string/token_shell.html.







































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

<div class='fossil-doc' data-title='string::token::shell - Text and string utilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">string::token::shell(n) 1.2 tcllib &quot;Text and string utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>string::token::shell - Parsing of shell command line</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">string::token::shell <span class="opt">?1.2?</span></b></li>
<li>package require <b class="pkgname">string::token <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">fileutil</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::string token shell</b> <span class="opt">?<b class="option">-indices</b>?</span> <span class="opt">?<b class="option">-partial</b>?</span> <span class="opt">?--?</span> <i class="arg">string</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a command which parses a line of text using
basic <b class="syscmd">sh</b>-syntax into a list of words.</p>
<p>The complete set of procedures is described below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::string token shell</b> <span class="opt">?<b class="option">-indices</b>?</span> <span class="opt">?<b class="option">-partial</b>?</span> <span class="opt">?--?</span> <i class="arg">string</i></a></dt>
<dd><p>This command parses the input <i class="arg">string</i> under the assumption of it
following basic <b class="syscmd">sh</b>-syntax.
The result of the command is a list of words in the <i class="arg">string</i>.
An error is thrown if the input does not follow the allowed syntax.
The behaviour can be modified by specifying any of the two options
<b class="option">-indices</b> and <b class="option">-partial</b>.</p>
<dl class="doctools_options">
<dt><b class="option">--</b></dt>
<dd><p>When specified option parsing stops at this point. This option is
needed if the input <i class="arg">string</i> may start with dash. In other words,
this is pretty much required if <i class="arg">string</i> is user input.</p></dd>
<dt><b class="option">-indices</b></dt>
<dd><p>When specified the output is not a list of words, but a list of
4-tuples describing the words. Each tuple contains the type of the
word, its start- and end-indices in the input, and the actual text of
the word.</p>
<p>Note that the length of the word as given by the indices can
differ from the length of the word found in the last element of the
tuple. The indices describe the words extent in the input, including
delimiters, intra-word quoting, etc. whereas for the actual text of
the word delimiters are stripped, intra-word quoting decoded, etc.</p>
<p>The possible token types are</p>
<dl class="doctools_definitions">
<dt><b class="const">PLAIN</b></dt>
<dd><p>Plain word, not quoted.</p></dd>
<dt><b class="const">D:QUOTED</b></dt>
<dd><p>Word is delimited by double-quotes.</p></dd>
<dt><b class="const">S:QUOTED</b></dt>
<dd><p>Word is delimited by single-quotes.</p></dd>
<dt><b class="const">D:QUOTED:PART</b></dt>
<dd></dd>
<dt><b class="const">S:QUOTED:PART</b></dt>
<dd><p>Like the previous types, but the word has no closing quote, i.e. is
incomplete. These token types can occur if and only if the option
<b class="option">-partial</b> was specified, and only for the last word of the
result. If the option <b class="option">-partial</b> was not specified such
incomplete words cause the command to thrown an error instead.</p></dd>
</dl></dd>
<dt><b class="option">-partial</b></dt>
<dd><p>When specified the parser will accept an incomplete quoted word
(i.e. without closing quote) at the end of the line as valid instead
of throwing an error.</p></dd>
</dl>
<p>The basic shell syntax accepted here are unquoted, single- and
double-quoted words, separated by whitespace. Leading and trailing
whitespace are possible too, and stripped.
Shell variables in their various forms are <em>not</em> recognized, nor
are sub-shells.
As for the recognized forms of words, see below for the detailed
specification.</p>
<dl class="doctools_definitions">
<dt><b class="const">single-quoted word</b></dt>
<dd><p>A single-quoted word begins with a single-quote character, i.e.
<b class="const">'</b> (ASCII 39) followed by zero or more unicode characters not a
single-quote, and then closed by a single-quote.</p>
<p>The word must be followed by either the end of the string, or
whitespace. A word cannot directly follow the word.</p></dd>
<dt><b class="const">double-quoted word</b></dt>
<dd><p>A double-quoted word begins with a double-quote character, i.e.
<b class="const">&quot;</b> (ASCII 34) followed by zero or more unicode characters not a
double-quote, and then closed by a double-quote.</p>
<p>Contrary to single-quoted words a double-quote can be embedded
into the word, by prefacing, i.e. escaping, i.e. quoting it with a
backslash character <b class="const">\</b> (ASCII 92). Similarly a backslash
character must be quoted with itself to be inserted literally.</p></dd>
<dt><b class="const">unquoted word</b></dt>
<dd><p>Unquoted words are not delimited by quotes and thus cannot contain
whitespace or single-quote characters. Double-quote and backslash
characters can be put into unquoted words, by quting them like for
double-quoted words.</p></dd>
<dt><b class="const">whitespace</b></dt>
<dd><p>Whitespace is any unicode space character.
This is equivalent to <b class="cmd">string is space</b>, or the regular
expression \\s.</p>
<p>Whitespace may occur before the first word, or after the last word. Whitespace must occur between adjacent words.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key743">bash</a>, <a href="../../../../index.html#key697">lexing</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key742">shell</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key695">tokenization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/stringprep/stringprep.html.

































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224

<div class='fossil-doc' data-title='stringprep - Preparation of Internationalized Strings'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">stringprep(n) 1.0.1 tcllib &quot;Preparation of Internationalized Strings&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>stringprep - Implementation of stringprep</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">REFERENCES</a></li>
<li class="doctools_section"><a href="#section5">AUTHORS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">stringprep 1.0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::stringprep::register</b> <i class="arg">profile</i> <span class="opt">?<i class="arg">-mapping list</i>?</span> <span class="opt">?<i class="arg">-normalization form</i>?</span> <span class="opt">?<i class="arg">-prohibited list</i>?</span> <span class="opt">?<i class="arg">-prohibitedList list</i>?</span> <span class="opt">?<i class="arg">-prohibitedCommand command</i>?</span> <span class="opt">?<i class="arg">-prohibitedBidi boolean</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::stringprep::stringprep</b> <i class="arg">profile</i> <i class="arg">string</i></a></li>
<li><a href="#3"><b class="cmd">::stringprep::compare</b> <i class="arg">profile</i> <i class="arg">string1</i> <i class="arg">string2</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This is an implementation in Tcl of the Preparation of Internationalized
Strings (&quot;stringprep&quot;). It allows to define stringprep profiles and use
them to prepare Unicode strings for comparison as defined in RFC-3454.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::stringprep::register</b> <i class="arg">profile</i> <span class="opt">?<i class="arg">-mapping list</i>?</span> <span class="opt">?<i class="arg">-normalization form</i>?</span> <span class="opt">?<i class="arg">-prohibited list</i>?</span> <span class="opt">?<i class="arg">-prohibitedList list</i>?</span> <span class="opt">?<i class="arg">-prohibitedCommand command</i>?</span> <span class="opt">?<i class="arg">-prohibitedBidi boolean</i>?</span></a></dt>
<dd><p>Register the <b class="package">stringprep</b> profile named <i class="arg">profile</i>. Options
are the following.</p>
<p>Option <i class="arg">-mapping</i> specifies <b class="package">stringprep</b> mapping tables.
This parameter takes list of tables from appendix B of RFC-3454. The usual
list values are {B.1 B.2} or {B.1 B.3} where B.1 contains characters which
commonly map to nothing, B.3 specifies case folding, and B.2 is used in
profiles with unicode normalization form KC. Defult value is {} which means
no mapping.</p>
<p>Option <i class="arg">-normalization</i> takes a string and if it is nonempty then it
uses as a name of Unicode normalization form. Any value of &quot;D&quot;, &quot;C&quot;, &quot;KD&quot;
or &quot;KC&quot; may be used, though RFC-3454 defines only two options: no
normalization or normalization using form KC.</p>
<p>Option <i class="arg">-prohibited</i> takes a list of RFC-3454 tables with prohibited
characters. Current version does allow to prohibit either all tables from
C.3 to C.9 or neither of them. An example of this list for RFC-3491 is
{A.1 C.1.2 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9}.</p>
<p>Option <i class="arg">-prohibitedList</i> specifies a list of additional prohibited
characters. The list contains not characters themselves but their Unicode
numbers. For example, Nodeprep specification from RFC-3920 forbids the
following codes: {0x22 0x26 0x27 0x2f 0x3a 0x3c 0x3e 0x40} (\&quot; \&amp; \' / : &lt; &gt; @).</p>
<p>Option <i class="arg">-prohibitedCommand</i> specifies a command which is called for
every character code in mapped and normalized string. If the command returns
true then the character is considered prohibited. This option is useful when
a list for <i class="arg">-prohibitedList</i> is too large.</p>
<p>Option <i class="arg">-prohibitedBidi</i> takes boolean value and if it is true then the
bidirectional character processing rules defined in section 6 of RFC-3454 are
used.</p></dd>
<dt><a name="2"><b class="cmd">::stringprep::stringprep</b> <i class="arg">profile</i> <i class="arg">string</i></a></dt>
<dd><p>Performs <b class="package">stringprep</b> operations defined in profile <i class="arg">profile</i>
to string <i class="arg">string</i>. Result is a prepared string or one of the following
errors: <i class="arg">invalid_profile</i> (profile <i class="arg">profile</i> is not defined),
<i class="arg">prohibited_character</i> (string <i class="arg">string</i> contains a prohibited character)
or <i class="arg">prohibited_bidi</i> (string <i class="arg">string</i> contains a prohibited bidirectional
sequence).</p></dd>
<dt><a name="3"><b class="cmd">::stringprep::compare</b> <i class="arg">profile</i> <i class="arg">string1</i> <i class="arg">string2</i></a></dt>
<dd><p>Compares two unicode strings prepared accordingly to <b class="package">stringprep</b>
profile <i class="arg">profile</i>. The command returns 0 if prepared strings are equal,
-1 if <i class="arg">string1</i> is lexicographically less than <i class="arg">string2</i>, or
1 if <i class="arg">string1</i> is lexicographically greater than <i class="arg">string2</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<p>Nameprep profile definition (see RFC-3491):</p>
<pre class="doctools_example">
::stringprep::register nameprep  -mapping {B.1 B.2}  -normalization KC  -prohibited {A.1 C.1.2 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9}  -prohibitedBidi 1
</pre>
<p>Nodeprep and resourceprep profile definitions (see RFC-3920):</p>
<pre class="doctools_example">
::stringprep::register nodeprep  -mapping {B.1 B.2}  -normalization KC  -prohibited {A.1 C.1.1 C.1.2 C.2.1 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9}  -prohibitedList {0x22 0x26 0x27 0x2f 0x3a 0x3c 0x3e 0x40}  -prohibitedBidi 1
::stringprep::register resourceprep  -mapping {B.1}  -normalization KC  -prohibited {A.1 C.1.2 C.2.1 C.2.2 C.3 C.4 C.5 C.6 C.7 C.8 C.9}  -prohibitedBidi 1
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>&quot;Preparation of Internationalized Strings ('stringprep')&quot;,
    (<a href="http://www.ietf.org/rfc/rfc3454.txt">http://www.ietf.org/rfc/rfc3454.txt</a>)</p></li>
<li><p>&quot;Nameprep: A Stringprep Profile for Internationalized Domain Names (IDN)&quot;,
    (<a href="http://www.ietf.org/rfc/rfc3491.txt">http://www.ietf.org/rfc/rfc3491.txt</a>)</p></li>
<li><p>&quot;Extensible Messaging and Presence Protocol (XMPP): Core&quot;,
    (<a href="http://www.ietf.org/rfc/rfc3920.txt">http://www.ietf.org/rfc/rfc3920.txt</a>)</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Sergei Golovan</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="unicode.html">unicode(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key646">stringprep</a>, <a href="../../../../index.html#key647">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/stringprep/stringprep_data.html.



































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

<div class='fossil-doc' data-title='stringprep::data - Preparation of Internationalized Strings'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">stringprep::data(n) 1.0.1 tcllib &quot;Preparation of Internationalized Strings&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>stringprep::data - stringprep data tables, generated, internal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">stringprep::data 1.0.1</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">stringprep::data</b> package is a helper for
<b class="package"><a href="stringprep.html">stringprep</a></b>, providing it with the data tables needed to
perform its functions. It is an <em>internal</em> package which should
not be accessed on its own. Because of that it has no publicly
documented API either. Its implementation is generated by a script.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key646">stringprep</a>, <a href="../../../../index.html#key647">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/stringprep/unicode.html.















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199

<div class='fossil-doc' data-title='unicode - Unicode normalization'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">unicode(n) 1.0.0 tcllib &quot;Unicode normalization&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>unicode - Implementation of Unicode normalization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">REFERENCES</a></li>
<li class="doctools_section"><a href="#section5">AUTHORS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">unicode 1.0</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::unicode::fromstring</b> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::unicode::tostring</b> <i class="arg">uclist</i></a></li>
<li><a href="#3"><b class="cmd">::unicode::normalize</b> <i class="arg">form</i> <i class="arg">uclist</i></a></li>
<li><a href="#4"><b class="cmd">::unicode::normalizeS</b> <i class="arg">form</i> <i class="arg">string</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This is an implementation in Tcl of the Unicode normalization forms.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::unicode::fromstring</b> <i class="arg">string</i></a></dt>
<dd><p>Converts <i class="arg">string</i> to list of integer Unicode character codes which
is used in <b class="package">unicode</b> for internal string representation.</p></dd>
<dt><a name="2"><b class="cmd">::unicode::tostring</b> <i class="arg">uclist</i></a></dt>
<dd><p>Converts list of integers <i class="arg">uclist</i> back to Tcl string.</p></dd>
<dt><a name="3"><b class="cmd">::unicode::normalize</b> <i class="arg">form</i> <i class="arg">uclist</i></a></dt>
<dd><p>Normalizes Unicode characters list <i class="arg">ulist</i> according to <i class="arg">form</i>
and returns the normalized list. Form <i class="arg">form</i> takes one of the following
values: <i class="arg">D</i> (canonical decomposition), <i class="arg">C</i> (canonical decomposition, followed
by canonical composition), <i class="arg">KD</i> (compatibility decomposition), or <i class="arg">KC</i>
(compatibility decomposition, followed by canonical composition).</p></dd>
<dt><a name="4"><b class="cmd">::unicode::normalizeS</b> <i class="arg">form</i> <i class="arg">string</i></a></dt>
<dd><p>A shortcut to
::unicode::tostring [unicode::normalize \$form [::unicode::fromstring \$string]].
Normalizes Tcl string and returns normalized string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<pre class="doctools_example">
% ::unicode::fromstring &quot;\u0410\u0411\u0412\u0413&quot;
1040 1041 1042 1043
% ::unicode::tostring {49 50 51 52 53}
12345
%
</pre>
<pre class="doctools_example">
% ::unicode::normalize D {7692 775}
68 803 775
% ::unicode::normalizeS KD &quot;\u1d2c&quot;
A
%
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>&quot;Unicode Standard Annex #15: Unicode Normalization Forms&quot;,
    (<a href="http://unicode.org/reports/tr15/">http://unicode.org/reports/tr15/</a>)</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Sergei Golovan</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="stringprep.html">stringprep(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key112">normalization</a>, <a href="../../../../index.html#key647">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/stringprep/unicode_data.html.



































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

<div class='fossil-doc' data-title='unicode::data - Preparation of Internationalized Strings'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">unicode::data(n) 1.0.0 tcllib &quot;Preparation of Internationalized Strings&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>unicode::data - unicode data tables, generated, internal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">unicode::data 1.0.0</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">unicode::data</b> package is a helper for
<b class="package"><a href="unicode.html">unicode</a></b>, providing it with the data tables needed to
perform its functions. It is an <em>internal</em> package which should
not be accessed on its own. Because of that it has no publicly
documented API either. Its implementation is generated by a script.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key646">stringprep</a>, <a href="../../../../index.html#key647">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/disjointset.html.



































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<div class='fossil-doc' data-title='struct::disjointset - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::disjointset(n) 1.0 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::disjointset - Disjoint set data structure</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::disjointset <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::disjointset</b> <i class="arg">disjointsetName</i></a></li>
<li><a href="#2"><i class="arg">disjointsetName</i> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">disjointsetName</i> <b class="method">add-partition</b> <i class="arg">elements</i></a></li>
<li><a href="#4"><i class="arg">disjointsetName</i> <b class="method">partitions</b></a></li>
<li><a href="#5"><i class="arg">disjointsetName</i> <b class="method">num-partitions</b></a></li>
<li><a href="#6"><i class="arg">disjointsetName</i> <b class="method">equal</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#7"><i class="arg">disjointsetName</i> <b class="method">merge</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#8"><i class="arg">disjointsetName</i> <b class="method">find</b> <i class="arg">e</i></a></li>
<li><a href="#9"><i class="arg">disjointsetName</i> <b class="method">destroy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides <i class="term">disjoint sets</i>. An alternative name for
this kind of structure is <i class="term">merge-find</i>.</p>
<p>Normally when dealing with sets and their elements the question is &quot;Is
this element E contained in this set S?&quot;, with both E and S known.</p>
<p>Here the question is &quot;Which of several sets contains the element
E?&quot;. I.e. while the element is known, the set is not, and we wish to
find it quickly. It is not quite the inverse of the original question,
but close.
Another operation which is often wanted is that of quickly merging two
sets into one, with the result still fast for finding elements. Hence
the alternative term <i class="term">merge-find</i> for this.</p>
<p>Why now is this named a <i class="term">disjoint-set</i> ?
Because another way of describing the whole situation is that we have</p>
<ul class="doctools_itemized">
<li><p>a finite <i class="term"><a href="../../../../index.html#key301">set</a></i> S, containing</p></li>
<li><p>a number of <i class="term">elements</i> E, split into</p></li>
<li><p>a set of <i class="term">partitions</i> P. The latter term
       applies, because the intersection of each pair P, P' of
       partitions is empty, with the union of all partitions
       covering the whole set.</p></li>
<li><p>An alternative name for the <i class="term">partitions</i> would be
       <i class="term">equvalence classes</i>, and all elements in the same
       class are considered as equal.</p></li>
</ul>
<p>Here is a pictorial representation of the concepts listed above:</p>
<pre class="doctools_example">
	+-----------------+ The outer lines are the boundaries of the set S.
	|           /     | The inner regions delineated by the skewed lines
	|  *       /   *  | are the partitions P. The *'s denote the elements
	|      *  / \     | E in the set, each in a single partition, their
	|*       /   \    | equivalence class.
	|       /  *  \   |
	|      / *   /    |
	| *   /\  * /     |
	|    /  \  /      |
	|   /    \/  *    |
	|  / *    \       |
	| /     *  \      |
	+-----------------+
</pre>
<p>For more information see <a href="http://en.wikipedia.org/wiki/Disjoint_set_data_structure">http://en.wikipedia.org/wiki/Disjoint_set_data_structure</a>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports a single command, <b class="cmd">::struct::disjointset</b>. All
functionality provided here can be reached through a subcommand of
this command.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::struct::disjointset</b> <i class="arg">disjointsetName</i></a></dt>
<dd><p>Creates a new disjoint set object with an associated global Tcl
command whose name is <em>disjointsetName</em>. This command may be used
to invoke various operations on the disjointset. It has the following
general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">disjointsetName</i> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The <b class="cmd">option</b> and the <i class="arg">arg</i>s determine the exact behavior of
the command. The following commands are possible for disjointset
objects:</p></dd>
</dl></dd>
<dt><a name="3"><i class="arg">disjointsetName</i> <b class="method">add-partition</b> <i class="arg">elements</i></a></dt>
<dd><p>Creates a new partition in specified disjoint set, and fills it with
the values found in the set of <i class="arg">elements</i>. The command maintains
the integrity of the disjoint set, i.e. it verifies that none of the
<i class="arg">elements</i> are already part of the disjoint set and throws an
error otherwise.</p>
<p>The result of the command is the empty string.</p></dd>
<dt><a name="4"><i class="arg">disjointsetName</i> <b class="method">partitions</b></a></dt>
<dd><p>Returns the set of partitions the named disjoint set currently
consists of.</p></dd>
<dt><a name="5"><i class="arg">disjointsetName</i> <b class="method">num-partitions</b></a></dt>
<dd><p>Returns the number of partitions the named disjoint set currently
consists of.</p></dd>
<dt><a name="6"><i class="arg">disjointsetName</i> <b class="method">equal</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Determines if the two elements <i class="arg">a</i> and <i class="arg">b</i> of the disjoint set
belong to the same partition. The result of the method is a boolean
value, <b class="const">True</b> if the two elements are contained in the same
partition, and <b class="const">False</b> otherwise.</p>
<p>An error will be thrown if either <i class="arg">a</i> or <i class="arg">b</i> are not elements
of the disjoint set.</p></dd>
<dt><a name="7"><i class="arg">disjointsetName</i> <b class="method">merge</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Determines the partitions the elements <i class="arg">a</i> and <i class="arg">b</i> are
contained in and merges them into a single partition.  If the two
elements were already contained in the same partition nothing will
change.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="8"><i class="arg">disjointsetName</i> <b class="method">find</b> <i class="arg">e</i></a></dt>
<dd><p>Returns the partition of the disjoint set which contains the element
<i class="arg">e</i>.</p></dd>
<dt><a name="9"><i class="arg">disjointsetName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the disjoint set object and all associated memory.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: disjointset</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key623">disjoint set</a>, <a href="../../../../index.html#key622">equivalence class</a>, <a href="../../../../index.html#key626">find</a>, <a href="../../../../index.html#key625">merge find</a>, <a href="../../../../index.html#key627">partition</a>, <a href="../../../../index.html#key628">partitioned set</a>, <a href="../../../../index.html#key624">union</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/graph.html.























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779

<div class='fossil-doc' data-title='struct::graph - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::graph(n) 2.4 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::graph - Create and manipulate directed graph objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Changes for 2.0</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::graph <span class="opt">?2.4?</span></b></li>
<li>package require <b class="pkgname">struct::list <span class="opt">?1.5?</span></b></li>
<li>package require <b class="pkgname">struct::set <span class="opt">?2.2.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::graph</b> <span class="opt">?<i class="arg">graphName</i>?</span> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">source</i>?</span></a></li>
<li><a href="#2"><b class="cmd">graphName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">graphName</i> <b class="method">=</b> <i class="arg">sourcegraph</i></a></li>
<li><a href="#4"><i class="arg">graphName</i> <b class="method">--&gt;</b> <i class="arg">destgraph</i></a></li>
<li><a href="#5"><i class="arg">graphName</i> <b class="method">append</b> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#6"><i class="arg">graphName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></li>
<li><a href="#7"><i class="arg">graphName</i> <b class="method">destroy</b></a></li>
<li><a href="#8"><i class="arg">graphName</i> <b class="method">arc append</b> <i class="arg">arc</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#9"><i class="arg">graphName</i> <b class="method">arc attr</b> <i class="arg">key</i></a></li>
<li><a href="#10"><i class="arg">graphName</i> <b class="method">arc attr</b> <i class="arg">key</i> <b class="option">-arcs</b> <i class="arg">list</i></a></li>
<li><a href="#11"><i class="arg">graphName</i> <b class="method">arc attr</b> <i class="arg">key</i> <b class="option">-glob</b> <i class="arg">globpattern</i></a></li>
<li><a href="#12"><i class="arg">graphName</i> <b class="method">arc attr</b> <i class="arg">key</i> <b class="option">-regexp</b> <i class="arg">repattern</i></a></li>
<li><a href="#13"><i class="arg">graphName</i> <b class="method">arc delete</b> <i class="arg">arc</i> <span class="opt">?<i class="arg">arc</i> ...?</span></a></li>
<li><a href="#14"><i class="arg">graphName</i> <b class="method">arc exists</b> <i class="arg">arc</i></a></li>
<li><a href="#15"><i class="arg">graphName</i> <b class="method">arc flip</b> <i class="arg">arc</i></a></li>
<li><a href="#16"><i class="arg">graphName</i> <b class="method">arc get</b> <i class="arg">arc</i> <i class="arg">key</i></a></li>
<li><a href="#17"><i class="arg">graphName</i> <b class="method">arc getall</b> <i class="arg">arc</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#18"><i class="arg">graphName</i> <b class="method">arc getunweighted</b></a></li>
<li><a href="#19"><i class="arg">graphName</i> <b class="method">arc getweight</b> <i class="arg">arc</i></a></li>
<li><a href="#20"><i class="arg">graphName</i> <b class="method">arc keys</b> <i class="arg">arc</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#21"><i class="arg">graphName</i> <b class="method">arc keyexists</b> <i class="arg">arc</i> <i class="arg">key</i></a></li>
<li><a href="#22"><i class="arg">graphName</i> <b class="method">arc insert</b> <i class="arg">start</i> <i class="arg">end</i> <span class="opt">?<i class="arg">child</i>?</span></a></li>
<li><a href="#23"><i class="arg">graphName</i> <b class="method">arc lappend</b> <i class="arg">arc</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#24"><i class="arg">graphName</i> <b class="method">arc rename</b> <i class="arg">arc</i> <i class="arg">newname</i></a></li>
<li><a href="#25"><i class="arg">graphName</i> <b class="method">arc set</b> <i class="arg">arc</i> <i class="arg">key</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#26"><i class="arg">graphName</i> <b class="method">arc setunweighted</b> <span class="opt">?<i class="arg">weight</i>?</span></a></li>
<li><a href="#27"><i class="arg">graphName</i> <b class="method">arc setweight</b> <i class="arg">arc</i> <i class="arg">weight</i></a></li>
<li><a href="#28"><i class="arg">graphName</i> <b class="method">arc unsetweight</b> <i class="arg">arc</i></a></li>
<li><a href="#29"><i class="arg">graphName</i> <b class="method">arc hasweight</b> <i class="arg">arc</i></a></li>
<li><a href="#30"><i class="arg">graphName</i> <b class="method">arc source</b> <i class="arg">arc</i></a></li>
<li><a href="#31"><i class="arg">graphName</i> <b class="method">arc target</b> <i class="arg">arc</i></a></li>
<li><a href="#32"><i class="arg">graphName</i> <b class="method">arc nodes</b> <i class="arg">arc</i></a></li>
<li><a href="#33"><i class="arg">graphName</i> <b class="method">arc move-source</b> <i class="arg">arc</i> <i class="arg">newsource</i></a></li>
<li><a href="#34"><i class="arg">graphName</i> <b class="method">arc move-target</b> <i class="arg">arc</i> <i class="arg">newtarget</i></a></li>
<li><a href="#35"><i class="arg">graphName</i> <b class="method">arc move</b> <i class="arg">arc</i> <i class="arg">newsource</i> <i class="arg">newtarget</i></a></li>
<li><a href="#36"><i class="arg">graphName</i> <b class="method">arc unset</b> <i class="arg">arc</i> <i class="arg">key</i></a></li>
<li><a href="#37"><i class="arg">graphName</i> <b class="method">arc weights</b></a></li>
<li><a href="#38"><i class="arg">graphName</i> <b class="method">arcs</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?-value <i class="arg">value</i>?</span> <span class="opt">?-filter <i class="arg">cmdprefix</i>?</span> <span class="opt">?-in|-out|-adj|-inner|-embedding <i class="arg">node node...</i>?</span></a></li>
<li><a href="#39"><i class="arg">graphName</i> <b class="method">lappend</b> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#40"><i class="arg">graphName</i> <b class="method">node append</b> <i class="arg">node</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#41"><i class="arg">graphName</i> <b class="method">node attr</b> <i class="arg">key</i></a></li>
<li><a href="#42"><i class="arg">graphName</i> <b class="method">node attr</b> <i class="arg">key</i> <b class="option">-nodes</b> <i class="arg">list</i></a></li>
<li><a href="#43"><i class="arg">graphName</i> <b class="method">node attr</b> <i class="arg">key</i> <b class="option">-glob</b> <i class="arg">globpattern</i></a></li>
<li><a href="#44"><i class="arg">graphName</i> <b class="method">node attr</b> <i class="arg">key</i> <b class="option">-regexp</b> <i class="arg">repattern</i></a></li>
<li><a href="#45"><i class="arg">graphName</i> <b class="method">node degree</b> <span class="opt">?-in|-out?</span> <i class="arg">node</i></a></li>
<li><a href="#46"><i class="arg">graphName</i> <b class="method">node delete</b> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i>...?</span></a></li>
<li><a href="#47"><i class="arg">graphName</i> <b class="method">node exists</b> <i class="arg">node</i></a></li>
<li><a href="#48"><i class="arg">graphName</i> <b class="method">node get</b> <i class="arg">node</i> <i class="arg">key</i></a></li>
<li><a href="#49"><i class="arg">graphName</i> <b class="method">node getall</b> <i class="arg">node</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#50"><i class="arg">graphName</i> <b class="method">node keys</b> <i class="arg">node</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#51"><i class="arg">graphName</i> <b class="method">node keyexists</b> <i class="arg">node</i> <i class="arg">key</i></a></li>
<li><a href="#52"><i class="arg">graphName</i> <b class="method">node insert</b> <span class="opt">?<i class="arg">node</i>...?</span></a></li>
<li><a href="#53"><i class="arg">graphName</i> <b class="method">node lappend</b> <i class="arg">node</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#54"><i class="arg">graphName</i> <b class="method">node opposite</b> <i class="arg">node</i> <i class="arg">arc</i></a></li>
<li><a href="#55"><i class="arg">graphName</i> <b class="method">node rename</b> <i class="arg">node</i> <i class="arg">newname</i></a></li>
<li><a href="#56"><i class="arg">graphName</i> <b class="method">node set</b> <i class="arg">node</i> <i class="arg">key</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#57"><i class="arg">graphName</i> <b class="method">node unset</b> <i class="arg">node</i> <i class="arg">key</i></a></li>
<li><a href="#58"><i class="arg">graphName</i> <b class="method">nodes</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?-value <i class="arg">value</i>?</span> <span class="opt">?-filter <i class="arg">cmdprefix</i>?</span> <span class="opt">?-in|-out|-adj|-inner|-embedding <i class="arg">node</i> <i class="arg">node</i>...?</span></a></li>
<li><a href="#59"><i class="arg">graphName</i> <b class="method">get</b> <i class="arg">key</i></a></li>
<li><a href="#60"><i class="arg">graphName</i> <b class="method">getall</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#61"><i class="arg">graphName</i> <b class="method">keys</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#62"><i class="arg">graphName</i> <b class="method">keyexists</b> <i class="arg">key</i></a></li>
<li><a href="#63"><i class="arg">graphName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">node</i>...?</span></a></li>
<li><a href="#64"><i class="arg">graphName</i> <b class="method">set</b> <i class="arg">key</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#65"><i class="arg">graphName</i> <b class="method">swap</b> <i class="arg">node1</i> <i class="arg">node2</i></a></li>
<li><a href="#66"><i class="arg">graphName</i> <b class="method">unset</b> <i class="arg">key</i></a></li>
<li><a href="#67"><i class="arg">graphName</i> <b class="method">walk</b> <i class="arg">node</i> <span class="opt">?-order <i class="arg">order</i>?</span> <span class="opt">?-type <i class="arg">type</i>?</span> <span class="opt">?-dir <i class="arg">direction</i>?</span> -command <i class="arg">cmd</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>A directed graph is a structure containing two collections of
elements, called <i class="term">nodes</i> and <i class="term">arcs</i> respectively, together
with a relation (&quot;connectivity&quot;) that places a general structure upon
the nodes and arcs.</p>
<p>Each arc is connected to two nodes, one of which is called the
<i class="term"><a href="../../../../index.html#key436">source</a></i> and the other the <i class="term">target</i>. This imposes a
direction upon the arc, which is said to go from the source to the
target. It is allowed that source and target of an arc are the same
node. Such an arc is called a <i class="term"><a href="../../../../index.html#key457">loop</a></i>.
Whenever a node is either the source or target of an arc both are said
to be <i class="term"><a href="../../../../index.html#key485">adjacent</a></i>. This extends into a relation between nodes,
i.e. if two nodes are connected through at least one arc they are said
to be <i class="term"><a href="../../../../index.html#key485">adjacent</a></i> too.</p>
<p>Each node can be the source and target for any number of arcs. The
former are called the <i class="term">outgoing arcs</i> of the node, the latter
the <i class="term">incoming arcs</i> of the node. The number of arcs in either
set is called the <i class="term">in-degree</i> resp. the <i class="term">out-degree</i> of the
node.</p>
<p>In addition to maintaining the node and arc relationships, this graph
implementation allows any number of named <i class="term">attributes</i> to be
associated with the graph itself, and each node or arc.</p>
<p><em>Note:</em> The major version of the package <b class="package"><a href="../../../../index.html#key327">struct</a></b> has
been changed to version 2.0, due to backward incompatible changes in
the API of this module. Please read the section
<span class="sectref"><a href="#section2">Changes for 2.0</a></span> for a full list of all changes,
incompatible and otherwise.</p>
<p><em>Note:</em> A C-implementation of the command can be had from the
location <a href="http://www.purl.org/NET/schlenker/tcl/cgraph">http://www.purl.org/NET/schlenker/tcl/cgraph</a>. See also
<a href="http://wiki.tcl.tk/cgraph">http://wiki.tcl.tk/cgraph</a>.  This implementation uses a bit less
memory than the tcl version provided here directly, and is faster. Its
support is limited to versions of the package before 2.0.</p>
<p>As of version 2.2 of this package a critcl based C implementation is
available from here as well. This implementation however requires Tcl
8.4 to run.</p>
<p>The main command of the package is:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::struct::graph</b> <span class="opt">?<i class="arg">graphName</i>?</span> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">source</i>?</span></a></dt>
<dd><p>The command creates a new graph object with an associated global Tcl
command whose name is <i class="arg">graphName</i>.  This command may be used to
invoke various operations on the graph.  It has the following general
form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">graphName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>If <i class="arg">graphName</i> is not specified a unique name will be generated by
the package itself. If a <i class="arg">source</i> is specified the new graph will
be initialized to it. For the operators <b class="const">=</b>, <b class="const">:=</b>, and
<b class="const">as</b> the <i class="arg">source</i> argument is interpreted as the name of
another graph object, and the assignment operator <b class="method">=</b> will be
executed. For the operator <b class="const">deserialize</b> the <i class="arg">source</i> is a
serialized graph object and <b class="method">deserialize</b> will be executed.</p>
<p>In other words</p>
<pre class="doctools_example">
    ::struct::graph mygraph = b
</pre>
<p>is equivalent to</p>
<pre class="doctools_example">
    ::struct::graph mygraph
    mygraph = b
</pre>
<p>and</p>
<pre class="doctools_example">
    ::struct::graph mygraph deserialize $b
</pre>
<p>is equivalent to</p>
<pre class="doctools_example">
    ::struct::graph mygraph
    mygraph deserialize $b
</pre>
</dd>
</dl>
<p>The following commands are possible for graph objects:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">graphName</i> <b class="method">=</b> <i class="arg">sourcegraph</i></a></dt>
<dd><p>This is the <i class="term">assignment</i> operator for graph objects. It copies
the graph contained in the graph object <i class="arg">sourcegraph</i> over the
graph data in <i class="arg">graphName</i>. The old contents of <i class="arg">graphName</i> are
deleted by this operation.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">graphName</i> <b class="method">deserialize</b> [<i class="arg">sourcegraph</i> <b class="method">serialize</b>]
</pre>
<p>The operation assumes that the <i class="arg">sourcegraph</i> provides the method
<b class="method">serialize</b> and that this method returns a valid graph
serialization.</p></dd>
<dt><a name="4"><i class="arg">graphName</i> <b class="method">--&gt;</b> <i class="arg">destgraph</i></a></dt>
<dd><p>This is the <i class="term">reverse assignment</i> operator for graph objects. It
copies the graph contained in the graph object <i class="arg">graphName</i> over
the graph data in the object <i class="arg">destgraph</i>.
The old contents of <i class="arg">destgraph</i> are deleted by this operation.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">destgraph</i> <b class="method">deserialize</b> [<i class="arg">graphName</i> <b class="method">serialize</b>]
</pre>
<p>The operation assumes that the <i class="arg">destgraph</i> provides the method
<b class="method">deserialize</b> and that this method takes a graph serialization.</p></dd>
<dt><a name="5"><i class="arg">graphName</i> <b class="method">append</b> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> to one of the keyed values associated with the graph.
Returns the new value given to the attribute <i class="arg">key</i>.</p></dd>
<dt><a name="6"><i class="arg">graphName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></dt>
<dd><p>This is the complement to <b class="method">serialize</b>. It replaces the graph
data in <i class="arg">graphName</i> with the graph described by the
<i class="arg">serialization</i> value. The old contents of <i class="arg">graphName</i> are
deleted by this operation.</p></dd>
<dt><a name="7"><i class="arg">graphName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the graph, including its storage space and associated command.</p></dd>
<dt><a name="8"><i class="arg">graphName</i> <b class="method">arc append</b> <i class="arg">arc</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> to one of the keyed values associated with an
<i class="arg">arc</i>. Returns the new value given to the attribute <i class="arg">key</i>.</p></dd>
<dt><a name="9"><i class="arg">graphName</i> <b class="method">arc attr</b> <i class="arg">key</i></a></dt>
<dd></dd>
<dt><a name="10"><i class="arg">graphName</i> <b class="method">arc attr</b> <i class="arg">key</i> <b class="option">-arcs</b> <i class="arg">list</i></a></dt>
<dd></dd>
<dt><a name="11"><i class="arg">graphName</i> <b class="method">arc attr</b> <i class="arg">key</i> <b class="option">-glob</b> <i class="arg">globpattern</i></a></dt>
<dd></dd>
<dt><a name="12"><i class="arg">graphName</i> <b class="method">arc attr</b> <i class="arg">key</i> <b class="option">-regexp</b> <i class="arg">repattern</i></a></dt>
<dd><p>This method retrieves the value of the attribute named <i class="arg">key</i>, for
all arcs in the graph (matching the restriction specified via one of
the possible options) and having the specified attribute.</p>
<p>The result is a dictionary mapping from arc names to the value of
attribute <i class="arg">key</i> at that arc.
Arcs not having the attribute <i class="arg">key</i>, or not passing a
specified restriction, are not listed in the result.</p>
<p>The possible restrictions are:</p>
<dl class="doctools_options">
<dt><b class="option">-arcs</b></dt>
<dd><p>The value is a list of arcs. Only the arcs mentioned in this list
are searched for the attribute.</p></dd>
<dt><b class="option">-glob</b></dt>
<dd><p>The value is a glob pattern. Only the arcs in the graph whose names
match this pattern are searched for the attribute.</p></dd>
<dt><b class="option">-regexp</b></dt>
<dd><p>The value is a regular expression. Only the arcs in the graph whose
names match this pattern are searched for the attribute.</p></dd>
</dl></dd>
<dt><a name="13"><i class="arg">graphName</i> <b class="method">arc delete</b> <i class="arg">arc</i> <span class="opt">?<i class="arg">arc</i> ...?</span></a></dt>
<dd><p>Remove the specified arcs from the graph.</p></dd>
<dt><a name="14"><i class="arg">graphName</i> <b class="method">arc exists</b> <i class="arg">arc</i></a></dt>
<dd><p>Return true if the specified <i class="arg">arc</i> exists in the graph.</p></dd>
<dt><a name="15"><i class="arg">graphName</i> <b class="method">arc flip</b> <i class="arg">arc</i></a></dt>
<dd><p>Reverses the direction of the named <i class="arg">arc</i>, i.e. the source and
target nodes of the arc are exchanged with each other.</p></dd>
<dt><a name="16"><i class="arg">graphName</i> <b class="method">arc get</b> <i class="arg">arc</i> <i class="arg">key</i></a></dt>
<dd><p>Returns the value associated with the key <i class="arg">key</i> for the <i class="arg">arc</i>.</p></dd>
<dt><a name="17"><i class="arg">graphName</i> <b class="method">arc getall</b> <i class="arg">arc</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a dictionary (suitable for use with [<b class="cmd">array set</b>])
for the <i class="arg">arc</i>.
If the <i class="arg">pattern</i> is specified only the attributes whose names
match the pattern will be part of the returned dictionary. The pattern
is a <b class="cmd">glob</b> pattern.</p></dd>
<dt><a name="18"><i class="arg">graphName</i> <b class="method">arc getunweighted</b></a></dt>
<dd><p>Returns a list containing the names of all arcs in the graph which
have no weight associated with them.</p></dd>
<dt><a name="19"><i class="arg">graphName</i> <b class="method">arc getweight</b> <i class="arg">arc</i></a></dt>
<dd><p>Returns the weight associated with the <i class="arg">arc</i>. Throws an error if
the arc has no weight associated with it.</p></dd>
<dt><a name="20"><i class="arg">graphName</i> <b class="method">arc keys</b> <i class="arg">arc</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of keys for the <i class="arg">arc</i>.
If the <i class="arg">pattern</i> is specified only the attributes whose names
match the pattern will be part of the returned list. The pattern is a
<b class="cmd">glob</b> pattern.</p></dd>
<dt><a name="21"><i class="arg">graphName</i> <b class="method">arc keyexists</b> <i class="arg">arc</i> <i class="arg">key</i></a></dt>
<dd><p>Return true if the specified <i class="arg">key</i> exists for the <i class="arg">arc</i>.</p></dd>
<dt><a name="22"><i class="arg">graphName</i> <b class="method">arc insert</b> <i class="arg">start</i> <i class="arg">end</i> <span class="opt">?<i class="arg">child</i>?</span></a></dt>
<dd><p>Insert an arc named <i class="arg">child</i> into the graph beginning at the node
<i class="arg">start</i> and ending at the node <i class="arg">end</i>. If the name of the new
arc is not specified the system will generate a unique name of the
form <em>arc</em><i class="arg">x</i>.</p></dd>
<dt><a name="23"><i class="arg">graphName</i> <b class="method">arc lappend</b> <i class="arg">arc</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> (as a list) to one of the keyed values
associated with an <i class="arg">arc</i>. Returns the new value given to the
attribute <i class="arg">key</i>.</p></dd>
<dt><a name="24"><i class="arg">graphName</i> <b class="method">arc rename</b> <i class="arg">arc</i> <i class="arg">newname</i></a></dt>
<dd><p>Renames the arc <i class="arg">arc</i> to <i class="arg">newname</i>. An error is thrown if
either the arc does not exist, or a arc with name <i class="arg">newname</i> does
exist. The result of the command is the new name of the arc.</p></dd>
<dt><a name="25"><i class="arg">graphName</i> <b class="method">arc set</b> <i class="arg">arc</i> <i class="arg">key</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Set or get one of the keyed values associated with an arc.
An arc may have any number of keyed values associated with it.
If <i class="arg">value</i> is not specified, this command returns the current value assigned to the key;
if <i class="arg">value</i> is specified, this command assigns that value to the key, and returns
that value.</p></dd>
<dt><a name="26"><i class="arg">graphName</i> <b class="method">arc setunweighted</b> <span class="opt">?<i class="arg">weight</i>?</span></a></dt>
<dd><p>Sets the weight of all arcs without a weight to <i class="arg">weight</i>. Returns
the empty string as its result. If not present <i class="arg">weight</i> defaults
to <b class="const">0</b>.</p></dd>
<dt><a name="27"><i class="arg">graphName</i> <b class="method">arc setweight</b> <i class="arg">arc</i> <i class="arg">weight</i></a></dt>
<dd><p>Sets the weight of the <i class="arg">arc</i> to <i class="arg">weight</i>. Returns <i class="arg">weight</i>.</p></dd>
<dt><a name="28"><i class="arg">graphName</i> <b class="method">arc unsetweight</b> <i class="arg">arc</i></a></dt>
<dd><p>Removes the weight of the <i class="arg">arc</i>, if present. Does nothing
otherwise. Returns the empty string.</p></dd>
<dt><a name="29"><i class="arg">graphName</i> <b class="method">arc hasweight</b> <i class="arg">arc</i></a></dt>
<dd><p>Determines if the <i class="arg">arc</i> has a weight associated with it.  The
result is a boolean value, <b class="const">True</b> if a weight is defined, and
<b class="const">False</b> otherwise.</p></dd>
<dt><a name="30"><i class="arg">graphName</i> <b class="method">arc source</b> <i class="arg">arc</i></a></dt>
<dd><p>Return the node the given <i class="arg">arc</i> begins at.</p></dd>
<dt><a name="31"><i class="arg">graphName</i> <b class="method">arc target</b> <i class="arg">arc</i></a></dt>
<dd><p>Return the node the given <i class="arg">arc</i> ends at.</p></dd>
<dt><a name="32"><i class="arg">graphName</i> <b class="method">arc nodes</b> <i class="arg">arc</i></a></dt>
<dd><p>Return the nodes the given <i class="arg">arc</i> begins and ends at,
as a two-element list.</p></dd>
<dt><a name="33"><i class="arg">graphName</i> <b class="method">arc move-source</b> <i class="arg">arc</i> <i class="arg">newsource</i></a></dt>
<dd><p>Changes the source node of the arc to <i class="arg">newsource</i>. It can be said
that the arc rotates around its target node.</p></dd>
<dt><a name="34"><i class="arg">graphName</i> <b class="method">arc move-target</b> <i class="arg">arc</i> <i class="arg">newtarget</i></a></dt>
<dd><p>Changes the target node of the arc to <i class="arg">newtarget</i>. It can be said
that the arc rotates around its source node.</p></dd>
<dt><a name="35"><i class="arg">graphName</i> <b class="method">arc move</b> <i class="arg">arc</i> <i class="arg">newsource</i> <i class="arg">newtarget</i></a></dt>
<dd><p>Changes both source and target nodes of the arc to <i class="arg">newsource</i>,
and <i class="arg">newtarget</i> resp.</p></dd>
<dt><a name="36"><i class="arg">graphName</i> <b class="method">arc unset</b> <i class="arg">arc</i> <i class="arg">key</i></a></dt>
<dd><p>Remove a keyed value from the arc <i class="arg">arc</i>. The method will do
nothing if the <i class="arg">key</i> does not exist.</p></dd>
<dt><a name="37"><i class="arg">graphName</i> <b class="method">arc weights</b></a></dt>
<dd><p>Returns a dictionary whose keys are the names of all arcs which have a
weight associated with them, and the values are these weights.</p></dd>
<dt><a name="38"><i class="arg">graphName</i> <b class="method">arcs</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?-value <i class="arg">value</i>?</span> <span class="opt">?-filter <i class="arg">cmdprefix</i>?</span> <span class="opt">?-in|-out|-adj|-inner|-embedding <i class="arg">node node...</i>?</span></a></dt>
<dd><p>Returns a list of arcs in the graph. If no restriction is specified a
list containing all arcs is returned. Restrictions can limit the list
of returned arcs based on the nodes that are connected by the arc, on
the keyed values associated with the arc, or both. A general filter
command can be used as well. The restrictions that involve connected
nodes take a variable number of nodes as argument, specified after the
name of the restriction itself.</p>
<p>The restrictions imposed by either <b class="option">-in</b>, <b class="option">-out</b>,
<b class="option">-adj</b>, <b class="option">-inner</b>, or <b class="option">-embedded</b> are applied
first. Specifying more than one of them is illegal.</p>
<p>After that the restrictions set via <b class="option">-key</b> (and
<b class="option">-value</b>) are applied. Specifying more than one <b class="option">-key</b>
(and <b class="option">-value</b>) is illegal. Specifying <b class="option">-value</b> alone,
without <b class="option">-key</b> is illegal as well.</p>
<p>Any restriction set through <b class="option">-filter</b> is applied
last. Specifying more than one <b class="option">-filter</b> is illegal.</p>
<p>Coming back to the restrictions based on a set of nodes, the command
recognizes the following switches:</p>
<dl class="doctools_definitions">
<dt><b class="option">-in</b></dt>
<dd><p>Return a list of all arcs whose target is one of the nodes in the set
of nodes. I.e. it computes the union of all incoming arcs of the nodes
in the set.</p></dd>
<dt><b class="option">-out</b></dt>
<dd><p>Return a list of all arcs whose source is one of the nodes in the set
of nodes. I.e. it computes the union of all outgoing arcs of the nodes
in the set.</p></dd>
<dt><b class="option">-adj</b></dt>
<dd><p>Return a list of all arcs adjacent to at least one of the nodes in the
set. This is the union of the nodes returned by <b class="option">-in</b> and
<b class="option">-out</b>.</p></dd>
<dt><b class="option">-inner</b></dt>
<dd><p>Return a list of all arcs which are adjacent to two of the nodes in
the set. This is the set of arcs in the subgraph spawned by the
specified nodes.</p></dd>
<dt><b class="option">-embedding</b></dt>
<dd><p>Return a list of all arcs adjacent to exactly one of the nodes in the
set. This is the set of arcs connecting the subgraph spawned by the
specified nodes to the rest of the graph.</p></dd>
<dt><b class="option">-key</b> <i class="arg">key</i></dt>
<dd><p>Limit the list of arcs that are returned to those arcs that have an
associated key <i class="arg">key</i>.</p></dd>
<dt><b class="option">-value</b> <i class="arg">value</i></dt>
<dd><p>This restriction can only be used in combination with
<b class="option">-key</b>. It limits the list of arcs that are returned to those
arcs whose associated key <i class="arg">key</i> has the value <i class="arg">value</i>.</p></dd>
<dt><b class="option">-filter</b> <i class="arg">cmdrefix</i></dt>
<dd><p>Limit the list of arcs that are returned to those arcs that pass the
test. The command in <i class="arg">cmdprefix</i> is called with two arguments, the
name of the graph object, and the name of the arc in question. It is
executed in the context of the caller and has to return a boolean
value. Arcs for which the command returns <b class="const">false</b> are removed
from the result list before it is returned to the caller.</p></dd>
</dl></dd>
<dt><a name="39"><i class="arg">graphName</i> <b class="method">lappend</b> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> (as a list) to one of the keyed values
associated with the graph. Returns the new value given to the
attribute <i class="arg">key</i>.</p></dd>
<dt><a name="40"><i class="arg">graphName</i> <b class="method">node append</b> <i class="arg">node</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> to one of the keyed values associated with an
<i class="arg">node</i>. Returns the new value given to the attribute <i class="arg">key</i>.</p></dd>
<dt><a name="41"><i class="arg">graphName</i> <b class="method">node attr</b> <i class="arg">key</i></a></dt>
<dd></dd>
<dt><a name="42"><i class="arg">graphName</i> <b class="method">node attr</b> <i class="arg">key</i> <b class="option">-nodes</b> <i class="arg">list</i></a></dt>
<dd></dd>
<dt><a name="43"><i class="arg">graphName</i> <b class="method">node attr</b> <i class="arg">key</i> <b class="option">-glob</b> <i class="arg">globpattern</i></a></dt>
<dd></dd>
<dt><a name="44"><i class="arg">graphName</i> <b class="method">node attr</b> <i class="arg">key</i> <b class="option">-regexp</b> <i class="arg">repattern</i></a></dt>
<dd><p>This method retrieves the value of the attribute named <i class="arg">key</i>, for
all nodes in the graph (matching the restriction specified via one of
the possible options) and having the specified attribute.</p>
<p>The result is a dictionary mapping from node names to the value of
attribute <i class="arg">key</i> at that node.
Nodes not having the attribute <i class="arg">key</i>, or not passing a
specified restriction, are not listed in the result.</p>
<p>The possible restrictions are:</p>
<dl class="doctools_options">
<dt><b class="option">-nodes</b></dt>
<dd><p>The value is a list of nodes. Only the nodes mentioned in this list
are searched for the attribute.</p></dd>
<dt><b class="option">-glob</b></dt>
<dd><p>The value is a glob pattern. Only the nodes in the graph whose names
match this pattern are searched for the attribute.</p></dd>
<dt><b class="option">-regexp</b></dt>
<dd><p>The value is a regular expression. Only the nodes in the graph whose
names match this pattern are searched for the attribute.</p></dd>
</dl></dd>
<dt><a name="45"><i class="arg">graphName</i> <b class="method">node degree</b> <span class="opt">?-in|-out?</span> <i class="arg">node</i></a></dt>
<dd><p>Return the number of arcs adjacent to the specified <i class="arg">node</i>. If one
of the restrictions <b class="option">-in</b> or <b class="option">-out</b> is given only the
incoming resp. outgoing arcs are counted.</p></dd>
<dt><a name="46"><i class="arg">graphName</i> <b class="method">node delete</b> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i>...?</span></a></dt>
<dd><p>Remove the specified nodes from the graph.  All of the nodes' arcs
will be removed as well to prevent unconnected arcs.</p></dd>
<dt><a name="47"><i class="arg">graphName</i> <b class="method">node exists</b> <i class="arg">node</i></a></dt>
<dd><p>Return true if the specified <i class="arg">node</i> exists in the graph.</p></dd>
<dt><a name="48"><i class="arg">graphName</i> <b class="method">node get</b> <i class="arg">node</i> <i class="arg">key</i></a></dt>
<dd><p>Return the value associated with the key <i class="arg">key</i> for the <i class="arg">node</i>.</p></dd>
<dt><a name="49"><i class="arg">graphName</i> <b class="method">node getall</b> <i class="arg">node</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a dictionary (suitable for use with [<b class="cmd">array set</b>])
for the <i class="arg">node</i>.
If the <i class="arg">pattern</i> is specified only the attributes whose names
match the pattern will be part of the returned dictionary. The pattern
is a <b class="cmd">glob</b> pattern.</p></dd>
<dt><a name="50"><i class="arg">graphName</i> <b class="method">node keys</b> <i class="arg">node</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of keys for the <i class="arg">node</i>.
If the <i class="arg">pattern</i> is specified only the attributes whose names
match the pattern will be part of the returned list. The pattern is a
<b class="cmd">glob</b> pattern.</p></dd>
<dt><a name="51"><i class="arg">graphName</i> <b class="method">node keyexists</b> <i class="arg">node</i> <i class="arg">key</i></a></dt>
<dd><p>Return true if the specified <i class="arg">key</i> exists for the <i class="arg">node</i>.</p></dd>
<dt><a name="52"><i class="arg">graphName</i> <b class="method">node insert</b> <span class="opt">?<i class="arg">node</i>...?</span></a></dt>
<dd><p>Insert one or more nodes into the graph. The new nodes have no arcs
connected to them. If no node is specified one node will be inserted,
and the system will generate a unique name of the form
<em>node</em><i class="arg">x</i> for it.</p></dd>
<dt><a name="53"><i class="arg">graphName</i> <b class="method">node lappend</b> <i class="arg">node</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> (as a list) to one of the keyed values
associated with an <i class="arg">node</i>. Returns the new value given to the
attribute <i class="arg">key</i>.</p></dd>
<dt><a name="54"><i class="arg">graphName</i> <b class="method">node opposite</b> <i class="arg">node</i> <i class="arg">arc</i></a></dt>
<dd><p>Return the node at the other end of the specified <i class="arg">arc</i>, which has
to be adjacent to the given <i class="arg">node</i>.</p></dd>
<dt><a name="55"><i class="arg">graphName</i> <b class="method">node rename</b> <i class="arg">node</i> <i class="arg">newname</i></a></dt>
<dd><p>Renames the node <i class="arg">node</i> to <i class="arg">newname</i>. An error is thrown if
either the node does not exist, or a node with name <i class="arg">newname</i> does
exist. The result of the command is the new name of the node.</p></dd>
<dt><a name="56"><i class="arg">graphName</i> <b class="method">node set</b> <i class="arg">node</i> <i class="arg">key</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Set or get one of the keyed values associated with a node. A node may have any
number of keyed values associated with it.  If <i class="arg">value</i> is not
specified, this command returns the current value assigned to the key;
if <i class="arg">value</i> is specified, this command assigns that value to the
key.</p></dd>
<dt><a name="57"><i class="arg">graphName</i> <b class="method">node unset</b> <i class="arg">node</i> <i class="arg">key</i></a></dt>
<dd><p>Remove a keyed value from the node <i class="arg">node</i>. The method will do
nothing if the <i class="arg">key</i> does not exist.</p></dd>
<dt><a name="58"><i class="arg">graphName</i> <b class="method">nodes</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?-value <i class="arg">value</i>?</span> <span class="opt">?-filter <i class="arg">cmdprefix</i>?</span> <span class="opt">?-in|-out|-adj|-inner|-embedding <i class="arg">node</i> <i class="arg">node</i>...?</span></a></dt>
<dd><p>Return a list of nodes in the graph. Restrictions can limit the list
of returned nodes based on neighboring nodes, or based on the keyed
values associated with the node. The restrictions that involve
neighboring nodes have a list of nodes as argument, specified after
the name of the restriction itself.</p>
<p>The possible restrictions are the same as for method
<b class="method">arcs</b>. The exact meanings change slightly, as they operate on
nodes instead of arcs. The command recognizes:</p>
<dl class="doctools_definitions">
<dt><b class="option">-in</b></dt>
<dd><p>Return a list of all nodes with at least one outgoing arc ending in a
node found in the specified set of nodes. Alternatively specified as
the set of source nodes for the <b class="option">-in</b> arcs of the node set. The
<i class="term">incoming neighbours</i>.</p></dd>
<dt><b class="option">-out</b></dt>
<dd><p>Return a list of all nodes with at least one incoming arc starting in
a node found in the specified set of nodes. Alternatively specified as
the set of target nodes for the <b class="option">-out</b> arcs of the node
set. The <i class="term">outgoing neighbours</i>.</p></dd>
<dt><b class="option">-adj</b></dt>
<dd><p>This is the union of the nodes returned by <b class="option">-in</b> and
<b class="option">-out</b>. The <i class="term">neighbours</i>.</p></dd>
<dt><b class="option">-inner</b></dt>
<dd><p>The set of neighbours (see <b class="option">-adj</b> above) which are also in the
set of nodes. I.e. the intersection between the set of nodes and the
neighbours per <b class="option">-adj</b>.</p></dd>
<dt><b class="option">-embedding</b></dt>
<dd><p>The set of neighbours (see <b class="option">-adj</b> above) which are not in the
set of nodes. I.e. the difference between the neighbours as per
<b class="option">-adj</b>, and the set of nodes.</p></dd>
<dt><b class="option">-key</b> <i class="arg">key</i></dt>
<dd><p>Limit the list of nodes that are returned to those nodes that have an
associated key <i class="arg">key</i>.</p></dd>
<dt><b class="option">-value</b> <i class="arg">value</i></dt>
<dd><p>This restriction can only be used in combination with
<b class="option">-key</b>. It limits the list of nodes that are returned to those
nodes whose associated key <i class="arg">key</i> has the value <i class="arg">value</i>.</p></dd>
<dt><b class="option">-filter</b> <i class="arg">cmdrefix</i></dt>
<dd><p>Limit the list of nodes that are returned to those nodes that pass the
test. The command in <i class="arg">cmdprefix</i> is called with two arguments, the
name of the graph object, and the name of the node in question. It is
executed in the context of the caller and has to return a boolean
value. Nodes for which the command returns <b class="const">false</b> are removed
from the result list before it is returned to the caller.</p></dd>
</dl></dd>
<dt><a name="59"><i class="arg">graphName</i> <b class="method">get</b> <i class="arg">key</i></a></dt>
<dd><p>Return the value associated with the key <i class="arg">key</i> for the graph.</p></dd>
<dt><a name="60"><i class="arg">graphName</i> <b class="method">getall</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a dictionary (suitable for use with [<b class="cmd">array set</b>])
for the whole graph.
If the <i class="arg">pattern</i> is specified only the attributes whose names
match the pattern will be part of the returned dictionary. The pattern
is a <b class="cmd">glob</b> pattern.</p></dd>
<dt><a name="61"><i class="arg">graphName</i> <b class="method">keys</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of keys for the whole graph.
If the <i class="arg">pattern</i> is specified only the attributes whose names
match the pattern will be part of the returned list. The pattern is a
<b class="cmd">glob</b> pattern.</p></dd>
<dt><a name="62"><i class="arg">graphName</i> <b class="method">keyexists</b> <i class="arg">key</i></a></dt>
<dd><p>Return true if the specified <i class="arg">key</i> exists for the whole graph.</p></dd>
<dt><a name="63"><i class="arg">graphName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">node</i>...?</span></a></dt>
<dd><p>This method serializes the sub-graph spanned up by the <i class="arg">node</i>s. In
other words it returns a tcl value completely describing that
graph. If no nodes are specified the whole graph will be serialized.
This allows, for example, the transfer of graph objects (or parts
thereof) over arbitrary channels, persistence, etc.
This method is also the basis for both the copy constructor and
the assignment operator.</p>
<p>The result of this method has to be semantically identical over all
implementations of the graph interface. This is what will enable us to
copy graph data between different implementations of the same
interface.</p>
<p>The result is a list containing a multiple of three items, plus one!
In other words, '[llength $serial] % 3 == 1'. Valid values
include 1, 4, 7, ...</p>
<p>The last element of the list is a dictionary containing the attributes
associated with the whole graph.
Regarding the other elements; each triple consists of</p>
<ol class="doctools_enumerated">
<li><p>The name of the node to be described,</p></li>
<li><p>A dictionary containing the attributes associated with the node,</p></li>
<li><p>And a list describing all the arcs starting at that node.</p></li>
</ol>
<p>The elements of the arc list are lists containing three or four
elements each, i.e.</p>
<ol class="doctools_enumerated">
<li><p>The name of the arc described by the element,</p></li>
<li><p>A reference to the destination node of the arc. This reference is an
integer number given the index of that node in the main serialization
list. As that it is greater than or equal to zero, less than the
length of the serialization, and a multiple of three.
<em>Note:</em> For internal consistency no arc name may be used twice,
whether in the same node, or at some other node. This is a global
consistency requirement for the serialization.</p></li>
<li><p>And a dictionary containing the attributes associated with the arc.</p></li>
<li><p>The weight associated with the arc. This value is optional. Its
non-presence means that the arc in question has no weight associated
with it.</p>
<p><em>Note:</em> This information is new, compared to the
serialization of <b class="package"><a href="../../../../index.html#key305">graph</a></b> 2.3 and earlier. By making it an
optional element the new format is maximally compatible with the
old. This means that any graph not using weights will generate a
serialization which is still understood by the older graph package. A
serialization will not be understood any longer by the older packages
if, and only if the graph it was generated from actually has arcs with
weights.</p></li>
</ol>
<p>For all attribute dictionaries they keys are the names of the
attributes, and the values are the values for each name.</p>
<p><em>Note:</em> The order of the nodes in the serialization has no
relevance, nor has the order of the arcs per node.</p>
<pre class="doctools_example">
    # A possible serialization for the graph structure
    #
    #        d -----&gt; %2
    #       /         ^ \\
    #      /         /   \\
    #     /         b     \\
    #    /         /       \\
    #  %1 &lt;- a - %0         e
    #    ^         \\      /
    #     \\        c     /
    #      \\        \\  /
    #       \\        v v
    #        f ------ %3
    # is
    #
    # %3 {} {{f 6 {}}} %0 {} {{a 6 {}} {b 9 {}} {c 0 {}}} %1 {} {{d 9 {}}} %2 {} {{e 0 {}}} {}
    #
    # This assumes that the graph has neither attribute data nor weighted arcs.
</pre>
</dd>
<dt><a name="64"><i class="arg">graphName</i> <b class="method">set</b> <i class="arg">key</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Set or get one of the keyed values associated with a graph. A graph
may have any number of keyed values associated with it. If <i class="arg">value</i>
is not specified, this command returns the current value assigned to
the key; if <i class="arg">value</i> is specified, this command assigns that value
to the key.</p></dd>
<dt><a name="65"><i class="arg">graphName</i> <b class="method">swap</b> <i class="arg">node1</i> <i class="arg">node2</i></a></dt>
<dd><p>Swap the position of <i class="arg">node1</i> and <i class="arg">node2</i> in the graph.</p></dd>
<dt><a name="66"><i class="arg">graphName</i> <b class="method">unset</b> <i class="arg">key</i></a></dt>
<dd><p>Remove a keyed value from the graph. The method will do nothing if the
<i class="arg">key</i> does not exist.</p></dd>
<dt><a name="67"><i class="arg">graphName</i> <b class="method">walk</b> <i class="arg">node</i> <span class="opt">?-order <i class="arg">order</i>?</span> <span class="opt">?-type <i class="arg">type</i>?</span> <span class="opt">?-dir <i class="arg">direction</i>?</span> -command <i class="arg">cmd</i></a></dt>
<dd><p>Perform a breadth-first or depth-first walk of the graph starting at
the node <i class="arg">node</i> going in either the direction of outgoing or
opposite to the incoming arcs.</p>
<p>The type of walk, breadth-first or depth-first, is determined by the
value of <i class="arg">type</i>; <b class="const">bfs</b> indicates breadth-first,
<b class="const">dfs</b> indicates depth-first.  Depth-first is the default.</p>
<p>The order of the walk, pre-order, post-order or both-order is
determined by the value of <i class="arg">order</i>; <b class="const">pre</b> indicates
pre-order, <b class="const">post</b> indicates post-order, <b class="const">both</b> indicates
both-order. Pre-order is the default. Pre-order walking means that a
node is visited before any of its neighbors (as defined by the
<i class="arg">direction</i>, see below). Post-order walking means that a parent is
visited after any of its neighbors. Both-order walking means that a
node is visited before <em>and</em> after any of its neighbors. The
combination of a breadth-first walk with post- or both-order is illegal.</p>
<p>The direction of the walk is determined by the value of <i class="arg">dir</i>;
<b class="const">backward</b> indicates the direction opposite to the incoming
arcs, <b class="const">forward</b> indicates the direction of the outgoing arcs.</p>
<p>As the walk progresses, the command <i class="arg">cmd</i> will be evaluated at
each node, with the mode of the call (<b class="const">enter</b> or
<b class="const">leave</b>) and values <i class="arg">graphName</i> and the name of the current
node appended. For a pre-order walk, all nodes are <b class="const">enter</b>ed, for a
post-order all nodes are left. In a both-order walk the first visit of
a node <b class="const">enter</b>s it, the second visit <b class="const">leave</b>s it.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Changes for 2.0</a></h2>
<p>The following noteworthy changes have occurred:</p>
<ol class="doctools_enumerated">
<li><p>The API for accessing attributes and their values has been
simplified.</p>
<p>All functionality regarding the default attribute &quot;data&quot; has been
removed. This default attribute does not exist anymore. All accesses
to attributes have to specify the name of the attribute in
question. This backward <em>incompatible</em> change allowed us to
simplify the signature of all methods handling attributes.</p>
<p>Especially the flag <b class="option">-key</b> is not required anymore, even more,
its use is now forbidden. Please read the documentation for the arc
and node methods <b class="method">set</b>, <b class="method">get</b>, <b class="method">getall</b>,
<b class="method">unset</b>, <b class="method">append</b>, <b class="method">lappend</b>, <b class="method">keyexists</b>
and <b class="method">keys</b> for a description of the new API's.</p></li>
<li><p>The methods <b class="method">keys</b> and <b class="method">getall</b> now take an optional
pattern argument and will return only attribute data for keys matching
this pattern.</p></li>
<li><p>Arcs and nodes can now be renamed. See the documentation for the
methods <b class="method">arc rename</b> and <b class="method">node rename</b>.</p></li>
<li><p>The structure has been extended with API's for the serialization and
deserialization of graph objects, and a number of operations based on
them (graph assignment, copy construction).</p>
<p>Please read the documentation for the methods <b class="method">serialize</b>,
<b class="method">deserialize</b>, <b class="method">=</b>, and <b class="method">--&gt;</b>, and the
documentation on the construction of graph objects.</p>
<p>Beyond the copying of whole graph objects these new API's also enable
the transfer of graph objects over arbitrary channels and for easy
persistence.</p></li>
<li><p>A new method, <b class="method">attr</b>, was added to both <b class="method">arc</b> and
<b class="method">node</b> allowing the query and retrieval of attribute data
without regard to arc and node relationships.</p></li>
<li><p>Both methods <b class="method">arcs</b> and <b class="method">nodes</b> have been extended with
the ability to select arcs and nodes based on an arbitrary filtering
criterium.</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: graph</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key485">adjacent</a>, <a href="../../../../index.html#key473">arc</a>, <a href="../../../../index.html#key615">cgraph</a>, <a href="../../../../index.html#key475">degree</a>, <a href="../../../../index.html#key460">edge</a>, <a href="../../../../index.html#key305">graph</a>, <a href="../../../../index.html#key457">loop</a>, <a href="../../../../index.html#key489">neighbour</a>, <a href="../../../../index.html#key463">node</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key480">subgraph</a>, <a href="../../../../index.html#key464">vertex</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/graph1.html.













































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406

<div class='fossil-doc' data-title='struct::graph_v1 - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::graph_v1(n) 1.2.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::graph_v1 - Create and manipulate directed graph objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::graph <span class="opt">?1.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">graphName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#2"><i class="arg">graphName</i> <b class="method">destroy</b></a></li>
<li><a href="#3"><i class="arg">graphName</i> <b class="method">arc append</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></li>
<li><a href="#4"><i class="arg">graphName</i> <b class="method">arc delete</b> <i class="arg">arc</i> <span class="opt">?<i class="arg">arc</i> ...?</span></a></li>
<li><a href="#5"><i class="arg">graphName</i> <b class="method">arc exists</b> <i class="arg">arc</i></a></li>
<li><a href="#6"><i class="arg">graphName</i> <b class="method">arc get</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></li>
<li><a href="#7"><i class="arg">graphName</i> <b class="method">arc getall</b> <i class="arg">arc</i></a></li>
<li><a href="#8"><i class="arg">graphName</i> <b class="method">arc keys</b> <i class="arg">arc</i></a></li>
<li><a href="#9"><i class="arg">graphName</i> <b class="method">arc keyexists</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></li>
<li><a href="#10"><i class="arg">graphName</i> <b class="method">arc insert</b> <i class="arg">start</i> <i class="arg">end</i> <span class="opt">?<i class="arg">child</i>?</span></a></li>
<li><a href="#11"><i class="arg">graphName</i> <b class="method">arc lappend</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></li>
<li><a href="#12"><i class="arg">graphName</i> <b class="method">arc set</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#13"><i class="arg">graphName</i> <b class="method">arc source</b> <i class="arg">arc</i></a></li>
<li><a href="#14"><i class="arg">graphName</i> <b class="method">arc target</b> <i class="arg">arc</i></a></li>
<li><a href="#15"><i class="arg">graphName</i> <b class="method">arc unset</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></li>
<li><a href="#16"><i class="arg">graphName</i> <b class="method">arcs</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?-value <i class="arg">value</i>?</span> <span class="opt">?-in|-out|-adj|-inner|-embedding <i class="arg">nodelist</i>?</span></a></li>
<li><a href="#17"><i class="arg">graphName</i> <b class="method">node append</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></li>
<li><a href="#18"><i class="arg">graphName</i> <b class="method">node degree</b> <span class="opt">?-in|-out?</span> <i class="arg">node</i></a></li>
<li><a href="#19"><i class="arg">graphName</i> <b class="method">node delete</b> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i> ...?</span></a></li>
<li><a href="#20"><i class="arg">graphName</i> <b class="method">node exists</b> <i class="arg">node</i></a></li>
<li><a href="#21"><i class="arg">graphName</i> <b class="method">node get</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></li>
<li><a href="#22"><i class="arg">graphName</i> <b class="method">node getall</b> <i class="arg">node</i></a></li>
<li><a href="#23"><i class="arg">graphName</i> <b class="method">node keys</b> <i class="arg">node</i></a></li>
<li><a href="#24"><i class="arg">graphName</i> <b class="method">node keyexists</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></li>
<li><a href="#25"><i class="arg">graphName</i> <b class="method">node insert</b> <span class="opt">?<i class="arg">child</i>?</span></a></li>
<li><a href="#26"><i class="arg">graphName</i> <b class="method">node lappend</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></li>
<li><a href="#27"><i class="arg">graphName</i> <b class="method">node opposite</b> <i class="arg">node</i> <i class="arg">arc</i></a></li>
<li><a href="#28"><i class="arg">graphName</i> <b class="method">node set</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#29"><i class="arg">graphName</i> <b class="method">node unset</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></li>
<li><a href="#30"><i class="arg">graphName</i> <b class="method">nodes</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?-value <i class="arg">value</i>?</span> <span class="opt">?-in|-out|-adj|-inner|-embedding <i class="arg">nodelist</i>?</span></a></li>
<li><a href="#31"><i class="arg">graphName</i> <b class="method">get</b> <span class="opt">?-key <i class="arg">key</i>?</span></a></li>
<li><a href="#32"><i class="arg">graphName</i> <b class="method">getall</b></a></li>
<li><a href="#33"><i class="arg">graphName</i> <b class="method">keys</b></a></li>
<li><a href="#34"><i class="arg">graphName</i> <b class="method">keyexists</b> <span class="opt">?-key <i class="arg">key</i>?</span></a></li>
<li><a href="#35"><i class="arg">graphName</i> <b class="method">set</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#36"><i class="arg">graphName</i> <b class="method">swap</b> <i class="arg">node1</i> <i class="arg">node2</i></a></li>
<li><a href="#37"><i class="arg">graphName</i> <b class="method">unset</b> <span class="opt">?-key <i class="arg">key</i>?</span></a></li>
<li><a href="#38"><i class="arg">graphName</i> <b class="method">walk</b> <i class="arg">node</i> <span class="opt">?-order <i class="arg">order</i>?</span> <span class="opt">?-type <i class="arg">type</i>?</span> <span class="opt">?-dir <i class="arg">direction</i>?</span> -command <i class="arg">cmd</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">::struct::graph</b> command creates a new graph object with an
associated global Tcl command whose name is <i class="arg">graphName</i>.  This
command may be used to invoke various operations on the graph.  It has
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">graphName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>A directed graph is a structure containing two collections of
elements, called <em>nodes</em> and <em>arcs</em> respectively, together
with a relation (&quot;connectivity&quot;) that places a general structure upon
the nodes and arcs.</p>
<p>Each arc is connected to two nodes, one of which is called the
<em>source</em> and the other the <em>target</em>. This imposes a
direction upon the arc, which is said to go from the source to the
target. It is allowed that source and target of an arc are the same
node. Such an arc is called a <em>loop</em>. Whenever a node is source
or target of an arc both are said to be <em>adjacent</em>. This extends
into a relation between nodes, i.e. if two nodes are connected through
at least one arc they are said to be <em>adjacent</em> too.</p>
<p>Each node can be the source and target for any number of arcs. The
former are called the <em>outgoing arcs</em> of the node, the latter
the <em>incoming arcs</em> of the node. The number of edges in either
set is called the <em>in-</em> resp. the <em>out-degree</em> of the node.</p>
<p>In addition to maintaining the node and arc relationships, this graph
implementation allows any number of keyed values to be associated with
each node and arc.</p>
<p>The following commands are possible for graph objects:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">graphName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroy the graph, including its storage space and associated command.</p></dd>
<dt><a name="3"><i class="arg">graphName</i> <b class="method">arc append</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> to one of the keyed values associated with an
<i class="arg">arc</i>. If no <i class="arg">key</i> is specified, the key <b class="const">data</b> is
assumed.</p></dd>
<dt><a name="4"><i class="arg">graphName</i> <b class="method">arc delete</b> <i class="arg">arc</i> <span class="opt">?<i class="arg">arc</i> ...?</span></a></dt>
<dd><p>Remove the specified arcs from the graph.</p></dd>
<dt><a name="5"><i class="arg">graphName</i> <b class="method">arc exists</b> <i class="arg">arc</i></a></dt>
<dd><p>Return true if the specified <i class="arg">arc</i> exists in the graph.</p></dd>
<dt><a name="6"><i class="arg">graphName</i> <b class="method">arc get</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></dt>
<dd><p>Return the value associated with the key <i class="arg">key</i> for the <i class="arg">arc</i>.
If no key is specified, the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="7"><i class="arg">graphName</i> <b class="method">arc getall</b> <i class="arg">arc</i></a></dt>
<dd><p>Returns a serialized list of key/value pairs (suitable for use with
[<b class="cmd">array set</b>]) for the <i class="arg">arc</i>.</p></dd>
<dt><a name="8"><i class="arg">graphName</i> <b class="method">arc keys</b> <i class="arg">arc</i></a></dt>
<dd><p>Returns a list of keys for the <i class="arg">arc</i>.</p></dd>
<dt><a name="9"><i class="arg">graphName</i> <b class="method">arc keyexists</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></dt>
<dd><p>Return true if the specified <i class="arg">key</i> exists for the <i class="arg">arc</i>. If no
<i class="arg">key</i> is specified, the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="10"><i class="arg">graphName</i> <b class="method">arc insert</b> <i class="arg">start</i> <i class="arg">end</i> <span class="opt">?<i class="arg">child</i>?</span></a></dt>
<dd><p>Insert an arc named <i class="arg">child</i> into the graph beginning at the node
<i class="arg">start</i> and ending at the node <i class="arg">end</i>. If the name of the new
arc is not specified the system will generate a unique name of the
form <em>arc</em><i class="arg">x</i>.</p></dd>
<dt><a name="11"><i class="arg">graphName</i> <b class="method">arc lappend</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> (as a list) to one of the keyed values
associated with an <i class="arg">arc</i>.  If no <i class="arg">key</i> is specified, the key
<b class="const">data</b> is assumed.</p></dd>
<dt><a name="12"><i class="arg">graphName</i> <b class="method">arc set</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Set or get one of the keyed values associated with an arc.  If no key
is specified, the key <b class="const">data</b> is assumed.  Each arc that is
added to a graph has the empty string assigned to the key
<b class="const">data</b> automatically.  An arc may have any number of keyed
values associated with it.  If <i class="arg">value</i> is not specified, this
command returns the current value assigned to the key; if <i class="arg">value</i>
is specified, this command assigns that value to the key.</p></dd>
<dt><a name="13"><i class="arg">graphName</i> <b class="method">arc source</b> <i class="arg">arc</i></a></dt>
<dd><p>Return the node the given <i class="arg">arc</i> begins at.</p></dd>
<dt><a name="14"><i class="arg">graphName</i> <b class="method">arc target</b> <i class="arg">arc</i></a></dt>
<dd><p>Return the node the given <i class="arg">arc</i> ends at.</p></dd>
<dt><a name="15"><i class="arg">graphName</i> <b class="method">arc unset</b> <i class="arg">arc</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></dt>
<dd><p>Remove a keyed value from the arc <i class="arg">arc</i>.  If no key is specified,
the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="16"><i class="arg">graphName</i> <b class="method">arcs</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?-value <i class="arg">value</i>?</span> <span class="opt">?-in|-out|-adj|-inner|-embedding <i class="arg">nodelist</i>?</span></a></dt>
<dd><p>Return a list of arcs in the graph. If no restriction is specified a
list containing all arcs is returned. Restrictions can limit the list
of returned arcs based on the nodes that are connected by the arc, on
the keyed values associated with the arc, or both. The restrictions
that involve connected nodes have a list of nodes as argument,
specified after the name of the restriction itself.</p>
<dl class="doctools_definitions">
<dt><b class="option">-in</b></dt>
<dd><p>Return a list of all arcs whose target is one of the nodes in the
<i class="arg">nodelist</i>.</p></dd>
<dt><b class="option">-out</b></dt>
<dd><p>Return a list of all arcs whose source is one of the nodes in the
<i class="arg">nodelist</i>.</p></dd>
<dt><b class="option">-adj</b></dt>
<dd><p>Return a list of all arcs adjacent to at least one of the nodes in the
<i class="arg">nodelist</i>. This is the union of the nodes returned by
<b class="option">-in</b> and <b class="option">-out</b>.</p></dd>
<dt><b class="option">-inner</b></dt>
<dd><p>Return a list of all arcs adjacent to two of the nodes in the
<i class="arg">nodelist</i>. This is the set of arcs in the subgraph spawned by the
specified nodes.</p></dd>
<dt><b class="option">-embedding</b></dt>
<dd><p>Return a list of all arcs adjacent to exactly one of the nodes in the
<i class="arg">nodelist</i>. This is the set of arcs connecting the subgraph
spawned by the specified nodes to the rest of the graph.</p></dd>
<dt><b class="option">-key</b> <i class="arg">key</i></dt>
<dd><p>Limit the list of arcs that are returned to those arcs that have an
associated key <i class="arg">key</i>.</p></dd>
<dt><b class="option">-value</b> <i class="arg">value</i></dt>
<dd><p>This restriction can only be used in combination with
<b class="option">-key</b>. It limits the list of arcs that are returned to those
arcs whose associated key <i class="arg">key</i> has the value <i class="arg">value</i>.</p></dd>
</dl>
<p>The restrictions imposed by either <b class="option">-in</b>, <b class="option">-out</b>,
<b class="option">-adj</b>, <b class="option">-inner</b>, or <b class="option">-embedded</b> are applied
first. Specifying more than one of them is illegal.
At last the restrictions set via <b class="option">-key</b> (and <b class="option">-value</b>)
are applied.
Specifying more than one <b class="option">-key</b> (and <b class="option">-value</b>) is
illegal.</p></dd>
<dt><a name="17"><i class="arg">graphName</i> <b class="method">node append</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> to one of the keyed values associated with an
<i class="arg">node</i>. If no <i class="arg">key</i> is specified, the key <b class="const">data</b> is
assumed.</p></dd>
<dt><a name="18"><i class="arg">graphName</i> <b class="method">node degree</b> <span class="opt">?-in|-out?</span> <i class="arg">node</i></a></dt>
<dd><p>Return the number of arcs adjacent to the specified <i class="arg">node</i>. If one
of the restrictions <b class="option">-in</b> or <b class="option">-out</b> is given only the
incoming resp. outgoing arcs are counted.</p></dd>
<dt><a name="19"><i class="arg">graphName</i> <b class="method">node delete</b> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i> ...?</span></a></dt>
<dd><p>Remove the specified nodes from the graph.  All of the nodes' arcs
will be removed as well to prevent unconnected arcs.</p></dd>
<dt><a name="20"><i class="arg">graphName</i> <b class="method">node exists</b> <i class="arg">node</i></a></dt>
<dd><p>Return true if the specified <i class="arg">node</i> exists in the graph.</p></dd>
<dt><a name="21"><i class="arg">graphName</i> <b class="method">node get</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></dt>
<dd><p>Return the value associated with the key <i class="arg">key</i> for the <i class="arg">node</i>.
If no key is specified, the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="22"><i class="arg">graphName</i> <b class="method">node getall</b> <i class="arg">node</i></a></dt>
<dd><p>Returns a serialized list of key/value pairs (suitable for use with
[<b class="cmd">array set</b>]) for the <i class="arg">node</i>.</p></dd>
<dt><a name="23"><i class="arg">graphName</i> <b class="method">node keys</b> <i class="arg">node</i></a></dt>
<dd><p>Returns a list of keys for the <i class="arg">node</i>.</p></dd>
<dt><a name="24"><i class="arg">graphName</i> <b class="method">node keyexists</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></dt>
<dd><p>Return true if the specified <i class="arg">key</i> exists for the <i class="arg">node</i>. If
no <i class="arg">key</i> is specified, the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="25"><i class="arg">graphName</i> <b class="method">node insert</b> <span class="opt">?<i class="arg">child</i>?</span></a></dt>
<dd><p>Insert a node named <i class="arg">child</i> into the graph. The nodes has no arcs
connected to it. If the name of the new child is not specified the
system will generate a unique name of the form <em>node</em><i class="arg">x</i>.</p></dd>
<dt><a name="26"><i class="arg">graphName</i> <b class="method">node lappend</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> (as a list) to one of the keyed values
associated with an <i class="arg">node</i>. If no <i class="arg">key</i> is specified, the key
<b class="const">data</b> is assumed.</p></dd>
<dt><a name="27"><i class="arg">graphName</i> <b class="method">node opposite</b> <i class="arg">node</i> <i class="arg">arc</i></a></dt>
<dd><p>Return the node at the other end of the specified <i class="arg">arc</i>, which has
to be adjacent to the given <i class="arg">node</i>.</p></dd>
<dt><a name="28"><i class="arg">graphName</i> <b class="method">node set</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Set or get one of the keyed values associated with a node.  If no key
is specified, the key <b class="const">data</b> is assumed.  Each node that is
added to a graph has the empty string assigned to the key
<b class="const">data</b> automatically.  A node may have any number of keyed
values associated with it.  If <i class="arg">value</i> is not specified, this
command returns the current value assigned to the key; if <i class="arg">value</i>
is specified, this command assigns that value to the key.</p></dd>
<dt><a name="29"><i class="arg">graphName</i> <b class="method">node unset</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></dt>
<dd><p>Remove a keyed value from the node <i class="arg">node</i>.  If no key is
specified, the key <b class="method">data</b> is assumed.</p></dd>
<dt><a name="30"><i class="arg">graphName</i> <b class="method">nodes</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?-value <i class="arg">value</i>?</span> <span class="opt">?-in|-out|-adj|-inner|-embedding <i class="arg">nodelist</i>?</span></a></dt>
<dd><p>Return a list of nodes in the graph. Restrictions can limit the list
of returned nodes based on neighboring nodes, or based on the keyed
values associated with the node. The restrictions that involve
neighboring nodes have a list of nodes as argument, specified after
the name of the restriction itself.</p>
<p>The possible restrictions are the same as for method
<b class="method">arcs</b>. The set of nodes to return is computed as the union of
all source and target nodes for all the arcs satisfying the
restriction as defined for <b class="method">arcs</b>.</p></dd>
<dt><a name="31"><i class="arg">graphName</i> <b class="method">get</b> <span class="opt">?-key <i class="arg">key</i>?</span></a></dt>
<dd><p>Return the value associated with the key <i class="arg">key</i> for the graph. If
no key is specified, the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="32"><i class="arg">graphName</i> <b class="method">getall</b></a></dt>
<dd><p>Returns a serialized list of key/value pairs (suitable for use with
[<b class="cmd">array set</b>]) for the whole graph.</p></dd>
<dt><a name="33"><i class="arg">graphName</i> <b class="method">keys</b></a></dt>
<dd><p>Returns a list of keys for the whole graph.</p></dd>
<dt><a name="34"><i class="arg">graphName</i> <b class="method">keyexists</b> <span class="opt">?-key <i class="arg">key</i>?</span></a></dt>
<dd><p>Return true if the specified <i class="arg">key</i> exists for the whole graph. If no
<i class="arg">key</i> is specified, the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="35"><i class="arg">graphName</i> <b class="method">set</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Set or get one of the keyed values associated with a graph. If no key
is specified, the key <b class="const">data</b> is assumed. Each graph has the
empty string assigned to the key <b class="const">data</b> automatically. A graph
may have any number of keyed values associated with it. If <i class="arg">value</i>
is not specified, this command returns the current value assigned to
the key; if <i class="arg">value</i> is specified, this command assigns that value
to the key.</p></dd>
<dt><a name="36"><i class="arg">graphName</i> <b class="method">swap</b> <i class="arg">node1</i> <i class="arg">node2</i></a></dt>
<dd><p>Swap the position of <i class="arg">node1</i> and <i class="arg">node2</i> in the graph.</p></dd>
<dt><a name="37"><i class="arg">graphName</i> <b class="method">unset</b> <span class="opt">?-key <i class="arg">key</i>?</span></a></dt>
<dd><p>Remove a keyed value from the graph. If no key is specified, the key
<b class="const">data</b> is assumed.</p></dd>
<dt><a name="38"><i class="arg">graphName</i> <b class="method">walk</b> <i class="arg">node</i> <span class="opt">?-order <i class="arg">order</i>?</span> <span class="opt">?-type <i class="arg">type</i>?</span> <span class="opt">?-dir <i class="arg">direction</i>?</span> -command <i class="arg">cmd</i></a></dt>
<dd><p>Perform a breadth-first or depth-first walk of the graph starting at
the node <i class="arg">node</i> going in either the direction of outgoing or
opposite to the incoming arcs.</p>
<p>The type of walk, breadth-first or depth-first, is determined by the
value of <i class="arg">type</i>; <b class="const">bfs</b> indicates breadth-first,
<b class="const">dfs</b> indicates depth-first.  Depth-first is the default.</p>
<p>The order of the walk, pre-order, post-order or both-order is
determined by the value of <i class="arg">order</i>; <b class="const">pre</b> indicates
pre-order, <b class="const">post</b> indicates post-order, <b class="const">both</b> indicates
both-order. Pre-order is the default. Pre-order walking means that a
node is visited before any of its neighbors (as defined by the
<i class="arg">direction</i>, see below). Post-order walking means that a parent is
visited after any of its neighbors. Both-order walking means that a
node is visited before <em>and</em> after any of its neighbors. The
combination of a bread-first walk with post- or both-order is illegal.</p>
<p>The direction of the walk is determined by the value of <i class="arg">dir</i>;
<b class="const">backward</b> indicates the direction opposite to the incoming
arcs, <b class="const">forward</b> indicates the direction of the outgoing arcs.</p>
<p>As the walk progresses, the command <i class="arg">cmd</i> will be evaluated at
each node, with the mode of the call (<b class="const">enter</b> or
<b class="const">leave</b>) and values <i class="arg">graphName</i> and the name of the current
node appended. For a pre-order walk, all nodes are <b class="const">enter</b>ed, for a
post-order all nodes are left. In a both-order walk the first visit of
a node <b class="const">enter</b>s it, the second visit <b class="const">leave</b>s it.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: graph</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key615">cgraph</a>, <a href="../../../../index.html#key305">graph</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/graphops.html.

























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036

<div class='fossil-doc' data-title='struct::graph::op - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::graph::op(n) 0.11.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::graph::op - Operation for (un)directed graph objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Operations</a></li>
<li class="doctools_section"><a href="#section3">Background theory and terms</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Shortest Path Problem</a></li>
<li class="doctools_subsection"><a href="#subsection2">Travelling Salesman Problem</a></li>
<li class="doctools_subsection"><a href="#subsection3">Matching Problem</a></li>
<li class="doctools_subsection"><a href="#subsection4">Cut Problems</a></li>
<li class="doctools_subsection"><a href="#subsection5">K-Center Problem</a></li>
<li class="doctools_subsection"><a href="#subsection6">Flow Problems</a></li>
<li class="doctools_subsection"><a href="#subsection7">Approximation algorithm</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">References</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::graph::op <span class="opt">?0.11.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">struct::graph::op::toAdjacencyMatrix</b> <i class="arg">g</i></a></li>
<li><a href="#2"><b class="cmd">struct::graph::op::toAdjacencyList</b> <i class="arg">G</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">struct::graph::op::kruskal</b> <i class="arg">g</i></a></li>
<li><a href="#4"><b class="cmd">struct::graph::op::prim</b> <i class="arg">g</i></a></li>
<li><a href="#5"><b class="cmd">struct::graph::op::isBipartite?</b> <i class="arg">g</i> <span class="opt">?<i class="arg">bipartvar</i>?</span></a></li>
<li><a href="#6"><b class="cmd">struct::graph::op::tarjan</b> <i class="arg">g</i></a></li>
<li><a href="#7"><b class="cmd">struct::graph::op::connectedComponents</b> <i class="arg">g</i></a></li>
<li><a href="#8"><b class="cmd">struct::graph::op::connectedComponentOf</b> <i class="arg">g</i> <i class="arg">n</i></a></li>
<li><a href="#9"><b class="cmd">struct::graph::op::isConnected?</b> <i class="arg">g</i></a></li>
<li><a href="#10"><b class="cmd">struct::graph::op::isCutVertex?</b> <i class="arg">g</i> <i class="arg">n</i></a></li>
<li><a href="#11"><b class="cmd">struct::graph::op::isBridge?</b> <i class="arg">g</i> <i class="arg">a</i></a></li>
<li><a href="#12"><b class="cmd">struct::graph::op::isEulerian?</b> <i class="arg">g</i> <span class="opt">?<i class="arg">tourvar</i>?</span></a></li>
<li><a href="#13"><b class="cmd">struct::graph::op::isSemiEulerian?</b> <i class="arg">g</i> <span class="opt">?<i class="arg">pathvar</i>?</span></a></li>
<li><a href="#14"><b class="cmd">struct::graph::op::dijkstra</b> <i class="arg">g</i> <i class="arg">start</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#15"><b class="cmd">struct::graph::op::distance</b> <i class="arg">g</i> <i class="arg">origin</i> <i class="arg">destination</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#16"><b class="cmd">struct::graph::op::eccentricity</b> <i class="arg">g</i> <i class="arg">n</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#17"><b class="cmd">struct::graph::op::radius</b> <i class="arg">g</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#18"><b class="cmd">struct::graph::op::diameter</b> <i class="arg">g</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#19"><b class="cmd">struct::graph::op::BellmanFord</b> <i class="arg">G</i> <i class="arg">startnode</i></a></li>
<li><a href="#20"><b class="cmd">struct::graph::op::Johnsons</b> <i class="arg">G</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#21"><b class="cmd">struct::graph::op::FloydWarshall</b> <i class="arg">G</i></a></li>
<li><a href="#22"><b class="cmd">struct::graph::op::MetricTravellingSalesman</b> <i class="arg">G</i></a></li>
<li><a href="#23"><b class="cmd">struct::graph::op::Christofides</b> <i class="arg">G</i></a></li>
<li><a href="#24"><b class="cmd">struct::graph::op::GreedyMaxMatching</b> <i class="arg">G</i></a></li>
<li><a href="#25"><b class="cmd">struct::graph::op::MaxCut</b> <i class="arg">G</i> <i class="arg">U</i> <i class="arg">V</i></a></li>
<li><a href="#26"><b class="cmd">struct::graph::op::UnweightedKCenter</b> <i class="arg">G</i> <i class="arg">k</i></a></li>
<li><a href="#27"><b class="cmd">struct::graph::op::WeightedKCenter</b> <i class="arg">G</i> <i class="arg">nodeWeights</i> <i class="arg">W</i></a></li>
<li><a href="#28"><b class="cmd">struct::graph::op::GreedyMaxIndependentSet</b> <i class="arg">G</i></a></li>
<li><a href="#29"><b class="cmd">struct::graph::op::GreedyWeightedMaxIndependentSet</b> <i class="arg">G</i> <i class="arg">nodeWeights</i></a></li>
<li><a href="#30"><b class="cmd">struct::graph::op::VerticesCover</b> <i class="arg">G</i></a></li>
<li><a href="#31"><b class="cmd">struct::graph::op::EdmondsKarp</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i></a></li>
<li><a href="#32"><b class="cmd">struct::graph::op::BusackerGowen</b> <i class="arg">G</i> <i class="arg">desiredFlow</i> <i class="arg">s</i> <i class="arg">t</i></a></li>
<li><a href="#33"><b class="cmd">struct::graph::op::ShortestsPathsByBFS</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">outputFormat</i></a></li>
<li><a href="#34"><b class="cmd">struct::graph::op::BFS</b> <i class="arg">G</i> <i class="arg">s</i> <span class="opt">?<i class="arg">outputFormat</i>...?</span></a></li>
<li><a href="#35"><b class="cmd">struct::graph::op::MinimumDiameterSpanningTree</b> <i class="arg">G</i></a></li>
<li><a href="#36"><b class="cmd">struct::graph::op::MinimumDegreeSpanningTree</b> <i class="arg">G</i></a></li>
<li><a href="#37"><b class="cmd">struct::graph::op::MaximumFlowByDinic</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i> <i class="arg">blockingFlowAlg</i></a></li>
<li><a href="#38"><b class="cmd">struct::graph::op::BlockingFlowByDinic</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i></a></li>
<li><a href="#39"><b class="cmd">struct::graph::op::BlockingFlowByMKM</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i></a></li>
<li><a href="#40"><b class="cmd">struct::graph::op::createResidualGraph</b> <i class="arg">G</i> <i class="arg">f</i></a></li>
<li><a href="#41"><b class="cmd">struct::graph::op::createAugmentingNetwork</b> <i class="arg">G</i> <i class="arg">f</i> <i class="arg">path</i></a></li>
<li><a href="#42"><b class="cmd">struct::graph::op::createLevelGraph</b> <i class="arg">Gf</i> <i class="arg">s</i></a></li>
<li><a href="#43"><b class="cmd">struct::graph::op::TSPLocalSearching</b> <i class="arg">G</i> <i class="arg">C</i></a></li>
<li><a href="#44"><b class="cmd">struct::graph::op::TSPLocalSearching3Approx</b> <i class="arg">G</i> <i class="arg">C</i></a></li>
<li><a href="#45"><b class="cmd">struct::graph::op::createSquaredGraph</b> <i class="arg">G</i></a></li>
<li><a href="#46"><b class="cmd">struct::graph::op::createCompleteGraph</b> <i class="arg">G</i> <i class="arg">originalEdges</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package described by this document, <b class="package">struct::graph::op</b>,
is a companion to the package <b class="package"><a href="graph.html">struct::graph</a></b>. It provides a
series of common operations and algorithms applicable to (un)directed
graphs.</p>
<p>Despite being a companion the package is not directly dependent on
<b class="package"><a href="graph.html">struct::graph</a></b>, only on the API defined by that
package. I.e. the operations of this package can be applied to any and
all graph objects which provide the same API as the objects created
through <b class="package"><a href="graph.html">struct::graph</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Operations</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">struct::graph::op::toAdjacencyMatrix</b> <i class="arg">g</i></a></dt>
<dd><p>This command takes the graph <i class="arg">g</i> and returns a nested list
containing the adjacency matrix of <i class="arg">g</i>.</p>
<p>The elements of the outer list are the rows of the matrix, the inner
elements are the column values in each row. The matrix has &quot;<b class="variable">n</b>+1&quot;
rows and columns, with the first row and column (index 0) containing
the name of the node the row/column is for. All other elements are
boolean values, <b class="const">True</b> if there is an arc between the 2 nodes
of the respective row and column, and <b class="const">False</b> otherwise.</p>
<p>Note that the matrix is symmetric. It does not represent the
directionality of arcs, only their presence between nodes. It is also
unable to represent parallel arcs in <i class="arg">g</i>.</p></dd>
<dt><a name="2"><b class="cmd">struct::graph::op::toAdjacencyList</b> <i class="arg">G</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>Procedure creates for input graph <i class="arg">G</i>, it's representation as <i class="term"><a href="../../../../index.html#key468">Adjacency List</a></i>.
It handles both directed and undirected graphs (default is undirected).
It returns dictionary that for each node (key) returns list of nodes adjacent
to it. When considering weighted version, for each adjacent node there is also
weight of the edge included.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph object <i class="arg">G</i> (input)</dt>
<dd><p>A graph to convert into an <i class="term"><a href="../../../../index.html#key468">Adjacency List</a></i>.</p></dd>
</dl></dd>
<dt>Options:</dt>
<dd><dl class="doctools_options">
<dt><b class="option">-directed</b></dt>
<dd><p>By default <i class="arg">G</i> is operated as if it were an <i class="term">Undirected graph</i>.
Using this option tells the command to handle <i class="arg">G</i> as the directed graph it is.</p></dd>
<dt><b class="option">-weights</b></dt>
<dd><p>By default any weight information the graph <i class="arg">G</i> may have is ignored.
Using this option tells the command to put weight information into the result.
In that case it is expected that all arcs have a proper weight, and an error
is thrown if that is not the case.</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">struct::graph::op::kruskal</b> <i class="arg">g</i></a></dt>
<dd><p>This command takes the graph <i class="arg">g</i> and returns a list containing the
names of the arcs in <i class="arg">g</i> which span up a minimum weight spanning tree
(MST), or, in the case of an un-connected graph, a minimum weight spanning
forest (except for the 1-vertex components). Kruskal's algorithm is used
to compute the tree or forest.
This algorithm has a time complexity of <i class="term">O(E*log E)</i> or <i class="term">O(E* log V)</i>,
where <i class="term">V</i> is the number of vertices and <i class="term"><a href="../../../../index.html#key807">E</a></i> is the number of edges
in graph <i class="arg">g</i>.</p>
<p>The command will throw an error if one or more arcs in <i class="arg">g</i> have no
weight associated with them.</p>
<p>A note regarding the result, the command refrains from explicitly
listing the nodes of the MST as this information is implicitly
provided in the arcs already.</p></dd>
<dt><a name="4"><b class="cmd">struct::graph::op::prim</b> <i class="arg">g</i></a></dt>
<dd><p>This command takes the graph <i class="arg">g</i> and returns a list containing the
names of the arcs in <i class="arg">g</i> which span up a minimum weight spanning tree
(MST), or, in the case of an un-connected graph, a minimum weight spanning
forest (except for the 1-vertex components). Prim's algorithm is used to
compute the tree or forest.
This algorithm has a time complexity between <i class="term">O(E+V*log V)</i> and <i class="term">O(V*V)</i>,
depending on the implementation (Fibonacci heap + Adjacency list versus
Adjacency Matrix).  As usual <i class="term">V</i> is the number of vertices and
<i class="term"><a href="../../../../index.html#key807">E</a></i> the number of edges in graph <i class="arg">g</i>.</p>
<p>The command will throw an error if one or more arcs in <i class="arg">g</i> have no
weight associated with them.</p>
<p>A note regarding the result, the command refrains from explicitly
listing the nodes of the MST as this information is implicitly
provided in the arcs already.</p></dd>
<dt><a name="5"><b class="cmd">struct::graph::op::isBipartite?</b> <i class="arg">g</i> <span class="opt">?<i class="arg">bipartvar</i>?</span></a></dt>
<dd><p>This command takes the graph <i class="arg">g</i> and returns a boolean value
indicating whether it is bipartite (<b class="const">true</b>) or not
(<b class="const">false</b>). If the variable <i class="arg">bipartvar</i> is specified the two
partitions of the graph are there as a list, if, and only if the graph
is bipartit. If it is not the variable, if specified, is not touched.</p></dd>
<dt><a name="6"><b class="cmd">struct::graph::op::tarjan</b> <i class="arg">g</i></a></dt>
<dd><p>This command computes the set of <em>strongly connected</em>
components (SCCs) of the graph <i class="arg">g</i>. The result of the command is a
list of sets, each of which contains the nodes for one of the SCCs of
<i class="arg">g</i>. The union of all SCCs covers the whole graph, and no two SCCs
intersect with each other.</p>
<p>The graph <i class="arg">g</i> is <i class="term">acyclic</i> if all SCCs in the result contain
only a single node. The graph <i class="arg">g</i> is <i class="term">strongly connected</i>
if the result contains only a single SCC containing all nodes of
<i class="arg">g</i>.</p></dd>
<dt><a name="7"><b class="cmd">struct::graph::op::connectedComponents</b> <i class="arg">g</i></a></dt>
<dd><p>This command computes the set of <em>connected</em> components (CCs) of
the graph <i class="arg">g</i>. The result of the command is a list of sets, each
of which contains the nodes for one of the CCs of <i class="arg">g</i>. The union
of all CCs covers the whole graph, and no two CCs intersect with each
other.</p>
<p>The graph <i class="arg">g</i> is <i class="term">connected</i> if the result contains only a
single SCC containing all nodes of <i class="arg">g</i>.</p></dd>
<dt><a name="8"><b class="cmd">struct::graph::op::connectedComponentOf</b> <i class="arg">g</i> <i class="arg">n</i></a></dt>
<dd><p>This command computes the <em>connected</em> component (CC) of the graph
<i class="arg">g</i> containing the node <i class="arg">n</i>. The result of the command is a
sets which contains the nodes for the CC of <i class="arg">n</i> in <i class="arg">g</i>.</p>
<p>The command will throw an error if <i class="arg">n</i> is not a node of the graph
<i class="arg">g</i>.</p></dd>
<dt><a name="9"><b class="cmd">struct::graph::op::isConnected?</b> <i class="arg">g</i></a></dt>
<dd><p>This is a convenience command determining whether the graph <i class="arg">g</i> is
<i class="term">connected</i> or not.  The result is a boolean value, <b class="const">true</b>
if the graph is connected, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="10"><b class="cmd">struct::graph::op::isCutVertex?</b> <i class="arg">g</i> <i class="arg">n</i></a></dt>
<dd><p>This command determines whether the node <i class="arg">n</i> in the graph <i class="arg">g</i>
is a <i class="term"><a href="../../../../index.html#key486">cut vertex</a></i> (aka <i class="term"><a href="../../../../index.html#key483">articulation point</a></i>). The result
is a boolean value, <b class="const">true</b> if the node is a cut vertex, and
<b class="const">false</b> otherwise.</p>
<p>The command will throw an error if <i class="arg">n</i> is not a node of the graph
<i class="arg">g</i>.</p></dd>
<dt><a name="11"><b class="cmd">struct::graph::op::isBridge?</b> <i class="arg">g</i> <i class="arg">a</i></a></dt>
<dd><p>This command determines whether the arc <i class="arg">a</i> in the graph <i class="arg">g</i>
is a <i class="term"><a href="../../../../index.html#key467">bridge</a></i> (aka <i class="term"><a href="../../../../index.html#key484">cut edge</a></i>, or <i class="term"><a href="../../../../index.html#key491">isthmus</a></i>). The
result is a boolean value, <b class="const">true</b> if the arc is a bridge, and
<b class="const">false</b> otherwise.</p>
<p>The command will throw an error if <i class="arg">a</i> is not an arc of the graph
<i class="arg">g</i>.</p></dd>
<dt><a name="12"><b class="cmd">struct::graph::op::isEulerian?</b> <i class="arg">g</i> <span class="opt">?<i class="arg">tourvar</i>?</span></a></dt>
<dd><p>This command determines whether the graph <i class="arg">g</i> is <i class="term">eulerian</i>
or not.  The result is a boolean value, <b class="const">true</b> if the graph is
eulerian, and <b class="const">false</b> otherwise.</p>
<p>If the graph is eulerian and <i class="arg">tourvar</i> is specified then an euler
tour is computed as well and stored in the named variable. The tour is
represented by the list of arcs traversed, in the order of traversal.</p></dd>
<dt><a name="13"><b class="cmd">struct::graph::op::isSemiEulerian?</b> <i class="arg">g</i> <span class="opt">?<i class="arg">pathvar</i>?</span></a></dt>
<dd><p>This command determines whether the graph <i class="arg">g</i> is
<i class="term">semi-eulerian</i> or not.  The result is a boolean value, <b class="const">true</b>
if the graph is semi-eulerian, and <b class="const">false</b> otherwise.</p>
<p>If the graph is semi-eulerian and <i class="arg">pathvar</i> is specified then an
euler path is computed as well and stored in the named variable. The
path is represented by the list of arcs traversed, in the order of
traversal.</p></dd>
<dt><a name="14"><b class="cmd">struct::graph::op::dijkstra</b> <i class="arg">g</i> <i class="arg">start</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines distances in the weighted <i class="arg">g</i> from the
node <i class="arg">start</i> to all other nodes in the graph. The options specify
how to traverse graphs, and the format of the result.</p>
<p>Two options are recognized</p>
<dl class="doctools_options">
<dt><b class="option">-arcmode</b> mode</dt>
<dd><p>The accepted mode values are <b class="const">directed</b> and <b class="const">undirected</b>.
For directed traversal all arcs are traversed from source to
target. For undirected traversal all arcs are traversed in the
opposite direction as well. Undirected traversal is the default.</p></dd>
<dt><b class="option">-outputformat</b> format</dt>
<dd><p>The accepted format values are <b class="const">distances</b> and <b class="const">tree</b>. In
both cases the result is a dictionary keyed by the names of all nodes
in the graph. For <b class="const">distances</b> the value is the distance of the
node to <i class="arg">start</i>, whereas for <b class="const">tree</b> the value is the path
from the node to <i class="arg">start</i>, excluding the node itself, but including
<i class="arg">start</i>. Tree format is the default.</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">struct::graph::op::distance</b> <i class="arg">g</i> <i class="arg">origin</i> <i class="arg">destination</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed distance between the two
nodes <i class="arg">origin</i> and <i class="arg">destination</i> in the graph <i class="arg">g</i>. It
accepts the option <b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p></dd>
<dt><a name="16"><b class="cmd">struct::graph::op::eccentricity</b> <i class="arg">g</i> <i class="arg">n</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed <i class="term"><a href="../../../../index.html#key501">eccentricity</a></i> of the
node <i class="arg">n</i> in the graph <i class="arg">g</i>. It accepts the option
<b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p>
<p>The (un)directed <i class="term"><a href="../../../../index.html#key501">eccentricity</a></i> of a node is the maximal
(un)directed distance between the node and any other node in the
graph.</p></dd>
<dt><a name="17"><b class="cmd">struct::graph::op::radius</b> <i class="arg">g</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed <i class="term"><a href="../../../../index.html#key469">radius</a></i> of the graph
<i class="arg">g</i>. It accepts the option <b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p>
<p>The (un)directed <i class="term"><a href="../../../../index.html#key469">radius</a></i> of a graph is the minimal (un)directed
<i class="term"><a href="../../../../index.html#key501">eccentricity</a></i> of all nodes in the graph.</p></dd>
<dt><a name="18"><b class="cmd">struct::graph::op::diameter</b> <i class="arg">g</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed <i class="term"><a href="../../../../index.html#key458">diameter</a></i> of the graph
<i class="arg">g</i>. It accepts the option <b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p>
<p>The (un)directed <i class="term"><a href="../../../../index.html#key458">diameter</a></i> of a graph is the maximal (un)directed
<i class="term"><a href="../../../../index.html#key501">eccentricity</a></i> of all nodes in the graph.</p></dd>
<dt><a name="19"><b class="cmd">struct::graph::op::BellmanFord</b> <i class="arg">G</i> <i class="arg">startnode</i></a></dt>
<dd><p>Searching for <span class="sectref"><a href="#subsection1">shortests paths</a></span> between chosen node and all other nodes in graph <i class="arg">G</i>. Based
on relaxation method. In comparison to <b class="cmd">struct::graph::op::dijkstra</b> it doesn't need assumption that all weights
on edges in input graph <i class="arg">G</i> have to be positive.</p>
<p>That generality sets the complexity of algorithm to - <i class="term">O(V*E)</i>, where <i class="term">V</i> is the number of vertices
and <i class="term"><a href="../../../../index.html#key807">E</a></i> is number of edges in graph <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph object <i class="arg">G</i> (input)</dt>
<dd><p>Directed, connected and edge weighted graph <i class="arg">G</i>, without any negative cycles ( presence of cycles with the negative sum
of weight means that there is no shortest path, since the total weight becomes lower each time the cycle is
traversed ). Negative weights on edges are allowed.</p></dd>
<dt>Node <i class="arg">startnode</i> (input)</dt>
<dd><p>The node for which we find all shortest paths to each other node in graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Dictionary containing for each node (key) distances to each other node in graph <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> If algorithm finds a negative cycle, it will return error message.</p></dd>
<dt><a name="20"><b class="cmd">struct::graph::op::Johnsons</b> <i class="arg">G</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>Searching for <span class="sectref"><a href="#subsection1">shortest paths</a></span> between all pairs of vertices in graph. For sparse graphs
asymptotically quicker than <b class="cmd">struct::graph::op::FloydWarshall</b> algorithm. Johnson's algorithm
uses <b class="cmd">struct::graph::op::BellmanFord</b> and <b class="cmd">struct::graph::op::dijkstra</b> as subprocedures.</p>
<p>Time complexity: <i class="term">O(n**2*log(n) +n*m)</i>, where <i class="term">n</i> is the number of nodes and <i class="term">m</i> is
the number of edges in graph <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph object <i class="arg">G</i> (input)</dt>
<dd><p>Directed graph <i class="arg">G</i>, weighted on edges and not containing
any cycles with negative sum of weights ( the presence of such cycles means
there is no shortest path, since the total weight becomes lower each time the
cycle is traversed ). Negative weights on edges are allowed.</p></dd>
</dl></dd>
<dt>Options:</dt>
<dd><dl class="doctools_options">
<dt><b class="option">-filter</b></dt>
<dd><p>Returns only existing distances, cuts all <i class="term">Inf</i> values for
non-existing connections between pairs of nodes.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Dictionary containing distances between all pairs of vertices.</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">struct::graph::op::FloydWarshall</b> <i class="arg">G</i></a></dt>
<dd><p>Searching for <span class="sectref"><a href="#subsection1">shortest paths</a></span> between all pairs of edges in weighted graphs.</p>
<p>Time complexity: <i class="term">O(V^3)</i> - where <i class="term">V</i> is number of vertices.</p>
<p>Memory complexity: <i class="term">O(V^2)</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph object <i class="arg">G</i> (input)</dt>
<dd><p>Directed and weighted graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Dictionary containing shortest distances to each node from each node.</p></dd>
</dl>
<p><em>Note:</em> Algorithm finds solutions dynamically. It compares all possible paths through the graph
between each pair of vertices. Graph shouldn't possess any cycle with negative
sum of weights (the presence of such cycles means there is no shortest path,
since the total weight becomes lower each time the cycle is traversed).</p>
<p>On the other hand algorithm can be used to find those cycles - if any shortest distance
found by algorithm for any nodes <i class="term">v</i> and <i class="term">u</i> (when <i class="term">v</i> is the same node as <i class="term">u</i>) is negative,
that node surely belong to at least one negative cycle.</p></dd>
<dt><a name="22"><b class="cmd">struct::graph::op::MetricTravellingSalesman</b> <i class="arg">G</i></a></dt>
<dd><p>Algorithm for solving a metric variation of <span class="sectref"><a href="#subsection2">Travelling salesman problem</a></span>.
<i class="term">TSP problem</i> is <i class="term">NP-Complete</i>, so there is no efficient algorithm to solve it. Greedy methods
are getting extremely slow, with the increase in the set of nodes.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph object <i class="arg">G</i> (input)</dt>
<dd><p>Undirected, weighted graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Approximated solution of minimum <i class="term">Hamilton Cycle</i> - closed path visiting all nodes,
each exactly one time.</p></dd>
</dl>
<p><em>Note:</em> <span class="sectref"><a href="#subsection7">It's 2-approximation algorithm.</a></span></p></dd>
<dt><a name="23"><b class="cmd">struct::graph::op::Christofides</b> <i class="arg">G</i></a></dt>
<dd><p>Another algorithm for solving <span class="sectref"><a href="#subsection2">metric <i class="term">TSP problem</i></a></span>.
Christofides implementation uses <i class="term">Max Matching</i> for reaching better approximation factor.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Undirected, weighted graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Approximated solution of minimum <i class="term">Hamilton Cycle</i> - closed path visiting all nodes,
each exactly one time.</p></dd>
</dl>
<p><em>Note:</em> <span class="sectref"><a href="#subsection7">It's is a 3/2 approximation algorithm. </a></span></p></dd>
<dt><a name="24"><b class="cmd">struct::graph::op::GreedyMaxMatching</b> <i class="arg">G</i></a></dt>
<dd><p><i class="term">Greedy Max Matching</i> procedure, which finds <span class="sectref"><a href="#subsection3">maximal matching</a></span> (not maximum)
for given graph <i class="arg">G</i>. It adds edges to solution, beginning from edges with the
lowest cost.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Undirected graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Set of edges - the max matching for graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">struct::graph::op::MaxCut</b> <i class="arg">G</i> <i class="arg">U</i> <i class="arg">V</i></a></dt>
<dd><p>Algorithm solving a <span class="sectref"><a href="#subsection4">Maximum Cut Problem</a></span>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>The graph to cut.</p></dd>
<dt>List <i class="arg">U</i> (output)</dt>
<dd><p>Variable storing first set of nodes (cut) given by solution.</p></dd>
<dt>List <i class="arg">V</i> (output)</dt>
<dd><p>Variable storing second set of nodes (cut) given by solution.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns number of edges between found two sets of nodes.</p></dd>
</dl>
<p><em>Note:</em> <i class="term">MaxCut</i> is a <span class="sectref"><a href="#subsection7">2-approximation algorithm.</a></span></p></dd>
<dt><a name="26"><b class="cmd">struct::graph::op::UnweightedKCenter</b> <i class="arg">G</i> <i class="arg">k</i></a></dt>
<dd><p>Approximation algorithm that solves a <span class="sectref"><a href="#subsection5">k-center problem</a></span>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Undirected complete graph <i class="arg">G</i>, which satisfies triangle inequality.</p></dd>
<dt>Integer <i class="arg">k</i> (input)</dt>
<dd><p>Positive integer that sets the number of nodes that will be included in <i class="term">k-center</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Set of nodes - <i class="arg">k</i> center for graph <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> <i class="term">UnweightedKCenter</i> is a <span class="sectref"><a href="#subsection7">2-approximation algorithm.</a></span></p></dd>
<dt><a name="27"><b class="cmd">struct::graph::op::WeightedKCenter</b> <i class="arg">G</i> <i class="arg">nodeWeights</i> <i class="arg">W</i></a></dt>
<dd><p>Approximation algorithm that solves a weighted version of <span class="sectref"><a href="#subsection5">k-center problem</a></span>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Undirected complete graph <i class="arg">G</i>, which satisfies triangle inequality.</p></dd>
<dt>Integer <i class="arg">W</i> (input)</dt>
<dd><p>Positive integer that sets the maximum possible weight of <i class="term">k-center</i> found by algorithm.</p></dd>
<dt>List <i class="arg">nodeWeights</i> (input)</dt>
<dd><p>List of nodes and its weights in graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Set of nodes, which is solution found by algorithm.</p></dd>
</dl>
<p><em>Note:</em><i class="term">WeightedKCenter</i> is a <span class="sectref"><a href="#subsection7">3-approximation algorithm.</a></span></p></dd>
<dt><a name="28"><b class="cmd">struct::graph::op::GreedyMaxIndependentSet</b> <i class="arg">G</i></a></dt>
<dd><p>A <i class="term">maximal independent set</i> is an <i class="term"><a href="../../../../index.html#key471">independent set</a></i> such that adding any other node
to the set forces the set to contain an edge.</p>
<p>Algorithm for input graph <i class="arg">G</i> returns set of nodes (list), which are contained in Max Independent
Set found by algorithm.</p></dd>
<dt><a name="29"><b class="cmd">struct::graph::op::GreedyWeightedMaxIndependentSet</b> <i class="arg">G</i> <i class="arg">nodeWeights</i></a></dt>
<dd><p>Weighted variation of <i class="term">Maximal Independent Set</i>. It takes as an input argument
not only graph <i class="arg">G</i> but also set of weights for all vertices in graph <i class="arg">G</i>.</p>
<p><em>Note:</em>
Read also <i class="term">Maximal Independent Set</i> description for more info.</p></dd>
<dt><a name="30"><b class="cmd">struct::graph::op::VerticesCover</b> <i class="arg">G</i></a></dt>
<dd><p><i class="term">Vertices cover</i> is a set of vertices such that each edge of the graph is incident to
at least one vertex of the set. This 2-approximation algorithm searches for minimum
<i class="term">vertices cover</i>, which is a classical optimization problem in computer science and
is a typical example of an <i class="term">NP-hard</i> optimization problem that has an approximation
algorithm.
For input graph <i class="arg">G</i> algorithm returns the set of edges (list), which is Vertex Cover found by algorithm.</p></dd>
<dt><a name="31"><b class="cmd">struct::graph::op::EdmondsKarp</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i></a></dt>
<dd><p>Improved Ford-Fulkerson's algorithm, computing the <span class="sectref"><a href="#subsection6">maximum flow</a></span> in given flow network <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Weighted and directed graph. Each edge should have set integer attribute considered as
maximum throughputs that can be carried by that link (edge).</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The node that is a source for graph <i class="arg">G</i>.</p></dd>
<dt>Node <i class="arg">t</i> (input)</dt>
<dd><p>The node that is a sink for graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Procedure returns the dictionary containing throughputs for all edges. For
each key ( the edge between nodes <i class="term">u</i> and <i class="term">v</i> in the form of <i class="term">list u v</i> ) there is
a value that is a throughput for that key. Edges where throughput values
are equal to 0 are not returned ( it is like there was no link in the flow network
between nodes connected by such edge).</p></dd>
</dl>
<p>The general idea of algorithm is finding the shortest augumenting paths in graph <i class="arg">G</i>, as long
as they exist, and for each path updating the edge's weights along that path,
with maximum possible throughput. The final (maximum) flow is found
when there is no other augumenting path from source to sink.</p>
<p><em>Note:</em> Algorithm complexity : <i class="term">O(V*E)</i>, where <i class="term">V</i> is the number of nodes and <i class="term"><a href="../../../../index.html#key807">E</a></i> is the number
of edges in graph <i class="term">G</i>.</p></dd>
<dt><a name="32"><b class="cmd">struct::graph::op::BusackerGowen</b> <i class="arg">G</i> <i class="arg">desiredFlow</i> <i class="arg">s</i> <i class="arg">t</i></a></dt>
<dd><p>Algorithm finds solution for a <span class="sectref"><a href="#subsection6">minimum cost flow problem</a></span>. So, the goal is to find a flow,
whose max value can be <i class="arg">desiredFlow</i>, from source node <i class="arg">s</i> to sink node <i class="arg">t</i> in given flow network <i class="arg">G</i>.
That network except throughputs at edges has also defined a non-negative cost on each edge - cost of using that edge when
directing flow with that edge ( it can illustrate e.g. fuel usage, time or any other measure dependent on usages ).</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Flow network (directed graph), each edge in graph should have two integer attributes: <i class="term">cost</i> and <i class="term">throughput</i>.</p></dd>
<dt>Integer <i class="arg">desiredFlow</i> (input)</dt>
<dd><p>Max value of the flow for that network.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for graph <i class="arg">G</i>.</p></dd>
<dt>Node <i class="arg">t</i> (input)</dt>
<dd><p>The sink node for graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Dictionary containing values of used throughputs for each edge ( key ).
found by algorithm.</p></dd>
</dl>
<p><em>Note:</em> Algorithm complexity : <i class="term">O(V**2*desiredFlow)</i>, where <i class="term">V</i> is the number of nodes in graph <i class="arg">G</i>.</p></dd>
<dt><a name="33"><b class="cmd">struct::graph::op::ShortestsPathsByBFS</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">outputFormat</i></a></dt>
<dd><p>Shortest pathfinding algorithm using BFS method. In comparison to <b class="cmd">struct::graph::op::dijkstra</b> it can
work with negative weights on edges. Of course negative cycles are not allowed. Algorithm is better than dijkstra
for sparse graphs, but also there exist some pathological cases (those cases generally don't appear in practise) that
make time complexity increase exponentially with the growth of the number of nodes.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Input graph.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>Source node for which all distances to each other node in graph <i class="arg">G</i> are computed.</p></dd>
</dl></dd>
<dt>Options and result:</dt>
<dd><dl class="doctools_options">
<dt><b class="option">distances</b></dt>
<dd><p>When selected <i class="arg">outputFormat</i> is <b class="const">distances</b> - procedure returns dictionary containing
distances between source node <i class="arg">s</i> and each other node in graph <i class="arg">G</i>.</p></dd>
<dt><b class="option">paths</b></dt>
<dd><p>When selected <i class="arg">outputFormat</i> is <b class="const">paths</b> - procedure returns dictionary containing
for each node <i class="term">v</i>, a list of nodes, which is a path between source node <i class="arg">s</i> and node <i class="term">v</i>.</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">struct::graph::op::BFS</b> <i class="arg">G</i> <i class="arg">s</i> <span class="opt">?<i class="arg">outputFormat</i>...?</span></a></dt>
<dd><p>Breadth-First Search - algorithm creates the BFS Tree.
Memory and time complexity: <i class="term">O(V + E)</i>, where <i class="term">V</i> is the number of nodes and <i class="term"><a href="../../../../index.html#key807">E</a></i>
is number of edges.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Input graph.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>Source node for BFS procedure.</p></dd>
</dl></dd>
<dt>Options and result:</dt>
<dd><dl class="doctools_options">
<dt><b class="option">graph</b></dt>
<dd><p>When selected <b class="option">outputFormat</b> is <b class="option">graph</b> - procedure returns a graph structure (<b class="cmd"><a href="graph.html">struct::graph</a></b>),
which is equivalent to BFS tree found by algorithm.</p></dd>
<dt><b class="option">tree</b></dt>
<dd><p>When selected <b class="option">outputFormat</b> is <b class="option">tree</b> - procedure returns a tree structure (<b class="cmd"><a href="struct_tree.html">struct::tree</a></b>),
which is equivalent to BFS tree found by algorithm.</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">struct::graph::op::MinimumDiameterSpanningTree</b> <i class="arg">G</i></a></dt>
<dd><p>The goal is to find for input graph <i class="arg">G</i>, the <i class="term">spanning tree</i> that
has the minimum <i class="term"><a href="../../../../index.html#key458">diameter</a></i> value.</p>
<p>General idea of algorithm is to run <i class="term"><a href="../../../../index.html#key465">BFS</a></i> over all vertices in graph
<i class="arg">G</i>. If the diameter <i class="term">d</i> of the tree is odd, then we are sure that tree
given by <i class="term"><a href="../../../../index.html#key465">BFS</a></i> is minimum (considering diameter value). When, diameter <i class="term">d</i>
is even, then optimal tree can have minimum <i class="term"><a href="../../../../index.html#key458">diameter</a></i> equal to <i class="term">d</i> or
<i class="term">d-1</i>.</p>
<p>In that case, what algorithm does is rebuilding the tree given by <i class="term"><a href="../../../../index.html#key465">BFS</a></i>, by
adding a vertice between root node and root's child node (nodes), such that
subtree created with child node as root node is the greatest one (has the
greatests height). In the next step for such rebuilded tree, we run again <i class="term"><a href="../../../../index.html#key465">BFS</a></i>
with new node as root node. If the height of the tree didn't changed, we have found
a better solution.</p>
<p>For input graph <i class="arg">G</i> algorithm returns the graph structure (<b class="cmd"><a href="graph.html">struct::graph</a></b>) that is
a spanning tree with minimum diameter found by algorithm.</p></dd>
<dt><a name="36"><b class="cmd">struct::graph::op::MinimumDegreeSpanningTree</b> <i class="arg">G</i></a></dt>
<dd><p>Algorithm finds for input graph <i class="arg">G</i>, a spanning tree <i class="term">T</i> with the minimum possible
degree. That problem is <i class="term">NP-hard</i>, so algorithm is an approximation algorithm.</p>
<p>Let <i class="term">V</i> be the set of nodes for graph <i class="arg">G</i> and let <i class="term">W</i> be any subset of <i class="term">V</i>. Lets
assume also that <i class="term">OPT</i> is optimal solution and <i class="term">ALG</i> is solution found by algorithm for input
graph <i class="arg">G</i>.</p>
<p>It can be proven that solution found with the algorithm must fulfil inequality:</p>
<p><i class="term">((|W| + k - 1) / |W|) &lt;= ALG &lt;= 2*OPT + log2(n) + 1</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Undirected simple graph.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns graph structure, which is equivalent to spanning tree <i class="term">T</i> found by algorithm.</p></dd>
</dl></dd>
<dt><a name="37"><b class="cmd">struct::graph::op::MaximumFlowByDinic</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i> <i class="arg">blockingFlowAlg</i></a></dt>
<dd><p>Algorithm finds <span class="sectref"><a href="#subsection6">maximum flow</a></span> for the flow network represented by graph <i class="arg">G</i>. It is based on
the blocking-flow finding methods, which give us different complexities what makes a better fit for
different graphs.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Directed graph <i class="arg">G</i> representing the flow network. Each edge should have attribute
<i class="term">throughput</i> set with integer value.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for the flow network <i class="arg">G</i>.</p></dd>
<dt>Node <i class="arg">t</i> (input)</dt>
<dd><p>The sink node for the flow network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Options:</dt>
<dd><dl class="doctools_options">
<dt><b class="option">dinic</b></dt>
<dd><p>Procedure will find maximum flow for flow network <i class="arg">G</i> using Dinic's algorithm (<b class="cmd">struct::graph::op::BlockingFlowByDinic</b>)
for blocking flow computation.</p></dd>
<dt><b class="option">mkm</b></dt>
<dd><p>Procedure will find maximum flow for flow network <i class="arg">G</i> using Malhotra, Kumar and Maheshwari's algorithm (<b class="cmd">struct::graph::op::BlockingFlowByMKM</b>)
for blocking flow computation.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns dictionary containing it's flow value for each edge (key) in network <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> <b class="cmd">struct::graph::op::BlockingFlowByDinic</b> gives <i class="term">O(m*n^2)</i> complexity and
<b class="cmd">struct::graph::op::BlockingFlowByMKM</b> gives <i class="term">O(n^3)</i> complexity, where <i class="term">n</i> is the number of nodes
and <i class="term">m</i> is the number of edges in flow network <i class="arg">G</i>.</p></dd>
<dt><a name="38"><b class="cmd">struct::graph::op::BlockingFlowByDinic</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i></a></dt>
<dd><p>Algorithm for given network <i class="arg">G</i> with source <i class="arg">s</i> and sink <i class="arg">t</i>, finds a <span class="sectref"><a href="#subsection6">blocking
flow</a></span>, which can be used to obtain a <i class="term"><a href="../../../../index.html#key498">maximum flow</a></i> for that network <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Directed graph <i class="arg">G</i> representing the flow network. Each edge should have attribute
<i class="term">throughput</i> set with integer value.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for the flow network <i class="arg">G</i>.</p></dd>
<dt>Node <i class="arg">t</i> (input)</dt>
<dd><p>The sink node for the flow network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns dictionary containing it's blocking flow value for each edge (key) in network <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> Algorithm's complexity is <i class="term">O(n*m)</i>, where <i class="term">n</i> is the number of nodes
and <i class="term">m</i> is the number of edges in flow network <i class="arg">G</i>.</p></dd>
<dt><a name="39"><b class="cmd">struct::graph::op::BlockingFlowByMKM</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i></a></dt>
<dd><p>Algorithm for given network <i class="arg">G</i> with source <i class="arg">s</i> and sink <i class="arg">t</i>, finds a <span class="sectref"><a href="#subsection6">blocking
flow</a></span>, which can be used to obtain a <i class="term"><a href="../../../../index.html#key498">maximum flow</a></i> for that <i class="term"><a href="../../../../index.html#key672">network</a></i> <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Directed graph <i class="arg">G</i> representing the flow network. Each edge should have attribute
<i class="term">throughput</i> set with integer value.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for the flow network <i class="arg">G</i>.</p></dd>
<dt>Node <i class="arg">t</i> (input)</dt>
<dd><p>The sink node for the flow network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns dictionary containing it's blocking flow value for each edge (key) in network <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> Algorithm's complexity is <i class="term">O(n^2)</i>, where <i class="term">n</i> is the number of nodes in flow network <i class="arg">G</i>.</p></dd>
<dt><a name="40"><b class="cmd">struct::graph::op::createResidualGraph</b> <i class="arg">G</i> <i class="arg">f</i></a></dt>
<dd><p>Procedure creates a <i class="term"><a href="../../../../index.html#key466">residual graph</a></i> (or <span class="sectref"><a href="#subsection6">residual network</a></span> ) for network <i class="arg">G</i> and given
flow <i class="arg">f</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Flow network (directed graph where each edge has set attribute: <i class="term">throughput</i> ).</p></dd>
<dt>dictionary <i class="arg">f</i> (input)</dt>
<dd><p>Current flows in flow network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Procedure returns graph structure that is a <i class="term"><a href="../../../../index.html#key466">residual graph</a></i> created from input flow
network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt><a name="41"><b class="cmd">struct::graph::op::createAugmentingNetwork</b> <i class="arg">G</i> <i class="arg">f</i> <i class="arg">path</i></a></dt>
<dd><p>Procedure creates an <span class="sectref"><a href="#subsection6">augmenting network</a></span> for a given residual network <i class="arg">G</i>
, flow <i class="arg">f</i> and augmenting path <i class="arg">path</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Residual network (directed graph), where for every edge there are set two attributes: throughput and cost.</p></dd>
<dt>Dictionary <i class="arg">f</i> (input)</dt>
<dd><p>Dictionary which contains for every edge (key), current value of the flow on that edge.</p></dd>
<dt>List <i class="arg">path</i> (input)</dt>
<dd><p>Augmenting path, set of edges (list) for which we create the network modification.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns graph structure containing the modified augmenting network.</p></dd>
</dl></dd>
<dt><a name="42"><b class="cmd">struct::graph::op::createLevelGraph</b> <i class="arg">Gf</i> <i class="arg">s</i></a></dt>
<dd><p>For given residual graph <i class="arg">Gf</i> procedure finds the <span class="sectref"><a href="#subsection6">level graph</a></span>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">Gf</i> (input)</dt>
<dd><p>Residual network, where each edge has it's attribute <i class="term">throughput</i> set with certain value.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for the residual network <i class="arg">Gf</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Procedure returns a <i class="term"><a href="../../../../index.html#key487">level graph</a></i> created from input <i class="term">residual network</i>.</p></dd>
</dl></dd>
<dt><a name="43"><b class="cmd">struct::graph::op::TSPLocalSearching</b> <i class="arg">G</i> <i class="arg">C</i></a></dt>
<dd><p>Algorithm is a <i class="term">heuristic of local searching</i> for <i class="term">Travelling Salesman Problem</i>. For some
solution of <i class="term">TSP problem</i>, it checks if it's possible to find a better solution. As <i class="term">TSP</i>
is well known NP-Complete problem, so algorithm is a approximation algorithm (with 2 approximation factor).</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Undirected and complete graph with attributes &quot;weight&quot; set on each single edge.</p></dd>
<dt>List <i class="arg">C</i> (input)</dt>
<dd><p>A list of edges being <i class="term">Hamiltonian cycle</i>, which is solution of <i class="term">TSP Problem</i> for graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns the best solution for <i class="term">TSP problem</i>, it was able to find.</p></dd>
</dl>
<p><em>Note:</em> The solution depends on the choosing of the beginning cycle <i class="arg">C</i>. It's not true that better cycle
assures that better solution will be found, but practise shows that we should give starting cycle with as small
sum of weights as possible.</p></dd>
<dt><a name="44"><b class="cmd">struct::graph::op::TSPLocalSearching3Approx</b> <i class="arg">G</i> <i class="arg">C</i></a></dt>
<dd><p>Algorithm is a <i class="term">heuristic of local searching</i> for <i class="term">Travelling Salesman Problem</i>. For some
solution of <i class="term">TSP problem</i>, it checks if it's possible to find a better solution. As <i class="term">TSP</i>
is well known NP-Complete problem, so algorithm is a approximation algorithm (with 3 approximation factor).</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Undirected and complete graph with attributes &quot;weight&quot; set on each single edge.</p></dd>
<dt>List <i class="arg">C</i> (input)</dt>
<dd><p>A list of edges being <i class="term">Hamiltonian cycle</i>, which is solution of <i class="term">TSP Problem</i> for graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns the best solution for <i class="term">TSP problem</i>, it was able to find.</p></dd>
</dl>
<p><em>Note:</em> In practise 3-approximation algorithm turns out to be far more effective than 2-approximation, but it gives
worser approximation factor. Further heuristics of local searching (e.g. 4-approximation) doesn't give enough boost to
square the increase of approximation factor, so 2 and 3 approximations are mainly used.</p></dd>
<dt><a name="45"><b class="cmd">struct::graph::op::createSquaredGraph</b> <i class="arg">G</i></a></dt>
<dd><p>X-Squared graph is a graph with the same set of nodes as input graph <i class="arg">G</i>, but a different set of edges. X-Squared graph
has edge <i class="term">(u,v)</i>, if and only if, the distance between <i class="term">u</i> and <i class="term">v</i> nodes is not greater than X and <i class="term">u != v</i>.</p>
<p>Procedure for input graph <i class="arg">G</i>, returns its two-squared graph.</p>
<p><em>Note:</em> Distances used in choosing new set of edges are considering the number of edges, not the sum of weights at edges.</p></dd>
<dt><a name="46"><b class="cmd">struct::graph::op::createCompleteGraph</b> <i class="arg">G</i> <i class="arg">originalEdges</i></a></dt>
<dd><p>For input graph <i class="arg">G</i> procedure adds missing arcs to make it a <i class="term"><a href="../../../../index.html#key488">complete graph</a></i>. It also holds in
variable <i class="arg">originalEdges</i> the set of arcs that graph <i class="arg">G</i> possessed before that operation.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Background theory and terms</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Shortest Path Problem</a></h3>
<dl class="doctools_definitions">
<dt>Definition (<i class="term">single-pair shortest path problem</i>):</dt>
<dd><p>Formally, given a weighted graph (let <i class="term">V</i> be the set of vertices, and <i class="term"><a href="../../../../index.html#key807">E</a></i> a set of edges),
and one vertice <i class="term">v</i> of <i class="term">V</i>, find a path <i class="term">P</i> from <i class="term">v</i> to a <i class="term">v'</i> of V so that
the sum of weights on edges along the path is minimal among all paths connecting v to v'.</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">The single-source shortest path problem</i>, in which we have to find shortest paths from a source vertex v to all other vertices in the graph.</p></li>
<li><p><i class="term">The single-destination shortest path problem</i>, in which we have to find shortest paths from all vertices in the graph to a single destination vertex v. This can be reduced to the single-source shortest path problem by reversing the edges in the graph.</p></li>
<li><p><i class="term">The all-pairs shortest path problem</i>, in which we have to find shortest paths between every pair of vertices v, v' in the graph.</p></li>
</ul>
<p><em>Note:</em>
The result of <i class="term">Shortest Path problem</i> can be <i class="term">Shortest Path tree</i>, which is a subgraph of a given (possibly weighted) graph constructed so that the
distance between a selected root node and all other nodes is minimal. It is a tree because if there are two paths between the root node and some
vertex v (i.e. a cycle), we can delete the last edge of the longer path without increasing the distance from the root node to any node in the subgraph.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Travelling Salesman Problem</a></h3>
<dl class="doctools_definitions">
<dt>Definition:</dt>
<dd><p>For given edge-weighted (weights on edges should be positive) graph the goal is to find the cycle that visits each node in graph
exactly once (<i class="term">Hamiltonian cycle</i>).</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Metric TSP</i> - A very natural restriction of the <i class="term">TSP</i> is to require that the distances between cities form a <i class="term">metric</i>, i.e.,
they satisfy <i class="term">the triangle inequality</i>. That is, for any 3 cities <i class="term">A</i>, <i class="term">B</i> and <i class="term"><a href="../../../../index.html#key290">C</a></i>, the distance between <i class="term">A</i> and <i class="term"><a href="../../../../index.html#key290">C</a></i>
must be at most the distance from <i class="term">A</i> to <i class="term">B</i> plus the distance from <i class="term">B</i> to <i class="term"><a href="../../../../index.html#key290">C</a></i>. Most natural instances of <i class="term">TSP</i>
satisfy this constraint.</p></li>
<li><p><i class="term">Euclidean TSP</i> - Euclidean TSP, or <i class="term">planar TSP</i>, is the <i class="term">TSP</i> with the distance being the ordinary <i class="term">Euclidean distance</i>.
<i class="term">Euclidean TSP</i> is a particular case of <i class="term">TSP</i> with <i class="term">triangle inequality</i>, since distances in plane obey triangle inequality. However,
it seems to be easier than general <i class="term">TSP</i> with <i class="term">triangle inequality</i>. For example, <i class="term">the minimum spanning tree</i> of the graph associated
with an instance of <i class="term">Euclidean TSP</i> is a <i class="term">Euclidean minimum spanning tree</i>, and so can be computed in expected <i class="term">O(n log n)</i> time for
<i class="term">n</i> points (considerably less than the number of edges). This enables the simple <i class="term">2-approximation algorithm</i> for TSP with triangle
inequality above to operate more quickly.</p></li>
<li><p><i class="term">Asymmetric TSP</i> - In most cases, the distance between two nodes in the <i class="term">TSP</i> network is the same in both directions.
The case where the distance from <i class="term">A</i> to <i class="term">B</i> is not equal to the distance from <i class="term">B</i> to <i class="term">A</i> is called <i class="term">asymmetric TSP</i>.
A practical application of an <i class="term">asymmetric TSP</i> is route optimisation using street-level routing (asymmetric due to one-way streets,
slip-roads and motorways).</p></li>
</ul></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Matching Problem</a></h3>
<dl class="doctools_definitions">
<dt>Definition:</dt>
<dd><p>Given a graph <i class="term">G = (V,E)</i>, a matching or <i class="term">edge-independent set</i> <i class="term">M</i> in <i class="term">G</i> is a set of pairwise non-adjacent edges,
that is, no two edges share a common vertex. A vertex is <i class="term">matched</i> if it is incident to an edge in the <i class="term">matching M</i>.
Otherwise the vertex is <i class="term">unmatched</i>.</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Maximal matching</i> - a matching <i class="term">M</i> of a graph G with the property that if any edge not in <i class="term">M</i> is added to <i class="term">M</i>,
it is no longer a <i class="term"><a href="../../../../index.html#key5">matching</a></i>, that is, <i class="term">M</i> is maximal if it is not a proper subset of any other <i class="term"><a href="../../../../index.html#key5">matching</a></i> in graph G.
In other words, a <i class="term">matching M</i> of a graph G is maximal if every edge in G has a non-empty intersection with at least one edge in <i class="term">M</i>.</p></li>
<li><p><i class="term">Maximum matching</i> - a matching that contains the largest possible number of edges. There may be many <i class="term">maximum matchings</i>.
The <i class="term">matching number</i> of a graph G is the size of a <i class="term">maximum matching</i>. Note that every <i class="term">maximum matching</i> is <i class="term">maximal</i>,
but not every <i class="term">maximal matching</i> is a <i class="term">maximum matching</i>.</p></li>
<li><p><i class="term">Perfect matching</i> - a matching which matches all vertices of the graph. That is, every vertex of the graph is incident to exactly one
edge of the matching. Every <i class="term">perfect matching</i> is <i class="term"><a href="../../../../index.html#key310">maximum</a></i> and hence <i class="term">maximal</i>. In some literature, the term <i class="term">complete matching</i>
is used. A <i class="term">perfect matching</i> is also a <i class="term">minimum-size edge cover</i>. Moreover, the size of a <i class="term">maximum matching</i> is no larger than the
size of a <i class="term">minimum edge cover</i>.</p></li>
<li><p><i class="term">Near-perfect matching</i> - a matching in which exactly one vertex is unmatched. This can only occur when the graph has an odd number of vertices,
and such a <i class="term"><a href="../../../../index.html#key5">matching</a></i> must be <i class="term"><a href="../../../../index.html#key310">maximum</a></i>. If, for every vertex in a graph, there is a near-perfect matching that omits only that vertex, the graph
is also called <i class="term">factor-critical</i>.</p></li>
</ul></dd>
<dt>Related terms:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Alternating path</i> - given a matching <i class="term">M</i>, an <i class="term">alternating path</i> is a path in which the edges belong alternatively
to the matching and not to the matching.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key490">Augmenting path</a></i> - given a matching <i class="term">M</i>, an <i class="term"><a href="../../../../index.html#key490">augmenting path</a></i> is an <i class="term">alternating path</i> that starts from
and ends on free (unmatched) vertices.</p></li>
</ul></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Cut Problems</a></h3>
<dl class="doctools_definitions">
<dt>Definition:</dt>
<dd><p>A <i class="term">cut</i> is a partition of the vertices of a graph into two <i class="term">disjoint subsets</i>. The <i class="term">cut-set</i> of the <i class="term">cut</i> is the
set of edges whose end points are in different subsets of the partition. Edges are said to be crossing the cut if they are in its <i class="term">cut-set</i>.</p>
<p>Formally:</p>
<ul class="doctools_itemized">
<li><p>a <i class="term">cut</i> <i class="term">C = (S,T)</i> is a partition of <i class="term">V</i> of a graph <i class="term">G = (V, E)</i>.</p></li>
<li><p>an <i class="term">s-t cut</i> <i class="term">C = (S,T)</i> of a <i class="term"><a href="../../../../index.html#key499">flow network</a></i> <i class="term">N = (V, E)</i> is a cut of <i class="term">N</i> such that <i class="term">s</i> is included in <i class="term">S</i>
and <i class="term">t</i> is included in <i class="term">T</i>, where <i class="term">s</i> and <i class="term">t</i> are the <i class="term"><a href="../../../../index.html#key436">source</a></i> and the <i class="term">sink</i> of <i class="term">N</i> respectively.</p></li>
<li><p>The <i class="term">cut-set</i> of a <i class="term">cut C = (S,T)</i> is such set of edges from graph <i class="term">G = (V, E)</i> that each edge <i class="term">(u, v)</i> satisfies
condition that <i class="term">u</i> is included in <i class="term">S</i> and <i class="term">v</i> is included in <i class="term">T</i>.</p></li>
</ul>
<p>In an <i class="term">unweighted undirected</i> graph, the size or weight of a cut is the number of edges crossing the cut. In a <i class="term">weighted graph</i>,
the same term is defined by the sum of the weights of the edges crossing the cut.</p>
<p>In a <i class="term"><a href="../../../../index.html#key499">flow network</a></i>, an <i class="term">s-t cut</i> is a cut that requires the <i class="term"><a href="../../../../index.html#key436">source</a></i> and the <i class="term">sink</i> to be in different subsets,
and its <i class="term">cut-set</i> only consists of edges going from the <i class="term">source's</i> side to the <i class="term">sink's</i> side. The capacity of an <i class="term">s-t cut</i>
is defined by the sum of capacity of each edge in the <i class="term">cut-set</i>.</p>
<p>The <i class="term">cut</i> of a graph can sometimes refer to its <i class="term">cut-set</i> instead of the partition.</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Minimum cut</i> - A cut is minimum if the size of the cut is not larger than the size of any other cut.</p></li>
<li><p><i class="term">Maximum cut</i> - A cut is maximum if the size of the cut is not smaller than the size of any other cut.</p></li>
<li><p><i class="term">Sparsest cut</i> - The <i class="term">Sparsest cut problem</i> is to bipartition the vertices so as to minimize the ratio of the number
of edges across the cut divided by the number of vertices in the smaller half of the partition.</p></li>
</ul></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">K-Center Problem</a></h3>
<dl class="doctools_definitions">
<dt>Definitions:</dt>
<dd><dl class="doctools_definitions">
<dt><i class="term">Unweighted K-Center</i></dt>
<dd><p>For any set <i class="term">S</i> ( which is subset of <i class="term">V</i> ) and node <i class="term">v</i>, let the <i class="term">connect(v,S)</i> be the
cost of cheapest edge connecting <i class="term">v</i> with any node in <i class="term">S</i>. The goal is to find
such <i class="term">S</i>, that <i class="term">|S| = k</i> and <i class="term">max_v{connect(v,S)}</i> is possibly small.</p>
<p>In other words, we can use it i.e. for finding best locations in the city ( nodes
of input graph ) for placing k buildings, such that those buildings will be as close
as possible to all other locations in town.</p></dd>
<dt><i class="term">Weighted K-Center</i></dt>
<dd><p>The variation of <i class="term">unweighted k-center problem</i>. Besides the fact graph is edge-weighted,
there are also weights on vertices of input graph <i class="arg">G</i>. We've got also restriction
<i class="arg">W</i>. The goal is to choose such set of nodes <i class="term">S</i> ( which is a subset of <i class="term">V</i> ), that it's
total weight is not greater than <i class="arg">W</i> and also function: <i class="term">max_v { min_u { cost(u,v) }}</i>
has the smallest possible worth ( <i class="term">v</i> is a node in <i class="term">V</i> and <i class="term">u</i> is a node in <i class="term">S</i> ).</p></dd>
</dl></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Flow Problems</a></h3>
<dl class="doctools_definitions">
<dt>Definitions:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">the maximum flow problem</i> - the goal is to find a feasible flow through a single-source, single-sink flow network that is maximum.
The <i class="term">maximum flow problem</i> can be seen as a special case of more complex network flow problems, such as the <i class="term">circulation problem</i>.
The maximum value of an <i class="term">s-t flow</i> is equal to the minimum capacity of an <i class="term">s-t cut</i> in the network, as stated in the
<i class="term">max-flow min-cut theorem</i>.</p>
<p>More formally for flow network <i class="term">G = (V,E)</i>, where for each edge <i class="term">(u, v)</i> we have its throuhgput <i class="term">c(u,v)</i> defined. As <i class="term"><a href="../../../../index.html#key141">flow</a></i>
<i class="term">F</i> we define set of non-negative integer attributes <i class="term">f(u,v)</i> assigned to edges, satisfying such conditions:</p>
<ol class="doctools_enumerated">
<li><p>for each edge <i class="term">(u, v)</i> in <i class="term">G</i> such condition should be satisfied:      0 &lt;= f(u,v) &lt;= c(u,v)</p></li>
<li><p>Network <i class="term">G</i> has source node <i class="term">s</i> such that the flow <i class="term">F</i> is equal to the sum of outcoming flow decreased by the sum of incoming flow from that source node <i class="term">s</i>.</p></li>
<li><p>Network <i class="term">G</i> has sink node <i class="term">t</i> such that the the <i class="term">-F</i> value is equal to the sum of the incoming flow decreased by the sum of outcoming flow from that sink node <i class="term">t</i>.</p></li>
<li><p>For each node that is not a <i class="term"><a href="../../../../index.html#key436">source</a></i> or <i class="term">sink</i> the sum of incoming flow and sum of outcoming flow should be equal.</p></li>
</ol>
</li>
<li><p><i class="term">the minimum cost flow problem</i> - the goal is finding the cheapest possible way of sending a certain amount of flow through a <i class="term"><a href="../../../../index.html#key499">flow network</a></i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key456">blocking flow</a></i> - a <i class="term"><a href="../../../../index.html#key456">blocking flow</a></i> for a <i class="term">residual network</i> <i class="term">Gf</i> we name such flow <i class="term">b</i> in <i class="term">Gf</i> that:</p>
<ol class="doctools_enumerated">
<li><p>Each path from <i class="term">sink</i> to <i class="term"><a href="../../../../index.html#key436">source</a></i> is the shortest path in <i class="term">Gf</i>.</p></li>
<li><p>Each shortest path in <i class="term">Gf</i> contains an edge with fully used throughput in <i class="term">Gf+b</i>.</p></li>
</ol>
</li>
<li><p><i class="term">residual network</i> - for a flow network <i class="term">G</i> and flow <i class="term">f</i> <i class="term">residual network</i> is built with those edges, which can
send larger flow. It contains only those edges, which can send flow larger than 0.</p></li>
<li><p><i class="term">level network</i> - it has the same set of nodes as <i class="term"><a href="../../../../index.html#key466">residual graph</a></i>, but has only those edges <i class="term">(u,v)</i> from <i class="arg">Gf</i>
for which such equality is satisfied: <i class="term">distance(s,u)+1 = distance(s,v)</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key470">augmenting network</a></i> - it is a modification of <i class="term">residual network</i> considering the new
flow values. Structure stays unchanged but values of throughputs and costs at edges
are different.</p></li>
</ul></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Approximation algorithm</a></h3>
<dl class="doctools_definitions">
<dt>k-approximation algorithm:</dt>
<dd><p>Algorithm is a k-approximation, when for <i class="term">ALG</i> (solution returned by algorithm) and
<i class="term">OPT</i> (optimal solution), such inequality is true:</p>
<ul class="doctools_itemized">
<li><p>for minimalization problems: <i class="term">ALG/OPT &lt;= k</i></p></li>
<li><p>for maximalization problems: <i class="term">OPT/ALG &lt;= k</i></p></li>
</ul></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://en.wikipedia.org/wiki/Adjacency_matrix">Adjacency matrix</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Adjacency_list">Adjacency list</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Kruskal%27s_algorithm">Kruskal's algorithm</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Prim%27s_algorithm">Prim's algorithm</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Bipartite_graph">Bipartite graph</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Strongly_connected_components">Strongly connected components</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm">Tarjan's strongly connected components algorithm</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Cut_vertex">Cut vertex</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Bridge_(graph_theory)">Bridge</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Bellman-Ford_algorithm">Bellman-Ford's algorithm</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Johnson_algorithm">Johnson's algorithm</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Floyd-Warshall_algorithm">Floyd-Warshall's algorithm</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Travelling_salesman_problem">Travelling Salesman Problem</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Christofides_algorithm">Christofides Algorithm</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Maxcut">Max Cut</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Matching">Matching</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Maximal_independent_set">Max Independent Set</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Vertex_cover_problem">Vertex Cover</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Ford-Fulkerson_algorithm">Ford-Fulkerson's algorithm</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Maximum_flow_problem">Maximum Flow problem</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Minimum_cost_flow_problem">Busacker-Gowen's algorithm</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Dinic's_algorithm">Dinic's algorithm</a></p></li>
<li><p><a href="http://www.csc.kth.se/~viggo/wwwcompendium/node128.html">K-Center problem</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Breadth-first_search">BFS</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Degree-constrained_spanning_tree">Minimum Degree Spanning Tree</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Approximation_algorithm">Approximation algorithm</a></p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: graph</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key468">adjacency list</a>, <a href="../../../../index.html#key492">adjacency matrix</a>, <a href="../../../../index.html#key485">adjacent</a>, <a href="../../../../index.html#key494">approximation algorithm</a>, <a href="../../../../index.html#key473">arc</a>, <a href="../../../../index.html#key483">articulation point</a>, <a href="../../../../index.html#key470">augmenting network</a>, <a href="../../../../index.html#key490">augmenting path</a>, <a href="../../../../index.html#key465">bfs</a>, <a href="../../../../index.html#key495">bipartite</a>, <a href="../../../../index.html#key456">blocking flow</a>, <a href="../../../../index.html#key467">bridge</a>, <a href="../../../../index.html#key488">complete graph</a>, <a href="../../../../index.html#key481">connected component</a>, <a href="../../../../index.html#key484">cut edge</a>, <a href="../../../../index.html#key486">cut vertex</a>, <a href="../../../../index.html#key475">degree</a>, <a href="../../../../index.html#key476">degree constrained spanning tree</a>, <a href="../../../../index.html#key458">diameter</a>, <a href="../../../../index.html#key496">dijkstra</a>, <a href="../../../../index.html#key479">distance</a>, <a href="../../../../index.html#key501">eccentricity</a>, <a href="../../../../index.html#key460">edge</a>, <a href="../../../../index.html#key499">flow network</a>, <a href="../../../../index.html#key305">graph</a>, <a href="../../../../index.html#key474">heuristic</a>, <a href="../../../../index.html#key471">independent set</a>, <a href="../../../../index.html#key491">isthmus</a>, <a href="../../../../index.html#key487">level graph</a>, <a href="../../../../index.html#key482">local searching</a>, <a href="../../../../index.html#key457">loop</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key478">max cut</a>, <a href="../../../../index.html#key498">maximum flow</a>, <a href="../../../../index.html#key461">minimal spanning tree</a>, <a href="../../../../index.html#key472">minimum cost flow</a>, <a href="../../../../index.html#key462">minimum degree spanning tree</a>, <a href="../../../../index.html#key500">minimum diameter spanning tree</a>, <a href="../../../../index.html#key489">neighbour</a>, <a href="../../../../index.html#key463">node</a>, <a href="../../../../index.html#key469">radius</a>, <a href="../../../../index.html#key466">residual graph</a>, <a href="../../../../index.html#key477">shortest path</a>, <a href="../../../../index.html#key493">squared graph</a>, <a href="../../../../index.html#key455">strongly connected component</a>, <a href="../../../../index.html#key480">subgraph</a>, <a href="../../../../index.html#key459">travelling salesman</a>, <a href="../../../../index.html#key464">vertex</a>, <a href="../../../../index.html#key497">vertex cover</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Alejandro Paz &lt;vidriloco@gmail.com&gt;<br>
Copyright &copy; 2008 (docs) Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2009 Michal Antoniewski &lt;antoniewski.m@gmail.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/matrix.html.



















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553

<div class='fossil-doc' data-title='struct::matrix - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::matrix(n) 2.0.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::matrix - Create and manipulate matrix objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::matrix <span class="opt">?2.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::matrix</b> <span class="opt">?<i class="arg">matrixName</i>?</span> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">source</i>?</span></a></li>
<li><a href="#2"><b class="cmd">matrixName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">matrixName</i> <b class="method">=</b> <i class="arg">sourcematrix</i></a></li>
<li><a href="#4"><i class="arg">matrixName</i> <b class="method">--&gt;</b> <i class="arg">destmatrix</i></a></li>
<li><a href="#5"><i class="arg">matrixName</i> <b class="method">add column</b> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#6"><i class="arg">matrixName</i> <b class="method">add row</b> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#7"><i class="arg">matrixName</i> <b class="method">add columns</b> <i class="arg">n</i></a></li>
<li><a href="#8"><i class="arg">matrixName</i> <b class="method">add rows</b> <i class="arg">n</i></a></li>
<li><a href="#9"><i class="arg">matrixName</i> <b class="method">cells</b></a></li>
<li><a href="#10"><i class="arg">matrixName</i> <b class="method">cellsize</b> <i class="arg">column row</i></a></li>
<li><a href="#11"><i class="arg">matrixName</i> <b class="method">columns</b></a></li>
<li><a href="#12"><i class="arg">matrixName</i> <b class="method">columnwidth</b> <i class="arg">column</i></a></li>
<li><a href="#13"><i class="arg">matrixName</i> <b class="method">delete column</b> <i class="arg">column</i></a></li>
<li><a href="#14"><i class="arg">matrixName</i> <b class="method">delete columns</b> <i class="arg">n</i></a></li>
<li><a href="#15"><i class="arg">matrixName</i> <b class="method">delete row</b> <i class="arg">row</i></a></li>
<li><a href="#16"><i class="arg">matrixName</i> <b class="method">delete rows</b> <i class="arg">n</i></a></li>
<li><a href="#17"><i class="arg">matrixName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></li>
<li><a href="#18"><i class="arg">matrixName</i> <b class="method">destroy</b></a></li>
<li><a href="#19"><i class="arg">matrixName</i> <b class="method">format 2string</b> <span class="opt">?<i class="arg">report</i>?</span></a></li>
<li><a href="#20"><i class="arg">matrixName</i> <b class="method">format 2chan</b> <span class="opt">?<span class="opt">?<i class="arg">report</i>?</span> <i class="arg">channel</i>?</span></a></li>
<li><a href="#21"><i class="arg">matrixName</i> <b class="method">get cell</b> <i class="arg">column row</i></a></li>
<li><a href="#22"><i class="arg">matrixName</i> <b class="method">get column</b> <i class="arg">column</i></a></li>
<li><a href="#23"><i class="arg">matrixName</i> <b class="method">get rect</b> <i class="arg">column_tl row_tl column_br row_br</i></a></li>
<li><a href="#24"><i class="arg">matrixName</i> <b class="method">get row</b> <i class="arg">row</i></a></li>
<li><a href="#25"><i class="arg">matrixName</i> <b class="method">insert column</b> <i class="arg">column</i> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#26"><i class="arg">matrixName</i> <b class="method">insert row</b> <i class="arg">row</i> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#27"><i class="arg">matrixName</i> <b class="method">link</b> <span class="opt">?-transpose?</span> <i class="arg">arrayvar</i></a></li>
<li><a href="#28"><i class="arg">matrixName</i> <b class="method">links</b></a></li>
<li><a href="#29"><i class="arg">matrixName</i> <b class="method">rowheight</b> <i class="arg">row</i></a></li>
<li><a href="#30"><i class="arg">matrixName</i> <b class="method">rows</b></a></li>
<li><a href="#31"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">all</b> <i class="arg">pattern</i></a></li>
<li><a href="#32"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">column</b> <i class="arg">column pattern</i></a></li>
<li><a href="#33"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">row</b> <i class="arg">row pattern</i></a></li>
<li><a href="#34"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">rect</b> <i class="arg">column_tl row_tl column_br row_br pattern</i></a></li>
<li><a href="#35"><i class="arg">matrixName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">column_tl row_tl column_br row_br</i>?</span></a></li>
<li><a href="#36"><i class="arg">matrixName</i> <b class="method">set cell</b> <i class="arg">column row value</i></a></li>
<li><a href="#37"><i class="arg">matrixName</i> <b class="method">set column</b> <i class="arg">column values</i></a></li>
<li><a href="#38"><i class="arg">matrixName</i> <b class="method">set rect</b> <i class="arg">column row values</i></a></li>
<li><a href="#39"><i class="arg">matrixName</i> <b class="method">set row</b> <i class="arg">row values</i></a></li>
<li><a href="#40"><i class="arg">matrixName</i> <b class="method">sort columns</b> <span class="opt">?<b class="option">-increasing</b>|<b class="option">-decreasing</b>?</span> <i class="arg">row</i></a></li>
<li><a href="#41"><i class="arg">matrixName</i> <b class="method">sort rows</b> <span class="opt">?<b class="option">-increasing</b>|<b class="option">-decreasing</b>?</span> <i class="arg">column</i></a></li>
<li><a href="#42"><i class="arg">matrixName</i> <b class="method">swap columns</b> <i class="arg">column_a column_b</i></a></li>
<li><a href="#43"><i class="arg">matrixName</i> <b class="method">swap rows</b> <i class="arg">row_a row_b</i></a></li>
<li><a href="#44"><i class="arg">matrixName</i> <b class="method">transpose</b></a></li>
<li><a href="#45"><i class="arg">matrixName</i> <b class="method">unlink</b> <i class="arg">arrayvar</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>A matrix is a rectangular collection of cells, i.e. organized in rows
and columns. Each cell contains exactly one value of arbitrary
form. The cells in the matrix are addressed by pairs of integer
numbers, with the first (left) number in the pair specifying the
column and the second (right) number specifying the row the cell is
in. These indices are counted from 0 upward. The special non-numeric
index <b class="const">end</b> refers to the last row or column in the matrix,
depending on the context. Indices of the form
<b class="const">end</b>-<b class="variable">number</b> are counted from the end of the row or
column, like they are for standard Tcl lists. Trying to access
non-existing cells causes an error.</p>
<p>The matrices here are created empty, i.e. they have neither rows nor
columns. The user then has to add rows and columns as needed by his
application. A specialty of this structure is the ability to export an
array-view onto its contents. Such can be used by tkTable, for
example, to link the matrix into the display.</p>
<p>The main command of the package is:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::struct::matrix</b> <span class="opt">?<i class="arg">matrixName</i>?</span> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">source</i>?</span></a></dt>
<dd><p>The command creates a new matrix object with an associated global Tcl
command whose name is <i class="arg">matrixName</i>.  This command may be used to
invoke various operations on the matrix.  It has the following general
form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">matrixName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>If <i class="arg">matrixName</i> is not specified a unique name will be generated
by the package itself. If a <i class="arg">source</i> is specified the new matrix
will be initialized to it. For the operators <b class="const">=</b>, <b class="const">:=</b>,
and <b class="const">as</b> the argument <i class="arg">source</i> is interpreted as the name of
another matrix object, and the assignment operator <b class="method">=</b> will be
executed. For <b class="const">deserialize</b> the <i class="arg">source</i> is a serialized
matrix object and <b class="method">deserialize</b> will be executed.</p>
<p>In other words</p>
<pre class="doctools_example">
    ::struct::matrix mymatrix = b
</pre>
<p>is equivalent to</p>
<pre class="doctools_example">
    ::struct::matrix mymatrix
    mymatrix = b
</pre>
<p>and</p>
<pre class="doctools_example">
    ::struct::matrix mymatrix deserialize $b
</pre>
<p>is equivalent to</p>
<pre class="doctools_example">
    ::struct::matrix mymatrix
    mymatrix deserialize $b
</pre>
</dd>
</dl>
<p>The following commands are possible for matrix objects:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">matrixName</i> <b class="method">=</b> <i class="arg">sourcematrix</i></a></dt>
<dd><p>This is the assignment operator for matrix objects. It copies the matrix
contained in the matrix object <i class="arg">sourcematrix</i> over the matrix data in
<i class="arg">matrixName</i>. The old contents of <i class="arg">matrixName</i> are deleted by
this operation.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">matrixName</i> <b class="method">deserialize</b> [<i class="arg">sourcematrix</i> <b class="method">serialize</b>]
</pre>
</dd>
<dt><a name="4"><i class="arg">matrixName</i> <b class="method">--&gt;</b> <i class="arg">destmatrix</i></a></dt>
<dd><p>This is the reverse assignment operator for matrix objects. It copies
the matrix contained in the matrix object <i class="arg">matrixName</i> over the matrix
data in the object <i class="arg">destmatrix</i>.
The old contents of <i class="arg">destmatrix</i> are deleted by this operation.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">destmatrix</i> <b class="method">deserialize</b> [<i class="arg">matrixName</i> <b class="method">serialize</b>]
</pre>
</dd>
<dt><a name="5"><i class="arg">matrixName</i> <b class="method">add column</b> <span class="opt">?<i class="arg">values</i>?</span></a></dt>
<dd><p>Extends the matrix by one column and then acts like <b class="method">set column</b>
(see below) on this new column if there were <i class="arg">values</i>
supplied. Without <i class="arg">values</i> the new cells will be set to the empty
string. The new column is appended immediately behind the last
existing column.</p></dd>
<dt><a name="6"><i class="arg">matrixName</i> <b class="method">add row</b> <span class="opt">?<i class="arg">values</i>?</span></a></dt>
<dd><p>Extends the matrix by one row and then acts like <b class="method">set row</b> (see
below) on this new row if there were <i class="arg">values</i> supplied. Without
<i class="arg">values</i> the new cells will be set to the empty string. The new
row is appended immediately behind the last existing row.</p></dd>
<dt><a name="7"><i class="arg">matrixName</i> <b class="method">add columns</b> <i class="arg">n</i></a></dt>
<dd><p>Extends the matrix by <i class="arg">n</i> columns. The new cells will be set to
the empty string. The new columns are appended immediately behind the
last existing column. A value of <i class="arg">n</i> equal to or smaller than 0 is
not allowed.</p></dd>
<dt><a name="8"><i class="arg">matrixName</i> <b class="method">add rows</b> <i class="arg">n</i></a></dt>
<dd><p>Extends the matrix by <i class="arg">n</i> rows. The new cells will be set to the
empty string. The new rows are appended immediately behind the last
existing row. A value of <i class="arg">n</i> equal to or smaller than 0 is not
allowed.</p></dd>
<dt><a name="9"><i class="arg">matrixName</i> <b class="method">cells</b></a></dt>
<dd><p>Returns the number of cells currently managed by the matrix. This is
the product of <b class="method">rows</b> and <b class="method">columns</b>.</p></dd>
<dt><a name="10"><i class="arg">matrixName</i> <b class="method">cellsize</b> <i class="arg">column row</i></a></dt>
<dd><p>Returns the length of the string representation of the value currently
contained in the addressed cell.</p></dd>
<dt><a name="11"><i class="arg">matrixName</i> <b class="method">columns</b></a></dt>
<dd><p>Returns the number of columns currently managed by the matrix.</p></dd>
<dt><a name="12"><i class="arg">matrixName</i> <b class="method">columnwidth</b> <i class="arg">column</i></a></dt>
<dd><p>Returns the length of the longest string representation of all the
values currently contained in the cells of the addressed column if
these are all spanning only one line. For cell values spanning
multiple lines the length of their longest line goes into the
computation.</p>
<p><em>Note:</em> The command recognizes ANSI color control sequences
and excludes them from the width of a line, as they are logically of
zero width.</p></dd>
<dt><a name="13"><i class="arg">matrixName</i> <b class="method">delete column</b> <i class="arg">column</i></a></dt>
<dd><p>Deletes the specified column from the matrix and shifts all columns
with higher indices one index down.</p></dd>
<dt><a name="14"><i class="arg">matrixName</i> <b class="method">delete columns</b> <i class="arg">n</i></a></dt>
<dd><p>Deletes <i class="arg">n</i> columns from the right of the matrix. The value of
<i class="arg">n</i> has to satisfy the constraint
&quot;0 &lt; <i class="arg">n</i> &lt; [<b class="cmd">matrixName</b> <b class="method">columns</b>]&quot;</p></dd>
<dt><a name="15"><i class="arg">matrixName</i> <b class="method">delete row</b> <i class="arg">row</i></a></dt>
<dd><p>Deletes the specified row from the matrix and shifts all row with
higher indices one index down.</p></dd>
<dt><a name="16"><i class="arg">matrixName</i> <b class="method">delete rows</b> <i class="arg">n</i></a></dt>
<dd><p>Deletes <i class="arg">n</i> rows from the bottom of the matrix. The value of
<i class="arg">n</i> has to satisfy the constraint
&quot;0 &lt; <i class="arg">n</i> &lt; [<b class="cmd">matrixName</b> <b class="method">rows</b>]&quot;</p></dd>
<dt><a name="17"><i class="arg">matrixName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></dt>
<dd><p>This is the complement to <b class="method">serialize</b>. It replaces matrix data
in <i class="arg">matrixName</i> with the matrix described by the <i class="arg">serialization</i>
value. The old contents of <i class="arg">matrixName</i> are deleted by this
operation.</p></dd>
<dt><a name="18"><i class="arg">matrixName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the matrix, including its storage space and associated
command.</p></dd>
<dt><a name="19"><i class="arg">matrixName</i> <b class="method">format 2string</b> <span class="opt">?<i class="arg">report</i>?</span></a></dt>
<dd><p>Formats the matrix using the specified report object and returns the
string containing the result of this operation. The report has to
support the <b class="method">printmatrix</b> method. If no <i class="arg">report</i> is
specified the system will use an internal report definition to format
the matrix.</p></dd>
<dt><a name="20"><i class="arg">matrixName</i> <b class="method">format 2chan</b> <span class="opt">?<span class="opt">?<i class="arg">report</i>?</span> <i class="arg">channel</i>?</span></a></dt>
<dd><p>Formats the matrix using the specified report object and writes the
string containing the result of this operation into the channel. The
report has to support the <b class="method">printmatrix2channel</b> method.  If no
<i class="arg">report</i> is specified the system will use an internal report
definition to format the matrix. If no <i class="arg">channel</i> is specified the
system will use <b class="const">stdout</b>.</p></dd>
<dt><a name="21"><i class="arg">matrixName</i> <b class="method">get cell</b> <i class="arg">column row</i></a></dt>
<dd><p>Returns the value currently contained in the cell identified by row
and column index.</p></dd>
<dt><a name="22"><i class="arg">matrixName</i> <b class="method">get column</b> <i class="arg">column</i></a></dt>
<dd><p>Returns a list containing the values from all cells in the column
identified by the index. The contents of the cell in row 0 are stored
as the first element of this list.</p></dd>
<dt><a name="23"><i class="arg">matrixName</i> <b class="method">get rect</b> <i class="arg">column_tl row_tl column_br row_br</i></a></dt>
<dd><p>Returns a list of lists of cell values. The values stored in the
result come from the sub-matrix whose top-left and bottom-right cells
are specified by <i class="arg">column_tl, row_tl</i> and
<i class="arg">column_br, row_br</i> resp. Note that the following equations have
to be true: &quot;<i class="arg">column_tl</i> &lt;= <i class="arg">column_br</i>&quot; and &quot;<i class="arg">row_tl</i> &lt;=
<i class="arg">row_br</i>&quot;. The result is organized as follows: The outer list is
the list of rows, its elements are lists representing a single
row. The row with the smallest index is the first element of the outer
list. The elements of the row lists represent the selected cell
values. The cell with the smallest index is the first element in each
row list.</p></dd>
<dt><a name="24"><i class="arg">matrixName</i> <b class="method">get row</b> <i class="arg">row</i></a></dt>
<dd><p>Returns a list containing the values from all cells in the row
identified by the index. The contents of the cell in column 0 are
stored as the first element of this list.</p></dd>
<dt><a name="25"><i class="arg">matrixName</i> <b class="method">insert column</b> <i class="arg">column</i> <span class="opt">?<i class="arg">values</i>?</span></a></dt>
<dd><p>Extends the matrix by one column and then acts like <b class="method">set column</b>
(see below) on this new column if there were <i class="arg">values</i>
supplied. Without <i class="arg">values</i> the new cells will be set to the empty
string. The new column is inserted just before the column specified by
the given index. This means, if <i class="arg">column</i> is less than or equal to
zero, then the new column is inserted at the beginning of the matrix,
before the first column. If <i class="arg">column</i> has the value <b class="const">end</b>,
or if it is greater than or equal to the number of columns in the
matrix, then the new column is appended to the matrix, behind the last
column. The old column at the chosen index and all columns with higher
indices are shifted one index upward.</p></dd>
<dt><a name="26"><i class="arg">matrixName</i> <b class="method">insert row</b> <i class="arg">row</i> <span class="opt">?<i class="arg">values</i>?</span></a></dt>
<dd><p>Extends the matrix by one row and then acts like <b class="method">set row</b> (see
below) on this new row if there were <i class="arg">values</i> supplied. Without
<i class="arg">values</i> the new cells will be set to the empty string. The new
row is inserted just before the row specified by the given index. This
means, if <i class="arg">row</i> is less than or equal to zero, then the new row is
inserted at the beginning of the matrix, before the first row. If
<i class="arg">row</i> has the value <b class="const">end</b>, or if it is greater than or
equal to the number of rows in the matrix, then the new row is
appended to the matrix, behind the last row. The old row at that index
and all rows with higher indices are shifted one index upward.</p></dd>
<dt><a name="27"><i class="arg">matrixName</i> <b class="method">link</b> <span class="opt">?-transpose?</span> <i class="arg">arrayvar</i></a></dt>
<dd><p>Links the matrix to the specified array variable. This means that the
contents of all cells in the matrix is stored in the array too, with
all changes to the matrix propagated there too. The contents of the
cell <i class="arg">(column,row)</i> is stored in the array using the key
<i class="arg">column,row</i>. If the option <b class="option">-transpose</b> is specified the
key <i class="arg">row,column</i> will be used instead. It is possible to link the
matrix to more than one array. Note that the link is bidirectional,
i.e. changes to the array are mirrored in the matrix too.</p></dd>
<dt><a name="28"><i class="arg">matrixName</i> <b class="method">links</b></a></dt>
<dd><p>Returns a list containing the names of all array variables the matrix
was linked to through a call to method <b class="method">link</b>.</p></dd>
<dt><a name="29"><i class="arg">matrixName</i> <b class="method">rowheight</b> <i class="arg">row</i></a></dt>
<dd><p>Returns the height of the specified row in lines. This is the highest
number of lines spanned by a cell over all cells in the row.</p></dd>
<dt><a name="30"><i class="arg">matrixName</i> <b class="method">rows</b></a></dt>
<dd><p>Returns the number of rows currently managed by the matrix.</p></dd>
<dt><a name="31"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">all</b> <i class="arg">pattern</i></a></dt>
<dd><p>Searches the whole matrix for cells matching the <i class="arg">pattern</i> and
returns a list with all matches. Each item in the aforementioned list
is a list itself and contains the column and row index of the matching
cell, in this order. The results are ordered by column first and row
second, both times in ascending order. This means that matches to the
left and the top of the matrix come before matches to the right and
down.</p>
<p>The type of the pattern (string, glob, regular expression) is
determined by the option after the <b class="method">search</b> keyword. If no
option is given it defaults to <b class="option">-exact</b>.</p>
<p>If the option <b class="option">-nocase</b> is specified the search will be
case-insensitive.</p></dd>
<dt><a name="32"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">column</b> <i class="arg">column pattern</i></a></dt>
<dd><p>Like <b class="method">search all</b>, but the search is restricted to the
specified column.</p></dd>
<dt><a name="33"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">row</b> <i class="arg">row pattern</i></a></dt>
<dd><p>Like <b class="method">search all</b>, but the search is restricted to the
specified row.</p></dd>
<dt><a name="34"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">rect</b> <i class="arg">column_tl row_tl column_br row_br pattern</i></a></dt>
<dd><p>Like <b class="method">search all</b>, but the search is restricted to the
specified rectangular area of the matrix.</p></dd>
<dt><a name="35"><i class="arg">matrixName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">column_tl row_tl column_br row_br</i>?</span></a></dt>
<dd><p>This method serializes the sub-matrix spanned up by the rectangle
specification. In other words it returns a tcl <em>value</em> completely
describing that matrix. If no rectangle is specified the whole matrix
will be serialized.
This allows, for example, the transfer of matrix objects (or parts
thereof) over arbitrary channels, persistence, etc.
This method is also the basis for both the copy constructor and the
assignment operator.</p>
<p>The result of this method has to be semantically identical over all
implementations of the matrix interface. This is what will enable us
to copy matrix data between different implementations of the same
interface.</p>
<p>The result is a list containing exactly three items.</p>
<p>The first two elements of the list specify the number of rows and
columns of the matrix, in that order. The values integer numbers
greater than or equal to zero.</p>
<p>The last element of the list contains the values of the matrix cells
we have serialized, in the form of a value like it is returned by the
<b class="method">get rect</b>. However empty cells to the right and bottom of
the matrix can be left out of that value as the size information in
the serialization allows the receiver the creation of a matrix with
the proper size despite the missing values.</p>
<pre class="doctools_example">
    # A possible serialization for the matrix structure
    #
    # | a b d g |
    # | c e     |
    # | f       |
    #
    # is
    #
    # 3 4 {{a b d g} {c e} {f}}
</pre>
</dd>
<dt><a name="36"><i class="arg">matrixName</i> <b class="method">set cell</b> <i class="arg">column row value</i></a></dt>
<dd><p>Sets the value in the cell identified by row and column index to the
data in the third argument.</p></dd>
<dt><a name="37"><i class="arg">matrixName</i> <b class="method">set column</b> <i class="arg">column values</i></a></dt>
<dd><p>Sets the values in the cells identified by the column index to the
elements of the list provided as the third argument. Each element of
the list is assigned to one cell, with the first element going into
the cell in row 0 and then upward. If there are less values in the
list than there are rows the remaining rows are set to the empty
string. If there are more values in the list than there are rows the
superfluous elements are ignored. The matrix is not extended by this
operation.</p></dd>
<dt><a name="38"><i class="arg">matrixName</i> <b class="method">set rect</b> <i class="arg">column row values</i></a></dt>
<dd><p>Takes a list of lists of cell values and writes them into the
submatrix whose top-left cell is specified by the two indices. If the
sublists of the outerlist are not of equal length the shorter sublists
will be filled with empty strings to the length of the longest
sublist. If the submatrix specified by the top-left cell and the
number of rows and columns in the <i class="arg">values</i> extends beyond the
matrix we are modifying the over-extending parts of the values are
ignored, i.e. essentially cut off. This subcommand expects its input
in the format as returned by <b class="method">get rect</b>.</p></dd>
<dt><a name="39"><i class="arg">matrixName</i> <b class="method">set row</b> <i class="arg">row values</i></a></dt>
<dd><p>Sets the values in the cells identified by the row index to the
elements of the list provided as the third argument. Each element of
the list is assigned to one cell, with the first element going into
the cell in column 0 and then upward. If there are less values in the
list than there are columns the remaining columns are set to the empty
string. If there are more values in the list than there are columns
the superfluous elements are ignored. The matrix is not extended by
this operation.</p></dd>
<dt><a name="40"><i class="arg">matrixName</i> <b class="method">sort columns</b> <span class="opt">?<b class="option">-increasing</b>|<b class="option">-decreasing</b>?</span> <i class="arg">row</i></a></dt>
<dd><p>Sorts the columns in the matrix using the data in the specified
<i class="arg">row</i> as the key to sort by. The options <b class="option">-increasing</b>
and <b class="option">-decreasing</b> have the same meaning as for <b class="cmd">lsort</b>.
If no option is specified <b class="option">-increasing</b> is assumed.</p></dd>
<dt><a name="41"><i class="arg">matrixName</i> <b class="method">sort rows</b> <span class="opt">?<b class="option">-increasing</b>|<b class="option">-decreasing</b>?</span> <i class="arg">column</i></a></dt>
<dd><p>Sorts the rows in the matrix using the data in the specified
<i class="arg">column</i> as the key to sort by. The options <b class="option">-increasing</b>
and <b class="option">-decreasing</b> have the same meaning as for <b class="cmd">lsort</b>.
If no option is specified <b class="option">-increasing</b> is assumed.</p></dd>
<dt><a name="42"><i class="arg">matrixName</i> <b class="method">swap columns</b> <i class="arg">column_a column_b</i></a></dt>
<dd><p>Swaps the contents of the two specified columns.</p></dd>
<dt><a name="43"><i class="arg">matrixName</i> <b class="method">swap rows</b> <i class="arg">row_a row_b</i></a></dt>
<dd><p>Swaps the contents of the two specified rows.</p></dd>
<dt><a name="44"><i class="arg">matrixName</i> <b class="method">transpose</b></a></dt>
<dd><p>Transposes the contents of the matrix, i.e. swaps rows for columns and
vice versa.</p></dd>
<dt><a name="45"><i class="arg">matrixName</i> <b class="method">unlink</b> <i class="arg">arrayvar</i></a></dt>
<dd><p>Removes the link between the matrix and the specified arrayvariable,
if there is one.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<p>The examples below assume a 5x5 matrix M with the first row containing
the values 1 to 5, with 1 in the top-left cell. Each other row
contains the contents of the row above it, rotated by one cell to the
right.</p>
<pre class="doctools_example">
 % M get rect 0 0 4 4
 {{1 2 3 4 5} {5 1 2 3 4} {4 5 1 2 3} {3 4 5 1 2} {2 3 4 5 1}}
</pre>
<pre class="doctools_example">
 % M set rect 1 1 {{0 0 0} {0 0 0} {0 0 0}}
 % M get rect 0 0 4 4
 {{1 2 3 4 5} {5 0 0 0 4} {4 0 0 0 3} {3 0 0 0 2} {2 3 4 5 1}}
</pre>
<p>Assuming that the style definitions in the example section of the
manpage for the package <b class="package"><a href="../report/report.html">report</a></b> are loaded into the
interpreter now an example which formats a matrix into a tabular
report. The code filling the matrix with data is not shown.  contains
useful data.</p>
<pre class="doctools_example">
    % ::struct::matrix m
    % # ... fill m with data, assume 5 columns
    % ::report::report r 5 style captionedtable 1
    % m format 2string r
    +---+-------------------+-------+-------+--------+
    |000|VERSIONS:          |2:8.4a3|1:8.4a3|1:8.4a3%|
    +---+-------------------+-------+-------+--------+
    |001|CATCH return ok    |7      |13     |53.85   |
    |002|CATCH return error |68     |91     |74.73   |
    |003|CATCH no catch used|7      |14     |50.00   |
    |004|IF if true numeric |12     |33     |36.36   |
    |005|IF elseif          |15     |47     |31.91   |
    |   |true numeric       |       |       |        |
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % r printmatrix m
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: matrix</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key51">matrix</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/matrix1.html.



















































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441

<div class='fossil-doc' data-title='struct::matrix_v1 - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::matrix_v1(n) 1.2.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::matrix_v1 - Create and manipulate matrix objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::matrix <span class="opt">?1.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">matrixName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#2"><i class="arg">matrixName</i> <b class="method">add column</b> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#3"><i class="arg">matrixName</i> <b class="method">add row</b> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#4"><i class="arg">matrixName</i> <b class="method">add columns</b> <i class="arg">n</i></a></li>
<li><a href="#5"><i class="arg">matrixName</i> <b class="method">add rows</b> <i class="arg">n</i></a></li>
<li><a href="#6"><i class="arg">matrixName</i> <b class="method">cells</b></a></li>
<li><a href="#7"><i class="arg">matrixName</i> <b class="method">cellsize</b> <i class="arg">column row</i></a></li>
<li><a href="#8"><i class="arg">matrixName</i> <b class="method">columns</b></a></li>
<li><a href="#9"><i class="arg">matrixName</i> <b class="method">columnwidth</b> <i class="arg">column</i></a></li>
<li><a href="#10"><i class="arg">matrixName</i> <b class="method">delete column</b> <i class="arg">column</i></a></li>
<li><a href="#11"><i class="arg">matrixName</i> <b class="method">delete row</b> <i class="arg">row</i></a></li>
<li><a href="#12"><i class="arg">matrixName</i> <b class="method">destroy</b></a></li>
<li><a href="#13"><i class="arg">matrixName</i> <b class="method">format 2string</b> <span class="opt">?<i class="arg">report</i>?</span></a></li>
<li><a href="#14"><i class="arg">matrixName</i> <b class="method">format 2chan</b> <span class="opt">?<span class="opt">?<i class="arg">report</i>?</span> <i class="arg">channel</i>?</span></a></li>
<li><a href="#15"><i class="arg">matrixName</i> <b class="method">get cell</b> <i class="arg">column row</i></a></li>
<li><a href="#16"><i class="arg">matrixName</i> <b class="method">get column</b> <i class="arg">column</i></a></li>
<li><a href="#17"><i class="arg">matrixName</i> <b class="method">get rect</b> <i class="arg">column_tl row_tl column_br row_br</i></a></li>
<li><a href="#18"><i class="arg">matrixName</i> <b class="method">get row</b> <i class="arg">row</i></a></li>
<li><a href="#19"><i class="arg">matrixName</i> <b class="method">insert column</b> <i class="arg">column</i> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#20"><i class="arg">matrixName</i> <b class="method">insert row</b> <i class="arg">row</i> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#21"><i class="arg">matrixName</i> <b class="method">link</b> <span class="opt">?-transpose?</span> <i class="arg">arrayvar</i></a></li>
<li><a href="#22"><i class="arg">matrixName</i> <b class="method">links</b></a></li>
<li><a href="#23"><i class="arg">matrixName</i> <b class="method">rowheight</b> <i class="arg">row</i></a></li>
<li><a href="#24"><i class="arg">matrixName</i> <b class="method">rows</b></a></li>
<li><a href="#25"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">all</b> <i class="arg">pattern</i></a></li>
<li><a href="#26"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">column</b> <i class="arg">column pattern</i></a></li>
<li><a href="#27"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">row</b> <i class="arg">row pattern</i></a></li>
<li><a href="#28"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">rect</b> <i class="arg">column_tl row_tl column_br row_br pattern</i></a></li>
<li><a href="#29"><i class="arg">matrixName</i> <b class="method">set cell</b> <i class="arg">column row value</i></a></li>
<li><a href="#30"><i class="arg">matrixName</i> <b class="method">set column</b> <i class="arg">column values</i></a></li>
<li><a href="#31"><i class="arg">matrixName</i> <b class="method">set rect</b> <i class="arg">column row values</i></a></li>
<li><a href="#32"><i class="arg">matrixName</i> <b class="method">set row</b> <i class="arg">row values</i></a></li>
<li><a href="#33"><i class="arg">matrixName</i> <b class="method">sort columns</b> <span class="opt">?<b class="option">-increasing</b>|<b class="option">-decreasing</b>?</span> <i class="arg">row</i></a></li>
<li><a href="#34"><i class="arg">matrixName</i> <b class="method">sort rows</b> <span class="opt">?<b class="option">-increasing</b>|<b class="option">-decreasing</b>?</span> <i class="arg">column</i></a></li>
<li><a href="#35"><i class="arg">matrixName</i> <b class="method">swap columns</b> <i class="arg">column_a column_b</i></a></li>
<li><a href="#36"><i class="arg">matrixName</i> <b class="method">swap rows</b> <i class="arg">row_a row_b</i></a></li>
<li><a href="#37"><i class="arg">matrixName</i> <b class="method">unlink</b> <i class="arg">arrayvar</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">::struct::matrix</b> command creates a new matrix object with an
associated global Tcl command whose name is <i class="arg">matrixName</i>.  This
command may be used to invoke various operations on the matrix.  It has
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">matrixName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>A matrix is a rectangular collection of cells, i.e. organized in rows
and columns. Each cell contains exactly one value of arbitrary
form. The cells in the matrix are addressed by pairs of integer
numbers, with the first (left) number in the pair specifying the
column and the second (right) number specifying the row the cell is
in. These indices are counted from 0 upward. The special non-numeric
index <b class="const">end</b> refers to the last row or column in the matrix,
depending on the context. Indices of the form
<b class="const">end</b>-<b class="variable">number</b> are counted from the end of the row or
column, like they are for standard Tcl lists. Trying to access
non-existing cells causes an error.</p>
<p>The matrices here are created empty, i.e. they have neither rows nor
columns. The user then has to add rows and columns as needed by his
application. A specialty of this structure is the ability to export an
array-view onto its contents. Such can be used by tkTable, for
example, to link the matrix into the display.</p>
<p>The following commands are possible for matrix objects:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">matrixName</i> <b class="method">add column</b> <span class="opt">?<i class="arg">values</i>?</span></a></dt>
<dd><p>Extends the matrix by one column and then acts like <b class="method">setcolumn</b>
(see below) on this new column if there were <i class="arg">values</i>
supplied. Without <i class="arg">values</i> the new cells will be set to the empty
string. The new column is appended immediately behind the last
existing column.</p></dd>
<dt><a name="3"><i class="arg">matrixName</i> <b class="method">add row</b> <span class="opt">?<i class="arg">values</i>?</span></a></dt>
<dd><p>Extends the matrix by one row and then acts like <b class="method">setrow</b> (see
below) on this new row if there were <i class="arg">values</i> supplied. Without
<i class="arg">values</i> the new cells will be set to the empty string. The new
row is appended immediately behind the last existing row.</p></dd>
<dt><a name="4"><i class="arg">matrixName</i> <b class="method">add columns</b> <i class="arg">n</i></a></dt>
<dd><p>Extends the matrix by <i class="arg">n</i> columns. The new cells will be set to
the empty string. The new columns are appended immediately behind the
last existing column. A value of <i class="arg">n</i> equal to or smaller than 0 is
not allowed.</p></dd>
<dt><a name="5"><i class="arg">matrixName</i> <b class="method">add rows</b> <i class="arg">n</i></a></dt>
<dd><p>Extends the matrix by <i class="arg">n</i> rows. The new cells will be set to the
empty string. The new rows are appended immediately behind the last
existing row. A value of <i class="arg">n</i> equal to or smaller than 0 is not
allowed.</p></dd>
<dt><a name="6"><i class="arg">matrixName</i> <b class="method">cells</b></a></dt>
<dd><p>Returns the number of cells currently managed by the matrix. This is
the product of <b class="method">rows</b> and <b class="method">columns</b>.</p></dd>
<dt><a name="7"><i class="arg">matrixName</i> <b class="method">cellsize</b> <i class="arg">column row</i></a></dt>
<dd><p>Returns the length of the string representation of the value currently
contained in the addressed cell.</p></dd>
<dt><a name="8"><i class="arg">matrixName</i> <b class="method">columns</b></a></dt>
<dd><p>Returns the number of columns currently managed by the matrix.</p></dd>
<dt><a name="9"><i class="arg">matrixName</i> <b class="method">columnwidth</b> <i class="arg">column</i></a></dt>
<dd><p>Returns the length of the longest string representation of all the
values currently contained in the cells of the addressed column if
these are all spanning only one line. For cell values spanning
multiple lines the length of their longest line goes into the
computation.</p></dd>
<dt><a name="10"><i class="arg">matrixName</i> <b class="method">delete column</b> <i class="arg">column</i></a></dt>
<dd><p>Deletes the specified column from the matrix and shifts all columns
with higher indices one index down.</p></dd>
<dt><a name="11"><i class="arg">matrixName</i> <b class="method">delete row</b> <i class="arg">row</i></a></dt>
<dd><p>Deletes the specified row from the matrix and shifts all row with
higher indices one index down.</p></dd>
<dt><a name="12"><i class="arg">matrixName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the matrix, including its storage space and associated
command.</p></dd>
<dt><a name="13"><i class="arg">matrixName</i> <b class="method">format 2string</b> <span class="opt">?<i class="arg">report</i>?</span></a></dt>
<dd><p>Formats the matrix using the specified report object and returns the
string containing the result of this operation. The report has to
support the <b class="method">printmatrix</b> method. If no <i class="arg">report</i> is
specified the system will use an internal report definition to format
the matrix.</p></dd>
<dt><a name="14"><i class="arg">matrixName</i> <b class="method">format 2chan</b> <span class="opt">?<span class="opt">?<i class="arg">report</i>?</span> <i class="arg">channel</i>?</span></a></dt>
<dd><p>Formats the matrix using the specified report object and writes the
string containing the result of this operation into the channel. The
report has to support the <b class="method">printmatrix2channel</b> method.  If no
<i class="arg">report</i> is specified the system will use an internal report
definition to format the matrix. If no <i class="arg">channel</i> is specified the
system will use <b class="const">stdout</b>.</p></dd>
<dt><a name="15"><i class="arg">matrixName</i> <b class="method">get cell</b> <i class="arg">column row</i></a></dt>
<dd><p>Returns the value currently contained in the cell identified by row
and column index.</p></dd>
<dt><a name="16"><i class="arg">matrixName</i> <b class="method">get column</b> <i class="arg">column</i></a></dt>
<dd><p>Returns a list containing the values from all cells in the column
identified by the index. The contents of the cell in row 0 are stored
as the first element of this list.</p></dd>
<dt><a name="17"><i class="arg">matrixName</i> <b class="method">get rect</b> <i class="arg">column_tl row_tl column_br row_br</i></a></dt>
<dd><p>Returns a list of lists of cell values. The values stored in the
result come from the sub-matrix whose top-left and bottom-right cells
are specified by <i class="arg">column_tl, row_tl</i> and
<i class="arg">column_br, row_br</i> resp. Note that the following equations have
to be true: &quot;<i class="arg">column_tl</i> &lt;= <i class="arg">column_br</i>&quot; and &quot;<i class="arg">row_tl</i> &lt;=
<i class="arg">row_br</i>&quot;. The result is organized as follows: The outer list is
the list of rows, its elements are lists representing a single
row. The row with the smallest index is the first element of the outer
list. The elements of the row lists represent the selected cell
values. The cell with the smallest index is the first element in each
row list.</p></dd>
<dt><a name="18"><i class="arg">matrixName</i> <b class="method">get row</b> <i class="arg">row</i></a></dt>
<dd><p>Returns a list containing the values from all cells in the row
identified by the index. The contents of the cell in column 0 are
stored as the first element of this list.</p></dd>
<dt><a name="19"><i class="arg">matrixName</i> <b class="method">insert column</b> <i class="arg">column</i> <span class="opt">?<i class="arg">values</i>?</span></a></dt>
<dd><p>Extends the matrix by one column and then acts like <b class="method">setcolumn</b>
(see below) on this new column if there were <i class="arg">values</i>
supplied. Without <i class="arg">values</i> the new cells will be set to the empty
string. The new column is inserted just before the column specified by
the given index. This means, if <i class="arg">column</i> is less than or equal to
zero, then the new column is inserted at the beginning of the matrix,
before the first column. If <i class="arg">column</i> has the value <b class="const">end</b>,
or if it is greater than or equal to the number of columns in the
matrix, then the new column is appended to the matrix, behind the last
column. The old column at the chosen index and all columns with higher
indices are shifted one index upward.</p></dd>
<dt><a name="20"><i class="arg">matrixName</i> <b class="method">insert row</b> <i class="arg">row</i> <span class="opt">?<i class="arg">values</i>?</span></a></dt>
<dd><p>Extends the matrix by one row and then acts like <b class="method">setrow</b> (see
below) on this new row if there were <i class="arg">values</i> supplied. Without
<i class="arg">values</i> the new cells will be set to the empty string. The new
row is inserted just before the row specified by the given index. This
means, if <i class="arg">row</i> is less than or equal to zero, then the new row is
inserted at the beginning of the matrix, before the first row. If
<i class="arg">row</i> has the value <b class="const">end</b>, or if it is greater than or
equal to the number of rows in the matrix, then the new row is
appended to the matrix, behind the last row. The old row at that index
and all rows with higher indices are shifted one index upward.</p></dd>
<dt><a name="21"><i class="arg">matrixName</i> <b class="method">link</b> <span class="opt">?-transpose?</span> <i class="arg">arrayvar</i></a></dt>
<dd><p>Links the matrix to the specified array variable. This means that the
contents of all cells in the matrix is stored in the array too, with
all changes to the matrix propagated there too. The contents of the
cell <i class="arg">(column,row)</i> is stored in the array using the key
<i class="arg">column,row</i>. If the option <b class="option">-transpose</b> is specified the
key <i class="arg">row,column</i> will be used instead. It is possible to link the
matrix to more than one array. Note that the link is bidirectional,
i.e. changes to the array are mirrored in the matrix too.</p></dd>
<dt><a name="22"><i class="arg">matrixName</i> <b class="method">links</b></a></dt>
<dd><p>Returns a list containing the names of all array variables the matrix
was linked to through a call to method <b class="method">link</b>.</p></dd>
<dt><a name="23"><i class="arg">matrixName</i> <b class="method">rowheight</b> <i class="arg">row</i></a></dt>
<dd><p>Returns the height of the specified row in lines. This is the highest
number of lines spanned by a cell over all cells in the row.</p></dd>
<dt><a name="24"><i class="arg">matrixName</i> <b class="method">rows</b></a></dt>
<dd><p>Returns the number of rows currently managed by the matrix.</p></dd>
<dt><a name="25"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">all</b> <i class="arg">pattern</i></a></dt>
<dd><p>Searches the whole matrix for cells matching the <i class="arg">pattern</i> and
returns a list with all matches. Each item in the aforementioned list
is a list itself and contains the column and row index of the matching
cell, in this order. The results are ordered by column first and row
second, both times in ascending order. This means that matches to the
left and the top of the matrix come before matches to the right and
down.</p>
<p>The type of the pattern (string, glob, regular expression) is
determined by the option after the <b class="method">search</b> keyword. If no
option is given it defaults to <b class="option">-exact</b>.</p>
<p>If the option <b class="option">-nocase</b> is specified the search will be
case-insensitive.</p></dd>
<dt><a name="26"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">column</b> <i class="arg">column pattern</i></a></dt>
<dd><p>Like <b class="method">search all</b>, but the search is restricted to the
specified column.</p></dd>
<dt><a name="27"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">row</b> <i class="arg">row pattern</i></a></dt>
<dd><p>Like <b class="method">search all</b>, but the search is restricted to the
specified row.</p></dd>
<dt><a name="28"><i class="arg">matrixName</i> <b class="method">search</b> <span class="opt">?-nocase?</span> <span class="opt">?-exact|-glob|-regexp?</span> <b class="method">rect</b> <i class="arg">column_tl row_tl column_br row_br pattern</i></a></dt>
<dd><p>Like <b class="method">search all</b>, but the search is restricted to the
specified rectangular area of the matrix.</p></dd>
<dt><a name="29"><i class="arg">matrixName</i> <b class="method">set cell</b> <i class="arg">column row value</i></a></dt>
<dd><p>Sets the value in the cell identified by row and column index to the
data in the third argument.</p></dd>
<dt><a name="30"><i class="arg">matrixName</i> <b class="method">set column</b> <i class="arg">column values</i></a></dt>
<dd><p>Sets the values in the cells identified by the column index to the
elements of the list provided as the third argument. Each element of
the list is assigned to one cell, with the first element going into
the cell in row 0 and then upward. If there are less values in the
list than there are rows the remaining rows are set to the empty
string. If there are more values in the list than there are rows the
superfluous elements are ignored. The matrix is not extended by this
operation.</p></dd>
<dt><a name="31"><i class="arg">matrixName</i> <b class="method">set rect</b> <i class="arg">column row values</i></a></dt>
<dd><p>Takes a list of lists of cell values and writes them into the
submatrix whose top-left cell is specified by the two indices. If the
sublists of the outerlist are not of equal length the shorter sublists
will be filled with empty strings to the length of the longest
sublist. If the submatrix specified by the top-left cell and the
number of rows and columns in the <i class="arg">values</i> extends beyond the
matrix we are modifying the over-extending parts of the values are
ignored, i.e. essentially cut off. This subcommand expects its input
in the format as returned by <b class="method">getrect</b>.</p></dd>
<dt><a name="32"><i class="arg">matrixName</i> <b class="method">set row</b> <i class="arg">row values</i></a></dt>
<dd><p>Sets the values in the cells identified by the row index to the
elements of the list provided as the third argument. Each element of
the list is assigned to one cell, with the first element going into
the cell in column 0 and then upward. If there are less values in the
list than there are columns the remaining columns are set to the empty
string. If there are more values in the list than there are columns
the superfluous elements are ignored. The matrix is not extended by
this operation.</p></dd>
<dt><a name="33"><i class="arg">matrixName</i> <b class="method">sort columns</b> <span class="opt">?<b class="option">-increasing</b>|<b class="option">-decreasing</b>?</span> <i class="arg">row</i></a></dt>
<dd><p>Sorts the columns in the matrix using the data in the specified
<i class="arg">row</i> as the key to sort by. The options <b class="option">-increasing</b>
and <b class="option">-decreasing</b> have the same meaning as for <b class="cmd">lsort</b>.
If no option is specified <b class="option">-increasing</b> is assumed.</p></dd>
<dt><a name="34"><i class="arg">matrixName</i> <b class="method">sort rows</b> <span class="opt">?<b class="option">-increasing</b>|<b class="option">-decreasing</b>?</span> <i class="arg">column</i></a></dt>
<dd><p>Sorts the rows in the matrix using the data in the specified
<i class="arg">column</i> as the key to sort by. The options <b class="option">-increasing</b>
and <b class="option">-decreasing</b> have the same meaning as for <b class="cmd">lsort</b>.
If no option is specified <b class="option">-increasing</b> is assumed.</p></dd>
<dt><a name="35"><i class="arg">matrixName</i> <b class="method">swap columns</b> <i class="arg">column_a column_b</i></a></dt>
<dd><p>Swaps the contents of the two specified columns.</p></dd>
<dt><a name="36"><i class="arg">matrixName</i> <b class="method">swap rows</b> <i class="arg">row_a row_b</i></a></dt>
<dd><p>Swaps the contents of the two specified rows.</p></dd>
<dt><a name="37"><i class="arg">matrixName</i> <b class="method">unlink</b> <i class="arg">arrayvar</i></a></dt>
<dd><p>Removes the link between the matrix and the specified arrayvariable,
if there is one.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<p>The examples below assume a 5x5 matrix M with the first row containing
the values 1 to 5, with 1 in the top-left cell. Each other row
contains the contents of the row above it, rotated by one cell to the
right.</p>
<pre class="doctools_example">
 % M getrect 0 0 4 4
 {{1 2 3 4 5} {5 1 2 3 4} {4 5 1 2 3} {3 4 5 1 2} {2 3 4 5 1}}
</pre>
<pre class="doctools_example">
 % M setrect 1 1 {{0 0 0} {0 0 0} {0 0 0}}
 % M getrect 0 0 4 4
 {{1 2 3 4 5} {5 0 0 0 4} {4 0 0 0 3} {3 0 0 0 2} {2 3 4 5 1}}
</pre>
<p>Assuming that the style definitions in the example section of the
manpage for the package <b class="package"><a href="../report/report.html">report</a></b> are loaded into the
interpreter now an example which formats a matrix into a tabular
report. The code filling the matrix with data is not shown.  contains
useful data.</p>
<pre class="doctools_example">
    % ::struct::matrix m
    % # ... fill m with data, assume 5 columns
    % ::report::report r 5 style captionedtable 1
    % m format 2string r
    +---+-------------------+-------+-------+--------+
    |000|VERSIONS:          |2:8.4a3|1:8.4a3|1:8.4a3%|
    +---+-------------------+-------+-------+--------+
    |001|CATCH return ok    |7      |13     |53.85   |
    |002|CATCH return error |68     |91     |74.73   |
    |003|CATCH no catch used|7      |14     |50.00   |
    |004|IF if true numeric |12     |33     |36.36   |
    |005|IF elseif          |15     |47     |31.91   |
    |   |true numeric       |       |       |        |
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % r printmatrix m
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: matrix</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key51">matrix</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/pool.html.













































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438

<div class='fossil-doc' data-title='struct::pool - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::pool(n) 1.2.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::pool - Create and manipulate pool objects (of discrete items)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">POOLS AND ALLOCATION</a></li>
<li class="doctools_section"><a href="#section3">ITEMS</a></li>
<li class="doctools_section"><a href="#section4">POOL OBJECT COMMAND</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::pool <span class="opt">?1.2.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::pool</b> <span class="opt">?<i class="arg">poolName</i>?</span> <span class="opt">?<i class="arg">maxsize</i>?</span></a></li>
<li><a href="#2"><b class="cmd">poolName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">poolName</i> <b class="method">add</b> <i class="arg">itemName1</i> <span class="opt">?<i class="arg">itemName2 itemName3 ...</i>?</span></a></li>
<li><a href="#4"><i class="arg">poolName</i> <b class="method">clear</b> <span class="opt">?<b class="option">-force</b>?</span></a></li>
<li><a href="#5"><i class="arg">poolName</i> <b class="method">destroy</b> <span class="opt">?<b class="option">-force</b>?</span></a></li>
<li><a href="#6"><i class="arg">poolName</i> <b class="method">info</b> <i class="arg">type</i> <span class="opt">?<i class="arg">arg</i>?</span></a></li>
<li><a href="#7"><i class="arg">poolName</i> <b class="method">maxsize</b> <span class="opt">?<i class="arg">maxsize</i>?</span></a></li>
<li><a href="#8"><i class="arg">poolName</i> <b class="method">release</b> <i class="arg">itemName</i></a></li>
<li><a href="#9"><i class="arg">poolName</i> <b class="method">remove</b> <i class="arg">itemName</i> <span class="opt">?<b class="option">-force</b>?</span></a></li>
<li><a href="#10"><i class="arg">poolName</i> <b class="method">request</b> itemVar <span class="opt">?options?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides pool objects which can be used to manage
finite collections of discrete items.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::struct::pool</b> <span class="opt">?<i class="arg">poolName</i>?</span> <span class="opt">?<i class="arg">maxsize</i>?</span></a></dt>
<dd><p>Creates a new pool object. If no <i class="arg">poolName</i> is supplied, then the
new pool will be named pool<b class="variable">X</b>, where X is a positive integer.
The optional second argument <i class="arg">maxsize</i> has to be a positive
integer indicating the maximum size of the pool; this is the maximum
number of items the pool may hold. The default for this value is
<b class="const">10</b>.</p>
<p>The pool object has an associated global Tcl command whose name is
<i class="arg">poolName</i>. This command may be used to invoke various
configuration operations on the report. It has the following general
form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">poolName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command. See section <span class="sectref"><a href="#section4">POOL OBJECT COMMAND</a></span> for a detailed
list of options and their behaviour.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">POOLS AND ALLOCATION</a></h2>
<p>The purpose of the pool command and the pool object command that it
generates, is to manage pools of discrete items.
Examples of a pool of discrete items are:</p>
<ul class="doctools_itemized">
<li><p>the seats in a cinema, theatre, train etc.. for which visitors/travelers can  make a reservation;</p></li>
<li><p>the dynamic IP-addresses that an ISP can dole out  to subscribers;</p></li>
<li><p>a car rental's collection of cars, which can be rented by customers;</p></li>
<li><p>the class rooms in a school building, which need to be scheduled;</p></li>
<li><p>the database connections available to client-threads in a web-server application;</p></li>
<li><p>the books in a library that customers can borrow;</p></li>
<li><p>etc ...</p></li>
</ul>
<p>The common denominator in the examples is that there is a more or less
fixed number of items (seats, IP-addresses, cars, ...) that are
supposed to be allocated on a more or less regular basis. An item can
be allocated only once at a time. An item that is allocated, must be
released before it can be re-allocated.  While several items in a pool
are being allocated and released continuously, the total number of
items in the pool remains constant.</p>
<p>Keeping track of which items are allocated, and by whom, is the
purpose of the pool command and its subordinates.</p>
<p><em>Pool parlance</em>: If we say that an item is
<i class="term">allocated</i>, it means that the item is <i class="term">busy</i>,
<i class="term">owned</i> or <i class="term">occupied</i>; it is not available anymore. If
an item is <i class="term">free</i>, it is <i class="term">available</i>. Deallocating an
item is equivalent to setting free or releasing an item. The person or
entity to which the item has been allotted is said to own the item.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">ITEMS</a></h2>
<p><em>Discrete items</em></p>
<p>The <b class="cmd"><a href="../../../../index.html#key304">pool</a></b> command is designed for
<em>discrete items only</em>. Note that there are pools where
allocation occurs on a non-discrete basis, for example computer
memory. There are also pools from which the shares that are doled out
are not expected to be returned, for example a charity fund or a pan
of soup from which you may receive a portion. Finally, there are even
pools from which nothing is ever allocated or returned, like a
swimming pool or a cesspool.</p>
<p><em>Unique item names</em></p>
<p>A pool cannot manage duplicate item names. Therefore, items in a pool
must have unique names.</p>
<p><em>Item equivalence</em></p>
<p>From the point of view of the manager of a pool, items are
equivalent. The manager of a pool is indifferent about which
entity/person occupies a given item. However, clients may have
preferences for a particular item, based on some item property they
know.</p>
<p><em>Preferences</em></p>
<p>A future owner may have a preference for a particular item. Preference
based allocation is supported (see the <b class="option">-prefer</b> option to the
request subcommand). A preference for a particular item is most likely
to result from variability among features associated with the
items. Note that the pool commands themselves are not designed to
manage such item properties. If item properties play a role in an
application, they should be managed separately.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">POOL OBJECT COMMAND</a></h2>
<p>The following subcommands and corresponding arguments are available to
any pool object command.</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">poolName</i> <b class="method">add</b> <i class="arg">itemName1</i> <span class="opt">?<i class="arg">itemName2 itemName3 ...</i>?</span></a></dt>
<dd><p>This command adds the items on the command line to the pool. If
duplicate item names occur on the command line, an error is raised. If
one or more of the items already exist in the pool, this also is
considered an error.</p></dd>
<dt><a name="4"><i class="arg">poolName</i> <b class="method">clear</b> <span class="opt">?<b class="option">-force</b>?</span></a></dt>
<dd><p>Removes all items from the pool. If there are any allocated items at
the time when the command is invoked, an error is raised. This
behaviour may be modified through the <b class="option">-force</b> argument. If it
is supplied on the command line, the pool will be cleared regardless
the allocation state of its items.</p></dd>
<dt><a name="5"><i class="arg">poolName</i> <b class="method">destroy</b> <span class="opt">?<b class="option">-force</b>?</span></a></dt>
<dd><p>Destroys the pool data structure, all associated variables and the
associated pool object command. By default, the command checks whether
any items are still allocated and raises an error if such is the
case. This behaviour may be modified through the argument
<b class="option">-force</b>. If it is supplied on the command line, the pool data
structure will be destroyed regardless allocation state of its items.</p></dd>
<dt><a name="6"><i class="arg">poolName</i> <b class="method">info</b> <i class="arg">type</i> <span class="opt">?<i class="arg">arg</i>?</span></a></dt>
<dd><p>Returns various information about the pool for further programmatic
use. The <i class="arg">type</i> argument indicates the type of information
requested. Only the type <b class="const">allocID</b> uses an additional argument.</p>
<dl class="doctools_definitions">
<dt><b class="const">allocID</b> <i class="arg">itemName</i></dt>
<dd><p>returns the allocID of the item whose name is <i class="arg">itemName</i>. Free
items have an allocation id of <b class="const">-1</b>.</p></dd>
<dt><b class="const">allitems</b></dt>
<dd><p>returns a list of all items in the pool.</p></dd>
<dt><b class="const">allocstate</b></dt>
<dd><p>Returns a list of key-value pairs, where the keys are the items and
the values are the corresponding allocation id's. Free items have an
allocation id of <b class="const">-1</b>.</p></dd>
<dt><b class="const">cursize</b></dt>
<dd><p>returns the current pool size, i.e. the number of items in the pool.</p></dd>
<dt><b class="const">freeitems</b></dt>
<dd><p>returns a list of items that currently are not allocated.</p></dd>
<dt><b class="const">maxsize</b></dt>
<dd><p>returns the maximum size of the pool.</p></dd>
</dl></dd>
<dt><a name="7"><i class="arg">poolName</i> <b class="method">maxsize</b> <span class="opt">?<i class="arg">maxsize</i>?</span></a></dt>
<dd><p>Sets or queries the maximum size of the pool, depending on whether the
<i class="arg">maxsize</i> argument is supplied or not. If <i class="arg">maxsize</i> is
supplied, the maximum size of the pool will be set to that value. If
no argument is supplied, the current maximum size of the pool is
returned. In this variant, the command is an alias for:</p>
<p><b class="cmd">poolName info maxsize</b>.</p>
<p>The <i class="arg">maxsize</i> argument has to be a positive integer.</p></dd>
<dt><a name="8"><i class="arg">poolName</i> <b class="method">release</b> <i class="arg">itemName</i></a></dt>
<dd><p>Releases the item whose name is <i class="arg">itemName</i> that was allocated
previously. An error is raised if the item was not allocated at the
time when the command was issued.</p></dd>
<dt><a name="9"><i class="arg">poolName</i> <b class="method">remove</b> <i class="arg">itemName</i> <span class="opt">?<b class="option">-force</b>?</span></a></dt>
<dd><p>Removes the item whose name is <i class="arg">itemName</i> from the pool. If the
item was allocated at the time when the command was invoked, an error
is raised. This behaviour may be modified through the optional
argument <b class="option">-force</b>. If it is supplied on the command line, the
item will be removed regardless its allocation state.</p></dd>
<dt><a name="10"><i class="arg">poolName</i> <b class="method">request</b> itemVar <span class="opt">?options?</span></a></dt>
<dd><p>Handles a request for an item, taking into account a possible
preference for a particular item. There are two possible outcomes
depending on the availability of items:</p>
<ol class="doctools_enumerated">
<li><p>The request is honoured, an item is allocated and the variable whose
name is passed with the argument <i class="arg">itemVar</i> will be set to the name
of the item that was allocated. The command returns 1.</p></li>
<li><p>The request is denied. No item is allocated. The variable whose name
is itemVar is not set.  Attempts to read <i class="arg">itemVar</i> may raise an
error if the variable was not defined before issuing the request. The
command returns 0.</p></li>
</ol>
<p>The return values from this command are meant to be inspected. The
examples below show how to do this. Failure to check the return value
may result in erroneous behaviour. If no preference for a particular
item is supplied through the option <b class="option">-prefer</b> (see below), then
all requests are honoured as long as items are available.</p>
<p>The following options are supported:</p>
<dl class="doctools_definitions">
<dt><b class="option">-allocID</b> <i class="arg">allocID</i></dt>
<dd><p>If the request is honoured, an item will be allocated to the entity
identified by allocID. If the allocation state of an item is queried,
it is this allocation ID that will be returned. If the option
<b class="option">-allocID</b> is not supplied, the item will be given to and owned
by <b class="const">dummyID</b>. Allocation id's may be anything except the value
-1, which is reserved for free items.</p></dd>
<dt><b class="option">-prefer</b> <i class="arg">preferredItem</i></dt>
<dd><p>This option modifies the allocation strategy as follows: If the item
whose name is <i class="arg">preferredItem</i> is not allocated at the time when
the command is invoked, the request is honoured (return value is
1). If the item was allocated at the time when the command was
invoked, the request is denied (return value is 0).</p></dd>
</dl></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<p>Two examples are provided. The first one mimics a step by step
interactive tclsh session, where each step is explained. The second
example shows the usage in a server application that talks to a
back-end application.</p>
<p><em>Example 1</em></p>
<p>This example presents an interactive tclsh session which considers the
case of a Car rental's collection of cars. Ten steps explain its usage
in chronological order, from the creation of the pool, via the most
important stages in the usage of a pool, to the final destruction.</p>
<p><em>Note aside:</em></p>
<p>In this example, brand names are used to label the various
items. However, a brand name could be regarded as a property of an
item. Because the pool command is not designed to manage properties of
items, they need to be managed separately. In the latter case the
items should be labeled with more neutral names such as: car1, car2,
car3 , etc ... and a separate database or array should hold the brand
names associated with the car labels.</p>
<pre class="doctools_example">
     1. Load the package into an interpreter
     % package require pool
     0.1
     2. Create a pool object called `CarPool' with a maximum size of 55 items (cars):
     % pool CarPool 55
     CarPool
     4. Add items to the pool:
     % CarPool add Toyota Trabant Chrysler1 Chrysler2 Volkswagen
     5. Somebody crashed the Toyota. Remove it from the pool as follows:
     % CarPool remove Toyota
     6. Acquired a new car for the pool. Add it as follows:
     % CarPool add Nissan
     7. Check whether the pool was adjusted correctly:
     % CarPool info allitems
     Trabant Chrysler1 Chrysler2 Volkswagen Nissan
</pre>
<p>Suspend the interactive session temporarily, and show the programmatic
use of the request subcommand:</p>
<pre class="doctools_example">
     # Mrs. Swift needs a car. She doesn't have a preference for a
     # particular car. We'll issue a request on her behalf as follows:
     if { [CarPool request car -allocID &quot;Mrs. Swift&quot;] }  {
         # request was honoured, process the variable `car'
         puts &quot;$car has been allocated to [CarPool info allocID $car].&quot;
     } else {
         # request was denied
          puts &quot;No car available.&quot;
     }
</pre>
<p>Note how the <b class="cmd">if</b> command uses the value returned by the
<b class="method">request</b> subcommand.</p>
<pre class="doctools_example">
     # Suppose Mr. Wiggly has a preference for the Trabant:
     if { [CarPool request car -allocID &quot;Mr. Wiggly&quot; -prefer Trabant] }  {
         # request was honoured, process the variable `car'
         puts &quot;$car has been allocated to [CarPool info allocID $car].&quot;
     } else {
         # request was denied
          puts &quot;The Trabant was not available.&quot;
     }
</pre>
<p>Resume the interactive session:</p>
<pre class="doctools_example">
     8. When the car is returned then you can render it available by:
     % CarPool release Trabant
     9. When done, you delete the pool.
     % CarPool destroy
     Couldn't destroy `CarPool' because some items are still allocated.
     Oops, forgot that Mrs. Swift still occupies a car.
     10. We force the destruction of the pool as follows:
     % CarPool destroy -force
</pre>
<p><em>Example 2</em></p>
<p>This example describes the case from which the author's need for pool
management originated. It is an example of a server application that
receives requests from client applications. The client requests are
dispatched onto a back-end application before being returned to the
client application. In many cases there are a few equivalent instances
of back-end applications to which a client request may be passed
along. The file descriptors that identify the channels to these
back-end instances make up a pool of connections. A particular
connection may be allocated to just one client request at a time.</p>
<pre class="doctools_example">
     # Create the pool of connections (pipes)
     set maxpipes 10
     pool Pipes $maxpipes
     for {set i 0} {$i &lt; $maxpipes} {incr i} {
         set fd [open &quot;|backendApplication&quot; w+]
         Pipes add $fd
     }
     # A client request comes in. The request is identified as `clientX'.
     # Dispatch it onto an instance of a back-end application
     if { [Pipes request fd -allocID clientX] } {
         # a connection was allocated
         # communicate to the back-end application via the variable `fd'
         puts $fd &quot;someInstruction&quot;
         # ...... etc.
     } else {
         # all connections are currently occupied
         # store the client request in a queue for later processing,
         # or return a 'Server busy' message to the client.
     }
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: pool</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key787">discrete items</a>, <a href="../../../../index.html#key788">finite</a>, <a href="../../../../index.html#key304">pool</a>, <a href="../../../../index.html#key327">struct</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Erik Leunissen &lt;e.leunissen@hccnet.nl&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/prioqueue.html.















































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<div class='fossil-doc' data-title='struct::prioqueue - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::prioqueue(n) 1.4 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::prioqueue - Create and manipulate prioqueue objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::prioqueue <span class="opt">?1.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::prioqueue</b> <span class="opt">?<b class="option">-ascii|-dictionary|-integer|-real</b>?</span> <span class="opt">?<i class="arg">prioqueueName</i>?</span></a></li>
<li><a href="#2"><i class="arg">prioqueueName</i> <b class="cmd">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">prioqueueName</i> <b class="cmd">clear</b></a></li>
<li><a href="#4"><i class="arg">prioqueueName</i> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">item</i></a></li>
<li><a href="#5"><i class="arg">prioqueueName</i> <b class="cmd">destroy</b></a></li>
<li><a href="#6"><i class="arg">prioqueueName</i> <b class="cmd">get</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#7"><i class="arg">prioqueueName</i> <b class="cmd">peek</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#8"><i class="arg">prioqueueName</i> <b class="cmd">peekpriority</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#9"><i class="arg">prioqueueName</i> <b class="cmd">put</b> <i class="arg">item prio</i> <span class="opt">?<i class="arg">item prio ...</i>?</span></a></li>
<li><a href="#10"><i class="arg">prioqueueName</i> <b class="cmd">size</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a simple priority queue using nested tcl lists.</p>
<p>The command <b class="cmd">::struct::prioqueue</b> creates a new priority queue
with default priority key type <i class="arg">-integer</i>. This means that keys
given to the <b class="method">put</b> subcommand must have this type.</p>
<p>This also sets the priority ordering. For key types <i class="arg">-ascii</i> and
<i class="arg">-dictionary</i> the data is sorted in ascending order (as with
<b class="cmd">lsort</b> <i class="arg">-increasing</i>), thereas for <i class="arg">-integer</i> and
<i class="arg">-real</i> the data is sorted in descending order (as with
<b class="cmd">lsort</b> <i class="arg">-decreasing</i>).</p>
<p>Prioqueue names are unrestricted, but may be recognized as options if
no priority type is given.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::struct::prioqueue</b> <span class="opt">?<b class="option">-ascii|-dictionary|-integer|-real</b>?</span> <span class="opt">?<i class="arg">prioqueueName</i>?</span></a></dt>
<dd><p>The <b class="cmd">::struct::prioqueue</b> command creates a new prioqueue object
with an associated global Tcl command whose name is
<em>prioqueueName</em>. This command may be used to invoke various
operations on the prioqueue.  It has the following general form:</p></dd>
<dt><a name="2"><i class="arg">prioqueueName</i> <b class="cmd">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><b class="cmd">option</b> and the <i class="arg">arg</i>s determine the exact behavior of the
command.  The following commands are possible for prioqueue objects:</p></dd>
<dt><a name="3"><i class="arg">prioqueueName</i> <b class="cmd">clear</b></a></dt>
<dd><p>Remove all items from the prioqueue.</p></dd>
<dt><a name="4"><i class="arg">prioqueueName</i> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">item</i></a></dt>
<dd><p>Remove the selected item from this priority queue.</p></dd>
<dt><a name="5"><i class="arg">prioqueueName</i> <b class="cmd">destroy</b></a></dt>
<dd><p>Destroy the prioqueue, including its storage space and associated
command.</p></dd>
<dt><a name="6"><i class="arg">prioqueueName</i> <b class="cmd">get</b> <span class="opt">?<i class="arg">count</i>?</span></a></dt>
<dd><p>Return the front <i class="arg">count</i> items of the prioqueue (but not their
priorities) and remove them from the prioqueue.
If <i class="arg">count</i> is not specified, it defaults to 1.  If <i class="arg">count</i> is
1, the result is a simple string; otherwise, it is a list.  If
specified, <i class="arg">count</i> must be greater than or equal to 1.  If there
are no or too few items in the prioqueue, this command will throw an
error.</p></dd>
<dt><a name="7"><i class="arg">prioqueueName</i> <b class="cmd">peek</b> <span class="opt">?<i class="arg">count</i>?</span></a></dt>
<dd><p>Return the front <i class="arg">count</i> items of the prioqueue (but not their
priorities), without removing them from the prioqueue.
If <i class="arg">count</i> is not specified, it defaults to 1.  If <i class="arg">count</i> is
1, the result is a simple string; otherwise, it is a list.  If
specified, <i class="arg">count</i> must be greater than or equal to 1.  If there
are no or too few items in the queue, this command will throw an
error.</p></dd>
<dt><a name="8"><i class="arg">prioqueueName</i> <b class="cmd">peekpriority</b> <span class="opt">?<i class="arg">count</i>?</span></a></dt>
<dd><p>Return the front <i class="arg">count</i> items priority keys, without removing
them from the prioqueue.
If <i class="arg">count</i> is not specified, it defaults to 1.  If <i class="arg">count</i> is
1, the result is a simple string; otherwise, it is a list.  If
specified, <i class="arg">count</i> must be greater than or equal to 1.  If there
are no or too few items in the queue, this command will throw an
error.</p></dd>
<dt><a name="9"><i class="arg">prioqueueName</i> <b class="cmd">put</b> <i class="arg">item prio</i> <span class="opt">?<i class="arg">item prio ...</i>?</span></a></dt>
<dd><p>Put the <i class="arg">item</i> or items specified into the prioqueue. <i class="arg">prio</i>
must be a valid priority key for this type of prioqueue, otherwise an
error is thrown and no item is added.  Items are inserted at their
priority ranking. Items with equal priority are added in the order
they were added.</p></dd>
<dt><a name="10"><i class="arg">prioqueueName</i> <b class="cmd">size</b></a></dt>
<dd><p>Return the number of items in the prioqueue.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: prioqueue</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key752">ordered list</a>, <a href="../../../../index.html#key308">prioqueue</a>, <a href="../../../../index.html#key753">priority queue</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/queue.html.





































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

<div class='fossil-doc' data-title='struct::queue - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::queue(n) 1.4.5 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::queue - Create and manipulate queue objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::queue <span class="opt">?1.4.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><i class="arg">queueName</i> <b class="cmd">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#2"><i class="arg">queueName</i> <b class="cmd">clear</b></a></li>
<li><a href="#3"><i class="arg">queueName</i> <b class="cmd">destroy</b></a></li>
<li><a href="#4"><i class="arg">queueName</i> <b class="cmd">get</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#5"><i class="arg">queueName</i> <b class="cmd">peek</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#6"><i class="arg">queueName</i> <b class="cmd">put</b> <i class="arg">item</i> <span class="opt">?<i class="arg">item ...</i>?</span></a></li>
<li><a href="#7"><i class="arg">queueName</i> <b class="cmd">unget</b> <i class="arg">item</i></a></li>
<li><a href="#8"><i class="arg">queueName</i> <b class="cmd">size</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="namespace">::struct</b> namespace contains a commands for processing
finite queues.</p>
<p>It exports a single command, <b class="cmd">::struct::queue</b>. All functionality
provided here can be reached through a subcommand of this command.</p>
<p><em>Note:</em> As of version 1.4.1 of this package a critcl based C
implementation is available. This implementation however requires Tcl
8.4 to run.</p>
<p>The <b class="cmd">::struct::queue</b> command creates a new queue object with an
associated global Tcl command whose name is <em>queueName</em>.  This
command may be used to invoke various operations on the queue.  It has
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="1"><i class="arg">queueName</i> <b class="cmd">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.  The following commands are possible for queue objects:</p></dd>
<dt><a name="2"><i class="arg">queueName</i> <b class="cmd">clear</b></a></dt>
<dd><p>Remove all items from the queue.</p></dd>
<dt><a name="3"><i class="arg">queueName</i> <b class="cmd">destroy</b></a></dt>
<dd><p>Destroy the queue, including its storage space and associated command.</p></dd>
<dt><a name="4"><i class="arg">queueName</i> <b class="cmd">get</b> <span class="opt">?<i class="arg">count</i>?</span></a></dt>
<dd><p>Return the front <i class="arg">count</i> items of the queue and remove them from
the queue.  If <i class="arg">count</i> is not specified, it defaults to 1.  If
<i class="arg">count</i> is 1, the result is a simple string; otherwise, it is a
list.  If specified, <i class="arg">count</i> must be greater than or equal to 1.
If there are not enough items in the queue to fulfull the request,
this command will throw an error.</p></dd>
<dt><a name="5"><i class="arg">queueName</i> <b class="cmd">peek</b> <span class="opt">?<i class="arg">count</i>?</span></a></dt>
<dd><p>Return the front <i class="arg">count</i> items of the queue, without removing them
from the queue.  If <i class="arg">count</i> is not specified, it defaults to 1.
If <i class="arg">count</i> is 1, the result is a simple string; otherwise, it is a
list.  If specified, <i class="arg">count</i> must be greater than or equal to 1.
If there are not enough items in the queue to fulfull the request,
this command will throw an error.</p></dd>
<dt><a name="6"><i class="arg">queueName</i> <b class="cmd">put</b> <i class="arg">item</i> <span class="opt">?<i class="arg">item ...</i>?</span></a></dt>
<dd><p>Put the <i class="arg">item</i> or items specified into the queue.  If more than
one <i class="arg">item</i> is given, they will be added in the order they are
listed.</p></dd>
<dt><a name="7"><i class="arg">queueName</i> <b class="cmd">unget</b> <i class="arg">item</i></a></dt>
<dd><p>Put the <i class="arg">item</i> into the queue, at the front, i.e. before any other
items already in the queue. This makes this operation the complement
to the method <b class="method">get</b>.</p></dd>
<dt><a name="8"><i class="arg">queueName</i> <b class="cmd">size</b></a></dt>
<dd><p>Return the number of items in the queue.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: queue</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key305">graph</a>, <a href="../../../../index.html#key302">list</a>, <a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key304">pool</a>, <a href="../../../../index.html#key308">prioqueue</a>, <a href="../../../../index.html#key307">record</a>, <a href="../../../../index.html#key301">set</a>, <a href="../../../../index.html#key306">skiplist</a>, <a href="../../../../index.html#key303">stack</a>, <a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/record.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424

<div class='fossil-doc' data-title='struct::record - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::record(n) 1.2.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::record - Define and create records (similar to 'C' structures)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RECORD MEMBERS</a></li>
<li class="doctools_section"><a href="#section3">RECORD COMMAND</a></li>
<li class="doctools_section"><a href="#section4">INSTANCE COMMAND</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::record <span class="opt">?1.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">record define</b> <i class="arg">recordName</i> <i class="arg">recordMembers</i> <span class="opt">?<i class="arg">instanceName1 instanceName2 ...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">record show</b> <i class="arg">record</i></a></li>
<li><a href="#3"><b class="cmd">record show</b> <i class="arg">instances</i> <i class="arg">recordName</i></a></li>
<li><a href="#4"><b class="cmd">record show</b> <i class="arg">members</i> <i class="arg">recordName</i></a></li>
<li><a href="#5"><b class="cmd">record show</b> <i class="arg">values</i> <i class="arg">instanceName</i></a></li>
<li><a href="#6"><b class="cmd">record exists</b> <i class="arg">record</i> <i class="arg">recordName</i></a></li>
<li><a href="#7"><b class="cmd">record exists</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></li>
<li><a href="#8"><b class="cmd">record delete</b> <i class="arg">record</i> <i class="arg">recordName</i></a></li>
<li><a href="#9"><b class="cmd">record delete</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></li>
<li><a href="#10"><i class="arg">recordName</i> <b class="method"><i class="arg">instanceName|#auto</i></b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></li>
<li><a href="#11"><i class="arg">instanceName</i> <b class="method">cget</b> <span class="opt">?<i class="arg">-member1 -member2 ...</i>?</span></a></li>
<li><a href="#12"><i class="arg">instanceName</i> <b class="method">configure</b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">::struct::record</b> package provides a mechanism to group variables together
as one data structure, similar to a 'C' structure. The members of a
record can be variables or other records. However, a record can not contain circular
record, i.e. records that contain the same record as a
member.</p>
<p>This package was structured so that it is very similar to how Tk objects work. Each record
definition creates a record object that encompasses that definition. Subsequently, that
record object can create instances of that record. These instances can then
be manipulated with the <b class="method">cget</b> and <b class="method">configure</b> methods.</p>
<p>The package only contains one top level command, but several sub commands (see below). It also obeys the namespace in which the record was define, hence the objects returned are fully qualified.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">record define</b> <i class="arg">recordName</i> <i class="arg">recordMembers</i> <span class="opt">?<i class="arg">instanceName1 instanceName2 ...</i>?</span></a></dt>
<dd><p>Defines a record. <i class="arg">recordName</i> is the name of the record, and is also
used as an object command. This object command is used to create instances of the
record definition. <i class="arg">recordMembers</i> are the members of
the record that make up the record definition. These are variables
and other record. If optional <i class="arg">instanceName</i> args are given, then an instance
is generated after the definition is created for each <i class="arg">instanceName</i>.</p></dd>
<dt><a name="2"><b class="cmd">record show</b> <i class="arg">record</i></a></dt>
<dd><p>Returns a list of records that have been defined.</p></dd>
<dt><a name="3"><b class="cmd">record show</b> <i class="arg">instances</i> <i class="arg">recordName</i></a></dt>
<dd><p>Returns the instances that have been instantiated by
<i class="arg">recordName</i>.</p></dd>
<dt><a name="4"><b class="cmd">record show</b> <i class="arg">members</i> <i class="arg">recordName</i></a></dt>
<dd><p>Returns the members that are defined for
record <i class="arg">recordName</i>. It returns the same format as how the
records were defined.</p></dd>
<dt><a name="5"><b class="cmd">record show</b> <i class="arg">values</i> <i class="arg">instanceName</i></a></dt>
<dd><p>Returns a list of values that are set for the instance
<i class="arg">instanceName</i>. The output is a list of key/value pairs. If there
are nested records, then the values of the nested records will
itself be a list.</p></dd>
<dt><a name="6"><b class="cmd">record exists</b> <i class="arg">record</i> <i class="arg">recordName</i></a></dt>
<dd><p>Tests for the existence of a <i class="arg">record</i> with the
name <i class="arg">recordName</i>.</p></dd>
<dt><a name="7"><b class="cmd">record exists</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></dt>
<dd><p>Tests for the existence of a <i class="arg">instance</i> with the
name <i class="arg">instanceName</i>.</p></dd>
<dt><a name="8"><b class="cmd">record delete</b> <i class="arg">record</i> <i class="arg">recordName</i></a></dt>
<dd><p>Deletes <i class="arg">recordName</i>, and all instances of <i class="arg">recordName</i>. It will return
an error if the record does not exist.</p></dd>
<dt><a name="9"><b class="cmd">record delete</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></dt>
<dd><p>Deletes <i class="arg">instance</i> with the name of <i class="arg">instanceName</i>. It
will return an error if the instance does not exist.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RECORD MEMBERS</a></h2>
<p>Record members can either be variables, or other records, However, the
same record can not be nested witin itself (circular). To define a
nested record, you need to specify the <b class="const">record</b> keyword, along
the with name of the record, and the name of the instance of that
nested record. For example, it would look like this:</p>
<pre class="doctools_example">
# this is the nested record
record define mynestedrecord {
    nest1
    nest2
}
# This is the main record
record define myrecord {
    mem1
    mem2
    {record mynestedrecord mem3}
}
</pre>
<p>You can also assign default or initial values to the members of a record,
by enclosing the member entry in braces:</p>
<pre class="doctools_example">
record define myrecord {
    mem1
    {mem2 5}
}
</pre>
<p>All instances created from this record definition, will initially have 5 as
the value for <i class="arg">mem2</i>. If no default is given, then the value will be the empty string.</p>
<p><em>Getting Values</em></p>
<p>To get a value of a member, there are several ways to do this.</p>
<ol class="doctools_enumerated">
<li><p>To get a member value, then use the instance built-in <b class="method">cget</b> method:</p>
<p><i class="arg">instanceName</i> <b class="method">cget</b> -mem1</p></li>
<li><p>To get multiple member values, you can specify them all in one command:</p>
<p><i class="arg">instanceName</i> <b class="method">cget</b> -mem1 -mem2</p></li>
<li><p>To get a list of the key/value of all of the members, there are 3 ways:</p>
<p>- <i class="arg">instanceName</i> <b class="method">cget</b></p>
<p>- <i class="arg">instanceName</i> <b class="method">configure</b></p>
<p>- <i class="arg">instanceName</i></p></li>
<li><p>To get a value of a nested member, then use the dot notation:</p>
<p><i class="arg">instanceName</i> <b class="method">cget</b> -mem3.nest1</p></li>
</ol>
<p><em>Setting Values</em></p>
<p>To set a value of a member, there are several ways to do this.</p>
<ol class="doctools_enumerated">
<li><p>To set a member value, then use the instance built-in <b class="method">configure</b> method:</p>
<p><i class="arg">instanceName</i> <b class="method">configure</b> -mem1 val1</p></li>
<li><p>To set multiple member values, you can specify them all in one command:</p>
<p><i class="arg">instanceName</i> <b class="method">configure</b> -mem1 va1 -mem2 val2</p></li>
<li><p>To set a value of a nested member, then use the dot notation:</p>
<p><i class="arg">instanceName</i> <b class="method">configure</b> -mem3.nest1 value</p></li>
</ol>
<p><em>Alias access</em></p>
<p>In the original implementation, access was done by using dot notation similar to how 'C' structures are accessed. However,
there was a concensus to make the interface more Tcl like, which made sense. However, the original alias access still
exists. It might prove to be helpful to some.</p>
<p>Basically, for every member of every instance, an alias is created. This alias is used to get and set values for that
member. An example will illustrate the point, using the above defined records:</p>
<pre class="doctools_example">
# Create an instance first
% myrecord inst1
::inst1
% # To get a member of an instance, just use the
% # alias (it behaves like a Tcl command):
% inst1.mem1
%
% # To set a member via the alias, just include
% # a value (optionally the equal sign - syntactic sugar)
% inst1.mem1 = 5
5
% inst1.mem1
5
% # For nested records, just continue with the
% # dot notation (note no equal sign)
% inst1.mem3.nest1 10
10
% inst1.mem3.nest1
10
% # just the instance by itself gives all
% # member/values pairs for that instance
% inst1
-mem1 5 -mem2 {} -mem3 {-nest1 10 -nest2 {}}
% # and to get all members within the nested record
% inst1.mem3
-nest1 10 -nest2 {}
%
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">RECORD COMMAND</a></h2>
<p>The following subcommands and corresponding arguments are available to any
record command:</p>
<dl class="doctools_definitions">
<dt><a name="10"><i class="arg">recordName</i> <b class="method"><i class="arg">instanceName|#auto</i></b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></dt>
<dd><p>Using the <i class="arg">recordName</i> object command that was created from the record definition,
instances of the record definition can be created. Once a instance is
created, then it inherits the members of the record definition, very
similar to how objects work. During instance generation, an object command for the instance
is created as well, using <i class="arg">instanceName</i>. This object command is used
to access the data members of the instance. During the instantiation, values for
that instance can be given, <em>but</em> all values must be given, and be given
in key/value pairs. Nested records, need to be in list format.</p>
<p>Optionally, <i class="arg">#auto</i> can be used in place of <i class="arg">instanceName</i>. When #auto is used,
then a instance name will automatically be generated, of the form recordName&lt;integer&gt;, where
&lt;integer&gt; is a unique integer (starting at 0) that is generated.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">INSTANCE COMMAND</a></h2>
<p>The following subcommands and corresponding arguments are available to
any record instance command:</p>
<dl class="doctools_definitions">
<dt><a name="11"><i class="arg">instanceName</i> <b class="method">cget</b> <span class="opt">?<i class="arg">-member1 -member2 ...</i>?</span></a></dt>
<dd><p>Each instance has the sub command <b class="method">cget</b> associated with it. This
is very similar to how Tk widget's cget command works. It queries
the values of the member for that particular instance. If
no arguments are given, then a key/value list is returned.</p></dd>
<dt><a name="12"><i class="arg">instanceName</i> <b class="method">configure</b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></dt>
<dd><p>Each instance has the sub command <b class="method">configure</b> associated with it. This
is very similar to how Tk widget's configure command works. It sets
the values of the particular member for that particular instance. If
no arguments are given, then a key/value list is returned.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<p>Two examples are provided to give an good illustration on how to use
this package.</p>
<p><em>Example 1</em></p>
<p>Probably the most obvious example would be to hold contact information,
such as addresses, phone numbers, comments, etc. Since a person can have
multiple phone numbers, multiple email addresses, etc, we will use nested
records to define these. So, the first thing we do is define the nested
records:</p>
<pre class="doctools_example">
##
##  This is an interactive example, to see what is
##  returned by each command as well.
##
% namespace import ::struct::record::*
% # define a nested record. Notice that country has default 'USA'.
% record define locations {
    street
    street2
    city
    state
    zipcode
    {country USA}
    phone
}
::locations
% # Define the main record. Notice that it uses the location record twice.
% record define contacts {
    first
    middle
    last
    {record locations home}
    {record locations work}
}
::contacts
% # Create an instance for the contacts record.
% contacts cont1
::cont1
% # Display some introspection values
% record show records
::contacts ::locations
% #
% record show values cont1
-first {} -middle {} -last {} -home {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}} -work {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}}
% #
% record show instances contacts
::cont1
% #
% cont1 config
-first {} -middle {} -last {} -home {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}} -work {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}}
% #
% cont1 cget
-first {} -middle {} -last {} -home {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}} -work {-street {} -street2 {} -city {} -state {} -zipcode {} -country USA -phone {}}
% # copy one record to another record
% record define contacts2 [record show members contacts]
::contacts2
% record show members contacts2
first middle last {record locations home} {record locations work}
% record show members contacts
first middle last {record locations home} {record locations work}
%
</pre>
<p><em>Example 1</em></p>
<p>This next example just illustrates a simple linked list</p>
<pre class="doctools_example">
% # define a very simple record for linked list
% record define llist {
    value
    next
}
::llist
% llist lstart
::lstart
% lstart config -value 1 -next [llist #auto]
% [lstart cget -next] config -value 2 -next [llist #auto]
% [[lstart cget -next] cget -next] config -value 3 -next &quot;end&quot;
% set next lstart
lstart
% while 1 {
lappend values [$next cget -value]
set next [$next cget -next]
if {[string match &quot;end&quot; $next]} {break}
}
% puts &quot;$values&quot;
1 2 3
% # cleanup linked list
% # We could just use delete record llist also
% foreach I [record show instances llist] {
record delete instance $I
}
% record show instances llist
%
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: record</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key328">data structures</a>, <a href="../../../../index.html#key307">record</a>, <a href="../../../../index.html#key327">struct</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Brett Schwarz &lt;brett_schwarz@yahoo.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/skiplist.html.



































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

<div class='fossil-doc' data-title='struct::skiplist - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::skiplist(n) 1.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::skiplist - Create and manipulate skiplists</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::skiplist <span class="opt">?1.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">skiplistName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#2"><i class="arg">skiplistName</i> <b class="method">delete</b> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i>...?</span></a></li>
<li><a href="#3"><i class="arg">skiplistName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">skiplistName</i> <b class="method">insert</b> <i class="arg">key value</i></a></li>
<li><a href="#5"><i class="arg">skiplistName</i> <b class="method">search</b> <i class="arg">node</i> <span class="opt">?<b class="const">-key</b> <i class="arg">key</i>?</span></a></li>
<li><a href="#6"><i class="arg">skiplistName</i> <b class="method">size</b></a></li>
<li><a href="#7"><i class="arg">skiplistName</i> <b class="method">walk</b> <i class="arg">cmd</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">::struct::skiplist</b> command creates a new skiplist object
with an associated global Tcl command whose name is
<i class="arg">skiplistName</i>. This command may be used to invoke various
operations on the skiplist. It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">skiplistName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>Skip lists are an alternative data structure to binary trees. They can
be used to maintain ordered lists over any sequence of insertions and
deletions. Skip lists use randomness to achieve probabilistic
balancing, and as a result the algorithms for insertion and deletion
in skip lists are much simpler and faster than those for binary trees.</p>
<p>To read more about skip lists see Pugh, William.
<em>Skip lists: a probabilistic alternative to balanced trees</em>
In: Communications of the ACM, June 1990, 33(6) 668-676.</p>
<p>Currently, the key can be either a number or a string, and comparisons
are performed with the built in greater than operator.
The following commands are possible for skiplist objects:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">skiplistName</i> <b class="method">delete</b> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i>...?</span></a></dt>
<dd><p>Remove the specified nodes from the skiplist.</p></dd>
<dt><a name="3"><i class="arg">skiplistName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroy the skiplist, including its storage space and associated command.</p></dd>
<dt><a name="4"><i class="arg">skiplistName</i> <b class="method">insert</b> <i class="arg">key value</i></a></dt>
<dd><p>Insert a node with the given <i class="arg">key</i> and <i class="arg">value</i> into the
skiplist. If a node with that key already exists, then the that node's
value is updated and its node level is returned. Otherwise a new node
is created and 0 is returned.</p></dd>
<dt><a name="5"><i class="arg">skiplistName</i> <b class="method">search</b> <i class="arg">node</i> <span class="opt">?<b class="const">-key</b> <i class="arg">key</i>?</span></a></dt>
<dd><p>Search for a given key in a skiplist. If not found then 0 is returned.
If found, then a two element list of 1 followed by the node's value is retuned.</p></dd>
<dt><a name="6"><i class="arg">skiplistName</i> <b class="method">size</b></a></dt>
<dd><p>Return a count of the number of nodes in the skiplist.</p></dd>
<dt><a name="7"><i class="arg">skiplistName</i> <b class="method">walk</b> <i class="arg">cmd</i></a></dt>
<dd><p>Walk the skiplist from the first node to the last. At each node, the
command <i class="arg">cmd</i> will be evaluated with the key and value of the
current node appended.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: skiplist</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key306">skiplist</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2000 Keith Vetter</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/stack.html.

































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<div class='fossil-doc' data-title='struct::stack - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::stack(n) 1.5.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::stack - Create and manipulate stack objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::stack <span class="opt">?1.5.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><i class="arg">stackName</i> <b class="cmd">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#2"><i class="arg">stackName</i> <b class="method">clear</b></a></li>
<li><a href="#3"><i class="arg">stackName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">stackName</i> <b class="method">get</b></a></li>
<li><a href="#5"><i class="arg">stackName</i> <b class="method">getr</b></a></li>
<li><a href="#6"><i class="arg">stackName</i> <b class="method">peek</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#7"><i class="arg">stackName</i> <b class="method">peekr</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#8"><i class="arg">stackName</i> <b class="method">trim</b> <span class="opt">?<i class="arg">newsize</i>?</span></a></li>
<li><a href="#9"><i class="arg">stackName</i> <b class="method">trim*</b> <span class="opt">?<i class="arg">newsize</i>?</span></a></li>
<li><a href="#10"><i class="arg">stackName</i> <b class="method">pop</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#11"><i class="arg">stackName</i> <b class="method">push</b> <i class="arg">item</i> <span class="opt">?<i class="arg">item...</i>?</span></a></li>
<li><a href="#12"><i class="arg">stackName</i> <b class="method">size</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="namespace">::struct</b> namespace contains a commands for processing
finite stacks.</p>
<p>It exports a single command, <b class="cmd">::struct::stack</b>. All functionality
provided here can be reached through a subcommand of this command.</p>
<p><em>Note:</em> As of version 1.3.3 of this package a critcl based C
implementation is available. This implementation however requires Tcl
8.4 to run.</p>
<p>The <b class="cmd">::struct::stack</b> command creates a new stack object with an
associated global Tcl command whose name is <em>stackName</em>.  This
command may be used to invoke various operations on the stack.  It has
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="1"><i class="arg">stackName</i> <b class="cmd">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.  The following commands are possible for stack objects:</p></dd>
<dt><a name="2"><i class="arg">stackName</i> <b class="method">clear</b></a></dt>
<dd><p>Remove all items from the stack.</p></dd>
<dt><a name="3"><i class="arg">stackName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroy the stack, including its storage space and associated command.</p></dd>
<dt><a name="4"><i class="arg">stackName</i> <b class="method">get</b></a></dt>
<dd><p>Returns the whole contents of the stack as a list, without removing
them from the stack.</p></dd>
<dt><a name="5"><i class="arg">stackName</i> <b class="method">getr</b></a></dt>
<dd><p>A variant of <b class="method">get</b>, which returns the contents in reversed order.</p></dd>
<dt><a name="6"><i class="arg">stackName</i> <b class="method">peek</b> <span class="opt">?<i class="arg">count</i>?</span></a></dt>
<dd><p>Return the top <i class="arg">count</i> items of the stack, without removing them from
the stack.  If <i class="arg">count</i> is not specified, it defaults to 1.  If
<i class="arg">count</i> is 1, the result is a simple string; otherwise, it is a
list.  If specified, <i class="arg">count</i> must be greater than or equal to 1.
If there are not enoughs items on the stack to fulfull the request,
this command will throw an error.</p></dd>
<dt><a name="7"><i class="arg">stackName</i> <b class="method">peekr</b> <span class="opt">?<i class="arg">count</i>?</span></a></dt>
<dd><p>A variant of <b class="method">peek</b>, which returns the items in reversed order.</p></dd>
<dt><a name="8"><i class="arg">stackName</i> <b class="method">trim</b> <span class="opt">?<i class="arg">newsize</i>?</span></a></dt>
<dd><p>Shrinks the stack to contain at most <i class="arg">newsize</i> elements and
returns a list containing the elements which were removed. Nothing is
done if the stack is already at the specified size, or smaller. In
that case the result is the empty list.</p></dd>
<dt><a name="9"><i class="arg">stackName</i> <b class="method">trim*</b> <span class="opt">?<i class="arg">newsize</i>?</span></a></dt>
<dd><p>A variant of <b class="method">trim</b> which performs the shrinking, but does not
return the removed elements.</p></dd>
<dt><a name="10"><i class="arg">stackName</i> <b class="method">pop</b> <span class="opt">?<i class="arg">count</i>?</span></a></dt>
<dd><p>Return the top <i class="arg">count</i> items of the stack, and remove them
from the stack.  If <i class="arg">count</i> is not specified, it defaults to 1.
If <i class="arg">count</i> is 1, the result is a simple string; otherwise, it is a
list.  If specified, <i class="arg">count</i> must be greater than or equal to 1.
If there are not enoughs items on the stack to fulfull the request,
this command will throw an error.</p></dd>
<dt><a name="11"><i class="arg">stackName</i> <b class="method">push</b> <i class="arg">item</i> <span class="opt">?<i class="arg">item...</i>?</span></a></dt>
<dd><p>Push the <i class="arg">item</i> or items specified onto the stack.  If more than
one <i class="arg">item</i> is given, they will be pushed in the order they are
listed.</p></dd>
<dt><a name="12"><i class="arg">stackName</i> <b class="method">size</b></a></dt>
<dd><p>Return the number of items on the stack.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: stack</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key305">graph</a>, <a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key50">queue</a>, <a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/struct_list.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696

<div class='fossil-doc' data-title='struct::list - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::list(n) 1.8.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::list - Procedures for manipulating lists</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">LONGEST COMMON SUBSEQUENCE AND FILE COMPARISON</a></li>
<li class="doctools_section"><a href="#section4">TABLE JOIN</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::list <span class="opt">?1.8.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::list</b> <b class="method">longestCommonSubsequence</b> <i class="arg">sequence1</i> <i class="arg">sequence2</i> <span class="opt">?<i class="arg">maxOccurs</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::struct::list</b> <b class="method">longestCommonSubsequence2</b> <i class="arg">sequence1 sequence2</i> <span class="opt">?<i class="arg">maxOccurs</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::struct::list</b> <b class="method">lcsInvert</b> <i class="arg">lcsData</i> <i class="arg">len1</i> <i class="arg">len2</i></a></li>
<li><a href="#4"><b class="cmd">::struct::list</b> <b class="method">lcsInvert2</b> <i class="arg">lcs1</i> <i class="arg">lcs2</i> <i class="arg">len1</i> <i class="arg">len2</i></a></li>
<li><a href="#5"><b class="cmd">::struct::list</b> <b class="method">lcsInvertMerge</b> <i class="arg">lcsData</i> <i class="arg">len1</i> <i class="arg">len2</i></a></li>
<li><a href="#6"><b class="cmd">::struct::list</b> <b class="method">lcsInvertMerge2</b> <i class="arg">lcs1</i> <i class="arg">lcs2</i> <i class="arg">len1</i> <i class="arg">len2</i></a></li>
<li><a href="#7"><b class="cmd">::struct::list</b> <b class="method">reverse</b> <i class="arg">sequence</i></a></li>
<li><a href="#8"><b class="cmd">::struct::list</b> <b class="method">shuffle</b> <i class="arg">list</i></a></li>
<li><a href="#9"><b class="cmd">::struct::list</b> <b class="method">assign</b> <i class="arg">sequence</i> <i class="arg">varname</i> <span class="opt">?<i class="arg">varname</i>?</span>...</a></li>
<li><a href="#10"><b class="cmd">::struct::list</b> <b class="method">flatten</b> <span class="opt">?<b class="option">-full</b>?</span> <span class="opt">?<b class="option">--</b>?</span> <i class="arg">sequence</i></a></li>
<li><a href="#11"><b class="cmd">::struct::list</b> <b class="method">map</b> <i class="arg">sequence</i> <i class="arg">cmdprefix</i></a></li>
<li><a href="#12"><b class="cmd">::struct::list</b> <b class="method">mapfor</b> <i class="arg">var</i> <i class="arg">sequence</i> <i class="arg">script</i></a></li>
<li><a href="#13"><b class="cmd">::struct::list</b> <b class="method">filter</b> <i class="arg">sequence</i> <i class="arg">cmdprefix</i></a></li>
<li><a href="#14"><b class="cmd">::struct::list</b> <b class="method">filterfor</b> <i class="arg">var</i> <i class="arg">sequence</i> <i class="arg">expr</i></a></li>
<li><a href="#15"><b class="cmd">::struct::list</b> <b class="method">split</b> <i class="arg">sequence</i> <i class="arg">cmdprefix</i> <span class="opt">?<i class="arg">passVar</i> <i class="arg">failVar</i>?</span></a></li>
<li><a href="#16"><b class="cmd">::struct::list</b> <b class="method">fold</b> <i class="arg">sequence</i> <i class="arg">initialvalue</i> <i class="arg">cmdprefix</i></a></li>
<li><a href="#17"><b class="cmd">::struct::list</b> <b class="method">shift</b> <i class="arg">listvar</i></a></li>
<li><a href="#18"><b class="cmd">::struct::list</b> <b class="method">iota</b> <i class="arg">n</i></a></li>
<li><a href="#19"><b class="cmd">::struct::list</b> <b class="method">equal</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#20"><b class="cmd">::struct::list</b> <b class="method">repeat</b> <i class="arg">size</i> <i class="arg">element1</i> <span class="opt">?<i class="arg">element2</i> <i class="arg">element3</i>...?</span></a></li>
<li><a href="#21"><b class="cmd">::struct::list</b> <b class="method">repeatn</b> <i class="arg">value</i> <i class="arg">size</i>...</a></li>
<li><a href="#22"><b class="cmd">::struct::list</b> <b class="method">dbJoin</b> <span class="opt">?<b class="option">-inner</b>|<b class="option">-left</b>|<b class="option">-right</b>|<b class="option">-full</b>?</span> <span class="opt">?<b class="option">-keys</b> <i class="arg">varname</i>?</span> {<i class="arg">keycol</i> <i class="arg">table</i>}...</a></li>
<li><a href="#23"><b class="cmd">::struct::list</b> <b class="method">dbJoinKeyed</b> <span class="opt">?<b class="option">-inner</b>|<b class="option">-left</b>|<b class="option">-right</b>|<b class="option">-full</b>?</span> <span class="opt">?<b class="option">-keys</b> <i class="arg">varname</i>?</span> <i class="arg">table</i>...</a></li>
<li><a href="#24"><b class="cmd">::struct::list</b> <b class="method">swap</b> <i class="arg">listvar</i> <i class="arg">i</i> <i class="arg">j</i></a></li>
<li><a href="#25"><b class="cmd">::struct::list</b> <b class="method">firstperm</b> <i class="arg">list</i></a></li>
<li><a href="#26"><b class="cmd">::struct::list</b> <b class="method">nextperm</b> <i class="arg">perm</i></a></li>
<li><a href="#27"><b class="cmd">::struct::list</b> <b class="method">permutations</b> <i class="arg">list</i></a></li>
<li><a href="#28"><b class="cmd">::struct::list</b> <b class="method">foreachperm</b> <i class="arg">var</i> <i class="arg">list</i> <i class="arg">body</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">::struct::list</b> namespace contains several useful commands
for processing Tcl lists. Generally speaking, they implement
algorithms more complex or specialized than the ones provided by Tcl
itself.</p>
<p>It exports only a single command, <b class="cmd">struct::list</b>. All
functionality provided here can be reached through a subcommand of
this command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::struct::list</b> <b class="method">longestCommonSubsequence</b> <i class="arg">sequence1</i> <i class="arg">sequence2</i> <span class="opt">?<i class="arg">maxOccurs</i>?</span></a></dt>
<dd><p>Returns the longest common subsequence of elements in the two lists
<i class="arg">sequence1</i> and <i class="arg">sequence2</i>. If the <i class="arg">maxOccurs</i> parameter
is provided, the common subsequence is restricted to elements that
occur no more than <i class="arg">maxOccurs</i> times in <i class="arg">sequence2</i>.</p>
<p>The return value is a list of two lists of equal length. The first
sublist is of indices into <i class="arg">sequence1</i>, and the second sublist is
of indices into <i class="arg">sequence2</i>.  Each corresponding pair of indices
corresponds to equal elements in the sequences; the sequence returned
is the longest possible.</p></dd>
<dt><a name="2"><b class="cmd">::struct::list</b> <b class="method">longestCommonSubsequence2</b> <i class="arg">sequence1 sequence2</i> <span class="opt">?<i class="arg">maxOccurs</i>?</span></a></dt>
<dd><p>Returns an approximation to the longest common sequence of elements in
the two lists <i class="arg">sequence1</i> and <i class="arg">sequence2</i>.
If the <i class="arg">maxOccurs</i> parameter is omitted, the subsequence computed
is exactly the longest common subsequence; otherwise, the longest
common subsequence is approximated by first determining the longest
common sequence of only those elements that occur no more than
<i class="arg">maxOccurs</i> times in <i class="arg">sequence2</i>, and then using that result
to align the two lists, determining the longest common subsequences of
the sublists between the two elements.</p>
<p>As with <b class="method">longestCommonSubsequence</b>, the return value is a list
of two lists of equal length.  The first sublist is of indices into
<i class="arg">sequence1</i>, and the second sublist is of indices into
<i class="arg">sequence2</i>.  Each corresponding pair of indices corresponds to
equal elements in the sequences.  The sequence approximates the
longest common subsequence.</p></dd>
<dt><a name="3"><b class="cmd">::struct::list</b> <b class="method">lcsInvert</b> <i class="arg">lcsData</i> <i class="arg">len1</i> <i class="arg">len2</i></a></dt>
<dd><p>This command takes a description of a longest common subsequence
(<i class="arg">lcsData</i>), inverts it, and returns the result. Inversion means
here that as the input describes which parts of the two sequences are
identical the output describes the differences instead.</p>
<p>To be fully defined the lengths of the two sequences have to be known
and are specified through <i class="arg">len1</i> and <i class="arg">len2</i>.</p>
<p>The result is a list where each element describes one chunk of the
differences between the two sequences. This description is a list
containing three elements, a type and two pairs of indices into
<i class="arg">sequence1</i> and <i class="arg">sequence2</i> respectively, in this order.
The type can be one of three values:</p>
<dl class="doctools_definitions">
<dt><b class="const">added</b></dt>
<dd><p>Describes an addition. I.e. items which are missing in <i class="arg">sequence1</i>
can be found in <i class="arg">sequence2</i>.
The pair of indices into <i class="arg">sequence1</i> describes where the added
range had been expected to be in <i class="arg">sequence1</i>. The first index
refers to the item just before the added range, and the second index
refers to the item just after the added range.
The pair of indices into <i class="arg">sequence2</i> describes the range of items
which has been added to it. The first index refers to the first item
in the range, and the second index refers to the last item in the
range.</p></dd>
<dt><b class="const">deleted</b></dt>
<dd><p>Describes a deletion. I.e. items which are in <i class="arg">sequence1</i> are
missing from <i class="arg">sequence2</i>.
The pair of indices into <i class="arg">sequence1</i> describes the range of items
which has been deleted. The first index refers to the first item in
the range, and the second index refers to the last item in the range.
The pair of indices into <i class="arg">sequence2</i> describes where the deleted
range had been expected to be in <i class="arg">sequence2</i>. The first index
refers to the item just before the deleted range, and the second index
refers to the item just after the deleted range.</p></dd>
<dt><b class="const">changed</b></dt>
<dd><p>Describes a general change. I.e a range of items in <i class="arg">sequence1</i>
has been replaced by a different range of items in <i class="arg">sequence2</i>.
The pair of indices into <i class="arg">sequence1</i> describes the range of items
which has been replaced. The first index refers to the first item in
the range, and the second index refers to the last item in the range.
The pair of indices into <i class="arg">sequence2</i> describes the range of items
replacing the original range. Again the first index refers to the
first item in the range, and the second index refers to the last item
in the range.</p></dd>
</dl>
<pre class="doctools_example">
    sequence 1 = {a b r a c a d a b r a}
    lcs 1      =   {1 2   4 5     8 9 10}
    lcs 2      =   {0 1   3 4     5 6 7}
    sequence 2 =   {b r i c a     b r a c}
    Inversion  = {{deleted  {0  0} {-1 0}}
                  {changed  {3  3}  {2 2}}
                  {deleted  {6  7}  {4 5}}
                  {added   {10 11}  {8 8}}}
</pre>
<p><em>Notes:</em></p>
<ul class="doctools_itemized">
<li><p>An index of <b class="const">-1</b> in a <i class="term">deleted</i> chunk refers to just before
the first element of the second sequence.</p></li>
<li><p>Also an index equal to the length of the first sequence in an
<i class="term">added</i> chunk refers to just behind the end of the sequence.</p></li>
</ul></dd>
<dt><a name="4"><b class="cmd">::struct::list</b> <b class="method">lcsInvert2</b> <i class="arg">lcs1</i> <i class="arg">lcs2</i> <i class="arg">len1</i> <i class="arg">len2</i></a></dt>
<dd><p>Similar to <b class="method">lcsInvert</b>. Instead of directly taking the result
of a call to <b class="method">longestCommonSubsequence</b> this subcommand expects
the indices for the two sequences in two separate lists.</p></dd>
<dt><a name="5"><b class="cmd">::struct::list</b> <b class="method">lcsInvertMerge</b> <i class="arg">lcsData</i> <i class="arg">len1</i> <i class="arg">len2</i></a></dt>
<dd><p>Similar to <b class="method">lcsInvert</b>. It returns essentially the same
structure as that command, except that it may contain chunks of type
<b class="const">unchanged</b> too.</p>
<p>These new chunks describe the parts which are unchanged between the
two sequences. This means that the result of this command describes
both the changed and unchanged parts of the two sequences in one
structure.</p>
<pre class="doctools_example">
    sequence 1 = {a b r a c a d a b r a}
    lcs 1      =   {1 2   4 5     8 9 10}
    lcs 2      =   {0 1   3 4     5 6 7}
    sequence 2 =   {b r i c a     b r a c}
    Inversion/Merge  = {{deleted   {0  0} {-1 0}}
                        {unchanged {1  2}  {0 1}}
                        {changed   {3  3}  {2 2}}
                        {unchanged {4  5}  {3 4}}
                        {deleted   {6  7}  {4 5}}
                        {unchanged {8 10}  {5 7}}
                        {added    {10 11}  {8 8}}}
</pre>
</dd>
<dt><a name="6"><b class="cmd">::struct::list</b> <b class="method">lcsInvertMerge2</b> <i class="arg">lcs1</i> <i class="arg">lcs2</i> <i class="arg">len1</i> <i class="arg">len2</i></a></dt>
<dd><p>Similar to <b class="method">lcsInvertMerge</b>. Instead of directly taking the
result of a call to <b class="method">longestCommonSubsequence</b> this subcommand
expects the indices for the two sequences in two separate lists.</p></dd>
<dt><a name="7"><b class="cmd">::struct::list</b> <b class="method">reverse</b> <i class="arg">sequence</i></a></dt>
<dd><p>The subcommand takes a single <i class="arg">sequence</i> as argument and returns a new
sequence containing the elements of the input sequence in reverse
order.</p></dd>
<dt><a name="8"><b class="cmd">::struct::list</b> <b class="method">shuffle</b> <i class="arg">list</i></a></dt>
<dd><p>The subcommand takes a <i class="arg">list</i> and returns a copy of that list
with the elements it contains in random order. Every possible
ordering of elements is equally likely to be generated. The
Fisher-Yates shuffling algorithm is used internally.</p></dd>
<dt><a name="9"><b class="cmd">::struct::list</b> <b class="method">assign</b> <i class="arg">sequence</i> <i class="arg">varname</i> <span class="opt">?<i class="arg">varname</i>?</span>...</a></dt>
<dd><p>The subcommand assigns the first <b class="variable">n</b> elements of the input
<i class="arg">sequence</i> to the one or more variables whose names were listed
after the sequence, where <b class="variable">n</b> is the number of specified
variables.</p>
<p>If there are more variables specified than there are elements in the
<i class="arg">sequence</i> the empty string will be assigned to the superfluous
variables.</p>
<p>If there are more elements in the <i class="arg">sequence</i> than variable names
specified the subcommand returns a list containing the unassigned
elements. Else an empty list is returned.</p>
<pre class="doctools_example">
    tclsh&gt; ::struct::list assign {a b c d e} foo bar
    c d e
    tclsh&gt; set foo
    a
    tclsh&gt; set bar
    b
</pre>
</dd>
<dt><a name="10"><b class="cmd">::struct::list</b> <b class="method">flatten</b> <span class="opt">?<b class="option">-full</b>?</span> <span class="opt">?<b class="option">--</b>?</span> <i class="arg">sequence</i></a></dt>
<dd><p>The subcommand takes a single <i class="arg">sequence</i> and returns a new
sequence where one level of nesting was removed from the input
sequence. In other words, the sublists in the input sequence are
replaced by their elements.</p>
<p>The subcommand will remove any nesting it finds if the option
<b class="option">-full</b> is specified.</p>
<pre class="doctools_example">
    tclsh&gt; ::struct::list flatten {1 2 3 {4 5} {6 7} {{8 9}} 10}
    1 2 3 4 5 6 7 {8 9} 10
    tclsh&gt; ::struct::list flatten -full {1 2 3 {4 5} {6 7} {{8 9}} 10}
    1 2 3 4 5 6 7 8 9 10
</pre>
</dd>
<dt><a name="11"><b class="cmd">::struct::list</b> <b class="method">map</b> <i class="arg">sequence</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>The subcommand takes a <i class="arg">sequence</i> to operate on and a command
prefix (<i class="arg">cmdprefix</i>) specifying an operation, applies the command
prefix to each element of the sequence and returns a sequence
consisting of the results of that application.</p>
<p>The command prefix will be evaluated with a single word appended to
it. The evaluation takes place in the context of the caller of the
subcommand.</p>
<pre class="doctools_example">
    tclsh&gt; # squaring all elements in a list
    tclsh&gt; proc sqr {x} {expr {$x*$x}}
    tclsh&gt; ::struct::list map {1 2 3 4 5} sqr
    1 4 9 16 25
    tclsh&gt; # Retrieving the second column from a matrix
    tclsh&gt; # given as list of lists.
    tclsh&gt; proc projection {n list} {::lindex $list $n}
    tclsh&gt; ::struct::list map {{a b c} {1 2 3} {d f g}} {projection 1}
    b 2 f
</pre>
</dd>
<dt><a name="12"><b class="cmd">::struct::list</b> <b class="method">mapfor</b> <i class="arg">var</i> <i class="arg">sequence</i> <i class="arg">script</i></a></dt>
<dd><p>The subcommand takes a <i class="arg">sequence</i> to operate on and a tcl <i class="arg">script</i>,
applies the script to each element of the sequence and returns a sequence
consisting of the results of that application.</p>
<p>The script will be evaluated as is, and has access to the current list element
through the specified iteration variable <i class="arg">var</i>. The evaluation takes place
in the context of the caller of the subcommand.</p>
<pre class="doctools_example">
    tclsh&gt; # squaring all elements in a list
    tclsh&gt; ::struct::list mapfor x {1 2 3 4 5} {
	expr {$x * $x}
    }
    1 4 9 16 25
    tclsh&gt; # Retrieving the second column from a matrix
    tclsh&gt; # given as list of lists.
    tclsh&gt; ::struct::list mapfor x {{a b c} {1 2 3} {d f g}} {
	lindex $x 1
    }
    b 2 f
</pre>
</dd>
<dt><a name="13"><b class="cmd">::struct::list</b> <b class="method">filter</b> <i class="arg">sequence</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>The subcommand takes a <i class="arg">sequence</i> to operate on and a command
prefix (<i class="arg">cmdprefix</i>) specifying an operation, applies the command
prefix to each element of the sequence and returns a sequence
consisting of all elements of the <i class="arg">sequence</i> for which the command
prefix returned <b class="const">true</b>.
In other words, this command filters out all elements of the input
<i class="arg">sequence</i> which fail the test the <i class="arg">cmdprefix</i> represents, and
returns the remaining elements.</p>
<p>The command prefix will be evaluated with a single word appended to
it. The evaluation takes place in the context of the caller of the
subcommand.</p>
<pre class="doctools_example">
    tclsh&gt; # removing all odd numbers from the input
    tclsh&gt; proc even {x} {expr {($x % 2) == 0}}
    tclsh&gt; ::struct::list filter {1 2 3 4 5} even
    2 4
</pre>
<p><em>Note:</em> The <b class="method">filter</b> is a specialized application of
<b class="method">fold</b> where the result is extended with the current item or
not, depending o nthe result of the test.</p></dd>
<dt><a name="14"><b class="cmd">::struct::list</b> <b class="method">filterfor</b> <i class="arg">var</i> <i class="arg">sequence</i> <i class="arg">expr</i></a></dt>
<dd><p>The subcommand takes a <i class="arg">sequence</i> to operate on and a tcl expression
(<i class="arg">expr</i>) specifying a condition, applies the conditionto each element
of the sequence and returns a sequence consisting of all elements of the
<i class="arg">sequence</i> for which the expression returned <b class="const">true</b>.
In other words, this command filters out all elements of the input
<i class="arg">sequence</i> which fail the test the condition <i class="arg">expr</i> represents, and
returns the remaining elements.</p>
<p>The expression will be evaluated as is, and has access to the current list
element through the specified iteration variable <i class="arg">var</i>. The evaluation
takes place in the context of the caller of the subcommand.</p>
<pre class="doctools_example">
    tclsh&gt; # removing all odd numbers from the input
    tclsh&gt; ::struct::list filterfor x {1 2 3 4 5} {($x % 2) == 0}
    2 4
</pre>
</dd>
<dt><a name="15"><b class="cmd">::struct::list</b> <b class="method">split</b> <i class="arg">sequence</i> <i class="arg">cmdprefix</i> <span class="opt">?<i class="arg">passVar</i> <i class="arg">failVar</i>?</span></a></dt>
<dd><p>This is a variant of method <b class="method">filter</b>, see above. Instead of
returning just the elements passing the test we get lists of both
passing and failing elements.</p>
<p>If no variable names are specified then the result of the command will
be a list containing the list of passing elements, and the list of
failing elements, in this order. Otherwise the lists of passing and
failing elements are stored into the two specified variables, and the
result will be a list containing two numbers, the number of elements
passing the test, and the number of elements failing, in this order.</p>
<p>The interface to the test is the same as used by <b class="method">filter</b>.</p></dd>
<dt><a name="16"><b class="cmd">::struct::list</b> <b class="method">fold</b> <i class="arg">sequence</i> <i class="arg">initialvalue</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>The subcommand takes a <i class="arg">sequence</i> to operate on, an arbitrary
string <i class="arg">initial value</i> and a command prefix (<i class="arg">cmdprefix</i>)
specifying an operation.</p>
<p>The command prefix will be evaluated with two words appended to
it. The second of these words will always be an element of the
sequence. The evaluation takes place in the context of the caller of
the subcommand.</p>
<p>It then reduces the sequence into a single value through repeated
application of the command prefix and returns that value. This
reduction is done by</p>
<dl class="doctools_definitions">
<dt><b class="const">1</b></dt>
<dd><p>Application of the command to the initial value and the first element
of the list.</p></dd>
<dt><b class="const">2</b></dt>
<dd><p>Application of the command to the result of the last call and the
second element of the list.</p></dd>
<dt><b class="const">...</b></dt>
<dd></dd>
<dt><b class="const">i</b></dt>
<dd><p>Application of the command to the result of the last call and the
<b class="variable">i</b>'th element of the list.</p></dd>
<dt><b class="const">...</b></dt>
<dd></dd>
<dt><b class="const">end</b></dt>
<dd><p>Application of the command to the result of the last call and the last
element of the list. The result of this call is returned as the result
of the subcommand.</p></dd>
</dl>
<pre class="doctools_example">
    tclsh&gt; # summing the elements in a list.
    tclsh&gt; proc + {a b} {expr {$a + $b}}
    tclsh&gt; ::struct::list fold {1 2 3 4 5} 0 +
    15
</pre>
</dd>
<dt><a name="17"><b class="cmd">::struct::list</b> <b class="method">shift</b> <i class="arg">listvar</i></a></dt>
<dd><p>The subcommand takes the list contained in the variable named by
<i class="arg">listvar</i> and shifts it down one element.
After the call <i class="arg">listvar</i> will contain a list containing the second
to last elements of the input list. The first element of the ist is
returned as the result of the command. Shifting the empty list does
nothing.</p></dd>
<dt><a name="18"><b class="cmd">::struct::list</b> <b class="method">iota</b> <i class="arg">n</i></a></dt>
<dd><p>The subcommand returns a list containing the integer numbers
in the range <b class="const">[0,n)</b>. The element at index <b class="variable">i</b>
of the list contain the number <b class="const">i</b>.</p>
<p>For &quot;<i class="arg">n</i> == <b class="const">0</b>&quot; an empty list will be returned.</p></dd>
<dt><a name="19"><b class="cmd">::struct::list</b> <b class="method">equal</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>The subcommand compares the two lists <i class="arg">a</i> and <i class="arg">b</i> for
equality. In other words, they have to be of the same length and have
to contain the same elements in the same order. If an element is a
list the same definition of equality applies recursively.</p>
<p>A boolean value will be returned as the result of the command.
This value will be <b class="const">true</b> if the two lists are equal, and
<b class="const">false</b> else.</p></dd>
<dt><a name="20"><b class="cmd">::struct::list</b> <b class="method">repeat</b> <i class="arg">size</i> <i class="arg">element1</i> <span class="opt">?<i class="arg">element2</i> <i class="arg">element3</i>...?</span></a></dt>
<dd><p>The subcommand creates a list of length
&quot;<i class="arg">size</i> * <em>number of elements</em>&quot; by repeating <i class="arg">size</i>
times the sequence of elements
<i class="arg">element1</i> <i class="arg">element2</i> <i class="arg">...</i>.
<i class="arg">size</i> must be a positive integer, <i class="arg">element</i><b class="variable">n</b> can be any
Tcl value.
Note that <b class="cmd">repeat 1 arg ...</b>  is identical to
<b class="cmd">list arg ...</b>, though the <i class="arg">arg</i> is required
with <b class="method">repeat</b>.</p>
<p><em>Examples:</em></p>
<pre class="doctools_example">
    tclsh&gt; ::struct::list repeat 3 a
    a a a
    tclsh&gt; ::struct::list repeat 3 [::struct::list repeat 3 0]
    {0 0 0} {0 0 0} {0 0 0}
    tclsh&gt; ::struct::list repeat 3 a b c
    a b c a b c a b c
    tclsh&gt; ::struct::list repeat 3 [::struct::list repeat 2 a] b c
    {a a} b c {a a} b c {a a} b c
</pre>
</dd>
<dt><a name="21"><b class="cmd">::struct::list</b> <b class="method">repeatn</b> <i class="arg">value</i> <i class="arg">size</i>...</a></dt>
<dd><p>The subcommand creates a (nested) list containing the <i class="arg">value</i> in
all positions. The exact size and degree of nesting is determined by
the <i class="arg">size</i> arguments, all of which have to be integer numbers
greater than or equal to zero.</p>
<p>A single argument <i class="arg">size</i> which is a list of more than one element
will be treated as if more than argument <i class="arg">size</i> was specified.</p>
<p>If only one argument <i class="arg">size</i> is present the returned list will not
be nested, of length <i class="arg">size</i> and contain <i class="arg">value</i> in all
positions.
If more than one <i class="arg">size</i> argument is present the returned
list will be nested, and of the length specified by the last
<i class="arg">size</i> argument given to it. The elements of that list
are defined as the result of <b class="cmd">Repeat</b> for the same arguments,
but with the last <i class="arg">size</i> value removed.</p>
<p>An empty list will be returned if no <i class="arg">size</i> arguments are present.</p>
<pre class="doctools_example">
    tclsh&gt; ::struct::list repeatn  0 3 4
    {0 0 0} {0 0 0} {0 0 0} {0 0 0}
    tclsh&gt; ::struct::list repeatn  0 {3 4}
    {0 0 0} {0 0 0} {0 0 0} {0 0 0}
    tclsh&gt; ::struct::list repeatn  0 {3 4 5}
    {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}} {{0 0 0} {0 0 0} {0 0 0} {0 0 0}}
</pre>
</dd>
<dt><a name="22"><b class="cmd">::struct::list</b> <b class="method">dbJoin</b> <span class="opt">?<b class="option">-inner</b>|<b class="option">-left</b>|<b class="option">-right</b>|<b class="option">-full</b>?</span> <span class="opt">?<b class="option">-keys</b> <i class="arg">varname</i>?</span> {<i class="arg">keycol</i> <i class="arg">table</i>}...</a></dt>
<dd><p>The method performs a table join according to relational algebra. The
execution of any of the possible outer join operation is triggered by
the presence of either option <b class="option">-left</b>, <b class="option">-right</b>, or
<b class="option">-full</b>. If none of these options is present a regular inner
join will be performed. This can also be triggered by specifying
<b class="option">-inner</b>. The various possible join operations are explained in
detail in section <span class="sectref"><a href="#section4">TABLE JOIN</a></span>.</p>
<p>If the <b class="option">-keys</b> is present its argument is the name of a
variable to store the full list of found keys into. Depending on the
exact nature of the input table and the join mode the output table may
not contain all the keys by default. In such a case the caller can
declare a variable for this information and then insert it into the
output table on its own, as she will have more information about the
placement than this command.</p>
<p>What is left to explain is the format of the arguments.</p>
<p>The <i class="arg">keycol</i> arguments are the indices of the columns in the
tables which contain the key values to use for the joining. Each
argument applies to the table following immediately after it. The
columns are counted from <b class="const">0</b>, which references the first
column. The table associated with the column index has to have at
least <i class="arg">keycol</i>+1 columns. An error will be thrown if there are
less.</p>
<p>The <i class="arg">table</i> arguments represent a table or matrix of rows and
columns of values. We use the same representation as generated and
consumed by the methods <b class="method">get rect</b> and <b class="method">set rect</b> of
<b class="cmd"><a href="../../../../index.html#key51">matrix</a></b> objects. In other words, each argument is a list,
representing the whole matrix.  Its elements are lists too, each
representing a single rows of the matrix. The elements of the
row-lists are the column values.</p>
<p>The table resulting from the join operation is returned as the result
of the command. We use the same representation as described above for
the input <i class="arg">table</i>s.</p></dd>
<dt><a name="23"><b class="cmd">::struct::list</b> <b class="method">dbJoinKeyed</b> <span class="opt">?<b class="option">-inner</b>|<b class="option">-left</b>|<b class="option">-right</b>|<b class="option">-full</b>?</span> <span class="opt">?<b class="option">-keys</b> <i class="arg">varname</i>?</span> <i class="arg">table</i>...</a></dt>
<dd><p>The operations performed by this method are the same as described
above for <b class="method">dbJoin</b>. The only difference is in the specification
of the keys to use. Instead of using column indices separate from the
table here the keys are provided within the table itself. The row
elements in each <i class="arg">table</i> are not the lists of column values, but a
two-element list where the second element is the regular list of
column values and the first element is the key to use.</p></dd>
<dt><a name="24"><b class="cmd">::struct::list</b> <b class="method">swap</b> <i class="arg">listvar</i> <i class="arg">i</i> <i class="arg">j</i></a></dt>
<dd><p>The subcommand exchanges the elements at the indices <i class="arg">i</i> and
<i class="arg">j</i> in the list stored in the variable named by <i class="arg">listvar</i>. The
list is modified in place, and also returned as the result of the
subcommand.</p></dd>
<dt><a name="25"><b class="cmd">::struct::list</b> <b class="method">firstperm</b> <i class="arg">list</i></a></dt>
<dd><p>This subcommand returns the lexicographically first permutation of the
input <i class="arg">list</i>.</p></dd>
<dt><a name="26"><b class="cmd">::struct::list</b> <b class="method">nextperm</b> <i class="arg">perm</i></a></dt>
<dd><p>This subcommand accepts a permutation of a set of elements (provided
by <i class="arg">perm</i>) and returns the next permutatation in lexicographic
sequence.</p>
<p>The algorithm used here is by Donal E. Knuth, see section
<span class="sectref"><a href="#section5">REFERENCES</a></span> for details.</p></dd>
<dt><a name="27"><b class="cmd">::struct::list</b> <b class="method">permutations</b> <i class="arg">list</i></a></dt>
<dd><p>This subcommand returns a list containing all permutations of the
input <i class="arg">list</i> in lexicographic order.</p></dd>
<dt><a name="28"><b class="cmd">::struct::list</b> <b class="method">foreachperm</b> <i class="arg">var</i> <i class="arg">list</i> <i class="arg">body</i></a></dt>
<dd><p>This subcommand executes the script <i class="arg">body</i> once for each
permutation of the specified <i class="arg">list</i>. The permutations are visited
in lexicographic order, and the variable <i class="arg">var</i> is set to the
permutation for which <i class="arg">body</i> is currently executed. The result of
the loop command is the empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LONGEST COMMON SUBSEQUENCE AND FILE COMPARISON</a></h2>
<p>The <b class="method">longestCommonSubsequence</b> subcommand forms the core of a
flexible system for doing differential comparisons of files, similar
to the capability offered by the Unix command <b class="syscmd"><a href="../../../../index.html#key563">diff</a></b>.
While this procedure is quite rapid for many tasks of file comparison,
its performance degrades severely if <i class="arg">sequence2</i> contains many
equal elements (as, for instance, when using this procedure to compare
two files, a quarter of whose lines are blank.  This drawback is
intrinsic to the algorithm used (see the Reference for details).</p>
<p>One approach to dealing with the performance problem that is sometimes
effective in practice is arbitrarily to exclude elements that appear
more than a certain number of times.
This number is provided as the <i class="arg">maxOccurs</i> parameter.  If frequent
lines are excluded in this manner, they will not appear in the common
subsequence that is computed; the result will be the longest common
subsequence of infrequent elements.
The procedure <b class="method">longestCommonSubsequence2</b> implements this
heuristic.
It functions as a wrapper around <b class="method">longestCommonSubsequence</b>; it
computes the longest common subsequence of infrequent elements, and
then subdivides the subsequences that lie between the matches to
approximate the true longest common subsequence.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TABLE JOIN</a></h2>
<p>This is an operation from relational algebra for relational databases.</p>
<p>The easiest way to understand the regular inner join is that it
creates the cartesian product of all the tables involved first and
then keeps only all those rows in the resulting table for which the
values in the specified key columns are equal to each other.</p>
<p>Implementing this description naively, i.e. as described above will
generate a <em>huge</em> intermediate result. To avoid this the
cartesian product and the filtering of row are done at the same
time. What is required is a fast way to determine if a key is present
in a table. In a true database this is done through indices. Here we
use arrays internally.</p>
<p>An <i class="term">outer</i> join is an extension of the inner join for two
tables. There are three variants of outerjoins, called <i class="term">left</i>,
<i class="term">right</i>, and <i class="term">full</i> outer joins. Their result always
contains all rows from an inner join and then some additional rows.</p>
<ol class="doctools_enumerated">
<li><p>For the left outer join the additional rows are all rows from the left
table for which there is no key in the right table. They are joined to
an empty row of the right table to fit them into the result.</p></li>
<li><p>For the right outer join the additional rows are all rows from the right
table for which there is no key in the left table. They are joined to
an empty row of the left table to fit them into the result.</p></li>
<li><p>The full outer join combines both left and right outer join. In other
words, the additional rows are as defined for left outer join, and
right outer join, combined.</p></li>
</ol>
<p>We extend all the joins from two to <b class="variable">n</b> tables (<b class="variable">n</b> &gt; 2) by
executing</p>
<pre class="doctools_example">
    (...((table1 join table2) join table3) ...) join tableN
</pre>
<p>Examples for all the joins:</p>
<pre class="doctools_example">
    Inner Join
    {0 foo}              {0 bagel}    {0 foo   0 bagel}
    {1 snarf} inner join {1 snatz}  = {1 snarf 1 snatz}
    {2 blue}             {3 driver}
    Left Outer Join
    {0 foo}                   {0 bagel}    {0 foo   0 bagel}
    {1 snarf} left outer join {1 snatz}  = {1 snarf 1 snatz}
    {2 blue}                  {3 driver}   {2 blue  {} {}}
    Right Outer Join
    {0 foo}                    {0 bagel}    {0 foo   0 bagel}
    {1 snarf} right outer join {1 snatz}  = {1 snarf 1 snatz}
    {2 blue}                   {3 driver}   {{} {}   3 driver}
    Full Outer Join
    {0 foo}                   {0 bagel}    {0 foo   0 bagel}
    {1 snarf} full outer join {1 snatz}  = {1 snarf 1 snatz}
    {2 blue}                  {3 driver}   {2 blue  {} {}}
                                           {{} {}   3 driver}
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>J. W. Hunt and M. D. McIlroy, &quot;An algorithm for differential
file comparison,&quot; Comp. Sci. Tech. Rep. #41, Bell Telephone
Laboratories (1976). Available on the Web at the second
author's personal site: <a href="http://www.cs.dartmouth.edu/~doug/">http://www.cs.dartmouth.edu/~doug/</a></p></li>
<li><p>Donald E. Knuth, &quot;Fascicle 2b of 'The Art of Computer Programming'
volume 4&quot;. Available on the Web at the author's personal site:
<a href="http://www-cs-faculty.stanford.edu/~knuth/fasc2b.ps.gz">http://www-cs-faculty.stanford.edu/~knuth/fasc2b.ps.gz</a>.</p></li>
</ol>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: list</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key569">Fisher-Yates</a>, <a href="../../../../index.html#key571">assign</a>, <a href="../../../../index.html#key552">common</a>, <a href="../../../../index.html#key554">comparison</a>, <a href="../../../../index.html#key563">diff</a>, <a href="../../../../index.html#key557">differential</a>, <a href="../../../../index.html#key560">equal</a>, <a href="../../../../index.html#key573">equality</a>, <a href="../../../../index.html#key223">filter</a>, <a href="../../../../index.html#key561">first permutation</a>, <a href="../../../../index.html#key558">flatten</a>, <a href="../../../../index.html#key566">folding</a>, <a href="../../../../index.html#key564">full outer join</a>, <a href="../../../../index.html#key572">generate permutations</a>, <a href="../../../../index.html#key568">inner join</a>, <a href="../../../../index.html#key559">join</a>, <a href="../../../../index.html#key553">left outer join</a>, <a href="../../../../index.html#key302">list</a>, <a href="../../../../index.html#key551">longest common subsequence</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key576">next permutation</a>, <a href="../../../../index.html#key575">outer join</a>, <a href="../../../../index.html#key550">permutation</a>, <a href="../../../../index.html#key217">reduce</a>, <a href="../../../../index.html#key574">repeating</a>, <a href="../../../../index.html#key281">repetition</a>, <a href="../../../../index.html#key567">reshuffle</a>, <a href="../../../../index.html#key555">reverse</a>, <a href="../../../../index.html#key556">right outer join</a>, <a href="../../../../index.html#key570">shuffle</a>, <a href="../../../../index.html#key565">subsequence</a>, <a href="../../../../index.html#key562">swapping</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2005 by Kevin B. Kenny. All rights reserved<br>
Copyright &copy; 2003-2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/struct_set.html.























































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235

<div class='fossil-doc' data-title='struct::set - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::set(n) 2.2.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::set - Procedures for manipulating sets</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">REFERENCES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.0</b></li>
<li>package require <b class="pkgname">struct::set <span class="opt">?2.2.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::set</b> <b class="method">empty</b> <i class="arg">set</i></a></li>
<li><a href="#2"><b class="cmd">::struct::set</b> <b class="method">size</b> <i class="arg">set</i></a></li>
<li><a href="#3"><b class="cmd">::struct::set</b> <b class="method">contains</b> <i class="arg">set</i> <i class="arg">item</i></a></li>
<li><a href="#4"><b class="cmd">::struct::set</b> <b class="method">union</b> <span class="opt">?<i class="arg">set1</i>...?</span></a></li>
<li><a href="#5"><b class="cmd">::struct::set</b> <b class="method">intersect</b> <span class="opt">?<i class="arg">set1</i>...?</span></a></li>
<li><a href="#6"><b class="cmd">::struct::set</b> <b class="method">difference</b> <i class="arg">set1</i> <i class="arg">set2</i></a></li>
<li><a href="#7"><b class="cmd">::struct::set</b> <b class="method">symdiff</b> <i class="arg">set1</i> <i class="arg">set2</i></a></li>
<li><a href="#8"><b class="cmd">::struct::set</b> <b class="method">intersect3</b> <i class="arg">set1</i> <i class="arg">set2</i></a></li>
<li><a href="#9"><b class="cmd">::struct::set</b> <b class="method">equal</b> <i class="arg">set1</i> <i class="arg">set2</i></a></li>
<li><a href="#10"><b class="cmd">::struct::set</b> <b class="method">include</b> <i class="arg">svar</i> <i class="arg">item</i></a></li>
<li><a href="#11"><b class="cmd">::struct::set</b> <b class="method">exclude</b> <i class="arg">svar</i> <i class="arg">item</i></a></li>
<li><a href="#12"><b class="cmd">::struct::set</b> <b class="method">add</b> <i class="arg">svar</i> <i class="arg">set</i></a></li>
<li><a href="#13"><b class="cmd">::struct::set</b> <b class="method">subtract</b> <i class="arg">svar</i> <i class="arg">set</i></a></li>
<li><a href="#14"><b class="cmd">::struct::set</b> <b class="method">subsetof</b> <i class="arg">A</i> <i class="arg">B</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">::struct::set</b> namespace contains several useful commands for
processing finite sets.</p>
<p>It exports only a single command, <b class="cmd">struct::set</b>. All
functionality provided here can be reached through a subcommand of
this command.</p>
<p><em>Note:</em> As of version 2.2 of this package a critcl based C
implementation is available. This implementation however requires Tcl
8.4 to run.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::struct::set</b> <b class="method">empty</b> <i class="arg">set</i></a></dt>
<dd><p>Returns a boolean value indicating if the <i class="arg">set</i> is
empty (<b class="const">true</b>), or not (<b class="const">false</b>).</p></dd>
<dt><a name="2"><b class="cmd">::struct::set</b> <b class="method">size</b> <i class="arg">set</i></a></dt>
<dd><p>Returns an integer number greater than or equal to zero. This is the
number of elements in the <i class="arg">set</i>. In other words, its cardinality.</p></dd>
<dt><a name="3"><b class="cmd">::struct::set</b> <b class="method">contains</b> <i class="arg">set</i> <i class="arg">item</i></a></dt>
<dd><p>Returns a boolean value indicating if the <i class="arg">set</i> contains the
element <i class="arg">item</i> (<b class="const">true</b>), or not (<b class="const">false</b>).</p></dd>
<dt><a name="4"><b class="cmd">::struct::set</b> <b class="method">union</b> <span class="opt">?<i class="arg">set1</i>...?</span></a></dt>
<dd><p>Computes the set containing the union of <i class="arg">set1</i>, <i class="arg">set2</i>,
etc., i.e. &quot;<i class="arg">set1</i> + <i class="arg">set2</i> + ...&quot;, and returns this set
as the result of the command.</p></dd>
<dt><a name="5"><b class="cmd">::struct::set</b> <b class="method">intersect</b> <span class="opt">?<i class="arg">set1</i>...?</span></a></dt>
<dd><p>Computes the set containing the intersection of <i class="arg">set1</i>,
<i class="arg">set2</i>, etc., i.e. &quot;<i class="arg">set1</i> * <i class="arg">set2</i> * ...&quot;, and
returns this set as the result of the command.</p></dd>
<dt><a name="6"><b class="cmd">::struct::set</b> <b class="method">difference</b> <i class="arg">set1</i> <i class="arg">set2</i></a></dt>
<dd><p>Computes the set containing the difference of <i class="arg">set1</i> and
<i class="arg">set2</i>, i.e. (&quot;<i class="arg">set1</i> - <i class="arg">set2</i>&quot;) and returns this
set as the result of the command.</p></dd>
<dt><a name="7"><b class="cmd">::struct::set</b> <b class="method">symdiff</b> <i class="arg">set1</i> <i class="arg">set2</i></a></dt>
<dd><p>Computes the set containing the symmetric difference of <i class="arg">set1</i> and
<i class="arg">set2</i>, i.e. (&quot;(<i class="arg">set1</i> - <i class="arg">set2</i>) + (<i class="arg">set2</i> - <i class="arg">set1</i>)&quot;)
and returns this set as the result of the command.</p></dd>
<dt><a name="8"><b class="cmd">::struct::set</b> <b class="method">intersect3</b> <i class="arg">set1</i> <i class="arg">set2</i></a></dt>
<dd><p>This command is a combination of the methods <b class="method">intersect</b> and
<b class="method">difference</b>.
It returns a three-element list containing &quot;<i class="arg">set1</i>*<i class="arg">set2</i>&quot;,
&quot;<i class="arg">set1</i>-<i class="arg">set2</i>&quot;, and &quot;<i class="arg">set2</i>-<i class="arg">set1</i>&quot;, in this
order. In other words, the intersection of the two parameter sets, and
their differences.</p></dd>
<dt><a name="9"><b class="cmd">::struct::set</b> <b class="method">equal</b> <i class="arg">set1</i> <i class="arg">set2</i></a></dt>
<dd><p>Returns a boolean value indicating if the two sets are equal
(<b class="const">true</b>) or not (<b class="const">false</b>).</p></dd>
<dt><a name="10"><b class="cmd">::struct::set</b> <b class="method">include</b> <i class="arg">svar</i> <i class="arg">item</i></a></dt>
<dd><p>The element <i class="arg">item</i> is added to the set specified by the variable
name in <i class="arg">svar</i>. The return value of the command is empty. This is
the equivalent of <b class="cmd">lappend</b> for sets. If the variable named by
<i class="arg">svar</i> does not exist it will be created.</p></dd>
<dt><a name="11"><b class="cmd">::struct::set</b> <b class="method">exclude</b> <i class="arg">svar</i> <i class="arg">item</i></a></dt>
<dd><p>The element <i class="arg">item</i> is removed from the set specified by the
variable name in <i class="arg">svar</i>. The return value of the command is
empty. This is a near-equivalent of <b class="cmd">lreplace</b> for sets.</p></dd>
<dt><a name="12"><b class="cmd">::struct::set</b> <b class="method">add</b> <i class="arg">svar</i> <i class="arg">set</i></a></dt>
<dd><p>All the element of <i class="arg">set</i> are added to the set specified by the
variable name in <i class="arg">svar</i>. The return value of the command is
empty. This is like the method <b class="method">include</b>, but for the addition
of a whole set. If the variable named by <i class="arg">svar</i> does not exist it
will be created.</p></dd>
<dt><a name="13"><b class="cmd">::struct::set</b> <b class="method">subtract</b> <i class="arg">svar</i> <i class="arg">set</i></a></dt>
<dd><p>All the element of <i class="arg">set</i> are removed from the set specified by the
variable name in <i class="arg">svar</i>. The return value of the command is
empty. This is like the method <b class="method">exclude</b>, but for the removal
of a whole set.</p></dd>
<dt><a name="14"><b class="cmd">::struct::set</b> <b class="method">subsetof</b> <i class="arg">A</i> <i class="arg">B</i></a></dt>
<dd><p>Returns a boolean value indicating if the set <i class="arg">A</i> is a true
subset of or equal to the set <i class="arg">B</i> (<b class="const">true</b>), or not
(<b class="const">false</b>).</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">REFERENCES</a></h2>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: set</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key730">cardinality</a>, <a href="../../../../index.html#key733">difference</a>, <a href="../../../../index.html#key729">emptiness</a>, <a href="../../../../index.html#key731">exclusion</a>, <a href="../../../../index.html#key728">inclusion</a>, <a href="../../../../index.html#key732">intersection</a>, <a href="../../../../index.html#key727">membership</a>, <a href="../../../../index.html#key301">set</a>, <a href="../../../../index.html#key726">symmetric difference</a>, <a href="../../../../index.html#key624">union</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/struct_tree.html.





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690

<div class='fossil-doc' data-title='struct::tree - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::tree(n) 2.1.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::tree - Create and manipulate tree objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Tree CLASS API</a></li>
<li class="doctools_subsection"><a href="#subsection2">Tree OBJECT API</a></li>
<li class="doctools_subsection"><a href="#subsection3">Changes for 2.0</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::tree <span class="opt">?2.1.1?</span></b></li>
<li>package require <b class="pkgname">struct::list <span class="opt">?1.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::tree</b> <span class="opt">?<i class="arg">treeName</i>?</span> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">source</i>?</span></a></li>
<li><a href="#2"><b class="cmd">treeName</b> <b class="method">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::struct::tree::prune</b></a></li>
<li><a href="#4"><i class="arg">treeName</i> <b class="method">=</b> <i class="arg">sourcetree</i></a></li>
<li><a href="#5"><i class="arg">treeName</i> <b class="method">--&gt;</b> <i class="arg">desttree</i></a></li>
<li><a href="#6"><i class="arg">treeName</i> <b class="method">ancestors</b> <i class="arg">node</i></a></li>
<li><a href="#7"><i class="arg">treeName</i> <b class="method">append</b> <i class="arg">node</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#8"><i class="arg">treeName</i> <b class="method">attr</b> <i class="arg">key</i></a></li>
<li><a href="#9"><i class="arg">treeName</i> <b class="method">attr</b> <i class="arg">key</i> <b class="option">-nodes</b> <i class="arg">list</i></a></li>
<li><a href="#10"><i class="arg">treeName</i> <b class="method">attr</b> <i class="arg">key</i> <b class="option">-glob</b> <i class="arg">globpattern</i></a></li>
<li><a href="#11"><i class="arg">treeName</i> <b class="method">attr</b> <i class="arg">key</i> <b class="option">-regexp</b> <i class="arg">repattern</i></a></li>
<li><a href="#12"><i class="arg">treeName</i> <b class="method">children</b> <span class="opt">?<b class="option">-all</b>?</span> <i class="arg">node</i> <span class="opt">?<b class="const">filter</b> <i class="arg">cmdprefix</i>?</span></a></li>
<li><a href="#13"><i class="arg">treeName</i> <b class="method">cut</b> <i class="arg">node</i></a></li>
<li><a href="#14"><i class="arg">treeName</i> <b class="method">delete</b> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i> ...?</span></a></li>
<li><a href="#15"><i class="arg">treeName</i> <b class="method">depth</b> <i class="arg">node</i></a></li>
<li><a href="#16"><i class="arg">treeName</i> <b class="method">descendants</b> <i class="arg">node</i> <span class="opt">?<b class="const">filter</b> <i class="arg">cmdprefix</i>?</span></a></li>
<li><a href="#17"><i class="arg">treeName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></li>
<li><a href="#18"><i class="arg">treeName</i> <b class="method">destroy</b></a></li>
<li><a href="#19"><i class="arg">treeName</i> <b class="method">exists</b> <i class="arg">node</i></a></li>
<li><a href="#20"><i class="arg">treeName</i> <b class="method">get</b> <i class="arg">node</i> <i class="arg">key</i></a></li>
<li><a href="#21"><i class="arg">treeName</i> <b class="method">getall</b> <i class="arg">node</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#22"><i class="arg">treeName</i> <b class="method">keys</b> <i class="arg">node</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#23"><i class="arg">treeName</i> <b class="method">keyexists</b> <i class="arg">node</i> <i class="arg">key</i></a></li>
<li><a href="#24"><i class="arg">treeName</i> <b class="method">index</b> <i class="arg">node</i></a></li>
<li><a href="#25"><i class="arg">treeName</i> <b class="method">insert</b> <i class="arg">parent</i> <i class="arg">index</i> <span class="opt">?<i class="arg">child</i> <span class="opt">?<i class="arg">child</i> ...?</span>?</span></a></li>
<li><a href="#26"><i class="arg">treeName</i> <b class="method">isleaf</b> <i class="arg">node</i></a></li>
<li><a href="#27"><i class="arg">treeName</i> <b class="method">lappend</b> <i class="arg">node</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#28"><i class="arg">treeName</i> <b class="method">leaves</b></a></li>
<li><a href="#29"><i class="arg">treeName</i> <b class="method">move</b> <i class="arg">parent</i> <i class="arg">index</i> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i> ...?</span></a></li>
<li><a href="#30"><i class="arg">treeName</i> <b class="method">next</b> <i class="arg">node</i></a></li>
<li><a href="#31"><i class="arg">treeName</i> <b class="method">numchildren</b> <i class="arg">node</i></a></li>
<li><a href="#32"><i class="arg">treeName</i> <b class="method">nodes</b></a></li>
<li><a href="#33"><i class="arg">treeName</i> <b class="method">parent</b> <i class="arg">node</i></a></li>
<li><a href="#34"><i class="arg">treeName</i> <b class="method">previous</b> <i class="arg">node</i></a></li>
<li><a href="#35"><i class="arg">treeName</i> <b class="method">rename</b> <i class="arg">node</i> <i class="arg">newname</i></a></li>
<li><a href="#36"><i class="arg">treeName</i> <b class="method">rootname</b></a></li>
<li><a href="#37"><i class="arg">treeName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">node</i>?</span></a></li>
<li><a href="#38"><i class="arg">treeName</i> <b class="method">set</b> <i class="arg">node</i> <i class="arg">key</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#39"><i class="arg">treeName</i> <b class="method">size</b> <span class="opt">?<i class="arg">node</i>?</span></a></li>
<li><a href="#40"><i class="arg">treeName</i> <b class="method">splice</b> <i class="arg">parent</i> <i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span> <span class="opt">?<i class="arg">child</i>?</span></a></li>
<li><a href="#41"><i class="arg">treeName</i> <b class="method">swap</b> <i class="arg">node1</i> <i class="arg">node2</i></a></li>
<li><a href="#42"><i class="arg">treeName</i> <b class="method">unset</b> <i class="arg">node</i> <i class="arg">key</i></a></li>
<li><a href="#43"><i class="arg">treeName</i> <b class="method">walk</b> <i class="arg">node</i> <span class="opt">?<b class="option">-order</b> <i class="arg">order</i>?</span> <span class="opt">?<b class="option">-type</b> <i class="arg">type</i>?</span> <i class="arg">loopvar</i> <i class="arg">script</i></a></li>
<li><a href="#44"><i class="arg">treeName</i> <b class="method">walkproc</b> <i class="arg">node</i> <span class="opt">?<b class="option">-order</b> <i class="arg">order</i>?</span> <span class="opt">?<b class="option">-type</b> <i class="arg">type</i>?</span> <i class="arg">cmdprefix</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>A tree is a collection of named elements, called nodes, one of which is
distinguished as a root, along with a relation (&quot;parenthood&quot;) that
places a hierarchical structure on the nodes. (Data Structures and
Algorithms; Aho, Hopcroft and Ullman; Addison-Wesley, 1987).  In
addition to maintaining the node relationships, this tree
implementation allows any number of keyed values to be associated with
each node.</p>
<p>The element names can be arbitrary strings.</p>
<p>A tree is thus similar to an array, but with three important
differences:</p>
<ol class="doctools_enumerated">
<li><p>Trees are accessed through an object command, whereas arrays are
accessed as variables. (This means trees cannot be local to a procedure.)</p></li>
<li><p>Trees have a hierarchical structure, whereas an array is just an
unordered collection.</p></li>
<li><p>Each node of a tree has a separate collection of attributes and
values. This is like an array where every value is a dictionary.</p></li>
</ol>
<p><em>Note:</em> The major version of the package <b class="package"><a href="../../../../index.html#key327">struct</a></b> has
been changed to version 2.0, due to backward incompatible changes in
the API of this module. Please read the section
<span class="sectref"><a href="#subsection3">Changes for 2.0</a></span> for a full list of all changes,
incompatible and otherwise.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Tree CLASS API</a></h3>
<p>The main commands of the package are:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::struct::tree</b> <span class="opt">?<i class="arg">treeName</i>?</span> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">source</i>?</span></a></dt>
<dd><p>The command creates a new tree object with an associated global Tcl
command whose name is <i class="arg">treeName</i>. This command may be used to
invoke various operations on the tree.
It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">treeName</b> <b class="method">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>If <i class="arg">treeName</i> is not specified a unique name will be generated by
the package itself. If a <i class="arg">source</i> is specified the new tree will
be initialized to it. For the operators <b class="const">=</b>, <b class="const">:=</b>, and
<b class="const">as</b> <i class="arg">source</i> is interpreted as the name of another tree
object, and the assignment operator <b class="method">=</b> will be executed. For
<b class="const">deserialize</b> the <i class="arg">source</i> is a serialized tree object and
<b class="method">deserialize</b> will be executed.</p>
<p>In other words</p>
<pre class="doctools_example">
    ::struct::tree mytree = b
</pre>
<p>is equivalent to</p>
<pre class="doctools_example">
    ::struct::tree mytree
    mytree = b
</pre>
<p>and</p>
<pre class="doctools_example">
    ::struct::tree mytree deserialize $b
</pre>
<p>is equivalent to</p>
<pre class="doctools_example">
    ::struct::tree mytree
    mytree deserialize $b
</pre>
</dd>
<dt><a name="3"><b class="cmd">::struct::tree::prune</b></a></dt>
<dd><p>This command is provided outside of the tree methods, as it is not a
tree method per se. It however interacts tightly with the method
<b class="method">walk</b>. When used in the walk script it causes the traversal to
ignore the children of the node we are currently at.
This command cannot be used with the traversal modes which look at
children before their parent, i.e. <b class="const">post</b> and <b class="const">in</b>. The
only applicable orders of traversal are <b class="const">pre</b> and
<b class="const">both</b>. An error is thrown if the command and chosen order of
traversal do not fit.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Tree OBJECT API</a></h3>
<p>Two general observations beforehand:</p>
<ol class="doctools_enumerated">
<li><p>The root node of the tree can be used in most places where a node is
asked for. The default name of the rootnode is &quot;root&quot;, but this can be
changed with the method <b class="method">rename</b> (see below). Whatever the
current name for the root node of the tree is, it can be retrieved by
calling the method <b class="method">rootname</b>.</p></li>
<li><p>The method <b class="method">insert</b> is the only way to create new nodes, and
they are automatically added to a parent. A tree object cannot have
nodes without a parent, save the root node.</p></li>
</ol>
<p>And now the methods supported by tree objects created by this package:</p>
<dl class="doctools_definitions">
<dt><a name="4"><i class="arg">treeName</i> <b class="method">=</b> <i class="arg">sourcetree</i></a></dt>
<dd><p>This is the assignment operator for tree objects. It copies the tree
contained in the tree object <i class="arg">sourcetree</i> over the tree data in
<i class="arg">treeName</i>. The old contents of <i class="arg">treeName</i> are deleted by this
operation.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">treeName</i> <b class="method">deserialize</b> [<i class="arg">sourcetree</i> <b class="method">serialize</b>]
</pre>
</dd>
<dt><a name="5"><i class="arg">treeName</i> <b class="method">--&gt;</b> <i class="arg">desttree</i></a></dt>
<dd><p>This is the reverse assignment operator for tree objects. It copies the tree
contained in the tree object <i class="arg">treeName</i> over the tree data in the object
<i class="arg">desttree</i>. The old contents of <i class="arg">desttree</i> are deleted by this
operation.</p>
<p>This operation is in effect equivalent to</p>
<pre class="doctools_example">
    <i class="arg">desttree</i> <b class="method">deserialize</b> [<i class="arg">treeName</i> <b class="method">serialize</b>]
</pre>
</dd>
<dt><a name="6"><i class="arg">treeName</i> <b class="method">ancestors</b> <i class="arg">node</i></a></dt>
<dd><p>This method extends the method <b class="method">parent</b> and returns a list
containing all ancestor nodes to the specified <i class="arg">node</i>. The
immediate ancestor, in other words, parent node, is the first element
in that list, its parent the second element, and so on until the root
node is reached, making it the last element of the returned list.</p></dd>
<dt><a name="7"><i class="arg">treeName</i> <b class="method">append</b> <i class="arg">node</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> to one of the keyed values associated with an
node. Returns the new value given to the attribute <i class="arg">key</i>.</p></dd>
<dt><a name="8"><i class="arg">treeName</i> <b class="method">attr</b> <i class="arg">key</i></a></dt>
<dd></dd>
<dt><a name="9"><i class="arg">treeName</i> <b class="method">attr</b> <i class="arg">key</i> <b class="option">-nodes</b> <i class="arg">list</i></a></dt>
<dd></dd>
<dt><a name="10"><i class="arg">treeName</i> <b class="method">attr</b> <i class="arg">key</i> <b class="option">-glob</b> <i class="arg">globpattern</i></a></dt>
<dd></dd>
<dt><a name="11"><i class="arg">treeName</i> <b class="method">attr</b> <i class="arg">key</i> <b class="option">-regexp</b> <i class="arg">repattern</i></a></dt>
<dd><p>This method retrieves the value of the attribute named <i class="arg">key</i>, for
all nodes in the tree (matching the restriction specified via one of
the possible options) and having the specified attribute.</p>
<p>The result is a dictionary mapping from node names to the value of
attribute <i class="arg">key</i> at that node.
Nodes not having the attribute <i class="arg">key</i>, or not passing a
specified restriction, are not listed in the result.</p>
<p>The possible restrictions are:</p>
<dl class="doctools_options">
<dt><b class="option">-nodes</b></dt>
<dd><p>The value is a list of nodes. Only the nodes mentioned in this list
are searched for the attribute.</p></dd>
<dt><b class="option">-glob</b></dt>
<dd><p>The value is a glob pattern. Only the nodes in the tree whose names
match this pattern are searched for the attribute.</p></dd>
<dt><b class="option">-regexp</b></dt>
<dd><p>The value is a regular expression. Only the nodes in the tree whose
names match this pattern are searched for the attribute.</p></dd>
</dl></dd>
<dt><a name="12"><i class="arg">treeName</i> <b class="method">children</b> <span class="opt">?<b class="option">-all</b>?</span> <i class="arg">node</i> <span class="opt">?<b class="const">filter</b> <i class="arg">cmdprefix</i>?</span></a></dt>
<dd><p>Return a list of the children of <i class="arg">node</i>.
If the option <b class="option">-all</b> is specified, then not only the direct
children, but their children, and so on are returned in the result.
If a filter command is specified only those nodes are listed in the
final result which pass the test. The command in <i class="arg">cmdprefix</i> is
called with two arguments, the name of the tree object, and the name
of the node in question. It is executed in the context of the caller
and has to return a boolean value. Nodes for which the command returns
<b class="const">false</b> are removed from the result list before it is returned
to the caller.</p>
<p>Some examples:</p>
<pre class="doctools_example">
    mytree insert root end 0 ; mytree set 0 volume 30
    mytree insert root end 1
    mytree insert root end 2
    mytree insert 0    end 3
    mytree insert 0    end 4
    mytree insert 4    end 5 ; mytree set 5 volume 50
    mytree insert 4    end 6
    proc vol {t n} {
	$t keyexists $n volume
    }
    proc vgt40 {t n} {
	if {![$t keyexists $n volume]} {return 0}
	expr {[$t get $n volume] &gt; 40}
    }
    tclsh&gt; lsort [mytree children -all root filter vol]
    0 5
    tclsh&gt; lsort [mytree children -all root filter vgt40]
    5
    tclsh&gt; lsort [mytree children root filter vol]
    0
    tclsh&gt; puts ([lsort [mytree children root filter vgt40]])
    ()
</pre>
</dd>
<dt><a name="13"><i class="arg">treeName</i> <b class="method">cut</b> <i class="arg">node</i></a></dt>
<dd><p>Removes the node specified by <i class="arg">node</i> from the tree, but not its
children.  The children of <i class="arg">node</i> are made children of the parent
of the <i class="arg">node</i>, at the index at which <i class="arg">node</i> was located.</p></dd>
<dt><a name="14"><i class="arg">treeName</i> <b class="method">delete</b> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i> ...?</span></a></dt>
<dd><p>Removes the specified nodes from the tree.  All of the nodes' children
will be removed as well to prevent orphaned nodes.</p></dd>
<dt><a name="15"><i class="arg">treeName</i> <b class="method">depth</b> <i class="arg">node</i></a></dt>
<dd><p>Return the number of steps from node <i class="arg">node</i> to the root node.</p></dd>
<dt><a name="16"><i class="arg">treeName</i> <b class="method">descendants</b> <i class="arg">node</i> <span class="opt">?<b class="const">filter</b> <i class="arg">cmdprefix</i>?</span></a></dt>
<dd><p>This method extends the method <b class="method">children</b> and returns a list
containing all nodes descending from <i class="arg">node</i>, and passing the
filter, if such was specified.</p>
<p>This is actually the same as
&quot;<i class="arg">treeName</i> <b class="method">children</b> <b class="option">-all</b>&quot;.
<b class="method">descendants</b> should be prefered, and &quot;children -all&quot;
will be deprecated sometime in the future.</p></dd>
<dt><a name="17"><i class="arg">treeName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></dt>
<dd><p>This is the complement to <b class="method">serialize</b>. It replaces tree data in
<i class="arg">treeName</i> with the tree described by the <i class="arg">serialization</i>
value. The old contents of <i class="arg">treeName</i> are deleted by this
operation.</p></dd>
<dt><a name="18"><i class="arg">treeName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroy the tree, including its storage space and associated command.</p></dd>
<dt><a name="19"><i class="arg">treeName</i> <b class="method">exists</b> <i class="arg">node</i></a></dt>
<dd><p>Returns true if the specified node exists in the tree.</p></dd>
<dt><a name="20"><i class="arg">treeName</i> <b class="method">get</b> <i class="arg">node</i> <i class="arg">key</i></a></dt>
<dd><p>Returns the value associated with the key <i class="arg">key</i> for the node
<i class="arg">node</i>.</p></dd>
<dt><a name="21"><i class="arg">treeName</i> <b class="method">getall</b> <i class="arg">node</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a dictionary (suitable for use with [<b class="cmd">array set</b>])
containing the attribute data for the <i class="arg">node</i>.
If the glob <i class="arg">pattern</i> is specified only the attributes whose names
match the pattern will be part of the dictionary.</p></dd>
<dt><a name="22"><i class="arg">treeName</i> <b class="method">keys</b> <i class="arg">node</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of keys for the <i class="arg">node</i>.
If the <i class="arg">pattern</i> is specified only the attributes whose names
match the pattern will be part of the returned list. The pattern is a
<b class="cmd">glob</b> pattern.</p></dd>
<dt><a name="23"><i class="arg">treeName</i> <b class="method">keyexists</b> <i class="arg">node</i> <i class="arg">key</i></a></dt>
<dd><p>Return true if the specified <i class="arg">key</i> exists for the <i class="arg">node</i>.</p></dd>
<dt><a name="24"><i class="arg">treeName</i> <b class="method">index</b> <i class="arg">node</i></a></dt>
<dd><p>Returns the index of <i class="arg">node</i> in its parent's list of children.  For
example, if a node has <i class="term">nodeFoo</i>, <i class="term">nodeBar</i>, and
<i class="term">nodeBaz</i> as children, in that order, the index of
<i class="term">nodeBar</i> is 1.</p></dd>
<dt><a name="25"><i class="arg">treeName</i> <b class="method">insert</b> <i class="arg">parent</i> <i class="arg">index</i> <span class="opt">?<i class="arg">child</i> <span class="opt">?<i class="arg">child</i> ...?</span>?</span></a></dt>
<dd><p>Insert one or more nodes into the tree as children of the node
<i class="arg">parent</i>. The nodes will be added in the order they are given. If
<i class="arg">parent</i> is <b class="const">root</b>, it refers to the root of the tree. The
new nodes will be added to the <i class="arg">parent</i> node's child list at the
index given by <i class="arg">index</i>. The <i class="arg">index</i> can be <b class="const">end</b> in
which case the new nodes will be added after the current last child.
Indices of the form &quot;end-<b class="variable">n</b>&quot; are accepted as well.</p>
<p>If any of the specified children already exist in <i class="arg">treeName</i>,
those nodes will be moved from their original location to the new
location indicated by this command.</p>
<p>If no <i class="arg">child</i> is specified, a single node will be added, and a
name will be generated for the new node. The generated name is of the
form <em>node</em><b class="variable">x</b>, where <b class="variable">x</b> is a number. If names are
specified they must neither contain whitespace nor colons (&quot;:&quot;).</p>
<p>The return result from this command is a list of nodes added.</p></dd>
<dt><a name="26"><i class="arg">treeName</i> <b class="method">isleaf</b> <i class="arg">node</i></a></dt>
<dd><p>Returns true if <i class="arg">node</i> is a leaf of the tree (if <i class="arg">node</i> has no
children), false otherwise.</p></dd>
<dt><a name="27"><i class="arg">treeName</i> <b class="method">lappend</b> <i class="arg">node</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> (as a list) to one of the keyed values
associated with an <i class="arg">node</i>. Returns the new value given to the
attribute <i class="arg">key</i>.</p></dd>
<dt><a name="28"><i class="arg">treeName</i> <b class="method">leaves</b></a></dt>
<dd><p>Return a list containing all leaf nodes known to the tree.</p></dd>
<dt><a name="29"><i class="arg">treeName</i> <b class="method">move</b> <i class="arg">parent</i> <i class="arg">index</i> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i> ...?</span></a></dt>
<dd><p>Make the specified nodes children of <i class="arg">parent</i>, inserting them into
the parent's child list at the index given by <i class="arg">index</i>. Note that
the command will take all nodes out of the tree before inserting them
under the new parent, and that it determines the position to place
them into after the removal, before the re-insertion. This behaviour
is important when it comes to moving one or more nodes to a different
index without changing their parent node.</p></dd>
<dt><a name="30"><i class="arg">treeName</i> <b class="method">next</b> <i class="arg">node</i></a></dt>
<dd><p>Return the right sibling of <i class="arg">node</i>, or the empty string if
<i class="arg">node</i> was the last child of its parent.</p></dd>
<dt><a name="31"><i class="arg">treeName</i> <b class="method">numchildren</b> <i class="arg">node</i></a></dt>
<dd><p>Return the number of immediate children of <i class="arg">node</i>.</p></dd>
<dt><a name="32"><i class="arg">treeName</i> <b class="method">nodes</b></a></dt>
<dd><p>Return a list containing all nodes known to the tree.</p></dd>
<dt><a name="33"><i class="arg">treeName</i> <b class="method">parent</b> <i class="arg">node</i></a></dt>
<dd><p>Return the parent of <i class="arg">node</i>.</p></dd>
<dt><a name="34"><i class="arg">treeName</i> <b class="method">previous</b> <i class="arg">node</i></a></dt>
<dd><p>Return the left sibling of <i class="arg">node</i>, or the empty string if
<i class="arg">node</i> was the first child of its parent.</p></dd>
<dt><a name="35"><i class="arg">treeName</i> <b class="method">rename</b> <i class="arg">node</i> <i class="arg">newname</i></a></dt>
<dd><p>Renames the node <i class="arg">node</i> to <i class="arg">newname</i>. An error is thrown if
either the node does not exist, or a node with name <i class="arg">newname</i> does
exist. The result of the command is the new name of the node.</p></dd>
<dt><a name="36"><i class="arg">treeName</i> <b class="method">rootname</b></a></dt>
<dd><p>Returns the name of the root node of the tree.</p></dd>
<dt><a name="37"><i class="arg">treeName</i> <b class="method">serialize</b> <span class="opt">?<i class="arg">node</i>?</span></a></dt>
<dd><p>This method serializes the sub-tree starting at <i class="arg">node</i>. In other
words it returns a tcl <em>value</em> completely describing the tree
starting at <i class="arg">node</i>.
This allows, for example, the transfer of tree objects (or parts
thereof) over arbitrary channels, persistence, etc.
This method is also the basis for both the copy constructor and
the assignment operator.</p>
<p>The result of this method has to be semantically identical over all
implementations of the tree interface. This is what will enable us to
copy tree data between different implementations of the same
interface.</p>
<p>The result is a list containing containing a multiple of three
elements. It is like a serialized array except that there are two
values following each key. They are the names of the nodes in the
serialized tree. The two values are a reference to the parent node and
the attribute data, in this order.</p>
<p>The reference to the parent node is the empty string for the root node
of the tree. For all other nodes it is the index of the parent node in
the list. This means that they are integers, greater than or equal to
zero, less than the length of the list, and multiples of three.
The order of the nodes in the list is important insofar as it is used
to reconstruct the lists of children for each node. The children of a
node have to be listed in the serialization in the same order as they
are listed in their parent in the tree.</p>
<p>The attribute data of a node is a dictionary, i.e. a list of even
length containing a serialized array. For a node without attribute
data the dictionary is the empty list.</p>
<p><em>Note:</em> While the current implementation returns the root node as
the first element of the list, followed by its children and their
children in a depth-first traversal this is not necessarily true for
other implementations.
The only information a reader of the serialized data can rely on for
the structure of the tree is that the root node is signaled by the
empty string for the parent reference, that all other nodes refer to
their parent through the index in the list, and that children occur in
the same order as in their parent.</p>
<pre class="doctools_example">
 A possible serialization for the tree structure
             +- d
       +- a -+
 root -+- b  +- e
       +- c
 is
 {root {} {} a 0 {} d 3 {} e 3 {} b 0 {} c 0 {}}
 The above assumes that none of the nodes have attributes.
</pre>
</dd>
<dt><a name="38"><i class="arg">treeName</i> <b class="method">set</b> <i class="arg">node</i> <i class="arg">key</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Set or get one of the keyed values associated with a node. A node may
have any number of keyed values associated with it.  If <i class="arg">value</i> is
not specified, this command returns the current value assigned to the
key; if <i class="arg">value</i> is specified, this command assigns that value to
the key, and returns it.</p></dd>
<dt><a name="39"><i class="arg">treeName</i> <b class="method">size</b> <span class="opt">?<i class="arg">node</i>?</span></a></dt>
<dd><p>Return a count of the number of descendants of the node <i class="arg">node</i>; if
no node is specified, <b class="const">root</b> is assumed.</p></dd>
<dt><a name="40"><i class="arg">treeName</i> <b class="method">splice</b> <i class="arg">parent</i> <i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span> <span class="opt">?<i class="arg">child</i>?</span></a></dt>
<dd><p>Insert a node named <i class="arg">child</i> into the tree as a child of the node
<i class="arg">parent</i>. If <i class="arg">parent</i> is <b class="const">root</b>, it refers to the root
of the tree. The new node will be added to the parent node's child
list at the index given by <i class="arg">from</i>.  The children of <i class="arg">parent</i>
which are in the range of the indices <i class="arg">from</i> and <i class="arg">to</i> are made
children of <i class="arg">child</i>.  If the value of <i class="arg">to</i> is not specified it
defaults to <b class="const">end</b>.  If no name is given for <i class="arg">child</i>, a name
will be generated for the new node.  The generated name is of the form
<em>node</em><b class="variable">x</b>, where <b class="variable">x</b> is a number.  The return result
from this command is the name of the new node.</p>
<p>The arguments <i class="arg">from</i> and <i class="arg">to</i> are regular list indices, i.e.
the form &quot;end-<b class="variable">n</b>&quot; is accepted as well.</p></dd>
<dt><a name="41"><i class="arg">treeName</i> <b class="method">swap</b> <i class="arg">node1</i> <i class="arg">node2</i></a></dt>
<dd><p>Swap the position of <i class="arg">node1</i> and <i class="arg">node2</i> in the tree.</p></dd>
<dt><a name="42"><i class="arg">treeName</i> <b class="method">unset</b> <i class="arg">node</i> <i class="arg">key</i></a></dt>
<dd><p>Removes a keyed value from the node <i class="arg">node</i>. The method will do
nothing if the <i class="arg">key</i> does not exist.</p></dd>
<dt><a name="43"><i class="arg">treeName</i> <b class="method">walk</b> <i class="arg">node</i> <span class="opt">?<b class="option">-order</b> <i class="arg">order</i>?</span> <span class="opt">?<b class="option">-type</b> <i class="arg">type</i>?</span> <i class="arg">loopvar</i> <i class="arg">script</i></a></dt>
<dd><p>Perform a breadth-first or depth-first walk of the tree starting at
the node <i class="arg">node</i>.  The type of walk, breadth-first or depth-first,
is determined by the value of <i class="arg">type</i>; <b class="const">bfs</b> indicates
breadth-first, <b class="const">dfs</b> indicates depth-first.  Depth-first is the
default. The order of the walk, pre-, post-, both- or in-order is
determined by the value of <i class="arg">order</i>; <b class="const">pre</b> indicates
pre-order, <b class="const">post</b> indicates post-order, <b class="const">both</b> indicates
both-order and <b class="const">in</b> indicates in-order. Pre-order is the
default.</p>
<p>Pre-order walking means that a parent node is visited before any of
its children.  For example, a breadth-first search starting from the
root will visit the root, followed by all of the root's children,
followed by all of the root's grandchildren. Post-order walking means
that a parent node is visited after any of its children. Both-order
walking means that a parent node is visited before <em>and</em> after
any of its children. In-order walking means that a parent node is
visited after its first child and before the second. This is a
generalization of in-order walking for binary trees and will do the
right thing if a binary tree is walked. The combination of a breadth-first
walk with in-order is illegal.</p>
<p>As the walk progresses, the <i class="arg">script</i> will be evaluated at each
node. The evaluation takes place in the context of the caller of the
method.
Regarding loop variables, these are listed in <i class="arg">loopvar</i>. If one
only one variable is specified it will be set to the id of the
node. When two variables are specified, i.e. <i class="arg">loopvar</i> is a true
list, then the first variable will be set to the action performed at
the node, and the other to the id of the node itself.
All loop variables are created in the context of the caller.</p>
<p>There are three possible actions: <b class="const">enter</b>, <b class="const">leave</b>,
or <b class="const">visit</b>.  <b class="const">enter</b> actions occur during pre-order
walks; <b class="const">leave</b> actions occur during post-order walks;
<b class="const">visit</b> actions occur during in-order walks.  In a both-order
walk, the command will be evaluated twice for each node; the action is
<b class="const">enter</b> for the first evaluation, and <b class="const">leave</b> for the
second.</p>
<p><em>Note</em>: The <b class="const">enter</b> action for a node is always performed
before the walker will look at the children of that node. This means
that changes made by the <i class="arg">script</i> to the children of the node
will immediately influence the walker and the steps it will take.</p>
<p>Any other manipulation, for example of nodes higher in the tree (i.e
already visited), or upon leaving will have undefined results. They
may succeed, error out, silently compute the wrong result, or anything
in between.</p>
<p>At last a small table showing the relationship between the various
options and the possible actions.</p>
<pre class="doctools_example">
 order       type    actions         notes
 -----       ----    -----           -----
 pre         dfs     enter           parent before children
 post        dfs     leave           parent after children
 in          dfs     visit           parent between first and second child.
 both        dfs     enter, leave    parent before and after children
 -----       ----    -----           -----
 pre         bfs     enter           parent before children
 post        bfs     leave           parent after children
 in          bfs             -- illegal --
 both        bfs     enter, leave    parent before and after children
 -----       ----    -----           -----
</pre>
<p>Note the command <b class="cmd">::struct::tree::prune</b>. This command can be used
in the walk script to force the command to ignore the children of the
node we are currently at. It will throw an error if the order of
traversal is either <b class="const">post</b> or <b class="const">in</b> as these modes visit
the children before their parent, making pruning non-sensical.</p></dd>
<dt><a name="44"><i class="arg">treeName</i> <b class="method">walkproc</b> <i class="arg">node</i> <span class="opt">?<b class="option">-order</b> <i class="arg">order</i>?</span> <span class="opt">?<b class="option">-type</b> <i class="arg">type</i>?</span> <i class="arg">cmdprefix</i></a></dt>
<dd><p>This method is like method <b class="method">walk</b> in all essentials, except the
interface to the user code. This method invokes a command prefix with
three additional arguments (tree, node, and action), instead of
evaluating a script and passing the node via a loop variable.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Changes for 2.0</a></h3>
<p>The following noteworthy changes have occurred:</p>
<ol class="doctools_enumerated">
<li><p>The API for accessing attributes and their values has been
simplified.</p>
<p>All functionality regarding the default attribute &quot;data&quot; has been
removed. This default attribute does not exist anymore. All accesses
to attributes have to specify the name of the attribute in
question. This backward <em>incompatible</em> change allowed us to
simplify the signature of all methods handling attributes.</p>
<p>Especially the flag <b class="option">-key</b> is not required anymore, even more,
its use is now forbidden. Please read the documentation for the
methods <b class="method">set</b>, <b class="method">get</b>, <b class="method">getall</b>, <b class="method">unset</b>,
<b class="method">append</b>, <b class="method">lappend</b>, <b class="method">keyexists</b>
and <b class="method">keys</b> for a description of the new API's.</p></li>
<li><p>The methods <b class="method">keys</b> and <b class="method">getall</b> now take an optional
pattern argument and will return only attribute data for keys matching
this pattern.</p></li>
<li><p>Nodes can now be renamed. See the documentation for the method
<b class="method">rename</b>.</p></li>
<li><p>The structure has been extended with API's for the serialization and
deserialization of tree objects, and a number of operations based on
them (tree assignment, copy construction).</p>
<p>Please read the documentation for the methods <b class="method">serialize</b>,
<b class="method">deserialize</b>, <b class="method">=</b>, and <b class="method">--&gt;</b>, and the
documentation on the construction of tree objects.</p>
<p>Beyond the copying of whole tree objects these new API's also enable
the transfer of tree objects over arbitrary channels and for easy
persistence.</p></li>
<li><p>The walker API has been streamlined and made more similar to the
command <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b>. In detail:</p>
<ul class="doctools_itemized">
<li><p>The superfluous option <b class="option">-command</b> has been removed.</p></li>
<li><p>Ditto for the place holders. Instead of the placeholders two loop
variables have to be specified to contain node and action information.</p></li>
<li><p>The old command argument has been documented as a script now, which it
was in the past too.</p></li>
<li><p>The fact that <b class="const">enter</b> actions are called before the walker looks
at the children of a node has been documented now. In other words it
is now officially allowed to manipulate the list of children for a
node under <em>these</em> circumstances. It has been made clear that
changes under any other circumstances will have undefined results,
from silently computing the wrong result to erroring out.</p></li>
</ul>
</li>
<li><p>A new method, <b class="method">attr</b>, was added allowing the query and
retrieval of attribute data without regard to the node relationship.</p></li>
<li><p>The method <b class="method">children</b> has been extended with the ability to
select from the children of the node based on an arbitrary filtering
criterium. Another extension is the ability to look not only at the
immediate children of the node, but the whole tree below it.</p></li>
</ol>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<p>The following example demonstrates the creation of new nodes:</p>
<pre class="doctools_example">
    mytree insert root end 0   ; # Create node 0, as child of the root
    mytree insert root end 1 2 ; # Ditto nodes 1 &amp; 2
    mytree insert 0    end 3   ; # Now create node 3 as child of node 0
    mytree insert 0    end     ; # Create another child of 0, with a
    #                              generated name. The name is returned
    #                              as the result of the command.
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: tree</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key702">breadth-first</a>, <a href="../../../../index.html#key700">depth-first</a>, <a href="../../../../index.html#key699">in-order</a>, <a href="../../../../index.html#key463">node</a>, <a href="../../../../index.html#key701">post-order</a>, <a href="../../../../index.html#key698">pre-order</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2004,2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/struct/struct_tree1.html.



















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345

<div class='fossil-doc' data-title='struct::tree_v1 - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::tree_v1(n) 1.2.2 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::tree_v1 - Create and manipulate tree objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::tree <span class="opt">?1.2.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">treeName</b> <b class="method">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#2"><i class="arg">treeName</i> <b class="method">append</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></li>
<li><a href="#3"><i class="arg">treeName</i> <b class="method">children</b> <i class="arg">node</i></a></li>
<li><a href="#4"><i class="arg">treeName</i> <b class="method">cut</b> <i class="arg">node</i></a></li>
<li><a href="#5"><i class="arg">treeName</i> <b class="method">delete</b> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i> ...?</span></a></li>
<li><a href="#6"><i class="arg">treeName</i> <b class="method">depth</b> <i class="arg">node</i></a></li>
<li><a href="#7"><i class="arg">treeName</i> <b class="method">destroy</b></a></li>
<li><a href="#8"><i class="arg">treeName</i> <b class="method">exists</b> <i class="arg">node</i></a></li>
<li><a href="#9"><i class="arg">treeName</i> <b class="method">get</b> <i class="arg">node</i> <span class="opt">?<b class="option">-key</b> <i class="arg">key</i>?</span></a></li>
<li><a href="#10"><i class="arg">treeName</i> <b class="method">getall</b> <i class="arg">node</i></a></li>
<li><a href="#11"><i class="arg">treeName</i> <b class="method">keys</b> <i class="arg">node</i></a></li>
<li><a href="#12"><i class="arg">treeName</i> <b class="method">keyexists</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></li>
<li><a href="#13"><i class="arg">treeName</i> <b class="method">index</b> <i class="arg">node</i></a></li>
<li><a href="#14"><i class="arg">treeName</i> <b class="method">insert</b> <i class="arg">parent</i> <i class="arg">index</i> <span class="opt">?<i class="arg">child</i> <span class="opt">?<i class="arg">child</i> ...?</span>?</span></a></li>
<li><a href="#15"><i class="arg">treeName</i> <b class="method">isleaf</b> <i class="arg">node</i></a></li>
<li><a href="#16"><i class="arg">treeName</i> <b class="method">lappend</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></li>
<li><a href="#17"><i class="arg">treeName</i> <b class="method">move</b> <i class="arg">parent</i> <i class="arg">index</i> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i> ...?</span></a></li>
<li><a href="#18"><i class="arg">treeName</i> <b class="method">next</b> <i class="arg">node</i></a></li>
<li><a href="#19"><i class="arg">treeName</i> <b class="method">numchildren</b> <i class="arg">node</i></a></li>
<li><a href="#20"><i class="arg">treeName</i> <b class="method">parent</b> <i class="arg">node</i></a></li>
<li><a href="#21"><i class="arg">treeName</i> <b class="method">previous</b> <i class="arg">node</i></a></li>
<li><a href="#22"><i class="arg">treeName</i> <b class="method">set</b> <i class="arg">node</i> <span class="opt">?<b class="option">-key</b> <i class="arg">key</i>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#23"><i class="arg">treeName</i> <b class="method">size</b> <span class="opt">?<i class="arg">node</i>?</span></a></li>
<li><a href="#24"><i class="arg">treeName</i> <b class="method">splice</b> <i class="arg">parent</i> <i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span> <span class="opt">?<i class="arg">child</i>?</span></a></li>
<li><a href="#25"><i class="arg">treeName</i> <b class="method">swap</b> <i class="arg">node1</i> <i class="arg">node2</i></a></li>
<li><a href="#26"><i class="arg">treeName</i> <b class="method">unset</b> <i class="arg">node</i> <span class="opt">?<b class="option">-key</b> <i class="arg">key</i>?</span></a></li>
<li><a href="#27"><i class="arg">treeName</i> <b class="method">walk</b> <i class="arg">node</i> <span class="opt">?<b class="option">-order</b> <i class="arg">order</i>?</span> <span class="opt">?<b class="option">-type</b> <i class="arg">type</i>?</span> <b class="option">-command</b> <i class="arg">cmd</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">::struct::tree</b> command creates a new tree object with an
associated global Tcl command whose name is <i class="arg">treeName</i>. This
command may be used to invoke various operations on the tree. It has
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">treeName</b> <b class="method">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>A tree is a collection of named elements, called nodes, one of which is
distinguished as a root, along with a relation (&quot;parenthood&quot;) that
places a hierarchical structure on the nodes. (Data Structures and
Algorithms; Aho, Hopcroft and Ullman; Addison-Wesley, 1987).  In
addition to maintaining the node relationships, this tree
implementation allows any number of keyed values to be associated with
each node.</p>
<p>The element names can be arbitrary strings.</p>
<p>A tree is thus similar to an array, but with three important
differences:</p>
<ol class="doctools_enumerated">
<li><p>Trees are accessed through an object command, whereas arrays are
accessed as variables. (This means trees cannot be local to a procedure.)</p></li>
<li><p>Trees have a hierarchical structure, whereas an array is just an
unordered collection.</p></li>
<li><p>Each node of a tree has a separate collection of attributes and
values. This is like an array where every value is a dictionary.</p></li>
</ol>
<p>The following commands are possible for tree objects:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">treeName</i> <b class="method">append</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> to one of the keyed values associated with an
node. If no <i class="arg">key</i> is specified, the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="3"><i class="arg">treeName</i> <b class="method">children</b> <i class="arg">node</i></a></dt>
<dd><p>Return a list of the children of <i class="arg">node</i>.</p></dd>
<dt><a name="4"><i class="arg">treeName</i> <b class="method">cut</b> <i class="arg">node</i></a></dt>
<dd><p>Removes the node specified by <i class="arg">node</i> from the tree, but not its
children.  The children of <i class="arg">node</i> are made children of the parent
of the <i class="arg">node</i>, at the index at which <i class="arg">node</i> was located.</p></dd>
<dt><a name="5"><i class="arg">treeName</i> <b class="method">delete</b> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i> ...?</span></a></dt>
<dd><p>Removes the specified nodes from the tree.  All of the nodes' children
will be removed as well to prevent orphaned nodes.</p></dd>
<dt><a name="6"><i class="arg">treeName</i> <b class="method">depth</b> <i class="arg">node</i></a></dt>
<dd><p>Return the number of steps from node <i class="arg">node</i> to the root node.</p></dd>
<dt><a name="7"><i class="arg">treeName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroy the tree, including its storage space and associated command.</p></dd>
<dt><a name="8"><i class="arg">treeName</i> <b class="method">exists</b> <i class="arg">node</i></a></dt>
<dd><p>Returns true if the specified node exists in the tree.</p></dd>
<dt><a name="9"><i class="arg">treeName</i> <b class="method">get</b> <i class="arg">node</i> <span class="opt">?<b class="option">-key</b> <i class="arg">key</i>?</span></a></dt>
<dd><p>Return the value associated with the key <i class="arg">key</i> for the node
<i class="arg">node</i>. If no key is specified, the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="10"><i class="arg">treeName</i> <b class="method">getall</b> <i class="arg">node</i></a></dt>
<dd><p>Returns a serialized list of key/value pairs (suitable for use with
[<b class="cmd">array set</b>]) for the <i class="arg">node</i>.</p></dd>
<dt><a name="11"><i class="arg">treeName</i> <b class="method">keys</b> <i class="arg">node</i></a></dt>
<dd><p>Returns a list of keys for the <i class="arg">node</i>.</p></dd>
<dt><a name="12"><i class="arg">treeName</i> <b class="method">keyexists</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span></a></dt>
<dd><p>Return true if the specified <i class="arg">key</i> exists for the <i class="arg">node</i>. If
no <i class="arg">key</i> is specified, the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="13"><i class="arg">treeName</i> <b class="method">index</b> <i class="arg">node</i></a></dt>
<dd><p>Returns the index of <i class="arg">node</i> in its parent's list of children.  For
example, if a node has <i class="term">nodeFoo</i>, <i class="term">nodeBar</i>, and
<i class="term">nodeBaz</i> as children, in that order, the index of
<i class="term">nodeBar</i> is 1.</p></dd>
<dt><a name="14"><i class="arg">treeName</i> <b class="method">insert</b> <i class="arg">parent</i> <i class="arg">index</i> <span class="opt">?<i class="arg">child</i> <span class="opt">?<i class="arg">child</i> ...?</span>?</span></a></dt>
<dd><p>Insert one or more nodes into the tree as children of the node
<i class="arg">parent</i>. The nodes will be added in the order they are given. If
<i class="arg">parent</i> is <b class="const">root</b>, it refers to the root of the tree. The
new nodes will be added to the <i class="arg">parent</i> node's child list at the
index given by <i class="arg">index</i>. The <i class="arg">index</i> can be <b class="const">end</b> in
which case the new nodes will be added after the current last child.</p>
<p>If any of the specified children already exist in <i class="arg">treeName</i>,
those nodes will be moved from their original location to the new
location indicated by this command.</p>
<p>If no <i class="arg">child</i> is specified, a single node will be added, and a
name will be generated for the new node. The generated name is of the
form <em>node</em><b class="variable">x</b>, where <b class="variable">x</b> is a number. If names are
specified they must neither contain whitespace nor colons (&quot;:&quot;).</p>
<p>The return result from this command is a list of nodes added.</p></dd>
<dt><a name="15"><i class="arg">treeName</i> <b class="method">isleaf</b> <i class="arg">node</i></a></dt>
<dd><p>Returns true if <i class="arg">node</i> is a leaf of the tree (if <i class="arg">node</i> has no
children), false otherwise.</p></dd>
<dt><a name="16"><i class="arg">treeName</i> <b class="method">lappend</b> <i class="arg">node</i> <span class="opt">?-key <i class="arg">key</i>?</span> <i class="arg">value</i></a></dt>
<dd><p>Appends a <i class="arg">value</i> (as a list) to one of the keyed values
associated with an <i class="arg">node</i>. If no <i class="arg">key</i> is specified, the key
<b class="const">data</b> is assumed.</p></dd>
<dt><a name="17"><i class="arg">treeName</i> <b class="method">move</b> <i class="arg">parent</i> <i class="arg">index</i> <i class="arg">node</i> <span class="opt">?<i class="arg">node</i> ...?</span></a></dt>
<dd><p>Make the specified nodes children of <i class="arg">parent</i>, inserting them into
the parent's child list at the index given by <i class="arg">index</i>. Note that
the command will take all nodes out of the tree before inserting them
under the new parent, and that it determines the position to place
them into after the removal, before the re-insertion. This behaviour
is important when it comes to moving one or more nodes to a different
index without changing their parent node.</p></dd>
<dt><a name="18"><i class="arg">treeName</i> <b class="method">next</b> <i class="arg">node</i></a></dt>
<dd><p>Return the right sibling of <i class="arg">node</i>, or the empty string if
<i class="arg">node</i> was the last child of its parent.</p></dd>
<dt><a name="19"><i class="arg">treeName</i> <b class="method">numchildren</b> <i class="arg">node</i></a></dt>
<dd><p>Return the number of immediate children of <i class="arg">node</i>.</p></dd>
<dt><a name="20"><i class="arg">treeName</i> <b class="method">parent</b> <i class="arg">node</i></a></dt>
<dd><p>Return the parent of <i class="arg">node</i>.</p></dd>
<dt><a name="21"><i class="arg">treeName</i> <b class="method">previous</b> <i class="arg">node</i></a></dt>
<dd><p>Return the left sibling of <i class="arg">node</i>, or the empty string if
<i class="arg">node</i> was the first child of its parent.</p></dd>
<dt><a name="22"><i class="arg">treeName</i> <b class="method">set</b> <i class="arg">node</i> <span class="opt">?<b class="option">-key</b> <i class="arg">key</i>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Set or get one of the keyed values associated with a node. If no key
is specified, the key <b class="const">data</b> is assumed.  Each node that is
added to a tree has the value &quot;&quot; assigned to the key <b class="const">data</b>
automatically.  A node may have any number of keyed values associated
with it.  If <i class="arg">value</i> is not specified, this command returns the
current value assigned to the key; if <i class="arg">value</i> is specified, this
command assigns that value to the key.</p></dd>
<dt><a name="23"><i class="arg">treeName</i> <b class="method">size</b> <span class="opt">?<i class="arg">node</i>?</span></a></dt>
<dd><p>Return a count of the number of descendants of the node <i class="arg">node</i>; if
no node is specified, <b class="const">root</b> is assumed.</p></dd>
<dt><a name="24"><i class="arg">treeName</i> <b class="method">splice</b> <i class="arg">parent</i> <i class="arg">from</i> <span class="opt">?<i class="arg">to</i>?</span> <span class="opt">?<i class="arg">child</i>?</span></a></dt>
<dd><p>Insert a node named <i class="arg">child</i> into the tree as a child of the node
<i class="arg">parent</i>. If <i class="arg">parent</i> is <b class="const">root</b>, it refers to the root
of the tree. The new node will be added to the parent node's child
list at the index given by <i class="arg">from</i>.  The children of <i class="arg">parent</i>
which are in the range of the indices <i class="arg">from</i> and <i class="arg">to</i> are made
children of <i class="arg">child</i>.  If the value of <i class="arg">to</i> is not specified it
defaults to <b class="const">end</b>.  If no name is given for <i class="arg">child</i>, a name
will be generated for the new node.  The generated name is of the form
<em>node</em><b class="variable">x</b>, where <b class="variable">x</b> is a number.  The return result
from this command is the name of the new node.</p></dd>
<dt><a name="25"><i class="arg">treeName</i> <b class="method">swap</b> <i class="arg">node1</i> <i class="arg">node2</i></a></dt>
<dd><p>Swap the position of <i class="arg">node1</i> and <i class="arg">node2</i> in the tree.</p></dd>
<dt><a name="26"><i class="arg">treeName</i> <b class="method">unset</b> <i class="arg">node</i> <span class="opt">?<b class="option">-key</b> <i class="arg">key</i>?</span></a></dt>
<dd><p>Removes a keyed value from the node <i class="arg">node</i>.  If no key is
specified, the key <b class="const">data</b> is assumed.</p></dd>
<dt><a name="27"><i class="arg">treeName</i> <b class="method">walk</b> <i class="arg">node</i> <span class="opt">?<b class="option">-order</b> <i class="arg">order</i>?</span> <span class="opt">?<b class="option">-type</b> <i class="arg">type</i>?</span> <b class="option">-command</b> <i class="arg">cmd</i></a></dt>
<dd><p>Perform a breadth-first or depth-first walk of the tree starting at
the node <i class="arg">node</i>.  The type of walk, breadth-first or depth-first,
is determined by the value of <i class="arg">type</i>; <b class="const">bfs</b> indicates
breadth-first, <b class="const">dfs</b> indicates depth-first.  Depth-first is the
default. The order of the walk, pre-, post-, both- or in-order is
determined by the value of <i class="arg">order</i>; <b class="const">pre</b> indicates
pre-order, <b class="const">post</b> indicates post-order, <b class="const">both</b> indicates
both-order and <b class="const">in</b> indicates in-order. Pre-order is the
default.</p>
<p>Pre-order walking means that a parent node is visited before any of
its children.  For example, a breadth-first search starting from the
root will visit the root, followed by all of the root's children,
followed by all of the root's grandchildren. Post-order walking means
that a parent node is visited after any of its children. Both-order
walking means that a parent node is visited before <em>and</em> after
any of its children. In-order walking means that a parent node is
visited after its first child and before the second. This is a
generalization of in-order walking for binary trees and will do the
right thing if a binary is walked. The combination of a breadth-first
walk with in-order is illegal.</p>
<p>As the walk progresses, the command <i class="arg">cmd</i> will be evaluated at
each node.  Percent substitution will be performed on <i class="arg">cmd</i> before
evaluation, just as in a <b class="cmd"><a href="../../../../index.html#key714">bind</a></b> script.  The following
substitutions are recognized:</p>
<dl class="doctools_definitions">
<dt><b class="const">%%</b></dt>
<dd><p>Insert the literal % character.</p></dd>
<dt><b class="const">%t</b></dt>
<dd><p>Name of the tree object.</p></dd>
<dt><b class="const">%n</b></dt>
<dd><p>Name of the current node.</p></dd>
<dt><b class="const">%a</b></dt>
<dd><p>Name of the action occurring; one of <b class="const">enter</b>, <b class="const">leave</b>,
or <b class="const">visit</b>.  <b class="const">enter</b> actions occur during pre-order
walks; <b class="const">leave</b> actions occur during post-order walks;
<b class="const">visit</b> actions occur during in-order walks.  In a both-order
walk, the command will be evaluated twice for each node; the action is
<b class="const">enter</b> for the first evaluation, and <b class="const">leave</b> for the
second.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: tree</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tar/tar.html.













































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262

<div class='fossil-doc' data-title='tar - Tar file handling'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tar(n) 0.10 tcllib &quot;Tar file handling&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tar - Tar file creation, extraction &amp; manipulation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">tar <span class="opt">?0.10?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tar::contents</b> <i class="arg">tarball</i> <span class="opt">?<b class="option">-chan</b>?</span></a></li>
<li><a href="#2"><b class="cmd">::tar::stat</b> <i class="arg">tarball</i> <span class="opt">?file?</span> <span class="opt">?<b class="option">-chan</b>?</span></a></li>
<li><a href="#3"><b class="cmd">::tar::untar</b> <i class="arg">tarball</i> <i class="arg">args</i></a></li>
<li><a href="#4"><b class="cmd">::tar::get</b> <i class="arg">tarball</i> <i class="arg">fileName</i> <span class="opt">?<b class="option">-chan</b>?</span></a></li>
<li><a href="#5"><b class="cmd">::tar::create</b> <i class="arg">tarball</i> <i class="arg">files</i> <i class="arg">args</i></a></li>
<li><a href="#6"><b class="cmd">::tar::add</b> <i class="arg">tarball</i> <i class="arg">files</i> <i class="arg">args</i></a></li>
<li><a href="#7"><b class="cmd">::tar::remove</b> <i class="arg">tarball</i> <i class="arg">files</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Note: Starting with version 0.8 the tar reader commands
(contents, stats, get, untar) support the GNU LongName extension
(header type 'L') for large paths.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tar::contents</b> <i class="arg">tarball</i> <span class="opt">?<b class="option">-chan</b>?</span></a></dt>
<dd><p>Returns a list of the files contained in <i class="arg">tarball</i>. The order is not sorted and depends on the order
files were stored in the archive.</p>
<p>If the option <b class="option">-chan</b> is present <i class="arg">tarball</i> is interpreted as an open channel.
It is assumed that the channel was opened for reading, and configured for binary input.
The command will <em>not</em> close the channel.</p></dd>
<dt><a name="2"><b class="cmd">::tar::stat</b> <i class="arg">tarball</i> <span class="opt">?file?</span> <span class="opt">?<b class="option">-chan</b>?</span></a></dt>
<dd><p>Returns a nested dict containing information on the named <span class="opt">?file?</span> in <i class="arg">tarball</i>,
or all files if none is specified. The top level are pairs of filename and info. The info is a dict with the keys
&quot;<b class="const">mode</b> <b class="const">uid</b> <b class="const">gid</b> <b class="const">size</b> <b class="const">mtime</b> <b class="const">type</b> <b class="const">linkname</b> <b class="const">uname</b> <b class="const">gname</b>
 <b class="const">devmajor</b> <b class="const">devminor</b>&quot;</p>
<pre class="doctools_example">
% ::tar::stat tarball.tar
foo.jpg {mode 0644 uid 1000 gid 0 size 7580 mtime 811903867 type file linkname {} uname user gname wheel devmajor 0 devminor 0}
</pre>
<p>If the option <b class="option">-chan</b> is present <i class="arg">tarball</i> is interpreted as an open channel.
It is assumed that the channel was opened for reading, and configured for binary input.
The command will <em>not</em> close the channel.</p></dd>
<dt><a name="3"><b class="cmd">::tar::untar</b> <i class="arg">tarball</i> <i class="arg">args</i></a></dt>
<dd><p>Extracts <i class="arg">tarball</i>. <i class="arg">-file</i> and <i class="arg">-glob</i> limit the extraction
to files which exactly match or pattern match the given argument. No error is
thrown if no files match. Returns a list of filenames extracted and the file
size. The size will be null for non regular files. Leading path seperators are
stripped so paths will always be relative.</p>
<dl class="doctools_options">
<dt><b class="option">-dir</b> dirName</dt>
<dd><p>Directory to extract to. Uses <b class="cmd">pwd</b> if none is specified</p></dd>
<dt><b class="option">-file</b> fileName</dt>
<dd><p>Only extract the file with this name. The name is matched against the complete path
stored in the archive including directories.</p></dd>
<dt><b class="option">-glob</b> pattern</dt>
<dd><p>Only extract files patching this glob style pattern. The pattern is matched against the complete path
stored in the archive.</p></dd>
<dt><b class="option">-nooverwrite</b></dt>
<dd><p>Dont overwrite files that already exist</p></dd>
<dt><b class="option">-nomtime</b></dt>
<dd><p>Leave the file modification time as the current time instead of setting it to the value in the archive.</p></dd>
<dt><b class="option">-noperms</b></dt>
<dd><p>In Unix, leave the file permissions as the current umask instead of setting them to the values in the archive.</p></dd>
<dt><b class="option">-chan</b></dt>
<dd><p>If this option is present <i class="arg">tarball</i> is interpreted as an open channel.
It is assumed that the channel was opened for reading, and configured for binary input.
The command will <em>not</em> close the channel.</p></dd>
</dl>
<pre class="doctools_example">
% foreach {file size} [::tar::untar tarball.tar -glob *.jpg] {
puts &quot;Extracted $file ($size bytes)&quot;
}
</pre>
</dd>
<dt><a name="4"><b class="cmd">::tar::get</b> <i class="arg">tarball</i> <i class="arg">fileName</i> <span class="opt">?<b class="option">-chan</b>?</span></a></dt>
<dd><p>Returns the contents of <i class="arg">fileName</i> from the <i class="arg">tarball</i></p>
<pre class="doctools_example">
% set readme [::tar::get tarball.tar doc/README] {
% puts $readme
}
</pre>
<p>If the option <b class="option">-chan</b> is present <i class="arg">tarball</i> is interpreted as an open channel.
It is assumed that the channel was opened for reading, and configured for binary input.
The command will <em>not</em> close the channel.</p></dd>
<dt><a name="5"><b class="cmd">::tar::create</b> <i class="arg">tarball</i> <i class="arg">files</i> <i class="arg">args</i></a></dt>
<dd><p>Creates a new tar file containing the <i class="arg">files</i>. <i class="arg">files</i> must be specified
as a single argument which is a proper list of filenames.</p>
<dl class="doctools_options">
<dt><b class="option">-dereference</b></dt>
<dd><p>Normally <b class="cmd">create</b> will store links as an actual link pointing at a file that may
or may not exist in the archive. Specifying this option will cause the actual file point to
 by the link to be stored instead.</p></dd>
<dt><b class="option">-chan</b></dt>
<dd><p>If this option is present <i class="arg">tarball</i> is interpreted as an open channel.
It is assumed that the channel was opened for writing, and configured for binary output.
The command will <em>not</em> close the channel.</p></dd>
</dl>
<pre class="doctools_example">
% ::tar::create new.tar [glob -nocomplain file*]
% ::tar::contents new.tar
file1 file2 file3
</pre>
</dd>
<dt><a name="6"><b class="cmd">::tar::add</b> <i class="arg">tarball</i> <i class="arg">files</i> <i class="arg">args</i></a></dt>
<dd><p>Appends <i class="arg">files</i> to the end of the existing <i class="arg">tarball</i>. <i class="arg">files</i> must be specified
as a single argument which is a proper list of filenames.</p>
<dl class="doctools_options">
<dt><b class="option">-dereference</b></dt>
<dd><p>Normally <b class="cmd">add</b> will store links as an actual link pointing at a file that may
or may not exist in the archive. Specifying this option will cause the actual file point to
 by the link to be stored instead.</p></dd>
<dt><b class="option">-prefix</b> string</dt>
<dd><p>Normally <b class="cmd">add</b> will store files under exactly the name specified as
argument. Specifying a <span class="opt">?-prefix?</span> causes the <i class="arg">string</i> to be
prepended to every name.</p></dd>
<dt><b class="option">-quick</b></dt>
<dd><p>The only sure way to find the position in the <i class="arg">tarball</i> where new
files can be added is to read it from start, but if <i class="arg">tarball</i> was
written with a &quot;blocksize&quot; of 1 (as this package does) then one can
alternatively find this position by seeking from the end. The
<span class="opt">?-quick?</span> option tells <b class="cmd">add</b> to do the latter.</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::tar::remove</b> <i class="arg">tarball</i> <i class="arg">files</i></a></dt>
<dd><p>Removes <i class="arg">files</i> from the <i class="arg">tarball</i>. No error will result if the file does not exist in the
tarball. Directory write permission and free disk space equivalent to at least the size of the tarball
will be needed.</p>
<pre class="doctools_example">
% ::tar::remove new.tar {file2 file3}
% ::tar::contents new.tar
file3
</pre>
</dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tar</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key736">archive</a>, <a href="../../../../index.html#key735">tape archive</a>, <a href="../../../../index.html#key737">tar</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tepam/tepam_argument_dialogbox.html.





















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
<div class='fossil-doc' data-title='tepam::argument_dialogbox - Tcl's Enhanced Procedure and Argument Manager'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam::argument_dialogbox(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam::argument_dialogbox - TEPAM argument_dialogbox, reference manual</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">ARGUMENT DIALOGBOX CALL</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Context Definition Items</a></li>
<li class="doctools_subsection"><a href="#subsection2">Formatting and Display Options</a></li>
<li class="doctools_subsection"><a href="#subsection3">Global Custom Data Validation</a></li>
<li class="doctools_subsection"><a href="#subsection4">Data Entry Widget Items</a></li>
<li class="doctools_subsection"><a href="#subsection5">Entry Widget Item Attributes</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">APPLICATION SPECIFIC ENTRY WIDGETS</a></li>
<li class="doctools_section"><a href="#section4">VARIABLES</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">Tk 8.3</b></li>
<li>package require <b class="pkgname">tepam <span class="opt">?0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">tepam::argument_dialogbox</b> <i class="arg">item_name item_attributes <span class="opt">?item_name item_attributes?</span> <span class="opt">?...?</span></i></a></li>
<li><a href="#2"><b class="cmd">tepam::argument_dialogbox</b> {<i class="arg">item_name item_attributes <span class="opt">?item_name item_attributes?</span> <span class="opt">?...?</span></i>}</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">ARGUMENT DIALOGBOX CALL</a></h2>
<p>The TEPAM <b class="cmd">argument_dialogbox</b> is a flexible and easily usable data entry form generator that is available if Tk has been loaded. Each data entry element of a form is defined via a <em>data entry item</em> that can be provided to <b class="cmd">argument_dialogbox</b> in two formats:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">tepam::argument_dialogbox</b> <i class="arg">item_name item_attributes <span class="opt">?item_name item_attributes?</span> <span class="opt">?...?</span></i></a></dt>
<dd><p>Using this first format, each <em>data entry item</em> is defined via a pair of two arguments. The first one is the <em>item name</em> that defines the entry widget that has to be used in the form. The second argument, called <em>item attributes</em>, specifies the variable which is attributed to the data entry element as well as eventual formatting and context information.</p>
<p>The <b class="cmd">argument_dialogbox</b> returns <b class="const">ok</b> if the entered data have been acknowledged (via the <em>OK</em> button) and validated by a data checker. If the entered data have been rejected (via the <em>Cancel</em> button) the <b class="cmd">argument_dialogbox</b> returns <b class="const">cancel</b>.</p>
<p>A small example illustrates how the <b class="cmd">argument_dialogbox</b> can be employed:</p>
<pre class="doctools_example">set DialogResult [<b class="cmd">tepam::argument_dialogbox</b> \
   <b class="cmd">-title</b> &quot;Itinerary selection&quot; \
   <b class="cmd">-file</b> {<i class="arg">-label &quot;Itinerary report&quot; -variable report_file</i>} \
   <b class="cmd">-frame</b> {<i class="arg">-label &quot;Itinerary start&quot;</i>} \
      <b class="cmd">-comment</b> {<i class="arg">-text &quot;Specify your itinerary start location&quot;</i>} \
      <b class="cmd">-entry</b> {<i class="arg">-label &quot;City&quot; -variable start_city -type string</i>} \
      <b class="cmd">-entry</b> {<i class="arg">-label &quot;Street&quot; -variable start_street -type string -optional 1</i>} \
      <b class="cmd">-entry</b> {<i class="arg">-label &quot;Street number&quot; -variable start_street_nbr -type integer -optional 1</i>} \
   <b class="cmd">-frame</b> {<i class="arg">-label &quot;Itinerary destination&quot;</i>} \
      <b class="cmd">-comment</b> {<i class="arg">-text &quot;Specify your itinerary destination&quot;</i>} \
      <b class="cmd">-entry</b> {<i class="arg">-label &quot;City&quot; -variable dest_city -type string</i>} \
      <b class="cmd">-entry</b> {<i class="arg">-label &quot;Street&quot; -variable dest_street -type string -optional 1</i>} \
      <b class="cmd">-entry</b> {<i class="arg">-label &quot;Street number&quot; -variable dest_street_nbr -type integer -optional 1</i>} \
   <b class="cmd">-frame</b> {} \
   <b class="cmd">-checkbutton</b> {<i class="arg">-label &quot;Don't use highways&quot; -variable no_highway</i>}]</pre>
<p>This example opens a dialog box that has the title <em>Itinerary selection</em>. A first entry widget in this box allows selecting a report file. It follows two frames to define respectively an itinerary start and end location. Each of these locations that are described with a comment has three entry widgets to specify respectively the city, street and the street number. Bellow the second frame there is a check button that allows specifying if eventual highways should be ignored.</p></dd>
<dt><a name="2"><b class="cmd">tepam::argument_dialogbox</b> {<i class="arg">item_name item_attributes <span class="opt">?item_name item_attributes?</span> <span class="opt">?...?</span></i>}</a></dt>
<dd><p>Sometimes it is simpler to provide all the data entry item definitions in form of a single list to <b class="cmd">argument_dialogbox</b>, and not as individual arguments. The second format that is supported by <b class="cmd">argument_dialogbox</b> corresponds exactly to the first one, except that all item definitions are packed into a single list that is provided to <b class="cmd">argument_dialogbox</b>. The previous example can therefore also be written in the following way:</p>
<pre class="doctools_example">set DialogResult [<b class="cmd">tepam::argument_dialogbox {</b>
   <b class="cmd">-title</b> &quot;Itinerary selection&quot;
   <b class="cmd">-file</b> {<i class="arg">-label &quot;Itinerary report&quot; -variable report_file</i>}
   ...
   <b class="cmd">-checkbutton</b> {<i class="arg">-label &quot;Don't use highways&quot; -variable no_highway</i>} <b class="cmd">}</b>]</pre>
</dd>
</dl>
<p>The commands <b class="cmd">argument_dialogbox</b> as well as <b class="cmd"><a href="../../../../index.html#key41">procedure</a></b> are exported from the namespace <b class="namespace">tepam</b>. To use these commands without the <b class="namespace">tepam::</b> namespace prefix, it is sufficient to import them into the main namespace:</p>
<pre class="doctools_example"><b class="cmd">namespace import tepam::*</b>
set DialogResult [<b class="cmd">argument_dialogbox</b> \
   -title &quot;Itinerary selection&quot;
   ...</pre>
<p>The following subsections explain the different argument item types that are accepted by the <b class="cmd">argument_dialogbox</b>, classified into three groups. The first data entry item definition format will be used in the remaining document, knowing that this format can always be transformed into the second format by putting all arguments into a single list that is then provided to <b class="cmd">argument_dialogbox</b>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Context Definition Items</a></h3>
<p>The first item group allows specifying some context aspects of an argument dialog box. These items are taking a simple character string as item attribute:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-&lt;argument_name&gt;</b> <i class="arg">string</i> \
   ...</pre>
<p>The following items are classified into this group:</p>
<dl class="doctools_definitions">
<dt>-title <i class="arg">string</i></dt>
<dd><p>The dialog box window title which is by default <em>Dialog</em> can be changed with the <em>-title</em> item:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-title</b> &quot;System configuration&quot; \
   ...</pre>
</dd>
<dt>-window <i class="arg">string</i></dt>
<dd><p>The argument dialog box uses by default <em>.dialog</em> as dialog top level window. This path can be changed with the <em>-window</em> item:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-window</b> .dialog \
   ...</pre>
</dd>
<dt>-parent <i class="arg">string</i></dt>
<dd><p>By defining a parent window, the argument dialog box will be displayed beside this one. Without explicit parent window definition, the top-level window will be considered as parent window.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-parent</b> .my_appl \
   ...</pre>
</dd>
<dt>-context <i class="arg">string</i></dt>
<dd><p>If a context is defined the dialog box state, e.g. the entered data as well as the window size and position, is  restored the next time the argument dialog box is called. The assignment of a context allows saving the dialog box state in its context to distinguish between different usages of the argument dialog box.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-context</b> destination_definitions \
   ...</pre>
</dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Formatting and Display Options</a></h3>
<p>Especially for big, complex forms it becomes important that the different data entry widgets are graphically well organized and commented to provide an immediate and clear overview to the user. A couple of items allow structuring and commenting the dialog boxes.</p>
<p>The items of this classification group require as item attributes a definition list, which contains itself attribute name and value pairs:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   ...
   <b class="cmd">-&lt;argument_name&gt;</b> { <i class="arg">
      <span class="opt">?-&lt;attribute_name&gt; &lt;attribute_value&gt;?</span>
      <span class="opt">?-&lt;attribute_name&gt; &lt;attribute_value&gt;?</span>
      <span class="opt">?...?</span></i>
   }
   ...</pre>
<p>The following items are classified into this group:</p>
<dl class="doctools_definitions">
<dt>-frame <i class="arg">list</i></dt>
<dd><p>The <em>-frame</em> item allows packing all following entry widgets into a labeled frame, until a next frame item is defined or until the last entry widget has been defined. It recognizes the following attributes inside the item attribute list:</p>
<dl class="doctools_definitions">
<dt>-label <i class="arg">string</i></dt>
<dd><p>An optional frame label can be specified with the <i class="arg">-label</i> statement.</p></dd>
</dl>
<p>Example:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   ...
   <b class="cmd">-frame</b> {<i class="arg">-label &quot;Destination address&quot;</i>}
   ...</pre>
<p>To close an open frame without opening a new one, an empty list has to be provided to the <i class="arg">-frame</i> statement.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   ...
   <b class="cmd">-frame</b> {}
   ...</pre>
</dd>
<dt>-sep [const {{}}]</dt>
<dd><p>Entry widgets can be separated with the <i class="arg">-sep</i> statement which doesn't require additional definitions. The related definition list has to exist, but its content is ignored.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   ...
   <b class="cmd">-sep</b> {}
   ...</pre>
</dd>
<dt>-comment <i class="arg">string</i></dt>
<dd><p>Comments and descriptions can be added with the <i class="arg">-text</i> attribute of the <i class="arg">-comment</i> item. Please note that each entry widget itself can also contain a <i class="arg">-text</i> attribute for comments and descriptions. But the <i class="arg">-comment</i> item allows for example adding a description between two frames.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   ...
   <b class="cmd">-comment</b> {<i class="arg">-text &quot;Specify bellow the destination address&quot;</i>}
   ...</pre>
</dd>
<dt>-yscroll <b class="const">0</b>|<b class="const">1</b>|<b class="const">auto</b></dt>
<dd><p>This attribute allows controlling an eventual vertical scrollbar. Setting it to <b class="const">0</b> will permanently disable the scrollbar, setting it to <b class="const">1</b> will enable it. By default it is set to <b class="const">auto</b>. The scrollbar is enabled in this mode only if the vertical data entry form size exceeds 66% of the screen height.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   ...
   <b class="cmd">-yscroll</b> <b class="const">auto</b>
   ...</pre>
</dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Global Custom Data Validation</a></h3>
<p>This item group allows specifying global custom checks to validate the entered data.</p>
<dl class="doctools_definitions">
<dt>-validatecommand <i class="arg">script</i></dt>
<dd><p>Custom data checks can be performed via validation commands that are defined with the <i class="arg">-validatecommand</i> item. Example:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -entry {-label &quot;Your comment&quot; -variable YourCom} \
   <b class="cmd">-validatecommand</b> {IllegalWordDetector $YourCom}</pre>
<p>The validation command is executed in the context of the calling procedure, once all the basic data checks have been performed and data variables are assigned. All data is accessed via the data variables. Note that there is also an entry widget specific attribute <i class="arg">-validatecommand</i> that allows declaring custom checks for specific data entries.</p>
<p>The attribute <i class="arg">-validatecommand</i> can be repeated to declare multiple custom checks.</p></dd>
<dt>-validatecommand_error_text <i class="arg">string</i></dt>
<dd><p>This item allows overriding the default error message for a global custom argument validation (defined by <i class="arg">-validatecommand</i>). Also this attribute can be repeated in case multiple checks are declared.</p></dd>
<dt>-validatecommand2 <i class="arg">script</i></dt>
<dd></dd>
<dt>-validatecommand2_error_text <i class="arg">string</i></dt>
<dd><p>These items are mainly for TEPAM internal usage.</p>
<p>These items corrspond respectively to <i class="arg">-validatecommand</i> and <i class="arg">-validatecommand_error_text</i>. However, the data validation is not performed in the next upper stack level, but two stack levels higher.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Data Entry Widget Items</a></h3>
<p>Data entry widgets are created with the widget items. These items require as item attributes a definition list, which contains itself attribute name and value pairs:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   ...
   <b class="cmd">-&lt;argument_name&gt;</b> { <i class="arg">
      <span class="opt">?-&lt;attribute_name&gt; &lt;attribute_value&gt;?</span>
      <span class="opt">?-&lt;attribute_name&gt; &lt;attribute_value&gt;?</span>
      <span class="opt">?...?</span></i>
   }
   ...</pre>
<p>The attribute list can contain various attributes to describe and comment an entry widget and to constrain its entered value. All entry widgets are accepting a common set of attributes that are described in the section <span class="sectref"><a href="#subsection5">Entry Widget Item Attributes</a></span>.</p>
<p>TEPAM defines a rich set of entry widgets. If necessary, this set can be extended with additional application specific entry widgets (see <span class="sectref"><a href="#section3">APPLICATION SPECIFIC ENTRY WIDGETS</a></span>):</p>
<dl class="doctools_definitions">
<dt>-entry <i class="arg">list</i></dt>
<dd><p>The <i class="arg">-entry</i> item generates the simplest but most universal data entry widget. It allows entering any kind of data in form of single line strings.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-entry</b> {-label Name -variable Entry}</pre>
</dd>
<dt>-text <i class="arg">list</i></dt>
<dd><p>The <i class="arg">-text</i> item generates a multi line text entry widget. The widget height can be selected with the <i class="arg">-height</i> attribute.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-text</b> {-label Name -variable Text -height 5}</pre>
</dd>
<dt>-checkbox <i class="arg">list</i></dt>
<dd><p>A group of check boxes is created with the <i class="arg">-checkbox</i> item. The number of check boxes and their option values are specified with a list assigned to the <i class="arg">-choices</i> attribute or via a variable declared with the <i class="arg">-choicevariable</i> attribute:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-checkbox</b> {-label &quot;Font sytle&quot; -variable FontStyle \
               -choices {bold italic underline} -default italic}</pre>
<p>If the labels of the check boxes should differ from the option values, their labels can be defined with the <i class="arg">-choicelabels</i> attribute:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-checkbox</b> {-label &quot;Font sytle&quot; -variable FontStyle \
              -choices {bold italic underline} \
              -choicelabels {Bold Italic Underline} \
              -default italic}</pre>
<p>In contrast to a radio box group, a check box group allows selecting simultaneously several choice options. The selection is stored for this reason inside the defined variable in form of a list, even if only one choice option has been selected.</p></dd>
<dt>-radiobox <i class="arg">list</i></dt>
<dd><p>A group of radio boxes is created with the <i class="arg">-radiobox</i> item. The number of radio boxes and their option values are specified with a list assigned to the <i class="arg">-choices</i> attribute or via a variable declared with the <i class="arg">-choicevariable</i> attribute.</p>
<p>In contrast to a check box group, a radio box group allows selecting simultaneously only one choice option. The selected option value is stored directly, and not in form of a list, inside the defined variable.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-radiobox</b> {-label &quot;Text adjustment&quot; -variable Adjustment \
              -choices {left center right} -default left}</pre>
<p>If the labels of the radio boxes should differ from the option values, their labels can be defined with the <i class="arg">-choicelabels</i> attribute:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-radiobox</b> {-label &quot;Text adjustment&quot; -variable Adjustment \
              -choices {left center right} \
              -choicelabels {Left Center Right} -default left}</pre>
</dd>
<dt>-checkbutton <i class="arg">list</i></dt>
<dd><p>The <i class="arg">-checkbutton</i> entry widget allows activating or deactivating a single choice option. The result written into the variable will either be <b class="const">0</b> if the check button was not activated or <b class="const">1</b> if it was activated. An eventually provided default value has also to be either <b class="const">0</b> or <b class="const">1</b>.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-checkbutton</b> {-label Capitalize -variable Capitalize -default 1}</pre>
</dd>
</dl>
<p>Several types of list and combo boxes are available to handle selection lists.</p>
<dl class="doctools_definitions">
<dt>-combobox <i class="arg">list</i></dt>
<dd><p>The combobox is a combination of a normal entry widget together with a drop-down list box. The combobox allows selecting from this drop-down list box a single element. The list of the available elements can be provided either as a list to the <i class="arg">-choices</i> attribute, or via a variable that is specified with the <i class="arg">-choicevariable</i> attribute.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-combobox</b> {-label &quot;Text size&quot; -variable Size -choices {8 9 10 12 15 18} -default 12}</pre>
<p>And here is an example of using a variable to define the selection list:</p>
<pre class="doctools_example">set TextSizes {8 9 10 12 15 18}
tepam::argument_dialogbox \
   <b class="cmd">-combobox</b> {-label &quot;Text size&quot; -variable Size -choicevariable TextSizes -default 12}</pre>
</dd>
<dt>-listbox <i class="arg">list</i></dt>
<dd><p>In contrast to the combo box, the list box is always displayed by the <i class="arg">listbox</i> entry widget. Only one element is selectable unless the <i class="arg">-multiple_selection</i> attribute is set. The list box height can be selected with the <i class="arg">-height</i> attribute. If the height is not explicitly defined, the list box height is automatically adapted to the argument dialog box size.
The first example uses a variable to define the available choices:</p>
<pre class="doctools_example">set set AvailableSizes
for {set k 0} {$k&lt;16} {incr k} {lappend AvailableSizes [expr 1&lt;&lt;$k]}
tepam::argument_dialogbox \
   <b class="cmd">-listbox</b> {-label &quot;Distance&quot; -variable Distance \
             -choicevariable AvailableSizes -default 6 -height 5}</pre>
<p>Here is a multi-element selection example. Please note that also the default selection can contain multiple elements:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-listbox</b> {-label &quot;Text styles&quot; -variable Styles \
             -choices {bold italic underline overstrike} \
             -choicelabels {Bold Italic Underline Overstrike} \
             -default {bold underline} -multiple_selection 1 \
             -height 3}</pre>
</dd>
<dt>-disjointlistbox <i class="arg">list</i></dt>
<dd><p>A disjoint list box has to be used instead of a normal list box if the selection order is important. The disjoint list box entry widget has in fact two list boxes, one to select elements and one to display the selected elements in the chosen order.</p>
<p>Disjoint listboxes allow always selecting multiple elements. With the exception of the <i class="arg">-multiple_selection</i> attribute, disjointed list boxes are accepting the same attributes as the normal listbox, e.g. <i class="arg">-height, -choices, -choicevariable, -default</i>.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-disjointlistbox</b> {-label &quot;Preferred scripting languages&quot; -variable Languages \
             -comment &quot;Please select your preferred languages in the order&quot; \
             -choices {JavaScript Lisp Lua Octave PHP Perl Python Ruby Scheme Tcl} \
             -default {Tcl Perl Python}}</pre>
</dd>
</dl>
<p>The file and directory selectors are building a next group of data entry widgets. A paragraph of section <span class="sectref"><a href="#subsection5">Entry Widget Item Attributes</a></span> explains the widget specific attributes that allow specifying the targeted file types, active directory etc.</p>
<dl class="doctools_definitions">
<dt>-file <i class="arg">list</i></dt>
<dd><p>The item <i class="arg">-file</i> creates a group composed by an entry widget together with a button that allows opening a file browser. The data type <i class="arg">file</i> is automatically selected for this entry if no data type has been explicitly defined with the <i class="arg">-type</i> attribute.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-file</b> {-label &quot;Image file&quot; -variable ImageF \
          -filetypes {{&quot;GIF&quot; {*.gif}} {&quot;JPG&quot; {*.jpg}}} \
          -initialfile &quot;picture.gif&quot;}</pre>
</dd>
<dt>-existingfile <i class="arg">list</i></dt>
<dd><p>The item <i class="arg">-existingfile</i> creates a group composed by an entry widget together with a button that allows opening a browser to select an existing file. The data type <i class="arg">existingfile</i> is automatically selected for this entry if no data type has been explicitly defined with the <i class="arg">-type</i> attribute.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-existingfile</b> {-label &quot;Image file&quot; -variable ImageF \
                  -filetypes {{&quot;GIF&quot; {*.gif}} {&quot;JPG&quot; {*.jpg}}} \
                  -initialfile &quot;picture.gif&quot;}</pre>
</dd>
<dt>-directory <i class="arg">list</i></dt>
<dd><p>The item <i class="arg">-directory</i> creates a group composed by an entry widget together with a button that allows opening a directory browser. The data type <i class="arg">directory</i> is automatically selected for this entry if no data type has been explicitly defined with the <i class="arg">-type</i> attribute.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-directory</b> {-label &quot;Report directory&quot; -variable ReportDir}</pre>
</dd>
<dt>-existingdirectory <i class="arg">list</i></dt>
<dd><p>The item <i class="arg">-existingdirectory</i> creates a group composed by an entry widget together with a button that allows opening a browser to select an existing directory. The data type <i class="arg">existingdirectory</i> is automatically selected for this entry if no data type has been explicitly defined with the <i class="arg">-type</i> attribute.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-existingdirectory</b> {-label &quot;Report directory&quot; -variable ReportDir}</pre>
</dd>
</dl>
<p>Finally, there is a last group of some other special data entry widgets.</p>
<dl class="doctools_definitions">
<dt>-color <i class="arg">list</i></dt>
<dd><p>The color selector is composed by an entry widget together with a button that allows opening a color browser. The data type <i class="arg">color</i> is automatically selected for this entry widget type if no data type has been explicitly defined with the <i class="arg">-type</i> attribute.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-color</b> {-label &quot;Background color&quot; -variable Color -default red}</pre>
</dd>
<dt>-font <i class="arg">list</i></dt>
<dd><p>The font selector is composed by an entry widget together with a button that allows opening a font browser. The data type <i class="arg">font</i> is automatically selected for this entry widget type if no data type has been explicitly defined with the <i class="arg">-type</i> attribute. The entry widget displays an example text in the format of the selected font.</p>
<p>The font browser allows selecting by default the font families provided by the <b class="cmd">font families</b> Tk command as well as a reasonable set of different font sizes between 6 points and 40 points. Different sets of font families and font sizes can be specified respectively via the <i class="arg">-font_families</i> or <i class="arg">-font_sizes</i> attributes.</p>
<p>If no default font is provided via the <i class="arg">-default</i> attribute, the default font of the label widget to display the selected font will be used as default selected font. If the font family of this label widget is not part of the available families the first available family is used as default. If the font size of this label widget is not part of the available sizes the next close available size is selected as default size.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-font</b> {-label &quot;Font&quot; -variable Font \
          -font_sizes {8 10 12 16} \
          -default {Arial 20 italic}}</pre>
</dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Entry Widget Item Attributes</a></h3>
<p>All the entry widget items are accepting the following attributes:</p>
<dl class="doctools_definitions">
<dt>-text <i class="arg">string</i></dt>
<dd><p>Eventual descriptions and comments specified with the <i class="arg">-text</i> attribute are displayed above the entry widget.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -entry {<b class="cmd">-text &quot;Please enter your name bellow&quot;</b> -variable Name}</pre>
</dd>
<dt>-label <i class="arg">string</i></dt>
<dd><p>The label attribute creates left to the entry widget a label using the provided string as label text:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -entry {<b class="cmd">-label Name</b> -variable Name}</pre>
</dd>
<dt>-variable <i class="arg">string</i></dt>
<dd><p>All entry widgets require a specified variable. After accepting the entered information with the OK button, the entry widget data is stored inside the defined variables.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -existingdirectory {-label &quot;Report directory&quot; <b class="cmd">-variable ReportDir</b>}</pre>
</dd>
<dt>-default <i class="arg">string</i></dt>
<dd><p>Eventual default data for the entry widgets can be provided via the <i class="arg">-default</i> attribute. The default value is overridden if an argument dialog box with a defined context is called another time. The value acknowledged in a previous call will be used in this case as default value.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -checkbox {-label &quot;Font sytle&quot; -variable FontStyle \
               -choices {bold italic underline} <b class="cmd">-default italic</b>}</pre>
</dd>
<dt>-optional <b class="const">0</b>|<b class="const">1</b></dt>
<dd><p>Data can be specified as optional or mandatory with the <i class="arg">-optional</i> attribute that requires either <b class="const">0</b> (mandatory) or <b class="const">1</b> (optional) as attribute data.</p>
<p>In case an entry is optional and no data has been entered, e.g. the entry contains an empty character string, the entry will be considered as undefined and the assigned variable will not be defined.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -entry {-label &quot;City&quot; -variable start_city -type string} \
   -entry {-label &quot;Street&quot; -variable start_street -type string <b class="cmd">-optional 0</b>} \
   -entry {-label &quot;Street number&quot; -variable start_street_nbr -type integer <b class="cmd">-optional 1</b>} \</pre>
</dd>
<dt>-type <i class="arg">string</i></dt>
<dd><p>If the data type is defined with the <i class="arg">-type</i> attribute the argument dialog box will automatically perform a data type check after acknowledging the entered values and before the dialog box is closed. If a type incompatible value is found an error message box appears and the user can correct the value.</p>
<p>The argument dialog box accepts all types that have been specified by the TEPAM package and that are also used by <b class="cmd"><a href="tepam_procedure.html">tepam::procedure</a></b> (see the <em>tepam::procedure reference manual</em>).</p>
<p>Some entry widgets like the file and directory widgets, as well as the color and font widgets are specifying automatically the default data type if no type has been specified explicitly with the <i class="arg">-type</i> attribute.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   <b class="cmd">-entry</b> {-label &quot;Street number&quot; -variable start_street_nbr <b class="cmd">-type integer</b>} \</pre>
</dd>
<dt>-range <i class="arg">string</i></dt>
<dd><p>Values can be constrained with the <i class="arg">-range</i> attribute. The valid range is defined with a list containing the minimum valid value and a maximum valid value.</p>
<p>The <i class="arg">-range</i> attribute has to be used only for numerical arguments, like integers and doubles.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -entry {-label Month -variable Month -type integer <b class="cmd">-range {1 12}</b>}</pre>
</dd>
<dt>-validatecommand <i class="arg">string</i></dt>
<dd><p>Custom argument value validations can be performed via specific validation commands that are defined with the <i class="arg">-validatecommand</i> attribute. The provided validation command can be a complete script in which the pattern <em>%P</em> is placeholder for the argument value that has to be validated.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -entry {-label &quot;Your comment&quot; -variable YourCom \
           <b class="cmd">-validatecommand</b> &quot;IllegalWordDetector %P&quot;}</pre>
<p>While the purpose of this custom argument validation attribute is the validation of a specific argument, there is also a global data validation attribute <i class="arg">-validatecommand</i> that allows performing validation that involves multiple arguments.</p></dd>
<dt>-validatecommand_error_text <i class="arg">string</i></dt>
<dd><p>This attribute allows overriding the default error message for a custom argument validation (defined by <i class="arg">-validatecommand</i>).</p></dd>
</dl>
<p>Some other attributes are supported by the list and combo boxes as well as by the radio and check buttons.</p>
<dl class="doctools_definitions">
<dt>-choices <i class="arg">string</i></dt>
<dd><p>Choice lists can directly be defined with the <i class="arg">-choices</i> attribute. This way to define choice lists is especially adapted for smaller, fixed selection lists.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -listbox {-label &quot;Text styles&quot; -variable Styles \
             <b class="cmd">-choices {bold italic underline}</b> -default underline</pre>
</dd>
<dt>-choicelabels <i class="arg">string</i> <em>(only check and radio buttons)</em></dt>
<dd><p>If the labels of the check and radio boxes should differ from the option values, they can be defined with the <i class="arg">-choicelabels</i> attribute:</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -checkbox {-label &quot;Font sytle&quot; -variable FontStyle \
              -choices {bold italic underline} \
              <b class="cmd">-choicelabels {Bold Italic Underline}</b> </pre>
</dd>
<dt>-choicevariable <i class="arg">string</i></dt>
<dd><p>Another way to define the choice lists is using the <i class="arg">-choicevariable</i> attribute. This way to define choice lists is especially adapted for huge and eventually variable selection lists.</p>
<pre class="doctools_example">set TextSizes {8 9 10 12 15 18}
tepam::argument_dialogbox \
   -combobox {-label &quot;Text size&quot; -variable Size <b class="cmd">-choicevariable TextSizes</b>}</pre>
</dd>
<dt>-multiple_selection <b class="const">0</b>|<b class="const">1</b></dt>
<dd><p>The list box item (<b class="cmd">-listbox</b>) allows by default selecting only one list element. By setting the <i class="arg">-multiple_selection</i> attribute to <b class="const">1</b>, multiple elements can be selected.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -listbox {-label &quot;Text styles&quot; -variable Styles \
             -choices {bold italic underline} -default underline \
             <b class="cmd">-multiple_selection 1</b> -height 3}</pre>
</dd>
</dl>
<p>Some additional attributes are supported by the file and directory selection widgets.</p>
<dl class="doctools_definitions">
<dt>-filetypes <i class="arg">string</i></dt>
<dd><p>The file type attribute is used by the <b class="cmd">-file</b> and <b class="cmd">-existingfile</b> items to define the file endings that are searched by the file browser.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -file {-label &quot;Image file&quot; -variable ImageF \
          <b class="cmd">-filetypes {{&quot;GIF&quot; {*.gif}} {&quot;JPG&quot; {*.jpg}}}</b>}</pre>
</dd>
<dt>-initialfile <i class="arg">string</i></dt>
<dd><p>The initial file used by the file browsers of the <b class="cmd">-file</b> and <b class="cmd">-existingfile</b> widgets are by default the file defined with the <i class="arg">-default</i> attribute, unless a file is specified with the <i class="arg">-initialfile</i> attribute.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -file {-variable ImageF <b class="cmd">-initialfile &quot;picture.gif&quot;</b>}</pre>
</dd>
<dt>-activedir <i class="arg">string</i></dt>
<dd><p>The <i class="arg">-activedir</i> attribute will override the default active search directory used by the file browsers of all file and directory entry widgets. The default active search directory is defined by the directory of a specified initial file (<i class="arg">-initialfile</i>) if defined, and otherwise by the directory of the default file/directory, specified with the <i class="arg">-default</i> attribute.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -file &quot;-variable ImageF <b class="cmd">-activedir $pwd</b>&quot;</pre>
</dd>
</dl>
<p>Finally, there is a last attribute supported by some widgets:</p>
<dl class="doctools_definitions">
<dt>-height <i class="arg">string</i></dt>
<dd><p>All widgets containing a selection list (<b class="cmd">-listbox</b>, <b class="cmd">-disjointlistbox</b>, <b class="cmd">-font</b>) as well as the multi line <b class="cmd">-text</b> widget are accepting the <i class="arg">-height</i> attribute that defines the number of displayed rows of the selection lists.</p>
<pre class="doctools_example">tepam::argument_dialogbox \
   -listbox {-label &quot;Text size&quot; -variable Size \
             -choices {8 9 10 12 15 18} -default 12 <b class="cmd">-height 3</b>}</pre>
<p>If the no height has been explicitly specified the height of the widget will be dynamically adapted to the argument dialog box size.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">APPLICATION SPECIFIC ENTRY WIDGETS</a></h2>
<p>An application specific entry widget can be made available to the argument dialog box by adding a dedicated procedure to the <b class="namespace">tepam</b> namespace. This procedure has three arguments; the first one is the widget path, the second one a subcommand and the third argument has various purposes:</p>
<pre class="doctools_example"><i class="arg">proc</i> tepam::ad_form(&lt;WidgetName&gt;) {W Command {Par &quot;&quot;}} {
   <i class="arg">upvar Option Option; # if required</i>
   <i class="arg">variable argument_dialogbox; # if required</i>
   switch $Command {
      &quot;create&quot; &lt;CreateCommandSequence&gt;
      &quot;set_choice&quot; &lt;SetChoiceCommandSequence&gt;
      &quot;set&quot; &lt;SetCommandv&gt;
      &quot;get&quot; &lt;GetCommandSequence&gt;
   }
}</pre>
<p><b class="cmd">Argument_dialogbox</b> takes care about the <i class="arg">-label</i> and <i class="arg">-text</i> attributes for all entry widgets. For any data entry widget it creates a frame into which the data entry widget components can be placed. The path to this frame is provided via the <i class="arg">W</i> argument.</p>
<p>The entry widget procedure has to support 3 mandatory and an optional command that are selected via the argument <i class="arg">Command</i>:</p>
<dl class="doctools_definitions">
<dt><i class="arg">create</i></dt>
<dd><p>The entry widget is called a first time with the command <i class="arg">create</i> to build the data entry widget.</p>
<p>The frames that are made available by <b class="cmd">argument_dialogbox</b> for the entry widgets are by default only extendable in the X direction. To make them also extendable in the Y direction, for example for extendable list boxes, the command <b class="cmd">ad_form(make_expandable) $W</b> has to be executed when an entry widget is built.</p></dd>
<dt><i class="arg">set_choice</i></dt>
<dd><p>The entry widget procedure is only called with the <i class="arg">set_choice</i> command if the <i class="arg">-choices</i> or <i class="arg">-choicevariable</i> has been specified. The command is therefore only relevant for list and combo boxes.</p>
<p>The available selection list that is either specified with the <i class="arg">-choices</i> or <i class="arg">-choicevariable</i> attribute is provided via the <i class="arg">Par</i> argument to the entry widget procedure. This list can be used to initialize an available choice list.</p></dd>
<dt><i class="arg">set</i></dt>
<dd><p>If a default value is either defined via the <i class="arg">-default</i> attribute or via a preceding call the entry widget procedure is called with the <i class="arg">set</i> command. The argument <i class="arg">Par</i> contains in this case the value to which the entry widget has to be initialized.</p></dd>
<dt><i class="arg">get</i></dt>
<dd><p>The entry widget procedure command <i class="arg">get</i> has to return the current value of the entry widget.</p></dd>
</dl>
<p>Eventually specified entry widget item attributes are available via the <b class="variable">Option</b> array variable of the calling procedure. This variable becomes accessible inside the entry widget procedure via the <b class="cmd">upvar</b> command.</p>
<p>There may be a need to store some information in a variable. The array variable <b class="variable">argument_dialogbox</b> has to be used for this purpose together with array indexes starting with <em>&quot;$W,&quot;</em>, e.g. <em>argument_dialogbox($W,values)</em>.</p>
<p>Examples of entry widget procedures are directly provided by the TEPAM package source file that specifies the standard entry widget procedures. The simplest procedure is the one for the basic <em>entry</em> widget:</p>
<pre class="doctools_example">proc tepam::ad_form(entry) {W Command {Par &quot;&quot;}} {
   switch $Command {
      &quot;create&quot; {pack [entry \$W.entry] -fill x \
                        -expand yes -pady 4 -side left}
      &quot;set&quot; {\$W.entry insert 0 $Par}
      &quot;get&quot; {return [\$W.entry get]}
   }
}</pre>
<p>It is also possible to relay on an existing entry widget procedure to derive a new, more specific one. The <em>radiobox</em> widget is used for example, to create a new entry widget that allows selecting either <em>left</em>, <em>center</em> or <em>right</em>. The original <em>radiobox</em> widget is called with the <i class="arg">set_choice</i> command immediately after the <em>create</em> command, to define the fixed list of selection options.</p>
<pre class="doctools_example">proc tepam::ad_form(rcl) {W Command {Par &quot;&quot;}} {
   set Res [ad_form(radiobox) $W $Command $Par]
   if {$Command==&quot;create&quot;} {
      ad_form(radiobox) $W set_choice {left center right}
   }
   return $Res
}</pre>
<p>Please consult the TEPAM package source file to find additional and more complex examples of entry widget procedures.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">VARIABLES</a></h2>
<p>The <b class="cmd">argument_dialogbox</b> is using two variables inside the namespace <b class="namespace">::tepam</b>:</p>
<dl class="doctools_definitions">
<dt><b class="variable">argument_dialogbox</b></dt>
<dd><p>Application specific entry widget procedures can use this array variable to store their own data, using as index the widget path provided to the procedure, e.g. <em>argument_dialogbox($W,&lt;sub_index&gt;)</em>.</p></dd>
<dt><b class="variable">last_parameters</b></dt>
<dd><p>This array variable is only used by an argument dialog box if its context has been specified via the <i class="arg">-context</i> attribute. The argument dialog box position and size as well as its entered data are stored inside this variable if the data are acknowledged and the form is closed. This allows the form to restore its previous state once it is called another time.</p>
<p>To reuse the saved parameters not just in the actual application session but also in another one, it is sufficient to store the <b class="variable">last_parameter</b> array variable contents in a configuration file which is loaded the next time an application is launched.</p></dd>
</dl>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_introduction.html">tepam(n)</a>, <a href="tepam_procedure.html">tepam::procedure(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key403">data entry form</a>, <a href="../../../../index.html#key404">parameter entry form</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Argument entry form, mega widget</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013, Andreas Drollinger</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tepam/tepam_doc_gen.html.











































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<div class='fossil-doc' data-title='tepam::doc_gen - Tcl's Enhanced Procedure and Argument Manager'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam::doc_gen(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam::doc_gen - TEPAM DOC Generation, reference manual</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">ARGUMENTS</a></li>
<li class="doctools_section"><a href="#section3">PREDEFINED DOCUMENT FORMATS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">TXT - Text format</a></li>
<li class="doctools_subsection"><a href="#subsection2">HTML - HTML format</a></li>
<li class="doctools_subsection"><a href="#subsection3">POD - Perl document format</a></li>
<li class="doctools_subsection"><a href="#subsection4">DT - TclLib DocTools format</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">ADDING SUPPORT FOR NEW DOCUMENT FORMATS</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a>
<ul>
<li class="doctools_subsection"><a href="#subsection5">tepam::doc_gen::generate</a></li>
<li class="doctools_subsection"><a href="#subsection6">tepam::doc_gen::patch</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">tepam 0.5</b></li>
<li>package require <b class="pkgname">tepam::doc_gen <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">tepam::doc_gen::generate</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-style <i class="arg">style</i>?</span> <span class="opt">?-header_footer?</span> <span class="opt">?-dest_file <i class="arg">dest_file</i>?</span> <i class="arg">name</i></a></li>
<li><a href="#2"><b class="cmd">tepam::doc_gen::patch</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-style <i class="arg">style</i>?</span> <span class="opt">?-search_pattern <i class="arg">search_pattern</i>?</span> <span class="opt">?-src_string <i class="arg">src_string</i> | -src_file <i class="arg">src_file</i>?</span> <span class="opt">?-dest_file <i class="arg">dest_file</i>?</span> <span class="opt">?name?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package generates documentations of TEPAM procedures (procedures that have been declared with <b class="cmd"><a href="tepam_procedure.html">tepam::procedure</a></b>). The documents are generated in the classic UNIX document style using the following document sections: Name, Synopsis, Description, Arguments and Example. <b class="package">TEPAM Doc Gen</b> provides support for various document formats. Support for additional formats can be added if necessary.</p>
<p>The <b class="package">TEPAM Doc Gen</b> package provides the following commands:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">tepam::doc_gen::generate</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-style <i class="arg">style</i>?</span> <span class="opt">?-header_footer?</span> <span class="opt">?-dest_file <i class="arg">dest_file</i>?</span> <i class="arg">name</i></a></dt>
<dd><p>This command generates the documentation for a specified procedure (<i class="arg">name</i>) in one of the supported formats (TXT, HTML, POD (Perl Doc), DT (TclLib DocTool), or in a custom specific format. The format is specified via <span class="opt">?format?</span>. The flag <span class="opt">?-header_footer?</span> adds to the documentation file header and footer. If <span class="opt">?dest_file?</span> is specified the documentation is stored in a file (the file header and footer are added automatically in this case) and the file name is returned. Otherwise the documentation string is returned by <b class="cmd">generate</b>.</p></dd>
<dt><a name="2"><b class="cmd">tepam::doc_gen::patch</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-style <i class="arg">style</i>?</span> <span class="opt">?-search_pattern <i class="arg">search_pattern</i>?</span> <span class="opt">?-src_string <i class="arg">src_string</i> | -src_file <i class="arg">src_file</i>?</span> <span class="opt">?-dest_file <i class="arg">dest_file</i>?</span> <span class="opt">?name?</span></a></dt>
<dd><p>This command inserts procedure documentations into an existing master document at the locations indicated by insertion placeholders which are matching the pattern of <span class="opt">?search_pattern?</span>. The existing master document is either provided as data to the argument (<span class="opt">?src_string?</span>) or via a file (<span class="opt">?src_file?</span>). The final document is returned by <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> if no destination file is defined (<span class="opt">?dest_file?</span>). Otherwise, the document is stored in the specified file, and the number of insertion placeholders that could be handled successfully is returned.</p>
<p>Any insertion placeholders of the master document are handled by default. By defining the argument <span class="opt">?name?</span> the documentation insertion will be restricted to a particular procedure.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">ARGUMENTS</a></h2>
<dl class="doctools_definitions">
<dt><span class="opt">?-format <i class="arg">format</i>?</span></dt>
<dd><p>Specifies the documentation format. <b class="package">TEPAM Doc Gen</b> provides support for the following formats:</p>
<ul class="doctools_itemized">
<li><p>TXT - Text format (default)</p></li>
<li><p>HTML</p></li>
<li><p>POD - Perl Plain Old Documentation format (PerlPOD)</p></li>
<li><p>DT - TclLib DocTool format</p></li>
</ul>
<p>Section <span class="sectref"><a href="#section4">ADDING SUPPORT FOR NEW DOCUMENT FORMATS</a></span> shows how support for additional formats can be added.</p></dd>
<dt><span class="opt">?-style <i class="arg">style</i>?</span></dt>
<dd><p>The documentation is by default generated in Tcl style (e.g. <b class="cmd">command arg1 arg2 ...</b>). C-style documentation can be generated by setting this argument to 'C' (e.g. <b class="cmd">command(arg1,arg2,...)</b>).</p></dd>
<dt><span class="opt">?-dest_file <i class="arg">dest_file</i>?</span></dt>
<dd><p>If <span class="opt">?dest_file?</span> is defined the documentation is written into the specified destination file. Otherwise the documentation string is returned by the commands <b class="cmd">generate</b> and <b class="cmd"><a href="../../../../index.html#key662">patch</a></b>.</p></dd>
<dt><i class="arg">name</i> / <span class="opt">?name?</span></dt>
<dd><p>This is the name of the procedure for which the documentation has to be generated. This is a mandatory argument for <b class="cmd">generate</b>, but an optional argument for <b class="cmd"><a href="../../../../index.html#key662">patch</a></b>.</p></dd>
<dt><span class="opt">?-header_footer?</span></dt>
<dd><p><b class="cmd">Generate</b> adds to the generated procedure documentation the file header and footer only if a file is generated. By selecting the flag <span class="opt">?-header_footer?</span> the header and footer are also generated if the documentation is returned as string by <b class="cmd">generate</b>.</p></dd>
<dt><span class="opt">?-src_string <i class="arg">src_string</i> | -src_file <i class="arg">src_file</i>?</span></dt>
<dd><p><b class="cmd"><a href="../../../../index.html#key662">Patch</a></b> inserts procedure documentations into an existing document that is either provided as string to the argument (<span class="opt">?src_string?</span>) or as a file (<span class="opt">?src_file?</span>). One of these two arguments need to be specified.</p></dd>
<dt><span class="opt">?-search_pattern <i class="arg">search_pattern</i>?</span></dt>
<dd><p>The argument <span class="opt">?search_pattern?</span> defines the documentation insertion placeholder used in a document. It is a regular expression accepted by <b class="cmd">regexp</b> and needs to contain a parenthesized sub-expression that contains the procedure name for which the documentation needs to be inserted.</p>
<p>The default insertion placeholder pattern is <em>\{!(.*?)!\}</em>, which means that the procedure name will be embedded between <em>{!</em> and <em>!}</em>. The section <span class="sectref"><a href="#section5">EXAMPLES</a></span> contains a custom insertion placeholder pattern example.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PREDEFINED DOCUMENT FORMATS</a></h2>
<p><b class="package">TEPAM Doc Gen</b> pre-defines the following document formats:</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">TXT - Text format</a></h3>
<p>The documentation will be generated in a simple text format if this format is selected. The format can be customized via the following variable:</p>
<dl class="doctools_definitions">
<dt><b class="variable">tepam::doc_gen::Option(TXT,MaxLineLength)</b></dt>
<dd><p>Default: 80</p>
<p>This variable defines the line wrapping limit (character position).</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">HTML - HTML format</a></h3>
<p><b class="package">TEPAM Doc Gen</b> generates CSS styled HTML files. The HTML documentation can be customized via the following variable:</p>
<dl class="doctools_definitions">
<dt><b class="variable">tepam::doc_gen::Option(HTML,CssFile)</b></dt>
<dd><p>Default: &quot;<b class="file">tepam_doc_stylesheet.css</b>&quot;</p>
<p>This variable specifies the CSS stylesheet file that is referred by the generated HTML files.</p></dd>
</dl>
<p>The CSS stylesheet can be customized to change the documentation formatting. A good starting point to create a customized CSS stylesheet is to use the CSS file provided by the <b class="package">TEPAM Doc Gen</b> example/demo. The HTML documentation uses the following CSS class styles:</p>
<ul class="doctools_itemized">
   
<li><p><em>h1.tepam_page_title</em> - Document page title. Only used by <b class="cmd">generate</b> if a file is created or if the header and footer are built (flag <span class="opt">?-header_footer?</span> selected).</p></li>
<li><p><em>div.tepam_command_help</em> - Documentation container. The entire procedure documentation is placed inside this container.</p></li>
<li><p><em>p.tepam_section_title</em> - Section title (e.g. <em>Name</em>, <em>Synopsis</em>, <em>Description</em>, ...)</p></li>
<li><p><em>p.tepam_sub_section_title</em> - Sub-section title (used to separate the documentation of multiple sub-procedures)</p></li>
<li><p><em>p.tepam_name</em> - Name section</p></li>
<li><p><em>p.tepam_synopsis</em> - Synopsis section</p></li>
<li><p><em>p.tepam_description</em> - Single description paragraph</p></li>
<li><p><em>ul.tepam_description_list</em> - Item of a HTML bulleted/unordered list inside the description section</p></li>
<li><p><em>dt.tepam_argument</em> - Item of a HTML description list used to list the procedure arguments</p></li>
<li><p><em>p.tepam_argument_description</em> - Argument description paragraph</p></li>
<li><p><em>p.tepam_argument_attribute</em> - Argument attribute line</p></li>
<li><p><em>pre.tepam_example</em> - Example section</p></li>
</ul>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">POD - Perl document format</a></h3>
<p>The documentation is generated in the Perl Plain Old Documentation format (PerlPOD) if this format is selected.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">DT - TclLib DocTools format</a></h3>
<p>The documentation is generated in the Tcllib DocTools format if this format is selected.</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">ADDING SUPPORT FOR NEW DOCUMENT FORMATS</a></h2>
<p>Support for a new document format can be added by defining in the <b class="namespace">tepam::doc_gen</b> namespace a set of procedures that generate the different document components.</p>
<p>The following documentation listing contains tokens that refer to the different document generation procedures:</p>
<pre class="doctools_example"> <em>     &lt;01&gt;</em>
 <em>&lt;03&gt; &lt;20s&gt;</em>   NAME<em>&lt;20e&gt;</em>
 <em>     &lt;30s&gt;</em>       message_box - Displays text in a message box<em>&lt;30e&gt;</em>
 <em>     &lt;20s&gt;</em>   SYNOPSYS<em>&lt;20e&gt;</em>
 <em>     &lt;40s&gt;</em>       message_box [-mtype &lt;mtype&gt;] &lt;text&gt;<em>&lt;40e&gt;</em>
 <em>     &lt;20s&gt;</em>   DESCRIPTION<em>&lt;20e&gt;</em>
 <em>     &lt;21s&gt;     message_box&lt;21e&gt;</em>
 <em>     &lt;54s&gt;       message_box [-mtype &lt;mtype&gt;] &lt;text&gt;&lt;54e&gt;</em>
 <em>     &lt;50s&gt;</em>       This procedure allows displaying a text in an message box. The following
 <em>          </em>       message types are supported:<em>&lt;50e&gt;</em>
 <em>&lt;51&gt; &lt;53s&gt;</em>       * Info<em>&lt;53e&gt;</em>
 <em>     &lt;53s&gt;</em>       * Warning<em>&lt;53e&gt;</em>
 <em>     &lt;53s&gt;</em>       * Error<em>&lt;53e&gt;</em>                                           <em>&lt;52&gt;</em>
 <em>     &lt;50s&gt;</em>       If the text parameter is use multiple times the different texts are
 <em>          </em>       concatenated to create the message text.<em>&lt;50e&gt;</em>
 <em>     &lt;20s&gt;</em>   ARGUMENTS<em>&lt;20e&gt;</em>
 <em>&lt;60&gt; &lt;62s&gt;</em>       [-mtype &lt;mtype&gt;]<em>&lt;62e&gt;</em>
 <em>&lt;63&gt; &lt;65s&gt;</em>          Message type<em>&lt;65e&gt;</em>
 <em>     &lt;66s&gt;</em>          Default: &quot;Warning&quot;<em>&lt;66e&gt;</em>
 <em>     &lt;66s&gt;</em>          Multiple: yes<em>&lt;66e&gt;</em>
 <em>     &lt;66s&gt;</em>          Choices: Info, Warning, Error<em>&lt;66e&gt;</em>                  <em>&lt;64&gt;</em>
 <em>     &lt;62s&gt;</em>       &lt;text&gt;<em>&lt;62e&gt;</em>
 <em>&lt;63&gt; &lt;65s&gt;</em>          One or multiple text lines to display<em>&lt;65e&gt;</em>
 <em>     &lt;66s&gt;</em>          Type: string<em>&lt;66e&gt;</em>
 <em>     &lt;66s&gt;</em>          Multiple: yes<em>&lt;66e&gt;</em>                                  <em>&lt;64&gt;&lt;61&gt;</em>
 <em>     &lt;20s&gt;</em>   EXAMPLE<em>&lt;20e&gt;</em>
 <em>&lt;70&gt; &lt;72s&gt;</em>       message_box &quot;Please save first the document&quot;<em>&lt;72e&gt;</em>
 <em>     &lt;73s&gt;</em>       -&gt; 1<em>&lt;73e&gt;</em>                                              <em>&lt;71&gt;&lt;04&gt;</em>
 <em>     &lt;02&gt;</em></pre>
<p>There are 2 types of document generation procedures:</p>
<dl class="doctools_definitions">
   
<dt>Content generation procedures (e.g. &lt;40s&gt;...&lt;40e&gt;)</dt>
<dd><p>These procedures generate some document content based on the text that is provided as procedure argument. The listing above shows two tokens for these procedures to indicate the beginning and the end of the generated content.</p></dd>
<dt>Control generation procedures (e.g. &lt;03&gt;)</dt>
<dd><p>These procedures generate control constructs, for example to generate the prolog code and epilog code for lists, sections, etc. These procedures have no argument.</p></dd>
</dl>
<p>The following set of procedures needs to be defined to provide support for a new document format:</p>
<dl class="doctools_definitions">
<dt><em>01</em> - <b class="cmd">gen($Format,Header)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Only called if <b class="cmd">doc_gen</b> generates a file or if it is called with the flag <span class="opt">?-header_footer?</span>. The procedure creates the file header. The provided parameter is the procedure name for which the documentation has to be generated.</p></dd>
<dt><em>02</em> - <b class="cmd">gen($Format,Footer)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Only called if <b class="cmd">doc_gen</b> generates a file or if it is called with the flag <span class="opt">?-header_footer?</span>. The procedure creates the file footer.</p></dd>
<dt><em>03</em> - <b class="cmd">gen($Format,Begin)</b> {}</dt>
<dd><p>Generates the documentation prolog (preamble)</p></dd>
<dt><em>04</em> - <b class="cmd">gen($Format,End)</b> {}</dt>
<dd><p>Generates the documentation epilog</p></dd>
<dt><em>20</em> - <b class="cmd">gen($Format,SectionTitle)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates a section title (e.g. <em>Name</em>, <em>Synopsis</em>, <em>Description</em>, ...). The raw title text is provided as parameter</p></dd>
<dt><em>21</em> - <b class="cmd">gen($Format,SubSectionTitle)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates a sub-section title. Sub-sections are used if a single documentation is generated for multiple sub-commands to make a separation between them. The raw title text is provided as parameter</p></dd>
<dt><em>30</em> - <b class="cmd">gen($Format,Name)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates the name section (without title). The raw section text is provided as parameter.</p></dd>
<dt><em>40</em> - <b class="cmd">gen($Format,Synopsis)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates the synopsis section (without title). The section text provided as parameter is pre-formatted (the argument strings are generated by <b class="cmd">gen($Format,ArgumentString)</b>).</p></dd>
<dt><em>50</em> - <b class="cmd">gen($Format,Description)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates a description paragraph. The raw paragraph text is provided as parameter.</p></dd>
<dt><em>51</em> - <b class="cmd">gen($Format,DescriptionListBegin)</b> {}</dt>
<dd><p>Generates the prolog of a bulleted/unordered list inside the description section. This prolog is usually the start code of a list structure.</p></dd>
<dt><em>52</em> - <b class="cmd">gen($Format,DescriptionListEnd)</b> {}</dt>
<dd><p>Generates the epilog of a bulleted/unordered list inside the description section. This epilog is usually the end code of a list structure.</p></dd>
<dt><em>53</em> - <b class="cmd">gen($Format,DescriptionListItem)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates a text item in a bulleted/unordered description list. The raw item text is provided as parameter.</p></dd>
<dt><em>54</em> - <b class="cmd">gen($Format,DescriptionSynopsis)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates the synopsis line on the beginning of the description section. The command can return an empty string if no synopsys line is required at this place.</p>
<p>Some formats (e.g. Tcl DocTools) require that the synopsis line is defined in the description section, to build then automatically the synopsis section. The section text provided as parameter is pre-formatted (the argument strings are generated by <b class="cmd">gen($Format,ArgumentString)</b>).</p></dd>
<dt><em>60</em> - <b class="cmd">gen($Format,ArgumentListBegin)</b> {}</dt>
<dd><p>Generates the prolog of argument list (definition/non-bulleted list). This prolog is usually the start code of a definition list.</p></dd>
<dt><em>61</em> - <b class="cmd">gen($Format,ArgumentListEnd)</b> {}</dt>
<dd><p>Generates the epilog of the argument list. This epilog is usually the end string of a list structure.</p></dd>
<dt><em>62</em> - <b class="cmd">gen($Format,ArgumentListItem)</b> {Name IsOptional IsNamed Type}</dt>
<dd><p>Generates an argument item line inside the argument list. This command can rely on <b class="cmd">gen($Format,ArgumentDetailBegin)</b> since the parameters are identical.</p></dd>
<dt><em>63</em> - <b class="cmd">gen($Format,ArgumentDetailBegin)</b> {}</dt>
<dd><p>Generates the argument details prolog (preamble).</p></dd>
<dt><em>64</em> - <b class="cmd">gen($Format,ArgumentDetailEnd)</b> {}</dt>
<dd><p>Generates the argument details epilog</p></dd>
<dt><em>65</em> - <b class="cmd">gen($Format,ArgumentDescription)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates the argument description (single paragraph).</p></dd>
<dt><em>66</em> - <b class="cmd">gen($Format,ArgumentAttribute)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates a single argument attribute string. The command is called individually for each attribute.</p></dd>
<dt><em>70</em> - <b class="cmd">gen($Format,ExampleBegin)</b> {}</dt>
<dd><p>Generates the example section prolog (preamble)</p></dd>
<dt><em>71</em> - <b class="cmd">gen($Format,ExampleEnd)</b> {}</dt>
<dd><p>Generates the example section epilog</p></dd>
<dt><em>72</em> - <b class="cmd">gen($Format,ExampleCommandLine)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates a single command line in the example section. The command is called for each individual command line.</p></dd>
<dt><em>73</em> - <b class="cmd">gen($Format,ExampleResultLine)</b> {<i class="arg">Text</i>}</dt>
<dd><p>Generates a command result line</p></dd>
<dt><em>80</em> - <b class="cmd">gen($Format,ArgumentString)</b> {Name IsOptional IsNamed Type}</dt>
<dd><p>Generates the part of the command line or the synopsis that is specific to an argument. The generated string has to indicate if an argument is optional, named and if it is a flag.</p>
<p>The following parameters are provided to this procedure:</p>
<dl class="doctools_definitions">
   
<dt><i class="arg">Name</i></dt>
<dd><p>Name of the argument</p></dd>
<dt><i class="arg">IsOptional</i></dt>
<dd><p>If true (=<b class="const">1</b>) the argument is optional which should be indicated by the generated string (for example by putting the argument into brackets {} or into question marks '?'):</p>
<pre class="doctools_example">gen(TXT,ArgumentString) mtype 1 0 string -&gt; <em>&quot;[mtype]&quot;</em></pre>
</dd>
<dt><i class="arg">IsNamed</i></dt>
<dd><p>If true (=<b class="const">1</b>) an argument is a named argument (option). The generated string should in this case contain the argument/option name, followed by the argument itself:</p>
<pre class="doctools_example">gen(TXT,ArgumentString) mtype 0 1 string -&gt; <em>&quot;-mtype &lt;mtype&gt;&quot;</em></pre>
<p>Named arguments can also be optional:</p>
<pre class="doctools_example">gen(TXT,ArgumentString) mtype 1 1 string -&gt; <em>&quot;[-mtype &lt;mtype&gt;]&quot;</em></pre>
</dd>
<dt><i class="arg">Type</i></dt>
<dd><p>Indicates the type of the argument. If the type is set to <b class="const">none</b> the argument is a flag, which needs to be indicated by the generated string. Example:</p>
<pre class="doctools_example">gen(TXT,ArgumentString) close 1 1 none -&gt; <em>&quot;[-close]&quot;</em></pre>
</dd>
</dl></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">tepam::doc_gen::generate</a></h3>
<p>The <b class="package">TEPAM Doc Gen</b> package can be explored by generating the documentation of the command <b class="cmd">tepam::doc_gen::generate</b>. The following example generates the document in text format (default format):</p>
<pre class="doctools_example"><b class="cmd">tepam::doc_gen::generate</b> tepam::doc_gen::generate</pre>
<p>The next example generates the documentation in HTML format:</p>
<pre class="doctools_example"><b class="cmd">tepam::doc_gen::generate</b> -format HTML tepam::doc_gen::generate</pre>
<p>The flag <span class="opt">?header_footer?</span> adds also the file header and footer:</p>
<pre class="doctools_example"><b class="cmd">tepam::doc_gen::generate</b> -format HTML -header_footer tepam::doc_gen::generate</pre>
<p>The documentation can directly be stored in a file. The file header and footer are automatically generated in this way:</p>
<pre class="doctools_example"><b class="cmd">tepam::doc_gen::generate</b> -format HTML -dest_file doc_gen.html tepam::doc_gen::generate</pre>
<p>The generated HTML file refers a CSS stylesheet file (default: tepam_doc_stylesheet.css). To display the HTML file correctly this CSS stylesheet file needs to be copied into the directory of the generated HTML file.</p>
<p>The Tcl DOC Tools format can be used as intermediate format to generate other formats, for example HTML:</p>
<pre class="doctools_example">
<em># Generate the documentation in Tcl Doc Tool format</em>
set dt [<b class="cmd">tepam::doc_gen::generate</b> -format DT -header_footer tepam::doc_gen::generate]
<em></em>
<em># Create a new doc tools object (HTML format)</em>
package require doctools
::doctools::new myDoc -format html
<em></em>
<em># Open the HTML file, and write the HTML formatted documentation</em>
set fHtml [open doc_gen.dt.html w]
puts $fHtml [myDoc format $dt]
close $fHtml
</pre>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">tepam::doc_gen::patch</a></h3>
<p>While <b class="cmd">generate</b> provides a limited number of possibilities to vary the document structure, <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> offers more flexibility. Multiple documentations for different procedures and meta information can for example be added.</p>
<p>The following listing shows how the <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> command works. It defines first a HTML master document string that contains 2 procedure documentation placeholders (<em>{*&lt;ProcedureName&gt;*}</em>). There placeholders are replaced by <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> with the generated documentation of the referred procedures. Since nonstandard placeholders are used, <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> is called with an explicit placeholder pattern definition (argument <i class="arg">search_pattern</i>).</p>
<pre class="doctools_example">
<em># Define the HTML master document</em>
set HtmlMasterDoc {\
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;tepam::doc_gen&lt;/title&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;tepam_doc_stylesheet.css&quot;&gt;
    &lt;meta content=&quot;documentation&quot; name=&quot;keywords&quot;&gt;&lt;/meta&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;tepam::doc_gen&lt;/h1&gt;
      &lt;h2&gt;Generate&lt;/h2&gt;
<b class="cmd">{*tepam::doc_gen::generate*}</b>
      &lt;h2&gt;Patch&lt;/h2&gt;
<b class="cmd">{*tepam::doc_gen::patch*}</b>
  &lt;/body&gt;
&lt;html&gt;\
}
<em></em>
<em># Patch the master document: This will replace the placeholders by the 
# procedure documentation divisions:</em>
<b class="cmd">tepam::doc_gen::patch</b> -format HTML -search_pattern {\{\*(.*?)\*\}} \
                      -src_string $HtmlMasterDoc -dest_file tepam_doc_gen.html
</pre>
</div>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_introduction.html">tepam(n)</a>, <a href="tepam_procedure.html">tepam::procedure(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key831">automatic documentation</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key832">procedure documentation</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2013, Andreas Drollinger</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tepam/tepam_introduction.html.

































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
<div class='fossil-doc' data-title='tepam - Tcl's Enhanced Procedure and Argument Manager'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam - An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">OVERVIEW</a></li>
<li class="doctools_section"><a href="#section3">PROCEDURE DECLARATION</a></li>
<li class="doctools_section"><a href="#section4">PROCEDURE HELP</a></li>
<li class="doctools_section"><a href="#section5">PROCEDURE CALL</a></li>
<li class="doctools_section"><a href="#section6">INTERACTIVE PROCEDURE CALLS</a></li>
<li class="doctools_section"><a href="#section7">FLEXIBLE ARGUMENT DIALOG BOX</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is an informal introduction into TEPAM, the Tcl's Enhanced Procedure and Argument Manager. Detailed information to the TEPAM package is provided in the <em>tepam::procedure</em> and <em>tepam::argument_dialogbox</em> reference manuals.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">OVERVIEW</a></h2>
<p>This package provides a new Tcl procedure declaration syntax that simplifies the implementation of procedure subcommands and the handling of the different types of procedure arguments like flags or switches, options, unnamed arguments, optional and mandatory options and arguments, default values, etc. Procedure declarations can be enriched with detailed information about the procedure and its arguments. This information is used for the following purposes:</p>
<p>First of all, a preamble is added in front of the body of a procedure that is declared with TEPAM. This preamble calls an argument manager that that uses the provided information to check the validity of the argument types and values before the procedure body is executed. Then, the information is used to generate help and usage texts if requested, or to generate clear error message in case an argument validation fails. The information also allows generating automatically graphical forms that allows an interactive definition of all arguments, in case a procedure is called interactively. And finally, the additional information helps self-commenting in a clean way the declaration of a procedure and of all its arguments.</p>
<p>The graphical form generator that creates the necessary argument specification forms for the interactive procedure calls is also available for other purposes than for procedure argument specifications. It allows creating code efficiently complex parameter entry forms that are usable independently from TEPAM's new procedure definition method.</p>
<p>Here is a short overview about all major TEPAM features:</p>
<ul class="doctools_itemized">
<li><p>New self-documenting procedure declaration syntax: The additional information to declare properly a procedure has not to be provided with additional statements, but can be added in a natural syntax directly into the procedure header.</p></li>
<li><p>Easy way to specify subcommands: A subcommand is declared like a procedure, simply with a procedure name composed by a base name followed by a subcommand name. Sub-subcommands are created identically using simply procedure names composed by 3 words.</p></li>
<li><p>Flexible usage of flags (switches), options (named arguments) and unnamed arguments. Option names are optionally automatically completed.</p></li>
<li><p>Support for default values, mandatory/optional options and arguments, choice lists, value ranges, multiple usable options/arguments.</p></li>
<li><p>Choice of a <em>named arguments first, unnamed arguments later</em> procedure calling style (typical for Tcl commands) or of an <em>unnamed arguments first, named arguments later</em> procedure calling style (typical for Tk commands).</p></li>
<li><p>In case the <em>named arguments first, unnamed arguments later</em> style (Tcl) is selected:  Clear separation between options and arguments via the &quot;--&quot; flag. The unnamed arguments can optionally be accessed as options (named arguments).</p></li>
<li><p>Automatic type and value check before the procedure body is executed, taking into account validation ranges, choice lists and custom validation commands. Generation of clear error message if necessary.</p></li>
<li><p>Many predefined types exist (integer, boolean, double, color, file, font, ...). Other application specific types can easily be added.</p></li>
<li><p>Automatic help and usage text generation if a procedure is called with the <i class="arg">-help</i> flag.</p></li>
<li><p>Automatic generation of an interactive argument definition form, in case a procedure is called with the <i class="arg">-interactive</i> flag.</p></li>
<li><p>Procedure calls can be logged which is useful to get for interactively called procedures the command call lines.</p></li>
<li><p>Powerful and code efficient generation of complex parameter definition forms.</p></li>
</ul>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROCEDURE DECLARATION</a></h2>
<p>TEPAM's procedure declaration syntax is simple and self-explaining. Instead of declaring a procedure with the Tcl key word <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>, a procedure is declared with the TEPAM command <b class="cmd"><a href="../../../../index.html#key41">procedure</a></b> which takes as <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> also 3 arguments: The procedure name, the procedure header and the procedure body.</p>
<p>The following example declares the subcommand <b class="cmd"><a href="../../../../index.html#key361">message</a></b> of the procedure <b class="cmd">display</b>. This command has several named and unnamed arguments:</p>
<pre class="doctools_example"><b class="cmd"><a href="tepam_procedure.html">tepam::procedure</a></b> {display message} {
   -return            -
   -short_description &quot;Displays a simple message box&quot;
   -description       &quot;This procedure allows displaying a configurable message box.&quot;
   -args {
      {-mtype -default Warning -choices {Info Warning Error} -description &quot;Message type&quot;}
      {-font -type font -default {Arial 10 italic} -description &quot;Message text font&quot;}
      {-level -type integer -optional -range {1 10} -description &quot;Message level&quot;}
      {-fg -type color -default black -description &quot;Message color&quot;}
      {-bg -type color -optional -description &quot;Background color&quot;}
      {-no_border -type none -description &quot;Use a splash window style (no border)&quot;}
      {-log_file -type file -optional -description &quot;Optional message log file&quot;}
      {text -type string -multiple -description &quot;Multiple text lines to display&quot;}
   }
} {
<em>   puts &quot;display message:&quot;
   foreach var {mtype font level fg bg no_border log_file text} {
      if {[info exists $var]} {
         puts  &quot;  $var=[set $var]&quot;
      }
   }
</em>}</pre>
<p>A call of procedure that has been declared in this way will first invoke the TEPAM argument manager, before the procedure body is executed. The argument manager parses the provided arguments, validates them, completes them eventually with some default values, and makes them finally available to the procedure body as local variables. In case an argument is missing or has a wrong type, the argument manager generates an error message that explains the reason for the error.</p>
<p>As the example above shows, the TEPAM command <b class="cmd"><a href="../../../../index.html#key41">procedure</a></b> accepts subcommand definitions as procedure name and allows defining much more information than just the argument list inside the procedure header. The procedure body on the other hand is identical between a command declared with <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> and a command declared with <b class="cmd"><a href="../../../../index.html#key41">procedure</a></b>.</p>
<p>The procedure header allows defining in addition to the arguments some procedure attributes, like a description, information concerning the return value, etc. This information is basically used for the automatic generation of comprehensive help and usage texts.</p>
<p>A list of argument definition statements assigned to the <i class="arg">-args</i> argument is defining the procedure arguments. Each argument definition statement starts with the argument name, optionally followed by some argument attributes.</p>
<p>Three types of arguments can be defined: Unnamed arguments, named arguments and flags. The distinction between the named and unnamed arguments is made by the first argument name character which is simply &quot;-&quot; for named arguments. A flag is defined as named argument that has the type  <em>none</em>.</p>
<p>Named and unnamed arguments are mandatory, unless they are declared with the <i class="arg">-optional</i> flag and unless they have a default value specified with the <i class="arg">-default</i> option. Named arguments and the last unnamed argument can have the attribute <i class="arg">-multiple</i>, which means that they can be defined multiple times. The expected argument data type is specified with the <i class="arg">-type</i> option. TEPAM defines a large set of standard data types which can easily be completed with application specific data types.</p>
<p>The argument declaration order has only an importance for unnamed arguments that are by default parsed after the named arguments (Tcl style). A variable allows changing this behavior in a way that unnamed arguments are parsed first, before the named arguments (Tk style).</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PROCEDURE HELP</a></h2>
<p>The declared procedure can simply be called with the <i class="arg">-help</i> option to get the information about the usage of the procedure and its arguments:</p>
<pre class="doctools_example"><b class="cmd">display message</b> -help
<em>  -&gt;
NAME
      display message - Displays a simple message box
SYNOPSYS
      display message
            [-mtype &lt;mtype&gt;] :
               Message type, default: &quot;Warning&quot;, choices: {Info Warning Error}
            [-font &lt;font&gt;] :
               Message text font, type: font, default: Arial 10 italic
            [-level &lt;level&gt;] :
               Message level, type: integer, range: 1..10
            [-fg &lt;fg&gt;] :
               Message color, type: color, default: black
            [-bg &lt;bg&gt;] :
               Background color, type: color
            [-no_border ] :
               Use a splash window style (no border)
            [-log_file &lt;log_file&gt;] :
               Optional message log file, type: file
            &lt;text&gt; :
               Multiple text lines to display, type: string
DESCRIPTION
      This procedure allows displaying a configurable message box.</em></pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">PROCEDURE CALL</a></h2>
<p>The specified procedure can be called in many ways. The following listing shows some valid procedure calls:</p>
<pre class="doctools_example"><b class="cmd">display message</b> &quot;The document hasn't yet been saved!&quot;
<em>-&gt; display message:
     mtype=Warning
     font=Arial 10 italic
     fg=black
     no_border=0
     text={The document hasn't yet been saved!}</em>
<b class="cmd">display message</b> -fg red -bg black &quot;Please save first the document&quot;
<em>-&gt; display message:
     mtype=Warning
     font=Arial 10 italic
     fg=red
     bg=black
     no_border=0
     text={Please save first the document}</em>
<b class="cmd">display message</b> -mtype Error -no_border &quot;Why is here no border?&quot;
<em>-&gt; display message:
     mtype=Error
     font=Arial 10 italic
     fg=black
     no_border=1
     text={Why is here no border?}</em>
<b class="cmd">display message</b> -font {Courier 12} -level 10 \
   &quot;Is there enough space?&quot; &quot;Reduce otherwise the font size!&quot;
<em>-&gt; display message:
     mtype=Warning
     font=Courier 12
     level=10
     fg=black
     no_border=0
     text={Is there enough space?} {Reduce otherwise the font size!}</em></pre>
<p>The next lines show how wrong arguments are recognized. The <i class="arg">text</i> argument that is mandatory is missing in the first procedure call:</p>
<pre class="doctools_example"><b class="cmd">display message</b> -font {Courier 12}
<em>  -&gt; display message: Required argument is missing: text</em></pre>
<p>Only known arguments are accepted:</p>
<pre class="doctools_example"><b class="cmd">display message</b> -category warning Hello
<em>  -&gt; display message: Argument '-category' not known</em></pre>
<p>Argument types are automatically checked and an error message is generated in case the argument value has not the expected type:</p>
<pre class="doctools_example"><b class="cmd">display message</b> -fg MyColor &quot;Hello&quot;
<em>  -&gt; display message: Argument 'fg' requires type 'color'.  Provided value: 'MyColor'</em></pre>
<p>Selection choices have to be respected ...</p>
<pre class="doctools_example"><b class="cmd">display message</b> -mtype Fatal Hello
<em>  -&gt; display message: Argument (mtype) has to be one of the  following elements: Info, Warning, Error</em></pre>
<p>... as well as valid value ranges:</p>
<pre class="doctools_example"><b class="cmd">display message</b> -level 12 Hello
<em>  -&gt; display message: Argument (level) has to be between 1 and 10</em></pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">INTERACTIVE PROCEDURE CALLS</a></h2>
<p>The most intuitive way to call the procedure is using an form that allows specifying all arguments interactively. This form will automatically be generated if the declared procedure is called with the <i class="arg">-interactive</i> flag. To use this feature the Tk library has to be loaded.</p>
<pre class="doctools_example"><b class="cmd">display message</b> -interactive</pre>
<p>The generated form contains for each argument a data entry widget that is adapted to the argument type. Check buttons are used to specify flags, radio boxes for tiny choice lists, disjoint list boxes for larger choice lists and files, directories, fonts and colors can be selected with dedicated browsers.</p>
<p>After acknowledging the specified argument data via an OK button, the entered data are first validated, before the provided arguments are transformed into local variables and the procedure body is executed. In case the entered data are invalid, a message appears and the user can correct them until they are valid.</p>
<p>The procedure calls can optionally be logged in a variable. This is for example useful to get the command call lines of interactively called procedures.</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">FLEXIBLE ARGUMENT DIALOG BOX</a></h2>
<p>The form generator that creates in the previous example the argument dialog box for the interactive procedure call is also available for other purposes than for the definition of procedure arguments. If Tk has been loaded TEPAM provides and argument dialog box that allows creating complex parameter definition forms in a very efficient way.</p>
<p>The following example tries to illustrate the simplicity to create complex data entry forms. It creates an input mask that allows specifying a file to copy, a destination folder as well as a checkbox that allows specifying if an eventual existing file can be overwritten. Comfortable browsers can be used to select files and directories. And finally, the form offers also the possibility to accept and decline the selection. Here is the code snippet that is doing all this:</p>
<pre class="doctools_example"><b class="cmd"><a href="tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></b> \
   <b class="cmd">-existingfile</b> {-label &quot;Source file&quot; -variable SourceFile} \
   <b class="cmd">-existingdirectory</b> {-label &quot;Destination folder&quot; -variable DestDir} \
   <b class="cmd">-checkbutton</b> {-label &quot;Overwrite existing file&quot; -variable Overwrite}</pre>
<p>The <b class="cmd">argument_dialogbox</b> returns <b class="const">ok</b> if the entered data are validated. It will return <b class="const">cancel</b> if the data entry has been canceled. After the validation of the entered data, the <b class="cmd">argument_dialogbox</b> defines all the specified variables with the entered data inside the calling context.</p>
<p>An <b class="cmd">argument_dialogbox</b> requires a pair of arguments for each variable that it has to handle. The first argument defines the entry widget type used to select the variable's value and the second one is a lists of attributes related to the variable and the entry widget.</p>
<p>Many entry widget types are available: Beside the simple generic entries, there are different kinds of list and combo boxes available, browsers for existing and new files and directories, check and radio boxes and buttons, as well as color and font pickers. If necessary, additional entry widgets can be defined.</p>
<p>The attribute list contains pairs of attribute names and attribute data. The primary attribute is <i class="arg">-variable</i> used to specify the variable in the calling context into which the entered data has to be stored. Another often used attribute is <i class="arg">-label</i> that allows adding a label to the data entry widget. Other attributes are available that allow specifying default values, the expected data types, valid data ranges, etc.</p>
<p>The next example of a more complex argument dialog box provides a good overview about the different available entry widget types and parameter attributes. The example contains also some formatting instructions like <i class="arg">-frame</i> and <i class="arg">-sep</i> which allows organizing the different entry widgets in frames and sections:</p>
<pre class="doctools_example">set ChoiceList {&quot;Choice 1&quot; &quot;Choice 2&quot; &quot;Choice 3&quot; &quot;Choice 4&quot; &quot;Choice 5&quot; &quot;Choice 6&quot;}
set Result [<b class="cmd"><a href="tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></b> \
   <b class="cmd">-title</b> &quot;System configuration&quot; \
   <b class="cmd">-context</b> test_1 \
   <b class="cmd">-frame</b> {-label &quot;Entries&quot;} \
      <b class="cmd">-entry</b> {-label Entry1 -variable Entry1} \
      <b class="cmd">-entry</b> {-label Entry2 -variable Entry2 -default &quot;my default&quot;} \
   <b class="cmd">-frame</b> {-label &quot;Listbox &amp; combobox&quot;} \
      <b class="cmd">-listbox</b> {-label &quot;Listbox, single selection&quot; -variable Listbox1 \
                -choices {1 2 3 4 5 6 7 8} -default 1 -height 3} \
      <b class="cmd">-listbox</b> {-label &quot;Listbox, multiple selection&quot; -variable Listbox2
                -choicevariable ChoiceList -default {&quot;Choice 2&quot; &quot;Choice 3&quot;}
                -multiple_selection 1 -height 3} \
      <b class="cmd">-disjointlistbox</b> {-label &quot;Disjoined listbox&quot; -variable DisJntListbox
                        -choicevariable ChoiceList \
                        -default {&quot;Choice 3&quot; &quot;Choice 5&quot;} -height 3} \
      <b class="cmd">-combobox</b> {-label &quot;Combobox&quot; -variable Combobox \
                 -choices {1 2 3 4 5 6 7 8} -default 3} \
   <b class="cmd">-frame</b> {-label &quot;Checkbox, radiobox and checkbutton&quot;} \
      <b class="cmd">-checkbox</b> {-label Checkbox -variable Checkbox
                 -choices {bold italic underline} -choicelabels {Bold Italic Underline} \
                 -default italic} \
      <b class="cmd">-radiobox</b> {-label Radiobox -variable Radiobox
                 -choices {bold italic underline} -choicelabels {Bold Italic Underline} \
                 -default underline} \
      <b class="cmd">-checkbutton</b> {-label CheckButton -variable Checkbutton -default 1} \
   <b class="cmd">-frame</b> {-label &quot;Files &amp; directories&quot;} \
      <b class="cmd">-existingfile</b> {-label &quot;Input file&quot; -variable InputFile} \
      <b class="cmd">-file</b> {-label &quot;Output file&quot; -variable OutputFile} \
      <b class="cmd">-sep</b> {} \
      <b class="cmd">-existingdirectory</b> {-label &quot;Input directory&quot; -variable InputDirectory} \
      <b class="cmd">-directory</b> {-label &quot;Output irectory&quot; -variable OutputDirectory} \
   <b class="cmd">-frame</b> {-label &quot;Colors and fonts&quot;} \
      <b class="cmd">-color</b> {-label &quot;Background color&quot; -variable Color -default red} \
      <b class="cmd">-sep</b> {} \
      <b class="cmd">-font</b> {-label &quot;Font&quot; -variable Font -default {Courier 12 italic}}]</pre>
<p>The <b class="cmd">argument_dialogbox</b> defines all the specified variables with the entered data and returns <b class="const">ok</b> if the data have been validated via the Ok button. If the data entry is cancelled by activating the Cancel button, the <b class="cmd">argument_dialogbox</b> returns <b class="const">cancel</b>.</p>
<pre class="doctools_example">if {$Result==&quot;cancel&quot;} {
   puts &quot;Canceled&quot;
} else { # $Result==&quot;ok&quot;
   puts &quot;Arguments: &quot;
   foreach Var {
      Entry1 Entry2
      Listbox1 Listbox2 DisJntListbox
      Combobox Checkbox Radiobox Checkbutton
      InputFile OutputFile InputDirectory OutputDirectory
      Color Font
   } {
      puts &quot;  $Var: '[set $Var]'&quot;
   }
}
<em>-&gt; Arguments:
   Entry1: 'Hello, this is a trial'
   Entry2: 'my default'
   Listbox1: '1'
   Listbox2: '{Choice 2} {Choice 3}'
   DisJntListbox: '{Choice 3} {Choice 5}'
   Combobox: '3'
   Checkbox: 'italic'
   Radiobox: 'underline'
   Checkbutton: '1'
   InputFile: 'c:\tepam\in.txt'
   OutputFile: 'c:\tepam\out.txt'
   InputDirectory: 'c:\tepam\input'
   OutputDirectory: 'c:\tepam\output'
   Color: 'red'
   Font: 'Courier 12 italic'</em></pre>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_argument_dialogbox.html">tepam::argument_dialogbox(n)</a>, <a href="tepam_procedure.html">tepam::procedure(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key764">argument integrity</a>, <a href="../../../../index.html#key765">argument validation</a>, <a href="../../../../index.html#key763">arguments</a>, <a href="../../../../index.html#key766">entry mask</a>, <a href="../../../../index.html#key404">parameter entry form</a>, <a href="../../../../index.html#key41">procedure</a>, <a href="../../../../index.html#key762">subcommand</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Procedures, arguments, parameters, options</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013, Andreas Drollinger</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tepam/tepam_procedure.html.





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
<div class='fossil-doc' data-title='tepam::procedure - Tcl's Enhanced Procedure and Argument Manager'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam::procedure(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam::procedure - TEPAM procedure, reference manual</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">TERMINOLOGY</a></li>
<li class="doctools_section"><a href="#section3">PROCEDURE DECLARATION</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Procedure Attributes</a></li>
<li class="doctools_subsection"><a href="#subsection2">Argument Declaration</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">VARIABLES</a></li>
<li class="doctools_section"><a href="#section5">ARGUMENT TYPES</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Predefined Argument Types</a></li>
<li class="doctools_subsection"><a href="#subsection4">Defining Application Specific Argument Types</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">PROCEDURE CALLS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection5">Help</a></li>
<li class="doctools_subsection"><a href="#subsection6">Interactive Procedure Call</a></li>
<li class="doctools_subsection"><a href="#subsection7">Unnamed Arguments</a></li>
<li class="doctools_subsection"><a href="#subsection8">Named Arguments</a></li>
<li class="doctools_subsection"><a href="#subsection9">Unnamed Arguments First, Named Arguments Later (Tk Style)</a></li>
<li class="doctools_subsection"><a href="#subsection10">Named Arguments First, Unnamed Arguments Later (Tcl Style)</a></li>
<li class="doctools_subsection"><a href="#subsection11">Raw Argument List</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">tepam <span class="opt">?0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">tepam::procedure</b> <i class="arg">name</i> <i class="arg">attributes</i> <i class="arg">body</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides an alternative way to declare Tcl procedures and to manage its arguments. There is a lot of benefit to declare a procedure with TEPAM rather than with the Tcl standard command <b class="function">proc</b>: TEPAM allows specifying inside the procedure declaration all information that is required to generate comprehensive documentations and help support.  The information is also used by an automatically invoked argument checker that validates the provided procedure arguments before the procedure body is executed. Finally, a procedure can be called interactively which will open a graphical form that allows specifying the procedure arguments.</p>
<p>TEPAM simplifies also the handling of the different types of argument, like the <em>named arguments</em> (often also called <em>options</em>) and the <em>unnamed arguments</em>. TEPAM supports the <em>named first, unnamed later</em> style (typical Tcl command style) as well as also the <em>unnamed first, named later</em> style (typical Tk command style). TEPAM takes care about default values for arguments, optional arguments, multiple applicable arguments, etc. and eliminates the need to check the validity of the argument inside the procedure bodies.</p>
<p>An informal overview of all the TEPAM procedure declaration and calling features as well as a short introduction into TEPAM is provided by <em>tepam(n)</em>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TERMINOLOGY</a></h2>
<p>The exact meaning of several terms that are used in this document will be shortly explained to avoid any ambiguities and misunderstandings.</p>
<dl class="doctools_definitions">
<dt><em>Subcommand</em></dt>
<dd><p>The usage of subcommands is heavily used in the Tcl language. Several commands are incorporated into a single main command and are selectable via the first argument.</p>
<p>The <b class="function">string</b> command is an example of such a command that implements for example subcommands to check a character string length, to compare strings, to extract substrings, etc:</p>
<pre class="doctools_example"><b class="function">string length</b> <i class="arg">string</i>
<b class="function">string compare</b> <i class="arg">string</i> <i class="arg">string</i>
<b class="function">string range</b> <i class="arg">string</i> <i class="arg">first</i> <i class="arg">last</i>
...</pre>
<p>TEPAM provides a framework that allows implementing easily such subcommands in form of Tcl procedures. It allows not only defining a first level of subcommands, but also a higher level of subcommands. The <b class="function">string</b> command class check could be implemented as independent sub-sub-commands of the <b class="function">string</b> command:</p>
<pre class="doctools_example"><b class="function">string is alnum</b> <i class="arg">string</i>
<b class="function">string is integer</b> <i class="arg">string</i>
<b class="function">string is double</b> <i class="arg">string</i>
...</pre>
</dd>
<dt><em>Procedure attribute</em></dt>
<dd><p>TEPAM allows attaching to a declared procedure different kind of attributes. Some of these attributes are <em>just</em> used for documentation purposes, but other attributes specify the way how the procedure has to be called. Also the procedure arguments are defined in form of a procedure attribute.</p></dd>
<dt><em>Argument</em></dt>
<dd><p>TEPAM uses the term <em>argument</em> for the parameters of a procedure.</p>
<p>The following example calls the subcommand <b class="cmd">string compare</b> with several arguments:</p>
<pre class="doctools_example"><b class="cmd">string compare</b> <i class="arg">-nocase -length 3 &quot;emphasized&quot; &quot;emphasised&quot;</i></pre>
<p>The following paragraphs discuss these different argument types.</p></dd>
<dt><em>Named argument</em></dt>
<dd><p>Some parameters, as <i class="arg">-length 3</i> of the subcommand <b class="cmd">string compare</b> have to be provided as pairs of argument names and argument values. This parameter type is often also called <em>option</em>.</p>
<p>TEPAM uses the term <em>named argument</em> for such options as well as for the flags (see next item).</p></dd>
<dt><em>Flag, switch</em></dt>
<dd><p>Another parameter type is the <em>flag</em> or the <em>switch</em>. Flags are provided simply by naming the flag leading with the '-' character. The <i class="arg">-nocase</i> of the previous <b class="cmd">string compare</b> example is such a flag.</p>
<p><em>Flags</em> are considered by TEPAM like a special form of <em>named arguments</em>.</p></dd>
<dt><em>Unnamed argument</em></dt>
<dd><p>For the other parameters, e.g. the ones for which the argument name has not to be mentioned, TEPAM uses the term <em>unnamed argument</em>. The previous <b class="cmd">string compare</b> example uses for the two provided character strings two <em>unnamed arguments</em>.</p></dd>
<dt><em>Argument attribute</em></dt>
<dd><p>TEPAM allows describing the purpose of each procedure argument with <em>argument attributes</em>. While some of them are just documenting the attributes, most attributes are used by an argument manager to control and validate the arguments that are provided during a procedure call. Argument attributes are used to specify default values, parameter classes (integer, xdigit, font, ...), choice validation lists, value ranges, etc.</p></dd>
<dt><em>Named arguments first, unnamed arguments later</em></dt>
<dd><p>The <b class="cmd">string compare</b> command of the previous example requires that the <em>named arguments</em> (options, flags) are provided first. The two mandatory (unnamed) arguments have to be provided as last argument.</p>
<pre class="doctools_example"><b class="cmd">string compare</b> <i class="arg">-nocase -length 3 Water $Text</i></pre>
<p>This is the usual Tcl style (exceptions exist) which is referred in the TEPAM documentation as <em>named arguments first, unnamed arguments later style</em>.</p></dd>
<dt><em>Unnamed arguments first, named arguments later</em></dt>
<dd><p>In contrast to most Tcl commands, Tk uses generally (exceptions exist also here) a different calling style where the <em>unnamed arguments</em> have to be provided first, before the <em>named arguments</em> have to be provided:</p>
<pre class="doctools_example"><b class="cmd">pack</b> <i class="arg">.ent1 .ent2 -fill x -expand yes -side left</i></pre>
<p>This style is referred in the TEPAM documentation as <em>unnamed arguments first, named arguments later style</em>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROCEDURE DECLARATION</a></h2>
<p>TEPAM allows declaring new Tcl procedures with the command <b class="function">tepam::procedure</b> that has similar to the standard Tcl command <b class="function">proc</b> also 3 arguments:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">tepam::procedure</b> <i class="arg">name</i> <i class="arg">attributes</i> <i class="arg">body</i></a></dt>
<dd></dd>
</dl>
<p>The TEPAM procedure declaration syntax is demonstrated by the following example:</p>
<pre class="doctools_example"><b class="function">tepam::procedure</b> {display message} {
   -short_description
      &quot;Displays a simple message box&quot;
   -description
      &quot;This procedure allows displaying a configurable\
       message box. The default message type that is\
       created is a warning, but also errors and info can\
       be generated.
       The procedure accepts multiple text lines.&quot;
   -example
      {display message -mtype Warning &quot;Save first your job&quot;}
   -args {
      {-mtype -choices {Info Warning Error} \
              -default Warning -description &quot;Message type&quot;}
      {text   -type string -multiple \
              -description &quot;Multiple text lines to display&quot;}
   }
} {
   puts &quot;Message type: $mtype&quot;
   puts &quot;Message: $text&quot;
}</pre>
<p>The 3 arguments of <b class="function">procedure</b> are:</p>
<dl class="doctools_definitions">
<dt><i class="arg">name</i></dt>
<dd><p>The procedure name can be used in very flexible ways. Procedure names can have namespace qualifiers. By providing a two element name list as procedure name, a subcommand of a procedure will be declared. It is even possible to declare sub-sub-commands of a procedure by providing name lists with three elements.</p>
<p>Here are some valid procedure declarations using different procedure names (the attribute and body arguments are empty for simplicity):</p>
<pre class="doctools_example"><em># Simple procedure name:</em>
tepam::procedure <b class="function">display_message</b> {} {}
<em></em>
<em># Procedure declared in the main namespace:</em>
tepam::procedure <b class="function">::display_message</b> {} {}
<em></em>
<em># Procedure in the namespace</em> <b class="namespace">::ns</b><em>:</em>
tepam::procedure <b class="function">::ns::display_message</b> {} {}
<em></em>
<em># Declaration of the subcommand</em> <b class="function">message</b> <em>of the procedure</em> <b class="function">display</b><em>:</em>
tepam::procedure <b class="function">{display message}</b> {} {}</pre>
</dd>
<dt><i class="arg">attributes</i></dt>
<dd><p>All procedure attributes are provided in form of an option list that contains pairs of option names and option values. The example above has as procedure attribute a short and a normal description, but also the procedure arguments are defined in form of a procedure attribute.</p>
<p>Most procedure attributes are providing information for documentation purposes. But some of them affect also the way how the procedure can be called. The section <span class="sectref"><a href="#subsection1">Procedure Attributes</a></span> discusses in detail the available procedure attributes.</p>
<p>The procedure arguments are defined in form of a special procedure attribute. Most of the information provided in the argument definition is not just used for documentation purposes. This information is in fact used by the TEPAM argument manager to handle and validate the various forms of arguments that are provided during the procedure calls. The section <span class="sectref"><a href="#subsection2">Argument Declaration</a></span> discusses in detail all the argument definition attributes.</p></dd>
<dt><i class="arg">body</i></dt>
<dd><p>This is the normal procedure body. The declared arguments will be available to the procedure body in form of variables.</p>
<p>The procedure body will only be executed if the provided set of arguments could be validated by the TEPAM argument manager.</p>
<pre class="doctools_example">tepam::procedure {display_message} {
   -args {
      {-<b class="variable">mtype</b> -default Warning -choices {Warning Error}}
      {<b class="variable">text</b> -type string}
   }
} {
   puts &quot;Message type: <b class="variable">$mtype</b>&quot;
   puts &quot;Message: <b class="variable">$text</b>&quot;
}</pre>
</dd>
</dl>
<p>The commands <b class="cmd"><a href="../../../../index.html#key41">procedure</a></b> as well as <b class="cmd">argument_dialogbox</b> are exported from the namespace <b class="namespace">tepam</b>. To use these commands without the <b class="namespace">tepam::</b> namespace prefix, it is sufficient to import them into the main namespace:</p>
<pre class="doctools_example"><b class="cmd">namespace import tepam::*</b>
<b class="cmd"><a href="../../../../index.html#key41">procedure</a></b> {display_message} {
   -args {
      ...</pre>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Procedure Attributes</a></h3>
<p>The first group of attributes affect the behavior of the declared procedure:</p>
<dl class="doctools_definitions">
<dt>-named_arguments_first <b class="const">0</b>|<b class="const">1</b></dt>
<dd><p>This attribute defines the calling style of a procedure. TEPAM uses by default the <em>named arguments first, unnamed arguments later</em> style (Tcl). This default behavior can globally be changed by setting the variable <b class="variable">tepam::named_arguments_first</b> to <b class="const">0</b>. This global calling style can be changed individually for a procedure with the <i class="arg">-named_arguments_first</i> attribute.</p></dd>
<dt>-auto_argument_name_completion <b class="const">0</b>|<b class="const">1</b></dt>
<dd><p>The declared procedures will by default automatically try to match eventually abbreviated argument names to the defined arguments names. This default behavior can globally be changed by setting the variable <b class="variable">tepam::auto_argument_name_completion</b> to <b class="const">0</b>. This global setting of the automatic argument name completion can be changed individually for a procedure with the <i class="arg">-auto_argument_name_completion</i> procedure attribute.</p></dd>
<dt>-interactive_display_format <b class="const">extended</b>|<b class="const">short</b></dt>
<dd><p>A procedure declared with the TEPAM <b class="function">procedure</b> command can always be called with the <b class="variable">-interactive</b> option. By doing so, a graphical form will be generated that allows specifying all procedure argument values. There are two display modes for these interactive forms. While the <em>extended</em> mode is more adapted for small procedure argument sets, the <b class="const">short</b> form is more adequate for huge procedure argument sets.</p>
<p>The choice to use short or extended forms can be globally configured via the variable <b class="variable">tepam::interactive_display_format</b>. This global setting can then be changed individually for a procedure with the <i class="arg">-interactive_display_format</i> procedure attribute.</p></dd>
<dt>-args <i class="arg">list</i></dt>
<dd><p>The procedure arguments are declared via the <i class="arg">-args</i> attribute. An argument is defined via a list having as first element the argument name, followed by eventual argument attributes. All these argument definition lists are packaged themselves into a global list that is assigned to the <i class="arg">-args</i> attribute.</p>
<p>The argument definition syntax will be described more in detail in the following sub section.</p></dd>
</dl>
<p>The next attributes allow specifying custom argument checks as well as custom error messages in case these checks are failing:</p>
<dl class="doctools_definitions">
<dt>-validatecommand <i class="arg">script</i></dt>
<dd><p>Custom argument validations can be performed via specific validation commands that are defined with the <i class="arg">-validatecommand</i> attribute.</p>
<p>Validation command declaration example:</p>
<pre class="doctools_example">tepam::procedure {display_message} {
   -args {
      {text -type string -description &quot;Message text&quot;} }
   <b class="cmd">-validatecommand {IllegalWordDetector $text}</b>
} {
}</pre>
<p>The validation command is executed in the context of the declared procedure body. The different argument values are accessed via the argument names. Note there is also an argument attribute <i class="arg">-validatecommand</i> that allows declaring custom checks for specific arguments.</p>
<p>The attribute <i class="arg">-validatecommand</i> can be repeated to declare multiple custom checks.</p></dd>
<dt>-validatecommand_error_text <i class="arg">string</i></dt>
<dd><p>This attribute allows overriding the default error message for a custom argument validation (defined by <i class="arg">-validatecommand</i>). Also this attribute can be repeated in case multiple argument checks are declared.</p></dd>
</dl>
<p>The following attribute allows controlling the logging settings for an individual procedure:</p>
<dl class="doctools_definitions">
<dt>-command_log <b class="const">0</b>|<b class="const">1</b>|<b class="const">&quot;interactive&quot;</b></dt>
<dd><p>This argument configures the logging of the procedure calls into the list variable <b class="variable">tepam::ProcedureCallLogList</b>. The default configuration defined by the variable <b class="variable">tepam::command_log</b> will be used if this argument is not defined in a procedure declaration.</p>
<p>Setting this argument to <b class="const">0</b> will disable any procedure call loggings, setting it to <b class="const">1</b> will log any procedure calls and setting it to <b class="const">interactive</b> will log just the procedures that are called interactively (procedures called with the <b class="const">-interactive</b> flag).</p></dd>
</dl>
<p>The next group of procedure attributes is just used for the purpose of documentation and help text generation:</p>
<dl class="doctools_definitions">
<dt>-category <i class="arg">string</i></dt>
<dd><p>A category can be assigned to a procedure for documentation purposes. Any string is accepted as category.</p></dd>
<dt>-short_description <i class="arg">string</i></dt>
<dd><p>The short description of a procedure is used in the documentation summary of a generated procedure list as well as
in the NAME section of a generated procedure manual page.</p></dd>
<dt>-description <i class="arg">string</i></dt>
<dd><p>The (full) description assigned to a procedure is used to create user manual and help pages.</p></dd>
<dt>-return <i class="arg">string</i></dt>
<dd><p>The <em>-return</em> attribute allows defining the expected return value of a procedure (used for documentation purposes).</p></dd>
<dt>-example <i class="arg">string</i></dt>
<dd><p>A help text or manual page of a procedure can be enriched with eventual examples, using the <em>-example</em> attribute.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Argument Declaration</a></h3>
<p>The following example shows the structure that is used for the argument definitions in the context of a procedure declaration:</p>
<pre class="doctools_example">tepam::procedure {display_message} {
   -args <b class="cmd">{
      {-mtype -default Warning -choices {Info Warning Error} -description &quot;Message type&quot;}
      {-font -type font -default {Arial 10 italic} -description &quot;Message text font&quot;}
      {-level -type integer -optional -range {1 10} -description &quot;Message level&quot;}
      {-fg -type color -optional -description &quot;Message color&quot;}
      {-log_file -type file -optional -description &quot;Optional message log file&quot;}
      {text -type string -multiple -description &quot;Multiple text lines to display&quot;}
   }</b>
} {
}</pre>
<p>Each of the procedure arguments is declared with a list that has as first element the argument name, followed by eventual attributes. The argument definition syntax can be formalized in the following way:</p>
<pre class="doctools_example">tepam::procedure &lt;name&gt; {
   -args <b class="cmd">{
      {&lt;argument_name_1&gt; &lt;arg_attr_name_1a&gt; &lt;arg_attr_value_1a&gt;  &lt;arg_attr_name_1b&gt; &lt;arg_attr_value_1b&gt; ...}
      {&lt;argument_name_2&gt; &lt;arg_attr_name_2a&gt; &lt;arg_attr_value_2a&gt;  &lt;arg_attr_name_2b&gt; &lt;arg_attr_value_2b&gt; ...}
      ...
   }</b>
} &lt;body&gt;</pre>
<p>The argument names and attributes have to be used in the following way:</p>
<dl class="doctools_definitions">
<dt>Argument name (<em>&lt;argument_name_&lt;n&gt;&gt;</em>)</dt>
<dd><p>The provided argument name specifies whether the argument is an <em>unnamed argument</em> or a <em>named argument</em>. In addition to this, an argument name can also be blank to indicate an argument comment, or it can start with # to indicate a section comment.</p>
<dl class="doctools_definitions">
<dt><i class="arg">&quot;&lt;Name&gt;&quot;</i></dt>
<dd><p>This is the simplest form of an argument name: An argument whose name is not starting with '-' is an <em>unnamed argument</em>. The parameter provided during a procedure call will be assigned to a variable with the name <em>&lt;Name&gt;</em>.</p>
<pre class="doctools_example">tepam::procedure {print_string} {
   -args {
      {<b class="cmd"><a href="../../../../index.html#key248">text</a></b> -type string -description &quot;This is an unnamed argument&quot;}
   }
} {
   puts <b class="cmd">$text</b>
}
print_string <b class="cmd">&quot;Hello&quot;</b>
<em> -&gt; Hello</em></pre>
</dd>
<dt><i class="arg">&quot;-&lt;Name&gt;&quot;</i></dt>
<dd><p>An argument whose name starts with '-' is a <em>named argument</em> (also called <em>option</em>). The parameter provided during a procedure call will be assigned to a variable with the name <em>&lt;Name&gt;</em> (not <em>-&lt;Name&gt;</em>).</p>
<pre class="doctools_example">tepam::procedure {print_string} {
   -args {
      {<b class="cmd">-text</b> -type string -description &quot;This is a named argument&quot;}
   }
} {
   puts <b class="cmd">$text</b>
}
print_string <b class="cmd">-text &quot;Hello&quot;</b>
<em> -&gt; Hello</em></pre>
</dd>
<dt><i class="arg">&quot;--&quot;</i></dt>
<dd><p>This flag allows clearly specifying the end of the named arguments and the beginning of the unnamed arguments, in case the <em>named arguments first, unnamed arguments later style (Tcl)</em> has been selected.</p>
<p>If the <em>unnamed arguments first, named arguments later style (Tk)</em> style is selected, this flag is ignored if the unnamed arguments have already been parsed. Otherwise it will be assigned to the corresponding unnamed argument.</p></dd>
<dt><i class="arg">&quot;-&quot;</i> or <i class="arg">&quot;&quot;</i></dt>
<dd><p>A blank argument name (either '-' or <em>''</em>) starts a comment for the following arguments.</p>
<pre class="doctools_example">tepam::procedure {print_time} {
   -interactive_display_format short
   -args {
      {hours -type integer -description &quot;Hour&quot;}
      {minutes -type integer -description &quot;Minute&quot;}
      <b class="cmd">{- The following arguments are optional:}</b>
      {seconds -type integer -default 0 -description &quot;Seconds&quot;}
      {milliseconds -type integer -default 0 -description &quot;Milliseconds&quot;}
   }
} {
   puts &quot;${hour}h${minutes}:[expr $seconds+0.001*$milliseconds]&quot;
}</pre>
<p>Argument comments are basically used in the graphical argument definition forms that are created if a procedure is called interactively.</p></dd>
<dt><i class="arg">&quot;#*&quot;</i></dt>
<dd><p>An argument definition list that starts with '#' is considered as a section comment. The argument definition list will be trimmed from the '#' characters and the remaining string will be used as section comment.</p>
<p>Section comments can be used to structure visually the argument definition code. Section comments are also used to structure the generated help texts and the interactive argument definition forms.</p>
<pre class="doctools_example">tepam::procedure {complex_multiply} {
   -description &quot;This function perform a complex multiplication&quot;
   -args {
      <b class="cmd">{#### First complex number ####}</b>
      {-r0 -type double -description &quot;First number real part&quot;}
      {-i0 -type double -description &quot;First number imaginary part&quot;}
      <b class="cmd">{#### Second complex number ####}</b>
      {-r1 -type double -description &quot;Second number real part&quot;}
      {-i1 -type double -description &quot;Second number imaginary part&quot;}
   }
} {
   return [expr $r0*$r1 - $i0*$i1]
}</pre>
</dd>
</dl></dd>
<dt>Argument attributes (<em>&lt;arg_attr_name_&lt;mn&gt;&gt; &lt;arg_attr_value_&lt;mn&gt;&gt;</em>)</dt>
<dd><p>The following argument attributes are supported:</p>
<dl class="doctools_definitions">
<dt>-description <i class="arg">string</i></dt>
<dd><p>The description argument attribute is used for documentation purpose. Interactive argument definition forms use this attribute to provide explanations for an argument.</p></dd>
<dt>-type <i class="arg">type</i></dt>
<dd><p>The type argument attribute allows assigning the argument either to a predefined data type, or to an application specific data type. The argument values that are provided during a procedure call are automatically checked with respect to the defined argument type.</p>
<p>The section <span class="sectref"><a href="#section5">ARGUMENT TYPES</a></span> provides a list of predefined data types and explains how application specific types can be specified.</p>
<p>The argument type <em>none</em> has a special meaning. An argument that has the type <em>none</em> is handled as a <i class="arg">flag</i>. A flag is always optional and its related variable contains the logical value <b class="const">1</b> if the flag has been defined during the procedure call, or otherwise <b class="const">0</b>.</p></dd>
<dt>-default <i class="arg">value</i></dt>
<dd><p>Eventual default values can be defined with the -default argument attribute. Arguments with default values are automatically optional arguments.</p></dd>
<dt>-optional|-mandatory</dt>
<dd><p>Arguments are by default mandatory, unless a default value is defined. The flag <i class="arg">-optional</i> transforms an argument into an optional argument.</p>
<p>In case an optional argument is not defined during a procedure call, the corresponding variable will not be defined.
The flag <i class="arg">-mandatory</i> is the opposite to <i class="arg">-optional</i>. This flag exists only for completion reason, since an argument is anyway mandatory by default.</p></dd>
<dt>-multiple</dt>
<dd><p>Arguments that have the <i class="arg">-multiple</i> attribute can be defined multiple times during a procedure call. The values that are provided during a procedure call for such an argument are stored in a list variable. This is even the case if such an argument is only defined once during a procedure call.</p>
<p>The <i class="arg">-multiple</i> attribute can be attributed to unnamed arguments and to named arguments. The pair of argument name/argument value has to be repeated for each provided value in case of a named argument.
In case the argument with the <i class="arg">-multiple</i> attribute is an unnamed argument, this one has to be the absolute last one of all unnamed arguments.</p></dd>
<dt>-choices <i class="arg">list</i></dt>
<dd><p>A possible set of valid argument values can be attributed to an argument via the <i class="arg">-choices</i> attribute. The argument value provided during a procedure call will be checked against the provided choice values.</p></dd>
<dt>-choicelabels <i class="arg">list</i></dt>
<dd><p>An eventual short description can be attributed to each choice option with the <i class="arg">-choicelabels</i> attribute. These descriptions will be used in the generated help texts and as radio and check box labels for the interactive calls.</p>
<p>The <i class="arg">-choicelabels</i> attribute is optional, but if it is defined, its list needs to have the identical size as the <i class="arg">-choices</i> argument list.</p></dd>
<dt>-range <i class="arg">{double double}</i></dt>
<dd><p>Another argument constraint can be defined with the <i class="arg">-range</i> attribute. The valid range is defined with a list containing the minimum valid value and a maximum valid value. The <i class="arg">-range</i> attribute has to be used only for numerical arguments, like integers and doubles.</p></dd>
<dt>-validatecommand <i class="arg">script</i></dt>
<dd><p>Custom argument value validations can be performed via specific validation commands that are defined with the <i class="arg">-validatecommand</i> attribute. The provided validation command can be a complete script in which the pattern <em>%P</em> is replaced by the argument value that has to be validated.</p>
<p>Validation command declaration example:</p>
<pre class="doctools_example">tepam::procedure {display_message} {
   -args {
      {text -type string -description &quot;Message text&quot; \
            <b class="cmd">-validatecommand {IllegalWordDetector %P}</b>}
} {
}</pre>
<p>While the purpose of this custom argument validation attribute is the validation of a specific argument, there is also a global attribute <i class="arg">-validatecommand</i> that allows performing validation that involves multiple arguments.</p></dd>
<dt>-validatecommand_error_text <i class="arg">string</i></dt>
<dd><p>This attribute allows overriding the default error message for a custom argument validation (defined by <i class="arg">-validatecommand</i>).</p></dd>
<dt>-widget <i class="arg">string</i></dt>
<dd><p>The widgets that allow defining the different arguments in case of an interactive procedure call are normally selected automatically in function of the argument type. The <i class="arg">-widget</i> attribute allows specifying explicitly a certain widget type for an argument.</p></dd>
<dt>-auxargs <i class="arg">list</i></dt>
<dd><p>In case a procedure is called interactively, additional argument attributes can be provided to the interactive argument definition form via the <em>-auxargs</em> attribute that is itself a list of attribute name/attribute value pairs:</p>
<pre class="doctools_example">-auxargs {-&lt;arg_attr_name_1a&gt; &lt;arg_attr_value_1a&gt; \
          -&lt;arg_attr_name_1b&gt; &lt;arg_attr_value_1b&gt;
          ...
}</pre>
<p>For example, if a procedure takes as argument a file name it may be beneficial to specify the required file type for the interactive argument definition form. This information can be provided via the <em>-auxargs</em> attribute to the argument definition form:</p>
<pre class="doctools_example">tepam::procedure LoadPicture {
   -args {
      {FileName -type existingfile -description &quot;Picture file&quot; \
                 <b class="cmd">-auxargs {-filetypes {{&quot;GIF&quot; {*.gif}} {&quot;JPG&quot; {*.jpg}} }}</b>}
   }
} {
}</pre>
</dd>
<dt>-auxargs_commands <i class="arg">script</i></dt>
<dd><p>If the auxiliary argument attributes are not static but have to be dynamically adaptable, the <em>-auxargs_commands</em> allows defining them via commands that are executed during a procedure call. A list of pairs of auxiliary attribute names and commands has to be provided to the <em>-auxargs_commands</em> attribute. The provided commands are executed in the context of the calling procedure.</p>
<pre class="doctools_example">-auxargs_commands {-&lt;arg_attr_name_1a&gt; &lt;arg_attr_command_1a&gt; \
                   -&lt;arg_attr_name_1b&gt; &lt;arg_attr_command_1b&gt;
                   ...
}</pre>
</dd>
</dl></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">VARIABLES</a></h2>
<p>Several variables defined inside the <b class="namespace">::tepam</b> namespace impact the mode of operation of the procedures that have been declared with the TEPAM <b class="function">procedure</b> command.</p>
<dl class="doctools_definitions">
<dt><b class="variable">named_arguments_first</b></dt>
<dd><p>This variable defines the general calling style of the procedures. It is by default set to <b class="const">1</b> which selects the <em>named arguments first, unnamed arguments later</em> style (Tcl style).</p>
<p>By setting this variable to <b class="const">0</b>, the <em>named arguments first, unnamed arguments later</em> style is globally selected (Tk style):</p>
<pre class="doctools_example">set tepam::named_arguments_first 0</pre>
<p>While this variable defines the general calling style, the procedure attribute <i class="arg">-named_arguments_first</i> can adapt this style individually for each declared procedure.</p></dd>
<dt><b class="variable">auto_argument_name_completion</b></dt>
<dd><p>This variable controls the general automatic argument name matching mode. By default it is set to <b class="const">1</b>, meaning that the called procedures are trying to match eventually abbreviated argument names with the declared argument names.</p>
<p>By setting this variable to <b class="const">0</b> the automatic argument name matching mode is disabled:</p>
<pre class="doctools_example">set tepam::auto_argument_name_completion 0</pre>
<p>While this variable defines the general matching mode, the procedure attribute <i class="arg">-auto_argument_name_completion</i> can adapt this mode individually for each declared procedure.</p></dd>
<dt><b class="variable">interactive_display_format</b></dt>
<dd><p>A procedure declared via the TEPAM <b class="function">procedure</b> command can always be called with the <b class="variable">-interactive</b> switch. By doing so, a graphical form will be generated that allows entering interactively all procedure arguments.</p>
<p>There are two display modes for these interactive forms. The <em>extended</em> mode which is the default mode is more adapted for small procedure argument sets. The <b class="const">short</b> form is more adequate for huge procedure argument sets:</p>
<pre class="doctools_example">set tepam::interactive_display_format &quot;short&quot;</pre>
<p>The choice to use short or extended forms can be globally configured via the variable <b class="variable">interactive_display_format</b>.
This global setting can be changed individually for a procedure with the procedure attribute <i class="arg">-interactive_display_format</i>.</p></dd>
<dt><b class="variable">help_line_length</b></dt>
<dd><p>The maximum line length used by the procedure help text generator can be specified with this variable. The default length which is set to 80 (characters) can easily be adapted to the need of an application:</p>
<pre class="doctools_example">set tepam::help_line_length 120</pre>
<p>Since this variable is applied directly during the help text generation, its value can continuously be adapted to the current need.</p></dd>
<dt><b class="variable">command_log</b></dt>
<dd><p>Procedure calls can be logged inside the list variable <b class="variable">tepam::ProcedureCallLogList</b>. The variable <b class="variable">tepam::command_log</b> controls the default logging settings for any procedures. The following configurations are supported:</p>
<ul class="doctools_itemized">
<li><p><em>0</em>: Disables any procedure call loggings</p></li>
<li><p><em>1</em>: Enables any procedure call loggings</p></li>
<li><p><em>&quot;interactive&quot;</em>: Will log any procedures called interactively (e.g. procedures called with the -interactive flag). This is the default configuration.</p></li>
</ul>
<p>This default logging configuration can be changed individually for each procedure with the <i class="arg">-command_log</i> attribute.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ARGUMENT TYPES</a></h2>
<p>TEPAM provides a comprehensive set of procedure argument types. They can easily be completed with application specific types if necessary.</p>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Predefined Argument Types</a></h3>
<p>To remember, a type can be assigned to each specified procedure argument:</p>
<pre class="doctools_example">tepam::procedure {warning} {
   -args {
      {-font <b class="cmd">-type font</b> -default {Arial 10 italic}}
      {-severity_level <b class="cmd">-type integer</b> -optional -range {1 10}}
      {-fg <b class="cmd">-type color</b> -optional -description &quot;Message color&quot;}
      {text <b class="cmd">-type string</b> -multiple -description &quot;Multiple text lines to display&quot;}
   }
} {
   ...
}</pre>
<p>There are some <em>special purpose types</em> that are building the first category of predefined argument types:</p>
<ul class="doctools_itemized">
<li><p><b class="type">none</b></p>
<p>A <em>flag</em>, also called <em>switch</em>, is defined as a named argument that has the type <b class="type">none</b>. Flags are always optional and the default value of the assigned variable is set to <b class="const">0</b>. In contrast to the (normal) named arguments, no argument value has to be provided to a flag.</p>
<pre class="doctools_example">tepam::procedure flag_test {
   -args {
      <b class="cmd">{-flag -type none -description &quot;This is a flag&quot;}</b>
   }
} {
   puts <b class="cmd">$flag</b>
}
flag_test
<em>-&gt; 0</em>
flag_test -flag
<em>-&gt; 1</em></pre>
<p>Since no argument value has to be provided to a flag, also no data check is performed for this argument type.</p></li>
<li><p><b class="type">string</b></p>
<p><b class="type">String</b> is a generic argument data type. Any data string can be provided to a string type argument and no data type checks are therefore performed. The string type allows defining single line strings during the interactive procedure calls.</p></li>
<li><p><b class="type">text</b></p>
<p><b class="type">Text</b> is identical to <b class="type">string</b> with the only difference that it allows entering multi line strings during interactive procedure calls.</p></li>
<li><p><b class="type">{}</b></p>
<p>A <b class="type">blank</b> argument type signifies an undefined argument type. This is the default argument type that will be used if no type has been explicitly specified. An argument that has a <b class="type">blank</b> type behaves identically than an argument that has a <b class="type">string</b> type, e.g. no argument data checks are performed. The only difference is that the data type <b class="type">string</b> is mentioned in the generated help documentation, while this is not the case for the <b class="type">blank</b> type.</p></li>
</ul>
<p>Several <em>numerical types</em> are defined by TEPAM. The type validation procedures are using the <b class="cmd">string is &lt;type&gt; -strict</b> commands to check the validity of the provided arguments, which assures that no empty strings are accepted as argument value. The type validation expression for the numerical types and the argument types to which this expression is applied are:</p>
<pre class="doctools_example">string is <b class="type">&lt;type_to_check&gt;</b> -strict <i class="arg">&lt;argument_value&gt;</i></pre>
<ul class="doctools_itemized">
<li><p><em>boolean</em></p></li>
<li><p><em>integer</em></p></li>
<li><p><em>double</em></p></li>
</ul>
<p>Empty strings are accepted as argument value for all the alpha numeric argument types. The argument types that are falling into this category and validation expression used for them are:</p>
<pre class="doctools_example">string is <em>&lt;type_to_check&gt;</em> <i class="arg">&lt;argument_value&gt;</i></pre>
<ul class="doctools_itemized">
<li><p><em>alnum</em></p></li>
<li><p><em>alpha</em></p></li>
<li><p><em>ascii</em></p></li>
<li><p><em>control</em></p></li>
<li><p><em>digit</em></p></li>
<li><p><em>graph</em></p></li>
<li><p><em>lower</em></p></li>
<li><p><em>print</em></p></li>
<li><p><em>punct</em></p></li>
<li><p><em>space</em></p></li>
<li><p><em>upper</em></p></li>
<li><p><em>wordchar</em></p></li>
<li><p><em>xdigit</em></p></li>
</ul>
<p>In addition to the data types checked with the <b class="cmd">string is &lt;type&gt;</b> commands, TEPAM specifies some other useful data types:</p>
<ul class="doctools_itemized">
<li><p><em>char</em></p>
<p>Each string that has a length of 1 character meets the <em>character</em> type. The type check is made with the following expression:</p>
<pre class="doctools_example">expr [string length <i class="arg">&lt;argument_value&gt;</i>]==1</pre>
</li>
<li><p><em>color</em></p>
<p>Any character strings that are accepted by Tk as a color are considered as valid color argument. Please note that the Tk package has to be loaded to use the type <em>color</em>. TEPAM is using the following command to validate the color type:</p>
<pre class="doctools_example">expr ![catch {winfo rgb . <i class="arg">&lt;argument_value&gt;</i>}]</pre>
</li>
<li><p><em>font</em></p>
<p>Any character strings that are accepted by Tk as a font are considered as valid font argument. Please note that the Tk package has to be loaded to use the <em>font</em> type. TEPAM is using the following command to validate the color type:</p>
<pre class="doctools_example">expr ![catch {font measure &lt;argument_value&gt; &quot;&quot;}]</pre>
</li>
<li><p><em>file</em></p>
<p>Any strings that are not containing one of the following characters are considered as valid file names: * ? &quot; &lt; &gt;. It is not necessary that the file and its containing directory exist. Zero-length strings are not considered as valid file names.</p>
<p>The following expression is used to validate the file names:</p>
<pre class="doctools_example">expr [string length &lt;argument_value&gt;]&gt;0 &amp;&amp; ![regexp {[\&quot;*?&lt;&gt;:]} &lt;argument_value&gt;]</pre>
</li>
<li><p><em>existingfile</em></p>
<p>The argument is valid if it matches with an existing file. The following check is performed to validate the arguments of this type:</p>
<pre class="doctools_example">file exists &lt;argument_value&gt;</pre>
</li>
<li><p><em>directory</em></p>
<p>The directory argument is validated exactly in the same way as the file arguments.</p></li>
<li><p><em>existingdirectory</em></p>
<p>The argument is valid if it matches with an existing directory. The following check is performed to validate the arguments of this type:</p>
<pre class="doctools_example">file isdirectory &lt;argument_value&gt;</pre>
</li>
</ul>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Defining Application Specific Argument Types</a></h3>
<p>To add support for a new application specific argument type it is just necessary to add into the namespace <b class="namespace">tepam</b> a validation function <b class="function">Validation(&lt;type&gt;)</b>. This function requires one argument. It has to returns <b class="const">1</b> if the provided argument matches with the relevant data type. The function has to return otherwise <b class="const">0</b>.</p>
<p>The validation command section of the &quot;<b class="file">tepam.tcl</b>&quot; package provides sufficient examples of validation functions, since it implements the ones for the standard TEPAM types.</p>
<p>The following additional code snippet shows the validation function for a custom argument type that requires values that have a character string length of exactly 2:</p>
<pre class="doctools_example">proc tepam::Validate(two_char) {v} {expr {[string length $v]==2}}</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PROCEDURE CALLS</a></h2>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Help</a></h3>
<p>Each procedure can be called with the <i class="arg">-help</i> flag. The procedure will then print a generated help text to <em>stdout</em> and will then return without performing any additional actions.</p>
<p>Taking the first procedure declared in <span class="sectref"><a href="#section6">PROCEDURE CALLS</a></span>, the help request and the printed help text would be:</p>
<pre class="doctools_example"><b class="cmd">display message -help</b>
<em>-&gt;
NAME
      display message - Displays a simple message box
SYNOPSIS
      display message
            [-mtype &lt;mtype&gt;]
               Message type, default: &quot;Warning&quot;, choices: {Info, Warning, Error}
            &lt;text&gt;
               Multiple text lines to display, type: string
DESCRIPTION
      This procedure allows displaying a configurable message box. The default
      message type that is created is a warning, but also errors and info can
      be generated.
      The procedure accepts multiple text lines.
EXAMPLE
      display message -mtype Warning &quot;Save first your job&quot;</em></pre>
<p>The argument manager is checking if the last provided argument is <em>-help</em> and generates the requested help message if this is the case. So, also the following example will print the help message:</p>
<pre class="doctools_example"><b class="cmd">display message -mtype Info &quot;It is 7:00&quot; -help</b></pre>
<p>On the other hand, the following call will result in an error:</p>
<pre class="doctools_example"><b class="cmd">display message -help -mtype Info &quot;It is 7:00&quot;</b>
<em>-&gt;
display message: Argument '-help' not known</em></pre>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Interactive Procedure Call</a></h3>
<p>If Tk has been loaded a procedure can be called with the <i class="arg">-interactive</i> flag to open a graphical form that allows specifying interactively all procedure arguments. The following example assures that the Tk library is loaded and shows the command line to call interactively the procedure declared in <span class="sectref"><a href="#section6">PROCEDURE CALLS</a></span>:</p>
<pre class="doctools_example">package require Tk
<b class="cmd">display message -interactive</b></pre>
<p>Also the <i class="arg">-interactive</i> flag has to be placed at the last argument position as this is also required for the <i class="arg">-help</i> flag. Arguments defined before the <i class="arg">-interactive</i> flag will be ignored. The following example is therefore also a valid interactive procedure call:</p>
<pre class="doctools_example"><b class="cmd">display message</b> -mtype Info &quot;It is 7:00&quot; <b class="cmd">-interactive</b></pre>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Unnamed Arguments</a></h3>
<p>Unnamed arguments are typically provided to the called procedure as simple parameters. This procedure calling form requires that the provided arguments are strictly following the order of the specified arguments. Several parameters can be assigned to the last argument if this one has the <em>-multiple</em> attribute. So, the following declared procedure ...</p>
<pre class="doctools_example">tepam::procedure {display_message} {
   -args {
      {mtype -choices {Info Warning Error}}
      {text -type string -multiple}
   }
} {
   puts &quot;$mtype: [join $text]&quot;
}</pre>
<p>... can for example be called in the following ways:</p>
<pre class="doctools_example"><b class="cmd">display_message Info &quot;It is PM 7:00.&quot;</b>
<em>-&gt; Info: It is PM 7:00.</em>
<b class="cmd">display_message Info &quot;It is PM 7:00.&quot; &quot;You should go home.&quot;</b>
<em>-&gt; Info: It is PM 7:00. You should go home.</em></pre>
<p>The nice thing is that unnamed arguments can also be called as named arguments, which can be handy, for example if the exact specified argument order is not known to a user:</p>
<pre class="doctools_example"><b class="cmd">display_message -mtype Info -text &quot;It is PM 7:00.&quot;</b>
<em>-&gt; Info: It is PM 7:00.</em>
<b class="cmd">display_message -text &quot;It is PM 7:00.&quot; -mtype Info</b>
<em>-&gt; Info: It is PM 7:00.</em>
<b class="cmd">display_message -mtype Info -text &quot;It is PM 7:00.&quot; -text &quot;You should go home.&quot;</b>
<em>-&gt; Info: It is PM 7:00. You should go home.</em>
<b class="cmd">display_message -text &quot;It is PM 7:00.&quot; -text &quot;You should go home.&quot; -mtype Info</b>
<em>-&gt; Info: It is PM 7:00. You should go home.</em></pre>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Named Arguments</a></h3>
<p>Named arguments have to be provided to a procedure in form of a parameter pairs composed by the argument names and the argument values. The order how they are provided during a procedure call is irrelevant and has not to match with the argument specification order.</p>
<p>The following declared procedure ...</p>
<pre class="doctools_example">tepam::procedure {display_message} {
   -args {
      {-mtype -choices {Info Warning Error}}
      {-text -type string -multiple}
   }
} {
   puts &quot;$mtype: [join $text]&quot;
}</pre>
<p>... can be called in the following ways:</p>
<pre class="doctools_example"><b class="cmd">display_message -mtype Info -text &quot;It is PM 7:00.&quot;</b>
<em>-&gt; Info: It is PM 7:00.</em>
<b class="cmd">display_message -text &quot;It is PM 7:00.&quot; -mtype Info</b>
<em>-&gt; Info: It is PM 7:00.</em>
<b class="cmd">display_message -mtype Info -text &quot;It is PM 7:00.&quot; -text &quot;You should go home.&quot;</b>
<em>-&gt; Info: It is PM 7:00. You should go home.</em>
<b class="cmd">display_message -text &quot;It is PM 7:00.&quot; -text &quot;You should go home.&quot; -mtype Info</b>
<em>-&gt; Info: It is PM 7:00. You should go home.</em></pre>
<p>Also named arguments that have not the <em>-multiple</em> attribute can be provided multiple times. Only the last provided argument will be retained in such a case:</p>
<pre class="doctools_example"><b class="cmd">display_message -mtype Info -text &quot;It is PM 7:00.&quot; -mtype Warning</b>
<em>-&gt; Warning: It is PM 7:00.</em></pre>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">Unnamed Arguments First, Named Arguments Later (Tk Style)</a></h3>
<p>A procedure that has been defined while the variable <b class="variable">tepam::named_arguments_first</b> was set to 1, or with the procedure attribute <i class="arg">-named_arguments_first</i> set to 1 has to be called in the Tcl style. The following procedure declaration will be used in this section to illustrate the meaning of this calling style:</p>
<pre class="doctools_example"><b class="cmd">set tepam::named_arguments_first 1</b>
tepam::procedure my_proc {
   -args {
      {-n1 -default &quot;&quot;}
      {-n2 -default &quot;&quot;}
      {u1 -default &quot;&quot;}
      {u2 -default &quot;&quot;}
   }
} {
   puts &quot;n1:'$n1', n2:'$n2', u1:'$u1', u2:'$u2'&quot;
}</pre>
<p>The unnamed arguments are placed at the end of procedure call, after the named arguments:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1 -n2 N2 U1 U2</b>
<em>-&gt; n1:'N1', n2:'N2', u1:'U1', u2:'U2'</em></pre>
<p>The argument parser considers the first argument that doesn't start with the '-' character as well as all following arguments as unnamed argument:</p>
<pre class="doctools_example">my_proc <b class="cmd">U1 U2</b>
<em>-&gt; n1:'', n2:'', u1:'U1', u2:'U2'</em></pre>
<p>Named arguments can be defined multiple times. If the named argument has the <em>-multiply</em> attribute, all argument values will be collected in a list. Otherwise, only the last provided attribute value will be retained:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1 -n2 N2 -n1 M1 U1 U2</b>
<em>-&gt; n1:'M1', n2:'N2', u1:'U1', u2:'U2'</em></pre>
<p>The name of the first unnamed argument has therefore not to start with the '-' character. The unnamed argument is otherwise considered as name of another named argument. This is especially important if the first unnamed argument is given by a variable that can contain any character strings:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1 -n2 N2 &quot;-&gt;&quot; &quot;&lt;-&quot;</b>
<em>-&gt; my_proc: Argument '-&gt;' not known</em>
set U1 &quot;-&gt;&quot;
my_proc -n1 N1 -n2 N2 $U1 U2}]
my_proc: Argument '-&gt;' not known</pre>
<p>The '--' flag allows separating unambiguously the unnamed arguments from the named arguments. All data after the '--' flag will be considered as unnamed argument:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1 -n2 N2 -- &quot;-&gt;&quot; &quot;&lt;-&quot;</b>
<em>-&gt; n1:'N1', n2:'N2', u1:'-&gt;', u2:'&lt;-'</em>
set U1 &quot;-&gt;&quot;
my_proc <b class="cmd">-n1 N1 -n2 N2 -- $U1 U2</b>
<em>-&gt; n1:'N1', n2:'N2', u1:'-&gt;', u2:'&lt;-'</em></pre>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">Named Arguments First, Unnamed Arguments Later (Tcl Style)</a></h3>
<p>The Tk calling style will be chosen if a procedure is defined while the variable <b class="variable">tepam::named_arguments_first</b> is set to 0, or if the procedure attribute <i class="arg">-named_arguments_first</i> has been set to 0. The following procedure will be used in this section to illustrate this calling style:</p>
<pre class="doctools_example"><b class="cmd">set tepam::named_arguments_first 0</b>
tepam::procedure my_proc {
   -args {
      {-n1 -default &quot;&quot;}
      {-n2 -default &quot;&quot;}
      {u1}
      {u2 -default &quot;&quot; -multiple}
   }
} {
   puts &quot;n1:'$n1', n2:'$n2', u1:'$u1', u2:'$u2'&quot;
}</pre>
<p>The unnamed arguments have to be provided first in this case. The named arguments are provided afterwards:</p>
<pre class="doctools_example">my_proc <b class="cmd">U1 U2 -n1 N1 -n2 N2</b>
<em>-&gt; n1:'N1', n1:'N1', u1:'U1', u2:'U2'</em></pre>
<p>The argument parser will assign to each defined unnamed argument a value before it switches to read the named arguments. This default behavior changes a bit if there are unnamed arguments that are optional or that can take multiple values.</p>
<p>An argument value will only be assigned to an unnamed argument that is optional (that has either the <i class="arg">-optional</i> attribute or that has a default value), if the value is not beginning with the '-' character or if no named arguments are defined. The value that starts with '-' is otherwise considered as the name of a named argument.</p>
<p>Argument values are assigned to an argument that has the <i class="arg">-multiple</i> attribute as long as the parameter value doesn't starts with the '-' character.</p>
<p>Values that start with the '-' character can therefore not be assigned to optional unnamed arguments, which restricts the usage of the Tcl procedure calling style. The Tk style may be preferable in some cases, since it allows separating unambiguously the named arguments from the unnamed ones with the '--' flag.</p>
<p>Let's explore in a bit less theoretically the ways how the previously defined procedure can be called: The first example calls the procedure without any parameters, which leads to an error since <i class="arg">u1</i> is a mandatory argument:</p>
<pre class="doctools_example">my_proc
<em>-&gt; my_proc: Required argument is missing: u1</em></pre>
<p>The procedure call is valid if one parameter is provided for <i class="arg">u1</i>:</p>
<pre class="doctools_example">my_proc <b class="cmd">U1</b>
<em>-&gt; n1:'', n2:'', u1:'U1', u2:''</em></pre>
<p>If more parameters are provided that are not starting with the '-' character, they will be attributed to the unnamed arguments. <i class="arg">U2</i> will receive 3 of these parameters, since it accepts multiple values:</p>
<pre class="doctools_example">my_proc <b class="cmd">U1 U2 U3 U4</b>
<em>-&gt; n1:'', n2:'', u1:'U1', u2:'U2 U3 U4'</em></pre>
<p>As soon as one parameter starts with '-' and all unnamed arguments have been assigned, the argument manager tries to interpret the parameter as name of a named argument. The procedure call will fail if a value beginning with '-' is assigned to an unnamed argument:</p>
<pre class="doctools_example">my_proc <b class="cmd">U1 U2 U3 U4 -U5</b>
<em>-&gt; my_proc: Argument '-U5' not known</em></pre>
<p>The attribution of a parameter to a named argument will fail if there are undefined unnamed (non optional) arguments. The name specification will in this case simply be considered as a parameter value that is attributed to the <em>next</em> unnamed argument. This was certainly not the intention in the following example:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1</b>
<em>-&gt; n1:'', n2:'', u1:'-n1', u2:'N1'</em></pre>
<p>The situation is completely different if values have already been assigned to all mandatory unnamed arguments. A parameter beginning with the '-' character will in this case be considered as a name identifier for a named argument:</p>
<pre class="doctools_example">my_proc <b class="cmd">U1 -n1 N1</b>
<em>-&gt; n1:'N1', n2:'', u1:'U1', u2:''</em></pre>
<p>No unnamed arguments are allowed behind the named arguments:</p>
<pre class="doctools_example">my_proc <b class="cmd">U1 -n1 N1 U2</b>
<em>-&gt; my_proc: Argument 'U2' is not an option</em></pre>
<p>The '--' flag has no special meaning if not all mandatory arguments have got assigned a value. This flag will simply be attributed to one of the unnamed arguments:</p>
<pre class="doctools_example">my_proc <b class="cmd">-- -n1 N1</b>
<em>-&gt; n1:'N1', n2:'', u1:'--', u2:''</em></pre>
<p>But the '--' flag is simply ignored if the argument parser has started to handle the named arguments:</p>
<pre class="doctools_example">my_proc <b class="cmd">U1 -- -n1 N1</b>
<em>-&gt; n1:'N1', n2:'', u1:'U1', u2:''</em>
my_proc <b class="cmd">U1 -n1 N1 -- -n2 N2</b>
<em>-&gt; n1:'N1', n2:'N2', u1:'U1', u2:''</em></pre>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Raw Argument List</a></h3>
<p>It may be necessary sometimes that the procedure body is able to access the entire list of arguments provided during a procedure call. This can happen via the <b class="variable">args</b> variable that contains always the unprocessed argument list:</p>
<pre class="doctools_example">tepam::procedure {display_message} {
   -args {
      {-mtype -choices {Warning Error} -default Warning}
      {text -type string -multiple}
   }
} {
   puts &quot;args: <b class="cmd">$args</b>&quot;
}
display_message -mtype Warning &quot;It is 7:00&quot;
<em>-&gt; args: -mtype Warning {It is 7:00}</em></pre>
</div>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_introduction.html">tepam(n)</a>, <a href="tepam_argument_dialogbox.html">tepam::argument_dialogbox(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key764">argument integrity</a>, <a href="../../../../index.html#key765">argument validation</a>, <a href="../../../../index.html#key763">arguments</a>, <a href="../../../../index.html#key41">procedure</a>, <a href="../../../../index.html#key762">subcommand</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Procedures, arguments, parameters, options</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013, Andreas Drollinger</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/ansi_cattr.html.





















































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282

<div class='fossil-doc' data-title='term::ansi::code::attr - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code::attr(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code::attr - ANSI attribute sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Introspection</a></li>
<li class="doctools_subsection"><a href="#subsection2">Attributes</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term::ansi::code <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">term::ansi::code::attr <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::term::ansi::code::attr::names</b></a></li>
<li><a href="#2"><b class="cmd">::term::ansi::code::attr::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::term::ansi::code::attr::fgblack</b></a></li>
<li><a href="#4"><b class="cmd">::term::ansi::code::attr::fgred</b></a></li>
<li><a href="#5"><b class="cmd">::term::ansi::code::attr::fggreen</b></a></li>
<li><a href="#6"><b class="cmd">::term::ansi::code::attr::fgyellow</b></a></li>
<li><a href="#7"><b class="cmd">::term::ansi::code::attr::fgblue</b></a></li>
<li><a href="#8"><b class="cmd">::term::ansi::code::attr::fgmagenta</b></a></li>
<li><a href="#9"><b class="cmd">::term::ansi::code::attr::fgcyan</b></a></li>
<li><a href="#10"><b class="cmd">::term::ansi::code::attr::fgwhite</b></a></li>
<li><a href="#11"><b class="cmd">::term::ansi::code::attr::fgdefault</b></a></li>
<li><a href="#12"><b class="cmd">::term::ansi::code::attr::bgblack</b></a></li>
<li><a href="#13"><b class="cmd">::term::ansi::code::attr::bgred</b></a></li>
<li><a href="#14"><b class="cmd">::term::ansi::code::attr::bggreen</b></a></li>
<li><a href="#15"><b class="cmd">::term::ansi::code::attr::bgyellow</b></a></li>
<li><a href="#16"><b class="cmd">::term::ansi::code::attr::bgblue</b></a></li>
<li><a href="#17"><b class="cmd">::term::ansi::code::attr::bgmagenta</b></a></li>
<li><a href="#18"><b class="cmd">::term::ansi::code::attr::bgcyan</b></a></li>
<li><a href="#19"><b class="cmd">::term::ansi::code::attr::bgwhite</b></a></li>
<li><a href="#20"><b class="cmd">::term::ansi::code::attr::bgdefault</b></a></li>
<li><a href="#21"><b class="cmd">::term::ansi::code::attr::bold</b></a></li>
<li><a href="#22"><b class="cmd">::term::ansi::code::attr::dim</b></a></li>
<li><a href="#23"><b class="cmd">::term::ansi::code::attr::italic</b></a></li>
<li><a href="#24"><b class="cmd">::term::ansi::code::attr::underline</b></a></li>
<li><a href="#25"><b class="cmd">::term::ansi::code::attr::blink</b></a></li>
<li><a href="#26"><b class="cmd">::term::ansi::code::attr::revers</b></a></li>
<li><a href="#27"><b class="cmd">::term::ansi::code::attr::hidden</b></a></li>
<li><a href="#28"><b class="cmd">::term::ansi::code::attr::strike</b></a></li>
<li><a href="#29"><b class="cmd">::term::ansi::code::attr::nobold</b></a></li>
<li><a href="#30"><b class="cmd">::term::ansi::code::attr::noitalic</b></a></li>
<li><a href="#31"><b class="cmd">::term::ansi::code::attr::nounderline</b></a></li>
<li><a href="#32"><b class="cmd">::term::ansi::code::attr::noblink</b></a></li>
<li><a href="#33"><b class="cmd">::term::ansi::code::attr::norevers</b></a></li>
<li><a href="#34"><b class="cmd">::term::ansi::code::attr::nohidden</b></a></li>
<li><a href="#35"><b class="cmd">::term::ansi::code::attr::nostrike</b></a></li>
<li><a href="#36"><b class="cmd">::term::ansi::code::attr::reset</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides symbolic names for the ANSI attribute control
codes. For each control code a single command is provided which
returns this code as its result. None of the commands of this package
write to a channel; that is handled by higher level packages, like
<b class="package"><a href="ansi_send.html">term::ansi::send</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Introspection</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::ansi::code::attr::names</b></a></dt>
<dd><p>This command is for introspection. It returns as its result a list
containing the names of all attribute commands.</p></dd>
<dt><a name="2"><b class="cmd">::term::ansi::code::attr::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command imports some or all attribute commands into the namespace
<i class="arg">ns</i>. This is by default the namespace <em>attr</em>. Note that this
is relative namespace name, placing the imported command into a child
of the current namespace. By default all commands are imported, this
can howver be restricted by listing the names of the wanted commands
after the namespace argument.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Attributes</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">::term::ansi::code::attr::fgblack</b></a></dt>
<dd><p>Set text color to <em>Black</em>.</p></dd>
<dt><a name="4"><b class="cmd">::term::ansi::code::attr::fgred</b></a></dt>
<dd><p>Set text color to <em>Red</em>.</p></dd>
<dt><a name="5"><b class="cmd">::term::ansi::code::attr::fggreen</b></a></dt>
<dd><p>Set text color to <em>Green</em>.</p></dd>
<dt><a name="6"><b class="cmd">::term::ansi::code::attr::fgyellow</b></a></dt>
<dd><p>Set text color to <em>Yellow</em>.</p></dd>
<dt><a name="7"><b class="cmd">::term::ansi::code::attr::fgblue</b></a></dt>
<dd><p>Set text color to <em>Blue</em>.</p></dd>
<dt><a name="8"><b class="cmd">::term::ansi::code::attr::fgmagenta</b></a></dt>
<dd><p>Set text color to <em>Magenta</em>.</p></dd>
<dt><a name="9"><b class="cmd">::term::ansi::code::attr::fgcyan</b></a></dt>
<dd><p>Set text color to <em>Cyan</em>.</p></dd>
<dt><a name="10"><b class="cmd">::term::ansi::code::attr::fgwhite</b></a></dt>
<dd><p>Set text color to <em>White</em>.</p></dd>
<dt><a name="11"><b class="cmd">::term::ansi::code::attr::fgdefault</b></a></dt>
<dd><p>Set default text color (<em>Black</em>).</p></dd>
<dt><a name="12"><b class="cmd">::term::ansi::code::attr::bgblack</b></a></dt>
<dd><p>Set background to <em>Black</em>.</p></dd>
<dt><a name="13"><b class="cmd">::term::ansi::code::attr::bgred</b></a></dt>
<dd><p>Set background to <em>Red</em>.</p></dd>
<dt><a name="14"><b class="cmd">::term::ansi::code::attr::bggreen</b></a></dt>
<dd><p>Set background to <em>Green</em>.</p></dd>
<dt><a name="15"><b class="cmd">::term::ansi::code::attr::bgyellow</b></a></dt>
<dd><p>Set background to <em>Yellow</em>.</p></dd>
<dt><a name="16"><b class="cmd">::term::ansi::code::attr::bgblue</b></a></dt>
<dd><p>Set background to <em>Blue</em>.</p></dd>
<dt><a name="17"><b class="cmd">::term::ansi::code::attr::bgmagenta</b></a></dt>
<dd><p>Set background to <em>Magenta</em>.</p></dd>
<dt><a name="18"><b class="cmd">::term::ansi::code::attr::bgcyan</b></a></dt>
<dd><p>Set background to <em>Cyan</em>.</p></dd>
<dt><a name="19"><b class="cmd">::term::ansi::code::attr::bgwhite</b></a></dt>
<dd><p>Set background to <em>White</em>.</p></dd>
<dt><a name="20"><b class="cmd">::term::ansi::code::attr::bgdefault</b></a></dt>
<dd><p>Set default background (Transparent).</p></dd>
<dt><a name="21"><b class="cmd">::term::ansi::code::attr::bold</b></a></dt>
<dd><p>Bold on.</p></dd>
<dt><a name="22"><b class="cmd">::term::ansi::code::attr::dim</b></a></dt>
<dd><p>Dim on.</p></dd>
<dt><a name="23"><b class="cmd">::term::ansi::code::attr::italic</b></a></dt>
<dd><p>Italics on.</p></dd>
<dt><a name="24"><b class="cmd">::term::ansi::code::attr::underline</b></a></dt>
<dd><p>Underscore on.</p></dd>
<dt><a name="25"><b class="cmd">::term::ansi::code::attr::blink</b></a></dt>
<dd><p>Blink on.</p></dd>
<dt><a name="26"><b class="cmd">::term::ansi::code::attr::revers</b></a></dt>
<dd><p>Reverse on.</p></dd>
<dt><a name="27"><b class="cmd">::term::ansi::code::attr::hidden</b></a></dt>
<dd><p>Hidden on.</p></dd>
<dt><a name="28"><b class="cmd">::term::ansi::code::attr::strike</b></a></dt>
<dd><p>Strike-through on.</p></dd>
<dt><a name="29"><b class="cmd">::term::ansi::code::attr::nobold</b></a></dt>
<dd><p>Bold off.</p></dd>
<dt><a name="30"><b class="cmd">::term::ansi::code::attr::noitalic</b></a></dt>
<dd><p>Italics off.</p></dd>
<dt><a name="31"><b class="cmd">::term::ansi::code::attr::nounderline</b></a></dt>
<dd><p>Underscore off.</p></dd>
<dt><a name="32"><b class="cmd">::term::ansi::code::attr::noblink</b></a></dt>
<dd><p>Blink off.</p></dd>
<dt><a name="33"><b class="cmd">::term::ansi::code::attr::norevers</b></a></dt>
<dd><p>Reverse off.</p></dd>
<dt><a name="34"><b class="cmd">::term::ansi::code::attr::nohidden</b></a></dt>
<dd><p>Hidden off.</p></dd>
<dt><a name="35"><b class="cmd">::term::ansi::code::attr::nostrike</b></a></dt>
<dd><p>Strike-through off.</p></dd>
<dt><a name="36"><b class="cmd">::term::ansi::code::attr::reset</b></a></dt>
<dd><p>Reset all attributes to their default values.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key166">ansi</a>, <a href="../../../../index.html#key165">attribute control</a>, <a href="../../../../index.html#key164">color control</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/ansi_cctrl.html.





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462

<div class='fossil-doc' data-title='term::ansi::code::ctrl - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code::ctrl(n) 0.2 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code::ctrl - ANSI control sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Introspection</a></li>
<li class="doctools_subsection"><a href="#subsection2">Sequences</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term::ansi::code <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">term::ansi::code::ctrl <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::term::ansi::code::ctrl::names</b></a></li>
<li><a href="#2"><b class="cmd">::term::ansi::code::ctrl::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::term::ansi::code::ctrl::eeol</b></a></li>
<li><a href="#4"><b class="cmd">::term::ansi::code::ctrl::esol</b></a></li>
<li><a href="#5"><b class="cmd">::term::ansi::code::ctrl::el</b></a></li>
<li><a href="#6"><b class="cmd">::term::ansi::code::ctrl::ed</b></a></li>
<li><a href="#7"><b class="cmd">::term::ansi::code::ctrl::eu</b></a></li>
<li><a href="#8"><b class="cmd">::term::ansi::code::ctrl::es</b></a></li>
<li><a href="#9"><b class="cmd">::term::ansi::code::ctrl::sd</b></a></li>
<li><a href="#10"><b class="cmd">::term::ansi::code::ctrl::su</b></a></li>
<li><a href="#11"><b class="cmd">::term::ansi::code::ctrl::ch</b></a></li>
<li><a href="#12"><b class="cmd">::term::ansi::code::ctrl::sc</b></a></li>
<li><a href="#13"><b class="cmd">::term::ansi::code::ctrl::rc</b></a></li>
<li><a href="#14"><b class="cmd">::term::ansi::code::ctrl::sca</b></a></li>
<li><a href="#15"><b class="cmd">::term::ansi::code::ctrl::rca</b></a></li>
<li><a href="#16"><b class="cmd">::term::ansi::code::ctrl::st</b></a></li>
<li><a href="#17"><b class="cmd">::term::ansi::code::ctrl::ct</b></a></li>
<li><a href="#18"><b class="cmd">::term::ansi::code::ctrl::cat</b></a></li>
<li><a href="#19"><b class="cmd">::term::ansi::code::ctrl::qdc</b></a></li>
<li><a href="#20"><b class="cmd">::term::ansi::code::ctrl::qds</b></a></li>
<li><a href="#21"><b class="cmd">::term::ansi::code::ctrl::qcp</b></a></li>
<li><a href="#22"><b class="cmd">::term::ansi::code::ctrl::rd</b></a></li>
<li><a href="#23"><b class="cmd">::term::ansi::code::ctrl::elw</b></a></li>
<li><a href="#24"><b class="cmd">::term::ansi::code::ctrl::dlw</b></a></li>
<li><a href="#25"><b class="cmd">::term::ansi::code::ctrl::eg</b></a></li>
<li><a href="#26"><b class="cmd">::term::ansi::code::ctrl::lg</b></a></li>
<li><a href="#27"><b class="cmd">::term::ansi::code::ctrl::scs0</b> <i class="arg">tag</i></a></li>
<li><a href="#28"><b class="cmd">::term::ansi::code::ctrl::scs1</b> <i class="arg">tag</i></a></li>
<li><a href="#29"><b class="cmd">::term::ansi::code::ctrl::sda</b> <i class="arg">arg</i>...</a></li>
<li><a href="#30"><b class="cmd">::term::ansi::code::ctrl::sda_fgblack</b></a></li>
<li><a href="#31"><b class="cmd">::term::ansi::code::ctrl::sda_fgred</b></a></li>
<li><a href="#32"><b class="cmd">::term::ansi::code::ctrl::sda_fggreen</b></a></li>
<li><a href="#33"><b class="cmd">::term::ansi::code::ctrl::sda_fgyellow</b></a></li>
<li><a href="#34"><b class="cmd">::term::ansi::code::ctrl::sda_fgblue</b></a></li>
<li><a href="#35"><b class="cmd">::term::ansi::code::ctrl::sda_fgmagenta</b></a></li>
<li><a href="#36"><b class="cmd">::term::ansi::code::ctrl::sda_fgcyan</b></a></li>
<li><a href="#37"><b class="cmd">::term::ansi::code::ctrl::sda_fgwhite</b></a></li>
<li><a href="#38"><b class="cmd">::term::ansi::code::ctrl::sda_fgdefault</b></a></li>
<li><a href="#39"><b class="cmd">::term::ansi::code::ctrl::sda_bgblack</b></a></li>
<li><a href="#40"><b class="cmd">::term::ansi::code::ctrl::sda_bgred</b></a></li>
<li><a href="#41"><b class="cmd">::term::ansi::code::ctrl::sda_bggreen</b></a></li>
<li><a href="#42"><b class="cmd">::term::ansi::code::ctrl::sda_bgyellow</b></a></li>
<li><a href="#43"><b class="cmd">::term::ansi::code::ctrl::sda_bgblue</b></a></li>
<li><a href="#44"><b class="cmd">::term::ansi::code::ctrl::sda_bgmagenta</b></a></li>
<li><a href="#45"><b class="cmd">::term::ansi::code::ctrl::sda_bgcyan</b></a></li>
<li><a href="#46"><b class="cmd">::term::ansi::code::ctrl::sda_bgwhite</b></a></li>
<li><a href="#47"><b class="cmd">::term::ansi::code::ctrl::sda_bgdefault</b></a></li>
<li><a href="#48"><b class="cmd">::term::ansi::code::ctrl::sda_bold</b></a></li>
<li><a href="#49"><b class="cmd">::term::ansi::code::ctrl::sda_dim</b></a></li>
<li><a href="#50"><b class="cmd">::term::ansi::code::ctrl::sda_italic</b></a></li>
<li><a href="#51"><b class="cmd">::term::ansi::code::ctrl::sda_underline</b></a></li>
<li><a href="#52"><b class="cmd">::term::ansi::code::ctrl::sda_blink</b></a></li>
<li><a href="#53"><b class="cmd">::term::ansi::code::ctrl::sda_revers</b></a></li>
<li><a href="#54"><b class="cmd">::term::ansi::code::ctrl::sda_hidden</b></a></li>
<li><a href="#55"><b class="cmd">::term::ansi::code::ctrl::sda_strike</b></a></li>
<li><a href="#56"><b class="cmd">::term::ansi::code::ctrl::sda_nobold</b></a></li>
<li><a href="#57"><b class="cmd">::term::ansi::code::ctrl::sda_noitalic</b></a></li>
<li><a href="#58"><b class="cmd">::term::ansi::code::ctrl::sda_nounderline</b></a></li>
<li><a href="#59"><b class="cmd">::term::ansi::code::ctrl::sda_noblink</b></a></li>
<li><a href="#60"><b class="cmd">::term::ansi::code::ctrl::sda_norevers</b></a></li>
<li><a href="#61"><b class="cmd">::term::ansi::code::ctrl::sda_nohidden</b></a></li>
<li><a href="#62"><b class="cmd">::term::ansi::code::ctrl::sda_nostrike</b></a></li>
<li><a href="#63"><b class="cmd">::term::ansi::code::ctrl::sda_reset</b></a></li>
<li><a href="#64"><b class="cmd">::term::ansi::send::fcp</b> <i class="arg">row</i> <i class="arg">col</i></a></li>
<li><a href="#65"><b class="cmd">::term::ansi::code::ctrl::cu</b> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#66"><b class="cmd">::term::ansi::code::ctrl::cd</b> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#67"><b class="cmd">::term::ansi::code::ctrl::cf</b> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#68"><b class="cmd">::term::ansi::code::ctrl::cb</b> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#69"><b class="cmd">::term::ansi::code::ctrl::ss</b> <span class="opt">?<i class="arg">s</i> <i class="arg">e</i>?</span></a></li>
<li><a href="#70"><b class="cmd">::term::ansi::code::ctrl::skd</b> <i class="arg">code</i> <i class="arg">str</i></a></li>
<li><a href="#71"><b class="cmd">::term::ansi::code::ctrl::title</b> <i class="arg">str</i></a></li>
<li><a href="#72"><b class="cmd">::term::ansi::code::ctrl::gron</b></a></li>
<li><a href="#73"><b class="cmd">::term::ansi::code::ctrl::groff</b></a></li>
<li><a href="#74"><b class="cmd">::term::ansi::code::ctrl::tlc</b></a></li>
<li><a href="#75"><b class="cmd">::term::ansi::code::ctrl::trc</b></a></li>
<li><a href="#76"><b class="cmd">::term::ansi::code::ctrl::brc</b></a></li>
<li><a href="#77"><b class="cmd">::term::ansi::code::ctrl::blc</b></a></li>
<li><a href="#78"><b class="cmd">::term::ansi::code::ctrl::ltj</b></a></li>
<li><a href="#79"><b class="cmd">::term::ansi::code::ctrl::ttj</b></a></li>
<li><a href="#80"><b class="cmd">::term::ansi::code::ctrl::rtj</b></a></li>
<li><a href="#81"><b class="cmd">::term::ansi::code::ctrl::btj</b></a></li>
<li><a href="#82"><b class="cmd">::term::ansi::code::ctrl::fwj</b></a></li>
<li><a href="#83"><b class="cmd">::term::ansi::code::ctrl::hl</b></a></li>
<li><a href="#84"><b class="cmd">::term::ansi::code::ctrl::vl</b></a></li>
<li><a href="#85"><b class="cmd">::term::ansi::code::ctrl::groptim</b> <i class="arg">str</i></a></li>
<li><a href="#86"><b class="cmd">::term::ansi::code::ctrl::clear</b></a></li>
<li><a href="#87"><b class="cmd">::term::ansi::code::ctrl::init</b></a></li>
<li><a href="#88"><b class="cmd">::term::ansi::code::ctrl::showat</b> <i class="arg">row</i> <i class="arg">col</i> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides symbolic names for the ANSI control
sequences. For each sequence a single command is provided which
returns the sequence as its result. None of the commands of this
package write to a channel; that is handled by higher level packages,
like <b class="package"><a href="ansi_send.html">term::ansi::send</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Introspection</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::ansi::code::ctrl::names</b></a></dt>
<dd><p>This command is for introspection. It returns as its result a list
containing the names of all attribute commands.</p></dd>
<dt><a name="2"><b class="cmd">::term::ansi::code::ctrl::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command imports some or all attribute commands into the namespace
<i class="arg">ns</i>. This is by default the namespace <em>ctrl</em>. Note that this
is relative namespace name, placing the imported command into a child
of the current namespace. By default all commands are imported, this
can howver be restricted by listing the names of the wanted commands
after the namespace argument.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Sequences</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">::term::ansi::code::ctrl::eeol</b></a></dt>
<dd><p>Erase (to) End Of Line</p></dd>
<dt><a name="4"><b class="cmd">::term::ansi::code::ctrl::esol</b></a></dt>
<dd><p>Erase (to) Start Of Line</p></dd>
<dt><a name="5"><b class="cmd">::term::ansi::code::ctrl::el</b></a></dt>
<dd><p>Erase (current) Line</p></dd>
<dt><a name="6"><b class="cmd">::term::ansi::code::ctrl::ed</b></a></dt>
<dd><p>Erase Down (to bottom)</p></dd>
<dt><a name="7"><b class="cmd">::term::ansi::code::ctrl::eu</b></a></dt>
<dd><p>Erase Up (to top)</p></dd>
<dt><a name="8"><b class="cmd">::term::ansi::code::ctrl::es</b></a></dt>
<dd><p>Erase Screen</p></dd>
<dt><a name="9"><b class="cmd">::term::ansi::code::ctrl::sd</b></a></dt>
<dd><p>Scroll Down</p></dd>
<dt><a name="10"><b class="cmd">::term::ansi::code::ctrl::su</b></a></dt>
<dd><p>Scroll Up</p></dd>
<dt><a name="11"><b class="cmd">::term::ansi::code::ctrl::ch</b></a></dt>
<dd><p>Cursor Home</p></dd>
<dt><a name="12"><b class="cmd">::term::ansi::code::ctrl::sc</b></a></dt>
<dd><p>Save Cursor</p></dd>
<dt><a name="13"><b class="cmd">::term::ansi::code::ctrl::rc</b></a></dt>
<dd><p>Restore Cursor (Unsave)</p></dd>
<dt><a name="14"><b class="cmd">::term::ansi::code::ctrl::sca</b></a></dt>
<dd><p>Save Cursor + Attributes</p></dd>
<dt><a name="15"><b class="cmd">::term::ansi::code::ctrl::rca</b></a></dt>
<dd><p>Restore Cursor + Attributes</p></dd>
<dt><a name="16"><b class="cmd">::term::ansi::code::ctrl::st</b></a></dt>
<dd><p>Set Tab (@ current position)</p></dd>
<dt><a name="17"><b class="cmd">::term::ansi::code::ctrl::ct</b></a></dt>
<dd><p>Clear Tab (@ current position)</p></dd>
<dt><a name="18"><b class="cmd">::term::ansi::code::ctrl::cat</b></a></dt>
<dd><p>Clear All Tabs</p></dd>
<dt><a name="19"><b class="cmd">::term::ansi::code::ctrl::qdc</b></a></dt>
<dd><p>Query Device Code</p></dd>
<dt><a name="20"><b class="cmd">::term::ansi::code::ctrl::qds</b></a></dt>
<dd><p>Query Device Status</p></dd>
<dt><a name="21"><b class="cmd">::term::ansi::code::ctrl::qcp</b></a></dt>
<dd><p>Query Cursor Position</p></dd>
<dt><a name="22"><b class="cmd">::term::ansi::code::ctrl::rd</b></a></dt>
<dd><p>Reset Device</p></dd>
<dt><a name="23"><b class="cmd">::term::ansi::code::ctrl::elw</b></a></dt>
<dd><p>Enable Line Wrap</p></dd>
<dt><a name="24"><b class="cmd">::term::ansi::code::ctrl::dlw</b></a></dt>
<dd><p>Disable Line Wrap</p></dd>
<dt><a name="25"><b class="cmd">::term::ansi::code::ctrl::eg</b></a></dt>
<dd><p>Enter Graphics Mode</p></dd>
<dt><a name="26"><b class="cmd">::term::ansi::code::ctrl::lg</b></a></dt>
<dd><p>Exit Graphics Mode</p></dd>
<dt><a name="27"><b class="cmd">::term::ansi::code::ctrl::scs0</b> <i class="arg">tag</i></a></dt>
<dd><p>Set default character set</p></dd>
<dt><a name="28"><b class="cmd">::term::ansi::code::ctrl::scs1</b> <i class="arg">tag</i></a></dt>
<dd><p>Set alternate character set
Select Character Set.</p>
<p>Choose which character set is used for either default (scs0) or
alternate font (scs1). This does not change whether default or
alternate font are used, only their definition.</p>
<p>The legal tags, and their meanings, are:</p>
<dl class="doctools_definitions">
<dt>A</dt>
<dd><p>United Kingdom Set</p></dd>
<dt>B</dt>
<dd><p>ASCII Set</p></dd>
<dt>0</dt>
<dd><p>Special Graphics</p></dd>
<dt>1</dt>
<dd><p>Alternate Character ROM Standard Character Set</p></dd>
<dt>2</dt>
<dd><p>Alternate Character ROM Special Graphics</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::term::ansi::code::ctrl::sda</b> <i class="arg">arg</i>...</a></dt>
<dd><p>Set Display Attributes. The arguments are the code sequences for the possible
attributes, as provided by the package <b class="package"><a href="ansi_cattr.html">term::ansi::code::attr</a></b>. For
convenience this package also provides additional commands each setting a single
specific attribute.</p></dd>
<dt><a name="30"><b class="cmd">::term::ansi::code::ctrl::sda_fgblack</b></a></dt>
<dd><p>Set text color to <em>Black</em>.</p></dd>
<dt><a name="31"><b class="cmd">::term::ansi::code::ctrl::sda_fgred</b></a></dt>
<dd><p>Set text color to <em>Red</em>.</p></dd>
<dt><a name="32"><b class="cmd">::term::ansi::code::ctrl::sda_fggreen</b></a></dt>
<dd><p>Set text color to <em>Green</em>.</p></dd>
<dt><a name="33"><b class="cmd">::term::ansi::code::ctrl::sda_fgyellow</b></a></dt>
<dd><p>Set text color to <em>Yellow</em>.</p></dd>
<dt><a name="34"><b class="cmd">::term::ansi::code::ctrl::sda_fgblue</b></a></dt>
<dd><p>Set text color to <em>Blue</em>.</p></dd>
<dt><a name="35"><b class="cmd">::term::ansi::code::ctrl::sda_fgmagenta</b></a></dt>
<dd><p>Set text color to <em>Magenta</em>.</p></dd>
<dt><a name="36"><b class="cmd">::term::ansi::code::ctrl::sda_fgcyan</b></a></dt>
<dd><p>Set text color to <em>Cyan</em>.</p></dd>
<dt><a name="37"><b class="cmd">::term::ansi::code::ctrl::sda_fgwhite</b></a></dt>
<dd><p>Set text color to <em>White</em>.</p></dd>
<dt><a name="38"><b class="cmd">::term::ansi::code::ctrl::sda_fgdefault</b></a></dt>
<dd><p>Set default text color (<em>Black</em>).</p></dd>
<dt><a name="39"><b class="cmd">::term::ansi::code::ctrl::sda_bgblack</b></a></dt>
<dd><p>Set background to <em>Black</em>.</p></dd>
<dt><a name="40"><b class="cmd">::term::ansi::code::ctrl::sda_bgred</b></a></dt>
<dd><p>Set background to <em>Red</em>.</p></dd>
<dt><a name="41"><b class="cmd">::term::ansi::code::ctrl::sda_bggreen</b></a></dt>
<dd><p>Set background to <em>Green</em>.</p></dd>
<dt><a name="42"><b class="cmd">::term::ansi::code::ctrl::sda_bgyellow</b></a></dt>
<dd><p>Set background to <em>Yellow</em>.</p></dd>
<dt><a name="43"><b class="cmd">::term::ansi::code::ctrl::sda_bgblue</b></a></dt>
<dd><p>Set background to <em>Blue</em>.</p></dd>
<dt><a name="44"><b class="cmd">::term::ansi::code::ctrl::sda_bgmagenta</b></a></dt>
<dd><p>Set background to <em>Magenta</em>.</p></dd>
<dt><a name="45"><b class="cmd">::term::ansi::code::ctrl::sda_bgcyan</b></a></dt>
<dd><p>Set background to <em>Cyan</em>.</p></dd>
<dt><a name="46"><b class="cmd">::term::ansi::code::ctrl::sda_bgwhite</b></a></dt>
<dd><p>Set background to <em>White</em>.</p></dd>
<dt><a name="47"><b class="cmd">::term::ansi::code::ctrl::sda_bgdefault</b></a></dt>
<dd><p>Set default background (Transparent).</p></dd>
<dt><a name="48"><b class="cmd">::term::ansi::code::ctrl::sda_bold</b></a></dt>
<dd><p>Bold on.</p></dd>
<dt><a name="49"><b class="cmd">::term::ansi::code::ctrl::sda_dim</b></a></dt>
<dd><p>Dim on.</p></dd>
<dt><a name="50"><b class="cmd">::term::ansi::code::ctrl::sda_italic</b></a></dt>
<dd><p>Italics on.</p></dd>
<dt><a name="51"><b class="cmd">::term::ansi::code::ctrl::sda_underline</b></a></dt>
<dd><p>Underscore on.</p></dd>
<dt><a name="52"><b class="cmd">::term::ansi::code::ctrl::sda_blink</b></a></dt>
<dd><p>Blink on.</p></dd>
<dt><a name="53"><b class="cmd">::term::ansi::code::ctrl::sda_revers</b></a></dt>
<dd><p>Reverse on.</p></dd>
<dt><a name="54"><b class="cmd">::term::ansi::code::ctrl::sda_hidden</b></a></dt>
<dd><p>Hidden on.</p></dd>
<dt><a name="55"><b class="cmd">::term::ansi::code::ctrl::sda_strike</b></a></dt>
<dd><p>Strike-through on.</p></dd>
<dt><a name="56"><b class="cmd">::term::ansi::code::ctrl::sda_nobold</b></a></dt>
<dd><p>Bold off.</p></dd>
<dt><a name="57"><b class="cmd">::term::ansi::code::ctrl::sda_noitalic</b></a></dt>
<dd><p>Italics off.</p></dd>
<dt><a name="58"><b class="cmd">::term::ansi::code::ctrl::sda_nounderline</b></a></dt>
<dd><p>Underscore off.</p></dd>
<dt><a name="59"><b class="cmd">::term::ansi::code::ctrl::sda_noblink</b></a></dt>
<dd><p>Blink off.</p></dd>
<dt><a name="60"><b class="cmd">::term::ansi::code::ctrl::sda_norevers</b></a></dt>
<dd><p>Reverse off.</p></dd>
<dt><a name="61"><b class="cmd">::term::ansi::code::ctrl::sda_nohidden</b></a></dt>
<dd><p>Hidden off.</p></dd>
<dt><a name="62"><b class="cmd">::term::ansi::code::ctrl::sda_nostrike</b></a></dt>
<dd><p>Strike-through off.</p></dd>
<dt><a name="63"><b class="cmd">::term::ansi::code::ctrl::sda_reset</b></a></dt>
<dd><p>Reset all attributes to their default values.</p></dd>
<dt><a name="64"><b class="cmd">::term::ansi::send::fcp</b> <i class="arg">row</i> <i class="arg">col</i></a></dt>
<dd><p>Force Cursor Position (aka Go To).</p></dd>
<dt><a name="65"><b class="cmd">::term::ansi::code::ctrl::cu</b> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>Cursor Up. <i class="arg">n</i> defaults to 1.</p></dd>
<dt><a name="66"><b class="cmd">::term::ansi::code::ctrl::cd</b> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>Cursor Down. <i class="arg">n</i> defaults to 1.</p></dd>
<dt><a name="67"><b class="cmd">::term::ansi::code::ctrl::cf</b> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>Cursor Forward. <i class="arg">n</i> defaults to 1.</p></dd>
<dt><a name="68"><b class="cmd">::term::ansi::code::ctrl::cb</b> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>Cursor Backward. <i class="arg">n</i> defaults to 1.</p></dd>
<dt><a name="69"><b class="cmd">::term::ansi::code::ctrl::ss</b> <span class="opt">?<i class="arg">s</i> <i class="arg">e</i>?</span></a></dt>
<dd><p>Scroll Screen (entire display, or between rows start end, inclusive).</p></dd>
<dt><a name="70"><b class="cmd">::term::ansi::code::ctrl::skd</b> <i class="arg">code</i> <i class="arg">str</i></a></dt>
<dd><p>Set Key Definition.</p></dd>
<dt><a name="71"><b class="cmd">::term::ansi::code::ctrl::title</b> <i class="arg">str</i></a></dt>
<dd><p>Set the terminal title.</p></dd>
<dt><a name="72"><b class="cmd">::term::ansi::code::ctrl::gron</b></a></dt>
<dd><p>Switch to character/box graphics. I.e. switch to the alternate font.</p></dd>
<dt><a name="73"><b class="cmd">::term::ansi::code::ctrl::groff</b></a></dt>
<dd><p>Switch to regular characters. I.e. switch to the default font.</p></dd>
<dt><a name="74"><b class="cmd">::term::ansi::code::ctrl::tlc</b></a></dt>
<dd><p>Character graphics, Top Left Corner.</p></dd>
<dt><a name="75"><b class="cmd">::term::ansi::code::ctrl::trc</b></a></dt>
<dd><p>Character graphics, Top Right Corner.</p></dd>
<dt><a name="76"><b class="cmd">::term::ansi::code::ctrl::brc</b></a></dt>
<dd><p>Character graphics, Bottom Right Corner.</p></dd>
<dt><a name="77"><b class="cmd">::term::ansi::code::ctrl::blc</b></a></dt>
<dd><p>Character graphics, Bottom Left Corner.</p></dd>
<dt><a name="78"><b class="cmd">::term::ansi::code::ctrl::ltj</b></a></dt>
<dd><p>Character graphics, Left T Junction.</p></dd>
<dt><a name="79"><b class="cmd">::term::ansi::code::ctrl::ttj</b></a></dt>
<dd><p>Character graphics, Top T Junction.</p></dd>
<dt><a name="80"><b class="cmd">::term::ansi::code::ctrl::rtj</b></a></dt>
<dd><p>Character graphics, Right T Junction.</p></dd>
<dt><a name="81"><b class="cmd">::term::ansi::code::ctrl::btj</b></a></dt>
<dd><p>Character graphics, Bottom T Junction.</p></dd>
<dt><a name="82"><b class="cmd">::term::ansi::code::ctrl::fwj</b></a></dt>
<dd><p>Character graphics, Four-Way Junction.</p></dd>
<dt><a name="83"><b class="cmd">::term::ansi::code::ctrl::hl</b></a></dt>
<dd><p>Character graphics, Horizontal Line.</p></dd>
<dt><a name="84"><b class="cmd">::term::ansi::code::ctrl::vl</b></a></dt>
<dd><p>Character graphics, Vertical Line.</p></dd>
<dt><a name="85"><b class="cmd">::term::ansi::code::ctrl::groptim</b> <i class="arg">str</i></a></dt>
<dd><p>Optimize character graphics. The generator commands above create way to many
superfluous commands shifting into and out of the graphics mode. This command
removes all shifts which are not needed. To this end it also knows which
characters will look the same in both modes, to handle strings created outside
of this package.</p></dd>
<dt><a name="86"><b class="cmd">::term::ansi::code::ctrl::clear</b></a></dt>
<dd><p>Clear screen. In essence a sequence of CursorHome + EraseDown.</p></dd>
<dt><a name="87"><b class="cmd">::term::ansi::code::ctrl::init</b></a></dt>
<dd><p>Initialize default and alternate fonts to ASCII and box graphics.</p></dd>
<dt><a name="88"><b class="cmd">::term::ansi::code::ctrl::showat</b> <i class="arg">row</i> <i class="arg">col</i> <i class="arg">text</i></a></dt>
<dd><p>Format the block of text for display at the specified location.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key166">ansi</a>, <a href="../../../../index.html#key165">attribute control</a>, <a href="../../../../index.html#key164">color control</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/ansi_cmacros.html.































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191

<div class='fossil-doc' data-title='term::ansi::code::macros - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code::macros(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code::macros - Macro sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Introspection</a></li>
<li class="doctools_subsection"><a href="#subsection2">Sequences</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">textutil::repeat</b></li>
<li>package require <b class="pkgname">textutil::tabify</b></li>
<li>package require <b class="pkgname">term::ansi::code::macros <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::term::ansi::code::macros::names</b></a></li>
<li><a href="#2"><b class="cmd">::term::ansi::code::macros::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::term::ansi::code::macros::menu</b> <i class="arg">menu</i></a></li>
<li><a href="#4"><b class="cmd">::term::ansi::code::macros::frame</b> <i class="arg">string</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides higher level control sequences for more complex
shapes.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Introspection</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::ansi::code::macros::names</b></a></dt>
<dd><p>This command is for introspection. It returns as its result a list
containing the names of all attribute commands.</p></dd>
<dt><a name="2"><b class="cmd">::term::ansi::code::macros::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command imports some or all attribute commands into the namespace
<i class="arg">ns</i>. This is by default the namespace <em>macros</em>. Note that
this is relative namespace name, placing the imported command into a
child of the current namespace. By default all commands are imported,
this can howver be restricted by listing the names of the wanted
commands after the namespace argument.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Sequences</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">::term::ansi::code::macros::menu</b> <i class="arg">menu</i></a></dt>
<dd><p>The description of a menu is converted into a formatted rectangular
block of text, with the menu command characters highlighted using bold
red text.  The result is returned as the result of the command.</p>
<p>The description, <i class="arg">menu</i>, is a dictionary mapping from menu label
to command character.</p></dd>
<dt><a name="4"><b class="cmd">::term::ansi::code::macros::frame</b> <i class="arg">string</i></a></dt>
<dd><p>The paragraph of text contained in the string is padded with spaces at
the right margin, after normalizing internal tabs, and then put into a
frame made of box-graphics. The result is returned as the result of
the command.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key166">ansi</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key674">frame</a>, <a href="../../../../index.html#key673">menu</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/ansi_code.html.















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

<div class='fossil-doc' data-title='term::ansi::code - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code(n) 0.2 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code - Helper for control sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term::ansi::code <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::term::ansi::code::esc</b> <i class="arg">str</i></a></li>
<li><a href="#2"><b class="cmd">::term::ansi::code::escb</b> <i class="arg">str</i></a></li>
<li><a href="#3"><b class="cmd">::term::ansi::code::define</b> <i class="arg">name</i> <i class="arg">escape</i> <i class="arg">code</i></a></li>
<li><a href="#4"><b class="cmd">::term::ansi::code::const</b> <i class="arg">name</i> <i class="arg">code</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands enabling the definition of control
sequences in an easy manner.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::ansi::code::esc</b> <i class="arg">str</i></a></dt>
<dd><p>This command returns the argument string, prefixed with the ANSI
escape character, &quot;\033.&quot;</p></dd>
<dt><a name="2"><b class="cmd">::term::ansi::code::escb</b> <i class="arg">str</i></a></dt>
<dd><p>This command returns the argument string, prefixed with a common ANSI
escape sequence, &quot;\033[&quot;.</p></dd>
<dt><a name="3"><b class="cmd">::term::ansi::code::define</b> <i class="arg">name</i> <i class="arg">escape</i> <i class="arg">code</i></a></dt>
<dd><p>This command defines a procedure <i class="arg">name</i> which returns the control
sequence <i class="arg">code</i>, beginning with the specified escape sequence,
either <b class="const">esc</b>, or <b class="const">escb</b>.</p></dd>
<dt><a name="4"><b class="cmd">::term::ansi::code::const</b> <i class="arg">name</i> <i class="arg">code</i></a></dt>
<dd><p>This command defines a procedure <i class="arg">name</i> which returns the control
sequence <i class="arg">code</i>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key338">declare</a>, <a href="../../../../index.html#key339">define</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/ansi_ctrlu.html.















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199

<div class='fossil-doc' data-title='term::ansi::ctrl::unix - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::ctrl::unix(n) 0.1.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::ctrl::unix - Control operations and queries</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Introspection</a></li>
<li class="doctools_subsection"><a href="#subsection2">Operations</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term::ansi::ctrl::unix <span class="opt">?0.1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::term::ansi::ctrl::unix::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::term::ansi::ctrl::unix::raw</b></a></li>
<li><a href="#3"><b class="cmd">::term::ansi::ctrl::unix::cooked</b></a></li>
<li><a href="#4"><b class="cmd">::term::ansi::ctrl::unix::columns</b></a></li>
<li><a href="#5"><b class="cmd">::term::ansi::ctrl::unix::rows</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><em>WARNING</em>: This package is unix-specific and depends on the
availability of two unix system commands for terminal control,
i.e. <b class="syscmd">stty</b> and <b class="syscmd">tput</b>, both of which have to be found
in the <b class="variable">$PATH</b>. If any of these two commands is missing the
loading of the package will fail.</p>
<p>The package provides commands to switch the standard input of the
current process between <i class="term"><a href="../../../../index.html#key508">raw</a></i> and <i class="term"><a href="../../../../index.html#key506">cooked</a></i> input modes, and
to query the size of terminals, i.e. the available number of columns
and lines.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Introspection</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::ansi::ctrl::unix::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command imports some or all attribute commands into the namespace
<i class="arg">ns</i>. This is by default the namespace <em>ctrl</em>. Note that this
is relative namespace name, placing the imported command into a child
of the current namespace. By default all commands are imported, this
can howver be restricted by listing the names of the wanted commands
after the namespace argument.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Operations</a></h3>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">::term::ansi::ctrl::unix::raw</b></a></dt>
<dd><p>This command switches the standard input of the current process to
<i class="term"><a href="../../../../index.html#key508">raw</a></i> input mode. This means that from then on all characters
typed by the user are immediately reported to the application instead
of waiting in the OS buffer until the Enter/Return key is received.</p></dd>
<dt><a name="3"><b class="cmd">::term::ansi::ctrl::unix::cooked</b></a></dt>
<dd><p>This command switches the standard input of the current process to
<i class="term"><a href="../../../../index.html#key506">cooked</a></i> input mode. This means that from then on all characters
typed by the user are kept in OS buffers for editing until the
Enter/Return key is received.</p></dd>
<dt><a name="4"><b class="cmd">::term::ansi::ctrl::unix::columns</b></a></dt>
<dd><p>This command queries the terminal connected to the standard input for
the number of columns available for display.</p></dd>
<dt><a name="5"><b class="cmd">::term::ansi::ctrl::unix::rows</b></a></dt>
<dd><p>This command queries the terminal connected to the standard input for
the number of rows (aka lines) available for display.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key166">ansi</a>, <a href="../../../../index.html#key507">columns</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key506">cooked</a>, <a href="../../../../index.html#key505">input mode</a>, <a href="../../../../index.html#key510">lines</a>, <a href="../../../../index.html#key508">raw</a>, <a href="../../../../index.html#key509">rows</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/ansi_send.html.





























































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446

<div class='fossil-doc' data-title='term::ansi::send - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::send(n) 0.2 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::send - Output of ANSI control sequences to terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term::ansi::send <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::term::ansi::send::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <i class="arg">...</i></a></li>
<li><a href="#2"><b class="cmd">::term::ansi::send::eeol</b></a></li>
<li><a href="#3"><b class="cmd">::term::ansi::send::esol</b></a></li>
<li><a href="#4"><b class="cmd">::term::ansi::send::el</b></a></li>
<li><a href="#5"><b class="cmd">::term::ansi::send::ed</b></a></li>
<li><a href="#6"><b class="cmd">::term::ansi::send::eu</b></a></li>
<li><a href="#7"><b class="cmd">::term::ansi::send::es</b></a></li>
<li><a href="#8"><b class="cmd">::term::ansi::send::sd</b></a></li>
<li><a href="#9"><b class="cmd">::term::ansi::send::su</b></a></li>
<li><a href="#10"><b class="cmd">::term::ansi::send::ch</b></a></li>
<li><a href="#11"><b class="cmd">::term::ansi::send::sc</b></a></li>
<li><a href="#12"><b class="cmd">::term::ansi::send::rc</b></a></li>
<li><a href="#13"><b class="cmd">::term::ansi::send::sca</b></a></li>
<li><a href="#14"><b class="cmd">::term::ansi::send::rca</b></a></li>
<li><a href="#15"><b class="cmd">::term::ansi::send::st</b></a></li>
<li><a href="#16"><b class="cmd">::term::ansi::send::ct</b></a></li>
<li><a href="#17"><b class="cmd">::term::ansi::send::cat</b></a></li>
<li><a href="#18"><b class="cmd">::term::ansi::send::qdc</b></a></li>
<li><a href="#19"><b class="cmd">::term::ansi::send::qds</b></a></li>
<li><a href="#20"><b class="cmd">::term::ansi::send::qcp</b></a></li>
<li><a href="#21"><b class="cmd">::term::ansi::send::rd</b></a></li>
<li><a href="#22"><b class="cmd">::term::ansi::send::elw</b></a></li>
<li><a href="#23"><b class="cmd">::term::ansi::send::dlw</b></a></li>
<li><a href="#24"><b class="cmd">::term::ansi::send::eg</b></a></li>
<li><a href="#25"><b class="cmd">::term::ansi::send::lg</b></a></li>
<li><a href="#26"><b class="cmd">::term::ansi::send::scs0</b> <i class="arg">tag</i></a></li>
<li><a href="#27"><b class="cmd">::term::ansi::send::scs1</b> <i class="arg">tag</i></a></li>
<li><a href="#28"><b class="cmd">::term::ansi::send::sda</b> <i class="arg">arg</i>...</a></li>
<li><a href="#29"><b class="cmd">::term::ansi::send::sda_fgblack</b></a></li>
<li><a href="#30"><b class="cmd">::term::ansi::send::sda_fgred</b></a></li>
<li><a href="#31"><b class="cmd">::term::ansi::send::sda_fggreen</b></a></li>
<li><a href="#32"><b class="cmd">::term::ansi::send::sda_fgyellow</b></a></li>
<li><a href="#33"><b class="cmd">::term::ansi::send::sda_fgblue</b></a></li>
<li><a href="#34"><b class="cmd">::term::ansi::send::sda_fgmagenta</b></a></li>
<li><a href="#35"><b class="cmd">::term::ansi::send::sda_fgcyan</b></a></li>
<li><a href="#36"><b class="cmd">::term::ansi::send::sda_fgwhite</b></a></li>
<li><a href="#37"><b class="cmd">::term::ansi::send::sda_fgdefault</b></a></li>
<li><a href="#38"><b class="cmd">::term::ansi::send::sda_bgblack</b></a></li>
<li><a href="#39"><b class="cmd">::term::ansi::send::sda_bgred</b></a></li>
<li><a href="#40"><b class="cmd">::term::ansi::send::sda_bggreen</b></a></li>
<li><a href="#41"><b class="cmd">::term::ansi::send::sda_bgyellow</b></a></li>
<li><a href="#42"><b class="cmd">::term::ansi::send::sda_bgblue</b></a></li>
<li><a href="#43"><b class="cmd">::term::ansi::send::sda_bgmagenta</b></a></li>
<li><a href="#44"><b class="cmd">::term::ansi::send::sda_bgcyan</b></a></li>
<li><a href="#45"><b class="cmd">::term::ansi::send::sda_bgwhite</b></a></li>
<li><a href="#46"><b class="cmd">::term::ansi::send::sda_bgdefault</b></a></li>
<li><a href="#47"><b class="cmd">::term::ansi::send::sda_bold</b></a></li>
<li><a href="#48"><b class="cmd">::term::ansi::send::sda_dim</b></a></li>
<li><a href="#49"><b class="cmd">::term::ansi::send::sda_italic</b></a></li>
<li><a href="#50"><b class="cmd">::term::ansi::send::sda_underline</b></a></li>
<li><a href="#51"><b class="cmd">::term::ansi::send::sda_blink</b></a></li>
<li><a href="#52"><b class="cmd">::term::ansi::send::sda_revers</b></a></li>
<li><a href="#53"><b class="cmd">::term::ansi::send::sda_hidden</b></a></li>
<li><a href="#54"><b class="cmd">::term::ansi::send::sda_strike</b></a></li>
<li><a href="#55"><b class="cmd">::term::ansi::send::sda_nobold</b></a></li>
<li><a href="#56"><b class="cmd">::term::ansi::send::sda_noitalic</b></a></li>
<li><a href="#57"><b class="cmd">::term::ansi::send::sda_nounderline</b></a></li>
<li><a href="#58"><b class="cmd">::term::ansi::send::sda_noblink</b></a></li>
<li><a href="#59"><b class="cmd">::term::ansi::send::sda_norevers</b></a></li>
<li><a href="#60"><b class="cmd">::term::ansi::send::sda_nohidden</b></a></li>
<li><a href="#61"><b class="cmd">::term::ansi::send::sda_nostrike</b></a></li>
<li><a href="#62"><b class="cmd">::term::ansi::send::sda_reset</b></a></li>
<li><a href="#63"><b class="cmd">::term::ansi::send::fcp</b> <i class="arg">row</i> <i class="arg">col</i></a></li>
<li><a href="#64"><b class="cmd">::term::ansi::send::cu</b> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#65"><b class="cmd">::term::ansi::send::cd</b> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#66"><b class="cmd">::term::ansi::send::cf</b> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#67"><b class="cmd">::term::ansi::send::cb</b> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#68"><b class="cmd">::term::ansi::send::ss</b> <span class="opt">?<i class="arg">s</i> <i class="arg">e</i>?</span></a></li>
<li><a href="#69"><b class="cmd">::term::ansi::send::skd</b> <i class="arg">code</i> <i class="arg">str</i></a></li>
<li><a href="#70"><b class="cmd">::term::ansi::send::title</b> <i class="arg">str</i></a></li>
<li><a href="#71"><b class="cmd">::term::ansi::send::gron</b></a></li>
<li><a href="#72"><b class="cmd">::term::ansi::send::groff</b></a></li>
<li><a href="#73"><b class="cmd">::term::ansi::send::tlc</b></a></li>
<li><a href="#74"><b class="cmd">::term::ansi::send::trc</b></a></li>
<li><a href="#75"><b class="cmd">::term::ansi::send::brc</b></a></li>
<li><a href="#76"><b class="cmd">::term::ansi::send::blc</b></a></li>
<li><a href="#77"><b class="cmd">::term::ansi::send::ltj</b></a></li>
<li><a href="#78"><b class="cmd">::term::ansi::send::ttj</b></a></li>
<li><a href="#79"><b class="cmd">::term::ansi::send::rtj</b></a></li>
<li><a href="#80"><b class="cmd">::term::ansi::send::btj</b></a></li>
<li><a href="#81"><b class="cmd">::term::ansi::send::fwj</b></a></li>
<li><a href="#82"><b class="cmd">::term::ansi::send::hl</b></a></li>
<li><a href="#83"><b class="cmd">::term::ansi::send::vl</b></a></li>
<li><a href="#84"><b class="cmd">::term::ansi::send::groptim</b> <i class="arg">str</i></a></li>
<li><a href="#85"><b class="cmd">::term::ansi::send::clear</b></a></li>
<li><a href="#86"><b class="cmd">::term::ansi::send::init</b></a></li>
<li><a href="#87"><b class="cmd">::term::ansi::send::showat</b> <i class="arg">row</i> <i class="arg">col</i> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to send ANSI terminal control sequences to a
terminal. All commands come in two variants, one for sending to any channel,
the other for sending to <em>stdout</em>.</p>
<p>The commands are defined using the control sequences provided by the package
<b class="package"><a href="ansi_cctrl.html">term::ansi::code::ctrl</a></b>. They have the same arguments as the commands
they are based on, with the exception of the variant for sending to any channel.
Their first argument is always a channel handle, then followed by the original
arguments. Below we will list only the variant sending to <em>stdout</em>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::ansi::send::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <i class="arg">...</i></a></dt>
<dd><p>Imports the commands of this package into the namespace <i class="arg">ns</i>. If not specified
it defaults to <em>send</em>. Note that this default is a relative namespace name,
i.e. the actual namespace will be created under the current namespace.</p>
<p>By default all commands will be imported, this can however be restricted to specific
commands, by listing them after the namespace to import them into.</p></dd>
<dt><a name="2"><b class="cmd">::term::ansi::send::eeol</b></a></dt>
<dd><p>Erase (to) End Of Line.</p></dd>
<dt><a name="3"><b class="cmd">::term::ansi::send::esol</b></a></dt>
<dd><p>Erase (to) Start Of Line.</p></dd>
<dt><a name="4"><b class="cmd">::term::ansi::send::el</b></a></dt>
<dd><p>Erase (current) Line.</p></dd>
<dt><a name="5"><b class="cmd">::term::ansi::send::ed</b></a></dt>
<dd><p>Erase Down (to bottom).</p></dd>
<dt><a name="6"><b class="cmd">::term::ansi::send::eu</b></a></dt>
<dd><p>Erase Up (to top).</p></dd>
<dt><a name="7"><b class="cmd">::term::ansi::send::es</b></a></dt>
<dd><p>Erase Screen.</p></dd>
<dt><a name="8"><b class="cmd">::term::ansi::send::sd</b></a></dt>
<dd><p>Scroll Down.</p></dd>
<dt><a name="9"><b class="cmd">::term::ansi::send::su</b></a></dt>
<dd><p>Scroll Up.</p></dd>
<dt><a name="10"><b class="cmd">::term::ansi::send::ch</b></a></dt>
<dd><p>Cursor Home.</p></dd>
<dt><a name="11"><b class="cmd">::term::ansi::send::sc</b></a></dt>
<dd><p>Save Cursor. Note: Only one saved position can be handled.
This is no unlimited stack. Saving before restoring will
overwrite the saved data.</p></dd>
<dt><a name="12"><b class="cmd">::term::ansi::send::rc</b></a></dt>
<dd><p>Restore Cursor (Unsave).</p></dd>
<dt><a name="13"><b class="cmd">::term::ansi::send::sca</b></a></dt>
<dd><p>Save Cursor + Attributes.</p></dd>
<dt><a name="14"><b class="cmd">::term::ansi::send::rca</b></a></dt>
<dd><p>Restore Cursor + Attributes.</p></dd>
<dt><a name="15"><b class="cmd">::term::ansi::send::st</b></a></dt>
<dd><p>Set Tab (@ current position).</p></dd>
<dt><a name="16"><b class="cmd">::term::ansi::send::ct</b></a></dt>
<dd><p>Clear Tab (@ current position).</p></dd>
<dt><a name="17"><b class="cmd">::term::ansi::send::cat</b></a></dt>
<dd><p>Clear All Tabs.</p></dd>
<dt><a name="18"><b class="cmd">::term::ansi::send::qdc</b></a></dt>
<dd><p>Query Device Code.</p></dd>
<dt><a name="19"><b class="cmd">::term::ansi::send::qds</b></a></dt>
<dd><p>Query Device Status.</p></dd>
<dt><a name="20"><b class="cmd">::term::ansi::send::qcp</b></a></dt>
<dd><p>Query Cursor Position.</p></dd>
<dt><a name="21"><b class="cmd">::term::ansi::send::rd</b></a></dt>
<dd><p>Reset Device.</p></dd>
<dt><a name="22"><b class="cmd">::term::ansi::send::elw</b></a></dt>
<dd><p>Enable Line Wrap.</p></dd>
<dt><a name="23"><b class="cmd">::term::ansi::send::dlw</b></a></dt>
<dd><p>Disable Line Wrap.</p></dd>
<dt><a name="24"><b class="cmd">::term::ansi::send::eg</b></a></dt>
<dd><p>Enter Graphics Mode.</p></dd>
<dt><a name="25"><b class="cmd">::term::ansi::send::lg</b></a></dt>
<dd><p>Exit Graphics Mode.</p></dd>
<dt><a name="26"><b class="cmd">::term::ansi::send::scs0</b> <i class="arg">tag</i></a></dt>
<dd></dd>
<dt><a name="27"><b class="cmd">::term::ansi::send::scs1</b> <i class="arg">tag</i></a></dt>
<dd><p>Select Character Set.</p>
<p>Choose which character set is used for default (scs0) and alternate font (scs1).
This does not change whether default or alternate font are used, just their
definitions.</p>
<p>The legal tags, and their meanings, are:</p>
<dl class="doctools_definitions">
<dt>A</dt>
<dd><p>United Kingdom Set</p></dd>
<dt>B</dt>
<dd><p>ASCII Set</p></dd>
<dt>0</dt>
<dd><p>Special Graphics</p></dd>
<dt>1</dt>
<dd><p>Alternate Character ROM Standard Character Set</p></dd>
<dt>2</dt>
<dd><p>Alternate Character ROM Special Graphics</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::term::ansi::send::sda</b> <i class="arg">arg</i>...</a></dt>
<dd><p>Set Display Attributes. The arguments are the code sequences for the possible
attributes, as provided by the package <b class="package"><a href="ansi_cattr.html">term::ansi::code::attr</a></b>. For
convenience this package also provides additional commands each setting a single
specific attribute.</p></dd>
<dt><a name="29"><b class="cmd">::term::ansi::send::sda_fgblack</b></a></dt>
<dd><p>Set text color to <em>Black</em>.</p></dd>
<dt><a name="30"><b class="cmd">::term::ansi::send::sda_fgred</b></a></dt>
<dd><p>Set text color to <em>Red</em>.</p></dd>
<dt><a name="31"><b class="cmd">::term::ansi::send::sda_fggreen</b></a></dt>
<dd><p>Set text color to <em>Green</em>.</p></dd>
<dt><a name="32"><b class="cmd">::term::ansi::send::sda_fgyellow</b></a></dt>
<dd><p>Set text color to <em>Yellow</em>.</p></dd>
<dt><a name="33"><b class="cmd">::term::ansi::send::sda_fgblue</b></a></dt>
<dd><p>Set text color to <em>Blue</em>.</p></dd>
<dt><a name="34"><b class="cmd">::term::ansi::send::sda_fgmagenta</b></a></dt>
<dd><p>Set text color to <em>Magenta</em>.</p></dd>
<dt><a name="35"><b class="cmd">::term::ansi::send::sda_fgcyan</b></a></dt>
<dd><p>Set text color to <em>Cyan</em>.</p></dd>
<dt><a name="36"><b class="cmd">::term::ansi::send::sda_fgwhite</b></a></dt>
<dd><p>Set text color to <em>White</em>.</p></dd>
<dt><a name="37"><b class="cmd">::term::ansi::send::sda_fgdefault</b></a></dt>
<dd><p>Set default text color (<em>Black</em>).</p></dd>
<dt><a name="38"><b class="cmd">::term::ansi::send::sda_bgblack</b></a></dt>
<dd><p>Set background to <em>Black</em>.</p></dd>
<dt><a name="39"><b class="cmd">::term::ansi::send::sda_bgred</b></a></dt>
<dd><p>Set background to <em>Red</em>.</p></dd>
<dt><a name="40"><b class="cmd">::term::ansi::send::sda_bggreen</b></a></dt>
<dd><p>Set background to <em>Green</em>.</p></dd>
<dt><a name="41"><b class="cmd">::term::ansi::send::sda_bgyellow</b></a></dt>
<dd><p>Set background to <em>Yellow</em>.</p></dd>
<dt><a name="42"><b class="cmd">::term::ansi::send::sda_bgblue</b></a></dt>
<dd><p>Set background to <em>Blue</em>.</p></dd>
<dt><a name="43"><b class="cmd">::term::ansi::send::sda_bgmagenta</b></a></dt>
<dd><p>Set background to <em>Magenta</em>.</p></dd>
<dt><a name="44"><b class="cmd">::term::ansi::send::sda_bgcyan</b></a></dt>
<dd><p>Set background to <em>Cyan</em>.</p></dd>
<dt><a name="45"><b class="cmd">::term::ansi::send::sda_bgwhite</b></a></dt>
<dd><p>Set background to <em>White</em>.</p></dd>
<dt><a name="46"><b class="cmd">::term::ansi::send::sda_bgdefault</b></a></dt>
<dd><p>Set default background (Transparent).</p></dd>
<dt><a name="47"><b class="cmd">::term::ansi::send::sda_bold</b></a></dt>
<dd><p>Bold on.</p></dd>
<dt><a name="48"><b class="cmd">::term::ansi::send::sda_dim</b></a></dt>
<dd><p>Dim on.</p></dd>
<dt><a name="49"><b class="cmd">::term::ansi::send::sda_italic</b></a></dt>
<dd><p>Italics on.</p></dd>
<dt><a name="50"><b class="cmd">::term::ansi::send::sda_underline</b></a></dt>
<dd><p>Underscore on.</p></dd>
<dt><a name="51"><b class="cmd">::term::ansi::send::sda_blink</b></a></dt>
<dd><p>Blink on.</p></dd>
<dt><a name="52"><b class="cmd">::term::ansi::send::sda_revers</b></a></dt>
<dd><p>Reverse on.</p></dd>
<dt><a name="53"><b class="cmd">::term::ansi::send::sda_hidden</b></a></dt>
<dd><p>Hidden on.</p></dd>
<dt><a name="54"><b class="cmd">::term::ansi::send::sda_strike</b></a></dt>
<dd><p>Strike-through on.</p></dd>
<dt><a name="55"><b class="cmd">::term::ansi::send::sda_nobold</b></a></dt>
<dd><p>Bold off.</p></dd>
<dt><a name="56"><b class="cmd">::term::ansi::send::sda_noitalic</b></a></dt>
<dd><p>Italics off.</p></dd>
<dt><a name="57"><b class="cmd">::term::ansi::send::sda_nounderline</b></a></dt>
<dd><p>Underscore off.</p></dd>
<dt><a name="58"><b class="cmd">::term::ansi::send::sda_noblink</b></a></dt>
<dd><p>Blink off.</p></dd>
<dt><a name="59"><b class="cmd">::term::ansi::send::sda_norevers</b></a></dt>
<dd><p>Reverse off.</p></dd>
<dt><a name="60"><b class="cmd">::term::ansi::send::sda_nohidden</b></a></dt>
<dd><p>Hidden off.</p></dd>
<dt><a name="61"><b class="cmd">::term::ansi::send::sda_nostrike</b></a></dt>
<dd><p>Strike-through off.</p></dd>
<dt><a name="62"><b class="cmd">::term::ansi::send::sda_reset</b></a></dt>
<dd><p>Reset all attributes to their default values.</p></dd>
<dt><a name="63"><b class="cmd">::term::ansi::send::fcp</b> <i class="arg">row</i> <i class="arg">col</i></a></dt>
<dd><p>Force Cursor Position (aka Go To).</p></dd>
<dt><a name="64"><b class="cmd">::term::ansi::send::cu</b> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>Cursor Up. <i class="arg">n</i> defaults to 1.</p></dd>
<dt><a name="65"><b class="cmd">::term::ansi::send::cd</b> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>Cursor Down. <i class="arg">n</i> defaults to 1.</p></dd>
<dt><a name="66"><b class="cmd">::term::ansi::send::cf</b> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>Cursor Forward. <i class="arg">n</i> defaults to 1.</p></dd>
<dt><a name="67"><b class="cmd">::term::ansi::send::cb</b> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>Cursor Backward. <i class="arg">n</i> defaults to 1.</p></dd>
<dt><a name="68"><b class="cmd">::term::ansi::send::ss</b> <span class="opt">?<i class="arg">s</i> <i class="arg">e</i>?</span></a></dt>
<dd><p>Scroll Screen (entire display, or between rows start end, inclusive).</p></dd>
<dt><a name="69"><b class="cmd">::term::ansi::send::skd</b> <i class="arg">code</i> <i class="arg">str</i></a></dt>
<dd><p>Set Key Definition.</p></dd>
<dt><a name="70"><b class="cmd">::term::ansi::send::title</b> <i class="arg">str</i></a></dt>
<dd><p>Set the terminal title.</p></dd>
<dt><a name="71"><b class="cmd">::term::ansi::send::gron</b></a></dt>
<dd><p>Switch to character/box graphics. I.e. switch to the alternate font.</p></dd>
<dt><a name="72"><b class="cmd">::term::ansi::send::groff</b></a></dt>
<dd><p>Switch to regular characters. I.e. switch to the default font.</p></dd>
<dt><a name="73"><b class="cmd">::term::ansi::send::tlc</b></a></dt>
<dd><p>Character graphics, Top Left Corner.</p></dd>
<dt><a name="74"><b class="cmd">::term::ansi::send::trc</b></a></dt>
<dd><p>Character graphics, Top Right Corner.</p></dd>
<dt><a name="75"><b class="cmd">::term::ansi::send::brc</b></a></dt>
<dd><p>Character graphics, Bottom Right Corner.</p></dd>
<dt><a name="76"><b class="cmd">::term::ansi::send::blc</b></a></dt>
<dd><p>Character graphics, Bottom Left Corner.</p></dd>
<dt><a name="77"><b class="cmd">::term::ansi::send::ltj</b></a></dt>
<dd><p>Character graphics, Left T Junction.</p></dd>
<dt><a name="78"><b class="cmd">::term::ansi::send::ttj</b></a></dt>
<dd><p>Character graphics, Top T Junction.</p></dd>
<dt><a name="79"><b class="cmd">::term::ansi::send::rtj</b></a></dt>
<dd><p>Character graphics, Right T Junction.</p></dd>
<dt><a name="80"><b class="cmd">::term::ansi::send::btj</b></a></dt>
<dd><p>Character graphics, Bottom T Junction.</p></dd>
<dt><a name="81"><b class="cmd">::term::ansi::send::fwj</b></a></dt>
<dd><p>Character graphics, Four-Way Junction.</p></dd>
<dt><a name="82"><b class="cmd">::term::ansi::send::hl</b></a></dt>
<dd><p>Character graphics, Horizontal Line.</p></dd>
<dt><a name="83"><b class="cmd">::term::ansi::send::vl</b></a></dt>
<dd><p>Character graphics, Vertical Line.</p></dd>
<dt><a name="84"><b class="cmd">::term::ansi::send::groptim</b> <i class="arg">str</i></a></dt>
<dd><p>Optimize character graphics. The generator commands above create way to many
superfluous commands shifting into and out of the graphics mode. This command
removes all shifts which are not needed. To this end it also knows which
characters will look the same in both modes, to handle strings created outside
of this package.</p></dd>
<dt><a name="85"><b class="cmd">::term::ansi::send::clear</b></a></dt>
<dd><p>Clear screen. In essence a sequence of CursorHome + EraseDown.</p></dd>
<dt><a name="86"><b class="cmd">::term::ansi::send::init</b></a></dt>
<dd><p>Initialize default and alternate fonts to ASCII and box graphics.</p></dd>
<dt><a name="87"><b class="cmd">::term::ansi::send::showat</b> <i class="arg">row</i> <i class="arg">col</i> <i class="arg">text</i></a></dt>
<dd><p>Show the block of text at the specified location.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key420">character output</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/imenu.html.

























































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252

<div class='fossil-doc' data-title='term::interact::menu - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::interact::menu(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::interact::menu - Terminal widget, menu</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Class API</a></li>
<li class="doctools_section"><a href="#section3">Object API</a></li>
<li class="doctools_section"><a href="#section4">Configuration</a></li>
<li class="doctools_section"><a href="#section5">Interaction</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term::interact::menu <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">term::interact::menu</b> <i class="arg">object</i> <i class="arg">dict</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">object</i> <b class="method">interact</b></a></li>
<li><a href="#3"><i class="arg">object</i> <b class="method">done</b></a></li>
<li><a href="#4"><i class="arg">object</i> <b class="method">clear</b></a></li>
<li><a href="#5"><i class="arg">object</i> <b class="method">configure</b></a></li>
<li><a href="#6"><i class="arg">object</i> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#7"><i class="arg">object</i> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></li>
<li><a href="#8"><i class="arg">object</i> <b class="method">cget</b> <i class="arg">option</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of a simple menu
control.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<p>The package exports a single command, the class command, enabling the
creation of menu instances. Its API is:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">term::interact::menu</b> <i class="arg">object</i> <i class="arg">dict</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new menu object with the name <i class="arg">object</i>,
initializes it, and returns the fully qualified name of the object
command as its result.</p>
<p>The argument is the menu to show, possibly followed by configuration
options and their values. The options are explained in the section
<span class="sectref"><a href="#section4">Configuration</a></span>. The menu is a dictionary maping labels
to symbolic action codes.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Object API</a></h2>
<p>The objects created by the class command provide the methods listed
below:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">object</i> <b class="method">interact</b></a></dt>
<dd><p>Shows the menu in the screen at the configured location and starts
interacting with it. This opens its own event loop for the processing
of incoming characters. The method returns when the interaction has
completed. See section <span class="sectref"><a href="#section5">Interaction</a></span> for a description of the
possible interaction.</p>
<p>The method returns the symbolic action of the menu item selected by
the user at the end of the interaction.</p></dd>
<dt><a name="3"><i class="arg">object</i> <b class="method">done</b></a></dt>
<dd><p>This method can be used by user supplied actions to terminate the
interaction with the object.</p></dd>
<dt><a name="4"><i class="arg">object</i> <b class="method">clear</b></a></dt>
<dd><p>This method can be used by user supplied actions to remove the menu
from the terminal.</p></dd>
<dt><a name="5"><i class="arg">object</i> <b class="method">configure</b></a></dt>
<dd></dd>
<dt><a name="6"><i class="arg">object</i> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd></dd>
<dt><a name="7"><i class="arg">object</i> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></dt>
<dd></dd>
<dt><a name="8"><i class="arg">object</i> <b class="method">cget</b> <i class="arg">option</i></a></dt>
<dd><p>Standard methods to retrieve and configure the options of the menu.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Configuration</a></h2>
<p>A menu instance recognizes the following options:</p>
<dl class="doctools_options">
<dt><b class="option">-in</b> chan</dt>
<dd><p>Specifies the channel to read character sequences from. Defaults to
<b class="const">stdin</b>.</p></dd>
<dt><b class="option">-out</b> chan</dt>
<dd><p>Specifies the channel to write the menu contents to. Defaults to
<b class="const">stdout</b>.</p></dd>
<dt><b class="option">-column</b> int</dt>
<dd><p>Specifies the column of the terminal where the left margin of the
menu display should appear. Defaults to 0, i.e. the left-most
column.</p></dd>
<dt><b class="option">-line</b> int</dt>
<dd><p>Specifies the line of the terminal where the top margin of the menu
display should appear. Defaults to 0, i.e. the top-most line.</p></dd>
<dt><b class="option">-height</b> int</dt>
<dd><p>Specifies the number of lines of text to show at most in the
display. Defaults to 25.</p></dd>
<dt><b class="option">-actions</b> dict</dt>
<dd><p>Specifies a dictionary containing additional actions, using character
sequences as keys. Note that these sequences cannot override the
hardwired sequences described in section <span class="sectref"><a href="#section5">Interaction</a></span>.</p></dd>
<dt><b class="option">-hilitleft</b> int</dt>
<dd></dd>
<dt><b class="option">-hilitright</b> int</dt>
<dd><p>By default the entire selected menu entry is highlighted in revers
output. However, when present these two options restrict revers dispay
to the specified sub-range of the entry.</p></dd>
<dt><b class="option">-framed</b> bool</dt>
<dd><p>By default the menu is shown using only header and footer out of
characters box graphics. If this flag is set the menu is fully
enclosed in a box.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Interaction</a></h2>
<p>A menu object recognizes the control sequences listed below and acts
as described. The user can supply more control sequences to act on via
the configuration, but is not able to overide these defaults.</p>
<dl class="doctools_definitions">
<dt>Cursor Up</dt>
<dd><p>The selection is moved up one entry, except if the first entry of the
menu is already selected.</p></dd>
<dt>Cursor Down</dt>
<dd><p>The selection is moved down one entry, except if the last entry of the
menu is already selected.</p></dd>
<dt>Enter/Return</dt>
<dd><p>The interaction with the object is terminated.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key673">menu</a>, <a href="../../../../index.html#key92">terminal</a>, <a href="../../../../index.html#key789">text display</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/ipager.html.

























































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252

<div class='fossil-doc' data-title='term::interact::pager - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::interact::pager(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::interact::pager - Terminal widget, paging</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Class API</a></li>
<li class="doctools_section"><a href="#section3">Object API</a></li>
<li class="doctools_section"><a href="#section4">Configuration</a></li>
<li class="doctools_section"><a href="#section5">Interaction</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term::interact::pager <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">term::interact::pager</b> <i class="arg">object</i> <i class="arg">text</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">object</i> <b class="method">interact</b></a></li>
<li><a href="#3"><i class="arg">object</i> <b class="method">done</b></a></li>
<li><a href="#4"><i class="arg">object</i> <b class="method">clear</b></a></li>
<li><a href="#5"><i class="arg">object</i> <b class="method">text</b> <i class="arg">text</i></a></li>
<li><a href="#6"><i class="arg">object</i> <b class="method">configure</b></a></li>
<li><a href="#7"><i class="arg">object</i> <b class="method">configure</b> <i class="arg">option</i></a></li>
<li><a href="#8"><i class="arg">object</i> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></li>
<li><a href="#9"><i class="arg">object</i> <b class="method">cget</b> <i class="arg">option</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of a simple paging
text display.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<p>The package exports a single command, the class command, enabling the
creation of pager instances. Its API is:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">term::interact::pager</b> <i class="arg">object</i> <i class="arg">text</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new pager object with the name <i class="arg">object</i>,
initializes it, and returns the fully qualified name of the object
command as its result.</p>
<p>The argument is the text to show, possibly followed by configuration
options and their values. The options are explained in the section
<span class="sectref"><a href="#section4">Configuration</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Object API</a></h2>
<p>The objects created by the class command provide the methods listed
below:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">object</i> <b class="method">interact</b></a></dt>
<dd><p>Show the pager in the screen at the configured location and start
interacting with it. This opens its own event loop for the processing
of incoming characters. The method returns when the interaction has
completed. See section <span class="sectref"><a href="#section5">Interaction</a></span> for a description of the
possible interaction.</p></dd>
<dt><a name="3"><i class="arg">object</i> <b class="method">done</b></a></dt>
<dd><p>This method can be used by user supplied actions to terminate the
interaction with the object.</p></dd>
<dt><a name="4"><i class="arg">object</i> <b class="method">clear</b></a></dt>
<dd><p>This method can be used by user supplied actions to remove the pager
from the terminal.</p></dd>
<dt><a name="5"><i class="arg">object</i> <b class="method">text</b> <i class="arg">text</i></a></dt>
<dd><p>This method can be used to change the text shown by the pager.
The pager will reset the dispay to show the first line of the
text at the top.</p></dd>
<dt><a name="6"><i class="arg">object</i> <b class="method">configure</b></a></dt>
<dd></dd>
<dt><a name="7"><i class="arg">object</i> <b class="method">configure</b> <i class="arg">option</i></a></dt>
<dd></dd>
<dt><a name="8"><i class="arg">object</i> <b class="method">configure</b> <i class="arg">option</i> <i class="arg">value</i>...</a></dt>
<dd></dd>
<dt><a name="9"><i class="arg">object</i> <b class="method">cget</b> <i class="arg">option</i></a></dt>
<dd><p>Standard methods to retrieve and configure the options of the pager.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Configuration</a></h2>
<p>A pager instance recognizes the following options:</p>
<dl class="doctools_options">
<dt><b class="option">-in</b> chan</dt>
<dd><p>Specifies the channel to read character sequences from. Defaults to
<b class="const">stdin</b>.</p></dd>
<dt><b class="option">-out</b> chan</dt>
<dd><p>Specifies the channel to write the pager contents to. Defaults to
<b class="const">stdout</b>.</p></dd>
<dt><b class="option">-column</b> int</dt>
<dd><p>Specifies the column of the terminal where the left margin of the
pager display should appear. Defaults to 0, i.e. the left-most
column.</p></dd>
<dt><b class="option">-line</b> int</dt>
<dd><p>Specifies the line of the terminal where the top margin of the pager
display should appear. Defaults to 0, i.e. the top-most line.</p></dd>
<dt><b class="option">-height</b> int</dt>
<dd><p>Specifies the number of lines of text to show at most in the
display. Defaults to 25.</p></dd>
<dt><b class="option">-actions</b> dict</dt>
<dd><p>Specifies a dictionary containing additional actions, using character
sequences as keys. Note that these sequences cannot override the
hardwired sequences described in section <span class="sectref"><a href="#section5">Interaction</a></span>.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Interaction</a></h2>
<p>A pager object recognizes the control sequences listed below and acts
as described. The user can supply more control sequences to act on via
the configuration, but is not able to overide these defaults.</p>
<dl class="doctools_definitions">
<dt>Cursor Up</dt>
<dd><p>The text is scrolled down a single line, making one more line visible
at the top. The pager will not react if the first line of the text is
already shown.</p></dd>
<dt>Cursor Down</dt>
<dd><p>The text is scrolled up a single line, making one more line visible at
the bottom. The pager will not react if the last line of the text is
already shown.</p></dd>
<dt>Page Up</dt>
<dd><p>The text is scrolled down a page. The pager will not react if the
first line of the text is already shown.</p></dd>
<dt>Page Down</dt>
<dd><p>The text is scrolled up a page. The pager will not react if the last
line of the text is already shown.</p></dd>
<dt>Enter/Return</dt>
<dd><p>The interaction with the object is terminated.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key790">pager</a>, <a href="../../../../index.html#key92">terminal</a>, <a href="../../../../index.html#key789">text display</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/receive.html.











































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181

<div class='fossil-doc' data-title='term::receive - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::receive(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::receive - General input from terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term::receive <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::term::receive::getch</b> <span class="opt">?<i class="arg">chan</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::term::receive::listen</b> <i class="arg">cmd</i> <span class="opt">?<i class="arg">chan</i>?</span></a></li>
<li><a href="#3"><i class="arg">cmd</i> <b class="method">process</b> <i class="arg">string</i></a></li>
<li><a href="#4"><i class="arg">cmd</i> <b class="method">eof</b></a></li>
<li><a href="#5"><b class="cmd">::term::receive::unlisten</b> <span class="opt">?<i class="arg">chan</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the most primitive commands for receiving
characters to a terminal. They are in essence convenient wrappers
around the builtin commands <b class="cmd"><a href="../../../../index.html#key411">read</a></b> and <b class="cmd">fileevent</b>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::receive::getch</b> <span class="opt">?<i class="arg">chan</i>?</span></a></dt>
<dd><p>This command reads a single character from the channel with handle
<i class="arg">chan</i> and returns it as the result of the command.</p>
<p>If not specified <i class="arg">chan</i> defaults to <b class="const">stdin</b>.</p>
<p>It is the responsibility of the caller to make sure that the channel
can provide single characters. On unix this can be done, for example,
by using the command of package <b class="package"><a href="ansi_ctrlu.html">term::ansi::ctrl::unix</a></b>.</p></dd>
<dt><a name="2"><b class="cmd">::term::receive::listen</b> <i class="arg">cmd</i> <span class="opt">?<i class="arg">chan</i>?</span></a></dt>
<dd><p>This command sets up a filevent listener for the channel with handle
<i class="arg">chan</i> and invokes the command prefix <i class="arg">cmd</i> whenever
characters have been received, or EOF was reached.</p>
<p>If not specified <i class="arg">chan</i> defaults to <b class="const">stdin</b>.</p>
<p>The signature of the command prefix is</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">cmd</i> <b class="method">process</b> <i class="arg">string</i></a></dt>
<dd><p>This method is invoked when characters were received, and <i class="arg">string</i>
holds them for processing.</p></dd>
<dt><a name="4"><i class="arg">cmd</i> <b class="method">eof</b></a></dt>
<dd><p>This method is invoked when EOF was reached on the channel we listen
on.  It will be the last call to be received by the callback.</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::term::receive::unlisten</b> <span class="opt">?<i class="arg">chan</i>?</span></a></dt>
<dd><p>This command disables the filevent listener for the channel with handle
<i class="arg">chan</i>.</p>
<p>If not specified <i class="arg">chan</i> defaults to <b class="const">stdin</b>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key96">character input</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key94">get character</a>, <a href="../../../../index.html#key97">listener</a>, <a href="../../../../index.html#key93">receiver</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/term.html.









































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

<div class='fossil-doc' data-title='term - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term - General terminal control</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term <span class="opt">?0.1?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>It is planned to have this package provide highlevel general terminal control
commands, in the vein of ncurses or similar packages. Currently nothing has
been implemented however. I.e. this package is empty. It can be loaded, yet
provides nothing.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/term_bind.html.



































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225

<div class='fossil-doc' data-title='term::receive::bind - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::receive::bind(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::receive::bind - Keyboard dispatch from terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Class API</a></li>
<li class="doctools_section"><a href="#section3">Object API</a></li>
<li class="doctools_section"><a href="#section4">Notes</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term::receive::bind <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">term::receive::bind</b> <i class="arg">object</i> <span class="opt">?<i class="arg">map</i>?</span></a></li>
<li><a href="#2"><i class="arg">object</i> <b class="method">map</b> <i class="arg">str</i> <i class="arg">cmd</i></a></li>
<li><a href="#3"><i class="arg">object</i> <b class="method">default</b> <i class="arg">cmd</i></a></li>
<li><a href="#4"><i class="arg">object</i> <b class="method">listen</b> <span class="opt">?<i class="arg">chan</i>?</span></a></li>
<li><a href="#5"><i class="arg">object</i> <b class="method">unlisten</b> <span class="opt">?<i class="arg">chan</i>?</span></a></li>
<li><a href="#6"><i class="arg">object</i> <b class="method">reset</b></a></li>
<li><a href="#7"><i class="arg">object</i> <b class="method">next</b> <i class="arg">char</i></a></li>
<li><a href="#8"><i class="arg">object</i> <b class="method">process</b> <i class="arg">str</i></a></li>
<li><a href="#9"><i class="arg">object</i> <b class="method">eof</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of simple dispatchers
from character sequences to actions. Internally each dispatcher is in
essence a deterministic finite automaton with tree structure.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<p>The package exports a single command, the
class command, enabling the creation of
dispatcher instances. Its API
is:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">term::receive::bind</b> <i class="arg">object</i> <span class="opt">?<i class="arg">map</i>?</span></a></dt>
<dd><p>This command creates a new dispatcher object with the name
<i class="arg">object</i>, initializes it, and returns the fully qualified name of
the object command as its result.</p>
<p>The argument is a dictionary mapping from strings, i.e. character
sequences to the command prefices to invoke when the sequence is found
in the input stream.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Object API</a></h2>
<p>The objects created by the class command provide the methods listed
below:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">object</i> <b class="method">map</b> <i class="arg">str</i> <i class="arg">cmd</i></a></dt>
<dd><p>This method adds an additional mapping from the string <i class="arg">str</i> to
the action <i class="arg">cmd</i>. The mapping will take effect immediately
should the processor be in a prefix of <i class="arg">str</i>, or at the next
reset operation. The action is a command prefix and will be invoked
with one argument appended to it, the character sequence causing
the invokation. It is executed in the global namespace.</p></dd>
<dt><a name="3"><i class="arg">object</i> <b class="method">default</b> <i class="arg">cmd</i></a></dt>
<dd><p>This method defines a default action <i class="arg">cmd</i> which will be invoked
whenever an unknown character sequence is encountered. The command
prefix is handled in the same as the regular action defined via
method <b class="method">map</b>.</p></dd>
<dt><a name="4"><i class="arg">object</i> <b class="method">listen</b> <span class="opt">?<i class="arg">chan</i>?</span></a></dt>
<dd><p>This methods sets up a filevent listener for the channel with handle
<i class="arg">chan</i> and invokes the dispatcher object whenever characters have
been received, or EOF was reached.</p>
<p>If not specified <i class="arg">chan</i> defaults to <b class="const">stdin</b>.</p></dd>
<dt><a name="5"><i class="arg">object</i> <b class="method">unlisten</b> <span class="opt">?<i class="arg">chan</i>?</span></a></dt>
<dd><p>This methods removes the filevent listener for the channel with handle
<i class="arg">chan</i>.</p>
<p>If not specified <i class="arg">chan</i> defaults to <b class="const">stdin</b>.</p></dd>
<dt><a name="6"><i class="arg">object</i> <b class="method">reset</b></a></dt>
<dd><p>This method resets the character processor
to the beginning of the tree.</p></dd>
<dt><a name="7"><i class="arg">object</i> <b class="method">next</b> <i class="arg">char</i></a></dt>
<dd><p>This method causes the character processor to process the character
<i class="arg">c</i>. This may simply advance the internal state, or invoke an
associated action for a recognized sequence.</p></dd>
<dt><a name="8"><i class="arg">object</i> <b class="method">process</b> <i class="arg">str</i></a></dt>
<dd><p>This method causes the character processor to process the character
sequence <i class="arg">str</i>, advancing the internal state and invoking action
as necessary. This is a callback for <b class="method">listen</b>.</p></dd>
<dt><a name="9"><i class="arg">object</i> <b class="method">eof</b></a></dt>
<dd><p>This method causes the character processor to handle EOF on the
input. This is currently no-op.
This is a callback for <b class="method">listen</b>.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Notes</a></h2>
<p>The simplicity of the DFA means that it is not possible to recognize a
character sequence with has a another recognized character sequence as
its prefix.</p>
<p>In other words, the set of recognized strings has to form a
<i class="term">prefix code</i>.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key96">character input</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key517">dispatcher</a>, <a href="../../../../index.html#key97">listener</a>, <a href="../../../../index.html#key93">receiver</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/term/term_send.html.





































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

<div class='fossil-doc' data-title='term::send - Terminal control'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::send(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::send - General output to terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">term::send <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::term::send::wrch</b> <i class="arg">chan</i> <i class="arg">str</i></a></li>
<li><a href="#2"><b class="cmd">::term::send::wr</b> <i class="arg">str</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the most primitive commands for sending characters
to a terminal. They are in essence convenient wrappers around the
builtin command <b class="cmd">puts</b>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::send::wrch</b> <i class="arg">chan</i> <i class="arg">str</i></a></dt>
<dd><p>Send the text <i class="arg">str</i> to the channel specified by the handle <i class="arg">chan</i>.
In contrast to the builtin command <b class="cmd">puts</b> this command does not
terminate the string with a line terminator. It also forces an  flush of
Tcl internal and OS buffers to ensure that the characters are processed
immediately.</p></dd>
<dt><a name="2"><b class="cmd">::term::send::wr</b> <i class="arg">str</i></a></dt>
<dd><p>This convenience command is like <b class="cmd">::term::send::wrch</b>, except that the
destination channel is fixed to <em>stdout</em>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key420">character output</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/textutil/adjust.html.



























































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269

<div class='fossil-doc' data-title='textutil::adjust - Text and string utilities, macro processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::adjust(n) 0.7.3 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::adjust - Procedures to adjust, indent, and undent paragraphs</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil::adjust <span class="opt">?0.7.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::adjust::adjust</b> <i class="arg">string</i> <span class="opt">?<i class="arg">option value...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::textutil::adjust::readPatterns</b> <i class="arg">filename</i></a></li>
<li><a href="#3"><b class="cmd">::textutil::adjust::listPredefined</b></a></li>
<li><a href="#4"><b class="cmd">::textutil::adjust::getPredefined</b> <i class="arg">filename</i></a></li>
<li><a href="#5"><b class="cmd">::textutil::adjust::indent</b> <i class="arg">string</i> <i class="arg">prefix</i> <span class="opt">?<i class="arg">skip</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::textutil::adjust::undent</b> <i class="arg">string</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">textutil::adjust</b> provides commands that manipulate
strings or texts (a.k.a. long strings or string with embedded newlines
or paragraphs), adjusting, or indenting them.</p>
<p>The complete set of procedures is described below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::textutil::adjust::adjust</b> <i class="arg">string</i> <span class="opt">?<i class="arg">option value...</i>?</span></a></dt>
<dd><p>Do a justification on the <i class="arg">string</i> according to the options.  The
string is taken as one big paragraph, ignoring any newlines.  Then the
line is formatted according to the options used, and the command
returns a new string with enough lines to contain all the printable
chars in the input string. A line is a set of characters between the
beginning of the string and a newline, or between 2 newlines, or
between a newline and the end of the string. If the input string is
small enough, the returned string won't contain any newlines.</p>
<p>Together with <b class="cmd">::textutil::adjust::indent</b> it is possible to
create properly wrapped paragraphs with arbitrary indentations.</p>
<p>By default, any occurrence of space or tabulation characters are
replaced by a single space so that each word in a line is separated
from the next one by exactly one space character, and this forms a
<em>real</em> line.
Each <em>real</em> line is placed in a <em>logical</em> line, which has
exactly a given length (see the option <b class="option">-length</b> below).
The <em>real</em> line may be shorter. Again by default, trailing spaces
are ignored before returning the string (see the option <b class="option">-full</b>
below).</p>
<p>The following options may be used after the <i class="arg">string</i> parameter,
and change the way the command places a <em>real</em> line in a
<em>logical</em> line.</p>
<dl class="doctools_options">
<dt><b class="option">-full</b> <i class="arg">boolean</i></dt>
<dd><p>If set to <b class="const">false</b> (default), trailing space characters are
deleted before returning the string. If set to <b class="const">true</b>, any
trailing space characters are left in the string.</p></dd>
<dt><b class="option">-hyphenate</b> <i class="arg">boolean</i></dt>
<dd><p>If set to <b class="const">false</b> (default), no hyphenation will be done. If set
to <b class="const">true</b>, the command will try to hyphenate the last word of a
line. <em>Note</em>: Hyphenation patterns must be loaded prior, using
the command <b class="cmd">::textutil::adjust::readPatterns</b>.</p></dd>
<dt><b class="option">-justify</b> <b class="const">center|left|plain|right</b></dt>
<dd><p>Sets the justification of the returned string to either <b class="const">left</b>
(default), <b class="const">center</b>, <b class="const">plain</b> or <b class="const">right</b>. The
justification means that any line in the returned string but the last
one is build according to the value.
If the justification is set to <b class="const">plain</b> and the number of
printable chars in the last line is less than 90% of the length of a
line (see the option <b class="option">-length</b>), then this line is justified
with the <b class="const">left</b> value, avoiding the expansion of this line when
it is too small. The meaning of each value is:</p>
<dl class="doctools_definitions">
<dt><b class="const">center</b></dt>
<dd><p>The real line is centered in the logical line. If needed, a set of
space characters are added at the beginning (half of the needed set)
and at the end (half of the needed set) of the line if required (see
the option <b class="option">-full</b>).</p></dd>
<dt><b class="const">left</b></dt>
<dd><p>The real line is set on the left of the logical line. It means that
there are no space chars at the beginning of this line. If required,
all needed space chars are added at the end of the line (see the
option <b class="option">-full</b>).</p></dd>
<dt><b class="const">plain</b></dt>
<dd><p>The real line is exactly set in the logical line. It means that there
are no leading or trailing space chars. All the needed space chars are
added in the <em>real</em> line, between 2 (or more) words.</p></dd>
<dt><b class="const">right</b></dt>
<dd><p>The real line is set on the right of the logical line. It means that
there are no space chars at the end of this line, and there may be
some space chars at the beginning, despite of the <b class="option">-full</b> option.</p></dd>
</dl></dd>
<dt><b class="option">-length</b> <i class="arg">integer</i></dt>
<dd><p>Set the length of the <em>logical</em> line in the string to
<i class="arg">integer</i>.  <i class="arg">integer</i> must be a positive integer
value. Defaults to <b class="const">72</b>.</p></dd>
<dt><b class="option">-strictlength</b></dt>
<dd><p><i class="arg">boolean</i>]
If set to <b class="const">false</b> (default), a line can exceed the specified
<b class="option">-length</b> if a single word is longer than <b class="option">-length</b>. If
set to <b class="const">true</b>, words that are longer than <b class="option">-length</b> are
split so that no line exceeds the specified <b class="option">-length</b>.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::textutil::adjust::readPatterns</b> <i class="arg">filename</i></a></dt>
<dd><p>Loads the internal storage for hyphenation patterns with the contents
of the file <i class="arg">filename</i>. This has to be done prior to calling
command <b class="cmd">::textutil::adjust::adjust</b> with &quot;<b class="option">-hyphenate</b>
<b class="const">true</b>&quot;, or the hyphenation process will not work correctly.</p>
<p>The package comes with a number of predefined pattern files, and the
command <b class="cmd">::textutil::adjust::listPredefined</b> can be used to find
out their names.</p></dd>
<dt><a name="3"><b class="cmd">::textutil::adjust::listPredefined</b></a></dt>
<dd><p>This command returns a list containing the names of the hyphenation
files coming with this package.</p></dd>
<dt><a name="4"><b class="cmd">::textutil::adjust::getPredefined</b> <i class="arg">filename</i></a></dt>
<dd><p>Use this command to query the package for the full path name of the
hyphenation file <i class="arg">filename</i> coming with the package. Only the
filenames found in the list returned by
<b class="cmd">::textutil::adjust::listPredefined</b> are legal arguments for this
command.</p></dd>
<dt><a name="5"><b class="cmd">::textutil::adjust::indent</b> <i class="arg">string</i> <i class="arg">prefix</i> <span class="opt">?<i class="arg">skip</i>?</span></a></dt>
<dd><p>Each line in the <i class="arg">string</i> is indented by adding the string
<i class="arg">prefix</i> at its beginning. The modified string is returned
as the result of the command.</p>
<p>If <i class="arg">skip</i> is specified the first <i class="arg">skip</i> lines are left
untouched. The default for <i class="arg">skip</i> is <b class="const">0</b>, causing the
modification of all lines. Negative values for <i class="arg">skip</i> are treated
like <b class="const">0</b>. In other words, <i class="arg">skip</i> &gt; <b class="const">0</b> creates a
hanging indentation.</p>
<p>Together with <b class="cmd">::textutil::adjust::adjust</b> it is possible to
create properly wrapped paragraphs with arbitrary indentations.</p></dd>
<dt><a name="6"><b class="cmd">::textutil::adjust::undent</b> <i class="arg">string</i></a></dt>
<dd><p>The command computes the common prefix for all lines in <i class="arg">string</i>
consisting solely out of whitespace, removes this from each line and
returns the modified string.</p>
<p>Lines containing only whitespace are always reduced to completely
empty lines. They and empty lines are also ignored when computing the
prefix to remove.</p>
<p>Together with <b class="cmd">::textutil::adjust::adjust</b> it is possible to
create properly wrapped paragraphs with arbitrary indentations.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key345">TeX</a>, <a href="../../../../index.html#key346">adjusting</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key348">hyphenation</a>, <a href="../../../../index.html#key344">indenting</a>, <a href="../../../../index.html#key343">justification</a>, <a href="../../../../index.html#key347">paragraph</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key342">undenting</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/textutil/expander.html.

























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508

<div class='fossil-doc' data-title='textutil::expander - Text and string utilities, macro processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::expander(n) 1.3.1 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::expander - Procedures to process templates and expand text.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXPANDER API</a></li>
<li class="doctools_section"><a href="#section3">TUTORIAL</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Basics</a></li>
<li class="doctools_subsection"><a href="#subsection2">Embedding Macros</a></li>
<li class="doctools_subsection"><a href="#subsection3">Writing Macro Commands</a></li>
<li class="doctools_subsection"><a href="#subsection4">Changing the Expansion Brackets</a></li>
<li class="doctools_subsection"><a href="#subsection5">Customized Macro Expansion</a></li>
<li class="doctools_subsection"><a href="#subsection6">Using the Context Stack</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">HISTORY</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil::expander <span class="opt">?1.3.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::expander</b> <i class="arg">expanderName</i></a></li>
<li><a href="#2"><i class="arg">expanderName</i> <b class="method">cappend</b> <i class="arg">text</i></a></li>
<li><a href="#3"><i class="arg">expanderName</i> <b class="method">cget</b> <i class="arg">varname</i></a></li>
<li><a href="#4"><i class="arg">expanderName</i> <b class="method">cis</b> <i class="arg">cname</i></a></li>
<li><a href="#5"><i class="arg">expanderName</i> <b class="method">cname</b></a></li>
<li><a href="#6"><i class="arg">expanderName</i> <b class="method">cpop</b> <i class="arg">cname</i></a></li>
<li><a href="#7"><i class="arg">expanderName</i> <b class="method">ctopandclear</b></a></li>
<li><a href="#8"><i class="arg">expanderName</i> <b class="method">cpush</b> <i class="arg">cname</i></a></li>
<li><a href="#9"><i class="arg">expanderName</i> <b class="method">cset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#10"><i class="arg">expanderName</i> <b class="method">cvar</b> <i class="arg">varname</i></a></li>
<li><a href="#11"><i class="arg">expanderName</i> <b class="method">errmode</b> <i class="arg">newErrmode</i></a></li>
<li><a href="#12"><i class="arg">expanderName</i> <b class="method">evalcmd</b> <span class="opt">?<i class="arg">newEvalCmd</i>?</span></a></li>
<li><a href="#13"><i class="arg">expanderName</i> <b class="method">expand</b> <i class="arg">string</i> <span class="opt">?<i class="arg">brackets</i>?</span></a></li>
<li><a href="#14"><i class="arg">expanderName</i> <b class="method">lb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></li>
<li><a href="#15"><i class="arg">expanderName</i> <b class="method">rb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></li>
<li><a href="#16"><i class="arg">expanderName</i> <b class="method">reset</b></a></li>
<li><a href="#17"><i class="arg">expanderName</i> <b class="method">setbrackets</b> <i class="arg">lbrack rbrack</i></a></li>
<li><a href="#18"><i class="arg">expanderName</i> <b class="method">textcmd</b> <span class="opt">?<i class="arg">newTextCmd</i>?</span></a></li>
<li><a href="#19"><i class="arg">expanderName</i> <b class="method">where</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The Tcl <b class="cmd"><a href="../../../../index.html#key273">subst</a></b> command is often used to support a kind of
template processing. Given a string with embedded variables or
function calls, <b class="cmd"><a href="../../../../index.html#key273">subst</a></b> will interpolate the variable and function
values, returning the new string:</p>
<pre class="doctools_example">
    % set greeting &quot;Howdy&quot;
    Howdy
    % proc place {} {return &quot;World&quot;}
    % subst {$greeting, [place]!}
    Howdy, World!
    %
</pre>
<p>By defining a suitable set of Tcl commands, <b class="cmd"><a href="../../../../index.html#key273">subst</a></b> can be used to
implement a markup language similar to HTML.</p>
<p>The <b class="cmd"><a href="../../../../index.html#key273">subst</a></b> command is efficient, but it has three drawbacks for
this kind of template processing:</p>
<ul class="doctools_itemized">
<li><p>There's no way to identify and process the plain text between two
embedded Tcl commands; that makes it difficult to handle plain text in
a context-sensitive way.</p></li>
<li><p>Embedded commands are necessarily bracketed by <b class="const">[</b> and
<b class="const">]</b>; it's convenient to be able to choose different brackets
in special cases.  Someone producing web pages that include a large
quantity of Tcl code examples might easily prefer to use <b class="const">&lt;&lt;</b>
and <b class="const">&gt;&gt;</b> as the embedded code delimiters instead.</p></li>
<li><p>There's no easy way to handle incremental input, as one might wish to
do when reading data from a socket.</p></li>
</ul>
<p>At present, expander solves the first two problems; eventually it will
solve the third problem as well.</p>
<p>The following section describes the command API to the expander; this
is followed by the tutorial sections, see <span class="sectref"><a href="#section3">TUTORIAL</a></span>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXPANDER API</a></h2>
<p>The <b class="package">textutil::expander</b> package provides only one command,
described below. The rest of the section is taken by a description of
the methods for the expander objects created by this command.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::textutil::expander</b> <i class="arg">expanderName</i></a></dt>
<dd><p>The command creates a new expander object with an associated Tcl
command whose name is <i class="arg">expanderName</i>. This command may be used to
invoke various operations on the graph. If the <i class="arg">expanderName</i> is
not fully qualified it is interpreted as relative to the current
namespace.  The command has the following general form:</p>
<pre class="doctools_example">
<i class="arg">expanderName</i> option <span class="opt">?<i class="arg">arg arg ...</i>?</span>
</pre>
<p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>The following commands are possible for expander objects:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">expanderName</i> <b class="method">cappend</b> <i class="arg">text</i></a></dt>
<dd><p>Appends a string to the output in the current context.  This command
should rarely be used by macros or application code.</p></dd>
<dt><a name="3"><i class="arg">expanderName</i> <b class="method">cget</b> <i class="arg">varname</i></a></dt>
<dd><p>Retrieves the value of variable <i class="arg">varname</i>, defined in the current
context.</p></dd>
<dt><a name="4"><i class="arg">expanderName</i> <b class="method">cis</b> <i class="arg">cname</i></a></dt>
<dd><p>Determines whether or not the name of the current context is
<i class="arg">cname</i>.</p></dd>
<dt><a name="5"><i class="arg">expanderName</i> <b class="method">cname</b></a></dt>
<dd><p>Returns the name of the current context.</p></dd>
<dt><a name="6"><i class="arg">expanderName</i> <b class="method">cpop</b> <i class="arg">cname</i></a></dt>
<dd><p>Pops a context from the context stack, returning all accumulated
output in that context.  The context must be named <i class="arg">cname</i>, or an
error results.</p></dd>
<dt><a name="7"><i class="arg">expanderName</i> <b class="method">ctopandclear</b></a></dt>
<dd><p>Returns the output currently captured in the topmost context and
clears that buffer. This is similar to a combination of <b class="method">cpop</b>
followed by <b class="method">cpush</b>, except that internal state (brackets) is
preserved here.</p></dd>
<dt><a name="8"><i class="arg">expanderName</i> <b class="method">cpush</b> <i class="arg">cname</i></a></dt>
<dd><p>Pushes a context named <i class="arg">cname</i> onto the context stack.  The
context must be popped by <b class="method">cpop</b> before expansion ends or an
error results.</p></dd>
<dt><a name="9"><i class="arg">expanderName</i> <b class="method">cset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Sets variable <i class="arg">varname</i> to <i class="arg">value</i> in the current context.</p></dd>
<dt><a name="10"><i class="arg">expanderName</i> <b class="method">cvar</b> <i class="arg">varname</i></a></dt>
<dd><p>Retrieves the internal variable name of context variable
<i class="arg">varname</i>; this allows the variable to be passed to commands like
<b class="cmd">lappend</b>.</p></dd>
<dt><a name="11"><i class="arg">expanderName</i> <b class="method">errmode</b> <i class="arg">newErrmode</i></a></dt>
<dd><p>Sets the macro expansion error mode to one of <b class="const">nothing</b>,
<b class="const">macro</b>, <b class="const">error</b>, or <b class="const">fail</b>; the default value is
<b class="const">fail</b>.  The value determines what the expander does if an
error is detected during expansion of a macro.</p>
<dl class="doctools_definitions">
<dt><b class="const">fail</b></dt>
<dd><p>The error propagates normally and can be caught or ignored by the
application.</p></dd>
<dt><b class="const">error</b></dt>
<dd><p>The macro expands into a detailed error message, and expansion
continues.</p></dd>
<dt><b class="const">macro</b></dt>
<dd><p>The macro expands to itself; that is, it is passed along to the output
unchanged.</p></dd>
<dt><b class="const">nothing</b></dt>
<dd><p>The macro expands to the empty string, and is effectively ignored.</p></dd>
</dl></dd>
<dt><a name="12"><i class="arg">expanderName</i> <b class="method">evalcmd</b> <span class="opt">?<i class="arg">newEvalCmd</i>?</span></a></dt>
<dd><p>Returns the current evaluation command, which defaults to
<b class="cmd">uplevel #0</b>.  If specified, <i class="arg">newEvalCmd</i> will be saved for
future use and then returned; it must be a Tcl command expecting one
additional argument: the macro to evaluate.</p></dd>
<dt><a name="13"><i class="arg">expanderName</i> <b class="method">expand</b> <i class="arg">string</i> <span class="opt">?<i class="arg">brackets</i>?</span></a></dt>
<dd><p>Expands the input string, replacing embedded macros with their
expanded values, and returns the expanded string.</p>
<p>Note that this method pushes a new (empty) context on the stack of
contexts while it is running, and removes it on return.</p>
<p>If <i class="arg">brackets</i> is given, it must be a list of two strings; the
items will be used as the left and right macro expansion bracket
sequences for this expansion only.</p></dd>
<dt><a name="14"><i class="arg">expanderName</i> <b class="method">lb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></dt>
<dd><p>Returns the current value of the left macro expansion bracket; this is
for use as or within a macro, when the bracket needs to be included in
the output text.  If <i class="arg">newbracket</i> is specified, it becomes the new
bracket, and is returned.</p></dd>
<dt><a name="15"><i class="arg">expanderName</i> <b class="method">rb</b> <span class="opt">?<i class="arg">newbracket</i>?</span></a></dt>
<dd><p>Returns the current value of the right macro expansion bracket; this
is for use as or within a macro, when the bracket needs to be included
in the output text.  If <i class="arg">newbracket</i> is specified, it becomes the
new bracket, and is returned.</p></dd>
<dt><a name="16"><i class="arg">expanderName</i> <b class="method">reset</b></a></dt>
<dd><p>Resets all expander settings to their initial values.  Unusual results
are likely if this command is called from within a call to
<b class="method">expand</b>.</p></dd>
<dt><a name="17"><i class="arg">expanderName</i> <b class="method">setbrackets</b> <i class="arg">lbrack rbrack</i></a></dt>
<dd><p>Sets the left and right macro expansion brackets.  This command is for
use as or within a macro, or to permanently change the bracket
definitions.  By default, the brackets are <b class="const">[</b> and
<b class="const">]</b>, but any non-empty string can be used; for example,
<b class="const">&lt;</b> and <b class="const">&gt;</b> or <b class="const">(*</b> and <b class="const">*)</b> or even
<b class="const">Hello,</b> and <b class="const">World!</b>.</p></dd>
<dt><a name="18"><i class="arg">expanderName</i> <b class="method">textcmd</b> <span class="opt">?<i class="arg">newTextCmd</i>?</span></a></dt>
<dd><p>Returns the current command for processing plain text, which defaults
to the empty string, meaning <em>identity</em>. If specified,
<i class="arg">newTextCmd</i> will be saved for future use and then returned; it
must be a Tcl command expecting one additional argument: the text to
process. The expander object will this command for all plain text it
encounters, giving the user of the object the ability to process all
plain text in some standard way before writing it to the output. The
object expects that the command returns the processed plain text.</p>
<p><em>Note</em> that the combination of &quot;<b class="cmd">textcmd</b> <i class="arg">plaintext</i>&quot;
is run through the <i class="arg">evalcmd</i> for the actual evaluation. In other
words, the <i class="arg">textcmd</i> is treated as a special macro implicitly
surrounding all plain text in the template.</p></dd>
<dt><a name="19"><i class="arg">expanderName</i> <b class="method">where</b></a></dt>
<dd><p>Returns a three-element list containing the current character
position, line, and column the expander is at in the processing of the
current input string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TUTORIAL</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Basics</a></h3>
<p>To begin, create an expander object:</p>
<pre class="doctools_example">
    % package require textutil::expander
    1.2
    % ::textutil::expander myexp
    ::myexp
    %
</pre>
<p>The created <b class="cmd">::myexp</b> object can be used to expand text strings
containing embedded Tcl commands.  By default, embedded commands are
delimited by square brackets.  Note that expander doesn't attempt to
interpolate variables, since variables can be referenced by embedded
commands:</p>
<pre class="doctools_example">
    % set greeting &quot;Howdy&quot;
    Howdy
    % proc place {} {return &quot;World&quot;}
    % ::myexp expand {[set greeting], [place]!}
    Howdy, World!
    %
</pre>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Embedding Macros</a></h3>
<p>An expander macro is simply a Tcl script embedded within a text
string.  Expander evaluates the script in the global context, and
replaces it with its result string.  For example,</p>
<pre class="doctools_example">
    % set greetings {Howdy Hi &quot;What's up&quot;}
    Howdy Hi &quot;What's up&quot;
    % ::myexp expand {There are many ways to say &quot;Hello, World!&quot;:
    [set result {}
    foreach greeting $greetings {
	append result &quot;$greeting, World!\\n&quot;
    }
    set result]
    And that's just a small sample!}
    There are many ways to say &quot;Hello, World!&quot;:
    Howdy, World!
    Hi, World!
    What's up, World!
    And that's just a small sample!
    %
</pre>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Writing Macro Commands</a></h3>
<p>More typically, <em>macro commands</em> are used to create a markup
language.  A macro command is just a Tcl command that returns an
output string.  For example, expand can be used to implement a generic
document markup language that can be retargeted to HTML or any other
output format:</p>
<pre class="doctools_example">
    % proc bold {} {return &quot;&lt;b&gt;&quot;}
    % proc /bold {} {return &quot;&lt;/b&gt;&quot;}
    % ::myexp expand {Some of this text is in [bold]boldface[/bold]}
    Some of this text is in &lt;b&gt;boldface&lt;/b&gt;
    %
</pre>
<p>The above definitions of <b class="cmd">bold</b> and <b class="cmd">/bold</b> returns HTML, but
such commands can be as complicated as needed; they could, for
example, decide what to return based on the desired output format.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Changing the Expansion Brackets</a></h3>
<p>By default, embedded macros are enclosed in square brackets,
<b class="const">[</b> and <b class="const">]</b>.  If square brackets need to be
included in the output, the input can contain the <b class="cmd">lb</b> and
<b class="cmd">rb</b> commands.  Alternatively, or if square brackets are
objectionable for some other reason, the macro expansion brackets can
be changed to any pair of non-empty strings.</p>
<p>The <b class="method">setbrackets</b> command changes the brackets permanently.
For example, you can write pseudo-html by change them to <b class="const">&lt;</b>
and <b class="const">&gt;</b>:</p>
<pre class="doctools_example">
    % ::myexp setbrackets &lt; &gt;
    % ::myexp expand {&lt;bold&gt;This is boldface&lt;/bold&gt;}
    &lt;b&gt;This is boldface&lt;/b&gt;
</pre>
<p>Alternatively, you can change the expansion brackets temporarily by
passing the desired brackets to the <b class="method">expand</b> command:</p>
<pre class="doctools_example">
    % ::myexp setbrackets &quot;\\[&quot; &quot;\\]&quot;
    % ::myexp expand {&lt;bold&gt;This is boldface&lt;/bold&gt;} {&lt; &gt;}
    &lt;b&gt;This is boldface&lt;/b&gt;
    %
</pre>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Customized Macro Expansion</a></h3>
<p>By default, macros are evaluated using the Tcl <b class="cmd">uplevel #0</b>
command, so that the embedded code executes in the global context.
The application can provide a different evaluation command using
<b class="method">evalcmd</b>; this allows the application to use a safe
interpreter, for example, or even to evaluated something other than
Tcl code.  There is one caveat: to be recognized as valid, a macro
must return 1 when passed to Tcl's &quot;info complete&quot; command.</p>
<p>For example, the following code &quot;evaluates&quot; each macro by returning
the macro text itself.</p>
<pre class="doctools_example">
    proc identity {macro} {return $macro}
    ::myexp evalcmd identity
</pre>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Using the Context Stack</a></h3>
<p>Often it's desirable to define a pair of macros which operate in some
way on the plain text between them.  Consider a set of macros for
adding footnotes to a web page: one could have implement something
like this:</p>
<pre class="doctools_example">
    Dr. Pangloss, however, thinks that this is the best of all
    possible worlds.[footnote &quot;See Candide, by Voltaire&quot;]
</pre>
<p>The <b class="cmd">footnote</b> macro would, presumably, assign a number to this
footnote and save the text to be formatted later on.  However, this
solution is ugly if the footnote text is long or should contain
additional markup.  Consider the following instead:</p>
<pre class="doctools_example">
    Dr. Pangloss, however, thinks that this is the best of all
    possible worlds.[footnote]See [bookTitle &quot;Candide&quot;], by
    [authorsName &quot;Voltaire&quot;], for more information.[/footnote]
</pre>
<p>Here the footnote text is contained between <b class="cmd">footnote</b> and
<b class="cmd">/footnote</b> macros, continues onto a second line, and contains
several macros of its own.  This is both clearer and more flexible;
however, with the features presented so far there's no easy way to do
it.  That's the purpose of the context stack.</p>
<p>All macro expansion takes place in a particular context.  Here, the
<b class="cmd">footnote</b> macro pushes a new context onto the context stack.
Then, all expanded text gets placed in that new context.
<b class="cmd">/footnote</b> retrieves it by popping the context.  Here's a
skeleton implementation of these two macros:</p>
<pre class="doctools_example">
    proc footnote {} {
        ::myexp cpush footnote
    }
    proc /footnote {} {
        set footnoteText [::myexp cpop footnote]
        # Save the footnote text, and return an appropriate footnote
        # number and link.
    }
</pre>
<p>The <b class="method">cpush</b> command pushes a new context onto the stack; the
argument is the context's name.  It can be any string, but would
typically be the name of the macro itself.  Then, <b class="method">cpop</b>
verifies that the current context has the expected name, pops it off
of the stack, and returns the accumulated text.</p>
<p>Expand provides several other tools related to the context stack.
Suppose the first macro in a context pair takes arguments or computes
values which the second macro in the pair needs.  After calling
<b class="method">cpush</b>, the first macro can define one or more context
variables; the second macro can retrieve their values any time before
calling <b class="method">cpop</b>.  For example, suppose the document must specify
the footnote number explicitly:</p>
<pre class="doctools_example">
    proc footnote {footnoteNumber} {
        ::myexp cpush footnote
        ::myexp csave num $footnoteNumber
        # Return an appropriate link
    }
    proc /footnote {} {
        set footnoteNumber [::myexp cget num]
        set footnoteText [::myexp cpop footnote]
        # Save the footnote text and its footnoteNumber for future
        # output.
    }
</pre>
<p>At times, it might be desirable to define macros that are valid only
within a particular context pair; such macros should verify that they
are only called within the correct context using either <b class="method">cis</b>
or <b class="method">cname</b>.</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">HISTORY</a></h2>
<p><b class="cmd">expander</b> was written by William H. Duquette; it is a repackaging
of the central algorithm of the expand macro processing tool.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>[uri, http://www.wjduquette.com/expand, regexp, <a href="../../../../index.html#key440">split</a>, <a href="../../../../index.html#key280">string</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key781">template processing</a>, <a href="../../../../index.html#key782">text expansion</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; William H. Duquette, http://www.wjduquette.com/expand</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/textutil/repeat.html.







































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<div class='fossil-doc' data-title='textutil::repeat - Text and string utilities, macro processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::repeat(n) 0.7.1 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::repeat - Procedures to repeat strings.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil::repeat <span class="opt">?0.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::repeat::strRepeat</b> <i class="arg">text</i> <i class="arg">num</i></a></li>
<li><a href="#2"><b class="cmd">::textutil::repeat::blank</b> <i class="arg">num</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">textutil::repeat</b> provides commands to generate
long strings by repeating a shorter string many times.</p>
<p>The complete set of procedures is described below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::textutil::repeat::strRepeat</b> <i class="arg">text</i> <i class="arg">num</i></a></dt>
<dd><p>This command returns a string containing the <i class="arg">text</i> repeated
<i class="arg">num</i> times. The repetitions are joined without characters between
them. A value of <i class="arg">num</i> &lt;= 0 causes the command to return an empty
string.</p>
<p><em>Note</em>: If the Tcl core the package is loaded in provides the
command <b class="cmd">string repeat</b> then this command will be implemented in
its terms, for maximum possible speed. Otherwise a fast implementation
in Tcl will be used.</p></dd>
<dt><a name="2"><b class="cmd">::textutil::repeat::blank</b> <i class="arg">num</i></a></dt>
<dd><p>A convenience command. Returns a string of <i class="arg">num</i> spaces.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key282">blanks</a>, <a href="../../../../index.html#key281">repetition</a>, <a href="../../../../index.html#key280">string</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/textutil/tabify.html.















































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<div class='fossil-doc' data-title='textutil::tabify - Text and string utilities, macro processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::tabify(n) 0.7 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::tabify - Procedures to (un)tabify strings</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil::tabify <span class="opt">?0.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::tabify::tabify</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::textutil::tabify::tabify2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::textutil::tabify::untabify</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::textutil::tabify::untabify2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">textutil::tabify</b> provides commands that convert
between tabulation and ordinary whitespace in strings.</p>
<p>The complete set of procedures is described below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::textutil::tabify::tabify</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Tabify the <i class="arg">string</i> by replacing any substring of <i class="arg">num</i> space
chars by a tabulation and return the result as a new string. <i class="arg">num</i>
defaults to 8.</p></dd>
<dt><a name="2"><b class="cmd">::textutil::tabify::tabify2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Similar to <b class="cmd">::textutil::tabify</b> this command tabifies the
<i class="arg">string</i> and returns the result as a new string. A different
algorithm is used however. Instead of replacing any substring of
<i class="arg">num</i> spaces this command works more like an editor. <i class="arg">num</i>
defaults to 8.</p>
<p>Each line of the text in <i class="arg">string</i> is treated as if there are
tabstops every <i class="arg">num</i> columns. Only sequences of space characters
containing more than one space character and found immediately before
a tabstop are replaced with tabs.</p></dd>
<dt><a name="3"><b class="cmd">::textutil::tabify::untabify</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Untabify the <i class="arg">string</i> by replacing any tabulation char by a
substring of <i class="arg">num</i> space chars and return the result as a new
string. <i class="arg">num</i> defaults to 8.</p></dd>
<dt><a name="4"><b class="cmd">::textutil::tabify::untabify2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Untabify the <i class="arg">string</i> by replacing any tabulation char by a
substring of at most <i class="arg">num</i> space chars and return the result as a
new string. Unlike <b class="cmd">textutil::tabify::untabify</b> each tab is not
replaced by a fixed number of space characters.  The command overlays
each line in the <i class="arg">string</i> with tabstops every <i class="arg">num</i> columns
instead and replaces tabs with just enough space characters to reach
the next tabstop. This is the complement of the actions taken by
<b class="cmd">::textutil::tabify::tabify2</b>. <i class="arg">num</i> defaults to 8.</p>
<p>There is one asymmetry though: A tab can be replaced with a single
space, but not the other way around.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key544">tabstops</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/textutil/textutil.html.

































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
<div class='fossil-doc' data-title='textutil - Text and string utilities, macro processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil(n) 0.8 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil - Procedures to manipulate texts and strings.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil <span class="opt">?0.8?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::adjust</b> <i class="arg">string args</i></a></li>
<li><a href="#2"><b class="cmd">::textutil::adjust::readPatterns</b> <i class="arg">filename</i></a></li>
<li><a href="#3"><b class="cmd">::textutil::adjust::listPredefined</b></a></li>
<li><a href="#4"><b class="cmd">::textutil::adjust::getPredefined</b> <i class="arg">filename</i></a></li>
<li><a href="#5"><b class="cmd">::textutil::indent</b> <i class="arg">string</i> <i class="arg">prefix</i> <span class="opt">?<i class="arg">skip</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::textutil::undent</b> <i class="arg">string</i></a></li>
<li><a href="#7"><b class="cmd">::textutil::splitn</b> <i class="arg">string</i> <span class="opt">?<i class="arg">len</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::textutil::splitx</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></li>
<li><a href="#9"><b class="cmd">::textutil::tabify</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::textutil::tabify2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></li>
<li><a href="#11"><b class="cmd">::textutil::trim</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></li>
<li><a href="#12"><b class="cmd">::textutil::trimleft</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></li>
<li><a href="#13"><b class="cmd">::textutil::trimright</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></li>
<li><a href="#14"><b class="cmd">::textutil::trimPrefix</b> <i class="arg">string</i> <i class="arg">prefix</i></a></li>
<li><a href="#15"><b class="cmd">::textutil::trimEmptyHeading</b> <i class="arg">string</i></a></li>
<li><a href="#16"><b class="cmd">::textutil::untabify</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></li>
<li><a href="#17"><b class="cmd">::textutil::untabify2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></li>
<li><a href="#18"><b class="cmd">::textutil::strRepeat</b> <i class="arg">text num</i></a></li>
<li><a href="#19"><b class="cmd">::textutil::blank</b> <i class="arg">num</i></a></li>
<li><a href="#20"><b class="cmd">::textutil::chop</b> <i class="arg">string</i></a></li>
<li><a href="#21"><b class="cmd">::textutil::tail</b> <i class="arg">string</i></a></li>
<li><a href="#22"><b class="cmd">::textutil::cap</b> <i class="arg">string</i></a></li>
<li><a href="#23"><b class="cmd">::textutil::uncap</b> <i class="arg">string</i></a></li>
<li><a href="#24"><b class="cmd">::textutil::longestCommonPrefixList</b> <i class="arg">list</i></a></li>
<li><a href="#25"><b class="cmd">::textutil::longestCommonPrefix</b> <span class="opt">?<i class="arg">string</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">textutil</b> provides commands that manipulate
strings or texts (a.k.a. long strings or string with embedded newlines
or paragraphs).
It is actually a bundle providing the commands of the six packages</p>
<dl class="doctools_definitions">
<dt><b class="package"><a href="adjust.html">textutil::adjust</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="repeat.html">textutil::repeat</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="textutil_split.html">textutil::split</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="textutil_string.html">textutil::string</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="tabify.html">textutil::tabify</a></b></dt>
<dd></dd>
<dt><b class="package"><a href="trim.html">textutil::trim</a></b></dt>
<dd></dd>
</dl>
<p>in the namespace <b class="namespace">textutil</b>.</p>
<p>The bundle is <em>deprecated</em>, and it will be removed in a future
release of Tcllib, after the next release. It is recommended to use the
relevant sub packages instead for whatever functionality is needed by
the using package or application.</p>
<p>The complete set of procedures is described below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::textutil::adjust</b> <i class="arg">string args</i></a></dt>
<dd><p>Do a justification on the <i class="arg">string</i> according to <i class="arg">args</i>.  The
string is taken as one big paragraph, ignoring any newlines.  Then the
line is formatted according to the options used, and the command
return a new string with enough lines to contain all the printable
chars in the input string. A line is a set of chars between the
beginning of the string and a newline, or between 2 newlines, or
between a newline and the end of the string. If the input string is
small enough, the returned string won't contain any newlines.</p>
<p>Together with <b class="cmd">::textutil::indent</b> it is possible to create
properly wrapped paragraphs with arbitrary indentations.</p>
<p>By default, any occurrence of spaces characters or tabulation are
replaced by a single space so each word in a line is separated from
the next one by exactly one space char, and this forms a <em>real</em>
line. Each <em>real</em> line is placed in a <em>logical</em> line, which
have exactly a given length (see <b class="option">-length</b> option below). The
<em>real</em> line may have a lesser length. Again by default, any
trailing spaces are ignored before returning the string (see
<b class="option">-full</b> option below). The following options may be used after the
<i class="arg">string</i> parameter, and change the way the command place a
<em>real</em> line in a <em>logical</em> line.</p>
<dl class="doctools_definitions">
<dt>-full <i class="arg">boolean</i></dt>
<dd><p>If set to <b class="const">false</b>, any trailing space chars are deleted before
returning the string. If set to <b class="const">true</b>, any trailing space
chars are left in the string. Default to <b class="const">false</b>.</p></dd>
<dt><b class="option">-hyphenate</b> <i class="arg">boolean</i></dt>
<dd><p>if set to <b class="const">false</b>, no hyphenation will be done. If set to
<b class="const">true</b>, the last word of a line is tried to be hyphenated.
Defaults to <b class="const">false</b>. Note: hyphenation patterns must be loaded
prior, using the command <b class="cmd">::textutil::adjust::readPatterns</b>.</p></dd>
<dt><b class="option">-justify</b> <b class="const">center|left|plain|right</b></dt>
<dd><p>Set the justification of the returned string to <b class="const">center</b>,
<b class="const">left</b>, <b class="const">plain</b> or <b class="const">right</b>. By default, it is set to
<b class="const">left</b>.  The justification means that any line in the returned
string but the last one is build according to the value. If the
justification is set to <b class="const">plain</b> and the number of printable
chars in the last line is less than 90% of the length of a line (see
<b class="option">-length</b>), then this line is justified with the <b class="const">left</b>
value, avoiding the expansion of this line when it is too small. The
meaning of each value is:</p>
<dl class="doctools_definitions">
<dt><b class="const">center</b></dt>
<dd><p>The real line is centered in the logical line. If needed, a set of
space characters are added at the beginning (half of the needed set)
and at the end (half of the needed set) of the line if required (see
the option <b class="option">-full</b>).</p></dd>
<dt><b class="const">left</b></dt>
<dd><p>The real line is set on the left of the logical line. It means that
there are no space chars at the beginning of this line. If required,
all needed space chars are added at the end of the line (see the
option <b class="option">-full</b>).</p></dd>
<dt><b class="const">plain</b></dt>
<dd><p>The real line is exactly set in the logical line. It means that there
are no leading or trailing space chars. All the needed space chars are
added in the <em>real</em> line, between 2 (or more) words.</p></dd>
<dt><b class="const">right</b></dt>
<dd><p>The real line is set on the right of the logical line. It means that
there are no space chars at the end of this line, and there may be
some space chars at the beginning, despite of the <b class="option">-full</b> option.</p></dd>
</dl></dd>
<dt><b class="option">-length</b> <i class="arg">integer</i></dt>
<dd><p>Set the length of the <em>logical</em> line in the string to
<i class="arg">integer</i>.  <i class="arg">integer</i> must be a positive integer
value. Defaults to <b class="const">72</b>.</p></dd>
<dt><b class="option">-strictlength</b> <i class="arg">boolean</i></dt>
<dd><p>If set to <b class="const">false</b>, a line can exceed the specified
<b class="option">-length</b> if a single word is longer than <b class="option">-length</b>. If
set to <b class="const">true</b>, words that are longer than <b class="option">-length</b> are
split so that no line exceeds the specified <b class="option">-length</b>. Defaults
to <b class="const">false</b>.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::textutil::adjust::readPatterns</b> <i class="arg">filename</i></a></dt>
<dd><p>Loads the internal storage for hyphenation patterns with the contents
of the file <i class="arg">filename</i>. This has to be done prior to calling
command <b class="cmd">::textutil::adjust</b> with
&quot;<b class="option">-hyphenate</b> <b class="const">true</b>&quot;, or the hyphenation process will
not work correctly.</p>
<p>The package comes with a number of predefined pattern files, and the
command <b class="cmd">::textutil::adjust::listPredefined</b> can be used to find
out their names.</p></dd>
<dt><a name="3"><b class="cmd">::textutil::adjust::listPredefined</b></a></dt>
<dd><p>This command returns a list containing the names of the hyphenation
files coming with this package.</p></dd>
<dt><a name="4"><b class="cmd">::textutil::adjust::getPredefined</b> <i class="arg">filename</i></a></dt>
<dd><p>Use this command to query the package for the full path name of the
hyphenation file <i class="arg">filename</i> coming with the package. Only the
filenames found in the list returned by
<b class="cmd">::textutil::adjust::listPredefined</b> are legal arguments for this
command.</p></dd>
<dt><a name="5"><b class="cmd">::textutil::indent</b> <i class="arg">string</i> <i class="arg">prefix</i> <span class="opt">?<i class="arg">skip</i>?</span></a></dt>
<dd><p>Each line in the <i class="arg">string</i> indented by adding the string
<i class="arg">prefix</i> at its beginning. The modified string is returned
as the result of the command.</p>
<p>If <i class="arg">skip</i> is specified the first <i class="arg">skip</i> lines are left
untouched. The default for <i class="arg">skip</i> is <b class="const">0</b>, causing the
modification of all lines. Negative values for <i class="arg">skip</i> are treated
like <b class="const">0</b>. In other words, <i class="arg">skip</i> &gt; <b class="const">0</b> creates a
hanging indentation.</p>
<p>Together with <b class="cmd">::textutil::adjust</b> it is possible to create
properly wrapped paragraphs with arbitrary indentations.</p></dd>
<dt><a name="6"><b class="cmd">::textutil::undent</b> <i class="arg">string</i></a></dt>
<dd><p>The command computes the common prefix for all
lines in <i class="arg">string</i> consisting solely out of whitespace,
removes this from each line and returns the modified string.</p>
<p>Lines containing only whitespace are always reduced to completely
empty lines. They and empty lines are also ignored when computing the
prefix to remove.</p>
<p>Together with <b class="cmd">::textutil::adjust</b> it is possible to create
properly wrapped paragraphs with arbitrary indentations.</p></dd>
<dt><a name="7"><b class="cmd">::textutil::splitn</b> <i class="arg">string</i> <span class="opt">?<i class="arg">len</i>?</span></a></dt>
<dd><p>This command splits the given <i class="arg">string</i> into chunks of <i class="arg">len</i>
characters and returns a list containing these chunks. The argument
<i class="arg">len</i> defaults to <b class="const">1</b> if none is specified. A negative
length is not allowed and will cause the command to throw an
error. Providing an empty string as input is allowed, the command will
then return an empty list. If the length of the <i class="arg">string</i> is not an
entire multiple of the chunk length, then the last chunk in the
generated list will be shorter than <i class="arg">len</i>.</p></dd>
<dt><a name="8"><b class="cmd">::textutil::splitx</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>Split the <i class="arg">string</i> and return a list. The string is split
according to the regular expression <i class="arg">regexp</i> instead of a simple
list of chars. Note that if you add parenthesis into the <i class="arg">regexp</i>,
the parentheses part of separator would be added into list as
additional element. If the <i class="arg">string</i> is empty the result is the
empty list, like for <b class="cmd"><a href="../../../../index.html#key440">split</a></b>. If <i class="arg">regexp</i> is empty the
<i class="arg">string</i> is split at every character, like <b class="cmd"><a href="../../../../index.html#key440">split</a></b> does.
The regular expression <i class="arg">regexp</i> defaults to &quot;[\\t \\r\\n]+&quot;.</p></dd>
<dt><a name="9"><b class="cmd">::textutil::tabify</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Tabify the <i class="arg">string</i> by replacing any substring of <i class="arg">num</i> space
chars by a tabulation and return the result as a new string. <i class="arg">num</i>
defaults to 8.</p></dd>
<dt><a name="10"><b class="cmd">::textutil::tabify2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Similar to <b class="cmd">::textutil::tabify</b> this command tabifies the
<i class="arg">string</i> and returns the result as a new string. A different
algorithm is used however. Instead of replacing any substring of
<i class="arg">num</i> spaces this command works more like an editor. <i class="arg">num</i>
defaults to 8.</p>
<p>Each line of the text in <i class="arg">string</i> is treated as if there are
tabstops every <i class="arg">num</i> columns. Only sequences of space characters
containing more than one space character and found immediately before
a tabstop are replaced with tabs.</p></dd>
<dt><a name="11"><b class="cmd">::textutil::trim</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>Remove in <i class="arg">string</i> any leading and trailing substring according to
the regular expression <i class="arg">regexp</i> and return the result as a new
string.  This apply on any <em>line</em> in the string, that is any
substring between 2 newline chars, or between the beginning of the
string and a newline, or between a newline and the end of the string,
or, if the string contain no newline, between the beginning and the
end of the string.
The regular expression <i class="arg">regexp</i> defaults to &quot;[ \\t]+&quot;.</p></dd>
<dt><a name="12"><b class="cmd">::textutil::trimleft</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>Remove in <i class="arg">string</i> any leading substring according to the regular
expression <i class="arg">regexp</i> and return the result as a new string. This
apply on any <em>line</em> in the string, that is any substring between
2 newline chars, or between the beginning of the string and a newline,
or between a newline and the end of the string, or, if the string
contain no newline, between the beginning and the end of the string.
The regular expression <i class="arg">regexp</i> defaults to &quot;[ \\t]+&quot;.</p></dd>
<dt><a name="13"><b class="cmd">::textutil::trimright</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>Remove in <i class="arg">string</i> any trailing substring according to the regular
expression <i class="arg">regexp</i> and return the result as a new string. This
apply on any <em>line</em> in the string, that is any substring between
2 newline chars, or between the beginning of the string and a newline,
or between a newline and the end of the string, or, if the string
contain no newline, between the beginning and the end of the string.
The regular expression <i class="arg">regexp</i> defaults to &quot;[ \\t]+&quot;.</p></dd>
<dt><a name="14"><b class="cmd">::textutil::trimPrefix</b> <i class="arg">string</i> <i class="arg">prefix</i></a></dt>
<dd><p>Removes the <i class="arg">prefix</i> from the beginning of <i class="arg">string</i> and
returns the result. The <i class="arg">string</i> is left unchanged if it doesn't
have <i class="arg">prefix</i> at its beginning.</p></dd>
<dt><a name="15"><b class="cmd">::textutil::trimEmptyHeading</b> <i class="arg">string</i></a></dt>
<dd><p>Looks for empty lines (including lines consisting of only whitespace)
at the beginning of the <i class="arg">string</i> and removes it. The modified
string is returned as the result of the command.</p></dd>
<dt><a name="16"><b class="cmd">::textutil::untabify</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Untabify the <i class="arg">string</i> by replacing any tabulation char by a
substring of <i class="arg">num</i> space chars and return the result as a new
string. <i class="arg">num</i> defaults to 8.</p></dd>
<dt><a name="17"><b class="cmd">::textutil::untabify2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Untabify the <i class="arg">string</i> by replacing any tabulation char by a
substring of at most <i class="arg">num</i> space chars and return the result as a
new string. Unlike <b class="cmd">textutil::untabify</b> each tab is not replaced
by a fixed number of space characters.  The command overlays each line
in the <i class="arg">string</i> with tabstops every <i class="arg">num</i> columns instead and
replaces tabs with just enough space characters to reach the next
tabstop. This is the complement of the actions taken by
<b class="cmd">::textutil::tabify2</b>. <i class="arg">num</i> defaults to 8.</p>
<p>There is one asymmetry though: A tab can be replaced with a single
space, but not the other way around.</p></dd>
<dt><a name="18"><b class="cmd">::textutil::strRepeat</b> <i class="arg">text num</i></a></dt>
<dd><p>The implementation depends on the core executing the package. Used
<b class="cmd">string repeat</b> if it is present, or a fast tcl implementation
if it is not. Returns a string containing the <i class="arg">text</i> repeated
<i class="arg">num</i> times. The repetitions are joined without characters between
them. A value of <i class="arg">num</i> &lt;= 0 causes the command to return an empty
string.</p></dd>
<dt><a name="19"><b class="cmd">::textutil::blank</b> <i class="arg">num</i></a></dt>
<dd><p>A convenience command. Returns a string of <i class="arg">num</i> spaces.</p></dd>
<dt><a name="20"><b class="cmd">::textutil::chop</b> <i class="arg">string</i></a></dt>
<dd><p>A convenience command. Removes the last character of <i class="arg">string</i> and
returns the shortened string.</p></dd>
<dt><a name="21"><b class="cmd">::textutil::tail</b> <i class="arg">string</i></a></dt>
<dd><p>A convenience command. Removes the first character of <i class="arg">string</i> and
returns the shortened string.</p></dd>
<dt><a name="22"><b class="cmd">::textutil::cap</b> <i class="arg">string</i></a></dt>
<dd><p>Capitalizes the first character of <i class="arg">string</i> and returns the modified string.</p></dd>
<dt><a name="23"><b class="cmd">::textutil::uncap</b> <i class="arg">string</i></a></dt>
<dd><p>The complementary operation to <b class="cmd">::textutil::cap</b>. Forces the first
character of <i class="arg">string</i> to lower case and returns the modified
string.</p></dd>
<dt><a name="24"><b class="cmd">::textutil::longestCommonPrefixList</b> <i class="arg">list</i></a></dt>
<dd></dd>
<dt><a name="25"><b class="cmd">::textutil::longestCommonPrefix</b> <span class="opt">?<i class="arg">string</i>...?</span></a></dt>
<dd><p>Computes the longest common prefix for either the <i class="arg">string</i>s given
to the command, or the strings specified in the single <i class="arg">list</i>, and
returns it as the result of the command.</p>
<p>If no strings were specified the result is the empty string.  If only
one string was specified, the string itself is returned, as it is its
own longest common prefix.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key345">TeX</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key348">hyphenation</a>, <a href="../../../../index.html#key344">indenting</a>, <a href="../../../../index.html#key347">paragraph</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key429">trimming</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/textutil/textutil_split.html.























































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<div class='fossil-doc' data-title='textutil::split - Text and string utilities, macro processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::split(n) 0.7 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::split - Procedures to split texts</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil::split <span class="opt">?0.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::split::splitn</b> <i class="arg">string</i> <span class="opt">?<i class="arg">len</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::textutil::split::splitx</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">textutil::split</b> provides commands that split
strings by size and arbitrary regular expressions.</p>
<p>The complete set of procedures is described below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::textutil::split::splitn</b> <i class="arg">string</i> <span class="opt">?<i class="arg">len</i>?</span></a></dt>
<dd><p>This command splits the given <i class="arg">string</i> into chunks of <i class="arg">len</i>
characters and returns a list containing these chunks. The argument
<i class="arg">len</i> defaults to <b class="const">1</b> if none is specified. A negative
length is not allowed and will cause the command to throw an
error. Providing an empty string as input is allowed, the command will
then return an empty list. If the length of the <i class="arg">string</i> is not an
entire multiple of the chunk length, then the last chunk in the
generated list will be shorter than <i class="arg">len</i>.</p></dd>
<dt><a name="2"><b class="cmd">::textutil::split::splitx</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>This command splits the <i class="arg">string</i> and return a list. The string is
split according to the regular expression <i class="arg">regexp</i> instead of a
simple list of chars.
Note that if you parentheses are added into the <i class="arg">regexp</i>, the
parentheses part of separator will be added into the result list as
additional element. If the <i class="arg">string</i> is empty the result is the
empty list, like for <b class="cmd"><a href="../../../../index.html#key440">split</a></b>. If <i class="arg">regexp</i> is empty the
<i class="arg">string</i> is split at every character, like <b class="cmd"><a href="../../../../index.html#key440">split</a></b> does.
The regular expression <i class="arg">regexp</i> defaults to &quot;[\\t \\r\\n]+&quot;.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key440">split</a>, <a href="../../../../index.html#key280">string</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/textutil/textutil_string.html.

















































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

<div class='fossil-doc' data-title='textutil::string - Text and string utilities, macro processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::string(n) 0.8 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::string - Procedures to manipulate texts and strings.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil::string <span class="opt">?0.8?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::string::chop</b> <i class="arg">string</i></a></li>
<li><a href="#2"><b class="cmd">::textutil::string::tail</b> <i class="arg">string</i></a></li>
<li><a href="#3"><b class="cmd">::textutil::string::cap</b> <i class="arg">string</i></a></li>
<li><a href="#4"><b class="cmd">::textutil::string::capEachWord</b> <i class="arg">string</i></a></li>
<li><a href="#5"><b class="cmd">::textutil::string::uncap</b> <i class="arg">string</i></a></li>
<li><a href="#6"><b class="cmd">::textutil::string::longestCommonPrefixList</b> <i class="arg">list</i></a></li>
<li><a href="#7"><b class="cmd">::textutil::string::longestCommonPrefix</b> <span class="opt">?<i class="arg">string</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">textutil::string</b> provides miscellaneous string
manipulation commands.</p>
<p>The complete set of procedures is described below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::textutil::string::chop</b> <i class="arg">string</i></a></dt>
<dd><p>A convenience command. Removes the last character of <i class="arg">string</i> and
returns the shortened string.</p></dd>
<dt><a name="2"><b class="cmd">::textutil::string::tail</b> <i class="arg">string</i></a></dt>
<dd><p>A convenience command. Removes the first character of <i class="arg">string</i> and
returns the shortened string.</p></dd>
<dt><a name="3"><b class="cmd">::textutil::string::cap</b> <i class="arg">string</i></a></dt>
<dd><p>Capitalizes the first character of <i class="arg">string</i> and returns the
modified string.</p></dd>
<dt><a name="4"><b class="cmd">::textutil::string::capEachWord</b> <i class="arg">string</i></a></dt>
<dd><p>Capitalizes the first character of word of the <i class="arg">string</i> and
returns the modified string. Words quoted with either backslash or
dollar-sign are left untouched.</p></dd>
<dt><a name="5"><b class="cmd">::textutil::string::uncap</b> <i class="arg">string</i></a></dt>
<dd><p>The complementary operation to <b class="cmd">::textutil::string::cap</b>. Forces
the first character of <i class="arg">string</i> to lower case and returns the
modified string.</p></dd>
<dt><a name="6"><b class="cmd">::textutil::string::longestCommonPrefixList</b> <i class="arg">list</i></a></dt>
<dd></dd>
<dt><a name="7"><b class="cmd">::textutil::string::longestCommonPrefix</b> <span class="opt">?<i class="arg">string</i>...?</span></a></dt>
<dd><p>Computes the longest common prefix for either the <i class="arg">string</i>s given
to the command, or the strings specified in the single <i class="arg">list</i>, and
returns it as the result of the command.</p>
<p>If no strings were specified the result is the empty string.  If only
one string was specified, the string itself is returned, as it is its
own longest common prefix.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key689">capitalize</a>, <a href="../../../../index.html#key688">chop</a>, <a href="../../../../index.html#key690">common prefix</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key687">prefix</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key686">uncapitalize</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/textutil/trim.html.

























































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<div class='fossil-doc' data-title='textutil::trim - Text and string utilities, macro processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::trim(n) 0.7 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::trim - Procedures to trim strings</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil::trim <span class="opt">?0.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::trim::trim</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::textutil::trim::trimleft</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::textutil::trim::trimright</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::textutil::trim::trimPrefix</b> <i class="arg">string</i> <i class="arg">prefix</i></a></li>
<li><a href="#5"><b class="cmd">::textutil::trim::trimEmptyHeading</b> <i class="arg">string</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">textutil::trim</b> provides commands that trim
strings using arbitrary regular expressions.</p>
<p>The complete set of procedures is described below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::textutil::trim::trim</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>Remove in <i class="arg">string</i> any leading and trailing substring according to
the regular expression <i class="arg">regexp</i> and return the result as a new
string.  This is done for all <em>lines</em> in the string, that is any
substring between 2 newline chars, or between the beginning of the
string and a newline, or between a newline and the end of the string,
or, if the string contain no newline, between the beginning and the
end of the string.
The regular expression <i class="arg">regexp</i> defaults to &quot;[ \\t]+&quot;.</p></dd>
<dt><a name="2"><b class="cmd">::textutil::trim::trimleft</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>Remove in <i class="arg">string</i> any leading substring according to the regular
expression <i class="arg">regexp</i> and return the result as a new string. This
apply on any <em>line</em> in the string, that is any substring between
2 newline chars, or between the beginning of the string and a newline,
or between a newline and the end of the string, or, if the string
contain no newline, between the beginning and the end of the string.
The regular expression <i class="arg">regexp</i> defaults to &quot;[ \\t]+&quot;.</p></dd>
<dt><a name="3"><b class="cmd">::textutil::trim::trimright</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>Remove in <i class="arg">string</i> any trailing substring according to the regular
expression <i class="arg">regexp</i> and return the result as a new string. This
apply on any <em>line</em> in the string, that is any substring between
2 newline chars, or between the beginning of the string and a newline,
or between a newline and the end of the string, or, if the string
contain no newline, between the beginning and the end of the string.
The regular expression <i class="arg">regexp</i> defaults to &quot;[ \\t]+&quot;.</p></dd>
<dt><a name="4"><b class="cmd">::textutil::trim::trimPrefix</b> <i class="arg">string</i> <i class="arg">prefix</i></a></dt>
<dd><p>Removes the <i class="arg">prefix</i> from the beginning of <i class="arg">string</i> and
returns the result. The <i class="arg">string</i> is left unchanged if it doesn't
have <i class="arg">prefix</i> at its beginning.</p></dd>
<dt><a name="5"><b class="cmd">::textutil::trim::trimEmptyHeading</b> <i class="arg">string</i></a></dt>
<dd><p>Looks for empty lines (including lines consisting of only whitespace)
at the beginning of the <i class="arg">string</i> and removes it. The modified
string is returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key687">prefix</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key429">trimming</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tie/tie.html.







































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
<div class='fossil-doc' data-title='tie - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tie(n) 1.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tie - Array persistence</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">USING TIES</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">TIE API</a></li>
<li class="doctools_subsection"><a href="#subsection2">STANDARD DATA SOURCE TYPES</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">CREATING NEW DATA SOURCES</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">DATA SOURCE OBJECTS</a></li>
<li class="doctools_subsection"><a href="#subsection4">REGISTERING A NEW DATA SOURCE CLASS</a></li>
<li class="doctools_subsection"><a href="#subsection5">DATA SOURCE CLASS</a></li>
<li class="doctools_subsection"><a href="#subsection6">DATA SOURCE OBJECT API</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">tie <span class="opt">?1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tie::tie</b> <i class="arg">arrayvarname</i> <i class="arg">options</i>... <i class="arg">dstype</i> <i class="arg">dsname</i>...</a></li>
<li><a href="#2"><b class="cmd">::tie::untie</b> <i class="arg">arrayvarname</i> <span class="opt">?<i class="arg">token</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::tie::info</b> <b class="method">ties</b> <i class="arg">arrayvarname</i></a></li>
<li><a href="#4"><b class="cmd">::tie::info</b> <b class="method">types</b></a></li>
<li><a href="#5"><b class="cmd">::tie::info</b> <b class="method">type</b> <i class="arg">dstype</i></a></li>
<li><a href="#6"><b class="cmd">::tie::register</b> <i class="arg">dsclasscmd</i> <b class="const">as</b> <i class="arg">dstype</i></a></li>
<li><a href="#7"><b class="cmd">dsclasscmd</b> <i class="arg">objname</i> <span class="opt">?<i class="arg">dsname</i>...?</span></a></li>
<li><a href="#8"><b class="cmd">ds</b> <b class="method">destroy</b></a></li>
<li><a href="#9"><b class="cmd">ds</b> <b class="method">names</b></a></li>
<li><a href="#10"><b class="cmd">ds</b> <b class="method">size</b></a></li>
<li><a href="#11"><b class="cmd">ds</b> <b class="method">get</b></a></li>
<li><a href="#12"><b class="cmd">ds</b> <b class="method">set</b> <i class="arg">dict</i></a></li>
<li><a href="#13"><b class="cmd">ds</b> <b class="method">unset</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#14"><b class="cmd">ds</b> <b class="method">setv</b> <i class="arg">index</i> <i class="arg">value</i></a></li>
<li><a href="#15"><b class="cmd">ds</b> <b class="method">unsetv</b> <i class="arg">index</i></a></li>
<li><a href="#16"><b class="cmd">ds</b> <b class="method">getv</b> <i class="arg">index</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tie</b> package provides a framework for the creation of
persistent Tcl array variables. It should be noted that the provided
mechanism is generic enough to also allow its usage for the
distribution of the contents of Tcl arrays over multiple threads and
processes, i.e. communication.</p>
<p>This, persistence and communication, is accomplished by <i class="term">tying</i>)
a Tcl array variable to a <i class="term"><a href="../../../../index.html#key365">data source</a></i>. Examples of data
sources are other Tcl arrays and files.</p>
<p>It should be noted that a single Tcl array variable can be tied to
more than one <i class="term"><a href="../../../../index.html#key365">data source</a></i>. It is this feature which allows
the framework to be used for communication as well. Just tie several
Tcl arrays in many client processes to a Tcl array in a server and all
changes to any of them will be distributed to all. Less centralized
variants of this are of course possible as well.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">USING TIES</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">TIE API</a></h3>
<p>This section describes the basic API used to establish and remove ties
between Tcl array variables and data sources. This interface is the
only one a casual user has to be concerned about. The following
sections about the various internal interfaces can be safely skipped.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tie::tie</b> <i class="arg">arrayvarname</i> <i class="arg">options</i>... <i class="arg">dstype</i> <i class="arg">dsname</i>...</a></dt>
<dd><p>This command establishes a tie between the Tcl array whose name is
provided by the argument <i class="arg">arrayvarname</i> and the
<i class="term"><a href="../../../../index.html#key365">data source</a></i> identified by the <i class="arg">dstype</i> and its series of
<i class="arg">dsname</i> arguments. All changes made to the Tcl array after this
command returns will be saved to the <i class="term"><a href="../../../../index.html#key365">data source</a></i> for
safekeeping (or distribution).</p>
<p>The result of the command is always a token which identifies the new
tie. This token can be used later to destroy this specific tie.</p>
<dl class="doctools_arguments">
<dt>varname <i class="arg">arrayvarname</i> (in)</dt>
<dd><p>The name of the Tcl array variable to connect the new tie to.</p></dd>
<dt>name|command <i class="arg">dstype</i> (in)</dt>
<dd><p>This argument specifies the type of the <i class="term"><a href="../../../../index.html#key365">data source</a></i> we wish
to access.
The <i class="arg">dstype</i> can be one of <b class="const">log</b>, <b class="const">array</b>,
<b class="const">remotearray</b>, <b class="const">file</b>, <b class="const">growfile</b>, or
<b class="const">dsource</b>; in addition, the programmer can register additional
data source types.
Each <i class="arg">dstype</i> is followed by one or more arguments that identify
the <i class="term"><a href="../../../../index.html#key365">data source</a></i> to which the array is to be tied.</p></dd>
<dt>string <i class="arg">dsname</i> (in)</dt>
<dd><p>The series of <i class="arg">dsname</i> arguments coming after the <i class="arg">dstype</i>
identifies the <i class="term"><a href="../../../../index.html#key365">data source</a></i> we wish to connect to, and has to
be appropriate for the chosen type.</p></dd>
</dl>
<p>The command understands a number of additional options which guide the
process of setting up the connection between Tcl array and
<i class="term"><a href="../../../../index.html#key365">data source</a></i>.</p>
<dl class="doctools_options">
<dt><b class="option">-open</b></dt>
<dd><p>The Tcl array for the new tie is <i class="term">loaded</i> from the
<i class="term"><a href="../../../../index.html#key365">data source</a></i>, and the previously existing contents of the Tcl
array are erased. Care is taken to <em>not</em> erase the previous
contents should the creation of the tie fail.</p>
<p>This option and the option <b class="option">-save</b> exclude each other. If
neither this nor option <b class="option">-save</b> are specified then this option
is assumed as default.</p></dd>
<dt><b class="option">-save</b></dt>
<dd><p>The Tcl array for the new tie is <i class="term">saved</i> to the
<i class="term"><a href="../../../../index.html#key365">data source</a></i>, and the previously existing contents of the
<i class="term"><a href="../../../../index.html#key365">data source</a></i> are erased.</p>
<p>This option and the option <b class="option">-open</b> exclude each other. If
neither this nor option <b class="option">-open</b> are specified then option
<b class="option">-open</b> is assumed as default.</p></dd>
<dt><b class="option">-merge</b></dt>
<dd><p>Using this option prevents the erasure of any previously existing
content and merges the data instead. It can be specified in
conjunction with either <b class="option">-open</b> or <b class="option">-save</b>. They
determine how data existing in both Tcl array and
<i class="term"><a href="../../../../index.html#key365">data source</a></i>, i.e duplicates, are dealt with.</p>
<p>When used with <b class="option">-open</b> data in the <i class="term"><a href="../../../../index.html#key365">data source</a></i> has
precedence.
In other words, for duplicates the data in the <i class="term"><a href="../../../../index.html#key365">data source</a></i> is
loaded into the Tcl array.</p>
<p>When used with <b class="option">-save</b> data in the Tcl array has precedence. In
other words, for duplicates the data in the Tcl array is saved into
the <i class="term"><a href="../../../../index.html#key365">data source</a></i>.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::tie::untie</b> <i class="arg">arrayvarname</i> <span class="opt">?<i class="arg">token</i>?</span></a></dt>
<dd><p>This command dissolves one or more ties associated with the Tcl array
named by <i class="arg">arrayvarname</i>. If no <i class="arg">token</i> is specified then all
ties to that Tcl array are dissolved. Otherwise only the tie the token
stands for is removed, if it is actually connected to the
array. Trying to remove a specific tie not belonging to the provided
array will cause an error.</p>
<p>It should be noted that while severing a tie will destroy management
information internal to the package the <i class="term"><a href="../../../../index.html#key365">data source</a></i> which was
handled by the tie will not be touched, only closed.</p>
<p>After the command returns none of changes made to the array will be
saved to the <i class="term"><a href="../../../../index.html#key365">data source</a></i> anymore.</p>
<p>The result of the command is an empty string.</p>
<dl class="doctools_arguments">
<dt>varname <i class="arg">arrayname</i> (in)</dt>
<dd><p>The name of a Tcl array variable which may have ties.</p></dd>
<dt>handle <i class="arg">token</i> (in)</dt>
<dd><p>A handle representing a specific tie. This argument is optional.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::tie::info</b> <b class="method">ties</b> <i class="arg">arrayvarname</i></a></dt>
<dd><p>This command returns a list of ties associated with the Tcl array
variable named by <i class="arg">arrayvarname</i>. The result list will be empty if
the variable has no ties associated with it.</p></dd>
<dt><a name="4"><b class="cmd">::tie::info</b> <b class="method">types</b></a></dt>
<dd><p>This command returns a dictionary of registered types, and the class
commands they are associated with.</p></dd>
<dt><a name="5"><b class="cmd">::tie::info</b> <b class="method">type</b> <i class="arg">dstype</i></a></dt>
<dd><p>This command returns the fully resolved class command for a type
name. This means that the command will follow a chain of type
definitions ot its end.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">STANDARD DATA SOURCE TYPES</a></h3>
<p>This package provides the six following types as examples and standard
data sources.</p>
<dl class="doctools_definitions">
<dt><b class="const">log</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> does not maintain any actual data, nor
persistence. It does not accept any identifying arguments. All changes
are simply logged to <b class="const">stdout</b>.</p></dd>
<dt><b class="const">array</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> uses a regular Tcl array as the origin of
the persistent data. It accepts a single identifying argument, the
name of this Tcl array. All changes are mirrored to that array.</p></dd>
<dt><b class="const">remotearray</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> is similar to <b class="const">array</b>. The difference
is that the Tcl array to which we are mirroring is not directly
accessible, but through a <b class="cmd"><a href="../../../../index.html#key353">send</a></b>-like command.</p>
<p>It accepts three identifying arguments, the name of the other Tcl
array, the command prefix for the <b class="cmd"><a href="../../../../index.html#key353">send</a></b>-like accessor command,
and an identifier for the remote entity hosting the array, in this
order. All changes are mirrored to that array, via the command
prefix. All commands will be executed in the context of the global
namespace.</p>
<p><b class="cmd"><a href="../../../../index.html#key353">send</a></b>-like means that the command prefix has to have <b class="cmd"><a href="../../../../index.html#key353">send</a></b>
syntax and semantics. I.e. it is a channel over which we can send
arbitrary commands to some other entity.
The remote array <i class="term"><a href="../../../../index.html#key365">data source</a></i> however uses only the commands
<b class="cmd"><a href="../../../../index.html#key301">set</a></b>, <b class="cmd">unset</b>, <b class="cmd">array exists</b>, <b class="cmd">array names</b>, <b class="cmd">array set</b>, and
<b class="cmd">array get</b> to retrieve and set values in the remote array.</p>
<p>The command prefix and the entity id are separate to allow the data
source to use options like <b class="option">-async</b> when assembling the actual
commands.</p>
<p>Examples of command prefixes, listed with the id of the remote entity,
without options. In reality only the part before the id is the command
prefix:</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#key353">send</a></b> <i class="arg">tkname</i></dt>
<dd><p>The Tcl array is in a remote interpreter and is accessed via Tk's X
communication.</p></dd>
<dt><b class="cmd">comm::comm send</b> <i class="arg">hostportid</i></dt>
<dd><p>The Tcl array is in a remote interpreter and is accessed through a
socket.</p></dd>
<dt><b class="cmd">thread::send</b> <i class="arg">threadid</i></dt>
<dd><p>The Tcl array is in a remote interpreter in a different thread of this
process.</p></dd>
</dl></dd>
<dt><b class="const">file</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> uses a single file as origin of the
persistent data. It accepts a single identifying argument, the path to
this file. The file has to be both readable and writable. It may not
exist, the <i class="term"><a href="../../../../index.html#key365">data source</a></i> will create it in that case. This (and
only this) situation will require that the directory for the file
exists and is writable as well.</p>
<p>All changes are saved in the file, as proper Tcl commands, one command
per operation. In other words, the file will always contain a proper
Tcl script.</p>
<p>If the file exists when the tie using it is set up, then it will be
compacted, i.e. superfluous operations are removed, if the operations
log stored in it contains either at least one operation clearing the
whole array, or at least 1.5 times more operations than entries in the
loaded array.</p></dd>
<dt><b class="const">growfile</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> is like <b class="const">file</b> in terms of the storage
medium for the array data, and how it is configured. In constrast to
the former it however assumes and ensures that the tied array will
never shrink. I.e. the creation of new array entries, and the
modification of existing entries is allowed, but the deletion of
entries is not, and causes the data source to throw errors.</p>
<p>This restriction allows us to simplify both file format and access to
the file radically. For one, the file is read only once and the
internal cache cannot be invalidated. Second, writing data is reduced
to a simple append, and no compaction step is necessary. The format of
the contents is the string representation of a dictionary which can be
incrementally extended forever at the end.</p></dd>
<dt><b class="const">dsource</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> uses an explicitly specified
<i class="term">data source object</i> as the source for the persistent
data. It accepts a single identifying argument, the command prefix,
i.e. object command.</p>
<p>To use this type it is necessary to know how the framework manages
ties and what <span class="sectref"><a href="#subsection3">data source objects</a></span> are.</p>
<p>All changes are delegated to the specified object.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CREATING NEW DATA SOURCES</a></h2>
<p>This section is of no interest to the casual user of ties. Only
developers wishing to create new data sources have to know the
information provided herein.</p>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">DATA SOURCE OBJECTS</a></h3>
<p>All ties are represented internally by an in-memory object which
mediates between the tie framework and the specific
<i class="term"><a href="../../../../index.html#key365">data source</a></i>, like an array, file, etc.
This is the <i class="term">data source object</i>.</p>
<p>Its class, the <span class="sectref"><a href="#subsection5">data source class</a></span> is <em>not</em> generic,
but specific to the type of the <i class="term"><a href="../../../../index.html#key365">data source</a></i>. Writing a new
<i class="term"><a href="../../../../index.html#key365">data source</a></i> requires us to write such a class, and then
registering it with the framework as a new type.</p>
<p>The following subsections describe the various APIs a
<span class="sectref"><a href="#subsection5">data source class</a></span> and the objects it generates will have
to follow to be compatible with the tie framework.</p>
<p>Data source objects are normally automatically created and destroyed
by the framework when a tie is created, or removed. This management
can be explicitly bypassed through the usage of the &quot;dsource&quot; type.
The <i class="term"><a href="../../../../index.html#key365">data source</a></i> for this type is a
<i class="term">data source object</i> itself, and this object is outside of the
scope of the tie framework and not managed by it.
In other words, this type allows the creation of ties which talk to
pre-existing <i class="term">data source object</i>s, and these objects will
survive the removal of the ties using them as well.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">REGISTERING A NEW DATA SOURCE CLASS</a></h3>
<p>After a <span class="sectref"><a href="#subsection5">data source class</a></span> has been written it is necessary
to register it as a new type with the framework.</p>
<dl class="doctools_definitions">
<dt><a name="6"><b class="cmd">::tie::register</b> <i class="arg">dsclasscmd</i> <b class="const">as</b> <i class="arg">dstype</i></a></dt>
<dd><p>Using this command causes the tie framework to remember the class
command <i class="arg">dsclasscmd</i> of a <span class="sectref"><a href="#subsection5">data source class</a></span> under the
type name <i class="arg">dstype</i>.</p>
<p>After the call the argument <i class="arg">dstype</i> of the basic user command
<b class="cmd">::tie::tie</b> will accept <i class="arg">dstype</i> as a type name and translate
it internally to the appropriate class command for the creation of
<span class="sectref"><a href="#subsection3">data source objects</a></span> for the new <i class="term"><a href="../../../../index.html#key365">data source</a></i>.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">DATA SOURCE CLASS</a></h3>
<p>Each data source class is represented by a single command, also called
the <i class="term">class command</i>, or <i class="term">object creation command</i>. Its
syntax is</p>
<dl class="doctools_definitions">
<dt><a name="7"><b class="cmd">dsclasscmd</b> <i class="arg">objname</i> <span class="opt">?<i class="arg">dsname</i>...?</span></a></dt>
<dd><p>The first argument of the class command is the name of the
<i class="term">data source object</i> to create.
The framework itself will always supply the string <b class="const">%AUTO%</b>, to
signal that the class command has to generate not only the object, but
the object name as well.</p>
<p>This is followed by a series of arguments identifying the data source
the new object is for. These are the same <i class="arg">dsname</i> arguments which
are given to the basic user command <b class="cmd">::tie::tie</b>. Their actual
meaning is dependent on the <i class="term">data source class</i>.</p>
<p>The result of the class command has to be the fully-qualified name of
the new <i class="term">data source object</i>, i.e. the name of the
<i class="term">object command</i>.
The interface this command has to follow is described in the section
<span class="sectref"><a href="#subsection6">DATA SOURCE OBJECT API</a></span></p></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">DATA SOURCE OBJECT API</a></h3>
<p>Please read the section <span class="sectref"><a href="#subsection5">DATA SOURCE CLASS</a></span> first, to know
how to generate new <i class="term">object commands</i>.</p>
<p>Each <i class="term">object command</i> for a <i class="term"><a href="../../../../index.html#key365">data source</a></i> object has to
provide at least the methods listed below for proper inter-operation
with the tie framework. Note that the names of most of the methods
match the subcommands of the builtin <b class="cmd"><a href="../../../../index.html#key37">array</a></b> command.</p>
<dl class="doctools_definitions">
<dt><a name="8"><b class="cmd">ds</b> <b class="method">destroy</b></a></dt>
<dd><p>This method is called when the object <b class="cmd">ds</b> is destroyed. It now
has to release all its internal resources associated with the external
data source.</p></dd>
<dt><a name="9"><b class="cmd">ds</b> <b class="method">names</b></a></dt>
<dd><p>This command has to return a list containing the names of all keys
found in the <i class="term"><a href="../../../../index.html#key365">data source</a></i> the object talks to. This is
equivalent to <b class="cmd">array names</b>.</p></dd>
<dt><a name="10"><b class="cmd">ds</b> <b class="method">size</b></a></dt>
<dd><p>This command has to return an integer number specifying the number of
keys found in the <i class="term"><a href="../../../../index.html#key365">data source</a></i> the object talks to. This is
equivalent to <b class="cmd">array size</b>.</p></dd>
<dt><a name="11"><b class="cmd">ds</b> <b class="method">get</b></a></dt>
<dd><p>This command has to return a dictionary containing the data found in
the <i class="term"><a href="../../../../index.html#key365">data source</a></i> the object talks to. This is equivalent to
<b class="cmd">array get</b>.</p></dd>
<dt><a name="12"><b class="cmd">ds</b> <b class="method">set</b> <i class="arg">dict</i></a></dt>
<dd><p>This command takes a dictionary and adds its contents to the data
source the object talks to. This is equivalent to <b class="cmd">array set</b>.</p></dd>
<dt><a name="13"><b class="cmd">ds</b> <b class="method">unset</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This command takes a pattern and removes all elements whose keys
matching it from the <i class="term"><a href="../../../../index.html#key365">data source</a></i>. If no pattern is specified
it defaults to <b class="const">*</b>, causing the removal of all elements. This
is nearly equivalent to <b class="cmd">array unset</b>.</p></dd>
<dt><a name="14"><b class="cmd">ds</b> <b class="method">setv</b> <i class="arg">index</i> <i class="arg">value</i></a></dt>
<dd><p>This command has to save the <i class="arg">value</i> in the <i class="term"><a href="../../../../index.html#key365">data source</a></i>
the object talks to, under the key <i class="arg">index</i>.</p>
<p>The result of the command is ignored. If an error is thrown then this
error will show up as error of the set operation which caused the
method call.</p></dd>
<dt><a name="15"><b class="cmd">ds</b> <b class="method">unsetv</b> <i class="arg">index</i></a></dt>
<dd><p>This command has to remove the value under the key <i class="arg">index</i> from
the <i class="term"><a href="../../../../index.html#key365">data source</a></i> the object talks to.</p>
<p>The result of the command is ignored. If an error is thrown then this
error will show up as error of the unset operation which caused the
method call.</p></dd>
<dt><a name="16"><b class="cmd">ds</b> <b class="method">getv</b> <i class="arg">index</i></a></dt>
<dd><p>This command has to return the value for the key <i class="arg">index</i> in the
<i class="term"><a href="../../../../index.html#key365">data source</a></i> the object talks to.</p></dd>
</dl>
<p>And here a small table comparing the <i class="term"><a href="../../../../index.html#key365">data source</a></i> methods to
the regular Tcl commands for accessing an array.</p>
<pre class="doctools_example">
        Regular Tcl             Data source
        -----------             -----------
        array names a           ds names
        array size  a           ds size
        array get   a           ds get
        array set   a dict      ds set   dict
        array unset a pattern   ds unset ?pattern?
        -----------             -----------
        set a($idx) $val        ds setv   idx val
        unset a($idx)           ds unsetv idx
        $a($idx)                ds getv   idx
        -----------             -----------
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key37">array</a>, <a href="../../../../index.html#key34">database</a>, <a href="../../../../index.html#key31">file</a>, <a href="../../../../index.html#key36">metakit</a>, <a href="../../../../index.html#key33">persistence</a>, <a href="../../../../index.html#key35">tie</a>, <a href="../../../../index.html#key32">untie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tie/tie_std.html.























































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<div class='fossil-doc' data-title='tie - Tcl Data Structures'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tie(n) 1.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tie - Array persistence, standard data sources</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">tie::std::log <span class="opt">?1.0?</span></b></li>
<li>package require <b class="pkgname">tie::std::array <span class="opt">?1.0?</span></b></li>
<li>package require <b class="pkgname">tie::std::rarray <span class="opt">?1.0.1?</span></b></li>
<li>package require <b class="pkgname">tie::std::file <span class="opt">?1.0.4?</span></b></li>
<li>package require <b class="pkgname">tie::std::growfile <span class="opt">?1.0?</span></b></li>
<li>package require <b class="pkgname">tie::std::dsource <span class="opt">?1.0?</span></b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The packages listed as requirements for this document are internal
packages providing the standard data sources of package <b class="package"><a href="tie.html">tie</a></b>,
as described in section <i class="term">STANDARD DATA SOURCE TYPES</i> of
<b class="package"><a href="tie.html">tie</a></b>'s documentation.</p>
<p>They are automatically loaded and registered by <b class="package"><a href="tie.html">tie</a></b> when it
itself is requested, and as such there is no need to request them on
their own, although it is possible to do so.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key37">array</a>, <a href="../../../../index.html#key34">database</a>, <a href="../../../../index.html#key31">file</a>, <a href="../../../../index.html#key36">metakit</a>, <a href="../../../../index.html#key33">persistence</a>, <a href="../../../../index.html#key35">tie</a>, <a href="../../../../index.html#key32">untie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tiff/tiff.html.



























































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<div class='fossil-doc' data-title='tiff - TIFF image manipulation'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tiff(n) 0.2.1 tcllib &quot;TIFF image manipulation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tiff - TIFF reading, writing, and querying and manipulation of meta data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">VARIABLES</a></li>
<li class="doctools_section"><a href="#section4">LIMITATIONS</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">tiff <span class="opt">?0.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tiff::isTIFF</b> <i class="arg">file</i></a></li>
<li><a href="#2"><b class="cmd">::tiff::byteOrder</b> <i class="arg">file</i></a></li>
<li><a href="#3"><b class="cmd">::tiff::numImages</b> <i class="arg">file</i></a></li>
<li><a href="#4"><b class="cmd">::tiff::dimensions</b> <i class="arg">file</i> <span class="opt">?image?</span></a></li>
<li><a href="#5"><b class="cmd">::tiff::imageInfo</b> <i class="arg">file</i> <span class="opt">?image?</span></a></li>
<li><a href="#6"><b class="cmd">::tiff::entries</b> <i class="arg">file</i> <span class="opt">?image?</span></a></li>
<li><a href="#7"><b class="cmd">::tiff::getEntry</b> <i class="arg">file</i> <i class="arg">entry</i> <span class="opt">?image?</span></a></li>
<li><a href="#8"><b class="cmd">::tiff::addEntry</b> <i class="arg">file</i> <i class="arg">entry</i> <span class="opt">?image?</span></a></li>
<li><a href="#9"><b class="cmd">::tiff::deleteEntry</b> <i class="arg">file</i> <i class="arg">entry</i> <span class="opt">?image?</span></a></li>
<li><a href="#10"><b class="cmd">::tiff::getImage</b> <i class="arg">file</i> <span class="opt">?image?</span></a></li>
<li><a href="#11"><b class="cmd">::tiff::writeImage</b> <i class="arg">image</i> <i class="arg">file</i> <span class="opt">?entry?</span></a></li>
<li><a href="#12"><b class="cmd">::tiff::nametotag</b> <i class="arg">names</i></a></li>
<li><a href="#13"><b class="cmd">::tiff::tagtoname</b> <i class="arg">tags</i></a></li>
<li><a href="#14"><b class="cmd">::tiff::debug</b> <i class="arg">file</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to query, modify, read, and write TIFF images.
TIFF stands for <i class="term">Tagged Image File Format</i> and is a standard
for lossless storage of photographical images and associated metadata.
It is specified at <a href="http://partners.adobe.com/public/developer/tiff/index.html">http://partners.adobe.com/public/developer/tiff/index.html</a>.</p>
<p>Multiple images may be stored in a single TIFF file. The <span class="opt">?image?</span> options to the functions
in this package are for accessing images other than the first. Data in a TIFF image is
stored as a series of tags having a numerical value, which are represented in either a 4 digit
hexadecimal format or a string name. For a reference on defined tags and their meanings see
<a href="http://www.awaresystems.be/imaging/tiff/tifftags.html">http://www.awaresystems.be/imaging/tiff/tifftags.html</a></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tiff::isTIFF</b> <i class="arg">file</i></a></dt>
<dd><p>Returns a boolean value indicating if <i class="arg">file</i> is a
TIFF image.</p></dd>
<dt><a name="2"><b class="cmd">::tiff::byteOrder</b> <i class="arg">file</i></a></dt>
<dd><p>Returns either <b class="const">big</b> or <b class="const">little</b>.
Throws an error if <i class="arg">file</i> is not a TIFF image.</p></dd>
<dt><a name="3"><b class="cmd">::tiff::numImages</b> <i class="arg">file</i></a></dt>
<dd><p>Returns the number of images in <i class="arg">file</i>.
Throws an error if <i class="arg">file</i> is not a TIFF image.</p></dd>
<dt><a name="4"><b class="cmd">::tiff::dimensions</b> <i class="arg">file</i> <span class="opt">?image?</span></a></dt>
<dd><p>Returns the dimensions of image number <span class="opt">?image?</span> in <i class="arg">file</i> as a list of the
horizontal and vertical pixel count.
Throws an error if <i class="arg">file</i> is not a TIFF image.</p></dd>
<dt><a name="5"><b class="cmd">::tiff::imageInfo</b> <i class="arg">file</i> <span class="opt">?image?</span></a></dt>
<dd><p>Returns a dictionary with keys <b class="const">ImageWidth</b>, <b class="const">ImageLength</b>,
<b class="const">BitsPerSample</b>, <b class="const">Compression</b>, <b class="const">PhotometricInterpretation</b>,
<b class="const">ImageDescription</b>, <b class="const">Orientation</b>, <b class="const">XResolution</b>,
<b class="const">YResolution</b>, <b class="const">ResolutionUnit</b>, <b class="const">DateTime</b>, <b class="const">Artist</b>,
and <b class="const">HostComputer</b>. The values are the associated properties of
the TIFF <span class="opt">?image?</span> in <i class="arg">file</i>. Values may be empty if the associated tag is not
present in the file.</p>
<pre class="doctools_example">
    puts [::tiff::imageInfo photo.tif]
    ImageWidth 686 ImageLength 1024 BitsPerSample {8 8 8} Compression 1
    PhotometricInterpretation 2 ImageDescription {} Orientation 1
    XResolution 170.667 YResolution 170.667 ResolutionUnit 2 DateTime {2005:12:28 19:44:45}
    Artist {} HostComputer {}
</pre>
<p>There is nothing special about these tags, this is simply a convience procedure which calls
<b class="cmd">getEntry</b> with common entries.
Throws an error if <i class="arg">file</i> is not a TIFF image.</p></dd>
<dt><a name="6"><b class="cmd">::tiff::entries</b> <i class="arg">file</i> <span class="opt">?image?</span></a></dt>
<dd><p>Returns a list of all entries in the given <i class="arg">file</i> and <span class="opt">?image?</span>
in hexadecimal format.
Throws an error if <i class="arg">file</i> is not a TIFF image.</p></dd>
<dt><a name="7"><b class="cmd">::tiff::getEntry</b> <i class="arg">file</i> <i class="arg">entry</i> <span class="opt">?image?</span></a></dt>
<dd><p>Returns the value of <i class="arg">entry</i> from image <span class="opt">?image?</span> in the TIFF <i class="arg">file</i>.
<i class="arg">entry</i> may be a list of multiple entries. If an entry does not exist, an
empty string is returned</p>
<pre class="doctools_example">
    set data [::tiff::getEntry photo.tif {0131 0132}]
    puts &quot;file was written at [lindex $data 0] with software [lindex $data 1]&quot;
</pre>
<p>Throws an error if <i class="arg">file</i> is not a TIFF image.</p></dd>
<dt><a name="8"><b class="cmd">::tiff::addEntry</b> <i class="arg">file</i> <i class="arg">entry</i> <span class="opt">?image?</span></a></dt>
<dd><p>Adds the specified entries to the image named by <span class="opt">?image?</span> (default 0), or optionally <b class="const">all</b>.
<i class="arg">entry</i> must be a list where each element is a list of tag, type, and value. If a tag already
exists, it is overwritten.</p>
<pre class="doctools_example">
    ::tiff::addEntry photo.tif {{010e 2 &quot;an example photo&quot;} {013b 2 &quot;Aaron F&quot;}}
</pre>
<p>The data types are defined as follows</p>
<dl class="doctools_definitions">
<dt><b class="const">1</b></dt>
<dd><p>BYTE (8 bit unsigned integer)</p></dd>
<dt><b class="const">2</b></dt>
<dd><p>ASCII</p></dd>
<dt><b class="const">3</b></dt>
<dd><p>SHORT (16 bit unsigned integer)</p></dd>
<dt><b class="const">4</b></dt>
<dd><p>LONG (32 bit unsigned integer)</p></dd>
<dt><b class="const">5</b></dt>
<dd><p>RATIONAL</p></dd>
<dt><b class="const">6</b></dt>
<dd><p>SBYTE (8 bit signed byte)</p></dd>
<dt><b class="const">7</b></dt>
<dd><p>UNDEFINED (uninterpreted binary data)</p></dd>
<dt><b class="const">8</b></dt>
<dd><p>SSHORT (signed 16 bit integer)</p></dd>
<dt><b class="const">9</b></dt>
<dd><p>SLONG (signed 32 bit integer)</p></dd>
<dt><b class="const">10</b></dt>
<dd><p>SRATIONAL</p></dd>
<dt><b class="const">11</b></dt>
<dd><p>FLOAT (32 bit floating point number)</p></dd>
<dt><b class="const">12</b></dt>
<dd><p>DOUBLE (64 bit floating point number)</p></dd>
</dl>
<p>Throws an error if <i class="arg">file</i> is not a TIFF image.</p></dd>
<dt><a name="9"><b class="cmd">::tiff::deleteEntry</b> <i class="arg">file</i> <i class="arg">entry</i> <span class="opt">?image?</span></a></dt>
<dd><p>Deletes the specified entries from the image named by <span class="opt">?image?</span> (default 0), or optionally <b class="const">all</b>.
Throws an error if <i class="arg">file</i> is not a TIFF image.</p></dd>
<dt><a name="10"><b class="cmd">::tiff::getImage</b> <i class="arg">file</i> <span class="opt">?image?</span></a></dt>
<dd><p>Returns the name of a Tk image containing the image at index <span class="opt">?image?</span> from <i class="arg">file</i>
Throws an error if <i class="arg">file</i> is not a TIFF image, or if image is an unsupported format.
Supported formats are uncompressed 24 bit RGB and uncompressed 8 bit palette.</p></dd>
<dt><a name="11"><b class="cmd">::tiff::writeImage</b> <i class="arg">image</i> <i class="arg">file</i> <span class="opt">?entry?</span></a></dt>
<dd><p>Writes the contents of the Tk image <i class="arg">image</i> to a tiff file <i class="arg">file</i>. Files are
written in the 24 bit uncompressed format, with big endian byte order. Additional entries
to be added to the image may be specified, in the same format as <b class="cmd">tiff::addEntry</b></p></dd>
<dt><a name="12"><b class="cmd">::tiff::nametotag</b> <i class="arg">names</i></a></dt>
<dd><p>Returns a list with <i class="arg">names</i> translated from string to 4 digit format. 4 digit names
in the input are passed through unchanged. Strings without a defined tag name will throw
an error.</p></dd>
<dt><a name="13"><b class="cmd">::tiff::tagtoname</b> <i class="arg">tags</i></a></dt>
<dd><p>Returns a list with <i class="arg">tags</i> translated from 4 digit to string format. If a tag does
not have a defined name it is passed through unchanged.</p></dd>
<dt><a name="14"><b class="cmd">::tiff::debug</b> <i class="arg">file</i></a></dt>
<dd><p>Prints everything we know about the given file in a nice format.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">VARIABLES</a></h2>
<p>The mapping of 4 digit tag names to string names uses the array ::tiff::tiff_tags. The reverse
mapping uses the array ::tiff::tiff_sgat.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">LIMITATIONS</a></h2>
<ol class="doctools_enumerated">
<li><p>Cannot write exif ifd</p></li>
<li><p>Reading limited to uncompressed 8 bit rgb and 8 bit palletized images</p></li>
<li><p>Writing limited to uncompressed 8 bit rgb</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tiff</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key121">image</a>, <a href="../../../../index.html#key120">tif</a>, <a href="../../../../index.html#key119">tiff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006, Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tool/meta.html.



































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273

<div class='fossil-doc' data-title='oo::util - Utility commands for TclOO'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oo::util(n) 1.2.2 tcllib &quot;Utility commands for TclOO&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oo::util - Utility commands for TclOO</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">AUTHORS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">oo::util <span class="opt">?1.2.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">mymethod</b> <i class="arg">method</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">classmethod</b> <i class="arg">name</i> <i class="arg">arguments</i> <i class="arg">body</i></a></li>
<li><a href="#3"><b class="cmd">classvariable</b> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#4"><b class="cmd">link</b> <i class="arg">method</i>...</a></li>
<li><a href="#5"><b class="cmd">link</b> {<i class="arg">alias</i> <i class="arg">method</i>}...</a></li>
<li><a href="#6"><b class="cmd">ooutil::singleton</b> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a convenience command for the easy specification
of instance methods as callback commands, like timers, file events, Tk
bindings, etc.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">mymethod</b> <i class="arg">method</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command is available within instance methods. It takes a method
name and, possibly, arguments for the method and returns a command
prefix which, when executed, will invoke the named method of the
object we are in, with the provided arguments, and any others supplied
at the time of actual invokation.</p>
<p>Note: The command is equivalent to and named after the command
provided by the OO package <b class="package"><a href="../snit/snit.html">snit</a></b> for the same purpose.</p></dd>
<dt><a name="2"><b class="cmd">classmethod</b> <i class="arg">name</i> <i class="arg">arguments</i> <i class="arg">body</i></a></dt>
<dd><p>This command is available within class definitions. It takes a method
name and, possibly, arguments for the method and creates a method on the
class, available to a user of the class and of derived classes.</p>
<p>Note: The command is equivalent to the command <b class="cmd">typemethod</b>
provided by the OO package <b class="package"><a href="../snit/snit.html">snit</a></b> for the same purpose.</p>
<p>Example</p>
<pre class="doctools_example">
oo::class create ActiveRecord {
    classmethod find args { puts &quot;[self] called with arguments: $args&quot; }
}
oo::class create Table {
    superclass ActiveRecord
}
puts [Table find foo bar]
# ======
# which will write
# ======
# ::Table called with arguments: foo bar
</pre>
</dd>
<dt><a name="3"><b class="cmd">classvariable</b> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command is available within instance methods. It takes a series
of variable names and makes them available in the method's scope. The
originating scope for the variables is the class (instance) the object
instance belongs to. In other words, the referenced variables are shared
between all instances of their class.</p>
<p>Note: The command is roughly equivalent to the command
<b class="cmd">typevariable</b> provided by the OO package <b class="package"><a href="../snit/snit.html">snit</a></b> for the
same purpose. The difference is that it cannot be used in the class
definition itself.</p>
<p>Example:</p>
<pre class="doctools_example">
% oo::class create Foo {
    method bar {z} {
        classvariable x y
        return [incr x $z],[incr y]
    }
}
::Foo
% Foo create a
::a
% Foo create b
::b
% a bar 2
2,1
% a bar 3
5,2
% b bar 7
12,3
% b bar -1
11,4
% a bar 0
11,5
</pre>
</dd>
<dt><a name="4"><b class="cmd">link</b> <i class="arg">method</i>...</a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">link</b> {<i class="arg">alias</i> <i class="arg">method</i>}...</a></dt>
<dd><p>This command is available within instance methods. It takes a list of
method names and/or pairs of alias- and method-name and makes the
named methods available to all instance methods without requiring the
<b class="cmd">my</b> command.</p>
<p>The alias name under which the method becomes available defaults
to the method name, except where explicitly specified through an
alias/method pair.</p>
<p>Examples:</p>
<pre class="doctools_example">
    link foo
    # The method foo is now directly accessible as foo instead of my foo.
    link {bar foo}
    # The method foo is now directly accessible as bar.
    link a b c
    # The methods a, b, and c all become directly acessible under their
    # own names.
</pre>
<p>The main use of this command is expected to be in instance constructors,
for convenience, or to set up some methods for use in a mini DSL.</p></dd>
<dt><a name="6"><b class="cmd">ooutil::singleton</b> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command is a meta-class, i.e. a variant of the builtin
<b class="cmd">oo::class</b> which ensures that it creates only a single
instance of the classes defined with it.</p>
<p>Syntax and results are like for <b class="cmd">oo::class</b>.</p>
<p>Example:</p>
<pre class="doctools_example">
% oo::class create example {
   self mixin singleton
   method foo {} {self}
}
::example
% [example new] foo
::oo::Obj22
% [example new] foo
::oo::Obj22
</pre>
</dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AUTHORS</a></h2>
<p>Donal Fellows, Andreas Kupries</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>oo::util</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../snit/snit.html">snit(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key757">TclOO</a>, <a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key758">class methods</a>, <a href="../../../../index.html#key761">class variables</a>, <a href="../../../../index.html#key595">command prefix</a>, <a href="../../../../index.html#key597">currying</a>, <a href="../../../../index.html#key756">method reference</a>, <a href="../../../../index.html#key760">my method</a>, <a href="../../../../index.html#key759">singleton</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011-2015 Andreas Kupries, BSD licensed</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tool/tool.html.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343

<div class='fossil-doc' data-title='tool - Standardized OO Framework for development'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tool(n) 0.4.2 tcllib &quot;Standardized OO Framework for development&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tool - Dictionary Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Keywords</a></li>
<li class="doctools_section"><a href="#section3">Public Object Methods</a></li>
<li class="doctools_section"><a href="#section4">Private Object Methods</a></li>
<li class="doctools_section"><a href="#section5">AUTHORS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">sha1</b></li>
<li>package require <b class="pkgname">dicttool</b></li>
<li>package require <b class="pkgname">oo::meta</b></li>
<li>package require <b class="pkgname">oo::dialect</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1">tool::define <b class="cmd">class_method</b> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#2">tool::define <b class="cmd"><a href="../../../../index.html#key37">array</a></b> <i class="arg">name</i> <i class="arg">contents</i></a></li>
<li><a href="#3">tool::define <b class="cmd">array_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></li>
<li><a href="#4">tool::define <b class="cmd">dict_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></li>
<li><a href="#5">tool::define <b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">methodname</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#6">tool::define <b class="cmd">option</b> <i class="arg">name</i> <i class="arg">dictopts</i></a></li>
<li><a href="#7">tool::define <b class="cmd">property</b> <span class="opt">?branch?</span> <i class="arg">field</i> <i class="arg">value</i></a></li>
<li><a href="#8">tool::define <b class="cmd">variable</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#9"><em>object</em> <b class="cmd">cget</b> <i class="arg">option</i></a></li>
<li><a href="#10"><em>object</em> <b class="cmd">configure</b> <span class="opt">?keyvaluelist?</span></a></li>
<li><a href="#11"><em>object</em> <b class="cmd">configure</b> <i class="arg">field</i> <i class="arg">value</i> <span class="opt">?field?</span> <span class="opt">?value?</span> <span class="opt">?...?</span></a></li>
<li><a href="#12"><em>object</em> <b class="cmd">configurelist</b> <span class="opt">?keyvaluelist?</span></a></li>
<li><a href="#13"><em>object</em> <b class="cmd">forward</b> <i class="arg">stub</i> <i class="arg">forward</i></a></li>
<li><a href="#14"><em>object</em> <b class="cmd">graft</b> <i class="arg">stub</i> <i class="arg">forward</i></a></li>
<li><a href="#15"><em>object</em> <b class="cmd">InitializePublic</b></a></li>
<li><a href="#16"><em>object</em> <b class="cmd">Eval_Script</b> <span class="opt">?script?</span></a></li>
<li><a href="#17"><em>object</em> <b class="cmd">Option_Default</b> <i class="arg">field</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This module implements the Tcl Object Oriented Library framework, or <em>TOOL</em>. It is
intended to be a general purpose framework that is useable in its own right, and
easily extensible.</p>
<p>TOOL defines a metaclass with provides several additional keywords to the TclOO
description langauge, default behaviors for its consituent objects, and
top-down integration with the capabilities provided by the <b class="package">oo::meta</b> package.</p>
<p>The TOOL metaclass was build with the <b class="package">oo::dialect</b> package, and thus can
be used as the basis for additional metaclasses. As a metaclass, TOOL has it's own
&quot;class&quot; class, &quot;object&quot; class, and define namespace.</p>
<pre class="doctools_example">
package require tool
# tool::class workds just like oo::class
tool::class create myclass {
}
# tool::define works just like oo::define
tool::define myclass method noop {} {}
# tool::define and tool::class understand additional keywords
tool::define myclass array_ensemble mysettings mysettings {}
# And tool interoperates with oo::define
oo::define myclass method do_something {} { return something }
# TOOL and TclOO objects are interchangeable
oo::class create myooclass {
  superclass myclass
}
</pre>
<p>Several manual pages go into more detail about specific keywords and methods.</p>
<dl class="doctools_definitions">
<dt><b class="package">tool::array_ensemble</b></dt>
<dd></dd>
<dt><b class="package"><a href="tool_dict_ensemble.html">tool::dict_ensemble</a></b></dt>
<dd></dd>
<dt><b class="package">tool::method_ensemble</b></dt>
<dd></dd>
<dt><b class="package">tool::object</b></dt>
<dd></dd>
<dt><b class="package">tool::option_handling</b></dt>
<dd></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Keywords</a></h2>
<p>TOOL adds new (or modifies) keywords used in the definitions of classes. However,
the new keywords are only available via calls to <em>tool::class create</em> or <em>tool::define</em></p>
<dl class="doctools_definitions">
<dt><a name="1">tool::define <b class="cmd">class_method</b> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Defines a method for the class object itself. This method will be passed on to descendents of the class,
unlike <b class="cmd">self method</b>.</p></dd>
<dt><a name="2">tool::define <b class="cmd"><a href="../../../../index.html#key37">array</a></b> <i class="arg">name</i> <i class="arg">contents</i></a></dt>
<dd><p>Declares a variable <i class="arg">name</i> which will be initialized as an array, populated with <i class="arg">contents</i> for objects of this class, as well as any
objects for classes which are descendents of this class.</p></dd>
<dt><a name="3">tool::define <b class="cmd">array_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></dt>
<dd><p>Declares a method ensemble <i class="arg">methodname</i> which will control access to variable
<i class="arg">varname</i>. Cases are a key/value list of method names and bodies which will be
overlaid on top of the standard template. See <b class="package">tool::array_ensemble</b>.</p>
<p>One method name is reserved: <b class="cmd">initialize</b>. <b class="cmd">initialize</b> Declares the initial values to be populated in the array, as a key/value list,
and will not be expressed as a method for the ensemble.</p></dd>
<dt><a name="4">tool::define <b class="cmd">dict_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></dt>
<dd><p>Declares a method ensemble <i class="arg">methodname</i> which will control access to variable
<i class="arg">varname</i>. Cases are a key/value list of method names and bodies which will be
overlaid on top of the standard template. See <b class="package"><a href="tool_dict_ensemble.html">tool::dict_ensemble</a></b>.</p>
<p>One method name is reserved: <b class="cmd">initialize</b>. <b class="cmd">initialize</b> Declares the initial values to be populated in the array, as a key/value list,
and will not be expressed as a method for the ensemble.</p></dd>
<dt><a name="5">tool::define <b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">methodname</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>If <i class="arg">methodname</i> contains ::, the method is considered to be
part of a method ensemble. See <b class="package">tool::method_ensembles</b>. Otherwise
this command behaves exactly like the standard <b class="namespace">oo::define</b> <b class="cmd"><a href="../../../../index.html#key372">method</a></b>
command.</p></dd>
<dt><a name="6">tool::define <b class="cmd">option</b> <i class="arg">name</i> <i class="arg">dictopts</i></a></dt>
<dd><p>Declares an option. <i class="arg">dictopts</i> is a key/value list defining parameters for the option. See <b class="package">tool::option_handling</b>.</p>
<pre class="doctools_example">
tool::class create myclass {
  option color {
    post-command: {puts [list %self%'s %field% is now %value%]}
    default: green
  }
}
myclass create foo
foo configure color purple
&gt; foo's color is now purple
</pre>
</dd>
<dt><a name="7">tool::define <b class="cmd">property</b> <span class="opt">?branch?</span> <i class="arg">field</i> <i class="arg">value</i></a></dt>
<dd><p>Defines a new leaf in the class metadata tree. With no branch, the
leaf will appear in the <em>const</em> section, accessible by either the
object's <b class="cmd">property</b> method, or via <b class="cmd">oo::meta::info</b> <em>class</em> <b class="cmd">get const</b> <em>field</em>:</p></dd>
<dt><a name="8">tool::define <b class="cmd">variable</b> <i class="arg">name</i> <i class="arg">value</i></a></dt>
<dd><p>Declares a variable <i class="arg">name</i> which will be initialized with the value <i class="arg">value</i> for objects of this class, as well as any
objects for classes which are descendents of this class.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Public Object Methods</a></h2>
<p>The TOOL object mother of all classes defines several methods to enforces consistent
behavior throughout the framework.</p>
<dl class="doctools_definitions">
<dt><a name="9"><em>object</em> <b class="cmd">cget</b> <i class="arg">option</i></a></dt>
<dd><p>Return the value of this object's option <i class="arg">option</i>. If the <b class="cmd">property options_strict</b> is true
for this class, calling an option which was not declared by the <b class="cmd">option</b> keyword will throw
an error. In all other cases if the value is present in the object's <em>options</em> array that
value is returned. If it does not exist, the object will attempt to retrieve a property of the same
name.</p></dd>
<dt><a name="10"><em>object</em> <b class="cmd">configure</b> <span class="opt">?keyvaluelist?</span></a></dt>
<dd></dd>
<dt><a name="11"><em>object</em> <b class="cmd">configure</b> <i class="arg">field</i> <i class="arg">value</i> <span class="opt">?field?</span> <span class="opt">?value?</span> <span class="opt">?...?</span></a></dt>
<dd><p>This command will inject new values into the objects <em>options</em> array, according to the rules
as set forth by the option descriptions. See <b class="package">tool::option_handling</b> for details.
<b class="cmd">configure</b> will strip leading -'s off of field names, allowing it to behave in a quasi-backward
compatible manner to tk options.</p></dd>
<dt><a name="12"><em>object</em> <b class="cmd">configurelist</b> <span class="opt">?keyvaluelist?</span></a></dt>
<dd><p>This command will inject new values into the objects <em>options</em> array, according to the rules
as set forth by the option descriptions. This command will perform validation and alternate storage
rules. It will not invoke trigger rules. See <b class="package">tool::option_handling</b> for details.</p></dd>
<dt><a name="13"><em>object</em> <b class="cmd">forward</b> <i class="arg">stub</i> <i class="arg">forward</i></a></dt>
<dd><p>A passthrough to <b class="cmd">oo:objdefine [self] forward</b></p></dd>
<dt><a name="14"><em>object</em> <b class="cmd">graft</b> <i class="arg">stub</i> <i class="arg">forward</i></a></dt>
<dd><p>Delegates the <i class="arg">&lt;stub&gt;</i> method to the object or command designated by <i class="arg">forward</i></p>
<pre class="doctools_example">
tool::object create A
tool::object create B
A graft buddy B
A configure color red
B configure color blue
A cget color
&gt; red
A &lt;buddy&gt; cget color
&gt; blue
</pre>
</dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Private Object Methods</a></h2>
<dl class="doctools_definitions">
<dt><a name="15"><em>object</em> <b class="cmd">InitializePublic</b></a></dt>
<dd><p>Consults the metadata for the class to ensure every array, option, and variable
which has been declared but not initialized is initialized with the default value.
This method is called by the constructor and the morph method. It is safe to
invoke multiple times.</p></dd>
<dt><a name="16"><em>object</em> <b class="cmd">Eval_Script</b> <span class="opt">?script?</span></a></dt>
<dd><p>Executes a block of text within the namespace of the object. Lines that
begin with a # are ignored as comments. Commands
that begin with :: are interpreted as calling a global command. All other
Tcl commands that lack a &quot;my&quot; prefix are given one, to allow the script
to exercise internal methods. This method is intended for configuration scripts,
where the object's methods are intepreting a domain specific language.</p>
<pre class="doctools_example">
tool::class myclass {
  constructor script {
    my Eval_Script $script
  }
  method node {nodename info} {
    my variable node
    dict set node $nodename $info
  }
  method get {args} {
    my variable node
    return [dict get $node $args]
  }
}
myclass create movies {
  # This block of code is executed by the object
  node {The Day the Earth Stood Still} {
    date: 1952
    characters: {GORT Klatoo}
  }
}
movies get {The Day the Earth Stood Still} date:
&gt; 1952
</pre>
</dd>
<dt><a name="17"><em>object</em> <b class="cmd">Option_Default</b> <i class="arg">field</i></a></dt>
<dd><p>Computes the default value for an option. See <b class="package">tool::option_handling</b>.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Sean Woods</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tool</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key776">TOOL</a>, <a href="../../../../index.html#key757">TclOO</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/tool/tool_dict_ensemble.html.



































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161

<div class='fossil-doc' data-title='tool::dict_ensemble - Standardized OO Framework for development'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tool::dict_ensemble(n) 0.4.2 tcllib &quot;Standardized OO Framework for development&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tool::dict_ensemble - Dictionary Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">AUTHORS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">tool <span class="opt">?0.4.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><em>object</em> <i class="arg">ensemble</i> <b class="cmd">add</b> <i class="arg">field</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">dict_ensemble</b> command is a keyword added by <b class="package"><a href="tool.html">tool</a></b>. It defines
a public variable (stored as a dict), and an access function to manipulated and
access the values stored in that dict.</p>
<dl class="doctools_definitions">
<dt><a name="1"><em>object</em> <i class="arg">ensemble</i> <b class="cmd">add</b> <i class="arg">field</i></a></dt>
<dd><p>] <i class="arg">value</i> <i class="arg">value ...</i>]
Adds elements to a list maintained with the <i class="arg">field</i> leaf of the dict maintained
my this ensemble.
Declares a variable <i class="arg">name</i> which will be initialized as an array, populated with <i class="arg">contents</i> for objects of this class, as well as any
objects for classes which are descendents of this class.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">AUTHORS</a></h2>
<p>Sean Woods</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tool</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key776">TOOL</a>, <a href="../../../../index.html#key757">TclOO</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/transfer/connect.html.

























































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332

<div class='fossil-doc' data-title='transfer::connect - Data transfer facilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::connect(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::connect - Connection setup</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
<li class="doctools_subsection"><a href="#subsection4">Options</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Secure connections</a></li>
<li class="doctools_section"><a href="#section4">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit <span class="opt">?1.0?</span></b></li>
<li>package require <b class="pkgname">transfer::connect <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">transfer::connect</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">connect</b> <i class="arg">command</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects holding enough information to enable
them to either actively connect to a counterpart, or to passively wait
for a connection from said counterpart.
I.e. any object created by this packages is always in one of two
complementary modes, called <i class="term"><a href="../../../../index.html#key613">active</a></i> (the object initiates the
connection) and <i class="term"><a href="../../../../index.html#key614">passive</a></i> (the object receives the connection).</p>
<p>Of the two objects in a connecting pair one has to be configured for
<i class="term"><a href="../../../../index.html#key613">active</a></i> mode, and the other then has to be configured for
<i class="term"><a href="../../../../index.html#key614">passive</a></i> mode. This establishes which of the two partners
connects to whom (the <i class="term"><a href="../../../../index.html#key613">active</a></i> to the other), or, who is waiting
on whom (the <i class="term"><a href="../../../../index.html#key614">passive</a></i> on the other).
Note that this is completely independent of the direction of any data
transmission using the connection after it has been established.
An active object can, after establishing the connection, either
transmit or receive data. Equivalently the passive object can do the
same after the waiting for its partner has ended.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::connect</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new connection object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::transfer::connect</b> command have the
following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object.
This is safe to do for an <i class="term"><a href="../../../../index.html#key613">active</a></i> object when a connection has
been started, as the completion callback is synchronous.
For a <i class="term"><a href="../../../../index.html#key614">passive</a></i> object currently waiting for its partner to
establish the connection however this is not safe and will cause
errors later on, when the connection setup completes and tries to
access the now missing data structures of the destroyed object.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">connect</b> <i class="arg">command</i></a></dt>
<dd><p>This method starts the connection setup per the configuration of the
object. When the connection is established the callback <i class="arg">command</i>
will be invoked with one additional argument, the channel handle of
the socket over which data can be transfered.</p>
<p>The detailed behaviour of the method depends on the configured
mode.</p>
<dl class="doctools_definitions">
<dt><i class="term"><a href="../../../../index.html#key613">active</a></i></dt>
<dd><p>The connection setup is done synchronously. The object waits until the
connection is established. The method returns the empty string as its
result.</p></dd>
<dt><i class="term"><a href="../../../../index.html#key614">passive</a></i></dt>
<dd><p>The connection setup is done asynchronously. The method returns
immediately after a listening socket has been set up. The connection
will be established in the background.
The method returns the port number of the listening socket, for use by
the caller. One important use is the transfer of this information to
the counterpart so that it knows where it has to connect to.</p>
<p>This is necessary as the object might have been configured for port
<b class="const">0</b>, allowing the operating system to choose the actual port it
will listen on.</p>
<p>The listening port is closed immediately when the connection was
established by the partner, to keep the time interval small within
which a third party can connect to the port too.
Even so it is recommended to use additional measures in the protocol
outside of the connect and transfer object to ensure that a connection
is not used with an unidentified/unauthorized partner
One possibility for this is the use of SSL/TLS.
See the option <b class="option">-socketcmd</b> and section
<span class="sectref"><a href="#section3">Secure connections</a></span> for information on how to do this.</p></dd>
</dl></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Options</a></h3>
<p>Connection objects support the set of options listed below.</p>
<dl class="doctools_options">
<dt><b class="option">-mode</b> <i class="arg">mode</i></dt>
<dd><p>This option specifies the mode the object is in. It is optional and
defaults to <b class="const">active</b> mode. The two possible modes are:</p>
<dl class="doctools_definitions">
<dt><b class="const">active</b></dt>
<dd><p>In this mode the two options <b class="option">-host</b> and <b class="option">-port</b> are
relevant and specify the host and TCP port the object has to connect
to. The host is given by either name or IP address.</p></dd>
<dt><b class="const">passive</b></dt>
<dd><p>In this mode the option <b class="option">-host</b> has no relevance and is ignored
should it be configured.
The only option the object needs is <b class="option">-port</b>, and it specifies
the TCP port on which the listening socket is opened to await the
connection from the partner.</p></dd>
</dl></dd>
<dt><b class="option">-host</b> <i class="arg">hostname-or-ipaddr</i></dt>
<dd><p>This option specifies the host to connect to in <i class="term"><a href="../../../../index.html#key613">active</a></i> mode,
either by name or ip-address. An object configured for <i class="term"><a href="../../../../index.html#key614">passive</a></i>
mode ignores this option.</p></dd>
<dt><b class="option">-port</b> <i class="arg">int</i></dt>
<dd><p>For <i class="term"><a href="../../../../index.html#key613">active</a></i> mode this option specifies the port the object is
expected to connect to. For <i class="term"><a href="../../../../index.html#key614">passive</a></i> mode however it is the port
where the object creates the listening socket waiting for a
connection. It defaults to <b class="const">0</b>, which allows the OS to choose
the actual port to listen on.</p></dd>
<dt><b class="option">-socketcmd</b> <i class="arg">command</i></dt>
<dd><p>This option allows the user to specify which command to use to open a
socket. The default is to use the builtin <b class="cmd">::socket</b>. Any
compatible with that command is allowed.</p>
<p>The envisioned main use is the specfication of <b class="cmd">tls::socket</b>. I.e.
this option allows the creation of secure transfer channels, without
making this package explicitly dependent on the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package.</p>
<p>See also section <span class="sectref"><a href="#section3">Secure connections</a></span>.</p></dd>
<dt><b class="option">-encoding</b> encodingname</dt>
<dd></dd>
<dt><b class="option">-eofchar</b> eofspec</dt>
<dd></dd>
<dt><b class="option">-translation</b> transspec</dt>
<dd><p>These options are the same as are recognized by the builtin command
<b class="cmd">fconfigure</b>. They provide the configuration to be set for the
channel between the two partners after it has been established, but
before the callback is invoked (See method <b class="method">connect</b>).</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Secure connections</a></h2>
<p>One way to secure connections made by objects of this package is to
require the package <b class="package"><a href="../../../../index.html#key331">tls</a></b> and then configure the option
<b class="option">-socketcmd</b> to force the use of command <b class="cmd">tls::socket</b> to
open the socket.</p>
<pre class="doctools_example">
    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...
    # Create a connector with secure socket setup,
    transfer::connect C -socketcmd tls::socket ...
    ...
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key613">active</a>, <a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key612">connection</a>, <a href="../../../../index.html#key614">passive</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/transfer/copyops.html.

















































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248

<div class='fossil-doc' data-title='transfer::copy - Data transfer facilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::copy(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::copy - Data transfer foundation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">transfer::copy <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">transfer::copy::do</b> <b class="const">chan</b>|<b class="const">string</b> <i class="arg">data</i> <i class="arg">outchannel</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">transfer::copy::chan</b> <i class="arg">channel</i> <i class="arg">outchannel</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">transfer::copy::string</b> <i class="arg">string</i> <i class="arg">outchannel</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#4"><b class="cmd">transfer::copy::doChan</b> <i class="arg">channel</i> <i class="arg">outchannel</i> <i class="arg">optvar</i></a></li>
<li><a href="#5"><b class="cmd">transfer::copy::doString</b> <i class="arg">string</i> <i class="arg">outchannel</i> <i class="arg">optvar</i></a></li>
<li><a href="#6"><b class="cmd">transfer::copy::options</b> <i class="arg">outchannel</i> <i class="arg">optionlist</i> <i class="arg">optvar</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a number of commands for the asynchronous of
information contained in either a string or channel. The main point of
this package is that the commands here provide a nicer callback API
than the builtin command <b class="cmd">fcopy</b>, making the use of these
facilities simpler than the builtin.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::copy::do</b> <b class="const">chan</b>|<b class="const">string</b> <i class="arg">data</i> <i class="arg">outchannel</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command transfers the information in <i class="arg">data</i> to the
<i class="arg">outchannel</i>, according to the <i class="arg">options</i>. The type of the
information in <i class="arg">data</i> is determined by the first argument.</p>
<p>The options available to this command are the same as are available to
the command <b class="cmd">transfer::copy::options</b>, and explained there.</p>
<dl class="doctools_definitions">
<dt><b class="const">chan</b></dt>
<dd><p>The argument <i class="arg">data</i> contains the handle of a channel and the
actual infomration to transfer is read from that channel.</p></dd>
<dt><b class="const">string</b></dt>
<dd><p>The argument <i class="arg">data</i> contains a string and this is the information
to be transfered.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">transfer::copy::chan</b> <i class="arg">channel</i> <i class="arg">outchannel</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command is a shorter and more direct form for the command
<b class="cmd">transfer::copy::do chan</b>.</p></dd>
<dt><a name="3"><b class="cmd">transfer::copy::string</b> <i class="arg">string</i> <i class="arg">outchannel</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command is a shorter and more direct form for the command
<b class="cmd">transfer::copy::do string</b>.</p></dd>
<dt><a name="4"><b class="cmd">transfer::copy::doChan</b> <i class="arg">channel</i> <i class="arg">outchannel</i> <i class="arg">optvar</i></a></dt>
<dd><p>This command is an alternate form of <b class="cmd">transfer::copy::chan</b> which
reads its options out of the array variable named by <i class="arg">optvar</i>
instead of from a variable length argument list.</p></dd>
<dt><a name="5"><b class="cmd">transfer::copy::doString</b> <i class="arg">string</i> <i class="arg">outchannel</i> <i class="arg">optvar</i></a></dt>
<dd><p>This command is an alternate form of <b class="cmd">transfer::copy::string</b> which
reads its options out of the array variable named by <i class="arg">optvar</i>
instead of from a variable length argument list.</p></dd>
<dt><a name="6"><b class="cmd">transfer::copy::options</b> <i class="arg">outchannel</i> <i class="arg">optionlist</i> <i class="arg">optvar</i></a></dt>
<dd><p>This command is the option processor used by all the commands above
which read their options from a variable length argument list. It
first reads default settings from the channel handle <i class="arg">outchannel</i>,
then processes the list of options in <i class="arg">optionlist</i>, at last stores
the results in the array variable named by <i class="arg">optvar</i>. The contents
of that variable are in a format which is directly understood by all
the commands above which read their options out of an array variable.</p>
<p>The recognized options are:</p>
<dl class="doctools_options">
<dt><b class="option">-blocksize</b> <i class="arg">int</i></dt>
<dd><p>This option specifies the size of the chunks to transfer in one
operation. It is optional and defaults to the value of
<b class="option">-buffersize</b> as configured for the output channel.</p>
<p>If specified its value has to be an integer number greater than zero.</p></dd>
<dt><b class="option">-command</b> <i class="arg">commandprefix</i></dt>
<dd><p>This option specifies the completion callback of the operation. This
option has to be specified. An error will be thrown if it is not, or
if the empty list was specified as argument to it.</p>
<p>Its value has to be a command prefix, i.e. a list whose first word is
the command to execute, followed by words containing fixed
arguments. When the callback is invoked one or two additional
arguments are appended to the prefix. The first argument is the number
of bytes which were transfered. The optional second argument is an
error message and added if and only if an error occured during the the
transfer.</p></dd>
<dt><b class="option">-progress</b> <i class="arg">commandprefix</i></dt>
<dd><p>This option specifies the progress callback of the operation. It is
optional and defaults to the empty list. This last possibility signals
that no feedback was asked for and disabled it.</p>
<p>Its value has to be a command prefix, see above, <b class="option">-command</b> for
a more detailed explanation. When the callback is invoked a single
additional arguments is appended to the prefix. This argument is the
number of bytes which were transfered so far.</p></dd>
<dt><b class="option">-size</b> <i class="arg">int</i></dt>
<dd><p>This option specifies the number of bytes to read from the input data
and transfer. It is optional and defaults to &quot;Transfer everything&quot;.
Its value has to be an integer number and any value less than zero has
the same meaning, i.e. to transfer all available data. Any other value
is the amount of bytes to transfer.</p>
<p>All transfer commands will throw error an when their user tries to
transfer more data than is available in the input. This happens
immediately, before the transfer is actually started, should the input
be a string. Otherwise the, i.e. for a channel as input, the error is
thrown the moment the underflow condition is actually detected.</p></dd>
<dt><b class="option">-encoding</b> <i class="arg">encodingname</i></dt>
<dd></dd>
<dt><b class="option">-eofchar</b> <i class="arg">eofspec</i></dt>
<dd></dd>
<dt><b class="option">-translation</b> <i class="arg">transspec</i></dt>
<dd><p>These options are the same as are recognized by the builtin command
<b class="cmd">fconfigure</b> and provide the settings for the output channel which
are to be active during the transfer, and only then. I.e. the settings
of the output channel before the transfer are saved, and restored at
the end of a transfer, regardless of its success or failure. None of
these options are required, and they default to the settings of the
output channel if not specified.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/transfer/ddest.html.

















































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248

<div class='fossil-doc' data-title='transfer::data::destination - Data transfer facilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::data::destination(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::data::destination - Data destination</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object methods</a></li>
<li class="doctools_subsection"><a href="#subsection3">Options</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit <span class="opt">?1.0?</span></b></li>
<li>package require <b class="pkgname">transfer::data::destination <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">transfer::data::destination</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">put</b> <i class="arg">chunk</i></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">done</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">valid</b> <i class="arg">msgvar</i></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">receive</b> <i class="arg">channel</i> <i class="arg">done</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects mainly describing the destination of a
data transfer. They are also able to initiate the reception of
information from a channel into the described destination.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::data::destination</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new data destination object with an associated
Tcl command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection1">Object command</a></span> and <span class="sectref"><a href="#subsection2">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection3">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Object command</a></h3>
<p>All objects created by the <b class="cmd">::transfer::data::destination</b> command
have the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection2">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object. Doing so while the object is busy
with the reception of information from a channel will cause errors
later on, when the reception completes and tries to access the now
missing data structures of the destroyed object.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">put</b> <i class="arg">chunk</i></a></dt>
<dd><p>The main receptor method. Saves the received <i class="arg">chunk</i> of data into
the configured destination. It has to be called for each piece of data
received.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">done</b></a></dt>
<dd><p>The secondary receptor method. Finalizes the receiver. It has to be
called when the receiving channel signals EOF. Afterward neither
itself nor method <b class="method">put</b> can be called anymore.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">valid</b> <i class="arg">msgvar</i></a></dt>
<dd><p>This method checks the configuration of the object for validity. It
returns a boolean flag as result, whose value is <b class="const">True</b> if the
object is valid, and <b class="const">False</b> otherwise. In the latter case the
variable whose name is stored in <i class="arg">msgvar</i> is set to an error
message describing the problem found with the configuration. Otherwise
this variable is not touched.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">receive</b> <i class="arg">channel</i> <i class="arg">done</i></a></dt>
<dd><p>This method initiates the reception of data from the specified
<i class="arg">channel</i>. The received data will be stored into the configured
destination, via calls to the methods <b class="method">put</b> and <b class="method">done</b>.
When the reception completes the command prefix <i class="arg">done</i> is invoked,
with the number of received characters appended to it as the sole
additional argument.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Options</a></h3>
<p>All data destinations support the options listed below. It should be
noted that all are semi-exclusive, each specifying a different type of
destination and associated information. If these options are specified
more than once then the last option specified is used to actually
configure the object.</p>
<dl class="doctools_options">
<dt><b class="option">-channel</b> <i class="arg">handle</i></dt>
<dd><p>This option specifies that the destination of the data is a channel,
and its associated argument is the handle of the channel to write the
received data to.</p></dd>
<dt><b class="option">-file</b> <i class="arg">path</i></dt>
<dd><p>This option specifies that the destination of the data is a file, and
its associated argument is the path of the file to write the received
data to.</p></dd>
<dt><b class="option">-variable</b> <i class="arg">varname</i></dt>
<dd><p>This option specifies that the destination of the data is a variable,
and its associated argument contains the name of the variable to write
the received data to. The variable is assumed to be global or
namespaced, anchored at the global namespace.</p></dd>
<dt><b class="option">-progress</b> <i class="arg">command</i></dt>
<dd><p>This option, if specified, defines a command to be invoked for each
chunk of bytes received, allowing the user to monitor the progress of
the reception of the data. The callback is always invoked with one
additional argument, the number of bytes received so far.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key61">data destination</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/transfer/dsource.html.

















































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280

<div class='fossil-doc' data-title='transfer::data::source - Data transfer facilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::data::source(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::data::source - Data source</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
<li class="doctools_subsection"><a href="#subsection4">Options</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit <span class="opt">?1.0?</span></b></li>
<li>package require <b class="pkgname">transfer::copy <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">transfer::data::source <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">transfer::data::source</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">type</b></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">data</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">size</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">valid</b> <i class="arg">msgvar</i></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">transmit</b> <i class="arg">channel</i> <i class="arg">blocksize</i> <i class="arg">done</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects mainly describing the origin of some
data to transfer. They are also able to initiate transfers of the
described information to a channel using the foundation package
<b class="package"><a href="copyops.html">transfer::copy</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::data::source</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new data source object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::transfer::data::source</b> command have
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object. Doing so while a transfer initiated
by the object is active is safe as all data required for the transfer
itself was copied, and the completion of the transfer will not try to
access the initiating object anymore. i.e. the transfer is completely
separate from the source object itself.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">type</b></a></dt>
<dd><p>This method returns a string describing the type of the data the
object is refering to. The possible values and their meanings are:</p>
<dl class="doctools_definitions">
<dt><b class="const">undefined</b></dt>
<dd><p>No data was specified at all, or it was specified incompletely. The
object does not know the type.</p></dd>
<dt><b class="const">string</b></dt>
<dd><p>The data to transfer is contained in a string.</p></dd>
<dt><b class="const">channel</b></dt>
<dd><p>The data to transfer is contained in a channel.</p></dd>
</dl></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">data</b></a></dt>
<dd><p>This method returns a value depending on the type of the data the
object refers to, through which the data can be accessed.
The method throws an error if the type is <b class="const">undefined</b>. For type
<b class="const">string</b> the returned result is the data itself, whereas for
type <b class="const">channel</b> the returned result is the handle of the channel
containing the data.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">size</b></a></dt>
<dd><p>This method returns a value depending on the type of the data the
object refers to, the size of the data.
The method throws an error if the type is <b class="const">undefined</b>. Return of
a negative value signals that the object is unable to determine an
absolute size upfront (like for data in a channel).</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">valid</b> <i class="arg">msgvar</i></a></dt>
<dd><p>This method checks the configuration of the object for validity. It
returns a boolean flag as result, whose value is <b class="const">True</b> if the
object is valid, and <b class="const">False</b> otherwise. In the latter case the
variable whose name is stored in <i class="arg">msgvar</i> is set to an error
message describing the problem found with the configuration. Otherwise
this variable is not touched.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">transmit</b> <i class="arg">channel</i> <i class="arg">blocksize</i> <i class="arg">done</i></a></dt>
<dd><p>This method initiates a transfer of the referenced data to the
specified <i class="arg">channel</i>.
When the transfer completes the command prefix <i class="arg">done</i> is invoked,
per the rules for the option <b class="option">-command</b> of command
<b class="cmd">transfer::copy::do</b> in the package <b class="package"><a href="copyops.html">transfer::copy</a></b>.
The <i class="arg">blocksize</i> specifies the size of the chunks to transfer in
one go. See the option <b class="option">-blocksize</b> of command
<b class="cmd">transfer::copy::do</b> in the package <b class="package"><a href="copyops.html">transfer::copy</a></b>.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Options</a></h3>
<p>All data sources support the options listed below. It should be noted
that the first four options are semi-exclusive, each specifying a
different type of data source and associated content. If these options
are specified more than once then the last option specified is used to
actually configure the object.</p>
<dl class="doctools_options">
<dt><b class="option">-string</b> <i class="arg">text</i></dt>
<dd><p>This option specifies that the source of the data is an immediate
string, and its associated argument contains the string in question.</p></dd>
<dt><b class="option">-channel</b> <i class="arg">handle</i></dt>
<dd><p>This option specifies that the source of the data is a channel, and
its associated argument is the handle of the channel containing the
data.</p></dd>
<dt><b class="option">-file</b> <i class="arg">path</i></dt>
<dd><p>This option specifies that the source of the data is a file, and its
associated argument is the path of the file containing the data.</p></dd>
<dt><b class="option">-variable</b> <i class="arg">varname</i></dt>
<dd><p>This option specifies that the source of the data is a string stored
in a variable, and its associated argument contains the name of the
variable in question. The variable is assumed to be global or
namespaced, anchored at the global namespace.</p></dd>
<dt><b class="option">-size</b> <i class="arg">int</i></dt>
<dd><p>This option specifies the size of the data transfer. It is optional
and defaults to -1. This value, and any other value less than zero
signals to transfer all the data from the source.</p></dd>
<dt><b class="option">-progress</b> <i class="arg">command</i></dt>
<dd><p>This option, if specified, defines a command to be invoked for each
chunk of bytes transmitted, allowing the user to monitor the progress
of the transmission of the data. The callback is always invoked with
one additional argument, the number of bytes transmitted so far.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key365">data source</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/transfer/receiver.html.







































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371

<div class='fossil-doc' data-title='transfer::receiver - Data transfer facilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::receiver(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::receiver - Data source</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
<li class="doctools_subsection"><a href="#subsection4">Options</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Secure connections</a></li>
<li class="doctools_section"><a href="#section4">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit <span class="opt">?1.0?</span></b></li>
<li>package require <b class="pkgname">transfer::data::destination <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">transfer::connect <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">transfer::receiver <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">transfer::receiver</b> <i class="arg">object</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">transfer::receiver</b> <b class="method">stream channel</b> <i class="arg">chan</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">transfer::receiver</b> <b class="method">stream file</b> <i class="arg">path</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">start</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">busy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package pulls data destinations and connection setup together
into a combined object for the reception of information coming in over
a socket.
These objects understand all the options from objects created by the
packages <b class="package"><a href="ddest.html">transfer::data::destination</a></b> and
<b class="package"><a href="connect.html">transfer::connect</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::receiver</b> <i class="arg">object</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new receiver object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
<dt><a name="2"><b class="cmd">transfer::receiver</b> <b class="method">stream channel</b> <i class="arg">chan</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This method creates a fire-and-forget transfer for the data coming
from the source at host/port (details below) and writing to the
channel <i class="arg">chan</i>, starting at the current seek location. The channel
is configured to use binary translation and encoding for the transfer.
The channel is <em>not</em> closed when the transfer has completed. This
is left to the completion callback.</p>
<p>If both <i class="arg">host</i> and <i class="arg">port</i> are provided an <b class="const">active</b>
connection to the data source is made. If only a <i class="arg">port</i> is
specified (with <i class="arg">host</i> the empty string) then a <b class="const">passive</b>
connection is made instead, i.e. the receiver then waits for a
conneciton by the transmitter.</p>
<p>Any arguments after the port are treated as options and are used to
configure the internal receiver object.
See the section <span class="sectref"><a href="#subsection4">Options</a></span> for a list of the supported options
and their meaning.
<em>Note</em> however that the signature of the command prefix specified
for the <b class="option">-command</b> callback differs from the signature for the
same option of the receiver object.
This callback is only given the number of bytes and transfered, and
possibly an error message. No reference to the internally used
receiver object is made.</p>
<p>The result returned by the command is the empty string
if it was set to make an <i class="term"><a href="../../../../index.html#key613">active</a></i> connection, and the port the
internal receiver object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#key614">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="3"><b class="cmd">transfer::receiver</b> <b class="method">stream file</b> <i class="arg">path</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This method is like <b class="method">stream channel</b>, except that the
received data is written to the file <i class="arg">path</i>, replacing any prior
content.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::transfer::receiver</b> command have the
following general form:</p>
<dl class="doctools_definitions">
<dt><a name="4"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="5"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object. Doing so while a reception is on
progress will cause errors later on, when the reception completes
and tries to access the now missing data structures of the destroyed
object.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">start</b></a></dt>
<dd><p>This method initiates the data reception, setting up the connection
first and then copying the received information into the
destination.
The method will throw an error if a reception is already/still in
progress.
I.e. it is not possible to run two receptions in parallel, only in
sequence.
Errors will also be thrown if the configuration of the data
destination is invalid, or if no completion callback was specified.</p>
<p>The result returned by the method is the empty string
for an object configured to make an <i class="term"><a href="../../../../index.html#key613">active</a></i> connection, and the port the
 object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#key614">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">busy</b></a></dt>
<dd><p>This method returns a boolean value telling us whether a reception
is in progress (<b class="const">True</b>), or not (<b class="const">False</b>).</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Options</a></h3>
<p>All receiver objects support the union of the options supported by
their connect and data destination components, plus one of their own.
See also the documentation for the packages
<b class="package"><a href="ddest.html">transfer::data::destination</a></b> and <b class="package"><a href="connect.html">transfer::connect</a></b>.</p>
<dl class="doctools_options">
 
<dt><b class="option">-command</b> <i class="arg">cmdprefix</i></dt>
<dd><p>This option specifies the command to invoke when the reception of
the information has been completed.
The arguments given to this command are the same as given to the
completion callback of the command <b class="cmd">transfer::copy::do</b> provided
by the package <b class="package"><a href="copyops.html">transfer::copy</a></b>.</p></dd>
<dt><b class="option">-mode</b> <i class="arg">mode</i></dt>
<dd><p>This option specifies the mode the object is in. It is optional and
defaults to <b class="const">active</b> mode. The two possible modes are:</p>
<dl class="doctools_definitions">
<dt><b class="const">active</b></dt>
<dd><p>In this mode the two options <b class="option">-host</b> and <b class="option">-port</b> are
relevant and specify the host and TCP port the object has to connect
to. The host is given by either name or IP address.</p></dd>
<dt><b class="const">passive</b></dt>
<dd><p>In this mode the option <b class="option">-host</b> has no relevance and is ignored
should it be configured.
The only option the object needs is <b class="option">-port</b>, and it specifies
the TCP port on which the listening socket is opened to await the
connection from the partner.</p></dd>
</dl></dd>
<dt><b class="option">-host</b> <i class="arg">hostname-or-ipaddr</i></dt>
<dd><p>This option specifies the host to connect to in <i class="term"><a href="../../../../index.html#key613">active</a></i> mode,
either by name or ip-address. An object configured for <i class="term"><a href="../../../../index.html#key614">passive</a></i>
mode ignores this option.</p></dd>
<dt><b class="option">-port</b> <i class="arg">int</i></dt>
<dd><p>For <i class="term"><a href="../../../../index.html#key613">active</a></i> mode this option specifies the port the object is
expected to connect to. For <i class="term"><a href="../../../../index.html#key614">passive</a></i> mode however it is the port
where the object creates the listening socket waiting for a
connection. It defaults to <b class="const">0</b>, which allows the OS to choose
the actual port to listen on.</p></dd>
<dt><b class="option">-socketcmd</b> <i class="arg">command</i></dt>
<dd><p>This option allows the user to specify which command to use to open a
socket. The default is to use the builtin <b class="cmd">::socket</b>. Any
compatible with that command is allowed.</p>
<p>The envisioned main use is the specfication of <b class="cmd">tls::socket</b>. I.e.
this option allows the creation of secure transfer channels, without
making this package explicitly dependent on the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package.</p>
<p>See also section <span class="sectref"><a href="#section3">Secure connections</a></span>.</p></dd>
<dt><b class="option">-encoding</b> encodingname</dt>
<dd></dd>
<dt><b class="option">-eofchar</b> eofspec</dt>
<dd></dd>
<dt><b class="option">-translation</b> transspec</dt>
<dd><p>These options are the same as are recognized by the builtin command
<b class="cmd">fconfigure</b>. They provide the configuration to be set for the
channel between the two partners after it has been established, but
before the callback is invoked (See method <b class="method">connect</b>).</p></dd>
<dt><b class="option">-channel</b> <i class="arg">handle</i></dt>
<dd><p>This option specifies that the destination of the data is a channel,
and its associated argument is the handle of the channel to write the
received data to.</p></dd>
<dt><b class="option">-file</b> <i class="arg">path</i></dt>
<dd><p>This option specifies that the destination of the data is a file, and
its associated argument is the path of the file to write the received
data to.</p></dd>
<dt><b class="option">-variable</b> <i class="arg">varname</i></dt>
<dd><p>This option specifies that the destination of the data is a variable,
and its associated argument contains the name of the variable to write
the received data to. The variable is assumed to be global or
namespaced, anchored at the global namespace.</p></dd>
<dt><b class="option">-progress</b> <i class="arg">command</i></dt>
<dd><p>This option, if specified, defines a command to be invoked for each
chunk of bytes received, allowing the user to monitor the progress of
the reception of the data. The callback is always invoked with one
additional argument, the number of bytes received so far.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Secure connections</a></h2>
<p>One way to secure connections made by objects of this package is to
require the package <b class="package"><a href="../../../../index.html#key331">tls</a></b> and then configure the option
<b class="option">-socketcmd</b> to force the use of command <b class="cmd">tls::socket</b> to
open the socket.</p>
<pre class="doctools_example">
    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...
    # Create a connector with secure socket setup,
    transfer::receiver R -socketcmd tls::socket ...
    ...
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key61">data destination</a>, <a href="../../../../index.html#key93">receiver</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/transfer/tqueue.html.



























































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269

<div class='fossil-doc' data-title='transfer::copy::queue - Data transfer facilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::copy::queue(n) 0.1 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::copy::queue - Queued transfers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Options</a></li>
<li class="doctools_section"><a href="#section4">Use</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit <span class="opt">?1.0?</span></b></li>
<li>package require <b class="pkgname">struct::queue <span class="opt">?1.4?</span></b></li>
<li>package require <b class="pkgname">transfer::copy <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">transfer::copy::queue <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">transfer::copy::queue</b> <i class="arg">objectName</i> <i class="arg">outchannel</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">busy</b></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">pending</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">put</b> <i class="arg">request</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects which serialize transfer requests for a
single channel by means of a fifo queue. Accumulated requests are
executed in order of entrance, with the first request reaching an idle
object starting the execution in general. New requests can be added
while the object is active and are defered until all requests entered
before them have been completed successfully.</p>
<p>When a request causes a transfer error execution stops and all
requests coming after it are not served. Currently this means that
their completion callbacks are never triggered at all.</p>
<p><em>NOTE</em>:
	Not triggering the completion callbacks of the unserved
	requests after an error stops the queue object is something I
	am not fully sure that it makes sense. It forces the user of
	the queue to remember the callbacks as well and run
	them. Because otherwise everything in the system which depends
	on getting a notification about the status of a request will
	hang in the air. I am slowly convincing myself that it is more
	sensible to trigger the relevant completion callbacks with an
	error message about the queue abort, and 0 bytes transfered.</p>
<p>All transfer requests are of the form</p>
<pre class="doctools_example">
	{type data options...}
</pre>
<p>where <i class="arg">type</i> is in {<b class="const">chan</b>, <b class="const">string</b>}, and <i class="arg">data</i>
specifies the information to transfer.
For <b class="const">chan</b> the data is the handle of the channel containing the
actual information to transfer, whereas for <b class="const">string</b> <i class="arg">data</i>
contains directly the information to transfer.
The <i class="arg">options</i> are a list of them and their values, and are the
same as are accepted by the low-level copy operations of the package
<b class="package"><a href="copyops.html">transfer::copy</a></b>.
Note how just prepending the request with <b class="cmd">transfer::copy::do</b> and
inserting a channel handle in between <i class="arg">data</i> and <i class="arg">options</i>
easily transforms it from a pure data structure into a command whose
evaluation will perform the request.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::copy::queue</b> <i class="arg">objectName</i> <i class="arg">outchannel</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new queue object for the management of the
channel <i class="arg">outchannel</i>, with an associated Tcl command whose name is
<i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#section3">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::transfer::copy::queue</b> command have
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object. Doing so while the object is busy
will cause errors later on, when the currently executed request
completes and tries to access the now missing data structures of the
destroyed object.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">busy</b></a></dt>
<dd><p>This method returns a boolean value telling us if the object is
currently serving a request (i.e. <i class="term">busy</i>, value <b class="const">True</b>), or
not (i.e. <i class="term"><a href="../../../../index.html#key541">idle</a></i>, value <b class="const">False</b>).</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">pending</b></a></dt>
<dd><p>This method returns the number of requests currently waiting in the
queue for their execution. A request currently served is not counted
as waiting.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">put</b> <i class="arg">request</i></a></dt>
<dd><p>This method enters the transfer <i class="arg">request</i> into the object's queue
of waiting requests.
If the object is <i class="term"><a href="../../../../index.html#key541">idle</a></i> it will become <i class="term">busy</i>, immediately
servicing the request. Otherwise servicing the new request will be
defered until all preceding requests have been served.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Options</a></h2>
<p>The only option known is <b class="option">-on-status-change</b>. It is optional
and defaults to the empty list, disabling the reporting of status
changes. Otherwise its argument is a command prefix which is invoked
whenever the internal status of the object changed. The callback is
invoked with two additional arguments, the result of the methods
<b class="method">pending</b> and <b class="method">busy</b>, in this order. This allows any
user to easily know, for example, when the object has processed all
outstanding requests.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Use</a></h2>
<p>A possible application of this package and class is within a HTTP 1.1
server, managing the results waiting for transfer to the client.</p>
<p>It should be noted that in this application the system also needs an
additional data structure which keeps track of outstanding results as
they may come back in a different order than the requests from the
client, and releases them to the actual queue in the proper order.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key50">queue</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/transfer/transmitter.html.

















































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376

<div class='fossil-doc' data-title='transfer::transmitter - Data transfer facilities'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::transmitter(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::transmitter - Data source</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Package commands</a></li>
<li class="doctools_subsection"><a href="#subsection2">Object command</a></li>
<li class="doctools_subsection"><a href="#subsection3">Object methods</a></li>
<li class="doctools_subsection"><a href="#subsection4">Options</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Secure connections</a></li>
<li class="doctools_section"><a href="#section4">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit <span class="opt">?1.0?</span></b></li>
<li>package require <b class="pkgname">transfer::copy <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">transfer::data::source <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">transfer::connect <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">transfer::transmitter <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">transfer::transmitter</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">transfer::transmitter</b> <b class="method">stream channel</b> <i class="arg">chan</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">transfer::transmitter</b> <b class="method">stream file</b> <i class="arg">path</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">start</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">busy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package pulls data sources and connection setup together into a
combined object for the transmission of information over a socket.
These objects understand all the options from objects created
by the packages <b class="package"><a href="dsource.html">transfer::data::source</a></b> and
<b class="package"><a href="connect.html">transfer::connect</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::transmitter</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new transmitter object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
<dt><a name="2"><b class="cmd">transfer::transmitter</b> <b class="method">stream channel</b> <i class="arg">chan</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This method creates a fire-and-forget transfer for the data contained
in the channel <i class="arg">chan</i>, starting at the current seek location. The
channel is configured to use binary translation and encoding for the
transfer.
The channel is automatically closed when the transfer has completed.</p>
<p>If both <i class="arg">host</i> and <i class="arg">port</i> are provided an <b class="const">active</b>
connection to the destination is made. If only a <i class="arg">port</i> is
specified (with <i class="arg">host</i> the empty string) then a <b class="const">passive</b>
connection is made instead.</p>
<p>Any arguments after the port are treated as options and are used to
configure the internal transmitter object.
See the section <span class="sectref"><a href="#subsection4">Options</a></span> for a list of the supported options
and their meaning.
<em>Note</em> however that the signature of the command prefix specified
for the <b class="option">-command</b> callback differs from the signature for the
same option of the transmitter object.
This callback is only given the number of bytes and transfered, and
possibly an error message. No reference to the internally used
transmitter object is made.</p>
<p>The result returned by the command is the empty string
if it was set to make an <i class="term"><a href="../../../../index.html#key613">active</a></i> connection, and the port the
internal transmitter object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#key614">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="3"><b class="cmd">transfer::transmitter</b> <b class="method">stream file</b> <i class="arg">path</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This method is like <b class="method">stream channel</b>, except that the data
contained in the file <i class="arg">path</i> is transfered.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
<p>All objects created by the <b class="cmd">::transfer::transmitter</b> command have
the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="4"><i class="arg">objectName</i> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The method <b class="method">method</b> and its <i class="arg">arg</i>'uments determine the
exact behavior of the command.
See section <span class="sectref"><a href="#subsection3">Object methods</a></span> for the detailed
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="5"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object. Doing so while a transmission is in
progress will cause errors later on, when the transmission completes
and tries to access the now missing data structures of the destroyed
object.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">start</b></a></dt>
<dd><p>This method initiates the data transmission, setting up the connection
first and then copying the information.
The method will throw an error if a transmission is already/still in
progress.
I.e. it is not possible to run two transmissions in parallel on a
single object, only in sequence. Multiple transmitter objects are
needed to manage parallel transfers, one per transmission.
Errors will also be thrown if the configuration of the data source is
invalid, or if no completion callback was specified.</p>
<p>The result returned by the method is the empty string
for an object configured to make an <i class="term"><a href="../../../../index.html#key613">active</a></i> connection, and the port the
 object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#key614">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">busy</b></a></dt>
<dd><p>This method returns a boolean value telling us whether a transmission
is in progress (<b class="const">True</b>), or not (<b class="const">False</b>).</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Options</a></h3>
<p>All transmitter objects support the union of the options supported
by their connect and data source components, plus two of their own.
See also the documentation for the packages
<b class="package"><a href="dsource.html">transfer::data::source</a></b> and <b class="package"><a href="connect.html">transfer::connect</a></b>.</p>
<dl class="doctools_options">
<dt><b class="option">-blocksize</b> <i class="arg">int</i></dt>
<dd><p>This option specifies the size of the chunks to be transmitted in one
block. Usage is optional, its default value is <b class="const">1024</b>.</p></dd>
<dt><b class="option">-command</b> <i class="arg">cmdprefix</i></dt>
<dd><p>This option specifies the command to invoke when the transmission of
the information has been completed.
The arguments given to this command are the same as given to the
completion callback of the command <b class="cmd">transfer::copy::do</b> provided
by the package <b class="package"><a href="copyops.html">transfer::copy</a></b>.</p></dd>
<dt><b class="option">-mode</b> <i class="arg">mode</i></dt>
<dd><p>This option specifies the mode the object is in. It is optional and
defaults to <b class="const">active</b> mode. The two possible modes are:</p>
<dl class="doctools_definitions">
<dt><b class="const">active</b></dt>
<dd><p>In this mode the two options <b class="option">-host</b> and <b class="option">-port</b> are
relevant and specify the host and TCP port the object has to connect
to. The host is given by either name or IP address.</p></dd>
<dt><b class="const">passive</b></dt>
<dd><p>In this mode the option <b class="option">-host</b> has no relevance and is ignored
should it be configured.
The only option the object needs is <b class="option">-port</b>, and it specifies
the TCP port on which the listening socket is opened to await the
connection from the partner.</p></dd>
</dl></dd>
<dt><b class="option">-host</b> <i class="arg">hostname-or-ipaddr</i></dt>
<dd><p>This option specifies the host to connect to in <i class="term"><a href="../../../../index.html#key613">active</a></i> mode,
either by name or ip-address. An object configured for <i class="term"><a href="../../../../index.html#key614">passive</a></i>
mode ignores this option.</p></dd>
<dt><b class="option">-port</b> <i class="arg">int</i></dt>
<dd><p>For <i class="term"><a href="../../../../index.html#key613">active</a></i> mode this option specifies the port the object is
expected to connect to. For <i class="term"><a href="../../../../index.html#key614">passive</a></i> mode however it is the port
where the object creates the listening socket waiting for a
connection. It defaults to <b class="const">0</b>, which allows the OS to choose
the actual port to listen on.</p></dd>
<dt><b class="option">-socketcmd</b> <i class="arg">command</i></dt>
<dd><p>This option allows the user to specify which command to use to open a
socket. The default is to use the builtin <b class="cmd">::socket</b>. Any
compatible with that command is allowed.</p>
<p>The envisioned main use is the specfication of <b class="cmd">tls::socket</b>. I.e.
this option allows the creation of secure transfer channels, without
making this package explicitly dependent on the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package.</p>
<p>See also section <span class="sectref"><a href="#section3">Secure connections</a></span>.</p></dd>
<dt><b class="option">-encoding</b> encodingname</dt>
<dd></dd>
<dt><b class="option">-eofchar</b> eofspec</dt>
<dd></dd>
<dt><b class="option">-translation</b> transspec</dt>
<dd><p>These options are the same as are recognized by the builtin command
<b class="cmd">fconfigure</b>. They provide the configuration to be set for the
channel between the two partners after it has been established, but
before the callback is invoked (See method <b class="method">connect</b>).</p></dd>
<dt><b class="option">-string</b> <i class="arg">text</i></dt>
<dd><p>This option specifies that the source of the data is an immediate
string, and its associated argument contains the string in question.</p></dd>
<dt><b class="option">-channel</b> <i class="arg">handle</i></dt>
<dd><p>This option specifies that the source of the data is a channel, and
its associated argument is the handle of the channel containing the
data.</p></dd>
<dt><b class="option">-file</b> <i class="arg">path</i></dt>
<dd><p>This option specifies that the source of the data is a file, and its
associated argument is the path of the file containing the data.</p></dd>
<dt><b class="option">-variable</b> <i class="arg">varname</i></dt>
<dd><p>This option specifies that the source of the data is a string stored
in a variable, and its associated argument contains the name of the
variable in question. The variable is assumed to be global or
namespaced, anchored at the global namespace.</p></dd>
<dt><b class="option">-size</b> <i class="arg">int</i></dt>
<dd><p>This option specifies the size of the data transfer. It is optional
and defaults to -1. This value, and any other value less than zero
signals to transfer all the data from the source.</p></dd>
<dt><b class="option">-progress</b> <i class="arg">command</i></dt>
<dd><p>This option, if specified, defines a command to be invoked for each
chunk of bytes transmitted, allowing the user to monitor the progress
of the transmission of the data. The callback is always invoked with
one additional argument, the number of bytes transmitted so far.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Secure connections</a></h2>
<p>One way to secure connections made by objects of this package is to
require the package <b class="package"><a href="../../../../index.html#key331">tls</a></b> and then configure the option
<b class="option">-socketcmd</b> to force the use of command <b class="cmd">tls::socket</b> to
open the socket.</p>
<pre class="doctools_example">
    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...
    # Create a connector with secure socket setup,
    transfer::transmitter T -socketcmd tls::socket ...
    ...
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key365">data source</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a>, <a href="../../../../index.html#key62">transfer</a>, <a href="../../../../index.html#key718">transmitter</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/treeql/treeql.html.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648

<div class='fossil-doc' data-title='treeql - Tree Query Language'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">treeql(n) 1.3.1 tcllib &quot;Tree Query Language&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>treeql - Query tree objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">TreeQL CLASS API</a></li>
<li class="doctools_subsection"><a href="#subsection2">TreeQL OBJECT API</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">The Tree Query Language</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">TreeQL Concepts</a></li>
<li class="doctools_subsection"><a href="#subsection4">Structural generators</a></li>
<li class="doctools_subsection"><a href="#subsection5">Attribute Filters</a></li>
<li class="doctools_subsection"><a href="#subsection6">Attribute Mutators</a></li>
<li class="doctools_subsection"><a href="#subsection7">Attribute String Accessors</a></li>
<li class="doctools_subsection"><a href="#subsection8">Sub-queries</a></li>
<li class="doctools_subsection"><a href="#subsection9">Node Set Operators</a></li>
<li class="doctools_subsection"><a href="#subsection10">Node Set Iterators</a></li>
<li class="doctools_subsection"><a href="#subsection11">Typed node support</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Examples</a></li>
<li class="doctools_section"><a href="#section5">References</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">treeql <span class="opt">?1.3.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">treeql</b> <i class="arg">objectname</i> <b class="option">-tree</b> <i class="arg">tree</i> <span class="opt">?<b class="option">-query</b> <i class="arg">query</i>?</span> <span class="opt">?<b class="option">-nodes</b> <i class="arg">nodes</i>?</span> <span class="opt">?<i class="arg">args</i>...?</span></a></li>
<li><a href="#2"><i class="arg">qo</i> <b class="method">query</b> <i class="arg">args</i>...</a></li>
<li><a href="#3"><i class="arg">qo</i> <b class="method">result</b></a></li>
<li><a href="#4"><i class="arg">qo</i> <b class="method">discard</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects which can be used to query and transform
tree objects following the API of tree objects created by the package
<b class="package"><a href="../struct/struct_tree.html">struct::tree</a></b>.</p>
<p>The tree query and manipulation language used here, TreeQL, is
inspired by Cost (See section <span class="sectref"><a href="#section5">References</a></span> for more
information).</p>
<p><b class="package">treeql</b>, the package, is a fairly thin query facility over
tree-structured data types.  It implements an ordered set of nodes
(really a list) which are generated and filtered through the
application of TreeQL operators to each node in turn.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">TreeQL CLASS API</a></h3>
<p>The command <b class="cmd">treeql</b> is a <b class="package"><a href="../snit/snit.html">snit</a></b>::type which implements
the Treeql Query Language. This means that it follows the API for
class commands as specified by the package <b class="package"><a href="../snit/snit.html">snit</a></b>.
Its general syntax is</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">treeql</b> <i class="arg">objectname</i> <b class="option">-tree</b> <i class="arg">tree</i> <span class="opt">?<b class="option">-query</b> <i class="arg">query</i>?</span> <span class="opt">?<b class="option">-nodes</b> <i class="arg">nodes</i>?</span> <span class="opt">?<i class="arg">args</i>...?</span></a></dt>
<dd><p>The command creates a new tree query object and returns the fully
qualified name of the object command as its result.
The API the returned command is following is described in the section
<span class="sectref"><a href="#subsection2">TreeQL OBJECT API</a></span></p>
<p>Each query object is associated with a single <i class="arg">tree</i> object. This
is the object all queries will be run against.</p>
<p>If the option <b class="option">-nodes</b> was specified then its argument is
treated as a list of nodes. This list is used to initialize the node
set. It defaults to the empty list.</p>
<p>If the option <b class="option">-query</b> was specified then its argument will be
interpreted as an object, the <i class="term">parent query</i> of this query. It
defaults to the object itself. All queries will be interpreted in the
environment of this object.</p>
<p>Any arguments coming after the options are treated as a query and run
immediately, after the <i class="term">node set</i> has been initialized. This
uses the same syntax for the query as the method <b class="method">query</b>.</p>
<p>The operations of the TreeQL available for this are explained in the
section about <span class="sectref"><a href="#section3">The Tree Query Language</a></span>. This section also
explains the term <i class="term">node set</i> used above.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">TreeQL OBJECT API</a></h3>
<p>As <b class="package">treeql</b> has been implemented in <b class="package"><a href="../snit/snit.html">snit</a></b> all the
standard methods of <b class="package"><a href="../snit/snit.html">snit</a></b>-based classes are available to the
user and therefore not listed here. Please read the documentation for
<b class="package"><a href="../snit/snit.html">snit</a></b> for what they are and what functionality they provide</p>
<p>The methods provided by the package <b class="package">treeql</b> itself are listed
and explained below.</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">qo</i> <b class="method">query</b> <i class="arg">args</i>...</a></dt>
<dd><p>This method interprets its arguments as a series of TreeQL operators
and interpretes them from the left to right (i.e. first to last).
Note that the first operator uses the <i class="term">node set</i> currently
known to the object to perform its actions.
In other words, the <i class="term">node set</i> is <em>not</em> cleared, or
modified in other ways, before the query is run. This allows the user
to run several queries one after the other and have each use the
results of the last. Any initialization has to be done by any query
itself, using TreeQL operators.
The result of the method is the <i class="term">node set</i> after the last
operator of the query has been executed.</p>
<p><em>Note</em> that uncaught errors will leave the <i class="term">node set</i> of
the object in an intermediate state, per the TreeQL operators which
were executed successfully before the error occurred.</p>
<p>The above means in detail that:</p>
<ol class="doctools_enumerated">
<li><p>The first argument is interpreted as the name of a query operator, the
number of arguments required by that operator is then determined, and
taken from the immediately following arguments.</p>
<p>Because of this operators cannot have optional arguments, all
arguments have to be present as defined.  Failure to do this will, at
least, confuse the query interpreter, but more likely cause errors.</p></li>
<li><p>The operator is applied to the current node set, yielding a new node
set, and/or manipulating the tree object the query object is connected
to.</p></li>
<li><p>The arguments used (i.e. operator name and arguments) are removed from
the list of method arguments, and then the whole process is repeated
from step [1], until the list of arguments is empty or an error
occurred.</p></li>
</ol>
<pre class="doctools_example">
    # q is the query object.
    q query root children get data
    # The above query
    # - Resets the node set to the root node - root
    # - Adds the children of root to the set - children
    # - Replaces the node set with the       - get data
    #   values for the attribute 'data',
    #   for all nodes in the set which
    #   have such an attribute.
    # - And returns this information.
    # Below we can see the same query, but rewritten
    # to show the structure as it is seen by the query
    # interpreter.
    q query \\
	    root \\
	    children \\
	    get data
</pre>
<p>The operators of the TreeQL language available for this are explained
in the section about <span class="sectref"><a href="#section3">The Tree Query Language</a></span>. This section
also explains the term <i class="term">node set</i> used above.</p></dd>
<dt><a name="3"><i class="arg">qo</i> <b class="method">result</b></a></dt>
<dd><p>This method returns a list containing the current node set.</p></dd>
<dt><a name="4"><i class="arg">qo</i> <b class="method">discard</b></a></dt>
<dd><p>This method returns the current node set (like method
<b class="method">result</b>), but also destroys the query object (<i class="arg">qo</i>).
This is useful when constructing and using sub-queries (%AUTO% objects
immediately destroyed after use).</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">The Tree Query Language</a></h2>
<p>This and the following sections specify the Tree Query Language used
by the query objects of this package in detail.</p>
<p>First we explain the general concepts underneath the language which
are required to comprehend it. This is followed by the specifications
for all the available query operators. They fall into eight
categories, and each category has its own section.</p>
<ol class="doctools_enumerated">
<li><p><span class="sectref"><a href="#subsection3">TreeQL Concepts</a></span></p></li>
<li><p><span class="sectref"><a href="#subsection4">Structural generators</a></span></p></li>
<li><p><span class="sectref"><a href="#subsection5">Attribute Filters</a></span></p></li>
<li><p><span class="sectref"><a href="#subsection6">Attribute Mutators</a></span></p></li>
<li><p><span class="sectref"><a href="#subsection7">Attribute String Accessors</a></span></p></li>
<li><p><span class="sectref"><a href="#subsection8">Sub-queries</a></span></p></li>
<li><p><span class="sectref"><a href="#subsection9">Node Set Operators</a></span></p></li>
<li><p><span class="sectref"><a href="#subsection10">Node Set Iterators</a></span></p></li>
<li><p><span class="sectref"><a href="#subsection11">Typed node support</a></span></p></li>
</ol>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">TreeQL Concepts</a></h3>
<p>The main concept which has to be understood is that of the
<i class="term">node set</i>.
Each query object maintains exactly one such <i class="term">node set</i>, and
essentially all operators use it and input argument and for their
result.
This structure simply contains the handles of all nodes which are
currently of interest to the query object.
To name it a <i class="term"><a href="../../../../index.html#key301">set</a></i> is a bit of a misnomer, because</p>
<ol class="doctools_enumerated">
<li><p>A node (handle) can occur in the structure more than once, and</p></li>
<li><p>the order of nodes in the structure is important as well.
Whenever an operator processes all nodes in the node set it will do so
in the order they occur in the structure.</p></li>
</ol>
<p>Regarding the possible multiple occurrence of a node, consider a node
set containing two nodes A and B, both having node P as their
immediate parent. Application of the TreeQL operator &quot;parent&quot; will
then add P to the new node set twice, once per node it was parent
of. I.e. the new node set will then be {P P}.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Structural generators</a></h3>
<p>All tree-structural operators locate nodes in the tree based on a
structural relation ship to the nodes currently in the set and then
replace the current node set with the set of nodes found
Nodes which fulfill such a relationship multiple times are added to
the result as often as they fulfill the relationship.</p>
<p>It is important to note that the found nodes are collected in a
separate storage area while processing the node set, and are added to
(or replacing) the current node set only after the current node set
has been processed completely.
In other words, the new nodes are <em>not</em> processed by the operator
as well and do not affect the iteration.</p>
<p>When describing an operator the variable <b class="variable">N</b> will be used to refer
to any node in the node set.</p>
<dl class="doctools_definitions">
<dt><b class="method">ancestors</b></dt>
<dd><p>Replaces the current node set with the ancestors for all nodes <b class="variable">N</b>
in the node set, should <b class="variable">N</b> have a parent. In other words, nodes
without a parent do not contribute to the new node set. In other
words, uses all nodes on the path from node <b class="variable">N</b> to root, in this
order (root last), for all nodes <b class="variable">N</b> in the node set. This
includes the root, but not the node itself.</p></dd>
<dt><b class="method">rootpath</b></dt>
<dd><p>Replaces the current node set with the ancestors for all nodes <b class="variable">N</b>
in the node set, should <b class="variable">N</b> have a parent. In other words, nodes
without a parent do not contribute to the new node set.
In contrast to the operator <b class="method">ancestors</b> the nodes are added in
reverse order however, i.e. the root node first.</p></dd>
<dt><b class="method">parent</b></dt>
<dd><p>Replaces the current node set with the parent of node <b class="variable">N</b>, for all
nodes <b class="variable">N</b> in the node set, should <b class="variable">N</b> have a parent. In other
words, nodes without a parent do not contribute to the new node set.</p></dd>
<dt><b class="method">children</b></dt>
<dd><p>Replaces the current node set with the immediate children of node
<b class="variable">N</b>, for all nodes <b class="variable">N</b> in the node set, should <b class="variable">N</b> have
children. In other words, nodes without children do not contribute to
the new node set.</p></dd>
<dt><b class="method">left</b></dt>
<dd><p>Replaces the current node set with the previous/left sibling for all
nodes <b class="variable">N</b> in the node set, should <b class="variable">N</b> have siblings to the
left. In other words, nodes without left siblings do not contribute to
the new node set.</p></dd>
<dt><b class="method">right</b></dt>
<dd><p>Replaces the current node set with the next/right sibling for all
nodes <b class="variable">N</b> in the node set, should <b class="variable">N</b> have siblings to the
right. In other words, nodes without right siblings do not contribute
to the new node set.</p></dd>
<dt><b class="method">prev</b></dt>
<dd><p>Replaces the current node set with all previous/left siblings of node
<b class="variable">N</b>, for all nodes <b class="variable">N</b> in the node set, should <b class="variable">N</b> have
siblings to the left. In other words, nodes without left siblings are
ignored. The left sibling adjacent to the node is added first, and the
leftmost sibling last (reverse tree order).</p></dd>
<dt><b class="method">esib</b></dt>
<dd><p>Replaces the current node set with all previous/left siblings of node
<b class="variable">N</b>, for all nodes <b class="variable">N</b> in the node set, should <b class="variable">N</b> have
siblings to the left. In other words, nodes without left siblings are
ignored. The leftmost sibling is added first, and the left sibling
adjacent to the node last (tree order).</p>
<p>The method name is a shorthand for <i class="term">Earlier SIBling</i>.</p></dd>
<dt><b class="method">next</b></dt>
<dd><p>Replaces the current node set with all next/right siblings of node
<b class="variable">N</b>, for all nodes <b class="variable">N</b> in the node set, should <b class="variable">N</b> have
siblings to the right. In other words, nodes without right siblings do
not contribute to the new node set. The right sibling adjacent to the
node is added first, and the rightmost sibling last (tree order).</p></dd>
<dt><b class="method">root</b></dt>
<dd><p>Replaces the current node set with a node set containing a single
node, the root of the tree.</p></dd>
<dt><b class="method">tree</b></dt>
<dd><p>Replaces the current node set with a node set containing all nodes
found in the tree. The nodes are added in pre-order (parent first,
then children, the latter from left to right, first to last).</p></dd>
<dt><b class="method">descendants</b></dt>
<dd><p>Replaces the current node set with the nodes in all subtrees rooted at
node <b class="variable">N</b>, for all nodes <b class="variable">N</b> in the node set, should <b class="variable">N</b>
have children. In other words, nodes without children do not
contribute to the new node set.</p>
<p>This is like the operator <b class="method">children</b>, but covers the children
of children as well, i.e. all the <i class="term">proper descendants</i>. &quot;Rooted
at <b class="variable">N</b>&quot; means that <b class="variable">N</b> itself is not added to the new set,
which is also implied by <i class="term">proper descendants</i>.</p></dd>
<dt><b class="method">subtree</b></dt>
<dd><p>Like operator <b class="method">descendants</b>, but includes the node <b class="variable">N</b>. In
other words:</p>
<p>Replaces the current node set with the nodes of the subtree of node
<b class="variable">N</b>, for all nodes <b class="variable">N</b> in the node set, should <b class="variable">N</b> have
children. In other words, nodes without children do not contribute to
the new node set. I.e this is like the operator <b class="method">children</b>, but
covers the children of children, etc. as well. &quot;Of <b class="variable">N</b>&quot; means that
<b class="variable">N</b> itself is added to the new set.</p></dd>
<dt><b class="method">forward</b></dt>
<dd><p>Replaces the current node set with the nodes in the subtrees rooted at
the right siblings of node <b class="variable">N</b>, for all nodes <b class="variable">N</b> in the node
set, should <b class="variable">N</b> have right siblings, and they children. In other
words, nodes without right siblings, and them without children are
ignored.</p>
<p>This is equivalent to the operator sequence</p>
<pre class="doctools_example">next descendants</pre>
</dd>
<dt><b class="method">later</b></dt>
<dd><p>This is an alias for the operator <b class="method">forward</b>.</p></dd>
<dt><b class="method">backward</b></dt>
<dd><p>Replaces the current node set with the nodes in the flattened previous
subtrees, in reverse tree order.</p>
<p>This is nearly equivalent to the operator sequence</p>
<pre class="doctools_example">prev descendants</pre>
<p>The only difference is that this uses the nodes in reverse order.</p></dd>
<dt><b class="method">earlier</b></dt>
<dd><p>Replaces the current node set with the nodes in the flattened previous
subtrees, in tree order.</p>
<p>This is equivalent to the operator sequence</p>
<pre class="doctools_example">prev subtree</pre>
</dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Attribute Filters</a></h3>
<p>These operators filter the node set by reference to attributes of
nodes and their properties. Filter means that all nodes not fulfilling
the criteria are removed from the node set. In other words, the node
set is replaced by the set of nodes fulfilling the filter criteria.</p>
<dl class="doctools_definitions">
<dt><b class="method">hasatt</b> <i class="arg">attr</i></dt>
<dd><p>Reduces the node set to nodes which have an attribute named
<i class="arg">attr</i>.</p></dd>
<dt><b class="method">withatt</b> <i class="arg">attr</i> <i class="arg">value</i></dt>
<dd><p>Reduces the node set to nodes which have an attribute named
<i class="arg">attr</i>, and where the value of that attribute is equal to
<i class="arg">value</i> (The &quot;==&quot; operator is <b class="cmd">string equal -nocase</b>).</p></dd>
<dt><b class="method">withatt!</b> <i class="arg">attr</i> <i class="arg">val</i></dt>
<dd><p>This is the same as <b class="method">withatt</b>, but all nodes in the node set
have to have the attribute, and the &quot;==&quot; operator is
<b class="cmd">string equal</b>, i.e. no <b class="option">-nocase</b>.
The operator will fail with an error if they don't have the attribute.</p></dd>
<dt><b class="method">attof</b> <i class="arg">attr</i> <i class="arg">vals</i></dt>
<dd><p>Reduces the node set to nodes which which have an attribute named
<i class="arg">attr</i> and where the value of that attribute is contained in the
list <i class="arg">vals</i> of legal values. The contained-in operator used here
does glob matching (using the attribute value as pattern) and ignores
the case of the attribute value, <em>but not</em> for the elements of
<i class="arg">vals</i>.</p></dd>
<dt><b class="method">attmatch</b> <i class="arg">attr</i> <i class="arg">match</i></dt>
<dd><p>Same as <b class="method">withatt</b>, but <b class="cmd">string match</b> is used as the &quot;==&quot;
operator, and <i class="arg">match</i> is the pattern checked for.</p>
<p><em>Note</em> that <i class="arg">match</i> is a interpreted as a partial argument
<em>list</em> for <b class="cmd">string match</b>. This means that it is
interpreted as a list containing the pattern, and the pattern element
can be preceded by options understand by <b class="cmd">string match</b>, like
<b class="option">-nocase</b>.
This is especially important should the pattern contain spaces. It has
to be wrapped into a list for correct interpretation by this operator</p></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Attribute Mutators</a></h3>
<p>These operators change node attributes within the underlying tree. In
other words, all these operators have <i class="term">side effects</i>.</p>
<dl class="doctools_definitions">
<dt><b class="method">set</b> <i class="arg">attr</i> <i class="arg">val</i></dt>
<dd><p>Sets the attribute <i class="arg">attr</i> to the value <i class="arg">val</i>, for all nodes
<b class="variable">N</b> in the node set.
The operator will fail if a node does not have an attribute named
<i class="arg">attr</i>. The tree will be left in a partially modified state.</p></dd>
<dt><b class="method">unset</b> <i class="arg">attr</i></dt>
<dd><p>Unsets the attribute <i class="arg">attr</i>, for all nodes <b class="variable">N</b> in the node
set.
The operator will fail if a node does not have an attribute named
<i class="arg">attr</i>. The tree will be left in a partially modified state.</p></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Attribute String Accessors</a></h3>
<p>These operators retrieve the values of node attributes from the
underlying tree. The collected results are stored in the node set, but
are not actually nodes.</p>
<p>In other words, they redefine the semantics of the node set stored by
the query object to contain non-node data after their completion.</p>
<p>The query interpreter will terminate after it has finished processing
one of these operators, silently discarding any later query elements.
It also means that our talk about maintenance of a node set is not
quite true. It is a node set while the interpreter is processing
commands, but can be left as an attribute value set at the end of
query processing.</p>
<dl class="doctools_definitions">
<dt><b class="method">string</b> <i class="arg">op</i> <i class="arg">attr</i></dt>
<dd><p>Applies the string operator <i class="arg">op</i> to the attribute named
<i class="arg">attr</i>, for all nodes <b class="variable">N</b> in the node set, collects the
results of that application and places them into the node set.</p>
<p>The operator will fail if a node does not have an attribute named
<i class="arg">attr</i>.</p>
<p>The argument <i class="arg">op</i> is interpreted as partial argument list for the
builtin command <b class="cmd"><a href="../../../../index.html#key280">string</a></b>.  Its first word has to be any of the
sub-commands understood by <b class="cmd"><a href="../../../../index.html#key280">string</a></b>.  This has to be followed by
all arguments required for the subcommand, except the last.  that last
argument is supplied by the attribute value.</p></dd>
<dt><b class="method">get</b> <i class="arg">pattern</i></dt>
<dd><p>For all nodes <b class="variable">N</b> in the node set it determines all their
attributes with names matching the glob <i class="arg">pattern</i>, then the values
of these attributes, at last it replaces the node set with the list of
these attribute values.</p></dd>
<dt><b class="method">attlist</b></dt>
<dd><p>This is a convenience definition for the operator
<b class="method">getvals *</b>. In other words, it replaces the node set with a
list of the attribute values for all attributes for all nodes <b class="variable">N</b>
in the node set.</p></dd>
<dt><b class="method">attrs</b> <i class="arg">glob</i></dt>
<dd><p>Replaces the current node set with a list of attribute lists, one
attribute list per for all nodes <b class="variable">N</b> in the node set.</p></dd>
<dt><b class="method">attval</b> <i class="arg">attname</i></dt>
<dd><p>Reduces the current node set with the operator <b class="method">hasatt</b>, and
then replaces it with a list containing the values of the attribute
named <i class="arg">attname</i> for all nodes <b class="variable">N</b> in the node set.</p></dd>
</dl>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Sub-queries</a></h3>
<p>Sub-queries yield node sets which are then used to augment, reduce or
replace the current node set.</p>
<dl class="doctools_definitions">
<dt><b class="method">andq</b> <i class="arg">query</i></dt>
<dd><p>Replaces the node set with the set-intersection of the node set
generated by the sub-query <i class="arg">query</i> and itself.</p>
<p>The execution of the sub-query uses the current node set as its own
initial node set.</p></dd>
<dt><b class="method">orq</b> <i class="arg">query</i></dt>
<dd><p>Replaces the node set with the set-union of the node set generated by
the sub-query <i class="arg">query</i> and itself. Duplicate nodes are removed.</p>
<p>The execution of the sub-query uses the current node set as its own
initial node set.</p></dd>
<dt><b class="method">notq</b> <i class="arg">query</i></dt>
<dd><p>Replaces the node set with the set of nodes generated by the sub-query
<i class="arg">query</i> which are also not in the current node set. In other word
the set difference of itself and the node set generated by the
sub-query.</p>
<p>The execution of the sub-query uses the current node set as its own
initial node set.</p></dd>
</dl>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">Node Set Operators</a></h3>
<p>These operators change the node set directly, without referring to the
tree.</p>
<dl class="doctools_definitions">
<dt><b class="method">unique</b></dt>
<dd><p>Removes duplicate nodes from the node set, preserving order. In other
words, the earliest occurrence of a node handle is preserved, every
other occurrence is removed.</p></dd>
<dt><b class="method">select</b></dt>
<dd><p>Replaces the current node set with a node set containing only the
first node from the current node set</p></dd>
<dt><b class="method">transform</b> <i class="arg">query</i> <i class="arg">var</i> <i class="arg">body</i></dt>
<dd><p>First it interprets the sub-query <i class="arg">query</i>, using the current node
set as its initial node set.
Then it iterates over the result of that query, binding the handle of
each node to the variable named in <i class="arg">var</i>, and executing the script
<i class="arg">body</i>.
The collected results of these executions is made the new node set,
replacing the current one.</p>
<p>The script <i class="arg">body</i> is executed in the context of the caller.</p></dd>
<dt><b class="method">map</b> <i class="arg">var</i> <i class="arg">body</i></dt>
<dd><p>Iterates over the current node set, binding the handle of each node to
the variable named in <i class="arg">var</i>, and executing the script <i class="arg">body</i>.
The collected results of these executions is made the new node set,
replacing the current one.</p>
<p>The script <i class="arg">body</i> is executed in the context of the caller.</p></dd>
<dt><b class="method">quote</b> <i class="arg">val</i></dt>
<dd><p>Appends the literal value <i class="arg">val</i> to the current node set.</p></dd>
<dt><b class="method">replace</b> <i class="arg">val</i></dt>
<dd><p>Replaces the current node set with the literal list value <i class="arg">val</i>.</p></dd>
</dl>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">Node Set Iterators</a></h3>
<dl class="doctools_definitions">
<dt><b class="method">foreach</b> <i class="arg">query</i> <i class="arg">var</i> <i class="arg">body</i></dt>
<dd><p>Interprets the sub-query <i class="arg">query</i>, then performs the equivalent of
operator <b class="method">over</b> on the nodes in the node set created by that
query. The current node set is not changed, except through side
effects from the script <i class="arg">body</i>.</p>
<p>The script <i class="arg">body</i> is executed in the context of the caller.</p></dd>
<dt><b class="method">with</b> <i class="arg">query</i> <i class="arg">body</i></dt>
<dd><p>Interprets the <i class="arg">query</i>, then runs the script <i class="arg">body</i> on the
node set generated by the query. At last it restores the current node
set as it was before the execution of the query.</p>
<p>The script <i class="arg">body</i> is executed in the context of the caller.</p></dd>
<dt><b class="method">over</b> <i class="arg">var</i> <i class="arg">body</i></dt>
<dd><p>Executes the script <i class="arg">body</i> for each node in the node set, with the
variable named by <i class="arg">var</i> bound to the name of the current node.
The script <i class="arg">body</i> is executed in the context of the caller.</p>
<p>This is like the builtin <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b>, with the node set as the
source of the list to iterate over.</p>
<p>The results of executing the <i class="arg">body</i> are ignored.</p></dd>
<dt><b class="method">delete</b></dt>
<dd><p>Deletes all the nodes contained in the current node set from the tree.</p></dd>
</dl>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Typed node support</a></h3>
<p>These filters and accessors assume the existence of an attribute
called <b class="const">@type</b>, and are short-hand forms useful for cost-like
tree query, html tree editing, and so on.</p>
<dl class="doctools_definitions">
<dt><b class="method">nodetype</b></dt>
<dd><p>Returns the node type of nodes.
Attribute string accessor. This is equivalent to</p>
<pre class="doctools_example">get @type</pre>
</dd>
<dt><b class="method">oftype</b> <i class="arg">t</i></dt>
<dd><p>Reduces the node set to nodes whose type is equal to <i class="arg">t</i>, with
letter case ignored.</p></dd>
<dt><b class="method">nottype</b> <i class="arg">t</i></dt>
<dd><p>Reduces the node set to nodes whose type is not equal to <i class="arg">t</i>, with
letter case ignored.</p></dd>
<dt><b class="method">oftypes</b> <i class="arg">attrs</i></dt>
<dd><p>Reduces set to nodes whose @type is an element in the list <i class="arg">attrs</i>
of types. The value of @type is used as a glob pattern, and letter
case is relevant.</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Examples</a></h2>
<p>... TODO ...</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.tcl.tk/COST">COST</a> on the Tcler's Wiki.</p></li>
<li><p><a href="http://wiki.tcl.tk/treeql">TreeQL</a> on the Tcler's Wiki. Discuss
this package there.</p></li>
</ol>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>treeql</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key819">Cost</a>, <a href="../../../../index.html#key816">DOM</a>, <a href="../../../../index.html#key818">TreeQL</a>, <a href="../../../../index.html#key817">XPath</a>, <a href="../../../../index.html#key821">XSLT</a>, <a href="../../../../index.html#key822">structured queries</a>, <a href="../../../../index.html#key300">tree</a>, <a href="../../../../index.html#key820">tree query language</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Colin McCormack &lt;coldstore@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/try/tcllib_throw.html.













































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166

<div class='fossil-doc' data-title='throw - Forward compatibility implementation of [throw]'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">throw(n) 1 tcllib &quot;Forward compatibility implementation of [throw]&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>throw - throw - Throw an error exception with a message</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">throw <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::throw</b> <i class="arg">error_code</i> <i class="arg">error_message</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a forward-compatibility implementation of Tcl
8.6's throw command (TIP 329), for Tcl 8.5. The code was
directly pulled from Tcl 8.6 revision ?, when try/finally was
implemented as Tcl procedure instead of in C.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::throw</b> <i class="arg">error_code</i> <i class="arg">error_message</i></a></dt>
<dd><p>throw is merely a reordering of the arguments of the error command. It throws an error with the indicated 
error code and error message.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<pre class="doctools_example">
<b class="cmd">throw</b> {MYERROR CODE} &quot;My error message&quot;
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>try</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>error(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key161">error</a>, <a href="../../../../index.html#key187">return</a>, <a href="../../../../index.html#key188">throw</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Miguel Mart&iacute;nez L&oacute;pez, BSD licensed</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/try/tcllib_try.html.















































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231

<div class='fossil-doc' data-title='try - Forward compatibility implementation of [try]'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">try(n) 1 tcllib &quot;Forward compatibility implementation of [try]&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>try - try - Trap and process errors and exceptions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">try <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::try</b> <i class="arg">body</i> <span class="opt">?<i class="arg">handler...</i>?</span> <span class="opt">?<b class="method">finally</b> <i class="arg">script</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a forward-compatibility implementation of Tcl
8.6's try/finally command (TIP 329), for Tcl 8.5. The code was
directly pulled from Tcl 8.6 revision ?, when try/finally was
implemented as Tcl procedure instead of in C.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::try</b> <i class="arg">body</i> <span class="opt">?<i class="arg">handler...</i>?</span> <span class="opt">?<b class="method">finally</b> <i class="arg">script</i>?</span></a></dt>
<dd><p>This command executes the script <i class="arg">body</i> and, depending on what the
outcome of that script is (normal exit, error, or some other
exceptional result), runs a handler script to deal with the case. Once
that has all happened, if the <b class="method">finally</b> clause is present, the
<i class="arg">script</i> it includes will be run and the result of the handler (or
the <i class="arg">body</i> if no handler matched) is allowed to continue to
propagate. Note that the <b class="method">finally</b> clause is processed even if
an error occurs and irrespective of which, if any, <i class="arg">handler</i> is
used.</p>
<p>The <i class="arg">handler</i> clauses are each expressed as several words,
and must have one of the following forms:</p>
<dl class="doctools_definitions">
<dt><b class="method">on</b> <i class="arg">code variableList script</i></dt>
<dd><p>This clause matches if the evaluation of <i class="arg">body</i> completed with the
exception code <i class="arg">code</i>. The <i class="arg">code</i> may be expressed as an
integer or one of the following literal words:
<b class="const">ok</b>, <b class="const">error</b>, <b class="const">return</b>, <b class="const">break</b>, or
<b class="const">continue</b>. Those literals correspond to the integers 0 through
4 respectively.</p></dd>
<dt><b class="method">trap</b> <i class="arg">pattern variableList script</i></dt>
<dd><p>This clause matches if the evaluation of <i class="arg">body</i> resulted in an
error and the prefix of the <b class="option">-errorcode</b> from the interpreter's
status dictionary is equal to the <i class="arg">pattern</i>. The number of prefix
words taken from the <b class="option">-errorcode</b> is equal to the list-length
of <i class="arg">pattern</i>, and inter-word spaces are normalized in both the
<b class="option">-errorcode</b> and <i class="arg">pattern</i> before comparison.</p>
<p>The <i class="arg">variableList</i> word in each <i class="arg">handler</i> is always
interpreted as a list of variable names. If the first word of the list
is present and non-empty, it names a variable into which the result of
the evaluation of <i class="arg">body</i> (from the main <b class="cmd">try</b>) will be placed;
this will contain the human-readable form of any errors. If the second
word of the list is present and non-empty, it names a variable into
which the options dictionary of the interpreter at the moment of
completion of execution of <i class="arg">body</i> will be placed.</p>
<p>The <i class="arg">script</i> word of each <i class="arg">handler</i> is also always
interpreted the same: as a Tcl script to evaluate if the clause is
matched. If <i class="arg">script</i> is a literal <b class="const">-</b> and the <i class="arg">handler</i>
is not the last one, the <i class="arg">script</i> of the following <i class="arg">handler</i>
is invoked instead (just like with the <b class="cmd">switch</b> command).</p>
<p>Note that <i class="arg">handler</i> clauses are matched against in order,
and that the first matching one is always selected.
At most one <i class="arg">handler</i> clause will selected.
As a consequence, an <b class="method">on error</b> will mask any subsequent
<b class="method">trap</b> in the <b class="cmd">try</b>. Also note that <b class="method">on error</b> is
equivalent to <b class="method">trap {}</b>.</p>
<p>If an exception (i.e. any non-<b class="const">ok</b> result) occurs during
the evaluation of either the <i class="arg">handler</i> or the <b class="method">finally</b>
clause, the original exception's status dictionary will be added to
the new exception's status dictionary under the <b class="option">-during</b> key.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<p>Ensure that a file is closed no matter what:</p>
<pre class="doctools_example">
set f [open /some/file/name a]
<b class="cmd">try</b> {
    puts \$f &quot;some message&quot;
    # ...
} <b class="cmd">finally</b> {
    close \$f
}
</pre>
<p>Handle different reasons for a file to not be openable for reading:</p>
<pre class="doctools_example">
<b class="cmd">try</b> {
    set f [open /some/file/name]
} <b class="method">trap</b> {POSIX EISDIR} {} {
    puts &quot;failed to open /some/file/name: it's a directory&quot;
} <b class="method">trap</b> {POSIX ENOENT} {} {
    puts &quot;failed to open /some/file/name: it doesn't exist&quot;
}
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>try</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>catch(n), error(n), return(n), <a href="tcllib_throw.html">throw(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key158">cleanup</a>, <a href="../../../../index.html#key161">error</a>, <a href="../../../../index.html#key162">exception</a>, <a href="../../../../index.html#key160">final</a>, <a href="../../../../index.html#key159">resource management</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Donal K. Fellows, BSD licensed</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/udpcluster/udpcluster.html.































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<div class='fossil-doc' data-title='udpcluster - Lightweight UDP based tool for cluster node discovery'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">udpcluster(n) 0.3 tcllib &quot;Lightweight UDP based tool for cluster node discovery&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>udpcluster - UDP Peer-to-Peer cluster</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">ip</b></li>
<li>package require <b class="pkgname">nettool</b></li>
<li>package require <b class="pkgname">comm</b></li>
<li>package require <b class="pkgname">interp</b></li>
<li>package require <b class="pkgname">dicttool</b></li>
<li>package require <b class="pkgname">cron</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is a lightweight alternative to Zeroconf. It utilizes UDP packets to
populate a table of services provided by each node on a local network. Each participant
broadcasts a key/value list in plain UTF-8 which lists what ports are open, and what
protocols are expected on those ports. Developers are free to add any additional key/value
pairs beyond those.</p>
<p>Using udpcluster.</p>
<p>For every service you wish to publish invoke:</p>
<pre class="doctools_example">
cluster::publish echo@[cluster::macid] {port 10000 protocol echo}
</pre>
<p>To query what services are available on the local network:</p>
<pre class="doctools_example">
set results [cluster::search PATTERN]
# And inside that result...
echo@LOCALMACID {
   port 10000
   protocol echo
}
</pre>
<p>To unpublish a service:</p>
<pre class="doctools_example">
cluster::unpublish echo@[cluster::macid]
</pre>
<p>Results will
Historical Notes:</p>
<p>This tool was originally known as nns::cluster, but as development progressed, it was
clear that it wasn't interacting with any of the other facilities in NNS.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key65">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2016 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/uev/uevent.html.











































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<div class='fossil-doc' data-title='uevent - User events'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uevent(n) 0.3.1 tcllib &quot;User events&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uevent - User events</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">uevent <span class="opt">?0.3.1?</span></b></li>
<li>package require <b class="pkgname">logger</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::uevent::bind</b> <i class="arg">tag</i> <i class="arg">event</i> <i class="arg">command</i></a></li>
<li><a href="#2"><b class="cmd"><a href="../../../../index.html#key275">command</a></b> <i class="arg">tag</i> <i class="arg">event</i> <i class="arg">details</i></a></li>
<li><a href="#3"><b class="cmd">::uevent::unbind</b> <i class="arg">token</i></a></li>
<li><a href="#4"><b class="cmd">::uevent::generate</b> <i class="arg">tag</i> <i class="arg">event</i> <span class="opt">?<i class="arg">details</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::uevent::list</b></a></li>
<li><a href="#6"><b class="cmd">::uevent::list</b> <i class="arg">tag</i></a></li>
<li><a href="#7"><b class="cmd">::uevent::list</b> <i class="arg">tag</i> <i class="arg">event</i></a></li>
<li><a href="#8"><b class="cmd">::uevent::watch::tag::add</b> <i class="arg">pattern</i> <i class="arg">command</i></a></li>
<li><a href="#9"><b class="cmd">{*}command</b> <b class="const">bound</b> <i class="arg">tag</i></a></li>
<li><a href="#10"><b class="cmd">{*}command</b> <b class="const">unbound</b> <i class="arg">tag</i></a></li>
<li><a href="#11"><b class="cmd">::uevent::watch::tag::remove</b> <i class="arg">token</i></a></li>
<li><a href="#12"><b class="cmd">::uevent::watch::event::add</b> <i class="arg">tag_pattern</i> <i class="arg">event_pattern</i> <i class="arg">command</i></a></li>
<li><a href="#13"><b class="cmd">{*}command</b> <b class="const">bound</b> <i class="arg">tag</i> <i class="arg">event</i></a></li>
<li><a href="#14"><b class="cmd">{*}command</b> <b class="const">unbound</b> <i class="arg">tag</i> <i class="arg">event</i></a></li>
<li><a href="#15"><b class="cmd">::uevent::watch::event::remove</b> <i class="arg">token</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a general facility for the handling of user
events. Allows the binding of arbitrary commands to arbitrary events
on arbitrary tags, removal of bindings, and event generation.</p>
<p>The main difference to the event system built into the Tcl/Tk core is
that the latter can generate only virtual events, and only for
widgets. It is not possible to use the builtin facilities to bind to
events on arbitrary (pseudo-)objects, nor is it able to generate
events for such.</p>
<p>Here we can, by assuming that each object in question is represented
by its own tag. Which is possible as we allow arbitrary tags.</p>
<p>More differences:</p>
<ol class="doctools_enumerated">
<li><p>The package uses only a two-level hierarchy, tags and events, to
handle everything, whereas the Tcl/Tk system uses three levels, i.e.
objects, tags, and events, with a n:m relationship between objects and
tags.</p></li>
<li><p>This package triggers all bound commands for a tag/event combination,
and they are independent of each other. A bound command cannot force
the event processing core to abort the processing of command coming
after it.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports eight commands, as specified below. Note that when
the package is used from within Tcl 8.5+ all the higher commands are
ensembles, i.e. the :: separators can be replaceed by spaces.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::uevent::bind</b> <i class="arg">tag</i> <i class="arg">event</i> <i class="arg">command</i></a></dt>
<dd><p>Using this command registers the <i class="arg">command</i> prefix to be triggered
when the <i class="arg">event</i> occurs for the <i class="arg">tag</i>. The result of the
command is an opaque token representing the binding. Note that if the
same combination of &lt;<i class="arg">tag</i>,<i class="arg">event</i>,<i class="arg">command</i>&gt; is used
multiple times the same token is returned by every call.</p>
<p>The signature of the <i class="arg">command</i> prefix is</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd"><a href="../../../../index.html#key275">command</a></b> <i class="arg">tag</i> <i class="arg">event</i> <i class="arg">details</i></a></dt>
<dd></dd>
</dl>
<p>where <i class="arg">details</i> contains the argument(s) of the event. Its
contents are event specific and have to be agreed upon between actual
event generator and consumer. This package simply transfers the
information and does not perform any processing beyond that.</p></dd>
<dt><a name="3"><b class="cmd">::uevent::unbind</b> <i class="arg">token</i></a></dt>
<dd><p>This command releases the event binding represented by the
<i class="arg">token</i>. The token has to be the result of a call to
<b class="cmd">::uevent::bind</b>. The result of the command is the empty string.</p></dd>
<dt><a name="4"><b class="cmd">::uevent::generate</b> <i class="arg">tag</i> <i class="arg">event</i> <span class="opt">?<i class="arg">details</i>?</span></a></dt>
<dd><p>This command generates an <i class="arg">event</i> for the <i class="arg">tag</i>, triggering
all commands bound to that combination. The <i class="arg">details</i> argument is
simply passed unchanged to all event handlers. It is the
responsibility of the code generating and consuming the event to have
an agreement about the format and contents of the information carried
therein. The result of the command is the empty string.</p>
<p>Note that all bound commands are triggered, independently of each
other. The event handlers cannot assume a specific order. They are
also <em>not</em> called synchronously with the invokation of this
command, but simply put into the event queue for processing when the
system returns to the event loop.</p>
<p>Generating an event for an unknown tag, or for a
&lt;<i class="arg">tag</i>,<i class="arg">event</i>&gt; combination which has no commands bound to it
is allowed, such calls will be ignored.</p></dd>
<dt><a name="5"><b class="cmd">::uevent::list</b></a></dt>
<dd><p>In this form the command returns a list containing the names of all
tags which have events with commands bound to them.</p></dd>
<dt><a name="6"><b class="cmd">::uevent::list</b> <i class="arg">tag</i></a></dt>
<dd><p>In this format the command returns a list containing the names of all
events for the <i class="arg">tag</i> with commands bound to them. Specifying an
unknown tag, i.e. a tag without event and commands, will cause the
command to throw an error.</p></dd>
<dt><a name="7"><b class="cmd">::uevent::list</b> <i class="arg">tag</i> <i class="arg">event</i></a></dt>
<dd><p>In this format the command returns a list containing all commands
bound to the <i class="arg">event</i> for the <i class="arg">tag</i>. Specifying an unknown tag
or unknown event, will cause the command to throw an error.</p></dd>
<dt><a name="8"><b class="cmd">::uevent::watch::tag::add</b> <i class="arg">pattern</i> <i class="arg">command</i></a></dt>
<dd><p>This command sets up a sort of reverse events. Events generated,
i.e. the <i class="arg">command</i> prefix invoked, when observers bind to and
unbind from specific tags.</p>
<p>Note that the command prefix is only invoked twice per tag,
first when the first command is bound to any event of the tag, and
second when the last command bound to the tag is removed.</p>
<p>The signature of the <i class="arg">command</i> prefix is</p>
<dl class="doctools_definitions">
<dt><a name="9"><b class="cmd">{*}command</b> <b class="const">bound</b> <i class="arg">tag</i></a></dt>
<dd></dd>
<dt><a name="10"><b class="cmd">{*}command</b> <b class="const">unbound</b> <i class="arg">tag</i></a></dt>
<dd></dd>
</dl>
<p>The result of the command is a token representing the watcher.</p></dd>
<dt><a name="11"><b class="cmd">::uevent::watch::tag::remove</b> <i class="arg">token</i></a></dt>
<dd><p>This command removes a watcher for (un)bind events on tags.</p>
<p>The result of the command is the empty string.</p></dd>
<dt><a name="12"><b class="cmd">::uevent::watch::event::add</b> <i class="arg">tag_pattern</i> <i class="arg">event_pattern</i> <i class="arg">command</i></a></dt>
<dd><p>This command sets up a sort of reverse events. Events generated,
i.e. the <i class="arg">command</i> prefix invoked, when observers bind to and
unbind from specific combinations of tags and events.</p>
<p>Note that the command prefix is only invoked twice per
tag/event combination, first when the first command is bound to it,
and second when the last command bound to the it is removed.</p>
<p>The signature of the <i class="arg">command</i> prefix is</p>
<dl class="doctools_definitions">
<dt><a name="13"><b class="cmd">{*}command</b> <b class="const">bound</b> <i class="arg">tag</i> <i class="arg">event</i></a></dt>
<dd></dd>
<dt><a name="14"><b class="cmd">{*}command</b> <b class="const">unbound</b> <i class="arg">tag</i> <i class="arg">event</i></a></dt>
<dd></dd>
</dl>
<p>The result of the command is a token representing the watcher.</p></dd>
<dt><a name="15"><b class="cmd">::uevent::watch::event::remove</b> <i class="arg">token</i></a></dt>
<dd><p>This command removes a watcher for (un)bind events on tag/event
combinations.</p>
<p>The result of the command is the empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uevent</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../hook/hook.html">hook(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key714">bind</a>, <a href="../../../../index.html#key542">event</a>, <a href="../../../../index.html#key713">generate event</a>, <a href="../../../../index.html#key680">hook</a>, <a href="../../../../index.html#key712">unbind</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/uev/uevent_onidle.html.



































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<div class='fossil-doc' data-title='uevent::onidle - User events'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uevent::onidle(n) 0.1 tcllib &quot;User events&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uevent::onidle - Request merging and deferal to idle time</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Examples</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">uevent::onidle <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">logger</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::uevent::onidle</b> <i class="arg">objectName</i> <i class="arg">commandprefix</i></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">request</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects which can merge multiple requestes for
an action and execute the action the moment the system (event loop)
becomes idle. The action to be run is configured during object
construction.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports a class, <b class="class">uevent::onidle</b>, as specified
below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::uevent::onidle</b> <i class="arg">objectName</i> <i class="arg">commandprefix</i></a></dt>
<dd><p>The command creates a new <i class="term">onidle</i> object with an associated
global Tcl command whose name is <i class="arg">objectName</i>.  This command may
be used to invoke various operations on the object.</p>
<p>The <i class="arg">commandprefix</i> is the action to perform when the event loop
is idle and the user asked for it using the method <b class="method">request</b>
(See below).</p></dd>
</dl>
<p>The object commands created by the class commands above have
the form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">request</b></a></dt>
<dd><p>This method requests the execution of the command prefix specified
during the construction of <i class="arg">objectName</i> the next time the event
loop is idle. Multiple requests are merged and cause only one
execution of the command prefix.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Examples</a></h2>
<p>Examples of this type of deferal are buried in the (C-level)
implementations all the Tk widgets, defering geometry calculations and
window redraw activity in this manner.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uevent</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key543">deferal</a>, <a href="../../../../index.html#key542">event</a>, <a href="../../../../index.html#key541">idle</a>, <a href="../../../../index.html#key539">merge</a>, <a href="../../../../index.html#key538">on-idle</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/units/units.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469

<div class='fossil-doc' data-title='units - Convert and manipulate quantities with units'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">units(n) 1.2 tcllib &quot;Convert and manipulate quantities with units&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>units - unit conversion</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">UNIT STRING FORMAT</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Example Valid Unit Strings</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">SI UNITS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection2">SI Base Units</a></li>
<li class="doctools_subsection"><a href="#subsection3">SI Derived Units with Special Names</a></li>
<li class="doctools_subsection"><a href="#subsection4">SI Prefixes</a></li>
<li class="doctools_subsection"><a href="#subsection5">Non-SI Units</a></li>
<li class="doctools_subsection"><a href="#subsection6">Quantities and Derived Units with Special Names</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">AUTHORS</a></li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.1</b></li>
<li>package require <b class="pkgname">units <span class="opt">?2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::units::convert</b> <i class="arg">value</i> <i class="arg">targetUnits</i></a></li>
<li><a href="#2"><b class="cmd">::units::reduce</b> <i class="arg">unitString</i></a></li>
<li><a href="#3"><b class="cmd">::units::new</b> <i class="arg">name</i> <i class="arg">baseUnits</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This library provides a conversion facility from a variety of
scientific and engineering shorthand notations into floating point
numbers.  This allows application developers to easily convert
values with different units into uniformly scaled numbers.</p>
<p>The units conversion facility is also able to convert between
compatible units.  If, for example, a application is expecting a value
in <em>ohms</em> (Resistance), and the user specifies units of
<em>milliwebers/femtocoulomb</em>, the conversion routine will
handle it appropriately.  An error will be generated if an incorrect
conversion is attempted.</p>
<p>Values are scaled from one set of units to another by dimensional
analysis.  Both the value units and the target units are reduced into
primitive units and a scale factor.  Units are checked for
compatibility, and the scale factors are applied by multiplication and
division.  This technique is extremely flexible and quite robust.</p>
<p>New units and new unit abbreviations can be defined in terms of
existing units and abbreviations.  It is also possible to define a new
primitive unit, although that will probably be unnecessary.  New units
will most commonly be defined to accommodate non-SI measurement
systems, such as defining the unit <em>inch</em> as <em>2.54 cm</em>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::units::convert</b> <i class="arg">value</i> <i class="arg">targetUnits</i></a></dt>
<dd><p>Converts the <i class="arg">value</i> string into a floating point number, scaled to the
specified <i class="arg">targetUnits</i>.  The <i class="arg">value</i> string may contain a
number and units.  If units are specified, then they must be
compatible with the <i class="arg">targetUnits</i>.  If units are not specified
for the <i class="arg">value</i>, then it will be scaled to the target units.  For
example,</p>
<pre class="doctools_example">
% ::units::convert &quot;2.3 miles&quot; km
3.7014912
% ::units::convert 300m/s miles/hour
671.080887616
% ::units::convert &quot;1.0 m kg/s^2&quot; newton
1.0
% ::units::convert 1.0 millimeter
1000.0
</pre>
</dd>
<dt><a name="2"><b class="cmd">::units::reduce</b> <i class="arg">unitString</i></a></dt>
<dd><p>Returns a unit string consisting of a scale factor followed by a space
separated list of sorted and reduced primitive units.  The reduced
unit string may include a forward-slash (separated from the
surrounding primitive subunits by spaces) indicating that the
remaining subunits are in the denominator.  Generates an error if the
<i class="arg">unitString</i> is invalid.</p>
<pre class="doctools_example">
% ::units::reduce pascal
1000.0 gram / meter second second
</pre>
</dd>
<dt><a name="3"><b class="cmd">::units::new</b> <i class="arg">name</i> <i class="arg">baseUnits</i></a></dt>
<dd><p>Creates a new unit conversion with the specified name.  The new unit
<i class="arg">name</i> must be only alphabetic (upper or lower case) letters.
The <i class="arg">baseUnits</i> string can consist of any valid units conversion
string, including constant factors, numerator and denominator parts,
units with prefixes, and exponents.  The baseUnits may contain any
number of subunits, but it must reduce to primitive units.  BaseUnits
could also be the string <em>-primitive</em> to represent a new
kind of quantity which cannot be derived from other units.  But you
probably would not do that unless you have discovered some kind of new
universal property.</p>
<pre class="doctools_example">
% ::units::new furlong &quot;220 yards&quot;
% ::units::new fortnight &quot;14 days&quot;
% ::units::convert 100m/s furlongs/fortnight
601288.475303
</pre>
</dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">UNIT STRING FORMAT</a></h2>
<p>Value and unit string format is quite flexible.  It is possible to
define virtually any combination of units, prefixes, and powers.
Valid unit strings must conform to these rules.</p>
<ul class="doctools_itemized">
<li><p>A unit string consists of an optional scale factor followed by zero or
more subunits.  The scale factor must be a valid floating point
number, and may or may not be separated from the subunits.  The scale
factor could be negative.</p></li>
<li><p>Subunits are separated form each other by one or more separator
characters, which are space (&quot; &quot;), hyphen (&quot;-&quot;), asterisk (&quot;*&quot;), and
forward-slash (&quot;/&quot;).  Sure, go ahead and complain about using a minus
sign (&quot;-&quot;) to represent multiplication.  It just isn't sound
mathematics, and, by rights, we should require everyone to use the
asterisk (&quot;*&quot;) to separate all units.  But the bottom line is that
complex unit strings like <em>m-kg/s^2</em> are pleasantly
readable.</p></li>
<li><p>The forward-slash seperator (&quot;/&quot;) indicates that following subunits are
in the denominator.  There can be at most one forward-slash separator.</p></li>
<li><p>Subunits can be floating point scale factors, but with the exception
of the leading scale factor, they must be surrounded by valid
separators.  Subunit scale factors cannot be negative. (Remember that
the hyphen is a unit separator.)</p></li>
<li><p>Subunits can be valid units or abbreviations.  They may include a
prefix.  They may include a plural suffix &quot;s&quot; or &quot;es&quot;.  They may also
include a power string denoted by a circumflex (&quot;^&quot;), followed by a
integer, after the unit name (or plural suffix, if there is one).
Negative exponents are not allowed.  (Remember that the hyphen is a
unit separator.)</p></li>
</ul>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Example Valid Unit Strings</a></h3>
<pre class="doctools_example">
Unit String              Reduced Unit String
------------------------------------------------------------
meter                    1.0 meter
kilometer                1000.0 meter
km                       1000.0 meter
km/s                     1000.0 meter / second
/microsecond             1000000.0 / second
/us                      1000000.0 / second
kg-m/s^2                 1000.0 gram meter / second second
30second                 30.0 second
30 second                30.0 second
30 seconds               30.0 second
200*meter/20.5*second    9.75609756098 meter / second
</pre>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">SI UNITS</a></h2>
<p>The standard SI units are predefined according to <em>NIST Special
Publication 330</em>.  Standard units for both SI Base Units (Table
1) and SI Derived Units with Special Names (Tables 3a and 3b) are
included here for reference.  Each standard unit name and abbreviation
are included in this package.</p>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">SI Base Units</a></h3>
<pre class="doctools_example">
Quantity                Unit Name    Abbr.
---------------------------------------------
Length                  meter        m
Mass                    kilogram     kg
Time                    second       s
Current                 ampere       A
Temperature             kelvin       K
Amount                  mole         mol
Luminous Intensity      candela      cd
</pre>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">SI Derived Units with Special Names</a></h3>
<pre class="doctools_example">
Quantity                Unit Name    Abbr.   Units     Base Units
--------------------------------------------------------------------
plane angle             radian      rad     m/m       m/m
solid angle             steradian   sr      m^2/m^2   m^2/m^2
frequency               hertz       Hz                /s
force                   newton      N                 m-kg/s^2
pressure                pascal      Pa      N/m^2     kg/m-s^2
energy, work            joule       J       N-m       m^2-kg/s^2
power, radiant flux     watt        W       J/s       m^2-kg/s^3
electric charge         coulomb     C                 s-A
electric potential      volt        V       W/A       m^2-kg/s^3-A
capacitance             farad       F       C/V       s^4-A^2/m^2-kg
electric resistance     ohm                 V/A       m^2-kg/s^3-A^2
electric conductance    siemens     S       A/V       s^3-A^2/m^2-kg
magnetic flux           weber       Wb      V-s       m^2-kg/s^2-A
magnetic flux density   tesla       T       Wb/m^2    kg/s^2-A
inductance              henry       H       Wb/A      m^2-kg/s^2-A^2
luminous flux           lumen       lm                cd-sr
illuminance             lux         lx      lm/m^2    cd-sr/m^2
activity (of a
radionuclide)           becquerel   Bq                /s
absorbed dose           gray        Gy      J/kg      m^2/s^2
dose equivalent         sievert     Sv      J/kg      m^2/s^2
</pre>
<p>Note that the SI unit kilograms is actually implemented as grams
because 1e-6 kilogram = 1 milligram, not 1 microkilogram.  The
abbreviation for Electric Resistance (ohms), which is the omega
character, is not supported.</p>
<p>Also note that there is no support for Celsius or Farenheit
temperature.  The units conversion routines can only scale values
with multiplication and division, so it is not possible to convert
from thermodynamic temperature (kelvins) to absolute degrees Celsius
or Farenheit.  Conversion of thermodynamic quantities, such as
thermal expansion (per unit temperature), however, are easy to add
to the units library.</p>
<p>SI Units can have a multiple or sub-multiple prefix.  The prefix or its
abbreviation should appear before the unit, without spaces.  Compound
prefixes are not allowed, and a prefix should never be used alone.
These prefixes are defined in Table 5 of <em>Special Publication
330</em>.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">SI Prefixes</a></h3>
<pre class="doctools_example">
Prefix Name     Abbr.   Factor
---------------------------------------
yotta           Y       1e24
zetta           Z       1e21
exa             E       1e18
peta            P       1e15
tera            T       1e12
giga            G       1e9
mega            M       1e6
kilo            k       1e3
hecto           h       1e2
deka            da      1e1
deca                    1e1
deci            d       1e-1
centi           c       1e-2
milli           m       1e-3
micro           u       1e-6
nano            n       1e-9
pico            p       1e-12
femto           f       1e-15
atto            a       1e-18
zepto           z       1e-21
yocto           y       1e-24
</pre>
<p>Note that we define the same prefix with both the USA (&quot;deka&quot;) and
non-USA (&quot;deca&quot;) spellings.  Also note that we take the liberty of
allowing &quot;micro&quot; to be typed as a &quot;u&quot; instead of the Greek character
mu.</p>
<p>Many non-SI units are commonly used in applications.  Appendix B.8 of
<em>NIST Special Publication 811</em> lists many non-SI conversion
factors.  It is not possible to include all possible unit definitions
in this package.  In some cases, many different conversion factors
exist for a given unit, depending on the context. (The appendix lists
over 40 conversions for British thermal units!)  Application specific
conversions can always be added using the <b class="cmd">new</b>
command, but some well known and often used conversions are included
in this package.</p>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Non-SI Units</a></h3>
<pre class="doctools_example">
Unit Name            Abbr.    Base Units
--------------------------------------------------
angstrom                      1.0E-10 m
astronomicalUnit     AU       1.495979E11 m
atmosphere                    1.01325E5 Pa
bar                           1.0E5 Pa
calorie                       4.1868 J
curie                         3.7E10 Bq
day                           8.64E4 s
degree                        1.745329E-2 rad
erg                           1.0E-7 J
faraday                       9.648531 C
fermi                         1.0E-15 m
foot                 ft       3.048E-1 m
gauss                         1.0E-4 T
gilbert                       7.957747E-1 A
grain                gr       6.479891E-5 kg
hectare              ha       1.0E4 m^2
hour                 h        3.6E3 s
inch                 in       2.54E-2 m
lightYear                     9.46073E15 m
liter                L        1.0E-3 m^3
maxwell              Mx       1.0E-8 Wb
mho                           1.0 S
micron                        1.0E-6 m
mil                           2.54E-5 m
mile                 mi       1.609344E3 m
minute               min      6.0E1 s
parsec               pc       3.085E16 m
pica                          4.233333E-3 m
pound                lb       4.535924E-1 kg
revolution                    6.283185 rad
revolutionPerMinute  rpm      1.047198E-1 rad/s
yard                 yd       9.144E-1 m
year                          3.1536E7 s
</pre>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Quantities and Derived Units with Special Names</a></h3>
<p>This units conversion package is limited specifically to unit
reduction, comparison, and scaling.  This package does not consider
any of the quantity names for either base or derived units.  A similar
implementation or an extension in a typed or object-oriented language
might introduce user defined types for the quantities.  Quantity type
checking could be used, for example, to ensure that all
<em>length</em> values properly reduced to <em>meters</em>, or
that all <em>velocity</em> values properly reduced to
<em>meters/second</em>.</p>
<p>A C implementation of this package has been created to work in
conjunction with the Simplified Wrapper Interface Generator
(<a href="http://www.swig.org/">http://www.swig.org/</a>).  That package (units.i) exploits SWIG's typemap
system to automatically convert script quantity strings into floating
point quantities.  Function arguments are specified as quantity types
(e.g., <em>typedef float Length</em>), and target units (expected
by the C application code) are specified in an associative array.
Default units are also defined for each quantity type, and are applied
to any unit-less quantity strings.</p>
<p>A units system enhanced with quantity type checking might benefit from
inclusion of other derived types which are expressed in terms of
special units, as illustrated in Table 2 of <em>NIST Publication
330</em>.  The quantity <em>area</em>, for example, could be
defined as units properly reducing to <em>meter^2</em>, although
the utility of defining a unit named <em>square meter</em> is
arguable.</p>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<p>The unit names, abbreviations, and conversion values are derived from
those published by the United States Department of Commerce Technology
Administration, National Institute of Standards and Technology (NIST)
in <em>NIST Special Publication 330: The International System of
Units (SI)</em> and <em>NIST Special Publication 811: Guide for
the Use of the International System of Units (SI)</em>.  Both of
these publications are available (as of December 2000) from
<a href="http://physics.nist.gov/cuu/Reference/contents.html">http://physics.nist.gov/cuu/Reference/contents.html</a></p>
<p>The ideas behind implementation of this package is based in part on
code written in 1993 by Adrian Mariano which performed dimensional
analysis of unit strings using fixed size tables of C structs.  After
going missing in the late 1990's, Adrian's code has reappeared in the
GNU Units program at <a href="http://www.gnu.org/software/units/">http://www.gnu.org/software/units/</a></p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">AUTHORS</a></h2>
<p>Robert W. Techentin</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>units</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key582">angle</a>, <a href="../../../../index.html#key610">constants</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key479">distance</a>, <a href="../../../../index.html#key611">radians</a>, <a href="../../../../index.html#key609">unit</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2000-2005 Mayo Foundation</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/uri/uri.html.





















































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266

<div class='fossil-doc' data-title='uri - Tcl Uniform Resource Identifier Management'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uri(n) 1.2.6 tcllib &quot;Tcl Uniform Resource Identifier Management&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uri - URI utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">SCHEMES</a></li>
<li class="doctools_section"><a href="#section4">EXTENDING</a></li>
<li class="doctools_section"><a href="#section5">CREDITS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">uri <span class="opt">?1.2.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">uri::split</b> <i class="arg">url</i> <span class="opt">?<i class="arg">defaultscheme</i>?</span></a></li>
<li><a href="#2"><b class="cmd">uri::join</b> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>?</span>...</a></li>
<li><a href="#3"><b class="cmd">uri::resolve</b> <i class="arg">base</i> <i class="arg">url</i></a></li>
<li><a href="#4"><b class="cmd">uri::isrelative</b> <i class="arg">url</i></a></li>
<li><a href="#5"><b class="cmd">uri::geturl</b> <i class="arg">url</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#6"><b class="cmd">uri::canonicalize</b> <i class="arg">uri</i></a></li>
<li><a href="#7"><b class="cmd">uri::register</b> <i class="arg">schemeList</i> <i class="arg">script</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package contains two parts. First it provides regular expressions
for a number of url/uri schemes. Second it provides a number of
commands for manipulating urls/uris and fetching data specified by
them. For the latter this package analyses the requested url/uri and
then dispatches it to the appropriate package (http, ftp, ...) for
actual fetching.</p>
<p>The package currently does not conform to
RFC 2396 (<a href="http://www.rfc-editor.org/rfc/rfc2396.txt">http://www.rfc-editor.org/rfc/rfc2396.txt</a>),
but quite likely should be. Patches and other help are welcome.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">uri::split</b> <i class="arg">url</i> <span class="opt">?<i class="arg">defaultscheme</i>?</span></a></dt>
<dd><p><b class="cmd">uri::split</b> takes an <i class="arg">url</i>, decodes it and then returns a
list of key/value pairs suitable for <b class="cmd">array set</b> containing the
constituents of the <i class="arg">url</i>. If the scheme is missing from the url
it defaults to the value of <i class="arg">defaultscheme</i> if it was specified,
or <i class="term"><a href="../../../../index.html#key446">http</a></i> else. Currently only the schemes <i class="term"><a href="../../../../index.html#key446">http</a></i>,
<i class="term"><a href="../../../../index.html#key294">ftp</a></i>, <i class="term"><a href="../../../../index.html#key534">mailto</a></i>, <i class="term"><a href="../../../../index.html#key577">urn</a></i>, <i class="term"><a href="../../../../index.html#key532">news</a></i>, <i class="term"><a href="../../../../index.html#key130">ldap</a></i> and
<i class="term"><a href="../../../../index.html#key31">file</a></i> are supported by the package itself.
See section <span class="sectref"><a href="#section4">EXTENDING</a></span> on how to expand that range.</p>
<p>The set of constituents of an url (= the set of keys in the returned
dictionary) is dependent on the scheme of the url. The only key which
is therefore always present is <b class="const">scheme</b>. For the following
schemes the constituents and their keys are known:</p>
<dl class="doctools_definitions">
<dt>ftp</dt>
<dd><p><b class="const">user</b>, <b class="const">pwd</b>, <b class="const">host</b>, <b class="const">port</b>,
<b class="const">path</b>, <b class="const">type</b></p></dd>
<dt>http(s)</dt>
<dd><p><b class="const">user</b>, <b class="const">pwd</b>, <b class="const">host</b>, <b class="const">port</b>,
<b class="const">path</b>, <b class="const">query</b>, <b class="const">fragment</b>. The fragment
is optional.</p></dd>
<dt>file</dt>
<dd><p><b class="const">path</b>, <b class="const">host</b>. The host is optional.</p></dd>
<dt>mailto</dt>
<dd><p><b class="const">user</b>, <b class="const">host</b>. The host is optional.</p></dd>
<dt>news</dt>
<dd><p>Either <b class="const">message-id</b> or <b class="const">newsgroup-name</b>.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">uri::join</b> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>?</span>...</a></dt>
<dd><p><b class="cmd">uri::join</b> takes a list of key/value pairs (generated by
<b class="cmd">uri::split</b>, for example) and returns the canonical url they
represent. Currently only the schemes <i class="term"><a href="../../../../index.html#key446">http</a></i>, <i class="term"><a href="../../../../index.html#key294">ftp</a></i>,
<i class="term"><a href="../../../../index.html#key534">mailto</a></i>, <i class="term"><a href="../../../../index.html#key577">urn</a></i>, <i class="term"><a href="../../../../index.html#key532">news</a></i>, <i class="term"><a href="../../../../index.html#key130">ldap</a></i> and <i class="term"><a href="../../../../index.html#key31">file</a></i>
are supported. See section <span class="sectref"><a href="#section4">EXTENDING</a></span> on how to expand that
range.</p></dd>
<dt><a name="3"><b class="cmd">uri::resolve</b> <i class="arg">base</i> <i class="arg">url</i></a></dt>
<dd><p><b class="cmd">uri::resolve</b> resolves the specified <i class="arg">url</i> relative to
<i class="arg">base</i>. In other words: A non-relative <i class="arg">url</i> is returned
unchanged, whereas for a relative <i class="arg">url</i> the missing parts are
taken from <i class="arg">base</i> and prepended to it. The result of this
operation is returned. For an empty <i class="arg">url</i> the result is
<i class="arg">base</i>.</p></dd>
<dt><a name="4"><b class="cmd">uri::isrelative</b> <i class="arg">url</i></a></dt>
<dd><p><b class="cmd">uri::isrelative</b> determines whether the specified <i class="arg">url</i> is
absolute or relative.</p></dd>
<dt><a name="5"><b class="cmd">uri::geturl</b> <i class="arg">url</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p><b class="cmd">uri::geturl</b> decodes the specified <i class="arg">url</i> and then dispatches
the request to the package appropriate for the scheme found in the
url. The command assumes that the package to handle the given scheme
either has the same name as the scheme itself (including possible
capitalization) followed by <b class="cmd">::geturl</b>, or, in case of this
failing, has the same name as the scheme itself (including possible
capitalization). It further assumes that whatever package was loaded
provides a <b class="cmd">geturl</b>-command in the namespace of the same name as
the package itself. This command is called with the given <i class="arg">url</i>
and all given <i class="arg">options</i>. Currently <b class="cmd">geturl</b> does not handle
any options itself.</p>
<p><em>Note:</em> <i class="term"><a href="../../../../index.html#key31">file</a></i>-urls are an exception to the rule
described above. They are handled internally.</p>
<p>It is not possible to specify results of the command. They depend on
the <b class="cmd">geturl</b>-command for the scheme the request was dispatched to.</p></dd>
<dt><a name="6"><b class="cmd">uri::canonicalize</b> <i class="arg">uri</i></a></dt>
<dd><p><b class="cmd">uri::canonicalize</b> returns the canonical form of a URI.  The
canonical form of a URI is one where relative path specifications,
ie. . and .., have been resolved.</p></dd>
<dt><a name="7"><b class="cmd">uri::register</b> <i class="arg">schemeList</i> <i class="arg">script</i></a></dt>
<dd><p><b class="cmd">uri::register</b> registers the first element of <i class="arg">schemeList</i> as
a new scheme and the remaining elements as aliases for this scheme. It
creates the namespace for the scheme and executes the <i class="arg">script</i> in
the new namespace. The script has to declare variables containing the
regular expressions relevant to the scheme. At least the variable
<b class="variable">schemepart</b> has to be declared as that one is used to extend
the variables keeping track of the registered schemes.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">SCHEMES</a></h2>
<p>In addition to the commands mentioned above this package provides
regular expression to recognize urls for a number of url schemes.</p>
<p>For each supported scheme a namespace of the same name as the scheme
itself is provided inside of the namespace <em>uri</em> containing the
variable <b class="variable">url</b> whose contents are a regular expression to
recognize urls of that scheme. Additional variables may contain
regular expressions for parts of urls for that scheme.</p>
<p>The variable <b class="variable">uri::schemes</b> contains a list of all supported
schemes. Currently these are <i class="term"><a href="../../../../index.html#key294">ftp</a></i>, <i class="term"><a href="../../../../index.html#key130">ldap</a></i>, <i class="term"><a href="../../../../index.html#key31">file</a></i>,
<i class="term"><a href="../../../../index.html#key446">http</a></i>, <i class="term"><a href="../../../../index.html#key531">gopher</a></i>, <i class="term"><a href="../../../../index.html#key534">mailto</a></i>, <i class="term"><a href="../../../../index.html#key532">news</a></i>,
<i class="term"><a href="../../../../index.html#key530">wais</a></i> and <i class="term"><a href="../../../../index.html#key529">prospero</a></i>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXTENDING</a></h2>
<p>Extending the range of schemes supported by <b class="cmd">uri::split</b> and
<b class="cmd">uri::join</b> is easy because both commands do not handle the
request by themselves but dispatch it to another command in the
<em>uri</em> namespace using the scheme of the url as criterion.</p>
<p><b class="cmd">uri::split</b> and <b class="cmd">uri::join</b>
call <b class="cmd">Split[string totitle &lt;scheme&gt;]</b>
and  <b class="cmd">Join[string totitle &lt;scheme&gt;]</b> respectively.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">CREDITS</a></h2>
<p>Original code (regular expressions) by Andreas Kupries.
Modularisation by Steve Ball, also the split/join/resolve
functionality.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uri</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key533">fetching information</a>, <a href="../../../../index.html#key31">file</a>, <a href="../../../../index.html#key294">ftp</a>, <a href="../../../../index.html#key531">gopher</a>, <a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key130">ldap</a>, <a href="../../../../index.html#key534">mailto</a>, <a href="../../../../index.html#key532">news</a>, <a href="../../../../index.html#key529">prospero</a>, <a href="../../../../index.html#key535">rfc 2255</a>, <a href="../../../../index.html#key537">rfc 2396</a>, <a href="../../../../index.html#key528">uri</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key530">wais</a>, <a href="../../../../index.html#key536">www</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/uri/urn-scheme.html.







































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

<div class='fossil-doc' data-title='uri_urn - Tcl Uniform Resource Identifier Management'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uri_urn(n) 1.0.3 tcllib &quot;Tcl Uniform Resource Identifier Management&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uri_urn - URI utilities, URN scheme</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">uri::urn <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">uri::urn::quote</b> <i class="arg">url</i></a></li>
<li><a href="#2"><b class="cmd">uri::urn::unquote</b> <i class="arg">url</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides two commands to quote and unquote the disallowed
characters for url using the <i class="term"><a href="../../../../index.html#key577">urn</a></i> scheme, registers the scheme
with the package <b class="package"><a href="uri.html">uri</a></b>, and provides internal helpers which
will be automatically used by the commands <b class="cmd">uri::split</b> and
<b class="cmd">uri::join</b> of package <b class="package"><a href="uri.html">uri</a></b> to handle urls using the
<i class="term"><a href="../../../../index.html#key577">urn</a></i> scheme.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">uri::urn::quote</b> <i class="arg">url</i></a></dt>
<dd><p>This command quotes the characters disallowed by the <i class="term"><a href="../../../../index.html#key577">urn</a></i> scheme
(per RFC 2141 sec2.2) in the <i class="arg">url</i> and returns the modified url as
its result.</p></dd>
<dt><a name="2"><b class="cmd">uri::urn::unquote</b> <i class="arg">url</i></a></dt>
<dd><p>This commands performs the reverse of <b class="cmd">::uri::urn::quote</b>. It
takes an <i class="term"><a href="../../../../index.html#key577">urn</a></i> url, removes the quoting from all disallowed
characters, and returns the modified urls as its result.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uri</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key578">rfc 2141</a>, <a href="../../../../index.html#key528">uri</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key577">urn</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/uuid/uuid.html.



































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177

<div class='fossil-doc' data-title='uuid - uuid'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uuid(n) 1.0.4 tcllib &quot;uuid&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uuid - UUID generation and comparison</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">REFERENCES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">uuid <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::uuid::uuid generate</b></a></li>
<li><a href="#2"><b class="cmd">::uuid::uuid equal</b> <i class="arg">id1</i> <i class="arg">id2</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a generator of universally unique identifiers
(UUID) also known as globally unique identifiers (GUID). This
implementation follows the draft specification from (1) although this
is actually an expired draft document.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::uuid::uuid generate</b></a></dt>
<dd><p>Creates a type 4 uuid by MD5 hashing a number of bits of variant data
including the time and hostname.
Returns the string representation of the new uuid.</p></dd>
<dt><a name="2"><b class="cmd">::uuid::uuid equal</b> <i class="arg">id1</i> <i class="arg">id2</i></a></dt>
<dd><p>Compares two uuids and returns true if both arguments are the same uuid.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<pre class="doctools_example">
% uuid::uuid generate
b12dc22c-5c36-41d2-57da-e29d0ef5839c
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Paul J. Leach, &quot;UUIDs and GUIDs&quot;, February 1998.
    (<a href="http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt">http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt</a>)</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uuid</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key210">GUID</a>, <a href="../../../../index.html#key211">UUID</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/cc_amex.html.







































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

<div class='fossil-doc' data-title='valtype::creditcard::amex - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::amex(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::amex - Validation for AMEX creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::luhn</b></li>
<li>package require <b class="pkgname">valtype::creditcard::amex <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::creditcard::amex</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::creditcard::amex</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for an AMEX creditcard number.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::creditcard::amex validate .... ;# Does nothing
    valtype::creditcard::amex validate .... ;# Throws an error (bad American Expresss creditcard number).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::creditcard::amex</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::creditcard::amex</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">CREDITCARD AMEX</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID CREDITCARD AMEX CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be an AMEX creditcard number.</p></dd>
<dt>INVALID CREDITCARD AMEX CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
<dt>INVALID CREDITCARD AMEX LENGTH</dt>
<dd><p>The input value is of the wrong length to be an AMEX creditcard number.</p></dd>
<dt>INVALID CREDITCARD AMEX PREFIX</dt>
<dd><p>The input value does not start with the magic value(s) required for it
to be an AMEX creditcard number.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key398">AMEX</a>, <a href="../../../../index.html#key397">American Express</a>, <a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key269">bank</a>, <a href="../../../../index.html#key267">card for credit</a>, <a href="../../../../index.html#key270">credit card</a>, <a href="../../../../index.html#key268">finance</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/cc_discover.html.







































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

<div class='fossil-doc' data-title='valtype::creditcard::discover - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::discover(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::discover - Validation for Discover creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::luhn</b></li>
<li>package require <b class="pkgname">valtype::creditcard::discover <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::creditcard::discover</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::creditcard::discover</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for a Discover creditcard number.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::creditcard::discover validate .... ;# Does nothing
    valtype::creditcard::discover validate .... ;# Throws an error (bad Discover creditcard number).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::creditcard::discover</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::creditcard::discover</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">CREDITCARD DISCOVER</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID CREDITCARD DISCOVER CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be a Discover creditcard number.</p></dd>
<dt>INVALID CREDITCARD DISCOVER CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
<dt>INVALID CREDITCARD DISCOVER LENGTH</dt>
<dd><p>The input value is of the wrong length to be a Discover creditcard number.</p></dd>
<dt>INVALID CREDITCARD DISCOVER PREFIX</dt>
<dd><p>The input value does not start with the magic value(s) required for it
to be a Discover creditcard number.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key271">Discover</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key269">bank</a>, <a href="../../../../index.html#key267">card for credit</a>, <a href="../../../../index.html#key270">credit card</a>, <a href="../../../../index.html#key268">finance</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/cc_mastercard.html.







































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

<div class='fossil-doc' data-title='valtype::creditcard::mastercard - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::mastercard(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::mastercard - Validation for Mastercard creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::luhn</b></li>
<li>package require <b class="pkgname">valtype::creditcard::mastercard <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::creditcard::mastercard</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::creditcard::mastercard</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for a Mastercard creditcard number.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::creditcard::mastercard validate .... ;# Does nothing
    valtype::creditcard::mastercard validate .... ;# Throws an error (bad Mastercard creditcard number).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::creditcard::mastercard</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::creditcard::mastercard</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">CREDITCARD MASTERCARD</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID CREDITCARD MASTERCARD CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be a Mastercard creditcard number.</p></dd>
<dt>INVALID CREDITCARD MASTERCARD CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
<dt>INVALID CREDITCARD MASTERCARD LENGTH</dt>
<dd><p>The input value is of the wrong length to be a Mastercard creditcard number.</p></dd>
<dt>INVALID CREDITCARD MASTERCARD PREFIX</dt>
<dd><p>The input value does not start with the magic value(s) required for it
to be a Mastercard creditcard number.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key670">MasterCard</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key269">bank</a>, <a href="../../../../index.html#key267">card for credit</a>, <a href="../../../../index.html#key270">credit card</a>, <a href="../../../../index.html#key268">finance</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/cc_visa.html.







































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211

<div class='fossil-doc' data-title='valtype::creditcard::visa - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::visa(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::visa - Validation for VISA creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::luhn</b></li>
<li>package require <b class="pkgname">valtype::creditcard::visa <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::creditcard::visa</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::creditcard::visa</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for a VISA creditcard number.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::creditcard::visa validate .... ;# Does nothing
    valtype::creditcard::visa validate .... ;# Throws an error (bad VISA creditcard number).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::creditcard::visa</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::creditcard::visa</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">CREDITCARD VISA</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID CREDITCARD VISA CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be a VISA creditcard number.</p></dd>
<dt>INVALID CREDITCARD VISA CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
<dt>INVALID CREDITCARD VISA LENGTH</dt>
<dd><p>The input value is of the wrong length to be a VISA creditcard number.</p></dd>
<dt>INVALID CREDITCARD VISA PREFIX</dt>
<dd><p>The input value does not start with the magic value(s) required for it
to be a VISA creditcard number.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key709">VISA</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key269">bank</a>, <a href="../../../../index.html#key267">card for credit</a>, <a href="../../../../index.html#key270">credit card</a>, <a href="../../../../index.html#key268">finance</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/ean13.html.































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

<div class='fossil-doc' data-title='valtype::gs1::ean13 - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::gs1::ean13(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::gs1::ean13 - Validation for EAN13</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::gs1::ean13 <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::gs1::ean13</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::gs1::ean13</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for an EAN13.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::gs1::ean13 validate .... ;# Does nothing
    valtype::gs1::ean13 validate .... ;# Throws an error (bad EAN13).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::gs1::ean13</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::gs1::ean13</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">EAN13</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID EAN13 CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be an EAN13.</p></dd>
<dt>INVALID EAN13 CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
<dt>INVALID EAN13 LENGTH</dt>
<dd><p>The input value is of the wrong length to be an EAN13.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key103">EAN</a>, <a href="../../../../index.html#key104">EAN13</a>, <a href="../../../../index.html#key102">European Article Number</a>, <a href="../../../../index.html#key105">International Article Number</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/iban.html.



























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205

<div class='fossil-doc' data-title='valtype::iban - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::iban(n) 1.6 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::iban - Validation for IBAN</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::iban <span class="opt">?1.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::iban</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::iban</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for an IBAN.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::iban validate .... ;# Does nothing
    valtype::iban validate .... ;# Throws an error (bad International Bank Account Number).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::iban</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::iban</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">IBAN</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID IBAN CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be an IBAN.</p></dd>
<dt>INVALID IBAN CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key383">IBAN</a>, <a href="../../../../index.html#key382">International Bank Account Number</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key269">bank</a>, <a href="../../../../index.html#key268">finance</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/imei.html.

































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

<div class='fossil-doc' data-title='valtype::imei - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::imei(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::imei - Validation for IMEI</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::luhn</b></li>
<li>package require <b class="pkgname">valtype::imei <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::imei</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::imei</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for an IMEI.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::imei validate .... ;# Does nothing
    valtype::imei validate .... ;# Throws an error (bad International Mobile Equipment Identity (IMEI) number).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::imei</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::imei</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">IMEI</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID IMEI CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be an IMEI.</p></dd>
<dt>INVALID IMEI CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
<dt>INVALID IMEI LENGTH</dt>
<dd><p>The input value is of the wrong length to be an IMEI.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key791">IMEI</a>, <a href="../../../../index.html#key794">International Mobile Equipment Identity</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key795">cell-phone</a>, <a href="../../../../index.html#key55">isA</a>, <a href="../../../../index.html#key792">mobile phone</a>, <a href="../../../../index.html#key793">phone</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/isbn.html.













































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214

<div class='fossil-doc' data-title='valtype::isbn - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::isbn(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::isbn - Validation for ISBN</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::isbn <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::isbn</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::isbn</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
<li><a href="#3"><b class="cmd">valtype::isbn</b> <b class="method">13of</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for an ISBN.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::isbn validate .... ;# Does nothing
    valtype::isbn validate .... ;# Throws an error (bad ISBN).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::isbn</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::isbn</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
<dt><a name="3"><b class="cmd">valtype::isbn</b> <b class="method">13of</b> <i class="arg">value</i></a></dt>
<dd><p>This method expects an old-style 10-digit ISBN and returns the
canonical modern 13-digit ISBN.
This is used by <b class="method">validate</b> to canonicalize the input, so that
all parts of the system after the validation can expect to work with
modern 13-digit ISBNs.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">ISBN</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID ISBN CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be an ISBN.</p></dd>
<dt>INVALID ISBN CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
<dt>INVALID ISBN LENGTH</dt>
<dd><p>The input value is of the wrong length to be an ISBN.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key363">Book Number</a>, <a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key103">EAN</a>, <a href="../../../../index.html#key104">EAN13</a>, <a href="../../../../index.html#key102">European Article Number</a>, <a href="../../../../index.html#key362">ISBN</a>, <a href="../../../../index.html#key105">International Article Number</a>, <a href="../../../../index.html#key364">International Standard Book Number</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/luhn.html.



























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205

<div class='fossil-doc' data-title='valtype::luhn - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::luhn(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::luhn - Validation for plain number with a LUHN checkdigit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::luhn <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::luhn</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::luhn</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for a plain number with a LUHN checkdigit.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::luhn validate .... ;# Does nothing
    valtype::luhn validate .... ;# Throws an error (bad luhn checkdigit).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::luhn</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::luhn</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">LUHN</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID LUHN CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be a plain number with a LUHN checkdigit.</p></dd>
<dt>INVALID LUHN CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a>, <a href="../../../../index.html#key59">luhn</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/luhn5.html.



























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205

<div class='fossil-doc' data-title='valtype::luhn5 - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::luhn5(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::luhn5 - Validation for plain number with a LUHN5 checkdigit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::luhn5 <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::luhn5</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::luhn5</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for a plain number with a LUHN5 checkdigit.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::luhn5 validate .... ;# Does nothing
    valtype::luhn5 validate .... ;# Throws an error (bad luhn5 checkdigit).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::luhn5</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::luhn5</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">LUHN5</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID LUHN5 CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be a plain number with a LUHN5 checkdigit.</p></dd>
<dt>INVALID LUHN5 CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a>, <a href="../../../../index.html#key59">luhn</a>, <a href="../../../../index.html#key54">luhn-5</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/usnpi.html.

































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

<div class='fossil-doc' data-title='valtype::usnpi - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::usnpi(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::usnpi - Validation for USNPI</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::luhn</b></li>
<li>package require <b class="pkgname">valtype::usnpi <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::usnpi</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::usnpi</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for an USNPI.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::usnpi validate .... ;# Does nothing
    valtype::usnpi validate .... ;# Throws an error (bad US National Provider Identifier (US-NPI) number).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::usnpi</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::usnpi</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">USNPI</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID USNPI CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be an USNPI.</p></dd>
<dt>INVALID USNPI CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
<dt>INVALID USNPI LENGTH</dt>
<dd><p>The input value is of the wrong length to be an USNPI.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key234">NPI</a>, <a href="../../../../index.html#key231">National Provider Identifier</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key232">US-NPI</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a>, <a href="../../../../index.html#key233">medicare</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/valtype_common.html.





















































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

<div class='fossil-doc' data-title='valtype::common - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::common(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::common - Validation, common code</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">valtype::common <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::common::reject</b> <i class="arg">code</i> <i class="arg">text</i></a></li>
<li><a href="#2"><b class="cmd">valtype::common::badchar</b> <i class="arg">code</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#3"><b class="cmd">valtype::common::badcheck</b> <i class="arg">code</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#4"><b class="cmd">valtype::common::badlength</b> <i class="arg">code</i> <i class="arg">lengths</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#5"><b class="cmd">valtype::common::badprefix</b> <i class="arg">code</i> <i class="arg">prefixes</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a number of common commands used by the
validation types in this module. These commands essentially
encapsulate the throwing of validation errors, ensuring that a proper
<b class="cmd">-errorcode</b> is used. See section <span class="sectref"><a href="#section3">Error Codes</a></span>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::common::reject</b> <i class="arg">code</i> <i class="arg">text</i></a></dt>
<dd><p>The core command of this package it throws an <b class="const">INVALID</b> error
with the specified <i class="arg">text</i>. The first argument is a list of codes
extending the <b class="const">INVALID</b> with detail information.</p></dd>
<dt><a name="2"><b class="cmd">valtype::common::badchar</b> <i class="arg">code</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This command throws an <b class="const">INVALID CHAR</b> error with the specified
<i class="arg">text</i>. The first argument is a list of codes providing
details. These are inserted between the codes <b class="const">INVALID</b> and
<b class="const">CHARACTER</b>.</p></dd>
<dt><a name="3"><b class="cmd">valtype::common::badcheck</b> <i class="arg">code</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This command throws an <b class="const">INVALID CHECK-DIGIT</b> error with the
specified <i class="arg">text</i>, if any, extended by the standard text &quot;the check
digit is incorrect&quot;. The first argument is a list of codes providing
details. These are inserted between the codes <b class="const">INVALID</b> and
<b class="const">CHECK_DIGIT</b>.</p></dd>
<dt><a name="4"><b class="cmd">valtype::common::badlength</b> <i class="arg">code</i> <i class="arg">lengths</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This command throws an <b class="const">INVALID LENGTH</b> error with the
specified <i class="arg">text</i>, if any, extended by the standard text &quot;incorrect
length, expected ... character(s)&quot;. The first argument is a list of
codes providing details.
These are inserted between the codes <b class="const">INVALID</b> and
<b class="const">LENGTH</b>. The argument <i class="arg">lengths</i> is a list of the input
lengths which had been expected, i.e. these are the valid lengths.</p></dd>
<dt><a name="5"><b class="cmd">valtype::common::badprefix</b> <i class="arg">code</i> <i class="arg">prefixes</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This command throws an <b class="const">INVALID PREFIX</b> error with the
specified <i class="arg">text</i>, if any, extended by the standard text &quot;incorrect
prefix, expected ...&quot;. The first argument is a list of codes providing
details.
These are inserted between the codes <b class="const">INVALID</b> and
<b class="const">PREFIX</b>. The argument <i class="arg">prefixes</i> is a list of the input
prefixes which had been expected, i.e. these are the valid prefixes.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>The errors thrown by the commands of this package all use the
<b class="cmd">-errorcode</b> <b class="const">INVALID</b> to distinguish the input validation
failures they represent from package internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. This is
supplied by the caller. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can be
thrown by this package are shown below, with <b class="const">&lt;&gt;</b> a placeholder
for both the caller-supplied type-information, the type description.</p>
<dl class="doctools_definitions">
<dt>INVALID <b class="const">&lt;&gt;</b> CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be a <b class="const">&lt;&gt;</b>.</p></dd>
<dt>INVALID <b class="const">&lt;&gt;</b> CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
<dt>INVALID <b class="const">&lt;&gt;</b> LENGTH</dt>
<dd><p>The input value is of the wrong length to be a <b class="const">&lt;&gt;</b>.</p></dd>
<dt>INVALID <b class="const">&lt;&gt;</b> PREFIX</dt>
<dd><p>The input value does not start with the magic value(s) required for it
to be a <b class="const">&lt;&gt;</b>.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/valtype/verhoeff.html.



























































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205

<div class='fossil-doc' data-title='valtype::verhoeff - Validation types'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::verhoeff(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::verhoeff - Validation for plain number with a VERHOEFF checkdigit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Error Codes</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::verhoeff <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::verhoeff</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::verhoeff</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements a snit validation type for a plain number with a VERHOEFF checkdigit.</p>
<p>A validation type is an object that can be used to validate Tcl values
of a particular kind.  For example, <b class="cmd">snit::integer</b>, a validation
type defined by the <b class="package"><a href="../snit/snit.html">snit</a></b> package is used to validate that a
Tcl value is an integer.</p>
<p>Every validation type has a <b class="method">validate</b> method which is used to
do the validation. This method must take a single argument, the value
to be validated; further, it must do nothing if the value is valid,
but throw an error if the value is invalid:</p>
<pre class="doctools_example">
    valtype::verhoeff validate .... ;# Does nothing
    valtype::verhoeff validate .... ;# Throws an error (bad verhoeff checkdigit).
</pre>
<p>The <b class="method">validate</b> method will always return the validated value on
success, and throw the <b class="cmd">-errorcode</b> INVALID on error, possibly
with additional elements which provide more details about the problem.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification
of snit validation types found in the documentation of
<i class="term"><a href="../snit/snit.html">Snit's Not Incr Tcl</a></i>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">valtype::verhoeff</b> <b class="method">validate</b> <i class="arg">value</i></a></dt>
<dd><p>This method validates the <i class="arg">value</i> and returns it, possibly in a
canonical form, if it passes. If the value does not pass the
validation an error is thrown.</p></dd>
<dt><a name="2"><b class="cmd">valtype::verhoeff</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></dt>
<dd><p>This method computes a check digit for the <i class="arg">value</i>. Before doing
so it is validated, except for a checkdigit. If the value does not
pass the validation no check digit is calculated and an error is
thrown instead.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Error Codes</a></h2>
<p>As said in the package description, the errors thrown by the commands
of this package in response to input validation failures use the
<b class="cmd">-errorcode</b> INVALID to distinguish themselves from package
internal errors.</p>
<p>To provide more detailed information about why the validation
failed the <b class="cmd">-errorCode</b> goes actually beyond that.
First, it will contain a code detailing the type itself. Here this is
<b class="const">VERHOEFF</b>. This is then followed by values detailing the
reason for the failure. The full set of <b class="cmd">-errorCode</b>s which can
be thrown by this package are:</p>
<dl class="doctools_definitions">
<dt>INVALID VERHOEFF CHARACTER</dt>
<dd><p>The input value contained one or more bad characters, i.e. characters
which must not occur in the input for it to be a plain number with a VERHOEFF checkdigit.</p></dd>
<dt>INVALID VERHOEFF CHECK-DIGIT</dt>
<dd><p>The check digit of the input value is wrong. This usually signals a
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a>, <a href="../../../../index.html#key749">verhoeff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/cat.html.



















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169

<div class='fossil-doc' data-title='tcl::chan::cat - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::cat(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::cat - Concatenation channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::cat <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::cat</b> <i class="arg">chan</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::cat</b> package provides a command creating
concatenation channels. These are non-seekable channels owning a list
of subordinate channels whose contents they return in order, until all
are exhausted. In this manner the channel is the concatentation of the
contents of all the sub-ordinate channels.</p>
<p>Note that the created channels take ownership of the channels
they were constructed with. Whenever they have exhausted one of their
channel it will be closed. Similarly, closing the cat channel will
close all the sub-ordinates it still has.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/core.html">tcl::chan::core</a></b> framework.</p>
<p>Event handling is delegated to the currently active sub-channel.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::cat</b> <i class="arg">chan</i>...</a></dt>
<dd><p>This command creates the concatenation channel using all the provided
channels, and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key163">concatenation channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/facade.html.























































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187

<div class='fossil-doc' data-title='tcl::chan::facade - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::facade(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::facade - Facade channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">tcl::chan::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::facade <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::facade</b> <i class="arg">chan</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::facade</b> package provides a command creating
facades to other channels. These are channels which own a single
subordinate channel and delegate all operations to.</p>
<p>The main use for facades is the debugging of actions on a
channel. While most of the information could be tracked by a virtual
channel transformation it does not have access to the event-related
operation, and furthermore they are only available in Tcl 8.6.</p>
<p>Therefore this channel, usable with Tcl 8.5, and having access
to everything going on for a channel.</p>
<p>The intercepted actions on channel are logged through package
<b class="package"><a href="../log/logger.html">logger</a></b>.</p>
<p>Beyond that facades provide the following additional channel
configuration options:</p>
<dl class="doctools_options">
<dt><b class="option">-self</b></dt>
<dd><p>The TclOO object handling the facade.</p></dd>
<dt><b class="option">-fd</b></dt>
<dd><p>The handle of the subordinate, i.e. wrapped channel.</p></dd>
<dt><b class="option">-used</b></dt>
<dd><p>The last time the wrapped channel was read from or written to by
the facade, as per <b class="cmd">clock milliseconds</b>. A value of <b class="const">0</b>
indicates that the subordinate channel was not accessed at all, yet.</p></dd>
<dt><b class="option">-created</b></dt>
<dd><p>The time the facade was created, as per <b class="cmd">clock milliseconds</b>.</p></dd>
<dt><b class="option">-user</b></dt>
<dd><p>A free-form value identifying the user of the facade and its
wrapped channel.</p></dd>
</dl>
<p>Of these only option <b class="option">-user</b> is writable.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::facade</b> <i class="arg">chan</i></a></dt>
<dd><p>This command creates the facade channel around the provided
channel <i class="arg">chan</i>, and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key163">concatenation channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/halfpipe.html.



































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193

<div class='fossil-doc' data-title='tcl::chan::halfpipe - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::halfpipe(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::halfpipe - In-memory channel, half of a fifo2</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Options</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::halfpipe <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::halfpipe <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::halfpipe</b> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectCmd</i> <b class="method">put</b> <i class="arg">bytes</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::halfpipe</b> package provides a command creating
one half of a <b class="package"><a href="tcllib_fifo2.html">tcl::chan::fifo2</a></b> pair. Writing into such a
channel invokes a set of callbacks which then handle the data. This is
similar to a channel handler, except having a much simpler API.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::halfpipe</b> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i>...?</span></a></dt>
<dd><p>This command creates a halfpipe channel and configures it with the
callbacks to run when the channel is closed, data was written to it,
or ran empty. See the section <span class="sectref"><a href="#section3">Options</a></span> for the list of
options and associated semantics.
The result of the command is a list containing two elements, the
handle of the new channel, and the object command of the channel
handler, in this order.
The latter is supplied to the caller to provide her with access to the
<b class="method">put</b> method for adding data to the channel.</p>
<p>Two halfpipes with a bit of glue logic in the callbacks make
for one <b class="package"><a href="tcllib_fifo2.html">tcl::chan::fifo2</a></b>.</p></dd>
<dt><a name="2"><i class="arg">objectCmd</i> <b class="method">put</b> <i class="arg">bytes</i></a></dt>
<dd><p>This method of the channel handler object puts the data <i class="arg">bytes</i>
into the channel so that it can be read from it.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Options</a></h2>
<dl class="doctools_options">
<dt><b class="option">-close-command</b> cmdprefix</dt>
<dd><p>This callback is invoked when the channel is closed.
A single argument is supplied, the handle of the channel being closed.
The result of the callback is ignored.</p></dd>
<dt><b class="option">-write-command</b> cmdprefix</dt>
<dd><p>This callback is invoked when data is written to the channel.
Two arguments are supplied, the handle of the channel written to, and the data written.
The result of the callback is ignored.</p></dd>
<dt><b class="option">-empty-command</b> cmdprefix</dt>
<dd><p>This callback is invoked when the channel has run out of data to read.
A single argument is supplied, the handle of the channel.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key721">callbacks</a>, <a href="../../../../index.html#key608">fifo</a>, <a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/nullzero.html.









































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

<div class='fossil-doc' data-title='tcl::chan::nullzero - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::nullzero(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::nullzero - Null/Zero channel combination</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::nullzero <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::nullzero</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::nullzero</b> package provides a command creating channels,
which are a combination of null and zero devices. They immediately forget
whatever is written to them, and on reading return an infinite stream of null
characters.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_null.html">tcl::chan::null</a></b> and
<b class="package"><a href="tcllib_zero.html">tcl::chan::zero</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel handler
is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::nullzero</b></a></dt>
<dd><p>This command creates a new nullzero channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key770">/dev/null</a>, <a href="../../../../index.html#key114">/dev/zero</a>, <a href="../../../../index.html#key771">null</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a>, <a href="../../../../index.html#key113">zero</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/randseed.html.









































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

<div class='fossil-doc' data-title='tcl::randomseed - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::randomseed(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::randomseed - Utilities for random channels</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::randomseed <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::randomseed</b></a></li>
<li><a href="#2"><b class="cmd">::tcl::combine</b> <i class="arg">seed1</i> <i class="arg">seed2</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::randomseed</b> package provides a a few utility commands
to help with the seeding of <b class="package"><a href="tcllib_random.html">tcl::chan::random</a></b> channels.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::randomseed</b></a></dt>
<dd><p>This command creates returns a list of seed integers suitable as seed
argument for random channels. The numbers are derived from the process
id, current time, and Tcl random number generator.</p></dd>
<dt><a name="2"><b class="cmd">::tcl::combine</b> <i class="arg">seed1</i> <i class="arg">seed2</i></a></dt>
<dd><p>This command takes to seed lists and combines them into a single list
by XORing them elementwise, modulo 256. If the lists are not of equial
length the shorter of the two is padded with 0s before merging.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key591">/dev/random</a>, <a href="../../../../index.html#key539">merge</a>, <a href="../../../../index.html#key590">random</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key833">seed</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/std.html.









































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

<div class='fossil-doc' data-title='tcl::chan::std - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::std(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::std - Standard I/O, unification of stdin and stdout</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::std <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::std</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::std</b> package provides a command creating
a standard channel which unifies stdin and stdout into a single
read- and writable channel. The result is not seek-able, like
the original standard channels.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/core.html">tcl::chan::core</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::std</b></a></dt>
<dd><p>This command creates the std channel and returns its handle.</p>
<p>The channel is created only once, on the first call, and all
future calls simply return this handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key827">standard io</a>, <a href="../../../../index.html#key828">stdin</a>, <a href="../../../../index.html#key829">stdout</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/tcllib_fifo.html.











































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

<div class='fossil-doc' data-title='tcl::chan::fifo - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::fifo(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::fifo - In-memory fifo channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::fifo <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::fifo</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::fifo</b> package provides a command creating
channels which live purely in memory. Access is fifo-like, i.e. things
are read out of the channel in the order they were written to it.
This is equivalent to the fifo channels provided by the package
<b class="package">Mmechan</b>, except that this is written in pure Tcl, not C. On
the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and before,
whereas this package requires Tcl 8.5 or higher, and <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::fifo</b></a></dt>
<dd><p>This command creates a new fifo channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key608">fifo</a>, <a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/tcllib_fifo2.html.





















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170

<div class='fossil-doc' data-title='tcl::chan::fifo2 - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::fifo2(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::fifo2 - In-memory interconnected fifo channels</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::halfpipe <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::fifo2 <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::fifo2</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::fifo2</b> package provides a command creating
pairs of channels which live purely in memory and are connected to
each other in a fifo manner. What is written to one half of the pair
can be read from the other half, in the same order. One particular
application for this is communication between threads, with one half
of the pair moved to the thread to talk to.
This is equivalent to the fifo2 channels provided by the package
<b class="package">Mmechan</b>, except that this is written in pure Tcl, not C. On
the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and before,
whereas this package requires Tcl 8.5 or higher, and <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::fifo2</b></a></dt>
<dd><p>This command creates a new connected pair of fifo channels and returns
their handles, as a list containing two elements.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key741">connected fifos</a>, <a href="../../../../index.html#key608">fifo</a>, <a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key740">inter-thread communication</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/tcllib_memchan.html.















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

<div class='fossil-doc' data-title='tcl::chan::memchan - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::memchan(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::memchan - In-memory channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::memchan <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::memchan</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::memchan</b> package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable. This is equivalent to the memchan channels provided by
the package <b class="package">Memchan</b>, except that this is written in pure Tcl,
not C. On the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and
before, whereas this package requires Tcl 8.5 or higher, and
<b class="package"><a href="../../../../index.html#key757">TclOO</a></b>.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_string.html">tcl::chan::string</a></b> and
<b class="package"><a href="tcllib_variable.html">tcl::chan::variable</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::memchan</b></a></dt>
<dd><p>This command creates a new memchan channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/tcllib_null.html.















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

<div class='fossil-doc' data-title='tcl::chan::null - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::null(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::null - Null channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::null <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::null</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::null</b> package provides a command creating null
channels, i.e. write-only channels which immediately forget whatever
is written to them. This is equivalent to the null channels provided by
the package <b class="package">Memchan</b>, except that this is written in pure Tcl,
not C. On the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and
before, whereas this package requires Tcl 8.5 or higher, and
<b class="package"><a href="../../../../index.html#key757">TclOO</a></b>.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_zero.html">tcl::chan::zero</a></b> and
<b class="package"><a href="nullzero.html">tcl::chan::nullzero</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::null</b></a></dt>
<dd><p>This command creates a new null channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key770">/dev/null</a>, <a href="../../../../index.html#key771">null</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/tcllib_random.html.

















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

<div class='fossil-doc' data-title='tcl::chan::random - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::random(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::random - Random channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::random <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::random</b> <i class="arg">seed</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::random</b> package provides a command creating
random channels, i.e. read-only channels which return an infinite
stream of pseudo-random characters upon reading. This is similar to
the random channels provided by the package <b class="package">Memchan</b>, except
that this is written in pure Tcl, not C, and uses a much simpler
generator as well. On the other hand, <b class="package">Memchan</b> is usable with
Tcl 8.4 and before, whereas this package requires Tcl 8.5 or higher,
and TclOO.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::random</b> <i class="arg">seed</i></a></dt>
<dd><p>This command creates a new random channel and returns its handle.
The seed is a list of integer numbers used to initialize the
internal feedback shift register of the generator.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key591">/dev/random</a>, <a href="../../../../index.html#key590">random</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/tcllib_string.html.















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

<div class='fossil-doc' data-title='tcl::chan::string - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::string(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::string - Read-only in-memory channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::string <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::string</b> <i class="arg">content</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::string</b> package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable.
In contrast to the channels created by <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b>
they are read-only however, their content is provided at the time of
construction and immutable afterward.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b> and
<b class="package"><a href="tcllib_variable.html">tcl::chan::variable</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::string</b> <i class="arg">content</i></a></dt>
<dd><p>This command creates a new string channel and returns its handle. The
channel provides random read-only access to the <i class="arg">content</i> string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/tcllib_variable.html.

















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

<div class='fossil-doc' data-title='tcl::chan::variable - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::variable(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::variable - In-memory channel using variable for storage</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::variable <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::variable</b> <i class="arg">varname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::variable</b> package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable.
In contrast to the channels created by <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b>
the data is not hidden in the channel however, but stored in an
associated variable, specified at the time of construction.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b> and
<b class="package"><a href="tcllib_string.html">tcl::chan::string</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::variable</b> <i class="arg">varname</i></a></dt>
<dd><p>This command creates a new variable channel and returns its handle.
The content of the channel is stored in the associated namespace
variable <i class="arg">varname</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/tcllib_zero.html.















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

<div class='fossil-doc' data-title='tcl::chan::zero - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::zero(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::zero - Zero channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::zero <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::zero</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::zero</b> package provides a command creating zero
channels, i.e. read-only channels which return an infinite stream of null
characters upon reading. This is equivalent to the zero channels
provided by the package <b class="package">Memchan</b>, except that this is written
in pure Tcl, not C. On the other hand, <b class="package">Memchan</b> is usable with
Tcl 8.4 and before, whereas this package requires Tcl 8.5 or higher,
and TclOO.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_null.html">tcl::chan::null</a></b> and
<b class="package"><a href="nullzero.html">tcl::chan::nullzero</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::zero</b></a></dt>
<dd><p>This command creates a new zero channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key114">/dev/zero</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a>, <a href="../../../../index.html#key113">zero</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_base/textwindow.html.





































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

<div class='fossil-doc' data-title='tcl::chan::textwindow - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::textwindow(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::textwindow - Textwindow channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::textwindow <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::textwindow</b> <i class="arg">widget</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::textwindow</b> package provides a command creating
write-only channels connected to text widgets. Anything written to the
channel is printed into the associated widget.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::textwindow</b> <i class="arg">widget</i></a></dt>
<dd><p>This command creates a new textwindow channel and returns its handle.
Data written to this channel will appear in the associated <i class="arg">widget</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key209">Tk</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key208">text widget</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_core/core.html.































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191

<div class='fossil-doc' data-title='tcl::chan::core - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::core(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::core - Basic reflected/virtual channel support</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Class API</a></li>
<li class="doctools_section"><a href="#section3">Instance API</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::core <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::core</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">initialize</b> <i class="arg">thechannel</i> <i class="arg">mode</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">finalize</b> <i class="arg">thechannel</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::core</b> package provides a <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>
class implementing common behaviour needed by virtually every
reflected or virtual channel (initialization, finalization).</p>
<p>This class expects to be used as either superclass of a concrete
channel class, or to be mixed into such a class.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::core</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new channel core object with an associated
global Tcl command whose name is <em>objectName</em>. This command may
be used to invoke various operations on the object, as described in
the section for the <span class="sectref"><a href="#section3">Instance API</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Instance API</a></h2>
<p>The API of channel core instances provides only two methods, both
corresponding to channel handler commands (For reference see
<a href="http:/tip.tcl.tk/219">TIP 219</a>). They expect to be called
from whichever object instance the channel core was made a part of.</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">initialize</b> <i class="arg">thechannel</i> <i class="arg">mode</i></a></dt>
<dd><p>This method implements standard behaviour for the <b class="method">initialize</b>
method of channel handlers. Using introspection it finds the handler
methods supported by the instance and returns a list containing their
names, as expected by the support for reflected channels in the Tcl
core.</p>
<p>It further remembers the channel handle in an instance variable
for access by sub-classes.</p></dd>
<dt><a name="3"><i class="arg">objectName</i> <b class="method">finalize</b> <i class="arg">thechannel</i></a></dt>
<dd><p>This method implements standard behaviour for the <b class="method">finalize</b>
method of channel handlers. It simply destroys itself.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroying the channel core instance closes the channel it was
initialized for, see the method <b class="method">initialize</b>. When destroyed
from within a call of <b class="method">finalize</b> this does not happen, under
the assumption that the channel is being destroyed by Tcl.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_core/events.html.















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199

<div class='fossil-doc' data-title='tcl::chan::events - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::events(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::events - Event support for reflected/virtual channels</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Class API</a></li>
<li class="doctools_section"><a href="#section3">Instance API</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::events</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">finalize</b> <i class="arg">thechannel</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">watch</b> <i class="arg">thechannel</i> <i class="arg">eventmask</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">allow</b> <i class="arg">eventname</i>...</a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">disallow</b> <i class="arg">eventname</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::events</b> package provides a <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>
class implementing common behaviour needed by virtually every
reflected or virtual channel supporting event driven IO. It is a
sub-class of <b class="package"><a href="core.html">tcl::chan::core</a></b>, inheriting all of its behaviour.</p>
<p>This class expects to be used as either superclass of a concrete
channel class, or to be mixed into such a class.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::events</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new channel event core object with an associated
global Tcl command whose name is <em>objectName</em>. This command may
be used to invoke various operations on the object, as described in
the section for the <span class="sectref"><a href="#section3">Instance API</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Instance API</a></h2>
<p>The API of channel event core instances provides only four methods, two
corresponding to channel handler commands (For reference see
<a href="http:/tip.tcl.tk/219">TIP 219</a>), and the other two for use by
sub-classes to control event generation. They former expect to be called
from whichever object instance the channel event core was made a part of.</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">finalize</b> <i class="arg">thechannel</i></a></dt>
<dd><p>This method implements standard behaviour for the <b class="method">finalize</b>
method of channel handlers. It overrides the behaviour inherited from
<b class="package"><a href="core.html">tcl::chan::core</a></b> and additionally disables any and all event
generation before destroying itself.</p></dd>
<dt><a name="3"><i class="arg">objectName</i> <b class="method">watch</b> <i class="arg">thechannel</i> <i class="arg">eventmask</i></a></dt>
<dd><p>This method implements standard behaviour for the <b class="method">watch</b>
method of channel handlers. Called by the IO system whenever the
interest in event changes it updates the instance state to activate
and/or suppress the generation of the events of (non-)interest.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">allow</b> <i class="arg">eventname</i>...</a></dt>
<dd></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">disallow</b> <i class="arg">eventname</i>...</a></dt>
<dd><p>These two methods are exported to sub-classes, so that their instances
can notify their event core of the events the channel they implement
can (allow) or cannot (disallow) generate.
Together with the information about the events requested by Tcl's IO
system coming in through the <b class="method">watch</b> method the event core is
able to determine which events it should (not) generate and act
accordingly.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key516">event management</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_core/transformcore.html.































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191

<div class='fossil-doc' data-title='tcl::transform::core - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::core(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::core - Basic reflected/virtual channel transform support</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Class API</a></li>
<li class="doctools_section"><a href="#section3">Instance API</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::core</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">initialize</b> <i class="arg">thechannel</i> <i class="arg">mode</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">finalize</b> <i class="arg">thechannel</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::core</b> package provides a <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>
class implementing common behaviour needed by virtually every
reflected or virtual channel transformation (initialization, finalization).</p>
<p>This class expects to be used as either superclass of a concrete
channel class, or to be mixed into such a class.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::core</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new transform core object with an associated
global Tcl command whose name is <em>objectName</em>. This command may
be used to invoke various operations on the object, as described in
the section for the <span class="sectref"><a href="#section3">Instance API</a></span>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Instance API</a></h2>
<p>The API of transform core instances provides only two methods, both
corresponding to transform handler commands (For reference see
<a href="http:/tip.tcl.tk/230">TIP 230</a>). They expect to be called
from whichever object instance the transform core was made a part of.</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">objectName</i> <b class="method">initialize</b> <i class="arg">thechannel</i> <i class="arg">mode</i></a></dt>
<dd><p>This method implements standard behaviour for the <b class="method">initialize</b>
method of transform handlers. Using introspection it finds the handler
methods supported by the instance and returns a list containing their
names, as expected by the support for reflected transformation in the
Tcl core.</p>
<p>It further remembers the channel handle in an instance variable
for access by sub-classes.</p></dd>
<dt><a name="3"><i class="arg">objectName</i> <b class="method">finalize</b> <i class="arg">thechannel</i></a></dt>
<dd><p>This method implements standard behaviour for the <b class="method">finalize</b>
method of channel handlers. It simply destroys itself.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroying the transform core instance closes the channel and transform
it was initialized for, see the method <b class="method">initialize</b>. When destroyed
from within a call of <b class="method">finalize</b> this does not happen, under
the assumption that the channel and transform are being destroyed by Tcl.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/adler32.html.

















































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

<div class='fossil-doc' data-title='tcl::transform::adler32 - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::adler32(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::adler32 - Adler32 transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::adler32 <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::adler32</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::adler32</b> package provides a command
creating a channel transformation which passes the read and written
bytes through unchanged (like <b class="package"><a href="identity.html">tcl::transform::identity</a></b>), but
additionally continuously computes the adler32 checksums of the data
it has seen for each direction and stores them in Tcl variables
specified at construction time.</p>
<p>Related transformations in this module are
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>,
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::adler32</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>This command creates an adler32 checksumming transformation on top of
the channel <i class="arg">chan</i> and returns its handle. The accepted options are</p>
<dl class="doctools_options">
<dt><b class="option">-read-variable</b> varname</dt>
<dd><p>The value of the option is the name of a global or namespaced
variable, the location where the transformation has to store the
adler32 checksum of the data read from the channel.</p>
<p>If not specified, or the empty string, the checksum of the read
direction is not saved.</p></dd>
<dt><b class="option">-write-variable</b> varname</dt>
<dd><p>The value of the option is the name of a global or namespaced
variable, the location where the transformation has to store the
adler32 checksum of the data written to the channel.</p>
<p>If not specified, or the empty string, the checksum of the
write direction is not saved.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key668">adler32</a>, <a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/hex.html.









































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

<div class='fossil-doc' data-title='tcl::transform::hex - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::hex(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::hex - Hexadecimal encoding transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::hex <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::hex</b> <i class="arg">chan</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::hex</b> package provides a command creating
a channel transformation which hex encodes data written to it, and
decodes the data read from it.</p>
<p>A related transformations in this module is
<b class="package"><a href="vt_base64.html">tcl::transform::base64</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::hex</b> <i class="arg">chan</i></a></dt>
<dd><p>This command creates a hex transformation on top of the channel
<i class="arg">chan</i> and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key734">hexadecimal</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/identity.html.























































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

<div class='fossil-doc' data-title='tcl::transform::identity - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::identity(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::identity - Identity transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::identity <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::identity</b> <i class="arg">chan</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::identity</b> package provides a command
creating an identity channel transformation, which does nothing but
pass the read and written bytes through it unchanged. Not really
useful in an application, however as the prototypical observer
transformation its code is a useful starting point for any other
observers people may wish to write.</p>
<p>The transformations in this module which derived from
identity's code are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::identity</b> <i class="arg">chan</i></a></dt>
<dd><p>This command creates an identity transformation on top of the channel
<i class="arg">chan</i> and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key442">identity</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/limitsize.html.













































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166

<div class='fossil-doc' data-title='tcl::transform::limitsize - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::limitsize(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::limitsize - limiting input</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::limitsize <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::limitsize</b> <i class="arg">chan</i> <i class="arg">max</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::limitsize</b> package provides a command
creating a channel transformation which limits the number of
characters which can be read from the channel. A generator for an
artificial EOF.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::limitsize</b> <i class="arg">chan</i> <i class="arg">max</i></a></dt>
<dd><p>This command creates a size limiting transformation on top of the
channel <i class="arg">chan</i> and returns its handle.</p>
<p><i class="arg">max</i> is the number of bytes which can be read from the
channel before EOF is signaled by the transformation. Note that
popping the transformation clears the EOF it generated as well.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key725">limitsize</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key724">size limit</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/observe.html.





















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170

<div class='fossil-doc' data-title='tcl::transform::observe - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::observe(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::observe - Observer transformation, stream copy</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::observe <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::observe</b> <i class="arg">chan</i> <i class="arg">logw</i> <i class="arg">logr</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::observer</b> package provides a command
creating a channel transformation which passes the read and written
bytes through unchanged (like <b class="package"><a href="identity.html">tcl::transform::identity</a></b>), but
additionally copies the data it has seen for each direction into
channels specified at construction time.</p>
<p>Related transformations in this module are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>, and
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::observe</b> <i class="arg">chan</i> <i class="arg">logw</i> <i class="arg">logr</i></a></dt>
<dd><p>This command creates an observer transformation on top of the channel
<i class="arg">chan</i> and returns its handle. The channel handles <i class="arg">logr</i> and
<i class="arg">logw</i> are there the data is copied to.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key650">observer</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key651">stream copy</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/rot.html.























































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

<div class='fossil-doc' data-title='tcl::transform::rot - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::rot(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::rot - rot-encryption</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::rot <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::rot</b> <i class="arg">chan</i> <i class="arg">key</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::rot</b> package provides a command creating
a channel transformation which performs primitive encryption (on
writing) and decryption (on reading) on the alphabetic characters. The
algorithm is the Caesar-cipher, a specific variant of which is rot13.</p>
<p>A related transformations in this module is
<b class="package"><a href="vt_otp.html">tcl::transform::otp</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::rot</b> <i class="arg">chan</i> <i class="arg">key</i></a></dt>
<dd><p>This command creates a rot encryption transformation on top of the
channel <i class="arg">chan</i> and returns its handle.</p>
<p>The &quot;<i class="arg">key</i>&quot; specifies how far characters are rotated in the
alphabet, and is wrapped to the range &quot;0...25&quot;.</p>
<p>Note that this transformation affects only bytes in the ranges
ASCII 65...90, and 97...122, i.e. the upper- and lower-case alphabetic
characters, i.e. &quot;A...Z&quot; and &quot;a...z&quot;. All other bytes are passed
through unchanged.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key401">caesar cipher</a>, <a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key169">cipher</a>, <a href="../../../../index.html#key375">decryption</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key400">rot</a>, <a href="../../../../index.html#key399">rot13</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/spacer.html.













































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166

<div class='fossil-doc' data-title='tcl::transform::spacer - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::spacer(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::spacer - Space insertation and removal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::spacer <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::spacer</b> <i class="arg">chan</i> <i class="arg">n</i> <span class="opt">?<i class="arg">space</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::spacer</b> package provides a command
creating a channel transformation which adds spacing to the data
written to it, and removes such spacing from the data read from it.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::spacer</b> <i class="arg">chan</i> <i class="arg">n</i> <span class="opt">?<i class="arg">space</i>?</span></a></dt>
<dd><p>This command creates a spacer transformation on top of the channel
<i class="arg">chan</i> and returns its handle.</p>
<p>The <i class="arg">space</i> character sequence will be added every <i class="arg">n</i>
bytes of data written, and on the read side the same is done in
reverse, removing the spacing. If <i class="arg">space</i> is not specified it
defaults to a single space character (ASCII 32).</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key520">spacing</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/tcllib_zlib.html.









































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

<div class='fossil-doc' data-title='tcl::transform::zlib - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::zlib(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::zlib - zlib (de)compression</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::zlib <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::zlib</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">level</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::zlib</b> package provides a command creating
a channel transformation which zlib compresses the written data, and
decompresses on reading.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::zlib</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">level</i>?</span></a></dt>
<dd><p>This command creates a zlib compressor transformation on top of the
channel <i class="arg">chan</i> and returns its handle.</p>
<p>The <i class="arg">level</i> specifies how much effort is put into the
compression, from <b class="const">0</b> to <b class="const">9</b>, and defaults to <b class="const">4</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key266">compression</a>, <a href="../../../../index.html#key43">decompression</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key548">tip 234</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a>, <a href="../../../../index.html#key547">zlib</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/vt_base64.html.









































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

<div class='fossil-doc' data-title='tcl::transform::base64 - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::base64(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::base64 - Base64 encoding transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::base64 <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::base64</b> <i class="arg">chan</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::base64</b> package provides a command
creating a channel transformation which base64 encodes data written to
it, and decodes the data read from it.</p>
<p>A related transformations in this module is
<b class="package"><a href="hex.html">tcl::transform::hex</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::base64</b> <i class="arg">chan</i></a></dt>
<dd><p>This command creates a base64 transformation on top of the channel
<i class="arg">chan</i> and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key587">base64</a>, <a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key586">tip 317</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/vt_counter.html.















































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183

<div class='fossil-doc' data-title='tcl::transform::counter - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::counter(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::counter - Counter transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::counter <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::counter</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::counterr</b> package provides a command
creating a channel transformation which passes the read and written
bytes through unchanged (like <b class="package"><a href="identity.html">tcl::transform::identity</a></b>), but
additionally counts the bytes it has seen for each direction and
stores these counts in Tcl variables specified at construction time.</p>
<p>Related transformations in this module are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>,
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::counter</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>This command creates a counter transformation on top of the channel
<i class="arg">chan</i> and returns its handle. The accepted options are</p>
<dl class="doctools_options">
<dt><b class="option">-read-variable</b> varname</dt>
<dd><p>The value of the option is the name of a global or namespaced
variable, the location where the transformation has to store the
byte count of the data read from the channel.</p>
<p>If not specified, or the empty string, the counter of the read
direction is not saved.</p></dd>
<dt><b class="option">-write-variable</b> varname</dt>
<dd><p>The value of the option is the name of a global or namespaced
variable, the location where the transformation has to store the
byte count of the data written to the channel.</p>
<p>If not specified, or the empty string, the counter of the
write direction is not saved.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key276">counter</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/vt_crc32.html.

















































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

<div class='fossil-doc' data-title='tcl::transform::crc32 - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::crc32(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::crc32 - Crc32 transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::crc32 <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::crc32</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::crc32</b> package provides a command
creating a channel transformation which passes the read and written
bytes through unchanged (like <b class="package"><a href="identity.html">tcl::transform::identity</a></b>), but
additionally continuously computes the crc32 checksums of the data it
has seen for each direction and stores them in Tcl variables specified
at construction time. The checksum in question is zlib's crc32.</p>
<p>Related transformations in this module are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::crc32</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>This command creates a crc32 checksumming transformation on top of
the channel <i class="arg">chan</i> and returns its handle. The accepted options are</p>
<dl class="doctools_options">
<dt><b class="option">-read-variable</b> varname</dt>
<dd><p>The value of the option is the name of a global or namespaced
variable, the location where the transformation has to store the
crc32 checksum of the data read from the channel.</p>
<p>If not specified, or the empty string, the checksum of the read
direction is not saved.</p></dd>
<dt><b class="option">-write-variable</b> varname</dt>
<dd><p>The value of the option is the name of a global or namespaced
variable, the location where the transformation has to store the
crc32 checksum of the data written to the channel.</p>
<p>If not specified, or the empty string, the checksum of the
write direction is not saved.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key147">crc32</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/virtchannel_transform/vt_otp.html.

















































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

<div class='fossil-doc' data-title='tcl::transform::otp - Reflected/virtual channel support'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::otp(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::otp - Encryption via one-time pad</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">tcl::transform::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::transform::otp <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::transform::otp</b> <i class="arg">chan</i> <i class="arg">keychanw</i> <i class="arg">keychanr</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::otp</b> package provides a command creating
a channel transformation which uses externally provided one-time pads
to perform encryption (on writing) and decryption (on reading).</p>
<p>A related transformations in this module is
<b class="package"><a href="rot.html">tcl::transform::rot</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::otp</b> <i class="arg">chan</i> <i class="arg">keychanw</i> <i class="arg">keychanr</i></a></dt>
<dd><p>This command creates a one-time pad based encryption transformation on
top of the channel <i class="arg">chan</i> and returns its handle.</p>
<p>The two channels <i class="arg">keychanw</i> and <i class="arg">keychanr</i> contain the
one-time pads for the write and read directions, respectively. Their
contents are reads and xored with the bytes written to and read from
the channel.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key169">cipher</a>, <a href="../../../../index.html#key375">decryption</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key376">one time pad</a>, <a href="../../../../index.html#key377">otp</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a>, <a href="../../../../index.html#key374">xor</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/websocket/websocket.html.

































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496

<div class='fossil-doc' data-title='websocket - websocket client and server'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">websocket(n) 1.3.1 tcllib &quot;websocket client and server&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>websocket - Tcl implementation of the websocket protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Callbacks</a></li>
<li class="doctools_section"><a href="#section3">API</a></li>
<li class="doctools_section"><a href="#section4">Examples</a></li>
<li class="doctools_section"><a href="#section5">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">http 2.7</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">sha1</b></li>
<li>package require <b class="pkgname">base64</b></li>
<li>package require <b class="pkgname">websocket <span class="opt">?1.3.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::websocket::open</b> <i class="arg">url</i> <i class="arg">handler</i> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::websocket::send</b> <i class="arg">sock</i> <i class="arg">type</i> <span class="opt">?<i class="arg">msg</i>?</span> <span class="opt">?<i class="arg">final</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::websocket::server</b> <i class="arg">sock</i></a></li>
<li><a href="#4"><b class="cmd">::websocket::live</b> <i class="arg">sock</i> <i class="arg">path</i> <i class="arg">cb</i> <span class="opt">?<i class="arg">proto</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::websocket::test</b> <i class="arg">srvSock</i> <i class="arg">cliSock</i> <i class="arg">path</i> <span class="opt">?<i class="arg">hdrs</i>?</span> <span class="opt">?<i class="arg">qry</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::websocket::upgrade</b> <i class="arg">sock</i></a></li>
<li><a href="#7"><b class="cmd">::websocket::takeover</b> <i class="arg">sock</i> <i class="arg">handler</i> <span class="opt">?<i class="arg">server</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::websocket::conninfo</b> <i class="arg">sock</i> <i class="arg">what</i></a></li>
<li><a href="#9"><b class="cmd">::websocket::find</b> <span class="opt">?<i class="arg">host</i>?</span> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::websocket::configure</b> <i class="arg">sock</i> <i class="arg">args</i></a></li>
<li><a href="#11"><b class="cmd">::websocket::loglevel</b> <span class="opt">?<i class="arg">loglvl</i>?</span></a></li>
<li><a href="#12"><b class="cmd">::websocket::close</b> <i class="arg">sock</i> <span class="opt">?<i class="arg">code</i>?</span> <span class="opt">?<i class="arg">reason</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>NOTE: THIS DOCUMENTATION IS WORK IN PROGRESS...</p>
<p>The websocket library is a pure Tcl implementation of the WebSocket
specification covering the needs of both clients and servers.
Websockets provide a way to upgrade a regular HTTP connection into a
long-lived and continuous binary or text communication between the
client and the server.  The library offers a high-level interface to
receive and send data as specified in RFC 6455 (v. 13 of the
protocol), relieving callers from all necessary protocol framing and
reassembly.  It implements the ping facility specified by the
standard, together with levers to control it.  Pings are server-driven
and ensure the liveness of the connection across home (NAT) networks.
The library has a number of introspection facilities to inquire about
the current state of the connection, but also to receive notifications
of incoming pings, if necessary.  Finally, the library contains a
number of helper procedures to facilitate the upgrading handshaking in
existing web servers.</p>
<p>Central to the library is the procedure <b class="cmd">websocket::takeover</b> that
will take over a regular socket and treat it as a WebSocket, thus
performing all necessary protocol framing, packetisation and
reassembly in servers and clients.  The procedure also takes a
handler, a command that will be called back each time a (possibly
reassembled) packet from the remote end is ready for delivery at the
original caller.  While exported by the package, the command 
<b class="cmd">websocket::takeover</b> is seldom called in applications, since the
package provides other commands that are specifically tuned for the
needs of clients and servers.</p>
<p>Typically, clients will open a connection to a remote server by
providing a WebSocket URL (<i class="term">ws:</i> or <i class="term">wss:</i> schemes) and the
handler described above to the command <b class="cmd">websocket::open</b>. The
opening procedure is a wrapper around the latest http::geturl
implementations: it arranges to keep the socket created within the
http library opened for reuse, but confiscates it from its (internal)
map of known sockets for its own use.</p>
<p>Servers will start by registering themselves through the command 
<b class="cmd">::websocket::server</b> and a number of handlers for paths using the
command <b class="cmd">::websocket::live</b>.  Then for each incoming client
connection, they should test the incoming request to detect if it is
an upgrade request using <b class="cmd">::websocket::test</b> and perform the final
handshake to place the socket connection under the control of the
websocket library and its central procedure using <b class="cmd">::websocket::upgrade</b>.</p>
<p>Apart from these main commands, the package provides a number of
commands for introspection and basic operations on the websockets that
it has under its control.  As WebSockets connections are long-lived,
most remaining communication with the library will be by way of
callbacks, i.e. commands that are triggered whenever important events
within the library have occur, but mostly whenever data has been
received on a WebSocket.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Callbacks</a></h2>
<p>A number of commands of the library take a handler handler command as
an argument, a command which will be called back upon reception of
data, but also upon important events within the library or events
resulting from control messages sent by the remote end.  For each
callback being performed, the following arguments will be appended:</p>
<dl class="doctools_definitions">
<dt><i class="arg">sock</i></dt>
<dd><p>The identifier of the WebSocket, as returned for example by 
<b class="cmd">::websocket::open</b></p></dd>
<dt><i class="arg">type</i></dt>
<dd><p>A textual type describing the event or message content, can be one of
the following</p>
<dl class="doctools_definitions">
<dt><b class="const">text</b></dt>
<dd><p>Complete text message</p></dd>
<dt><b class="const">binary</b></dt>
<dd><p>Complete binary message</p></dd>
<dt><b class="const">ping</b></dt>
<dd><p>Incoming ping message</p></dd>
<dt><b class="const">connect</b></dt>
<dd><p>Notification of successful connection to server</p></dd>
<dt><b class="const">disconnect</b></dt>
<dd><p>Disconnection from remote end</p></dd>
<dt><b class="const">close</b></dt>
<dd><p>Pending closure of connection</p></dd>
</dl></dd>
<dt><i class="arg">msg</i></dt>
<dd><p>Will contain the data of the message, whenever this is relevant,
i.e. when the <i class="arg">type</i> is <b class="const">text</b>, <b class="const">binary</b> or
<b class="const">ping</b> and whenever there is data available.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::websocket::open</b> <i class="arg">url</i> <i class="arg">handler</i> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>This command is used in clients to open a WebSocket to a remote
websocket-enabled HTTP server.  The URL provided as an argument in
<i class="arg">url</i> should start with ws: or wss:, which are the WebSockets
counterpart of http: and https:. The <i class="arg">handler</i> is a command that
will be called back on data reception or whenever important events
occur during the life of the websocket.
<b class="cmd">::websocket::open</b> will return a socket which serves as both the
identifier of the websocket and of the physical low-level socket to
the server.  This socket can be used in a number of other commands for
introspection or for controlling the behaviour of the library.
Being essentially a wrapper around the <b class="cmd">::http::geturl</b> command,
this command provides mostly the same set of dash-led options than
<b class="cmd">::http::geturl</b>.  Documented below are the options that differ
from <b class="cmd">::http::geturl</b> and which are specific to the WebSocket
library.</p>
<dl class="doctools_definitions">
<dt>-headers</dt>
<dd><p>This option is supported, knowing that a number of headers will be
automatically added internally in the library in order to be able to
handshake the upgrading of the socket from a regular HTTP socket to a
WebSocket with the server.</p></dd>
<dt>-validate</dt>
<dd><p>This option is not supported as it has no real point for WebSockets.</p></dd>
<dt>-handler</dt>
<dd><p>This option is used internally by the websocket library and cannot be
used.</p></dd>
<dt>-command</dt>
<dd><p>This option is used internally by the websocket library and cannot be
used.</p></dd>
<dt>-protocol</dt>
<dd><p>This option specifies a list of application protocols to handshake
with the server.  This protocols might help the server triggering
application specific features.</p></dd>
<dt>-timeout</dt>
<dd><p>This option is supported, but will implemented as part of the library
to enable a number of finalising cleanups.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::websocket::send</b> <i class="arg">sock</i> <i class="arg">type</i> <span class="opt">?<i class="arg">msg</i>?</span> <span class="opt">?<i class="arg">final</i>?</span></a></dt>
<dd><p>This command will send a fragment or a control message to the remote
end of the WebSocket identified by <i class="arg">sock</i>.  The type of the
message specified in <i class="arg">type</i> can either be an integer according to
the specification or (preferrably) one of the following case
insensitive strings: &quot;text&quot;, &quot;binary&quot; or &quot;ping&quot;.  The content of the
message to send to the remote end is contained in <i class="arg">msg</i> and
message fragmentation is made possible by the setting the argument
<i class="arg">final</i> to non-true, knowing that the type of each fragment has
then to be the same.
The command returns the number of bytes that were effectively sent, or
-1 on errors.  Serious errors, such as when <i class="arg">sock</i> does not
identify a known WebSocket or when the connection is not stable yet
will generate errors that must be catched.</p></dd>
<dt><a name="3"><b class="cmd">::websocket::server</b> <i class="arg">sock</i></a></dt>
<dd><p>This command registers the (accept) socket <i class="arg">sock</i> as the
identifier fo an HTTP server that is capable of doing WebSockets.
Paths onto which this server will listen for incoming connections
should be declared using <b class="cmd">::websocket::live</b>.</p></dd>
<dt><a name="4"><b class="cmd">::websocket::live</b> <i class="arg">sock</i> <i class="arg">path</i> <i class="arg">cb</i> <span class="opt">?<i class="arg">proto</i>?</span></a></dt>
<dd><p>This procedure registers callbacks that will be performed on a
WebSocket compliant server registered with <b class="cmd">::websocket::server</b>]
whenever a client connects to a matching path and protocol. 
<i class="arg">sock</i> is the listening socket of the websocket compliant server
declared using <b class="cmd">::websocket::server</b>.  <i class="arg">path</i> is a glob-style
path to match in client request, whenever this will occur.  <i class="arg">cb</i>
is the command to callback (see Callbacks).  <i class="arg">proto</i> is a
glob-style protocol name matcher.</p></dd>
<dt><a name="5"><b class="cmd">::websocket::test</b> <i class="arg">srvSock</i> <i class="arg">cliSock</i> <i class="arg">path</i> <span class="opt">?<i class="arg">hdrs</i>?</span> <span class="opt">?<i class="arg">qry</i>?</span></a></dt>
<dd><p>This procedure will test if the connection from an incoming client on
socket <i class="arg">cliSock</i> and on the path <i class="arg">path</i> is the opening of a
WebSocket stream within a known server <i class="arg">srvSock</i>.  The incoming
request is not upgraded at once, instead a (temporary) context for the
incoming connection is created.  This allows server code to perform a
number of actions, if necessary, before the WebSocket stream
connection goes live.  The text is made by analysing the content of
the headers <i class="arg">hdrs</i> which should contain a dictionary list of the
HTTP headers of the incoming client connection.
The command will return <b class="const">1</b> if this is an incoming WebSocket
upgrade request and <b class="const">0</b> otherwise.</p></dd>
<dt><a name="6"><b class="cmd">::websocket::upgrade</b> <i class="arg">sock</i></a></dt>
<dd><p>Upgrade the socket <i class="arg">sock</i> that had been deemed by
<b class="cmd">::websocket::test</b> to be a WebSocket connection request to a true
WebSocket as recognised by this library. As a result, the necessary
connection handshake will be sent to the client, and the command will
arrange for relevant callbacks to be made during the life of the
WebSocket, notably using the specifications described by 
<b class="cmd">::websocket::live</b>.</p></dd>
<dt><a name="7"><b class="cmd">::websocket::takeover</b> <i class="arg">sock</i> <i class="arg">handler</i> <span class="opt">?<i class="arg">server</i>?</span></a></dt>
<dd><p>Take over the existing opened socket <i class="arg">sock</i> to implement sending
and receiving WebSocket framing on top of the socket.  The procedure
arranges for <i class="arg">handler</i> to be called back whenever messages,
control messages or other important internal events are received or
occured.  <i class="arg">server</i> defaults to <b class="const">0</b> and can be set to 
<b class="const">1</b> (or a boolean that evaluates to true) to specify that this is a
WebSocket within a server.  Apart from specificities in the protocol,
servers should ping their clients at regular intervals in order to
keep the connection opened at all time.  When <i class="arg">server</i> is set to
true, the library will arrange to send these pings automatically.</p></dd>
<dt><a name="8"><b class="cmd">::websocket::conninfo</b> <i class="arg">sock</i> <i class="arg">what</i></a></dt>
<dd><p>Provides callers with some introspection facilities in order to get
some semi-internal information about an existing websocket
connection. Depending on the value of the <i class="arg">what</i> argument, the
procedure returns the following piece of information:</p>
<dl class="doctools_definitions">
<dt><b class="const">peername</b></dt>
<dd><p>Name (preferred) or IP of remote end.</p></dd>
<dt><b class="const">sockname</b></dt>
<dd><p>or <b class="const">name</b> Name or IP of local end.</p></dd>
<dt><b class="const">closed</b></dt>
<dd><p><b class="const">1</b> if the connection is closed, <b class="const">0</b> otherwise</p></dd>
<dt><b class="const">client</b></dt>
<dd><p><b class="const">1</b> if the connection is a client websocket, <b class="const">0</b> otherwise</p></dd>
<dt><b class="const">server</b></dt>
<dd><p><b class="const">1</b> if the connection is a server websocket, <b class="const">0</b> otherwise</p></dd>
<dt><b class="const">type</b></dt>
<dd><p><b class="const">server</b> if the connection is a server websocket, <b class="const">client</b> otherwise.</p></dd>
<dt><b class="const">handler</b></dt>
<dd><p>The handler command associated to the websocket</p></dd>
<dt><b class="const">state</b></dt>
<dd><p>The state of the websocket, which can be one of:</p>
<dl class="doctools_definitions">
<dt><b class="const">CONNECTING</b></dt>
<dd><p>Connection to remote end is in progress.</p></dd>
<dt><b class="const">CONNECTED</b></dt>
<dd><p>Connection is connected to remote end.</p></dd>
<dt><b class="const">CLOSED</b></dt>
<dd><p>Connection is closed.</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::websocket::find</b> <span class="opt">?<i class="arg">host</i>?</span> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Look among existing websocket connections for the ones that match the
hostname and port number filters passed as parameters.  This lookup
takes the remote end into account and the <i class="arg">host</i> argument is
matched both against the hostname (whenever available) and the IP
address of the remote end.  Both the <i class="arg">host</i> and <i class="arg">port</i>
arguments are glob-style string matching filters and default to 
<b class="const">*</b>, i.e. will match any host and/or port number.</p></dd>
<dt><a name="10"><b class="cmd">::websocket::configure</b> <i class="arg">sock</i> <i class="arg">args</i></a></dt>
<dd><p>This command takes a number of dash-led options (and their values) to
configure the behaviour of an existing websocket connection.  The
recognised options are the following (they can be shortened to the
lowest common denominator):</p>
<dl class="doctools_definitions">
<dt><b class="const">-keepalive</b></dt>
<dd><p>is the number of seconds between each
keepalive pings being sent along the connection.  A zero or negative
number will effectively turn off the feature.  In servers, 
<b class="const">-keepalive</b> defaults to 30 seconds, and in clients, no pings 
are initiated.</p></dd>
<dt><b class="const">-ping</b></dt>
<dd><p>is the text that is used during the automated
pings.  This text defaults to the empty string, leading to an empty ping.</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::websocket::loglevel</b> <span class="opt">?<i class="arg">loglvl</i>?</span></a></dt>
<dd><p>Set or query the log level of the library, which defaults to error.
Logging is built on top of the logger module, and the library makes
use of the following levels: <b class="const">debug</b>, <b class="const">info</b>, <b class="const">notice</b>,
<b class="const">warn</b> and <b class="const">error</b>.  When called with no argument, this procedure will
simply return the current log level.  Otherwise <i class="arg">loglvl</i> should contain
the desired log level.</p></dd>
<dt><a name="12"><b class="cmd">::websocket::close</b> <i class="arg">sock</i> <span class="opt">?<i class="arg">code</i>?</span> <span class="opt">?<i class="arg">reason</i>?</span></a></dt>
<dd><p>Gracefully close a websocket that was directly or indirectly passed to
<b class="cmd">::websocket::takeover</b>.  The procedure will optionally send the 
<i class="arg">code</i> and describing <i class="arg">reason</i> as part of the closure handshake.
Good defaults are provided, so that reasons for a number of known codes will
be sent back. Only the first 125 characters of a reason string will be kept and
sent as part of the handshake. The known codes are:</p>
<dl class="doctools_definitions">
<dt><b class="const">1000</b></dt>
<dd><p>Normal closure (the default <i class="arg">code</i> when none provided).</p></dd>
<dt><b class="const">1001</b></dt>
<dd><p>Endpoint going away</p></dd>
<dt><b class="const">1002</b></dt>
<dd><p>Protocol Error</p></dd>
<dt><b class="const">1003</b></dt>
<dd><p>Received incompatible data type</p></dd>
<dt><b class="const">1006</b></dt>
<dd><p>Abnormal closure</p></dd>
<dt><b class="const">1007</b></dt>
<dd><p>Received data not consistent with type</p></dd>
<dt><b class="const">1008</b></dt>
<dd><p>Policy violation</p></dd>
<dt><b class="const">1009</b></dt>
<dd><p>Received message too big</p></dd>
<dt><b class="const">1010</b></dt>
<dd><p>Missing extension</p></dd>
<dt><b class="const">1011</b></dt>
<dd><p>Unexpected condition</p></dd>
<dt><b class="const">1015</b></dt>
<dd><p>TLS handshake error</p></dd>
</dl></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Examples</a></h2>
<p>The following example opens a websocket connection to the echo
service, waits 400ms to ensure that the connection is really
established and sends a single textual message which should be echoed
back by the echo service.  A real example would probably use the
<b class="const">connect</b> callback to know when connection to the remote
server has been establish and would only send data at that time.</p>
<pre class="doctools_example">
package require websocket
::websocket::loglevel debug
proc handler { sock type msg } {
    switch -glob -nocase -- $type {
	co* {
	    puts &quot;Connected on $sock&quot;
	}
	te* {
	    puts &quot;RECEIVED: $msg&quot;
	}
	cl* -
	dis* {
	}
    }
    
}
proc test { sock } {
    puts &quot;[::websocket::conninfo $sock type] from [::websocket::conninfo $sock sockname] to [::websocket::conninfo $sock peername]&quot;
    
    ::websocket::send $sock text &quot;Testing, testing...&quot;
}
set sock [::websocket::open ws://echo.websocket.org/ handler]
after 400 test $sock
vwait forever
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>websocket</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../../../../index.html#key446">http</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key447">rfc 6455</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/wip/wip.html.















































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407

<div class='fossil-doc' data-title='wip - Word Interpreter'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">wip(n) 2.2 tcllib &quot;Word Interpreter&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>wip - Word Interpreter</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">GENERAL BEHAVIOUR</a></li>
<li class="doctools_section"><a href="#section3">CLASS API</a></li>
<li class="doctools_section"><a href="#section4">OBJECT API</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">wip <span class="opt">?2.2?</span></b></li>
<li>package require <b class="pkgname">snit <span class="opt">?1.3?</span></b></li>
<li>package require <b class="pkgname">struct::set</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::wip</b> <i class="arg">wipName</i> <i class="arg">engine</i> <i class="arg">arg</i>...</a></li>
<li><a href="#2"><b class="cmd">def</b> <i class="arg">name</i></a></li>
<li><a href="#3"><b class="cmd">def</b> <i class="arg">name</i> <i class="arg">method_prefix</i></a></li>
<li><a href="#4"><b class="cmd">wipName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><b class="cmd">wip::dsl</b> <span class="opt">?<i class="arg">suffix</i>?</span></a></li>
<li><a href="#6"><i class="arg">wipName</i> <b class="method">def</b> <i class="arg">name</i> <span class="opt">?<i class="arg">method_prefix</i>?</span></a></li>
<li><a href="#7"><i class="arg">wipName</i> <b class="method">defl</b> <i class="arg">names</i></a></li>
<li><a href="#8"><i class="arg">wipName</i> <b class="method">defd</b> <i class="arg">dict</i></a></li>
<li><a href="#9"><i class="arg">wipName</i> <b class="method">deflva</b> <i class="arg">name</i>...</a></li>
<li><a href="#10"><i class="arg">wipName</i> <b class="method">defdva</b> (<i class="arg">name</i> <i class="arg">method_prefix</i>)...</a></li>
<li><a href="#11"><i class="arg">wipName</i> <b class="method">undefl</b> <i class="arg">names</i></a></li>
<li><a href="#12"><i class="arg">wipName</i> <b class="method">undefva</b> <i class="arg">name</i>...</a></li>
<li><a href="#13"><i class="arg">wipName</i> <b class="method">unknown</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#14"><i class="arg">wipName</i> <b class="method">runl</b> <i class="arg">wordlist</i></a></li>
<li><a href="#15"><i class="arg">wipName</i> <b class="method">run</b> <i class="arg">word</i>...</a></li>
<li><a href="#16"><i class="arg">wipName</i> <b class="method">run_next</b></a></li>
<li><a href="#17"><i class="arg">wipName</i> <b class="method">run_next_while</b> <i class="arg">acceptable</i></a></li>
<li><a href="#18"><i class="arg">wipName</i> <b class="method">run_next_until</b> <i class="arg">rejected</i></a></li>
<li><a href="#19"><i class="arg">wipName</i> <b class="method">run_next_if</b> <i class="arg">acceptable</i></a></li>
<li><a href="#20"><i class="arg">wipName</i> <b class="method">run_next_ifnot</b> <i class="arg">rejected</i></a></li>
<li><a href="#21"><i class="arg">wipName</i> <b class="method">next</b></a></li>
<li><a href="#22"><i class="arg">wipName</i> <b class="method">peek</b></a></li>
<li><a href="#23"><i class="arg">wipName</i> <b class="method">peekall</b></a></li>
<li><a href="#24"><i class="arg">wipName</i> <b class="method">insertl</b> <i class="arg">at</i> <i class="arg">wordlist</i></a></li>
<li><a href="#25"><i class="arg">wipName</i> <b class="method">replacel</b> <i class="arg">wordlist</i></a></li>
<li><a href="#26"><i class="arg">wipName</i> <b class="method">pushl</b> <i class="arg">wordlist</i></a></li>
<li><a href="#27"><i class="arg">wipName</i> <b class="method">addl</b> <i class="arg">wordlist</i></a></li>
<li><a href="#28"><i class="arg">wipName</i> <b class="method">insert</b> <i class="arg">at</i> <i class="arg">word</i>...</a></li>
<li><a href="#29"><i class="arg">wipName</i> <b class="method">replace</b> <i class="arg">word</i>...</a></li>
<li><a href="#30"><i class="arg">wipName</i> <b class="method">push</b> <i class="arg">word</i>...</a></li>
<li><a href="#31"><i class="arg">wipName</i> <b class="method">add</b> <i class="arg">word</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a micro interpreter for lists of words. Domain
specific languages based on this will have a bit of a Forth feel, with
the input stream segmented into words and any other structuring left
to whatever the language desired. Note that we have here in essence
only the core dispatch loop, and no actual commands whatsoever, making
this definitely only a Forth feel and not an actual Forth.</p>
<p>The idea is derived from Colin McCormack's <b class="package"><a href="../treeql/treeql.html">treeql</a></b> processor,
modified to require less boiler plate within the command
implementations, at the expense of, likely, execution speed. In
addition the interface between processor core and commands is more
complex too.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">GENERAL BEHAVIOUR</a></h2>
<p>Word interpreters have a mappping from the names of the language
commands they shall recognize to the methods in the engine to invoke
for them, and possibly fixed arguments for these methods. This mapping
is largely static, however it is possible to change it during the
execution of a word list (= program).</p>
<p>At the time a language command is defined the word interpreter will
use <b class="package"><a href="../snit/snit.html">snit</a></b>'s introspection capabilities to determine the
number of arguments expected by the method of the egnine, and together
with the number of fixed arguments supplied in the method prefix of
the mapping it then knows how many arguments the language command is
expecting. This is the command's <i class="term">arity</i>. Variable-argument
methods (i.e. with the last argument named <i class="arg">args</i>) are <em>not</em>
allowed and will cause the word interpreter to throw an error at
definition time.</p>
<p>Note that while I said <b class="package"><a href="../snit/snit.html">snit</a></b>'s abilities the engine object
can be written in any way, as long as it understands the method
<b class="method">info args</b>, which takes a method name and returns the list
of arguments for that method.</p>
<p>When executing a list of words (aka program) the first word is always
taken as the name of a language command, and the next words as its
arguments, per the <i class="term">arity</i> of the command. Command and argument
words are removed from the list and then associated method of the
engine is executed with the argument words. The process then repeats
using the then-first word of the list.</p>
<p>Note that the methods implementing the language commands may have full
access to the list of words and are allowed to manipulate as they see
fit.</p>
<ol class="doctools_enumerated">
<li><p>This means, for example, that while we cannot specify
variable-argument methods directly they can consume words after their
fixed arguments before returning to the execution loop. This may be
under the control of their fixed arguments.</p></li>
<li><p>Another possibility is the use of method <b class="method">run_next</b> and its
variants to execute commands coming after the current command,
changing the order of execution.</p></li>
<li><p>Execution can be further changed by use of the program accessor
methods which allow a command implementation to modify the remaining
list of words (insert, replace, prepend, append words) without
executing them immediately.</p></li>
<li><p>At last the basic <b class="method">run</b> methods save and restore an existing
list of words when used, enabling recursive use from within command
implementations.</p></li>
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CLASS API</a></h2>
<p>The main command of the package is:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::wip</b> <i class="arg">wipName</i> <i class="arg">engine</i> <i class="arg">arg</i>...</a></dt>
<dd><p>The command creates a new word interpreter object with an associated
global Tcl command whose name is <i class="arg">wipName</i>. If however the string
<b class="const">%AUTO%</b> was used as object name the package will generate its
own unique name for the object.</p>
<p>The <i class="arg">engine</i> is the object the word interpreter will dispatch all
recognized commands to, and the <i class="arg">arg</i>uments are a word list which
defines an initial mapping from language words to engine methods.</p>
<p>The recognized language of this word list is</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">def</b> <i class="arg">name</i></a></dt>
<dd><p>Defines <i class="arg">name</i> as command of the language, to be mapped to a
method of the <i class="arg">engine</i> having the same name.</p></dd>
<dt><a name="3"><b class="cmd">def</b> <i class="arg">name</i> <i class="arg">method_prefix</i></a></dt>
<dd><p>Defines <i class="arg">name</i> as command of the language, to be mapped to the
method of the <i class="arg">engine</i> named in the <i class="arg">method_prefix</i>.</p></dd>
</dl>
<p>The returned command may be used to invoke various operations on the
object.  It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="4"><b class="cmd">wipName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl></dd>
</dl>
<p>The package additionally exports the command:</p>
<dl class="doctools_definitions">
<dt><a name="5"><b class="cmd">wip::dsl</b> <span class="opt">?<i class="arg">suffix</i>?</span></a></dt>
<dd><p>This command is for use within snit types which wish to use one or
more wip interpreters as a component. Use within the type definition
installs most of the boilerplate needed to setup and use a word
interpreter.</p>
<p>It installs a component named <em>wip</em>, and a method
<b class="method">wip_setup</b> for initializing it. This method has to be called
from within the constructor of the type using the word interpreter.
If further installs a series of procedures which make the object API
of the word interpreter directly available to the type's methods,
without having to specify the component.</p>
<p><em>Note</em> that this does and cannot install the language to
interpret, i.e. the mapping from words to engine methods.</p>
<p>It is possible to instantiate multiple word interpreter components
within a type by using different suffices as arguments to the command.
In that case the name of the component changes to
'wip_<b class="variable">$suffix</b>', the setup command becomes
'wip_<b class="variable">$suffix</b>_setup' and all the procedures also get the suffix
'_<b class="variable">$suffix</b>'.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">OBJECT API</a></h2>
<p>The following commands are possible for word interpreter objects:</p>
<dl class="doctools_definitions">
<dt><a name="6"><i class="arg">wipName</i> <b class="method">def</b> <i class="arg">name</i> <span class="opt">?<i class="arg">method_prefix</i>?</span></a></dt>
<dd><p>Defines a language command <i class="arg">name</i> and maps it to the method named
in the engine's <i class="arg">method_prefix</i>. If the <i class="arg">method_prefix</i> name
is not specified it is simply the name of the language command.</p></dd>
<dt><a name="7"><i class="arg">wipName</i> <b class="method">defl</b> <i class="arg">names</i></a></dt>
<dd><p>Defines a series of language commands, specified through the list of
<i class="arg">names</i>, all of which are mapped to engine methods of the same
name.</p></dd>
<dt><a name="8"><i class="arg">wipName</i> <b class="method">defd</b> <i class="arg">dict</i></a></dt>
<dd><p>Defines a series of language commands, specified through the
dictionary <i class="arg">dict</i> of names and method prefixes.</p></dd>
<dt><a name="9"><i class="arg">wipName</i> <b class="method">deflva</b> <i class="arg">name</i>...</a></dt>
<dd><p>As method <b class="method">defl</b>, however the list of names is specified
through multiple arguments.</p></dd>
<dt><a name="10"><i class="arg">wipName</i> <b class="method">defdva</b> (<i class="arg">name</i> <i class="arg">method_prefix</i>)...</a></dt>
<dd><p>As method <b class="method">defd</b>, however the dictionary of names and method
prefixes is specified through multiple arguments.</p></dd>
<dt><a name="11"><i class="arg">wipName</i> <b class="method">undefl</b> <i class="arg">names</i></a></dt>
<dd><p>Removes the named series of language commands from the mapping.</p></dd>
<dt><a name="12"><i class="arg">wipName</i> <b class="method">undefva</b> <i class="arg">name</i>...</a></dt>
<dd><p>As method <b class="method">undefl</b>, however the list of names is specified
through multiple arguments.</p></dd>
<dt><a name="13"><i class="arg">wipName</i> <b class="method">unknown</b> <i class="arg">cmdprefix</i></a></dt>
<dd><p>Sets the handler for unknown words to <i class="arg">cmdprefix</i>. This command
prefix takes one argument, the current word, and either throws some
error, or returns the result of executing the word, as defined by the
handler. The default handler simply throws an error.</p></dd>
<dt><a name="14"><i class="arg">wipName</i> <b class="method">runl</b> <i class="arg">wordlist</i></a></dt>
<dd><p>Treats the list of words in <i class="arg">wordlist</i> as a program and executes
the contained command one by one. The result of the command executed
last is returned as the result of this command.</p>
<p>The <i class="arg">wordlist</i> is stored in the object for access by the other
<i class="term">run</i>-methods, and the general program accessor methods (see
below). A previously stored wordlist is saved during the execution of
this method and restored before it returns. This enables the recursive
execution of word lists within word lists.</p></dd>
<dt><a name="15"><i class="arg">wipName</i> <b class="method">run</b> <i class="arg">word</i>...</a></dt>
<dd><p>As method <b class="method">runl</b>, however the list of words to execute is
specified through multiple arguments.</p></dd>
<dt><a name="16"><i class="arg">wipName</i> <b class="method">run_next</b></a></dt>
<dd><p>Low-level method. Determines the next word in the list of words, and
its arguments, and then executes it. The result of the executed word
is the result of this method.</p>
<p>Exposed for use within command implementations.
The methods <b class="method">run</b> and <b class="method">runl</b> use it to execute words
until their word list is exhausted.</p></dd>
<dt><a name="17"><i class="arg">wipName</i> <b class="method">run_next_while</b> <i class="arg">acceptable</i></a></dt>
<dd><p>Low-level method. Invokes the method <b class="method">run_next</b> as long as the
next word is in the set of <i class="arg">acceptable</i> words, and the program is
not empty. The result of the command executed last is returned as the
result of this command.</p>
<p>Exposed for use within command implementations to change the order of
execution.</p></dd>
<dt><a name="18"><i class="arg">wipName</i> <b class="method">run_next_until</b> <i class="arg">rejected</i></a></dt>
<dd><p>Low-level method. Invokes the method <b class="method">run_next</b> until the next
word is in the set of <i class="arg">rejected</i> words, and the program is not
empty. The result of the command executed last is returned as the
result of this command.</p>
<p>Exposed for use within command implementations to change the order of
execution.</p></dd>
<dt><a name="19"><i class="arg">wipName</i> <b class="method">run_next_if</b> <i class="arg">acceptable</i></a></dt>
<dd><p>Low-level method. Invokes the method <b class="method">run_next</b> if the next
word is in the set of <i class="arg">acceptable</i> words, and the program is not
empty. The result of the command executed last is returned as the
result of this command.</p>
<p>Exposed for use within command implementations to change the order of
execution.</p></dd>
<dt><a name="20"><i class="arg">wipName</i> <b class="method">run_next_ifnot</b> <i class="arg">rejected</i></a></dt>
<dd><p>Low-level method. Invokes the method <b class="method">run_next</b> if the next
word is not in the set of <i class="arg">rejected</i> words, and the program is not
empty. The result of the command executed last is returned as the
result of this command.</p>
<p>Exposed for use within command implementations to change the order of
execution.</p></dd>
<dt><a name="21"><i class="arg">wipName</i> <b class="method">next</b></a></dt>
<dd><p>Returns the next word in the programm. The word is also removed.</p></dd>
<dt><a name="22"><i class="arg">wipName</i> <b class="method">peek</b></a></dt>
<dd><p>Returns the next word in the programm without removing it</p></dd>
<dt><a name="23"><i class="arg">wipName</i> <b class="method">peekall</b></a></dt>
<dd><p>Returns the remaining programm in toto.</p></dd>
<dt><a name="24"><i class="arg">wipName</i> <b class="method">insertl</b> <i class="arg">at</i> <i class="arg">wordlist</i></a></dt>
<dd><p>Basic programm accessor method. Inserts the specified <i class="arg">wordlist</i>
into the program, just before the word at position <i class="arg">at</i>. Positions
are counted from <b class="const">zero</b>.</p></dd>
<dt><a name="25"><i class="arg">wipName</i> <b class="method">replacel</b> <i class="arg">wordlist</i></a></dt>
<dd><p>Basic programm accessor method. Replaces the whole stored program with
the specified <i class="arg">wordlist</i>.</p></dd>
<dt><a name="26"><i class="arg">wipName</i> <b class="method">pushl</b> <i class="arg">wordlist</i></a></dt>
<dd><p>Program accessor method. The specified <i class="arg">wordlist</i> is added to the
front of the remaining program. Equivalent to</p>
<pre class="doctools_example">$wip insertl 0 $wordlist</pre>
</dd>
<dt><a name="27"><i class="arg">wipName</i> <b class="method">addl</b> <i class="arg">wordlist</i></a></dt>
<dd><p>Program accessor method. The specified <i class="arg">wordlist</i> is appended at
the end of the remaining program. Equivalent to</p>
<pre class="doctools_example">$wip insertl end $wordlist</pre>
</dd>
<dt><a name="28"><i class="arg">wipName</i> <b class="method">insert</b> <i class="arg">at</i> <i class="arg">word</i>...</a></dt>
<dd><p>Like method <b class="method">insertl</b>, except the words are specified through
multiple arguments.</p></dd>
<dt><a name="29"><i class="arg">wipName</i> <b class="method">replace</b> <i class="arg">word</i>...</a></dt>
<dd><p>Like method <b class="method">setl</b>, except the words are specified through
multiple arguments.</p></dd>
<dt><a name="30"><i class="arg">wipName</i> <b class="method">push</b> <i class="arg">word</i>...</a></dt>
<dd><p>Like method <b class="method">pushl</b>, except the words are specified through
multiple arguments.</p></dd>
<dt><a name="31"><i class="arg">wipName</i> <b class="method">add</b> <i class="arg">word</i>...</a></dt>
<dd><p>Like method <b class="method">addl</b>, except the words are specified through
multiple arguments.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<p>No examples yet.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>wip</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key38">interpreter</a>, <a href="../../../../index.html#key302">list</a>, <a href="../../../../index.html#key272">word</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/yaml/huddle.html.























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619

<div class='fossil-doc' data-title='huddle - HUDDLE'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">huddle(n) 0.2 tcllib &quot;HUDDLE&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>huddle - Create and manipulate huddle object</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">TYPE CALLBACK</a></li>
<li class="doctools_section"><a href="#section4">How to add type</a></li>
<li class="doctools_section"><a href="#section5">WORKING SAMPLE</a></li>
<li class="doctools_section"><a href="#section6">LIMITATIONS</a></li>
<li class="doctools_section"><a href="#section7">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">huddle <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">huddle create</b> <i class="arg">key</i> <i class="arg">value</i> <span class="opt">?<i class="arg">key value ...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">huddle list</b> <span class="opt">?<i class="arg">value value ...</i>?</span></a></li>
<li><a href="#3"><b class="cmd">huddle number</b> <i class="arg">number</i></a></li>
<li><a href="#4"><b class="cmd">huddle string</b> <i class="arg">string</i></a></li>
<li><a href="#5"><b class="cmd">huddle boolean</b> <i class="arg">expression to evaluate as true or false</i></a></li>
<li><a href="#6"><b class="cmd">huddle true</b></a></li>
<li><a href="#7"><b class="cmd">huddle false</b></a></li>
<li><a href="#8"><b class="cmd">huddle null</b></a></li>
<li><a href="#9"><b class="cmd">huddle get</b> <i class="arg">object</i> <i class="arg">key</i> <span class="opt">?<i class="arg">key ...</i>?</span></a></li>
<li><a href="#10"><b class="cmd">huddle gets</b> <i class="arg">object</i> <i class="arg">key</i> <span class="opt">?<i class="arg">key ...</i>?</span></a></li>
<li><a href="#11"><b class="cmd">huddle set</b> <i class="arg">objectVar</i> <i class="arg">key</i> <span class="opt">?<i class="arg">key ...</i>?</span> <i class="arg">value</i></a></li>
<li><a href="#12"><b class="cmd">huddle remove</b> <i class="arg">object</i> <i class="arg">key</i> <span class="opt">?<i class="arg">key ...</i>?</span></a></li>
<li><a href="#13"><b class="cmd">huddle combine</b> <i class="arg">object1</i> <i class="arg">object2</i> <span class="opt">?<i class="arg">object3 ...</i>?</span></a></li>
<li><a href="#14"><b class="cmd">huddle equal</b> <i class="arg">object1</i> <i class="arg">object2</i></a></li>
<li><a href="#15"><b class="cmd">huddle append</b> <i class="arg">objectVar</i> <i class="arg">key</i> <i class="arg">value</i> <span class="opt">?<i class="arg">key value ...</i>?</span></a></li>
<li><a href="#16"><b class="cmd">huddle append</b> <i class="arg">objectVar</i> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></li>
<li><a href="#17"><b class="cmd">huddle keys</b> <i class="arg">object</i></a></li>
<li><a href="#18"><b class="cmd">huddle llength</b> <i class="arg">object</i></a></li>
<li><a href="#19"><b class="cmd">huddle type</b> <i class="arg">object</i> <span class="opt">?<i class="arg">key key...</i>?</span></a></li>
<li><a href="#20"><b class="cmd">huddle strip</b> <i class="arg">object</i></a></li>
<li><a href="#21"><b class="cmd">huddle jsondump</b> <i class="arg">object</i> <span class="opt">?<i class="arg">offset</i>?</span> <span class="opt">?<i class="arg">newline</i>?</span> <span class="opt">?<i class="arg">begin_offset</i>?</span></a></li>
<li><a href="#22"><b class="cmd">huddle compile</b> <i class="arg">spec</i> <i class="arg">data</i></a></li>
<li><a href="#23"><b class="cmd">huddle isHuddle</b> <i class="arg">object</i></a></li>
<li><a href="#24"><b class="cmd">huddle checkHuddle</b> <i class="arg">object</i></a></li>
<li><a href="#25"><b class="cmd">huddle to_node</b> <i class="arg">object</i> <span class="opt">?<i class="arg">tag</i>?</span></a></li>
<li><a href="#26"><b class="cmd">huddle wrap</b> <i class="arg">tag</i> <i class="arg">src</i></a></li>
<li><a href="#27"><b class="cmd">huddle call</b> <i class="arg">tag</i> <i class="arg">command</i> <i class="arg">args</i></a></li>
<li><a href="#28"><b class="cmd">huddle addType</b> <i class="arg">callback</i></a></li>
<li><a href="#29"><b class="cmd"><a href="../../../../index.html#key540">callback</a></b> <i class="arg">command</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#30"><b class="cmd">setting</b></a></li>
<li><a href="#31"><b class="cmd">get_sub</b> <i class="arg">src</i> <i class="arg">key</i></a></li>
<li><a href="#32"><b class="cmd">strip</b> <i class="arg">src</i></a></li>
<li><a href="#33"><b class="cmd"><a href="../../../../index.html#key301">set</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#34"><b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Huddle provides a generic Tcl-based serialization/intermediary format.
Currently, each node is wrapped in a tag with simple type information.</p>
<p>When converting huddle-notation to other serialization formats like
JSON or YAML this type information is used to select the proper notation.
And when going from JSON/YAML/... to huddle their notation can be used
to select the proper huddle type.</p>
<p>In that manner huddle can serve as a common intermediary format.</p>
<pre class="doctools_example">
huddle-format: &gt;
  {HUDDLE {huddle-node}}
huddle-node: &gt;
  {tag content}
each content of tag means:
  s: (content is a) string
  L: list, each sub node is a huddle-node
  D: dict, each sub node is a huddle-node
confirmed:
  - JSON
  - YAML(generally, but cannot discribe YAML-tags)
limitation:
  - cannot discribe aliases from a node to other node.
</pre>
<p>The <b class="package">huddle</b> package returns
data as a Tcl <b class="cmd"><a href="../../../../index.html#key705">dict</a></b>.  Either the <b class="package"><a href="../../../../index.html#key705">dict</a></b> package or Tcl 8.5 is
required for use.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">huddle create</b> <i class="arg">key</i> <i class="arg">value</i> <span class="opt">?<i class="arg">key value ...</i>?</span></a></dt>
<dd><p>Create a huddle object as a dict. It can contain other huddle objects.</p></dd>
<dt><a name="2"><b class="cmd">huddle list</b> <span class="opt">?<i class="arg">value value ...</i>?</span></a></dt>
<dd><p>Create a huddle object as a list. It can contain other huddle objects.</p></dd>
<dt><a name="3"><b class="cmd">huddle number</b> <i class="arg">number</i></a></dt>
<dd><p>Create a huddle object as a number.</p></dd>
<dt><a name="4"><b class="cmd">huddle string</b> <i class="arg">string</i></a></dt>
<dd><p>Create a huddle object as a string.</p></dd>
<dt><a name="5"><b class="cmd">huddle boolean</b> <i class="arg">expression to evaluate as true or false</i></a></dt>
<dd><p>Create a huddle object as a boolean evaluating an expression as true or false-</p></dd>
<dt><a name="6"><b class="cmd">huddle true</b></a></dt>
<dd><p>Create a huddle object as a boolean true.</p></dd>
<dt><a name="7"><b class="cmd">huddle false</b></a></dt>
<dd><p>Create a huddle object as a boolean false.</p></dd>
<dt><a name="8"><b class="cmd">huddle null</b></a></dt>
<dd><p>Create a huddle object as a null.</p></dd>
<dt><a name="9"><b class="cmd">huddle get</b> <i class="arg">object</i> <i class="arg">key</i> <span class="opt">?<i class="arg">key ...</i>?</span></a></dt>
<dd><p>Almost the same as <b class="cmd">dict get</b>.
Get a sub-object from the huddle object.
<i class="arg">key</i> can be used to huddle-list's index.</p></dd>
<dt><a name="10"><b class="cmd">huddle gets</b> <i class="arg">object</i> <i class="arg">key</i> <span class="opt">?<i class="arg">key ...</i>?</span></a></dt>
<dd><p>Get a sub-object from the huddle object, stripped.</p></dd>
<dt><a name="11"><b class="cmd">huddle set</b> <i class="arg">objectVar</i> <i class="arg">key</i> <span class="opt">?<i class="arg">key ...</i>?</span> <i class="arg">value</i></a></dt>
<dd><p>Almost the same as <b class="cmd">dict set</b>.
Set a sub-object from the huddle object.
<i class="arg">key</i> can be used to huddle-list's index.</p></dd>
<dt><a name="12"><b class="cmd">huddle remove</b> <i class="arg">object</i> <i class="arg">key</i> <span class="opt">?<i class="arg">key ...</i>?</span></a></dt>
<dd><p>Almost the same as <b class="cmd">dict remove</b>.
Remove a sub-object from the huddle object.
<i class="arg">key</i> can be used to huddle-list's index.</p></dd>
<dt><a name="13"><b class="cmd">huddle combine</b> <i class="arg">object1</i> <i class="arg">object2</i> <span class="opt">?<i class="arg">object3 ...</i>?</span></a></dt>
<dd><p>Merging huddle objects given.</p>
<pre class="doctools_example">
% set aa [huddle create a b c d]
HUDDLE {D {a {s b} c {s d}}}
% set bb [huddle create a k l m]
HUDDLE {D {a {s k} l {s m}}}
% huddle combine $aa $bb
HUDDLE {D {a {s k} c {s d} l {s m}}}
</pre>
</dd>
<dt><a name="14"><b class="cmd">huddle equal</b> <i class="arg">object1</i> <i class="arg">object2</i></a></dt>
<dd><p>Comparing two huddle objects recursively.
When to equal, returns 1, otherwise 0.</p>
<pre class="doctools_example">
% set aa [huddle create a b c d]
HUDDLE {D {a {s b} c {s d}}}
% set bb [huddle create c d a b]
HUDDLE {D {c {s d} a {s b}}}
% huddle equal $aa $bb
1
</pre>
</dd>
<dt><a name="15"><b class="cmd">huddle append</b> <i class="arg">objectVar</i> <i class="arg">key</i> <i class="arg">value</i> <span class="opt">?<i class="arg">key value ...</i>?</span></a></dt>
<dd></dd>
<dt><a name="16"><b class="cmd">huddle append</b> <i class="arg">objectVar</i> <i class="arg">value</i> <span class="opt">?<i class="arg">value ...</i>?</span></a></dt>
<dd><p>Appending child elements. When for dicts, giving key/value. When for lists, giving values.</p>
<pre class="doctools_example">
% set aa [huddle create a b c d]
HUDDLE {D {a {s b} c {s d}}}
% huddle append aa a k l m
HUDDLE {D {a {s k} c {s d} l {s m}}}
% set bb [huddle list i j k l]
HUDDLE {L {{s i} {s j} {s k} {s l}}}
% huddle append bb g h i
HUDDLE {L {{s i} {s j} {s k} {s l} {s g} {s h} {s i}}}
</pre>
</dd>
<dt><a name="17"><b class="cmd">huddle keys</b> <i class="arg">object</i></a></dt>
<dd><p>The same as <b class="cmd">dict keys</b>.</p></dd>
<dt><a name="18"><b class="cmd">huddle llength</b> <i class="arg">object</i></a></dt>
<dd><p>The same as <b class="cmd">llength</b>.</p></dd>
<dt><a name="19"><b class="cmd">huddle type</b> <i class="arg">object</i> <span class="opt">?<i class="arg">key key...</i>?</span></a></dt>
<dd><p>Return the element type of specified by keys.
if <span class="opt">?key?</span> is not given, returns the type of root node.</p>
<dl class="doctools_options">
<dt><b class="option"><b class="const">string</b></b></dt>
<dd><p>the node is a tcl's string.</p></dd>
<dt><b class="option"><b class="const">dict</b></b></dt>
<dd><p>the node is a dict.</p></dd>
<dt><b class="option"><b class="const">list</b></b></dt>
<dd><p>the node is a list.</p></dd>
<dt><b class="option"><b class="const">number</b></b></dt>
<dd><p>the node is a number.</p></dd>
<dt><b class="option"><b class="const">boolean</b></b></dt>
<dd><p>the node is a boolean.</p></dd>
<dt><b class="option"><b class="const">null</b></b></dt>
<dd><p>the node is a null.</p></dd>
</dl>
<pre class="doctools_example">
% huddle type {HUDDLE {s str}}
string
% huddle type {HUDDLE {L {{s a} {s b} {s c}}}}
list
% huddle type {HUDDLE {D {aa {s b} cc {s d}}}} cc
string
</pre>
</dd>
<dt><a name="20"><b class="cmd">huddle strip</b> <i class="arg">object</i></a></dt>
<dd><p>Stripped all tags. Converted to normal Tcl's list/dict.</p></dd>
<dt><a name="21"><b class="cmd">huddle jsondump</b> <i class="arg">object</i> <span class="opt">?<i class="arg">offset</i>?</span> <span class="opt">?<i class="arg">newline</i>?</span> <span class="opt">?<i class="arg">begin_offset</i>?</span></a></dt>
<dd><p>dump a json-stream from the huddle-object.</p>
<dl class="doctools_options">
<dt><b class="option"><b class="const">offset</b> &quot;&quot;</b></dt>
<dd><p>begin offset as spaces &quot;  &quot;.</p></dd>
</dl>
<pre class="doctools_example"># normal output has some indents. some strings are escaped.
% huddle jsondump {HUDDLE {L {{L {{s i} {s baa} {s \\k} {L {{s 1.0} {s true} {s /g} {s h}}} {L {{s g}}}}} {s t}}}}
[
  [
    &quot;i&quot;,
    &quot;baa&quot;,
    &quot;\\k&quot;,
    [
      1.0,
      true,
      &quot;\/g&quot;,
      &quot;h&quot;
    ],
    [&quot;g&quot;]
  ],
  &quot;t&quot;
]
# stripped output
% huddle jsondump {HUDDLE {D {dd {D {bb {D {a {s baa} c {s {d
a}}}} cc {D {g {s h}}}}} ee {D {i {s j} k {s 1} j {s { m\a}}}}}}} &quot;&quot; &quot;&quot;
{&quot;dd&quot;: {&quot;bb&quot;: {&quot;a&quot;: &quot;baa&quot;,&quot;c&quot;: &quot;d\na&quot;},&quot;cc&quot;: {&quot;g&quot;: &quot;h&quot;}},&quot;ee&quot;: {&quot;i&quot;: &quot;j&quot;,&quot;k&quot;: 1,&quot;j&quot;: &quot; m\\a&quot;}}
</pre>
</dd>
<dt><a name="22"><b class="cmd">huddle compile</b> <i class="arg">spec</i> <i class="arg">data</i></a></dt>
<dd><p>construct a huddle object from plain old tcl values.
<i class="arg">spec</i> is defined as follows:</p>
<dl class="doctools_definitions">
<dt><b class="const">string</b></dt>
<dd><p>data is simply a string</p></dd>
<dt><b class="const">list</b></dt>
<dd><p>data is a tcl list of strings</p></dd>
<dt><b class="const">dict</b></dt>
<dd><p>data is a tcl dict of strings</p></dd>
<dt>list list</dt>
<dd><p>data is a tcl list of lists</p></dd>
<dt>list dict</dt>
<dd><p>data is a tcl list of dicts</p></dd>
<dt>dict xx list</dt>
<dd><p>data is a tcl dict where the value of key xx is a tcl list</p></dd>
<dt>dict * list</dt>
<dd><p>data is a tcl dict of lists
<i class="arg">data</i> is plain old tcl values</p></dd>
</dl>
<pre class="doctools_example">% huddle compile {dict * list} {a {1 2 3} b {4 5}}
HUDDLE {D {a {L {{s 1} {s 2} {s 3}}} b {L {{s 4} {s 5}}}}}
% huddle compile {dict * {list {dict d list}}} {a {{c 1} {d {2 2 2} e 3}} b {{f 4 g 5}}}
HUDDLE {D {a {L {{D {c {s 1}}} {D {d {L {{s 2} {s 2} {s 2}}} e {s 3}}}}} b {L {{D {f {s 4} g {s 5}}}}}}}
</pre>
</dd>
<dt><a name="23"><b class="cmd">huddle isHuddle</b> <i class="arg">object</i></a></dt>
<dd><p>if <i class="arg">object</i> is a huddle, returns 1. the other, returns 0.</p></dd>
<dt><a name="24"><b class="cmd">huddle checkHuddle</b> <i class="arg">object</i></a></dt>
<dd><p>if <i class="arg">object</i> is not a huddle, rises an error.</p></dd>
<dt><a name="25"><b class="cmd">huddle to_node</b> <i class="arg">object</i> <span class="opt">?<i class="arg">tag</i>?</span></a></dt>
<dd><p>for type-callbacks.</p>
<p>if <i class="arg">object</i> is a huddle, returns root-node. the other, returns <b class="cmd">[list s $object]</b>.</p>
<pre class="doctools_example">
% huddle to_node str
s str
% huddle to_node str !!str
!!str str
% huddle to_node {HUDDLE {s str}}
s str
% huddle to_node {HUDDLE {l {a b c}}}
l {a b c}
</pre>
</dd>
<dt><a name="26"><b class="cmd">huddle wrap</b> <i class="arg">tag</i> <i class="arg">src</i></a></dt>
<dd><p>for type-callbacks.</p>
<p>Create a huddle object from <i class="arg">src</i> with specified <i class="arg">tag</i>.</p>
<pre class="doctools_example">
% huddle wrap &quot;&quot; str
HUDDLE str
% huddle wrap s str
HUDDLE {s str}
</pre>
</dd>
<dt><a name="27"><b class="cmd">huddle call</b> <i class="arg">tag</i> <i class="arg">command</i> <i class="arg">args</i></a></dt>
<dd><p>for type-callbacks.</p>
<p>devolving <i class="arg">command</i> to default <i class="arg">tag</i>-callback</p></dd>
<dt><a name="28"><b class="cmd">huddle addType</b> <i class="arg">callback</i></a></dt>
<dd><p>add a user-specified-type/tag to the huddle library.
To see &quot;Additional Type&quot;.</p>
<dl class="doctools_options">
<dt><b class="option">callback</b></dt>
<dd><p>callback function name for additional type.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TYPE CALLBACK</a></h2>
<p>The definition of callback for user-type.</p>
<dl class="doctools_definitions">
<dt><a name="29"><b class="cmd"><a href="../../../../index.html#key540">callback</a></b> <i class="arg">command</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><dl class="doctools_options">
<dt><b class="option">command</b></dt>
<dd><p>huddle subcomand which is needed to reply by the callback.</p></dd>
<dt><b class="option">args</b></dt>
<dd><p>arguments of subcommand. The number of list of arguments is different for each subcommand.</p></dd>
</dl></dd>
</dl>
<p>The callback procedure shuould reply the following subcommands.</p>
<dl class="doctools_definitions">
<dt><a name="30"><b class="cmd">setting</b></a></dt>
<dd><p>only returns a fixed dict of the type infomation for setting the user-tag.</p>
<dl class="doctools_definitions">
<dt><b class="const">type</b> typename</dt>
<dd><p>typename of the type</p></dd>
<dt><b class="const">method</b> {method1 method2 method3 ...}</dt>
<dd><p>method list as huddle subcommand. Then, you can call <b class="cmd">[huddle method1 ...]</b></p></dd>
<dt><b class="const">tag</b> {tag1 child/parent tag2 child/parent ...}</dt>
<dd><p>tag list for huddle-node as a dict. if the type has child-nodes, use &quot;parent&quot;, otherwise use &quot;child&quot;.</p></dd>
</dl></dd>
<dt><a name="31"><b class="cmd">get_sub</b> <i class="arg">src</i> <i class="arg">key</i></a></dt>
<dd><p>returns a sub node specified by <i class="arg">key</i>.</p>
<dl class="doctools_options">
<dt><b class="option">src</b></dt>
<dd><p>a node content in huddle object.</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">strip</b> <i class="arg">src</i></a></dt>
<dd><p>returns stripped node contents. if the type has child nodes, every node must be stripped.</p></dd>
<dt><a name="33"><b class="cmd"><a href="../../../../index.html#key301">set</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>sets a sub-node from the tagged-content, and returns self.</p></dd>
<dt><a name="34"><b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>removes a sub-node from the tagged-content, and returns self.</p></dd>
</dl>
<p><b class="cmd">strip</b> must be defined at all types.
<b class="cmd">get_sub</b> must be defined at container types.
<b class="cmd">set/remove</b> shuould be defined, if you call them.</p>
<pre class="doctools_example">
# callback sample for my-dict
proc my_dict_setting {command args} {
    switch -- $command {
        setting { ; # type definition
            return {
                type dict
                method {create keys}
                tag {d child D parent}
                constructor create
                str s
            }
            # type:   the type-name
            # method: add methods to huddle's subcommand.
            #          &quot;get_sub/strip/set/remove/equal/append&quot; called by huddle module.
            #          &quot;strip&quot; must be defined at all types.
            #          &quot;get_sub&quot; must be defined at container types.
            #          &quot;set/remove/equal/append&quot; shuould be defined, if you call them.
            # tag:    tag definition(&quot;child/parent&quot; word is maybe obsoleted)
        }
        get_sub { ; # get a sub-node specified by &quot;key&quot; from the tagged-content
            foreach {src key} $args break
            return [dict get $src $key]
        }
        strip { ; # strip from the tagged-content
            foreach {src nop} $args break
            foreach {key val} $src {
                lappend result $key [huddle strip $val]
            }
            return $result
        }
        set { ; # set a sub-node from the tagged-content
            foreach {src key value} $args break
            dict set src $key $value
            return $src
        }
        remove { ; # remove a sub-node from the tagged-content
            foreach {src key value} $args break
            return [dict remove $src $key]
        }
        equal { ; # check equal for each node
            foreach {src1 src2} $args break
            if {[llength $src1] != [llength $src2]} {return 0}
            foreach {key1 val1} $src1 {
                if {![dict exists $src2 $key1]} {return 0}
                if {![huddle _equal_subs $val1 [dict get $src2 $key1]]} {return 0}
            }
            return 1
        }
        append { ; # append nodes
            foreach {str src list} $args break
            if {[llength $list] % 2} {error {wrong # args: should be &quot;huddle append objvar ?key value ...?&quot;}}
            set resultL $src
            foreach {key value} $list {
                if {$str ne &quot;&quot;} {
                    lappend resultL $key [huddle to_node $value $str]
                } else {
                    lappend resultL $key $value
                }
            }
            return [eval dict create $resultL]
        }
        create { ; # $args: all arguments after &quot;huddle create&quot;
            if {[llength $args] % 2} {error {wrong # args: should be &quot;huddle create ?key value ...?&quot;}}
            set resultL {}
            foreach {key value} $args {
                lappend resultL $key [huddle to_node $value]
            }
            return [huddle wrap D $resultL]
        }
        keys {
            foreach {src nop} $args break
            return [dict keys [lindex [lindex $src 1] 1]]
        }
        default {
            error &quot;$command is not callback for dict&quot;
        }
    }
}
</pre>
<pre class="doctools_example">
# inheritance sample from default dict-callback
proc ::yaml::_huddle_mapping {command args} {
    switch -- $command {
        setting { ; # type definition
            return {
                type dict
                method {mapping}
                tag {!!map parent}
                constructor mapping
                str !!str
            }
        }
        mapping { ; # $args: all arguments after &quot;huddle mapping&quot;
            if {[llength $args] % 2} {error {wrong # args: should be &quot;huddle mapping ?key value ...?&quot;}}
            set resultL {}
            foreach {key value} $args {
                lappend resultL $key [huddle to_node $value !!str]
            }
            return [huddle wrap !!map $resultL]
        }
        default { ; # devolving to default dict-callback
            return [huddle call D $command $args]
        }
    }
}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">How to add type</a></h2>
<p>You can add huddle-node types e.g. ::struct::tree.
To do so, first, define a callback-procedure for additional tagged-type.
The proc get argments as <i class="arg">command</i> and <span class="opt">?<i class="arg">args</i>?</span>. It has some switch-sections.</p>
<p>And, addType subcommand will called.</p>
<pre class="doctools_example">
huddle addType my_dict_setting
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">WORKING SAMPLE</a></h2>
<pre class="doctools_example">
# create as a dict
% set bb [huddle create a b c d]
HUDDLE {D {a {s b} c {s d}}}
# create as a list
% set cc [huddle list e f g h]
HUDDLE {L {{s e} {s f} {s g} {s h}}}
% set bbcc [huddle create bb $bb cc $cc]
HUDDLE {D {bb {D {a {s b} c {s d}}} cc {L {{s e} {s f} {s g} {s h}}}}}
% set folding [huddle list $bbcc p [huddle list q r] s]
HUDDLE {L {{D {bb {D {a {s b} c {s d}}} cc {L {{s e} {s f} {s g} {s h}}}}} {s p} {L {{s q} {s r}}} {s s}}}
# normal Tcl's notation
% huddle strip $folding
{bb {a b c d} cc {e f g h}} p {q r} s
# get a sub node
% huddle get $folding 0 bb
HUDDLE {D {a {s b} c {s d}}}
% huddle gets $folding 0 bb
a b c d
# overwrite a node
% huddle set folding 0 bb c kkk
HUDDLE {L {{D {bb {D {a {s b} c {s kkk}}} cc {L {{s e} {s f} {s g} {s h}}}}} {s p} {L {{s q} {s r}}} {s s}}}
# remove a node
% huddle remove $folding 2 1
HUDDLE {L {{D {bb {D {a {s b} c {s kkk}}} cc {L {{s e} {s f} {s g} {s h}}}}} {s p} {L {{s q}}} {s s}}}
% huddle strip $folding
{bb {a b c kkk} cc {e f g h}} p {q r} s
# dump as a JSON stream
% huddle jsondump $folding
[
  {
    &quot;bb&quot;: {
      &quot;a&quot;: &quot;b&quot;,
      &quot;c&quot;: &quot;kkk&quot;
    },
    &quot;cc&quot;: [
      &quot;e&quot;,
      &quot;f&quot;,
      &quot;g&quot;,
      &quot;h&quot;
    ]
  },
  &quot;p&quot;,
  [
    &quot;q&quot;,
    &quot;r&quot;
  ],
  &quot;s&quot;
]
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">LIMITATIONS</a></h2>
<p>now printing.</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>huddle</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="yaml.html">yaml</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key205">data exchange</a>, <a href="../../../../index.html#key204">exchange format</a>, <a href="../../../../index.html#key588">huddle</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key589">yaml</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2011 KATO Kanryu &lt;kanryu6@users.sourceforge.net&gt;<br>
Copyright &copy; 2015 Miguel Mart&iacute;nez L&oacute;pez &lt;aplicacionamedida@gmail.com&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/yaml/yaml.html.











































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277

<div class='fossil-doc' data-title='yaml - YAML processing'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">yaml(n) 0.3.9 tcllib &quot;YAML processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>yaml - YAML Format Encoder/Decoder</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">LIMITATIONS</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">yaml <span class="opt">?0.3.9?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::yaml::yaml2dict</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></li>
<li><a href="#2"><b class="cmd">::yaml::yaml2huddle</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></li>
<li><a href="#3"><b class="cmd">::yaml::setOption</b> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::yaml::dict2yaml</b> <i class="arg">dict</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::yaml::list2yaml</b> <i class="arg">list</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::yaml::huddle2yaml</b> <i class="arg">huddle</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">yaml</b> package provides a simple Tcl-only library for parsing the
YAML <a href="http://www.yaml.org/">http://www.yaml.org/</a> data exchange format as specified in
<a href="http://www.yaml.org/spec/1.1/">http://www.yaml.org/spec/1.1/</a>.</p>
<p>The <b class="package">yaml</b> package returns
data as a Tcl <b class="cmd"><a href="../../../../index.html#key705">dict</a></b>.  Either the <b class="package"><a href="../../../../index.html#key705">dict</a></b> package or Tcl 8.5 is
required for use.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::yaml::yaml2dict</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::yaml::yaml2huddle</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></dt>
<dd><p>Parse yaml formatted text <i class="arg">txt</i> into a Tcl dict/huddle and return the value.</p>
<dl class="doctools_options">
<dt><b class="option"><b class="const">-file</b></b></dt>
<dd><p><i class="arg">txt</i> is a filename of YAML-stream.</p></dd>
<dt><b class="option"><b class="const">-stream</b></b></dt>
<dd><p><i class="arg">txt</i> is just a YAML-stream.</p></dd>
<dt><b class="option"><b class="const">-types</b> <i class="arg">list</i></b></dt>
<dd><p>The <i class="arg">list</i> is a type list for the yaml-scalar types.(e.g. !!str !!timestamp !!integer !!true ...)</p>
<pre class="doctools_example"> -types {timestamp integer null true false}</pre>
<p>In this case, if a string matched &quot;timestamp&quot;, converted to the TCL internal timestamp.(e.g. &quot;2001-12-15T02:59:43.1Z&quot; =&gt; 1008385183)</p></dd>
<dt><b class="option"><b class="const">-m:true</b> <i class="arg">param</i></b></dt>
<dd><p>The <i class="arg">param</i> is two elements of list for the value of true, and considered strings.</p>
<pre class="doctools_example"> -m:true {1 {true on + yes y}}</pre>
<p>In this case, the string &quot;yes&quot; found in YAML Stream, automatically converted 1.</p></dd>
<dt><b class="option"><b class="const">-m:false</b> <i class="arg">param</i></b></dt>
<dd><p>The <i class="arg">param</i> is two elements of list for the value of false, and considered strings.</p>
<pre class="doctools_example"> -m:false {0 {false off - no n}}</pre>
</dd>
<dt><b class="option"><b class="const">-m:null</b> <i class="arg">param</i></b></dt>
<dd><p>The <i class="arg">param</i> is two elements of list for the value of null, and considered strings.</p>
<pre class="doctools_example"> -m:null {&quot;&quot; {null nil &quot;&quot; ~}}</pre>
</dd>
<dt><b class="option"><b class="const">-validate</b></b></dt>
<dd><p>Experiment,old: Output stream contains YAML's-tag, each node.</p>
<pre class="doctools_example">% puts [::yaml::load -validate {[aaa, bbb]}]
=&gt;
!!seq {{!!str aaa} {!!str bbb}}
</pre>
</dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::yaml::setOption</b> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>Change implicit options for the library.
Now, the params are the same as <b class="cmd">::yaml::yaml2dict</b>.
Arguments of<b class="cmd">::yaml::yaml2dict</b> is more priority than this setting.</p></dd>
<dt><a name="4"><b class="cmd">::yaml::dict2yaml</b> <i class="arg">dict</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">::yaml::list2yaml</b> <i class="arg">list</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></dt>
<dd></dd>
<dt><a name="6"><b class="cmd">::yaml::huddle2yaml</b> <i class="arg">huddle</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></dt>
<dd><p>Convert a dict/list/huddle object into YAML stream.</p>
<dl class="doctools_definitions">
<dt>indent</dt>
<dd><p>spaces indent of each block node.
currently default is 2.</p></dd>
<dt>wordwrap</dt>
<dd><p>word wrap for YAML stream.
currently default is 40.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<p>An example of a yaml stream converted to Tcl.  A yaml stream is returned as a
single item with multiple elements.</p>
<pre class="doctools_example">{
--- !&lt;tag:clarkevans.com,2002:invoice&gt;
invoice: 34843
date   : 2001-01-23
bill-to: &amp;id001
    given  : Chris
    family : Dumars
    address:
        lines: |
            458 Walkman Dr.
            Suite #292
        city    : Royal Oak
        state   : MI
        postal  : 48046
ship-to: *id001
product:
    - sku         : BL394D
      quantity    : 4
      description : Basketball
      price       : 450.00
    - sku         : BL4438H
      quantity    : 1
      description : Super Hoop
      price       : 2392.00
tax  : 251.42
total: 4443.52
comments:
    Late afternoon is best.
    Backup contact is Nancy
    Billsmer @ 338-4338.
}
=&gt;
invoice 34843 date 2001-01-23 bill-to {given Chris family Dumars address {lines {458 Walkman Dr.
Suite #292
} city {Royal Oak} state MI postal 48046}} ship-to {given Chris family Dumars address {lines {458 Walkman Dr.
Suite #292
} city {Royal Oak} state MI postal 48046}} product {{sku BL394D quantity 4 description Basketball price 450.00} {sku BL4438H quantity 1 description {Super Hoop} price 2392.00}} tax 251.42 total 4443.52 comments {Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338.}</pre>
<p>An example of a yaml object converted to Tcl.  A yaml object is returned as a
multi-element list (a dict).</p>
<pre class="doctools_example">{
---
- [name        , hr, avg  ]
- [Mark McGwire, 65, 0.278]
- [Sammy Sosa  , 63, 0.288]
-
  Mark McGwire: {hr: 65, avg: 0.278}
  Sammy Sosa: { hr: 63, avg: 0.288}
}
=&gt;
{name hr avg} {{Mark McGwire} 65 0.278} {{Sammy Sosa} 63 0.288} {{Mark McGwire} {hr 65 avg 0.278} {Sammy Sosa} {hr 63 avg 0.288}}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">LIMITATIONS</a></h2>
<p>tag parser not implemented. currentry, tags are merely ignored.</p>
<p>Only Anchor =&gt; Aliases ordering. back alias-referring is not supported.</p>
<p>Too many braces, or too few braces.</p>
<p>Not enough character set of line feeds. Please use only &quot;\n&quot; as line breaks.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>yaml</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../base64/base64.html">base64</a>, <a href="huddle.html">huddle</a>, <a href="../json/json.html">json</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key205">data exchange</a>, <a href="../../../../index.html#key588">huddle</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key589">yaml</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 KATO Kanryu &lt;kanryu6@users.sourceforge.net&gt;</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/zip/decode.html.











































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229

<div class='fossil-doc' data-title='zipfile::decode - Zip archive handling'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">zipfile::decode(n) 0.7.1 tcllib &quot;Zip archive handling&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>zipfile::decode - Access to zip archives</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">fileutil::magic::mimetype</b></li>
<li>package require <b class="pkgname">fileutil::decode 0.2.1</b></li>
<li>package require <b class="pkgname">Trf</b></li>
<li>package require <b class="pkgname">zlibtcl</b></li>
<li>package require <b class="pkgname">zipfile::decode <span class="opt">?0.7.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::zipfile::decode::archive</b></a></li>
<li><a href="#2"><b class="cmd">::zipfile::decode::close</b></a></li>
<li><a href="#3"><b class="cmd">::zipfile::decode::comment</b> <i class="arg">adict</i></a></li>
<li><a href="#4"><b class="cmd">::zipfile::decode::content</b> <i class="arg">archive</i></a></li>
<li><a href="#5"><b class="cmd">::zipfile::decode::copyfile</b> <i class="arg">adict</i> <i class="arg">path</i> <i class="arg">dst</i></a></li>
<li><a href="#6"><b class="cmd">::zipfile::decode::files</b> <i class="arg">adict</i></a></li>
<li><a href="#7"><b class="cmd">::zipfile::decode::getfile</b> <i class="arg">zdict</i> <i class="arg">path</i></a></li>
<li><a href="#8"><b class="cmd">::zipfile::decode::hasfile</b> <i class="arg">adict</i> <i class="arg">path</i></a></li>
<li><a href="#9"><b class="cmd">::zipfile::decode::iszip</b> <i class="arg">archive</i></a></li>
<li><a href="#10"><b class="cmd">::zipfile::decode::open</b> <i class="arg">archive</i></a></li>
<li><a href="#11"><b class="cmd">::zipfile::decode::unzip</b> <i class="arg">adict</i> <i class="arg">dstdir</i></a></li>
<li><a href="#12"><b class="cmd">::zipfile::decode::unzipfile</b> <i class="arg">archive</i> <i class="arg">dstdir</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to decompress and access the contents
of zip archives.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::zipfile::decode::archive</b></a></dt>
<dd><p>This command decodes the last opened (and not yet closed) zip archive
file.
The result of the command is a dictionary describing the contents of
the archive. The structure of this dictionary is not public. Proper
access should be made through the provided accessor command of this
package.</p></dd>
<dt><a name="2"><b class="cmd">::zipfile::decode::close</b></a></dt>
<dd><p>This command releases all state associated with the last call of
<b class="cmd">::zipfile::decode::open</b>.
The result of the command is the empty string.</p></dd>
<dt><a name="3"><b class="cmd">::zipfile::decode::comment</b> <i class="arg">adict</i></a></dt>
<dd><p>This command takes a dictionary describing the currently open zip
archive file, as returned by <b class="cmd">::zipfile::decode::archive</b>, and
returns the global comment of the archive.</p></dd>
<dt><a name="4"><b class="cmd">::zipfile::decode::content</b> <i class="arg">archive</i></a></dt>
<dd><p>This is a convenience command which decodes the specified zip
<i class="arg">archive</i> file and returns the list of paths found in it as its
result.</p></dd>
<dt><a name="5"><b class="cmd">::zipfile::decode::copyfile</b> <i class="arg">adict</i> <i class="arg">path</i> <i class="arg">dst</i></a></dt>
<dd><p>This command takes a dictionary describing the currently open zip
archive file, as returned by <b class="cmd">::zipfile::decode::archive</b>, and
copies the decompressed contents of the file <i class="arg">path</i> in the archive
to the the file <i class="arg">dst</i>.
An error is thrown if the file is not found in the archive.</p></dd>
<dt><a name="6"><b class="cmd">::zipfile::decode::files</b> <i class="arg">adict</i></a></dt>
<dd><p>This command takes a dictionary describing the currently open zip
archive file, as returned by <b class="cmd">::zipfile::decode::archive</b>, and
returns the list of files found in the archive.</p></dd>
<dt><a name="7"><b class="cmd">::zipfile::decode::getfile</b> <i class="arg">zdict</i> <i class="arg">path</i></a></dt>
<dd><p>This command takes a dictionary describing the currently open zip
archive file, as returned by <b class="cmd">::zipfile::decode::archive</b>, and
returns the decompressed contents of the file <i class="arg">path</i> in the archive.
An error is thrown if the file is not found in the archive.</p></dd>
<dt><a name="8"><b class="cmd">::zipfile::decode::hasfile</b> <i class="arg">adict</i> <i class="arg">path</i></a></dt>
<dd><p>This command takes a dictionary describing the currently open zip
archive file, as returned by <b class="cmd">::zipfile::decode::archive</b>, and
check if the specified <i class="arg">path</i> is found in the archive.
The result of the command is a boolean flag, <b class="const">true</b> if the path
is found, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="9"><b class="cmd">::zipfile::decode::iszip</b> <i class="arg">archive</i></a></dt>
<dd><p>This command takes the path of a presumed zip <i class="arg">archive</i> file and
returns a boolean flag as the result of the command telling us if it
actually is a zip archive (<b class="const">true</b>), or not (<b class="const">false</b>).</p></dd>
<dt><a name="10"><b class="cmd">::zipfile::decode::open</b> <i class="arg">archive</i></a></dt>
<dd><p>This command takes the path of a zip <i class="arg">archive</i> file and prepares
it for decoding.
The result of the command is the empty string.
All important information is stored in global state.  If multiple open
calls are made one after the other only the state of the last call is
available to the other commands.</p></dd>
<dt><a name="11"><b class="cmd">::zipfile::decode::unzip</b> <i class="arg">adict</i> <i class="arg">dstdir</i></a></dt>
<dd><p>This command takes a dictionary describing the currently open zip
archive file, as returned by <b class="cmd">::zipfile::decode::archive</b>, and
unpacks the archive in the given destination directory <i class="arg">dstdir</i>.
The result of the command is the empty string.</p></dd>
<dt><a name="12"><b class="cmd">::zipfile::decode::unzipfile</b> <i class="arg">archive</i> <i class="arg">dstdir</i></a></dt>
<dd><p>This is a convenience command which unpacks the specified zip
<i class="arg">archive</i> file in the given destination directory <i class="arg">dstdir</i>.</p>
<p>The result of the command is the empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>zipfile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key43">decompression</a>, <a href="../../../../index.html#key42">zip</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2016 Andreas Kupries</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/zip/encode.html.



















































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201

<div class='fossil-doc' data-title='zipfile::encode - Zip archive handling'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">zipfile::encode(n) 0.4 tcllib &quot;Zip archive handling&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>zipfile::encode - Generation of zip archives</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Class API</a></li>
<li class="doctools_section"><a href="#section3">Instance API</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">Trf</b></li>
<li>package require <b class="pkgname">crc32</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">zlibtcl</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">zipfile::encode <span class="opt">?0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::zipfile::encode</b> <span class="opt">?<i class="arg">objectName</i>?</span></a></li>
<li><a href="#2"><b class="cmd">&lt;encoder&gt;</b> <b class="method">comment:</b> <i class="arg">text</i></a></li>
<li><a href="#3"><b class="cmd">&lt;encoder&gt;</b> <b class="method">file:</b> <i class="arg">dst</i> <i class="arg">owned</i> <i class="arg">src</i> <span class="opt">?<i class="arg">noCompress</i>?</span></a></li>
<li><a href="#4"><b class="cmd">&lt;encoder&gt;</b> <b class="method">write</b> <i class="arg">archive</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the generation of zip archives.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::zipfile::encode</b> <span class="opt">?<i class="arg">objectName</i>?</span></a></dt>
<dd><p>The class command constructs encoder instances, i.e. objects. The
result of the command is the fully-qualified name of the instance
command.</p>
<p>If no <i class="arg">objectName</i> is specified the class will generate and use an
automatic name. If the <i class="arg">objectName</i> was specified, but is not
fully qualified the command will be created in the current namespace.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Instance API</a></h2>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">&lt;encoder&gt;</b> <b class="method">comment:</b> <i class="arg">text</i></a></dt>
<dd><p>This method specifies the text of the global comment for the archive.
The result of the method is the empty string.
In case of multiple calls to this method for the same encoder the data
from the last call prevails over all previous texts.</p></dd>
<dt><a name="3"><b class="cmd">&lt;encoder&gt;</b> <b class="method">file:</b> <i class="arg">dst</i> <i class="arg">owned</i> <i class="arg">src</i> <span class="opt">?<i class="arg">noCompress</i>?</span></a></dt>
<dd><p>This method adds a new file to the archive.
The contents of the file are found in the filesystem at <i class="arg">src</i>, and
will be stored in the archive under path <i class="arg">dst</i>.
If the file is declared as <i class="arg">owned</i> by the archive the original
file will be deleted when the archive is constructed and written.
If <i class="arg">noCompress</i> is set to <b class="const">true</b> the file will not be
compressed on writing. Otherwise (the default) the file is compressed
if it is advantageous.
The result of the method is an empty string.</p></dd>
<dt><a name="4"><b class="cmd">&lt;encoder&gt;</b> <b class="method">write</b> <i class="arg">archive</i></a></dt>
<dd><p>This method takes the global comment and all added files, encodes them
as a zip archive and stores the result at path <i class="arg">archive</i> in the
filesystem.
All added files which were owned by the archive are deleted at this
point.
On the issue of ordering, the files are added to the archive in the
same order as they were specified via <b class="method">file:</b>. <em>Note</em> that
this behaviour is new for version 0.4 and higher. Before 0.4 no
specific order was documented. It was lexicographically sorted. The
change was made to support <b class="cmd"><a href="../../../../index.html#key42">zip</a></b>-based file formats which require
a specific order of files in the archive, for example &quot;<b class="file">.epub</b>&quot;.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>zipfile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key266">compression</a>, <a href="../../../../index.html#key42">zip</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2009 Andreas Kupries</p>
</div>
</div>

Added embedded/www/tcllib/files/modules/zip/mkzip.html.











































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

<div class='fossil-doc' data-title='zipfile::mkzip - Zip archive creation'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">zipfile::mkzip(n) 1.2 tcllib &quot;Zip archive creation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>zipfile::mkzip - Build a zip archive</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">zipfile::mkzip <span class="opt">?1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::zipfile::mkzip::mkzip</b> <i class="arg">zipfile</i> <span class="opt">?<b class="option">-zipkit</b>?</span> <span class="opt">?<b class="option">-runtime</b> <i class="arg">prefix</i>?</span> <span class="opt">?<b class="option">-comment</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-directory</b> <i class="arg">rootpath</i>?</span> <span class="opt">?<b class="option">-exclude</b> <i class="arg">exclude</i>?</span> <span class="opt">?<b class="option">--</b>?</span> <span class="opt">?<i class="arg">path</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package utilizes the zlib functions in Tcl 8.6 to build zip
archives.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::zipfile::mkzip::mkzip</b> <i class="arg">zipfile</i> <span class="opt">?<b class="option">-zipkit</b>?</span> <span class="opt">?<b class="option">-runtime</b> <i class="arg">prefix</i>?</span> <span class="opt">?<b class="option">-comment</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-directory</b> <i class="arg">rootpath</i>?</span> <span class="opt">?<b class="option">-exclude</b> <i class="arg">exclude</i>?</span> <span class="opt">?<b class="option">--</b>?</span> <span class="opt">?<i class="arg">path</i>...?</span></a></dt>
<dd><p>From <a href="http://wiki.tcl.tk/15158">http://wiki.tcl.tk/15158</a></p>
<p>This command constructs a zip archive from a directory tree
using nothing but Tcl 8.6 core features. The resulting zip file should
be compatible with other <b class="syscmd"><a href="../../../../index.html#key42">zip</a></b> programs - with the possible
exception of unicode support. The files generated by this command use
utf-8 encoding for all filenames and comments and it has been noticed
particularly on Windows the <b class="syscmd">info-zip</b> and the Windows built-in
zip view have rather poor support for this part of the ZIP file
specification. The <b class="syscmd">7-Zip</b> program does correctly display utf8
filenames however and the <b class="package">vfs::zip</b> package will use these of
course.</p>
<p>If you use</p>
<pre class="doctools_example"><b class="cmd">::mkzip::mkzip</b> mystuff.tm -zipkit -directory mystuff.vfs</pre>
<p>it will pack your &quot;<b class="file">mystuff.vfs/</b>&quot; virtual filesystem tree into a
zip archive with a suitable header such that on unix you may mark it
executable and it should run with tclkit. Or you can run it with
<b class="syscmd">tclsh</b> or <b class="syscmd">wish</b> 8.6 if you like.</p>
<p>To change the executable header, specify the <b class="option">-runtime</b>
&quot;<b class="file">preface</b>&quot; where preface is a file containing code you want
prefixed. For instance, on Windows you can create a self-extracting
zip archive using</p>
<pre class="doctools_example">
mkzip mystuff.exe -directory mystuff.vfs -runtime unzipsfx.exe
</pre>
<p>The &quot;<b class="file">unzipsfx.exe</b>&quot; is the Info-Zip self-extracting stub.</p>
<p>Accepted options:</p>
<dl class="doctools_options">
<dt><b class="option">-runtime</b> path</dt>
<dd><p>This option specifies a file to use as prefix to the actual zip
archive. If specified <b class="option">-zipkit</b> will be ignored.</p></dd>
<dt><b class="option">-zipkit</b></dt>
<dd><p>Instructs the command to generate a prefix which makes the archive a
zip-based starkit. Ignored if <b class="option">-runtime</b> is present.</p></dd>
<dt><b class="option">-comment</b> string</dt>
<dd><p>This options specifies a global comment to place into the generated
archive.</p></dd>
<dt><b class="option">-directory</b> path</dt>
<dd><p>This option specifies the directory to place into the generated
archive. If specified any argument <i class="arg">path</i>s are <em>ignored</em>.</p></dd>
<dt><b class="option">-exclude</b> list</dt>
<dd><p>This option specifies a list of glob patterns. All paths matching at
least one of the patterns are not placed into the generated archive.
This option defaults to</p>
<pre class="doctools_example">
    CVS/* */CVS/* *~ &quot;.#*&quot; &quot;*/.#*&quot;
</pre>
</dd>
<dt><b class="option">--</b></dt>
<dd><p>This option signals the end of the options, forcing processing of all
further words as arguments, even if they begin with a dash character.</p></dd>
</dl>
<p>Accepted arguments:</p>
<dl class="doctools_arguments">
<dt>path <i class="arg">path</i></dt>
<dd><p>Each path is a directory or file to place into the generated archive.
Note however that these will be ignored when option <b class="option">-directory</b>
is specified.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>zipfile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key43">decompression</a>, <a href="../../../../index.html#key42">zip</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Pat Thoyts</p>
</div>
</div>

Added embedded/www/tcllib/toc.html.





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
<div class='fossil-doc' data-title='Table Of Contents'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="../index.html">Keyword Index</a>
| <a href="../toc0.html">Categories</a>
| <a href="../toc1.html">Modules</a>
| <a href="../toc2.html">Applications</a>
 ] <hr>
<h3> Table Of Contents </h3>
<hr><dl><dt><h2> tcllib </h2><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/machineparameters.html">tclrep/machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table>
</dl><hr>

Added embedded/www/toc.html.



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
<div class='fossil-doc' data-title='Table Of Contents'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="index.html">Keyword Index</a>
| <a href="toc0.html">Categories</a>
| <a href="toc1.html">Modules</a>
| <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Table Of Contents </h3>
<hr><dl><dt><h2>  </h2><dd>
<dl><dt>By Categories<dd>
<dl><dt>Argument entry form, mega widget<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
</table></dl>
<dl><dt>Benchmark tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt>CGI programming<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt>Channels<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt>Coroutine<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt>Data structures<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt>debugging, tracing, and logging<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt>Documentation tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
</table></dl>
<dl><dt>File<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl>
<dl><dt>File formats<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>Grammars and finite automata<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt>Hashes, checksums, and encryption<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt>Mathematics<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt>Networking<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt>Page Parser Generator<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt>Parsing and Grammars<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt>Procedures, arguments, parameters, options<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt>Programming tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt>System<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>TclOO<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
</table></dl>
<dl><dt>Terminal control<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt>Text formatter plugin<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
</table></dl>
<dl><dt>Text processing<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt>Transfer module<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt>Unfiled<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/machineparameters.html">tclrep/machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>Utilites<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>Utility<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt>Validation, Type checking<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl></table></dl>
<dl><dt>By Type<dd>
<dl><dt>Applications<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
</table></dl>
<dl><dt>Modules<dd>
<dl><dt>aes<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
</table></dl>
<dl><dt>amazon-s3<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
</table></dl>
<dl><dt>asn<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
</table></dl>
<dl><dt>base32<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
</table></dl>
<dl><dt>base64<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt>bee<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>bench<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt>bibtex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
</table></dl>
<dl><dt>blowfish<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
</table></dl>
<dl><dt>cache<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
</table></dl>
<dl><dt>clock<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
</table></dl>
<dl><dt>cmdline<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
</table></dl>
<dl><dt>comm<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
</table></dl>
<dl><dt>control<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
</table></dl>
<dl><dt>coroutine<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt>counter<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
</table></dl>
<dl><dt>crc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
</table></dl>
<dl><dt>cron<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>csv<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
</table></dl>
<dl><dt>debug<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt>des<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
</table></dl>
<dl><dt>dicttool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>dns<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
</table></dl>
<dl><dt>docstrip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
</table></dl>
<dl><dt>doctools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
</table></dl>
<dl><dt>doctools2base<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
</table></dl>
<dl><dt>doctools2idx<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
</table></dl>
<dl><dt>doctools2toc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
</table></dl>
<dl><dt>dtplite<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
</table></dl>
<dl><dt>fileutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
</table></dl>
<dl><dt>ftp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
</table></dl>
<dl><dt>ftpd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
</table></dl>
<dl><dt>fumagic<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
</table></dl>
<dl><dt>generator<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
</table></dl>
<dl><dt>gpx<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
</table></dl>
<dl><dt>grammar_aycock<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
</table></dl>
<dl><dt>grammar_fa<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
</table></dl>
<dl><dt>grammar_me<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
</table></dl>
<dl><dt>grammar_peg<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt>hook<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
</table></dl>
<dl><dt>html<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
</table></dl>
<dl><dt>htmlparse<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
</table></dl>
<dl><dt>http<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
</table></dl>
<dl><dt>ident<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
</table></dl>
<dl><dt>imap4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
</table></dl>
<dl><dt>inifile<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
</table></dl>
<dl><dt>interp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
</table></dl>
<dl><dt>irc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
</table></dl>
<dl><dt>javascript<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
</table></dl>
<dl><dt>jpeg<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>json<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
</table></dl>
<dl><dt>lambda<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
</table></dl>
<dl><dt>ldap<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
</table></dl>
<dl><dt>log<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
</table></dl>
<dl><dt>map<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
</table></dl>
<dl><dt>mapproj<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
</table></dl>
<dl><dt>markdown<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
</table></dl>
<dl><dt>math<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/machineparameters.html">tclrep/machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
</table></dl>
<dl><dt>md4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>md5<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>md5crypt<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
</table></dl>
<dl><dt>mime<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
</table></dl>
<dl><dt>multiplexer<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
</table></dl>
<dl><dt>namespacex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
</table></dl>
<dl><dt>ncgi<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt>nettool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
</table></dl>
<dl><dt>nmea<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
</table></dl>
<dl><dt>nns<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
</table></dl>
<dl><dt>nntp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
</table></dl>
<dl><dt>ntp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
</table></dl>
<dl><dt>oauth<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
</table></dl>
<dl><dt>ooutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
</table></dl>
<dl><dt>otp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
</table></dl>
<dl><dt>page<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt>pki<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
</table></dl>
<dl><dt>pluginmgr<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
</table></dl>
<dl><dt>png<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>pop3<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
</table></dl>
<dl><dt>pop3d<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
</table></dl>
<dl><dt>practcl<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
</table></dl>
<dl><dt>processman<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>profiler<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
</table></dl>
<dl><dt>pt<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt>rc4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
</table></dl>
<dl><dt>rcs<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
</table></dl>
<dl><dt>report<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
</table></dl>
<dl><dt>rest<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
</table></dl>
<dl><dt>ripemd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>sasl<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
</table></dl>
<dl><dt>sha1<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>simulation<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt>smtpd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
</table></dl>
<dl><dt>snit<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
</table></dl>
<dl><dt>soundex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
</table></dl>
<dl><dt>stooop<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
</table></dl>
<dl><dt>string<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
</table></dl>
<dl><dt>stringprep<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
</table></dl>
<dl><dt>struct<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
</table></dl>
<dl><dt>tar<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
</table></dl>
<dl><dt>tepam<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt>term<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt>textutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
</table></dl>
<dl><dt>tie<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
</table></dl>
<dl><dt>tiff<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>tool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>transfer<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt>treeql<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt>try<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt>udpcluster<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
</table></dl>
<dl><dt>uev<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
</table></dl>
<dl><dt>units<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
</table></dl>
<dl><dt>uri<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
</table></dl>
<dl><dt>uuid<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt>valtype<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl>
<dl><dt>virtchannel_base<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
</table></dl>
<dl><dt>virtchannel_core<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
</table></dl>
<dl><dt>virtchannel_transform<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt>websocket<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt>wip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt>yaml<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>zip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl></table></dl></table></dl>
</dl><hr>

Added embedded/www/toc0.html.











































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
<div class='fossil-doc' data-title='Table Of Contents'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="index.html">Keyword Index</a>
| <a href="toc0.html">Categories</a>
| <a href="toc1.html">Modules</a>
| <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Table Of Contents </h3>
<hr><dl><dt><h2>  </h2><dd>
<dl><dt>By Categories<dd>
<dl><dt>Argument entry form, mega widget<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
</table></dl>
<dl><dt>Benchmark tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt>CGI programming<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt>Channels<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt>Coroutine<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt>Data structures<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt>debugging, tracing, and logging<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt>Documentation tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
</table></dl>
<dl><dt>File<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl>
<dl><dt>File formats<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>Grammars and finite automata<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt>Hashes, checksums, and encryption<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt>Mathematics<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt>Networking<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt>Page Parser Generator<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt>Parsing and Grammars<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt>Procedures, arguments, parameters, options<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt>Programming tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt>System<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>TclOO<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
</table></dl>
<dl><dt>Terminal control<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt>Text formatter plugin<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
</table></dl>
<dl><dt>Text processing<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt>Transfer module<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt>Unfiled<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/machineparameters.html">tclrep/machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>Utilites<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>Utility<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt>Validation, Type checking<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl></table></dl>
</dl><hr>

Added embedded/www/toc1.html.

































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
<div class='fossil-doc' data-title='Table Of Contents'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="index.html">Keyword Index</a>
| <a href="toc0.html">Categories</a>
| <a href="toc1.html">Modules</a>
| <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Table Of Contents </h3>
<hr><dl><dt><h2>  </h2><dd>
<dl><dt>Modules<dd>
<dl><dt>aes<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
</table></dl>
<dl><dt>amazon-s3<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
</table></dl>
<dl><dt>asn<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
</table></dl>
<dl><dt>base32<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
</table></dl>
<dl><dt>base64<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt>bee<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>bench<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt>bibtex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
</table></dl>
<dl><dt>blowfish<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
</table></dl>
<dl><dt>cache<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
</table></dl>
<dl><dt>clock<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
</table></dl>
<dl><dt>cmdline<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
</table></dl>
<dl><dt>comm<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
</table></dl>
<dl><dt>control<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
</table></dl>
<dl><dt>coroutine<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt>counter<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
</table></dl>
<dl><dt>crc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
</table></dl>
<dl><dt>cron<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>csv<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
</table></dl>
<dl><dt>debug<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt>des<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
</table></dl>
<dl><dt>dicttool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>dns<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
</table></dl>
<dl><dt>docstrip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
</table></dl>
<dl><dt>doctools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
</table></dl>
<dl><dt>doctools2base<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
</table></dl>
<dl><dt>doctools2idx<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
</table></dl>
<dl><dt>doctools2toc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
</table></dl>
<dl><dt>dtplite<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
</table></dl>
<dl><dt>fileutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
</table></dl>
<dl><dt>ftp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
</table></dl>
<dl><dt>ftpd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
</table></dl>
<dl><dt>fumagic<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
</table></dl>
<dl><dt>generator<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
</table></dl>
<dl><dt>gpx<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
</table></dl>
<dl><dt>grammar_aycock<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
</table></dl>
<dl><dt>grammar_fa<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
</table></dl>
<dl><dt>grammar_me<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
</table></dl>
<dl><dt>grammar_peg<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt>hook<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
</table></dl>
<dl><dt>html<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
</table></dl>
<dl><dt>htmlparse<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
</table></dl>
<dl><dt>http<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
</table></dl>
<dl><dt>ident<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
</table></dl>
<dl><dt>imap4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
</table></dl>
<dl><dt>inifile<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
</table></dl>
<dl><dt>interp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
</table></dl>
<dl><dt>irc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
</table></dl>
<dl><dt>javascript<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
</table></dl>
<dl><dt>jpeg<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>json<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
</table></dl>
<dl><dt>lambda<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
</table></dl>
<dl><dt>ldap<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
</table></dl>
<dl><dt>log<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
</table></dl>
<dl><dt>map<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
</table></dl>
<dl><dt>mapproj<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
</table></dl>
<dl><dt>markdown<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
</table></dl>
<dl><dt>math<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/machineparameters.html">tclrep/machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
</table></dl>
<dl><dt>md4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>md5<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>md5crypt<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
</table></dl>
<dl><dt>mime<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
</table></dl>
<dl><dt>multiplexer<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
</table></dl>
<dl><dt>namespacex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
</table></dl>
<dl><dt>ncgi<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt>nettool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
</table></dl>
<dl><dt>nmea<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
</table></dl>
<dl><dt>nns<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
</table></dl>
<dl><dt>nntp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
</table></dl>
<dl><dt>ntp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
</table></dl>
<dl><dt>oauth<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
</table></dl>
<dl><dt>ooutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
</table></dl>
<dl><dt>otp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
</table></dl>
<dl><dt>page<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt>pki<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
</table></dl>
<dl><dt>pluginmgr<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
</table></dl>
<dl><dt>png<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>pop3<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
</table></dl>
<dl><dt>pop3d<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
</table></dl>
<dl><dt>practcl<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
</table></dl>
<dl><dt>processman<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>profiler<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
</table></dl>
<dl><dt>pt<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt>rc4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
</table></dl>
<dl><dt>rcs<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
</table></dl>
<dl><dt>report<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
</table></dl>
<dl><dt>rest<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
</table></dl>
<dl><dt>ripemd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>sasl<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
</table></dl>
<dl><dt>sha1<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>simulation<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt>smtpd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
</table></dl>
<dl><dt>snit<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
</table></dl>
<dl><dt>soundex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
</table></dl>
<dl><dt>stooop<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
</table></dl>
<dl><dt>string<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
</table></dl>
<dl><dt>stringprep<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
</table></dl>
<dl><dt>struct<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
</table></dl>
<dl><dt>tar<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
</table></dl>
<dl><dt>tepam<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt>term<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt>textutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
</table></dl>
<dl><dt>tie<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
</table></dl>
<dl><dt>tiff<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>tool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>transfer<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt>treeql<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt>try<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt>udpcluster<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
</table></dl>
<dl><dt>uev<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
</table></dl>
<dl><dt>units<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
</table></dl>
<dl><dt>uri<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
</table></dl>
<dl><dt>uuid<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt>valtype<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl>
<dl><dt>virtchannel_base<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
</table></dl>
<dl><dt>virtchannel_core<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
</table></dl>
<dl><dt>virtchannel_transform<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt>websocket<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt>wip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt>yaml<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>zip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl></table></dl>
</dl><hr>

Added embedded/www/toc2.html.







































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<div class='fossil-doc' data-title='Table Of Contents'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>
 <hr> [
   <a href="index.html">Keyword Index</a>
| <a href="toc0.html">Categories</a>
| <a href="toc1.html">Modules</a>
| <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Table Of Contents </h3>
<hr><dl><dt><h2>  </h2><dd>
<dl><dt>Applications<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
</table></dl>
</dl><hr>

Changes to examples/ftp/hpupdate.tcl.

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.menu.file add command -label "Connect" -underline 0 -command {BusyCommand Connect} -accelerator Alt+C
.menu.file add command -label "Disconnect" -underline 1 -state disabled -command {BusyCommand Disconnect} -accelerator Alt+I
.menu.file add separator
.menu.file add command -label "Exit" -underline 0 -command Quit -accelerator Alt+X

#menu .menu.edit -tearoff 0
#.menu add cascade -label "Bearbeiten" -menu .menu.edit -underline 0
#.menu.edit add command -label "Alle Löschen" -underline 0 -state disabled -command {
#	.view.remote.list selection set 0 end; BusyCommand DeleteremoteFiles}
#.menu.edit add command -label "Alle Ãœbertragen" -underline 0 -state disabled -command Quit

menu .menu.view -tearoff 0
.menu add cascade -label "View" -menu .menu.view -underline 0
.menu.view add command -label "Refresh" -underline 0 -command {BusyCommand Refresh} -accelerator Alt+R

menu .menu.options -tearoff 0
.menu add cascade -label "Options" -menu .menu.options -underline 0







|

|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.menu.file add command -label "Connect" -underline 0 -command {BusyCommand Connect} -accelerator Alt+C
.menu.file add command -label "Disconnect" -underline 1 -state disabled -command {BusyCommand Disconnect} -accelerator Alt+I
.menu.file add separator
.menu.file add command -label "Exit" -underline 0 -command Quit -accelerator Alt+X

#menu .menu.edit -tearoff 0
#.menu add cascade -label "Bearbeiten" -menu .menu.edit -underline 0
#.menu.edit add command -label "Alle Löschen" -underline 0 -state disabled -command {
#	.view.remote.list selection set 0 end; BusyCommand DeleteremoteFiles}
#.menu.edit add command -label "Alle Übertragen" -underline 0 -state disabled -command Quit

menu .menu.view -tearoff 0
.menu add cascade -label "View" -menu .menu.view -underline 0
.menu.view add command -label "Refresh" -underline 0 -command {BusyCommand Refresh} -accelerator Alt+R

menu .menu.options -tearoff 0
.menu add cascade -label "Options" -menu .menu.options -underline 0

Changes to examples/httpd/htdocs/content.file.md.

Changes to examples/httpd/htdocs/content.md.

Changes to examples/httpd/htdocs/content.proxy.md.

Changes to examples/httpd/htdocs/content.scgi.md.

Changes to examples/httpd/htdocs/content.server.md.

Changes to examples/httpd/htdocs/example.md.

Changes to examples/httpd/htdocs/index.md.

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
Your test server works!

* [Tcllib embedded docs](/tcllib/index.html)
* [Tcllib's fossil repo (hosted via SCGI)](/fossil)
* [Standard Markdown Example Page](example.md)
* [Static HTML Page](html_static_page.html)
* [Template HTML Page](header.tml)

A locally served image:
![Locally Served Image](/tcllib/image/arch_core_container.png "Core Container")

Internal documentation for httpd:

* [Operating Principals](operations.md)
* [Program Listing for docserver.tcl](docserver.tcl)
* [Class httpd::reply](reply.md)
* [Class httpd::server](server.md)
* [Class httpd::content](content.md)
    * [Content Server](content.server.md)
    * [Form handler](content.form.md)
    * [File handler](content.file.md)
    * [SCGI handler](content.scgi.md)
    * [Proxy handler](content.proxy.md)

_Upload Test_

<form action=/upload method="POST" enctype="multipart/form-data">
<input name=path />
<input type="file" name=filename />
<input type=submit />
</form>






<
















<
<
<
<
<
<
<
<
1
2
3
4
5
6

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22








Your test server works!

* [Tcllib embedded docs](/tcllib/index.html)
* [Tcllib's fossil repo (hosted via SCGI)](/fossil)
* [Standard Markdown Example Page](example.md)
* [Static HTML Page](html_static_page.html)


A locally served image:
![Locally Served Image](/tcllib/image/arch_core_container.png "Core Container")

Internal documentation for httpd:

* [Operating Principals](operations.md)
* [Program Listing for docserver.tcl](docserver.tcl)
* [Class httpd::reply](reply.md)
* [Class httpd::server](server.md)
* [Class httpd::content](content.md)
    * [Content Server](content.server.md)
    * [Form handler](content.form.md)
    * [File handler](content.file.md)
    * [SCGI handler](content.scgi.md)
    * [Proxy handler](content.proxy.md)








Changes to examples/httpd/htdocs/operations.md.

Changes to examples/httpd/htdocs/reply.md.

Changes to examples/httpd/httpd.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116






117





118
119















120
121
122






123
124



125







126








127
128
129

















































130

131
132
133
134
135




136




137
138



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
###
# "Simple" webserver example
###

set DIR [file dirname [file normalize [info script]]]
set DEMOROOT [file join $DIR htdocs]
set tcllibroot  [file normalize [file join $DIR .. ..]]
set auto_path [linsert $auto_path 0 [file normalize [file join $tcllibroot modules]]]

package require httpd 4.1

###
# This script creates two toplevel domains:
# * Hosting the tcllib embedded documentation as static content
# * Hosting a local fossil mirror of the tcllib repository
###
package require httpd

proc ::fossil-list {} {
  return [::fossil all list]
}
proc ::fossil args {
  if {![info exists ::fossil_exe]} {
    set ::fossil_exe fossil
  }
  if {[llength $args]==0} {
    return $::fossil_exe
  }
  return [exec ${::fossil_exe} {*}$args]
}

clay::define httpd::content.fossil_node_proxy {

  superclass httpd::content.proxy

  method FileName {} {
    set uri    [my request get REQUEST_URI]
    set prefix [my clay get prefix]
    set module [lindex [split $uri /] 2]
    if {![info exists ::fossil_process($module)]} {
      set dbfiles [::fossil-list]
      foreach file [lsort -dictionary $dbfiles]  {
        dict set result [file rootname [file tail $file]] $file
      }
      if {![dict exists $result $module]} {
        return {}
      }
      set dbfile [dict get $result $module]
      if {![file exists $dbfile]} {
        return {}
      }
      set ::fossil_process($module) $dbfile

    }
    return [list $module $::fossil_process($module)]
  }

  method proxy_path {} {
    set uri [string trimleft [my request get REQUEST_URI] /]
    set prefix [my clay get prefix]
    set module [lindex [split $uri /] 1]
    set path /[string range $uri [string length $prefix/$module] end]
    return $path
  }

  method proxy_channel {} {
    ###
    # This method returns a channel to the
    # proxied socket/stdout/etc








    ###
    lassign [my FileName] module dbfile
    set EXE [my Cgi_Executable fossil]
    set baseurl http://[my request get HTTP_HOST][my clay get prefix]/$module
    if { $::tcl_platform(platform) eq "windows"} {
      return [open "|fossil.exe http $dbfile -baseurl $baseurl" r+]
    } else {
      return [open "|fossil http $dbfile -baseurl $baseurl 2>@1" r+]
    }
  }
}




clay::define httpd::content.fossil_node_scgi {

  superclass httpd::content.scgi
  method scgi_info {} {
    set uri    [my request get REQUEST_URI]
    set prefix [my clay get prefix]
    set module [lindex [split $uri /] 2]
    file mkdir ~/tmp
    if {![info exists ::fossil_process($module)]} {
      package require processman
      package require nettool
      set port [::nettool::allocate_port 40000]
      set handle fossil:$port
      set dbfiles [::fossil-list]
      foreach file [lsort -dictionary $dbfiles]  {
        dict set result [file rootname [file tail $file]] $file
      }
      set dbfile [dict get $result $module]
      if {![file exists $dbfile]} {
        tailcall my error 400 {Not Found}
      }
      set mport [my <server> port_listening]
      set cmd [list [::fossil] server $dbfile --port $port --localhost --scgi 2>~/tmp/$module.err >~/tmp/$module.log]

      dict set ::fossil_process($module) port $port
      dict set ::fossil_process($module) handle $handle
      dict set ::fossil_process($module) cmd $cmd
      dict set ::fossil_process($module) SCRIPT_NAME $prefix/$module
    }
    dict with ::fossil_process($module) {}
    if {![::processman::running $handle]} {
      set process [::processman::spawn $handle {*}$cmd]
      my varname paused
      after 500
    }
    return [list localhost $port $SCRIPT_NAME]
  }
}












::clay::define ::docserver::server {
  superclass ::httpd::server
















  method debug args {
    #puts [list DEBUG {*}$args]






  }
  method log args {



    #puts [list LOG {*}$args]







  }









}


















































set serveropts [::httpd::server clay get server/]

foreach {f v}  [::clay::args_to_options {*}$::argv] {
  if {[dict exists $serveropts $f]} {
    dict set serveropts $f $v
  }
}




if {[dict exists $serveropts fossil]} {




  set ::fossil_exe [dict get $serveropts fossil]
}




::docserver::server create appmain doc_root $DEMOROOT {*}$argv
appmain plugin basic_url ::httpd::plugin.dict_dispatch
appmain uri add * /tcllib* [list mixin {reply httpd::content.file} path [file join $tcllibroot embedded www]]
appmain uri direct * /fossil {} {
  my puts "<HTML><HEAD><TITLE>Local Fossil Repositories</TITLE></HEAD><BODY>"
  global recipe
  my puts "<UL>"
  set dbfiles [::fossil-list]
  foreach file [lsort -dictionary $dbfiles]  {
    dict set result [file rootname [file tail $file]] $file
  }
  foreach {module dbfile} [lsort -dictionary -stride 2 $result] {
    my puts "<li><a HREF=/fossil/$module>$module</a>"
  }
  my puts {</UL></BODY></HTML>}
}
appmain uri add * /fossil/* [list mixin {reply httpd::content.fossil_node_proxy}]
appmain uri direct * /upload {} {
  my puts "<HTML><HEAD><TITLE>IRM Dispatch Server</TITLE></HEAD><BODY>"
  my puts "<TABLE width=100%>"
  set FORMDAT [my FormData]
  foreach {f v} [my FormData] {
      my puts "<tr><th>$f</th><td>$v</td></tr>"
  }
  my puts "<tr><td colspan=10><hr></td></tr>"
  foreach {f v} [my clay dump] {
      my puts "<tr><th>$f</th><td>$v</td></tr>"
  }
  my puts "<tr><td colspan=10><hr></td></tr>"
  foreach part [dict getnull $FORMDAT MIME_PARTS] {
    my puts "<tr><td colspan=10><hr></td></tr>"
    foreach f [::mime::getheader $part -names] {
      my puts "<tr><th>$f</th><td>[mime::getheader $part $f]</td></tr>"
    }
    my puts "<tr><td colspan=10>[::mime::getbody $part -decode]</td></tr>"
  }
  my puts "<tr><th>File Size</th><td>[my request get CONTENT_LENGTH]</td></tr>"
  my puts </TABLE>
  my puts </BODY></HTML>
}
appmain uri direct * /dynamic {} {
  my puts "<HTML><HEAD><TITLE>IRM Dispatch Server</TITLE></HEAD><BODY>"
  my puts "<TABLE width=100%>"
  foreach {f v} [my request dump] {
    my puts "<tr><th>$f</th><td>$v</td></tr>"
  }
  my puts "<tr><td colspan=10><hr></td></tr>"
  foreach {f v} [my clay dump] {
    my puts "<tr><th>$f</th><td>$v</td></tr>"
  }
  my puts "<tr><th>File Size</th><td>[my request get CONTENT_LENGTH]</td></tr>"
  my puts </TABLE>
  my puts </BODY></HTML>
}

puts [list LISTENING on [appmain port_listening]]
cron::main








>
|
>




















|

|
|
|
|
|
<
<
|
|
|
|
|
<
<
|
<
<
|
<
>
|
<
|
<
<
<
<
<
<
<
|
<
<
|
|
<
>
>
>
>
>
>
>
>
|
<
<
<
<
<
|
<
<
<
<
>
|
>
>
|

|

|
|

















|













|
>
>
>
>
>
>
|
>
>
>
>
>
|
<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
<
<
>
>
>
>
>
>

|
>
>
>
|
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
|
|



>
>
>
>
|
>
>
>
>
|

>
>
>


<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132


133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235

236













237





































238
239
240
###
# "Simple" webserver example
###

set DIR [file dirname [file normalize [info script]]]
set DEMOROOT [file join $DIR htdocs]
set tcllibroot  [file normalize [file join $DIR .. ..]]
set auto_path [linsert $auto_path 0 [file normalize [file join $tcllibroot modules]]]
package require httpd
package require httpd::content

###
# This script creates two toplevel domains:
# * Hosting the tcllib embedded documentation as static content
# * Hosting a local fossil mirror of the tcllib repository
###
package require httpd

proc ::fossil-list {} {
  return [::fossil all list]
}
proc ::fossil args {
  if {![info exists ::fossil_exe]} {
    set ::fossil_exe fossil
  }
  if {[llength $args]==0} {
    return $::fossil_exe
  }
  return [exec ${::fossil_exe} {*}$args]
}

tool::class create httpd::content::fossil_root {

  method content {} {
    my reset
    my puts "<HTML><HEAD><TITLE>Local Fossil Repositories</TITLE></HEAD><BODY>"
    global recipe
    my puts "<UL>"


    set dbfiles [::fossil-list]
    foreach file [lsort -dictionary $dbfiles]  {
      dict set result [file rootname [file tail $file]] $file
    }
    foreach {module dbfile} [lsort -dictionary -stride 2 $result] {


      my puts "<li><a HREF=/fossil/$module>$module</a>"


    }

    my puts {</UL></BODY></HTML>}
  }

}










###
# This driver for fossil is not a standard SCGI module

# it's more or less cargo culted from a working prototype
# developed for the GORT project. You'll note it does some
# things that are non-standard for SCGI, and that's to work
# around quirks in Fossil SCGI implementation.
#
# (Either that or my reading of SCGI specs is way, way off.
# I'm 75% sure I'm doing something wrong.)
#
# Actually, according to DRH we should really be using CGI





# because that is better supported. So until we get the




# CGI functions fleshed out, here's FOSSIL...
#
# --Sean "The Hypnotoad" Woods
###
tool::class create httpd::content::fossil_node_scgi {

  superclass httpd::content::scgi
  method scgi_info {} {
    set uri    [my query_headers get REQUEST_URI]
    set prefix [my query_headers get prefix]
    set module [lindex [split $uri /] 2]
    file mkdir ~/tmp
    if {![info exists ::fossil_process($module)]} {
      package require processman
      package require nettool
      set port [::nettool::allocate_port 40000]
      set handle fossil:$port
      set dbfiles [::fossil-list]
      foreach file [lsort -dictionary $dbfiles]  {
        dict set result [file rootname [file tail $file]] $file
      }
      set dbfile [dict get $result $module]
      if {![file exists $dbfile]} {
        tailcall my error 400 {Not Found}
      }
      set mport [my <server> port_listening]
      set cmd [list [::fossil] server $dbfile --port $port --localhost --scgi 2>~/tmp/$module.err >~/tmp/$module.log]
 
      dict set ::fossil_process($module) port $port
      dict set ::fossil_process($module) handle $handle
      dict set ::fossil_process($module) cmd $cmd
      dict set ::fossil_process($module) SCRIPT_NAME $prefix/$module
    }
    dict with ::fossil_process($module) {}
    if {![::processman::running $handle]} {
      set process [::processman::spawn $handle {*}$cmd]
      my varname paused
      after 500
    }
    return [list localhost $port $SCRIPT_NAME]
  }

  method content {} {
    my variable sock chan
    set sockinfo [my scgi_info]
    if {$sockinfo eq {}} {
      my error 404 {Not Found}
      return
    }
    lassign $sockinfo scgihost scgiport scgiscript
    set sock [::socket $scgihost $scgiport]
    # Add a few headers that SCGI needs
    my query_headers set SCRIPT_NAME $scgiscript
    my query_headers set SCGI 1.0    


    chan configure $chan -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $sock -translation binary -blocking 0 -buffering full -buffersize 4096
    ###
    # Convert our query headers into netstring format. Note that
    # MimeParse as already rigged it such that CONTENT_LENGTH is first
    # and always populated (even if zero), per SCGI requirements
    ###
    set block [my query_headers netstring]
    puts -nonewline $sock $block
    set length [my query_headers get CONTENT_LENGTH]
    if {$length} {
      ###
      # Send any POST/PUT/etc content
      ###
      chan copy $chan $sock -size $length
    }


    chan flush $sock
    ###
    # Wake this object up after the SCGI process starts to respond
    ###
    #chan configure $sock -translation {auto crlf} -blocking 0 -buffering line
    chan event $sock readable [namespace code {my output}]
  }
  
  method dispatch {newsock datastate} {
    my query_headers replace $datastate
    my variable chan rawrequest dipatched_time
    set chan $newsock
    chan event $chan readable {}
    chan configure $chan -translation {auto crlf} -buffering line
    set dispatched_time [clock seconds]
    try {
      set rawrequest [my HttpHeaders $chan]
      foreach {field value} [my MimeParse $rawrequest] {
        my query_headers set $field $value
      }
      # Dispatch to the URL implementation.
      my content
    } on error {err info} {
      dict print $info
      #puts stderr $::errorInfo
      my error 500 $err
    } finally {
      my output
    }
  }
  
  method output {} {
    if {[my query_headers getnull HTTP_ERROR] ne {}} {
      ###
      # If something croaked internally, handle this page as a normal reply
      ###
      next
    }
    my variable sock chan
    set replyhead [my HttpHeaders $sock]
    set replydat  [my MimeParse $replyhead]
    ###
    # Convert the Status: header from the SCGI service to
    # a standard service reply line from a web server, but
    # otherwise spit out the rest of the headers verbatim
    ###
    set replybuffer "HTTP/1.1 [dict get $replydat HTTP_STATUS]\n"
    append replybuffer $replyhead
    chan configure $chan -translation {auto crlf} -blocking 0 -buffering full -buffersize 4096
    puts $chan $replybuffer
    ###
    # Output the body
    ###
    chan configure $sock -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chan -translation binary -blocking 0 -buffering full -buffersize 4096
    set length [dict get $replydat CONTENT_LENGTH]
    if {$length} {
      ###
      # Send any POST/PUT/etc content
      ###
      chan copy $sock $chan -command [namespace code [list my TransferComplete $sock]]
    } else {
      catch {close $sock}
      chan flush $chan
      my destroy
    }
  }

}

tool::class create ::docserver::server {
  superclass ::httpd::server::dispatch ::httpd::server
  

  method log args {
    puts [list {*}$args]
  }
  
}
set opts [::tool::args_to_options {*}$argv]
set serveropts {}
set optinfo [::docserver::server meta getnull option]
foreach {f v} $opts {
  if {[dict exists $optinfo $f]} {
    dict set serveropts $f $v
  }
}
puts $serveropts
set fossilopts {}
set optinfo [::httpd::content::fossil_root meta getnull option]
foreach {f v} $opts {
  if {[dict exists $optinfo $f]} {
    dict set fossilopts $f $v
  }
}
if {[dict exists $opts fossil]} {
  set ::fossil_exe [dict get $opts fossil]
}
puts "Server Options: $serveropts"
puts "Fossil Options: $fossilopts"


::docserver::server create appmain doc_root $DEMOROOT {*}$argv

appmain add_uri /tcllib* [list mixin httpd::content::file path [file join $tcllibroot embedded www]]













appmain add_uri /fossil [list mixin httpd::content::fossil_root {*}$fossilopts]





































appmain add_uri /fossil/* [list mixin httpd::content::fossil_node_scgi {*}$fossilopts]
puts [list LISTENING]
tool::main

Changes to examples/math/bigfloat.demo.tcl.

163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
    pack $c.zeros -in $c -side left
    button $c.fenter -text "Push" -command Push
    pack $c.fenter -in $c -side left
    # the functions for numbers
    frame .functions
    pack .functions
    set f .functions
    # chaque fonction est associée, d'une part,
    # à un bouton portant un libellé, et d'autre part
    # à une commande Tcl
    # ici nous associons le bouton "add" à la commande "add"
    addButtonTwo add
    # toutes ces commandes se trouvent à la fin de ce fichier
    addButtonTwo sub
    addButtonTwo mul
    addButtonTwo div
    addButtonTwo mod
    addButtonOne opp
    addButtonOne abs
    addButtonOne round







|
|
|
|

|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
    pack $c.zeros -in $c -side left
    button $c.fenter -text "Push" -command Push
    pack $c.fenter -in $c -side left
    # the functions for numbers
    frame .functions
    pack .functions
    set f .functions
    # chaque fonction est associée, d'une part,
    # à un bouton portant un libellé, et d'autre part
    # à une commande Tcl
    # ici nous associons le bouton "add" à la commande "add"
    addButtonTwo add
    # toutes ces commandes se trouvent à la fin de ce fichier
    addButtonTwo sub
    addButtonTwo mul
    addButtonTwo div
    addButtonTwo mod
    addButtonOne opp
    addButtonOne abs
    addButtonOne round
300
301
302
303
304
305
306
307
308
}



# initialize the calculator and create the widgets (GUI)
init
# chaque fois qu'une commande modifie la pile de nombres,
# la commande drawStack sera appelée pour la réactualiser
trace add variable ::stack write drawStack







|

300
301
302
303
304
305
306
307
308
}



# initialize the calculator and create the widgets (GUI)
init
# chaque fois qu'une commande modifie la pile de nombres,
# la commande drawStack sera appelée pour la réactualiser
trace add variable ::stack write drawStack

Changes to idoc/man/files/apps/dtplite.n.

610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx introduction, doctoc introduction, doctools introduction
.SH KEYWORDS
HTML, TMML, conversion, docidx, doctoc, doctools, manpage, markup, nroff
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2004-2013 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











610
611
612
613
614
615
616








617
618
619
620
621
622
623
624
625
626
627
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx introduction, doctoc introduction, doctools introduction
.SH KEYWORDS
HTML, TMML, conversion, docidx, doctoc, doctools, manpage, markup, nroff
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2004-2013 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/apps/nns.n.

372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
nameserv(n), nameserv::common(n)
.SH KEYWORDS
application, client, name service
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











372
373
374
375
376
377
378








379
380
381
382
383
384
385
386
387
388
389
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
nameserv(n), nameserv::common(n)
.SH KEYWORDS
application, client, name service
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/apps/nnsd.n.

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
nameserv::common(n), nameserv::server(n)
.SH KEYWORDS
application, name service, server
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











330
331
332
333
334
335
336








337
338
339
340
341
342
343
344
345
346
347
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
nameserv::common(n), nameserv::server(n)
.SH KEYWORDS
application, name service, server
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/apps/nnslog.n.

333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
nameserv(n), nameserv::common(n)
.SH KEYWORDS
application, client, name service
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











333
334
335
336
337
338
339








340
341
342
343
344
345
346
347
348
349
350
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
nameserv(n), nameserv::common(n)
.SH KEYWORDS
application, client, name service
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/apps/page.n.

662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
page::pluginmgr
.SH KEYWORDS
parser generator, text processing
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











662
663
664
665
666
667
668








669
670
671
672
673
674
675
676
677
678
679
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
page::pluginmgr
.SH KEYWORDS
parser generator, text processing
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/apps/pt.n.

953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









953
954
955
956
957
958
959








960
961
962
963
964
965
966
967
968
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/apps/tcldocstrip.n.

420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdocstrip\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docstrip
.SH KEYWORDS
\\\&.dtx, LaTeX, conversion, docstrip, documentation, literate programming, markup, source
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











420
421
422
423
424
425
426








427
428
429
430
431
432
433
434
435
436
437
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdocstrip\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docstrip
.SH KEYWORDS
\\\&.dtx, LaTeX, conversion, docstrip, documentation, literate programming, markup, source
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Deleted idoc/man/files/devdoc/tcl_community_communication.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
'\"
'\" Generated from file 'tcl_community_communication\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "tcl_community_communication" n 1 tcllib ""
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
tcl_community_communication \- Tcl Community - Kind Communication
.SH DESCRIPTION
The Tcl Community encourages contributions from anyone who wishes to
advance the development of:
.IP \(bu
The Tcl Language
.IP \(bu
Tcl derived languages
.IP \(bu
Tcl related libraries
.IP \(bu
Tcl extensions
.IP \(bu
External Projects that Integrate Tcl
.PP
.PP
We welcome those contributions from anyone\&. We are blind to
gender, race, religion, cultural background, cybernetic nature, and
any other demographic characteristics, as well as personal political
views\&.
.PP
A community lives and dies by communications\&. And occasionally
our communications are peppered with patterns that are harsh,
unfriendly, unwelcoming and/or otherwise unkind\&. As a volunteer
community, we need all of the help we can get\&. Therefore, we ask all
contributors to make a conscious effort, in Tcl Community discussions,
to communicate in ways that are welcoming\&. Ways that are
friendly\&. Ways that are, in a word: kind\&.
.PP
These guidelines suggest specific ways to accomplish that goal\&.
.PP
Please note: for the balance of this document any reference to
"People", "Persons", "anybody" or "somebody" can refer to any sentient
being, not merely corporeal members of the species Homo Sapien\&.
.TP
We are a Sanctuary not a Clubhouse
The Tcl Community is a collective of amateurs and professionals who
code, test, and use tools\&. Our community is open to all\&. There is no
velvet rope\&. There is no bouncer at the door\&. There are no secret
handshakes\&. Any sentient being who enters our midst is welcome\&. If
someone is ever asked to leave, it is only because they are being
disruptive to the functioning of the community\&.
.TP
We Merit Ideas, Not People
A good idea can come from anyone, regardless of how little time they
have been with us\&. A bad idea can come from anyone, regardless of how
much time or how little time they have been with us\&. We judge a
concept by how it stands up to scrutiny of logic, implementation, and
regression testing\&. We don’t judge ideas based on who had the idea
first, who agrees with the idea, or who disagrees with it\&.
.TP
Treat Everyone with Respect
Everyone is deserving of respect and courtesy at all times\&.
.TP
Refer to people by the names they use\&.
If grammar requires you to state a gender for a person, honor their
preferences about their gender identity\&. If you are unsure as to the
gender of an individual, ask\&. If someone had to guess about your
gender and got it wrong, please correct them and do not take it
personally\&.
.TP
Do not take a harsh tone towards other participants\&.
Do not make personal attacks against anyone (participant or not\&.)
.sp
Criticize statements and actions, never people\&.
.TP
Don’t Take Things Personally
When in doubt, assume the best in people\&. A criticism of your
statements is not a personal attack on you\&.
.TP
Persons, not People
Stereotypes are an unhelpful tool on many accounts\&. They are generally
oversimplified\&. They are usually flat out wrong\&. And even if "right"
they are of absolutely no utility in determining the capabilities,
motivations, or fitness of an individual\&.
.sp
Don’t use them in Tcl Community communications\&.
.TP
Mistakes Happen
The human condition is a series of trials and errors\&. Progress is when
we get one more trial than error\&. Being wrong or making a mistake is
the default state of humanity\&. Accept the errors of your fellow
sentient beings, and be aware that you are also fallible\&.
.TP
Keep it Real
Please respond to what people actually say\&. We are all amazing
individuals, but none among us are mind readers\&. If you find yourself
responding to what you imagine someone is thinking, odds are you are
going to be wrong\&.
.sp
If you must criticize someone, stick to things they have
actually done\&. Never criticize for something you speculate they have
done\&. Or imagine they have done\&. Or something someone who shares some
attribute with them has done in the past\&.
.sp
Keep discussions about any non-Tcl subjects to what can be
stated factually and without emotion or judgement\&.
.TP
When Trouble Arises, Don’t Escalate
If you feel you are being personally attacked or offended, take the
high road\&. Punching back in a public forum will only makes things
worse\&. Address the matter in a private correspondence\&. Be
polite\&. Express your feelings, but note that you are expressing your
feelings\&. When writing, look for a way to calm matters down\&. And when
in doubt, sleep on your letter before pressing send\&. And when not in
doubt, sleep on it for another day after that\&.
.sp
If you are a spectator to a fight in progress, politely request
the two parties take the matter to a more private forum\&.
.TP
Always get the Last Word: I’m Sorry
If an personal argument does arise, be the first to apologize\&. An
apology does not concede a logical point\&. It merely acknowledges that
at some point the discussion left either logic, community decency, or
both\&. Return to the topic when cooler heads can prevail\&.
.TP
Nobody is Keeping Score
There is no prize for being right\&. There is no cost for being wrong\&. A
hard sell is not going to advance your idea along any more than a
logical argument\&. You aren’t running for office\&. This isn’t debate
club\&. If you find yourself continuing a discussion beyond where a
topic can be logically discussed, stop\&.
.TP
No Evangelizing
The Tcl Community is not the place to promote your chosen operating
system, political outlook, religion, marketing scheme, or economic
model\&. Period\&.
.sp
(And if you do bring it up, be prepared to have your chosen
topic discussed logically\&. And odds are, not favorably\&.)
.TP
Respect the Community
If the Community has come to a decision on a course of action, please
stop arguing\&.
.sp
If someone complains about how you are expressing your ideas,
listen\&.
.sp
If your words are hurting people, stop\&. There is no amount of
being "right" that makes up for someone leaving our midst because they
felt insulted, threatened, or ignored\&.
.PP
By following these guidelines, we will build our community, encourage
more contribution to our projects, and our discussions will be
friendlier and reach conclusions more easily\&.
.PP
Thank You\&.
.SH SIGNATORIES
.IP \(bu
Sean "the Hypnotoad" Woods
.IP \(bu
Andreas Kupries
.PP
.SH AUTHORS
.TP
Primary
Sean "the Hypnotoad" Woods
.TP
Light editing
Andreas Kupries
.PP
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted idoc/man/files/devdoc/tcllib_devguide.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
'\"
'\" Generated from file 'tcllib_devguide\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "tcllib_devguide" n 1 tcllib ""
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
tcllib_devguide \- Tcllib - The Developer's Guide
.SH SYNOPSIS
\fBModule\fR \fIname\fR \fIcode-action\fR \fIdoc-action\fR \fIexample-action\fR
.sp
\fBApplication\fR \fIname\fR
.sp
\fBExclude\fR \fIname\fR
.sp
.BE
.SH DESCRIPTION
Welcome to Tcllib, the Tcl Standard Library\&. Note that Tcllib is not a
package itself\&. It is a collection of (semi-independent) \fITcl\fR
packages that provide utility functions useful to a large collection
of Tcl programmers\&.
.PP
This document is a guide for developers working on Tcllib,
i\&.e\&. maintainers fixing bugs, extending the collection's
functionality, etc\&.
.PP
Please read
.IP [1]
\fITcllib - How To Get The Sources\fR and
.IP [2]
\fITcllib - The Installer's Guide\fR
.PP
first, if that was not done already\&.
.PP
Here we assume that the sources are already available in a
directory of your choice, and that you not only know how to build and
install them, but also have all the necessary requisites to actually
do so\&. The guide to the sources in particular also explains which
source code management system is used, where to find it, how to set it
up, etc\&.
.SH COMMITMENTS
.SS CONTRIBUTOR
As a contributor to Tcllib you are committing yourself to:
.IP [1]
keep the guidelines written down in
\fITcl Community - Kind Communication\fR in your mind\&.
The main point to take away from there is
\fIto be kind to each other\fR\&.
.IP [2]
Your contributions getting distributed under a BSD/MIT license\&.
For the details see \fITcllib - License\fR
.PP
Contributions are made by entering tickets into our tracker, providing
patches, bundles or branches of code for inclusion, or posting to the
Tcllib related mailing lists\&.
.SS MAINTAINER
When contributing one or more packages for full inclusion into Tcllib
you are committing yourself to
.IP [1]
Keep the guidelines written down in
\fITcl Community - Kind Communication\fR
(as any contributor) in your mind\&. The main point to take away
from there is \fIto be kind to each other\fR\&.
.IP [2]
Your packages getting distributed under a BSD/MIT license\&.  For
the details see \fITcllib - License\fR
.IP [3]
Maintenance of the new packages for a period of two years under
the following rules, and responsibilities:
.RS
.IP [1]
A maintainer may step down after the mandatory period as
they see fit\&.
.IP [2]
A maintainer may step down before the end of the
mandatory period, under the condition that a replacement
maintainer is immediately available and has agreed to
serve the remainder of the period, plus their own
mandatory period (see below)\&.
.IP [3]
When stepping down without a replacement maintainer
taking over the relevant packages have to be flagged as
\fBunmaintained\fR\&.
.IP [4]
When a replacement mantainer is brought in for a package
it is (kept) marked as \fBmaintained\fR (again)\&.
.sp
A replacement maintainer is bound by the same rules as
the original maintainer, except that the mandatory
period of maintenance is shortened to one year\&.
.IP [5]
For any \fBunmaintained\fR package a contributor
interested in becoming its maintainer can become so by
flagging them as \fBmaintained\fR with their name and
contact information, committing themselves to the rules
of a replacement maintainer (see previous point)\&.
.IP [6]
For any already \fBmaintained\fR package a contributor
interested in becoming a co-maintainer can become so
with the agreement of the existing maintainer(s),
committing themselves to the rules of a replacement
maintainer (see two points previous)\&.
.RE
.sp
The responsibilities as a maintainer include:
.RS
.IP [1]
Watching Tcllib's ticket tracker for bugs, bug fixes,
and feature requests related to the new packages\&.
.IP [2]
Reviewing the aforementioned tickets, rejecting or
applying them
.IP [3]
Coordination and discussion with ticket submitter during
the development and/or application of bug fixes\&.
.RE
.IP [4]
Follow the \fBBranching and Workflow\fR of this guide\&.
.PP
.SH "BRANCHING AND WORKFLOW"
.SS "PACKAGE DEPENDENCIES"
Regarding packages and dependencies between them Tcllib occupies a
middle position between two extremes:
.IP [1]
On one side a strongly interdependent set of packages, usually
by a single author, for a single project\&. Looking at my
(Andreas Kupries) own work examples of such are
\fIMarpa\fR [https://core\&.tcl\&.tk/akupries/marpa/index],
\fICRIMP\fR [https://core\&.tcl\&.tk/akupries/crimp/index],
\fIKinetcl\fR [https://core\&.tcl\&.tk/akupries/kinetcl/index], etc\&.
.sp
For every change the author of the project handles all the
modifications cascading from any incompatibilities it
introduced to the system\&.
.IP [2]
On the other side, the world of semi-independent projects by
many different authors where authors know what packages their
own creations depend on, yet usually do not know who else
depends on them\&.
.sp
The best thing an author making an (incompatible) change to
their project can do is to for one announce such changes in
some way, and for two use versioning to distinguish the code
before and after the change\&.
.sp
The world is then responsible for adapting, be it by updating
their own projects to the new version, or by sticking to the
old\&.
.PP
As mentioned already, Tcllib lives in the middle of that\&.
.PP
While we as maintainers cannot be aware of all users of
Tcllib's packages, and thus have to rely on the mechanisms
touched on in point 2 above for that, the dependencies between
the packages contained in Tcllib are a different matter\&.
.PP
As we are collectively responsible for the usability of Tcllib
in toto to the outside world, it behooves us to be individually
mindful even of Tcllib packages we are not directly
maintaining, when they depend on packages under our
maintainership\&.
This may be as simple as coordinating with the maintainers of
the affected packages\&.
It may also require us to choose how to adapt affected packages
which do not have maintainers, i\&.e\&. modify them to use our
changed package properly, or modify them to properly depend on
the unchanged version of our package\&.
.PP
Note that the above is not only a chore but an opportunity as
well\&.
Additional insight can be had by forcing ourselves to look at
our package and the planned change(s) from an outside
perspective, to consider the ramifications of our actions on
others in general, and on dependent packages in particular\&.
.SS TRUNK
The management and use of branches is an important part of working
with a \fIDistributed Version Control System\fR (\fIDVCS\fR) like
\fIfossil\fR [https://www\&.fossil-scm\&.org/]\&.
.PP
For Tcllib the main branch of the collection is
\fItrunk\fR\&. In \fIgit\fR this branch would be called
\fImaster\fR, and this is exactly the case in the
\fIgithub mirror\fR [https://github\&.com/tcltk/tcllib/] of
Tcllib\&.
.PP
To properly support debugging \fIeach commit\fR on this
branch \fIhas to pass the entire testsuite\fR of the
collection\&. Using bisection to determine when an issue appeared
is an example of an action made easier by this constraint\&.
.PP
This is part of our collective responsibility for the usability
of Tcllib in toto to the outside world\&.
As \fIfossil\fR has no mechanism to enforce this condition
this is handled on the honor system for developers and maintainers\&.
.PP
To make the task easier Tcllib comes with a tool
("\fIsak\&.tcl\fR") providing a number of commands in
support\&. These commands are explained in the following sections
of this guide\&.
.PP
While it is possible and allowed to commit directly to trunk
remember the above constraint regarding the testsuite, and the
coming notes about other possible issues with a commit\&.
.SS BRANCHES
Given the constraints placed on the \fItrunk\fR branch of the
repository it is (strongly) recommended to perform any development
going beyond trivial changes on a non-trunk branch\&.
.PP
Outside of the trunk developers are allowed to commit
intermediate broken states of their work\&.
Only at the end of a development cycle, when the relevant
branch is considered ready for merging, will it be necessary to
perform full the set of validations ensuring that the merge to
come will create a good commit on trunk\&.
.PP
Note that while a review from a second developer is not a
required condition for merging a branch it is recommended to
seek out such an independent opinion as a means of
cross-checking the work\&.
.PP
It also recommended to give any new branch a name which aids in
determining additional details about it\&. Examples of good
things to stick into a branch name would be
.IP \(bu
Developer (nick)name
.IP \(bu
Ticket hash/reference
.IP \(bu
One or two keywords applicable to the work
.IP \(bu
\&.\&.\&.
.PP
.PP
Further, while most development branches are likely quite
short-lived, no prohibitions exist against making longer-lived
branches\&.
Creators should however be mindful that the longer such a
branch exists without merges the more divergent they will tend
to be, with an associated increase in the effort which will
have to be spent on either merging from and merging to trunk\&.
.SS "WORKING WITH BRANCHES"
In the hope of engendering good work practices now a few example
operations which will come up with branches, and their associated
fossil command (sequences)\&.
.TP
\fIAwareness\fR
When developing we have to keep ourselves aware of the context of our
work\&. On what branch are we ? What files have we changed ? What new
files are not yet known to the repository ? What has happened remotely
since we used our checkout ?
The answers to these questions become especially important when using
a long-lived checkout and coming back to it after some time away\&.
.sp
Commands to answer questions like the above are:
.RS
.TP
\fBfossil pull\fR
Get all changes done on the remote since the last pull or sync
from it\&. This has to be done first, before any of the commands
below\&.
.sp
Even if the commit in our checkout refers to the branch we want
right now control operations committed to the remote may have
changed that from underneath us\&.
.TP
\fBfossil info | grep tags\fR
.TP
\fBfossil branch list | grep '\\*'\fR
Two different ways of determining the branch our checkout is
on\&.
.TP
\fBfossil timeline\fR
What have we (and others) done recently ?
.sp
\fIAttention\fR, this information is very likely outdated, the
more the longer we did not use this checkout\&.
Run \fBfossil pull\fR first to get latest information from
the remote repository of the project\&.
.TP
\fBfossil timeline current\fR
Place the commit our checkout is based on at the top of the
timeline\&.
.TP
\fBfossil changes\fR
Lists the files we have changed compared to the commit the
checkout is based on\&.
.TP
\fBfossil extra\fR
Lists the files we have in the checkout the repository does not
know about\&. This may be leftover chaff from our work, or
something we have forgotten to \fBfossil add\fR to the
repository yet\&.
.RE
.TP
\fIClean checkouts\fR
Be aware of where you are (see first definition)\&.
.sp
For pretty much all the operation recipes below a clean
checkout is at least desired, often required\&.
To check that a checkout is clean invoke
.CS


    fossil changes
    fossil extra

.CE
.IP
How to clean up when uncommitted changes of all sorts are found is
context-specific and outside of the scope of this guide\&.
.TP
\fIStarting a new branch\fR
Be aware of where you are (see first definition)\&.
.sp
Ensure that you have clean checkout (see second definition)\&.
It is \fIrequired\fR\&.
.sp
In most situations you want to be on branch \fItrunk\fR, and
you want to be on the latest commit for it\&. To get there use
.CS


    fossil pull
    fossil update trunk

.CE
.IP
If some other branch is desired as the starting point for the coming
work replace \fItrunk\fR in the commands above with the name of that
branch\&.
.sp
With the base line established we now have two ways of creating
the new branch, with differing (dis)advantages\&.
The simpler way is to
.CS


    fossil branch new NAME_OF_NEW_BRANCH

.CE
.IP
and start developing\&. The advantage here is that you cannot forget to
create the branch\&. The disadvantages are that we have a branch commit
unchanged from where we branched from, and that we have to use
high-handed techniques like hiding or shunning to get rid of the
commit should we decide to abandon the work before the first actual
commit on the branch\&.
.sp
The other way of creating the branch is to start developing,
and then on the first commit use the option \fB--branch\fR to tell
\fBfossil\fR that we are starting a branch now\&. I\&.e\&. run
.CS


    fossil commit --branch NAME_OF_NEW_BRANCH \&.\&.\&.

.CE
.IP
where \fI\&.\&.\&.\fR are any other options used to supply the commit
message, files to commit, etc\&.
.sp
The (dis)advantages are now reversed\&.
.sp
We have no superflous commit, only what is actually
developed\&. The work is hidden until we commit to make our first
commit\&.
.sp
We may forget to use \fB--branch NAME_OF_NEW_BRANCH\fR and
then have to correct that oversight via the fossil web
interface (I am currently unaware of ways of doing such from
the command line, although some magic incantantion of
\fBfossil tag create\fR may work)\&.
.sp
It helps to keep awareness, like checking before any commit
that we are on the desired branch\&.
.TP
\fIMerging a branch into trunk\fR
Be aware of where you are (see first definition)\&.
.sp
Ensure that you have clean checkout (see second definition)\&.
In the full-blown sequence (zig-zag) it is \fIrequired\fR, due
to the merging from trunk\&. In the shorter sequence it is only
desired\&. That said, keeping the checkout clean before
any major operations is a good habit to have, in my opinion\&.
.sp
The full-blown sequencing with checks all the way is to
.RS
.IP [1]
Validate the checkout, i\&.e\&. last commit on your branch\&. Run the
full test suite and other validations, fix all the issues which
have cropped up\&.
.IP [2]
Merge the latest state of the \fItrunk\fR (see next definition)\&.
.IP [3]
Validate the checkout again\&. The incoming trunk changes may
have broken something now\&. Do any required fixes\&.
.IP [4]
Now merge to the trunk using
.CS


    fossil update trunk
    fossil merge --integrate YOUR_BRANCH

.CE
.IP [5]
At this point the checkout should be in the same state as at
the end of point (3) above, because we resolved any issues with
the trunk already\&. Thus a simple
.CS


    fossil commit \&.\&.\&.

.CE
.IP
should be sufficient now to commit the merge back and close the
branch (due to the \fB--integrate\fR we used on the merge)\&.
.sp
The more paranoid may validate the checkout a third time before
commiting\&.
.RE
.sp
I call this a \fIzig-zag merge\fR because of how the arrows
look in the timeline, from trunk to feature branch for the
first merge, and then back for the final merge\&.
.sp
A less paranoid can do what I call a \fIsimple merge\fR,
which moves step (2) after step (4) and skips step (3)
entirely\&. The resulting shorter sequence is
.RS
.IP [1]
Validate
.IP [2]
Merge to trunk
.IP [3]
Validate again
.IP [4]
Commit to trunk
.RE
.IP
The last step after either zig-zag or plain merge is to
.CS


    fossil sync

.CE
.IP
This saves our work to the remote side, and further gives us any other
work done while we were doing our merge\&. It especially allows us to
check if we raced somebody else, resulting in a split trunk\&.
.sp
When that happens we should coordinate with the other developer
on who fixes the split, to ensure that we do not race each
other again\&.
.TP
\fIMerging from trunk\fR
Be aware of where you are (see first definition)\&.
.sp
Ensure that you have clean checkout (see second definition)\&.
It is \fIrequired\fR\&.
.sp
In most situations you want to import the latest commit of
branch \fItrunk\fR (or other origin)\&. To get it use
.CS


    fossil pull

.CE
.sp
With that done we can now import this commit into our current
branch with
.CS


    fossil merge trunk

.CE
.sp
Even if \fBfossil\fR does not report any conflicts it is a
good idea to check that the operation has not broken the new
and/or changed functionality we are working on\&.
.sp
With the establishment of a good merge we then save the state
with
.CS


    fossil commit \&.\&.\&.

.CE
.IP
before continuing development\&.
.PP
.SS "VERSION NUMBERS"
In Tcllib all changes to a package have to come with an increment of
its version number\&. What part is incremented (patchlevel, minor, major
version) depends on the kind of change made\&. With multiple changes in
a commit the highest "wins"\&.
.PP
When working in a development branch the version change can be
deferred until it is time to merge, and then has to cover all
the changes in the branch\&.
.PP
Below a list of the kinds of changes and their associated
version increments:
.TP
\fID - documentation\fR
No increment
.TP
\fIT - testsuite\fR
No increment
.TP
\fIB - bugfix\fR
Patchlevel
.TP
\fII - implementation tweak\fR
Patchlevel
.TP
\fIP - performance tweak\fR
Patchlevel
.TP
\fIE - backward-compatible extension\fR
Minor
.TP
\fIAPI - incompatible change\fR
Major
.PP
.PP
Note that a commit containing a version increment has to
mention the new version number in its commit message, as well
as the kind of change which caused it\&.
.PP
Note further that the version number of a package currently
exists in three places\&. An increment has to update all of them:
.IP [1]
The package implementation\&.
.IP [2]
The package index ("\fIpkgIndex\&.tcl\fR")
.IP [3]
The package documentation\&.
.PP
.PP
The "\fIsak\&.tcl\fR" command \fBvalidate version\fR helps
finding discrepancies between the first two\&.
All the other \fBvalidate\fR methods are also of interest to
any developer\&. Invoke it with
.CS

 sak\&.tcl help validate
.CE
to see their documentation\&.
.SH "STRUCTURAL OVERVIEW"
.SS "MAIN DIRECTORIES"
The main directories in the Tcllib toplevel directory and of interest
to a developer are:
.TP
"\fImodules\fR"
Each child directory represents one or more packages\&.
In the case of the latter the packages are usually related in some
way\&. Examples are "\fIbase64\fR", "\fImath\fR", and "\fIstruct\fR", with
loose (base64) to strong (math) relations between the packages in the
directory\&.
.TP
"\fIapps\fR"
This directory contains all the installable applications, with their
documentation\&. Note that this directory is currently \fInot\fR split
into sub-directories\&.
.TP
"\fIexamples\fR"
Each child directory "\fIfoo\fR" contains one or more example
application for the packages in "\fImodules/foo\fR"\&. These examples are
generally not polished enough to be considered for installation\&.
.PP
.SS "MORE DIRECTORIES"
.TP
"\fIconfig\fR"
This directory contains files supporting the Unix build system,
i\&.e\&. "\fIconfigure\fR" and "\fIMakefile\&.in\fR"\&.
.TP
"\fIdevdoc\fR"
This directories contains the doctools sources for the global
documentation, like this document and its sibling guides\&.
.TP
"\fIembedded\fR"
This directory contains the entire documentation formatted for
\fIHTML\fR and styled to properly mix into the web site generated by
fossil for the repository\&.
.sp
This is the documentation accessible from the Tcllib home
directory, represented in the repository as "\fIembedded/index\&.md\fR"\&.
.TP
"\fIidoc\fR"
This directory contains the entire documentation formatted for
\fInroff\fR and \fIHTML\fR, the latter without any styling\&.
This is the documentation which will be installed\&.
.TP
"\fIsupport\fR"
This directory contains the sources of internal packages and utilities
used in the implementation of the "\fIinstaller\&.tcl\fR" and
"\fIsak\&.tcl\fR" scripts/tools\&.
.PP
.SS "TOP FILES"
.TP
"\fIaclocal\&.m4\fR"
.TP
"\fIconfigure\fR"
.TP
"\fIconfigure\&.in\fR"
.TP
"\fIMakefile\&.in\fR"
These four files comprise the Unix build system layered on top of the
"\fIinstaller\&.tcl\fR" script\&.
.TP
"\fIinstaller\&.tcl\fR"
The Tcl-based installation script/tool\&.
.TP
"\fIproject\&.shed\fR"
Configuration file for \fISean Wood\fR's \fBPracTcl\fR
buildsystem\&.
.TP
"\fIsak\&.tcl\fR"
This is the main tool for developers and release managers, the
\fISwiss Army Knife\fR of management operations on the collection\&.
.TP
"\fIChangeLog\fR"
The log of changes to the global support, when the sources were held
in \fICVS\fR\&. Not relevant any longer with the switch to the
\fIfossil\fR SCM\&.
.TP
"\fIlicense\&.terms\fR"
The license in plain ASCII\&. See also \fITcllib - License\fR for the
nicely formatted form\&. The text is identical\&.
.TP
"\fIREADME\&.md\fR"
.TP
"\fI\&.github/CONTRIBUTING\&.md\fR"
.TP
"\fI\&.github/ISSUE_TEMPLATE\&.md\fR"
.TP
"\fI\&.github/PULL_REQUEST_TEMPLATE\&.md\fR"
These markdown-formatted documents are used and shown by the github
mirror of these sources, pointing people back to the official location
and issue trackers\&.
.TP
"\fIDESCRIPTION\&.txt\fR"
.TP
"\fISTATUS\fR"
.TP
"\fItcllib\&.spec\fR"
.TP
"\fItcllib\&.tap\fR"
.TP
"\fItcllib\&.yml\fR"
????
.PP
.SS "FILE TYPES"
The most common file types, by file extension, are:
.TP
"\fI\&.tcl\fR"
Tcl code for a package, application, or example\&.
.TP
"\fI\&.man\fR"
Doctools-formatted documentation, usually for a package\&.
.TP
"\fI\&.test\fR"
Test suite for a package, or part of\&.
Based on \fBtcltest\fR\&.
.TP
"\fI\&.bench\fR"
Performance benchmarks for a package, or part of\&.
Based on "\fImodules/bench\fR"\&.
.TP
"\fI\&.pcx\fR"
Syntax rules for \fITclDevKit\fR's \fBtclchecker\fR\&. Using these
rules allows the checker to validate the use of commands of a Tcllib
package \fBfoo\fR without having to scan the "\fI\&.tcl\fR" files
implementing it\&.
.PP
.SH "TESTSUITE TOOLING"
Testsuites in Tcllib are based on Tcl's standard test package
\fBtcltest\fR, plus utilities found in the directory
"\fImodules/devtools\fR"
.PP
Tcllib developers invoke the suites through the
\fBtest run\fR method of the "\fIsak\&.tcl\fR" tool, with other methods
of \fBtest\fR providing management operations, for example setting a
list of standard Tcl shells to use\&.
.SS "INVOKE THE TESTSUITES OF A SPECIFIC MODULE"
Invoke either
.CS

  \&./sak\&.tcl test run foo
.CE
or
.CS

  \&./sak\&.tcl test run modules/foo
.CE
to invoke the testsuites found in a specific module "\fIfoo\fR"\&.
.SS "INVOKE THE TESTSUITES OF ALL MODULES"
Invoke the tool without a module name, i\&.e\&.
.CS

  \&./sak\&.tcl test run
.CE
to invoke the testsuites of all modules\&.
.SS "DETAILED TEST LOGS"
In all the previous examples the test runner will write a combination
of progress display and testsuite log to the standard output, showing
for each module only the tests that passed or failed and how many of
each in a summary at the end\&.
.PP
To get a detailed log, it is necessary to invoke the test
runner with additional options\&.
.PP
For one:
.CS


   \&./sak\&.tcl test run --log LOG foo

.CE
While this shows the same short log on the terminal as before, it also
writes a detailed log to the file "\fILOG\&.log\fR", and excerpts to
other files ("\fILOG\&.summary\fR", "\fILOG\&.failures\fR", etc\&.)\&.
.PP
For two:
.CS


  \&./sak\&.tcl test run -v foo

.CE
This writes the detailed log to the standard output, instead of the
short log\&.
.PP
Regardless of form, the detailed log contains a list of all test
cases executed, which failed, and how they failed (expected versus
actual results)\&.
.SS "SHELL SELECTION"
By default the test runner will use all the Tcl shells specified via
\fBtest add\fR to invoke the specified testsuites, if any\&. If no
such are specified it will fall back to the Tcl shell used to run the
tool itself\&.
.PP
Use option \fB--shell\fR to explicitly specify the Tcl shell
to use, like
.CS


  \&./sak\&.tcl test run --shell /path/to/tclsh \&.\&.\&.

.CE
.SS HELP
Invoke the tool as
.CS

  \&./sak\&.tcl help test
.CE
to see the detailed help for all methods of \fBtest\fR, and the
associated options\&.
.SH "DOCUMENTATION TOOLING"
The standard format used for documentation of packages and other
things in Tcllib is \fIdoctools\fR\&.
Its supporting packages are a part of Tcllib, see the directories
"\fImodules/doctools\fR" and "\fImodules/dtplite\fR"\&. The latter is
an application package, with the actual application
"\fIapps/dtplite\fR" a light wrapper around it\&.
.PP
Tcllib developers gain access to these through the \fBdoc\fR
method of the "\fIsak\&.tcl\fR" tool, another (internal) wrapper around
the "\fImodules/dtplite\fR" application package\&.
.SS "GENERATE DOCUMENTATION FOR A SPECIFIC MODULE"
Invoke either
.CS

  \&./sak\&.tcl doc html foo
.CE
or
.CS

  \&./sak\&.tcl doc html modules/foo
.CE
to generate HTML for the documentation found in the module "\fIfoo\fR"\&.
Instead of \fBhtml\fR any other supported format can be used here,
of course\&.
.PP
The generated formatted documentation will be placed into a
directory "\fIdoc\fR" in the current working directory\&.
.SS "GENERATE DOCUMENTATION FOR ALL MODULES"
Invoke the tool without a module name, i\&.e\&.
.CS

  \&./sak\&.tcl doc html
.CE
to generate HTML for the documentation found in all modules\&.
Instead of \fBhtml\fR any other supported format can be used here,
of course\&.
.PP
The generated formatted documentation will be placed into a
directory "\fIdoc\fR" in the current working directory\&.
.SS "AVAILABLE OUTPUT FORMATS, HELP"
Invoke the tool as
.CS

  \&./sak\&.tcl help doc
.CE
to see the entire set of supported output formats which can be
generated\&.
.SS "VALIDATION WITHOUT OUTPUT"
Note the special format \fBvalidate\fR\&.
.PP
Using this value as the name of the format to generate forces
the tool to simply check that the documentation is syntactically
correct, without generating actual output\&.
.PP
Invoke it as either
.CS

  \&./sak\&.tcl doc validate (modules/)foo
.CE
or
.CS

  \&./sak\&.tcl doc validate
.CE
to either check the packages of a specific module or check all of
them\&.
.SH "NOTES ON WRITING A TESTSUITE"
While previous sections talked about running the testsuites for a
module and the packages therein, this has no meaning if the module in
question has no testsuites at all\&.
.PP
This section gives a very basic overview on possible
methodologies for writing tests and testsuites\&.
.PP
First there are "drudgery" tests\&. Written to check absolutely
basic assumptions which should never fail\&.
.PP
For example for a command FOO taking two arguments, three tests
calling it with zero, one, and three arguments\&. The basic checks that
the command fails if it has not enough arguments, or too many\&.
.PP
After that come the tests checking things based on our
knowledge of the command, about its properties and assumptions\&. Some
examples based on the graph operations added during Google's Summer of
Code 2009 are:
.IP \(bu
The BellmanFord command in struct::graph::ops takes a
\fIstartnode\fR as argument, and this node should be a node of
the graph\&. This equals one test case checking the behavior when the
specified node is not a node of the graph\&.
.sp
This often gives rise to code in the implementation which
explicitly checks the assumption and throws an understandable error,
instead of letting the algorithm fail later in some weird
non-deterministic way\&.
.sp
It is not always possible to do such checks\&. The graph argument
for example is just a command in itself, and while we expect
it to exhibit a certain interface, i\&.e\&. a set of sub-commands
aka methods, we cannot check that it has them, except by
actually trying to use them\&. That is done by the algorithm
anyway, so an explicit check is just overhead we can get by
without\&.
.IP \(bu
IIRC one of the distinguishing characteristic of either
BellmanFord and/or Johnson is that they are able to handle
negative weights\&. Whereas Dijkstra requires positive weights\&.
.sp
This induces (at least) three testcases \&.\&.\&. Graph with all
positive weights, all negative, and a mix of positive and
negative weights\&.
Thinking further does the algorithm handle the weight
\fB0\fR as well ? Another test case, or several, if we mix
zero with positive and negative weights\&.
.IP \(bu
The two algorithms we are currently thinking about are about
distances between nodes, and distance can be 'Inf'inity,
i\&.e\&. nodes may not be connected\&. This means that good test
cases are
.RS
.IP [1]
Strongly connected graph
.IP [2]
Connected graph
.IP [3]
Disconnected graph\&.
.RE
.sp
At the extremes of strongly connected and disconnected
we have the fully connected graphs and graphs without edges,
only nodes, i\&.e\&. completely disconnected\&.
.IP \(bu
IIRC both of the algorithms take weighted arcs, and fill in a
default if arcs are left unweighted in the input graph\&.
.sp
This also induces three test cases:
.RS
.IP [1]
Graph will all arcs with explicit weights\&.
.IP [2]
Graph without weights at all\&.
.IP [3]
Graph with mixture of weighted and unweighted graphs\&.
.RE
.PP
.PP
What was described above via examples is called
\fIblack-box\fR testing\&. Test cases are designed and written based on
the developer's knowledge of the properties of the algorithm and its
inputs, without referencing a particular implementation\&.
.PP
Going further, a complement to \fIblack-box\fR testing is
\fIwhite-box\fR\&. For this we know the implementation of the
algorithm, we look at it and design our tests cases so that they force
the code through all possible paths in the implementation\&. Wherever a
decision is made we have a test case forcing a specific direction of
the decision, for all possible combinations and directions\&. It is easy
to get a combinatorial explosion in the number of needed test-cases\&.
.PP
In practice I often hope that the black-box tests I have made
are enough to cover all the paths, obviating the need for white-box
tests\&.
.PP
The above should be enough to make it clear that writing tests
for an algorithm takes at least as much time as coding the algorithm,
and often more time\&. Much more time\&.
See for example also \fIhttp://sqlite\&.org/testing\&.html\fR, a writeup
on how the Sqlite database engine is tested\&. Another article of
interest might be \fIhttps://www\&.researchgate\&.net/publication/298896236\fR\&.
While geared to a particular numerical algorithm it still shows that
even a simple-looking algorithm can lead to an incredible number of
test cases\&.
.PP
An interesting connection is to documentation\&. In one
direction, the properties checked with black-box testing are exactly
the properties which should be documented in the algorithm's man
page\&. And conversely, the documentation of the properties of an
algorithm makes a good reference to base the black-box tests on\&.
.PP
In practice test cases and documentation often get written
together, cross-influencing each other\&. And the actual writing of test
cases is a mix of black and white box, possibly influencing the
implementation while writing the tests\&. Like writing a test for a
condition like \fIstartnode not in input graph\fR serving as
reminder to put a check for this condition into the code\&.
.SH "INSTALLATION TOOLING"
A last thing to consider when adding a new package to the collection
is installation\&.
.PP
How to \fIuse\fR the "\fIinstaller\&.tcl\fR" script is documented
in \fITcllib - The Installer's Guide\fR\&.
.PP
Here we document how to extend said installer so that it may
install new package(s) and/or application(s)\&.
.PP
In most cases only a single file has to be modified, the
"\fIsupport/installation/modules\&.tcl\fR" holding one command per module
and application to install\&.
.PP
The relevant commands are:
.TP
\fBModule\fR \fIname\fR \fIcode-action\fR \fIdoc-action\fR \fIexample-action\fR
Install the packages of module \fIname\fR, found in
"\fImodules/\fIname\fR\fR"\&.
.sp
The \fIcode-action\fR is responsible for installing the
packages and their index\&. The system currently provides
.RS
.TP
\fB_tcl\fR
Copy all "\fI\&.tcl\fR" files found in
"\fImodules/\fIname\fR\fR" into the installation\&.
.TP
\fB_tcr\fR
As \fB_tcl\fR, copy the "\fI\&.tcl\fR" files found in
the subdirectories of "\fImodules/\fIname\fR\fR" as well\&.
.TP
\fB_tci\fR
As \fB_tcl\fR, and copy the "\fItclIndex\&.tcl\fR" file
as well\&.
.TP
\fB_msg\fR
As \fB_tcl\fR, and copy the subdirectory "\fImsgs\fR"
as well\&.
.TP
\fB_doc\fR
As \fB_tcl\fR, and copy the subdirectory
"\fImpformats\fR" as well\&.
.TP
\fB_tex\fR
As \fB_tcl\fR, and copy "\fI\&.tex\fR" files as well\&.
.RE
.sp
The \fIdoc-action\fR is responsible for installing the package
documentation\&. The system currently provides
.RS
.TP
\fB_null\fR
No documentation available, do nothing\&.
.TP
\fB_man\fR
Process the "\fI\&.man\fR" files found in
"\fImodules/\fIname\fR\fR" and install the results (nroff and/or HTML)
in the proper location, as given to the installer\&.
.sp
This is actually a fallback, normally the installer uses the
pre-made formatted documentation found under "\fIidoc\fR"\&.
.RE
.sp
The \fIexample-action\fR is responsible for installing the
examples\&. The system currently provides
.RS
.TP
\fB_null\fR
No examples available, do nothing\&.
.TP
\fB_exa\fR
Copy the the directory "\fIexamples/\fIname\fR\fR"
recursively to the install location for examples\&.
.RE
.TP
\fBApplication\fR \fIname\fR
Install the application with \fIname\fR, found in "\fIapps\fR"\&.
.TP
\fBExclude\fR \fIname\fR
This command signals to the installer which of the listed modules to
\fInot\fR install\&. I\&.e\&. they name the deprecated modules of Tcllib\&.
.PP
.PP
If, and only if the above actions are not suitable for the new
module then a second file has to be modified,
"\fIsupport/installation/actions\&.tcl\fR"\&.
.PP
This file contains the implementations of the available
actions, and is the place where any custom action needed to handle the
special circumstances of module has to be added\&.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted idoc/man/files/devdoc/tcllib_installer.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
'\"
'\" Generated from file 'tcllib_installer\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "tcllib_install_guide" n 1 tcllib ""
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
tcllib_install_guide \- Tcllib - The Installer's Guide
.SH DESCRIPTION
Welcome to Tcllib, the Tcl Standard Library\&. Note that Tcllib is not a
package itself\&. It is a collection of (semi-independent) \fITcl\fR
packages that provide utility functions useful to a large collection
of Tcl programmers\&.
.PP
The audience of this document is anyone wishing to build and install
the packages found in Tcllib, for either themselves, or others\&.
.PP
For developers intending to work on the packages themselves we
additionally provide
.IP [1]
\fITcllib - The Developer's Guide\fR\&.
.PP
.PP
Please read \fITcllib - How To Get The Sources\fR first, if that
was not done already\&. Here we assume that the sources are already
available in a directory of your choice\&.
.PP
.SH REQUISITES
Before Tcllib can be build and used a number of requisites must be installed\&.
These are:
.IP [1]
The scripting language Tcl\&.
For details see \fBTcl\fR\&.
.IP [2]
Optionally, the \fBcritcl\fR package (C embedding) for \fBTcl\fR\&.
For details see \fBCriTcl\fR\&.
.PP
This list assumes that the machine where Tcllib is to be installed is
essentially clean\&. Of course, if parts of the dependencies listed
below are already installed the associated steps can be skipped\&. It is
still recommended to read their sections though, to validate that the
dependencies they talk about are indeed installed\&.
.SS TCL
As we are installing a number of Tcl packages and applications it
should be pretty much obvious that a working installation of Tcl
itself is needed, and I will not belabor the point\&.
.PP
Out of the many possibilities use whatever you are comfortable
with, as long as it provides at the very least Tcl 8\&.2, or higher\&.
This may be a Tcl installation provided by your operating system
distribution, from a distribution-independent vendor, or built by
yourself\&.
.PP
\fINote\fR that the packages in Tcllib have begun to require
8\&.4, 8\&.5, and even 8\&.6\&. Older versions of Tcl will not be able to use
such packages\&. Trying to use them will result in
\fIpackage not found\fR errors, as their package index files will
not register them in versions of the core unable to use them\&.
.PP
Myself, I used (and still use)
\fIActiveState's\fR [http://www\&.activestate\&.com]
ActiveTcl 8\&.5 distribution during development, as I am most familiar
with it\&.
.PP
\fI(Disclosure: I, Andreas Kupries, worked for ActiveState until 2016, maintaining ActiveTcl and TclDevKit for them)\&.\fR\&.
I am currently working for SUSE Software Canada ULC, although not in
Tcl-related areas\&.
.PP
This distribution can be found at
\fIhttp://www\&.activestate\&.com/activetcl\fR\&. Retrieve the archive of
ActiveTcl 8\&.5 (or higher) for your platform and install it as directed
by ActiveState\&.
.PP
For those wishing to build and install Tcl on their own, the
relevant sources can be found at
.TP
Tcl
\fIhttp://core\&.tcl-lang\&.org/tcl/\fR
.PP
together with the necessary instructions on how to build it\&.
.PP
If there are problems with building, installing, or using Tcl,
please file a ticket against \fITcl\fR, or the vendor of your
distribution, and \fInot\fR \fITcllib\fR\&.
.SS CRITCL
The \fBcritcl\fR tool is an \fIoptional\fR dependency\&.
.PP
It is only required when trying to build the C-based
\fIaccelerators\fR for a number of packages, as explained in
\fBCritcl & Accelerators\fR
.PP
Tcllib's build system looks for it in the ,
using the name \fBcritcl\fR\&. This is for Unix\&.
On Windows on the other hand the search is more complex\&. First we look
for a proper application \fBcritcl\&.exe\fR\&. When that is not found
we look for a combination of interpreter (\fBtclkitsh\&.exe\fR,
\fBtclsh\&.exe\fR) and starkit (\fBcritcl\&.kit\fR, \fBcritcl\fR)
instead\&. \fINote\fR that the choice of starkit can be overriden via
the environment variable \&.
.PP
Tcllib requires Critcl version 2 or higher\&.
.PP
The github repository providing releases of version 2 and
higher, and the associated sources, can be found at
\fIhttp://andreas-kupries\&.github\&.com/critcl\fR\&.
.PP
Any branch of the repository can be used (if not using the
prebuild starkit or starpack), although the use of the stable branch
\fImaster\fR is recommended\&.
.PP
At the above url is also an explanation on how to build and
install Critcl, including a list of its dependencies\&.
.PP
Its instructions will not be repeated here\&. If there are
problems with these directions please file a ticket against the
\fICritcl\fR project, and not Tcllib\&.
.SH "BUILD & INSTALLATION INSTRUCTIONS"
As Tcllib is mainly a bundle of packages written in pure Tcl building
it is the same as installing it\&. The exceptions to this have their own
subsection, \fBCritcl & Accelerators\fR, later on\&.
.PP
Before that however comes the standard case, differentiated by
the platforms with material differences in the instruction, i\&.e\&.
\fIUnix\fR-like, versus \fIWindows\fR\&.
.PP
Regarding the latter it should also be noted that it is
possible set up an \fIUnix\fR-like environment using projects
like \fIMSYS\fR, \fICygwin\fR, and others\&. In that case the
user has the choice of which instructions to follow\&.
.PP
Regardless of environment or platform, a suitable \fITcl\fR
has to be installed, and its \fBtclsh\fR should be placed on
the  (\fIUnix\fR) or associated with
"\fI\&.tcl\fR" files (\fIWindows\fR)\&.
.SS "INSTALLING ON UNIX"
For \fIUnix\fR-like environments Tcllib comes with the standard set
of files to make
.CS


  \&./configure
  make install

.CE
a suitable way of installing it\&.
This is a standard non-interactive install automatically figuring out
where to place everything, i\&.e\&. packages, applications, and the
manpages\&.
.PP
To get a graphical installer invoke
.CS


  \&./installer\&.tcl

.CE
instead\&.
.SS "INSTALLING ON WINDOWS"
In a Windows environment we have the \fBinstaller\&.tcl\fR script to
perform installation\&.
.PP
If the desired \fBtclsh\fR is associated "\fI\&.tcl\fR" files
then double-clicking / opening the \fBinstaller\&.tcl\fR is
enough to invoke it in graphical mode\&.
This assumes that \fITk\fR is installed and available as well\&.
.PP
Without \fITk\fR the only way to invoke the installer are to
open a DOS window, i\&.e\&. \fBcmd\&.exe\fR, and then to invoke
.CS


  \&./installer\&.tcl

.CE
inside it\&.
.SS "CRITCL & ACCELERATORS"
While the majority of Tcllib consists of packages written in pure Tcl
a number of packages also have \fIaccelerators\fR associated with them\&.
These are \fBcritcl\fR-based C packages whose use will boost the
performance of the packages using them\&.
These accelerators are optional, and they are not built by default\&.
If they are built according to the instructions below then they will
also be installed as well\&.
.PP
To build the accelerators the normally optional dependency on
\fBcritcl\fR becomes required\&.
.PP
To build and install Tcllib with the accelerators in a
Unix-like environment invoke:
.CS


  \&./configure
  make critcl  # Builds the shared library and package holding
               # the accelerators, tcllibc
  make install # Installs all packages, including the new tcllibc\&.

.CE
.PP
The underlying tool is "\fIsak\&.tcl\fR" in the toplevel directory
of Tcllib and the command \fBmake critcl\fR is just a wrapper around
.CS


  \&./sak\&.tcl critcl

.CE
.PP
Therefore in a Windows environment instead invoke
.CS


  \&./sak\&.tcl critcl
  \&./installer\&.tcl

.CE
from within a DOS window, i\&.e\&. \fBcmd\&.exe\fR\&.
.SS TOOLING
The core of Tcllib's build system is the script "\fIinstaller\&.tcl\fR"
found in the toplevel directory of a checkout or release\&.
.PP
The
.CS


         configure ; make install

.CE
setup available to
developers on Unix-like systems is just a wrapper around it\&.
To go beyond the standard embodied in the wrapper it is
necessary to directly invoke this script\&.
.PP
On Windows system using it directly is the only way to invoke
it\&.
.PP
For basic help invoke it as
.CS


         \&./installer\&.tcl -help

.CE
This will print a short list of all the available options to
the standard output channel\&.
.PP
The commands associated with the various \fIinstall\fR targets
in the \fIMakefile\&.in\fR for Unix can be used as additional
examples on how to use this tool as well\&.
.PP
The installer can operate in GUI and CLI modes\&.
By default it chooses the mode automatically, based on if the
Tcl package \fBTk\fR can be used or not\&.
The option \fB-no-gui\fR can be used to force CLI mode\&.
.PP
Note that it is possible to specify options on the command line
even if the installer ultimatively selects GUI mode\&. In that
case the hardwired defaults and the options determine the data
presented to the user for editing\&.
.PP
The installer will select a number of defaults for the
locations of packages, examples, and documentation, and also
the format of the documentation\&. The user can overide these
defaults in the GUI, or by specifying additional options\&.
The defaults depend on the platform detected (Unix/Windows) and
on the \fBtclsh\fR executable used to run the installer\&.
.PP
\fIOptions\fR
.TP
\fB-help\fR
Show the list of options explained here on the standard output channel
and exit\&.
.TP
\fB+excluded\fR
Include deprecated packages in the installation\&.
.TP
\fB-no-gui\fR
Force command line operation of the installer
.TP
\fB-no-wait\fR
In CLI mode the installer will by default ask the user to confirm that
the chosen configuration (destination paths, things to install) is
correct before performing any action\&. Using this option causes the
installer to skip this query and immediately jump to installation\&.
.TP
\fB-app-path\fR \fIpath\fR
.TP
\fB-example-path\fR \fIpath\fR
.TP
\fB-html-path\fR \fIpath\fR
.TP
\fB-nroff-path\fR \fIpath\fR
.TP
\fB-pkg-path\fR \fIpath\fR
Declare the destination paths for the applications, examples, html
documentation, nroff manpages, and packages\&. The defaults are derived
from the location of the \fBtclsh\fR used to run the installer\&.
.TP
\fB-dry-run\fR
.TP
\fB-simulate\fR
Run the installer without modifying the destination directories\&.
.TP
\fB-apps\fR
.TP
\fB-no-apps\fR
.TP
\fB-examples\fR
.TP
\fB-no-examples\fR
.TP
\fB-pkgs\fR
.TP
\fB-no-pkgs\fR
.TP
\fB-html\fR
.TP
\fB-no-html\fR
.TP
\fB-nroff\fR
.TP
\fB-no-nroff\fR
(De)activate the installation of applications, examples, packages,
html documentation, and nroff manpages\&.
.sp
Applications, examples, and packages are installed by default\&.
.sp
On Windows the html documentation is installed by default\&.
.sp
On Unix the nroff manpages are installed by default\&.
.PP
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted idoc/man/files/devdoc/tcllib_license.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
'\"
'\" Generated from file 'tcllib_license\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "tcllib_license" n 1 tcllib ""
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
tcllib_license \- Tcllib - License
.SH DESCRIPTION
Welcome to Tcllib, the Tcl Standard Library\&. Note that Tcllib is not a
package itself\&. It is a collection of (semi-independent) \fITcl\fR
packages that provide utility functions useful to a large collection
of Tcl programmers\&.
.PP
The collection is under the BSD license\&.
.SH LICENSE
.PP
This software is copyrighted by Ajuba Solutions and other parties\&.
The following terms apply to all files associated with the software
unless explicitly disclaimed in individual files\&.
.PP
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose,
provided that existing copyright notices are retained in all copies
and that this notice is included verbatim in any distributions\&. No
written agreement, license, or royalty fee is required for any of the
authorized uses\&.  Modifications to this software may be copyrighted by
their authors and need not follow the licensing terms described here,
provided that the new terms are clearly indicated on the first page of
each file where they apply\&.
.PP
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE\&.
.PP
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
NON-INFRINGEMENT\&.  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND
THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS\&.
.PP
GOVERNMENT USE: If you are acquiring this software on behalf of the
U\&.S\&. government, the Government shall have only "Restricted Rights" in
the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52\&.227\&.19 (c) (2)\&.  If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
Government shall have only "Restricted Rights" as defined in Clause
252\&.227-7013 (c) (1) of DFARs\&.  Notwithstanding the foregoing, the
authors grant the U\&.S\&. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license\&.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































Deleted idoc/man/files/devdoc/tcllib_releasemgr.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
'\"
'\" Generated from file 'tcllib_releasemgr\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "tcllib_releasemgr" n 1 tcllib ""
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
tcllib_releasemgr \- Tcllib - The Release Manager's Guide
.SH DESCRIPTION
Welcome to Tcllib, the Tcl Standard Library\&. Note that Tcllib is not a
package itself\&. It is a collection of (semi-independent) \fITcl\fR
packages that provide utility functions useful to a large collection
of Tcl programmers\&.
.PP
The audience of this document is the release manager for Tcllib, their
deputies, and anybody else interested in the task of creating
an official release of Tcllib for distribution\&.
.PP
Please read \fITcllib - How To Get The Sources\fR first, if that
was not done already\&. Here we assume that the sources are already
available in a directory of your choice\&.
.PP
.SH TOOLS
The "\fIsak\&.tcl\fR" script in the toplevel directory of a Tcllib
checkout is the one tool used by the release manager to perform its
\fBTasks\fR\&.
.PP
The main commands to be used are
.CS


    sak\&.tcl validate
    sak\&.tcl test run
    sak\&.tcl review
    sak\&.tcl readme
    sak\&.tcl localdoc
    sak\&.tcl release

.CE
More detail will be provided in the explanations of the various
\fBTasks\fR\&.
.SH TASKS
.SS "START A RELEASE CANDIDATE"
todo: open a candidate for release
.SS "READY THE CANDIDATE"
todo: test, validate and check that the candidate is worthy of release
fix testsuites, possibly fix packages, documentation
regenerate docs
coordinate with package maintainers wrt fixes
big thing: going over the packages, classify changes since last
release to generate a nice readme\&.
.SS "MAKE IT OFFICIAL"
todo: finalize release, make candidate official
.SS "DISTRIBUTE THE RELEASE"
With the release made it has to be published and the world notified of
its existence\&.
.IP [1]
Create a proper fossil event for the release, via
\fIhttp://core\&.tcl-lang\&.org/tcllib/eventedit\fR\&.
.sp
An \fIexisting event\fR [http://core\&.tcl-lang\&.org/tcllib/event/dac0ddcd2e990234143196b4dc438fe01e7b9817] should be used as template\&.
.IP [2]
Update a number of web locations:
.RS
.IP [1]
\fIHome page\fR [http://core\&.tcl-lang\&.org/tcllib/doc/trunk/embedded/index\&.md]
.IP [2]
\fIDownloads\fR [http://core\&.tcl-lang\&.org/tcllib/wiki?name=Downloads]
.IP [3]
\fIPast Releases\fR [http://core\&.tcl-lang\&.org/tcllib/wiki?name=Past+Releases]
.IP [4]
\fIhttp://www\&.tcl-lang\&.org/home/release\&.txt\fR
.IP [5]
\fIhttp://www\&.tcl-lang\&.org/software/tcllib/*\&.tml\fR
.IP [6]
\fIhttp://wiki\&.tcl-lang\&.org/page/Tcllib\fR
.RE
.IP
The first location maps to the file "\fIembedded/index\&.md\fR" in the
repository itself, as such it can edited as part of the release
process\&. This is where reference to the new fossil event is added, as
the new current release\&.
.sp
The next two locations are in the fossil tcllib wiki and
require admin or wiki write permissions for
\fIhttp://core\&.tcl-lang\&.org/tcllib\fR\&.
.sp
The last two locations require ssh access to
\fIhttp://www\&.tcl-lang\&.org\fR and permission to edit
files in the web area\&.
.IP [3]
***TODO*** mailing lists and other places to send notes to\&.
.PP
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































Deleted idoc/man/files/devdoc/tcllib_sources.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
'\"
'\" Generated from file 'tcllib_sources\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "tcllib_sources" n 1 tcllib ""
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
tcllib_sources \- Tcllib - How To Get The Sources
.SH DESCRIPTION
Welcome to Tcllib, the Tcl Standard Library\&. Note that Tcllib is not a
package itself\&. It is a collection of (semi-independent) \fITcl\fR
packages that provide utility functions useful to a large collection
of Tcl programmers\&.
.PP
The audience of this document is anyone wishing to either have just a
look at Tcllib's source code, or build the packages, or to extend and
modify them\&.
.PP
For builders and developers we additionally provide
.IP [1]
\fITcllib - The Installer's Guide\fR\&.
.IP [2]
\fITcllib - The Developer's Guide\fR\&.
.PP
respectively\&.
.SH "SOURCE LOCATION"
The official repository for Tcllib can be found at
\fIhttp://core\&.tcl-lang\&.org/tcllib\fR
.SH RETRIEVAL
Assuming that you simply wish to look at the sources, or build a
specific revision, the easiest way of retrieving it is to:
.IP [1]
Log into this site, as "anonymous", using the semi-random password in the captcha\&.
.IP [2]
Go to the "Timeline"\&.
.IP [3]
Choose the revision you wish to have\&.
.IP [4]
Follow its link to its detailed information page\&.
.IP [5]
On that page, choose either the "ZIP" or "Tarball" link to get
a copy of this revision in the format of your choice\&.
.PP
.SH "SOURCE CODE MANAGEMENT"
For the curious (or a developer-to-be), the sources are managed by the
\fIFossil SCM\fR [http://www\&.fossil-scm\&.org]\&.
Binaries for popular platforms can be found directly at its
\fIdownload page\fR [http://www\&.fossil-scm\&.org/download\&.html]\&.
.PP
With that tool available the full history can be retrieved via:
.CS


    fossil clone  http://core\&.tcl-lang\&.org/tcllib  tcllib\&.fossil

.CE
followed by
.CS


    mkdir tcllib
    cd tcllib
    fossil open \&.\&./tcllib\&.fossil

.CE
to get a checkout of the head of the trunk\&.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/aes/aes.n.

401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIaes\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
blowfish(n), des(n), md5(n), sha1(n)
.SH KEYWORDS
aes, block cipher, data integrity, encryption, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
Copyright (c) 2012-2014, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<












401
402
403
404
405
406
407








408
409
410
411
412
413
414
415
416
417
418
419
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIaes\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
blowfish(n), des(n), md5(n), sha1(n)
.SH KEYWORDS
aes, block cipher, data integrity, encryption, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
Copyright (c) 2012-2014, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/amazon-s3/S3.n.

1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
multiple servers running OddJob\&. An S3 bucket will be set up
with a number of scripts to run, and the OddJob program can
be invoked on multiple machines to run scripts on all the machines,
each moving on to the next unstarted task as it finishes each\&.
This is still being designed, and it is intended primarily
to be run on Amazon's Elastic Compute Cloud\&.
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







1610
1611
1612
1613
1614
1615
1616

1617
1618
1619
1620
1621
1622
1623
1624
1625
multiple servers running OddJob\&. An S3 bucket will be set up
with a number of scripts to run, and the OddJob program can
be invoked on multiple machines to run scripts on all the machines,
each moving on to the next unstarted task as it finishes each\&.
This is still being designed, and it is intended primarily
to be run on Amazon's Elastic Compute Cloud\&.
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIamazon-s3\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
amazon, cloud, s3
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
2006,2008 Darren New\&. All Rights Reserved\&. See LICENSE\&.TXT for terms\&.

.fi







<
<
<
<
<
<
<
<









1643
1644
1645
1646
1647
1648
1649








1650
1651
1652
1653
1654
1655
1656
1657
1658
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIamazon-s3\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
amazon, cloud, s3
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
2006,2008 Darren New\&. All Rights Reserved\&. See LICENSE\&.TXT for terms\&.

.fi

Changes to idoc/man/files/modules/amazon-s3/xsxp.n.

407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIamazon-s3\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
dom, parser, xml
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
2006 Darren New\&. All Rights Reserved\&.

.fi







<
<
<
<
<
<
<
<









407
408
409
410
411
412
413








414
415
416
417
418
419
420
421
422
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIamazon-s3\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
dom, parser, xml
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
2006 Darren New\&. All Rights Reserved\&.

.fi

Changes to idoc/man/files/modules/asn/asn.n.

731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIasn\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
asn, ber, cer, der, internet, protocol, x\&.208, x\&.209
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2004 Jochen Loewer <loewerj@web\&.de>
Copyright (c) 2004-2011 Michael Schlenker <mic42@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











731
732
733
734
735
736
737








738
739
740
741
742
743
744
745
746
747
748
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIasn\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
asn, ber, cer, der, internet, protocol, x\&.208, x\&.209
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2004 Jochen Loewer <loewerj@web\&.de>
Copyright (c) 2004-2011 Michael Schlenker <mic42@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/base32/base32.n.

341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase32\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
base32, rfc3548
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Public domain

.fi







<
<
<
<
<
<
<
<









341
342
343
344
345
346
347








348
349
350
351
352
353
354
355
356
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase32\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
base32, rfc3548
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Public domain

.fi

Changes to idoc/man/files/modules/base32/base32core.n.

329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase32\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
base32
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Public domain

.fi







<
<
<
<
<
<
<
<









329
330
331
332
333
334
335








336
337
338
339
340
341
342
343
344
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase32\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
base32
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Public domain

.fi

Changes to idoc/man/files/modules/base32/base32hex.n.

343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase32\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
base32, hex, rfc3548
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Public domain

.fi







<
<
<
<
<
<
<
<









343
344
345
346
347
348
349








350
351
352
353
354
355
356
357
358
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase32\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
base32, hex, rfc3548
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Public domain

.fi

Changes to idoc/man/files/modules/base64/ascii85.n.

342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase64\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
ascii85, encoding
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2010, Emiliano Gavilán

.fi







<
<
<
<
<
<
<
<









342
343
344
345
346
347
348








349
350
351
352
353
354
355
356
357
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase64\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
ascii85, encoding
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2010, Emiliano Gavilán

.fi

Changes to idoc/man/files/modules/base64/base64.n.

338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase64\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
base64, encoding
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2000, Eric Melski
Copyright (c) 2001, Miguel Sofer

.fi







<
<
<
<
<
<
<
<










338
339
340
341
342
343
344








345
346
347
348
349
350
351
352
353
354
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase64\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
base64, encoding
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2000, Eric Melski
Copyright (c) 2001, Miguel Sofer

.fi

Changes to idoc/man/files/modules/base64/uuencode.n.

367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase64\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
encoding, uuencode
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi







<
<
<
<
<
<
<
<









367
368
369
370
371
372
373








374
375
376
377
378
379
380
381
382
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase64\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
encoding, uuencode
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi

Changes to idoc/man/files/modules/base64/yencode.n.

350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase64\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
encoding, yEnc, ydecode, yencode
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi







<
<
<
<
<
<
<
<









350
351
352
353
354
355
356








357
358
359
360
361
362
363
364
365
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbase64\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
encoding, yEnc, ydecode, yencode
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi

Changes to idoc/man/files/modules/bee/bee.n.

560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbee\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
BitTorrent, bee, bittorrent, serialization, torrent
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









560
561
562
563
564
565
566








567
568
569
570
571
572
573
574
575
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbee\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
BitTorrent, bee, bittorrent, serialization, torrent
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/bench/bench.n.

500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
bench_intro, bench_lang_intro, bench_lang_spec, bench_read, bench_wcsv, bench_wtext
.SH KEYWORDS
benchmark, merging, normalization, performance, testing
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











500
501
502
503
504
505
506








507
508
509
510
511
512
513
514
515
516
517
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
bench_intro, bench_lang_intro, bench_lang_spec, bench_read, bench_wcsv, bench_wtext
.SH KEYWORDS
benchmark, merging, normalization, performance, testing
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/bench/bench_intro.n.

312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
bench, bench_lang_faq, bench_lang_intro, bench_lang_spec
.SH KEYWORDS
bench language, benchmark, performance, testing
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











312
313
314
315
316
317
318








319
320
321
322
323
324
325
326
327
328
329
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
bench, bench_lang_faq, bench_lang_intro, bench_lang_spec
.SH KEYWORDS
bench language, benchmark, performance, testing
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/bench/bench_lang_intro.n.

390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
bench_intro, bench_lang_spec
.SH KEYWORDS
bench language, benchmark, examples, performance, testing
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











390
391
392
393
394
395
396








397
398
399
400
401
402
403
404
405
406
407
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
bench_intro, bench_lang_spec
.SH KEYWORDS
bench language, benchmark, examples, performance, testing
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/bench/bench_lang_spec.n.

378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
bench_intro, bench_lang_intro
.SH KEYWORDS
bench language, benchmark, performance, specification, testing
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











378
379
380
381
382
383
384








385
386
387
388
389
390
391
392
393
394
395
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
bench_intro, bench_lang_intro
.SH KEYWORDS
bench language, benchmark, performance, specification, testing
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/bench/bench_read.n.

318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
bench, bench::out::csv, bench::out::text, bench_intro
.SH KEYWORDS
benchmark, csv, formatting, human readable, parsing, performance, reading, testing, text
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











318
319
320
321
322
323
324








325
326
327
328
329
330
331
332
333
334
335
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
bench, bench::out::csv, bench::out::text, bench_intro
.SH KEYWORDS
benchmark, csv, formatting, human readable, parsing, performance, reading, testing, text
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/bench/bench_wcsv.n.

306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
bench, bench::out::text
.SH KEYWORDS
benchmark, csv, formatting, performance, testing
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











306
307
308
309
310
311
312








313
314
315
316
317
318
319
320
321
322
323
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
bench, bench::out::text
.SH KEYWORDS
benchmark, csv, formatting, performance, testing
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/bench/bench_wtext.n.

306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
bench, bench::out::csv
.SH KEYWORDS
benchmark, formatting, human readable, performance, testing, text
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











306
307
308
309
310
311
312








313
314
315
316
317
318
319
320
321
322
323
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbench\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
bench, bench::out::csv
.SH KEYWORDS
benchmark, formatting, human readable, performance, testing, text
.SH CATEGORY
Benchmark tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/bibtex/bibtex.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'bibtex\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2005 for documentation, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "bibtex" n 0\&.7 tcllib "bibtex"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'bibtex\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2005 for documentation, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "bibtex" n 0\&.6 tcllib "bibtex"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
bibtex \- Parse bibtex files
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBbibtex  ?0\&.7?\fR
.sp
\fB::bibtex::parse\fR ?\fIoptions\fR? ?\fItext\fR?
.sp
\fB::bibtex::parse\fR \fItext\fR
.sp
\fB::bibtex::parse\fR ?\fB-command\fR \fIcmd\fR? \fB-channel\fR \fIchan\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
bibtex \- Parse bibtex files
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBbibtex  ?0\&.6?\fR
.sp
\fB::bibtex::parse\fR ?\fIoptions\fR? ?\fItext\fR?
.sp
\fB::bibtex::parse\fR \fItext\fR
.sp
\fB::bibtex::parse\fR ?\fB-command\fR \fIcmd\fR? \fB-channel\fR \fIchan\fR
.sp
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbibtex\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
bibliography, bibtex, parsing, text processing
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2005 for documentation, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









418
419
420
421
422
423
424








425
426
427
428
429
430
431
432
433
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIbibtex\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
bibliography, bibtex, parsing, text processing
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2005 for documentation, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/blowfish/blowfish.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'blowfish\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "blowfish" n 1\&.0\&.5 tcllib "Blowfish Block Cipher"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'blowfish\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "blowfish" n 1\&.0\&.3 tcllib "Blowfish Block Cipher"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
blowfish \- Implementation of the Blowfish block cipher
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBblowfish  ?1\&.0\&.5?\fR
.sp
\fB::blowfish::blowfish\fR ?\fI-mode [ecb|cbc]\fR? ?\fI-dir [encrypt|decrypt]\fR? \fI-key keydata\fR ?\fI-iv vector\fR? ?\fI-out channel\fR? ?\fI-chunksize size\fR? ?\fI-pad padchar\fR? [ \fI-in channel\fR | ?\fI--\fR? \fIdata\fR ]
.sp
\fB::blowfish::Init\fR \fImode\fR \fIkeydata\fR \fIiv\fR
.sp
\fB::blowfish::Encrypt\fR \fIKey\fR \fIdata\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
blowfish \- Implementation of the Blowfish block cipher
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBblowfish  ?1\&.0\&.4?\fR
.sp
\fB::blowfish::blowfish\fR ?\fI-mode [ecb|cbc]\fR? ?\fI-dir [encrypt|decrypt]\fR? \fI-key keydata\fR ?\fI-iv vector\fR? ?\fI-out channel\fR? ?\fI-chunksize size\fR? ?\fI-pad padchar\fR? [ \fI-in channel\fR | ?\fI--\fR? \fIdata\fR ]
.sp
\fB::blowfish::Init\fR \fImode\fR \fIkeydata\fR \fIiv\fR
.sp
\fB::blowfish::Encrypt\fR \fIKey\fR \fIdata\fR
.sp
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIblowfish\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
3des, des, rc4
.SH KEYWORDS
block cipher, blowfish, cryptography, encryption, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











400
401
402
403
404
405
406








407
408
409
410
411
412
413
414
415
416
417
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIblowfish\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
3des, des, rc4
.SH KEYWORDS
block cipher, blowfish, cryptography, encryption, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/cache/async.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'async\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "cache::async" n 0\&.3\&.1 tcllib "In-memory caches"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'async\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "cache::async" n 0\&.3 tcllib "In-memory caches"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
cache::async \- Asynchronous in-memory cache
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBcache::async  ?0\&.3\&.1?\fR
.sp
\fB::cache::async\fR \fIobjectName\fR \fIcommandprefix\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fIobjectName\fR \fBget\fR \fIkey\fR \fIdonecmdprefix\fR
.sp
\fIobjectName\fR \fBset\fR \fIkey\fR \fIvalue\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
cache::async \- Asynchronous in-memory cache
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBcache::async  ?0\&.3?\fR
.sp
\fB::cache::async\fR \fIobjectName\fR \fIcommandprefix\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fIobjectName\fR \fBget\fR \fIkey\fR \fIdonecmdprefix\fR
.sp
\fIobjectName\fR \fBset\fR \fIkey\fR \fIvalue\fR
.sp
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcache\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
asynchronous, cache, callback, synchronous
.SH COPYRIGHT
.nf
Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<







393
394
395
396
397
398
399








400
401
402
403
404
405
406
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcache\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
asynchronous, cache, callback, synchronous
.SH COPYRIGHT
.nf
Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Deleted idoc/man/files/modules/clay/clay.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
'\"
'\" Generated from file 'clay\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2018 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "clay" n 0\&.8\&.6 tcllib "Clay Framework"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
clay \- A minimalist framework for large scale OO Projects
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBuuid \fR
.sp
package require \fBoo::dialect \fR
.sp
proc \fBclay::PROC\fR \fIname\fR \fIarglist\fR \fIbody\fR ?\fIninja\fR \fB\fR?
.sp
proc \fBclay::_ancestors\fR \fIresultvar\fR \fIclass\fR
.sp
proc \fBclay::ancestors\fR ?\fIargs\fR?
.sp
proc \fBclay::args_to_dict\fR ?\fIargs\fR?
.sp
proc \fBclay::args_to_options\fR ?\fIargs\fR?
.sp
proc \fBclay::dynamic_arguments\fR \fIensemble\fR \fImethod\fR \fIarglist\fR ?\fIargs\fR?
.sp
proc \fBclay::dynamic_wrongargs_message\fR \fIarglist\fR
.sp
proc \fBclay::is_dict\fR \fId\fR
.sp
proc \fBclay::is_null\fR \fIvalue\fR
.sp
proc \fBclay::leaf\fR ?\fIargs\fR?
.sp
proc \fBclay::K\fR \fIa\fR \fIb\fR
.sp
proc \fBclay::noop\fR ?\fIargs\fR?
.sp
proc \fBclay::cleanup\fR
.sp
proc \fBclay::object_create\fR \fIobjname\fR ?\fIclass\fR \fB\fR?
.sp
proc \fBclay::object_rename\fR \fIobject\fR \fInewname\fR
.sp
proc \fBclay::object_destroy\fR ?\fIargs\fR?
.sp
proc \fBclay::path\fR ?\fIargs\fR?
.sp
proc \fBclay::putb\fR ?\fImap\fR? \fItext\fR
.sp
proc \fBclay::script_path\fR
.sp
proc \fBclay::NSNormalize\fR \fIqualname\fR
.sp
proc \fBclay::uuid_generate\fR ?\fIargs\fR?
.sp
proc \fBclay::uuid::generate_tcl_machinfo\fR
.sp
proc \fBclay::uuid::tostring\fR \fIuuid\fR
.sp
proc \fBclay::uuid::fromstring\fR \fIuuid\fR
.sp
proc \fBclay::uuid::equal\fR \fIleft\fR \fIright\fR
.sp
proc \fBclay::uuid\fR \fIcmd\fR ?\fIargs\fR?
.sp
proc \fBclay::tree::sanitize\fR \fIdict\fR
.sp
proc \fBclay::tree::_sanitizeb\fR \fIpath\fR \fIvarname\fR \fIdict\fR
.sp
proc \fBclay::tree::storage\fR \fIrawpath\fR
.sp
proc \fBclay::tree::dictset\fR \fIvarname\fR ?\fIargs\fR?
.sp
proc \fBclay::tree::dictmerge\fR \fIvarname\fR ?\fIargs\fR?
.sp
proc \fBclay::tree::merge\fR ?\fIargs\fR?
.sp
proc \fBdictargs::proc\fR \fIname\fR \fIargspec\fR \fIbody\fR
.sp
proc \fBdictargs::method\fR \fIname\fR \fIargspec\fR \fIbody\fR
.sp
proc \fBclay::dialect::Push\fR \fIclass\fR
.sp
proc \fBclay::dialect::Peek\fR
.sp
proc \fBclay::dialect::Pop\fR
.sp
proc \fBclay::dialect::create\fR \fIname\fR ?\fIparent\fR \fB\fR?
.sp
proc \fBclay::dialect::NSNormalize\fR \fInamespace\fR \fIqualname\fR
.sp
proc \fBclay::dialect::DefineThunk\fR \fItarget\fR ?\fIargs\fR?
.sp
proc \fBclay::dialect::Canonical\fR \fInamespace\fR \fINSpace\fR \fIclass\fR
.sp
proc \fBclay::dialect::Define\fR \fInamespace\fR \fIclass\fR ?\fIargs\fR?
.sp
proc \fBclay::dialect::Aliases\fR \fInamespace\fR ?\fIargs\fR?
.sp
proc \fBclay::dialect::SuperClass\fR \fInamespace\fR ?\fIargs\fR?
.sp
proc \fBclay::dynamic_methods\fR \fIclass\fR
.sp
proc \fBclay::dynamic_methods_class\fR \fIthisclass\fR
.sp
proc \fBclay::define::Array\fR \fIname\fR ?\fIvalues\fR \fB\fR?
.sp
proc \fBclay::define::Delegate\fR \fIname\fR \fIinfo\fR
.sp
proc \fBclay::define::constructor\fR \fIarglist\fR \fIrawbody\fR
.sp
proc \fBclay::define::Class_Method\fR \fIname\fR \fIarglist\fR \fIbody\fR
.sp
proc \fBclay::define::class_method\fR \fIname\fR \fIarglist\fR \fIbody\fR
.sp
proc \fBclay::define::clay\fR ?\fIargs\fR?
.sp
proc \fBclay::define::destructor\fR \fIrawbody\fR
.sp
proc \fBclay::define::Dict\fR \fIname\fR ?\fIvalues\fR \fB\fR?
.sp
proc \fBclay::define::Option\fR \fIname\fR ?\fIargs\fR?
.sp
proc \fBclay::define::Method\fR \fIname\fR \fIargstyle\fR \fIargspec\fR \fIbody\fR
.sp
proc \fBclay::define::Option_Class\fR \fIname\fR ?\fIargs\fR?
.sp
proc \fBclay::define::Variable\fR \fIname\fR ?\fIdefault\fR \fB\fR?
.sp
proc \fBclay::ensemble_methodbody\fR \fIensemble\fR \fIeinfo\fR
.sp
proc \fBclay::define::Ensemble\fR \fIrawmethod\fR ?\fIargs\fR?
.sp
proc \fBclay::event::cancel\fR \fIself\fR ?\fItask\fR \fB*\fR?
.sp
proc \fBclay::event::generate\fR \fIself\fR \fIevent\fR ?\fIargs\fR?
.sp
proc \fBclay::event::nextid\fR
.sp
proc \fBclay::event::Notification_list\fR \fIself\fR \fIevent\fR ?\fIstackvar\fR \fB\fR?
.sp
proc \fBclay::event::notify\fR \fIrcpt\fR \fIsender\fR \fIevent\fR \fIeventinfo\fR
.sp
proc \fBclay::event::process\fR \fIself\fR \fIhandle\fR \fIscript\fR
.sp
proc \fBclay::event::schedule\fR \fIself\fR \fIhandle\fR \fIinterval\fR \fIscript\fR
.sp
proc \fBclay::event::subscribe\fR \fIself\fR \fIwho\fR \fIevent\fR
.sp
proc \fBclay::event::unsubscribe\fR \fIself\fR ?\fIargs\fR?
.sp
proc \fBclay::singleton\fR \fIname\fR \fIscript\fR
.sp
method \fBclay ancestors\fR
.sp
method \fBclay dump\fR
.sp
method \fBclay find\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
.sp
method \fBclay get\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
.sp
method \fBclay GET\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
.sp
method \fBclay merge\fR \fIdict\fR ?\fBdict\&.\&.\&.\fR?
.sp
method \fBclay replace\fR \fIdictionary\fR
.sp
method \fBclay search\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
.sp
method \fBclay set\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR? \fIvalue\fR
.sp
method \fBclay ancestors\fR
.sp
method \fBclay cache\fR \fIpath\fR \fIvalue\fR
.sp
method \fBclay cget\fR \fIfield\fR
.sp
method \fBclay delegate\fR ?\fIstub\fR? ?\fIobject\fR?
.sp
method \fBclay dump\fR
.sp
method \fBclay ensemble_map\fR
.sp
method \fBclay eval\fR \fIscript\fR
.sp
method \fBclay evolve\fR
.sp
method \fBclay exists\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
.sp
method \fBclay flush\fR
.sp
method \fBclay forward\fR \fImethod\fR \fIobject\fR
.sp
method \fBclay get\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
.sp
method \fBclay leaf\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
.sp
method \fBclay merge\fR \fIdict\fR ?\fBdict\&.\&.\&.\fR?
.sp
method \fBclay mixin\fR \fIclass\fR ?\fBclass\&.\&.\&.\fR?
.sp
method \fBclay mixinmap\fR ?\fIstub\fR? ?\fIclasses\fR?
.sp
method \fBclay provenance\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
.sp
method \fBclay replace\fR \fIdictionary\fR
.sp
method \fBclay search\fR \fIpath\fR \fIvaluevar\fR \fIisleafvar\fR
.sp
method \fBclay source\fR \fIfilename\fR
.sp
method \fBclay set\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR? \fIvalue\fR
.sp
method \fBInitializePublic\fR
.sp
.BE
.SH DESCRIPTION
Clay introduces a method ensemble to both \fBoo::class\fR and \fBoo::object\fR called
clay\&. This ensemble handles all of the high level interactions within the framework\&.
Clay stores structured data\&. Clan manages method delegation\&. Clay has facilities to
manage the complex interactions that come about with mixins\&.
.PP
The central concept is that inside of every object and class
(which are actually objects too) is a dict called clay\&. What is stored in that dict is
left to the imagination\&. But because this dict is exposed via a public method, we can
share structured data between object, classes, and mixins\&.
.PP
.SS "STRUCTURED DATA"
Clay uses a standardized set of method interactions and introspection that TclOO already provides to perform on-the-fly searches\&. On-the-fly searches mean that the data is never stale, and we avoid many of the sorts of collisions that would arise when objects start mixing in other classes during operation\&.
.PP
The \fBclay\fR methods for both classes and objects have a get and a set method\&. For objects, get will search through the local clay dict\&. If the requested leaf is not found, or the query is for a branch, the system will then begin to poll the clay methods of all of the class that implements the object, all of that classes’ ancestors, as well as all of the classes that have been mixed into this object, and all of their ancestors\&.
.PP
Intended branches on a tree end with a directory slash (/)\&. Intended leaves are left unadorned\&. This is a guide for the tool that builds the search
results to know what parts of a dict are intended to be branches and which are intended to be leaves\&.
For simple cases, branch marking can be ignored:
.CS


::oo::class create ::foo { }
::foo clay set property/ color blue
::foo clay set property/ shape round

set A [::foo new]
$A clay get property/
{color blue shape round}

$A clay set property/ shape square
$A clay get property/
{color blue shape square}

.CE
.PP
But when you start storing blocks of text, guessing what field is a dict and what isn’t gets messy:
.CS


::foo clay set description {A generic thing of designated color and shape}

$A clay get description
{A generic thing of designated color and shape}

Without a convention for discerning branches for leaves what should have been a value can be accidentally parsed as a dictionary, and merged with all of the other values that were never intended to be merge\&. Here is an example of it all going wrong:
::oo::class create ::foo { }
# Add description as a leaf
::foo clay set description  {A generic thing of designated color and shape}
# Add description as a branch
::foo clay set description/  {A generic thing of designated color and shape}

::oo::class create ::bar {
  superclass foo
}
# Add description as a leaf
::bar clay set description  {A drinking establishment of designated color and shape and size}
# Add description as a branch
::bar clay set description/  {A drinking establishment of designated color and shape and size}

set B [::bar new]
# As a leaf we get the value verbatim from he nearest ancestor
$B clay get description
  {A drinking establishment of designated color and shape and size}
# As a branch we get a recursive merge
$B clay get description/
{A drinking establishment of designated color and size thing of}

.CE
.SS "CLAY DIALECT"
Clay is built using the oo::dialect module from Tcllib\&. oo::dialect allows you to either add keywords directly to clay, or to create your own
metaclass and keyword set using Clay as a foundation\&. For details on the keywords and what they do, consult the functions in the ::clay::define namespace\&.
.SS "METHOD DELEGATION"
Method Delegation
It is sometimes useful to have an external object that can be invoked as if it were a method of the object\&. Clay provides a delegate ensemble method to perform that delegation, as well as introspect which methods are delegated in that manner\&. All delegated methods are marked with html-like tag markings (< >) around them\&.
.CS


::clay::define counter {
  Variable counter 0
  method incr {{howmuch 1}} {
    my variable counter
    incr counter $howmuch
  }
  method value {} {
    my variable counter
    return $counter
  }
  method reset {} {
    my variable counter
    set counter 0
  }
}
::clay::define example {
  variable buffer
  constructor {} {
    # Build a counter object
    set obj [namespace current]::counter
    ::counter create $obj
    # Delegate the counter
    my delegate <counter> $obj
  }
  method line {text} {
    my <counter> incr
    append buffer $text
  }
}

set A [example new]
$A line {Who’s line is it anyway?}
$A <counter> value
1

.CE
.SH COMMANDS
.TP
proc \fBclay::PROC\fR \fIname\fR \fIarglist\fR \fIbody\fR ?\fIninja\fR \fB\fR?
Because many features in this package may be added as
commands to future tcl cores, or be provided in binary
form by packages, I need a declaritive way of saying
\fICreate this command if there isn't one already\fR\&.
The \fIninja\fR argument is a script to execute if the
command is created by this mechanism\&.
.TP
proc \fBclay::_ancestors\fR \fIresultvar\fR \fIclass\fR
.TP
proc \fBclay::ancestors\fR ?\fIargs\fR?
.TP
proc \fBclay::args_to_dict\fR ?\fIargs\fR?
.TP
proc \fBclay::args_to_options\fR ?\fIargs\fR?
.TP
proc \fBclay::dynamic_arguments\fR \fIensemble\fR \fImethod\fR \fIarglist\fR ?\fIargs\fR?
.TP
proc \fBclay::dynamic_wrongargs_message\fR \fIarglist\fR
.TP
proc \fBclay::is_dict\fR \fId\fR
.TP
proc \fBclay::is_null\fR \fIvalue\fR
.TP
proc \fBclay::leaf\fR ?\fIargs\fR?
.TP
proc \fBclay::K\fR \fIa\fR \fIb\fR
.TP
proc \fBclay::noop\fR ?\fIargs\fR?
Perform a noop\&. Useful in prototyping for commenting out blocks
of code without actually having to comment them out\&. It also makes
a handy default for method delegation if a delegate has not been
assigned yet\&.
.TP
proc \fBclay::cleanup\fR
Process the queue of objects to be destroyed
.TP
proc \fBclay::object_create\fR \fIobjname\fR ?\fIclass\fR \fB\fR?
.TP
proc \fBclay::object_rename\fR \fIobject\fR \fInewname\fR
.TP
proc \fBclay::object_destroy\fR ?\fIargs\fR?
Mark an objects for destruction on the next cleanup
.TP
proc \fBclay::path\fR ?\fIargs\fR?
.TP
proc \fBclay::putb\fR ?\fImap\fR? \fItext\fR
Append a line of text to a variable\&. Optionally apply a string mapping\&.
.TP
proc \fBclay::script_path\fR
.TP
proc \fBclay::NSNormalize\fR \fIqualname\fR
.TP
proc \fBclay::uuid_generate\fR ?\fIargs\fR?
.TP
proc \fBclay::uuid::generate_tcl_machinfo\fR
.TP
proc \fBclay::uuid::tostring\fR \fIuuid\fR
.TP
proc \fBclay::uuid::fromstring\fR \fIuuid\fR
Convert a string representation of a uuid into its binary format\&.
.TP
proc \fBclay::uuid::equal\fR \fIleft\fR \fIright\fR
Compare two uuids for equality\&.
.TP
proc \fBclay::uuid\fR \fIcmd\fR ?\fIargs\fR?
uuid generate -> string rep of a new uuid
uuid equal uuid1 uuid2
.TP
proc \fBclay::tree::sanitize\fR \fIdict\fR
Output a dictionary removing any \&. entries added by \fBclay::tree::merge\fR
.TP
proc \fBclay::tree::_sanitizeb\fR \fIpath\fR \fIvarname\fR \fIdict\fR
Helper function for ::clay::tree::sanitize
Formats the string representation for a dictionary element within
a human readable stream of lines, and determines if it needs to call itself
with further indentation to express a sub-branch
.TP
proc \fBclay::tree::storage\fR \fIrawpath\fR
Return the path as a storage path for clay::tree
with all branch terminators removed\&.
This command will also break arguments up if they
contain /\&.
.sp
Example:
.CS

 > clay::tree::storage {foo bar baz bang}
 foo bar baz bang
 > clay::tree::storage {foo bar baz bang/}
 foo bar baz bang
 > clay::tree::storage {foo bar baz bang:}
 foo bar baz bang:
 > clay::tree::storage {foo/bar/baz bang:}
 foo bar baz bang:
 > clay::tree::storage {foo/bar/baz/bang}
 foo bar baz bang



.CE
.TP
proc \fBclay::tree::dictset\fR \fIvarname\fR ?\fIargs\fR?
Set an element with a recursive dictionary,
marking all branches on the way down to the
final element\&.
If the value does not exists in the nested dictionary
it is added as a leaf\&. If the value already exists as a branch
the value given is merged if the value is a valid dict\&. If the
incoming value is not a valid dict, the value overrides the value
stored, and the value is treated as a leaf from then on\&.
.sp
Example:
.CS

 > set r {}
 > ::clay::tree::dictset r option color default Green
 \&. {} option {\&. {} color {\&. {} default Green}}
 > ::clay::tree::dictset r option {Something not dictlike}
 \&. {} option {Something not dictlike}
 # Note that if the value is not a dict, and you try to force it to be
 # an error with be thrown on the merge
 > ::clay::tree::dictset r option color default Blue
 missing value to go with key



.CE
.TP
proc \fBclay::tree::dictmerge\fR \fIvarname\fR ?\fIargs\fR?
A recursive form of dict merge, intended for modifying variables in place\&.
.sp
Example:
.CS

 > set mydict {sub/ {sub/ {description {a block of text}}}}
 > ::clay::tree::dictmerge mydict {sub/ {sub/ {field {another block of text}}}}]
 > clay::tree::print $mydict
 sub/ {
   sub/ {
     description {a block of text}
     field {another block of text}
   }
 }



.CE
.TP
proc \fBclay::tree::merge\fR ?\fIargs\fR?
A recursive form of dict merge
.sp
A routine to recursively dig through dicts and merge
adapted from http://stevehavelka\&.com/tcl-dict-operation-nested-merge/
.sp
Example:
.CS

 > set mydict {sub/ {sub/ {description {a block of text}}}}
 > set odict [clay::tree::merge $mydict {sub/ {sub/ {field {another block of text}}}}]
 > clay::tree::print $odict
 sub/ {
   sub/ {
     description {a block of text}
     field {another block of text}
   }
 }



.CE
.TP
proc \fBdictargs::proc\fR \fIname\fR \fIargspec\fR \fIbody\fR
Named Procedures as new command
.TP
proc \fBdictargs::method\fR \fIname\fR \fIargspec\fR \fIbody\fR
.TP
proc \fBclay::dialect::Push\fR \fIclass\fR
.TP
proc \fBclay::dialect::Peek\fR
.TP
proc \fBclay::dialect::Pop\fR
.TP
proc \fBclay::dialect::create\fR \fIname\fR ?\fIparent\fR \fB\fR?
This proc will generate a namespace, a "mother of all classes", and a
rudimentary set of policies for this dialect\&.
.TP
proc \fBclay::dialect::NSNormalize\fR \fInamespace\fR \fIqualname\fR
Support commands; not intended to be called directly\&.
.TP
proc \fBclay::dialect::DefineThunk\fR \fItarget\fR ?\fIargs\fR?
.TP
proc \fBclay::dialect::Canonical\fR \fInamespace\fR \fINSpace\fR \fIclass\fR
.TP
proc \fBclay::dialect::Define\fR \fInamespace\fR \fIclass\fR ?\fIargs\fR?
Implementation of the languages' define command
.TP
proc \fBclay::dialect::Aliases\fR \fInamespace\fR ?\fIargs\fR?
.TP
proc \fBclay::dialect::SuperClass\fR \fInamespace\fR ?\fIargs\fR?
.TP
proc \fBclay::dynamic_methods\fR \fIclass\fR
.TP
proc \fBclay::dynamic_methods_class\fR \fIthisclass\fR
.TP
proc \fBclay::define::Array\fR \fIname\fR ?\fIvalues\fR \fB\fR?
New OO Keywords for clay
.TP
proc \fBclay::define::Delegate\fR \fIname\fR \fIinfo\fR
An annotation that objects of this class interact with delegated
methods\&. The annotation is intended to be a dictionary, and the
only reserved key is \fIdescription\fR, a human readable description\&.
.TP
proc \fBclay::define::constructor\fR \fIarglist\fR \fIrawbody\fR
.TP
proc \fBclay::define::Class_Method\fR \fIname\fR \fIarglist\fR \fIbody\fR
Specify the a method for the class object itself, instead of for objects of the class
.TP
proc \fBclay::define::class_method\fR \fIname\fR \fIarglist\fR \fIbody\fR
And alias to the new Class_Method keyword
.TP
proc \fBclay::define::clay\fR ?\fIargs\fR?
.TP
proc \fBclay::define::destructor\fR \fIrawbody\fR
.TP
proc \fBclay::define::Dict\fR \fIname\fR ?\fIvalues\fR \fB\fR?
.TP
proc \fBclay::define::Option\fR \fIname\fR ?\fIargs\fR?
Define an option for the class
.TP
proc \fBclay::define::Method\fR \fIname\fR \fIargstyle\fR \fIargspec\fR \fIbody\fR
.TP
proc \fBclay::define::Option_Class\fR \fIname\fR ?\fIargs\fR?
Define a class of options
All field / value pairs will be be inherited by an option that
specify \fIname\fR as it class field\&.
.TP
proc \fBclay::define::Variable\fR \fIname\fR ?\fIdefault\fR \fB\fR?
This keyword can also be expressed:
.CS

property variable NAME {default DEFAULT}
.CE
.sp
Variables registered in the variable property are also initialized
(if missing) when the object changes class via the \fImorph\fR method\&.
.TP
proc \fBclay::ensemble_methodbody\fR \fIensemble\fR \fIeinfo\fR
Produce the body of an ensemble's public dispatch method
ensemble is the name of the the ensemble\&.
einfo is a dictionary of methods for the ensemble, and each value is a script
to execute on dispatch
.sp
Example:
.CS

 ::clay::ensemble_methodbody foo {
   bar {tailcall my Foo_bar {*}$args}
   baz {tailcall my Foo_baz {*}$args}
   clock {return [clock seconds]}
   default {puts "You gave me $method"}
 }



.CE
.TP
proc \fBclay::define::Ensemble\fR \fIrawmethod\fR ?\fIargs\fR?
.TP
proc \fBclay::event::cancel\fR \fIself\fR ?\fItask\fR \fB*\fR?
Cancel a scheduled event
.TP
proc \fBclay::event::generate\fR \fIself\fR \fIevent\fR ?\fIargs\fR?
Generate an event
Adds a subscription mechanism for objects
to see who has recieved this event and prevent
spamming or infinite recursion
.TP
proc \fBclay::event::nextid\fR
.TP
proc \fBclay::event::Notification_list\fR \fIself\fR \fIevent\fR ?\fIstackvar\fR \fB\fR?
Called recursively to produce a list of
who recieves notifications
.TP
proc \fBclay::event::notify\fR \fIrcpt\fR \fIsender\fR \fIevent\fR \fIeventinfo\fR
Final delivery to intended recipient object
.TP
proc \fBclay::event::process\fR \fIself\fR \fIhandle\fR \fIscript\fR
Evaluate an event script in the global namespace
.TP
proc \fBclay::event::schedule\fR \fIself\fR \fIhandle\fR \fIinterval\fR \fIscript\fR
Schedule an event to occur later
.TP
proc \fBclay::event::subscribe\fR \fIself\fR \fIwho\fR \fIevent\fR
Subscribe an object to an event pattern
.TP
proc \fBclay::event::unsubscribe\fR \fIself\fR ?\fIargs\fR?
Unsubscribe an object from an event pattern
.TP
proc \fBclay::singleton\fR \fIname\fR \fIscript\fR
An object which is intended to be it's own class\&.
.PP
.SH CLASSES
.SS "CLASS  CLAY::CLASS"
.PP
\fBMethods\fR
.TP
method \fBclay ancestors\fR
Return this class and all ancestors in search order\&.
.TP
method \fBclay dump\fR
Return a complete dump of this object's clay data, but only this object's clay data\&.
.TP
method \fBclay find\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
Pull a chunk of data from the clay system\&. If the last element of \fIpath\fR is a branch,
returns a recursive merge of all data from this object and it's constituent classes of the data in that branch\&.
If the last element is a leaf, search this object for a matching leaf, or search all  constituent classes for a matching
leaf and return the first value found\&.
If no value is found, returns an empty string\&.
If a branch is returned the topmost \&. entry is omitted\&.
.TP
method \fBclay get\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
Pull a chunk of data from the class's clay system\&.
If no value is found, returns an empty string\&.
If a branch is returned the topmost \&. entry is omitted\&.
.TP
method \fBclay GET\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
Pull a chunk of data from the class's clay system\&.
If no value is found, returns an empty string\&.
.TP
method \fBclay merge\fR \fIdict\fR ?\fBdict\&.\&.\&.\fR?
Recursively merge the dictionaries given into the object's local clay storage\&.
.TP
method \fBclay replace\fR \fIdictionary\fR
Replace the contents of the internal clay storage with the dictionary given\&.
.TP
method \fBclay search\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
Return the first matching value for the path in either this class's clay data or one of its ancestors
.TP
method \fBclay set\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR? \fIvalue\fR
Merge the conents of \fBvalue\fR with the object's clay storage at \fBpath\fR\&.
.PP
.PP
.SS "CLASS  CLAY::OBJECT"
clay::object
This class is inherited by all classes that have options\&.
.PP
\fBMethods\fR
.TP
method \fBclay ancestors\fR
Return the class this object belongs to, all classes mixed into this object, and all ancestors of those classes in search order\&.
.TP
method \fBclay cache\fR \fIpath\fR \fIvalue\fR
Store VALUE in such a way that request in SEARCH for PATH will always return it until the cache is flushed
.TP
method \fBclay cget\fR \fIfield\fR
Pull a value from either the object's clay structure or one of its constituent classes that matches the field name\&.
The order of search us:
.sp
1\&. The as a value in local dict variable config
.sp
2\&. The as a value in local dict variable clay
.sp
3\&. As a leaf in any ancestor as a root of the clay tree
.sp
4\&. As a leaf in any ancestor as \fBconst\fR \fIfield\fR
.sp
5\&. As a leaf in any ancestor as \fBoption\fR \fIfield\fR \fBdefault\fR
.TP
method \fBclay delegate\fR ?\fIstub\fR? ?\fIobject\fR?
Introspect or control method delegation\&. With no arguments, the method will return a
key/value list of stubs and objects\&. With just the \fIstub\fR argument, the method will
return the object (if any) attached to the stub\&. With a \fIstub\fR and an \fIobject\fR
this command will forward all calls to the method \fIstub\fR to the \fIobject\fR\&.
.TP
method \fBclay dump\fR
Return a complete dump of this object's clay data, as well as the data from all constituent classes recursively blended in\&.
.TP
method \fBclay ensemble_map\fR
Return a dictionary describing the method ensembles to be assembled for this object
.TP
method \fBclay eval\fR \fIscript\fR
Evaluated a script in the namespace of this object
.TP
method \fBclay evolve\fR
Trigger the \fBInitializePublic\fR private method
.TP
method \fBclay exists\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
Returns 1 if \fIpath\fR exists in either the object's clay data\&. Values greater than one indicate the element exists in one of the object's constituent classes\&. A value of zero indicates the path could not be found\&.
.TP
method \fBclay flush\fR
Wipe any caches built by the clay implementation
.TP
method \fBclay forward\fR \fImethod\fR \fIobject\fR
A convenience wrapper for
.CS

oo::objdefine [self] forward {*}$args
.CE
.TP
method \fBclay get\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
Pull a chunk of data from the clay system\&. If the last element of \fIpath\fR is a branch (ends in a slash /),
returns a recursive merge of all data from this object and it's constituent classes of the data in that branch\&.
If the last element is a leaf, search this object for a matching leaf, or search all  constituent classes for a matching
leaf and return the first value found\&.
If no value is found, returns an empty string\&.
.TP
method \fBclay leaf\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
A modified get which is tailored to pull only leaf elements
.TP
method \fBclay merge\fR \fIdict\fR ?\fBdict\&.\&.\&.\fR?
Recursively merge the dictionaries given into the object's local clay storage\&.
.TP
method \fBclay mixin\fR \fIclass\fR ?\fBclass\&.\&.\&.\fR?
Perform [oo::objdefine [self] mixin] on this object, with a few additional rules:
Prior to the call, for any class was previously mixed in, but not in the new result, execute the script registered to mixin/ unmap-script (if given\&.)
For all new classes, that were not present prior to this call, after the native TclOO mixin is invoked, execute the script registered to mixin/ map-script (if given\&.)
Fall all classes that are now present and “mixed inâ€, execute the script registered to mixin/ react-script (if given\&.)
.TP
method \fBclay mixinmap\fR ?\fIstub\fR? ?\fIclasses\fR?
With no arguments returns the map of stubs and classes mixed into the current object\&. When only stub is given,
returns the classes mixed in on that stub\&. When stub and classlist given, replace the classes currently on that stub with the given
classes and invoke clay mixin on the new matrix of mixed in classes\&.
.TP
method \fBclay provenance\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR?
Return either \fBself\fR if that path exists in the current object, or return the first class (if any) along the clay search path which contains that element\&.
.TP
method \fBclay replace\fR \fIdictionary\fR
Replace the contents of the internal clay storage with the dictionary given\&.
.TP
method \fBclay search\fR \fIpath\fR \fIvaluevar\fR \fIisleafvar\fR
Return true, and set valuevar to the value and isleafar to true for false if PATH was found in the cache\&.
.TP
method \fBclay source\fR \fIfilename\fR
Source the given filename within the object's namespace
.TP
method \fBclay set\fR \fIpath\fR ?\fBpath\&.\&.\&.\fR? \fIvalue\fR
Merge the conents of \fBvalue\fR with the object's clay storage at \fBpath\fR\&.
.TP
method \fBInitializePublic\fR
Instantiate variables\&. Called on object creation and during clay mixin\&.
.PP
.PP
.SH AUTHORS
Sean Woods \fImailto:<yoda@etoyoc\&.com>\fR
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIoo\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
TclOO, oo
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2018 Sean Woods <yoda@etoyoc\&.com>

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/clock/iso8601.n.

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
The acceptable options are
\fB-base\fR,
\fB-gmt\fR,
\fB-locale\fR, and
\fB-timezone\fR
of the builtin command \fBclock scan\fR\&.
.PP
.SH "DATE FORMATS"
The commands accept the following 23 date formats:
.CS


(year)-(month)-(day)
(year)(month)(day)
(year)-(day in year)
(year)(day in year)
(year in century)-(month)-(day)
(year)-(month)			Day defaults to the 1st of the month
(year in century)(month)(day)
(year in century)-(day in year)
(year in century)(day in year)
--(month)-(day)			Year defaults to the current year
--(month)(day)			Year defaults to the current year
--(day in year)			Year defaults to the current year
---(day)  		        Year defaults to the current year, month to current month
(fiscal year)-W(week)-(wday)
(fiscal year)W(week)-(wday)
(fiscal year in century)-W(week)-(wday)
(fiscal year in century)W(week)(wday)
(fiscal year)-W(week)		Weekday defaults to monday
(fiscal year)W(week)		Weekday defaults to monday
-W(week)-(wday)			Year defaults to current fiscal year
-W(week)(wday)			Year defaults to current fiscal year
(wday)				Year defaults to current fiscal year, week to current week
(year)				Month defaults to january, day to 1st of the month

.CE
The possible parts/fields in the above, and their meanings, are:
.TP
year
Year with century, 4 digits
.TP
month
Month in year, 2 digits
.TP
day
Day in month, 2 digits\&.
.TP
year in century
Year without century, 2 digits
.TP
day in year
Day in year, 3 digits
.TP
fiscal year
ISO 8601 fiscal year with century, 4 digits
.TP
fiscal year in century
ISO 8601 fiscal year without century, 2 digits
.TP
week
ISO 8601 week number
.TP
wday
Week day, 1 digit, Monday (1) to Sunday (7,0)
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIclock::iso8601\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







<
<
<
<
<
<
<
<


305
306
307
308
309
310
311



























































312
313
314
315
316
317
318








319
320
The acceptable options are
\fB-base\fR,
\fB-gmt\fR,
\fB-locale\fR, and
\fB-timezone\fR
of the builtin command \fBclock scan\fR\&.
.PP



























































.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIclock::iso8601\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/clock/rfc2822.n.

267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
clock_rfc2822 \- Parsing RFC 2822 dates/times
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBclock::rfc2822  ?0\&.1?\fR
.sp
\fB::clock::rfc2822 parse_date\fR \fIdate\fR
.sp







|







267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
clock_rfc2822 \- Parsing ISO 8601 dates/times
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBclock::rfc2822  ?0\&.1?\fR
.sp
\fB::clock::rfc2822 parse_date\fR \fIdate\fR
.sp
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIclock::rfc2822\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<


293
294
295
296
297
298
299








300
301
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIclock::rfc2822\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/cmdline/cmdline.n.

339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
Processes the set of command line options found in the list variable
named by \fIarglistVar\fR and fills in defaults for those not
specified\&.  This also generates an error message that lists the
allowed flags if an incorrect flag is specified\&. The optional
\fIusage\fR-argument contains a string to include in front of the
generated message\&. If not present it defaults to "options:"\&.
.sp
\fIargvVar\fR contains the name of the list of arguments to process\&.
If options are found the list is modified and the processed arguments
are removed from the start of the list\&.
.sp
\fIoptlist\fR contains a list of lists where each element specifies an
option in the form: \fIflag\fR \fIdefault\fR \fIcomment\fR\&.
.sp
If \fIflag\fR ends in "\&.arg" then the value is taken from the command
line\&. Otherwise it is a boolean and appears in the result if present
on the command line\&. If \fIflag\fR ends in "\&.secret", it will not be
displayed in the usage\&.







<
<
<
<







339
340
341
342
343
344
345




346
347
348
349
350
351
352
Processes the set of command line options found in the list variable
named by \fIarglistVar\fR and fills in defaults for those not
specified\&.  This also generates an error message that lists the
allowed flags if an incorrect flag is specified\&. The optional
\fIusage\fR-argument contains a string to include in front of the
generated message\&. If not present it defaults to "options:"\&.
.sp




\fIoptlist\fR contains a list of lists where each element specifies an
option in the form: \fIflag\fR \fIdefault\fR \fIcomment\fR\&.
.sp
If \fIflag\fR ends in "\&.arg" then the value is taken from the command
line\&. Otherwise it is a boolean and appears in the result if present
on the command line\&. If \fIflag\fR ends in "\&.secret", it will not be
displayed in the usage\&.
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
            {r\&.arg  ""  "use time from ref_file"}
            {t\&.arg  -1  "use specified time"}
        }
        set usage ": MyCommandName \\[options] filename \&.\&.\&.\\noptions:"

        try {
            array set params [::cmdline::getoptions argv $options $usage]

	    # Note: argv is modified now\&. The recognized options are
	    # removed from it, leaving the non-option arguments behind\&.
        } trap {CMDLINE USAGE} {msg o} {
            # Trap the usage signal, print the message, and exit the application\&.
            # Note: Other errors are not caught and passed through to higher levels!
	    puts $msg
	    exit 1
        }








<
<
<







416
417
418
419
420
421
422



423
424
425
426
427
428
429
            {r\&.arg  ""  "use time from ref_file"}
            {t\&.arg  -1  "use specified time"}
        }
        set usage ": MyCommandName \\[options] filename \&.\&.\&.\\noptions:"

        try {
            array set params [::cmdline::getoptions argv $options $usage]



        } trap {CMDLINE USAGE} {msg o} {
            # Trap the usage signal, print the message, and exit the application\&.
            # Note: Other errors are not caught and passed through to higher levels!
	    puts $msg
	    exit 1
        }

453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcmdline\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
argument processing, argv, argv0, cmdline processing, command line processing
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<




446
447
448
449
450
451
452








453
454
455
456
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcmdline\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
argument processing, argv, argv0, cmdline processing, command line processing
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/comm/comm.n.

1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
Unsupported method \fBcomm remoteid\fR was added\&.
.TP
2\&.0
\fBcomm\fR has been rewritten from scratch (but is fully compatible
with Comm 1\&.0, without the requirement to use obTcl)\&.
.PP
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







1243
1244
1245
1246
1247
1248
1249

1250
1251
1252
1253
1254
1255
1256
1257
1258
Unsupported method \fBcomm remoteid\fR was added\&.
.TP
2\&.0
\fBcomm\fR has been rewritten from scratch (but is fully compatible
with Comm 1\&.0, without the requirement to use obTcl)\&.
.PP
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
.PP
Tcl-DP provides an RPC-based remote execution interface, but is a
compiled Tcl extension\&.  See
\fIhttp://www\&.cs\&.cornell\&.edu/Info/Projects/zeno/Projects/Tcl-DP\&.html\fR\&.
.PP
Michael Doyle <miked@eolas\&.com> has code that implements the Tcl-DP
RPC interface using standard Tcl sockets, much like \fBcomm\fR\&.
The DpTcl package is available at
\fIhttp://chiselapp\&.com/user/gwlester/repository/DpTcl\fR\&.
.PP
Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net> uses
\fBcomm\fR and has built a simple nameserver as part of his Pool
library\&.  See \fIhttp://www\&.purl\&.org/net/akupries/soft/pool/index\&.htm\fR\&.
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcomm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
send(n)
.SH KEYWORDS
comm, communication, ipc, message, remote communication, remote execution, rpc, secure, send, socket, ssl, tls
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 1995-1998 The Open Group\&. All Rights Reserved\&.
Copyright (c) 2003-2004 ActiveState Corporation\&.
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<











<
<
<
<
<
<
<
<













1341
1342
1343
1344
1345
1346
1347


1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358








1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
.PP
Tcl-DP provides an RPC-based remote execution interface, but is a
compiled Tcl extension\&.  See
\fIhttp://www\&.cs\&.cornell\&.edu/Info/Projects/zeno/Projects/Tcl-DP\&.html\fR\&.
.PP
Michael Doyle <miked@eolas\&.com> has code that implements the Tcl-DP
RPC interface using standard Tcl sockets, much like \fBcomm\fR\&.


.PP
Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net> uses
\fBcomm\fR and has built a simple nameserver as part of his Pool
library\&.  See \fIhttp://www\&.purl\&.org/net/akupries/soft/pool/index\&.htm\fR\&.
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcomm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
send(n)
.SH KEYWORDS
comm, communication, ipc, message, remote communication, remote execution, rpc, secure, send, socket, ssl, tls
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 1995-1998 The Open Group\&. All Rights Reserved\&.
Copyright (c) 2003-2004 ActiveState Corporation\&.
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/comm/comm_wire.n.

423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcomm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
comm
.SH KEYWORDS
comm, communication, ipc, message, remote communication, remote execution, rpc, socket
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2005 Docs\&. Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











423
424
425
426
427
428
429








430
431
432
433
434
435
436
437
438
439
440
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcomm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
comm
.SH KEYWORDS
comm, communication, ipc, message, remote communication, remote execution, rpc, socket
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2005 Docs\&. Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/control/control.n.

405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcontrol\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
break, continue, expr, if, join, namespace, return, string, while
.SH KEYWORDS
assert, control, do, flow, no-op, structure
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<






405
406
407
408
409
410
411








412
413
414
415
416
417
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcontrol\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
break, continue, expr, if, join, namespace, return, string, while
.SH KEYWORDS
assert, control, do, flow, no-op, structure
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/coroutine/coro_auto.n.

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcoroutine\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
after, channel, coroutine, events, exit, gets, global, green threads, read, threads, update, vwait
.SH CATEGORY
Coroutine
.SH COPYRIGHT
.nf
Copyright (c) 2010-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









308
309
310
311
312
313
314








315
316
317
318
319
320
321
322
323
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcoroutine\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
after, channel, coroutine, events, exit, gets, global, green threads, read, threads, update, vwait
.SH CATEGORY
Coroutine
.SH COPYRIGHT
.nf
Copyright (c) 2010-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/coroutine/tcllib_coroutine.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'tcllib_coroutine\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2010-2015 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "coroutine" n 1\&.2 tcllib "Coroutine utilities"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'tcllib_coroutine\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2010-2015 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "coroutine" n 1\&.1\&.3 tcllib "Coroutine utilities"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
..
.BS
.SH NAME
coroutine \- Coroutine based event and IO handling
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBcoroutine  1\&.2\fR
.sp
\fBcoroutine::util after\fR \fIdelay\fR
.sp
\fBcoroutine::util await\fR \fIvarname\fR\&.\&.\&.
.sp
\fBcoroutine::util create\fR \fIarg\fR\&.\&.\&.
.sp
\fBcoroutine::util exit\fR ?\fIstatus\fR?
.sp
\fBcoroutine::util gets\fR \fIchan\fR ?\fIvarname\fR?
.sp
\fBcoroutine::util gets_safety\fR \fIchan\fR \fIlimit\fR \fIvarname\fR
.sp
\fBcoroutine::util global\fR \fIvarname\fR\&.\&.\&.
.sp
\fBcoroutine::util read\fR \fB-nonewline\fR \fIchan\fR ?\fIn\fR?
.sp
\fBcoroutine::util update\fR ?\fBidletasks\fR?
.sp
\fBcoroutine::util vwait\fR \fIvarname\fR







|











<
<







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290


291
292
293
294
295
296
297
..
.BS
.SH NAME
coroutine \- Coroutine based event and IO handling
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBcoroutine  1\&.1\&.3\fR
.sp
\fBcoroutine::util after\fR \fIdelay\fR
.sp
\fBcoroutine::util await\fR \fIvarname\fR\&.\&.\&.
.sp
\fBcoroutine::util create\fR \fIarg\fR\&.\&.\&.
.sp
\fBcoroutine::util exit\fR ?\fIstatus\fR?
.sp
\fBcoroutine::util gets\fR \fIchan\fR ?\fIvarname\fR?
.sp


\fBcoroutine::util global\fR \fIvarname\fR\&.\&.\&.
.sp
\fBcoroutine::util read\fR \fB-nonewline\fR \fIchan\fR ?\fIn\fR?
.sp
\fBcoroutine::util update\fR ?\fBidletasks\fR?
.sp
\fBcoroutine::util vwait\fR \fIvarname\fR
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
returned\&.
.TP
\fBcoroutine::util gets\fR \fIchan\fR ?\fIvarname\fR?
This command reads a line from the channel \fIchan\fR and returns it
either as its result, or, if a \fIvarname\fR was specified, writes it
to the named variable and returns the number of characters read\&.
.TP
\fBcoroutine::util gets_safety\fR \fIchan\fR \fIlimit\fR \fIvarname\fR
This command reads a line from the channel \fIchan\fR up to size \fIlimit\fR
and stores the result in \fIvarname\fR\&. Of \fIlimit\fR is reached before the
set first newline, an error is thrown\&. The command returns the number of
characters read\&.
.TP
\fBcoroutine::util global\fR \fIvarname\fR\&.\&.\&.
This command imports the named global variables of the coroutine into
the current scope\&. From the technical point of view these variables
reside in level \fB#1\fR of the Tcl stack\&. I\&.e\&. these are not the
regular global variable in to the global namespace, and each coroutine
can have their own set, independent of all others\&.
.TP







<
<
<
<
<
<







339
340
341
342
343
344
345






346
347
348
349
350
351
352
returned\&.
.TP
\fBcoroutine::util gets\fR \fIchan\fR ?\fIvarname\fR?
This command reads a line from the channel \fIchan\fR and returns it
either as its result, or, if a \fIvarname\fR was specified, writes it
to the named variable and returns the number of characters read\&.
.TP






\fBcoroutine::util global\fR \fIvarname\fR\&.\&.\&.
This command imports the named global variables of the coroutine into
the current scope\&. From the technical point of view these variables
reside in level \fB#1\fR of the Tcl stack\&. I\&.e\&. these are not the
regular global variable in to the global namespace, and each coroutine
can have their own set, independent of all others\&.
.TP
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcoroutine\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
after, channel, coroutine, events, exit, gets, global, green threads, read, threads, update, vwait
.SH CATEGORY
Coroutine
.SH COPYRIGHT
.nf
Copyright (c) 2010-2015 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









366
367
368
369
370
371
372








373
374
375
376
377
378
379
380
381
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcoroutine\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
after, channel, coroutine, events, exit, gets, global, green threads, read, threads, update, vwait
.SH CATEGORY
Coroutine
.SH COPYRIGHT
.nf
Copyright (c) 2010-2015 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/counter/counter.n.

481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcounter\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
counting, histogram, statistics, tallying
.SH CATEGORY
Data structures







<
<
<
<
<
<
<
<




481
482
483
484
485
486
487








488
489
490
491
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcounter\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
counting, histogram, statistics, tallying
.SH CATEGORY
Data structures

Changes to idoc/man/files/modules/crc/cksum.n.

381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcrc\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
crc32(n), sum(n)
.SH KEYWORDS
checksum, cksum, crc, crc32, cyclic redundancy check, data integrity, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi







<
<
<
<
<
<
<
<











381
382
383
384
385
386
387








388
389
390
391
392
393
394
395
396
397
398
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcrc\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
crc32(n), sum(n)
.SH KEYWORDS
checksum, cksum, crc, crc32, cyclic redundancy check, data integrity, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi

Changes to idoc/man/files/modules/crc/crc16.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'crc16\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002, 2017, Pat Thoyts
'\"
.TH "crc16" n 1\&.1\&.4 tcllib "Cyclic Redundancy Checks"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'crc16\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002, Pat Thoyts
'\"
.TH "crc16" n 1\&.1\&.2 tcllib "Cyclic Redundancy Checks"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
..
.BS
.SH NAME
crc16 \- Perform a 16bit Cyclic Redundancy Check
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBcrc16  ?1\&.1\&.4?\fR
.sp
\fB::crc::crc16\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fB--\fR \fImessage\fR
.sp
\fB::crc::crc16\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
.sp
\fB::crc::crc-ccitt\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fB--\fR \fImessage\fR
.sp
\fB::crc::crc-ccitt\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
.sp
\fB::crc::xmodem\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fB--\fR \fImessage\fR
.sp
\fB::crc::xmodem\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
.sp
.BE
.SH DESCRIPTION
.PP
This package provides a Tcl-only implementation of the CRC
algorithms based upon information provided at
http://www\&.microconsultants\&.com/tips/crc/crc\&.txt
There are a number of permutations available for calculating CRC
checksums and this package can handle all of them\&. Defaults are set up
for the most common cases\&.
.SH COMMANDS
.TP
\fB::crc::crc16\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fB--\fR \fImessage\fR
.TP
\fB::crc::crc16\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
.TP
\fB::crc::crc-ccitt\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fB--\fR \fImessage\fR
.TP
\fB::crc::crc-ccitt\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
.TP
\fB::crc::xmodem\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fB--\fR \fImessage\fR
.TP
\fB::crc::xmodem\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
The command takes either string data or a file name and returns a checksum
value calculated using the CRC algorithm\&. The command used sets up the
CRC polynomial, initial value and bit ordering for the desired
standard checksum calculation\&. The result is formatted
using the \fIformat\fR(n) specifier provided or as an unsigned integer







|

|



|



|














|



|



|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
..
.BS
.SH NAME
crc16 \- Perform a 16bit Cyclic Redundancy Check
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBcrc16  ?1\&.1\&.2?\fR
.sp
\fB::crc::crc16\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fImessage\fR
.sp
\fB::crc::crc16\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
.sp
\fB::crc::crc-ccitt\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fImessage\fR
.sp
\fB::crc::crc-ccitt\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
.sp
\fB::crc::xmodem\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fImessage\fR
.sp
\fB::crc::xmodem\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
.sp
.BE
.SH DESCRIPTION
.PP
This package provides a Tcl-only implementation of the CRC
algorithms based upon information provided at
http://www\&.microconsultants\&.com/tips/crc/crc\&.txt
There are a number of permutations available for calculating CRC
checksums and this package can handle all of them\&. Defaults are set up
for the most common cases\&.
.SH COMMANDS
.TP
\fB::crc::crc16\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fImessage\fR
.TP
\fB::crc::crc16\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
.TP
\fB::crc::crc-ccitt\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fImessage\fR
.TP
\fB::crc::crc-ccitt\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
.TP
\fB::crc::xmodem\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? \fImessage\fR
.TP
\fB::crc::xmodem\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? ?-implementation \fIprocname\fR? -filename \fIfile\fR
The command takes either string data or a file name and returns a checksum
value calculated using the CRC algorithm\&. The command used sets up the
CRC polynomial, initial value and bit ordering for the desired
standard checksum calculation\&. The result is formatted
using the \fIformat\fR(n) specifier provided or as an unsigned integer
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
.sp
The package provides some implementations of standard CRC polynomials
for the XMODEM, CCITT and the usual CRC-16 checksum\&. For convenience,
additional commands have been provided that make use of these
implementations\&.
.TP
--
Terminate option processing\&. Please note that using the option
termination flag is important when processing data from parameters\&. If
the binary data looks like one of the options given above then the
data will be read as an option if this marker is not included\&.
Always use the \fI--\fR option termination flag before giving the data
argument\&.
.PP
.SH EXAMPLES
.PP
.CS


% crc::crc16 -- "Hello, World!"
64077

.CE
.PP
.CS


% crc::crc-ccitt -- "Hello, World!"
26586

.CE
.PP
.CS


% crc::crc16 -format 0x%X -- "Hello, World!"
0xFA4D

.CE
.PP
.CS


% crc::crc16 -file crc16\&.tcl
51675

.CE
.SH AUTHORS
Pat Thoyts
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcrc\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
cksum(n), crc32(n), sum(n)
.SH KEYWORDS
checksum, cksum, crc, crc16, crc32, cyclic redundancy check, data integrity, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2002, 2017, Pat Thoyts

.fi







|
<
<
<
<
<






|







|







|




















<
<
<
<
<
<
<
<








|


355
356
357
358
359
360
361
362





363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405








406
407
408
409
410
411
412
413
414
415
416
.sp
The package provides some implementations of standard CRC polynomials
for the XMODEM, CCITT and the usual CRC-16 checksum\&. For convenience,
additional commands have been provided that make use of these
implementations\&.
.TP
--
Terminate option processing\&.





.PP
.SH EXAMPLES
.PP
.CS


% crc::crc16 "Hello, World!"
64077

.CE
.PP
.CS


% crc::crc-ccitt "Hello, World!"
26586

.CE
.PP
.CS


% crc::crc16 -format 0x%X "Hello, World!"
0xFA4D

.CE
.PP
.CS


% crc::crc16 -file crc16\&.tcl
51675

.CE
.SH AUTHORS
Pat Thoyts
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcrc\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
cksum(n), crc32(n), sum(n)
.SH KEYWORDS
checksum, cksum, crc, crc16, crc32, cyclic redundancy check, data integrity, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi

Changes to idoc/man/files/modules/crc/crc32.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'crc32\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002, Pat Thoyts
'\"
.TH "crc32" n 1\&.3\&.3 tcllib "Cyclic Redundancy Checks"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'crc32\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002, Pat Thoyts
'\"
.TH "crc32" n 1\&.3\&.2 tcllib "Cyclic Redundancy Checks"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
crc32 \- Perform a 32bit Cyclic Redundancy Check
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBcrc32  ?1\&.3\&.3?\fR
.sp
\fB::crc::crc32\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? [ \fI-channel chan\fR | \fI-filename file\fR | \fImessage\fR ]
.sp
\fB::crc::Crc32Init\fR ?\fIseed\fR?
.sp
\fB::crc::Crc32Update\fR \fItoken\fR \fIdata\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
crc32 \- Perform a 32bit Cyclic Redundancy Check
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBcrc32  ?1\&.3\&.2?\fR
.sp
\fB::crc::crc32\fR ?-format \fIformat\fR? ?-seed \fIvalue\fR? [ \fI-channel chan\fR | \fI-filename file\fR | \fImessage\fR ]
.sp
\fB::crc::Crc32Init\fR ?\fIseed\fR?
.sp
\fB::crc::Crc32Update\fR \fItoken\fR \fIdata\fR
.sp
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcrc\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
cksum(n), crc16(n), sum(n)
.SH KEYWORDS
checksum, cksum, crc, crc32, cyclic redundancy check, data integrity, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi







<
<
<
<
<
<
<
<











397
398
399
400
401
402
403








404
405
406
407
408
409
410
411
412
413
414
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcrc\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
cksum(n), crc16(n), sum(n)
.SH KEYWORDS
checksum, cksum, crc, crc32, cyclic redundancy check, data integrity, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi

Changes to idoc/man/files/modules/crc/sum.n.

352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcrc\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
cksum(n), crc32(n), sum(1)
.SH KEYWORDS
checksum, cksum, crc, crc32, cyclic redundancy check, data integrity, security, sum
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











352
353
354
355
356
357
358








359
360
361
362
363
364
365
366
367
368
369
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcrc\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
cksum(n), crc32(n), sum(1)
.SH KEYWORDS
checksum, cksum, crc, crc32, cyclic redundancy check, data integrity, security, sum
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/cron/cron.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'cron\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2016-2018 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "cron" n 2\&.1 tcllib "cron"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'cron\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2016 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "cron" n 2\&.0 tcllib "cron"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
cron \- Tool for automating the period callback of commands
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBcron  ?2\&.1?\fR
.sp
\fB::cron::at\fR \fI?processname?\fR \fItimecode\fR \fIcommand\fR
.sp
\fB::cron::cancel\fR \fIprocessname\fR
.sp
\fB::cron::every\fR \fIprocessname\fR \fIfrequency\fR \fIcommand\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
cron \- Tool for automating the period callback of commands
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBcron  ?2\&.0?\fR
.sp
\fB::cron::at\fR \fI?processname?\fR \fItimecode\fR \fIcommand\fR
.sp
\fB::cron::cancel\fR \fIprocessname\fR
.sp
\fB::cron::every\fR \fIprocessname\fR \fIfrequency\fR \fIcommand\fR
.sp
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
.sp
\fB::cron::task info\fR \fIprocess\fR
.sp
\fB::cron::task set\fR \fIprocess\fR \fIfield\fR \fIvalue\fR \fI?field\&.\&.\&.?\fR \fI?value\&.\&.\&.?\fR
.sp
\fB::cron::wake\fR \fI?who?\fR
.sp
\fB::cron::clock_step\fR \fImilliseconds\fR
.sp
\fB::cron::clock_delay\fR \fImilliseconds\fR
.sp
\fB::cron::clock_sleep\fR \fIseconds\fR \fI?offset?\fR
.sp
\fB::cron::clock_set\fR \fInewtime\fR
.sp
.BE
.SH DESCRIPTION







|

|







296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
.sp
\fB::cron::task info\fR \fIprocess\fR
.sp
\fB::cron::task set\fR \fIprocess\fR \fIfield\fR \fIvalue\fR \fI?field\&.\&.\&.?\fR \fI?value\&.\&.\&.?\fR
.sp
\fB::cron::wake\fR \fI?who?\fR
.sp
\fB::cron::clock_step\fR \fImilleseconds\fR
.sp
\fB::cron::clock_delay\fR \fImilleseconds\fR
.sp
\fB::cron::clock_sleep\fR \fIseconds\fR \fI?offset?\fR
.sp
\fB::cron::clock_set\fR \fInewtime\fR
.sp
.BE
.SH DESCRIPTION
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
\fB::cron::task info\fR \fIprocess\fR
Returns a dict describing \fIprocess\fR\&. See \fB::cron::task set\fR for a description of the options\&.
.TP
\fB::cron::task set\fR \fIprocess\fR \fIfield\fR \fIvalue\fR \fI?field\&.\&.\&.?\fR \fI?value\&.\&.\&.?\fR
.sp
If \fIprocess\fR does not exist, it is created\&. Options Include:
.RS
.TP
\fBcommand\fR
If \fBcoroutine\fR is black, a global command which implements this process\&. If \fBcoroutine\fR is not
black, the command to invoke to create or recreate the coroutine\&.
.TP
\fBcoroutine\fR
The name of the coroutine (if any) which implements this process\&.
.TP
\fBfrequency\fR
If -1, this process is terminated after the next event\&. If 0 this process should be called during every
idle event\&. If positive, this process should generate events periodically\&. The frequency is an integer number
of milliseconds between events\&.
.TP
\fBobject\fR
The object associated with this process or coroutine\&.
.TP
\fBscheduled\fR
If non-zero, the absolute time from the epoch (in milliseconds) that this process will trigger an event\&.
If zero, and the \fBfrequency\fR is also zero, this process is called every idle loop\&.
.TP
\fBrunning\fR
A boolean flag\&. If true it indicates the process never returned or yielded during the event loop,
and will not be called again until it does so\&.
.RE
.TP
\fB::cron::wake\fR \fI?who?\fR
Wake up cron, and arrange for its event loop to be run during the next Idle cycle\&.
.CS


::cron::wake {I just did something important}

.CE
.PP
.PP
Several utility commands are provided that are used internally within cron and for
testing cron, but may or may not be useful in the general cases\&.
.TP
\fB::cron::clock_step\fR \fImilliseconds\fR
.sp
Return a clock time absolute to the epoch which falls on the next
border between one second and the next for the value of \fImilliseconds\fR
.TP
\fB::cron::clock_delay\fR \fImilliseconds\fR
.sp
Return a clock time absolute to the epoch which falls on the next
border between one second and the next \fImilliseconds\fR in the future\&.
.TP
\fB::cron::clock_sleep\fR \fIseconds\fR \fI?offset?\fR
.sp
Return a clock time absolute to the epoch which falls exactly \fIseconds\fR in
the future\&. If offset is given it may be positive or negative, and will shift
the final time to before or after the second would flip\&.
.TP
\fB::cron::clock_set\fR \fInewtime\fR
.sp
Sets the internal clock for cron\&. This command will advance the time in 100ms
increment, triggering events, until the internal time catches up with \fInewtime\fR\&.
.sp
\fInewtime\fR is expressed in absolute milliseconds since the beginning of the epoch\&.
.PP
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIodie\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
cron, odie
.SH CATEGORY
System
.SH COPYRIGHT
.nf
Copyright (c) 2016-2018 Sean Woods <yoda@etoyoc\&.com>

.fi







<



<


<


|
|
<


<

|

<


















|


|

|


|












|









<
<
<
<
<
<
<
<






|


419
420
421
422
423
424
425

426
427
428

429
430

431
432
433
434

435
436

437
438
439

440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488








489
490
491
492
493
494
495
496
497
\fB::cron::task info\fR \fIprocess\fR
Returns a dict describing \fIprocess\fR\&. See \fB::cron::task set\fR for a description of the options\&.
.TP
\fB::cron::task set\fR \fIprocess\fR \fIfield\fR \fIvalue\fR \fI?field\&.\&.\&.?\fR \fI?value\&.\&.\&.?\fR
.sp
If \fIprocess\fR does not exist, it is created\&. Options Include:
.RS

\fBcommand\fR
If \fBcoroutine\fR is black, a global command which implements this process\&. If \fBcoroutine\fR is not
black, the command to invoke to create or recreate the coroutine\&.

\fBcoroutine\fR
The name of the coroutine (if any) which implements this process\&.

\fBfrequency\fR
If -1, this process is terminated after the next event\&. If 0 this process should be called during every
idle event\&. If positive, this process should generate events periodically\&. The frequency is an interger number
of milleseconds between events\&.

\fBobject\fR
The object associated with this process or coroutine\&.

\fBscheduled\fR
If non-zero, the absolute time from the epoch (in milleseconds) that this process will trigger an event\&.
If zero, and the \fBfrequency\fR is also zero, this process is called every idle loop\&.

\fBrunning\fR
A boolean flag\&. If true it indicates the process never returned or yielded during the event loop,
and will not be called again until it does so\&.
.RE
.TP
\fB::cron::wake\fR \fI?who?\fR
Wake up cron, and arrange for its event loop to be run during the next Idle cycle\&.
.CS


::cron::wake {I just did something important}

.CE
.PP
.PP
Several utility commands are provided that are used internally within cron and for
testing cron, but may or may not be useful in the general cases\&.
.TP
\fB::cron::clock_step\fR \fImilleseconds\fR
.sp
Return a clock time absolute to the epoch which falls on the next
border between one second and the next for the value of \fImilleseconds\fR
.TP
\fB::cron::clock_delay\fR \fImilleseconds\fR
.sp
Return a clock time absolute to the epoch which falls on the next
border between one second and the next \fImilleseconds\fR in the future\&.
.TP
\fB::cron::clock_sleep\fR \fIseconds\fR \fI?offset?\fR
.sp
Return a clock time absolute to the epoch which falls exactly \fIseconds\fR in
the future\&. If offset is given it may be positive or negative, and will shift
the final time to before or after the second would flip\&.
.TP
\fB::cron::clock_set\fR \fInewtime\fR
.sp
Sets the internal clock for cron\&. This command will advance the time in 100ms
increment, triggering events, until the internal time catches up with \fInewtime\fR\&.
.sp
\fInewtime\fR is expressed in absolute milleseconds since the beginning of the epoch\&.
.PP
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIodie\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
cron, odie
.SH CATEGORY
System
.SH COPYRIGHT
.nf
Copyright (c) 2016 Sean Woods <yoda@etoyoc\&.com>

.fi

Changes to idoc/man/files/modules/csv/csv.n.

489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcsv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
matrix, queue
.SH KEYWORDS
csv, matrix, package, queue, tcllib
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2002-2015 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











489
490
491
492
493
494
495








496
497
498
499
500
501
502
503
504
505
506
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIcsv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
matrix, queue
.SH KEYWORDS
csv, matrix, package, queue, tcllib
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2002-2015 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/debug/debug.n.

503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdebug\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
debug, log, narrative, trace
.SH CATEGORY
debugging, tracing, and logging
.SH COPYRIGHT
.nf
Copyright (c) 200?, Colin McCormack, Wub Server Utilities
Copyright (c) 2012-2014, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<










503
504
505
506
507
508
509








510
511
512
513
514
515
516
517
518
519
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdebug\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
debug, log, narrative, trace
.SH CATEGORY
debugging, tracing, and logging
.SH COPYRIGHT
.nf
Copyright (c) 200?, Colin McCormack, Wub Server Utilities
Copyright (c) 2012-2014, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/debug/debug_caller.n.

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdebug\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
debug, log, narrative, trace
.SH CATEGORY
debugging, tracing, and logging
.SH COPYRIGHT
.nf
Copyright (c) 2012-2015, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









305
306
307
308
309
310
311








312
313
314
315
316
317
318
319
320
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdebug\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
debug, log, narrative, trace
.SH CATEGORY
debugging, tracing, and logging
.SH COPYRIGHT
.nf
Copyright (c) 2012-2015, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/debug/debug_heartbeat.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'debug_heartbeat\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 200?, Colin McCormack, Wub Server Utilities
'\" Copyright (c) 2012, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "debug::heartbeat" n 1\&.0\&.1 tcllib "debug narrative"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,





|







1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'debug_heartbeat\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 200?, Colin McCormack, Wub Server Utilities
'\" Copyright (c) 2012, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "debug::heartbeat" n 1 tcllib "debug narrative"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
debug::heartbeat \- debug narrative - heartbeat
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBdebug::heartbeat  ?1\&.0\&.1?\fR
.sp
package require \fBdebug  ?1?\fR
.sp
\fBdebug\fR \fBheartbeat\fR ?\fIdelta\fR?
.sp
.BE
.SH DESCRIPTION







|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
debug::heartbeat \- debug narrative - heartbeat
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBdebug::heartbeat  ?1?\fR
.sp
package require \fBdebug  ?1?\fR
.sp
\fBdebug\fR \fBheartbeat\fR ?\fIdelta\fR?
.sp
.BE
.SH DESCRIPTION
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdebug\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
debug, heartbeat, log, narrative, trace
.SH CATEGORY
debugging, tracing, and logging
.SH COPYRIGHT
.nf
Copyright (c) 200?, Colin McCormack, Wub Server Utilities
Copyright (c) 2012, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<










305
306
307
308
309
310
311








312
313
314
315
316
317
318
319
320
321
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdebug\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
debug, heartbeat, log, narrative, trace
.SH CATEGORY
debugging, tracing, and logging
.SH COPYRIGHT
.nf
Copyright (c) 200?, Colin McCormack, Wub Server Utilities
Copyright (c) 2012, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/debug/debug_timestamp.n.

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdebug\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
debug, log, narrative, timestamps, trace
.SH CATEGORY
debugging, tracing, and logging
.SH COPYRIGHT
.nf
Copyright (c) 200?, Colin McCormack, Wub Server Utilities
Copyright (c) 2012, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<










297
298
299
300
301
302
303








304
305
306
307
308
309
310
311
312
313
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdebug\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
debug, log, narrative, timestamps, trace
.SH CATEGORY
debugging, tracing, and logging
.SH COPYRIGHT
.nf
Copyright (c) 200?, Colin McCormack, Wub Server Utilities
Copyright (c) 2012, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Deleted idoc/man/files/modules/defer/defer.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
'\"
'\" Generated from file 'defer\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2017, Roy Keene
'\"
.TH "defer" n 1 tcllib "Defered execution ala Go"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
defer \- Defered execution
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBdefer  ?1?\fR
.sp
\fB::defer::defer\fR ?\fIcommand\fR? ?\fIarg1\fR? ?\fIarg2\fR? ?\fIargN\&.\&.\&.\fR?
.sp
\fB::defer::with\fR \fIvariableList\fR \fIscript\fR
.sp
\fB::defer::autowith\fR \fIscript\fR
.sp
\fB::defer::cancel\fR ?\fIid\&.\&.\&.\fR?
.sp
.BE
.SH DESCRIPTION
The \fBdefer\fR commands allow a developer to schedule actions to happen
as part of the current variable scope terminating\&.  This is most useful
for dealing with cleanup activities\&.  Since the defered actions always
execute, and always execute in the reverse order from which the defer
statements themselves execute, the programmer can schedule the cleanup
of a resource (for example, a channel) as soon as that resource is
acquired\&.  Then, later if the procedure or lambda ends, either due to
an error, or an explicit return, the cleanup of that resource will
always occur\&.
.PP
.SH COMMANDS
.TP
\fB::defer::defer\fR ?\fIcommand\fR? ?\fIarg1\fR? ?\fIarg2\fR? ?\fIargN\&.\&.\&.\fR?
Defers execution of some code until the current variable scope
ends\&.  Each argument is concatencated together to form the script
to execute at deferal time\&.
Multiple defer statements may be used, they are executed in the order
of last-in, first-out\&.
The return value is an identifier which can be used later with
\fBdefer::cancel\fR
.TP
\fB::defer::with\fR \fIvariableList\fR \fIscript\fR
Defers execution of a script while copying the current value of some
variables, whose names specified in \fIvariableList\fR, into the script\&.
The script acts like a lambda but executes at the same level as the
\fBdefer::with\fR
call\&.
The return value is the same as
\fB::defer::defer\fR
.TP
\fB::defer::autowith\fR \fIscript\fR
The same as
\fB::defer::with\fR but uses all local variables in the variable list\&.
.TP
\fB::defer::cancel\fR ?\fIid\&.\&.\&.\fR?
Cancels the execution of a defered action\&.  The \fIid\fR argument is the
identifier returned by
\fB::defer::defer\fR,
\fB::defer::with\fR, or
\fB::defer::autowith\fR\&.
Any number of arguments may be supplied, and all of the IDs supplied
will be cancelled\&.
.PP
.SH EXAMPLES
.CS


	package require defer 1
	apply {{} {
		set fd [open /dev/null]
		defer::defer close $fd
	}}

.CE
.SH REFERENCES
.IP [1]
.PP
.SH AUTHORS
Roy Keene
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdefer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
cleanup, golang
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2017, Roy Keene

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/des/des.n.

433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdes\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
aes(n), blowfish(n), md5(n), rc4(n), sha1(n)
.SH KEYWORDS
3DES, DES, block cipher, data integrity, encryption, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











433
434
435
436
437
438
439








440
441
442
443
444
445
446
447
448
449
450
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdes\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
aes(n), blowfish(n), md5(n), rc4(n), sha1(n)
.SH KEYWORDS
3DES, DES, block cipher, data integrity, encryption, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/des/tcldes.n.

287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdes\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
des(n)
.SH KEYWORDS
3DES, DES, block cipher, data integrity, encryption, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











287
288
289
290
291
292
293








294
295
296
297
298
299
300
301
302
303
304
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdes\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
des(n)
.SH KEYWORDS
3DES, DES, block cipher, data integrity, encryption, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/des/tcldesjr.n.

287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdes\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
des(n)
.SH KEYWORDS
3DES, DES, block cipher, data integrity, encryption, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











287
288
289
290
291
292
293








294
295
296
297
298
299
300
301
302
303
304
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdes\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
des(n)
.SH KEYWORDS
3DES, DES, block cipher, data integrity, encryption, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/dicttool/dicttool.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'dicttool\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2017 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "dicttool" n 1\&.0 tcllib "Extensions to the standard "dict" command"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'dicttool\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "dicttool" n 1\&.0 tcllib "Extensions to the standard "dict" command"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
dicttool \- Dictionary Tools
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBdicttool  ?1\&.0?\fR
.sp
\fBladd\fR \fIvarname\fR \fIargs\fR
.sp
\fBldelete\fR \fIvarname\fR \fIargs\fR
.sp
\fBdict getnull\fR \fIargs\fR
.sp
\fBdict print\fR \fIdict\fR







<
<







272
273
274
275
276
277
278


279
280
281
282
283
284
285
..
.BS
.SH NAME
dicttool \- Dictionary Tools
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp


\fBladd\fR \fIvarname\fR \fIargs\fR
.sp
\fBldelete\fR \fIvarname\fR \fIargs\fR
.sp
\fBdict getnull\fR \fIargs\fR
.sp
\fBdict print\fR \fIdict\fR
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
just in case any of these slip into the core\&.
.TP
\fBladd\fR \fIvarname\fR \fIargs\fR
This command will add a new instance of each element in \fIargs\fR to \fIvarname\fR, but only if that element
is not already present\&.
.TP
\fBldelete\fR \fIvarname\fR \fIargs\fR
This command will delete all instances of each element in \fIargs\fR from \fIvarname\fR\&.
.TP
\fBdict getnull\fR \fIargs\fR
Operates like \fBdict get\fR, however if the key \fIargs\fR does not exist, it returns an empty
list instead of throwing an error\&.
.TP
\fBdict print\fR \fIdict\fR
This command will produce a string representation of \fIdict\fR, with each nested branch on







|







297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
just in case any of these slip into the core\&.
.TP
\fBladd\fR \fIvarname\fR \fIargs\fR
This command will add a new instance of each element in \fIargs\fR to \fIvarname\fR, but only if that element
is not already present\&.
.TP
\fBldelete\fR \fIvarname\fR \fIargs\fR
This command will add a delete all instances of each element in \fIargs\fR from \fIvarname\fR\&.
.TP
\fBdict getnull\fR \fIargs\fR
Operates like \fBdict get\fR, however if the key \fIargs\fR does not exist, it returns an empty
list instead of throwing an error\&.
.TP
\fBdict print\fR \fIdict\fR
This command will produce a string representation of \fIdict\fR, with each nested branch on
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdict\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
dict
.SH CATEGORY
Utilities
.SH COPYRIGHT
.nf
Copyright (c) 2017 Sean Woods <yoda@etoyoc\&.com>

.fi







<
<
<
<
<
<
<
<



|


|


353
354
355
356
357
358
359








360
361
362
363
364
365
366
367
368
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdict\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
dict
.SH CATEGORY
Utilites
.SH COPYRIGHT
.nf
Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>

.fi

Changes to idoc/man/files/modules/dns/tcllib_dns.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'tcllib_dns\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002, Pat Thoyts
'\"
.TH "dns" n 1\&.5\&.0 tcllib "Domain Name Service"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'tcllib_dns\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002, Pat Thoyts
'\"
.TH "dns" n 1\&.3\&.5 tcllib "Domain Name Service"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
dns \- Tcl Domain Name Service Client
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdns  ?1\&.5\&.0?\fR
.sp
\fB::dns::resolve\fR \fIquery\fR ?\fIoptions\fR?
.sp
\fB::dns::configure\fR ?\fIoptions\fR?
.sp
\fB::dns::name\fR \fItoken\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
dns \- Tcl Domain Name Service Client
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdns  ?1\&.3\&.5?\fR
.sp
\fB::dns::resolve\fR \fIquery\fR ?\fIoptions\fR?
.sp
\fB::dns::configure\fR ?\fIoptions\fR?
.sp
\fB::dns::name\fR \fItoken\fR
.sp
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
command can handle DNS URIs or simple domain names as a query\&.
.PP
\fINote:\fR The package defaults to using DNS over TCP
connections\&. If you wish to use UDP you will need to have the
\fBtcludp\fR package installed and have a version that
correctly handles binary data (> 1\&.0\&.4)\&.
This is available at \fIhttp://tcludp\&.sourceforge\&.net/\fR\&.
If the \fBudp\fR package is present then UDP will be used by
default\&.
.PP
\fINote:\fR The package supports DNS over TLS (RFC 7858) for
enhanced privacy of DNS queries\&. Using this feature requires
the TLS package\&.
.SH COMMANDS
.TP
\fB::dns::resolve\fR \fIquery\fR ?\fIoptions\fR?
Resolve a domain name using the \fIDNS\fR protocol\&. \fIquery\fR is
the domain name to be lookup up\&. This should be either a fully
qualified domain name or a DNS URI\&.
.RS







|
<
<
<
<
<







321
322
323
324
325
326
327
328





329
330
331
332
333
334
335
command can handle DNS URIs or simple domain names as a query\&.
.PP
\fINote:\fR The package defaults to using DNS over TCP
connections\&. If you wish to use UDP you will need to have the
\fBtcludp\fR package installed and have a version that
correctly handles binary data (> 1\&.0\&.4)\&.
This is available at \fIhttp://tcludp\&.sourceforge\&.net/\fR\&.
If the \fBudp\fR package is present then UDP will be used by default\&.





.SH COMMANDS
.TP
\fB::dns::resolve\fR \fIquery\fR ?\fIoptions\fR?
Resolve a domain name using the \fIDNS\fR protocol\&. \fIquery\fR is
the domain name to be lookup up\&. This should be either a fully
qualified domain name or a DNS URI\&.
.RS
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
\fB-recurse\fR \fIboolean\fR
Set to \fIfalse\fR if you do not want the name server to recursively
act upon your request\&. Normally set to \fItrue\fR\&.
.TP
\fB-command\fR \fIprocname\fR
Set a procedure to be called upon request completion\&. The procedure
will be passed the token as its only argument\&.
.TP
\fB-usetls\fR \fIboolean\fR
Set the \fItrue\fR to use DNS over TLS\&. This will force the use of
TCP and change the default port to 853\&. Certificate validation is
required so a source of trusted certificate authority certificates
must be provided using \fI-cafile\fR or \fI-cadir\fR\&.
.TP
\fB-cafile\fR \fIfilepath\fR
Specify a file containing a collection of trusted certificate
authority certficates\&. See the \fBupdate-ca-certificates\fR command
manual page for details or the \fB-CAfile\fR option help from
\fBopenssl\fR\&.
.TP
\fB-cadir\fR \fIdirpath\fR
Specify a directory containing trusted certificate authority
certificates\&. This must be provided if \fB-cafile\fR is not
specified for certificate validation to work when \fB-usetls\fR is
enabled\&. See the \fBopenssl\fR documentation for the required
structure of this directory\&.
.RE
.sp
.TP
\fB::dns::configure\fR ?\fIoptions\fR?
The \fB::dns::configure\fR command is used to setup the dns
package\&. The server to query, the protocol and domain search path are
all set via this command\&. If no arguments are provided then a list of







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







364
365
366
367
368
369
370



















371
372
373
374
375
376
377
\fB-recurse\fR \fIboolean\fR
Set to \fIfalse\fR if you do not want the name server to recursively
act upon your request\&. Normally set to \fItrue\fR\&.
.TP
\fB-command\fR \fIprocname\fR
Set a procedure to be called upon request completion\&. The procedure
will be passed the token as its only argument\&.



















.RE
.sp
.TP
\fB::dns::configure\fR ?\fIoptions\fR?
The \fB::dns::configure\fR command is used to setup the dns
package\&. The server to query, the protocol and domain search path are
all set via this command\&. If no arguments are provided then a list of
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
\fB-timeout\fR \fImilliseconds\fR
Set the default timeout value for DNS lookups\&. Default is 30 seconds\&.
.TP
\fB-loglevel\fR \fIlevel\fR
Set the log level used for emitting diagnostic messages from this
package\&. The default is \fIwarn\fR\&. See the \fBlog\fR package
for details of the available levels\&.
.TP
\fB-cafile\fR \fIfilepath\fR
Set the default file path to be used for the \fB-cafile\fR
option to \fBdns::resolve\fR\&.
.TP
\fB-cadir\fR \fIdirpath\fR
Set the default directory path to be used for the \fB-cadir\fR
option to \fBdns::resolve\fR\&.
.RE
.sp
.TP
\fB::dns::name\fR \fItoken\fR
Returns a list of all domain names returned as an answer to your query\&.
.sp
.TP







<
<
<
<
<
<
<
<







396
397
398
399
400
401
402








403
404
405
406
407
408
409
\fB-timeout\fR \fImilliseconds\fR
Set the default timeout value for DNS lookups\&. Default is 30 seconds\&.
.TP
\fB-loglevel\fR \fIlevel\fR
Set the log level used for emitting diagnostic messages from this
package\&. The default is \fIwarn\fR\&. See the \fBlog\fR package
for details of the available levels\&.








.RE
.sp
.TP
\fB::dns::name\fR \fItoken\fR
Returns a list of all domain names returned as an answer to your query\&.
.sp
.TP
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540

% set tok [dns::resolve 127\&.0\&.0\&.1]
::dns::1
% dns::name $tok
localhost
% dns::cleanup $tok

.CE
.PP
Using DNS over TLS (RFC 7858):
.CS


% set tok [dns::resolve www\&.tcl\&.tk -nameserver dns-tls\&.bitwiseshift\&.net  -usetls 1 -cafile /etc/ssl/certs/ca-certificates\&.crt]
::dns::12
% dns::wait $tok
ok
% dns::address $tok
104\&.25\&.119\&.118 104\&.25\&.120\&.118

.CE
.SH REFERENCES
.IP [1]
Mockapetris, P\&., "Domain Names - Concepts and Facilities",
RFC 1034, November 1987\&.
(\fIhttp://www\&.ietf\&.org/rfc/rfc1034\&.txt\fR)
.IP [2]







<
<
<
<
<
<
<
<
<
<
<
<
<







482
483
484
485
486
487
488













489
490
491
492
493
494
495

% set tok [dns::resolve 127\&.0\&.0\&.1]
::dns::1
% dns::name $tok
localhost
% dns::cleanup $tok














.CE
.SH REFERENCES
.IP [1]
Mockapetris, P\&., "Domain Names - Concepts and Facilities",
RFC 1034, November 1987\&.
(\fIhttp://www\&.ietf\&.org/rfc/rfc1034\&.txt\fR)
.IP [2]
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
"A DNS RR for specifying the location of services (DNS SRV)",
RFC 2782, February 2000,
(\fIhttp://www\&.ietf\&.org/rfc/rfc2782\&.txt\fR)
.IP [6]
Ohta, M\&. "Incremental Zone Transfer in DNS",
RFC 1995, August 1996,
(\fIhttp://www\&.ietf\&.org/rfc/rfc1995\&.txt\fR)
.IP [7]
Hu, Z\&., etc al\&.
"Specification for DNS over Transport Layer Security (TLS)",
RFC 7858, May 2016,
(\fIhttp://www\&.ietf\&.org/rfc/rfc7858\&.txt\fR)
.PP
.SH AUTHORS
Pat Thoyts
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdns\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
resolver(5)
.SH KEYWORDS
DNS, domain name service, resolver, rfc 1034, rfc 1035, rfc 1886, rfc 7858
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi







<
<
<
<
<










<
<
<
<
<
<
<
<



|







509
510
511
512
513
514
515





516
517
518
519
520
521
522
523
524
525








526
527
528
529
530
531
532
533
534
535
536
"A DNS RR for specifying the location of services (DNS SRV)",
RFC 2782, February 2000,
(\fIhttp://www\&.ietf\&.org/rfc/rfc2782\&.txt\fR)
.IP [6]
Ohta, M\&. "Incremental Zone Transfer in DNS",
RFC 1995, August 1996,
(\fIhttp://www\&.ietf\&.org/rfc/rfc1995\&.txt\fR)





.PP
.SH AUTHORS
Pat Thoyts
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdns\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
resolver(5)
.SH KEYWORDS
DNS, domain name service, resolver, rfc 1034, rfc 1035, rfc 1886
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts

.fi

Changes to idoc/man/files/modules/dns/tcllib_ip.n.

340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
.PP
This package provides a set of commands to help in parsing, displaying
and comparing internet addresses\&. The package can handle both IPv4 (1)
and IPv6 (2) address types\&.
.SH COMMANDS
.TP
\fB::ip::version\fR \fIaddress\fR
Returns the protocol version of the address (\fB4\fR or \fB6\fR),
or \fB-1\fR if the address is neither IPv4 or IPv6\&.
.TP
\fB::ip::is\fR \fIclass\fR \fIaddress\fR
Returns true if the address is a member of the given protocol
class\&. The class parameter may be either \fBipv4\fR or \fBipv6\fR
This is effectively a boolean equivalent of the \fBversion\fR
command\&. The \fIclass\fR argument may be shortened to \fB4\fR or
\fB6\fR\&.
.TP
\fB::ip::equal\fR \fIaddress\fR \fIaddress\fR
Compare two address specifications for equivalence\&. The arguments are
normalized and the address prefix determined (if a mask is
supplied)\&. The normalized addresses are then compared bit-by-bit and
the procedure returns true if they match\&.
.TP







|
|



|

|
|







340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
.PP
This package provides a set of commands to help in parsing, displaying
and comparing internet addresses\&. The package can handle both IPv4 (1)
and IPv6 (2) address types\&.
.SH COMMANDS
.TP
\fB::ip::version\fR \fIaddress\fR
Returns the protocol version of the address (4 or 6) or 0 if the
address is neither IPv4 or IPv6\&.
.TP
\fB::ip::is\fR \fIclass\fR \fIaddress\fR
Returns true if the address is a member of the given protocol
class\&. The class parameter may be either \fIipv4\fR or \fIipv6\fR
This is effectively a boolean equivalent of the \fBversion\fR
command\&. The \fIclass\fR argument may be shortened to \fI4\fR or
\fI6\fR\&.
.TP
\fB::ip::equal\fR \fIaddress\fR \fIaddress\fR
Compare two address specifications for equivalence\&. The arguments are
normalized and the address prefix determined (if a mask is
supplied)\&. The normalized addresses are then compared bit-by-bit and
the procedure returns true if they match\&.
.TP
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdns\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
inet(3), ip(7), ipv6(7)
.SH KEYWORDS
internet address, ip, ipv4, ipv6, rfc 3513
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2004, Pat Thoyts
Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com>

.fi







<
<
<
<
<
<
<
<












734
735
736
737
738
739
740








741
742
743
744
745
746
747
748
749
750
751
752
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdns\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
inet(3), ip(7), ipv6(7)
.SH KEYWORDS
internet address, ip, ipv4, ipv6, rfc 3513
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2004, Pat Thoyts
Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com>

.fi

Changes to idoc/man/files/modules/docstrip/docstrip.n.

Changes to idoc/man/files/modules/docstrip/docstrip_util.n.

Changes to idoc/man/files/modules/doctools/changelog.n.

352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
changelog, doctools, emacs
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2013 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









352
353
354
355
356
357
358








359
360
361
362
363
364
365
366
367
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
changelog, doctools, emacs
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2013 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/cvs.n.

332
333
334
335
336
337
338

339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
order, separated by commas\&.
.sp
The values are lists of the files the entry is touching\&.
.RE
.sp
.TP
\fB::doctools::cvs::toChangeLog\fR \fIevar\fR \fIcvar\fR \fIfvar\fR

The three arguments for this command are the same as the last three
arguments of the command \fB::doctools::cvs::scanLog\fR\&. This command
however expects them to be filled with information about one or more
logs\&. It takes this information and converts it into a text in the
format of a ChangeLog as accepted and generated by \fBemacs\fR\&. The
constructed text is returned as the result of the command\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
[uri, http://wiki\&.tcl\&.tk/log2changelog
.SH KEYWORDS
changelog, cvs, cvs log, emacs, log
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







>














<
<
<
<
<
<
<
<











332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353








354
355
356
357
358
359
360
361
362
363
364
order, separated by commas\&.
.sp
The values are lists of the files the entry is touching\&.
.RE
.sp
.TP
\fB::doctools::cvs::toChangeLog\fR \fIevar\fR \fIcvar\fR \fIfvar\fR
]
The three arguments for this command are the same as the last three
arguments of the command \fB::doctools::cvs::scanLog\fR\&. This command
however expects them to be filled with information about one or more
logs\&. It takes this information and converts it into a text in the
format of a ChangeLog as accepted and generated by \fBemacs\fR\&. The
constructed text is returned as the result of the command\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
[uri, http://wiki\&.tcl\&.tk/log2changelog
.SH KEYWORDS
changelog, cvs, cvs log, emacs, log
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/docidx.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'docidx\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx" n 1\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'docidx\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx" n 1\&.0\&.5 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::idx \- docidx - Processing indices
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools::idx  ?1\&.1?\fR
.sp
\fB::doctools::idx::new\fR \fIobjectName\fR ?\fB-option\fR \fIvalue\fR \&.\&.\&.?
.sp
\fB::doctools::idx::help\fR
.sp
\fB::doctools::idx::search\fR \fIpath\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::idx \- docidx - Processing indices
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools::idx  ?1\&.0\&.5?\fR
.sp
\fB::doctools::idx::new\fR \fIobjectName\fR ?\fB-option\fR \fIvalue\fR \&.\&.\&.?
.sp
\fB::doctools::idx::help\fR
.sp
\fB::doctools::idx::search\fR \fIpath\fR
.sp
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
processor coming out of the TeX world\&.
.TP
list
This engine retrieves version, section and title of the manpage from
the document\&. As such it can be used to generate a directory listing
for a set of manpages\&.
.TP
markdown
This engine generates \fIMarkdown\fR markup\&.
.TP
nroff
This engine generates nroff output, for processing by \fBnroff\fR,
or \fBgroff\fR\&. The result will be standard man pages as they are
known in the unix world\&.
.TP
null
This engine generates no outout at all\&. This can be used if one just







<
<
<







557
558
559
560
561
562
563



564
565
566
567
568
569
570
processor coming out of the TeX world\&.
.TP
list
This engine retrieves version, section and title of the manpage from
the document\&. As such it can be used to generate a directory listing
for a set of manpages\&.
.TP



nroff
This engine generates nroff output, for processing by \fBnroff\fR,
or \fBgroff\fR\&. The result will be standard man pages as they are
known in the unix world\&.
.TP
null
This engine generates no outout at all\&. This can be used if one just
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx_intro, docidx_lang_cmdref, docidx_lang_intro, docidx_lang_syntax, docidx_plugin_apiref
.SH KEYWORDS
HTML, TMML, conversion, docidx, documentation, index, keyword index, latex, manpage, markdown, markup, nroff, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<



|




|


581
582
583
584
585
586
587








588
589
590
591
592
593
594
595
596
597
598
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx_intro, docidx_lang_cmdref, docidx_lang_intro, docidx_lang_syntax, docidx_plugin_apiref
.SH KEYWORDS
HTML, TMML, conversion, docidx, documentation, index, keyword index, latex, manpage, markup, nroff, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/docidx_intro.n.

335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx_lang_cmdref, docidx_lang_faq, docidx_lang_intro, docidx_lang_syntax, docidx_plugin_apiref, doctoc_intro, doctools::idx, doctools_intro
.SH KEYWORDS
index, keyword index, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











335
336
337
338
339
340
341








342
343
344
345
346
347
348
349
350
351
352
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx_lang_cmdref, docidx_lang_faq, docidx_lang_intro, docidx_lang_syntax, docidx_plugin_apiref, doctoc_intro, doctools::idx, doctools_intro
.SH KEYWORDS
index, keyword index, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/docidx_lang_cmdref.n.

376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx_intro, docidx_lang_faq, docidx_lang_intro, docidx_lang_syntax
.SH KEYWORDS
docidx commands, docidx language, docidx markup, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











376
377
378
379
380
381
382








383
384
385
386
387
388
389
390
391
392
393
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx_intro, docidx_lang_faq, docidx_lang_intro, docidx_lang_syntax
.SH KEYWORDS
docidx commands, docidx language, docidx markup, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/docidx_lang_faq.n.

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx_lang_cmdref, docidx_lang_intro, docidx_lang_syntax
.SH KEYWORDS
docidx commands, docidx language, docidx markup, docidx syntax, examples, faq, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











305
306
307
308
309
310
311








312
313
314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx_lang_cmdref, docidx_lang_intro, docidx_lang_syntax
.SH KEYWORDS
docidx commands, docidx language, docidx markup, docidx syntax, examples, faq, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/docidx_lang_intro.n.

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311

    \&.\&.\&. [key {markup language}] \&.\&.\&.

.CE
.CS


  \&.\&.\&. [manpage thefile \\
          {file description}] \&.\&.\&.

.CE
.SS "BASIC STRUCTURE"
The most simple document which can be written in docidx is
.CS








|







297
298
299
300
301
302
303
304
305
306
307
308
309
310
311

    \&.\&.\&. [key {markup language}] \&.\&.\&.

.CE
.CS


  \&.\&.\&. [manpage thefile \\\\
          {file description}] \&.\&.\&.

.CE
.SS "BASIC STRUCTURE"
The most simple document which can be written in docidx is
.CS

450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx_intro, docidx_lang_cmdref, docidx_lang_syntax
.SH KEYWORDS
docidx commands, docidx language, docidx markup, docidx syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











450
451
452
453
454
455
456








457
458
459
460
461
462
463
464
465
466
467
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx_intro, docidx_lang_cmdref, docidx_lang_syntax
.SH KEYWORDS
docidx commands, docidx language, docidx markup, docidx syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/docidx_lang_syntax.n.

354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx_intro, docidx_lang_cmdref, docidx_lang_faq, docidx_lang_intro
.SH KEYWORDS
docidx commands, docidx language, docidx markup, docidx syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











354
355
356
357
358
359
360








361
362
363
364
365
366
367
368
369
370
371
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx_intro, docidx_lang_cmdref, docidx_lang_faq, docidx_lang_intro
.SH KEYWORDS
docidx commands, docidx language, docidx markup, docidx syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/docidx_plugin_apiref.n.

632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx_intro, docidx_lang_cmdref, docidx_lang_faq, docidx_lang_intro, docidx_lang_syntax, doctools::idx
.SH KEYWORDS
formatting engine, index, index formatter, keywords, markup, plugin, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











632
633
634
635
636
637
638








639
640
641
642
643
644
645
646
647
648
649
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx_intro, docidx_lang_cmdref, docidx_lang_faq, docidx_lang_intro, docidx_lang_syntax, doctools::idx
.SH KEYWORDS
formatting engine, index, index formatter, keywords, markup, plugin, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctoc.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'doctoc\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc" n 1\&.2 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'doctoc\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc" n 1\&.1\&.4 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::toc \- doctoc - Processing tables of contents
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools::toc  ?1\&.2?\fR
.sp
\fB::doctools::toc::new\fR \fIobjectName\fR ?\fB-option\fR \fIvalue\fR \&.\&.\&.?
.sp
\fB::doctools::toc::help\fR
.sp
\fB::doctools::toc::search\fR \fIpath\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::toc \- doctoc - Processing tables of contents
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools::toc  ?1\&.1\&.4?\fR
.sp
\fB::doctools::toc::new\fR \fIobjectName\fR ?\fB-option\fR \fIvalue\fR \&.\&.\&.?
.sp
\fB::doctools::toc::help\fR
.sp
\fB::doctools::toc::search\fR \fIpath\fR
.sp
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
processor coming out of the TeX world\&.
.TP
list
This engine retrieves version, section and title of the manpage from
the document\&. As such it can be used to generate a directory listing
for a set of manpages\&.
.TP
markdown
This engine generates \fIMarkdown\fR markup\&.
.TP
nroff
This engine generates nroff output, for processing by \fBnroff\fR,
or \fBgroff\fR\&. The result will be standard man pages as they are
known in the unix world\&.
.TP
null
This engine generates no outout at all\&. This can be used if one just







<
<
<







557
558
559
560
561
562
563



564
565
566
567
568
569
570
processor coming out of the TeX world\&.
.TP
list
This engine retrieves version, section and title of the manpage from
the document\&. As such it can be used to generate a directory listing
for a set of manpages\&.
.TP



nroff
This engine generates nroff output, for processing by \fBnroff\fR,
or \fBgroff\fR\&. The result will be standard man pages as they are
known in the unix world\&.
.TP
null
This engine generates no outout at all\&. This can be used if one just
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_intro, doctoc_lang_syntax, doctoc_plugin_apiref
.SH KEYWORDS
HTML, TMML, conversion, doctoc, documentation, latex, manpage, markdown, markup, nroff, table of contents, toc, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<



|




|


581
582
583
584
585
586
587








588
589
590
591
592
593
594
595
596
597
598
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_intro, doctoc_lang_syntax, doctoc_plugin_apiref
.SH KEYWORDS
HTML, TMML, conversion, doctoc, documentation, latex, manpage, markup, nroff, table of contents, toc, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctoc_intro.n.

334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx_intro, doctoc_lang_cmdref, doctoc_lang_faq, doctoc_lang_intro, doctoc_lang_syntax, doctoc_plugin_apiref, doctools::toc, doctools_intro
.SH KEYWORDS
markup, semantic markup, table of contents, toc
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











334
335
336
337
338
339
340








341
342
343
344
345
346
347
348
349
350
351
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx_intro, doctoc_lang_cmdref, doctoc_lang_faq, doctoc_lang_intro, doctoc_lang_syntax, doctoc_plugin_apiref, doctools::toc, doctools_intro
.SH KEYWORDS
markup, semantic markup, table of contents, toc
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctoc_lang_cmdref.n.

383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctoc_intro, doctoc_lang_faq, doctoc_lang_intro, doctoc_lang_syntax
.SH KEYWORDS
doctoc commands, doctoc language, doctoc markup, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











383
384
385
386
387
388
389








390
391
392
393
394
395
396
397
398
399
400
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctoc_intro, doctoc_lang_faq, doctoc_lang_intro, doctoc_lang_syntax
.SH KEYWORDS
doctoc commands, doctoc language, doctoc markup, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctoc_lang_faq.n.

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctoc_lang_cmdref, doctoc_lang_intro, doctoc_lang_syntax
.SH KEYWORDS
doctoc commands, doctoc language, doctoc markup, doctoc syntax, examples, faq, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











305
306
307
308
309
310
311








312
313
314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctoc_lang_cmdref, doctoc_lang_intro, doctoc_lang_syntax
.SH KEYWORDS
doctoc commands, doctoc language, doctoc markup, doctoc syntax, examples, faq, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctoc_lang_intro.n.

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311

    \&.\&.\&. [division_start {Appendix 1}] \&.\&.\&.

.CE
.CS


  \&.\&.\&. [item thefile \\
          label {file description}] \&.\&.\&.

.CE
.SS "BASIC STRUCTURE"
The most simple document which can be written in doctoc is
.CS








|







297
298
299
300
301
302
303
304
305
306
307
308
309
310
311

    \&.\&.\&. [division_start {Appendix 1}] \&.\&.\&.

.CE
.CS


  \&.\&.\&. [item thefile \\\\
          label {file description}] \&.\&.\&.

.CE
.SS "BASIC STRUCTURE"
The most simple document which can be written in doctoc is
.CS

521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_syntax
.SH KEYWORDS
doctoc commands, doctoc language, doctoc markup, doctoc syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











521
522
523
524
525
526
527








528
529
530
531
532
533
534
535
536
537
538
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_syntax
.SH KEYWORDS
doctoc commands, doctoc language, doctoc markup, doctoc syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctoc_lang_syntax.n.

342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_faq, doctoc_lang_intro
.SH KEYWORDS
doctoc commands, doctoc language, doctoc markup, doctoc syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











342
343
344
345
346
347
348








349
350
351
352
353
354
355
356
357
358
359
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_faq, doctoc_lang_intro
.SH KEYWORDS
doctoc commands, doctoc language, doctoc markup, doctoc syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctoc_plugin_apiref.n.

632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_faq, doctoc_lang_intro, doctoc_lang_syntax, doctools::toc
.SH KEYWORDS
formatting engine, markup, plugin, semantic markup, table of contents, toc, toc formatter
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











632
633
634
635
636
637
638








639
640
641
642
643
644
645
646
647
648
649
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctoc_intro, doctoc_lang_cmdref, doctoc_lang_faq, doctoc_lang_intro, doctoc_lang_syntax, doctools::toc
.SH KEYWORDS
formatting engine, markup, plugin, semantic markup, table of contents, toc, toc formatter
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctools.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'doctools\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools" n 1\&.5\&.6 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'doctools\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools" n 1\&.4\&.19 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools \- doctools - Processing documents
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools  ?1\&.5\&.6?\fR
.sp
\fB::doctools::new\fR \fIobjectName\fR ?\fIoption value\fR\&.\&.\&.?
.sp
\fB::doctools::help\fR
.sp
\fB::doctools::search\fR \fIpath\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools \- doctools - Processing documents
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBdoctools  ?1\&.4\&.19?\fR
.sp
\fB::doctools::new\fR \fIobjectName\fR ?\fIoption value\fR\&.\&.\&.?
.sp
\fB::doctools::help\fR
.sp
\fB::doctools::search\fR \fIpath\fR
.sp
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
keywords, etc\&.
.TP
xref
The value for this parameter has to be a list of triples specifying
cross-reference information\&. This information is used by the engine to
create more hyperlinks\&. Each triple is a list containing a pattern,
symbolic filename and fragment reference, in this order\&. If a pattern
is specified multiple times the last occurrence of the pattern will be
used\&.
.sp
The engine will consult the xref database when encountering specific
commands and will create a link if the relevant text matches one of
the patterns\&. No link will be created if no match was found\&. The link
will go to the uri \fBfile#fragment\fR listed in the relevant
triple, after conversion of the symbolic file name to the actual uri







|







606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
keywords, etc\&.
.TP
xref
The value for this parameter has to be a list of triples specifying
cross-reference information\&. This information is used by the engine to
create more hyperlinks\&. Each triple is a list containing a pattern,
symbolic filename and fragment reference, in this order\&. If a pattern
is specified multiple times the last occurence of the pattern will be
used\&.
.sp
The engine will consult the xref database when encountering specific
commands and will create a link if the relevant text matches one of
the patterns\&. No link will be created if no match was found\&. The link
will go to the uri \fBfile#fragment\fR listed in the relevant
triple, after conversion of the symbolic file name to the actual uri
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
the document\&. As such it can be used to generate a directory listing
for a set of manpages\&.
.TP
nroff
This engine generates nroff output, for processing by \fBnroff\fR,
or \fBgroff\fR\&. The result will be standard man pages as they are
known in the unix world\&.
.TP
markdown
This engine generates \fIMarkdown\fR markup\&. This engine supports two
parameters:
.RS
.TP
header
The value for this parameter has to be valid selfcontained markdown
markup for the body section of a markdown document\&. The default value
is the empty string\&. The value is inserted into the generated output
just before the table of contents\&.
.sp
This can be used to insert boilerplate header markup into the
generated document\&.
.TP
xref
The value for this parameter has to be a list of triples specifying
cross-reference information\&.
.sp
The full details of expected syntax and engine-internal use are
explained above for the \fIhtml\fR engine\&.
.RE
.sp
.TP
null
This engine generates no outout at all\&. This can be used if one just
wants to validate some input\&.
.TP
tmml
This engine generates TMML markup as specified by Joe English\&. The Tcl
Manpage Markup Language is a derivate of XML\&.
.TP
wiki
This engine generates Wiki markup as understood by Jean Claude
Wippler's \fBwikit\fR application\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctools_intro, doctools_lang_cmdref, doctools_lang_intro, doctools_lang_syntax, doctools_plugin_apiref
.SH KEYWORDS
HTML, TMML, conversion, documentation, manpage, markdown, markup, nroff
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















<
<
<
<
<
<
<
<



|




|


669
670
671
672
673
674
675























676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695








696
697
698
699
700
701
702
703
704
705
706
the document\&. As such it can be used to generate a directory listing
for a set of manpages\&.
.TP
nroff
This engine generates nroff output, for processing by \fBnroff\fR,
or \fBgroff\fR\&. The result will be standard man pages as they are
known in the unix world\&.























.TP
null
This engine generates no outout at all\&. This can be used if one just
wants to validate some input\&.
.TP
tmml
This engine generates TMML markup as specified by Joe English\&. The Tcl
Manpage Markup Language is a derivate of XML\&.
.TP
wiki
This engine generates Wiki markup as understood by Jean Claude
Wippler's \fBwikit\fR application\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctools_intro, doctools_lang_cmdref, doctools_lang_intro, doctools_lang_syntax, doctools_plugin_apiref
.SH KEYWORDS
HTML, TMML, conversion, documentation, manpage, markup, nroff
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctools_intro.n.

333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx_intro, doctoc_intro, doctools, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax, doctools_plugin_apiref
.SH KEYWORDS
markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











333
334
335
336
337
338
339








340
341
342
343
344
345
346
347
348
349
350
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx_intro, doctoc_intro, doctools, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax, doctools_plugin_apiref
.SH KEYWORDS
markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctools_lang_cmdref.n.

796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctools_intro, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax
.SH KEYWORDS
doctools commands, doctools language, doctools markup, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











796
797
798
799
800
801
802








803
804
805
806
807
808
809
810
811
812
813
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctools_intro, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax
.SH KEYWORDS
doctools commands, doctools language, doctools markup, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctools_lang_faq.n.

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctools_lang_cmdref, doctools_lang_intro, doctools_lang_syntax
.SH KEYWORDS
doctools commands, doctools language, doctools markup, doctools syntax, examples, faq, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











305
306
307
308
309
310
311








312
313
314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctools_lang_cmdref, doctools_lang_intro, doctools_lang_syntax
.SH KEYWORDS
doctools commands, doctools language, doctools markup, doctools syntax, examples, faq, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctools_lang_intro.n.

296
297
298
299
300
301
302
303
304
305
306
307
308
309
310

  \&.\&.\&. [list_begin enumerated] \&.\&.\&.

.CE
.CS


  \&.\&.\&. [call [cmd foo] \\
          [arg bar]] \&.\&.\&.

.CE
.CS


  \&.\&.\&. [term {complex concept}] \&.\&.\&.







|







296
297
298
299
300
301
302
303
304
305
306
307
308
309
310

  \&.\&.\&. [list_begin enumerated] \&.\&.\&.

.CE
.CS


  \&.\&.\&. [call [cmd foo] \\\\
          [arg bar]] \&.\&.\&.

.CE
.CS


  \&.\&.\&. [term {complex concept}] \&.\&.\&.
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [description]
    [vset CATEGORY doctools]
[include \&.\&./common-text/feedback\&.inc]
[manpage_end]

.CE
This also shows us that all doctools documents are split into two
parts, the \fIheader\fR and the \fIbody\fR\&. Everything coming before
[\fBdescription\fR] belongs to the header, and everything coming
after belongs to the body, with the whole document bracketed by the







|







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [description]
    [vset CATEGORY doctools]
[include \&.\&./doctools2base/include/feedback\&.inc]
[manpage_end]

.CE
This also shows us that all doctools documents are split into two
parts, the \fIheader\fR and the \fIbody\fR\&. Everything coming before
[\fBdescription\fR] belongs to the header, and everything coming
after belongs to the body, with the whole document bracketed by the
372
373
374
375
376
377
378










379
380
381
382
383
384
385
386
387
388
389
390
391
392










393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411










412
413
414
415
416
417
418
in the given order\&. Regular text is not allowed within the header\&.
.PP
Given the above a less minimal example of a document is
.CS


[manpage_begin NAME SECTION VERSION]










[\fBcopyright {YEAR AUTHOR}\fR]
[\fBtitledesc TITLE\fR]
[\fBmoddesc   MODULE_TITLE\fR]
[\fBrequire   PACKAGE VERSION\fR]
[\fBrequire   PACKAGE\fR]
[description]
[manpage_end]

.CE
Remember that the whitespace is optional\&. The document
.CS


    [manpage_begin NAME SECTION VERSION]










    [copyright {YEAR AUTHOR}][titledesc TITLE][moddesc MODULE_TITLE]
    [require PACKAGE VERSION][require PACKAGE][description]
    [vset CATEGORY doctools]
[include \&.\&./common-text/feedback\&.inc]
[manpage_end]

.CE
has the same meaning as the example before\&.
.PP
On the other hand, if \fIwhitespace\fR is present it consists not
only of any sequence of characters containing the space character,
horizontal and vertical tabs, carriage return, and newline, but it may
contain comment markup as well, in the form of the \fBcomment\fR
command\&.
.CS


[\fBcomment { \&.\&.\&. }\fR]
[manpage_begin NAME SECTION VERSION]










[copyright {YEAR AUTHOR}]
[titledesc TITLE]
[moddesc   MODULE_TITLE][\fBcomment { \&.\&.\&. }\fR]
[require   PACKAGE VERSION]
[require   PACKAGE]
[description]
[manpage_end]







>
>
>
>
>
>
>
>
>
>














>
>
>
>
>
>
>
>
>
>



|















>
>
>
>
>
>
>
>
>
>







372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
in the given order\&. Regular text is not allowed within the header\&.
.PP
Given the above a less minimal example of a document is
.CS


[manpage_begin NAME SECTION VERSION]










[\fBcopyright {YEAR AUTHOR}\fR]
[\fBtitledesc TITLE\fR]
[\fBmoddesc   MODULE_TITLE\fR]
[\fBrequire   PACKAGE VERSION\fR]
[\fBrequire   PACKAGE\fR]
[description]
[manpage_end]

.CE
Remember that the whitespace is optional\&. The document
.CS


    [manpage_begin NAME SECTION VERSION]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [copyright {YEAR AUTHOR}][titledesc TITLE][moddesc MODULE_TITLE]
    [require PACKAGE VERSION][require PACKAGE][description]
    [vset CATEGORY doctools]
[include \&.\&./doctools2base/include/feedback\&.inc]
[manpage_end]

.CE
has the same meaning as the example before\&.
.PP
On the other hand, if \fIwhitespace\fR is present it consists not
only of any sequence of characters containing the space character,
horizontal and vertical tabs, carriage return, and newline, but it may
contain comment markup as well, in the form of the \fBcomment\fR
command\&.
.CS


[\fBcomment { \&.\&.\&. }\fR]
[manpage_begin NAME SECTION VERSION]










[copyright {YEAR AUTHOR}]
[titledesc TITLE]
[moddesc   MODULE_TITLE][\fBcomment { \&.\&.\&. }\fR]
[require   PACKAGE VERSION]
[require   PACKAGE]
[description]
[manpage_end]
430
431
432
433
434
435
436










437
438
439
440
441
442
443
444
445
446
447










448
449
450
451
452
453
454
is possible to write
.CS


[\fBinclude FILE\fR]
[\fBvset VAR VALUE\fR]
[manpage_begin NAME SECTION VERSION]










[description]
[manpage_end]

.CE
Even more important, these two commands are allowed anywhere where a
markup command is allowed, without regard for any other
structure\&. I\&.e\&. for example in the header as well\&.
.CS


[manpage_begin NAME SECTION VERSION]










[\fBinclude FILE\fR]
[\fBvset VAR VALUE\fR]
[description]
[manpage_end]

.CE
The only restriction \fBinclude\fR has to obey is that the contents of







>
>
>
>
>
>
>
>
>
>











>
>
>
>
>
>
>
>
>
>







460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
is possible to write
.CS


[\fBinclude FILE\fR]
[\fBvset VAR VALUE\fR]
[manpage_begin NAME SECTION VERSION]










[description]
[manpage_end]

.CE
Even more important, these two commands are allowed anywhere where a
markup command is allowed, without regard for any other
structure\&. I\&.e\&. for example in the header as well\&.
.CS


[manpage_begin NAME SECTION VERSION]










[\fBinclude FILE\fR]
[\fBvset VAR VALUE\fR]
[description]
[manpage_end]

.CE
The only restriction \fBinclude\fR has to obey is that the contents of
471
472
473
474
475
476
477










478
479
480
481
482
483
484
the next\&. The first paragraph is automatically opened at the beginning
of the body, by \fBdescription\fR\&. In the same manner the last
paragraph automatically ends at \fBmanpage_end\fR\&.
.CS


[manpage_begin NAME SECTION VERSION]










[description]
 \&.\&.\&.
[\fBpara\fR]
 \&.\&.\&.
[\fBpara\fR]
 \&.\&.\&.
[manpage_end]







>
>
>
>
>
>
>
>
>
>







521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
the next\&. The first paragraph is automatically opened at the beginning
of the body, by \fBdescription\fR\&. In the same manner the last
paragraph automatically ends at \fBmanpage_end\fR\&.
.CS


[manpage_begin NAME SECTION VERSION]










[description]
 \&.\&.\&.
[\fBpara\fR]
 \&.\&.\&.
[\fBpara\fR]
 \&.\&.\&.
[manpage_end]
497
498
499
500
501
502
503










504
505
506
507
508
509
510
.PP
Empty sections are \fInot\fR ignored\&. We are free to (not) use
paragraphs within sections\&.
.CS


[manpage_begin NAME SECTION VERSION]










[description]
 \&.\&.\&.
[\fBsection {Section A}\fR]
 \&.\&.\&.
[para]
 \&.\&.\&.
[\fBsection {Section B}\fR]







>
>
>
>
>
>
>
>
>
>







557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
.PP
Empty sections are \fInot\fR ignored\&. We are free to (not) use
paragraphs within sections\&.
.CS


[manpage_begin NAME SECTION VERSION]










[description]
 \&.\&.\&.
[\fBsection {Section A}\fR]
 \&.\&.\&.
[para]
 \&.\&.\&.
[\fBsection {Section B}\fR]
522
523
524
525
526
527
528










529
530
531
532
533
534
535
.PP
Empty subsections are \fInot\fR ignored\&. We are free to (not) use
paragraphs within subsections\&.
.CS


[manpage_begin NAME SECTION VERSION]










[description]
 \&.\&.\&.
[section {Section A}]
 \&.\&.\&.
[\fBsubsection {Sub 1}\fR]
 \&.\&.\&.
[para]







>
>
>
>
>
>
>
>
>
>







592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
.PP
Empty subsections are \fInot\fR ignored\&. We are free to (not) use
paragraphs within subsections\&.
.CS


[manpage_begin NAME SECTION VERSION]










[description]
 \&.\&.\&.
[section {Section A}]
 \&.\&.\&.
[\fBsubsection {Sub 1}\fR]
 \&.\&.\&.
[para]
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
highlighting added\&.
It shows their use within a block of text, as the arguments of a list
item command (\fBcall\fR), and our ability to nest them\&.
.CS


  \&.\&.\&.
  [call [\fBcmd arg_def\fR] [\fBarg type\fR] [\fBarg name\fR] [\fBopt\fR [\fBarg mode\fR]]]

  Text structure\&. List element\&. Argument list\&. Automatically closes the
  previous list element\&. Specifies the data-[\fBarg type\fR] of the described
  argument of a command, its [\fBarg name\fR] and its i/o-[\fBarg mode\fR]\&. The
  latter is optional\&.
  \&.\&.\&.








|







707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
highlighting added\&.
It shows their use within a block of text, as the arguments of a list
item command (\fBcall\fR), and our ability to nest them\&.
.CS


  \&.\&.\&.
  [call [\fBcmd arg_def\fR] [\fBarg type\fR] [\fBarg name\fR]] [\fBopt\fR [\fBarg mode\fR]]]

  Text structure\&. List element\&. Argument list\&. Automatically closes the
  previous list element\&. Specifies the data-[\fBarg type\fR] of the described
  argument of a command, its [\fBarg name\fR] and its i/o-[\fBarg mode\fR]\&. The
  latter is optional\&.
  \&.\&.\&.

858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctools_intro, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_syntax
.SH KEYWORDS
doctools commands, doctools language, doctools markup, doctools syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











938
939
940
941
942
943
944








945
946
947
948
949
950
951
952
953
954
955
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctools_intro, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_syntax
.SH KEYWORDS
doctools commands, doctools language, doctools markup, doctools syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctools_lang_syntax.n.

379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctools_intro, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_intro
.SH KEYWORDS
doctools commands, doctools language, doctools markup, doctools syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











379
380
381
382
383
384
385








386
387
388
389
390
391
392
393
394
395
396
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctools_intro, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_intro
.SH KEYWORDS
doctools commands, doctools language, doctools markup, doctools syntax, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/doctools_plugin_apiref.n.

700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctools, doctools_intro, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax
.SH KEYWORDS
document, formatter, formatting engine, manpage, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











700
701
702
703
704
705
706








707
708
709
710
711
712
713
714
715
716
717
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctools, doctools_intro, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax
.SH KEYWORDS
document, formatter, formatting engine, manpage, markup, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools/mpexpand.n.

339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
expander(n), format(n), formatter(n)
.SH KEYWORDS
HTML, TMML, conversion, manpage, markup, nroff
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2003 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<












339
340
341
342
343
344
345








346
347
348
349
350
351
352
353
354
355
356
357
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
expander(n), format(n), formatter(n)
.SH KEYWORDS
HTML, TMML, conversion, manpage, markup, nroff
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2003 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2base/html_cssdefaults.n.

298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
CSS, HTML, doctools, export, plugin, style
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









298
299
300
301
302
303
304








305
306
307
308
309
310
311
312
313
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
CSS, HTML, doctools, export, plugin, style
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2base/nroff_manmacros.n.

298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
doctools, export, macros, man_macros, nroff, plugin
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









298
299
300
301
302
303
304








305
306
307
308
309
310
311
312
313
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
doctools, export, macros, man_macros, nroff, plugin
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2base/tcl_parse.n.

426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Tcl syntax, command, doctools, parser, subst, word
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









426
427
428
429
430
431
432








433
434
435
436
437
438
439
440
441
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Tcl syntax, command, doctools, parser, subst, word
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2base/tcllib_msgcat.n.

319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
catalog package, docidx, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









319
320
321
322
323
324
325








326
327
328
329
330
331
332
333
334
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
catalog package, docidx, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/export_docidx.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::docidx" n 0\&.2\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::docidx" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::idx::export::docidx \- docidx export plugin
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::idx::export::docidx  ?0\&.2\&.1?\fR
.sp
\fBexport\fR \fIserial\fR \fIconfiguration\fR
.sp
.BE
.SH DESCRIPTION
This package implements the doctools keyword index export plugin for
the generation of docidx markup\&.







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::idx::export::docidx \- docidx export plugin
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::idx::export::docidx  ?0\&.1?\fR
.sp
\fBexport\fR \fIserial\fR \fIconfiguration\fR
.sp
.BE
.SH DESCRIPTION
This package implements the doctools keyword index export plugin for
the generation of docidx markup\&.
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
docidx, doctools, export, index, serialization
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


450
451
452
453
454
455
456








457
458
459
460
461
462
463
464
465
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
docidx, doctools, export, index, serialization
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_container.n.

611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
HTML, TMML, conversion, docidx markup, documentation, formatting, generation, index, json, keyword index, latex, manpage, markup, nroff, parsing, plugin, reference, tcler's wiki, text, url, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









642
643
644
645
646
647
648








649
650
651
652
653
654
655
656
657
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
HTML, TMML, conversion, docidx markup, documentation, formatting, generation, index, json, keyword index, latex, manpage, markup, nroff, parsing, plugin, reference, tcler's wiki, text, url, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_export.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'idx_export\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export" n 0\&.2\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'idx_export\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
.de MT
.QW ""
..
.BS
.SH NAME
doctools::idx::export \- Exporting keyword indices
.SH SYNOPSIS
package require \fBdoctools::idx::export  ?0\&.2\&.1?\fR
.sp
package require \fBTcl  8\&.4\fR
.sp
package require \fBstruct::map \fR
.sp
package require \fBdoctools::idx::structure \fR
.sp
package require \fBsnit \fR
.sp
package require \fBpluginmgr \fR
.sp







|



|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
.de MT
.QW ""
..
.BS
.SH NAME
doctools::idx::export \- Exporting keyword indices
.SH SYNOPSIS
package require \fBdoctools::idx::export  ?0\&.1?\fR
.sp
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::config \fR
.sp
package require \fBdoctools::idx::structure \fR
.sp
package require \fBsnit \fR
.sp
package require \fBpluginmgr \fR
.sp
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
specified \fIvalue\fR and returns the new value of the variable\&.
.sp
If no value is specified it simply returns the current value, without
changing it\&.
.sp
Note that while the user can set the predefined configuration
variables \fBuser\fR and \fBformat\fR doing so will have no
effect, these values will be internally overridden when invoking an
import plugin\&.
.TP
\fIobjectName\fR \fBconfig unset\fR \fIpattern\fR\&.\&.\&.
This method unsets all configuration variables matching the specified
glob \fIpattern\fRs\&. If no pattern is specified it will unset all
currently defined configuration variables\&.
.PP







|







486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
specified \fIvalue\fR and returns the new value of the variable\&.
.sp
If no value is specified it simply returns the current value, without
changing it\&.
.sp
Note that while the user can set the predefined configuration
variables \fBuser\fR and \fBformat\fR doing so will have no
effect, these values will be internally overriden when invoking an
import plugin\&.
.TP
\fIobjectName\fR \fBconfig unset\fR \fIpattern\fR\&.\&.\&.
This method unsets all configuration variables matching the specified
glob \fIpattern\fRs\&. If no pattern is specified it will unset all
currently defined configuration variables\&.
.PP
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
HTML, conversion, docidx, documentation, export, formatting, generation, index, json, keyword index, manpage, markup, nroff, plugin, reference, tcler's wiki, text, url, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


656
657
658
659
660
661
662








663
664
665
666
667
668
669
670
671
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
HTML, conversion, docidx, documentation, export, formatting, generation, index, json, keyword index, manpage, markup, nroff, plugin, reference, tcler's wiki, text, url, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_export_html.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::html" n 0\&.2 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::html" n 0\&.2 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
HTML, doctools, export, index, serialization
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


535
536
537
538
539
540
541








542
543
544
545
546
547
548
549
550
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
HTML, doctools, export, index, serialization
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_export_json.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::json" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::json" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
JSON, doctools, export, index, serialization
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


467
468
469
470
471
472
473








474
475
476
477
478
479
480
481
482
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
JSON, doctools, export, index, serialization
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_export_nroff.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::nroff" n 0\&.3 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::nroff" n 0\&.3 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
doctools, export, index, nroff, serialization
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


418
419
420
421
422
423
424








425
426
427
428
429
430
431
432
433
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
doctools, export, index, nroff, serialization
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_export_text.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::text" n 0\&.2 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::text" n 0\&.2 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
doctools, export, index, plain text, serialization
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


402
403
404
405
406
407
408








409
410
411
412
413
414
415
416
417
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
doctools, export, index, plain text, serialization
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_export_wiki.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::wiki" n 0\&.2 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::export::wiki" n 0\&.2 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
doctools, export, index, serialization, wiki
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


415
416
417
418
419
420
421








422
423
424
425
426
427
428
429
430
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
doctools, export, index, serialization, wiki
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_import.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'idx_import\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::import" n 0\&.2\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'idx_import\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::import" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
.de MT
.QW ""
..
.BS
.SH NAME
doctools::idx::import \- Importing keyword indices
.SH SYNOPSIS
package require \fBdoctools::idx::import  ?0\&.2\&.1?\fR
.sp
package require \fBTcl  8\&.4\fR
.sp
package require \fBstruct::map \fR
.sp
package require \fBdoctools::idx::structure \fR
.sp
package require \fBsnit \fR
.sp
package require \fBpluginmgr \fR
.sp







|



|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
.de MT
.QW ""
..
.BS
.SH NAME
doctools::idx::import \- Importing keyword indices
.SH SYNOPSIS
package require \fBdoctools::idx::import  ?0\&.1?\fR
.sp
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::config \fR
.sp
package require \fBdoctools::idx::structure \fR
.sp
package require \fBsnit \fR
.sp
package require \fBpluginmgr \fR
.sp
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
specified \fIvalue\fR and returns the new value of the variable\&.
.sp
If no value is specified it simply returns the current value, without
changing it\&.
.sp
Note that while the user can set the predefined configuration
variables \fBuser\fR and \fBformat\fR doing so will have no
effect, these values will be internally overridden when invoking an
import plugin\&.
.TP
\fIobjectName\fR \fBconfig unset\fR \fIpattern\fR\&.\&.\&.
This method unsets all configuration variables matching the specified
glob \fIpattern\fRs\&. If no pattern is specified it will unset all
currently defined configuration variables\&.
.TP







|







501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
specified \fIvalue\fR and returns the new value of the variable\&.
.sp
If no value is specified it simply returns the current value, without
changing it\&.
.sp
Note that while the user can set the predefined configuration
variables \fBuser\fR and \fBformat\fR doing so will have no
effect, these values will be internally overriden when invoking an
import plugin\&.
.TP
\fIobjectName\fR \fBconfig unset\fR \fIpattern\fR\&.\&.\&.
This method unsets all configuration variables matching the specified
glob \fIpattern\fRs\&. If no pattern is specified it will unset all
currently defined configuration variables\&.
.TP
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
conversion, docidx, documentation, import, index, json, keyword index, manpage, markup, parsing, plugin, reference, url
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


735
736
737
738
739
740
741








742
743
744
745
746
747
748
749
750
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
conversion, docidx, documentation, import, index, json, keyword index, manpage, markup, parsing, plugin, reference, url
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_import_json.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::import::json" n 0\&.2\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::import::json" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
doctools::idx::import::json \- JSON import plugin
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBdoctools::idx::import::json  ?0\&.2\&.1?\fR
.sp
package require \fBdoctools::idx::structure \fR
.sp
package require \fBjson \fR
.sp
\fBimport\fR \fIstring\fR \fIconfiguration\fR
.sp







|

|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
doctools::idx::import::json \- JSON import plugin
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::idx::import::json  ?0\&.1?\fR
.sp
package require \fBdoctools::idx::structure \fR
.sp
package require \fBjson \fR
.sp
\fBimport\fR \fIstring\fR \fIconfiguration\fR
.sp
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
JSON, deserialization, doctools, import, index
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


444
445
446
447
448
449
450








451
452
453
454
455
456
457
458
459
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
JSON, deserialization, doctools, import, index
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_introduction.n.

369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389

                                    ~~~~~~~~~~~ doctools::idx ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::idx::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::idx::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
struct::map             =                         |     |    |                  =       doctools::include       struct::map      fileutil::paths
                        |                         |     |    |                  |
                doctools::idx::export::<*>        |     |    |          doctools::idx::import::<*>
                        docidx                    |     |    |                  docidx, json
                        json                      |     |    |                  |           \\
                        html                      |     |    |          doctools::idx::parse \\
                        nroff                     |     |    |                  |             \\
                        wiki                      |     |    |  +---------------+              json
                        text                      |     |    |  |               |
                                                doctools::idx::structure        |
                                                                                |
                                                                        +-------+---------------+
                                                                        |                       |
          doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat







|



|
|
|







369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389

                                    ~~~~~~~~~~~ doctools::idx ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::idx::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::idx::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
doctools::config        =                         |     |    |                  =       doctools::include       doctools::config doctools::paths
                        |                         |     |    |                  |
                doctools::idx::export::<*>        |     |    |          doctools::idx::import::<*>
                        docidx                    |     |    |                  docidx, json
                        json                      |     |    |                  |           \\\\
                        html                      |     |    |          doctools::idx::parse \\\\
                        nroff                     |     |    |                  |             \\\\
                        wiki                      |     |    |  +---------------+              json
                        text                      |     |    |  |               |
                                                doctools::idx::structure        |
                                                                                |
                                                                        +-------+---------------+
                                                                        |                       |
          doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx_intro, doctoc_intro, doctools, doctools2doc_introduction, doctools2toc_introduction, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax, doctools_plugin_apiref
.SH KEYWORDS
conversion, formatting, index, keyword index, markup, parsing, plugin, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











403
404
405
406
407
408
409








410
411
412
413
414
415
416
417
418
419
420
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx_intro, doctoc_intro, doctools, doctools2doc_introduction, doctools2toc_introduction, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax, doctools_plugin_apiref
.SH KEYWORDS
conversion, formatting, index, keyword index, markup, parsing, plugin, semantic markup
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_msgcat_c.n.

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
C, catalog package, docidx, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









307
308
309
310
311
312
313








314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
C, catalog package, docidx, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_msgcat_de.n.

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
DE, catalog package, docidx, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









307
308
309
310
311
312
313








314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
DE, catalog package, docidx, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_msgcat_en.n.

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EN, catalog package, docidx, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









307
308
309
310
311
312
313








314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EN, catalog package, docidx, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_msgcat_fr.n.

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
FR, catalog package, docidx, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









307
308
309
310
311
312
313








314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
FR, catalog package, docidx, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_parse.n.

396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
The error code will be a list, each element describing a single error
found in the input\&. The list has at least one element, possibly more\&.
.IP [2]
Each error element will be a list containing six strings describing an
error in detail\&. The strings will be
.RS
.IP [1]
The path of the file the error occurred in\&. This may be empty\&.
.IP [2]
The range of the token the error was found at\&. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file)\&. Offsets
are counted from zero\&.
.IP [3]
The line the first character after the error is on\&.







|







396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
The error code will be a list, each element describing a single error
found in the input\&. The list has at least one element, possibly more\&.
.IP [2]
Each error element will be a list containing six strings describing an
error in detail\&. The strings will be
.RS
.IP [1]
The path of the file the error occured in\&. This may be empty\&.
.IP [2]
The range of the token the error was found at\&. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file)\&. Offsets
are counted from zero\&.
.IP [3]
The line the first character after the error is on\&.
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
docidx, doctools, lexer, parser
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









523
524
525
526
527
528
529








530
531
532
533
534
535
536
537
538
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
docidx, doctools, lexer, parser
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/idx_structure.n.

420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
deserialization, docidx, doctools, serialization
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









451
452
453
454
455
456
457








458
459
460
461
462
463
464
465
466
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
deserialization, docidx, doctools, serialization
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2idx/import_docidx.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::import::docidx" n 0\&.2\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::idx::import::docidx" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
doctools::idx::import::docidx \- docidx import plugin
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBdoctools::idx::import::docidx  ?0\&.2\&.1?\fR
.sp
package require \fBdoctools::idx::parse \fR
.sp
package require \fBdoctools::idx::structure \fR
.sp
package require \fBdoctools::msgcat \fR
.sp







|

|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
doctools::idx::import::docidx \- docidx import plugin
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::idx::import::docidx  ?0\&.1?\fR
.sp
package require \fBdoctools::idx::parse \fR
.sp
package require \fBdoctools::idx::structure \fR
.sp
package require \fBdoctools::msgcat \fR
.sp
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|


|







395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
.RE
.IP [4]
The \fItype\fR of a reference can be one of two values,
.RS
.TP
\fBmanpage\fR
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for\&.
.TP
\fBurl\fR
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc\&.
.RE
.RE
.TP
canonical serialization
The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
deserialization, docidx, doctools, import, index
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


426
427
428
429
430
431
432








433
434
435
436
437
438
439
440
441
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
deserialization, docidx, doctools, import, index
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/export_doctoc.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::doctoc" n 0\&.2\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::doctoc" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::toc::export::doctoc \- doctoc export plugin
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::toc::export::doctoc  ?0\&.2\&.1?\fR
.sp
\fBexport\fR \fIserial\fR \fIconfiguration\fR
.sp
.BE
.SH DESCRIPTION
This package implements the doctools table of contents export plugin
for the generation of doctoc markup\&.







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
doctools::toc::export::doctoc \- doctoc export plugin
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::toc::export::doctoc  ?0\&.1?\fR
.sp
\fBexport\fR \fIserial\fR \fIconfiguration\fR
.sp
.BE
.SH DESCRIPTION
This package implements the doctools table of contents export plugin
for the generation of doctoc markup\&.
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
doctoc, doctools, export, serialization, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


477
478
479
480
481
482
483








484
485
486
487
488
489
490
491
492
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
doctoc, doctools, export, serialization, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/import_doctoc.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::import::doctoc" n 0\&.2\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::import::doctoc" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
doctools::toc::import::doctoc \- doctoc import plugin
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBdoctools::toc::import::doctoc  ?0\&.2\&.1?\fR
.sp
package require \fBdoctools::toc::parse \fR
.sp
package require \fBdoctools::toc::structure \fR
.sp
package require \fBdoctools::msgcat \fR
.sp







|

|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
doctools::toc::import::doctoc \- doctoc import plugin
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::toc::import::doctoc  ?0\&.1?\fR
.sp
package require \fBdoctools::toc::parse \fR
.sp
package require \fBdoctools::toc::structure \fR
.sp
package require \fBdoctools::msgcat \fR
.sp
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
deserialization, doctoc, doctools, import, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


454
455
456
457
458
459
460








461
462
463
464
465
466
467
468
469
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
deserialization, doctoc, doctools, import, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_container.n.

457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
removed however, only its children\&.
.sp
The result of the method is the empty string\&.
.TP
\fIobjectName\fR \fBup\fR \fIid\fR
This method returns the handle of the parent for the element
identified by its handle \fIid\fR, or the empty string if \fIid\fR
referred to the root element\&.
.TP
\fIobjectName\fR \fBnext\fR \fIid\fR
This method returns the handle of the right sibling for the element
identified by its handle \fIid\fR, or the handle of the parent if the
element has no right sibling, or the empty string if \fIid\fR referred
to the root element\&.
.TP
\fIobjectName\fR \fBprev\fR \fIid\fR
This method returns the handle of the left sibling for the element
identified by its handle \fIid\fR, or the handle of the parent if the
element has no left sibling, or the empty string if \fIid\fR referred
to the root element\&.
.TP
\fIobjectName\fR \fBchild\fR \fIid\fR \fIlabel\fR ?\fI\&.\&.\&.\fR?
This method returns the handle of a child of the element identified by
its handle \fIid\fR\&. The child itself is identified by a series of
labels\&.
.TP







|




|





|







457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
removed however, only its children\&.
.sp
The result of the method is the empty string\&.
.TP
\fIobjectName\fR \fBup\fR \fIid\fR
This method returns the handle of the parent for the element
identified by its handle \fIid\fR, or the empty string if \fIid\fR
refered to the root element\&.
.TP
\fIobjectName\fR \fBnext\fR \fIid\fR
This method returns the handle of the right sibling for the element
identified by its handle \fIid\fR, or the handle of the parent if the
element has no right sibling, or the empty string if \fIid\fR refered
to the root element\&.
.TP
\fIobjectName\fR \fBprev\fR \fIid\fR
This method returns the handle of the left sibling for the element
identified by its handle \fIid\fR, or the handle of the parent if the
element has no left sibling, or the empty string if \fIid\fR refered
to the root element\&.
.TP
\fIobjectName\fR \fBchild\fR \fIid\fR \fIlabel\fR ?\fI\&.\&.\&.\fR?
This method returns the handle of a child of the element identified by
its handle \fIid\fR\&. The child itself is identified by a series of
labels\&.
.TP
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
HTML, TMML, conversion, doctoc markup, documentation, formatting, generation, json, latex, markup, nroff, parsing, plugin, reference, table, table of contents, tcler's wiki, text, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









725
726
727
728
729
730
731








732
733
734
735
736
737
738
739
740
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
HTML, TMML, conversion, doctoc markup, documentation, formatting, generation, json, latex, markup, nroff, parsing, plugin, reference, table, table of contents, tcler's wiki, text, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_export.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'toc_export\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export" n 0\&.2\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'toc_export\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
.de MT
.QW ""
..
.BS
.SH NAME
doctools::toc::export \- Exporting tables of contents
.SH SYNOPSIS
package require \fBdoctools::toc::export  ?0\&.2\&.1?\fR
.sp
package require \fBTcl  8\&.4\fR
.sp
package require \fBstruct::map \fR
.sp
package require \fBdoctools::toc::structure \fR
.sp
package require \fBsnit \fR
.sp
package require \fBpluginmgr \fR
.sp







|



|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
.de MT
.QW ""
..
.BS
.SH NAME
doctools::toc::export \- Exporting tables of contents
.SH SYNOPSIS
package require \fBdoctools::toc::export  ?0\&.1?\fR
.sp
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::config \fR
.sp
package require \fBdoctools::toc::structure \fR
.sp
package require \fBsnit \fR
.sp
package require \fBpluginmgr \fR
.sp
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
specified \fIvalue\fR and returns the new value of the variable\&.
.sp
If no value is specified it simply returns the current value, without
changing it\&.
.sp
Note that while the user can set the predefined configuration
variables \fBuser\fR and \fBformat\fR doing so will have no
effect, these values will be internally overridden when invoking an
import plugin\&.
.TP
\fIobjectName\fR \fBconfig unset\fR \fIpattern\fR\&.\&.\&.
This method unsets all configuration variables matching the specified
glob \fIpattern\fRs\&. If no pattern is specified it will unset all
currently defined configuration variables\&.
.PP







|







477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
specified \fIvalue\fR and returns the new value of the variable\&.
.sp
If no value is specified it simply returns the current value, without
changing it\&.
.sp
Note that while the user can set the predefined configuration
variables \fBuser\fR and \fBformat\fR doing so will have no
effect, these values will be internally overriden when invoking an
import plugin\&.
.TP
\fIobjectName\fR \fBconfig unset\fR \fIpattern\fR\&.\&.\&.
This method unsets all configuration variables matching the specified
glob \fIpattern\fRs\&. If no pattern is specified it will unset all
currently defined configuration variables\&.
.PP
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
HTML, conversion, doctoc, documentation, export, formatting, generation, json, manpage, markup, nroff, plugin, reference, table, table of contents, tcler's wiki, text, url, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


673
674
675
676
677
678
679








680
681
682
683
684
685
686
687
688
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
HTML, conversion, doctoc, documentation, export, formatting, generation, json, manpage, markup, nroff, plugin, reference, table, table of contents, tcler's wiki, text, url, wiki
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_export_html.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::html" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::html" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
HTML, doctools, export, serialization, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


527
528
529
530
531
532
533








534
535
536
537
538
539
540
541
542
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
HTML, doctools, export, serialization, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_export_json.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::json" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::json" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
JSON, doctools, export, serialization, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


515
516
517
518
519
520
521








522
523
524
525
526
527
528
529
530
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
JSON, doctools, export, serialization, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_export_nroff.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::nroff" n 0\&.2 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::nroff" n 0\&.2 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
doctools, export, nroff, serialization, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


446
447
448
449
450
451
452








453
454
455
456
457
458
459
460
461
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
doctools, export, nroff, serialization, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_export_text.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::text" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::text" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
doctools, export, plain text, serialization, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


429
430
431
432
433
434
435








436
437
438
439
440
441
442
443
444
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
doctools, export, plain text, serialization, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_export_wiki.n.

1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::wiki" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.


|







1
2
3
4
5
6
7
8
9
10
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::export::wiki" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
doctools, export, serialization, table of contents, toc, wiki
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


435
436
437
438
439
440
441








442
443
444
445
446
447
448
449
450
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
doctools, export, serialization, table of contents, toc, wiki
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_import.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'toc_import\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::import" n 0\&.2\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'toc_import\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::import" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
.de MT
.QW ""
..
.BS
.SH NAME
doctools::toc::import \- Importing keyword indices
.SH SYNOPSIS
package require \fBdoctools::toc::import  ?0\&.2\&.1?\fR
.sp
package require \fBTcl  8\&.4\fR
.sp
package require \fBstruct::map \fR
.sp
package require \fBdoctools::toc::structure \fR
.sp
package require \fBsnit \fR
.sp
package require \fBpluginmgr \fR
.sp







|



|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
.de MT
.QW ""
..
.BS
.SH NAME
doctools::toc::import \- Importing keyword indices
.SH SYNOPSIS
package require \fBdoctools::toc::import  ?0\&.1?\fR
.sp
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::config \fR
.sp
package require \fBdoctools::toc::structure \fR
.sp
package require \fBsnit \fR
.sp
package require \fBpluginmgr \fR
.sp
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
specified \fIvalue\fR and returns the new value of the variable\&.
.sp
If no value is specified it simply returns the current value, without
changing it\&.
.sp
Note that while the user can set the predefined configuration
variables \fBuser\fR and \fBformat\fR doing so will have no
effect, these values will be internally overridden when invoking an
import plugin\&.
.TP
\fIobjectName\fR \fBconfig unset\fR \fIpattern\fR\&.\&.\&.
This method unsets all configuration variables matching the specified
glob \fIpattern\fRs\&. If no pattern is specified it will unset all
currently defined configuration variables\&.
.TP







|







492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
specified \fIvalue\fR and returns the new value of the variable\&.
.sp
If no value is specified it simply returns the current value, without
changing it\&.
.sp
Note that while the user can set the predefined configuration
variables \fBuser\fR and \fBformat\fR doing so will have no
effect, these values will be internally overriden when invoking an
import plugin\&.
.TP
\fIobjectName\fR \fBconfig unset\fR \fIpattern\fR\&.\&.\&.
This method unsets all configuration variables matching the specified
glob \fIpattern\fRs\&. If no pattern is specified it will unset all
currently defined configuration variables\&.
.TP
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
conversion, doctoc, documentation, import, json, manpage, markup, parsing, plugin, reference, table, table of contents, url
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


754
755
756
757
758
759
760








761
762
763
764
765
766
767
768
769
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
conversion, doctoc, documentation, import, json, manpage, markup, parsing, plugin, reference, table, table of contents, url
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_import_json.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::import::json" n 0\&.2\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'plugin\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "doctools::toc::import::json" n 0\&.1 tcllib "Documentation tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
doctools::toc::import::json \- JSON import plugin
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBdoctools::toc::import::json  ?0\&.2\&.1?\fR
.sp
package require \fBdoctools::toc::structure \fR
.sp
package require \fBjson \fR
.sp
\fBimport\fR \fIstring\fR \fIconfiguration\fR
.sp







|

|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
doctools::toc::import::json \- JSON import plugin
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBdoctools::toc::import::json  ?0\&.1?\fR
.sp
package require \fBdoctools::toc::structure \fR
.sp
package require \fBjson \fR
.sp
\fBimport\fR \fIstring\fR \fIconfiguration\fR
.sp
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
JSON, deserialization, doctools, import, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


492
493
494
495
496
497
498








499
500
501
502
503
504
505
506
507
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
JSON, deserialization, doctools, import, table of contents, toc
.SH CATEGORY
Text formatter plugin
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_introduction.n.

369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389

                                    ~~~~~~~~~~~ doctools::toc ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::toc::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::toc::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
struct:map              =                         |     |    |                  =       doctools::include       struct::map      fileutil::paths
                        |                         |     |    |                  |
                doctools::toc::export::<*>        |     |    |          doctools::toc::import::<*>
                        doctoc                    |     |    |                  doctoc, json
                        json                      |     |    |                  |           \\
                        html                      |     |    |          doctools::toc::parse \\
                        nroff                     |     |    |                  |             \\
                        wiki                      |     |    |  +---------------+              json
                        text                      |     |    |  |               |
                                                doctools::toc::structure        |
                                                                                |
                                                                        +-------+---------------+
                                                                        |                       |
          doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat







|



|
|
|







369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389

                                    ~~~~~~~~~~~ doctools::toc ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::toc::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::toc::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
doctools::config        =                         |     |    |                  =       doctools::include       doctools::config doctools::paths
                        |                         |     |    |                  |
                doctools::toc::export::<*>        |     |    |          doctools::toc::import::<*>
                        doctoc                    |     |    |                  doctoc, json
                        json                      |     |    |                  |           \\\\
                        html                      |     |    |          doctools::toc::parse \\\\
                        nroff                     |     |    |                  |             \\\\
                        wiki                      |     |    |  +---------------+              json
                        text                      |     |    |  |               |
                                                doctools::toc::structure        |
                                                                                |
                                                                        +-------+---------------+
                                                                        |                       |
          doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
doctoc_intro, doctools, doctools2doc_introduction, doctools2idx_introduction, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax, doctools_plugin_apiref
.SH KEYWORDS
contents, conversion, formatting, markup, parsing, plugin, semantic markup, table of contents
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











403
404
405
406
407
408
409








410
411
412
413
414
415
416
417
418
419
420
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
doctoc_intro, doctools, doctools2doc_introduction, doctools2idx_introduction, doctools_lang_cmdref, doctools_lang_faq, doctools_lang_intro, doctools_lang_syntax, doctools_plugin_apiref
.SH KEYWORDS
contents, conversion, formatting, markup, parsing, plugin, semantic markup, table of contents
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_msgcat_c.n.

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
C, catalog package, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









307
308
309
310
311
312
313








314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
C, catalog package, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_msgcat_de.n.

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
DE, catalog package, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









307
308
309
310
311
312
313








314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
DE, catalog package, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_msgcat_en.n.

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EN, catalog package, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









307
308
309
310
311
312
313








314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EN, catalog package, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_msgcat_fr.n.

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
FR, catalog package, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









307
308
309
310
311
312
313








314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
FR, catalog package, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_parse.n.

396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
The error code will be a list, each element describing a single error
found in the input\&. The list has at least one element, possibly more\&.
.IP [2]
Each error element will be a list containing six strings describing an
error in detail\&. The strings will be
.RS
.IP [1]
The path of the file the error occurred in\&. This may be empty\&.
.IP [2]
The range of the token the error was found at\&. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file)\&. Offsets
are counted from zero\&.
.IP [3]
The line the first character after the error is on\&.







|







396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
The error code will be a list, each element describing a single error
found in the input\&. The list has at least one element, possibly more\&.
.IP [2]
Each error element will be a list containing six strings describing an
error in detail\&. The strings will be
.RS
.IP [1]
The path of the file the error occured in\&. This may be empty\&.
.IP [2]
The range of the token the error was found at\&. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file)\&. Offsets
are counted from zero\&.
.IP [3]
The line the first character after the error is on\&.
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
doctoc, doctools, lexer, parser
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









551
552
553
554
555
556
557








558
559
560
561
562
563
564
565
566
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
doctoc, doctools, lexer, parser
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/doctools2toc/toc_structure.n.

496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
deserialization, doctoc, doctools, serialization
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









496
497
498
499
500
501
502








503
504
505
506
507
508
509
510
511
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
deserialization, doctoc, doctools, serialization
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/dtplite/pkg_dtplite.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pkg_dtplite\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004-2013 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "dtplite" n 1\&.3\&.1 tcllib "Documentation toolbox"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pkg_dtplite\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004-2013 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "dtplite" n 1\&.3 tcllib "Documentation toolbox"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
.de MT
.QW ""
..
.BS
.SH NAME
dtplite \- Lightweight DocTools Markup Processor
.SH SYNOPSIS
package require \fBdtplite  ?1\&.3\&.1?\fR
.sp
\fBdtplite\fR \fB-o\fR \fIoutput\fR ?options? \fIformat\fR \fIinputfile\fR
.sp
\fBdtplite\fR \fBvalidate\fR \fIinputfile\fR
.sp
\fBdtplite\fR \fB-o\fR \fIoutput\fR ?options? \fIformat\fR \fIinputdirectory\fR
.sp







|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
.de MT
.QW ""
..
.BS
.SH NAME
dtplite \- Lightweight DocTools Markup Processor
.SH SYNOPSIS
package require \fBdtplite  ?1\&.3?\fR
.sp
\fBdtplite\fR \fB-o\fR \fIoutput\fR ?options? \fIformat\fR \fIinputfile\fR
.sp
\fBdtplite\fR \fBvalidate\fR \fIinputfile\fR
.sp
\fBdtplite\fR \fB-o\fR \fIoutput\fR ?options? \fIformat\fR \fIinputdirectory\fR
.sp
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
docidx introduction, doctoc introduction, doctools introduction
.SH KEYWORDS
HTML, TMML, conversion, docidx, doctoc, doctools, manpage, markup, nroff
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2004-2013 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











612
613
614
615
616
617
618








619
620
621
622
623
624
625
626
627
628
629
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdoctools\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
docidx introduction, doctoc introduction, doctools introduction
.SH KEYWORDS
HTML, TMML, conversion, docidx, doctoc, doctools, manpage, markup, nroff
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) 2004-2013 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/fileutil/fileutil.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'fileutil\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "fileutil" n 1\&.16 tcllib "file utilities"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'fileutil\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "fileutil" n 1\&.15 tcllib "file utilities"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
fileutil \- Procedures implementing some file utilities
.SH SYNOPSIS
package require \fBTcl  8\fR
.sp
package require \fBfileutil  ?1\&.16?\fR
.sp
\fB::fileutil::lexnormalize\fR \fIpath\fR
.sp
\fB::fileutil::fullnormalize\fR \fIpath\fR
.sp
\fB::fileutil::test\fR \fIpath\fR \fIcodes\fR ?\fImsgvar\fR? ?\fIlabel\fR?
.sp







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
fileutil \- Procedures implementing some file utilities
.SH SYNOPSIS
package require \fBTcl  8\fR
.sp
package require \fBfileutil  ?1\&.15?\fR
.sp
\fB::fileutil::lexnormalize\fR \fIpath\fR
.sp
\fB::fileutil::fullnormalize\fR \fIpath\fR
.sp
\fB::fileutil::test\fR \fIpath\fR \fIcodes\fR ?\fImsgvar\fR? ?\fIlabel\fR?
.sp
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
cat, file utilities, grep, temp file, test, touch, type
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<




782
783
784
785
786
787
788








789
790
791
792
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
cat, file utilities, grep, temp file, test, touch, type
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/fileutil/multi.n.

313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
copy, file utilities, move, multi-file, remove
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<




313
314
315
316
317
318
319








320
321
322
323
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
copy, file utilities, move, multi-file, remove
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/fileutil/multiop.n.

632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
.PP
.SH EXAMPLES
The following examples assume that the variable \fBF\fR contains a
reference to a multi-file operation object\&.
.CS


    $F do copy                       \\
	the  *\&.dll                    \\
	from c:/TDK/PrivateOpenSSL/bin \\
	to   [installdir_of tls]

.CE
.CS


    $F do move      \\
	the  *       \\
	from /sources \\
	into /scratch  \\
	but not *\&.html

    # Alternatively use 'except for *\&.html'\&.

.CE
.CS


    $F do           \\
	move         \\
	the  index    \\
	from /sources  \\
	into /scratch   \\
	as   pkgIndex\&.tcl

.CE
.CS


    $F do         \\
	remove     \\
	the *\&.txt  \\
	in /scratch

.CE
Note that the fact that most commands just modify the object state
allows us to use more off forms as specifications instead of just
nearly-natural language sentences\&.
For example the second example in this section can re-arranged into:
.CS


    $F do            \\
	from /sources \\
	into /scratch  \\
	but not *\&.html \\
	move           \\
	the  *

.CE
and the result is not only still a valid specification, but even stays
relatively readable\&.
.PP
Further note that the information collected by the commands \fBbut\fR,
\fBexcept\fR, and \fBas\fR is automatically reset after the associated
\fBthe\fR was executed\&. However no other state is reset in that
manner, allowing the user to avoid repetitions of unchanging
information\&. For example the second and third examples of this section
can be merged and rewritten into the equivalent:
.CS


$F do                   \\
    move                 \\
    the  *                \\
    from /sources          \\
    into /scratch           \\
    but not *\&.html not index \\
    the  index               \\
    as   pkgIndex\&.tcl

.CE
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
copy, file utilities, move, multi-file, remove
.SH CATEGORY
Programming tools







|
|
|






|
|
|
|








|
|
|
|
|






|
|
|










|
|
|
|
|















|
|
|
|
|
|
|










<
<
<
<
<
<
<
<




632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720








721
722
723
724
.PP
.SH EXAMPLES
The following examples assume that the variable \fBF\fR contains a
reference to a multi-file operation object\&.
.CS


    $F do copy                       \\\\
	the  *\&.dll                    \\\\
	from c:/TDK/PrivateOpenSSL/bin \\\\
	to   [installdir_of tls]

.CE
.CS


    $F do move      \\\\
	the  *       \\\\
	from /sources \\\\
	into /scratch  \\\\
	but not *\&.html

    # Alternatively use 'except for *\&.html'\&.

.CE
.CS


    $F do           \\\\
	move         \\\\
	the  index    \\\\
	from /sources  \\\\
	into /scratch   \\\\
	as   pkgIndex\&.tcl

.CE
.CS


    $F do         \\\\
	remove     \\\\
	the *\&.txt  \\\\
	in /scratch

.CE
Note that the fact that most commands just modify the object state
allows us to use more off forms as specifications instead of just
nearly-natural language sentences\&.
For example the second example in this section can re-arranged into:
.CS


    $F do            \\\\
	from /sources \\\\
	into /scratch  \\\\
	but not *\&.html \\\\
	move           \\\\
	the  *

.CE
and the result is not only still a valid specification, but even stays
relatively readable\&.
.PP
Further note that the information collected by the commands \fBbut\fR,
\fBexcept\fR, and \fBas\fR is automatically reset after the associated
\fBthe\fR was executed\&. However no other state is reset in that
manner, allowing the user to avoid repetitions of unchanging
information\&. For example the second and third examples of this section
can be merged and rewritten into the equivalent:
.CS


$F do                   \\\\
    move                 \\\\
    the  *                \\\\
    from /sources          \\\\
    into /scratch           \\\\
    but not *\&.html not index \\\\
    the  index               \\\\
    as   pkgIndex\&.tcl

.CE
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
copy, file utilities, move, multi-file, remove
.SH CATEGORY
Programming tools

Deleted idoc/man/files/modules/fileutil/paths.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
'\"
'\" Generated from file 'paths\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "fileutil::paths" n 1 tcllib ""
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
fileutil::paths \- Manage search path pools
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBfileutil::paths  ?1?\fR
.sp
\fB::fileutil::paths\fR \fIpoolName\fR
.sp
\fBpoolName\fR \fBmethod\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fIpoolName\fR \fBadd\fR \fIpath\fR
.sp
\fIpoolName\fR \fBclear\fR
.sp
\fIpoolName\fR \fBpaths\fR
.sp
\fIpoolName\fR \fBremove\fR \fIpath\fR
.sp
.BE
.SH DESCRIPTION
Provides a snit class whose instances manage a pool of (search) paths\&.
.SH API
The main command provides construction of search path pools:
.TP
\fB::fileutil::paths\fR \fIpoolName\fR
Creates a new, empty pool of search paths with an associated global
Tcl command whose name is \fIpoolName\fR\&.
It may be used to invoke various operations on the pool\&.
It has the following general form:
.RS
.TP
\fBpoolName\fR \fBmethod\fR ?\fIarg arg \&.\&.\&.\fR?
\fBmethod\fR and \fIarg\fRuments determine the exact behavior of
the command\&.
.RE
.IP
If \fIpoolName\fR is specified as \fB%AUTO%\fR a unique name will be
generated by the package itself\&.
The result of the command is the fully-qualified name of the instance
command\&.
.PP
.PP
The following commands are possible for pool objects:
.TP
\fIpoolName\fR \fBadd\fR \fIpath\fR
Adds the \fIpath\fR to the pool\&.
Nothing is done if the \fIpath\fR is already known to the pool\&.
The result of the command is the empty string\&.
.TP
\fIpoolName\fR \fBclear\fR
Clears the entire pool\&. In other words, removes all paths from it\&.
The result of the command is the empty string\&.
.TP
\fIpoolName\fR \fBpaths\fR
Returns the list of all paths known to the pool, in the order they
were added\&.
.TP
\fIpoolName\fR \fBremove\fR \fIpath\fR
Removes the \fIpath\fR from the pool, if it is known to the pool\&.
Unknown paths are ignored without error\&.
The result of the command is the empty string\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/fileutil/traverse.n.

443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
directory traversal, traversal
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<




443
444
445
446
447
448
449








450
451
452
453
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
directory traversal, traversal
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/ftp/ftp.n.

644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIftp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
ftpd, mime, pop3, smtp
.SH KEYWORDS
ftp, internet, net, rfc 959
.SH CATEGORY
Networking







<
<
<
<
<
<
<
<






644
645
646
647
648
649
650








651
652
653
654
655
656
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIftp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
ftpd, mime, pop3, smtp
.SH KEYWORDS
ftp, internet, net, rfc 959
.SH CATEGORY
Networking

Changes to idoc/man/files/modules/ftp/ftp_geturl.n.

309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIftp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
ftpd, mime, pop3, smtp
.SH KEYWORDS
ftp, internet, net, rfc 959
.SH CATEGORY
Networking







<
<
<
<
<
<
<
<






309
310
311
312
313
314
315








316
317
318
319
320
321
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIftp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
ftpd, mime, pop3, smtp
.SH KEYWORDS
ftp, internet, net, rfc 959
.SH CATEGORY
Networking

Changes to idoc/man/files/modules/ftpd/ftpd.n.

517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIftpd\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
ftp, ftpd, ftpserver, rfc 959, services
.SH CATEGORY
Networking







<
<
<
<
<
<
<
<




517
518
519
520
521
522
523








524
525
526
527
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIftpd\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
ftp, ftpd, ftpserver, rfc 959, services
.SH CATEGORY
Networking

Changes to idoc/man/files/modules/fumagic/cfront.n.

329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil :: magic\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
file(1), fileutil, magic(5)
.SH KEYWORDS
file recognition, file type, file utilities, mime, type
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<






329
330
331
332
333
334
335








336
337
338
339
340
341
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil :: magic\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
file(1), fileutil, magic(5)
.SH KEYWORDS
file recognition, file type, file utilities, mime, type
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/fumagic/cgen.n.

322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil :: magic\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
file(1), fileutil, magic(5)
.SH KEYWORDS
file recognition, file type, file utilities, mime, type
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<






322
323
324
325
326
327
328








329
330
331
332
333
334
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil :: magic\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
file(1), fileutil, magic(5)
.SH KEYWORDS
file recognition, file type, file utilities, mime, type
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/fumagic/filetypes.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'filetypes\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "fileutil::magic::filetype" n 2\&.0 tcllib "file utilities"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'filetypes\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "fileutil::magic::filetype" n 1\&.2\&.0 tcllib "file utilities"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
fileutil::magic::filetype \- Procedures implementing file-type recognition
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBfileutil::magic::filetype  ?2\&.0?\fR
.sp
\fB::fileutil::magic::filetype\fR \fIfilename\fR
.sp
.BE
.SH DESCRIPTION
.PP
This package provides a command for the recognition of file types in







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
fileutil::magic::filetype \- Procedures implementing file-type recognition
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBfileutil::magic::filetype  ?1\&.2\&.0?\fR
.sp
\fB::fileutil::magic::filetype\fR \fIfilename\fR
.sp
.BE
.SH DESCRIPTION
.PP
This package provides a command for the recognition of file types in
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil :: magic\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
file(1), fileutil, magic(5)
.SH KEYWORDS
file recognition, file type, file utilities, type
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<






309
310
311
312
313
314
315








316
317
318
319
320
321
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil :: magic\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
file(1), fileutil, magic(5)
.SH KEYWORDS
file recognition, file type, file utilities, type
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/fumagic/rtcore.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'rtcore\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "fileutil::magic::rt" n 2\&.0 tcllib "file utilities"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'rtcore\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "fileutil::magic::rt" n 1\&.2\&.0 tcllib "file utilities"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
fileutil::magic::rt \- Runtime core for file type recognition engines written in pure Tcl
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBfileutil::magic::rt  ?2\&.0?\fR
.sp
\fB::fileutil::magic::rt::>\fR
.sp
\fB::fileutil::magic::rt::<\fR
.sp
\fB::fileutil::magic::rt::open\fR \fIfilename\fR
.sp







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
fileutil::magic::rt \- Runtime core for file type recognition engines written in pure Tcl
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBfileutil::magic::rt  ?1\&.2\&.0?\fR
.sp
\fB::fileutil::magic::rt::>\fR
.sp
\fB::fileutil::magic::rt::<\fR
.sp
\fB::fileutil::magic::rt::open\fR \fIfilename\fR
.sp
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil :: magic\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
file(1), fileutil, magic(5)
.SH KEYWORDS
file recognition, file type, file utilities, mime, type
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<






531
532
533
534
535
536
537








538
539
540
541
542
543
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIfileutil :: magic\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
file(1), fileutil, magic(5)
.SH KEYWORDS
file recognition, file type, file utilities, mime, type
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/generator/generator.n.

Changes to idoc/man/files/modules/gpx/gpx.n.

420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgpx\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
gps, gpx
.SH CATEGORY
File formats
.SH COPYRIGHT
.nf
Copyright (c) 2010, Keith Vetter <kvetter@gmail\&.com>

.fi







<
<
<
<
<
<
<
<









420
421
422
423
424
425
426








427
428
429
430
431
432
433
434
435
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgpx\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
gps, gpx
.SH CATEGORY
File formats
.SH COPYRIGHT
.nf
Copyright (c) 2010, Keith Vetter <kvetter@gmail\&.com>

.fi

Changes to idoc/man/files/modules/grammar_aycock/aycock.n.

Changes to idoc/man/files/modules/grammar_fa/dacceptor.n.

347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_fa\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
acceptance, acceptor, automaton, finite automaton, grammar, parsing, regular expression, regular grammar, regular languages, state, transducer
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









347
348
349
350
351
352
353








354
355
356
357
358
359
360
361
362
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_fa\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
acceptance, acceptor, automaton, finite automaton, grammar, parsing, regular expression, regular grammar, regular languages, state, transducer
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_fa/dexec.n.

417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_fa\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
automaton, execution, finite automaton, grammar, parsing, regular expression, regular grammar, regular languages, running, state, transducer
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2007 Bogdan <rftghost@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<










417
418
419
420
421
422
423








424
425
426
427
428
429
430
431
432
433
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_fa\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
automaton, execution, finite automaton, grammar, parsing, regular expression, regular grammar, regular languages, running, state, transducer
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2007 Bogdan <rftghost@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_fa/fa.n.

545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
.CE
.sp
a possible serialization is
.sp
.CS


    grammar::fa \\
    {yellow red green red/yellow} \\
    {Drive     {0 0 {yellow     Brake}} \\
     Brake     {0 0 {red        Stop}} \\
     Stop      {1 0 {red/yellow Attention}} \\
     Attention {0 0 {green      Drive}}}

.CE
.sp
A possible one, because I did not care about creation order here
.TP
\fIfaName\fR \fBdeserialize\fR \fIserialization\fR







|
|
|
|
|







545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
.CE
.sp
a possible serialization is
.sp
.CS


    grammar::fa \\\\
    {yellow red green red/yellow} \\\\
    {Drive     {0 0 {yellow     Brake}} \\\\
     Brake     {0 0 {red        Stop}} \\\\
     Stop      {1 0 {red/yellow Attention}} \\\\
     Attention {0 0 {green      Drive}}}

.CE
.sp
A possible one, because I did not care about creation order here
.TP
\fIfaName\fR \fBdeserialize\fR \fIserialization\fR
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_fa\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
automaton, finite automaton, grammar, parsing, regular expression, regular grammar, regular languages, state, transducer
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2004-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









913
914
915
916
917
918
919








920
921
922
923
924
925
926
927
928
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_fa\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
automaton, finite automaton, grammar, parsing, regular expression, regular grammar, regular languages, state, transducer
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2004-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_fa/faop.n.

676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_fa\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
automaton, finite automaton, grammar, parsing, regular expression, regular grammar, regular languages, state, transducer
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2004-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









676
677
678
679
680
681
682








683
684
685
686
687
688
689
690
691
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_fa\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
automaton, finite automaton, grammar, parsing, regular expression, regular grammar, regular languages, state, transducer
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2004-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_me/gasm.n.

660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
assembler, grammar, graph, parsing, tree, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









660
661
662
663
664
665
666








667
668
669
670
671
672
673
674
675
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
assembler, grammar, graph, parsing, tree, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_me/me_ast.n.

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
AST, abstract syntax tree
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









360
361
362
363
364
365
366








367
368
369
370
371
372
373
374
375
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
AST, abstract syntax tree
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_me/me_cpu.n.

546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
grammar, parsing, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005-2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









546
547
548
549
550
551
552








553
554
555
556
557
558
559
560
561
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
grammar, parsing, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005-2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_me/me_cpucore.n.

659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
grammar, parsing, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005-2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









659
660
661
662
663
664
665








666
667
668
669
670
671
672
673
674
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
grammar, parsing, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005-2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_me/me_intro.n.

325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
CFG, CFL, LL(k), PEG, TPDL, context-free grammar, context-free languages, expression, grammar, matching, parsing, parsing expression grammar, push down automaton, recursive descent, top-down parsing languages, transducer, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









325
326
327
328
329
330
331








332
333
334
335
336
337
338
339
340
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
CFG, CFL, LL(k), PEG, TPDL, context-free grammar, context-free languages, expression, grammar, matching, parsing, parsing expression grammar, push down automaton, recursive descent, top-down parsing languages, transducer, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_me/me_tcl.n.

613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
grammar, parsing, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









613
614
615
616
617
618
619








620
621
622
623
624
625
626
627
628
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
grammar, parsing, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_me/me_util.n.

342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
abstract syntax tree, syntax tree, tree
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









342
343
344
345
346
347
348








349
350
351
352
353
354
355
356
357
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
abstract syntax tree, syntax tree, tree
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_me/me_vm.n.

742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
grammar, parsing, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









742
743
744
745
746
747
748








749
750
751
752
753
754
755
756
757
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_me\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
grammar, parsing, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_peg/peg.n.

554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
.CE
.sp
a possible serialization is
.sp
.CS


    grammar::peg \\
    {Expression {/ {x ( Expression )} {x Factor {* {x MulOp Factor}}}} \\
     Factor     {x Term {* {x AddOp Term}}} \\
     Term       Number \\
     MulOp      {/ * /} \\
     AddOp      {/ + -} \\
     Number     {x {? Sign} {+ Digit}} \\
     Sign       {/ + -} \\
     Digit      {/ 0 1 2 3 4 5 6 7 8 9} \\
    } \\
    {Expression value     Factor     value \\
     Term       value     MulOp      value \\
     AddOp      value     Number     value \\
     Sign       value     Digit      value \\
    }
    Expression

.CE
.sp
A possible one, because the order of the nonterminals in the
dictionary is not relevant\&.







|
|
|
|
|
|
|
|
|
|
|
|
|
|







554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
.CE
.sp
a possible serialization is
.sp
.CS


    grammar::peg \\\\
    {Expression {/ {x ( Expression )} {x Factor {* {x MulOp Factor}}}} \\\\
     Factor     {x Term {* {x AddOp Term}}} \\\\
     Term       Number \\\\
     MulOp      {/ * /} \\\\
     AddOp      {/ + -} \\\\
     Number     {x {? Sign} {+ Digit}} \\\\
     Sign       {/ + -} \\\\
     Digit      {/ 0 1 2 3 4 5 6 7 8 9} \\\\
    } \\\\
    {Expression value     Factor     value \\\\
     Term       value     MulOp      value \\\\
     AddOp      value     Number     value \\\\
     Sign       value     Digit      value \\\\
    }
    Expression

.CE
.sp
A possible one, because the order of the nonterminals in the
dictionary is not relevant\&.
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_peg\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
LL(k), TDPL, context-free languages, expression, grammar, parsing, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









835
836
837
838
839
840
841








842
843
844
845
846
847
848
849
850
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_peg\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
LL(k), TDPL, context-free languages, expression, grammar, parsing, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/grammar_peg/peg_interp.n.

355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_peg\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
LL(k), TDPL, context-free languages, expression, grammar, matching, parsing, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005-2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









355
356
357
358
359
360
361








362
363
364
365
366
367
368
369
370
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIgrammar_peg\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
LL(k), TDPL, context-free languages, expression, grammar, matching, parsing, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer, virtual machine
.SH CATEGORY
Grammars and finite automata
.SH COPYRIGHT
.nf
Copyright (c) 2005-2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/hook/hook.n.

607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIhook\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
uevent(n)
.SH KEYWORDS
callback, event, hook, observer, producer, publisher, subject, subscriber, uevent
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2010, by William H\&. Duquette

.fi







<
<
<
<
<
<
<
<











607
608
609
610
611
612
613








614
615
616
617
618
619
620
621
622
623
624
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIhook\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
uevent(n)
.SH KEYWORDS
callback, event, hook, observer, producer, publisher, subject, subscriber, uevent
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2010, by William H\&. Duquette

.fi

Changes to idoc/man/files/modules/html/html.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'html\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "html" n 1\&.5 tcllib "HTML Generation"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'html\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "html" n 1\&.4\&.4 tcllib "HTML Generation"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
html \- Procedures to generate HTML structures
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBhtml  ?1\&.5?\fR
.sp
\fB::html::author\fR \fIauthor\fR
.sp
\fB::html::bodyTag\fR \fIargs\fR
.sp
\fB::html::cell\fR \fIparam value\fR ?\fItag\fR?
.sp







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
html \- Procedures to generate HTML structures
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBhtml  ?1\&.4\&.4?\fR
.sp
\fB::html::author\fR \fIauthor\fR
.sp
\fB::html::bodyTag\fR \fIargs\fR
.sp
\fB::html::cell\fR \fIparam value\fR ?\fItag\fR?
.sp
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
.sp
\fB::html::keywords\fR \fIargs\fR
.sp
\fB::html::mailto\fR \fIemail\fR ?\fIsubject\fR?
.sp
\fB::html::meta\fR \fIargs\fR
.sp
\fB::html::meta_name\fR \fIargs\fR
.sp
\fB::html::meta_equiv\fR \fIargs\fR
.sp
\fB::html::meta_charset\fR \fIcharset\fR
.sp
\fB::html::css\fR \fIhref\fR
.sp
\fB::html::css-clear\fR
.sp
\fB::html::js\fR \fIhref\fR
.sp
\fB::html::js-clear\fR







<
<
<
<
<
<







341
342
343
344
345
346
347






348
349
350
351
352
353
354
.sp
\fB::html::keywords\fR \fIargs\fR
.sp
\fB::html::mailto\fR \fIemail\fR ?\fIsubject\fR?
.sp
\fB::html::meta\fR \fIargs\fR
.sp






\fB::html::css\fR \fIhref\fR
.sp
\fB::html::css-clear\fR
.sp
\fB::html::js\fR \fIhref\fR
.sp
\fB::html::js-clear\fR
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
.sp
\fB::html::select\fR \fIname param choices\fR ?\fIcurrent\fR?
.sp
\fB::html::selectPlain\fR \fIname param choices\fR ?\fIcurrent\fR?
.sp
\fB::html::set\fR \fIvar val\fR
.sp
\fB::html::submit\fR \fIlabel\fR ?\fIname\fR? ?\fItitle\fR?
.sp
\fB::html::tableFromArray\fR \fIarrname\fR ?\fIparam\fR? ?\fIpat\fR?
.sp
\fB::html::tableFromList\fR \fIquerylist\fR ?\fIparam\fR?
.sp
\fB::html::textarea\fR \fIname\fR ?\fIparam\fR? ?\fIcurrent\fR?
.sp
\fB::html::textInput\fR \fIname value args\fR
.sp
\fB::html::textInputRow\fR \fIlabel name value args\fR
.sp
\fB::html::varEmpty\fR \fIname\fR
.sp
\fB::html::while\fR \fItest body\fR
.sp
\fB::html::doctype\fR \fIid\fR
.sp
\fB::html::wrapTag\fR \fItag\fR ?\fItext\fR? ?\fIargs\fR?
.sp
.BE
.SH DESCRIPTION
.PP
The package \fBhtml\fR provides commands that generate HTML\&.
These commands typically return an HTML string as their result\&. In
particular, they do not output their result to \fBstdout\fR\&.
.PP







|

















<
<







379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403


404
405
406
407
408
409
410
.sp
\fB::html::select\fR \fIname param choices\fR ?\fIcurrent\fR?
.sp
\fB::html::selectPlain\fR \fIname param choices\fR ?\fIcurrent\fR?
.sp
\fB::html::set\fR \fIvar val\fR
.sp
\fB::html::submit\fR \fIlabel\fR ?\fIname\fR?
.sp
\fB::html::tableFromArray\fR \fIarrname\fR ?\fIparam\fR? ?\fIpat\fR?
.sp
\fB::html::tableFromList\fR \fIquerylist\fR ?\fIparam\fR?
.sp
\fB::html::textarea\fR \fIname\fR ?\fIparam\fR? ?\fIcurrent\fR?
.sp
\fB::html::textInput\fR \fIname value args\fR
.sp
\fB::html::textInputRow\fR \fIlabel name value args\fR
.sp
\fB::html::varEmpty\fR \fIname\fR
.sp
\fB::html::while\fR \fItest body\fR
.sp
\fB::html::doctype\fR \fIid\fR
.sp


.BE
.SH DESCRIPTION
.PP
The package \fBhtml\fR provides commands that generate HTML\&.
These commands typically return an HTML string as their result\&. In
particular, they do not output their result to \fBstdout\fR\&.
.PP
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624

625
626
627
628
629
630
631
define a keyword \fImeta\fR tag for the page\&.  The \fImeta\fR tag
is included in the result of \fB::html::head\fR\&.
.TP
\fB::html::mailto\fR \fIemail\fR ?\fIsubject\fR?
Generate a hypertext link to a mailto: URL\&.
.TP
\fB::html::meta\fR \fIargs\fR
Compatibility name for \fBhtml::meta_name\fR\&.
.TP
\fB::html::meta_name\fR \fIargs\fR
\fISide effect only\fR\&.
Call this before \fB::html::head\fR to define a \fImeta\fR tag for
the page\&.
The arguments (\fIargs\fR) are a Tcl-style name, value list that is
used for the \fBname=\fR and \fBcontent=\fR attributes of the
\fImeta\fR tag\&.  The \fImeta\fR tag is included in the result of
\fB::html::head\fR\&.
.TP
\fB::html::meta_equiv\fR \fIargs\fR
\fISide effect only\fR\&.
Call this before \fB::html::head\fR to define a \fImeta\fR tag for
the page\&.
The arguments (\fIargs\fR) are a Tcl-style name, value list that is
used for the \fBhttp-equiv=\fR and \fBcontent=\fR attributes of
the \fImeta\fR tag\&.  The \fImeta\fR tag is included in the result of
\fB::html::head\fR\&.
.TP
\fB::html::meta_charset\fR \fIcharset\fR
\fISide effect only\fR\&.
Call this before \fB::html::head\fR to
define a \fImeta\fR tag for the page\&.
The \fIcharset\fR is used with the \fBcharset=\fR attribute of the

\fImeta\fR tag\&.  The \fImeta\fR tag is included in the result of
\fB::html::head\fR\&.
.TP
\fB::html::css\fR \fIhref\fR
\fISide effect only\fR\&.  Call this before \fB::html::head\fR to
define a \fIlink\fR tag for a linked CSS document\&.  The \fIhref\fR
value is a HTTP URL to a CSS document\&. The \fIlink\fR tag is included







<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
>







585
586
587
588
589
590
591



592



















593

594
595
596
597
598
599
600
601
define a keyword \fImeta\fR tag for the page\&.  The \fImeta\fR tag
is included in the result of \fB::html::head\fR\&.
.TP
\fB::html::mailto\fR \fIemail\fR ?\fIsubject\fR?
Generate a hypertext link to a mailto: URL\&.
.TP
\fB::html::meta\fR \fIargs\fR



\fISide effect only\fR\&.  Call this before \fB::html::head\fR to



















define a \fImeta\fR tag for the page\&.  The \fIargs\fR is a Tcl-style name,

value list that is used for the name= and value= parameters for the
\fImeta\fR tag\&.  The \fImeta\fR tag is included in the result of
\fB::html::head\fR\&.
.TP
\fB::html::css\fR \fIhref\fR
\fISide effect only\fR\&.  Call this before \fB::html::head\fR to
define a \fIlink\fR tag for a linked CSS document\&.  The \fIhref\fR
value is a HTTP URL to a CSS document\&. The \fIlink\fR tag is included
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
.TP
\fB::html::set\fR \fIvar val\fR
This procedure is similar to the built-in Tcl \fBset\fR command\&.  The
main difference is that it returns "" so it can be called from an HTML
template file without appending unwanted results\&.  The other
difference is that it must take two arguments\&.
.TP
\fB::html::submit\fR \fIlabel\fR ?\fIname\fR? ?\fItitle\fR?
Generate an \fIinput\fR tag of type \fIsubmit\fR\&.
The \fIname\fR defaults to "submit"\&.
When a non-empty \fItitle\fR string is specified the button gains a
\fBtitle=\fR attribute with that value\&.
.TP
\fB::html::tableFromArray\fR \fIarrname\fR ?\fIparam\fR? ?\fIpat\fR?
Generate a two-column \fItable\fR and nested rows to display a Tcl array\&. The
table gets a heading that matches the array name, and each generated row
contains a name, value pair\&. The array names are sorted (\fBlsort\fR without
special options)\&. The argument \fIparam\fR is for the \fItable\fR tag and has
to contain a pre-formatted string\&. The \fIpat\fR is a \fBstring match\fR







|
|
<
<
<







705
706
707
708
709
710
711
712
713



714
715
716
717
718
719
720
.TP
\fB::html::set\fR \fIvar val\fR
This procedure is similar to the built-in Tcl \fBset\fR command\&.  The
main difference is that it returns "" so it can be called from an HTML
template file without appending unwanted results\&.  The other
difference is that it must take two arguments\&.
.TP
\fB::html::submit\fR \fIlabel\fR ?\fIname\fR?
Generate an \fIinput\fR tag of type \fIsubmit\fR\&. \fIname\fR defaults to "submit"\&.



.TP
\fB::html::tableFromArray\fR \fIarrname\fR ?\fIparam\fR? ?\fIpat\fR?
Generate a two-column \fItable\fR and nested rows to display a Tcl array\&. The
table gets a heading that matches the array name, and each generated row
contains a name, value pair\&. The array names are sorted (\fBlsort\fR without
special options)\&. The argument \fIparam\fR is for the \fItable\fR tag and has
to contain a pre-formatted string\&. The \fIpat\fR is a \fBstring match\fR
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
.IP [10]
XHTML10F
.IP [11]
XHTML11
.IP [12]
XHTMLB
.RE
.TP
\fB::html::wrapTag\fR \fItag\fR ?\fItext\fR? ?\fIargs\fR?
A helper to wrap a \fItext\fR in a pair of open/close \fItag\fRs\&.
The arguments (\fIargs\fR) are a Tcl-style name, value list that is
used to provide attributes and associated values to the opening tag\&.
The result is a string with the open \fItag\fR along with the optional
attributes, the optional text, and the closed tag\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIhtml\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
htmlparse, ncgi
.SH KEYWORDS
checkbox, checkbutton, form, html, radiobutton, table
.SH CATEGORY
CGI programming







<
<
<
<
<
<
<








<
<
<
<
<
<
<
<






778
779
780
781
782
783
784







785
786
787
788
789
790
791
792








793
794
795
796
797
798
.IP [10]
XHTML10F
.IP [11]
XHTML11
.IP [12]
XHTMLB
.RE







.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIhtml\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
htmlparse, ncgi
.SH KEYWORDS
checkbox, checkbutton, form, html, radiobutton, table
.SH CATEGORY
CGI programming

Changes to idoc/man/files/modules/htmlparse/htmlparse.n.

387
388
389
390
391
392
393

394
395
396
397
398
399
400
The name of the variable where to store any incomplete HTML into\&. This
makes most sense for the incremental mode\&. The parser will throw an
error if it sees incomplete HTML and has no place to store it to\&. This
makes sense for the normal mode\&. Only incomplete tags are detected,
not missing tags\&.  Optional, defaults to 'no variable'\&.
.RE
.RS

.TP
\fIInterface to the command prefix\fR
In normal mode the parser will invoke the command prefix with four
arguments appended\&. See \fB::htmlparse::debugCallback\fR for a
description\&.
.sp
In incremental mode, however, the generated scripts will invoke the







>







387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
The name of the variable where to store any incomplete HTML into\&. This
makes most sense for the incremental mode\&. The parser will throw an
error if it sees incomplete HTML and has no place to store it to\&. This
makes sense for the normal mode\&. Only incomplete tags are detected,
not missing tags\&.  Optional, defaults to 'no variable'\&.
.RE
.RS
.sp
.TP
\fIInterface to the command prefix\fR
In normal mode the parser will invoke the command prefix with four
arguments appended\&. See \fB::htmlparse::debugCallback\fR for a
description\&.
.sp
In incremental mode, however, the generated scripts will invoke the
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIhtmlparse\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
struct::tree
.SH KEYWORDS
html, parsing, queue, tree
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<






489
490
491
492
493
494
495








496
497
498
499
500
501
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIhtmlparse\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
struct::tree
.SH KEYWORDS
html, parsing, queue, tree
.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/http/autoproxy.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'autoproxy\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "autoproxy" n 1\&.7 tcllib "HTTP protocol helper modules"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'autoproxy\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "autoproxy" n 1\&.5\&.3 tcllib "HTTP protocol helper modules"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
.de MT
.QW ""
..
.BS
.SH NAME
autoproxy \- Automatic HTTP proxy usage and authentication
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBhttp  ?2\&.0?\fR
.sp
package require \fBautoproxy  ?1\&.7?\fR
.sp
\fB::autoproxy::init\fR
.sp
\fB::autoproxy::cget\fR \fI-option\fR
.sp
\fB::autoproxy::configure\fR ?-option \fIvalue\fR?
.sp







|



|







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
.de MT
.QW ""
..
.BS
.SH NAME
autoproxy \- Automatic HTTP proxy usage and authentication
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBhttp  ?2\&.0?\fR
.sp
package require \fBautoproxy  ?1\&.5\&.3?\fR
.sp
\fB::autoproxy::init\fR
.sp
\fB::autoproxy::cget\fR \fI-option\fR
.sp
\fB::autoproxy::configure\fR ?-option \fIvalue\fR?
.sp
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
variable may be set up\&. Either a plain host:port or more commonly a
URL and sometimes the URL may contain authentication parameters or
these may be requested from the user or provided via http_proxy_user
and http_proxy_pass\&. This package attempts to deal with all these
schemes\&. It will do it's best to get the required parameters from the
environment or registry and if it fails can be reconfigured\&.
.SH "TLS SECURITY CONSIDERATIONS"
.PP
\fINote\fR This section only applies if TLS support is provided
by the \fBTLS\fR package\&.
It does not apply when \fBautoproxy\fR was configured to use some
other package which can provide the same (i\&.e \fBtwapi\fR), via
the \fB-tls_package\fR configuration option\&.
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
<
<
<
<
<
<
|
|







311
312
313
314
315
316
317







318
319
320
321
322
323
324
325
326
variable may be set up\&. Either a plain host:port or more commonly a
URL and sometimes the URL may contain authentication parameters or
these may be requested from the user or provided via http_proxy_user
and http_proxy_pass\&. This package attempts to deal with all these
schemes\&. It will do it's best to get the required parameters from the
environment or registry and if it fails can be reconfigured\&.
.SH "TLS SECURITY CONSIDERATIONS"







This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
.TP
\fB::autoproxy::tls_connect\fR \fIargs\fR
Connect to a secure socket through a proxy\&. HTTP proxy servers permit
the use of the CONNECT HTTP command to open a link through the proxy
to the target machine\&. This function hides the details\&. For use with
the http package see \fBtls_socket\fR\&.
.sp
The \fIargs\fR list may contain any of the options
supported by the specific TLS package that is in use but
must end with the host and port as the last two items\&.
.TP
\fB::autoproxy::tunnel_connect\fR \fIargs\fR
Connect to a target host throught a proxy\&. This uses the same CONNECT
HTTP command as the \fBtls_connect\fR but does not promote the link
security once the connection is established\&.
.sp
The \fIargs\fR list may contain any of the options
supported by the specific TLS package that is in use but
must end with the host and port as the last two items\&.
.sp
Note that many proxy servers will permit CONNECT calls to a limited
set of ports - typically only port 443 (the secure HTTP port)\&.
.TP
\fB::autoproxy::tls_socket\fR \fIargs\fR
This function is to be used to register a proxy-aware secure socket







|
<







|
<







359
360
361
362
363
364
365
366

367
368
369
370
371
372
373
374

375
376
377
378
379
380
381
.TP
\fB::autoproxy::tls_connect\fR \fIargs\fR
Connect to a secure socket through a proxy\&. HTTP proxy servers permit
the use of the CONNECT HTTP command to open a link through the proxy
to the target machine\&. This function hides the details\&. For use with
the http package see \fBtls_socket\fR\&.
.sp
The \fIargs\fR list may contain any of the \fBtls\fR package options but

must end with the host and port as the last two items\&.
.TP
\fB::autoproxy::tunnel_connect\fR \fIargs\fR
Connect to a target host throught a proxy\&. This uses the same CONNECT
HTTP command as the \fBtls_connect\fR but does not promote the link
security once the connection is established\&.
.sp
The \fIargs\fR list may contain any of the \fBtls\fR package options but

must end with the host and port as the last two items\&.
.sp
Note that many proxy servers will permit CONNECT calls to a limited
set of ports - typically only port 443 (the secure HTTP port)\&.
.TP
\fB::autoproxy::tls_socket\fR \fIargs\fR
This function is to be used to register a proxy-aware secure socket
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
called when \fBconfigure\fR \fB-basic\fR is called with either no or
insufficient authentication details\&. This can be used to present a
dialog to the user to request the additional information\&.
.TP
\fB-basic\fR
Following options are for configuring the Basic authentication
scheme parameters\&. See \fBBasic Authentication\fR\&.
To unset the proxy authentication information retained from a previous
call of this function either "--" or no additional parameters can be
supplied\&. This will remove the existing authentication information\&.
.TP
\fB-tls_package\fR packagename
This option may be used to configure the Tcl package to use for
TLS support\&. Valid package names are \fBtls\fR (default)
and \fBtwapi\fR\&.
.PP
.SH "BASIC AUTHENTICATION"
Basic is the simplest and most commonly use HTTP proxy authentication
scheme\&. It is described in (1 section 11) and also in (2)\&. It offers
no privacy whatsoever and its use should be discouraged in favour of
more secure alternatives like Digest\&. To perform Basic authentication
the client base64 encodes the username and plaintext password
separated by a colon\&. This encoded text is prefixed with the word
"Basic" and a space\&.
.PP
The following options exists for this scheme:
.TP
\fB-username\fR name
The username required to authenticate with the configured proxy\&.
.TP
\fB-password\fR password
The password required for the username specified\&.
.TP
\fB-realm\fR realm
This option is not used by this package but may be used in requesting
authentication details from the user\&.
.TP
\fB--\fR
The end-of-options indicator may be used alone to unset any
authentication details currently enabled\&.
.PP
.SH EXAMPLES
.PP
.CS


package require autoproxy







<
<
<
<
<
<
<
<



















|
<
<
<
<
<







411
412
413
414
415
416
417








418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437





438
439
440
441
442
443
444
called when \fBconfigure\fR \fB-basic\fR is called with either no or
insufficient authentication details\&. This can be used to present a
dialog to the user to request the additional information\&.
.TP
\fB-basic\fR
Following options are for configuring the Basic authentication
scheme parameters\&. See \fBBasic Authentication\fR\&.








.PP
.SH "BASIC AUTHENTICATION"
Basic is the simplest and most commonly use HTTP proxy authentication
scheme\&. It is described in (1 section 11) and also in (2)\&. It offers
no privacy whatsoever and its use should be discouraged in favour of
more secure alternatives like Digest\&. To perform Basic authentication
the client base64 encodes the username and plaintext password
separated by a colon\&. This encoded text is prefixed with the word
"Basic" and a space\&.
.PP
The following options exists for this scheme:
.TP
\fB-username\fR name
The username required to authenticate with the configured proxy\&.
.TP
\fB-password\fR password
The password required for the username specified\&.
.TP
\fB-realm\fR realm
This option is not used\&.





.PP
.SH EXAMPLES
.PP
.CS


package require autoproxy
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIhttp :: autoproxy\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
http(n)
.SH KEYWORDS
authentication, http, proxy
.SH CATEGORY
Networking







<
<
<
<
<
<
<
<






479
480
481
482
483
484
485








486
487
488
489
490
491
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIhttp :: autoproxy\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
http(n)
.SH KEYWORDS
authentication, http, proxy
.SH CATEGORY
Networking

Deleted idoc/man/files/modules/httpd/httpd.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
'\"
'\" Generated from file 'httpd\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2018 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "httpd" n 4\&.3\&.5 tcllib "Tcl Web Server"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
httpd \- A TclOO and coroutine based web server
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBuuid \fR
.sp
package require \fBclay \fR
.sp
package require \fBcoroutine \fR
.sp
package require \fBfileutil \fR
.sp
package require \fBfileutil::magic::filetype \fR
.sp
package require \fBwebsocket \fR
.sp
package require \fBmime \fR
.sp
package require \fBcron \fR
.sp
package require \fBuri \fR
.sp
package require \fBMarkdown \fR
.sp
method \fBChannelCopy\fR \fIin\fR \fIout\fR ?\fIargs\fR?
.sp
method \fBhtml_header\fR ?\fItitle\fR \fB\fR? ?\fIargs\fR?
.sp
method \fBhtml_footer\fR ?\fIargs\fR?
.sp
method \fBhttp_code_string\fR \fIcode\fR
.sp
method \fBHttpHeaders\fR \fIsock\fR ?\fIdebug\fR \fB\fR?
.sp
method \fBHttpHeaders_Default\fR
.sp
method \fBHttpServerHeaders\fR
.sp
method \fBMimeParse\fR \fImimetext\fR
.sp
method \fBUrl_Decode\fR \fIdata\fR
.sp
method \fBUrl_PathCheck\fR \fIurlsuffix\fR
.sp
method \fBwait\fR \fImode\fR \fIsock\fR
.sp
variable \fBChannelRegister\fR
.sp
variable \fBreply\fR
.sp
variable \fBrequest\fR
.sp
delegate \fB<server>\fR
.sp
method \fBconstructor\fR \fIServerObj\fR ?\fIargs\fR?
.sp
method \fBdestructor\fR ?\fIdictargs\fR?
.sp
method \fBChannelRegister\fR ?\fIargs\fR?
.sp
method \fBclose\fR
.sp
method \fBLog_Dispatched\fR
.sp
method \fBdispatch\fR \fInewsock\fR \fIdatastate\fR
.sp
method \fBDispatch\fR
.sp
method \fBhtml_header\fR \fItitle\fR ?\fIargs\fR?
.sp
method \fBhtml_footer\fR ?\fIargs\fR?
.sp
method \fBerror\fR \fIcode\fR ?\fImsg\fR \fB\fR? ?\fIerrorInfo\fR \fB\fR?
.sp
method \fBcontent\fR
.sp
method \fBEncodeStatus\fR \fIstatus\fR
.sp
method \fBlog\fR \fItype\fR ?\fIinfo\fR \fB\fR?
.sp
method \fBCoroName\fR
.sp
method \fBDoOutput\fR
.sp
method \fBFormData\fR
.sp
method \fBPostData\fR \fIlength\fR
.sp
method \fBSession_Load\fR
.sp
method \fBputs\fR \fIline\fR
.sp
method \fBRequestFind\fR \fIfield\fR
.sp
method \fBrequest\fR \fIsubcommand\fR ?\fIargs\fR?
.sp
method \fBreply\fR \fIsubcommand\fR ?\fIargs\fR?
.sp
method \fBreset\fR
.sp
method \fBtimeOutCheck\fR
.sp
method \fBtimestamp\fR
.sp
variable \fBtemplate\fR
.sp
variable \fBurl_patterns\fR
.sp
method \fBconstructor\fR \fIargs\fR ?\fIport\fR \fBauto\fR? ?\fImyaddr\fR \fB127\&.0\&.0\&.1\fR? ?\fIstring\fR \fBauto\fR? ?\fIname\fR \fBauto\fR? ?\fIdoc_root\fR \fB\fR? ?\fIreverse_dns\fR \fB0\fR? ?\fIconfiguration_file\fR \fB\fR? ?\fIprotocol\fR \fBHTTP/1\&.1\fR?
.sp
method \fBdestructor\fR ?\fIdictargs\fR?
.sp
method \fBconnect\fR \fIsock\fR \fIip\fR \fIport\fR
.sp
method \fBServerHeaders\fR \fIip\fR \fIhttp_request\fR \fImimetxt\fR
.sp
method \fBConnect\fR \fIuuid\fR \fIsock\fR \fIip\fR
.sp
method \fBcounter\fR \fIwhich\fR
.sp
method \fBCheckTimeout\fR
.sp
method \fBdebug\fR ?\fIargs\fR?
.sp
method \fBdispatch\fR \fIdata\fR
.sp
method \fBDispatch_Default\fR \fIreply\fR
.sp
method \fBDispatch_Local\fR \fIdata\fR
.sp
method \fBHeaders_Local\fR \fIvarname\fR
.sp
method \fBHeaders_Process\fR \fIvarname\fR
.sp
method \fBHostName\fR \fIipaddr\fR
.sp
method \fBlog\fR ?\fIargs\fR?
.sp
method \fBplugin\fR \fIslot\fR ?\fIclass\fR \fB\fR?
.sp
method \fBport_listening\fR
.sp
method \fBPrefixNormalize\fR \fIprefix\fR
.sp
method \fBsource\fR \fIfilename\fR
.sp
method \fBstart\fR
.sp
method \fBstop\fR
.sp
method \fBSubObject {} db\fR
.sp
method \fBSubObject {} default\fR
.sp
method \fBtemplate\fR \fIpage\fR
.sp
method \fBTemplateSearch\fR \fIpage\fR
.sp
method \fBThread_start\fR
.sp
method \fBUuid_Generate\fR
.sp
method \fBValidate_Connection\fR \fIsock\fR \fIip\fR
.sp
method \fBreset\fR
.sp
method \fBcontent\fR
.sp
method \fBDispatch\fR
.sp
method \fBcontent\fR
.sp
method \fBFileName\fR
.sp
method \fBDirectoryListing\fR \fIlocal_file\fR
.sp
method \fBcontent\fR
.sp
method \fBDispatch\fR
.sp
variable \fBexename\fR
.sp
method \fBCgiExec\fR \fIexecname\fR \fIscript\fR \fIarglist\fR
.sp
method \fBCgi_Executable\fR \fIscript\fR
.sp
method \fBproxy_channel\fR
.sp
method \fBproxy_path\fR
.sp
method \fBProxyRequest\fR \fIchana\fR \fIchanb\fR
.sp
method \fBProxyReply\fR \fIchana\fR \fIchanb\fR ?\fIargs\fR?
.sp
method \fBDispatch\fR
.sp
method \fBFileName\fR
.sp
method \fBproxy_channel\fR
.sp
method \fBProxyRequest\fR \fIchana\fR \fIchanb\fR
.sp
method \fBProxyReply\fR \fIchana\fR \fIchanb\fR ?\fIargs\fR?
.sp
method \fBDirectoryListing\fR \fIlocal_file\fR
.sp
method \fBEncodeStatus\fR \fIstatus\fR
.sp
method \fBscgi_info\fR
.sp
method \fBproxy_channel\fR
.sp
method \fBProxyRequest\fR \fIchana\fR \fIchanb\fR
.sp
method \fBProxyReply\fR \fIchana\fR \fIchanb\fR ?\fIargs\fR?
.sp
method \fBdebug\fR ?\fIargs\fR?
.sp
method \fBConnect\fR \fIuuid\fR \fIsock\fR \fIip\fR
.sp
method \fBDispatch_Dict\fR \fIdata\fR
.sp
method \fBuri {} add\fR \fIvhosts\fR \fIpatterns\fR \fIinfo\fR
.sp
method \fBuri {} direct\fR \fIvhosts\fR \fIpatterns\fR \fIinfo\fR \fIbody\fR
.sp
method \fBoutput\fR
.sp
method \fBDoOutput\fR
.sp
method \fBclose\fR
.sp
method \fBlocal_memchan\fR \fIcommand\fR ?\fIargs\fR?
.sp
method \fBConnect_Local\fR \fIuuid\fR \fIsock\fR ?\fIargs\fR?
.sp
.BE
.SH DESCRIPTION
.PP
This module implements a web server, suitable for embedding in an
application\&. The server is object oriented, and contains all of the
fundamentals needed for a full service website\&.
.PP
.SH "MINIMAL EXAMPLE"
Starting a web service requires starting a class of type
\fBhttpd::server\fR, and providing that server with one or more URIs
to service, and \fBhttpd::reply\fR derived classes to generate them\&.
.CS


oo::class create ::reply\&.hello {
  method content {} {
    my puts "<HTML><HEAD><TITLE>IRM Dispatch Server</TITLE></HEAD><BODY>"
    my puts "<h1>Hello World!</h1>"
    my puts </BODY></HTML>
  }
}
::httpd::server create HTTPD port 8015 myaddr 127\&.0\&.0\&.1 doc_root ~/htdocs
HTTPD plugin dispatch httpd::server::dispatch
HTTPD uri add * /hello [list mixin reply\&.hello]

.CE
The bare module does have facilities to hose a files from a file system\&. Files that end in a \&.tml will be substituted in the style of Tclhttpd:
.CS


<!-- hello\&.tml -->
[my html_header {Hello World!}]
Your Server is running\&.
<p>
The time is now [clock format [clock seconds]]
[my html_footer]

.CE
A complete example of an httpd server is in the /examples directory of Tcllib\&. It also show how to dispatch URIs to other processes via SCGI and HTTP proxies\&.
.CS


cd ~/tcl/sandbox/tcllib
tclsh examples/httpd\&.tcl

.CE
.SH CLASSES
.SS "CLASS  HTTPD::MIME"
A metaclass for MIME handling behavior across a live socket
.PP
\fBMethods\fR
.TP
method \fBChannelCopy\fR \fIin\fR \fIout\fR ?\fIargs\fR?
.TP
method \fBhtml_header\fR ?\fItitle\fR \fB\fR? ?\fIargs\fR?
Returns a block of HTML
.TP
method \fBhtml_footer\fR ?\fIargs\fR?
.TP
method \fBhttp_code_string\fR \fIcode\fR
.TP
method \fBHttpHeaders\fR \fIsock\fR ?\fIdebug\fR \fB\fR?
.TP
method \fBHttpHeaders_Default\fR
.TP
method \fBHttpServerHeaders\fR
.TP
method \fBMimeParse\fR \fImimetext\fR
Converts a block of mime encoded text to a key/value list\&. If an exception is encountered,
the method will generate its own call to the \fBerror\fR method, and immediately invoke
the \fBoutput\fR method to produce an error code and close the connection\&.
.TP
method \fBUrl_Decode\fR \fIdata\fR
De-httpizes a string\&.
.TP
method \fBUrl_PathCheck\fR \fIurlsuffix\fR
.TP
method \fBwait\fR \fImode\fR \fIsock\fR
.PP
.PP
.SS "CLASS  HTTPD::REPLY"
\fIancestors\fR: \fBhttpd::mime\fR
.PP
A class which shephards a request through the process of generating a
reply\&.
The socket associated with the reply is available at all times as the \fIchan\fR
variable\&.
The process of generating a reply begins with an \fBhttpd::server\fR generating a
\fBhttp::class\fR object, mixing in a set of behaviors and then invoking the reply
object's \fBdispatch\fR method\&.
In normal operations the \fBdispatch\fR method:
.IP [1]
Invokes the \fBreset\fR method for the object to populate default headers\&.
.IP [2]
Invokes the \fBHttpHeaders\fR method to stream the MIME headers out of the socket
.IP [3]
Invokes the \fBrequest parse\fR method to convert the stream of MIME headers into a
dict that can be read via the \fBrequest\fR method\&.
.IP [4]
Stores the raw stream of MIME headers in the \fIrawrequest\fR variable of the object\&.
.IP [5]
Invokes the \fBcontent\fR method for the object, generating an call to the \fBerror\fR
method if an exception is raised\&.
.IP [6]
Invokes the \fBoutput\fR method for the object
.PP
.PP
Developers have the option of streaming output to a buffer via the \fBputs\fR method of the
reply, or simply populating the \fIreply_body\fR variable of the object\&.
The information returned by the \fBcontent\fR method is not interpreted in any way\&.
If an exception is thrown (via the \fBerror\fR command in Tcl, for example) the caller will
auto-generate a 500 {Internal Error} message\&.
A typical implementation of \fBcontent\fR look like:
.CS



 clay::define ::test::content\&.file {
 	superclass ::httpd::content\&.file
 	# Return a file
 	# Note: this is using the content\&.file mixin which looks for the reply_file variable
 	# and will auto-compute the Content-Type
 	method content {} {
 	  my reset
     set doc_root [my request get DOCUMENT_ROOT]
     my variable reply_file
     set reply_file [file join $doc_root index\&.html]
 	}
 }
 clay::define ::test::content\&.time {
   # return the current system time
 	method content {} {
 		my variable reply_body
     my reply set Content-Type text/plain
 		set reply_body [clock seconds]
 	}
 }
 clay::define ::test::content\&.echo {
 	method content {} {
 		my variable reply_body
     my reply set Content-Type [my request get CONTENT_TYPE]
 		set reply_body [my PostData [my request get CONTENT_LENGTH]]
 	}
 }
 clay::define ::test::content\&.form_handler {
 	method content {} {
 	  set form [my FormData]
 	  my reply set Content-Type {text/html; charset=UTF-8}
     my puts [my html_header {My Dynamic Page}]
     my puts "<BODY>"
     my puts "You Sent<p>"
     my puts "<TABLE>"
     foreach {f v} $form {
       my puts "<TR><TH>$f</TH><TD><verbatim>$v</verbatim></TD>"
     }
     my puts "</TABLE><p>"
     my puts "Send some info:<p>"
     my puts "<FORM action=/[my request get REQUEST_PATH] method POST>"
     my puts "<TABLE>"
     foreach field {name rank serial_number} {
       set line "<TR><TH>$field</TH><TD><input name=\\"$field\\" "
       if {[dict exists $form $field]} {
         append line " value=\\"[dict get $form $field]\\"""
       }
       append line " /></TD></TR>"
       my puts $line
     }
     my puts "</TABLE>"
     my puts [my html footer]
 	}
 }


.CE
.PP
\fBVariable\fR
.TP
variable \fBChannelRegister\fR
.TP
variable \fBreply\fR
A dictionary which will converted into the MIME headers of the reply
.TP
variable \fBrequest\fR
A dictionary containing the SCGI transformed HTTP headers for the request
.PP
.PP
\fBDelegate\fR
.TP
delegate \fB<server>\fR
The server object which spawned this reply
.PP
.PP
\fBMethods\fR
.TP
method \fBconstructor\fR \fIServerObj\fR ?\fIargs\fR?
.TP
method \fBdestructor\fR ?\fIdictargs\fR?
clean up on exit
.TP
method \fBChannelRegister\fR ?\fIargs\fR?
Registers a channel to be closed by the close method
.TP
method \fBclose\fR
Close channels opened by this object
.TP
method \fBLog_Dispatched\fR
Record a dispatch event
.TP
method \fBdispatch\fR \fInewsock\fR \fIdatastate\fR
Accept the handoff from the server object of the socket
\fInewsock\fR and feed it the state \fIdatastate\fR\&.
Fields the \fIdatastate\fR are looking for in particular are:
.sp
* \fBmixin\fR - A key/value list of slots and classes to be mixed into the
object prior to invoking \fBDispatch\fR\&.
.sp
* \fBhttp\fR - A key/value list of values to populate the object's \fIrequest\fR
ensemble
.sp
All other fields are passed along to the \fBclay\fR structure of the object\&.
.TP
method \fBDispatch\fR
.TP
method \fBhtml_header\fR \fItitle\fR ?\fIargs\fR?
.TP
method \fBhtml_footer\fR ?\fIargs\fR?
.TP
method \fBerror\fR \fIcode\fR ?\fImsg\fR \fB\fR? ?\fIerrorInfo\fR \fB\fR?
.TP
method \fBcontent\fR
REPLACE ME:
This method is the "meat" of your application\&.
It writes to the result buffer via the "puts" method
and can tweak the headers via "clay put header_reply"
.TP
method \fBEncodeStatus\fR \fIstatus\fR
Formulate a standard HTTP status header from he string provided\&.
.TP
method \fBlog\fR \fItype\fR ?\fIinfo\fR \fB\fR?
.TP
method \fBCoroName\fR
.TP
method \fBDoOutput\fR
Generates the the HTTP reply, streams that reply back across \fIchan\fR,
and destroys the object\&.
.TP
method \fBFormData\fR
For GET requests, converts the QUERY_DATA header into a key/value list\&.
For POST requests, reads the Post data and converts that information to
a key/value list for application/x-www-form-urlencoded posts\&. For multipart
posts, it composites all of the MIME headers of the post to a singular key/value
list, and provides MIME_* information as computed by the \fBmime\fR package, including
the MIME_TOKEN, which can be fed back into the mime package to read out the contents\&.
.TP
method \fBPostData\fR \fIlength\fR
Stream \fIlength\fR bytes from the \fIchan\fR socket, but only of the request is a
POST or PUSH\&. Returns an empty string otherwise\&.
.TP
method \fBSession_Load\fR
Manage session data
.TP
method \fBputs\fR \fIline\fR
Appends the value of \fIstring\fR to the end of \fIreply_body\fR, as well as a trailing newline
character\&.
.TP
method \fBRequestFind\fR \fIfield\fR
.TP
method \fBrequest\fR \fIsubcommand\fR ?\fIargs\fR?
.TP
method \fBreply\fR \fIsubcommand\fR ?\fIargs\fR?
.TP
method \fBreset\fR
Clear the contents of the \fIreply_body\fR variable, and reset all headers in the \fBreply\fR
structure back to the defaults for this object\&.
.TP
method \fBtimeOutCheck\fR
Called from the \fBhttp::server\fR object which spawned this reply\&. Checks to see
if too much time has elapsed while waiting for data or generating a reply, and issues
a timeout error to the request if it has, as well as destroy the object and close the
\fIchan\fR socket\&.
.TP
method \fBtimestamp\fR
Return the current system time in the format:
.CS

%a, %d %b %Y %T %Z
.CE
.PP
.PP
.SS "CLASS  HTTPD::SERVER"
\fIancestors\fR: \fBhttpd::mime\fR
.PP
.PP
\fBVariable\fR
.TP
variable \fBtemplate\fR
.TP
variable \fBurl_patterns\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBconstructor\fR \fIargs\fR ?\fIport\fR \fBauto\fR? ?\fImyaddr\fR \fB127\&.0\&.0\&.1\fR? ?\fIstring\fR \fBauto\fR? ?\fIname\fR \fBauto\fR? ?\fIdoc_root\fR \fB\fR? ?\fIreverse_dns\fR \fB0\fR? ?\fIconfiguration_file\fR \fB\fR? ?\fIprotocol\fR \fBHTTP/1\&.1\fR?
.TP
method \fBdestructor\fR ?\fIdictargs\fR?
.TP
method \fBconnect\fR \fIsock\fR \fIip\fR \fIport\fR
Reply to an open socket\&. This method builds a coroutine to manage the remainder
of the connection\&. The coroutine's operations are driven by the \fBConnect\fR method\&.
.TP
method \fBServerHeaders\fR \fIip\fR \fIhttp_request\fR \fImimetxt\fR
.TP
method \fBConnect\fR \fIuuid\fR \fIsock\fR \fIip\fR
This method reads HTTP headers, and then consults the \fBdispatch\fR method to
determine if the request is valid, and/or what kind of reply to generate\&. Under
normal cases, an object of class \fB::http::reply\fR is created, and that class's
\fBdispatch\fR method\&.
This action passes control of the socket to
the reply object\&. The reply object manages the rest of the transaction, including
closing the socket\&.
.TP
method \fBcounter\fR \fIwhich\fR
Increment an internal counter\&.
.TP
method \fBCheckTimeout\fR
Check open connections for a time out event\&.
.TP
method \fBdebug\fR ?\fIargs\fR?
.TP
method \fBdispatch\fR \fIdata\fR
Given a key/value list of information, return a data structure describing how
the server should reply\&.
.TP
method \fBDispatch_Default\fR \fIreply\fR
Method dispatch method of last resort before returning a 404 NOT FOUND error\&.
The default behavior is to look for a file in \fIDOCUMENT_ROOT\fR which
matches the query\&.
.TP
method \fBDispatch_Local\fR \fIdata\fR
Method dispatch method invoked prior to invoking methods implemented by plugins\&.
If this method returns a non-empty dictionary, that structure will be passed to
the reply\&. The default is an empty implementation\&.
.TP
method \fBHeaders_Local\fR \fIvarname\fR
Introspect and possibly modify a data structure destined for a reply\&. This
method is invoked before invoking Header methods implemented by plugins\&.
The default implementation is empty\&.
.TP
method \fBHeaders_Process\fR \fIvarname\fR
Introspect and possibly modify a data structure destined for a reply\&. This
method is built dynamically by the \fBplugin\fR method\&.
.TP
method \fBHostName\fR \fIipaddr\fR
Convert an ip address to a host name\&. If the server/ reverse_dns flag
is false, this method simply returns the IP address back\&.
Internally, this method uses the \fIdns\fR module from tcllib\&.
.TP
method \fBlog\fR ?\fIargs\fR?
Log an event\&. The input for args is free form\&. This method is intended
to be replaced by the user, and is a noop for a stock http::server object\&.
.TP
method \fBplugin\fR \fIslot\fR ?\fIclass\fR \fB\fR?
Incorporate behaviors from a plugin\&.
This method dynamically rebuilds the \fBDispatch\fR and \fBHeaders\fR
method\&. For every plugin, the server looks for the following entries in
\fIclay plugin/\fR:
.sp
\fIload\fR - A script to invoke in the server's namespace during the \fBplugin\fR method invokation\&.
.sp
\fIdispatch\fR - A script to stitch into the server's \fBDispatch\fR method\&.
.sp
\fIheaders\fR - A script to stitch into the server's \fBHeaders\fR method\&.
.sp
\fIthread\fR - A script to stitch into the server's \fBThread_start\fR method\&.
.TP
method \fBport_listening\fR
Return the actual port that httpd is listening on\&.
.TP
method \fBPrefixNormalize\fR \fIprefix\fR
For the stock version, trim trailing /'s and *'s from a prefix\&. This
method can be replaced by the end user to perform any other transformations
needed for the application\&.
.TP
method \fBsource\fR \fIfilename\fR
.TP
method \fBstart\fR
Open the socket listener\&.
.TP
method \fBstop\fR
Shut off the socket listener, and destroy any pending replies\&.
.TP
method \fBSubObject {} db\fR
.TP
method \fBSubObject {} default\fR
.TP
method \fBtemplate\fR \fIpage\fR
Return a template for the string \fIpage\fR
.TP
method \fBTemplateSearch\fR \fIpage\fR
Perform a search for the template that best matches \fIpage\fR\&. This
can include local file searches, in-memory structures, or even
database lookups\&. The stock implementation simply looks for files
with a \&.tml or \&.html extension in the ?doc_root? directory\&.
.TP
method \fBThread_start\fR
Built by the \fBplugin\fR method\&. Called by the \fBstart\fR method\&. Intended
to allow plugins to spawn worker threads\&.
.TP
method \fBUuid_Generate\fR
Generate a GUUID\&. Used to ensure every request has a unique ID\&.
The default implementation is:
.CS


   return [::clay::uuid generate]

.CE
.TP
method \fBValidate_Connection\fR \fIsock\fR \fIip\fR
Given a socket and an ip address, return true if this connection should
be terminated, or false if it should be allowed to continue\&. The stock
implementation always returns 0\&. This is intended for applications to
be able to implement black lists and/or provide security based on IP
address\&.
.PP
.PP
.SS "CLASS  HTTPD::SERVER::DISPATCH"
\fIancestors\fR: \fBhttpd::server\fR
.PP
Provide a backward compadible alias
.PP
.SS "CLASS  HTTPD::CONTENT\&.REDIRECT"
.PP
\fBMethods\fR
.TP
method \fBreset\fR
.TP
method \fBcontent\fR
.PP
.PP
.SS "CLASS  HTTPD::CONTENT\&.CACHE"
.PP
\fBMethods\fR
.TP
method \fBDispatch\fR
.PP
.PP
.SS "CLASS  HTTPD::CONTENT\&.TEMPLATE"
.PP
\fBMethods\fR
.TP
method \fBcontent\fR
.PP
.PP
.SS "CLASS  HTTPD::CONTENT\&.FILE"
Class to deliver Static content
When utilized, this class is fed a local filename
by the dispatcher
.PP
\fBMethods\fR
.TP
method \fBFileName\fR
.TP
method \fBDirectoryListing\fR \fIlocal_file\fR
.TP
method \fBcontent\fR
.TP
method \fBDispatch\fR
.PP
.PP
.SS "CLASS  HTTPD::CONTENT\&.EXEC"
.PP
\fBVariable\fR
.TP
variable \fBexename\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBCgiExec\fR \fIexecname\fR \fIscript\fR \fIarglist\fR
.TP
method \fBCgi_Executable\fR \fIscript\fR
.PP
.PP
.SS "CLASS  HTTPD::CONTENT\&.PROXY"
\fIancestors\fR: \fBhttpd::content\&.exec\fR
.PP
Return data from an proxy process
.PP
\fBMethods\fR
.TP
method \fBproxy_channel\fR
.TP
method \fBproxy_path\fR
.TP
method \fBProxyRequest\fR \fIchana\fR \fIchanb\fR
.TP
method \fBProxyReply\fR \fIchana\fR \fIchanb\fR ?\fIargs\fR?
.TP
method \fBDispatch\fR
.PP
.PP
.SS "CLASS  HTTPD::CONTENT\&.CGI"
\fIancestors\fR: \fBhttpd::content\&.proxy\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBFileName\fR
.TP
method \fBproxy_channel\fR
.TP
method \fBProxyRequest\fR \fIchana\fR \fIchanb\fR
.TP
method \fBProxyReply\fR \fIchana\fR \fIchanb\fR ?\fIargs\fR?
.TP
method \fBDirectoryListing\fR \fIlocal_file\fR
For most CGI applications a directory list is vorboten
.PP
.PP
.SS "CLASS  HTTPD::PROTOCOL\&.SCGI"
Return data from an SCGI process
.PP
\fBMethods\fR
.TP
method \fBEncodeStatus\fR \fIstatus\fR
.PP
.PP
.SS "CLASS  HTTPD::CONTENT\&.SCGI"
\fIancestors\fR: \fBhttpd::content\&.proxy\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBscgi_info\fR
.TP
method \fBproxy_channel\fR
.TP
method \fBProxyRequest\fR \fIchana\fR \fIchanb\fR
.TP
method \fBProxyReply\fR \fIchana\fR \fIchanb\fR ?\fIargs\fR?
.PP
.PP
.SS "CLASS  HTTPD::SERVER\&.SCGI"
\fIancestors\fR: \fBhttpd::server\fR
.PP
Act as an  SCGI Server
.PP
\fBMethods\fR
.TP
method \fBdebug\fR ?\fIargs\fR?
.TP
method \fBConnect\fR \fIuuid\fR \fIsock\fR \fIip\fR
.PP
.PP
.SS "CLASS  HTTPD::CONTENT\&.WEBSOCKET"
Upgrade a connection to a websocket
.PP
.SS "CLASS  HTTPD::PLUGIN"
httpd plugin template
.PP
.SS "CLASS  HTTPD::PLUGIN\&.DICT_DISPATCH"
A rudimentary plugin that dispatches URLs from a dict
data structure
.PP
\fBMethods\fR
.TP
method \fBDispatch_Dict\fR \fIdata\fR
Implementation of the dispatcher
.TP
method \fBuri {} add\fR \fIvhosts\fR \fIpatterns\fR \fIinfo\fR
.TP
method \fBuri {} direct\fR \fIvhosts\fR \fIpatterns\fR \fIinfo\fR \fIbody\fR
.PP
.PP
.SS "CLASS  HTTPD::REPLY\&.MEMCHAN"
\fIancestors\fR: \fBhttpd::reply\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBoutput\fR
.TP
method \fBDoOutput\fR
.TP
method \fBclose\fR
.PP
.PP
.SS "CLASS  HTTPD::PLUGIN\&.LOCAL_MEMCHAN"
.PP
\fBMethods\fR
.TP
method \fBlocal_memchan\fR \fIcommand\fR ?\fIargs\fR?
.TP
method \fBConnect_Local\fR \fIuuid\fR \fIsock\fR ?\fIargs\fR?
A modified connection method that passes simple GET request to an object
and pulls data directly from the reply_body data variable in the object
Needed because memchan is bidirectional, and we can't seem to communicate that
the server is one side of the link and the reply is another
.PP
.PP
.SH AUTHORS
Sean Woods
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInetwork\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
TclOO, WWW, http, httpd, httpserver, services
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2018 Sean Woods <yoda@etoyoc\&.com>

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/ident/ident.n.

314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIident\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
ident, identification, rfc 1413
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2004 Reinhard Max <max@tclers\&.tk>

.fi







<
<
<
<
<
<
<
<









314
315
316
317
318
319
320








321
322
323
324
325
326
327
328
329
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIident\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
ident, identification, rfc 1413
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2004 Reinhard Max <max@tclers\&.tk>

.fi

Changes to idoc/man/files/modules/imap4/imap4.n.

271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
imap4 \- imap client-side tcl implementation of imap protocol
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBimap4  ?0\&.5\&.3?\fR
.sp
\fB::imap4::open\fR \fIhostname\fR ?\fIport\fR?
.sp
\fB::imap4::starttls\fR \fIchan\fR
.sp
\fB::imap4::login\fR \fIchan\fR \fIuser\fR \fIpass\fR
.sp







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
imap4 \- imap client-side tcl implementation of imap protocol
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBimap4  ?0\&.5\&.2?\fR
.sp
\fB::imap4::open\fR \fIhostname\fR ?\fIport\fR?
.sp
\fB::imap4::starttls\fR \fIchan\fR
.sp
\fB::imap4::login\fR \fIchan\fR \fIuser\fR \fIpass\fR
.sp
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
    puts "Is able to imap4rev1? [::imap4::isableto $imap imap4rev1]"

    # Cleanup
    ::imap4::cleanup $imap

.CE
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







757
758
759
760
761
762
763

764
765
766
767
768
769
770
771
772
    puts "Is able to imap4rev1? [::imap4::isableto $imap imap4rev1]"

    # Cleanup
    ::imap4::cleanup $imap

.CE
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIimap4\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
Only a small part of rfc3501 implemented\&.
.SH "SEE ALSO"
ftp, http, imap, mime, pop3, tls
.SH KEYWORDS
email, imap, internet, mail, net, rfc3501, ssl, tls
.SH CATEGORY
Networking







<
<
<
<
<
<
<
<





<
<
795
796
797
798
799
800
801








802
803
804
805
806


.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIimap4\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








Only a small part of rfc3501 implemented\&.
.SH "SEE ALSO"
ftp, http, imap, mime, pop3, tls
.SH KEYWORDS
email, imap, internet, mail, net, rfc3501, ssl, tls


Changes to idoc/man/files/modules/inifile/ini.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'ini\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "inifile" n 0\&.3\&.2 tcllib "Parsing of Windows INI files"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'ini\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "inifile" n 0\&.3 tcllib "Parsing of Windows INI files"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
inifile \- Parsing of Windows INI files
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBinifile  ?0\&.3\&.2?\fR
.sp
\fB::ini::open\fR \fIfile\fR ?\fB-encoding\fR \fIencoding\fR? ?\fIaccess\fR?
.sp
\fB::ini::close\fR \fIini\fR
.sp
\fB::ini::commit\fR \fIini\fR
.sp







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
inifile \- Parsing of Windows INI files
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBinifile  ?0\&.3?\fR
.sp
\fB::ini::open\fR \fIfile\fR ?\fB-encoding\fR \fIencoding\fR? ?\fIaccess\fR?
.sp
\fB::ini::close\fR \fIini\fR
.sp
\fB::ini::commit\fR \fIini\fR
.sp
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIinifile\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<


377
378
379
380
381
382
383








384
385
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIinifile\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/interp/deleg_method.n.

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIinterp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
comm, delegation, interpreter, method, snit
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









308
309
310
311
312
313
314








315
316
317
318
319
320
321
322
323
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIinterp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
comm, delegation, interpreter, method, snit
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/interp/deleg_proc.n.

306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIinterp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
comm, delegation, interpreter, procedure
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









306
307
308
309
310
311
312








313
314
315
316
317
318
319
320
321
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIinterp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
comm, delegation, interpreter, procedure
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/interp/tcllib_interp.n.

327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIinterp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
alias, empty interpreter, interpreter, method, snit
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









327
328
329
330
331
332
333








334
335
336
337
338
339
340
341
342
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIinterp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
alias, empty interpreter, interpreter, method, snit
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/irc/irc.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'irc\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "irc" n 0\&.7\&.0 tcllib "Low Level Tcl IRC Interface"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'irc\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "irc" n 0\&.6\&.1 tcllib "Low Level Tcl IRC Interface"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
.de MT
.QW ""
..
.BS
.SH NAME
irc \- Create IRC connection and interface\&.
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBirc  ?0\&.7\&.0?\fR
.sp
\fB::irc::config\fR ?key? ?value?
.sp
\fB::irc::connection\fR
.sp
\fB::irc::connections\fR
.sp







|

|







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
.de MT
.QW ""
..
.BS
.SH NAME
irc \- Create IRC connection and interface\&.
.SH SYNOPSIS
package require \fBTcl \fR
.sp
package require \fBirc  ?0\&.6\&.1?\fR
.sp
\fB::irc::config\fR ?key? ?value?
.sp
\fB::irc::connection\fR
.sp
\fB::irc::connections\fR
.sp
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIirc\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
rfc 1459
.SH KEYWORDS
chat, irc
.SH CATEGORY
Networking







<
<
<
<
<
<
<
<






522
523
524
525
526
527
528








529
530
531
532
533
534
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIirc\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
rfc 1459
.SH KEYWORDS
chat, irc
.SH CATEGORY
Networking

Changes to idoc/man/files/modules/irc/picoirc.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'picoirc\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "picoirc" n 0\&.7\&.0 tcllib "Simple embeddable IRC interface"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'picoirc\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "picoirc" n 0\&.5\&.2 tcllib "Simple embeddable IRC interface"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
.de MT
.QW ""
..
.BS
.SH NAME
picoirc \- Small and simple embeddable IRC client\&.
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBpicoirc  ?0\&.7\&.0?\fR
.sp
\fB::picoirc::connect\fR \fIcallback\fR \fInick\fR ?\fIpassword\fR? \fIurl\fR
.sp
\fB::picoirc::post\fR \fIcontext\fR \fIchannel\fR \fImessage\fR
.sp
\fB::picoirc::splituri\fR \fIuri\fR
.sp
\fB::picoirc::send\fR \fIcontext\fR \fIline\fR
.sp







|

|

|







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
.de MT
.QW ""
..
.BS
.SH NAME
picoirc \- Small and simple embeddable IRC client\&.
.SH SYNOPSIS
package require \fBTcl \fR
.sp
package require \fBpicoirc  ?0\&.5\&.2?\fR
.sp
\fB::picoirc::connect\fR \fIcallback\fR \fInick\fR \fIurl\fR
.sp
\fB::picoirc::post\fR \fIcontext\fR \fIchannel\fR \fImessage\fR
.sp
\fB::picoirc::splituri\fR \fIuri\fR
.sp
\fB::picoirc::send\fR \fIcontext\fR \fIline\fR
.sp
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
is the irc connection context\&. See \fBCALLBACK\fR for details\&.
.PP
This package is a fairly simple IRC client\&. If you need something with
more capability investigate the \fBirc\fR package\&.
.PP
.SH COMMANDS
.TP
\fB::picoirc::connect\fR \fIcallback\fR \fInick\fR ?\fIpassword\fR? \fIurl\fR
Creates a new irc connection to the server specified by \fIurl\fR and
login using the \fInick\fR as the username and optionally \fIpassword\fR\&.
If the \fIurl\fR starts with \fIircs://\fR then a TLS connection is
created\&. The \fIcallback\fR must be as specified in \fBCALLBACK\fR\&.
Returns a package-specific variable that is used when calling other
commands in this package\&.
.sp
\fINote:\fR
For connecting via TLS the Tcl module \fItls\fR must be already
loaded, otherwise an error is raised\&.
.CS


# must be loaded for TLS
package require tls
# default arguments
tls::init -autoservername true -command workaround \\
    -require 1 -cadir /etc/ssl/certs -tls1 0 -tls1\&.1 0
# avoid annoying bgerror, errors are already catched internally
proc workaround {state args} {
    if {$state == "verify"} {
        return [lindex $args 3]
    }
}

.CE
.TP
\fB::picoirc::post\fR \fIcontext\fR \fIchannel\fR \fImessage\fR
This should be called to process user input and send it to the
server\&. A number of commands are recognised when prefixed with a
forward-slash (/)\&. Such commands are converted to IRC command
sequences and then sent\&.
.TP
\fB::picoirc::splituri\fR \fIuri\fR
Splits an IRC scheme uniform resource indicator into its component
parts\&. Returns a list of server, port, channel and secure where
secure is a boolean flag which is \fBtrue\fR if a TLS connection was
requested via the \fIircs://\fR schema\&. The default port is 6667 (or
6697 if secured) and there is no default channel\&.
.TP
\fB::picoirc::send\fR \fIcontext\fR \fIline\fR
This command is where all raw output to the server is handled\&. The
default action is to write the \fIline\fR to the irc socket\&. However,
before this happens the callback is called with "debug write"\&. This
permits the application author to inspect the raw IRC data and if
desired to return a break error code to halt further processing\&. In







|
|
|
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









|
<
<
|







299
300
301
302
303
304
305
306
307
308


309
310




















311
312
313
314
315
316
317
318
319
320


321
322
323
324
325
326
327
328
is the irc connection context\&. See \fBCALLBACK\fR for details\&.
.PP
This package is a fairly simple IRC client\&. If you need something with
more capability investigate the \fBirc\fR package\&.
.PP
.SH COMMANDS
.TP
\fB::picoirc::connect\fR \fIcallback\fR \fInick\fR \fIurl\fR
Create a new irc connection to the server specified by \fIurl\fR and
login using the \fInick\fR as the username\&. The \fIcallback\fR must be


as specified in \fBCALLBACK\fR\&. Returns a package-specific variable
that is used when calling other commands in this package\&.




















.TP
\fB::picoirc::post\fR \fIcontext\fR \fIchannel\fR \fImessage\fR
This should be called to process user input and send it to the
server\&. A number of commands are recognised when prefixed with a
forward-slash (/)\&. Such commands are converted to IRC command
sequences and then sent\&.
.TP
\fB::picoirc::splituri\fR \fIuri\fR
Splits an IRC scheme uniform resource indicator into its component
parts\&. Returns a list of server, port and channel\&. The default port is


6667 and there is no default channel\&.
.TP
\fB::picoirc::send\fR \fIcontext\fR \fIline\fR
This command is where all raw output to the server is handled\&. The
default action is to write the \fIline\fR to the irc socket\&. However,
before this happens the callback is called with "debug write"\&. This
permits the application author to inspect the raw IRC data and if
desired to return a break error code to halt further processing\&. In

Changes to idoc/man/files/modules/javascript/javascript.n.

358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIjavascript\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
html, ncgi
.SH KEYWORDS
checkbox, html, javascript, selectionbox, submitbutton
.SH CATEGORY
CGI programming







<
<
<
<
<
<
<
<






358
359
360
361
362
363
364








365
366
367
368
369
370
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIjavascript\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
html, ncgi
.SH KEYWORDS
checkbox, html, javascript, selectionbox, submitbutton
.SH CATEGORY
CGI programming

Changes to idoc/man/files/modules/jpeg/jpeg.n.

469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIjpeg\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
comment, exif, image, jfif, jpeg, thumbnail
.SH CATEGORY
File formats
.SH COPYRIGHT
.nf
Copyright (c) 2004-2005, Code: Aaron Faupell <afaupell@users\&.sourceforge\&.net>
Copyright (c) 2007, Code:  Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2004-2009, Doc:  Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2011, Code: Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<












469
470
471
472
473
474
475








476
477
478
479
480
481
482
483
484
485
486
487
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIjpeg\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
comment, exif, image, jfif, jpeg, thumbnail
.SH CATEGORY
File formats
.SH COPYRIGHT
.nf
Copyright (c) 2004-2005, Code: Aaron Faupell <afaupell@users\&.sourceforge\&.net>
Copyright (c) 2007, Code:  Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2004-2009, Doc:  Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2011, Code: Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/json/json.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'json\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2006 ActiveState Software Inc\&.
'\" Copyright (c) 2009 Thomas Maeder, Glue Software Engineering AG
'\"
.TH "json" n 1\&.3\&.4 tcllib "JSON"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,





|







1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'json\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2006 ActiveState Software Inc\&.
'\" Copyright (c) 2009 Thomas Maeder, Glue Software Engineering AG
'\"
.TH "json" n 1\&.3\&.3 tcllib "JSON"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
json \- JSON parser
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBjson  ?1\&.3\&.4?\fR
.sp
\fB::json::json2dict\fR \fItxt\fR
.sp
\fB::json::many-json2dict\fR \fItxt\fR ?\fImax\fR?
.sp
.BE
.SH DESCRIPTION







|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
json \- JSON parser
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBjson  ?1\&.3\&.3?\fR
.sp
\fB::json::json2dict\fR \fItxt\fR
.sp
\fB::json::many-json2dict\fR \fItxt\fR ?\fImax\fR?
.sp
.BE
.SH DESCRIPTION
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
        "IDs": [116, 943, 234, 38793]
    }
}
=>
Image {IDs {116 943 234 38793} Thumbnail {Width 100 Height 125 Url http://www\&.example\&.com/image/481989943} Width 800 Height 600 Title {View from 15th Floor}}

.CE
.SH RELATED
To write json, instead of parsing it, see package \fBjson::write\fR\&.
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIjson\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
data exchange, exchange format, javascript, json
.SH CATEGORY
CGI programming
.SH COPYRIGHT
.nf
Copyright (c) 2006 ActiveState Software Inc\&.
Copyright (c) 2009 Thomas Maeder, Glue Software Engineering AG

.fi







<
<







<
<
<
<
<
<
<
<










364
365
366
367
368
369
370


371
372
373
374
375
376
377








378
379
380
381
382
383
384
385
386
387
        "IDs": [116, 943, 234, 38793]
    }
}
=>
Image {IDs {116 943 234 38793} Thumbnail {Width 100 Height 125 Url http://www\&.example\&.com/image/481989943} Width 800 Height 600 Title {View from 15th Floor}}

.CE


.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIjson\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
data exchange, exchange format, javascript, json
.SH CATEGORY
CGI programming
.SH COPYRIGHT
.nf
Copyright (c) 2006 ActiveState Software Inc\&.
Copyright (c) 2009 Thomas Maeder, Glue Software Engineering AG

.fi

Changes to idoc/man/files/modules/json/json_write.n.

340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
.TP
\fB::json::write\fR \fBobject\fR \fIkey\fR \fIvalue\fR\&.\&.\&.
This method takes a series of key/value arguments, the values already
formatted for JSON, and returns them as a properly formatted JSON
object as its result, with the keys formatted as JSON strings\&.
.PP
.PP
.SH RELATED
To parse json, instead of writing it, see package \fBjson\fR\&.
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIjson\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
data exchange, exchange format, javascript, json
.SH CATEGORY
CGI programming
.SH COPYRIGHT
.nf
Copyright (c) 2009-2013 Andreas Kupries <andreas_kupries@sourceforge\&.net>

.fi







<
<







<
<
<
<
<
<
<
<









340
341
342
343
344
345
346


347
348
349
350
351
352
353








354
355
356
357
358
359
360
361
362
.TP
\fB::json::write\fR \fBobject\fR \fIkey\fR \fIvalue\fR\&.\&.\&.
This method takes a series of key/value arguments, the values already
formatted for JSON, and returns them as a properly formatted JSON
object as its result, with the keys formatted as JSON strings\&.
.PP
.PP


.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIjson\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
data exchange, exchange format, javascript, json
.SH CATEGORY
CGI programming
.SH COPYRIGHT
.nf
Copyright (c) 2009-2013 Andreas Kupries <andreas_kupries@sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/lambda/lambda.n.

350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIlambda\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
apply(n), proc(n)
.SH KEYWORDS
anonymous procedure, callback, command prefix, currying, lambda, partial application, proc
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries, BSD licensed

.fi







<
<
<
<
<
<
<
<











350
351
352
353
354
355
356








357
358
359
360
361
362
363
364
365
366
367
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIlambda\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
apply(n), proc(n)
.SH KEYWORDS
anonymous procedure, callback, command prefix, currying, lambda, partial application, proc
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries, BSD licensed

.fi

Deleted idoc/man/files/modules/lazyset/lazyset.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
'\"
'\" Generated from file 'lazyset\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2018 Roy Keene
'\"
.TH "lazyset" n 1 tcllib "Lazy evaluation for variables and arrays"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
lazyset \- Lazy evaluation
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBlazyset  ?1?\fR
.sp
\fB::lazyset::variable\fR ?\fI-array boolean\fR? ?\fI-appendArgs boolean\fR? \fIvariableName\fR \fIcommandPrefix\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBlazyset\fR package provides a mechanism for deferring execution
of code until a specific variable or any index of an array is referenced\&.
.SH COMMANDS
.TP
\fB::lazyset::variable\fR ?\fI-array boolean\fR? ?\fI-appendArgs boolean\fR? \fIvariableName\fR \fIcommandPrefix\fR
Arrange for the code specified as \fIcommandPrefix\fR to be executed when
the variable whose name is specified by \fIvariableName\fR is read for
the first time\&.
If the optional argument \fI-array boolean\fR is specified as true,
then the variable specified as \fIvariableName\fR is treated as an
array and attempting to read any index of the array causes that
index to be set by the \fIcommandPrefix\fR as they are read\&.
If the optional argument \fI-appendArgs boolean\fR is specified as
false, then the variable name and subnames are not appended to the
\fIcommandPrefix\fR before it is evaluated\&.  If the argument
\fI-appendArgs boolean\fR is not specified or is specified as true
then 1 or 2 additional arguments are appended to the \fIcommandPrefix\fR\&.
If \fI-array boolean\fR is specified as true, then 2 arguments are
appended corresponding to the name of the variable and the index,
otherwise 1 argument is appended containing the name of variable\&.
The \fIcommandPrefix\fR code is run in the same scope as the variable
is read\&.
.PP
.SH EXAMPLES
.CS


	::lazyset::variable page {apply {{name} {
		package require http
		set token [http::geturl http://www\&.tcl\&.tk/]
		set data [http::data $token]
		return $data
	}}}

	puts $page

.CE
.CS


	::lazyset::variable -array true page {apply {{name index} {
		package require http
		set token [http::geturl $index]
		set data [http::data $token]
		return $data
	}}}

	puts $page(http://www\&.tcl\&.tk/)

.CE
.CS


	::lazyset::variable -appendArgs false simple {
		return -level 0 42
	}

	puts $simple

.CE
.SH AUTHORS
Roy Keene
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIutility\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2018 Roy Keene

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/ldap/ldap.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
'\"
'\" Generated from file 'ldap\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\" Copyright (c) 2004 Jochen Loewer <loewerj@web\&.de>
'\" Copyright (c) 2006 Michael Schlenker <mic42@users\&.sourceforge\&.net>
'\"
.TH "ldap" n 1\&.10 tcllib "LDAP client"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
'\"
'\" Generated from file 'ldap\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\" Copyright (c) 2004 Jochen Loewer <loewerj@web\&.de>
'\" Copyright (c) 2006 Michael Schlenker <mic42@users\&.sourceforge\&.net>
'\"
.TH "ldap" n 1\&.6\&.9 tcllib "LDAP client"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
.de MT
.QW ""
..
.BS
.SH NAME
ldap \- LDAP client
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBldap  ?1\&.10?\fR
.sp
\fB::ldap::connect\fR \fIhost\fR ?\fIport\fR?
.sp
\fB::ldap::tlsoptions\fR \fBreset\fR
.sp
\fB::ldap::tlsoptions\fR ?\fIopt1\fR \fIval1\fR? ?\fIopt2\fR \fIval2\fR? \&.\&.\&.
.sp
\fB::ldap::secure_connect\fR \fIhost\fR ?\fIport\fR?
.sp
\fB::ldap::secure_connect\fR \fIhost\fR ?\fIport\fR? ?\fIverify_cert\fR? ?\fIsni_servername\fR?
.sp
\fB::ldap::disconnect\fR \fIhandle\fR
.sp
\fB::ldap::starttls\fR \fIhandle\fR
.sp
\fB::ldap::starttls\fR \fIhandle\fR ?\fIcafile\fR? ?\fIcertfile\fR? ?\fIkeyfile\fR? ?\fIverify_cert\fR? ?\fIsni_servername\fR?
.sp
\fB::ldap::bind\fR \fIhandle\fR ?\fIname\fR? ?\fIpassword\fR?
.sp
\fB::ldap::bindSASL\fR \fIhandle\fR ?\fIname\fR? ?\fIpassword\fR?
.sp
\fB::ldap::unbind\fR \fIhandle\fR
.sp







|

|



<
<
<
<


<
<


<
<
|







272
273
274
275
276
277
278
279
280
281
282
283
284




285
286


287
288


289
290
291
292
293
294
295
296
.de MT
.QW ""
..
.BS
.SH NAME
ldap \- LDAP client
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBldap  ?1\&.8?\fR
.sp
\fB::ldap::connect\fR \fIhost\fR ?\fIport\fR?
.sp




\fB::ldap::secure_connect\fR \fIhost\fR ?\fIport\fR?
.sp


\fB::ldap::disconnect\fR \fIhandle\fR
.sp


\fB::ldap::starttls\fR \fIhandle\fR ?\fIcafile\fR? ?\fIcertfile\fR? ?\fIkeyfile\fR?
.sp
\fB::ldap::bind\fR \fIhandle\fR ?\fIname\fR? ?\fIpassword\fR?
.sp
\fB::ldap::bindSASL\fR \fIhandle\fR ?\fIname\fR? ?\fIpassword\fR?
.sp
\fB::ldap::unbind\fR \fIhandle\fR
.sp
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376

377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519



520
521
522
523
524
525
526
.sp
\fB::ldap::info\fR \fBbounduser\fR \fIhandle\fR
.sp
\fB::ldap::info\fR \fBconnections\fR
.sp
\fB::ldap::info\fR \fBtls\fR \fIhandle\fR
.sp
\fB::ldap::info\fR \fBtlsstatus\fR \fIhandle\fR
.sp
\fB::ldap::info\fR \fBsaslmechanisms\fR \fIhandle\fR
.sp
\fB::ldap::info\fR \fBcontrol\fR \fIhandle\fR
.sp
\fB::ldap::info\fR \fBextensions\fR \fIextensions\fR
.sp
\fB::ldap::info\fR \fBwhoami\fR \fIhandle\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBldap\fR package provides a Tcl-only client library
for the LDAPv3 protocol as specified in
RFC 4511 (\fIhttp://www\&.rfc-editor\&.org/rfc/rfc4511\&.txt\fR)\&.
It works by opening the standard (or secure) LDAP socket on the
server, and then providing a Tcl API to access the LDAP protocol
commands\&.  All server errors are returned as Tcl errors (thrown) which
must be caught with the Tcl \fBcatch\fR command\&.
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBLDAPS\fR connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
.PP
For example, in light of the recent
\fIPOODLE attack\fR [http://googleonlinesecurity\&.blogspot\&.co\&.uk/2014/10/this-poodle-bites-exploiting-ssl-30\&.html] discovered by Google many servers will disable support
for the SSLv3 protocol\&.
To handle this change the applications using \fBTLS\fR must be
patched, and not this package, nor \fBTLS\fR itself\&.
Such a patch may be as simple as generally activating \fBtls1\fR
support, as shown in the example below\&.
.CS



    ldap::tlsoptions -tls1 1 -ssl2 0 -ssl3 0 ;# forcibly activate support for the TLS1 protocol

    \&.\&.\&. your own application code \&.\&.\&.

.CE
.SH COMMANDS
.TP
\fB::ldap::connect\fR \fIhost\fR ?\fIport\fR?
Opens a LDAPv3 connection to the specified \fIhost\fR, at the given
\fIport\fR, and returns a token for the connection\&. This token is the
\fIhandle\fR argument for all other commands\&. If no \fIport\fR is
specified it will default to \fB389\fR\&.
.sp
The command blocks until the connection has been established, or
establishment definitely failed\&.
.TP
\fB::ldap::tlsoptions\fR \fBreset\fR
This command resets TLS options to default values\&. It returns the
set of options\&.
Using this command is incompatible with the obsolete
form of \fB::ldap::secure_connect\fR and \fB::ldap_starttls\fR\&.
.TP
\fB::ldap::tlsoptions\fR ?\fIopt1\fR \fIval1\fR? ?\fIopt2\fR \fIval2\fR? \&.\&.\&.
This commands adds one or more options to some value, and may be used
more than one time in order to add options in several steps\&.  A complete
description of options may be found in the \fBtls\fR package
documentation\&. Valid options and values are:
.RS
.TP
\fB-cadir\fR directory
Provide the directory containing the CA certificates\&.
No default\&.
.TP
\fB-cafile\fR file
Provide the CA file\&.
No default\&.
.TP
\fB-cipher\fR string
Provide the cipher suites to use\&.
No default\&.
.TP
\fB-dhparams\fR file
Provide a Diffie-Hellman parameters file\&.
No default\&.
.TP
\fB-request\fR boolean
Request a certificate from peer during SSL handshake\&.
Default: true\&.
.TP
\fB-require\fR boolean
Require a valid certificate from peer during SSL handshake\&. If this is
set to true then -request must also be set to true\&.
Default: false
.TP
\fB-servername\fR host
Only available if the OpenSSL library the TLS package is linked against
supports the TLS hostname extension for 'Server Name Indication'
(SNI)\&. Use to name the logical host we are talking to and expecting a
certificate for\&.
No default\&.
.TP
\fB-ssl2\fR bool
Enable use of SSL v2\&.
Default: false
.TP
\fB-ssl3\fR bool
Enable use of SSL v3\&.
Default: false
.TP
\fB-tls1\fR bool
Enable use of TLS v1
Default: true
.TP
\fB-tls1\&.1\fR bool
Enable use of TLS v1\&.1
Default: true
.TP
\fB-tls1\&.2\fR bool
Enable use of TLS v1\&.2
Default: true
.RE
.sp
This command returns the current set of TLS options and values\&.
In particular, one may use this command without any arguments to get
the current set of options\&.
.sp
Using this command is incompatible with the obsolete
form of \fB::ldap::secure_connect\fR and \fB::ldap_starttls\fR
(see below)\&.
.TP
\fB::ldap::secure_connect\fR \fIhost\fR ?\fIport\fR?
Like \fB::ldap::connect\fR, except that the created connection is
secured by SSL\&. The port defaults to \fB636\fR\&.  This command
depends on the availability of the package \fBTLS\fR, which is a
SSL binding for Tcl\&. If \fBTLS\fR is not available, then this
command will fail\&.
.sp
TLS options are specified with \fB::ldap::tlsoptions\fR\&.
.sp
The command blocks until the connection has been established, or
establishment definitely failed\&.
.TP
\fB::ldap::secure_connect\fR \fIhost\fR ?\fIport\fR? ?\fIverify_cert\fR? ?\fIsni_servername\fR?
Note: this form of the command is deprecated, since TLS options had
to be specified with a combination of parameters to this command
(\fIverify_cert\fR and \fIsni_servername\fR) and arguments to \fB::tls::init\fR
(from package \fBtls\fR) for example to setup defaults for trusted
certificates\&. Prefer the above form (without the \fIverify_cert\fR and
\fIsni_servername\fR parameters) and set TLS options with
\fB::ldap::tlsoptions\fR\&.
.sp
If \fIverify_cert\fR is set to 1, the default, this checks the server certificate against
the known hosts\&. If \fIsni_servername\fR is set, the given hostname is used as the
hostname for Server Name Indication in the TLS handshake\&.
.sp
Use \fB::tls::init\fR to setup defaults for trusted certificates\&.
.sp
TLS supports different protocol levels\&. In common use are the versions 1\&.0, 1\&.1 and 1\&.2\&.
By default all those versions are offered\&. If you need to modify the acceptable
protocols, you can change the ::ldap::tlsProtocols list (deprecated)\&.
.TP
\fB::ldap::disconnect\fR \fIhandle\fR
Closes the ldap connection refered to by the token
\fIhandle\fR\&. Returns the empty string as its result\&.
.TP
\fB::ldap::starttls\fR \fIhandle\fR
Start TLS negotiation on the connection denoted by \fIhandle\fR,
with TLS parameters set with \fB::ldap::tlsoptions\fR\&.
.TP
\fB::ldap::starttls\fR \fIhandle\fR ?\fIcafile\fR? ?\fIcertfile\fR? ?\fIkeyfile\fR? ?\fIverify_cert\fR? ?\fIsni_servername\fR?
Note: this form of the command is deprecated, since TLS options had
to be specified with a combination of parameters to this command
(\fIcafile\fR, \fIcertfile\fR, \fIkeyfile\fR, \fIverify_cert\fR
and \fIsni_servername\fR) and arguments to \fB::tls::init\fR
(from package \fBtls\fR)\&.
Prefer the above form (without specific TLS arguments)
and set TLS options with \fB::ldap::tlsoptions\fR\&.
.sp
Start TLS negotiation on the connection denoted by \fIhandle\fR\&.
You need to set at least the \fIcafile\fR argument to a file with trusted certificates, if \fIverify_cert\fR is 1, which is the default\&.
The \fIsni_servername\fR can be used to signal a different hostname during the TLS handshake\&.
The announced protocols are determined in the same way as \fB::ldap::secure_connect\fR\&.
You can specify a TLS client certificate with the \fIcertfile\fR and \fIkeyfile\fR options\&.



.TP
\fB::ldap::bind\fR \fIhandle\fR ?\fIname\fR? ?\fIpassword\fR?
This command authenticates the ldap connection refered to by the token
in \fIhandle\fR, with a user name and associated password\&. It blocks
until a response from the ldap server arrives\&. Its result is the empty
string\&.
Both \fIname\fR and \fIpasswd\fR default to the empty string if they







<
<



















<
|
|


















>
|















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







<
<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




<
<
<
<
|
<
<
<
<
<
<
<
<

<
<
<
<
>
>
>







320
321
322
323
324
325
326


327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345

346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382










































































383
384
385
386
387
388
389


390
391
392



















393
394
395
396




397








398




399
400
401
402
403
404
405
406
407
408
.sp
\fB::ldap::info\fR \fBbounduser\fR \fIhandle\fR
.sp
\fB::ldap::info\fR \fBconnections\fR
.sp
\fB::ldap::info\fR \fBtls\fR \fIhandle\fR
.sp


\fB::ldap::info\fR \fBsaslmechanisms\fR \fIhandle\fR
.sp
\fB::ldap::info\fR \fBcontrol\fR \fIhandle\fR
.sp
\fB::ldap::info\fR \fBextensions\fR \fIextensions\fR
.sp
\fB::ldap::info\fR \fBwhoami\fR \fIhandle\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBldap\fR package provides a Tcl-only client library
for the LDAPv3 protocol as specified in
RFC 4511 (\fIhttp://www\&.rfc-editor\&.org/rfc/rfc4511\&.txt\fR)\&.
It works by opening the standard (or secure) LDAP socket on the
server, and then providing a Tcl API to access the LDAP protocol
commands\&.  All server errors are returned as Tcl errors (thrown) which
must be caught with the Tcl \fBcatch\fR command\&.
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
.PP
For example, in light of the recent
\fIPOODLE attack\fR [http://googleonlinesecurity\&.blogspot\&.co\&.uk/2014/10/this-poodle-bites-exploiting-ssl-30\&.html] discovered by Google many servers will disable support
for the SSLv3 protocol\&.
To handle this change the applications using \fBTLS\fR must be
patched, and not this package, nor \fBTLS\fR itself\&.
Such a patch may be as simple as generally activating \fBtls1\fR
support, as shown in the example below\&.
.CS


    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    \&.\&.\&. your own application code \&.\&.\&.

.CE
.SH COMMANDS
.TP
\fB::ldap::connect\fR \fIhost\fR ?\fIport\fR?
Opens a LDAPv3 connection to the specified \fIhost\fR, at the given
\fIport\fR, and returns a token for the connection\&. This token is the
\fIhandle\fR argument for all other commands\&. If no \fIport\fR is
specified it will default to \fB389\fR\&.
.sp
The command blocks until the connection has been established, or
establishment definitely failed\&.
.TP










































































\fB::ldap::secure_connect\fR \fIhost\fR ?\fIport\fR?
Like \fB::ldap::connect\fR, except that the created connection is
secured by SSL\&. The port defaults to \fB636\fR\&.  This command
depends on the availability of the package \fBTLS\fR, which is a
SSL binding for Tcl\&. If \fBTLS\fR is not available, then this
command will fail\&.
.sp


The command blocks until the connection has been established, or
establishment definitely failed\&.
.TP



















\fB::ldap::disconnect\fR \fIhandle\fR
Closes the ldap connection refered to by the token
\fIhandle\fR\&. Returns the empty string as its result\&.
.TP




\fB::ldap::starttls\fR \fIhandle\fR ?\fIcafile\fR? ?\fIcertfile\fR? ?\fIkeyfile\fR?








Start TLS negotiation on the connection denoted by \fIhandle\fR\&.




This is currently experimental and subject to change, more control over the TLS details
will probably be exposed later, to allow users to fine tune the negotiation according
to their security needs\&.
.TP
\fB::ldap::bind\fR \fIhandle\fR ?\fIname\fR? ?\fIpassword\fR?
This command authenticates the ldap connection refered to by the token
in \fIhandle\fR, with a user name and associated password\&. It blocks
until a response from the ldap server arrives\&. Its result is the empty
string\&.
Both \fIname\fR and \fIpasswd\fR default to the empty string if they
742
743
744
745
746
747
748

749
750
751
752
753
754
755
\fB::ldap::delete\fR \fIhandle\fR \fIdn\fR
This command removes the object specified by \fIdn\fR, and all its
attributes from the server\&.
The command blocks until the operation has completed\&. Its result
is the empty string\&.
.TP
\fB::ldap::modifyDN\fR \fIhandle\fR \fIdn\fR \fInewrdn\fR ?\fIdeleteOld\fR? ?\fInewSuperior\fR?

This command moves or copies the object specified by \fIdn\fR
to a new location in the tree of object\&. This location is
specified by \fInewrdn\fR, a \fIrelative\fR designation,
or by \fInewrdn\fR and \fInewSuperior\fR, a \fIabsolute\fR designation\&.
The optional argument \fIdeleteOld\fR defaults to \fBtrue\fR,
i\&.e\&. a move operation\&. If \fIdeleteOld\fR is not set, then the
operation will create a copy of \fIdn\fR in the new location\&.







>







624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
\fB::ldap::delete\fR \fIhandle\fR \fIdn\fR
This command removes the object specified by \fIdn\fR, and all its
attributes from the server\&.
The command blocks until the operation has completed\&. Its result
is the empty string\&.
.TP
\fB::ldap::modifyDN\fR \fIhandle\fR \fIdn\fR \fInewrdn\fR ?\fIdeleteOld\fR? ?\fInewSuperior\fR?
]
This command moves or copies the object specified by \fIdn\fR
to a new location in the tree of object\&. This location is
specified by \fInewrdn\fR, a \fIrelative\fR designation,
or by \fInewrdn\fR and \fInewSuperior\fR, a \fIabsolute\fR designation\&.
The optional argument \fIdeleteOld\fR defaults to \fBtrue\fR,
i\&.e\&. a move operation\&. If \fIdeleteOld\fR is not set, then the
operation will create a copy of \fIdn\fR in the new location\&.
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
\fB::ldap::info\fR \fBconnections\fR
This command returns all currently existing ldap connection handles\&.
.TP
\fB::ldap::info\fR \fBtls\fR \fIhandle\fR
This command returns 1 if the ldap connection \fIhandle\fR used TLS/SSL for
connection via \fBldap::secure_connect\fR or completed \fBldap::starttls\fR, 0 otherwise\&.
.TP
\fB::ldap::info\fR \fBtlsstatus\fR \fIhandle\fR
This command returns the current security status of an TLS secured
channel\&. The result is a list of key-value pairs describing the connected
peer (see the \fBTLS\fR package documentation for the returned values)\&.
If the connection is not secured with TLS, an empty list is returned\&.
.TP
\fB::ldap::info\fR \fBsaslmechanisms\fR \fIhandle\fR
Return the supported SASL mechanisms advertised by the server\&. Only valid in a
bound state (anonymous or other)\&.
.TP
\fB::ldap::info\fR \fBcontrol\fR \fIhandle\fR
Return the supported controls advertised by the server as a list of OIDs\&. Only valid in a bound state\&.
This is currently experimental and subject to change\&.







<
<
<
<
<
<







657
658
659
660
661
662
663






664
665
666
667
668
669
670
\fB::ldap::info\fR \fBconnections\fR
This command returns all currently existing ldap connection handles\&.
.TP
\fB::ldap::info\fR \fBtls\fR \fIhandle\fR
This command returns 1 if the ldap connection \fIhandle\fR used TLS/SSL for
connection via \fBldap::secure_connect\fR or completed \fBldap::starttls\fR, 0 otherwise\&.
.TP






\fB::ldap::info\fR \fBsaslmechanisms\fR \fIhandle\fR
Return the supported SASL mechanisms advertised by the server\&. Only valid in a
bound state (anonymous or other)\&.
.TP
\fB::ldap::info\fR \fBcontrol\fR \fIhandle\fR
Return the supported controls advertised by the server as a list of OIDs\&. Only valid in a bound state\&.
This is currently experimental and subject to change\&.
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
    ldap::delete $handle $dn

    ldap::unbind     $handle
    ldap::disconnect $handle

.CE
.PP
And another example, a simple query, and processing the
results\&.
.PP
.CS


    package require ldap
    set handle [ldap::connect ldap\&.acme\&.com 389]







|







737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
    ldap::delete $handle $dn

    ldap::unbind     $handle
    ldap::disconnect $handle

.CE
.PP
And a another example, a simple query, and processing the
results\&.
.PP
.CS


    package require ldap
    set handle [ldap::connect ldap\&.acme\&.com 389]
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIldap\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
directory access, internet, ldap, ldap client, protocol, rfc 2251, rfc 4511, x\&.500
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2004 Jochen Loewer <loewerj@web\&.de>
Copyright (c) 2006 Michael Schlenker <mic42@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











786
787
788
789
790
791
792








793
794
795
796
797
798
799
800
801
802
803
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIldap\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
directory access, internet, ldap, ldap client, protocol, rfc 2251, rfc 4511, x\&.500
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2004 Jochen Loewer <loewerj@web\&.de>
Copyright (c) 2006 Michael Schlenker <mic42@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/ldap/ldapx.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'ldapx\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2006-2018 Pierre David <pdav@users\&.sourceforge\&.net>
'\"
.TH "ldapx" n 1\&.2 tcllib "LDAP extended object interface"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'ldapx\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2006 Pierre David <pdav@users\&.sourceforge\&.net>
'\"
.TH "ldapx" n 0\&.2\&.5 tcllib "LDAP extended object interface"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
ldapx \- LDAP extended object interface
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBldapx  ?1\&.2?\fR
.sp
\fIe\fR \fBreset\fR
.sp
\fIe\fR \fBdn\fR ?\fInewdn\fR?
.sp
\fIe\fR \fBrdn\fR
.sp







|

|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
ldapx \- LDAP extended object interface
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBldapx  ?1\&.0?\fR
.sp
\fIe\fR \fBreset\fR
.sp
\fIe\fR \fBdn\fR ?\fInewdn\fR?
.sp
\fIe\fR \fBrdn\fR
.sp
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
.sp
\fIce\fR \fBchange\fR ?\fInew\fR?
.sp
\fIce\fR \fBdiff\fR \fInew\fR ?\fIold\fR?
.sp
\fIla\fR \fBerror\fR ?\fInewmsg\fR?
.sp
\fIla\fR \fBconnect\fR \fIurl\fR ?\fIbinddn\fR? ?\fIbindpw\fR? ?\fIstarttls\fR?
.sp
\fIla\fR \fBdisconnect\fR
.sp
\fIla\fR \fBtraverse\fR \fIbase\fR \fIfilter\fR \fIattrs\fR \fIentry\fR \fIbody\fR
.sp
\fIla\fR \fBsearch\fR \fIbase\fR \fIfilter\fR \fIattrs\fR
.sp







|







322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
.sp
\fIce\fR \fBchange\fR ?\fInew\fR?
.sp
\fIce\fR \fBdiff\fR \fInew\fR ?\fIold\fR?
.sp
\fIla\fR \fBerror\fR ?\fInewmsg\fR?
.sp
\fIla\fR \fBconnect\fR \fIurl\fR ?\fIbinddn\fR? ?\fIbindpw\fR?
.sp
\fIla\fR \fBdisconnect\fR
.sp
\fIla\fR \fBtraverse\fR \fIbase\fR \fIfilter\fR \fIattrs\fR \fIentry\fR \fIbody\fR
.sp
\fIla\fR \fBsearch\fR \fIbase\fR \fIfilter\fR \fIattrs\fR
.sp
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
lastError
This variable contains the error message which appeared in
the last method of the \fBldap\fR class (this string is
modified in nearly all methods)\&. The \fBerror\fR method
may be used to fetch this message\&.
.PP
.SS "LDAP OPTIONS"
Options are configured on \fBldap\fR instances using the \fBconfigure\fR
method\&.
.PP
The first option is used for TLS parameters:
.TP
\fB-tlsoptions\fR \fIlist\fR
Specify the set of TLS options to use when connecting to the
LDAP server (see the \fBconnect\fR method)\&. For the list of
valid options, see the \fBLDAP\fR package documentation\&.
.sp
The default is \fB-request 1 -require 1 -ssl2 no -ssl3 no -tls1 yes -tls1\&.1 yes -tls1\&.2 yes\fR\&.
.sp
Example:
.sp
.CS

$l configure -tlsoptions {-request yes -require yes}
.CE
.PP
A set of options of the \fBldap\fR class is used during
search operations (methods \fBtraverse\fR, \fBsearch\fR and
\fBread\fR, see below)\&.
.TP
\fB-scope\fR \fBbase\fR|\fBone\fR|\fBsub\fR
Specify the scope of the LDAP search to be one of
\fBbase\fR, \fBone\fR or \fBsub\fR to specify
a base object, one-level or subtree search\&.







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|







656
657
658
659
660
661
662



















663
664
665
666
667
668
669
670
lastError
This variable contains the error message which appeared in
the last method of the \fBldap\fR class (this string is
modified in nearly all methods)\&. The \fBerror\fR method
may be used to fetch this message\&.
.PP
.SS "LDAP OPTIONS"



















A first set of options of the \fBldap\fR class is used during
search operations (methods \fBtraverse\fR, \fBsearch\fR and
\fBread\fR, see below)\&.
.TP
\fB-scope\fR \fBbase\fR|\fBone\fR|\fBsub\fR
Specify the scope of the LDAP search to be one of
\fBbase\fR, \fBone\fR or \fBsub\fR to specify
a base object, one-level or subtree search\&.
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
.TP
\fIla\fR \fBerror\fR ?\fInewmsg\fR?
This method returns the error message that occurred in the
last call to a \fBldap\fR class method\&. If the optional
argument \fInewmsg\fR is supplied, it becomes the last
error message\&.
.TP
\fIla\fR \fBconnect\fR \fIurl\fR ?\fIbinddn\fR? ?\fIbindpw\fR? ?\fIstarttls\fR?
This method connects to the LDAP server using given URL
(which can be of the form \fIldap://host:port\fR or
\fIldaps://host:port\fR)\&. If an optional \fIbinddn\fR
argument is given together with the \fIbindpw\fR argument,
the \fBconnect\fR binds to the LDAP server using the
specified DN and password\&.
.sp
If the \fIstarttls\fR argument is given a true value (\fB1\fR,
\fByes\fR, etc\&.) and the URL uses the \fIldap://\fR scheme,
a TLS negotiation is initiated with the newly created connection,
before LDAP binding\&.
Default value: \fBno\fR\&.
.sp
This method returns 1 if connection was successful, or 0 if an
error occurred (use the \fBerror\fR method to get the message)\&.
.TP
\fIla\fR \fBdisconnect\fR
This method disconnects (and unbinds, if necessary) from
the LDAP server\&.
.TP
\fIla\fR \fBtraverse\fR \fIbase\fR \fIfilter\fR \fIattrs\fR \fIentry\fR \fIbody\fR
This method is a new control structure\&. It searches the







|






<
<
<
<
<
<
<
<
<







723
724
725
726
727
728
729
730
731
732
733
734
735
736









737
738
739
740
741
742
743
.TP
\fIla\fR \fBerror\fR ?\fInewmsg\fR?
This method returns the error message that occurred in the
last call to a \fBldap\fR class method\&. If the optional
argument \fInewmsg\fR is supplied, it becomes the last
error message\&.
.TP
\fIla\fR \fBconnect\fR \fIurl\fR ?\fIbinddn\fR? ?\fIbindpw\fR?
This method connects to the LDAP server using given URL
(which can be of the form \fIldap://host:port\fR or
\fIldaps://host:port\fR)\&. If an optional \fIbinddn\fR
argument is given together with the \fIbindpw\fR argument,
the \fBconnect\fR binds to the LDAP server using the
specified DN and password\&.









.TP
\fIla\fR \fBdisconnect\fR
This method disconnects (and unbinds, if necessary) from
the LDAP server\&.
.TP
\fIla\fR \fBtraverse\fR \fIbase\fR \fIfilter\fR \fIattrs\fR \fIentry\fR \fIbody\fR
This method is a new control structure\&. It searches the
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
.SS "LDAP EXAMPLE"
.CS


    package require ldapx

    #
    # Connects to the LDAP directory using StartTLS
    #

    ::ldapx::ldap create l
    l configure -tlsoptions {-cadir /etc/ssl/certs -request yes -require yes}
    set url "ldap://server\&.mycomp\&.com"
    if {! [l connect $url "cn=admin,o=mycomp" "mypasswd" yes]} then {
	puts stderr "error: [l error]"
	exit 1
    }

    #
    # Search all entries matching some criterion
    #







|



<

|







782
783
784
785
786
787
788
789
790
791
792

793
794
795
796
797
798
799
800
801
.SS "LDAP EXAMPLE"
.CS


    package require ldapx

    #
    # Connects to the LDAP directory
    #

    ::ldapx::ldap create l

    set url "ldap://server\&.mycomp\&.com"
    if {! [l connect $url "cn=admin,o=mycomp" "mypasswd"]} then {
	puts stderr "error: [l error]"
	exit 1
    }

    #
    # Search all entries matching some criterion
    #
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
	c diff $e
	if {! [l commit c]} then {
	    puts stderr "error: [l error]"
	    exit 1
	}
	$e destroy
    }
    c destroy

    l disconnect
    l destroy

.CE
.SH "LDIF CLASS"
.SS "LDIF INSTANCE DATA"







<







825
826
827
828
829
830
831

832
833
834
835
836
837
838
	c diff $e
	if {! [l commit c]} then {
	    puts stderr "error: [l error]"
	    exit 1
	}
	$e destroy
    }


    l disconnect
    l destroy

.CE
.SH "LDIF CLASS"
.SS "LDIF INSTANCE DATA"
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIldap\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
directory access, internet, ldap, ldap client, ldif, protocol, rfc 2251, rfc 2849
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2006-2018 Pierre David <pdav@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


968
969
970
971
972
973
974








975
976
977
978
979
980
981
982
983
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIldap\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
directory access, internet, ldap, ldap client, ldif, protocol, rfc 2251, rfc 2849
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2006 Pierre David <pdav@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/log/log.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'log\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2001-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "log" n 1\&.4 tcllib "Logging facility"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'log\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2001-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "log" n 1\&.3 tcllib "Logging facility"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
log \- Procedures to log messages of libraries and applications\&.
.SH SYNOPSIS
package require \fBTcl  8\fR
.sp
package require \fBlog  ?1\&.4?\fR
.sp
\fB::log::levels\fR
.sp
\fB::log::lv2longform\fR \fIlevel\fR
.sp
\fB::log::lv2color\fR \fIlevel\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
log \- Procedures to log messages of libraries and applications\&.
.SH SYNOPSIS
package require \fBTcl  8\fR
.sp
package require \fBlog  ?1\&.3?\fR
.sp
\fB::log::levels\fR
.sp
\fB::log::lv2longform\fR \fIlevel\fR
.sp
\fB::log::lv2color\fR \fIlevel\fR
.sp
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
.sp
\fB::log::log\fR \fIlevel\fR \fItext\fR
.sp
\fB::log::logarray\fR \fIlevel\fR \fIarrayvar\fR ?\fIpattern\fR?
.sp
\fB::log::loghex\fR \fIlevel\fR \fItext\fR \fIdata\fR
.sp
\fB::log::logsubst\fR \fIlevel\fR \fImsg\fR
.sp
\fB::log::logMsg\fR \fItext\fR
.sp
\fB::log::logError\fR \fItext\fR
.sp
\fB::log::Puts\fR \fIlevel\fR \fItext\fR
.sp
.BE







<
<







312
313
314
315
316
317
318


319
320
321
322
323
324
325
.sp
\fB::log::log\fR \fIlevel\fR \fItext\fR
.sp
\fB::log::logarray\fR \fIlevel\fR \fIarrayvar\fR ?\fIpattern\fR?
.sp
\fB::log::loghex\fR \fIlevel\fR \fItext\fR \fIdata\fR
.sp


\fB::log::logMsg\fR \fItext\fR
.sp
\fB::log::logError\fR \fItext\fR
.sp
\fB::log::Puts\fR \fIlevel\fR \fItext\fR
.sp
.BE
429
430
431
432
433
434
435

436
437
438
439

440
441
442
443
444
445
446
their priority\&. This command can be used by the -command option of
lsort\&. The result is one of -1, 0 or 1 or an error\&. A result of -1
signals that level1 is of less priority than level2\&. 0 signals that
both levels have the same priority\&. 1 signals that level1 has higher
priority than level2\&.
.TP
\fB::log::lvSuppress\fR \fIlevel\fR {\fIsuppress\fR 1}

(Un)suppresses the output of messages having the specified
level\&. Unique abbreviations for the level are allowed here too\&.
.TP
\fB::log::lvSuppressLE\fR \fIlevel\fR {\fIsuppress\fR 1}

(Un)suppresses the output of messages having the specified level or
one of lesser priority\&. Unique abbreviations for the level are allowed
here too\&.
.TP
\fB::log::lvIsSuppressed\fR \fIlevel\fR
Asks the package whether the specified level is currently
suppressed\&. Unique abbreviations of level names are allowed\&.







>




>







427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
their priority\&. This command can be used by the -command option of
lsort\&. The result is one of -1, 0 or 1 or an error\&. A result of -1
signals that level1 is of less priority than level2\&. 0 signals that
both levels have the same priority\&. 1 signals that level1 has higher
priority than level2\&.
.TP
\fB::log::lvSuppress\fR \fIlevel\fR {\fIsuppress\fR 1}
]
(Un)suppresses the output of messages having the specified
level\&. Unique abbreviations for the level are allowed here too\&.
.TP
\fB::log::lvSuppressLE\fR \fIlevel\fR {\fIsuppress\fR 1}
]
(Un)suppresses the output of messages having the specified level or
one of lesser priority\&. Unique abbreviations for the level are allowed
here too\&.
.TP
\fB::log::lvIsSuppressed\fR \fIlevel\fR
Asks the package whether the specified level is currently
suppressed\&. Unique abbreviations of level names are allowed\&.
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
\fIpattern\fR\&. The pattern defaults to \fB*\fR (i\&.e\&. all entries) if
none was specified\&.
.TP
\fB::log::loghex\fR \fIlevel\fR \fItext\fR \fIdata\fR
Like \fB::log::log\fR, but assumes that \fIdata\fR contains binary
data\&. It converts this into a mixed hex/ascii representation before
writing them to the log\&.
.TP
\fB::log::logsubst\fR \fIlevel\fR \fImsg\fR
Like \fB::log::log\fR, but \fImsg\fR may contain substitutions and variable references, which are evaluated in the caller scope first\&.
The purpose of this command is to avoid overhead in the non-logging case, if the log message building is expensive\&.
Any substitution errors raise an error in the command execution\&.
The following example shows an xml text representation, which is only generated in debug mode:
.CS


    log::logsubst debug {XML of node $node is '[$node toXml]'}

.CE
.TP
\fB::log::logMsg\fR \fItext\fR
Convenience wrapper around \fB::log::log\fR\&.
Equivalent to \fB::log::log info text\fR\&.
.TP
\fB::log::logError\fR \fItext\fR
Convenience wrapper around \fB::log::log\fR\&.







<
<
<
<
<
<
<
<
<
<
<
<







503
504
505
506
507
508
509












510
511
512
513
514
515
516
\fIpattern\fR\&. The pattern defaults to \fB*\fR (i\&.e\&. all entries) if
none was specified\&.
.TP
\fB::log::loghex\fR \fIlevel\fR \fItext\fR \fIdata\fR
Like \fB::log::log\fR, but assumes that \fIdata\fR contains binary
data\&. It converts this into a mixed hex/ascii representation before
writing them to the log\&.












.TP
\fB::log::logMsg\fR \fItext\fR
Convenience wrapper around \fB::log::log\fR\&.
Equivalent to \fB::log::log info text\fR\&.
.TP
\fB::log::logError\fR \fItext\fR
Convenience wrapper around \fB::log::log\fR\&.
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIlog\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
log, log level, message, message level
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2001-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









549
550
551
552
553
554
555








556
557
558
559
560
561
562
563
564
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIlog\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
log, log level, message, message level
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2001-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/log/logger.n.

708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIlogger\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
log, log level, logger, service
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<




708
709
710
711
712
713
714








715
716
717
718
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIlogger\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
log, log level, logger, service
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/log/loggerAppender.n.

317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIlogger\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
appender, logger
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com>

.fi







<
<
<
<
<
<
<
<









317
318
319
320
321
322
323








324
325
326
327
328
329
330
331
332
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIlogger\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
appender, logger
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com>

.fi

Changes to idoc/man/files/modules/log/loggerUtils.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'loggerUtils\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com>
'\"
.TH "logger::utils" n 1\&.3\&.1 tcllib "Object Oriented logging facility"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'loggerUtils\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com>
'\"
.TH "logger::utils" n 1\&.3 tcllib "Object Oriented logging facility"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
logger::utils \- Utilities for logger
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBlogger::utils  ?1\&.3\&.1?\fR
.sp
\fB::logger::utils::createFormatCmd\fR \fIformatString\fR
.sp
\fB::logger::utils::createLogProc\fR \fB-procName\fR \fIprocName\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fB::logger::utils::applyAppender\fR \fB-appender\fR \fIappenderType\fR ?\fIoptions\fR\&.\&.\&.?
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
logger::utils \- Utilities for logger
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBlogger::utils  ?1\&.3?\fR
.sp
\fB::logger::utils::createFormatCmd\fR \fIformatString\fR
.sp
\fB::logger::utils::createLogProc\fR \fB-procName\fR \fIprocName\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fB::logger::utils::applyAppender\fR \fB-appender\fR \fIappenderType\fR ?\fIoptions\fR\&.\&.\&.?
.sp
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIlogger\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
appender, logger
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com>

.fi







<
<
<
<
<
<
<
<









415
416
417
418
419
420
421








422
423
424
425
426
427
428
429
430
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIlogger\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
appender, logger
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com>

.fi

Changes to idoc/man/files/modules/map/map_geocode_nominatim.n.

Changes to idoc/man/files/modules/map/map_slippy.n.

Changes to idoc/man/files/modules/map/map_slippy_cache.n.

Changes to idoc/man/files/modules/map/map_slippy_fetcher.n.

Changes to idoc/man/files/modules/mapproj/mapproj.n.

Changes to idoc/man/files/modules/markdown/markdown.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'markdown\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "markdown" n 1\&.2 tcllib "Markdown to HTML Converter"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'markdown\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "markdown" n 1\&.0 tcllib "Markdown to HTML Converter"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
..
.BS
.SH NAME
markdown \- Converts Markdown text to HTML
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBMarkdown  1\&.2\fR
.sp
package require \fBtextutil  ?0\&.8?\fR
.sp
\fB::Markdown::convert\fR \fImarkdown\fR
.sp
\fB::Markdown::register\fR \fIlangspec\fR \fIconverter\fR
.sp
\fB::Markdown::get_lang_counter\fR
.sp
\fB::Markdown::reset_lang_counter\fR
.sp
.BE
.SH DESCRIPTION
The package \fBMarkdown\fR provides a command to convert
Markdown annotated text into HMTL\&.
.TP
\fB::Markdown::convert\fR \fImarkdown\fR
This command takes in a block of Markdown text, and returns a block
of HTML\&.
.sp
The converter supports two types of syntax highlighting for
fenced code blocks: highlighting via a registered converter
(see \fB::Markdown::register\fR), or pure JavaScript highlighting,
e\&.g\&. via "highlight\&.js", where the language specifier used in the
markup is set as CSS class of the "code" element in the returned markup\&.
.TP
\fB::Markdown::register\fR \fIlangspec\fR \fIconverter\fR
Register a language specific converter for prettifying a code block
(e\&.g\&. syntax highlighting)\&.  Markdown supports fenced code blocks with
an optional language specifier (e\&.g\&. "tcl")\&. When the markdown parser
processes such a code block and a converter for the specified langspec
is registered, the converter is called with the raw code block as
argument\&. The converter is supposed to return the markup of the code
block as result\&. The specified converter can be an arbitrary Tcl
command, the raw text block is added as last argument upon invocation\&.
.TP
\fB::Markdown::get_lang_counter\fR
Return a dict of language specifier and number of occurrences in
fenced code blocks\&. This function can be used e\&.g\&. to detect, whether
some CSS or JavaScript headers should be included for rendering
without the need of postprocessing the rendered result\&.
.TP
\fB::Markdown::reset_lang_counter\fR
Reset the language counters\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH CATEGORY
Text processing







<
<




<
<
<
<
<
<








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<
<
<
<
<


271
272
273
274
275
276
277


278
279
280
281






282
283
284
285
286
287
288
289

























290
291
292
293
294
295
296
297








298
299
..
.BS
.SH NAME
markdown \- Converts Markdown text to HTML
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp


package require \fBtextutil  ?0\&.8?\fR
.sp
\fB::Markdown::convert\fR \fImarkdown\fR
.sp






.BE
.SH DESCRIPTION
The package \fBMarkdown\fR provides a command to convert
Markdown annotated text into HMTL\&.
.TP
\fB::Markdown::convert\fR \fImarkdown\fR
This command takes in a block of Markdown text, and returns a block
of HTML\&.

























.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/math/bigfloat.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'bigfloat\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004-2008, by Stephane Arnold <stephanearnold at yahoo dot fr>
'\"
.TH "math::bigfloat" n 2\&.0\&.3 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'bigfloat\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004-2008, by Stephane Arnold <stephanearnold at yahoo dot fr>
'\"
.TH "math::bigfloat" n 2\&.0\&.1 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
math::bigfloat \- Arbitrary precision floating-point numbers
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBmath::bigfloat  ?2\&.0\&.3?\fR
.sp
\fBfromstr\fR \fInumber\fR ?\fItrailingZeros\fR?
.sp
\fBtostr\fR ?\fB-nosci\fR? \fInumber\fR
.sp
\fBfromdouble\fR \fIdouble\fR ?\fIdecimals\fR?
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
math::bigfloat \- Arbitrary precision floating-point numbers
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBmath::bigfloat  ?2\&.0\&.1?\fR
.sp
\fBfromstr\fR \fInumber\fR ?\fItrailingZeros\fR?
.sp
\fBtostr\fR ?\fB-nosci\fR? \fInumber\fR
.sp
\fBfromdouble\fR \fIdouble\fR ?\fIdecimals\fR?
.sp
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: bignum :: float\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
computations, floating-point, interval, math, multiprecision, tcl
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004-2008, by Stephane Arnold <stephanearnold at yahoo dot fr>

.fi







<
<
<
<
<
<
<
<









805
806
807
808
809
810
811








812
813
814
815
816
817
818
819
820
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: bignum :: float\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
computations, floating-point, interval, math, multiprecision, tcl
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004-2008, by Stephane Arnold <stephanearnold at yahoo dot fr>

.fi

Changes to idoc/man/files/modules/math/bignum.n.

555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: bignum\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
bignums, math, multiprecision, tcl
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Salvatore Sanfilippo <antirez at invece dot org>
Copyright (c) 2004 Arjen Markus <arjenmarkus at users dot sourceforge dot net>

.fi







<
<
<
<
<
<
<
<










555
556
557
558
559
560
561








562
563
564
565
566
567
568
569
570
571
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: bignum\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
bignums, math, multiprecision, tcl
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Salvatore Sanfilippo <antirez at invece dot org>
Copyright (c) 2004 Arjen Markus <arjenmarkus at users dot sourceforge dot net>

.fi

Changes to idoc/man/files/modules/math/calculus.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'calculus\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002,2003,2004 Arjen Markus
'\"
.TH "math::calculus" n 0\&.8\&.2 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'calculus\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002,2003,2004 Arjen Markus
'\"
.TH "math::calculus" n 0\&.8\&.1 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
math::calculus \- Integration and ordinary differential equations
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBmath::calculus  0\&.8\&.2\fR
.sp
\fB::math::calculus::integral\fR \fIbegin\fR \fIend\fR \fInosteps\fR \fIfunc\fR
.sp
\fB::math::calculus::integralExpr\fR \fIbegin\fR \fIend\fR \fInosteps\fR \fIexpression\fR
.sp
\fB::math::calculus::integral2D\fR \fIxinterval\fR \fIyinterval\fR \fIfunc\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
math::calculus \- Integration and ordinary differential equations
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBmath::calculus  0\&.8\&.1\fR
.sp
\fB::math::calculus::integral\fR \fIbegin\fR \fIend\fR \fInosteps\fR \fIfunc\fR
.sp
\fB::math::calculus::integralExpr\fR \fIbegin\fR \fIend\fR \fInosteps\fR \fIexpression\fR
.sp
\fB::math::calculus::integral2D\fR \fIxinterval\fR \fIyinterval\fR \fIfunc\fR
.sp
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: calculus\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
romberg
.SH KEYWORDS
calculus, differential equations, integration, math, roots
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2002,2003,2004 Arjen Markus

.fi







<
<
<
<
<
<
<
<











777
778
779
780
781
782
783








784
785
786
787
788
789
790
791
792
793
794
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: calculus\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
romberg
.SH KEYWORDS
calculus, differential equations, integration, math, roots
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2002,2003,2004 Arjen Markus

.fi

Deleted idoc/man/files/modules/math/changepoint.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
'\"
'\" Generated from file 'changepoint\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2020 by Arjen Markus
'\"
.TH "math::changepoint" n 0\&.1 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
math::changepoint \- Change point detection methods
.SH SYNOPSIS
package require \fBTcl  ?8\&.5?\fR
.sp
package require \fBmath::statistics \fR
.sp
package require \fBmath::changepoint  ?0\&.1?\fR
.sp
\fB::math::changepoint::cusum-detect\fR \fIdata\fR ?args?
.sp
\fB::math::changepoint::cusum-online\fR ?args?
.sp
\fB$cusumObj\fR examine \fIvalue\fR
.sp
\fB$cusumObj\fR reset
.sp
\fB::math::changepoint::binary-segmentation\fR \fIdata\fR ?args?
.sp
.BE
.SH DESCRIPTION
.PP
The \fBmath::changepoint\fR package implements a number of well-known methods
to determine if a series of data contains a shift in the mean or not\&. Note that
these methods only indicate if a shift in the mean is probably\&. Due to the stochastic
nature of the data that will be analysed, false positives are possible\&.
The CUSUM method is implemented in both an "offline" and an "online" version, so that
it can be used either for a complete data series or for detecting changes in data that
come in one by one\&. The implementation has been based on these websites mostly:
.IP \(bu
\fIhttps://www\&.itl\&.nist\&.gov/div898/handbook/pmc/section3/pmc323\&.htm\fR
.IP \(bu
\fIhttps://en\&.wikipedia\&.org/wiki/CUSUM\fR
.PP
Basically, the deviation of the data from a given target value is accumulated and when
the total deviation becomes too large, a change point is reported\&.
A second method, binary segmentation, is implemented only as an "offline" method, as it
needs to examine the data series as a whole\&. In the variant contained here the following
ideas have been used:
.IP \(bu
The segments in which the data series may be separated shold not be too short, otherwise
the ultimate result could be segments of only one data point long\&. So a minimum length is
used\&.
.IP \(bu
To make the segmentation worthwhile there should be a minimum gain in reducing the cost
function (the sum of the squared deviations from the mean for each segment)\&.
.PP
This may not be in agreement with the descriptions of the method found in various
publications, but it is simple to understand and intuitive\&.
One publication that provides more information on the method in general is
"Selective review of offline change point detection methods" by Truong et al\&. \fIhttps://arxiv\&.org/abs/1801\&.00718\fR\&.
.SH PROCEDURES
The package defines the following public procedures:
.TP
\fB::math::changepoint::cusum-detect\fR \fIdata\fR ?args?
Examine a given data series and return the location of the first change (if any)
.RS
.TP
double \fIdata\fR
Series of data to be examined
.TP
list \fIargs\fR
Optional list of key-value pairs:
.RS
.TP
\fB-target\fR \fIvalue\fR
The target (or mean) for the time series
.TP
\fB-tolerance\fR \fIvalue\fR
The tolerated standard deviation
.TP
\fB-kfactor\fR \fIvalue\fR
The factor by which to multiply the standard deviation (defaults to 0\&.5, typically between 0\&.5 and 1\&.0)
.TP
\fB-hfactor\fR \fIvalue\fR
The factor determining the limits betweem which the "cusum" statistic is accepted (typicaly 3\&.0-5\&.0, default 4\&.0)
.RE
.RE
.TP
\fB::math::changepoint::cusum-online\fR ?args?
Class to examine data passed in against expected properties\&. At least the keywords \fI-target\fR and \fI-tolerance\fR must be given\&.
.RS
.TP
list \fIargs\fR
List of key-value pairs:
.RS
.TP
\fB-target\fR \fIvalue\fR
The target (or mean) for the time series
.TP
\fB-tolerance\fR \fIvalue\fR
The tolerated standard deviation
.TP
\fB-kfactor\fR \fIvalue\fR
The factor by which to multiply the standard deviation (defaults to 0\&.5, typically between 0\&.5 and 1\&.0)
.TP
\fB-hfactor\fR \fIvalue\fR
The factor determining the limits betweem which the "cusum" statistic is accepted (typicaly 3\&.0-5\&.0, default 4\&.0)
.RE
.RE
.TP
\fB$cusumObj\fR examine \fIvalue\fR
Pass a value to the \fIcusum-online\fR object and examine it\&. If, with this new value, the cumulative sum remains within the bounds,
zero (0) is returned, otherwise one (1) is returned\&.
.RS
.TP
double \fIvalue\fR
The new value
.RE
.TP
\fB$cusumObj\fR reset
Reset the cumulative sum, so that the examination can start afresh\&.
.TP
\fB::math::changepoint::binary-segmentation\fR \fIdata\fR ?args?
Apply the binary segmentation method recursively to find change points\&. Returns a list of indices of potential change points
.RS
.TP
list \fIdata\fR
Data to be examined
.TP
list \fIargs\fR
Optional key-value pairs:
.RS
.TP
\fB-minlength\fR \fInumber\fR
Minimum number of points in each segment (default: 5)
.TP
\fB-threshold\fR \fIvalue\fR
Factor applied to the standard deviation functioning as a threshold for accepting the change in cost function as an improvement (default: 1\&.0)
.RE
.RE
.PP
.SH KEYWORDS
control, statistics
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2020 by Arjen Markus

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/math/combinatorics.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'combinatorics\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "math::combinatorics" n 2\&.0 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'combinatorics\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "math::combinatorics" n 1\&.2\&.3 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
.SH NAME
math::combinatorics \- Combinatorial functions in the Tcl Math Library
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBmath  ?1\&.2\&.3?\fR
.sp
package require \fBTcl  8\&.6\fR
.sp
package require \fBmath::combinatorics  ?2\&.0?\fR
.sp
\fB::math::ln_Gamma\fR \fIz\fR
.sp
\fB::math::factorial\fR \fIx\fR
.sp
\fB::math::choose\fR \fIn k\fR
.sp
\fB::math::Beta\fR \fIz w\fR
.sp
\fB::math::combinatorics::permutations\fR \fIn\fR
.sp
\fB::math::combinatorics::variations\fR \fIn\fR \fIk\fR
.sp
\fB::math::combinatorics::combinations\fR \fIn\fR \fIk\fR
.sp
\fB::math::combinatorics::derangements\fR \fIn\fR
.sp
\fB::math::combinatorics::catalan\fR \fIn\fR
.sp
\fB::math::combinatorics::firstStirling\fR \fIn\fR \fIm\fR
.sp
\fB::math::combinatorics::secondStirling\fR \fIn\fR \fIm\fR
.sp
\fB::math::combinatorics::partitionP\fR \fIn\fR
.sp
\fB::math::combinatorics::list-permutations\fR \fIn\fR
.sp
\fB::math::combinatorics::list-variations\fR \fIn\fR \fIk\fR
.sp
\fB::math::combinatorics::list-combinations\fR \fIn\fR \fIk\fR
.sp
\fB::math::combinatorics::list-derangements\fR \fIn\fR
.sp
\fB::math::combinatorics::list-powerset\fR \fIn\fR
.sp
\fB::math::combinatorics::permutationObj\fR new/create NAME \fIn\fR
.sp
\fB$perm\fR next
.sp
\fB$perm\fR reset
.sp
\fB$perm\fR setElements \fIelements\fR
.sp
\fB$perm\fR setElements
.sp
\fB::math::combinatorics::combinationObj\fR new/create NAME \fIn\fR \fIk\fR
.sp
\fB$combin\fR next
.sp
\fB$combin\fR reset
.sp
\fB$combin\fR setElements \fIelements\fR
.sp
\fB$combin\fR setElements
.sp
.BE
.SH DESCRIPTION
.PP
The \fBmath\fR package contains implementations of several
functions useful in combinatorial problems\&. The \fBmath::combinatorics\fR
extends the collections based on features in Tcl 8\&.6\&.
Note: the meaning of the partitionP function, Catalan and Stirling numbers is explained on the
\fIMathWorld website\fR [http://mathworld\&.wolfram\&.com]
.SH COMMANDS
.TP
\fB::math::ln_Gamma\fR \fIz\fR
Returns the natural logarithm of the Gamma function for the argument
\fIz\fR\&.
.sp
The Gamma function is defined as the improper integral from zero to







<
<
<
<








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|
<
<
<







273
274
275
276
277
278
279




280
281
282
283
284
285
286
287














































288
289
290
291
292



293
294
295
296
297
298
299
.SH NAME
math::combinatorics \- Combinatorial functions in the Tcl Math Library
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBmath  ?1\&.2\&.3?\fR
.sp




\fB::math::ln_Gamma\fR \fIz\fR
.sp
\fB::math::factorial\fR \fIx\fR
.sp
\fB::math::choose\fR \fIn k\fR
.sp
\fB::math::Beta\fR \fIz w\fR
.sp














































.BE
.SH DESCRIPTION
.PP
The \fBmath\fR package contains implementations of several
functions useful in combinatorial problems\&.



.SH COMMANDS
.TP
\fB::math::ln_Gamma\fR \fIz\fR
Returns the natural logarithm of the Gamma function for the argument
\fIz\fR\&.
.sp
The Gamma function is defined as the improper integral from zero to
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
   Beta(z,w) = Beta(w,z) = Gamma(z) * Gamma(w) / Gamma(z+w)

.CE
.IP
Results are returned as a floating point number precise to better than
nine significant digits provided that \fIw\fR and \fIz\fR are both at
least 1\&.
.TP
\fB::math::combinatorics::permutations\fR \fIn\fR
Return the number of permutations of n items\&. The returned number
is always an integer, it is not limited by the range of 32-or 64-bits
integers using the arbitrary precision integers available in Tcl 8\&.5 and later\&.
.RS
.TP
int \fIn\fR
The number of items to be permuted\&.
.RE
.TP
\fB::math::combinatorics::variations\fR \fIn\fR \fIk\fR
Return the number of variations k items selected from the total of n items\&.
The order of the items is taken into account\&.
.RS
.TP
int \fIn\fR
The number of items to be selected from\&.
.TP
int \fIk\fR
The number of items to be selected in each variation\&.
.RE
.TP
\fB::math::combinatorics::combinations\fR \fIn\fR \fIk\fR
Return the number of combinations of k items selected from the total of n items\&.
The order of the items is not important\&.
.RS
.TP
int \fIn\fR
The number of items to be selected from\&.
.TP
int \fIk\fR
The number of items to be selected in each combination\&.
.RE
.TP
\fB::math::combinatorics::derangements\fR \fIn\fR
Return the number of derangements of n items\&. A derangement is a permutation
where each item is displaced from the original position\&.
.RS
.TP
int \fIn\fR
The number of items to be rearranged\&.
.RE
.TP
\fB::math::combinatorics::catalan\fR \fIn\fR
Return the n'th Catalan number\&. The number n is expected to be 1 or larger\&.
These numbers occur in various combinatorial problems\&.
.RS
.TP
int \fIn\fR
The index of the Catalan number
.RE
.TP
\fB::math::combinatorics::firstStirling\fR \fIn\fR \fIm\fR
Calculate a Stirling number of the first kind
(signed version, m cycles in a permutation of n items)
.RS
.TP
int \fIn\fR
Number of items
.TP
int \fIm\fR
Number of cycles
.RE
.TP
\fB::math::combinatorics::secondStirling\fR \fIn\fR \fIm\fR
Calculate a Stirling number of the second kind
(m non-empty subsets from n items)
.RS
.TP
int \fIn\fR
Number of items
.TP
int \fIm\fR
Number of subsets
.RE
.TP
\fB::math::combinatorics::partitionP\fR \fIn\fR
Calculate the number of ways an integer n can be written as the sum of positive integers\&.
.RS
.TP
int \fIn\fR
Number in question
.RE
.TP
\fB::math::combinatorics::list-permutations\fR \fIn\fR
Return the list of permutations of the numbers 0, \&.\&.\&., n-1\&.
.RS
.TP
int \fIn\fR
The number of items to be permuted\&.
.RE
.TP
\fB::math::combinatorics::list-variations\fR \fIn\fR \fIk\fR
Return the list of variations of k numbers selected from the numbers 0, \&.\&.\&., n-1\&.
The order of the items is taken into account\&.
.RS
.TP
int \fIn\fR
The number of items to be selected from\&.
.TP
int \fIk\fR
The number of items to be selected in each variation\&.
.RE
.TP
\fB::math::combinatorics::list-combinations\fR \fIn\fR \fIk\fR
Return the list of combinations of k numbers selected from the numbers 0, \&.\&.\&., n-1\&.
The order of the items is ignored\&.
.RS
.TP
int \fIn\fR
The number of items to be selected from\&.
.TP
int \fIk\fR
The number of items to be selected in each combination\&.
.RE
.TP
\fB::math::combinatorics::list-derangements\fR \fIn\fR
Return the list of derangements of the numbers 0, \&.\&.\&., n-1\&.
.RS
.TP
int \fIn\fR
The number of items to be rearranged\&.
.RE
.TP
\fB::math::combinatorics::list-powerset\fR \fIn\fR
Return the list of all subsets of the numbers 0, \&.\&.\&., n-1\&.
.RS
.TP
int \fIn\fR
The number of items to be rearranged\&.
.RE
.TP
\fB::math::combinatorics::permutationObj\fR new/create NAME \fIn\fR
Create a TclOO object for returning permutations one by one\&. If the last permutation
has been reached an empty list is returned\&.
.RS
.TP
int \fIn\fR
The number of items to be rearranged\&.
.RE
.TP
\fB$perm\fR next
Return the next permutation of n objects\&.
.TP
\fB$perm\fR reset
Reset the object, so that the command \fInext\fR returns the complete list again\&.
.TP
\fB$perm\fR setElements \fIelements\fR
Register a list of items to be permuted, using the \fInextElements\fR command\&.
.RS
.TP
list \fIelements\fR
The list of n items that will be permuted\&.
.RE
.TP
\fB$perm\fR setElements
Return the next permulation of the registered items\&.
.TP
\fB::math::combinatorics::combinationObj\fR new/create NAME \fIn\fR \fIk\fR
Create a TclOO object for returning combinations one by one\&. If the last combination
has been reached an empty list is returned\&.
.RS
.TP
int \fIn\fR
The number of items to be rearranged\&.
.RE
.TP
\fB$combin\fR next
Return the next combination of n objects\&.
.TP
\fB$combin\fR reset
Reset the object, so that the command \fInext\fR returns the complete list again\&.
.TP
\fB$combin\fR setElements \fIelements\fR
Register a list of items to be permuted, using the \fInextElements\fR command\&.
.RS
.TP
list \fIelements\fR
The list of n items that will be permuted\&.
.RE
.TP
\fB$combin\fR setElements
Return the next combination of the registered items\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH CATEGORY
Mathematics







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<
<
<
<
<


362
363
364
365
366
367
368
























































































































































































369
370
371
372
373
374
375
376








377
378
   Beta(z,w) = Beta(w,z) = Gamma(z) * Gamma(w) / Gamma(z+w)

.CE
.IP
Results are returned as a floating point number precise to better than
nine significant digits provided that \fIw\fR and \fIz\fR are both at
least 1\&.
























































































































































































.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH CATEGORY
Mathematics

Changes to idoc/man/files/modules/math/constants.n.

415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: constants\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
constants, degrees, e, math, pi, radians
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









415
416
417
418
419
420
421








422
423
424
425
426
427
428
429
430
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: constants\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
constants, degrees, e, math, pi, radians
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/math/decimal.n.

381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
to learn how to work with it and to see the difference between using this
package and sticking with expr\&. Consult the API section of
this man page for information about individual procedures\&.
.PP
.CS


    package require math::decimal

    # Various operations on two numbers\&.
    # We first convert them to decimal format\&.
    set a [::math::decimal::fromstr 8\&.2]
    set b [::math::decimal::fromstr \&.2]

    # Then we perform our operations\&. Here we add
    set c [::math::decimal::+ $a $b]

    # Finally we convert back to string format for presentation to the user\&.
    puts [::math::decimal::tostr $c] ; # => will output 8\&.4

    # Other examples
    #
    # Subtraction
    set c [::math::decimal::- $a $b]
    puts [::math::decimal::tostr $c] ; # => will output 8\&.0

    # Why bother using this instead of simply expr?
    puts [expr {8\&.2 + \&.2}] ; # => will output 8\&.399999999999999
    puts [expr {8\&.2 - \&.2}] ; # => will output 7\&.999999999999999
    # See http://speleotrove\&.com/decimal to learn more about why this happens\&.

.CE
.SH API
.TP
\fB::math::decimal::fromstr\fR \fIstring\fR
Convert \fIstring\fR into a decimal\&.







|






|
|











|
|







381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
to learn how to work with it and to see the difference between using this
package and sticking with expr\&. Consult the API section of
this man page for information about individual procedures\&.
.PP
.CS


    package require decimal

    # Various operations on two numbers\&.
    # We first convert them to decimal format\&.
    set a [::math::decimal::fromstr 8\&.2]
    set b [::math::decimal::fromstr \&.2]

    # Then we perform our operations\&. Here we multiply
    set c [::math::decimal::* $a $b]

    # Finally we convert back to string format for presentation to the user\&.
    puts [::math::decimal::tostr $c] ; # => will output 8\&.4

    # Other examples
    #
    # Subtraction
    set c [::math::decimal::- $a $b]
    puts [::math::decimal::tostr $c] ; # => will output 8\&.0

    # Why bother using this instead of simply expr?
    puts 8\&.399999999999999 ; # => will output 8\&.399999999999999
    puts 7\&.999999999999999 ; # => will output 7\&.999999999999999
    # See http://speleotrove\&.com/decimal to learn more about why this happens\&.

.CE
.SH API
.TP
\fB::math::decimal::fromstr\fR \fIstring\fR
Convert \fIstring\fR into a decimal\&.
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdecimal\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
decimal, math, tcl
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2011 Mark Alston <mark at beernut dot com>

.fi







<
<
<
<
<
<
<
<









543
544
545
546
547
548
549








550
551
552
553
554
555
556
557
558
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIdecimal\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
decimal, math, tcl
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2011 Mark Alston <mark at beernut dot com>

.fi

Changes to idoc/man/files/modules/math/exact.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'exact\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2015 Kevin B\&. Kenny <kennykb@acm\&.org>
'\" Redistribution permitted under the terms of the Open Publication License <http://www\&.opencontent\&.org/openpub/>
'\"
.TH "math::exact" n 1\&.0\&.1 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,





|







1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'exact\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2015 Kevin B\&. Kenny <kennykb@acm\&.org>
'\" Redistribution permitted under the terms of the Open Publication License <http://www\&.opencontent\&.org/openpub/>
'\"
.TH "math::exact" n 1\&.0 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
.SH NAME
math::exact \- Exact Real Arithmetic
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBgrammar::aycock  1\&.0\fR
.sp
package require \fBmath::exact  1\&.0\&.1\fR
.sp
\fB::math::exact::exactexpr\fR \fIexpr\fR
.sp
\fInumber\fR \fBref\fR
.sp
\fInumber\fR \fBunref\fR
.sp







|







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
.SH NAME
math::exact \- Exact Real Arithmetic
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBgrammar::aycock  1\&.0\fR
.sp
package require \fBmath::exact  1\&.0\fR
.sp
\fB::math::exact::exactexpr\fR \fIexpr\fR
.sp
\fInumber\fR \fBref\fR
.sp
\fInumber\fR \fBunref\fR
.sp

Deleted idoc/man/files/modules/math/filtergen.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
'\"
'\" Generated from file 'filtergen\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2020 by Arjen Markus
'\"
.TH "math::filters" n 0\&.1 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
math::filters \- Digital filters
.SH SYNOPSIS
package require \fBTcl  ?8\&.5?\fR
.sp
package require \fBmath::filters  ?0\&.1?\fR
.sp
\fB::math::filters::filterButterworth\fR \fIlowpass\fR \fIorder\fR \fIsamplefreq\fR \fIcutofffreq\fR
.sp
\fB::math::filters::filter\fR \fIcoeffs\fR \fIdata\fR
.sp
\fB::math::filters::filterObj\fR new \fIcoeffs\fR \fIyinit\fR
.sp
\fB$filterObj\fR filter \fIx\fR
.sp
\fB$filterObj\fR reset
.sp
.BE
.SH DESCRIPTION
.PP
The \fBmath::filters\fR package implements digital filters,
notably Butterworth low-pass and high-pass filters\&. The procedures
allow to filter an entire data series as well as filter data one
by one\&.
.SH PROCEDURES
The package defines the following public procedures:
.TP
\fB::math::filters::filterButterworth\fR \fIlowpass\fR \fIorder\fR \fIsamplefreq\fR \fIcutofffreq\fR
Determine the coefficients for a Butterworth filter of given order\&. The coefficients are returned as
a list of the x-coefficients, the y-coefficients and the scale\&. The formula is (n is the filter order):
.CS


                   n             n
    scale * y_k = sum x_(k-i) + sum y_(k-i)
                  i=0           i=1

.CE
.RS
.TP
bool \fIlowpass\fR
Generate a low-pass filter (1) or a high-pass filter (0)
.TP
integer \fIlowpass\fR
The order of the filter to be generated
.TP
double \fIsamplefreq\fR
Sampling frequency of the data series
.TP
double \fIcutofffreq\fR
Cut-off frequency for the filter
.RE
.TP
\fB::math::filters::filter\fR \fIcoeffs\fR \fIdata\fR
Filter the entire data series based on the filter coefficients\&.
.RS
.TP
list \fIcoeffs\fR
List of coefficients as generated by \fIfilterButterworth\fR (or in fact any similar list of coefficients)
.TP
list \fIdata\fR
Data to be filtered
.RE
.TP
\fB::math::filters::filterObj\fR new \fIcoeffs\fR \fIyinit\fR
Create a filter object\&. The initial x data are taken as zero\&. The initial y data can be prescribed\&. If they are not given,
they are taken as zero as well\&.
.RS
.TP
list \fIcoeffs\fR
List of coefficients as generated by \fIfilterButterworth\fR (or in fact any similar list of coefficients)
.TP
list \fIyinit\fR
(Optional) initial data for the filter result\&.
.RE
.TP
\fB$filterObj\fR filter \fIx\fR
Filter a single value and return the result\&.
.RS
.TP
double \fIx\fR
The value to be filtered
.RE
.TP
\fB$filterObj\fR reset
Reset the filter object (start anew)
.PP
.SH KEYWORDS
digital, filtering
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2020 by Arjen Markus

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/math/fourier.n.

407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: fourier\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
FFT, Fourier transform, complex numbers, mathematics
.SH CATEGORY
Mathematics







<
<
<
<
<
<
<
<




407
408
409
410
411
412
413








414
415
416
417
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: fourier\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
FFT, Fourier transform, complex numbers, mathematics
.SH CATEGORY
Mathematics

Changes to idoc/man/files/modules/math/fuzzy.n.

409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: fuzzy\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
floating-point, math, rounding
.SH CATEGORY
Mathematics







<
<
<
<
<
<
<
<




409
410
411
412
413
414
415








416
417
418
419
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: fuzzy\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
floating-point, math, rounding
.SH CATEGORY
Mathematics

Changes to idoc/man/files/modules/math/interpolate.n.

573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: interpolate\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
interpolation, math, spatial interpolation
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>
Copyright (c) 2004 Kevn B\&. Kenny <kennykb@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<










573
574
575
576
577
578
579








580
581
582
583
584
585
586
587
588
589
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: interpolate\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
interpolation, math, spatial interpolation
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>
Copyright (c) 2004 Kevn B\&. Kenny <kennykb@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/math/linalg.n.

1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: linearalgebra\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
least squares, linear algebra, linear equations, math, matrices, matrix, vectors
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004-2008 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>
Copyright (c) 2004 Ed Hume <http://www\&.hume\&.com/contact\&.us\&.htm>
Copyright (c) 2008 Michael Buadin <relaxkmike@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











1468
1469
1470
1471
1472
1473
1474








1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: linearalgebra\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
least squares, linear algebra, linear equations, math, matrices, matrix, vectors
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004-2008 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>
Copyright (c) 2004 Ed Hume <http://www\&.hume\&.com/contact\&.us\&.htm>
Copyright (c) 2008 Michael Buadin <relaxkmike@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/math/machineparameters.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'machineparameters\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008 Michael Baudin <michael\&.baudin@sourceforge\&.net>
'\"
.TH "math::machineparameters" n 1\&.0 tcllib "tclrep"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'machineparameters\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008 Michael Baudin <michael\&.baudin@sourceforge\&.net>
'\"
.TH "tclrep/machineparameters" n 1\&.0 tcllib "tclrep"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
math::machineparameters \- Compute double precision machine parameters\&.
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBsnit \fR
.sp
package require \fBmath::machineparameters  0\&.1\fR
.sp
\fBmachineparameters\fR create \fIobjectname\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fIobjectname\fR \fBconfigure\fR ?\fIoptions\fR\&.\&.\&.?







|

<
<







268
269
270
271
272
273
274
275
276


277
278
279
280
281
282
283
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
tclrep/machineparameters \- Compute double precision machine parameters\&.
.SH SYNOPSIS


package require \fBsnit \fR
.sp
package require \fBmath::machineparameters  0\&.1\fR
.sp
\fBmachineparameters\fR create \fIobjectname\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fIobjectname\fR \fBconfigure\fR ?\fIoptions\fR\&.\&.\&.?
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH COPYRIGHT
.nf
Copyright (c) 2008 Michael Baudin <michael\&.baudin@sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<





471
472
473
474
475
476
477








478
479
480
481
482
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH COPYRIGHT
.nf
Copyright (c) 2008 Michael Baudin <michael\&.baudin@sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/math/math.n.

397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
math, statistics
.SH CATEGORY
Mathematics







<
<
<
<
<
<
<
<




397
398
399
400
401
402
403








404
405
406
407
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
math, statistics
.SH CATEGORY
Mathematics

Changes to idoc/man/files/modules/math/math_geometry.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'\"
'\" Generated from file 'math_geometry\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2001 by Ideogramic ApS and other parties
'\" Copyright (c) 2010 by Andreas Kupries
'\" Copyright (c) 2010 by Kevin Kenny
'\" Copyright (c) 2018 by Arjen Markus
'\" Copyright (c) 2020 by Manfred Rosenberger
'\"
.TH "math::geometry" n 1\&.4\&.1 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|
|
|
<

|







1
2
3
4
5
6

7
8
9
10
11
12
13
14
15
'\"
'\" Generated from file 'math_geometry\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2001 by Ideogramic ApS and other parties
'\" Copyright (c) 2004 by Arjen Markus
'\" Copyright (c) 2010 by Andreas Kupries
'\" Copyright (c) 2010 by Kevin Kenny

'\"
.TH "math::geometry" n 1\&.2\&.2 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
..
.BS
.SH NAME
math::geometry \- Geometrical computations
.SH SYNOPSIS
package require \fBTcl  ?8\&.5?\fR
.sp
package require \fBmath::geometry  ?1\&.4\&.1?\fR
.sp
\fB::math::geometry::+\fR \fIpoint1\fR \fIpoint2\fR
.sp
\fB::math::geometry::-\fR \fIpoint1\fR \fIpoint2\fR
.sp
\fB::math::geometry::p\fR \fIx\fR \fIy\fR
.sp







|







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
..
.BS
.SH NAME
math::geometry \- Geometrical computations
.SH SYNOPSIS
package require \fBTcl  ?8\&.5?\fR
.sp
package require \fBmath::geometry  ?1\&.2\&.2?\fR
.sp
\fB::math::geometry::+\fR \fIpoint1\fR \fIpoint2\fR
.sp
\fB::math::geometry::-\fR \fIpoint1\fR \fIpoint2\fR
.sp
\fB::math::geometry::p\fR \fIx\fR \fIy\fR
.sp
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
.sp
\fB::math::geometry::rect\fR \fInw\fR \fIse\fR
.sp
\fB::math::geometry::nwse\fR \fIrect\fR
.sp
\fB::math::geometry::angle\fR \fIline\fR
.sp
\fB::math::geometry::angleBetween\fR \fIvector1\fR \fIvector2\fR
.sp
\fB::math::geometry::inproduct\fR \fIvector1\fR \fIvector2\fR
.sp
\fB::math::geometry::areaParallellogram\fR \fIvector1\fR \fIvector2\fR
.sp
\fB::math::geometry::calculateDistanceToLine\fR \fIP\fR \fIline\fR
.sp
\fB::math::geometry::calculateDistanceToLineSegment\fR \fIP\fR \fIlinesegment\fR
.sp
\fB::math::geometry::calculateDistanceToPolyline\fR \fIP\fR \fIpolyline\fR
.sp
\fB::math::geometry::calculateDistanceToPolygon\fR \fIP\fR \fIpolygon\fR







<
<
<
<
<
<







305
306
307
308
309
310
311






312
313
314
315
316
317
318
.sp
\fB::math::geometry::rect\fR \fInw\fR \fIse\fR
.sp
\fB::math::geometry::nwse\fR \fIrect\fR
.sp
\fB::math::geometry::angle\fR \fIline\fR
.sp






\fB::math::geometry::calculateDistanceToLine\fR \fIP\fR \fIline\fR
.sp
\fB::math::geometry::calculateDistanceToLineSegment\fR \fIP\fR \fIlinesegment\fR
.sp
\fB::math::geometry::calculateDistanceToPolyline\fR \fIP\fR \fIpolyline\fR
.sp
\fB::math::geometry::calculateDistanceToPolygon\fR \fIP\fR \fIpolygon\fR
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
.sp
\fB::math::geometry::intervalsOverlap\fR \fIy1\fR \fIy2\fR \fIy3\fR \fIy4\fR \fIstrict\fR
.sp
\fB::math::geometry::rectanglesOverlap\fR \fIP1\fR \fIP2\fR \fIQ1\fR \fIQ2\fR \fIstrict\fR
.sp
\fB::math::geometry::bbox\fR \fIpolyline\fR
.sp
\fB::math::geometry::overlapBBox\fR \fIpolyline1\fR \fIpolyline2\fR ?strict?
.sp
\fB::math::geometry::pointInsideBBox\fR \fIbbox\fR \fIpoint\fR
.sp
\fB::math::geometry::cathetusPoint\fR \fIpa\fR \fIpb\fR \fIcathetusLength\fR ?location?
.sp
\fB::math::geometry::parallel\fR \fIline\fR \fIoffset\fR ?orient?
.sp
\fB::math::geometry::unitVector\fR \fIline\fR
.sp
\fB::math::geometry::pointInsidePolygon\fR \fIP\fR \fIpolyline\fR
.sp
\fB::math::geometry::pointInsidePolygonAlt\fR \fIP\fR \fIpolyline\fR
.sp
\fB::math::geometry::rectangleInsidePolygon\fR \fIP1\fR \fIP2\fR \fIpolyline\fR
.sp
\fB::math::geometry::areaPolygon\fR \fIpolygon\fR
.sp
\fB::math::geometry::translate\fR \fIvector\fR \fIpolyline\fR
.sp
\fB::math::geometry::rotate\fR \fIangle\fR \fIpolyline\fR
.sp
\fB::math::geometry::rotateAbout\fR \fIp\fR \fIangle\fR \fIpolyline\fR
.sp
\fB::math::geometry::reflect\fR \fIangle\fR \fIpolyline\fR
.sp
\fB::math::geometry::degToRad\fR \fIangle\fR
.sp
\fB::math::geometry::radToDeg\fR \fIangle\fR
.sp
\fB::math::geometry::circle\fR \fIcentre\fR \fIradius\fR
.sp
\fB::math::geometry::circleTwoPoints\fR \fIpoint1\fR \fIpoint2\fR
.sp
\fB::math::geometry::pointInsideCircle\fR \fIpoint\fR \fIcircle\fR
.sp
\fB::math::geometry::lineIntersectsCircle\fR \fIline\fR \fIcircle\fR
.sp
\fB::math::geometry::lineSegmentIntersectsCircle\fR \fIsegment\fR \fIcircle\fR
.sp
\fB::math::geometry::intersectionLineWithCircle\fR \fIline\fR \fIcircle\fR
.sp
\fB::math::geometry::intersectionCircleWithCircle\fR \fIcircle1\fR \fIcircle2\fR
.sp
\fB::math::geometry::tangentLinesToCircle\fR \fIpoint\fR \fIcircle\fR
.sp
\fB::math::geometry::intersectionPolylines\fR \fIpolyline1\fR \fIpolyline2\fR ?mode? ?granularity?
.sp
\fB::math::geometry::intersectionPolylineCircle\fR \fIpolyline\fR \fIcircle\fR ?mode? ?granularity?
.sp
\fB::math::geometry::polylineCutOrigin\fR \fIpolyline1\fR \fIpolyline2\fR ?granularity?
.sp
\fB::math::geometry::polylineCutEnd\fR \fIpolyline1\fR \fIpolyline2\fR ?granularity?
.sp
\fB::math::geometry::splitPolyline\fR \fIpolyline\fR \fInumberVertex\fR
.sp
\fB::math::geometry::enrichPolyline\fR \fIpolyline\fR \fIaccuracy\fR
.sp
\fB::math::geometry::cleanupPolyline\fR \fIpolyline\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBmath::geometry\fR package is a collection of functions for
computations and manipulations on two-dimensional geometrical objects,
such as points, lines and polygons\&.
.PP
The geometrical objects are implemented as plain lists of coordinates\&.
For instance a line is defined by a list of four numbers, the x- and
y-coordinate of a first point and the x- and y-coordinates of a second
point on the line\&.
.PP
\fINote:\fR In version 1\&.4\&.0 an inconsistency was repaired - see \fIhttps://core\&.tcl-lang\&.org/tcllib/tktview?name=fb4812f82b\fR\&.
More in \fBCOORDINATE SYSTEM\fR
.PP
The various types of object are recognised by the number of coordinate
pairs and the context in which they are used: a list of four elements
can be regarded as an infinite line, a finite line segment but also
as a polyline of one segment and a point set of two points\&.
.PP
Currently the following types of objects are distinguished:
.IP \(bu







<
<
<
<
<
<
<
<
<
<












<
<






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












<
<
<







339
340
341
342
343
344
345










346
347
348
349
350
351
352
353
354
355
356
357


358
359
360
361
362
363






























364
365
366
367
368
369
370
371
372
373
374
375



376
377
378
379
380
381
382
.sp
\fB::math::geometry::intervalsOverlap\fR \fIy1\fR \fIy2\fR \fIy3\fR \fIy4\fR \fIstrict\fR
.sp
\fB::math::geometry::rectanglesOverlap\fR \fIP1\fR \fIP2\fR \fIQ1\fR \fIQ2\fR \fIstrict\fR
.sp
\fB::math::geometry::bbox\fR \fIpolyline\fR
.sp










\fB::math::geometry::pointInsidePolygon\fR \fIP\fR \fIpolyline\fR
.sp
\fB::math::geometry::pointInsidePolygonAlt\fR \fIP\fR \fIpolyline\fR
.sp
\fB::math::geometry::rectangleInsidePolygon\fR \fIP1\fR \fIP2\fR \fIpolyline\fR
.sp
\fB::math::geometry::areaPolygon\fR \fIpolygon\fR
.sp
\fB::math::geometry::translate\fR \fIvector\fR \fIpolyline\fR
.sp
\fB::math::geometry::rotate\fR \fIangle\fR \fIpolyline\fR
.sp


\fB::math::geometry::reflect\fR \fIangle\fR \fIpolyline\fR
.sp
\fB::math::geometry::degToRad\fR \fIangle\fR
.sp
\fB::math::geometry::radToDeg\fR \fIangle\fR
.sp






























.BE
.SH DESCRIPTION
.PP
The \fBmath::geometry\fR package is a collection of functions for
computations and manipulations on two-dimensional geometrical objects,
such as points, lines and polygons\&.
.PP
The geometrical objects are implemented as plain lists of coordinates\&.
For instance a line is defined by a list of four numbers, the x- and
y-coordinate of a first point and the x- and y-coordinates of a second
point on the line\&.
.PP



The various types of object are recognised by the number of coordinate
pairs and the context in which they are used: a list of four elements
can be regarded as an infinite line, a finite line segment but also
as a polyline of one segment and a point set of two points\&.
.PP
Currently the following types of objects are distinguished:
.IP \(bu
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
.IP \(bu
\fIpolygon\fR - like a polyline, but the implicit assumption is that
the polyline is closed (if the first and last points do not coincide,
the missing segment is automatically added)\&.
.IP \(bu
\fIpoint set\fR - again a list of an even number of coordinates, but
the points are regarded without any ordering\&.
.IP \(bu
\fIcircle\fR - a list of three numbers, the first two are the coordinates of the
centre and the third is the radius\&.
.PP
.SH PROCEDURES
The package defines the following public procedures:
.TP
\fB::math::geometry::+\fR \fIpoint1\fR \fIpoint2\fR
Compute the sum of the two vectors given as points and return it\&.
The result is a vector as well\&.







<
<
<







395
396
397
398
399
400
401



402
403
404
405
406
407
408
.IP \(bu
\fIpolygon\fR - like a polyline, but the implicit assumption is that
the polyline is closed (if the first and last points do not coincide,
the missing segment is automatically added)\&.
.IP \(bu
\fIpoint set\fR - again a list of an even number of coordinates, but
the points are regarded without any ordering\&.



.PP
.SH PROCEDURES
The package defines the following public procedures:
.TP
\fB::math::geometry::+\fR \fIpoint1\fR \fIpoint2\fR
Compute the sum of the two vectors given as points and return it\&.
The result is a vector as well\&.
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
\fB::math::geometry::s*\fR \fIfactor\fR \fIpoint\fR
Scale the vector by the factor and return it as the
result of the command\&. This is a vector as well\&.
.TP
\fB::math::geometry::direction\fR \fIangle\fR
Given the angle in degrees this command computes and returns
the unit vector pointing into this direction\&. The vector for
angle == 0 points to the right (east), and for angle == 90 up (north)\&.
.TP
\fB::math::geometry::h\fR \fIlength\fR
Returns a horizontal vector on the X-axis of the specified length\&.
Positive lengths point to the right (east)\&.
.TP
\fB::math::geometry::v\fR \fIlength\fR
Returns a vertical vector on the Y-axis of the specified length\&.







|







432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
\fB::math::geometry::s*\fR \fIfactor\fR \fIpoint\fR
Scale the vector by the factor and return it as the
result of the command\&. This is a vector as well\&.
.TP
\fB::math::geometry::direction\fR \fIangle\fR
Given the angle in degrees this command computes and returns
the unit vector pointing into this direction\&. The vector for
angle == 0 points to the right (up), and for angle == 90 up (north)\&.
.TP
\fB::math::geometry::h\fR \fIlength\fR
Returns a horizontal vector on the X-axis of the specified length\&.
Positive lengths point to the right (east)\&.
.TP
\fB::math::geometry::v\fR \fIlength\fR
Returns a vertical vector on the Y-axis of the specified length\&.
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597

598
599
600
601
602
603
604
605
606
607
608
609
610


611
612
613
614
615
616
617
618
619
620
621
622
623

624
625
626
627
628
629
630
631
632
633
634
635
636
637

638
639
640
641
642
643
644
645
646
647
648
649

650
651
652
653
654
655
656
657
658
659
660
661
662

663
664
665
666
667
668
669
670
671
672
673
674

675
676
677
678
679
680
681
682
683

684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699

700
701
702
703
704
705
706
707
708
709
710
711
712

713
714
715
716
717
718
719
720
721
722
723
724
725

726
727
728
729
730
731
732
733
734
735
736
737
738
739
740

741
742
743
744
745
746
747
748
749
750
751

752
753
754
755
756
757
758
Calculate the angle from the positive x-axis to a given line
(in two dimensions only)\&.
.RS
.TP
list \fIline\fR
Coordinates of the line
.RE
.TP
\fB::math::geometry::angleBetween\fR \fIvector1\fR \fIvector2\fR
Calculate the angle between two vectors (in degrees)
.RS
.TP
list \fIvector1\fR
First vector
.TP
list \fIvector2\fR
Second vector
.RE
.TP
\fB::math::geometry::inproduct\fR \fIvector1\fR \fIvector2\fR
Calculate the inner product of two vectors
.RS
.TP
list \fIvector1\fR
First vector
.TP
list \fIvector2\fR
Second vector
.RE
.TP
\fB::math::geometry::areaParallellogram\fR \fIvector1\fR \fIvector2\fR
Calculate the area of the parallellogram with the two vectors as its sides
.RS
.TP
list \fIvector1\fR
First vector
.TP
list \fIvector2\fR
Second vector
.RE
.TP
\fB::math::geometry::calculateDistanceToLine\fR \fIP\fR \fIline\fR
Calculate the distance of point P to the (infinite) line and return the
result
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIline\fR
List of four numbers, the coordinates of two points
on the line
.RE

.TP
\fB::math::geometry::calculateDistanceToLineSegment\fR \fIP\fR \fIlinesegment\fR
Calculate the distance of point P to the (finite) line segment and
return the result\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIlinesegment\fR
List of four numbers, the coordinates of the
first and last points of the line segment
.RE


.TP
\fB::math::geometry::calculateDistanceToPolyline\fR \fIP\fR \fIpolyline\fR
Calculate the distance of point P to the polyline and
return the result\&. Note that a polyline needs not to be closed\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIpolyline\fR
List of numbers, the coordinates of the
vertices of the polyline
.RE

.TP
\fB::math::geometry::calculateDistanceToPolygon\fR \fIP\fR \fIpolygon\fR
Calculate the distance of point P to the polygon and
return the result\&. If the list of coordinates is not closed (first and last
points differ), it is automatically closed\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIpolygon\fR
List of numbers, the coordinates of the
vertices of the polygon
.RE

.TP
\fB::math::geometry::findClosestPointOnLine\fR \fIP\fR \fIline\fR
Return the point on a line which is closest to a given point\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIline\fR
List of four numbers, the coordinates of two points
on the line
.RE

.TP
\fB::math::geometry::findClosestPointOnLineSegment\fR \fIP\fR \fIlinesegment\fR
Return the point on a \fIline segment\fR which is closest to a given
point\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIlinesegment\fR
List of four numbers, the first and last
points on the line segment
.RE

.TP
\fB::math::geometry::findClosestPointOnPolyline\fR \fIP\fR \fIpolyline\fR
Return the point on a \fIpolyline\fR which is closest to a given
point\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIpolyline\fR
List of numbers, the vertices of the polyline
.RE

.TP
\fB::math::geometry::lengthOfPolyline\fR \fIpolyline\fR
Return the length of the \fIpolyline\fR (note: it not regarded as a
polygon)
.RS
.TP
list \fIpolyline\fR
List of numbers, the vertices of the polyline
.RE

.TP
\fB::math::geometry::movePointInDirection\fR \fIP\fR \fIdirection\fR \fIdist\fR
Move a point over a given distance in a given direction and return the
new coordinates (in two dimensions only)\&.
.RS
.TP
list \fIP\fR
Coordinates of the point to be moved
.TP
double \fIdirection\fR
Direction (in degrees; 0 is to the right, 90
upwards)
.TP
list \fIdist\fR
Distance over which to move the point
.RE

.TP
\fB::math::geometry::lineSegmentsIntersect\fR \fIlinesegment1\fR \fIlinesegment2\fR
Check if two line segments intersect or coincide\&. Returns 1 if that is
the case, 0 otherwise (in two dimensions only)\&. If an endpoint of one segment lies on
the other segment (or is very close to the segment), they are considered to intersect
.RS
.TP
list \fIlinesegment1\fR
First line segment
.TP
list \fIlinesegment2\fR
Second line segment
.RE

.TP
\fB::math::geometry::findLineSegmentIntersection\fR \fIlinesegment1\fR \fIlinesegment2\fR
Find the intersection point of two line segments\&. Return the coordinates
or the keywords "coincident" or "none" if the line segments coincide or
have no points in common (in two dimensions only)\&.
.RS
.TP
list \fIlinesegment1\fR
First line segment
.TP
list \fIlinesegment2\fR
Second line segment
.RE

.TP
\fB::math::geometry::findLineIntersection\fR \fIline1\fR \fIline2\fR
Find the intersection point of two (infinite) lines\&. Return the coordinates
or the keywords "coincident" or "none" if the lines coincide or
have no points in common (in two dimensions only)\&.
.RS
.TP
list \fIline1\fR
First line
.TP
list \fIline2\fR
Second line
.RE
.IP
See section \fBReferences\fR for details on the algorithm and math behind it\&.

.TP
\fB::math::geometry::polylinesIntersect\fR \fIpolyline1\fR \fIpolyline2\fR
Check if two polylines intersect or not (in two dimensions only)\&.
.RS
.TP
list \fIpolyline1\fR
First polyline
.TP
list \fIpolyline2\fR
Second polyline
.RE

.TP
\fB::math::geometry::polylinesBoundingIntersect\fR \fIpolyline1\fR \fIpolyline2\fR \fIgranularity\fR
Check whether two polylines intersect, but reduce
the correctness of the result to the given granularity\&.
Use this for faster, but weaker, intersection checking\&.
.sp
How it works:







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













>













>
>













>














>












>













>












>









>
















>













>













>















>











>







490
491
492
493
494
495
496
497
































498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
Calculate the angle from the positive x-axis to a given line
(in two dimensions only)\&.
.RS
.TP
list \fIline\fR
Coordinates of the line
.RE
.sp
































.TP
\fB::math::geometry::calculateDistanceToLine\fR \fIP\fR \fIline\fR
Calculate the distance of point P to the (infinite) line and return the
result
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIline\fR
List of four numbers, the coordinates of two points
on the line
.RE
.sp
.TP
\fB::math::geometry::calculateDistanceToLineSegment\fR \fIP\fR \fIlinesegment\fR
Calculate the distance of point P to the (finite) line segment and
return the result\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIlinesegment\fR
List of four numbers, the coordinates of the
first and last points of the line segment
.RE
.sp
.sp
.TP
\fB::math::geometry::calculateDistanceToPolyline\fR \fIP\fR \fIpolyline\fR
Calculate the distance of point P to the polyline and
return the result\&. Note that a polyline needs not to be closed\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIpolyline\fR
List of numbers, the coordinates of the
vertices of the polyline
.RE
.sp
.TP
\fB::math::geometry::calculateDistanceToPolygon\fR \fIP\fR \fIpolygon\fR
Calculate the distance of point P to the polygon and
return the result\&. If the list of coordinates is not closed (first and last
points differ), it is automatically closed\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIpolygon\fR
List of numbers, the coordinates of the
vertices of the polygon
.RE
.sp
.TP
\fB::math::geometry::findClosestPointOnLine\fR \fIP\fR \fIline\fR
Return the point on a line which is closest to a given point\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIline\fR
List of four numbers, the coordinates of two points
on the line
.RE
.sp
.TP
\fB::math::geometry::findClosestPointOnLineSegment\fR \fIP\fR \fIlinesegment\fR
Return the point on a \fIline segment\fR which is closest to a given
point\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIlinesegment\fR
List of four numbers, the first and last
points on the line segment
.RE
.sp
.TP
\fB::math::geometry::findClosestPointOnPolyline\fR \fIP\fR \fIpolyline\fR
Return the point on a \fIpolyline\fR which is closest to a given
point\&.
.RS
.TP
list \fIP\fR
List of two numbers, the coordinates of the point
.TP
list \fIpolyline\fR
List of numbers, the vertices of the polyline
.RE
.sp
.TP
\fB::math::geometry::lengthOfPolyline\fR \fIpolyline\fR
Return the length of the \fIpolyline\fR (note: it not regarded as a
polygon)
.RS
.TP
list \fIpolyline\fR
List of numbers, the vertices of the polyline
.RE
.sp
.TP
\fB::math::geometry::movePointInDirection\fR \fIP\fR \fIdirection\fR \fIdist\fR
Move a point over a given distance in a given direction and return the
new coordinates (in two dimensions only)\&.
.RS
.TP
list \fIP\fR
Coordinates of the point to be moved
.TP
double \fIdirection\fR
Direction (in degrees; 0 is to the right, 90
upwards)
.TP
list \fIdist\fR
Distance over which to move the point
.RE
.sp
.TP
\fB::math::geometry::lineSegmentsIntersect\fR \fIlinesegment1\fR \fIlinesegment2\fR
Check if two line segments intersect or coincide\&. Returns 1 if that is
the case, 0 otherwise (in two dimensions only)\&. If an endpoint of one segment lies on
the other segment (or is very close to the segment), they are considered to intersect
.RS
.TP
list \fIlinesegment1\fR
First line segment
.TP
list \fIlinesegment2\fR
Second line segment
.RE
.sp
.TP
\fB::math::geometry::findLineSegmentIntersection\fR \fIlinesegment1\fR \fIlinesegment2\fR
Find the intersection point of two line segments\&. Return the coordinates
or the keywords "coincident" or "none" if the line segments coincide or
have no points in common (in two dimensions only)\&.
.RS
.TP
list \fIlinesegment1\fR
First line segment
.TP
list \fIlinesegment2\fR
Second line segment
.RE
.sp
.TP
\fB::math::geometry::findLineIntersection\fR \fIline1\fR \fIline2\fR
Find the intersection point of two (infinite) lines\&. Return the coordinates
or the keywords "coincident" or "none" if the lines coincide or
have no points in common (in two dimensions only)\&.
.RS
.TP
list \fIline1\fR
First line
.TP
list \fIline2\fR
Second line
.RE
.IP
See section \fBReferences\fR for details on the algorithm and math behind it\&.
.sp
.TP
\fB::math::geometry::polylinesIntersect\fR \fIpolyline1\fR \fIpolyline2\fR
Check if two polylines intersect or not (in two dimensions only)\&.
.RS
.TP
list \fIpolyline1\fR
First polyline
.TP
list \fIpolyline2\fR
Second polyline
.RE
.sp
.TP
\fB::math::geometry::polylinesBoundingIntersect\fR \fIpolyline1\fR \fIpolyline2\fR \fIgranularity\fR
Check whether two polylines intersect, but reduce
the correctness of the result to the given granularity\&.
Use this for faster, but weaker, intersection checking\&.
.sp
How it works:
769
770
771
772
773
774
775

776
777
778
779
780
781
782
783
784
785
786
787
788
789

790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809

810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911

912
913
914
915
916
917
918
919
920
921
922
923
924
925
926

927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943

944
945
946
947
948
949
950
951

952
953
954
955
956
957
958
959
960
961
962

963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000

1001
1002
1003
1004
1005
1006
1007
1008

1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
list \fIpolyline2\fR
Second polyline
.TP
int \fIgranularity\fR
Number of points in each part (<=1 means check
every edge)
.RE

.TP
\fB::math::geometry::intervalsOverlap\fR \fIy1\fR \fIy2\fR \fIy3\fR \fIy4\fR \fIstrict\fR
Check if two intervals overlap\&.
.RS
.TP
double \fIy1,y2\fR
Begin and end of first interval
.TP
double \fIy3,y4\fR
Begin and end of second interval
.TP
logical \fIstrict\fR
Check for strict or non-strict overlap
.RE

.TP
\fB::math::geometry::rectanglesOverlap\fR \fIP1\fR \fIP2\fR \fIQ1\fR \fIQ2\fR \fIstrict\fR
Check if two rectangles overlap\&.
.RS
.TP
list \fIP1\fR
upper-left corner of the first rectangle
.TP
list \fIP2\fR
lower-right corner of the first rectangle
.TP
list \fIQ1\fR
upper-left corner of the second rectangle
.TP
list \fIQ2\fR
lower-right corner of the second rectangle
.TP
list \fIstrict\fR
choosing strict or non-strict interpretation
.RE

.TP
\fB::math::geometry::bbox\fR \fIpolyline\fR
Calculate the bounding box of a polyline\&. Returns a list of four
coordinates: the upper-left and the lower-right corner of the box\&.
.RS
.TP
list \fIpolyline\fR
The polyline to be examined
.RE
.TP
\fB::math::geometry::overlapBBox\fR \fIpolyline1\fR \fIpolyline2\fR ?strict?
Check if the bounding boxes of two polylines overlap or not\&.
.sp
Arguments:
.RS
.TP
list \fIpolyline1\fR
The first polyline
.TP
list \fIpolyline1\fR
The second polyline
.TP
int \fIstrict\fR
Whether strict overlap is to checked (1) or if the bounding boxes may touch (0, default)
.RE
.TP
\fB::math::geometry::pointInsideBBox\fR \fIbbox\fR \fIpoint\fR
.sp
Check if the point is inside or on the bounding box or not\&.
Arguments:
.RS
.TP
list \fIbbox\fR
The bounding box given as a list of x/y coordinates
.TP
list \fIpoint\fR
The point to be checked
.RE
.TP
\fB::math::geometry::cathetusPoint\fR \fIpa\fR \fIpb\fR \fIcathetusLength\fR ?location?
Return the third point of the rectangular triangle defined by the two given end points of the hypothenusa\&.
The triangle's side from point A (or B, if the location is given as "b") to the third point is the cathetus length\&.
If the cathetus' length is lower than the length of the hypothenusa, an empty list is returned\&.
.sp
Arguments:
.RS
.TP
list \fIpa\fR
The starting point on hypotenuse
.TP
list \fIpb\fR
The ending point on hypotenuse
.TP
float \fIcathetusLength\fR
The length of the cathetus of the triangle
.TP
string \fIlocation\fR
The location of the given cathetus,
"a" means given cathetus shares point pa (default)
"b" means given cathetus shares point pb
.RE
.TP
\fB::math::geometry::parallel\fR \fIline\fR \fIoffset\fR ?orient?
Return a line parallel to the given line, with a distance "offset"\&. The orientation is determined by the
two points defining the line\&.
.sp
Arguments:
.RS
.TP
list \fIline\fR
The given line
.TP
float \fIoffset\fR
The distance to the given line
.TP
string \fIorient\fR
Orientation of the new line with respect to the given line (defaults to "right")
.RE
.sp
.TP
\fB::math::geometry::unitVector\fR \fIline\fR
Return a unit vector from the given line or direction, if the \fIline\fR argument is
a single point (then a line through the origin is assumed)
Arguments:
.RS
.TP
list \fIline\fR
The line in question (or a single point, implying a line through the origin)
.RE
.TP
\fB::math::geometry::pointInsidePolygon\fR \fIP\fR \fIpolyline\fR
Determine if a point is completely inside a polygon\&. If the point
touches the polygon, then the point is not completely inside the
polygon\&.
.RS
.TP
list \fIP\fR
Coordinates of the point
.TP
list \fIpolyline\fR
The polyline to be examined
.RE

.TP
\fB::math::geometry::pointInsidePolygonAlt\fR \fIP\fR \fIpolyline\fR
Determine if a point is completely inside a polygon\&. If the point
touches the polygon, then the point is not completely inside the
polygon\&. \fINote:\fR this alternative procedure uses the so-called
winding number to determine this\&. It handles self-intersecting polygons
in a "natural" way\&.
.RS
.TP
list \fIP\fR
Coordinates of the point
.TP
list \fIpolyline\fR
The polyline to be examined
.RE

.TP
\fB::math::geometry::rectangleInsidePolygon\fR \fIP1\fR \fIP2\fR \fIpolyline\fR
Determine if a rectangle is completely inside a polygon\&. If polygon
touches the rectangle, then the rectangle is not complete inside the
polygon\&.
.RS
.TP
list \fIP1\fR
Upper-left corner of the rectangle
.TP
list \fIP2\fR
Lower-right corner of the rectangle
.sp
.TP
list \fIpolygon\fR
The polygon in question
.RE

.TP
\fB::math::geometry::areaPolygon\fR \fIpolygon\fR
Calculate the area of a polygon\&.
.RS
.TP
list \fIpolygon\fR
The polygon in question
.RE

.TP
\fB::math::geometry::translate\fR \fIvector\fR \fIpolyline\fR
Translate a polyline over a given vector
.RS
.TP
list \fIvector\fR
Translation vector
.TP
list \fIpolyline\fR
The polyline to be translated
.RE

.TP
\fB::math::geometry::rotate\fR \fIangle\fR \fIpolyline\fR
Rotate a polyline over a given angle (degrees) around the origin
.RS
.TP
list \fIangle\fR
Angle over which to rotate the polyline (degrees)
.TP
list \fIpolyline\fR
The polyline to be rotated
.RE
.TP
\fB::math::geometry::rotateAbout\fR \fIp\fR \fIangle\fR \fIpolyline\fR
Rotate a polyline around a given point p and return the new polyline\&.
.sp
Arguments:
.RS
.TP
list \fIp\fR
The point of rotation
.TP
float \fIangle\fR
The angle over which to rotate the polyline (degrees)
.TP
list \fIpolyline\fR
The polyline to be rotated
.RE
.TP
\fB::math::geometry::reflect\fR \fIangle\fR \fIpolyline\fR
Reflect a polyline in a line through the origin at a given angle (degrees) to the x-axis
.RS
.TP
list \fIangle\fR
Angle of the line of reflection (degrees)
.TP
list \fIpolyline\fR
The polyline to be reflected
.RE

.TP
\fB::math::geometry::degToRad\fR \fIangle\fR
Convert from degrees to radians
.RS
.TP
list \fIangle\fR
Angle in degrees
.RE

.TP
\fB::math::geometry::radToDeg\fR \fIangle\fR
Convert from radians to degrees
.RS
.TP
list \fIangle\fR
Angle in radians
.RE
.TP
\fB::math::geometry::circle\fR \fIcentre\fR \fIradius\fR
Convenience procedure to create a circle from a point and a radius\&.
.RS
.TP
list \fIcentre\fR
Coordinates of the circle centre
.TP
list \fIradius\fR
Radius of the circle
.RE
.TP
\fB::math::geometry::circleTwoPoints\fR \fIpoint1\fR \fIpoint2\fR
Convenience procedure to create a circle from two points on its circumference
The centre is the point between the two given points, the radius is half the
distance between them\&.
.RS
.TP
list \fIpoint1\fR
First point
.TP
list \fIpoint2\fR
Second point
.RE
.TP
\fB::math::geometry::pointInsideCircle\fR \fIpoint\fR \fIcircle\fR
Determine if the given point is inside the circle or on the circumference (1)
or outside (0)\&.
.RS
.TP
list \fIpoint\fR
Point to be checked
.TP
list \fIcircle\fR
Circle that may or may not contain the point
.RE
.TP
\fB::math::geometry::lineIntersectsCircle\fR \fIline\fR \fIcircle\fR
Determine if the given line intersects the circle or touches it (1)
or does not (0)\&.
.RS
.TP
list \fIline\fR
Line to be checked
.TP
list \fIcircle\fR
Circle that may or may not be intersected
.RE
.TP
\fB::math::geometry::lineSegmentIntersectsCircle\fR \fIsegment\fR \fIcircle\fR
Determine if the given line segment intersects the circle or touches it (1)
or does not (0)\&.
.RS
.TP
list \fIsegment\fR
Line segment to be checked
.TP
list \fIcircle\fR
Circle that may or may not be intersected
.RE
.TP
\fB::math::geometry::intersectionLineWithCircle\fR \fIline\fR \fIcircle\fR
Determine the points at which the given line intersects the circle\&. There can
be zero, one or two points\&. (If the line touches the circle or is close to it,
then one point is returned\&. An arbitrary margin of 1\&.0e-10 times the radius
is used to determine this situation\&.)
.RS
.TP
list \fIline\fR
Line to be checked
.TP
list \fIcircle\fR
Circle that may or may not be intersected
.RE
.TP
\fB::math::geometry::intersectionCircleWithCircle\fR \fIcircle1\fR \fIcircle2\fR
Determine the points at which the given two circles intersect\&. There can
be zero, one or two points\&. (If the two circles touch the circle or are very close,
then one point is returned\&. An arbitrary margin of 1\&.0e-10 times the mean of the radii of
the two circles is used to determine this situation\&.)
.RS
.TP
list \fIcircle1\fR
First circle
.TP
list \fIcircle2\fR
Second circle
.RE
.TP
\fB::math::geometry::tangentLinesToCircle\fR \fIpoint\fR \fIcircle\fR
Determine the tangent lines from the given point to the circle\&. There can
be zero, one or two lines\&. (If the point is on the cirucmference or very close to
the circle, then one line is returned\&. An arbitrary margin of 1\&.0e-10 times the
radius of the circle is used to determine this situation\&.)
.RS
.TP
list \fIpoint\fR
Point in question
.TP
list \fIcircle\fR
Circle to which the tangent lines are to be determined
.RE
.TP
\fB::math::geometry::intersectionPolylines\fR \fIpolyline1\fR \fIpolyline2\fR ?mode? ?granularity?
Return the first point or all points where the two polylines intersect\&. If the number of points in the polylines is large,
you can use the granularity to get an approximate answer faster\&.
.sp
Arguments:
.RS
.TP
list \fIpolyline1\fR
The first polyline
.TP
list \fIpolyline2\fR
The second polyline
.TP
string \fImode\fR
Whether to return only the first (default) or to return all intersection points ("all")
.TP
int \fIgranularity\fR
The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
.RE
.TP
\fB::math::geometry::intersectionPolylineCircle\fR \fIpolyline\fR \fIcircle\fR ?mode? ?granularity?
Return the first point or all points where the polyline intersects the circle\&. If the number of points in the polyline is large,
you can use the granularity to get an approximate answer faster\&.
.sp
Arguments:
.RS
.TP
list \fIpolyline\fR
The polyline that may intersect the circle
.TP
list \fIcircle\fR
The circle in question
.TP
string \fImode\fR
Whether to return only the first (default) or to return all intersection points ("all")
.TP
int \fIgranularity\fR
The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
.RE
.TP
\fB::math::geometry::polylineCutOrigin\fR \fIpolyline1\fR \fIpolyline2\fR ?granularity?
Return the part of the first polyline from the origin up to the first intersection with the second\&. If the number of points in the polyline is large,
you can use the granularity to get an approximate answer faster\&.
.sp
Arguments:
.RS
.TP
list \fIpolyline1\fR
The first polyline (from which a part is to be returned)
.TP
list \fIpolyline2\fR
The second polyline
.TP
int \fIgranularity\fR
The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
.RE
.TP
\fB::math::geometry::polylineCutEnd\fR \fIpolyline1\fR \fIpolyline2\fR ?granularity?
Return the part of the first polyline from the last intersection point with the second to the end\&. If the number of points in the polyline is large,
you can use the granularity to get an approximate answer faster\&.
.sp
Arguments:
.RS
.TP
list \fIpolyline1\fR
The first polyline (from which a part is to be returned)
.TP
list \fIpolyline2\fR
The second polyline
.TP
int \fIgranularity\fR
The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
.RE
.TP
\fB::math::geometry::splitPolyline\fR \fIpolyline\fR \fInumberVertex\fR
Split the poyline into a set of polylines where each separate polyline holds "numberVertex" vertices between the two end points\&.
.sp
Arguments:
.RS
.TP
list \fIpolyline\fR
The polyline to be split up
.TP
int \fInumberVertex\fR
The number of "internal" vertices
.RE
.TP
\fB::math::geometry::enrichPolyline\fR \fIpolyline\fR \fIaccuracy\fR
Split up each segment of a polyline into a number of smaller segments and return the result\&.
.sp
Arguments:
.RS
.TP
list \fIpolyline\fR
The polyline to be refined
.TP
int \fIaccuracy\fR
The number of subsegments to be created
.RE
.TP
\fB::math::geometry::cleanupPolyline\fR \fIpolyline\fR
Remove duplicate neighbouring vertices and return the result\&.
.sp
Arguments:
.RS
.TP
list \fIpolyline\fR
The polyline to be cleaned up
.RE
.PP
.SH "COORDINATE SYSTEM"
The coordinate system used by the package is the ordinary cartesian system, where the
positive x-axis is directed to the right and the positive y-axis is directed upwards\&.
Angles and directions are defined with respect to the positive x-axis in a counter-clockwise
direction, so that an angle of 90 degrees is the direction of the positive y-axis\&.
Note that the Tk canvas coordinates differ from this, as there the origin is located in the
upper left corner of the window\&. Up to and including version 1\&.3, the direction and octant
procedures of this package used this convention inconsistently\&.
.SH REFERENCES
.IP [1]
\fIPolygon Intersection\fR [http:/wiki\&.tcl\&.tk/12070]
.IP [2]
\fIhttp://en\&.wikipedia\&.org/wiki/Line-line_intersection\fR
.IP [3]
\fIhttp://local\&.wasp\&.uwa\&.edu\&.au/~pbourke/geometry/lineline2d/\fR
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: geometry\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
angle, distance, line, math, plane geometry, point
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2001 by Ideogramic ApS and other parties
Copyright (c) 2010 by Andreas Kupries
Copyright (c) 2010 by Kevin Kenny
Copyright (c) 2018 by Arjen Markus
Copyright (c) 2020 by Manfred Rosenberger

.fi







>














>




















>









<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













>















>

















>








>









|

>









|

<
<
<

<
<
<
<
<
<
<
<
<
<
<
<











>








>








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<















<
<
<
<
<
<
<
<







|
|
|
<


696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748



749












































































750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829



830












831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859




















































































































































































































860








861
862
863
864
865
866
867
868
869
870
871
872
873
874
875








876
877
878
879
880
881
882
883
884
885

886
887
list \fIpolyline2\fR
Second polyline
.TP
int \fIgranularity\fR
Number of points in each part (<=1 means check
every edge)
.RE
.sp
.TP
\fB::math::geometry::intervalsOverlap\fR \fIy1\fR \fIy2\fR \fIy3\fR \fIy4\fR \fIstrict\fR
Check if two intervals overlap\&.
.RS
.TP
double \fIy1,y2\fR
Begin and end of first interval
.TP
double \fIy3,y4\fR
Begin and end of second interval
.TP
logical \fIstrict\fR
Check for strict or non-strict overlap
.RE
.sp
.TP
\fB::math::geometry::rectanglesOverlap\fR \fIP1\fR \fIP2\fR \fIQ1\fR \fIQ2\fR \fIstrict\fR
Check if two rectangles overlap\&.
.RS
.TP
list \fIP1\fR
upper-left corner of the first rectangle
.TP
list \fIP2\fR
lower-right corner of the first rectangle
.TP
list \fIQ1\fR
upper-left corner of the second rectangle
.TP
list \fIQ2\fR
lower-right corner of the second rectangle
.TP
list \fIstrict\fR
choosing strict or non-strict interpretation
.RE
.sp
.TP
\fB::math::geometry::bbox\fR \fIpolyline\fR
Calculate the bounding box of a polyline\&. Returns a list of four
coordinates: the upper-left and the lower-right corner of the box\&.
.RS
.TP
list \fIpolyline\fR
The polyline to be examined
.RE



.sp












































































.TP
\fB::math::geometry::pointInsidePolygon\fR \fIP\fR \fIpolyline\fR
Determine if a point is completely inside a polygon\&. If the point
touches the polygon, then the point is not completely inside the
polygon\&.
.RS
.TP
list \fIP\fR
Coordinates of the point
.TP
list \fIpolyline\fR
The polyline to be examined
.RE
.sp
.TP
\fB::math::geometry::pointInsidePolygonAlt\fR \fIP\fR \fIpolyline\fR
Determine if a point is completely inside a polygon\&. If the point
touches the polygon, then the point is not completely inside the
polygon\&. \fINote:\fR this alternative procedure uses the so-called
winding number to determine this\&. It handles self-intersecting polygons
in a "natural" way\&.
.RS
.TP
list \fIP\fR
Coordinates of the point
.TP
list \fIpolyline\fR
The polyline to be examined
.RE
.sp
.TP
\fB::math::geometry::rectangleInsidePolygon\fR \fIP1\fR \fIP2\fR \fIpolyline\fR
Determine if a rectangle is completely inside a polygon\&. If polygon
touches the rectangle, then the rectangle is not complete inside the
polygon\&.
.RS
.TP
list \fIP1\fR
Upper-left corner of the rectangle
.TP
list \fIP2\fR
Lower-right corner of the rectangle
.sp
.TP
list \fIpolygon\fR
The polygon in question
.RE
.sp
.TP
\fB::math::geometry::areaPolygon\fR \fIpolygon\fR
Calculate the area of a polygon\&.
.RS
.TP
list \fIpolygon\fR
The polygon in question
.RE
.sp
.TP
\fB::math::geometry::translate\fR \fIvector\fR \fIpolyline\fR
Translate a polyline over a given vector
.RS
.TP
list \fIvector\fR
Translation vector
.TP
list \fIpolyline\fR
The polyline to be rotated
.RE
.sp
.TP
\fB::math::geometry::rotate\fR \fIangle\fR \fIpolyline\fR
Rotate a polyline over a given angle (degrees) around the origin
.RS
.TP
list \fIangle\fR
Angle over which to rotate the polyline (degrees)
.TP
list \fIpolyline\fR
The polyline to be translated
.RE



.sp












.TP
\fB::math::geometry::reflect\fR \fIangle\fR \fIpolyline\fR
Reflect a polyline in a line through the origin at a given angle (degrees) to the x-axis
.RS
.TP
list \fIangle\fR
Angle of the line of reflection (degrees)
.TP
list \fIpolyline\fR
The polyline to be reflected
.RE
.sp
.TP
\fB::math::geometry::degToRad\fR \fIangle\fR
Convert from degrees to radians
.RS
.TP
list \fIangle\fR
Angle in degrees
.RE
.sp
.TP
\fB::math::geometry::radToDeg\fR \fIangle\fR
Convert from radians to degrees
.RS
.TP
list \fIangle\fR
Angle in radians
.RE




















































































































































































































.PP








.SH REFERENCES
.IP [1]
\fIPolygon Intersection\fR [http:/wiki\&.tcl\&.tk/12070]
.IP [2]
\fIhttp://en\&.wikipedia\&.org/wiki/Line-line_intersection\fR
.IP [3]
\fIhttp://local\&.wasp\&.uwa\&.edu\&.au/~pbourke/geometry/lineline2d/\fR
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: geometry\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
angle, distance, line, math, plane geometry, point
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2001 by Ideogramic ApS and other parties
Copyright (c) 2004 by Arjen Markus
Copyright (c) 2010 by Andreas Kupries
Copyright (c) 2010 by Kevin Kenny


.fi

Changes to idoc/man/files/modules/math/numtheory.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'numtheory\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2010 Lars Hellström <Lars dot Hellstrom at residenset dot net>
'\"
.TH "math::numtheory" n 1\&.1\&.1 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'numtheory\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2010 Lars Hellström <Lars dot Hellstrom at residenset dot net>
'\"
.TH "math::numtheory" n 1\&.0 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320

321
322
323
324
325
326
327
328
..
.BS
.SH NAME
math::numtheory \- Number Theory
.SH SYNOPSIS
package require \fBTcl  ?8\&.5?\fR
.sp
package require \fBmath::numtheory  ?1\&.1\&.1?\fR
.sp
\fBmath::numtheory::isprime\fR \fIN\fR ?\fIoption\fR \fIvalue\fR \&.\&.\&.?
.sp
\fBmath::numtheory::firstNprimes\fR \fIN\fR
.sp
\fBmath::numtheory::primesLowerThan\fR \fIN\fR
.sp
\fBmath::numtheory::primeFactors\fR \fIN\fR
.sp
\fBmath::numtheory::primesLowerThan\fR \fIN\fR
.sp
\fBmath::numtheory::primeFactors\fR \fIN\fR
.sp
\fBmath::numtheory::uniquePrimeFactors\fR \fIN\fR
.sp
\fBmath::numtheory::factors\fR \fIN\fR
.sp
\fBmath::numtheory::totient\fR \fIN\fR
.sp
\fBmath::numtheory::moebius\fR \fIN\fR
.sp
\fBmath::numtheory::legendre\fR \fIa\fR \fIp\fR
.sp
\fBmath::numtheory::jacobi\fR \fIa\fR \fIb\fR
.sp
\fBmath::numtheory::gcd\fR \fIm\fR \fIn\fR
.sp
\fBmath::numtheory::lcm\fR \fIm\fR \fIn\fR
.sp
\fBmath::numtheory::numberPrimesGauss\fR \fIN\fR
.sp
\fBmath::numtheory::numberPrimesLegendre\fR \fIN\fR
.sp
\fBmath::numtheory::numberPrimesLegendreModified\fR \fIN\fR
.sp
\fBmath::numtheory::differenceNumberPrimesLegendreModified\fR \fIlower\fR \fIupper\fR
.sp
.BE
.SH DESCRIPTION
.PP
This package is for collecting various number-theoretic operations, with

a slight bias to prime numbers\&.
.TP
\fBmath::numtheory::isprime\fR \fIN\fR ?\fIoption\fR \fIvalue\fR \&.\&.\&.?
The \fBisprime\fR command tests whether the integer \fIN\fR is a
prime, returning a boolean true value for prime \fIN\fR and a
boolean false value for non-prime \fIN\fR\&. The formal definition of
\'prime' used is the conventional, that the number being tested is
greater than 1 and only has trivial divisors\&.







|



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



|
>
|







272
273
274
275
276
277
278
279
280
281
282


































283
284
285
286
287
288
289
290
291
292
293
294
295
..
.BS
.SH NAME
math::numtheory \- Number Theory
.SH SYNOPSIS
package require \fBTcl  ?8\&.5?\fR
.sp
package require \fBmath::numtheory  ?1\&.0?\fR
.sp
\fBmath::numtheory::isprime\fR \fIN\fR ?\fIoption\fR \fIvalue\fR \&.\&.\&.?
.sp


































.BE
.SH DESCRIPTION
.PP
This package is for collecting various number-theoretic operations,
though at the moment it only provides that of testing whether an
integer is a prime\&.
.TP
\fBmath::numtheory::isprime\fR \fIN\fR ?\fIoption\fR \fIvalue\fR \&.\&.\&.?
The \fBisprime\fR command tests whether the integer \fIN\fR is a
prime, returning a boolean true value for prime \fIN\fR and a
boolean false value for non-prime \fIN\fR\&. The formal definition of
\'prime' used is the conventional, that the number being tested is
greater than 1 and only has trivial divisors\&.
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
which controls how many times the Miller-Rabin test should be
repeated with randomly chosen bases\&. Each repetition reduces the
probability of a false positive by a factor at least 4\&. The
default for \fIrepetitions\fR is 4\&.
.RE
.IP
Unknown options are silently ignored\&.
.TP
\fBmath::numtheory::firstNprimes\fR \fIN\fR
Return the first N primes
.RS
.TP
integer \fIN\fR (in)
Number of primes to return
.RE
.TP
\fBmath::numtheory::primesLowerThan\fR \fIN\fR
Return the prime numbers lower/equal to N
.RS
.TP
integer \fIN\fR (in)
Maximum number to consider
.RE
.TP
\fBmath::numtheory::primeFactors\fR \fIN\fR
Return a list of the prime numbers in the number N
.RS
.TP
integer \fIN\fR (in)
Number to be factorised
.RE
.TP
\fBmath::numtheory::primesLowerThan\fR \fIN\fR
Return the prime numbers lower/equal to N
.RS
.TP
integer \fIN\fR (in)
Maximum number to consider
.RE
.TP
\fBmath::numtheory::primeFactors\fR \fIN\fR
Return a list of the prime numbers in the number N
.RS
.TP
integer \fIN\fR (in)
Number to be factorised
.RE
.TP
\fBmath::numtheory::uniquePrimeFactors\fR \fIN\fR
Return a list of the \fIunique\fR prime numbers in the number N
.RS
.TP
integer \fIN\fR (in)
Number to be factorised
.RE
.TP
\fBmath::numtheory::factors\fR \fIN\fR
Return a list of all \fIunique\fR factors in the number N, including 1 and N itself
.RS
.TP
integer \fIN\fR (in)
Number to be factorised
.RE
.TP
\fBmath::numtheory::totient\fR \fIN\fR
Evaluate the Euler totient function for the number N (number of numbers
relatively prime to N)
.RS
.TP
integer \fIN\fR (in)
Number in question
.RE
.TP
\fBmath::numtheory::moebius\fR \fIN\fR
Evaluate the Moebius function for the number N
.RS
.TP
integer \fIN\fR (in)
Number in question
.RE
.TP
\fBmath::numtheory::legendre\fR \fIa\fR \fIp\fR
Evaluate the Legendre symbol (a/p)
.RS
.TP
integer \fIa\fR (in)
Upper number in the symbol
.TP
integer \fIp\fR (in)
Lower number in the symbol (must be non-zero)
.RE
.TP
\fBmath::numtheory::jacobi\fR \fIa\fR \fIb\fR
Evaluate the Jacobi symbol (a/b)
.RS
.TP
integer \fIa\fR (in)
Upper number in the symbol
.TP
integer \fIb\fR (in)
Lower number in the symbol (must be odd)
.RE
.TP
\fBmath::numtheory::gcd\fR \fIm\fR \fIn\fR
Return the greatest common divisor of \fIm\fR and \fIn\fR
.RS
.TP
integer \fIm\fR (in)
First number
.TP
integer \fIn\fR (in)
Second number
.RE
.TP
\fBmath::numtheory::lcm\fR \fIm\fR \fIn\fR
Return the lowest common multiple of \fIm\fR and \fIn\fR
.RS
.TP
integer \fIm\fR (in)
First number
.TP
integer \fIn\fR (in)
Second number
.RE
.TP
\fBmath::numtheory::numberPrimesGauss\fR \fIN\fR
Estimate the number of primes according the formula by Gauss\&.
.RS
.TP
integer \fIN\fR (in)
Number in question, should be larger than 0
.RE
.TP
\fBmath::numtheory::numberPrimesLegendre\fR \fIN\fR
Estimate the number of primes according the formula by Legendre\&.
.RS
.TP
integer \fIN\fR (in)
Number in question, should be larger than 0
.RE
.TP
\fBmath::numtheory::numberPrimesLegendreModified\fR \fIN\fR
Estimate the number of primes according the modified formula by Legendre\&.
.RS
.TP
integer \fIN\fR (in)
Number in question, should be larger than 0
.RE
.TP
\fBmath::numtheory::differenceNumberPrimesLegendreModified\fR \fIlower\fR \fIupper\fR
Estimate the number of primes between tow limits according the modified formula by Legendre\&.
.RS
.TP
integer \fIlower\fR (in)
Lower limit for the primes, should be larger than 0
.TP
integer \fIupper\fR (in)
Upper limit for the primes, should be larger than 0
.RE
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: numtheory\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
number theory, prime
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2010 Lars Hellström <Lars dot Hellstrom at residenset dot net>

.fi







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<
<
<
<
<









313
314
315
316
317
318
319
























































































































































320
321
322
323
324
325
326
327








328
329
330
331
332
333
334
335
336
which controls how many times the Miller-Rabin test should be
repeated with randomly chosen bases\&. Each repetition reduces the
probability of a false positive by a factor at least 4\&. The
default for \fIrepetitions\fR is 4\&.
.RE
.IP
Unknown options are silently ignored\&.
























































































































































.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: numtheory\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
number theory, prime
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2010 Lars Hellström <Lars dot Hellstrom at residenset dot net>

.fi

Changes to idoc/man/files/modules/math/optimize.n.

604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: optimize\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
linear program, math, maximum, minimum, optimization
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>
Copyright (c) 2004,2005 Kevn B\&. Kenny <kennykb@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<










604
605
606
607
608
609
610








611
612
613
614
615
616
617
618
619
620
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: optimize\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
linear program, math, maximum, minimum, optimization
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>
Copyright (c) 2004,2005 Kevn B\&. Kenny <kennykb@users\&.sourceforge\&.net>

.fi

Deleted idoc/man/files/modules/math/pca.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
'\"
'\" Generated from file 'pca\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "math::PCA" n 1\&.0 tcllib "Principal Components Analysis"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
math::PCA \- Package for Principal Component Analysis
.SH SYNOPSIS
package require \fBTcl  ?8\&.6?\fR
.sp
package require \fBmath::linearalgebra  1\&.0\fR
.sp
\fB::math::PCA::createPCA\fR \fIdata\fR ?args?
.sp
\fB$pca using\fR ?number?|?-minproportion value?
.sp
\fB$pca eigenvectors\fR ?option?
.sp
\fB$pca eigenvalues\fR ?option?
.sp
\fB$pca proportions\fR ?option?
.sp
\fB$pca approximate\fR \fIobservation\fR
.sp
\fB$pca approximatOriginal\fR
.sp
\fB$pca scores\fR \fIobservation\fR
.sp
\fB$pca distance\fR \fIobservation\fR
.sp
\fB$pca qstatistic\fR \fIobservation\fR ?option?
.sp
.BE
.SH DESCRIPTION
.PP
The PCA package provides a means to perform principal components analysis
in Tcl, using an object-oriented technique as facilitated by TclOO\&. It
actually defines a single public method, \fI::math::PCA::createPCA\fR,
which constructs an object based on the data that are passed to perform
the actual analysis\&.
.PP
The methods of the PCA objects that are created with this command allow one
to examine the principal components, to approximate (new) observations
using all or a selected number of components only and to examine the
properties of the components and the statistics of the approximations\&.
.PP
The package has been modelled after the PCA example provided by the
original linear algebra package by Ed Hume\&.
.SH COMMANDS
The \fImath::PCA\fR package provides one public command:
.TP
\fB::math::PCA::createPCA\fR \fIdata\fR ?args?
Create a new object, based on the data that are passed via the \fIdata\fR argument\&.
The principal components may be based on either correlations or covariances\&.
All observations will be normalised according to the mean and standard deviation
of the original data\&.
.RS
.TP
list \fIdata\fR
- A list of observations (see the example below)\&.
.TP
list \fIargs\fR
- A list of key-value pairs defining the options\&. Currently there is
only one key: \fI-covariances\fR\&. This indicates if covariances are to be used
(if the value is 1) or instead correlations (value is 0)\&. The default is to use
correlations\&.
.RE
.PP
The PCA object that is created has the following methods:
.TP
\fB$pca using\fR ?number?|?-minproportion value?
Set the number of components to be used in the analysis (the number of retained components)\&.
Returns the number of components, also if no argument is given\&.
.RS
.TP
int \fInumber\fR
- The number of components to be retained
.TP
double \fIvalue\fR
- Select the number of components based on the minimum proportion
of variation that is retained by them\&. Should be a value between 0 and 1\&.
.RE
.TP
\fB$pca eigenvectors\fR ?option?
Return the eigenvectors as a list of lists\&.
.RS
.TP
string \fIoption\fR
- By default only the \fIretained\fR components are returned\&.
If all eigenvectors are required, use the option \fI-all\fR\&.
.RE
.TP
\fB$pca eigenvalues\fR ?option?
Return the eigenvalues as a list of lists\&.
.RS
.TP
string \fIoption\fR
- By default only the eigenvalues of the \fIretained\fR components are returned\&.
If all eigenvalues are required, use the option \fI-all\fR\&.
.RE
.TP
\fB$pca proportions\fR ?option?
Return the proportions for all components, that is, the amount of variations that each
components can explain\&.
.TP
\fB$pca approximate\fR \fIobservation\fR
Return an approximation of the observation based on the retained components
.RS
.TP
list \fIobservation\fR
- The values for the observation\&.
.RE
.TP
\fB$pca approximatOriginal\fR
Return an approximation of the original data, using the retained components\&. It is
a convenience method that works on the complete set of original data\&.
.TP
\fB$pca scores\fR \fIobservation\fR
Return the scores per retained component for the given observation\&.
.RS
.TP
list \fIobservation\fR
- The values for the observation\&.
.RE
.TP
\fB$pca distance\fR \fIobservation\fR
Return the distance between the given observation and its approximation\&. (Note:
this distance is based on the normalised vectors\&.)
.RS
.TP
list \fIobservation\fR
- The values for the observation\&.
.RE
.TP
\fB$pca qstatistic\fR \fIobservation\fR ?option?
Return the Q statistic, basically the square of the distance, for the given observation\&.
.RS
.TP
list \fIobservation\fR
- The values for the observation\&.
.TP
string \fIoption\fR
- If the observation is part of the original data, you may want
to use the corrected Q statistic\&. This is achieved with the option "-original"\&.
.RE
.PP
.SH EXAMPLE
TODO: NIST example
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIPCA\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
PCA, math, statistics, tcl
.SH CATEGORY
Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/math/polynomials.n.

494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: polynomials\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
math, polynomial functions
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









494
495
496
497
498
499
500








501
502
503
504
505
506
507
508
509
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: polynomials\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
math, polynomial functions
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>

.fi

Deleted idoc/man/files/modules/math/probopt.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
'\"
'\" Generated from file 'probopt\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "math::probopt" n 1 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
math::probopt \- Probabilistic optimisation methods
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBmath::probopt  1\fR
.sp
\fB::math::probopt::pso\fR \fIfunction\fR \fIbounds\fR \fIargs\fR
.sp
\fB::math::probopt::sce\fR \fIfunction\fR \fIbounds\fR \fIargs\fR
.sp
\fB::math::probopt::diffev\fR \fIfunction\fR \fIbounds\fR \fIargs\fR
.sp
\fB::math::probopt::lipoMax\fR \fIfunction\fR \fIbounds\fR \fIargs\fR
.sp
\fB::math::probopt::adaLipoMax\fR \fIfunction\fR \fIbounds\fR \fIargs\fR
.sp
.BE
.SH DESCRIPTION
.PP
The purpose of the \fBmath::probopt\fR package is to provide various optimisation
algorithms that are based on probabilistic techniques\&. The results of these algorithms
may therefore vary from one run to the next\&. The algorithms are all well-known and
well described and proponents generally claim they are efficient and reliable\&.
.PP
As most of these algorithms have one or more tunable parameters or even variations,
the interface to each accepts options to set these parameters or the select
the variation\&. These take the form of key-value pairs, for instance, \fI-iterations 100\fR\&.
.PP
This manual does not offer any recommendations with regards to these algorithms, nor
does it provide much in the way of guidelines for the parameters\&. For this we refer to
online articles on the algorithms in question\&.
.PP
A few notes, however:
.IP \(bu
With the exception of LIPO, the algorithms are capable of dealing with irregular (non-smooth) and even discontinuous
functions\&.
.IP \(bu
The results depend on the random number seeding and are likely not to be very accurate, especially if the function
varies slowly in the vicinty of the optimum\&. They do give a good starting point for a deterministic algorithm\&.
.PP
.PP
The collection consists of the following algorithms:
.IP \(bu
PSO - particle swarm optimisation
.IP \(bu
SCE - shuffled complexes evolution
.IP \(bu
DE - differential evolution
.IP \(bu
LIPO - Lipschitz optimisation
.PP
The various procedures have a uniform interface:
.CS


   set result [::math::probopt::algorithm function bounds args]

.CE
The arguments have the following meaning:
.IP \(bu
The argument \fIfunction\fR is the name of the procedure that evaluates the function\&.
Its interface is:
.CS


    set value [function coords]

.CE
.IP
where \fIcoords\fR is a list of coordinates at which to evaluate the function\&. It is
supposed to return the function value\&.
.IP \(bu
The argument \fIbounds\fR is a list of pairs of minimum and maximum for each coordinate\&.
This list implicitly determines the dimension of the coordinate space in which the optimum
is to be sought, for instance for a function like \fIx**2 + (y-1)**4\fR, you may specify
the bounds as \fI{{-1 1} {-1 1}}\fR, that is, two pairs for the two coordinates\&.
.IP \(bu
The rest (\fIargs\fR) consists of zero or more key-value pairs to specify the options\&. Which
options are supported by which algorithm, is documented below\&.
.PP
The result of the various optimisation procedures is a dictionary containing at least the
following elements:
.IP \(bu
\fIoptimum-coordinates\fR is a list containing the coordinates of the optimum that was found\&.
.IP \(bu
\fIoptimum-value\fR is the function value at those coordinates\&.
.IP \(bu
\fIevaluations\fR is the number of function evaluations\&.
.IP \(bu
\fIbest-values\fR is a list of successive best values, obtained as
part of the iterations\&.
.PP
.SH "DETAILS ON THE ALGORITHMS"
The algorithms in the package are the following:
.TP
\fB::math::probopt::pso\fR \fIfunction\fR \fIbounds\fR \fIargs\fR
The "particle swarm optimisation" algorithm uses the idea that the candidate
optimum points should swarm around the best point found so far, with
variations to allow for improvements\&.
.sp
It recognises the following options:
.RS
.IP \(bu
\fI-swarmsize number\fR: Number of particles to consider (default: 50)
.IP \(bu
\fI-vweight    value\fR: Weight for the current "velocity" (0-1, default: 0\&.5)
.IP \(bu
\fI-pweight    value\fR: Weight for the individual particle's best position (0-1, default: 0\&.3)
.IP \(bu
\fI-gweight    value\fR: Weight for the "best" overall position as per particle (0-1, default: 0\&.3)
.IP \(bu
\fI-type       local/global\fR: Type of optimisation
.IP \(bu
\fI-neighbours number\fR: Size of the neighbourhood (default: 5, used if "local")
.IP \(bu
\fI-iterations number\fR: Maximum number of iterations
.IP \(bu
\fI-tolerance  value\fR: Absolute minimal improvement for minimum value
.RE
.TP
\fB::math::probopt::sce\fR \fIfunction\fR \fIbounds\fR \fIargs\fR
The "shuffled complex evolution" algorithm is an extension of the Nelder-Mead algorithm that
uses multiple complexes and reorganises these complexes to find the "global" optimum\&.
.sp
It recognises the following options:
.RS
.IP \(bu
\fI-complexes           number\fR: Number of particles to consider (default: 2)
.IP \(bu
\fI-mincomplexes        number\fR: Minimum number of complexes (default: 2; not currently used)
.IP \(bu
\fI-newpoints           number\fR: Number of new points to be generated (default: 1)
.IP \(bu
\fI-shuffle             number\fR: Number of iterations after which to reshuffle the complexes (if set to 0, the default, a number will be calculated from the number of dimensions)
.IP \(bu
\fI-pointspercomplex    number\fR: Number of points per complex (if set to 0, the default, a number will be calculated from the number of dimensions)
.IP \(bu
\fI-pointspersubcomplex number\fR: Number of points per subcomplex (used to select the best points in each complex; if set to 0, the default, a number will be calculated from the number of dimensions)
.IP \(bu
\fI-iterations          number\fR: Maximum number of iterations (default: 100)
.IP \(bu
\fI-maxevaluations      number\fR: Maximum number of function evaluations (when this number is reached the iteration is broken off\&. Default: 1000 million)
.IP \(bu
\fI-abstolerance        value\fR: Absolute minimal improvement for minimum value (default: 0\&.0)
.IP \(bu
\fI-reltolerance        value\fR: Relative minimal improvement for minimum value (default: 0\&.001)
.RE
.TP
\fB::math::probopt::diffev\fR \fIfunction\fR \fIbounds\fR \fIargs\fR
The "differential evolution" algorithm uses a number of initial points that are then updated using randomly selected points\&. It is more or less akin
to genetic algorithms\&. It is controlled by two parameters, factor and lambda, where the first determines the update via random points and the second
the update with the best point found sofar\&.
.sp
It recognises the following options:
.RS
.IP \(bu
\fI-iterations          number\fR: Maximum number of iterations (default: 100)
.IP \(bu
\fI-number              number\fR: Number of point to work with (if set to 0, the default, it is calculated from the number of dimensions)
.IP \(bu
\fI-factor              value\fR: Weight of randomly selected points in the updating (0-1, default: 0\&.6)
.IP \(bu
\fI-lambda              value\fR: Weight of the best point found so far in the updating (0-1, default: 0\&.0)
.IP \(bu
\fI-crossover           value\fR: Fraction of new points to be considered for replacing the old ones (0-1, default: 0\&.5)
.IP \(bu
\fI-maxevaluations      number\fR: Maximum number of function evaluations (when this number is reached the iteration is broken off\&. Default: 1000 million)
.IP \(bu
\fI-abstolerance        value\fR: Absolute minimal improvement for minimum value (default: 0\&.0)
.IP \(bu
\fI-reltolerance        value\fR: Relative minimal improvement for minimum value (default: 0\&.001)
.RE
.TP
\fB::math::probopt::lipoMax\fR \fIfunction\fR \fIbounds\fR \fIargs\fR
The "Lipschitz optimisation" algorithm uses the "Lipschitz" property of the given function to find a \fImaximum\fR in the given bounding box\&. There are
two variants, \fIlipoMax\fR assumes a fixed estimate for the Lipschitz parameter\&.
.sp
It recognises the following options:
.RS
.IP \(bu
\fI-iterations          number\fR: Number of iterations (equals the actual number of function evaluations, default: 100)
.IP \(bu
\fI-lipschitz           value\fR: Estimate of the Lipschitz parameter (default: 10\&.0)
.RE
.TP
\fB::math::probopt::adaLipoMax\fR \fIfunction\fR \fIbounds\fR \fIargs\fR
The "adaptive Lipschitz optimisation" algorithm uses the "Lipschitz" property of the given function to find a \fImaximum\fR in the given bounding box\&. The adaptive
variant actually uses two phases to find a suitable estimate for the Lipschitz parameter\&. This is controlled by the "Bernoulli" parameter\&.
.sp
When you specify a large number of iterations, the algorithm may take a very long time to complete as it is trying to improve on the Lipschitz parameter and
the chances of hitting a better estimate diminish fast\&.
.sp
It recognises the following options:
.RS
.IP \(bu
\fI-iterations          number\fR: Number of iterations (equals the actual number of function evaluations, default: 100)
.IP \(bu
\fI-bernoulli           value\fR: Parameter for random decisions (exploration versus exploitation, default: 0\&.1)
.RE
.PP
.SH REFERENCES
The various algorithms have been described in on-line publications\&. Here are a few:
.IP \(bu
\fIPSO\fR: Maurice Clerc, Standard Particle Swarm Optimisation (2012)
\fIhttps://hal\&.archives-ouvertes\&.fr/file/index/docid/764996/filename/SPSO_descriptions\&.pdf\fR
.sp
Alternatively: \fIhttps://en\&.wikipedia\&.org/wiki/Particle_swarm_optimization\fR
.IP \(bu
\fISCE\fR: Qingyuan Duan, Soroosh Sorooshian, Vijai K\&. Gupta, Optimal use offo the SCE-UA global optimization method for calibrating watershed models
(1994), Journal of Hydrology 158, pp 265-284
.sp
\fIhttps://www\&.researchgate\&.net/publication/223408756_Optimal_Use_of_the_SCE-UA_Global_Optimization_Method_for_Calibrating_Watershed_Models\fR
.IP \(bu
\fIDE\fR: Rainer Storn and Kenneth Price, Differential Evolution - A simple and efficient adaptivescheme for globaloptimization over continuous spaces
(1996)
.sp
\fIhttp://www1\&.icsi\&.berkeley\&.edu/~storn/TR-95-012\&.pdf\fR
.IP \(bu
\fILIPO\fR: Cedric Malherbe and Nicolas Vayatis, Global optimization of Lipschitz functions,
(june 2017)
.sp
\fIhttps://arxiv\&.org/pdf/1703\&.02628\&.pdf\fR
.PP
.SH KEYWORDS
mathematics, optimisation, probabilistic calculations
.SH CATEGORY
Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/math/qcomplex.n.

553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: complexnumbers\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
complex numbers, math
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









553
554
555
556
557
558
559








560
561
562
563
564
565
566
567
568
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: complexnumbers\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
complex numbers, math
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>

.fi

Deleted idoc/man/files/modules/math/quasirandom.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
'\"
'\" Generated from file 'quasirandom\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "math::quasirandom" n 1 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
math::quasirandom \- Quasi-random points for integration and Monte Carlo type methods
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBmath::quasirandom  1\fR
.sp
\fB::math::quasirandom::qrpoint create\fR \fINAME\fR \fIDIM\fR ?ARGS?
.sp
\fBgen next\fR
.sp
\fBgen set-start\fR \fIindex\fR
.sp
\fBgen set-evaluations\fR \fInumber\fR
.sp
\fBgen integral\fR \fIfunc\fR \fIminmax\fR \fIargs\fR
.sp
.BE
.SH DESCRIPTION
.PP
In many applications pseudo-random numbers and pseudo-random points in a (limited)
sample space play an important role\&. For instance in any type of Monte Carlo simulation\&.
Pseudo-random numbers, however, may be too random and as a consequence a large
number of data points is required to reduce the error or fluctuation in the results
to the desired value\&.
.PP
Quasi-random numbers can be used as an alternative: instead of "completely" arbitrary
points, points are generated that are diverse enough to cover the entire sample space
in a more or less uniform way\&. As a consequence convergence to the limit can be
much faster, when such quasi-random numbers are well-chosen\&.
.PP
The package defines a \fIclass\fR "qrpoint" that creates a command to generate
quasi-random points in 1, 2 or more dimensions\&. The command can either generate
separate points, so that they can be used in a user-defined algorithm or use these
points to calculate integrals of functions defined over 1, 2 or more dimensions\&.
It also holds several other common algorithms\&. (NOTE: these are not implemented yet)
.PP
One particular characteristic of the generators is that there are no tuning parameters
involved, which makes the use particularly simple\&.
.SH COMMANDS
A quasi-random point generator is created using the \fIqrpoint\fR class:
.TP
\fB::math::quasirandom::qrpoint create\fR \fINAME\fR \fIDIM\fR ?ARGS?
This command takes the following arguments:
.RS
.TP
string \fINAME\fR
The name of the command to be created (alternatively: the \fInew\fR subcommand
will generate a unique name)
.TP
integer/string \fIDIM\fR
The number of dimensions or one of: "circle", "disk", "sphere" or "ball"
.TP
strings \fIARGS\fR
Zero or more key-value pairs\&. The supported options are:
.RS
.IP \(bu
\fI-start index\fR: The index for the next point to be generated (default: 1)
.IP \(bu
\fI-evaluations number\fR: The number of evaluations to be used by default (default: 100)
.RE
.RE
.PP
The points that are returned lie in the hyperblock [0,1[^n (n the number of dimensions)
or on the unit circle, within the unit disk, on the unit sphere or within the unit ball\&.
.PP
Each generator supports the following subcommands:
.TP
\fBgen next\fR
Return the coordinates of the next quasi-random point
.sp
.TP
\fBgen set-start\fR \fIindex\fR
Reset the index for the next quasi-random point\&. This is useful to control which list of points is returned\&.
Returns the new or the current value, if no value is given\&.
.sp
.TP
\fBgen set-evaluations\fR \fInumber\fR
Reset the default number of evaluations in compound algorithms\&. Note that the actual number is the
smallest 4-fold larger or equal to the given number\&. (The 4-fold plays a role in the detailed integration
routine\&.)
.sp
.TP
\fBgen integral\fR \fIfunc\fR \fIminmax\fR \fIargs\fR
Calculate the integral of the given function over the block (or the circle, sphere etc\&.)
.RS
.TP
string \fIfunc\fR
The name of the function to be integrated
.TP
list \fIminmax\fR
List of pairs of minimum and maximum coordinates\&. This can be used to
map the quasi-random coordinates to the desired hyper-block\&.
.sp
If the space is a circle, disk etc\&. then this argument should be a single value, the radius\&.
The circle, disk, etc\&. is centred at the origin\&. If this is not what is required, then a coordinate
transformation should be made within the function\&.
.TP
strings \fIargs\fR
Zero or more key-value pairs\&. The following options are supported:
.RS
.IP \(bu
\fI-evaluations number\fR: The number of evaluations to be used\&. If not specified use the
default of the generator object\&.
.RE
.RE
.PP
.SH TODO
Implement other algorithms and variants
.PP
Implement more unit tests\&.
.PP
Comparison to pseudo-random numbers for integration\&.
.SH REFERENCES
Various algorithms exist for generating quasi-random numbers\&. The generators created in this package are based on:
\fIhttp://extremelearning\&.com\&.au/unreasonable-effectiveness-of-quasirandom-sequences/\fR
.SH KEYWORDS
mathematics, quasi-random
.SH CATEGORY
Mathematics
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/math/rational_funcs.n.

463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: rationalfunctions\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
math, rational functions
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2005 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









463
464
465
466
467
468
469








470
471
472
473
474
475
476
477
478
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: rationalfunctions\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
math, rational functions
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2005 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/math/roman.n.

322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: roman\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
conversion, integer, roman numeral
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2005 Kenneth Green <kenneth\&.green@gmail\&.com>

.fi







<
<
<
<
<
<
<
<









322
323
324
325
326
327
328








329
330
331
332
333
334
335
336
337
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: roman\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
conversion, integer, roman numeral
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2005 Kenneth Green <kenneth\&.green@gmail\&.com>

.fi

Changes to idoc/man/files/modules/math/romberg.n.

568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: calculus\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
math::calculus, math::interpolate
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Kevin B\&. Kenny <kennykb@acm\&.org>\&. All rights reserved\&. Redistribution permitted under the terms of the Open Publication License <http://www\&.opencontent\&.org/openpub/>

.fi







<
<
<
<
<
<
<
<









568
569
570
571
572
573
574








575
576
577
578
579
580
581
582
583
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: calculus\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
math::calculus, math::interpolate
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Kevin B\&. Kenny <kennykb@acm\&.org>\&. All rights reserved\&. Redistribution permitted under the terms of the Open Publication License <http://www\&.opencontent\&.org/openpub/>

.fi

Changes to idoc/man/files/modules/math/special.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'special\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>
'\"
.TH "math::special" n 0\&.4 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'special\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>
'\"
.TH "math::special" n 0\&.3 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
.de MT
.QW ""
..
.BS
.SH NAME
math::special \- Special mathematical functions
.SH SYNOPSIS
package require \fBTcl  ?8\&.5?\fR
.sp
package require \fBmath::special  ?0\&.5?\fR
.sp
\fB::math::special::eulerNumber\fR \fIindex\fR
.sp
\fB::math::special::bernoulliNumber\fR \fIindex\fR
.sp
\fB::math::special::Beta\fR \fIx\fR \fIy\fR
.sp
\fB::math::special::incBeta\fR \fIa\fR \fIb\fR \fIx\fR
.sp
\fB::math::special::regIncBeta\fR \fIa\fR \fIb\fR \fIx\fR
.sp
\fB::math::special::Gamma\fR \fIx\fR
.sp
\fB::math::special::digamma\fR \fIx\fR
.sp
\fB::math::special::erf\fR \fIx\fR
.sp
\fB::math::special::erfc\fR \fIx\fR
.sp
\fB::math::special::invnorm\fR \fIp\fR
.sp
\fB::math::special::J0\fR \fIx\fR







|

|
<
<
<
<



<
<
<
<


<
<







270
271
272
273
274
275
276
277
278
279




280
281
282




283
284


285
286
287
288
289
290
291
.de MT
.QW ""
..
.BS
.SH NAME
math::special \- Special mathematical functions
.SH SYNOPSIS
package require \fBTcl  ?8\&.3?\fR
.sp
package require \fBmath::special  ?0\&.3?\fR




.sp
\fB::math::special::Beta\fR \fIx\fR \fIy\fR
.sp




\fB::math::special::Gamma\fR \fIx\fR
.sp


\fB::math::special::erf\fR \fIx\fR
.sp
\fB::math::special::erfc\fR \fIx\fR
.sp
\fB::math::special::invnorm\fR \fIp\fR
.sp
\fB::math::special::J0\fR \fIx\fR
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
             |             |             |             |
Fresnel      | C           |  all of R   |     --      |   < 2\&.0e-3
integrals    | S           |  all of R   |     --      |   < 2\&.0e-3
             |             |             |             |
general      | Beta        | (see Gamma) |     --      |   < 1\&.0e-9
             | Gamma       |  x != 0,-1, |     --      |   < 1\&.0e-9
             |             |  -2, \&.\&.\&.    |             |
             | incBeta     |             |  a, b > 0   |   < 1\&.0e-9
             | regIncBeta  |             |  a, b > 0   |   < 1\&.0e-9
             | digamma     |  x != 0,-1  |             |   < 1\&.0e-9
             |             |  -2, \&.\&.\&.    |             |
             |             |             |             |
             | sinc        |  all of R   |     --      |   exact
             |             |             |             |
orthogonal   | Legendre    |  all of R   | n = 0,1,\&.\&.\&. |   exact
polynomials  | Chebyshev   |  all of R   | n = 0,1,\&.\&.\&. |   exact
             | Laguerre    |  all of R   | n = 0,1,\&.\&.\&. |   exact
             |             |             | alpha el\&. R |
             | Hermite     |  all of R   | n = 0,1,\&.\&.\&. |   exact







<
<
<
<
<







408
409
410
411
412
413
414





415
416
417
418
419
420
421
             |             |             |             |
Fresnel      | C           |  all of R   |     --      |   < 2\&.0e-3
integrals    | S           |  all of R   |     --      |   < 2\&.0e-3
             |             |             |             |
general      | Beta        | (see Gamma) |     --      |   < 1\&.0e-9
             | Gamma       |  x != 0,-1, |     --      |   < 1\&.0e-9
             |             |  -2, \&.\&.\&.    |             |





             | sinc        |  all of R   |     --      |   exact
             |             |             |             |
orthogonal   | Legendre    |  all of R   | n = 0,1,\&.\&.\&. |   exact
polynomials  | Chebyshev   |  all of R   | n = 0,1,\&.\&.\&. |   exact
             | Laguerre    |  all of R   | n = 0,1,\&.\&.\&. |   exact
             |             |             | alpha el\&. R |
             | Hermite     |  all of R   | n = 0,1,\&.\&.\&. |   exact
445
446
447
448
449
450
451


452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
.IP \(bu
Bessel functions of the second kind (Y_n, K_n)
.IP \(bu
Bessel functions of arbitrary order (and hence the Airy functions)
.IP \(bu
Chebyshev polynomials of the second kind (U_n)
.IP \(bu


The incomplete gamma function
.PP
.SH PROCEDURES
The package defines the following public procedures:
.TP
\fB::math::special::eulerNumber\fR \fIindex\fR
Return the index'th Euler number (note: these are integer values)\&. As the
size of these numbers grows very fast, only a limited number are available\&.
.RS
.TP
int \fIindex\fR
Index of the number to be returned (should be between 0 and 54)
.RE
.sp
.TP
\fB::math::special::bernoulliNumber\fR \fIindex\fR
Return the index'th Bernoulli number\&. As the size of the numbers grows very fast,
only a limited number are available\&.
.RS
.TP
int \fIindex\fR
Index of the number to be returned (should be between 0 and 52)
.RE
.sp
.TP
\fB::math::special::Beta\fR \fIx\fR \fIy\fR
Compute the Beta function for arguments "x" and "y"
.RS
.TP
float \fIx\fR
First argument for the Beta function
.TP
float \fIy\fR
Second argument for the Beta function
.RE
.sp
.TP
\fB::math::special::incBeta\fR \fIa\fR \fIb\fR \fIx\fR
Compute the incomplete Beta function for argument "x" with parameters "a" and "b"
.RS
.TP
float \fIa\fR
First parameter for the incomplete Beta function, a > 0
.TP
float \fIb\fR
Second parameter for the incomplete Beta function, b > 0
.TP
float \fIx\fR
Argument for the incomplete Beta function
.RE
.sp
.TP
\fB::math::special::regIncBeta\fR \fIa\fR \fIb\fR \fIx\fR
Compute the regularized incomplete Beta function for argument "x" with parameters "a" and "b"
.RS
.TP
float \fIa\fR
First parameter for the incomplete Beta function, a > 0
.TP
float \fIb\fR
Second parameter for the incomplete Beta function, b > 0
.TP
float \fIx\fR
Argument for the regularized incomplete Beta function
.RE
.sp
.TP
\fB::math::special::Gamma\fR \fIx\fR
Compute the Gamma function for argument "x"
.RS
.TP
float \fIx\fR
Argument for the Gamma function
.RE
.sp
.TP
\fB::math::special::digamma\fR \fIx\fR
Compute the digamma function (psi) for argument "x"
.RS
.TP
float \fIx\fR
Argument for the digamma function
.RE
.sp
.TP
\fB::math::special::erf\fR \fIx\fR
Compute the error function for argument "x"
.RS
.TP
float \fIx\fR







>
>
|



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<
<
<
<
<
<







430
431
432
433
434
435
436
437
438
439
440
441
442




















443
444
445
446
447
448
449
450
451
452
453
454






























455
456
457
458
459
460
461
462









463
464
465
466
467
468
469
.IP \(bu
Bessel functions of the second kind (Y_n, K_n)
.IP \(bu
Bessel functions of arbitrary order (and hence the Airy functions)
.IP \(bu
Chebyshev polynomials of the second kind (U_n)
.IP \(bu
The digamma function (psi)
.IP \(bu
The incomplete gamma and beta functions
.PP
.SH PROCEDURES
The package defines the following public procedures:




















.TP
\fB::math::special::Beta\fR \fIx\fR \fIy\fR
Compute the Beta function for arguments "x" and "y"
.RS
.TP
float \fIx\fR
First argument for the Beta function
.TP
float \fIy\fR
Second argument for the Beta function
.RE
.sp






























.TP
\fB::math::special::Gamma\fR \fIx\fR
Compute the Gamma function for argument "x"
.RS
.TP
float \fIx\fR
Argument for the Gamma function
.RE









.sp
.TP
\fB::math::special::erf\fR \fIx\fR
Compute the error function for argument "x"
.RS
.TP
float \fIx\fR
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: special\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Bessel functions, error function, math, special functions
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









773
774
775
776
777
778
779








780
781
782
783
784
785
786
787
788
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: special\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Bessel functions, error function, math, special functions
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/math/statistics.n.

269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
.de MT
.QW ""
..
.BS
.SH NAME
math::statistics \- Basic statistical functions and procedures
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBmath::statistics  1\fR
.sp
\fB::math::statistics::mean\fR \fIdata\fR
.sp
\fB::math::statistics::min\fR \fIdata\fR
.sp







|







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
.de MT
.QW ""
..
.BS
.SH NAME
math::statistics \- Basic statistical functions and procedures
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBmath::statistics  1\fR
.sp
\fB::math::statistics::mean\fR \fIdata\fR
.sp
\fB::math::statistics::min\fR \fIdata\fR
.sp
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
.sp
\fB::math::statistics::lillieforsFit\fR \fIdata\fR
.sp
\fB::math::statistics::test-Duckworth\fR \fIlist1\fR \fIlist2\fR \fIsignificance\fR
.sp
\fB::math::statistics::test-anova-F\fR \fIalpha\fR \fIargs\fR
.sp
\fB::math::statistics::test-Tukey-range\fR \fIalpha\fR \fIargs\fR
.sp
\fB::math::statistics::test-Dunnett\fR \fIalpha\fR \fIcontrol\fR \fIargs\fR
.sp
\fB::math::statistics::quantiles\fR \fIdata\fR \fIconfidence\fR
.sp
\fB::math::statistics::quantiles\fR \fIlimits\fR \fIcounts\fR \fIconfidence\fR
.sp
\fB::math::statistics::autocorr\fR \fIdata\fR
.sp
\fB::math::statistics::crosscorr\fR \fIdata1\fR \fIdata2\fR







<
<
<
<







311
312
313
314
315
316
317




318
319
320
321
322
323
324
.sp
\fB::math::statistics::lillieforsFit\fR \fIdata\fR
.sp
\fB::math::statistics::test-Duckworth\fR \fIlist1\fR \fIlist2\fR \fIsignificance\fR
.sp
\fB::math::statistics::test-anova-F\fR \fIalpha\fR \fIargs\fR
.sp




\fB::math::statistics::quantiles\fR \fIdata\fR \fIconfidence\fR
.sp
\fB::math::statistics::quantiles\fR \fIlimits\fR \fIcounts\fR \fIconfidence\fR
.sp
\fB::math::statistics::autocorr\fR \fIdata\fR
.sp
\fB::math::statistics::crosscorr\fR \fIdata1\fR \fIdata2\fR
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
.sp
\fB::math::statistics::test-Rchart\fR \fIcontrol\fR \fIdata\fR
.sp
\fB::math::statistics::test-Kruskal-Wallis\fR \fIconfidence\fR \fIargs\fR
.sp
\fB::math::statistics::analyse-Kruskal-Wallis\fR \fIargs\fR
.sp
\fB::math::statistics::test-Levene\fR \fIgroups\fR
.sp
\fB::math::statistics::test-Brown-Forsythe\fR \fIgroups\fR
.sp
\fB::math::statistics::group-rank\fR \fIargs\fR
.sp
\fB::math::statistics::test-Wilcoxon\fR \fIsample_a\fR \fIsample_b\fR
.sp
\fB::math::statistics::spearman-rank\fR \fIsample_a\fR \fIsample_b\fR
.sp
\fB::math::statistics::spearman-rank-extended\fR \fIsample_a\fR \fIsample_b\fR
.sp
\fB::math::statistics::kernel-density\fR \fIdata\fR opt \fI-option value\fR \&.\&.\&.
.sp
\fB::math::statistics::bootstrap\fR \fIdata\fR \fIsampleSize\fR ?numberSamples?
.sp
\fB::math::statistics::wasserstein-distance\fR \fIprob1\fR \fIprob2\fR
.sp
\fB::math::statistics::kl-divergence\fR \fIprob1\fR \fIprob2\fR
.sp
\fB::math::statistics::logistic-model\fR \fIxdata\fR \fIydata\fR
.sp
\fB::math::statistics::logistic-probability\fR \fIcoeffs\fR \fIx\fR
.sp
\fB::math::statistics::tstat\fR \fIdof\fR ?alpha?
.sp
\fB::math::statistics::mv-wls\fR \fIwt1\fR \fIweights_and_values\fR
.sp
\fB::math::statistics::mv-ols\fR \fIvalues\fR
.sp
\fB::math::statistics::pdf-normal\fR \fImean\fR \fIstdev\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-lognormal\fR \fImean\fR \fIstdev\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-exponential\fR \fImean\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-uniform\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-triangular\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-symmetric-triangular\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-gamma\fR \fIalpha\fR \fIbeta\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-poisson\fR \fImu\fR \fIk\fR
.sp
\fB::math::statistics::pdf-chisquare\fR \fIdf\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-student-t\fR \fIdf\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-gamma\fR \fIa\fR \fIb\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-beta\fR \fIa\fR \fIb\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-weibull\fR \fIscale\fR \fIshape\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-gumbel\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-pareto\fR \fIscale\fR \fIshape\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-cauchy\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-laplace\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-kumaraswamy\fR \fIa\fR \fIb\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-negative-binomial\fR \fIr\fR \fIp\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-normal\fR \fImean\fR \fIstdev\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-lognormal\fR \fImean\fR \fIstdev\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-exponential\fR \fImean\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-uniform\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-triangular\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-symmetric-triangular\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-students-t\fR \fIdegrees\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-gamma\fR \fIalpha\fR \fIbeta\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-poisson\fR \fImu\fR \fIk\fR
.sp
\fB::math::statistics::cdf-beta\fR \fIa\fR \fIb\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-weibull\fR \fIscale\fR \fIshape\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-gumbel\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-pareto\fR \fIscale\fR \fIshape\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-cauchy\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-F\fR \fInf1\fR \fInf2\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-laplace\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-kumaraswamy\fR \fIa\fR \fIb\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-negative-binomial\fR \fIr\fR \fIp\fR \fIvalue\fR
.sp
\fB::math::statistics::empirical-distribution\fR \fIvalues\fR
.sp
\fB::math::statistics::random-normal\fR \fImean\fR \fIstdev\fR \fInumber\fR
.sp
\fB::math::statistics::random-lognormal\fR \fImean\fR \fIstdev\fR \fInumber\fR
.sp
\fB::math::statistics::random-exponential\fR \fImean\fR \fInumber\fR
.sp
\fB::math::statistics::random-uniform\fR \fIxmin\fR \fIxmax\fR \fInumber\fR
.sp
\fB::math::statistics::random-triangular\fR \fIxmin\fR \fIxmax\fR \fInumber\fR
.sp
\fB::math::statistics::random-symmetric-triangular\fR \fIxmin\fR \fIxmax\fR \fInumber\fR
.sp
\fB::math::statistics::random-gamma\fR \fIalpha\fR \fIbeta\fR \fInumber\fR
.sp
\fB::math::statistics::random-poisson\fR \fImu\fR \fInumber\fR
.sp
\fB::math::statistics::random-chisquare\fR \fIdf\fR \fInumber\fR
.sp
\fB::math::statistics::random-student-t\fR \fIdf\fR \fInumber\fR
.sp
\fB::math::statistics::random-beta\fR \fIa\fR \fIb\fR \fInumber\fR
.sp
\fB::math::statistics::random-weibull\fR \fIscale\fR \fIshape\fR \fInumber\fR
.sp
\fB::math::statistics::random-gumbel\fR \fIlocation\fR \fIscale\fR \fInumber\fR
.sp
\fB::math::statistics::random-pareto\fR \fIscale\fR \fIshape\fR \fInumber\fR
.sp
\fB::math::statistics::random-cauchy\fR \fIlocation\fR \fIscale\fR \fInumber\fR
.sp
\fB::math::statistics::random-laplace\fR \fIlocation\fR \fIscale\fR \fInumber\fR
.sp
\fB::math::statistics::random-kumaraswamy\fR \fIa\fR \fIb\fR \fInumber\fR
.sp
\fB::math::statistics::random-negative-binomial\fR \fIr\fR \fIp\fR \fInumber\fR
.sp
\fB::math::statistics::histogram-uniform\fR \fIxmin\fR \fIxmax\fR \fIlimits\fR \fInumber\fR
.sp
\fB::math::statistics::incompleteGamma\fR \fIx\fR \fIp\fR ?tol?
.sp
\fB::math::statistics::incompleteBeta\fR \fIa\fR \fIb\fR \fIx\fR ?tol?
.sp
\fB::math::statistics::estimate-pareto\fR \fIvalues\fR
.sp
\fB::math::statistics::estimate-exponential\fR \fIvalues\fR
.sp
\fB::math::statistics::estimate-laplace\fR \fIvalues\fR
.sp
\fB::math::statistics::estimante-negative-binomial\fR \fIr\fR \fIvalues\fR
.sp
\fB::math::statistics::filter\fR \fIvarname\fR \fIdata\fR \fIexpression\fR
.sp
\fB::math::statistics::map\fR \fIvarname\fR \fIdata\fR \fIexpression\fR
.sp
\fB::math::statistics::samplescount\fR \fIvarname\fR \fIlist\fR \fIexpression\fR
.sp
\fB::math::statistics::subdivide\fR







<
<
<
<










<
<
<
<
<
<
<
<
<
<














<
<
<
<




















<
<
<
<
<
<








<
<
<
<


















<
<
<
<
<
<










<
<
<
<


















<
<
<
<
<
<








<
<
<
<
<
<







343
344
345
346
347
348
349




350
351
352
353
354
355
356
357
358
359










360
361
362
363
364
365
366
367
368
369
370
371
372
373




374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393






394
395
396
397
398
399
400
401




402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419






420
421
422
423
424
425
426
427
428
429




430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447






448
449
450
451
452
453
454
455






456
457
458
459
460
461
462
.sp
\fB::math::statistics::test-Rchart\fR \fIcontrol\fR \fIdata\fR
.sp
\fB::math::statistics::test-Kruskal-Wallis\fR \fIconfidence\fR \fIargs\fR
.sp
\fB::math::statistics::analyse-Kruskal-Wallis\fR \fIargs\fR
.sp




\fB::math::statistics::group-rank\fR \fIargs\fR
.sp
\fB::math::statistics::test-Wilcoxon\fR \fIsample_a\fR \fIsample_b\fR
.sp
\fB::math::statistics::spearman-rank\fR \fIsample_a\fR \fIsample_b\fR
.sp
\fB::math::statistics::spearman-rank-extended\fR \fIsample_a\fR \fIsample_b\fR
.sp
\fB::math::statistics::kernel-density\fR \fIdata\fR opt \fI-option value\fR \&.\&.\&.
.sp










\fB::math::statistics::tstat\fR \fIdof\fR ?alpha?
.sp
\fB::math::statistics::mv-wls\fR \fIwt1\fR \fIweights_and_values\fR
.sp
\fB::math::statistics::mv-ols\fR \fIvalues\fR
.sp
\fB::math::statistics::pdf-normal\fR \fImean\fR \fIstdev\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-lognormal\fR \fImean\fR \fIstdev\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-exponential\fR \fImean\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-uniform\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
.sp




\fB::math::statistics::pdf-gamma\fR \fIalpha\fR \fIbeta\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-poisson\fR \fImu\fR \fIk\fR
.sp
\fB::math::statistics::pdf-chisquare\fR \fIdf\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-student-t\fR \fIdf\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-gamma\fR \fIa\fR \fIb\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-beta\fR \fIa\fR \fIb\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-weibull\fR \fIscale\fR \fIshape\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-gumbel\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-pareto\fR \fIscale\fR \fIshape\fR \fIvalue\fR
.sp
\fB::math::statistics::pdf-cauchy\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
.sp






\fB::math::statistics::cdf-normal\fR \fImean\fR \fIstdev\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-lognormal\fR \fImean\fR \fIstdev\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-exponential\fR \fImean\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-uniform\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
.sp




\fB::math::statistics::cdf-students-t\fR \fIdegrees\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-gamma\fR \fIalpha\fR \fIbeta\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-poisson\fR \fImu\fR \fIk\fR
.sp
\fB::math::statistics::cdf-beta\fR \fIa\fR \fIb\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-weibull\fR \fIscale\fR \fIshape\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-gumbel\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-pareto\fR \fIscale\fR \fIshape\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-cauchy\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
.sp
\fB::math::statistics::cdf-F\fR \fInf1\fR \fInf2\fR \fIvalue\fR
.sp






\fB::math::statistics::empirical-distribution\fR \fIvalues\fR
.sp
\fB::math::statistics::random-normal\fR \fImean\fR \fIstdev\fR \fInumber\fR
.sp
\fB::math::statistics::random-lognormal\fR \fImean\fR \fIstdev\fR \fInumber\fR
.sp
\fB::math::statistics::random-exponential\fR \fImean\fR \fInumber\fR
.sp
\fB::math::statistics::random-uniform\fR \fIxmin\fR \fIxmax\fR \fInumber\fR
.sp




\fB::math::statistics::random-gamma\fR \fIalpha\fR \fIbeta\fR \fInumber\fR
.sp
\fB::math::statistics::random-poisson\fR \fImu\fR \fInumber\fR
.sp
\fB::math::statistics::random-chisquare\fR \fIdf\fR \fInumber\fR
.sp
\fB::math::statistics::random-student-t\fR \fIdf\fR \fInumber\fR
.sp
\fB::math::statistics::random-beta\fR \fIa\fR \fIb\fR \fInumber\fR
.sp
\fB::math::statistics::random-weibull\fR \fIscale\fR \fIshape\fR \fInumber\fR
.sp
\fB::math::statistics::random-gumbel\fR \fIlocation\fR \fIscale\fR \fInumber\fR
.sp
\fB::math::statistics::random-pareto\fR \fIscale\fR \fIshape\fR \fInumber\fR
.sp
\fB::math::statistics::random-cauchy\fR \fIlocation\fR \fIscale\fR \fInumber\fR
.sp






\fB::math::statistics::histogram-uniform\fR \fIxmin\fR \fIxmax\fR \fIlimits\fR \fInumber\fR
.sp
\fB::math::statistics::incompleteGamma\fR \fIx\fR \fIp\fR ?tol?
.sp
\fB::math::statistics::incompleteBeta\fR \fIa\fR \fIb\fR \fIx\fR ?tol?
.sp
\fB::math::statistics::estimate-pareto\fR \fIvalues\fR
.sp






\fB::math::statistics::filter\fR \fIvarname\fR \fIdata\fR \fIexpression\fR
.sp
\fB::math::statistics::map\fR \fIvarname\fR \fIdata\fR \fIexpression\fR
.sp
\fB::math::statistics::samplescount\fR \fIvarname\fR \fIlist\fR \fIexpression\fR
.sp
\fB::math::statistics::subdivide\fR
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890

891
892
893
894
895
896
897
.TP
float \fIsignificance\fR
- Significance level (either 0\&.05, 0\&.01 or 0\&.001)
.RE
.sp
.TP
\fB::math::statistics::test-anova-F\fR \fIalpha\fR \fIargs\fR
Determine if two or more groups with normally distributed data have the same means\&.
The procedure returns 0 if the means are likely unequal, 1 if they are\&. This is
a one-way ANOVA test\&. The groups may also be stored in a nested list:
The procedure returns a list of the comparison results for each pair of groups\&. Each
element of this list contains: the index of the first group and that of the second group,
whether the means are likely to be different (1) or not (0) and the confidence interval
the conclusion is based on\&. The groups may also be stored in a nested list:
.CS


    test-anova-F 0\&.05 $A $B $C
    #
    # Or equivalently:
    #
    test-anova-F 0\&.05 [list $A $B $C]

.CE
.RS
.TP
float \fIalpha\fR
- Significance level
.TP
list \fIargs\fR
- Two or more groups of data to be checked
.RE
.sp
.TP
\fB::math::statistics::test-Tukey-range\fR \fIalpha\fR \fIargs\fR
Determine if two or more groups with normally distributed data have the same means,
using Tukey's range test\&. It is complementary to the ANOVA test\&.
The procedure returns a list of the comparison results for each pair of groups\&. Each
element of this list contains: the index of the first group and that of the second group,
whether the means are likely to be different (1) or not (0) and the confidence interval
the conclusion is based on\&. The groups may also be stored in a nested list, just as with
the ANOVA test\&.
.RS
.TP
float \fIalpha\fR
- Significance level - either 0\&.05 or 0\&.01
.TP
list \fIargs\fR
- Two or more groups of data to be checked
.RE
.sp
.TP
\fB::math::statistics::test-Dunnett\fR \fIalpha\fR \fIcontrol\fR \fIargs\fR
Determine if one or more groups with normally distributed data have the same means as
the group of control data, using Dunnett's test\&. It is complementary to the ANOVA test\&.
The procedure returns a list of the comparison results for each group with the control group\&. Each
element of this list contains: whether the means are likely to be different (1) or not (0)
and the confidence interval the conclusion is based on\&. The groups may also be stored in a
nested list, just as with the ANOVA test\&.
.sp
Note: some care is required if there is only one group to compare the control with:
.CS


    test-Dunnett-F 0\&.05 $control [list $A]

.CE
.IP
Otherwise the group A is split up into groups of one element - this is due to an ambiguity\&.
.RS
.TP
float \fIalpha\fR
- Significance level - either 0\&.05 or 0\&.01
.TP
list \fIargs\fR
- One or more groups of data to be checked
.RE
.sp
.TP
\fB::math::statistics::quantiles\fR \fIdata\fR \fIconfidence\fR
Return the quantiles for a given set of data
.RS

.TP
list \fIdata\fR
- List of raw data values
.sp
.TP
float \fIconfidence\fR
- Confidence level (0\&.95 or 0\&.99 for instance) or a list of confidence levels\&.







|
|

<
<
<
<




















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



>







755
756
757
758
759
760
761
762
763
764




765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784













































785
786
787
788
789
790
791
792
793
794
795
.TP
float \fIsignificance\fR
- Significance level (either 0\&.05, 0\&.01 or 0\&.001)
.RE
.sp
.TP
\fB::math::statistics::test-anova-F\fR \fIalpha\fR \fIargs\fR
Determine if two or more groups with normally distributed data have the same variances\&.
The procedure returns 0 if the variances are likely unequal, 1 if they are\&. This is
a one-way ANOVA test\&. The groups may also be stored in a nested list:




.CS


    test-anova-F 0\&.05 $A $B $C
    #
    # Or equivalently:
    #
    test-anova-F 0\&.05 [list $A $B $C]

.CE
.RS
.TP
float \fIalpha\fR
- Significance level
.TP
list \fIargs\fR
- Two or more groups of data to be checked
.RE
.sp
.TP













































\fB::math::statistics::quantiles\fR \fIdata\fR \fIconfidence\fR
Return the quantiles for a given set of data
.RS
.sp
.TP
list \fIdata\fR
- List of raw data values
.sp
.TP
float \fIconfidence\fR
- Confidence level (0\&.95 or 0\&.99 for instance) or a list of confidence levels\&.
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
equal\&.
.RS
.TP
list \fIargs\fR
- Two or more lists of data
.RE
.sp
.TP
\fB::math::statistics::test-Levene\fR \fIgroups\fR
Compute the Levene statistic to determine if groups of data have the
same variance (are homoscadastic) or not\&. The data are organised
in groups\&. This version uses the mean of the data as the measure
to determine the deviations\&. The statistic is equivalent to an
F statistic with degrees of freedom k-1 and N-k, k being the
number of groups and N the total number of data\&.
.RS
.TP
list \fIgroups\fR
- List of groups of data
.RE
.sp
.TP
\fB::math::statistics::test-Brown-Forsythe\fR \fIgroups\fR
Compute the Brown-Forsythe statistic to determine if groups of data have the
same variance (are homoscadastic) or not\&. Like the Levene test, but this
version uses the median of the data\&.
.RS
.TP
list \fIgroups\fR
- List of groups of data
.RE
.sp
.TP
\fB::math::statistics::group-rank\fR \fIargs\fR
Rank the groups of data with respect to the complete set\&.
Returns a list consisting of the group ID, the value and the rank
(possibly a rational number, in case of ties) for each data item\&.
.RS
.TP
list \fIargs\fR
- Two or more lists of data
.RE
.sp
.TP
\fB::math::statistics::test-Wilcoxon\fR \fIsample_a\fR \fIsample_b\fR
Compute the Wilcoxon test statistic to determine if two samples have the
same median or not\&. (The statistic can be regarded as standard normal, if the
sample sizes are both larger than 10\&.) Returns the value of this statistic\&.
.RS
.TP
list \fIsample_a\fR
- List of data comprising the first sample
.TP
list \fIsample_b\fR
- List of data comprising the second sample







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<















|







1064
1065
1066
1067
1068
1069
1070

























1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
equal\&.
.RS
.TP
list \fIargs\fR
- Two or more lists of data
.RE
.sp

























.TP
\fB::math::statistics::group-rank\fR \fIargs\fR
Rank the groups of data with respect to the complete set\&.
Returns a list consisting of the group ID, the value and the rank
(possibly a rational number, in case of ties) for each data item\&.
.RS
.TP
list \fIargs\fR
- Two or more lists of data
.RE
.sp
.TP
\fB::math::statistics::test-Wilcoxon\fR \fIsample_a\fR \fIsample_b\fR
Compute the Wilcoxon test statistic to determine if two samples have the
same median or not\&. (The statistic can be regarded as standard normal, if the
sample sizes are both larger than 10\&. Returns the value of this statistic\&.
.RS
.TP
list \fIsample_a\fR
- List of data comprising the first sample
.TP
list \fIsample_b\fR
- List of data comprising the second sample
1245
1246
1247
1248
1249
1250
1251

1252
1253
1254
1255
1256
1257
1258
- First list of data
.TP
list \fIsample_b\fR
- Second list of data
.RE
.TP
\fB::math::statistics::kernel-density\fR \fIdata\fR opt \fI-option value\fR \&.\&.\&.

Return the density function based on kernel density estimation\&. The procedure is controlled by
a small set of options, each of which is given a reasonable default\&.
.sp
The return value consists of three lists: the centres of the bins, the associated probability
density and a list of computational parameters (begin and end of the interval, mean and standard
deviation and the used bandwidth)\&. The computational parameters can be used for further analysis\&.
.RS







>







1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
- First list of data
.TP
list \fIsample_b\fR
- Second list of data
.RE
.TP
\fB::math::statistics::kernel-density\fR \fIdata\fR opt \fI-option value\fR \&.\&.\&.
]
Return the density function based on kernel density estimation\&. The procedure is controlled by
a small set of options, each of which is given a reasonable default\&.
.sp
The return value consists of three lists: the centres of the bins, the associated probability
density and a list of computational parameters (begin and end of the interval, mean and standard
deviation and the used bandwidth)\&. The computational parameters can be used for further analysis\&.
.RS
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
which the density is returned (default: mean +/- 3*standard deviation)
.TP
\fB-kernel\fR \fIfunction\fR
Kernel to be used (One of: gaussian, cosine,
epanechnikov, uniform, triangular, biweight, logistic; default: gaussian)
.RE
.RE
.TP
\fB::math::statistics::bootstrap\fR \fIdata\fR \fIsampleSize\fR ?numberSamples?
Create a subsample or subsamples from a given list of data\&. The data in the samples are chosen
from this list - multiples may occur\&. If there is only one subsample, the sample itself
is returned (as a list of "sampleSize" values), otherwise a list of samples is returned\&.
.RS
.TP
list \fIdata\fR
List of values to chose from
.TP
int \fIsampleSize\fR
Number of values per sample
.TP
int \fInumberSamples\fR
Number of samples (default: 1)
.RE
.TP
\fB::math::statistics::wasserstein-distance\fR \fIprob1\fR \fIprob2\fR
Compute the Wasserstein distance or earth mover's distance for two equidstantly spaced histograms
or probability densities\&. The histograms need not to be normalised to sum to one,
but they must have the same number of entries\&.
.sp
Note: the histograms are assumed to be based on the same equidistant intervals\&.
As the bounds are not passed, the value is expressed in the length of the intervals\&.
.RS
.TP
list \fIprob1\fR
List of values for the first histogram/probability density
.TP
list \fIprob2\fR
List of values for the second histogram/probability density
.RE
.TP
\fB::math::statistics::kl-divergence\fR \fIprob1\fR \fIprob2\fR
Compute the Kullback-Leibler (KL) divergence for two equidstantly spaced histograms
or probability densities\&. The histograms need not to be normalised to sum to one,
but they must have the same number of entries\&.
.sp
Note: the histograms are assumed to be based on the same equidistant intervals\&.
As the bounds are not passed, the value is expressed in the length of the intervals\&.
.sp
Note also that the KL divergence is not symmetric and that the second histogram
should not contain zeroes in places where the first histogram has non-zero values\&.
.RS
.TP
list \fIprob1\fR
List of values for the first histogram/probability density
.TP
list \fIprob2\fR
List of values for the second histogram/probability density
.RE
.TP
\fB::math::statistics::logistic-model\fR \fIxdata\fR \fIydata\fR
Estimate the coefficients of the logistic model that fits the data best\&. The data consist
of independent x-values and the outcome 0 or 1 for each of the x-values\&. The result
can be used to estimate the probability that a certain x-value gives 1\&.
.RS
.TP
list \fIxdata\fR
List of values for which the success (1) or failure (0) is known
.TP
list \fIydata\fR
List of successes or failures corresponding to each value in \fIxdata\fR\&.
.RE
.TP
\fB::math::statistics::logistic-probability\fR \fIcoeffs\fR \fIx\fR
Calculate the probability of success for the value \fIx\fR given the coefficients of the
logistic model\&.
.RS
.TP
list \fIcoeffs\fR
List of coefficients as determine by the \fBlogistic-model\fR command
.TP
float \fIx\fR
X-value for which the probability needs to be determined
.RE
.PP
.SH "MULTIVARIATE LINEAR REGRESSION"
Besides the linear regression with a single independent variable, the
statistics package provides two procedures for doing ordinary
least squares (OLS) and weighted least squares (WLS) linear regression
with several variables\&. They were written by Eric Kemp-Benedict\&.
.PP







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1152
1153
1154
1155
1156
1157
1158












































































1159
1160
1161
1162
1163
1164
1165
which the density is returned (default: mean +/- 3*standard deviation)
.TP
\fB-kernel\fR \fIfunction\fR
Kernel to be used (One of: gaussian, cosine,
epanechnikov, uniform, triangular, biweight, logistic; default: gaussian)
.RE
.RE












































































.PP
.SH "MULTIVARIATE LINEAR REGRESSION"
Besides the linear regression with a single independent variable, the
statistics package provides two procedures for doing ordinary
least squares (OLS) and weighted least squares (WLS) linear regression
with several variables\&. They were written by Eric Kemp-Benedict\&.
.PP
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
float \fIxmin\fR
- Maximum value of the distribution
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::pdf-triangular\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
Return the probability of a given value for a triangular
distribution with given extremes\&. If the argument min is lower than the argument max, then smaller
values have higher probability and vice versa\&. In the first case the probability
density function is of the form \fIf(x) = 2(1-x)\fR and the other case it is of the form \fIf(x) = 2x\fR\&.
.RS
.TP
float \fIxmin\fR
- Minimum value of the distribution
.TP
float \fIxmin\fR
- Maximum value of the distribution
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::pdf-symmetric-triangular\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
Return the probability of a given value for a symmetric triangular
distribution with given extremes\&.
.RS
.TP
float \fIxmin\fR
- Minimum value of the distribution
.TP
float \fIxmin\fR
- Maximum value of the distribution
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::pdf-gamma\fR \fIalpha\fR \fIbeta\fR \fIvalue\fR
Return the probability of a given value for a Gamma
distribution with given shape and rate parameters
.RS
.TP
float \fIalpha\fR







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1401
1402
1403
1404
1405
1406
1407


































1408
1409
1410
1411
1412
1413
1414
float \fIxmin\fR
- Maximum value of the distribution
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp


































.TP
\fB::math::statistics::pdf-gamma\fR \fIalpha\fR \fIbeta\fR \fIvalue\fR
Return the probability of a given value for a Gamma
distribution with given shape and rate parameters
.RS
.TP
float \fIalpha\fR
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
float \fIscale\fR
- Shape parameter
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::pdf-laplace\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
Return the probability of a given value for a Laplace
distribution with given location and shape parameters\&. The Laplace distribution
consists of two exponential functions, is peaked and has heavier tails than the
normal distribution\&.
.RS
.TP
float \fIlocation\fR
- Location parameter (mean)
.TP
float \fIscale\fR
- Shape parameter
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::pdf-kumaraswamy\fR \fIa\fR \fIb\fR \fIvalue\fR
Return the probability of a given value for a Kumaraswamy
distribution with given parameters a and b\&. The Kumaraswamy distribution
is related to the Beta distribution, but has a tractable cumulative distribution function\&.
.RS
.TP
float \fIa\fR
- Parameter a
.TP
float \fIb\fR
- Parameter b
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::pdf-negative-binomial\fR \fIr\fR \fIp\fR \fIvalue\fR
Return the probability of a given value for a negative binomial
distribution with an allowed number of failures and the probability of success\&.
.RS
.TP
int \fIr\fR
- Allowed number of failures (at least 1)
.TP
float \fIp\fR
- Probability of success
.TP
int \fIvalue\fR
- Number of successes for which the probability is to be returned
.RE
.sp
.TP
\fB::math::statistics::cdf-normal\fR \fImean\fR \fIstdev\fR \fIvalue\fR
Return the cumulative probability of a given value for a normal
distribution with given mean and standard deviation, that is the
probability for values up to the given one\&.
.RS
.TP







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1553
1554
1555
1556
1557
1558
1559



















































1560
1561
1562
1563
1564
1565
1566
float \fIscale\fR
- Shape parameter
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp



















































.TP
\fB::math::statistics::cdf-normal\fR \fImean\fR \fIstdev\fR \fIvalue\fR
Return the cumulative probability of a given value for a normal
distribution with given mean and standard deviation, that is the
probability for values up to the given one\&.
.RS
.TP
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
.RE
.sp
.TP
\fB::math::statistics::cdf-uniform\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
Return the cumulative probability of a given value for a uniform
distribution with given extremes\&.
.RS
.TP
float \fIxmin\fR
- Minimum value of the distribution
.TP
float \fIxmin\fR
- Maximum value of the distribution
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::cdf-triangular\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
Return the cumulative probability of a given value for a triangular
distribution with given extremes\&. If xmin < xmax, then lower values have
a higher probability and vice versa, see also \fIpdf-triangular\fR
.RS
.TP
float \fIxmin\fR
- Minimum value of the distribution
.TP
float \fIxmin\fR
- Maximum value of the distribution
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::cdf-symmetric-triangular\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
Return the cumulative probability of a given value for a symmetric triangular
distribution with given extremes\&.
.RS
.TP
float \fIxmin\fR
- Minimum value of the distribution
.TP
float \fIxmin\fR
- Maximum value of the distribution
.TP







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1605
1606
1607
1608
1609
1610
1611

































1612
1613
1614
1615
1616
1617
1618
.RE
.sp
.TP
\fB::math::statistics::cdf-uniform\fR \fIxmin\fR \fIxmax\fR \fIvalue\fR
Return the cumulative probability of a given value for a uniform
distribution with given extremes\&.
.RS

































.TP
float \fIxmin\fR
- Minimum value of the distribution
.TP
float \fIxmin\fR
- Maximum value of the distribution
.TP
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
float \fInf2\fR
- Degrees of freedom for the denominator
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::cdf-laplace\fR \fIlocation\fR \fIscale\fR \fIvalue\fR
Return the cumulative probability of a given value for a Laplace
distribution with given location and shape parameters\&. The Laplace distribution
consists of two exponential functions, is peaked and has heavier tails than the
normal distribution\&.
.RS
.TP
float \fIlocation\fR
- Location parameter (mean)
.TP
float \fIscale\fR
- Shape parameter
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::cdf-kumaraswamy\fR \fIa\fR \fIb\fR \fIvalue\fR
Return the cumulative probability of a given value for a Kumaraswamy
distribution with given parameters a and b\&. The Kumaraswamy distribution
is related to the Beta distribution, but has a tractable cumulative distribution function\&.
.RS
.TP
float \fIa\fR
- Parameter a
.TP
float \fIb\fR
- Parameter b
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp
.TP
\fB::math::statistics::cdf-negative-binomial\fR \fIr\fR \fIp\fR \fIvalue\fR
Return the cumulative probability of a given value for a negative binomial
distribution with an allowed number of failures and the probability of success\&.
.RS
.TP
int \fIr\fR
- Allowed number of failures (at least 1)
.TP
float \fIp\fR
- Probability of success
.TP
int \fIvalue\fR
- Greatest number of successes
.RE
.sp
.TP
\fB::math::statistics::empirical-distribution\fR \fIvalues\fR
Return a list of values and their empirical probability\&. The values are sorted in increasing order\&.
(The implementation follows the description at the corresponding Wikipedia page)
.RS
.TP
list \fIvalues\fR







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1754
1755
1756
1757
1758
1759
1760



















































1761
1762
1763
1764
1765
1766
1767
float \fInf2\fR
- Degrees of freedom for the denominator
.TP
float \fIvalue\fR
- Value for which the probability is required
.RE
.sp



















































.TP
\fB::math::statistics::empirical-distribution\fR \fIvalues\fR
Return a list of values and their empirical probability\&. The values are sorted in increasing order\&.
(The implementation follows the description at the corresponding Wikipedia page)
.RS
.TP
list \fIvalues\fR
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
.RE
.sp
.TP
\fB::math::statistics::random-uniform\fR \fIxmin\fR \fIxmax\fR \fInumber\fR
Return a list of "number" random values satisfying a uniform
distribution with given extremes\&.
.RS
.TP
float \fIxmin\fR
- Minimum value of the distribution
.TP
float \fIxmax\fR
- Maximum value of the distribution
.TP
int \fInumber\fR
- Number of values to be returned
.RE
.sp
.TP
\fB::math::statistics::random-triangular\fR \fIxmin\fR \fIxmax\fR \fInumber\fR
Return a list of "number" random values satisfying a triangular
distribution with given extremes\&. If xmin < xmax, then lower values have a higher probability
and vice versa (see also \fIpdf-triangular\fR\&.
.RS
.TP
float \fIxmin\fR
- Minimum value of the distribution
.TP
float \fIxmax\fR
- Maximum value of the distribution
.TP
int \fInumber\fR
- Number of values to be returned
.RE
.sp
.TP
\fB::math::statistics::random-symmetric-triangular\fR \fIxmin\fR \fIxmax\fR \fInumber\fR
Return a list of "number" random values satisfying a symmetric triangular
distribution with given extremes\&.
.RS
.TP
float \fIxmin\fR
- Minimum value of the distribution
.TP
float \fIxmax\fR
- Maximum value of the distribution
.TP







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1814
1815
1816
1817
1818
1819
1820

































1821
1822
1823
1824
1825
1826
1827
.RE
.sp
.TP
\fB::math::statistics::random-uniform\fR \fIxmin\fR \fIxmax\fR \fInumber\fR
Return a list of "number" random values satisfying a uniform
distribution with given extremes\&.
.RS

































.TP
float \fIxmin\fR
- Minimum value of the distribution
.TP
float \fIxmax\fR
- Maximum value of the distribution
.TP
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
float \fIscale\fR
- Scale parameter
.TP
int \fInumber\fR
- Number of values to be returned
.RE
.sp
.TP
\fB::math::statistics::random-laplace\fR \fIlocation\fR \fIscale\fR \fInumber\fR
Return a list of "number" random values satisfying a Laplace
distribution with given location and shape parameters\&. The Laplace distribution
consists of two exponential functions, is peaked and has heavier tails than the
normal distribution\&.
.RS
.TP
float \fIlocation\fR
- Location parameter (mean)
.TP
float \fIscale\fR
- Shape parameter
.TP
int \fInumber\fR
- Number of values to be returned
.RE
.sp
.TP
\fB::math::statistics::random-kumaraswamy\fR \fIa\fR \fIb\fR \fInumber\fR
Return a list of "number" random values satisying a Kumaraswamy
distribution with given parameters a and b\&. The Kumaraswamy distribution
is related to the Beta distribution, but has a tractable cumulative distribution function\&.
.RS
.TP
float \fIa\fR
- Parameter a
.TP
float \fIb\fR
- Parameter b
.TP
int \fInumber\fR
- Number of values to be returned
.RE
.sp
.TP
\fB::math::statistics::random-negative-binomial\fR \fIr\fR \fIp\fR \fInumber\fR
Return a list of "number" random values satisying a negative binomial distribution\&.
.RS
.TP
int \fIr\fR
- Allowed number of failures (at least 1)
.TP
float \fIp\fR
- Probability of success
.TP
int \fInumber\fR
- Number of values to be returned
.RE
.sp
.TP
\fB::math::statistics::histogram-uniform\fR \fIxmin\fR \fIxmax\fR \fIlimits\fR \fInumber\fR
Return the expected histogram for a uniform distribution\&.
.RS
.TP
float \fIxmin\fR
- Minimum value of the distribution







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1960
1961
1962
1963
1964
1965
1966


















































1967
1968
1969
1970
1971
1972
1973
float \fIscale\fR
- Scale parameter
.TP
int \fInumber\fR
- Number of values to be returned
.RE
.sp


















































.TP
\fB::math::statistics::histogram-uniform\fR \fIxmin\fR \fIxmax\fR \fIlimits\fR \fInumber\fR
Return the expected histogram for a uniform distribution\&.
.RS
.TP
float \fIxmin\fR
- Minimum value of the distribution
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
Estimate the parameters for the Pareto distribution that comes closest to the given values\&.
Returns the estimated scale and shape parameters, as well as the standard error for the shape parameter\&.
.RS
.TP
list \fIvalues\fR
- List of values, assumed to be distributed according to a Pareto distribution
.RE
.sp
.TP
\fB::math::statistics::estimate-exponential\fR \fIvalues\fR
Estimate the parameter for the exponential distribution that comes closest to the given values\&.
Returns an estimate of the one parameter and of the standard error\&.
.RS
.TP
list \fIvalues\fR
- List of values, assumed to be distributed according to an exponential distribution
.RE
.sp
.TP
\fB::math::statistics::estimate-laplace\fR \fIvalues\fR
Estimate the parameters for the Laplace distribution that comes closest to the given values\&.
Returns an estimate of respectively the location and scale parameters, based on maximum likelihood\&.
.RS
.TP
list \fIvalues\fR
- List of values, assumed to be distributed according to an exponential distribution
.RE
.sp
.TP
\fB::math::statistics::estimante-negative-binomial\fR \fIr\fR \fIvalues\fR
Estimate the probability of success for the negative binomial distribution that comes closest to the given values\&.
The allowed number of failures must be given\&.
.RS
.TP
int \fIr\fR
- Allowed number of failures (at least 1)
.TP
int \fInumber\fR
- List of values, assumed to be distributed according to a negative binomial distribution\&.
.RE
.sp
.PP
TO DO: more function descriptions to be added
.SH "DATA MANIPULATION"
The data manipulation procedures act on lists or lists of lists:
.TP
\fB::math::statistics::filter\fR \fIvarname\fR \fIdata\fR \fIexpression\fR







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







2028
2029
2030
2031
2032
2033
2034

































2035
2036
2037
2038
2039
2040
2041
Estimate the parameters for the Pareto distribution that comes closest to the given values\&.
Returns the estimated scale and shape parameters, as well as the standard error for the shape parameter\&.
.RS
.TP
list \fIvalues\fR
- List of values, assumed to be distributed according to a Pareto distribution
.RE

































.sp
.PP
TO DO: more function descriptions to be added
.SH "DATA MANIPULATION"
The data manipulation procedures act on lists or lists of lists:
.TP
\fB::math::statistics::filter\fR \fIvarname\fR \fIdata\fR \fIexpression\fR
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: statistics\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
data analysis, mathematics, statistics
.SH CATEGORY
Mathematics







<
<
<
<
<
<
<
<




2370
2371
2372
2373
2374
2375
2376








2377
2378
2379
2380
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: statistics\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
data analysis, mathematics, statistics
.SH CATEGORY
Mathematics

Changes to idoc/man/files/modules/math/symdiff.n.

353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: calculus\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
math::calculus, math::interpolate
.SH COPYRIGHT
.nf
Copyright (c) 2010 by Kevin B\&. Kenny <kennykb@acm\&.org>
Redistribution permitted under the terms of the Open Publication License <http://www\&.opencontent\&.org/openpub/>

.fi







<
<
<
<
<
<
<
<








353
354
355
356
357
358
359








360
361
362
363
364
365
366
367
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: calculus\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
math::calculus, math::interpolate
.SH COPYRIGHT
.nf
Copyright (c) 2010 by Kevin B\&. Kenny <kennykb@acm\&.org>
Redistribution permitted under the terms of the Open Publication License <http://www\&.opencontent\&.org/openpub/>

.fi

Deleted idoc/man/files/modules/math/trig.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
'\"
'\" Generated from file 'trig\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2018 Arjen Markus
'\"
.TH "math::trig" n 1\&.0\&.0 tcllib "Tcl Math Library"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
math::trig \- Trigonometric anf hyperbolic functions
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBmath::trig  1\&.0\&.0\fR
.sp
\fB::math::trig::radian_reduced\fR \fIangle\fR
.sp
\fB::math::trig::degree_reduced\fR \fIangle\fR
.sp
\fB::math::trig::cosec\fR \fIangle\fR
.sp
\fB::math::trig::sec\fR \fIangle\fR
.sp
\fB::math::trig::cotan\fR \fIangle\fR
.sp
\fB::math::trig::acosec\fR \fIvalue\fR
.sp
\fB::math::trig::asec\fR \fIvalue\fR
.sp
\fB::math::trig::acotan\fR \fIvalue\fR
.sp
\fB::math::trig::cosech\fR \fIvalue\fR
.sp
\fB::math::trig::sech\fR \fIvalue\fR
.sp
\fB::math::trig::cotanh\fR \fIvalue\fR
.sp
\fB::math::trig::asinh\fR \fIvalue\fR
.sp
\fB::math::trig::acosh\fR \fIvalue\fR
.sp
\fB::math::trig::atanh\fR \fIvalue\fR
.sp
\fB::math::trig::acosech\fR \fIvalue\fR
.sp
\fB::math::trig::asech\fR \fIvalue\fR
.sp
\fB::math::trig::acotanh\fR \fIvalue\fR
.sp
\fB::math::trig::sind\fR \fIangle\fR
.sp
\fB::math::trig::cosd\fR \fIangle\fR
.sp
\fB::math::trig::tand\fR \fIangle\fR
.sp
\fB::math::trig::cosecd\fR \fIangle\fR
.sp
\fB::math::trig::secd\fR \fIangle\fR
.sp
\fB::math::trig::cotand\fR \fIangle\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fImath::trig\fR package defines a set of trigonomic and hyperbolic functions
and their inverses\&. In addition it defines versions of the trigonomic functions
that take arguments in degrees instead of radians\&.
.PP
For easy use these functions may be imported into the \fItcl::mathfunc\fR namespace,
so that they can be used directly in the \fIexpr\fR command\&.
.SH FUNCTIONS
The functions \fIradian_reduced\fR and \fIdegree_reduced\fR return a reduced angle, in
respectively radians and degrees, in the intervals [0, 2pi) and [0, 360):
.TP
\fB::math::trig::radian_reduced\fR \fIangle\fR
Return the equivalent angle in the interval [0, 2pi)\&.
.RS
.TP
float \fIangle\fR
Angle (in radians)
.RE
.TP
\fB::math::trig::degree_reduced\fR \fIangle\fR
Return the equivalent angle in the interval [0, 360)\&.
.RS
.TP
float \fIangle\fR
Angle (in degrees)
.RE
.PP
The following trigonomic functions are defined in addition to the ones defined
in the \fIexpr\fR command:
.TP
\fB::math::trig::cosec\fR \fIangle\fR
Calculate the cosecant of the angle (1/cos(angle))
.RS
.TP
float \fIangle\fR
Angle (in radians)
.RE
.TP
\fB::math::trig::sec\fR \fIangle\fR
Calculate the secant of the angle (1/sin(angle))
.RS
.TP
float \fIangle\fR
Angle (in radians)
.RE
.TP
\fB::math::trig::cotan\fR \fIangle\fR
Calculate the cotangent of the angle (1/tan(angle))
.RS
.TP
float \fIangle\fR
Angle (in radians)
.RE
.PP
For these functions also the inverses are defined:
.TP
\fB::math::trig::acosec\fR \fIvalue\fR
Calculate the arc cosecant of the value
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.TP
\fB::math::trig::asec\fR \fIvalue\fR
Calculate the arc secant of the value
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.TP
\fB::math::trig::acotan\fR \fIvalue\fR
Calculate the arc cotangent of the value
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.PP
The following hyperbolic and inverse hyperbolic functions are defined:
.TP
\fB::math::trig::cosech\fR \fIvalue\fR
Calculate the hyperbolic cosecant of the value (1/sinh(value))
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.TP
\fB::math::trig::sech\fR \fIvalue\fR
Calculate the hyperbolic secant of the value (1/cosh(value))
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.TP
\fB::math::trig::cotanh\fR \fIvalue\fR
Calculate the hyperbolic cotangent of the value (1/tanh(value))
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.TP
\fB::math::trig::asinh\fR \fIvalue\fR
Calculate the arc hyperbolic sine of the value
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.TP
\fB::math::trig::acosh\fR \fIvalue\fR
Calculate the arc hyperbolic cosine of the value
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.TP
\fB::math::trig::atanh\fR \fIvalue\fR
Calculate the arc hyperbolic tangent of the value
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.TP
\fB::math::trig::acosech\fR \fIvalue\fR
Calculate the arc hyperbolic cosecant of the value
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.TP
\fB::math::trig::asech\fR \fIvalue\fR
Calculate the arc hyperbolic secant of the value
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.TP
\fB::math::trig::acotanh\fR \fIvalue\fR
Calculate the arc hyperbolic cotangent of the value
.RS
.TP
float \fIvalue\fR
Value of the argument
.RE
.PP
The following versions of the common trigonometric functions and their
inverses are defined:
.TP
\fB::math::trig::sind\fR \fIangle\fR
Calculate the sine of the angle (in degrees)
.RS
.TP
float \fIangle\fR
Angle (in degrees)
.RE
.TP
\fB::math::trig::cosd\fR \fIangle\fR
Calculate the cosine of the angle (in degrees)
.RS
.TP
float \fIangle\fR
Angle (in radians)
.RE
.TP
\fB::math::trig::tand\fR \fIangle\fR
Calculate the cotangent of the angle (in degrees)
.RS
.TP
float \fIangle\fR
Angle (in degrees)
.RE
.TP
\fB::math::trig::cosecd\fR \fIangle\fR
Calculate the cosecant of the angle (in degrees)
.RS
.TP
float \fIangle\fR
Angle (in degrees)
.RE
.TP
\fB::math::trig::secd\fR \fIangle\fR
Calculate the secant of the angle (in degrees)
.RS
.TP
float \fIangle\fR
Angle (in degrees)
.RE
.TP
\fB::math::trig::cotand\fR \fIangle\fR
Calculate the cotangent of the angle (in degrees)
.RS
.TP
float \fIangle\fR
Angle (in degrees)
.RE
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImath :: trig\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
math, trigonometry
.SH CATEGORY
Mathematics
.SH COPYRIGHT
.nf
Copyright (c) 2018 Arjen Markus

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/md4/md4.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'md4\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "md4" n 1\&.0\&.7 tcllib "MD4 Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'md4\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "md4" n 1\&.0\&.6 tcllib "MD4 Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
md4 \- MD4 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBmd4  ?1\&.0\&.7?\fR
.sp
\fB::md4::md4\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::md4::hmac\fR ?\fI-hex\fR? \fI-key key\fR [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::md4::MD4Init\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
md4 \- MD4 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBmd4  ?1\&.0\&.6?\fR
.sp
\fB::md4::md4\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::md4::hmac\fR ?\fI-hex\fR? \fI-key key\fR [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
.sp
\fB::md4::MD4Init\fR
.sp
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImd4\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
md5, sha1
.SH KEYWORDS
hashing, md4, message-digest, rfc 1320, rfc 1321, rfc 2104, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











413
414
415
416
417
418
419








420
421
422
423
424
425
426
427
428
429
430
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImd4\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
md5, sha1
.SH KEYWORDS
hashing, md4, message-digest, rfc 1320, rfc 1321, rfc 2104, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/md5/md5.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'md5\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "md5" n 2\&.0\&.8 tcllib "MD5 Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'md5\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "md5" n 2\&.0\&.7 tcllib "MD5 Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImd5\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
md4, sha1
.SH KEYWORDS
hashing, md5, message-digest, rfc 1320, rfc 1321, rfc 2104, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











419
420
421
422
423
424
425








426
427
428
429
430
431
432
433
434
435
436
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImd5\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
md4, sha1
.SH KEYWORDS
hashing, md5, message-digest, rfc 1320, rfc 1321, rfc 2104, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/md5crypt/md5crypt.n.

347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImd5crypt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
md5
.SH KEYWORDS
hashing, md5, md5crypt, message-digest, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











347
348
349
350
351
352
353








354
355
356
357
358
359
360
361
362
363
364
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImd5crypt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
md5
.SH KEYWORDS
hashing, md5, md5crypt, message-digest, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/mime/mime.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'mime\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 1999-2000 Marshall T\&. Rose
'\"
.TH "mime" n 1\&.6\&.3 tcllib "Mime"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'mime\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 1999-2000 Marshall T\&. Rose
'\"
.TH "mime" n 1\&.6 tcllib "Mime"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
mime \- Manipulation of MIME body parts
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBmime  ?1\&.6\&.3?\fR
.sp
\fB::mime::initialize\fR ?\fB-canonical\fR \fItype/subtype\fR ?\fB-param\fR {\fIkey value\fR}\&.\&.\&.? ?\fB-encoding\fR \fIvalue\fR? ?\fB-header\fR {\fIkey value\fR}\&.\&.\&.?? (\fB-file\fR \fIname\fR | \fB-string\fR \fIvalue\fR | \fB-parts\fR {\fItoken1\fR \&.\&.\&. \fItokenN\fR})
.sp
\fB::mime::finalize\fR \fItoken\fR ?\fB-subordinates\fR \fBall\fR | \fBdynamic\fR | \fBnone\fR?
.sp
\fB::mime::getproperty\fR \fItoken\fR ?\fIproperty\fR | \fB-names\fR?
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
mime \- Manipulation of MIME body parts
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBmime  ?1\&.6?\fR
.sp
\fB::mime::initialize\fR ?\fB-canonical\fR \fItype/subtype\fR ?\fB-param\fR {\fIkey value\fR}\&.\&.\&.? ?\fB-encoding\fR \fIvalue\fR? ?\fB-header\fR {\fIkey value\fR}\&.\&.\&.?? (\fB-file\fR \fIname\fR | \fB-string\fR \fIvalue\fR | \fB-parts\fR {\fItoken1\fR \&.\&.\&. \fItokenN\fR})
.sp
\fB::mime::finalize\fR \fItoken\fR ?\fB-subordinates\fR \fBall\fR | \fBdynamic\fR | \fBnone\fR?
.sp
\fB::mime::getproperty\fR \fItoken\fR ?\fIproperty\fR | \fB-names\fR?
.sp
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImime\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
ftp, http, pop3, smtp
.SH KEYWORDS
email, internet, mail, mime, net, rfc 2045, rfc 2046, rfc 2049, rfc 821, rfc 822, smtp
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 1999-2000 Marshall T\&. Rose

.fi







<
<
<
<
<
<
<
<











582
583
584
585
586
587
588








589
590
591
592
593
594
595
596
597
598
599
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImime\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
ftp, http, pop3, smtp
.SH KEYWORDS
email, internet, mail, mime, net, rfc 2045, rfc 2046, rfc 2049, rfc 821, rfc 822, smtp
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 1999-2000 Marshall T\&. Rose

.fi

Changes to idoc/man/files/modules/mime/smtp.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'smtp\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 1999-2000 Marshall T\&. Rose and others
'\"
.TH "smtp" n 1\&.5 tcllib "smtp client"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'smtp\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 1999-2000 Marshall T\&. Rose and others
'\"
.TH "smtp" n 1\&.4\&.5 tcllib "smtp client"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
.SH NAME
smtp \- Client-side tcl implementation of the smtp protocol
.SH SYNOPSIS
package require \fBTcl \fR
.sp
package require \fBmime  ?1\&.5\&.4?\fR
.sp
package require \fBsmtp  ?1\&.5?\fR
.sp
\fB::smtp::sendmessage\fR \fItoken\fR \fIoption\fR\&.\&.\&.
.sp
.BE
.SH DESCRIPTION
.PP
The \fBsmtp\fR library package provides the client side of the
Simple Mail Transfer Protocol (SMTP) (1) (2)\&.
.TP
\fB::smtp::sendmessage\fR \fItoken\fR \fIoption\fR\&.\&.\&.
This command sends the MIME part (see package \fBmime\fR)
represented by \fItoken\fR to an SMTP server\&. \fIoptions\fR is a list
of options and their associated values\&.  The recognized options are:
.RS
.TP
\fB-servers\fR
A list of SMTP servers\&. The default is \fBlocalhost\fR\&.
.sp
If multiple servers are specified they are tried in sequence\&.
Note that the \fB-ports\fR are iterated over in tandem with the
servers\&. If there are not enough ports for the number of servers the
default port (see below) is used\&. If there are more ports than servers
the superfluous ports are ignored\&.
.TP
\fB-ports\fR
A list of SMTP ports\&. The default is \fB25\fR\&.
.sp
See option \fB-servers\fR above regardig the behaviour for
then multiple servers and ports are specified\&.
.TP
\fB-client\fR
The name to use as our hostname when connecting to the server\&. By
default this is either localhost if one of the servers is localhost,
or is set to the string returned by \fBinfo hostname\fR\&.
.TP
\fB-queue\fR







|

















<
<
<
<
<
<



<
<
<







274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298






299
300
301



302
303
304
305
306
307
308
.SH NAME
smtp \- Client-side tcl implementation of the smtp protocol
.SH SYNOPSIS
package require \fBTcl \fR
.sp
package require \fBmime  ?1\&.5\&.4?\fR
.sp
package require \fBsmtp  ?1\&.4\&.5?\fR
.sp
\fB::smtp::sendmessage\fR \fItoken\fR \fIoption\fR\&.\&.\&.
.sp
.BE
.SH DESCRIPTION
.PP
The \fBsmtp\fR library package provides the client side of the
Simple Mail Transfer Protocol (SMTP) (1) (2)\&.
.TP
\fB::smtp::sendmessage\fR \fItoken\fR \fIoption\fR\&.\&.\&.
This command sends the MIME part (see package \fBmime\fR)
represented by \fItoken\fR to an SMTP server\&. \fIoptions\fR is a list
of options and their associated values\&.  The recognized options are:
.RS
.TP
\fB-servers\fR
A list of SMTP servers\&. The default is \fBlocalhost\fR\&.






.TP
\fB-ports\fR
A list of SMTP ports\&. The default is \fB25\fR\&.



.TP
\fB-client\fR
The name to use as our hostname when connecting to the server\&. By
default this is either localhost if one of the servers is localhost,
or is set to the string returned by \fBinfo hostname\fR\&.
.TP
\fB-queue\fR
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
A list containing two elements, an smtp header and its associated
value (the -header option may occur zero or more times)\&.
.TP
\fB-usetls\fR
This package supports the RFC 3207 TLS extension (3) by default provided the
tls package is available\&. You can turn this off with this boolean option\&.
.TP
\fB-tlsimport\fR
This boolean flag is \fBfalse\fR by default\&.
When this flag is set the package will import TLS on a sucessfully
opened channel\&. This is needed for connections using native TLS
negotiation instead of \fBSTARTTLS\fR\&. The \fBtls\fR package
is automatically required when needed\&.
.TP
\fB-tlspolicy\fR
This option lets you specify a command to be called if an error occurs
during TLS setup\&. The command is called with the SMTP code and diagnostic
message appended\&. The command should return 'secure' or 'insecure' where
insecure will cause the package to continue on the unencrypted channel\&.
Returning 'secure' will cause the socket to be closed and the next server
in the \fB-servers\fR list to be tried\&.







<
<
<
<
<
<
<







327
328
329
330
331
332
333







334
335
336
337
338
339
340
A list containing two elements, an smtp header and its associated
value (the -header option may occur zero or more times)\&.
.TP
\fB-usetls\fR
This package supports the RFC 3207 TLS extension (3) by default provided the
tls package is available\&. You can turn this off with this boolean option\&.
.TP







\fB-tlspolicy\fR
This option lets you specify a command to be called if an error occurs
during TLS setup\&. The command is called with the SMTP code and diagnostic
message appended\&. The command should return 'secure' or 'insecure' where
insecure will cause the package to continue on the unencrypted channel\&.
Returning 'secure' will cause the socket to be closed and the next server
in the \fB-servers\fR list to be tried\&.
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
.CS


proc send_simple_message {recipient email_server subject body} {
    package require smtp
    package require mime

    set token [mime::initialize -canonical text/plain \\
	-string $body]
    mime::setheader $token Subject $subject
    smtp::sendmessage $token \\
	-recipients $recipient -servers $email_server
    mime::finalize $token
}

send_simple_message someone@somewhere\&.com localhost \\
    "This is the subject\&." "This is the message\&."

.CE
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







|


|




|




<
|
|







387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406

407
408
409
410
411
412
413
414
415
.CS


proc send_simple_message {recipient email_server subject body} {
    package require smtp
    package require mime

    set token [mime::initialize -canonical text/plain \\\\
	-string $body]
    mime::setheader $token Subject $subject
    smtp::sendmessage $token \\\\
	-recipients $recipient -servers $email_server
    mime::finalize $token
}

send_simple_message someone@somewhere\&.com localhost \\\\
    "This is the subject\&." "This is the message\&."

.CE
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsmtp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
ftp, http, mime, pop3
.SH KEYWORDS
email, internet, mail, mime, net, rfc 2554, rfc 2821, rfc 3207, rfc 821, rfc 822, smtp, tls
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 1999-2000 Marshall T\&. Rose and others

.fi







<
<
<
<
<
<
<
<











449
450
451
452
453
454
455








456
457
458
459
460
461
462
463
464
465
466
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsmtp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
ftp, http, mime, pop3
.SH KEYWORDS
email, internet, mail, mime, net, rfc 2554, rfc 2821, rfc 3207, rfc 821, rfc 822, smtp, tls
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 1999-2000 Marshall T\&. Rose and others

.fi

Changes to idoc/man/files/modules/multiplexer/multiplexer.n.

395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImultiplexer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
chat, multiplexer
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<




395
396
397
398
399
400
401








402
403
404
405
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fImultiplexer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
chat, multiplexer
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/namespacex/namespacex.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
'\"
'\" Generated from file 'namespacex\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 200? Neil Madden (http://wiki\&.tcl\&.tk/12790)
'\" Copyright (c) 200? Various (http://wiki\&.tcl\&.tk/1489)
'\" Copyright (c) 2010 Documentation, Andreas Kupries
'\"
.TH "namespacex" n 0\&.2 tcllib "Namespace utility commands"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
'\"
'\" Generated from file 'namespacex\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 200? Neil Madden (http://wiki\&.tcl\&.tk/12790)
'\" Copyright (c) 200? Various (http://wiki\&.tcl\&.tk/1489)
'\" Copyright (c) 2010 Documentation, Andreas Kupries
'\"
.TH "namespacex" n 0\&.1 tcllib "Namespace utility commands"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
..
.BS
.SH NAME
namespacex \- Namespace utility commands
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBnamespacex  ?0\&.2?\fR
.sp
\fB::namespacex hook add\fR ?\fInamespace\fR? \fIcmdprefix\fR
.sp
\fB::namespacex hook proc\fR ?\fInamespace\fR? \fIarguments\fR \fIbody\fR
.sp
\fB::namespacex hook on\fR ?\fInamespace\fR? \fIguardcmdprefix\fR \fIactioncmdprefix\fR
.sp
\fB::namespacex hook next\fR \fIarg\fR\&.\&.\&.
.sp
\fB::namespacex import fromns\fR \fIcmdname ?\fInewname\fR \&.\&.\&.?\fR
.sp
\fB::namespacex info allchildren\fR \fInamespace\fR
.sp
\fB::namespacex info allvars\fR \fInamespace\fR
.sp
\fB::namespacex normalize\fR \fInamespace\fR
.sp
\fB::namespacex info vars\fR \fInamespace\fR ?\fIpattern\fR?
.sp
\fB::namespacex state get\fR \fInamespace\fR
.sp
\fB::namespacex state set\fR \fInamespace\fR \fIdict\fR
.sp
\fB::namespacex state drop\fR \fInamespace\fR
.sp
\fB::namespacex strip\fR \fIprefix\fR \fInamespaces\fR
.sp
.BE
.SH DESCRIPTION
This package provides a number of utility commands for working with
namespaces\&.
The commands fall into four categories:
.IP [1]
Hook commands provide and manipulate a chain of commands which
replaces the single regular \fBnamespace unknown\fR handler\&.
.IP [2]
An import command provides the ability to import any command
from another namespace\&.
.IP [3]
Information commands allow querying of variables and child
namespaces\&.
.IP [4]
State commands provide a means to serialize variable values in
a namespace\&.
.PP
.SH COMMANDS
.TP
\fB::namespacex hook add\fR ?\fInamespace\fR? \fIcmdprefix\fR
Adds the \fIcmdprefix\fR to the chain of unknown command handlers that
are invoked when the \fInamespace\fR would otherwise invoke its
unknown handler\&.
If \fInamespace\fR is not specified, then \fIcmdprefix\fR is added to
the chain of handlers for the namespace of the caller\&.
.sp
The chain of \fIcmdprefix\fR are executed in reverse order of
addition, \fIi\&.e\&.\fR the most recently added \fIcmdprefix\fR is
executed first\&.
When executed, \fIcmdprefix\fR has additional arguments appended to it
as would any namespace unknown handler\&.
.TP
\fB::namespacex hook proc\fR ?\fInamespace\fR? \fIarguments\fR \fIbody\fR
Adds an anonymous procedure to the chain of namespace unknown handlers
for the \fInamespace\fR\&.
.sp
If \fInamespace\fR is not specified, then the handler is added
to the chain of handlers for the namespace of the caller\&.
.sp
The \fIarguments\fR and \fIbody\fR are specified as for the
core \fBproc\fR command\&.
.TP
\fB::namespacex hook on\fR ?\fInamespace\fR? \fIguardcmdprefix\fR \fIactioncmdprefix\fR
Adds a guarded action to the chain of namespace unknown handlers for
the \fInamespace\fR\&.
.sp
If \fInamespace\fR is not specified, then the handler is added
to the chain of handlers for the namespace of the caller\&.
.sp
The \fIguardcmdprefix\fR is executed first\&. If it returns a
value that can be interpreted as false, then the next unknown hander
in the chain is executed\&. Otherwise, \fIactioncmdprefix\fR is executed
and the return value of the handler is the value returned by
\fIactioncmdprefix\fR\&.
.sp
When executed, both \fIguardcmdprefix\fR and
\fIactioncmdprefix\fR have the same additional arguments appended as
for any namespace unknown handler\&.
.TP
\fB::namespacex hook next\fR \fIarg\fR\&.\&.\&.
This command is available to namespace hooks to execute the next hook
in the chain of handlers for the namespace\&.
.TP
\fB::namespacex import fromns\fR \fIcmdname ?\fInewname\fR \&.\&.\&.?\fR
Imports the command \fIcmdname\fR from the \fIfromns\fR namespace into
the namespace of the caller\&.
The \fIcmdname\fR command is imported even if the \fIfromns\fR did not
originally export the command\&.
.sp
If \fInewname\fR is specified, then the imported command will
be known by that name\&. Otherwise, the command retains is original name
as given by \fIcmdname\fR\&.
.sp
Additional pairs of \fIcmdname\fR / \fInewname\fR arguments may
also be specified\&.
.TP
\fB::namespacex info allchildren\fR \fInamespace\fR
Returns a list containing the names of all child namespaces in the
specified \fInamespace\fR and its children\&. The names are all fully
qualified\&.
.TP
\fB::namespacex info allvars\fR \fInamespace\fR
Returns a list containing the names of all variables in the specified
\fInamespace\fR and its children\&. The names are all given relative to
\fInamespace\fR, and \fInot\fR fully qualified\&.
.TP
\fB::namespacex normalize\fR \fInamespace\fR
Returns the absolute name of \fInamespace\fR, which is resolved
relative to the namespace of the caller, with all unneeded colon
characters removed\&.
.TP
\fB::namespacex info vars\fR \fInamespace\fR ?\fIpattern\fR?
Returns a list containing the names of all variables in
the specified \fInamespace\fR\&.
If the \fIpattern\fR argument is specified, then only variables
matching \fIpattern\fR are returned\&. Matching is determined using the
same rules as for \fBstring match\fR\&.
.TP
\fB::namespacex state get\fR \fInamespace\fR
Returns a dictionary holding the names and values of all variables in
the specified \fInamespace\fR and its child namespaces\&.
.sp
Note that the names are all relative to \fInamespace\fR, and
\fInot\fR fully qualified\&.
.TP
\fB::namespacex state set\fR \fInamespace\fR \fIdict\fR
Takes a dictionary holding the names and values for a set of variables
and replaces the current state of the specified \fInamespace\fR and
its child namespaces with this state\&.
The result of the command is the empty string\&.
.TP
\fB::namespacex state drop\fR \fInamespace\fR
Unsets all variables in the specified \fInamespace\fR and its child
namespaces\&.
The result of the command is the empty string\&.
.TP
\fB::namespacex strip\fR \fIprefix\fR \fInamespaces\fR
Each item in \fInamespaces\fR must be the absolute normalized name of
a child namespace of namespace \fIprefix\fR\&.
Returns the corresponding list of relative names of child namespaces\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInamespacex\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
extended namespace, info, namespace unknown, namespace utilities, state (de)serialization, unknown hooking, utilities
.SH COPYRIGHT
.nf
Copyright (c) 200? Neil Madden (http://wiki\&.tcl\&.tk/12790)
Copyright (c) 200? Various (http://wiki\&.tcl\&.tk/1489)
Copyright (c) 2010 Documentation, Andreas Kupries

.fi







|









<
<




<
<








<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<
|


<
<
<
<
<
<
<
<
<
<
<


<
<
<
<
<
<
<
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


<
<

<
<
<
<
<
<
<
<
<
<
<
<
<

|
|
|


|
|
|

<
<
<
<
<

|

<
<
<


|
|

|
|


|
|
|



|
|

<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290


291
292
293
294


295
296
297
298
299
300
301
302


303
304
305
306














307
308
309











310
311








312
313















314
315


316













317
318
319
320
321
322
323
324
325
326





327
328
329



330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347





348















349
350
351
352
353
354
355
356
357
..
.BS
.SH NAME
namespacex \- Namespace utility commands
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBnamespacex  ?0\&.1?\fR
.sp
\fB::namespacex hook add\fR ?\fInamespace\fR? \fIcmdprefix\fR
.sp
\fB::namespacex hook proc\fR ?\fInamespace\fR? \fIarguments\fR \fIbody\fR
.sp
\fB::namespacex hook on\fR ?\fInamespace\fR? \fIguardcmdprefix\fR \fIactioncmdprefix\fR
.sp
\fB::namespacex hook next\fR \fIarg\fR\&.\&.\&.
.sp


\fB::namespacex info allchildren\fR \fInamespace\fR
.sp
\fB::namespacex info allvars\fR \fInamespace\fR
.sp


\fB::namespacex info vars\fR \fInamespace\fR ?\fIpattern\fR?
.sp
\fB::namespacex state get\fR \fInamespace\fR
.sp
\fB::namespacex state set\fR \fInamespace\fR \fIdict\fR
.sp
\fB::namespacex state drop\fR \fInamespace\fR
.sp


.BE
.SH DESCRIPTION
This package provides a number of utility commands for working with
namespaces\&.














.SH API
.TP
\fB::namespacex hook add\fR ?\fInamespace\fR? \fIcmdprefix\fR











.TP
\fB::namespacex hook proc\fR ?\fInamespace\fR? \fIarguments\fR \fIbody\fR








.TP
\fB::namespacex hook on\fR ?\fInamespace\fR? \fIguardcmdprefix\fR \fIactioncmdprefix\fR















.TP
\fB::namespacex hook next\fR \fIarg\fR\&.\&.\&.


.TP













\fB::namespacex info allchildren\fR \fInamespace\fR
This command returns a list containing the names of all child
namespaces in the specified \fInamespace\fR and its children\&. The
names are all fully qualified\&.
.TP
\fB::namespacex info allvars\fR \fInamespace\fR
This command returns a list containing the names of all variables in
the specified \fInamespace\fR and its children\&. The names are all
relative to \fInamespace\fR, and \fInot\fR fully qualified\&.
.TP





\fB::namespacex info vars\fR \fInamespace\fR ?\fIpattern\fR?
This command returns a list containing the names of all variables in
the specified \fInamespace\fR\&.



.TP
\fB::namespacex state get\fR \fInamespace\fR
This command returns a dictionary holding the names and values of all
variables in the specified \fInamespace\fR and its child namespaces\&.
.sp
Note that the names are all relative to \fInamespace\fR,
and \fInot\fR fully qualified\&.
.TP
\fB::namespacex state set\fR \fInamespace\fR \fIdict\fR
This command takes a dictionary holding the names and values for a set
of variables and replaces the current state of the specified
\fInamespace\fR and its child namespaces with this state\&.
The result of the command is the empty string\&.
.TP
\fB::namespacex state drop\fR \fInamespace\fR
This command unsets all variables in the specified \fInamespace\fR and
its child namespaces\&.
The result of the command is the empty string\&.





.PP















.SH KEYWORDS
extended namespace, info, namespace unknown, namespace utilities, state (de)serialization, unknown hooking, utilities
.SH COPYRIGHT
.nf
Copyright (c) 200? Neil Madden (http://wiki\&.tcl\&.tk/12790)
Copyright (c) 200? Various (http://wiki\&.tcl\&.tk/1489)
Copyright (c) 2010 Documentation, Andreas Kupries

.fi

Changes to idoc/man/files/modules/ncgi/ncgi.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'ncgi\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "ncgi" n 1\&.4\&.4 tcllib "CGI Support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'ncgi\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "ncgi" n 1\&.4\&.3 tcllib "CGI Support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
ncgi \- Procedures to manipulate CGI values\&.
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBncgi  ?1\&.4\&.4?\fR
.sp
\fB::ncgi::cookie\fR \fIcookie\fR
.sp
\fB::ncgi::decode\fR \fIstr\fR
.sp
\fB::ncgi::empty\fR \fIname\fR
.sp







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
ncgi \- Procedures to manipulate CGI values\&.
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBncgi  ?1\&.4\&.3?\fR
.sp
\fB::ncgi::cookie\fR \fIcookie\fR
.sp
\fB::ncgi::decode\fR \fIstr\fR
.sp
\fB::ncgi::empty\fR \fIname\fR
.sp
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIncgi\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
html
.SH KEYWORDS
CGI, cookie, form, html
.SH CATEGORY
CGI programming







<
<
<
<
<
<
<
<






578
579
580
581
582
583
584








585
586
587
588
589
590
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIncgi\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
html
.SH KEYWORDS
CGI, cookie, form, html
.SH CATEGORY
CGI programming

Changes to idoc/man/files/modules/nettool/nettool.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'nettool\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2015-2018 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "nettool" n 0\&.5\&.2 tcllib "nettool"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'nettool\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "nettool" n 0\&.5\&.1 tcllib "nettool"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
nettool \- Tools for networked applications
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBnettool  ?0\&.5\&.2?\fR
.sp
package require \fBtwapi  3\&.1\fR
.sp
package require \fBip  0\&.1\fR
.sp
package require \fBplatform  0\&.1\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
nettool \- Tools for networked applications
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBnettool  ?0\&.5\&.1?\fR
.sp
package require \fBtwapi  3\&.1\fR
.sp
package require \fBip  0\&.1\fR
.sp
package require \fBplatform  0\&.1\fR
.sp
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIodie\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
nettool, odie
.SH CATEGORY
System
.SH COPYRIGHT
.nf
Copyright (c) 2015-2018 Sean Woods <yoda@etoyoc\&.com>

.fi







<
<
<
<
<
<
<
<






|


437
438
439
440
441
442
443








444
445
446
447
448
449
450
451
452
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIodie\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
nettool, odie
.SH CATEGORY
System
.SH COPYRIGHT
.nf
Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>

.fi

Changes to idoc/man/files/modules/nmea/nmea.n.

395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInmea\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
gps, nmea
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009, Aaron Faupell <afaupell@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









395
396
397
398
399
400
401








402
403
404
405
406
407
408
409
410
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInmea\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
gps, nmea
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009, Aaron Faupell <afaupell@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/nns/nns_auto.n.

355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
nameserv(n)
.SH KEYWORDS
automatic, client, name service, reconnect, restore
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











355
356
357
358
359
360
361








362
363
364
365
366
367
368
369
370
371
372
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
nameserv(n)
.SH KEYWORDS
automatic, client, name service, reconnect, restore
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/nns/nns_client.n.

402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
\fB::nameserv::configure\fR
In this form the command returns a dictionary of all supported
options, and their current values\&. The list of supported options and
their meaning can be found in section \fBOPTIONS\fR\&.
.TP
\fB::nameserv::configure\fR \fB-option\fR
In this form the command is an alias for
"\fB::nameserv::cget\fR \fB-option\fR"\&.
The list of supported options and their meaning can be found in
section \fBOPTIONS\fR\&.
.TP
\fB::nameserv::configure\fR \fB-option\fR \fIvalue\fR\&.\&.\&.
In this form the command is used to configure one or more of the
supported options\&. At least one option has to be specified, and each
option is followed by its new value\&.







|







402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
\fB::nameserv::configure\fR
In this form the command returns a dictionary of all supported
options, and their current values\&. The list of supported options and
their meaning can be found in section \fBOPTIONS\fR\&.
.TP
\fB::nameserv::configure\fR \fB-option\fR
In this form the command is an alias for
"\fB::nameserv::cget\fR \fB-option\fR]"\&.
The list of supported options and their meaning can be found in
section \fBOPTIONS\fR\&.
.TP
\fB::nameserv::configure\fR \fB-option\fR \fIvalue\fR\&.\&.\&.
In this form the command is used to configure one or more of the
supported options\&. At least one option has to be specified, and each
option is followed by its new value\&.
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
nameserv::common(n), nameserv::server(n)
.SH KEYWORDS
client, name service
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











570
571
572
573
574
575
576








577
578
579
580
581
582
583
584
585
586
587
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
nameserv::common(n), nameserv::server(n)
.SH KEYWORDS
client, name service
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/nns/nns_common.n.

304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
nameserv::client(n), nameserv::server(n)
.SH KEYWORDS
client, name service, server
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











304
305
306
307
308
309
310








311
312
313
314
315
316
317
318
319
320
321
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
nameserv::client(n), nameserv::server(n)
.SH KEYWORDS
client, name service, server
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/nns/nns_intro.n.

351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
nameserv(n), nameserv::auto(n), nameserv::common(n), nameserv::protocol(n), nameserv::server(n), nnsd(n), nss(n)
.SH KEYWORDS
client, name service, server
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











351
352
353
354
355
356
357








358
359
360
361
362
363
364
365
366
367
368
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
nameserv(n), nameserv::auto(n), nameserv::common(n), nameserv::protocol(n), nameserv::server(n), nnsd(n), nss(n)
.SH KEYWORDS
client, name service, server
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/nns/nns_protocol.n.

411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
comm_wire(n), nameserv(n), nameserv::server(n)
.SH KEYWORDS
comm, name service, protocol
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











411
412
413
414
415
416
417








418
419
420
421
422
423
424
425
426
427
428
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
comm_wire(n), nameserv(n), nameserv::server(n)
.SH KEYWORDS
comm, name service, protocol
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/nns/nns_server.n.

344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
\fB::nameserv::server::configure\fR
In this form the command returns a dictionary of all supported
options, and their current values\&. The list of supported options and
their meaning can be found in section \fBOPTIONS\fR\&.
.TP
\fB::nameserv::server::configure\fR \fB-option\fR
In this form the command is an alias for
"\fB::nameserv::server::cget\fR \fB-option\fR"\&.
The list of supported options and their meaning can be found in
section \fBOPTIONS\fR\&.
.TP
\fB::nameserv::server::configure\fR \fB-option\fR \fIvalue\fR\&.\&.\&.
In this form the command is used to configure one or more of the
supported options\&. At least one option has to be specified, and each
option is followed by its new value\&.







|







344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
\fB::nameserv::server::configure\fR
In this form the command returns a dictionary of all supported
options, and their current values\&. The list of supported options and
their meaning can be found in section \fBOPTIONS\fR\&.
.TP
\fB::nameserv::server::configure\fR \fB-option\fR
In this form the command is an alias for
"\fB::nameserv::server::cget\fR \fB-option\fR]"\&.
The list of supported options and their meaning can be found in
section \fBOPTIONS\fR\&.
.TP
\fB::nameserv::server::configure\fR \fB-option\fR \fIvalue\fR\&.\&.\&.
In this form the command is used to configure one or more of the
supported options\&. At least one option has to be specified, and each
option is followed by its new value\&.
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
nameserv::client(n), nameserv::common(n)
.SH KEYWORDS
name service, server
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











396
397
398
399
400
401
402








403
404
405
406
407
408
409
410
411
412
413
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
nameserv::client(n), nameserv::common(n)
.SH KEYWORDS
name service, server
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2007-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/nntp/nntp.n.

633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInntp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
news, nntp, nntpclient, rfc 1036, rfc 977
.SH CATEGORY
Networking







<
<
<
<
<
<
<
<




633
634
635
636
637
638
639








640
641
642
643
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInntp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
news, nntp, nntpclient, rfc 1036, rfc 977
.SH CATEGORY
Networking

Changes to idoc/man/files/modules/ntp/ntp_time.n.

415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIntp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
ntp
.SH KEYWORDS
NTP, SNTP, rfc 2030, rfc 868, time
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











415
416
417
418
419
420
421








422
423
424
425
426
427
428
429
430
431
432
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIntp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
ntp
.SH KEYWORDS
NTP, SNTP, rfc 2030, rfc 868, time
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2002, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/oauth/oauth.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'oauth\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2014 Javi P\&. <hxm@eggdrop\&.es>
'\"
.TH "oauth" n 1\&.0\&.3 tcllib "oauth"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'oauth\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2014 Javi P\&. <hxm@eggdrop\&.es>
'\"
.TH "oauth" n 1\&.0 tcllib "oauth"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
..
.BS
.SH NAME
oauth \- oauth API base signature
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBoauth  ?1\&.0\&.3?\fR
.sp
\fB::oauth::config\fR
.sp
\fB::oauth::config\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fB::oauth::header\fR \fIbaseURL\fR ?\fIpostQuery\fR?
.sp
\fB::oauth::query\fR \fIbaseURL\fR ?\fIpostQuery\fR?
.sp
.BE
.SH DESCRIPTION
.PP
The \fBoauth\fR package provides a simple Tcl-only library
for communication with \fIoauth\fR [http://oauth\&.net] APIs\&.
This current version of the package supports the Oauth 1\&.0 Protocol,
as specified in \fIRFC 5849\fR [http://tools\&.ietf\&.org/rfc/rfc5849\&.txt]\&.
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







|

















<
|
|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296

297
298
299
300
301
302
303
304
305
..
.BS
.SH NAME
oauth \- oauth API base signature
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBoauth  ?1\&.0?\fR
.sp
\fB::oauth::config\fR
.sp
\fB::oauth::config\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fB::oauth::header\fR \fIbaseURL\fR ?\fIpostQuery\fR?
.sp
\fB::oauth::query\fR \fIbaseURL\fR ?\fIpostQuery\fR?
.sp
.BE
.SH DESCRIPTION
.PP
The \fBoauth\fR package provides a simple Tcl-only library
for communication with \fIoauth\fR [http://oauth\&.net] APIs\&.
This current version of the package supports the Oauth 1\&.0 Protocol,
as specified in \fIRFC 5849\fR [http://tools\&.ietf\&.org/rfc/rfc5849\&.txt]\&.
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIoauth\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
RFC 2718, RFC 5849, oauth, twitter
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2014 Javi P\&. <hxm@eggdrop\&.es>

.fi







<
<
<
<
<
<
<
<









477
478
479
480
481
482
483








484
485
486
487
488
489
490
491
492
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIoauth\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
RFC 2718, RFC 5849, oauth, twitter
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2014 Javi P\&. <hxm@eggdrop\&.es>

.fi

Deleted idoc/man/files/modules/oometa/oometa.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
'\"
'\" Generated from file 'oometa\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "oometa" n 0\&.7\&.1 tcllib "Data registry for TclOO frameworks"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
oometa \- oo::meta A data registry for classess
.SH SYNOPSIS
\fBoo::meta::info\fR
.sp
\fBoo::meta::info branchget\fR ?\fIkey\fR? ?\&.\&.\&.?
.sp
\fBoo::meta::info branchset\fR ?\fIkey\&.\&.\&.\fR? \fIkey\fR \fIvalue\fR
.sp
\fBoo::meta::info dump\fR \fIclass\fR
.sp
\fBoo::meta::info\fR \fIclass\fR \fBis\fR \fItype\fR ?\fIargs\fR?
.sp
\fBoo::meta::info\fR \fIclass\fR \fBmerge\fR ?\fIdict\fR? ?\fIdict\fR? ?\fI\&.\&.\&.\fR?
.sp
\fBoo::meta::info\fR \fIclass\fR \fBrebuild\fR
.sp
\fBoo::meta::metadata\fR \fIclass\fR
.sp
\fBoo::define meta\fR
.sp
\fBoo::class method meta\fR
.sp
\fBoo::object method meta\fR
.sp
\fBoo::object method meta cget\fR ?\fIfield\fR? ?\fI\&.\&.\&.\fR? \fIfield\fR
.sp
.BE
.SH DESCRIPTION
The \fBoo::meta\fR package provides a data registry service for TclOO classes\&.
.SH USAGE
.CS


oo::class create animal {
  meta set biodata animal: 1
}
oo::class create mammal {
  superclass animal
  meta set biodata mammal: 1
}
oo::class create cat {
  superclass mammal
  meta set biodata diet: carnivore
}

cat create felix
puts [felix meta dump biodata]
> animal: 1 mammal: 1 diet: carnivore

felix meta set biodata likes: {birds mice}
puts [felix meta get biodata]
> animal: 1 mammal: 1 diet: carnivore likes: {bird mice}

# Modify a class
mammal meta set biodata metabolism: warm-blooded
puts [felix meta get biodata]
> animal: 1 mammal: 1 metabolism: warm-blooded diet: carnivore likes: {birds mice}

# Overwrite class info
felix meta set biodata mammal: yes
puts [felix meta get biodata]
> animal: 1 mammal: yes metabolism: warm-blooded diet: carnivore likes: {birds mice}

.CE
.SH CONCEPT
The concept behind \fBoo::meta\fR is that each class contributes a snippet of \fIlocal\fR data\&.
When \fBoo::meta::metadata\fR is called, the system walks through the linear ancestry produced by
\fBoo::meta::ancestors\fR, and recursively combines all of that local data for all of a class'
ancestors into a single dict\&.
Instances of oo::object can also combine class data with a local dict stored in the \fImeta\fR variable\&.
.SH COMMANDS
.TP
\fBoo::meta::info\fR
\fBoo::meta::info\fR is intended to work on the metadata of a class in a manner similar to if the aggregate
pieces where assembled into a single dict\&. The system mimics all of the standard dict commands, and addes
the following:
.TP
\fBoo::meta::info branchget\fR ?\fIkey\fR? ?\&.\&.\&.?
Returns a dict representation of the element at \fIargs\fR, but with any trailing : removed from field names\&.
.CS


::oo::meta::info $myclass set option color {default: green widget: colorselect}
puts [::oo::meta::info $myclass get option color]
> {default: green widget: color}
puts [::oo::meta::info $myclass branchget option color]
> {default green widget color}

.CE
.TP
\fBoo::meta::info branchset\fR ?\fIkey\&.\&.\&.\fR? \fIkey\fR \fIvalue\fR
Merges \fIdict\fR with any other information contaned at node ?\fIkey\&.\&.\&.\fR?, and adding a trailing :
to all field names\&.
.CS


::oo::meta::info $myclass branchset option color {default green widget colorselect}
puts [::oo::meta::info $myclass get option color]
> {default: green widget: color}

.CE
.TP
\fBoo::meta::info dump\fR \fIclass\fR
Returns the complete snapshot of a class metadata, as producted by \fBoo::meta::metadata\fR
.TP
\fBoo::meta::info\fR \fIclass\fR \fBis\fR \fItype\fR ?\fIargs\fR?
Returns a boolean true or false if the element ?\fIargs\fR? would match \fBstring is\fR \fItype\fR \fIvalue\fR
.CS


::oo::meta::info $myclass set constant mammal 1
puts [::oo::meta::info $myclass is true constant mammal]
> 1

.CE
.TP
\fBoo::meta::info\fR \fIclass\fR \fBmerge\fR ?\fIdict\fR? ?\fIdict\fR? ?\fI\&.\&.\&.\fR?
Combines all of the arguments into a single dict, which is then stored as the new
local representation for this class\&.
.TP
\fBoo::meta::info\fR \fIclass\fR \fBrebuild\fR
Forces the meta system to destroy any cached representation of a class' metadata before
the next access to \fBoo::meta::metadata\fR
.TP
\fBoo::meta::metadata\fR \fIclass\fR
Returns an aggregate picture of the metadata for \fIclass\fR, combining its \fIlocal\fR data
with the \fIlocal\fR data from its ancestors\&.
.TP
\fBoo::define meta\fR
The package injects a command \fBoo::define::meta\fR which works to provide a class in the
process of definition access to \fBoo::meta::info\fR, but without having to look the name up\&.
.CS


oo::define myclass {
  meta set foo bar: baz
}

.CE
.TP
\fBoo::class method meta\fR
The package injects a new method \fBmeta\fR into \fBoo::class\fR which works to provide a class
instance access to \fBoo::meta::info\fR\&.
.TP
\fBoo::object method meta\fR
The package injects a new method \fBmeta\fR into \fBoo::object\fR\&. \fBoo::object\fR combines the data
for its class (as provided by \fBoo::meta::metadata\fR), with a local variable \fImeta\fR to
produce a local picture of metadata\&.
This method provides the following additional commands:
.TP
\fBoo::object method meta cget\fR ?\fIfield\fR? ?\fI\&.\&.\&.\fR? \fIfield\fR
Attempts to locate a singlar leaf, and return its value\&. For single option lookups, this
is faster than \fBmy meta getnull\fR ?\fIfield\fR? ?\fI\&.\&.\&.\fR? \fIfield\fR], because
it performs a search instead directly instead of producing the recursive merge product
between the class metadata, the local \fImeta\fR variable, and THEN performing the search\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItcloo\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
TOOL, TclOO
.SH CATEGORY
TclOO
.SH COPYRIGHT
.nf
Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/ooutil/ooutil.n.

435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIoo::util\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
snit(n)
.SH KEYWORDS
TclOO, callback, class methods, class variables, command prefix, currying, method reference, my method, singleton
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2011-2015 Andreas Kupries, BSD licensed

.fi







<
<
<
<
<
<
<
<











435
436
437
438
439
440
441








442
443
444
445
446
447
448
449
450
451
452
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIoo::util\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
snit(n)
.SH KEYWORDS
TclOO, callback, class methods, class variables, command prefix, currying, method reference, my method, singleton
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2011-2015 Andreas Kupries, BSD licensed

.fi

Changes to idoc/man/files/modules/otp/otp.n.

345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIotp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
SASL, md4, md5, ripemd160, sha1
.SH KEYWORDS
hashing, message-digest, password, rfc 2289, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2006, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











345
346
347
348
349
350
351








352
353
354
355
356
357
358
359
360
361
362
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIotp\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
SASL, md4, md5, ripemd160, sha1
.SH KEYWORDS
hashing, message-digest, password, rfc 2289, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2006, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/page/page_intro.n.

293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
page, parser generator, text processing
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









293
294
295
296
297
298
299








300
301
302
303
304
305
306
307
308
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
page, parser generator, text processing
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/page/page_pluginmgr.n.

1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
page, parser generator, text processing
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









1033
1034
1035
1036
1037
1038
1039








1040
1041
1042
1043
1044
1045
1046
1047
1048
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
page, parser generator, text processing
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/page/page_util_flow.n.

345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
dataflow, graph walking, page, parser generator, text processing, tree walking
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









345
346
347
348
349
350
351








352
353
354
355
356
357
358
359
360
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
dataflow, graph walking, page, parser generator, text processing, tree walking
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/page/page_util_norm_lemon.n.

301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
graph walking, lemon, normalization, page, parser generator, text processing, tree walking
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









301
302
303
304
305
306
307








308
309
310
311
312
313
314
315
316
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
graph walking, lemon, normalization, page, parser generator, text processing, tree walking
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/page/page_util_norm_peg.n.

350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
PEG, graph walking, normalization, page, parser generator, text processing, tree walking
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









350
351
352
353
354
355
356








357
358
359
360
361
362
363
364
365
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
PEG, graph walking, normalization, page, parser generator, text processing, tree walking
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/page/page_util_peg.n.

372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
PEG, page, parser generator, parsing expression grammar, text processing, transformation
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









372
373
374
375
376
377
378








379
380
381
382
383
384
385
386
387
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
PEG, page, parser generator, parsing expression grammar, text processing, transformation
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/page/page_util_quote.n.

326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
page, parser generator, quoting, text processing
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









326
327
328
329
330
331
332








333
334
335
336
337
338
339
340
341
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpage\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
page, parser generator, quoting, text processing
.SH CATEGORY
Page Parser Generator
.SH COPYRIGHT
.nf
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pki/pki.n.

345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
.IP [1]
"openssl rsautl -decrypt" == "::pki::decrypt -binary -priv"
.IP [2]
"openssl rsautl -verify"  == "::pki::decrypt -binary -pub"
.RE
.TP
\fB::pki::sign\fR \fIinput\fR \fIkey\fR ?\fIalgo\fR?
Digitally sign message \fIinput\fR using the private \fIkey\fR\&.
.sp
If \fIalgo\fR is ommited "sha1" is assumed\&. Possible values for
\fIalgo\fR include "\fBmd5\fR", "\fBsha1\fR", "\fBsha256\fR",
and "\fBraw\fR"\&.
.sp
Specifying "\fBraw\fR" for \fIalgo\fR will inhibit the
building of an ASN\&.1 structure to encode which hashing algorithm was
chosen\&.
\fIAttention\fR: In this case the corresponding \fBpkgi::verify\fR
must be called \fBwith\fR algorithm information\&.
Conversely, specifying a non-"\fBraw\fR" algorithm here means that
the corresponding \fBpkgi::verify\fR invokation has to be made
\fIwithout\fR algorithm information\&.
.sp
The \fIinput\fR should be the plain text, hashing will be
performed on it\&.
.sp
The \fIkey\fR should include the private key\&.
.TP
\fB::pki::verify\fR \fIsignedmessage\fR \fIplaintext\fR \fIkey\fR ?\fIalgo\fR?
Verify a digital signature using a public \fIkey\fR\&.  Returns true or false\&.
.sp
\fIAttention\fR: The algorithm information \fIalgo\fR has to
be specified if and only if the \fBpki::sign\fR which generated the
\fIsignedmessage\fR was called with algorithm "\fBraw\fR"\&. This
inhibited the building of the ASN\&.1 structure encoding the chosen
hashing algorithm\&. Conversely, if a proper algorithm was specified
during signing then you \fImust not\fR specify an algorithm here\&.
.TP
\fB::pki::key\fR \fIkey\fR ?\fIpassword\fR? ?\fIencodePem\fR?
Convert a key structure into a serialized PEM (default) or DER encoded private key suitable for other applications\&.  For RSA keys this means PKCS#1\&.
.TP
\fB::pki::pkcs::parse_key\fR \fIkey\fR ?\fIpassword\fR?
Convert a PKCS#1 private \fIkey\fR into a usable key, i\&.e\&. one which
can be used as argument for







|
<
|
<
<
<
|
|
|
<
<
<
<
<
<
|
<
<




<
<
<
<
<
<
<







345
346
347
348
349
350
351
352

353



354
355
356






357


358
359
360
361







362
363
364
365
366
367
368
.IP [1]
"openssl rsautl -decrypt" == "::pki::decrypt -binary -priv"
.IP [2]
"openssl rsautl -verify"  == "::pki::decrypt -binary -pub"
.RE
.TP
\fB::pki::sign\fR \fIinput\fR \fIkey\fR ?\fIalgo\fR?
Digitally sign message \fIinput\fR using the private \fIkey\fR\&.  If \fIalgo\fR

is ommited "sha1" is assumed\&.  Possible values for \fIalgo\fR include



"md5", "sha1", "sha256", and "raw"\&.  Specifyin "raw" for \fIalgo\fR will
inhibit the building of an ASN\&.1 structure to encode which hashing
algorithm was chosen\&.






The \fIinput\fR should be the plain text, hashing will be performed on it\&.


The \fIkey\fR should include the private key\&.
.TP
\fB::pki::verify\fR \fIsignedmessage\fR \fIplaintext\fR \fIkey\fR ?\fIalgo\fR?
Verify a digital signature using a public \fIkey\fR\&.  Returns true or false\&.







.TP
\fB::pki::key\fR \fIkey\fR ?\fIpassword\fR? ?\fIencodePem\fR?
Convert a key structure into a serialized PEM (default) or DER encoded private key suitable for other applications\&.  For RSA keys this means PKCS#1\&.
.TP
\fB::pki::pkcs::parse_key\fR \fIkey\fR ?\fIpassword\fR?
Convert a PKCS#1 private \fIkey\fR into a usable key, i\&.e\&. one which
can be used as argument for
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIrsa\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
aes(n), blowfish(n), des(n), md5(n), sha1(n)
.SH KEYWORDS
cipher, data integrity, encryption, public key cipher, rsa, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2010, 2011, 2012, 2013, Roy Keene, Andreas Kupries

.fi







<
<
<
<
<
<
<
<











480
481
482
483
484
485
486








487
488
489
490
491
492
493
494
495
496
497
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIrsa\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
aes(n), blowfish(n), des(n), md5(n), sha1(n)
.SH KEYWORDS
cipher, data integrity, encryption, public key cipher, rsa, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2010, 2011, 2012, 2013, Roy Keene, Andreas Kupries

.fi

Changes to idoc/man/files/modules/pluginmgr/pluginmgr.n.

615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpluginmgr\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
plugin management, plugin search
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









615
616
617
618
619
620
621








622
623
624
625
626
627
628
629
630
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpluginmgr\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
plugin management, plugin search
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2005 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/png/png.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'png\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004, Code: Aaron Faupell <afaupell@users\&.sourceforge\&.net>
'\" Copyright (c) 2004, Doc: Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "png" n 0\&.3 tcllib "Image manipulation"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,





|







1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'png\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004, Code: Aaron Faupell <afaupell@users\&.sourceforge\&.net>
'\" Copyright (c) 2004, Doc: Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "png" n 0\&.1\&.2 tcllib "Image manipulation"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
.SH NAME
png \- PNG querying and manipulation of meta data
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBcrc32 \fR
.sp
package require \fBpng  ?0\&.3?\fR
.sp
\fB::png::validate\fR \fIfile\fR
.sp
\fB::png::isPNG\fR \fIfile\fR
.sp
\fB::png::imageInfo\fR \fIfile\fR
.sp
\fB::png::getTimestamp\fR \fIfile\fR
.sp
\fB::png::setTimestamp\fR \fIfile\fR \fItime\fR
.sp
\fB::png::getComments\fR \fIfile\fR
.sp
\fB::png::removeComments\fR \fIfile\fR
.sp
\fB::png::addComment\fR \fIfile\fR \fIkeyword\fR \fItext\fR
.sp
\fB::png::addComment\fR \fIfile\fR \fIkeyword\fR \fIlang\fR \fIkeyword2\fR \fItext\fR
.sp
\fB::png::getPixelDimension\fR \fIfile\fR
.sp
\fB::png::image\fR \fIfile\fR
.sp
\fB::png::write\fR \fIfile\fR \fIdata\fR
.sp
.BE
.SH DESCRIPTION
.PP







|



















<
<







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301


302
303
304
305
306
307
308
.SH NAME
png \- PNG querying and manipulation of meta data
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBcrc32 \fR
.sp
package require \fBpng  ?0\&.1\&.2?\fR
.sp
\fB::png::validate\fR \fIfile\fR
.sp
\fB::png::isPNG\fR \fIfile\fR
.sp
\fB::png::imageInfo\fR \fIfile\fR
.sp
\fB::png::getTimestamp\fR \fIfile\fR
.sp
\fB::png::setTimestamp\fR \fIfile\fR \fItime\fR
.sp
\fB::png::getComments\fR \fIfile\fR
.sp
\fB::png::removeComments\fR \fIfile\fR
.sp
\fB::png::addComment\fR \fIfile\fR \fIkeyword\fR \fItext\fR
.sp
\fB::png::addComment\fR \fIfile\fR \fIkeyword\fR \fIlang\fR \fIkeyword2\fR \fItext\fR
.sp


\fB::png::image\fR \fIfile\fR
.sp
\fB::png::write\fR \fIfile\fR \fIdata\fR
.sp
.BE
.SH DESCRIPTION
.PP
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
Adds a unicode (international) comment to the PNG image in \fIfile\fR,
just before the first data chunk\&. Will throw an error if no data chunk
is found\&. \fIkeyword\fR has to be less than 80 characters long to
conform to the PNG specification\&. \fIkeyword2\fR is the translated
\fIkeyword\fR, in the language specified by the language identifier
\fIlang\fR\&.
.TP
\fB::png::getPixelDimension\fR \fIfile\fR
Returns a dictionary with keys \fBppux\fR, \fBppuy\fR and
\fBunit\fR if the information is present\&.  Otherwise, it returns the empty
string\&.
.sp
The values of \fBppux\fR and \fBppuy\fR return the pixel
per unit value in X or Y direction\&.
.sp
The allowed values for key \fBunit\fR are \fBmeter\fR and
\fBunknown\fR\&. In the case of meter, the dpi value can be calculated
by multiplying with the conversion factor \fB0\&.0254\fR\&.
.TP
\fB::png::image\fR \fIfile\fR
Given a PNG file returns the image in the list of scanlines format used by Tk_GetColor\&.
.TP
\fB::png::write\fR \fIfile\fR \fIdata\fR
Takes a list of scanlines in the Tk_GetColor format and writes the represented image
to \fIfile\fR\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpng\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
comment, image, png, timestamp
.SH CATEGORY
File formats
.SH COPYRIGHT
.nf
Copyright (c) 2004, Code: Aaron Faupell <afaupell@users\&.sourceforge\&.net>
Copyright (c) 2004, Doc:  Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<
<
<
<
<














<
<
<
<
<
<
<
<










402
403
404
405
406
407
408












409
410
411
412
413
414
415
416
417
418
419
420
421
422








423
424
425
426
427
428
429
430
431
432
Adds a unicode (international) comment to the PNG image in \fIfile\fR,
just before the first data chunk\&. Will throw an error if no data chunk
is found\&. \fIkeyword\fR has to be less than 80 characters long to
conform to the PNG specification\&. \fIkeyword2\fR is the translated
\fIkeyword\fR, in the language specified by the language identifier
\fIlang\fR\&.
.TP












\fB::png::image\fR \fIfile\fR
Given a PNG file returns the image in the list of scanlines format used by Tk_GetColor\&.
.TP
\fB::png::write\fR \fIfile\fR \fIdata\fR
Takes a list of scanlines in the Tk_GetColor format and writes the represented image
to \fIfile\fR\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpng\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
comment, image, png, timestamp
.SH CATEGORY
File formats
.SH COPYRIGHT
.nf
Copyright (c) 2004, Code: Aaron Faupell <afaupell@users\&.sourceforge\&.net>
Copyright (c) 2004, Doc:  Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pop3/pop3.n.

306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
\fIRFC 1939\fR [http://www\&.rfc-editor\&.org/rfc/rfc1939\&.txt]\&.
It works by opening the standard POP3 socket on the server,
transmitting the username and password, then providing a Tcl API to
access the POP3 protocol commands\&.  All server errors are returned as
Tcl errors (thrown) which must be caught with the Tcl \fBcatch\fR
command\&.
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







306
307
308
309
310
311
312

313
314
315
316
317
318
319
320
321
\fIRFC 1939\fR [http://www\&.rfc-editor\&.org/rfc/rfc1939\&.txt]\&.
It works by opening the standard POP3 socket on the server,
transmitting the username and password, then providing a Tcl API to
access the POP3 protocol commands\&.  All server errors are returned as
Tcl errors (thrown) which must be caught with the Tcl \fBcatch\fR
command\&.
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
.CS


	package require tls
	tls::init -cafile /path/to/ca/cert -keyfile \&.\&.\&.

	# Create secured pop3 channel
	pop3::open -socketcmd tls::socket \\
		$thehost $theuser $thepassword

	\&.\&.\&.

.CE
The second method, option \fB-stls\fR, will connect to the standard POP3
port and then perform an STARTTLS handshake\&. This will only work for POP3
servers which have this capability\&. The package will confirm that the
server supports STARTTLS and the handshake was performed correctly before
proceeding with authentication\&.
.CS


	package require tls
	tls::init -cafile /path/to/ca/cert -keyfile \&.\&.\&.

	# Create secured pop3 channel
	pop3::open -stls 1 \\
		$thehost $theuser $thepassword

	\&.\&.\&.

.CE
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpop3\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
email, mail, pop, pop3, rfc 1939, secure, ssl, tls
.SH CATEGORY
Networking







|

















|












<
<
<
<
<
<
<
<




498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535








536
537
538
539
.CS


	package require tls
	tls::init -cafile /path/to/ca/cert -keyfile \&.\&.\&.

	# Create secured pop3 channel
	pop3::open -socketcmd tls::socket \\\\
		$thehost $theuser $thepassword

	\&.\&.\&.

.CE
The second method, option \fB-stls\fR, will connect to the standard POP3
port and then perform an STARTTLS handshake\&. This will only work for POP3
servers which have this capability\&. The package will confirm that the
server supports STARTTLS and the handshake was performed correctly before
proceeding with authentication\&.
.CS


	package require tls
	tls::init -cafile /path/to/ca/cert -keyfile \&.\&.\&.

	# Create secured pop3 channel
	pop3::open -stls 1 \\\\
		$thehost $theuser $thepassword

	\&.\&.\&.

.CE
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpop3\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
email, mail, pop, pop3, rfc 1939, secure, ssl, tls
.SH CATEGORY
Networking

Changes to idoc/man/files/modules/pop3d/pop3d.n.

450
451
452
453
454
455
456

457
458
459
460
461
462
463
Here we describe the interface which has to be provided by the storage
callback so that pop3 servers following the interface of this module
are able to use it\&. The \fImbox\fR argument is the storage reference
as returned by the \fBlookup\fR method of the authentication
command, see section \fBAuthentication\fR\&.
.TP
\fIstorageCmd\fR \fBdele\fR \fImbox\fR \fImsgList\fR

Deletes the messages whose numeric ids are contained in the
\fImsgList\fR from the mailbox specified via \fImbox\fR\&.
.TP
\fIstorageCmd\fR \fBlock\fR \fImbox\fR
This method locks the specified mailbox for use by a single connection
to the server\&. This is necessary to prevent havoc if several
connections to the same mailbox are open\&. The complementary method is







>







450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
Here we describe the interface which has to be provided by the storage
callback so that pop3 servers following the interface of this module
are able to use it\&. The \fImbox\fR argument is the storage reference
as returned by the \fBlookup\fR method of the authentication
command, see section \fBAuthentication\fR\&.
.TP
\fIstorageCmd\fR \fBdele\fR \fImbox\fR \fImsgList\fR
]
Deletes the messages whose numeric ids are contained in the
\fImsgList\fR from the mailbox specified via \fImbox\fR\&.
.TP
\fIstorageCmd\fR \fBlock\fR \fImbox\fR
This method locks the specified mailbox for use by a single connection
to the server\&. This is necessary to prevent havoc if several
connections to the same mailbox are open\&. The complementary method is
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
the package to override how the server opens its listening socket\&.
The envisioned main use is the specification of the \fBtls::socket\fR
command, see package \fBtls\fR, to secure the communication\&.
.CS


	package require tls
	tls::init \\
		\&.\&.\&.

	pop3d::new S -socket tls::socket
	\&.\&.\&.

.CE
.SH REFERENCES
.IP [1]
\fIRFC 1939\fR [http://www\&.rfc-editor\&.org/rfc/rfc1939\&.txt]
.IP [2]
\fIRFC 2449\fR [http://www\&.rfc-editor\&.org/rfc/rfc2449\&.txt]
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpop3d\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
internet, network, pop3, protocol, rfc 1939, secure, ssl, tls
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2002-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2005 Reinhard Max  <max@suse\&.de>

.fi







|



















<
<
<
<
<
<
<
<










490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516








517
518
519
520
521
522
523
524
525
526
the package to override how the server opens its listening socket\&.
The envisioned main use is the specification of the \fBtls::socket\fR
command, see package \fBtls\fR, to secure the communication\&.
.CS


	package require tls
	tls::init \\\\
		\&.\&.\&.

	pop3d::new S -socket tls::socket
	\&.\&.\&.

.CE
.SH REFERENCES
.IP [1]
\fIRFC 1939\fR [http://www\&.rfc-editor\&.org/rfc/rfc1939\&.txt]
.IP [2]
\fIRFC 2449\fR [http://www\&.rfc-editor\&.org/rfc/rfc2449\&.txt]
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpop3d\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
internet, network, pop3, protocol, rfc 1939, secure, ssl, tls
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2002-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2005 Reinhard Max  <max@suse\&.de>

.fi

Changes to idoc/man/files/modules/pop3d/pop3d_dbox.n.

424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpop3d\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
internet, network, pop3, protocol, rfc 822
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









424
425
426
427
428
429
430








431
432
433
434
435
436
437
438
439
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpop3d\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
internet, network, pop3, protocol, rfc 822
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pop3d/pop3d_udb.n.

373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpop3d\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
internet, network, pop3, protocol
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









373
374
375
376
377
378
379








380
381
382
383
384
385
386
387
388
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpop3d\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
internet, network, pop3, protocol
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/practcl/practcl.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'practcl\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2016-2018 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "practcl" n 0\&.16\&.4 tcllib "The The Proper Rational API for C to Tool Command Language Module"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'practcl\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2016 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "practcl" n 0\&.1 tcllib "The The Proper Rational API for C to Tool Command Language Module"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
..
.BS
.SH NAME
practcl \- The Practcl Module
.SH SYNOPSIS
package require \fBTclOO  1\&.0\fR
.sp
proc \fBpractcl::cat\fR \fIfname\fR
.sp
proc \fBpractcl::docstrip\fR \fItext\fR
.sp
proc \fBputb\fR ?\fImap\fR? \fItext\fR
.sp
proc \fBProc\fR \fIname\fR \fIarglist\fR \fIbody\fR
.sp
proc \fBnoop\fR ?\fIargs\fR?
.sp
proc \fBpractcl::debug\fR ?\fIargs\fR?
.sp
proc \fBpractcl::doexec\fR ?\fIargs\fR?
.sp
proc \fBpractcl::doexec_in\fR \fIpath\fR ?\fIargs\fR?
.sp
proc \fBpractcl::dotclexec\fR ?\fIargs\fR?
.sp
proc \fBpractcl::domake\fR \fIpath\fR ?\fIargs\fR?
.sp
proc \fBpractcl::domake\&.tcl\fR \fIpath\fR ?\fIargs\fR?
.sp
proc \fBpractcl::fossil\fR \fIpath\fR ?\fIargs\fR?
.sp
proc \fBpractcl::fossil_status\fR \fIdir\fR
.sp
proc \fBpractcl::os\fR
.sp
proc \fBpractcl::mkzip\fR \fIexename\fR \fIbarekit\fR \fIvfspath\fR
.sp
proc \fBpractcl::sort_dict\fR \fIlist\fR
.sp
proc \fBpractcl::local_os\fR
.sp
proc \fBpractcl::config\&.tcl\fR \fIpath\fR
.sp
proc \fBpractcl::read_configuration\fR \fIpath\fR
.sp
proc \fBpractcl::tcllib_require\fR \fIpkg\fR ?\fIargs\fR?
.sp
proc \fBpractcl::platform::tcl_core_options\fR \fIos\fR
.sp
proc \fBpractcl::platform::tk_core_options\fR \fIos\fR
.sp
proc \fBpractcl::read_rc_file\fR \fIfilename\fR ?\fIlocaldat\fR \fB\fR?
.sp
proc \fBpractcl::read_sh_subst\fR \fIline\fR \fIinfo\fR
.sp
proc \fBpractcl::read_sh_file\fR \fIfilename\fR ?\fIlocaldat\fR \fB\fR?
.sp
proc \fBpractcl::read_Config\&.sh\fR \fIfilename\fR
.sp
proc \fBpractcl::read_Makefile\fR \fIfilename\fR
.sp
proc \fBpractcl::cputs\fR \fIvarname\fR ?\fIargs\fR?
.sp
proc \fBpractcl::tcl_to_c\fR \fIbody\fR
.sp
proc \fBpractcl::_tagblock\fR \fItext\fR ?\fIstyle\fR \fBtcl\fR? ?\fInote\fR \fB\fR?
.sp
proc \fBpractcl::de_shell\fR \fIdata\fR
.sp
proc \fBpractcl::grep\fR \fIpattern\fR ?\fIfiles\fR \fB\fR?
.sp
proc \fBpractcl::file_lexnormalize\fR \fIsp\fR
.sp
proc \fBpractcl::file_relative\fR \fIbase\fR \fIdst\fR
.sp
proc \fBpractcl::findByPattern\fR \fIbasedir\fR \fIpatterns\fR
.sp
proc \fBpractcl::log\fR \fIfname\fR \fIcomment\fR
.sp
proc \fBpractcl::_pkgindex_simpleIndex\fR \fIpath\fR
.sp
proc \fBpractcl::_pkgindex_directory\fR \fIpath\fR
.sp
proc \fBpractcl::_pkgindex_path_subdir\fR \fIpath\fR
.sp
proc \fBpractcl::pkgindex_path\fR ?\fIargs\fR?
.sp
proc \fBpractcl::installDir\fR \fId1\fR \fId2\fR
.sp
proc \fBpractcl::copyDir\fR \fId1\fR \fId2\fR ?\fItoplevel\fR \fB1\fR?
.sp
proc \fBpractcl::buildModule\fR \fImodpath\fR
.sp
proc \fBpractcl::installModule\fR \fImodpath\fR \fIDEST\fR
.sp
proc \fBpractcl::trigger\fR ?\fIargs\fR?
.sp
proc \fBpractcl::depends\fR ?\fIargs\fR?
.sp
proc \fBpractcl::target\fR \fIname\fR \fIinfo\fR ?\fIaction\fR \fB\fR?
.sp
method \fBconstructor\fR
.sp
method \fBargspec\fR \fIargspec\fR
.sp
method \fBcomment\fR \fIblock\fR
.sp
method \fBkeyword\&.Annotation\fR \fIresultvar\fR \fIcommentblock\fR \fItype\fR \fIname\fR \fIbody\fR
.sp
method \fBkeyword\&.Class\fR \fIresultvar\fR \fIcommentblock\fR \fIname\fR \fIbody\fR
.sp
method \fBkeyword\&.class\fR \fIresultvar\fR \fIcommentblock\fR \fIname\fR \fIbody\fR
.sp
method \fBkeyword\&.Class_Method\fR \fIresultvar\fR \fIcommentblock\fR \fIname\fR ?\fIargs\fR?
.sp
method \fBkeyword\&.method\fR \fIresultvar\fR \fIcommentblock\fR \fIname\fR ?\fIargs\fR?
.sp
method \fBkeyword\&.proc\fR \fIcommentblock\fR \fIname\fR \fIargspec\fR
.sp
method \fBreset\fR
.sp
method \fBMain\fR
.sp
method \fBsection\&.method\fR \fIkeyword\fR \fImethod\fR \fIminfo\fR
.sp
method \fBsection\&.annotation\fR \fItype\fR \fIname\fR \fIiinfo\fR
.sp
method \fBsection\&.class\fR \fIclass_name\fR \fIclass_info\fR
.sp
method \fBsection\&.command\fR \fIprocinfo\fR
.sp
method \fBmanpage\fR ?\fBheader \fIvalue\fR\fR? ?\fBfooter \fIvalue\fR\fR? ?\fBauthors \fIlist\fR\fR?
.sp
method \fBscan_text\fR \fItext\fR
.sp
method \fBscan_file\fR \fIfilename\fR
.sp
method \fB_MorphPatterns\fR
.sp
method \fBdefine\fR \fIsubmethod\fR ?\fIargs\fR?
.sp
method \fBgraft\fR ?\fIargs\fR?
.sp
method \fBinitialize\fR
.sp
method \fBlink\fR \fIcommand\fR ?\fIargs\fR?
.sp
method \fBmorph\fR \fIclassname\fR
.sp
method \fBscript\fR \fIscript\fR
.sp
method \fBselect\fR
.sp
method \fBsource\fR \fIfilename\fR
.sp
classmethod \fBselect\fR \fIobject\fR
.sp
method \fBconfig\&.sh\fR
.sp
method \fBBuildDir\fR \fIPWD\fR
.sp
method \fBMakeDir\fR \fIsrcdir\fR
.sp
method \fBread_configuration\fR
.sp
method \fBbuild-cflags\fR \fIPROJECT\fR \fIDEFS\fR \fInamevar\fR \fIversionvar\fR \fIdefsvar\fR
.sp
method \fBcritcl\fR ?\fIargs\fR?
.sp
method \fBAutoconf\fR
.sp
method \fBBuildDir\fR \fIPWD\fR
.sp
method \fBConfigureOpts\fR
.sp
method \fBMakeDir\fR \fIsrcdir\fR
.sp
method \fBmake {} autodetect\fR
.sp
method \fBmake {} clean\fR
.sp
method \fBmake {} compile\fR
.sp
method \fBmake {} install\fR \fIDEST\fR
.sp
method \fBbuild-compile-sources\fR \fIPROJECT\fR \fICOMPILE\fR \fICPPCOMPILE\fR \fIINCLUDES\fR
.sp
method \fBbuild-Makefile\fR \fIpath\fR \fIPROJECT\fR
.sp
method \fBbuild-library\fR \fIoutfile\fR \fIPROJECT\fR
.sp
method \fBbuild-tclsh\fR \fIoutfile\fR \fIPROJECT\fR ?\fIpath\fR \fBauto\fR?
.sp
method \fBBuildDir\fR \fIPWD\fR
.sp
method \fBmake {} autodetect\fR
.sp
method \fBmake {} clean\fR
.sp
method \fBmake {} compile\fR
.sp
method \fBmake {} install\fR \fIDEST\fR
.sp
method \fBMakeDir\fR \fIsrcdir\fR
.sp
method \fBNmakeOpts\fR
.sp
method \fBconstructor\fR \fImodule_object\fR \fIname\fR \fIinfo\fR ?\fIaction_body\fR \fB\fR?
.sp
method \fBdo\fR
.sp
method \fBcheck\fR
.sp
method \fBoutput\fR
.sp
method \fBreset\fR
.sp
method \fBtriggers\fR
.sp
method \fBconstructor\fR \fIparent\fR ?\fIargs\fR?
.sp
method \fBchild\fR \fImethod\fR
.sp
method \fBgo\fR
.sp
method \fBcstructure\fR \fIname\fR \fIdefinition\fR ?\fIargdat\fR \fB\fR?
.sp
method \fBinclude\fR \fIheader\fR
.sp
method \fBinclude_dir\fR ?\fIargs\fR?
.sp
method \fBinclude_directory\fR ?\fIargs\fR?
.sp
method \fBc_header\fR \fIbody\fR
.sp
method \fBc_code\fR \fIbody\fR
.sp
method \fBc_function\fR \fIheader\fR \fIbody\fR ?\fIinfo\fR \fB\fR?
.sp
method \fBc_tcloomethod\fR \fIname\fR \fIbody\fR ?\fIarginfo\fR \fB\fR?
.sp
method \fBcmethod\fR \fIname\fR \fIbody\fR ?\fIarginfo\fR \fB\fR?
.sp
method \fBc_tclproc_nspace\fR \fInspace\fR
.sp
method \fBc_tclcmd\fR \fIname\fR \fIbody\fR ?\fIarginfo\fR \fB\fR?
.sp
method \fBc_tclproc_raw\fR \fIname\fR \fIbody\fR ?\fIarginfo\fR \fB\fR?
.sp
method \fBtcltype\fR \fIname\fR \fIargdat\fR
.sp
method \fBproject-compile-products\fR
.sp
method \fBimplement\fR \fIpath\fR
.sp
method \fBinitialize\fR
.sp
method \fBlinktype\fR
.sp
method \fBgenerate-cfile-constant\fR
.sp
method \fBgenerate-cfile-header\fR
.sp
method \fBgenerate-cfile-tclapi\fR
.sp
method \fBgenerate-loader-module\fR
.sp
method \fBCollate_Source\fR \fICWD\fR
.sp
method \fBselect\fR
.sp
classmethod \fBselect\fR \fIobject\fR
.sp
method \fBcode\fR \fIsection\fR \fIbody\fR
.sp
method \fBCollate_Source\fR \fICWD\fR
.sp
method \fBproject-compile-products\fR
.sp
method \fBgenerate-debug\fR ?\fIspaces\fR \fB\fR?
.sp
method \fBgenerate-cfile-constant\fR
.sp
method \fBgenerate-cfile-public-structure\fR
.sp
method \fBgenerate-cfile-header\fR
.sp
method \fBgenerate-cfile-global\fR
.sp
method \fBgenerate-cfile-private-typedef\fR
.sp
method \fBgenerate-cfile-private-structure\fR
.sp
method \fBgenerate-cfile-functions\fR
.sp
method \fBgenerate-cfile-tclapi\fR
.sp
method \fBgenerate-hfile-public-define\fR
.sp
method \fBgenerate-hfile-public-macro\fR
.sp
method \fBgenerate-hfile-public-typedef\fR
.sp
method \fBgenerate-hfile-public-structure\fR
.sp
method \fBgenerate-hfile-public-headers\fR
.sp
method \fBgenerate-hfile-public-function\fR
.sp
method \fBgenerate-hfile-public-includes\fR
.sp
method \fBgenerate-hfile-public-verbatim\fR
.sp
method \fBgenerate-loader-external\fR
.sp
method \fBgenerate-loader-module\fR
.sp
method \fBgenerate-stub-function\fR
.sp
method \fBIncludeAdd\fR \fIheadervar\fR ?\fIargs\fR?
.sp
method \fBgenerate-tcl-loader\fR
.sp
method \fBgenerate-tcl-pre\fR
.sp
method \fBgenerate-tcl-post\fR
.sp
method \fBlinktype\fR
.sp
method \fBOfile\fR \fIfilename\fR
.sp
method \fBproject-static-packages\fR
.sp
method \fBtoolset-include-directory\fR
.sp
method \fBtarget\fR \fImethod\fR ?\fIargs\fR?
.sp
method \fBproject-compile-products\fR
.sp
method \fBgenerate-loader-module\fR
.sp
method \fBproject-compile-products\fR
.sp
method \fBlinker-products\fR \fIconfigdict\fR
.sp
method \fBinitialize\fR
.sp
variable \fBmake_object\fR
.sp
method \fB_MorphPatterns\fR
.sp
method \fBadd\fR ?\fIargs\fR?
.sp
method \fBinstall-headers\fR ?\fIargs\fR?
.sp
method \fBmake {} _preamble\fR
.sp
method \fBmake {} pkginfo\fR
.sp
method \fBmake {} objects\fR
.sp
method \fBmake {} object\fR \fIname\fR
.sp
method \fBmake {} reset\fR
.sp
method \fBmake {} trigger\fR ?\fIargs\fR?
.sp
method \fBmake {} depends\fR ?\fIargs\fR?
.sp
method \fBmake {} filename\fR \fIname\fR
.sp
method \fBmake {} target\fR \fIname\fR \fIInfo\fR \fIbody\fR
.sp
method \fBmake {} todo\fR
.sp
method \fBmake {} do\fR
.sp
method \fBchild\fR \fIwhich\fR
.sp
method \fBgenerate-c\fR
.sp
method \fBgenerate-h\fR
.sp
method \fBgenerate-loader\fR
.sp
method \fBinitialize\fR
.sp
method \fBimplement\fR \fIpath\fR
.sp
method \fBlinktype\fR
.sp
method \fB_MorphPatterns\fR
.sp
method \fBconstructor\fR ?\fIargs\fR?
.sp
method \fBadd_object\fR \fIobject\fR
.sp
method \fBadd_project\fR \fIpkg\fR \fIinfo\fR ?\fIoodefine\fR \fB\fR?
.sp
method \fBadd_tool\fR \fIpkg\fR \fIinfo\fR ?\fIoodefine\fR \fB\fR?
.sp
method \fBbuild-tclcore\fR
.sp
method \fBchild\fR \fIwhich\fR
.sp
method \fBlinktype\fR
.sp
method \fBproject\fR \fIpkg\fR ?\fIargs\fR?
.sp
method \fBtclcore\fR
.sp
method \fBtkcore\fR
.sp
method \fBtool\fR \fIpkg\fR ?\fIargs\fR?
.sp
method \fBclean\fR \fIPATH\fR
.sp
method \fBproject-compile-products\fR
.sp
method \fBgo\fR
.sp
method \fBgenerate-decls\fR \fIpkgname\fR \fIpath\fR
.sp
method \fBimplement\fR \fIpath\fR
.sp
method \fBgenerate-make\fR \fIpath\fR
.sp
method \fBlinktype\fR
.sp
method \fBpackage-ifneeded\fR ?\fIargs\fR?
.sp
method \fBshared_library\fR ?\fIfilename\fR \fB\fR?
.sp
method \fBstatic_library\fR ?\fIfilename\fR \fB\fR?
.sp
method \fBbuild-tclkit_main\fR \fIPROJECT\fR \fIPKG_OBJS\fR
.sp
method \fBCollate_Source\fR \fICWD\fR
.sp
method \fBwrap\fR \fIPWD\fR \fIexename\fR \fIvfspath\fR ?\fIargs\fR?
.sp
classmethod \fBSandbox\fR \fIobject\fR
.sp
classmethod \fBselect\fR \fIobject\fR
.sp
classmethod \fBclaim_option\fR
.sp
classmethod \fBclaim_object\fR \fIobject\fR
.sp
classmethod \fBclaim_path\fR \fIpath\fR
.sp
method \fBscm_info\fR
.sp
method \fBDistroMixIn\fR
.sp
method \fBSandbox\fR
.sp
method \fBSrcDir\fR
.sp
method \fBScmTag\fR
.sp
method \fBScmClone\fR
.sp
method \fBScmUnpack\fR
.sp
method \fBScmUpdate\fR
.sp
method \fBUnpack\fR
.sp
classmethod \fBclaim_object\fR \fIobject\fR
.sp
classmethod \fBclaim_option\fR
.sp
classmethod \fBclaim_path\fR \fIpath\fR
.sp
method \fBScmUnpack\fR
.sp
classmethod \fBclaim_object\fR \fIobj\fR
.sp
classmethod \fBclaim_option\fR
.sp
classmethod \fBclaim_path\fR \fIpath\fR
.sp
method \fBscm_info\fR
.sp
method \fBScmClone\fR
.sp
method \fBScmTag\fR
.sp
method \fBScmUnpack\fR
.sp
method \fBScmUpdate\fR
.sp
classmethod \fBclaim_object\fR \fIobj\fR
.sp
classmethod \fBclaim_option\fR
.sp
classmethod \fBclaim_path\fR \fIpath\fR
.sp
method \fBScmTag\fR
.sp
method \fBScmUnpack\fR
.sp
method \fBScmUpdate\fR
.sp
method \fB_MorphPatterns\fR
.sp
method \fBBuildDir\fR \fIPWD\fR
.sp
method \fBchild\fR \fIwhich\fR
.sp
method \fBcompile\fR
.sp
method \fBgo\fR
.sp
method \fBinstall\fR ?\fIargs\fR?
.sp
method \fBlinktype\fR
.sp
method \fBlinker-products\fR \fIconfigdict\fR
.sp
method \fBlinker-external\fR \fIconfigdict\fR
.sp
method \fBlinker-extra\fR \fIconfigdict\fR
.sp
method \fBenv-bootstrap\fR
.sp
method \fBenv-exec\fR
.sp
method \fBenv-install\fR
.sp
method \fBenv-load\fR
.sp
method \fBenv-present\fR
.sp
method \fBsources\fR
.sp
method \fBupdate\fR
.sp
method \fBunpack\fR
.sp
method \fBenv-bootstrap\fR
.sp
method \fBenv-present\fR
.sp
method \fBlinktype\fR
.sp
method \fBenv-bootstrap\fR
.sp
method \fBenv-install\fR
.sp
method \fBenv-present\fR
.sp
method \fBinstall\fR \fIDEST\fR
.sp
method \fBkettle\fR \fIpath\fR ?\fIargs\fR?
.sp
method \fBinstall\fR \fIDEST\fR
.sp
method \fBinstall\fR \fIDEST\fR
.sp
method \fBenv-bootstrap\fR
.sp
method \fBenv-install\fR
.sp
method \fBenv-present\fR
.sp
method \fBinstall\fR \fIDEST\fR
.sp
method \fBinstall-module\fR \fIDEST\fR ?\fIargs\fR?
.sp
method \fBenv-bootstrap\fR
.sp
method \fBenv-install\fR
.sp
method \fBinstall\fR \fIDEST\fR
.sp
method \fBinstall-module\fR \fIDEST\fR ?\fIargs\fR?
.sp
method \fBclean\fR
.sp
method \fBenv-install\fR
.sp
method \fBproject-compile-products\fR
.sp
method \fBComputeInstall\fR
.sp
method \fBgo\fR
.sp
method \fBlinker-products\fR \fIconfigdict\fR
.sp
method \fBproject-static-packages\fR
.sp
method \fBBuildDir\fR \fIPWD\fR
.sp
method \fBcompile\fR
.sp
method \fBConfigure\fR
.sp
method \fBinstall\fR \fIDEST\fR
.sp
method \fBinstall\fR \fIDEST\fR
.sp
method \fBinstall\fR \fIDEST\fR
.sp
method \fBenv-bootstrap\fR
.sp
method \fBenv-present\fR
.sp
method \fBenv-install\fR
.sp
method \fBgo\fR
.sp
method \fBlinktype\fR
.sp
.BE
.SH DESCRIPTION
The Practcl module is a tool for integrating large modules for C API
Tcl code that requires custom Tcl types and TclOO objects\&.
.PP
The concept with Practcl is that is a single file package that can
assist any tcl based project with distribution, compilation, linking,
VFS preparation, executable assembly, and installation\&. Practcl also
allows one project to invoke the build system from another project,
allowing complex projects such as a statically linked basekit to be
assembled with relative ease\&.
.PP
Practcl ships as a single file, and aside from a Tcl 8\&.6 interpreter,
has no external dependencies\&.
.PP
Making a practcl project
.SH COMMANDS
.TP
proc \fBpractcl::cat\fR \fIfname\fR
Concatenate a file
.TP
proc \fBpractcl::docstrip\fR \fItext\fR
Strip the global comments from tcl code\&. Used to
prevent the documentation markup comments from clogging
up files intended for distribution in machine readable format\&.
.TP
proc \fBputb\fR ?\fImap\fR? \fItext\fR
Append a line of text to a variable\&. Optionally apply a string mapping\&.
.TP
proc \fBProc\fR \fIname\fR \fIarglist\fR \fIbody\fR
Generate a proc if no command already exists by that name
.TP
proc \fBnoop\fR ?\fIargs\fR?
A command to do nothing\&. A handy way of
negating an instruction without
having to comment it completely out\&.
It's also a handy attachment point for
an object to be named later
.TP
proc \fBpractcl::debug\fR ?\fIargs\fR?
.TP
proc \fBpractcl::doexec\fR ?\fIargs\fR?
Drop in a static copy of Tcl
.TP
proc \fBpractcl::doexec_in\fR \fIpath\fR ?\fIargs\fR?
.TP
proc \fBpractcl::dotclexec\fR ?\fIargs\fR?
.TP
proc \fBpractcl::domake\fR \fIpath\fR ?\fIargs\fR?
.TP
proc \fBpractcl::domake\&.tcl\fR \fIpath\fR ?\fIargs\fR?
.TP
proc \fBpractcl::fossil\fR \fIpath\fR ?\fIargs\fR?
.TP
proc \fBpractcl::fossil_status\fR \fIdir\fR
.TP
proc \fBpractcl::os\fR
.TP
proc \fBpractcl::mkzip\fR \fIexename\fR \fIbarekit\fR \fIvfspath\fR
Build a zipfile\&. On tcl8\&.6 this invokes the native Zip implementation
on older interpreters this invokes zip via exec
.TP
proc \fBpractcl::sort_dict\fR \fIlist\fR
Dictionary sort a key/value list\&. Needed because pre tcl8\&.6
does not have \fIlsort -stride 2\fR
.TP
proc \fBpractcl::local_os\fR
Returns a dictionary describing the local operating system\&.
Fields return include:
.RS
.IP \(bu
download - Filesystem path where fossil repositories and source tarballs are downloaded for the current user
.IP \(bu
EXEEXT - The extension to give to executables\&. (i\&.e\&. \&.exe on windows)
.IP \(bu
fossil_mirror - A URI for a local network web server who acts as a fossil repository mirror
.IP \(bu
local_install - Filesystem path where packages for local consumption by the current user are installed
.IP \(bu
prefix - The prefix as given to the Tcl core/TEA for installation to local_install in \&./configure
.IP \(bu
sandbox - The file location where this project unpacks external projects
.IP \(bu
TEACUP_PROFILE - The ActiveState/Teacup canonical name for this platform (i\&.e\&. win32-ix86 macosx10\&.5-i386-x86_84)
.IP \(bu
TEACUP_OS - The local operating system (windows, macosx, openbsd, etc)\&. Gives the same answer as tcl\&.m4, except that macosx is given as macosx instead of Darwin\&.
.IP \(bu
TEA_PLATFORM - The platform returned by uname -s-uname -r (on Unix), or "windows" on Windows
.IP \(bu
TEACUP_ARCH - The processor architecture for the local os (i\&.e\&. ix86, x86_64)
.IP \(bu
TEACUP_ARCH - The processor architecture for the local os (i\&.e\&. ix86, x86_64)
.IP \(bu
teapot - Filesystem path where teapot package files are downloaded for the current user
.IP \(bu
userhome - File path to store localized preferences, cache download files, etc for the current user
.RE
.IP
This command uses a combination of local checks with Exec, any tclConfig\&.sh file that is
resident, autoconf data where already computed, and data gleaned from a file named
practcl\&.rc in userhome\&. The location for userhome varies by platform and operating system:
.RS
.IP \(bu
Windows: ::env(LOCALAPPDATA)/Tcl
.IP \(bu
Macos: ~/Library/Application Support/Tcl
.IP \(bu
Other: ~/tcl
.RE
.TP
proc \fBpractcl::config\&.tcl\fR \fIpath\fR
A transparent call to ::practcl::read_configuration to preserve backward compadibility
with older copies of Practcl
.TP
proc \fBpractcl::read_configuration\fR \fIpath\fR
Detect local platform\&. This command looks for data gleaned by autoconf or autosetup
in the path specified, or perform its own logic tests if neither has been run\&.
A file named config\&.site present in the location indicates that this project is
cross compiling, and the data stored in that file is used for the compiler and linker\&.
.sp
This command looks for information from the following files, in the following order:
.RS
.IP \(bu
config\&.tcl - A file generated by autoconf/configure in newer editions of TEA, encoded as a Tcl script\&.
.IP \(bu
config\&.site - A file containing cross compiler information, encoded as a SH script
.IP \(bu
::env(VisualStudioVersion) - On Windows, and environmental value that indicates MS Visual Studio is installed
.RE
.sp
This command returns a dictionary containing all of the data cleaned from the sources above\&.
In the absence of any guidance this command returns the same output as ::practcl::local_os\&.
In this mode, if the environmental variable VisualStudioVersion exists, this command
will provide a template of fields that are appropriate for compiling on Windows under
Microsoft Visual Studio\&. The USEMSVC flag in the dictionary is a boolean flag to indicate
if this is indeed the case\&.
.TP
proc \fBpractcl::tcllib_require\fR \fIpkg\fR ?\fIargs\fR?
Try to load  a package, and failing that
retrieve tcllib
.TP
proc \fBpractcl::platform::tcl_core_options\fR \fIos\fR
Return the string to pass to \&./configure to compile the Tcl core for the given OS\&.
.RS
.IP \(bu
windows: --with-tzdata --with-encoding utf-8
.IP \(bu
macosx: --enable-corefoundation=yes  --enable-framework=no --with-tzdata --with-encoding utf-8
.IP \(bu
other: --with-tzdata --with-encoding utf-8
.RE
.TP
proc \fBpractcl::platform::tk_core_options\fR \fIos\fR
.TP
proc \fBpractcl::read_rc_file\fR \fIfilename\fR ?\fIlocaldat\fR \fB\fR?
Read a stylized key/value list stored in a file
.TP
proc \fBpractcl::read_sh_subst\fR \fIline\fR \fIinfo\fR
Converts a XXX\&.sh file into a series of Tcl variables
.TP
proc \fBpractcl::read_sh_file\fR \fIfilename\fR ?\fIlocaldat\fR \fB\fR?
.TP
proc \fBpractcl::read_Config\&.sh\fR \fIfilename\fR
A simpler form of read_sh_file tailored
to pulling data from (tcl|tk)Config\&.sh
.TP
proc \fBpractcl::read_Makefile\fR \fIfilename\fR
A simpler form of read_sh_file tailored
to pulling data from a Makefile
.TP
proc \fBpractcl::cputs\fR \fIvarname\fR ?\fIargs\fR?
Append arguments to a buffer
The command works like puts in that each call will also insert
a line feed\&. Unlike puts, blank links in the interstitial are
suppressed
.TP
proc \fBpractcl::tcl_to_c\fR \fIbody\fR
.TP
proc \fBpractcl::_tagblock\fR \fItext\fR ?\fIstyle\fR \fBtcl\fR? ?\fInote\fR \fB\fR?
.TP
proc \fBpractcl::de_shell\fR \fIdata\fR
.TP
proc \fBpractcl::grep\fR \fIpattern\fR ?\fIfiles\fR \fB\fR?
Search for the pattern \fIpattern\fR amongst $files
.TP
proc \fBpractcl::file_lexnormalize\fR \fIsp\fR
.TP
proc \fBpractcl::file_relative\fR \fIbase\fR \fIdst\fR
Calculate a relative path between base and dst
.sp
Example:
.CS

  ::practcl::file_relative ~/build/tcl/unix ~/build/tcl/library
  > \&.\&./library



.CE
.TP
proc \fBpractcl::findByPattern\fR \fIbasedir\fR \fIpatterns\fR
.TP
proc \fBpractcl::log\fR \fIfname\fR \fIcomment\fR
Record an event in the practcl log
.TP
proc \fBpractcl::_pkgindex_simpleIndex\fR \fIpath\fR
.TP
proc \fBpractcl::_pkgindex_directory\fR \fIpath\fR
Return true if the pkgindex file contains
any statement other than "package ifneeded"
and/or if any package ifneeded loads a DLL
.TP
proc \fBpractcl::_pkgindex_path_subdir\fR \fIpath\fR
Helper function for ::practcl::pkgindex_path
.TP
proc \fBpractcl::pkgindex_path\fR ?\fIargs\fR?
Index all paths given as though they will end up in the same
virtual file system
.TP
proc \fBpractcl::installDir\fR \fId1\fR \fId2\fR
Delete the contents of \fId2\fR, and then
recusively Ccopy the contents of \fId1\fR to \fId2\fR\&.
.TP
proc \fBpractcl::copyDir\fR \fId1\fR \fId2\fR ?\fItoplevel\fR \fB1\fR?
Recursively copy the contents of \fId1\fR to \fId2\fR
.TP
proc \fBpractcl::buildModule\fR \fImodpath\fR
.TP
proc \fBpractcl::installModule\fR \fImodpath\fR \fIDEST\fR
Install a module from MODPATH to the directory specified\&.
\fIdpath\fR is assumed to be the fully qualified path where module is to be placed\&.
Any existing files will be deleted at that path\&.
If the path is symlink the process will return with no error and no action\&.
If the module has contents in the build/ directory that are newer than the
\&.tcl files in the module source directory, and a build/build\&.tcl file exists,
the build/build\&.tcl file is run\&.
If the source directory includes a file named index\&.tcl, the directory is assumed
to be in the tao style of modules, and the entire directory (and all subdirectories)
are copied verbatim\&.
If no index\&.tcl file is present, all \&.tcl files are copied from the module source
directory, and a pkgIndex\&.tcl file is generated if non yet exists\&.
I a folder named htdocs exists in the source directory, that directory is copied
verbatim to the destination\&.
.TP
proc \fBpractcl::trigger\fR ?\fIargs\fR?
Trigger build targets, and recompute dependencies
.sp
Internals:
.CS


  ::practcl::LOCAL make trigger {*}$args
  foreach {name obj} [::practcl::LOCAL make objects] {
    set ::make($name) [$obj do]
  }

.CE
.TP
proc \fBpractcl::depends\fR ?\fIargs\fR?
Calculate if a dependency for any of the arguments needs to
be fulfilled or rebuilt\&.
.sp
Internals:
.CS


  ::practcl::LOCAL make depends {*}$args

.CE
.TP
proc \fBpractcl::target\fR \fIname\fR \fIinfo\fR ?\fIaction\fR \fB\fR?
Declare a build product\&. This proc is just a shorthand for
\fI::practcl::LOCAL make task $name $info $action\fR
.sp
Registering a build product with this command will create
an entry in the global  array, and populate
a value in the global  array\&.
.sp
Internals:
.CS


  set obj [::practcl::LOCAL make task $name $info $action]
  set ::make($name) 0
  set filename [$obj define get filename]
  if {$filename ne {}} {
    set ::target($name) $filename
  }

.CE
.PP
.SH CLASSES
.SS "CLASS  PRACTCL::DOCTOOL"
.CS

{ set authors {
   {John Doe} {jdoe@illustrious\&.edu}
   {Tom RichardHarry} {tomdickharry@illustrius\&.edu}
 }
 # Create the object
 ::practcl::doctool create AutoDoc
 set fout [open [file join $moddir module\&.tcl] w]
 foreach file [glob [file join $srcdir *\&.tcl]] {
   set content [::practcl::cat [file join $srcdir $file]]
    # Scan the file
    AutoDoc scan_text $content
    # Strip the comments from the distribution
    puts $fout [::practcl::docstrip $content]
 }
 # Write out the manual page
 set manout [open [file join $moddir module\&.man] w]
 dict set args header [string map $modmap [::practcl::cat [file join $srcdir manual\&.txt]]]
 dict set args footer [string map $modmap [::practcl::cat [file join $srcdir footer\&.txt]]]
 dict set args authors $authors
 puts $manout [AutoDoc manpage {*}$args]
 close $manout


}
.CE
.PP
Tool for build scripts to dynamically generate manual files from comments
in source code files
.PP
\fBMethods\fR
.TP
method \fBconstructor\fR
.TP
method \fBargspec\fR \fIargspec\fR
Process an argument list into an informational dict\&.
This method also understands non-positional
arguments expressed in the notation of Tip 471
\fIhttps://core\&.tcl-lang\&.org/tips/doc/trunk/tip/479\&.md\fR\&.
.sp
The output will be a dictionary of all of the fields and whether the fields
are \fBpositional\fR, \fBmandatory\fR, and whether they have a
\fBdefault\fR value\&.
.sp
.sp
Example:
.CS

   my argspec {a b {c 10}}

   > a {positional 1 mandatory 1} b {positional 1 mandatory 1} c {positional 1 mandatory 0 default 10}



.CE
.TP
method \fBcomment\fR \fIblock\fR
Convert a block of comments into an informational dictionary\&.
If lines in the comment start with a single word ending in a colon,
all subsequent lines are appended to a dictionary field of that name\&.
If no fields are given, all of the text is appended to the \fBdescription\fR
field\&.
.sp
Example:
.CS

 my comment {Does something cool}
 > description {Does something cool}

 my comment {
 title : Something really cool
 author : Sean Woods
 author : John Doe
 description :
 This does something really cool!
 }
 > description {This does something really cool!}
   title {Something really cool}
   author {Sean Woods
   John Doe}



.CE
.TP
method \fBkeyword\&.Annotation\fR \fIresultvar\fR \fIcommentblock\fR \fItype\fR \fIname\fR \fIbody\fR
.TP
method \fBkeyword\&.Class\fR \fIresultvar\fR \fIcommentblock\fR \fIname\fR \fIbody\fR
Process an oo::objdefine call that modifies the class object
itself
.TP
method \fBkeyword\&.class\fR \fIresultvar\fR \fIcommentblock\fR \fIname\fR \fIbody\fR
Process an oo::define, clay::define, etc statement\&.
.TP
method \fBkeyword\&.Class_Method\fR \fIresultvar\fR \fIcommentblock\fR \fIname\fR ?\fIargs\fR?
Process a statement for a clay style class method
.TP
method \fBkeyword\&.method\fR \fIresultvar\fR \fIcommentblock\fR \fIname\fR ?\fIargs\fR?
Process a statement for a tcloo style object method
.TP
method \fBkeyword\&.proc\fR \fIcommentblock\fR \fIname\fR \fIargspec\fR
Process a proc statement
.TP
method \fBreset\fR
Reset the state of the object and its embedded coroutine
.TP
method \fBMain\fR
Main body of the embedded coroutine for the object
.TP
method \fBsection\&.method\fR \fIkeyword\fR \fImethod\fR \fIminfo\fR
Generate the manual page text for a method or proc
.TP
method \fBsection\&.annotation\fR \fItype\fR \fIname\fR \fIiinfo\fR
.TP
method \fBsection\&.class\fR \fIclass_name\fR \fIclass_info\fR
Generate the manual page text for a class
.TP
method \fBsection\&.command\fR \fIprocinfo\fR
Generate the manual page text for the commands section
.TP
method \fBmanpage\fR ?\fBheader \fIvalue\fR\fR? ?\fBfooter \fIvalue\fR\fR? ?\fBauthors \fIlist\fR\fR?
Generate the manual page\&. Returns the completed text suitable for saving in \&.man file\&.
The header argument is a block of doctools text to go in before the machine generated
section\&. footer is a block of doctools text to go in after the machine generated
section\&. authors is a list of individual authors and emails in the form of AUTHOR EMAIL ?AUTHOR EMAIL?\&.\&.\&.
.TP
method \fBscan_text\fR \fItext\fR
Scan a block of text
.TP
method \fBscan_file\fR \fIfilename\fR
Scan a file of text
.PP
.PP
.SS "CLASS  PRACTCL::METACLASS"
The metaclass for all practcl objects
.PP
\fBMethods\fR
.TP
method \fB_MorphPatterns\fR
.TP
method \fBdefine\fR \fIsubmethod\fR ?\fIargs\fR?
.TP
method \fBgraft\fR ?\fIargs\fR?
.TP
method \fBinitialize\fR
.TP
method \fBlink\fR \fIcommand\fR ?\fIargs\fR?
.TP
method \fBmorph\fR \fIclassname\fR
.TP
method \fBscript\fR \fIscript\fR
.TP
method \fBselect\fR
.TP
method \fBsource\fR \fIfilename\fR
.PP
.PP
.SS "CLASS  PRACTCL::TOOLSET"
Ancestor-less class intended to be a mixin
which defines a family of build related behaviors
that are modified when targetting either gcc or msvc
.PP
\fBClass Methods\fR
.TP
classmethod \fBselect\fR \fIobject\fR
Perform the selection for the toolset mixin
.PP
.PP
\fBMethods\fR
.TP
method \fBconfig\&.sh\fR
find or fake a key/value list describing this project
.TP
method \fBBuildDir\fR \fIPWD\fR
Compute the location where the product will be built
.TP
method \fBMakeDir\fR \fIsrcdir\fR
Return where the Makefile is located relative to \fIsrcdir\fR\&.
For this implementation the MakeDir is always srcdir\&.
.TP
method \fBread_configuration\fR
Read information about the build process for this package\&.
For this implementation, data is sought in the following locations
in the following order:
config\&.tcl (generated by practcl\&.) PKGConfig\&.sh\&. The Makefile
.sp
If the Makefile needs to be consulted, but does not exist, the
Configure method is invoked
.TP
method \fBbuild-cflags\fR \fIPROJECT\fR \fIDEFS\fR \fInamevar\fR \fIversionvar\fR \fIdefsvar\fR
method DEFS
This method populates 4 variables:
name - The name of the package
version - The version of the package
defs - C flags passed to the compiler
includedir - A list of paths to feed to the compiler for finding headers
.TP
method \fBcritcl\fR ?\fIargs\fR?
Invoke critcl in an external process
.PP
.PP
.SS "CLASS  PRACTCL::TOOLSET\&.GCC"
\fIancestors\fR: \fBpractcl::toolset\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBAutoconf\fR
.TP
method \fBBuildDir\fR \fIPWD\fR
.TP
method \fBConfigureOpts\fR
.TP
method \fBMakeDir\fR \fIsrcdir\fR
Detect what directory contains the Makefile template
.TP
method \fBmake {} autodetect\fR
.TP
method \fBmake {} clean\fR
.TP
method \fBmake {} compile\fR
.TP
method \fBmake {} install\fR \fIDEST\fR
.TP
method \fBbuild-compile-sources\fR \fIPROJECT\fR \fICOMPILE\fR \fICPPCOMPILE\fR \fIINCLUDES\fR
.TP
method \fBbuild-Makefile\fR \fIpath\fR \fIPROJECT\fR
.TP
method \fBbuild-library\fR \fIoutfile\fR \fIPROJECT\fR
Produce a static or dynamic library
.TP
method \fBbuild-tclsh\fR \fIoutfile\fR \fIPROJECT\fR ?\fIpath\fR \fBauto\fR?
Produce a static executable
.PP
.PP
.SS "CLASS  PRACTCL::TOOLSET\&.MSVC"
\fIancestors\fR: \fBpractcl::toolset\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBBuildDir\fR \fIPWD\fR
MSVC always builds in the source directory
.TP
method \fBmake {} autodetect\fR
Do nothing
.TP
method \fBmake {} clean\fR
.TP
method \fBmake {} compile\fR
.TP
method \fBmake {} install\fR \fIDEST\fR
.TP
method \fBMakeDir\fR \fIsrcdir\fR
Detect what directory contains the Makefile template
.TP
method \fBNmakeOpts\fR
.PP
.PP
.SS "CLASS  PRACTCL::MAKE_OBJ"
\fIancestors\fR: \fBpractcl::metaclass\fR
.PP
A build deliverable object\&. Normally an object file, header, or tcl script
which must be compiled or generated in some way
.PP
\fBMethods\fR
.TP
method \fBconstructor\fR \fImodule_object\fR \fIname\fR \fIinfo\fR ?\fIaction_body\fR \fB\fR?
.TP
method \fBdo\fR
.TP
method \fBcheck\fR
.TP
method \fBoutput\fR
.TP
method \fBreset\fR
.TP
method \fBtriggers\fR
.PP
.PP
.SS "CLASS  PRACTCL::OBJECT"
\fIancestors\fR: \fBpractcl::metaclass\fR
.PP
A generic Practcl object
.PP
\fBMethods\fR
.TP
method \fBconstructor\fR \fIparent\fR ?\fIargs\fR?
.TP
method \fBchild\fR \fImethod\fR
.TP
method \fBgo\fR
.PP
.PP
.SS "CLASS  PRACTCL::DYNAMIC"
Dynamic blocks do not generate their own \&.c files,
instead the contribute to the amalgamation
of the main library file
.PP
\fBMethods\fR
.TP
method \fBcstructure\fR \fIname\fR \fIdefinition\fR ?\fIargdat\fR \fB\fR?
Parser functions
.TP
method \fBinclude\fR \fIheader\fR
.TP
method \fBinclude_dir\fR ?\fIargs\fR?
.TP
method \fBinclude_directory\fR ?\fIargs\fR?
.TP
method \fBc_header\fR \fIbody\fR
.TP
method \fBc_code\fR \fIbody\fR
.TP
method \fBc_function\fR \fIheader\fR \fIbody\fR ?\fIinfo\fR \fB\fR?
.TP
method \fBc_tcloomethod\fR \fIname\fR \fIbody\fR ?\fIarginfo\fR \fB\fR?
.TP
method \fBcmethod\fR \fIname\fR \fIbody\fR ?\fIarginfo\fR \fB\fR?
Alias to classic name
.TP
method \fBc_tclproc_nspace\fR \fInspace\fR
.TP
method \fBc_tclcmd\fR \fIname\fR \fIbody\fR ?\fIarginfo\fR \fB\fR?
.TP
method \fBc_tclproc_raw\fR \fIname\fR \fIbody\fR ?\fIarginfo\fR \fB\fR?
Alias to classic name
.TP
method \fBtcltype\fR \fIname\fR \fIargdat\fR
.TP
method \fBproject-compile-products\fR
Module interactions
.TP
method \fBimplement\fR \fIpath\fR
.TP
method \fBinitialize\fR
Practcl internals
.TP
method \fBlinktype\fR
.TP
method \fBgenerate-cfile-constant\fR
.TP
method \fBgenerate-cfile-header\fR
.TP
method \fBgenerate-cfile-tclapi\fR
Generate code that provides implements Tcl API
calls
.TP
method \fBgenerate-loader-module\fR
Generate code that runs when the package/module is
initialized into the interpreter
.TP
method \fBCollate_Source\fR \fICWD\fR
.TP
method \fBselect\fR
Once an object marks itself as some
flavor of dynamic, stop trying to morph
it into something else
.PP
.PP
.SS "CLASS  PRACTCL::PRODUCT"
A deliverable for the build system
.PP
\fBClass Methods\fR
.TP
classmethod \fBselect\fR \fIobject\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBcode\fR \fIsection\fR \fIbody\fR
.TP
method \fBCollate_Source\fR \fICWD\fR
.TP
method \fBproject-compile-products\fR
.TP
method \fBgenerate-debug\fR ?\fIspaces\fR \fB\fR?
.TP
method \fBgenerate-cfile-constant\fR
.TP
method \fBgenerate-cfile-public-structure\fR
Populate const static data structures
.TP
method \fBgenerate-cfile-header\fR
.TP
method \fBgenerate-cfile-global\fR
.TP
method \fBgenerate-cfile-private-typedef\fR
.TP
method \fBgenerate-cfile-private-structure\fR
.TP
method \fBgenerate-cfile-functions\fR
Generate code that provides subroutines called by
Tcl API methods
.TP
method \fBgenerate-cfile-tclapi\fR
Generate code that provides implements Tcl API
calls
.TP
method \fBgenerate-hfile-public-define\fR
.TP
method \fBgenerate-hfile-public-macro\fR
.TP
method \fBgenerate-hfile-public-typedef\fR
.TP
method \fBgenerate-hfile-public-structure\fR
.TP
method \fBgenerate-hfile-public-headers\fR
.TP
method \fBgenerate-hfile-public-function\fR
.TP
method \fBgenerate-hfile-public-includes\fR
.TP
method \fBgenerate-hfile-public-verbatim\fR
.TP
method \fBgenerate-loader-external\fR
.TP
method \fBgenerate-loader-module\fR
.TP
method \fBgenerate-stub-function\fR
.TP
method \fBIncludeAdd\fR \fIheadervar\fR ?\fIargs\fR?
.TP
method \fBgenerate-tcl-loader\fR
.TP
method \fBgenerate-tcl-pre\fR
This methods generates any Tcl script file
which is required to pre-initialize the C library
.TP
method \fBgenerate-tcl-post\fR
.TP
method \fBlinktype\fR
.TP
method \fBOfile\fR \fIfilename\fR
.TP
method \fBproject-static-packages\fR
Methods called by the master project
.TP
method \fBtoolset-include-directory\fR
Methods called by the toolset
.TP
method \fBtarget\fR \fImethod\fR ?\fIargs\fR?
.PP
.PP
.SS "CLASS  PRACTCL::PRODUCT\&.CHEADER"
\fIancestors\fR: \fBpractcl::product\fR
.PP
A product which generated from a C header file\&. Which is to say, nothing\&.
.PP
\fBMethods\fR
.TP
method \fBproject-compile-products\fR
.TP
method \fBgenerate-loader-module\fR
.PP
.PP
.SS "CLASS  PRACTCL::PRODUCT\&.CSOURCE"
\fIancestors\fR: \fBpractcl::product\fR
.PP
A product which generated from a C source file\&. Normally an object (\&.o) file\&.
.PP
\fBMethods\fR
.TP
method \fBproject-compile-products\fR
.PP
.PP
.SS "CLASS  PRACTCL::PRODUCT\&.CLIBRARY"
\fIancestors\fR: \fBpractcl::product\fR
.PP
A product which is generated from a compiled C library\&.
Usually a \&.a or a \&.dylib file, but in complex cases may
actually just be a conduit for one project to integrate the
source code of another
.PP
\fBMethods\fR
.TP
method \fBlinker-products\fR \fIconfigdict\fR
.PP
.PP
.SS "CLASS  PRACTCL::PRODUCT\&.DYNAMIC"
\fIancestors\fR: \fBpractcl::dynamic\fR \fBpractcl::product\fR
.PP
A product which is generated from C code that itself is generated
by practcl or some other means\&. This C file may or may not produce
its own \&.o file, depending on whether it is eligible to become part
of an amalgamation
.PP
\fBMethods\fR
.TP
method \fBinitialize\fR
.PP
.PP
.SS "CLASS  PRACTCL::PRODUCT\&.CRITCL"
\fIancestors\fR: \fBpractcl::dynamic\fR \fBpractcl::product\fR
.PP
A binary product produced by critcl\&. Note: The implementation is not
written yet, this class does nothing\&.
.PP
.SS "CLASS  PRACTCL::MODULE"
\fIancestors\fR: \fBpractcl::object\fR \fBpractcl::product\&.dynamic\fR
.PP
In the end, all C code must be loaded into a module
This will either be a dynamically loaded library implementing
a tcl extension, or a compiled in segment of a custom shell/app
.PP
\fBVariable\fR
.TP
variable \fBmake_object\fR
.PP
.PP
\fBMethods\fR
.TP
method \fB_MorphPatterns\fR
.TP
method \fBadd\fR ?\fIargs\fR?
.TP
method \fBinstall-headers\fR ?\fIargs\fR?
.TP
method \fBmake {} _preamble\fR
.TP
method \fBmake {} pkginfo\fR
.TP
method \fBmake {} objects\fR
Return a dictionary of all handles and associated objects
.TP
method \fBmake {} object\fR \fIname\fR
Return the object associated with handle \fIname\fR
.TP
method \fBmake {} reset\fR
Reset all deputy objects
.TP
method \fBmake {} trigger\fR ?\fIargs\fR?
Exercise the triggers method for all handles listed
.TP
method \fBmake {} depends\fR ?\fIargs\fR?
Exercise the check method for all handles listed
.TP
method \fBmake {} filename\fR \fIname\fR
Return the file name of the build product for the listed
handle
.TP
method \fBmake {} target\fR \fIname\fR \fIInfo\fR \fIbody\fR
.TP
method \fBmake {} todo\fR
Return a list of handles for object which return true for the
do method
.TP
method \fBmake {} do\fR
For each target exercise the action specified in the \fIaction\fR
definition if the \fIdo\fR method returns true
.TP
method \fBchild\fR \fIwhich\fR
.TP
method \fBgenerate-c\fR
This methods generates the contents of an amalgamated \&.c file
which implements the loader for a batch of tools
.TP
method \fBgenerate-h\fR
This methods generates the contents of an amalgamated \&.h file
which describes the public API of this module
.TP
method \fBgenerate-loader\fR
.TP
method \fBinitialize\fR
.TP
method \fBimplement\fR \fIpath\fR
.TP
method \fBlinktype\fR
.PP
.PP
.SS "CLASS  PRACTCL::PROJECT"
\fIancestors\fR: \fBpractcl::module\fR
.PP
A toplevel project that is a collection of other projects
.PP
\fBMethods\fR
.TP
method \fB_MorphPatterns\fR
.TP
method \fBconstructor\fR ?\fIargs\fR?
.TP
method \fBadd_object\fR \fIobject\fR
.TP
method \fBadd_project\fR \fIpkg\fR \fIinfo\fR ?\fIoodefine\fR \fB\fR?
.TP
method \fBadd_tool\fR \fIpkg\fR \fIinfo\fR ?\fIoodefine\fR \fB\fR?
.TP
method \fBbuild-tclcore\fR
Compile the Tcl core\&. If the define \fItk\fR is true, compile the
Tk core as well
.TP
method \fBchild\fR \fIwhich\fR
.TP
method \fBlinktype\fR
.TP
method \fBproject\fR \fIpkg\fR ?\fIargs\fR?
Exercise the methods of a sub-object
.TP
method \fBtclcore\fR
.TP
method \fBtkcore\fR
.TP
method \fBtool\fR \fIpkg\fR ?\fIargs\fR?
.PP
.PP
.SS "CLASS  PRACTCL::LIBRARY"
\fIancestors\fR: \fBpractcl::project\fR
.PP
A toplevel project that produces a library
.PP
\fBMethods\fR
.TP
method \fBclean\fR \fIPATH\fR
.TP
method \fBproject-compile-products\fR
.TP
method \fBgo\fR
.TP
method \fBgenerate-decls\fR \fIpkgname\fR \fIpath\fR
.TP
method \fBimplement\fR \fIpath\fR
.TP
method \fBgenerate-make\fR \fIpath\fR
Backward compadible call
.TP
method \fBlinktype\fR
.TP
method \fBpackage-ifneeded\fR ?\fIargs\fR?
Create a "package ifneeded"
Args are a list of aliases for which this package will answer to
.TP
method \fBshared_library\fR ?\fIfilename\fR \fB\fR?
.TP
method \fBstatic_library\fR ?\fIfilename\fR \fB\fR?
.PP
.PP
.SS "CLASS  PRACTCL::TCLKIT"
\fIancestors\fR: \fBpractcl::library\fR
.PP
A toplevel project that produces a self-contained executable
.PP
\fBMethods\fR
.TP
method \fBbuild-tclkit_main\fR \fIPROJECT\fR \fIPKG_OBJS\fR
.TP
method \fBCollate_Source\fR \fICWD\fR
.TP
method \fBwrap\fR \fIPWD\fR \fIexename\fR \fIvfspath\fR ?\fIargs\fR?
Wrap an executable
.PP
.PP
.SS "CLASS  PRACTCL::DISTRIBUTION"
Standalone class to manage code distribution
This class is intended to be mixed into another class
(Thus the lack of ancestors)
.PP
\fBClass Methods\fR
.TP
classmethod \fBSandbox\fR \fIobject\fR
.TP
classmethod \fBselect\fR \fIobject\fR
.TP
classmethod \fBclaim_option\fR
.TP
classmethod \fBclaim_object\fR \fIobject\fR
.TP
classmethod \fBclaim_path\fR \fIpath\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBscm_info\fR
.TP
method \fBDistroMixIn\fR
.TP
method \fBSandbox\fR
.TP
method \fBSrcDir\fR
.TP
method \fBScmTag\fR
.TP
method \fBScmClone\fR
.TP
method \fBScmUnpack\fR
.TP
method \fBScmUpdate\fR
.TP
method \fBUnpack\fR
.PP
.PP
.SS "CLASS  PRACTCL::DISTRIBUTION\&.SNAPSHOT"
\fIancestors\fR: \fBpractcl::distribution\fR
.PP
A file distribution from zip, tarball, or other non-scm archive format
.PP
\fBClass Methods\fR
.TP
classmethod \fBclaim_object\fR \fIobject\fR
.TP
classmethod \fBclaim_option\fR
.TP
classmethod \fBclaim_path\fR \fIpath\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBScmUnpack\fR
.PP
.PP
.SS "CLASS  PRACTCL::DISTRIBUTION\&.FOSSIL"
\fIancestors\fR: \fBpractcl::distribution\fR
.PP
A file distribution based on fossil
.PP
\fBClass Methods\fR
.TP
classmethod \fBclaim_object\fR \fIobj\fR
Check for markers in the metadata
.TP
classmethod \fBclaim_option\fR
.TP
classmethod \fBclaim_path\fR \fIpath\fR
Check for markers in the source root
.PP
.PP
\fBMethods\fR
.TP
method \fBscm_info\fR
.TP
method \fBScmClone\fR
Clone the source
.TP
method \fBScmTag\fR
.TP
method \fBScmUnpack\fR
.TP
method \fBScmUpdate\fR
.PP
.PP
.SS "CLASS  PRACTCL::DISTRIBUTION\&.GIT"
\fIancestors\fR: \fBpractcl::distribution\fR
.PP
A file distribution based on git
.PP
\fBClass Methods\fR
.TP
classmethod \fBclaim_object\fR \fIobj\fR
.TP
classmethod \fBclaim_option\fR
.TP
classmethod \fBclaim_path\fR \fIpath\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBScmTag\fR
.TP
method \fBScmUnpack\fR
.TP
method \fBScmUpdate\fR
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT"
\fIancestors\fR: \fBpractcl::module\fR
.PP
A subordinate project
.PP
\fBMethods\fR
.TP
method \fB_MorphPatterns\fR
.TP
method \fBBuildDir\fR \fIPWD\fR
.TP
method \fBchild\fR \fIwhich\fR
.TP
method \fBcompile\fR
.TP
method \fBgo\fR
.TP
method \fBinstall\fR ?\fIargs\fR?
Install project into the local build system
.TP
method \fBlinktype\fR
.TP
method \fBlinker-products\fR \fIconfigdict\fR
.TP
method \fBlinker-external\fR \fIconfigdict\fR
.TP
method \fBlinker-extra\fR \fIconfigdict\fR
.TP
method \fBenv-bootstrap\fR
Methods for packages/tools that can be downloaded
possibly built and used internally by this Practcl
process
Load the facility into the interpreter
.TP
method \fBenv-exec\fR
Return a file path that exec can call
.TP
method \fBenv-install\fR
Install the tool into the local environment
.TP
method \fBenv-load\fR
Do whatever is necessary to get the tool
into the local environment
.TP
method \fBenv-present\fR
Check if tool is available for load/already loaded
.TP
method \fBsources\fR
.TP
method \fBupdate\fR
.TP
method \fBunpack\fR
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.SOURCE"
\fIancestors\fR: \fBpractcl::subproject\fR \fBpractcl::library\fR
.PP
A project which the kit compiles and integrates
the source for itself
.PP
\fBMethods\fR
.TP
method \fBenv-bootstrap\fR
.TP
method \fBenv-present\fR
.TP
method \fBlinktype\fR
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.TEAPOT"
\fIancestors\fR: \fBpractcl::subproject\fR
.PP
a copy from the teapot
.PP
\fBMethods\fR
.TP
method \fBenv-bootstrap\fR
.TP
method \fBenv-install\fR
.TP
method \fBenv-present\fR
.TP
method \fBinstall\fR \fIDEST\fR
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.KETTLE"
\fIancestors\fR: \fBpractcl::subproject\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBkettle\fR \fIpath\fR ?\fIargs\fR?
.TP
method \fBinstall\fR \fIDEST\fR
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.CRITCL"
\fIancestors\fR: \fBpractcl::subproject\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBinstall\fR \fIDEST\fR
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.SAK"
\fIancestors\fR: \fBpractcl::subproject\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBenv-bootstrap\fR
.TP
method \fBenv-install\fR
.TP
method \fBenv-present\fR
.TP
method \fBinstall\fR \fIDEST\fR
.TP
method \fBinstall-module\fR \fIDEST\fR ?\fIargs\fR?
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.PRACTCL"
\fIancestors\fR: \fBpractcl::subproject\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBenv-bootstrap\fR
.TP
method \fBenv-install\fR
.TP
method \fBinstall\fR \fIDEST\fR
.TP
method \fBinstall-module\fR \fIDEST\fR ?\fIargs\fR?
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.BINARY"
\fIancestors\fR: \fBpractcl::subproject\fR
.PP
A subordinate binary package
.PP
\fBMethods\fR
.TP
method \fBclean\fR
.TP
method \fBenv-install\fR
.TP
method \fBproject-compile-products\fR
.TP
method \fBComputeInstall\fR
.TP
method \fBgo\fR
.TP
method \fBlinker-products\fR \fIconfigdict\fR
.TP
method \fBproject-static-packages\fR
.TP
method \fBBuildDir\fR \fIPWD\fR
.TP
method \fBcompile\fR
.TP
method \fBConfigure\fR
.TP
method \fBinstall\fR \fIDEST\fR
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.TEA"
\fIancestors\fR: \fBpractcl::subproject\&.binary\fR
.PP
A subordinate TEA based binary package
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.LIBRARY"
\fIancestors\fR: \fBpractcl::subproject\&.binary\fR \fBpractcl::library\fR
.PP
A subordinate C library built by this project
.PP
\fBMethods\fR
.TP
method \fBinstall\fR \fIDEST\fR
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.EXTERNAL"
\fIancestors\fR: \fBpractcl::subproject\&.binary\fR
.PP
A subordinate external C library
.PP
\fBMethods\fR
.TP
method \fBinstall\fR \fIDEST\fR
.PP
.PP
.SS "CLASS  PRACTCL::SUBPROJECT\&.CORE"
\fIancestors\fR: \fBpractcl::subproject\&.binary\fR
.PP
.PP
\fBMethods\fR
.TP
method \fBenv-bootstrap\fR
.TP
method \fBenv-present\fR
.TP
method \fBenv-install\fR
.TP
method \fBgo\fR
.TP
method \fBlinktype\fR
.PP
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpractcl\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
practcl
.SH CATEGORY
TclOO
.SH COPYRIGHT
.nf
Copyright (c) 2016-2018 Sean Woods <yoda@etoyoc\&.com>

.fi







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





<
<
<
<
<
<
<
<
<
<
<
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<

<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
|
<
<
<
<
<

<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<
<
<
<
<






|


272
273
274
275
276
277
278


























279
280


























281
































































































282




























283
284






























285
286










287














































































288








































289
290


































291
292


































293






































294




























































































295
296












297
298






299




































300
301
302
303
304












305
306
























































































































































307
308




















309






310







311









































312








































313


































314















315

316





317









318




















































































































































319
320




















321














































322































































323

































































































324




























































































325

326






























327









328
329












































































































330





331
332
































































333










































334
















335








336









337































































































































338
339
340
341
342
343
344
345








346
347
348
349
350
351
352
353
354
..
.BS
.SH NAME
practcl \- The Practcl Module
.SH SYNOPSIS
package require \fBTclOO  1\&.0\fR
.sp


























package require \fBpractcl  0\&.1\fR
.sp


























\fBCPUTS\fR \fIvarname\fR \fIbody\fR ?\fIbody\fR\&.\&.\&.?
































































































.sp




























\fBpractcl::_isdirectory\fR \fIpath\fR
.sp






























\fBpractcl::object\fR \fIparent\fR ?\fIkeyvaluelist\fR?
.sp










\fBpractcl::library\fR ?\fIkeyvaluelist\fR?














































































.sp








































\fBpractcl::exe\fR ?\fIkeyvaluelist\fR?
.sp


































\fBpractcl::product\fR \fIparent\fR ?\fIkeyvaluelist\fR?
.sp


































\fBpractcl::cheader\fR \fIparent\fR ?\fIkeyvaluelist\fR?






































.sp




























































































\fBpractcl::csource\fR \fIparent\fR ?\fIkeyvaluelist\fR?
.sp












\fBpractcl::module\fR \fIparent\fR ?\fIkeyvaluelist\fR?
.sp






\fBpractcl::submodule\fR \fIparent\fR ?\fIkeyvaluelist\fR?




































.sp
.BE
.SH DESCRIPTION
The Practcl module is a tool for integrating large modules for C API
Tcl code that requires custom Tcl types and TclOO objects\&.












.SH COMMANDS
.TP
























































































































































\fBCPUTS\fR \fIvarname\fR \fIbody\fR ?\fIbody\fR\&.\&.\&.?
Appends blocks of text to a buffer\&. This command tries to reduce the number




















of line breaks between bodies\&.






.TP







\fBpractcl::_isdirectory\fR \fIpath\fR









































Returns true if \fIpath\fR is a directory, using the test








































.PP


































.TP















\fBpractcl::object\fR \fIparent\fR ?\fIkeyvaluelist\fR?

A generic Practcl object





.TP









\fBpractcl::library\fR ?\fIkeyvaluelist\fR?




















































































































































A Practcl object representing a library container
.TP




















\fBpractcl::exe\fR ?\fIkeyvaluelist\fR?














































A Practcl object representing a wrapped executable































































.TP

































































































\fBpractcl::product\fR \fIparent\fR ?\fIkeyvaluelist\fR?




























































































A Practcl object representing a compiled product

.TP






























\fBpractcl::cheader\fR \fIparent\fR ?\fIkeyvaluelist\fR?









A Practcl object representing an externally generated c header
.TP












































































































\fBpractcl::csource\fR \fIparent\fR ?\fIkeyvaluelist\fR?





A Practcl object representing an externally generated c source file
.TP
































































\fBpractcl::module\fR \fIparent\fR ?\fIkeyvaluelist\fR?










































A Practcl object representing a dynamically generated C/H/Tcl suite
















.TP








\fBpractcl::submodule\fR \fIparent\fR ?\fIkeyvaluelist\fR?









A Practcl object representing a dynamically generated C/H/Tcl suite, subordinate to a module































































































































.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpractcl\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
practcl
.SH CATEGORY
TclOO
.SH COPYRIGHT
.nf
Copyright (c) 2016 Sean Woods <yoda@etoyoc\&.com>

.fi

Changes to idoc/man/files/modules/processman/processman.n.

348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIodie\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
odie, processman
.SH CATEGORY
System
.SH COPYRIGHT
.nf
Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>

.fi







<
<
<
<
<
<
<
<









348
349
350
351
352
353
354








355
356
357
358
359
360
361
362
363
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIodie\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
odie, processman
.SH CATEGORY
System
.SH COPYRIGHT
.nf
Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>

.fi

Changes to idoc/man/files/modules/profiler/profiler.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'profiler\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "profiler" n 0\&.5 tcllib "Tcl Profiler"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'profiler\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "profiler" n 0\&.3 tcllib "Tcl Profiler"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
..
.BS
.SH NAME
profiler \- Tcl source code profiler
.SH SYNOPSIS
package require \fBTcl  8\&.3\fR
.sp
package require \fBprofiler  ?0\&.5?\fR
.sp
\fB::profiler::init\fR
.sp
\fB::profiler::dump\fR \fIpattern\fR
.sp
\fB::profiler::print\fR ?\fIpattern\fR?
.sp
\fB::profiler::reset\fR ?\fIpattern\fR?
.sp
\fB::profiler::suspend\fR ?\fIpattern\fR?
.sp
\fB::profiler::resume\fR ?\fIpattern\fR?
.sp
\fB::profiler::new-disabled\fR
.sp
\fB::profiler::new-enabled\fR
.sp
\fB::profiler::sortFunctions\fR \fIkey\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBprofiler\fR package provides a simple Tcl source code
profiler\&.  It is a function-level profiler; that is, it collects only







|













<
<
<
<







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291




292
293
294
295
296
297
298
..
.BS
.SH NAME
profiler \- Tcl source code profiler
.SH SYNOPSIS
package require \fBTcl  8\&.3\fR
.sp
package require \fBprofiler  ?0\&.3?\fR
.sp
\fB::profiler::init\fR
.sp
\fB::profiler::dump\fR \fIpattern\fR
.sp
\fB::profiler::print\fR ?\fIpattern\fR?
.sp
\fB::profiler::reset\fR ?\fIpattern\fR?
.sp
\fB::profiler::suspend\fR ?\fIpattern\fR?
.sp
\fB::profiler::resume\fR ?\fIpattern\fR?
.sp




\fB::profiler::sortFunctions\fR \fIkey\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBprofiler\fR package provides a simple Tcl source code
profiler\&.  It is a function-level profiler; that is, it collects only
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
.TP
\fB::profiler::resume\fR ?\fIpattern\fR?
Resume profiling for all functions matching \fIpattern\fR\&.  If no
pattern is specified, profiling will be resumed for all functions\&.
This command should be invoked after suspending the profiler in the
code\&.
.TP
\fB::profiler::new-disabled\fR
Change the initial profiling state for new procedures\&. Invoking this
command disables profiling for all procedures created after this
command until \fBnew-enabled\fR is invoked\&. Activate profiling of
specific procedures via \fBresume\fR\&.
.TP
\fB::profiler::new-enabled\fR
Change the initial profiling state for new procedures\&. Invoking this
command enables profiling for all procedures created after this
command until \fBnew-disabled\fR is invoked\&. Prevent profiling of
specific procedures via \fBsuspend\fR\&.
.TP
\fB::profiler::sortFunctions\fR \fIkey\fR
Return a list of functions sorted by a particular profiling statistic\&.
Supported values for \fIkey\fR are: \fBcalls\fR,
\fBexclusiveTime\fR, \fBcompileTime\fR, \fBnonCompileTime\fR,
\fBtotalRuntime\fR, \fBavgExclusiveTime\fR, and
\fBavgRuntime\fR\&.  The return result is a list of lists, where each
sublist consists of a function name and the value of \fIkey\fR for
that function\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIprofiler\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
performance, profile, speed
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<
<
<
<
<
















<
<
<
<
<
<
<
<




361
362
363
364
365
366
367












368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383








384
385
386
387
.TP
\fB::profiler::resume\fR ?\fIpattern\fR?
Resume profiling for all functions matching \fIpattern\fR\&.  If no
pattern is specified, profiling will be resumed for all functions\&.
This command should be invoked after suspending the profiler in the
code\&.
.TP












\fB::profiler::sortFunctions\fR \fIkey\fR
Return a list of functions sorted by a particular profiling statistic\&.
Supported values for \fIkey\fR are: \fBcalls\fR,
\fBexclusiveTime\fR, \fBcompileTime\fR, \fBnonCompileTime\fR,
\fBtotalRuntime\fR, \fBavgExclusiveTime\fR, and
\fBavgRuntime\fR\&.  The return result is a list of lists, where each
sublist consists of a function name and the value of \fIkey\fR for
that function\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIprofiler\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
performance, profile, speed
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/pt/pt_astree.n.

546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









546
547
548
549
550
551
552








553
554
555
556
557
558
559
560
561
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_cparam_config_critcl.n.

318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









318
319
320
321
322
323
324








325
326
327
328
329
330
331
332
333
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_cparam_config_tea.n.

318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









318
319
320
321
322
323
324








325
326
327
328
329
330
331
332
333
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_from_api.n.

755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









755
756
757
758
759
760
761








762
763
764
765
766
767
768
769
770
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_introduction.n.

427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









427
428
429
430
431
432
433








434
435
436
437
438
439
440
441
442
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_json_language.n.

748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









748
749
750
751
752
753
754








755
756
757
758
759
760
761
762
763
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_param.n.

773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer, virtual machine
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









773
774
775
776
777
778
779








780
781
782
783
784
785
786
787
788
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer, virtual machine
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_parse_peg.n.

373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









373
374
375
376
377
378
379








380
381
382
383
384
385
386
387
388
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_parser_api.n.

703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









703
704
705
706
707
708
709








710
711
712
713
714
715
716
717
718
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_container.n.

936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









936
937
938
939
940
941
942








943
944
945
946
947
948
949
950
951
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_container_peg.n.

301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









301
302
303
304
305
306
307








308
309
310
311
312
313
314
315
316
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_export.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pt_peg_export\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "pt::peg::export" n 1\&.0\&.1 tcllib "Parser Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pt_peg_export\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "pt::peg::export" n 1 tcllib "Parser Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
.SH NAME
pt::peg::export \- PEG Export
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBsnit \fR
.sp
package require \fBstruct::map \fR
.sp
package require \fBpt::peg \fR
.sp
package require \fBpluginmgr \fR
.sp
package require \fBpt::peg::export  ?1\&.0\&.1?\fR
.sp
\fB::pt::peg::export\fR \fIobjectName\fR
.sp
\fBobjectName\fR \fBmethod\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fIobjectName\fR \fBdestroy\fR
.sp







|





|







274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
.SH NAME
pt::peg::export \- PEG Export
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBsnit \fR
.sp
package require \fBconfiguration \fR
.sp
package require \fBpt::peg \fR
.sp
package require \fBpluginmgr \fR
.sp
package require \fBpt::peg::export  ?1?\fR
.sp
\fB::pt::peg::export\fR \fIobjectName\fR
.sp
\fBobjectName\fR \fBmethod\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fIobjectName\fR \fBdestroy\fR
.sp
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









757
758
759
760
761
762
763








764
765
766
767
768
769
770
771
772
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_export_container.n.

757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
CONTAINER, EBNF, LL(k), PEG, TDPL, context-free languages, export, expression, grammar, matching, parser, parsing expression, parsing expression grammar, plugin, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









757
758
759
760
761
762
763








764
765
766
767
768
769
770
771
772
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
CONTAINER, EBNF, LL(k), PEG, TDPL, context-free languages, export, expression, grammar, matching, parser, parsing expression, parsing expression grammar, plugin, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_export_json.n.

816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, JSON, LL(k), PEG, TDPL, context-free languages, export, expression, grammar, matching, parser, parsing expression, parsing expression grammar, plugin, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









816
817
818
819
820
821
822








823
824
825
826
827
828
829
830
831
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, JSON, LL(k), PEG, TDPL, context-free languages, export, expression, grammar, matching, parser, parsing expression, parsing expression grammar, plugin, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_export_peg.n.

808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, export, expression, grammar, matching, parser, parsing expression, parsing expression grammar, plugin, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









808
809
810
811
812
813
814








815
816
817
818
819
820
821
822
823
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, export, expression, grammar, matching, parser, parsing expression, parsing expression grammar, plugin, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_from_container.n.

295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









295
296
297
298
299
300
301








302
303
304
305
306
307
308
309
310
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_from_json.n.

782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, JSON, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









782
783
784
785
786
787
788








789
790
791
792
793
794
795
796
797
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, JSON, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_from_peg.n.

758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









758
759
760
761
762
763
764








765
766
767
768
769
770
771
772
773
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_import.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pt_peg_import\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "pt::peg::import" n 1\&.0\&.1 tcllib "Parser Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pt_peg_import\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "pt::peg::import" n 1 tcllib "Parser Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
..
.BS
.SH NAME
pt::peg::import \- PEG Import
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTcl  8\&.5\fR
.sp
package require \fBsnit \fR
.sp
package require \fBfileutil::paths \fR
.sp
package require \fBpt::peg \fR
.sp
package require \fBpluginmgr \fR
.sp
package require \fBpt::peg::import  ?1\&.0\&.1?\fR
.sp
\fB::pt::peg::import\fR \fIobjectName\fR
.sp
\fBobjectName\fR \fBmethod\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fIobjectName\fR \fBdestroy\fR
.sp







|

|
<
<





|







272
273
274
275
276
277
278
279
280
281


282
283
284
285
286
287
288
289
290
291
292
293
294
..
.BS
.SH NAME
pt::peg::import \- PEG Import
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBsnit \fR
.sp
package require \fBconfiguration \fR


.sp
package require \fBpt::peg \fR
.sp
package require \fBpluginmgr \fR
.sp
package require \fBpt::peg::import  ?1?\fR
.sp
\fB::pt::peg::import\fR \fIobjectName\fR
.sp
\fBobjectName\fR \fBmethod\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fIobjectName\fR \fBdestroy\fR
.sp
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









777
778
779
780
781
782
783








784
785
786
787
788
789
790
791
792
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_import_container.n.

295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









295
296
297
298
299
300
301








302
303
304
305
306
307
308
309
310
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_import_json.n.

791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, JSON, LL(k), PEG, TDPL, context-free languages, expression, grammar, import, matching, parser, parsing expression, parsing expression grammar, plugin, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









791
792
793
794
795
796
797








798
799
800
801
802
803
804
805
806
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, JSON, LL(k), PEG, TDPL, context-free languages, expression, grammar, import, matching, parser, parsing expression, parsing expression grammar, plugin, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_import_peg.n.

771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, import, matching, parser, parsing expression, parsing expression grammar, plugin, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









771
772
773
774
775
776
777








778
779
780
781
782
783
784
785
786
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, import, matching, parser, parsing expression, parsing expression grammar, plugin, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_interp.n.

695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









695
696
697
698
699
700
701








702
703
704
705
706
707
708
709
710
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_introduction.n.

425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









425
426
427
428
429
430
431








432
433
434
435
436
437
438
439
440
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_language.n.

739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









739
740
741
742
743
744
745








746
747
748
749
750
751
752
753
754
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_op.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pt_peg_op\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "pt_peg_op" i 1\&.1\&.0 tcllib "Parser Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pt_peg_op\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "pt_peg_op" i 1\&.0\&.1 tcllib "Parser Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
pt_peg_op \- Parser Tools PE Grammar Utility Operations
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBpt::peg::op  ?1\&.1\&.0?\fR
.sp
\fB::peg::peg::op\fR \fBcalled\fR \fIcontainer\fR
.sp
\fB::peg::peg::op\fR \fBdechain\fR \fIcontainer\fR
.sp
\fB::peg::peg::op\fR \fBdrop unreachable\fR \fIcontainer\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
pt_peg_op \- Parser Tools PE Grammar Utility Operations
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBpt::peg::op  1\&.0\&.1\fR
.sp
\fB::peg::peg::op\fR \fBcalled\fR \fIcontainer\fR
.sp
\fB::peg::peg::op\fR \fBdechain\fR \fIcontainer\fR
.sp
\fB::peg::peg::op\fR \fBdrop unreachable\fR \fIcontainer\fR
.sp
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









458
459
460
461
462
463
464








465
466
467
468
469
470
471
472
473
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_to_container.n.

780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
CONTAINER, EBNF, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









780
781
782
783
784
785
786








787
788
789
790
791
792
793
794
795
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
CONTAINER, EBNF, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_to_cparam.n.

812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
CPARAM, EBNF, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









812
813
814
815
816
817
818








819
820
821
822
823
824
825
826
827
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
CPARAM, EBNF, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_to_json.n.

844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, JSON, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









844
845
846
847
848
849
850








851
852
853
854
855
856
857
858
859
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, JSON, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_to_param.n.

1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PARAM, PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









1478
1479
1480
1481
1482
1483
1484








1485
1486
1487
1488
1489
1490
1491
1492
1493
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PARAM, PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_to_peg.n.

830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









830
831
832
833
834
835
836








837
838
839
840
841
842
843
844
845
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_peg_to_tclparam.n.

784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TCLPARAM, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









784
785
786
787
788
789
790








791
792
793
794
795
796
797
798
799
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TCLPARAM, TDPL, context-free languages, conversion, expression, format conversion, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, serialization, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_pegrammar.n.

694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









694
695
696
697
698
699
700








701
702
703
704
705
706
707
708
709
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_pexpr_op.n.

525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









525
526
527
528
529
530
531








532
533
534
535
536
537
538
539
540
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_pexpression.n.

720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









720
721
722
723
724
725
726








727
728
729
730
731
732
733
734
735
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_pgen.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pt_pgen\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "pt::pgen" n 1\&.1 tcllib "Parser Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pt_pgen\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "pt::pgen" n 1\&.0\&.2 tcllib "Parser Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
pt::pgen \- Parser Generator
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBpt::pgen  ?1\&.1?\fR
.sp
\fB::pt::pgen\fR \fIinputformat\fR \fItext\fR \fIresultformat\fR ?\fIoptions\&.\&.\&.\fR?
.sp
.BE
.SH DESCRIPTION
.PP
Are you lost ?







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
pt::pgen \- Parser Generator
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBpt::pgen  ?1\&.0\&.2?\fR
.sp
\fB::pt::pgen\fR \fIinputformat\fR \fItext\fR \fIresultformat\fR ?\fIoptions\&.\&.\&.\fR?
.sp
.BE
.SH DESCRIPTION
.PP
Are you lost ?
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









486
487
488
489
490
491
492








493
494
495
496
497
498
499
500
501
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_rdengine.n.

1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









1285
1286
1287
1288
1289
1290
1291








1292
1293
1294
1295
1296
1297
1298
1299
1300
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_tclparam_config_nx.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pt_tclparam_config_nx\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "pt::tclparam::configuration::nx" n 1\&.0\&.1 tcllib "Parser Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'pt_tclparam_config_nx\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "pt::tclparam::configuration::nx" n 1\&.0\&.0 tcllib "Parser Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
pt::tclparam::configuration::nx \- Tcl/PARAM, Canned configuration, NX
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBpt::tclparam::configuration::nx  ?1\&.0\&.1?\fR
.sp
\fB::pt::tclparam::configuration::nx\fR \fBdef\fR \fIname\fR \fIpkg\fR \fIversion\fR \fIcmdprefix\fR
.sp
.BE
.SH DESCRIPTION
.PP
Are you lost ?







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
pt::tclparam::configuration::nx \- Tcl/PARAM, Canned configuration, NX
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBpt::tclparam::configuration::nx  ?1\&.0\&.0?\fR
.sp
\fB::pt::tclparam::configuration::nx\fR \fBdef\fR \fIname\fR \fIpkg\fR \fIversion\fR \fIcmdprefix\fR
.sp
.BE
.SH DESCRIPTION
.PP
Are you lost ?
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









318
319
320
321
322
323
324








325
326
327
328
329
330
331
332
333
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_tclparam_config_snit.n.

318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









318
319
320
321
322
323
324








325
326
327
328
329
330
331
332
333
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_tclparam_config_tcloo.n.

318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









318
319
320
321
322
323
324








325
326
327
328
329
330
331
332
333
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_to_api.n.

771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









771
772
773
774
775
776
777








778
779
780
781
782
783
784
785
786
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/pt/pt_util.n.

326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









326
327
328
329
330
331
332








333
334
335
336
337
338
339
340
341
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIpt\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
EBNF, LL(k), PEG, TDPL, context-free languages, expression, grammar, matching, parser, parsing expression, parsing expression grammar, push down automaton, recursive descent, state, top-down parsing languages, transducer
.SH CATEGORY
Parsing and Grammars
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/rc4/rc4.n.

368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIrc4\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
aes(n), blowfish(n), des(n)
.SH KEYWORDS
arcfour, data integrity, encryption, rc4, security, stream cipher
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











368
369
370
371
372
373
374








375
376
377
378
379
380
381
382
383
384
385
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIrc4\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
aes(n), blowfish(n), des(n)
.SH KEYWORDS
arcfour, data integrity, encryption, rc4, security, stream cipher
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2003, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/rcs/rcs.n.

533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIrcs\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
struct, textutil
.SH KEYWORDS
CVS, RCS, RCS patch, SCCS, diff -n format, patching, text conversion, text differences
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2005, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2005, Colin McCormack <coldstore@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<












533
534
535
536
537
538
539








540
541
542
543
544
545
546
547
548
549
550
551
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIrcs\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
struct, textutil
.SH KEYWORDS
CVS, RCS, RCS patch, SCCS, diff -n format, patching, text conversion, text differences
.SH CATEGORY
Text processing
.SH COPYRIGHT
.nf
Copyright (c) 2005, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2005, Colin McCormack <coldstore@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/report/report.n.

684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIreport\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
matrix, report, table
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









684
685
686
687
688
689
690








691
692
693
694
695
696
697
698
699
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIreport\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
matrix, report, table
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002-2014 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/rest/rest.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'rest\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "rest" n 1\&.3\&.1 tcllib "A framework for RESTful web services"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'rest\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "rest" n 1\&.2 tcllib "A framework for RESTful web services"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
..
.BS
.SH NAME
rest \- define REST web APIs and call them inline or asychronously
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBrest  ?1\&.3\&.1?\fR
.sp
\fB::rest::simple\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::get\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::post\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::patch\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::head\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::put\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::delete\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::save\fR \fIname\fR \fIfile\fR







|







<
<







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285


286
287
288
289
290
291
292
..
.BS
.SH NAME
rest \- define REST web APIs and call them inline or asychronously
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBrest  ?1\&.2?\fR
.sp
\fB::rest::simple\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::get\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::post\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp


\fB::rest::head\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::put\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::delete\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
\fB::rest::save\fR \fIname\fR \fIfile\fR
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
.TP
\fB::rest::simple\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP
\fB::rest::get\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP
\fB::rest::post\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP
\fB::rest::patch\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP
\fB::rest::head\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP
\fB::rest::put\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP
\fB::rest::delete\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
These commands are all equivalent except for the http method







<
<







320
321
322
323
324
325
326


327
328
329
330
331
332
333
.TP
\fB::rest::simple\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP
\fB::rest::get\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP
\fB::rest::post\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP


\fB::rest::head\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP
\fB::rest::put\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.TP
\fB::rest::delete\fR \fIurl\fR \fIquery\fR ?\fIconfig\fR? ?\fIbody\fR?
.sp
These commands are all equivalent except for the http method
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809


    package require tls
    http::register https 443 ::tls::socket

.CE
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







789
790
791
792
793
794
795

796
797
798
799
800
801
802
803
804


    package require tls
    http::register https 443 ::tls::socket

.CE
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIrest\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.







<
<
<
<
<
<
<
<
822
823
824
825
826
827
828








.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIrest\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








Changes to idoc/man/files/modules/ripemd/ripemd128.n.

429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIripemd\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
md4, md5, ripemd160, sha1
.SH KEYWORDS
RIPEMD, hashing, md4, message-digest, rfc 1320, rfc 1321, rfc 2104, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











429
430
431
432
433
434
435








436
437
438
439
440
441
442
443
444
445
446
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIripemd\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
md4, md5, ripemd160, sha1
.SH KEYWORDS
RIPEMD, hashing, md4, message-digest, rfc 1320, rfc 1321, rfc 2104, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/ripemd/ripemd160.n.

416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIripemd\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
md4, md5, ripemd128, sha1
.SH KEYWORDS
RIPEMD, hashing, md4, message-digest, rfc 1320, rfc 1321, rfc 2104, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











416
417
418
419
420
421
422








423
424
425
426
427
428
429
430
431
432
433
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIripemd\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
md4, md5, ripemd128, sha1
.SH KEYWORDS
RIPEMD, hashing, md4, message-digest, rfc 1320, rfc 1321, rfc 2104, security
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/sasl/gtoken.n.

283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
.PP
This package provides the XGoogleToken authentication mechanism for
the Simple Authentication and Security Layer (SASL)\&.
.PP
Please read the documentation for package \fBsasl\fR
for details\&.
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







283
284
285
286
287
288
289

290
291
292
293
294
295
296
297
298
.PP
This package provides the XGoogleToken authentication mechanism for
the Simple Authentication and Security Layer (SASL)\&.
.PP
Please read the documentation for package \fBsasl\fR
for details\&.
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsasl\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
SASL, XGoogleToken, authentication
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2006, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









318
319
320
321
322
323
324








325
326
327
328
329
330
331
332
333
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsasl\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
SASL, XGoogleToken, authentication
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2006, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/sasl/ntlm.n.

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsasl\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
NTLM, SASL, authentication
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2005-2006, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









297
298
299
300
301
302
303








304
305
306
307
308
309
310
311
312
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsasl\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
NTLM, SASL, authentication
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2005-2006, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/sasl/sasl.n.

563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsasl\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
SASL, authentication
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2005-2006, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









563
564
565
566
567
568
569








570
571
572
573
574
575
576
577
578
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsasl\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
SASL, authentication
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2005-2006, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/sasl/scram.n.

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsasl\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
SASL, SCRAM, authentication
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2013 Sergei Golovan <sgolovan@nes\&.ru>

.fi







<
<
<
<
<
<
<
<









297
298
299
300
301
302
303








304
305
306
307
308
309
310
311
312
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsasl\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
SASL, SCRAM, authentication
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2013 Sergei Golovan <sgolovan@nes\&.ru>

.fi

Changes to idoc/man/files/modules/sha1/sha1.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'sha1\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "sha1" n 2\&.0\&.4 tcllib "SHA-x Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'sha1\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "sha1" n 2\&.0\&.3 tcllib "SHA-x Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
sha1 \- SHA1 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBsha1  ?2\&.0\&.4?\fR
.sp
\fB::sha1::sha1\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha1::hmac\fR \fIkey\fR \fIstring\fR
.sp
\fB::sha1::hmac\fR ?\fB-hex|-bin\fR? \fB-key key\fR [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
sha1 \- SHA1 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBsha1  ?2\&.0\&.3?\fR
.sp
\fB::sha1::sha1\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha1::hmac\fR \fIkey\fR \fIstring\fR
.sp
\fB::sha1::hmac\fR ?\fB-hex|-bin\fR? \fB-key key\fR [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsha1\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
md4, md5, ripemd128, ripemd160
.SH KEYWORDS
FIPS 180-1, hashing, message-digest, rfc 2104, security, sha1
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











429
430
431
432
433
434
435








436
437
438
439
440
441
442
443
444
445
446
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsha1\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
md4, md5, ripemd128, ripemd160
.SH KEYWORDS
FIPS 180-1, hashing, message-digest, rfc 2104, security, sha1
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/sha1/sha256.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'sha256\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "sha256" n 1\&.0\&.4 tcllib "SHA-x Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'sha256\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "sha256" n 1\&.0\&.3 tcllib "SHA-x Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
sha256 \- SHA256 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBsha256  ?1\&.0\&.4?\fR
.sp
\fB::sha2::sha256\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha2::sha224\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha2::hmac\fR \fIkey\fR \fIstring\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
sha256 \- SHA256 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBsha256  ?1\&.0\&.3?\fR
.sp
\fB::sha2::sha256\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha2::sha224\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha2::hmac\fR \fIkey\fR \fIstring\fR
.sp
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsha1\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
md4, md5, ripemd128, ripemd160, sha1
.SH KEYWORDS
FIPS 180-1, hashing, message-digest, rfc 2104, security, sha256
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2008, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











442
443
444
445
446
447
448








449
450
451
452
453
454
455
456
457
458
459
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsha1\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
md4, md5, ripemd128, ripemd160, sha1
.SH KEYWORDS
FIPS 180-1, hashing, message-digest, rfc 2104, security, sha256
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2008, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/simulation/annealing.n.

Changes to idoc/man/files/modules/simulation/montecarlo.n.

Changes to idoc/man/files/modules/simulation/simulation_random.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'simulation_random\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>
'\"
.TH "simulation::random" n 0\&.4 tcllib "Tcl Simulation Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'simulation_random\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004 Arjen Markus <arjenmarkus@users\&.sourceforge\&.net>
'\"
.TH "simulation::random" n 0\&.1 tcllib "Tcl Simulation Tools"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
..
.BS
.SH NAME
simulation::random \- Pseudo-random number generators
.SH SYNOPSIS
package require \fBTcl  ?8\&.4?\fR
.sp
package require \fBsimulation::random  0\&.4\fR
.sp
\fB::simulation::random::prng_Bernoulli\fR \fIp\fR
.sp
\fB::simulation::random::prng_Discrete\fR \fIn\fR
.sp
\fB::simulation::random::prng_Poisson\fR \fIlambda\fR
.sp
\fB::simulation::random::prng_Uniform\fR \fImin\fR \fImax\fR
.sp
\fB::simulation::random::prng_Triangular\fR \fImin\fR \fImax\fR
.sp
\fB::simulation::random::prng_SymmTriangular\fR \fImin\fR \fImax\fR
.sp
\fB::simulation::random::prng_Exponential\fR \fImin\fR \fImean\fR
.sp
\fB::simulation::random::prng_Normal\fR \fImean\fR \fIstdev\fR
.sp
\fB::simulation::random::prng_Pareto\fR \fImin\fR \fIsteep\fR
.sp
\fB::simulation::random::prng_Gumbel\fR \fImin\fR \fIf\fR







|









<
<
<
<







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288




289
290
291
292
293
294
295
..
.BS
.SH NAME
simulation::random \- Pseudo-random number generators
.SH SYNOPSIS
package require \fBTcl  ?8\&.4?\fR
.sp
package require \fBsimulation::random  0\&.1\fR
.sp
\fB::simulation::random::prng_Bernoulli\fR \fIp\fR
.sp
\fB::simulation::random::prng_Discrete\fR \fIn\fR
.sp
\fB::simulation::random::prng_Poisson\fR \fIlambda\fR
.sp
\fB::simulation::random::prng_Uniform\fR \fImin\fR \fImax\fR
.sp




\fB::simulation::random::prng_Exponential\fR \fImin\fR \fImean\fR
.sp
\fB::simulation::random::prng_Normal\fR \fImean\fR \fIstdev\fR
.sp
\fB::simulation::random::prng_Pareto\fR \fImin\fR \fIsteep\fR
.sp
\fB::simulation::random::prng_Gumbel\fR \fImin\fR \fIf\fR
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
.PP
The package defines the following public procedures for \fIcontinuous\fR distributions:
.TP
\fB::simulation::random::prng_Uniform\fR \fImin\fR \fImax\fR
Create a command (PRNG) that generates uniformly distributed numbers
between "min" and "max"\&.
.RS
.TP
float \fImin\fR
Minimum number that will be generated
.TP
float \fImax\fR
Maximum number that will be generated
.RE
.sp
.TP
\fB::simulation::random::prng_Triangular\fR \fImin\fR \fImax\fR
Create a command (PRNG) that generates triangularly distributed numbers
between "min" and "max"\&. If the argument min is lower than the argument max, then smaller
values have higher probability and vice versa\&. In the first case the probability
density function is of the form \fIf(x) = 2(1-x)\fR and the other case it is of the form \fIf(x) = 2x\fR\&.
.RS
.TP
float \fImin\fR
Minimum number that will be generated
.TP
float \fImax\fR
Maximum number that will be generated
.RE
.sp
.TP
\fB::simulation::random::prng_SymmTriangular\fR \fImin\fR \fImax\fR
Create a command (PRNG) that generates numbers distributed according to a symmetric triangle
around the mean of "min" and "max"\&.
.RS
.TP
float \fImin\fR
Minimum number that will be generated
.TP
float \fImax\fR
Maximum number that will be generated
.RE







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







362
363
364
365
366
367
368




























369
370
371
372
373
374
375
.PP
The package defines the following public procedures for \fIcontinuous\fR distributions:
.TP
\fB::simulation::random::prng_Uniform\fR \fImin\fR \fImax\fR
Create a command (PRNG) that generates uniformly distributed numbers
between "min" and "max"\&.
.RS




























.TP
float \fImin\fR
Minimum number that will be generated
.TP
float \fImax\fR
Maximum number that will be generated
.RE

Changes to idoc/man/files/modules/smtpd/smtpd.n.

310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
.PP
In short, this code should probably not be used as a permanently
running Mail Transfer Agent on an Internet connected server, even
though we are careful not to evaluate remote user input\&. There are
many other well tested and security audited programs that can be used
as mail servers for internet connected hosts\&.
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







310
311
312
313
314
315
316

317
318
319
320
321
322
323
324
325
.PP
In short, this code should probably not be used as a permanently
running Mail Transfer Agent on an Internet connected server, even
though we are careful not to evaluate remote user input\&. There are
many other well tested and security audited programs that can be used
as mail servers for internet connected hosts\&.
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
480
481
482
483
484
485
486

487
488
489
490
491
492
493
\fBvalidate_recipient\fR callback
The validate_recipient callback is similar to the validate_sender
callback and permits you to verify a local mailbox and accept mail for
a local user address during RCPT command handling\&. To reject mail,
throw an error as above\&. The error message is ignored\&.
.TP
\fBdeliverMIME\fR callback

The deliverMIME callback is called once a mail message has been
successfully passed to the server\&. A mime token is constructed from
the sender, recipients and data and the users procedure it called with
this single argument\&. When the call returns, the mime token is cleaned
up so if the user wishes to preserve the data she must make a copy\&.
.sp
.CS







>







479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
\fBvalidate_recipient\fR callback
The validate_recipient callback is similar to the validate_sender
callback and permits you to verify a local mailbox and accept mail for
a local user address during RCPT command handling\&. To reject mail,
throw an error as above\&. The error message is ignored\&.
.TP
\fBdeliverMIME\fR callback
]
The deliverMIME callback is called once a mail message has been
successfully passed to the server\&. A mime token is constructed from
the sender, recipients and data and the users procedure it called with
this single argument\&. When the call returns, the mime token is cleaned
up so if the user wishes to preserve the data she must make a copy\&.
.sp
.CS
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsmtpd\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
rfc 2821, rfc 821, services, smtp, smtpd, socket, vwait
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









539
540
541
542
543
544
545








546
547
548
549
550
551
552
553
554
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsmtpd\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
rfc 2821, rfc 821, services, smtp, smtpd, socket, vwait
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/snit/snit.n.

2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsnit\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
BWidget, C++, Incr Tcl, Snit, adaptors, class, mega widget, object, object oriented, type, widget, widget adaptors
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2009, by William H\&. Duquette

.fi







<
<
<
<
<
<
<
<









2861
2862
2863
2864
2865
2866
2867








2868
2869
2870
2871
2872
2873
2874
2875
2876
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsnit\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
BWidget, C++, Incr Tcl, Snit, adaptors, class, mega widget, object, object oriented, type, widget, widget adaptors
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2009, by William H\&. Duquette

.fi

Changes to idoc/man/files/modules/snit/snitfaq.n.

3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsnit\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
BWidget, C++, Incr Tcl, adaptors, class, mega widget, object, object oriented, widget, widget adaptors
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2006, by William H\&. Duquette

.fi







<
<
<
<
<
<
<
<









3800
3801
3802
3803
3804
3805
3806








3807
3808
3809
3810
3811
3812
3813
3814
3815
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsnit\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
BWidget, C++, Incr Tcl, adaptors, class, mega widget, object, object oriented, widget, widget adaptors
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2003-2006, by William H\&. Duquette

.fi

Changes to idoc/man/files/modules/soundex/soundex.n.

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsoundex\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
knuth, soundex, text comparison, text likeness
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) ????, Algorithm: Donald E\&. Knuth
Copyright (c) 2003, Documentation: Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 1998, Tcl port: Evan Rempel <erempel@uvic\&.ca>

.fi







<
<
<
<
<
<
<
<











307
308
309
310
311
312
313








314
315
316
317
318
319
320
321
322
323
324
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIsoundex\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
knuth, soundex, text comparison, text likeness
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) ????, Algorithm: Donald E\&. Knuth
Copyright (c) 2003, Documentation: Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 1998, Tcl port: Evan Rempel <erempel@uvic\&.ca>

.fi

Changes to idoc/man/files/modules/stooop/stooop.n.

468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstooop\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
C++, class, object, object oriented
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<




468
469
470
471
472
473
474








475
476
477
478
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstooop\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
C++, class, object, object oriented
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/stooop/switched.n.

502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
the validity of the value passed to the \fBset-\fBoption\fR\fR
procedure, which should throw an error (for example by using the Tcl
error command) if the value is invalid\&.
.sp
The switched layer also keeps track of the options current
values, so that a \fBset-\fBoption\fR\fR procedure is called
only when the corresponding option value passed as parameter is
different from the current value (see \fB-option\fR data members
description)\&.
.TP
\fB-option\fR
.sp
The \fB-option\fR data member is an options current value\&.
There is one for each option listed in the options procedure\&. It is a
read-only value which the switched layer checks against when an option
is changed\&.
It is rarely used at the layer derived from switched, except in the
few cases, such as in the following example:
.sp
.CS







|


<

|







502
503
504
505
506
507
508
509
510
511

512
513
514
515
516
517
518
519
520
the validity of the value passed to the \fBset-\fBoption\fR\fR
procedure, which should throw an error (for example by using the Tcl
error command) if the value is invalid\&.
.sp
The switched layer also keeps track of the options current
values, so that a \fBset-\fBoption\fR\fR procedure is called
only when the corresponding option value passed as parameter is
different from the current value (see  data members
description)\&.
.TP

.sp
The  data member is an options current value\&.
There is one for each option listed in the options procedure\&. It is a
read-only value which the switched layer checks against when an option
is changed\&.
It is rarely used at the layer derived from switched, except in the
few cases, such as in the following example:
.sp
.CS
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556

.CE
.sp
In this case, the manufacturer's name is stored at the switched
layer level (this is why the set-manufacturer procedure has nothing to
do) and later retrieved in the printData procedure\&.
.TP
\fBcomplete\fR
.sp
The \fBcomplete\fR data member (not to be confused with the
\fBcomplete\fR procedure) is a boolean\&.
Its initial value is \fBfalse\fR and it is set to \fBtrue\fR at
the very end of the switched \fBcomplete\fR procedure\&.
It becomes useful when some options should be set at construction time
only and not dynamically, as the following example shows:
.sp
.CS








<

|
|







538
539
540
541
542
543
544

545
546
547
548
549
550
551
552
553
554

.CE
.sp
In this case, the manufacturer's name is stored at the switched
layer level (this is why the set-manufacturer procedure has nothing to
do) and later retrieved in the printData procedure\&.
.TP

.sp
The  data member (not to be confused with
the \fBcomplete\fR procedure) is a boolean\&.
Its initial value is \fBfalse\fR and it is set to \fBtrue\fR at
the very end of the switched \fBcomplete\fR procedure\&.
It becomes useful when some options should be set at construction time
only and not dynamically, as the following example shows:
.sp
.CS

567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstooop\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
C++, class, object, object oriented
.SH CATEGORY
Programming tools







<
<
<
<
<
<
<
<




565
566
567
568
569
570
571








572
573
574
575
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstooop\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
C++, class, object, object oriented
.SH CATEGORY
Programming tools

Changes to idoc/man/files/modules/string/token.n.

364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
lexing, regex, string, tokenization
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<




364
365
366
367
368
369
370








371
372
373
374
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
lexing, regex, string, tokenization
.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/string/token_shell.n.

388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
bash, lexing, parsing, shell, string, tokenization
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<




388
389
390
391
392
393
394








395
396
397
398
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
bash, lexing, parsing, shell, string, tokenization
.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/stringprep/stringprep.n.

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstringprep\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
unicode(n)
.SH KEYWORDS
stringprep, unicode
.SH COPYRIGHT
.nf
Copyright (c) 2007-2009, Sergei Golovan <sgolovan@nes\&.ru>

.fi







<
<
<
<
<
<
<
<









374
375
376
377
378
379
380








381
382
383
384
385
386
387
388
389
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstringprep\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
unicode(n)
.SH KEYWORDS
stringprep, unicode
.SH COPYRIGHT
.nf
Copyright (c) 2007-2009, Sergei Golovan <sgolovan@nes\&.ru>

.fi

Changes to idoc/man/files/modules/stringprep/stringprep_data.n.

289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstringprep\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
stringprep, unicode
.SH COPYRIGHT
.nf
Copyright (c) 2007-2009, Sergei Golovan <sgolovan@nes\&.ru>

.fi







<
<
<
<
<
<
<
<







289
290
291
292
293
294
295








296
297
298
299
300
301
302
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstringprep\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
stringprep, unicode
.SH COPYRIGHT
.nf
Copyright (c) 2007-2009, Sergei Golovan <sgolovan@nes\&.ru>

.fi

Changes to idoc/man/files/modules/stringprep/unicode.n.

342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstringprep\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
stringprep(n)
.SH KEYWORDS
normalization, unicode
.SH COPYRIGHT
.nf
Copyright (c) 2007, Sergei Golovan <sgolovan@nes\&.ru>

.fi







<
<
<
<
<
<
<
<









342
343
344
345
346
347
348








349
350
351
352
353
354
355
356
357
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstringprep\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
stringprep(n)
.SH KEYWORDS
normalization, unicode
.SH COPYRIGHT
.nf
Copyright (c) 2007, Sergei Golovan <sgolovan@nes\&.ru>

.fi

Changes to idoc/man/files/modules/stringprep/unicode_data.n.

289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstringprep\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
stringprep, unicode
.SH COPYRIGHT
.nf
Copyright (c) 2007, Sergei Golovan <sgolovan@nes\&.ru>

.fi







<
<
<
<
<
<
<
<







289
290
291
292
293
294
295








296
297
298
299
300
301
302
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstringprep\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
stringprep, unicode
.SH COPYRIGHT
.nf
Copyright (c) 2007, Sergei Golovan <sgolovan@nes\&.ru>

.fi

Changes to idoc/man/files/modules/struct/disjointset.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'disjointset\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "struct::disjointset" n 1\&.1 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'disjointset\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "struct::disjointset" n 1\&.0 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
.de MT
.QW ""
..
.BS
.SH NAME
struct::disjointset \- Disjoint set data structure
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBstruct::disjointset  ?1\&.1?\fR
.sp
\fB::struct::disjointset\fR \fIdisjointsetName\fR
.sp
\fIdisjointsetName\fR \fIoption\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fIdisjointsetName\fR \fBadd-element\fR \fIitem\fR
.sp
\fIdisjointsetName\fR \fBadd-partition\fR \fIelements\fR
.sp
\fIdisjointsetName\fR \fBpartitions\fR
.sp
\fIdisjointsetName\fR \fBnum-partitions\fR
.sp
\fIdisjointsetName\fR \fBequal\fR \fIa\fR \fIb\fR
.sp
\fIdisjointsetName\fR \fBmerge\fR \fIa\fR \fIb\fR
.sp
\fIdisjointsetName\fR \fBfind\fR \fIe\fR
.sp
\fIdisjointsetName\fR \fBexemplars\fR
.sp
\fIdisjointsetName\fR \fBfind-exemplar\fR \fIe\fR
.sp
\fIdisjointsetName\fR \fBdestroy\fR
.sp
.BE
.SH DESCRIPTION
.PP
This package provides \fIdisjoint sets\fR\&. An alternative name for
this kind of structure is \fImerge-find\fR\&.







|

|





<
<












<
<
<
<







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283


284
285
286
287
288
289
290
291
292
293
294
295




296
297
298
299
300
301
302
.de MT
.QW ""
..
.BS
.SH NAME
struct::disjointset \- Disjoint set data structure
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBstruct::disjointset  ?1\&.0?\fR
.sp
\fB::struct::disjointset\fR \fIdisjointsetName\fR
.sp
\fIdisjointsetName\fR \fIoption\fR ?\fIarg arg \&.\&.\&.\fR?
.sp


\fIdisjointsetName\fR \fBadd-partition\fR \fIelements\fR
.sp
\fIdisjointsetName\fR \fBpartitions\fR
.sp
\fIdisjointsetName\fR \fBnum-partitions\fR
.sp
\fIdisjointsetName\fR \fBequal\fR \fIa\fR \fIb\fR
.sp
\fIdisjointsetName\fR \fBmerge\fR \fIa\fR \fIb\fR
.sp
\fIdisjointsetName\fR \fBfind\fR \fIe\fR
.sp




\fIdisjointsetName\fR \fBdestroy\fR
.sp
.BE
.SH DESCRIPTION
.PP
This package provides \fIdisjoint sets\fR\&. An alternative name for
this kind of structure is \fImerge-find\fR\&.
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
.TP
\fIdisjointsetName\fR \fIoption\fR ?\fIarg arg \&.\&.\&.\fR?
The \fBoption\fR and the \fIarg\fRs determine the exact behavior of
the command\&. The following commands are possible for disjointset
objects:
.RE
.TP
\fIdisjointsetName\fR \fBadd-element\fR \fIitem\fR
Creates a new partition in the specified disjoint set, and fills it
with the single item \fIitem\fR\&.  The command maintains
the integrity of the disjoint set, i\&.e\&. it verifies that none of the
\fIelements\fR are already part of the disjoint set and throws an
error otherwise\&.
.sp
The result of this method is the empty string\&.
.sp
This method runs in constant time\&.
.TP
\fIdisjointsetName\fR \fBadd-partition\fR \fIelements\fR
Creates a new partition in specified disjoint set, and fills it with
the values found in the set of \fIelements\fR\&. The command maintains
the integrity of the disjoint set, i\&.e\&. it verifies that none of the
\fIelements\fR are already part of the disjoint set and throws an
error otherwise\&.
.sp
The result of the command is the empty string\&.
.sp
This method runs in time proportional to the size of \fIelements\fR]\&.
.TP
\fIdisjointsetName\fR \fBpartitions\fR
Returns the set of partitions the named disjoint set currently
consists of\&. The form of the result is a list of lists; the inner
lists contain the elements of the partitions\&.
.sp
This method runs in time O(N*alpha(N)),
where N is the number of elements in the disjoint set and alpha
is the inverse Ackermann function\&.
.TP
\fIdisjointsetName\fR \fBnum-partitions\fR
Returns the number of partitions the named disjoint set currently
consists of\&.
.sp
This method runs in constant time\&.
.TP
\fIdisjointsetName\fR \fBequal\fR \fIa\fR \fIb\fR
Determines if the two elements \fIa\fR and \fIb\fR of the disjoint set
belong to the same partition\&. The result of the method is a boolean
value, \fBTrue\fR if the two elements are contained in the same
partition, and \fBFalse\fR otherwise\&.
.sp
An error will be thrown if either \fIa\fR or \fIb\fR are not elements
of the disjoint set\&.
.sp
This method runs in amortized time O(alpha(N)), where N is the number of
elements in the larger partition and alpha is the inverse Ackermann function\&.
.TP
\fIdisjointsetName\fR \fBmerge\fR \fIa\fR \fIb\fR
Determines the partitions the elements \fIa\fR and \fIb\fR are
contained in and merges them into a single partition\&.  If the two
elements were already contained in the same partition nothing will
change\&.
.sp
The result of the method is the empty string\&.
.sp
This method runs in amortized time O(alpha(N)), where N is the number of
items in the larger of the partitions being merged\&. The worst case time
is O(N)\&.
.TP
\fIdisjointsetName\fR \fBfind\fR \fIe\fR
Returns a list of the members of the partition of the disjoint set
which contains the element
\fIe\fR\&.
.sp
This method runs in O(N*alpha(N)) time, where N is the total number of
items in the disjoint set and alpha is the inverse Ackermann function,
See \fBfind-exemplar\fR for a faster method, if all that is needed
is a unique identifier for the partition, rather than an enumeration
of all its elements\&.
.TP
\fIdisjointsetName\fR \fBexemplars\fR
Returns a list containing an exemplar of each partition in the disjoint
set\&. The exemplar is a member of the partition, chosen arbitrarily\&.
.sp
This method runs in O(N*alpha(N)) time, where N is the total number of items
in the disjoint set and alpha is the inverse Ackermann function\&.
.TP
\fIdisjointsetName\fR \fBfind-exemplar\fR \fIe\fR
Returns the exemplar of the partition of the disjoint set containing
the element \fIe\fR\&.  Throws an error if \fIe\fR is not found in the
disjoint set\&.  The exemplar is an arbitrarily chosen member of the partition\&.
The only operation that will change the exemplar of any partition is
\fBmerge\fR\&.
.sp
This method runs in O(alpha(N)) time, where N is the number of items in
the partition containing E, and alpha is the inverse Ackermann function\&.
.TP
\fIdisjointsetName\fR \fBdestroy\fR
Destroys the disjoint set object and all associated memory\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: disjointset\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
disjoint set, equivalence class, find, merge find, partition, partitioned set, union
.SH CATEGORY
Data structures







<
<
<
<
<
<
<
<
<
<
<








<
<



|
<
<
<
<
<




<
<









<
<
<








<
<
<
<


<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











<
<
<
<
<
<
<
<




364
365
366
367
368
369
370











371
372
373
374
375
376
377
378


379
380
381
382





383
384
385
386


387
388
389
390
391
392
393
394
395



396
397
398
399
400
401
402
403




404
405

406
407























408
409
410
411
412
413
414
415
416
417
418








419
420
421
422
.TP
\fIdisjointsetName\fR \fIoption\fR ?\fIarg arg \&.\&.\&.\fR?
The \fBoption\fR and the \fIarg\fRs determine the exact behavior of
the command\&. The following commands are possible for disjointset
objects:
.RE
.TP











\fIdisjointsetName\fR \fBadd-partition\fR \fIelements\fR
Creates a new partition in specified disjoint set, and fills it with
the values found in the set of \fIelements\fR\&. The command maintains
the integrity of the disjoint set, i\&.e\&. it verifies that none of the
\fIelements\fR are already part of the disjoint set and throws an
error otherwise\&.
.sp
The result of the command is the empty string\&.


.TP
\fIdisjointsetName\fR \fBpartitions\fR
Returns the set of partitions the named disjoint set currently
consists of\&.





.TP
\fIdisjointsetName\fR \fBnum-partitions\fR
Returns the number of partitions the named disjoint set currently
consists of\&.


.TP
\fIdisjointsetName\fR \fBequal\fR \fIa\fR \fIb\fR
Determines if the two elements \fIa\fR and \fIb\fR of the disjoint set
belong to the same partition\&. The result of the method is a boolean
value, \fBTrue\fR if the two elements are contained in the same
partition, and \fBFalse\fR otherwise\&.
.sp
An error will be thrown if either \fIa\fR or \fIb\fR are not elements
of the disjoint set\&.



.TP
\fIdisjointsetName\fR \fBmerge\fR \fIa\fR \fIb\fR
Determines the partitions the elements \fIa\fR and \fIb\fR are
contained in and merges them into a single partition\&.  If the two
elements were already contained in the same partition nothing will
change\&.
.sp
The result of the method is the empty string\&.




.TP
\fIdisjointsetName\fR \fBfind\fR \fIe\fR

Returns the partition of the disjoint set which contains the element
\fIe\fR\&.























.TP
\fIdisjointsetName\fR \fBdestroy\fR
Destroys the disjoint set object and all associated memory\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: disjointset\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
disjoint set, equivalence class, find, merge find, partition, partitioned set, union
.SH CATEGORY
Data structures

Changes to idoc/man/files/modules/struct/graph.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'graph\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002-2009,2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "struct::graph" n 2\&.4\&.3 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'graph\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "struct::graph" n 2\&.4 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
struct::graph \- Create and manipulate directed graph objects
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBstruct::graph  ?2\&.4\&.3?\fR
.sp
package require \fBstruct::list  ?1\&.5?\fR
.sp
package require \fBstruct::set  ?2\&.2\&.3?\fR
.sp
\fB::struct::graph\fR ?\fIgraphName\fR? ?\fB=\fR|\fB:=\fR|\fBas\fR|\fBdeserialize\fR \fIsource\fR?
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
struct::graph \- Create and manipulate directed graph objects
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBstruct::graph  ?2\&.4?\fR
.sp
package require \fBstruct::list  ?1\&.5?\fR
.sp
package require \fBstruct::set  ?2\&.2\&.3?\fR
.sp
\fB::struct::graph\fR ?\fIgraphName\fR? ?\fB=\fR|\fB:=\fR|\fBas\fR|\fBdeserialize\fR \fIsource\fR?
.sp
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
of returned arcs based on the nodes that are connected by the arc, on
the keyed values associated with the arc, or both\&. A general filter
command can be used as well\&. The restrictions that involve connected
nodes take a variable number of nodes as argument, specified after the
name of the restriction itself\&.
.sp
The restrictions imposed by either \fB-in\fR, \fB-out\fR,
\fB-adj\fR, \fB-inner\fR, or \fB-embedding\fR are applied
first\&. Specifying more than one of them is illegal\&.
.sp
After that the restrictions set via \fB-key\fR (and
\fB-value\fR) are applied\&. Specifying more than one \fB-key\fR
(and \fB-value\fR) is illegal\&. Specifying \fB-value\fR alone,
without \fB-key\fR is illegal as well\&.
.sp







|







723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
of returned arcs based on the nodes that are connected by the arc, on
the keyed values associated with the arc, or both\&. A general filter
command can be used as well\&. The restrictions that involve connected
nodes take a variable number of nodes as argument, specified after the
name of the restriction itself\&.
.sp
The restrictions imposed by either \fB-in\fR, \fB-out\fR,
\fB-adj\fR, \fB-inner\fR, or \fB-embedded\fR are applied
first\&. Specifying more than one of them is illegal\&.
.sp
After that the restrictions set via \fB-key\fR (and
\fB-value\fR) are applied\&. Specifying more than one \fB-key\fR
(and \fB-value\fR) is illegal\&. Specifying \fB-value\fR alone,
without \fB-key\fR is illegal as well\&.
.sp
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
the set\&. This is the set of arcs in the subgraph spawned by the
specified nodes\&.
.TP
\fB-embedding\fR
Return a list of all arcs adjacent to exactly one of the nodes in the
set\&. This is the set of arcs connecting the subgraph spawned by the
specified nodes to the rest of the graph\&.
.RE
.IP
\fIAttention\fR: After the above options any word with a leading dash
which is not a valid option is treated as a node name instead of an
invalid option to error out on\&. This condition holds until either a
valid option terminates the list of nodes, or the end of the command
is reached, whichever comes first\&.
.sp
The remaining filter options are:
.sp
.RS
.TP
\fB-key\fR \fIkey\fR
Limit the list of arcs that are returned to those arcs that have an
associated key \fIkey\fR\&.
.TP
\fB-value\fR \fIvalue\fR
This restriction can only be used in combination with







<
<
<
<
<
<
<
<
<
<
<







762
763
764
765
766
767
768











769
770
771
772
773
774
775
the set\&. This is the set of arcs in the subgraph spawned by the
specified nodes\&.
.TP
\fB-embedding\fR
Return a list of all arcs adjacent to exactly one of the nodes in the
set\&. This is the set of arcs connecting the subgraph spawned by the
specified nodes to the rest of the graph\&.











.TP
\fB-key\fR \fIkey\fR
Limit the list of arcs that are returned to those arcs that have an
associated key \fIkey\fR\&.
.TP
\fB-value\fR \fIvalue\fR
This restriction can only be used in combination with
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
\fIgraphName\fR \fBnodes\fR ?-key \fIkey\fR? ?-value \fIvalue\fR? ?-filter \fIcmdprefix\fR? ?-in|-out|-adj|-inner|-embedding \fInode\fR \fInode\fR\&.\&.\&.?
Return a list of nodes in the graph\&. Restrictions can limit the list
of returned nodes based on neighboring nodes, or based on the keyed
values associated with the node\&. The restrictions that involve
neighboring nodes have a list of nodes as argument, specified after
the name of the restriction itself\&.
.sp
The possible restrictions are the same as for method \fBarcs\fR\&.
Note that while the exact meanings change slightly, as they operate on
nodes instead of arcs, the general behaviour is the same, especially
when it comes to the handling of words with a leading dash in node
lists\&.
.sp
The command recognizes:
.RS
.TP
\fB-in\fR
Return a list of all nodes with at least one outgoing arc ending in a
node found in the specified set of nodes\&. Alternatively specified as
the set of source nodes for the \fB-in\fR arcs of the node set\&. The
\fIincoming neighbours\fR\&.







|
|
<
<
<
<
|







892
893
894
895
896
897
898
899
900




901
902
903
904
905
906
907
908
\fIgraphName\fR \fBnodes\fR ?-key \fIkey\fR? ?-value \fIvalue\fR? ?-filter \fIcmdprefix\fR? ?-in|-out|-adj|-inner|-embedding \fInode\fR \fInode\fR\&.\&.\&.?
Return a list of nodes in the graph\&. Restrictions can limit the list
of returned nodes based on neighboring nodes, or based on the keyed
values associated with the node\&. The restrictions that involve
neighboring nodes have a list of nodes as argument, specified after
the name of the restriction itself\&.
.sp
The possible restrictions are the same as for method
\fBarcs\fR\&. The exact meanings change slightly, as they operate on




nodes instead of arcs\&. The command recognizes:
.RS
.TP
\fB-in\fR
Return a list of all nodes with at least one outgoing arc ending in a
node found in the specified set of nodes\&. Alternatively specified as
the set of source nodes for the \fB-in\fR arcs of the node set\&. The
\fIincoming neighbours\fR\&.
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
relevance, nor has the order of the arcs per node\&.
.CS


    # A possible serialization for the graph structure
    #
    #        d -----> %2
    #       /         ^ \\
    #      /         /   \\
    #     /         b     \\
    #    /         /       \\
    #  %1 <- a - %0         e
    #    ^         \\\\      /
    #     \\\\        c     /
    #      \\\\        \\\\  /
    #       \\\\        v v
    #        f ------ %3
    # is







|
|
|
|







1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
relevance, nor has the order of the arcs per node\&.
.CS


    # A possible serialization for the graph structure
    #
    #        d -----> %2
    #       /         ^ \\\\
    #      /         /   \\\\
    #     /         b     \\\\
    #    /         /       \\\\
    #  %1 <- a - %0         e
    #    ^         \\\\      /
    #     \\\\        c     /
    #      \\\\        \\\\  /
    #       \\\\        v v
    #        f ------ %3
    # is
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: graph\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
adjacent, arc, cgraph, degree, edge, graph, loop, neighbour, node, serialization, subgraph, vertex
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002-2009,2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


1146
1147
1148
1149
1150
1151
1152








1153
1154
1155
1156
1157
1158
1159
1160
1161
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: graph\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
adjacent, arc, cgraph, degree, edge, graph, loop, neighbour, node, serialization, subgraph, vertex
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/struct/graph1.n.

636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: graph\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
cgraph, graph
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









636
637
638
639
640
641
642








643
644
645
646
647
648
649
650
651
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: graph\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
cgraph, graph
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/struct/graphops.n.

272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
struct::graph::op \- Operation for (un)directed graph objects
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBstruct::graph::op  ?0\&.11\&.3?\fR
.sp
\fBstruct::graph::op::toAdjacencyMatrix\fR \fIg\fR
.sp
\fBstruct::graph::op::toAdjacencyList\fR \fIG\fR ?\fIoptions\fR\&.\&.\&.?
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.de MT
.QW ""
..
.BS
.SH NAME
struct::graph::op \- Operation for (un)directed graph objects
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBstruct::graph::op  ?0\&.11\&.3?\fR
.sp
\fBstruct::graph::op::toAdjacencyMatrix\fR \fIg\fR
.sp
\fBstruct::graph::op::toAdjacencyList\fR \fIG\fR ?\fIoptions\fR\&.\&.\&.?
.sp
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: graph\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
adjacency list, adjacency matrix, adjacent, approximation algorithm, arc, articulation point, augmenting network, augmenting path, bfs, bipartite, blocking flow, bridge, complete graph, connected component, cut edge, cut vertex, degree, degree constrained spanning tree, diameter, dijkstra, distance, eccentricity, edge, flow network, graph, heuristic, independent set, isthmus, level graph, local searching, loop, matching, max cut, maximum flow, minimal spanning tree, minimum cost flow, minimum degree spanning tree, minimum diameter spanning tree, neighbour, node, radius, residual graph, shortest path, squared graph, strongly connected component, subgraph, travelling salesman, vertex, vertex cover
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2008 Alejandro Paz <vidriloco@gmail\&.com>
Copyright (c) 2008 (docs) Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2009 Michal Antoniewski <antoniewski\&.m@gmail\&.com>

.fi







<
<
<
<
<
<
<
<











1491
1492
1493
1494
1495
1496
1497








1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: graph\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
adjacency list, adjacency matrix, adjacent, approximation algorithm, arc, articulation point, augmenting network, augmenting path, bfs, bipartite, blocking flow, bridge, complete graph, connected component, cut edge, cut vertex, degree, degree constrained spanning tree, diameter, dijkstra, distance, eccentricity, edge, flow network, graph, heuristic, independent set, isthmus, level graph, local searching, loop, matching, max cut, maximum flow, minimal spanning tree, minimum cost flow, minimum degree spanning tree, minimum diameter spanning tree, neighbour, node, radius, residual graph, shortest path, squared graph, strongly connected component, subgraph, travelling salesman, vertex, vertex cover
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2008 Alejandro Paz <vidriloco@gmail\&.com>
Copyright (c) 2008 (docs) Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
Copyright (c) 2009 Michal Antoniewski <antoniewski\&.m@gmail\&.com>

.fi

Changes to idoc/man/files/modules/struct/matrix.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'matrix\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002-2013,2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "struct::matrix" n 2\&.0\&.4 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'matrix\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002-2013 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "struct::matrix" n 2\&.0\&.3 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
struct::matrix \- Create and manipulate matrix objects
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBstruct::matrix  ?2\&.0\&.4?\fR
.sp
\fB::struct::matrix\fR ?\fImatrixName\fR? ?\fB=\fR|\fB:=\fR|\fBas\fR|\fBdeserialize\fR \fIsource\fR?
.sp
\fBmatrixName\fR \fIoption\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fImatrixName\fR \fB=\fR \fIsourcematrix\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
struct::matrix \- Create and manipulate matrix objects
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBstruct::matrix  ?2\&.0\&.3?\fR
.sp
\fB::struct::matrix\fR ?\fImatrixName\fR? ?\fB=\fR|\fB:=\fR|\fBas\fR|\fBdeserialize\fR \fIsource\fR?
.sp
\fBmatrixName\fR \fIoption\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fImatrixName\fR \fB=\fR \fIsourcematrix\fR
.sp
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: matrix\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
matrix
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002-2013,2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


832
833
834
835
836
837
838








839
840
841
842
843
844
845
846
847
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: matrix\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
matrix
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002-2013 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/struct/matrix1.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'matrix1\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002,2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "struct::matrix_v1" n 1\&.2\&.2 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'matrix1\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "struct::matrix_v1" n 1\&.2\&.1 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
struct::matrix_v1 \- Create and manipulate matrix objects
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBstruct::matrix  ?1\&.2\&.2?\fR
.sp
\fBmatrixName\fR \fIoption\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fImatrixName\fR \fBadd column\fR ?\fIvalues\fR?
.sp
\fImatrixName\fR \fBadd row\fR ?\fIvalues\fR?
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
struct::matrix_v1 \- Create and manipulate matrix objects
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBstruct::matrix  ?1\&.2\&.1?\fR
.sp
\fBmatrixName\fR \fIoption\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fImatrixName\fR \fBadd column\fR ?\fIvalues\fR?
.sp
\fImatrixName\fR \fBadd row\fR ?\fIvalues\fR?
.sp
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: matrix\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
matrix
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002,2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


668
669
670
671
672
673
674








675
676
677
678
679
680
681
682
683
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: matrix\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
matrix
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/struct/pool.n.

657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: pool\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
discrete items, finite, pool, struct
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002, Erik Leunissen <e\&.leunissen@hccnet\&.nl>

.fi







<
<
<
<
<
<
<
<









657
658
659
660
661
662
663








664
665
666
667
668
669
670
671
672
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: pool\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
discrete items, finite, pool, struct
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002, Erik Leunissen <e\&.leunissen@hccnet\&.nl>

.fi

Changes to idoc/man/files/modules/struct/prioqueue.n.

375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: prioqueue\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
ordered list, prioqueue, priority queue
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2003 Michael Schlenker <mic42@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









375
376
377
378
379
380
381








382
383
384
385
386
387
388
389
390
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: prioqueue\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
ordered list, prioqueue, priority queue
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2003 Michael Schlenker <mic42@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/struct/queue.n.

352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: queue\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
graph, list, matrix, pool, prioqueue, record, set, skiplist, stack, tree
.SH CATEGORY
Data structures







<
<
<
<
<
<
<
<




352
353
354
355
356
357
358








359
360
361
362
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: queue\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
graph, list, matrix, pool, prioqueue, record, set, skiplist, stack, tree
.SH CATEGORY
Data structures

Changes to idoc/man/files/modules/struct/record.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'record\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002, Brett Schwarz <brett_schwarz@yahoo\&.com>
'\"
.TH "struct::record" n 1\&.2\&.2 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'record\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2002, Brett Schwarz <brett_schwarz@yahoo\&.com>
'\"
.TH "struct::record" n 1\&.2\&.1 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325

326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355

356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403

404
405
406
407
408

409
410
411
412
413
414
415

416
417
418

419
420

421
422
423
424
425
426
427
428
429
430
431
432

433
434
435
436

437
438
439
440
441
442
443
444

445
446



447

448


449
450
451
452
453

454
455

456
457
458
459
460
461
462
463
464
465

466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508



509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562


563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
..
.BS
.SH NAME
struct::record \- Define and create records (similar to 'C' structures)
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBstruct::record  ?1\&.2\&.2?\fR
.sp
\fBrecord define\fR \fIrecordName\fR \fIrecordMembers\fR ?\fIinstanceName1 instanceName2 \&.\&.\&.\fR?
.sp
\fBrecord show\fR \fIrecord\fR
.sp
\fBrecord show\fR \fIinstances\fR \fIrecordName\fR
.sp
\fBrecord show\fR \fImembers\fR \fIrecordName\fR
.sp
\fBrecord show\fR \fIvalues\fR \fIinstanceName\fR
.sp
\fBrecord exists\fR \fIrecord\fR \fIrecordName\fR
.sp
\fBrecord exists\fR \fIinstance\fR \fIinstanceName\fR
.sp
\fBrecord delete\fR \fIrecord\fR \fIrecordName\fR
.sp
\fBrecord delete\fR \fIinstance\fR \fIinstanceName\fR
.sp
\fIinstanceName\fR \fBcget\fR -\fImember\fR
.sp
\fIinstanceName\fR \fBcget\fR -\fImember1\fR -\fImember2\fR
.sp
\fIinstanceName\fR \fBcget\fR
.sp
\fIinstanceName\fR \fBconfigure\fR
.sp
\fIinstanceName\fR
.sp
\fIinstanceName\fR \fBconfigure\fR -\fImember\fR \fIvalue\fR
.sp
\fIinstanceName\fR \fBconfigure\fR -\fImember1\fR \fIvalue1\fR -\fImember2\fR \fIvalue2\fR
.sp
\fIrecordName\fR \fIinstanceName\fR|\fB#auto\fR ?\fI-member1 value1 -member2 value2 \&.\&.\&.\fR?
.sp
\fIinstanceName\fR \fBcget\fR ?\fI-member1 -member2 \&.\&.\&.\fR?
.sp
\fIinstanceName\fR \fBconfigure\fR ?\fI-member1 value1 -member2 value2 \&.\&.\&.\fR?
.sp
.BE
.SH DESCRIPTION
The \fB::struct::record\fR package provides a mechanism to group
variables together as one data structure, similar to a \fIC\fR
structure\&. The members of a record can be variables or other
records\&. However, a record can not contain circular records,
i\&.e\&. records that contain the same record as a member\&.

.PP
This package was structured so that it is very similar to how
Tk objects work\&. Each record definition creates a record object that
encompasses that definition\&. Subsequently, that record object can
create instances of that record\&. These instances can then be
manipulated with the \fBcget\fR and \fBconfigure\fR methods\&.
.PP
The package only contains one top level command, but several
sub commands (see below)\&. It also obeys the namespace in which the
record was defined, hence the objects returned are fully qualified\&.
.TP
\fBrecord define\fR \fIrecordName\fR \fIrecordMembers\fR ?\fIinstanceName1 instanceName2 \&.\&.\&.\fR?
Defines a record\&. \fIrecordName\fR is the name of the record, and is
also used as an object command\&. This object command is used to create
instances of the record definition\&. The \fIrecordMembers\fR are the
members of the record that make up the record definition\&. These are
variables and other records\&. If optional \fIinstanceName\fR args are
specified, then an instance is generated after the definition is
created for each \fIinstanceName\fR\&.
.TP
\fBrecord show\fR \fIrecord\fR
Returns a list of records that have been defined\&.
.TP
\fBrecord show\fR \fIinstances\fR \fIrecordName\fR
Returns the instances that have been instantiated by
\fIrecordName\fR\&.
.TP
\fBrecord show\fR \fImembers\fR \fIrecordName\fR
Returns the members that are defined for record \fIrecordName\fR\&.
It returns the same format as how the records were defined\&.

.TP
\fBrecord show\fR \fIvalues\fR \fIinstanceName\fR
Returns a list of values that are set for the instance
\fIinstanceName\fR\&. The output is a list of key/value pairs\&. If there
are nested records, then the values of the nested records will
itself be a list\&.
.TP
\fBrecord exists\fR \fIrecord\fR \fIrecordName\fR
Tests for the existence of a \fIrecord\fR with the
name \fIrecordName\fR\&.
.TP
\fBrecord exists\fR \fIinstance\fR \fIinstanceName\fR
Tests for the existence of a \fIinstance\fR with the
name \fIinstanceName\fR\&.
.TP
\fBrecord delete\fR \fIrecord\fR \fIrecordName\fR
Deletes \fIrecordName\fR, and all instances of \fIrecordName\fR\&.
It will return an error if the record does not exist\&.
.TP
\fBrecord delete\fR \fIinstance\fR \fIinstanceName\fR
Deletes \fIinstance\fR with the name of \fIinstanceName\fR\&. It will
return an error if the instance does not exist\&. Note that this
recursively deletes any nested instances as well\&.
.PP
.SH "RECORD MEMBERS"
Record members can either be variables, or other records, However, the
same record can not be nested witin itself (circular)\&. To define a
nested record, you need to specify the \fBrecord\fR keyword, along
the with name of the record, and the name of the instance of that
nested record (within the container)\&. For example, it would look like
this:
.PP
.CS


# this is the nested record
record define mynestedrecord {
    nest1
    nest2
}

# This is the main record
record define myrecord {
    mem1
    mem2
    {record mynestedrecord mem3}
}


.CE
You can also assign default or initial values to the members of a
record, by enclosing the member entry in braces:
.PP
.CS



record define myrecord {
    mem1
    {mem2 5}
}


.CE
All instances created from this record definition will initially have
\fB5\fR as the value for member \fImem2\fR\&. If no default is given,

then the value will be the empty string\&.
.SS "GETTING VALUES"

To get a value of a member, there are several ways to do this\&.
.TP
\fIinstanceName\fR \fBcget\fR -\fImember\fR
In this form the built-in \fBcget\fR instance method returns the
value of the specified \fImember\fR\&. Note the leading dash\&.
.sp
To reach a nested member use \fIdot notation\fR:
.CS


\fIinstanceName\fR \fBcget\fR -mem3\&.nest1


.CE
.TP
\fIinstanceName\fR \fBcget\fR -\fImember1\fR -\fImember2\fR
In this form the built-in \fBcget\fR instance method returns a list

containing the values of both specified members, in the order of specification\&.
.TP
\fIinstanceName\fR \fBcget\fR
.TP
\fIinstanceName\fR \fBconfigure\fR
.TP
\fIinstanceName\fR
These forms are all equivalent\&. They return a dictionary of all

members and the associated values\&.
.PP



.SS "SETTING VALUES"

To set a value of a member, there are several ways to do this\&.


.TP
\fIinstanceName\fR \fBconfigure\fR -\fImember\fR \fIvalue\fR
In this form the built-in \fBconfigure\fR instance method sets the
specified \fImember\fR to the given \fIvalue\fR\&. Note the leading
dash\&.

.sp
To reach a nested member use \fIdot notation\fR:

.CS


\fIinstanceName\fR \fBconfigure\fR -mem3\&.nest1 value

.CE
.TP
\fIinstanceName\fR \fBconfigure\fR -\fImember1\fR \fIvalue1\fR -\fImember2\fR \fIvalue2\fR
In this form the built-in \fBconfigure\fR instance method sets all
specified members to the associated values\&.

.PP
.SS "ALIAS ACCESS"
In the original implementation, access was done by using dot notation
similar to how \fIC\fR structures are accessed\&. However, there was a
concensus to make the interface more Tcl like, which made sense\&.
However, the original alias access still exists\&. It might prove to be
helpful to some\&.
.PP
Basically, for every member of every instance, an alias is
created\&. This alias is used to get and set values for that member\&.
An example will illustrate the point, using the above defined records:
.PP
.CS


% # Create an instance first
% myrecord inst1
::inst1

% # To get a member of an instance, just use the alias\&. It behaves
% # like a Tcl command:
% inst1\&.mem1

% # To set a member via the alias, just include a value\&. And optionally
% # the equal sign - syntactic sugar\&.
% inst1\&.mem1 = 5
5

% inst1\&.mem1
5

% # For nested records, just continue with the dot notation\&.
% # note, no equal sign\&.
% inst1\&.mem3\&.nest1 10
10

% inst1\&.mem3\&.nest1
10

% # just the instance by itself gives all member/values pairs for that
% # instance
% inst1
-mem1 5 -mem2 {} -mem3 {-nest1 10 -nest2 {}}




% # and to get all members within the nested record
% inst1\&.mem3
-nest1 10 -nest2 {}


.CE
.SH "RECORD COMMAND"
The following subcommands and corresponding arguments are available to
any record command:
.TP
\fIrecordName\fR \fIinstanceName\fR|\fB#auto\fR ?\fI-member1 value1 -member2 value2 \&.\&.\&.\fR?
Using the \fIrecordName\fR object command that was created from the
record definition, instances of the record definition can be
created\&.
Once an instance is created, it inherits the members of the record
definition, very similar to how objects work\&.
During instance generation, an object command for the instance is
created as well, using \fIinstanceName\fR\&.
.sp
This object command is used to access the data members of the
instance\&.
During the instantiation, while values for that instance may be given,
when done, \fIall\fR values must be given, and be given as
key/value pairs, like for method \fBconfigure\fR\&. Nested records
have to be in list format\&.
.sp
Optionally, \fB#auto\fR can be used in place of
\fIinstanceName\fR\&. When \fB#auto\fR is used, the instance name will
be automatically generated, and of the form
\fBrecordName\fBN\fR\fR, where \fBN\fR is a unique integer (starting
at 0) that is generated\&.
.PP
.PP
.SH "INSTANCE COMMAND"
The following subcommands and corresponding arguments are available to
any record instance command:
.TP
\fIinstanceName\fR \fBcget\fR ?\fI-member1 -member2 \&.\&.\&.\fR?
Each instance has the method \fBcget\fR\&. This is very similar to
how Tk widget's \fBcget\fR command works\&. It queries the values of
the members for that particular instance\&. If no arguments are given,
then a dictionary is returned\&.
.TP
\fIinstanceName\fR \fBconfigure\fR ?\fI-member1 value1 -member2 value2 \&.\&.\&.\fR?
Each instance has the method \fBconfigure\fR\&. This is very similar
to how Tk widget's \fBconfigure\fR command works\&. It sets the
values of the particular members for that particular instance\&. If no
arguments are given, then a dictionary list is returned\&.
.PP
.SH EXAMPLES
Two examples are provided to give a good illustration on how to use
this package\&.
.SS "EXAMPLE 1 - CONTACT INFORMATION"


Probably the most obvious example would be to hold contact
information, such as addresses, phone numbers, comments, etc\&. Since a
person can have multiple phone numbers, multiple email addresses, etc,
we will use nested records to define these\&. So, the first thing we do
is define the nested records:
.PP
.CS



##
##  This is an interactive example, to see what is returned by
##  each command as well\&.
##

% namespace import ::struct::record::*

% # define a nested record\&. Notice that country has default 'USA'\&.
% record define locations {
    street







|



















<
<
<
<
<
<
<
<
<
<
<
<
<
<
|







|
|
<
|
|
>

|
<
|
|
|

|
<
<


|
|
|
|
|
<
|









|
|
>
















|
|


|
|
|






|
<

















>

|
|


>







>

|
|
>
|
<
>

|
<
|
<

<
<
<
<
|
|
>
|
<
|
<
>
|
|
|
|
|
|
|
<
>
|
|
>
>
>
|
>

>
>
|
|
<
<
|
>

<
>
|
|
|

|
|
<
<
<
<
>

<
|
<
|
<
|

|
<
|




|


<
|
|

|
|
|


<


<
|
|


<


<
|
|


>
>
>
|
<
<
<




|
|

|
|
|
<
|
<
|
|
<
|
<
<
|
<
|

|
|
<
<
|







|
|
|
|


|
|
|
|


|

|
>
>
|
|
|
|
|






|
|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298














299
300
301
302
303
304
305
306
307
308

309
310
311
312
313

314
315
316
317
318


319
320
321
322
323
324
325

326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368

369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405

406
407
408

409

410




411
412
413
414

415

416
417
418
419
420
421
422
423

424
425
426
427
428
429
430
431
432
433
434
435
436


437
438
439

440
441
442
443
444
445
446




447
448

449

450

451
452
453

454
455
456
457
458
459
460
461

462
463
464
465
466
467
468
469

470
471

472
473
474
475

476
477

478
479
480
481
482
483
484
485



486
487
488
489
490
491
492
493
494
495

496

497
498

499


500

501
502
503
504


505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
..
.BS
.SH NAME
struct::record \- Define and create records (similar to 'C' structures)
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBstruct::record  ?1\&.2\&.1?\fR
.sp
\fBrecord define\fR \fIrecordName\fR \fIrecordMembers\fR ?\fIinstanceName1 instanceName2 \&.\&.\&.\fR?
.sp
\fBrecord show\fR \fIrecord\fR
.sp
\fBrecord show\fR \fIinstances\fR \fIrecordName\fR
.sp
\fBrecord show\fR \fImembers\fR \fIrecordName\fR
.sp
\fBrecord show\fR \fIvalues\fR \fIinstanceName\fR
.sp
\fBrecord exists\fR \fIrecord\fR \fIrecordName\fR
.sp
\fBrecord exists\fR \fIinstance\fR \fIinstanceName\fR
.sp
\fBrecord delete\fR \fIrecord\fR \fIrecordName\fR
.sp
\fBrecord delete\fR \fIinstance\fR \fIinstanceName\fR
.sp














\fIrecordName\fR \fB\fIinstanceName|#auto\fR\fR ?\fI-member1 value1 -member2 value2 \&.\&.\&.\fR?
.sp
\fIinstanceName\fR \fBcget\fR ?\fI-member1 -member2 \&.\&.\&.\fR?
.sp
\fIinstanceName\fR \fBconfigure\fR ?\fI-member1 value1 -member2 value2 \&.\&.\&.\fR?
.sp
.BE
.SH DESCRIPTION
The \fB::struct::record\fR package provides a mechanism to group variables together
as one data structure, similar to a 'C' structure\&. The members of a

record can be variables or other records\&. However, a record can not contain circular
record, i\&.e\&. records that contain the same record as a
member\&.
.PP
This package was structured so that it is very similar to how Tk objects work\&. Each record

definition creates a record object that encompasses that definition\&. Subsequently, that
record object can create instances of that record\&. These instances can then
be manipulated with the \fBcget\fR and \fBconfigure\fR methods\&.
.PP
The package only contains one top level command, but several sub commands (see below)\&. It also obeys the namespace in which the record was define, hence the objects returned are fully qualified\&.


.TP
\fBrecord define\fR \fIrecordName\fR \fIrecordMembers\fR ?\fIinstanceName1 instanceName2 \&.\&.\&.\fR?
Defines a record\&. \fIrecordName\fR is the name of the record, and is also
used as an object command\&. This object command is used to create instances of the
record definition\&. \fIrecordMembers\fR are the members of
the record that make up the record definition\&. These are variables
and other record\&. If optional \fIinstanceName\fR args are given, then an instance

is generated after the definition is created for each \fIinstanceName\fR\&.
.TP
\fBrecord show\fR \fIrecord\fR
Returns a list of records that have been defined\&.
.TP
\fBrecord show\fR \fIinstances\fR \fIrecordName\fR
Returns the instances that have been instantiated by
\fIrecordName\fR\&.
.TP
\fBrecord show\fR \fImembers\fR \fIrecordName\fR
Returns the members that are defined for
record \fIrecordName\fR\&. It returns the same format as how the
records were defined\&.
.TP
\fBrecord show\fR \fIvalues\fR \fIinstanceName\fR
Returns a list of values that are set for the instance
\fIinstanceName\fR\&. The output is a list of key/value pairs\&. If there
are nested records, then the values of the nested records will
itself be a list\&.
.TP
\fBrecord exists\fR \fIrecord\fR \fIrecordName\fR
Tests for the existence of a \fIrecord\fR with the
name \fIrecordName\fR\&.
.TP
\fBrecord exists\fR \fIinstance\fR \fIinstanceName\fR
Tests for the existence of a \fIinstance\fR with the
name \fIinstanceName\fR\&.
.TP
\fBrecord delete\fR \fIrecord\fR \fIrecordName\fR
Deletes \fIrecordName\fR, and all instances of \fIrecordName\fR\&. It will return
an error if the record does not exist\&.
.TP
\fBrecord delete\fR \fIinstance\fR \fIinstanceName\fR
Deletes \fIinstance\fR with the name of \fIinstanceName\fR\&. It
will return an error if the instance does not exist\&.
.PP
.PP
.SH "RECORD MEMBERS"
Record members can either be variables, or other records, However, the
same record can not be nested witin itself (circular)\&. To define a
nested record, you need to specify the \fBrecord\fR keyword, along
the with name of the record, and the name of the instance of that
nested record\&. For example, it would look like this:

.PP
.CS


# this is the nested record
record define mynestedrecord {
    nest1
    nest2
}

# This is the main record
record define myrecord {
    mem1
    mem2
    {record mynestedrecord mem3}
}


.CE
You can also assign default or initial values to the members of a record,
by enclosing the member entry in braces:
.PP
.CS



record define myrecord {
    mem1
    {mem2 5}
}


.CE
All instances created from this record definition, will initially have 5 as
the value for \fImem2\fR\&. If no default is given, then the value will be the empty string\&.
.PP
\fIGetting Values\fR

.PP
To get a value of a member, there are several ways to do this\&.
.IP [1]

To get a member value, then use the instance built-in \fBcget\fR method:

.sp




\fIinstanceName\fR \fBcget\fR -mem1
.IP [2]
To get multiple member values, you can specify them all in one command:
.sp

\fIinstanceName\fR \fBcget\fR -mem1 -mem2

.IP [3]
To get a list of the key/value of all of the members, there are 3 ways:
.sp
- \fIinstanceName\fR \fBcget\fR
.sp
- \fIinstanceName\fR \fBconfigure\fR
.sp
- \fIinstanceName\fR

.IP [4]
To get a value of a nested member, then use the dot notation:
.sp
\fIinstanceName\fR \fBcget\fR -mem3\&.nest1
.PP
.PP
\fISetting Values\fR
.PP
To set a value of a member, there are several ways to do this\&.
.IP [1]
To set a member value, then use the instance built-in \fBconfigure\fR method:
.sp
\fIinstanceName\fR \fBconfigure\fR -mem1 val1


.IP [2]
To set multiple member values, you can specify them all in one command:
.sp

\fIinstanceName\fR \fBconfigure\fR -mem1 va1 -mem2 val2
.IP [3]
To set a value of a nested member, then use the dot notation:
.sp
\fIinstanceName\fR \fBconfigure\fR -mem3\&.nest1 value
.PP
.PP




\fIAlias access\fR
.PP

In the original implementation, access was done by using dot notation similar to how 'C' structures are accessed\&. However,

there was a concensus to make the interface more Tcl like, which made sense\&. However, the original alias access still

exists\&. It might prove to be helpful to some\&.
.PP
Basically, for every member of every instance, an alias is created\&. This alias is used to get and set values for that

member\&. An example will illustrate the point, using the above defined records:
.PP
.CS


# Create an instance first
% myrecord inst1
::inst1

% # To get a member of an instance, just use the
% # alias (it behaves like a Tcl command):
% inst1\&.mem1
%
% # To set a member via the alias, just include
% # a value (optionally the equal sign - syntactic sugar)
% inst1\&.mem1 = 5
5

% inst1\&.mem1
5

% # For nested records, just continue with the
% # dot notation (note no equal sign)
% inst1\&.mem3\&.nest1 10
10

% inst1\&.mem3\&.nest1
10

% # just the instance by itself gives all
% # member/values pairs for that instance
% inst1
-mem1 5 -mem2 {} -mem3 {-nest1 10 -nest2 {}}
% # and to get all members within the nested record
% inst1\&.mem3
-nest1 10 -nest2 {}
%





.CE
.SH "RECORD COMMAND"
The following subcommands and corresponding arguments are available to any
record command:
.TP
\fIrecordName\fR \fB\fIinstanceName|#auto\fR\fR ?\fI-member1 value1 -member2 value2 \&.\&.\&.\fR?
Using the \fIrecordName\fR object command that was created from the record definition,
instances of the record definition can be created\&. Once a instance is

created, then it inherits the members of the record definition, very

similar to how objects work\&. During instance generation, an object command for the instance
is created as well, using \fIinstanceName\fR\&. This object command is used

to access the data members of the instance\&. During the instantiation, values for


that instance can be given, \fIbut\fR all values must be given, and be given

in key/value pairs\&. Nested records, need to be in list format\&.
.sp
Optionally, \fI#auto\fR can be used in place of \fIinstanceName\fR\&. When #auto is used,
then a instance name will automatically be generated, of the form recordName<integer>, where


<integer> is a unique integer (starting at 0) that is generated\&.
.PP
.PP
.SH "INSTANCE COMMAND"
The following subcommands and corresponding arguments are available to
any record instance command:
.TP
\fIinstanceName\fR \fBcget\fR ?\fI-member1 -member2 \&.\&.\&.\fR?
Each instance has the sub command \fBcget\fR associated with it\&. This
is very similar to how Tk widget's cget command works\&. It queries
the values of the member for that particular instance\&. If
no arguments are given, then a key/value list is returned\&.
.TP
\fIinstanceName\fR \fBconfigure\fR ?\fI-member1 value1 -member2 value2 \&.\&.\&.\fR?
Each instance has the sub command \fBconfigure\fR associated with it\&. This
is very similar to how Tk widget's configure command works\&. It sets
the values of the particular member for that particular instance\&. If
no arguments are given, then a key/value list is returned\&.
.PP
.SH EXAMPLES
Two examples are provided to give an good illustration on how to use
this package\&.
.PP
\fIExample 1\fR
.PP
Probably the most obvious example would be to hold contact information,
such as addresses, phone numbers, comments, etc\&. Since a person can have
multiple phone numbers, multiple email addresses, etc, we will use nested
records to define these\&. So, the first thing we do is define the nested
records:
.PP
.CS



##
##  This is an interactive example, to see what is
##  returned by each command as well\&.
##

% namespace import ::struct::record::*

% # define a nested record\&. Notice that country has default 'USA'\&.
% record define locations {
    street
621
622
623
624
625
626
627
628


629
630
631
632
633

634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661

662

663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
% record show members contacts2
first middle last {record locations home} {record locations work}
% record show members contacts
first middle last {record locations home} {record locations work}
%

.CE
.SS "EXAMPLE 2 - LINKED LIST"


This next example just illustrates a simple linked list
.PP
.CS



% # define a very simple record for linked list
% record define linkedlist {
    value
    next
}
::linkedlist
% linkedlist lstart
::lstart
% lstart config -value 1 -next [linkedlist #auto]
% [lstart cget -next] config -value 2 -next [linkedlist #auto]
% [[lstart cget -next] cget -next] config -value 3 -next "end"
% set next lstart
lstart
% while 1 {
    lappend values [$next cget -value]
    set next [$next cget -next]
    if {[string match "end" $next]} break
}
% puts "$values"
1 2 3
% # cleanup linked list
% # We could just use delete record linkedlist also
% foreach I [record show instances linkedlist] {
    record delete instance $I
}
% record show instances linkedlist
%


.CE

.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: record\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
data structures, record, struct
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002, Brett Schwarz <brett_schwarz@yahoo\&.com>

.fi







|
>
>





>

|



|
|

|
|




|
|
|




|
|
|

|


>

>







<
<
<
<
<
<
<
<









588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641








642
643
644
645
646
647
648
649
650
% record show members contacts2
first middle last {record locations home} {record locations work}
% record show members contacts
first middle last {record locations home} {record locations work}
%

.CE
.PP
\fIExample 1\fR
.PP
This next example just illustrates a simple linked list
.PP
.CS



% # define a very simple record for linked list
% record define llist {
    value
    next
}
::llist
% llist lstart
::lstart
% lstart config -value 1 -next [llist #auto]
% [lstart cget -next] config -value 2 -next [llist #auto]
% [[lstart cget -next] cget -next] config -value 3 -next "end"
% set next lstart
lstart
% while 1 {
lappend values [$next cget -value]
set next [$next cget -next]
if {[string match "end" $next]} {break}
}
% puts "$values"
1 2 3
% # cleanup linked list
% # We could just use delete record llist also
% foreach I [record show instances llist] {
record delete instance $I
}
% record show instances llist
%


.CE
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: record\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
data structures, record, struct
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002, Brett Schwarz <brett_schwarz@yahoo\&.com>

.fi

Changes to idoc/man/files/modules/struct/skiplist.n.

346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: skiplist\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
skiplist
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2000 Keith Vetter

.fi







<
<
<
<
<
<
<
<









346
347
348
349
350
351
352








353
354
355
356
357
358
359
360
361
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: skiplist\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
skiplist
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2000 Keith Vetter

.fi

Changes to idoc/man/files/modules/struct/stack.n.

375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: stack\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
graph, matrix, queue, tree
.SH CATEGORY
Data structures







<
<
<
<
<
<
<
<




375
376
377
378
379
380
381








382
383
384
385
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: stack\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
graph, matrix, queue, tree
.SH CATEGORY
Data structures

Changes to idoc/man/files/modules/struct/struct_list.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'struct_list\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2005 by Kevin B\&. Kenny\&. All rights reserved
'\" Copyright (c) 2003-2012 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "struct::list" n 1\&.8\&.4 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,





|







1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'struct_list\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2003-2005 by Kevin B\&. Kenny\&. All rights reserved
'\" Copyright (c) 2003-2012 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "struct::list" n 1\&.8\&.3 tcllib "Tcl Data Structures"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
struct::list \- Procedures for manipulating lists
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBstruct::list  ?1\&.8\&.4?\fR
.sp
\fB::struct::list\fR \fBlongestCommonSubsequence\fR \fIsequence1\fR \fIsequence2\fR ?\fImaxOccurs\fR?
.sp
\fB::struct::list\fR \fBlongestCommonSubsequence2\fR \fIsequence1 sequence2\fR ?\fImaxOccurs\fR?
.sp
\fB::struct::list\fR \fBlcsInvert\fR \fIlcsData\fR \fIlen1\fR \fIlen2\fR
.sp







|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
struct::list \- Procedures for manipulating lists
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBstruct::list  ?1\&.8\&.3?\fR
.sp
\fB::struct::list\fR \fBlongestCommonSubsequence\fR \fIsequence1\fR \fIsequence2\fR ?\fImaxOccurs\fR?
.sp
\fB::struct::list\fR \fBlongestCommonSubsequence2\fR \fIsequence1 sequence2\fR ?\fImaxOccurs\fR?
.sp
\fB::struct::list\fR \fBlcsInvert\fR \fIlcsData\fR \fIlen1\fR \fIlen2\fR
.sp
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: list\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Fisher-Yates, assign, common, comparison, diff, differential, equal, equality, filter, first permutation, flatten, folding, full outer join, generate permutations, inner join, join, left outer join, list, longest common subsequence, map, next permutation, outer join, permutation, reduce, repeating, repetition, reshuffle, reverse, right outer join, shuffle, subsequence, swapping
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2003-2005 by Kevin B\&. Kenny\&. All rights reserved
Copyright (c) 2003-2012 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<










988
989
990
991
992
993
994








995
996
997
998
999
1000
1001
1002
1003
1004
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: list\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Fisher-Yates, assign, common, comparison, diff, differential, equal, equality, filter, first permutation, flatten, folding, full outer join, generate permutations, inner join, join, left outer join, list, longest common subsequence, map, next permutation, outer join, permutation, reduce, repeating, repetition, reshuffle, reverse, right outer join, shuffle, subsequence, swapping
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2003-2005 by Kevin B\&. Kenny\&. All rights reserved
Copyright (c) 2003-2012 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Deleted idoc/man/files/modules/struct/struct_map.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
'\"
'\" Generated from file 'struct_map\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "struct::map" n 1 tcllib ""
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
struct::map \- Manage key/value maps
.SH SYNOPSIS
package require \fBstruct::map  ?1?\fR
.sp
\fB::struct::map\fR \fImapName\fR
.sp
\fBmapName\fR \fBmethod\fR ?\fIarg arg \&.\&.\&.\fR?
.sp
\fImapName\fR \fBget\fR
.sp
\fImapName\fR \fBnames\fR
.sp
\fImapName\fR \fBset\fR \fIname\fR ?\fIvalue\fR?
.sp
\fImapName\fR \fBunset\fR ?\fIpattern\fR\&.\&.\&.?
.sp
.BE
.SH DESCRIPTION
Provides a snit class whose instances manage a key/value map\&.
In other words, an object wrapper around Tcl arrays\&.
.SH API
The main command provides construction of maps:
.TP
\fB::struct::map\fR \fImapName\fR
Creates a new, empty map with an associated global Tcl command whose
name is \fImapName\fR\&.
It may be used to invoke various operations on the map\&.
It has the following general form:
.RS
.TP
\fBmapName\fR \fBmethod\fR ?\fIarg arg \&.\&.\&.\fR?
\fBmethod\fR and \fIarg\fRuments determine the exact behavior of
the command\&.
.RE
.IP
If \fImapName\fR is specified as \fB%AUTO%\fR a unique name will be
generated by the package itself\&.
The result of the command is the fully-qualified name of the instance
command\&.
.PP
.PP
The following commands are possible for map objects:
.TP
\fImapName\fR \fBget\fR
Returns the entire map as a Tcl dictionary\&.
.TP
\fImapName\fR \fBnames\fR
Returns the list of all keys known to the map, in arbitrary order\&.
.TP
\fImapName\fR \fBset\fR \fIname\fR ?\fIvalue\fR?
Sets key \fIname\fR to the specified \fIvalue\fR, if the value specified\&.
Returns the value for the key\&.
Throws an error if the key is not known\&.
.TP
\fImapName\fR \fBunset\fR ?\fIpattern\fR\&.\&.\&.?
Removes all keys matching at least one of the glob \fIpattern\fRs from
the map\&.
If no pattern is specified all keys are removed\&.
In other words, the default pattern is \fB*\fR\&.
The result of the command is the empty string\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: list\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/struct/struct_set.n.

398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: set\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
cardinality, difference, emptiness, exclusion, inclusion, intersection, membership, set, symmetric difference, union
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2004-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









398
399
400
401
402
403
404








405
406
407
408
409
410
411
412
413
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: set\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
cardinality, difference, emptiness, exclusion, inclusion, intersection, membership, set, symmetric difference, union
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2004-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/struct/struct_tree.n.

994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: tree\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
breadth-first, depth-first, in-order, node, post-order, pre-order, serialization, tree
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002-2004,2012 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









994
995
996
997
998
999
1000








1001
1002
1003
1004
1005
1006
1007
1008
1009
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: tree\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
breadth-first, depth-first, in-order, node, post-order, pre-order, serialization, tree
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002-2004,2012 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/struct/struct_tree1.n.

550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: tree\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
tree
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









550
551
552
553
554
555
556








557
558
559
560
561
562
563
564
565
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIstruct :: tree\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
tree
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/tar/tar.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'tar\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "tar" n 0\&.11 tcllib "Tar file handling"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'tar\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "tar" n 0\&.10 tcllib "Tar file handling"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
tar \- Tar file creation, extraction & manipulation
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBtar  ?0\&.11?\fR
.sp
\fB::tar::contents\fR \fItarball\fR ?\fB-chan\fR?
.sp
\fB::tar::stat\fR \fItarball\fR ?file? ?\fB-chan\fR?
.sp
\fB::tar::untar\fR \fItarball\fR \fIargs\fR
.sp







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
tar \- Tar file creation, extraction & manipulation
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBtar  ?0\&.10?\fR
.sp
\fB::tar::contents\fR \fItarball\fR ?\fB-chan\fR?
.sp
\fB::tar::stat\fR \fItarball\fR ?file? ?\fB-chan\fR?
.sp
\fB::tar::untar\fR \fItarball\fR \fIargs\fR
.sp
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
% foreach {file size} [::tar::untar tarball\&.tar -glob *\&.jpg] {
puts "Extracted $file ($size bytes)"
}

.CE
.TP
\fB::tar::get\fR \fItarball\fR \fIfileName\fR ?\fB-chan\fR?
Returns the contents of \fIfileName\fR from the \fItarball\fR\&.
.sp
.CS


% set readme [::tar::get tarball\&.tar doc/README] {
% puts $readme
}

.CE
.sp
If the option \fB-chan\fR is present \fItarball\fR is
interpreted as an open channel\&.  It is assumed that the channel was
opened for reading, and configured for binary input\&.  The command will
\fInot\fR close the channel\&.
.sp
An error is thrown when \fIfileName\fR is not found in the tar
archive\&.
.TP
\fB::tar::create\fR \fItarball\fR \fIfiles\fR \fIargs\fR
Creates a new tar file containing the \fIfiles\fR\&. \fIfiles\fR must be specified
as a single argument which is a proper list of filenames\&.
.RS
.TP
\fB-dereference\fR







|










|
<
|
|
<
<
<







364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382

383
384



385
386
387
388
389
390
391
% foreach {file size} [::tar::untar tarball\&.tar -glob *\&.jpg] {
puts "Extracted $file ($size bytes)"
}

.CE
.TP
\fB::tar::get\fR \fItarball\fR \fIfileName\fR ?\fB-chan\fR?
Returns the contents of \fIfileName\fR from the \fItarball\fR
.sp
.CS


% set readme [::tar::get tarball\&.tar doc/README] {
% puts $readme
}

.CE
.sp
If the option \fB-chan\fR is present \fItarball\fR is interpreted as an open channel\&.

It is assumed that the channel was opened for reading, and configured for binary input\&.
The command will \fInot\fR close the channel\&.



.TP
\fB::tar::create\fR \fItarball\fR \fIfiles\fR \fIargs\fR
Creates a new tar file containing the \fIfiles\fR\&. \fIfiles\fR must be specified
as a single argument which is a proper list of filenames\&.
.RS
.TP
\fB-dereference\fR
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItar\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
archive, tape archive, tar
.SH CATEGORY
File formats







<
<
<
<
<
<
<
<




448
449
450
451
452
453
454








455
456
457
458
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItar\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
archive, tape archive, tar
.SH CATEGORY
File formats

Changes to idoc/man/files/modules/tepam/tepam_argument_dialogbox.n.

Changes to idoc/man/files/modules/tepam/tepam_doc_gen.n.

509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
The following parameters are provided to this procedure:
.RS
.TP
\fIName\fR
Name of the argument
.TP
\fIIsOptional\fR
If true (=\fB1\fR) the argument is optional which should be indicated by the generated string (for example by putting the argument into brackets {[]} or into question marks '?'):
.CS

gen(TXT,ArgumentString) mtype 1 0 string -> \fI"[mtype]"\fR
.CE
.TP
\fIIsNamed\fR
If true (=\fB1\fR) an argument is a named argument (option)\&. The generated string should in this case contain the argument/option name, followed by the argument itself:







|







509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
The following parameters are provided to this procedure:
.RS
.TP
\fIName\fR
Name of the argument
.TP
\fIIsOptional\fR
If true (=\fB1\fR) the argument is optional which should be indicated by the generated string (for example by putting the argument into brackets {} or into question marks '?'):
.CS

gen(TXT,ArgumentString) mtype 1 0 string -> \fI"[mtype]"\fR
.CE
.TP
\fIIsNamed\fR
If true (=\fB1\fR) an argument is a named argument (option)\&. The generated string should in this case contain the argument/option name, followed by the argument itself:

Changes to idoc/man/files/modules/tepam/tepam_introduction.n.

Changes to idoc/man/files/modules/tepam/tepam_procedure.n.

1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
The name of the first unnamed argument has therefore not to start with the '-' character\&. The unnamed argument is otherwise considered as name of another named argument\&. This is especially important if the first unnamed argument is given by a variable that can contain any character strings:
.CS

my_proc \fB-n1 N1 -n2 N2 "->" "<-"\fR
\fI-> my_proc: Argument '->' not known\fR

set U1 "->"
my_proc \fB-n1 N1 -n2 N2 $U1 U2\fR
my_proc: Argument '->' not known
.CE
The '--' flag allows separating unambiguously the unnamed arguments from the named arguments\&. All data after the '--' flag will be considered as unnamed argument:
.CS

my_proc \fB-n1 N1 -n2 N2 -- "->" "<-"\fR
\fI-> n1:'N1', n2:'N2', u1:'->', u2:'<-'\fR







|







1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
The name of the first unnamed argument has therefore not to start with the '-' character\&. The unnamed argument is otherwise considered as name of another named argument\&. This is especially important if the first unnamed argument is given by a variable that can contain any character strings:
.CS

my_proc \fB-n1 N1 -n2 N2 "->" "<-"\fR
\fI-> my_proc: Argument '->' not known\fR

set U1 "->"
my_proc -n1 N1 -n2 N2 $U1 U2}]
my_proc: Argument '->' not known
.CE
The '--' flag allows separating unambiguously the unnamed arguments from the named arguments\&. All data after the '--' flag will be considered as unnamed argument:
.CS

my_proc \fB-n1 N1 -n2 N2 -- "->" "<-"\fR
\fI-> n1:'N1', n2:'N2', u1:'->', u2:'<-'\fR

Changes to idoc/man/files/modules/term/ansi_cattr.n.

481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
ansi, attribute control, color control, control, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









481
482
483
484
485
486
487








488
489
490
491
492
493
494
495
496
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
ansi, attribute control, color control, control, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/ansi_cctrl.n.

772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
ansi, attribute control, color control, control, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









772
773
774
775
776
777
778








779
780
781
782
783
784
785
786
787
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
ansi, attribute control, color control, control, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/ansi_cmacros.n.

328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
ansi, control, frame, menu, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









328
329
330
331
332
333
334








335
336
337
338
339
340
341
342
343
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
ansi, control, frame, menu, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/ansi_code.n.

312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
control, declare, define, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









312
313
314
315
316
317
318








319
320
321
322
323
324
325
326
327
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
control, declare, define, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/ansi_ctrlu.n.

336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
ansi, columns, control, cooked, input mode, lines, raw, rows, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006-2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









336
337
338
339
340
341
342








343
344
345
346
347
348
349
350
351
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
ansi, columns, control, cooked, input mode, lines, raw, rows, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006-2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/ansi_send.n.

764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
character output, control, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









764
765
766
767
768
769
770








771
772
773
774
775
776
777
778
779
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
character output, control, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/imenu.n.

403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
control, menu, terminal, text display
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









403
404
405
406
407
408
409








410
411
412
413
414
415
416
417
418
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
control, menu, terminal, text display
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/ipager.n.

404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
control, pager, terminal, text display
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









404
405
406
407
408
409
410








411
412
413
414
415
416
417
418
419
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
control, pager, terminal, text display
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/receive.n.

332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
character input, control, get character, listener, receiver, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









332
333
334
335
336
337
338








339
340
341
342
343
344
345
346
347
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
character input, control, get character, listener, receiver, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/term.n.

287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
control, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









287
288
289
290
291
292
293








294
295
296
297
298
299
300
301
302
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
control, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/term_bind.n.

376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
character input, control, dispatcher, listener, receiver, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









376
377
378
379
380
381
382








383
384
385
386
387
388
389
390
391
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
character input, control, dispatcher, listener, receiver, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/term/term_send.n.

302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
character output, control, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









302
303
304
305
306
307
308








309
310
311
312
313
314
315
316
317
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIterm\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
character output, control, terminal
.SH CATEGORY
Terminal control
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/textutil/adjust.n.

372
373
374
375
376
377
378
379

380
381
382
383
384
385
386
.RE
.TP
\fB-length\fR \fIinteger\fR
Set the length of the \fIlogical\fR line in the string to
\fIinteger\fR\&.  \fIinteger\fR must be a positive integer
value\&. Defaults to \fB72\fR\&.
.TP
\fB-strictlength\fR \fIboolean\fR

If set to \fBfalse\fR (default), a line can exceed the specified
\fB-length\fR if a single word is longer than \fB-length\fR\&. If
set to \fBtrue\fR, words that are longer than \fB-length\fR are
split so that no line exceeds the specified \fB-length\fR\&.
.RE
.TP
\fB::textutil::adjust::readPatterns\fR \fIfilename\fR







|
>







372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
.RE
.TP
\fB-length\fR \fIinteger\fR
Set the length of the \fIlogical\fR line in the string to
\fIinteger\fR\&.  \fIinteger\fR must be a positive integer
value\&. Defaults to \fB72\fR\&.
.TP
\fB-strictlength\fR
\fIboolean\fR]
If set to \fBfalse\fR (default), a line can exceed the specified
\fB-length\fR if a single word is longer than \fB-length\fR\&. If
set to \fBtrue\fR, words that are longer than \fB-length\fR are
split so that no line exceeds the specified \fB-length\fR\&.
.RE
.TP
\fB::textutil::adjust::readPatterns\fR \fIfilename\fR
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
TeX, adjusting, formatting, hyphenation, indenting, justification, paragraph, string, undenting
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<






434
435
436
437
438
439
440








441
442
443
444
445
446
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
TeX, adjusting, formatting, hyphenation, indenting, justification, paragraph, string, undenting
.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/textutil/expander.n.

741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
[uri, http://www\&.wjduquette\&.com/expand, regexp, split, string
.SH KEYWORDS
string, template processing, text expansion
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) William H\&. Duquette, http://www\&.wjduquette\&.com/expand

.fi







<
<
<
<
<
<
<
<











741
742
743
744
745
746
747








748
749
750
751
752
753
754
755
756
757
758
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
[uri, http://www\&.wjduquette\&.com/expand, regexp, split, string
.SH KEYWORDS
string, template processing, text expansion
.SH CATEGORY
Documentation tools
.SH COPYRIGHT
.nf
Copyright (c) William H\&. Duquette, http://www\&.wjduquette\&.com/expand

.fi

Deleted idoc/man/files/modules/textutil/patch.n.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
'\"
'\" Generated from file 'patch\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "textutil::patch" n 0\&.1 tcllib "Text and string utilities"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
textutil::patch \- Application of uni-diff patches to directory trees
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBtextutil::patch  ?0\&.1?\fR
.sp
\fB::textutil::patch::apply\fR \fIbasedirectory\fR \fIstriplevel\fR \fIpatch\fR \fIreportcmd\fR
.sp
\fB{*}reportcmd\fR \fBapply\fR \fIfilename\fR
.sp
\fB{*}reportcmd\fR \fBfail\fR \fIfilename\fR \fIhunk\fR \fIexpected\fR \fIseen\fR
.sp
\fB{*}reportcmd\fR \fBfail-already\fR \fIfilename\fR \fIhunk\fR
.sp
.BE
.SH DESCRIPTION
This package provides a single command which applies a patch in
\fIunified format\fR [https://www\&.gnu\&.org/software/diffutils/manual/html_node/Detailed-Unified\&.html]
to a directory tree\&.
.TP
\fB::textutil::patch::apply\fR \fIbasedirectory\fR \fIstriplevel\fR \fIpatch\fR \fIreportcmd\fR
Applies the \fIpatch\fR (text of the path, not file) to the files in
the \fIbasedirectory\fR using the specified \fIstriplevel\fR\&.
The result of the command is the empty string\&.
.sp
The \fIstriplevel\fR argument is equivalent to option
\fB-p\fR of the \fBpatch\fR command\&.
.sp
Errors are thrown when the \fIpatch\fR does not parse, and
nothing is done to the files in \fIbasedirectory\fR\&.
.sp
All activities during the application of the patch, including
the inability to apply a hunk are reported through the command prefix
\fIreportcmd\fR instead\&. Files with problems are left unchanged\&.  Note
however that this does \fInot prevent\fR changes to files with no
problems, before and after the problematic file(s)\&.
.sp
The command prefix is called in 3 possible forms:
.RS
.TP
\fB{*}reportcmd\fR \fBapply\fR \fIfilename\fR
The caller begins operation on file \fIfname\fR, applying all hunks
collected for said file\&.
.TP
\fB{*}reportcmd\fR \fBfail\fR \fIfilename\fR \fIhunk\fR \fIexpected\fR \fIseen\fR
Application of hunk number \fIhunk\fR of file \fIfilename\fR has failed\&.
The command expected to find the text \fIexpected\fR, and saw \fIseen\fR instead\&.
.TP
\fB{*}reportcmd\fR \fBfail-already\fR \fIfilename\fR \fIhunk\fR
Application of hunk number \fIhunk\fR of file \fIfilename\fR has failed\&.
The command believes that this hunk has already been applied to the file\&.
.RE
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
diff -ruN, diff, unified format, fossil, git, patch, unified format diff
.SH CATEGORY
Text processing
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































Changes to idoc/man/files/modules/textutil/repeat.n.

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
blanks, repetition, string
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<






305
306
307
308
309
310
311








312
313
314
315
316
317
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
blanks, repetition, string
.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/textutil/tabify.n.

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
formatting, string, tabstops
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<






330
331
332
333
334
335
336








337
338
339
340
341
342
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
formatting, string, tabstops
.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/textutil/textutil.n.

621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
TeX, formatting, hyphenation, indenting, paragraph, regular expression, string, trimming
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<






621
622
623
624
625
626
627








628
629
630
631
632
633
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
TeX, formatting, hyphenation, indenting, paragraph, regular expression, string, trimming
.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/textutil/textutil_split.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'textutil_split\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "textutil::split" n 0\&.8 tcllib "Text and string utilities, macro processing"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'textutil_split\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "textutil::split" n 0\&.7 tcllib "Text and string utilities, macro processing"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
textutil::split \- Procedures to split texts
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBtextutil::split  ?0\&.8?\fR
.sp
\fB::textutil::split::splitn\fR \fIstring\fR ?\fIlen\fR?
.sp
\fB::textutil::split::splitx\fR \fIstring\fR ?\fIregexp\fR?
.sp
.BE
.SH DESCRIPTION







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
..
.BS
.SH NAME
textutil::split \- Procedures to split texts
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBtextutil::split  ?0\&.7?\fR
.sp
\fB::textutil::split::splitn\fR \fIstring\fR ?\fIlen\fR?
.sp
\fB::textutil::split::splitx\fR \fIstring\fR ?\fIregexp\fR?
.sp
.BE
.SH DESCRIPTION
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
entire multiple of the chunk length, then the last chunk in the
generated list will be shorter than \fIlen\fR\&.
.TP
\fB::textutil::split::splitx\fR \fIstring\fR ?\fIregexp\fR?
This command splits the \fIstring\fR and return a list\&. The string is
split according to the regular expression \fIregexp\fR instead of a
simple list of chars\&.
\fINote\fR: When parentheses are used in the \fIregexp\fR, i\&.e\&. regex
capture groups, then these groups will be added into the result list
as additional elements\&. If the \fIstring\fR is empty the result is the
empty list, like for \fBsplit\fR\&.
If \fIregexp\fR is empty the \fIstring\fR is split at every character,
like \fBsplit\fR does\&.
The regular expression \fIregexp\fR defaults to "[\\\\t \\\\r\\\\n]+"\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
regular expression, split, string
.SH CATEGORY
Text processing







|
|
|
|
|
<









<
<
<
<
<
<
<
<






298
299
300
301
302
303
304
305
306
307
308
309

310
311
312
313
314
315
316
317
318








319
320
321
322
323
324
entire multiple of the chunk length, then the last chunk in the
generated list will be shorter than \fIlen\fR\&.
.TP
\fB::textutil::split::splitx\fR \fIstring\fR ?\fIregexp\fR?
This command splits the \fIstring\fR and return a list\&. The string is
split according to the regular expression \fIregexp\fR instead of a
simple list of chars\&.
Note that if you parentheses are added into the \fIregexp\fR, the
parentheses part of separator will be added into the result list as
additional element\&. If the \fIstring\fR is empty the result is the
empty list, like for \fBsplit\fR\&. If \fIregexp\fR is empty the
\fIstring\fR is split at every character, like \fBsplit\fR does\&.

The regular expression \fIregexp\fR defaults to "[\\\\t \\\\r\\\\n]+"\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
regular expression, split, string
.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/textutil/textutil_string.n.

334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
capitalize, chop, common prefix, formatting, prefix, string, uncapitalize
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<






334
335
336
337
338
339
340








341
342
343
344
345
346
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
capitalize, chop, common prefix, formatting, prefix, string, uncapitalize
.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/textutil/trim.n.

335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
prefix, regular expression, string, trimming
.SH CATEGORY
Text processing







<
<
<
<
<
<
<
<






335
336
337
338
339
340
341








342
343
344
345
346
347
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItextutil\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
regexp(n), split(n), string(n)
.SH KEYWORDS
prefix, regular expression, string, trimming
.SH CATEGORY
Text processing

Changes to idoc/man/files/modules/tie/tie.n.

698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItie\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
array, database, file, metakit, persistence, tie, untie
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2004-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









698
699
700
701
702
703
704








705
706
707
708
709
710
711
712
713
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItie\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
array, database, file, metakit, persistence, tie, untie
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2004-2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/tie/tie_std.n.

301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItie\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
array, database, file, metakit, persistence, tie, untie
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2008-2015 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









301
302
303
304
305
306
307








308
309
310
311
312
313
314
315
316
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItie\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
array, database, file, metakit, persistence, tie, untie
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2008-2015 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/tiff/tiff.n.

474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItiff\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
image, tif, tiff
.SH CATEGORY
File formats
.SH COPYRIGHT
.nf
Copyright (c) 2005-2006, Aaron Faupell <afaupell@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









474
475
476
477
478
479
480








481
482
483
484
485
486
487
488
489
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItiff\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
image, tif, tiff
.SH CATEGORY
File formats
.SH COPYRIGHT
.nf
Copyright (c) 2005-2006, Aaron Faupell <afaupell@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/tool/meta.n.

435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIoo::util\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
snit(n)
.SH KEYWORDS
TclOO, callback, class methods, class variables, command prefix, currying, method reference, my method, singleton
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2011-2015 Andreas Kupries, BSD licensed

.fi







<
<
<
<
<
<
<
<











435
436
437
438
439
440
441








442
443
444
445
446
447
448
449
450
451
452
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIoo::util\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
snit(n)
.SH KEYWORDS
TclOO, callback, class methods, class variables, command prefix, currying, method reference, my method, singleton
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2011-2015 Andreas Kupries, BSD licensed

.fi

Changes to idoc/man/files/modules/tool/tool.n.

268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
tool \- TclOO Library (TOOL) Framework
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBsha1 \fR
.sp
package require \fBdicttool \fR
.sp







|







268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH NAME
tool \- Dictionary Tools
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBsha1 \fR
.sp
package require \fBdicttool \fR
.sp
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
Computes the default value for an option\&. See \fBtool::option_handling\fR\&.
.PP
.SH AUTHORS
Sean Woods
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItcloo\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
TOOL, TclOO, framework
.SH CATEGORY
TclOO
.SH COPYRIGHT
.nf
Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>

.fi







|



<
<
<
<
<
<
<
<

|

|





520
521
522
523
524
525
526
527
528
529
530








531
532
533
534
535
536
537
538
539
Computes the default value for an option\&. See \fBtool::option_handling\fR\&.
.PP
.SH AUTHORS
Sean Woods
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItool\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
TOOL, TclOO
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>

.fi

Changes to idoc/man/files/modules/tool/tool_dict_ensemble.n.

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItool\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
TOOL, TclOO
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>

.fi







<
<
<
<
<
<
<
<









297
298
299
300
301
302
303








304
305
306
307
308
309
310
311
312
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItool\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
TOOL, TclOO
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2015 Sean Woods <yoda@etoyoc\&.com>

.fi

Changes to idoc/man/files/modules/transfer/connect.n.

451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467

    # Create a connector with secure socket setup,
    transfer::connect C -socketcmd tls::socket \&.\&.\&.
    \&.\&.\&.

.CE
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







451
452
453
454
455
456
457

458
459
460
461
462
463
464
465
466

    # Create a connector with secure socket setup,
    transfer::connect C -socketcmd tls::socket \&.\&.\&.
    \&.\&.\&.

.CE
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
active, channel, connection, passive, secure, ssl, tls, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









484
485
486
487
488
489
490








491
492
493
494
495
496
497
498
499
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
active, channel, connection, passive, secure, ssl, tls, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/transfer/copyops.n.

408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel, copy, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









408
409
410
411
412
413
414








415
416
417
418
419
420
421
422
423
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel, copy, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/transfer/ddest.n.

391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel, copy, data destination, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









391
392
393
394
395
396
397








398
399
400
401
402
403
404
405
406
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel, copy, data destination, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/transfer/dsource.n.

429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel, copy, data source, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









429
430
431
432
433
434
435








436
437
438
439
440
441
442
443
444
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel, copy, data source, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/transfer/receiver.n.

500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516

    # Create a connector with secure socket setup,
    transfer::receiver R -socketcmd tls::socket \&.\&.\&.
    \&.\&.\&.

.CE
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







500
501
502
503
504
505
506

507
508
509
510
511
512
513
514
515

    # Create a connector with secure socket setup,
    transfer::receiver R -socketcmd tls::socket \&.\&.\&.
    \&.\&.\&.

.CE
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel, copy, data destination, receiver, secure, ssl, tls, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









533
534
535
536
537
538
539








540
541
542
543
544
545
546
547
548
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel, copy, data destination, receiver, secure, ssl, tls, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/transfer/tqueue.n.

414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel, copy, queue, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









414
415
416
417
418
419
420








421
422
423
424
425
426
427
428
429
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel, copy, queue, transfer
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/transfer/transmitter.n.

510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526

    # Create a connector with secure socket setup,
    transfer::transmitter T -socketcmd tls::socket \&.\&.\&.
    \&.\&.\&.

.CE
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







510
511
512
513
514
515
516

517
518
519
520
521
522
523
524
525

    # Create a connector with secure socket setup,
    transfer::transmitter T -socketcmd tls::socket \&.\&.\&.
    \&.\&.\&.

.CE
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel, copy, data source, secure, ssl, tls, transfer, transmitter
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









543
544
545
546
547
548
549








550
551
552
553
554
555
556
557
558
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItransfer\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel, copy, data source, secure, ssl, tls, transfer, transmitter
.SH CATEGORY
Transfer module
.SH COPYRIGHT
.nf
Copyright (c) 2006-2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/treeql/treeql.n.

404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
    #   have such an attribute\&.
    # - And returns this information\&.

    # Below we can see the same query, but rewritten
    # to show the structure as it is seen by the query
    # interpreter\&.

    q query \\
	    root \\
	    children \\
	    get data

.CE
.sp
The operators of the TreeQL language available for this are explained
in the section about \fBThe Tree Query Language\fR\&. This section
also explains the term \fInode set\fR used above\&.







|
|
|







404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
    #   have such an attribute\&.
    # - And returns this information\&.

    # Below we can see the same query, but rewritten
    # to show the structure as it is seen by the query
    # interpreter\&.

    q query \\\\
	    root \\\\
	    children \\\\
	    get data

.CE
.sp
The operators of the TreeQL language available for this are explained
in the section about \fBThe Tree Query Language\fR\&. This section
also explains the term \fInode set\fR used above\&.
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItreeql\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Cost, DOM, TreeQL, XPath, XSLT, structured queries, tree, tree query language
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2004 Colin McCormack <coldstore@users\&.sourceforge\&.net>
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<










866
867
868
869
870
871
872








873
874
875
876
877
878
879
880
881
882
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItreeql\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Cost, DOM, TreeQL, XPath, XSLT, structured queries, tree, tree query language
.SH CATEGORY
Data structures
.SH COPYRIGHT
.nf
Copyright (c) 2004 Colin McCormack <coldstore@users\&.sourceforge\&.net>
Copyright (c) 2004 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/try/tcllib_throw.n.

303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItry\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
error(n)
.SH KEYWORDS
error, return, throw
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2015 Miguel Martínez López, BSD licensed

.fi







<
<
<
<
<
<
<
<











303
304
305
306
307
308
309








310
311
312
313
314
315
316
317
318
319
320
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItry\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
error(n)
.SH KEYWORDS
error, return, throw
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2015 Miguel Martínez López, BSD licensed

.fi

Changes to idoc/man/files/modules/try/tcllib_try.n.

380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItry\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
catch(n), error(n), return(n), throw(n)
.SH KEYWORDS
cleanup, error, exception, final, resource management
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2008 Donal K\&. Fellows, BSD licensed

.fi







<
<
<
<
<
<
<
<











380
381
382
383
384
385
386








387
388
389
390
391
392
393
394
395
396
397
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fItry\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
catch(n), error(n), return(n), throw(n)
.SH KEYWORDS
cleanup, error, exception, final, resource management
.SH CATEGORY
Utility
.SH COPYRIGHT
.nf
Copyright (c) 2008 Donal K\&. Fellows, BSD licensed

.fi

Changes to idoc/man/files/modules/udpcluster/udpcluster.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'udpcluster\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2016-2018 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "udpcluster" n 0\&.3\&.3 tcllib "Lightweight UDP based tool for cluster node discovery"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'udpcluster\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2016 Sean Woods <yoda@etoyoc\&.com>
'\"
.TH "udpcluster" n 0\&.3 tcllib "Lightweight UDP based tool for cluster node discovery"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
udpcluster \- UDP Peer-to-Peer cluster
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBudpcluster  ?0\&.3\&.3?\fR
.sp
package require \fBip \fR
.sp
package require \fBnettool \fR
.sp
package require \fBcomm \fR
.sp
package require \fBinterp \fR







<
<







272
273
274
275
276
277
278


279
280
281
282
283
284
285
..
.BS
.SH NAME
udpcluster \- UDP Peer-to-Peer cluster
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp


package require \fBip \fR
.sp
package require \fBnettool \fR
.sp
package require \fBcomm \fR
.sp
package require \fBinterp \fR
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
name service, server
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2016-2018 Sean Woods <yoda@etoyoc\&.com>

.fi







<
<
<
<
<
<
<
<






|


336
337
338
339
340
341
342








343
344
345
346
347
348
349
350
351
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fInameserv\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
name service, server
.SH CATEGORY
Networking
.SH COPYRIGHT
.nf
Copyright (c) 2016 Sean Woods <yoda@etoyoc\&.com>

.fi

Changes to idoc/man/files/modules/uev/uevent.n.

450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIuevent\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
hook(n)
.SH KEYWORDS
bind, event, generate event, hook, unbind
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2012 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<











450
451
452
453
454
455
456








457
458
459
460
461
462
463
464
465
466
467
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIuevent\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
hook(n)
.SH KEYWORDS
bind, event, generate event, hook, unbind
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2012 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/uev/uevent_onidle.n.

319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIuevent\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
callback, deferal, event, idle, merge, on-idle
.SH COPYRIGHT
.nf
Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<







319
320
321
322
323
324
325








326
327
328
329
330
331
332
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIuevent\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
callback, deferal, event, idle, merge, on-idle
.SH COPYRIGHT
.nf
Copyright (c) 2008 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/units/units.n.

626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIunits\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
angle, constants, conversion, distance, radians, unit
.SH COPYRIGHT
.nf
Copyright (c) 2000-2005 Mayo Foundation

.fi







<
<
<
<
<
<
<
<







626
627
628
629
630
631
632








633
634
635
636
637
638
639
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIunits\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
angle, constants, conversion, distance, radians, unit
.SH COPYRIGHT
.nf
Copyright (c) 2000-2005 Mayo Foundation

.fi

Changes to idoc/man/files/modules/uri/uri.n.

1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'uri\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "uri" n 1\&.2\&.7 tcllib "Tcl Uniform Resource Identifier Management"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,



|







1
2
3
4
5
6
7
8
9
10
11
'\"
'\" Generated from file 'uri\&.man' by tcllib/doctools with format 'nroff'
'\"
.TH "uri" n 1\&.2\&.6 tcllib "Tcl Uniform Resource Identifier Management"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320

321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349

350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376

377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
..
.BS
.SH NAME
uri \- URI utilities
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBuri  ?1\&.2\&.7?\fR
.sp
\fBuri::setQuirkOption\fR \fIoption\fR ?\fIvalue\fR?
.sp
\fBuri::split\fR \fIurl\fR ?\fIdefaultscheme\fR?
.sp
\fBuri::join\fR ?\fIkey\fR \fIvalue\fR?\&.\&.\&.
.sp
\fBuri::resolve\fR \fIbase\fR \fIurl\fR
.sp
\fBuri::isrelative\fR \fIurl\fR
.sp
\fBuri::geturl\fR \fIurl\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fBuri::canonicalize\fR \fIuri\fR
.sp
\fBuri::register\fR \fIschemeList\fR \fIscript\fR
.sp
.BE
.SH DESCRIPTION
This package does two things\&.
.PP
First, it provides a number of
commands for manipulating URLs/URIs and fetching data specified by
them\&. For fetching data this package analyses the requested URL/URI and
then dispatches it to the appropriate package (\fBhttp\fR, \fBftp\fR, \&.\&.\&.) for
actual retrieval\&.  Currently these commands are defined for the schemes
\fIhttp\fR, \fIhttps\fR, \fIftp\fR, \fImailto\fR, \fInews\fR,
\fIldap\fR, \fIldaps\fR and \fIfile\fR\&.  The package \fBuri::urn\fR adds scheme \fIurn\fR\&.
.PP
Second, it provides regular expressions
for a number of \fBregistered\fR URL/URI schemes\&. Registered
schemes are currently \fIftp\fR, \fIldap\fR, \fIldaps\fR, \fIfile\fR,
\fIhttp\fR, \fIhttps\fR, \fIgopher\fR, \fImailto\fR, \fInews\fR,
\fIwais\fR and \fIprospero\fR\&.  The package \fBuri::urn\fR adds scheme
\fIurn\fR\&.
.PP
The commands of the package conform to
RFC 3986 (\fIhttps://www\&.rfc-editor\&.org/rfc/rfc3986\&.txt\fR),
with the exception of a loophole arising from RFC 1630 and described
in RFC 3986 Sections 5\&.2\&.2 and 5\&.4\&.2\&. The loophole allows a relative
URI to include a scheme if it is the same as the scheme of the base
URI against which it is resolved\&. RFC 3986 recommends avoiding this usage\&.

.SH COMMANDS
.TP
\fBuri::setQuirkOption\fR \fIoption\fR ?\fIvalue\fR?
\fBuri::setQuirkOption\fR is an accessor command for a number of "quirk options"\&.
The command has the same semantics as the command \fBset\fR: when called with one argument it reads an existing value; with two arguments it writes a new value\&.  The value of a "quirk option" is boolean: the value \fBfalse\fR requests conformance with RFC 3986, while \fBtrue\fR requests use of the quirk\&.  See section \fBQUIRK OPTIONS\fR for discussion of the different options and their purpose\&.
.TP
\fBuri::split\fR \fIurl\fR ?\fIdefaultscheme\fR?
\fBuri::split\fR takes a \fIurl\fR, decodes it and then returns a
list of key/value pairs suitable for \fBarray set\fR containing the
constituents of the \fIurl\fR\&. If the scheme is missing from the \fIurl\fR
it defaults to the value of \fIdefaultscheme\fR if it was specified,
or \fIhttp\fR else\&. Currently the schemes \fIhttp\fR,
\fIhttps\fR, \fIftp\fR, \fImailto\fR, \fInews\fR, \fIldap\fR, \fIldaps\fR and
\fIfile\fR are supported by the package itself\&.
See section \fBEXTENDING\fR on how to expand that range\&.
.sp
The set of constituents of a URL (= the set of keys in the returned
dictionary) is dependent on the scheme of the URL\&. The only key which
is therefore always present is \fBscheme\fR\&. For the following
schemes the constituents and their keys are known:
.RS
.TP
ftp
\fBuser\fR, \fBpwd\fR, \fBhost\fR, \fBport\fR,
\fBpath\fR, \fBtype\fR, \fBpbare\fR\&.  The pbare is optional\&.
.TP
http(s)
\fBuser\fR, \fBpwd\fR, \fBhost\fR, \fBport\fR,
\fBpath\fR, \fBquery\fR, \fBfragment\fR, \fBpbare\fR\&.  The pbare is optional\&.

.TP
file
\fBpath\fR, \fBhost\fR\&. The host is optional\&.
.TP
mailto
\fBuser\fR, \fBhost\fR\&. The host is optional\&.
.TP
ldap(s)
\fBhost\fR, \fBport\fR, \fBdn\fR, \fBattrs\fR, \fBscope\fR, \fBfilter\fR, \fBextensions\fR
.TP
news
Either \fBmessage-id\fR or \fBnewsgroup-name\fR\&.
.RE
.IP
For discussion of the boolean \fBpbare\fR see options \fINoInitialSlash\fR and \fINoExtraKeys\fR in \fBQUIRK OPTIONS\fR\&.
.sp
The constituents are returned as slices of the argument \fIurl\fR, without removal of percent-encoding ("url-encoding") or other adaptations\&.  Notably, on Windows® the \fBpath\fR in scheme \fIfile\fR is not a valid local filename\&.  See \fBEXAMPLES\fR for more information\&.
.sp
.TP
\fBuri::join\fR ?\fIkey\fR \fIvalue\fR?\&.\&.\&.
\fBuri::join\fR takes a list of key/value pairs (generated by
\fBuri::split\fR, for example) and returns the canonical URL they
represent\&. Currently the schemes \fIhttp\fR, \fIhttps\fR,
\fIftp\fR, \fImailto\fR, \fInews\fR, \fIldap\fR, \fIldaps\fR and \fIfile\fR
are supported by the package itself\&. See section \fBEXTENDING\fR on how to expand that range\&.
.sp
The arguments are expected to be slices of a valid URL, with percent-encoding ("url-encoding") and any other necessary adaptations\&.  Notably, on Windows the \fBpath\fR in scheme \fIfile\fR is not a valid local filename\&.  See \fBEXAMPLES\fR for more information\&.

.TP
\fBuri::resolve\fR \fIbase\fR \fIurl\fR
\fBuri::resolve\fR resolves the specified \fIurl\fR relative to
\fIbase\fR, in conformance with RFC 3986\&. In other words: a
non-relative \fIurl\fR is returned
unchanged, whereas for a relative \fIurl\fR the missing parts are
taken from \fIbase\fR and prepended to it\&. The result of this
operation is returned\&. For an empty \fIurl\fR the result is
\fIbase\fR, without its URI fragment (if any)\&.  The command is available for schemes \fIhttp\fR, \fIhttps\fR, \fIftp\fR, and \fIfile\fR\&.
.TP
\fBuri::isrelative\fR \fIurl\fR
\fBuri::isrelative\fR determines whether the specified \fIurl\fR is
absolute or relative\&.  The command is available for a \fIurl\fR of any scheme\&.
.TP
\fBuri::geturl\fR \fIurl\fR ?\fIoptions\fR\&.\&.\&.?
\fBuri::geturl\fR decodes the specified \fIurl\fR and then dispatches
the request to the package appropriate for the scheme found in the
URL\&. The command assumes that the package to handle the given scheme
either has the same name as the scheme itself (including possible
capitalization) followed by \fB::geturl\fR, or, in case of this
failing, has the same name as the scheme itself (including possible
capitalization)\&. It further assumes that whatever package was loaded
provides a \fBgeturl\fR-command in the namespace of the same name as
the package itself\&. This command is called with the given \fIurl\fR
and all given \fIoptions\fR\&. Currently \fBgeturl\fR does not handle
any options itself\&.
.sp
\fINote:\fR \fIfile\fR-URLs are an exception to the rule
described above\&. They are handled internally\&.
.sp
It is not possible to specify results of the command\&. They depend on
the \fBgeturl\fR-command for the scheme the request was dispatched to\&.
.TP
\fBuri::canonicalize\fR \fIuri\fR
\fBuri::canonicalize\fR returns the canonical form of a URI\&.  The
canonical form of a URI is one where relative path specifications,
i\&.e\&. "\&." and "\&.\&.", have been resolved\&.  The command is available for all
URI schemes that have \fBuri::split\fR and \fBuri::join\fR commands\&. The command
returns a canonicalized URI if the URI scheme has a \fBpath\fR component (i\&.e\&. \fIhttp\fR, \fIhttps\fR, \fIftp\fR, and \fIfile\fR)\&.  For schemes that have \fBuri::split\fR and \fBuri::join\fR commands but no \fBpath\fR component (i\&.e\&. \fImailto\fR, \fInews\fR, \fIldap\fR, and \fIldaps\fR), the command returns the \fIuri\fR unchanged\&.
.TP
\fBuri::register\fR \fIschemeList\fR \fIscript\fR
\fBuri::register\fR registers the first element of \fIschemeList\fR as
a new scheme and the remaining elements as aliases for this scheme\&. It
creates the namespace for the scheme and executes the \fIscript\fR in
the new namespace\&. The script has to declare variables containing
regular expressions relevant to the scheme\&. At least the variable
\fBschemepart\fR has to be declared as that one is used to extend
the variables keeping track of the registered schemes\&.
.PP
.SH SCHEMES
In addition to the commands mentioned above this package provides
regular expression to recognize URLs for a number of URL schemes\&.
.PP
For each supported scheme a namespace of the same name as the scheme
itself is provided inside of the namespace \fIuri\fR containing the
variable \fBurl\fR whose contents are a regular expression to
recognize URLs of that scheme\&. Additional variables may contain
regular expressions for parts of URLs for that scheme\&.
.PP
The variable \fBuri::schemes\fR contains a list of all registered
schemes\&. Currently these are \fIftp\fR, \fIldap\fR, \fIldaps\fR, \fIfile\fR,
\fIhttp\fR, \fIhttps\fR, \fIgopher\fR, \fImailto\fR, \fInews\fR,
\fIwais\fR and \fIprospero\fR\&.
.SH EXTENDING
Extending the range of schemes supported by \fBuri::split\fR and
\fBuri::join\fR is easy because both commands do not handle the
request by themselves but dispatch it to another command in the
\fIuri\fR namespace using the scheme of the URL as criterion\&.
.PP
\fBuri::split\fR and \fBuri::join\fR
call \fBSplit[string totitle <scheme>]\fR
and  \fBJoin[string totitle <scheme>]\fR respectively\&.
.PP
The provision of split and join commands is sufficient to extend the commands \fBuri::canonicalize\fR and \fBuri::geturl\fR
(the latter subject to the availability of a suitable package with a \fBgeturl\fR command)\&.  In contrast, to extend the command \fBuri::resolve\fR to a new scheme, the command itself must be modified\&.
.PP
To extend the range of schemes for which pattern information is
available, use the command \fBuri::register\fR\&.
.PP
An example of a package that provides both commands and pattern information for a new scheme is \fBuri::urn\fR, which adds scheme \fIurn\fR\&.
.SH "QUIRK OPTIONS"
The value of a "quirk option" is boolean: the value \fBfalse\fR requests conformance with RFC 3986, while \fBtrue\fR requests use of the quirk\&.  Use command \fBuri::setQuirkOption\fR to access the values of quirk options\&.
.PP
Quirk options are useful both for allowing backwards compatibility when a command
specification changes, and for adding useful features that are not included
in RFC specifications\&.  The following quirk options are currently defined:
.TP
\fINoInitialSlash\fR
This quirk option concerns the leading character of \fBpath\fR (if non-empty) in the schemes \fIhttp\fR, \fIhttps\fR, and \fIftp\fR\&.
.sp
RFC 3986 defines \fBpath\fR in an absolute URI to have an initial "/", unless the value of \fBpath\fR is the empty string\&. For the scheme \fIfile\fR, all versions of package \fBuri\fR follow this rule\&.  The quirk option \fINoInitialSlash\fR does not apply to scheme \fIfile\fR\&.
.sp
For the schemes \fIhttp\fR, \fIhttps\fR, and \fIftp\fR, versions of \fBuri\fR before 1\&.2\&.7 define the \fBpath\fR \fINOT\fR to include an initial "/"\&.  When the quirk option \fINoInitialSlash\fR is \fBtrue\fR (the default), this behavior is also used in version 1\&.2\&.7\&.  To use instead values of \fBpath\fR as defined by RFC 3986, set this quirk option to \fBfalse\fR\&.
.sp
This setting does not affect RFC 3986 conformance\&.  If \fINoInitialSlash\fR is \fBtrue\fR, then the value of \fBpath\fR in the schemes \fIhttp\fR, \fIhttps\fR, or \fIftp\fR, cannot distinguish between URIs in which the full "RFC 3986 path" is the empty string "" or a single slash "/" respectively\&.  The missing information is recorded in an additional \fBuri::split\fR key \fBpbare\fR\&.
.sp
The boolean \fBpbare\fR is defined when quirk options \fINoInitialSlash\fR and \fINoExtraKeys\fR have values \fBtrue\fR and \fBfalse\fR respectively\&.  In this case, if the value of \fBpath\fR is the empty string "", \fBpbare\fR is \fBtrue\fR if the full "RFC 3986 path" is "", and \fBpbare\fR is \fBfalse\fR if the full "RFC 3986 path" is "/"\&.
.sp
Using this quirk option \fINoInitialSlash\fR is a matter of preference\&.
.TP
\fINoExtraKeys\fR
This quirk option permits full backward compatibility with versions of \fBuri\fR before 1\&.2\&.7, by omitting the \fBuri::split\fR key \fBpbare\fR described above (see quirk option \fINoInitialSlash\fR)\&.  The outcome is greater backward compatibility of the \fBuri::split\fR command, but an inability to distinguish between URIs in which the full "RFC 3986 path" is the empty string "" or a single slash "/" respectively - i\&.e\&. a minor non-conformance with RFC 3986\&.
.sp
If the quirk option \fINoExtraKeys\fR is \fBfalse\fR (the default), command \fBuri::split\fR returns an additional key \fBpbare\fR, and the commands comply with RFC 3986\&. If the quirk option \fINoExtraKeys\fR is \fBtrue\fR, the key \fBpbare\fR is not defined and there is not full conformance with RFC 3986\&.
.sp
Using the quirk option \fINoExtraKeys\fR is \fINOT\fR recommended, because if set to \fBtrue\fR it will reduce conformance with RFC 3986\&.  The option is included only for compatibility with code, written for earlier versions of \fBuri\fR, that needs values of \fBpath\fR without a leading "/", \fIAND ALSO\fR cannot tolerate unexpected keys in the results of \fBuri::split\fR\&.
.TP
\fIHostAsDriveLetter\fR
When handling the scheme \fIfile\fR on the
Windows platform, versions of \fBuri\fR before 1\&.2\&.7
use the \fBhost\fR field to represent a Windows drive letter and the colon that follows it, and the \fBpath\fR field to represent the filename path after the colon\&.  Such URIs are invalid, and are not recognized by any RFC\&. When the quirk option \fIHostAsDriveLetter\fR is \fBtrue\fR, this behavior is also used in version 1\&.2\&.7\&.  To use \fIfile\fR URIs on Windows that conform to RFC 3986, set this quirk option to \fBfalse\fR (the default)\&.
.sp
Using this quirk is \fINOT\fR recommended, because if set to \fBtrue\fR it will cause the \fBuri\fR commands to expect and produce invalid URIs\&.  The option is included only for compatibility with legacy code\&.
.TP
\fIRemoveDoubleSlashes\fR
When a URI is canonicalized by \fBuri::canonicalize\fR, its \fBpath\fR is normalized by removal of segments "\&." and "\&.\&."\&.  RFC 3986 does not mandate
the removal of empty segments "" (i\&.e\&. the merger of double slashes, which is a feature of filename normalization but not of URI \fBpath\fR normalization): it treats URIs with excess slashes as referring to different resources\&.  When the quirk option \fIRemoveDoubleSlashes\fR is \fBtrue\fR (the default), empty segments will be removed from \fBpath\fR\&.  To prevent removal, and thereby conform to RFC 3986, set this quirk option to \fBfalse\fR\&.
.sp
Using this quirk is a matter of preference\&.  A URI with double slashes in its path was most likely generated by error, certainly so if it has a straightforward mapping to a file on a server\&.  In some cases it may be better to sanitize the URI; in others, to keep the URI and let the server handle the possible error\&.
.PP
.PP
.SS "BACKWARD COMPATIBILITY"
To behave as similarly as possible to versions of \fBuri\fR earlier than 1\&.2\&.7, set the following quirk options:
.IP \(bu
\fBuri::setQuirkOption\fR \fINoInitialSlash\fR 1
.IP \(bu
\fBuri::setQuirkOption\fR \fINoExtraKeys\fR 1
.IP \(bu
\fBuri::setQuirkOption\fR \fIHostAsDriveLetter\fR 1
.IP \(bu
\fBuri::setQuirkOption\fR \fIRemoveDoubleSlashes\fR 0
.PP
In code that can tolerate the return by \fBuri::split\fR of an additional key \fBpbare\fR, set
.IP \(bu
\fBuri::setQuirkOption\fR \fINoExtraKeys\fR 0
.PP
in order to achieve greater compliance with RFC 3986\&.
.SS "NEW DESIGNS"
For new projects, the following settings are recommended:
.IP \(bu
\fBuri::setQuirkOption\fR \fINoInitialSlash\fR 0
.IP \(bu
\fBuri::setQuirkOption\fR \fINoExtraKeys\fR 0
.IP \(bu
\fBuri::setQuirkOption\fR \fIHostAsDriveLetter\fR 0
.IP \(bu
\fBuri::setQuirkOption\fR \fIRemoveDoubleSlashes\fR 0|1
.PP
.SS "DEFAULT VALUES"
The default values for package \fBuri\fR version 1\&.2\&.7 are intended to be a compromise between backwards compatibility and improved features\&.  Different default values may be chosen in future versions of package \fBuri\fR\&.
.IP \(bu
\fBuri::setQuirkOption\fR \fINoInitialSlash\fR 1
.IP \(bu
\fBuri::setQuirkOption\fR \fINoExtraKeys\fR 0
.IP \(bu
\fBuri::setQuirkOption\fR \fIHostAsDriveLetter\fR 0
.IP \(bu
\fBuri::setQuirkOption\fR \fIRemoveDoubleSlashes\fR 1
.PP
.SH EXAMPLES
A Windows® local filename such as "\fBC:\\Other Files\\startup\&.txt\fR" is not suitable for use as the \fBpath\fR element of a URI in the scheme \fIfile\fR\&.
.PP
The Tcl command \fBfile normalize\fR will convert the backslashes to forward slashes\&.  To generate a valid \fBpath\fR for the scheme \fIfile\fR, the normalized filename must be prepended with "\fB/\fR", and then any characters that do not match the \fBregexp\fR bracket expression
.CS


    [a-zA-Z0-9$_\&.+!*'(,)?:@&=-]

.CE
must be percent-encoded\&.
.PP
The result in this example is "\fB/C:/Other%20Files/startup\&.txt\fR" which is a valid value for \fBpath\fR\&.
.CS


% uri::join path /C:/Other%20Files/startup\&.txt scheme file

file:///C:/Other%20Files/startup\&.txt

% uri::split file:///C:/Other%20Files/startup\&.txt

path /C:/Other%20Files/startup\&.txt scheme file


.CE
On UNIX® systems filenames begin with "\fB/\fR" which is also used as the directory separator\&.  The only action needed to convert a filename to a valid \fBpath\fR is percent-encoding\&.
.SH CREDITS
.PP
Original code (regular expressions) by Andreas Kupries\&.
Modularisation by Steve Ball, also the split/join/resolve
functionality\&. RFC 3986 conformance by Keith Nash\&.
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIuri\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
fetching information, file, ftp, gopher, http, https, ldap, mailto, news, prospero, rfc 1630, rfc 2255, rfc 2396, rfc 3986, uri, url, wais, www
.SH CATEGORY
Networking







|
<
<

















|
<
|
|
|
|
<
<
<
<
<
<
<
<
<
|

|
|
<
<
<
<
>


<
<
<
<

|

|

|
|



|
|






|



|
>







<
<
<



<
<
<
<




|
|
|
|
<
<
>



<
|



|



|




|









|








|
<
<





|






|




|
|

|
|
|





|




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|







<
<
<
<
<
<
<
<

|


271
272
273
274
275
276
277
278


279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296

297
298
299
300









301
302
303
304




305
306
307




308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338



339
340
341




342
343
344
345
346
347
348
349


350
351
352
353

354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386


387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419


















































































































420
421
422
423
424
425
426
427
428
429
430
431








432
433
434
435
..
.BS
.SH NAME
uri \- URI utilities
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBuri  ?1\&.2\&.6?\fR


.sp
\fBuri::split\fR \fIurl\fR ?\fIdefaultscheme\fR?
.sp
\fBuri::join\fR ?\fIkey\fR \fIvalue\fR?\&.\&.\&.
.sp
\fBuri::resolve\fR \fIbase\fR \fIurl\fR
.sp
\fBuri::isrelative\fR \fIurl\fR
.sp
\fBuri::geturl\fR \fIurl\fR ?\fIoptions\fR\&.\&.\&.?
.sp
\fBuri::canonicalize\fR \fIuri\fR
.sp
\fBuri::register\fR \fIschemeList\fR \fIscript\fR
.sp
.BE
.SH DESCRIPTION
This package contains two parts\&. First it provides regular expressions

for a number of url/uri schemes\&. Second it provides a number of
commands for manipulating urls/uris and fetching data specified by
them\&. For the latter this package analyses the requested url/uri and
then dispatches it to the appropriate package (http, ftp, \&.\&.\&.) for









actual fetching\&.
.PP
The package currently does not conform to
RFC 2396 (\fIhttp://www\&.rfc-editor\&.org/rfc/rfc2396\&.txt\fR),




but quite likely should be\&. Patches and other help are welcome\&.
.SH COMMANDS
.TP




\fBuri::split\fR \fIurl\fR ?\fIdefaultscheme\fR?
\fBuri::split\fR takes an \fIurl\fR, decodes it and then returns a
list of key/value pairs suitable for \fBarray set\fR containing the
constituents of the \fIurl\fR\&. If the scheme is missing from the url
it defaults to the value of \fIdefaultscheme\fR if it was specified,
or \fIhttp\fR else\&. Currently only the schemes \fIhttp\fR,
\fIftp\fR, \fImailto\fR, \fIurn\fR, \fInews\fR, \fIldap\fR and
\fIfile\fR are supported by the package itself\&.
See section \fBEXTENDING\fR on how to expand that range\&.
.sp
The set of constituents of an url (= the set of keys in the returned
dictionary) is dependent on the scheme of the url\&. The only key which
is therefore always present is \fBscheme\fR\&. For the following
schemes the constituents and their keys are known:
.RS
.TP
ftp
\fBuser\fR, \fBpwd\fR, \fBhost\fR, \fBport\fR,
\fBpath\fR, \fBtype\fR
.TP
http(s)
\fBuser\fR, \fBpwd\fR, \fBhost\fR, \fBport\fR,
\fBpath\fR, \fBquery\fR, \fBfragment\fR\&. The fragment
is optional\&.
.TP
file
\fBpath\fR, \fBhost\fR\&. The host is optional\&.
.TP
mailto
\fBuser\fR, \fBhost\fR\&. The host is optional\&.
.TP



news
Either \fBmessage-id\fR or \fBnewsgroup-name\fR\&.
.RE




.sp
.TP
\fBuri::join\fR ?\fIkey\fR \fIvalue\fR?\&.\&.\&.
\fBuri::join\fR takes a list of key/value pairs (generated by
\fBuri::split\fR, for example) and returns the canonical url they
represent\&. Currently only the schemes \fIhttp\fR, \fIftp\fR,
\fImailto\fR, \fIurn\fR, \fInews\fR, \fIldap\fR and \fIfile\fR
are supported\&. See section \fBEXTENDING\fR on how to expand that


range\&.
.TP
\fBuri::resolve\fR \fIbase\fR \fIurl\fR
\fBuri::resolve\fR resolves the specified \fIurl\fR relative to

\fIbase\fR\&. In other words: A non-relative \fIurl\fR is returned
unchanged, whereas for a relative \fIurl\fR the missing parts are
taken from \fIbase\fR and prepended to it\&. The result of this
operation is returned\&. For an empty \fIurl\fR the result is
\fIbase\fR\&.
.TP
\fBuri::isrelative\fR \fIurl\fR
\fBuri::isrelative\fR determines whether the specified \fIurl\fR is
absolute or relative\&.
.TP
\fBuri::geturl\fR \fIurl\fR ?\fIoptions\fR\&.\&.\&.?
\fBuri::geturl\fR decodes the specified \fIurl\fR and then dispatches
the request to the package appropriate for the scheme found in the
url\&. The command assumes that the package to handle the given scheme
either has the same name as the scheme itself (including possible
capitalization) followed by \fB::geturl\fR, or, in case of this
failing, has the same name as the scheme itself (including possible
capitalization)\&. It further assumes that whatever package was loaded
provides a \fBgeturl\fR-command in the namespace of the same name as
the package itself\&. This command is called with the given \fIurl\fR
and all given \fIoptions\fR\&. Currently \fBgeturl\fR does not handle
any options itself\&.
.sp
\fINote:\fR \fIfile\fR-urls are an exception to the rule
described above\&. They are handled internally\&.
.sp
It is not possible to specify results of the command\&. They depend on
the \fBgeturl\fR-command for the scheme the request was dispatched to\&.
.TP
\fBuri::canonicalize\fR \fIuri\fR
\fBuri::canonicalize\fR returns the canonical form of a URI\&.  The
canonical form of a URI is one where relative path specifications,
ie\&. \&. and \&.\&., have been resolved\&.


.TP
\fBuri::register\fR \fIschemeList\fR \fIscript\fR
\fBuri::register\fR registers the first element of \fIschemeList\fR as
a new scheme and the remaining elements as aliases for this scheme\&. It
creates the namespace for the scheme and executes the \fIscript\fR in
the new namespace\&. The script has to declare variables containing the
regular expressions relevant to the scheme\&. At least the variable
\fBschemepart\fR has to be declared as that one is used to extend
the variables keeping track of the registered schemes\&.
.PP
.SH SCHEMES
In addition to the commands mentioned above this package provides
regular expression to recognize urls for a number of url schemes\&.
.PP
For each supported scheme a namespace of the same name as the scheme
itself is provided inside of the namespace \fIuri\fR containing the
variable \fBurl\fR whose contents are a regular expression to
recognize urls of that scheme\&. Additional variables may contain
regular expressions for parts of urls for that scheme\&.
.PP
The variable \fBuri::schemes\fR contains a list of all supported
schemes\&. Currently these are \fIftp\fR, \fIldap\fR, \fIfile\fR,
\fIhttp\fR, \fIgopher\fR, \fImailto\fR, \fInews\fR,
\fIwais\fR and \fIprospero\fR\&.
.SH EXTENDING
Extending the range of schemes supported by \fBuri::split\fR and
\fBuri::join\fR is easy because both commands do not handle the
request by themselves but dispatch it to another command in the
\fIuri\fR namespace using the scheme of the url as criterion\&.
.PP
\fBuri::split\fR and \fBuri::join\fR
call \fBSplit[string totitle <scheme>]\fR
and  \fBJoin[string totitle <scheme>]\fR respectively\&.


















































































































.SH CREDITS
.PP
Original code (regular expressions) by Andreas Kupries\&.
Modularisation by Steve Ball, also the split/join/resolve
functionality\&.
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIuri\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
fetching information, file, ftp, gopher, http, ldap, mailto, news, prospero, rfc 2255, rfc 2396, uri, url, wais, www
.SH CATEGORY
Networking

Changes to idoc/man/files/modules/uri/urn-scheme.n.

304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIuri\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
rfc 2141, uri, url, urn
.SH CATEGORY
Networking







<
<
<
<
<
<
<
<




304
305
306
307
308
309
310








311
312
313
314
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIuri\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
rfc 2141, uri, url, urn
.SH CATEGORY
Networking

Changes to idoc/man/files/modules/uuid/uuid.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'uuid\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "uuid" n 1\&.0\&.6 tcllib "uuid"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'uuid\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "uuid" n 1\&.0\&.4 tcllib "uuid"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
uuid \- UUID generation and comparison
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBuuid  ?1\&.0\&.6?\fR
.sp
\fB::uuid::uuid generate\fR
.sp
\fB::uuid::uuid equal\fR \fIid1\fR \fIid2\fR
.sp
.BE
.SH DESCRIPTION







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
uuid \- UUID generation and comparison
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBuuid  ?1\&.0\&.4?\fR
.sp
\fB::uuid::uuid generate\fR
.sp
\fB::uuid::uuid equal\fR \fIid1\fR \fIid2\fR
.sp
.BE
.SH DESCRIPTION
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIuuid\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
GUID, UUID
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









315
316
317
318
319
320
321








322
323
324
325
326
327
328
329
330
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIuuid\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
GUID, UUID
.SH CATEGORY
Hashes, checksums, and encryption
.SH COPYRIGHT
.nf
Copyright (c) 2004, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/cc_amex.n.

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
AMEX, American Express, Checking, Testing, Type checking, Validation, Value checking, bank, card for credit, credit card, finance, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









360
361
362
363
364
365
366








367
368
369
370
371
372
373
374
375
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
AMEX, American Express, Checking, Testing, Type checking, Validation, Value checking, bank, card for credit, credit card, finance, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/cc_discover.n.

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, Discover, Testing, Type checking, Validation, Value checking, bank, card for credit, credit card, finance, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









360
361
362
363
364
365
366








367
368
369
370
371
372
373
374
375
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, Discover, Testing, Type checking, Validation, Value checking, bank, card for credit, credit card, finance, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/cc_mastercard.n.

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, MasterCard, Testing, Type checking, Validation, Value checking, bank, card for credit, credit card, finance, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









360
361
362
363
364
365
366








367
368
369
370
371
372
373
374
375
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, MasterCard, Testing, Type checking, Validation, Value checking, bank, card for credit, credit card, finance, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/cc_visa.n.

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, Testing, Type checking, VISA, Validation, Value checking, bank, card for credit, credit card, finance, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









360
361
362
363
364
365
366








367
368
369
370
371
372
373
374
375
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, Testing, Type checking, VISA, Validation, Value checking, bank, card for credit, credit card, finance, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/ean13.n.

354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, EAN, EAN13, European Article Number, International Article Number, Testing, Type checking, Validation, Value checking, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









354
355
356
357
358
359
360








361
362
363
364
365
366
367
368
369
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, EAN, EAN13, European Article Number, International Article Number, Testing, Type checking, Validation, Value checking, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/iban.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'vtype\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "valtype::iban" n 1\&.7 tcllib "Validation types"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'vtype\&.inc' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "valtype::iban" n 1\&.6 tcllib "Validation types"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBsnit  2\fR
.sp
package require \fBvaltype::common \fR
.sp
package require \fBvaltype::iban  ?1\&.7?\fR
.sp
\fBvaltype::iban\fR \fBvalidate\fR \fIvalue\fR
.sp
\fBvaltype::iban\fR \fBcheckdigit\fR \fIvalue\fR
.sp
.BE
.SH DESCRIPTION







|







276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBsnit  2\fR
.sp
package require \fBvaltype::common \fR
.sp
package require \fBvaltype::iban  ?1\&.6?\fR
.sp
\fBvaltype::iban\fR \fBvalidate\fR \fIvalue\fR
.sp
\fBvaltype::iban\fR \fBcheckdigit\fR \fIvalue\fR
.sp
.BE
.SH DESCRIPTION
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, IBAN, International Bank Account Number, Testing, Type checking, Validation, Value checking, bank, finance, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









351
352
353
354
355
356
357








358
359
360
361
362
363
364
365
366
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, IBAN, International Bank Account Number, Testing, Type checking, Validation, Value checking, bank, finance, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/imei.n.

356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, IMEI, International Mobile Equipment Identity, Testing, Type checking, Validation, Value checking, cell-phone, isA, mobile phone, phone
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









356
357
358
359
360
361
362








363
364
365
366
367
368
369
370
371
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, IMEI, International Mobile Equipment Identity, Testing, Type checking, Validation, Value checking, cell-phone, isA, mobile phone, phone
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/isbn.n.

363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Book Number, Checking, EAN, EAN13, European Article Number, ISBN, International Article Number, International Standard Book Number, Testing, Type checking, Validation, Value checking, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









363
364
365
366
367
368
369








370
371
372
373
374
375
376
377
378
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Book Number, Checking, EAN, EAN13, European Article Number, ISBN, International Article Number, International Standard Book Number, Testing, Type checking, Validation, Value checking, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/luhn.n.

351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, Testing, Type checking, Validation, Value checking, isA, luhn
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









351
352
353
354
355
356
357








358
359
360
361
362
363
364
365
366
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, Testing, Type checking, Validation, Value checking, isA, luhn
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/luhn5.n.

351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, Testing, Type checking, Validation, Value checking, isA, luhn, luhn-5
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









351
352
353
354
355
356
357








358
359
360
361
362
363
364
365
366
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, Testing, Type checking, Validation, Value checking, isA, luhn, luhn-5
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/usnpi.n.

356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, NPI, National Provider Identifier, Testing, Type checking, US-NPI, Validation, Value checking, isA, medicare
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









356
357
358
359
360
361
362








363
364
365
366
367
368
369
370
371
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, NPI, National Provider Identifier, Testing, Type checking, US-NPI, Validation, Value checking, isA, medicare
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/valtype_common.n.

364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, Testing, Type checking, Validation, Value checking, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









364
365
366
367
368
369
370








371
372
373
374
375
376
377
378
379
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, Testing, Type checking, Validation, Value checking, isA
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/valtype/verhoeff.n.

351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Checking, Testing, Type checking, Validation, Value checking, isA, verhoeff
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









351
352
353
354
355
356
357








358
359
360
361
362
363
364
365
366
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvaltype\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Checking, Testing, Type checking, Validation, Value checking, isA, verhoeff
.SH CATEGORY
Validation, Type checking
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/cat.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'cat\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "tcl::chan::cat" n 1\&.0\&.3 tcllib "Reflected/virtual channel support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'cat\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "tcl::chan::cat" n 1 tcllib "Reflected/virtual channel support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBtcl::chan::core  ?1?\fR
.sp
package require \fBtcl::chan::cat  ?1\&.0\&.3?\fR
.sp
\fB::tcl::chan::cat\fR \fIchan\fR\&.\&.\&.
.sp
.BE
.SH DESCRIPTION
.PP
The \fBtcl::chan::cat\fR package provides a command creating







|







276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBtcl::chan::core  ?1?\fR
.sp
package require \fBtcl::chan::cat  ?1?\fR
.sp
\fB::tcl::chan::cat\fR \fIchan\fR\&.\&.\&.
.sp
.BE
.SH DESCRIPTION
.PP
The \fBtcl::chan::cat\fR package provides a command creating
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
concatenation channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









311
312
313
314
315
316
317








318
319
320
321
322
323
324
325
326
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
concatenation channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/facade.n.

335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
concatenation channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









335
336
337
338
339
340
341








342
343
344
345
346
347
348
349
350
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
concatenation channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/halfpipe.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'halfpipe\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009, 2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "tcl::chan::halfpipe" n 1\&.0\&.1 tcllib "Reflected/virtual channel support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'halfpipe\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "tcl::chan::halfpipe" n 1 tcllib "Reflected/virtual channel support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
276
277
278
279
280
281
282
283


284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBtcl::chan::events  ?1?\fR
.sp
package require \fBtcl::chan::halfpipe  ?1\&.0\&.1?\fR


.sp
\fB::tcl::chan::halfpipe\fR ?\fB-option\fR \fIvalue\fR\&.\&.\&.?
.sp
\fIobjectCmd\fR \fBput\fR \fIbytes\fR
.sp
.BE
.SH DESCRIPTION







|
>
>







276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBtcl::chan::events  ?1?\fR
.sp
package require \fBtcl::chan::halfpipe  ?1?\fR
.sp
package require \fBtcl::chan::halfpipe  ?1?\fR
.sp
\fB::tcl::chan::halfpipe\fR ?\fB-option\fR \fIvalue\fR\&.\&.\&.?
.sp
\fIobjectCmd\fR \fBput\fR \fIbytes\fR
.sp
.BE
.SH DESCRIPTION
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
callbacks, fifo, in-memory channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009, 2019 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


337
338
339
340
341
342
343








344
345
346
347
348
349
350
351
352
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
callbacks, fifo, in-memory channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/nullzero.n.

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
/dev/null, /dev/zero, null, reflected channel, tip 219, virtual channel, zero
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









305
306
307
308
309
310
311








312
313
314
315
316
317
318
319
320
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
/dev/null, /dev/zero, null, reflected channel, tip 219, virtual channel, zero
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/randseed.n.

304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
/dev/random, merge, random, reflected channel, seed, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









304
305
306
307
308
309
310








311
312
313
314
315
316
317
318
319
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
/dev/random, merge, random, reflected channel, seed, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/std.n.

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
reflected channel, standard io, stdin, stdout, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









305
306
307
308
309
310
311








312
313
314
315
316
317
318
319
320
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
reflected channel, standard io, stdin, stdout, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2011 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/tcllib_fifo.n.

287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
.BE
.SH DESCRIPTION
.PP
The \fBtcl::chan::fifo\fR package provides a command creating
channels which live purely in memory\&. Access is fifo-like, i\&.e\&. things
are read out of the channel in the order they were written to it\&.
This is equivalent to the fifo channels provided by the package
\fBMemchan\fR, except that this is written in pure Tcl, not C\&. On
the other hand, \fBMemchan\fR is usable with Tcl 8\&.4 and before,
whereas this package requires Tcl 8\&.5 or higher, and \fBTclOO\fR\&.
.PP
The internal \fBTclOO\fR class implementing the channel
handler is a sub-class of the \fBtcl::chan::events\fR framework\&.
.SH API
.TP
\fB::tcl::chan::fifo\fR
This command creates a new fifo channel and returns its handle\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
fifo, in-memory channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







|

















<
<
<
<
<
<
<
<









287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311








312
313
314
315
316
317
318
319
320
.BE
.SH DESCRIPTION
.PP
The \fBtcl::chan::fifo\fR package provides a command creating
channels which live purely in memory\&. Access is fifo-like, i\&.e\&. things
are read out of the channel in the order they were written to it\&.
This is equivalent to the fifo channels provided by the package
\fBMmechan\fR, except that this is written in pure Tcl, not C\&. On
the other hand, \fBMemchan\fR is usable with Tcl 8\&.4 and before,
whereas this package requires Tcl 8\&.5 or higher, and \fBTclOO\fR\&.
.PP
The internal \fBTclOO\fR class implementing the channel
handler is a sub-class of the \fBtcl::chan::events\fR framework\&.
.SH API
.TP
\fB::tcl::chan::fifo\fR
This command creates a new fifo channel and returns its handle\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
fifo, in-memory channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/tcllib_fifo2.n.

292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
The \fBtcl::chan::fifo2\fR package provides a command creating
pairs of channels which live purely in memory and are connected to
each other in a fifo manner\&. What is written to one half of the pair
can be read from the other half, in the same order\&. One particular
application for this is communication between threads, with one half
of the pair moved to the thread to talk to\&.
This is equivalent to the fifo2 channels provided by the package
\fBMemchan\fR, except that this is written in pure Tcl, not C\&. On
the other hand, \fBMemchan\fR is usable with Tcl 8\&.4 and before,
whereas this package requires Tcl 8\&.5 or higher, and \fBTclOO\fR\&.
.PP
The internal \fBTclOO\fR class implementing the channel
handler is a sub-class of the \fBtcl::chan::events\fR framework\&.
.SH API
.TP
\fB::tcl::chan::fifo2\fR
This command creates a new connected pair of fifo channels and returns
their handles, as a list containing two elements\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
connected fifos, fifo, in-memory channel, inter-thread communication, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







|


















<
<
<
<
<
<
<
<









292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317








318
319
320
321
322
323
324
325
326
The \fBtcl::chan::fifo2\fR package provides a command creating
pairs of channels which live purely in memory and are connected to
each other in a fifo manner\&. What is written to one half of the pair
can be read from the other half, in the same order\&. One particular
application for this is communication between threads, with one half
of the pair moved to the thread to talk to\&.
This is equivalent to the fifo2 channels provided by the package
\fBMmechan\fR, except that this is written in pure Tcl, not C\&. On
the other hand, \fBMemchan\fR is usable with Tcl 8\&.4 and before,
whereas this package requires Tcl 8\&.5 or higher, and \fBTclOO\fR\&.
.PP
The internal \fBTclOO\fR class implementing the channel
handler is a sub-class of the \fBtcl::chan::events\fR framework\&.
.SH API
.TP
\fB::tcl::chan::fifo2\fR
This command creates a new connected pair of fifo channels and returns
their handles, as a list containing two elements\&.
.PP
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
connected fifos, fifo, in-memory channel, inter-thread communication, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/tcllib_memchan.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'tcllib_memchan\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009-2017 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "tcl::chan::memchan" n 1\&.0\&.4 tcllib "Reflected/virtual channel support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,


|

|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'tcllib_memchan\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "tcl::chan::memchan" n 1 tcllib "Reflected/virtual channel support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBtcl::chan::events  ?1?\fR
.sp
package require \fBtcl::chan::memchan  ?1\&.0\&.4?\fR
.sp
\fB::tcl::chan::memchan\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBtcl::chan::memchan\fR package provides a command creating







|







276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBtcl::chan::events  ?1?\fR
.sp
package require \fBtcl::chan::memchan  ?1?\fR
.sp
\fB::tcl::chan::memchan\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBtcl::chan::memchan\fR package provides a command creating
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
in-memory channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009-2017 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<






|


308
309
310
311
312
313
314








315
316
317
318
319
320
321
322
323
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
in-memory channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/tcllib_null.n.

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
/dev/null, null, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









308
309
310
311
312
313
314








315
316
317
318
319
320
321
322
323
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
/dev/null, null, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/tcllib_random.n.

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
/dev/random, random, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









308
309
310
311
312
313
314








315
316
317
318
319
320
321
322
323
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
/dev/random, random, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/tcllib_string.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'tcllib_string\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "tcl::chan::string" n 1\&.0\&.3 tcllib "Reflected/virtual channel support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'tcllib_string\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "tcl::chan::string" n 1 tcllib "Reflected/virtual channel support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBtcl::chan::events  ?1?\fR
.sp
package require \fBtcl::chan::string  ?1\&.0\&.3?\fR
.sp
\fB::tcl::chan::string\fR \fIcontent\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBtcl::chan::string\fR package provides a command creating







|







276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBtcl::chan::events  ?1?\fR
.sp
package require \fBtcl::chan::string  ?1?\fR
.sp
\fB::tcl::chan::string\fR \fIcontent\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBtcl::chan::string\fR package provides a command creating
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
in-memory channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









308
309
310
311
312
313
314








315
316
317
318
319
320
321
322
323
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
in-memory channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/tcllib_variable.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'tcllib_variable\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "tcl::chan::variable" n 1\&.0\&.4 tcllib "Reflected/virtual channel support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'tcllib_variable\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "tcl::chan::variable" n 1 tcllib "Reflected/virtual channel support"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBtcl::chan::events  ?1?\fR
.sp
package require \fBtcl::chan::variable  ?1\&.0\&.4?\fR
.sp
\fB::tcl::chan::variable\fR \fIvarname\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBtcl::chan::variable\fR package provides a command creating







|







276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
.SH SYNOPSIS
package require \fBTcl  8\&.5\fR
.sp
package require \fBTclOO \fR
.sp
package require \fBtcl::chan::events  ?1?\fR
.sp
package require \fBtcl::chan::variable  ?1?\fR
.sp
\fB::tcl::chan::variable\fR \fIvarname\fR
.sp
.BE
.SH DESCRIPTION
.PP
The \fBtcl::chan::variable\fR package provides a command creating
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
in-memory channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









309
310
311
312
313
314
315








316
317
318
319
320
321
322
323
324
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
in-memory channel, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/tcllib_zero.n.

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
/dev/zero, reflected channel, tip 219, virtual channel, zero
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









308
309
310
311
312
313
314








315
316
317
318
319
320
321
322
323
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
/dev/zero, reflected channel, tip 219, virtual channel, zero
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_base/textwindow.n.

302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
Tk, reflected channel, text widget, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









302
303
304
305
306
307
308








309
310
311
312
313
314
315
316
317
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
Tk, reflected channel, text widget, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_core/core.n.

334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









334
335
336
337
338
339
340








341
342
343
344
345
346
347
348
349
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_core/events.n.

343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
event management, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









343
344
345
346
347
348
349








350
351
352
353
354
355
356
357
358
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
event management, reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_core/transformcore.n.

334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









334
335
336
337
338
339
340








341
342
343
344
345
346
347
348
349
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
reflected channel, tip 219, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/adler32.n.

328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
adler32, channel transformation, checksum, reflected channel, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









328
329
330
331
332
333
334








335
336
337
338
339
340
341
342
343
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
adler32, channel transformation, checksum, reflected channel, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/hex.n.

304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel transformation, hexadecimal, reflected channel, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









304
305
306
307
308
309
310








311
312
313
314
315
316
317
318
319
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel transformation, hexadecimal, reflected channel, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/identity.n.

311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel transformation, identity, reflected channel, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









311
312
313
314
315
316
317








318
319
320
321
322
323
324
325
326
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel transformation, identity, reflected channel, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/limitsize.n.

306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel transformation, limitsize, reflected channel, size limit, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









306
307
308
309
310
311
312








313
314
315
316
317
318
319
320
321
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel transformation, limitsize, reflected channel, size limit, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/observe.n.

310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel transformation, observer, reflected channel, stream copy, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









310
311
312
313
314
315
316








317
318
319
320
321
322
323
324
325
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel transformation, observer, reflected channel, stream copy, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/rot.n.

313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
caesar cipher, channel transformation, cipher, decryption, encryption, reflected channel, rot, rot13, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









313
314
315
316
317
318
319








320
321
322
323
324
325
326
327
328
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
caesar cipher, channel transformation, cipher, decryption, encryption, reflected channel, rot, rot13, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/spacer.n.

306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel transformation, reflected channel, spacing, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









306
307
308
309
310
311
312








313
314
315
316
317
318
319
320
321
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel transformation, reflected channel, spacing, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/tcllib_zlib.n.

304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel transformation, compression, decompression, reflected channel, tip 230, tip 234, transformation, virtual channel, zlib
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









304
305
306
307
308
309
310








311
312
313
314
315
316
317
318
319
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel transformation, compression, decompression, reflected channel, tip 230, tip 234, transformation, virtual channel, zlib
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/vt_base64.n.

304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
base64, channel transformation, reflected channel, tip 230, tip 317, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









304
305
306
307
308
309
310








311
312
313
314
315
316
317
318
319
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
base64, channel transformation, reflected channel, tip 230, tip 317, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/vt_counter.n.

327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel transformation, counter, reflected channel, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









327
328
329
330
331
332
333








334
335
336
337
338
339
340
341
342
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel transformation, counter, reflected channel, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/vt_crc32.n.

328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel transformation, checksum, crc32, reflected channel, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









328
329
330
331
332
333
334








335
336
337
338
339
340
341
342
343
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel transformation, checksum, crc32, reflected channel, tip 230, transformation, virtual channel
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/virtchannel_transform/vt_otp.n.

309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
channel transformation, cipher, decryption, encryption, one time pad, otp, reflected channel, tip 230, transformation, virtual channel, xor
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









309
310
311
312
313
314
315








316
317
318
319
320
321
322
323
324
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIvirtchannel\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
channel transformation, cipher, decryption, encryption, one time pad, otp, reflected channel, tip 230, transformation, virtual channel, xor
.SH CATEGORY
Channels
.SH COPYRIGHT
.nf
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/websocket/websocket.n.

470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
This command registers the (accept) socket \fIsock\fR as the
identifier fo an HTTP server that is capable of doing WebSockets\&.
Paths onto which this server will listen for incoming connections
should be declared using \fB::websocket::live\fR\&.
.TP
\fB::websocket::live\fR \fIsock\fR \fIpath\fR \fIcb\fR ?\fIproto\fR?
This procedure registers callbacks that will be performed on a
WebSocket compliant server registered with \fB::websocket::server\fR
whenever a client connects to a matching path and protocol\&.
\fIsock\fR is the listening socket of the websocket compliant server
declared using \fB::websocket::server\fR\&.  \fIpath\fR is a glob-style
path to match in client request, whenever this will occur\&.  \fIcb\fR
is the command to callback (see Callbacks)\&.  \fIproto\fR is a
glob-style protocol name matcher\&.
.TP







|







470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
This command registers the (accept) socket \fIsock\fR as the
identifier fo an HTTP server that is capable of doing WebSockets\&.
Paths onto which this server will listen for incoming connections
should be declared using \fB::websocket::live\fR\&.
.TP
\fB::websocket::live\fR \fIsock\fR \fIpath\fR \fIcb\fR ?\fIproto\fR?
This procedure registers callbacks that will be performed on a
WebSocket compliant server registered with \fB::websocket::server\fR]
whenever a client connects to a matching path and protocol\&.
\fIsock\fR is the listening socket of the websocket compliant server
declared using \fB::websocket::server\fR\&.  \fIpath\fR is a glob-style
path to match in client request, whenever this will occur\&.  \fIcb\fR
is the command to callback (see Callbacks)\&.  \fIproto\fR is a
glob-style protocol name matcher\&.
.TP
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691

set sock [::websocket::open ws://echo\&.websocket\&.org/ handler]
after 400 test $sock
vwait forever

.CE
.SH "TLS SECURITY CONSIDERATIONS"
.PP
This package uses the \fBTLS\fR package to handle the
security for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.







<
|
|







675
676
677
678
679
680
681

682
683
684
685
686
687
688
689
690

set sock [::websocket::open ws://echo\&.websocket\&.org/ handler]
after 400 test $sock
vwait forever

.CE
.SH "TLS SECURITY CONSIDERATIONS"

This package uses the \fBTLS\fR package to handle the security
for \fBhttps\fR urls and other socket connections\&.
.PP
Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of \fBTLS\fR, nor of
this package itself however\&.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well\&.
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIwebsocket\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
http
.SH KEYWORDS
http, internet, net, rfc 6455
.SH CATEGORY
Networking







<
<
<
<
<
<
<
<






708
709
710
711
712
713
714








715
716
717
718
719
720
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIwebsocket\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
http
.SH KEYWORDS
http, internet, net, rfc 6455
.SH CATEGORY
Networking

Changes to idoc/man/files/modules/wip/wip.n.

624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIwip\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
interpreter, list, word
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









624
625
626
627
628
629
630








631
632
633
634
635
636
637
638
639
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIwip\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
interpreter, list, word
.SH CATEGORY
Programming tools
.SH COPYRIGHT
.nf
Copyright (c) 2007-2010 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/yaml/huddle.n.

1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'huddle\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008-2011 KATO Kanryu <kanryu6@users\&.sourceforge\&.net>
'\" Copyright (c) 2015 Miguel Martínez López <aplicacionamedida@gmail\&.com>
'\"
.TH "huddle" n 0\&.3 tcllib "HUDDLE"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,





|







1
2
3
4
5
6
7
8
9
10
11
12
13
'\"
'\" Generated from file 'huddle\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008-2011 KATO Kanryu <kanryu6@users\&.sourceforge\&.net>
'\" Copyright (c) 2015 Miguel Martínez López <aplicacionamedida@gmail\&.com>
'\"
.TH "huddle" n 0\&.2 tcllib "HUDDLE"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
huddle \- Create and manipulate huddle object
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBhuddle  ?0\&.3?\fR
.sp
\fBhuddle create\fR \fIkey\fR \fIvalue\fR ?\fIkey value \&.\&.\&.\fR?
.sp
\fBhuddle list\fR ?\fIvalue value \&.\&.\&.\fR?
.sp
\fBhuddle number\fR \fInumber\fR
.sp







|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
..
.BS
.SH NAME
huddle \- Create and manipulate huddle object
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBhuddle  ?0\&.2?\fR
.sp
\fBhuddle create\fR \fIkey\fR \fIvalue\fR ?\fIkey value \&.\&.\&.\fR?
.sp
\fBhuddle list\fR ?\fIvalue value \&.\&.\&.\fR?
.sp
\fBhuddle number\fR \fInumber\fR
.sp
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIhuddle\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
yaml
.SH KEYWORDS
data exchange, exchange format, huddle, json, parsing, text processing, yaml
.SH COPYRIGHT
.nf
Copyright (c) 2008-2011 KATO Kanryu <kanryu6@users\&.sourceforge\&.net>
Copyright (c) 2015 Miguel Martínez López <aplicacionamedida@gmail\&.com>

.fi







<
<
<
<
<
<
<
<










884
885
886
887
888
889
890








891
892
893
894
895
896
897
898
899
900
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIhuddle\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
yaml
.SH KEYWORDS
data exchange, exchange format, huddle, json, parsing, text processing, yaml
.SH COPYRIGHT
.nf
Copyright (c) 2008-2011 KATO Kanryu <kanryu6@users\&.sourceforge\&.net>
Copyright (c) 2015 Miguel Martínez López <aplicacionamedida@gmail\&.com>

.fi

Changes to idoc/man/files/modules/yaml/yaml.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'yaml\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008 KATO Kanryu <kanryu6@users\&.sourceforge\&.net>
'\"
.TH "yaml" n 0\&.4\&.1 tcllib "YAML processing"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'yaml\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008 KATO Kanryu <kanryu6@users\&.sourceforge\&.net>
'\"
.TH "yaml" n 0\&.3\&.9 tcllib "YAML processing"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
yaml \- YAML Format Encoder/Decoder
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fByaml  ?0\&.4\&.1?\fR
.sp
\fB::yaml::yaml2dict\fR ?\fIoptions\fR? \fItxt\fR
.sp
\fB::yaml::yaml2huddle\fR ?\fIoptions\fR? \fItxt\fR
.sp
\fB::yaml::setOption\fR ?\fIoptions\fR?
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
yaml \- YAML Format Encoder/Decoder
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fByaml  ?0\&.3\&.9?\fR
.sp
\fB::yaml::yaml2dict\fR ?\fIoptions\fR? \fItxt\fR
.sp
\fB::yaml::yaml2huddle\fR ?\fIoptions\fR? \fItxt\fR
.sp
\fB::yaml::setOption\fR ?\fIoptions\fR?
.sp
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIyaml\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH "SEE ALSO"
base64, huddle, json
.SH KEYWORDS
data exchange, huddle, parsing, text processing, yaml
.SH COPYRIGHT
.nf
Copyright (c) 2008 KATO Kanryu <kanryu6@users\&.sourceforge\&.net>

.fi







<
<
<
<
<
<
<
<









456
457
458
459
460
461
462








463
464
465
466
467
468
469
470
471
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIyaml\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH "SEE ALSO"
base64, huddle, json
.SH KEYWORDS
data exchange, huddle, parsing, text processing, yaml
.SH COPYRIGHT
.nf
Copyright (c) 2008 KATO Kanryu <kanryu6@users\&.sourceforge\&.net>

.fi

Changes to idoc/man/files/modules/zip/decode.n.

271
272
273
274
275
276
277


278
279
280
281
282
283
284
.QW ""
..
.BS
.SH NAME
zipfile::decode \- Access to zip archives
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR


.sp
package require \fBfileutil::decode  0\&.2\&.1\fR
.sp
package require \fBTrf \fR
.sp
package require \fBzlibtcl \fR
.sp







>
>







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.QW ""
..
.BS
.SH NAME
zipfile::decode \- Access to zip archives
.SH SYNOPSIS
package require \fBTcl  8\&.4\fR
.sp
package require \fBfileutil::magic::mimetype \fR
.sp
package require \fBfileutil::decode  0\&.2\&.1\fR
.sp
package require \fBTrf \fR
.sp
package require \fBzlibtcl \fR
.sp
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
\fB::zipfile::decode::unzip\fR \fIadict\fR \fIdstdir\fR
.sp
\fB::zipfile::decode::unzipfile\fR \fIarchive\fR \fIdstdir\fR
.sp
.BE
.SH DESCRIPTION
.PP
Note: packages Trf and zlibtcl are not required if TCL 8\&.6 is available\&.
This package provides commands to decompress and access the contents
of zip archives\&.
.SH API
.TP
\fB::zipfile::decode::archive\fR
This command decodes the last opened (and not yet closed) zip archive
file\&.







<







309
310
311
312
313
314
315

316
317
318
319
320
321
322
\fB::zipfile::decode::unzip\fR \fIadict\fR \fIdstdir\fR
.sp
\fB::zipfile::decode::unzipfile\fR \fIarchive\fR \fIdstdir\fR
.sp
.BE
.SH DESCRIPTION
.PP

This package provides commands to decompress and access the contents
of zip archives\&.
.SH API
.TP
\fB::zipfile::decode::archive\fR
This command decodes the last opened (and not yet closed) zip archive
file\&.
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIzipfile\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
decompression, zip
.SH CATEGORY
File
.SH COPYRIGHT
.nf
Copyright (c) 2008-2016 Andreas Kupries

.fi







<
<
<
<
<
<
<
<









393
394
395
396
397
398
399








400
401
402
403
404
405
406
407
408
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIzipfile\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
decompression, zip
.SH CATEGORY
File
.SH COPYRIGHT
.nf
Copyright (c) 2008-2016 Andreas Kupries

.fi

Changes to idoc/man/files/modules/zip/encode.n.

348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIzipfile\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
compression, zip
.SH CATEGORY
File
.SH COPYRIGHT
.nf
Copyright (c) 2008-2009 Andreas Kupries

.fi







<
<
<
<
<
<
<
<









348
349
350
351
352
353
354








355
356
357
358
359
360
361
362
363
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIzipfile\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
compression, zip
.SH CATEGORY
File
.SH COPYRIGHT
.nf
Copyright (c) 2008-2009 Andreas Kupries

.fi

Changes to idoc/man/files/modules/zip/mkzip.n.

1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'mkzip\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Pat Thoyts
'\"
.TH "zipfile::mkzip" n 1\&.2\&.1 tcllib "Zip archive creation"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'mkzip\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2009 Pat Thoyts
'\"
.TH "zipfile::mkzip" n 1\&.2 tcllib "Zip archive creation"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
zipfile::mkzip \- Build a zip archive
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBzipfile::mkzip  ?1\&.2\&.1?\fR
.sp
\fB::zipfile::mkzip::mkzip\fR \fIzipfile\fR ?\fB-zipkit\fR? ?\fB-runtime\fR \fIprefix\fR? ?\fB-comment\fR \fIstring\fR? ?\fB-directory\fR \fIrootpath\fR? ?\fB-exclude\fR \fIexclude\fR? ?\fB--\fR? ?\fIpath\fR\&.\&.\&.?
.sp
.BE
.SH DESCRIPTION
.PP
This package utilizes the zlib functions in Tcl 8\&.6 to build zip







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
zipfile::mkzip \- Build a zip archive
.SH SYNOPSIS
package require \fBTcl  8\&.6\fR
.sp
package require \fBzipfile::mkzip  ?1\&.2?\fR
.sp
\fB::zipfile::mkzip::mkzip\fR \fIzipfile\fR ?\fB-zipkit\fR? ?\fB-runtime\fR \fIprefix\fR? ?\fB-comment\fR \fIstring\fR? ?\fB-directory\fR \fIrootpath\fR? ?\fB-exclude\fR \fIexclude\fR? ?\fB--\fR? ?\fIpath\fR\&.\&.\&.?
.sp
.BE
.SH DESCRIPTION
.PP
This package utilizes the zlib functions in Tcl 8\&.6 to build zip
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIzipfile\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.
.PP
When proposing code changes, please provide \fIunified diffs\fR,
i\&.e the output of \fBdiff -u\fR\&.
.PP
Note further that \fIattachments\fR are strongly preferred over
inlined patches\&. Attachments can be made by going to the \fBEdit\fR
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar\&.
.SH KEYWORDS
decompression, zip
.SH CATEGORY
File
.SH COPYRIGHT
.nf
Copyright (c) 2009 Pat Thoyts

.fi







<
<
<
<
<
<
<
<









372
373
374
375
376
377
378








379
380
381
382
383
384
385
386
387
.SH "BUGS, IDEAS, FEEDBACK"
This document, and the package it describes, will undoubtedly contain
bugs and other problems\&.
Please report such in the category \fIzipfile\fR of the
\fITcllib Trackers\fR [http://core\&.tcl\&.tk/tcllib/reportlist]\&.
Please also report any ideas for enhancements you may have for either
package and/or documentation\&.








.SH KEYWORDS
decompression, zip
.SH CATEGORY
File
.SH COPYRIGHT
.nf
Copyright (c) 2009 Pat Thoyts

.fi

Changes to idoc/man/index.n.

325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
.TP
\fBfiles/modules/des/tcldes\&.n\fR
tclDES
.TP
\fBfiles/modules/des/tcldesjr\&.n\fR
tclDESjr
.RE
AMEX
.RS
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.RE
AST
.RS
.TP
\fBfiles/modules/grammar_me/me_ast\&.n\fR
grammar::me_ast
.RE
American Express
.RS
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.RE
BWidget
.RS
.TP
\fBfiles/modules/snit/snit\&.n\fR
snit
.TP
\fBfiles/modules/snit/snitfaq\&.n\fR
snitfaq
.RE
Bessel functions
.RS
.TP
\fBfiles/modules/math/special\&.n\fR
math::special
.RE
BitTorrent
.RS
.TP
\fBfiles/modules/bee/bee\&.n\fR
bee
.RE
Book Number
.RS
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
C
.RS
.TP
\fBfiles/modules/doctools2idx/idx_msgcat_c\&.n\fR
doctools::msgcat::idx::c
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_c\&.n\fR
doctools::msgcat::toc::c
.RE
C++
.RS
.TP
\fBfiles/modules/snit/snit\&.n\fR
snit
.TP
\fBfiles/modules/snit/snitfaq\&.n\fR
snitfaq
.TP
\fBfiles/modules/stooop/stooop\&.n\fR
stooop
.TP
\fBfiles/modules/stooop/switched\&.n\fR
switched
.RE
CFG
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.RE
CFL
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.RE
CGI
.RS
.TP
\fBfiles/modules/ncgi/ncgi\&.n\fR
ncgi
.RE
CONTAINER
.RS
.TP
\fBfiles/modules/pt/pt_peg_export_container\&.n\fR
pt::peg::export::container
.TP
\fBfiles/modules/pt/pt_peg_to_container\&.n\fR
pt::peg::to::container
.RE
CPARAM
.RS
.TP
\fBfiles/modules/pt/pt_peg_to_cparam\&.n\fR
pt::peg::to::cparam
.RE
CSS
.RS
.TP
\fBfiles/modules/doctools2base/html_cssdefaults\&.n\fR
doctools::html::cssdefaults
.RE
CVS
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE
Checking
.RS
.TP
\fBfiles/modules/valtype/valtype_common\&.n\fR
valtype::common
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.TP
\fBfiles/modules/valtype/luhn\&.n\fR
valtype::luhn
.TP
\fBfiles/modules/valtype/luhn5\&.n\fR
valtype::luhn5
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
Cost
.RS
.TP
\fBfiles/modules/treeql/treeql\&.n\fR
treeql
.RE
DE
.RS
.TP
\fBfiles/modules/doctools2idx/idx_msgcat_de\&.n\fR
doctools::msgcat::idx::de
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_de\&.n\fR
doctools::msgcat::toc::de
.RE
DES
.RS
.TP
\fBfiles/modules/des/des\&.n\fR
des
.TP
\fBfiles/modules/des/tcldes\&.n\fR
tclDES
.TP
\fBfiles/modules/des/tcldesjr\&.n\fR
tclDESjr
.RE
DNS
.RS
.TP
\fBfiles/modules/dns/tcllib_dns\&.n\fR
dns
.RE
DOM
.RS
.TP
\fBfiles/modules/treeql/treeql\&.n\fR
treeql
.RE
Discover
.RS
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.RE
EAN
.RS
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
EAN13
.RS
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
EBNF
.RS
.TP
\fBfiles/apps/pt\&.n\fR
pt
.TP
\fBfiles/modules/pt/pt_astree\&.n\fR
pt::ast
.TP
\fBfiles/modules/pt/pt_cparam_config_critcl\&.n\fR
pt::cparam::configuration::critcl
.TP
\fBfiles/modules/pt/pt_cparam_config_tea\&.n\fR
pt::cparam::configuration::tea
.TP
\fBfiles/modules/pt/pt_json_language\&.n\fR
pt::json_language
.TP
\fBfiles/modules/pt/pt_param\&.n\fR
pt::param
.TP
\fBfiles/modules/pt/pt_pexpression\&.n\fR
pt::pe
.TP
\fBfiles/modules/pt/pt_pexpr_op\&.n\fR
pt::pe::op
.TP
\fBfiles/modules/pt/pt_pegrammar\&.n\fR
pt::peg
.TP
\fBfiles/modules/pt/pt_peg_container\&.n\fR
pt::peg::container
.TP
\fBfiles/modules/pt/pt_peg_container_peg\&.n\fR
pt::peg::container::peg
.TP
\fBfiles/modules/pt/pt_peg_export\&.n\fR
pt::peg::export
.TP
\fBfiles/modules/pt/pt_peg_export_container\&.n\fR
pt::peg::export::container
.TP
\fBfiles/modules/pt/pt_peg_export_json\&.n\fR
pt::peg::export::json
.TP
\fBfiles/modules/pt/pt_peg_export_peg\&.n\fR
pt::peg::export::peg
.TP
\fBfiles/modules/pt/pt_peg_from_container\&.n\fR
pt::peg::from::container
.TP
\fBfiles/modules/pt/pt_peg_from_json\&.n\fR
pt::peg::from::json
.TP
\fBfiles/modules/pt/pt_peg_from_peg\&.n\fR
pt::peg::from::peg
.TP
\fBfiles/modules/pt/pt_peg_import\&.n\fR
pt::peg::import
.TP
\fBfiles/modules/pt/pt_peg_import_container\&.n\fR
pt::peg::import::container
.TP
\fBfiles/modules/pt/pt_peg_import_json\&.n\fR
pt::peg::import::json
.TP
\fBfiles/modules/pt/pt_peg_import_peg\&.n\fR
pt::peg::import::peg
.TP
\fBfiles/modules/pt/pt_peg_interp\&.n\fR
pt::peg::interp
.TP
\fBfiles/modules/pt/pt_peg_to_container\&.n\fR
pt::peg::to::container
.TP
\fBfiles/modules/pt/pt_peg_to_cparam\&.n\fR
pt::peg::to::cparam
.TP
\fBfiles/modules/pt/pt_peg_to_json\&.n\fR
pt::peg::to::json
.TP
\fBfiles/modules/pt/pt_peg_to_param\&.n\fR
pt::peg::to::param
.TP
\fBfiles/modules/pt/pt_peg_to_peg\&.n\fR
pt::peg::to::peg
.TP
\fBfiles/modules/pt/pt_peg_to_tclparam\&.n\fR
pt::peg::to::tclparam
.TP
\fBfiles/modules/pt/pt_peg_language\&.n\fR
pt::peg_language
.TP
\fBfiles/modules/pt/pt_peg_introduction\&.n\fR
pt::pegrammar
.TP
\fBfiles/modules/pt/pt_pgen\&.n\fR
pt::pgen
.TP
\fBfiles/modules/pt/pt_rdengine\&.n\fR
pt::rde
.TP
\fBfiles/modules/pt/pt_tclparam_config_nx\&.n\fR
pt::tclparam::configuration::nx
.TP
\fBfiles/modules/pt/pt_tclparam_config_snit\&.n\fR
pt::tclparam::configuration::snit
.TP
\fBfiles/modules/pt/pt_tclparam_config_tcloo\&.n\fR
pt::tclparam::configuration::tcloo
.TP
\fBfiles/modules/pt/pt_util\&.n\fR
pt::util
.TP
\fBfiles/modules/pt/pt_to_api\&.n\fR
pt_export_api
.TP
\fBfiles/modules/pt/pt_from_api\&.n\fR
pt_import_api
.TP
\fBfiles/modules/pt/pt_introduction\&.n\fR
pt_introduction
.TP
\fBfiles/modules/pt/pt_parse_peg\&.n\fR
pt_parse_peg
.TP
\fBfiles/modules/pt/pt_parser_api\&.n\fR
pt_parser_api
.TP
\fBfiles/modules/pt/pt_peg_op\&.n\fR
pt_peg_op
.RE
EN
.RS
.TP
\fBfiles/modules/doctools2idx/idx_msgcat_en\&.n\fR
doctools::msgcat::idx::en
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_en\&.n\fR
doctools::msgcat::toc::en
.RE
European Article Number
.RS
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
FFT
.RS
.TP
\fBfiles/modules/math/fourier\&.n\fR
math::fourier
.RE
FIPS 180-1
.RS
.TP
\fBfiles/modules/sha1/sha1\&.n\fR
sha1
.TP
\fBfiles/modules/sha1/sha256\&.n\fR
sha256
.RE
FR
.RS
.TP
\fBfiles/modules/doctools2idx/idx_msgcat_fr\&.n\fR
doctools::msgcat::idx::fr
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_fr\&.n\fR
doctools::msgcat::toc::fr
.RE
Fisher-Yates
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
Fourier transform
.RS
.TP
\fBfiles/modules/math/fourier\&.n\fR
math::fourier
.RE
GUID
.RS
.TP
\fBfiles/modules/uuid/uuid\&.n\fR
uuid
.RE
HTML
.RS
.TP
\fBfiles/modules/doctools/doctools\&.n\fR
doctools
.TP
\fBfiles/modules/doctools2base/html_cssdefaults\&.n\fR
doctools::html::cssdefaults
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools/docidx\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools2idx/idx_export\&.n\fR
doctools::idx::export
.TP
\fBfiles/modules/doctools2idx/idx_export_html\&.n\fR
doctools::idx::export::html
.TP
\fBfiles/modules/doctools/doctoc\&.n\fR
doctools::toc
.TP
\fBfiles/modules/doctools2toc/toc_container\&.n\fR
doctools::toc
.TP
\fBfiles/modules/doctools2toc/toc_export\&.n\fR
doctools::toc::export
.TP
\fBfiles/modules/doctools2toc/toc_export_html\&.n\fR
doctools::toc::export::html
.TP
\fBfiles/apps/dtplite\&.n\fR
dtplite
.TP
\fBfiles/modules/dtplite/pkg_dtplite\&.n\fR
dtplite
.TP
\fBfiles/modules/doctools/mpexpand\&.n\fR
mpexpand
.RE
IBAN
.RS
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.RE
IMEI
.RS
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.RE
ISBN
.RS
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
Incr Tcl
.RS
.TP
\fBfiles/modules/snit/snit\&.n\fR
snit
.TP
\fBfiles/modules/snit/snitfaq\&.n\fR
snitfaq
.RE
International Article Number
.RS
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
International Bank Account Number
.RS
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.RE
International Mobile Equipment Identity
.RS
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.RE
International Standard Book Number
.RS
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
JSON
.RS
.TP
\fBfiles/modules/doctools2idx/idx_export_json\&.n\fR
doctools::idx::export::json
.TP
\fBfiles/modules/doctools2idx/idx_import_json\&.n\fR
doctools::idx::import::json
.TP
\fBfiles/modules/doctools2toc/toc_export_json\&.n\fR
doctools::toc::export::json
.TP
\fBfiles/modules/doctools2toc/toc_import_json\&.n\fR
doctools::toc::import::json
.TP
\fBfiles/modules/pt/pt_peg_export_json\&.n\fR
pt::peg::export::json
.TP
\fBfiles/modules/pt/pt_peg_from_json\&.n\fR
pt::peg::from::json
.TP
\fBfiles/modules/pt/pt_peg_import_json\&.n\fR
pt::peg::import::json
.TP
\fBfiles/modules/pt/pt_peg_to_json\&.n\fR
pt::peg::to::json
.RE
LL(k)
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.TP
\fBfiles/modules/grammar_peg/peg\&.n\fR
grammar::peg
.TP
\fBfiles/modules/grammar_peg/peg_interp\&.n\fR
grammar::peg::interp
.TP
\fBfiles/apps/pt\&.n\fR
pt
.TP
\fBfiles/modules/pt/pt_astree\&.n\fR
pt::ast
.TP
\fBfiles/modules/pt/pt_cparam_config_critcl\&.n\fR
pt::cparam::configuration::critcl
.TP
\fBfiles/modules/pt/pt_cparam_config_tea\&.n\fR
pt::cparam::configuration::tea
.TP
\fBfiles/modules/pt/pt_json_language\&.n\fR
pt::json_language
.TP
\fBfiles/modules/pt/pt_param\&.n\fR
pt::param
.TP
\fBfiles/modules/pt/pt_pexpression\&.n\fR
pt::pe
.TP
\fBfiles/modules/pt/pt_pexpr_op\&.n\fR
pt::pe::op
.TP
\fBfiles/modules/pt/pt_pegrammar\&.n\fR
pt::peg
.TP
\fBfiles/modules/pt/pt_peg_container\&.n\fR
pt::peg::container
.TP
\fBfiles/modules/pt/pt_peg_container_peg\&.n\fR
pt::peg::container::peg
.TP
\fBfiles/modules/pt/pt_peg_export\&.n\fR
pt::peg::export
.TP
\fBfiles/modules/pt/pt_peg_export_container\&.n\fR
pt::peg::export::container
.TP
\fBfiles/modules/pt/pt_peg_export_json\&.n\fR
pt::peg::export::json
.TP
\fBfiles/modules/pt/pt_peg_export_peg\&.n\fR
pt::peg::export::peg
.TP
\fBfiles/modules/pt/pt_peg_from_container\&.n\fR
pt::peg::from::container
.TP
\fBfiles/modules/pt/pt_peg_from_json\&.n\fR
pt::peg::from::json
.TP
\fBfiles/modules/pt/pt_peg_from_peg\&.n\fR
pt::peg::from::peg
.TP
\fBfiles/modules/pt/pt_peg_import\&.n\fR
pt::peg::import
.TP
\fBfiles/modules/pt/pt_peg_import_container\&.n\fR
pt::peg::import::container
.TP
\fBfiles/modules/pt/pt_peg_import_json\&.n\fR
pt::peg::import::json
.TP
\fBfiles/modules/pt/pt_peg_import_peg\&.n\fR
pt::peg::import::peg
.TP
\fBfiles/modules/pt/pt_peg_interp\&.n\fR
pt::peg::interp
.TP
\fBfiles/modules/pt/pt_peg_to_container\&.n\fR
pt::peg::to::container
.TP
\fBfiles/modules/pt/pt_peg_to_cparam\&.n\fR
pt::peg::to::cparam
.TP
\fBfiles/modules/pt/pt_peg_to_json\&.n\fR
pt::peg::to::json
.TP
\fBfiles/modules/pt/pt_peg_to_param\&.n\fR
pt::peg::to::param
.TP
\fBfiles/modules/pt/pt_peg_to_peg\&.n\fR
pt::peg::to::peg
.TP
\fBfiles/modules/pt/pt_peg_to_tclparam\&.n\fR
pt::peg::to::tclparam
.TP
\fBfiles/modules/pt/pt_peg_language\&.n\fR
pt::peg_language
.TP
\fBfiles/modules/pt/pt_peg_introduction\&.n\fR
pt::pegrammar
.TP
\fBfiles/modules/pt/pt_pgen\&.n\fR
pt::pgen
.TP
\fBfiles/modules/pt/pt_rdengine\&.n\fR
pt::rde
.TP
\fBfiles/modules/pt/pt_tclparam_config_nx\&.n\fR
pt::tclparam::configuration::nx
.TP
\fBfiles/modules/pt/pt_tclparam_config_snit\&.n\fR
pt::tclparam::configuration::snit
.TP
\fBfiles/modules/pt/pt_tclparam_config_tcloo\&.n\fR
pt::tclparam::configuration::tcloo
.TP
\fBfiles/modules/pt/pt_util\&.n\fR
pt::util
.TP
\fBfiles/modules/pt/pt_to_api\&.n\fR
pt_export_api
.TP
\fBfiles/modules/pt/pt_from_api\&.n\fR
pt_import_api
.TP
\fBfiles/modules/pt/pt_introduction\&.n\fR
pt_introduction
.TP
\fBfiles/modules/pt/pt_parse_peg\&.n\fR
pt_parse_peg
.TP
\fBfiles/modules/pt/pt_parser_api\&.n\fR
pt_parser_api
.TP
\fBfiles/modules/pt/pt_peg_op\&.n\fR
pt_peg_op
.RE
LaTeX
.RS
.TP
\fBfiles/modules/docstrip/docstrip\&.n\fR
docstrip
.TP
\fBfiles/modules/docstrip/docstrip_util\&.n\fR
docstrip_util
.TP
\fBfiles/apps/tcldocstrip\&.n\fR
tcldocstrip
.RE
MasterCard
.RS
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.RE
NPI
.RS
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.RE
NTLM
.RS
.TP
\fBfiles/modules/sasl/ntlm\&.n\fR
SASL::NTLM
.RE
NTP
.RS
.TP
\fBfiles/modules/ntp/ntp_time\&.n\fR
ntp_time
.RE
National Provider Identifier
.RS
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.RE
PARAM
.RS
.TP
\fBfiles/modules/pt/pt_peg_to_param\&.n\fR
pt::peg::to::param
.RE
PCA
.RS
.TP
\fBfiles/modules/math/pca\&.n\fR
math::PCA
.RE
PEG
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.TP
\fBfiles/modules/page/page_util_norm_peg\&.n\fR
page_util_norm_peg
.TP
\fBfiles/modules/page/page_util_peg\&.n\fR
page_util_peg
.TP
\fBfiles/apps/pt\&.n\fR
pt
.TP
\fBfiles/modules/pt/pt_astree\&.n\fR
pt::ast
.TP
\fBfiles/modules/pt/pt_cparam_config_critcl\&.n\fR
pt::cparam::configuration::critcl
.TP
\fBfiles/modules/pt/pt_cparam_config_tea\&.n\fR
pt::cparam::configuration::tea
.TP
\fBfiles/modules/pt/pt_json_language\&.n\fR
pt::json_language
.TP
\fBfiles/modules/pt/pt_param\&.n\fR
pt::param
.TP
\fBfiles/modules/pt/pt_pexpression\&.n\fR
pt::pe
.TP
\fBfiles/modules/pt/pt_pexpr_op\&.n\fR
pt::pe::op
.TP
\fBfiles/modules/pt/pt_pegrammar\&.n\fR
pt::peg
.TP
\fBfiles/modules/pt/pt_peg_container\&.n\fR
pt::peg::container
.TP
\fBfiles/modules/pt/pt_peg_container_peg\&.n\fR
pt::peg::container::peg
.TP
\fBfiles/modules/pt/pt_peg_export\&.n\fR
pt::peg::export
.TP
\fBfiles/modules/pt/pt_peg_export_container\&.n\fR
pt::peg::export::container
.TP
\fBfiles/modules/pt/pt_peg_export_json\&.n\fR
pt::peg::export::json
.TP
\fBfiles/modules/pt/pt_peg_export_peg\&.n\fR
pt::peg::export::peg
.TP
\fBfiles/modules/pt/pt_peg_from_container\&.n\fR
pt::peg::from::container
.TP
\fBfiles/modules/pt/pt_peg_from_json\&.n\fR
pt::peg::from::json
.TP
\fBfiles/modules/pt/pt_peg_from_peg\&.n\fR
pt::peg::from::peg
.TP
\fBfiles/modules/pt/pt_peg_import\&.n\fR
pt::peg::import
.TP
\fBfiles/modules/pt/pt_peg_import_container\&.n\fR
pt::peg::import::container
.TP
\fBfiles/modules/pt/pt_peg_import_json\&.n\fR
pt::peg::import::json
.TP
\fBfiles/modules/pt/pt_peg_import_peg\&.n\fR
pt::peg::import::peg
.TP
\fBfiles/modules/pt/pt_peg_interp\&.n\fR
pt::peg::interp
.TP
\fBfiles/modules/pt/pt_peg_to_container\&.n\fR
pt::peg::to::container
.TP
\fBfiles/modules/pt/pt_peg_to_cparam\&.n\fR
pt::peg::to::cparam
.TP
\fBfiles/modules/pt/pt_peg_to_json\&.n\fR
pt::peg::to::json
.TP
\fBfiles/modules/pt/pt_peg_to_param\&.n\fR
pt::peg::to::param
.TP
\fBfiles/modules/pt/pt_peg_to_peg\&.n\fR
pt::peg::to::peg
.TP
\fBfiles/modules/pt/pt_peg_to_tclparam\&.n\fR
pt::peg::to::tclparam
.TP
\fBfiles/modules/pt/pt_peg_language\&.n\fR
pt::peg_language
.TP
\fBfiles/modules/pt/pt_peg_introduction\&.n\fR
pt::pegrammar
.TP
\fBfiles/modules/pt/pt_pgen\&.n\fR
pt::pgen
.TP
\fBfiles/modules/pt/pt_rdengine\&.n\fR
pt::rde
.TP
\fBfiles/modules/pt/pt_tclparam_config_nx\&.n\fR
pt::tclparam::configuration::nx
.TP
\fBfiles/modules/pt/pt_tclparam_config_snit\&.n\fR
pt::tclparam::configuration::snit
.TP
\fBfiles/modules/pt/pt_tclparam_config_tcloo\&.n\fR
pt::tclparam::configuration::tcloo
.TP
\fBfiles/modules/pt/pt_util\&.n\fR
pt::util
.TP
\fBfiles/modules/pt/pt_to_api\&.n\fR
pt_export_api
.TP
\fBfiles/modules/pt/pt_from_api\&.n\fR
pt_import_api
.TP
\fBfiles/modules/pt/pt_introduction\&.n\fR
pt_introduction
.TP
\fBfiles/modules/pt/pt_parse_peg\&.n\fR
pt_parse_peg
.TP
\fBfiles/modules/pt/pt_parser_api\&.n\fR
pt_parser_api
.TP
\fBfiles/modules/pt/pt_peg_op\&.n\fR
pt_peg_op
.RE
RCS
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE
RCS patch
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE
RFC 2718
.RS
.TP
\fBfiles/modules/oauth/oauth\&.n\fR
oauth
.RE
RFC 5849
.RS
.TP
\fBfiles/modules/oauth/oauth\&.n\fR
oauth
.RE
RIPEMD
.RS
.TP
\fBfiles/modules/ripemd/ripemd128\&.n\fR
ripemd128
.TP
\fBfiles/modules/ripemd/ripemd160\&.n\fR
ripemd160
.RE
SASL
.RS
.TP
\fBfiles/modules/sasl/sasl\&.n\fR
SASL
.TP
\fBfiles/modules/sasl/ntlm\&.n\fR
SASL::NTLM
.TP
\fBfiles/modules/sasl/scram\&.n\fR
SASL::SCRAM
.TP
\fBfiles/modules/sasl/gtoken\&.n\fR
SASL::XGoogleToken
.RE
SCCS
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE
SCRAM
.RS
.TP
\fBfiles/modules/sasl/scram\&.n\fR
SASL::SCRAM
.RE
SNTP
.RS
.TP
\fBfiles/modules/ntp/ntp_time\&.n\fR
ntp_time
.RE
Snit
.RS
.TP
\fBfiles/modules/snit/snit\&.n\fR
snit
.RE
TCLPARAM
.RS
.TP
\fBfiles/modules/pt/pt_peg_to_tclparam\&.n\fR
pt::peg::to::tclparam
.RE
TDPL
.RS
.TP
\fBfiles/modules/grammar_peg/peg\&.n\fR
grammar::peg
.TP
\fBfiles/modules/grammar_peg/peg_interp\&.n\fR
grammar::peg::interp
.TP
\fBfiles/apps/pt\&.n\fR
pt
.TP
\fBfiles/modules/pt/pt_astree\&.n\fR
pt::ast
.TP
\fBfiles/modules/pt/pt_cparam_config_critcl\&.n\fR
pt::cparam::configuration::critcl
.TP
\fBfiles/modules/pt/pt_cparam_config_tea\&.n\fR
pt::cparam::configuration::tea
.TP
\fBfiles/modules/pt/pt_json_language\&.n\fR
pt::json_language
.TP
\fBfiles/modules/pt/pt_param\&.n\fR
pt::param
.TP
\fBfiles/modules/pt/pt_pexpression\&.n\fR
pt::pe
.TP
\fBfiles/modules/pt/pt_pexpr_op\&.n\fR
pt::pe::op
.TP
\fBfiles/modules/pt/pt_pegrammar\&.n\fR
pt::peg
.TP
\fBfiles/modules/pt/pt_peg_container\&.n\fR
pt::peg::container
.TP
\fBfiles/modules/pt/pt_peg_container_peg\&.n\fR
pt::peg::container::peg
.TP
\fBfiles/modules/pt/pt_peg_export\&.n\fR
pt::peg::export
.TP
\fBfiles/modules/pt/pt_peg_export_container\&.n\fR
pt::peg::export::container
.TP
\fBfiles/modules/pt/pt_peg_export_json\&.n\fR
pt::peg::export::json
.TP
\fBfiles/modules/pt/pt_peg_export_peg\&.n\fR
pt::peg::export::peg
.TP
\fBfiles/modules/pt/pt_peg_from_container\&.n\fR
pt::peg::from::container
.TP
\fBfiles/modules/pt/pt_peg_from_json\&.n\fR
pt::peg::from::json
.TP
\fBfiles/modules/pt/pt_peg_from_peg\&.n\fR
pt::peg::from::peg
.TP
\fBfiles/modules/pt/pt_peg_import\&.n\fR
pt::peg::import
.TP
\fBfiles/modules/pt/pt_peg_import_container\&.n\fR
pt::peg::import::container
.TP
\fBfiles/modules/pt/pt_peg_import_json\&.n\fR
pt::peg::import::json
.TP
\fBfiles/modules/pt/pt_peg_import_peg\&.n\fR
pt::peg::import::peg
.TP
\fBfiles/modules/pt/pt_peg_interp\&.n\fR
pt::peg::interp
.TP
\fBfiles/modules/pt/pt_peg_to_container\&.n\fR
pt::peg::to::container
.TP
\fBfiles/modules/pt/pt_peg_to_cparam\&.n\fR
pt::peg::to::cparam
.TP
\fBfiles/modules/pt/pt_peg_to_json\&.n\fR
pt::peg::to::json
.TP
\fBfiles/modules/pt/pt_peg_to_param\&.n\fR
pt::peg::to::param
.TP
\fBfiles/modules/pt/pt_peg_to_peg\&.n\fR
pt::peg::to::peg
.TP
\fBfiles/modules/pt/pt_peg_to_tclparam\&.n\fR
pt::peg::to::tclparam
.TP
\fBfiles/modules/pt/pt_peg_language\&.n\fR
pt::peg_language
.TP
\fBfiles/modules/pt/pt_peg_introduction\&.n\fR
pt::pegrammar
.TP
\fBfiles/modules/pt/pt_pgen\&.n\fR
pt::pgen
.TP
\fBfiles/modules/pt/pt_rdengine\&.n\fR
pt::rde
.TP
\fBfiles/modules/pt/pt_tclparam_config_nx\&.n\fR
pt::tclparam::configuration::nx
.TP
\fBfiles/modules/pt/pt_tclparam_config_snit\&.n\fR
pt::tclparam::configuration::snit
.TP
\fBfiles/modules/pt/pt_tclparam_config_tcloo\&.n\fR
pt::tclparam::configuration::tcloo
.TP
\fBfiles/modules/pt/pt_util\&.n\fR
pt::util
.TP
\fBfiles/modules/pt/pt_to_api\&.n\fR
pt_export_api
.TP
\fBfiles/modules/pt/pt_from_api\&.n\fR
pt_import_api
.TP
\fBfiles/modules/pt/pt_introduction\&.n\fR
pt_introduction
.TP
\fBfiles/modules/pt/pt_parse_peg\&.n\fR
pt_parse_peg
.TP
\fBfiles/modules/pt/pt_parser_api\&.n\fR
pt_parser_api
.TP
\fBfiles/modules/pt/pt_peg_op\&.n\fR
pt_peg_op
.RE
TMML
.RS
.TP
\fBfiles/modules/doctools/doctools\&.n\fR
doctools
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools/docidx\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools/doctoc\&.n\fR
doctools::toc
.TP
\fBfiles/modules/doctools2toc/toc_container\&.n\fR
doctools::toc
.TP
\fBfiles/apps/dtplite\&.n\fR
dtplite
.TP
\fBfiles/modules/dtplite/pkg_dtplite\&.n\fR
dtplite
.TP
\fBfiles/modules/doctools/mpexpand\&.n\fR
mpexpand
.RE
TOOL
.RS
.TP
\fBfiles/modules/oometa/oometa\&.n\fR
oometa
.TP
\fBfiles/modules/tool/tool\&.n\fR
tool
.TP
\fBfiles/modules/tool/tool_dict_ensemble\&.n\fR
tool::dict_ensemble
.RE
TPDL
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.RE
Tcl module
.RS
.TP
\fBfiles/modules/docstrip/docstrip_util\&.n\fR
docstrip_util
.RE
Tcl syntax
.RS
.TP
\fBfiles/modules/doctools2base/tcl_parse\&.n\fR
doctools::tcl::parse
.RE
TclOO
.RS
.TP
\fBfiles/modules/clay/clay\&.n\fR
clay
.TP
\fBfiles/modules/httpd/httpd\&.n\fR
httpd
.TP
\fBfiles/modules/tool/meta\&.n\fR
oo::util
.TP
\fBfiles/modules/ooutil/ooutil\&.n\fR
oo::util
.TP
\fBfiles/modules/oometa/oometa\&.n\fR
oometa
.TP
\fBfiles/modules/tool/tool\&.n\fR
tool
.TP
\fBfiles/modules/tool/tool_dict_ensemble\&.n\fR
tool::dict_ensemble
.RE
TeX
.RS
.TP
\fBfiles/modules/textutil/textutil\&.n\fR
textutil
.TP
\fBfiles/modules/textutil/adjust\&.n\fR
textutil::adjust
.RE
Testing
.RS
.TP
\fBfiles/modules/valtype/valtype_common\&.n\fR
valtype::common
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.TP
\fBfiles/modules/valtype/luhn\&.n\fR
valtype::luhn
.TP
\fBfiles/modules/valtype/luhn5\&.n\fR
valtype::luhn5
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
Tk
.RS
.TP
\fBfiles/modules/virtchannel_base/textwindow\&.n\fR
tcl::chan::textwindow
.RE
TreeQL
.RS
.TP
\fBfiles/modules/treeql/treeql\&.n\fR
treeql
.RE
Type checking
.RS
.TP
\fBfiles/modules/valtype/valtype_common\&.n\fR
valtype::common
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.TP
\fBfiles/modules/valtype/luhn\&.n\fR
valtype::luhn
.TP
\fBfiles/modules/valtype/luhn5\&.n\fR
valtype::luhn5
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
US-NPI
.RS
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.RE
UUID
.RS
.TP
\fBfiles/modules/uuid/uuid\&.n\fR
uuid
.RE
VISA
.RS
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.RE
Validation
.RS
.TP
\fBfiles/modules/valtype/valtype_common\&.n\fR
valtype::common
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.TP
\fBfiles/modules/valtype/luhn\&.n\fR
valtype::luhn
.TP
\fBfiles/modules/valtype/luhn5\&.n\fR
valtype::luhn5
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
Value checking
.RS
.TP
\fBfiles/modules/valtype/valtype_common\&.n\fR
valtype::common
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.TP
\fBfiles/modules/valtype/luhn\&.n\fR
valtype::luhn
.TP
\fBfiles/modules/valtype/luhn5\&.n\fR
valtype::luhn5
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
WWW
.RS
.TP
\fBfiles/modules/httpd/httpd\&.n\fR
httpd
.RE
XGoogleToken
.RS
.TP
\fBfiles/modules/sasl/gtoken\&.n\fR
SASL::XGoogleToken
.RE
XPath
.RS
.TP
\fBfiles/modules/treeql/treeql\&.n\fR
treeql
.RE
XSLT
.RS
.TP
\fBfiles/modules/treeql/treeql\&.n\fR
treeql
.RE
abstract syntax tree
.RS
.TP
\fBfiles/modules/grammar_me/me_util\&.n\fR
grammar::me::util
.TP
\fBfiles/modules/grammar_me/me_ast\&.n\fR







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







325
326
327
328
329
330
331






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































332
333
334
335
336
337
338
.TP
\fBfiles/modules/des/tcldes\&.n\fR
tclDES
.TP
\fBfiles/modules/des/tcldesjr\&.n\fR
tclDESjr
.RE






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































abstract syntax tree
.RS
.TP
\fBfiles/modules/grammar_me/me_util\&.n\fR
grammar::me::util
.TP
\fBfiles/modules/grammar_me/me_ast\&.n\fR
1825
1826
1827
1828
1829
1830
1831












1832
1833
1834
1835
1836
1837
1838
.RE
ambiguous
.RS
.TP
\fBfiles/modules/grammar_aycock/aycock\&.n\fR
grammar::aycock
.RE












angle
.RS
.TP
\fBfiles/modules/math/math_geometry\&.n\fR
math::geometry
.TP
\fBfiles/modules/units/units\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>







427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
.RE
ambiguous
.RS
.TP
\fBfiles/modules/grammar_aycock/aycock\&.n\fR
grammar::aycock
.RE
American Express
.RS
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.RE
AMEX
.RS
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.RE
angle
.RS
.TP
\fBfiles/modules/math/math_geometry\&.n\fR
math::geometry
.TP
\fBfiles/modules/units/units\&.n\fR
1993
1994
1995
1996
1997
1998
1999






2000
2001
2002
2003
2004
2005
2006
.RE
assign
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE






asynchronous
.RS
.TP
\fBfiles/modules/cache/async\&.n\fR
cache::async
.RE
attribute control







>
>
>
>
>
>







607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
.RE
assign
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
AST
.RS
.TP
\fBfiles/modules/grammar_me/me_ast\&.n\fR
grammar::me_ast
.RE
asynchronous
.RS
.TP
\fBfiles/modules/cache/async\&.n\fR
cache::async
.RE
attribute control
2164
2165
2166
2167
2168
2169
2170






2171
2172
2173
2174
2175
2176
2177
.RE
ber
.RS
.TP
\fBfiles/modules/asn/asn\&.n\fR
asn
.RE






bfs
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
bibliography







>
>
>
>
>
>







784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
.RE
ber
.RS
.TP
\fBfiles/modules/asn/asn\&.n\fR
asn
.RE
Bessel functions
.RS
.TP
\fBfiles/modules/math/special\&.n\fR
math::special
.RE
bfs
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
bibliography
2199
2200
2201
2202
2203
2204
2205






2206
2207
2208
2209
2210
2211
2212
uevent
.RE
bipartite
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op






.RE
bittorrent
.RS
.TP
\fBfiles/modules/bee/bee\&.n\fR
bee
.RE







>
>
>
>
>
>







825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
uevent
.RE
bipartite
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
BitTorrent
.RS
.TP
\fBfiles/modules/bee/bee\&.n\fR
bee
.RE
bittorrent
.RS
.TP
\fBfiles/modules/bee/bee\&.n\fR
bee
.RE
2242
2243
2244
2245
2246
2247
2248






2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260

































2261
2262
2263
2264
2265
2266
2267
.RE
blowfish
.RS
.TP
\fBfiles/modules/blowfish/blowfish\&.n\fR
blowfish
.RE






breadth-first
.RS
.TP
\fBfiles/modules/struct/struct_tree\&.n\fR
struct::tree
.RE
bridge
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE

































cache
.RS
.TP
\fBfiles/modules/cache/async\&.n\fR
cache::async
.TP
\fBfiles/modules/map/map_slippy_cache\&.n\fR







>
>
>
>
>
>












>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
.RE
blowfish
.RS
.TP
\fBfiles/modules/blowfish/blowfish\&.n\fR
blowfish
.RE
Book Number
.RS
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
breadth-first
.RS
.TP
\fBfiles/modules/struct/struct_tree\&.n\fR
struct::tree
.RE
bridge
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
BWidget
.RS
.TP
\fBfiles/modules/snit/snit\&.n\fR
snit
.TP
\fBfiles/modules/snit/snitfaq\&.n\fR
snitfaq
.RE
C
.RS
.TP
\fBfiles/modules/doctools2idx/idx_msgcat_c\&.n\fR
doctools::msgcat::idx::c
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_c\&.n\fR
doctools::msgcat::toc::c
.RE
C++
.RS
.TP
\fBfiles/modules/snit/snit\&.n\fR
snit
.TP
\fBfiles/modules/snit/snitfaq\&.n\fR
snitfaq
.TP
\fBfiles/modules/stooop/stooop\&.n\fR
stooop
.TP
\fBfiles/modules/stooop/switched\&.n\fR
switched
.RE
cache
.RS
.TP
\fBfiles/modules/cache/async\&.n\fR
cache::async
.TP
\fBfiles/modules/map/map_slippy_cache\&.n\fR
2383
2384
2385
2386
2387
2388
2389


















2390
2391
2392
2393
2394
2395
2396
.RE
cer
.RS
.TP
\fBfiles/modules/asn/asn\&.n\fR
asn
.RE


















cgraph
.RS
.TP
\fBfiles/modules/struct/graph\&.n\fR
struct::graph
.TP
\fBfiles/modules/struct/graph1\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
.RE
cer
.RS
.TP
\fBfiles/modules/asn/asn\&.n\fR
asn
.RE
CFG
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.RE
CFL
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.RE
CGI
.RS
.TP
\fBfiles/modules/ncgi/ncgi\&.n\fR
ncgi
.RE
cgraph
.RS
.TP
\fBfiles/modules/struct/graph\&.n\fR
struct::graph
.TP
\fBfiles/modules/struct/graph1\&.n\fR
2515
2516
2517
2518
2519
2520
2521










































2522
2523
2524
2525
2526
2527
2528
.RE
checkbutton
.RS
.TP
\fBfiles/modules/html/html\&.n\fR
html
.RE










































checksum
.RS
.TP
\fBfiles/modules/crc/cksum\&.n\fR
cksum
.TP
\fBfiles/modules/crc/crc16\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
.RE
checkbutton
.RS
.TP
\fBfiles/modules/html/html\&.n\fR
html
.RE
Checking
.RS
.TP
\fBfiles/modules/valtype/valtype_common\&.n\fR
valtype::common
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.TP
\fBfiles/modules/valtype/luhn\&.n\fR
valtype::luhn
.TP
\fBfiles/modules/valtype/luhn5\&.n\fR
valtype::luhn5
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
checksum
.RS
.TP
\fBfiles/modules/crc/cksum\&.n\fR
cksum
.TP
\fBfiles/modules/crc/crc16\&.n\fR
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
.TP
\fBfiles/modules/ooutil/ooutil\&.n\fR
oo::util
.RE
cleanup
.RS
.TP
\fBfiles/modules/defer/defer\&.n\fR
defer
.TP
\fBfiles/modules/try/tcllib_try\&.n\fR
try
.RE
client
.RS
.TP
\fBfiles/modules/nns/nns_client\&.n\fR







<
<
<







1336
1337
1338
1339
1340
1341
1342



1343
1344
1345
1346
1347
1348
1349
.TP
\fBfiles/modules/ooutil/ooutil\&.n\fR
oo::util
.RE
cleanup
.RS
.TP



\fBfiles/modules/try/tcllib_try\&.n\fR
try
.RE
client
.RS
.TP
\fBfiles/modules/nns/nns_client\&.n\fR
2803
2804
2805
2806
2807
2808
2809









2810
2811
2812
2813
2814
2815
2816
.TP
\fBfiles/modules/math/constants\&.n\fR
math::constants
.TP
\fBfiles/modules/units/units\&.n\fR
units
.RE









contents
.RS
.TP
\fBfiles/modules/doctools2toc/toc_introduction\&.n\fR
doctools2toc_introduction
.RE
context-free grammar







>
>
>
>
>
>
>
>
>







1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
.TP
\fBfiles/modules/math/constants\&.n\fR
math::constants
.TP
\fBfiles/modules/units/units\&.n\fR
units
.RE
CONTAINER
.RS
.TP
\fBfiles/modules/pt/pt_peg_export_container\&.n\fR
pt::peg::export::container
.TP
\fBfiles/modules/pt/pt_peg_to_container\&.n\fR
pt::peg::to::container
.RE
contents
.RS
.TP
\fBfiles/modules/doctools2toc/toc_introduction\&.n\fR
doctools2toc_introduction
.RE
context-free grammar
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
.RE
control
.RS
.TP
\fBfiles/modules/control/control\&.n\fR
control
.TP
\fBfiles/modules/math/changepoint\&.n\fR
math::changepoint
.TP
\fBfiles/modules/term/term\&.n\fR
term
.TP
\fBfiles/modules/term/ansi_code\&.n\fR
term::ansi::code
.TP
\fBfiles/modules/term/ansi_cattr\&.n\fR







<
<
<







1699
1700
1701
1702
1703
1704
1705



1706
1707
1708
1709
1710
1711
1712
.RE
control
.RS
.TP
\fBfiles/modules/control/control\&.n\fR
control
.TP



\fBfiles/modules/term/term\&.n\fR
term
.TP
\fBfiles/modules/term/ansi_code\&.n\fR
term::ansi::code
.TP
\fBfiles/modules/term/ansi_cattr\&.n\fR
3136
3137
3138
3139
3140
3141
3142






3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154






3155
3156
3157
3158
3159
3160
3161
.TP
\fBfiles/modules/coroutine/coro_auto\&.n\fR
coroutine::auto
.TP
\fBfiles/modules/generator/generator\&.n\fR
generator
.RE






counter
.RS
.TP
\fBfiles/modules/virtchannel_transform/vt_counter\&.n\fR
tcl::transform::counter
.RE
counting
.RS
.TP
\fBfiles/modules/counter/counter\&.n\fR
counter
.RE






crc
.RS
.TP
\fBfiles/modules/crc/cksum\&.n\fR
cksum
.TP
\fBfiles/modules/crc/crc16\&.n\fR







>
>
>
>
>
>












>
>
>
>
>
>







1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
.TP
\fBfiles/modules/coroutine/coro_auto\&.n\fR
coroutine::auto
.TP
\fBfiles/modules/generator/generator\&.n\fR
generator
.RE
Cost
.RS
.TP
\fBfiles/modules/treeql/treeql\&.n\fR
treeql
.RE
counter
.RS
.TP
\fBfiles/modules/virtchannel_transform/vt_counter\&.n\fR
tcl::transform::counter
.RE
counting
.RS
.TP
\fBfiles/modules/counter/counter\&.n\fR
counter
.RE
CPARAM
.RS
.TP
\fBfiles/modules/pt/pt_peg_to_cparam\&.n\fR
pt::peg::to::cparam
.RE
crc
.RS
.TP
\fBfiles/modules/crc/cksum\&.n\fR
cksum
.TP
\fBfiles/modules/crc/crc16\&.n\fR
3214
3215
3216
3217
3218
3219
3220






3221
3222
3223
3224
3225
3226
3227
.RE
cryptography
.RS
.TP
\fBfiles/modules/blowfish/blowfish\&.n\fR
blowfish
.RE






csv
.RS
.TP
\fBfiles/modules/bench/bench_read\&.n\fR
bench::in
.TP
\fBfiles/modules/bench/bench_wcsv\&.n\fR







>
>
>
>
>
>







1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
.RE
cryptography
.RS
.TP
\fBfiles/modules/blowfish/blowfish\&.n\fR
blowfish
.RE
CSS
.RS
.TP
\fBfiles/modules/doctools2base/html_cssdefaults\&.n\fR
doctools::html::cssdefaults
.RE
csv
.RS
.TP
\fBfiles/modules/bench/bench_read\&.n\fR
bench::in
.TP
\fBfiles/modules/bench/bench_wcsv\&.n\fR
3249
3250
3251
3252
3253
3254
3255






3256
3257
3258
3259
3260
3261
3262
struct::graph::op
.RE
cut vertex
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op






.RE
cvs
.RS
.TP
\fBfiles/modules/doctools/cvs\&.n\fR
doctools::cvs
.RE







>
>
>
>
>
>







2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
struct::graph::op
.RE
cut vertex
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
CVS
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE
cvs
.RS
.TP
\fBfiles/modules/doctools/cvs\&.n\fR
doctools::cvs
.RE
3376
3377
3378
3379
3380
3381
3382









3383
3384
3385
3386
3387
3388
3389
.RE
dataflow
.RS
.TP
\fBfiles/modules/page/page_util_flow\&.n\fR
page_util_flow
.RE









debug
.RS
.TP
\fBfiles/modules/debug/debug\&.n\fR
debug
.TP
\fBfiles/modules/debug/debug_caller\&.n\fR







>
>
>
>
>
>
>
>
>







2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
.RE
dataflow
.RS
.TP
\fBfiles/modules/page/page_util_flow\&.n\fR
page_util_flow
.RE
DE
.RS
.TP
\fBfiles/modules/doctools2idx/idx_msgcat_de\&.n\fR
doctools::msgcat::idx::de
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_de\&.n\fR
doctools::msgcat::toc::de
.RE
debug
.RS
.TP
\fBfiles/modules/debug/debug\&.n\fR
debug
.TP
\fBfiles/modules/debug/debug_caller\&.n\fR
3478
3479
3480
3481
3482
3483
3484












3485
3486
3487
3488
3489
3490
3491
.RE
der
.RS
.TP
\fBfiles/modules/asn/asn\&.n\fR
asn
.RE












deserialization
.RS
.TP
\fBfiles/modules/doctools2idx/import_docidx\&.n\fR
doctools::idx::import::docidx
.TP
\fBfiles/modules/doctools2idx/idx_import_json\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>







2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
.RE
der
.RS
.TP
\fBfiles/modules/asn/asn\&.n\fR
asn
.RE
DES
.RS
.TP
\fBfiles/modules/des/des\&.n\fR
des
.TP
\fBfiles/modules/des/tcldes\&.n\fR
tclDES
.TP
\fBfiles/modules/des/tcldesjr\&.n\fR
tclDESjr
.RE
deserialization
.RS
.TP
\fBfiles/modules/doctools2idx/import_docidx\&.n\fR
doctools::idx::import::docidx
.TP
\fBfiles/modules/doctools2idx/idx_import_json\&.n\fR
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
.RE
diff -n format
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE
diff -ruN
.RS
.TP
\fBfiles/modules/textutil/patch\&.n\fR
textutil::patch
.RE
diff, unified format
.RS
.TP
\fBfiles/modules/textutil/patch\&.n\fR
textutil::patch
.RE
difference
.RS
.TP
\fBfiles/modules/struct/struct_set\&.n\fR
struct::set
.RE
differential
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
differential equations
.RS
.TP
\fBfiles/modules/math/calculus\&.n\fR
math::calculus
.RE
digital
.RS
.TP
\fBfiles/modules/math/filtergen\&.n\fR
math::filters
.RE
dijkstra
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
directory access







<
<
<
<
<
<
<
<
<
<
<
<


















<
<
<
<
<
<







2305
2306
2307
2308
2309
2310
2311












2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329






2330
2331
2332
2333
2334
2335
2336
.RE
diff -n format
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE












difference
.RS
.TP
\fBfiles/modules/struct/struct_set\&.n\fR
struct::set
.RE
differential
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
differential equations
.RS
.TP
\fBfiles/modules/math/calculus\&.n\fR
math::calculus
.RE






dijkstra
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
directory access
3583
3584
3585
3586
3587
3588
3589






3590
3591
3592
3593
3594
3595
3596
.RE
directory traversal
.RS
.TP
\fBfiles/modules/fileutil/traverse\&.n\fR
fileutil_traverse
.RE






discrete items
.RS
.TP
\fBfiles/modules/struct/pool\&.n\fR
struct::pool
.RE
disjoint set







>
>
>
>
>
>







2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
.RE
directory traversal
.RS
.TP
\fBfiles/modules/fileutil/traverse\&.n\fR
fileutil_traverse
.RE
Discover
.RS
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.RE
discrete items
.RS
.TP
\fBfiles/modules/struct/pool\&.n\fR
struct::pool
.RE
disjoint set
3612
3613
3614
3615
3616
3617
3618






3619
3620
3621
3622
3623
3624
3625
math::geometry
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.TP
\fBfiles/modules/units/units\&.n\fR
units






.RE
do
.RS
.TP
\fBfiles/modules/control/control\&.n\fR
control
.RE







>
>
>
>
>
>







2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
math::geometry
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.TP
\fBfiles/modules/units/units\&.n\fR
units
.RE
DNS
.RS
.TP
\fBfiles/modules/dns/tcllib_dns\&.n\fR
dns
.RE
do
.RS
.TP
\fBfiles/modules/control/control\&.n\fR
control
.RE
4057
4058
4059
4060
4061
4062
4063






4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081


















4082
4083
4084
4085
4086
4087




































































































































4088
4089
4090
4091
4092
4093
4094
.TP
\fBfiles/apps/tcldocstrip\&.n\fR
tcldocstrip
.TP
\fBfiles/modules/tepam/tepam_doc_gen\&.n\fR
tepam::doc_gen
.RE






dom
.RS
.TP
\fBfiles/modules/amazon-s3/xsxp\&.n\fR
xsxp
.RE
domain name service
.RS
.TP
\fBfiles/modules/dns/tcllib_dns\&.n\fR
dns
.RE
e
.RS
.TP
\fBfiles/modules/math/constants\&.n\fR
math::constants
.RE


















earley
.RS
.TP
\fBfiles/modules/grammar_aycock/aycock\&.n\fR
grammar::aycock
.RE




































































































































eccentricity
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
edge







>
>
>
>
>
>


















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
.TP
\fBfiles/apps/tcldocstrip\&.n\fR
tcldocstrip
.TP
\fBfiles/modules/tepam/tepam_doc_gen\&.n\fR
tepam::doc_gen
.RE
DOM
.RS
.TP
\fBfiles/modules/treeql/treeql\&.n\fR
treeql
.RE
dom
.RS
.TP
\fBfiles/modules/amazon-s3/xsxp\&.n\fR
xsxp
.RE
domain name service
.RS
.TP
\fBfiles/modules/dns/tcllib_dns\&.n\fR
dns
.RE
e
.RS
.TP
\fBfiles/modules/math/constants\&.n\fR
math::constants
.RE
EAN
.RS
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
EAN13
.RS
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
earley
.RS
.TP
\fBfiles/modules/grammar_aycock/aycock\&.n\fR
grammar::aycock
.RE
EBNF
.RS
.TP
\fBfiles/apps/pt\&.n\fR
pt
.TP
\fBfiles/modules/pt/pt_astree\&.n\fR
pt::ast
.TP
\fBfiles/modules/pt/pt_cparam_config_critcl\&.n\fR
pt::cparam::configuration::critcl
.TP
\fBfiles/modules/pt/pt_cparam_config_tea\&.n\fR
pt::cparam::configuration::tea
.TP
\fBfiles/modules/pt/pt_json_language\&.n\fR
pt::json_language
.TP
\fBfiles/modules/pt/pt_param\&.n\fR
pt::param
.TP
\fBfiles/modules/pt/pt_pexpression\&.n\fR
pt::pe
.TP
\fBfiles/modules/pt/pt_pexpr_op\&.n\fR
pt::pe::op
.TP
\fBfiles/modules/pt/pt_pegrammar\&.n\fR
pt::peg
.TP
\fBfiles/modules/pt/pt_peg_container\&.n\fR
pt::peg::container
.TP
\fBfiles/modules/pt/pt_peg_container_peg\&.n\fR
pt::peg::container::peg
.TP
\fBfiles/modules/pt/pt_peg_export\&.n\fR
pt::peg::export
.TP
\fBfiles/modules/pt/pt_peg_export_container\&.n\fR
pt::peg::export::container
.TP
\fBfiles/modules/pt/pt_peg_export_json\&.n\fR
pt::peg::export::json
.TP
\fBfiles/modules/pt/pt_peg_export_peg\&.n\fR
pt::peg::export::peg
.TP
\fBfiles/modules/pt/pt_peg_from_container\&.n\fR
pt::peg::from::container
.TP
\fBfiles/modules/pt/pt_peg_from_json\&.n\fR
pt::peg::from::json
.TP
\fBfiles/modules/pt/pt_peg_from_peg\&.n\fR
pt::peg::from::peg
.TP
\fBfiles/modules/pt/pt_peg_import\&.n\fR
pt::peg::import
.TP
\fBfiles/modules/pt/pt_peg_import_container\&.n\fR
pt::peg::import::container
.TP
\fBfiles/modules/pt/pt_peg_import_json\&.n\fR
pt::peg::import::json
.TP
\fBfiles/modules/pt/pt_peg_import_peg\&.n\fR
pt::peg::import::peg
.TP
\fBfiles/modules/pt/pt_peg_interp\&.n\fR
pt::peg::interp
.TP
\fBfiles/modules/pt/pt_peg_to_container\&.n\fR
pt::peg::to::container
.TP
\fBfiles/modules/pt/pt_peg_to_cparam\&.n\fR
pt::peg::to::cparam
.TP
\fBfiles/modules/pt/pt_peg_to_json\&.n\fR
pt::peg::to::json
.TP
\fBfiles/modules/pt/pt_peg_to_param\&.n\fR
pt::peg::to::param
.TP
\fBfiles/modules/pt/pt_peg_to_peg\&.n\fR
pt::peg::to::peg
.TP
\fBfiles/modules/pt/pt_peg_to_tclparam\&.n\fR
pt::peg::to::tclparam
.TP
\fBfiles/modules/pt/pt_peg_language\&.n\fR
pt::peg_language
.TP
\fBfiles/modules/pt/pt_peg_introduction\&.n\fR
pt::pegrammar
.TP
\fBfiles/modules/pt/pt_pgen\&.n\fR
pt::pgen
.TP
\fBfiles/modules/pt/pt_rdengine\&.n\fR
pt::rde
.TP
\fBfiles/modules/pt/pt_tclparam_config_nx\&.n\fR
pt::tclparam::configuration::nx
.TP
\fBfiles/modules/pt/pt_tclparam_config_snit\&.n\fR
pt::tclparam::configuration::snit
.TP
\fBfiles/modules/pt/pt_tclparam_config_tcloo\&.n\fR
pt::tclparam::configuration::tcloo
.TP
\fBfiles/modules/pt/pt_util\&.n\fR
pt::util
.TP
\fBfiles/modules/pt/pt_to_api\&.n\fR
pt_export_api
.TP
\fBfiles/modules/pt/pt_from_api\&.n\fR
pt_import_api
.TP
\fBfiles/modules/pt/pt_introduction\&.n\fR
pt_introduction
.TP
\fBfiles/modules/pt/pt_parse_peg\&.n\fR
pt_parse_peg
.TP
\fBfiles/modules/pt/pt_parser_api\&.n\fR
pt_parser_api
.TP
\fBfiles/modules/pt/pt_peg_op\&.n\fR
pt_peg_op
.RE
eccentricity
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
edge
4132
4133
4134
4135
4136
4137
4138









4139
4140
4141
4142
4143
4144
4145
.RE
empty interpreter
.RS
.TP
\fBfiles/modules/interp/tcllib_interp\&.n\fR
interp
.RE









encoding
.RS
.TP
\fBfiles/modules/base64/ascii85\&.n\fR
ascii85
.TP
\fBfiles/modules/base64/base64\&.n\fR







>
>
>
>
>
>
>
>
>







3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
.RE
empty interpreter
.RS
.TP
\fBfiles/modules/interp/tcllib_interp\&.n\fR
interp
.RE
EN
.RS
.TP
\fBfiles/modules/doctools2idx/idx_msgcat_en\&.n\fR
doctools::msgcat::idx::en
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_en\&.n\fR
doctools::msgcat::toc::en
.RE
encoding
.RS
.TP
\fBfiles/modules/base64/ascii85\&.n\fR
ascii85
.TP
\fBfiles/modules/base64/base64\&.n\fR
4215
4216
4217
4218
4219
4220
4221









4222
4223
4224
4225
4226
4227
4228
try
.RE
error function
.RS
.TP
\fBfiles/modules/math/special\&.n\fR
math::special









.RE
event
.RS
.TP
\fBfiles/modules/hook/hook\&.n\fR
hook
.TP







>
>
>
>
>
>
>
>
>







3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
try
.RE
error function
.RS
.TP
\fBfiles/modules/math/special\&.n\fR
math::special
.RE
European Article Number
.RS
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
event
.RS
.TP
\fBfiles/modules/hook/hook\&.n\fR
hook
.TP
4528
4529
4530
4531
4532
4533
4534






4535
4536
4537
4538
4539
4540
4541
.RE
fetching information
.RS
.TP
\fBfiles/modules/uri/uri\&.n\fR
uri
.RE






fifo
.RS
.TP
\fBfiles/modules/virtchannel_base/tcllib_fifo\&.n\fR
tcl::chan::fifo
.TP
\fBfiles/modules/virtchannel_base/tcllib_fifo2\&.n\fR







>
>
>
>
>
>







3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
.RE
fetching information
.RS
.TP
\fBfiles/modules/uri/uri\&.n\fR
uri
.RE
FFT
.RS
.TP
\fBfiles/modules/math/fourier\&.n\fR
math::fourier
.RE
fifo
.RS
.TP
\fBfiles/modules/virtchannel_base/tcllib_fifo\&.n\fR
tcl::chan::fifo
.TP
\fBfiles/modules/virtchannel_base/tcllib_fifo2\&.n\fR
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
.TP
\fBfiles/modules/generator/generator\&.n\fR
generator
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
filtering
.RS
.TP
\fBfiles/modules/math/filtergen\&.n\fR
math::filters
.RE
final
.RS
.TP
\fBfiles/modules/try/tcllib_try\&.n\fR
try
.RE
finance







<
<
<
<
<
<







3574
3575
3576
3577
3578
3579
3580






3581
3582
3583
3584
3585
3586
3587
.TP
\fBfiles/modules/generator/generator\&.n\fR
generator
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE






final
.RS
.TP
\fBfiles/modules/try/tcllib_try\&.n\fR
try
.RE
finance
4677
4678
4679
4680
4681
4682
4683









4684
4685
4686






4687
4688
4689
4690
4691
4692
4693
grammar::fa::dacceptor
.TP
\fBfiles/modules/grammar_fa/dexec\&.n\fR
grammar::fa::dexec
.TP
\fBfiles/modules/grammar_fa/faop\&.n\fR
grammar::fa::op









.RE
first permutation
.RS






.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
flatten
.RS
.TP







>
>
>
>
>
>
>
>
>



>
>
>
>
>
>







3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
grammar::fa::dacceptor
.TP
\fBfiles/modules/grammar_fa/dexec\&.n\fR
grammar::fa::dexec
.TP
\fBfiles/modules/grammar_fa/faop\&.n\fR
grammar::fa::op
.RE
FIPS 180-1
.RS
.TP
\fBfiles/modules/sha1/sha1\&.n\fR
sha1
.TP
\fBfiles/modules/sha1/sha256\&.n\fR
sha256
.RE
first permutation
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
Fisher-Yates
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
flatten
.RS
.TP
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842









4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
.TP
\fBfiles/modules/doctools/doctoc_plugin_apiref\&.n\fR
doctoc_plugin_apiref
.TP
\fBfiles/modules/doctools/doctools_plugin_apiref\&.n\fR
doctools_plugin_apiref
.RE
fossil
.RS
.TP
\fBfiles/modules/textutil/patch\&.n\fR
textutil::patch









.RE
frame
.RS
.TP
\fBfiles/modules/term/ansi_cmacros\&.n\fR
term::ansi::code::macros
.RE
framework
.RS
.TP
\fBfiles/modules/tool/tool\&.n\fR
tool
.RE
ftp
.RS
.TP
\fBfiles/modules/ftp/ftp\&.n\fR
ftp
.TP
\fBfiles/modules/ftp/ftp_geturl\&.n\fR







|


|
|
>
>
>
>
>
>
>
>
>







<
<
<
<
<
<







3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820






3821
3822
3823
3824
3825
3826
3827
.TP
\fBfiles/modules/doctools/doctoc_plugin_apiref\&.n\fR
doctoc_plugin_apiref
.TP
\fBfiles/modules/doctools/doctools_plugin_apiref\&.n\fR
doctools_plugin_apiref
.RE
Fourier transform
.RS
.TP
\fBfiles/modules/math/fourier\&.n\fR
math::fourier
.RE
FR
.RS
.TP
\fBfiles/modules/doctools2idx/idx_msgcat_fr\&.n\fR
doctools::msgcat::idx::fr
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_fr\&.n\fR
doctools::msgcat::toc::fr
.RE
frame
.RS
.TP
\fBfiles/modules/term/ansi_cmacros\&.n\fR
term::ansi::code::macros
.RE






ftp
.RS
.TP
\fBfiles/modules/ftp/ftp\&.n\fR
ftp
.TP
\fBfiles/modules/ftp/ftp_geturl\&.n\fR
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
.TP
\fBfiles/modules/coroutine/tcllib_coroutine\&.n\fR
coroutine
.TP
\fBfiles/modules/coroutine/coro_auto\&.n\fR
coroutine::auto
.RE
git
.RS
.TP
\fBfiles/modules/textutil/patch\&.n\fR
textutil::patch
.RE
global
.RS
.TP
\fBfiles/modules/coroutine/tcllib_coroutine\&.n\fR
coroutine
.TP
\fBfiles/modules/coroutine/coro_auto\&.n\fR
coroutine::auto
.RE
golang
.RS
.TP
\fBfiles/modules/defer/defer\&.n\fR
defer
.RE
gopher
.RS
.TP
\fBfiles/modules/uri/uri\&.n\fR
uri
.RE
gps







<
<
<
<
<
<









<
<
<
<
<
<







3916
3917
3918
3919
3920
3921
3922






3923
3924
3925
3926
3927
3928
3929
3930
3931






3932
3933
3934
3935
3936
3937
3938
.TP
\fBfiles/modules/coroutine/tcllib_coroutine\&.n\fR
coroutine
.TP
\fBfiles/modules/coroutine/coro_auto\&.n\fR
coroutine::auto
.RE






global
.RS
.TP
\fBfiles/modules/coroutine/tcllib_coroutine\&.n\fR
coroutine
.TP
\fBfiles/modules/coroutine/coro_auto\&.n\fR
coroutine::auto
.RE






gopher
.RS
.TP
\fBfiles/modules/uri/uri\&.n\fR
uri
.RE
gps
5211
5212
5213
5214
5215
5216
5217






5218
5219
5220
5221
5222
5223
5224
coroutine::auto
.RE
grep
.RS
.TP
\fBfiles/modules/fileutil/fileutil\&.n\fR
fileutil






.RE
hashing
.RS
.TP
\fBfiles/modules/md4/md4\&.n\fR
md4
.TP







>
>
>
>
>
>







4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
coroutine::auto
.RE
grep
.RS
.TP
\fBfiles/modules/fileutil/fileutil\&.n\fR
fileutil
.RE
GUID
.RS
.TP
\fBfiles/modules/uuid/uuid\&.n\fR
uuid
.RE
hashing
.RS
.TP
\fBfiles/modules/md4/md4\&.n\fR
md4
.TP
5284
5285
5286
5287
5288
5289
5290










































5291
5292
5293
5294
5295
5296
5297
.RE
horspool
.RS
.TP
\fBfiles/modules/grammar_aycock/aycock\&.n\fR
grammar::aycock
.RE










































html
.RS
.TP
\fBfiles/modules/html/html\&.n\fR
html
.TP
\fBfiles/modules/htmlparse/htmlparse\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
.RE
horspool
.RS
.TP
\fBfiles/modules/grammar_aycock/aycock\&.n\fR
grammar::aycock
.RE
HTML
.RS
.TP
\fBfiles/modules/doctools/doctools\&.n\fR
doctools
.TP
\fBfiles/modules/doctools2base/html_cssdefaults\&.n\fR
doctools::html::cssdefaults
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools/docidx\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools2idx/idx_export\&.n\fR
doctools::idx::export
.TP
\fBfiles/modules/doctools2idx/idx_export_html\&.n\fR
doctools::idx::export::html
.TP
\fBfiles/modules/doctools/doctoc\&.n\fR
doctools::toc
.TP
\fBfiles/modules/doctools2toc/toc_container\&.n\fR
doctools::toc
.TP
\fBfiles/modules/doctools2toc/toc_export\&.n\fR
doctools::toc::export
.TP
\fBfiles/modules/doctools2toc/toc_export_html\&.n\fR
doctools::toc::export::html
.TP
\fBfiles/apps/dtplite\&.n\fR
dtplite
.TP
\fBfiles/modules/dtplite/pkg_dtplite\&.n\fR
dtplite
.TP
\fBfiles/modules/doctools/mpexpand\&.n\fR
mpexpand
.RE
html
.RS
.TP
\fBfiles/modules/html/html\&.n\fR
html
.TP
\fBfiles/modules/htmlparse/htmlparse\&.n\fR
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
.RE
http
.RS
.TP
\fBfiles/modules/http/autoproxy\&.n\fR
autoproxy
.TP
\fBfiles/modules/httpd/httpd\&.n\fR
httpd
.TP
\fBfiles/modules/map/map_geocode_nominatim\&.n\fR
map::geocode::nominatim
.TP
\fBfiles/modules/map/map_slippy_fetcher\&.n\fR
map::slippy::fetcher
.TP
\fBfiles/modules/uri/uri\&.n\fR
uri
.TP
\fBfiles/modules/websocket/websocket\&.n\fR
websocket
.RE
httpd
.RS
.TP
\fBfiles/modules/httpd/httpd\&.n\fR
httpd
.RE
https
.RS
.TP
\fBfiles/modules/uri/uri\&.n\fR
uri
.RE
httpserver
.RS
.TP
\fBfiles/modules/httpd/httpd\&.n\fR
httpd
.RE
huddle
.RS
.TP
\fBfiles/modules/yaml/huddle\&.n\fR
huddle
.TP
\fBfiles/modules/yaml/yaml\&.n\fR







<
<
<












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







4306
4307
4308
4309
4310
4311
4312



4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324


















4325
4326
4327
4328
4329
4330
4331
.RE
http
.RS
.TP
\fBfiles/modules/http/autoproxy\&.n\fR
autoproxy
.TP



\fBfiles/modules/map/map_geocode_nominatim\&.n\fR
map::geocode::nominatim
.TP
\fBfiles/modules/map/map_slippy_fetcher\&.n\fR
map::slippy::fetcher
.TP
\fBfiles/modules/uri/uri\&.n\fR
uri
.TP
\fBfiles/modules/websocket/websocket\&.n\fR
websocket
.RE


















huddle
.RS
.TP
\fBfiles/modules/yaml/huddle\&.n\fR
huddle
.TP
\fBfiles/modules/yaml/yaml\&.n\fR
5395
5396
5397
5398
5399
5400
5401






5402
5403
5404
5405
5406
5407
5408
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_en\&.n\fR
doctools::msgcat::toc::en
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_fr\&.n\fR
doctools::msgcat::toc::fr
.RE






ident
.RS
.TP
\fBfiles/modules/ident/ident\&.n\fR
ident
.RE
identification







>
>
>
>
>
>







4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_en\&.n\fR
doctools::msgcat::toc::en
.TP
\fBfiles/modules/doctools2toc/toc_msgcat_fr\&.n\fR
doctools::msgcat::toc::fr
.RE
IBAN
.RS
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.RE
ident
.RS
.TP
\fBfiles/modules/ident/ident\&.n\fR
ident
.RE
identification
5437
5438
5439
5440
5441
5442
5443






5444
5445
5446
5447
5448
5449
5450
.RE
imap
.RS
.TP
\fBfiles/modules/imap4/imap4\&.n\fR
imap4
.RE






import
.RS
.TP
\fBfiles/modules/doctools2idx/idx_import\&.n\fR
doctools::idx::import
.TP
\fBfiles/modules/doctools2idx/import_docidx\&.n\fR







>
>
>
>
>
>







4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
.RE
imap
.RS
.TP
\fBfiles/modules/imap4/imap4\&.n\fR
imap4
.RE
IMEI
.RS
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.RE
import
.RS
.TP
\fBfiles/modules/doctools2idx/idx_import\&.n\fR
doctools::idx::import
.TP
\fBfiles/modules/doctools2idx/import_docidx\&.n\fR
5496
5497
5498
5499
5500
5501
5502









5503
5504
5505
5506
5507
5508
5509
struct::tree
.RE
inclusion
.RS
.TP
\fBfiles/modules/struct/struct_set\&.n\fR
struct::set









.RE
indenting
.RS
.TP
\fBfiles/modules/textutil/textutil\&.n\fR
textutil
.TP







>
>
>
>
>
>
>
>
>







4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
struct::tree
.RE
inclusion
.RS
.TP
\fBfiles/modules/struct/struct_set\&.n\fR
struct::set
.RE
Incr Tcl
.RS
.TP
\fBfiles/modules/snit/snit\&.n\fR
snit
.TP
\fBfiles/modules/snit/snitfaq\&.n\fR
snitfaq
.RE
indenting
.RS
.TP
\fBfiles/modules/textutil/textutil\&.n\fR
textutil
.TP
5601
5602
5603
5604
5605
5606
5607



























5608
5609
5610
5611
5612
5613
5614
math::calculus
.RE
inter-thread communication
.RS
.TP
\fBfiles/modules/virtchannel_base/tcllib_fifo2\&.n\fR
tcl::chan::fifo2



























.RE
internationalization
.RS
.TP
\fBfiles/modules/doctools2base/tcllib_msgcat\&.n\fR
doctools::msgcat
.TP







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
math::calculus
.RE
inter-thread communication
.RS
.TP
\fBfiles/modules/virtchannel_base/tcllib_fifo2\&.n\fR
tcl::chan::fifo2
.RE
International Article Number
.RS
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
International Bank Account Number
.RS
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.RE
International Mobile Equipment Identity
.RS
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.RE
International Standard Book Number
.RS
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
internationalization
.RS
.TP
\fBfiles/modules/doctools2base/tcllib_msgcat\&.n\fR
doctools::msgcat
.TP
5788
5789
5790
5791
5792
5793
5794






5795
5796
5797
5798
5799
5800
5801
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE






isthmus
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
iterator







>
>
>
>
>
>







4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
ISBN
.RS
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.RE
isthmus
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
iterator
5830
5831
5832
5833
5834
5835
5836



























5837
5838
5839
5840
5841
5842
5843
.RE
jpeg
.RS
.TP
\fBfiles/modules/jpeg/jpeg\&.n\fR
jpeg
.RE



























json
.RS
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools2idx/idx_export\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
.RE
jpeg
.RS
.TP
\fBfiles/modules/jpeg/jpeg\&.n\fR
jpeg
.RE
JSON
.RS
.TP
\fBfiles/modules/doctools2idx/idx_export_json\&.n\fR
doctools::idx::export::json
.TP
\fBfiles/modules/doctools2idx/idx_import_json\&.n\fR
doctools::idx::import::json
.TP
\fBfiles/modules/doctools2toc/toc_export_json\&.n\fR
doctools::toc::export::json
.TP
\fBfiles/modules/doctools2toc/toc_import_json\&.n\fR
doctools::toc::import::json
.TP
\fBfiles/modules/pt/pt_peg_export_json\&.n\fR
pt::peg::export::json
.TP
\fBfiles/modules/pt/pt_peg_from_json\&.n\fR
pt::peg::from::json
.TP
\fBfiles/modules/pt/pt_peg_import_json\&.n\fR
pt::peg::import::json
.TP
\fBfiles/modules/pt/pt_peg_to_json\&.n\fR
pt::peg::to::json
.RE
json
.RS
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools2idx/idx_export\&.n\fR
5935
5936
5937
5938
5939
5940
5941












5942
5943
5944
5945
5946
5947
5948
.RE
lambda
.RS
.TP
\fBfiles/modules/lambda/lambda\&.n\fR
lambda
.RE












latex
.RS
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools/docidx\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>







4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
.RE
lambda
.RS
.TP
\fBfiles/modules/lambda/lambda\&.n\fR
lambda
.RE
LaTeX
.RS
.TP
\fBfiles/modules/docstrip/docstrip\&.n\fR
docstrip
.TP
\fBfiles/modules/docstrip/docstrip_util\&.n\fR
docstrip_util
.TP
\fBfiles/apps/tcldocstrip\&.n\fR
tcldocstrip
.RE
latex
.RS
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools/docidx\&.n\fR
6094
6095
6096
6097
6098
6099
6100













































































































































6101
6102
6103
6104
6105
6106
6107
.TP
\fBfiles/modules/docstrip/docstrip_util\&.n\fR
docstrip_util
.TP
\fBfiles/apps/tcldocstrip\&.n\fR
tcldocstrip
.RE













































































































































local searching
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
localization







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
.TP
\fBfiles/modules/docstrip/docstrip_util\&.n\fR
docstrip_util
.TP
\fBfiles/apps/tcldocstrip\&.n\fR
tcldocstrip
.RE
LL(k)
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.TP
\fBfiles/modules/grammar_peg/peg\&.n\fR
grammar::peg
.TP
\fBfiles/modules/grammar_peg/peg_interp\&.n\fR
grammar::peg::interp
.TP
\fBfiles/apps/pt\&.n\fR
pt
.TP
\fBfiles/modules/pt/pt_astree\&.n\fR
pt::ast
.TP
\fBfiles/modules/pt/pt_cparam_config_critcl\&.n\fR
pt::cparam::configuration::critcl
.TP
\fBfiles/modules/pt/pt_cparam_config_tea\&.n\fR
pt::cparam::configuration::tea
.TP
\fBfiles/modules/pt/pt_json_language\&.n\fR
pt::json_language
.TP
\fBfiles/modules/pt/pt_param\&.n\fR
pt::param
.TP
\fBfiles/modules/pt/pt_pexpression\&.n\fR
pt::pe
.TP
\fBfiles/modules/pt/pt_pexpr_op\&.n\fR
pt::pe::op
.TP
\fBfiles/modules/pt/pt_pegrammar\&.n\fR
pt::peg
.TP
\fBfiles/modules/pt/pt_peg_container\&.n\fR
pt::peg::container
.TP
\fBfiles/modules/pt/pt_peg_container_peg\&.n\fR
pt::peg::container::peg
.TP
\fBfiles/modules/pt/pt_peg_export\&.n\fR
pt::peg::export
.TP
\fBfiles/modules/pt/pt_peg_export_container\&.n\fR
pt::peg::export::container
.TP
\fBfiles/modules/pt/pt_peg_export_json\&.n\fR
pt::peg::export::json
.TP
\fBfiles/modules/pt/pt_peg_export_peg\&.n\fR
pt::peg::export::peg
.TP
\fBfiles/modules/pt/pt_peg_from_container\&.n\fR
pt::peg::from::container
.TP
\fBfiles/modules/pt/pt_peg_from_json\&.n\fR
pt::peg::from::json
.TP
\fBfiles/modules/pt/pt_peg_from_peg\&.n\fR
pt::peg::from::peg
.TP
\fBfiles/modules/pt/pt_peg_import\&.n\fR
pt::peg::import
.TP
\fBfiles/modules/pt/pt_peg_import_container\&.n\fR
pt::peg::import::container
.TP
\fBfiles/modules/pt/pt_peg_import_json\&.n\fR
pt::peg::import::json
.TP
\fBfiles/modules/pt/pt_peg_import_peg\&.n\fR
pt::peg::import::peg
.TP
\fBfiles/modules/pt/pt_peg_interp\&.n\fR
pt::peg::interp
.TP
\fBfiles/modules/pt/pt_peg_to_container\&.n\fR
pt::peg::to::container
.TP
\fBfiles/modules/pt/pt_peg_to_cparam\&.n\fR
pt::peg::to::cparam
.TP
\fBfiles/modules/pt/pt_peg_to_json\&.n\fR
pt::peg::to::json
.TP
\fBfiles/modules/pt/pt_peg_to_param\&.n\fR
pt::peg::to::param
.TP
\fBfiles/modules/pt/pt_peg_to_peg\&.n\fR
pt::peg::to::peg
.TP
\fBfiles/modules/pt/pt_peg_to_tclparam\&.n\fR
pt::peg::to::tclparam
.TP
\fBfiles/modules/pt/pt_peg_language\&.n\fR
pt::peg_language
.TP
\fBfiles/modules/pt/pt_peg_introduction\&.n\fR
pt::pegrammar
.TP
\fBfiles/modules/pt/pt_pgen\&.n\fR
pt::pgen
.TP
\fBfiles/modules/pt/pt_rdengine\&.n\fR
pt::rde
.TP
\fBfiles/modules/pt/pt_tclparam_config_nx\&.n\fR
pt::tclparam::configuration::nx
.TP
\fBfiles/modules/pt/pt_tclparam_config_snit\&.n\fR
pt::tclparam::configuration::snit
.TP
\fBfiles/modules/pt/pt_tclparam_config_tcloo\&.n\fR
pt::tclparam::configuration::tcloo
.TP
\fBfiles/modules/pt/pt_util\&.n\fR
pt::util
.TP
\fBfiles/modules/pt/pt_to_api\&.n\fR
pt_export_api
.TP
\fBfiles/modules/pt/pt_from_api\&.n\fR
pt_import_api
.TP
\fBfiles/modules/pt/pt_introduction\&.n\fR
pt_introduction
.TP
\fBfiles/modules/pt/pt_parse_peg\&.n\fR
pt_parse_peg
.TP
\fBfiles/modules/pt/pt_parser_api\&.n\fR
pt_parser_api
.TP
\fBfiles/modules/pt/pt_peg_op\&.n\fR
pt_peg_op
.RE
local searching
.RS
.TP
\fBfiles/modules/struct/graphops\&.n\fR
struct::graph::op
.RE
localization
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
.TP
\fBfiles/modules/mapproj/mapproj\&.n\fR
mapproj
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
markdown
.RS
.TP
\fBfiles/modules/doctools/doctools\&.n\fR
doctools
.TP
\fBfiles/modules/doctools/docidx\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools/doctoc\&.n\fR
doctools::toc
.RE
markup
.RS
.TP
\fBfiles/modules/doctools/docidx_intro\&.n\fR
docidx_intro
.TP
\fBfiles/modules/doctools/docidx_lang_cmdref\&.n\fR







<
<
<
<
<
<
<
<
<
<
<
<







5536
5537
5538
5539
5540
5541
5542












5543
5544
5545
5546
5547
5548
5549
.TP
\fBfiles/modules/mapproj/mapproj\&.n\fR
mapproj
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE












markup
.RS
.TP
\fBfiles/modules/doctools/docidx_intro\&.n\fR
docidx_intro
.TP
\fBfiles/modules/doctools/docidx_lang_cmdref\&.n\fR
6436
6437
6438
6439
6440
6441
6442






6443
6444
6445
6446
6447
6448
6449
.TP
\fBfiles/modules/doctools/mpexpand\&.n\fR
mpexpand
.TP
\fBfiles/apps/tcldocstrip\&.n\fR
tcldocstrip
.RE






matching
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.TP
\fBfiles/modules/grammar_peg/peg_interp\&.n\fR







>
>
>
>
>
>







5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
.TP
\fBfiles/modules/doctools/mpexpand\&.n\fR
mpexpand
.TP
\fBfiles/apps/tcldocstrip\&.n\fR
tcldocstrip
.RE
MasterCard
.RS
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.RE
matching
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.TP
\fBfiles/modules/grammar_peg/peg_interp\&.n\fR
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
.TP
\fBfiles/modules/math/linalg\&.n\fR
math::linearalgebra
.TP
\fBfiles/modules/math/optimize\&.n\fR
math::optimize
.TP
\fBfiles/modules/math/pca\&.n\fR
math::PCA
.TP
\fBfiles/modules/math/polynomials\&.n\fR
math::polynomials
.TP
\fBfiles/modules/math/rational_funcs\&.n\fR
math::rationalfunctions
.TP
\fBfiles/modules/math/special\&.n\fR
math::special
.TP
\fBfiles/modules/math/trig\&.n\fR
math::trig
.TP
\fBfiles/modules/simulation/annealing\&.n\fR
simulation::annealing
.TP
\fBfiles/modules/simulation/montecarlo\&.n\fR
simulation::montecarlo
.TP
\fBfiles/modules/simulation/simulation_random\&.n\fR
simulation::random
.RE
mathematics
.RS
.TP
\fBfiles/modules/math/fourier\&.n\fR
math::fourier
.TP
\fBfiles/modules/math/probopt\&.n\fR
math::probopt
.TP
\fBfiles/modules/math/quasirandom\&.n\fR
math::quasirandom
.TP
\fBfiles/modules/math/statistics\&.n\fR
math::statistics
.RE
matrices
.RS
.TP
\fBfiles/modules/math/linalg\&.n\fR







<
<
<









<
<
<















<
<
<
<
<
<







5824
5825
5826
5827
5828
5829
5830



5831
5832
5833
5834
5835
5836
5837
5838
5839



5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854






5855
5856
5857
5858
5859
5860
5861
.TP
\fBfiles/modules/math/linalg\&.n\fR
math::linearalgebra
.TP
\fBfiles/modules/math/optimize\&.n\fR
math::optimize
.TP



\fBfiles/modules/math/polynomials\&.n\fR
math::polynomials
.TP
\fBfiles/modules/math/rational_funcs\&.n\fR
math::rationalfunctions
.TP
\fBfiles/modules/math/special\&.n\fR
math::special
.TP



\fBfiles/modules/simulation/annealing\&.n\fR
simulation::annealing
.TP
\fBfiles/modules/simulation/montecarlo\&.n\fR
simulation::montecarlo
.TP
\fBfiles/modules/simulation/simulation_random\&.n\fR
simulation::random
.RE
mathematics
.RS
.TP
\fBfiles/modules/math/fourier\&.n\fR
math::fourier
.TP






\fBfiles/modules/math/statistics\&.n\fR
math::statistics
.RE
matrices
.RS
.TP
\fBfiles/modules/math/linalg\&.n\fR
7081
7082
7083
7084
7085
7086
7087






7088
7089
7090
7091
7092
7093
7094
.TP
\fBfiles/modules/debug/debug_heartbeat\&.n\fR
debug::heartbeat
.TP
\fBfiles/modules/debug/debug_timestamp\&.n\fR
debug::timestamp
.RE






neighbour
.RS
.TP
\fBfiles/modules/struct/graph\&.n\fR
struct::graph
.TP
\fBfiles/modules/struct/graphops\&.n\fR







>
>
>
>
>
>







6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
.TP
\fBfiles/modules/debug/debug_heartbeat\&.n\fR
debug::heartbeat
.TP
\fBfiles/modules/debug/debug_timestamp\&.n\fR
debug::timestamp
.RE
National Provider Identifier
.RS
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.RE
neighbour
.RS
.TP
\fBfiles/modules/struct/graph\&.n\fR
struct::graph
.TP
\fBfiles/modules/struct/graphops\&.n\fR
7201
7202
7203
7204
7205
7206
7207






7208
7209
7210
7211
7212
7213
7214
.TP
\fBfiles/modules/page/page_util_norm_peg\&.n\fR
page_util_norm_peg
.TP
\fBfiles/modules/stringprep/unicode\&.n\fR
unicode
.RE






nroff
.RS
.TP
\fBfiles/modules/doctools/doctools\&.n\fR
doctools
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR







>
>
>
>
>
>







6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
.TP
\fBfiles/modules/page/page_util_norm_peg\&.n\fR
page_util_norm_peg
.TP
\fBfiles/modules/stringprep/unicode\&.n\fR
unicode
.RE
NPI
.RS
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.RE
nroff
.RS
.TP
\fBfiles/modules/doctools/doctools\&.n\fR
doctools
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
7243
7244
7245
7246
7247
7248
7249












7250
7251
7252
7253
7254
7255
7256
.TP
\fBfiles/modules/dtplite/pkg_dtplite\&.n\fR
dtplite
.TP
\fBfiles/modules/doctools/mpexpand\&.n\fR
mpexpand
.RE












null
.RS
.TP
\fBfiles/modules/virtchannel_base/tcllib_null\&.n\fR
tcl::chan::null
.TP
\fBfiles/modules/virtchannel_base/nullzero\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>







6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
.TP
\fBfiles/modules/dtplite/pkg_dtplite\&.n\fR
dtplite
.TP
\fBfiles/modules/doctools/mpexpand\&.n\fR
mpexpand
.RE
NTLM
.RS
.TP
\fBfiles/modules/sasl/ntlm\&.n\fR
SASL::NTLM
.RE
NTP
.RS
.TP
\fBfiles/modules/ntp/ntp_time\&.n\fR
ntp_time
.RE
null
.RS
.TP
\fBfiles/modules/virtchannel_base/tcllib_null\&.n\fR
tcl::chan::null
.TP
\fBfiles/modules/virtchannel_base/nullzero\&.n\fR
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
.RE
one time pad
.RS
.TP
\fBfiles/modules/virtchannel_transform/vt_otp\&.n\fR
tcl::transform::otp
.RE
oo
.RS
.TP
\fBfiles/modules/clay/clay\&.n\fR
clay
.RE
optimisation
.RS
.TP
\fBfiles/modules/math/probopt\&.n\fR
math::probopt
.RE
optimization
.RS
.TP
\fBfiles/modules/math/optimize\&.n\fR
math::optimize
.TP
\fBfiles/modules/simulation/annealing\&.n\fR







<
<
<
<
<
<
<
<
<
<
<
<







6547
6548
6549
6550
6551
6552
6553












6554
6555
6556
6557
6558
6559
6560
.RE
one time pad
.RS
.TP
\fBfiles/modules/virtchannel_transform/vt_otp\&.n\fR
tcl::transform::otp
.RE












optimization
.RS
.TP
\fBfiles/modules/math/optimize\&.n\fR
math::optimize
.TP
\fBfiles/modules/simulation/annealing\&.n\fR
7417
7418
7419
7420
7421
7422
7423






7424
7425
7426
7427
7428
7429
7430
.TP
\fBfiles/modules/textutil/textutil\&.n\fR
textutil
.TP
\fBfiles/modules/textutil/adjust\&.n\fR
textutil::adjust
.RE






parameter entry form
.RS
.TP
\fBfiles/modules/tepam/tepam_introduction\&.n\fR
tepam
.TP
\fBfiles/modules/tepam/tepam_argument_dialogbox\&.n\fR







>
>
>
>
>
>







6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
.TP
\fBfiles/modules/textutil/textutil\&.n\fR
textutil
.TP
\fBfiles/modules/textutil/adjust\&.n\fR
textutil::adjust
.RE
PARAM
.RS
.TP
\fBfiles/modules/pt/pt_peg_to_param\&.n\fR
pt::peg::to::param
.RE
parameter entry form
.RS
.TP
\fBfiles/modules/tepam/tepam_introduction\&.n\fR
tepam
.TP
\fBfiles/modules/tepam/tepam_argument_dialogbox\&.n\fR
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011













































































































































8012
8013
8014
8015
8016
8017
8018
otp
.RE
patch
.RS
.TP
\fBfiles/modules/docstrip/docstrip_util\&.n\fR
docstrip_util
.TP
\fBfiles/modules/textutil/patch\&.n\fR
textutil::patch
.RE
patching
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE













































































































































performance
.RS
.TP
\fBfiles/modules/bench/bench\&.n\fR
bench
.TP
\fBfiles/modules/bench/bench_read\&.n\fR







<
<
<







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







7209
7210
7211
7212
7213
7214
7215



7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
otp
.RE
patch
.RS
.TP
\fBfiles/modules/docstrip/docstrip_util\&.n\fR
docstrip_util



.RE
patching
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE
PEG
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.TP
\fBfiles/modules/page/page_util_norm_peg\&.n\fR
page_util_norm_peg
.TP
\fBfiles/modules/page/page_util_peg\&.n\fR
page_util_peg
.TP
\fBfiles/apps/pt\&.n\fR
pt
.TP
\fBfiles/modules/pt/pt_astree\&.n\fR
pt::ast
.TP
\fBfiles/modules/pt/pt_cparam_config_critcl\&.n\fR
pt::cparam::configuration::critcl
.TP
\fBfiles/modules/pt/pt_cparam_config_tea\&.n\fR
pt::cparam::configuration::tea
.TP
\fBfiles/modules/pt/pt_json_language\&.n\fR
pt::json_language
.TP
\fBfiles/modules/pt/pt_param\&.n\fR
pt::param
.TP
\fBfiles/modules/pt/pt_pexpression\&.n\fR
pt::pe
.TP
\fBfiles/modules/pt/pt_pexpr_op\&.n\fR
pt::pe::op
.TP
\fBfiles/modules/pt/pt_pegrammar\&.n\fR
pt::peg
.TP
\fBfiles/modules/pt/pt_peg_container\&.n\fR
pt::peg::container
.TP
\fBfiles/modules/pt/pt_peg_container_peg\&.n\fR
pt::peg::container::peg
.TP
\fBfiles/modules/pt/pt_peg_export\&.n\fR
pt::peg::export
.TP
\fBfiles/modules/pt/pt_peg_export_container\&.n\fR
pt::peg::export::container
.TP
\fBfiles/modules/pt/pt_peg_export_json\&.n\fR
pt::peg::export::json
.TP
\fBfiles/modules/pt/pt_peg_export_peg\&.n\fR
pt::peg::export::peg
.TP
\fBfiles/modules/pt/pt_peg_from_container\&.n\fR
pt::peg::from::container
.TP
\fBfiles/modules/pt/pt_peg_from_json\&.n\fR
pt::peg::from::json
.TP
\fBfiles/modules/pt/pt_peg_from_peg\&.n\fR
pt::peg::from::peg
.TP
\fBfiles/modules/pt/pt_peg_import\&.n\fR
pt::peg::import
.TP
\fBfiles/modules/pt/pt_peg_import_container\&.n\fR
pt::peg::import::container
.TP
\fBfiles/modules/pt/pt_peg_import_json\&.n\fR
pt::peg::import::json
.TP
\fBfiles/modules/pt/pt_peg_import_peg\&.n\fR
pt::peg::import::peg
.TP
\fBfiles/modules/pt/pt_peg_interp\&.n\fR
pt::peg::interp
.TP
\fBfiles/modules/pt/pt_peg_to_container\&.n\fR
pt::peg::to::container
.TP
\fBfiles/modules/pt/pt_peg_to_cparam\&.n\fR
pt::peg::to::cparam
.TP
\fBfiles/modules/pt/pt_peg_to_json\&.n\fR
pt::peg::to::json
.TP
\fBfiles/modules/pt/pt_peg_to_param\&.n\fR
pt::peg::to::param
.TP
\fBfiles/modules/pt/pt_peg_to_peg\&.n\fR
pt::peg::to::peg
.TP
\fBfiles/modules/pt/pt_peg_to_tclparam\&.n\fR
pt::peg::to::tclparam
.TP
\fBfiles/modules/pt/pt_peg_language\&.n\fR
pt::peg_language
.TP
\fBfiles/modules/pt/pt_peg_introduction\&.n\fR
pt::pegrammar
.TP
\fBfiles/modules/pt/pt_pgen\&.n\fR
pt::pgen
.TP
\fBfiles/modules/pt/pt_rdengine\&.n\fR
pt::rde
.TP
\fBfiles/modules/pt/pt_tclparam_config_nx\&.n\fR
pt::tclparam::configuration::nx
.TP
\fBfiles/modules/pt/pt_tclparam_config_snit\&.n\fR
pt::tclparam::configuration::snit
.TP
\fBfiles/modules/pt/pt_tclparam_config_tcloo\&.n\fR
pt::tclparam::configuration::tcloo
.TP
\fBfiles/modules/pt/pt_util\&.n\fR
pt::util
.TP
\fBfiles/modules/pt/pt_to_api\&.n\fR
pt_export_api
.TP
\fBfiles/modules/pt/pt_from_api\&.n\fR
pt_import_api
.TP
\fBfiles/modules/pt/pt_introduction\&.n\fR
pt_introduction
.TP
\fBfiles/modules/pt/pt_parse_peg\&.n\fR
pt_parse_peg
.TP
\fBfiles/modules/pt/pt_parser_api\&.n\fR
pt_parser_api
.TP
\fBfiles/modules/pt/pt_peg_op\&.n\fR
pt_peg_op
.RE
performance
.RS
.TP
\fBfiles/modules/bench/bench\&.n\fR
bench
.TP
\fBfiles/modules/bench/bench_read\&.n\fR
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
.RE
priority queue
.RS
.TP
\fBfiles/modules/struct/prioqueue\&.n\fR
struct::prioqueue
.RE
probabilistic calculations
.RS
.TP
\fBfiles/modules/math/probopt\&.n\fR
math::probopt
.RE
proc
.RS
.TP
\fBfiles/modules/lambda/lambda\&.n\fR
lambda
.RE
procedure







<
<
<
<
<
<







7588
7589
7590
7591
7592
7593
7594






7595
7596
7597
7598
7599
7600
7601
.RE
priority queue
.RS
.TP
\fBfiles/modules/struct/prioqueue\&.n\fR
struct::prioqueue
.RE






proc
.RS
.TP
\fBfiles/modules/lambda/lambda\&.n\fR
lambda
.RE
procedure
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
.TP
\fBfiles/modules/pt/pt_parser_api\&.n\fR
pt_parser_api
.TP
\fBfiles/modules/pt/pt_peg_op\&.n\fR
pt_peg_op
.RE
quasi-random
.RS
.TP
\fBfiles/modules/math/quasirandom\&.n\fR
math::quasirandom
.RE
queue
.RS
.TP
\fBfiles/modules/csv/csv\&.n\fR
csv
.TP
\fBfiles/modules/htmlparse/htmlparse\&.n\fR







<
<
<
<
<
<







7825
7826
7827
7828
7829
7830
7831






7832
7833
7834
7835
7836
7837
7838
.TP
\fBfiles/modules/pt/pt_parser_api\&.n\fR
pt_parser_api
.TP
\fBfiles/modules/pt/pt_peg_op\&.n\fR
pt_peg_op
.RE






queue
.RS
.TP
\fBfiles/modules/csv/csv\&.n\fR
csv
.TP
\fBfiles/modules/htmlparse/htmlparse\&.n\fR
8559
8560
8561
8562
8563
8564
8565












8566
8567
8568
8569
8570
8571
8572
term::ansi::ctrl::unix
.RE
rc4
.RS
.TP
\fBfiles/modules/rc4/rc4\&.n\fR
rc4












.RE
read
.RS
.TP
\fBfiles/modules/coroutine/tcllib_coroutine\&.n\fR
coroutine
.TP







>
>
>
>
>
>
>
>
>
>
>
>







7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
term::ansi::ctrl::unix
.RE
rc4
.RS
.TP
\fBfiles/modules/rc4/rc4\&.n\fR
rc4
.RE
RCS
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE
RCS patch
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE
read
.RS
.TP
\fBfiles/modules/coroutine/tcllib_coroutine\&.n\fR
coroutine
.TP
9015
9016
9017
9018
9019
9020
9021
















































9022
9023
9024
9025
9026
9027
9028
throw
.RE
reverse
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
















































.RE
rfc 1034
.RS
.TP
\fBfiles/modules/dns/tcllib_dns\&.n\fR
dns
.RE







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
throw
.RE
reverse
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
rfc 821
.RS
.TP
\fBfiles/modules/mime/mime\&.n\fR
mime
.TP
\fBfiles/modules/mime/smtp\&.n\fR
smtp
.TP
\fBfiles/modules/smtpd/smtpd\&.n\fR
smtpd
.RE
rfc 822
.RS
.TP
\fBfiles/modules/mime/mime\&.n\fR
mime
.TP
\fBfiles/modules/pop3d/pop3d_dbox\&.n\fR
pop3d::dbox
.TP
\fBfiles/modules/mime/smtp\&.n\fR
smtp
.RE
rfc 868
.RS
.TP
\fBfiles/modules/ntp/ntp_time\&.n\fR
ntp_time
.RE
rfc 959
.RS
.TP
\fBfiles/modules/ftp/ftp\&.n\fR
ftp
.TP
\fBfiles/modules/ftp/ftp_geturl\&.n\fR
ftp::geturl
.TP
\fBfiles/modules/ftpd/ftpd\&.n\fR
ftpd
.RE
rfc 977
.RS
.TP
\fBfiles/modules/nntp/nntp\&.n\fR
nntp
.RE
rfc 1034
.RS
.TP
\fBfiles/modules/dns/tcllib_dns\&.n\fR
dns
.RE
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
ripemd160
.RE
rfc 1413
.RS
.TP
\fBfiles/modules/ident/ident\&.n\fR
ident
.RE
rfc 1630
.RS
.TP
\fBfiles/modules/uri/uri\&.n\fR
uri
.RE
rfc 1886
.RS
.TP
\fBfiles/modules/dns/tcllib_dns\&.n\fR
dns
.RE







<
<
<
<
<
<







8469
8470
8471
8472
8473
8474
8475






8476
8477
8478
8479
8480
8481
8482
ripemd160
.RE
rfc 1413
.RS
.TP
\fBfiles/modules/ident/ident\&.n\fR
ident






.RE
rfc 1886
.RS
.TP
\fBfiles/modules/dns/tcllib_dns\&.n\fR
dns
.RE
9174
9175
9176
9177
9178
9179
9180






9181
9182
9183
9184
9185
9186
9187
uri
.RE
rfc 2554
.RS
.TP
\fBfiles/modules/mime/smtp\&.n\fR
smtp






.RE
rfc 2821
.RS
.TP
\fBfiles/modules/mime/smtp\&.n\fR
smtp
.TP







>
>
>
>
>
>







8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
uri
.RE
rfc 2554
.RS
.TP
\fBfiles/modules/mime/smtp\&.n\fR
smtp
.RE
RFC 2718
.RS
.TP
\fBfiles/modules/oauth/oauth\&.n\fR
oauth
.RE
rfc 2821
.RS
.TP
\fBfiles/modules/mime/smtp\&.n\fR
smtp
.TP
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
smtp
.RE
rfc 3513
.RS
.TP
\fBfiles/modules/dns/tcllib_ip\&.n\fR
tcllib_ip
.RE
rfc 3986
.RS
.TP
\fBfiles/modules/uri/uri\&.n\fR
uri
.RE
rfc 4511
.RS
.TP
\fBfiles/modules/ldap/ldap\&.n\fR
ldap
.RE
rfc 6455
.RS
.TP
\fBfiles/modules/websocket/websocket\&.n\fR
websocket
.RE
rfc 7858
.RS
.TP
\fBfiles/modules/dns/tcllib_dns\&.n\fR
dns
.RE
rfc 821
.RS
.TP
\fBfiles/modules/mime/mime\&.n\fR
mime
.TP
\fBfiles/modules/mime/smtp\&.n\fR
smtp
.TP
\fBfiles/modules/smtpd/smtpd\&.n\fR
smtpd
.RE
rfc 822
.RS
.TP
\fBfiles/modules/mime/mime\&.n\fR
mime
.TP
\fBfiles/modules/pop3d/pop3d_dbox\&.n\fR
pop3d::dbox
.TP
\fBfiles/modules/mime/smtp\&.n\fR
smtp
.RE
rfc 868
.RS
.TP
\fBfiles/modules/ntp/ntp_time\&.n\fR
ntp_time
.RE
rfc 959
.RS
.TP
\fBfiles/modules/ftp/ftp\&.n\fR
ftp
.TP
\fBfiles/modules/ftp/ftp_geturl\&.n\fR
ftp::geturl
.TP
\fBfiles/modules/ftpd/ftpd\&.n\fR
ftpd
.RE
rfc 977
.RS
.TP
\fBfiles/modules/nntp/nntp\&.n\fR
nntp
.RE
rfc3501
.RS
.TP
\fBfiles/modules/imap4/imap4\&.n\fR
imap4
.RE
rfc3548







<
<
<
<
<
<







<
<
<
<
<
<
|


<
<
<
<
<
<
|
<
<
<
|
<
<
<

|


|
|
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







8601
8602
8603
8604
8605
8606
8607






8608
8609
8610
8611
8612
8613
8614






8615
8616
8617






8618



8619



8620
8621
8622
8623
8624
8625






8626
























8627
8628
8629
8630
8631
8632
8633
smtp
.RE
rfc 3513
.RS
.TP
\fBfiles/modules/dns/tcllib_ip\&.n\fR
tcllib_ip






.RE
rfc 4511
.RS
.TP
\fBfiles/modules/ldap/ldap\&.n\fR
ldap
.RE






RFC 5849
.RS
.TP






\fBfiles/modules/oauth/oauth\&.n\fR



oauth



.RE
rfc 6455
.RS
.TP
\fBfiles/modules/websocket/websocket\&.n\fR
websocket






.RE
























rfc3501
.RS
.TP
\fBfiles/modules/imap4/imap4\&.n\fR
imap4
.RE
rfc3548
9295
9296
9297
9298
9299
9300
9301









9302
9303
9304
9305
9306
9307
9308
.RE
right outer join
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE









roman numeral
.RS
.TP
\fBfiles/modules/math/roman\&.n\fR
math::roman
.RE
roots







>
>
>
>
>
>
>
>
>







8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
.RE
right outer join
.RS
.TP
\fBfiles/modules/struct/struct_list\&.n\fR
struct::list
.RE
RIPEMD
.RS
.TP
\fBfiles/modules/ripemd/ripemd128\&.n\fR
ripemd128
.TP
\fBfiles/modules/ripemd/ripemd160\&.n\fR
ripemd160
.RE
roman numeral
.RS
.TP
\fBfiles/modules/math/roman\&.n\fR
math::roman
.RE
roots
9358
9359
9360
9361
9362
9363
9364















9365
9366
9367
9368
9369
9370












9371
9372
9373
9374
9375
9376
9377
.RE
s3
.RS
.TP
\fBfiles/modules/amazon-s3/S3\&.n\fR
S3
.RE















scanl
.RS
.TP
\fBfiles/modules/generator/generator\&.n\fR
generator
.RE












secure
.RS
.TP
\fBfiles/modules/comm/comm\&.n\fR
comm
.TP
\fBfiles/modules/pop3/pop3\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






>
>
>
>
>
>
>
>
>
>
>
>







8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
.RE
s3
.RS
.TP
\fBfiles/modules/amazon-s3/S3\&.n\fR
S3
.RE
SASL
.RS
.TP
\fBfiles/modules/sasl/sasl\&.n\fR
SASL
.TP
\fBfiles/modules/sasl/ntlm\&.n\fR
SASL::NTLM
.TP
\fBfiles/modules/sasl/scram\&.n\fR
SASL::SCRAM
.TP
\fBfiles/modules/sasl/gtoken\&.n\fR
SASL::XGoogleToken
.RE
scanl
.RS
.TP
\fBfiles/modules/generator/generator\&.n\fR
generator
.RE
SCCS
.RS
.TP
\fBfiles/modules/rcs/rcs\&.n\fR
rcs
.RE
SCRAM
.RS
.TP
\fBfiles/modules/sasl/scram\&.n\fR
SASL::SCRAM
.RE
secure
.RS
.TP
\fBfiles/modules/comm/comm\&.n\fR
comm
.TP
\fBfiles/modules/pop3/pop3\&.n\fR
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
.RE
services
.RS
.TP
\fBfiles/modules/ftpd/ftpd\&.n\fR
ftpd
.TP
\fBfiles/modules/httpd/httpd\&.n\fR
httpd
.TP
\fBfiles/modules/smtpd/smtpd\&.n\fR
smtpd
.RE
set
.RS
.TP
\fBfiles/modules/struct/queue\&.n\fR







<
<
<







9037
9038
9039
9040
9041
9042
9043



9044
9045
9046
9047
9048
9049
9050
.RE
services
.RS
.TP
\fBfiles/modules/ftpd/ftpd\&.n\fR
ftpd
.TP



\fBfiles/modules/smtpd/smtpd\&.n\fR
smtpd
.RE
set
.RS
.TP
\fBfiles/modules/struct/queue\&.n\fR
9766
9767
9768
9769
9770
9771
9772






9773
9774
9775
9776
9777
9778
9779
9780
9781






9782
9783
9784
9785
9786
9787
9788
.RE
smtpd
.RS
.TP
\fBfiles/modules/smtpd/smtpd\&.n\fR
smtpd
.RE






snit
.RS
.TP
\fBfiles/modules/interp/deleg_method\&.n\fR
deleg_method
.TP
\fBfiles/modules/interp/tcllib_interp\&.n\fR
interp
.RE






socket
.RS
.TP
\fBfiles/modules/comm/comm\&.n\fR
comm
.TP
\fBfiles/modules/comm/comm_wire\&.n\fR







>
>
>
>
>
>









>
>
>
>
>
>







9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
.RE
smtpd
.RS
.TP
\fBfiles/modules/smtpd/smtpd\&.n\fR
smtpd
.RE
Snit
.RS
.TP
\fBfiles/modules/snit/snit\&.n\fR
snit
.RE
snit
.RS
.TP
\fBfiles/modules/interp/deleg_method\&.n\fR
deleg_method
.TP
\fBfiles/modules/interp/tcllib_interp\&.n\fR
interp
.RE
SNTP
.RS
.TP
\fBfiles/modules/ntp/ntp_time\&.n\fR
ntp_time
.RE
socket
.RS
.TP
\fBfiles/modules/comm/comm\&.n\fR
comm
.TP
\fBfiles/modules/comm/comm_wire\&.n\fR
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
.TP
\fBfiles/modules/counter/counter\&.n\fR
counter
.TP
\fBfiles/modules/math/math\&.n\fR
math
.TP
\fBfiles/modules/math/changepoint\&.n\fR
math::changepoint
.TP
\fBfiles/modules/math/pca\&.n\fR
math::PCA
.TP
\fBfiles/modules/math/statistics\&.n\fR
math::statistics
.RE
stdin
.RS
.TP
\fBfiles/modules/virtchannel_base/std\&.n\fR







<
<
<
<
<
<







9445
9446
9447
9448
9449
9450
9451






9452
9453
9454
9455
9456
9457
9458
.TP
\fBfiles/modules/counter/counter\&.n\fR
counter
.TP
\fBfiles/modules/math/math\&.n\fR
math
.TP






\fBfiles/modules/math/statistics\&.n\fR
math::statistics
.RE
stdin
.RS
.TP
\fBfiles/modules/virtchannel_base/std\&.n\fR
10350
10351
10352
10353
10354
10355
10356



10357
10358






10359
10360
10361
10362
10363
10364
10365
10366
math::bigfloat
.TP
\fBfiles/modules/math/bignum\&.n\fR
math::bignum
.TP
\fBfiles/modules/math/decimal\&.n\fR
math::decimal



.TP
\fBfiles/modules/math/pca\&.n\fR






math::PCA
.RE
tcler's wiki
.RS
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
doctools::idx
.TP







>
>
>

|
>
>
>
>
>
>
|







9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
math::bigfloat
.TP
\fBfiles/modules/math/bignum\&.n\fR
math::bignum
.TP
\fBfiles/modules/math/decimal\&.n\fR
math::decimal
.RE
Tcl module
.RS
.TP
\fBfiles/modules/docstrip/docstrip_util\&.n\fR
docstrip_util
.RE
Tcl syntax
.RS
.TP
\fBfiles/modules/doctools2base/tcl_parse\&.n\fR
doctools::tcl::parse
.RE
tcler's wiki
.RS
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
doctools::idx
.TP
10375
10376
10377
10378
10379
10380
10381































































































































































10382
10383
10384
10385
10386
10387
10388
.RE
tcllib
.RS
.TP
\fBfiles/modules/csv/csv\&.n\fR
csv
.RE































































































































































temp file
.RS
.TP
\fBfiles/modules/fileutil/fileutil\&.n\fR
fileutil
.RE
template processing







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
.RE
tcllib
.RS
.TP
\fBfiles/modules/csv/csv\&.n\fR
csv
.RE
TclOO
.RS
.TP
\fBfiles/modules/tool/meta\&.n\fR
oo::util
.TP
\fBfiles/modules/ooutil/ooutil\&.n\fR
oo::util
.TP
\fBfiles/modules/tool/tool\&.n\fR
tool
.TP
\fBfiles/modules/tool/tool_dict_ensemble\&.n\fR
tool::dict_ensemble
.RE
TCLPARAM
.RS
.TP
\fBfiles/modules/pt/pt_peg_to_tclparam\&.n\fR
pt::peg::to::tclparam
.RE
TDPL
.RS
.TP
\fBfiles/modules/grammar_peg/peg\&.n\fR
grammar::peg
.TP
\fBfiles/modules/grammar_peg/peg_interp\&.n\fR
grammar::peg::interp
.TP
\fBfiles/apps/pt\&.n\fR
pt
.TP
\fBfiles/modules/pt/pt_astree\&.n\fR
pt::ast
.TP
\fBfiles/modules/pt/pt_cparam_config_critcl\&.n\fR
pt::cparam::configuration::critcl
.TP
\fBfiles/modules/pt/pt_cparam_config_tea\&.n\fR
pt::cparam::configuration::tea
.TP
\fBfiles/modules/pt/pt_json_language\&.n\fR
pt::json_language
.TP
\fBfiles/modules/pt/pt_param\&.n\fR
pt::param
.TP
\fBfiles/modules/pt/pt_pexpression\&.n\fR
pt::pe
.TP
\fBfiles/modules/pt/pt_pexpr_op\&.n\fR
pt::pe::op
.TP
\fBfiles/modules/pt/pt_pegrammar\&.n\fR
pt::peg
.TP
\fBfiles/modules/pt/pt_peg_container\&.n\fR
pt::peg::container
.TP
\fBfiles/modules/pt/pt_peg_container_peg\&.n\fR
pt::peg::container::peg
.TP
\fBfiles/modules/pt/pt_peg_export\&.n\fR
pt::peg::export
.TP
\fBfiles/modules/pt/pt_peg_export_container\&.n\fR
pt::peg::export::container
.TP
\fBfiles/modules/pt/pt_peg_export_json\&.n\fR
pt::peg::export::json
.TP
\fBfiles/modules/pt/pt_peg_export_peg\&.n\fR
pt::peg::export::peg
.TP
\fBfiles/modules/pt/pt_peg_from_container\&.n\fR
pt::peg::from::container
.TP
\fBfiles/modules/pt/pt_peg_from_json\&.n\fR
pt::peg::from::json
.TP
\fBfiles/modules/pt/pt_peg_from_peg\&.n\fR
pt::peg::from::peg
.TP
\fBfiles/modules/pt/pt_peg_import\&.n\fR
pt::peg::import
.TP
\fBfiles/modules/pt/pt_peg_import_container\&.n\fR
pt::peg::import::container
.TP
\fBfiles/modules/pt/pt_peg_import_json\&.n\fR
pt::peg::import::json
.TP
\fBfiles/modules/pt/pt_peg_import_peg\&.n\fR
pt::peg::import::peg
.TP
\fBfiles/modules/pt/pt_peg_interp\&.n\fR
pt::peg::interp
.TP
\fBfiles/modules/pt/pt_peg_to_container\&.n\fR
pt::peg::to::container
.TP
\fBfiles/modules/pt/pt_peg_to_cparam\&.n\fR
pt::peg::to::cparam
.TP
\fBfiles/modules/pt/pt_peg_to_json\&.n\fR
pt::peg::to::json
.TP
\fBfiles/modules/pt/pt_peg_to_param\&.n\fR
pt::peg::to::param
.TP
\fBfiles/modules/pt/pt_peg_to_peg\&.n\fR
pt::peg::to::peg
.TP
\fBfiles/modules/pt/pt_peg_to_tclparam\&.n\fR
pt::peg::to::tclparam
.TP
\fBfiles/modules/pt/pt_peg_language\&.n\fR
pt::peg_language
.TP
\fBfiles/modules/pt/pt_peg_introduction\&.n\fR
pt::pegrammar
.TP
\fBfiles/modules/pt/pt_pgen\&.n\fR
pt::pgen
.TP
\fBfiles/modules/pt/pt_rdengine\&.n\fR
pt::rde
.TP
\fBfiles/modules/pt/pt_tclparam_config_nx\&.n\fR
pt::tclparam::configuration::nx
.TP
\fBfiles/modules/pt/pt_tclparam_config_snit\&.n\fR
pt::tclparam::configuration::snit
.TP
\fBfiles/modules/pt/pt_tclparam_config_tcloo\&.n\fR
pt::tclparam::configuration::tcloo
.TP
\fBfiles/modules/pt/pt_util\&.n\fR
pt::util
.TP
\fBfiles/modules/pt/pt_to_api\&.n\fR
pt_export_api
.TP
\fBfiles/modules/pt/pt_from_api\&.n\fR
pt_import_api
.TP
\fBfiles/modules/pt/pt_introduction\&.n\fR
pt_introduction
.TP
\fBfiles/modules/pt/pt_parse_peg\&.n\fR
pt_parse_peg
.TP
\fBfiles/modules/pt/pt_parser_api\&.n\fR
pt_parser_api
.TP
\fBfiles/modules/pt/pt_peg_op\&.n\fR
pt_peg_op
.RE
temp file
.RS
.TP
\fBfiles/modules/fileutil/fileutil\&.n\fR
fileutil
.RE
template processing
10432
10433
10434
10435
10436
10437
10438










































10439
10440
10441
10442
10443
10444
10445
.RE
test
.RS
.TP
\fBfiles/modules/fileutil/fileutil\&.n\fR
fileutil
.RE










































testing
.RS
.TP
\fBfiles/modules/bench/bench\&.n\fR
bench
.TP
\fBfiles/modules/bench/bench_read\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
.RE
test
.RS
.TP
\fBfiles/modules/fileutil/fileutil\&.n\fR
fileutil
.RE
Testing
.RS
.TP
\fBfiles/modules/valtype/valtype_common\&.n\fR
valtype::common
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.TP
\fBfiles/modules/valtype/luhn\&.n\fR
valtype::luhn
.TP
\fBfiles/modules/valtype/luhn5\&.n\fR
valtype::luhn5
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
testing
.RS
.TP
\fBfiles/modules/bench/bench\&.n\fR
bench
.TP
\fBfiles/modules/bench/bench_read\&.n\fR
10456
10457
10458
10459
10460
10461
10462









10463
10464
10465
10466
10467
10468
10469
.TP
\fBfiles/modules/bench/bench_lang_intro\&.n\fR
bench_lang_intro
.TP
\fBfiles/modules/bench/bench_lang_spec\&.n\fR
bench_lang_spec
.RE









text
.RS
.TP
\fBfiles/modules/bench/bench_read\&.n\fR
bench::in
.TP
\fBfiles/modules/bench/bench_wtext\&.n\fR







>
>
>
>
>
>
>
>
>







10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
.TP
\fBfiles/modules/bench/bench_lang_intro\&.n\fR
bench_lang_intro
.TP
\fBfiles/modules/bench/bench_lang_spec\&.n\fR
bench_lang_spec
.RE
TeX
.RS
.TP
\fBfiles/modules/textutil/textutil\&.n\fR
textutil
.TP
\fBfiles/modules/textutil/adjust\&.n\fR
textutil::adjust
.RE
text
.RS
.TP
\fBfiles/modules/bench/bench_read\&.n\fR
bench::in
.TP
\fBfiles/modules/bench/bench_wtext\&.n\fR
10735
10736
10737
10738
10739
10740
10741






10742
10743
10744
10745
10746
10747
10748
.RE
tip 317
.RS
.TP
\fBfiles/modules/virtchannel_transform/vt_base64\&.n\fR
tcl::transform::base64
.RE






tls
.RS
.TP
\fBfiles/modules/comm/comm\&.n\fR
comm
.TP
\fBfiles/modules/imap4/imap4\&.n\fR







>
>
>
>
>
>







10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
.RE
tip 317
.RS
.TP
\fBfiles/modules/virtchannel_transform/vt_base64\&.n\fR
tcl::transform::base64
.RE
Tk
.RS
.TP
\fBfiles/modules/virtchannel_base/textwindow\&.n\fR
tcl::chan::textwindow
.RE
tls
.RS
.TP
\fBfiles/modules/comm/comm\&.n\fR
comm
.TP
\fBfiles/modules/imap4/imap4\&.n\fR
10762
10763
10764
10765
10766
10767
10768



























10769
10770
10771
10772
10773
10774
10775
.TP
\fBfiles/modules/transfer/receiver\&.n\fR
transfer::receiver
.TP
\fBfiles/modules/transfer/transmitter\&.n\fR
transfer::transmitter
.RE



























toc
.RS
.TP
\fBfiles/modules/doctools/doctoc_intro\&.n\fR
doctoc_intro
.TP
\fBfiles/modules/doctools/doctoc_plugin_apiref\&.n\fR







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
.TP
\fBfiles/modules/transfer/receiver\&.n\fR
transfer::receiver
.TP
\fBfiles/modules/transfer/transmitter\&.n\fR
transfer::transmitter
.RE
TMML
.RS
.TP
\fBfiles/modules/doctools/doctools\&.n\fR
doctools
.TP
\fBfiles/modules/doctools2idx/idx_container\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools/docidx\&.n\fR
doctools::idx
.TP
\fBfiles/modules/doctools/doctoc\&.n\fR
doctools::toc
.TP
\fBfiles/modules/doctools2toc/toc_container\&.n\fR
doctools::toc
.TP
\fBfiles/apps/dtplite\&.n\fR
dtplite
.TP
\fBfiles/modules/dtplite/pkg_dtplite\&.n\fR
dtplite
.TP
\fBfiles/modules/doctools/mpexpand\&.n\fR
mpexpand
.RE
toc
.RS
.TP
\fBfiles/modules/doctools/doctoc_intro\&.n\fR
doctoc_intro
.TP
\fBfiles/modules/doctools/doctoc_plugin_apiref\&.n\fR
10813
10814
10815
10816
10817
10818
10819









10820
10821
10822
10823
10824
10825
10826
.TP
\fBfiles/modules/string/token\&.n\fR
string::token
.TP
\fBfiles/modules/string/token_shell\&.n\fR
string::token::shell
.RE









top-down parsing languages
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.TP
\fBfiles/modules/grammar_peg/peg\&.n\fR







>
>
>
>
>
>
>
>
>







10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
.TP
\fBfiles/modules/string/token\&.n\fR
string::token
.TP
\fBfiles/modules/string/token_shell\&.n\fR
string::token::shell
.RE
TOOL
.RS
.TP
\fBfiles/modules/tool/tool\&.n\fR
tool
.TP
\fBfiles/modules/tool/tool_dict_ensemble\&.n\fR
tool::dict_ensemble
.RE
top-down parsing languages
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.TP
\fBfiles/modules/grammar_peg/peg\&.n\fR
10966
10967
10968
10969
10970
10971
10972






10973
10974
10975
10976
10977
10978
10979
.RE
touch
.RS
.TP
\fBfiles/modules/fileutil/fileutil\&.n\fR
fileutil
.RE






trace
.RS
.TP
\fBfiles/modules/debug/debug\&.n\fR
debug
.TP
\fBfiles/modules/debug/debug_caller\&.n\fR







>
>
>
>
>
>







10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
.RE
touch
.RS
.TP
\fBfiles/modules/fileutil/fileutil\&.n\fR
fileutil
.RE
TPDL
.RS
.TP
\fBfiles/modules/grammar_me/me_intro\&.n\fR
grammar::me_intro
.RE
trace
.RS
.TP
\fBfiles/modules/debug/debug\&.n\fR
debug
.TP
\fBfiles/modules/debug/debug_caller\&.n\fR
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
.TP
\fBfiles/modules/page/page_util_norm_lemon\&.n\fR
page_util_norm_lemon
.TP
\fBfiles/modules/page/page_util_norm_peg\&.n\fR
page_util_norm_peg
.RE
trigonometry
.RS
.TP
\fBfiles/modules/math/trig\&.n\fR
math::trig
.RE
trimming
.RS
.TP
\fBfiles/modules/textutil/textutil\&.n\fR
textutil
.TP







|


|
|







10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
.TP
\fBfiles/modules/page/page_util_norm_lemon\&.n\fR
page_util_norm_lemon
.TP
\fBfiles/modules/page/page_util_norm_peg\&.n\fR
page_util_norm_peg
.RE
TreeQL
.RS
.TP
\fBfiles/modules/treeql/treeql\&.n\fR
treeql
.RE
trimming
.RS
.TP
\fBfiles/modules/textutil/textutil\&.n\fR
textutil
.TP
11308
11309
11310
11311
11312
11313
11314










































11315
11316
11317
11318
11319
11320
11321
.TP
\fBfiles/modules/fumagic/rtcore\&.n\fR
fileutil::magic::rt
.TP
\fBfiles/modules/snit/snit\&.n\fR
snit
.RE










































uevent
.RS
.TP
\fBfiles/modules/hook/hook\&.n\fR
hook
.RE
unbind







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
.TP
\fBfiles/modules/fumagic/rtcore\&.n\fR
fileutil::magic::rt
.TP
\fBfiles/modules/snit/snit\&.n\fR
snit
.RE
Type checking
.RS
.TP
\fBfiles/modules/valtype/valtype_common\&.n\fR
valtype::common
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.TP
\fBfiles/modules/valtype/luhn\&.n\fR
valtype::luhn
.TP
\fBfiles/modules/valtype/luhn5\&.n\fR
valtype::luhn5
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
uevent
.RS
.TP
\fBfiles/modules/hook/hook\&.n\fR
hook
.RE
unbind
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
.TP
\fBfiles/modules/stringprep/unicode\&.n\fR
unicode
.TP
\fBfiles/modules/stringprep/unicode_data\&.n\fR
unicode::data
.RE
unified format diff
.RS
.TP
\fBfiles/modules/textutil/patch\&.n\fR
textutil::patch
.RE
union
.RS
.TP
\fBfiles/modules/struct/disjointset\&.n\fR
struct::disjointset
.TP
\fBfiles/modules/struct/struct_set\&.n\fR







<
<
<
<
<
<







11041
11042
11043
11044
11045
11046
11047






11048
11049
11050
11051
11052
11053
11054
.TP
\fBfiles/modules/stringprep/unicode\&.n\fR
unicode
.TP
\fBfiles/modules/stringprep/unicode_data\&.n\fR
unicode::data
.RE






union
.RS
.TP
\fBfiles/modules/struct/disjointset\&.n\fR
struct::disjointset
.TP
\fBfiles/modules/struct/struct_set\&.n\fR
11437
11438
11439
11440
11441
11442
11443






11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455


























































































11456
11457
11458
11459
11460
11461
11462
.RE
urn
.RS
.TP
\fBfiles/modules/uri/urn-scheme\&.n\fR
uri_urn
.RE






utilities
.RS
.TP
\fBfiles/modules/namespacex/namespacex\&.n\fR
namespacex
.RE
uuencode
.RS
.TP
\fBfiles/modules/base64/uuencode\&.n\fR
uuencode
.RE


























































































vectors
.RS
.TP
\fBfiles/modules/math/linalg\&.n\fR
math::linearalgebra
.RE
verhoeff







>
>
>
>
>
>












>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
.RE
urn
.RS
.TP
\fBfiles/modules/uri/urn-scheme\&.n\fR
uri_urn
.RE
US-NPI
.RS
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.RE
utilities
.RS
.TP
\fBfiles/modules/namespacex/namespacex\&.n\fR
namespacex
.RE
uuencode
.RS
.TP
\fBfiles/modules/base64/uuencode\&.n\fR
uuencode
.RE
UUID
.RS
.TP
\fBfiles/modules/uuid/uuid\&.n\fR
uuid
.RE
Validation
.RS
.TP
\fBfiles/modules/valtype/valtype_common\&.n\fR
valtype::common
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.TP
\fBfiles/modules/valtype/luhn\&.n\fR
valtype::luhn
.TP
\fBfiles/modules/valtype/luhn5\&.n\fR
valtype::luhn5
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
Value checking
.RS
.TP
\fBfiles/modules/valtype/valtype_common\&.n\fR
valtype::common
.TP
\fBfiles/modules/valtype/cc_amex\&.n\fR
valtype::creditcard::amex
.TP
\fBfiles/modules/valtype/cc_discover\&.n\fR
valtype::creditcard::discover
.TP
\fBfiles/modules/valtype/cc_mastercard\&.n\fR
valtype::creditcard::mastercard
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.TP
\fBfiles/modules/valtype/ean13\&.n\fR
valtype::gs1::ean13
.TP
\fBfiles/modules/valtype/iban\&.n\fR
valtype::iban
.TP
\fBfiles/modules/valtype/imei\&.n\fR
valtype::imei
.TP
\fBfiles/modules/valtype/isbn\&.n\fR
valtype::isbn
.TP
\fBfiles/modules/valtype/luhn\&.n\fR
valtype::luhn
.TP
\fBfiles/modules/valtype/luhn5\&.n\fR
valtype::luhn5
.TP
\fBfiles/modules/valtype/usnpi\&.n\fR
valtype::usnpi
.TP
\fBfiles/modules/valtype/verhoeff\&.n\fR
valtype::verhoeff
.RE
vectors
.RS
.TP
\fBfiles/modules/math/linalg\&.n\fR
math::linearalgebra
.RE
verhoeff
11596
11597
11598
11599
11600
11601
11602






11603
11604
11605
11606
11607
11608
11609
.TP
\fBfiles/modules/grammar_peg/peg_interp\&.n\fR
grammar::peg::interp
.TP
\fBfiles/modules/pt/pt_param\&.n\fR
pt::param
.RE






vwait
.RS
.TP
\fBfiles/modules/coroutine/tcllib_coroutine\&.n\fR
coroutine
.TP
\fBfiles/modules/coroutine/coro_auto\&.n\fR







>
>
>
>
>
>







11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
.TP
\fBfiles/modules/grammar_peg/peg_interp\&.n\fR
grammar::peg::interp
.TP
\fBfiles/modules/pt/pt_param\&.n\fR
pt::param
.RE
VISA
.RS
.TP
\fBfiles/modules/valtype/cc_visa\&.n\fR
valtype::creditcard::visa
.RE
vwait
.RS
.TP
\fBfiles/modules/coroutine/tcllib_coroutine\&.n\fR
coroutine
.TP
\fBfiles/modules/coroutine/coro_auto\&.n\fR
11692
11693
11694
11695
11696
11697
11698






11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711

11712
11713
11714
11715






11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727






11728
11729
11730
11731
11732
11733
11734
.RE
x\&.500
.RS
.TP
\fBfiles/modules/ldap/ldap\&.n\fR
ldap
.RE






xml
.RS
.TP
\fBfiles/modules/amazon-s3/xsxp\&.n\fR
xsxp
.RE
xor
.RS
.TP
\fBfiles/modules/virtchannel_transform/vt_otp\&.n\fR
tcl::transform::otp
.RE
yEnc

.RS
.TP
\fBfiles/modules/base64/yencode\&.n\fR
yencode






.RE
yaml
.RS
.TP
\fBfiles/modules/yaml/huddle\&.n\fR
huddle
.TP
\fBfiles/modules/yaml/yaml\&.n\fR
yaml
.RE
ydecode
.RS






.TP
\fBfiles/modules/base64/yencode\&.n\fR
yencode
.RE
yencode
.RS
.TP







>
>
>
>
>
>












<
>


|
|
>
>
>
>
>
>












>
>
>
>
>
>







11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506

11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
.RE
x\&.500
.RS
.TP
\fBfiles/modules/ldap/ldap\&.n\fR
ldap
.RE
XGoogleToken
.RS
.TP
\fBfiles/modules/sasl/gtoken\&.n\fR
SASL::XGoogleToken
.RE
xml
.RS
.TP
\fBfiles/modules/amazon-s3/xsxp\&.n\fR
xsxp
.RE
xor
.RS
.TP
\fBfiles/modules/virtchannel_transform/vt_otp\&.n\fR
tcl::transform::otp
.RE

XPath
.RS
.TP
\fBfiles/modules/treeql/treeql\&.n\fR
treeql
.RE
XSLT
.RS
.TP
\fBfiles/modules/treeql/treeql\&.n\fR
treeql
.RE
yaml
.RS
.TP
\fBfiles/modules/yaml/huddle\&.n\fR
huddle
.TP
\fBfiles/modules/yaml/yaml\&.n\fR
yaml
.RE
ydecode
.RS
.TP
\fBfiles/modules/base64/yencode\&.n\fR
yencode
.RE
yEnc
.RS
.TP
\fBfiles/modules/base64/yencode\&.n\fR
yencode
.RE
yencode
.RS
.TP
11769
11770
11771
11772
11773
11774
11775
11776
11777
map::slippy
.TP
\fBfiles/modules/map/map_slippy_cache\&.n\fR
map::slippy::cache
.TP
\fBfiles/modules/map/map_slippy_fetcher\&.n\fR
map::slippy::fetcher
.RE
.RE








<
11577
11578
11579
11580
11581
11582
11583
11584

map::slippy
.TP
\fBfiles/modules/map/map_slippy_cache\&.n\fR
map::slippy::cache
.TP
\fBfiles/modules/map/map_slippy_fetcher\&.n\fR
map::slippy::fetcher
.RE

Changes to idoc/man/toc.n.

329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
.TP
\fBcache::async\fR
\fIfiles/modules/cache/async\&.n\fR: Asynchronous in-memory cache
.TP
\fBcksum\fR
\fIfiles/modules/crc/cksum\&.n\fR: Calculate a cksum(1) compatible checksum
.TP
\fBclay\fR
\fIfiles/modules/clay/clay\&.n\fR: A minimalist framework for large scale OO Projects
.TP
\fBclock_iso8601\fR
\fIfiles/modules/clock/iso8601\&.n\fR: Parsing ISO 8601 dates/times
.TP
\fBclock_rfc2822\fR
\fIfiles/modules/clock/rfc2822\&.n\fR: Parsing RFC 2822 dates/times
.TP
\fBcmdline\fR
\fIfiles/modules/cmdline/cmdline\&.n\fR: Procedures to process command lines and options\&.
.TP
\fBcomm\fR
\fIfiles/modules/comm/comm\&.n\fR: A remote communication facility for Tcl (8\&.3 and later)
.TP







<
<
<




|







329
330
331
332
333
334
335



336
337
338
339
340
341
342
343
344
345
346
347
.TP
\fBcache::async\fR
\fIfiles/modules/cache/async\&.n\fR: Asynchronous in-memory cache
.TP
\fBcksum\fR
\fIfiles/modules/crc/cksum\&.n\fR: Calculate a cksum(1) compatible checksum
.TP



\fBclock_iso8601\fR
\fIfiles/modules/clock/iso8601\&.n\fR: Parsing ISO 8601 dates/times
.TP
\fBclock_rfc2822\fR
\fIfiles/modules/clock/rfc2822\&.n\fR: Parsing ISO 8601 dates/times
.TP
\fBcmdline\fR
\fIfiles/modules/cmdline/cmdline\&.n\fR: Procedures to process command lines and options\&.
.TP
\fBcomm\fR
\fIfiles/modules/comm/comm\&.n\fR: A remote communication facility for Tcl (8\&.3 and later)
.TP
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
.TP
\fBdebug::heartbeat\fR
\fIfiles/modules/debug/debug_heartbeat\&.n\fR: debug narrative - heartbeat
.TP
\fBdebug::timestamp\fR
\fIfiles/modules/debug/debug_timestamp\&.n\fR: debug narrative - timestamping
.TP
\fBdefer\fR
\fIfiles/modules/defer/defer\&.n\fR: Defered execution
.TP
\fBdeleg_method\fR
\fIfiles/modules/interp/deleg_method\&.n\fR: Creation of comm delegates (snit methods)
.TP
\fBdeleg_proc\fR
\fIfiles/modules/interp/deleg_proc\&.n\fR: Creation of comm delegates (procedures)
.TP
\fBdes\fR







<
<
<







380
381
382
383
384
385
386



387
388
389
390
391
392
393
.TP
\fBdebug::heartbeat\fR
\fIfiles/modules/debug/debug_heartbeat\&.n\fR: debug narrative - heartbeat
.TP
\fBdebug::timestamp\fR
\fIfiles/modules/debug/debug_timestamp\&.n\fR: debug narrative - timestamping
.TP



\fBdeleg_method\fR
\fIfiles/modules/interp/deleg_method\&.n\fR: Creation of comm delegates (snit methods)
.TP
\fBdeleg_proc\fR
\fIfiles/modules/interp/deleg_proc\&.n\fR: Creation of comm delegates (procedures)
.TP
\fBdes\fR
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
.TP
\fBfileutil::multi\fR
\fIfiles/modules/fileutil/multi\&.n\fR: Multi-file operation, scatter/gather, standard object
.TP
\fBfileutil::multi::op\fR
\fIfiles/modules/fileutil/multiop\&.n\fR: Multi-file operation, scatter/gather
.TP
\fBfileutil::paths\fR
\fIfiles/modules/fileutil/paths\&.n\fR: Manage search path pools
.TP
\fBfileutil_traverse\fR
\fIfiles/modules/fileutil/traverse\&.n\fR: Iterative directory traversal
.TP
\fBftp\fR
\fIfiles/modules/ftp/ftp\&.n\fR: Client-side tcl implementation of the ftp protocol
.TP
\fBftp::geturl\fR







<
<
<







617
618
619
620
621
622
623



624
625
626
627
628
629
630
.TP
\fBfileutil::multi\fR
\fIfiles/modules/fileutil/multi\&.n\fR: Multi-file operation, scatter/gather, standard object
.TP
\fBfileutil::multi::op\fR
\fIfiles/modules/fileutil/multiop\&.n\fR: Multi-file operation, scatter/gather
.TP



\fBfileutil_traverse\fR
\fIfiles/modules/fileutil/traverse\&.n\fR: Iterative directory traversal
.TP
\fBftp\fR
\fIfiles/modules/ftp/ftp\&.n\fR: Client-side tcl implementation of the ftp protocol
.TP
\fBftp::geturl\fR
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
.TP
\fBhtml\fR
\fIfiles/modules/html/html\&.n\fR: Procedures to generate HTML structures
.TP
\fBhtmlparse\fR
\fIfiles/modules/htmlparse/htmlparse\&.n\fR: Procedures to parse HTML strings
.TP
\fBhttpd\fR
\fIfiles/modules/httpd/httpd\&.n\fR: A TclOO and coroutine based web server
.TP
\fBhuddle\fR
\fIfiles/modules/yaml/huddle\&.n\fR: Create and manipulate huddle object
.TP
\fBident\fR
\fIfiles/modules/ident/ident\&.n\fR: Ident protocol client
.TP
\fBimap4\fR







<
<
<







689
690
691
692
693
694
695



696
697
698
699
700
701
702
.TP
\fBhtml\fR
\fIfiles/modules/html/html\&.n\fR: Procedures to generate HTML structures
.TP
\fBhtmlparse\fR
\fIfiles/modules/htmlparse/htmlparse\&.n\fR: Procedures to parse HTML strings
.TP



\fBhuddle\fR
\fIfiles/modules/yaml/huddle\&.n\fR: Create and manipulate huddle object
.TP
\fBident\fR
\fIfiles/modules/ident/ident\&.n\fR: Ident protocol client
.TP
\fBimap4\fR
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
.TP
\fBjson::write\fR
\fIfiles/modules/json/json_write\&.n\fR: JSON generation
.TP
\fBlambda\fR
\fIfiles/modules/lambda/lambda\&.n\fR: Utility commands for anonymous procedures
.TP
\fBlazyset\fR
\fIfiles/modules/lazyset/lazyset\&.n\fR: Lazy evaluation
.TP
\fBldap\fR
\fIfiles/modules/ldap/ldap\&.n\fR: LDAP client
.TP
\fBldapx\fR
\fIfiles/modules/ldap/ldapx\&.n\fR: LDAP extended object interface
.TP
\fBlog\fR







<
<
<







722
723
724
725
726
727
728



729
730
731
732
733
734
735
.TP
\fBjson::write\fR
\fIfiles/modules/json/json_write\&.n\fR: JSON generation
.TP
\fBlambda\fR
\fIfiles/modules/lambda/lambda\&.n\fR: Utility commands for anonymous procedures
.TP



\fBldap\fR
\fIfiles/modules/ldap/ldap\&.n\fR: LDAP client
.TP
\fBldapx\fR
\fIfiles/modules/ldap/ldapx\&.n\fR: LDAP extended object interface
.TP
\fBlog\fR
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
.TP
\fBmath::calculus::romberg\fR
\fIfiles/modules/math/romberg\&.n\fR: Romberg integration
.TP
\fBmath::calculus::symdiff\fR
\fIfiles/modules/math/symdiff\&.n\fR: Symbolic differentiation for Tcl
.TP
\fBmath::changepoint\fR
\fIfiles/modules/math/changepoint\&.n\fR: Change point detection methods
.TP
\fBmath::combinatorics\fR
\fIfiles/modules/math/combinatorics\&.n\fR: Combinatorial functions in the Tcl Math Library
.TP
\fBmath::complexnumbers\fR
\fIfiles/modules/math/qcomplex\&.n\fR: Straightforward complex number package
.TP
\fBmath::constants\fR
\fIfiles/modules/math/constants\&.n\fR: Mathematical and numerical constants
.TP
\fBmath::decimal\fR
\fIfiles/modules/math/decimal\&.n\fR: General decimal arithmetic
.TP
\fBmath::exact\fR
\fIfiles/modules/math/exact\&.n\fR: Exact Real Arithmetic
.TP
\fBmath::filters\fR
\fIfiles/modules/math/filtergen\&.n\fR: Digital filters
.TP
\fBmath::fourier\fR
\fIfiles/modules/math/fourier\&.n\fR: Discrete and fast fourier transforms
.TP
\fBmath::fuzzy\fR
\fIfiles/modules/math/fuzzy\&.n\fR: Fuzzy comparison of floating-point numbers
.TP
\fBmath::geometry\fR
\fIfiles/modules/math/math_geometry\&.n\fR: Geometrical computations
.TP
\fBmath::interpolate\fR
\fIfiles/modules/math/interpolate\&.n\fR: Interpolation routines
.TP
\fBmath::linearalgebra\fR
\fIfiles/modules/math/linalg\&.n\fR: Linear Algebra
.TP
\fBmath::machineparameters\fR
\fIfiles/modules/math/machineparameters\&.n\fR: Compute double precision machine parameters\&.
.TP
\fBmath::numtheory\fR
\fIfiles/modules/math/numtheory\&.n\fR: Number Theory
.TP
\fBmath::optimize\fR
\fIfiles/modules/math/optimize\&.n\fR: Optimisation routines
.TP
\fBmath::PCA\fR
\fIfiles/modules/math/pca\&.n\fR: Package for Principal Component Analysis
.TP
\fBmath::polynomials\fR
\fIfiles/modules/math/polynomials\&.n\fR: Polynomial functions
.TP
\fBmath::probopt\fR
\fIfiles/modules/math/probopt\&.n\fR: Probabilistic optimisation methods
.TP
\fBmath::quasirandom\fR
\fIfiles/modules/math/quasirandom\&.n\fR: Quasi-random points for integration and Monte Carlo type methods
.TP
\fBmath::rationalfunctions\fR
\fIfiles/modules/math/rational_funcs\&.n\fR: Polynomial functions
.TP
\fBmath::roman\fR
\fIfiles/modules/math/roman\&.n\fR: Tools for creating and manipulating roman numerals
.TP
\fBmath::special\fR
\fIfiles/modules/math/special\&.n\fR: Special mathematical functions
.TP
\fBmath::statistics\fR
\fIfiles/modules/math/statistics\&.n\fR: Basic statistical functions and procedures
.TP
\fBmath::trig\fR
\fIfiles/modules/math/trig\&.n\fR: Trigonometric anf hyperbolic functions
.TP
\fBmd4\fR
\fIfiles/modules/md4/md4\&.n\fR: MD4 Message-Digest Algorithm
.TP
\fBmd5\fR
\fIfiles/modules/md5/md5\&.n\fR: MD5 Message-Digest Algorithm
.TP
\fBmd5crypt\fR







<
<
<















<
<
<















<
<
<






<
<
<



<
<
<
<
<
<












<
<
<







776
777
778
779
780
781
782



783
784
785
786
787
788
789
790
791
792
793
794
795
796
797



798
799
800
801
802
803
804
805
806
807
808
809
810
811
812



813
814
815
816
817
818



819
820
821






822
823
824
825
826
827
828
829
830
831
832
833



834
835
836
837
838
839
840
.TP
\fBmath::calculus::romberg\fR
\fIfiles/modules/math/romberg\&.n\fR: Romberg integration
.TP
\fBmath::calculus::symdiff\fR
\fIfiles/modules/math/symdiff\&.n\fR: Symbolic differentiation for Tcl
.TP



\fBmath::combinatorics\fR
\fIfiles/modules/math/combinatorics\&.n\fR: Combinatorial functions in the Tcl Math Library
.TP
\fBmath::complexnumbers\fR
\fIfiles/modules/math/qcomplex\&.n\fR: Straightforward complex number package
.TP
\fBmath::constants\fR
\fIfiles/modules/math/constants\&.n\fR: Mathematical and numerical constants
.TP
\fBmath::decimal\fR
\fIfiles/modules/math/decimal\&.n\fR: General decimal arithmetic
.TP
\fBmath::exact\fR
\fIfiles/modules/math/exact\&.n\fR: Exact Real Arithmetic
.TP



\fBmath::fourier\fR
\fIfiles/modules/math/fourier\&.n\fR: Discrete and fast fourier transforms
.TP
\fBmath::fuzzy\fR
\fIfiles/modules/math/fuzzy\&.n\fR: Fuzzy comparison of floating-point numbers
.TP
\fBmath::geometry\fR
\fIfiles/modules/math/math_geometry\&.n\fR: Geometrical computations
.TP
\fBmath::interpolate\fR
\fIfiles/modules/math/interpolate\&.n\fR: Interpolation routines
.TP
\fBmath::linearalgebra\fR
\fIfiles/modules/math/linalg\&.n\fR: Linear Algebra
.TP



\fBmath::numtheory\fR
\fIfiles/modules/math/numtheory\&.n\fR: Number Theory
.TP
\fBmath::optimize\fR
\fIfiles/modules/math/optimize\&.n\fR: Optimisation routines
.TP



\fBmath::polynomials\fR
\fIfiles/modules/math/polynomials\&.n\fR: Polynomial functions
.TP






\fBmath::rationalfunctions\fR
\fIfiles/modules/math/rational_funcs\&.n\fR: Polynomial functions
.TP
\fBmath::roman\fR
\fIfiles/modules/math/roman\&.n\fR: Tools for creating and manipulating roman numerals
.TP
\fBmath::special\fR
\fIfiles/modules/math/special\&.n\fR: Special mathematical functions
.TP
\fBmath::statistics\fR
\fIfiles/modules/math/statistics\&.n\fR: Basic statistical functions and procedures
.TP



\fBmd4\fR
\fIfiles/modules/md4/md4\&.n\fR: MD4 Message-Digest Algorithm
.TP
\fBmd5\fR
\fIfiles/modules/md5/md5\&.n\fR: MD5 Message-Digest Algorithm
.TP
\fBmd5crypt\fR
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
.TP
\fBoo::util\fR
\fIfiles/modules/tool/meta\&.n\fR: Utility commands for TclOO
.TP
\fBoo::util\fR
\fIfiles/modules/ooutil/ooutil\&.n\fR: Utility commands for TclOO
.TP
\fBoometa\fR
\fIfiles/modules/oometa/oometa\&.n\fR: oo::meta A data registry for classess
.TP
\fBotp\fR
\fIfiles/modules/otp/otp\&.n\fR: One-Time Passwords
.TP
\fBpage\fR
\fIfiles/apps/page\&.n\fR: Parser Generator
.TP
\fBpage_intro\fR







<
<
<







899
900
901
902
903
904
905



906
907
908
909
910
911
912
.TP
\fBoo::util\fR
\fIfiles/modules/tool/meta\&.n\fR: Utility commands for TclOO
.TP
\fBoo::util\fR
\fIfiles/modules/ooutil/ooutil\&.n\fR: Utility commands for TclOO
.TP



\fBotp\fR
\fIfiles/modules/otp/otp\&.n\fR: One-Time Passwords
.TP
\fBpage\fR
\fIfiles/apps/page\&.n\fR: Parser Generator
.TP
\fBpage_intro\fR
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
.TP
\fBstruct::graph_v1\fR
\fIfiles/modules/struct/graph1\&.n\fR: Create and manipulate directed graph objects
.TP
\fBstruct::list\fR
\fIfiles/modules/struct/struct_list\&.n\fR: Procedures for manipulating lists
.TP
\fBstruct::map\fR
\fIfiles/modules/struct/struct_map\&.n\fR: Manage key/value maps
.TP
\fBstruct::matrix\fR
\fIfiles/modules/struct/matrix\&.n\fR: Create and manipulate matrix objects
.TP
\fBstruct::matrix_v1\fR
\fIfiles/modules/struct/matrix1\&.n\fR: Create and manipulate matrix objects
.TP
\fBstruct::pool\fR







<
<
<







1181
1182
1183
1184
1185
1186
1187



1188
1189
1190
1191
1192
1193
1194
.TP
\fBstruct::graph_v1\fR
\fIfiles/modules/struct/graph1\&.n\fR: Create and manipulate directed graph objects
.TP
\fBstruct::list\fR
\fIfiles/modules/struct/struct_list\&.n\fR: Procedures for manipulating lists
.TP



\fBstruct::matrix\fR
\fIfiles/modules/struct/matrix\&.n\fR: Create and manipulate matrix objects
.TP
\fBstruct::matrix_v1\fR
\fIfiles/modules/struct/matrix1\&.n\fR: Create and manipulate matrix objects
.TP
\fBstruct::pool\fR
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
.TP
\fBtcl::transform::spacer\fR
\fIfiles/modules/virtchannel_transform/spacer\&.n\fR: Space insertation and removal
.TP
\fBtcl::transform::zlib\fR
\fIfiles/modules/virtchannel_transform/tcllib_zlib\&.n\fR: zlib (de)compression
.TP
\fBtcl_community_communication\fR
\fIfiles/devdoc/tcl_community_communication\&.n\fR: Tcl Community - Kind Communication
.TP
\fBtclDES\fR
\fIfiles/modules/des/tcldes\&.n\fR: Implementation of the DES and triple-DES ciphers
.TP
\fBtclDESjr\fR
\fIfiles/modules/des/tcldesjr\&.n\fR: Implementation of the DES and triple-DES ciphers
.TP
\fBtcldocstrip\fR
\fIfiles/apps/tcldocstrip\&.n\fR: Tcl-based Docstrip Processor
.TP
\fBtcllib_devguide\fR
\fIfiles/devdoc/tcllib_devguide\&.n\fR: Tcllib - The Developer's Guide
.TP
\fBtcllib_install_guide\fR
\fIfiles/devdoc/tcllib_installer\&.n\fR: Tcllib - The Installer's Guide
.TP
\fBtcllib_ip\fR
\fIfiles/modules/dns/tcllib_ip\&.n\fR: IPv4 and IPv6 address manipulation
.TP
\fBtcllib_license\fR
\fIfiles/devdoc/tcllib_license\&.n\fR: Tcllib - License
.TP
\fBtcllib_releasemgr\fR
\fIfiles/devdoc/tcllib_releasemgr\&.n\fR: Tcllib - The Release Manager's Guide
.TP
\fBtcllib_sources\fR
\fIfiles/devdoc/tcllib_sources\&.n\fR: Tcllib - How To Get The Sources
.TP
\fBtepam\fR
\fIfiles/modules/tepam/tepam_introduction\&.n\fR: An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager
.TP
\fBtepam::argument_dialogbox\fR
\fIfiles/modules/tepam/tepam_argument_dialogbox\&.n\fR: TEPAM argument_dialogbox, reference manual
.TP







<
<
<









<
<
<
<
<
<



|
|
<
<
<
<
<
<







1313
1314
1315
1316
1317
1318
1319



1320
1321
1322
1323
1324
1325
1326
1327
1328






1329
1330
1331
1332
1333






1334
1335
1336
1337
1338
1339
1340
.TP
\fBtcl::transform::spacer\fR
\fIfiles/modules/virtchannel_transform/spacer\&.n\fR: Space insertation and removal
.TP
\fBtcl::transform::zlib\fR
\fIfiles/modules/virtchannel_transform/tcllib_zlib\&.n\fR: zlib (de)compression
.TP



\fBtclDES\fR
\fIfiles/modules/des/tcldes\&.n\fR: Implementation of the DES and triple-DES ciphers
.TP
\fBtclDESjr\fR
\fIfiles/modules/des/tcldesjr\&.n\fR: Implementation of the DES and triple-DES ciphers
.TP
\fBtcldocstrip\fR
\fIfiles/apps/tcldocstrip\&.n\fR: Tcl-based Docstrip Processor
.TP






\fBtcllib_ip\fR
\fIfiles/modules/dns/tcllib_ip\&.n\fR: IPv4 and IPv6 address manipulation
.TP
\fBtclrep/machineparameters\fR
\fIfiles/modules/math/machineparameters\&.n\fR: Compute double precision machine parameters\&.






.TP
\fBtepam\fR
\fIfiles/modules/tepam/tepam_introduction\&.n\fR: An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager
.TP
\fBtepam::argument_dialogbox\fR
\fIfiles/modules/tepam/tepam_argument_dialogbox\&.n\fR: TEPAM argument_dialogbox, reference manual
.TP
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
.TP
\fBtextutil::adjust\fR
\fIfiles/modules/textutil/adjust\&.n\fR: Procedures to adjust, indent, and undent paragraphs
.TP
\fBtextutil::expander\fR
\fIfiles/modules/textutil/expander\&.n\fR: Procedures to process templates and expand text\&.
.TP
\fBtextutil::patch\fR
\fIfiles/modules/textutil/patch\&.n\fR: Application of uni-diff patches to directory trees
.TP
\fBtextutil::repeat\fR
\fIfiles/modules/textutil/repeat\&.n\fR: Procedures to repeat strings\&.
.TP
\fBtextutil::split\fR
\fIfiles/modules/textutil/textutil_split\&.n\fR: Procedures to split texts
.TP
\fBtextutil::string\fR







<
<
<







1385
1386
1387
1388
1389
1390
1391



1392
1393
1394
1395
1396
1397
1398
.TP
\fBtextutil::adjust\fR
\fIfiles/modules/textutil/adjust\&.n\fR: Procedures to adjust, indent, and undent paragraphs
.TP
\fBtextutil::expander\fR
\fIfiles/modules/textutil/expander\&.n\fR: Procedures to process templates and expand text\&.
.TP



\fBtextutil::repeat\fR
\fIfiles/modules/textutil/repeat\&.n\fR: Procedures to repeat strings\&.
.TP
\fBtextutil::split\fR
\fIfiles/modules/textutil/textutil_split\&.n\fR: Procedures to split texts
.TP
\fBtextutil::string\fR
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
\fBtie\fR
\fIfiles/modules/tie/tie_std\&.n\fR: Array persistence, standard data sources
.TP
\fBtiff\fR
\fIfiles/modules/tiff/tiff\&.n\fR: TIFF reading, writing, and querying and manipulation of meta data
.TP
\fBtool\fR
\fIfiles/modules/tool/tool\&.n\fR: TclOO Library (TOOL) Framework
.TP
\fBtool::dict_ensemble\fR
\fIfiles/modules/tool/tool_dict_ensemble\&.n\fR: Dictionary Tools
.TP
\fBtransfer::connect\fR
\fIfiles/modules/transfer/connect\&.n\fR: Connection setup
.TP







|







1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
\fBtie\fR
\fIfiles/modules/tie/tie_std\&.n\fR: Array persistence, standard data sources
.TP
\fBtiff\fR
\fIfiles/modules/tiff/tiff\&.n\fR: TIFF reading, writing, and querying and manipulation of meta data
.TP
\fBtool\fR
\fIfiles/modules/tool/tool\&.n\fR: Dictionary Tools
.TP
\fBtool::dict_ensemble\fR
\fIfiles/modules/tool/tool_dict_ensemble\&.n\fR: Dictionary Tools
.TP
\fBtransfer::connect\fR
\fIfiles/modules/transfer/connect\&.n\fR: Connection setup
.TP

Changes to idoc/www/index.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361





362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856


857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125





1126
1127
1128
1129
1130
1131
1132





1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163





1164
1165





1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250





1251
1252
1253















1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290





1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388





1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403



1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421










1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611



1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664





1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730





1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774



1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035





2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254



2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507



2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573





2574
2575





2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660





2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786





2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866





2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003





3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349





3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414



3415
3416
3417
3418
3419
3420
3421


3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589





3590





3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692





3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375





4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
<!DOCTYPE html>
<html>
<!-- Generated by tcllib/doctools/idx with format 'html'
   -->
<!-- Keyword Index
   -->
<head>
<title> Keyword Index </title>
</head>
<body>
<hr> [
   <a href="../../../../home">Tcllib Home</a>
&#124; <a href="toc.html">Table Of Contents</a>
&#124; <a href="toc0.html">Categories</a>
&#124; <a href="toc1.html">Modules</a>
&#124; <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Keyword Index </h3>
<hr><div class="#doctools_idxnav">
<a href="#c3"> 3 </a> &#183; <a href="#cA"> A </a> &#183; <a href="#cB"> B </a> &#183; <a href="#cC"> C </a> &#183; <a href="#cD"> D </a> &#183; <a href="#cE"> E </a> &#183; <a href="#cF"> F </a> &#183; <a href="#cG"> G </a> &#183; <a href="#cH"> H </a> &#183; <a href="#cI"> I </a> &#183; <a href="#cJ"> J </a> &#183; <a href="#cK"> K </a> &#183; <a href="#cL"> L </a> &#183; <a href="#cM"> M </a> &#183; <a href="#cN"> N </a> &#183; <a href="#cO"> O </a> &#183; <a href="#cP"> P </a> &#183; <a href="#cQ"> Q </a> &#183; <a href="#cR"> R </a> &#183; <a href="#cS"> S </a> &#183; <a href="#cT"> T </a> &#183; <a href="#cU"> U </a> &#183; <a href="#cV"> V </a> &#183; <a href="#cW"> W </a> &#183; <a href="#cX"> X </a> &#183; <a href="#cY"> Y </a> &#183; <a href="#cZ"> Z </a>
</div>
<hr><table class="#doctools_idx" width="100%">
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c3">Keywords: 3</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="3des"> 3DES </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>













</td></tr>










<tr class="#doctools_idxheader"><th colspan="2">
<a name="cA">Keywords: A</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="abstract_syntax_tree"> abstract syntax tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_util.html"> grammar::me::util </a> &#183; <a href="tcllib/files/modules/grammar_me/me_ast.html"> grammar::me_ast </a>
</td></tr>



<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="acceptance"> acceptance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="acceptor"> acceptor </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="active"> active </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="adaptors"> adaptors </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="adjacency_list"> adjacency list </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="adjacency_matrix"> adjacency matrix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="adjacent"> adjacent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="adjusting"> adjusting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="adler32"> adler32 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="aes"> aes </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="after"> after </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="alias"> alias </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="amazon"> amazon </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/S3.html"> S3 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ambiguous"> ambiguous </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="american_express"> American Express </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="amex"> AMEX </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="angle"> angle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="anonymous_procedure"> anonymous procedure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ansi"> ansi </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a> &#183; <a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="appender"> appender </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/loggerAppender.html"> logger::appender </a> &#183; <a href="tcllib/files/modules/log/loggerUtils.html"> logger::utils </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="application"> application </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/apps/nns.html"> nns </a> &#183; <a href="tcllib/files/apps/nnsd.html"> nnsd </a> &#183; <a href="tcllib/files/apps/nnslog.html"> nnslog </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="approximation_algorithm"> approximation algorithm </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="arc"> arc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="arcfour"> arcfour </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="archive"> archive </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tar/tar.html"> tar </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="argument_integrity"> argument integrity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="argument_processing"> argument processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="argument_validation"> argument validation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="arguments"> arguments </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="argv"> argv </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="argv0"> argv0 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="array"> array </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="articulation_point"> articulation point </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ascii85"> ascii85 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/ascii85.html"> ascii85 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="asn"> asn </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="assembler"> assembler </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="assert"> assert </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="assign"> assign </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ast"> AST </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_ast.html"> grammar::me_ast </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="asynchronous"> asynchronous </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="attribute_control"> attribute control </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="augmenting_network"> augmenting network </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="augmenting_path"> augmenting path </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="authentication"> authentication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/http/autoproxy.html"> autoproxy </a> &#183; <a href="tcllib/files/modules/sasl/sasl.html"> SASL </a> &#183; <a href="tcllib/files/modules/sasl/ntlm.html"> SASL::NTLM </a> &#183; <a href="tcllib/files/modules/sasl/scram.html"> SASL::SCRAM </a> &#183; <a href="tcllib/files/modules/sasl/gtoken.html"> SASL::XGoogleToken </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="automatic"> automatic </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="automatic_documentation"> automatic documentation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_doc_gen.html"> tepam::doc_gen </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="automaton"> automaton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="aycock"> aycock </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cB">Keywords: B</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bank"> bank </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="base32"> base32 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base32/base32.html"> base32 </a> &#183; <a href="tcllib/files/modules/base32/base32core.html"> base32::core </a> &#183; <a href="tcllib/files/modules/base32/base32hex.html"> base32::hex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="base64"> base64 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/base64.html"> base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bash"> bash </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bee"> bee </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bench_language"> bench language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="benchmark"> benchmark </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ber"> ber </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bessel_functions"> Bessel functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/special.html"> math::special </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bfs"> bfs </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bibliography"> bibliography </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bibtex"> bibtex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bignums"> bignums </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bignum.html"> math::bignum </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bind"> bind </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bipartite"> bipartite </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bittorrent"> BitTorrent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bittorrent"> bittorrent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="blanks"> blanks </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/repeat.html"> textutil::repeat </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="block_cipher"> block cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="blocking_flow"> blocking flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="blowfish"> blowfish </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="book_number"> Book Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="breadth_first"> breadth-first </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bridge"> bridge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="bwidget"> BWidget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cC">Keywords: C</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="c"> C </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="c_"> C++ </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cache"> cache </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="caesar_cipher"> caesar cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="calculus"> calculus </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="callback"> callback </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a> &#183; <a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/lambda/lambda.html"> lambda </a> &#183; <a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a> &#183; <a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="callbacks"> callbacks </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="capitalize"> capitalize </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="card_for_credit"> card for credit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cardinality"> cardinality </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cat"> cat </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="catalog_package"> catalog package </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="catalogue"> catalogue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cell_phone"> cell-phone </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cer"> cer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cfg"> CFG </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cfl"> CFL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cgi"> CGI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cgraph"> cgraph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graph1.html"> struct::graph_v1 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="changelog"> changelog </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/changelog.html"> doctools::changelog </a> &#183; <a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="channel"> channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/copyops.html"> transfer::copy </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a> &#183; <a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="channel_transformation"> channel transformation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="character_input"> character input </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="character_output"> character output </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_send.html"> term::ansi::send </a> &#183; <a href="tcllib/files/modules/term/term_send.html"> term::send </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="chat"> chat </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/irc/irc.html"> irc </a> &#183; <a href="tcllib/files/modules/multiplexer/multiplexer.html"> multiplexer </a> &#183; <a href="tcllib/files/modules/irc/picoirc.html"> picoirc </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="checkbox"> checkbox </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/javascript/javascript.html"> javascript </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="checkbutton"> checkbutton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="checking"> Checking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="checksum"> checksum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="chop"> chop </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cipher"> cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cksum"> cksum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="class"> class </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="class_methods"> class methods </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="class_variables"> class variables </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cleanup"> cleanup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/defer/defer.html"> defer </a> &#183; <a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="client"> client </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_client.html"> nameserv </a> &#183; <a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a> &#183; <a href="tcllib/files/modules/nns/nns_common.html"> nameserv::common </a> &#183; <a href="tcllib/files/apps/nns.html"> nns </a> &#183; <a href="tcllib/files/modules/nns/nns_intro.html"> nns_intro </a> &#183; <a href="tcllib/files/apps/nnslog.html"> nnslog </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cloud"> cloud </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/S3.html"> S3 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cmdline_processing"> cmdline processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="color_control"> color control </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="columns"> columns </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="comm"> comm </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a> &#183; <a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a> &#183; <a href="tcllib/files/modules/nns/nns_protocol.html"> nameserv::protocol </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="command"> command </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="command_line_processing"> command line processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="command_prefix"> command prefix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a> &#183; <a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="comment"> comment </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a> &#183; <a href="tcllib/files/modules/png/png.html"> png </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="common"> common </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="common_prefix"> common prefix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="communication"> communication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="comparison"> comparison </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="complete_graph"> complete graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="complex_numbers"> complex numbers </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/qcomplex.html"> math::complexnumbers </a> &#183; <a href="tcllib/files/modules/math/fourier.html"> math::fourier </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="compression"> compression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a> &#183; <a href="tcllib/files/modules/zip/encode.html"> zipfile::encode </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="computations"> computations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="concatenation_channel"> concatenation channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="connected_component"> connected component </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="connected_fifos"> connected fifos </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="connection"> connection </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="constants"> constants </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="container"> CONTAINER </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="contents"> contents </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="context_free_grammar"> context-free grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="context_free_languages"> context-free languages </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="control"> control </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a> &#183; <a href="tcllib/files/modules/math/changepoint.html"> math::changepoint </a> &#183; <a href="tcllib/files/modules/term/term.html"> term </a> &#183; <a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a> &#183; <a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a> &#183; <a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a> &#183; <a href="tcllib/files/modules/term/ansi_send.html"> term::ansi::send </a> &#183; <a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a> &#183; <a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a> &#183; <a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a> &#183; <a href="tcllib/files/modules/term/term_send.html"> term::send </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="control_structure"> control structure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="conversion"> conversion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/math/roman.html"> math::roman </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cooked"> cooked </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cookie"> cookie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="copy"> copy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a> &#183; <a href="tcllib/files/modules/transfer/copyops.html"> transfer::copy </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a> &#183; <a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="coroutine"> coroutine </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a> &#183; <a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cost"> Cost </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="counter"> counter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="counting"> counting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cparam"> CPARAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="crc"> crc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="crc16"> crc16 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/crc16.html"> crc16 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="crc32"> crc32 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="credit_card"> credit card </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cron"> cron </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cron/cron.html"> cron </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cryptography"> cryptography </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="css"> CSS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="csv"> csv </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/csv/csv.html"> csv </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="currying"> currying </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a> &#183; <a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cut_edge"> cut edge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cut_vertex"> cut vertex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cvs"> CVS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cvs"> cvs </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cvs_log"> cvs log </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="cyclic_redundancy_check"> cyclic redundancy check </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cD">Keywords: D</a>


</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="data_analysis"> data analysis </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/statistics.html"> math::statistics </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="data_destination"> data destination </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="data_entry_form"> data entry form </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html"> tepam::argument_dialogbox </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="data_exchange"> data exchange </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="data_integrity"> data integrity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="data_source"> data source </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="data_structures"> data structures </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/record.html"> struct::record </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="database"> database </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="dataflow"> dataflow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="_ddt"> .ddt </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="de"> DE </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="debug"> debug </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="decimal"> decimal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/decimal.html"> math::decimal </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="declare"> declare </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="decompression"> decompression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a> &#183; <a href="tcllib/files/modules/zip/decode.html"> zipfile::decode </a> &#183; <a href="tcllib/files/modules/zip/mkzip.html"> zipfile::mkzip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="decryption"> decryption </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="deferal"> deferal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="define"> define </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="degree"> degree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="degree_constrained_spanning_tree"> degree constrained spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="degrees"> degrees </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="delegation"> delegation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="depth_first"> depth-first </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="der"> der </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="des"> DES </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="deserialization"> deserialization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="_dev_null"> /dev/null </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="_dev_random"> /dev/random </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="_dev_zero"> /dev/zero </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="diameter"> diameter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="dict"> dict </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dicttool/dicttool.html"> dicttool </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="diff"> diff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="diff_n_format"> diff -n format </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="diff_run"> diff -ruN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/patch.html"> textutil::patch </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="diff_unified_format"> diff, unified format </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/patch.html"> textutil::patch </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="difference"> difference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="differential"> differential </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="differential_equations"> differential equations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="digital"> digital </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/filtergen.html"> math::filters </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="dijkstra"> dijkstra </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="directory_access"> directory access </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="directory_traversal"> directory traversal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/traverse.html"> fileutil_traverse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="discover"> Discover </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="discrete_items"> discrete items </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="disjoint_set"> disjoint set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="dispatcher"> dispatcher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="distance"> distance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="dns"> DNS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="do"> do </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="docidx"> docidx </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="docidx_commands"> docidx commands </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="docidx_language"> docidx language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="docidx_markup"> docidx markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="docidx_syntax"> docidx syntax </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="docstrip"> docstrip </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>





<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="doctoc"> doctoc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="doctoc_commands"> doctoc commands </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="doctoc_language"> doctoc language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="doctoc_markup"> doctoc markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="doctoc_syntax"> doctoc syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="doctools"> doctools </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/modules/doctools/changelog.html"> doctools::changelog </a> &#183; <a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="doctools_commands"> doctools commands </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="doctools_language"> doctools language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="doctools_markup"> doctools markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="doctools_syntax"> doctools syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="document"> document </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="documentation"> documentation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a> &#183; <a href="tcllib/files/modules/tepam/tepam_doc_gen.html"> tepam::doc_gen </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="dom"> DOM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="dom"> dom </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/xsxp.html"> xsxp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="domain_name_service"> domain name service </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="_dtx"> .dtx </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cE">Keywords: E</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="e"> e </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ean"> EAN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ean13"> EAN13 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="earley"> earley </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ebnf"> EBNF </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="eccentricity"> eccentricity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="edge"> edge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="emacs"> emacs </a></td>
<td class="#doctools_idxright" width="65%">















<a href="tcllib/files/modules/doctools/changelog.html"> doctools::changelog </a> &#183; <a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="email"> email </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="emptiness"> emptiness </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="empty_interpreter"> empty interpreter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="en"> EN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="encoding"> encoding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/ascii85.html"> ascii85 </a> &#183; <a href="tcllib/files/modules/base64/base64.html"> base64 </a> &#183; <a href="tcllib/files/modules/base64/uuencode.html"> uuencode </a> &#183; <a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="encryption"> encryption </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="entry_mask"> entry mask </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="equal"> equal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="equality"> equality </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="equivalence_class"> equivalence class </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="error"> error </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_throw.html"> throw </a> &#183; <a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="error_function"> error function </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/special.html"> math::special </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="european_article_number"> European Article Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="event"> event </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/uev/uevent.html"> uevent </a> &#183; <a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="event_management"> event management </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="events"> events </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="examples"> examples </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="exception"> exception </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="exchange_format"> exchange format </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="exclusion"> exclusion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="execution"> execution </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="exif"> exif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="exit"> exit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="export"> export </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="expression"> expression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="extended_namespace"> extended namespace </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cF">Keywords: F</a>
</th></tr>





<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="faq"> faq </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="fetching_information"> fetching information </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="fft"> FFT </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fourier.html"> math::fourier </a>
</td></tr>



<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="fifo"> fifo </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="file"> file </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="file_recognition"> file recognition </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="file_type"> file type </a></td>
<td class="#doctools_idxright" width="65%">










<a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="file_utilities"> file utilities </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a> &#183; <a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a> &#183; <a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="filesystem"> filesystem </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="filter"> filter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="filtering"> filtering </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/filtergen.html"> math::filters </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="final"> final </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="finance"> finance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="find"> find </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="finite"> finite </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="finite_automaton"> finite automaton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="fips_180_1"> FIPS 180-1 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="first_permutation"> first permutation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="fisher_yates"> Fisher-Yates </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="flatten"> flatten </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="floating_point"> floating-point </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/fuzzy.html"> math::fuzzy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="flow"> flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="flow_network"> flow network </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="folding"> folding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="foldl"> foldl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="foldr"> foldr </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="foreach"> foreach </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="form"> form </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="format_conversion"> format conversion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="formatter"> formatter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="formatting"> formatting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a> &#183; <a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a> &#183; <a href="tcllib/files/modules/textutil/tabify.html"> textutil::tabify </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="formatting_engine"> formatting engine </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="fossil"> fossil </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/patch.html"> textutil::patch </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="fourier_transform"> Fourier transform </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fourier.html"> math::fourier </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="fr"> FR </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="frame"> frame </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="framework"> framework </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/tool.html"> tool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ftp"> ftp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ftpd"> ftpd </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ftpserver"> ftpserver </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="full_outer_join"> full outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cG">Keywords: G</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="generate_event"> generate event </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="generate_permutations"> generate permutations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="generation"> generation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a>
</td></tr>



<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="generator"> generator </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="geocoding"> geocoding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="geodesy"> geodesy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/mapproj/mapproj.html"> mapproj </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="geography"> geography </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="get_character"> get character </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="gets"> gets </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="git"> git </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/patch.html"> textutil::patch </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="global"> global </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="golang"> golang </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/defer/defer.html"> defer </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="gopher"> gopher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="gps"> gps </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/gpx/gpx.html"> gpx </a> &#183; <a href="tcllib/files/modules/nmea/nmea.html"> nmea </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="gpx"> gpx </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/gpx/gpx.html"> gpx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="grammar"> grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpu.html"> grammar::me::cpu </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpucore.html"> grammar::me::cpu::core </a> &#183; <a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_tcl.html"> grammar::me::tcl </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_me/me_vm.html"> grammar::me_vm </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="graph"> graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a> &#183; <a href="tcllib/files/modules/struct/graph1.html"> struct::graph_v1 </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="graph_walking"> graph walking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="green_threads"> green threads </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="grep"> grep </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="guid"> GUID </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uuid/uuid.html"> uuid </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cH">Keywords: H</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="hashing"> hashing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a> &#183; <a href="tcllib/files/modules/otp/otp.html"> otp </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="heartbeat"> heartbeat </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="heuristic"> heuristic </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="hex"> hex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base32/base32hex.html"> base32::hex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="hexadecimal"> hexadecimal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="histogram"> histogram </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="hook"> hook </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="horspool"> horspool </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="html"> HTML </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="html"> html </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/javascript/javascript.html"> javascript </a> &#183; <a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="http"> http </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/http/autoproxy.html"> autoproxy </a> &#183; <a href="tcllib/files/modules/httpd/httpd.html"> httpd </a> &#183; <a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a> &#183; <a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="httpd"> httpd </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/httpd/httpd.html"> httpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="https"> https </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="httpserver"> httpserver </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/httpd/httpd.html"> httpd </a>
</td></tr>



<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="huddle"> huddle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="human_readable"> human readable </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="hyphenation"> hyphenation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cI">Keywords: I</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="i18n"> i18n </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="iban"> IBAN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ident"> ident </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ident/ident.html"> ident </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="identification"> identification </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ident/ident.html"> ident </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="identity"> identity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="idle"> idle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="image"> image </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a> &#183; <a href="tcllib/files/modules/png/png.html"> png </a> &#183; <a href="tcllib/files/modules/tiff/tiff.html"> tiff </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="imap"> imap </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="imei"> IMEI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="import"> import </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="in_memory_channel"> in-memory channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="in_order"> in-order </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="inclusion"> inclusion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="incr_tcl"> Incr Tcl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="indenting"> indenting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="independent_set"> independent set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="index"> index </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="index_formatter"> index formatter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="info"> info </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="inner_join"> inner join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="input_mode"> input mode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="integer"> integer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/roman.html"> math::roman </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="integration"> integration </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="inter_thread_communication"> inter-thread communication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="international_article_number"> International Article Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="international_bank_account_number"> International Bank Account Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="international_mobile_equipment_identity"> International Mobile Equipment Identity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="international_standard_book_number"> International Standard Book Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="internationalization"> internationalization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="internet"> internet </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a> &#183; <a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="internet_address"> internet address </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="interpolation"> interpolation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/interpolate.html"> math::interpolate </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="interpreter"> interpreter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a> &#183; <a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a> &#183; <a href="tcllib/files/modules/wip/wip.html"> wip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="intersection"> intersection </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="interval"> interval </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ip"> ip </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ipc"> ipc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ipv4"> ipv4 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ipv6"> ipv6 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="irc"> irc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/irc/irc.html"> irc </a> &#183; <a href="tcllib/files/modules/irc/picoirc.html"> picoirc </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="isa"> isA </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="isbn"> ISBN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="isthmus"> isthmus </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="iterator"> iterator </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cJ">Keywords: J</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="javascript"> javascript </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/javascript/javascript.html"> javascript </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="jfif"> jfif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="join"> join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="jpeg"> jpeg </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="json"> JSON </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="json"> json </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="justification"> justification </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cK">Keywords: K</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="keyword_index"> keyword index </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="keywords"> keywords </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="knuth"> knuth </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cL">Keywords: L</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="l10n"> l10n </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="lambda"> lambda </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="latex"> LaTeX </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="latex"> latex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="latitute"> latitute </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ldap"> ldap </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ldap_client"> ldap client </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ldif"> ldif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="least_squares"> least squares </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="left_outer_join"> left outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="lemon"> lemon </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="level_graph"> level graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="lexer"> lexer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="lexing"> lexing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="limitsize"> limitsize </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="line"> line </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="linear_algebra"> linear algebra </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="linear_equations"> linear equations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="linear_program"> linear program </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="lines"> lines </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="list"> list </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/wip/wip.html"> wip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="listener"> listener </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="literate_programming"> literate programming </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ll_k_"> LL(k) </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="local_searching"> local searching </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="localization"> localization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="location"> location </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="log"> log </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a> &#183; <a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a> &#183; <a href="tcllib/files/modules/log/log.html"> log </a> &#183; <a href="tcllib/files/modules/log/logger.html"> logger </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="log_level"> log level </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/log.html"> log </a> &#183; <a href="tcllib/files/modules/log/logger.html"> logger </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="logger"> logger </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/logger.html"> logger </a> &#183; <a href="tcllib/files/modules/log/loggerAppender.html"> logger::appender </a> &#183; <a href="tcllib/files/modules/log/loggerUtils.html"> logger::utils </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="longest_common_subsequence"> longest common subsequence </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="longitude"> longitude </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="loop"> loop </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="luhn"> luhn </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="luhn_5"> luhn-5 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cM">Keywords: M</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="macros"> macros </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a>
</td></tr>



<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="mail"> mail </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="mailto"> mailto </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="man_macros"> man_macros </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="manpage"> manpage </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="map"> map </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a> &#183; <a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/mapproj/mapproj.html"> mapproj </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="markdown"> markdown </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="markup"> markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools/doctools_intro.html"> doctools_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="mastercard"> MasterCard </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="matching"> matching </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="math"> math </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math.html"> math </a> &#183; <a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/bignum.html"> math::bignum </a> &#183; <a href="tcllib/files/modules/math/calculus.html"> math::calculus </a> &#183; <a href="tcllib/files/modules/math/qcomplex.html"> math::complexnumbers </a> &#183; <a href="tcllib/files/modules/math/constants.html"> math::constants </a> &#183; <a href="tcllib/files/modules/math/decimal.html"> math::decimal </a> &#183; <a href="tcllib/files/modules/math/fuzzy.html"> math::fuzzy </a> &#183; <a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a> &#183; <a href="tcllib/files/modules/math/interpolate.html"> math::interpolate </a> &#183; <a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a> &#183; <a href="tcllib/files/modules/math/optimize.html"> math::optimize </a> &#183; <a href="tcllib/files/modules/math/pca.html"> math::PCA </a> &#183; <a href="tcllib/files/modules/math/polynomials.html"> math::polynomials </a> &#183; <a href="tcllib/files/modules/math/rational_funcs.html"> math::rationalfunctions </a> &#183; <a href="tcllib/files/modules/math/special.html"> math::special </a> &#183; <a href="tcllib/files/modules/math/trig.html"> math::trig </a> &#183; <a href="tcllib/files/modules/simulation/annealing.html"> simulation::annealing </a> &#183; <a href="tcllib/files/modules/simulation/montecarlo.html"> simulation::montecarlo </a> &#183; <a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="mathematics"> mathematics </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fourier.html"> math::fourier </a> &#183; <a href="tcllib/files/modules/math/probopt.html"> math::probopt </a> &#183; <a href="tcllib/files/modules/math/quasirandom.html"> math::quasirandom </a> &#183; <a href="tcllib/files/modules/math/statistics.html"> math::statistics </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="matrices"> matrices </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="matrix"> matrix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a> &#183; <a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a> &#183; <a href="tcllib/files/modules/report/report.html"> report </a> &#183; <a href="tcllib/files/modules/struct/matrix.html"> struct::matrix </a> &#183; <a href="tcllib/files/modules/struct/matrix1.html"> struct::matrix_v1 </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="max_cut"> max cut </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="maximum"> maximum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="maximum_flow"> maximum flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="md4"> md4 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="md5"> md5 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="md5crypt"> md5crypt </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="medicare"> medicare </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="mega_widget"> mega widget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="membership"> membership </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="menu"> menu </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="merge"> merge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="merge_find"> merge find </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="merging"> merging </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="message"> message </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a> &#183; <a href="tcllib/files/modules/log/log.html"> log </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="message_catalog"> message catalog </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="message_level"> message level </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/log.html"> log </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="message_package"> message package </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="message_digest"> message-digest </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a> &#183; <a href="tcllib/files/modules/otp/otp.html"> otp </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="metakit"> metakit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="method"> method </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="method_reference"> method reference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="mime"> mime </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="minimal_spanning_tree"> minimal spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="minimum"> minimum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="minimum_cost_flow"> minimum cost flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="minimum_degree_spanning_tree"> minimum degree spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="minimum_diameter_spanning_tree"> minimum diameter spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="mobile_phone"> mobile phone </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="module"> module </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="montecarlo_simulation"> montecarlo simulation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/montecarlo.html"> simulation::montecarlo </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="move"> move </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="multi_file"> multi-file </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="multiplexer"> multiplexer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/multiplexer/multiplexer.html"> multiplexer </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="multiprecision"> multiprecision </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/bignum.html"> math::bignum </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="my_method"> my method </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cN">Keywords: N</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="name_service"> name service </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_client.html"> nameserv </a> &#183; <a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a> &#183; <a href="tcllib/files/modules/nns/nns_common.html"> nameserv::common </a> &#183; <a href="tcllib/files/modules/nns/nns_protocol.html"> nameserv::protocol </a> &#183; <a href="tcllib/files/modules/nns/nns_server.html"> nameserv::server </a> &#183; <a href="tcllib/files/apps/nns.html"> nns </a> &#183; <a href="tcllib/files/modules/nns/nns_intro.html"> nns_intro </a> &#183; <a href="tcllib/files/apps/nnsd.html"> nnsd </a> &#183; <a href="tcllib/files/apps/nnslog.html"> nnslog </a> &#183; <a href="tcllib/files/modules/udpcluster/udpcluster.html"> udpcluster </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="namespace_unknown"> namespace unknown </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>



<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="namespace_utilities"> namespace utilities </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="narrative"> narrative </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="national_provider_identifier"> National Provider Identifier </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="neighbour"> neighbour </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="net"> net </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="nettool"> nettool </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nettool/nettool.html"> nettool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="network"> network </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="news"> news </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="next_permutation"> next permutation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="nmea"> nmea </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nmea/nmea.html"> nmea </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="nntp"> nntp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="nntpclient"> nntpclient </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="no_op"> no-op </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="node"> node </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a> &#183; <a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="nominatim"> nominatim </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="normalization"> normalization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/stringprep/unicode.html"> unicode </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="npi"> NPI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="nroff"> nroff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ntlm"> NTLM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/ntlm.html"> SASL::NTLM </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ntp"> NTP </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="null"> null </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="number_theory"> number theory </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/numtheory.html"> math::numtheory </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cO">Keywords: O</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="oauth"> oauth </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="object"> object </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="object_oriented"> object oriented </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="observer"> observer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="odie"> odie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cron/cron.html"> cron </a> &#183; <a href="tcllib/files/modules/nettool/nettool.html"> nettool </a> &#183; <a href="tcllib/files/modules/processman/processman.html"> processman </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="on_idle"> on-idle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="one_time_pad"> one time pad </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="oo"> oo </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/clay/clay.html"> clay </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="optimisation"> optimisation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/probopt.html"> math::probopt </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="optimization"> optimization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a> &#183; <a href="tcllib/files/modules/simulation/annealing.html"> simulation::annealing </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ordered_list"> ordered list </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/prioqueue.html"> struct::prioqueue </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="otp"> otp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="outer_join"> outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cP">Keywords: P</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="package"> package </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="package_indexing"> package indexing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="page"> page </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_intro.html"> page_intro </a> &#183; <a href="tcllib/files/modules/page/page_pluginmgr.html"> page_pluginmgr </a> &#183; <a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="pager"> pager </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="paragraph"> paragraph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="param"> PARAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="parameter_entry_form"> parameter entry form </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html"> tepam::argument_dialogbox </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="parser"> parser </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a> &#183; <a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a> &#183; <a href="tcllib/files/modules/amazon-s3/xsxp.html"> xsxp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="parser_generator"> parser generator </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/apps/page.html"> page </a> &#183; <a href="tcllib/files/modules/page/page_intro.html"> page_intro </a> &#183; <a href="tcllib/files/modules/page/page_pluginmgr.html"> page_pluginmgr </a> &#183; <a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="parsing"> parsing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpu.html"> grammar::me::cpu </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpucore.html"> grammar::me::cpu::core </a> &#183; <a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_tcl.html"> grammar::me::tcl </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_me/me_vm.html"> grammar::me_vm </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="parsing_expression"> parsing expression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="parsing_expression_grammar"> parsing expression grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="partial_application"> partial application </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="partition"> partition </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="partitioned_set"> partitioned set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="passive"> passive </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="password"> password </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/otp/otp.html"> otp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="patch"> patch </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/modules/textutil/patch.html"> textutil::patch </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="patching"> patching </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="pca"> PCA </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/math/pca.html"> math::PCA </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="peg"> PEG </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="performance"> performance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a> &#183; <a href="tcllib/files/modules/profiler/profiler.html"> profiler </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="permutation"> permutation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="persistence"> persistence </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="phone"> phone </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="pi"> pi </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="plain_text"> plain text </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="plane_geometry"> plane geometry </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="plugin"> plugin </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="plugin_management"> plugin management </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pluginmgr/pluginmgr.html"> pluginmgr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="plugin_search"> plugin search </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pluginmgr/pluginmgr.html"> pluginmgr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="png"> png </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/png/png.html"> png </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="point"> point </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="polynomial_functions"> polynomial functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/polynomials.html"> math::polynomials </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="pool"> pool </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="pop"> pop </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="pop3"> pop3 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="post_order"> post-order </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="practcl"> practcl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/practcl/practcl.html"> practcl </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="pre_order"> pre-order </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="prefix"> prefix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="prime"> prime </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/numtheory.html"> math::numtheory </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="prioqueue"> prioqueue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/prioqueue.html"> struct::prioqueue </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="priority_queue"> priority queue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/prioqueue.html"> struct::prioqueue </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="probabilistic_calculations"> probabilistic calculations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/probopt.html"> math::probopt </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="proc"> proc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="procedure"> procedure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a> &#183; <a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="procedure_documentation"> procedure documentation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_doc_gen.html"> tepam::doc_gen </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="processman"> processman </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/processman/processman.html"> processman </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="producer"> producer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="profile"> profile </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/profiler/profiler.html"> profiler </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="projection"> projection </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mapproj/mapproj.html"> mapproj </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="prospero"> prospero </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="protocol"> protocol </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a> &#183; <a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a> &#183; <a href="tcllib/files/modules/nns/nns_protocol.html"> nameserv::protocol </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="proxy"> proxy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/http/autoproxy.html"> autoproxy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="public_key_cipher"> public key cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pki/pki.html"> pki </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="publisher"> publisher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="push_down_automaton"> push down automaton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cQ">Keywords: Q</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="quasi_random"> quasi-random </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/quasirandom.html"> math::quasirandom </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="queue"> queue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="quoting"> quoting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cR">Keywords: R</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="radians"> radians </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>





</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="radiobutton"> radiobutton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="radius"> radius </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="random"> random </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="random_numbers"> random numbers </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rational_functions"> rational functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/rational_funcs.html"> math::rationalfunctions </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="raw"> raw </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rc4"> rc4 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rcs"> RCS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rcs_patch"> RCS patch </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="read"> read </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="reading"> reading </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="receiver"> receiver </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="reconnect"> reconnect </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="record"> record </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/record.html"> struct::record </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="recursive_descent"> recursive descent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="reduce"> reduce </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="reference"> reference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="reflected_channel"> reflected channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_core/core.html"> tcl::chan::core </a> &#183; <a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_core/transformcore.html"> tcl::transform::core </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="regex"> regex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="regular_expression"> regular expression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/textutil_split.html"> textutil::split </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="regular_grammar"> regular grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="regular_languages"> regular languages </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="remote_communication"> remote communication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="remote_execution"> remote execution </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="remove"> remove </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="repeating"> repeating </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="repetition"> repetition </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a> &#183; <a href="tcllib/files/modules/textutil/repeat.html"> textutil::repeat </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="report"> report </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/report/report.html"> report </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="reshuffle"> reshuffle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="residual_graph"> residual graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="resolver"> resolver </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="resource_management"> resource management </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="restore"> restore </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="return"> return </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_throw.html"> throw </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="reverse"> reverse </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_821"> rfc 821 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_822"> rfc 822 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_868"> rfc 868 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_959"> rfc 959 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_977"> rfc 977 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_1034"> rfc 1034 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_1035"> rfc 1035 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_1036"> rfc 1036 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_1320"> rfc 1320 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_1321"> rfc 1321 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_1413"> rfc 1413 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ident/ident.html"> ident </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_1630"> rfc 1630 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_1886"> rfc 1886 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_1939"> rfc 1939 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2030"> rfc 2030 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2045"> rfc 2045 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2046"> rfc 2046 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2049"> rfc 2049 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2104"> rfc 2104 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2141"> rfc 2141 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2251"> rfc 2251 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2255"> rfc 2255 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2289"> rfc 2289 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/otp/otp.html"> otp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2396"> rfc 2396 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2554"> rfc 2554 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2718"> RFC 2718 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2821"> rfc 2821 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_2849"> rfc 2849 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_3207"> rfc 3207 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_3513"> rfc 3513 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_3986"> rfc 3986 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_4511"> rfc 4511 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_5849"> RFC 5849 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_6455"> rfc 6455 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc_7858"> rfc 7858 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc3501"> rfc3501 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rfc3548"> rfc3548 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base32/base32.html"> base32 </a> &#183; <a href="tcllib/files/modules/base32/base32hex.html"> base32::hex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="right_outer_join"> right outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ripemd"> RIPEMD </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="roman_numeral"> roman numeral </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/roman.html"> math::roman </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="roots"> roots </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rot"> rot </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rot13"> rot13 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rounding"> rounding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fuzzy.html"> math::fuzzy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rows"> rows </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rpc"> rpc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="rsa"> rsa </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pki/pki.html"> pki </a>
</td></tr>



<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="running"> running </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cS">Keywords: S</a>


</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="s3"> s3 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/S3.html"> S3 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="sasl"> SASL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/sasl.html"> SASL </a> &#183; <a href="tcllib/files/modules/sasl/ntlm.html"> SASL::NTLM </a> &#183; <a href="tcllib/files/modules/sasl/scram.html"> SASL::SCRAM </a> &#183; <a href="tcllib/files/modules/sasl/gtoken.html"> SASL::XGoogleToken </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="scanl"> scanl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="sccs"> SCCS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="scram"> SCRAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/scram.html"> SASL::SCRAM </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="secure"> secure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="security"> security </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a> &#183; <a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a> &#183; <a href="tcllib/files/modules/otp/otp.html"> otp </a> &#183; <a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="seed"> seed </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="selectionbox"> selectionbox </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/javascript/javascript.html"> javascript </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="semantic_markup"> semantic markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools/doctools_intro.html"> doctools_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="send"> send </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="serialization"> serialization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="server"> server </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/nns/nns_common.html"> nameserv::common </a> &#183; <a href="tcllib/files/modules/nns/nns_server.html"> nameserv::server </a> &#183; <a href="tcllib/files/modules/nns/nns_intro.html"> nns_intro </a> &#183; <a href="tcllib/files/apps/nnsd.html"> nnsd </a> &#183; <a href="tcllib/files/modules/udpcluster/udpcluster.html"> udpcluster </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="service"> service </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/logger.html"> logger </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="services"> services </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a> &#183; <a href="tcllib/files/modules/httpd/httpd.html"> httpd </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="set"> set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="sha1"> sha1 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="sha256"> sha256 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="shell"> shell </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="shortest_path"> shortest path </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="shuffle"> shuffle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="simulated_annealing"> simulated annealing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/annealing.html"> simulation::annealing </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="simulation"> simulation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="singleton"> singleton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="size_limit"> size limit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="skiplist"> skiplist </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/skiplist.html"> struct::skiplist </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="slippy"> slippy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="smtp"> smtp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="smtpd"> smtpd </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="snit"> Snit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="snit"> snit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="sntp"> SNTP </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="socket"> socket </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="soundex"> soundex </a></td>





<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="source"> source </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="spacing"> spacing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="spatial_interpolation"> spatial interpolation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/interpolate.html"> math::interpolate </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="special_functions"> special functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/special.html"> math::special </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="specification"> specification </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="speed"> speed </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/profiler/profiler.html"> profiler </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="split"> split </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_split.html"> textutil::split </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="squared_graph"> squared graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ssl"> ssl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="stack"> stack </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="standard_io"> standard io </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="state"> state </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="state_de_serialization"> state (de)serialization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="statistical_distribution"> statistical distribution </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="statistics"> statistics </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a> &#183; <a href="tcllib/files/modules/math/math.html"> math </a> &#183; <a href="tcllib/files/modules/math/changepoint.html"> math::changepoint </a> &#183; <a href="tcllib/files/modules/math/pca.html"> math::PCA </a> &#183; <a href="tcllib/files/modules/math/statistics.html"> math::statistics </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="stdin"> stdin </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="stdout"> stdout </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="stochastic_modelling"> stochastic modelling </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/montecarlo.html"> simulation::montecarlo </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="stream_cipher"> stream cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="stream_copy"> stream copy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="string"> string </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a> &#183; <a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a> &#183; <a href="tcllib/files/modules/textutil/expander.html"> textutil::expander </a> &#183; <a href="tcllib/files/modules/textutil/repeat.html"> textutil::repeat </a> &#183; <a href="tcllib/files/modules/textutil/textutil_split.html"> textutil::split </a> &#183; <a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a> &#183; <a href="tcllib/files/modules/textutil/tabify.html"> textutil::tabify </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="stringprep"> stringprep </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/stringprep/stringprep.html"> stringprep </a> &#183; <a href="tcllib/files/modules/stringprep/stringprep_data.html"> stringprep::data </a> &#183; <a href="tcllib/files/modules/stringprep/unicode_data.html"> unicode::data </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="strongly_connected_component"> strongly connected component </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="struct"> struct </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a> &#183; <a href="tcllib/files/modules/struct/record.html"> struct::record </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="structure"> structure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="structured_queries"> structured queries </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="style"> style </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="subcommand"> subcommand </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="subgraph"> subgraph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="subject"> subject </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="submitbutton"> submitbutton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/javascript/javascript.html"> javascript </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="subscriber"> subscriber </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="subsequence"> subsequence </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="subst"> subst </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="sum"> sum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="swapping"> swapping </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="symmetric_difference"> symmetric difference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="synchronous"> synchronous </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="syntax_tree"> syntax tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_util.html"> grammar::me::util </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cT">Keywords: T</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="table"> table </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/report/report.html"> report </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="table_of_contents"> table of contents </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tabstops"> tabstops </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/tabify.html"> textutil::tabify </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tallying"> tallying </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tape_archive"> tape archive </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tar/tar.html"> tar </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tar"> tar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tar/tar.html"> tar </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tcl"> tcl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/bignum.html"> math::bignum </a> &#183; <a href="tcllib/files/modules/math/decimal.html"> math::decimal </a> &#183; <a href="tcllib/files/modules/math/pca.html"> math::PCA </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tcl_module"> Tcl module </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tcl_syntax"> Tcl syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tcler_s_wiki"> tcler's wiki </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tcllib"> tcllib </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tcloo"> TclOO </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/clay/clay.html"> clay </a> &#183; <a href="tcllib/files/modules/httpd/httpd.html"> httpd </a> &#183; <a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a> &#183; <a href="tcllib/files/modules/oometa/oometa.html"> oometa </a> &#183; <a href="tcllib/files/modules/tool/tool.html"> tool </a> &#183; <a href="tcllib/files/modules/tool/tool_dict_ensemble.html"> tool::dict_ensemble </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tclparam"> TCLPARAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tdpl"> TDPL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="temp_file"> temp file </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="template_processing"> template processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/expander.html"> textutil::expander </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="terminal"> terminal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/term.html"> term </a> &#183; <a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a> &#183; <a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a> &#183; <a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a> &#183; <a href="tcllib/files/modules/term/ansi_send.html"> term::ansi::send </a> &#183; <a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a> &#183; <a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a> &#183; <a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a> &#183; <a href="tcllib/files/modules/term/term_send.html"> term::send </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="test"> test </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="testing"> Testing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="testing"> testing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tex"> TeX </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="text"> text </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="text_comparison"> text comparison </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="text_conversion"> text conversion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="text_differences"> text differences </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="text_display"> text display </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a> &#183; <a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="text_expansion"> text expansion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/expander.html"> textutil::expander </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="text_likeness"> text likeness </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="text_processing"> text processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a> &#183; <a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/apps/page.html"> page </a> &#183; <a href="tcllib/files/modules/page/page_intro.html"> page_intro </a> &#183; <a href="tcllib/files/modules/page/page_pluginmgr.html"> page_pluginmgr </a> &#183; <a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="text_widget"> text widget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="threads"> threads </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="throw"> throw </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_throw.html"> throw </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="thumbnail"> thumbnail </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tie"> tie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tif"> tif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tiff/tiff.html"> tiff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tiff"> tiff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tiff/tiff.html"> tiff </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tile"> tile </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="time"> time </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="timestamp"> timestamp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/png/png.html"> png </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="timestamps"> timestamps </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tip_219"> tip 219 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_core/core.html"> tcl::chan::core </a> &#183; <a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/virtchannel_core/transformcore.html"> tcl::transform::core </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tip_230"> tip 230 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tip_234"> tip 234 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tip_317"> tip 317 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tk"> Tk </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tls"> tls </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tmml"> TMML </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="toc"> toc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="toc_formatter"> toc formatter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tokenization"> tokenization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tool"> TOOL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oometa/oometa.html"> oometa </a> &#183; <a href="tcllib/files/modules/tool/tool.html"> tool </a> &#183; <a href="tcllib/files/modules/tool/tool_dict_ensemble.html"> tool::dict_ensemble </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="top_down_parsing_languages"> top-down parsing languages </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="torrent"> torrent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="touch"> touch </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tpdl"> TPDL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="trace"> trace </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="transducer"> transducer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="transfer"> transfer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/copyops.html"> transfer::copy </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a> &#183; <a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="transformation"> transformation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="transmitter"> transmitter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="travelling_salesman"> travelling salesman </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="traversal"> traversal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/traverse.html"> fileutil_traverse </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tree"> tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_util.html"> grammar::me::util </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a> &#183; <a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a> &#183; <a href="tcllib/files/modules/struct/struct_tree1.html"> struct::tree_v1 </a> &#183; <a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tree_query_language"> tree query language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="tree_walking"> tree walking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="treeql"> TreeQL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="trigonometry"> trigonometry </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/trig.html"> math::trig </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="trimming"> trimming </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="twitter"> twitter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="type"> type </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a> &#183; <a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a> &#183; <a href="tcllib/files/modules/snit/snit.html"> snit </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="type_checking"> Type checking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cU">Keywords: U</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="uevent"> uevent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="unbind"> unbind </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="uncapitalize"> uncapitalize </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="undenting"> undenting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="unicode"> unicode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/stringprep/stringprep.html"> stringprep </a> &#183; <a href="tcllib/files/modules/stringprep/stringprep_data.html"> stringprep::data </a> &#183; <a href="tcllib/files/modules/stringprep/unicode.html"> unicode </a> &#183; <a href="tcllib/files/modules/stringprep/unicode_data.html"> unicode::data </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="unified_format_diff"> unified format diff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/patch.html"> textutil::patch </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="union"> union </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a> &#183; <a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="unit"> unit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="unknown_hooking"> unknown hooking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="untie"> untie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="update"> update </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="uri"> uri </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a> &#183; <a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="url"> url </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a> &#183; <a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="urn"> urn </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="us_npi"> US-NPI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="utilities"> utilities </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="uuencode"> uuencode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/uuencode.html"> uuencode </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="uuid"> UUID </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uuid/uuid.html"> uuid </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cV">Keywords: V</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="validation"> Validation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="value_checking"> Value checking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="vectors"> vectors </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="verhoeff"> verhoeff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="vertex"> vertex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="vertex_cover"> vertex cover </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="virtual_channel"> virtual channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_core/core.html"> tcl::chan::core </a> &#183; <a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_core/transformcore.html"> tcl::transform::core </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="virtual_machine"> virtual machine </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_cpu.html"> grammar::me::cpu </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpucore.html"> grammar::me::cpu::core </a> &#183; <a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_tcl.html"> grammar::me::tcl </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_me/me_vm.html"> grammar::me_vm </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="visa"> VISA </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="vwait"> vwait </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cW">Keywords: W</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="wais"> wais </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="widget"> widget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="widget_adaptors"> widget adaptors </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="wiki"> wiki </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="word"> word </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a> &#183; <a href="tcllib/files/modules/wip/wip.html"> wip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="www"> WWW </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/httpd/httpd.html"> httpd </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="www"> www </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cX">Keywords: X</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="x_208"> x.208 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="x_209"> x.209 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="x_500"> x.500 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="xgoogletoken"> XGoogleToken </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/gtoken.html"> SASL::XGoogleToken </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="xml"> xml </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/xsxp.html"> xsxp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="xor"> xor </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="xpath"> XPath </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="xslt"> XSLT </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cY">Keywords: Y</a>
</th></tr>





<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="yaml"> yaml </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="ydecode"> ydecode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="yenc"> yEnc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="yencode"> yencode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cZ">Keywords: Z</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="zero"> zero </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="zip"> zip </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/zip/decode.html"> zipfile::decode </a> &#183; <a href="tcllib/files/modules/zip/encode.html"> zipfile::encode </a> &#183; <a href="tcllib/files/modules/zip/mkzip.html"> zipfile::mkzip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="zlib"> zlib </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="zoom"> zoom </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
</table>
</body></html>
<

|

|







|
|
|
|



|



|


|

|
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>

|


|

|

>
>
>

|

|


|




|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|

<
<
<

|

|


|

|


|

|


|

|


|

|


|

|


|

|

|
|
<
<
|
|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

>
>
>
>
>

|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|

<
<
<

|

|


|

|


|

|


|

|


|

|


|

|


|

|

|
|
<
<
|
|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

<
<
<
<
<

|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|
<
<
<
<
<

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|
>
>
|

|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|

|
|
<
<
|
|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

<
<
<
<
<

|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

>
>
>
>
>
|

|
|

|

>
>
>
>
>

|

|


|

|


|

|


|

|


|

|


|

|


>
>
>
>
>
|

>
>
>
>
>



|




|




|




|




|




|




|




|



<
<
<
<
<

|

|
|



|
|



|
|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

>
>
>
>
>

|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


|
|



|
|



|
|



|
|



|
|



|
|



|
|



>
>
>
>
>

|




|

<
<
<
<
<


|
|



|
|



|
|



|
|



|
|



|
|



|
|



<
<
<
<
<

<
<
<
<
<
|

|

<
<
<
<
<

|

|


|

|


|

|


|

<
<
<
<
<
|
<
<
<
|
>
>
>
>
>

|

|


|

|


|

|

>
>
>

|

|


|

|


|

|


|

>
>
>
>
>
>
>
>
>
>



|

|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|

<
<
<
<
<

|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|




|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|

<
<
<
<
<
<
<
<
|
|

|

|
|

|

|
|

|

>
>
>
|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

>
>
>
>
>



|




|




|




|




|




|




|




|


|




|




|




|




<
<
<
<
<
>
>
>
>
>
|




|




|




|




|




|

|


|

|


|

|


|

|

>
>
>

|

|


|

|


|

|

<
<
<

|
<
<
<
<
<

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

<
<
<
<
<

|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

<
<
<
<
<


|
|



|
|



|
|



|
|



|
|



|
|




|

|
|



|
|



|
|



|
|



>
>
>
>
>

|

<
<
<
<
<


|
|




|

|
|



|
|



|
|




|

|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



<
<
<
<
<

|

|


|

|


|

|


|

|


|

|


|

|


|

|

<
<
<

|

|

>
>
>

|

|


|

|


|

|


|

|


|

|


|

|


|




|




|




|

|


|

|


|




|




|




|




|




|




|




<
<
<
<
<
|

|

<
<
<
<
<

|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|




|

|


|

|


|

|


|

|


|

|


|

|


|

|


|




|

|


|




|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|

<
<
<

|

|


|

|

>
>
>

|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


>
>
>
>
>
|

>
>
>
>
>



|




|




|




|




|




|




|



<
<
<
<
<
<
<
<
<
<
<
<
<

|

|

|
|
<
<
|
|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

>
>
>
>
>

|

|


|




|




|




|




|


<
<
<
<
<
|

|

<
<
<
<
<

|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

>
>
>
>
>
|

|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



<
<
<
<
<

|

>
>
>
>
>


|
|



|
|



|
|



|
|



|
|



<
<
<
<
<

|

|


|

|


|

|


|




|




|




|




|




|




|




|




|




|




|




|




|




|


<
<
<
<
<
|



|
|




|

|
|


>
>
>
>
>


<
<
<
<
<
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|



<
<
<
<
<

|

|


|




|

|


|




|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|




|

|


|

|


|




|

|


|

|


|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|

<
<
<
<
<


|
|



|
|



>
>
>
>
>

|

|


|

|


|

|


|

|


|

<
<
<
<
<
|

|
|

|

|
|



|
|

|

|
|

|

|
|

|

|
|

|

|
|

|

>
>
>
|
|

|

|
|
>
>
|

|

|


|

|


|

|


|

|


|

|


|

|


<
<
<
<
<
|

<
<
<
<
<



|




|




|




|




|




|

|


|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|
>
>
>
>
>

>
>
>
>
>
|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


|

|


<
<
<
<
<
|



|
|

|

|
|

|

|
|

|

|
|

|

>
>
>
>
>

|

|


|

|


|

|


|

|


|

|


<
<
<
<
<
|

|

<
<
<
<
<

|




|




|




|




|




|




|




|




|




|




|




|


|




|




|




|




|




|




|

|


|




|




|




|




|

|


|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




|

|


|




|




|




|




|




|




|




|




|




|




|




|




|




|




|




<
<
<
<
<
|



|
|



|
|



|
|




|

|
|



|
|



|
|



|
|



<
<
<
<
<

|

|


|




|




|




|




|




|




|




|




|




|




|




|




|


|




|




|




|




|




|




|




|




|




|




|


|




|




|




|




|




|

<
<
<
<
<



|

|
|



|
|



|
|



|
|



|
|



|
|



|
|



|
|




|

>
>
>
>
>

|

<
<
<
<
<


|
|



|
|




|

|
|



|
|



|
|



|
|






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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273



274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310


311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401



402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438


439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489





490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748





749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886


887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992





993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202





1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219




















1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293





1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330





1331





1332
1333
1334
1335





1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353





1354



1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414















1415
1416
1417
1418





1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553








1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690





1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757



1758
1759





1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797





1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930





1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993





1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156





2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191



2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290





2291
2292
2293
2294





2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429



2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557













2558
2559
2560
2561
2562
2563
2564


2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624





2625
2626
2627
2628





2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788





2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823





2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907





2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930





2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019





3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247





3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287





3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368





3369
3370





3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578





3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633





3634
3635
3636
3637





3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026





4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068





4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217





4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273





4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310

<html>
<! -- Generated by tcllib/doctools/idx with format 'html'
   -->
<! -- Keyword Index
   -->
<head>
<title> Keyword Index </title>
</head>
<body>
<hr> [
   <a href="../../../../home">Tcllib Home</a>
| <a href="toc.html">Table Of Contents</a>
| <a href="toc0.html">Categories</a>
| <a href="toc1.html">Modules</a>
| <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Keyword Index </h3>
<hr><div class="#doctools_idxnav">
<a href="#c1"> . </a> &#183; <a href="#c2"> / </a> &#183; <a href="#c3"> 3 </a> &#183; <a href="#c4"> A </a> &#183; <a href="#c5"> B </a> &#183; <a href="#c6"> C </a> &#183; <a href="#c7"> D </a> &#183; <a href="#c8"> E </a> &#183; <a href="#c9"> F </a> &#183; <a href="#c10"> G </a> &#183; <a href="#c11"> H </a> &#183; <a href="#c12"> I </a> &#183; <a href="#c13"> J </a> &#183; <a href="#c14"> K </a> &#183; <a href="#c15"> L </a> &#183; <a href="#c16"> M </a> &#183; <a href="#c17"> N </a> &#183; <a href="#c18"> O </a> &#183; <a href="#c19"> P </a> &#183; <a href="#c20"> Q </a> &#183; <a href="#c21"> R </a> &#183; <a href="#c22"> S </a> &#183; <a href="#c23"> T </a> &#183; <a href="#c24"> U </a> &#183; <a href="#c25"> V </a> &#183; <a href="#c26"> W </a> &#183; <a href="#c27"> X </a> &#183; <a href="#c28"> Y </a> &#183; <a href="#c29"> Z </a>
</div>
<hr><table class="#doctools_idx" width="100%">
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c1">Keywords: .</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key666"> .ddt </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key439"> .dtx </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c2">Keywords: /</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key770"> /dev/null </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key591"> /dev/random </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key114"> /dev/zero </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c3">Keywords: 3</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key298"> 3DES </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c4">Keywords: A</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key746"> abstract syntax tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_util.html"> grammar::me::util </a> &#183; <a href="tcllib/files/modules/grammar_me/me_ast.html"> grammar::me_ast </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key326"> acceptance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key323"> acceptor </a></td>






























<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key613"> active </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key242"> adaptors </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key468"> adjacency list </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key492"> adjacency matrix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key485"> adjacent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key346"> adjusting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key668"> adler32 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key796"> aes </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key414"> after </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key777"> alias </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key522"> amazon </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/S3.html"> S3 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key823"> ambiguous </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key397"> American Express </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key398"> AMEX </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key582"> angle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key596"> anonymous procedure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key166"> ansi </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a> &#183; <a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key409"> appender </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/loggerAppender.html"> logger::appender </a> &#183; <a href="tcllib/files/modules/log/loggerUtils.html"> logger::utils </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key28"> application </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/apps/nns.html"> nns </a> &#183; <a href="tcllib/files/apps/nnsd.html"> nnsd </a> &#183; <a href="tcllib/files/apps/nnslog.html"> nnslog </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key494"> approximation algorithm </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key473"> arc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key125"> arcfour </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key736"> archive </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tar/tar.html"> tar </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key764"> argument integrity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key264"> argument processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key765"> argument validation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key763"> arguments </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key263"> argv </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key262"> argv0 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key37"> array </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key483"> articulation point </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key719"> ascii85 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/ascii85.html"> ascii85 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key427"> asn </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key318"> assembler </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key144"> assert </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key571"> assign </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key815"> AST </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_ast.html"> grammar::me_ast </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key644"> asynchronous </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key165"> attribute control </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a>
</td></tr>



<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key470"> augmenting network </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key490"> augmenting path </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key394"> authentication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/http/autoproxy.html"> autoproxy </a> &#183; <a href="tcllib/files/modules/sasl/sasl.html"> SASL </a> &#183; <a href="tcllib/files/modules/sasl/ntlm.html"> SASL::NTLM </a> &#183; <a href="tcllib/files/modules/sasl/scram.html"> SASL::SCRAM </a> &#183; <a href="tcllib/files/modules/sasl/gtoken.html"> SASL::XGoogleToken </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key515"> automatic </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key831"> automatic documentation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_doc_gen.html"> tepam::doc_gen </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key320"> automaton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key826"> aycock </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c5">Keywords: B</a>


</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key269"> bank </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key299"> base32 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base32/base32.html"> base32 </a> &#183; <a href="tcllib/files/modules/base32/base32core.html"> base32::core </a> &#183; <a href="tcllib/files/modules/base32/base32hex.html"> base32::hex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key587"> base64 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/base64.html"> base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key743"> bash </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key388"> bee </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key98"> bench language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key101"> benchmark </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key425"> ber </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key685"> Bessel functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/special.html"> math::special </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key465"> bfs </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key421"> bibliography </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key422"> bibtex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key287"> bignums </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bignum.html"> math::bignum </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key714"> bind </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key495"> bipartite </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key390"> BitTorrent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key389"> bittorrent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key282"> blanks </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/repeat.html"> textutil::repeat </a>
</td></tr>



<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key297"> block cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key456"> blocking flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key801"> blowfish </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key363"> Book Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key702"> breadth-first </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key467"> bridge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key241"> BWidget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c6">Keywords: C</a>


</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key290"> C </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key237"> C++ </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key384"> cache </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key401"> caesar cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key784"> calculus </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key540"> callback </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a> &#183; <a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/lambda/lambda.html"> lambda </a> &#183; <a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a> &#183; <a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key721"> callbacks </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key689"> capitalize </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key267"> card for credit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key730"> cardinality </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key314"> cat </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key176"> catalog package </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key665"> catalogue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key795"> cell-phone </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key426"> cer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key22"> CFG </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key27"> CFL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key676"> CGI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key615"> cgraph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graph1.html"> struct::graph_v1 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key448"> changelog </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/changelog.html"> doctools::changelog </a> &#183; <a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key63"> channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/copyops.html"> transfer::copy </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a> &#183; <a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key277"> channel transformation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key96"> character input </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key420"> character output </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_send.html"> term::ansi::send </a> &#183; <a href="tcllib/files/modules/term/term_send.html"> term::send </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key693"> chat </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/irc/irc.html"> irc </a> &#183; <a href="tcllib/files/modules/multiplexer/multiplexer.html"> multiplexer </a> &#183; <a href="tcllib/files/modules/irc/picoirc.html"> picoirc </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key620"> checkbox </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/javascript/javascript.html"> javascript </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key618"> checkbutton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key53"> Checking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key150"> checksum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key688"> chop </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key169"> cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key149"> cksum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key240"> class </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key758"> class methods </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key761"> class variables </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key158"> cleanup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key30"> client </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_client.html"> nameserv </a> &#183; <a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a> &#183; <a href="tcllib/files/modules/nns/nns_common.html"> nameserv::common </a> &#183; <a href="tcllib/files/apps/nns.html"> nns </a> &#183; <a href="tcllib/files/modules/nns/nns_intro.html"> nns_intro </a> &#183; <a href="tcllib/files/apps/nnslog.html"> nnslog </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key523"> cloud </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/S3.html"> S3 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key265"> cmdline processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key164"> color control </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key507"> columns </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key40"> comm </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a> &#183; <a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a> &#183; <a href="tcllib/files/modules/nns/nns_protocol.html"> nameserv::protocol </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key275"> command </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key261"> command line processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cmdline/cmdline.html"> cmdline </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key595"> command prefix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a> &#183; <a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key155"> comment </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a> &#183; <a href="tcllib/files/modules/png/png.html"> png </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key552"> common </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key690"> common prefix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key355"> communication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key554"> comparison </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key488"> complete graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key797"> complex numbers </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/qcomplex.html"> math::complexnumbers </a> &#183; <a href="tcllib/files/modules/math/fourier.html"> math::fourier </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key266"> compression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a> &#183; <a href="tcllib/files/modules/zip/encode.html"> zipfile::encode </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key751"> computations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key163"> concatenation channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key481"> connected component </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key741"> connected fifos </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key612"> connection </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key610"> constants </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key349"> CONTAINER </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key519"> contents </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key23"> context-free grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>





</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key4"> context-free languages </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key95"> control </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a> &#183; <a href="tcllib/files/modules/term/term.html"> term </a> &#183; <a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a> &#183; <a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a> &#183; <a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a> &#183; <a href="tcllib/files/modules/term/ansi_send.html"> term::ansi::send </a> &#183; <a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a> &#183; <a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a> &#183; <a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a> &#183; <a href="tcllib/files/modules/term/term_send.html"> term::send </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key224"> control structure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key20"> conversion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/math/roman.html"> math::roman </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key506"> cooked </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key675"> cookie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key64"> copy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a> &#183; <a href="tcllib/files/modules/transfer/copyops.html"> transfer::copy </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a> &#183; <a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key219"> coroutine </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a> &#183; <a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key819"> Cost </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key276"> counter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key717"> counting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key810"> CPARAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key146"> crc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key809"> crc16 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/crc16.html"> crc16 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key147"> crc32 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key270"> credit card </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key621"> cron </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cron/cron.html"> cron </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key800"> cryptography </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key406"> CSS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key49"> csv </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/csv/csv.html"> csv </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key597"> currying </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a> &#183; <a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key484"> cut edge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key486"> cut vertex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key634"> CVS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key774"> cvs </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key775"> cvs log </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key148"> cyclic redundancy check </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c7">Keywords: D</a>


</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key630"> data analysis </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/statistics.html"> math::statistics </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key61"> data destination </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key403"> data entry form </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html"> tepam::argument_dialogbox </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key205"> data exchange </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key124"> data integrity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key365"> data source </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key328"> data structures </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/record.html"> struct::record </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key34"> database </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key402"> dataflow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key639"> DE </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key76"> debug </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key769"> decimal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/decimal.html"> math::decimal </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key338"> declare </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key43"> decompression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a> &#183; <a href="tcllib/files/modules/zip/decode.html"> zipfile::decode </a> &#183; <a href="tcllib/files/modules/zip/mkzip.html"> zipfile::mkzip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key375"> decryption </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key543"> deferal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key339"> define </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key475"> degree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key476"> degree constrained spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key808"> degrees </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key39"> delegation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key700"> depth-first </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key428"> der </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key296"> DES </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key292"> deserialization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key458"> diameter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key705"> dict </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dicttool/dicttool.html"> dicttool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key563"> diff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key635"> diff -n format </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key733"> difference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key557"> differential </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key785"> differential equations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key496"> dijkstra </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key135"> directory access </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key723"> directory traversal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/traverse.html"> fileutil_traverse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key271"> Discover </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key787"> discrete items </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key623"> disjoint set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key517"> dispatcher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key479"> distance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key599"> DNS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key145"> do </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key178"> docidx </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key368"> docidx commands </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key371"> docidx language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key249"> docidx markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key369"> docidx syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key435"> docstrip </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key258"> doctoc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key512"> doctoc commands </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key511"> doctoc language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key387"> doctoc markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key546"> doctoc syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key179"> doctools </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/modules/doctools/changelog.html"> doctools::changelog </a> &#183; <a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key137"> doctools commands </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key140"> doctools language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key139"> doctools markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key138"> doctools syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key659"> document </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key185"> documentation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a> &#183; <a href="tcllib/files/modules/tepam/tepam_doc_gen.html"> tepam::doc_gen </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key816"> DOM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key754"> dom </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/xsxp.html"> xsxp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key602"> domain name service </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>





<tr class="#doctools_idxheader"><th colspan="2">
<a name="c8">Keywords: E</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key807"> e </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key103"> EAN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key104"> EAN13 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>




















</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key825"> earley </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key3"> EBNF </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key501"> eccentricity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key460"> edge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key449"> emacs </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/changelog.html"> doctools::changelog </a> &#183; <a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key335"> email </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key729"> emptiness </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key778"> empty interpreter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key549"> EN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key254"> encoding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/ascii85.html"> ascii85 </a> &#183; <a href="tcllib/files/modules/base64/base64.html"> base64 </a> &#183; <a href="tcllib/files/modules/base64/uuencode.html"> uuencode </a> &#183; <a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key127"> encryption </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key766"> entry mask </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key560"> equal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key573"> equality </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key622"> equivalence class </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key161"> error </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_throw.html"> throw </a> &#183; <a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key683"> error function </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/special.html"> math::special </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key102"> European Article Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key542"> event </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/uev/uevent.html"> uevent </a> &#183; <a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key516"> event management </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key412"> events </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key370"> examples </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a>
</td></tr>





<tr class="#doctools_idxodd" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="key162"> exception </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key204"> exchange format </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key731"> exclusion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key430"> execution </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key152"> exif </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>



</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key415"> exit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key260"> export </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key0"> expression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key87"> extended namespace </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c9">Keywords: F</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key367"> faq </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key533"> fetching information </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key803"> FFT </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fourier.html"> math::fourier </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key608"> fifo </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key31"> file </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key116"> file recognition </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key118"> file type </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>















<td class="#doctools_idxleft" width="35%"><a name="key115"> file utilities </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a> &#183; <a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a> &#183; <a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key385"> filesystem </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key223"> filter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key160"> final </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key268"> finance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key626"> find </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key788"> finite </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key325"> finite automaton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key213"> FIPS 180-1 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key561"> first permutation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key569"> Fisher-Yates </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key558"> flatten </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key393"> floating-point </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/fuzzy.html"> math::fuzzy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key141"> flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key499"> flow network </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key566"> folding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key221"> foldl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key226"> foldr </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key218"> foreach </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key616"> form </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key110"> format conversion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key657"> formatter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key247"> formatting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a> &#183; <a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a> &#183; <a href="tcllib/files/modules/textutil/tabify.html"> textutil::tabify </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key658"> formatting engine </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key802"> Fourier transform </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fourier.html"> math::fourier </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key170"> FR </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key674"> frame </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key294"> ftp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>








<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key607"> ftpd </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key606"> ftpserver </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key564"> full outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c10">Keywords: G</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key713"> generate event </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key572"> generate permutations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key250"> generation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key225"> generator </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key584"> geocoding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key197"> geodesy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/mapproj/mapproj.html"> mapproj </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key202"> geography </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key94"> get character </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key416"> gets </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key413"> global </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key531"> gopher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key408"> gps </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/gpx/gpx.html"> gpx </a> &#183; <a href="tcllib/files/modules/nmea/nmea.html"> nmea </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key669"> gpx </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/gpx/gpx.html"> gpx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key11"> grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpu.html"> grammar::me::cpu </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpucore.html"> grammar::me::cpu::core </a> &#183; <a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_tcl.html"> grammar::me::tcl </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_me/me_vm.html"> grammar::me_vm </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key305"> graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a> &#183; <a href="tcllib/files/modules/struct/graph1.html"> struct::graph_v1 </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key194"> graph walking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key419"> green threads </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key316"> grep </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key210"> GUID </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uuid/uuid.html"> uuid </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c11">Keywords: H</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key216"> hashing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a> &#183; <a href="tcllib/files/modules/otp/otp.html"> otp </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key710"> heartbeat </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key474"> heuristic </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key340"> hex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base32/base32hex.html"> base32::hex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="key734"> hexadecimal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key716"> histogram </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key680"> hook </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key824"> horspool </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key18"> HTML </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key617"> html </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/javascript/javascript.html"> javascript </a> &#183; <a href="tcllib/files/modules/ncgi/ncgi.html"> ncgi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key446"> http </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/http/autoproxy.html"> autoproxy </a> &#183; <a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a> &#183; <a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key588"> huddle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key504"> human readable </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key348"> hyphenation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c12">Keywords: I</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key171"> i18n </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key383"> IBAN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key433"> ident </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ident/ident.html"> ident </a>
</td></tr>



<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key434"> identification </a></td>





<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ident/ident.html"> ident </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key442"> identity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key541"> idle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key121"> image </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a> &#183; <a href="tcllib/files/modules/png/png.html"> png </a> &#183; <a href="tcllib/files/modules/tiff/tiff.html"> tiff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key805"> imap </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key791"> IMEI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key291"> import </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key46"> in-memory channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key699"> in-order </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key728"> inclusion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key244"> Incr Tcl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key344"> indenting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key471"> independent set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key182"> index </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2idx/import_docidx.html"> doctools::idx::import::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key780"> index formatter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key83"> info </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key568"> inner join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key505"> input mode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key351"> integer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/roman.html"> math::roman </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key783"> integration </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key740"> inter-thread communication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key105"> International Article Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key382"> International Bank Account Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key794"> International Mobile Equipment Identity </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key364"> International Standard Book Number </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key175"> internationalization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key131"> internet </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a> &#183; <a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key454"> internet address </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key834"> interpolation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/interpolate.html"> math::interpolate </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key38"> interpreter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a> &#183; <a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a> &#183; <a href="tcllib/files/modules/wip/wip.html"> wip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key732"> intersection </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key750"> interval </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key451"> ip </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key360"> ipc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key453"> ipv4 </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key450"> ipv6 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key744"> irc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/irc/irc.html"> irc </a> &#183; <a href="tcllib/files/modules/irc/picoirc.html"> picoirc </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key55"> isA </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key362"> ISBN </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key491"> isthmus </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key222"> iterator </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c13">Keywords: J</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key207"> javascript </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/javascript/javascript.html"> javascript </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key154"> jfif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key559"> join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key153"> jpeg </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key259"> JSON </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import_json.html"> doctools::idx::import::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key206"> json </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/json/json.html"> json </a> &#183; <a href="tcllib/files/modules/json/json_write.html"> json::write </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key343"> justification </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c14">Keywords: K</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key184"> keyword index </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key779"> keywords </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key285"> knuth </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c15">Keywords: L</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key177"> l10n </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key594"> lambda </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key438"> LaTeX </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key186"> latex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key196"> latitute </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key130"> ldap </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key128"> ldap client </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key503"> ldif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key69"> least squares </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key553"> left outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key193"> lemon </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key487"> level graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key257"> lexer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key697"> lexing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key725"> limitsize </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key580"> line </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key68"> linear algebra </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key67"> linear equations </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key312"> linear program </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key510"> lines </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key302"> list </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/wip/wip.html"> wip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key97"> listener </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key437"> literate programming </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key15"> LL(k) </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key482"> local searching </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key174"> localization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key200"> location </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key73"> log </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a> &#183; <a href="tcllib/files/modules/doctools/cvs.html"> doctools::cvs </a> &#183; <a href="tcllib/files/modules/log/log.html"> log </a> &#183; <a href="tcllib/files/modules/log/logger.html"> logger </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key91"> log level </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/log.html"> log </a> &#183; <a href="tcllib/files/modules/log/logger.html"> logger </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key89"> logger </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/logger.html"> logger </a> &#183; <a href="tcllib/files/modules/log/loggerAppender.html"> logger::appender </a> &#183; <a href="tcllib/files/modules/log/loggerUtils.html"> logger::utils </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key551"> longest common subsequence </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key203"> longitude </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key457"> loop </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key59"> luhn </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a>
</td></tr>



<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key54"> luhn-5 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c16">Keywords: M</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key527"> macros </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key330"> mail </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key534"> mailto </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key526"> man_macros </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key17"> manpage </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key201"> map </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a> &#183; <a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/mapproj/mapproj.html"> mapproj </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key16"> markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools/doctools_intro.html"> doctools_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key670"> MasterCard </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key5"> matching </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key71"> math </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math.html"> math </a> &#183; <a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/bignum.html"> math::bignum </a> &#183; <a href="tcllib/files/modules/math/calculus.html"> math::calculus </a> &#183; <a href="tcllib/files/modules/math/qcomplex.html"> math::complexnumbers </a> &#183; <a href="tcllib/files/modules/math/constants.html"> math::constants </a> &#183; <a href="tcllib/files/modules/math/decimal.html"> math::decimal </a> &#183; <a href="tcllib/files/modules/math/fuzzy.html"> math::fuzzy </a> &#183; <a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a> &#183; <a href="tcllib/files/modules/math/interpolate.html"> math::interpolate </a> &#183; <a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a> &#183; <a href="tcllib/files/modules/math/optimize.html"> math::optimize </a> &#183; <a href="tcllib/files/modules/math/polynomials.html"> math::polynomials </a> &#183; <a href="tcllib/files/modules/math/rational_funcs.html"> math::rationalfunctions </a> &#183; <a href="tcllib/files/modules/math/special.html"> math::special </a> &#183; <a href="tcllib/files/modules/simulation/annealing.html"> simulation::annealing </a> &#183; <a href="tcllib/files/modules/simulation/montecarlo.html"> simulation::montecarlo </a> &#183; <a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key629"> mathematics </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fourier.html"> math::fourier </a> &#183; <a href="tcllib/files/modules/math/statistics.html"> math::statistics </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key66"> matrices </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key51"> matrix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a> &#183; <a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a> &#183; <a href="tcllib/files/modules/report/report.html"> report </a> &#183; <a href="tcllib/files/modules/struct/matrix.html"> struct::matrix </a> &#183; <a href="tcllib/files/modules/struct/matrix1.html"> struct::matrix_v1 </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key478"> max cut </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key310"> maximum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key498"> maximum flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key380"> md4 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key661"> md5 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="key767"> md5crypt </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a>
</td></tr>





<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key233"> medicare </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key239"> mega widget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key727"> membership </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key673"> menu </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key539"> merge </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key625"> merge find </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key111"> merging </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key361"> message </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a> &#183; <a href="tcllib/files/modules/log/log.html"> log </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key172"> message catalog </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key799"> message level </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/log.html"> log </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key173"> message package </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html"> doctools::msgcat </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html"> doctools::msgcat::idx::c </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html"> doctools::msgcat::idx::de </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html"> doctools::msgcat::idx::en </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html"> doctools::msgcat::idx::fr </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html"> doctools::msgcat::toc::c </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html"> doctools::msgcat::toc::de </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html"> doctools::msgcat::toc::en </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html"> doctools::msgcat::toc::fr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key215"> message-digest </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a> &#183; <a href="tcllib/files/modules/otp/otp.html"> otp </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key36"> metakit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key372"> method </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key756"> method reference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key230"> mime </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key461"> minimal spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key309"> minimum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key472"> minimum cost flow </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key462"> minimum degree spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key500"> minimum diameter spanning tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key792"> mobile phone </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key667"> module </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key748"> montecarlo simulation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/montecarlo.html"> simulation::montecarlo </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key229"> move </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key227"> multi-file </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key694"> multiplexer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/multiplexer/multiplexer.html"> multiplexer </a>
</td></tr>



<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key289"> multiprecision </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/bignum.html"> math::bignum </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key760"> my method </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c17">Keywords: N</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key29"> name service </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_client.html"> nameserv </a> &#183; <a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a> &#183; <a href="tcllib/files/modules/nns/nns_common.html"> nameserv::common </a> &#183; <a href="tcllib/files/modules/nns/nns_protocol.html"> nameserv::protocol </a> &#183; <a href="tcllib/files/modules/nns/nns_server.html"> nameserv::server </a> &#183; <a href="tcllib/files/apps/nns.html"> nns </a> &#183; <a href="tcllib/files/modules/nns/nns_intro.html"> nns_intro </a> &#183; <a href="tcllib/files/apps/nnsd.html"> nnsd </a> &#183; <a href="tcllib/files/apps/nnslog.html"> nnslog </a> &#183; <a href="tcllib/files/modules/udpcluster/udpcluster.html"> udpcluster </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key86"> namespace unknown </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key85"> namespace utilities </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key72"> narrative </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key231"> National Provider Identifier </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key489"> neighbour </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key295"> net </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key524"> nettool </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nettool/nettool.html"> nettool </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key672"> network </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key532"> news </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key576"> next permutation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key407"> nmea </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nmea/nmea.html"> nmea </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key652"> nntp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key655"> nntpclient </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key143"> no-op </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key463"> node </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a> &#183; <a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key583"> nominatim </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key112"> normalization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/stringprep/unicode.html"> unicode </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key234"> NPI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key21"> nroff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key711"> NTLM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/ntlm.html"> SASL::NTLM </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key80"> NTP </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key771"> null </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a>
</td></tr>













<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key772"> number theory </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/numtheory.html"> math::numtheory </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c18">Keywords: O</a>


</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key838"> oauth </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key243"> object </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key236"> object oriented </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a> &#183; <a href="tcllib/files/modules/stooop/stooop.html"> stooop </a> &#183; <a href="tcllib/files/modules/stooop/switched.html"> switched </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key650"> observer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key255"> odie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cron/cron.html"> cron </a> &#183; <a href="tcllib/files/modules/nettool/nettool.html"> nettool </a> &#183; <a href="tcllib/files/modules/processman/processman.html"> processman </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key538"> on-idle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent_onidle.html"> uevent::onidle </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key376"> one time pad </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key311"> optimization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/optimize.html"> math::optimize </a> &#183; <a href="tcllib/files/modules/simulation/annealing.html"> simulation::annealing </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key752"> ordered list </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/prioqueue.html"> struct::prioqueue </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key377"> otp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key575"> outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c19">Keywords: P</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="key48"> package </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key664"> package indexing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key191"> page </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_intro.html"> page_intro </a> &#183; <a href="tcllib/files/modules/page/page_pluginmgr.html"> page_pluginmgr </a> &#183; <a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key790"> pager </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key347"> paragraph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key518"> PARAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key404"> parameter entry form </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html"> tepam::argument_dialogbox </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key9"> parser </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_parse.html"> doctools::idx::parse </a> &#183; <a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_parse.html"> doctools::toc::parse </a> &#183; <a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a> &#183; <a href="tcllib/files/modules/amazon-s3/xsxp.html"> xsxp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key189"> parser generator </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/apps/page.html"> page </a> &#183; <a href="tcllib/files/modules/page/page_intro.html"> page_intro </a> &#183; <a href="tcllib/files/modules/page/page_pluginmgr.html"> page_pluginmgr </a> &#183; <a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key26"> parsing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpu.html"> grammar::me::cpu </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpucore.html"> grammar::me::cpu::core </a> &#183; <a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_tcl.html"> grammar::me::tcl </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_me/me_vm.html"> grammar::me_vm </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key8"> parsing expression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key14"> parsing expression grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key593"> partial application </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key627"> partition </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key628"> partitioned set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key614"> passive </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key692"> password </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/otp/otp.html"> otp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key662"> patch </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key636"> patching </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key6"> PEG </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key100"> performance </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a> &#183; <a href="tcllib/files/modules/profiler/profiler.html"> profiler </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key550"> permutation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key33"> persistence </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key793"> phone </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key806"> pi </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key545"> plain text </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key579"> plane geometry </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key252"> plugin </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2base/nroff_manmacros.html"> doctools::nroff::man_macros </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key180"> plugin management </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pluginmgr/pluginmgr.html"> pluginmgr </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key181"> plugin search </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pluginmgr/pluginmgr.html"> pluginmgr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key704"> png </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/png/png.html"> png </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key581"> point </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/math_geometry.html"> math::geometry </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key814"> polynomial functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/polynomials.html"> math::polynomials </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key304"> pool </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key445"> pop </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key444"> pop3 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key701"> post-order </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key366"> practcl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/practcl/practcl.html"> practcl </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key698"> pre-order </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key687"> prefix </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>





<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key773"> prime </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/numtheory.html"> math::numtheory </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key308"> prioqueue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/prioqueue.html"> struct::prioqueue </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key753"> priority queue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/prioqueue.html"> struct::prioqueue </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key592"> proc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/lambda/lambda.html"> lambda </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key41"> procedure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_proc.html"> deleg_proc </a> &#183; <a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key832"> procedure documentation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_doc_gen.html"> tepam::doc_gen </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key256"> processman </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/processman/processman.html"> processman </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key679"> producer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key649"> profile </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/profiler/profiler.html"> profiler </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key643"> projection </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mapproj/mapproj.html"> mapproj </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key529"> prospero </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key133"> protocol </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a> &#183; <a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a> &#183; <a href="tcllib/files/modules/nns/nns_protocol.html"> nameserv::protocol </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_udb.html"> pop3d::udb </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key830"> proxy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/http/autoproxy.html"> autoproxy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key168"> public key cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pki/pki.html"> pki </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key681"> publisher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key1"> push down automaton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c20">Keywords: Q</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="key50"> queue </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key604"> quoting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c21">Keywords: R</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key611"> radians </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/constants.html"> math::constants </a> &#183; <a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key619"> radiobutton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/html/html.html"> html </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="key469"> radius </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key590"> random </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key642"> random numbers </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key656"> rational functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/rational_funcs.html"> math::rationalfunctions </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key508"> raw </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key123"> rc4 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key633"> RCS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key632"> RCS patch </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key411"> read </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key525"> reading </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key93"> receiver </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key514"> reconnect </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key307"> record </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/record.html"> struct::record </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key10"> recursive descent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key217"> reduce </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a> &#183; <a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key251"> reference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key47"> reflected channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_core/core.html"> tcl::chan::core </a> &#183; <a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_core/transformcore.html"> tcl::transform::core </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key696"> regex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a>
</td></tr>





<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key324"> regular expression </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/textutil_split.html"> textutil::split </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key322"> regular grammar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key321"> regular languages </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key358"> remote communication </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key357"> remote execution </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key228"> remove </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/multi.html"> fileutil::multi </a> &#183; <a href="tcllib/files/modules/fileutil/multiop.html"> fileutil::multi::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key574"> repeating </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key281"> repetition </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a> &#183; <a href="tcllib/files/modules/textutil/repeat.html"> textutil::repeat </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key107"> report </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/report/report.html"> report </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key567"> reshuffle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key466"> residual graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key601"> resolver </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key159"> resource management </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_try.html"> try </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key513"> restore </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nns/nns_auto.html"> nameserv::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key187"> return </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_throw.html"> throw </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key555"> reverse </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key332"> rfc 821 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key333"> rfc 822 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d_dbox.html"> pop3d::dbox </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key79"> rfc 868 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key293"> rfc 959 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftp/ftp.html"> ftp </a> &#183; <a href="tcllib/files/modules/ftp/ftp_geturl.html"> ftp::geturl </a> &#183; <a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key654"> rfc 977 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key603"> rfc 1034 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key598"> rfc 1035 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key653"> rfc 1036 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/nntp/nntp.html"> nntp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key379"> rfc 1320 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key381"> rfc 1321 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key432"> rfc 1413 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ident/ident.html"> ident </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key600"> rfc 1886 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_dns.html"> dns </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key443"> rfc 1939 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key77"> rfc 2030 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key812"> rfc 2045 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key813"> rfc 2046 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key811"> rfc 2049 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key214"> rfc 2104 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key578"> rfc 2141 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key129"> rfc 2251 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a> &#183; <a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key535"> rfc 2255 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key691"> rfc 2289 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/otp/otp.html"> otp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key537"> rfc 2396 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key336"> rfc 2554 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key836"> RFC 2718 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key329"> rfc 2821 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key502"> rfc 2849 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldapx.html"> ldapx </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key334"> rfc 3207 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/smtp.html"> smtp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key452"> rfc 3513 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/dns/tcllib_ip.html"> tcllib_ip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key132"> rfc 4511 </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key837"> RFC 5849 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key447"> rfc 6455 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/websocket/websocket.html"> websocket </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key804"> rfc3501 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key341"> rfc3548 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base32/base32.html"> base32 </a> &#183; <a href="tcllib/files/modules/base32/base32hex.html"> base32::hex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key556"> right outer join </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key378"> RIPEMD </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key350"> roman numeral </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/roman.html"> math::roman </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key786"> roots </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/math/calculus.html"> math::calculus </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key400"> rot </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key399"> rot13 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key392"> rounding </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/fuzzy.html"> math::fuzzy </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key509"> rows </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key354"> rpc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key167"> rsa </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pki/pki.html"> pki </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key431"> running </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c22">Keywords: S</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key521"> s3 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/S3.html"> S3 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key396"> SASL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/sasl.html"> SASL </a> &#183; <a href="tcllib/files/modules/sasl/ntlm.html"> SASL::NTLM </a> &#183; <a href="tcllib/files/modules/sasl/scram.html"> SASL::SCRAM </a> &#183; <a href="tcllib/files/modules/sasl/gtoken.html"> SASL::XGoogleToken </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key220"> scanl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/generator/generator.html"> generator </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key631"> SCCS </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key768"> SCRAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/scram.html"> SASL::SCRAM </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key356"> secure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key122"> security </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/aes/aes.html"> aes </a> &#183; <a href="tcllib/files/modules/blowfish/blowfish.html"> blowfish </a> &#183; <a href="tcllib/files/modules/crc/cksum.html"> cksum </a> &#183; <a href="tcllib/files/modules/crc/crc16.html"> crc16 </a> &#183; <a href="tcllib/files/modules/crc/crc32.html"> crc32 </a> &#183; <a href="tcllib/files/modules/des/des.html"> des </a> &#183; <a href="tcllib/files/modules/md4/md4.html"> md4 </a> &#183; <a href="tcllib/files/modules/md5/md5.html"> md5 </a> &#183; <a href="tcllib/files/modules/md5crypt/md5crypt.html"> md5crypt </a> &#183; <a href="tcllib/files/modules/otp/otp.html"> otp </a> &#183; <a href="tcllib/files/modules/pki/pki.html"> pki </a> &#183; <a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd128.html"> ripemd128 </a> &#183; <a href="tcllib/files/modules/ripemd/ripemd160.html"> ripemd160 </a> &#183; <a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a> &#183; <a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a> &#183; <a href="tcllib/files/modules/crc/sum.html"> sum </a> &#183; <a href="tcllib/files/modules/des/tcldes.html"> tclDES </a> &#183; <a href="tcllib/files/modules/des/tcldesjr.html"> tclDESjr </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key833"> seed </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="key739"> selectionbox </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/javascript/javascript.html"> javascript </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key136"> semantic markup </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx_intro.html"> docidx_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html"> docidx_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_faq.html"> docidx_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_intro.html"> docidx_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/docidx_lang_syntax.html"> docidx_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html"> docidx_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html"> doctoc_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_faq.html"> doctoc_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_intro.html"> doctoc_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html"> doctoc_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_introduction.html"> doctools2idx_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools/doctools_intro.html"> doctools_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html"> doctools_lang_cmdref </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_faq.html"> doctools_lang_faq </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_intro.html"> doctools_lang_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctools_lang_syntax.html"> doctools_lang_syntax </a> &#183; <a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html"> doctools_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key353"> send </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key109"> serialization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a> &#183; <a href="tcllib/files/modules/doctools2idx/export_docidx.html"> doctools::idx::export::docidx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_html.html"> doctools::idx::export::html </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_json.html"> doctools::idx::export::json </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html"> doctools::idx::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_text.html"> doctools::idx::export::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_structure.html"> doctools::idx::structure </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_structure.html"> doctools::toc::structure </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key65"> server </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/nns/nns_common.html"> nameserv::common </a> &#183; <a href="tcllib/files/modules/nns/nns_server.html"> nameserv::server </a> &#183; <a href="tcllib/files/modules/nns/nns_intro.html"> nns_intro </a> &#183; <a href="tcllib/files/apps/nnsd.html"> nnsd </a> &#183; <a href="tcllib/files/modules/udpcluster/udpcluster.html"> udpcluster </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key90"> service </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/log/logger.html"> logger </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key605"> services </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ftpd/ftpd.html"> ftpd </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key301"> set </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key441"> sha1 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sha1/sha1.html"> sha1 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key212"> sha256 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sha1/sha256.html"> sha256 </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key742"> shell </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key477"> shortest path </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key570"> shuffle </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key319"> simulated annealing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/annealing.html"> simulation::annealing </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key641"> simulation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key759"> singleton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key724"> size limit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key306"> skiplist </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/skiplist.html"> struct::skiplist </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key199"> slippy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key337"> smtp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/mime/mime.html"> mime </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key671"> smtpd </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key798"> Snit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key373"> snit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/interp/deleg_method.html"> deleg_method </a> &#183; <a href="tcllib/files/modules/interp/tcllib_interp.html"> interp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key78"> SNTP </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key352"> socket </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/comm/comm_wire.html"> comm_wire </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key284"> soundex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key436"> source </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip.html"> docstrip </a> &#183; <a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a> &#183; <a href="tcllib/files/apps/tcldocstrip.html"> tcldocstrip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key520"> spacing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key835"> spatial interpolation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/interpolate.html"> math::interpolate </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key684"> special functions </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/special.html"> math::special </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key660"> specification </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key648"> speed </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/profiler/profiler.html"> profiler </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key440"> split </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_split.html"> textutil::split </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key493"> squared graph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key359"> ssl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key303"> stack </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/queue.html"> struct::queue </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key827"> standard io </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key2"> state </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key84"> state (de)serialization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key640"> statistical distribution </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/simulation_random.html"> simulation::random </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key195"> statistics </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a> &#183; <a href="tcllib/files/modules/math/math.html"> math </a> &#183; <a href="tcllib/files/modules/math/statistics.html"> math::statistics </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key828"> stdin </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="key829"> stdout </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key747"> stochastic modelling </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/simulation/montecarlo.html"> simulation::montecarlo </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key126"> stream cipher </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rc4/rc4.html"> rc4 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key651"> stream copy </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key280"> string </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a> &#183; <a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a> &#183; <a href="tcllib/files/modules/textutil/expander.html"> textutil::expander </a> &#183; <a href="tcllib/files/modules/textutil/repeat.html"> textutil::repeat </a> &#183; <a href="tcllib/files/modules/textutil/textutil_split.html"> textutil::split </a> &#183; <a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a> &#183; <a href="tcllib/files/modules/textutil/tabify.html"> textutil::tabify </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key646"> stringprep </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/stringprep/stringprep.html"> stringprep </a> &#183; <a href="tcllib/files/modules/stringprep/stringprep_data.html"> stringprep::data </a> &#183; <a href="tcllib/files/modules/stringprep/unicode_data.html"> unicode::data </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key455"> strongly connected component </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key327"> struct </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/pool.html"> struct::pool </a> &#183; <a href="tcllib/files/modules/struct/record.html"> struct::record </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key142"> structure </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/control/control.html"> control </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key822"> structured queries </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key405"> style </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/html_cssdefaults.html"> doctools::html::cssdefaults </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="key762"> subcommand </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tepam/tepam_introduction.html"> tepam </a> &#183; <a href="tcllib/files/modules/tepam/tepam_procedure.html"> tepam::procedure </a>
</td></tr>





<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key480"> subgraph </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key678"> subject </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key738"> submitbutton </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/javascript/javascript.html"> javascript </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key677"> subscriber </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key565"> subsequence </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key273"> subst </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key585"> sum </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/crc/sum.html"> sum </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key562"> swapping </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_list.html"> struct::list </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key726"> symmetric difference </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key645"> synchronous </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/cache/async.html"> cache::async </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key745"> syntax tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_util.html"> grammar::me::util </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c23">Keywords: T</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key106"> table </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/html/html.html"> html </a> &#183; <a href="tcllib/files/modules/report/report.html"> report </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key157"> table of contents </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_introduction.html"> doctools2toc_introduction </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key544"> tabstops </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/tabify.html"> textutil::tabify </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key715"> tallying </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/counter/counter.html"> counter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key735"> tape archive </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tar/tar.html"> tar </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key737"> tar </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tar/tar.html"> tar </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key288"> tcl </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/bigfloat.html"> math::bigfloat </a> &#183; <a href="tcllib/files/modules/math/bignum.html"> math::bignum </a> &#183; <a href="tcllib/files/modules/math/decimal.html"> math::decimal </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key663"> Tcl module </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/docstrip/docstrip_util.html"> docstrip_util </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key274"> Tcl syntax </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key245"> tcler's wiki </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key52"> tcllib </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/csv/csv.html"> csv </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key757"> TclOO </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/meta.html"> oo::util </a> &#183; <a href="tcllib/files/modules/ooutil/ooutil.html"> oo::util </a> &#183; <a href="tcllib/files/modules/tool/tool.html"> tool </a> &#183; <a href="tcllib/files/modules/tool/tool_dict_ensemble.html"> tool::dict_ensemble </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key108"> TCLPARAM </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key7"> TDPL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key315"> temp file </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key781"> template processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/expander.html"> textutil::expander </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key92"> terminal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/term.html"> term </a> &#183; <a href="tcllib/files/modules/term/ansi_code.html"> term::ansi::code </a> &#183; <a href="tcllib/files/modules/term/ansi_cattr.html"> term::ansi::code::attr </a> &#183; <a href="tcllib/files/modules/term/ansi_cctrl.html"> term::ansi::code::ctrl </a> &#183; <a href="tcllib/files/modules/term/ansi_cmacros.html"> term::ansi::code::macros </a> &#183; <a href="tcllib/files/modules/term/ansi_ctrlu.html"> term::ansi::ctrl::unix </a> &#183; <a href="tcllib/files/modules/term/ansi_send.html"> term::ansi::send </a> &#183; <a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a> &#183; <a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a> &#183; <a href="tcllib/files/modules/term/receive.html"> term::receive </a> &#183; <a href="tcllib/files/modules/term/term_bind.html"> term::receive::bind </a> &#183; <a href="tcllib/files/modules/term/term_send.html"> term::send </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key313"> test </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key58"> Testing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key99"> testing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench.html"> bench </a> &#183; <a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wcsv.html"> bench::out::csv </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/bench/bench_intro.html"> bench_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_intro.html"> bench_lang_intro </a> &#183; <a href="tcllib/files/modules/bench/bench_lang_spec.html"> bench_lang_spec </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key345"> TeX </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key248"> text </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bench/bench_read.html"> bench::in </a> &#183; <a href="tcllib/files/modules/bench/bench_wtext.html"> bench::out::text </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key283"> text comparison </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key638"> text conversion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key637"> text differences </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/rcs/rcs.html"> rcs </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key789"> text display </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/term/imenu.html"> term::interact::menu </a> &#183; <a href="tcllib/files/modules/term/ipager.html"> term::interact::pager </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key782"> text expansion </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/expander.html"> textutil::expander </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key286"> text likeness </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/soundex/soundex.html"> soundex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key192"> text processing </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bibtex/bibtex.html"> bibtex </a> &#183; <a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/apps/page.html"> page </a> &#183; <a href="tcllib/files/modules/page/page_intro.html"> page_intro </a> &#183; <a href="tcllib/files/modules/page/page_pluginmgr.html"> page_pluginmgr </a> &#183; <a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/page/page_util_quote.html"> page_util_quote </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key208"> text widget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key410"> threads </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key188"> throw </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/try/tcllib_throw.html"> throw </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key151"> thumbnail </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/jpeg/jpeg.html"> jpeg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key35"> tie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key120"> tif </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tiff/tiff.html"> tiff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key119"> tiff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tiff/tiff.html"> tiff </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key386"> tile </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key81"> time </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ntp/ntp_time.html"> ntp_time </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key703"> timestamp </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/png/png.html"> png </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key75"> timestamps </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key45"> tip 219 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_core/core.html"> tcl::chan::core </a> &#183; <a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/virtchannel_core/transformcore.html"> tcl::transform::core </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key278"> tip 230 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key548"> tip 234 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key586"> tip 317 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key209"> Tk </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key331"> tls </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/comm/comm.html"> comm </a> &#183; <a href="tcllib/files/modules/imap4/imap4.html"> imap4 </a> &#183; <a href="tcllib/files/modules/pop3/pop3.html"> pop3 </a> &#183; <a href="tcllib/files/modules/pop3d/pop3d.html"> pop3d </a> &#183; <a href="tcllib/files/modules/mime/smtp.html"> smtp </a> &#183; <a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key19"> TMML </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctools.html"> doctools </a> &#183; <a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/apps/dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/dtplite/pkg_dtplite.html"> dtplite </a> &#183; <a href="tcllib/files/modules/doctools/mpexpand.html"> mpexpand </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key156"> toc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_intro.html"> doctoc_intro </a> &#183; <a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/export_doctoc.html"> doctools::toc::export::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_html.html"> doctools::toc::export::html </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_json.html"> doctools::toc::export::json </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html"> doctools::toc::export::nroff </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_text.html"> doctools::toc::export::text </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/import_doctoc.html"> doctools::toc::import::doctoc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import_json.html"> doctools::toc::import::json </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key720"> toc formatter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html"> doctoc_plugin_apiref </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key695"> tokenization </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/string/token.html"> string::token </a> &#183; <a href="tcllib/files/modules/string/token_shell.html"> string::token::shell </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key776"> TOOL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tool/tool.html"> tool </a> &#183; <a href="tcllib/files/modules/tool/tool_dict_ensemble.html"> tool::dict_ensemble </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key13"> top-down parsing languages </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key391"> torrent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/bee/bee.html"> bee </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key317"> touch </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key25"> TPDL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key74"> trace </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/debug/debug.html"> debug </a> &#183; <a href="tcllib/files/modules/debug/debug_caller.html"> debug::caller </a> &#183; <a href="tcllib/files/modules/debug/debug_heartbeat.html"> debug::heartbeat </a> &#183; <a href="tcllib/files/modules/debug/debug_timestamp.html"> debug::timestamp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key12"> transducer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_aycock/aycock.html"> grammar::aycock </a> &#183; <a href="tcllib/files/modules/grammar_fa/fa.html"> grammar::fa </a> &#183; <a href="tcllib/files/modules/grammar_fa/dacceptor.html"> grammar::fa::dacceptor </a> &#183; <a href="tcllib/files/modules/grammar_fa/dexec.html"> grammar::fa::dexec </a> &#183; <a href="tcllib/files/modules/grammar_fa/faop.html"> grammar::fa::op </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg.html"> grammar::peg </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/apps/pt.html"> pt </a> &#183; <a href="tcllib/files/modules/pt/pt_astree.html"> pt::ast </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html"> pt::cparam::configuration::critcl </a> &#183; <a href="tcllib/files/modules/pt/pt_cparam_config_tea.html"> pt::cparam::configuration::tea </a> &#183; <a href="tcllib/files/modules/pt/pt_json_language.html"> pt::json_language </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpression.html"> pt::pe </a> &#183; <a href="tcllib/files/modules/pt/pt_pexpr_op.html"> pt::pe::op </a> &#183; <a href="tcllib/files/modules/pt/pt_pegrammar.html"> pt::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container.html"> pt::peg::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_container_peg.html"> pt::peg::container::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export.html"> pt::peg::export </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_container.html"> pt::peg::export::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_json.html"> pt::peg::export::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_export_peg.html"> pt::peg::export::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_container.html"> pt::peg::from::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_json.html"> pt::peg::from::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_from_peg.html"> pt::peg::from::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import.html"> pt::peg::import </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_container.html"> pt::peg::import::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_json.html"> pt::peg::import::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_import_peg.html"> pt::peg::import::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_interp.html"> pt::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_container.html"> pt::peg::to::container </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_cparam.html"> pt::peg::to::cparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_json.html"> pt::peg::to::json </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_param.html"> pt::peg::to::param </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_peg.html"> pt::peg::to::peg </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html"> pt::peg::to::tclparam </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_language.html"> pt::peg_language </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_introduction.html"> pt::pegrammar </a> &#183; <a href="tcllib/files/modules/pt/pt_pgen.html"> pt::pgen </a> &#183; <a href="tcllib/files/modules/pt/pt_rdengine.html"> pt::rde </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html"> pt::tclparam::configuration::nx </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html"> pt::tclparam::configuration::snit </a> &#183; <a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html"> pt::tclparam::configuration::tcloo </a> &#183; <a href="tcllib/files/modules/pt/pt_util.html"> pt::util </a> &#183; <a href="tcllib/files/modules/pt/pt_to_api.html"> pt_export_api </a> &#183; <a href="tcllib/files/modules/pt/pt_from_api.html"> pt_import_api </a> &#183; <a href="tcllib/files/modules/pt/pt_introduction.html"> pt_introduction </a> &#183; <a href="tcllib/files/modules/pt/pt_parse_peg.html"> pt_parse_peg </a> &#183; <a href="tcllib/files/modules/pt/pt_parser_api.html"> pt_parser_api </a> &#183; <a href="tcllib/files/modules/pt/pt_peg_op.html"> pt_peg_op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key62"> transfer </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/connect.html"> transfer::connect </a> &#183; <a href="tcllib/files/modules/transfer/copyops.html"> transfer::copy </a> &#183; <a href="tcllib/files/modules/transfer/tqueue.html"> transfer::copy::queue </a> &#183; <a href="tcllib/files/modules/transfer/ddest.html"> transfer::data::destination </a> &#183; <a href="tcllib/files/modules/transfer/dsource.html"> transfer::data::source </a> &#183; <a href="tcllib/files/modules/transfer/receiver.html"> transfer::receiver </a> &#183; <a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key279"> transformation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_peg.html"> page_util_peg </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key718"> transmitter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/transfer/transmitter.html"> transfer::transmitter </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key459"> travelling salesman </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key722"> traversal </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/traverse.html"> fileutil_traverse </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key300"> tree </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_util.html"> grammar::me::util </a> &#183; <a href="tcllib/files/modules/htmlparse/htmlparse.html"> htmlparse </a> &#183; <a href="tcllib/files/modules/struct/queue.html"> struct::queue </a> &#183; <a href="tcllib/files/modules/struct/stack.html"> struct::stack </a> &#183; <a href="tcllib/files/modules/struct/struct_tree.html"> struct::tree </a> &#183; <a href="tcllib/files/modules/struct/struct_tree1.html"> struct::tree_v1 </a> &#183; <a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key820"> tree query language </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key190"> tree walking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/page/page_util_flow.html"> page_util_flow </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_lemon.html"> page_util_norm_lemon </a> &#183; <a href="tcllib/files/modules/page/page_util_norm_peg.html"> page_util_norm_peg </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key818"> TreeQL </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>





<td class="#doctools_idxleft" width="35%"><a name="key429"> trimming </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil.html"> textutil </a> &#183; <a href="tcllib/files/modules/textutil/trim.html"> textutil::trim </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key839"> twitter </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/oauth/oauth.html"> oauth </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key117"> type </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/fileutil/fileutil.html"> fileutil </a> &#183; <a href="tcllib/files/modules/fumagic/cfront.html"> fileutil::magic::cfront </a> &#183; <a href="tcllib/files/modules/fumagic/cgen.html"> fileutil::magic::cgen </a> &#183; <a href="tcllib/files/modules/fumagic/filetypes.html"> fileutil::magic::filetype </a> &#183; <a href="tcllib/files/modules/fumagic/rtcore.html"> fileutil::magic::rt </a> &#183; <a href="tcllib/files/modules/snit/snit.html"> snit </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key57"> Type checking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c24">Keywords: U</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key682"> uevent </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/hook/hook.html"> hook </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key712"> unbind </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uev/uevent.html"> uevent </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key686"> uncapitalize </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/textutil_string.html"> textutil::string </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key342"> undenting </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/textutil/adjust.html"> textutil::adjust </a>
</td></tr>





<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key647"> unicode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/stringprep/stringprep.html"> stringprep </a> &#183; <a href="tcllib/files/modules/stringprep/stringprep_data.html"> stringprep::data </a> &#183; <a href="tcllib/files/modules/stringprep/unicode.html"> unicode </a> &#183; <a href="tcllib/files/modules/stringprep/unicode_data.html"> unicode::data </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key624"> union </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/disjointset.html"> struct::disjointset </a> &#183; <a href="tcllib/files/modules/struct/struct_set.html"> struct::set </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key609"> unit </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/units/units.html"> units </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key88"> unknown hooking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key32"> untie </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/tie/tie_std.html"> tie </a> &#183; <a href="tcllib/files/modules/tie/tie.html"> tie </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key417"> update </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key528"> uri </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a> &#183; <a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key246"> url </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_import.html"> doctools::idx::import </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_import.html"> doctools::toc::import </a> &#183; <a href="tcllib/files/modules/map/map_geocode_nominatim.html"> map::geocode::nominatim </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a> &#183; <a href="tcllib/files/modules/uri/uri.html"> uri </a> &#183; <a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key577"> urn </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/urn-scheme.html"> uri_urn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key232"> US-NPI </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key82"> utilities </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/namespacex/namespacex.html"> namespacex </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key253"> uuencode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/uuencode.html"> uuencode </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key211"> UUID </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uuid/uuid.html"> uuid </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c25">Keywords: V</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key60"> Validation </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key56"> Value checking </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/valtype_common.html"> valtype::common </a> &#183; <a href="tcllib/files/modules/valtype/cc_amex.html"> valtype::creditcard::amex </a> &#183; <a href="tcllib/files/modules/valtype/cc_discover.html"> valtype::creditcard::discover </a> &#183; <a href="tcllib/files/modules/valtype/cc_mastercard.html"> valtype::creditcard::mastercard </a> &#183; <a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a> &#183; <a href="tcllib/files/modules/valtype/ean13.html"> valtype::gs1::ean13 </a> &#183; <a href="tcllib/files/modules/valtype/iban.html"> valtype::iban </a> &#183; <a href="tcllib/files/modules/valtype/imei.html"> valtype::imei </a> &#183; <a href="tcllib/files/modules/valtype/isbn.html"> valtype::isbn </a> &#183; <a href="tcllib/files/modules/valtype/luhn.html"> valtype::luhn </a> &#183; <a href="tcllib/files/modules/valtype/luhn5.html"> valtype::luhn5 </a> &#183; <a href="tcllib/files/modules/valtype/usnpi.html"> valtype::usnpi </a> &#183; <a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key70"> vectors </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/math/linalg.html"> math::linearalgebra </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key749"> verhoeff </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/verhoeff.html"> valtype::verhoeff </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key464"> vertex </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graph.html"> struct::graph </a> &#183; <a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key497"> vertex cover </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/struct/graphops.html"> struct::graph::op </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key44"> virtual channel </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/cat.html"> tcl::chan::cat </a> &#183; <a href="tcllib/files/modules/virtchannel_core/core.html"> tcl::chan::core </a> &#183; <a href="tcllib/files/modules/virtchannel_core/events.html"> tcl::chan::events </a> &#183; <a href="tcllib/files/modules/virtchannel_base/facade.html"> tcl::chan::facade </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html"> tcl::chan::fifo </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html"> tcl::chan::fifo2 </a> &#183; <a href="tcllib/files/modules/virtchannel_base/halfpipe.html"> tcl::chan::halfpipe </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html"> tcl::chan::memchan </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_null.html"> tcl::chan::null </a> &#183; <a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_random.html"> tcl::chan::random </a> &#183; <a href="tcllib/files/modules/virtchannel_base/std.html"> tcl::chan::std </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_string.html"> tcl::chan::string </a> &#183; <a href="tcllib/files/modules/virtchannel_base/textwindow.html"> tcl::chan::textwindow </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html"> tcl::chan::variable </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/randseed.html"> tcl::randomseed </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/adler32.html"> tcl::transform::adler32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_base64.html"> tcl::transform::base64 </a> &#183; <a href="tcllib/files/modules/virtchannel_core/transformcore.html"> tcl::transform::core </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_counter.html"> tcl::transform::counter </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html"> tcl::transform::crc32 </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/hex.html"> tcl::transform::hex </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/identity.html"> tcl::transform::identity </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/limitsize.html"> tcl::transform::limitsize </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/observe.html"> tcl::transform::observe </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/rot.html"> tcl::transform::rot </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/spacer.html"> tcl::transform::spacer </a> &#183; <a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key24"> virtual machine </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/grammar_me/me_cpu.html"> grammar::me::cpu </a> &#183; <a href="tcllib/files/modules/grammar_me/me_cpucore.html"> grammar::me::cpu::core </a> &#183; <a href="tcllib/files/modules/grammar_me/gasm.html"> grammar::me::cpu::gasm </a> &#183; <a href="tcllib/files/modules/grammar_me/me_tcl.html"> grammar::me::tcl </a> &#183; <a href="tcllib/files/modules/grammar_me/me_intro.html"> grammar::me_intro </a> &#183; <a href="tcllib/files/modules/grammar_me/me_vm.html"> grammar::me_vm </a> &#183; <a href="tcllib/files/modules/grammar_peg/peg_interp.html"> grammar::peg::interp </a> &#183; <a href="tcllib/files/modules/pt/pt_param.html"> pt::param </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key709"> VISA </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/valtype/cc_visa.html"> valtype::creditcard::visa </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key418"> vwait </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/coroutine/tcllib_coroutine.html"> coroutine </a> &#183; <a href="tcllib/files/modules/coroutine/coro_auto.html"> coroutine::auto </a> &#183; <a href="tcllib/files/modules/smtpd/smtpd.html"> smtpd </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c26">Keywords: W</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key530"> wais </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key235"> widget </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key238"> widget adaptors </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/snit/snit.html"> snit </a> &#183; <a href="tcllib/files/modules/snit/snitfaq.html"> snitfaq </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key183"> wiki </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools/docidx.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_container.html"> doctools::idx </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export.html"> doctools::idx::export </a> &#183; <a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html"> doctools::idx::export::wiki </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_container.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools/doctoc.html"> doctools::toc </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export.html"> doctools::toc::export </a> &#183; <a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html"> doctools::toc::export::wiki </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key272"> word </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/doctools2base/tcl_parse.html"> doctools::tcl::parse </a> &#183; <a href="tcllib/files/modules/wip/wip.html"> wip </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key536"> www </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/uri/uri.html"> uri </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c27">Keywords: X</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key423"> x.208 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key424"> x.209 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/asn/asn.html"> asn </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key134"> x.500 </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/ldap/ldap.html"> ldap </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key395"> XGoogleToken </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/sasl/gtoken.html"> SASL::XGoogleToken </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key755"> xml </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/amazon-s3/xsxp.html"> xsxp </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key374"> xor </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/vt_otp.html"> tcl::transform::otp </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key817"> XPath </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key821"> XSLT </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/treeql/treeql.html"> treeql </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c28">Keywords: Y</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key589"> yaml </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/yaml/huddle.html"> huddle </a> &#183; <a href="tcllib/files/modules/yaml/yaml.html"> yaml </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key706"> ydecode </a></td>
<td class="#doctools_idxright" width="65%">





<a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key708"> yEnc </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key707"> yencode </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/base64/yencode.html"> yencode </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="c29">Keywords: Z</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key113"> zero </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_base/nullzero.html"> tcl::chan::nullzero </a> &#183; <a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html"> tcl::chan::zero </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key42"> zip </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/zip/decode.html"> zipfile::decode </a> &#183; <a href="tcllib/files/modules/zip/encode.html"> zipfile::encode </a> &#183; <a href="tcllib/files/modules/zip/mkzip.html"> zipfile::mkzip </a>
</td></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key547"> zlib </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html"> tcl::transform::zlib </a>
</td></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="key198"> zoom </a></td>
<td class="#doctools_idxright" width="65%">
<a href="tcllib/files/modules/map/map_slippy.html"> map::slippy </a> &#183; <a href="tcllib/files/modules/map/map_slippy_cache.html"> map::slippy::cache </a> &#183; <a href="tcllib/files/modules/map/map_slippy_fetcher.html"> map::slippy::fetcher </a>
</td></tr>
</table>
</body></html>

Changes to idoc/www/tcllib/files/apps/dtplite.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>dtplite - Documentation toolbox</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>dtplite - Documentation toolbox</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'dtplite.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004-2013 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- dtplite.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dtplite(n) 1.0.5 tcllib &quot;Documentation toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dtplite - Lightweight DocTools Markup Processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'dtplite.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- dtplite.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
| <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dtplite(n) 1.0.5 tcllib &quot;Documentation toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dtplite - Lightweight DocTools Markup Processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
present).</p></dd>
<dt>(path|handle) <i class="arg">format</i> (in)</dt>
<dd><p>This argument specifies the formatting engine to use when processing
the input, and thus the format of the generated document. See section
<span class="sectref"><a href="#subsection4">FORMATS</a></span> for the possibilities recognized by the application.</p></dd>
<dt>path <i class="arg">inputfile</i> (in)</dt>
<dd><p>This argument specifies the path to the file to process. It has to
exist, must be readable, and written in <i class="term"><a href="../../../index.html#doctools">doctools</a></i> format.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> <b class="const">validate</b> <i class="arg">inputfile</i></a></dt>
<dd><p>This is a simpler form for use case [1]. The &quot;validate&quot; format
generates no output at all, only syntax checks are performed. As such
the specification of an output file or other options is not necessary
and left out.</p></dd>
<dt><a name="3"><b class="cmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [2]. It differs from the form for
use case [1] by having the input documents specified through a
directory instead of a file. The other arguments are identical, except
for <i class="arg">output</i>, which now has to be the path to an existing and
writable directory.</p>
<p>The input documents are all files in <i class="arg">inputdirectory</i> or any of
its subdirectories which were recognized by <b class="cmd">fileutil::fileType</b>
as containing text in <i class="term"><a href="../../../index.html#doctools">doctools</a></i> format.</p></dd>
<dt><a name="4"><b class="cmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> <b class="option">-merge</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [3]. The only difference to the
form for use case [2] is the additional option <b class="option">-merge</b>.</p>
<p>Each such call will merge the generated documents coming from
processing the input documents under <i class="arg">inputdirectory</i> or any of
its subdirectories to the files under <i class="arg">output</i>. In this manner it
is possible to incrementally build the unified documentation for any







|














|







196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
present).</p></dd>
<dt>(path|handle) <i class="arg">format</i> (in)</dt>
<dd><p>This argument specifies the formatting engine to use when processing
the input, and thus the format of the generated document. See section
<span class="sectref"><a href="#subsection4">FORMATS</a></span> for the possibilities recognized by the application.</p></dd>
<dt>path <i class="arg">inputfile</i> (in)</dt>
<dd><p>This argument specifies the path to the file to process. It has to
exist, must be readable, and written in <i class="term"><a href="../../../index.html#key179">doctools</a></i> format.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> <b class="const">validate</b> <i class="arg">inputfile</i></a></dt>
<dd><p>This is a simpler form for use case [1]. The &quot;validate&quot; format
generates no output at all, only syntax checks are performed. As such
the specification of an output file or other options is not necessary
and left out.</p></dd>
<dt><a name="3"><b class="cmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [2]. It differs from the form for
use case [1] by having the input documents specified through a
directory instead of a file. The other arguments are identical, except
for <i class="arg">output</i>, which now has to be the path to an existing and
writable directory.</p>
<p>The input documents are all files in <i class="arg">inputdirectory</i> or any of
its subdirectories which were recognized by <b class="cmd">fileutil::fileType</b>
as containing text in <i class="term"><a href="../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="4"><b class="cmd"><a href="../modules/dtplite/pkg_dtplite.html">dtplite</a></b> <b class="option">-merge</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [3]. The only difference to the
form for use case [2] is the additional option <b class="option">-merge</b>.</p>
<p>Each such call will merge the generated documents coming from
processing the input documents under <i class="arg">inputdirectory</i> or any of
its subdirectories to the files under <i class="arg">output</i>. In this manner it
is possible to incrementally build the unified documentation for any
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/doctools/docidx_intro.html">docidx introduction</a>, <a href="../modules/doctools/doctoc_intro.html">doctoc introduction</a>, <a href="../modules/doctools/doctools_intro.html">doctools introduction</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#html">HTML</a>, <a href="../../../index.html#tmml">TMML</a>, <a href="../../../index.html#conversion">conversion</a>, <a href="../../../index.html#docidx">docidx</a>, <a href="../../../index.html#doctoc">doctoc</a>, <a href="../../../index.html#doctools">doctools</a>, <a href="../../../index.html#manpage">manpage</a>, <a href="../../../index.html#markup">markup</a>, <a href="../../../index.html#nroff">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








416
417
418
419
420
421
422






423
424
425
426
427
428
429
430
431
432
433
434
435
436
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/doctools/docidx_intro.html">docidx introduction</a>, <a href="../modules/doctools/doctoc_intro.html">doctoc introduction</a>, <a href="../modules/doctools/doctools_intro.html">doctools introduction</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key18">HTML</a>, <a href="../../../index.html#key19">TMML</a>, <a href="../../../index.html#key20">conversion</a>, <a href="../../../index.html#key178">docidx</a>, <a href="../../../index.html#key258">doctoc</a>, <a href="../../../index.html#key179">doctools</a>, <a href="../../../index.html#key17">manpage</a>, <a href="../../../index.html#key16">markup</a>, <a href="../../../index.html#key21">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/apps/nns.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>nns - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>nns - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nns.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- nns.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nns(n) 1.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nns - Name service facility, Commandline Client Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nns.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- nns.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
| <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nns(n) 1.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nns - Name service facility, Commandline Client Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
command line client for the nano name service facility provided by the
Tcllib packages <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>, and <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.
Beyond that the application's sources also serve as an example of how
to use the client package <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>. All abilities of a
client are covered, from configuration to registration of names to
searching.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../index.html#dns">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../modules/dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">nns</b> was written with the following two main use cases in
mind.</p>
<ol class="doctools_enumerated">







|







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
command line client for the nano name service facility provided by the
Tcllib packages <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>, and <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.
Beyond that the application's sources also serve as an example of how
to use the client package <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>. All abilities of a
client are covered, from configuration to registration of names to
searching.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../index.html#key599">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../modules/dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">nns</b> was written with the following two main use cases in
mind.</p>
<ol class="doctools_enumerated">
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/nns/nns_client.html">nameserv(n)</a>, <a href="../modules/nns/nns_common.html">nameserv::common(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#application">application</a>, <a href="../../../index.html#client">client</a>, <a href="../../../index.html#name_service">name service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








218
219
220
221
222
223
224






225
226
227
228
229
230
231
232
233
234
235
236
237
238
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/nns/nns_client.html">nameserv(n)</a>, <a href="../modules/nns/nns_common.html">nameserv::common(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key28">application</a>, <a href="../../../index.html#key30">client</a>, <a href="../../../index.html#key29">name service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/apps/nnsd.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>nnsd - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>nnsd - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nnsd.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- nnsd.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nnsd(n) 1.0.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nnsd - Name service facility, Commandline Server Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nnsd.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- nnsd.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
| <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nnsd(n) 1.0.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nnsd - Name service facility, Commandline Server Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<p>Please read <i class="term"><a href="../modules/nns/nns_intro.html">Name service facility, introduction</a></i> first.</p>
<p>The application described by this document, <b class="syscmd"><a href="nns.html">nns</a></b>, is a simple
command line server for the nano name service facility provided by the
Tcllib packages <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>, and <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.
Beyond that the application's sources also serve as an example of how
to use the server package <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../index.html#dns">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../modules/dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">nnsd</b> was written with the following main use case in
mind.</p>
<ol class="doctools_enumerated">







|







141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<p>Please read <i class="term"><a href="../modules/nns/nns_intro.html">Name service facility, introduction</a></i> first.</p>
<p>The application described by this document, <b class="syscmd"><a href="nns.html">nns</a></b>, is a simple
command line server for the nano name service facility provided by the
Tcllib packages <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>, and <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.
Beyond that the application's sources also serve as an example of how
to use the server package <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../index.html#key599">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../modules/dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">nnsd</b> was written with the following main use case in
mind.</p>
<ol class="doctools_enumerated">
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/nns/nns_common.html">nameserv::common(n)</a>, <a href="../modules/nns/nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#application">application</a>, <a href="../../../index.html#name_service">name service</a>, <a href="../../../index.html#server">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








186
187
188
189
190
191
192






193
194
195
196
197
198
199
200
201
202
203
204
205
206
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/nns/nns_common.html">nameserv::common(n)</a>, <a href="../modules/nns/nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key28">application</a>, <a href="../../../index.html#key29">name service</a>, <a href="../../../index.html#key65">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/apps/nnslog.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>nnslog - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>nnslog - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nnslog.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- nnslog.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nnslog(n) 1.0 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nnslog - Name service facility, Commandline Logging Client Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nnslog.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- nnslog.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
| <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nnslog(n) 1.0 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nnslog - Name service facility, Commandline Logging Client Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
simple command line client for the nano name service facility provided
by the Tcllib packages <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>, and <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.</p>
<p>It essentially implements &quot;<b class="syscmd"><a href="nns.html">nns</a></b> search -continuous *&quot;, but
uses a different output formatting. Instead of continuously showing
the current contents of the server in the terminal it simply logs all
received add/remove events to <b class="const">stdout</b>.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../index.html#dns">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../modules/dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">nnslog</b> was written with the following main use case in mind.</p>
<ol class="doctools_enumerated">
<li><p>Monitoring the name service for all changes and logging them in a text







|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
simple command line client for the nano name service facility provided
by the Tcllib packages <b class="package"><a href="../modules/nns/nns_client.html">nameserv</a></b>, and <b class="package"><a href="../modules/nns/nns_server.html">nameserv::server</a></b>.</p>
<p>It essentially implements &quot;<b class="syscmd"><a href="nns.html">nns</a></b> search -continuous *&quot;, but
uses a different output formatting. Instead of continuously showing
the current contents of the server in the terminal it simply logs all
received add/remove events to <b class="const">stdout</b>.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../index.html#key599">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../modules/dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">USE CASES</a></h3>
<p><b class="syscmd">nnslog</b> was written with the following main use case in mind.</p>
<ol class="doctools_enumerated">
<li><p>Monitoring the name service for all changes and logging them in a text
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/nns/nns_client.html">nameserv(n)</a>, <a href="../modules/nns/nns_common.html">nameserv::common(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#application">application</a>, <a href="../../../index.html#client">client</a>, <a href="../../../index.html#name_service">name service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








189
190
191
192
193
194
195






196
197
198
199
200
201
202
203
204
205
206
207
208
209
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/nns/nns_client.html">nameserv(n)</a>, <a href="../modules/nns/nns_common.html">nameserv::common(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key28">application</a>, <a href="../../../index.html#key30">client</a>, <a href="../../../index.html#key29">name service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/apps/page.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>page - Development Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>page - Development Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'page.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- page.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page(n) 1.0 tcllib &quot;Development Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page - Parser Generator</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'page.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- page.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
| <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page(n) 1.0 tcllib &quot;Development Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page - Parser Generator</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
</dl></dd>
<dt><b class="option">-r</b> <i class="arg">name</i></dt>
<dd><p>Readers. The name of the package for the plugin <i class="arg">name</i> is
&quot;page::reader::<i class="arg">name</i>&quot;.</p>
<p>We have five predefined plugins:</p>
<dl class="doctools_definitions">
<dt><em>peg</em></dt>
<dd><p>Interprets the input as a parsing expression grammar (<i class="term"><a href="../../../index.html#peg">PEG</a></i>) and
generates a tree representation for it. Both the syntax of PEGs and
the structure of the tree representation are explained in their own
manpages.</p></dd>
<dt><em>hb</em></dt>
<dd><p>Interprets the input as Tcl code as generated by the writer plugin
<em>hb</em> and generates its tree representation.</p></dd>
<dt><em>ser</em></dt>
<dd><p>Interprets the input as the serialization of a PEG, as generated by
the writer plugin <em>ser</em>, using the package
<b class="package"><a href="../modules/grammar_peg/peg.html">grammar::peg</a></b>.</p></dd>
<dt><em>lemon</em></dt>
<dd><p>Interprets the input as a grammar specification as understood by
Richard Hipp's <i class="term"><a href="../../../index.html#lemon">LEMON</a></i> parser generator and generates a tree
representation for it. Both the input syntax and the structure of the
tree representation are explained in their own manpages.</p></dd>
<dt><em>treeser</em></dt>
<dd><p>Interprets the input as the serialization of a
<b class="package"><a href="../modules/struct/struct_tree.html">struct::tree</a></b>. It is validated as such,
but nothing else. It is <em>not</em> assumed to
be the tree representation of a grammar.</p></dd>







|












|







335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
</dl></dd>
<dt><b class="option">-r</b> <i class="arg">name</i></dt>
<dd><p>Readers. The name of the package for the plugin <i class="arg">name</i> is
&quot;page::reader::<i class="arg">name</i>&quot;.</p>
<p>We have five predefined plugins:</p>
<dl class="doctools_definitions">
<dt><em>peg</em></dt>
<dd><p>Interprets the input as a parsing expression grammar (<i class="term"><a href="../../../index.html#key6">PEG</a></i>) and
generates a tree representation for it. Both the syntax of PEGs and
the structure of the tree representation are explained in their own
manpages.</p></dd>
<dt><em>hb</em></dt>
<dd><p>Interprets the input as Tcl code as generated by the writer plugin
<em>hb</em> and generates its tree representation.</p></dd>
<dt><em>ser</em></dt>
<dd><p>Interprets the input as the serialization of a PEG, as generated by
the writer plugin <em>ser</em>, using the package
<b class="package"><a href="../modules/grammar_peg/peg.html">grammar::peg</a></b>.</p></dd>
<dt><em>lemon</em></dt>
<dd><p>Interprets the input as a grammar specification as understood by
Richard Hipp's <i class="term"><a href="../../../index.html#key193">LEMON</a></i> parser generator and generates a tree
representation for it. Both the input syntax and the structure of the
tree representation are explained in their own manpages.</p></dd>
<dt><em>treeser</em></dt>
<dd><p>Interprets the input as the serialization of a
<b class="package"><a href="../modules/struct/struct_tree.html">struct::tree</a></b>. It is validated as such,
but nothing else. It is <em>not</em> assumed to
be the tree representation of a grammar.</p></dd>
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<dd><p>Generates nothing, and ignores the incoming data structure.</p></dd>
<dt><em>tree</em></dt>
<dd><p>Assumes that the incoming data structure is a <b class="package"><a href="../modules/struct/struct_tree.html">struct::tree</a></b>
and generates an indented textual representation of all nodes, their
parental relationships, and their attribute information.</p></dd>
<dt><em>peg</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#peg">PEG</a></i> or other other grammar and writes it out as a PEG. The
result is nicely formatted and partially simplified (strings as
sequences of characters). A pretty printer in essence, but can also be
used to obtain a canonical representation of the input grammar.</p></dd>
<dt><em>tpc</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#peg">PEG</a></i> or other other grammar and writes out Tcl code defining a
package which defines a <b class="package"><a href="../modules/grammar_peg/peg.html">grammar::peg</a></b> object containing the
grammar when it is loaded into an interpreter.</p></dd>
<dt><em>hb</em></dt>
<dd><p>This is like the writer plugin <em>tpc</em>, but it writes only the
statements which define stat expression and grammar rules. The code
making the result a package is left out.</p></dd>
<dt><em>ser</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#peg">PEG</a></i> or other other grammar, transforms it internally into a
<b class="package"><a href="../modules/grammar_peg/peg.html">grammar::peg</a></b> object and writes out its serialization.</p></dd>
<dt><em>me</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#peg">PEG</a></i> or other other grammar and writes out Tcl code defining a
package which implements a memoizing recursive descent parser based on
the match engine (ME) provided by the package <b class="package">grammar::mengine</b>.</p></dd>
</dl></dd>
<dt><b class="option">-t</b> <i class="arg">name</i></dt>
<dd><p>Transformers. The name of the package for the plugin <i class="arg">name</i> is
&quot;page::transform::<i class="arg">name</i>&quot;.</p>
<p>We have two predefined plugins:</p>
<dl class="doctools_definitions">
<dt><em>reach</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#peg">PEG</a></i> or other other grammar. It determines which nonterminal
symbols and rules are reachable from start-symbol/expression. All
nonterminal symbols which were not reached are removed.</p></dd>
<dt><em>use</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#peg">PEG</a></i> or other other grammar. It determines which nonterminal
symbols and rules are able to generate a <em>finite</em> sequences of
terminal symbols (in the sense for a Context Free Grammar). All
nonterminal symbols which were not deemed useful in this sense are
removed.</p></dd>
</dl></dd>
</dl>
</div>







|





|








|



|










|




|







374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
<dd><p>Generates nothing, and ignores the incoming data structure.</p></dd>
<dt><em>tree</em></dt>
<dd><p>Assumes that the incoming data structure is a <b class="package"><a href="../modules/struct/struct_tree.html">struct::tree</a></b>
and generates an indented textual representation of all nodes, their
parental relationships, and their attribute information.</p></dd>
<dt><em>peg</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar and writes it out as a PEG. The
result is nicely formatted and partially simplified (strings as
sequences of characters). A pretty printer in essence, but can also be
used to obtain a canonical representation of the input grammar.</p></dd>
<dt><em>tpc</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar and writes out Tcl code defining a
package which defines a <b class="package"><a href="../modules/grammar_peg/peg.html">grammar::peg</a></b> object containing the
grammar when it is loaded into an interpreter.</p></dd>
<dt><em>hb</em></dt>
<dd><p>This is like the writer plugin <em>tpc</em>, but it writes only the
statements which define stat expression and grammar rules. The code
making the result a package is left out.</p></dd>
<dt><em>ser</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar, transforms it internally into a
<b class="package"><a href="../modules/grammar_peg/peg.html">grammar::peg</a></b> object and writes out its serialization.</p></dd>
<dt><em>me</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar and writes out Tcl code defining a
package which implements a memoizing recursive descent parser based on
the match engine (ME) provided by the package <b class="package">grammar::mengine</b>.</p></dd>
</dl></dd>
<dt><b class="option">-t</b> <i class="arg">name</i></dt>
<dd><p>Transformers. The name of the package for the plugin <i class="arg">name</i> is
&quot;page::transform::<i class="arg">name</i>&quot;.</p>
<p>We have two predefined plugins:</p>
<dl class="doctools_definitions">
<dt><em>reach</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar. It determines which nonterminal
symbols and rules are reachable from start-symbol/expression. All
nonterminal symbols which were not reached are removed.</p></dd>
<dt><em>use</em></dt>
<dd><p>Assumes that the incoming data structure is a tree representation of a
<i class="term"><a href="../../../index.html#key6">PEG</a></i> or other other grammar. It determines which nonterminal
symbols and rules are able to generate a <em>finite</em> sequences of
terminal symbols (in the sense for a Context Free Grammar). All
nonterminal symbols which were not deemed useful in this sense are
removed.</p></dd>
</dl></dd>
</dl>
</div>
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>page::pluginmgr</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#parser_generator">parser generator</a>, <a href="../../../index.html#text_processing">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








456
457
458
459
460
461
462






463
464
465
466
467
468
469
470
471
472
473
474
475
476
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>page::pluginmgr</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key189">parser generator</a>, <a href="../../../index.html#key192">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/apps/pt.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt - Parser Tools Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
| <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt - Parser Tools Application</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="../modules/pt/pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This document describes <b class="cmd">pt</b>, the main application of the module,
a <i class="term"><a href="../../../index.html#parser_generator">parser generator</a></i>. Its intended audience are people who wish
to create a parser for some language of theirs. Should you wish to
modify the application instead, please see the section about the
application's <span class="sectref"><a href="#section11">Internals</a></span> for the basic references.</p>
<p>It resides in the User Application Layer of Parser Tools.</p>
<p><img alt="arch_user_app" src="../../../image/arch_user_app.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Command Line</a></h2>







|







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="../modules/pt/pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This document describes <b class="cmd">pt</b>, the main application of the module,
a <i class="term"><a href="../../../index.html#key189">parser generator</a></i>. Its intended audience are people who wish
to create a parser for some language of theirs. Should you wish to
modify the application instead, please see the section about the
application's <span class="sectref"><a href="#section11">Internals</a></span> for the basic references.</p>
<p>It resides in the User Application Layer of Parser Tools.</p>
<p><img alt="arch_user_app" src="../../../image/arch_user_app.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Command Line</a></h2>
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
this allows them to be used in pure-Tcl environments, or in
environments which allow only a limited set of binary packages. In the
latter case it will be advantageous to lobby for the inclusion of the
C-based runtime support (notes below) into the environment to reduce
the impact of Tcl's on the speed of these parsers.</p>
<p>The relevant formats are <b class="const">snit</b> and <b class="const">oo</b>. Both place their
result into a Tcl package containing a <b class="cmd">snit::type</b>, or TclOO
<b class="cmd"><a href="../../../index.html#class">class</a></b> respectively.</p>
<p>Of the supporting runtime, which is the package <b class="package"><a href="../modules/pt/pt_rdengine.html">pt::rde</a></b>, the
user has to know nothing but that it does exist and that the parsers
are dependent on it. Knowledge of the API exported by the runtime for
the parsers' consumption is <em>not</em> required by the parsers' users.</p></dd>
<dt><b class="const">Interpreted parsing implemented in Tcl</b></dt>
<dd><p>The last category, grammar interpretation. This means that an
interpreter for parsing expression grammars takes the description of







|







219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
this allows them to be used in pure-Tcl environments, or in
environments which allow only a limited set of binary packages. In the
latter case it will be advantageous to lobby for the inclusion of the
C-based runtime support (notes below) into the environment to reduce
the impact of Tcl's on the speed of these parsers.</p>
<p>The relevant formats are <b class="const">snit</b> and <b class="const">oo</b>. Both place their
result into a Tcl package containing a <b class="cmd">snit::type</b>, or TclOO
<b class="cmd"><a href="../../../index.html#key240">class</a></b> respectively.</p>
<p>Of the supporting runtime, which is the package <b class="package"><a href="../modules/pt/pt_rdengine.html">pt::rde</a></b>, the
user has to know nothing but that it does exist and that the parsers
are dependent on it. Knowledge of the API exported by the runtime for
the parsers' consumption is <em>not</em> required by the parsers' users.</p></dd>
<dt><b class="const">Interpreted parsing implemented in Tcl</b></dt>
<dd><p>The last category, grammar interpretation. This means that an
interpreter for parsing expression grammars takes the description of
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
<dt><b class="option">-version</b> string</dt>
<dd><p>The value of this option is the version of the package to generate.
The default value is <b class="const">1</b>.</p></dd>
</dl>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">TclOO Parser</a></h2>
<p>The <b class="const">oo</b> format is executable code, a parser for the grammar. It
is a Tcl package holding a <b class="package"><a href="../../../index.html#tcloo">TclOO</a></b> class, whose instances are
parsers for the input grammar.</p>
<p>This result-format supports the following options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>







|







492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
<dt><b class="option">-version</b> string</dt>
<dd><p>The value of this option is the version of the package to generate.
The default value is <b class="const">1</b>.</p></dd>
</dl>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">TclOO Parser</a></h2>
<p>The <b class="const">oo</b> format is executable code, a parser for the grammar. It
is a Tcl package holding a <b class="package"><a href="../../../index.html#key757">TclOO</a></b> class, whose instances are
parsers for the input grammar.</p>
<p>This result-format supports the following options:</p>
<dl class="doctools_options">
<dt><b class="option">-file</b> string</dt>
<dd><p>The value of this option is the name of the file or other entity from
which the grammar came, for which the command is run. The default
value is <b class="const">unknown</b>.</p></dd>
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
<div id="section12" class="doctools_section"><h2><a name="section12">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#ebnf">EBNF</a>, <a href="../../../index.html#ll_k_">LL(k)</a>, <a href="../../../index.html#peg">PEG</a>, <a href="../../../index.html#tdpl">TDPL</a>, <a href="../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../index.html#expression">expression</a>, <a href="../../../index.html#grammar">grammar</a>, <a href="../../../index.html#matching">matching</a>, <a href="../../../index.html#parser">parser</a>, <a href="../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../index.html#state">state</a>, <a href="../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








672
673
674
675
676
677
678






679
680
681
682
683
684
685
686
687
688
689
<div id="section12" class="doctools_section"><h2><a name="section12">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key3">EBNF</a>, <a href="../../../index.html#key15">LL(k)</a>, <a href="../../../index.html#key6">PEG</a>, <a href="../../../index.html#key7">TDPL</a>, <a href="../../../index.html#key4">context-free languages</a>, <a href="../../../index.html#key0">expression</a>, <a href="../../../index.html#key11">grammar</a>, <a href="../../../index.html#key5">matching</a>, <a href="../../../index.html#key9">parser</a>, <a href="../../../index.html#key8">parsing expression</a>, <a href="../../../index.html#key14">parsing expression grammar</a>, <a href="../../../index.html#key1">push down automaton</a>, <a href="../../../index.html#key10">recursive descent</a>, <a href="../../../index.html#key2">state</a>, <a href="../../../index.html#key13">top-down parsing languages</a>, <a href="../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/apps/tcldocstrip.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcldocstrip - Textprocessing toolbox</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcldocstrip - Textprocessing toolbox</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcldocstrip.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcldocstrip.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcldocstrip(n) 1.0 tcllib &quot;Textprocessing toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcldocstrip - Tcl-based Docstrip Processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcldocstrip.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcldocstrip.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
| <a href="../../../toc.html">Main Table Of Contents</a>
| <a href="../../toc.html">Table Of Contents</a>
| <a href="../../../index.html">Keyword Index</a>
| <a href="../../../toc0.html">Categories</a>
| <a href="../../../toc1.html">Modules</a>
| <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcldocstrip(n) 1.0 tcllib &quot;Textprocessing toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcldocstrip - Tcl-based Docstrip Processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
be the path to a file or directory, or <b class="const">-</b>.
The last value causes the application to write the generated
documented to <b class="const">stdout</b>.</p>
<p>If the <i class="arg">output</i> does not exist then [file dirname $output]
has to exist and must be a writable directory.</p></dd>
<dt>path <i class="arg">inputfile</i> (in)</dt>
<dd><p>This argument specifies the path to the file to process. It has to
exist, must be readable, and written in <i class="term"><a href="../../../index.html#docstrip">docstrip</a></i> format.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">tcldocstrip</b> <span class="opt">?options?</span> <i class="arg">output</i> (<span class="opt">?options?</span> <i class="arg">input</i> <i class="arg">guards</i>)...</a></dt>
<dd><p>This is the form for use case [2]. It differs from the form for
use case [1] by the possibility of having options before the
output file, which apply in general, and specifying more than one
inputfile, each with its own set of input specific options and guards.</p>
<p>It extracts data from the various <i class="arg">input</i> files, according to the







|







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
be the path to a file or directory, or <b class="const">-</b>.
The last value causes the application to write the generated
documented to <b class="const">stdout</b>.</p>
<p>If the <i class="arg">output</i> does not exist then [file dirname $output]
has to exist and must be a writable directory.</p></dd>
<dt>path <i class="arg">inputfile</i> (in)</dt>
<dd><p>This argument specifies the path to the file to process. It has to
exist, must be readable, and written in <i class="term"><a href="../../../index.html#key435">docstrip</a></i> format.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">tcldocstrip</b> <span class="opt">?options?</span> <i class="arg">output</i> (<span class="opt">?options?</span> <i class="arg">input</i> <i class="arg">guards</i>)...</a></dt>
<dd><p>This is the form for use case [2]. It differs from the form for
use case [1] by the possibility of having options before the
output file, which apply in general, and specifying more than one
inputfile, each with its own set of input specific options and guards.</p>
<p>It extracts data from the various <i class="arg">input</i> files, according to the
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>docstrip</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/docstrip/docstrip.html">docstrip</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#_dtx">.dtx</a>, <a href="../../../index.html#latex">LaTeX</a>, <a href="../../../index.html#conversion">conversion</a>, <a href="../../../index.html#docstrip">docstrip</a>, <a href="../../../index.html#documentation">documentation</a>, <a href="../../../index.html#literate_programming">literate programming</a>, <a href="../../../index.html#markup">markup</a>, <a href="../../../index.html#source">source</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








259
260
261
262
263
264
265






266
267
268
269
270
271
272
273
274
275
276
277
278
279
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>docstrip</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../modules/docstrip/docstrip.html">docstrip</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../index.html#key439">.dtx</a>, <a href="../../../index.html#key438">LaTeX</a>, <a href="../../../index.html#key20">conversion</a>, <a href="../../../index.html#key435">docstrip</a>, <a href="../../../index.html#key185">documentation</a>, <a href="../../../index.html#key437">literate programming</a>, <a href="../../../index.html#key16">markup</a>, <a href="../../../index.html#key436">source</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/devdoc/tcl_community_communication.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<!DOCTYPE html><html><head>
<title>tcl_community_communication - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcl_community_communication.man' by tcllib/doctools with format 'html'
   -->
<!-- tcl_community_communication.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl_community_communication(n) 1 tcllib &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl_community_communication - Tcl Community - Kind Communication</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Signatories</a></li>
<li class="doctools_section"><a href="#section3">Authors</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The Tcl Community encourages contributions from anyone who wishes to
advance the development of:</p>
<ul class="doctools_itemized">
<li><p>The Tcl Language</p></li>
<li><p>Tcl derived languages</p></li>
<li><p>Tcl related libraries</p></li>
<li><p>Tcl extensions</p></li>
<li><p>External Projects that Integrate Tcl</p></li>
</ul>
<p>We welcome those contributions from anyone. We are blind to
gender, race, religion, cultural background, cybernetic nature, and
any other demographic characteristics, as well as personal political
views.</p>
<p>A community lives and dies by communications. And occasionally
our communications are peppered with patterns that are harsh,
unfriendly, unwelcoming and/or otherwise unkind. As a volunteer
community, we need all of the help we can get. Therefore, we ask all
contributors to make a conscious effort, in Tcl Community discussions,
to communicate in ways that are welcoming. Ways that are
friendly. Ways that are, in a word: kind.</p>
<p>These guidelines suggest specific ways to accomplish that goal.</p>
<p>Please note: for the balance of this document any reference to
&quot;People&quot;, &quot;Persons&quot;, &quot;anybody&quot; or &quot;somebody&quot; can refer to any sentient
being, not merely corporeal members of the species Homo Sapien.</p>
<dl class="doctools_definitions">
<dt>We are a Sanctuary not a Clubhouse</dt>
<dd><p>The Tcl Community is a collective of amateurs and professionals who
code, test, and use tools. Our community is open to all. There is no
velvet rope. There is no bouncer at the door. There are no secret
handshakes. Any sentient being who enters our midst is welcome. If
someone is ever asked to leave, it is only because they are being
disruptive to the functioning of the community.</p></dd>
<dt>We Merit Ideas, Not People</dt>
<dd><p>A good idea can come from anyone, regardless of how little time they
have been with us. A bad idea can come from anyone, regardless of how
much time or how little time they have been with us. We judge a
concept by how it stands up to scrutiny of logic, implementation, and
regression testing. We don’t judge ideas based on who had the idea
first, who agrees with the idea, or who disagrees with it.</p></dd>
<dt>Treat Everyone with Respect</dt>
<dd><p>Everyone is deserving of respect and courtesy at all times.</p></dd>
<dt>Refer to people by the names they use.</dt>
<dd><p>If grammar requires you to state a gender for a person, honor their
preferences about their gender identity. If you are unsure as to the
gender of an individual, ask. If someone had to guess about your
gender and got it wrong, please correct them and do not take it
personally.</p></dd>
<dt>Do not take a harsh tone towards other participants.</dt>
<dd><p>Do not make personal attacks against anyone (participant or not.)</p>
<p>Criticize statements and actions, never people.</p></dd>
<dt>Don’t Take Things Personally</dt>
<dd><p>When in doubt, assume the best in people. A criticism of your
statements is not a personal attack on you.</p></dd>
<dt>Persons, not People</dt>
<dd><p>Stereotypes are an unhelpful tool on many accounts. They are generally
oversimplified. They are usually flat out wrong. And even if &quot;right&quot;
they are of absolutely no utility in determining the capabilities,
motivations, or fitness of an individual.</p>
<p>Don’t use them in Tcl Community communications.</p></dd>
<dt>Mistakes Happen</dt>
<dd><p>The human condition is a series of trials and errors. Progress is when
we get one more trial than error. Being wrong or making a mistake is
the default state of humanity. Accept the errors of your fellow
sentient beings, and be aware that you are also fallible.</p></dd>
<dt>Keep it Real</dt>
<dd><p>Please respond to what people actually say. We are all amazing
individuals, but none among us are mind readers. If you find yourself
responding to what you imagine someone is thinking, odds are you are
going to be wrong.</p>
<p>If you must criticize someone, stick to things they have
actually done. Never criticize for something you speculate they have
done. Or imagine they have done. Or something someone who shares some
attribute with them has done in the past.</p>
<p>Keep discussions about any non-Tcl subjects to what can be
stated factually and without emotion or judgement.</p></dd>
<dt>When Trouble Arises, Don’t Escalate</dt>
<dd><p>If you feel you are being personally attacked or offended, take the
high road. Punching back in a public forum will only makes things
worse. Address the matter in a private correspondence. Be
polite. Express your feelings, but note that you are expressing your
feelings. When writing, look for a way to calm matters down. And when
in doubt, sleep on your letter before pressing send. And when not in
doubt, sleep on it for another day after that.</p>
<p>If you are a spectator to a fight in progress, politely request
the two parties take the matter to a more private forum.</p></dd>
<dt>Always get the Last Word: I’m Sorry</dt>
<dd><p>If an personal argument does arise, be the first to apologize. An
apology does not concede a logical point. It merely acknowledges that
at some point the discussion left either logic, community decency, or
both. Return to the topic when cooler heads can prevail.</p></dd>
<dt>Nobody is Keeping Score</dt>
<dd><p>There is no prize for being right. There is no cost for being wrong. A
hard sell is not going to advance your idea along any more than a
logical argument. You aren’t running for office. This isn’t debate
club. If you find yourself continuing a discussion beyond where a
topic can be logically discussed, stop.</p></dd>
<dt>No Evangelizing</dt>
<dd><p>The Tcl Community is not the place to promote your chosen operating
system, political outlook, religion, marketing scheme, or economic
model. Period.</p>
<p>(And if you do bring it up, be prepared to have your chosen
topic discussed logically. And odds are, not favorably.)</p></dd>
<dt>Respect the Community</dt>
<dd><p>If the Community has come to a decision on a course of action, please
stop arguing.</p>
<p>If someone complains about how you are expressing your ideas,
listen.</p>
<p>If your words are hurting people, stop. There is no amount of
being &quot;right&quot; that makes up for someone leaving our midst because they
felt insulted, threatened, or ignored.</p></dd>
</dl>
<p>By following these guidelines, we will build our community, encourage
more contribution to our projects, and our discussions will be
friendlier and reach conclusions more easily.</p>
<p>Thank You.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Signatories</a></h2>
<ul class="doctools_itemized">
<li><p>Sean &quot;the Hypnotoad&quot; Woods</p></li>
<li><p>Andreas Kupries</p></li>
</ul>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Authors</a></h2>
<dl class="doctools_definitions">
<dt>Primary</dt>
<dd><p>Sean &quot;the Hypnotoad&quot; Woods</p></dd>
<dt>Light editing</dt>
<dd><p>Andreas Kupries</p></dd>
</dl>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































Deleted idoc/www/tcllib/files/devdoc/tcllib_devguide.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
<!DOCTYPE html><html><head>
<title>tcllib_devguide - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_devguide.man' by tcllib/doctools with format 'html'
   -->
<!-- tcllib_devguide.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcllib_devguide(n) 1 tcllib &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcllib_devguide - Tcllib - The Developer's Guide</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commitments</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Contributor</a></li>
<li class="doctools_subsection"><a href="#subsection2">Maintainer</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Branching and Workflow</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Package Dependencies</a></li>
<li class="doctools_subsection"><a href="#subsection4">Trunk</a></li>
<li class="doctools_subsection"><a href="#subsection5">Branches</a></li>
<li class="doctools_subsection"><a href="#subsection6">Working with Branches</a></li>
<li class="doctools_subsection"><a href="#subsection7">Version numbers</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Structural Overview</a>
<ul>
<li class="doctools_subsection"><a href="#subsection8">Main Directories</a></li>
<li class="doctools_subsection"><a href="#subsection9">More Directories</a></li>
<li class="doctools_subsection"><a href="#subsection10">Top Files</a></li>
<li class="doctools_subsection"><a href="#subsection11">File Types</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section5">Testsuite Tooling</a>
<ul>
<li class="doctools_subsection"><a href="#subsection12">Invoke the testsuites of a specific module</a></li>
<li class="doctools_subsection"><a href="#subsection13">Invoke the testsuites of all modules</a></li>
<li class="doctools_subsection"><a href="#subsection14">Detailed Test Logs</a></li>
<li class="doctools_subsection"><a href="#subsection15">Shell Selection</a></li>
<li class="doctools_subsection"><a href="#subsection16">Help</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">Documentation Tooling</a>
<ul>
<li class="doctools_subsection"><a href="#subsection17">Generate documentation for a specific module</a></li>
<li class="doctools_subsection"><a href="#subsection18">Generate documentation for all modules</a></li>
<li class="doctools_subsection"><a href="#subsection19">Available output formats, help</a></li>
<li class="doctools_subsection"><a href="#subsection20">Validation without output</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section7">Notes On Writing A Testsuite</a></li>
<li class="doctools_section"><a href="#section8">Installation Tooling</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../index.html#module">Module</a></b> <i class="arg">name</i> <i class="arg">code-action</i> <i class="arg">doc-action</i> <i class="arg">example-action</i></a></li>
<li><a href="#2"><b class="cmd"><a href="../../../index.html#application">Application</a></b> <i class="arg">name</i></a></li>
<li><a href="#3"><b class="cmd">Exclude</b> <i class="arg">name</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Welcome to Tcllib, the Tcl Standard Library. Note that Tcllib is not a
package itself. It is a collection of (semi-independent) <i class="term"><a href="../../../index.html#tcl">Tcl</a></i>
packages that provide utility functions useful to a large collection
of Tcl programmers.</p>
<p>This document is a guide for developers working on Tcllib,
i.e. maintainers fixing bugs, extending the collection's
functionality, etc.</p>
<p>Please read</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="tcllib_sources.html">Tcllib - How To Get The Sources</a></i> and</p></li>
<li><p><i class="term"><a href="tcllib_installer.html">Tcllib - The Installer's Guide</a></i></p></li>
</ol>
<p>first, if that was not done already.</p>
<p>Here we assume that the sources are already available in a
directory of your choice, and that you not only know how to build and
install them, but also have all the necessary requisites to actually
do so. The guide to the sources in particular also explains which
source code management system is used, where to find it, how to set it
up, etc.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commitments</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Contributor</a></h3>
<p>As a contributor to Tcllib you are committing yourself to:</p>
<ol class="doctools_enumerated">
<li><p>keep the guidelines written down in
       <i class="term"><a href="tcl_community_communication.html">Tcl Community - Kind Communication</a></i> in your mind.
       The main point to take away from there is
       <em>to be kind to each other</em>.</p></li>
<li><p>Your contributions getting distributed under a BSD/MIT license.
       For the details see <i class="term"><a href="tcllib_license.html">Tcllib - License</a></i></p></li>
</ol>
<p>Contributions are made by entering tickets into our tracker, providing
patches, bundles or branches of code for inclusion, or posting to the
Tcllib related mailing lists.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Maintainer</a></h3>
<p>When contributing one or more packages for full inclusion into Tcllib
you are committing yourself to</p>
<ol class="doctools_enumerated">
<li><p>Keep the guidelines written down in
       <i class="term"><a href="tcl_community_communication.html">Tcl Community - Kind Communication</a></i>
       (as any contributor) in your mind. The main point to take away
       from there is <em>to be kind to each other</em>.</p></li>
<li><p>Your packages getting distributed under a BSD/MIT license.  For
       the details see <i class="term"><a href="tcllib_license.html">Tcllib - License</a></i></p></li>
<li><p>Maintenance of the new packages for a period of two years under
       the following rules, and responsibilities:</p>
<ol class="doctools_enumerated">
       
<li><p>A maintainer may step down after the mandatory period as
       	      they see fit.</p></li>
<li><p>A maintainer may step down before the end of the
      	      mandatory period, under the condition that a replacement
      	      maintainer is immediately available and has agreed to
      	      serve the remainder of the period, plus their own
      	      mandatory period (see below).</p></li>
<li><p>When stepping down without a replacement maintainer
      	      taking over the relevant packages have to be flagged as
      	      <b class="const">unmaintained</b>.</p></li>
<li><p>When a replacement mantainer is brought in for a package
      	      it is (kept) marked as <b class="const">maintained</b> (again).</p>
<p>A replacement maintainer is bound by the same rules as
	      the original maintainer, except that the mandatory
	      period of maintenance is shortened to one year.</p></li>
<li><p>For any <b class="const">unmaintained</b> package a contributor
       	      interested in becoming its maintainer can become so by
       	      flagging them as <b class="const">maintained</b> with their name and
       	      contact information, committing themselves to the rules
       	      of a replacement maintainer (see previous point).</p></li>
<li><p>For any already <b class="const">maintained</b> package a contributor
       	      interested in becoming a co-maintainer can become so
       	      with the agreement of the existing maintainer(s),
       	      committing themselves to the rules of a replacement
       	      maintainer (see two points previous).</p></li>
</ol>
<p>The responsibilities as a maintainer include:</p>
<ol class="doctools_enumerated">
       
<li><p>Watching Tcllib's ticket tracker for bugs, bug fixes,
       	      and feature requests related to the new packages.</p></li>
<li><p>Reviewing the aforementioned tickets, rejecting or
       	      applying them</p></li>
<li><p>Coordination and discussion with ticket submitter during
       	      the development and/or application of bug fixes.</p></li>
</ol>
</li>
<li><p>Follow the <span class="sectref"><a href="#section3">Branching and Workflow</a></span> of this guide.</p></li>
</ol>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Branching and Workflow</a></h2>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Package Dependencies</a></h3>
<p>Regarding packages and dependencies between them Tcllib occupies a
middle position between two extremes:</p>
<ol class="doctools_enumerated">
<li><p>On one side a strongly interdependent set of packages, usually
       by a single author, for a single project. Looking at my
       (Andreas Kupries) own work examples of such are
       <a href="https://core.tcl.tk/akupries/marpa/index">Marpa</a>,
       <a href="https://core.tcl.tk/akupries/crimp/index">CRIMP</a>,
       <a href="https://core.tcl.tk/akupries/kinetcl/index">Kinetcl</a>, etc.</p>
<p>For every change the author of the project handles all the
       modifications cascading from any incompatibilities it
       introduced to the system.</p></li>
<li><p>On the other side, the world of semi-independent projects by
       many different authors where authors know what packages their
       own creations depend on, yet usually do not know who else
       depends on them.</p>
<p>The best thing an author making an (incompatible) change to
       their project can do is to for one announce such changes in
       some way, and for two use versioning to distinguish the code
       before and after the change.</p>
<p>The world is then responsible for adapting, be it by updating
       their own projects to the new version, or by sticking to the
       old.</p></li>
</ol>
<p>As mentioned already, Tcllib lives in the middle of that.</p>
<p>While we as maintainers cannot be aware of all users of
       Tcllib's packages, and thus have to rely on the mechanisms
       touched on in point 2 above for that, the dependencies between
       the packages contained in Tcllib are a different matter.</p>
<p>As we are collectively responsible for the usability of Tcllib
       in toto to the outside world, it behooves us to be individually
       mindful even of Tcllib packages we are not directly
       maintaining, when they depend on packages under our
       maintainership.
       This may be as simple as coordinating with the maintainers of
       the affected packages.
       It may also require us to choose how to adapt affected packages
       which do not have maintainers, i.e. modify them to use our
       changed package properly, or modify them to properly depend on
       the unchanged version of our package.</p>
<p>Note that the above is not only a chore but an opportunity as
       well.
       Additional insight can be had by forcing ourselves to look at
       our package and the planned change(s) from an outside
       perspective, to consider the ramifications of our actions on
       others in general, and on dependent packages in particular.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Trunk</a></h3>
<p>The management and use of branches is an important part of working
with a <i class="term">Distributed Version Control System</i> (<i class="term">DVCS</i>) like
<a href="https://www.fossil-scm.org/">fossil</a>.</p>
<p>For Tcllib the main branch of the collection is
       <i class="term">trunk</i>. In <i class="term"><a href="../../../index.html#git">git</a></i> this branch would be called
       <i class="term">master</i>, and this is exactly the case in the
       <a href="https://github.com/tcltk/tcllib/">github mirror</a> of
       Tcllib.</p>
<p>To properly support debugging <em>each commit</em> on this
       branch <em>has to pass the entire testsuite</em> of the
       collection. Using bisection to determine when an issue appeared
       is an example of an action made easier by this constraint.</p>
<p>This is part of our collective responsibility for the usability
       of Tcllib in toto to the outside world.
       As <i class="term"><a href="../../../index.html#fossil">fossil</a></i> has no mechanism to enforce this condition
       this is handled on the honor system for developers and maintainers.</p>
<p>To make the task easier Tcllib comes with a tool
       (&quot;<b class="file">sak.tcl</b>&quot;) providing a number of commands in
       support. These commands are explained in the following sections
       of this guide.</p>
<p>While it is possible and allowed to commit directly to trunk
       remember the above constraint regarding the testsuite, and the
       coming notes about other possible issues with a commit.</p>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Branches</a></h3>
<p>Given the constraints placed on the <i class="term">trunk</i> branch of the
repository it is (strongly) recommended to perform any development
going beyond trivial changes on a non-trunk branch.</p>
<p>Outside of the trunk developers are allowed to commit
       intermediate broken states of their work.
       Only at the end of a development cycle, when the relevant
       branch is considered ready for merging, will it be necessary to
       perform full the set of validations ensuring that the merge to
       come will create a good commit on trunk.</p>
<p>Note that while a review from a second developer is not a
       required condition for merging a branch it is recommended to
       seek out such an independent opinion as a means of
       cross-checking the work.</p>
<p>It also recommended to give any new branch a name which aids in
       determining additional details about it. Examples of good
       things to stick into a branch name would be</p>
<ul class="doctools_itemized">
<li><p>Developer (nick)name</p></li>
<li><p>Ticket hash/reference</p></li>
<li><p>One or two keywords applicable to the work</p></li>
<li><p>...</p></li>
</ul>
<p>Further, while most development branches are likely quite
       short-lived, no prohibitions exist against making longer-lived
       branches.
       Creators should however be mindful that the longer such a
       branch exists without merges the more divergent they will tend
       to be, with an associated increase in the effort which will
       have to be spent on either merging from and merging to trunk.</p>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Working with Branches</a></h3>
<p>In the hope of engendering good work practices now a few example
operations which will come up with branches, and their associated
fossil command (sequences).</p>
<dl class="doctools_definitions">
<dt><em>Awareness</em></dt>
<dd><p>When developing we have to keep ourselves aware of the context of our
work. On what branch are we ? What files have we changed ? What new
files are not yet known to the repository ? What has happened remotely
since we used our checkout ?
The answers to these questions become especially important when using
a long-lived checkout and coming back to it after some time away.</p>
<p>Commands to answer questions like the above are:</p>
<dl class="doctools_definitions">
<dt><b class="cmd">fossil pull</b></dt>
<dd><p>Get all changes done on the remote since the last pull or sync
       from it. This has to be done first, before any of the commands
       below.</p>
<p>Even if the commit in our checkout refers to the branch we want
       right now control operations committed to the remote may have
       changed that from underneath us.</p></dd>
<dt><b class="cmd">fossil info | grep tags</b></dt>
<dd></dd>
<dt><b class="cmd">fossil branch list | grep '\*'</b></dt>
<dd><p>Two different ways of determining the branch our checkout is
       on.</p></dd>
<dt><b class="cmd">fossil timeline</b></dt>
<dd><p>What have we (and others) done recently ?</p>
<p><em>Attention</em>, this information is very likely outdated, the
       more the longer we did not use this checkout.
       Run <b class="cmd">fossil pull</b> first to get latest information from
       the remote repository of the project.</p></dd>
<dt><b class="cmd">fossil timeline current</b></dt>
<dd><p>Place the commit our checkout is based on at the top of the
       timeline.</p></dd>
<dt><b class="cmd">fossil changes</b></dt>
<dd><p>Lists the files we have changed compared to the commit the
       checkout is based on.</p></dd>
<dt><b class="cmd">fossil extra</b></dt>
<dd><p>Lists the files we have in the checkout the repository does not
       know about. This may be leftover chaff from our work, or
       something we have forgotten to <b class="cmd">fossil add</b> to the
       repository yet.</p></dd>
</dl></dd>
<dt><em>Clean checkouts</em></dt>
<dd><p>Be aware of where you are (see first definition).</p>
<p>For pretty much all the operation recipes below a clean
       checkout is at least desired, often required.
       To check that a checkout is clean invoke</p>
<pre class="doctools_example">
    fossil changes
    fossil extra
</pre>
<p>How to clean up when uncommitted changes of all sorts are found is
context-specific and outside of the scope of this guide.</p></dd>
<dt><em>Starting a new branch</em></dt>
<dd><p>Be aware of where you are (see first definition).</p>
<p>Ensure that you have clean checkout (see second definition).
       It is <em>required</em>.</p>
<p>In most situations you want to be on branch <i class="term">trunk</i>, and
       you want to be on the latest commit for it. To get there use</p>
<pre class="doctools_example">
    fossil pull
    fossil update trunk
</pre>
<p>If some other branch is desired as the starting point for the coming
work replace <i class="term">trunk</i> in the commands above with the name of that
branch.</p>
<p>With the base line established we now have two ways of creating
       the new branch, with differing (dis)advantages.
       The simpler way is to</p>
<pre class="doctools_example">
    fossil branch new NAME_OF_NEW_BRANCH
</pre>
<p>and start developing. The advantage here is that you cannot forget to
create the branch. The disadvantages are that we have a branch commit
unchanged from where we branched from, and that we have to use
high-handed techniques like hiding or shunning to get rid of the
commit should we decide to abandon the work before the first actual
commit on the branch.</p>
<p>The other way of creating the branch is to start developing,
and then on the first commit use the option <b class="option">--branch</b> to tell
<b class="syscmd"><a href="../../../index.html#fossil">fossil</a></b> that we are starting a branch now. I.e. run</p>
<pre class="doctools_example">
    fossil commit --branch NAME_OF_NEW_BRANCH ...
</pre>
<p>where <i class="term">...</i> are any other options used to supply the commit
message, files to commit, etc.</p>
<p>The (dis)advantages are now reversed.</p>
<p>We have no superflous commit, only what is actually
       developed. The work is hidden until we commit to make our first
       commit.</p>
<p>We may forget to use <b class="option">--branch NAME_OF_NEW_BRANCH</b> and
       then have to correct that oversight via the fossil web
       interface (I am currently unaware of ways of doing such from
       the command line, although some magic incantantion of
       <b class="cmd">fossil tag create</b> may work).</p>
<p>It helps to keep awareness, like checking before any commit
       that we are on the desired branch.</p></dd>
<dt><em>Merging a branch into trunk</em></dt>
<dd><p>Be aware of where you are (see first definition).</p>
<p>Ensure that you have clean checkout (see second definition).
       In the full-blown sequence (zig-zag) it is <em>required</em>, due
       to the merging from trunk. In the shorter sequence it is only
       desired. That said, keeping the checkout clean before
       any major operations is a good habit to have, in my opinion.</p>
<p>The full-blown sequencing with checks all the way is to</p>
<ol class="doctools_enumerated">
<li><p>Validate the checkout, i.e. last commit on your branch. Run the
       full test suite and other validations, fix all the issues which
       have cropped up.</p></li>
<li><p>Merge the latest state of the <i class="term">trunk</i> (see next definition).</p></li>
<li><p>Validate the checkout again. The incoming trunk changes may
       have broken something now. Do any required fixes.</p></li>
<li><p>Now merge to the trunk using</p>
<pre class="doctools_example">
    fossil update trunk
    fossil merge --integrate YOUR_BRANCH
</pre>
</li>
<li><p>At this point the checkout should be in the same state as at
       the end of point (3) above, because we resolved any issues with
       the trunk already. Thus a simple</p>
<pre class="doctools_example">
    fossil commit ...
</pre>
<p>should be sufficient now to commit the merge back and close the
       branch (due to the <b class="option">--integrate</b> we used on the merge).</p>
<p>The more paranoid may validate the checkout a third time before
       commiting.</p></li>
</ol>
<p>I call this a <i class="term">zig-zag merge</i> because of how the arrows
       look in the timeline, from trunk to feature branch for the
       first merge, and then back for the final merge.</p>
<p>A less paranoid can do what I call a <i class="term">simple merge</i>,
       which moves step (2) after step (4) and skips step (3)
       entirely. The resulting shorter sequence is</p>
<ol class="doctools_enumerated">
<li><p>Validate</p></li>
<li><p>Merge to trunk</p></li>
<li><p>Validate again</p></li>
<li><p>Commit to trunk</p></li>
</ol>
<p>The last step after either zig-zag or plain merge is to</p>
<pre class="doctools_example">
    fossil sync
</pre>
<p>This saves our work to the remote side, and further gives us any other
work done while we were doing our merge. It especially allows us to
check if we raced somebody else, resulting in a split trunk.</p>
<p>When that happens we should coordinate with the other developer
       on who fixes the split, to ensure that we do not race each
       other again.</p></dd>
<dt><em>Merging from trunk</em></dt>
<dd><p>Be aware of where you are (see first definition).</p>
<p>Ensure that you have clean checkout (see second definition).
       It is <em>required</em>.</p>
<p>In most situations you want to import the latest commit of
       branch <i class="term">trunk</i> (or other origin). To get it use</p>
<pre class="doctools_example">
    fossil pull
</pre>
<p>With that done we can now import this commit into our current
       branch with</p>
<pre class="doctools_example">
    fossil merge trunk
</pre>
<p>Even if <b class="syscmd"><a href="../../../index.html#fossil">fossil</a></b> does not report any conflicts it is a
       good idea to check that the operation has not broken the new
       and/or changed functionality we are working on.</p>
<p>With the establishment of a good merge we then save the state
       with</p>
<pre class="doctools_example">
    fossil commit ...
</pre>
<p>before continuing development.</p></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Version numbers</a></h3>
<p>In Tcllib all changes to a package have to come with an increment of
its version number. What part is incremented (patchlevel, minor, major
version) depends on the kind of change made. With multiple changes in
a commit the highest &quot;wins&quot;.</p>
<p>When working in a development branch the version change can be
       deferred until it is time to merge, and then has to cover all
       the changes in the branch.</p>
<p>Below a list of the kinds of changes and their associated
       version increments:</p>
<dl class="doctools_definitions">
<dt><i class="term">D - documentation</i></dt>
<dd><p>No increment</p></dd>
<dt><i class="term">T - testsuite</i></dt>
<dd><p>No increment</p></dd>
<dt><i class="term">B - bugfix</i></dt>
<dd><p>Patchlevel</p></dd>
<dt><i class="term">I - implementation tweak</i></dt>
<dd><p>Patchlevel</p></dd>
<dt><i class="term">P - performance tweak</i></dt>
<dd><p>Patchlevel</p></dd>
<dt><i class="term">E - backward-compatible extension</i></dt>
<dd><p>Minor</p></dd>
<dt><i class="term">API - incompatible change</i></dt>
<dd><p>Major</p></dd>
</dl>
<p>Note that a commit containing a version increment has to
       mention the new version number in its commit message, as well
       as the kind of change which caused it.</p>
<p>Note further that the version number of a package currently
       exists in three places. An increment has to update all of them:</p>
<ol class="doctools_enumerated">
<li><p>The package implementation.</p></li>
<li><p>The package index (&quot;<b class="file">pkgIndex.tcl</b>&quot;)</p></li>
<li><p>The package documentation.</p></li>
</ol>
<p>The &quot;<b class="file">sak.tcl</b>&quot; command <b class="cmd">validate version</b> helps
       finding discrepancies between the first two.
       All the other <b class="cmd">validate</b> methods are also of interest to
       any developer. Invoke it with</p>
<pre class="doctools_example"> sak.tcl help validate </pre>
<p>to see their documentation.</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Structural Overview</a></h2>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Main Directories</a></h3>
<p>The main directories in the Tcllib toplevel directory and of interest
to a developer are:</p>
<dl class="doctools_definitions">
<dt>&quot;<b class="file">modules</b>&quot;</dt>
<dd><p>Each child directory represents one or more packages.
In the case of the latter the packages are usually related in some
way. Examples are &quot;<b class="file">base64</b>&quot;, &quot;<b class="file">math</b>&quot;, and &quot;<b class="file">struct</b>&quot;, with
loose (base64) to strong (math) relations between the packages in the
directory.</p></dd>
<dt>&quot;<b class="file">apps</b>&quot;</dt>
<dd><p>This directory contains all the installable applications, with their
documentation. Note that this directory is currently <em>not</em> split
into sub-directories.</p></dd>
<dt>&quot;<b class="file">examples</b>&quot;</dt>
<dd><p>Each child directory &quot;<b class="file">foo</b>&quot; contains one or more example
application for the packages in &quot;<b class="file">modules/foo</b>&quot;. These examples are
generally not polished enough to be considered for installation.</p></dd>
</dl>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">More Directories</a></h3>
<dl class="doctools_definitions">
<dt>&quot;<b class="file">config</b>&quot;</dt>
<dd><p>This directory contains files supporting the Unix build system,
i.e. &quot;<b class="file">configure</b>&quot; and &quot;<b class="file">Makefile.in</b>&quot;.</p></dd>
<dt>&quot;<b class="file">devdoc</b>&quot;</dt>
<dd><p>This directories contains the doctools sources for the global
documentation, like this document and its sibling guides.</p></dd>
<dt>&quot;<b class="file">embedded</b>&quot;</dt>
<dd><p>This directory contains the entire documentation formatted for
<i class="term"><a href="../../../index.html#html">HTML</a></i> and styled to properly mix into the web site generated by
fossil for the repository.</p>
<p>This is the documentation accessible from the Tcllib home
directory, represented in the repository as &quot;<b class="file">embedded/index.md</b>&quot;.</p></dd>
<dt>&quot;<b class="file">idoc</b>&quot;</dt>
<dd><p>This directory contains the entire documentation formatted for
<i class="term"><a href="../../../index.html#nroff">nroff</a></i> and <i class="term"><a href="../../../index.html#html">HTML</a></i>, the latter without any styling.
This is the documentation which will be installed.</p></dd>
<dt>&quot;<b class="file">support</b>&quot;</dt>
<dd><p>This directory contains the sources of internal packages and utilities
used in the implementation of the &quot;<b class="file">installer.tcl</b>&quot; and
&quot;<b class="file">sak.tcl</b>&quot; scripts/tools.</p></dd>
</dl>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">Top Files</a></h3>
<dl class="doctools_definitions">
<dt>&quot;<b class="file">aclocal.m4</b>&quot;</dt>
<dd></dd>
<dt>&quot;<b class="file">configure</b>&quot;</dt>
<dd></dd>
<dt>&quot;<b class="file">configure.in</b>&quot;</dt>
<dd></dd>
<dt>&quot;<b class="file">Makefile.in</b>&quot;</dt>
<dd><p>These four files comprise the Unix build system layered on top of the
&quot;<b class="file">installer.tcl</b>&quot; script.</p></dd>
<dt>&quot;<b class="file">installer.tcl</b>&quot;</dt>
<dd><p>The Tcl-based installation script/tool.</p></dd>
<dt>&quot;<b class="file">project.shed</b>&quot;</dt>
<dd><p>Configuration file for <i class="term">Sean Wood</i>'s <b class="syscmd"><a href="../modules/practcl/practcl.html">PracTcl</a></b>
buildsystem.</p></dd>
<dt>&quot;<b class="file">sak.tcl</b>&quot;</dt>
<dd><p>This is the main tool for developers and release managers, the
<i class="term">Swiss Army Knife</i> of management operations on the collection.</p></dd>
<dt>&quot;<b class="file">ChangeLog</b>&quot;</dt>
<dd><p>The log of changes to the global support, when the sources were held
in <i class="term"><a href="../../../index.html#cvs">CVS</a></i>. Not relevant any longer with the switch to the
<i class="term"><a href="../../../index.html#fossil">fossil</a></i> SCM.</p></dd>
<dt>&quot;<b class="file">license.terms</b>&quot;</dt>
<dd><p>The license in plain ASCII. See also <i class="term"><a href="tcllib_license.html">Tcllib - License</a></i> for the
nicely formatted form. The text is identical.</p></dd>
<dt>&quot;<b class="file">README.md</b>&quot;</dt>
<dd></dd>
<dt>&quot;<b class="file">.github/CONTRIBUTING.md</b>&quot;</dt>
<dd></dd>
<dt>&quot;<b class="file">.github/ISSUE_TEMPLATE.md</b>&quot;</dt>
<dd></dd>
<dt>&quot;<b class="file">.github/PULL_REQUEST_TEMPLATE.md</b>&quot;</dt>
<dd><p>These markdown-formatted documents are used and shown by the github
mirror of these sources, pointing people back to the official location
and issue trackers.</p></dd>
<dt>&quot;<b class="file">DESCRIPTION.txt</b>&quot;</dt>
<dd></dd>
<dt>&quot;<b class="file">STATUS</b>&quot;</dt>
<dd></dd>
<dt>&quot;<b class="file">tcllib.spec</b>&quot;</dt>
<dd></dd>
<dt>&quot;<b class="file">tcllib.tap</b>&quot;</dt>
<dd></dd>
<dt>&quot;<b class="file">tcllib.yml</b>&quot;</dt>
<dd><p>????</p></dd>
</dl>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">File Types</a></h3>
<p>The most common file types, by file extension, are:</p>
<dl class="doctools_definitions">
<dt>&quot;<b class="file">.tcl</b>&quot;</dt>
<dd><p>Tcl code for a package, application, or example.</p></dd>
<dt>&quot;<b class="file">.man</b>&quot;</dt>
<dd><p>Doctools-formatted documentation, usually for a package.</p></dd>
<dt>&quot;<b class="file">.test</b>&quot;</dt>
<dd><p>Test suite for a package, or part of.
Based on <b class="package">tcltest</b>.</p></dd>
<dt>&quot;<b class="file">.bench</b>&quot;</dt>
<dd><p>Performance benchmarks for a package, or part of.
Based on &quot;<b class="file">modules/bench</b>&quot;.</p></dd>
<dt>&quot;<b class="file">.pcx</b>&quot;</dt>
<dd><p>Syntax rules for <i class="term">TclDevKit</i>'s <b class="syscmd">tclchecker</b>. Using these
rules allows the checker to validate the use of commands of a Tcllib
package <b class="package">foo</b> without having to scan the &quot;<b class="file">.tcl</b>&quot; files
implementing it.</p></dd>
</dl>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Testsuite Tooling</a></h2>
<p>Testsuites in Tcllib are based on Tcl's standard test package
<b class="package">tcltest</b>, plus utilities found in the directory
&quot;<b class="file">modules/devtools</b>&quot;</p>
<p>Tcllib developers invoke the suites through the
<b class="cmd">test run</b> method of the &quot;<b class="file">sak.tcl</b>&quot; tool, with other methods
of <b class="cmd"><a href="../../../index.html#test">test</a></b> providing management operations, for example setting a
list of standard Tcl shells to use.</p>
<div id="subsection12" class="doctools_subsection"><h3><a name="subsection12">Invoke the testsuites of a specific module</a></h3>
<p>Invoke either</p>
<pre class="doctools_example">  ./sak.tcl test run foo </pre>
<p>or</p>
<pre class="doctools_example">  ./sak.tcl test run modules/foo </pre>
<p>to invoke the testsuites found in a specific module &quot;<b class="file">foo</b>&quot;.</p>
</div>
<div id="subsection13" class="doctools_subsection"><h3><a name="subsection13">Invoke the testsuites of all modules</a></h3>
<p>Invoke the tool without a module name, i.e.</p>
<pre class="doctools_example">  ./sak.tcl test run </pre>
<p>to invoke the testsuites of all modules.</p>
</div>
<div id="subsection14" class="doctools_subsection"><h3><a name="subsection14">Detailed Test Logs</a></h3>
<p>In all the previous examples the test runner will write a combination
of progress display and testsuite log to the standard output, showing
for each module only the tests that passed or failed and how many of
each in a summary at the end.</p>
<p>To get a detailed log, it is necessary to invoke the test
runner with additional options.</p>
<p>For one:</p>
<pre class="doctools_example">
   ./sak.tcl test run --log LOG foo
</pre>
<p>While this shows the same short log on the terminal as before, it also
writes a detailed log to the file &quot;<b class="file">LOG.log</b>&quot;, and excerpts to
other files (&quot;<b class="file">LOG.summary</b>&quot;, &quot;<b class="file">LOG.failures</b>&quot;, etc.).</p>
<p>For two:</p>
<pre class="doctools_example">
  ./sak.tcl test run -v foo
</pre>
<p>This writes the detailed log to the standard output, instead of the
short log.</p>
<p>Regardless of form, the detailed log contains a list of all test
cases executed, which failed, and how they failed (expected versus
actual results).</p>
</div>
<div id="subsection15" class="doctools_subsection"><h3><a name="subsection15">Shell Selection</a></h3>
<p>By default the test runner will use all the Tcl shells specified via
<b class="cmd">test add</b> to invoke the specified testsuites, if any. If no
such are specified it will fall back to the Tcl shell used to run the
tool itself.</p>
<p>Use option <b class="option">--shell</b> to explicitly specify the Tcl shell
to use, like</p>
<pre class="doctools_example">
  ./sak.tcl test run --shell /path/to/tclsh ...
</pre>
</div>
<div id="subsection16" class="doctools_subsection"><h3><a name="subsection16">Help</a></h3>
<p>Invoke the tool as</p>
<pre class="doctools_example">  ./sak.tcl help test </pre>
<p>to see the detailed help for all methods of <b class="cmd"><a href="../../../index.html#test">test</a></b>, and the
associated options.</p>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Documentation Tooling</a></h2>
<p>The standard format used for documentation of packages and other
things in Tcllib is <i class="term"><a href="../../../index.html#doctools">doctools</a></i>.
Its supporting packages are a part of Tcllib, see the directories
&quot;<b class="file">modules/doctools</b>&quot; and &quot;<b class="file">modules/dtplite</b>&quot;. The latter is
an application package, with the actual application
&quot;<b class="file">apps/dtplite</b>&quot; a light wrapper around it.</p>
<p>Tcllib developers gain access to these through the <b class="cmd">doc</b>
method of the &quot;<b class="file">sak.tcl</b>&quot; tool, another (internal) wrapper around
the &quot;<b class="file">modules/dtplite</b>&quot; application package.</p>
<div id="subsection17" class="doctools_subsection"><h3><a name="subsection17">Generate documentation for a specific module</a></h3>
<p>Invoke either</p>
<pre class="doctools_example">  ./sak.tcl doc html foo </pre>
<p>or</p>
<pre class="doctools_example">  ./sak.tcl doc html modules/foo </pre>
<p>to generate HTML for the documentation found in the module &quot;<b class="file">foo</b>&quot;.
Instead of <b class="const">html</b> any other supported format can be used here,
of course.</p>
<p>The generated formatted documentation will be placed into a
directory &quot;<b class="file">doc</b>&quot; in the current working directory.</p>
</div>
<div id="subsection18" class="doctools_subsection"><h3><a name="subsection18">Generate documentation for all modules</a></h3>
<p>Invoke the tool without a module name, i.e.</p>
<pre class="doctools_example">  ./sak.tcl doc html </pre>
<p>to generate HTML for the documentation found in all modules.
Instead of <b class="const">html</b> any other supported format can be used here,
of course.</p>
<p>The generated formatted documentation will be placed into a
directory &quot;<b class="file">doc</b>&quot; in the current working directory.</p>
</div>
<div id="subsection19" class="doctools_subsection"><h3><a name="subsection19">Available output formats, help</a></h3>
<p>Invoke the tool as</p>
<pre class="doctools_example">  ./sak.tcl help doc </pre>
<p>to see the entire set of supported output formats which can be
generated.</p>
</div>
<div id="subsection20" class="doctools_subsection"><h3><a name="subsection20">Validation without output</a></h3>
<p>Note the special format <b class="const">validate</b>.</p>
<p>Using this value as the name of the format to generate forces
the tool to simply check that the documentation is syntactically
correct, without generating actual output.</p>
<p>Invoke it as either</p>
<pre class="doctools_example">  ./sak.tcl doc validate (modules/)foo </pre>
<p>or</p>
<pre class="doctools_example">  ./sak.tcl doc validate </pre>
<p>to either check the packages of a specific module or check all of
them.</p>
</div>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Notes On Writing A Testsuite</a></h2>
<p>While previous sections talked about running the testsuites for a
module and the packages therein, this has no meaning if the module in
question has no testsuites at all.</p>
<p>This section gives a very basic overview on possible
methodologies for writing tests and testsuites.</p>
<p>First there are &quot;drudgery&quot; tests. Written to check absolutely
basic assumptions which should never fail.</p>
<p>For example for a command FOO taking two arguments, three tests
calling it with zero, one, and three arguments. The basic checks that
the command fails if it has not enough arguments, or too many.</p>
<p>After that come the tests checking things based on our
knowledge of the command, about its properties and assumptions. Some
examples based on the graph operations added during Google's Summer of
Code 2009 are:</p>
<ul class="doctools_itemized">
<li><p>The BellmanFord command in struct::graph::ops takes a
	<i class="arg">startnode</i> as argument, and this node should be a node of
	the graph. This equals one test case checking the behavior when the
	specified node is not a node of the graph.</p>
<p>This often gives rise to code in the implementation which
	explicitly checks the assumption and throws an understandable error,
	instead of letting the algorithm fail later in some weird
	non-deterministic way.</p>
<p>It is not always possible to do such checks. The graph argument
	for example is just a command in itself, and while we expect
	it to exhibit a certain interface, i.e. a set of sub-commands
	aka methods, we cannot check that it has them, except by
	actually trying to use them. That is done by the algorithm
	anyway, so an explicit check is just overhead we can get by
	without.</p></li>
<li><p>IIRC one of the distinguishing characteristic of either
	BellmanFord and/or Johnson is that they are able to handle
	negative weights. Whereas Dijkstra requires positive weights.</p>
<p>This induces (at least) three testcases ... Graph with all
	positive weights, all negative, and a mix of positive and
	negative weights.
	Thinking further does the algorithm handle the weight
	<b class="const">0</b> as well ? Another test case, or several, if we mix
	zero with positive and negative weights.</p></li>
<li><p>The two algorithms we are currently thinking about are about
	distances between nodes, and distance can be 'Inf'inity,
	i.e. nodes may not be connected. This means that good test
	cases are</p>
<ol class="doctools_enumerated">
	
<li><p>Strongly connected graph</p></li>
<li><p>Connected graph</p></li>
<li><p>Disconnected graph.</p></li>
</ol>
<p>At the extremes of strongly connected and disconnected
	we have the fully connected graphs and graphs without edges,
	only nodes, i.e. completely disconnected.</p></li>
<li><p>IIRC both of the algorithms take weighted arcs, and fill in a
	default if arcs are left unweighted in the input graph.</p>
<p>This also induces three test cases:</p>
<ol class="doctools_enumerated">
	
<li><p>Graph will all arcs with explicit weights.</p></li>
<li><p>Graph without weights at all.</p></li>
<li><p>Graph with mixture of weighted and unweighted graphs.</p></li>
</ol>
</li>
</ul>
<p>What was described above via examples is called
<i class="term">black-box</i> testing. Test cases are designed and written based on
the developer's knowledge of the properties of the algorithm and its
inputs, without referencing a particular implementation.</p>
<p>Going further, a complement to <i class="term">black-box</i> testing is
<i class="term">white-box</i>. For this we know the implementation of the
algorithm, we look at it and design our tests cases so that they force
the code through all possible paths in the implementation. Wherever a
decision is made we have a test case forcing a specific direction of
the decision, for all possible combinations and directions. It is easy
to get a combinatorial explosion in the number of needed test-cases.</p>
<p>In practice I often hope that the black-box tests I have made
are enough to cover all the paths, obviating the need for white-box
tests.</p>
<p>The above should be enough to make it clear that writing tests
for an algorithm takes at least as much time as coding the algorithm,
and often more time. Much more time.
See for example also <a href="http://sqlite.org/testing.html">http://sqlite.org/testing.html</a>, a writeup
on how the Sqlite database engine is tested. Another article of
interest might be <a href="https://www.researchgate.net/publication/298896236">https://www.researchgate.net/publication/298896236</a>.
While geared to a particular numerical algorithm it still shows that
even a simple-looking algorithm can lead to an incredible number of
test cases.</p>
<p>An interesting connection is to documentation. In one
direction, the properties checked with black-box testing are exactly
the properties which should be documented in the algorithm's man
page. And conversely, the documentation of the properties of an
algorithm makes a good reference to base the black-box tests on.</p>
<p>In practice test cases and documentation often get written
together, cross-influencing each other. And the actual writing of test
cases is a mix of black and white box, possibly influencing the
implementation while writing the tests. Like writing a test for a
condition like <i class="term">startnode not in input graph</i> serving as
reminder to put a check for this condition into the code.</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Installation Tooling</a></h2>
<p>A last thing to consider when adding a new package to the collection
is installation.</p>
<p>How to <em>use</em> the &quot;<b class="file">installer.tcl</b>&quot; script is documented
in <i class="term"><a href="tcllib_installer.html">Tcllib - The Installer's Guide</a></i>.</p>
<p>Here we document how to extend said installer so that it may
install new package(s) and/or application(s).</p>
<p>In most cases only a single file has to be modified, the
&quot;<b class="file">support/installation/modules.tcl</b>&quot; holding one command per module
and application to install.</p>
<p>The relevant commands are:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../index.html#module">Module</a></b> <i class="arg">name</i> <i class="arg">code-action</i> <i class="arg">doc-action</i> <i class="arg">example-action</i></a></dt>
<dd><p>Install the packages of module <i class="arg">name</i>, found in
&quot;<b class="file">modules/<i class="arg">name</i></b>&quot;.</p>
<p>The <i class="arg">code-action</i> is responsible for installing the
packages and their index. The system currently provides</p>
<dl class="doctools_definitions">
<dt><b class="cmd">_tcl</b></dt>
<dd><p>Copy all &quot;<b class="file">.tcl</b>&quot; files found in
&quot;<b class="file">modules/<i class="arg">name</i></b>&quot; into the installation.</p></dd>
<dt><b class="cmd">_tcr</b></dt>
<dd><p>As <b class="cmd">_tcl</b>, copy the &quot;<b class="file">.tcl</b>&quot; files found in
the subdirectories of &quot;<b class="file">modules/<i class="arg">name</i></b>&quot; as well.</p></dd>
<dt><b class="cmd">_tci</b></dt>
<dd><p>As <b class="cmd">_tcl</b>, and copy the &quot;<b class="file">tclIndex.tcl</b>&quot; file
as well.</p></dd>
<dt><b class="cmd">_msg</b></dt>
<dd><p>As <b class="cmd">_tcl</b>, and copy the subdirectory &quot;<b class="file">msgs</b>&quot;
as well.</p></dd>
<dt><b class="cmd">_doc</b></dt>
<dd><p>As <b class="cmd">_tcl</b>, and copy the subdirectory
&quot;<b class="file">mpformats</b>&quot; as well.</p></dd>
<dt><b class="cmd">_tex</b></dt>
<dd><p>As <b class="cmd">_tcl</b>, and copy &quot;<b class="file">.tex</b>&quot; files as well.</p></dd>
</dl>
<p>The <i class="arg">doc-action</i> is responsible for installing the package
documentation. The system currently provides</p>
<dl class="doctools_definitions">
<dt><b class="cmd">_null</b></dt>
<dd><p>No documentation available, do nothing.</p></dd>
<dt><b class="cmd">_man</b></dt>
<dd><p>Process the &quot;<b class="file">.man</b>&quot; files found in
&quot;<b class="file">modules/<i class="arg">name</i></b>&quot; and install the results (nroff and/or HTML)
in the proper location, as given to the installer.</p>
<p>This is actually a fallback, normally the installer uses the
pre-made formatted documentation found under &quot;<b class="file">idoc</b>&quot;.</p></dd>
</dl>
<p>The <i class="arg">example-action</i> is responsible for installing the
examples. The system currently provides</p>
<dl class="doctools_definitions">
<dt><b class="cmd">_null</b></dt>
<dd><p>No examples available, do nothing.</p></dd>
<dt><b class="cmd">_exa</b></dt>
<dd><p>Copy the the directory &quot;<b class="file">examples/<i class="arg">name</i></b>&quot;
recursively to the install location for examples.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd"><a href="../../../index.html#application">Application</a></b> <i class="arg">name</i></a></dt>
<dd><p>Install the application with <i class="arg">name</i>, found in &quot;<b class="file">apps</b>&quot;.</p></dd>
<dt><a name="3"><b class="cmd">Exclude</b> <i class="arg">name</i></a></dt>
<dd><p>This command signals to the installer which of the listed modules to
<em>not</em> install. I.e. they name the deprecated modules of Tcllib.</p></dd>
</dl>
<p>If, and only if the above actions are not suitable for the new
module then a second file has to be modified,
&quot;<b class="file">support/installation/actions.tcl</b>&quot;.</p>
<p>This file contains the implementations of the available
actions, and is the place where any custom action needed to handle the
special circumstances of module has to be added.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted idoc/www/tcllib/files/devdoc/tcllib_installer.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
<!DOCTYPE html><html><head>
<title>tcllib_install_guide - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_installer.man' by tcllib/doctools with format 'html'
   -->
<!-- tcllib_install_guide.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcllib_install_guide(n) 1 tcllib &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcllib_install_guide - Tcllib - The Installer's Guide</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Requisites</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Tcl</a></li>
<li class="doctools_subsection"><a href="#subsection2">Critcl</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">Build &amp; Installation Instructions</a>
<ul>
<li class="doctools_subsection"><a href="#subsection3">Installing on Unix</a></li>
<li class="doctools_subsection"><a href="#subsection4">Installing on Windows</a></li>
<li class="doctools_subsection"><a href="#subsection5">Critcl &amp; Accelerators</a></li>
<li class="doctools_subsection"><a href="#subsection6">Tooling</a></ul>
</li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Welcome to Tcllib, the Tcl Standard Library. Note that Tcllib is not a
package itself. It is a collection of (semi-independent) <i class="term"><a href="../../../index.html#tcl">Tcl</a></i>
packages that provide utility functions useful to a large collection
of Tcl programmers.</p>
<p>The audience of this document is anyone wishing to build and install
the packages found in Tcllib, for either themselves, or others.</p>
<p>For developers intending to work on the packages themselves we
additionally provide</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="tcllib_devguide.html">Tcllib - The Developer's Guide</a></i>.</p></li>
</ol>
<p>Please read <i class="term"><a href="tcllib_sources.html">Tcllib - How To Get The Sources</a></i> first, if that
was not done already. Here we assume that the sources are already
available in a directory of your choice.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Requisites</a></h2>
<p>Before Tcllib can be build and used a number of requisites must be installed.
These are:</p>
<ol class="doctools_enumerated">
<li><p>The scripting language Tcl.
       For details see <span class="sectref"><a href="#subsection1">Tcl</a></span>.</p></li>
<li><p>Optionally, the <b class="package">critcl</b> package (C embedding) for <b class="syscmd"><a href="../../../index.html#tcl">Tcl</a></b>.
       For details see <b class="sectref">CriTcl</b>.</p></li>
</ol>
<p>This list assumes that the machine where Tcllib is to be installed is
essentially clean. Of course, if parts of the dependencies listed
below are already installed the associated steps can be skipped. It is
still recommended to read their sections though, to validate that the
dependencies they talk about are indeed installed.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Tcl</a></h3>
<p>As we are installing a number of Tcl packages and applications it
should be pretty much obvious that a working installation of Tcl
itself is needed, and I will not belabor the point.</p>
<p>Out of the many possibilities use whatever you are comfortable
with, as long as it provides at the very least Tcl 8.2, or higher.
This may be a Tcl installation provided by your operating system
distribution, from a distribution-independent vendor, or built by
yourself.</p>
<p><em>Note</em> that the packages in Tcllib have begun to require
8.4, 8.5, and even 8.6. Older versions of Tcl will not be able to use
such packages. Trying to use them will result in
<em>package not found</em> errors, as their package index files will
not register them in versions of the core unable to use them.</p>
<p>Myself, I used (and still use)
<a href="http://www.activestate.com">ActiveState's</a>
ActiveTcl 8.5 distribution during development, as I am most familiar
with it.</p>
<p><em>(Disclosure: I, Andreas Kupries, worked for ActiveState until 2016, maintaining ActiveTcl and TclDevKit for them).</em>.
I am currently working for SUSE Software Canada ULC, although not in
Tcl-related areas.</p>
<p>This distribution can be found at
<a href="http://www.activestate.com/activetcl">http://www.activestate.com/activetcl</a>. Retrieve the archive of
ActiveTcl 8.5 (or higher) for your platform and install it as directed
by ActiveState.</p>
<p>For those wishing to build and install Tcl on their own, the
relevant sources can be found at</p>
<dl class="doctools_definitions">
<dt>Tcl</dt>
<dd><p><a href="http://core.tcl-lang.org/tcl/">http://core.tcl-lang.org/tcl/</a></p></dd>
</dl>
<p>together with the necessary instructions on how to build it.</p>
<p>If there are problems with building, installing, or using Tcl,
please file a ticket against <i class="term"><a href="../../../index.html#tcl">Tcl</a></i>, or the vendor of your
distribution, and <em>not</em> <i class="term"><a href="../../../index.html#tcllib">Tcllib</a></i>.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Critcl</a></h3>
<p>The <b class="syscmd">critcl</b> tool is an <em>optional</em> dependency.</p>
<p>It is only required when trying to build the C-based
<i class="term">accelerators</i> for a number of packages, as explained in
<span class="sectref"><a href="#subsection5">Critcl &amp; Accelerators</a></span></p>
<p>Tcllib's build system looks for it in the ,
using the name <b class="syscmd">critcl</b>. This is for Unix.
On Windows on the other hand the search is more complex. First we look
for a proper application <b class="syscmd">critcl.exe</b>. When that is not found
we look for a combination of interpreter (<b class="syscmd">tclkitsh.exe</b>,
<b class="syscmd">tclsh.exe</b>) and starkit (<b class="syscmd">critcl.kit</b>, <b class="syscmd">critcl</b>)
instead. <em>Note</em> that the choice of starkit can be overriden via
the environment variable .</p>
<p>Tcllib requires Critcl version 2 or higher.</p>
<p>The github repository providing releases of version 2 and
higher, and the associated sources, can be found at
<a href="http://andreas-kupries.github.com/critcl">http://andreas-kupries.github.com/critcl</a>.</p>
<p>Any branch of the repository can be used (if not using the
prebuild starkit or starpack), although the use of the stable branch
<em>master</em> is recommended.</p>
<p>At the above url is also an explanation on how to build and
install Critcl, including a list of its dependencies.</p>
<p>Its instructions will not be repeated here. If there are
problems with these directions please file a ticket against the
<i class="term">Critcl</i> project, and not Tcllib.</p>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Build &amp; Installation Instructions</a></h2>
<p>As Tcllib is mainly a bundle of packages written in pure Tcl building
it is the same as installing it. The exceptions to this have their own
subsection, <span class="sectref"><a href="#subsection5">Critcl &amp; Accelerators</a></span>, later on.</p>
<p>Before that however comes the standard case, differentiated by
       the platforms with material differences in the instruction, i.e.
       <i class="term">Unix</i>-like, versus <i class="term">Windows</i>.</p>
<p>Regarding the latter it should also be noted that it is
       possible set up an <i class="term">Unix</i>-like environment using projects
       like <i class="term">MSYS</i>, <i class="term">Cygwin</i>, and others. In that case the
       user has the choice of which instructions to follow.</p>
<p>Regardless of environment or platform, a suitable <i class="term"><a href="../../../index.html#tcl">Tcl</a></i>
       has to be installed, and its <b class="syscmd">tclsh</b> should be placed on
       the  (<i class="term">Unix</i>) or associated with
       &quot;<b class="file">.tcl</b>&quot; files (<i class="term">Windows</i>).</p>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Installing on Unix</a></h3>
<p>For <i class="term">Unix</i>-like environments Tcllib comes with the standard set
of files to make</p>
<pre class="doctools_example">
  ./configure
  make install
</pre>
<p>a suitable way of installing it.
This is a standard non-interactive install automatically figuring out
where to place everything, i.e. packages, applications, and the
manpages.</p>
<p>To get a graphical installer invoke</p>
<pre class="doctools_example">
  ./installer.tcl
</pre>
<p>instead.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Installing on Windows</a></h3>
<p>In a Windows environment we have the <b class="cmd">installer.tcl</b> script to
perform installation.</p>
<p>If the desired <b class="syscmd">tclsh</b> is associated &quot;<b class="file">.tcl</b>&quot; files
       then double-clicking / opening the <b class="cmd">installer.tcl</b> is
       enough to invoke it in graphical mode.
       This assumes that <i class="term"><a href="../../../index.html#tk">Tk</a></i> is installed and available as well.</p>
<p>Without <i class="term"><a href="../../../index.html#tk">Tk</a></i> the only way to invoke the installer are to
       open a DOS window, i.e. <b class="syscmd">cmd.exe</b>, and then to invoke</p>
<pre class="doctools_example">
  ./installer.tcl
</pre>
<p>inside it.</p>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Critcl &amp; Accelerators</a></h3>
<p>While the majority of Tcllib consists of packages written in pure Tcl
a number of packages also have <i class="term">accelerators</i> associated with them.
These are <b class="syscmd">critcl</b>-based C packages whose use will boost the
performance of the packages using them.
These accelerators are optional, and they are not built by default.
If they are built according to the instructions below then they will
also be installed as well.</p>
<p>To build the accelerators the normally optional dependency on
       <b class="syscmd">critcl</b> becomes required.</p>
<p>To build and install Tcllib with the accelerators in a
       Unix-like environment invoke:</p>
<pre class="doctools_example">
  ./configure
  make critcl  # Builds the shared library and package holding
               # the accelerators, tcllibc
  make install # Installs all packages, including the new tcllibc.
</pre>
<p>The underlying tool is &quot;<b class="file">sak.tcl</b>&quot; in the toplevel directory
of Tcllib and the command <b class="cmd">make critcl</b> is just a wrapper around</p>
<pre class="doctools_example">
  ./sak.tcl critcl
</pre>
<p>Therefore in a Windows environment instead invoke</p>
<pre class="doctools_example">
  ./sak.tcl critcl
  ./installer.tcl
</pre>
<p>from within a DOS window, i.e. <b class="syscmd">cmd.exe</b>.</p>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Tooling</a></h3>
<p>The core of Tcllib's build system is the script &quot;<b class="file">installer.tcl</b>&quot;
found in the toplevel directory of a checkout or release.</p>
<p>The</p>
<pre class="doctools_example">
         configure ; make install
       </pre>
<p>setup available to
       developers on Unix-like systems is just a wrapper around it.
       To go beyond the standard embodied in the wrapper it is
       necessary to directly invoke this script.</p>
<p>On Windows system using it directly is the only way to invoke
       it.</p>
<p>For basic help invoke it as</p>
<pre class="doctools_example">
         ./installer.tcl -help
       </pre>
<p>This will print a short list of all the available options to
       the standard output channel.</p>
<p>The commands associated with the various <i class="term">install</i> targets
       in the <i class="term">Makefile.in</i> for Unix can be used as additional
       examples on how to use this tool as well.</p>
<p>The installer can operate in GUI and CLI modes.
       By default it chooses the mode automatically, based on if the
       Tcl package <b class="package"><a href="../../../index.html#tk">Tk</a></b> can be used or not.
       The option <b class="option">-no-gui</b> can be used to force CLI mode.</p>
<p>Note that it is possible to specify options on the command line
       even if the installer ultimatively selects GUI mode. In that
       case the hardwired defaults and the options determine the data
       presented to the user for editing.</p>
<p>The installer will select a number of defaults for the
       locations of packages, examples, and documentation, and also
       the format of the documentation. The user can overide these
       defaults in the GUI, or by specifying additional options.
       The defaults depend on the platform detected (Unix/Windows) and
       on the <b class="syscmd">tclsh</b> executable used to run the installer.</p>
<p><em>Options</em></p>
<dl class="doctools_options">
<dt><b class="option">-help</b></dt>
<dd><p>Show the list of options explained here on the standard output channel
and exit.</p></dd>
<dt><b class="option">+excluded</b></dt>
<dd><p>Include deprecated packages in the installation.</p></dd>
<dt><b class="option">-no-gui</b></dt>
<dd><p>Force command line operation of the installer</p></dd>
<dt><b class="option">-no-wait</b></dt>
<dd><p>In CLI mode the installer will by default ask the user to confirm that
the chosen configuration (destination paths, things to install) is
correct before performing any action. Using this option causes the
installer to skip this query and immediately jump to installation.</p></dd>
<dt><b class="option">-app-path</b> <i class="arg">path</i></dt>
<dd></dd>
<dt><b class="option">-example-path</b> <i class="arg">path</i></dt>
<dd></dd>
<dt><b class="option">-html-path</b> <i class="arg">path</i></dt>
<dd></dd>
<dt><b class="option">-nroff-path</b> <i class="arg">path</i></dt>
<dd></dd>
<dt><b class="option">-pkg-path</b> <i class="arg">path</i></dt>
<dd><p>Declare the destination paths for the applications, examples, html
documentation, nroff manpages, and packages. The defaults are derived
from the location of the <b class="syscmd">tclsh</b> used to run the installer.</p></dd>
<dt><b class="option">-dry-run</b></dt>
<dd></dd>
<dt><b class="option">-simulate</b></dt>
<dd><p>Run the installer without modifying the destination directories.</p></dd>
<dt><b class="option">-apps</b></dt>
<dd></dd>
<dt><b class="option">-no-apps</b></dt>
<dd></dd>
<dt><b class="option">-examples</b></dt>
<dd></dd>
<dt><b class="option">-no-examples</b></dt>
<dd></dd>
<dt><b class="option">-pkgs</b></dt>
<dd></dd>
<dt><b class="option">-no-pkgs</b></dt>
<dd></dd>
<dt><b class="option">-html</b></dt>
<dd></dd>
<dt><b class="option">-no-html</b></dt>
<dd></dd>
<dt><b class="option">-nroff</b></dt>
<dd></dd>
<dt><b class="option">-no-nroff</b></dt>
<dd><p>(De)activate the installation of applications, examples, packages,
html documentation, and nroff manpages.</p>
<p>Applications, examples, and packages are installed by default.</p>
<p>On Windows the html documentation is installed by default.</p>
<p>On Unix the nroff manpages are installed by default.</p></dd>
</dl>
</div>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































Deleted idoc/www/tcllib/files/devdoc/tcllib_license.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html><html><head>
<title>tcllib_license - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_license.man' by tcllib/doctools with format 'html'
   -->
<!-- tcllib_license.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcllib_license(n) 1 tcllib &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcllib_license - Tcllib - License</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">License</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Welcome to Tcllib, the Tcl Standard Library. Note that Tcllib is not a
package itself. It is a collection of (semi-independent) <i class="term"><a href="../../../index.html#tcl">Tcl</a></i>
packages that provide utility functions useful to a large collection
of Tcl programmers.</p>
<p>The collection is under the BSD license.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">License</a></h2>
<p>This software is copyrighted by Ajuba Solutions and other parties.
The following terms apply to all files associated with the software
unless explicitly disclaimed in individual files.</p>
<p>The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose,
provided that existing copyright notices are retained in all copies
and that this notice is included verbatim in any distributions. No
written agreement, license, or royalty fee is required for any of the
authorized uses.  Modifications to this software may be copyrighted by
their authors and need not follow the licensing terms described here,
provided that the new terms are clearly indicated on the first page of
each file where they apply.</p>
<p>IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.</p>
<p>THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN &quot;AS IS&quot; BASIS, AND
THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.</p>
<p>GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only &quot;Restricted Rights&quot; in
the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as &quot;Commercial Computer Software&quot; and the
Government shall have only &quot;Restricted Rights&quot; as defined in Clause
252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































Deleted idoc/www/tcllib/files/devdoc/tcllib_releasemgr.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html><html><head>
<title>tcllib_releasemgr - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_releasemgr.man' by tcllib/doctools with format 'html'
   -->
<!-- tcllib_releasemgr.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcllib_releasemgr(n) 1 tcllib &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcllib_releasemgr - Tcllib - The Release Manager's Guide</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Tools</a></li>
<li class="doctools_section"><a href="#section3">Tasks</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Start a release candidate</a></li>
<li class="doctools_subsection"><a href="#subsection2">Ready the candidate</a></li>
<li class="doctools_subsection"><a href="#subsection3">Make it official</a></li>
<li class="doctools_subsection"><a href="#subsection4">Distribute the release</a></ul>
</li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Welcome to Tcllib, the Tcl Standard Library. Note that Tcllib is not a
package itself. It is a collection of (semi-independent) <i class="term"><a href="../../../index.html#tcl">Tcl</a></i>
packages that provide utility functions useful to a large collection
of Tcl programmers.</p>
<p>The audience of this document is the release manager for Tcllib, their
deputies, and anybody else interested in the task of creating
an official release of Tcllib for distribution.</p>
<p>Please read <i class="term"><a href="tcllib_sources.html">Tcllib - How To Get The Sources</a></i> first, if that
was not done already. Here we assume that the sources are already
available in a directory of your choice.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Tools</a></h2>
<p>The &quot;<b class="file">sak.tcl</b>&quot; script in the toplevel directory of a Tcllib
checkout is the one tool used by the release manager to perform its
<span class="sectref"><a href="#section3">Tasks</a></span>.</p>
<p>The main commands to be used are</p>
<pre class="doctools_example">
    sak.tcl validate
    sak.tcl test run
    sak.tcl review
    sak.tcl readme
    sak.tcl localdoc
    sak.tcl release
</pre>
<p>More detail will be provided in the explanations of the various
<span class="sectref"><a href="#section3">Tasks</a></span>.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Tasks</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Start a release candidate</a></h3>
<p>todo: open a candidate for release</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Ready the candidate</a></h3>
<p>todo: test, validate and check that the candidate is worthy of release
fix testsuites, possibly fix packages, documentation
regenerate docs
coordinate with package maintainers wrt fixes
big thing: going over the packages, classify changes since last
release to generate a nice readme.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Make it official</a></h3>
<p>todo: finalize release, make candidate official</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Distribute the release</a></h3>
<p>With the release made it has to be published and the world notified of
its existence.</p>
<ol class="doctools_enumerated">
<li><p>Create a proper fossil event for the release, via
	    <a href="http://core.tcl-lang.org/tcllib/eventedit">http://core.tcl-lang.org/tcllib/eventedit</a>.</p>
<p>An <a href="http://core.tcl-lang.org/tcllib/event/dac0ddcd2e990234143196b4dc438fe01e7b9817">existing event</a> should be used as template.</p></li>
<li><p>Update a number of web locations:</p>
<ol class="doctools_enumerated">
<li><p><a href="http://core.tcl-lang.org/tcllib/doc/trunk/embedded/index.md">Home page</a></p></li>
<li><p><a href="http://core.tcl-lang.org/tcllib/wiki?name=Downloads">Downloads</a></p></li>
<li><p><a href="http://core.tcl-lang.org/tcllib/wiki?name=Past+Releases">Past Releases</a></p></li>
<li><p><a href="http://www.tcl-lang.org/home/release.txt">http://www.tcl-lang.org/home/release.txt</a></p></li>
<li><p><a href="http://www.tcl-lang.org/software/tcllib/*.tml">http://www.tcl-lang.org/software/tcllib/*.tml</a></p></li>
<li><p><a href="http://wiki.tcl-lang.org/page/Tcllib">http://wiki.tcl-lang.org/page/Tcllib</a></p></li>
</ol>
<p>The first location maps to the file &quot;<b class="file">embedded/index.md</b>&quot; in the
repository itself, as such it can edited as part of the release
process. This is where reference to the new fossil event is added, as
the new current release.</p>
<p>The next two locations are in the fossil tcllib wiki and
require admin or wiki write permissions for
<a href="http://core.tcl-lang.org/tcllib">http://core.tcl-lang.org/tcllib</a>.</p>
<p>The last two locations require ssh access to
<a href="http://www.tcl-lang.org">http://www.tcl-lang.org</a> and permission to edit
files in the web area.</p></li>
<li><p>***TODO*** mailing lists and other places to send notes to.</p></li>
</ol>
</div>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































Deleted idoc/www/tcllib/files/devdoc/tcllib_sources.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html><html><head>
<title>tcllib_sources - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_sources.man' by tcllib/doctools with format 'html'
   -->
<!-- tcllib_sources.n
   -->
<body><hr> [
   <a href="../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../toc.html">Table Of Contents</a>
&#124; <a href="../../../index.html">Keyword Index</a>
&#124; <a href="../../../toc0.html">Categories</a>
&#124; <a href="../../../toc1.html">Modules</a>
&#124; <a href="../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcllib_sources(n) 1 tcllib &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcllib_sources - Tcllib - How To Get The Sources</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Source Location</a></li>
<li class="doctools_section"><a href="#section3">Retrieval</a></li>
<li class="doctools_section"><a href="#section4">Source Code Management</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Welcome to Tcllib, the Tcl Standard Library. Note that Tcllib is not a
package itself. It is a collection of (semi-independent) <i class="term"><a href="../../../index.html#tcl">Tcl</a></i>
packages that provide utility functions useful to a large collection
of Tcl programmers.</p>
<p>The audience of this document is anyone wishing to either have just a
look at Tcllib's source code, or build the packages, or to extend and
modify them.</p>
<p>For builders and developers we additionally provide</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="tcllib_installer.html">Tcllib - The Installer's Guide</a></i>.</p></li>
<li><p><i class="term"><a href="tcllib_devguide.html">Tcllib - The Developer's Guide</a></i>.</p></li>
</ol>
<p>respectively.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Source Location</a></h2>
<p>The official repository for Tcllib can be found at
<a href="http://core.tcl-lang.org/tcllib">http://core.tcl-lang.org/tcllib</a></p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Retrieval</a></h2>
<p>Assuming that you simply wish to look at the sources, or build a
specific revision, the easiest way of retrieving it is to:</p>
<ol class="doctools_enumerated">
<li><p>Log into this site, as &quot;anonymous&quot;, using the semi-random password in the captcha.</p></li>
<li><p>Go to the &quot;Timeline&quot;.</p></li>
<li><p>Choose the revision you wish to have.</p></li>
<li><p>Follow its link to its detailed information page.</p></li>
<li><p>On that page, choose either the &quot;ZIP&quot; or &quot;Tarball&quot; link to get
a copy of this revision in the format of your choice.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Source Code Management</a></h2>
<p>For the curious (or a developer-to-be), the sources are managed by the
<a href="http://www.fossil-scm.org">Fossil SCM</a>.
Binaries for popular platforms can be found directly at its
<a href="http://www.fossil-scm.org/download.html">download page</a>.</p>
<p>With that tool available the full history can be retrieved via:</p>
<pre class="doctools_example">
    fossil clone  http://core.tcl-lang.org/tcllib  tcllib.fossil
</pre>
<p>followed by</p>
<pre class="doctools_example">
    mkdir tcllib
    cd tcllib
    fossil open ../tcllib.fossil
</pre>
<p>to get a checkout of the head of the trunk.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/aes/aes.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>aes - Advanced Encryption Standard (AES)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>aes - Advanced Encryption Standard (AES)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'aes.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2012-2014, Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- aes.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">aes(n) 1.2.1 tcllib &quot;Advanced Encryption Standard (AES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>aes - Implementation of the AES block cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'aes.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;   -- Copyright &copy; 2012-2014, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- aes.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">aes(n) 1.2.1 tcllib &quot;Advanced Encryption Standard (AES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>aes - Implementation of the AES block cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>aes</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../des/des.html">des(n)</a>, <a href="../md5/md5.html">md5(n)</a>, <a href="../sha1/sha1.html">sha1(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#aes">aes</a>, <a href="../../../../index.html#block_cipher">block cipher</a>, <a href="../../../../index.html#data_integrity">data integrity</a>, <a href="../../../../index.html#encryption">encryption</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;<br>
Copyright &copy; 2012-2014, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|









247
248
249
250
251
252
253






254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>aes</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../des/des.html">des(n)</a>, <a href="../md5/md5.html">md5(n)</a>, <a href="../sha1/sha1.html">sha1(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key796">aes</a>, <a href="../../../../index.html#key297">block cipher</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;<br>
Copyright &copy; 2012-2014, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/amazon-s3/S3.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>S3 - Amazon S3 Web Service Utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>S3 - Amazon S3 Web Service Utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'S3.man' by tcllib/doctools with format 'html'
   -->
<!-- 2006,2008 Darren New. All Rights Reserved. See LICENSE.TXT for terms.
   -->
<!-- S3.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">S3(n) 1.0.3 tcllib &quot;Amazon S3 Web Service Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>S3 - Amazon S3 Web Service Interface</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'S3.man' by tcllib/doctools with format 'html'
   -->
<! -- 2006,2008 Darren New. All Rights Reserved. See LICENSE.TXT for terms.
   -->
<! -- S3.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">S3(n) 1.0.3 tcllib &quot;Amazon S3 Web Service Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>S3 - Amazon S3 Web Service Interface</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
returned dictionary if a socket error is encountered and this is
set to return. If <b class="option">throwsocket</b> is set to <i class="arg">return</i> or
if the call is not blocking, then a socket error (i.e., an error
whose error code starts with &quot;S3 socket&quot; will be returned in the
dictionary as <b class="option">error</b>, <b class="option">errorInfo</b>, and <b class="option">errorCode</b>.
If a foreground call is made (i.e., <b class="option">resultvar</b> is not provided),
and this option is not provided or is set to <i class="arg">throw</i>, then
<b class="cmd"><a href="../../../../index.html#error">error</a></b> will be invoked instead.</p></dd>
</dl>
<p>Once the call to <b class="cmd">S3::REST</b> completes, a new dict is returned,
either in the <i class="arg">resultvar</i> or as the result of execution. This dict is
a copy of the original dict with the results added as new keys. The possible
new keys are these:</p>
<dl class="doctools_definitions">
<dt><b class="option">error</b> <i class="arg">errorstring</i></dt>







|







446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
returned dictionary if a socket error is encountered and this is
set to return. If <b class="option">throwsocket</b> is set to <i class="arg">return</i> or
if the call is not blocking, then a socket error (i.e., an error
whose error code starts with &quot;S3 socket&quot; will be returned in the
dictionary as <b class="option">error</b>, <b class="option">errorInfo</b>, and <b class="option">errorCode</b>.
If a foreground call is made (i.e., <b class="option">resultvar</b> is not provided),
and this option is not provided or is set to <i class="arg">throw</i>, then
<b class="cmd"><a href="../../../../index.html#key161">error</a></b> will be invoked instead.</p></dd>
</dl>
<p>Once the call to <b class="cmd">S3::REST</b> completes, a new dict is returned,
either in the <i class="arg">resultvar</i> or as the result of execution. This dict is
a copy of the original dict with the results added as new keys. The possible
new keys are these:</p>
<dl class="doctools_definitions">
<dt><b class="option">error</b> <i class="arg">errorstring</i></dt>
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
with a number of scripts to run, and the OddJob program can
be invoked on multiple machines to run scripts on all the machines,
each moving on to the next unstarted task as it finishes each.
This is still being designed, and it is intended primarily
to be run on Amazon's Elastic Compute Cloud.</p>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section10" class="doctools_section"><h2><a name="section10">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>amazon-s3</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#amazon">amazon</a>, <a href="../../../../index.html#cloud">cloud</a>, <a href="../../../../index.html#s3">s3</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>2006,2008 Darren New. All Rights Reserved. See LICENSE.TXT for terms.</p>
</div>
</div></body></html>







|
|

|







|
|















<
<
<
<
<
<


|








1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278






1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
with a number of scripts to run, and the OddJob program can
be invoked on multiple machines to run scripts on all the machines,
each moving on to the next unstarted task as it finishes each.
This is still being designed, and it is intended primarily
to be run on Amazon's Elastic Compute Cloud.</p>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section10" class="doctools_section"><h2><a name="section10">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>amazon-s3</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key522">amazon</a>, <a href="../../../../index.html#key523">cloud</a>, <a href="../../../../index.html#key521">s3</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>2006,2008 Darren New. All Rights Reserved. See LICENSE.TXT for terms.</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/amazon-s3/xsxp.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>xsxp - Amazon S3 Web Service Utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>xsxp - Amazon S3 Web Service Utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'xsxp.man' by tcllib/doctools with format 'html'
   -->
<!-- 2006 Darren New. All Rights Reserved.
   -->
<!-- xsxp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">xsxp(n) 1.0 tcllib &quot;Amazon S3 Web Service Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>xsxp - eXtremely Simple Xml Parser</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'xsxp.man' by tcllib/doctools with format 'html'
   -->
<! -- 2006 Darren New. All Rights Reserved.
   -->
<! -- xsxp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">xsxp(n) 1.0 tcllib &quot;Amazon S3 Web Service Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>xsxp - eXtremely Simple Xml Parser</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>amazon-s3</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#dom">dom</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#xml">xml</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>2006 Darren New. All Rights Reserved.</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








230
231
232
233
234
235
236






237
238
239
240
241
242
243
244
245
246
247
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>amazon-s3</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key754">dom</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key755">xml</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>2006 Darren New. All Rights Reserved.</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/asn/asn.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>asn - ASN.1 processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>asn - ASN.1 processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'asn.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2004 Jochen Loewer &amp;lt;loewerj@web.de&amp;gt;   -- Copyright &amp;copy; 2004-2011 Michael Schlenker &amp;lt;mic42@users.sourceforge.net&amp;gt;
   -->
<!-- asn.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">asn(n) 0.8 tcllib &quot;ASN.1 processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>asn - ASN.1 BER encoder/decoder</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'asn.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;   -- Copyright &copy; 2004 Jochen Loewer &lt;loewerj@web.de&gt;   -- Copyright &copy; 2004-2011 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;
   -->
<! -- asn.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">asn(n) 0.8 tcllib &quot;ASN.1 processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>asn - ASN.1 BER encoder/decoder</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>asn</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#asn">asn</a>, <a href="../../../../index.html#ber">ber</a>, <a href="../../../../index.html#cer">cer</a>, <a href="../../../../index.html#der">der</a>, <a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#protocol">protocol</a>, <a href="../../../../index.html#x_208">x.208</a>, <a href="../../../../index.html#x_209">x.209</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Jochen Loewer &lt;loewerj@web.de&gt;<br>
Copyright &copy; 2004-2011 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|










488
489
490
491
492
493
494






495
496
497
498
499
500
501
502
503
504
505
506
507
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>asn</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key427">asn</a>, <a href="../../../../index.html#key425">ber</a>, <a href="../../../../index.html#key426">cer</a>, <a href="../../../../index.html#key428">der</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key423">x.208</a>, <a href="../../../../index.html#key424">x.209</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Jochen Loewer &lt;loewerj@web.de&gt;<br>
Copyright &copy; 2004-2011 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/base32/base32.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>base32 - Base32 encoding</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>base32 - Base32 encoding</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'base32.man' by tcllib/doctools with format 'html'
   -->
<!-- Public domain
   -->
<!-- base32.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base32(n) 0.1 tcllib &quot;Base32 encoding&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base32 - base32 standard encoding</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'base32.man' by tcllib/doctools with format 'html'
   -->
<! -- Public domain
   -->
<! -- base32.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base32(n) 0.1 tcllib &quot;Base32 encoding&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base32 - base32 standard encoding</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base32</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#base32">base32</a>, <a href="../../../../index.html#rfc3548">rfc3548</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Public domain</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








186
187
188
189
190
191
192






193
194
195
196
197
198
199
200
201
202
203
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base32</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key299">base32</a>, <a href="../../../../index.html#key341">rfc3548</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Public domain</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/base32/base32core.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>base32::core - Base32 encoding</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>base32::core - Base32 encoding</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'base32core.man' by tcllib/doctools with format 'html'
   -->
<!-- Public domain
   -->
<!-- base32::core.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base32::core(n) 0.1 tcllib &quot;Base32 encoding&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base32::core - Expanding basic base32 maps</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'base32core.man' by tcllib/doctools with format 'html'
   -->
<! -- Public domain
   -->
<! -- base32::core.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base32::core(n) 0.1 tcllib &quot;Base32 encoding&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base32::core - Expanding basic base32 maps</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base32</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#base32">base32</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Public domain</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








176
177
178
179
180
181
182






183
184
185
186
187
188
189
190
191
192
193
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base32</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key299">base32</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Public domain</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/base32/base32hex.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>base32::hex - Base32 encoding</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>base32::hex - Base32 encoding</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'base32hex.man' by tcllib/doctools with format 'html'
   -->
<!-- Public domain
   -->
<!-- base32::hex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base32::hex(n) 0.1 tcllib &quot;Base32 encoding&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base32::hex - base32 extended hex encoding</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'base32hex.man' by tcllib/doctools with format 'html'
   -->
<! -- Public domain
   -->
<! -- base32::hex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base32::hex(n) 0.1 tcllib &quot;Base32 encoding&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base32::hex - base32 extended hex encoding</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base32</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#base32">base32</a>, <a href="../../../../index.html#hex">hex</a>, <a href="../../../../index.html#rfc3548">rfc3548</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Public domain</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








188
189
190
191
192
193
194






195
196
197
198
199
200
201
202
203
204
205
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base32</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key299">base32</a>, <a href="../../../../index.html#key340">hex</a>, <a href="../../../../index.html#key341">rfc3548</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Public domain</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/base64/ascii85.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>ascii85 - Text encoding &amp; decoding binary data</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>ascii85 - Text encoding &amp; decoding binary data</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ascii85.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2010, Emiliano Gavil&amp;aacute;n
   -->
<!-- ascii85.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ascii85(n) 1.0 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ascii85 - ascii85-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ascii85.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2010, Emiliano Gavil&aacute;n
   -->
<! -- ascii85.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ascii85(n) 1.0 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ascii85 - ascii85-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ascii85">ascii85</a>, <a href="../../../../index.html#encoding">encoding</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, Emiliano Gavil&aacute;n</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








184
185
186
187
188
189
190






191
192
193
194
195
196
197
198
199
200
201
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key719">ascii85</a>, <a href="../../../../index.html#key254">encoding</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, Emiliano Gavil&aacute;n</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/base64/base64.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>base64 - Text encoding &amp; decoding binary data</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>base64 - Text encoding &amp; decoding binary data</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'base64.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2000, Eric Melski   -- Copyright &amp;copy; 2001, Miguel Sofer
   -->
<!-- base64.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base64(n) 2.4.2 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base64 - base64-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'base64.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2000, Eric Melski   -- Copyright &copy; 2001, Miguel Sofer
   -->
<! -- base64.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">base64(n) 2.4.2 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>base64 - base64-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#base64">base64</a>, <a href="../../../../index.html#encoding">encoding</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2000, Eric Melski<br>
Copyright &copy; 2001, Miguel Sofer</p>
</div>
</div></body></html>







<
<
<
<
<
<


|









177
178
179
180
181
182
183






184
185
186
187
188
189
190
191
192
193
194
195
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key587">base64</a>, <a href="../../../../index.html#key254">encoding</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2000, Eric Melski<br>
Copyright &copy; 2001, Miguel Sofer</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/base64/uuencode.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>uuencode - Text encoding &amp; decoding binary data</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>uuencode - Text encoding &amp; decoding binary data</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'uuencode.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002, Pat Thoyts
   -->
<!-- uuencode.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uuencode(n) 1.1.4 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uuencode - UU-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'uuencode.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002, Pat Thoyts
   -->
<! -- uuencode.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uuencode(n) 1.1.4 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uuencode - UU-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#encoding">encoding</a>, <a href="../../../../index.html#uuencode">uuencode</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








200
201
202
203
204
205
206






207
208
209
210
211
212
213
214
215
216
217
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key254">encoding</a>, <a href="../../../../index.html#key253">uuencode</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/base64/yencode.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>yencode - Text encoding &amp; decoding binary data</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>yencode - Text encoding &amp; decoding binary data</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'yencode.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002, Pat Thoyts
   -->
<!-- yencode.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">yencode(n) 1.1.2 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>yencode - Y-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'yencode.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002, Pat Thoyts
   -->
<! -- yencode.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">yencode(n) 1.1.2 tcllib &quot;Text encoding &amp; decoding binary data&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>yencode - Y-encode/decode binary data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a Tcl-only implementation of the yEnc file
encoding. This is a recently introduced method of encoding binary
files for transmission through Usenet. This encoding packs binary data
into a format that requires an 8-bit clean transmission layer but that
escapes characters special to the <i class="term"><a href="../../../../index.html#nntp">NNTP</a></i> posting protocols. See
<a href="http://www.yenc.org/">http://www.yenc.org/</a> for details concerning the algorithm.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::yencode::encode</b> <i class="arg">string</i></a></dt>
<dd><p>returns the yEnc encoded data.</p></dd>
<dt><a name="2"><b class="cmd">::yencode::decode</b> <i class="arg">string</i></a></dt>
<dd><p>Decodes the given yEnc encoded data.</p></dd>
<dt><a name="3"><b class="cmd">::yencode::yencode</b> <span class="opt">?<b class="option">-name</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-line</b> <i class="arg">integer</i>?</span> <span class="opt">?<b class="option">-crc32</b> <i class="arg">boolean</i>?</span> (<b class="option">-file</b> <i class="arg">filename</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i>)</a></dt>







|







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a Tcl-only implementation of the yEnc file
encoding. This is a recently introduced method of encoding binary
files for transmission through Usenet. This encoding packs binary data
into a format that requires an 8-bit clean transmission layer but that
escapes characters special to the <i class="term"><a href="../../../../index.html#key652">NNTP</a></i> posting protocols. See
<a href="http://www.yenc.org/">http://www.yenc.org/</a> for details concerning the algorithm.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::yencode::encode</b> <i class="arg">string</i></a></dt>
<dd><p>returns the yEnc encoded data.</p></dd>
<dt><a name="2"><b class="cmd">::yencode::decode</b> <i class="arg">string</i></a></dt>
<dd><p>Decodes the given yEnc encoded data.</p></dd>
<dt><a name="3"><b class="cmd">::yencode::yencode</b> <span class="opt">?<b class="option">-name</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-line</b> <i class="arg">integer</i>?</span> <span class="opt">?<b class="option">-crc32</b> <i class="arg">boolean</i>?</span> (<b class="option">-file</b> <i class="arg">filename</i> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i>)</a></dt>
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#encoding">encoding</a>, <a href="../../../../index.html#yenc">yEnc</a>, <a href="../../../../index.html#ydecode">ydecode</a>, <a href="../../../../index.html#yencode">yencode</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








193
194
195
196
197
198
199






200
201
202
203
204
205
206
207
208
209
210
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>base64</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key254">encoding</a>, <a href="../../../../index.html#key708">yEnc</a>, <a href="../../../../index.html#key706">ydecode</a>, <a href="../../../../index.html#key707">yencode</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/bee/bee.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>bee - BitTorrent</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>bee - BitTorrent</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bee.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- bee.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bee(n) 0.1 tcllib &quot;BitTorrent&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bee - BitTorrent Serialization Format Encoder/Decoder</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bee.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- bee.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bee(n) 0.1 tcllib &quot;BitTorrent&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bee - BitTorrent Serialization Format Encoder/Decoder</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bee</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bittorrent">BitTorrent</a>, <a href="../../../../index.html#bee">bee</a>, <a href="../../../../index.html#bittorrent">bittorrent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#torrent">torrent</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








364
365
366
367
368
369
370






371
372
373
374
375
376
377
378
379
380
381
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bee</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key390">BitTorrent</a>, <a href="../../../../index.html#key388">bee</a>, <a href="../../../../index.html#key389">bittorrent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key391">torrent</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/bench/bench.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>bench - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>bench - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bench.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- bench.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench(n) 0.4 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench - bench - Processing benchmark suites</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bench.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- bench.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench(n) 0.4 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench - bench - Processing benchmark suites</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench_intro.html">bench_intro</a>, <a href="bench_lang_intro.html">bench_lang_intro</a>, <a href="bench_lang_spec.html">bench_lang_spec</a>, bench_read, bench_wcsv, bench_wtext</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#benchmark">benchmark</a>, <a href="../../../../index.html#merging">merging</a>, <a href="../../../../index.html#normalization">normalization</a>, <a href="../../../../index.html#performance">performance</a>, <a href="../../../../index.html#testing">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








318
319
320
321
322
323
324






325
326
327
328
329
330
331
332
333
334
335
336
337
338
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench_intro.html">bench_intro</a>, <a href="bench_lang_intro.html">bench_lang_intro</a>, <a href="bench_lang_spec.html">bench_lang_spec</a>, bench_read, bench_wcsv, bench_wtext</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key111">merging</a>, <a href="../../../../index.html#key112">normalization</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key99">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/bench/bench_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>bench_intro - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>bench_intro - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bench_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- bench_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench_intro(n) 1.0 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench_intro - bench introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bench_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- bench_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench_intro(n) 1.0 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench_intro - bench introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, bench_lang_faq, <a href="bench_lang_intro.html">bench_lang_intro</a>, <a href="bench_lang_spec.html">bench_lang_spec</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bench_language">bench language</a>, <a href="../../../../index.html#benchmark">benchmark</a>, <a href="../../../../index.html#performance">performance</a>, <a href="../../../../index.html#testing">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








160
161
162
163
164
165
166






167
168
169
170
171
172
173
174
175
176
177
178
179
180
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, bench_lang_faq, <a href="bench_lang_intro.html">bench_lang_intro</a>, <a href="bench_lang_spec.html">bench_lang_spec</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key98">bench language</a>, <a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key99">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/bench/bench_lang_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>bench_lang_intro - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>bench_lang_intro - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bench_lang_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- bench_lang_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench_lang_intro(n) 1.0 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench_lang_intro - bench language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bench_lang_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- bench_lang_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench_lang_intro(n) 1.0 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench_lang_intro - bench language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is an informal introduction to version 1 of the bench
language based on a multitude of examples. After reading this a
benchmark writer should be ready to understand the formal
<i class="term"><a href="bench_lang_spec.html">bench language specification</a></i>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Fundamentals</a></h3>
<p>In the broadest terms possible the <i class="term"><a href="../../../../index.html#bench_language">bench language</a></i> is
essentially Tcl, plus a number of commands to support the declaration
of benchmarks.
A document written in this language is a Tcl script and has the same
syntax.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basics</a></h3>
<p>One of the most simplest benchmarks which can be written in bench is</p>
<pre class="doctools_example">
bench -desc LABEL -body {
    set a b
}
</pre>
<p>This code declares a benchmark named <b class="const">LABEL</b> which measures the
time it takes to assign a value to a variable. The Tcl code doing this
assignment is the <b class="option">-body</b> of the benchmark.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Pre- and postprocessing</a></h3>
<p>Our next example demonstrates how to declare <i class="term">initialization</i> and
<i class="term"><a href="../../../../index.html#cleanup">cleanup</a></i> code, i.e. code computing information for the use of
the <b class="option">-body</b>, and for releasing such resources after the
measurement is done.
They are the <b class="option">-pre</b>- and the <b class="option">-post</b>-body, respectively.</p>
<p>In our example, directly drawn from the benchmark suite of Tcllib's
<b class="package"><a href="../aes/aes.html">aes</a></b> package, the concrete initialization code constructs the
key schedule used by the encryption command whose speed we measure,
and the cleanup code releases any resources bound to that schedule.</p>







|


















|







133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is an informal introduction to version 1 of the bench
language based on a multitude of examples. After reading this a
benchmark writer should be ready to understand the formal
<i class="term"><a href="bench_lang_spec.html">bench language specification</a></i>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Fundamentals</a></h3>
<p>In the broadest terms possible the <i class="term"><a href="../../../../index.html#key98">bench language</a></i> is
essentially Tcl, plus a number of commands to support the declaration
of benchmarks.
A document written in this language is a Tcl script and has the same
syntax.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basics</a></h3>
<p>One of the most simplest benchmarks which can be written in bench is</p>
<pre class="doctools_example">
bench -desc LABEL -body {
    set a b
}
</pre>
<p>This code declares a benchmark named <b class="const">LABEL</b> which measures the
time it takes to assign a value to a variable. The Tcl code doing this
assignment is the <b class="option">-body</b> of the benchmark.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Pre- and postprocessing</a></h3>
<p>Our next example demonstrates how to declare <i class="term">initialization</i> and
<i class="term"><a href="../../../../index.html#key158">cleanup</a></i> code, i.e. code computing information for the use of
the <b class="option">-body</b>, and for releasing such resources after the
measurement is done.
They are the <b class="option">-pre</b>- and the <b class="option">-post</b>-body, respectively.</p>
<p>In our example, directly drawn from the benchmark suite of Tcllib's
<b class="package"><a href="../aes/aes.html">aes</a></b> package, the concrete initialization code constructs the
key schedule used by the encryption command whose speed we measure,
and the cleanup code releases any resources bound to that schedule.</p>
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench_intro.html">bench_intro</a>, <a href="bench_lang_spec.html">bench_lang_spec</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bench_language">bench language</a>, <a href="../../../../index.html#benchmark">benchmark</a>, <a href="../../../../index.html#examples">examples</a>, <a href="../../../../index.html#performance">performance</a>, <a href="../../../../index.html#testing">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








236
237
238
239
240
241
242






243
244
245
246
247
248
249
250
251
252
253
254
255
256
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench_intro.html">bench_intro</a>, <a href="bench_lang_spec.html">bench_lang_spec</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key98">bench language</a>, <a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key370">examples</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key99">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/bench/bench_lang_spec.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>bench_lang_spec - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>bench_lang_spec - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bench_lang_spec.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- bench_lang_spec.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench_lang_spec(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench_lang_spec - bench language specification</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bench_lang_spec.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- bench_lang_spec.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench_lang_spec(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench_lang_spec - bench language specification</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench_intro.html">bench_intro</a>, <a href="bench_lang_intro.html">bench_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bench_language">bench language</a>, <a href="../../../../index.html#benchmark">benchmark</a>, <a href="../../../../index.html#performance">performance</a>, <a href="../../../../index.html#specification">specification</a>, <a href="../../../../index.html#testing">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








216
217
218
219
220
221
222






223
224
225
226
227
228
229
230
231
232
233
234
235
236
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench_intro.html">bench_intro</a>, <a href="bench_lang_intro.html">bench_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key98">bench language</a>, <a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key660">specification</a>, <a href="../../../../index.html#key99">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/bench/bench_read.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>bench::in - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>bench::in - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bench_read.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- bench::in.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench::in(n) 0.1 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench::in - bench::in - Reading benchmark results</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bench_read.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- bench::in.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench::in(n) 0.1 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench::in - bench::in - Reading benchmark results</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, <a href="bench_wcsv.html">bench::out::csv</a>, <a href="bench_wtext.html">bench::out::text</a>, <a href="bench_intro.html">bench_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#benchmark">benchmark</a>, <a href="../../../../index.html#csv">csv</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#human_readable">human readable</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#performance">performance</a>, <a href="../../../../index.html#reading">reading</a>, <a href="../../../../index.html#testing">testing</a>, <a href="../../../../index.html#text">text</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
185
186
187
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, <a href="bench_wcsv.html">bench::out::csv</a>, <a href="bench_wtext.html">bench::out::text</a>, <a href="bench_intro.html">bench_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key49">csv</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key504">human readable</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key525">reading</a>, <a href="../../../../index.html#key99">testing</a>, <a href="../../../../index.html#key248">text</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/bench/bench_wcsv.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>bench::out::csv - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>bench::out::csv - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bench_wcsv.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- bench::out::csv.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench::out::csv(n) 0.1.2 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench::out::csv - bench::out::csv - Formatting benchmark results as CSV</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bench_wcsv.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- bench::out::csv.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench::out::csv(n) 0.1.2 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench::out::csv - bench::out::csv - Formatting benchmark results as CSV</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, <a href="bench_wtext.html">bench::out::text</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#benchmark">benchmark</a>, <a href="../../../../index.html#csv">csv</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#performance">performance</a>, <a href="../../../../index.html#testing">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








159
160
161
162
163
164
165






166
167
168
169
170
171
172
173
174
175
176
177
178
179
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, <a href="bench_wtext.html">bench::out::text</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key49">csv</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key99">testing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/bench/bench_wtext.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>bench::out::text - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>bench::out::text - Benchmarking/Performance tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bench_wtext.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- bench::out::text.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench::out::text(n) 0.1.2 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench::out::text - bench::out::text - Formatting benchmark results as human readable text</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bench_wtext.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- bench::out::text.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bench::out::text(n) 0.1.2 tcllib &quot;Benchmarking/Performance tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bench::out::text - bench::out::text - Formatting benchmark results as human readable text</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, <a href="bench_wcsv.html">bench::out::csv</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#benchmark">benchmark</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#human_readable">human readable</a>, <a href="../../../../index.html#performance">performance</a>, <a href="../../../../index.html#testing">testing</a>, <a href="../../../../index.html#text">text</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








159
160
161
162
163
164
165






166
167
168
169
170
171
172
173
174
175
176
177
178
179
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bench</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="bench.html">bench</a>, <a href="bench_wcsv.html">bench::out::csv</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key101">benchmark</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key504">human readable</a>, <a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key99">testing</a>, <a href="../../../../index.html#key248">text</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Benchmark tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/bibtex/bibtex.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>bibtex - bibtex</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>bibtex - bibtex</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bibtex.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 for documentation, Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- bibtex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bibtex(n) 0.7 tcllib &quot;bibtex&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bibtex - Parse bibtex files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">bibtex <span class="opt">?0.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::bibtex::parse</b> <span class="opt">?<i class="arg">options</i>?</span> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::bibtex::parse</b> <i class="arg">text</i></a></li>
<li><a href="#3"><b class="cmd">::bibtex::parse</b> <span class="opt">?<b class="option">-command</b> <i class="arg">cmd</i>?</span> <b class="option">-channel</b> <i class="arg">chan</i></a></li>
<li><a href="#4"><b class="cmd">::bibtex::parse</b> <span class="opt">?<b class="option">-recordcommand</b>   <i class="arg">recordcmd</i>?</span> <span class="opt">?<b class="option">-preamblecommand</b> <i class="arg">preamblecmd</i>?</span> <span class="opt">?<b class="option">-stringcommand</b>   <i class="arg">stringcmd</i>?</span> <span class="opt">?<b class="option">-commentcommand</b>  <i class="arg">commentcmd</i>?</span> <span class="opt">?<b class="option">-progresscommand</b> <i class="arg">progresscmd</i>?</span> <span class="opt">?<b class="option">-casesensitivestrings</b> <i class="arg">bool</i>?</span> (<i class="arg">text</i> | <b class="option">-channel</b> <i class="arg">chan</i>)</a></li>
<li><a href="#5"><b class="cmd">::bibtex::wait</b> <i class="arg">token</i></a></li>







|

|

|



|
|
|
|
|
|


|


















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bibtex.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 for documentation, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- bibtex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">bibtex(n) 0.6 tcllib &quot;bibtex&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>bibtex - Parse bibtex files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">bibtex <span class="opt">?0.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::bibtex::parse</b> <span class="opt">?<i class="arg">options</i>?</span> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::bibtex::parse</b> <i class="arg">text</i></a></li>
<li><a href="#3"><b class="cmd">::bibtex::parse</b> <span class="opt">?<b class="option">-command</b> <i class="arg">cmd</i>?</span> <b class="option">-channel</b> <i class="arg">chan</i></a></li>
<li><a href="#4"><b class="cmd">::bibtex::parse</b> <span class="opt">?<b class="option">-recordcommand</b>   <i class="arg">recordcmd</i>?</span> <span class="opt">?<b class="option">-preamblecommand</b> <i class="arg">preamblecmd</i>?</span> <span class="opt">?<b class="option">-stringcommand</b>   <i class="arg">stringcmd</i>?</span> <span class="opt">?<b class="option">-commentcommand</b>  <i class="arg">commentcmd</i>?</span> <span class="opt">?<b class="option">-progresscommand</b> <i class="arg">progresscmd</i>?</span> <span class="opt">?<b class="option">-casesensitivestrings</b> <i class="arg">bool</i>?</span> (<i class="arg">text</i> | <b class="option">-channel</b> <i class="arg">chan</i>)</a></li>
<li><a href="#5"><b class="cmd">::bibtex::wait</b> <i class="arg">token</i></a></li>
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bibtex</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bibliography">bibliography</a>, <a href="../../../../index.html#bibtex">bibtex</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#text_processing">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 for documentation, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








245
246
247
248
249
250
251






252
253
254
255
256
257
258
259
260
261
262
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>bibtex</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key421">bibliography</a>, <a href="../../../../index.html#key422">bibtex</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key192">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 for documentation, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/blowfish/blowfish.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>blowfish - Blowfish Block Cipher</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>blowfish - Blowfish Block Cipher</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'blowfish.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- blowfish.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">blowfish(n) 1.0.5 tcllib &quot;Blowfish Block Cipher&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>blowfish - Implementation of the Blowfish block cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'blowfish.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- blowfish.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">blowfish(n) 1.0.3 tcllib &quot;Blowfish Block Cipher&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>blowfish - Implementation of the Blowfish block cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">blowfish <span class="opt">?1.0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::blowfish::blowfish</b> <span class="opt">?<i class="arg">-mode [ecb|cbc]</i>?</span> <span class="opt">?<i class="arg">-dir [encrypt|decrypt]</i>?</span> <i class="arg">-key keydata</i> <span class="opt">?<i class="arg">-iv vector</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> <span class="opt">?<i class="arg">-pad padchar</i>?</span> [ <i class="arg">-in channel</i> | <span class="opt">?<i class="arg">--</i>?</span> <i class="arg">data</i> ]</a></li>
<li><a href="#2"><b class="cmd">::blowfish::Init</b> <i class="arg">mode</i> <i class="arg">keydata</i> <i class="arg">iv</i></a></li>
<li><a href="#3"><b class="cmd">::blowfish::Encrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::blowfish::Decrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::blowfish::Reset</b> <i class="arg">Key</i> <i class="arg">iv</i></a></li>







|







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">blowfish <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::blowfish::blowfish</b> <span class="opt">?<i class="arg">-mode [ecb|cbc]</i>?</span> <span class="opt">?<i class="arg">-dir [encrypt|decrypt]</i>?</span> <i class="arg">-key keydata</i> <span class="opt">?<i class="arg">-iv vector</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> <span class="opt">?<i class="arg">-pad padchar</i>?</span> [ <i class="arg">-in channel</i> | <span class="opt">?<i class="arg">--</i>?</span> <i class="arg">data</i> ]</a></li>
<li><a href="#2"><b class="cmd">::blowfish::Init</b> <i class="arg">mode</i> <i class="arg">keydata</i> <i class="arg">iv</i></a></li>
<li><a href="#3"><b class="cmd">::blowfish::Encrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::blowfish::Decrypt</b> <i class="arg">Key</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::blowfish::Reset</b> <i class="arg">Key</i> <i class="arg">iv</i></a></li>
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>blowfish</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>3des, <a href="../des/des.html">des</a>, <a href="../rc4/rc4.html">rc4</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#block_cipher">block cipher</a>, <a href="../../../../index.html#blowfish">blowfish</a>, <a href="../../../../index.html#cryptography">cryptography</a>, <a href="../../../../index.html#encryption">encryption</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








247
248
249
250
251
252
253






254
255
256
257
258
259
260
261
262
263
264
265
266
267
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>blowfish</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>3des, <a href="../des/des.html">des</a>, <a href="../rc4/rc4.html">rc4</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key297">block cipher</a>, <a href="../../../../index.html#key801">blowfish</a>, <a href="../../../../index.html#key800">cryptography</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/cache/async.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>cache::async - In-memory caches</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>cache::async - In-memory caches</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'async.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- cache::async.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cache::async(n) 0.3.1 tcllib &quot;In-memory caches&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cache::async - Asynchronous in-memory cache</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">cache::async <span class="opt">?0.3.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::cache::async</b> <i class="arg">objectName</i> <i class="arg">commandprefix</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">get</b> <i class="arg">key</i> <i class="arg">donecmdprefix</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">set</b> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">unset</b> <i class="arg">key</i></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">exists</b> <i class="arg">key</i></a></li>







|

|

|



|
|
|
|
|
|


|


















|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'async.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- cache::async.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cache::async(n) 0.3 tcllib &quot;In-memory caches&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cache::async - Asynchronous in-memory cache</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">cache::async <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::cache::async</b> <i class="arg">objectName</i> <i class="arg">commandprefix</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectName</i> <b class="method">get</b> <i class="arg">key</i> <i class="arg">donecmdprefix</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">set</b> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">unset</b> <i class="arg">key</i></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">exists</b> <i class="arg">key</i></a></li>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
easy to use caches as a facade for any data provider.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports a class, <b class="class">cache::async</b>, as specified
below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::cache::async</b> <i class="arg">objectName</i> <i class="arg">commandprefix</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>The command creates a new <i class="term"><a href="../../../../index.html#cache">cache</a></i> object with an associated
global Tcl command whose name is <i class="arg">objectName</i>.  This command may
be used to invoke various operations on the object.</p>
<p>The <i class="arg">commandprefix</i> is the action to perform when an user asks for
data in the cache and the cache doesn't yet know about the key. When
run the commandprefix is given three additional arguments, the string
<b class="const">get</b>, the key requested, and the cache object itself, in the
form of its object command, in this order. The execution of the action







|







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
easy to use caches as a facade for any data provider.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The package exports a class, <b class="class">cache::async</b>, as specified
below.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::cache::async</b> <i class="arg">objectName</i> <i class="arg">commandprefix</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>The command creates a new <i class="term"><a href="../../../../index.html#key384">cache</a></i> object with an associated
global Tcl command whose name is <i class="arg">objectName</i>.  This command may
be used to invoke various operations on the object.</p>
<p>The <i class="arg">commandprefix</i> is the action to perform when an user asks for
data in the cache and the cache doesn't yet know about the key. When
run the commandprefix is given three additional arguments, the string
<b class="const">get</b>, the key requested, and the cache object itself, in the
form of its object command, in this order. The execution of the action
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>cache</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#asynchronous">asynchronous</a>, <a href="../../../../index.html#cache">cache</a>, <a href="../../../../index.html#callback">callback</a>, <a href="../../../../index.html#synchronous">synchronous</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





227
228
229
230
231
232
233






234
235
236
237
238
239
240
241
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>cache</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key644">asynchronous</a>, <a href="../../../../index.html#key384">cache</a>, <a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key645">synchronous</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/clay/clay.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
<!DOCTYPE html><html><head>
<title>clay - Clay Framework</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'clay.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2018 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- clay.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">clay(n) 0.8.6 tcllib &quot;Clay Framework&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>clay - A minimalist framework for large scale OO Projects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Structured Data</a></li>
<li class="doctools_subsection"><a href="#subsection2">Clay Dialect</a></li>
<li class="doctools_subsection"><a href="#subsection3">Method Delegation</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Classes</a>
<ul>
<li class="doctools_subsection"><a href="#subsection4">Class  clay::class</a></li>
<li class="doctools_subsection"><a href="#subsection5">Class  clay::object</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">AUTHORS</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">uuid</b></li>
<li>package require <b class="pkgname">oo::dialect</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1">proc <b class="cmd">clay::PROC</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i> <span class="opt">?<i class="arg">ninja</i> <b class="const"></b>?</span></a></li>
<li><a href="#2">proc <b class="cmd">clay::_ancestors</b> <i class="arg">resultvar</i> <i class="arg">class</i></a></li>
<li><a href="#3">proc <b class="cmd">clay::ancestors</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#4">proc <b class="cmd">clay::args_to_dict</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#5">proc <b class="cmd">clay::args_to_options</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#6">proc <b class="cmd">clay::dynamic_arguments</b> <i class="arg">ensemble</i> <i class="arg">method</i> <i class="arg">arglist</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#7">proc <b class="cmd">clay::dynamic_wrongargs_message</b> <i class="arg">arglist</i></a></li>
<li><a href="#8">proc <b class="cmd">clay::is_dict</b> <i class="arg">d</i></a></li>
<li><a href="#9">proc <b class="cmd">clay::is_null</b> <i class="arg">value</i></a></li>
<li><a href="#10">proc <b class="cmd">clay::leaf</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#11">proc <b class="cmd">clay::K</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#12">proc <b class="cmd">clay::noop</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#13">proc <b class="cmd">clay::cleanup</b></a></li>
<li><a href="#14">proc <b class="cmd">clay::object_create</b> <i class="arg">objname</i> <span class="opt">?<i class="arg">class</i> <b class="const"></b>?</span></a></li>
<li><a href="#15">proc <b class="cmd">clay::object_rename</b> <i class="arg">object</i> <i class="arg">newname</i></a></li>
<li><a href="#16">proc <b class="cmd">clay::object_destroy</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#17">proc <b class="cmd">clay::path</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#18">proc <b class="cmd">clay::putb</b> <span class="opt">?<i class="arg">map</i>?</span> <i class="arg">text</i></a></li>
<li><a href="#19">proc <b class="cmd">clay::script_path</b></a></li>
<li><a href="#20">proc <b class="cmd">clay::NSNormalize</b> <i class="arg">qualname</i></a></li>
<li><a href="#21">proc <b class="cmd">clay::uuid_generate</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#22">proc <b class="cmd">clay::uuid::generate_tcl_machinfo</b></a></li>
<li><a href="#23">proc <b class="cmd">clay::uuid::tostring</b> <i class="arg">uuid</i></a></li>
<li><a href="#24">proc <b class="cmd">clay::uuid::fromstring</b> <i class="arg">uuid</i></a></li>
<li><a href="#25">proc <b class="cmd">clay::uuid::equal</b> <i class="arg">left</i> <i class="arg">right</i></a></li>
<li><a href="#26">proc <b class="cmd">clay::uuid</b> <i class="arg">cmd</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#27">proc <b class="cmd">clay::tree::sanitize</b> <i class="arg">dict</i></a></li>
<li><a href="#28">proc <b class="cmd">clay::tree::_sanitizeb</b> <i class="arg">path</i> <i class="arg">varname</i> <i class="arg">dict</i></a></li>
<li><a href="#29">proc <b class="cmd">clay::tree::storage</b> <i class="arg">rawpath</i></a></li>
<li><a href="#30">proc <b class="cmd">clay::tree::dictset</b> <i class="arg">varname</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#31">proc <b class="cmd">clay::tree::dictmerge</b> <i class="arg">varname</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#32">proc <b class="cmd">clay::tree::merge</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#33">proc <b class="cmd">dictargs::proc</b> <i class="arg">name</i> <i class="arg">argspec</i> <i class="arg">body</i></a></li>
<li><a href="#34">proc <b class="cmd">dictargs::method</b> <i class="arg">name</i> <i class="arg">argspec</i> <i class="arg">body</i></a></li>
<li><a href="#35">proc <b class="cmd">clay::dialect::Push</b> <i class="arg">class</i></a></li>
<li><a href="#36">proc <b class="cmd">clay::dialect::Peek</b></a></li>
<li><a href="#37">proc <b class="cmd">clay::dialect::Pop</b></a></li>
<li><a href="#38">proc <b class="cmd">clay::dialect::create</b> <i class="arg">name</i> <span class="opt">?<i class="arg">parent</i> <b class="const"></b>?</span></a></li>
<li><a href="#39">proc <b class="cmd">clay::dialect::NSNormalize</b> <i class="arg">namespace</i> <i class="arg">qualname</i></a></li>
<li><a href="#40">proc <b class="cmd">clay::dialect::DefineThunk</b> <i class="arg">target</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#41">proc <b class="cmd">clay::dialect::Canonical</b> <i class="arg">namespace</i> <i class="arg">NSpace</i> <i class="arg">class</i></a></li>
<li><a href="#42">proc <b class="cmd">clay::dialect::Define</b> <i class="arg">namespace</i> <i class="arg">class</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#43">proc <b class="cmd">clay::dialect::Aliases</b> <i class="arg">namespace</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#44">proc <b class="cmd">clay::dialect::SuperClass</b> <i class="arg">namespace</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#45">proc <b class="cmd">clay::dynamic_methods</b> <i class="arg">class</i></a></li>
<li><a href="#46">proc <b class="cmd">clay::dynamic_methods_class</b> <i class="arg">thisclass</i></a></li>
<li><a href="#47">proc <b class="cmd">clay::define::Array</b> <i class="arg">name</i> <span class="opt">?<i class="arg">values</i> <b class="const"></b>?</span></a></li>
<li><a href="#48">proc <b class="cmd">clay::define::Delegate</b> <i class="arg">name</i> <i class="arg">info</i></a></li>
<li><a href="#49">proc <b class="cmd">clay::define::constructor</b> <i class="arg">arglist</i> <i class="arg">rawbody</i></a></li>
<li><a href="#50">proc <b class="cmd">clay::define::Class_Method</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#51">proc <b class="cmd">clay::define::class_method</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#52">proc <b class="cmd">clay::define::clay</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#53">proc <b class="cmd">clay::define::destructor</b> <i class="arg">rawbody</i></a></li>
<li><a href="#54">proc <b class="cmd">clay::define::Dict</b> <i class="arg">name</i> <span class="opt">?<i class="arg">values</i> <b class="const"></b>?</span></a></li>
<li><a href="#55">proc <b class="cmd">clay::define::Option</b> <i class="arg">name</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#56">proc <b class="cmd">clay::define::Method</b> <i class="arg">name</i> <i class="arg">argstyle</i> <i class="arg">argspec</i> <i class="arg">body</i></a></li>
<li><a href="#57">proc <b class="cmd">clay::define::Option_Class</b> <i class="arg">name</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#58">proc <b class="cmd">clay::define::Variable</b> <i class="arg">name</i> <span class="opt">?<i class="arg">default</i> <b class="const"></b>?</span></a></li>
<li><a href="#59">proc <b class="cmd">clay::ensemble_methodbody</b> <i class="arg">ensemble</i> <i class="arg">einfo</i></a></li>
<li><a href="#60">proc <b class="cmd">clay::define::Ensemble</b> <i class="arg">rawmethod</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#61">proc <b class="cmd">clay::event::cancel</b> <i class="arg">self</i> <span class="opt">?<i class="arg">task</i> <b class="const">*</b>?</span></a></li>
<li><a href="#62">proc <b class="cmd">clay::event::generate</b> <i class="arg">self</i> <i class="arg">event</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#63">proc <b class="cmd">clay::event::nextid</b></a></li>
<li><a href="#64">proc <b class="cmd">clay::event::Notification_list</b> <i class="arg">self</i> <i class="arg">event</i> <span class="opt">?<i class="arg">stackvar</i> <b class="const"></b>?</span></a></li>
<li><a href="#65">proc <b class="cmd">clay::event::notify</b> <i class="arg">rcpt</i> <i class="arg">sender</i> <i class="arg">event</i> <i class="arg">eventinfo</i></a></li>
<li><a href="#66">proc <b class="cmd">clay::event::process</b> <i class="arg">self</i> <i class="arg">handle</i> <i class="arg">script</i></a></li>
<li><a href="#67">proc <b class="cmd">clay::event::schedule</b> <i class="arg">self</i> <i class="arg">handle</i> <i class="arg">interval</i> <i class="arg">script</i></a></li>
<li><a href="#68">proc <b class="cmd">clay::event::subscribe</b> <i class="arg">self</i> <i class="arg">who</i> <i class="arg">event</i></a></li>
<li><a href="#69">proc <b class="cmd">clay::event::unsubscribe</b> <i class="arg">self</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#70">proc <b class="cmd">clay::singleton</b> <i class="arg">name</i> <i class="arg">script</i></a></li>
<li><a href="#71">method <b class="cmd">clay ancestors</b></a></li>
<li><a href="#72">method <b class="cmd">clay dump</b></a></li>
<li><a href="#73">method <b class="cmd">clay find</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></li>
<li><a href="#74">method <b class="cmd">clay get</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></li>
<li><a href="#75">method <b class="cmd">clay GET</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></li>
<li><a href="#76">method <b class="cmd">clay merge</b> <i class="arg">dict</i> <span class="opt">?<b class="option">dict...</b>?</span></a></li>
<li><a href="#77">method <b class="cmd">clay replace</b> <i class="arg">dictionary</i></a></li>
<li><a href="#78">method <b class="cmd">clay search</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></li>
<li><a href="#79">method <b class="cmd">clay set</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span> <i class="arg">value</i></a></li>
<li><a href="#80">method <b class="cmd">clay ancestors</b></a></li>
<li><a href="#81">method <b class="cmd">clay cache</b> <i class="arg">path</i> <i class="arg">value</i></a></li>
<li><a href="#82">method <b class="cmd">clay cget</b> <i class="arg">field</i></a></li>
<li><a href="#83">method <b class="cmd">clay delegate</b> <span class="opt">?<i class="arg">stub</i>?</span> <span class="opt">?<i class="arg">object</i>?</span></a></li>
<li><a href="#84">method <b class="cmd">clay dump</b></a></li>
<li><a href="#85">method <b class="cmd">clay ensemble_map</b></a></li>
<li><a href="#86">method <b class="cmd">clay eval</b> <i class="arg">script</i></a></li>
<li><a href="#87">method <b class="cmd">clay evolve</b></a></li>
<li><a href="#88">method <b class="cmd">clay exists</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></li>
<li><a href="#89">method <b class="cmd">clay flush</b></a></li>
<li><a href="#90">method <b class="cmd">clay forward</b> <i class="arg">method</i> <i class="arg">object</i></a></li>
<li><a href="#91">method <b class="cmd">clay get</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></li>
<li><a href="#92">method <b class="cmd">clay leaf</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></li>
<li><a href="#93">method <b class="cmd">clay merge</b> <i class="arg">dict</i> <span class="opt">?<b class="option">dict...</b>?</span></a></li>
<li><a href="#94">method <b class="cmd">clay mixin</b> <i class="arg">class</i> <span class="opt">?<b class="option">class...</b>?</span></a></li>
<li><a href="#95">method <b class="cmd">clay mixinmap</b> <span class="opt">?<i class="arg">stub</i>?</span> <span class="opt">?<i class="arg">classes</i>?</span></a></li>
<li><a href="#96">method <b class="cmd">clay provenance</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></li>
<li><a href="#97">method <b class="cmd">clay replace</b> <i class="arg">dictionary</i></a></li>
<li><a href="#98">method <b class="cmd">clay search</b> <i class="arg">path</i> <i class="arg">valuevar</i> <i class="arg">isleafvar</i></a></li>
<li><a href="#99">method <b class="cmd">clay source</b> <i class="arg">filename</i></a></li>
<li><a href="#100">method <b class="cmd">clay set</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span> <i class="arg">value</i></a></li>
<li><a href="#101">method <b class="cmd">InitializePublic</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Clay introduces a method ensemble to both <b class="class">oo::class</b> and <b class="class">oo::object</b> called
clay. This ensemble handles all of the high level interactions within the framework.
Clay stores structured data. Clan manages method delegation. Clay has facilities to
manage the complex interactions that come about with mixins.</p>
<p>The central concept is that inside of every object and class
(which are actually objects too) is a dict called clay. What is stored in that dict is
left to the imagination. But because this dict is exposed via a public method, we can
share structured data between object, classes, and mixins.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Structured Data</a></h3>
<p>Clay uses a standardized set of method interactions and introspection that TclOO already provides to perform on-the-fly searches. On-the-fly searches mean that the data is never stale, and we avoid many of the sorts of collisions that would arise when objects start mixing in other classes during operation.</p>
<p>The <b class="method">clay</b> methods for both classes and objects have a get and a set method. For objects, get will search through the local clay dict. If the requested leaf is not found, or the query is for a branch, the system will then begin to poll the clay methods of all of the class that implements the object, all of that classes’ ancestors, as well as all of the classes that have been mixed into this object, and all of their ancestors.</p>
<p>Intended branches on a tree end with a directory slash (/). Intended leaves are left unadorned. This is a guide for the tool that builds the search
results to know what parts of a dict are intended to be branches and which are intended to be leaves.
For simple cases, branch marking can be ignored:</p>
<pre class="doctools_example">
::oo::class create ::foo { }
::foo clay set property/ color blue
::foo clay set property/ shape round
set A [::foo new]
$A clay get property/
{color blue shape round}
$A clay set property/ shape square
$A clay get property/
{color blue shape square}
</pre>
<p>But when you start storing blocks of text, guessing what field is a dict and what isn’t gets messy:</p>
<pre class="doctools_example">
::foo clay set description {A generic thing of designated color and shape}
$A clay get description
{A generic thing of designated color and shape}
Without a convention for discerning branches for leaves what should have been a value can be accidentally parsed as a dictionary, and merged with all of the other values that were never intended to be merge. Here is an example of it all going wrong:
::oo::class create ::foo { }
# Add description as a leaf
::foo clay set description  {A generic thing of designated color and shape}
# Add description as a branch
::foo clay set description/  {A generic thing of designated color and shape}
::oo::class create ::bar {
  superclass foo
}
# Add description as a leaf
::bar clay set description  {A drinking establishment of designated color and shape and size}
# Add description as a branch
::bar clay set description/  {A drinking establishment of designated color and shape and size}
set B [::bar new]
# As a leaf we get the value verbatim from he nearest ancestor
$B clay get description
  {A drinking establishment of designated color and shape and size}
# As a branch we get a recursive merge
$B clay get description/
{A drinking establishment of designated color and size thing of}
</pre>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Clay Dialect</a></h3>
<p>Clay is built using the oo::dialect module from Tcllib. oo::dialect allows you to either add keywords directly to clay, or to create your own
metaclass and keyword set using Clay as a foundation. For details on the keywords and what they do, consult the functions in the ::clay::define namespace.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Method Delegation</a></h3>
<p>Method Delegation
It is sometimes useful to have an external object that can be invoked as if it were a method of the object. Clay provides a delegate ensemble method to perform that delegation, as well as introspect which methods are delegated in that manner. All delegated methods are marked with html-like tag markings (&lt; &gt;) around them.</p>
<pre class="doctools_example">
::clay::define counter {
  Variable counter 0
  method incr {{howmuch 1}} {
    my variable counter
    incr counter $howmuch
  }
  method value {} {
    my variable counter
    return $counter
  }
  method reset {} {
    my variable counter
    set counter 0
  }
}
::clay::define example {
  variable buffer
  constructor {} {
    # Build a counter object
    set obj [namespace current]::counter
    ::counter create $obj
    # Delegate the counter
    my delegate &lt;counter&gt; $obj
  }
  method line {text} {
    my &lt;counter&gt; incr
    append buffer $text
  }
}
set A [example new]
$A line {Who’s line is it anyway?}
$A &lt;counter&gt; value
1
</pre>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1">proc <b class="cmd">clay::PROC</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i> <span class="opt">?<i class="arg">ninja</i> <b class="const"></b>?</span></a></dt>
<dd><p>Because many features in this package may be added as
 commands to future tcl cores, or be provided in binary
 form by packages, I need a declaritive way of saying
 <em>Create this command if there isn't one already</em>.
 The <em>ninja</em> argument is a script to execute if the
 command is created by this mechanism.</p></dd>
<dt><a name="2">proc <b class="cmd">clay::_ancestors</b> <i class="arg">resultvar</i> <i class="arg">class</i></a></dt>
<dd></dd>
<dt><a name="3">proc <b class="cmd">clay::ancestors</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="4">proc <b class="cmd">clay::args_to_dict</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="5">proc <b class="cmd">clay::args_to_options</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="6">proc <b class="cmd">clay::dynamic_arguments</b> <i class="arg">ensemble</i> <i class="arg">method</i> <i class="arg">arglist</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="7">proc <b class="cmd">clay::dynamic_wrongargs_message</b> <i class="arg">arglist</i></a></dt>
<dd></dd>
<dt><a name="8">proc <b class="cmd">clay::is_dict</b> <i class="arg">d</i></a></dt>
<dd></dd>
<dt><a name="9">proc <b class="cmd">clay::is_null</b> <i class="arg">value</i></a></dt>
<dd></dd>
<dt><a name="10">proc <b class="cmd">clay::leaf</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="11">proc <b class="cmd">clay::K</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd></dd>
<dt><a name="12">proc <b class="cmd">clay::noop</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Perform a noop. Useful in prototyping for commenting out blocks
 of code without actually having to comment them out. It also makes
 a handy default for method delegation if a delegate has not been
 assigned yet.</p></dd>
<dt><a name="13">proc <b class="cmd">clay::cleanup</b></a></dt>
<dd><p>Process the queue of objects to be destroyed</p></dd>
<dt><a name="14">proc <b class="cmd">clay::object_create</b> <i class="arg">objname</i> <span class="opt">?<i class="arg">class</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="15">proc <b class="cmd">clay::object_rename</b> <i class="arg">object</i> <i class="arg">newname</i></a></dt>
<dd></dd>
<dt><a name="16">proc <b class="cmd">clay::object_destroy</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Mark an objects for destruction on the next cleanup</p></dd>
<dt><a name="17">proc <b class="cmd">clay::path</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="18">proc <b class="cmd">clay::putb</b> <span class="opt">?<i class="arg">map</i>?</span> <i class="arg">text</i></a></dt>
<dd><p>Append a line of text to a variable. Optionally apply a string mapping.</p></dd>
<dt><a name="19">proc <b class="cmd">clay::script_path</b></a></dt>
<dd></dd>
<dt><a name="20">proc <b class="cmd">clay::NSNormalize</b> <i class="arg">qualname</i></a></dt>
<dd></dd>
<dt><a name="21">proc <b class="cmd">clay::uuid_generate</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="22">proc <b class="cmd">clay::uuid::generate_tcl_machinfo</b></a></dt>
<dd></dd>
<dt><a name="23">proc <b class="cmd">clay::uuid::tostring</b> <i class="arg">uuid</i></a></dt>
<dd></dd>
<dt><a name="24">proc <b class="cmd">clay::uuid::fromstring</b> <i class="arg">uuid</i></a></dt>
<dd><p>Convert a string representation of a uuid into its binary format.</p></dd>
<dt><a name="25">proc <b class="cmd">clay::uuid::equal</b> <i class="arg">left</i> <i class="arg">right</i></a></dt>
<dd><p>Compare two uuids for equality.</p></dd>
<dt><a name="26">proc <b class="cmd">clay::uuid</b> <i class="arg">cmd</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>uuid generate -&gt; string rep of a new uuid
 uuid equal uuid1 uuid2</p></dd>
<dt><a name="27">proc <b class="cmd">clay::tree::sanitize</b> <i class="arg">dict</i></a></dt>
<dd><p>Output a dictionary removing any . entries added by <b class="function">clay::tree::merge</b></p></dd>
<dt><a name="28">proc <b class="cmd">clay::tree::_sanitizeb</b> <i class="arg">path</i> <i class="arg">varname</i> <i class="arg">dict</i></a></dt>
<dd><p>Helper function for ::clay::tree::sanitize
 Formats the string representation for a dictionary element within
 a human readable stream of lines, and determines if it needs to call itself
 with further indentation to express a sub-branch</p></dd>
<dt><a name="29">proc <b class="cmd">clay::tree::storage</b> <i class="arg">rawpath</i></a></dt>
<dd><p>Return the path as a storage path for clay::tree
 with all branch terminators removed.
 This command will also break arguments up if they
 contain /.</p>
<p>Example:</p>
<pre class="doctools_example"> &gt; clay::tree::storage {foo bar baz bang}
 foo bar baz bang
 &gt; clay::tree::storage {foo bar baz bang/}
 foo bar baz bang
 &gt; clay::tree::storage {foo bar baz bang:}
 foo bar baz bang:
 &gt; clay::tree::storage {foo/bar/baz bang:}
 foo bar baz bang:
 &gt; clay::tree::storage {foo/bar/baz/bang}
 foo bar baz bang
</pre>
</dd>
<dt><a name="30">proc <b class="cmd">clay::tree::dictset</b> <i class="arg">varname</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Set an element with a recursive dictionary,
 marking all branches on the way down to the
 final element.
 If the value does not exists in the nested dictionary
 it is added as a leaf. If the value already exists as a branch
 the value given is merged if the value is a valid dict. If the
 incoming value is not a valid dict, the value overrides the value
 stored, and the value is treated as a leaf from then on.</p>
<p>Example:</p>
<pre class="doctools_example"> &gt; set r {}
 &gt; ::clay::tree::dictset r option color default Green
 . {} option {. {} color {. {} default Green}}
 &gt; ::clay::tree::dictset r option {Something not dictlike}
 . {} option {Something not dictlike}
 # Note that if the value is not a dict, and you try to force it to be
 # an error with be thrown on the merge
 &gt; ::clay::tree::dictset r option color default Blue
 missing value to go with key
</pre>
</dd>
<dt><a name="31">proc <b class="cmd">clay::tree::dictmerge</b> <i class="arg">varname</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>A recursive form of dict merge, intended for modifying variables in place.</p>
<p>Example:</p>
<pre class="doctools_example"> &gt; set mydict {sub/ {sub/ {description {a block of text}}}}
 &gt; ::clay::tree::dictmerge mydict {sub/ {sub/ {field {another block of text}}}}]
 &gt; clay::tree::print $mydict
 sub/ {
   sub/ {
     description {a block of text}
     field {another block of text}
   }
 }
</pre>
</dd>
<dt><a name="32">proc <b class="cmd">clay::tree::merge</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>A recursive form of dict merge</p>
<p>A routine to recursively dig through dicts and merge
 adapted from http://stevehavelka.com/tcl-dict-operation-nested-merge/</p>
<p>Example:</p>
<pre class="doctools_example"> &gt; set mydict {sub/ {sub/ {description {a block of text}}}}
 &gt; set odict [clay::tree::merge $mydict {sub/ {sub/ {field {another block of text}}}}]
 &gt; clay::tree::print $odict
 sub/ {
   sub/ {
     description {a block of text}
     field {another block of text}
   }
 }
</pre>
</dd>
<dt><a name="33">proc <b class="cmd">dictargs::proc</b> <i class="arg">name</i> <i class="arg">argspec</i> <i class="arg">body</i></a></dt>
<dd><p>Named Procedures as new command</p></dd>
<dt><a name="34">proc <b class="cmd">dictargs::method</b> <i class="arg">name</i> <i class="arg">argspec</i> <i class="arg">body</i></a></dt>
<dd></dd>
<dt><a name="35">proc <b class="cmd">clay::dialect::Push</b> <i class="arg">class</i></a></dt>
<dd></dd>
<dt><a name="36">proc <b class="cmd">clay::dialect::Peek</b></a></dt>
<dd></dd>
<dt><a name="37">proc <b class="cmd">clay::dialect::Pop</b></a></dt>
<dd></dd>
<dt><a name="38">proc <b class="cmd">clay::dialect::create</b> <i class="arg">name</i> <span class="opt">?<i class="arg">parent</i> <b class="const"></b>?</span></a></dt>
<dd><p>This proc will generate a namespace, a &quot;mother of all classes&quot;, and a
 rudimentary set of policies for this dialect.</p></dd>
<dt><a name="39">proc <b class="cmd">clay::dialect::NSNormalize</b> <i class="arg">namespace</i> <i class="arg">qualname</i></a></dt>
<dd><p>Support commands; not intended to be called directly.</p></dd>
<dt><a name="40">proc <b class="cmd">clay::dialect::DefineThunk</b> <i class="arg">target</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="41">proc <b class="cmd">clay::dialect::Canonical</b> <i class="arg">namespace</i> <i class="arg">NSpace</i> <i class="arg">class</i></a></dt>
<dd></dd>
<dt><a name="42">proc <b class="cmd">clay::dialect::Define</b> <i class="arg">namespace</i> <i class="arg">class</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Implementation of the languages' define command</p></dd>
<dt><a name="43">proc <b class="cmd">clay::dialect::Aliases</b> <i class="arg">namespace</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="44">proc <b class="cmd">clay::dialect::SuperClass</b> <i class="arg">namespace</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="45">proc <b class="cmd">clay::dynamic_methods</b> <i class="arg">class</i></a></dt>
<dd></dd>
<dt><a name="46">proc <b class="cmd">clay::dynamic_methods_class</b> <i class="arg">thisclass</i></a></dt>
<dd></dd>
<dt><a name="47">proc <b class="cmd">clay::define::Array</b> <i class="arg">name</i> <span class="opt">?<i class="arg">values</i> <b class="const"></b>?</span></a></dt>
<dd><p>New OO Keywords for clay</p></dd>
<dt><a name="48">proc <b class="cmd">clay::define::Delegate</b> <i class="arg">name</i> <i class="arg">info</i></a></dt>
<dd><p>An annotation that objects of this class interact with delegated
 methods. The annotation is intended to be a dictionary, and the
 only reserved key is <em>description</em>, a human readable description.</p></dd>
<dt><a name="49">proc <b class="cmd">clay::define::constructor</b> <i class="arg">arglist</i> <i class="arg">rawbody</i></a></dt>
<dd></dd>
<dt><a name="50">proc <b class="cmd">clay::define::Class_Method</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Specify the a method for the class object itself, instead of for objects of the class</p></dd>
<dt><a name="51">proc <b class="cmd">clay::define::class_method</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>And alias to the new Class_Method keyword</p></dd>
<dt><a name="52">proc <b class="cmd">clay::define::clay</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="53">proc <b class="cmd">clay::define::destructor</b> <i class="arg">rawbody</i></a></dt>
<dd></dd>
<dt><a name="54">proc <b class="cmd">clay::define::Dict</b> <i class="arg">name</i> <span class="opt">?<i class="arg">values</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="55">proc <b class="cmd">clay::define::Option</b> <i class="arg">name</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Define an option for the class</p></dd>
<dt><a name="56">proc <b class="cmd">clay::define::Method</b> <i class="arg">name</i> <i class="arg">argstyle</i> <i class="arg">argspec</i> <i class="arg">body</i></a></dt>
<dd></dd>
<dt><a name="57">proc <b class="cmd">clay::define::Option_Class</b> <i class="arg">name</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Define a class of options
 All field / value pairs will be be inherited by an option that
 specify <em>name</em> as it class field.</p></dd>
<dt><a name="58">proc <b class="cmd">clay::define::Variable</b> <i class="arg">name</i> <span class="opt">?<i class="arg">default</i> <b class="const"></b>?</span></a></dt>
<dd><p>This keyword can also be expressed:</p>
<pre class="doctools_example">property variable NAME {default DEFAULT}</pre>
<p>Variables registered in the variable property are also initialized
    (if missing) when the object changes class via the <em>morph</em> method.</p></dd>
<dt><a name="59">proc <b class="cmd">clay::ensemble_methodbody</b> <i class="arg">ensemble</i> <i class="arg">einfo</i></a></dt>
<dd><p>Produce the body of an ensemble's public dispatch method
 ensemble is the name of the the ensemble.
 einfo is a dictionary of methods for the ensemble, and each value is a script
 to execute on dispatch</p>
<p>Example:</p>
<pre class="doctools_example"> ::clay::ensemble_methodbody foo {
   bar {tailcall my Foo_bar {*}$args}
   baz {tailcall my Foo_baz {*}$args}
   clock {return [clock seconds]}
   default {puts &quot;You gave me $method&quot;}
 }
</pre>
</dd>
<dt><a name="60">proc <b class="cmd">clay::define::Ensemble</b> <i class="arg">rawmethod</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="61">proc <b class="cmd">clay::event::cancel</b> <i class="arg">self</i> <span class="opt">?<i class="arg">task</i> <b class="const">*</b>?</span></a></dt>
<dd><p>Cancel a scheduled event</p></dd>
<dt><a name="62">proc <b class="cmd">clay::event::generate</b> <i class="arg">self</i> <i class="arg">event</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Generate an event
    Adds a subscription mechanism for objects
    to see who has recieved this event and prevent
    spamming or infinite recursion</p></dd>
<dt><a name="63">proc <b class="cmd">clay::event::nextid</b></a></dt>
<dd></dd>
<dt><a name="64">proc <b class="cmd">clay::event::Notification_list</b> <i class="arg">self</i> <i class="arg">event</i> <span class="opt">?<i class="arg">stackvar</i> <b class="const"></b>?</span></a></dt>
<dd><p>Called recursively to produce a list of
    who recieves notifications</p></dd>
<dt><a name="65">proc <b class="cmd">clay::event::notify</b> <i class="arg">rcpt</i> <i class="arg">sender</i> <i class="arg">event</i> <i class="arg">eventinfo</i></a></dt>
<dd><p>Final delivery to intended recipient object</p></dd>
<dt><a name="66">proc <b class="cmd">clay::event::process</b> <i class="arg">self</i> <i class="arg">handle</i> <i class="arg">script</i></a></dt>
<dd><p>Evaluate an event script in the global namespace</p></dd>
<dt><a name="67">proc <b class="cmd">clay::event::schedule</b> <i class="arg">self</i> <i class="arg">handle</i> <i class="arg">interval</i> <i class="arg">script</i></a></dt>
<dd><p>Schedule an event to occur later</p></dd>
<dt><a name="68">proc <b class="cmd">clay::event::subscribe</b> <i class="arg">self</i> <i class="arg">who</i> <i class="arg">event</i></a></dt>
<dd><p>Subscribe an object to an event pattern</p></dd>
<dt><a name="69">proc <b class="cmd">clay::event::unsubscribe</b> <i class="arg">self</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Unsubscribe an object from an event pattern</p></dd>
<dt><a name="70">proc <b class="cmd">clay::singleton</b> <i class="arg">name</i> <i class="arg">script</i></a></dt>
<dd><p>An object which is intended to be it's own class.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Classes</a></h2>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Class  clay::class</a></h3>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="71">method <b class="cmd">clay ancestors</b></a></dt>
<dd><p>Return this class and all ancestors in search order.</p></dd>
<dt><a name="72">method <b class="cmd">clay dump</b></a></dt>
<dd><p>Return a complete dump of this object's clay data, but only this object's clay data.</p></dd>
<dt><a name="73">method <b class="cmd">clay find</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></dt>
<dd><p>Pull a chunk of data from the clay system. If the last element of <em>path</em> is a branch,
     returns a recursive merge of all data from this object and it's constituent classes of the data in that branch.
     If the last element is a leaf, search this object for a matching leaf, or search all  constituent classes for a matching
     leaf and return the first value found.
     If no value is found, returns an empty string.
     If a branch is returned the topmost . entry is omitted.</p></dd>
<dt><a name="74">method <b class="cmd">clay get</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></dt>
<dd><p>Pull a chunk of data from the class's clay system.
     If no value is found, returns an empty string.
     If a branch is returned the topmost . entry is omitted.</p></dd>
<dt><a name="75">method <b class="cmd">clay GET</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></dt>
<dd><p>Pull a chunk of data from the class's clay system.
     If no value is found, returns an empty string.</p></dd>
<dt><a name="76">method <b class="cmd">clay merge</b> <i class="arg">dict</i> <span class="opt">?<b class="option">dict...</b>?</span></a></dt>
<dd><p>Recursively merge the dictionaries given into the object's local clay storage.</p></dd>
<dt><a name="77">method <b class="cmd">clay replace</b> <i class="arg">dictionary</i></a></dt>
<dd><p>Replace the contents of the internal clay storage with the dictionary given.</p></dd>
<dt><a name="78">method <b class="cmd">clay search</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></dt>
<dd><p>Return the first matching value for the path in either this class's clay data or one of its ancestors</p></dd>
<dt><a name="79">method <b class="cmd">clay set</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span> <i class="arg">value</i></a></dt>
<dd><p>Merge the conents of <b class="const">value</b> with the object's clay storage at <b class="const">path</b>.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Class  clay::object</a></h3>
<p>clay::object
 This class is inherited by all classes that have options.</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="80">method <b class="cmd">clay ancestors</b></a></dt>
<dd><p>Return the class this object belongs to, all classes mixed into this object, and all ancestors of those classes in search order.</p></dd>
<dt><a name="81">method <b class="cmd">clay cache</b> <i class="arg">path</i> <i class="arg">value</i></a></dt>
<dd><p>Store VALUE in such a way that request in SEARCH for PATH will always return it until the cache is flushed</p></dd>
<dt><a name="82">method <b class="cmd">clay cget</b> <i class="arg">field</i></a></dt>
<dd><p>Pull a value from either the object's clay structure or one of its constituent classes that matches the field name.
 The order of search us:</p>
<p>1. The as a value in local dict variable config</p>
<p>2. The as a value in local dict variable clay</p>
<p>3. As a leaf in any ancestor as a root of the clay tree</p>
<p>4. As a leaf in any ancestor as <b class="const">const</b> <em>field</em></p>
<p>5. As a leaf in any ancestor as <b class="const">option</b> <em>field</em> <b class="const">default</b></p></dd>
<dt><a name="83">method <b class="cmd">clay delegate</b> <span class="opt">?<i class="arg">stub</i>?</span> <span class="opt">?<i class="arg">object</i>?</span></a></dt>
<dd><p>Introspect or control method delegation. With no arguments, the method will return a
 key/value list of stubs and objects. With just the <i class="arg">stub</i> argument, the method will
 return the object (if any) attached to the stub. With a <i class="arg">stub</i> and an <i class="arg">object</i>
 this command will forward all calls to the method <i class="arg">stub</i> to the <i class="arg">object</i>.</p></dd>
<dt><a name="84">method <b class="cmd">clay dump</b></a></dt>
<dd><p>Return a complete dump of this object's clay data, as well as the data from all constituent classes recursively blended in.</p></dd>
<dt><a name="85">method <b class="cmd">clay ensemble_map</b></a></dt>
<dd><p>Return a dictionary describing the method ensembles to be assembled for this object</p></dd>
<dt><a name="86">method <b class="cmd">clay eval</b> <i class="arg">script</i></a></dt>
<dd><p>Evaluated a script in the namespace of this object</p></dd>
<dt><a name="87">method <b class="cmd">clay evolve</b></a></dt>
<dd><p>Trigger the <b class="method">InitializePublic</b> private method</p></dd>
<dt><a name="88">method <b class="cmd">clay exists</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></dt>
<dd><p>Returns 1 if <em>path</em> exists in either the object's clay data. Values greater than one indicate the element exists in one of the object's constituent classes. A value of zero indicates the path could not be found.</p></dd>
<dt><a name="89">method <b class="cmd">clay flush</b></a></dt>
<dd><p>Wipe any caches built by the clay implementation</p></dd>
<dt><a name="90">method <b class="cmd">clay forward</b> <i class="arg">method</i> <i class="arg">object</i></a></dt>
<dd><p>A convenience wrapper for</p>
<pre class="doctools_example">oo::objdefine [self] forward {*}$args</pre>
</dd>
<dt><a name="91">method <b class="cmd">clay get</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></dt>
<dd><p>Pull a chunk of data from the clay system. If the last element of <em>path</em> is a branch (ends in a slash /),
   returns a recursive merge of all data from this object and it's constituent classes of the data in that branch.
   If the last element is a leaf, search this object for a matching leaf, or search all  constituent classes for a matching
   leaf and return the first value found.
   If no value is found, returns an empty string.</p></dd>
<dt><a name="92">method <b class="cmd">clay leaf</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></dt>
<dd><p>A modified get which is tailored to pull only leaf elements</p></dd>
<dt><a name="93">method <b class="cmd">clay merge</b> <i class="arg">dict</i> <span class="opt">?<b class="option">dict...</b>?</span></a></dt>
<dd><p>Recursively merge the dictionaries given into the object's local clay storage.</p></dd>
<dt><a name="94">method <b class="cmd">clay mixin</b> <i class="arg">class</i> <span class="opt">?<b class="option">class...</b>?</span></a></dt>
<dd><p>Perform [oo::objdefine [self] mixin] on this object, with a few additional rules:
   Prior to the call, for any class was previously mixed in, but not in the new result, execute the script registered to mixin/ unmap-script (if given.)
   For all new classes, that were not present prior to this call, after the native TclOO mixin is invoked, execute the script registered to mixin/ map-script (if given.)
   Fall all classes that are now present and “mixed inâ€, execute the script registered to mixin/ react-script (if given.)</p></dd>
<dt><a name="95">method <b class="cmd">clay mixinmap</b> <span class="opt">?<i class="arg">stub</i>?</span> <span class="opt">?<i class="arg">classes</i>?</span></a></dt>
<dd><p>With no arguments returns the map of stubs and classes mixed into the current object. When only stub is given,
  returns the classes mixed in on that stub. When stub and classlist given, replace the classes currently on that stub with the given
  classes and invoke clay mixin on the new matrix of mixed in classes.</p></dd>
<dt><a name="96">method <b class="cmd">clay provenance</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span></a></dt>
<dd><p>Return either <b class="const">self</b> if that path exists in the current object, or return the first class (if any) along the clay search path which contains that element.</p></dd>
<dt><a name="97">method <b class="cmd">clay replace</b> <i class="arg">dictionary</i></a></dt>
<dd><p>Replace the contents of the internal clay storage with the dictionary given.</p></dd>
<dt><a name="98">method <b class="cmd">clay search</b> <i class="arg">path</i> <i class="arg">valuevar</i> <i class="arg">isleafvar</i></a></dt>
<dd><p>Return true, and set valuevar to the value and isleafar to true for false if PATH was found in the cache.</p></dd>
<dt><a name="99">method <b class="cmd">clay source</b> <i class="arg">filename</i></a></dt>
<dd><p>Source the given filename within the object's namespace</p></dd>
<dt><a name="100">method <b class="cmd">clay set</b> <i class="arg">path</i> <span class="opt">?<b class="option">path...</b>?</span> <i class="arg">value</i></a></dt>
<dd><p>Merge the conents of <b class="const">value</b> with the object's clay storage at <b class="const">path</b>.</p></dd>
<dt><a name="101">method <b class="cmd">InitializePublic</b></a></dt>
<dd><p>Instantiate variables. Called on object creation and during clay mixin.</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">AUTHORS</a></h2>
<p>Sean Woods <a href="mailto:<yoda@etoyoc.com>">mailto:&lt;yoda@etoyoc.com&gt;</a></p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>oo</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tcloo">TclOO</a>, <a href="../../../../index.html#oo">oo</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2018 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/clock/iso8601.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>clock_iso8601 - Date/Time Utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>clock_iso8601 - Date/Time Utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'iso8601.man' by tcllib/doctools with format 'html'
   -->
<!-- clock_iso8601.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">clock_iso8601(n) 0.1 tcllib &quot;Date/Time Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>clock_iso8601 - Parsing ISO 8601 dates/times</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Date formats</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>







|

|



|
|
|
|
|
|











|
<







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

119
120
121
122
123
124
125
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'iso8601.man' by tcllib/doctools with format 'html'
   -->
<! -- clock_iso8601.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">clock_iso8601(n) 0.1 tcllib &quot;Date/Time Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>clock_iso8601 - Parsing ISO 8601 dates/times</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>

<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<b class="option">-base</b>,
<b class="option">-gmt</b>,
<b class="option">-locale</b>, and
<b class="option">-timezone</b>
of the builtin command <b class="cmd">clock scan</b>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Date formats</a></h2>
<p>The commands accept the following 23 date formats:</p>
<pre class="doctools_example">
(year)-(month)-(day)
(year)(month)(day)
(year)-(day in year)
(year)(day in year)
(year in century)-(month)-(day)
(year)-(month)			Day defaults to the 1st of the month
(year in century)(month)(day)		
(year in century)-(day in year)		
(year in century)(day in year)		
--(month)-(day)			Year defaults to the current year
--(month)(day)			Year defaults to the current year
--(day in year)			Year defaults to the current year
---(day)  		        Year defaults to the current year, month to current month
(fiscal year)-W(week)-(wday)
(fiscal year)W(week)-(wday)
(fiscal year in century)-W(week)-(wday)
(fiscal year in century)W(week)(wday)
(fiscal year)-W(week)		Weekday defaults to monday
(fiscal year)W(week)		Weekday defaults to monday
-W(week)-(wday)			Year defaults to current fiscal year
-W(week)(wday)			Year defaults to current fiscal year
(wday)				Year defaults to current fiscal year, week to current week
(year)				Month defaults to january, day to 1st of the month
</pre>
<p>The possible parts/fields in the above, and their meanings, are:</p>
<dl class="doctools_definitions">
<dt>year</dt>
<dd><p>Year with century, 4 digits</p></dd>
<dt>month</dt>
<dd><p>Month in year, 2 digits</p></dd>
<dt>day</dt>
<dd><p>Day in month, 2 digits.</p></dd>
<dt>year in century</dt>
<dd><p>Year without century, 2 digits</p></dd>
<dt>day in year</dt>
<dd><p>Day in year, 3 digits</p></dd>
<dt>fiscal year</dt>
<dd><p>ISO 8601 fiscal year with century, 4 digits</p></dd>
<dt>fiscal year in century</dt>
<dd><p>ISO 8601 fiscal year without century, 2 digits</p></dd>
<dt>week</dt>
<dd><p>ISO 8601 week number</p></dd>
<dt>wday</dt>
<dd><p>Week day, 1 digit, Monday (1) to Sunday (7,0)</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>clock::iso8601</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






<
<
<
<
<
<





151
152
153
154
155
156
157
158

















































159
160
161
162
163
164






165
166
167
168
169
<b class="option">-base</b>,
<b class="option">-gmt</b>,
<b class="option">-locale</b>, and
<b class="option">-timezone</b>
of the builtin command <b class="cmd">clock scan</b>.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>

















































<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>clock::iso8601</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/clock/rfc2822.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>clock_rfc2822 - Date/Time Utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>clock_rfc2822 - Date/Time Utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'rfc2822.man' by tcllib/doctools with format 'html'
   -->
<!-- clock_rfc2822.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">clock_rfc2822(n) 0.1 tcllib &quot;Date/Time Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>clock_rfc2822 - Parsing RFC 2822 dates/times</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>







|

|



|
|
|
|
|
|




|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'rfc2822.man' by tcllib/doctools with format 'html'
   -->
<! -- clock_rfc2822.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">clock_rfc2822(n) 0.1 tcllib &quot;Date/Time Utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>clock_rfc2822 - Parsing ISO 8601 dates/times</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>clock::rfc2822</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<





143
144
145
146
147
148
149






150
151
152
153
154
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>clock::rfc2822</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/cmdline/cmdline.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>cmdline - Command line and option processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>cmdline - Command line and option processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'cmdline.man' by tcllib/doctools with format 'html'
   -->
<!-- cmdline.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cmdline(n) 1.5 tcllib &quot;Command line and option processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cmdline - Procedures to process command lines and options.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'cmdline.man' by tcllib/doctools with format 'html'
   -->
<! -- cmdline.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cmdline(n) 1.5 tcllib &quot;Command line and option processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cmdline - Procedures to process command lines and options.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<dt><a name="3"><b class="cmd">::cmdline::getoptions</b> <i class="arg">arglistVar</i> <i class="arg">optlist</i> <span class="opt">?<i class="arg">usage</i>?</span></a></dt>
<dd><p>Processes the set of command line options found in the list variable
named by <i class="arg">arglistVar</i> and fills in defaults for those not
specified.  This also generates an error message that lists the
allowed flags if an incorrect flag is specified. The optional
<i class="arg">usage</i>-argument contains a string to include in front of the
generated message. If not present it defaults to &quot;options:&quot;.</p>
<p><i class="arg">argvVar</i> contains the name of the list of arguments to process.
If options are found the list is modified and the processed arguments
are removed from the start of the list.</p>
<p><i class="arg">optlist</i> contains a list of lists where each element specifies an
option in the form: <i class="arg">flag</i> <i class="arg">default</i> <i class="arg">comment</i>.</p>
<p>If <i class="arg">flag</i> ends in &quot;.arg&quot; then the value is taken from the command
line. Otherwise it is a boolean and appears in the result if present
on the command line. If <i class="arg">flag</i> ends in &quot;.secret&quot;, it will not be
displayed in the usage.</p>
<p>The options <b class="option">-?</b>, <b class="option">-help</b>, and <b class="option">--</b> are







<
<
<







184
185
186
187
188
189
190



191
192
193
194
195
196
197
<dt><a name="3"><b class="cmd">::cmdline::getoptions</b> <i class="arg">arglistVar</i> <i class="arg">optlist</i> <span class="opt">?<i class="arg">usage</i>?</span></a></dt>
<dd><p>Processes the set of command line options found in the list variable
named by <i class="arg">arglistVar</i> and fills in defaults for those not
specified.  This also generates an error message that lists the
allowed flags if an incorrect flag is specified. The optional
<i class="arg">usage</i>-argument contains a string to include in front of the
generated message. If not present it defaults to &quot;options:&quot;.</p>



<p><i class="arg">optlist</i> contains a list of lists where each element specifies an
option in the form: <i class="arg">flag</i> <i class="arg">default</i> <i class="arg">comment</i>.</p>
<p>If <i class="arg">flag</i> ends in &quot;.arg&quot; then the value is taken from the command
line. Otherwise it is a boolean and appears in the result if present
on the command line. If <i class="arg">flag</i> ends in &quot;.secret&quot;, it will not be
displayed in the usage.</p>
<p>The options <b class="option">-?</b>, <b class="option">-help</b>, and <b class="option">--</b> are
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
            {c          &quot;do not create non-existent files&quot;}
            {r.arg  &quot;&quot;  &quot;use time from ref_file&quot;}
            {t.arg  -1  &quot;use specified time&quot;}
        }
        set usage &quot;: MyCommandName \[options] filename ...\noptions:&quot;
        try {
            array set params [::cmdline::getoptions argv $options $usage]
	    # Note: argv is modified now. The recognized options are
	    # removed from it, leaving the non-option arguments behind.
        } trap {CMDLINE USAGE} {msg o} {
            # Trap the usage signal, print the message, and exit the application.
            # Note: Other errors are not caught and passed through to higher levels!
	    puts $msg
	    exit 1
        }
        if {  $params(a) } { set set_atime &quot;true&quot; }







<
<







250
251
252
253
254
255
256


257
258
259
260
261
262
263
            {c          &quot;do not create non-existent files&quot;}
            {r.arg  &quot;&quot;  &quot;use time from ref_file&quot;}
            {t.arg  -1  &quot;use specified time&quot;}
        }
        set usage &quot;: MyCommandName \[options] filename ...\noptions:&quot;
        try {
            array set params [::cmdline::getoptions argv $options $usage]


        } trap {CMDLINE USAGE} {msg o} {
            # Trap the usage signal, print the message, and exit the application.
            # Note: Other errors are not caught and passed through to higher levels!
	    puts $msg
	    exit 1
        }
        if {  $params(a) } { set set_atime &quot;true&quot; }
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>cmdline</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#argument_processing">argument processing</a>, <a href="../../../../index.html#argv">argv</a>, <a href="../../../../index.html#argv0">argv0</a>, <a href="../../../../index.html#cmdline_processing">cmdline processing</a>, <a href="../../../../index.html#command_line_processing">command line processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





278
279
280
281
282
283
284






285
286
287
288
289
290
291
292
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>cmdline</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key264">argument processing</a>, <a href="../../../../index.html#key263">argv</a>, <a href="../../../../index.html#key262">argv0</a>, <a href="../../../../index.html#key265">cmdline processing</a>, <a href="../../../../index.html#key261">command line processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/comm/comm.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>comm - Remote communication</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>comm - Remote communication</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'comm.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 1995-1998 The Open Group. All Rights Reserved.   -- Copyright &amp;copy; 2003-2004 ActiveState Corporation.   -- Copyright &amp;copy; 2006-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- comm.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">comm(n) 4.6.3 tcllib &quot;Remote communication&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>comm - A remote communication facility for Tcl (8.3 and later)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'comm.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 1995-1998 The Open Group. All Rights Reserved.   -- Copyright &copy; 2003-2004 ActiveState Corporation.   -- Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- comm.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">comm(n) 4.6.3 tcllib &quot;Remote communication&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>comm - A remote communication facility for Tcl (8.3 and later)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">comm</b> command provides an inter-interpreter remote
execution facility much like Tk's <b class="cmd">send(n)</b>, except that it uses
sockets rather than the X server for the communication path.  As a
result, <b class="package">comm</b> works with multiple interpreters, works on
Windows and Macintosh systems, and provides control over the remote
execution path.</p>
<p>These commands work just like <b class="cmd"><a href="../../../../index.html#send">send</a></b> and <b class="cmd">winfo interps</b> :</p>
<pre class="doctools_example">
    ::comm::comm send ?-async? id cmd ?arg arg ...?
    ::comm::comm interps
</pre>
<p>This is all that is really needed to know in order to use
<b class="package">comm</b></p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Commands</a></h3>







|







179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">comm</b> command provides an inter-interpreter remote
execution facility much like Tk's <b class="cmd">send(n)</b>, except that it uses
sockets rather than the X server for the communication path.  As a
result, <b class="package">comm</b> works with multiple interpreters, works on
Windows and Macintosh systems, and provides control over the remote
execution path.</p>
<p>These commands work just like <b class="cmd"><a href="../../../../index.html#key353">send</a></b> and <b class="cmd">winfo interps</b> :</p>
<pre class="doctools_example">
    ::comm::comm send ?-async? id cmd ?arg arg ...?
    ::comm::comm interps
</pre>
<p>This is all that is really needed to know in order to use
<b class="package">comm</b></p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Commands</a></h3>
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
given <i class="arg">id</i>, this forces a connection to a remote <em>id</em> without
sending a command.  After this, the remote <em>id</em> will appear in
<b class="cmd">::comm::comm interps</b>.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Eval Semantics</a></h3>
<p>The evaluation semantics of <b class="cmd">::comm::comm send</b> are intended to
match Tk's <b class="cmd"><a href="../../../../index.html#send">send</a></b> <em>exactly</em>. This means that <b class="package">comm</b>
evaluates arguments on the remote side.</p>
<p>If you find that <b class="cmd">::comm::comm send</b> doesn't work for a
particular command, try the same thing with Tk's send and see if the
result is different.  If there is a problem, please report it.  For
instance, there was had one report that this command produced an
error.  Note that the equivalent <b class="cmd"><a href="../../../../index.html#send">send</a></b> command also produces the
same error.</p>
<pre class="doctools_example">
    % ::comm::comm send id llength {a b c}
    wrong # args: should be &quot;llength list&quot;
    % send name llength {a b c}
    wrong # args: should be &quot;llength list&quot;
</pre>
<p>The <b class="cmd">eval</b> hook (described below) can be used to change from
<b class="cmd"><a href="../../../../index.html#send">send</a></b>'s double eval semantics to single eval semantics.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Multiple Channels</a></h3>
<p>More than one <b class="cmd">comm</b> channel (or <em>listener</em>) can be created
in each Tcl interpreter.  This allows flexibility to create full and
restricted channels.  For instance, <i class="term"><a href="../../../../index.html#hook">hook</a></i> scripts are specific
to the channel they are defined against.</p>
<dl class="doctools_definitions">
<dt><a name="5"><b class="cmd">::comm::comm new</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">name value ...</i>?</span></a></dt>
<dd><p>This creates a new channel and Tcl command with the given channel
name.  This new command controls the new channel and takes all the
same arguments as <b class="cmd">::comm::comm</b>.  Any remaining arguments are
passed to the <b class="cmd">config</b> method.  The fully qualified channel







|





|








|




|







230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
given <i class="arg">id</i>, this forces a connection to a remote <em>id</em> without
sending a command.  After this, the remote <em>id</em> will appear in
<b class="cmd">::comm::comm interps</b>.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Eval Semantics</a></h3>
<p>The evaluation semantics of <b class="cmd">::comm::comm send</b> are intended to
match Tk's <b class="cmd"><a href="../../../../index.html#key353">send</a></b> <em>exactly</em>. This means that <b class="package">comm</b>
evaluates arguments on the remote side.</p>
<p>If you find that <b class="cmd">::comm::comm send</b> doesn't work for a
particular command, try the same thing with Tk's send and see if the
result is different.  If there is a problem, please report it.  For
instance, there was had one report that this command produced an
error.  Note that the equivalent <b class="cmd"><a href="../../../../index.html#key353">send</a></b> command also produces the
same error.</p>
<pre class="doctools_example">
    % ::comm::comm send id llength {a b c}
    wrong # args: should be &quot;llength list&quot;
    % send name llength {a b c}
    wrong # args: should be &quot;llength list&quot;
</pre>
<p>The <b class="cmd">eval</b> hook (described below) can be used to change from
<b class="cmd"><a href="../../../../index.html#key353">send</a></b>'s double eval semantics to single eval semantics.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Multiple Channels</a></h3>
<p>More than one <b class="cmd">comm</b> channel (or <em>listener</em>) can be created
in each Tcl interpreter.  This allows flexibility to create full and
restricted channels.  For instance, <i class="term"><a href="../../../../index.html#key680">hook</a></i> scripts are specific
to the channel they are defined against.</p>
<dl class="doctools_definitions">
<dt><a name="5"><b class="cmd">::comm::comm new</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">name value ...</i>?</span></a></dt>
<dd><p>This creates a new channel and Tcl command with the given channel
name.  This new command controls the new channel and takes all the
same arguments as <b class="cmd">::comm::comm</b>.  Any remaining arguments are
passed to the <b class="cmd">config</b> method.  The fully qualified channel
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
This can be used to cleanup or restart an ancillary process, for
instance.  See the <i class="term">lost</i> callback below.</p>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">Callbacks</a></h3>
<p>This is a mechanism for setting hooks for particular events:</p>
<dl class="doctools_definitions">
<dt><a name="13"><b class="cmd">::comm::comm hook</b> <i class="arg">event</i> <span class="opt">?<b class="const">+</b>?</span> <span class="opt">?<i class="arg">script</i>?</span></a></dt>
<dd><p>This uses a syntax similar to Tk's <b class="cmd"><a href="../../../../index.html#bind">bind</a></b> command.  Prefixing
<i class="arg">script</i> with a <b class="const">+</b> causes the new script to be appended.
Without this, a new <i class="arg">script</i> replaces any existing script.  When
invoked without a script, no change is made.  In all cases, the new
hook script is returned by the command.</p>
<p>When an <i class="arg">event</i> occurs, the <i class="arg">script</i> associated with it is
evaluated with the listed variables in scope and available.  The
return code (<em>not</em> the return value) of the script is commonly







|







411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
This can be used to cleanup or restart an ancillary process, for
instance.  See the <i class="term">lost</i> callback below.</p>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">Callbacks</a></h3>
<p>This is a mechanism for setting hooks for particular events:</p>
<dl class="doctools_definitions">
<dt><a name="13"><b class="cmd">::comm::comm hook</b> <i class="arg">event</i> <span class="opt">?<b class="const">+</b>?</span> <span class="opt">?<i class="arg">script</i>?</span></a></dt>
<dd><p>This uses a syntax similar to Tk's <b class="cmd"><a href="../../../../index.html#key714">bind</a></b> command.  Prefixing
<i class="arg">script</i> with a <b class="const">+</b> causes the new script to be appended.
Without this, a new <i class="arg">script</i> replaces any existing script.  When
invoked without a script, no change is made.  In all cases, the new
hook script is returned by the command.</p>
<p>When an <i class="arg">event</i> occurs, the <i class="arg">script</i> associated with it is
evaluated with the listed variables in scope and available.  The
return code (<em>not</em> the return value) of the script is commonly
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
</dl>
<p>These are the defined <em>events</em>:</p>
<dl class="doctools_definitions">
<dt><b class="const">connecting</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">id</b></p>
<p>This hook is invoked before making a connection to the remote named in
<i class="arg">id</i>.  An error return (via <b class="cmd"><a href="../../../../index.html#error">error</a></b>) will abort the connection
attempt with the error.  Example:</p>
<pre class="doctools_example">
    % ::comm::comm hook connecting {
        if {[string match {*[02468]} $id]} {
            error &quot;Can't connect to even ids&quot;
        }
    }
    % ::comm::comm send 10000 puts ok
    Connect to remote failed: Can't connect to even ids
    %
</pre>
</dd>
<dt><b class="const">connected</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">fid</b>, <b class="variable">id</b>, <b class="variable">host</b>, and <b class="variable">port</b>.</p>
<p>This hook is invoked immediately after making a remote connection to
<i class="arg">id</i>, allowing arbitrary authentication over the socket named by
<i class="arg">fid</i>.  An error return (via <b class="cmd"><a href="../../../../index.html#error">error</a></b> ) will close the
connection with the error.  <i class="arg">host</i> and <i class="arg">port</i> are merely
extracted from the <i class="arg">id</i>; changing any of these will have no effect
on the connection, however.  It is also possible to substitute and
replace <i class="arg">fid</i>.</p></dd>
<dt><b class="const">incoming</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">fid</b>, <b class="variable">addr</b>, and <b class="variable">remport</b>.</p>
<p>Hook invoked when receiving an incoming connection, allowing arbitrary
authentication over socket named by <i class="arg">fid</i>.  An error return (via
<b class="cmd"><a href="../../../../index.html#error">error</a></b>) will close the connection with the error.  Note that the
peer is named by <i class="arg">remport</i> and <i class="arg">addr</i> but that the remote
<em>id</em> is still unknown.  Example:</p>
<pre class="doctools_example">
    ::comm::comm hook incoming {
        if {[string match 127.0.0.1 $addr]} {
            error &quot;I don't talk to myself&quot;
        }







|

















|









|







436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
</dl>
<p>These are the defined <em>events</em>:</p>
<dl class="doctools_definitions">
<dt><b class="const">connecting</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">id</b></p>
<p>This hook is invoked before making a connection to the remote named in
<i class="arg">id</i>.  An error return (via <b class="cmd"><a href="../../../../index.html#key161">error</a></b>) will abort the connection
attempt with the error.  Example:</p>
<pre class="doctools_example">
    % ::comm::comm hook connecting {
        if {[string match {*[02468]} $id]} {
            error &quot;Can't connect to even ids&quot;
        }
    }
    % ::comm::comm send 10000 puts ok
    Connect to remote failed: Can't connect to even ids
    %
</pre>
</dd>
<dt><b class="const">connected</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">fid</b>, <b class="variable">id</b>, <b class="variable">host</b>, and <b class="variable">port</b>.</p>
<p>This hook is invoked immediately after making a remote connection to
<i class="arg">id</i>, allowing arbitrary authentication over the socket named by
<i class="arg">fid</i>.  An error return (via <b class="cmd"><a href="../../../../index.html#key161">error</a></b> ) will close the
connection with the error.  <i class="arg">host</i> and <i class="arg">port</i> are merely
extracted from the <i class="arg">id</i>; changing any of these will have no effect
on the connection, however.  It is also possible to substitute and
replace <i class="arg">fid</i>.</p></dd>
<dt><b class="const">incoming</b></dt>
<dd><p>Variables:
<b class="variable">chan</b>, <b class="variable">fid</b>, <b class="variable">addr</b>, and <b class="variable">remport</b>.</p>
<p>Hook invoked when receiving an incoming connection, allowing arbitrary
authentication over socket named by <i class="arg">fid</i>.  An error return (via
<b class="cmd"><a href="../../../../index.html#key161">error</a></b>) will close the connection with the error.  Note that the
peer is named by <i class="arg">remport</i> and <i class="arg">addr</i> but that the remote
<em>id</em> is still unknown.  Example:</p>
<pre class="doctools_example">
    ::comm::comm hook incoming {
        if {[string match 127.0.0.1 $addr]} {
            error &quot;I don't talk to myself&quot;
        }
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
but <em>before</em> evaluating it.  This allows complete control over
the processing of incoming commands.  <i class="arg">cmd</i> contains either
<b class="const">send</b> or <b class="const">async</b>.  <i class="arg">buffer</i> holds the script to
evaluate.  At the time the hook is called, <i class="arg">$chan remoteid</i> is
identical in value to <i class="arg">id</i>.</p>
<p>By changing <i class="arg">buffer</i>, the hook can change the script to be
evaluated.  The hook can short circuit evaluation and cause a value to
be immediately returned by using <b class="cmd"><a href="../../../../index.html#return">return</a></b> <i class="arg">result</i> (or, from
within a procedure, <b class="cmd">return -code return</b> <i class="arg">result</i>).  An
error return (via <b class="cmd"><a href="../../../../index.html#error">error</a></b>) will return an error result, as is if
the script caused the error.  Any other return will evaluate the
script in <i class="arg">buffer</i> as normal.  For compatibility with 3.2,
<b class="cmd">break</b> and <b class="cmd">return -code break</b> <i class="arg">result</i> is supported,
acting similarly to <b class="cmd">return {}</b> and <b class="cmd">return -code return</b>
<i class="arg">result</i>.</p>
<p>Examples:</p>
<ol class="doctools_enumerated">







|

|







486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
but <em>before</em> evaluating it.  This allows complete control over
the processing of incoming commands.  <i class="arg">cmd</i> contains either
<b class="const">send</b> or <b class="const">async</b>.  <i class="arg">buffer</i> holds the script to
evaluate.  At the time the hook is called, <i class="arg">$chan remoteid</i> is
identical in value to <i class="arg">id</i>.</p>
<p>By changing <i class="arg">buffer</i>, the hook can change the script to be
evaluated.  The hook can short circuit evaluation and cause a value to
be immediately returned by using <b class="cmd"><a href="../../../../index.html#key187">return</a></b> <i class="arg">result</i> (or, from
within a procedure, <b class="cmd">return -code return</b> <i class="arg">result</i>).  An
error return (via <b class="cmd"><a href="../../../../index.html#key161">error</a></b>) will return an error result, as is if
the script caused the error.  Any other return will evaluate the
script in <i class="arg">buffer</i> as normal.  For compatibility with 3.2,
<b class="cmd">break</b> and <b class="cmd">return -code break</b> <i class="arg">result</i> is supported,
acting similarly to <b class="cmd">return {}</b> and <b class="cmd">return -code return</b>
<i class="arg">result</i>.</p>
<p>Examples:</p>
<ol class="doctools_enumerated">
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
<dl class="doctools_definitions">
<dt><a name="14"><b class="cmd">::comm::comm remoteid</b></a></dt>
<dd><p>Returns the <i class="arg">id</i> of the sender of the last remote command
executed on this channel.  If used by a proc being invoked remotely,
it must be called before any events are processed.  Otherwise, another
command may get invoked and change the value.</p></dd>
<dt><a name="15"><b class="cmd">::comm::comm_send</b></a></dt>
<dd><p>Invoking this procedure will substitute the Tk <b class="cmd"><a href="../../../../index.html#send">send</a></b> and
<b class="cmd">winfo interps</b> commands with these equivalents that use
<b class="cmd">::comm::comm</b>.</p>
<pre class="doctools_example">
    proc send {args} {
        eval ::comm::comm send $args
    }
    rename winfo tk_winfo







|







610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
<dl class="doctools_definitions">
<dt><a name="14"><b class="cmd">::comm::comm remoteid</b></a></dt>
<dd><p>Returns the <i class="arg">id</i> of the sender of the last remote command
executed on this channel.  If used by a proc being invoked remotely,
it must be called before any events are processed.  Otherwise, another
command may get invoked and change the value.</p></dd>
<dt><a name="15"><b class="cmd">::comm::comm_send</b></a></dt>
<dd><p>Invoking this procedure will substitute the Tk <b class="cmd"><a href="../../../../index.html#key353">send</a></b> and
<b class="cmd">winfo interps</b> commands with these equivalents that use
<b class="cmd">::comm::comm</b>.</p>
<pre class="doctools_example">
    proc send {args} {
        eval ::comm::comm send $args
    }
    rename winfo tk_winfo
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Security</a></h3>
<p>Starting with version 4.6 of the package an option <b class="option">-socketcmd</b>
is supported, allowing the user of a comm channel to specify which
command to use when opening a socket. Anything which is API-compatible
with the builtin <b class="cmd">::socket</b> (the default) can be used.</p>
<p>The envisioned main use is the specification of the <b class="cmd">tls::socket</b>
command, see package <b class="package"><a href="../../../../index.html#tls">tls</a></b>, to secure the communication.</p>
<pre class="doctools_example">
	# Load and initialize tls
	package require tls
	tls::init  -cafile /path/to/ca/cert -keyfile ...
	# Create secured comm channel
	::comm::comm new SECURE -socketcmd tls::socket -listen 1
	...
</pre>
<p>The sections <span class="sectref"><a href="#subsection6">Execution Environment</a></span> and <span class="sectref"><a href="#subsection9">Callbacks</a></span>
are also relevant to the security of the system, providing means to
restrict the execution to a specific environment, perform additional
authentication, and the like.</p>
</div>
<div id="subsection12" class="doctools_subsection"><h3><a name="subsection12">Blocking Semantics</a></h3>
<p>There is one outstanding difference between <b class="package">comm</b> and
<b class="cmd"><a href="../../../../index.html#send">send</a></b>.  When blocking in a synchronous remote command, <b class="cmd"><a href="../../../../index.html#send">send</a></b>
uses an internal C hook (Tk_RestrictEvents) to the event loop to look
ahead for send-related events and only process those without
processing any other events.  In contrast, <b class="package">comm</b> uses the
<b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b> command as a semaphore to indicate the return message has
arrived.  The difference is that a synchronous <b class="cmd"><a href="../../../../index.html#send">send</a></b> will block
the application and prevent all events (including window related ones)
from being processed, while a synchronous <b class="cmd">::comm::comm send</b>
will block the application but still allow other events to get
processed.  In particular, <b class="cmd">after idle</b> handlers will fire
immediately when comm blocks.</p>
<p>What can be done about this?  First, note that this behavior will come
from any code using <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b> to block and wait for an event to
occur.  At the cost of multiple channel support, <b class="package">comm</b> could
be changed to do blocking I/O on the socket, giving send-like blocking
semantics.  However, multiple channel support is a very useful feature
of comm that it is deemed too important to lose.  The remaining
approaches involve a new loadable module written in C (which is
somewhat against the philosophy of <b class="cmd">comm</b>) One way would be to
create a modified version of the <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b> command that allow the
event flags passed to Tcl_DoOneEvent to be specified.  For <b class="cmd">comm</b>,
just the TCL_FILE_EVENTS would be processed.  Another way would be to
implement a mechanism like Tk_RestrictEvents, but apply it to the Tcl
event loop (since <b class="package">comm</b> doesn't require Tk).  One of these
approaches will be available in a future <b class="package">comm</b> release as an
optional component.</p>
</div>
<div id="subsection13" class="doctools_subsection"><h3><a name="subsection13">Asynchronous Result Generation</a></h3>
<p>By default the result returned by a remotely invoked command is the
result sent back to the invoker. This means that the result is
generated synchronously, and the server handling the call is blocked
for the duration of the command.</p>
<p>While this is tolerable as long as only short-running commands are
invoked on the server long-running commands, like database queries
make this a problem. One command can prevent the processing requests
of all other clients for an arbitrary period of time.</p>
<p>Before version 4.5 of comm the only solution was to rewrite the server
command to use the Tcl builtin command <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b>, or one of its
relatives like <b class="cmd">tkwait</b>, to open a new event loop which processes
requests while the long-running operation is executed. This however
has its own perils, as this makes it possible to both overflow the Tcl
stack with a large number of event loop, and to have a newer requests
block the return of older ones, as the eventloop have to be unwound in
the order of their creation.</p>
<p>The proper solution is to have the invoked command indicate to







|















|



|
|






|






|

















|







634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Security</a></h3>
<p>Starting with version 4.6 of the package an option <b class="option">-socketcmd</b>
is supported, allowing the user of a comm channel to specify which
command to use when opening a socket. Anything which is API-compatible
with the builtin <b class="cmd">::socket</b> (the default) can be used.</p>
<p>The envisioned main use is the specification of the <b class="cmd">tls::socket</b>
command, see package <b class="package"><a href="../../../../index.html#key331">tls</a></b>, to secure the communication.</p>
<pre class="doctools_example">
	# Load and initialize tls
	package require tls
	tls::init  -cafile /path/to/ca/cert -keyfile ...
	# Create secured comm channel
	::comm::comm new SECURE -socketcmd tls::socket -listen 1
	...
</pre>
<p>The sections <span class="sectref"><a href="#subsection6">Execution Environment</a></span> and <span class="sectref"><a href="#subsection9">Callbacks</a></span>
are also relevant to the security of the system, providing means to
restrict the execution to a specific environment, perform additional
authentication, and the like.</p>
</div>
<div id="subsection12" class="doctools_subsection"><h3><a name="subsection12">Blocking Semantics</a></h3>
<p>There is one outstanding difference between <b class="package">comm</b> and
<b class="cmd"><a href="../../../../index.html#key353">send</a></b>.  When blocking in a synchronous remote command, <b class="cmd"><a href="../../../../index.html#key353">send</a></b>
uses an internal C hook (Tk_RestrictEvents) to the event loop to look
ahead for send-related events and only process those without
processing any other events.  In contrast, <b class="package">comm</b> uses the
<b class="cmd"><a href="../../../../index.html#key418">vwait</a></b> command as a semaphore to indicate the return message has
arrived.  The difference is that a synchronous <b class="cmd"><a href="../../../../index.html#key353">send</a></b> will block
the application and prevent all events (including window related ones)
from being processed, while a synchronous <b class="cmd">::comm::comm send</b>
will block the application but still allow other events to get
processed.  In particular, <b class="cmd">after idle</b> handlers will fire
immediately when comm blocks.</p>
<p>What can be done about this?  First, note that this behavior will come
from any code using <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b> to block and wait for an event to
occur.  At the cost of multiple channel support, <b class="package">comm</b> could
be changed to do blocking I/O on the socket, giving send-like blocking
semantics.  However, multiple channel support is a very useful feature
of comm that it is deemed too important to lose.  The remaining
approaches involve a new loadable module written in C (which is
somewhat against the philosophy of <b class="cmd">comm</b>) One way would be to
create a modified version of the <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b> command that allow the
event flags passed to Tcl_DoOneEvent to be specified.  For <b class="cmd">comm</b>,
just the TCL_FILE_EVENTS would be processed.  Another way would be to
implement a mechanism like Tk_RestrictEvents, but apply it to the Tcl
event loop (since <b class="package">comm</b> doesn't require Tk).  One of these
approaches will be available in a future <b class="package">comm</b> release as an
optional component.</p>
</div>
<div id="subsection13" class="doctools_subsection"><h3><a name="subsection13">Asynchronous Result Generation</a></h3>
<p>By default the result returned by a remotely invoked command is the
result sent back to the invoker. This means that the result is
generated synchronously, and the server handling the call is blocked
for the duration of the command.</p>
<p>While this is tolerable as long as only short-running commands are
invoked on the server long-running commands, like database queries
make this a problem. One command can prevent the processing requests
of all other clients for an arbitrary period of time.</p>
<p>Before version 4.5 of comm the only solution was to rewrite the server
command to use the Tcl builtin command <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>, or one of its
relatives like <b class="cmd">tkwait</b>, to open a new event loop which processes
requests while the long-running operation is executed. This however
has its own perils, as this makes it possible to both overflow the Tcl
stack with a large number of event loop, and to have a newer requests
block the return of older ones, as the eventloop have to be unwound in
the order of their creation.</p>
<p>The proper solution is to have the invoked command indicate to
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
crashing the receiver when it runs out of memory. With the change the
receiver is always able to process the first word when it becomes
well-formed, regardless of the structure of the remainder of the
buffer.</p></dd>
<dt>4.6</dt>
<dd><p>Added the option <b class="option">-socketcmd</b> enabling users to override how a
socket is opened. The envisioned main use is the specification of the
<b class="cmd">tls::socket</b> command, see package <b class="package"><a href="../../../../index.html#tls">tls</a></b>, to secure the
communication.</p></dd>
<dt>4.5.7</dt>
<dd><p>Changed handling of ports already in use to provide a proper error
message.</p></dd>
<dt>4.5.6</dt>
<dd><p>Bugfix in the replacement for <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b>, made robust against of
variable names containing spaces.</p></dd>
<dt>4.5.5</dt>
<dd><p>Bugfix in the handling of hooks, typo in variable name.</p></dd>
<dt>4.5.4</dt>
<dd><p>Bugfix in the handling of the result received by the <b class="method">send</b>
method. Replaced an <em>after idle unset result</em> with an immediate
<b class="cmd">unset</b>, with the information saved to a local variable.</p>
<p>The <b class="cmd">after idle</b> can spill into a forked child process if there
is no event loop between its setup and the fork. This may bork the
child if the next event loop is the <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b> of <b class="package">comm</b>'s
<b class="method">send</b> a few lines above the <b class="cmd">after idle</b>, and the child
used the same serial number for its next request. In that case the
parent's <b class="cmd">after idle unset</b> will delete the very array element
the child is waiting for, unlocking the <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b>, causing it to
access a now missing array element, instead of the expected result.</p></dd>
<dt>4.5.3</dt>
<dd><p>Bugfixes in the wrappers for the builtin <b class="cmd"><a href="../../../../index.html#update">update</a></b> and <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b>
commands.</p></dd>
<dt>4.5.2</dt>
<dd><p>Bugfix in the wrapper for the builtin <b class="cmd"><a href="../../../../index.html#update">update</a></b> command.</p></dd>
<dt>4.5.1</dt>
<dd><p>Bugfixes in the handling of -interp for regular scripts. The handling
of the buffer was wrong for scripts which are a single statement as
list. Fixed missing argument to new command <b class="cmd">commSendReply</b>,
introduced by version 4.5. Affected debugging.</p></dd>
<dt>4.5</dt>
<dd><p>New server-side feature. The command invoked on the server can now







|





|









|



|


|


|







791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
crashing the receiver when it runs out of memory. With the change the
receiver is always able to process the first word when it becomes
well-formed, regardless of the structure of the remainder of the
buffer.</p></dd>
<dt>4.6</dt>
<dd><p>Added the option <b class="option">-socketcmd</b> enabling users to override how a
socket is opened. The envisioned main use is the specification of the
<b class="cmd">tls::socket</b> command, see package <b class="package"><a href="../../../../index.html#key331">tls</a></b>, to secure the
communication.</p></dd>
<dt>4.5.7</dt>
<dd><p>Changed handling of ports already in use to provide a proper error
message.</p></dd>
<dt>4.5.6</dt>
<dd><p>Bugfix in the replacement for <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>, made robust against of
variable names containing spaces.</p></dd>
<dt>4.5.5</dt>
<dd><p>Bugfix in the handling of hooks, typo in variable name.</p></dd>
<dt>4.5.4</dt>
<dd><p>Bugfix in the handling of the result received by the <b class="method">send</b>
method. Replaced an <em>after idle unset result</em> with an immediate
<b class="cmd">unset</b>, with the information saved to a local variable.</p>
<p>The <b class="cmd">after idle</b> can spill into a forked child process if there
is no event loop between its setup and the fork. This may bork the
child if the next event loop is the <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b> of <b class="package">comm</b>'s
<b class="method">send</b> a few lines above the <b class="cmd">after idle</b>, and the child
used the same serial number for its next request. In that case the
parent's <b class="cmd">after idle unset</b> will delete the very array element
the child is waiting for, unlocking the <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>, causing it to
access a now missing array element, instead of the expected result.</p></dd>
<dt>4.5.3</dt>
<dd><p>Bugfixes in the wrappers for the builtin <b class="cmd"><a href="../../../../index.html#key417">update</a></b> and <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>
commands.</p></dd>
<dt>4.5.2</dt>
<dd><p>Bugfix in the wrapper for the builtin <b class="cmd"><a href="../../../../index.html#key417">update</a></b> command.</p></dd>
<dt>4.5.1</dt>
<dd><p>Bugfixes in the handling of -interp for regular scripts. The handling
of the buffer was wrong for scripts which are a single statement as
list. Fixed missing argument to new command <b class="cmd">commSendReply</b>,
introduced by version 4.5. Affected debugging.</p></dd>
<dt>4.5</dt>
<dd><p>New server-side feature. The command invoked on the server can now
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
<dt>3.7</dt>
<dd><p>Moved into tcllib and placed in a proper namespace.</p></dd>
<dt>3.6</dt>
<dd><p>A bug in the looking up of the remoteid for a executed command could
be triggered when the connection was closed while several asynchronous
sends were queued to be executed.</p></dd>
<dt>3.5</dt>
<dd><p>Internal change to how reply messages from a <b class="cmd"><a href="../../../../index.html#send">send</a></b> are handled.
Reply messages are now decoded into the <i class="arg">value</i> to pass to
<b class="cmd"><a href="../../../../index.html#return">return</a></b>; a new return statement is then cons'd up to with this
value.  Previously, the return code was passed in from the remote as a
command to evaluate.  Since the wire protocol has not changed, this is
still the case.  Instead, the reply handling code decodes the
<b class="const">reply</b> message.</p></dd>
<dt>3.4</dt>
<dd><p>Added more source commentary, as well as documenting config variables
in this man page.  Fixed bug were loss of connection would give error
about a variable named <b class="variable">pending</b> rather than the message about
the lost connection.  <b class="cmd">comm ids</b> is now an alias for
<b class="cmd">comm interps</b> (previously, it an alias for <b class="cmd">comm chans</b>).
Since the method invocation change of 3.0, break and other exceptional
conditions were not being returned correctly from <b class="cmd">comm send</b>.
This has been fixed by removing the extra level of indirection into
the internal procedure <b class="cmd">commSend</b>.  Also added propagation of
the <i class="arg">errorCode</i> variable.  This means that these commands return
exactly as they would with <b class="cmd"><a href="../../../../index.html#send">send</a></b>:</p>
<pre class="doctools_example">
    comm send id break
    catch {comm send id break}
    comm send id expr 1 / 0
</pre>
<p>Added a new hook for reply messages.  Reworked method invocation to
avoid the use of comm:* procedures; this also cut the invocation time







|

|















|







858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
<dt>3.7</dt>
<dd><p>Moved into tcllib and placed in a proper namespace.</p></dd>
<dt>3.6</dt>
<dd><p>A bug in the looking up of the remoteid for a executed command could
be triggered when the connection was closed while several asynchronous
sends were queued to be executed.</p></dd>
<dt>3.5</dt>
<dd><p>Internal change to how reply messages from a <b class="cmd"><a href="../../../../index.html#key353">send</a></b> are handled.
Reply messages are now decoded into the <i class="arg">value</i> to pass to
<b class="cmd"><a href="../../../../index.html#key187">return</a></b>; a new return statement is then cons'd up to with this
value.  Previously, the return code was passed in from the remote as a
command to evaluate.  Since the wire protocol has not changed, this is
still the case.  Instead, the reply handling code decodes the
<b class="const">reply</b> message.</p></dd>
<dt>3.4</dt>
<dd><p>Added more source commentary, as well as documenting config variables
in this man page.  Fixed bug were loss of connection would give error
about a variable named <b class="variable">pending</b> rather than the message about
the lost connection.  <b class="cmd">comm ids</b> is now an alias for
<b class="cmd">comm interps</b> (previously, it an alias for <b class="cmd">comm chans</b>).
Since the method invocation change of 3.0, break and other exceptional
conditions were not being returned correctly from <b class="cmd">comm send</b>.
This has been fixed by removing the extra level of indirection into
the internal procedure <b class="cmd">commSend</b>.  Also added propagation of
the <i class="arg">errorCode</i> variable.  This means that these commands return
exactly as they would with <b class="cmd"><a href="../../../../index.html#key353">send</a></b>:</p>
<pre class="doctools_example">
    comm send id break
    catch {comm send id break}
    comm send id expr 1 / 0
</pre>
<p>Added a new hook for reply messages.  Reworked method invocation to
avoid the use of comm:* procedures; this also cut the invocation time
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
<dt>2.0</dt>
<dd><p><b class="package">comm</b> has been rewritten from scratch (but is fully compatible
with Comm 1.0, without the requirement to use obTcl).</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>







|
|

|







|
|







929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
<dt>2.0</dt>
<dd><p><b class="package">comm</b> has been rewritten from scratch (but is fully compatible
with Comm 1.0, without the requirement to use obTcl).</p></dd>
</dl>
</div>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
you use Tcl8.0p1 (or Tcl7.6p2).</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Related Work</a></h2>
<p>Tcl-DP provides an RPC-based remote execution interface, but is a
compiled Tcl extension.  See
<a href="http://www.cs.cornell.edu/Info/Projects/zeno/Projects/Tcl-DP.html">http://www.cs.cornell.edu/Info/Projects/zeno/Projects/Tcl-DP.html</a>.</p>
<p>Michael Doyle &lt;miked@eolas.com&gt; has code that implements the Tcl-DP
RPC interface using standard Tcl sockets, much like <b class="package">comm</b>.
The DpTcl package is available at
<a href="http://chiselapp.com/user/gwlester/repository/DpTcl">http://chiselapp.com/user/gwlester/repository/DpTcl</a>.</p>
<p>Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt; uses
<b class="package">comm</b> and has built a simple nameserver as part of his Pool
library.  See <a href="http://www.purl.org/net/akupries/soft/pool/index.htm">http://www.purl.org/net/akupries/soft/pool/index.htm</a>.</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>comm</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>send(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#comm">comm</a>, <a href="../../../../index.html#communication">communication</a>, <a href="../../../../index.html#ipc">ipc</a>, <a href="../../../../index.html#message">message</a>, <a href="../../../../index.html#remote_communication">remote communication</a>, <a href="../../../../index.html#remote_execution">remote execution</a>, <a href="../../../../index.html#rpc">rpc</a>, <a href="../../../../index.html#secure">secure</a>, <a href="../../../../index.html#send">send</a>, <a href="../../../../index.html#socket">socket</a>, <a href="../../../../index.html#ssl">ssl</a>, <a href="../../../../index.html#tls">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 1995-1998 The Open Group. All Rights Reserved.<br>
Copyright &copy; 2003-2004 ActiveState Corporation.<br>
Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|
<
<











<
<
<
<
<
<





|










1007
1008
1009
1010
1011
1012
1013
1014


1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025






1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
you use Tcl8.0p1 (or Tcl7.6p2).</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Related Work</a></h2>
<p>Tcl-DP provides an RPC-based remote execution interface, but is a
compiled Tcl extension.  See
<a href="http://www.cs.cornell.edu/Info/Projects/zeno/Projects/Tcl-DP.html">http://www.cs.cornell.edu/Info/Projects/zeno/Projects/Tcl-DP.html</a>.</p>
<p>Michael Doyle &lt;miked@eolas.com&gt; has code that implements the Tcl-DP
RPC interface using standard Tcl sockets, much like <b class="package">comm</b>.</p>


<p>Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt; uses
<b class="package">comm</b> and has built a simple nameserver as part of his Pool
library.  See <a href="http://www.purl.org/net/akupries/soft/pool/index.htm">http://www.purl.org/net/akupries/soft/pool/index.htm</a>.</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>comm</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>send(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key40">comm</a>, <a href="../../../../index.html#key355">communication</a>, <a href="../../../../index.html#key360">ipc</a>, <a href="../../../../index.html#key361">message</a>, <a href="../../../../index.html#key358">remote communication</a>, <a href="../../../../index.html#key357">remote execution</a>, <a href="../../../../index.html#key354">rpc</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key353">send</a>, <a href="../../../../index.html#key352">socket</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 1995-1998 The Open Group. All Rights Reserved.<br>
Copyright &copy; 2003-2004 ActiveState Corporation.<br>
Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/comm/comm_wire.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>comm_wire - Remote communication</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>comm_wire - Remote communication</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'comm_wire.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Docs. Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- comm_wire.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">comm_wire(n) 3 tcllib &quot;Remote communication&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>comm_wire - The comm wire protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'comm_wire.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Docs. Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- comm_wire.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">comm_wire(n) 3 tcllib &quot;Remote communication&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>comm_wire - The comm wire protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
binary data, including the NULL character, can be sent over the wire
as is, without the need for armoring it.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basic Message Layer</a></h3>
<p>On top of the <span class="sectref"><a href="#subsection1">Basic Layer</a></span> we have a
<i class="term">message oriented</i> exchange of data.
The totality of all characters written to the channel is a Tcl list,
with each element a separate <i class="term"><a href="../../../../index.html#message">message</a></i>, each itself a list. The
messages in the overall list are separated by EOL. Note that EOL
characters can occur within the list as well. They can be
distinguished from the message-separating EOL by the fact that the
data from the beginning up to their location is not a valid Tcl list.</p>
<p>EOL is signaled through the linefeed character, i.e <b class="const">LF</b>, or,
hex <b class="const">0x0a</b>. This is following the unix convention for
line-endings.</p>







|







158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
binary data, including the NULL character, can be sent over the wire
as is, without the need for armoring it.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basic Message Layer</a></h3>
<p>On top of the <span class="sectref"><a href="#subsection1">Basic Layer</a></span> we have a
<i class="term">message oriented</i> exchange of data.
The totality of all characters written to the channel is a Tcl list,
with each element a separate <i class="term"><a href="../../../../index.html#key361">message</a></i>, each itself a list. The
messages in the overall list are separated by EOL. Note that EOL
characters can occur within the list as well. They can be
distinguished from the message-separating EOL by the fact that the
data from the beginning up to their location is not a valid Tcl list.</p>
<p>EOL is signaled through the linefeed character, i.e <b class="const">LF</b>, or,
hex <b class="const">0x0a</b>. This is following the unix convention for
line-endings.</p>
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
    (a')    send {array get tcl_platform}
    (b')    send array get tcl_platform
    (c')    send array {get tcl_platform}
    respectively
</pre>
<p>Note that (a), generated by (a'), is the usual form, if only single
commands are sent by the client.
For example constructed using <b class="cmd"><a href="../../../../index.html#list">list</a></b>, if the command contains
variable arguments. Like</p>
<pre class="doctools_example">
    send [list array get $the_variable]
</pre>
<p>These three instructions all invoke the script on the server
side. Their difference is in the treatment of result values, and thus
determines if a reply is expected.</p>







|







223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
    (a')    send {array get tcl_platform}
    (b')    send array get tcl_platform
    (c')    send array {get tcl_platform}
    respectively
</pre>
<p>Note that (a), generated by (a'), is the usual form, if only single
commands are sent by the client.
For example constructed using <b class="cmd"><a href="../../../../index.html#key302">list</a></b>, if the command contains
variable arguments. Like</p>
<pre class="doctools_example">
    send [list array get $the_variable]
</pre>
<p>These three instructions all invoke the script on the server
side. Their difference is in the treatment of result values, and thus
determines if a reply is expected.</p>
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<dd><p>A reply is expected, but the sender is not waiting for it. It has
arranged to get a process-internal notification when the result
arrives.</p></dd>
</dl></dd>
<dt><b class="const">reply</b></dt>
<dd><p>Like the previous three command, however the tcl script in the payload
is highly restricted.
It has to be a syntactically valid Tcl <b class="cmd"><a href="../../../../index.html#return">return</a></b> command. This
contains result code, value, error code, and error info.</p>
<p>Examples:</p>
<pre class="doctools_example">
    {reply 1 {return -code 0 {}}}
    {reply 1 {return -code 0 {osVersion 2.4.21-99-default byteOrder littleEndian machine i686 platform unix os Linux user andreask wordSize 4}}}
</pre>
</dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>comm</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="comm.html">comm</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#comm">comm</a>, <a href="../../../../index.html#communication">communication</a>, <a href="../../../../index.html#ipc">ipc</a>, <a href="../../../../index.html#message">message</a>, <a href="../../../../index.html#remote_communication">remote communication</a>, <a href="../../../../index.html#remote_execution">remote execution</a>, <a href="../../../../index.html#rpc">rpc</a>, <a href="../../../../index.html#socket">socket</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Docs. Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

















<
<
<
<
<
<





|








245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269






270
271
272
273
274
275
276
277
278
279
280
281
282
283
<dd><p>A reply is expected, but the sender is not waiting for it. It has
arranged to get a process-internal notification when the result
arrives.</p></dd>
</dl></dd>
<dt><b class="const">reply</b></dt>
<dd><p>Like the previous three command, however the tcl script in the payload
is highly restricted.
It has to be a syntactically valid Tcl <b class="cmd"><a href="../../../../index.html#key187">return</a></b> command. This
contains result code, value, error code, and error info.</p>
<p>Examples:</p>
<pre class="doctools_example">
    {reply 1 {return -code 0 {}}}
    {reply 1 {return -code 0 {osVersion 2.4.21-99-default byteOrder littleEndian machine i686 platform unix os Linux user andreask wordSize 4}}}
</pre>
</dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>comm</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="comm.html">comm</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key40">comm</a>, <a href="../../../../index.html#key355">communication</a>, <a href="../../../../index.html#key360">ipc</a>, <a href="../../../../index.html#key361">message</a>, <a href="../../../../index.html#key358">remote communication</a>, <a href="../../../../index.html#key357">remote execution</a>, <a href="../../../../index.html#key354">rpc</a>, <a href="../../../../index.html#key352">socket</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Docs. Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/control/control.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>control - Tcl Control Flow Commands</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>control - Tcl Control Flow Commands</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'control.man' by tcllib/doctools with format 'html'
   -->
<!-- control.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">control(n) 0.1.3 tcllib &quot;Tcl Control Flow Commands&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>control - Procedures for control flow structures.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'control.man' by tcllib/doctools with format 'html'
   -->
<! -- control.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">control(n) 0.1.3 tcllib &quot;Tcl Control Flow Commands&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>control - Procedures for control flow structures.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<dt><a name="1"><b class="cmd">control::control</b> <i class="arg">command</i> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The <b class="cmd">control</b> command is used as a configuration command for
customizing the other public commands of the control package.  The
<i class="arg">command</i> argument names the command to be customized.  The set of
valid <i class="arg">option</i> and subsequent arguments are determined by the
command being customized, and are documented with the command.</p></dd>
<dt><a name="2"><b class="cmd">control::assert</b> <i class="arg">expr</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>When disabled, the <b class="cmd"><a href="../../../../index.html#assert">assert</a></b> command behaves exactly like the
<b class="cmd"><a href="../../../../index.html#no_op">no-op</a></b> command.</p>
<p>When enabled, the <b class="cmd"><a href="../../../../index.html#assert">assert</a></b> command evaluates <i class="arg">expr</i> as an
expression (in the same way that <b class="cmd">expr</b> evaluates its argument).
If evaluation reveals that <i class="arg">expr</i> is not a valid boolean
expression (according to [<b class="cmd">string is boolean -strict</b>]),
an error is raised.  If <i class="arg">expr</i> evaluates to a true boolean value
(as recognized by <b class="cmd">if</b>), then <b class="cmd"><a href="../../../../index.html#assert">assert</a></b> returns an empty
string.  Otherwise, the remaining arguments to <b class="cmd"><a href="../../../../index.html#assert">assert</a></b> are used
to construct a message string.  If there are no arguments, the message
string is &quot;assertion failed: $expr&quot;.  If there are arguments, they are
joined by <b class="cmd"><a href="../../../../index.html#join">join</a></b> to form the message string.  The message string
is then appended as an argument to a callback command, and the
completed callback command is evaluated in the global namespace.</p>
<p>The <b class="cmd"><a href="../../../../index.html#assert">assert</a></b> command can be customized by the <b class="cmd">control</b>
command in two ways:</p>
<p>[<b class="cmd">control::control assert enabled</b> <span class="opt">?<i class="arg">boolean</i>?</span>]
queries or sets whether <b class="cmd">control::assert</b> is enabled.  When called
without a <i class="arg">boolean</i> argument, a boolean value is returned
indicating whether the <b class="cmd">control::assert</b> command is enabled.  When
called with a valid boolean value as the <i class="arg">boolean</i> argument, the
<b class="cmd">control::assert</b> command is enabled or disabled to match the
argument, and an empty string is returned.</p>
<p>[<b class="cmd">control::control assert callback</b> <span class="opt">?<i class="arg">command</i>?</span>]
queries or sets the callback command that will be called by an enabled
<b class="cmd"><a href="../../../../index.html#assert">assert</a></b> on assertion failure.  When called without a
<i class="arg">command</i> argument, the current callback command is returned.
When called with a <i class="arg">command</i> argument, that argument becomes the
new assertion failure callback command.  Note that an assertion
failure callback command is always defined, even when <b class="cmd"><a href="../../../../index.html#assert">assert</a></b>
is disabled.  The default callback command is
[<b class="cmd">return -code error</b>].</p>
<p>Note that <b class="cmd">control::assert</b> has been written so that in
combination with [<b class="cmd">namespace import</b>], it is possible to
use enabled <b class="cmd"><a href="../../../../index.html#assert">assert</a></b> commands in some namespaces and disabled
<b class="cmd"><a href="../../../../index.html#assert">assert</a></b> commands in other namespaces at the same time.  This
capability is useful so that debugging efforts can be independently
controlled module by module.</p>
<pre class="doctools_example">
% package require control
% control::control assert enabled 1
% namespace eval one namespace import ::control::assert
% control::control assert enabled 0
% namespace eval two namespace import ::control::assert
% one::assert {1 == 0}
assertion failed: 1 == 0
% two::assert {1 == 0}
</pre>
</dd>
<dt><a name="3"><b class="cmd">control::do</b> <i class="arg">body</i> <span class="opt">?<i class="arg">option test</i>?</span></a></dt>
<dd><p>The <b class="cmd"><a href="../../../../index.html#do">do</a></b> command evaluates the script <i class="arg">body</i> repeatedly
<em>until</em> the expression <i class="arg">test</i> becomes true or as long as
(<em>while</em>) <i class="arg">test</i> is true, depending on the value of
<i class="arg">option</i> being <b class="const">until</b> or <b class="const">while</b>. If
<i class="arg">option</i> and <i class="arg">test</i> are omitted the body is evaluated exactly
once. After normal completion, <b class="cmd"><a href="../../../../index.html#do">do</a></b> returns an empty string.
Exceptional return codes (<b class="cmd">break</b>, <b class="cmd">continue</b>, <b class="cmd"><a href="../../../../index.html#error">error</a></b>,
etc.) during the evaluation of <i class="arg">body</i> are handled in the same way
the <b class="cmd">while</b> command handles them, except as noted in
<span class="sectref"><a href="#section3">LIMITATIONS</a></span>, below.</p></dd>
<dt><a name="4"><b class="cmd">control::no-op</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The <b class="cmd"><a href="../../../../index.html#no_op">no-op</a></b> command takes any number of arguments and does
nothing.  It returns an empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LIMITATIONS</a></h2>
<p>Several of the commands provided by the <b class="cmd">control</b> package accept
arguments that are scripts to be evaluated.  Due to fundamental
limitations of Tcl's <b class="cmd">catch</b> and <b class="cmd"><a href="../../../../index.html#return">return</a></b> commands, it is not
possible for these commands to properly evaluate the command
[<b class="cmd">return -code $code</b>] within one of those script
arguments for any value of <i class="arg">$code</i> other than <i class="arg">ok</i>.  In this
way, the commands of the <b class="cmd">control</b> package are limited as compared
to Tcl's built-in control flow commands (such as <b class="cmd">if</b>,
<b class="cmd">while</b>, etc.) and those control flow commands that can be
provided by packages coded in C.  An example of this difference:</p>







|
|
|




|
|


|


|










|



|




|
|














|




|
|




|






|







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<dt><a name="1"><b class="cmd">control::control</b> <i class="arg">command</i> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The <b class="cmd">control</b> command is used as a configuration command for
customizing the other public commands of the control package.  The
<i class="arg">command</i> argument names the command to be customized.  The set of
valid <i class="arg">option</i> and subsequent arguments are determined by the
command being customized, and are documented with the command.</p></dd>
<dt><a name="2"><b class="cmd">control::assert</b> <i class="arg">expr</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>When disabled, the <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> command behaves exactly like the
<b class="cmd"><a href="../../../../index.html#key143">no-op</a></b> command.</p>
<p>When enabled, the <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> command evaluates <i class="arg">expr</i> as an
expression (in the same way that <b class="cmd">expr</b> evaluates its argument).
If evaluation reveals that <i class="arg">expr</i> is not a valid boolean
expression (according to [<b class="cmd">string is boolean -strict</b>]),
an error is raised.  If <i class="arg">expr</i> evaluates to a true boolean value
(as recognized by <b class="cmd">if</b>), then <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> returns an empty
string.  Otherwise, the remaining arguments to <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> are used
to construct a message string.  If there are no arguments, the message
string is &quot;assertion failed: $expr&quot;.  If there are arguments, they are
joined by <b class="cmd"><a href="../../../../index.html#key559">join</a></b> to form the message string.  The message string
is then appended as an argument to a callback command, and the
completed callback command is evaluated in the global namespace.</p>
<p>The <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> command can be customized by the <b class="cmd">control</b>
command in two ways:</p>
<p>[<b class="cmd">control::control assert enabled</b> <span class="opt">?<i class="arg">boolean</i>?</span>]
queries or sets whether <b class="cmd">control::assert</b> is enabled.  When called
without a <i class="arg">boolean</i> argument, a boolean value is returned
indicating whether the <b class="cmd">control::assert</b> command is enabled.  When
called with a valid boolean value as the <i class="arg">boolean</i> argument, the
<b class="cmd">control::assert</b> command is enabled or disabled to match the
argument, and an empty string is returned.</p>
<p>[<b class="cmd">control::control assert callback</b> <span class="opt">?<i class="arg">command</i>?</span>]
queries or sets the callback command that will be called by an enabled
<b class="cmd"><a href="../../../../index.html#key144">assert</a></b> on assertion failure.  When called without a
<i class="arg">command</i> argument, the current callback command is returned.
When called with a <i class="arg">command</i> argument, that argument becomes the
new assertion failure callback command.  Note that an assertion
failure callback command is always defined, even when <b class="cmd"><a href="../../../../index.html#key144">assert</a></b>
is disabled.  The default callback command is
[<b class="cmd">return -code error</b>].</p>
<p>Note that <b class="cmd">control::assert</b> has been written so that in
combination with [<b class="cmd">namespace import</b>], it is possible to
use enabled <b class="cmd"><a href="../../../../index.html#key144">assert</a></b> commands in some namespaces and disabled
<b class="cmd"><a href="../../../../index.html#key144">assert</a></b> commands in other namespaces at the same time.  This
capability is useful so that debugging efforts can be independently
controlled module by module.</p>
<pre class="doctools_example">
% package require control
% control::control assert enabled 1
% namespace eval one namespace import ::control::assert
% control::control assert enabled 0
% namespace eval two namespace import ::control::assert
% one::assert {1 == 0}
assertion failed: 1 == 0
% two::assert {1 == 0}
</pre>
</dd>
<dt><a name="3"><b class="cmd">control::do</b> <i class="arg">body</i> <span class="opt">?<i class="arg">option test</i>?</span></a></dt>
<dd><p>The <b class="cmd"><a href="../../../../index.html#key145">do</a></b> command evaluates the script <i class="arg">body</i> repeatedly
<em>until</em> the expression <i class="arg">test</i> becomes true or as long as
(<em>while</em>) <i class="arg">test</i> is true, depending on the value of
<i class="arg">option</i> being <b class="const">until</b> or <b class="const">while</b>. If
<i class="arg">option</i> and <i class="arg">test</i> are omitted the body is evaluated exactly
once. After normal completion, <b class="cmd"><a href="../../../../index.html#key145">do</a></b> returns an empty string.
Exceptional return codes (<b class="cmd">break</b>, <b class="cmd">continue</b>, <b class="cmd"><a href="../../../../index.html#key161">error</a></b>,
etc.) during the evaluation of <i class="arg">body</i> are handled in the same way
the <b class="cmd">while</b> command handles them, except as noted in
<span class="sectref"><a href="#section3">LIMITATIONS</a></span>, below.</p></dd>
<dt><a name="4"><b class="cmd">control::no-op</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The <b class="cmd"><a href="../../../../index.html#key143">no-op</a></b> command takes any number of arguments and does
nothing.  It returns an empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LIMITATIONS</a></h2>
<p>Several of the commands provided by the <b class="cmd">control</b> package accept
arguments that are scripts to be evaluated.  Due to fundamental
limitations of Tcl's <b class="cmd">catch</b> and <b class="cmd"><a href="../../../../index.html#key187">return</a></b> commands, it is not
possible for these commands to properly evaluate the command
[<b class="cmd">return -code $code</b>] within one of those script
arguments for any value of <i class="arg">$code</i> other than <i class="arg">ok</i>.  In this
way, the commands of the <b class="cmd">control</b> package are limited as compared
to Tcl's built-in control flow commands (such as <b class="cmd">if</b>,
<b class="cmd">while</b>, etc.) and those control flow commands that can be
provided by packages coded in C.  An example of this difference:</p>
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>control</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>break, continue, expr, if, <a href="../../../../index.html#join">join</a>, namespace, <a href="../../../../index.html#return">return</a>, <a href="../../../../index.html#string">string</a>, while</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#assert">assert</a>, <a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#do">do</a>, <a href="../../../../index.html#flow">flow</a>, <a href="../../../../index.html#no_op">no-op</a>, <a href="../../../../index.html#structure">structure</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<


|


|





242
243
244
245
246
247
248






249
250
251
252
253
254
255
256
257
258
259
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>control</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>break, continue, expr, if, <a href="../../../../index.html#key559">join</a>, namespace, <a href="../../../../index.html#key187">return</a>, <a href="../../../../index.html#key280">string</a>, while</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key144">assert</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key145">do</a>, <a href="../../../../index.html#key141">flow</a>, <a href="../../../../index.html#key143">no-op</a>, <a href="../../../../index.html#key142">structure</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/coroutine/coro_auto.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>coroutine::auto - Coroutine utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>coroutine::auto - Coroutine utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'coro_auto.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2010-2014 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- coroutine::auto.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">coroutine::auto(n) 1.1.3 tcllib &quot;Coroutine utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>coroutine::auto - Automatic event and IO coroutine awareness</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'coro_auto.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2010-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- coroutine::auto.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">coroutine::auto(n) 1.1.3 tcllib &quot;Coroutine utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>coroutine::auto - Automatic event and IO coroutine awareness</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
directly visible functionality.
Built on top of the package <b class="package"><a href="tcllib_coroutine.html">coroutine</a></b>, it intercepts various
builtin commands of the Tcl core to make any code using them
coroutine-oblivious, i.e. able to run inside and outside of a
coroutine without changes.</p>
<p>The commands so affected by this package are</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#after">after</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#exit">exit</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#gets">gets</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#global">global</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#read">read</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#update">update</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b></dt>
<dd></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>coroutine</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#after">after</a>, <a href="../../../../index.html#channel">channel</a>, <a href="../../../../index.html#coroutine">coroutine</a>, <a href="../../../../index.html#events">events</a>, <a href="../../../../index.html#exit">exit</a>, <a href="../../../../index.html#gets">gets</a>, <a href="../../../../index.html#global">global</a>, <a href="../../../../index.html#green_threads">green threads</a>, <a href="../../../../index.html#read">read</a>, <a href="../../../../index.html#threads">threads</a>, <a href="../../../../index.html#update">update</a>, <a href="../../../../index.html#vwait">vwait</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Coroutine</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

|

|

|

|

|

|










<
<
<
<
<
<


|








137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166






167
168
169
170
171
172
173
174
175
176
177
directly visible functionality.
Built on top of the package <b class="package"><a href="tcllib_coroutine.html">coroutine</a></b>, it intercepts various
builtin commands of the Tcl core to make any code using them
coroutine-oblivious, i.e. able to run inside and outside of a
coroutine without changes.</p>
<p>The commands so affected by this package are</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#key414">after</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key415">exit</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key416">gets</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key413">global</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key411">read</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key417">update</a></b></dt>
<dd></dd>
<dt><b class="cmd"><a href="../../../../index.html#key418">vwait</a></b></dt>
<dd></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>coroutine</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key414">after</a>, <a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key219">coroutine</a>, <a href="../../../../index.html#key412">events</a>, <a href="../../../../index.html#key415">exit</a>, <a href="../../../../index.html#key416">gets</a>, <a href="../../../../index.html#key413">global</a>, <a href="../../../../index.html#key419">green threads</a>, <a href="../../../../index.html#key411">read</a>, <a href="../../../../index.html#key410">threads</a>, <a href="../../../../index.html#key417">update</a>, <a href="../../../../index.html#key418">vwait</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Coroutine</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/coroutine/tcllib_coroutine.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>coroutine - Coroutine utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>coroutine - Coroutine utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_coroutine.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2010-2015 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- coroutine.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">coroutine(n) 1.2 tcllib &quot;Coroutine utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>coroutine - Coroutine based event and IO handling</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">coroutine 1.2</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">coroutine::util after</b> <i class="arg">delay</i></a></li>
<li><a href="#2"><b class="cmd">coroutine::util await</b> <i class="arg">varname</i>...</a></li>
<li><a href="#3"><b class="cmd">coroutine::util create</b> <i class="arg">arg</i>...</a></li>
<li><a href="#4"><b class="cmd">coroutine::util exit</b> <span class="opt">?<i class="arg">status</i>?</span></a></li>
<li><a href="#5"><b class="cmd">coroutine::util gets</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">varname</i>?</span></a></li>
<li><a href="#6"><b class="cmd">coroutine::util gets_safety</b> <i class="arg">chan</i> <i class="arg">limit</i> <i class="arg">varname</i></a></li>
<li><a href="#7"><b class="cmd">coroutine::util global</b> <i class="arg">varname</i>...</a></li>
<li><a href="#8"><b class="cmd">coroutine::util read</b> <b class="option">-nonewline</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#9"><b class="cmd">coroutine::util update</b> <span class="opt">?<b class="const">idletasks</b>?</span></a></li>
<li><a href="#10"><b class="cmd">coroutine::util vwait</b> <i class="arg">varname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">coroutine</b> package provides coroutine-aware
implementations of various event- and channel related commands. It can
be in multiple modes:</p>







|

|

|



|
|
|
|
|
|


|



















|







<
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138

139
140
141
142
143
144
145
146
147
148
149
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_coroutine.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2010-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- coroutine.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">coroutine(n) 1.1.3 tcllib &quot;Coroutine utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>coroutine - Coroutine based event and IO handling</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">coroutine 1.1.3</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">coroutine::util after</b> <i class="arg">delay</i></a></li>
<li><a href="#2"><b class="cmd">coroutine::util await</b> <i class="arg">varname</i>...</a></li>
<li><a href="#3"><b class="cmd">coroutine::util create</b> <i class="arg">arg</i>...</a></li>
<li><a href="#4"><b class="cmd">coroutine::util exit</b> <span class="opt">?<i class="arg">status</i>?</span></a></li>
<li><a href="#5"><b class="cmd">coroutine::util gets</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">varname</i>?</span></a></li>

<li><a href="#6"><b class="cmd">coroutine::util global</b> <i class="arg">varname</i>...</a></li>
<li><a href="#7"><b class="cmd">coroutine::util read</b> <b class="option">-nonewline</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">n</i>?</span></a></li>
<li><a href="#8"><b class="cmd">coroutine::util update</b> <span class="opt">?<b class="const">idletasks</b>?</span></a></li>
<li><a href="#9"><b class="cmd">coroutine::util vwait</b> <i class="arg">varname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">coroutine</b> package provides coroutine-aware
implementations of various event- and channel related commands. It can
be in multiple modes:</p>
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<dd><p>This command exits the current coroutine, causing it to return
<i class="arg">status</i>. If no status was specified the default <i class="arg">0</i> is
returned.</p></dd>
<dt><a name="5"><b class="cmd">coroutine::util gets</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">varname</i>?</span></a></dt>
<dd><p>This command reads a line from the channel <i class="arg">chan</i> and returns it
either as its result, or, if a <i class="arg">varname</i> was specified, writes it
to the named variable and returns the number of characters read.</p></dd>
<dt><a name="6"><b class="cmd">coroutine::util gets_safety</b> <i class="arg">chan</i> <i class="arg">limit</i> <i class="arg">varname</i></a></dt>
<dd><p>This command reads a line from the channel <i class="arg">chan</i> up to size <i class="arg">limit</i>
and stores the result in <i class="arg">varname</i>. Of <i class="arg">limit</i> is reached before the
set first newline, an error is thrown. The command returns the number of
characters read.</p></dd>
<dt><a name="7"><b class="cmd">coroutine::util global</b> <i class="arg">varname</i>...</a></dt>
<dd><p>This command imports the named global variables of the coroutine into
the current scope. From the technical point of view these variables
reside in level <b class="const">#1</b> of the Tcl stack. I.e. these are not the
regular global variable in to the global namespace, and each coroutine
can have their own set, independent of all others.</p></dd>
<dt><a name="8"><b class="cmd">coroutine::util read</b> <b class="option">-nonewline</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>This command reads <i class="arg">n</i> characters from the channel <i class="arg">chan</i> and
returns them as its result. If <i class="arg">n</i> is not specified the command
will read the channel until EOF is reached.</p></dd>
<dt><a name="9"><b class="cmd">coroutine::util update</b> <span class="opt">?<b class="const">idletasks</b>?</span></a></dt>
<dd><p>This command causes the coroutine invoking it to run pending events or
idle handlers before proceeding.</p></dd>
<dt><a name="10"><b class="cmd">coroutine::util vwait</b> <i class="arg">varname</i></a></dt>
<dd><p>This command causes the coroutine calling it to wait for a write to
the named namespace variable <i class="arg">varname</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>coroutine</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#after">after</a>, <a href="../../../../index.html#channel">channel</a>, <a href="../../../../index.html#coroutine">coroutine</a>, <a href="../../../../index.html#events">events</a>, <a href="../../../../index.html#exit">exit</a>, <a href="../../../../index.html#gets">gets</a>, <a href="../../../../index.html#global">global</a>, <a href="../../../../index.html#green_threads">green threads</a>, <a href="../../../../index.html#read">read</a>, <a href="../../../../index.html#threads">threads</a>, <a href="../../../../index.html#update">update</a>, <a href="../../../../index.html#vwait">vwait</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Coroutine</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
|





|



|


|











<
<
<
<
<
<


|








180
181
182
183
184
185
186





187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211






212
213
214
215
216
217
218
219
220
221
222
<dd><p>This command exits the current coroutine, causing it to return
<i class="arg">status</i>. If no status was specified the default <i class="arg">0</i> is
returned.</p></dd>
<dt><a name="5"><b class="cmd">coroutine::util gets</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">varname</i>?</span></a></dt>
<dd><p>This command reads a line from the channel <i class="arg">chan</i> and returns it
either as its result, or, if a <i class="arg">varname</i> was specified, writes it
to the named variable and returns the number of characters read.</p></dd>





<dt><a name="6"><b class="cmd">coroutine::util global</b> <i class="arg">varname</i>...</a></dt>
<dd><p>This command imports the named global variables of the coroutine into
the current scope. From the technical point of view these variables
reside in level <b class="const">#1</b> of the Tcl stack. I.e. these are not the
regular global variable in to the global namespace, and each coroutine
can have their own set, independent of all others.</p></dd>
<dt><a name="7"><b class="cmd">coroutine::util read</b> <b class="option">-nonewline</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">n</i>?</span></a></dt>
<dd><p>This command reads <i class="arg">n</i> characters from the channel <i class="arg">chan</i> and
returns them as its result. If <i class="arg">n</i> is not specified the command
will read the channel until EOF is reached.</p></dd>
<dt><a name="8"><b class="cmd">coroutine::util update</b> <span class="opt">?<b class="const">idletasks</b>?</span></a></dt>
<dd><p>This command causes the coroutine invoking it to run pending events or
idle handlers before proceeding.</p></dd>
<dt><a name="9"><b class="cmd">coroutine::util vwait</b> <i class="arg">varname</i></a></dt>
<dd><p>This command causes the coroutine calling it to wait for a write to
the named namespace variable <i class="arg">varname</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>coroutine</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key414">after</a>, <a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key219">coroutine</a>, <a href="../../../../index.html#key412">events</a>, <a href="../../../../index.html#key415">exit</a>, <a href="../../../../index.html#key416">gets</a>, <a href="../../../../index.html#key413">global</a>, <a href="../../../../index.html#key419">green threads</a>, <a href="../../../../index.html#key411">read</a>, <a href="../../../../index.html#key410">threads</a>, <a href="../../../../index.html#key417">update</a>, <a href="../../../../index.html#key418">vwait</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Coroutine</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/counter/counter.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>counter - Counters and Histograms</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>counter - Counters and Histograms</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'counter.man' by tcllib/doctools with format 'html'
   -->
<!-- counter.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">counter(n) 2.0.4 tcllib &quot;Counters and Histograms&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>counter - Procedures for counters and histograms</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'counter.man' by tcllib/doctools with format 'html'
   -->
<! -- counter.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">counter(n) 2.0.4 tcllib &quot;Counters and Histograms&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>counter - Procedures for counters and histograms</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>counter</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#counting">counting</a>, <a href="../../../../index.html#histogram">histogram</a>, <a href="../../../../index.html#statistics">statistics</a>, <a href="../../../../index.html#tallying">tallying</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





286
287
288
289
290
291
292






293
294
295
296
297
298
299
300
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>counter</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key717">counting</a>, <a href="../../../../index.html#key716">histogram</a>, <a href="../../../../index.html#key195">statistics</a>, <a href="../../../../index.html#key715">tallying</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/crc/cksum.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>cksum - Cyclic Redundancy Checks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>cksum - Cyclic Redundancy Checks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'cksum.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002, Pat Thoyts
   -->
<!-- cksum.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cksum(n) 1.1.4 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cksum - Calculate a cksum(1) compatible checksum</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'cksum.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002, Pat Thoyts
   -->
<! -- cksum.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cksum(n) 1.1.4 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cksum - Calculate a cksum(1) compatible checksum</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="crc32.html">crc32(n)</a>, <a href="sum.html">sum(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checksum">checksum</a>, <a href="../../../../index.html#cksum">cksum</a>, <a href="../../../../index.html#crc">crc</a>, <a href="../../../../index.html#crc32">crc32</a>, <a href="../../../../index.html#cyclic_redundancy_check">cyclic redundancy check</a>, <a href="../../../../index.html#data_integrity">data integrity</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








222
223
224
225
226
227
228






229
230
231
232
233
234
235
236
237
238
239
240
241
242
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="crc32.html">crc32(n)</a>, <a href="sum.html">sum(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key149">cksum</a>, <a href="../../../../index.html#key146">crc</a>, <a href="../../../../index.html#key147">crc32</a>, <a href="../../../../index.html#key148">cyclic redundancy check</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/crc/crc16.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>crc16 - Cyclic Redundancy Checks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>crc16 - Cyclic Redundancy Checks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'crc16.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002, 2017, Pat Thoyts
   -->
<!-- crc16.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">crc16(n) 1.1.4 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>crc16 - Perform a 16bit Cyclic Redundancy Check</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'crc16.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002, Pat Thoyts
   -->
<! -- crc16.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">crc16(n) 1.1.2 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>crc16 - Perform a 16bit Cyclic Redundancy Check</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc16 <span class="opt">?1.1.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <b class="const">--</b> <i class="arg">message</i></a></li>
<li><a href="#2"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></li>
<li><a href="#3"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <b class="const">--</b> <i class="arg">message</i></a></li>
<li><a href="#4"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></li>
<li><a href="#5"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <b class="const">--</b> <i class="arg">message</i></a></li>
<li><a href="#6"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a Tcl-only implementation of the CRC
algorithms based upon information provided at
http://www.microconsultants.com/tips/crc/crc.txt
There are a number of permutations available for calculating CRC
checksums and this package can handle all of them. Defaults are set up
for the most common cases.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <b class="const">--</b> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></dt>
<dd></dd>
<dt><a name="3"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <b class="const">--</b> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <b class="const">--</b> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="6"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></dt>
<dd><p>The command takes either string data or a file name and returns a checksum
value calculated using the CRC algorithm. The command used sets up the
CRC polynomial, initial value and bit ordering for the desired
standard checksum calculation. The result is formatted
using the <i class="arg">format</i>(n) specifier provided or as an unsigned integer







|


|

|

|














|



|



|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc16 <span class="opt">?1.1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></li>
<li><a href="#2"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></li>
<li><a href="#3"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></li>
<li><a href="#4"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></li>
<li><a href="#5"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></li>
<li><a href="#6"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a Tcl-only implementation of the CRC
algorithms based upon information provided at
http://www.microconsultants.com/tips/crc/crc.txt
There are a number of permutations available for calculating CRC
checksums and this package can handle all of them. Defaults are set up
for the most common cases.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::crc::crc16</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></dt>
<dd></dd>
<dt><a name="3"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">::crc::crc-ccitt</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> <i class="arg">message</i></a></dt>
<dd></dd>
<dt><a name="6"><b class="cmd">::crc::xmodem</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> <span class="opt">?-implementation <i class="arg">procname</i>?</span> -filename <i class="arg">file</i></a></dt>
<dd><p>The command takes either string data or a file name and returns a checksum
value calculated using the CRC algorithm. The command used sets up the
CRC polynomial, initial value and bit ordering for the desired
standard checksum calculation. The result is formatted
using the <i class="arg">format</i>(n) specifier provided or as an unsigned integer
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
data to be checksummed and the second is the seed value. An
integer is expected as the result.</p>
<p>The package provides some implementations of standard CRC polynomials
for the XMODEM, CCITT and the usual CRC-16 checksum. For convenience,
additional commands have been provided that make use of these
implementations.</p></dd>
<dt>--</dt>
<dd><p>Terminate option processing. Please note that using the option
termination flag is important when processing data from parameters. If
the binary data looks like one of the options given above then the
data will be read as an option if this marker is not included.
Always use the <i class="arg">--</i> option termination flag before giving the data
argument.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% crc::crc16 -- &quot;Hello, World!&quot;
64077
</pre>
<pre class="doctools_example">
% crc::crc-ccitt -- &quot;Hello, World!&quot;
26586
</pre>
<pre class="doctools_example">
% crc::crc16 -format 0x%X -- &quot;Hello, World!&quot;
0xFA4D
</pre>
<pre class="doctools_example">
% crc::crc16 -file crc16.tcl
51675
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="cksum.html">cksum(n)</a>, <a href="crc32.html">crc32(n)</a>, <a href="sum.html">sum(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checksum">checksum</a>, <a href="../../../../index.html#cksum">cksum</a>, <a href="../../../../index.html#crc">crc</a>, <a href="../../../../index.html#crc16">crc16</a>, <a href="../../../../index.html#crc32">crc32</a>, <a href="../../../../index.html#cyclic_redundancy_check">cyclic redundancy check</a>, <a href="../../../../index.html#data_integrity">data integrity</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, 2017, Pat Thoyts</p>
</div>
</div></body></html>







|
<
<
<
<
<




|



|



|

















<
<
<
<
<
<





|





|


201
202
203
204
205
206
207
208





209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238






239
240
241
242
243
244
245
246
247
248
249
250
251
252
data to be checksummed and the second is the seed value. An
integer is expected as the result.</p>
<p>The package provides some implementations of standard CRC polynomials
for the XMODEM, CCITT and the usual CRC-16 checksum. For convenience,
additional commands have been provided that make use of these
implementations.</p></dd>
<dt>--</dt>
<dd><p>Terminate option processing.</p></dd>





</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<pre class="doctools_example">
% crc::crc16 &quot;Hello, World!&quot;
64077
</pre>
<pre class="doctools_example">
% crc::crc-ccitt &quot;Hello, World!&quot;
26586
</pre>
<pre class="doctools_example">
% crc::crc16 -format 0x%X &quot;Hello, World!&quot;
0xFA4D
</pre>
<pre class="doctools_example">
% crc::crc16 -file crc16.tcl
51675
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="cksum.html">cksum(n)</a>, <a href="crc32.html">crc32(n)</a>, <a href="sum.html">sum(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key149">cksum</a>, <a href="../../../../index.html#key146">crc</a>, <a href="../../../../index.html#key809">crc16</a>, <a href="../../../../index.html#key147">crc32</a>, <a href="../../../../index.html#key148">cyclic redundancy check</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/crc/crc32.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>crc32 - Cyclic Redundancy Checks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>crc32 - Cyclic Redundancy Checks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'crc32.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002, Pat Thoyts
   -->
<!-- crc32.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">crc32(n) 1.3.3 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>crc32 - Perform a 32bit Cyclic Redundancy Check</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'crc32.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002, Pat Thoyts
   -->
<! -- crc32.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">crc32(n) 1.3.2 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>crc32 - Perform a 32bit Cyclic Redundancy Check</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc32 <span class="opt">?1.3.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::crc::crc32</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> [ <i class="arg">-channel chan</i> | <i class="arg">-filename file</i> | <i class="arg">message</i> ]</a></li>
<li><a href="#2"><b class="cmd">::crc::Crc32Init</b> <span class="opt">?<i class="arg">seed</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::crc::Crc32Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::crc::Crc32Final</b> <i class="arg">token</i></a></li>
</ul>







|







129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc32 <span class="opt">?1.3.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::crc::crc32</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-seed <i class="arg">value</i>?</span> [ <i class="arg">-channel chan</i> | <i class="arg">-filename file</i> | <i class="arg">message</i> ]</a></li>
<li><a href="#2"><b class="cmd">::crc::Crc32Init</b> <span class="opt">?<i class="arg">seed</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::crc::Crc32Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::crc::Crc32Final</b> <i class="arg">token</i></a></li>
</ul>
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="cksum.html">cksum(n)</a>, <a href="crc16.html">crc16(n)</a>, <a href="sum.html">sum(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checksum">checksum</a>, <a href="../../../../index.html#cksum">cksum</a>, <a href="../../../../index.html#crc">crc</a>, <a href="../../../../index.html#crc32">crc32</a>, <a href="../../../../index.html#cyclic_redundancy_check">cyclic redundancy check</a>, <a href="../../../../index.html#data_integrity">data integrity</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








237
238
239
240
241
242
243






244
245
246
247
248
249
250
251
252
253
254
255
256
257
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="cksum.html">cksum(n)</a>, <a href="crc16.html">crc16(n)</a>, <a href="sum.html">sum(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key149">cksum</a>, <a href="../../../../index.html#key146">crc</a>, <a href="../../../../index.html#key147">crc32</a>, <a href="../../../../index.html#key148">cyclic redundancy check</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/crc/sum.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>sum - Cyclic Redundancy Checks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>sum - Cyclic Redundancy Checks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'sum.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- sum.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sum(n) 1.1.2 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sum - Calculate a sum(1) compatible checksum</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'sum.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- sum.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sum(n) 1.1.2 tcllib &quot;Cyclic Redundancy Checks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sum - Calculate a sum(1) compatible checksum</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="cksum.html">cksum(n)</a>, <a href="crc32.html">crc32(n)</a>, sum(1)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checksum">checksum</a>, <a href="../../../../index.html#cksum">cksum</a>, <a href="../../../../index.html#crc">crc</a>, <a href="../../../../index.html#crc32">crc32</a>, <a href="../../../../index.html#cyclic_redundancy_check">cyclic redundancy check</a>, <a href="../../../../index.html#data_integrity">data integrity</a>, <a href="../../../../index.html#security">security</a>, <a href="../../../../index.html#sum">sum</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








197
198
199
200
201
202
203






204
205
206
207
208
209
210
211
212
213
214
215
216
217
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>crc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="cksum.html">cksum(n)</a>, <a href="crc32.html">crc32(n)</a>, sum(1)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key149">cksum</a>, <a href="../../../../index.html#key146">crc</a>, <a href="../../../../index.html#key147">crc32</a>, <a href="../../../../index.html#key148">cyclic redundancy check</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key122">security</a>, <a href="../../../../index.html#key585">sum</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/cron/cron.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>cron - cron</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>cron - cron</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'cron.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2016-2018 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- cron.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cron(n) 2.1 tcllib &quot;cron&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cron - Tool for automating the period callback of commands</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">cron <span class="opt">?2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::cron::at</b> <i class="arg">?processname?</i> <i class="arg">timecode</i> <i class="arg">command</i></a></li>
<li><a href="#2"><b class="cmd">::cron::cancel</b> <i class="arg">processname</i></a></li>
<li><a href="#3"><b class="cmd">::cron::every</b> <i class="arg">processname</i> <i class="arg">frequency</i> <i class="arg">command</i></a></li>
<li><a href="#4"><b class="cmd">::cron::in</b> <i class="arg">?processname?</i> <i class="arg">timecode</i> <i class="arg">command</i></a></li>
<li><a href="#5"><b class="cmd">::cron::object_coroutine</b> <i class="arg">object</i> <i class="arg">coroutine</i> <i class="arg">?info?</i></a></li>
<li><a href="#6"><b class="cmd">::cron::sleep</b> <i class="arg">milliseconds</i></a></li>
<li><a href="#7"><b class="cmd">::cron::task delete</b> <i class="arg">process</i></a></li>
<li><a href="#8"><b class="cmd">::cron::task exists</b> <i class="arg">process</i></a></li>
<li><a href="#9"><b class="cmd">::cron::task info</b> <i class="arg">process</i></a></li>
<li><a href="#10"><b class="cmd">::cron::task set</b> <i class="arg">process</i> <i class="arg">field</i> <i class="arg">value</i> <i class="arg">?field...?</i> <i class="arg">?value...?</i></a></li>
<li><a href="#11"><b class="cmd">::cron::wake</b> <i class="arg">?who?</i></a></li>
<li><a href="#12"><b class="cmd">::cron::clock_step</b> <i class="arg">milliseconds</i></a></li>
<li><a href="#13"><b class="cmd">::cron::clock_delay</b> <i class="arg">milliseconds</i></a></li>
<li><a href="#14"><b class="cmd">::cron::clock_sleep</b> <i class="arg">seconds</i> <i class="arg">?offset?</i></a></li>
<li><a href="#15"><b class="cmd">::cron::clock_set</b> <i class="arg">newtime</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">cron</b> package provides a Pure-tcl set of tools to allow







|

|

|



|
|
|
|
|
|


|



















|













|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'cron.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2016 Sean Woods &lt;yoda@etoyoc.com&gt;
   -->
<! -- cron.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">cron(n) 2.0 tcllib &quot;cron&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>cron - Tool for automating the period callback of commands</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">cron <span class="opt">?2.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::cron::at</b> <i class="arg">?processname?</i> <i class="arg">timecode</i> <i class="arg">command</i></a></li>
<li><a href="#2"><b class="cmd">::cron::cancel</b> <i class="arg">processname</i></a></li>
<li><a href="#3"><b class="cmd">::cron::every</b> <i class="arg">processname</i> <i class="arg">frequency</i> <i class="arg">command</i></a></li>
<li><a href="#4"><b class="cmd">::cron::in</b> <i class="arg">?processname?</i> <i class="arg">timecode</i> <i class="arg">command</i></a></li>
<li><a href="#5"><b class="cmd">::cron::object_coroutine</b> <i class="arg">object</i> <i class="arg">coroutine</i> <i class="arg">?info?</i></a></li>
<li><a href="#6"><b class="cmd">::cron::sleep</b> <i class="arg">milliseconds</i></a></li>
<li><a href="#7"><b class="cmd">::cron::task delete</b> <i class="arg">process</i></a></li>
<li><a href="#8"><b class="cmd">::cron::task exists</b> <i class="arg">process</i></a></li>
<li><a href="#9"><b class="cmd">::cron::task info</b> <i class="arg">process</i></a></li>
<li><a href="#10"><b class="cmd">::cron::task set</b> <i class="arg">process</i> <i class="arg">field</i> <i class="arg">value</i> <i class="arg">?field...?</i> <i class="arg">?value...?</i></a></li>
<li><a href="#11"><b class="cmd">::cron::wake</b> <i class="arg">?who?</i></a></li>
<li><a href="#12"><b class="cmd">::cron::clock_step</b> <i class="arg">milleseconds</i></a></li>
<li><a href="#13"><b class="cmd">::cron::clock_delay</b> <i class="arg">milleseconds</i></a></li>
<li><a href="#14"><b class="cmd">::cron::clock_sleep</b> <i class="arg">seconds</i> <i class="arg">?offset?</i></a></li>
<li><a href="#15"><b class="cmd">::cron::clock_set</b> <i class="arg">newtime</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">cron</b> package provides a Pure-tcl set of tools to allow
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<dt><a name="8"><b class="cmd">::cron::task exists</b> <i class="arg">process</i></a></dt>
<dd><p>Returns true if <i class="arg">process</i> is registered with cron.</p></dd>
<dt><a name="9"><b class="cmd">::cron::task info</b> <i class="arg">process</i></a></dt>
<dd><p>Returns a dict describing <i class="arg">process</i>. See <b class="cmd">::cron::task set</b> for a description of the options.</p></dd>
<dt><a name="10"><b class="cmd">::cron::task set</b> <i class="arg">process</i> <i class="arg">field</i> <i class="arg">value</i> <i class="arg">?field...?</i> <i class="arg">?value...?</i></a></dt>
<dd><p>If <i class="arg">process</i> does not exist, it is created. Options Include:</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#command">command</a></b></dt>
<dd><p>If <b class="cmd"><a href="../coroutine/tcllib_coroutine.html">coroutine</a></b> is black, a global command which implements this process. If <b class="cmd"><a href="../coroutine/tcllib_coroutine.html">coroutine</a></b> is not
black, the command to invoke to create or recreate the coroutine.</p></dd>
<dt><b class="cmd"><a href="../coroutine/tcllib_coroutine.html">coroutine</a></b></dt>
<dd><p>The name of the coroutine (if any) which implements this process.</p></dd>
<dt><b class="cmd">frequency</b></dt>
<dd><p>If -1, this process is terminated after the next event. If 0 this process should be called during every
idle event. If positive, this process should generate events periodically. The frequency is an integer number
of milliseconds between events.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#object">object</a></b></dt>
<dd><p>The object associated with this process or coroutine.</p></dd>
<dt><b class="cmd">scheduled</b></dt>
<dd><p>If non-zero, the absolute time from the epoch (in milliseconds) that this process will trigger an event.
If zero, and the <b class="cmd">frequency</b> is also zero, this process is called every idle loop.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#running">running</a></b></dt>
<dd><p>A boolean flag. If true it indicates the process never returned or yielded during the event loop,
and will not be called again until it does so.</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::cron::wake</b> <i class="arg">?who?</i></a></dt>
<dd><p>Wake up cron, and arrange for its event loop to be run during the next Idle cycle.</p>
<pre class="doctools_example">
::cron::wake {I just did something important}
</pre>
</dd>
</dl>
<p>Several utility commands are provided that are used internally within cron and for
testing cron, but may or may not be useful in the general cases.</p>
<dl class="doctools_definitions">
<dt><a name="12"><b class="cmd">::cron::clock_step</b> <i class="arg">milliseconds</i></a></dt>
<dd><p>Return a clock time absolute to the epoch which falls on the next
border between one second and the next for the value of <i class="arg">milliseconds</i></p></dd>
<dt><a name="13"><b class="cmd">::cron::clock_delay</b> <i class="arg">milliseconds</i></a></dt>
<dd><p>Return a clock time absolute to the epoch which falls on the next
border between one second and the next <i class="arg">milliseconds</i> in the future.</p></dd>
<dt><a name="14"><b class="cmd">::cron::clock_sleep</b> <i class="arg">seconds</i> <i class="arg">?offset?</i></a></dt>
<dd><p>Return a clock time absolute to the epoch which falls exactly <i class="arg">seconds</i> in
the future. If offset is given it may be positive or negative, and will shift
the final time to before or after the second would flip.</p></dd>
<dt><a name="15"><b class="cmd">::cron::clock_set</b> <i class="arg">newtime</i></a></dt>
<dd><p>Sets the internal clock for cron. This command will advance the time in 100ms
increment, triggering events, until the internal time catches up with <i class="arg">newtime</i>.</p>
<p><i class="arg">newtime</i> is expressed in absolute milliseconds since the beginning of the epoch.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>odie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cron">cron</a>, <a href="../../../../index.html#odie">odie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>System</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2016-2018 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|











|

|
|

|







|









<
<
<
<
<
<


|





|


233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290






291
292
293
294
295
296
297
298
299
300
301
<dt><a name="8"><b class="cmd">::cron::task exists</b> <i class="arg">process</i></a></dt>
<dd><p>Returns true if <i class="arg">process</i> is registered with cron.</p></dd>
<dt><a name="9"><b class="cmd">::cron::task info</b> <i class="arg">process</i></a></dt>
<dd><p>Returns a dict describing <i class="arg">process</i>. See <b class="cmd">::cron::task set</b> for a description of the options.</p></dd>
<dt><a name="10"><b class="cmd">::cron::task set</b> <i class="arg">process</i> <i class="arg">field</i> <i class="arg">value</i> <i class="arg">?field...?</i> <i class="arg">?value...?</i></a></dt>
<dd><p>If <i class="arg">process</i> does not exist, it is created. Options Include:</p>
<dl class="doctools_definitions">
<b class="cmd"><a href="../../../../index.html#key275">command</a></b>
If <b class="cmd"><a href="../coroutine/tcllib_coroutine.html">coroutine</a></b> is black, a global command which implements this process. If <b class="cmd"><a href="../coroutine/tcllib_coroutine.html">coroutine</a></b> is not
black, the command to invoke to create or recreate the coroutine.
<b class="cmd"><a href="../coroutine/tcllib_coroutine.html">coroutine</a></b>
The name of the coroutine (if any) which implements this process.
<b class="cmd">frequency</b>
If -1, this process is terminated after the next event. If 0 this process should be called during every
idle event. If positive, this process should generate events periodically. The frequency is an interger number
of milleseconds between events.
<b class="cmd"><a href="../../../../index.html#key243">object</a></b>
The object associated with this process or coroutine.
<b class="cmd">scheduled</b>
If non-zero, the absolute time from the epoch (in milleseconds) that this process will trigger an event.
If zero, and the <b class="cmd">frequency</b> is also zero, this process is called every idle loop.
<b class="cmd"><a href="../../../../index.html#key431">running</a></b>
A boolean flag. If true it indicates the process never returned or yielded during the event loop,
and will not be called again until it does so.
</dl></dd>
<dt><a name="11"><b class="cmd">::cron::wake</b> <i class="arg">?who?</i></a></dt>
<dd><p>Wake up cron, and arrange for its event loop to be run during the next Idle cycle.</p>
<pre class="doctools_example">
::cron::wake {I just did something important}
</pre>
</dd>
</dl>
<p>Several utility commands are provided that are used internally within cron and for
testing cron, but may or may not be useful in the general cases.</p>
<dl class="doctools_definitions">
<dt><a name="12"><b class="cmd">::cron::clock_step</b> <i class="arg">milleseconds</i></a></dt>
<dd><p>Return a clock time absolute to the epoch which falls on the next
border between one second and the next for the value of <i class="arg">milleseconds</i></p></dd>
<dt><a name="13"><b class="cmd">::cron::clock_delay</b> <i class="arg">milleseconds</i></a></dt>
<dd><p>Return a clock time absolute to the epoch which falls on the next
border between one second and the next <i class="arg">milleseconds</i> in the future.</p></dd>
<dt><a name="14"><b class="cmd">::cron::clock_sleep</b> <i class="arg">seconds</i> <i class="arg">?offset?</i></a></dt>
<dd><p>Return a clock time absolute to the epoch which falls exactly <i class="arg">seconds</i> in
the future. If offset is given it may be positive or negative, and will shift
the final time to before or after the second would flip.</p></dd>
<dt><a name="15"><b class="cmd">::cron::clock_set</b> <i class="arg">newtime</i></a></dt>
<dd><p>Sets the internal clock for cron. This command will advance the time in 100ms
increment, triggering events, until the internal time catches up with <i class="arg">newtime</i>.</p>
<p><i class="arg">newtime</i> is expressed in absolute milleseconds since the beginning of the epoch.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>odie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key621">cron</a>, <a href="../../../../index.html#key255">odie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>System</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2016 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/csv/csv.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>csv - CSV processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>csv - CSV processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'csv.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002-2015 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- csv.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">csv(n) 0.8.1 tcllib &quot;CSV processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>csv - Procedures to handle CSV data.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'csv.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- csv.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">csv(n) 0.8.1 tcllib &quot;CSV processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>csv - Procedures to handle CSV data.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>csv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../../../../index.html#matrix">matrix</a>, <a href="../../../../index.html#queue">queue</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#csv">csv</a>, <a href="../../../../index.html#matrix">matrix</a>, <a href="../../../../index.html#package">package</a>, <a href="../../../../index.html#queue">queue</a>, <a href="../../../../index.html#tcllib">tcllib</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|


|








302
303
304
305
306
307
308






309
310
311
312
313
314
315
316
317
318
319
320
321
322
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>csv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key50">queue</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key49">csv</a>, <a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key48">package</a>, <a href="../../../../index.html#key50">queue</a>, <a href="../../../../index.html#key52">tcllib</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/debug/debug.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>debug - debug narrative</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>debug - debug narrative</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'debug.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 200?, Colin McCormack, Wub Server Utilities   -- Copyright &amp;copy; 2012-2014, Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- debug.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug(n) 1.0.6 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug - debug narrative - core</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'debug.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 200?, Colin McCormack, Wub Server Utilities   -- Copyright &copy; 2012-2014, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- debug.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug(n) 1.0.6 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug - debug narrative - core</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">debug.</b><b class="variable">tag</b> <i class="arg">message</i> <span class="opt">?<i class="arg">level</i>?</span></a></dt>
<dd><p>For each known tag the package creates a command with this signature
the user can then use to provide the debug narrative of the tag.
The narrative <i class="arg">message</i> is provided as a Tcl script whose value is
<b class="cmd"><a href="../../../../index.html#subst">subst</a></b>ed in the caller's scope if and only if the current level of
interest for the <i class="arg">tag</i> matches or exceeds the call's <i class="arg">level</i>
of detail.  This is useful, as one can place arbitrarily complex
narrative in code without unnecessarily evaluating it.</p>
<p>See methods <b class="method">level</b> and <b class="method">setting</b> for querying
and manipulating the current level of detail for tags.</p>
<p>The actually printed text consists of not only the
<i class="arg">message</i>, but also global and tag-specific prefix and suffix,
should they exist, with each line in the message having the specified
headers and trailers.</p>
<p>All these parts are <b class="cmd"><a href="../../../../index.html#subst">subst</a></b>ableTcl scripts, which are
substituted once per message before assembly.</p></dd>
<dt><a name="2"><b class="cmd">debug</b> <b class="method">2array</b></a></dt>
<dd><p>This method returns a dictionary mapping the names of all debug tags
currently known to the package to their state and log level. The
latter are encoded in a single numeric value, where a negative number
indicates an inactive tag at the level given by the absolute value, and
a positive number is an active tag at that level.</p>
<p>See also method <b class="method">settings</b> below.</p></dd>
<dt><a name="3"><b class="cmd">debug</b> <b class="method">define</b> <i class="arg">tag</i></a></dt>
<dd><p>This method registers the named <i class="arg">tag</i> with the package.  If the
tag was not known before it is placed in an inactive state. The state
of an already known tag is left untouched.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="4"><b class="cmd">debug</b> <b class="method">header</b> <i class="arg">text</i></a></dt>
<dd><p>This method defines a global <b class="cmd"><a href="../../../../index.html#subst">subst</a></b>able Tcl script which provides
a text printed before each line of output.</p>
<p>Note how this is tag-independent.</p>
<p>Further note that the header substitution happens only once per
actual printed message, i.e. all lines of the same message will have
the same actual heading text.</p>
<p>The result of the method is the specified text.</p></dd>
<dt><a name="5"><b class="cmd">debug</b> <b class="method">level</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">level</i>?</span> <span class="opt">?<i class="arg">fd</i>?</span></a></dt>







|









|














|







158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">debug.</b><b class="variable">tag</b> <i class="arg">message</i> <span class="opt">?<i class="arg">level</i>?</span></a></dt>
<dd><p>For each known tag the package creates a command with this signature
the user can then use to provide the debug narrative of the tag.
The narrative <i class="arg">message</i> is provided as a Tcl script whose value is
<b class="cmd"><a href="../../../../index.html#key273">subst</a></b>ed in the caller's scope if and only if the current level of
interest for the <i class="arg">tag</i> matches or exceeds the call's <i class="arg">level</i>
of detail.  This is useful, as one can place arbitrarily complex
narrative in code without unnecessarily evaluating it.</p>
<p>See methods <b class="method">level</b> and <b class="method">setting</b> for querying
and manipulating the current level of detail for tags.</p>
<p>The actually printed text consists of not only the
<i class="arg">message</i>, but also global and tag-specific prefix and suffix,
should they exist, with each line in the message having the specified
headers and trailers.</p>
<p>All these parts are <b class="cmd"><a href="../../../../index.html#key273">subst</a></b>ableTcl scripts, which are
substituted once per message before assembly.</p></dd>
<dt><a name="2"><b class="cmd">debug</b> <b class="method">2array</b></a></dt>
<dd><p>This method returns a dictionary mapping the names of all debug tags
currently known to the package to their state and log level. The
latter are encoded in a single numeric value, where a negative number
indicates an inactive tag at the level given by the absolute value, and
a positive number is an active tag at that level.</p>
<p>See also method <b class="method">settings</b> below.</p></dd>
<dt><a name="3"><b class="cmd">debug</b> <b class="method">define</b> <i class="arg">tag</i></a></dt>
<dd><p>This method registers the named <i class="arg">tag</i> with the package.  If the
tag was not known before it is placed in an inactive state. The state
of an already known tag is left untouched.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="4"><b class="cmd">debug</b> <b class="method">header</b> <i class="arg">text</i></a></dt>
<dd><p>This method defines a global <b class="cmd"><a href="../../../../index.html#key273">subst</a></b>able Tcl script which provides
a text printed before each line of output.</p>
<p>Note how this is tag-independent.</p>
<p>Further note that the header substitution happens only once per
actual printed message, i.e. all lines of the same message will have
the same actual heading text.</p>
<p>The result of the method is the specified text.</p></dd>
<dt><a name="5"><b class="cmd">debug</b> <b class="method">level</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">level</i>?</span> <span class="opt">?<i class="arg">fd</i>?</span></a></dt>
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<dd><p>This is a convenience method to insert a linefeed character (ASCII 0x0a)
into a debug message.</p></dd>
<dt><a name="13"><b class="cmd">debug</b> <b class="method">tab</b></a></dt>
<dd><p>This is a convenience method to insert a TAB character (ASCII 0x09)
into a debug message.</p></dd>
<dt><a name="14"><b class="cmd">debug</b> <b class="method">prefix</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This method is similar to the method <b class="method">header</b> above, in that it
defines <b class="cmd"><a href="../../../../index.html#subst">subst</a></b>able Tcl script which provides more text for debug
messages.</p>
<p>In contrast to <b class="method">header</b> the generated text is added to the
user's message before it is split into lines, making it a per-message
extension.</p>
<p>Furthermore the script is tag-dependent.</p>
<p>In exception to that, a script for tag <b class="const">::</b> is applied
to all messages.</p>







|







230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<dd><p>This is a convenience method to insert a linefeed character (ASCII 0x0a)
into a debug message.</p></dd>
<dt><a name="13"><b class="cmd">debug</b> <b class="method">tab</b></a></dt>
<dd><p>This is a convenience method to insert a TAB character (ASCII 0x09)
into a debug message.</p></dd>
<dt><a name="14"><b class="cmd">debug</b> <b class="method">prefix</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This method is similar to the method <b class="method">header</b> above, in that it
defines <b class="cmd"><a href="../../../../index.html#key273">subst</a></b>able Tcl script which provides more text for debug
messages.</p>
<p>In contrast to <b class="method">header</b> the generated text is added to the
user's message before it is split into lines, making it a per-message
extension.</p>
<p>Furthermore the script is tag-dependent.</p>
<p>In exception to that, a script for tag <b class="const">::</b> is applied
to all messages.</p>
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
activating it.</p>
<p>If the last argument is not followed by a level it is not
treated as tag name, but as the channel all the named tags should
print their messages to.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="16"><b class="cmd">debug</b> <b class="method">suffix</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This method is similar to the method <b class="method">trailer</b> below, in that
it defines <b class="cmd"><a href="../../../../index.html#subst">subst</a></b>able Tcl script which provides more text for
debug messages.</p>
<p>In contrast to <b class="method">trailer</b> the generated text is added to
the user's message before it is split into lines, making it a
per-message extension.</p>
<p>Furthermore the script is tag-dependent.</p>
<p>In exception to that, a script for tag <b class="const">::</b> is applied
to all messages.</p>
<p>If both global and tag-dependent suffix exist, both are
applied, with the global suffix coming after the tag-dependent suffix.</p>
<p>Note that the suffix substitution happens only once per actual
printed message.</p>
<p>The result of the method is the empty string.</p>
<p>If the <i class="arg">tag</i> was not known at the time of the call it is
registered, and set inactive.</p></dd>
<dt><a name="17"><b class="cmd">debug</b> <b class="method">trailer</b> <i class="arg">text</i></a></dt>
<dd><p>This method defines a global <b class="cmd"><a href="../../../../index.html#subst">subst</a></b>able Tcl script which provides
a text printed after each line of output (before the EOL however).</p>
<p>Note how this is tag-independent.</p>
<p>Further note that the trailer substitution happens only once
per actual printed message, i.e. all lines of the same message will
have the same actual trailing text.</p>
<p>The result of the method is the specified text.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#debug">debug</a>, <a href="../../../../index.html#log">log</a>, <a href="../../../../index.html#narrative">narrative</a>, <a href="../../../../index.html#trace">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200?, Colin McCormack, Wub Server Utilities<br>
Copyright &copy; 2012-2014, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|















|















<
<
<
<
<
<


|









259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297






298
299
300
301
302
303
304
305
306
307
308
309
activating it.</p>
<p>If the last argument is not followed by a level it is not
treated as tag name, but as the channel all the named tags should
print their messages to.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="16"><b class="cmd">debug</b> <b class="method">suffix</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>This method is similar to the method <b class="method">trailer</b> below, in that
it defines <b class="cmd"><a href="../../../../index.html#key273">subst</a></b>able Tcl script which provides more text for
debug messages.</p>
<p>In contrast to <b class="method">trailer</b> the generated text is added to
the user's message before it is split into lines, making it a
per-message extension.</p>
<p>Furthermore the script is tag-dependent.</p>
<p>In exception to that, a script for tag <b class="const">::</b> is applied
to all messages.</p>
<p>If both global and tag-dependent suffix exist, both are
applied, with the global suffix coming after the tag-dependent suffix.</p>
<p>Note that the suffix substitution happens only once per actual
printed message.</p>
<p>The result of the method is the empty string.</p>
<p>If the <i class="arg">tag</i> was not known at the time of the call it is
registered, and set inactive.</p></dd>
<dt><a name="17"><b class="cmd">debug</b> <b class="method">trailer</b> <i class="arg">text</i></a></dt>
<dd><p>This method defines a global <b class="cmd"><a href="../../../../index.html#key273">subst</a></b>able Tcl script which provides
a text printed after each line of output (before the EOL however).</p>
<p>Note how this is tag-independent.</p>
<p>Further note that the trailer substitution happens only once
per actual printed message, i.e. all lines of the same message will
have the same actual trailing text.</p>
<p>The result of the method is the specified text.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key76">debug</a>, <a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key72">narrative</a>, <a href="../../../../index.html#key74">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200?, Colin McCormack, Wub Server Utilities<br>
Copyright &copy; 2012-2014, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/debug/debug_caller.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>debug::caller - debug narrative</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>debug::caller - debug narrative</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'debug_caller.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2012-2015, Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- debug::caller.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug::caller(n) 1.1 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug::caller - debug narrative - caller</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'debug_caller.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2012-2015, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- debug::caller.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug::caller(n) 1.1 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug::caller - debug narrative - caller</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<dt><a name="1"><b class="cmd"><a href="debug.html">debug</a></b> <b class="method">caller</b> <span class="opt">?<i class="arg">args</i>...?</span></a></dt>
<dd><p>This method is useful in a tag-specific prefix to automatically
provide caller information for all uses of the tag. Or in a message,
when only specific places need such detail.</p>
<p>Beyond that it recognizing the various internal forms of method
calls generated by the <b class="package"><a href="../snit/snit.html">snit</a></b> OO system and rewrites these to
their original form, for better readability.
Similarly for <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b>.</p>
<p>If <i class="arg">args</i> are specified then they are treated as the
integer indices of command arguments to <em>not</em> show in the
output. The referenced arguments are replaced by <b class="const">*</b> instead.
The main anticipiated use case for this is the exclusion of arguments
expected to contain large Tcl values, i.e. long lists, large
dictionaries, etc. to prevent them from overwhelming the narrative.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#debug">debug</a>, <a href="../../../../index.html#log">log</a>, <a href="../../../../index.html#narrative">narrative</a>, <a href="../../../../index.html#trace">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2012-2015, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|















<
<
<
<
<
<


|








142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164






165
166
167
168
169
170
171
172
173
174
175
<dt><a name="1"><b class="cmd"><a href="debug.html">debug</a></b> <b class="method">caller</b> <span class="opt">?<i class="arg">args</i>...?</span></a></dt>
<dd><p>This method is useful in a tag-specific prefix to automatically
provide caller information for all uses of the tag. Or in a message,
when only specific places need such detail.</p>
<p>Beyond that it recognizing the various internal forms of method
calls generated by the <b class="package"><a href="../snit/snit.html">snit</a></b> OO system and rewrites these to
their original form, for better readability.
Similarly for <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>.</p>
<p>If <i class="arg">args</i> are specified then they are treated as the
integer indices of command arguments to <em>not</em> show in the
output. The referenced arguments are replaced by <b class="const">*</b> instead.
The main anticipiated use case for this is the exclusion of arguments
expected to contain large Tcl values, i.e. long lists, large
dictionaries, etc. to prevent them from overwhelming the narrative.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key76">debug</a>, <a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key72">narrative</a>, <a href="../../../../index.html#key74">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2012-2015, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/debug/debug_heartbeat.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>debug::heartbeat - debug narrative</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>debug::heartbeat - debug narrative</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'debug_heartbeat.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 200?, Colin McCormack, Wub Server Utilities   -- Copyright &amp;copy; 2012, Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- debug::heartbeat.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug::heartbeat(n) 1.0.1 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug::heartbeat - debug narrative - heartbeat</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">debug::heartbeat <span class="opt">?1.0.1?</span></b></li>
<li>package require <b class="pkgname">debug <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="debug.html">debug</a></b> <b class="method">heartbeat</b> <span class="opt">?<i class="arg">delta</i>?</span></a></li>
</ul>
</div>
</div>







|

|

|



|
|
|
|
|
|


|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'debug_heartbeat.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 200?, Colin McCormack, Wub Server Utilities   -- Copyright &copy; 2012, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- debug::heartbeat.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug::heartbeat(n) 1 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug::heartbeat - debug narrative - heartbeat</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">debug::heartbeat <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">debug <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="debug.html">debug</a></b> <b class="method">heartbeat</b> <span class="opt">?<i class="arg">delta</i>?</span></a></li>
</ul>
</div>
</div>
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#debug">debug</a>, <a href="../../../../index.html#heartbeat">heartbeat</a>, <a href="../../../../index.html#log">log</a>, <a href="../../../../index.html#narrative">narrative</a>, <a href="../../../../index.html#trace">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200?, Colin McCormack, Wub Server Utilities<br>
Copyright &copy; 2012, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|









155
156
157
158
159
160
161






162
163
164
165
166
167
168
169
170
171
172
173
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key76">debug</a>, <a href="../../../../index.html#key710">heartbeat</a>, <a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key72">narrative</a>, <a href="../../../../index.html#key74">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200?, Colin McCormack, Wub Server Utilities<br>
Copyright &copy; 2012, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/debug/debug_timestamp.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>debug::timestamp - debug narrative</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>debug::timestamp - debug narrative</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'debug_timestamp.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 200?, Colin McCormack, Wub Server Utilities   -- Copyright &amp;copy; 2012, Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- debug::timestamp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug::timestamp(n) 1 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug::timestamp - debug narrative - timestamping</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'debug_timestamp.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 200?, Colin McCormack, Wub Server Utilities   -- Copyright &copy; 2012, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- debug::timestamp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">debug::timestamp(n) 1 tcllib &quot;debug narrative&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>debug::timestamp - debug narrative - timestamping</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#debug">debug</a>, <a href="../../../../index.html#log">log</a>, <a href="../../../../index.html#narrative">narrative</a>, <a href="../../../../index.html#timestamps">timestamps</a>, <a href="../../../../index.html#trace">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200?, Colin McCormack, Wub Server Utilities<br>
Copyright &copy; 2012, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|









150
151
152
153
154
155
156






157
158
159
160
161
162
163
164
165
166
167
168
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>debug</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key76">debug</a>, <a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key72">narrative</a>, <a href="../../../../index.html#key75">timestamps</a>, <a href="../../../../index.html#key74">trace</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>debugging, tracing, and logging</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200?, Colin McCormack, Wub Server Utilities<br>
Copyright &copy; 2012, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/defer/defer.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!DOCTYPE html><html><head>
<title>defer - Defered execution ala Go</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'defer.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2017, Roy Keene
   -->
<!-- defer.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">defer(n) 1 tcllib &quot;Defered execution ala Go&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>defer - Defered execution</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">REFERENCES</a></li>
<li class="doctools_section"><a href="#section5">AUTHORS</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">defer <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::defer::defer</b> <span class="opt">?<i class="arg">command</i>?</span> <span class="opt">?<i class="arg">arg1</i>?</span> <span class="opt">?<i class="arg">arg2</i>?</span> <span class="opt">?<i class="arg">argN...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::defer::with</b> <i class="arg">variableList</i> <i class="arg">script</i></a></li>
<li><a href="#3"><b class="cmd">::defer::autowith</b> <i class="arg">script</i></a></li>
<li><a href="#4"><b class="cmd">::defer::cancel</b> <span class="opt">?<i class="arg">id...</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">defer</b> commands allow a developer to schedule actions to happen
as part of the current variable scope terminating.  This is most useful
for dealing with cleanup activities.  Since the defered actions always
execute, and always execute in the reverse order from which the defer
statements themselves execute, the programmer can schedule the cleanup
of a resource (for example, a channel) as soon as that resource is
acquired.  Then, later if the procedure or lambda ends, either due to
an error, or an explicit return, the cleanup of that resource will
always occur.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::defer::defer</b> <span class="opt">?<i class="arg">command</i>?</span> <span class="opt">?<i class="arg">arg1</i>?</span> <span class="opt">?<i class="arg">arg2</i>?</span> <span class="opt">?<i class="arg">argN...</i>?</span></a></dt>
<dd><p>Defers execution of some code until the current variable scope
ends.  Each argument is concatencated together to form the script
to execute at deferal time.
Multiple defer statements may be used, they are executed in the order
of last-in, first-out.
The return value is an identifier which can be used later with 
<b class="cmd">defer::cancel</b></p></dd>
<dt><a name="2"><b class="cmd">::defer::with</b> <i class="arg">variableList</i> <i class="arg">script</i></a></dt>
<dd><p>Defers execution of a script while copying the current value of some
variables, whose names specified in <i class="arg">variableList</i>, into the script.
The script acts like a lambda but executes at the same level as the
<b class="cmd">defer::with</b>
call.
The return value is the same as
<b class="cmd">::defer::defer</b></p></dd>
<dt><a name="3"><b class="cmd">::defer::autowith</b> <i class="arg">script</i></a></dt>
<dd><p>The same as
<b class="cmd">::defer::with</b> but uses all local variables in the variable list.</p></dd>
<dt><a name="4"><b class="cmd">::defer::cancel</b> <span class="opt">?<i class="arg">id...</i>?</span></a></dt>
<dd><p>Cancels the execution of a defered action.  The <i class="arg">id</i> argument is the
identifier returned by
<b class="cmd">::defer::defer</b>,
<b class="cmd">::defer::with</b>, or
<b class="cmd">::defer::autowith</b>.
Any number of arguments may be supplied, and all of the IDs supplied
will be cancelled.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<pre class="doctools_example">
	package require defer 1
	apply {{} {
		set fd [open /dev/null]
		defer::defer close $fd
	}}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Roy Keene</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>defer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cleanup">cleanup</a>, <a href="../../../../index.html#golang">golang</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2017, Roy Keene</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/des/des.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>des - Data Encryption Standard (DES)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>des - Data Encryption Standard (DES)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'des.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- des.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">des(n) 1.1 tcllib &quot;Data Encryption Standard (DES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>des - Implementation of the DES and triple-DES ciphers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'des.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- des.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">des(n) 1.1 tcllib &quot;Data Encryption Standard (DES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>des - Implementation of the DES and triple-DES ciphers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
the TclDES web pages. The tcllib specific code is a wrapper to the
TclDES API that presents same API for the DES cipher as for other
ciphers in the library.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::DES::des</b> <span class="opt">?<i class="arg">-mode [ecb|cbc|cfb|ofb]</i>?</span> <span class="opt">?<i class="arg">-dir [encrypt|decrypt]</i>?</span> <i class="arg">-key keydata</i> <span class="opt">?<i class="arg">-iv vector</i>?</span> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-weak</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> [ <i class="arg">-in channel</i> | <i class="arg">data</i> ]</a></dt>
<dd><p>Perform the <b class="package"><a href="../../../../index.html#des">DES</a></b> algorithm on either the data provided
by the argument or on the data read from the <i class="arg">-in</i> channel. If
an <i class="arg">-out</i> channel is given then the result will be written to
this channel.</p>
<p>The <i class="arg">-key</i> option must be given. This parameter takes a binary
string of 8 bytes in length and is used to generate the key schedule.
In DES only 56 bits of key data are used. The highest bit from each
byte is discarded.</p>







|







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
the TclDES web pages. The tcllib specific code is a wrapper to the
TclDES API that presents same API for the DES cipher as for other
ciphers in the library.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::DES::des</b> <span class="opt">?<i class="arg">-mode [ecb|cbc|cfb|ofb]</i>?</span> <span class="opt">?<i class="arg">-dir [encrypt|decrypt]</i>?</span> <i class="arg">-key keydata</i> <span class="opt">?<i class="arg">-iv vector</i>?</span> <span class="opt">?<i class="arg">-hex</i>?</span> <span class="opt">?<i class="arg">-weak</i>?</span> <span class="opt">?<i class="arg">-out channel</i>?</span> <span class="opt">?<i class="arg">-chunksize size</i>?</span> [ <i class="arg">-in channel</i> | <i class="arg">data</i> ]</a></dt>
<dd><p>Perform the <b class="package"><a href="../../../../index.html#key296">DES</a></b> algorithm on either the data provided
by the argument or on the data read from the <i class="arg">-in</i> channel. If
an <i class="arg">-out</i> channel is given then the result will be written to
this channel.</p>
<p>The <i class="arg">-key</i> option must be given. This parameter takes a binary
string of 8 bytes in length and is used to generate the key schedule.
In DES only 56 bits of key data are used. The highest bit from each
byte is discarded.</p>
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>des</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../aes/aes.html">aes(n)</a>, <a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../md5/md5.html">md5(n)</a>, <a href="../rc4/rc4.html">rc4(n)</a>, <a href="../sha1/sha1.html">sha1(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#3des">3DES</a>, <a href="../../../../index.html#des">DES</a>, <a href="../../../../index.html#block_cipher">block cipher</a>, <a href="../../../../index.html#data_integrity">data integrity</a>, <a href="../../../../index.html#encryption">encryption</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








275
276
277
278
279
280
281






282
283
284
285
286
287
288
289
290
291
292
293
294
295
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>des</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../aes/aes.html">aes(n)</a>, <a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../md5/md5.html">md5(n)</a>, <a href="../rc4/rc4.html">rc4(n)</a>, <a href="../sha1/sha1.html">sha1(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key298">3DES</a>, <a href="../../../../index.html#key296">DES</a>, <a href="../../../../index.html#key297">block cipher</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/des/tcldes.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tclDES - Data Encryption Standard (DES)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tclDES - Data Encryption Standard (DES)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcldes.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- tclDES.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tclDES(n) 1.1 tcllib &quot;Data Encryption Standard (DES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tclDES - Implementation of the DES and triple-DES ciphers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcldes.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- tclDES.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tclDES(n) 1.1 tcllib &quot;Data Encryption Standard (DES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tclDES - Implementation of the DES and triple-DES ciphers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>des</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="des.html">des(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#3des">3DES</a>, <a href="../../../../index.html#des">DES</a>, <a href="../../../../index.html#block_cipher">block cipher</a>, <a href="../../../../index.html#data_integrity">data integrity</a>, <a href="../../../../index.html#encryption">encryption</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








139
140
141
142
143
144
145






146
147
148
149
150
151
152
153
154
155
156
157
158
159
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>des</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="des.html">des(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key298">3DES</a>, <a href="../../../../index.html#key296">DES</a>, <a href="../../../../index.html#key297">block cipher</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/des/tcldesjr.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tclDESjr - Data Encryption Standard (DES)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tclDESjr - Data Encryption Standard (DES)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcldesjr.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- tclDESjr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tclDESjr(n) 1.1 tcllib &quot;Data Encryption Standard (DES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tclDESjr - Implementation of the DES and triple-DES ciphers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcldesjr.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- tclDESjr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tclDESjr(n) 1.1 tcllib &quot;Data Encryption Standard (DES)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tclDESjr - Implementation of the DES and triple-DES ciphers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>des</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="des.html">des(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#3des">3DES</a>, <a href="../../../../index.html#des">DES</a>, <a href="../../../../index.html#block_cipher">block cipher</a>, <a href="../../../../index.html#data_integrity">data integrity</a>, <a href="../../../../index.html#encryption">encryption</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








139
140
141
142
143
144
145






146
147
148
149
150
151
152
153
154
155
156
157
158
159
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>des</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="des.html">des(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key298">3DES</a>, <a href="../../../../index.html#key296">DES</a>, <a href="../../../../index.html#key297">block cipher</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/dicttool/dicttool.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>dicttool - Extensions to the standard &quot;dict&quot; command</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>dicttool - Extensions to the standard &quot;dict&quot; command</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'dicttool.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2017 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- dicttool.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dicttool(n) 1.0 tcllib &quot;Extensions to the standard &quot;dict&quot; command&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dicttool - Dictionary Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'dicttool.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;
   -->
<! -- dicttool.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dicttool(n) 1.0 tcllib &quot;Extensions to the standard &quot;dict&quot; command&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dicttool - Dictionary Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">dicttool <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">ladd</b> <i class="arg">varname</i> <i class="arg">args</i></a></li>
<li><a href="#2"><b class="cmd">ldelete</b> <i class="arg">varname</i> <i class="arg">args</i></a></li>
<li><a href="#3"><b class="cmd">dict getnull</b> <i class="arg">args</i></a></li>
<li><a href="#4"><b class="cmd">dict print</b> <i class="arg">dict</i></a></li>
<li><a href="#5"><b class="cmd">dict is_dict</b> <i class="arg">value</i></a></li>







<







123
124
125
126
127
128
129

130
131
132
133
134
135
136
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>

</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">ladd</b> <i class="arg">varname</i> <i class="arg">args</i></a></li>
<li><a href="#2"><b class="cmd">ldelete</b> <i class="arg">varname</i> <i class="arg">args</i></a></li>
<li><a href="#3"><b class="cmd">dict getnull</b> <i class="arg">args</i></a></li>
<li><a href="#4"><b class="cmd">dict print</b> <i class="arg">dict</i></a></li>
<li><a href="#5"><b class="cmd">dict is_dict</b> <i class="arg">value</i></a></li>
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
Each command checks to see if a command already exists of the same name before adding itself,
just in case any of these slip into the core.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">ladd</b> <i class="arg">varname</i> <i class="arg">args</i></a></dt>
<dd><p>This command will add a new instance of each element in <i class="arg">args</i> to <i class="arg">varname</i>, but only if that element
is not already present.</p></dd>
<dt><a name="2"><b class="cmd">ldelete</b> <i class="arg">varname</i> <i class="arg">args</i></a></dt>
<dd><p>This command will delete all instances of each element in <i class="arg">args</i> from <i class="arg">varname</i>.</p></dd>
<dt><a name="3"><b class="cmd">dict getnull</b> <i class="arg">args</i></a></dt>
<dd><p>Operates like <b class="cmd">dict get</b>, however if the key <i class="arg">args</i> does not exist, it returns an empty
list instead of throwing an error.</p></dd>
<dt><a name="4"><b class="cmd">dict print</b> <i class="arg">dict</i></a></dt>
<dd><p>This command will produce a string representation of <i class="arg">dict</i>, with each nested branch on
a newline, and indented with two spaces for every level.</p></dd>
<dt><a name="5"><b class="cmd">dict is_dict</b> <i class="arg">value</i></a></dt>







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
Each command checks to see if a command already exists of the same name before adding itself,
just in case any of these slip into the core.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">ladd</b> <i class="arg">varname</i> <i class="arg">args</i></a></dt>
<dd><p>This command will add a new instance of each element in <i class="arg">args</i> to <i class="arg">varname</i>, but only if that element
is not already present.</p></dd>
<dt><a name="2"><b class="cmd">ldelete</b> <i class="arg">varname</i> <i class="arg">args</i></a></dt>
<dd><p>This command will add a delete all instances of each element in <i class="arg">args</i> from <i class="arg">varname</i>.</p></dd>
<dt><a name="3"><b class="cmd">dict getnull</b> <i class="arg">args</i></a></dt>
<dd><p>Operates like <b class="cmd">dict get</b>, however if the key <i class="arg">args</i> does not exist, it returns an empty
list instead of throwing an error.</p></dd>
<dt><a name="4"><b class="cmd">dict print</b> <i class="arg">dict</i></a></dt>
<dd><p>This command will produce a string representation of <i class="arg">dict</i>, with each nested branch on
a newline, and indented with two spaces for every level.</p></dd>
<dt><a name="5"><b class="cmd">dict is_dict</b> <i class="arg">value</i></a></dt>
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>dict</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#dict">dict</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utilities</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2017 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|


|


|


190
191
192
193
194
195
196






197
198
199
200
201
202
203
204
205
206
207
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>dict</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key705">dict</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utilites</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/dns/tcllib_dns.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>dns - Domain Name Service</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>dns - Domain Name Service</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_dns.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002, Pat Thoyts
   -->
<!-- dns.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dns(n) 1.5.0 tcllib &quot;Domain Name Service&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dns - Tcl Domain Name Service Client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_dns.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002, Pat Thoyts
   -->
<! -- dns.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dns(n) 1.3.5 tcllib &quot;Domain Name Service&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dns - Tcl Domain Name Service Client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">dns <span class="opt">?1.5.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::dns::resolve</b> <i class="arg">query</i> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::dns::configure</b> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::dns::name</b> <i class="arg">token</i></a></li>
<li><a href="#4"><b class="cmd">::dns::address</b> <i class="arg">token</i></a></li>
<li><a href="#5"><b class="cmd">::dns::cname</b> <i class="arg">token</i></a></li>







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">dns <span class="opt">?1.3.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::dns::resolve</b> <i class="arg">query</i> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::dns::configure</b> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::dns::name</b> <i class="arg">token</i></a></li>
<li><a href="#4"><b class="cmd">::dns::address</b> <i class="arg">token</i></a></li>
<li><a href="#5"><b class="cmd">::dns::cname</b> <i class="arg">token</i></a></li>
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<a href="dns://my.nameserver/what.host.com">dns://my.nameserver/what.host.com</a>. The <b class="cmd">dns::resolve</b>
command can handle DNS URIs or simple domain names as a query.</p>
<p><em>Note:</em> The package defaults to using DNS over TCP
connections. If you wish to use UDP you will need to have the
<b class="package">tcludp</b> package installed and have a version that
correctly handles binary data (&gt; 1.0.4).
This is available at <a href="http://tcludp.sourceforge.net/">http://tcludp.sourceforge.net/</a>.
If the <b class="package">udp</b> package is present then UDP will be used by
default.</p>
<p><em>Note:</em> The package supports DNS over TLS (RFC 7858) for
enhanced privacy of DNS queries. Using this feature requires
the TLS package.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::dns::resolve</b> <i class="arg">query</i> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>Resolve a domain name using the <i class="term"><a href="../../../../index.html#dns">DNS</a></i> protocol. <i class="arg">query</i> is
the domain name to be lookup up. This should be either a fully
qualified domain name or a DNS URI.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">-nameserver</b> <i class="arg">hostname</i> or <b class="cmd">-server</b> <i class="arg">hostname</i></dt>
<dd><p>Specify an alternative name server for this request.</p></dd>
<dt><b class="cmd">-protocol</b> <i class="arg">tcp|udp</i></dt>
<dd><p>Specify the network protocol to use for this request. Can be one of







|
<
<
<
<




|







166
167
168
169
170
171
172
173




174
175
176
177
178
179
180
181
182
183
184
185
<a href="dns://my.nameserver/what.host.com">dns://my.nameserver/what.host.com</a>. The <b class="cmd">dns::resolve</b>
command can handle DNS URIs or simple domain names as a query.</p>
<p><em>Note:</em> The package defaults to using DNS over TCP
connections. If you wish to use UDP you will need to have the
<b class="package">tcludp</b> package installed and have a version that
correctly handles binary data (&gt; 1.0.4).
This is available at <a href="http://tcludp.sourceforge.net/">http://tcludp.sourceforge.net/</a>.
If the <b class="package">udp</b> package is present then UDP will be used by default.</p>




</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::dns::resolve</b> <i class="arg">query</i> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>Resolve a domain name using the <i class="term"><a href="../../../../index.html#key599">DNS</a></i> protocol. <i class="arg">query</i> is
the domain name to be lookup up. This should be either a fully
qualified domain name or a DNS URI.</p>
<dl class="doctools_definitions">
<dt><b class="cmd">-nameserver</b> <i class="arg">hostname</i> or <b class="cmd">-server</b> <i class="arg">hostname</i></dt>
<dd><p>Specify an alternative name server for this request.</p></dd>
<dt><b class="cmd">-protocol</b> <i class="arg">tcp|udp</i></dt>
<dd><p>Specify the network protocol to use for this request. Can be one of
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
  of IN for internet domain names, CS, CH, HS or * for any class.</p></dd>
<dt><b class="cmd">-recurse</b> <i class="arg">boolean</i></dt>
<dd><p>Set to <i class="arg">false</i> if you do not want the name server to recursively
  act upon your request. Normally set to <i class="arg">true</i>.</p></dd>
<dt><b class="cmd">-command</b> <i class="arg">procname</i></dt>
<dd><p>Set a procedure to be called upon request completion. The procedure
  will be passed the token as its only argument.</p></dd>
<dt><b class="cmd">-usetls</b> <i class="arg">boolean</i></dt>
<dd><p>Set the <i class="arg">true</i> to use DNS over TLS. This will force the use of
  TCP and change the default port to 853. Certificate validation is
  required so a source of trusted certificate authority certificates
  must be provided using <i class="arg">-cafile</i> or <i class="arg">-cadir</i>.</p></dd>
<dt><b class="cmd">-cafile</b> <i class="arg">filepath</i></dt>
<dd><p>Specify a file containing a collection of trusted certificate
  authority certficates. See the <b class="cmd">update-ca-certificates</b> command
  manual page for details or the <b class="cmd">-CAfile</b> option help from
  <b class="cmd">openssl</b>.</p></dd>
<dt><b class="cmd">-cadir</b> <i class="arg">dirpath</i></dt>
<dd><p>Specify a directory containing trusted certificate authority
  certificates. This must be provided if <b class="cmd">-cafile</b> is not
  specified for certificate validation to work when <b class="cmd">-usetls</b> is
  enabled. See the <b class="cmd">openssl</b> documentation for the required
  structure of this directory.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::dns::configure</b> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>The <b class="cmd">::dns::configure</b> command is used to setup the dns
package. The server to query, the protocol and domain search path are
all set via this command. If no arguments are provided then a list of
all the current settings is returned.  If only one argument then it
must the the name of an option and the value for that option is







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







202
203
204
205
206
207
208
















209
210
211
212
213
214
215
  of IN for internet domain names, CS, CH, HS or * for any class.</p></dd>
<dt><b class="cmd">-recurse</b> <i class="arg">boolean</i></dt>
<dd><p>Set to <i class="arg">false</i> if you do not want the name server to recursively
  act upon your request. Normally set to <i class="arg">true</i>.</p></dd>
<dt><b class="cmd">-command</b> <i class="arg">procname</i></dt>
<dd><p>Set a procedure to be called upon request completion. The procedure
  will be passed the token as its only argument.</p></dd>
















</dl></dd>
<dt><a name="2"><b class="cmd">::dns::configure</b> <span class="opt">?<i class="arg">options</i>?</span></a></dt>
<dd><p>The <b class="cmd">::dns::configure</b> command is used to setup the dns
package. The server to query, the protocol and domain search path are
all set via this command. If no arguments are provided then a list of
all the current settings is returned.  If only one argument then it
must the the name of an option and the value for that option is
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<dd><p>Set the domain search list. This is currently not used.</p></dd>
<dt><b class="cmd">-timeout</b> <i class="arg">milliseconds</i></dt>
<dd><p>Set the default timeout value for DNS lookups. Default is 30 seconds.</p></dd>
<dt><b class="cmd">-loglevel</b> <i class="arg">level</i></dt>
<dd><p>Set the log level used for emitting diagnostic messages from this
  package. The default is <i class="term">warn</i>. See the <b class="package"><a href="../log/log.html">log</a></b> package
  for details of the available levels.</p></dd>
<dt><b class="cmd">-cafile</b> <i class="arg">filepath</i></dt>
<dd><p>Set the default file path to be used for the <b class="cmd">-cafile</b>
   option to <b class="cmd">dns::resolve</b>.</p></dd>
<dt><b class="cmd">-cadir</b> <i class="arg">dirpath</i></dt>
<dd><p>Set the default directory path to be used for the <b class="cmd">-cadir</b>
   option to <b class="cmd">dns::resolve</b>.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::dns::name</b> <i class="arg">token</i></a></dt>
<dd><p>Returns a list of all domain names returned as an answer to your query.</p></dd>
<dt><a name="4"><b class="cmd">::dns::address</b> <i class="arg">token</i></a></dt>
<dd><p>Returns a list of the address records that match your query.</p></dd>
<dt><a name="5"><b class="cmd">::dns::cname</b> <i class="arg">token</i></a></dt>
<dd><p>Returns a list of canonical names (usually just one) matching your query.</p></dd>







<
<
<
<
<
<







226
227
228
229
230
231
232






233
234
235
236
237
238
239
<dd><p>Set the domain search list. This is currently not used.</p></dd>
<dt><b class="cmd">-timeout</b> <i class="arg">milliseconds</i></dt>
<dd><p>Set the default timeout value for DNS lookups. Default is 30 seconds.</p></dd>
<dt><b class="cmd">-loglevel</b> <i class="arg">level</i></dt>
<dd><p>Set the log level used for emitting diagnostic messages from this
  package. The default is <i class="term">warn</i>. See the <b class="package"><a href="../log/log.html">log</a></b> package
  for details of the available levels.</p></dd>






</dl></dd>
<dt><a name="3"><b class="cmd">::dns::name</b> <i class="arg">token</i></a></dt>
<dd><p>Returns a list of all domain names returned as an answer to your query.</p></dd>
<dt><a name="4"><b class="cmd">::dns::address</b> <i class="arg">token</i></a></dt>
<dd><p>Returns a list of the address records that match your query.</p></dd>
<dt><a name="5"><b class="cmd">::dns::cname</b> <i class="arg">token</i></a></dt>
<dd><p>Returns a list of canonical names (usually just one) matching your query.</p></dd>
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<pre class="doctools_example">
% set tok [dns::resolve 127.0.0.1]
::dns::1
% dns::name $tok
localhost
% dns::cleanup $tok
</pre>
<p>Using DNS over TLS (RFC 7858):</p>
<pre class="doctools_example">
% set tok [dns::resolve www.tcl.tk -nameserver dns-tls.bitwiseshift.net  -usetls 1 -cafile /etc/ssl/certs/ca-certificates.crt]
::dns::12
% dns::wait $tok
ok
% dns::address $tok
104.25.119.118 104.25.120.118
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Mockapetris, P., &quot;Domain Names - Concepts and Facilities&quot;,
    RFC 1034, November 1987.
    (<a href="http://www.ietf.org/rfc/rfc1034.txt">http://www.ietf.org/rfc/rfc1034.txt</a>)</p></li>
<li><p>Mockapetris, P., &quot;Domain Names - Implementation and Specification&quot;,







<
<
<
<
<
<
<
<
<







282
283
284
285
286
287
288









289
290
291
292
293
294
295
<pre class="doctools_example">
% set tok [dns::resolve 127.0.0.1]
::dns::1
% dns::name $tok
localhost
% dns::cleanup $tok
</pre>









</div>
<div id="section4" class="doctools_section"><h2><a name="section4">REFERENCES</a></h2>
<ol class="doctools_enumerated">
<li><p>Mockapetris, P., &quot;Domain Names - Concepts and Facilities&quot;,
    RFC 1034, November 1987.
    (<a href="http://www.ietf.org/rfc/rfc1034.txt">http://www.ietf.org/rfc/rfc1034.txt</a>)</p></li>
<li><p>Mockapetris, P., &quot;Domain Names - Implementation and Specification&quot;,
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
<li><p>Gulbrandsen, A., Vixie, P. and Esibov, L.,
    &quot;A DNS RR for specifying the location of services (DNS SRV)&quot;,
    RFC 2782, February 2000,
    (<a href="http://www.ietf.org/rfc/rfc2782.txt">http://www.ietf.org/rfc/rfc2782.txt</a>)</p></li>
<li><p>Ohta, M. &quot;Incremental Zone Transfer in DNS&quot;,
    RFC 1995, August 1996,
    (<a href="http://www.ietf.org/rfc/rfc1995.txt">http://www.ietf.org/rfc/rfc1995.txt</a>)</p></li>
<li><p>Hu, Z., etc al.
    &quot;Specification for DNS over Transport Layer Security (TLS)&quot;,
    RFC 7858, May 2016,
    (<a href="http://www.ietf.org/rfc/rfc7858.txt">http://www.ietf.org/rfc/rfc7858.txt</a>)</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>dns</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>resolver(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#dns">DNS</a>, <a href="../../../../index.html#domain_name_service">domain name service</a>, <a href="../../../../index.html#resolver">resolver</a>, <a href="../../../../index.html#rfc_1034">rfc 1034</a>, <a href="../../../../index.html#rfc_1035">rfc 1035</a>, <a href="../../../../index.html#rfc_1886">rfc 1886</a>, <a href="../../../../index.html#rfc_7858">rfc 7858</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>







<
<
<
<












<
<
<
<
<
<





|








304
305
306
307
308
309
310




311
312
313
314
315
316
317
318
319
320
321
322






323
324
325
326
327
328
329
330
331
332
333
334
335
336
<li><p>Gulbrandsen, A., Vixie, P. and Esibov, L.,
    &quot;A DNS RR for specifying the location of services (DNS SRV)&quot;,
    RFC 2782, February 2000,
    (<a href="http://www.ietf.org/rfc/rfc2782.txt">http://www.ietf.org/rfc/rfc2782.txt</a>)</p></li>
<li><p>Ohta, M. &quot;Incremental Zone Transfer in DNS&quot;,
    RFC 1995, August 1996,
    (<a href="http://www.ietf.org/rfc/rfc1995.txt">http://www.ietf.org/rfc/rfc1995.txt</a>)</p></li>




</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>dns</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>resolver(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key599">DNS</a>, <a href="../../../../index.html#key602">domain name service</a>, <a href="../../../../index.html#key601">resolver</a>, <a href="../../../../index.html#key603">rfc 1034</a>, <a href="../../../../index.html#key598">rfc 1035</a>, <a href="../../../../index.html#key600">rfc 1886</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/dns/tcllib_ip.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcllib_ip - Domain Name Service</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcllib_ip - Domain Name Service</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_ip.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004, Pat Thoyts   -- Copyright &amp;copy; 2005 Aamer Akhter &amp;lt;aakhter@cisco.com&amp;gt;
   -->
<!-- tcllib_ip.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcllib_ip(n) 1.4 tcllib &quot;Domain Name Service&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcllib_ip - IPv4 and IPv6 address manipulation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_ip.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004, Pat Thoyts   -- Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;
   -->
<! -- tcllib_ip.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcllib_ip(n) 1.4 tcllib &quot;Domain Name Service&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcllib_ip - IPv4 and IPv6 address manipulation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<p>This package provides a set of commands to help in parsing, displaying
and comparing internet addresses. The package can handle both IPv4 (1)
and IPv6 (2) address types.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ip::version</b> <i class="arg">address</i></a></dt>
<dd><p>Returns the protocol version of the address (<b class="const">4</b> or <b class="const">6</b>),
or <b class="const">-1</b> if the address is neither IPv4 or IPv6.</p></dd>
<dt><a name="2"><b class="cmd">::ip::is</b> <i class="arg">class</i> <i class="arg">address</i></a></dt>
<dd><p>Returns true if the address is a member of the given protocol
class. The class parameter may be either <b class="const">ipv4</b> or <b class="const">ipv6</b>
This is effectively a boolean equivalent of the <b class="cmd">version</b>
command. The <i class="arg">class</i> argument may be shortened to <b class="const">4</b> or
<b class="const">6</b>.</p></dd>
<dt><a name="3"><b class="cmd">::ip::equal</b> <i class="arg">address</i> <i class="arg">address</i></a></dt>
<dd><p>Compare two address specifications for equivalence. The arguments are
normalized and the address prefix determined (if a mask is
supplied). The normalized addresses are then compared bit-by-bit and
the procedure returns true if they match.</p></dd>
<dt><a name="4"><b class="cmd">::ip::normalize</b> <i class="arg">address</i></a></dt>
<dd><p>Convert an IPv4 or IPv6 address into a fully expanded version. There
are various shorthand ways to write internet addresses, missing out
redundant parts or digits. This procedure is the opposite of
<b class="cmd">contract</b>.</p></dd>
<dt><a name="5"><b class="cmd">::ip::contract</b> <i class="arg">address</i></a></dt>
<dd><p>Convert a <b class="cmd">normalize</b>d internet address into a more compact form
suitable for displaying to users.</p></dd>
<dt><a name="6"><b class="cmd">::ip::distance</b> <i class="arg">ipaddr1</i> <i class="arg">ipaddr2</i></a></dt>
<dd><p>This command computes the (integer) distance from IPv4 address
<i class="arg">ipaddr1</i> to IPv4 address <i class="arg">ipaddr2</i>, i.e. &quot;ipaddr2 - ipaddr1&quot;</p>
<pre class="doctools_example">
   % ::ip::distance 1.1.1.1  1.1.1.5
   4
</pre>
</dd>
<dt><a name="7"><b class="cmd">::ip::nextIp</b> <i class="arg">ipaddr</i> <span class="opt">?<i class="arg">offset</i>?</span></a></dt>







|
|


|

|
|














|







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<p>This package provides a set of commands to help in parsing, displaying
and comparing internet addresses. The package can handle both IPv4 (1)
and IPv6 (2) address types.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ip::version</b> <i class="arg">address</i></a></dt>
<dd><p>Returns the protocol version of the address (4 or 6) or 0 if the
address is neither IPv4 or IPv6.</p></dd>
<dt><a name="2"><b class="cmd">::ip::is</b> <i class="arg">class</i> <i class="arg">address</i></a></dt>
<dd><p>Returns true if the address is a member of the given protocol
class. The class parameter may be either <i class="arg">ipv4</i> or <i class="arg">ipv6</i>
This is effectively a boolean equivalent of the <b class="cmd">version</b>
command. The <i class="arg">class</i> argument may be shortened to <i class="arg">4</i> or
<i class="arg">6</i>.</p></dd>
<dt><a name="3"><b class="cmd">::ip::equal</b> <i class="arg">address</i> <i class="arg">address</i></a></dt>
<dd><p>Compare two address specifications for equivalence. The arguments are
normalized and the address prefix determined (if a mask is
supplied). The normalized addresses are then compared bit-by-bit and
the procedure returns true if they match.</p></dd>
<dt><a name="4"><b class="cmd">::ip::normalize</b> <i class="arg">address</i></a></dt>
<dd><p>Convert an IPv4 or IPv6 address into a fully expanded version. There
are various shorthand ways to write internet addresses, missing out
redundant parts or digits. This procedure is the opposite of
<b class="cmd">contract</b>.</p></dd>
<dt><a name="5"><b class="cmd">::ip::contract</b> <i class="arg">address</i></a></dt>
<dd><p>Convert a <b class="cmd">normalize</b>d internet address into a more compact form
suitable for displaying to users.</p></dd>
<dt><a name="6"><b class="cmd">::ip::distance</b> <i class="arg">ipaddr1</i> <i class="arg">ipaddr2</i></a></dt>
<dd><p>This command computes the (integer) distance from IPv4 address 
<i class="arg">ipaddr1</i> to IPv4 address <i class="arg">ipaddr2</i>, i.e. &quot;ipaddr2 - ipaddr1&quot;</p>
<pre class="doctools_example">
   % ::ip::distance 1.1.1.1  1.1.1.5
   4
</pre>
</dd>
<dt><a name="7"><b class="cmd">::ip::nextIp</b> <i class="arg">ipaddr</i> <span class="opt">?<i class="arg">offset</i>?</span></a></dt>
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>dns</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>inet(3), ip(7), ipv6(7)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#internet_address">internet address</a>, <a href="../../../../index.html#ip">ip</a>, <a href="../../../../index.html#ipv4">ipv4</a>, <a href="../../../../index.html#ipv6">ipv6</a>, <a href="../../../../index.html#rfc_3513">rfc 3513</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts<br>
Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|









460
461
462
463
464
465
466






467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>dns</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>inet(3), ip(7), ipv6(7)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key454">internet address</a>, <a href="../../../../index.html#key451">ip</a>, <a href="../../../../index.html#key453">ipv4</a>, <a href="../../../../index.html#key450">ipv6</a>, <a href="../../../../index.html#key452">rfc 3513</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts<br>
Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/docstrip/docstrip.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>docstrip - Literate programming tool</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>docstrip - Literate programming tool</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'docstrip.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003–2010 Lars Hellstr&amp;ouml;m &amp;lt;Lars dot Hellstrom at residenset dot net&amp;gt;
   -->
<!-- docstrip.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docstrip(n) 1.2 tcllib &quot;Literate programming tool&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docstrip - Docstrip style source code extraction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docstrip.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003–2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;
   -->
<! -- docstrip.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docstrip(n) 1.2 tcllib &quot;Literate programming tool&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docstrip - Docstrip style source code extraction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
</pre>
<p>It does not matter to <b class="syscmd">docstrip</b> what format is used for the
documentation in the comment lines, but in order to do better than
plain text comments, one typically uses some markup language. Most
commonly LaTeX is used, as that is a very established standard and
also provides the best support for mathematical formulae, but the
<b class="package">docstrip::util</b> package also gives some support for
<i class="term"><a href="../../../../index.html#doctools">doctools</a></i>-like markup.</p>
<p>Besides the basic code and comment lines, there are also
<em>guard lines</em>, which begin with the two characters '%&lt;', and
<em>meta-comment lines</em>, which begin with the two characters
'%%'. Within guard lines there is furthermore the distinction between
<em>verbatim guard lines</em>, which begin with '%&lt;&lt;', and ordinary
guard lines, where the '%&lt;' is not followed by another '&lt;'. The last
category is by far the most common.</p>







|







221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
</pre>
<p>It does not matter to <b class="syscmd">docstrip</b> what format is used for the
documentation in the comment lines, but in order to do better than
plain text comments, one typically uses some markup language. Most
commonly LaTeX is used, as that is a very established standard and
also provides the best support for mathematical formulae, but the
<b class="package">docstrip::util</b> package also gives some support for
<i class="term"><a href="../../../../index.html#key179">doctools</a></i>-like markup.</p>
<p>Besides the basic code and comment lines, there are also
<em>guard lines</em>, which begin with the two characters '%&lt;', and
<em>meta-comment lines</em>, which begin with the two characters
'%%'. Within guard lines there is furthermore the distinction between
<em>verbatim guard lines</em>, which begin with '%&lt;&lt;', and ordinary
guard lines, where the '%&lt;' is not followed by another '&lt;'. The last
category is by far the most common.</p>
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
    trimmed away before the line is processed. Defaults to true.</p></dd>
</dl>
<p>It should be remarked that the <i class="arg">terminals</i> are often called
  &quot;options&quot; in the context of the <b class="syscmd">docstrip</b> program, since
  these specify which optional code fragments should be included.</p></dd>
<dt><a name="2"><b class="cmd">docstrip::sourcefrom</b> <i class="arg">filename</i> <i class="arg">terminals</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>The <b class="cmd">sourcefrom</b> command is a docstripping emulation of
  <b class="cmd"><a href="../../../../index.html#source">source</a></b>. It opens the file <i class="arg">filename</i>, reads it, closes it,
  docstrips the contents as specified by the <i class="arg">terminals</i>, and
  evaluates the result in the local context of the caller, during
  which time the <b class="cmd"><a href="../../../../index.html#info">info</a></b> <b class="method">script</b> value will be the
  <i class="arg">filename</i>. The options are passed on to <b class="cmd">fconfigure</b> to
  configure the file before its contents are read. The
  <b class="option">-metaprefix</b> is set to '#', all other <b class="cmd">extract</b>
  options have their default values.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Document structure</a></h2>
<p>The file format (as described above) determines whether a master
source code file can be processed correctly by <b class="syscmd">docstrip</b>,
but the usefulness of the format is to no little part also dependent
on that the code and comment lines together constitute a well-formed
document.</p>
<p>For a document format that does not require any non-Tcl software, see
the <b class="cmd">ddt2man</b> command in the <b class="package">docstrip::util</b> package. It
is suggested that files employing that document format are given the
suffix &quot;<b class="file">.ddt</b>&quot;, to distinguish them from the more traditional
LaTeX-based &quot;<b class="file">.dtx</b>&quot; files.</p>
<p>Master source files with &quot;<b class="file">.dtx</b>&quot; extension are usually set up so
that they can be typeset directly by <b class="syscmd"><a href="../../../../index.html#latex">latex</a></b> without any
support from other files. This is achieved by beginning the file
with the lines</p>
<pre class="doctools_example">
   % \iffalse
   %&lt;*driver&gt;
   \documentclass{tclldoc}
   \begin{document}







|


|


















|







448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
    trimmed away before the line is processed. Defaults to true.</p></dd>
</dl>
<p>It should be remarked that the <i class="arg">terminals</i> are often called
  &quot;options&quot; in the context of the <b class="syscmd">docstrip</b> program, since
  these specify which optional code fragments should be included.</p></dd>
<dt><a name="2"><b class="cmd">docstrip::sourcefrom</b> <i class="arg">filename</i> <i class="arg">terminals</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>The <b class="cmd">sourcefrom</b> command is a docstripping emulation of
  <b class="cmd"><a href="../../../../index.html#key436">source</a></b>. It opens the file <i class="arg">filename</i>, reads it, closes it,
  docstrips the contents as specified by the <i class="arg">terminals</i>, and
  evaluates the result in the local context of the caller, during
  which time the <b class="cmd"><a href="../../../../index.html#key83">info</a></b> <b class="method">script</b> value will be the
  <i class="arg">filename</i>. The options are passed on to <b class="cmd">fconfigure</b> to
  configure the file before its contents are read. The
  <b class="option">-metaprefix</b> is set to '#', all other <b class="cmd">extract</b>
  options have their default values.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Document structure</a></h2>
<p>The file format (as described above) determines whether a master
source code file can be processed correctly by <b class="syscmd">docstrip</b>,
but the usefulness of the format is to no little part also dependent
on that the code and comment lines together constitute a well-formed
document.</p>
<p>For a document format that does not require any non-Tcl software, see
the <b class="cmd">ddt2man</b> command in the <b class="package">docstrip::util</b> package. It
is suggested that files employing that document format are given the
suffix &quot;<b class="file">.ddt</b>&quot;, to distinguish them from the more traditional
LaTeX-based &quot;<b class="file">.dtx</b>&quot; files.</p>
<p>Master source files with &quot;<b class="file">.dtx</b>&quot; extension are usually set up so
that they can be typeset directly by <b class="syscmd"><a href="../../../../index.html#key186">latex</a></b> without any
support from other files. This is achieved by beginning the file
with the lines</p>
<pre class="doctools_example">
   % \iffalse
   %&lt;*driver&gt;
   \documentclass{tclldoc}
   \begin{document}
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
files containing Tcl code. More information on this matter can be
found in the references above.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docstrip_util.html">docstrip_util</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#_dtx">.dtx</a>, <a href="../../../../index.html#latex">LaTeX</a>, <a href="../../../../index.html#docstrip">docstrip</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#literate_programming">literate programming</a>, <a href="../../../../index.html#source">source</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003–2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;</p>
</div>
</div></body></html>







|








512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
files containing Tcl code. More information on this matter can be
found in the references above.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docstrip_util.html">docstrip_util</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key439">.dtx</a>, <a href="../../../../index.html#key438">LaTeX</a>, <a href="../../../../index.html#key435">docstrip</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key437">literate programming</a>, <a href="../../../../index.html#key436">source</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003–2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/docstrip/docstrip_util.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>docstrip_util - Literate programming tool</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>docstrip_util - Literate programming tool</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'docstrip_util.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003–2010 Lars Hellstr&amp;ouml;m &amp;lt;Lars dot Hellstrom at residenset dot net&amp;gt;
   -->
<!-- docstrip_util.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docstrip_util(n) 1.3.1 tcllib &quot;Literate programming tool&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docstrip_util - Docstrip-related utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docstrip_util.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003–2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;
   -->
<! -- docstrip_util.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docstrip_util(n) 1.3.1 tcllib &quot;Literate programming tool&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docstrip_util - Docstrip-related utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">docstrip::util</b> package is meant for collecting various
utility procedures that are mainly useful at installation or
development time. It is separate from the base package to avoid
overhead when the latter is used to <b class="cmd"><a href="../../../../index.html#source">source</a></b> code.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Package indexing commands</a></h2>
<p>Like raw &quot;<b class="file">.tcl</b>&quot; files, code lines in docstrip source files can
be searched for package declarations and corresponding indices
constructed. A complication is however that one cannot tell from the
code blocks themselves which will fit together to make a working
package; normally that information would be found in an accompanying
&quot;<b class="file">.ins</b>&quot; file, but parsing one of those is not an easy task.
Therefore <b class="package">docstrip::util</b> introduces an alternative encoding
of such information, in the form of a declarative Tcl script: the
<i class="term"><a href="../../../../index.html#catalogue">catalogue</a></i> (of the contents in a source file).</p>
<p>The special commands which are available inside a catalogue are:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pkgProvide</b> <i class="arg">name</i> <i class="arg">version</i> <i class="arg">terminals</i></a></dt>
<dd><p>Declares that the code for a package with name <i class="arg">name</i> and
  version <i class="arg">version</i> is made up from those modules in the source
  file which are selected by the <i class="arg">terminals</i> list of guard
  expression terminals. This code should preferably not contain a
  <b class="cmd"><a href="../../../../index.html#package">package</a></b> <b class="method">provide</b> command for the package, as one
  will be provided by the package loading mechanisms.</p></dd>
<dt><a name="2"><b class="cmd">pkgIndex</b> <span class="opt">?<i class="arg">terminal</i> ...?</span></a></dt>
<dd><p>Declares that the code for a package is made up from those modules
  in the source file which are selected by the listed guard
  expression <i class="arg">terminal</i>s. The name and version of this package is
  determined from <b class="cmd"><a href="../../../../index.html#package">package</a></b> <b class="method">provide</b> command(s) found
  in that code (hence there must be such a command in there).</p></dd>
<dt><a name="3"><b class="cmd">fileoptions</b> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>Declares the <b class="cmd">fconfigure</b> options that should be in force when
  reading the source; this can usually be ignored for pure ASCII
  files, but if the file needs to be interpreted according to some
  other <b class="option">-encoding</b> then this is how to specify it. The
  command should normally appear first in the catalogue, as it takes







|










|







|





|







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">docstrip::util</b> package is meant for collecting various
utility procedures that are mainly useful at installation or
development time. It is separate from the base package to avoid
overhead when the latter is used to <b class="cmd"><a href="../../../../index.html#key436">source</a></b> code.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Package indexing commands</a></h2>
<p>Like raw &quot;<b class="file">.tcl</b>&quot; files, code lines in docstrip source files can
be searched for package declarations and corresponding indices
constructed. A complication is however that one cannot tell from the
code blocks themselves which will fit together to make a working
package; normally that information would be found in an accompanying
&quot;<b class="file">.ins</b>&quot; file, but parsing one of those is not an easy task.
Therefore <b class="package">docstrip::util</b> introduces an alternative encoding
of such information, in the form of a declarative Tcl script: the
<i class="term"><a href="../../../../index.html#key665">catalogue</a></i> (of the contents in a source file).</p>
<p>The special commands which are available inside a catalogue are:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">pkgProvide</b> <i class="arg">name</i> <i class="arg">version</i> <i class="arg">terminals</i></a></dt>
<dd><p>Declares that the code for a package with name <i class="arg">name</i> and
  version <i class="arg">version</i> is made up from those modules in the source
  file which are selected by the <i class="arg">terminals</i> list of guard
  expression terminals. This code should preferably not contain a
  <b class="cmd"><a href="../../../../index.html#key48">package</a></b> <b class="method">provide</b> command for the package, as one
  will be provided by the package loading mechanisms.</p></dd>
<dt><a name="2"><b class="cmd">pkgIndex</b> <span class="opt">?<i class="arg">terminal</i> ...?</span></a></dt>
<dd><p>Declares that the code for a package is made up from those modules
  in the source file which are selected by the listed guard
  expression <i class="arg">terminal</i>s. The name and version of this package is
  determined from <b class="cmd"><a href="../../../../index.html#key48">package</a></b> <b class="method">provide</b> command(s) found
  in that code (hence there must be such a command in there).</p></dd>
<dt><a name="3"><b class="cmd">fileoptions</b> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>Declares the <b class="cmd">fconfigure</b> options that should be in force when
  reading the source; this can usually be ignored for pure ASCII
  files, but if the file needs to be interpreted according to some
  other <b class="option">-encoding</b> then this is how to specify it. The
  command should normally appear first in the catalogue, as it takes
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
    to false, in which case there is no particular return value.</p></dd>
<dt><b class="option">-reportcmd</b> <i class="arg">commandPrefix</i></dt>
<dd><p>Every item in the report is handed as an extra argument to the
    command prefix. Since <b class="cmd">index_from_catalogue</b> would typically
    be used at a rather high level in installation scripts and the
    like, the <i class="arg">commandPrefix</i> defaults to
    &quot;<b class="cmd">puts</b> <b class="const">stdout</b>&quot;.
    Use <b class="cmd"><a href="../../../../index.html#list">list</a></b> to effectively disable this feature. The return
    values from the prefix are ignored.</p></dd>
</dl>
<p>The <b class="cmd">package ifneeded</b> scripts that are generated contain
  one <b class="cmd">package require docstrip</b> command and one
  <b class="cmd">docstrip::sourcefrom</b> command. If the catalogue entry was
  of the <b class="cmd">pkgProvide</b> kind then the <b class="cmd">package ifneeded</b>
  script also contains the <b class="cmd">package provide</b> command.</p>







|







304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
    to false, in which case there is no particular return value.</p></dd>
<dt><b class="option">-reportcmd</b> <i class="arg">commandPrefix</i></dt>
<dd><p>Every item in the report is handed as an extra argument to the
    command prefix. Since <b class="cmd">index_from_catalogue</b> would typically
    be used at a rather high level in installation scripts and the
    like, the <i class="arg">commandPrefix</i> defaults to
    &quot;<b class="cmd">puts</b> <b class="const">stdout</b>&quot;.
    Use <b class="cmd"><a href="../../../../index.html#key302">list</a></b> to effectively disable this feature. The return
    values from the prefix are ignored.</p></dd>
</dl>
<p>The <b class="cmd">package ifneeded</b> scripts that are generated contain
  one <b class="cmd">package require docstrip</b> command and one
  <b class="cmd">docstrip::sourcefrom</b> command. If the catalogue entry was
  of the <b class="cmd">pkgProvide</b> kind then the <b class="cmd">package ifneeded</b>
  script also contains the <b class="cmd">package provide</b> command.</p>
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
    with a <i class="arg">metaprefix</i> of '##'.</p></dd>
<dt><b class="option">-report</b> <i class="arg">boolean</i></dt>
<dd><p>If the <i class="arg">boolean</i> is true (which is the default) then the return
    value will be a textual, probably multiline, report on what was
    done. If it is false then there is no particular return value.</p></dd>
<dt><b class="option">-reportcmd</b> <i class="arg">commandPrefix</i></dt>
<dd><p>Every item in the report is handed as an extra argument to this
    command prefix. Defaults to <b class="cmd"><a href="../../../../index.html#list">list</a></b>, which effectively disables
    this feature. The return values from the prefix are ignored. Use
    for example &quot;<b class="cmd">puts</b> <b class="const">stdout</b>&quot; to get report items
    written immediately to the terminal.</p></dd>
</dl>
<p>An existing file of the same name as one to be created will be
  overwritten.</p></dd>
<dt><a name="6"><b class="cmd">docstrip::util::classical_preamble</b> <i class="arg">metaprefix</i> <i class="arg">message</i> <i class="arg">target</i> <span class="opt">?<i class="arg">source</i> <i class="arg">terminals</i> ...?</span></a></dt>







|







373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
    with a <i class="arg">metaprefix</i> of '##'.</p></dd>
<dt><b class="option">-report</b> <i class="arg">boolean</i></dt>
<dd><p>If the <i class="arg">boolean</i> is true (which is the default) then the return
    value will be a textual, probably multiline, report on what was
    done. If it is false then there is no particular return value.</p></dd>
<dt><b class="option">-reportcmd</b> <i class="arg">commandPrefix</i></dt>
<dd><p>Every item in the report is handed as an extra argument to this
    command prefix. Defaults to <b class="cmd"><a href="../../../../index.html#key302">list</a></b>, which effectively disables
    this feature. The return values from the prefix are ignored. Use
    for example &quot;<b class="cmd">puts</b> <b class="const">stdout</b>&quot; to get report items
    written immediately to the terminal.</p></dd>
</dl>
<p>An existing file of the same name as one to be created will be
  overwritten.</p></dd>
<dt><a name="6"><b class="cmd">docstrip::util::classical_preamble</b> <i class="arg">metaprefix</i> <i class="arg">message</i> <i class="arg">target</i> <span class="opt">?<i class="arg">source</i> <i class="arg">terminals</i> ...?</span></a></dt>
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
  name of a package <b class="cmd">provide</b>d by <i class="arg">text</i> when that is
  evaluated as a Tcl script, and the following odd index element is
  the corresponding version. It is used to do package indexing of
  extracted pieces of code, in the manner of <b class="cmd">pkg_mkIndex</b>.</p>
<p>One difference to <b class="cmd">pkg_mkIndex</b> is that the <i class="arg">text</i> gets
  evaluated in a safe interpreter. <b class="cmd">package require</b> commands
  are silently ignored, as are unknown commands (which includes
  <b class="cmd"><a href="../../../../index.html#source">source</a></b> and <b class="cmd">load</b>). Other errors cause
  processing of the <i class="arg">text</i> to stop, in which case only those
  package declarations that had been encountered before the error
  will be included in the return value.</p>
<p>The <i class="arg">setup-script</i> argument can be used to customise the
  evaluation environment, if the code in <i class="arg">text</i> has some very
  special needs. The <i class="arg">setup-script</i> is evaluated in the local
  context of the <b class="cmd">packages_provided</b> procedure just before the







|







430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
  name of a package <b class="cmd">provide</b>d by <i class="arg">text</i> when that is
  evaluated as a Tcl script, and the following odd index element is
  the corresponding version. It is used to do package indexing of
  extracted pieces of code, in the manner of <b class="cmd">pkg_mkIndex</b>.</p>
<p>One difference to <b class="cmd">pkg_mkIndex</b> is that the <i class="arg">text</i> gets
  evaluated in a safe interpreter. <b class="cmd">package require</b> commands
  are silently ignored, as are unknown commands (which includes
  <b class="cmd"><a href="../../../../index.html#key436">source</a></b> and <b class="cmd">load</b>). Other errors cause
  processing of the <i class="arg">text</i> to stop, in which case only those
  package declarations that had been encountered before the error
  will be included in the return value.</p>
<p>The <i class="arg">setup-script</i> argument can be used to customise the
  evaluation environment, if the code in <i class="arg">text</i> has some very
  special needs. The <i class="arg">setup-script</i> is evaluated in the local
  context of the <b class="cmd">packages_provided</b> procedure just before the
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
    with the elements in no particular order.</p></dd>
<dt><b class="method">rotten</b></dt>
<dd><p>List the malformed guard lines (this does not include lines where
    only the expression is malformed, though). The format of the return
    value is a dictionary which maps line numbers to their contents.</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">docstrip::util::patch</b> <i class="arg">source-var</i> <i class="arg">terminals</i> <i class="arg">fromtext</i> <i class="arg">diff</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command tries to apply a <b class="syscmd"><a href="../../../../index.html#diff">diff</a></b> file (for example a
  contributed patch) that was computed for a generated file to the
  <b class="syscmd"><a href="docstrip.html">docstrip</a></b> source. This can be useful if someone has
  edited a generated file, thus mistaking it for being the source.
  This command makes no presumptions which are specific for the case
  that the generated file is a Tcl script.</p>
<p><b class="cmd"><a href="../../../../index.html#patch">patch</a></b> requires that the source file to patch is kept as a
  list of lines in a variable, and the name of that variable in the
  calling context is what goes into the <i class="arg">source-var</i> argument.
  The <i class="arg">terminals</i> is the list of terminals used to extract the
  file that has been patched. The <i class="arg">diff</i> is the actual diff to
  apply (in a format as explained below) and the <i class="arg">fromtext</i> is
  the contents of the file which served as &quot;from&quot; when the diff was
  computed. Options can be used to further control the process.</p>







|





|







559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
    with the elements in no particular order.</p></dd>
<dt><b class="method">rotten</b></dt>
<dd><p>List the malformed guard lines (this does not include lines where
    only the expression is malformed, though). The format of the return
    value is a dictionary which maps line numbers to their contents.</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">docstrip::util::patch</b> <i class="arg">source-var</i> <i class="arg">terminals</i> <i class="arg">fromtext</i> <i class="arg">diff</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command tries to apply a <b class="syscmd"><a href="../../../../index.html#key563">diff</a></b> file (for example a
  contributed patch) that was computed for a generated file to the
  <b class="syscmd"><a href="docstrip.html">docstrip</a></b> source. This can be useful if someone has
  edited a generated file, thus mistaking it for being the source.
  This command makes no presumptions which are specific for the case
  that the generated file is a Tcl script.</p>
<p><b class="cmd"><a href="../../../../index.html#key662">patch</a></b> requires that the source file to patch is kept as a
  list of lines in a variable, and the name of that variable in the
  calling context is what goes into the <i class="arg">source-var</i> argument.
  The <i class="arg">terminals</i> is the list of terminals used to extract the
  file that has been patched. The <i class="arg">diff</i> is the actual diff to
  apply (in a format as explained below) and the <i class="arg">fromtext</i> is
  the contents of the file which served as &quot;from&quot; when the diff was
  computed. Options can be used to further control the process.</p>
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
<dd><p>The <b class="option">-trimlines</b> value to use when extracting. Defaults to
    true.</p></dd>
</dl>
<p>The return value is in the form of a unified diff, containing only
  those hunks which were not applied or were only partially applied;
  a comment in the header of each hunk specifies which case is at
  hand. It is normally necessary to manually review both the return
  value from <b class="cmd"><a href="../../../../index.html#patch">patch</a></b> and the patched text itself, as this command
  cannot adjust comment lines to match new content.</p>
<p>An example use would look like</p>
<pre class="doctools_example">
set sourceL [split [docstrip::util::thefile from.dtx] \n]
set terminals {foo bar baz}
set fromtext [docstrip::util::thefile from.tcl]
set difftext [exec diff --unified from.tcl to.tcl]







|







622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
<dd><p>The <b class="option">-trimlines</b> value to use when extracting. Defaults to
    true.</p></dd>
</dl>
<p>The return value is in the form of a unified diff, containing only
  those hunks which were not applied or were only partially applied;
  a comment in the header of each hunk specifies which case is at
  hand. It is normally necessary to manually review both the return
  value from <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> and the patched text itself, as this command
  cannot adjust comment lines to match new content.</p>
<p>An example use would look like</p>
<pre class="doctools_example">
set sourceL [split [docstrip::util::thefile from.dtx] \n]
set terminals {foo bar baz}
set fromtext [docstrip::util::thefile from.tcl]
set difftext [exec diff --unified from.tcl to.tcl]
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
<dt><a name="12"><b class="cmd">docstrip::util::thefile</b> <i class="arg">filename</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>The <b class="cmd">thefile</b> command opens the file <i class="arg">filename</i>, reads it to
  end, closes it, and returns the contents (dropping a final newline
  if there is one). The option-value pairs are
  passed on to <b class="cmd">fconfigure</b> to configure the open file channel
  before anything is read from it.</p></dd>
<dt><a name="13"><b class="cmd">docstrip::util::import_unidiff</b> <i class="arg">diff-text</i> <span class="opt">?<i class="arg">warning-var</i>?</span></a></dt>
<dd><p>This command parses a unified (<b class="syscmd"><a href="../../../../index.html#diff">diff</a></b> flags <b class="option">-U</b> and
  <b class="option">--unified</b>) format diff into the list-of-hunks format
  expected by <b class="cmd">docstrip::util::patch</b>. The <i class="arg">diff-text</i>
  argument is the text to parse and the <i class="arg">warning-var</i> is, if
  specified, the name in the calling context of a variable to which
  any warnings about parsing problems will be <b class="cmd">append</b>ed.</p>
<p>The return value is a list of <i class="term">hunks</i>. Each hunk is a list of
  five elements &quot;<i class="arg">start1</i> <i class="arg">end1</i> <i class="arg">start2</i> <i class="arg">end2</i>







|







645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
<dt><a name="12"><b class="cmd">docstrip::util::thefile</b> <i class="arg">filename</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>The <b class="cmd">thefile</b> command opens the file <i class="arg">filename</i>, reads it to
  end, closes it, and returns the contents (dropping a final newline
  if there is one). The option-value pairs are
  passed on to <b class="cmd">fconfigure</b> to configure the open file channel
  before anything is read from it.</p></dd>
<dt><a name="13"><b class="cmd">docstrip::util::import_unidiff</b> <i class="arg">diff-text</i> <span class="opt">?<i class="arg">warning-var</i>?</span></a></dt>
<dd><p>This command parses a unified (<b class="syscmd"><a href="../../../../index.html#key563">diff</a></b> flags <b class="option">-U</b> and
  <b class="option">--unified</b>) format diff into the list-of-hunks format
  expected by <b class="cmd">docstrip::util::patch</b>. The <i class="arg">diff-text</i>
  argument is the text to parse and the <i class="arg">warning-var</i> is, if
  specified, the name in the calling context of a variable to which
  any warnings about parsing problems will be <b class="cmd">append</b>ed.</p>
<p>The return value is a list of <i class="term">hunks</i>. Each hunk is a list of
  five elements &quot;<i class="arg">start1</i> <i class="arg">end1</i> <i class="arg">start2</i> <i class="arg">end2</i>
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
  in both.</p></dd>
</dl>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docstrip.html">docstrip</a>, <a href="../doctools/doctools.html">doctools</a>, doctools_fmt</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#_ddt">.ddt</a>, <a href="../../../../index.html#_dtx">.dtx</a>, <a href="../../../../index.html#latex">LaTeX</a>, <a href="../../../../index.html#tcl_module">Tcl module</a>, <a href="../../../../index.html#catalogue">catalogue</a>, <a href="../../../../index.html#diff">diff</a>, <a href="../../../../index.html#docstrip">docstrip</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#literate_programming">literate programming</a>, <a href="../../../../index.html#module">module</a>, <a href="../../../../index.html#package_indexing">package indexing</a>, <a href="../../../../index.html#patch">patch</a>, <a href="../../../../index.html#source">source</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003–2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;</p>
</div>
</div></body></html>







|








668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
  in both.</p></dd>
</dl>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docstrip.html">docstrip</a>, <a href="../doctools/doctools.html">doctools</a>, doctools_fmt</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key666">.ddt</a>, <a href="../../../../index.html#key439">.dtx</a>, <a href="../../../../index.html#key438">LaTeX</a>, <a href="../../../../index.html#key663">Tcl module</a>, <a href="../../../../index.html#key665">catalogue</a>, <a href="../../../../index.html#key563">diff</a>, <a href="../../../../index.html#key435">docstrip</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key437">literate programming</a>, <a href="../../../../index.html#key667">module</a>, <a href="../../../../index.html#key664">package indexing</a>, <a href="../../../../index.html#key662">patch</a>, <a href="../../../../index.html#key436">source</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003–2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/changelog.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::changelog - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::changelog - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'changelog.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003-2013 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::changelog.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::changelog(n) 1.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::changelog - Processing text in Emacs ChangeLog format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'changelog.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::changelog.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::changelog(n) 1.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::changelog - Processing text in Emacs ChangeLog format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<li><a href="#3"><b class="cmd">::doctools::changelog::toDoctools</b> <i class="arg">title</i> <i class="arg">module</i> <i class="arg">version</i> <i class="arg">entries</i></a></li>
<li><a href="#4"><b class="cmd">::doctools::changelog::merge</b> <i class="arg">entries</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides Tcl commands for the processing and reformatting
of text in the &quot;<b class="file">ChangeLog</b>&quot; format generated by <b class="syscmd"><a href="../../../../index.html#emacs">emacs</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::changelog::scan</b> <i class="arg">text</i></a></dt>
<dd><p>The command takes the <i class="arg">text</i> and parses it under the assumption
that it contains a ChangeLog as generated by <b class="syscmd"><a href="../../../../index.html#emacs">emacs</a></b>. It
returns a data structure describing the contents of this ChangeLog.</p>
<p>This data structure is a list where each element describes one entry
in the ChangeLog. Each element/entry is then a list of three elements
describing the date of the entry, its author, and the comments made,
in this order. The last item in each element/entry, the comments, is a
list of sections. Each section is described by a list containing two
elements, a list of file names, and a string containing the true







|





|







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<li><a href="#3"><b class="cmd">::doctools::changelog::toDoctools</b> <i class="arg">title</i> <i class="arg">module</i> <i class="arg">version</i> <i class="arg">entries</i></a></li>
<li><a href="#4"><b class="cmd">::doctools::changelog::merge</b> <i class="arg">entries</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides Tcl commands for the processing and reformatting
of text in the &quot;<b class="file">ChangeLog</b>&quot; format generated by <b class="syscmd"><a href="../../../../index.html#key449">emacs</a></b>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::changelog::scan</b> <i class="arg">text</i></a></dt>
<dd><p>The command takes the <i class="arg">text</i> and parses it under the assumption
that it contains a ChangeLog as generated by <b class="syscmd"><a href="../../../../index.html#key449">emacs</a></b>. It
returns a data structure describing the contents of this ChangeLog.</p>
<p>This data structure is a list where each element describes one entry
in the ChangeLog. Each element/entry is then a list of three elements
describing the date of the entry, its author, and the comments made,
in this order. The last item in each element/entry, the comments, is a
list of sections. Each section is described by a list containing two
elements, a list of file names, and a string containing the true
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<dd><p>This command converts a list of entries as generated by
<b class="cmd">change::scan</b> above into a simpler list of plain
text blocks each containing all the information of a
single entry.</p></dd>
<dt><a name="3"><b class="cmd">::doctools::changelog::toDoctools</b> <i class="arg">title</i> <i class="arg">module</i> <i class="arg">version</i> <i class="arg">entries</i></a></dt>
<dd><p>This command converts the pre-parsed ChangeLog <i class="arg">entries</i> as
generated by the command <b class="cmd">::doctools::changelog::scan</b> into a
document in <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> format and returns it as the result of the
command.</p>
<p>The other three arguments supply the information for the header of
that document which is not available from the changelog itself.</p></dd>
<dt><a name="4"><b class="cmd">::doctools::changelog::merge</b> <i class="arg">entries</i>...</a></dt>
<dd><p>Each argument of the command is assumed to be a pre-parsed Changelog
as generated by the command <b class="cmd">::doctools::changelog::scan</b>. This
command merges all of them into a single structure, and collapses
multiple entries for the same date and author into a single entry. The
new structure is returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#changelog">changelog</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#emacs">emacs</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|


















<
<
<
<
<
<


|








177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202






203
204
205
206
207
208
209
210
211
212
213
<dd><p>This command converts a list of entries as generated by
<b class="cmd">change::scan</b> above into a simpler list of plain
text blocks each containing all the information of a
single entry.</p></dd>
<dt><a name="3"><b class="cmd">::doctools::changelog::toDoctools</b> <i class="arg">title</i> <i class="arg">module</i> <i class="arg">version</i> <i class="arg">entries</i></a></dt>
<dd><p>This command converts the pre-parsed ChangeLog <i class="arg">entries</i> as
generated by the command <b class="cmd">::doctools::changelog::scan</b> into a
document in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format and returns it as the result of the
command.</p>
<p>The other three arguments supply the information for the header of
that document which is not available from the changelog itself.</p></dd>
<dt><a name="4"><b class="cmd">::doctools::changelog::merge</b> <i class="arg">entries</i>...</a></dt>
<dd><p>Each argument of the command is assumed to be a pre-parsed Changelog
as generated by the command <b class="cmd">::doctools::changelog::scan</b>. This
command merges all of them into a single structure, and collapses
multiple entries for the same date and author into a single entry. The
new structure is returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key448">changelog</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key449">emacs</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/cvs.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::cvs - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::cvs - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'cvs.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::cvs.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::cvs(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::cvs - Processing text in 'cvs log' format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'cvs.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::cvs.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::cvs(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::cvs - Processing text in 'cvs log' format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<li><a href="#1"><b class="cmd">::doctools::cvs::scanLog</b> <i class="arg">text</i> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></li>
<li><a href="#2"><b class="cmd">::doctools::cvs::toChangeLog</b> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides Tcl commands for the processing and reformatting
text in the format generated by the <b class="syscmd"><a href="../../../../index.html#cvs_log">cvs log</a></b> command.</p>
<p>The commands <b class="cmd">::doctools::cvs::scanLog</b>
and <b class="cmd">::doctools::cvs::toChangeLog</b> are derived from code found on
the <a href="http://wiki.tcl.tk">Tcl'ers Wiki</a>. See the references at the
end of the page.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::cvs::scanLog</b> <i class="arg">text</i> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></dt>
<dd><p>The command takes the <i class="arg">text</i> and parses it under the assumption
that it contains a CVS log as generated by <b class="syscmd"><a href="../../../../index.html#cvs_log">cvs log</a></b>. The
resulting information is stored in the variables whose names were
specified via <i class="arg">evar</i>, <i class="arg">cvar</i>, and <i class="arg">fvar</i>.</p>
<p>Already existing information in the referenced variables is preserved,
allowing the caller to merge data from multiple logs into one
database.</p>
<dl class="doctools_arguments">
<dt>varname <i class="arg">evar</i> (in)</dt>







|









|







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<li><a href="#1"><b class="cmd">::doctools::cvs::scanLog</b> <i class="arg">text</i> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></li>
<li><a href="#2"><b class="cmd">::doctools::cvs::toChangeLog</b> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides Tcl commands for the processing and reformatting
text in the format generated by the <b class="syscmd"><a href="../../../../index.html#key775">cvs log</a></b> command.</p>
<p>The commands <b class="cmd">::doctools::cvs::scanLog</b>
and <b class="cmd">::doctools::cvs::toChangeLog</b> are derived from code found on
the <a href="http://wiki.tcl.tk">Tcl'ers Wiki</a>. See the references at the
end of the page.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::cvs::scanLog</b> <i class="arg">text</i> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></dt>
<dd><p>The command takes the <i class="arg">text</i> and parses it under the assumption
that it contains a CVS log as generated by <b class="syscmd"><a href="../../../../index.html#key775">cvs log</a></b>. The
resulting information is stored in the variables whose names were
specified via <i class="arg">evar</i>, <i class="arg">cvar</i>, and <i class="arg">fvar</i>.</p>
<p>Already existing information in the referenced variables is preserved,
allowing the caller to merge data from multiple logs into one
database.</p>
<dl class="doctools_arguments">
<dt>varname <i class="arg">evar</i> (in)</dt>
174
175
176
177
178
179
180

181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<dt>varname <i class="arg">fvar</i> (in)</dt>
<dd><p>Has to refer to an array variable. Keys are strings containing
date, author of a log entry, and a comment for that entry, in this
order, separated by commas.</p>
<p>The values are lists of the files the entry is touching.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::doctools::cvs::toChangeLog</b> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></dt>

<dd><p>The three arguments for this command are the same as the last three
arguments of the command <b class="cmd">::doctools::cvs::scanLog</b>. This command
however expects them to be filled with information about one or more
logs. It takes this information and converts it into a text in the
format of a ChangeLog as accepted and generated by <b class="syscmd"><a href="../../../../index.html#emacs">emacs</a></b>. The
constructed text is returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>[uri, http://wiki.tcl.tk/log2changelog</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#changelog">changelog</a>, <a href="../../../../index.html#cvs">cvs</a>, <a href="../../../../index.html#cvs_log">cvs log</a>, <a href="../../../../index.html#emacs">emacs</a>, <a href="../../../../index.html#log">log</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







>
|



|










<
<
<
<
<
<





|








175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197






198
199
200
201
202
203
204
205
206
207
208
209
210
211
<dt>varname <i class="arg">fvar</i> (in)</dt>
<dd><p>Has to refer to an array variable. Keys are strings containing
date, author of a log entry, and a comment for that entry, in this
order, separated by commas.</p>
<p>The values are lists of the files the entry is touching.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::doctools::cvs::toChangeLog</b> <i class="arg">evar</i> <i class="arg">cvar</i> <i class="arg">fvar</i></a></dt>
<dd><p>]
The three arguments for this command are the same as the last three
arguments of the command <b class="cmd">::doctools::cvs::scanLog</b>. This command
however expects them to be filled with information about one or more
logs. It takes this information and converts it into a text in the
format of a ChangeLog as accepted and generated by <b class="syscmd"><a href="../../../../index.html#key449">emacs</a></b>. The
constructed text is returned as the result of the command.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>[uri, http://wiki.tcl.tk/log2changelog</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key448">changelog</a>, <a href="../../../../index.html#key774">cvs</a>, <a href="../../../../index.html#key775">cvs log</a>, <a href="../../../../index.html#key449">emacs</a>, <a href="../../../../index.html#key73">log</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/docidx.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'docidx.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx(n) 1.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx - docidx - Processing indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docidx.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx(n) 1.0.5 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx - docidx - Processing indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools::idx <span class="opt">?1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::idx::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::idx::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools::idx <span class="opt">?1.0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::idx::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::idx::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<li><a href="#14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">warnings</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of objects able to
process and convert text written in the <i class="term"><a href="../../../../index.html#docidx">docidx</a></i> markup language
into any output format X for which a <i class="term"><a href="../../../../index.html#formatting_engine">formatting engine</a></i> is
available.</p>
<p>A reader interested in the markup language itself should start with
the <i class="term"><a href="docidx_lang_intro.html">docidx language introduction</a></i> and proceed from there to
the formal specifications, i.e. the <i class="term"><a href="docidx_lang_syntax.html">docidx language syntax</a></i>
and the <i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i>.</p>
<p>If on the other hand the reader wishes to write her own formatting
engine for some format, i.e. is a <i class="term">plugin writer</i> then reading
and understanding the <i class="term"><a href="docidx_plugin_apiref.html">docidx plugin API reference</a></i> is an
absolute necessity, as that document specifies the interaction between
this package and its plugins, i.e. the formatting engines, in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command creates a new docidx object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the object.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::idx::help</b></a></dt>







|
|
















|







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<li><a href="#14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">warnings</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of objects able to
process and convert text written in the <i class="term"><a href="../../../../index.html#key178">docidx</a></i> markup language
into any output format X for which a <i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> is
available.</p>
<p>A reader interested in the markup language itself should start with
the <i class="term"><a href="docidx_lang_intro.html">docidx language introduction</a></i> and proceed from there to
the formal specifications, i.e. the <i class="term"><a href="docidx_lang_syntax.html">docidx language syntax</a></i>
and the <i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i>.</p>
<p>If on the other hand the reader wishes to write her own formatting
engine for some format, i.e. is a <i class="term">plugin writer</i> then reading
and understanding the <i class="term"><a href="docidx_plugin_apiref.html">docidx plugin API reference</a></i> is an
absolute necessity, as that document specifies the interaction between
this package and its plugins, i.e. the formatting engines, in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command creates a new docidx object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the object.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::idx::help</b></a></dt>
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the <i class="arg">text</i> through the configured formatting
engine and returns the generated string as its result. An error will
be thrown if no <b class="option">-format</b> was configured for the object.</p>
<p>The method assumes that the <i class="arg">text</i> is in <i class="term"><a href="../../../../index.html#docidx">docidx</a></i> format as
specified in the companion document <i class="term">docidx_fmt</i>. Errors will be
thrown otherwise.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></dt>
<dd><p>This methods add one entry to the per-object mapping from
<i class="arg">symbolic</i> filenames to the <i class="arg">actual</i> uris.
The object just stores this mapping and makes it available to the
configured formatting engine through the command <b class="cmd">dt_fmap</b>.







|







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the <i class="arg">text</i> through the configured formatting
engine and returns the generated string as its result. An error will
be thrown if no <b class="option">-format</b> was configured for the object.</p>
<p>The method assumes that the <i class="arg">text</i> is in <i class="term"><a href="../../../../index.html#key178">docidx</a></i> format as
specified in the companion document <i class="term">docidx_fmt</i>. Errors will be
thrown otherwise.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></dt>
<dd><p>This methods add one entry to the per-object mapping from
<i class="arg">symbolic</i> filenames to the <i class="arg">actual</i> uris.
The object just stores this mapping and makes it available to the
configured formatting engine through the command <b class="cmd">dt_fmap</b>.
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
after the <b class="const">&lt;head&gt;</b> tag, starting the header section of the
generated HTML.</p>
<p>This can be used to insert boilerplate meta data markup into the
generated document, like references to a stylesheet, standard meta
keywords, etc.</p></dd>
</dl></dd>
<dt>latex</dt>
<dd><p>This engine generates output suitable for the <b class="syscmd"><a href="../../../../index.html#latex">latex</a></b> text
processor coming out of the TeX world.</p></dd>
<dt>list</dt>
<dd><p>This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.</p></dd>
<dt>markdown</dt>
<dd><p>This engine generates <i class="term"><a href="../../../../index.html#markdown">Markdown</a></i> markup.</p></dd>
<dt>nroff</dt>
<dd><p>This engine generates nroff output, for processing by <b class="syscmd"><a href="../../../../index.html#nroff">nroff</a></b>,
or <b class="syscmd">groff</b>. The result will be standard man pages as they are
known in the unix world.</p></dd>
<dt>null</dt>
<dd><p>This engine generates no outout at all. This can be used if one just
wants to validate some input.</p></dd>
<dt>tmml</dt>
<dd><p>This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.</p></dd>
<dt>wiki</dt>
<dd><p>This engine generates Wiki markup as understood by Jean Claude
Wippler's <b class="syscmd">wikit</b> application.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a>, <a href="docidx_plugin_apiref.html">docidx_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#tmml">TMML</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#keyword_index">keyword index</a>, <a href="../../../../index.html#latex">latex</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markdown">markdown</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#nroff">nroff</a>, <a href="../../../../index.html#wiki">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|





<
<

|




















<
<
<
<
<
<





|





|


368
369
370
371
372
373
374
375
376
377
378
379
380


381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402






403
404
405
406
407
408
409
410
411
412
413
414
415
416
after the <b class="const">&lt;head&gt;</b> tag, starting the header section of the
generated HTML.</p>
<p>This can be used to insert boilerplate meta data markup into the
generated document, like references to a stylesheet, standard meta
keywords, etc.</p></dd>
</dl></dd>
<dt>latex</dt>
<dd><p>This engine generates output suitable for the <b class="syscmd"><a href="../../../../index.html#key186">latex</a></b> text
processor coming out of the TeX world.</p></dd>
<dt>list</dt>
<dd><p>This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.</p></dd>


<dt>nroff</dt>
<dd><p>This engine generates nroff output, for processing by <b class="syscmd"><a href="../../../../index.html#key21">nroff</a></b>,
or <b class="syscmd">groff</b>. The result will be standard man pages as they are
known in the unix world.</p></dd>
<dt>null</dt>
<dd><p>This engine generates no outout at all. This can be used if one just
wants to validate some input.</p></dd>
<dt>tmml</dt>
<dd><p>This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.</p></dd>
<dt>wiki</dt>
<dd><p>This engine generates Wiki markup as understood by Jean Claude
Wippler's <b class="syscmd">wikit</b> application.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a>, <a href="docidx_plugin_apiref.html">docidx_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/docidx_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>docidx_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>docidx_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'docidx_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- docidx_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_intro - docidx introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RELATED FORMATS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#docidx">docidx</a></i> (short for <em>documentation tables of contents</em>)
stands for a set of related, yet different, entities which are working
together for the easy creation and transformation of keyword-based
indices for documentation. These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a keyword index.
Markup is represented by Tcl commands.</p></li>
<li><p>A package providing the ability to read and transform texts written in







|

|

|



|
|
|
|
|
|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docidx_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- docidx_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_intro - docidx introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RELATED FORMATS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key178">docidx</a></i> (short for <em>documentation tables of contents</em>)
stands for a set of related, yet different, entities which are working
together for the easy creation and transformation of keyword-based
indices for documentation. These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a keyword index.
Markup is represented by Tcl commands.</p></li>
<li><p>A package providing the ability to read and transform texts written in
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of docidx when handling directories of documentation,
automatically generating a proper keyword index for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#docidx">docidx</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose docidx to the
user.
At the bottom level, common to both applications, however sits the
package <b class="package">doctoools::idx</b>, providing the basic facilities to
read and process files containing text in the docidx format.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the <b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b> package and its
plugins, as described in the <i class="term"><a href="docidx_plugin_apiref.html">docidx plugin API reference</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RELATED FORMATS</a></h2>
<p>docidx does not stand alone, it has two companion formats. These are
called <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i> and <i class="term"><a href="../../../../index.html#doctools">doctools</a></i>, and they are for the markup
of <i class="term">tables of contents</i>, and general documentation,
respectively.
They are described in their own sets of documents, starting at the
<i class="term"><a href="doctoc_intro.html">doctoc introduction</a></i> and the <i class="term"><a href="doctools_intro.html">doctools introduction</a></i>,
respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a>, <a href="docidx_plugin_apiref.html">docidx_plugin_apiref</a>, <a href="doctoc_intro.html">doctoc_intro</a>, <a href="../doctools2idx/idx_container.html">doctools::idx</a>, <a href="doctools_intro.html">doctools_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#keyword_index">keyword index</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|














|













<
<
<
<
<
<





|








150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185






186
187
188
189
190
191
192
193
194
195
196
197
198
199
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of docidx when handling directories of documentation,
automatically generating a proper keyword index for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#key178">docidx</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose docidx to the
user.
At the bottom level, common to both applications, however sits the
package <b class="package">doctoools::idx</b>, providing the basic facilities to
read and process files containing text in the docidx format.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the <b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b> package and its
plugins, as described in the <i class="term"><a href="docidx_plugin_apiref.html">docidx plugin API reference</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RELATED FORMATS</a></h2>
<p>docidx does not stand alone, it has two companion formats. These are
called <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> and <i class="term"><a href="../../../../index.html#key179">doctools</a></i>, and they are for the markup
of <i class="term">tables of contents</i>, and general documentation,
respectively.
They are described in their own sets of documents, starting at the
<i class="term"><a href="doctoc_intro.html">doctoc introduction</a></i> and the <i class="term"><a href="doctools_intro.html">doctools introduction</a></i>,
respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a>, <a href="docidx_plugin_apiref.html">docidx_plugin_apiref</a>, <a href="doctoc_intro.html">doctoc_intro</a>, <a href="../doctools2idx/idx_container.html">doctools::idx</a>, <a href="doctools_intro.html">doctools_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/docidx_lang_cmdref.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>docidx_lang_cmdref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>docidx_lang_cmdref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'docidx_lang_cmdref.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- docidx_lang_cmdref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_cmdref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_cmdref - docidx language command reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docidx_lang_cmdref.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- docidx_lang_cmdref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_cmdref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_cmdref - docidx language command reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#comment">comment</a></b> <i class="arg">plaintext</i></a></li>
<li><a href="#2"><b class="cmd">include</b> <i class="arg">filename</i></a></li>
<li><a href="#3"><b class="cmd">index_begin</b> <i class="arg">text</i> <i class="arg">title</i></a></li>
<li><a href="#4"><b class="cmd">index_end</b></a></li>
<li><a href="#5"><b class="cmd">key</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd">lb</b></a></li>
<li><a href="#7"><b class="cmd"><a href="../../../../index.html#manpage">manpage</a></b> <i class="arg">file</i> <i class="arg">text</i></a></li>
<li><a href="#8"><b class="cmd">rb</b></a></li>
<li><a href="#9"><b class="cmd"><a href="../../../../index.html#url">url</a></b> <i class="arg">url</i> <i class="arg">label</i></a></li>
<li><a href="#10"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#11"><b class="cmd">vset</b> <i class="arg">varname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies both names and syntax of all the commands
which together are the docidx markup language, version 1.
As this document is intended to be a reference the commands are listed
in alphabetical order, and the descriptions are relatively short.
A beginner should read the much more informally written
<i class="term"><a href="docidx_lang_intro.html">docidx language introduction</a></i> first.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#comment">comment</a></b> <i class="arg">plaintext</i></a></dt>
<dd><p>Index markup. The argument text is marked up as a comment standing
outside of the actual text of the document. Main use is in free-form
text.</p></dd>
<dt><a name="2"><b class="cmd">include</b> <i class="arg">filename</i></a></dt>
<dd><p>Templating. The contents of the named file are interpreted as text
written in the docidx markup and processed in the place of the
include command. The markup in the file has to be self-contained. It







|





|

|















|







124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></li>
<li><a href="#2"><b class="cmd">include</b> <i class="arg">filename</i></a></li>
<li><a href="#3"><b class="cmd">index_begin</b> <i class="arg">text</i> <i class="arg">title</i></a></li>
<li><a href="#4"><b class="cmd">index_end</b></a></li>
<li><a href="#5"><b class="cmd">key</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd">lb</b></a></li>
<li><a href="#7"><b class="cmd"><a href="../../../../index.html#key17">manpage</a></b> <i class="arg">file</i> <i class="arg">text</i></a></li>
<li><a href="#8"><b class="cmd">rb</b></a></li>
<li><a href="#9"><b class="cmd"><a href="../../../../index.html#key246">url</a></b> <i class="arg">url</i> <i class="arg">label</i></a></li>
<li><a href="#10"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#11"><b class="cmd">vset</b> <i class="arg">varname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies both names and syntax of all the commands
which together are the docidx markup language, version 1.
As this document is intended to be a reference the commands are listed
in alphabetical order, and the descriptions are relatively short.
A beginner should read the much more informally written
<i class="term"><a href="docidx_lang_intro.html">docidx language introduction</a></i> first.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></dt>
<dd><p>Index markup. The argument text is marked up as a comment standing
outside of the actual text of the document. Main use is in free-form
text.</p></dd>
<dt><a name="2"><b class="cmd">include</b> <i class="arg">filename</i></a></dt>
<dd><p>Templating. The contents of the named file are interpreted as text
written in the docidx markup and processed in the place of the
include command. The markup in the file has to be self-contained. It
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<dd><p>Index structure. This command adds the keyword <i class="arg">text</i> to the
index.</p></dd>
<dt><a name="6"><b class="cmd">lb</b></a></dt>
<dd><p>Text. The command is replaced with a left bracket. Use in free-form
text. Required to avoid interpretation of a left bracket as the start
of a markup command. Its usage is restricted to the arguments of other
markup commands.</p></dd>
<dt><a name="7"><b class="cmd"><a href="../../../../index.html#manpage">manpage</a></b> <i class="arg">file</i> <i class="arg">text</i></a></dt>
<dd><p>Index structure. This command adds an element to the index which
refers to a document. The document is specified through the symbolic
name <i class="arg">file</i>. The <i class="arg">text</i> argument is used to label the
reference.</p>
<p>Symbolic names are used to preserve the convertibility of this format
to any output format. The actual name of the file will be inserted by
the chosen formatting engine when converting the input. This will be
based on a mapping from symbolic to actual names given to the engine.</p></dd>
<dt><a name="8"><b class="cmd">rb</b></a></dt>
<dd><p>Text. The command is replaced with a right bracket. Use in free-form
text. Required to avoid interpretation of a right bracket as the end
of a markup command. Its usage is restricted to the arguments of other
commands.</p></dd>
<dt><a name="9"><b class="cmd"><a href="../../../../index.html#url">url</a></b> <i class="arg">url</i> <i class="arg">label</i></a></dt>
<dd><p>Index structure. This is the second command to add an element to the
index. To refer to a document it is not using a symbolic name however,
but a (possibly format-specific) url describing the exact location of
the document indexed here.</p></dd>
<dt><a name="10"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Templating. In this form the command sets the named document variable
to the specified <i class="arg">value</i>. It does not generate output. I.e. the
command is replaced by the empty string.</p></dd>
<dt><a name="11"><b class="cmd">vset</b> <i class="arg">varname</i></a></dt>
<dd><p>Templating. In this form the command is replaced by the value of the
named document variable</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#docidx_commands">docidx commands</a>, <a href="../../../../index.html#docidx_language">docidx language</a>, <a href="../../../../index.html#docidx_markup">docidx markup</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|













|




















<
<
<
<
<
<





|








175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216






217
218
219
220
221
222
223
224
225
226
227
228
229
230
<dd><p>Index structure. This command adds the keyword <i class="arg">text</i> to the
index.</p></dd>
<dt><a name="6"><b class="cmd">lb</b></a></dt>
<dd><p>Text. The command is replaced with a left bracket. Use in free-form
text. Required to avoid interpretation of a left bracket as the start
of a markup command. Its usage is restricted to the arguments of other
markup commands.</p></dd>
<dt><a name="7"><b class="cmd"><a href="../../../../index.html#key17">manpage</a></b> <i class="arg">file</i> <i class="arg">text</i></a></dt>
<dd><p>Index structure. This command adds an element to the index which
refers to a document. The document is specified through the symbolic
name <i class="arg">file</i>. The <i class="arg">text</i> argument is used to label the
reference.</p>
<p>Symbolic names are used to preserve the convertibility of this format
to any output format. The actual name of the file will be inserted by
the chosen formatting engine when converting the input. This will be
based on a mapping from symbolic to actual names given to the engine.</p></dd>
<dt><a name="8"><b class="cmd">rb</b></a></dt>
<dd><p>Text. The command is replaced with a right bracket. Use in free-form
text. Required to avoid interpretation of a right bracket as the end
of a markup command. Its usage is restricted to the arguments of other
commands.</p></dd>
<dt><a name="9"><b class="cmd"><a href="../../../../index.html#key246">url</a></b> <i class="arg">url</i> <i class="arg">label</i></a></dt>
<dd><p>Index structure. This is the second command to add an element to the
index. To refer to a document it is not using a symbolic name however,
but a (possibly format-specific) url describing the exact location of
the document indexed here.</p></dd>
<dt><a name="10"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Templating. In this form the command sets the named document variable
to the specified <i class="arg">value</i>. It does not generate output. I.e. the
command is replaced by the empty string.</p></dd>
<dt><a name="11"><b class="cmd">vset</b> <i class="arg">varname</i></a></dt>
<dd><p>Templating. In this form the command is replaced by the value of the
named document variable</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key368">docidx commands</a>, <a href="../../../../index.html#key371">docidx language</a>, <a href="../../../../index.html#key249">docidx markup</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/docidx_lang_faq.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>docidx_lang_faq - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>docidx_lang_faq - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'docidx_lang_faq.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- docidx_lang_faq.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_faq(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_faq - docidx language faq</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docidx_lang_faq.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- docidx_lang_faq.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_faq(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_faq - docidx language faq</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#docidx_commands">docidx commands</a>, <a href="../../../../index.html#docidx_language">docidx language</a>, <a href="../../../../index.html#docidx_markup">docidx markup</a>, <a href="../../../../index.html#docidx_syntax">docidx syntax</a>, <a href="../../../../index.html#examples">examples</a>, <a href="../../../../index.html#faq">faq</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
185
186
187
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key368">docidx commands</a>, <a href="../../../../index.html#key371">docidx language</a>, <a href="../../../../index.html#key249">docidx markup</a>, <a href="../../../../index.html#key369">docidx syntax</a>, <a href="../../../../index.html#key370">examples</a>, <a href="../../../../index.html#key367">faq</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/docidx_lang_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>docidx_lang_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>docidx_lang_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'docidx_lang_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- docidx_lang_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_intro - docidx language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docidx_lang_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- docidx_lang_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_intro - docidx language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<b class="const">[</b> and <b class="const">]</b>. Inside of these delimiters the usual
rules for a Tcl command apply with regard to word quotation, nested
commands, continuation lines, etc. I.e.</p>
<pre class="doctools_example">
    ... [key {markup language}] ...
</pre>
<pre class="doctools_example">
  ... [manpage thefile \
          {file description}] ...
</pre>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basic structure</a></h3>
<p>The most simple document which can be written in docidx is</p>
<pre class="doctools_example">
    [index_begin GROUPTITLE TITLE]







|







147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<b class="const">[</b> and <b class="const">]</b>. Inside of these delimiters the usual
rules for a Tcl command apply with regard to word quotation, nested
commands, continuation lines, etc. I.e.</p>
<pre class="doctools_example">
    ... [key {markup language}] ...
</pre>
<pre class="doctools_example">
  ... [manpage thefile \\
          {file description}] ...
</pre>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basic structure</a></h3>
<p>The most simple document which can be written in docidx is</p>
<pre class="doctools_example">
    [index_begin GROUPTITLE TITLE]
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
[index_end]
</pre>
<p>In the above example the command <b class="cmd">key</b> is used to declare the
keyword phrases we wish to be part of the index.</p>
<p>However a truly useful index does not only list the keyword phrases,
but will also contain references to documents associated with the
keywords. Here is a made-up index for all the manpages in the module
<i class="term"><a href="../../../../index.html#base64">base64</a></i>:</p>
<pre class="doctools_example">
[index_begin tcllib/base64 {De- &amp; Encoding}]
[key base64]
[<b class="cmd">manpage base64</b>]
[key encoding]
[<b class="cmd">manpage base64</b>]
[<b class="cmd">manpage uuencode</b>]
[<b class="cmd">manpage yencode</b>]
[key uuencode]
[<b class="cmd">manpage uuencode</b>]
[key yEnc]
[<b class="cmd">manpage yencode</b>]
[key ydecode]
[<b class="cmd">manpage yencode</b>]
[key yencode]
[<b class="cmd">manpage yencode</b>]
[index_end]
</pre>
<p>In the above example the command <b class="cmd"><a href="../../../../index.html#manpage">manpage</a></b> is used to insert
references to documents, using symbolic file names, with each command
belonging to the last <b class="cmd">key</b> command coming before it.</p>
<p>The other command to insert references is <b class="cmd"><a href="../../../../index.html#url">url</a></b>. In contrast to
<b class="cmd"><a href="../../../../index.html#manpage">manpage</a></b> it uses explicit (possibly format-specific) urls to
describe the location of the referenced document. As such this command
is intended for the creation of references to external documents which
could not be handled in any other way.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Advanced structure</a></h3>
<p>In all previous examples we fudged a bit regarding the markup actually
allowed to be used before the <b class="cmd">index_begin</b> command opening the







|


















|


|
|







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
[index_end]
</pre>
<p>In the above example the command <b class="cmd">key</b> is used to declare the
keyword phrases we wish to be part of the index.</p>
<p>However a truly useful index does not only list the keyword phrases,
but will also contain references to documents associated with the
keywords. Here is a made-up index for all the manpages in the module
<i class="term"><a href="../../../../index.html#key587">base64</a></i>:</p>
<pre class="doctools_example">
[index_begin tcllib/base64 {De- &amp; Encoding}]
[key base64]
[<b class="cmd">manpage base64</b>]
[key encoding]
[<b class="cmd">manpage base64</b>]
[<b class="cmd">manpage uuencode</b>]
[<b class="cmd">manpage yencode</b>]
[key uuencode]
[<b class="cmd">manpage uuencode</b>]
[key yEnc]
[<b class="cmd">manpage yencode</b>]
[key ydecode]
[<b class="cmd">manpage yencode</b>]
[key yencode]
[<b class="cmd">manpage yencode</b>]
[index_end]
</pre>
<p>In the above example the command <b class="cmd"><a href="../../../../index.html#key17">manpage</a></b> is used to insert
references to documents, using symbolic file names, with each command
belonging to the last <b class="cmd">key</b> command coming before it.</p>
<p>The other command to insert references is <b class="cmd"><a href="../../../../index.html#key246">url</a></b>. In contrast to
<b class="cmd"><a href="../../../../index.html#key17">manpage</a></b> it uses explicit (possibly format-specific) urls to
describe the location of the referenced document. As such this command
is intended for the creation of references to external documents which
could not be handled in any other way.</p>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Advanced structure</a></h3>
<p>In all previous examples we fudged a bit regarding the markup actually
allowed to be used before the <b class="cmd">index_begin</b> command opening the
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#docidx_commands">docidx commands</a>, <a href="../../../../index.html#docidx_language">docidx language</a>, <a href="../../../../index.html#docidx_markup">docidx markup</a>, <a href="../../../../index.html#docidx_syntax">docidx syntax</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








277
278
279
280
281
282
283






284
285
286
287
288
289
290
291
292
293
294
295
296
297
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key368">docidx commands</a>, <a href="../../../../index.html#key371">docidx language</a>, <a href="../../../../index.html#key249">docidx markup</a>, <a href="../../../../index.html#key369">docidx syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/docidx_lang_syntax.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>docidx_lang_syntax - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>docidx_lang_syntax - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'docidx_lang_syntax.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- docidx_lang_syntax.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_syntax(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_syntax - docidx language syntax</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docidx_lang_syntax.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- docidx_lang_syntax.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_lang_syntax(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_lang_syntax - docidx language syntax</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<li><p>&lt;TEXT&gt; stands for all text except markup commands.</p></li>
<li><p>Any XXX stands for the markup command [xxx] including its
arguments. Each markup command is a Tcl command surrounded by a
matching pair of <b class="const">[</b> and <b class="const">]</b>. Inside of these
delimiters the usual rules for a Tcl command apply with regard to word
quotation, nested commands, continuation lines, etc.</p></li>
<li><p>&lt;WHITE&gt; stands for all text consisting only of spaces, newlines,
tabulators and the <b class="cmd"><a href="../../../../index.html#comment">comment</a></b> markup command.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Syntax</a></h2>
<p>The rules listed here specify only the syntax of docidx documents. The
lexical level of the language was covered in the previous section.</p>
<p>Regarding the syntax of the (E)BNF itself</p>
<ol class="doctools_enumerated">







|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<li><p>&lt;TEXT&gt; stands for all text except markup commands.</p></li>
<li><p>Any XXX stands for the markup command [xxx] including its
arguments. Each markup command is a Tcl command surrounded by a
matching pair of <b class="const">[</b> and <b class="const">]</b>. Inside of these
delimiters the usual rules for a Tcl command apply with regard to word
quotation, nested commands, continuation lines, etc.</p></li>
<li><p>&lt;WHITE&gt; stands for all text consisting only of spaces, newlines,
tabulators and the <b class="cmd"><a href="../../../../index.html#key155">comment</a></b> markup command.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Syntax</a></h2>
<p>The rules listed here specify only the syntax of docidx documents. The
lexical level of the language was covered in the previous section.</p>
<p>Regarding the syntax of the (E)BNF itself</p>
<ol class="doctools_enumerated">
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#docidx_commands">docidx commands</a>, <a href="../../../../index.html#docidx_language">docidx language</a>, <a href="../../../../index.html#docidx_markup">docidx markup</a>, <a href="../../../../index.html#docidx_syntax">docidx syntax</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








197
198
199
200
201
202
203






204
205
206
207
208
209
210
211
212
213
214
215
216
217
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key368">docidx commands</a>, <a href="../../../../index.html#key371">docidx language</a>, <a href="../../../../index.html#key249">docidx markup</a>, <a href="../../../../index.html#key369">docidx syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/docidx_plugin_apiref.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>docidx_plugin_apiref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>docidx_plugin_apiref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'docidx_plugin_apiref.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- docidx_plugin_apiref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_plugin_apiref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_plugin_apiref - docidx plugin API reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'docidx_plugin_apiref.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- docidx_plugin_apiref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">docidx_plugin_apiref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>docidx_plugin_apiref - docidx plugin API reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<li><a href="#20"><b class="cmd">idx_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is intended for <i class="term">plugin writers</i>, i.e. developers
wishing to write an index <i class="term"><a href="../../../../index.html#formatting_engine">formatting engine</a></i> for some output
format X.</p>
<p>It specifies the interaction between the <b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b>
package and its plugins, i.e. the interface any index formatting
engine has to comply with.</p>
<p>This document deals with version 1 of the interface.</p>
<p>A reader who is on the other hand more interested in the markup
language itself should start with the







|







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<li><a href="#20"><b class="cmd">idx_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is intended for <i class="term">plugin writers</i>, i.e. developers
wishing to write an index <i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> for some output
format X.</p>
<p>It specifies the interaction between the <b class="package"><a href="../doctools2idx/idx_container.html">doctools::idx</a></b>
package and its plugins, i.e. the interface any index formatting
engine has to comply with.</p>
<p>This document deals with version 1 of the interface.</p>
<p>A reader who is on the other hand more interested in the markup
language itself should start with the
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
runs.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Formatting commands</a></h3>
<p>The formatting commands have to implement the formatting for the
output format, for all the markup commands of the docidx markup
language, except <b class="cmd">lb</b>, <b class="cmd">rb</b>, <b class="cmd">vset</b>, <b class="cmd">include</b>, and
<b class="cmd"><a href="../../../../index.html#comment">comment</a></b>. These exceptions are processed by the frontend and are
never seen by the plugin. In return a command for the formatting of
plain text has to be provided, something which has no markup in the
input at all.</p>
<p>This means, that each of the five markup commands specified in the
<i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i> and outside of the set of
exceptions listed above has an equivalent formatting command which
takes the same arguments as the markup command and whose name is the







|







385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
runs.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Formatting commands</a></h3>
<p>The formatting commands have to implement the formatting for the
output format, for all the markup commands of the docidx markup
language, except <b class="cmd">lb</b>, <b class="cmd">rb</b>, <b class="cmd">vset</b>, <b class="cmd">include</b>, and
<b class="cmd"><a href="../../../../index.html#key155">comment</a></b>. These exceptions are processed by the frontend and are
never seen by the plugin. In return a command for the formatting of
plain text has to be provided, something which has no markup in the
input at all.</p>
<p>This means, that each of the five markup commands specified in the
<i class="term"><a href="docidx_lang_cmdref.html">docidx language command reference</a></i> and outside of the set of
exceptions listed above has an equivalent formatting command which
takes the same arguments as the markup command and whose name is the
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a>, <a href="../doctools2idx/idx_container.html">doctools::idx</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#formatting_engine">formatting engine</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#index_formatter">index formatter</a>, <a href="../../../../index.html#keywords">keywords</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








426
427
428
429
430
431
432






433
434
435
436
437
438
439
440
441
442
443
444
445
446
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="docidx_lang_cmdref.html">docidx_lang_cmdref</a>, <a href="docidx_lang_faq.html">docidx_lang_faq</a>, <a href="docidx_lang_intro.html">docidx_lang_intro</a>, <a href="docidx_lang_syntax.html">docidx_lang_syntax</a>, <a href="../doctools2idx/idx_container.html">doctools::idx</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key658">formatting engine</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key780">index formatter</a>, <a href="../../../../index.html#key779">keywords</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctoc.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctoc.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc(n) 1.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc - doctoc - Processing tables of contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctoc.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc(n) 1.1.4 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc - doctoc - Processing tables of contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools::toc <span class="opt">?1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::toc::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::toc::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools::toc <span class="opt">?1.1.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::toc::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::toc::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<li><a href="#14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">warnings</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of objects able to
process and convert text written in the <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i> markup language
into any output format X for which a <i class="term"><a href="../../../../index.html#formatting_engine">formatting engine</a></i> is
available.</p>
<p>A reader interested in the markup language itself should start with
the <i class="term"><a href="doctoc_lang_intro.html">doctoc language introduction</a></i> and proceed from there to
the formal specifications, i.e. the <i class="term"><a href="doctoc_lang_syntax.html">doctoc language syntax</a></i>
and the <i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i>.</p>
<p>If on the other hand the reader wishes to write her own formatting
engine for some format, i.e. is a <i class="term">plugin writer</i> then reading
and understanding the <i class="term"><a href="doctoc_plugin_apiref.html">doctoc plugin API reference</a></i> is an
absolute necessity, as that document specifies the interaction between
this package and its plugins, i.e. the formatting engines, in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command creates a new doctoc object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the object.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::toc::help</b></a></dt>







|
|
















|







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<li><a href="#14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">warnings</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of objects able to
process and convert text written in the <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> markup language
into any output format X for which a <i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> is
available.</p>
<p>A reader interested in the markup language itself should start with
the <i class="term"><a href="doctoc_lang_intro.html">doctoc language introduction</a></i> and proceed from there to
the formal specifications, i.e. the <i class="term"><a href="doctoc_lang_syntax.html">doctoc language syntax</a></i>
and the <i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i>.</p>
<p>If on the other hand the reader wishes to write her own formatting
engine for some format, i.e. is a <i class="term">plugin writer</i> then reading
and understanding the <i class="term"><a href="doctoc_plugin_apiref.html">doctoc plugin API reference</a></i> is an
absolute necessity, as that document specifies the interaction between
this package and its plugins, i.e. the formatting engines, in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::new</b> <i class="arg">objectName</i> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>This command creates a new doctoc object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the object.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::toc::help</b></a></dt>
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the <i class="arg">text</i> through the configured formatting
engine and returns the generated string as its result. An error will
be thrown if no <b class="option">-format</b> was configured for the object.</p>
<p>The method assumes that the <i class="arg">text</i> is in <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i> format as
specified in the companion document <i class="term">doctoc_fmt</i>. Errors will be
thrown otherwise.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></dt>
<dd><p>This methods add one entry to the per-object mapping from
<i class="arg">symbolic</i> filenames to the <i class="arg">actual</i> uris.
The object just stores this mapping and makes it available to the
configured formatting engine through the command <b class="cmd">dt_fmap</b>.







|







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the <i class="arg">text</i> through the configured formatting
engine and returns the generated string as its result. An error will
be thrown if no <b class="option">-format</b> was configured for the object.</p>
<p>The method assumes that the <i class="arg">text</i> is in <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> format as
specified in the companion document <i class="term">doctoc_fmt</i>. Errors will be
thrown otherwise.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></dt>
<dd><p>This methods add one entry to the per-object mapping from
<i class="arg">symbolic</i> filenames to the <i class="arg">actual</i> uris.
The object just stores this mapping and makes it available to the
configured formatting engine through the command <b class="cmd">dt_fmap</b>.
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
after the <b class="const">&lt;head&gt;</b> tag, starting the header section of the
generated HTML.</p>
<p>This can be used to insert boilerplate meta data markup into the
generated document, like references to a stylesheet, standard meta
keywords, etc.</p></dd>
</dl></dd>
<dt>latex</dt>
<dd><p>This engine generates output suitable for the <b class="syscmd"><a href="../../../../index.html#latex">latex</a></b> text
processor coming out of the TeX world.</p></dd>
<dt>list</dt>
<dd><p>This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.</p></dd>
<dt>markdown</dt>
<dd><p>This engine generates <i class="term"><a href="../../../../index.html#markdown">Markdown</a></i> markup.</p></dd>
<dt>nroff</dt>
<dd><p>This engine generates nroff output, for processing by <b class="syscmd"><a href="../../../../index.html#nroff">nroff</a></b>,
or <b class="syscmd">groff</b>. The result will be standard man pages as they are
known in the unix world.</p></dd>
<dt>null</dt>
<dd><p>This engine generates no outout at all. This can be used if one just
wants to validate some input.</p></dd>
<dt>tmml</dt>
<dd><p>This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.</p></dd>
<dt>wiki</dt>
<dd><p>This engine generates Wiki markup as understood by Jean Claude
Wippler's <b class="syscmd">wikit</b> application.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a>, <a href="doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#tmml">TMML</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#latex">latex</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markdown">markdown</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#nroff">nroff</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a>, <a href="../../../../index.html#wiki">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|





<
<

|




















<
<
<
<
<
<





|





|


368
369
370
371
372
373
374
375
376
377
378
379
380


381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402






403
404
405
406
407
408
409
410
411
412
413
414
415
416
after the <b class="const">&lt;head&gt;</b> tag, starting the header section of the
generated HTML.</p>
<p>This can be used to insert boilerplate meta data markup into the
generated document, like references to a stylesheet, standard meta
keywords, etc.</p></dd>
</dl></dd>
<dt>latex</dt>
<dd><p>This engine generates output suitable for the <b class="syscmd"><a href="../../../../index.html#key186">latex</a></b> text
processor coming out of the TeX world.</p></dd>
<dt>list</dt>
<dd><p>This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.</p></dd>


<dt>nroff</dt>
<dd><p>This engine generates nroff output, for processing by <b class="syscmd"><a href="../../../../index.html#key21">nroff</a></b>,
or <b class="syscmd">groff</b>. The result will be standard man pages as they are
known in the unix world.</p></dd>
<dt>null</dt>
<dd><p>This engine generates no outout at all. This can be used if one just
wants to validate some input.</p></dd>
<dt>tmml</dt>
<dd><p>This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.</p></dd>
<dt>wiki</dt>
<dd><p>This engine generates Wiki markup as understood by Jean Claude
Wippler's <b class="syscmd">wikit</b> application.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a>, <a href="doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctoc_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctoc_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctoc_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctoc_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctoc_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_intro - doctoc introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RELATED FORMATS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i> (short for <em>documentation tables of contents</em>)
stands for a set of related, yet different, entities which are working
together for the easy creation and transformation of tables of
contents for documentation. These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a table of
contents. Markup is represented by Tcl commands.</p></li>
<li><p>A package providing the ability to read and transform texts written in







|

|

|



|
|
|
|
|
|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctoc_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctoc_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_intro - doctoc introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RELATED FORMATS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key258">doctoc</a></i> (short for <em>documentation tables of contents</em>)
stands for a set of related, yet different, entities which are working
together for the easy creation and transformation of tables of
contents for documentation. These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a table of
contents. Markup is represented by Tcl commands.</p></li>
<li><p>A package providing the ability to read and transform texts written in
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of doctoc when handling directories of documentation,
automatically generating a proper table of contents for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose doctoc to the
user.
At the bottom level, common to both applications, however sits the
package <b class="package">doctoools::toc</b>, providing the basic facilities to
read and process files containing text in the doctoc format.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the <b class="package"><a href="doctoc.html">doctools::toc</a></b> package and its
plugins, as described in the <i class="term"><a href="doctoc_plugin_apiref.html">doctoc plugin API reference</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RELATED FORMATS</a></h2>
<p>doctoc does not stand alone, it has two companion formats. These are
called <i class="term"><a href="../../../../index.html#docidx">docidx</a></i> and <i class="term"><a href="../../../../index.html#doctools">doctools</a></i>, and they are for the markup
of <i class="term">keyword indices</i>, and general documentation, respectively.
They are described in their own sets of documents, starting at the
<i class="term"><a href="docidx_intro.html">docidx introduction</a></i> and the <i class="term"><a href="doctools_intro.html">doctools introduction</a></i>,
respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a>, <a href="doctoc_plugin_apiref.html">doctoc_plugin_apiref</a>, <a href="doctoc.html">doctools::toc</a>, <a href="doctools_intro.html">doctools_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|














|












<
<
<
<
<
<





|








150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184






185
186
187
188
189
190
191
192
193
194
195
196
197
198
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of doctoc when handling directories of documentation,
automatically generating a proper table of contents for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose doctoc to the
user.
At the bottom level, common to both applications, however sits the
package <b class="package">doctoools::toc</b>, providing the basic facilities to
read and process files containing text in the doctoc format.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the <b class="package"><a href="doctoc.html">doctools::toc</a></b> package and its
plugins, as described in the <i class="term"><a href="doctoc_plugin_apiref.html">doctoc plugin API reference</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RELATED FORMATS</a></h2>
<p>doctoc does not stand alone, it has two companion formats. These are
called <i class="term"><a href="../../../../index.html#key178">docidx</a></i> and <i class="term"><a href="../../../../index.html#key179">doctools</a></i>, and they are for the markup
of <i class="term">keyword indices</i>, and general documentation, respectively.
They are described in their own sets of documents, starting at the
<i class="term"><a href="docidx_intro.html">docidx introduction</a></i> and the <i class="term"><a href="doctools_intro.html">doctools introduction</a></i>,
respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a>, <a href="doctoc_plugin_apiref.html">doctoc_plugin_apiref</a>, <a href="doctoc.html">doctools::toc</a>, <a href="doctools_intro.html">doctools_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctoc_lang_cmdref.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctoc_lang_cmdref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctoc_lang_cmdref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctoc_lang_cmdref.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctoc_lang_cmdref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_cmdref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_cmdref - doctoc language command reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctoc_lang_cmdref.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctoc_lang_cmdref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_cmdref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_cmdref - doctoc language command reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#comment">comment</a></b> <i class="arg">plaintext</i></a></li>
<li><a href="#2"><b class="cmd">division_end</b></a></li>
<li><a href="#3"><b class="cmd">division_start</b> <i class="arg">text</i> <span class="opt">?<i class="arg">symfile</i>?</span></a></li>
<li><a href="#4"><b class="cmd">include</b> <i class="arg">filename</i></a></li>
<li><a href="#5"><b class="cmd">item</b> <i class="arg">file</i> <i class="arg">text</i> <i class="arg">desc</i></a></li>
<li><a href="#6"><b class="cmd">lb</b></a></li>
<li><a href="#7"><b class="cmd">rb</b></a></li>
<li><a href="#8"><b class="cmd">toc_begin</b> <i class="arg">text</i> <i class="arg">title</i></a></li>







|







124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></li>
<li><a href="#2"><b class="cmd">division_end</b></a></li>
<li><a href="#3"><b class="cmd">division_start</b> <i class="arg">text</i> <span class="opt">?<i class="arg">symfile</i>?</span></a></li>
<li><a href="#4"><b class="cmd">include</b> <i class="arg">filename</i></a></li>
<li><a href="#5"><b class="cmd">item</b> <i class="arg">file</i> <i class="arg">text</i> <i class="arg">desc</i></a></li>
<li><a href="#6"><b class="cmd">lb</b></a></li>
<li><a href="#7"><b class="cmd">rb</b></a></li>
<li><a href="#8"><b class="cmd">toc_begin</b> <i class="arg">text</i> <i class="arg">title</i></a></li>
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
As this document is intended to be a reference the commands are listed
in alphabetical order, and the descriptions are relatively short.
A beginner should read the much more informally written
<i class="term"><a href="doctoc_lang_intro.html">doctoc language introduction</a></i> first.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#comment">comment</a></b> <i class="arg">plaintext</i></a></dt>
<dd><p>Toc markup. The argument text is marked up as a comment standing
outside of the actual text of the document. Main use is in free-form
text.</p></dd>
<dt><a name="2"><b class="cmd">division_end</b></a></dt>
<dd><p>Toc structure. This command closes the division opened by the last
<b class="cmd">division_begin</b> command coming before it, and not yet closed.</p></dd>
<dt><a name="3"><b class="cmd">division_start</b> <i class="arg">text</i> <span class="opt">?<i class="arg">symfile</i>?</span></a></dt>







|







148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
As this document is intended to be a reference the commands are listed
in alphabetical order, and the descriptions are relatively short.
A beginner should read the much more informally written
<i class="term"><a href="doctoc_lang_intro.html">doctoc language introduction</a></i> first.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></dt>
<dd><p>Toc markup. The argument text is marked up as a comment standing
outside of the actual text of the document. Main use is in free-form
text.</p></dd>
<dt><a name="2"><b class="cmd">division_end</b></a></dt>
<dd><p>Toc structure. This command closes the division opened by the last
<b class="cmd">division_begin</b> command coming before it, and not yet closed.</p></dd>
<dt><a name="3"><b class="cmd">division_start</b> <i class="arg">text</i> <span class="opt">?<i class="arg">symfile</i>?</span></a></dt>
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctoc_commands">doctoc commands</a>, <a href="../../../../index.html#doctoc_language">doctoc language</a>, <a href="../../../../index.html#doctoc_markup">doctoc markup</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








215
216
217
218
219
220
221






222
223
224
225
226
227
228
229
230
231
232
233
234
235
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key512">doctoc commands</a>, <a href="../../../../index.html#key511">doctoc language</a>, <a href="../../../../index.html#key387">doctoc markup</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctoc_lang_faq.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctoc_lang_faq - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctoc_lang_faq - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctoc_lang_faq.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctoc_lang_faq.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_faq(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_faq - doctoc language faq</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctoc_lang_faq.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctoc_lang_faq.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_faq(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_faq - doctoc language faq</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctoc_commands">doctoc commands</a>, <a href="../../../../index.html#doctoc_language">doctoc language</a>, <a href="../../../../index.html#doctoc_markup">doctoc markup</a>, <a href="../../../../index.html#doctoc_syntax">doctoc syntax</a>, <a href="../../../../index.html#examples">examples</a>, <a href="../../../../index.html#faq">faq</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
185
186
187
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key512">doctoc commands</a>, <a href="../../../../index.html#key511">doctoc language</a>, <a href="../../../../index.html#key387">doctoc markup</a>, <a href="../../../../index.html#key546">doctoc syntax</a>, <a href="../../../../index.html#key370">examples</a>, <a href="../../../../index.html#key367">faq</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctoc_lang_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctoc_lang_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctoc_lang_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctoc_lang_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctoc_lang_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_intro - doctoc language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctoc_lang_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctoc_lang_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_intro - doctoc language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<b class="const">[</b> and <b class="const">]</b>. Inside of these delimiters the usual
rules for a Tcl command apply with regard to word quotation, nested
commands, continuation lines, etc. I.e.</p>
<pre class="doctools_example">
    ... [division_start {Appendix 1}] ...
</pre>
<pre class="doctools_example">
  ... [item thefile \
          label {file description}] ...
</pre>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basic structure</a></h3>
<p>The most simple document which can be written in doctoc is</p>
<pre class="doctools_example">
    [toc_begin GROUPTITLE TITLE]







|







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<b class="const">[</b> and <b class="const">]</b>. Inside of these delimiters the usual
rules for a Tcl command apply with regard to word quotation, nested
commands, continuation lines, etc. I.e.</p>
<pre class="doctools_example">
    ... [division_start {Appendix 1}] ...
</pre>
<pre class="doctools_example">
  ... [item thefile \\
          label {file description}] ...
</pre>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Basic structure</a></h3>
<p>The most simple document which can be written in doctoc is</p>
<pre class="doctools_example">
    [toc_begin GROUPTITLE TITLE]
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctoc_commands">doctoc commands</a>, <a href="../../../../index.html#doctoc_language">doctoc language</a>, <a href="../../../../index.html#doctoc_markup">doctoc markup</a>, <a href="../../../../index.html#doctoc_syntax">doctoc syntax</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








342
343
344
345
346
347
348






349
350
351
352
353
354
355
356
357
358
359
360
361
362
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key512">doctoc commands</a>, <a href="../../../../index.html#key511">doctoc language</a>, <a href="../../../../index.html#key387">doctoc markup</a>, <a href="../../../../index.html#key546">doctoc syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctoc_lang_syntax.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctoc_lang_syntax - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctoc_lang_syntax - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctoc_lang_syntax.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctoc_lang_syntax.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_syntax(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_syntax - doctoc language syntax</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctoc_lang_syntax.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctoc_lang_syntax.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_lang_syntax(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_lang_syntax - doctoc language syntax</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<li><p>&lt;TEXT&gt; stands for all text except markup commands.</p></li>
<li><p>Any XXX stands for the markup command [xxx] including its
arguments. Each markup command is a Tcl command surrounded by a
matching pair of <b class="const">[</b> and <b class="const">]</b>. Inside of these
delimiters the usual rules for a Tcl command apply with regard to word
quotation, nested commands, continuation lines, etc.</p></li>
<li><p>&lt;WHITE&gt; stands for all text consisting only of spaces, newlines,
tabulators and the <b class="cmd"><a href="../../../../index.html#comment">comment</a></b> markup command.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Syntax</a></h2>
<p>The rules listed here specify only the syntax of doctoc documents. The
lexical level of the language was covered in the previous section.</p>
<p>Regarding the syntax of the (E)BNF itself</p>
<ol class="doctools_enumerated">







|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<li><p>&lt;TEXT&gt; stands for all text except markup commands.</p></li>
<li><p>Any XXX stands for the markup command [xxx] including its
arguments. Each markup command is a Tcl command surrounded by a
matching pair of <b class="const">[</b> and <b class="const">]</b>. Inside of these
delimiters the usual rules for a Tcl command apply with regard to word
quotation, nested commands, continuation lines, etc.</p></li>
<li><p>&lt;WHITE&gt; stands for all text consisting only of spaces, newlines,
tabulators and the <b class="cmd"><a href="../../../../index.html#key155">comment</a></b> markup command.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Syntax</a></h2>
<p>The rules listed here specify only the syntax of doctoc documents. The
lexical level of the language was covered in the previous section.</p>
<p>Regarding the syntax of the (E)BNF itself</p>
<ol class="doctools_enumerated">
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctoc_commands">doctoc commands</a>, <a href="../../../../index.html#doctoc_language">doctoc language</a>, <a href="../../../../index.html#doctoc_markup">doctoc markup</a>, <a href="../../../../index.html#doctoc_syntax">doctoc syntax</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








186
187
188
189
190
191
192






193
194
195
196
197
198
199
200
201
202
203
204
205
206
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key512">doctoc commands</a>, <a href="../../../../index.html#key511">doctoc language</a>, <a href="../../../../index.html#key387">doctoc markup</a>, <a href="../../../../index.html#key546">doctoc syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctoc_plugin_apiref.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctoc_plugin_apiref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctoc_plugin_apiref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctoc_plugin_apiref.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctoc_plugin_apiref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_plugin_apiref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_plugin_apiref - doctoc plugin API reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctoc_plugin_apiref.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctoc_plugin_apiref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctoc_plugin_apiref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctoc_plugin_apiref - doctoc plugin API reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<li><a href="#20"><b class="cmd">toc_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is intended for <i class="term">plugin writers</i>, i.e. developers
wishing to write a toc <i class="term"><a href="../../../../index.html#formatting_engine">formatting engine</a></i> for some output
format X.</p>
<p>It specifies the interaction between the <b class="package"><a href="doctoc.html">doctools::toc</a></b>
package and its plugins, i.e. the interface any toc formatting engine
has to comply with.</p>
<p>This document deals with version 1 of the interface.</p>
<p>A reader who is on the other hand more interested in the markup
language itself should start with the







|







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<li><a href="#20"><b class="cmd">toc_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is intended for <i class="term">plugin writers</i>, i.e. developers
wishing to write a toc <i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> for some output
format X.</p>
<p>It specifies the interaction between the <b class="package"><a href="doctoc.html">doctools::toc</a></b>
package and its plugins, i.e. the interface any toc formatting engine
has to comply with.</p>
<p>This document deals with version 1 of the interface.</p>
<p>A reader who is on the other hand more interested in the markup
language itself should start with the
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
runs.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Formatting commands</a></h3>
<p>The formatting commands have to implement the formatting for the
output format, for all the markup commands of the doctoc markup
language, except <b class="cmd">lb</b>, <b class="cmd">rb</b>, <b class="cmd">vset</b>, <b class="cmd">include</b>, and
<b class="cmd"><a href="../../../../index.html#comment">comment</a></b>. These exceptions are processed by the frontend and are
never seen by the plugin. In return a command for the formatting of
plain text has to be provided, something which has no markup in the
input at all.</p>
<p>This means, that each of the five markup commands specified in the
<i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i> and outside of the set of
exceptions listed above has an equivalent formatting command which
takes the same arguments as the markup command and whose name is the







|







385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
runs.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Formatting commands</a></h3>
<p>The formatting commands have to implement the formatting for the
output format, for all the markup commands of the doctoc markup
language, except <b class="cmd">lb</b>, <b class="cmd">rb</b>, <b class="cmd">vset</b>, <b class="cmd">include</b>, and
<b class="cmd"><a href="../../../../index.html#key155">comment</a></b>. These exceptions are processed by the frontend and are
never seen by the plugin. In return a command for the formatting of
plain text has to be provided, something which has no markup in the
input at all.</p>
<p>This means, that each of the five markup commands specified in the
<i class="term"><a href="doctoc_lang_cmdref.html">doctoc language command reference</a></i> and outside of the set of
exceptions listed above has an equivalent formatting command which
takes the same arguments as the markup command and whose name is the
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a>, <a href="doctoc.html">doctools::toc</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#formatting_engine">formatting engine</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a>, <a href="../../../../index.html#toc_formatter">toc formatter</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








426
427
428
429
430
431
432






433
434
435
436
437
438
439
440
441
442
443
444
445
446
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctoc_lang_cmdref.html">doctoc_lang_cmdref</a>, <a href="doctoc_lang_faq.html">doctoc_lang_faq</a>, <a href="doctoc_lang_intro.html">doctoc_lang_intro</a>, <a href="doctoc_lang_syntax.html">doctoc_lang_syntax</a>, <a href="doctoc.html">doctools::toc</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key658">formatting engine</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key136">semantic markup</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a>, <a href="../../../../index.html#key720">toc formatter</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctools.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctools.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools(n) 1.5.6 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools - doctools - Processing documents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctools.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools(n) 1.4.19 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools - doctools - Processing documents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools <span class="opt">?1.5.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::new</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">doctools <span class="opt">?1.4.19?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::new</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::doctools::help</b></a></li>
<li><a href="#3"><b class="cmd">::doctools::search</b> <i class="arg">path</i></a></li>
<li><a href="#4"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">configure</b></a></li>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<li><a href="#14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">warnings</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of objects able to
process and convert text written in the <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> markup
language into any output format X for which a
<i class="term"><a href="../../../../index.html#formatting_engine">formatting engine</a></i> is available.</p>
<p>A reader interested in the markup language itself should start with
the <i class="term"><a href="doctools_lang_intro.html">doctools language introduction</a></i> and proceed from there to
the formal specifications, i.e. the <i class="term"><a href="doctools_lang_syntax.html">doctools language syntax</a></i>
and the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i>.</p>
<p>If on the other hand the reader wishes to write her own formatting
engine for some format, i.e. is a <i class="term">plugin writer</i> then reading
and understanding the <i class="term"><a href="doctools_plugin_apiref.html">doctools plugin API reference</a></i> is an
absolute necessity, as that document specifies the interaction between
this package and its plugins, i.e. the formatting engines, in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::new</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></dt>
<dd><p>This command creates a new doctools object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the object.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::help</b></a></dt>







|

|















|







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<li><a href="#14"><i class="arg">objectName</i> <b class="method">setparam</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">warnings</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for the creation of objects able to
process and convert text written in the <i class="term"><a href="../../../../index.html#key179">doctools</a></i> markup
language into any output format X for which a
<i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> is available.</p>
<p>A reader interested in the markup language itself should start with
the <i class="term"><a href="doctools_lang_intro.html">doctools language introduction</a></i> and proceed from there to
the formal specifications, i.e. the <i class="term"><a href="doctools_lang_syntax.html">doctools language syntax</a></i>
and the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i>.</p>
<p>If on the other hand the reader wishes to write her own formatting
engine for some format, i.e. is a <i class="term">plugin writer</i> then reading
and understanding the <i class="term"><a href="doctools_plugin_apiref.html">doctools plugin API reference</a></i> is an
absolute necessity, as that document specifies the interaction between
this package and its plugins, i.e. the formatting engines, in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::new</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></dt>
<dd><p>This command creates a new doctools object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the object.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::help</b></a></dt>
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the <i class="arg">text</i> through the configured formatting
engine and returns the generated string as its result. An error will
be thrown if no <b class="option">-format</b> was configured for the object.</p>
<p>The method assumes that the <i class="arg">text</i> is in <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> format as
specified in the companion document <i class="term">doctools_fmt</i>. Errors will
be thrown otherwise.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></dt>
<dd><p>This methods add one entry to the per-object mapping from
<i class="arg">symbolic</i> filenames to the <i class="arg">actual</i> uris.
The object just stores this mapping and makes it available to the
configured formatting engine through the command <b class="cmd">dt_fmap</b>.







|







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<span class="sectref"><a href="#subsection4">OBJECT CONFIGURATION</a></span>.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object it is invoked for.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">format</b> <i class="arg">text</i></a></dt>
<dd><p>This method runs the <i class="arg">text</i> through the configured formatting
engine and returns the generated string as its result. An error will
be thrown if no <b class="option">-format</b> was configured for the object.</p>
<p>The method assumes that the <i class="arg">text</i> is in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format as
specified in the companion document <i class="term">doctools_fmt</i>. Errors will
be thrown otherwise.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">map</b> <i class="arg">symbolic</i> <i class="arg">actual</i></a></dt>
<dd><p>This methods add one entry to the per-object mapping from
<i class="arg">symbolic</i> filenames to the <i class="arg">actual</i> uris.
The object just stores this mapping and makes it available to the
configured formatting engine through the command <b class="cmd">dt_fmap</b>.
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
base path for resolution of relative include paths. If this option is
not set (empty string) the value of <b class="option">-file</b> is used instead.</p>
<p>Note that <b class="option">-file</b> and <b class="option">-ibase</b>, while similar looking,
are actually very different. The value of <b class="option">-file</b> is used by
some engines for the generation of proper relative references between
output documents (HTML). As such this is a <i class="term">destination</i>
path. The <b class="option">-ibase</b> on the other hand is used to resolve
relative include paths, and as such deals with <i class="term"><a href="../../../../index.html#source">source</a></i> paths.</p>
<p>The default value of this option is the empty string.</p></dd>
<dt><b class="option">-module</b> <i class="arg">text</i></dt>
<dd><p>The argument of this option is stored in the object and made available
to the configured formatting engine through the command <b class="cmd">dt_module</b>.
This command is described in more detail in the companion document
<i class="term">doctools_api</i> which specifies the API between the object and
formatting engines.</p>







|







300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
base path for resolution of relative include paths. If this option is
not set (empty string) the value of <b class="option">-file</b> is used instead.</p>
<p>Note that <b class="option">-file</b> and <b class="option">-ibase</b>, while similar looking,
are actually very different. The value of <b class="option">-file</b> is used by
some engines for the generation of proper relative references between
output documents (HTML). As such this is a <i class="term">destination</i>
path. The <b class="option">-ibase</b> on the other hand is used to resolve
relative include paths, and as such deals with <i class="term"><a href="../../../../index.html#key436">source</a></i> paths.</p>
<p>The default value of this option is the empty string.</p></dd>
<dt><b class="option">-module</b> <i class="arg">text</i></dt>
<dd><p>The argument of this option is stored in the object and made available
to the configured formatting engine through the command <b class="cmd">dt_module</b>.
This command is described in more detail in the companion document
<i class="term">doctools_api</i> which specifies the API between the object and
formatting engines.</p>
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<p>The configured formatting engine should interpret the value as a
copyright assignment for the document which is currently processed, or
the package described by it.</p>
<p>This information must be used if and only if the engine is unable to
find any copyright assignments within the document itself. Such are
specified by the formatting command <b class="cmd">copyright</b>. This command is
described in more detail in the companion document <i class="term">doctools_fmt</i>
which specifies the <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> format itself.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">FORMAT MAPPING</a></h3>
<p>The package and object will perform the following algorithm when
trying to map a format name <i class="term">foo</i> to a file containing an
implementation of a formatting engine for <i class="term">foo</i>:</p>
<ol class="doctools_enumerated">







|







344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<p>The configured formatting engine should interpret the value as a
copyright assignment for the document which is currently processed, or
the package described by it.</p>
<p>This information must be used if and only if the engine is unable to
find any copyright assignments within the document itself. Such are
specified by the formatting command <b class="cmd">copyright</b>. This command is
described in more detail in the companion document <i class="term">doctools_fmt</i>
which specifies the <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format itself.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">FORMAT MAPPING</a></h3>
<p>The package and object will perform the following algorithm when
trying to map a format name <i class="term">foo</i> to a file containing an
implementation of a formatting engine for <i class="term">foo</i>:</p>
<ol class="doctools_enumerated">
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
generated document, like references to a stylesheet, standard meta
keywords, etc.</p></dd>
<dt>xref</dt>
<dd><p>The value for this parameter has to be a list of triples specifying
cross-reference information. This information is used by the engine to
create more hyperlinks. Each triple is a list containing a pattern,
symbolic filename and fragment reference, in this order. If a pattern
is specified multiple times the last occurrence of the pattern will be
used.</p>
<p>The engine will consult the xref database when encountering specific
commands and will create a link if the relevant text matches one of
the patterns. No link will be created if no match was found. The link
will go to the uri <b class="const">file#fragment</b> listed in the relevant
triple, after conversion of the symbolic file name to the actual uri
via <b class="cmd">dt_fmap</b> (see the <i class="term"><a href="doctools_plugin_apiref.html">doctools plugin API reference</a></i>).







|







415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
generated document, like references to a stylesheet, standard meta
keywords, etc.</p></dd>
<dt>xref</dt>
<dd><p>The value for this parameter has to be a list of triples specifying
cross-reference information. This information is used by the engine to
create more hyperlinks. Each triple is a list containing a pattern,
symbolic filename and fragment reference, in this order. If a pattern
is specified multiple times the last occurence of the pattern will be
used.</p>
<p>The engine will consult the xref database when encountering specific
commands and will create a link if the relevant text matches one of
the patterns. No link will be created if no match was found. The link
will go to the uri <b class="const">file#fragment</b> listed in the relevant
triple, after conversion of the symbolic file name to the actual uri
via <b class="cmd">dt_fmap</b> (see the <i class="term"><a href="doctools_plugin_apiref.html">doctools plugin API reference</a></i>).
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
<dd><p>The command will look for the patterns <b class="const">sa,</b><i class="arg">word</i>, and
<i class="arg">word</i>, in this order. If this fails if it will convert <i class="arg">word</i>
to all lowercase and try again.</p></dd>
<dt><b class="cmd"><a href="../term/term.html">term</a></b> <i class="arg">word</i></dt>
<dd><p>The command will look for the patterns <b class="const">kw,</b><i class="arg">word</i>,
<b class="const">sa,</b><i class="arg">word</i>, and <i class="arg">word</i>, in this order. If this fails if
it will convert <i class="arg">word</i> to all lowercase and try again.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#package">package</a></b> <i class="arg">word</i></dt>
<dd><p>The command will look for the patterns <b class="const">sa,</b><i class="arg">word</i>,
<b class="const">kw,</b><i class="arg">word</i>, and <i class="arg">word</i>, in this order. If this fails if
it will convert <i class="arg">word</i> to all lowercase and try again.</p></dd>
<dt><b class="cmd">see_also</b> <i class="arg">word</i>...</dt>
<dd><p>The command will look for the patterns <b class="const">sa,</b><i class="arg">word</i>, and
<i class="arg">word</i>, in this order, for each <i class="arg">word</i> given to the
command. If this fails if it will convert <i class="arg">word</i> to all lowercase
and try again.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#keywords">keywords</a></b> <i class="arg">word</i>...</dt>
<dd><p>The command will look for the patterns <b class="const">kw,</b><i class="arg">word</i>, and
<i class="arg">word</i>, in this order, for each <i class="arg">word</i> given to the
command. If this fails if it will convert <i class="arg">word</i> to all lowercase
and try again.</p></dd>
</dl></dd>
</dl></dd>
<dt>latex</dt>
<dd><p>This engine generates output suitable for the <b class="syscmd"><a href="../../../../index.html#latex">latex</a></b> text
processor coming out of the TeX world.</p></dd>
<dt>list</dt>
<dd><p>This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.</p></dd>
<dt>nroff</dt>
<dd><p>This engine generates nroff output, for processing by <b class="syscmd"><a href="../../../../index.html#nroff">nroff</a></b>,
or <b class="syscmd">groff</b>. The result will be standard man pages as they are
known in the unix world.</p></dd>
<dt>markdown</dt>
<dd><p>This engine generates <i class="term"><a href="../../../../index.html#markdown">Markdown</a></i> markup. This engine supports two
parameters:</p>
<dl class="doctools_definitions">
<dt>header</dt>
<dd><p>The value for this parameter has to be valid selfcontained markdown
markup for the body section of a markdown document. The default value
is the empty string. The value is inserted into the generated output
just before the table of contents.</p>
<p>This can be used to insert boilerplate header markup into the
generated document.</p></dd>
<dt>xref</dt>
<dd><p>The value for this parameter has to be a list of triples specifying
cross-reference information.</p>
<p>The full details of expected syntax and engine-internal use are
explained above for the <i class="term"><a href="../../../../index.html#html">html</a></i> engine.</p></dd>
</dl></dd>
<dt>null</dt>
<dd><p>This engine generates no outout at all. This can be used if one just
wants to validate some input.</p></dd>
<dt>tmml</dt>
<dd><p>This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.</p></dd>
<dt>wiki</dt>
<dd><p>This engine generates Wiki markup as understood by Jean Claude
Wippler's <b class="syscmd">wikit</b> application.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#tmml">TMML</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markdown">markdown</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#nroff">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|








|







|






|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















<
<
<
<
<
<





|





|


439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472

















473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490






491
492
493
494
495
496
497
498
499
500
501
502
503
504
<dd><p>The command will look for the patterns <b class="const">sa,</b><i class="arg">word</i>, and
<i class="arg">word</i>, in this order. If this fails if it will convert <i class="arg">word</i>
to all lowercase and try again.</p></dd>
<dt><b class="cmd"><a href="../term/term.html">term</a></b> <i class="arg">word</i></dt>
<dd><p>The command will look for the patterns <b class="const">kw,</b><i class="arg">word</i>,
<b class="const">sa,</b><i class="arg">word</i>, and <i class="arg">word</i>, in this order. If this fails if
it will convert <i class="arg">word</i> to all lowercase and try again.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key48">package</a></b> <i class="arg">word</i></dt>
<dd><p>The command will look for the patterns <b class="const">sa,</b><i class="arg">word</i>,
<b class="const">kw,</b><i class="arg">word</i>, and <i class="arg">word</i>, in this order. If this fails if
it will convert <i class="arg">word</i> to all lowercase and try again.</p></dd>
<dt><b class="cmd">see_also</b> <i class="arg">word</i>...</dt>
<dd><p>The command will look for the patterns <b class="const">sa,</b><i class="arg">word</i>, and
<i class="arg">word</i>, in this order, for each <i class="arg">word</i> given to the
command. If this fails if it will convert <i class="arg">word</i> to all lowercase
and try again.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key779">keywords</a></b> <i class="arg">word</i>...</dt>
<dd><p>The command will look for the patterns <b class="const">kw,</b><i class="arg">word</i>, and
<i class="arg">word</i>, in this order, for each <i class="arg">word</i> given to the
command. If this fails if it will convert <i class="arg">word</i> to all lowercase
and try again.</p></dd>
</dl></dd>
</dl></dd>
<dt>latex</dt>
<dd><p>This engine generates output suitable for the <b class="syscmd"><a href="../../../../index.html#key186">latex</a></b> text
processor coming out of the TeX world.</p></dd>
<dt>list</dt>
<dd><p>This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.</p></dd>
<dt>nroff</dt>
<dd><p>This engine generates nroff output, for processing by <b class="syscmd"><a href="../../../../index.html#key21">nroff</a></b>,
or <b class="syscmd">groff</b>. The result will be standard man pages as they are
known in the unix world.</p></dd>

















<dt>null</dt>
<dd><p>This engine generates no outout at all. This can be used if one just
wants to validate some input.</p></dd>
<dt>tmml</dt>
<dd><p>This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.</p></dd>
<dt>wiki</dt>
<dd><p>This engine generates Wiki markup as understood by Jean Claude
Wippler's <b class="syscmd">wikit</b> application.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctools_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctools_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_intro - doctools introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RELATED FORMATS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#doctools">doctools</a></i> (short for <em>documentation tools</em>) stands for
a set of related, yet different, entities which are working together
for the easy creation and transformation of documentation. These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of text. Markup is
represented by Tcl commands interspersed with the actual text.</p></li>
<li><p>A package providing the ability to read and transform texts written in
that markup language. It is important to note that the actual







|

|

|



|
|
|
|
|
|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctools_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_intro - doctools introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RELATED FORMATS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key179">doctools</a></i> (short for <em>documentation tools</em>) stands for
a set of related, yet different, entities which are working together
for the easy creation and transformation of documentation. These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of text. Markup is
represented by Tcl commands interspersed with the actual text.</p></li>
<li><p>A package providing the ability to read and transform texts written in
that markup language. It is important to note that the actual
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
become understandable. A writer experienced with doctools may only
need the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i> from time to
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application can be
used to validate it, and after completion it also performs the
conversion into the chosen system of visual markup, be it *roff, HTML,
plain text, wiki, etc.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#doctools">doctools</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application
provided by Tcllib. A more powerful one (in terms of options and
ability to configure it) is the <b class="syscmd">dtp</b> application, provided by
Tclapps.
At the bottom level, common to both applications, however sits the
package <b class="package"><a href="doctools.html">doctools</a></b>, providing the basic facilities to read and
process files containing text in the doctools format.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the <b class="package"><a href="doctools.html">doctools</a></b> package and its plugins, as
described in the <i class="term"><a href="doctools_plugin_apiref.html">doctools plugin API reference</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RELATED FORMATS</a></h2>
<p>doctools does not stand alone, it has two companion formats. These are
called <i class="term"><a href="../../../../index.html#docidx">docidx</a></i> and <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i>, and they are for the markup of
<i class="term">keyword indices</i>, and <i class="term">tables of contents</i>,
respectively.
They are described in their own sets of documents, starting at the
<i class="term"><a href="docidx_intro.html">docidx introduction</a></i> and the <i class="term"><a href="doctoc_intro.html">doctoc introduction</a></i>,
respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctools.html">doctools</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|















|













<
<
<
<
<
<





|








147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183






184
185
186
187
188
189
190
191
192
193
194
195
196
197
become understandable. A writer experienced with doctools may only
need the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i> from time to
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application can be
used to validate it, and after completion it also performs the
conversion into the chosen system of visual markup, be it *roff, HTML,
plain text, wiki, etc.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#key179">doctools</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application
provided by Tcllib. A more powerful one (in terms of options and
ability to configure it) is the <b class="syscmd">dtp</b> application, provided by
Tclapps.
At the bottom level, common to both applications, however sits the
package <b class="package"><a href="doctools.html">doctools</a></b>, providing the basic facilities to read and
process files containing text in the doctools format.</p></li>
<li><p>At last, but not least, <i class="term">plugin writers</i> have to understand the
interaction between the <b class="package"><a href="doctools.html">doctools</a></b> package and its plugins, as
described in the <i class="term"><a href="doctools_plugin_apiref.html">doctools plugin API reference</a></i>.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RELATED FORMATS</a></h2>
<p>doctools does not stand alone, it has two companion formats. These are
called <i class="term"><a href="../../../../index.html#key178">docidx</a></i> and <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>, and they are for the markup of
<i class="term">keyword indices</i>, and <i class="term">tables of contents</i>,
respectively.
They are described in their own sets of documents, starting at the
<i class="term"><a href="docidx_intro.html">docidx introduction</a></i> and the <i class="term"><a href="doctoc_intro.html">doctoc introduction</a></i>,
respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="docidx_intro.html">docidx_intro</a>, <a href="doctoc_intro.html">doctoc_intro</a>, <a href="doctools.html">doctools</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctools_lang_cmdref.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools_lang_cmdref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools_lang_cmdref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctools_lang_cmdref.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2010 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools_lang_cmdref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_cmdref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_cmdref - doctools language command reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctools_lang_cmdref.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools_lang_cmdref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_cmdref(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_cmdref - doctools language command reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">arg</b> <i class="arg">text</i></a></li>
<li><a href="#2"><b class="cmd">arg_def</b> <i class="arg">type</i> <i class="arg">name</i> <span class="opt">?<i class="arg">mode</i>?</span></a></li>
<li><a href="#3"><b class="cmd">bullet</b></a></li>
<li><a href="#4"><b class="cmd">call</b> <i class="arg">args</i></a></li>
<li><a href="#5"><b class="cmd">category</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd"><a href="../../../../index.html#class">class</a></b> <i class="arg">text</i></a></li>
<li><a href="#7"><b class="cmd">cmd</b> <i class="arg">text</i></a></li>
<li><a href="#8"><b class="cmd">cmd_def</b> <i class="arg">command</i></a></li>
<li><a href="#9"><b class="cmd"><a href="../../../../index.html#comment">comment</a></b> <i class="arg">plaintext</i></a></li>
<li><a href="#10"><b class="cmd">const</b> <i class="arg">text</i></a></li>
<li><a href="#11"><b class="cmd">copyright</b> <i class="arg">text</i></a></li>
<li><a href="#12"><b class="cmd">def</b> <i class="arg">text</i></a></li>
<li><a href="#13"><b class="cmd">description</b></a></li>
<li><a href="#14"><b class="cmd">enum</b></a></li>
<li><a href="#15"><b class="cmd">emph</b> <i class="arg">text</i></a></li>
<li><a href="#16"><b class="cmd">example</b> <i class="arg">text</i></a></li>
<li><a href="#17"><b class="cmd">example_begin</b></a></li>
<li><a href="#18"><b class="cmd">example_end</b></a></li>
<li><a href="#19"><b class="cmd"><a href="../../../../index.html#file">file</a></b> <i class="arg">text</i></a></li>
<li><a href="#20"><b class="cmd">fun</b> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd"><a href="../../../../index.html#image">image</a></b> <i class="arg">name</i> <span class="opt">?<i class="arg">label</i>?</span></a></li>
<li><a href="#22"><b class="cmd">include</b> <i class="arg">filename</i></a></li>
<li><a href="#23"><b class="cmd">item</b></a></li>
<li><a href="#24"><b class="cmd"><a href="../../../../index.html#keywords">keywords</a></b> <i class="arg">args</i></a></li>
<li><a href="#25"><b class="cmd">lb</b></a></li>
<li><a href="#26"><b class="cmd">list_begin</b> <i class="arg">what</i></a></li>
<li><a href="#27"><b class="cmd">list_end</b></a></li>
<li><a href="#28"><b class="cmd">lst_item</b> <i class="arg">text</i></a></li>
<li><a href="#29"><b class="cmd">manpage_begin</b> <i class="arg">command</i> <i class="arg">section</i> <i class="arg">version</i></a></li>
<li><a href="#30"><b class="cmd">manpage_end</b></a></li>
<li><a href="#31"><b class="cmd"><a href="../../../../index.html#method">method</a></b> <i class="arg">text</i></a></li>
<li><a href="#32"><b class="cmd">moddesc</b> <i class="arg">text</i></a></li>
<li><a href="#33"><b class="cmd">namespace</b> <i class="arg">text</i></a></li>
<li><a href="#34"><b class="cmd">nl</b></a></li>
<li><a href="#35"><b class="cmd">opt</b> <i class="arg">text</i></a></li>
<li><a href="#36"><b class="cmd">opt_def</b> <i class="arg">name</i> <span class="opt">?<i class="arg">arg</i>?</span></a></li>
<li><a href="#37"><b class="cmd">option</b> <i class="arg">text</i></a></li>
<li><a href="#38"><b class="cmd"><a href="../../../../index.html#package">package</a></b> <i class="arg">text</i></a></li>
<li><a href="#39"><b class="cmd">para</b></a></li>
<li><a href="#40"><b class="cmd">rb</b></a></li>
<li><a href="#41"><b class="cmd">require</b> <i class="arg">package</i> <span class="opt">?<i class="arg">version</i>?</span></a></li>
<li><a href="#42"><b class="cmd">section</b> <i class="arg">name</i></a></li>
<li><a href="#43"><b class="cmd">sectref</b> <i class="arg">id</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#44"><b class="cmd">sectref-external</b> <i class="arg">text</i></a></li>
<li><a href="#45"><b class="cmd">see_also</b> <i class="arg">args</i></a></li>
<li><a href="#46"><b class="cmd">strong</b> <i class="arg">text</i></a></li>
<li><a href="#47"><b class="cmd">subsection</b> <i class="arg">name</i></a></li>
<li><a href="#48"><b class="cmd">syscmd</b> <i class="arg">text</i></a></li>
<li><a href="#49"><b class="cmd"><a href="../term/term.html">term</a></b> <i class="arg">text</i></a></li>
<li><a href="#50"><b class="cmd">titledesc</b> <i class="arg">desc</i></a></li>
<li><a href="#51"><b class="cmd">tkoption_def</b> <i class="arg">name</i> <i class="arg">dbname</i> <i class="arg">dbclass</i></a></li>
<li><a href="#52"><b class="cmd"><a href="../../../../index.html#type">type</a></b> <i class="arg">text</i></a></li>
<li><a href="#53"><b class="cmd"><a href="../uri/uri.html">uri</a></b> <i class="arg">text</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#54"><b class="cmd">usage</b> <i class="arg">args</i></a></li>
<li><a href="#55"><b class="cmd">var</b> <i class="arg">text</i></a></li>
<li><a href="#56"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#57"><b class="cmd">vset</b> <i class="arg">varname</i></a></li>
<li><a href="#58"><b class="cmd"><a href="../../../../index.html#widget">widget</a></b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies both names and syntax of all the commands
which together are the doctools markup language, version 1.
As this document is intended to be a reference the commands are listed







|


|









|

|


|






|






|













|





|







129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">arg</b> <i class="arg">text</i></a></li>
<li><a href="#2"><b class="cmd">arg_def</b> <i class="arg">type</i> <i class="arg">name</i> <span class="opt">?<i class="arg">mode</i>?</span></a></li>
<li><a href="#3"><b class="cmd">bullet</b></a></li>
<li><a href="#4"><b class="cmd">call</b> <i class="arg">args</i></a></li>
<li><a href="#5"><b class="cmd">category</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd"><a href="../../../../index.html#key240">class</a></b> <i class="arg">text</i></a></li>
<li><a href="#7"><b class="cmd">cmd</b> <i class="arg">text</i></a></li>
<li><a href="#8"><b class="cmd">cmd_def</b> <i class="arg">command</i></a></li>
<li><a href="#9"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></li>
<li><a href="#10"><b class="cmd">const</b> <i class="arg">text</i></a></li>
<li><a href="#11"><b class="cmd">copyright</b> <i class="arg">text</i></a></li>
<li><a href="#12"><b class="cmd">def</b> <i class="arg">text</i></a></li>
<li><a href="#13"><b class="cmd">description</b></a></li>
<li><a href="#14"><b class="cmd">enum</b></a></li>
<li><a href="#15"><b class="cmd">emph</b> <i class="arg">text</i></a></li>
<li><a href="#16"><b class="cmd">example</b> <i class="arg">text</i></a></li>
<li><a href="#17"><b class="cmd">example_begin</b></a></li>
<li><a href="#18"><b class="cmd">example_end</b></a></li>
<li><a href="#19"><b class="cmd"><a href="../../../../index.html#key31">file</a></b> <i class="arg">text</i></a></li>
<li><a href="#20"><b class="cmd">fun</b> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd"><a href="../../../../index.html#key121">image</a></b> <i class="arg">name</i> <span class="opt">?<i class="arg">label</i>?</span></a></li>
<li><a href="#22"><b class="cmd">include</b> <i class="arg">filename</i></a></li>
<li><a href="#23"><b class="cmd">item</b></a></li>
<li><a href="#24"><b class="cmd"><a href="../../../../index.html#key779">keywords</a></b> <i class="arg">args</i></a></li>
<li><a href="#25"><b class="cmd">lb</b></a></li>
<li><a href="#26"><b class="cmd">list_begin</b> <i class="arg">what</i></a></li>
<li><a href="#27"><b class="cmd">list_end</b></a></li>
<li><a href="#28"><b class="cmd">lst_item</b> <i class="arg">text</i></a></li>
<li><a href="#29"><b class="cmd">manpage_begin</b> <i class="arg">command</i> <i class="arg">section</i> <i class="arg">version</i></a></li>
<li><a href="#30"><b class="cmd">manpage_end</b></a></li>
<li><a href="#31"><b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">text</i></a></li>
<li><a href="#32"><b class="cmd">moddesc</b> <i class="arg">text</i></a></li>
<li><a href="#33"><b class="cmd">namespace</b> <i class="arg">text</i></a></li>
<li><a href="#34"><b class="cmd">nl</b></a></li>
<li><a href="#35"><b class="cmd">opt</b> <i class="arg">text</i></a></li>
<li><a href="#36"><b class="cmd">opt_def</b> <i class="arg">name</i> <span class="opt">?<i class="arg">arg</i>?</span></a></li>
<li><a href="#37"><b class="cmd">option</b> <i class="arg">text</i></a></li>
<li><a href="#38"><b class="cmd"><a href="../../../../index.html#key48">package</a></b> <i class="arg">text</i></a></li>
<li><a href="#39"><b class="cmd">para</b></a></li>
<li><a href="#40"><b class="cmd">rb</b></a></li>
<li><a href="#41"><b class="cmd">require</b> <i class="arg">package</i> <span class="opt">?<i class="arg">version</i>?</span></a></li>
<li><a href="#42"><b class="cmd">section</b> <i class="arg">name</i></a></li>
<li><a href="#43"><b class="cmd">sectref</b> <i class="arg">id</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#44"><b class="cmd">sectref-external</b> <i class="arg">text</i></a></li>
<li><a href="#45"><b class="cmd">see_also</b> <i class="arg">args</i></a></li>
<li><a href="#46"><b class="cmd">strong</b> <i class="arg">text</i></a></li>
<li><a href="#47"><b class="cmd">subsection</b> <i class="arg">name</i></a></li>
<li><a href="#48"><b class="cmd">syscmd</b> <i class="arg">text</i></a></li>
<li><a href="#49"><b class="cmd"><a href="../term/term.html">term</a></b> <i class="arg">text</i></a></li>
<li><a href="#50"><b class="cmd">titledesc</b> <i class="arg">desc</i></a></li>
<li><a href="#51"><b class="cmd">tkoption_def</b> <i class="arg">name</i> <i class="arg">dbname</i> <i class="arg">dbclass</i></a></li>
<li><a href="#52"><b class="cmd"><a href="../../../../index.html#key117">type</a></b> <i class="arg">text</i></a></li>
<li><a href="#53"><b class="cmd"><a href="../uri/uri.html">uri</a></b> <i class="arg">text</i> <span class="opt">?<i class="arg">text</i>?</span></a></li>
<li><a href="#54"><b class="cmd">usage</b> <i class="arg">args</i></a></li>
<li><a href="#55"><b class="cmd">var</b> <i class="arg">text</i></a></li>
<li><a href="#56"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></li>
<li><a href="#57"><b class="cmd">vset</b> <i class="arg">varname</i></a></li>
<li><a href="#58"><b class="cmd"><a href="../../../../index.html#key235">widget</a></b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies both names and syntax of all the commands
which together are the doctools markup language, version 1.
As this document is intended to be a reference the commands are listed
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<dd><p>Text structure. List element. Definition list. Automatically closes
the previous list element. Defines the term as a command and its
arguments.
The first argument is the name of the command described by the
following free-form text, and all arguments coming after that are
descriptions of the command's arguments.
It is expected that the arguments are marked up with <b class="cmd">arg</b>,
<b class="cmd"><a href="../../../../index.html#method">method</a></b>, <b class="cmd">option</b> etc., as is appropriate, and that the
command itself is marked up with <b class="cmd">cmd</b>.
It is expected that the formatted term is not only printed in place,
but also in the table of contents of the document, or synopsis,
depending on the output format.</p></dd>
<dt><a name="5"><b class="cmd">category</b> <i class="arg">text</i></a></dt>
<dd><p>Document information. Anywhere. This command registers its plain text
arguments as the category this document belongs to. If this command is
used multiple times the last value specified is used.</p></dd>
<dt><a name="6"><b class="cmd"><a href="../../../../index.html#class">class</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term"><a href="../../../../index.html#class">class</a></i>. The text may have other markup already applied to
it. Main use is the highlighting of class names in free-form text.</p></dd>
<dt><a name="7"><b class="cmd">cmd</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as the name of a
<i class="term">Tcl command</i>. The text may have other markup already applied
to it. Main uses are the highlighting of commands in free-form text,
and for the command parameters of the markup commands <b class="cmd">call</b> and
<b class="cmd">usage</b>.</p></dd>
<dt><a name="8"><b class="cmd">cmd_def</b> <i class="arg">command</i></a></dt>
<dd><p>Text structure. List element. Command list. Automatically closes the
previous list element. The argument specifies the name of the
<i class="term">Tcl command</i> to be described by the list element. Expected to
be marked up in the output as if it had been formatted with <b class="cmd">cmd</b>.</p></dd>
<dt><a name="9"><b class="cmd"><a href="../../../../index.html#comment">comment</a></b> <i class="arg">plaintext</i></a></dt>
<dd><p>Text markup. The argument text is marked up as a comment standing
outside of the actual text of the document. Main use is in free-form
text.</p></dd>
<dt><a name="10"><b class="cmd">const</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as a <i class="term">constant</i> value. The
text may have other markup already applied to it. Main use is the
highlighting of constants in free-form text.</p></dd>







|








|

|












|







217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<dd><p>Text structure. List element. Definition list. Automatically closes
the previous list element. Defines the term as a command and its
arguments.
The first argument is the name of the command described by the
following free-form text, and all arguments coming after that are
descriptions of the command's arguments.
It is expected that the arguments are marked up with <b class="cmd">arg</b>,
<b class="cmd"><a href="../../../../index.html#key372">method</a></b>, <b class="cmd">option</b> etc., as is appropriate, and that the
command itself is marked up with <b class="cmd">cmd</b>.
It is expected that the formatted term is not only printed in place,
but also in the table of contents of the document, or synopsis,
depending on the output format.</p></dd>
<dt><a name="5"><b class="cmd">category</b> <i class="arg">text</i></a></dt>
<dd><p>Document information. Anywhere. This command registers its plain text
arguments as the category this document belongs to. If this command is
used multiple times the last value specified is used.</p></dd>
<dt><a name="6"><b class="cmd"><a href="../../../../index.html#key240">class</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term"><a href="../../../../index.html#key240">class</a></i>. The text may have other markup already applied to
it. Main use is the highlighting of class names in free-form text.</p></dd>
<dt><a name="7"><b class="cmd">cmd</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as the name of a
<i class="term">Tcl command</i>. The text may have other markup already applied
to it. Main uses are the highlighting of commands in free-form text,
and for the command parameters of the markup commands <b class="cmd">call</b> and
<b class="cmd">usage</b>.</p></dd>
<dt><a name="8"><b class="cmd">cmd_def</b> <i class="arg">command</i></a></dt>
<dd><p>Text structure. List element. Command list. Automatically closes the
previous list element. The argument specifies the name of the
<i class="term">Tcl command</i> to be described by the list element. Expected to
be marked up in the output as if it had been formatted with <b class="cmd">cmd</b>.</p></dd>
<dt><a name="9"><b class="cmd"><a href="../../../../index.html#key155">comment</a></b> <i class="arg">plaintext</i></a></dt>
<dd><p>Text markup. The argument text is marked up as a comment standing
outside of the actual text of the document. Main use is in free-form
text.</p></dd>
<dt><a name="10"><b class="cmd">const</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as a <i class="term">constant</i> value. The
text may have other markup already applied to it. Main use is the
highlighting of constants in free-form text.</p></dd>
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<dt><a name="17"><b class="cmd">example_begin</b></a></dt>
<dd><p>Text structure. This commands starts an example. All text until the
next <b class="cmd">example_end</b> belongs to the example. Line breaks, spaces,
and tabs have to be preserved literally. Examples cannot be nested.</p></dd>
<dt><a name="18"><b class="cmd">example_end</b></a></dt>
<dd><p>Text structure. This command closes the example started by the last
<b class="cmd">example_begin</b>.</p></dd>
<dt><a name="19"><b class="cmd"><a href="../../../../index.html#file">file</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as a <i class="term"><a href="../../../../index.html#file">file</a></i> or
<i class="term">directory</i>, i.e. in general a <i class="term">path</i>. The text may have
other markup already applied to it. Main use is the highlighting of
paths in free-form text.</p></dd>
<dt><a name="20"><b class="cmd">fun</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term">function</i>. The text may have other markup already applied to
it. Main use is the highlighting of function names in free-form text.</p></dd>
<dt><a name="21"><b class="cmd"><a href="../../../../index.html#image">image</a></b> <i class="arg">name</i> <span class="opt">?<i class="arg">label</i>?</span></a></dt>
<dd><p>Text markup. The argument is the symbolic name of an <i class="term"><a href="../../../../index.html#image">image</a></i>
and replaced with the image itself, if a suitable variant is found
by the backend. The second argument, should it be present, will be
interpreted the human-readable description of the image, and put
into the output in a suitable position, if such is supported by the
format. The HTML format, for example, can place it into the <i class="term">alt</i>
attribute of image references.</p></dd>
<dt><a name="22"><b class="cmd">include</b> <i class="arg">filename</i></a></dt>
<dd><p>Templating. The contents of the named file are interpreted as text
written in the doctools markup and processed in the place of the
include command. The markup in the file has to be self-contained. It
is not possible for a markup command to cross the file boundaries.</p></dd>
<dt><a name="23"><b class="cmd">item</b></a></dt>
<dd><p>Text structure. List element. Itemized list. Automatically closes the
previous list element.</p></dd>
<dt><a name="24"><b class="cmd"><a href="../../../../index.html#keywords">keywords</a></b> <i class="arg">args</i></a></dt>
<dd><p>Document information. Anywhere. This command registers all its plain text
arguments as keywords applying to this document. Each argument is a single
keyword. If this command is used multiple times all the arguments accumulate.</p></dd>
<dt><a name="25"><b class="cmd">lb</b></a></dt>
<dd><p>Text. The command is replaced with a left bracket. Use in free-form text.
Required to avoid interpretation of a left bracket as the start of a markup
command.</p></dd>







|
|







|
|














|







281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<dt><a name="17"><b class="cmd">example_begin</b></a></dt>
<dd><p>Text structure. This commands starts an example. All text until the
next <b class="cmd">example_end</b> belongs to the example. Line breaks, spaces,
and tabs have to be preserved literally. Examples cannot be nested.</p></dd>
<dt><a name="18"><b class="cmd">example_end</b></a></dt>
<dd><p>Text structure. This command closes the example started by the last
<b class="cmd">example_begin</b>.</p></dd>
<dt><a name="19"><b class="cmd"><a href="../../../../index.html#key31">file</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as a <i class="term"><a href="../../../../index.html#key31">file</a></i> or
<i class="term">directory</i>, i.e. in general a <i class="term">path</i>. The text may have
other markup already applied to it. Main use is the highlighting of
paths in free-form text.</p></dd>
<dt><a name="20"><b class="cmd">fun</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term">function</i>. The text may have other markup already applied to
it. Main use is the highlighting of function names in free-form text.</p></dd>
<dt><a name="21"><b class="cmd"><a href="../../../../index.html#key121">image</a></b> <i class="arg">name</i> <span class="opt">?<i class="arg">label</i>?</span></a></dt>
<dd><p>Text markup. The argument is the symbolic name of an <i class="term"><a href="../../../../index.html#key121">image</a></i>
and replaced with the image itself, if a suitable variant is found
by the backend. The second argument, should it be present, will be
interpreted the human-readable description of the image, and put
into the output in a suitable position, if such is supported by the
format. The HTML format, for example, can place it into the <i class="term">alt</i>
attribute of image references.</p></dd>
<dt><a name="22"><b class="cmd">include</b> <i class="arg">filename</i></a></dt>
<dd><p>Templating. The contents of the named file are interpreted as text
written in the doctools markup and processed in the place of the
include command. The markup in the file has to be self-contained. It
is not possible for a markup command to cross the file boundaries.</p></dd>
<dt><a name="23"><b class="cmd">item</b></a></dt>
<dd><p>Text structure. List element. Itemized list. Automatically closes the
previous list element.</p></dd>
<dt><a name="24"><b class="cmd"><a href="../../../../index.html#key779">keywords</a></b> <i class="arg">args</i></a></dt>
<dd><p>Document information. Anywhere. This command registers all its plain text
arguments as keywords applying to this document. Each argument is a single
keyword. If this command is used multiple times all the arguments accumulate.</p></dd>
<dt><a name="25"><b class="cmd">lb</b></a></dt>
<dd><p>Text. The command is replaced with a left bracket. Use in free-form text.
Required to avoid interpretation of a left bracket as the start of a markup
command.</p></dd>
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
the name of the <i class="arg">command</i> described by the manpage, the
<i class="arg">section</i> of the manpages this manpage resides in, and the
<i class="arg">version</i> of the module containing the command. All arguments have
to be plain text, without markup.</p></dd>
<dt><a name="30"><b class="cmd">manpage_end</b></a></dt>
<dd><p>Document structure. Command to end a manpage/document. Anything in the document
coming after this command is in error.</p></dd>
<dt><a name="31"><b class="cmd"><a href="../../../../index.html#method">method</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as the name of an
<i class="term"><a href="../../../../index.html#object">object</a></i> <i class="term"><a href="../../../../index.html#method">method</a></i>, i.e. subcommand of a Tcl command. The
text may have other markup already applied to it. Main uses are the
highlighting of method names in free-form text, and for the command
parameters of the markup commands <b class="cmd">call</b> and <b class="cmd">usage</b>.</p></dd>
<dt><a name="32"><b class="cmd">moddesc</b> <i class="arg">text</i></a></dt>
<dd><p>Document information. Header. Registers the plain text argument as a short
description of the module the manpage resides in.</p></dd>
<dt><a name="33"><b class="cmd">namespace</b> <i class="arg">text</i></a></dt>







|

|







381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
the name of the <i class="arg">command</i> described by the manpage, the
<i class="arg">section</i> of the manpages this manpage resides in, and the
<i class="arg">version</i> of the module containing the command. All arguments have
to be plain text, without markup.</p></dd>
<dt><a name="30"><b class="cmd">manpage_end</b></a></dt>
<dd><p>Document structure. Command to end a manpage/document. Anything in the document
coming after this command is in error.</p></dd>
<dt><a name="31"><b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument text is marked up as the name of an
<i class="term"><a href="../../../../index.html#key243">object</a></i> <i class="term"><a href="../../../../index.html#key372">method</a></i>, i.e. subcommand of a Tcl command. The
text may have other markup already applied to it. Main uses are the
highlighting of method names in free-form text, and for the command
parameters of the markup commands <b class="cmd">call</b> and <b class="cmd">usage</b>.</p></dd>
<dt><a name="32"><b class="cmd">moddesc</b> <i class="arg">text</i></a></dt>
<dd><p>Document information. Header. Registers the plain text argument as a short
description of the module the manpage resides in.</p></dd>
<dt><a name="33"><b class="cmd">namespace</b> <i class="arg">text</i></a></dt>
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
<i class="term">option</i> described by the list element. It is expected that the
name is marked up using <b class="cmd">option</b>.</p></dd>
<dt><a name="37"><b class="cmd">option</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as <i class="term">option</i>. The text may
have other markup already applied to it. Main use is the highlighting
of options, also known as command-switches, in either free-form text,
or the arguments of the <b class="cmd">call</b> and <b class="cmd">usage</b> commands.</p></dd>
<dt><a name="38"><b class="cmd"><a href="../../../../index.html#package">package</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term"><a href="../../../../index.html#package">package</a></i>. The text may have other markup already applied to
it. Main use is the highlighting of package names in free-form text.</p></dd>
<dt><a name="39"><b class="cmd">para</b></a></dt>
<dd><p>Text structure. This command breaks free-form text into
paragraphs. Each command closes the paragraph coming before it and
starts a new paragraph for the text coming after it. Higher-level
forms of structure are sections and subsections.</p></dd>
<dt><a name="40"><b class="cmd">rb</b></a></dt>







|

|







411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
<i class="term">option</i> described by the list element. It is expected that the
name is marked up using <b class="cmd">option</b>.</p></dd>
<dt><a name="37"><b class="cmd">option</b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as <i class="term">option</i>. The text may
have other markup already applied to it. Main use is the highlighting
of options, also known as command-switches, in either free-form text,
or the arguments of the <b class="cmd">call</b> and <b class="cmd">usage</b> commands.</p></dd>
<dt><a name="38"><b class="cmd"><a href="../../../../index.html#key48">package</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term"><a href="../../../../index.html#key48">package</a></i>. The text may have other markup already applied to
it. Main use is the highlighting of package names in free-form text.</p></dd>
<dt><a name="39"><b class="cmd">para</b></a></dt>
<dd><p>Text structure. This command breaks free-form text into
paragraphs. Each command closes the paragraph coming before it and
starts a new paragraph for the text coming after it. Higher-level
forms of structure are sections and subsections.</p></dd>
<dt><a name="40"><b class="cmd">rb</b></a></dt>
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
by <b class="cmd">moddesc</b>.</p></dd>
<dt><a name="51"><b class="cmd">tkoption_def</b> <i class="arg">name</i> <i class="arg">dbname</i> <i class="arg">dbclass</i></a></dt>
<dd><p>Text structure. List element. Widget option list. Automatically closes
the previous list element. Specifies the <i class="arg">name</i> of the option as
used in scripts, the name used by the option database (<i class="arg">dbname</i>),
and its class (<i class="arg">dbclass</i>), i.e. its type. It is expected that the
name is marked up using <b class="cmd">option</b>.</p></dd>
<dt><a name="52"><b class="cmd"><a href="../../../../index.html#type">type</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term">data type</i>. The text may have other markup already applied to
it. Main use is the highlighting of data types in free-form text.</p></dd>
<dt><a name="53"><b class="cmd"><a href="../uri/uri.html">uri</a></b> <i class="arg">text</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>Text markup. The argument is marked up as an <i class="term"><a href="../../../../index.html#uri">uri</a></i> (i.e. a
<i class="term">uniform resource identifier</i>. The text may have other markup
already applied to it. Main use is the highlighting of uris in
free-form text. The second argument, should it be present, will be
interpreted the human-readable description of the uri. In other words,
as its label. Without an explicit label the uri will be its own label.</p></dd>
<dt><a name="54"><b class="cmd">usage</b> <i class="arg">args</i></a></dt>
<dd><p>Text markup. See <b class="cmd">call</b> for the full description, this command is







|




|







473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
by <b class="cmd">moddesc</b>.</p></dd>
<dt><a name="51"><b class="cmd">tkoption_def</b> <i class="arg">name</i> <i class="arg">dbname</i> <i class="arg">dbclass</i></a></dt>
<dd><p>Text structure. List element. Widget option list. Automatically closes
the previous list element. Specifies the <i class="arg">name</i> of the option as
used in scripts, the name used by the option database (<i class="arg">dbname</i>),
and its class (<i class="arg">dbclass</i>), i.e. its type. It is expected that the
name is marked up using <b class="cmd">option</b>.</p></dd>
<dt><a name="52"><b class="cmd"><a href="../../../../index.html#key117">type</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term">data type</i>. The text may have other markup already applied to
it. Main use is the highlighting of data types in free-form text.</p></dd>
<dt><a name="53"><b class="cmd"><a href="../uri/uri.html">uri</a></b> <i class="arg">text</i> <span class="opt">?<i class="arg">text</i>?</span></a></dt>
<dd><p>Text markup. The argument is marked up as an <i class="term"><a href="../../../../index.html#key528">uri</a></i> (i.e. a
<i class="term">uniform resource identifier</i>. The text may have other markup
already applied to it. Main use is the highlighting of uris in
free-form text. The second argument, should it be present, will be
interpreted the human-readable description of the uri. In other words,
as its label. Without an explicit label the uri will be its own label.</p></dd>
<dt><a name="54"><b class="cmd">usage</b> <i class="arg">args</i></a></dt>
<dd><p>Text markup. See <b class="cmd">call</b> for the full description, this command is
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
<dt><a name="56"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Templating. In this form the command sets the named document variable
to the specified <i class="arg">value</i>. It does not generate output. I.e. the
command is replaced by the empty string.</p></dd>
<dt><a name="57"><b class="cmd">vset</b> <i class="arg">varname</i></a></dt>
<dd><p>Templating. In this form the command is replaced by the value of the
named document variable</p></dd>
<dt><a name="58"><b class="cmd"><a href="../../../../index.html#widget">widget</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term"><a href="../../../../index.html#widget">widget</a></i>. The text may have other markup already applied to
it. Main use is the highlighting of widget names in free-form text.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools_commands">doctools commands</a>, <a href="../../../../index.html#doctools_language">doctools language</a>, <a href="../../../../index.html#doctools_markup">doctools markup</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

|










<
<
<
<
<
<





|








504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523






524
525
526
527
528
529
530
531
532
533
534
535
536
537
<dt><a name="56"><b class="cmd">vset</b> <i class="arg">varname</i> <i class="arg">value</i></a></dt>
<dd><p>Templating. In this form the command sets the named document variable
to the specified <i class="arg">value</i>. It does not generate output. I.e. the
command is replaced by the empty string.</p></dd>
<dt><a name="57"><b class="cmd">vset</b> <i class="arg">varname</i></a></dt>
<dd><p>Templating. In this form the command is replaced by the value of the
named document variable</p></dd>
<dt><a name="58"><b class="cmd"><a href="../../../../index.html#key235">widget</a></b> <i class="arg">text</i></a></dt>
<dd><p>Text markup. The argument is marked up as the name of a
<i class="term"><a href="../../../../index.html#key235">widget</a></i>. The text may have other markup already applied to
it. Main use is the highlighting of widget names in free-form text.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key137">doctools commands</a>, <a href="../../../../index.html#key140">doctools language</a>, <a href="../../../../index.html#key139">doctools markup</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctools_lang_faq.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools_lang_faq - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools_lang_faq - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctools_lang_faq.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools_lang_faq.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_faq(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_faq - doctools language faq</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctools_lang_faq.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools_lang_faq.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_faq(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_faq - doctools language faq</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools_commands">doctools commands</a>, <a href="../../../../index.html#doctools_language">doctools language</a>, <a href="../../../../index.html#doctools_markup">doctools markup</a>, <a href="../../../../index.html#doctools_syntax">doctools syntax</a>, <a href="../../../../index.html#examples">examples</a>, <a href="../../../../index.html#faq">faq</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
185
186
187
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key137">doctools commands</a>, <a href="../../../../index.html#key140">doctools language</a>, <a href="../../../../index.html#key139">doctools markup</a>, <a href="../../../../index.html#key138">doctools syntax</a>, <a href="../../../../index.html#key370">examples</a>, <a href="../../../../index.html#key367">faq</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctools_lang_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools_lang_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools_lang_intro - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctools_lang_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools_lang_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_intro - doctools language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctools_lang_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools_lang_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_intro(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_intro - doctools language introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<b class="const">[</b> and <b class="const">]</b>. Inside of these delimiters the usual
rules for a Tcl command apply with regard to word quotation, nested
commands, continuation lines, etc. I.e.</p>
<pre class="doctools_example">
  ... [list_begin enumerated] ...
</pre>
<pre class="doctools_example">
  ... [call [cmd foo] \
          [arg bar]] ...
</pre>
<pre class="doctools_example">
  ... [term {complex concept}] ...
</pre>
<pre class="doctools_example">
  ... [opt &quot;[arg key] [arg value]&quot;] ...







|







151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<b class="const">[</b> and <b class="const">]</b>. Inside of these delimiters the usual
rules for a Tcl command apply with regard to word quotation, nested
commands, continuation lines, etc. I.e.</p>
<pre class="doctools_example">
  ... [list_begin enumerated] ...
</pre>
<pre class="doctools_example">
  ... [call [cmd foo] \\
          [arg bar]] ...
</pre>
<pre class="doctools_example">
  ... [term {complex concept}] ...
</pre>
<pre class="doctools_example">
  ... [opt &quot;[arg key] [arg value]&quot;] ...
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [description]
    [vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]
</pre>
<p>This also shows us that all doctools documents are split into two
parts, the <i class="term">header</i> and the <i class="term">body</i>. Everything coming before
[<b class="cmd">description</b>] belongs to the header, and everything coming
after belongs to the body, with the whole document bracketed by the
two <b class="cmd">manpage_*</b> commands. Before and after these opening and







|







177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [description]
    [vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]
</pre>
<p>This also shows us that all doctools documents are split into two
parts, the <i class="term">header</i> and the <i class="term">body</i>. Everything coming before
[<b class="cmd">description</b>] belongs to the header, and everything coming
after belongs to the body, with the whole document bracketed by the
two <b class="cmd">manpage_*</b> commands. Before and after these opening and
224
225
226
227
228
229
230










231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
[<b class="cmd">require   PACKAGE</b>]
[description]
[manpage_end]
</pre>
<p>Remember that the whitespace is optional. The document</p>
<pre class="doctools_example">
    [manpage_begin NAME SECTION VERSION]










    [copyright {YEAR AUTHOR}][titledesc TITLE][moddesc MODULE_TITLE]
    [require PACKAGE VERSION][require PACKAGE][description]
    [vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]
</pre>
<p>has the same meaning as the example before.</p>
<p>On the other hand, if <i class="term">whitespace</i> is present it consists not
only of any sequence of characters containing the space character,
horizontal and vertical tabs, carriage return, and newline, but it may
contain comment markup as well, in the form of the <b class="cmd"><a href="../../../../index.html#comment">comment</a></b>
command.</p>
<pre class="doctools_example">
[<b class="cmd">comment { ... }</b>]
[manpage_begin NAME SECTION VERSION]
[copyright {YEAR AUTHOR}]
[titledesc TITLE]
[moddesc   MODULE_TITLE][<b class="cmd">comment { ... }</b>]







>
>
>
>
>
>
>
>
>
>



|






|







225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
[<b class="cmd">require   PACKAGE</b>]
[description]
[manpage_end]
</pre>
<p>Remember that the whitespace is optional. The document</p>
<pre class="doctools_example">
    [manpage_begin NAME SECTION VERSION]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [copyright {YEAR AUTHOR}][titledesc TITLE][moddesc MODULE_TITLE]
    [require PACKAGE VERSION][require PACKAGE][description]
    [vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]
</pre>
<p>has the same meaning as the example before.</p>
<p>On the other hand, if <i class="term">whitespace</i> is present it consists not
only of any sequence of characters containing the space character,
horizontal and vertical tabs, carriage return, and newline, but it may
contain comment markup as well, in the form of the <b class="cmd"><a href="../../../../index.html#key155">comment</a></b>
command.</p>
<pre class="doctools_example">
[<b class="cmd">comment { ... }</b>]
[manpage_begin NAME SECTION VERSION]
[copyright {YEAR AUTHOR}]
[titledesc TITLE]
[moddesc   MODULE_TITLE][<b class="cmd">comment { ... }</b>]
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
their predominant use is the highlighting of parts of a paragraph they
can also be used to mark up the arguments of list item commands, and
of other markup commands.</p>
<p>The commands available to us are</p>
<dl class="doctools_commands">
<dt><b class="cmd">arg</b></dt>
<dd><p>Its argument is a the name of a command argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#class">class</a></b></dt>
<dd><p>Its argument is a class name.</p></dd>
<dt><b class="cmd">cmd</b></dt>
<dd><p>Its argument is a command name (Tcl command).</p></dd>
<dt><b class="cmd">const</b></dt>
<dd><p>Its argument is a constant.</p></dd>
<dt><b class="cmd">emph</b></dt>
<dd><p>General, non-semantic emphasis.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#file">file</a></b></dt>
<dd><p>Its argument is a filename / path.</p></dd>
<dt><b class="cmd">fun</b></dt>
<dd><p>Its argument is a function name.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#method">method</a></b></dt>
<dd><p>Its argument is a method name</p></dd>
<dt><b class="cmd">namespace</b></dt>
<dd><p>Its argument is namespace name.</p></dd>
<dt><b class="cmd">opt</b></dt>
<dd><p>Its argument is some optional syntax element.</p></dd>
<dt><b class="cmd">option</b></dt>
<dd><p>Its argument is a command line switch / widget option.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#package">package</a></b></dt>
<dd><p>Its argument is a package name.</p></dd>
<dt><b class="cmd">sectref</b></dt>
<dd><p>Its argument is the title of a section or subsection,
                    i.e. a section reference.</p></dd>
<dt><b class="cmd">syscmd</b></dt>
<dd><p>Its argument is a command name (external, system command).</p></dd>
<dt><b class="cmd"><a href="../term/term.html">term</a></b></dt>
<dd><p>Its argument is a concept, or general terminology.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#type">type</a></b></dt>
<dd><p>Its argument is a type name.</p></dd>
<dt><b class="cmd"><a href="../uri/uri.html">uri</a></b></dt>
<dd><p>Its argument is a uniform resource identifier, i.e an
                    external reference. A second argument can be used
                    to specify an explicit label for the reference in
                    question.</p></dd>
<dt><b class="cmd">usage</b></dt>
<dd><p>The arguments describe the syntax of a Tcl command.</p></dd>
<dt><b class="cmd">var</b></dt>
<dd><p>Its argument is a variable.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#widget">widget</a></b></dt>
<dd><p>Its argument is a widget name.</p></dd>
</dl>
<p>The example demonstrating the use of text markup is an excerpt from
the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i>, with some
highlighting added.
It shows their use within a block of text, as the arguments of a list
item command (<b class="cmd">call</b>), and our ability to nest them.</p>
<pre class="doctools_example">
  ...
  [call [<b class="cmd">cmd arg_def</b>] [<b class="cmd">arg type</b>] [<b class="cmd">arg name</b>] [<b class="cmd">opt</b> [<b class="cmd">arg mode</b>]]]
  Text structure. List element. Argument list. Automatically closes the
  previous list element. Specifies the data-[<b class="cmd">arg type</b>] of the described
  argument of a command, its [<b class="cmd">arg name</b>] and its i/o-[<b class="cmd">arg mode</b>]. The
  latter is optional.
  ...
</pre>
</div>







|







|



|







|








|










|









|







379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
their predominant use is the highlighting of parts of a paragraph they
can also be used to mark up the arguments of list item commands, and
of other markup commands.</p>
<p>The commands available to us are</p>
<dl class="doctools_commands">
<dt><b class="cmd">arg</b></dt>
<dd><p>Its argument is a the name of a command argument.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key240">class</a></b></dt>
<dd><p>Its argument is a class name.</p></dd>
<dt><b class="cmd">cmd</b></dt>
<dd><p>Its argument is a command name (Tcl command).</p></dd>
<dt><b class="cmd">const</b></dt>
<dd><p>Its argument is a constant.</p></dd>
<dt><b class="cmd">emph</b></dt>
<dd><p>General, non-semantic emphasis.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key31">file</a></b></dt>
<dd><p>Its argument is a filename / path.</p></dd>
<dt><b class="cmd">fun</b></dt>
<dd><p>Its argument is a function name.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key372">method</a></b></dt>
<dd><p>Its argument is a method name</p></dd>
<dt><b class="cmd">namespace</b></dt>
<dd><p>Its argument is namespace name.</p></dd>
<dt><b class="cmd">opt</b></dt>
<dd><p>Its argument is some optional syntax element.</p></dd>
<dt><b class="cmd">option</b></dt>
<dd><p>Its argument is a command line switch / widget option.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key48">package</a></b></dt>
<dd><p>Its argument is a package name.</p></dd>
<dt><b class="cmd">sectref</b></dt>
<dd><p>Its argument is the title of a section or subsection,
                    i.e. a section reference.</p></dd>
<dt><b class="cmd">syscmd</b></dt>
<dd><p>Its argument is a command name (external, system command).</p></dd>
<dt><b class="cmd"><a href="../term/term.html">term</a></b></dt>
<dd><p>Its argument is a concept, or general terminology.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key117">type</a></b></dt>
<dd><p>Its argument is a type name.</p></dd>
<dt><b class="cmd"><a href="../uri/uri.html">uri</a></b></dt>
<dd><p>Its argument is a uniform resource identifier, i.e an
                    external reference. A second argument can be used
                    to specify an explicit label for the reference in
                    question.</p></dd>
<dt><b class="cmd">usage</b></dt>
<dd><p>The arguments describe the syntax of a Tcl command.</p></dd>
<dt><b class="cmd">var</b></dt>
<dd><p>Its argument is a variable.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key235">widget</a></b></dt>
<dd><p>Its argument is a widget name.</p></dd>
</dl>
<p>The example demonstrating the use of text markup is an excerpt from
the <i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i>, with some
highlighting added.
It shows their use within a block of text, as the arguments of a list
item command (<b class="cmd">call</b>), and our ability to nest them.</p>
<pre class="doctools_example">
  ...
  [call [<b class="cmd">cmd arg_def</b>] [<b class="cmd">arg type</b>] [<b class="cmd">arg name</b>]] [<b class="cmd">opt</b> [<b class="cmd">arg mode</b>]]]
  Text structure. List element. Argument list. Automatically closes the
  previous list element. Specifies the data-[<b class="cmd">arg type</b>] of the described
  argument of a command, its [<b class="cmd">arg name</b>] and its i/o-[<b class="cmd">arg mode</b>]. The
  latter is optional.
  ...
</pre>
</div>
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
  impossible to directly use [<b class="cmd">lb</b>] and [<b class="cmd">rb</b>] within the text.
  ...
</pre>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Cross-references</a></h3>
<p>The last two commands we have to discuss are for the declaration of
cross-references between documents, explicit and implicit. They are
<b class="cmd"><a href="../../../../index.html#keywords">keywords</a></b> and <b class="cmd">see_also</b>. Both take an arbitrary number of
arguments, all of which have to be plain unmarked text. I.e. it is not
allowed to use markup on them. Both commands can be used multiple
times in a document. If that is done all arguments of all occurrences
of one of them are put together into a single set.</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#keywords">keywords</a></b></dt>
<dd><p>The arguments of this command are interpreted as keywords describing
the document. A processor can use this information to create an index
indirectly linking the containing document to all documents with the
same keywords.</p></dd>
<dt><b class="cmd">see_also</b></dt>
<dd><p>The arguments of this command are interpreted as references to other
documents. A processor can format them as direct links to these







|





|







459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
  impossible to directly use [<b class="cmd">lb</b>] and [<b class="cmd">rb</b>] within the text.
  ...
</pre>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Cross-references</a></h3>
<p>The last two commands we have to discuss are for the declaration of
cross-references between documents, explicit and implicit. They are
<b class="cmd"><a href="../../../../index.html#key779">keywords</a></b> and <b class="cmd">see_also</b>. Both take an arbitrary number of
arguments, all of which have to be plain unmarked text. I.e. it is not
allowed to use markup on them. Both commands can be used multiple
times in a document. If that is done all arguments of all occurrences
of one of them are put together into a single set.</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#key779">keywords</a></b></dt>
<dd><p>The arguments of this command are interpreted as keywords describing
the document. A processor can use this information to create an index
indirectly linking the containing document to all documents with the
same keywords.</p></dd>
<dt><b class="cmd">see_also</b></dt>
<dd><p>The arguments of this command are interpreted as references to other
documents. A processor can format them as direct links to these
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools_commands">doctools commands</a>, <a href="../../../../index.html#doctools_language">doctools language</a>, <a href="../../../../index.html#doctools_markup">doctools markup</a>, <a href="../../../../index.html#doctools_syntax">doctools syntax</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








626
627
628
629
630
631
632






633
634
635
636
637
638
639
640
641
642
643
644
645
646
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key137">doctools commands</a>, <a href="../../../../index.html#key140">doctools language</a>, <a href="../../../../index.html#key139">doctools markup</a>, <a href="../../../../index.html#key138">doctools syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctools_lang_syntax.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools_lang_syntax - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools_lang_syntax - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctools_lang_syntax.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools_lang_syntax.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_syntax(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_syntax - doctools language syntax</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctools_lang_syntax.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools_lang_syntax.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_lang_syntax(n) 1.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_lang_syntax - doctools language syntax</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<li><p>&lt;TEXT&gt; stands for all text except markup commands.</p></li>
<li><p>Any XXX stands for the markup command [xxx] including its
arguments. Each markup command is a Tcl command surrounded by a
matching pair of <b class="const">[</b> and <b class="const">]</b>. Inside of these
delimiters the usual rules for a Tcl command apply with regard to word
quotation, nested commands, continuation lines, etc.</p></li>
<li><p>&lt;WHITE&gt; stands for all text consisting only of spaces, newlines,
tabulators and the <b class="cmd"><a href="../../../../index.html#comment">comment</a></b> markup command.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Syntax</a></h2>
<p>The rules listed here specify only the syntax of doctools
documents. The lexical level of the language was covered in the
previous section.</p>
<p>Regarding the syntax of the (E)BNF itself</p>







|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<li><p>&lt;TEXT&gt; stands for all text except markup commands.</p></li>
<li><p>Any XXX stands for the markup command [xxx] including its
arguments. Each markup command is a Tcl command surrounded by a
matching pair of <b class="const">[</b> and <b class="const">]</b>. Inside of these
delimiters the usual rules for a Tcl command apply with regard to word
quotation, nested commands, continuation lines, etc.</p></li>
<li><p>&lt;WHITE&gt; stands for all text consisting only of spaces, newlines,
tabulators and the <b class="cmd"><a href="../../../../index.html#key155">comment</a></b> markup command.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Syntax</a></h2>
<p>The rules listed here specify only the syntax of doctools
documents. The lexical level of the language was covered in the
previous section.</p>
<p>Regarding the syntax of the (E)BNF itself</p>
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools_commands">doctools commands</a>, <a href="../../../../index.html#doctools_language">doctools language</a>, <a href="../../../../index.html#doctools_markup">doctools markup</a>, <a href="../../../../index.html#doctools_syntax">doctools syntax</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








214
215
216
217
218
219
220






221
222
223
224
225
226
227
228
229
230
231
232
233
234
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key137">doctools commands</a>, <a href="../../../../index.html#key140">doctools language</a>, <a href="../../../../index.html#key139">doctools markup</a>, <a href="../../../../index.html#key138">doctools syntax</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/doctools_plugin_apiref.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools_plugin_apiref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools_plugin_apiref - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'doctools_plugin_apiref.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2010 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools_plugin_apiref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_plugin_apiref(n) 1.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_plugin_apiref - doctools plugin API reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'doctools_plugin_apiref.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools_plugin_apiref.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools_plugin_apiref(n) 1.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools_plugin_apiref - doctools plugin API reference</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<li><a href="#30"><b class="cmd">fmt_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></li>
<li><a href="#31"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is intended for <i class="term">plugin writers</i>, i.e. developers
wishing to write a doctools <i class="term"><a href="../../../../index.html#formatting_engine">formatting engine</a></i> for some output
format X.</p>
<p>It specifies the interaction between the <b class="package"><a href="doctools.html">doctools</a></b> package
and its plugins, i.e. the interface any doctools formatting engine has
to comply with.</p>
<p>This document deals with version 1 of the interface.</p>
<p>A reader who is on the other hand more interested in the markup
language itself should start with the







|







167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<li><a href="#30"><b class="cmd">fmt_varset</b> <i class="arg">varname</i> <i class="arg">text</i></a></li>
<li><a href="#31"><b class="cmd">fmt_plain_text</b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is intended for <i class="term">plugin writers</i>, i.e. developers
wishing to write a doctools <i class="term"><a href="../../../../index.html#key658">formatting engine</a></i> for some output
format X.</p>
<p>It specifies the interaction between the <b class="package"><a href="doctools.html">doctools</a></b> package
and its plugins, i.e. the interface any doctools formatting engine has
to comply with.</p>
<p>This document deals with version 1 of the interface.</p>
<p>A reader who is on the other hand more interested in the markup
language itself should start with the
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
runs.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Formatting commands</a></h3>
<p>The formatting commands have to implement the formatting for the
output format, for all the markup commands of the doctools markup
language, except <b class="cmd">lb</b>, <b class="cmd">rb</b>, <b class="cmd">vset</b>, <b class="cmd">include</b>, and
<b class="cmd"><a href="../../../../index.html#comment">comment</a></b>. These exceptions are processed by the frontend and are
never seen by the plugin. In return a command for the formatting of
plain text has to be provided, something which has no markup in the
input at all.</p>
<p>This means, that each of the 49 markup commands specified in the
<i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i> and outside of the set of
exceptions listed above has an equivalent formatting command which
takes the same arguments as the markup command and whose name is the







|







433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
runs.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Formatting commands</a></h3>
<p>The formatting commands have to implement the formatting for the
output format, for all the markup commands of the doctools markup
language, except <b class="cmd">lb</b>, <b class="cmd">rb</b>, <b class="cmd">vset</b>, <b class="cmd">include</b>, and
<b class="cmd"><a href="../../../../index.html#key155">comment</a></b>. These exceptions are processed by the frontend and are
never seen by the plugin. In return a command for the formatting of
plain text has to be provided, something which has no markup in the
input at all.</p>
<p>This means, that each of the 49 markup commands specified in the
<i class="term"><a href="doctools_lang_cmdref.html">doctools language command reference</a></i> and outside of the set of
exceptions listed above has an equivalent formatting command which
takes the same arguments as the markup command and whose name is the
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools.html">doctools</a>, <a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#document">document</a>, <a href="../../../../index.html#formatter">formatter</a>, <a href="../../../../index.html#formatting_engine">formatting engine</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








474
475
476
477
478
479
480






481
482
483
484
485
486
487
488
489
490
491
492
493
494
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="doctools.html">doctools</a>, <a href="doctools_intro.html">doctools_intro</a>, <a href="doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="doctools_lang_faq.html">doctools_lang_faq</a>, <a href="doctools_lang_intro.html">doctools_lang_intro</a>, <a href="doctools_lang_syntax.html">doctools_lang_syntax</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key659">document</a>, <a href="../../../../index.html#key657">formatter</a>, <a href="../../../../index.html#key658">formatting engine</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools/mpexpand.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>mpexpand - Documentation toolbox</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>mpexpand - Documentation toolbox</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'mpexpand.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2003 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- mpexpand.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">mpexpand(n) 1.0 tcllib &quot;Documentation toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>mpexpand - Markup processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'mpexpand.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;   -- Copyright &copy; 2003 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- mpexpand.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">mpexpand(n) 1.0 tcllib &quot;Documentation toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>mpexpand - Markup processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>expander(n), format(n), formatter(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#tmml">TMML</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#nroff">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2003 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|









181
182
183
184
185
186
187






188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>expander(n), format(n), formatter(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2003 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2base/html_cssdefaults.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::html::cssdefaults - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::html::cssdefaults - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'html_cssdefaults.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::html::cssdefaults.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::html::cssdefaults(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::html::cssdefaults - Default CSS style for HTML export plugins</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'html_cssdefaults.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::html::cssdefaults.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::html::cssdefaults(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::html::cssdefaults - Default CSS style for HTML export plugins</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single command providing access to the text of
the default CSS style to use for HTML markup generated by the various
HTML export plugins.</p>
<p>This is an internal package of doctools, for use by <i class="term"><a href="../../../../index.html#export">export</a></i> plugins,
i.e. the packages converting doctools related documented into other
formats, most notably <i class="term"><a href="../../../../index.html#html">HTML</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::html::cssdefaults::contents</b></a></dt>
<dd><p>This command returns the text of the default CSS style to use for HTML
markup generated by the various HTML export plugins.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#css">CSS</a>, <a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#style">style</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

|















<
<
<
<
<
<


|








135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159






160
161
162
163
164
165
166
167
168
169
170
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single command providing access to the text of
the default CSS style to use for HTML markup generated by the various
HTML export plugins.</p>
<p>This is an internal package of doctools, for use by <i class="term"><a href="../../../../index.html#key260">export</a></i> plugins,
i.e. the packages converting doctools related documented into other
formats, most notably <i class="term"><a href="../../../../index.html#key18">HTML</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::html::cssdefaults::contents</b></a></dt>
<dd><p>This command returns the text of the default CSS style to use for HTML
markup generated by the various HTML export plugins.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key406">CSS</a>, <a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key405">style</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2base/nroff_manmacros.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::nroff::man_macros - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::nroff::man_macros - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nroff_manmacros.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::nroff::man_macros.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::nroff::man_macros(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::nroff::man_macros - Default CSS style for NROFF export plugins</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nroff_manmacros.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::nroff::man_macros.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::nroff::man_macros(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::nroff::man_macros - Default CSS style for NROFF export plugins</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single command providing access to the
definition of the nroff <em>man</em> macro set to use for NROFF markup
generated by the various NROFF export plugins.</p>
<p>This is an internal package of doctools, for use by <i class="term"><a href="../../../../index.html#export">export</a></i> plugins,
i.e. the packages converting doctools related documented into other
formats, most notably <i class="term"><a href="../../../../index.html#nroff">nroff</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::nroff::man_macros::contents</b></a></dt>
<dd><p>This command returns the text of the default CSS style to use for NROFF
generated by the various NROFF export plugins.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#macros">macros</a>, <a href="../../../../index.html#man_macros">man_macros</a>, <a href="../../../../index.html#nroff">nroff</a>, <a href="../../../../index.html#plugin">plugin</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

|















<
<
<
<
<
<


|








135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159






160
161
162
163
164
165
166
167
168
169
170
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single command providing access to the
definition of the nroff <em>man</em> macro set to use for NROFF markup
generated by the various NROFF export plugins.</p>
<p>This is an internal package of doctools, for use by <i class="term"><a href="../../../../index.html#key260">export</a></i> plugins,
i.e. the packages converting doctools related documented into other
formats, most notably <i class="term"><a href="../../../../index.html#key21">nroff</a></i>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::nroff::man_macros::contents</b></a></dt>
<dd><p>This command returns the text of the default CSS style to use for NROFF
generated by the various NROFF export plugins.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key527">macros</a>, <a href="../../../../index.html#key526">man_macros</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key252">plugin</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2base/tcl_parse.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::tcl::parse - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::tcl::parse - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcl_parse.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::tcl::parse.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::tcl::parse(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::tcl::parse - Processing text in 'subst -novariables' format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcl_parse.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::tcl::parse.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::tcl::parse(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::tcl::parse - Processing text in 'subst -novariables' format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for parsing text with embedded Tcl
commands as accepted by the Tcl builtin command
<b class="cmd">subst -novariables</b>. The result of the parsing is an abstract
syntax tree.</p>
<p>This is an internal package of doctools, for use by the higher level
parsers processing the <i class="term"><a href="../../../../index.html#docidx">docidx</a></i>, <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i>, and <i class="term"><a href="../../../../index.html#doctools">doctools</a></i>
markup languages.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::tcl::parse</b> <b class="method">text</b> <i class="arg">tree</i> <i class="arg">text</i> <span class="opt">?<i class="arg">root</i>?</span></a></dt>
<dd><p>The command takes the <i class="arg">text</i> and parses it under the assumption
that it contains a string acceptable to the Tcl builtin command







|







147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands for parsing text with embedded Tcl
commands as accepted by the Tcl builtin command
<b class="cmd">subst -novariables</b>. The result of the parsing is an abstract
syntax tree.</p>
<p>This is an internal package of doctools, for use by the higher level
parsers processing the <i class="term"><a href="../../../../index.html#key178">docidx</a></i>, <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>, and <i class="term"><a href="../../../../index.html#key179">doctools</a></i>
markup languages.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::tcl::parse</b> <b class="method">text</b> <i class="arg">tree</i> <i class="arg">text</i> <span class="opt">?<i class="arg">root</i>?</span></a></dt>
<dd><p>The command takes the <i class="arg">text</i> and parses it under the assumption
that it contains a string acceptable to the Tcl builtin command
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tcl_syntax">Tcl syntax</a>, <a href="../../../../index.html#command">command</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#subst">subst</a>, <a href="../../../../index.html#word">word</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








256
257
258
259
260
261
262






263
264
265
266
267
268
269
270
271
272
273
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key274">Tcl syntax</a>, <a href="../../../../index.html#key275">command</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key273">subst</a>, <a href="../../../../index.html#key272">word</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2base/tcllib_msgcat.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::msgcat - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::msgcat - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_msgcat.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::msgcat.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat - Message catalog management for the various document parsers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_msgcat.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::msgcat.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat - Message catalog management for the various document parsers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#catalog_package">catalog package</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#i18n">i18n</a>, <a href="../../../../index.html#internationalization">internationalization</a>, <a href="../../../../index.html#l10n">l10n</a>, <a href="../../../../index.html#localization">localization</a>, <a href="../../../../index.html#message_catalog">message catalog</a>, <a href="../../../../index.html#message_package">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








169
170
171
172
173
174
175






176
177
178
179
180
181
182
183
184
185
186
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/export_docidx.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::export::docidx - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::export::docidx - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::export::docidx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::docidx(n) 0.2.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::docidx - docidx export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::export::docidx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::docidx(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::docidx - docidx export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::docidx <span class="opt">?0.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of docidx markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates docidx markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


|


















|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::docidx <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of docidx markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates docidx markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
implies that <b class="variable">newlines</b> is set. This effect is independent of the
value for <b class="variable">aligned</b> however.</p>
<p>If this flag is not set (the default), the output is formatted as per
the values of <b class="variable">newlines</b> and <b class="variable">aligned</b>, and no indenting is
done.</p></dd>
<dt>boolean <i class="arg">aligned</i></dt>
<dd><p>If this flag is set the generator ensures that the arguments for the
<b class="cmd"><a href="../../../../index.html#manpage">manpage</a></b> and <b class="cmd"><a href="../../../../index.html#url">url</a></b> commands in a keyword section are aligned
vertically for a nice table effect. To make this work this also
implies that <b class="variable">newlines</b> is set. This effect is independent of the
value for <b class="variable">indented</b> however.</p>
<p>If this flag is not set (the default), the output is formatted as per
the values of <b class="variable">newlines</b> and <b class="variable">indented</b>, and no alignment is
done.</p></dd>
</dl>







|







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
implies that <b class="variable">newlines</b> is set. This effect is independent of the
value for <b class="variable">aligned</b> however.</p>
<p>If this flag is not set (the default), the output is formatted as per
the values of <b class="variable">newlines</b> and <b class="variable">aligned</b>, and no indenting is
done.</p></dd>
<dt>boolean <i class="arg">aligned</i></dt>
<dd><p>If this flag is set the generator ensures that the arguments for the
<b class="cmd"><a href="../../../../index.html#key17">manpage</a></b> and <b class="cmd"><a href="../../../../index.html#key246">url</a></b> commands in a keyword section are aligned
vertically for a nice table effect. To make this work this also
implies that <b class="variable">newlines</b> is set. This effect is independent of the
value for <b class="variable">indented</b> however.</p>
<p>If this flag is not set (the default), the output is formatted as per
the values of <b class="variable">newlines</b> and <b class="variable">indented</b>, and no alignment is
done.</p></dd>
</dl>
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#serialization">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


287
288
289
290
291
292
293






294
295
296
297
298
299
300
301
302
303
304
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_container.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'idx_container.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx(n) 2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx - Holding keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'idx_container.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx(n) 2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx - Holding keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
This is the only format directly known to this class. Conversions from
and to any other format are handled by export and import manager
objects. These may be attached to a container, but do not have to be,
it is merely a convenience.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#keyword_index">keyword index</a></i> consists of a (possibly empty) set of <i class="term"><a href="../../../../index.html#keywords">keywords</a></i>.</p></li>
<li><p>Each keyword in the set is identified by its name.</p></li>
<li><p>Each keyword has a (possibly empty) set of <i class="term">references</i>.</p></li>
<li><p>A reference can be associated with more than one keyword.</p></li>
<li><p>A reference not associated with at least one keyword is not possible
however.</p></li>
<li><p>Each reference is identified by its target, specified as either an url
or symbolic filename, depending on the type of reference (<b class="const">url</b>,







|







185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
This is the only format directly known to this class. Conversions from
and to any other format are handled by export and import manager
objects. These may be attached to a container, but do not have to be,
it is merely a convenience.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key184">keyword index</a></i> consists of a (possibly empty) set of <i class="term"><a href="../../../../index.html#key779">keywords</a></i>.</p></li>
<li><p>Each keyword in the set is identified by its name.</p></li>
<li><p>Each keyword has a (possibly empty) set of <i class="term">references</i>.</p></li>
<li><p>A reference can be associated with more than one keyword.</p></li>
<li><p>A reference not associated with at least one keyword is not possible
however.</p></li>
<li><p>Each reference is identified by its target, specified as either an url
or symbolic filename, depending on the type of reference (<b class="const">url</b>,
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new container object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>







|







219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new container object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#tmml">TMML</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#docidx_markup">docidx markup</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#generation">generation</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#json">json</a>, <a href="../../../../index.html#keyword_index">keyword index</a>, <a href="../../../../index.html#latex">latex</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#nroff">nroff</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#reference">reference</a>, <a href="../../../../index.html#tcler_s_wiki">tcler's wiki</a>, <a href="../../../../index.html#text">text</a>, <a href="../../../../index.html#url">url</a>, <a href="../../../../index.html#wiki">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








431
432
433
434
435
436
437






438
439
440
441
442
443
444
445
446
447
448
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key249">docidx markup</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key250">generation</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key245">tcler's wiki</a>, <a href="../../../../index.html#key248">text</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_export.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::export - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::export - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'idx_export.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::export.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export(n) 0.2.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export - Exporting keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'idx_export.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::export.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export - Exporting keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::idx::export <span class="opt">?0.2.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::map</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::export</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">config names</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">config get</b></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#10"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the export of
keyword indices to other formats, i.e. their conversion to, for
example <i class="term"><a href="../../../../index.html#docidx">docidx</a></i>, <i class="term"><a href="../../../../index.html#html">HTML</a></i>, etc.</p>
<p>This is one of the three public pillars the management of keyword
indices resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="idx_import.html">Importing keyword indices</a></i>, and</p></li>
<li><p><i class="term"><a href="idx_container.html">Holding keyword indices</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of keyword indices, and







|

|














|






|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::idx::export <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::config</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::export</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">config names</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">config get</b></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#10"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the export of
keyword indices to other formats, i.e. their conversion to, for
example <i class="term"><a href="../../../../index.html#key178">docidx</a></i>, <i class="term"><a href="../../../../index.html#key18">HTML</a></i>, etc.</p>
<p>This is one of the three public pillars the management of keyword
indices resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="idx_import.html">Importing keyword indices</a></i>, and</p></li>
<li><p><i class="term"><a href="idx_container.html">Holding keyword indices</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of keyword indices, and
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Export plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#keyword_index">keyword index</a></i> consists of a (possibly empty) set of <i class="term"><a href="../../../../index.html#keywords">keywords</a></i>.</p></li>
<li><p>Each keyword in the set is identified by its name.</p></li>
<li><p>Each keyword has a (possibly empty) set of <i class="term">references</i>.</p></li>
<li><p>A reference can be associated with more than one keyword.</p></li>
<li><p>A reference not associated with at least one keyword is not possible
however.</p></li>
<li><p>Each reference is identified by its target, specified as either an url
or symbolic filename, depending on the type of reference (<b class="const">url</b>,







|







210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Export plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key184">keyword index</a></i> consists of a (possibly empty) set of <i class="term"><a href="../../../../index.html#key779">keywords</a></i>.</p></li>
<li><p>Each keyword in the set is identified by its name.</p></li>
<li><p>Each keyword has a (possibly empty) set of <i class="term">references</i>.</p></li>
<li><p>A reference can be associated with more than one keyword.</p></li>
<li><p>A reference not associated with at least one keyword is not possible
however.</p></li>
<li><p>Each reference is identified by its target, specified as either an url
or symbolic filename, depending on the type of reference (<b class="const">url</b>,
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::export</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new export manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>







|







244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::export</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new export manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<dt><a name="8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overridden when invoking an
import plugin.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
</dl>
</div>







|







299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
<dt><a name="8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
</dl>
</div>
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
       format.</p></li>
<li><p>The plugin can expect that the package
       <b class="package">doctools::idx::export::plugin</b> is present, as
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="10"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an export manager of <b class="package"><a href="idx_container.html">doctools::idx</a></b> has to generate
output for an index it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">serial</i></dt>
<dd><p>This argument will contain the <i class="term">canonical</i> serialization of the
index for which to generate the output.
The specification of what a <i class="term">canonical</i> serialization is can be







|







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
       format.</p></li>
<li><p>The plugin can expect that the package
       <b class="package">doctools::idx::export::plugin</b> is present, as
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="10"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an export manager of <b class="package"><a href="idx_container.html">doctools::idx</a></b> has to generate
output for an index it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">serial</i></dt>
<dd><p>This argument will contain the <i class="term">canonical</i> serialization of the
index for which to generate the output.
The specification of what a <i class="term">canonical</i> serialization is can be
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
          the possibility that a symbolic name is without entry in
          this mapping.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#export">export</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>







|







369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
          the possibility that a symbolic name is without entry in
          this mapping.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#key260">export</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#generation">generation</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#json">json</a>, <a href="../../../../index.html#keyword_index">keyword index</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#nroff">nroff</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#reference">reference</a>, <a href="../../../../index.html#tcler_s_wiki">tcler's wiki</a>, <a href="../../../../index.html#text">text</a>, <a href="../../../../index.html#url">url</a>, <a href="../../../../index.html#wiki">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


445
446
447
448
449
450
451






452
453
454
455
456
457
458
459
460
461
462
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key250">generation</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key245">tcler's wiki</a>, <a href="../../../../index.html#key248">text</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_export_html.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::export::html - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::export::html - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::export::html.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::html(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::html - HTML export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::export::html.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::html(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::html - HTML export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::html <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::html</b></li>
<li>package require <b class="pkgname">doctools::html::cssdefaults</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of HTML markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates HTML markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


















|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::html <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::html</b></li>
<li>package require <b class="pkgname">doctools::html::cssdefaults</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of HTML markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates HTML markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#serialization">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


349
350
351
352
353
354
355






356
357
358
359
360
361
362
363
364
365
366
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_export_json.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::export::json - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::export::json - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::export::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::json(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::json - JSON export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::export::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::json(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::json - JSON export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::json <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">textutil::adjust</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates JSON markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


















|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::json <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">textutil::adjust</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates JSON markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#json">JSON</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#serialization">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


302
303
304
305
306
307
308






309
310
311
312
313
314
315
316
317
318
319
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_export_nroff.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::export::nroff - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::export::nroff - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::export::nroff.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::nroff(n) 0.3 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::nroff - nroff export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::export::nroff.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::nroff(n) 0.3 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::nroff - nroff export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::nroff <span class="opt">?0.3?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::nroff::man_macros</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of nroff markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates nroff markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


















|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::nroff <span class="opt">?0.3?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::nroff::man_macros</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of nroff markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates nroff markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#nroff">nroff</a>, <a href="../../../../index.html#serialization">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


256
257
258
259
260
261
262






263
264
265
266
267
268
269
270
271
272
273
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_export_text.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::export::text - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::export::text - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::export::text.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::text(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::text - plain text export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::export::text.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::text(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::text - plain text export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::text <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of plain text markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates plain text markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


















|







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::text <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of plain text markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates plain text markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#plain_text">plain text</a>, <a href="../../../../index.html#serialization">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


243
244
245
246
247
248
249






250
251
252
253
254
255
256
257
258
259
260
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key545">plain text</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_export_wiki.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::export::wiki - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::export::wiki - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::export::wiki.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::wiki(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::wiki - wiki export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::export::wiki.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::export::wiki(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::export::wiki - wiki export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::wiki <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of wiki markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates wiki markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


















|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::export::wiki <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index export plugin for
the generation of wiki markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_export.html">doctools::idx::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_export.html">doctools::idx::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a keyword index, as
specified in section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates wiki markup encoding the index.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#wiki">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


256
257
258
259
260
261
262






263
264
265
266
267
268
269
270
271
272
273
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_import.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::import - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::import - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'idx_import.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::import.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::import(n) 0.2.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::import - Importing keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'idx_import.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::import.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::import(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::import - Importing keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::idx::import <span class="opt">?0.2.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::map</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::import</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>







|

|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::idx::import <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::config</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::idx::import</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<li><a href="#10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">includes</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">include add</b> <i class="arg">path</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">include remove</b> <i class="arg">path</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">include clear</b></a></li>
<li><a href="#16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the import of
keyword indices from other formats, i.e. their conversion from, for
example <i class="term"><a href="../../../../index.html#docidx">docidx</a></i>, <i class="term"><a href="../../../../index.html#json">json</a></i>, etc.</p>
<p>This is one of the three public pillars the management of keyword
indices resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="idx_export.html">Exporting keyword indices</a></i>, and</p></li>
<li><p><i class="term"><a href="idx_container.html">Holding keyword indices</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of keyword indices, and







|






|







156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<li><a href="#10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">includes</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">include add</b> <i class="arg">path</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">include remove</b> <i class="arg">path</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">include clear</b></a></li>
<li><a href="#16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the import of
keyword indices from other formats, i.e. their conversion from, for
example <i class="term"><a href="../../../../index.html#key178">docidx</a></i>, <i class="term"><a href="../../../../index.html#key206">json</a></i>, etc.</p>
<p>This is one of the three public pillars the management of keyword
indices resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="idx_export.html">Exporting keyword indices</a></i>, and</p></li>
<li><p><i class="term"><a href="idx_container.html">Holding keyword indices</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of keyword indices, and
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Import plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#keyword_index">keyword index</a></i> consists of a (possibly empty) set of <i class="term"><a href="../../../../index.html#keywords">keywords</a></i>.</p></li>
<li><p>Each keyword in the set is identified by its name.</p></li>
<li><p>Each keyword has a (possibly empty) set of <i class="term">references</i>.</p></li>
<li><p>A reference can be associated with more than one keyword.</p></li>
<li><p>A reference not associated with at least one keyword is not possible
however.</p></li>
<li><p>Each reference is identified by its target, specified as either an url
or symbolic filename, depending on the type of reference (<b class="const">url</b>,







|







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Import plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key184">keyword index</a></i> consists of a (possibly empty) set of <i class="term"><a href="../../../../index.html#key779">keywords</a></i>.</p></li>
<li><p>Each keyword in the set is identified by its name.</p></li>
<li><p>Each keyword has a (possibly empty) set of <i class="term">references</i>.</p></li>
<li><p>A reference can be associated with more than one keyword.</p></li>
<li><p>A reference not associated with at least one keyword is not possible
however.</p></li>
<li><p>Each reference is identified by its target, specified as either an url
or symbolic filename, depending on the type of reference (<b class="const">url</b>,
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::import</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new import manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>







|







243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::import</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new import manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<dt><a name="10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overridden when invoking an
import plugin.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">includes</b></a></dt>
<dd><p>This method returns a list containing the currently specified paths to







|







309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<dt><a name="10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">includes</b></a></dt>
<dd><p>This method returns a list containing the currently specified paths to
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>The plugin can expect that a command named <b class="cmd">IncludeFile</b> is
       present, with the signature</p>
<dl class="doctools_definitions">
<dt><a name="16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></dt>
<dd><p>This command has to be invoked by the plugin when it has to process an
included file, if the format has the concept of such. An example of
such a format would be <i class="term"><a href="../../../../index.html#docidx">docidx</a></i>.</p>
<p>The plugin has to supply the following arguments</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">currentfile</i></dt>
<dd><p>The path of the file it is currently processing. This may be the empty
string if no such is known.</p></dd>
<dt>string <i class="arg">path</i></dt>
<dd><p>The path of the include file as specified in the include directive







|







363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>The plugin can expect that a command named <b class="cmd">IncludeFile</b> is
       present, with the signature</p>
<dl class="doctools_definitions">
<dt><a name="16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></dt>
<dd><p>This command has to be invoked by the plugin when it has to process an
included file, if the format has the concept of such. An example of
such a format would be <i class="term"><a href="../../../../index.html#key178">docidx</a></i>.</p>
<p>The plugin has to supply the following arguments</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">currentfile</i></dt>
<dd><p>The path of the file it is currently processing. This may be the empty
string if no such is known.</p></dd>
<dt>string <i class="arg">path</i></dt>
<dd><p>The path of the include file as specified in the include directive
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
       for a <b class="const">notread</b> error in more detail.</p></li>
</ol></dd>
</dl>
</li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an import manager of <b class="package"><a href="idx_container.html">doctools::idx</a></b> has to parse
input for an index it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">text</i></dt>
<dd><p>This argument will contain the text encoding the index per the format
the plugin is for.</p></dd>
<dt>dictionary <i class="arg">configuration</i></dt>







|







402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
       for a <b class="const">notread</b> error in more detail.</p></li>
</ol></dd>
</dl>
</li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an import manager of <b class="package"><a href="idx_container.html">doctools::idx</a></b> has to parse
input for an index it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">text</i></dt>
<dd><p>This argument will contain the text encoding the index per the format
the plugin is for.</p></dd>
<dt>dictionary <i class="arg">configuration</i></dt>
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
<dd><p>This variable is expected to contain the name of the
             format whose plugin is invoked.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#import">import</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>







|







428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
<dd><p>This variable is expected to contain the name of the
             format whose plugin is invoked.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#key291">import</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Keyword index serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize keyword indices as immutable values for transport,
comparison, etc.</p>
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#import">import</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#json">json</a>, <a href="../../../../index.html#keyword_index">keyword index</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#reference">reference</a>, <a href="../../../../index.html#url">url</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


504
505
506
507
508
509
510






511
512
513
514
515
516
517
518
519
520
521
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key246">url</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_import_json.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::import::json - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::import::json - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::import::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::import::json(n) 0.2.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::import::json - JSON import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">JSON notation of keyword indices</a></li>
<li class="doctools_section"><a href="#section4">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">doctools::idx::import::json <span class="opt">?0.2.1?</span></b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index import plugin for
the parsing of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_import.html">doctools::idx::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_import.html">doctools::idx::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as JSON
markup encoding a keyword index, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that keyword index, in the form specified
in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>.</p></dd>
</dl>
</div>







|

|

|



|
|
|
|
|
|


|




















|
|




|


















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::import::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::import::json(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::import::json - JSON import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">JSON notation of keyword indices</a></li>
<li class="doctools_section"><a href="#section4">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::import::json <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index import plugin for
the parsing of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_import.html">doctools::idx::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_import.html">doctools::idx::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as JSON
markup encoding a keyword index, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that keyword index, in the form specified
in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>.</p></dd>
</dl>
</div>
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#json">JSON</a>, <a href="../../../../index.html#deserialization">deserialization</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#import">import</a>, <a href="../../../../index.html#index">index</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


279
280
281
282
283
284
285






286
287
288
289
290
291
292
293
294
295
296
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key182">index</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_introduction.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools2idx_introduction - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools2idx_introduction - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'idx_introduction.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools2idx_introduction.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools2idx_introduction(n) 2.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools2idx_introduction - DocTools - Keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Related formats</a></li>
<li class="doctools_section"><a href="#section3">Package Overview</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#docidx">docidx</a></i> (short for <em>documentation indices</em>) stands for a
set of related, yet different, entities which are working together for
the easy creation and transformation of keyword indices for
documentation.</p>
<p>These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a keyword index.
Markup is represented by Tcl commands.







|

|

|



|
|
|
|
|
|




















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'idx_introduction.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools2idx_introduction.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools2idx_introduction(n) 2.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools2idx_introduction - DocTools - Keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Related formats</a></li>
<li class="doctools_section"><a href="#section3">Package Overview</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key178">docidx</a></i> (short for <em>documentation indices</em>) stands for a
set of related, yet different, entities which are working together for
the easy creation and transformation of keyword indices for
documentation.</p>
<p>These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a keyword index.
Markup is represented by Tcl commands.
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of docidx when handling directories of documentation,
automatically generating a proper keyword index for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#docidx">docidx</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose docidx to the
user. At the bottom level, common to both applications, however we
find the three packages providing the basic facilities to handle
keyword indices, i.e. import from textual formats, programmatic
manipulation in memory, and export to textual formats. These are</p>







|







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of docidx when handling directories of documentation,
automatically generating a proper keyword index for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#key178">docidx</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose docidx to the
user. At the bottom level, common to both applications, however we
find the three packages providing the basic facilities to handle
keyword indices, i.e. import from textual formats, programmatic
manipulation in memory, and export to textual formats. These are</p>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<li><p><b class="package"><a href="idx_export.html">doctools::idx::export</a></b></p></li>
</ul>
</li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Related formats</a></h2>
<p>The docidx format does not stand alone, it has two companion formats.
These are called <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i> and <i class="term"><a href="../../../../index.html#doctools">doctools</a></i>, and they are
intended for the markup of <i class="term">tables of contents</i>, and of general
documentation, respectively.
They are described in their own sets of documents, starting at
the <i class="term">DocTools - Tables Of Contents</i> and
the <i class="term">DocTools - General</i>, respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Package Overview</a></h2>
<pre class="doctools_example">
                                    ~~~~~~~~~~~ doctools::idx ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::idx::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::idx::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
struct::map             =                         |     |    |                  =       doctools::include       struct::map      fileutil::paths
                        |                         |     |    |                  |
                doctools::idx::export::&lt;*&gt;        |     |    |          doctools::idx::import::&lt;*&gt;
                        docidx                    |     |    |                  docidx, json
                        json                      |     |    |                  |           \
                        html                      |     |    |          doctools::idx::parse \
                        nroff                     |     |    |                  |             \
                        wiki                      |     |    |  +---------------+              json
                        text                      |     |    |  |               |
                                                doctools::idx::structure        |
                                                                                |
                                                                        +-------+---------------+
                                                                        |                       |
          doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat        







|














|



|
|
|







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<li><p><b class="package"><a href="idx_export.html">doctools::idx::export</a></b></p></li>
</ul>
</li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Related formats</a></h2>
<p>The docidx format does not stand alone, it has two companion formats.
These are called <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> and <i class="term"><a href="../../../../index.html#key179">doctools</a></i>, and they are
intended for the markup of <i class="term">tables of contents</i>, and of general
documentation, respectively.
They are described in their own sets of documents, starting at
the <i class="term">DocTools - Tables Of Contents</i> and
the <i class="term">DocTools - General</i>, respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Package Overview</a></h2>
<pre class="doctools_example">
                                    ~~~~~~~~~~~ doctools::idx ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::idx::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::idx::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
doctools::config        =                         |     |    |                  =       doctools::include       doctools::config doctools::paths
                        |                         |     |    |                  |
                doctools::idx::export::&lt;*&gt;        |     |    |          doctools::idx::import::&lt;*&gt;
                        docidx                    |     |    |                  docidx, json
                        json                      |     |    |                  |           \\
                        html                      |     |    |          doctools::idx::parse \\
                        nroff                     |     |    |                  |             \\
                        wiki                      |     |    |  +---------------+              json
                        text                      |     |    |  |               |
                                                doctools::idx::structure        |
                                                                                |
                                                                        +-------+---------------+
                                                                        |                       |
          doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat        
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../doctools/docidx_intro.html">docidx_intro</a>, <a href="../doctools/doctoc_intro.html">doctoc_intro</a>, <a href="../doctools/doctools.html">doctools</a>, doctools2doc_introduction, <a href="../doctools2toc/toc_introduction.html">doctools2toc_introduction</a>, <a href="../doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="../doctools/doctools_lang_faq.html">doctools_lang_faq</a>, <a href="../doctools/doctools_lang_intro.html">doctools_lang_intro</a>, <a href="../doctools/doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="../doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#index">index</a>, <a href="../../../../index.html#keyword_index">keyword index</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








240
241
242
243
244
245
246






247
248
249
250
251
252
253
254
255
256
257
258
259
260
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../doctools/docidx_intro.html">docidx_intro</a>, <a href="../doctools/doctoc_intro.html">doctoc_intro</a>, <a href="../doctools/doctools.html">doctools</a>, doctools2doc_introduction, <a href="../doctools2toc/toc_introduction.html">doctools2toc_introduction</a>, <a href="../doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="../doctools/doctools_lang_faq.html">doctools_lang_faq</a>, <a href="../doctools/doctools_lang_intro.html">doctools_lang_intro</a>, <a href="../doctools/doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="../doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key182">index</a>, <a href="../../../../index.html#key184">keyword index</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key136">semantic markup</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_msgcat_c.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::msgcat::idx::c - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::msgcat::idx::c - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::msgcat::idx::c.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::c(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::c - Message catalog for the docidx parser (C)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::msgcat::idx::c.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::c(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::c - Message catalog for the docidx parser (C)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#c">C</a>, <a href="../../../../index.html#catalog_package">catalog package</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#i18n">i18n</a>, <a href="../../../../index.html#internationalization">internationalization</a>, <a href="../../../../index.html#l10n">l10n</a>, <a href="../../../../index.html#localization">localization</a>, <a href="../../../../index.html#message_catalog">message catalog</a>, <a href="../../../../index.html#message_package">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








157
158
159
160
161
162
163






164
165
166
167
168
169
170
171
172
173
174
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key290">C</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_msgcat_de.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::msgcat::idx::de - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::msgcat::idx::de - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::msgcat::idx::de.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::de(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::de - Message catalog for the docidx parser (DE)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::msgcat::idx::de.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::de(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::de - Message catalog for the docidx parser (DE)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#de">DE</a>, <a href="../../../../index.html#catalog_package">catalog package</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#i18n">i18n</a>, <a href="../../../../index.html#internationalization">internationalization</a>, <a href="../../../../index.html#l10n">l10n</a>, <a href="../../../../index.html#localization">localization</a>, <a href="../../../../index.html#message_catalog">message catalog</a>, <a href="../../../../index.html#message_package">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








157
158
159
160
161
162
163






164
165
166
167
168
169
170
171
172
173
174
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key639">DE</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_msgcat_en.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::msgcat::idx::en - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::msgcat::idx::en - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::msgcat::idx::en.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::en(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::en - Message catalog for the docidx parser (EN)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::msgcat::idx::en.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::en(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::en - Message catalog for the docidx parser (EN)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#en">EN</a>, <a href="../../../../index.html#catalog_package">catalog package</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#i18n">i18n</a>, <a href="../../../../index.html#internationalization">internationalization</a>, <a href="../../../../index.html#l10n">l10n</a>, <a href="../../../../index.html#localization">localization</a>, <a href="../../../../index.html#message_catalog">message catalog</a>, <a href="../../../../index.html#message_package">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








157
158
159
160
161
162
163






164
165
166
167
168
169
170
171
172
173
174
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key549">EN</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_msgcat_fr.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::msgcat::idx::fr - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::msgcat::idx::fr - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::msgcat::idx::fr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::fr(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::fr - Message catalog for the docidx parser (FR)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::msgcat::idx::fr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::idx::fr(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::idx::fr - Message catalog for the docidx parser (FR)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#fr">FR</a>, <a href="../../../../index.html#catalog_package">catalog package</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#i18n">i18n</a>, <a href="../../../../index.html#internationalization">internationalization</a>, <a href="../../../../index.html#l10n">l10n</a>, <a href="../../../../index.html#localization">localization</a>, <a href="../../../../index.html#message_catalog">message catalog</a>, <a href="../../../../index.html#message_package">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








157
158
159
160
161
162
163






164
165
166
167
168
169
170
171
172
173
174
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key170">FR</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_parse.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::parse - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::parse - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'idx_parse.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::parse.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::parse(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::parse - Parsing text in docidx format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'idx_parse.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::parse.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::parse(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::parse - Parsing text in docidx format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<li><a href="#9"><b class="cmd">::doctools::idx::parse</b> <b class="method">var unset</b> <i class="arg">name</i></a></li>
<li><a href="#10"><b class="cmd">::doctools::idx::parse</b> <b class="method">var clear</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to parse text written in the
<i class="term"><a href="../../../../index.html#docidx">docidx</a></i> markup language and convert it into the canonical
serialization of the keyword index encoded in the text.
See the section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span> for
specification of their format.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling <i class="term"><a href="../../../../index.html#docidx">docidx</a></i> documents.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::parse</b> <b class="method">text</b> <i class="arg">text</i></a></dt>
<dd><p>The command takes the string contained in <i class="arg">text</i> and parses it
under the assumption that it contains a document written using the
<i class="term"><a href="../../../../index.html#docidx">docidx</a></i> markup language. An error is thrown if this assumption
is found to be false. The format of these errors is described in
section <span class="sectref"><a href="#section3">Parse errors</a></span>.</p>
<p>When successful the command returns the canonical serialization of the
keyword index which was encoded in the text.
See the section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span> for
specification of that format.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::idx::parse</b> <b class="method">file</b> <i class="arg">path</i></a></dt>







|




|






|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<li><a href="#9"><b class="cmd">::doctools::idx::parse</b> <b class="method">var unset</b> <i class="arg">name</i></a></li>
<li><a href="#10"><b class="cmd">::doctools::idx::parse</b> <b class="method">var clear</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to parse text written in the
<i class="term"><a href="../../../../index.html#key178">docidx</a></i> markup language and convert it into the canonical
serialization of the keyword index encoded in the text.
See the section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span> for
specification of their format.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling <i class="term"><a href="../../../../index.html#key178">docidx</a></i> documents.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::parse</b> <b class="method">text</b> <i class="arg">text</i></a></dt>
<dd><p>The command takes the string contained in <i class="arg">text</i> and parses it
under the assumption that it contains a document written using the
<i class="term"><a href="../../../../index.html#key178">docidx</a></i> markup language. An error is thrown if this assumption
is found to be false. The format of these errors is described in
section <span class="sectref"><a href="#section3">Parse errors</a></span>.</p>
<p>When successful the command returns the canonical serialization of the
keyword index which was encoded in the text.
See the section <span class="sectref"><a href="#section5">Keyword index serialization format</a></span> for
specification of that format.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::idx::parse</b> <b class="method">file</b> <i class="arg">path</i></a></dt>
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
during processing. The method returns the empty string as its result.</p>
<p>The pattern matching is done with <b class="cmd">string match</b>, and the
default pattern used when none is specified, is <b class="const">*</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Parse errors</a></h2>
<p>The format of the parse error messages thrown when encountering
violations of the <i class="term"><a href="../../../../index.html#docidx">docidx</a></i> markup syntax is human readable and
not intended for processing by machines. As such it is not documented.</p>
<p><em>However</em>, the errorCode attached to the message is
machine-readable and has the following format:</p>
<ol class="doctools_enumerated">
<li><p>The error code will be a list, each element describing a single error
found in the input. The list has at least one element, possibly more.</p></li>
<li><p>Each error element will be a list containing six strings describing an
error in detail. The strings will be</p>
<ol class="doctools_enumerated">
<li><p>The path of the file the error occurred in. This may be empty.</p></li>
<li><p>The range of the token the error was found at. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file). Offsets
are counted from zero.</p></li>
<li><p>The line the first character after the error is on.
Lines are counted from one.</p></li>
<li><p>The column the first character after the error is at.







|









|







213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
during processing. The method returns the empty string as its result.</p>
<p>The pattern matching is done with <b class="cmd">string match</b>, and the
default pattern used when none is specified, is <b class="const">*</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Parse errors</a></h2>
<p>The format of the parse error messages thrown when encountering
violations of the <i class="term"><a href="../../../../index.html#key178">docidx</a></i> markup syntax is human readable and
not intended for processing by machines. As such it is not documented.</p>
<p><em>However</em>, the errorCode attached to the message is
machine-readable and has the following format:</p>
<ol class="doctools_enumerated">
<li><p>The error code will be a list, each element describing a single error
found in the input. The list has at least one element, possibly more.</p></li>
<li><p>Each error element will be a list containing six strings describing an
error in detail. The strings will be</p>
<ol class="doctools_enumerated">
<li><p>The path of the file the error occured in. This may be empty.</p></li>
<li><p>The range of the token the error was found at. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file). Offsets
are counted from zero.</p></li>
<li><p>The line the first character after the error is on.
Lines are counted from one.</p></li>
<li><p>The column the first character after the error is at.
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#lexer">lexer</a>, <a href="../../../../index.html#parser">parser</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








333
334
335
336
337
338
339






340
341
342
343
344
345
346
347
348
349
350
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key257">lexer</a>, <a href="../../../../index.html#key9">parser</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/idx_structure.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::structure - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::structure - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'idx_structure.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::structure.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::structure(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::structure - Docidx serialization utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'idx_structure.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::structure.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::structure(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::structure - Docidx serialization utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to work with the serializations of
keyword indices as managed by the doctools system v2, and specified in
section <span class="sectref"><a href="#section3">Keyword index serialization format</a></span>.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling keyword indices and their conversion into and out of
various other formats, like documents written using <i class="term"><a href="../../../../index.html#docidx">docidx</a></i>
markup.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::structure</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of a keyword index and will throw an







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to work with the serializations of
keyword indices as managed by the doctools system v2, and specified in
section <span class="sectref"><a href="#section3">Keyword index serialization format</a></span>.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling keyword indices and their conversion into and out of
various other formats, like documents written using <i class="term"><a href="../../../../index.html#key178">docidx</a></i>
markup.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::idx::structure</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of a keyword index and will throw an
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#deserialization">deserialization</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#serialization">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








274
275
276
277
278
279
280






281
282
283
284
285
286
287
288
289
290
291
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2idx/import_docidx.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::idx::import::docidx - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::idx::import::docidx - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::idx::import::docidx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::import::docidx(n) 0.2.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::import::docidx - docidx import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">[docidx] notation of keyword indices</a></li>
<li class="doctools_section"><a href="#section4">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">doctools::idx::import::docidx <span class="opt">?0.2.1?</span></b></li>
<li>package require <b class="pkgname">doctools::idx::parse</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">doctools::msgcat</b></li>
<li>package require <b class="pkgname">doctools::tcl::parse</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">struct::stack</b></li>
<li>package require <b class="pkgname">struct::tree</b></li>
<li>package require <b class="pkgname">treeql</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index import plugin for
the parsing of docidx markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_import.html">doctools::idx::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_import.html">doctools::idx::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as docidx
markup encoding a keyword index, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that keyword index, in the form specified
in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>.</p></dd>
</dl>
</div>







|

|

|



|
|
|
|
|
|


|




















|
|














|


















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::idx::import::docidx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::idx::import::docidx(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::idx::import::docidx - docidx import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">[docidx] notation of keyword indices</a></li>
<li class="doctools_section"><a href="#section4">Keyword index serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::idx::import::docidx <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::idx::parse</b></li>
<li>package require <b class="pkgname">doctools::idx::structure</b></li>
<li>package require <b class="pkgname">doctools::msgcat</b></li>
<li>package require <b class="pkgname">doctools::tcl::parse</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">struct::stack</b></li>
<li>package require <b class="pkgname">struct::tree</b></li>
<li>package require <b class="pkgname">treeql</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools keyword index import plugin for
the parsing of docidx markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling keyword indices, especially <b class="package"><a href="idx_import.html">doctools::idx::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="idx_import.html">doctools::idx::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
docidx import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as docidx
markup encoding a keyword index, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that keyword index, in the form specified
in section <span class="sectref"><a href="#section4">Keyword index serialization format</a></span>.</p></dd>
</dl>
</div>
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#type">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the







|



|

|







223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
this order.</p>
<p>Any key here has to be associated with at least one keyword,
i.e. occur in at least one of the reference lists which are the values
in the <b class="const">keywords</b> dictionary, see previous item for its
definition.</p></dd>
</dl>
</li>
<li><p>The <i class="term"><a href="../../../../index.html#key117">type</a></i> of a reference can be one of two values,</p>
<dl class="doctools_definitions">
<dt><b class="const">manpage</b></dt>
<dd><p>The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.</p></dd>
<dt><b class="const">url</b></dt>
<dd><p>The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.</p></dd>
</dl>
</li>
</ol></dd>
<dt>canonical serialization</dt>
<dd><p>The canonical serialization of a keyword index has the format as
specified in the previous item, and then additionally satisfies the
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#deserialization">deserialization</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#import">import</a>, <a href="../../../../index.html#index">index</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


256
257
258
259
260
261
262






263
264
265
266
267
268
269
270
271
272
273
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key182">index</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/export_doctoc.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::export::doctoc - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::export::doctoc - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::export::doctoc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::doctoc(n) 0.2.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::doctoc - doctoc export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::export::doctoc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::doctoc(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::doctoc - doctoc export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::doctoc <span class="opt">?0.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of doctoc markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section5">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates doctoc markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


|


















|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::doctoc <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of doctoc markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section5">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates doctoc markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


310
311
312
313
314
315
316






317
318
319
320
321
322
323
324
325
326
327
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/import_doctoc.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::import::doctoc - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::import::doctoc - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::import::doctoc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::import::doctoc(n) 0.2.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::import::doctoc - doctoc import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">[doctoc] notation of tables of contents</a></li>
<li class="doctools_section"><a href="#section4">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">doctools::toc::import::doctoc <span class="opt">?0.2.1?</span></b></li>
<li>package require <b class="pkgname">doctools::toc::parse</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">doctools::msgcat</b></li>
<li>package require <b class="pkgname">doctools::tcl::parse</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">struct::stack</b></li>
<li>package require <b class="pkgname">struct::tree</b></li>
<li>package require <b class="pkgname">treeql</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents import plugin
for the parsing of doctoc markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_import.html">doctools::toc::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_import.html">doctools::toc::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as doctoc
markup encoding a table of contents, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that table of contents, in the form
specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>.</p></dd>
</dl>
</div>







|

|

|



|
|
|
|
|
|


|




















|
|














|


















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::import::doctoc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::import::doctoc(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::import::doctoc - doctoc import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">[doctoc] notation of tables of contents</a></li>
<li class="doctools_section"><a href="#section4">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::import::doctoc <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::toc::parse</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">doctools::msgcat</b></li>
<li>package require <b class="pkgname">doctools::tcl::parse</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">logger</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::list</b></li>
<li>package require <b class="pkgname">struct::set</b></li>
<li>package require <b class="pkgname">struct::stack</b></li>
<li>package require <b class="pkgname">struct::tree</b></li>
<li>package require <b class="pkgname">treeql</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents import plugin
for the parsing of doctoc markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_import.html">doctools::toc::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_import.html">doctools::toc::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as doctoc
markup encoding a table of contents, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that table of contents, in the form
specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>.</p></dd>
</dl>
</div>
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#deserialization">deserialization</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#import">import</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


280
281
282
283
284
285
286






287
288
289
290
291
292
293
294
295
296
297
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_container.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'toc_container.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc(n) 2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc - Holding tables of contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'toc_container.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc(n) 2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc - Holding tables of contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
This is the only format directly known to this class. Conversions from
and to any other format are handled by export and import manager
objects. These may be attached to a container, but do not have to be,
it is merely a convenience.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#table_of_contents">table of contents</a></i> consists of a (possibly empty) list of
<i class="term">elements</i>.</p></li>
<li><p>Each element in the list is identified by its label.</p></li>
<li><p>Each element is either a <i class="term"><a href="../../../../index.html#reference">reference</a></i>, or a <i class="term">division</i>.</p></li>
<li><p>Each reference has an associated document, identified by a symbolic
id, and a textual description.</p></li>
<li><p>Each division may have an associated document, identified by a
symbolic id.</p></li>
<li><p>Each division consists consists of a (possibly empty) list of
<i class="term">elements</i>, with each element following the rules as specified in
item 2 and above.</p></li>







|


|







190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
This is the only format directly known to this class. Conversions from
and to any other format are handled by export and import manager
objects. These may be attached to a container, but do not have to be,
it is merely a convenience.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key157">table of contents</a></i> consists of a (possibly empty) list of
<i class="term">elements</i>.</p></li>
<li><p>Each element in the list is identified by its label.</p></li>
<li><p>Each element is either a <i class="term"><a href="../../../../index.html#key251">reference</a></i>, or a <i class="term">division</i>.</p></li>
<li><p>Each reference has an associated document, identified by a symbolic
id, and a textual description.</p></li>
<li><p>Each division may have an associated document, identified by a
symbolic id.</p></li>
<li><p>Each division consists consists of a (possibly empty) list of
<i class="term">elements</i>, with each element following the rules as specified in
item 2 and above.</p></li>
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new container object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>







|







218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new container object with an associated Tcl
command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is
explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
If the element is a division all of its children, if any, are removed
as well. The root element/division of the table of contents cannot be
removed however, only its children.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">up</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns the handle of the parent for the element
identified by its handle <i class="arg">id</i>, or the empty string if <i class="arg">id</i>
referred to the root element.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">next</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns the handle of the right sibling for the element
identified by its handle <i class="arg">id</i>, or the handle of the parent if the
element has no right sibling, or the empty string if <i class="arg">id</i> referred
to the root element.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">prev</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns the handle of the left sibling for the element
identified by its handle <i class="arg">id</i>, or the handle of the parent if the
element has no left sibling, or the empty string if <i class="arg">id</i> referred
to the root element.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">child</b> <i class="arg">id</i> <i class="arg">label</i> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>This method returns the handle of a child of the element identified by
its handle <i class="arg">id</i>. The child itself is identified by a series of
labels.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">element</b> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>This method returns the handle of the element identified by a series







|



|




|







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
If the element is a division all of its children, if any, are removed
as well. The root element/division of the table of contents cannot be
removed however, only its children.</p>
<p>The result of the method is the empty string.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">up</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns the handle of the parent for the element
identified by its handle <i class="arg">id</i>, or the empty string if <i class="arg">id</i>
refered to the root element.</p></dd>
<dt><a name="8"><i class="arg">objectName</i> <b class="method">next</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns the handle of the right sibling for the element
identified by its handle <i class="arg">id</i>, or the handle of the parent if the
element has no right sibling, or the empty string if <i class="arg">id</i> refered
to the root element.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">prev</b> <i class="arg">id</i></a></dt>
<dd><p>This method returns the handle of the left sibling for the element
identified by its handle <i class="arg">id</i>, or the handle of the parent if the
element has no left sibling, or the empty string if <i class="arg">id</i> refered
to the root element.</p></dd>
<dt><a name="10"><i class="arg">objectName</i> <b class="method">child</b> <i class="arg">id</i> <i class="arg">label</i> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>This method returns the handle of a child of the element identified by
its handle <i class="arg">id</i>. The child itself is identified by a series of
labels.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">element</b> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>This method returns the handle of the element identified by a series
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#tmml">TMML</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#doctoc_markup">doctoc markup</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#generation">generation</a>, <a href="../../../../index.html#json">json</a>, <a href="../../../../index.html#latex">latex</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#nroff">nroff</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#reference">reference</a>, <a href="../../../../index.html#table">table</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#tcler_s_wiki">tcler's wiki</a>, <a href="../../../../index.html#text">text</a>, <a href="../../../../index.html#wiki">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








496
497
498
499
500
501
502






503
504
505
506
507
508
509
510
511
512
513
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key387">doctoc markup</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key250">generation</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key186">latex</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key106">table</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key245">tcler's wiki</a>, <a href="../../../../index.html#key248">text</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_export.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::export - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::export - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'toc_export.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::export.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export(n) 0.2.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export - Exporting tables of contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'toc_export.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::export.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export - Exporting tables of contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::toc::export <span class="opt">?0.2.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::map</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::export</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">config names</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">config get</b></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#10"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the export of
tables of contents to other formats, i.e. their conversion to, for
example <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i>, <i class="term"><a href="../../../../index.html#html">HTML</a></i>, etc.</p>
<p>This is one of the three public pillars the management of tables of
contents resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term">Importing tables of contents</i>, and</p></li>
<li><p><i class="term"><a href="toc_container.html">Holding tables of contents</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of tables of contents,







|

|














|






|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::toc::export <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::config</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::export</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#6"><i class="arg">objectName</i> <b class="method">config names</b></a></li>
<li><a href="#7"><i class="arg">objectName</i> <b class="method">config get</b></a></li>
<li><a href="#8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#10"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the export of
tables of contents to other formats, i.e. their conversion to, for
example <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>, <i class="term"><a href="../../../../index.html#key18">HTML</a></i>, etc.</p>
<p>This is one of the three public pillars the management of tables of
contents resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term">Importing tables of contents</i>, and</p></li>
<li><p><i class="term"><a href="toc_container.html">Holding tables of contents</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of tables of contents,
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Export plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#table_of_contents">table of contents</a></i> consists of a (possibly empty) list of
<i class="term">elements</i>.</p></li>
<li><p>Each element in the list is identified by its label.</p></li>
<li><p>Each element is either a <i class="term"><a href="../../../../index.html#reference">reference</a></i>, or a <i class="term">division</i>.</p></li>
<li><p>Each reference has an associated document, identified by a symbolic
id, and a textual description.</p></li>
<li><p>Each division may have an associated document, identified by a
symbolic id.</p></li>
<li><p>Each division consists consists of a (possibly empty) list of
<i class="term">elements</i>, with each element following the rules as specified in
item 2 and above.</p></li>







|


|







210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Export plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key157">table of contents</a></i> consists of a (possibly empty) list of
<i class="term">elements</i>.</p></li>
<li><p>Each element in the list is identified by its label.</p></li>
<li><p>Each element is either a <i class="term"><a href="../../../../index.html#key251">reference</a></i>, or a <i class="term">division</i>.</p></li>
<li><p>Each reference has an associated document, identified by a symbolic
id, and a textual description.</p></li>
<li><p>Each division may have an associated document, identified by a
symbolic id.</p></li>
<li><p>Each division consists consists of a (possibly empty) list of
<i class="term">elements</i>, with each element following the rules as specified in
item 2 and above.</p></li>
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::export</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new export manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>







|







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::export</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new export manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<dt><a name="8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overridden when invoking an
import plugin.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
</dl>
</div>







|







293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<dt><a name="8"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.</p></dd>
<dt><a name="9"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
</dl>
</div>
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
       format.</p></li>
<li><p>The plugin can expect that the package
       <b class="package">doctools::toc::export::plugin</b> is present, as
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="10"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an export manager of <b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b> has to generate
output for a table of contents it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">serial</i></dt>
<dd><p>This argument will contain the <i class="term">canonical</i> serialization of the
table of contents for which to generate the output.
The specification of what a <i class="term">canonical</i> serialization is can be







|







323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
       format.</p></li>
<li><p>The plugin can expect that the package
       <b class="package">doctools::toc::export::plugin</b> is present, as
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="10"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an export manager of <b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b> has to generate
output for a table of contents it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">serial</i></dt>
<dd><p>This argument will contain the <i class="term">canonical</i> serialization of the
table of contents for which to generate the output.
The specification of what a <i class="term">canonical</i> serialization is can be
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
          urls). A plugin has to be able to handle the possibility
          that a document id is without entry in this mapping.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#export">export</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>







|







361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
          urls). A plugin has to be able to handle the possibility
          that a document id is without entry in this mapping.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#key260">export</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#generation">generation</a>, <a href="../../../../index.html#json">json</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#nroff">nroff</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#reference">reference</a>, <a href="../../../../index.html#table">table</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#tcler_s_wiki">tcler's wiki</a>, <a href="../../../../index.html#text">text</a>, <a href="../../../../index.html#url">url</a>, <a href="../../../../index.html#wiki">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


461
462
463
464
465
466
467






468
469
470
471
472
473
474
475
476
477
478
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key250">generation</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key106">table</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key245">tcler's wiki</a>, <a href="../../../../index.html#key248">text</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_export_html.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::export::html - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::export::html - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::export::html.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::html(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::html - HTML export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::export::html.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::html(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::html - HTML export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::html <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::html</b></li>
<li>package require <b class="pkgname">doctools::html::cssdefaults</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of HTML markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates HTML markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


















|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::html <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::html</b></li>
<li>package require <b class="pkgname">doctools::html::cssdefaults</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of HTML markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates HTML markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


343
344
345
346
347
348
349






350
351
352
353
354
355
356
357
358
359
360
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_export_json.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::export::json - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::export::json - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::export::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::json(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::json - JSON export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::export::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::json(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::json - JSON export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::json <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">textutil::adjust</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section5">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates JSON markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


















|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::json <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">textutil::adjust</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section5">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates JSON markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#json">JSON</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


346
347
348
349
350
351
352






353
354
355
356
357
358
359
360
361
362
363
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_export_nroff.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::export::nroff - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::export::nroff - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::export::nroff.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::nroff(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::nroff - nroff export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::export::nroff.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::nroff(n) 0.2 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::nroff - nroff export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::nroff <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::nroff::man_macros</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of nroff markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates nroff markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


















|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::nroff <span class="opt">?0.2?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
<li>package require <b class="pkgname">doctools::nroff::man_macros</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of nroff markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates nroff markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#nroff">nroff</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


280
281
282
283
284
285
286






287
288
289
290
291
292
293
294
295
296
297
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key21">nroff</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_export_text.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::export::text - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::export::text - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::export::text.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::text(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::text - plain text export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::export::text.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::text(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::text - plain text export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::text <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of plain text markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates plain text markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


















|







130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::text <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of plain text markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates plain text markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#plain_text">plain text</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


266
267
268
269
270
271
272






273
274
275
276
277
278
279
280
281
282
283
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key545">plain text</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_export_wiki.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::export::wiki - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::export::wiki - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::export::wiki.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::wiki(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::wiki - wiki export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::export::wiki.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::export::wiki(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::export::wiki - wiki export plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::wiki <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of wiki markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section5">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates wiki markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|


















|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::export::wiki <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::text</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents export plugin
for the generation of wiki markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_export.html">doctools::toc::export</a></b>, the export manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_export.html">doctools::toc::export</a></b> and the export manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc export plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a table of contents,
as specified in section <span class="sectref"><a href="#section5">ToC serialization format</a></span>, and
contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary, and
generates wiki markup encoding the table.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a>, <a href="../../../../index.html#wiki">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


273
274
275
276
277
278
279






280
281
282
283
284
285
286
287
288
289
290
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a>, <a href="../../../../index.html#key183">wiki</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_import.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::import - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::import - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'toc_import.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::import.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::import(n) 0.2.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::import - Importing keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'toc_import.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::import.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::import(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::import - Importing keyword indices</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::toc::import <span class="opt">?0.2.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::map</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::import</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>







|

|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">doctools::toc::import <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::config</b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::doctools::toc::import</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<li><a href="#10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">includes</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">include add</b> <i class="arg">path</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">include remove</b> <i class="arg">path</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">include clear</b></a></li>
<li><a href="#16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the import of
tables of contents from other formats, i.e. their conversion from, for
example <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i>, <i class="term"><a href="../../../../index.html#json">json</a></i>, etc.</p>
<p>This is one of the three public pillars the management of tables of
contents resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="toc_export.html">Exporting tables of contents</a></i>, and</p></li>
<li><p><i class="term"><a href="toc_container.html">Holding tables of contents</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of tables of contents,







|






|







156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<li><a href="#10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></li>
<li><a href="#12"><i class="arg">objectName</i> <b class="method">includes</b></a></li>
<li><a href="#13"><i class="arg">objectName</i> <b class="method">include add</b> <i class="arg">path</i></a></li>
<li><a href="#14"><i class="arg">objectName</i> <b class="method">include remove</b> <i class="arg">path</i></a></li>
<li><a href="#15"><i class="arg">objectName</i> <b class="method">include clear</b></a></li>
<li><a href="#16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class to manage the plugins for the import of
tables of contents from other formats, i.e. their conversion from, for
example <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>, <i class="term"><a href="../../../../index.html#key206">json</a></i>, etc.</p>
<p>This is one of the three public pillars the management of tables of
contents resides on. The other two pillars are</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="toc_export.html">Exporting tables of contents</a></i>, and</p></li>
<li><p><i class="term"><a href="toc_container.html">Holding tables of contents</a></i></p></li>
</ol>
<p>For information about the <span class="sectref"><a href="#section2">Concepts</a></span> of tables of contents,
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Import plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#table_of_contents">table of contents</a></i> consists of a (possibly empty) list of
<i class="term">elements</i>.</p></li>
<li><p>Each element in the list is identified by its label.</p></li>
<li><p>Each element is either a <i class="term"><a href="../../../../index.html#reference">reference</a></i>, or a <i class="term">division</i>.</p></li>
<li><p>Each reference has an associated document, identified by a symbolic
id, and a textual description.</p></li>
<li><p>Each division may have an associated document, identified by a
symbolic id.</p></li>
<li><p>Each division consists consists of a (possibly empty) list of
<i class="term">elements</i>, with each element following the rules as specified in
item 2 and above.</p></li>







|


|







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<i class="term">plugin writer</i>s reading and understanding the section
containing the <span class="sectref"><a href="#section4">Import plugin API v2 reference</a></span> is an
absolute necessity, as it specifies the interaction between this
package and its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Concepts</a></h2>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key157">table of contents</a></i> consists of a (possibly empty) list of
<i class="term">elements</i>.</p></li>
<li><p>Each element in the list is identified by its label.</p></li>
<li><p>Each element is either a <i class="term"><a href="../../../../index.html#key251">reference</a></i>, or a <i class="term">division</i>.</p></li>
<li><p>Each reference has an associated document, identified by a symbolic
id, and a textual description.</p></li>
<li><p>Each division may have an associated document, identified by a
symbolic id.</p></li>
<li><p>Each division consists consists of a (possibly empty) list of
<i class="term">elements</i>, with each element following the rules as specified in
item 2 and above.</p></li>
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::import</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new import manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>







|







237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
</ol>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::import</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new import manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<dt><a name="10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overridden when invoking an
import plugin.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">includes</b></a></dt>
<dd><p>This method returns a list containing the currently specified paths to







|







303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<dt><a name="10"><i class="arg">objectName</i> <b class="method">config set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>This method sets the configuration variable <i class="arg">name</i> to the
specified <i class="arg">value</i> and returns the new value of the variable.</p>
<p>If no value is specified it simply returns the current value, without
changing it.</p>
<p>Note that while the user can set the predefined configuration
variables <b class="const">user</b> and <b class="const">format</b> doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.</p></dd>
<dt><a name="11"><i class="arg">objectName</i> <b class="method">config unset</b> <i class="arg">pattern</i>...</a></dt>
<dd><p>This method unsets all configuration variables matching the specified
glob <i class="arg">pattern</i>s. If no pattern is specified it will unset all
currently defined configuration variables.</p></dd>
<dt><a name="12"><i class="arg">objectName</i> <b class="method">includes</b></a></dt>
<dd><p>This method returns a list containing the currently specified paths to
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>The plugin can expect that a command named <b class="cmd">IncludeFile</b> is
       present, with the signature</p>
<dl class="doctools_definitions">
<dt><a name="16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></dt>
<dd><p>This command has to be invoked by the plugin when it has to process an
included file, if the format has the concept of such. An example of
such a format would be <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i>.</p>
<p>The plugin has to supply the following arguments</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">currentfile</i></dt>
<dd><p>The path of the file it is currently processing. This may be the empty
string if no such is known.</p></dd>
<dt>string <i class="arg">path</i></dt>
<dd><p>The path of the include file as specified in the include directive







|







357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
       indicator that it was invoked from a genuine plugin manager.</p></li>
<li><p>The plugin can expect that a command named <b class="cmd">IncludeFile</b> is
       present, with the signature</p>
<dl class="doctools_definitions">
<dt><a name="16"><b class="cmd">IncludeFile</b> <i class="arg">currentfile</i> <i class="arg">path</i></a></dt>
<dd><p>This command has to be invoked by the plugin when it has to process an
included file, if the format has the concept of such. An example of
such a format would be <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>.</p>
<p>The plugin has to supply the following arguments</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">currentfile</i></dt>
<dd><p>The path of the file it is currently processing. This may be the empty
string if no such is known.</p></dd>
<dt>string <i class="arg">path</i></dt>
<dd><p>The path of the include file as specified in the include directive
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
       for a <b class="const">notread</b> error in more detail.</p></li>
</ol></dd>
</dl>
</li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an import manager of <b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b> has to parse
input for a table of contents it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">text</i></dt>
<dd><p>This argument will contain the text encoding the table of contents per
the format the plugin is for.</p></dd>
<dt>dictionary <i class="arg">configuration</i></dt>







|







396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
       for a <b class="const">notread</b> error in more detail.</p></li>
</ol></dd>
</dl>
</li>
<li><p>A plugin has to provide one command, with the signature shown
       below.</p>
<dl class="doctools_definitions">
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i> <i class="arg">configuration</i></a></dt>
<dd><p>Whenever an import manager of <b class="package"><a href="../doctools/doctoc.html">doctools::toc</a></b> has to parse
input for a table of contents it will invoke this command.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">text</i></dt>
<dd><p>This argument will contain the text encoding the table of contents per
the format the plugin is for.</p></dd>
<dt>dictionary <i class="arg">configuration</i></dt>
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
<dd><p>This variable is expected to contain the name of the
             format whose plugin is invoked.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#import">import</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>







|







422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
<dd><p>This variable is expected to contain the name of the
             format whose plugin is invoked.</p></dd>
</dl></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of the invokations of
       the command <b class="cmd"><a href="../../../../index.html#key291">import</a></b>. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">ToC serialization format</a></h2>
<p>Here we specify the format used by the doctools v2 packages to
serialize tables of contents as immutable values for transport,
comparison, etc.</p>
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#import">import</a>, <a href="../../../../index.html#json">json</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#reference">reference</a>, <a href="../../../../index.html#table">table</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#url">url</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


522
523
524
525
526
527
528






529
530
531
532
533
534
535
536
537
538
539
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key251">reference</a>, <a href="../../../../index.html#key106">table</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key246">url</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_import_json.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::import::json - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::import::json - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::import::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::import::json(n) 0.2.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::import::json - JSON import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">JSON notation of tables of contents</a></li>
<li class="doctools_section"><a href="#section4">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">doctools::toc::import::json <span class="opt">?0.2.1?</span></b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents import plugin
for the parsing of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_import.html">doctools::toc::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_import.html">doctools::toc::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as JSON
markup encoding a table of contents, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that table of contents, in the form
specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>.</p></dd>
</dl>
</div>







|

|

|



|
|
|
|
|
|


|




















|
|




|


















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::import::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::import::json(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::import::json - JSON import plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">JSON notation of tables of contents</a></li>
<li class="doctools_section"><a href="#section4">ToC serialization format</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">doctools::toc::import::json <span class="opt">?0.1?</span></b></li>
<li>package require <b class="pkgname">doctools::toc::structure</b></li>
<li>package require <b class="pkgname">json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements the doctools table of contents import plugin
for the parsing of JSON markup.</p>
<p>This is an internal package of doctools, for use by the higher level
management packages handling tables of contents, especially <b class="package"><a href="toc_import.html">doctools::toc::import</a></b>, the import manager.</p>
<p>Using it from a regular interpreter is possible, however only with
contortions, and is not recommended.
The proper way to use this functionality is through the package
<b class="package"><a href="toc_import.html">doctools::toc::import</a></b> and the import manager objects it
provides.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
doctoc import plugin API version 2.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">string</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the <i class="arg">string</i> and parses it as JSON
markup encoding a table of contents, in the context of the specified
<i class="arg">configuration</i> (a dictionary). The result of the command is the
canonical serialization of that table of contents, in the form
specified in section <span class="sectref"><a href="#section4">ToC serialization format</a></span>.</p></dd>
</dl>
</div>
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#json">JSON</a>, <a href="../../../../index.html#deserialization">deserialization</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#import">import</a>, <a href="../../../../index.html#table_of_contents">table of contents</a>, <a href="../../../../index.html#toc">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


323
324
325
326
327
328
329






330
331
332
333
334
335
336
337
338
339
340
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key157">table of contents</a>, <a href="../../../../index.html#key156">toc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text formatter plugin</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_introduction.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools2toc_introduction - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools2toc_introduction - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'toc_introduction.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools2toc_introduction.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools2toc_introduction(n) 2.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools2toc_introduction - DocTools - Tables of Contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Related formats</a></li>
<li class="doctools_section"><a href="#section3">Package Overview</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i> (short for <em>documentation tables of contents</em>)
stands for a set of related, yet different, entities which are working
together for the easy creation and transformation of tables and
contents for documentation.</p>
<p>These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a table of contents.
Markup is represented by Tcl commands.







|

|

|



|
|
|
|
|
|




















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'toc_introduction.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools2toc_introduction.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools2toc_introduction(n) 2.0 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools2toc_introduction - DocTools - Tables of Contents</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Related formats</a></li>
<li class="doctools_section"><a href="#section3">Package Overview</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key258">doctoc</a></i> (short for <em>documentation tables of contents</em>)
stands for a set of related, yet different, entities which are working
together for the easy creation and transformation of tables and
contents for documentation.</p>
<p>These are</p>
<ol class="doctools_enumerated">
<li><p>A tcl based language for the semantic markup of a table of contents.
Markup is represented by Tcl commands.
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of doctoc when handling directories of documentation,
automatically generating a proper table of contents for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose doctoc to the
user. At the bottom level, common to both applications, however we
find the three packages providing the basic facilities to handle
tables of contents, i.e. import from textual formats, programmatic
manipulation in memory, and export to textual formats. These are</p>







|







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
time to refresh her memory.</p>
<p>While a document is written the <b class="syscmd">dtp</b> application can be used
to validate it, and after completion it also performs the conversion
into the chosen system of visual markup, be it *roff, HTML, plain
text, wiki, etc. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> application makes
internal use of doctoc when handling directories of documentation,
automatically generating a proper table of contents for them.</p></li>
<li><p>A <i class="term">processor</i> of documentation written in the <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>
markup language has to know which tools are available for use.</p>
<p>The main tool is the aforementioned <b class="syscmd">dtp</b> application provided
by Tcllib. The simpler <b class="syscmd"><a href="../dtplite/pkg_dtplite.html">dtplite</a></b> does not expose doctoc to the
user. At the bottom level, common to both applications, however we
find the three packages providing the basic facilities to handle
tables of contents, i.e. import from textual formats, programmatic
manipulation in memory, and export to textual formats. These are</p>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<li><p><b class="package">doctoools::toc::export</b></p></li>
</ul>
</li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Related formats</a></h2>
<p>The doctoc format does not stand alone, it has two companion formats.
These are called <i class="term"><a href="../../../../index.html#docidx">docidx</a></i> and <i class="term"><a href="../../../../index.html#doctools">doctools</a></i>, and they are
intended for the markup of <i class="term">keyword indices</i>, and of general
documentation, respectively.
They are described in their own sets of documents, starting at
the <i class="term">DocTools - Keyword Indices</i> and
the <i class="term">DocTools - General</i>, respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Package Overview</a></h2>
<pre class="doctools_example">
                                    ~~~~~~~~~~~ doctools::toc ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::toc::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::toc::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
struct:map              =                         |     |    |                  =       doctools::include       struct::map      fileutil::paths
                        |                         |     |    |                  |
                doctools::toc::export::&lt;*&gt;        |     |    |          doctools::toc::import::&lt;*&gt;
                        doctoc                    |     |    |                  doctoc, json
                        json                      |     |    |                  |           \
                        html                      |     |    |          doctools::toc::parse \
                        nroff                     |     |    |                  |             \
                        wiki                      |     |    |  +---------------+              json
                        text                      |     |    |  |               |
                                                doctools::toc::structure        |
                                                                                |
                                                                        +-------+---------------+
                                                                        |                       |
          doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat        







|














|



|
|
|







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<li><p><b class="package">doctoools::toc::export</b></p></li>
</ul>
</li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Related formats</a></h2>
<p>The doctoc format does not stand alone, it has two companion formats.
These are called <i class="term"><a href="../../../../index.html#key178">docidx</a></i> and <i class="term"><a href="../../../../index.html#key179">doctools</a></i>, and they are
intended for the markup of <i class="term">keyword indices</i>, and of general
documentation, respectively.
They are described in their own sets of documents, starting at
the <i class="term">DocTools - Keyword Indices</i> and
the <i class="term">DocTools - General</i>, respectively.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Package Overview</a></h2>
<pre class="doctools_example">
                                    ~~~~~~~~~~~ doctools::toc ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::toc::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::toc::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
doctools::config        =                         |     |    |                  =       doctools::include       doctools::config doctools::paths
                        |                         |     |    |                  |
                doctools::toc::export::&lt;*&gt;        |     |    |          doctools::toc::import::&lt;*&gt;
                        doctoc                    |     |    |                  doctoc, json
                        json                      |     |    |                  |           \\
                        html                      |     |    |          doctools::toc::parse \\
                        nroff                     |     |    |                  |             \\
                        wiki                      |     |    |  +---------------+              json
                        text                      |     |    |  |               |
                                                doctools::toc::structure        |
                                                                                |
                                                                        +-------+---------------+
                                                                        |                       |
          doctools::html  doctools::html::cssdefaults           doctools::tcl::parse    doctools::msgcat        
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../doctools/doctoc_intro.html">doctoc_intro</a>, <a href="../doctools/doctools.html">doctools</a>, doctools2doc_introduction, <a href="../doctools2idx/idx_introduction.html">doctools2idx_introduction</a>, <a href="../doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="../doctools/doctools_lang_faq.html">doctools_lang_faq</a>, <a href="../doctools/doctools_lang_intro.html">doctools_lang_intro</a>, <a href="../doctools/doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="../doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#contents">contents</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#semantic_markup">semantic markup</a>, <a href="../../../../index.html#table_of_contents">table of contents</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








240
241
242
243
244
245
246






247
248
249
250
251
252
253
254
255
256
257
258
259
260
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../doctools/doctoc_intro.html">doctoc_intro</a>, <a href="../doctools/doctools.html">doctools</a>, doctools2doc_introduction, <a href="../doctools2idx/idx_introduction.html">doctools2idx_introduction</a>, <a href="../doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a>, <a href="../doctools/doctools_lang_faq.html">doctools_lang_faq</a>, <a href="../doctools/doctools_lang_intro.html">doctools_lang_intro</a>, <a href="../doctools/doctools_lang_syntax.html">doctools_lang_syntax</a>, <a href="../doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key519">contents</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key136">semantic markup</a>, <a href="../../../../index.html#key157">table of contents</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_msgcat_c.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::msgcat::toc::c - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::msgcat::toc::c - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::msgcat::toc::c.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::c(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::c - Message catalog for the doctoc parser (C)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::msgcat::toc::c.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::c(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::c - Message catalog for the doctoc parser (C)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#c">C</a>, <a href="../../../../index.html#catalog_package">catalog package</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#i18n">i18n</a>, <a href="../../../../index.html#internationalization">internationalization</a>, <a href="../../../../index.html#l10n">l10n</a>, <a href="../../../../index.html#localization">localization</a>, <a href="../../../../index.html#message_catalog">message catalog</a>, <a href="../../../../index.html#message_package">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








157
158
159
160
161
162
163






164
165
166
167
168
169
170
171
172
173
174
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key290">C</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_msgcat_de.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::msgcat::toc::de - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::msgcat::toc::de - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::msgcat::toc::de.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::de(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::de - Message catalog for the doctoc parser (DE)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::msgcat::toc::de.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::de(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::de - Message catalog for the doctoc parser (DE)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#de">DE</a>, <a href="../../../../index.html#catalog_package">catalog package</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#i18n">i18n</a>, <a href="../../../../index.html#internationalization">internationalization</a>, <a href="../../../../index.html#l10n">l10n</a>, <a href="../../../../index.html#localization">localization</a>, <a href="../../../../index.html#message_catalog">message catalog</a>, <a href="../../../../index.html#message_package">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








157
158
159
160
161
162
163






164
165
166
167
168
169
170
171
172
173
174
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key639">DE</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_msgcat_en.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::msgcat::toc::en - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::msgcat::toc::en - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::msgcat::toc::en.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::en(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::en - Message catalog for the doctoc parser (EN)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::msgcat::toc::en.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::en(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::en - Message catalog for the doctoc parser (EN)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#en">EN</a>, <a href="../../../../index.html#catalog_package">catalog package</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#i18n">i18n</a>, <a href="../../../../index.html#internationalization">internationalization</a>, <a href="../../../../index.html#l10n">l10n</a>, <a href="../../../../index.html#localization">localization</a>, <a href="../../../../index.html#message_catalog">message catalog</a>, <a href="../../../../index.html#message_package">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








157
158
159
160
161
162
163






164
165
166
167
168
169
170
171
172
173
174
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key549">EN</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_msgcat_fr.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::msgcat::toc::fr - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::msgcat::toc::fr - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::msgcat::toc::fr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::fr(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::fr - Message catalog for the doctoc parser (FR)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'msgcat.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::msgcat::toc::fr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::msgcat::toc::fr(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::msgcat::toc::fr - Message catalog for the doctoc parser (FR)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#fr">FR</a>, <a href="../../../../index.html#catalog_package">catalog package</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#i18n">i18n</a>, <a href="../../../../index.html#internationalization">internationalization</a>, <a href="../../../../index.html#l10n">l10n</a>, <a href="../../../../index.html#localization">localization</a>, <a href="../../../../index.html#message_catalog">message catalog</a>, <a href="../../../../index.html#message_package">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








157
158
159
160
161
162
163






164
165
166
167
168
169
170
171
172
173
174
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key170">FR</a>, <a href="../../../../index.html#key176">catalog package</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key171">i18n</a>, <a href="../../../../index.html#key175">internationalization</a>, <a href="../../../../index.html#key177">l10n</a>, <a href="../../../../index.html#key174">localization</a>, <a href="../../../../index.html#key172">message catalog</a>, <a href="../../../../index.html#key173">message package</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_parse.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::parse - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::parse - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'toc_parse.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::parse.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::parse(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::parse - Parsing text in doctoc format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'toc_parse.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::parse.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::parse(n) 1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::parse - Parsing text in doctoc format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<li><a href="#9"><b class="cmd">::doctools::toc::parse</b> <b class="method">var unset</b> <i class="arg">name</i></a></li>
<li><a href="#10"><b class="cmd">::doctools::toc::parse</b> <b class="method">var clear</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to parse text written in the
<i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i> markup language and convert it into the canonical
serialization of the table of contents encoded in the text.
See the section <span class="sectref"><a href="#section5">ToC serialization format</a></span> for specification
of their format.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i> documents.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::parse</b> <b class="method">text</b> <i class="arg">text</i></a></dt>
<dd><p>The command takes the string contained in <i class="arg">text</i> and parses it
under the assumption that it contains a document written using the
<i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i> markup language. An error is thrown if this assumption
is found to be false. The format of these errors is described in
section <span class="sectref"><a href="#section3">Parse errors</a></span>.</p>
<p>When successful the command returns the canonical serialization of the
table of contents which was encoded in the text.
See the section <span class="sectref"><a href="#section5">ToC serialization format</a></span> for specification
of that format.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::toc::parse</b> <b class="method">file</b> <i class="arg">path</i></a></dt>







|




|






|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<li><a href="#9"><b class="cmd">::doctools::toc::parse</b> <b class="method">var unset</b> <i class="arg">name</i></a></li>
<li><a href="#10"><b class="cmd">::doctools::toc::parse</b> <b class="method">var clear</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to parse text written in the
<i class="term"><a href="../../../../index.html#key258">doctoc</a></i> markup language and convert it into the canonical
serialization of the table of contents encoded in the text.
See the section <span class="sectref"><a href="#section5">ToC serialization format</a></span> for specification
of their format.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> documents.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::parse</b> <b class="method">text</b> <i class="arg">text</i></a></dt>
<dd><p>The command takes the string contained in <i class="arg">text</i> and parses it
under the assumption that it contains a document written using the
<i class="term"><a href="../../../../index.html#key258">doctoc</a></i> markup language. An error is thrown if this assumption
is found to be false. The format of these errors is described in
section <span class="sectref"><a href="#section3">Parse errors</a></span>.</p>
<p>When successful the command returns the canonical serialization of the
table of contents which was encoded in the text.
See the section <span class="sectref"><a href="#section5">ToC serialization format</a></span> for specification
of that format.</p></dd>
<dt><a name="2"><b class="cmd">::doctools::toc::parse</b> <b class="method">file</b> <i class="arg">path</i></a></dt>
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
during processing. The method returns the empty string as its result.</p>
<p>The pattern matching is done with <b class="cmd">string match</b>, and the
default pattern used when none is specified, is <b class="const">*</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Parse errors</a></h2>
<p>The format of the parse error messages thrown when encountering
violations of the <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i> markup syntax is human readable and
not intended for processing by machines. As such it is not documented.</p>
<p><em>However</em>, the errorCode attached to the message is
machine-readable and has the following format:</p>
<ol class="doctools_enumerated">
<li><p>The error code will be a list, each element describing a single error
found in the input. The list has at least one element, possibly more.</p></li>
<li><p>Each error element will be a list containing six strings describing an
error in detail. The strings will be</p>
<ol class="doctools_enumerated">
<li><p>The path of the file the error occurred in. This may be empty.</p></li>
<li><p>The range of the token the error was found at. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file). Offsets
are counted from zero.</p></li>
<li><p>The line the first character after the error is on.
Lines are counted from one.</p></li>
<li><p>The column the first character after the error is at.







|









|







213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
during processing. The method returns the empty string as its result.</p>
<p>The pattern matching is done with <b class="cmd">string match</b>, and the
default pattern used when none is specified, is <b class="const">*</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Parse errors</a></h2>
<p>The format of the parse error messages thrown when encountering
violations of the <i class="term"><a href="../../../../index.html#key258">doctoc</a></i> markup syntax is human readable and
not intended for processing by machines. As such it is not documented.</p>
<p><em>However</em>, the errorCode attached to the message is
machine-readable and has the following format:</p>
<ol class="doctools_enumerated">
<li><p>The error code will be a list, each element describing a single error
found in the input. The list has at least one element, possibly more.</p></li>
<li><p>Each error element will be a list containing six strings describing an
error in detail. The strings will be</p>
<ol class="doctools_enumerated">
<li><p>The path of the file the error occured in. This may be empty.</p></li>
<li><p>The range of the token the error was found at. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file). Offsets
are counted from zero.</p></li>
<li><p>The line the first character after the error is on.
Lines are counted from one.</p></li>
<li><p>The column the first character after the error is at.
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#lexer">lexer</a>, <a href="../../../../index.html#parser">parser</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








357
358
359
360
361
362
363






364
365
366
367
368
369
370
371
372
373
374
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key257">lexer</a>, <a href="../../../../index.html#key9">parser</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/doctools2toc/toc_structure.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>doctools::toc::structure - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>doctools::toc::structure - Documentation tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'toc_structure.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- doctools::toc::structure.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::structure(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::structure - Doctoc serialization utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'toc_structure.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- doctools::toc::structure.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">doctools::toc::structure(n) 0.1 tcllib &quot;Documentation tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>doctools::toc::structure - Doctoc serialization utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to work with the serializations of
tables of contents as managed by the doctools system v2, and specified
in section <span class="sectref"><a href="#section3">ToC serialization format</a></span>.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling tables of contents and their conversion into and out
of various other formats, like documents written using <i class="term"><a href="../../../../index.html#doctoc">doctoc</a></i>
markup.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::structure</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of a table of contents and will throw an







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to work with the serializations of
tables of contents as managed by the doctools system v2, and specified
in section <span class="sectref"><a href="#section3">ToC serialization format</a></span>.</p>
<p>This is an internal package of doctools, for use by the higher level
packages handling tables of contents and their conversion into and out
of various other formats, like documents written using <i class="term"><a href="../../../../index.html#key258">doctoc</a></i>
markup.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::doctools::toc::structure</b> <b class="method">verify</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">canonvar</i>?</span></a></dt>
<dd><p>This command verifies that the content of <i class="arg">serial</i> is a valid
<i class="term">regular</i> serialization of a table of contents and will throw an
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#deserialization">deserialization</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#serialization">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








310
311
312
313
314
315
316






317
318
319
320
321
322
323
324
325
326
327
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key292">deserialization</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key109">serialization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/dtplite/pkg_dtplite.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>dtplite - Documentation toolbox</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>dtplite - Documentation toolbox</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pkg_dtplite.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004-2013 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- dtplite.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dtplite(n) 1.3.1 tcllib &quot;Documentation toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dtplite - Lightweight DocTools Markup Processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pkg_dtplite.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- dtplite.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">dtplite(n) 1.3 tcllib &quot;Documentation toolbox&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>dtplite - Lightweight DocTools Markup Processor</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">dtplite <span class="opt">?1.3.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputfile</i></a></li>
<li><a href="#2"><b class="cmd">dtplite</b> <b class="const">validate</b> <i class="arg">inputfile</i></a></li>
<li><a href="#3"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></li>
<li><a href="#4"><b class="cmd">dtplite</b> <b class="option">-merge</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></li>
</ul>







|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">dtplite <span class="opt">?1.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputfile</i></a></li>
<li><a href="#2"><b class="cmd">dtplite</b> <b class="const">validate</b> <i class="arg">inputfile</i></a></li>
<li><a href="#3"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></li>
<li><a href="#4"><b class="cmd">dtplite</b> <b class="option">-merge</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></li>
</ul>
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
present).</p></dd>
<dt>(path|handle) <i class="arg">format</i> (in)</dt>
<dd><p>This argument specifies the formatting engine to use when processing
the input, and thus the format of the generated document. See section
<span class="sectref"><a href="#subsection4">FORMATS</a></span> for the possibilities recognized by the application.</p></dd>
<dt>path <i class="arg">inputfile</i> (in)</dt>
<dd><p>This argument specifies the path to the file to process. It has to
exist, must be readable, and written in <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> format.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">dtplite</b> <b class="const">validate</b> <i class="arg">inputfile</i></a></dt>
<dd><p>This is a simpler form for use case [1]. The &quot;validate&quot; format
generates no output at all, only syntax checks are performed. As such
the specification of an output file or other options is not necessary
and left out.</p></dd>
<dt><a name="3"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [2]. It differs from the form for
use case [1] by having the input documents specified through a
directory instead of a file. The other arguments are identical, except
for <i class="arg">output</i>, which now has to be the path to an existing and
writable directory.</p>
<p>The input documents are all files in <i class="arg">inputdirectory</i> or any of
its subdirectories which were recognized by <b class="cmd">fileutil::fileType</b>
as containing text in <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> format.</p></dd>
<dt><a name="4"><b class="cmd">dtplite</b> <b class="option">-merge</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [3]. The only difference to the
form for use case [2] is the additional option <b class="option">-merge</b>.</p>
<p>Each such call will merge the generated documents coming from
processing the input documents under <i class="arg">inputdirectory</i> or any of
its subdirectories to the files under <i class="arg">output</i>. In this manner it
is possible to incrementally build the unified documentation for any







|














|







199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
present).</p></dd>
<dt>(path|handle) <i class="arg">format</i> (in)</dt>
<dd><p>This argument specifies the formatting engine to use when processing
the input, and thus the format of the generated document. See section
<span class="sectref"><a href="#subsection4">FORMATS</a></span> for the possibilities recognized by the application.</p></dd>
<dt>path <i class="arg">inputfile</i> (in)</dt>
<dd><p>This argument specifies the path to the file to process. It has to
exist, must be readable, and written in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">dtplite</b> <b class="const">validate</b> <i class="arg">inputfile</i></a></dt>
<dd><p>This is a simpler form for use case [1]. The &quot;validate&quot; format
generates no output at all, only syntax checks are performed. As such
the specification of an output file or other options is not necessary
and left out.</p></dd>
<dt><a name="3"><b class="cmd">dtplite</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [2]. It differs from the form for
use case [1] by having the input documents specified through a
directory instead of a file. The other arguments are identical, except
for <i class="arg">output</i>, which now has to be the path to an existing and
writable directory.</p>
<p>The input documents are all files in <i class="arg">inputdirectory</i> or any of
its subdirectories which were recognized by <b class="cmd">fileutil::fileType</b>
as containing text in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="4"><b class="cmd">dtplite</b> <b class="option">-merge</b> <b class="option">-o</b> <i class="arg">output</i> <span class="opt">?options?</span> <i class="arg">format</i> <i class="arg">inputdirectory</i></a></dt>
<dd><p>This is the form for use case [3]. The only difference to the
form for use case [2] is the additional option <b class="option">-merge</b>.</p>
<p>Each such call will merge the generated documents coming from
processing the input documents under <i class="arg">inputdirectory</i> or any of
its subdirectories to the files under <i class="arg">output</i>. In this manner it
is possible to incrementally build the unified documentation for any
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../doctools/docidx_intro.html">docidx introduction</a>, <a href="../doctools/doctoc_intro.html">doctoc introduction</a>, <a href="../doctools/doctools_intro.html">doctools introduction</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">HTML</a>, <a href="../../../../index.html#tmml">TMML</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#docidx">docidx</a>, <a href="../../../../index.html#doctoc">doctoc</a>, <a href="../../../../index.html#doctools">doctools</a>, <a href="../../../../index.html#manpage">manpage</a>, <a href="../../../../index.html#markup">markup</a>, <a href="../../../../index.html#nroff">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








419
420
421
422
423
424
425






426
427
428
429
430
431
432
433
434
435
436
437
438
439
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>doctools</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../doctools/docidx_intro.html">docidx introduction</a>, <a href="../doctools/doctoc_intro.html">doctoc introduction</a>, <a href="../doctools/doctools_intro.html">doctools introduction</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key18">HTML</a>, <a href="../../../../index.html#key19">TMML</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key178">docidx</a>, <a href="../../../../index.html#key258">doctoc</a>, <a href="../../../../index.html#key179">doctools</a>, <a href="../../../../index.html#key17">manpage</a>, <a href="../../../../index.html#key16">markup</a>, <a href="../../../../index.html#key21">nroff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/fileutil/fileutil.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>fileutil - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>fileutil - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'fileutil.man' by tcllib/doctools with format 'html'
   -->
<!-- fileutil.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil(n) 1.16 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil - Procedures implementing some file utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Warnings and Incompatibilities</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">fileutil <span class="opt">?1.16?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::lexnormalize</b> <i class="arg">path</i></a></li>
<li><a href="#2"><b class="cmd">::fileutil::fullnormalize</b> <i class="arg">path</i></a></li>
<li><a href="#3"><b class="cmd">::fileutil::test</b> <i class="arg">path</i> <i class="arg">codes</i> <span class="opt">?<i class="arg">msgvar</i>?</span> <span class="opt">?<i class="arg">label</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::fileutil::cat</b> (<span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i>)...</a></li>
<li><a href="#5"><b class="cmd">::fileutil::writeFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">data</i></a></li>







|

|



|
|
|
|
|
|


|


















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'fileutil.man' by tcllib/doctools with format 'html'
   -->
<! -- fileutil.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil(n) 1.15 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil - Procedures implementing some file utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Warnings and Incompatibilities</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">fileutil <span class="opt">?1.15?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::lexnormalize</b> <i class="arg">path</i></a></li>
<li><a href="#2"><b class="cmd">::fileutil::fullnormalize</b> <i class="arg">path</i></a></li>
<li><a href="#3"><b class="cmd">::fileutil::test</b> <i class="arg">path</i> <i class="arg">codes</i> <span class="opt">?<i class="arg">msgvar</i>?</span> <span class="opt">?<i class="arg">label</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::fileutil::cat</b> (<span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i>)...</a></li>
<li><a href="#5"><b class="cmd">::fileutil::writeFile</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i> <i class="arg">data</i></a></li>
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<dd><p><b class="cmd">file executable</b></p></dd>
<dt><em>f</em>ile</dt>
<dd><p><b class="cmd">file isfile</b></p></dd>
<dt><em>d</em>ir</dt>
<dd><p><b class="cmd">file isdirectory</b></p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::fileutil::cat</b> (<span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i>)...</a></dt>
<dd><p>A tcl implementation of the UNIX <b class="syscmd"><a href="../../../../index.html#cat">cat</a></b> command.  Returns the
contents of the specified file(s). The arguments are files to read,
with interspersed options configuring the process. If there are
problems reading any of the files, an error will occur, and no data
will be returned.</p>
<p>The options accepted are <b class="option">-encoding</b>, <b class="option">-translation</b>,
<b class="option">-eofchar</b>, and <b class="option">--</b>. With the exception of the last all
options take a single value as argument, as specified by the tcl







|







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<dd><p><b class="cmd">file executable</b></p></dd>
<dt><em>f</em>ile</dt>
<dd><p><b class="cmd">file isfile</b></p></dd>
<dt><em>d</em>ir</dt>
<dd><p><b class="cmd">file isdirectory</b></p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::fileutil::cat</b> (<span class="opt">?<i class="arg">options</i>?</span> <i class="arg">file</i>)...</a></dt>
<dd><p>A tcl implementation of the UNIX <b class="syscmd"><a href="../../../../index.html#key314">cat</a></b> command.  Returns the
contents of the specified file(s). The arguments are files to read,
with interspersed options configuring the process. If there are
problems reading any of the files, an error will occur, and no data
will be returned.</p>
<p>The options accepted are <b class="option">-encoding</b>, <b class="option">-translation</b>,
<b class="option">-eofchar</b>, and <b class="option">--</b>. With the exception of the last all
options take a single value as argument, as specified by the tcl
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
It first reads the contents of the specified <i class="arg">file</i>, then runs the
command prefix <i class="arg">cmd</i> with that data appended to it, and at last
writes the result of that invokation back as the new contents of the
file.</p>
<p>If the executed command throws an error the <i class="arg">file</i> is not changed.</p>
<p>The command accepts the same options as <b class="cmd">::fileutil::cat</b>.</p></dd>
<dt><a name="11"><b class="cmd">::fileutil::fileType</b> <i class="arg">filename</i></a></dt>
<dd><p>An implementation of the UNIX <b class="syscmd"><a href="../../../../index.html#file">file</a></b> command, which uses
various heuristics to guess the type of a file.  Returns a list
specifying as much type information as can be determined about the
file, from most general (eg, &quot;binary&quot; or &quot;text&quot;) to most specific (eg,
&quot;gif&quot;).  For example, the return value for a GIF file would be &quot;binary
graphic gif&quot;.  The command will detect the following types of files:
directory, empty, binary, text, script (with interpreter), executable
elf, executable dos, executable ne, executable pe, graphic gif, graphic
jpeg, graphic png, graphic tiff, graphic bitmap, html, xml (with doctype
if available), message pgp, binary pdf, text ps, text eps, binary
gravity_wave_data_frame, compressed bzip, compressed gzip, compressed
zip, compressed tar, audio wave, audio mpeg, and link. It further
detects doctools, doctoc, and docidx documentation files, and
tklib diagrams.</p></dd>
<dt><a name="12"><b class="cmd">::fileutil::find</b> <span class="opt">?<i class="arg">basedir</i> <span class="opt">?<i class="arg">filtercmd</i>?</span>?</span></a></dt>
<dd><p>An implementation of the unix command <b class="syscmd"><a href="../../../../index.html#find">find</a></b>. Adapted from the
Tcler's Wiki. Takes at most two arguments, the path to the directory
to start searching from and a command to use to evaluate interest in
each file. The path defaults to &quot;<b class="file">.</b>&quot;, i.e. the current
directory. The command defaults to the empty string, which means that
all files are of interest. The command takes care <em>not</em> to
lose itself in infinite loops upon encountering circular link
structures. The result of the command is a list containing the paths







|














|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
It first reads the contents of the specified <i class="arg">file</i>, then runs the
command prefix <i class="arg">cmd</i> with that data appended to it, and at last
writes the result of that invokation back as the new contents of the
file.</p>
<p>If the executed command throws an error the <i class="arg">file</i> is not changed.</p>
<p>The command accepts the same options as <b class="cmd">::fileutil::cat</b>.</p></dd>
<dt><a name="11"><b class="cmd">::fileutil::fileType</b> <i class="arg">filename</i></a></dt>
<dd><p>An implementation of the UNIX <b class="syscmd"><a href="../../../../index.html#key31">file</a></b> command, which uses
various heuristics to guess the type of a file.  Returns a list
specifying as much type information as can be determined about the
file, from most general (eg, &quot;binary&quot; or &quot;text&quot;) to most specific (eg,
&quot;gif&quot;).  For example, the return value for a GIF file would be &quot;binary
graphic gif&quot;.  The command will detect the following types of files:
directory, empty, binary, text, script (with interpreter), executable
elf, executable dos, executable ne, executable pe, graphic gif, graphic
jpeg, graphic png, graphic tiff, graphic bitmap, html, xml (with doctype
if available), message pgp, binary pdf, text ps, text eps, binary
gravity_wave_data_frame, compressed bzip, compressed gzip, compressed
zip, compressed tar, audio wave, audio mpeg, and link. It further
detects doctools, doctoc, and docidx documentation files, and
tklib diagrams.</p></dd>
<dt><a name="12"><b class="cmd">::fileutil::find</b> <span class="opt">?<i class="arg">basedir</i> <span class="opt">?<i class="arg">filtercmd</i>?</span>?</span></a></dt>
<dd><p>An implementation of the unix command <b class="syscmd"><a href="../../../../index.html#key626">find</a></b>. Adapted from the
Tcler's Wiki. Takes at most two arguments, the path to the directory
to start searching from and a command to use to evaluate interest in
each file. The path defaults to &quot;<b class="file">.</b>&quot;, i.e. the current
directory. The command defaults to the empty string, which means that
all files are of interest. The command takes care <em>not</em> to
lose itself in infinite loops upon encountering circular link
structures. The result of the command is a list containing the paths
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<dd><p>The command reads the file <i class="arg">filename</i> and executes the script
<i class="arg">cmd</i> for every line in the file. During the execution of the
script the variable <i class="arg">var</i> is set to the contents of the current
line. The return value of this command is the result of the last
invocation of the script <i class="arg">cmd</i> or the empty string if the file was
empty.</p></dd>
<dt><a name="15"><b class="cmd">::fileutil::grep</b> <i class="arg">pattern</i> <span class="opt">?<i class="arg">files</i>?</span></a></dt>
<dd><p>Implementation of <b class="syscmd"><a href="../../../../index.html#grep">grep</a></b>. Adapted from the Tcler's Wiki. The
first argument defines the <i class="arg">pattern</i> to search for. This is
followed by a list of <i class="arg">files</i> to search through. The list is
optional and <b class="const">stdin</b> will be used if it is missing. The result
of the procedures is a list containing the matches. Each match is a
single element of the list and contains filename, number and contents
of the matching line, separated by a colons.</p></dd>
<dt><a name="16"><b class="cmd">::fileutil::install</b> <span class="opt">?<b class="option">-m</b> <i class="arg">mode</i>?</span> <i class="arg">source</i> <i class="arg">destination</i></a></dt>







|







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<dd><p>The command reads the file <i class="arg">filename</i> and executes the script
<i class="arg">cmd</i> for every line in the file. During the execution of the
script the variable <i class="arg">var</i> is set to the contents of the current
line. The return value of this command is the result of the last
invocation of the script <i class="arg">cmd</i> or the empty string if the file was
empty.</p></dd>
<dt><a name="15"><b class="cmd">::fileutil::grep</b> <i class="arg">pattern</i> <span class="opt">?<i class="arg">files</i>?</span></a></dt>
<dd><p>Implementation of <b class="syscmd"><a href="../../../../index.html#key316">grep</a></b>. Adapted from the Tcler's Wiki. The
first argument defines the <i class="arg">pattern</i> to search for. This is
followed by a list of <i class="arg">files</i> to search through. The list is
optional and <b class="const">stdin</b> will be used if it is missing. The result
of the procedures is a list containing the matches. Each match is a
single element of the list and contains filename, number and contents
of the matching line, separated by a colons.</p></dd>
<dt><a name="16"><b class="cmd">::fileutil::install</b> <span class="opt">?<b class="option">-m</b> <i class="arg">mode</i>?</span> <i class="arg">source</i> <i class="arg">destination</i></a></dt>
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
<p>An absolute path outside of <i class="arg">jail</i> is stripped of its root element
and then put into the <i class="arg">jail</i> by prefixing it with it. The same
happens if <i class="arg">path</i> is relative, except that nothing is stripped of
it. Before adding the <i class="arg">jail</i> prefix the <i class="arg">path</i> is lexically
normalized to prevent the caller from using <b class="const">..</b> segments in
<i class="arg">path</i> to escape the jail.</p></dd>
<dt><a name="21"><b class="cmd">::fileutil::touch</b> <span class="opt">?<b class="option">-a</b>?</span> <span class="opt">?<b class="option">-c</b>?</span> <span class="opt">?<b class="option">-m</b>?</span> <span class="opt">?<b class="option">-r</b> <i class="arg">ref_file</i>?</span> <span class="opt">?<b class="option">-t</b> <i class="arg">time</i>?</span> <i class="arg">filename</i> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>Implementation of <b class="syscmd"><a href="../../../../index.html#touch">touch</a></b>. Alter the atime and mtime of the
specified files. If <b class="option">-c</b>, do not create files if they do not
already exist. If <b class="option">-r</b>, use the atime and mtime from
<i class="arg">ref_file</i>. If <b class="option">-t</b>, use the integer clock value
<i class="arg">time</i>. It is illegal to specify both <b class="option">-r</b> and
<b class="option">-t</b>. If <b class="option">-a</b>, only change the atime. If <b class="option">-m</b>,
only change the mtime.</p>
<p><em>This command is not available for Tcl versions less than 8.3.</em></p></dd>







|







381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<p>An absolute path outside of <i class="arg">jail</i> is stripped of its root element
and then put into the <i class="arg">jail</i> by prefixing it with it. The same
happens if <i class="arg">path</i> is relative, except that nothing is stripped of
it. Before adding the <i class="arg">jail</i> prefix the <i class="arg">path</i> is lexically
normalized to prevent the caller from using <b class="const">..</b> segments in
<i class="arg">path</i> to escape the jail.</p></dd>
<dt><a name="21"><b class="cmd">::fileutil::touch</b> <span class="opt">?<b class="option">-a</b>?</span> <span class="opt">?<b class="option">-c</b>?</span> <span class="opt">?<b class="option">-m</b>?</span> <span class="opt">?<b class="option">-r</b> <i class="arg">ref_file</i>?</span> <span class="opt">?<b class="option">-t</b> <i class="arg">time</i>?</span> <i class="arg">filename</i> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>Implementation of <b class="syscmd"><a href="../../../../index.html#key317">touch</a></b>. Alter the atime and mtime of the
specified files. If <b class="option">-c</b>, do not create files if they do not
already exist. If <b class="option">-r</b>, use the atime and mtime from
<i class="arg">ref_file</i>. If <b class="option">-t</b>, use the integer clock value
<i class="arg">time</i>. It is illegal to specify both <b class="option">-r</b> and
<b class="option">-t</b>. If <b class="option">-a</b>, only change the atime. If <b class="option">-m</b>,
only change the mtime.</p>
<p><em>This command is not available for Tcl versions less than 8.3.</em></p></dd>
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cat">cat</a>, <a href="../../../../index.html#file_utilities">file utilities</a>, <a href="../../../../index.html#grep">grep</a>, <a href="../../../../index.html#temp_file">temp file</a>, <a href="../../../../index.html#test">test</a>, <a href="../../../../index.html#touch">touch</a>, <a href="../../../../index.html#type">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





524
525
526
527
528
529
530






531
532
533
534
535
536
537
538
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key314">cat</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key316">grep</a>, <a href="../../../../index.html#key315">temp file</a>, <a href="../../../../index.html#key313">test</a>, <a href="../../../../index.html#key317">touch</a>, <a href="../../../../index.html#key117">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/fileutil/multi.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>fileutil::multi - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>fileutil::multi - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'multi.man' by tcllib/doctools with format 'html'
   -->
<!-- fileutil::multi.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::multi(n) 0.1 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::multi - Multi-file operation, scatter/gather, standard object</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'multi.man' by tcllib/doctools with format 'html'
   -->
<! -- fileutil::multi.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::multi(n) 0.1 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::multi - Multi-file operation, scatter/gather, standard object</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#copy">copy</a>, <a href="../../../../index.html#file_utilities">file utilities</a>, <a href="../../../../index.html#move">move</a>, <a href="../../../../index.html#multi_file">multi-file</a>, <a href="../../../../index.html#remove">remove</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





162
163
164
165
166
167
168






169
170
171
172
173
174
175
176
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key229">move</a>, <a href="../../../../index.html#key227">multi-file</a>, <a href="../../../../index.html#key228">remove</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/fileutil/multiop.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>fileutil::multi::op - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>fileutil::multi::op - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'multiop.man' by tcllib/doctools with format 'html'
   -->
<!-- fileutil::multi::op.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::multi::op(n) 0.5.3 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::multi::op - Multi-file operation, scatter/gather</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'multiop.man' by tcllib/doctools with format 'html'
   -->
<! -- fileutil::multi::op.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::multi::op(n) 0.5.3 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::multi::op - Multi-file operation, scatter/gather</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<li><a href="#9"><b class="cmd">for</b> <i class="arg">pattern</i></a></li>
<li><a href="#10"><b class="cmd">exclude</b> <i class="arg">pattern</i></a></li>
<li><a href="#11"><b class="cmd">but</b></a></li>
<li><a href="#12"><b class="cmd">except</b></a></li>
<li><a href="#13"><b class="cmd">as</b> <i class="arg">name</i></a></li>
<li><a href="#14"><b class="cmd">recursive</b></a></li>
<li><a href="#15"><b class="cmd">recursively</b></a></li>
<li><a href="#16"><b class="cmd"><a href="../../../../index.html#copy">copy</a></b></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#move">move</a></b></a></li>
<li><a href="#18"><b class="cmd"><a href="../../../../index.html#remove">remove</a></b></a></li>
<li><a href="#19"><b class="cmd">expand</b></a></li>
<li><a href="#20"><b class="cmd">invoke</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#21"><b class="cmd">reset</b></a></li>
<li><a href="#22"><b class="cmd">(</b></a></li>
<li><a href="#23"><b class="cmd">)</b></a></li>
<li><a href="#24"><b class="cmd">cd</b> <i class="arg">directory</i></a></li>
<li><a href="#25"><b class="cmd">up</b></a></li>







|
|
|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<li><a href="#9"><b class="cmd">for</b> <i class="arg">pattern</i></a></li>
<li><a href="#10"><b class="cmd">exclude</b> <i class="arg">pattern</i></a></li>
<li><a href="#11"><b class="cmd">but</b></a></li>
<li><a href="#12"><b class="cmd">except</b></a></li>
<li><a href="#13"><b class="cmd">as</b> <i class="arg">name</i></a></li>
<li><a href="#14"><b class="cmd">recursive</b></a></li>
<li><a href="#15"><b class="cmd">recursively</b></a></li>
<li><a href="#16"><b class="cmd"><a href="../../../../index.html#key64">copy</a></b></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#key229">move</a></b></a></li>
<li><a href="#18"><b class="cmd"><a href="../../../../index.html#key228">remove</a></b></a></li>
<li><a href="#19"><b class="cmd">expand</b></a></li>
<li><a href="#20"><b class="cmd">invoke</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#21"><b class="cmd">reset</b></a></li>
<li><a href="#22"><b class="cmd">(</b></a></li>
<li><a href="#23"><b class="cmd">)</b></a></li>
<li><a href="#24"><b class="cmd">cd</b> <i class="arg">directory</i></a></li>
<li><a href="#25"><b class="cmd">up</b></a></li>
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
operation. I.e. for the renaming of a single file during the
operation.</p></dd>
<dt><a name="14"><b class="cmd">recursive</b></a></dt>
<dd><p>Signals that file expansion should happen in the whole directory
hierarchy and not just the directory itself.</p></dd>
<dt><a name="15"><b class="cmd">recursively</b></a></dt>
<dd><p>An alias for <b class="cmd">recursive</b>.</p></dd>
<dt><a name="16"><b class="cmd"><a href="../../../../index.html#copy">copy</a></b></a></dt>
<dd><p>Signals that the operation is the copying of files from source to
destination directory per the specified inclusion and exclusion
patterns.</p></dd>
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#move">move</a></b></a></dt>
<dd><p>Signals that the operation is the moving of files from source to
destination directory per the specified inclusion and exclusion
patterns.</p></dd>
<dt><a name="18"><b class="cmd"><a href="../../../../index.html#remove">remove</a></b></a></dt>
<dd><p>Signals that the operation is the removal of files in the destination
directory per the specified inclusion and exclusion patterns.</p></dd>
<dt><a name="19"><b class="cmd">expand</b></a></dt>
<dd><p>Signals that there is no operation but the calculation of the set of
files from the include and exclude patterns. This operation is not
available if <b class="cmd">the-set</b> is used.</p></dd>
<dt><a name="20"><b class="cmd">invoke</b> <i class="arg">cmdprefix</i></a></dt>







|



|



|







259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
operation. I.e. for the renaming of a single file during the
operation.</p></dd>
<dt><a name="14"><b class="cmd">recursive</b></a></dt>
<dd><p>Signals that file expansion should happen in the whole directory
hierarchy and not just the directory itself.</p></dd>
<dt><a name="15"><b class="cmd">recursively</b></a></dt>
<dd><p>An alias for <b class="cmd">recursive</b>.</p></dd>
<dt><a name="16"><b class="cmd"><a href="../../../../index.html#key64">copy</a></b></a></dt>
<dd><p>Signals that the operation is the copying of files from source to
destination directory per the specified inclusion and exclusion
patterns.</p></dd>
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#key229">move</a></b></a></dt>
<dd><p>Signals that the operation is the moving of files from source to
destination directory per the specified inclusion and exclusion
patterns.</p></dd>
<dt><a name="18"><b class="cmd"><a href="../../../../index.html#key228">remove</a></b></a></dt>
<dd><p>Signals that the operation is the removal of files in the destination
directory per the specified inclusion and exclusion patterns.</p></dd>
<dt><a name="19"><b class="cmd">expand</b></a></dt>
<dd><p>Signals that there is no operation but the calculation of the set of
files from the include and exclude patterns. This operation is not
available if <b class="cmd">the-set</b> is used.</p></dd>
<dt><a name="20"><b class="cmd">invoke</b> <i class="arg">cmdprefix</i></a></dt>
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<dt><b class="const">excluded</b></dt>
<dd><p>List of currently known exclusion patterns.</p></dd>
<dt><b class="const">from</b></dt>
<dd><p>Current source directory, set by <b class="cmd">from</b>.</p></dd>
<dt><b class="const">into</b></dt>
<dd><p>Current destination directory, set by <b class="cmd">into</b> (and aliases).</p></dd>
<dt><b class="const">operation</b></dt>
<dd><p>Current operation to perform, set by <b class="cmd"><a href="../../../../index.html#copy">copy</a></b>, <b class="cmd"><a href="../../../../index.html#move">move</a></b>, <b class="cmd"><a href="../../../../index.html#remove">remove</a></b>, <b class="cmd">expand</b>, or <b class="cmd">invoke</b>.</p></dd>
<dt><b class="const">recursive</b></dt>
<dd><p>Current recursion status. Set/unset by <b class="cmd">recursive</b> and <b class="cmd">!recursive</b>.</p></dd>
<dt><b class="const">strict</b></dt>
<dd><p>Current strictness. Set/unset by <b class="cmd">strict</b> and <b class="cmd">!strict</b>.</p></dd>
<dt><b class="const">type</b></dt>
<dd><p>Current path type limiter. Set by either <b class="cmd">files</b>, <b class="cmd">directories</b>, <b class="cmd">links</b>, or <b class="cmd">all</b>.</p></dd>
</dl></dd>







|







352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<dt><b class="const">excluded</b></dt>
<dd><p>List of currently known exclusion patterns.</p></dd>
<dt><b class="const">from</b></dt>
<dd><p>Current source directory, set by <b class="cmd">from</b>.</p></dd>
<dt><b class="const">into</b></dt>
<dd><p>Current destination directory, set by <b class="cmd">into</b> (and aliases).</p></dd>
<dt><b class="const">operation</b></dt>
<dd><p>Current operation to perform, set by <b class="cmd"><a href="../../../../index.html#key64">copy</a></b>, <b class="cmd"><a href="../../../../index.html#key229">move</a></b>, <b class="cmd"><a href="../../../../index.html#key228">remove</a></b>, <b class="cmd">expand</b>, or <b class="cmd">invoke</b>.</p></dd>
<dt><b class="const">recursive</b></dt>
<dd><p>Current recursion status. Set/unset by <b class="cmd">recursive</b> and <b class="cmd">!recursive</b>.</p></dd>
<dt><b class="const">strict</b></dt>
<dd><p>Current strictness. Set/unset by <b class="cmd">strict</b> and <b class="cmd">!strict</b>.</p></dd>
<dt><b class="const">type</b></dt>
<dd><p>Current path type limiter. Set by either <b class="cmd">files</b>, <b class="cmd">directories</b>, <b class="cmd">links</b>, or <b class="cmd">all</b>.</p></dd>
</dl></dd>
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
<dd><p>Returns the current path type limiter.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<p>The following examples assume that the variable <b class="variable">F</b> contains a
reference to a multi-file operation object.</p>
<pre class="doctools_example">
    $F do copy                       \
	the  *.dll                    \
	from c:/TDK/PrivateOpenSSL/bin \
	to   [installdir_of tls]
</pre>
<pre class="doctools_example">
    $F do move      \
	the  *       \
	from /sources \
	into /scratch  \
	but not *.html
    # Alternatively use 'except for *.html'.
</pre>
<pre class="doctools_example">
    $F do           \
	move         \
	the  index    \
	from /sources  \
	into /scratch   \
	as   pkgIndex.tcl
</pre>
<pre class="doctools_example">
    $F do         \
	remove     \
	the *.txt  \
	in /scratch
</pre>
<p>Note that the fact that most commands just modify the object state
allows us to use more off forms as specifications instead of just
nearly-natural language sentences.
For example the second example in this section can re-arranged into:</p>
<pre class="doctools_example">
    $F do            \
	from /sources \
	into /scratch  \
	but not *.html \
	move           \
	the  *
</pre>
<p>and the result is not only still a valid specification, but even stays
relatively readable.</p>
<p>Further note that the information collected by the commands <b class="cmd">but</b>,
<b class="cmd">except</b>, and <b class="cmd">as</b> is automatically reset after the associated
<b class="cmd">the</b> was executed. However no other state is reset in that
manner, allowing the user to avoid repetitions of unchanging
information. For example the second and third examples of this section
can be merged and rewritten into the equivalent:</p>
<pre class="doctools_example">
$F do                   \
    move                 \
    the  *                \
    from /sources          \
    into /scratch           \
    but not *.html not index \
    the  index               \
    as   pkgIndex.tcl
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#copy">copy</a>, <a href="../../../../index.html#file_utilities">file utilities</a>, <a href="../../../../index.html#move">move</a>, <a href="../../../../index.html#multi_file">multi-file</a>, <a href="../../../../index.html#remove">remove</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







|
|
|



|
|
|
|




|
|
|
|
|



|
|
|







|
|
|
|
|











|
|
|
|
|
|
|










<
<
<
<
<
<


|





382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453






454
455
456
457
458
459
460
461
<dd><p>Returns the current path type limiter.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<p>The following examples assume that the variable <b class="variable">F</b> contains a
reference to a multi-file operation object.</p>
<pre class="doctools_example">
    $F do copy                       \\
	the  *.dll                    \\
	from c:/TDK/PrivateOpenSSL/bin \\
	to   [installdir_of tls]
</pre>
<pre class="doctools_example">
    $F do move      \\
	the  *       \\
	from /sources \\
	into /scratch  \\
	but not *.html
    # Alternatively use 'except for *.html'.
</pre>
<pre class="doctools_example">
    $F do           \\
	move         \\
	the  index    \\
	from /sources  \\
	into /scratch   \\
	as   pkgIndex.tcl
</pre>
<pre class="doctools_example">
    $F do         \\
	remove     \\
	the *.txt  \\
	in /scratch
</pre>
<p>Note that the fact that most commands just modify the object state
allows us to use more off forms as specifications instead of just
nearly-natural language sentences.
For example the second example in this section can re-arranged into:</p>
<pre class="doctools_example">
    $F do            \\
	from /sources \\
	into /scratch  \\
	but not *.html \\
	move           \\
	the  *
</pre>
<p>and the result is not only still a valid specification, but even stays
relatively readable.</p>
<p>Further note that the information collected by the commands <b class="cmd">but</b>,
<b class="cmd">except</b>, and <b class="cmd">as</b> is automatically reset after the associated
<b class="cmd">the</b> was executed. However no other state is reset in that
manner, allowing the user to avoid repetitions of unchanging
information. For example the second and third examples of this section
can be merged and rewritten into the equivalent:</p>
<pre class="doctools_example">
$F do                   \\
    move                 \\
    the  *                \\
    from /sources          \\
    into /scratch           \\
    but not *.html not index \\
    the  index               \\
    as   pkgIndex.tcl
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key229">move</a>, <a href="../../../../index.html#key227">multi-file</a>, <a href="../../../../index.html#key228">remove</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/fileutil/paths.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html><html><head>
<title>fileutil::paths - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'paths.man' by tcllib/doctools with format 'html'
   -->
<!-- fileutil::paths.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::paths(n) 1 tcllib &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::paths - Manage search path pools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">fileutil::paths <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::paths</b> <i class="arg">poolName</i></a></li>
<li><a href="#2"><b class="cmd">poolName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">poolName</i> <b class="method">add</b> <i class="arg">path</i></a></li>
<li><a href="#4"><i class="arg">poolName</i> <b class="method">clear</b></a></li>
<li><a href="#5"><i class="arg">poolName</i> <b class="method">paths</b></a></li>
<li><a href="#6"><i class="arg">poolName</i> <b class="method">remove</b> <i class="arg">path</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Provides a snit class whose instances manage a pool of (search) paths.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The main command provides construction of search path pools:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::fileutil::paths</b> <i class="arg">poolName</i></a></dt>
<dd><p>Creates a new, empty pool of search paths with an associated global
Tcl command whose name is <i class="arg">poolName</i>.
It may be used to invoke various operations on the pool.
It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">poolName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><b class="method">method</b> and <i class="arg">arg</i>uments determine the exact behavior of
the command.</p></dd>
</dl>
<p>If <i class="arg">poolName</i> is specified as <b class="const">%AUTO%</b> a unique name will be
generated by the package itself.
The result of the command is the fully-qualified name of the instance
command.</p></dd>
</dl>
<p>The following commands are possible for pool objects:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">poolName</i> <b class="method">add</b> <i class="arg">path</i></a></dt>
<dd><p>Adds the <i class="arg">path</i> to the pool.
Nothing is done if the <i class="arg">path</i> is already known to the pool.
The result of the command is the empty string.</p></dd>
<dt><a name="4"><i class="arg">poolName</i> <b class="method">clear</b></a></dt>
<dd><p>Clears the entire pool. In other words, removes all paths from it.
The result of the command is the empty string.</p></dd>
<dt><a name="5"><i class="arg">poolName</i> <b class="method">paths</b></a></dt>
<dd><p>Returns the list of all paths known to the pool, in the order they
were added.</p></dd>
<dt><a name="6"><i class="arg">poolName</i> <b class="method">remove</b> <i class="arg">path</i></a></dt>
<dd><p>Removes the <i class="arg">path</i> from the pool, if it is known to the pool.
Unknown paths are ignored without error.
The result of the command is the empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/fileutil/traverse.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>fileutil_traverse - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>fileutil_traverse - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'traverse.man' by tcllib/doctools with format 'html'
   -->
<!-- fileutil_traverse.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil_traverse(n) 0.6 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil_traverse - Iterative directory traversal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'traverse.man' by tcllib/doctools with format 'html'
   -->
<! -- fileutil_traverse.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil_traverse(n) 0.6 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil_traverse - Iterative directory traversal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#directory_traversal">directory traversal</a>, <a href="../../../../index.html#traversal">traversal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





272
273
274
275
276
277
278






279
280
281
282
283
284
285
286
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key723">directory traversal</a>, <a href="../../../../index.html#key722">traversal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/ftp/ftp.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>ftp - ftp client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>ftp - ftp client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ftp.man' by tcllib/doctools with format 'html'
   -->
<!-- ftp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ftp(n) 2.4.13 tcllib &quot;ftp client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ftp - Client-side tcl implementation of the ftp protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ftp.man' by tcllib/doctools with format 'html'
   -->
<! -- ftp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ftp(n) 2.4.13 tcllib &quot;ftp client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ftp - Client-side tcl implementation of the ftp protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
The package implements both active (default) and passive ftp sessions.</p>
<p>A new ftp session is started with the <b class="cmd">::ftp::Open</b> command. To
shutdown an existing ftp session use <b class="cmd">::ftp::Close</b>. All other
commands are restricted to usage in an an open ftp session. They will
generate errors if they are used out of context.  The ftp package
includes file and directory manipulating commands for remote sites. To
perform the same operations on the local site use commands built into
the core, like <b class="cmd">cd</b> or <b class="cmd"><a href="../../../../index.html#file">file</a></b>.</p>
<p>The output of the package is controlled by two state variables,
<b class="variable">::ftp::VERBOSE</b> and <b class="variable">::ftp::DEBUG</b>. Setting
<b class="variable">::ftp::VERBOSE</b> to &quot;1&quot; forces the package to show all responses
from a remote server. The default value is &quot;0&quot;. Setting
<b class="variable">::ftp::DEBUG</b> to &quot;1&quot; enables debugging and forces the package to
show all return codes, states, state changes and &quot;real&quot; ftp
commands. The default value is &quot;0&quot;.</p>







|







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
The package implements both active (default) and passive ftp sessions.</p>
<p>A new ftp session is started with the <b class="cmd">::ftp::Open</b> command. To
shutdown an existing ftp session use <b class="cmd">::ftp::Close</b>. All other
commands are restricted to usage in an an open ftp session. They will
generate errors if they are used out of context.  The ftp package
includes file and directory manipulating commands for remote sites. To
perform the same operations on the local site use commands built into
the core, like <b class="cmd">cd</b> or <b class="cmd"><a href="../../../../index.html#key31">file</a></b>.</p>
<p>The output of the package is controlled by two state variables,
<b class="variable">::ftp::VERBOSE</b> and <b class="variable">::ftp::DEBUG</b>. Setting
<b class="variable">::ftp::VERBOSE</b> to &quot;1&quot; forces the package to show all responses
from a remote server. The default value is &quot;0&quot;. Setting
<b class="variable">::ftp::DEBUG</b> to &quot;1&quot; enables debugging and forces the package to
show all return codes, states, state changes and &quot;real&quot; ftp
commands. The default value is &quot;0&quot;.</p>
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">BUGS</a></h2>
<p>The correct execution of many commands depends upon the proper
behavior by the remote server, network and router configuration.</p>
<p>An update command placed in the procedure <b class="cmd">::ftp::DisplayMsg</b> may
run into persistent errors or infinite loops. The solution to this
problem is to use <b class="cmd">update idletasks</b> instead of <b class="cmd"><a href="../../../../index.html#update">update</a></b>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ftp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftpd/ftpd.html">ftpd</a>, <a href="../mime/mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="../mime/smtp.html">smtp</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ftp">ftp</a>, <a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#net">net</a>, <a href="../../../../index.html#rfc_959">rfc 959</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







|








<
<
<
<
<
<





|





421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436






437
438
439
440
441
442
443
444
445
446
447
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">BUGS</a></h2>
<p>The correct execution of many commands depends upon the proper
behavior by the remote server, network and router configuration.</p>
<p>An update command placed in the procedure <b class="cmd">::ftp::DisplayMsg</b> may
run into persistent errors or infinite loops. The solution to this
problem is to use <b class="cmd">update idletasks</b> instead of <b class="cmd"><a href="../../../../index.html#key417">update</a></b>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ftp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftpd/ftpd.html">ftpd</a>, <a href="../mime/mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="../mime/smtp.html">smtp</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key294">ftp</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key293">rfc 959</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/ftp/ftp_geturl.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>ftp::geturl - ftp client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>ftp::geturl - ftp client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ftp_geturl.man' by tcllib/doctools with format 'html'
   -->
<!-- ftp::geturl.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ftp::geturl(n) 0.2.2 tcllib &quot;ftp client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ftp::geturl - Uri handler for ftp urls</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ftp_geturl.man' by tcllib/doctools with format 'html'
   -->
<! -- ftp::geturl.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ftp::geturl(n) 0.2.2 tcllib &quot;ftp client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ftp::geturl - Uri handler for ftp urls</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ftp::geturl</b> <i class="arg">url</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a command which wraps around the client side of
the <i class="term"><a href="../../../../index.html#ftp">ftp</a></i> protocol provided by package <b class="package"><a href="ftp.html">ftp</a></b> to allow the
retrieval of urls using the <i class="term"><a href="../../../../index.html#ftp">ftp</a></i> schema.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ftp::geturl</b> <i class="arg">url</i></a></dt>
<dd><p>This command can be used by the generic command <b class="cmd">::uri::geturl</b>
(See package <b class="package"><a href="../uri/uri.html">uri</a></b>) to retrieve the contents of ftp
urls. Internally it uses the commands of the package <b class="package"><a href="ftp.html">ftp</a></b> to
fulfill the request.</p>
<p>The contents of a <i class="term"><a href="../../../../index.html#ftp">ftp</a></i> url are defined as follows:</p>
<dl class="doctools_definitions">
<dt><i class="term"><a href="../../../../index.html#file">file</a></i></dt>
<dd><p>The contents of the specified file itself.</p></dd>
<dt><i class="term">directory</i></dt>
<dd><p>A listing of the contents of the directory in key value notation where
the file name is the key and its attributes the associated value.</p></dd>
<dt><i class="term">link</i></dt>
<dd><p>The attributes of the link, including the path it refers to.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ftp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftpd/ftpd.html">ftpd</a>, <a href="../mime/mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="../mime/smtp.html">smtp</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ftp">ftp</a>, <a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#net">net</a>, <a href="../../../../index.html#rfc_959">rfc 959</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







|
|








|

|
















<
<
<
<
<
<





|





131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166






167
168
169
170
171
172
173
174
175
176
177
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ftp::geturl</b> <i class="arg">url</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a command which wraps around the client side of
the <i class="term"><a href="../../../../index.html#key294">ftp</a></i> protocol provided by package <b class="package"><a href="ftp.html">ftp</a></b> to allow the
retrieval of urls using the <i class="term"><a href="../../../../index.html#key294">ftp</a></i> schema.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ftp::geturl</b> <i class="arg">url</i></a></dt>
<dd><p>This command can be used by the generic command <b class="cmd">::uri::geturl</b>
(See package <b class="package"><a href="../uri/uri.html">uri</a></b>) to retrieve the contents of ftp
urls. Internally it uses the commands of the package <b class="package"><a href="ftp.html">ftp</a></b> to
fulfill the request.</p>
<p>The contents of a <i class="term"><a href="../../../../index.html#key294">ftp</a></i> url are defined as follows:</p>
<dl class="doctools_definitions">
<dt><i class="term"><a href="../../../../index.html#key31">file</a></i></dt>
<dd><p>The contents of the specified file itself.</p></dd>
<dt><i class="term">directory</i></dt>
<dd><p>A listing of the contents of the directory in key value notation where
the file name is the key and its attributes the associated value.</p></dd>
<dt><i class="term">link</i></dt>
<dd><p>The attributes of the link, including the path it refers to.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ftp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftpd/ftpd.html">ftpd</a>, <a href="../mime/mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="../mime/smtp.html">smtp</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key294">ftp</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key293">rfc 959</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/ftpd/ftpd.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>ftpd - Tcl FTP Server Package</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>ftpd - Tcl FTP Server Package</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ftpd.man' by tcllib/doctools with format 'html'
   -->
<!-- ftpd.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ftpd(n) 1.3 tcllib &quot;Tcl FTP Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ftpd - Tcl FTP server implementation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ftpd.man' by tcllib/doctools with format 'html'
   -->
<! -- ftpd.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ftpd(n) 1.3 tcllib &quot;Tcl FTP Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ftpd - Tcl FTP server implementation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ftpd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ftp">ftp</a>, <a href="../../../../index.html#ftpd">ftpd</a>, <a href="../../../../index.html#ftpserver">ftpserver</a>, <a href="../../../../index.html#rfc_959">rfc 959</a>, <a href="../../../../index.html#services">services</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





331
332
333
334
335
336
337






338
339
340
341
342
343
344
345
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ftpd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key294">ftp</a>, <a href="../../../../index.html#key607">ftpd</a>, <a href="../../../../index.html#key606">ftpserver</a>, <a href="../../../../index.html#key293">rfc 959</a>, <a href="../../../../index.html#key605">services</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/fumagic/cfront.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>fileutil::magic::cfront - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>fileutil::magic::cfront - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'cfront.man' by tcllib/doctools with format 'html'
   -->
<!-- fileutil::magic::cfront.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::cfront(n) 1.2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::cfront - Generator core for compiler of magic(5) files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'cfront.man' by tcllib/doctools with format 'html'
   -->
<! -- fileutil::magic::cfront.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::cfront(n) 1.2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::cfront - Generator core for compiler of magic(5) files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#file_recognition">file recognition</a>, <a href="../../../../index.html#file_type">file type</a>, <a href="../../../../index.html#file_utilities">file utilities</a>, <a href="../../../../index.html#mime">mime</a>, <a href="../../../../index.html#type">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





172
173
174
175
176
177
178






179
180
181
182
183
184
185
186
187
188
189
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key116">file recognition</a>, <a href="../../../../index.html#key118">file type</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key230">mime</a>, <a href="../../../../index.html#key117">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/fumagic/cgen.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>fileutil::magic::cgen - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>fileutil::magic::cgen - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'cgen.man' by tcllib/doctools with format 'html'
   -->
<!-- fileutil::magic::cgen.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::cgen(n) 1.2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::cgen - Generator core for compiler of magic(5) files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'cgen.man' by tcllib/doctools with format 'html'
   -->
<! -- fileutil::magic::cgen.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::cgen(n) 1.2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::cgen - Generator core for compiler of magic(5) files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#file_recognition">file recognition</a>, <a href="../../../../index.html#file_type">file type</a>, <a href="../../../../index.html#file_utilities">file utilities</a>, <a href="../../../../index.html#mime">mime</a>, <a href="../../../../index.html#type">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





168
169
170
171
172
173
174






175
176
177
178
179
180
181
182
183
184
185
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key116">file recognition</a>, <a href="../../../../index.html#key118">file type</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key230">mime</a>, <a href="../../../../index.html#key117">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/fumagic/filetypes.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>fileutil::magic::filetype - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>fileutil::magic::filetype - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'filetypes.man' by tcllib/doctools with format 'html'
   -->
<!-- fileutil::magic::filetype.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::filetype(n) 2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::filetype - Procedures implementing file-type recognition</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">REFERENCES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">fileutil::magic::filetype <span class="opt">?2.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::magic::filetype</b> <i class="arg">filename</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>







|

|



|
|
|
|
|
|


|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'filetypes.man' by tcllib/doctools with format 'html'
   -->
<! -- fileutil::magic::filetype.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::filetype(n) 1.2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::filetype - Procedures implementing file-type recognition</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">REFERENCES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">fileutil::magic::filetype <span class="opt">?1.2.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::magic::filetype</b> <i class="arg">filename</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#file_recognition">file recognition</a>, <a href="../../../../index.html#file_type">file type</a>, <a href="../../../../index.html#file_utilities">file utilities</a>, <a href="../../../../index.html#type">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





160
161
162
163
164
165
166






167
168
169
170
171
172
173
174
175
176
177
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key116">file recognition</a>, <a href="../../../../index.html#key118">file type</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key117">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/fumagic/rtcore.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>fileutil::magic::rt - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>fileutil::magic::rt - file utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'rtcore.man' by tcllib/doctools with format 'html'
   -->
<!-- fileutil::magic::rt.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::rt(n) 2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::rt - Runtime core for file type recognition engines written in pure Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">NUMERIC TYPES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">fileutil::magic::rt <span class="opt">?2.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::magic::rt::&gt;</b></a></li>
<li><a href="#2"><b class="cmd">::fileutil::magic::rt::&lt;</b></a></li>
<li><a href="#3"><b class="cmd">::fileutil::magic::rt::open</b> <i class="arg">filename</i></a></li>
<li><a href="#4"><b class="cmd">::fileutil::magic::rt::close</b></a></li>
<li><a href="#5"><b class="cmd">::fileutil::magic::rt::file_start</b> <i class="arg">name</i></a></li>







|

|



|
|
|
|
|
|


|




















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'rtcore.man' by tcllib/doctools with format 'html'
   -->
<! -- fileutil::magic::rt.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">fileutil::magic::rt(n) 1.2.0 tcllib &quot;file utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>fileutil::magic::rt - Runtime core for file type recognition engines written in pure Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">NUMERIC TYPES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">fileutil::magic::rt <span class="opt">?1.2.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::fileutil::magic::rt::&gt;</b></a></li>
<li><a href="#2"><b class="cmd">::fileutil::magic::rt::&lt;</b></a></li>
<li><a href="#3"><b class="cmd">::fileutil::magic::rt::open</b> <i class="arg">filename</i></a></li>
<li><a href="#4"><b class="cmd">::fileutil::magic::rt::close</b></a></li>
<li><a href="#5"><b class="cmd">::fileutil::magic::rt::file_start</b> <i class="arg">name</i></a></li>
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#file_recognition">file recognition</a>, <a href="../../../../index.html#file_type">file type</a>, <a href="../../../../index.html#file_utilities">file utilities</a>, <a href="../../../../index.html#mime">mime</a>, <a href="../../../../index.html#type">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





317
318
319
320
321
322
323






324
325
326
327
328
329
330
331
332
333
334
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>fileutil :: magic</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>file(1), <a href="../fileutil/fileutil.html">fileutil</a>, magic(5)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key116">file recognition</a>, <a href="../../../../index.html#key118">file type</a>, <a href="../../../../index.html#key115">file utilities</a>, <a href="../../../../index.html#key230">mime</a>, <a href="../../../../index.html#key117">type</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/generator/generator.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>generator - Tcl Generator Commands</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>generator - Tcl Generator Commands</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'generator.man' by tcllib/doctools with format 'html'
   -->
<!-- generator.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">generator(n) 0.1 tcllib &quot;Tcl Generator Commands&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>generator - Procedures for creating and using generators.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'generator.man' by tcllib/doctools with format 'html'
   -->
<! -- generator.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">generator(n) 0.1 tcllib &quot;Tcl Generator Commands&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>generator - Procedures for creating and using generators.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
implement custom control structures, as many such structures can be recast as
generators, leading to both a simpler implementation and a more standardised
interface. The generator mechanism is built on top of the Tcl 8.6 coroutine
mechanism.</p>
<p>The package exports a single ensemble command, <b class="cmd">generator</b>. All
functionality is provided as subcommands of this command. The core subcommands
of the package are <b class="method">define</b>, <b class="method">yield</b>, and <b class="method">foreach</b>. The
<b class="method">define</b> command works like Tcl's <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> command, but creates a
generator procedure; that is, a procedure that returns a generator when called.
The generator itself is a command that can be called multiple times: each time
it returns the next value in the generated series. When the
series has been exhausted, the generator command returns an empty list and then
destroys itself. Rather than manually call a generator, however, the package
also provides a flexible <b class="method">foreach</b> command that loops through the values of
one or more generators. This loop construct mimicks the functionality of the
built-in Tcl <b class="cmd"><a href="../../../../index.html#foreach">foreach</a></b> command, including handling multiple return values
and looping over multiple generators at once. Writing a generator is also a
simple task, much like writing a normal procedure: simply use the <b class="method">define</b>
command to define the generator, and then call <b class="method">yield</b> instead of <b class="cmd"><a href="../../../../index.html#return">return</a></b>.
For example, we can define a generator for looping through the integers
in a particular range:</p>
<pre class="doctools_example">
    generator define range {n m} {
        for {set i $n} {$i &lt;= $m} {incr i} { generator yield $i }
    }
    generator foreach x [range 1 10] {







|







|


|







185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
implement custom control structures, as many such structures can be recast as
generators, leading to both a simpler implementation and a more standardised
interface. The generator mechanism is built on top of the Tcl 8.6 coroutine
mechanism.</p>
<p>The package exports a single ensemble command, <b class="cmd">generator</b>. All
functionality is provided as subcommands of this command. The core subcommands
of the package are <b class="method">define</b>, <b class="method">yield</b>, and <b class="method">foreach</b>. The
<b class="method">define</b> command works like Tcl's <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> command, but creates a
generator procedure; that is, a procedure that returns a generator when called.
The generator itself is a command that can be called multiple times: each time
it returns the next value in the generated series. When the
series has been exhausted, the generator command returns an empty list and then
destroys itself. Rather than manually call a generator, however, the package
also provides a flexible <b class="method">foreach</b> command that loops through the values of
one or more generators. This loop construct mimicks the functionality of the
built-in Tcl <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b> command, including handling multiple return values
and looping over multiple generators at once. Writing a generator is also a
simple task, much like writing a normal procedure: simply use the <b class="method">define</b>
command to define the generator, and then call <b class="method">yield</b> instead of <b class="cmd"><a href="../../../../index.html#key187">return</a></b>.
For example, we can define a generator for looping through the integers
in a particular range:</p>
<pre class="doctools_example">
    generator define range {n m} {
        for {set i $n} {$i &lt;= $m} {incr i} { generator yield $i }
    }
    generator foreach x [range 1 10] {
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
    }
</pre>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">generator</b> <b class="method">define</b> <i class="arg">name</i> <i class="arg">params</i> <i class="arg">body</i></a></dt>
<dd><p>Creates a new generator procedure. The arguments to the command are identical to
those for <b class="cmd"><a href="../../../../index.html#proc">proc</a></b>: a <i class="arg">name</i>, a list of parameters, and a body. The
parameter list format is identical to a procedure. In particular, default values
and the <span class="opt">?args?</span> syntax can be used as usual. Each time the resulting
generator procedure is called it creates a new generator command (coroutine)
that will yield a list of values on each call. Each result from a generator is
guaranteed to be a non-empty list of values. When a generator is exhausted it
returns an empty list and then destroys itself to free up resources. It is an
error to attempt to call an exhausted generator as the command no longer exists.</p></dd>
<dt><a name="2"><b class="cmd">generator</b> <b class="method">yield</b> <i class="arg">arg</i> <span class="opt">?<i class="arg">args..</i>?</span></a></dt>
<dd><p>Used in the definition of a generator, this command returns the next set of
values to the consumer. Once the <b class="method">yield</b> command has been called the
generator will suspend to allow the consumer to process that value. When the
next value is requested, the generator will resume as if the yield command had
just returned, and can continue processing to yield the next result. The
<b class="method">yield</b> command must be called with at least one argument, but can be called with
multiple arguments, in which case this is equivalent to calling <b class="method">yield</b>
once for each argument.</p></dd>
<dt><a name="3"><b class="cmd">generator</b> <b class="method">foreach</b> <i class="arg">varList</i> <i class="arg">generator</i> <i class="arg">varList</i> <i class="arg">generator</i> <span class="opt">?...?</span> <i class="arg">body</i></a></dt>
<dd><p>Loops through one or more generators, assigning the next values to variables and
then executing the loop body. Works much like the built-in <b class="cmd"><a href="../../../../index.html#foreach">foreach</a></b>
command, but working with generators rather than lists. Multiple generators can
be iterated over in parallel, and multiple results can be retrieved from a
single generator at once.  Like the built-in <b class="cmd"><a href="../../../../index.html#foreach">foreach</a></b>, the loop will
continue until all of the generators have been exhausted: variables for
generators that are exhausted early will be set to the empty string.</p>
<p>The <b class="method">foreach</b> command will automatically clean-up all of the generators
at the end of the loop, regardless of whether the loop terminated early or not.
This behaviour is provided as a convenience to avoid having to explicitly
clean up a generator in the usual cases. Generators can however be destroyed
before the end of the loop, in which case the loop will continue as normal until







|


















|


|







228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
    }
</pre>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">generator</b> <b class="method">define</b> <i class="arg">name</i> <i class="arg">params</i> <i class="arg">body</i></a></dt>
<dd><p>Creates a new generator procedure. The arguments to the command are identical to
those for <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>: a <i class="arg">name</i>, a list of parameters, and a body. The
parameter list format is identical to a procedure. In particular, default values
and the <span class="opt">?args?</span> syntax can be used as usual. Each time the resulting
generator procedure is called it creates a new generator command (coroutine)
that will yield a list of values on each call. Each result from a generator is
guaranteed to be a non-empty list of values. When a generator is exhausted it
returns an empty list and then destroys itself to free up resources. It is an
error to attempt to call an exhausted generator as the command no longer exists.</p></dd>
<dt><a name="2"><b class="cmd">generator</b> <b class="method">yield</b> <i class="arg">arg</i> <span class="opt">?<i class="arg">args..</i>?</span></a></dt>
<dd><p>Used in the definition of a generator, this command returns the next set of
values to the consumer. Once the <b class="method">yield</b> command has been called the
generator will suspend to allow the consumer to process that value. When the
next value is requested, the generator will resume as if the yield command had
just returned, and can continue processing to yield the next result. The
<b class="method">yield</b> command must be called with at least one argument, but can be called with
multiple arguments, in which case this is equivalent to calling <b class="method">yield</b>
once for each argument.</p></dd>
<dt><a name="3"><b class="cmd">generator</b> <b class="method">foreach</b> <i class="arg">varList</i> <i class="arg">generator</i> <i class="arg">varList</i> <i class="arg">generator</i> <span class="opt">?...?</span> <i class="arg">body</i></a></dt>
<dd><p>Loops through one or more generators, assigning the next values to variables and
then executing the loop body. Works much like the built-in <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b>
command, but working with generators rather than lists. Multiple generators can
be iterated over in parallel, and multiple results can be retrieved from a
single generator at once.  Like the built-in <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b>, the loop will
continue until all of the generators have been exhausted: variables for
generators that are exhausted early will be set to the empty string.</p>
<p>The <b class="method">foreach</b> command will automatically clean-up all of the generators
at the end of the loop, regardless of whether the loop terminated early or not.
This behaviour is provided as a convenience to avoid having to explicitly
clean up a generator in the usual cases. Generators can however be destroyed
before the end of the loop, in which case the loop will continue as normal until
504
505
506
507
508
509
510
511
512
513
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">BUGS, IDEAS, FEEDBACK</a></h2>
<p>Please report any errors in this document, or in the package it describes, to
<a href="mailto:nem@cs.nott.ac.uk">Neil Madden</a>.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#control_structure">control structure</a>, <a href="../../../../index.html#coroutine">coroutine</a>, <a href="../../../../index.html#filter">filter</a>, <a href="../../../../index.html#foldl">foldl</a>, <a href="../../../../index.html#foldr">foldr</a>, <a href="../../../../index.html#foreach">foreach</a>, <a href="../../../../index.html#generator">generator</a>, <a href="../../../../index.html#iterator">iterator</a>, <a href="../../../../index.html#map">map</a>, <a href="../../../../index.html#reduce">reduce</a>, <a href="../../../../index.html#scanl">scanl</a></p>
</div>
</div></body></html>







|


504
505
506
507
508
509
510
511
512
513
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">BUGS, IDEAS, FEEDBACK</a></h2>
<p>Please report any errors in this document, or in the package it describes, to
<a href="mailto:nem@cs.nott.ac.uk">Neil Madden</a>.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key224">control structure</a>, <a href="../../../../index.html#key219">coroutine</a>, <a href="../../../../index.html#key223">filter</a>, <a href="../../../../index.html#key221">foldl</a>, <a href="../../../../index.html#key226">foldr</a>, <a href="../../../../index.html#key218">foreach</a>, <a href="../../../../index.html#key225">generator</a>, <a href="../../../../index.html#key222">iterator</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key217">reduce</a>, <a href="../../../../index.html#key220">scanl</a></p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/gpx/gpx.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>gpx - GPS eXchange Format (GPX)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>gpx - GPS eXchange Format (GPX)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'gpx.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2010, Keith Vetter &amp;lt;kvetter@gmail.com&amp;gt;
   -->
<!-- gpx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">gpx(n) 0.9 tcllib &quot;GPS eXchange Format (GPX)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>gpx - Extracts waypoints, tracks and routes from GPX files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'gpx.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2010, Keith Vetter &lt;kvetter@gmail.com&gt;
   -->
<! -- gpx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">gpx(n) 0.9 tcllib &quot;GPS eXchange Format (GPX)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>gpx - Extracts waypoints, tracks and routes from GPX files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>gpx</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#gps">gps</a>, <a href="../../../../index.html#gpx">gpx</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, Keith Vetter &lt;kvetter@gmail.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








257
258
259
260
261
262
263






264
265
266
267
268
269
270
271
272
273
274
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>gpx</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key408">gps</a>, <a href="../../../../index.html#key669">gpx</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, Keith Vetter &lt;kvetter@gmail.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_aycock/aycock.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::aycock - Aycock-Horspool-Earley parser generator for Tcl</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::aycock - Aycock-Horspool-Earley parser generator for Tcl</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'aycock.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 by Kevin B. Kenny &amp;lt;kennykb@acm.org&amp;gt;   -- Redistribution permitted under the terms of the Open Publication License &amp;lt;http://www.opencontent.org/openpub/&amp;gt;
   -->
<!-- grammar::aycock.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::aycock(n) 1.0 tcllib &quot;Aycock-Horspool-Earley parser generator for Tcl&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::aycock - Aycock-Horspool-Earley parser generator for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'aycock.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 by Kevin B. Kenny &lt;kennykb@acm.org&gt;   -- Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;
   -->
<! -- grammar::aycock.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::aycock(n) 1.0 tcllib &quot;Aycock-Horspool-Earley parser generator for Tcl&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::aycock - Aycock-Horspool-Earley parser generator for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
</pre>
<p>The example, when run, prints <b class="const">40</b>.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">KEYWORDS</a></h2>
<p>Aycock, Earley, Horspool, parser, compiler</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ambiguous">ambiguous</a>, <a href="../../../../index.html#aycock">aycock</a>, <a href="../../../../index.html#earley">earley</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#horspool">horspool</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 by Kevin B. Kenny &lt;kennykb@acm.org&gt;<br>
Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;</p>
</div>
</div></body></html>







|









233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
</pre>
<p>The example, when run, prints <b class="const">40</b>.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">KEYWORDS</a></h2>
<p>Aycock, Earley, Horspool, parser, compiler</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key823">ambiguous</a>, <a href="../../../../index.html#key826">aycock</a>, <a href="../../../../index.html#key825">earley</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key824">horspool</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 by Kevin B. Kenny &lt;kennykb@acm.org&gt;<br>
Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_fa/dacceptor.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::fa::dacceptor - Finite automaton operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::fa::dacceptor - Finite automaton operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'dacceptor.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::fa::dacceptor.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa::dacceptor(n) 0.1.1 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa::dacceptor - Create and use deterministic acceptors</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'dacceptor.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::fa::dacceptor.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa::dacceptor(n) 0.1.1 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa::dacceptor - Create and use deterministic acceptors</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#acceptance">acceptance</a>, <a href="../../../../index.html#acceptor">acceptor</a>, <a href="../../../../index.html#automaton">automaton</a>, <a href="../../../../index.html#finite_automaton">finite automaton</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#regular_expression">regular expression</a>, <a href="../../../../index.html#regular_grammar">regular grammar</a>, <a href="../../../../index.html#regular_languages">regular languages</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








194
195
196
197
198
199
200






201
202
203
204
205
206
207
208
209
210
211
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key326">acceptance</a>, <a href="../../../../index.html#key323">acceptor</a>, <a href="../../../../index.html#key320">automaton</a>, <a href="../../../../index.html#key325">finite automaton</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key322">regular grammar</a>, <a href="../../../../index.html#key321">regular languages</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_fa/dexec.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::fa::dexec - Finite automaton operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::fa::dexec - Finite automaton operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'dexec.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2007 Bogdan &amp;lt;rftghost@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::fa::dexec.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa::dexec(n) 0.2 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa::dexec - Execute deterministic finite automatons</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'dexec.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;   -- Copyright &copy; 2007 Bogdan &lt;rftghost@users.sourceforge.net&gt;
   -->
<! -- grammar::fa::dexec.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa::dexec(n) 0.2 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa::dexec - Execute deterministic finite automatons</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#automaton">automaton</a>, <a href="../../../../index.html#execution">execution</a>, <a href="../../../../index.html#finite_automaton">finite automaton</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#regular_expression">regular expression</a>, <a href="../../../../index.html#regular_grammar">regular grammar</a>, <a href="../../../../index.html#regular_languages">regular languages</a>, <a href="../../../../index.html#running">running</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2007 Bogdan &lt;rftghost@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|









250
251
252
253
254
255
256






257
258
259
260
261
262
263
264
265
266
267
268
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key320">automaton</a>, <a href="../../../../index.html#key430">execution</a>, <a href="../../../../index.html#key325">finite automaton</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key322">regular grammar</a>, <a href="../../../../index.html#key321">regular languages</a>, <a href="../../../../index.html#key431">running</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2007 Bogdan &lt;rftghost@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_fa/fa.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::fa - Finite automaton operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::fa - Finite automaton operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'fa.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::fa.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa(n) 0.4 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa - Create and manipulate finite automatons</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'fa.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::fa.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa(n) 0.4 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa - Create and manipulate finite automatons</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
in a very simple way :)</p>
<pre class="doctools_example">
    Drive -- yellow --&gt; Brake -- red --&gt; (Stop) -- red/yellow --&gt; Attention -- green --&gt; Drive
    (...) is the start state.
</pre>
<p>a possible serialization is</p>
<pre class="doctools_example">
    grammar::fa \
    {yellow red green red/yellow} \
    {Drive     {0 0 {yellow     Brake}} \
     Brake     {0 0 {red        Stop}} \
     Stop      {1 0 {red/yellow Attention}} \
     Attention {0 0 {green      Drive}}}
</pre>
<p>A possible one, because I did not care about creation order here</p></dd>
<dt><a name="8"><i class="arg">faName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></dt>
<dd><p>This is the complement to <b class="method">serialize</b>. It replaces the
automaton definition in <i class="arg">faName</i> with the automaton described by
the <i class="arg">serialization</i> value. The old contents of <i class="arg">faName</i> are







|
|
|
|
|







310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
in a very simple way :)</p>
<pre class="doctools_example">
    Drive -- yellow --&gt; Brake -- red --&gt; (Stop) -- red/yellow --&gt; Attention -- green --&gt; Drive
    (...) is the start state.
</pre>
<p>a possible serialization is</p>
<pre class="doctools_example">
    grammar::fa \\
    {yellow red green red/yellow} \\
    {Drive     {0 0 {yellow     Brake}} \\
     Brake     {0 0 {red        Stop}} \\
     Stop      {1 0 {red/yellow Attention}} \\
     Attention {0 0 {green      Drive}}}
</pre>
<p>A possible one, because I did not care about creation order here</p></dd>
<dt><a name="8"><i class="arg">faName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></dt>
<dd><p>This is the complement to <b class="method">serialize</b>. It replaces the
automaton definition in <i class="arg">faName</i> with the automaton described by
the <i class="arg">serialization</i> value. The old contents of <i class="arg">faName</i> are
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<dt><a name="18"><i class="arg">faName</i> <b class="method">start?set</b> <i class="arg">stateset</i></a></dt>
<dd><p>A predicate. It tests if the set of states <i class="arg">stateset</i> contains at
least one start state. They operation will fail if the set contains an
element which is not a known state.
The result is a boolean value. It will be set to <b class="const">true</b> if a
start state is present in <i class="arg">stateset</i>, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="19"><i class="arg">faName</i> <b class="method">finalstates</b></a></dt>
<dd><p>Returns the set of states which are marked as <i class="term"><a href="../../../../index.html#final">final</a></i> states,
also known as <i class="term">accepting</i> states.
See <span class="sectref"><a href="#section5">FINITE AUTOMATONS</a></span> for explanations what this means.</p></dd>
<dt><a name="20"><i class="arg">faName</i> <b class="method">final</b> <b class="method">add</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></dt>
<dd><p>Mark the states <i class="arg">s1</i>, <i class="arg">s2</i>, et cetera in the FA <i class="arg">faName</i>
as <i class="term"><a href="../../../../index.html#final">final</a></i> (aka <i class="term">accepting</i>).</p></dd>
<dt><a name="21"><i class="arg">faName</i> <b class="method">final</b> <b class="method">remove</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></dt>
<dd><p>Mark the states <i class="arg">s1</i>, <i class="arg">s2</i>, et cetera in the FA <i class="arg">faName</i>
as <i class="term">not final</i> (aka <i class="term">not accepting</i>).</p></dd>
<dt><a name="22"><i class="arg">faName</i> <b class="method">final?</b> <i class="arg">s</i></a></dt>
<dd><p>A predicate. It tests if the state <i class="arg">s</i> in the FA <i class="arg">faName</i> is
<i class="term"><a href="../../../../index.html#final">final</a></i> or not.
The result is a boolean value. It will be set to <b class="const">true</b> if the
state <i class="arg">s</i> is <i class="term"><a href="../../../../index.html#final">final</a></i>, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="23"><i class="arg">faName</i> <b class="method">final?set</b> <i class="arg">stateset</i></a></dt>
<dd><p>A predicate. It tests if the set of states <i class="arg">stateset</i> contains at
least one final state. They operation will fail if the set contains an
element which is not a known state.
The result is a boolean value. It will be set to <b class="const">true</b> if a
final state is present in <i class="arg">stateset</i>, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="24"><i class="arg">faName</i> <b class="method">symbols</b></a></dt>







|




|





|

|







366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
<dt><a name="18"><i class="arg">faName</i> <b class="method">start?set</b> <i class="arg">stateset</i></a></dt>
<dd><p>A predicate. It tests if the set of states <i class="arg">stateset</i> contains at
least one start state. They operation will fail if the set contains an
element which is not a known state.
The result is a boolean value. It will be set to <b class="const">true</b> if a
start state is present in <i class="arg">stateset</i>, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="19"><i class="arg">faName</i> <b class="method">finalstates</b></a></dt>
<dd><p>Returns the set of states which are marked as <i class="term"><a href="../../../../index.html#key160">final</a></i> states,
also known as <i class="term">accepting</i> states.
See <span class="sectref"><a href="#section5">FINITE AUTOMATONS</a></span> for explanations what this means.</p></dd>
<dt><a name="20"><i class="arg">faName</i> <b class="method">final</b> <b class="method">add</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></dt>
<dd><p>Mark the states <i class="arg">s1</i>, <i class="arg">s2</i>, et cetera in the FA <i class="arg">faName</i>
as <i class="term"><a href="../../../../index.html#key160">final</a></i> (aka <i class="term">accepting</i>).</p></dd>
<dt><a name="21"><i class="arg">faName</i> <b class="method">final</b> <b class="method">remove</b> <i class="arg">s1</i> <span class="opt">?<i class="arg">s2</i> ...?</span></a></dt>
<dd><p>Mark the states <i class="arg">s1</i>, <i class="arg">s2</i>, et cetera in the FA <i class="arg">faName</i>
as <i class="term">not final</i> (aka <i class="term">not accepting</i>).</p></dd>
<dt><a name="22"><i class="arg">faName</i> <b class="method">final?</b> <i class="arg">s</i></a></dt>
<dd><p>A predicate. It tests if the state <i class="arg">s</i> in the FA <i class="arg">faName</i> is
<i class="term"><a href="../../../../index.html#key160">final</a></i> or not.
The result is a boolean value. It will be set to <b class="const">true</b> if the
state <i class="arg">s</i> is <i class="term"><a href="../../../../index.html#key160">final</a></i>, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="23"><i class="arg">faName</i> <b class="method">final?set</b> <i class="arg">stateset</i></a></dt>
<dd><p>A predicate. It tests if the set of states <i class="arg">stateset</i> contains at
least one final state. They operation will fail if the set contains an
element which is not a known state.
The result is a boolean value. It will be set to <b class="const">true</b> if a
final state is present in <i class="arg">stateset</i>, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="24"><i class="arg">faName</i> <b class="method">symbols</b></a></dt>
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
<div id="section5" class="doctools_section"><h2><a name="section5">FINITE AUTOMATONS</a></h2>
<p>For the mathematically inclined, a FA is a 5-tuple (S,Sy,St,Fi,T) where</p>
<ul class="doctools_itemized">
<li><p>S is a set of <i class="term">states</i>,</p></li>
<li><p>Sy a set of <i class="term">input symbols</i>,</p></li>
<li><p>St is a subset of S, the set of <i class="term">start</i> states, also known as
<i class="term">initial</i> states.</p></li>
<li><p>Fi is a subset of S, the set of <i class="term"><a href="../../../../index.html#final">final</a></i> states, also known as
<i class="term">accepting</i>.</p></li>
<li><p>T is a function from S x (Sy + epsilon) to {S}, the <i class="term">transition function</i>.
Here <b class="const">epsilon</b> denotes the empty input symbol and is distinct
from all symbols in Sy; and {S} is the set of subsets of S. In other
words, T maps a combination of State and Input (which can be empty) to
a set of <i class="term">successor states</i>.</p></li>
</ul>
<p>In computer theory a FA is most often shown as a graph where the nodes
represent the states, and the edges between the nodes encode the
transition function: For all n in S' = T (s, sy) we have one edge
between the nodes representing s and n resp., labeled with sy. The
start and accepting states are encoded through distinct visual
markers, i.e. they are attributes of the nodes.</p>
<p>FA's are used to process streams of symbols over Sy.</p>
<p>A specific FA is said to <i class="term">accept</i> a finite stream sy_1 sy_2
... sy_n if there is a path in the graph of the FA beginning at a
state in St and ending at a state in Fi whose edges have the labels
sy_1, sy_2, etc. to sy_n.
The set of all strings accepted by the FA is the <i class="term">language</i> of
the FA. One important equivalence is that the set of languages which
can be accepted by an FA is the set of <i class="term"><a href="../../../../index.html#regular_languages">regular languages</a></i>.</p>
<p>Another important concept is that of deterministic FAs. A FA is said
to be <i class="term">deterministic</i> if for each string of input symbols there
is exactly one path in the graph of the FA beginning at the start
state and whose edges are labeled with the symbols in the string.
While it might seem that non-deterministic FAs to have more power of
recognition, this is not so. For each non-deterministic FA we can
construct a deterministic FA which accepts the same language (--&gt;
Thompson's subset construction).</p>
<p>While one of the premier applications of FAs is in <i class="term"><a href="../../../../index.html#parsing">parsing</a></i>,
especially in the <i class="term"><a href="../../../../index.html#lexer">lexer</a></i> stage (where symbols == characters),
this is not the only possibility by far.</p>
<p>Quite a lot of processes can be modeled as a FA, albeit with a
possibly large set of states. For these the notion of accepting states
is often less or not relevant at all. What is needed instead is the
ability to act to state changes in the FA, i.e. to generate some
output in response to the input.
This transforms a FA into a <i class="term">finite transducer</i>, which has an







|




















|








|
|







557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
<div id="section5" class="doctools_section"><h2><a name="section5">FINITE AUTOMATONS</a></h2>
<p>For the mathematically inclined, a FA is a 5-tuple (S,Sy,St,Fi,T) where</p>
<ul class="doctools_itemized">
<li><p>S is a set of <i class="term">states</i>,</p></li>
<li><p>Sy a set of <i class="term">input symbols</i>,</p></li>
<li><p>St is a subset of S, the set of <i class="term">start</i> states, also known as
<i class="term">initial</i> states.</p></li>
<li><p>Fi is a subset of S, the set of <i class="term"><a href="../../../../index.html#key160">final</a></i> states, also known as
<i class="term">accepting</i>.</p></li>
<li><p>T is a function from S x (Sy + epsilon) to {S}, the <i class="term">transition function</i>.
Here <b class="const">epsilon</b> denotes the empty input symbol and is distinct
from all symbols in Sy; and {S} is the set of subsets of S. In other
words, T maps a combination of State and Input (which can be empty) to
a set of <i class="term">successor states</i>.</p></li>
</ul>
<p>In computer theory a FA is most often shown as a graph where the nodes
represent the states, and the edges between the nodes encode the
transition function: For all n in S' = T (s, sy) we have one edge
between the nodes representing s and n resp., labeled with sy. The
start and accepting states are encoded through distinct visual
markers, i.e. they are attributes of the nodes.</p>
<p>FA's are used to process streams of symbols over Sy.</p>
<p>A specific FA is said to <i class="term">accept</i> a finite stream sy_1 sy_2
... sy_n if there is a path in the graph of the FA beginning at a
state in St and ending at a state in Fi whose edges have the labels
sy_1, sy_2, etc. to sy_n.
The set of all strings accepted by the FA is the <i class="term">language</i> of
the FA. One important equivalence is that the set of languages which
can be accepted by an FA is the set of <i class="term"><a href="../../../../index.html#key321">regular languages</a></i>.</p>
<p>Another important concept is that of deterministic FAs. A FA is said
to be <i class="term">deterministic</i> if for each string of input symbols there
is exactly one path in the graph of the FA beginning at the start
state and whose edges are labeled with the symbols in the string.
While it might seem that non-deterministic FAs to have more power of
recognition, this is not so. For each non-deterministic FA we can
construct a deterministic FA which accepts the same language (--&gt;
Thompson's subset construction).</p>
<p>While one of the premier applications of FAs is in <i class="term"><a href="../../../../index.html#key26">parsing</a></i>,
especially in the <i class="term"><a href="../../../../index.html#key257">lexer</a></i> stage (where symbols == characters),
this is not the only possibility by far.</p>
<p>Quite a lot of processes can be modeled as a FA, albeit with a
possibly large set of states. For these the notion of accepting states
is often less or not relevant at all. What is needed instead is the
ability to act to state changes in the FA, i.e. to generate some
output in response to the input.
This transforms a FA into a <i class="term">finite transducer</i>, which has an
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#automaton">automaton</a>, <a href="../../../../index.html#finite_automaton">finite automaton</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#regular_expression">regular expression</a>, <a href="../../../../index.html#regular_grammar">regular grammar</a>, <a href="../../../../index.html#regular_languages">regular languages</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








614
615
616
617
618
619
620






621
622
623
624
625
626
627
628
629
630
631
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key320">automaton</a>, <a href="../../../../index.html#key325">finite automaton</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key322">regular grammar</a>, <a href="../../../../index.html#key321">regular languages</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_fa/faop.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::fa::op - Finite automaton operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::fa::op - Finite automaton operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'faop.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::fa::op.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa::op(n) 0.4 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa::op - Operations on finite automatons</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'faop.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::fa::op.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::fa::op(n) 0.4 tcllib &quot;Finite automaton operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::fa::op - Operations on finite automatons</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
will fail as they are unable to construct internal and transient containers
to hold state and/or partial results.</p>
<p>Any container class using this package for complex operations should set
its own class command as the constructor. See package <b class="package"><a href="fa.html">grammar::fa</a></b>
for an example.</p></dd>
<dt><a name="2"><b class="cmd">::grammar::fa::op::reverse</b> <i class="arg">fa</i></a></dt>
<dd><p>Reverses the <i class="arg">fa</i>. This is done by reversing the direction of all
transitions and swapping the sets of <i class="term">start</i> and <i class="term"><a href="../../../../index.html#final">final</a></i>
states. The language of <i class="arg">fa</i> changes unpredictably.</p></dd>
<dt><a name="3"><b class="cmd">::grammar::fa::op::complete</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">sink</i>?</span></a></dt>
<dd><p>Completes the <i class="arg">fa</i> <i class="term">complete</i>, but nothing is done if the
<i class="arg">fa</i> is already <i class="term">complete</i>. This implies that only the first
in a series of multiple consecutive complete operations on <i class="arg">fa</i>
will perform anything. The remainder will be null operations.</p>
<p>The language of <i class="arg">fa</i> is unchanged by this operation.</p>







|







193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
will fail as they are unable to construct internal and transient containers
to hold state and/or partial results.</p>
<p>Any container class using this package for complex operations should set
its own class command as the constructor. See package <b class="package"><a href="fa.html">grammar::fa</a></b>
for an example.</p></dd>
<dt><a name="2"><b class="cmd">::grammar::fa::op::reverse</b> <i class="arg">fa</i></a></dt>
<dd><p>Reverses the <i class="arg">fa</i>. This is done by reversing the direction of all
transitions and swapping the sets of <i class="term">start</i> and <i class="term"><a href="../../../../index.html#key160">final</a></i>
states. The language of <i class="arg">fa</i> changes unpredictably.</p></dd>
<dt><a name="3"><b class="cmd">::grammar::fa::op::complete</b> <i class="arg">fa</i> <span class="opt">?<i class="arg">sink</i>?</span></a></dt>
<dd><p>Completes the <i class="arg">fa</i> <i class="term">complete</i>, but nothing is done if the
<i class="arg">fa</i> is already <i class="term">complete</i>. This implies that only the first
in a series of multiple consecutive complete operations on <i class="arg">fa</i>
will perform anything. The remainder will be null operations.</p>
<p>The language of <i class="arg">fa</i> is unchanged by this operation.</p>
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#automaton">automaton</a>, <a href="../../../../index.html#finite_automaton">finite automaton</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#regular_expression">regular expression</a>, <a href="../../../../index.html#regular_grammar">regular grammar</a>, <a href="../../../../index.html#regular_languages">regular languages</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








450
451
452
453
454
455
456






457
458
459
460
461
462
463
464
465
466
467
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_fa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key320">automaton</a>, <a href="../../../../index.html#key325">finite automaton</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key322">regular grammar</a>, <a href="../../../../index.html#key321">regular languages</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_me/gasm.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::me::cpu::gasm - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::me::cpu::gasm - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'gasm.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::me::cpu::gasm.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::cpu::gasm(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::cpu::gasm - ME assembler</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'gasm.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::me::cpu::gasm.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::cpu::gasm(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::cpu::gasm - ME assembler</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#assembler">assembler</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#graph">graph</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#tree">tree</a>, <a href="../../../../index.html#virtual_machine">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








431
432
433
434
435
436
437






438
439
440
441
442
443
444
445
446
447
448
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key318">assembler</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key305">graph</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key300">tree</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_me/me_ast.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::me_ast - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::me_ast - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'me_ast.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::me_ast.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me_ast(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me_ast - Various representations of ASTs</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'me_ast.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::me_ast.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me_ast(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me_ast - Various representations of ASTs</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies various representations for the
<i class="term"><a href="../../../../index.html#abstract_syntax_tree">abstract syntax tree</a></i>s (short <i class="term"><a href="../../../../index.html#ast">AST</a></i>) generated by
instances of ME virtual machines, independent of variant.
Please go and read the document <b class="syscmd"><a href="me_intro.html">grammar::me_intro</a></b> first if
you do not know what a ME virtual machine is.</p>
<p>ASTs and all the representations we specify distinguish between two
types of nodes, namely:</p>
<dl class="doctools_definitions">
<dt>Terminal</dt>







|







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document specifies various representations for the
<i class="term"><a href="../../../../index.html#key746">abstract syntax tree</a></i>s (short <i class="term"><a href="../../../../index.html#key815">AST</a></i>) generated by
instances of ME virtual machines, independent of variant.
Please go and read the document <b class="syscmd"><a href="me_intro.html">grammar::me_intro</a></b> first if
you do not know what a ME virtual machine is.</p>
<p>ASTs and all the representations we specify distinguish between two
types of nodes, namely:</p>
<dl class="doctools_definitions">
<dt>Terminal</dt>
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ast">AST</a>, <a href="../../../../index.html#abstract_syntax_tree">abstract syntax tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








204
205
206
207
208
209
210






211
212
213
214
215
216
217
218
219
220
221
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key815">AST</a>, <a href="../../../../index.html#key746">abstract syntax tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_me/me_cpu.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::me::cpu - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::me::cpu - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'me_cpu.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005-2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::me::cpu.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::cpu(n) 0.2 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::cpu - Virtual machine implementation II for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'me_cpu.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005-2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::me::cpu.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::cpu(n) 0.2 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::cpu - Virtual machine implementation II for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#virtual_machine">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








343
344
345
346
347
348
349






350
351
352
353
354
355
356
357
358
359
360
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_me/me_cpucore.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::me::cpu::core - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::me::cpu::core - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'me_cpucore.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005-2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::me::cpu::core.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::cpu::core(n) 0.2 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::cpu::core - ME virtual machine state manipulation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'me_cpucore.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005-2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::me::cpu::core.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::cpu::core(n) 0.2 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::cpu::core - ME virtual machine state manipulation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
</ul>
<p>If no limit <i class="arg">n</i> was set only the last two conditions are checked
for.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">MATCH PROGRAM REPRESENTATION</a></h3>
<p>A match program is represented by nested Tcl list. The first element,
<i class="term">asm</i>, is a list of integer numbers, the instructions to execute,
and their arguments. The second element, <i class="term"><a href="../../../../index.html#pool">pool</a></i>, is a list of
strings, referenced by the instructions, for error messages, token
names, etc. The third element, <i class="term">tokmap</i>, provides ordering
information for the tokens, mapping their names to their numerical
rank. This element can be empty, forcing lexicographic comparison when
matching ranges.</p>
<p>All ME instructions are encoded as integer numbers, with the mapping
given below. A number of the instructions, those which handle error
messages, have been given an additional argument to supply that
message explicitly instead of having it constructed from token names,
etc. This allows the machine state to store only the message ids
instead of the full strings.</p>
<p>Jump destination arguments are absolute indices into the <i class="term">asm</i>
element, refering to the instruction to jump to. Any string arguments
are absolute indices into the <i class="term"><a href="../../../../index.html#pool">pool</a></i> element. Tokens, characters,
messages, and token (actually character) classes to match are coded as
references into the <i class="term"><a href="../../../../index.html#pool">pool</a></i> as well.</p>
<ol class="doctools_enumerated">
<li><p>&quot;<b class="cmd">ict_advance</b> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ict_match_token</b> <i class="arg">tok</i> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ict_match_tokrange</b> <i class="arg">tokbegin</i> <i class="arg">tokend</i> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ict_match_tokclass</b> <i class="arg">code</i> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">inc_restore</b> <i class="arg">branchlabel</i> <i class="arg">nt</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">inc_save</b> <i class="arg">nt</i>&quot;</p></li>







|













|

|







312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
</ul>
<p>If no limit <i class="arg">n</i> was set only the last two conditions are checked
for.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">MATCH PROGRAM REPRESENTATION</a></h3>
<p>A match program is represented by nested Tcl list. The first element,
<i class="term">asm</i>, is a list of integer numbers, the instructions to execute,
and their arguments. The second element, <i class="term"><a href="../../../../index.html#key304">pool</a></i>, is a list of
strings, referenced by the instructions, for error messages, token
names, etc. The third element, <i class="term">tokmap</i>, provides ordering
information for the tokens, mapping their names to their numerical
rank. This element can be empty, forcing lexicographic comparison when
matching ranges.</p>
<p>All ME instructions are encoded as integer numbers, with the mapping
given below. A number of the instructions, those which handle error
messages, have been given an additional argument to supply that
message explicitly instead of having it constructed from token names,
etc. This allows the machine state to store only the message ids
instead of the full strings.</p>
<p>Jump destination arguments are absolute indices into the <i class="term">asm</i>
element, refering to the instruction to jump to. Any string arguments
are absolute indices into the <i class="term"><a href="../../../../index.html#key304">pool</a></i> element. Tokens, characters,
messages, and token (actually character) classes to match are coded as
references into the <i class="term"><a href="../../../../index.html#key304">pool</a></i> as well.</p>
<ol class="doctools_enumerated">
<li><p>&quot;<b class="cmd">ict_advance</b> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ict_match_token</b> <i class="arg">tok</i> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ict_match_tokrange</b> <i class="arg">tokbegin</i> <i class="arg">tokend</i> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">ict_match_tokclass</b> <i class="arg">code</i> <i class="arg">message</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">inc_restore</b> <i class="arg">branchlabel</i> <i class="arg">nt</i>&quot;</p></li>
<li><p>&quot;<b class="cmd">inc_save</b> <i class="arg">nt</i>&quot;</p></li>
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
<ol class="doctools_enumerated">
<li><p><i class="term">code</i>: Match instructions, see <span class="sectref"><a href="#subsection1">MATCH PROGRAM REPRESENTATION</a></span>.</p></li>
<li><p><i class="term">pc</i>:   Program counter, <i class="term">int</i>.</p></li>
<li><p><i class="term">halt</i>: Halt flag, <i class="term">boolean</i>.</p></li>
<li><p><i class="term">eof</i>:  Eof flag, <i class="term">boolean</i></p></li>
<li><p><i class="term">tc</i>:   Terminal cache, and input queue. Structure see below.</p></li>
<li><p><i class="term">cl</i>:   Current location, <i class="term">int</i>.</p></li>
<li><p><i class="term">ct</i>:   Current token, <i class="term"><a href="../../../../index.html#string">string</a></i>.</p></li>
<li><p><i class="term">ok</i>:   Match status, <i class="term">boolean</i>.</p></li>
<li><p><i class="term">sv</i>:   Semantic value, <i class="term"><a href="../../../../index.html#list">list</a></i>.</p></li>
<li><p><i class="term">er</i>:   Error status, <i class="term"><a href="../../../../index.html#list">list</a></i>.</p></li>
<li><p><i class="term">ls</i>:   Location stack, <i class="term"><a href="../../../../index.html#list">list</a></i>.</p></li>
<li><p><i class="term">as</i>:   AST stack, <i class="term"><a href="../../../../index.html#list">list</a></i>.</p></li>
<li><p><i class="term">ms</i>:   AST marker stack, <i class="term"><a href="../../../../index.html#list">list</a></i>.</p></li>
<li><p><i class="term">es</i>:   Error stack, <i class="term"><a href="../../../../index.html#list">list</a></i>.</p></li>
<li><p><i class="term">rs</i>:   Return stack, <i class="term"><a href="../../../../index.html#list">list</a></i>.</p></li>
<li><p><i class="term">nc</i>:   Nonterminal cache, <i class="term">dictionary</i>.</p></li>
</ol>
<p><i class="term">tc</i>, the input queue of tokens waiting for processing and the
terminal cache containing the tokens already processing are one
unified data structure simply holding all tokens and their
information, with the current location separating that which has been
processed from that which is waiting.
Each element of the queue/cache is a list containing the token, its
lexeme information, line number, and column index, in this order.</p>
<p>All stacks have their top element aat the end, i.e. pushing an item is
equivalent to appending to the list representing the stack, and
popping it removes the last element.</p>
<p><i class="term">er</i>, the error status is either empty or a list of two elements,
a location in the input, and a list of messages, encoded as references
into the <i class="term"><a href="../../../../index.html#pool">pool</a></i> element of the <i class="term">code</i>.</p>
<p><i class="term">nc</i>, the nonterminal cache is keyed by nonterminal name and
location, each value a four-element list containing current location,
match status, semantic value, and error status, in this order.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#virtual_machine">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

|
|
|
|
|
|
|














|











<
<
<
<
<
<


|








373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414






415
416
417
418
419
420
421
422
423
424
425
<ol class="doctools_enumerated">
<li><p><i class="term">code</i>: Match instructions, see <span class="sectref"><a href="#subsection1">MATCH PROGRAM REPRESENTATION</a></span>.</p></li>
<li><p><i class="term">pc</i>:   Program counter, <i class="term">int</i>.</p></li>
<li><p><i class="term">halt</i>: Halt flag, <i class="term">boolean</i>.</p></li>
<li><p><i class="term">eof</i>:  Eof flag, <i class="term">boolean</i></p></li>
<li><p><i class="term">tc</i>:   Terminal cache, and input queue. Structure see below.</p></li>
<li><p><i class="term">cl</i>:   Current location, <i class="term">int</i>.</p></li>
<li><p><i class="term">ct</i>:   Current token, <i class="term"><a href="../../../../index.html#key280">string</a></i>.</p></li>
<li><p><i class="term">ok</i>:   Match status, <i class="term">boolean</i>.</p></li>
<li><p><i class="term">sv</i>:   Semantic value, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">er</i>:   Error status, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">ls</i>:   Location stack, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">as</i>:   AST stack, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">ms</i>:   AST marker stack, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">es</i>:   Error stack, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">rs</i>:   Return stack, <i class="term"><a href="../../../../index.html#key302">list</a></i>.</p></li>
<li><p><i class="term">nc</i>:   Nonterminal cache, <i class="term">dictionary</i>.</p></li>
</ol>
<p><i class="term">tc</i>, the input queue of tokens waiting for processing and the
terminal cache containing the tokens already processing are one
unified data structure simply holding all tokens and their
information, with the current location separating that which has been
processed from that which is waiting.
Each element of the queue/cache is a list containing the token, its
lexeme information, line number, and column index, in this order.</p>
<p>All stacks have their top element aat the end, i.e. pushing an item is
equivalent to appending to the list representing the stack, and
popping it removes the last element.</p>
<p><i class="term">er</i>, the error status is either empty or a list of two elements,
a location in the input, and a list of messages, encoded as references
into the <i class="term"><a href="../../../../index.html#key304">pool</a></i> element of the <i class="term">code</i>.</p>
<p><i class="term">nc</i>, the nonterminal cache is keyed by nonterminal name and
location, each value a four-element list containing current location,
match status, semantic value, and error status, in this order.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_me/me_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::me_intro - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::me_intro - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'me_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::me_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me_intro(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me_intro - Introduction to virtual machines for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'me_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::me_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me_intro(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me_intro - Introduction to virtual machines for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is an introduction to and overview of the basic
facilities for the parsing and/or matching of <i class="term">token</i>
streams. One possibility often used for the token domain are
characters.</p>
<p>The packages themselves all provide variants of one
<i class="term"><a href="../../../../index.html#virtual_machine">virtual machine</a></i>, called a <i class="term">match engine</i> (short
<i class="term">ME</i>), which has all the facilities needed for the matching and
parsing of a stream, and which are either controlled directly, or are
customized with a match program. The virtual machine is basically a
pushdown automaton, with additional elements for backtracking and/or
handling of semantic data and construction of abstract syntax trees
(<i class="term"><a href="../../../../index.html#ast">AST</a></i>).</p>
<p>Because of the high degree of similarity in the actual implementations
of the aforementioned virtual machine and the data structures they
receive and generate these common parts are specified in a separate
document which will be referenced by the documentation for packages
actually implementing it.</p>
<p>The relevant documents are:</p>
<dl class="doctools_definitions">







|





|







124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This document is an introduction to and overview of the basic
facilities for the parsing and/or matching of <i class="term">token</i>
streams. One possibility often used for the token domain are
characters.</p>
<p>The packages themselves all provide variants of one
<i class="term"><a href="../../../../index.html#key24">virtual machine</a></i>, called a <i class="term">match engine</i> (short
<i class="term">ME</i>), which has all the facilities needed for the matching and
parsing of a stream, and which are either controlled directly, or are
customized with a match program. The virtual machine is basically a
pushdown automaton, with additional elements for backtracking and/or
handling of semantic data and construction of abstract syntax trees
(<i class="term"><a href="../../../../index.html#key815">AST</a></i>).</p>
<p>Because of the high degree of similarity in the actual implementations
of the aforementioned virtual machine and the data structures they
receive and generate these common parts are specified in a separate
document which will be referenced by the documentation for packages
actually implementing it.</p>
<p>The relevant documents are:</p>
<dl class="doctools_definitions">
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cfg">CFG</a>, <a href="../../../../index.html#cfl">CFL</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tpdl">TPDL</a>, <a href="../../../../index.html#context_free_grammar">context-free grammar</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a>, <a href="../../../../index.html#virtual_machine">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








165
166
167
168
169
170
171






172
173
174
175
176
177
178
179
180
181
182
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key22">CFG</a>, <a href="../../../../index.html#key27">CFL</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key25">TPDL</a>, <a href="../../../../index.html#key23">context-free grammar</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_me/me_tcl.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::me::tcl - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::me::tcl - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'me_tcl.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::me::tcl.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::tcl(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::tcl - Virtual machine implementation I for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'me_tcl.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::me::tcl.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::tcl(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::tcl - Virtual machine implementation I for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#virtual_machine">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








388
389
390
391
392
393
394






395
396
397
398
399
400
401
402
403
404
405
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_me/me_util.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::me::util - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::me::util - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'me_util.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::me::util.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::util(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::util - AST utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'me_util.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::me::util.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me::util(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me::util - AST utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#abstract_syntax_tree">abstract syntax tree</a>, <a href="../../../../index.html#syntax_tree">syntax tree</a>, <a href="../../../../index.html#tree">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








185
186
187
188
189
190
191






192
193
194
195
196
197
198
199
200
201
202
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key746">abstract syntax tree</a>, <a href="../../../../index.html#key745">syntax tree</a>, <a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_me/me_vm.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::me_vm - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::me_vm - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'me_vm.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::me_vm.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me_vm(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me_vm - Virtual machine for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'me_vm.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::me_vm.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::me_vm(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::me_vm - Virtual machine for parsing token streams</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Please go and read the document <b class="syscmd"><a href="me_intro.html">grammar::me_intro</a></b> first for
an overview of the various documents and their relations.</p>
<p>This document specifies a virtual machine for the controlled matching
and parsing of token streams, creating an
<i class="term"><a href="../../../../index.html#abstract_syntax_tree">abstract syntax tree</a></i> (short <i class="term"><a href="../../../../index.html#ast">AST</a></i>) reflecting the
structure of the input. Special machine features are the caching and
reuse of partial results, caching of the encountered input, and the
ability to backtrack in both input and AST creation.</p>
<p>These features make the specified virtual machine especially useful to
packrat parsers based on parsing expression grammars. It is however
not restricted to this type of parser. Normal LL and LR parsers can be
implemented with it as well.</p>







|







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Please go and read the document <b class="syscmd"><a href="me_intro.html">grammar::me_intro</a></b> first for
an overview of the various documents and their relations.</p>
<p>This document specifies a virtual machine for the controlled matching
and parsing of token streams, creating an
<i class="term"><a href="../../../../index.html#key746">abstract syntax tree</a></i> (short <i class="term"><a href="../../../../index.html#key815">AST</a></i>) reflecting the
structure of the input. Special machine features are the caching and
reuse of partial results, caching of the encountered input, and the
ability to backtrack in both input and AST creation.</p>
<p>These features make the specified virtual machine especially useful to
packrat parsers based on parsing expression grammars. It is however
not restricted to this type of parser. Normal LL and LR parsers can be
implemented with it as well.</p>
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#virtual_machine">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








535
536
537
538
539
540
541






542
543
544
545
546
547
548
549
550
551
552
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_me</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_peg/peg.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::peg - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::peg - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'peg.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::peg(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::peg - Create and manipulate parsing expression grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'peg.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::peg(n) 0.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::peg - Create and manipulate parsing expression grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
structure of the sentences. The two sets of symbols are distinctive,
and do not overlap. When speaking about symbols the word &quot;symbol&quot; is
often left out. The union of the sets of terminal and nonterminal
symbols is called the set of <i class="term">symbols</i>.</p>
<p>Here the set of <i class="term">terminal symbols</i> is not explicitly managed,
but implicitly defined as the set of all characters. Note that this
means that we inherit from Tcl the ability to handle all of Unicode.</p>
<p>A pair of <i class="term">nonterminal</i> and <i class="term"><a href="../../../../index.html#parsing_expression">parsing expression</a></i> is also
called a <i class="term">grammatical rule</i>, or <i class="term">rule</i> for short. In the
context of a rule the nonterminal is often called the left-hand-side
(LHS), and the parsing expression the right-hand-side (RHS).</p>
<p>The <i class="term">start expression</i> of a grammar is a parsing expression
from which all the sentences contained in the language specified by
the grammar are <i class="term">derived</i>.
To make the understanding of this term easier let us assume for a







|







185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
structure of the sentences. The two sets of symbols are distinctive,
and do not overlap. When speaking about symbols the word &quot;symbol&quot; is
often left out. The union of the sets of terminal and nonterminal
symbols is called the set of <i class="term">symbols</i>.</p>
<p>Here the set of <i class="term">terminal symbols</i> is not explicitly managed,
but implicitly defined as the set of all characters. Note that this
means that we inherit from Tcl the ability to handle all of Unicode.</p>
<p>A pair of <i class="term">nonterminal</i> and <i class="term"><a href="../../../../index.html#key8">parsing expression</a></i> is also
called a <i class="term">grammatical rule</i>, or <i class="term">rule</i> for short. In the
context of a rule the nonterminal is often called the left-hand-side
(LHS), and the parsing expression the right-hand-side (RHS).</p>
<p>The <i class="term">start expression</i> of a grammar is a parsing expression
from which all the sentences contained in the language specified by
the grammar are <i class="term">derived</i>.
To make the understanding of this term easier let us assume for a
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
    MulOp      &lt;- '*' / '/'
    Factor     &lt;- Term (AddOp Term)*
    AddOp      &lt;- '+'/'-'
    Term       &lt;- Number
</pre>
<p>a possible serialization is</p>
<pre class="doctools_example">
    grammar::peg \
    {Expression {/ {x ( Expression )} {x Factor {* {x MulOp Factor}}}} \
     Factor     {x Term {* {x AddOp Term}}} \
     Term       Number \
     MulOp      {/ * /} \
     AddOp      {/ + -} \
     Number     {x {? Sign} {+ Digit}} \
     Sign       {/ + -} \
     Digit      {/ 0 1 2 3 4 5 6 7 8 9} \
    } \
    {Expression value     Factor     value \
     Term       value     MulOp      value \
     AddOp      value     Number     value \
     Sign       value     Digit      value \
    }
    Expression
</pre>
<p>A possible one, because the order of the nonterminals in the
dictionary is not relevant.</p></dd>
<dt><a name="7"><i class="arg">pegName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></dt>
<dd><p>This is the complement to <b class="method">serialize</b>. It replaces the grammar







|
|
|
|
|
|
|
|
|
|
|
|
|
|







347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
    MulOp      &lt;- '*' / '/'
    Factor     &lt;- Term (AddOp Term)*
    AddOp      &lt;- '+'/'-'
    Term       &lt;- Number
</pre>
<p>a possible serialization is</p>
<pre class="doctools_example">
    grammar::peg \\
    {Expression {/ {x ( Expression )} {x Factor {* {x MulOp Factor}}}} \\
     Factor     {x Term {* {x AddOp Term}}} \\
     Term       Number \\
     MulOp      {/ * /} \\
     AddOp      {/ + -} \\
     Number     {x {? Sign} {+ Digit}} \\
     Sign       {/ + -} \\
     Digit      {/ 0 1 2 3 4 5 6 7 8 9} \\
    } \\
    {Expression value     Factor     value \\
     Term       value     MulOp      value \\
     AddOp      value     Number     value \\
     Sign       value     Digit      value \\
    }
    Expression
</pre>
<p>A possible one, because the order of the nonterminals in the
dictionary is not relevant.</p></dd>
<dt><a name="7"><i class="arg">pegName</i> <b class="method">deserialize</b> <i class="arg">serialization</i></a></dt>
<dd><p>This is the complement to <b class="method">serialize</b>. It replaces the grammar
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PARSING EXPRESSION GRAMMARS</a></h2>
<p>For the mathematically inclined, a PEG is a 4-tuple (VN,VT,R,eS) where</p>
<ul class="doctools_itemized">
<li><p>VN is a set of <i class="term">nonterminal symbols</i>,</p></li>
<li><p>VT is a set of <i class="term">terminal symbols</i>,</p></li>
<li><p>R is a finite set of rules, where each rule is a pair (A,e), A in VN,
and <i class="term"><a href="../../../../index.html#e">e</a></i> a <i class="term"><a href="../../../../index.html#parsing_expression">parsing expression</a></i>.</p></li>
<li><p>eS is a parsing expression, the <i class="term">start expression</i>.</p></li>
</ul>
<p>Further constraints are</p>
<ul class="doctools_itemized">
<li><p>The intersection of VN and VT is empty.</p></li>
<li><p>For all A in VT exists exactly one pair (A,e) in R. In other words, R
is a function from nonterminal symbols to parsing expressions.</p></li>
</ul>
<p>Parsing expression are inductively defined via</p>
<ul class="doctools_itemized">
<li><p>The empty string (epsilon) is a parsing expression.</p></li>
<li><p>A terminal symbol <i class="term">a</i> is a parsing expression.</p></li>
<li><p>A nonterminal symbol <i class="term">A</i> is a parsing expression.</p></li>
<li><p><i class="term">e1</i><i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">sequence</i>.</p></li>
<li><p><i class="term">e1</i>/<i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">ordered choice</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#e">e</a></i>* is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#e">e</a></i>. This is called <i class="term">zero-or-more repetitions</i>, also known
as <i class="term">kleene closure</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#e">e</a></i>+ is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#e">e</a></i>. This is called <i class="term">one-or-more repetitions</i>, also known
as <i class="term">positive kleene closure</i>.</p></li>
<li><p>!<i class="term"><a href="../../../../index.html#e">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called a <i class="term">not lookahead predicate</i>.</p></li>
<li><p>&amp;<i class="term"><a href="../../../../index.html#e">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called an <i class="term">and lookahead predicate</i>.</p></li>
</ul>
<p>PEGs are used to define a grammatical structure for streams of symbols
over VT. They are a modern phrasing of older formalisms invented by
Alexander Birham. These formalisms were called TS (TMG recognition
scheme), and gTS (generalized TS). Later they were renamed to TPDL
(Top-Down Parsing Languages) and gTPDL (generalized TPDL).</p>







|

















|
|

|
|

|

|







520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PARSING EXPRESSION GRAMMARS</a></h2>
<p>For the mathematically inclined, a PEG is a 4-tuple (VN,VT,R,eS) where</p>
<ul class="doctools_itemized">
<li><p>VN is a set of <i class="term">nonterminal symbols</i>,</p></li>
<li><p>VT is a set of <i class="term">terminal symbols</i>,</p></li>
<li><p>R is a finite set of rules, where each rule is a pair (A,e), A in VN,
and <i class="term"><a href="../../../../index.html#key807">e</a></i> a <i class="term"><a href="../../../../index.html#key8">parsing expression</a></i>.</p></li>
<li><p>eS is a parsing expression, the <i class="term">start expression</i>.</p></li>
</ul>
<p>Further constraints are</p>
<ul class="doctools_itemized">
<li><p>The intersection of VN and VT is empty.</p></li>
<li><p>For all A in VT exists exactly one pair (A,e) in R. In other words, R
is a function from nonterminal symbols to parsing expressions.</p></li>
</ul>
<p>Parsing expression are inductively defined via</p>
<ul class="doctools_itemized">
<li><p>The empty string (epsilon) is a parsing expression.</p></li>
<li><p>A terminal symbol <i class="term">a</i> is a parsing expression.</p></li>
<li><p>A nonterminal symbol <i class="term">A</i> is a parsing expression.</p></li>
<li><p><i class="term">e1</i><i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">sequence</i>.</p></li>
<li><p><i class="term">e1</i>/<i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">ordered choice</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key807">e</a></i>* is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#key807">e</a></i>. This is called <i class="term">zero-or-more repetitions</i>, also known
as <i class="term">kleene closure</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key807">e</a></i>+ is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#key807">e</a></i>. This is called <i class="term">one-or-more repetitions</i>, also known
as <i class="term">positive kleene closure</i>.</p></li>
<li><p>!<i class="term"><a href="../../../../index.html#key807">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called a <i class="term">not lookahead predicate</i>.</p></li>
<li><p>&amp;<i class="term"><a href="../../../../index.html#key807">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called an <i class="term">and lookahead predicate</i>.</p></li>
</ul>
<p>PEGs are used to define a grammatical structure for streams of symbols
over VT. They are a modern phrasing of older formalisms invented by
Alexander Birham. These formalisms were called TS (TMG recognition
scheme), and gTS (generalized TS). Later they were renamed to TPDL
(Top-Down Parsing Languages) and gTPDL (generalized TPDL).</p>
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_peg</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








578
579
580
581
582
583
584






585
586
587
588
589
590
591
592
593
594
595
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_peg</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/grammar_peg/peg_interp.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>grammar::peg::interp - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>grammar::peg::interp - Grammar operations and usage</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'peg_interp.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005-2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- grammar::peg::interp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::peg::interp(n) 0.1.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::peg::interp - Interpreter for parsing expression grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'peg_interp.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005-2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- grammar::peg::interp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">grammar::peg::interp(n) 0.1.1 tcllib &quot;Grammar operations and usage&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>grammar::peg::interp - Interpreter for parsing expression grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_peg</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a>, <a href="../../../../index.html#virtual_machine">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








198
199
200
201
202
203
204






205
206
207
208
209
210
211
212
213
214
215
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>grammar_peg</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Grammars and finite automata</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/hook/hook.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>hook - Hooks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>hook - Hooks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'hook.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2010, by William H. Duquette
   -->
<!-- hook.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">hook(n) 0.1 tcllib &quot;Hooks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>hook - Hooks</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'hook.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2010, by William H. Duquette
   -->
<! -- hook.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">hook(n) 0.1 tcllib &quot;Hooks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>hook - Hooks</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
coupling of this kind. This package defines a new command, <b class="cmd">hook</b>,
which implements just such a mechanism.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Bindings</a></h3>
<p>The <b class="cmd">hook</b> command manages a collection of hook bindings. A hook
binding has four elements:</p>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#subject">subject</a></i>: the name of the entity that will be calling the
hook.</p></li>
<li><p>The <i class="term"><a href="../../../../index.html#hook">hook</a></i> itself. A hook usually reflects some occurrence in the
life of the <i class="term"><a href="../../../../index.html#subject">subject</a></i> that other entities might care to know
about. A <i class="term"><a href="../../../../index.html#hook">hook</a></i> has a name, and may also have arguments. Hook
names are arbitrary strings. Each <i class="term"><a href="../../../../index.html#subject">subject</a></i> must document the
names and arguments of the hooks it can call.</p></li>
<li><p>The name of the <i class="term"><a href="../../../../index.html#observer">observer</a></i> that wishes to receive the <i class="term"><a href="../../../../index.html#hook">hook</a></i>
from the <i class="term"><a href="../../../../index.html#subject">subject</a></i>.</p></li>
<li><p>A command prefix to which the <i class="term"><a href="../../../../index.html#hook">hook</a></i> arguments will be appended
when the binding is executed.</p></li>
</ol>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Subjects and observers</a></h3>
<p>For convenience, this document collectively refers to subjects and
observers as <i class="term">objects</i>, while placing no requirements on how
these <i class="term">objects</i> are actually implemented. An object can be a
<b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> or <b class="package"><a href="../../../../index.html#snit">Snit</a></b> or <b class="package">XOTcl</b> object, a Tcl
command, a namespace, a module, a pseudo-object managed by some other
object (as tags are managed by the Tk text widget) or simply a
well-known name.</p>
<p>Subject and observer names are arbitrary strings; however, as
<b class="cmd">hook</b> might be used at the package level, it's necessary to have
conventions that avoid name collisions between packages written by
different people.</p>







|

|
|
|
|

|
|
|







|







177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
coupling of this kind. This package defines a new command, <b class="cmd">hook</b>,
which implements just such a mechanism.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Bindings</a></h3>
<p>The <b class="cmd">hook</b> command manages a collection of hook bindings. A hook
binding has four elements:</p>
<ol class="doctools_enumerated">
<li><p>A <i class="term"><a href="../../../../index.html#key678">subject</a></i>: the name of the entity that will be calling the
hook.</p></li>
<li><p>The <i class="term"><a href="../../../../index.html#key680">hook</a></i> itself. A hook usually reflects some occurrence in the
life of the <i class="term"><a href="../../../../index.html#key678">subject</a></i> that other entities might care to know
about. A <i class="term"><a href="../../../../index.html#key680">hook</a></i> has a name, and may also have arguments. Hook
names are arbitrary strings. Each <i class="term"><a href="../../../../index.html#key678">subject</a></i> must document the
names and arguments of the hooks it can call.</p></li>
<li><p>The name of the <i class="term"><a href="../../../../index.html#key650">observer</a></i> that wishes to receive the <i class="term"><a href="../../../../index.html#key680">hook</a></i>
from the <i class="term"><a href="../../../../index.html#key678">subject</a></i>.</p></li>
<li><p>A command prefix to which the <i class="term"><a href="../../../../index.html#key680">hook</a></i> arguments will be appended
when the binding is executed.</p></li>
</ol>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Subjects and observers</a></h3>
<p>For convenience, this document collectively refers to subjects and
observers as <i class="term">objects</i>, while placing no requirements on how
these <i class="term">objects</i> are actually implemented. An object can be a
<b class="package"><a href="../../../../index.html#key757">TclOO</a></b> or <b class="package"><a href="../../../../index.html#key798">Snit</a></b> or <b class="package">XOTcl</b> object, a Tcl
command, a namespace, a module, a pseudo-object managed by some other
object (as tags are managed by the Tk text widget) or simply a
well-known name.</p>
<p>Subject and observer names are arbitrary strings; however, as
<b class="cmd">hook</b> might be used at the package level, it's necessary to have
conventions that avoid name collisions between packages written by
different people.</p>
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
</ol>
<p>If the <b class="option">-errorcommand</b> configuration option has a non-empty
value, its value will be invoked for all errors and other exceptional
returns in observer bindings. See <b class="cmd">hook configure</b>, below, for
more information on configuration options.</p></dd>
<dt><a name="3"><b class="cmd">hook</b> <b class="method">forget</b> <i class="arg">object</i></a></dt>
<dd><p>This command deletes any existing bindings in which the named
<i class="arg">object</i> appears as either the <i class="term"><a href="../../../../index.html#subject">subject</a></i> or the
<i class="term"><a href="../../../../index.html#observer">observer</a></i>.
Bindings deleted by this method will never be called again. In
particular,</p>
<ol class="doctools_enumerated">
<li><p>If an observer is forgotten during a call to <b class="cmd">hook call</b>, any
uncalled binding it might have had to the relevant subject and hook
will <em>not</em> be called subsequently.</p></li>
<li><p>If a subject <b class="variable">$s</b> is forgotten during a call to</p>







|
|







320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
</ol>
<p>If the <b class="option">-errorcommand</b> configuration option has a non-empty
value, its value will be invoked for all errors and other exceptional
returns in observer bindings. See <b class="cmd">hook configure</b>, below, for
more information on configuration options.</p></dd>
<dt><a name="3"><b class="cmd">hook</b> <b class="method">forget</b> <i class="arg">object</i></a></dt>
<dd><p>This command deletes any existing bindings in which the named
<i class="arg">object</i> appears as either the <i class="term"><a href="../../../../index.html#key678">subject</a></i> or the
<i class="term"><a href="../../../../index.html#key650">observer</a></i>.
Bindings deleted by this method will never be called again. In
particular,</p>
<ol class="doctools_enumerated">
<li><p>If an observer is forgotten during a call to <b class="cmd">hook call</b>, any
uncalled binding it might have had to the relevant subject and hook
will <em>not</em> be called subsequently.</p></li>
<li><p>If a subject <b class="variable">$s</b> is forgotten during a call to</p>
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<p>Given this information, the <b class="option">-errorcommand</b> can choose to log
the error, call <b class="cmd">interp bgerror</b>, delete the errant binding
(thus preventing the error from arising a second time) and so forth.</p></dd>
<dt><b class="option">-tracecommand</b> <i class="arg">cmdPrefix</i></dt>
<dd><p>The option's value should be a command prefix taking four
arguments:</p>
<ol class="doctools_enumerated">
<li><p>a <i class="term"><a href="../../../../index.html#subject">subject</a></i>,</p></li>
<li><p>a <i class="term"><a href="../../../../index.html#hook">hook</a></i>,</p></li>
<li><p>a list of the hook's argument values, and</p></li>
<li><p>a list of <i class="term">objects</i> the hook was called for.</p></li>
</ol>
<p>The command will be called for each hook that is called. This allows
the application to trace hook execution for debugging purposes.</p></dd>
</dl></dd>
</dl>







|
|







357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<p>Given this information, the <b class="option">-errorcommand</b> can choose to log
the error, call <b class="cmd">interp bgerror</b>, delete the errant binding
(thus preventing the error from arising a second time) and so forth.</p></dd>
<dt><b class="option">-tracecommand</b> <i class="arg">cmdPrefix</i></dt>
<dd><p>The option's value should be a command prefix taking four
arguments:</p>
<ol class="doctools_enumerated">
<li><p>a <i class="term"><a href="../../../../index.html#key678">subject</a></i>,</p></li>
<li><p>a <i class="term"><a href="../../../../index.html#key680">hook</a></i>,</p></li>
<li><p>a list of the hook's argument values, and</p></li>
<li><p>a list of <i class="term">objects</i> the hook was called for.</p></li>
</ol>
<p>The command will be called for each hook that is called. This allows
the application to trace hook execution for debugging purposes.</p></dd>
</dl></dd>
</dl>
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
&lt;Update&gt; hook.</p>
<pre class="doctools_example">
     hook bind ::model &lt;Update&gt; .view [list .view ModelUpdate]
</pre>
<p>When the <b class="cmd">::model</b> calls the hook, the <b class="widget">.view</b>s
ModelUpdate subcommand will be called.</p>
<p>Later the <b class="widget">.view</b> megawidget is destroyed. In its destructor,
it tells the <i class="term"><a href="../../../../index.html#hook">hook</a></i> that it no longer exists:</p>
<pre class="doctools_example">
     hook forget .view
</pre>
<p>All bindings involving <b class="widget">.view</b> are deleted.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Credits</a></h2>
<p>Hook has been designed and implemented by William H. Duquette.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>hook</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../uev/uevent.html">uevent(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#callback">callback</a>, <a href="../../../../index.html#event">event</a>, <a href="../../../../index.html#hook">hook</a>, <a href="../../../../index.html#observer">observer</a>, <a href="../../../../index.html#producer">producer</a>, <a href="../../../../index.html#publisher">publisher</a>, <a href="../../../../index.html#subject">subject</a>, <a href="../../../../index.html#subscriber">subscriber</a>, <a href="../../../../index.html#uevent">uevent</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, by William H. Duquette</p>
</div>
</div></body></html>







|















<
<
<
<
<
<





|








382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404






405
406
407
408
409
410
411
412
413
414
415
416
417
418
&lt;Update&gt; hook.</p>
<pre class="doctools_example">
     hook bind ::model &lt;Update&gt; .view [list .view ModelUpdate]
</pre>
<p>When the <b class="cmd">::model</b> calls the hook, the <b class="widget">.view</b>s
ModelUpdate subcommand will be called.</p>
<p>Later the <b class="widget">.view</b> megawidget is destroyed. In its destructor,
it tells the <i class="term"><a href="../../../../index.html#key680">hook</a></i> that it no longer exists:</p>
<pre class="doctools_example">
     hook forget .view
</pre>
<p>All bindings involving <b class="widget">.view</b> are deleted.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Credits</a></h2>
<p>Hook has been designed and implemented by William H. Duquette.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>hook</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../uev/uevent.html">uevent(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key542">event</a>, <a href="../../../../index.html#key680">hook</a>, <a href="../../../../index.html#key650">observer</a>, <a href="../../../../index.html#key679">producer</a>, <a href="../../../../index.html#key681">publisher</a>, <a href="../../../../index.html#key678">subject</a>, <a href="../../../../index.html#key677">subscriber</a>, <a href="../../../../index.html#key682">uevent</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, by William H. Duquette</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/html/html.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>html - HTML Generation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>html - HTML Generation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'html.man' by tcllib/doctools with format 'html'
   -->
<!-- html.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">html(n) 1.5 tcllib &quot;HTML Generation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>html - Procedures to generate HTML structures</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">html <span class="opt">?1.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::html::author</b> <i class="arg">author</i></a></li>
<li><a href="#2"><b class="cmd">::html::bodyTag</b> <i class="arg">args</i></a></li>
<li><a href="#3"><b class="cmd">::html::cell</b> <i class="arg">param value</i> <span class="opt">?<i class="arg">tag</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::html::checkbox</b> <i class="arg">name value</i></a></li>
<li><a href="#5"><b class="cmd">::html::checkSet</b> <i class="arg">key sep list</i></a></li>







|

|



|
|
|
|
|
|


|


















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'html.man' by tcllib/doctools with format 'html'
   -->
<! -- html.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">html(n) 1.4.4 tcllib &quot;HTML Generation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>html - Procedures to generate HTML structures</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">html <span class="opt">?1.4.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::html::author</b> <i class="arg">author</i></a></li>
<li><a href="#2"><b class="cmd">::html::bodyTag</b> <i class="arg">args</i></a></li>
<li><a href="#3"><b class="cmd">::html::cell</b> <i class="arg">param value</i> <span class="opt">?<i class="arg">tag</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::html::checkbox</b> <i class="arg">name value</i></a></li>
<li><a href="#5"><b class="cmd">::html::checkSet</b> <i class="arg">key sep list</i></a></li>
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<li><a href="#28"><b class="cmd">::html::headTag</b> <i class="arg">string</i></a></li>
<li><a href="#29"><b class="cmd">::html::html_entities</b> <i class="arg">string</i></a></li>
<li><a href="#30"><b class="cmd">::html::if</b> <i class="arg">expr1 body1</i> <span class="opt">?<b class="const">elseif</b> <i class="arg">expr2 body2 ...</i>?</span> <span class="opt">?<b class="const">else</b> <i class="arg">bodyN</i>?</span></a></li>
<li><a href="#31"><b class="cmd">::html::init</b> <span class="opt">?<i class="arg">list</i>?</span></a></li>
<li><a href="#32"><b class="cmd">::html::keywords</b> <i class="arg">args</i></a></li>
<li><a href="#33"><b class="cmd">::html::mailto</b> <i class="arg">email</i> <span class="opt">?<i class="arg">subject</i>?</span></a></li>
<li><a href="#34"><b class="cmd">::html::meta</b> <i class="arg">args</i></a></li>
<li><a href="#35"><b class="cmd">::html::meta_name</b> <i class="arg">args</i></a></li>
<li><a href="#36"><b class="cmd">::html::meta_equiv</b> <i class="arg">args</i></a></li>
<li><a href="#37"><b class="cmd">::html::meta_charset</b> <i class="arg">charset</i></a></li>
<li><a href="#38"><b class="cmd">::html::css</b> <i class="arg">href</i></a></li>
<li><a href="#39"><b class="cmd">::html::css-clear</b></a></li>
<li><a href="#40"><b class="cmd">::html::js</b> <i class="arg">href</i></a></li>
<li><a href="#41"><b class="cmd">::html::js-clear</b></a></li>
<li><a href="#42"><b class="cmd">::html::minorList</b> <i class="arg">list</i> <span class="opt">?<i class="arg">ordered</i>?</span></a></li>
<li><a href="#43"><b class="cmd">::html::minorMenu</b> <i class="arg">list</i> <span class="opt">?<i class="arg">sep</i>?</span></a></li>
<li><a href="#44"><b class="cmd">::html::nl2br</b> <i class="arg">string</i></a></li>
<li><a href="#45"><b class="cmd">::html::openTag</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#46"><b class="cmd">::html::paramRow</b> <i class="arg">list</i> <span class="opt">?<i class="arg">rparam</i>?</span> <span class="opt">?<i class="arg">cparam</i>?</span></a></li>
<li><a href="#47"><b class="cmd">::html::passwordInput</b> <span class="opt">?<i class="arg">name</i>?</span></a></li>
<li><a href="#48"><b class="cmd">::html::passwordInputRow</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span></a></li>
<li><a href="#49"><b class="cmd">::html::quoteFormValue</b> <i class="arg">value</i></a></li>
<li><a href="#50"><b class="cmd">::html::radioSet</b> <i class="arg">key sep list</i></a></li>
<li><a href="#51"><b class="cmd">::html::radioValue</b> <i class="arg">name value</i></a></li>
<li><a href="#52"><b class="cmd">::html::refresh</b> <i class="arg">seconds url</i></a></li>
<li><a href="#53"><b class="cmd">::html::row</b> <i class="arg">args</i></a></li>
<li><a href="#54"><b class="cmd">::html::select</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></li>
<li><a href="#55"><b class="cmd">::html::selectPlain</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></li>
<li><a href="#56"><b class="cmd">::html::set</b> <i class="arg">var val</i></a></li>
<li><a href="#57"><b class="cmd">::html::submit</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">title</i>?</span></a></li>
<li><a href="#58"><b class="cmd">::html::tableFromArray</b> <i class="arg">arrname</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">pat</i>?</span></a></li>
<li><a href="#59"><b class="cmd">::html::tableFromList</b> <i class="arg">querylist</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#60"><b class="cmd">::html::textarea</b> <i class="arg">name</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">current</i>?</span></a></li>
<li><a href="#61"><b class="cmd">::html::textInput</b> <i class="arg">name value args</i></a></li>
<li><a href="#62"><b class="cmd">::html::textInputRow</b> <i class="arg">label name value args</i></a></li>
<li><a href="#63"><b class="cmd">::html::varEmpty</b> <i class="arg">name</i></a></li>
<li><a href="#64"><b class="cmd">::html::while</b> <i class="arg">test body</i></a></li>
<li><a href="#65"><b class="cmd">::html::doctype</b> <i class="arg">id</i></a></li>
<li><a href="#66"><b class="cmd">::html::wrapTag</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">text</i>?</span> <span class="opt">?<i class="arg">args</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">html</b> provides commands that generate HTML.
These commands typically return an HTML string as their result. In
particular, they do not output their result to <b class="const">stdout</b>.</p>







|
|
|
|
<
<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<







158
159
160
161
162
163
164
165
166
167
168



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192

193
194
195
196
197
198
199
<li><a href="#28"><b class="cmd">::html::headTag</b> <i class="arg">string</i></a></li>
<li><a href="#29"><b class="cmd">::html::html_entities</b> <i class="arg">string</i></a></li>
<li><a href="#30"><b class="cmd">::html::if</b> <i class="arg">expr1 body1</i> <span class="opt">?<b class="const">elseif</b> <i class="arg">expr2 body2 ...</i>?</span> <span class="opt">?<b class="const">else</b> <i class="arg">bodyN</i>?</span></a></li>
<li><a href="#31"><b class="cmd">::html::init</b> <span class="opt">?<i class="arg">list</i>?</span></a></li>
<li><a href="#32"><b class="cmd">::html::keywords</b> <i class="arg">args</i></a></li>
<li><a href="#33"><b class="cmd">::html::mailto</b> <i class="arg">email</i> <span class="opt">?<i class="arg">subject</i>?</span></a></li>
<li><a href="#34"><b class="cmd">::html::meta</b> <i class="arg">args</i></a></li>
<li><a href="#35"><b class="cmd">::html::css</b> <i class="arg">href</i></a></li>
<li><a href="#36"><b class="cmd">::html::css-clear</b></a></li>
<li><a href="#37"><b class="cmd">::html::js</b> <i class="arg">href</i></a></li>
<li><a href="#38"><b class="cmd">::html::js-clear</b></a></li>



<li><a href="#39"><b class="cmd">::html::minorList</b> <i class="arg">list</i> <span class="opt">?<i class="arg">ordered</i>?</span></a></li>
<li><a href="#40"><b class="cmd">::html::minorMenu</b> <i class="arg">list</i> <span class="opt">?<i class="arg">sep</i>?</span></a></li>
<li><a href="#41"><b class="cmd">::html::nl2br</b> <i class="arg">string</i></a></li>
<li><a href="#42"><b class="cmd">::html::openTag</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#43"><b class="cmd">::html::paramRow</b> <i class="arg">list</i> <span class="opt">?<i class="arg">rparam</i>?</span> <span class="opt">?<i class="arg">cparam</i>?</span></a></li>
<li><a href="#44"><b class="cmd">::html::passwordInput</b> <span class="opt">?<i class="arg">name</i>?</span></a></li>
<li><a href="#45"><b class="cmd">::html::passwordInputRow</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span></a></li>
<li><a href="#46"><b class="cmd">::html::quoteFormValue</b> <i class="arg">value</i></a></li>
<li><a href="#47"><b class="cmd">::html::radioSet</b> <i class="arg">key sep list</i></a></li>
<li><a href="#48"><b class="cmd">::html::radioValue</b> <i class="arg">name value</i></a></li>
<li><a href="#49"><b class="cmd">::html::refresh</b> <i class="arg">seconds url</i></a></li>
<li><a href="#50"><b class="cmd">::html::row</b> <i class="arg">args</i></a></li>
<li><a href="#51"><b class="cmd">::html::select</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></li>
<li><a href="#52"><b class="cmd">::html::selectPlain</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></li>
<li><a href="#53"><b class="cmd">::html::set</b> <i class="arg">var val</i></a></li>
<li><a href="#54"><b class="cmd">::html::submit</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span></a></li>
<li><a href="#55"><b class="cmd">::html::tableFromArray</b> <i class="arg">arrname</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">pat</i>?</span></a></li>
<li><a href="#56"><b class="cmd">::html::tableFromList</b> <i class="arg">querylist</i> <span class="opt">?<i class="arg">param</i>?</span></a></li>
<li><a href="#57"><b class="cmd">::html::textarea</b> <i class="arg">name</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">current</i>?</span></a></li>
<li><a href="#58"><b class="cmd">::html::textInput</b> <i class="arg">name value args</i></a></li>
<li><a href="#59"><b class="cmd">::html::textInputRow</b> <i class="arg">label name value args</i></a></li>
<li><a href="#60"><b class="cmd">::html::varEmpty</b> <i class="arg">name</i></a></li>
<li><a href="#61"><b class="cmd">::html::while</b> <i class="arg">test body</i></a></li>
<li><a href="#62"><b class="cmd">::html::doctype</b> <i class="arg">id</i></a></li>

</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">html</b> provides commands that generate HTML.
These commands typically return an HTML string as their result. In
particular, they do not output their result to <b class="const">stdout</b>.</p>
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<dt><a name="3"><b class="cmd">::html::cell</b> <i class="arg">param value</i> <span class="opt">?<i class="arg">tag</i>?</span></a></dt>
<dd><p>Generate a <i class="term">td</i> (or <i class="term">th</i>) tag, a value, and a closing
<i class="term">td</i> (or <i class="term">th</i>) tag. The
tag parameters come from <i class="arg">param</i> or TD.* attributes defined with
<b class="cmd">::html::init</b>.  This uses <b class="cmd">::html::font</b> to insert a standard
<i class="term">font</i> tag into the table cell. The <i class="arg">tag</i> argument defaults to &quot;td&quot;.</p></dd>
<dt><a name="4"><b class="cmd">::html::checkbox</b> <i class="arg">name value</i></a></dt>
<dd><p>Generate a <i class="term"><a href="../../../../index.html#checkbox">checkbox</a></i> form element with the specified name and value.
This uses <b class="cmd">::html::checkValue</b>.</p></dd>
<dt><a name="5"><b class="cmd">::html::checkSet</b> <i class="arg">key sep list</i></a></dt>
<dd><p>Generate a set of <i class="term"><a href="../../../../index.html#checkbox">checkbox</a></i> form elements and associated labels.  The
<i class="arg">list</i> should contain an alternating list of labels and values.
This uses <b class="cmd">::html::checkbox</b>. All the <i class="term"><a href="../../../../index.html#checkbox">checkbox</a></i> buttons share the
same <i class="arg">key</i> for their name. The <i class="arg">sep</i> is text used to separate
the elements.</p></dd>
<dt><a name="6"><b class="cmd">::html::checkValue</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Generate the &quot;name=<i class="arg">name</i> value=<i class="arg">value</i>&quot; for a <i class="term"><a href="../../../../index.html#checkbox">checkbox</a></i> form
element.  If the CGI variable <i class="arg">name</i> has the value <i class="arg">value</i>,
then SELECTED is added to the return value. <i class="arg">value</i> defaults to
&quot;1&quot;.</p></dd>
<dt><a name="7"><b class="cmd">::html::closeTag</b></a></dt>
<dd><p>Pop a tag off the stack created by <b class="cmd">::html::openTag</b> and generate
the corresponding close tag (e.g., &lt;/body&gt;).</p></dd>
<dt><a name="8"><b class="cmd">::html::default</b> <i class="arg">key</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>







|


|

|



|







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<dt><a name="3"><b class="cmd">::html::cell</b> <i class="arg">param value</i> <span class="opt">?<i class="arg">tag</i>?</span></a></dt>
<dd><p>Generate a <i class="term">td</i> (or <i class="term">th</i>) tag, a value, and a closing
<i class="term">td</i> (or <i class="term">th</i>) tag. The
tag parameters come from <i class="arg">param</i> or TD.* attributes defined with
<b class="cmd">::html::init</b>.  This uses <b class="cmd">::html::font</b> to insert a standard
<i class="term">font</i> tag into the table cell. The <i class="arg">tag</i> argument defaults to &quot;td&quot;.</p></dd>
<dt><a name="4"><b class="cmd">::html::checkbox</b> <i class="arg">name value</i></a></dt>
<dd><p>Generate a <i class="term"><a href="../../../../index.html#key620">checkbox</a></i> form element with the specified name and value.
This uses <b class="cmd">::html::checkValue</b>.</p></dd>
<dt><a name="5"><b class="cmd">::html::checkSet</b> <i class="arg">key sep list</i></a></dt>
<dd><p>Generate a set of <i class="term"><a href="../../../../index.html#key620">checkbox</a></i> form elements and associated labels.  The
<i class="arg">list</i> should contain an alternating list of labels and values.
This uses <b class="cmd">::html::checkbox</b>. All the <i class="term"><a href="../../../../index.html#key620">checkbox</a></i> buttons share the
same <i class="arg">key</i> for their name. The <i class="arg">sep</i> is text used to separate
the elements.</p></dd>
<dt><a name="6"><b class="cmd">::html::checkValue</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Generate the &quot;name=<i class="arg">name</i> value=<i class="arg">value</i>&quot; for a <i class="term"><a href="../../../../index.html#key620">checkbox</a></i> form
element.  If the CGI variable <i class="arg">name</i> has the value <i class="arg">value</i>,
then SELECTED is added to the return value. <i class="arg">value</i> defaults to
&quot;1&quot;.</p></dd>
<dt><a name="7"><b class="cmd">::html::closeTag</b></a></dt>
<dd><p>Pop a tag off the stack created by <b class="cmd">::html::openTag</b> and generate
the corresponding close tag (e.g., &lt;/body&gt;).</p></dd>
<dt><a name="8"><b class="cmd">::html::default</b> <i class="arg">key</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
from <i class="arg">args</i> and the HTML defaults defined with <b class="cmd">::html::init</b>.</p></dd>
<dt><a name="14"><b class="cmd">::html::for</b> <i class="arg">start test next body</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd">for</b> control
structure.  Rather than evaluating the body, it returns the subst'ed
<i class="arg">body</i>. Each iteration of the loop causes another string to be
concatenated to the result value.</p></dd>
<dt><a name="15"><b class="cmd">::html::foreach</b> <i class="arg">varlist1 list1</i> <span class="opt">?<i class="arg">varlist2 list2 ...</i>?</span> <i class="arg">body</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd"><a href="../../../../index.html#foreach">foreach</a></b> control
structure.  Rather than evaluating the body, it returns the subst'ed
<i class="arg">body</i>.  Each iteration of the loop causes another string to be
concatenated to the result value.</p></dd>
<dt><a name="16"><b class="cmd">::html::formValue</b> <i class="arg">name</i> <span class="opt">?<i class="arg">defvalue</i>?</span></a></dt>
<dd><p>Return a name and value pair, where the value is initialized from
existing CGI data, if any.  The result has this form:</p>
<pre class="doctools_example">







|







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
from <i class="arg">args</i> and the HTML defaults defined with <b class="cmd">::html::init</b>.</p></dd>
<dt><a name="14"><b class="cmd">::html::for</b> <i class="arg">start test next body</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd">for</b> control
structure.  Rather than evaluating the body, it returns the subst'ed
<i class="arg">body</i>. Each iteration of the loop causes another string to be
concatenated to the result value.</p></dd>
<dt><a name="15"><b class="cmd">::html::foreach</b> <i class="arg">varlist1 list1</i> <span class="opt">?<i class="arg">varlist2 list2 ...</i>?</span> <i class="arg">body</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b> control
structure.  Rather than evaluating the body, it returns the subst'ed
<i class="arg">body</i>.  Each iteration of the loop causes another string to be
concatenated to the result value.</p></dd>
<dt><a name="16"><b class="cmd">::html::formValue</b> <i class="arg">name</i> <span class="opt">?<i class="arg">defvalue</i>?</span></a></dt>
<dd><p>Return a name and value pair, where the value is initialized from
existing CGI data, if any.  The result has this form:</p>
<pre class="doctools_example">
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
If previous calls have been made to
<b class="cmd">::html::author</b>,
<b class="cmd">::html::keywords</b>,
<b class="cmd">::html::description</b>,
or
<b class="cmd">::html::meta</b>
then additional tags are inserted into the <i class="term">head</i> section.
This leaves an open <i class="term"><a href="../../../../index.html#html">html</a></i> tag pushed on the stack with
<b class="cmd">::html::openTag</b>.</p></dd>
<dt><a name="28"><b class="cmd">::html::headTag</b> <i class="arg">string</i></a></dt>
<dd><p>Save a tag for inclusion in the <i class="term">head</i> section generated by
<b class="cmd">::html::head</b>.  The <i class="arg">string</i> is everything in the tag except
the enclosing angle brackets, &lt; &gt;.</p></dd>
<dt><a name="29"><b class="cmd">::html::html_entities</b> <i class="arg">string</i></a></dt>
<dd><p>This command replaces all special characters in the <i class="arg">string</i> with







|







311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
If previous calls have been made to
<b class="cmd">::html::author</b>,
<b class="cmd">::html::keywords</b>,
<b class="cmd">::html::description</b>,
or
<b class="cmd">::html::meta</b>
then additional tags are inserted into the <i class="term">head</i> section.
This leaves an open <i class="term"><a href="../../../../index.html#key617">html</a></i> tag pushed on the stack with
<b class="cmd">::html::openTag</b>.</p></dd>
<dt><a name="28"><b class="cmd">::html::headTag</b> <i class="arg">string</i></a></dt>
<dd><p>Save a tag for inclusion in the <i class="term">head</i> section generated by
<b class="cmd">::html::head</b>.  The <i class="arg">string</i> is everything in the tag except
the enclosing angle brackets, &lt; &gt;.</p></dd>
<dt><a name="29"><b class="cmd">::html::html_entities</b> <i class="arg">string</i></a></dt>
<dd><p>This command replaces all special characters in the <i class="arg">string</i> with
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369

370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
<dt><a name="32"><b class="cmd">::html::keywords</b> <i class="arg">args</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a keyword <i class="term">meta</i> tag for the page.  The <i class="term">meta</i> tag
is included in the result of <b class="cmd">::html::head</b>.</p></dd>
<dt><a name="33"><b class="cmd">::html::mailto</b> <i class="arg">email</i> <span class="opt">?<i class="arg">subject</i>?</span></a></dt>
<dd><p>Generate a hypertext link to a mailto: URL.</p></dd>
<dt><a name="34"><b class="cmd">::html::meta</b> <i class="arg">args</i></a></dt>
<dd><p>Compatibility name for <b class="cmd">html::meta_name</b>.</p></dd>
<dt><a name="35"><b class="cmd">::html::meta_name</b> <i class="arg">args</i></a></dt>
<dd><p><em>Side effect only</em>.
Call this before <b class="cmd">::html::head</b> to define a <i class="term">meta</i> tag for
the page.
The arguments (<i class="arg">args</i>) are a Tcl-style name, value list that is
used for the <b class="const">name=</b> and <b class="const">content=</b> attributes of the
<i class="term">meta</i> tag.  The <i class="term">meta</i> tag is included in the result of
<b class="cmd">::html::head</b>.</p></dd>
<dt><a name="36"><b class="cmd">::html::meta_equiv</b> <i class="arg">args</i></a></dt>
<dd><p><em>Side effect only</em>.
Call this before <b class="cmd">::html::head</b> to define a <i class="term">meta</i> tag for
the page.
The arguments (<i class="arg">args</i>) are a Tcl-style name, value list that is
used for the <b class="const">http-equiv=</b> and <b class="const">content=</b> attributes of
the <i class="term">meta</i> tag.  The <i class="term">meta</i> tag is included in the result of
<b class="cmd">::html::head</b>.</p></dd>
<dt><a name="37"><b class="cmd">::html::meta_charset</b> <i class="arg">charset</i></a></dt>
<dd><p><em>Side effect only</em>.
Call this before <b class="cmd">::html::head</b> to
define a <i class="term">meta</i> tag for the page.
The <i class="arg">charset</i> is used with the <b class="const">charset=</b> attribute of the

<i class="term">meta</i> tag.  The <i class="term">meta</i> tag is included in the result of
<b class="cmd">::html::head</b>.</p></dd>
<dt><a name="38"><b class="cmd">::html::css</b> <i class="arg">href</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a <i class="term">link</i> tag for a linked CSS document.  The <i class="arg">href</i> 
value is a HTTP URL to a CSS document. The <i class="term">link</i> tag is included 
in the result of <b class="cmd">::html::head</b>.</p>
<p>Multiple calls of this command are allowed, enabling the use of
multiple CSS document references. In other words, the arguments
of multiple calls are accumulated, and do not overwrite each other.</p></dd>
<dt><a name="39"><b class="cmd">::html::css-clear</b></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
clear all links to CSS documents.</p>
<p>Multiple calls of this command are allowed, doing nothing after the
first of a sequence with no intervening <b class="cmd">::html::css</b>.</p></dd>
<dt><a name="40"><b class="cmd">::html::js</b> <i class="arg">href</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a <i class="term">script</i> tag for a linked JavaScript document.  The 
<i class="arg">href</i> is a HTTP URL to a JavaScript document. The <i class="term">script</i>
tag is included in the result of <b class="cmd">::html::head</b>.</p>
<p>Multiple calls of this command are allowed, enabling the use of
multiple JavaScript document references. In other words, the arguments
of multiple calls are accumulated, and do not overwrite each other.</p></dd>
<dt><a name="41"><b class="cmd">::html::js-clear</b></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
clear all links to JavaScript documents.</p>
<p>Multiple calls of this command are allowed, doing nothing after the
first of a sequence with no intervening <b class="cmd">::html::js</b>.</p></dd>
<dt><a name="42"><b class="cmd">::html::minorList</b> <i class="arg">list</i> <span class="opt">?<i class="arg">ordered</i>?</span></a></dt>
<dd><p>Generate an ordered or unordered list of links.  The <i class="arg">list</i> is a
Tcl-style name, value list of labels and urls for the links.
<i class="arg">ordered</i> is a boolean used to choose between an ordered or
unordered list. It defaults to <b class="const">false</b>.</p></dd>
<dt><a name="43"><b class="cmd">::html::minorMenu</b> <i class="arg">list</i> <span class="opt">?<i class="arg">sep</i>?</span></a></dt>
<dd><p>Generate a series of hypertext links.  The <i class="arg">list</i> is a Tcl-style
name, value list of labels and urls for the links.  The <i class="arg">sep</i> is
the text to put between each link. It defaults to &quot; | &quot;.</p></dd>
<dt><a name="44"><b class="cmd">::html::nl2br</b> <i class="arg">string</i></a></dt>
<dd><p>This command replaces all line-endings in the <i class="arg">string</i> with a
<i class="term">br</i> tag and returns the modified text.</p></dd>
<dt><a name="45"><b class="cmd">::html::openTag</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Push <i class="arg">tag</i> onto a stack and generate the opening tag for
<i class="arg">tag</i>. Use <b class="cmd">::html::closeTag</b> to pop the tag from the
stack. The second argument provides any tag arguments, as a
list whose elements are formatted to be in the form
&quot;<b class="variable">key</b>=<b class="const">value</b>&quot;.</p></dd>
<dt><a name="46"><b class="cmd">::html::paramRow</b> <i class="arg">list</i> <span class="opt">?<i class="arg">rparam</i>?</span> <span class="opt">?<i class="arg">cparam</i>?</span></a></dt>
<dd><p>Generate a table row, including <i class="term">tr</i> and <i class="term">td</i> tags. Each value in
<i class="arg">list</i> is placed into its own table cell. This uses
<b class="cmd">::html::cell</b>. The value of <i class="arg">rparam</i> is used as parameter for
the <i class="term">tr</i> tag. The value of <i class="arg">cparam</i> is passed to <b class="cmd">::html::cell</b>
as parameter for the <i class="term">td</i> tags.</p></dd>
<dt><a name="47"><b class="cmd">::html::passwordInput</b> <span class="opt">?<i class="arg">name</i>?</span></a></dt>
<dd><p>Generate an <i class="term">input</i> tag of type <i class="term"><a href="../../../../index.html#password">password</a></i>. The <i class="arg">name</i> defaults to
&quot;password&quot;.</p></dd>
<dt><a name="48"><b class="cmd">::html::passwordInputRow</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span></a></dt>
<dd><p>Format a table row containing a label and an <i class="term">input</i> tag of type
<i class="term"><a href="../../../../index.html#password">password</a></i>. The <i class="arg">name</i> defaults to &quot;password&quot;.</p></dd>
<dt><a name="49"><b class="cmd">::html::quoteFormValue</b> <i class="arg">value</i></a></dt>
<dd><p>Quote special characters in <i class="arg">value</i> by replacing them with HTML
entities for quotes, ampersand, and angle brackets.</p></dd>
<dt><a name="50"><b class="cmd">::html::radioSet</b> <i class="arg">key sep list</i></a></dt>
<dd><p>Generate a set of <i class="term">input</i> tags of type <i class="term">radio</i> and an associated text
label.  All the radio buttons share the same <i class="arg">key</i> for their name.
The <i class="arg">sep</i> is text used to separate the elements.  The <i class="arg">list</i>
is a Tcl-style label, value list.</p></dd>
<dt><a name="51"><b class="cmd">::html::radioValue</b> <i class="arg">name value</i></a></dt>
<dd><p>Generate the &quot;name=<i class="arg">name</i> value=<i class="arg">value</i>&quot; for a <i class="term">radio</i> form
element.  If the CGI variable <i class="arg">name</i> has the value <i class="arg">value</i>,
then SELECTED is added to the return value.</p></dd>
<dt><a name="52"><b class="cmd">::html::refresh</b> <i class="arg">seconds url</i></a></dt>
<dd><p>Set up a refresh <i class="term">meta</i> tag. Call this before <b class="cmd">::html::head</b> and the
HEAD section will contain a <i class="term">meta</i> tag that causes the document to
refresh in <i class="arg">seconds</i> seconds.  The <i class="arg">url</i> is optional.  If
specified, it specifies a new page to load after the refresh interval.</p></dd>
<dt><a name="53"><b class="cmd">::html::row</b> <i class="arg">args</i></a></dt>
<dd><p>Generate a table row, including <i class="term">tr</i> and <i class="term">td</i> tags.  Each value in
<i class="arg">args</i> is place into its own table cell. This uses
<b class="cmd">::html::cell</b>. Ignores any default information set up via
<b class="cmd">::html::init</b>.</p></dd>
<dt><a name="54"><b class="cmd">::html::select</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></dt>
<dd><p>Generate a <i class="term">select</i> form element and nested <i class="term">option</i> tags. The <i class="arg">name</i>
and <i class="arg">param</i> are used to generate the <i class="term">select</i> tag. The <i class="arg">choices</i>
list is a Tcl-style name, value list.</p></dd>
<dt><a name="55"><b class="cmd">::html::selectPlain</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></dt>
<dd><p>Like <b class="cmd">::html::select</b> except that <i class="arg">choices</i> is a Tcl list of
values used for the <i class="term">option</i> tags.  The label and the value for each
<i class="term">option</i> are the same.</p></dd>
<dt><a name="56"><b class="cmd">::html::set</b> <i class="arg">var val</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd"><a href="../../../../index.html#set">set</a></b> command.  The
main difference is that it returns &quot;&quot; so it can be called from an HTML
template file without appending unwanted results.  The other
difference is that it must take two arguments.</p></dd>
<dt><a name="57"><b class="cmd">::html::submit</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">title</i>?</span></a></dt>
<dd><p>Generate an <i class="term">input</i> tag of type <i class="term">submit</i>.
The <i class="arg">name</i> defaults to &quot;submit&quot;.
When a non-empty <i class="arg">title</i> string is specified the button gains a
<b class="const">title=</b> attribute with that value.</p></dd>
<dt><a name="58"><b class="cmd">::html::tableFromArray</b> <i class="arg">arrname</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">pat</i>?</span></a></dt>
<dd><p>Generate a two-column <i class="term"><a href="../../../../index.html#table">table</a></i> and nested rows to display a Tcl array. The
table gets a heading that matches the array name, and each generated row
contains a name, value pair. The array names are sorted (<b class="cmd">lsort</b> without
special options). The argument <i class="arg">param</i> is for the <i class="term"><a href="../../../../index.html#table">table</a></i> tag and has
to contain a pre-formatted string. The <i class="arg">pat</i> is a <b class="cmd">string match</b>
pattern used to select the array elements to show in the table. It defaults to
<b class="const">*</b>, i.e. the whole array is shown.</p></dd>
<dt><a name="59"><b class="cmd">::html::tableFromList</b> <i class="arg">querylist</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Generate a two-column <i class="term"><a href="../../../../index.html#table">table</a></i> and nested rows to display <i class="arg">querylist</i>,
which is a Tcl dictionary. Each generated row contains a name, value pair. The
information is shown in the same order as specified in the dictionary. The
argument <i class="arg">param</i> is for the <i class="term"><a href="../../../../index.html#table">table</a></i> tag  and has to contain a
pre-formatted string.</p></dd>
<dt><a name="60"><b class="cmd">::html::textarea</b> <i class="arg">name</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">current</i>?</span></a></dt>
<dd><p>Generate a <i class="term">textarea</i> tag wrapped around its current values.</p></dd>
<dt><a name="61"><b class="cmd">::html::textInput</b> <i class="arg">name value args</i></a></dt>
<dd><p>Generate an <i class="term">input</i> form tag with type <i class="term"><a href="../../../../index.html#text">text</a></i>.  This uses
<b class="cmd">::html::formValue</b>.  The args is any additional tag attributes
you want to put into the <i class="term">input</i> tag.</p></dd>
<dt><a name="62"><b class="cmd">::html::textInputRow</b> <i class="arg">label name value args</i></a></dt>
<dd><p>Generate an <i class="term">input</i> form tag with type <i class="term"><a href="../../../../index.html#text">text</a></i> formatted into a table row
with an associated label.  The args is any additional tag attributes
you want to put into the <i class="term">input</i> tag.</p></dd>
<dt><a name="63"><b class="cmd">::html::varEmpty</b> <i class="arg">name</i></a></dt>
<dd><p>This returns 1 if the named variable either does not exist or has the
empty string for its value.</p></dd>
<dt><a name="64"><b class="cmd">::html::while</b> <i class="arg">test body</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd">while</b> control
structure.  Rather than evaluating the body, it returns the subst'ed
<i class="arg">body</i>.  Each iteration of the loop causes another string to be
concatenated to the result value.</p></dd>
<dt><a name="65"><b class="cmd">::html::doctype</b> <i class="arg">id</i></a></dt>
<dd><p>This procedure can be used to build the standard DOCTYPE
declaration string. It will return the standard declaration
string for the id, or throw an error if the id is not known.
The following id's are defined:</p>
<ol class="doctools_enumerated">
<li><p>HTML32</p></li>
<li><p>HTML40</p></li>
<li><p>HTML40T</p></li>
<li><p>HTML40F</p></li>
<li><p>HTML401</p></li>
<li><p>HTML401T</p></li>
<li><p>HTML401F</p></li>
<li><p>XHTML10S</p></li>
<li><p>XHTML10T</p></li>
<li><p>XHTML10F</p></li>
<li><p>XHTML11</p></li>
<li><p>XHTMLB</p></li>
</ol></dd>
<dt><a name="66"><b class="cmd">::html::wrapTag</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">text</i>?</span> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>A helper to wrap a <i class="arg">text</i> in a pair of open/close <i class="arg">tag</i>s.
The arguments (<i class="arg">args</i>) are a Tcl-style name, value list that is
used to provide attributes and associated values to the opening tag.
The result is a string with the open <i class="arg">tag</i> along with the optional
attributes, the optional text, and the closed tag.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>html</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../htmlparse/htmlparse.html">htmlparse</a>, <a href="../ncgi/ncgi.html">ncgi</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checkbox">checkbox</a>, <a href="../../../../index.html#checkbutton">checkbutton</a>, <a href="../../../../index.html#form">form</a>, <a href="../../../../index.html#html">html</a>, <a href="../../../../index.html#radiobutton">radiobutton</a>, <a href="../../../../index.html#table">table</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
</div></body></html>







<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
>


|







|




|







|




|




|



|


|





|





|
|

|

|
|


|




|



|




|




|



|



|
|



|
|
<
<
<
|
|


|



|
|


|

|

|
|


|
|


|


|




|


















<
<
<
<
<
<









<
<
<
<
<
<





|





338
339
340
341
342
343
344


345

















346

347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493






494
495
496
497
498
499
500
501
502






503
504
505
506
507
508
509
510
511
512
513
<dt><a name="32"><b class="cmd">::html::keywords</b> <i class="arg">args</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a keyword <i class="term">meta</i> tag for the page.  The <i class="term">meta</i> tag
is included in the result of <b class="cmd">::html::head</b>.</p></dd>
<dt><a name="33"><b class="cmd">::html::mailto</b> <i class="arg">email</i> <span class="opt">?<i class="arg">subject</i>?</span></a></dt>
<dd><p>Generate a hypertext link to a mailto: URL.</p></dd>
<dt><a name="34"><b class="cmd">::html::meta</b> <i class="arg">args</i></a></dt>


<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to

















define a <i class="term">meta</i> tag for the page.  The <i class="arg">args</i> is a Tcl-style name,

value list that is used for the name= and value= parameters for the
<i class="term">meta</i> tag.  The <i class="term">meta</i> tag is included in the result of
<b class="cmd">::html::head</b>.</p></dd>
<dt><a name="35"><b class="cmd">::html::css</b> <i class="arg">href</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a <i class="term">link</i> tag for a linked CSS document.  The <i class="arg">href</i> 
value is a HTTP URL to a CSS document. The <i class="term">link</i> tag is included 
in the result of <b class="cmd">::html::head</b>.</p>
<p>Multiple calls of this command are allowed, enabling the use of
multiple CSS document references. In other words, the arguments
of multiple calls are accumulated, and do not overwrite each other.</p></dd>
<dt><a name="36"><b class="cmd">::html::css-clear</b></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
clear all links to CSS documents.</p>
<p>Multiple calls of this command are allowed, doing nothing after the
first of a sequence with no intervening <b class="cmd">::html::css</b>.</p></dd>
<dt><a name="37"><b class="cmd">::html::js</b> <i class="arg">href</i></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
define a <i class="term">script</i> tag for a linked JavaScript document.  The 
<i class="arg">href</i> is a HTTP URL to a JavaScript document. The <i class="term">script</i>
tag is included in the result of <b class="cmd">::html::head</b>.</p>
<p>Multiple calls of this command are allowed, enabling the use of
multiple JavaScript document references. In other words, the arguments
of multiple calls are accumulated, and do not overwrite each other.</p></dd>
<dt><a name="38"><b class="cmd">::html::js-clear</b></a></dt>
<dd><p><em>Side effect only</em>.  Call this before <b class="cmd">::html::head</b> to
clear all links to JavaScript documents.</p>
<p>Multiple calls of this command are allowed, doing nothing after the
first of a sequence with no intervening <b class="cmd">::html::js</b>.</p></dd>
<dt><a name="39"><b class="cmd">::html::minorList</b> <i class="arg">list</i> <span class="opt">?<i class="arg">ordered</i>?</span></a></dt>
<dd><p>Generate an ordered or unordered list of links.  The <i class="arg">list</i> is a
Tcl-style name, value list of labels and urls for the links.
<i class="arg">ordered</i> is a boolean used to choose between an ordered or
unordered list. It defaults to <b class="const">false</b>.</p></dd>
<dt><a name="40"><b class="cmd">::html::minorMenu</b> <i class="arg">list</i> <span class="opt">?<i class="arg">sep</i>?</span></a></dt>
<dd><p>Generate a series of hypertext links.  The <i class="arg">list</i> is a Tcl-style
name, value list of labels and urls for the links.  The <i class="arg">sep</i> is
the text to put between each link. It defaults to &quot; | &quot;.</p></dd>
<dt><a name="41"><b class="cmd">::html::nl2br</b> <i class="arg">string</i></a></dt>
<dd><p>This command replaces all line-endings in the <i class="arg">string</i> with a
<i class="term">br</i> tag and returns the modified text.</p></dd>
<dt><a name="42"><b class="cmd">::html::openTag</b> <i class="arg">tag</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Push <i class="arg">tag</i> onto a stack and generate the opening tag for
<i class="arg">tag</i>. Use <b class="cmd">::html::closeTag</b> to pop the tag from the
stack. The second argument provides any tag arguments, as a
list whose elements are formatted to be in the form
&quot;<b class="variable">key</b>=<b class="const">value</b>&quot;.</p></dd>
<dt><a name="43"><b class="cmd">::html::paramRow</b> <i class="arg">list</i> <span class="opt">?<i class="arg">rparam</i>?</span> <span class="opt">?<i class="arg">cparam</i>?</span></a></dt>
<dd><p>Generate a table row, including <i class="term">tr</i> and <i class="term">td</i> tags. Each value in
<i class="arg">list</i> is placed into its own table cell. This uses
<b class="cmd">::html::cell</b>. The value of <i class="arg">rparam</i> is used as parameter for
the <i class="term">tr</i> tag. The value of <i class="arg">cparam</i> is passed to <b class="cmd">::html::cell</b>
as parameter for the <i class="term">td</i> tags.</p></dd>
<dt><a name="44"><b class="cmd">::html::passwordInput</b> <span class="opt">?<i class="arg">name</i>?</span></a></dt>
<dd><p>Generate an <i class="term">input</i> tag of type <i class="term"><a href="../../../../index.html#key692">password</a></i>. The <i class="arg">name</i> defaults to
&quot;password&quot;.</p></dd>
<dt><a name="45"><b class="cmd">::html::passwordInputRow</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span></a></dt>
<dd><p>Format a table row containing a label and an <i class="term">input</i> tag of type
<i class="term"><a href="../../../../index.html#key692">password</a></i>. The <i class="arg">name</i> defaults to &quot;password&quot;.</p></dd>
<dt><a name="46"><b class="cmd">::html::quoteFormValue</b> <i class="arg">value</i></a></dt>
<dd><p>Quote special characters in <i class="arg">value</i> by replacing them with HTML
entities for quotes, ampersand, and angle brackets.</p></dd>
<dt><a name="47"><b class="cmd">::html::radioSet</b> <i class="arg">key sep list</i></a></dt>
<dd><p>Generate a set of <i class="term">input</i> tags of type <i class="term">radio</i> and an associated text
label.  All the radio buttons share the same <i class="arg">key</i> for their name.
The <i class="arg">sep</i> is text used to separate the elements.  The <i class="arg">list</i>
is a Tcl-style label, value list.</p></dd>
<dt><a name="48"><b class="cmd">::html::radioValue</b> <i class="arg">name value</i></a></dt>
<dd><p>Generate the &quot;name=<i class="arg">name</i> value=<i class="arg">value</i>&quot; for a <i class="term">radio</i> form
element.  If the CGI variable <i class="arg">name</i> has the value <i class="arg">value</i>,
then SELECTED is added to the return value.</p></dd>
<dt><a name="49"><b class="cmd">::html::refresh</b> <i class="arg">seconds url</i></a></dt>
<dd><p>Set up a refresh <i class="term">meta</i> tag. Call this before <b class="cmd">::html::head</b> and the
HEAD section will contain a <i class="term">meta</i> tag that causes the document to
refresh in <i class="arg">seconds</i> seconds.  The <i class="arg">url</i> is optional.  If
specified, it specifies a new page to load after the refresh interval.</p></dd>
<dt><a name="50"><b class="cmd">::html::row</b> <i class="arg">args</i></a></dt>
<dd><p>Generate a table row, including <i class="term">tr</i> and <i class="term">td</i> tags.  Each value in
<i class="arg">args</i> is place into its own table cell. This uses
<b class="cmd">::html::cell</b>. Ignores any default information set up via
<b class="cmd">::html::init</b>.</p></dd>
<dt><a name="51"><b class="cmd">::html::select</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></dt>
<dd><p>Generate a <i class="term">select</i> form element and nested <i class="term">option</i> tags. The <i class="arg">name</i>
and <i class="arg">param</i> are used to generate the <i class="term">select</i> tag. The <i class="arg">choices</i>
list is a Tcl-style name, value list.</p></dd>
<dt><a name="52"><b class="cmd">::html::selectPlain</b> <i class="arg">name param choices</i> <span class="opt">?<i class="arg">current</i>?</span></a></dt>
<dd><p>Like <b class="cmd">::html::select</b> except that <i class="arg">choices</i> is a Tcl list of
values used for the <i class="term">option</i> tags.  The label and the value for each
<i class="term">option</i> are the same.</p></dd>
<dt><a name="53"><b class="cmd">::html::set</b> <i class="arg">var val</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd"><a href="../../../../index.html#key301">set</a></b> command.  The
main difference is that it returns &quot;&quot; so it can be called from an HTML
template file without appending unwanted results.  The other
difference is that it must take two arguments.</p></dd>
<dt><a name="54"><b class="cmd">::html::submit</b> <i class="arg">label</i> <span class="opt">?<i class="arg">name</i>?</span></a></dt>
<dd><p>Generate an <i class="term">input</i> tag of type <i class="term">submit</i>. <i class="arg">name</i> defaults to &quot;submit&quot;.</p></dd>



<dt><a name="55"><b class="cmd">::html::tableFromArray</b> <i class="arg">arrname</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">pat</i>?</span></a></dt>
<dd><p>Generate a two-column <i class="term"><a href="../../../../index.html#key106">table</a></i> and nested rows to display a Tcl array. The
table gets a heading that matches the array name, and each generated row
contains a name, value pair. The array names are sorted (<b class="cmd">lsort</b> without
special options). The argument <i class="arg">param</i> is for the <i class="term"><a href="../../../../index.html#key106">table</a></i> tag and has
to contain a pre-formatted string. The <i class="arg">pat</i> is a <b class="cmd">string match</b>
pattern used to select the array elements to show in the table. It defaults to
<b class="const">*</b>, i.e. the whole array is shown.</p></dd>
<dt><a name="56"><b class="cmd">::html::tableFromList</b> <i class="arg">querylist</i> <span class="opt">?<i class="arg">param</i>?</span></a></dt>
<dd><p>Generate a two-column <i class="term"><a href="../../../../index.html#key106">table</a></i> and nested rows to display <i class="arg">querylist</i>,
which is a Tcl dictionary. Each generated row contains a name, value pair. The
information is shown in the same order as specified in the dictionary. The
argument <i class="arg">param</i> is for the <i class="term"><a href="../../../../index.html#key106">table</a></i> tag  and has to contain a
pre-formatted string.</p></dd>
<dt><a name="57"><b class="cmd">::html::textarea</b> <i class="arg">name</i> <span class="opt">?<i class="arg">param</i>?</span> <span class="opt">?<i class="arg">current</i>?</span></a></dt>
<dd><p>Generate a <i class="term">textarea</i> tag wrapped around its current values.</p></dd>
<dt><a name="58"><b class="cmd">::html::textInput</b> <i class="arg">name value args</i></a></dt>
<dd><p>Generate an <i class="term">input</i> form tag with type <i class="term"><a href="../../../../index.html#key248">text</a></i>.  This uses
<b class="cmd">::html::formValue</b>.  The args is any additional tag attributes
you want to put into the <i class="term">input</i> tag.</p></dd>
<dt><a name="59"><b class="cmd">::html::textInputRow</b> <i class="arg">label name value args</i></a></dt>
<dd><p>Generate an <i class="term">input</i> form tag with type <i class="term"><a href="../../../../index.html#key248">text</a></i> formatted into a table row
with an associated label.  The args is any additional tag attributes
you want to put into the <i class="term">input</i> tag.</p></dd>
<dt><a name="60"><b class="cmd">::html::varEmpty</b> <i class="arg">name</i></a></dt>
<dd><p>This returns 1 if the named variable either does not exist or has the
empty string for its value.</p></dd>
<dt><a name="61"><b class="cmd">::html::while</b> <i class="arg">test body</i></a></dt>
<dd><p>This procedure is similar to the built-in Tcl <b class="cmd">while</b> control
structure.  Rather than evaluating the body, it returns the subst'ed
<i class="arg">body</i>.  Each iteration of the loop causes another string to be
concatenated to the result value.</p></dd>
<dt><a name="62"><b class="cmd">::html::doctype</b> <i class="arg">id</i></a></dt>
<dd><p>This procedure can be used to build the standard DOCTYPE
declaration string. It will return the standard declaration
string for the id, or throw an error if the id is not known.
The following id's are defined:</p>
<ol class="doctools_enumerated">
<li><p>HTML32</p></li>
<li><p>HTML40</p></li>
<li><p>HTML40T</p></li>
<li><p>HTML40F</p></li>
<li><p>HTML401</p></li>
<li><p>HTML401T</p></li>
<li><p>HTML401F</p></li>
<li><p>XHTML10S</p></li>
<li><p>XHTML10T</p></li>
<li><p>XHTML10F</p></li>
<li><p>XHTML11</p></li>
<li><p>XHTMLB</p></li>
</ol></dd>






</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>html</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../htmlparse/htmlparse.html">htmlparse</a>, <a href="../ncgi/ncgi.html">ncgi</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key620">checkbox</a>, <a href="../../../../index.html#key618">checkbutton</a>, <a href="../../../../index.html#key616">form</a>, <a href="../../../../index.html#key617">html</a>, <a href="../../../../index.html#key619">radiobutton</a>, <a href="../../../../index.html#key106">table</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/htmlparse/htmlparse.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>htmlparse - HTML Parser</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>htmlparse - HTML Parser</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'htmlparse.man' by tcllib/doctools with format 'html'
   -->
<!-- htmlparse.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">htmlparse(n) 1.2.2 tcllib &quot;HTML Parser&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>htmlparse - Procedures to parse HTML strings</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'htmlparse.man' by tcllib/doctools with format 'html'
   -->
<! -- htmlparse.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">htmlparse(n) 1.2.2 tcllib &quot;HTML Parser&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>htmlparse - Procedures to parse HTML strings</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>htmlparse</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../struct/struct_tree.html">struct::tree</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#html">html</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#queue">queue</a>, <a href="../../../../index.html#tree">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





304
305
306
307
308
309
310






311
312
313
314
315
316
317
318
319
320
321
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>htmlparse</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../struct/struct_tree.html">struct::tree</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key617">html</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key50">queue</a>, <a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/http/autoproxy.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>autoproxy - HTTP protocol helper modules</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>autoproxy - HTTP protocol helper modules</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'autoproxy.man' by tcllib/doctools with format 'html'
   -->
<!-- autoproxy.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">autoproxy(n) 1.7 tcllib &quot;HTTP protocol helper modules&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>autoproxy - Automatic HTTP proxy usage and authentication</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|



|
|
|
|
|
|


|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'autoproxy.man' by tcllib/doctools with format 'html'
   -->
<! -- autoproxy.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">autoproxy(n) 1.5.3 tcllib &quot;HTTP protocol helper modules&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>autoproxy - Automatic HTTP proxy usage and authentication</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">http <span class="opt">?2.0?</span></b></li>
<li>package require <b class="pkgname">autoproxy <span class="opt">?1.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::autoproxy::init</b></a></li>
<li><a href="#2"><b class="cmd">::autoproxy::cget</b> <i class="arg">-option</i></a></li>
<li><a href="#3"><b class="cmd">::autoproxy::configure</b> <span class="opt">?-option <i class="arg">value</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::autoproxy::tls_connect</b> <i class="arg">args</i></a></li>
<li><a href="#5"><b class="cmd">::autoproxy::tunnel_connect</b> <i class="arg">args</i></a></li>







|

|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">http <span class="opt">?2.0?</span></b></li>
<li>package require <b class="pkgname">autoproxy <span class="opt">?1.5.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::autoproxy::init</b></a></li>
<li><a href="#2"><b class="cmd">::autoproxy::cget</b> <i class="arg">-option</i></a></li>
<li><a href="#3"><b class="cmd">::autoproxy::configure</b> <span class="opt">?-option <i class="arg">value</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::autoproxy::tls_connect</b> <i class="arg">args</i></a></li>
<li><a href="#5"><b class="cmd">::autoproxy::tunnel_connect</b> <i class="arg">args</i></a></li>
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
URL and sometimes the URL may contain authentication parameters or
these may be requested from the user or provided via http_proxy_user
and http_proxy_pass. This package attempts to deal with all these
schemes. It will do it's best to get the required parameters from the
environment or registry and if it fails can be reconfigured.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p><em>Note</em> This section only applies if TLS support is provided
by the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package.
It does not apply when <b class="package">autoproxy</b> was configured to use some
other package which can provide the same (i.e <b class="package">twapi</b>), via
the <b class="option">-tls_package</b> configuration option.</p>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>







<
<
<
<
<
|
|

|







|
|







162
163
164
165
166
167
168





169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
URL and sometimes the URL may contain authentication parameters or
these may be requested from the user or provided via http_proxy_user
and http_proxy_pass. This package attempts to deal with all these
schemes. It will do it's best to get the required parameters from the
environment or registry and if it fails can be reconfigured.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>





<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
options will return a list of all option names and values.
See <span class="sectref"><a href="#section4">OPTIONS</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::autoproxy::tls_connect</b> <i class="arg">args</i></a></dt>
<dd><p>Connect to a secure socket through a proxy. HTTP proxy servers permit
the use of the CONNECT HTTP command to open a link through the proxy
to the target machine. This function hides the details. For use with
the http package see <b class="cmd">tls_socket</b>.</p>
<p>The <i class="arg">args</i> list may contain any of the options
supported by the specific TLS package that is in use but
must end with the host and port as the last two items.</p></dd>
<dt><a name="5"><b class="cmd">::autoproxy::tunnel_connect</b> <i class="arg">args</i></a></dt>
<dd><p>Connect to a target host throught a proxy. This uses the same CONNECT
HTTP command as the <b class="cmd">tls_connect</b> but does not promote the link
security once the connection is established.</p>
<p>The <i class="arg">args</i> list may contain any of the options
supported by the specific TLS package that is in use but
must end with the host and port as the last two items.</p>
<p>Note that many proxy servers will permit CONNECT calls to a limited
set of ports - typically only port 443 (the secure HTTP port).</p></dd>
<dt><a name="6"><b class="cmd">::autoproxy::tls_socket</b> <i class="arg">args</i></a></dt>
<dd><p>This function is to be used to register a proxy-aware secure socket
handler for the https protocol. It may only be used with the Tcl http
package and should be registered using the http::register command (see







|
<





|
<







201
202
203
204
205
206
207
208

209
210
211
212
213
214

215
216
217
218
219
220
221
options will return a list of all option names and values.
See <span class="sectref"><a href="#section4">OPTIONS</a></span>.</p></dd>
<dt><a name="4"><b class="cmd">::autoproxy::tls_connect</b> <i class="arg">args</i></a></dt>
<dd><p>Connect to a secure socket through a proxy. HTTP proxy servers permit
the use of the CONNECT HTTP command to open a link through the proxy
to the target machine. This function hides the details. For use with
the http package see <b class="cmd">tls_socket</b>.</p>
<p>The <i class="arg">args</i> list may contain any of the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package options but

must end with the host and port as the last two items.</p></dd>
<dt><a name="5"><b class="cmd">::autoproxy::tunnel_connect</b> <i class="arg">args</i></a></dt>
<dd><p>Connect to a target host throught a proxy. This uses the same CONNECT
HTTP command as the <b class="cmd">tls_connect</b> but does not promote the link
security once the connection is established.</p>
<p>The <i class="arg">args</i> list may contain any of the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package options but

must end with the host and port as the last two items.</p>
<p>Note that many proxy servers will permit CONNECT calls to a limited
set of ports - typically only port 443 (the secure HTTP port).</p></dd>
<dt><a name="6"><b class="cmd">::autoproxy::tls_socket</b> <i class="arg">args</i></a></dt>
<dd><p>This function is to be used to register a proxy-aware secure socket
handler for the https protocol. It may only be used with the Tcl http
package and should be registered using the http::register command (see
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<dt><b class="option">-authProc</b> procedure</dt>
<dd><p>This option may be used to set an application defined procedure to be
called when <b class="cmd">configure</b> <b class="option">-basic</b> is called with either no or
insufficient authentication details. This can be used to present a
dialog to the user to request the additional information.</p></dd>
<dt><b class="option">-basic</b></dt>
<dd><p>Following options are for configuring the Basic authentication
scheme parameters. See <span class="sectref"><a href="#section5">Basic Authentication</a></span>.
To unset the proxy authentication information retained from a previous
call of this function either &quot;--&quot; or no additional parameters can be
supplied. This will remove the existing authentication information.</p></dd>
<dt><b class="option">-tls_package</b> packagename</dt>
<dd><p>This option may be used to configure the Tcl package to use for
TLS support. Valid package names are <b class="const">tls</b> (default)
and <b class="const">twapi</b>.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Basic Authentication</a></h2>
<p>Basic is the simplest and most commonly use HTTP proxy authentication
scheme. It is described in (1 section 11) and also in (2). It offers
no privacy whatsoever and its use should be discouraged in favour of
more secure alternatives like Digest. To perform Basic authentication
the client base64 encodes the username and plaintext password
separated by a colon. This encoded text is prefixed with the word
&quot;Basic&quot; and a space.</p>
<p>The following options exists for this scheme:</p>
<dl class="doctools_options">
<dt><b class="option">-username</b> name</dt>
<dd><p>The username required to authenticate with the configured proxy.</p></dd>
<dt><b class="option">-password</b> password</dt>
<dd><p>The password required for the username specified.</p></dd>
<dt><b class="option">-realm</b> realm</dt>
<dd><p>This option is not used by this package but may be used in requesting
authentication details from the user.</p></dd>
<dt><b class="option">--</b></dt>
<dd><p>The end-of-options indicator may be used alone to unset any
authentication details currently enabled.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">EXAMPLES</a></h2>
<pre class="doctools_example">
package require autoproxy
autoproxy::init
autoproxy::configure -basic -username ME -password SEKRET







|
<
<
<
<
<
<
<

















|
<
<
<
<







245
246
247
248
249
250
251
252







253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270




271
272
273
274
275
276
277
<dt><b class="option">-authProc</b> procedure</dt>
<dd><p>This option may be used to set an application defined procedure to be
called when <b class="cmd">configure</b> <b class="option">-basic</b> is called with either no or
insufficient authentication details. This can be used to present a
dialog to the user to request the additional information.</p></dd>
<dt><b class="option">-basic</b></dt>
<dd><p>Following options are for configuring the Basic authentication
scheme parameters. See <span class="sectref"><a href="#section5">Basic Authentication</a></span>.</p></dd>







</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Basic Authentication</a></h2>
<p>Basic is the simplest and most commonly use HTTP proxy authentication
scheme. It is described in (1 section 11) and also in (2). It offers
no privacy whatsoever and its use should be discouraged in favour of
more secure alternatives like Digest. To perform Basic authentication
the client base64 encodes the username and plaintext password
separated by a colon. This encoded text is prefixed with the word
&quot;Basic&quot; and a space.</p>
<p>The following options exists for this scheme:</p>
<dl class="doctools_options">
<dt><b class="option">-username</b> name</dt>
<dd><p>The username required to authenticate with the configured proxy.</p></dd>
<dt><b class="option">-password</b> password</dt>
<dd><p>The password required for the username specified.</p></dd>
<dt><b class="option">-realm</b> realm</dt>
<dd><p>This option is not used.</p></dd>




</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">EXAMPLES</a></h2>
<pre class="doctools_example">
package require autoproxy
autoproxy::init
autoproxy::configure -basic -username ME -password SEKRET
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<div id="section10" class="doctools_section"><h2><a name="section10">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>http :: autoproxy</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>http(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#authentication">authentication</a>, <a href="../../../../index.html#http">http</a>, <a href="../../../../index.html#proxy">proxy</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





309
310
311
312
313
314
315






316
317
318
319
320
321
322
323
324
325
326
<div id="section10" class="doctools_section"><h2><a name="section10">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>http :: autoproxy</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>http(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key394">authentication</a>, <a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key830">proxy</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/httpd/httpd.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
<!DOCTYPE html><html><head>
<title>httpd - Tcl Web Server</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'httpd.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2018 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- httpd.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">httpd(n) 4.3.5 tcllib &quot;Tcl Web Server&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>httpd - A TclOO and coroutine based web server</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Minimal Example</a></li>
<li class="doctools_section"><a href="#section3">Classes</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Class  httpd::mime</a></li>
<li class="doctools_subsection"><a href="#subsection2">Class  httpd::reply</a></li>
<li class="doctools_subsection"><a href="#subsection3">Class  httpd::server</a></li>
<li class="doctools_subsection"><a href="#subsection4">Class  httpd::server::dispatch</a></li>
<li class="doctools_subsection"><a href="#subsection5">Class  httpd::content.redirect</a></li>
<li class="doctools_subsection"><a href="#subsection6">Class  httpd::content.cache</a></li>
<li class="doctools_subsection"><a href="#subsection7">Class  httpd::content.template</a></li>
<li class="doctools_subsection"><a href="#subsection8">Class  httpd::content.file</a></li>
<li class="doctools_subsection"><a href="#subsection9">Class  httpd::content.exec</a></li>
<li class="doctools_subsection"><a href="#subsection10">Class  httpd::content.proxy</a></li>
<li class="doctools_subsection"><a href="#subsection11">Class  httpd::content.cgi</a></li>
<li class="doctools_subsection"><a href="#subsection12">Class  httpd::protocol.scgi</a></li>
<li class="doctools_subsection"><a href="#subsection13">Class  httpd::content.scgi</a></li>
<li class="doctools_subsection"><a href="#subsection14">Class  httpd::server.scgi</a></li>
<li class="doctools_subsection"><a href="#subsection15">Class  httpd::content.websocket</a></li>
<li class="doctools_subsection"><a href="#subsection16">Class  httpd::plugin</a></li>
<li class="doctools_subsection"><a href="#subsection17">Class  httpd::plugin.dict_dispatch</a></li>
<li class="doctools_subsection"><a href="#subsection18">Class  httpd::reply.memchan</a></li>
<li class="doctools_subsection"><a href="#subsection19">Class  httpd::plugin.local_memchan</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">AUTHORS</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">uuid</b></li>
<li>package require <b class="pkgname">clay</b></li>
<li>package require <b class="pkgname">coroutine</b></li>
<li>package require <b class="pkgname">fileutil</b></li>
<li>package require <b class="pkgname">fileutil::magic::filetype</b></li>
<li>package require <b class="pkgname">websocket</b></li>
<li>package require <b class="pkgname">mime</b></li>
<li>package require <b class="pkgname">cron</b></li>
<li>package require <b class="pkgname">uri</b></li>
<li>package require <b class="pkgname">Markdown</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1">method <b class="cmd">ChannelCopy</b> <i class="arg">in</i> <i class="arg">out</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#2">method <b class="cmd">html_header</b> <span class="opt">?<i class="arg">title</i> <b class="const"></b>?</span> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#3">method <b class="cmd">html_footer</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#4">method <b class="cmd">http_code_string</b> <i class="arg">code</i></a></li>
<li><a href="#5">method <b class="cmd">HttpHeaders</b> <i class="arg">sock</i> <span class="opt">?<i class="arg">debug</i> <b class="const"></b>?</span></a></li>
<li><a href="#6">method <b class="cmd">HttpHeaders_Default</b></a></li>
<li><a href="#7">method <b class="cmd">HttpServerHeaders</b></a></li>
<li><a href="#8">method <b class="cmd">MimeParse</b> <i class="arg">mimetext</i></a></li>
<li><a href="#9">method <b class="cmd">Url_Decode</b> <i class="arg">data</i></a></li>
<li><a href="#10">method <b class="cmd">Url_PathCheck</b> <i class="arg">urlsuffix</i></a></li>
<li><a href="#11">method <b class="cmd">wait</b> <i class="arg">mode</i> <i class="arg">sock</i></a></li>
<li><a href="#12">variable <b class="cmd">ChannelRegister</b></a></li>
<li><a href="#13">variable <b class="cmd">reply</b></a></li>
<li><a href="#14">variable <b class="cmd">request</b></a></li>
<li><a href="#15">delegate <b class="cmd">&lt;server&gt;</b></a></li>
<li><a href="#16">method <b class="cmd">constructor</b> <i class="arg">ServerObj</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#17">method <b class="cmd">destructor</b> <span class="opt">?<i class="arg">dictargs</i>?</span></a></li>
<li><a href="#18">method <b class="cmd">ChannelRegister</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#19">method <b class="cmd">close</b></a></li>
<li><a href="#20">method <b class="cmd">Log_Dispatched</b></a></li>
<li><a href="#21">method <b class="cmd">dispatch</b> <i class="arg">newsock</i> <i class="arg">datastate</i></a></li>
<li><a href="#22">method <b class="cmd">Dispatch</b></a></li>
<li><a href="#23">method <b class="cmd">html_header</b> <i class="arg">title</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#24">method <b class="cmd">html_footer</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#25">method <b class="cmd"><a href="../../../../index.html#error">error</a></b> <i class="arg">code</i> <span class="opt">?<i class="arg">msg</i> <b class="const"></b>?</span> <span class="opt">?<i class="arg">errorInfo</i> <b class="const"></b>?</span></a></li>
<li><a href="#26">method <b class="cmd">content</b></a></li>
<li><a href="#27">method <b class="cmd">EncodeStatus</b> <i class="arg">status</i></a></li>
<li><a href="#28">method <b class="cmd"><a href="../log/log.html">log</a></b> <i class="arg">type</i> <span class="opt">?<i class="arg">info</i> <b class="const"></b>?</span></a></li>
<li><a href="#29">method <b class="cmd">CoroName</b></a></li>
<li><a href="#30">method <b class="cmd">DoOutput</b></a></li>
<li><a href="#31">method <b class="cmd">FormData</b></a></li>
<li><a href="#32">method <b class="cmd">PostData</b> <i class="arg">length</i></a></li>
<li><a href="#33">method <b class="cmd">Session_Load</b></a></li>
<li><a href="#34">method <b class="cmd">puts</b> <i class="arg">line</i></a></li>
<li><a href="#35">method <b class="cmd">RequestFind</b> <i class="arg">field</i></a></li>
<li><a href="#36">method <b class="cmd">request</b> <i class="arg">subcommand</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#37">method <b class="cmd">reply</b> <i class="arg">subcommand</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#38">method <b class="cmd">reset</b></a></li>
<li><a href="#39">method <b class="cmd">timeOutCheck</b></a></li>
<li><a href="#40">method <b class="cmd"><a href="../../../../index.html#timestamp">timestamp</a></b></a></li>
<li><a href="#41">variable <b class="cmd">template</b></a></li>
<li><a href="#42">variable <b class="cmd">url_patterns</b></a></li>
<li><a href="#43">method <b class="cmd">constructor</b> <i class="arg">args</i> <span class="opt">?<i class="arg">port</i> <b class="const">auto</b>?</span> <span class="opt">?<i class="arg">myaddr</i> <b class="const">127.0.0.1</b>?</span> <span class="opt">?<i class="arg">string</i> <b class="const">auto</b>?</span> <span class="opt">?<i class="arg">name</i> <b class="const">auto</b>?</span> <span class="opt">?<i class="arg">doc_root</i> <b class="const"></b>?</span> <span class="opt">?<i class="arg">reverse_dns</i> <b class="const">0</b>?</span> <span class="opt">?<i class="arg">configuration_file</i> <b class="const"></b>?</span> <span class="opt">?<i class="arg">protocol</i> <b class="const">HTTP/1.1</b>?</span></a></li>
<li><a href="#44">method <b class="cmd">destructor</b> <span class="opt">?<i class="arg">dictargs</i>?</span></a></li>
<li><a href="#45">method <b class="cmd">connect</b> <i class="arg">sock</i> <i class="arg">ip</i> <i class="arg">port</i></a></li>
<li><a href="#46">method <b class="cmd">ServerHeaders</b> <i class="arg">ip</i> <i class="arg">http_request</i> <i class="arg">mimetxt</i></a></li>
<li><a href="#47">method <b class="cmd">Connect</b> <i class="arg">uuid</i> <i class="arg">sock</i> <i class="arg">ip</i></a></li>
<li><a href="#48">method <b class="cmd"><a href="../counter/counter.html">counter</a></b> <i class="arg">which</i></a></li>
<li><a href="#49">method <b class="cmd">CheckTimeout</b></a></li>
<li><a href="#50">method <b class="cmd"><a href="../debug/debug.html">debug</a></b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#51">method <b class="cmd">dispatch</b> <i class="arg">data</i></a></li>
<li><a href="#52">method <b class="cmd">Dispatch_Default</b> <i class="arg">reply</i></a></li>
<li><a href="#53">method <b class="cmd">Dispatch_Local</b> <i class="arg">data</i></a></li>
<li><a href="#54">method <b class="cmd">Headers_Local</b> <i class="arg">varname</i></a></li>
<li><a href="#55">method <b class="cmd">Headers_Process</b> <i class="arg">varname</i></a></li>
<li><a href="#56">method <b class="cmd">HostName</b> <i class="arg">ipaddr</i></a></li>
<li><a href="#57">method <b class="cmd"><a href="../log/log.html">log</a></b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#58">method <b class="cmd"><a href="../../../../index.html#plugin">plugin</a></b> <i class="arg">slot</i> <span class="opt">?<i class="arg">class</i> <b class="const"></b>?</span></a></li>
<li><a href="#59">method <b class="cmd">port_listening</b></a></li>
<li><a href="#60">method <b class="cmd">PrefixNormalize</b> <i class="arg">prefix</i></a></li>
<li><a href="#61">method <b class="cmd"><a href="../../../../index.html#source">source</a></b> <i class="arg">filename</i></a></li>
<li><a href="#62">method <b class="cmd">start</b></a></li>
<li><a href="#63">method <b class="cmd">stop</b></a></li>
<li><a href="#64">method <b class="cmd">SubObject {} db</b></a></li>
<li><a href="#65">method <b class="cmd">SubObject {} default</b></a></li>
<li><a href="#66">method <b class="cmd">template</b> <i class="arg">page</i></a></li>
<li><a href="#67">method <b class="cmd">TemplateSearch</b> <i class="arg">page</i></a></li>
<li><a href="#68">method <b class="cmd">Thread_start</b></a></li>
<li><a href="#69">method <b class="cmd">Uuid_Generate</b></a></li>
<li><a href="#70">method <b class="cmd">Validate_Connection</b> <i class="arg">sock</i> <i class="arg">ip</i></a></li>
<li><a href="#71">method <b class="cmd">reset</b></a></li>
<li><a href="#72">method <b class="cmd">content</b></a></li>
<li><a href="#73">method <b class="cmd">Dispatch</b></a></li>
<li><a href="#74">method <b class="cmd">content</b></a></li>
<li><a href="#75">method <b class="cmd">FileName</b></a></li>
<li><a href="#76">method <b class="cmd">DirectoryListing</b> <i class="arg">local_file</i></a></li>
<li><a href="#77">method <b class="cmd">content</b></a></li>
<li><a href="#78">method <b class="cmd">Dispatch</b></a></li>
<li><a href="#79">variable <b class="cmd">exename</b></a></li>
<li><a href="#80">method <b class="cmd">CgiExec</b> <i class="arg">execname</i> <i class="arg">script</i> <i class="arg">arglist</i></a></li>
<li><a href="#81">method <b class="cmd">Cgi_Executable</b> <i class="arg">script</i></a></li>
<li><a href="#82">method <b class="cmd">proxy_channel</b></a></li>
<li><a href="#83">method <b class="cmd">proxy_path</b></a></li>
<li><a href="#84">method <b class="cmd">ProxyRequest</b> <i class="arg">chana</i> <i class="arg">chanb</i></a></li>
<li><a href="#85">method <b class="cmd">ProxyReply</b> <i class="arg">chana</i> <i class="arg">chanb</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#86">method <b class="cmd">Dispatch</b></a></li>
<li><a href="#87">method <b class="cmd">FileName</b></a></li>
<li><a href="#88">method <b class="cmd">proxy_channel</b></a></li>
<li><a href="#89">method <b class="cmd">ProxyRequest</b> <i class="arg">chana</i> <i class="arg">chanb</i></a></li>
<li><a href="#90">method <b class="cmd">ProxyReply</b> <i class="arg">chana</i> <i class="arg">chanb</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#91">method <b class="cmd">DirectoryListing</b> <i class="arg">local_file</i></a></li>
<li><a href="#92">method <b class="cmd">EncodeStatus</b> <i class="arg">status</i></a></li>
<li><a href="#93">method <b class="cmd">scgi_info</b></a></li>
<li><a href="#94">method <b class="cmd">proxy_channel</b></a></li>
<li><a href="#95">method <b class="cmd">ProxyRequest</b> <i class="arg">chana</i> <i class="arg">chanb</i></a></li>
<li><a href="#96">method <b class="cmd">ProxyReply</b> <i class="arg">chana</i> <i class="arg">chanb</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#97">method <b class="cmd"><a href="../debug/debug.html">debug</a></b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#98">method <b class="cmd">Connect</b> <i class="arg">uuid</i> <i class="arg">sock</i> <i class="arg">ip</i></a></li>
<li><a href="#99">method <b class="cmd">Dispatch_Dict</b> <i class="arg">data</i></a></li>
<li><a href="#100">method <b class="cmd">uri {} add</b> <i class="arg">vhosts</i> <i class="arg">patterns</i> <i class="arg">info</i></a></li>
<li><a href="#101">method <b class="cmd">uri {} direct</b> <i class="arg">vhosts</i> <i class="arg">patterns</i> <i class="arg">info</i> <i class="arg">body</i></a></li>
<li><a href="#102">method <b class="cmd">output</b></a></li>
<li><a href="#103">method <b class="cmd">DoOutput</b></a></li>
<li><a href="#104">method <b class="cmd">close</b></a></li>
<li><a href="#105">method <b class="cmd">local_memchan</b> <i class="arg">command</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#106">method <b class="cmd">Connect_Local</b> <i class="arg">uuid</i> <i class="arg">sock</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This module implements a web server, suitable for embedding in an
application. The server is object oriented, and contains all of the
fundamentals needed for a full service website.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Minimal Example</a></h2>
<p>Starting a web service requires starting a class of type
<b class="cmd">httpd::server</b>, and providing that server with one or more URIs
to service, and <b class="cmd">httpd::reply</b> derived classes to generate them.</p>
<pre class="doctools_example">
oo::class create ::reply.hello {
  method content {} {
    my puts &quot;&lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;IRM Dispatch Server&lt;/TITLE&gt;&lt;/HEAD&gt;&lt;BODY&gt;&quot;
    my puts &quot;&lt;h1&gt;Hello World!&lt;/h1&gt;&quot;
    my puts &lt;/BODY&gt;&lt;/HTML&gt;
  }
}
::httpd::server create HTTPD port 8015 myaddr 127.0.0.1 doc_root ~/htdocs
HTTPD plugin dispatch httpd::server::dispatch
HTTPD uri add * /hello [list mixin reply.hello]
</pre>
<p>The bare module does have facilities to hose a files from a file system. Files that end in a .tml will be substituted in the style of Tclhttpd:</p>
<pre class="doctools_example">
&lt;!-- hello.tml --&gt;
[my html_header {Hello World!}]
Your Server is running.
&lt;p&gt;
The time is now [clock format [clock seconds]]
[my html_footer]
</pre>
<p>A complete example of an httpd server is in the /examples directory of Tcllib. It also show how to dispatch URIs to other processes via SCGI and HTTP proxies.</p>
<pre class="doctools_example">
cd ~/tcl/sandbox/tcllib
tclsh examples/httpd.tcl
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Classes</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Class  httpd::mime</a></h3>
<p>A metaclass for MIME handling behavior across a live socket</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="1">method <b class="cmd">ChannelCopy</b> <i class="arg">in</i> <i class="arg">out</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="2">method <b class="cmd">html_header</b> <span class="opt">?<i class="arg">title</i> <b class="const"></b>?</span> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Returns a block of HTML</p></dd>
<dt><a name="3">method <b class="cmd">html_footer</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="4">method <b class="cmd">http_code_string</b> <i class="arg">code</i></a></dt>
<dd></dd>
<dt><a name="5">method <b class="cmd">HttpHeaders</b> <i class="arg">sock</i> <span class="opt">?<i class="arg">debug</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="6">method <b class="cmd">HttpHeaders_Default</b></a></dt>
<dd></dd>
<dt><a name="7">method <b class="cmd">HttpServerHeaders</b></a></dt>
<dd></dd>
<dt><a name="8">method <b class="cmd">MimeParse</b> <i class="arg">mimetext</i></a></dt>
<dd><p>Converts a block of mime encoded text to a key/value list. If an exception is encountered,
 the method will generate its own call to the <b class="cmd"><a href="../../../../index.html#error">error</a></b> method, and immediately invoke
 the <b class="cmd">output</b> method to produce an error code and close the connection.</p></dd>
<dt><a name="9">method <b class="cmd">Url_Decode</b> <i class="arg">data</i></a></dt>
<dd><p>De-httpizes a string.</p></dd>
<dt><a name="10">method <b class="cmd">Url_PathCheck</b> <i class="arg">urlsuffix</i></a></dt>
<dd></dd>
<dt><a name="11">method <b class="cmd">wait</b> <i class="arg">mode</i> <i class="arg">sock</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Class  httpd::reply</a></h3>
<p><em>ancestors</em>: <b class="class">httpd::mime</b></p>
<p>A class which shephards a request through the process of generating a
 reply.
 The socket associated with the reply is available at all times as the <i class="arg">chan</i>
 variable.
 The process of generating a reply begins with an <b class="cmd">httpd::server</b> generating a
 <b class="cmd">http::class</b> object, mixing in a set of behaviors and then invoking the reply
 object's <b class="cmd">dispatch</b> method.
 In normal operations the <b class="cmd">dispatch</b> method:</p>
<ol class="doctools_enumerated">
 
<li><p>Invokes the <b class="cmd">reset</b> method for the object to populate default headers.</p></li>
<li><p>Invokes the <b class="cmd">HttpHeaders</b> method to stream the MIME headers out of the socket</p></li>
<li><p>Invokes the <b class="cmd">request parse</b> method to convert the stream of MIME headers into a
 dict that can be read via the <b class="cmd">request</b> method.</p></li>
<li><p>Stores the raw stream of MIME headers in the <i class="arg">rawrequest</i> variable of the object.</p></li>
<li><p>Invokes the <b class="cmd">content</b> method for the object, generating an call to the <b class="cmd"><a href="../../../../index.html#error">error</a></b>
 method if an exception is raised.</p></li>
<li><p>Invokes the <b class="cmd">output</b> method for the object</p></li>
</ol>
<p>Developers have the option of streaming output to a buffer via the <b class="cmd">puts</b> method of the
 reply, or simply populating the <i class="arg">reply_body</i> variable of the object.
 The information returned by the <b class="cmd">content</b> method is not interpreted in any way.
 If an exception is thrown (via the <b class="cmd"><a href="../../../../index.html#error">error</a></b> command in Tcl, for example) the caller will
 auto-generate a 500 {Internal Error} message.
 A typical implementation of <b class="cmd">content</b> look like:</p>
<pre class="doctools_example">
 clay::define ::test::content.file {
 	superclass ::httpd::content.file
 	# Return a file
 	# Note: this is using the content.file mixin which looks for the reply_file variable
 	# and will auto-compute the Content-Type
 	method content {} {
 	  my reset
     set doc_root [my request get DOCUMENT_ROOT]
     my variable reply_file
     set reply_file [file join $doc_root index.html]
 	}
 }
 clay::define ::test::content.time {
   # return the current system time
 	method content {} {
 		my variable reply_body
     my reply set Content-Type text/plain
 		set reply_body [clock seconds]
 	}
 }
 clay::define ::test::content.echo {
 	method content {} {
 		my variable reply_body
     my reply set Content-Type [my request get CONTENT_TYPE]
 		set reply_body [my PostData [my request get CONTENT_LENGTH]]
 	}
 }
 clay::define ::test::content.form_handler {
 	method content {} {
 	  set form [my FormData]
 	  my reply set Content-Type {text/html; charset=UTF-8}
     my puts [my html_header {My Dynamic Page}]
     my puts &quot;&lt;BODY&gt;&quot;
     my puts &quot;You Sent&lt;p&gt;&quot;
     my puts &quot;&lt;TABLE&gt;&quot;
     foreach {f v} $form {
       my puts &quot;&lt;TR&gt;&lt;TH&gt;$f&lt;/TH&gt;&lt;TD&gt;&lt;verbatim&gt;$v&lt;/verbatim&gt;&lt;/TD&gt;&quot;
     }
     my puts &quot;&lt;/TABLE&gt;&lt;p&gt;&quot;
     my puts &quot;Send some info:&lt;p&gt;&quot;
     my puts &quot;&lt;FORM action=/[my request get REQUEST_PATH] method POST&gt;&quot;
     my puts &quot;&lt;TABLE&gt;&quot;
     foreach field {name rank serial_number} {
       set line &quot;&lt;TR&gt;&lt;TH&gt;$field&lt;/TH&gt;&lt;TD&gt;&lt;input name=\&quot;$field\&quot; &quot;
       if {[dict exists $form $field]} {
         append line &quot; value=\&quot;[dict get $form $field]\&quot;&quot;&quot;
       }
       append line &quot; /&gt;&lt;/TD&gt;&lt;/TR&gt;&quot;
       my puts $line
     }
     my puts &quot;&lt;/TABLE&gt;&quot;
     my puts [my html footer]
 	}
 }
 </pre>
<p><b class="class">Variable</b></p>
<dl class="doctools_definitions">
<dt><a name="12">variable <b class="cmd">ChannelRegister</b></a></dt>
<dd></dd>
<dt><a name="13">variable <b class="cmd">reply</b></a></dt>
<dd><p>A dictionary which will converted into the MIME headers of the reply</p></dd>
<dt><a name="14">variable <b class="cmd">request</b></a></dt>
<dd><p>A dictionary containing the SCGI transformed HTTP headers for the request</p></dd>
</dl>
<p><b class="class">Delegate</b></p>
<dl class="doctools_definitions">
<dt><a name="15">delegate <b class="cmd">&lt;server&gt;</b></a></dt>
<dd><p>The server object which spawned this reply</p></dd>
</dl>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="16">method <b class="cmd">constructor</b> <i class="arg">ServerObj</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="17">method <b class="cmd">destructor</b> <span class="opt">?<i class="arg">dictargs</i>?</span></a></dt>
<dd><p>clean up on exit</p></dd>
<dt><a name="18">method <b class="cmd">ChannelRegister</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Registers a channel to be closed by the close method</p></dd>
<dt><a name="19">method <b class="cmd">close</b></a></dt>
<dd><p>Close channels opened by this object</p></dd>
<dt><a name="20">method <b class="cmd">Log_Dispatched</b></a></dt>
<dd><p>Record a dispatch event</p></dd>
<dt><a name="21">method <b class="cmd">dispatch</b> <i class="arg">newsock</i> <i class="arg">datastate</i></a></dt>
<dd><p>Accept the handoff from the server object of the socket
 <em>newsock</em> and feed it the state <em>datastate</em>.
 Fields the <em>datastate</em> are looking for in particular are:</p>
<p>* <b class="const">mixin</b> - A key/value list of slots and classes to be mixed into the
 object prior to invoking <b class="cmd">Dispatch</b>.</p>
<p>* <b class="const">http</b> - A key/value list of values to populate the object's <em>request</em>
 ensemble</p>
<p>All other fields are passed along to the <b class="method">clay</b> structure of the object.</p></dd>
<dt><a name="22">method <b class="cmd">Dispatch</b></a></dt>
<dd></dd>
<dt><a name="23">method <b class="cmd">html_header</b> <i class="arg">title</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="24">method <b class="cmd">html_footer</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="25">method <b class="cmd"><a href="../../../../index.html#error">error</a></b> <i class="arg">code</i> <span class="opt">?<i class="arg">msg</i> <b class="const"></b>?</span> <span class="opt">?<i class="arg">errorInfo</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="26">method <b class="cmd">content</b></a></dt>
<dd><p>REPLACE ME:
 This method is the &quot;meat&quot; of your application.
 It writes to the result buffer via the &quot;puts&quot; method
 and can tweak the headers via &quot;clay put header_reply&quot;</p></dd>
<dt><a name="27">method <b class="cmd">EncodeStatus</b> <i class="arg">status</i></a></dt>
<dd><p>Formulate a standard HTTP status header from he string provided.</p></dd>
<dt><a name="28">method <b class="cmd"><a href="../log/log.html">log</a></b> <i class="arg">type</i> <span class="opt">?<i class="arg">info</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="29">method <b class="cmd">CoroName</b></a></dt>
<dd></dd>
<dt><a name="30">method <b class="cmd">DoOutput</b></a></dt>
<dd><p>Generates the the HTTP reply, streams that reply back across <i class="arg">chan</i>,
 and destroys the object.</p></dd>
<dt><a name="31">method <b class="cmd">FormData</b></a></dt>
<dd><p>For GET requests, converts the QUERY_DATA header into a key/value list.
 For POST requests, reads the Post data and converts that information to
 a key/value list for application/x-www-form-urlencoded posts. For multipart
 posts, it composites all of the MIME headers of the post to a singular key/value
 list, and provides MIME_* information as computed by the <b class="cmd"><a href="../mime/mime.html">mime</a></b> package, including
 the MIME_TOKEN, which can be fed back into the mime package to read out the contents.</p></dd>
<dt><a name="32">method <b class="cmd">PostData</b> <i class="arg">length</i></a></dt>
<dd><p>Stream <i class="arg">length</i> bytes from the <i class="arg">chan</i> socket, but only of the request is a
 POST or PUSH. Returns an empty string otherwise.</p></dd>
<dt><a name="33">method <b class="cmd">Session_Load</b></a></dt>
<dd><p>Manage session data</p></dd>
<dt><a name="34">method <b class="cmd">puts</b> <i class="arg">line</i></a></dt>
<dd><p>Appends the value of <i class="arg">string</i> to the end of <i class="arg">reply_body</i>, as well as a trailing newline
 character.</p></dd>
<dt><a name="35">method <b class="cmd">RequestFind</b> <i class="arg">field</i></a></dt>
<dd></dd>
<dt><a name="36">method <b class="cmd">request</b> <i class="arg">subcommand</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="37">method <b class="cmd">reply</b> <i class="arg">subcommand</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="38">method <b class="cmd">reset</b></a></dt>
<dd><p>Clear the contents of the <i class="arg">reply_body</i> variable, and reset all headers in the <b class="cmd">reply</b>
 structure back to the defaults for this object.</p></dd>
<dt><a name="39">method <b class="cmd">timeOutCheck</b></a></dt>
<dd><p>Called from the <b class="cmd">http::server</b> object which spawned this reply. Checks to see
 if too much time has elapsed while waiting for data or generating a reply, and issues
 a timeout error to the request if it has, as well as destroy the object and close the
 <i class="arg">chan</i> socket.</p></dd>
<dt><a name="40">method <b class="cmd"><a href="../../../../index.html#timestamp">timestamp</a></b></a></dt>
<dd><p>Return the current system time in the format:</p>
<pre class="doctools_example">%a, %d %b %Y %T %Z</pre>
</dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Class  httpd::server</a></h3>
<p><em>ancestors</em>: <b class="class">httpd::mime</b></p>
<p><b class="class">Variable</b></p>
<dl class="doctools_definitions">
<dt><a name="41">variable <b class="cmd">template</b></a></dt>
<dd></dd>
<dt><a name="42">variable <b class="cmd">url_patterns</b></a></dt>
<dd></dd>
</dl>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="43">method <b class="cmd">constructor</b> <i class="arg">args</i> <span class="opt">?<i class="arg">port</i> <b class="const">auto</b>?</span> <span class="opt">?<i class="arg">myaddr</i> <b class="const">127.0.0.1</b>?</span> <span class="opt">?<i class="arg">string</i> <b class="const">auto</b>?</span> <span class="opt">?<i class="arg">name</i> <b class="const">auto</b>?</span> <span class="opt">?<i class="arg">doc_root</i> <b class="const"></b>?</span> <span class="opt">?<i class="arg">reverse_dns</i> <b class="const">0</b>?</span> <span class="opt">?<i class="arg">configuration_file</i> <b class="const"></b>?</span> <span class="opt">?<i class="arg">protocol</i> <b class="const">HTTP/1.1</b>?</span></a></dt>
<dd></dd>
<dt><a name="44">method <b class="cmd">destructor</b> <span class="opt">?<i class="arg">dictargs</i>?</span></a></dt>
<dd></dd>
<dt><a name="45">method <b class="cmd">connect</b> <i class="arg">sock</i> <i class="arg">ip</i> <i class="arg">port</i></a></dt>
<dd><p>Reply to an open socket. This method builds a coroutine to manage the remainder
 of the connection. The coroutine's operations are driven by the <b class="cmd">Connect</b> method.</p></dd>
<dt><a name="46">method <b class="cmd">ServerHeaders</b> <i class="arg">ip</i> <i class="arg">http_request</i> <i class="arg">mimetxt</i></a></dt>
<dd></dd>
<dt><a name="47">method <b class="cmd">Connect</b> <i class="arg">uuid</i> <i class="arg">sock</i> <i class="arg">ip</i></a></dt>
<dd><p>This method reads HTTP headers, and then consults the <b class="cmd">dispatch</b> method to
 determine if the request is valid, and/or what kind of reply to generate. Under
 normal cases, an object of class <b class="cmd">::http::reply</b> is created, and that class's
 <b class="cmd">dispatch</b> method.
 This action passes control of the socket to
 the reply object. The reply object manages the rest of the transaction, including
 closing the socket.</p></dd>
<dt><a name="48">method <b class="cmd"><a href="../counter/counter.html">counter</a></b> <i class="arg">which</i></a></dt>
<dd><p>Increment an internal counter.</p></dd>
<dt><a name="49">method <b class="cmd">CheckTimeout</b></a></dt>
<dd><p>Check open connections for a time out event.</p></dd>
<dt><a name="50">method <b class="cmd"><a href="../debug/debug.html">debug</a></b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="51">method <b class="cmd">dispatch</b> <i class="arg">data</i></a></dt>
<dd><p>Given a key/value list of information, return a data structure describing how
 the server should reply.</p></dd>
<dt><a name="52">method <b class="cmd">Dispatch_Default</b> <i class="arg">reply</i></a></dt>
<dd><p>Method dispatch method of last resort before returning a 404 NOT FOUND error.
 The default behavior is to look for a file in <em>DOCUMENT_ROOT</em> which
 matches the query.</p></dd>
<dt><a name="53">method <b class="cmd">Dispatch_Local</b> <i class="arg">data</i></a></dt>
<dd><p>Method dispatch method invoked prior to invoking methods implemented by plugins.
 If this method returns a non-empty dictionary, that structure will be passed to
 the reply. The default is an empty implementation.</p></dd>
<dt><a name="54">method <b class="cmd">Headers_Local</b> <i class="arg">varname</i></a></dt>
<dd><p>Introspect and possibly modify a data structure destined for a reply. This
 method is invoked before invoking Header methods implemented by plugins.
 The default implementation is empty.</p></dd>
<dt><a name="55">method <b class="cmd">Headers_Process</b> <i class="arg">varname</i></a></dt>
<dd><p>Introspect and possibly modify a data structure destined for a reply. This
 method is built dynamically by the <b class="cmd"><a href="../../../../index.html#plugin">plugin</a></b> method.</p></dd>
<dt><a name="56">method <b class="cmd">HostName</b> <i class="arg">ipaddr</i></a></dt>
<dd><p>Convert an ip address to a host name. If the server/ reverse_dns flag
 is false, this method simply returns the IP address back.
 Internally, this method uses the <em>dns</em> module from tcllib.</p></dd>
<dt><a name="57">method <b class="cmd"><a href="../log/log.html">log</a></b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Log an event. The input for args is free form. This method is intended
 to be replaced by the user, and is a noop for a stock http::server object.</p></dd>
<dt><a name="58">method <b class="cmd"><a href="../../../../index.html#plugin">plugin</a></b> <i class="arg">slot</i> <span class="opt">?<i class="arg">class</i> <b class="const"></b>?</span></a></dt>
<dd><p>Incorporate behaviors from a plugin.
 This method dynamically rebuilds the <b class="cmd">Dispatch</b> and <b class="cmd">Headers</b>
 method. For every plugin, the server looks for the following entries in
 <em>clay plugin/</em>:</p>
<p><em>load</em> - A script to invoke in the server's namespace during the <b class="cmd"><a href="../../../../index.html#plugin">plugin</a></b> method invokation.</p>
<p><em>dispatch</em> - A script to stitch into the server's <b class="cmd">Dispatch</b> method.</p>
<p><em>headers</em> - A script to stitch into the server's <b class="cmd">Headers</b> method.</p>
<p><em>thread</em> - A script to stitch into the server's <b class="cmd">Thread_start</b> method.</p></dd>
<dt><a name="59">method <b class="cmd">port_listening</b></a></dt>
<dd><p>Return the actual port that httpd is listening on.</p></dd>
<dt><a name="60">method <b class="cmd">PrefixNormalize</b> <i class="arg">prefix</i></a></dt>
<dd><p>For the stock version, trim trailing /'s and *'s from a prefix. This
 method can be replaced by the end user to perform any other transformations
 needed for the application.</p></dd>
<dt><a name="61">method <b class="cmd"><a href="../../../../index.html#source">source</a></b> <i class="arg">filename</i></a></dt>
<dd></dd>
<dt><a name="62">method <b class="cmd">start</b></a></dt>
<dd><p>Open the socket listener.</p></dd>
<dt><a name="63">method <b class="cmd">stop</b></a></dt>
<dd><p>Shut off the socket listener, and destroy any pending replies.</p></dd>
<dt><a name="64">method <b class="cmd">SubObject {} db</b></a></dt>
<dd></dd>
<dt><a name="65">method <b class="cmd">SubObject {} default</b></a></dt>
<dd></dd>
<dt><a name="66">method <b class="cmd">template</b> <i class="arg">page</i></a></dt>
<dd><p>Return a template for the string <i class="arg">page</i></p></dd>
<dt><a name="67">method <b class="cmd">TemplateSearch</b> <i class="arg">page</i></a></dt>
<dd><p>Perform a search for the template that best matches <i class="arg">page</i>. This
 can include local file searches, in-memory structures, or even
 database lookups. The stock implementation simply looks for files
 with a .tml or .html extension in the <span class="opt">?doc_root?</span> directory.</p></dd>
<dt><a name="68">method <b class="cmd">Thread_start</b></a></dt>
<dd><p>Built by the <b class="cmd"><a href="../../../../index.html#plugin">plugin</a></b> method. Called by the <b class="cmd">start</b> method. Intended
 to allow plugins to spawn worker threads.</p></dd>
<dt><a name="69">method <b class="cmd">Uuid_Generate</b></a></dt>
<dd><p>Generate a GUUID. Used to ensure every request has a unique ID.
 The default implementation is:</p>
<pre class="doctools_example">
   return [::clay::uuid generate]
 </pre>
</dd>
<dt><a name="70">method <b class="cmd">Validate_Connection</b> <i class="arg">sock</i> <i class="arg">ip</i></a></dt>
<dd><p>Given a socket and an ip address, return true if this connection should
 be terminated, or false if it should be allowed to continue. The stock
 implementation always returns 0. This is intended for applications to
 be able to implement black lists and/or provide security based on IP
 address.</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Class  httpd::server::dispatch</a></h3>
<p><em>ancestors</em>: <b class="class">httpd::server</b></p>
<p>Provide a backward compadible alias</p>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Class  httpd::content.redirect</a></h3>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="71">method <b class="cmd">reset</b></a></dt>
<dd></dd>
<dt><a name="72">method <b class="cmd">content</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Class  httpd::content.cache</a></h3>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="73">method <b class="cmd">Dispatch</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Class  httpd::content.template</a></h3>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="74">method <b class="cmd">content</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Class  httpd::content.file</a></h3>
<p>Class to deliver Static content
 When utilized, this class is fed a local filename
 by the dispatcher</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="75">method <b class="cmd">FileName</b></a></dt>
<dd></dd>
<dt><a name="76">method <b class="cmd">DirectoryListing</b> <i class="arg">local_file</i></a></dt>
<dd></dd>
<dt><a name="77">method <b class="cmd">content</b></a></dt>
<dd></dd>
<dt><a name="78">method <b class="cmd">Dispatch</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">Class  httpd::content.exec</a></h3>
<p><b class="class">Variable</b></p>
<dl class="doctools_definitions">
<dt><a name="79">variable <b class="cmd">exename</b></a></dt>
<dd></dd>
</dl>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="80">method <b class="cmd">CgiExec</b> <i class="arg">execname</i> <i class="arg">script</i> <i class="arg">arglist</i></a></dt>
<dd></dd>
<dt><a name="81">method <b class="cmd">Cgi_Executable</b> <i class="arg">script</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">Class  httpd::content.proxy</a></h3>
<p><em>ancestors</em>: <b class="class">httpd::content.exec</b></p>
<p>Return data from an proxy process</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="82">method <b class="cmd">proxy_channel</b></a></dt>
<dd></dd>
<dt><a name="83">method <b class="cmd">proxy_path</b></a></dt>
<dd></dd>
<dt><a name="84">method <b class="cmd">ProxyRequest</b> <i class="arg">chana</i> <i class="arg">chanb</i></a></dt>
<dd></dd>
<dt><a name="85">method <b class="cmd">ProxyReply</b> <i class="arg">chana</i> <i class="arg">chanb</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="86">method <b class="cmd">Dispatch</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Class  httpd::content.cgi</a></h3>
<p><em>ancestors</em>: <b class="class">httpd::content.proxy</b></p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="87">method <b class="cmd">FileName</b></a></dt>
<dd></dd>
<dt><a name="88">method <b class="cmd">proxy_channel</b></a></dt>
<dd></dd>
<dt><a name="89">method <b class="cmd">ProxyRequest</b> <i class="arg">chana</i> <i class="arg">chanb</i></a></dt>
<dd></dd>
<dt><a name="90">method <b class="cmd">ProxyReply</b> <i class="arg">chana</i> <i class="arg">chanb</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="91">method <b class="cmd">DirectoryListing</b> <i class="arg">local_file</i></a></dt>
<dd><p>For most CGI applications a directory list is vorboten</p></dd>
</dl>
</div>
<div id="subsection12" class="doctools_subsection"><h3><a name="subsection12">Class  httpd::protocol.scgi</a></h3>
<p>Return data from an SCGI process</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="92">method <b class="cmd">EncodeStatus</b> <i class="arg">status</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection13" class="doctools_subsection"><h3><a name="subsection13">Class  httpd::content.scgi</a></h3>
<p><em>ancestors</em>: <b class="class">httpd::content.proxy</b></p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="93">method <b class="cmd">scgi_info</b></a></dt>
<dd></dd>
<dt><a name="94">method <b class="cmd">proxy_channel</b></a></dt>
<dd></dd>
<dt><a name="95">method <b class="cmd">ProxyRequest</b> <i class="arg">chana</i> <i class="arg">chanb</i></a></dt>
<dd></dd>
<dt><a name="96">method <b class="cmd">ProxyReply</b> <i class="arg">chana</i> <i class="arg">chanb</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection14" class="doctools_subsection"><h3><a name="subsection14">Class  httpd::server.scgi</a></h3>
<p><em>ancestors</em>: <b class="class">httpd::server</b></p>
<p>Act as an  SCGI Server</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="97">method <b class="cmd"><a href="../debug/debug.html">debug</a></b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="98">method <b class="cmd">Connect</b> <i class="arg">uuid</i> <i class="arg">sock</i> <i class="arg">ip</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection15" class="doctools_subsection"><h3><a name="subsection15">Class  httpd::content.websocket</a></h3>
<p>Upgrade a connection to a websocket</p>
</div>
<div id="subsection16" class="doctools_subsection"><h3><a name="subsection16">Class  httpd::plugin</a></h3>
<p>httpd plugin template</p>
</div>
<div id="subsection17" class="doctools_subsection"><h3><a name="subsection17">Class  httpd::plugin.dict_dispatch</a></h3>
<p>A rudimentary plugin that dispatches URLs from a dict
 data structure</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="99">method <b class="cmd">Dispatch_Dict</b> <i class="arg">data</i></a></dt>
<dd><p>Implementation of the dispatcher</p></dd>
<dt><a name="100">method <b class="cmd">uri {} add</b> <i class="arg">vhosts</i> <i class="arg">patterns</i> <i class="arg">info</i></a></dt>
<dd></dd>
<dt><a name="101">method <b class="cmd">uri {} direct</b> <i class="arg">vhosts</i> <i class="arg">patterns</i> <i class="arg">info</i> <i class="arg">body</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection18" class="doctools_subsection"><h3><a name="subsection18">Class  httpd::reply.memchan</a></h3>
<p><em>ancestors</em>: <b class="class">httpd::reply</b></p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="102">method <b class="cmd">output</b></a></dt>
<dd></dd>
<dt><a name="103">method <b class="cmd">DoOutput</b></a></dt>
<dd></dd>
<dt><a name="104">method <b class="cmd">close</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection19" class="doctools_subsection"><h3><a name="subsection19">Class  httpd::plugin.local_memchan</a></h3>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="105">method <b class="cmd">local_memchan</b> <i class="arg">command</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="106">method <b class="cmd">Connect_Local</b> <i class="arg">uuid</i> <i class="arg">sock</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>A modified connection method that passes simple GET request to an object
 and pulls data directly from the reply_body data variable in the object
 Needed because memchan is bidirectional, and we can't seem to communicate that
 the server is one side of the link and the reply is another</p></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">AUTHORS</a></h2>
<p>Sean Woods</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>network</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tcloo">TclOO</a>, <a href="../../../../index.html#www">WWW</a>, <a href="../../../../index.html#http">http</a>, <a href="../../../../index.html#httpd">httpd</a>, <a href="../../../../index.html#httpserver">httpserver</a>, <a href="../../../../index.html#services">services</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2018 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/ident/ident.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>ident - Identification protocol client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>ident - Identification protocol client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ident.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Reinhard Max &amp;lt;max@tclers.tk&amp;gt;
   -->
<!-- ident.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ident(n) 0.42 tcllib &quot;Identification protocol client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ident - Ident protocol client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ident.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Reinhard Max &lt;max@tclers.tk&gt;
   -->
<! -- ident.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ident(n) 0.42 tcllib &quot;Identification protocol client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ident - Ident protocol client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ident</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ident">ident</a>, <a href="../../../../index.html#identification">identification</a>, <a href="../../../../index.html#rfc_1413">rfc 1413</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Reinhard Max &lt;max@tclers.tk&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








165
166
167
168
169
170
171






172
173
174
175
176
177
178
179
180
181
182
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ident</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key433">ident</a>, <a href="../../../../index.html#key434">identification</a>, <a href="../../../../index.html#key432">rfc 1413</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Reinhard Max &lt;max@tclers.tk&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/imap4/imap4.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>imap4 - imap client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>imap4 - imap client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'imap4.man' by tcllib/doctools with format 'html'
   -->
<!-- imap4.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">imap4(n) 0.5.3 tcllib &quot;imap client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>imap4 - imap client-side tcl implementation of imap protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">imap4 <span class="opt">?0.5.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::imap4::open</b> <i class="arg">hostname</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::imap4::starttls</b> <i class="arg">chan</i></a></li>
<li><a href="#3"><b class="cmd">::imap4::login</b> <i class="arg">chan</i> <i class="arg">user</i> <i class="arg">pass</i></a></li>
<li><a href="#4"><b class="cmd">::imap4::folders</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">-inline</i>?</span> <span class="opt">?<i class="arg">mboxref</i>?</span> <span class="opt">?<i class="arg">mboxname</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::imap4::select</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">mailbox</i>?</span></a></li>







|

|



|
|
|
|
|
|


















<






|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'imap4.man' by tcllib/doctools with format 'html'
   -->
<! -- imap4.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">imap4(n) 0.5.3 tcllib &quot;imap client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>imap4 - imap client-side tcl implementation of imap protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section5">REFERENCES</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>

</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">imap4 <span class="opt">?0.5.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::imap4::open</b> <i class="arg">hostname</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::imap4::starttls</b> <i class="arg">chan</i></a></li>
<li><a href="#3"><b class="cmd">::imap4::login</b> <i class="arg">chan</i> <i class="arg">user</i> <i class="arg">pass</i></a></li>
<li><a href="#4"><b class="cmd">::imap4::folders</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">-inline</i>?</span> <span class="opt">?<i class="arg">mboxref</i>?</span> <span class="opt">?<i class="arg">mboxname</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::imap4::select</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">mailbox</i>?</span></a></li>
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
    puts &quot;Capabilities: [::imap4::isableto $imap]&quot;
    puts &quot;Is able to imap4rev1? [::imap4::isableto $imap imap4rev1]&quot;
    # Cleanup
    ::imap4::cleanup $imap
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<p>Mark R. Crispin, &quot;INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1&quot;,
RFC 3501, March 2003, <a href="http://www.rfc-editor.org/rfc/rfc3501.txt">http://www.rfc-editor.org/rfc/rfc3501.txt</a></p>
<p>OpenSSL, <a href="http://www.openssl.org/">http://www.openssl.org/</a></p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>imap4</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.
Only a small part of rfc3501 implemented.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftp/ftp.html">ftp</a>, <a href="../../../../index.html#http">http</a>, <a href="../../../../index.html#imap">imap</a>, <a href="../mime/mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="../../../../index.html#tls">tls</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#email">email</a>, <a href="../../../../index.html#imap">imap</a>, <a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#mail">mail</a>, <a href="../../../../index.html#net">net</a>, <a href="../../../../index.html#rfc3501">rfc3501</a>, <a href="../../../../index.html#ssl">ssl</a>, <a href="../../../../index.html#tls">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







|
|

|







|
|



















|
<
<
<
<
<
<



|


|

<
<
<

440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479






480
481
482
483
484
485
486
487



488
    puts &quot;Capabilities: [::imap4::isableto $imap]&quot;
    puts &quot;Is able to imap4rev1? [::imap4::isableto $imap imap4rev1]&quot;
    # Cleanup
    ::imap4::cleanup $imap
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">REFERENCES</a></h2>
<p>Mark R. Crispin, &quot;INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1&quot;,
RFC 3501, March 2003, <a href="http://www.rfc-editor.org/rfc/rfc3501.txt">http://www.rfc-editor.org/rfc/rfc3501.txt</a></p>
<p>OpenSSL, <a href="http://www.openssl.org/">http://www.openssl.org/</a></p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>imap4</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.






Only a small part of rfc3501 implemented.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftp/ftp.html">ftp</a>, <a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key805">imap</a>, <a href="../mime/mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key335">email</a>, <a href="../../../../index.html#key805">imap</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key330">mail</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key804">rfc3501</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>



</div></body></html>

Changes to idoc/www/tcllib/files/modules/inifile/ini.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>inifile - Parsing of Windows INI files</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>inifile - Parsing of Windows INI files</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ini.man' by tcllib/doctools with format 'html'
   -->
<!-- inifile.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">inifile(n) 0.3.2 tcllib &quot;Parsing of Windows INI files&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>inifile - Parsing of Windows INI files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">inifile <span class="opt">?0.3.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ini::open</b> <i class="arg">file</i> <span class="opt">?<b class="option">-encoding</b> <i class="arg">encoding</i>?</span> <span class="opt">?<i class="arg">access</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::ini::close</b> <i class="arg">ini</i></a></li>
<li><a href="#3"><b class="cmd">::ini::commit</b> <i class="arg">ini</i></a></li>
<li><a href="#4"><b class="cmd">::ini::revert</b> <i class="arg">ini</i></a></li>
<li><a href="#5"><b class="cmd">::ini::filename</b> <i class="arg">ini</i></a></li>







|

|



|
|
|
|
|
|


|
















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ini.man' by tcllib/doctools with format 'html'
   -->
<! -- inifile.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">inifile(n) 0.3 tcllib &quot;Parsing of Windows INI files&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>inifile - Parsing of Windows INI files</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">inifile <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ini::open</b> <i class="arg">file</i> <span class="opt">?<b class="option">-encoding</b> <i class="arg">encoding</i>?</span> <span class="opt">?<i class="arg">access</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::ini::close</b> <i class="arg">ini</i></a></li>
<li><a href="#3"><b class="cmd">::ini::commit</b> <i class="arg">ini</i></a></li>
<li><a href="#4"><b class="cmd">::ini::revert</b> <i class="arg">ini</i></a></li>
<li><a href="#5"><b class="cmd">::ini::filename</b> <i class="arg">ini</i></a></li>
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>inifile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<





200
201
202
203
204
205
206






207
208
209
210
211
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>inifile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/interp/deleg_method.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>deleg_method - Interpreter utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>deleg_method - Interpreter utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'deleg_method.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- deleg_method.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">deleg_method(n) 0.2 tcllib &quot;Interpreter utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>deleg_method - Creation of comm delegates (snit methods)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'deleg_method.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- deleg_method.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">deleg_method(n) 0.2 tcllib &quot;Interpreter utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>deleg_method - Creation of comm delegates (snit methods)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>interp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#comm">comm</a>, <a href="../../../../index.html#delegation">delegation</a>, <a href="../../../../index.html#interpreter">interpreter</a>, <a href="../../../../index.html#method">method</a>, <a href="../../../../index.html#snit">snit</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








160
161
162
163
164
165
166






167
168
169
170
171
172
173
174
175
176
177
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>interp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key40">comm</a>, <a href="../../../../index.html#key39">delegation</a>, <a href="../../../../index.html#key38">interpreter</a>, <a href="../../../../index.html#key372">method</a>, <a href="../../../../index.html#key373">snit</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/interp/deleg_proc.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>deleg_proc - Interpreter utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>deleg_proc - Interpreter utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'deleg_proc.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- deleg_proc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">deleg_proc(n) 0.2 tcllib &quot;Interpreter utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>deleg_proc - Creation of comm delegates (procedures)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'deleg_proc.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- deleg_proc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">deleg_proc(n) 0.2 tcllib &quot;Interpreter utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>deleg_proc - Creation of comm delegates (procedures)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>interp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#comm">comm</a>, <a href="../../../../index.html#delegation">delegation</a>, <a href="../../../../index.html#interpreter">interpreter</a>, <a href="../../../../index.html#procedure">procedure</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








159
160
161
162
163
164
165






166
167
168
169
170
171
172
173
174
175
176
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>interp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key40">comm</a>, <a href="../../../../index.html#key39">delegation</a>, <a href="../../../../index.html#key38">interpreter</a>, <a href="../../../../index.html#key41">procedure</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/interp/tcllib_interp.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>interp - Interpreter utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>interp - Interpreter utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_interp.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- interp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">interp(n) 0.1.2 tcllib &quot;Interpreter utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>interp - Interp creation and aliasing</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_interp.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- interp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">interp(n) 0.1.2 tcllib &quot;Interpreter utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>interp - Interp creation and aliasing</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>interp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#alias">alias</a>, <a href="../../../../index.html#empty_interpreter">empty interpreter</a>, <a href="../../../../index.html#interpreter">interpreter</a>, <a href="../../../../index.html#method">method</a>, <a href="../../../../index.html#snit">snit</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








174
175
176
177
178
179
180






181
182
183
184
185
186
187
188
189
190
191
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>interp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key777">alias</a>, <a href="../../../../index.html#key778">empty interpreter</a>, <a href="../../../../index.html#key38">interpreter</a>, <a href="../../../../index.html#key372">method</a>, <a href="../../../../index.html#key373">snit</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/irc/irc.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>irc - Low Level Tcl IRC Interface</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>irc - Low Level Tcl IRC Interface</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'irc.man' by tcllib/doctools with format 'html'
   -->
<!-- irc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">irc(n) 0.7.0 tcllib &quot;Low Level Tcl IRC Interface&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>irc - Create IRC connection and interface.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Per-connection Commands</a></li>
<li class="doctools_section"><a href="#section3">Callback Commands</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">irc <span class="opt">?0.7.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::irc::config</b> <span class="opt">?key?</span> <span class="opt">?value?</span></a></li>
<li><a href="#2"><b class="cmd">::irc::connection</b></a></li>
<li><a href="#3"><b class="cmd">::irc::connections</b></a></li>
<li><a href="#4"><i class="arg">net</i> <b class="method">registerevent</b> <i class="arg">event</i> <i class="arg">script</i></a></li>
<li><a href="#5"><i class="arg">net</i> <b class="method">getevent</b> <i class="arg">event</i> <i class="arg">script</i></a></li>







|

|



|
|
|
|
|
|


|



















|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'irc.man' by tcllib/doctools with format 'html'
   -->
<! -- irc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">irc(n) 0.6.1 tcllib &quot;Low Level Tcl IRC Interface&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>irc - Create IRC connection and interface.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Per-connection Commands</a></li>
<li class="doctools_section"><a href="#section3">Callback Commands</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl</b></li>
<li>package require <b class="pkgname">irc <span class="opt">?0.6.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::irc::config</b> <span class="opt">?key?</span> <span class="opt">?value?</span></a></li>
<li><a href="#2"><b class="cmd">::irc::connection</b></a></li>
<li><a href="#3"><b class="cmd">::irc::connections</b></a></li>
<li><a href="#4"><i class="arg">net</i> <b class="method">registerevent</b> <i class="arg">event</i> <i class="arg">script</i></a></li>
<li><a href="#5"><i class="arg">net</i> <b class="method">getevent</b> <i class="arg">event</i> <i class="arg">script</i></a></li>
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>irc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>rfc 1459</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#chat">chat</a>, <a href="../../../../index.html#irc">irc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





308
309
310
311
312
313
314






315
316
317
318
319
320
321
322
323
324
325
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>irc</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>rfc 1459</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key693">chat</a>, <a href="../../../../index.html#key744">irc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/irc/picoirc.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>picoirc - Simple embeddable IRC interface</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>picoirc - Simple embeddable IRC interface</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'picoirc.man' by tcllib/doctools with format 'html'
   -->
<!-- picoirc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">picoirc(n) 0.7.0 tcllib &quot;Simple embeddable IRC interface&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>picoirc - Small and simple embeddable IRC client.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">CALLBACK</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">picoirc <span class="opt">?0.7.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::picoirc::connect</b> <i class="arg">callback</i> <i class="arg">nick</i> <span class="opt">?<i class="arg">password</i>?</span> <i class="arg">url</i></a></li>
<li><a href="#2"><b class="cmd">::picoirc::post</b> <i class="arg">context</i> <i class="arg">channel</i> <i class="arg">message</i></a></li>
<li><a href="#3"><b class="cmd">::picoirc::splituri</b> <i class="arg">uri</i></a></li>
<li><a href="#4"><b class="cmd">::picoirc::send</b> <i class="arg">context</i> <i class="arg">line</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>







|

|



|
|
|
|
|
|


|


















|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'picoirc.man' by tcllib/doctools with format 'html'
   -->
<! -- picoirc.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">picoirc(n) 0.5.2 tcllib &quot;Simple embeddable IRC interface&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>picoirc - Small and simple embeddable IRC client.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">CALLBACK</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl</b></li>
<li>package require <b class="pkgname">picoirc <span class="opt">?0.5.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::picoirc::connect</b> <i class="arg">callback</i> <i class="arg">nick</i> <i class="arg">url</i></a></li>
<li><a href="#2"><b class="cmd">::picoirc::post</b> <i class="arg">context</i> <i class="arg">channel</i> <i class="arg">message</i></a></li>
<li><a href="#3"><b class="cmd">::picoirc::splituri</b> <i class="arg">uri</i></a></li>
<li><a href="#4"><b class="cmd">::picoirc::send</b> <i class="arg">context</i> <i class="arg">line</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
that describes the connection. This will return a variable name that
is the irc connection context. See <span class="sectref"><a href="#section3">CALLBACK</a></span> for details.</p>
<p>This package is a fairly simple IRC client. If you need something with
more capability investigate the <b class="package"><a href="irc.html">irc</a></b> package.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::picoirc::connect</b> <i class="arg">callback</i> <i class="arg">nick</i> <span class="opt">?<i class="arg">password</i>?</span> <i class="arg">url</i></a></dt>
<dd><p>Creates a new irc connection to the server specified by <i class="arg">url</i> and
login using the <i class="arg">nick</i> as the username and optionally <i class="arg">password</i>.
If the <i class="arg">url</i> starts with <em>ircs://</em> then a TLS connection is
created. The <i class="arg">callback</i> must be as specified in <span class="sectref"><a href="#section3">CALLBACK</a></span>.
Returns a package-specific variable that is used when calling other
commands in this package.</p>
<p><em>Note:</em>
For connecting via TLS the Tcl module <em>tls</em> must be already
loaded, otherwise an error is raised.</p>
<pre class="doctools_example">
# must be loaded for TLS
package require tls
# default arguments
tls::init -autoservername true -command workaround \
    -require 1 -cadir /etc/ssl/certs -tls1 0 -tls1.1 0
# avoid annoying bgerror, errors are already catched internally
proc workaround {state args} {
    if {$state == &quot;verify&quot;} {
        return [lindex $args 3]
    }
}
</pre>
</dd>
<dt><a name="2"><b class="cmd">::picoirc::post</b> <i class="arg">context</i> <i class="arg">channel</i> <i class="arg">message</i></a></dt>
<dd><p>This should be called to process user input and send it to the
server. A number of commands are recognised when prefixed with a
forward-slash (/). Such commands are converted to IRC command
sequences and then sent.</p></dd>
<dt><a name="3"><b class="cmd">::picoirc::splituri</b> <i class="arg">uri</i></a></dt>
<dd><p>Splits an IRC scheme uniform resource indicator into its component
parts. Returns a list of server, port, channel and secure where
secure is a boolean flag which is <b class="const">true</b> if a TLS connection was
requested via the <em>ircs://</em> schema. The default port is 6667 (or
6697 if secured) and there is no default channel.</p></dd>
<dt><a name="4"><b class="cmd">::picoirc::send</b> <i class="arg">context</i> <i class="arg">line</i></a></dt>
<dd><p>This command is where all raw output to the server is handled. The
default action is to write the <i class="arg">line</i> to the irc socket. However,
before this happens the callback is called with &quot;debug write&quot;. This
permits the application author to inspect the raw IRC data and if
desired to return a break error code to halt further processing. In
this way the application can override the default send via the







|
|
|
<
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







|
<
<
|







147
148
149
150
151
152
153
154
155
156

157

158

















159
160
161
162
163
164
165
166


167
168
169
170
171
172
173
174
that describes the connection. This will return a variable name that
is the irc connection context. See <span class="sectref"><a href="#section3">CALLBACK</a></span> for details.</p>
<p>This package is a fairly simple IRC client. If you need something with
more capability investigate the <b class="package"><a href="irc.html">irc</a></b> package.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::picoirc::connect</b> <i class="arg">callback</i> <i class="arg">nick</i> <i class="arg">url</i></a></dt>
<dd><p>Create a new irc connection to the server specified by <i class="arg">url</i> and
login using the <i class="arg">nick</i> as the username. The <i class="arg">callback</i> must be

as specified in <span class="sectref"><a href="#section3">CALLBACK</a></span>. Returns a package-specific variable

that is used when calling other commands in this package.</p></dd>

















<dt><a name="2"><b class="cmd">::picoirc::post</b> <i class="arg">context</i> <i class="arg">channel</i> <i class="arg">message</i></a></dt>
<dd><p>This should be called to process user input and send it to the
server. A number of commands are recognised when prefixed with a
forward-slash (/). Such commands are converted to IRC command
sequences and then sent.</p></dd>
<dt><a name="3"><b class="cmd">::picoirc::splituri</b> <i class="arg">uri</i></a></dt>
<dd><p>Splits an IRC scheme uniform resource indicator into its component
parts. Returns a list of server, port and channel. The default port is


6667 and there is no default channel.</p></dd>
<dt><a name="4"><b class="cmd">::picoirc::send</b> <i class="arg">context</i> <i class="arg">line</i></a></dt>
<dd><p>This command is where all raw output to the server is handled. The
default action is to write the <i class="arg">line</i> to the irc socket. However,
before this happens the callback is called with &quot;debug write&quot;. This
permits the application author to inspect the raw IRC data and if
desired to return a break error code to halt further processing. In
this way the application can override the default send via the
258
259
260
261
262
263
264
265
266
267
268
269
270
could be used to redirect all input and output if desired.</p></dd>
</dl>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>rfc 1459</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#chat">chat</a>, <a href="../../../../index.html#irc">irc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







|





238
239
240
241
242
243
244
245
246
247
248
249
250
could be used to redirect all input and output if desired.</p></dd>
</dl>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>rfc 1459</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key693">chat</a>, <a href="../../../../index.html#key744">irc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/javascript/javascript.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>javascript - HTML and Java Script Generation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>javascript - HTML and Java Script Generation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'javascript.man' by tcllib/doctools with format 'html'
   -->
<!-- javascript.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">javascript(n) 1.0.2 tcllib &quot;HTML and Java Script Generation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>javascript - Procedures to generate HTML and Java Script structures.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'javascript.man' by tcllib/doctools with format 'html'
   -->
<! -- javascript.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">javascript(n) 1.0.2 tcllib &quot;HTML and Java Script Generation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>javascript - Procedures to generate HTML and Java Script structures.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>javascript</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../html/html.html">html</a>, <a href="../ncgi/ncgi.html">ncgi</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checkbox">checkbox</a>, <a href="../../../../index.html#html">html</a>, <a href="../../../../index.html#javascript">javascript</a>, <a href="../../../../index.html#selectionbox">selectionbox</a>, <a href="../../../../index.html#submitbutton">submitbutton</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





199
200
201
202
203
204
205






206
207
208
209
210
211
212
213
214
215
216
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>javascript</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../html/html.html">html</a>, <a href="../ncgi/ncgi.html">ncgi</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key620">checkbox</a>, <a href="../../../../index.html#key617">html</a>, <a href="../../../../index.html#key207">javascript</a>, <a href="../../../../index.html#key739">selectionbox</a>, <a href="../../../../index.html#key738">submitbutton</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/jpeg/jpeg.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>jpeg - JPEG image manipulation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>jpeg - JPEG image manipulation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'jpeg.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004-2005, Code: Aaron Faupell &amp;lt;afaupell@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2007, Code:  Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2004-2009, Doc:  Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2011, Code: Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- jpeg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">jpeg(n) 0.5 tcllib &quot;JPEG image manipulation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>jpeg - JPEG querying and manipulation of meta data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'jpeg.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004-2005, Code: Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;   -- Copyright &copy; 2007, Code:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;   -- Copyright &copy; 2004-2009, Doc:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;   -- Copyright &copy; 2011, Code: Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- jpeg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">jpeg(n) 0.5 tcllib &quot;JPEG image manipulation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>jpeg - JPEG querying and manipulation of meta data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>jpeg</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#comment">comment</a>, <a href="../../../../index.html#exif">exif</a>, <a href="../../../../index.html#image">image</a>, <a href="../../../../index.html#jfif">jfif</a>, <a href="../../../../index.html#jpeg">jpeg</a>, <a href="../../../../index.html#thumbnail">thumbnail</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2005, Code: Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;<br>
Copyright &copy; 2007, Code:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2004-2009, Doc:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2011, Code: Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|











277
278
279
280
281
282
283






284
285
286
287
288
289
290
291
292
293
294
295
296
297
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>jpeg</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key155">comment</a>, <a href="../../../../index.html#key152">exif</a>, <a href="../../../../index.html#key121">image</a>, <a href="../../../../index.html#key154">jfif</a>, <a href="../../../../index.html#key153">jpeg</a>, <a href="../../../../index.html#key151">thumbnail</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2005, Code: Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;<br>
Copyright &copy; 2007, Code:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2004-2009, Doc:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2011, Code: Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/json/json.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>json - JSON</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>json - JSON</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'json.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 ActiveState Software Inc.   -- Copyright &amp;copy; 2009 Thomas Maeder, Glue Software Engineering AG
   -->
<!-- json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">json(n) 1.3.4 tcllib &quot;JSON&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>json - JSON parser</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">RELATED</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">json <span class="opt">?1.3.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::json::json2dict</b> <i class="arg">txt</i></a></li>
<li><a href="#2"><b class="cmd">::json::many-json2dict</b> <i class="arg">txt</i> <span class="opt">?<i class="arg">max</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">json</b> package provides a simple Tcl-only library for parsing the
JSON <a href="http://www.json.org/">http://www.json.org/</a> data exchange format as specified in RFC 4627
<a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>.
There is some ambiguity in parsing JSON because JSON has type information that
is not maintained by the Tcl conversion.  The <b class="package">json</b> package returns
data as a Tcl <b class="cmd"><a href="../../../../index.html#dict">dict</a></b>.  Either the <b class="package"><a href="../../../../index.html#dict">dict</a></b> package or Tcl 8.5 is
required for use.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::json::json2dict</b> <i class="arg">txt</i></a></dt>
<dd><p>Parse JSON formatted text <i class="arg">txt</i> into a Tcl dict and return
the value.</p>







|

|

|



|
|
|
|
|
|


|










|
<









|













|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'json.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 ActiveState Software Inc.   -- Copyright &copy; 2009 Thomas Maeder, Glue Software Engineering AG
   -->
<! -- json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">json(n) 1.3.3 tcllib &quot;JSON&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>json - JSON parser</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>

<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">json <span class="opt">?1.3.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::json::json2dict</b> <i class="arg">txt</i></a></li>
<li><a href="#2"><b class="cmd">::json::many-json2dict</b> <i class="arg">txt</i> <span class="opt">?<i class="arg">max</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">json</b> package provides a simple Tcl-only library for parsing the
JSON <a href="http://www.json.org/">http://www.json.org/</a> data exchange format as specified in RFC 4627
<a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>.
There is some ambiguity in parsing JSON because JSON has type information that
is not maintained by the Tcl conversion.  The <b class="package">json</b> package returns
data as a Tcl <b class="cmd"><a href="../../../../index.html#key705">dict</a></b>.  Either the <b class="package"><a href="../../../../index.html#key705">dict</a></b> package or Tcl 8.5 is
required for use.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::json::json2dict</b> <i class="arg">txt</i></a></dt>
<dd><p>Parse JSON formatted text <i class="arg">txt</i> into a Tcl dict and return
the value.</p>
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
        &quot;IDs&quot;: [116, 943, 234, 38793]
    }
}
=&gt;
Image {IDs {116 943 234 38793} Thumbnail {Width 100 Height 125 Url http://www.example.com/image/481989943} Width 800 Height 600 Title {View from 15th Floor}}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">RELATED</a></h2>
<p>To write json, instead of parsing it, see package <b class="package"><a href="json_write.html">json::write</a></b>.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>json</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#data_exchange">data exchange</a>, <a href="../../../../index.html#exchange_format">exchange format</a>, <a href="../../../../index.html#javascript">javascript</a>, <a href="../../../../index.html#json">json</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 ActiveState Software Inc.<br>
Copyright &copy; 2009 Thomas Maeder, Glue Software Engineering AG</p>
</div>
</div></body></html>







|
<
<
<






<
<
<
<
<
<


|









205
206
207
208
209
210
211
212



213
214
215
216
217
218






219
220
221
222
223
224
225
226
227
228
229
230
        &quot;IDs&quot;: [116, 943, 234, 38793]
    }
}
=&gt;
Image {IDs {116 943 234 38793} Thumbnail {Width 100 Height 125 Url http://www.example.com/image/481989943} Width 800 Height 600 Title {View from 15th Floor}}
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>



<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>json</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key205">data exchange</a>, <a href="../../../../index.html#key204">exchange format</a>, <a href="../../../../index.html#key207">javascript</a>, <a href="../../../../index.html#key206">json</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 ActiveState Software Inc.<br>
Copyright &copy; 2009 Thomas Maeder, Glue Software Engineering AG</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/json/json_write.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>json::write - JSON</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>json::write - JSON</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'json_write.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2013 Andreas Kupries &amp;lt;andreas_kupries@sourceforge.net&amp;gt;
   -->
<!-- json::write.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">json::write(n) 1.0.3 tcllib &quot;JSON&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>json::write - JSON generation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">RELATED</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">







|

|

|



|
|
|
|
|
|












|
<







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'json_write.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009-2013 Andreas Kupries &lt;andreas_kupries@sourceforge.net&gt;
   -->
<! -- json::write.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">json::write(n) 1.0.3 tcllib &quot;JSON&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>json::write - JSON generation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>

<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
them as a properly formatted JSON array as its result.</p></dd>
<dt><a name="7"><b class="cmd">::json::write</b> <b class="method">object</b> <i class="arg">key</i> <i class="arg">value</i>...</a></dt>
<dd><p>This method takes a series of key/value arguments, the values already
formatted for JSON, and returns them as a properly formatted JSON
object as its result, with the keys formatted as JSON strings.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">RELATED</a></h2>
<p>To parse json, instead of writing it, see package <b class="package"><a href="json.html">json</a></b>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>json</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#data_exchange">data exchange</a>, <a href="../../../../index.html#exchange_format">exchange format</a>, <a href="../../../../index.html#javascript">javascript</a>, <a href="../../../../index.html#json">json</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013 Andreas Kupries &lt;andreas_kupries@sourceforge.net&gt;</p>
</div>
</div></body></html>







|
<
<
<






<
<
<
<
<
<


|








178
179
180
181
182
183
184
185



186
187
188
189
190
191






192
193
194
195
196
197
198
199
200
201
202
them as a properly formatted JSON array as its result.</p></dd>
<dt><a name="7"><b class="cmd">::json::write</b> <b class="method">object</b> <i class="arg">key</i> <i class="arg">value</i>...</a></dt>
<dd><p>This method takes a series of key/value arguments, the values already
formatted for JSON, and returns them as a properly formatted JSON
object as its result, with the keys formatted as JSON strings.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>



<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>json</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key205">data exchange</a>, <a href="../../../../index.html#key204">exchange format</a>, <a href="../../../../index.html#key207">javascript</a>, <a href="../../../../index.html#key206">json</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013 Andreas Kupries &lt;andreas_kupries@sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/lambda/lambda.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>lambda - Utility commands for anonymous procedures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>lambda - Utility commands for anonymous procedures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'lambda.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries, BSD licensed
   -->
<!-- lambda.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">lambda(n) 1 tcllib &quot;Utility commands for anonymous procedures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>lambda - Utility commands for anonymous procedures</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'lambda.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries, BSD licensed
   -->
<! -- lambda.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">lambda(n) 1 tcllib &quot;Utility commands for anonymous procedures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>lambda - Utility commands for anonymous procedures</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<li><a href="#1"><b class="cmd">::lambda</b> <i class="arg">arguments</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::lambda@</b> <i class="arg">namespace</i> <i class="arg">arguments</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides two convenience commands to make the writing of
anonymous procedures, i.e. lambdas more <b class="cmd"><a href="../../../../index.html#proc">proc</a></b>-like. Instead of,
for example, to write</p>
<pre class="doctools_example">
     set f {::apply {{x} {
        ....
     }}}
</pre>
<p>with its deep nesting of braces, or</p>







|







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<li><a href="#1"><b class="cmd">::lambda</b> <i class="arg">arguments</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
<li><a href="#2"><b class="cmd">::lambda@</b> <i class="arg">namespace</i> <i class="arg">arguments</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides two convenience commands to make the writing of
anonymous procedures, i.e. lambdas more <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>-like. Instead of,
for example, to write</p>
<pre class="doctools_example">
     set f {::apply {{x} {
        ....
     }}}
</pre>
<p>with its deep nesting of braces, or</p>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>lambda</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>apply(n), proc(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#anonymous_procedure">anonymous procedure</a>, <a href="../../../../index.html#callback">callback</a>, <a href="../../../../index.html#command_prefix">command prefix</a>, <a href="../../../../index.html#currying">currying</a>, <a href="../../../../index.html#lambda">lambda</a>, <a href="../../../../index.html#partial_application">partial application</a>, <a href="../../../../index.html#proc">proc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries, BSD licensed</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








192
193
194
195
196
197
198






199
200
201
202
203
204
205
206
207
208
209
210
211
212
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>lambda</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>apply(n), proc(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key596">anonymous procedure</a>, <a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key595">command prefix</a>, <a href="../../../../index.html#key597">currying</a>, <a href="../../../../index.html#key594">lambda</a>, <a href="../../../../index.html#key593">partial application</a>, <a href="../../../../index.html#key592">proc</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries, BSD licensed</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/lazyset/lazyset.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html><html><head>
<title>lazyset - Lazy evaluation for variables and arrays</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'lazyset.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2018 Roy Keene
   -->
<!-- lazyset.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">lazyset(n) 1 tcllib &quot;Lazy evaluation for variables and arrays&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>lazyset - Lazy evaluation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section4">AUTHORS</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">lazyset <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::lazyset::variable</b> <span class="opt">?<i class="arg">-array boolean</i>?</span> <span class="opt">?<i class="arg">-appendArgs boolean</i>?</span> <i class="arg">variableName</i> <i class="arg">commandPrefix</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">lazyset</b> package provides a mechanism for deferring execution
of code until a specific variable or any index of an array is referenced.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::lazyset::variable</b> <span class="opt">?<i class="arg">-array boolean</i>?</span> <span class="opt">?<i class="arg">-appendArgs boolean</i>?</span> <i class="arg">variableName</i> <i class="arg">commandPrefix</i></a></dt>
<dd><p>Arrange for the code specified as <i class="arg">commandPrefix</i> to be executed when
the variable whose name is specified by <i class="arg">variableName</i> is read for
the first time.
If the optional argument <i class="arg">-array boolean</i> is specified as true,
then the variable specified as <i class="arg">variableName</i> is treated as an
array and attempting to read any index of the array causes that
index to be set by the <i class="arg">commandPrefix</i> as they are read.
If the optional argument <i class="arg">-appendArgs boolean</i> is specified as
false, then the variable name and subnames are not appended to the
<i class="arg">commandPrefix</i> before it is evaluated.  If the argument
<i class="arg">-appendArgs boolean</i> is not specified or is specified as true
then 1 or 2 additional arguments are appended to the <i class="arg">commandPrefix</i>.
If <i class="arg">-array boolean</i> is specified as true, then 2 arguments are
appended corresponding to the name of the variable and the index,
otherwise 1 argument is appended containing the name of variable.
The <i class="arg">commandPrefix</i> code is run in the same scope as the variable
is read.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLES</a></h2>
<pre class="doctools_example">
	::lazyset::variable page {apply {{name} {
		package require http
		set token [http::geturl http://www.tcl.tk/]
		set data [http::data $token]
		return $data
	}}}
	puts $page
</pre>
<pre class="doctools_example">
	::lazyset::variable -array true page {apply {{name index} {
		package require http
		set token [http::geturl $index]
		set data [http::data $token]
		return $data
	}}}
	puts $page(http://www.tcl.tk/)
</pre>
<pre class="doctools_example">
	::lazyset::variable -appendArgs false simple {
		return -level 0 42
	}
	puts $simple
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">AUTHORS</a></h2>
<p>Roy Keene</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>utility</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2018 Roy Keene</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/ldap/ldap.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>ldap - LDAP client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>ldap - LDAP client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307


308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ldap.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2004 Jochen Loewer &amp;lt;loewerj@web.de&amp;gt;   -- Copyright &amp;copy; 2006 Michael Schlenker &amp;lt;mic42@users.sourceforge.net&amp;gt;
   -->
<!-- ldap.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ldap(n) 1.10 tcllib &quot;LDAP client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ldap - LDAP client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section3">COMMANDS</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">ldap <span class="opt">?1.10?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ldap::connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::ldap::tlsoptions</b> <b class="cmd">reset</b></a></li>
<li><a href="#3"><b class="cmd">::ldap::tlsoptions</b> <span class="opt">?<i class="arg">opt1</i> <i class="arg">val1</i>?</span> <span class="opt">?<i class="arg">opt2</i> <i class="arg">val2</i>?</span> ...</a></li>
<li><a href="#4"><b class="cmd">::ldap::secure_connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::ldap::secure_connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span> <span class="opt">?<i class="arg">verify_cert</i>?</span> <span class="opt">?<i class="arg">sni_servername</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::ldap::disconnect</b> <i class="arg">handle</i></a></li>
<li><a href="#7"><b class="cmd">::ldap::starttls</b> <i class="arg">handle</i></a></li>
<li><a href="#8"><b class="cmd">::ldap::starttls</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">cafile</i>?</span> <span class="opt">?<i class="arg">certfile</i>?</span> <span class="opt">?<i class="arg">keyfile</i>?</span> <span class="opt">?<i class="arg">verify_cert</i>?</span> <span class="opt">?<i class="arg">sni_servername</i>?</span></a></li>
<li><a href="#9"><b class="cmd">::ldap::bind</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::ldap::bindSASL</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></li>
<li><a href="#11"><b class="cmd">::ldap::unbind</b> <i class="arg">handle</i></a></li>
<li><a href="#12"><b class="cmd">::ldap::search</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></li>
<li><a href="#13"><b class="cmd">::ldap::searchInit</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></li>
<li><a href="#14"><b class="cmd">::ldap::searchNext</b> <i class="arg">handle</i></a></li>
<li><a href="#15"><b class="cmd">::ldap::searchEnd</b> <i class="arg">handle</i></a></li>
<li><a href="#16"><b class="cmd">::ldap::modify</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></li>
<li><a href="#17"><b class="cmd">::ldap::modifyMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrValToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></li>
<li><a href="#18"><b class="cmd">::ldap::add</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></li>
<li><a href="#19"><b class="cmd">::ldap::addMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></li>
<li><a href="#20"><b class="cmd">::ldap::delete</b> <i class="arg">handle</i> <i class="arg">dn</i></a></li>
<li><a href="#21"><b class="cmd">::ldap::modifyDN</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">newrdn</i> <span class="opt">?<i class="arg">deleteOld</i>?</span> <span class="opt">?<i class="arg">newSuperior</i>?</span></a></li>
<li><a href="#22"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#ip">ip</a></b> <i class="arg">handle</i></a></li>
<li><a href="#23"><b class="cmd">::ldap::info</b> <b class="cmd">bound</b> <i class="arg">handle</i></a></li>
<li><a href="#24"><b class="cmd">::ldap::info</b> <b class="cmd">bounduser</b> <i class="arg">handle</i></a></li>
<li><a href="#25"><b class="cmd">::ldap::info</b> <b class="cmd">connections</b></a></li>
<li><a href="#26"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#tls">tls</a></b> <i class="arg">handle</i></a></li>
<li><a href="#27"><b class="cmd">::ldap::info</b> <b class="cmd">tlsstatus</b> <i class="arg">handle</i></a></li>
<li><a href="#28"><b class="cmd">::ldap::info</b> <b class="cmd">saslmechanisms</b> <i class="arg">handle</i></a></li>
<li><a href="#29"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../control/control.html">control</a></b> <i class="arg">handle</i></a></li>
<li><a href="#30"><b class="cmd">::ldap::info</b> <b class="cmd">extensions</b> <i class="arg">extensions</i></a></li>
<li><a href="#31"><b class="cmd">::ldap::info</b> <b class="cmd">whoami</b> <i class="arg">handle</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">ldap</b> package provides a Tcl-only client library
for the LDAPv3 protocol as specified in
RFC 4511 (<a href="http://www.rfc-editor.org/rfc/rfc4511.txt">http://www.rfc-editor.org/rfc/rfc4511.txt</a>).
It works by opening the standard (or secure) LDAP socket on the
server, and then providing a Tcl API to access the LDAP protocol
commands.  All server errors are returned as Tcl errors (thrown) which
must be caught with the Tcl <b class="cmd">catch</b> command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">LDAPS</b> connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">

    ldap::tlsoptions -tls1 1 -ssl2 0 -ssl3 0 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ldap::connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Opens a LDAPv3 connection to the specified <i class="arg">host</i>, at the given
<i class="arg">port</i>, and returns a token for the connection. This token is the
<i class="arg">handle</i> argument for all other commands. If no <i class="arg">port</i> is
specified it will default to <b class="const">389</b>.</p>
<p>The command blocks until the connection has been established, or
establishment definitely failed.</p></dd>
<dt><a name="2"><b class="cmd">::ldap::tlsoptions</b> <b class="cmd">reset</b></a></dt>
<dd><p>This command resets TLS options to default values. It returns the
set of options.
Using this command is incompatible with the obsolete
form of <b class="cmd">::ldap::secure_connect</b> and <b class="cmd">::ldap_starttls</b>.</p></dd>
<dt><a name="3"><b class="cmd">::ldap::tlsoptions</b> <span class="opt">?<i class="arg">opt1</i> <i class="arg">val1</i>?</span> <span class="opt">?<i class="arg">opt2</i> <i class="arg">val2</i>?</span> ...</a></dt>
<dd><p>This commands adds one or more options to some value, and may be used
more than one time in order to add options in several steps.  A complete
description of options may be found in the <b class="package"><a href="../../../../index.html#tls">tls</a></b> package
documentation. Valid options and values are:</p>
<dl class="doctools_options">
<dt><b class="option">-cadir</b> directory</dt>
<dd><p>Provide the directory containing the CA certificates.
No default.</p></dd>
<dt><b class="option">-cafile</b> file</dt>
<dd><p>Provide the CA file.
No default.</p></dd>
<dt><b class="option">-cipher</b> string</dt>
<dd><p>Provide the cipher suites to use.
No default.</p></dd>
<dt><b class="option">-dhparams</b> file</dt>
<dd><p>Provide a Diffie-Hellman parameters file.
No default.</p></dd>
<dt><b class="option">-request</b> boolean</dt>
<dd><p>Request a certificate from peer during SSL handshake.
Default: true.</p></dd>
<dt><b class="option">-require</b> boolean</dt>
<dd><p>Require a valid certificate from peer during SSL handshake. If this is
set to true then -request must also be set to true.
Default: false</p></dd>
<dt><b class="option">-servername</b> host</dt>
<dd><p>Only available if the OpenSSL library the TLS package is linked against
supports the TLS hostname extension for 'Server Name Indication'
(SNI). Use to name the logical host we are talking to and expecting a
certificate for.
No default.</p></dd>
<dt><b class="option">-ssl2</b> bool</dt>
<dd><p>Enable use of SSL v2.
Default: false</p></dd>
<dt><b class="option">-ssl3</b> bool</dt>
<dd><p>Enable use of SSL v3.
Default: false</p></dd>
<dt><b class="option">-tls1</b> bool</dt>
<dd><p>Enable use of TLS v1
Default: true</p></dd>
<dt><b class="option">-tls1.1</b> bool</dt>
<dd><p>Enable use of TLS v1.1
Default: true</p></dd>
<dt><b class="option">-tls1.2</b> bool</dt>
<dd><p>Enable use of TLS v1.2
Default: true</p></dd>
</dl>
<p>This command returns the current set of TLS options and values.
In particular, one may use this command without any arguments to get
the current set of options.</p>
<p>Using this command is incompatible with the obsolete
form of <b class="cmd">::ldap::secure_connect</b> and <b class="cmd">::ldap_starttls</b>
(see below).</p></dd>
<dt><a name="4"><b class="cmd">::ldap::secure_connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Like <b class="cmd">::ldap::connect</b>, except that the created connection is
secured by SSL. The port defaults to <b class="const">636</b>.  This command
depends on the availability of the package <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, which is a
SSL binding for Tcl. If <b class="package"><a href="../../../../index.html#tls">TLS</a></b> is not available, then this
command will fail.</p>
<p>TLS options are specified with <b class="cmd">::ldap::tlsoptions</b>.</p>
<p>The command blocks until the connection has been established, or
establishment definitely failed.</p></dd>
<dt><a name="5"><b class="cmd">::ldap::secure_connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span> <span class="opt">?<i class="arg">verify_cert</i>?</span> <span class="opt">?<i class="arg">sni_servername</i>?</span></a></dt>
<dd><p>Note: this form of the command is deprecated, since TLS options had
to be specified with a combination of parameters to this command
(<i class="arg">verify_cert</i> and <i class="arg">sni_servername</i>) and arguments to <b class="cmd">::tls::init</b>
(from package <b class="package"><a href="../../../../index.html#tls">tls</a></b>) for example to setup defaults for trusted
certificates. Prefer the above form (without the <i class="arg">verify_cert</i> and
<i class="arg">sni_servername</i> parameters) and set TLS options with
<b class="cmd">::ldap::tlsoptions</b>.</p>
<p>If <i class="arg">verify_cert</i> is set to 1, the default, this checks the server certificate against
the known hosts. If <i class="arg">sni_servername</i> is set, the given hostname is used as the 
hostname for Server Name Indication in the TLS handshake.</p>
<p>Use <b class="cmd">::tls::init</b> to setup defaults for trusted certificates.</p>
<p>TLS supports different protocol levels. In common use are the versions 1.0, 1.1 and 1.2.
By default all those versions are offered. If you need to modify the acceptable
protocols, you can change the ::ldap::tlsProtocols list (deprecated).</p></dd>
<dt><a name="6"><b class="cmd">::ldap::disconnect</b> <i class="arg">handle</i></a></dt>
<dd><p>Closes the ldap connection refered to by the token
<i class="arg">handle</i>. Returns the empty string as its result.</p></dd>
<dt><a name="7"><b class="cmd">::ldap::starttls</b> <i class="arg">handle</i></a></dt>
<dd><p>Start TLS negotiation on the connection denoted by <i class="arg">handle</i>,
with TLS parameters set with <b class="cmd">::ldap::tlsoptions</b>.</p></dd>
<dt><a name="8"><b class="cmd">::ldap::starttls</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">cafile</i>?</span> <span class="opt">?<i class="arg">certfile</i>?</span> <span class="opt">?<i class="arg">keyfile</i>?</span> <span class="opt">?<i class="arg">verify_cert</i>?</span> <span class="opt">?<i class="arg">sni_servername</i>?</span></a></dt>
<dd><p>Note: this form of the command is deprecated, since TLS options had
to be specified with a combination of parameters to this command
(<i class="arg">cafile</i>, <i class="arg">certfile</i>, <i class="arg">keyfile</i>, <i class="arg">verify_cert</i>
and <i class="arg">sni_servername</i>) and arguments to <b class="cmd">::tls::init</b>
(from package <b class="package"><a href="../../../../index.html#tls">tls</a></b>).
Prefer the above form (without specific TLS arguments)
and set TLS options with <b class="cmd">::ldap::tlsoptions</b>.</p>
<p>Start TLS negotiation on the connection denoted by <i class="arg">handle</i>.
You need to set at least the <i class="arg">cafile</i> argument to a file with trusted certificates, if <i class="arg">verify_cert</i> is 1, which is the default.
The <i class="arg">sni_servername</i> can be used to signal a different hostname during the TLS handshake.
The announced protocols are determined in the same way as <b class="cmd">::ldap::secure_connect</b>.


You can specify a TLS client certificate with the <i class="arg">certfile</i> and <i class="arg">keyfile</i> options.</p></dd>
<dt><a name="9"><b class="cmd">::ldap::bind</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></dt>
<dd><p>This command authenticates the ldap connection refered to by the token
in <i class="arg">handle</i>, with a user name and associated password. It blocks
until a response from the ldap server arrives. Its result is the empty
string.
Both <i class="arg">name</i> and <i class="arg">passwd</i> default to the empty string if they
are not specified.
By leaving out <i class="arg">name</i> and <i class="arg">passwd</i> you can make an anonymous bind to
the ldap server.
You can issue <b class="cmd">::ldap::bind</b> again to bind with different credentials.</p></dd>
<dt><a name="10"><b class="cmd">::ldap::bindSASL</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></dt>
<dd><p>This command uses SASL authentication mechanisms to do a multistage bind.
Its otherwise identical to the standard <b class="cmd">::ldap::bind</b>.
This feature is currently experimental and subject to change. See the documentation
for the <b class="package"><a href="../sasl/sasl.html">SASL</a></b> and the &quot;<b class="file">SASL.txt</b>&quot; in the tcllib CVS repository for
details how to setup and use SASL with openldap.</p></dd>
<dt><a name="11"><b class="cmd">::ldap::unbind</b> <i class="arg">handle</i></a></dt>
<dd><p>This command asks the ldap server to release the last bind done for
the connection refered to by the token in <i class="arg">handle</i>.
The <i class="arg">handle</i> is invalid after the unbind, as the server closes the connection.
So this is effectivly just a more polite disconnect operation.</p></dd>
<dt><a name="12"><b class="cmd">::ldap::search</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></dt>
<dd><p>This command performs a LDAP search below the <i class="arg">baseObject</i> tree
using a complex LDAP search expression <i class="arg">filterString</i> and returns
the specified <i class="arg">attributes</i> of all matching objects (DNs). If the
list of <i class="arg">attributes</i> was empty all attributes are returned. The
command blocks until it has received all results.
The valid <i class="arg">options</i> are identical to the options listed for <b class="cmd">::ldap::searchInit</b>.</p>
<p>An example of a search expression is</p>
<pre class="doctools_example">
    set filterString &quot;|(cn=Linus*)(sn=Torvalds*)&quot;
</pre>
<p>The return value of the command is a list of nested dictionaries. The
first level keys are object identifiers (DNs), second levels keys are
attribute names. In other words, it is in the form</p>
<pre class="doctools_example">
    {dn1 {attr1 {val11 val12 ...} attr2 {val21...} ...}} {dn2 {a1 {v11 ...} ...}} ...
</pre>
</dd>
<dt><a name="13"><b class="cmd">::ldap::searchInit</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></dt>
<dd><p>This command initiates a LDAP search below the <i class="arg">baseObject</i> tree
using a complex LDAP search expression <i class="arg">filterString</i>.
The search gets the specified <i class="arg">attributes</i> of all matching objects (DNs).
The command itself just starts the search, to retrieve the actual results, use
<b class="cmd">::ldap::searchNext</b>.
A search can be terminated at any time by
<b class="cmd">::ldap::searchEnd</b>. This informs the server that no further results should be sent by sending and ABANDON message







|

|

|



|
|
|
|
|
|


|




















|
|



<
<
|
<
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
|
|
|
|













|
|

|







|
|



>
|












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|


|
|

<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|


<
<
<
|
<
<
<
<
<
<
<
|
<
<
<
>
>
|
|









|





|




|

















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136


137

138

139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204


























































205
206
207
208
209
210

211
212















213
214
215



216







217



218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ldap.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;   -- Copyright &copy; 2004 Jochen Loewer &lt;loewerj@web.de&gt;   -- Copyright &copy; 2006 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;
   -->
<! -- ldap.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ldap(n) 1.6.9 tcllib &quot;LDAP client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ldap - LDAP client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section3">COMMANDS</a></li>
<li class="doctools_section"><a href="#section4">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">ldap <span class="opt">?1.8?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ldap::connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>


<li><a href="#2"><b class="cmd">::ldap::secure_connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></li>

<li><a href="#3"><b class="cmd">::ldap::disconnect</b> <i class="arg">handle</i></a></li>

<li><a href="#4"><b class="cmd">::ldap::starttls</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">cafile</i>?</span> <span class="opt">?<i class="arg">certfile</i>?</span> <span class="opt">?<i class="arg">keyfile</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::ldap::bind</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::ldap::bindSASL</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::ldap::unbind</b> <i class="arg">handle</i></a></li>
<li><a href="#8"><b class="cmd">::ldap::search</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></li>
<li><a href="#9"><b class="cmd">::ldap::searchInit</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></li>
<li><a href="#10"><b class="cmd">::ldap::searchNext</b> <i class="arg">handle</i></a></li>
<li><a href="#11"><b class="cmd">::ldap::searchEnd</b> <i class="arg">handle</i></a></li>
<li><a href="#12"><b class="cmd">::ldap::modify</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></li>
<li><a href="#13"><b class="cmd">::ldap::modifyMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrValToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></li>
<li><a href="#14"><b class="cmd">::ldap::add</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></li>
<li><a href="#15"><b class="cmd">::ldap::addMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></li>
<li><a href="#16"><b class="cmd">::ldap::delete</b> <i class="arg">handle</i> <i class="arg">dn</i></a></li>
<li><a href="#17"><b class="cmd">::ldap::modifyDN</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">newrdn</i> <span class="opt">?<i class="arg">deleteOld</i>?</span> <span class="opt">?<i class="arg">newSuperior</i>?</span></a></li>
<li><a href="#18"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#key451">ip</a></b> <i class="arg">handle</i></a></li>
<li><a href="#19"><b class="cmd">::ldap::info</b> <b class="cmd">bound</b> <i class="arg">handle</i></a></li>
<li><a href="#20"><b class="cmd">::ldap::info</b> <b class="cmd">bounduser</b> <i class="arg">handle</i></a></li>
<li><a href="#21"><b class="cmd">::ldap::info</b> <b class="cmd">connections</b></a></li>
<li><a href="#22"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#key331">tls</a></b> <i class="arg">handle</i></a></li>

<li><a href="#23"><b class="cmd">::ldap::info</b> <b class="cmd">saslmechanisms</b> <i class="arg">handle</i></a></li>
<li><a href="#24"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../control/control.html">control</a></b> <i class="arg">handle</i></a></li>
<li><a href="#25"><b class="cmd">::ldap::info</b> <b class="cmd">extensions</b> <i class="arg">extensions</i></a></li>
<li><a href="#26"><b class="cmd">::ldap::info</b> <b class="cmd">whoami</b> <i class="arg">handle</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">ldap</b> package provides a Tcl-only client library
for the LDAPv3 protocol as specified in
RFC 4511 (<a href="http://www.rfc-editor.org/rfc/rfc4511.txt">http://www.rfc-editor.org/rfc/rfc4511.txt</a>).
It works by opening the standard (or secure) LDAP socket on the
server, and then providing a Tcl API to access the LDAP protocol
commands.  All server errors are returned as Tcl errors (thrown) which
must be caught with the Tcl <b class="cmd">catch</b> command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::ldap::connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Opens a LDAPv3 connection to the specified <i class="arg">host</i>, at the given
<i class="arg">port</i>, and returns a token for the connection. This token is the
<i class="arg">handle</i> argument for all other commands. If no <i class="arg">port</i> is
specified it will default to <b class="const">389</b>.</p>
<p>The command blocks until the connection has been established, or
establishment definitely failed.</p></dd>


























































<dt><a name="2"><b class="cmd">::ldap::secure_connect</b> <i class="arg">host</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Like <b class="cmd">::ldap::connect</b>, except that the created connection is
secured by SSL. The port defaults to <b class="const">636</b>.  This command
depends on the availability of the package <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, which is a
SSL binding for Tcl. If <b class="package"><a href="../../../../index.html#key331">TLS</a></b> is not available, then this
command will fail.</p>

<p>The command blocks until the connection has been established, or
establishment definitely failed.</p></dd>















<dt><a name="3"><b class="cmd">::ldap::disconnect</b> <i class="arg">handle</i></a></dt>
<dd><p>Closes the ldap connection refered to by the token
<i class="arg">handle</i>. Returns the empty string as its result.</p></dd>



<dt><a name="4"><b class="cmd">::ldap::starttls</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">cafile</i>?</span> <span class="opt">?<i class="arg">certfile</i>?</span> <span class="opt">?<i class="arg">keyfile</i>?</span></a></dt>







<dd><p>Start TLS negotiation on the connection denoted by <i class="arg">handle</i>.



This is currently experimental and subject to change, more control over the TLS details
will probably be exposed later, to allow users to fine tune the negotiation according
to their security needs.</p></dd>
<dt><a name="5"><b class="cmd">::ldap::bind</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></dt>
<dd><p>This command authenticates the ldap connection refered to by the token
in <i class="arg">handle</i>, with a user name and associated password. It blocks
until a response from the ldap server arrives. Its result is the empty
string.
Both <i class="arg">name</i> and <i class="arg">passwd</i> default to the empty string if they
are not specified.
By leaving out <i class="arg">name</i> and <i class="arg">passwd</i> you can make an anonymous bind to
the ldap server.
You can issue <b class="cmd">::ldap::bind</b> again to bind with different credentials.</p></dd>
<dt><a name="6"><b class="cmd">::ldap::bindSASL</b> <i class="arg">handle</i> <span class="opt">?<i class="arg">name</i>?</span> <span class="opt">?<i class="arg">password</i>?</span></a></dt>
<dd><p>This command uses SASL authentication mechanisms to do a multistage bind.
Its otherwise identical to the standard <b class="cmd">::ldap::bind</b>.
This feature is currently experimental and subject to change. See the documentation
for the <b class="package"><a href="../sasl/sasl.html">SASL</a></b> and the &quot;<b class="file">SASL.txt</b>&quot; in the tcllib CVS repository for
details how to setup and use SASL with openldap.</p></dd>
<dt><a name="7"><b class="cmd">::ldap::unbind</b> <i class="arg">handle</i></a></dt>
<dd><p>This command asks the ldap server to release the last bind done for
the connection refered to by the token in <i class="arg">handle</i>.
The <i class="arg">handle</i> is invalid after the unbind, as the server closes the connection.
So this is effectivly just a more polite disconnect operation.</p></dd>
<dt><a name="8"><b class="cmd">::ldap::search</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></dt>
<dd><p>This command performs a LDAP search below the <i class="arg">baseObject</i> tree
using a complex LDAP search expression <i class="arg">filterString</i> and returns
the specified <i class="arg">attributes</i> of all matching objects (DNs). If the
list of <i class="arg">attributes</i> was empty all attributes are returned. The
command blocks until it has received all results.
The valid <i class="arg">options</i> are identical to the options listed for <b class="cmd">::ldap::searchInit</b>.</p>
<p>An example of a search expression is</p>
<pre class="doctools_example">
    set filterString &quot;|(cn=Linus*)(sn=Torvalds*)&quot;
</pre>
<p>The return value of the command is a list of nested dictionaries. The
first level keys are object identifiers (DNs), second levels keys are
attribute names. In other words, it is in the form</p>
<pre class="doctools_example">
    {dn1 {attr1 {val11 val12 ...} attr2 {val21...} ...}} {dn2 {a1 {v11 ...} ...}} ...
</pre>
</dd>
<dt><a name="9"><b class="cmd">::ldap::searchInit</b> <i class="arg">handle</i> <i class="arg">baseObject</i> <i class="arg">filterString</i> <i class="arg">attributes</i> <i class="arg">options</i></a></dt>
<dd><p>This command initiates a LDAP search below the <i class="arg">baseObject</i> tree
using a complex LDAP search expression <i class="arg">filterString</i>.
The search gets the specified <i class="arg">attributes</i> of all matching objects (DNs).
The command itself just starts the search, to retrieve the actual results, use
<b class="cmd">::ldap::searchNext</b>.
A search can be terminated at any time by
<b class="cmd">::ldap::searchEnd</b>. This informs the server that no further results should be sent by sending and ABANDON message
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<dd><p>If set to 1 only the attribute names but not the values will be present in the search result.
The default is to retrieve attribute names and values.</p></dd>
<dt><b class="option">-referencevar</b> varname</dt>
<dd><p>If set the search result reference LDAPURIs, if any, are returned in the given variable.
The caller can than decide to follow those references and query other LDAP servers for
further results.</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::ldap::searchNext</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the next entry from a LDAP search initiated
by <b class="cmd">::ldap::searchInit</b>. It returns only after a new result is received
or when no further results are available, but takes care to keep
the event loop alive.
The returned entry is a list with
two elements: the first is the DN of the entry, the second is the
list of attributes and values, under the format:</p>
<pre class="doctools_example">
    dn {attr1 {val11 val12 ...} attr2 {val21...} ...}
</pre>
<p>The <b class="cmd">::ldap::searchNext</b> command returns an empty list at the
end of the search.</p></dd>
<dt><a name="15"><b class="cmd">::ldap::searchEnd</b> <i class="arg">handle</i></a></dt>
<dd><p>This command terminates a LDAP search initiated
by <b class="cmd">::ldap::searchInit</b>. It also cleans up
the internal state so a new search can be initiated.
If the client has not yet received all results, the client
sends an ABANDON message to inform the server that no
further results for the previous search should to be sent.</p></dd>
<dt><a name="16"><b class="cmd">::ldap::modify</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></dt>
<dd><p>This command modifies the object <i class="arg">dn</i> on the ldap server we are
connected to via <i class="arg">handle</i>. It replaces attributes with new values,
deletes attributes, and adds new attributes with new values.
All arguments are dictionaries mapping attribute names to values. The
optional arguments default to the empty dictionary, which means that
no attributes will be deleted nor added.</p>
<dl class="doctools_arguments">







|












|






|







298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<dd><p>If set to 1 only the attribute names but not the values will be present in the search result.
The default is to retrieve attribute names and values.</p></dd>
<dt><b class="option">-referencevar</b> varname</dt>
<dd><p>If set the search result reference LDAPURIs, if any, are returned in the given variable.
The caller can than decide to follow those references and query other LDAP servers for
further results.</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::ldap::searchNext</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the next entry from a LDAP search initiated
by <b class="cmd">::ldap::searchInit</b>. It returns only after a new result is received
or when no further results are available, but takes care to keep
the event loop alive.
The returned entry is a list with
two elements: the first is the DN of the entry, the second is the
list of attributes and values, under the format:</p>
<pre class="doctools_example">
    dn {attr1 {val11 val12 ...} attr2 {val21...} ...}
</pre>
<p>The <b class="cmd">::ldap::searchNext</b> command returns an empty list at the
end of the search.</p></dd>
<dt><a name="11"><b class="cmd">::ldap::searchEnd</b> <i class="arg">handle</i></a></dt>
<dd><p>This command terminates a LDAP search initiated
by <b class="cmd">::ldap::searchInit</b>. It also cleans up
the internal state so a new search can be initiated.
If the client has not yet received all results, the client
sends an ABANDON message to inform the server that no
further results for the previous search should to be sent.</p></dd>
<dt><a name="12"><b class="cmd">::ldap::modify</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></dt>
<dd><p>This command modifies the object <i class="arg">dn</i> on the ldap server we are
connected to via <i class="arg">handle</i>. It replaces attributes with new values,
deletes attributes, and adds new attributes with new values.
All arguments are dictionaries mapping attribute names to values. The
optional arguments default to the empty dictionary, which means that
no attributes will be deleted nor added.</p>
<dl class="doctools_arguments">
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
in the dictionary is the empty string.</p></dd>
<dt>dictionary <i class="arg">attrValToAdd</i> (in)</dt>
<dd><p>No attributes will be added if this argument is empty. The dictionary
values are the values for the new attributes.</p></dd>
</dl>
<p>The command blocks until all modifications have completed. Its result
is the empty string.</p></dd>
<dt><a name="17"><b class="cmd">::ldap::modifyMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrValToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></dt>
<dd><p>This command modifies the object <i class="arg">dn</i> on the ldap server we are
connected to via <i class="arg">handle</i>. It replaces attributes with new values,
deletes attributes, and adds new attributes with new values.
All arguments are lists with the format:</p>
<pre class="doctools_example">
    attr1 {val11 val12 ...} attr2 {val21...} ...
</pre>







|







342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
in the dictionary is the empty string.</p></dd>
<dt>dictionary <i class="arg">attrValToAdd</i> (in)</dt>
<dd><p>No attributes will be added if this argument is empty. The dictionary
values are the values for the new attributes.</p></dd>
</dl>
<p>The command blocks until all modifications have completed. Its result
is the empty string.</p></dd>
<dt><a name="13"><b class="cmd">::ldap::modifyMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValToReplace</i> <span class="opt">?<i class="arg">attrValToDelete</i>?</span> <span class="opt">?<i class="arg">attrValToAdd</i>?</span></a></dt>
<dd><p>This command modifies the object <i class="arg">dn</i> on the ldap server we are
connected to via <i class="arg">handle</i>. It replaces attributes with new values,
deletes attributes, and adds new attributes with new values.
All arguments are lists with the format:</p>
<pre class="doctools_example">
    attr1 {val11 val12 ...} attr2 {val21...} ...
</pre>
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482

483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
value is specified, the whole set of values for an attribute
will be deleted.</p></dd>
<dt>list <i class="arg">attrValToAdd</i> (in)</dt>
<dd><p>No attributes will be added if this argument is empty.</p></dd>
</dl>
<p>The command blocks until all modifications have completed. Its result
is the empty string.</p></dd>
<dt><a name="18"><b class="cmd">::ldap::add</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></dt>
<dd><p>This command creates a new object using the specified <i class="arg">dn</i>. The
attributes of the new object are set to the values in the list
<i class="arg">attrValueTuples</i>.
Multiple valuated attributes may be specified using multiple tuples.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="19"><b class="cmd">::ldap::addMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></dt>
<dd><p>This command is the preferred one to create
a new object using the specified <i class="arg">dn</i>. The
attributes of the new object are set to the values in the dictionary
<i class="arg">attrValueTuples</i> (which is keyed by the attribute names).
Each tuple is a list containing multiple values.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="20"><b class="cmd">::ldap::delete</b> <i class="arg">handle</i> <i class="arg">dn</i></a></dt>
<dd><p>This command removes the object specified by <i class="arg">dn</i>, and all its
attributes from the server.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="21"><b class="cmd">::ldap::modifyDN</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">newrdn</i> <span class="opt">?<i class="arg">deleteOld</i>?</span> <span class="opt">?<i class="arg">newSuperior</i>?</span></a></dt>

<dd><p>This command moves or copies the object specified by <i class="arg">dn</i>
to a new location in the tree of object. This location is
specified by <i class="arg">newrdn</i>, a <em>relative</em> designation,
or by <i class="arg">newrdn</i> and <i class="arg">newSuperior</i>, a <em>absolute</em> designation.
The optional argument <i class="arg">deleteOld</i> defaults to <b class="const">true</b>,
i.e. a move operation. If <i class="arg">deleteOld</i> is not set, then the
operation will create a copy of <i class="arg">dn</i> in the new location.
The optional argument <i class="arg">newSuperior</i> defaults an empty string,
meaning that the object must not be relocated in another branch of
the tree. If this argument is given, the argument <i class="arg">deleteOld</i>
must be specified also.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="22"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#ip">ip</a></b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the IP address of the remote LDAP server the handle is connected to.</p></dd>
<dt><a name="23"><b class="cmd">::ldap::info</b> <b class="cmd">bound</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns 1 if a handle has successfully completed a <b class="cmd">::ldap::bind</b>.
If no bind was done or it failed, a 0 is returned.</p></dd>
<dt><a name="24"><b class="cmd">::ldap::info</b> <b class="cmd">bounduser</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the username used in the bind operation if a handle has successfully completed a <b class="cmd">::ldap::bind</b>.
If no bound was done or it failed, an empty string is returned.</p></dd>
<dt><a name="25"><b class="cmd">::ldap::info</b> <b class="cmd">connections</b></a></dt>
<dd><p>This command returns all currently existing ldap connection handles.</p></dd>
<dt><a name="26"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#tls">tls</a></b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns 1 if the ldap connection <i class="arg">handle</i> used TLS/SSL for
connection via <b class="cmd">ldap::secure_connect</b> or completed <b class="cmd">ldap::starttls</b>, 0 otherwise.</p></dd>
<dt><a name="27"><b class="cmd">::ldap::info</b> <b class="cmd">tlsstatus</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the current security status of an TLS secured
channel. The result is a list of key-value pairs describing the connected
peer (see the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package documentation for the returned values).
If the connection is not secured with TLS, an empty list is returned.</p></dd>
<dt><a name="28"><b class="cmd">::ldap::info</b> <b class="cmd">saslmechanisms</b> <i class="arg">handle</i></a></dt>
<dd><p>Return the supported SASL mechanisms advertised by the server. Only valid in a
bound state (anonymous or other).</p></dd>
<dt><a name="29"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../control/control.html">control</a></b> <i class="arg">handle</i></a></dt>
<dd><p>Return the supported controls advertised by the server as a list of OIDs. Only valid in a bound state.
This is currently experimental and subject to change.</p></dd>
<dt><a name="30"><b class="cmd">::ldap::info</b> <b class="cmd">extensions</b> <i class="arg">extensions</i></a></dt>
<dd><p>Returns the supported LDAP extensions as list of OIDs. Only valid in a bound state.
This is currently experimental and subject to change.</p></dd>
<dt><a name="31"><b class="cmd">::ldap::info</b> <b class="cmd">whoami</b> <i class="arg">handle</i></a></dt>
<dd><p>Returns authzId for the current connection. This implements the RFC 4532
protocol extension.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<p>A small example, extracted from the test application coming with this
code.</p>







|






|







|




|
>
|












|

|


|


|

|


<
<
<
<
<
|


|


|


|







367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421





422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
value is specified, the whole set of values for an attribute
will be deleted.</p></dd>
<dt>list <i class="arg">attrValToAdd</i> (in)</dt>
<dd><p>No attributes will be added if this argument is empty.</p></dd>
</dl>
<p>The command blocks until all modifications have completed. Its result
is the empty string.</p></dd>
<dt><a name="14"><b class="cmd">::ldap::add</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></dt>
<dd><p>This command creates a new object using the specified <i class="arg">dn</i>. The
attributes of the new object are set to the values in the list
<i class="arg">attrValueTuples</i>.
Multiple valuated attributes may be specified using multiple tuples.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="15"><b class="cmd">::ldap::addMulti</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">attrValueTuples</i></a></dt>
<dd><p>This command is the preferred one to create
a new object using the specified <i class="arg">dn</i>. The
attributes of the new object are set to the values in the dictionary
<i class="arg">attrValueTuples</i> (which is keyed by the attribute names).
Each tuple is a list containing multiple values.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="16"><b class="cmd">::ldap::delete</b> <i class="arg">handle</i> <i class="arg">dn</i></a></dt>
<dd><p>This command removes the object specified by <i class="arg">dn</i>, and all its
attributes from the server.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="17"><b class="cmd">::ldap::modifyDN</b> <i class="arg">handle</i> <i class="arg">dn</i> <i class="arg">newrdn</i> <span class="opt">?<i class="arg">deleteOld</i>?</span> <span class="opt">?<i class="arg">newSuperior</i>?</span></a></dt>
<dd><p>]
This command moves or copies the object specified by <i class="arg">dn</i>
to a new location in the tree of object. This location is
specified by <i class="arg">newrdn</i>, a <em>relative</em> designation,
or by <i class="arg">newrdn</i> and <i class="arg">newSuperior</i>, a <em>absolute</em> designation.
The optional argument <i class="arg">deleteOld</i> defaults to <b class="const">true</b>,
i.e. a move operation. If <i class="arg">deleteOld</i> is not set, then the
operation will create a copy of <i class="arg">dn</i> in the new location.
The optional argument <i class="arg">newSuperior</i> defaults an empty string,
meaning that the object must not be relocated in another branch of
the tree. If this argument is given, the argument <i class="arg">deleteOld</i>
must be specified also.
The command blocks until the operation has completed. Its result
is the empty string.</p></dd>
<dt><a name="18"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#key451">ip</a></b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the IP address of the remote LDAP server the handle is connected to.</p></dd>
<dt><a name="19"><b class="cmd">::ldap::info</b> <b class="cmd">bound</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns 1 if a handle has successfully completed a <b class="cmd">::ldap::bind</b>.
If no bind was done or it failed, a 0 is returned.</p></dd>
<dt><a name="20"><b class="cmd">::ldap::info</b> <b class="cmd">bounduser</b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns the username used in the bind operation if a handle has successfully completed a <b class="cmd">::ldap::bind</b>.
If no bound was done or it failed, an empty string is returned.</p></dd>
<dt><a name="21"><b class="cmd">::ldap::info</b> <b class="cmd">connections</b></a></dt>
<dd><p>This command returns all currently existing ldap connection handles.</p></dd>
<dt><a name="22"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../../../../index.html#key331">tls</a></b> <i class="arg">handle</i></a></dt>
<dd><p>This command returns 1 if the ldap connection <i class="arg">handle</i> used TLS/SSL for
connection via <b class="cmd">ldap::secure_connect</b> or completed <b class="cmd">ldap::starttls</b>, 0 otherwise.</p></dd>





<dt><a name="23"><b class="cmd">::ldap::info</b> <b class="cmd">saslmechanisms</b> <i class="arg">handle</i></a></dt>
<dd><p>Return the supported SASL mechanisms advertised by the server. Only valid in a
bound state (anonymous or other).</p></dd>
<dt><a name="24"><b class="cmd">::ldap::info</b> <b class="cmd"><a href="../control/control.html">control</a></b> <i class="arg">handle</i></a></dt>
<dd><p>Return the supported controls advertised by the server as a list of OIDs. Only valid in a bound state.
This is currently experimental and subject to change.</p></dd>
<dt><a name="25"><b class="cmd">::ldap::info</b> <b class="cmd">extensions</b> <i class="arg">extensions</i></a></dt>
<dd><p>Returns the supported LDAP extensions as list of OIDs. Only valid in a bound state.
This is currently experimental and subject to change.</p></dd>
<dt><a name="26"><b class="cmd">::ldap::info</b> <b class="cmd">whoami</b> <i class="arg">handle</i></a></dt>
<dd><p>Returns authzId for the current connection. This implements the RFC 4532
protocol extension.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXAMPLES</a></h2>
<p>A small example, extracted from the test application coming with this
code.</p>
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
    ldap::modifyDN $handle $dn &quot;cn=Tester&quot;
    # Kill the test object, and shut the connection down.
    set dn &quot;cn=Tester,ou=People,o=University of Michigan,c=US&quot;
    ldap::delete $handle $dn
    ldap::unbind     $handle
    ldap::disconnect $handle
</pre>
<p>And another example, a simple query, and processing the
results.</p>
<pre class="doctools_example">
    package require ldap
    set handle [ldap::connect ldap.acme.com 389]
    ldap::bind $handle
    set results [ldap::search $handle &quot;o=acme,dc=com&quot; &quot;(uid=jdoe)&quot; {}]
    foreach result $results {







|







472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
    ldap::modifyDN $handle $dn &quot;cn=Tester&quot;
    # Kill the test object, and shut the connection down.
    set dn &quot;cn=Tester,ou=People,o=University of Michigan,c=US&quot;
    ldap::delete $handle $dn
    ldap::unbind     $handle
    ldap::disconnect $handle
</pre>
<p>And a another example, a simple query, and processing the
results.</p>
<pre class="doctools_example">
    package require ldap
    set handle [ldap::connect ldap.acme.com 389]
    ldap::bind $handle
    set results [ldap::search $handle &quot;o=acme,dc=com&quot; &quot;(uid=jdoe)&quot; {}]
    foreach result $results {
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ldap</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#directory_access">directory access</a>, <a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#ldap">ldap</a>, <a href="../../../../index.html#ldap_client">ldap client</a>, <a href="../../../../index.html#protocol">protocol</a>, <a href="../../../../index.html#rfc_2251">rfc 2251</a>, <a href="../../../../index.html#rfc_4511">rfc 4511</a>, <a href="../../../../index.html#x_500">x.500</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Jochen Loewer &lt;loewerj@web.de&gt;<br>
Copyright &copy; 2006 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|










514
515
516
517
518
519
520






521
522
523
524
525
526
527
528
529
530
531
532
533
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ldap</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key135">directory access</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key130">ldap</a>, <a href="../../../../index.html#key128">ldap client</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key129">rfc 2251</a>, <a href="../../../../index.html#key132">rfc 4511</a>, <a href="../../../../index.html#key134">x.500</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Jochen Loewer &lt;loewerj@web.de&gt;<br>
Copyright &copy; 2006 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/ldap/ldapx.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>ldapx - LDAP extended object interface</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>ldapx - LDAP extended object interface</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ldapx.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006-2018 Pierre David &amp;lt;pdav@users.sourceforge.net&amp;gt;
   -->
<!-- ldapx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ldapx(n) 1.2 tcllib &quot;LDAP extended object interface&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ldapx - LDAP extended object interface</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ldapx.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Pierre David &lt;pdav@users.sourceforge.net&gt;
   -->
<! -- ldapx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ldapx(n) 0.2.5 tcllib &quot;LDAP extended object interface&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ldapx - LDAP extended object interface</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">ldapx <span class="opt">?1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><i class="arg">e</i> <b class="method">reset</b></a></li>
<li><a href="#2"><i class="arg">e</i> <b class="method">dn</b> <span class="opt">?<i class="arg">newdn</i>?</span></a></li>
<li><a href="#3"><i class="arg">e</i> <b class="method">rdn</b></a></li>
<li><a href="#4"><i class="arg">e</i> <b class="method">superior</b></a></li>
<li><a href="#5"><i class="arg">e</i> <b class="method">print</b></a></li>







|
|







150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">ldapx <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><i class="arg">e</i> <b class="method">reset</b></a></li>
<li><a href="#2"><i class="arg">e</i> <b class="method">dn</b> <span class="opt">?<i class="arg">newdn</i>?</span></a></li>
<li><a href="#3"><i class="arg">e</i> <b class="method">rdn</b></a></li>
<li><a href="#4"><i class="arg">e</i> <b class="method">superior</b></a></li>
<li><a href="#5"><i class="arg">e</i> <b class="method">print</b></a></li>
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<li><a href="#18"><i class="arg">se</i> <b class="method">backup</b> <span class="opt">?<i class="arg">other</i>?</span></a></li>
<li><a href="#19"><i class="arg">se</i> <b class="method">swap</b></a></li>
<li><a href="#20"><i class="arg">se</i> <b class="method">restore</b> <span class="opt">?<i class="arg">other</i>?</span></a></li>
<li><a href="#21"><i class="arg">se</i> <b class="method">apply</b> <i class="arg">centry</i></a></li>
<li><a href="#22"><i class="arg">ce</i> <b class="method">change</b> <span class="opt">?<i class="arg">new</i>?</span></a></li>
<li><a href="#23"><i class="arg">ce</i> <b class="method">diff</b> <i class="arg">new</i> <span class="opt">?<i class="arg">old</i>?</span></a></li>
<li><a href="#24"><i class="arg">la</i> <b class="method">error</b> <span class="opt">?<i class="arg">newmsg</i>?</span></a></li>
<li><a href="#25"><i class="arg">la</i> <b class="method">connect</b> <i class="arg">url</i> <span class="opt">?<i class="arg">binddn</i>?</span> <span class="opt">?<i class="arg">bindpw</i>?</span> <span class="opt">?<i class="arg">starttls</i>?</span></a></li>
<li><a href="#26"><i class="arg">la</i> <b class="method">disconnect</b></a></li>
<li><a href="#27"><i class="arg">la</i> <b class="method">traverse</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">attrs</i> <i class="arg">entry</i> <i class="arg">body</i></a></li>
<li><a href="#28"><i class="arg">la</i> <b class="method">search</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">attrs</i></a></li>
<li><a href="#29"><i class="arg">la</i> <b class="method">read</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">entry</i> ... <i class="arg">entry</i></a></li>
<li><a href="#30"><i class="arg">la</i> <b class="method">commit</b> <i class="arg">entry</i> ... <i class="arg">entry</i></a></li>
<li><a href="#31"><i class="arg">li</i> <b class="method">channel</b> <i class="arg">chan</i></a></li>
<li><a href="#32"><i class="arg">li</i> <b class="method">error</b> <span class="opt">?<i class="arg">newmsg</i>?</span></a></li>







|







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<li><a href="#18"><i class="arg">se</i> <b class="method">backup</b> <span class="opt">?<i class="arg">other</i>?</span></a></li>
<li><a href="#19"><i class="arg">se</i> <b class="method">swap</b></a></li>
<li><a href="#20"><i class="arg">se</i> <b class="method">restore</b> <span class="opt">?<i class="arg">other</i>?</span></a></li>
<li><a href="#21"><i class="arg">se</i> <b class="method">apply</b> <i class="arg">centry</i></a></li>
<li><a href="#22"><i class="arg">ce</i> <b class="method">change</b> <span class="opt">?<i class="arg">new</i>?</span></a></li>
<li><a href="#23"><i class="arg">ce</i> <b class="method">diff</b> <i class="arg">new</i> <span class="opt">?<i class="arg">old</i>?</span></a></li>
<li><a href="#24"><i class="arg">la</i> <b class="method">error</b> <span class="opt">?<i class="arg">newmsg</i>?</span></a></li>
<li><a href="#25"><i class="arg">la</i> <b class="method">connect</b> <i class="arg">url</i> <span class="opt">?<i class="arg">binddn</i>?</span> <span class="opt">?<i class="arg">bindpw</i>?</span></a></li>
<li><a href="#26"><i class="arg">la</i> <b class="method">disconnect</b></a></li>
<li><a href="#27"><i class="arg">la</i> <b class="method">traverse</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">attrs</i> <i class="arg">entry</i> <i class="arg">body</i></a></li>
<li><a href="#28"><i class="arg">la</i> <b class="method">search</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">attrs</i></a></li>
<li><a href="#29"><i class="arg">la</i> <b class="method">read</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">entry</i> ... <i class="arg">entry</i></a></li>
<li><a href="#30"><i class="arg">la</i> <b class="method">commit</b> <i class="arg">entry</i> ... <i class="arg">entry</i></a></li>
<li><a href="#31"><i class="arg">li</i> <b class="method">channel</b> <i class="arg">chan</i></a></li>
<li><a href="#32"><i class="arg">li</i> <b class="method">error</b> <span class="opt">?<i class="arg">newmsg</i>?</span></a></li>
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
<dd><p>This variable contains the error message which appeared in
	the last method of the <b class="class">ldap</b> class (this string is
	modified in nearly all methods). The <b class="method">error</b> method
	may be used to fetch this message.</p></dd>
</dl>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Ldap Options</a></h3>
<p>Options are configured on <b class="class">ldap</b> instances using the <b class="cmd">configure</b>
method.</p>
<p>The first option is used for TLS parameters:</p>
<dl class="doctools_options">
    
<dt><b class="option">-tlsoptions</b> <i class="arg">list</i></dt>
<dd><p>Specify the set of TLS options to use when connecting to the
	LDAP server (see the <b class="cmd">connect</b> method). For the list of
	valid options, see the <b class="package"><a href="ldap.html">LDAP</a></b> package documentation.</p>
<p>The default is <b class="const">-request 1 -require 1 -ssl2 no -ssl3 no -tls1 yes -tls1.1 yes -tls1.2 yes</b>.</p>
<p>Example:</p>
<pre class="doctools_example">$l configure -tlsoptions {-request yes -require yes}</pre>
</dd>
</dl>
<p>A set of options of the <b class="class">ldap</b> class is used during
search operations (methods <b class="method">traverse</b>, <b class="method">search</b> and
<b class="method">read</b>, see below).</p>
<dl class="doctools_options">
    
<dt><b class="option">-scope</b> <b class="const">base</b>|<b class="const">one</b>|<b class="const">sub</b></dt>
<dd><p>Specify the scope of the LDAP search to be one of
	<b class="const">base</b>, <b class="const">one</b> or <b class="const">sub</b> to specify







<
<
<
<
<
<
<
<
<
<
<
<
<
<
|







459
460
461
462
463
464
465














466
467
468
469
470
471
472
473
<dd><p>This variable contains the error message which appeared in
	the last method of the <b class="class">ldap</b> class (this string is
	modified in nearly all methods). The <b class="method">error</b> method
	may be used to fetch this message.</p></dd>
</dl>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Ldap Options</a></h3>














<p>A first set of options of the <b class="class">ldap</b> class is used during
search operations (methods <b class="method">traverse</b>, <b class="method">search</b> and
<b class="method">read</b>, see below).</p>
<dl class="doctools_options">
    
<dt><b class="option">-scope</b> <b class="const">base</b>|<b class="const">one</b>|<b class="const">sub</b></dt>
<dd><p>Specify the scope of the LDAP search to be one of
	<b class="const">base</b>, <b class="const">one</b> or <b class="const">sub</b> to specify
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
<dl class="doctools_definitions">
    
<dt><a name="24"><i class="arg">la</i> <b class="method">error</b> <span class="opt">?<i class="arg">newmsg</i>?</span></a></dt>
<dd><p>This method returns the error message that occurred in the
	last call to a <b class="class">ldap</b> class method. If the optional
	argument <i class="arg">newmsg</i> is supplied, it becomes the last
	error message.</p></dd>
<dt><a name="25"><i class="arg">la</i> <b class="method">connect</b> <i class="arg">url</i> <span class="opt">?<i class="arg">binddn</i>?</span> <span class="opt">?<i class="arg">bindpw</i>?</span> <span class="opt">?<i class="arg">starttls</i>?</span></a></dt>
<dd><p>This method connects to the LDAP server using given URL
	(which can be of the form <a href="ldap://host:port">ldap://host:port</a> or
	<a href="ldaps://host:port">ldaps://host:port</a>). If an optional <i class="arg">binddn</i>
	argument is given together with the <i class="arg">bindpw</i> argument,
	the <b class="method">connect</b> binds to the LDAP server using the
	specified DN and password.</p>
<p>If the <i class="arg">starttls</i> argument is given a true value (<b class="const">1</b>,
	<b class="const">yes</b>, etc.) and the URL uses the <a href="ldap://">ldap://</a> scheme,
	a TLS negotiation is initiated with the newly created connection,
	before LDAP binding.
	Default value: <b class="const">no</b>.</p>
<p>This method returns 1 if connection was successful, or 0 if an
	error occurred (use the <b class="cmd"><a href="../../../../index.html#error">error</a></b> method to get the message).</p></dd>
<dt><a name="26"><i class="arg">la</i> <b class="method">disconnect</b></a></dt>
<dd><p>This method disconnects (and unbinds, if necessary) from
	the LDAP server.</p></dd>
<dt><a name="27"><i class="arg">la</i> <b class="method">traverse</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">attrs</i> <i class="arg">entry</i> <i class="arg">body</i></a></dt>
<dd><p>This method is a new control structure. It searches the
	LDAP directory from the specified base DN (given by the
	<i class="arg">base</i> argument) and selects entries based on the







|





|
<
<
<
<
<
<
<







518
519
520
521
522
523
524
525
526
527
528
529
530
531







532
533
534
535
536
537
538
<dl class="doctools_definitions">
    
<dt><a name="24"><i class="arg">la</i> <b class="method">error</b> <span class="opt">?<i class="arg">newmsg</i>?</span></a></dt>
<dd><p>This method returns the error message that occurred in the
	last call to a <b class="class">ldap</b> class method. If the optional
	argument <i class="arg">newmsg</i> is supplied, it becomes the last
	error message.</p></dd>
<dt><a name="25"><i class="arg">la</i> <b class="method">connect</b> <i class="arg">url</i> <span class="opt">?<i class="arg">binddn</i>?</span> <span class="opt">?<i class="arg">bindpw</i>?</span></a></dt>
<dd><p>This method connects to the LDAP server using given URL
	(which can be of the form <a href="ldap://host:port">ldap://host:port</a> or
	<a href="ldaps://host:port">ldaps://host:port</a>). If an optional <i class="arg">binddn</i>
	argument is given together with the <i class="arg">bindpw</i> argument,
	the <b class="method">connect</b> binds to the LDAP server using the
	specified DN and password.</p></dd>







<dt><a name="26"><i class="arg">la</i> <b class="method">disconnect</b></a></dt>
<dd><p>This method disconnects (and unbinds, if necessary) from
	the LDAP server.</p></dd>
<dt><a name="27"><i class="arg">la</i> <b class="method">traverse</b> <i class="arg">base</i> <i class="arg">filter</i> <i class="arg">attrs</i> <i class="arg">entry</i> <i class="arg">body</i></a></dt>
<dd><p>This method is a new control structure. It searches the
	LDAP directory from the specified base DN (given by the
	<i class="arg">base</i> argument) and selects entries based on the
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
	transaction extension provided by OpenLDAP 2.3 and later.</p></dd>
</dl>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">Ldap Example</a></h3>
<pre class="doctools_example">
    package require ldapx
    #
    # Connects to the LDAP directory using StartTLS
    #
    ::ldapx::ldap create l
    l configure -tlsoptions {-cadir /etc/ssl/certs -request yes -require yes}
    set url &quot;ldap://server.mycomp.com&quot;
    if {! [l connect $url &quot;cn=admin,o=mycomp&quot; &quot;mypasswd&quot; yes]} then {
	puts stderr &quot;error: [l error]&quot;
	exit 1
    }
    #
    # Search all entries matching some criterion
    #
    l configure -scope one







|


<

|







568
569
570
571
572
573
574
575
576
577

578
579
580
581
582
583
584
585
586
	transaction extension provided by OpenLDAP 2.3 and later.</p></dd>
</dl>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">Ldap Example</a></h3>
<pre class="doctools_example">
    package require ldapx
    #
    # Connects to the LDAP directory
    #
    ::ldapx::ldap create l

    set url &quot;ldap://server.mycomp.com&quot;
    if {! [l connect $url &quot;cn=admin,o=mycomp&quot; &quot;mypasswd&quot;]} then {
	puts stderr &quot;error: [l error]&quot;
	exit 1
    }
    #
    # Search all entries matching some criterion
    #
    l configure -scope one
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
	c diff $e
	if {! [l commit c]} then {
	    puts stderr &quot;error: [l error]&quot;
	    exit 1
	}
	$e destroy
    }
    c destroy
    
    l disconnect
    l destroy
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">LDIF CLASS</a></h2>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Ldif Instance Data</a></h3>







<
<







606
607
608
609
610
611
612


613
614
615
616
617
618
619
	c diff $e
	if {! [l commit c]} then {
	    puts stderr &quot;error: [l error]&quot;
	    exit 1
	}
	$e destroy
    }


    l disconnect
    l destroy
</pre>
</div>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">LDIF CLASS</a></h2>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Ldif Instance Data</a></h3>
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ldap</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#directory_access">directory access</a>, <a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#ldap">ldap</a>, <a href="../../../../index.html#ldap_client">ldap client</a>, <a href="../../../../index.html#ldif">ldif</a>, <a href="../../../../index.html#protocol">protocol</a>, <a href="../../../../index.html#rfc_2251">rfc 2251</a>, <a href="../../../../index.html#rfc_2849">rfc 2849</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2018 Pierre David &lt;pdav@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


737
738
739
740
741
742
743






744
745
746
747
748
749
750
751
752
753
754
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ldap</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key135">directory access</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key130">ldap</a>, <a href="../../../../index.html#key128">ldap client</a>, <a href="../../../../index.html#key503">ldif</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key129">rfc 2251</a>, <a href="../../../../index.html#key502">rfc 2849</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Pierre David &lt;pdav@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/log/log.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>log - Logging facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>log - Logging facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'log.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2001-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- log.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">log(n) 1.4 tcllib &quot;Logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>log - Procedures to log messages of libraries and applications.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">LEVELS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">log <span class="opt">?1.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::log::levels</b></a></li>
<li><a href="#2"><b class="cmd">::log::lv2longform</b> <i class="arg">level</i></a></li>
<li><a href="#3"><b class="cmd">::log::lv2color</b> <i class="arg">level</i></a></li>
<li><a href="#4"><b class="cmd">::log::lv2priority</b> <i class="arg">level</i></a></li>
<li><a href="#5"><b class="cmd">::log::lv2cmd</b> <i class="arg">level</i></a></li>







|

|

|



|
|
|
|
|
|


|




















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'log.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2001-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- log.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">log(n) 1.3 tcllib &quot;Logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>log - Procedures to log messages of libraries and applications.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">LEVELS</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8</b></li>
<li>package require <b class="pkgname">log <span class="opt">?1.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::log::levels</b></a></li>
<li><a href="#2"><b class="cmd">::log::lv2longform</b> <i class="arg">level</i></a></li>
<li><a href="#3"><b class="cmd">::log::lv2color</b> <i class="arg">level</i></a></li>
<li><a href="#4"><b class="cmd">::log::lv2priority</b> <i class="arg">level</i></a></li>
<li><a href="#5"><b class="cmd">::log::lv2cmd</b> <i class="arg">level</i></a></li>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<li><a href="#13"><b class="cmd">::log::lvChannel</b> <i class="arg">level</i> <i class="arg">chan</i></a></li>
<li><a href="#14"><b class="cmd">::log::lvChannelForall</b> <i class="arg">chan</i></a></li>
<li><a href="#15"><b class="cmd">::log::lvColor</b> <i class="arg">level</i> <i class="arg">color</i></a></li>
<li><a href="#16"><b class="cmd">::log::lvColorForall</b> <i class="arg">color</i></a></li>
<li><a href="#17"><b class="cmd">::log::log</b> <i class="arg">level</i> <i class="arg">text</i></a></li>
<li><a href="#18"><b class="cmd">::log::logarray</b> <i class="arg">level</i> <i class="arg">arrayvar</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#19"><b class="cmd">::log::loghex</b> <i class="arg">level</i> <i class="arg">text</i> <i class="arg">data</i></a></li>
<li><a href="#20"><b class="cmd">::log::logsubst</b> <i class="arg">level</i> <i class="arg">msg</i></a></li>
<li><a href="#21"><b class="cmd">::log::logMsg</b> <i class="arg">text</i></a></li>
<li><a href="#22"><b class="cmd">::log::logError</b> <i class="arg">text</i></a></li>
<li><a href="#23"><b class="cmd">::log::Puts</b> <i class="arg">level</i> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">log</b> package provides commands that allow libraries and
applications to selectively log information about their internal
operation and state.</p>







<
|
|
|







147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
163
<li><a href="#13"><b class="cmd">::log::lvChannel</b> <i class="arg">level</i> <i class="arg">chan</i></a></li>
<li><a href="#14"><b class="cmd">::log::lvChannelForall</b> <i class="arg">chan</i></a></li>
<li><a href="#15"><b class="cmd">::log::lvColor</b> <i class="arg">level</i> <i class="arg">color</i></a></li>
<li><a href="#16"><b class="cmd">::log::lvColorForall</b> <i class="arg">color</i></a></li>
<li><a href="#17"><b class="cmd">::log::log</b> <i class="arg">level</i> <i class="arg">text</i></a></li>
<li><a href="#18"><b class="cmd">::log::logarray</b> <i class="arg">level</i> <i class="arg">arrayvar</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#19"><b class="cmd">::log::loghex</b> <i class="arg">level</i> <i class="arg">text</i> <i class="arg">data</i></a></li>

<li><a href="#20"><b class="cmd">::log::logMsg</b> <i class="arg">text</i></a></li>
<li><a href="#21"><b class="cmd">::log::logError</b> <i class="arg">text</i></a></li>
<li><a href="#22"><b class="cmd">::log::Puts</b> <i class="arg">level</i> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">log</b> package provides commands that allow libraries and
applications to selectively log information about their internal
operation and state.</p>
232
233
234
235
236
237
238

239
240
241

242
243
244
245
246
247
248
249
<dd><p>Compares two levels (including unique abbreviations) with respect to
their priority. This command can be used by the -command option of
lsort. The result is one of -1, 0 or 1 or an error. A result of -1
signals that level1 is of less priority than level2. 0 signals that
both levels have the same priority. 1 signals that level1 has higher
priority than level2.</p></dd>
<dt><a name="8"><b class="cmd">::log::lvSuppress</b> <i class="arg">level</i> {<i class="arg">suppress</i> 1}</a></dt>

<dd><p>(Un)suppresses the output of messages having the specified
level. Unique abbreviations for the level are allowed here too.</p></dd>
<dt><a name="9"><b class="cmd">::log::lvSuppressLE</b> <i class="arg">level</i> {<i class="arg">suppress</i> 1}</a></dt>

<dd><p>(Un)suppresses the output of messages having the specified level or
one of lesser priority. Unique abbreviations for the level are allowed
here too.</p></dd>
<dt><a name="10"><b class="cmd">::log::lvIsSuppressed</b> <i class="arg">level</i></a></dt>
<dd><p>Asks the package whether the specified level is currently
suppressed. Unique abbreviations of level names are allowed.</p></dd>
<dt><a name="11"><b class="cmd">::log::lvCmd</b> <i class="arg">level</i> <i class="arg">cmd</i></a></dt>
<dd><p>Defines for the specified level with which command to write the







>
|


>
|







232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<dd><p>Compares two levels (including unique abbreviations) with respect to
their priority. This command can be used by the -command option of
lsort. The result is one of -1, 0 or 1 or an error. A result of -1
signals that level1 is of less priority than level2. 0 signals that
both levels have the same priority. 1 signals that level1 has higher
priority than level2.</p></dd>
<dt><a name="8"><b class="cmd">::log::lvSuppress</b> <i class="arg">level</i> {<i class="arg">suppress</i> 1}</a></dt>
<dd><p>]
(Un)suppresses the output of messages having the specified
level. Unique abbreviations for the level are allowed here too.</p></dd>
<dt><a name="9"><b class="cmd">::log::lvSuppressLE</b> <i class="arg">level</i> {<i class="arg">suppress</i> 1}</a></dt>
<dd><p>]
(Un)suppresses the output of messages having the specified level or
one of lesser priority. Unique abbreviations for the level are allowed
here too.</p></dd>
<dt><a name="10"><b class="cmd">::log::lvIsSuppressed</b> <i class="arg">level</i></a></dt>
<dd><p>Asks the package whether the specified level is currently
suppressed. Unique abbreviations of level names are allowed.</p></dd>
<dt><a name="11"><b class="cmd">::log::lvCmd</b> <i class="arg">level</i> <i class="arg">cmd</i></a></dt>
<dd><p>Defines for the specified level with which command to write the
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
variable <i class="arg">arrayvar</i>, possibly restricted to entries matching the
<i class="arg">pattern</i>. The pattern defaults to <b class="const">*</b> (i.e. all entries) if
none was specified.</p></dd>
<dt><a name="19"><b class="cmd">::log::loghex</b> <i class="arg">level</i> <i class="arg">text</i> <i class="arg">data</i></a></dt>
<dd><p>Like <b class="cmd">::log::log</b>, but assumes that <i class="arg">data</i> contains binary
data. It converts this into a mixed hex/ascii representation before
writing them to the log.</p></dd>
<dt><a name="20"><b class="cmd">::log::logsubst</b> <i class="arg">level</i> <i class="arg">msg</i></a></dt>
<dd><p>Like <b class="cmd">::log::log</b>, but <i class="arg">msg</i> may contain substitutions and variable references, which are evaluated in the caller scope first.
The purpose of this command is to avoid overhead in the non-logging case, if the log message building is expensive.
Any substitution errors raise an error in the command execution.
The following example shows an xml text representation, which is only generated in debug mode:</p>
<pre class="doctools_example">
    log::logsubst debug {XML of node $node is '[$node toXml]'}
</pre>
</dd>
<dt><a name="21"><b class="cmd">::log::logMsg</b> <i class="arg">text</i></a></dt>
<dd><p>Convenience wrapper around <b class="cmd">::log::log</b>.
Equivalent to <b class="cmd">::log::log info text</b>.</p></dd>
<dt><a name="22"><b class="cmd">::log::logError</b> <i class="arg">text</i></a></dt>
<dd><p>Convenience wrapper around <b class="cmd">::log::log</b>.
Equivalent to <b class="cmd">::log::log error text</b>.</p></dd>
<dt><a name="23"><b class="cmd">::log::Puts</b> <i class="arg">level</i> <i class="arg">text</i></a></dt>
<dd><p>The standard log command, it writes messages and their levels to
user-specified channels. Assumes that the suppression checks were done
by the caller. Expects full level names, abbreviations are
<em>not allowed</em>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LEVELS</a></h2>







<
<
<
<
<
<
<
<
<
|


|


|







297
298
299
300
301
302
303









304
305
306
307
308
309
310
311
312
313
314
315
316
317
variable <i class="arg">arrayvar</i>, possibly restricted to entries matching the
<i class="arg">pattern</i>. The pattern defaults to <b class="const">*</b> (i.e. all entries) if
none was specified.</p></dd>
<dt><a name="19"><b class="cmd">::log::loghex</b> <i class="arg">level</i> <i class="arg">text</i> <i class="arg">data</i></a></dt>
<dd><p>Like <b class="cmd">::log::log</b>, but assumes that <i class="arg">data</i> contains binary
data. It converts this into a mixed hex/ascii representation before
writing them to the log.</p></dd>









<dt><a name="20"><b class="cmd">::log::logMsg</b> <i class="arg">text</i></a></dt>
<dd><p>Convenience wrapper around <b class="cmd">::log::log</b>.
Equivalent to <b class="cmd">::log::log info text</b>.</p></dd>
<dt><a name="21"><b class="cmd">::log::logError</b> <i class="arg">text</i></a></dt>
<dd><p>Convenience wrapper around <b class="cmd">::log::log</b>.
Equivalent to <b class="cmd">::log::log error text</b>.</p></dd>
<dt><a name="22"><b class="cmd">::log::Puts</b> <i class="arg">level</i> <i class="arg">text</i></a></dt>
<dd><p>The standard log command, it writes messages and their levels to
user-specified channels. Assumes that the suppression checks were done
by the caller. Expects full level names, abbreviations are
<em>not allowed</em>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LEVELS</a></h2>
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>log</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#log">log</a>, <a href="../../../../index.html#log_level">log level</a>, <a href="../../../../index.html#message">message</a>, <a href="../../../../index.html#message_level">message level</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2001-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








335
336
337
338
339
340
341






342
343
344
345
346
347
348
349
350
351
352
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>log</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key91">log level</a>, <a href="../../../../index.html#key361">message</a>, <a href="../../../../index.html#key799">message level</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2001-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/log/logger.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>logger - Object Oriented logging facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>logger - Object Oriented logging facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'logger.man' by tcllib/doctools with format 'html'
   -->
<!-- logger.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">logger(n) 0.9.4 tcllib &quot;Object Oriented logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>logger - System to control logging of events.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'logger.man' by tcllib/doctools with format 'html'
   -->
<! -- logger.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">logger(n) 0.9.4 tcllib &quot;Object Oriented logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>logger - System to control logging of events.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<li><a href="#31"><b class="cmd">${log}::delete</b></a></li>
<li><a href="#32"><b class="cmd">${log}::trace</b> <i class="arg">command</i></a></li>
<li><a href="#33"><b class="cmd">${log}::trace</b> <b class="cmd">on</b></a></li>
<li><a href="#34"><b class="cmd">${log}::trace</b> <b class="cmd">off</b></a></li>
<li><a href="#35"><b class="cmd">${log}::trace</b> <b class="cmd">status</b> <span class="opt">?procName?</span> <span class="opt">?...?</span></a></li>
<li><a href="#36"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <i class="arg">procName</i> <span class="opt">?...?</span></a></li>
<li><a href="#37"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></li>
<li><a href="#38"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#remove">remove</a></b> <i class="arg">procName</i> <span class="opt">?...?</span></a></li>
<li><a href="#39"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#remove">remove</a></b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">logger</b> package provides a flexible system for logging messages
from different services, at priority levels, with different commands.</p>
<p>To begin using the logger package, we do the following:</p>







|
|







162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<li><a href="#31"><b class="cmd">${log}::delete</b></a></li>
<li><a href="#32"><b class="cmd">${log}::trace</b> <i class="arg">command</i></a></li>
<li><a href="#33"><b class="cmd">${log}::trace</b> <b class="cmd">on</b></a></li>
<li><a href="#34"><b class="cmd">${log}::trace</b> <b class="cmd">off</b></a></li>
<li><a href="#35"><b class="cmd">${log}::trace</b> <b class="cmd">status</b> <span class="opt">?procName?</span> <span class="opt">?...?</span></a></li>
<li><a href="#36"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <i class="arg">procName</i> <span class="opt">?...?</span></a></li>
<li><a href="#37"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></li>
<li><a href="#38"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">procName</i> <span class="opt">?...?</span></a></li>
<li><a href="#39"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">logger</b> package provides a flexible system for logging messages
from different services, at priority levels, with different commands.</p>
<p>To begin using the logger package, we do the following:</p>
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
<p>Trace logs are slightly different: instead of a plain text argument,
the argument provided to the logproc is a dictionary consisting of the
<b class="const">enter</b> or <b class="const">leave</b> keyword along with another dictionary of
details about the trace.  These include:</p>
<ul class="doctools_itemized">
<li><p><b class="const">proc</b> - Name of the procedure being traced.</p></li>
<li><p><b class="const">level</b> - The stack level for the procedure invocation
(from <b class="cmd"><a href="../../../../index.html#info">info</a></b> <b class="cmd">level</b>).</p></li>
<li><p><b class="const">script</b> - The name of the file in which the procedure is
defined, or an empty string if defined in interactive mode.</p></li>
<li><p><b class="const">caller</b> - The name of the procedure calling the procedure
being traced, or an empty string if the procedure was called from the
global scope (stack level 0).</p></li>
<li><p><b class="const">procargs</b> - A dictionary consisting of the names of arguments
to the procedure paired with values given for those arguments (<b class="const">enter</b>







|







305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<p>Trace logs are slightly different: instead of a plain text argument,
the argument provided to the logproc is a dictionary consisting of the
<b class="const">enter</b> or <b class="const">leave</b> keyword along with another dictionary of
details about the trace.  These include:</p>
<ul class="doctools_itemized">
<li><p><b class="const">proc</b> - Name of the procedure being traced.</p></li>
<li><p><b class="const">level</b> - The stack level for the procedure invocation
(from <b class="cmd"><a href="../../../../index.html#key83">info</a></b> <b class="cmd">level</b>).</p></li>
<li><p><b class="const">script</b> - The name of the file in which the procedure is
defined, or an empty string if defined in interactive mode.</p></li>
<li><p><b class="const">caller</b> - The name of the procedure calling the procedure
being traced, or an empty string if the procedure was called from the
global scope (stack level 0).</p></li>
<li><p><b class="const">procargs</b> - A dictionary consisting of the names of arguments
to the procedure paired with values given for those arguments (<b class="const">enter</b>
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
enter {proc ::bar level 2 script {} caller ::foo procargs {x 1}}
In bar
leave {proc ::bar level 2 script {} caller ::foo status ok result bar_result}
leave {proc ::foo level 1 script {} caller {} status ok result foo_result}
</pre>
</dd>
<dt><a name="33"><b class="cmd">${log}::trace</b> <b class="cmd">on</b></a></dt>
<dd><p>Turns on trace logging for procedures registered through the <b class="cmd"><a href="../../../../index.html#trace">trace</a></b>
<b class="cmd">add</b> command.  This is similar to the <b class="cmd">enable</b> command for other
logging levels, but allows trace logging to take place at any level.
The trace logging mechanism takes advantage of the execution trace feature
of Tcl 8.4 and later.  The <b class="cmd"><a href="../../../../index.html#trace">trace</a></b> <b class="cmd">on</b> command will return an
error if called from earlier versions of Tcl.</p></dd>
<dt><a name="34"><b class="cmd">${log}::trace</b> <b class="cmd">off</b></a></dt>
<dd><p>Turns off trace logging for procedures registered for trace logging
through the <b class="cmd"><a href="../../../../index.html#trace">trace</a></b> <b class="cmd">add</b> command.  This is similar to the
<b class="cmd">disable</b> command for other logging levels, but allows trace logging
to take place at any level.
Procedures are not unregistered, so logging for them can be turned back
on with the <b class="cmd"><a href="../../../../index.html#trace">trace</a></b> <b class="cmd">on</b> command.  There is no overhead imposed
by trace registration when trace logging is disabled.</p></dd>
<dt><a name="35"><b class="cmd">${log}::trace</b> <b class="cmd">status</b> <span class="opt">?procName?</span> <span class="opt">?...?</span></a></dt>
<dd><p>This command returns a list of the procedures currently registered for
trace logging, or a flag indicating whether or not a trace is registered
for one or more specified procedures.</p></dd>
<dt><a name="36"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <i class="arg">procName</i> <span class="opt">?...?</span></a></dt>
<dd></dd>
<dt><a name="37"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></dt>
<dd><p>This command registers one or more procedures for logging of entry/exit
traces.  Procedures can be specified via a list of procedure names or
namespace names (in which case all procedure within the namespace
are targeted by the operation).  By default, each name is first
interpreted as a procedure name or glob-style search pattern, and if
not found its interpreted as a namespace name.  The <i class="arg">-ns</i> option can
be used to force interpretation of all provided arguments as namespace names.
Procedures must be defined prior to registering them for tracing
through the <b class="cmd"><a href="../../../../index.html#trace">trace</a></b> <b class="cmd">add</b> command.  Any procedure or namespace
names/patterns that don't match any existing procedures will be
silently ignored.</p></dd>
<dt><a name="38"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#remove">remove</a></b> <i class="arg">procName</i> <span class="opt">?...?</span></a></dt>
<dd></dd>
<dt><a name="39"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#remove">remove</a></b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></dt>
<dd><p>This command unregisters one or more procedures so that they will no
longer have trace logging performed, with the same matching rules as
that of the <b class="cmd"><a href="../../../../index.html#trace">trace</a></b> <b class="cmd">add</b> command.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">IMPLEMENTATION</a></h2>
<p>The logger package is implemented in such a way as to optimize (for
Tcl 8.4 and newer) log procedures which are disabled.  They are
aliased to a proc which has no body, which is compiled to a no op in
bytecode.  This should make the peformance hit minimal.  If you really







|



|



|



|
















|


|

|


|







372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
enter {proc ::bar level 2 script {} caller ::foo procargs {x 1}}
In bar
leave {proc ::bar level 2 script {} caller ::foo status ok result bar_result}
leave {proc ::foo level 1 script {} caller {} status ok result foo_result}
</pre>
</dd>
<dt><a name="33"><b class="cmd">${log}::trace</b> <b class="cmd">on</b></a></dt>
<dd><p>Turns on trace logging for procedures registered through the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b>
<b class="cmd">add</b> command.  This is similar to the <b class="cmd">enable</b> command for other
logging levels, but allows trace logging to take place at any level.
The trace logging mechanism takes advantage of the execution trace feature
of Tcl 8.4 and later.  The <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> <b class="cmd">on</b> command will return an
error if called from earlier versions of Tcl.</p></dd>
<dt><a name="34"><b class="cmd">${log}::trace</b> <b class="cmd">off</b></a></dt>
<dd><p>Turns off trace logging for procedures registered for trace logging
through the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> <b class="cmd">add</b> command.  This is similar to the
<b class="cmd">disable</b> command for other logging levels, but allows trace logging
to take place at any level.
Procedures are not unregistered, so logging for them can be turned back
on with the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> <b class="cmd">on</b> command.  There is no overhead imposed
by trace registration when trace logging is disabled.</p></dd>
<dt><a name="35"><b class="cmd">${log}::trace</b> <b class="cmd">status</b> <span class="opt">?procName?</span> <span class="opt">?...?</span></a></dt>
<dd><p>This command returns a list of the procedures currently registered for
trace logging, or a flag indicating whether or not a trace is registered
for one or more specified procedures.</p></dd>
<dt><a name="36"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <i class="arg">procName</i> <span class="opt">?...?</span></a></dt>
<dd></dd>
<dt><a name="37"><b class="cmd">${log}::trace</b> <b class="cmd">add</b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></dt>
<dd><p>This command registers one or more procedures for logging of entry/exit
traces.  Procedures can be specified via a list of procedure names or
namespace names (in which case all procedure within the namespace
are targeted by the operation).  By default, each name is first
interpreted as a procedure name or glob-style search pattern, and if
not found its interpreted as a namespace name.  The <i class="arg">-ns</i> option can
be used to force interpretation of all provided arguments as namespace names.
Procedures must be defined prior to registering them for tracing
through the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> <b class="cmd">add</b> command.  Any procedure or namespace
names/patterns that don't match any existing procedures will be
silently ignored.</p></dd>
<dt><a name="38"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">procName</i> <span class="opt">?...?</span></a></dt>
<dd></dd>
<dt><a name="39"><b class="cmd">${log}::trace</b> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <span class="opt">?-ns?</span> <i class="arg">nsName</i> <span class="opt">?...?</span></a></dt>
<dd><p>This command unregisters one or more procedures so that they will no
longer have trace logging performed, with the same matching rules as
that of the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> <b class="cmd">add</b> command.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">IMPLEMENTATION</a></h2>
<p>The logger package is implemented in such a way as to optimize (for
Tcl 8.4 and newer) log procedures which are disabled.  They are
aliased to a proc which has no body, which is compiled to a no op in
bytecode.  This should make the peformance hit minimal.  If you really
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>logger</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#log">log</a>, <a href="../../../../index.html#log_level">log level</a>, <a href="../../../../index.html#logger">logger</a>, <a href="../../../../index.html#service">service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





462
463
464
465
466
467
468






469
470
471
472
473
474
475
476
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>logger</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key73">log</a>, <a href="../../../../index.html#key91">log level</a>, <a href="../../../../index.html#key89">logger</a>, <a href="../../../../index.html#key90">service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/log/loggerAppender.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>logger::appender - Object Oriented logging facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>logger::appender - Object Oriented logging facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'loggerAppender.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Aamer Akhter &amp;lt;aakhter@cisco.com&amp;gt;
   -->
<!-- logger::appender.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">logger::appender(n) 1.2 tcllib &quot;Object Oriented logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>logger::appender - Collection of predefined appenders for logger</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'loggerAppender.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;
   -->
<! -- logger::appender.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">logger::appender(n) 1.2 tcllib &quot;Object Oriented logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>logger::appender - Collection of predefined appenders for logger</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>logger</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#appender">appender</a>, <a href="../../../../index.html#logger">logger</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








163
164
165
166
167
168
169






170
171
172
173
174
175
176
177
178
179
180
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>logger</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key409">appender</a>, <a href="../../../../index.html#key89">logger</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/log/loggerUtils.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>logger::utils - Object Oriented logging facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>logger::utils - Object Oriented logging facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'loggerUtils.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Aamer Akhter &amp;lt;aakhter@cisco.com&amp;gt;
   -->
<!-- logger::utils.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">logger::utils(n) 1.3.1 tcllib &quot;Object Oriented logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>logger::utils - Utilities for logger</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">logger::utils <span class="opt">?1.3.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::logger::utils::createFormatCmd</b> <i class="arg">formatString</i></a></li>
<li><a href="#2"><b class="cmd">::logger::utils::createLogProc</b> <b class="option">-procName</b> <i class="arg">procName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::logger::utils::applyAppender</b> <b class="option">-appender</b> <i class="arg">appenderType</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#4"><b class="cmd">::logger::utils::autoApplyAppender</b> <i class="arg">command</i> <i class="arg">command-string</i> <i class="arg">log</i> <i class="arg">op</i> <i class="arg">args</i>...</a></li>
</ul>







|

|

|



|
|
|
|
|
|


|


















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'loggerUtils.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;
   -->
<! -- logger::utils.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">logger::utils(n) 1.3 tcllib &quot;Object Oriented logging facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>logger::utils - Utilities for logger</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">logger::utils <span class="opt">?1.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::logger::utils::createFormatCmd</b> <i class="arg">formatString</i></a></li>
<li><a href="#2"><b class="cmd">::logger::utils::createLogProc</b> <b class="option">-procName</b> <i class="arg">procName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::logger::utils::applyAppender</b> <b class="option">-appender</b> <i class="arg">appenderType</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#4"><b class="cmd">::logger::utils::autoApplyAppender</b> <i class="arg">command</i> <i class="arg">command-string</i> <i class="arg">log</i> <i class="arg">op</i> <i class="arg">args</i>...</a></li>
</ul>
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>logger</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#appender">appender</a>, <a href="../../../../index.html#logger">logger</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








232
233
234
235
236
237
238






239
240
241
242
243
244
245
246
247
248
249
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>logger</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key409">appender</a>, <a href="../../../../index.html#key89">logger</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Aamer Akhter &lt;aakhter@cisco.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/map/map_geocode_nominatim.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>map::geocode::nominatim - Mapping utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>map::geocode::nominatim - Mapping utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'map_geocode_nominatim.man' by tcllib/doctools with format 'html'
   -->
<!-- map::geocode::nominatim.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::geocode::nominatim(n) 0.1 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::geocode::nominatim - Resolving geographical names with a Nominatim service</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'map_geocode_nominatim.man' by tcllib/doctools with format 'html'
   -->
<! -- map::geocode::nominatim.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::geocode::nominatim(n) 0.1 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::geocode::nominatim - Resolving geographical names with a Nominatim service</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<li><a href="#3"><b class="cmd">$cmdprefix</b> <i class="arg">errorstring</i></a></li>
<li><a href="#4"><i class="arg">requestor</i> <b class="method">search</b> <i class="arg">query</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for accessing geocoding services which implement
the <i class="term"><a href="../../../../index.html#nominatim">Nominatim</a></i> interface (see <span class="sectref"><a href="#section3">References</a></span>)</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::map::geocode::nominatim</b> <i class="arg">requestor</i> <span class="opt">?<b class="option">-baseurl</b> <i class="arg">url</i>?</span> <span class="opt">?<b class="option">-callback</b> <i class="arg">callback</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">error callback</i>?</span></a></dt>
<dd><p>Creates a geocoding request object <i class="arg">requestor</i>, which will send its requests to
the <i class="term"><a href="../../../../index.html#nominatim">Nominatim</a></i> server.</p>
<p>The result of the command is <i class="arg">name</i>.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Options</a></h3>
<dl class="doctools_options">
<dt><b class="option">-baseurl</b> <i class="arg">url</i></dt>
<dd><p>The base URL of the <i class="term"><a href="../../../../index.html#nominatim">Nominatim</a></i> service. Default value is <i class="term">OpenStreetMap's</i> service at
<a href="http://nominatim.openstreetmap.org/search">http://nominatim.openstreetmap.org/search</a> A possible free alternative is at
<a href="http://open.mapquestapi.com//nominatim/v1/search">http://open.mapquestapi.com//nominatim/v1/search</a></p></dd>
<dt><b class="option">-callback</b> <i class="arg">cmdprefix</i></dt>
<dd><p>A command prefix to be invoked when search result become available.
The default setting, active when nothing was specified on object creation, is to print
the <i class="arg">result</i> (see below) to <i class="term"><a href="../../../../index.html#stdout">stdout</a></i>. The result of the command prefix is
ignored. Errors thrown by the command prefix are caught and cause the invokation of
the error callback (see option <b class="option">-error</b> below), with the error message as argument.</p>
<p>The signature of the command prefix is:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">$cmdprefix</b> <i class="arg">result</i></a></dt>
<dd><p>The <i class="arg">result</i> is a list of dictionaries, containing one item per hit.
Each dictionary will have the following entries:</p>







|





|





|





|







141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<li><a href="#3"><b class="cmd">$cmdprefix</b> <i class="arg">errorstring</i></a></li>
<li><a href="#4"><i class="arg">requestor</i> <b class="method">search</b> <i class="arg">query</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a class for accessing geocoding services which implement
the <i class="term"><a href="../../../../index.html#key583">Nominatim</a></i> interface (see <span class="sectref"><a href="#section3">References</a></span>)</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::map::geocode::nominatim</b> <i class="arg">requestor</i> <span class="opt">?<b class="option">-baseurl</b> <i class="arg">url</i>?</span> <span class="opt">?<b class="option">-callback</b> <i class="arg">callback</i>?</span> <span class="opt">?<b class="option">-error</b> <i class="arg">error callback</i>?</span></a></dt>
<dd><p>Creates a geocoding request object <i class="arg">requestor</i>, which will send its requests to
the <i class="term"><a href="../../../../index.html#key583">Nominatim</a></i> server.</p>
<p>The result of the command is <i class="arg">name</i>.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Options</a></h3>
<dl class="doctools_options">
<dt><b class="option">-baseurl</b> <i class="arg">url</i></dt>
<dd><p>The base URL of the <i class="term"><a href="../../../../index.html#key583">Nominatim</a></i> service. Default value is <i class="term">OpenStreetMap's</i> service at
<a href="http://nominatim.openstreetmap.org/search">http://nominatim.openstreetmap.org/search</a> A possible free alternative is at
<a href="http://open.mapquestapi.com//nominatim/v1/search">http://open.mapquestapi.com//nominatim/v1/search</a></p></dd>
<dt><b class="option">-callback</b> <i class="arg">cmdprefix</i></dt>
<dd><p>A command prefix to be invoked when search result become available.
The default setting, active when nothing was specified on object creation, is to print
the <i class="arg">result</i> (see below) to <i class="term"><a href="../../../../index.html#key829">stdout</a></i>. The result of the command prefix is
ignored. Errors thrown by the command prefix are caught and cause the invokation of
the error callback (see option <b class="option">-error</b> below), with the error message as argument.</p>
<p>The signature of the command prefix is:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">$cmdprefix</b> <i class="arg">result</i></a></dt>
<dd><p>The <i class="arg">result</i> is a list of dictionaries, containing one item per hit.
Each dictionary will have the following entries:</p>
217
218
219
220
221
222
223
224
225
226
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Nominatim">http://wiki.openstreetmap.org/wiki/Nominatim</a></p></li>
<li><p><a href="http://open.mapquestapi.com/nominatim/">http://open.mapquestapi.com/nominatim/</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#geocoding">geocoding</a>, <a href="../../../../index.html#http">http</a>, <a href="../../../../index.html#location">location</a>, <a href="../../../../index.html#map">map</a>, <a href="../../../../index.html#nominatim">nominatim</a>, <a href="../../../../index.html#server">server</a>, <a href="../../../../index.html#url">url</a></p>
</div>
</div></body></html>







|


218
219
220
221
222
223
224
225
226
227
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Nominatim">http://wiki.openstreetmap.org/wiki/Nominatim</a></p></li>
<li><p><a href="http://open.mapquestapi.com/nominatim/">http://open.mapquestapi.com/nominatim/</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key584">geocoding</a>, <a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key200">location</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key583">nominatim</a>, <a href="../../../../index.html#key65">server</a>, <a href="../../../../index.html#key246">url</a></p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/map/map_slippy.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>map::slippy - Mapping utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>map::slippy - Mapping utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'map_slippy.man' by tcllib/doctools with format 'html'
   -->
<!-- map::slippy.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::slippy(n) 0.5 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::slippy - Common code for slippy based map packages</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'map_slippy.man' by tcllib/doctools with format 'html'
   -->
<! -- map::slippy.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::slippy(n) 0.5 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::slippy - Common code for slippy based map packages</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Coordinate systems</a></h2>
<p>The commands of this package operate on three distinct coordinate
systems, which are explained below.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Geographic</a></h3>
<p><i class="term">Geographic</i>al coordinates are represented by <i class="term">Latitude</i> and
<i class="term"><a href="../../../../index.html#longitude">Longitude</a></i>, each of which is measured in degrees, as they are
essentially angles.</p>
<p><b class="const">Zero</b> longitude is the <i class="term">Greenwich meridian</i>, with
positive values going <i class="term">east</i>, and negative values going
<i class="term">west</i>, for a total range of +/- 180 degrees. Note that +180 and
-180 longitude are the same <i class="term">meridian</i>, opposite to greenwich.</p>
<p><b class="const">zero</b> latitude the <i class="term">Equator</i>, with positive values
going <i class="term">north</i> and negative values going <i class="term">south</i>. While the







|







227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Coordinate systems</a></h2>
<p>The commands of this package operate on three distinct coordinate
systems, which are explained below.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Geographic</a></h3>
<p><i class="term">Geographic</i>al coordinates are represented by <i class="term">Latitude</i> and
<i class="term"><a href="../../../../index.html#key203">Longitude</a></i>, each of which is measured in degrees, as they are
essentially angles.</p>
<p><b class="const">Zero</b> longitude is the <i class="term">Greenwich meridian</i>, with
positive values going <i class="term">east</i>, and negative values going
<i class="term">west</i>, for a total range of +/- 180 degrees. Note that +180 and
-180 longitude are the same <i class="term">meridian</i>, opposite to greenwich.</p>
<p><b class="const">zero</b> latitude the <i class="term">Equator</i>, with positive values
going <i class="term">north</i> and negative values going <i class="term">south</i>. While the
275
276
277
278
279
280
281
282
283
284
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Main_Page">http://wiki.openstreetmap.org/wiki/Main_Page</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#geodesy">geodesy</a>, <a href="../../../../index.html#geography">geography</a>, <a href="../../../../index.html#latitute">latitute</a>, <a href="../../../../index.html#location">location</a>, <a href="../../../../index.html#longitude">longitude</a>, <a href="../../../../index.html#map">map</a>, <a href="../../../../index.html#slippy">slippy</a>, <a href="../../../../index.html#zoom">zoom</a></p>
</div>
</div></body></html>







|


276
277
278
279
280
281
282
283
284
285
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Main_Page">http://wiki.openstreetmap.org/wiki/Main_Page</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key197">geodesy</a>, <a href="../../../../index.html#key202">geography</a>, <a href="../../../../index.html#key196">latitute</a>, <a href="../../../../index.html#key200">location</a>, <a href="../../../../index.html#key203">longitude</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key199">slippy</a>, <a href="../../../../index.html#key198">zoom</a></p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/map/map_slippy_cache.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>map::slippy::cache - Mapping utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>map::slippy::cache - Mapping utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'map_slippy_cache.man' by tcllib/doctools with format 'html'
   -->
<!-- map::slippy::cache.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::slippy::cache(n) 0.2 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::slippy::cache - Management of a tile cache in the local filesystem</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'map_slippy_cache.man' by tcllib/doctools with format 'html'
   -->
<! -- map::slippy::cache.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::slippy::cache(n) 0.2 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::slippy::cache - Management of a tile cache in the local filesystem</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
192
193
194
195
196
197
198
199
200
201
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Main_Page">http://wiki.openstreetmap.org/wiki/Main_Page</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cache">cache</a>, <a href="../../../../index.html#filesystem">filesystem</a>, <a href="../../../../index.html#location">location</a>, <a href="../../../../index.html#map">map</a>, <a href="../../../../index.html#slippy">slippy</a>, <a href="../../../../index.html#tile">tile</a>, <a href="../../../../index.html#zoom">zoom</a></p>
</div>
</div></body></html>







|


193
194
195
196
197
198
199
200
201
202
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Main_Page">http://wiki.openstreetmap.org/wiki/Main_Page</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key384">cache</a>, <a href="../../../../index.html#key385">filesystem</a>, <a href="../../../../index.html#key200">location</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key199">slippy</a>, <a href="../../../../index.html#key386">tile</a>, <a href="../../../../index.html#key198">zoom</a></p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/map/map_slippy_fetcher.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>map::slippy::fetcher - Mapping utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>map::slippy::fetcher - Mapping utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'map_slippy_fetcher.man' by tcllib/doctools with format 'html'
   -->
<!-- map::slippy::fetcher.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::slippy::fetcher(n) 0.4 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::slippy::fetcher - Accessing a server providing tiles for slippy-based maps</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'map_slippy_fetcher.man' by tcllib/doctools with format 'html'
   -->
<! -- map::slippy::fetcher.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">map::slippy::fetcher(n) 0.4 tcllib &quot;Mapping utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>map::slippy::fetcher - Accessing a server providing tiles for slippy-based maps</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
181
182
183
184
185
186
187
188
189
190
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Main_Page">http://wiki.openstreetmap.org/wiki/Main_Page</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#http">http</a>, <a href="../../../../index.html#location">location</a>, <a href="../../../../index.html#map">map</a>, <a href="../../../../index.html#server">server</a>, <a href="../../../../index.html#slippy">slippy</a>, <a href="../../../../index.html#tile">tile</a>, <a href="../../../../index.html#url">url</a>, <a href="../../../../index.html#zoom">zoom</a></p>
</div>
</div></body></html>







|


182
183
184
185
186
187
188
189
190
191
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://wiki.openstreetmap.org/wiki/Main_Page">http://wiki.openstreetmap.org/wiki/Main_Page</a></p></li>
</ol>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key200">location</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key65">server</a>, <a href="../../../../index.html#key199">slippy</a>, <a href="../../../../index.html#key386">tile</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key198">zoom</a></p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/mapproj/mapproj.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>mapproj - Tcl Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>mapproj - Tcl Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'mapproj.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Kevin B. Kenny &amp;lt;kennykb@acm.org&amp;gt;
   -->
<!-- mapproj.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">mapproj(n) 0.1 tcllib &quot;Tcl Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>mapproj - Map projection routines</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'mapproj.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Kevin B. Kenny &lt;kennykb@acm.org&gt;
   -->
<! -- mapproj.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">mapproj(n) 0.1 tcllib &quot;Tcl Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>mapproj - Map projection routines</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
443
444
445
446
447
448
449
450
451
452
453
454
455
map on which all great circles (the shortest distance between
two points on the Earth's surface) are rendered as straight lines.
While this projection is useful for navigational planning, it
has extreme distortions of shape and area, and can display
only a limited area of the Earth (substantially less than a hemisphere).</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#geodesy">geodesy</a>, <a href="../../../../index.html#map">map</a>, <a href="../../../../index.html#projection">projection</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Kevin B. Kenny &lt;kennykb@acm.org&gt;</p>
</div>
</div></body></html>







|





444
445
446
447
448
449
450
451
452
453
454
455
456
map on which all great circles (the shortest distance between
two points on the Earth's surface) are rendered as straight lines.
While this projection is useful for navigational planning, it
has extreme distortions of shape and area, and can display
only a limited area of the Earth (substantially less than a hemisphere).</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key197">geodesy</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key643">projection</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Kevin B. Kenny &lt;kennykb@acm.org&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/markdown/markdown.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>markdown - Markdown to HTML Converter</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>markdown - Markdown to HTML Converter</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'markdown.man' by tcllib/doctools with format 'html'
   -->
<!-- markdown.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">markdown(n) 1.2 tcllib &quot;Markdown to HTML Converter&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>markdown - Converts Markdown text to HTML</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">Markdown 1.2</b></li>
<li>package require <b class="pkgname">textutil <span class="opt">?0.8?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::Markdown::convert</b> <i class="arg">markdown</i></a></li>
<li><a href="#2"><b class="cmd">::Markdown::register</b> <i class="arg">langspec</i> <i class="arg">converter</i></a></li>
<li><a href="#3"><b class="cmd">::Markdown::get_lang_counter</b></a></li>
<li><a href="#4"><b class="cmd">::Markdown::reset_lang_counter</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">Markdown</b> provides a command to convert
Markdown annotated text into HMTL.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::Markdown::convert</b> <i class="arg">markdown</i></a></dt>
<dd><p>This command takes in a block of Markdown text, and returns a block
of HTML.</p>
<p>The converter supports two types of syntax highlighting for
fenced code blocks: highlighting via a registered converter
(see <b class="cmd">::Markdown::register</b>), or pure JavaScript highlighting,
e.g. via &quot;highlight.js&quot;, where the language specifier used in the
markup is set as CSS class of the &quot;code&quot; element in the returned markup.</p></dd>
<dt><a name="2"><b class="cmd">::Markdown::register</b> <i class="arg">langspec</i> <i class="arg">converter</i></a></dt>
<dd><p>Register a language specific converter for prettifying a code block
(e.g. syntax highlighting).  Markdown supports fenced code blocks with
an optional language specifier (e.g. &quot;tcl&quot;). When the markdown parser
processes such a code block and a converter for the specified langspec
is registered, the converter is called with the raw code block as
argument. The converter is supposed to return the markup of the code
block as result. The specified converter can be an arbitrary Tcl
command, the raw text block is added as last argument upon invocation.</p></dd>
<dt><a name="3"><b class="cmd">::Markdown::get_lang_counter</b></a></dt>
<dd><p>Return a dict of language specifier and number of occurrences in
fenced code blocks. This function can be used e.g. to detect, whether
some CSS or JavaScript headers should be included for rendering
without the need of postprocessing the rendered result.</p></dd>
<dt><a name="4"><b class="cmd">::Markdown::reset_lang_counter</b></a></dt>
<dd><p>Reset the language counters.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







|

|



|
|
|
|
|
|


|
















<




<
<
<









|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









<
<
<
<
<
<





88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

126
127
128
129



130
131
132
133
134
135
136
137
138
139





















140
141
142
143
144
145
146
147
148






149
150
151
152
153
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'markdown.man' by tcllib/doctools with format 'html'
   -->
<! -- markdown.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">markdown(n) 1.0 tcllib &quot;Markdown to HTML Converter&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>markdown - Converts Markdown text to HTML</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>

<li>package require <b class="pkgname">textutil <span class="opt">?0.8?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::Markdown::convert</b> <i class="arg">markdown</i></a></li>



</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">Markdown</b> provides a command to convert
Markdown annotated text into HMTL.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::Markdown::convert</b> <i class="arg">markdown</i></a></dt>
<dd><p>This command takes in a block of Markdown text, and returns a block
of HTML.</p></dd>





















</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/bigfloat.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>math::bigfloat - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>math::bigfloat - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bigfloat.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004-2008, by Stephane Arnold &amp;lt;stephanearnold at yahoo dot fr&amp;gt;
   -->
<!-- math::bigfloat.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::bigfloat(n) 2.0.3 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::bigfloat - Arbitrary precision floating-point numbers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bigfloat.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004-2008, by Stephane Arnold &lt;stephanearnold at yahoo dot fr&gt;
   -->
<! -- math::bigfloat.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::bigfloat(n) 2.0.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::bigfloat - Arbitrary precision floating-point numbers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">math::bigfloat <span class="opt">?2.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">fromstr</b> <i class="arg">number</i> <span class="opt">?<i class="arg">trailingZeros</i>?</span></a></li>
<li><a href="#2"><b class="cmd">tostr</b> <span class="opt">?<b class="option">-nosci</b>?</span> <i class="arg">number</i></a></li>
<li><a href="#3"><b class="cmd">fromdouble</b> <i class="arg">double</i> <span class="opt">?<i class="arg">decimals</i>?</span></a></li>
<li><a href="#4"><b class="cmd">todouble</b> <i class="arg">number</i></a></li>
<li><a href="#5"><b class="cmd">isInt</b> <i class="arg">number</i></a></li>
<li><a href="#6"><b class="cmd">isFloat</b> <i class="arg">number</i></a></li>
<li><a href="#7"><b class="cmd">int2float</b> <i class="arg">integer</i> <span class="opt">?<i class="arg">decimals</i>?</span></a></li>
<li><a href="#8"><b class="cmd">add</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#9"><b class="cmd">sub</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#10"><b class="cmd">mul</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#11"><b class="cmd">div</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#12"><b class="cmd">mod</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#13"><b class="cmd">abs</b> <i class="arg">x</i></a></li>
<li><a href="#14"><b class="cmd">opp</b> <i class="arg">x</i></a></li>
<li><a href="#15"><b class="cmd">pow</b> <i class="arg">x</i> <i class="arg">n</i></a></li>
<li><a href="#16"><b class="cmd">iszero</b> <i class="arg">x</i></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#equal">equal</a></b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#18"><b class="cmd">compare</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#19"><b class="cmd">sqrt</b> <i class="arg">x</i></a></li>
<li><a href="#20"><b class="cmd"><a href="../log/log.html">log</a></b> <i class="arg">x</i></a></li>
<li><a href="#21"><b class="cmd">exp</b> <i class="arg">x</i></a></li>
<li><a href="#22"><b class="cmd">cos</b> <i class="arg">x</i></a></li>
<li><a href="#23"><b class="cmd">sin</b> <i class="arg">x</i></a></li>
<li><a href="#24"><b class="cmd">tan</b> <i class="arg">x</i></a></li>
<li><a href="#25"><b class="cmd">cotan</b> <i class="arg">x</i></a></li>
<li><a href="#26"><b class="cmd">acos</b> <i class="arg">x</i></a></li>
<li><a href="#27"><b class="cmd">asin</b> <i class="arg">x</i></a></li>
<li><a href="#28"><b class="cmd">atan</b> <i class="arg">x</i></a></li>
<li><a href="#29"><b class="cmd">cosh</b> <i class="arg">x</i></a></li>
<li><a href="#30"><b class="cmd">sinh</b> <i class="arg">x</i></a></li>
<li><a href="#31"><b class="cmd">tanh</b> <i class="arg">x</i></a></li>
<li><a href="#32"><b class="cmd"><a href="../../../../index.html#pi">pi</a></b> <i class="arg">n</i></a></li>
<li><a href="#33"><b class="cmd">rad2deg</b> <i class="arg">radians</i></a></li>
<li><a href="#34"><b class="cmd">deg2rad</b> <i class="arg">degrees</i></a></li>
<li><a href="#35"><b class="cmd">round</b> <i class="arg">x</i></a></li>
<li><a href="#36"><b class="cmd">ceil</b> <i class="arg">x</i></a></li>
<li><a href="#37"><b class="cmd">floor</b> <i class="arg">x</i></a></li>
</ul>
</div>







|


















|














|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">math::bigfloat <span class="opt">?2.0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">fromstr</b> <i class="arg">number</i> <span class="opt">?<i class="arg">trailingZeros</i>?</span></a></li>
<li><a href="#2"><b class="cmd">tostr</b> <span class="opt">?<b class="option">-nosci</b>?</span> <i class="arg">number</i></a></li>
<li><a href="#3"><b class="cmd">fromdouble</b> <i class="arg">double</i> <span class="opt">?<i class="arg">decimals</i>?</span></a></li>
<li><a href="#4"><b class="cmd">todouble</b> <i class="arg">number</i></a></li>
<li><a href="#5"><b class="cmd">isInt</b> <i class="arg">number</i></a></li>
<li><a href="#6"><b class="cmd">isFloat</b> <i class="arg">number</i></a></li>
<li><a href="#7"><b class="cmd">int2float</b> <i class="arg">integer</i> <span class="opt">?<i class="arg">decimals</i>?</span></a></li>
<li><a href="#8"><b class="cmd">add</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#9"><b class="cmd">sub</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#10"><b class="cmd">mul</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#11"><b class="cmd">div</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#12"><b class="cmd">mod</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#13"><b class="cmd">abs</b> <i class="arg">x</i></a></li>
<li><a href="#14"><b class="cmd">opp</b> <i class="arg">x</i></a></li>
<li><a href="#15"><b class="cmd">pow</b> <i class="arg">x</i> <i class="arg">n</i></a></li>
<li><a href="#16"><b class="cmd">iszero</b> <i class="arg">x</i></a></li>
<li><a href="#17"><b class="cmd"><a href="../../../../index.html#key560">equal</a></b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#18"><b class="cmd">compare</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#19"><b class="cmd">sqrt</b> <i class="arg">x</i></a></li>
<li><a href="#20"><b class="cmd"><a href="../log/log.html">log</a></b> <i class="arg">x</i></a></li>
<li><a href="#21"><b class="cmd">exp</b> <i class="arg">x</i></a></li>
<li><a href="#22"><b class="cmd">cos</b> <i class="arg">x</i></a></li>
<li><a href="#23"><b class="cmd">sin</b> <i class="arg">x</i></a></li>
<li><a href="#24"><b class="cmd">tan</b> <i class="arg">x</i></a></li>
<li><a href="#25"><b class="cmd">cotan</b> <i class="arg">x</i></a></li>
<li><a href="#26"><b class="cmd">acos</b> <i class="arg">x</i></a></li>
<li><a href="#27"><b class="cmd">asin</b> <i class="arg">x</i></a></li>
<li><a href="#28"><b class="cmd">atan</b> <i class="arg">x</i></a></li>
<li><a href="#29"><b class="cmd">cosh</b> <i class="arg">x</i></a></li>
<li><a href="#30"><b class="cmd">sinh</b> <i class="arg">x</i></a></li>
<li><a href="#31"><b class="cmd">tanh</b> <i class="arg">x</i></a></li>
<li><a href="#32"><b class="cmd"><a href="../../../../index.html#key806">pi</a></b> <i class="arg">n</i></a></li>
<li><a href="#33"><b class="cmd">rad2deg</b> <i class="arg">radians</i></a></li>
<li><a href="#34"><b class="cmd">deg2rad</b> <i class="arg">degrees</i></a></li>
<li><a href="#35"><b class="cmd">round</b> <i class="arg">x</i></a></li>
<li><a href="#36"><b class="cmd">ceil</b> <i class="arg">x</i></a></li>
<li><a href="#37"><b class="cmd">floor</b> <i class="arg">x</i></a></li>
</ul>
</div>
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
tostr  $a ; # 0.e-2
iszero $a ; # false
set a [fromstr 0.001] ; # uncertainty interval : 0.000, 0.002
tostr  $a ; # 0.e-2
iszero $a ; # true
</pre>
</dd>
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#equal">equal</a></b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Returns 1 if <em>x</em> and <em>y</em> are equal, 0 elsewhere.</p></dd>
<dt><a name="18"><b class="cmd">compare</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Returns 0 if both BigFloat arguments are equal,
1 if <em>x</em> is greater than <em>y</em>,
and -1 if <em>x</em> is lower than <em>y</em>.
You would not be able to compare an integer to a BigFloat :
the operands should be both BigFloats, or both integers.</p></dd>







|







333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
tostr  $a ; # 0.e-2
iszero $a ; # false
set a [fromstr 0.001] ; # uncertainty interval : 0.000, 0.002
tostr  $a ; # 0.e-2
iszero $a ; # true
</pre>
</dd>
<dt><a name="17"><b class="cmd"><a href="../../../../index.html#key560">equal</a></b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Returns 1 if <em>x</em> and <em>y</em> are equal, 0 elsewhere.</p></dd>
<dt><a name="18"><b class="cmd">compare</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Returns 0 if both BigFloat arguments are equal,
1 if <em>x</em> is greater than <em>y</em>,
and -1 if <em>x</em> is lower than <em>y</em>.
You would not be able to compare an integer to a BigFloat :
the operands should be both BigFloats, or both integers.</p></dd>
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<dt><a name="30"><b class="cmd">sinh</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="31"><b class="cmd">tanh</b> <i class="arg">x</i></a></dt>
<dd><p>The above functions return, respectively, the following :
square root, logarithm, exponential, cosine, sine,
tangent, cotangent, arc cosine, arc sine, arc tangent, hyperbolic
cosine, hyperbolic sine, hyperbolic tangent, of a BigFloat named <em>x</em>.</p></dd>
<dt><a name="32"><b class="cmd"><a href="../../../../index.html#pi">pi</a></b> <i class="arg">n</i></a></dt>
<dd><p>Returns a BigFloat representing the Pi constant with <em>n</em> digits after the dot.
<em>n</em> is a positive integer.</p></dd>
<dt><a name="33"><b class="cmd">rad2deg</b> <i class="arg">radians</i></a></dt>
<dd></dd>
<dt><a name="34"><b class="cmd">deg2rad</b> <i class="arg">degrees</i></a></dt>
<dd><p><i class="arg">radians</i> - angle expressed in radians (BigFloat)</p>
<p><i class="arg">degrees</i> - angle expressed in degrees (BigFloat)</p>







|







374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<dt><a name="30"><b class="cmd">sinh</b> <i class="arg">x</i></a></dt>
<dd></dd>
<dt><a name="31"><b class="cmd">tanh</b> <i class="arg">x</i></a></dt>
<dd><p>The above functions return, respectively, the following :
square root, logarithm, exponential, cosine, sine,
tangent, cotangent, arc cosine, arc sine, arc tangent, hyperbolic
cosine, hyperbolic sine, hyperbolic tangent, of a BigFloat named <em>x</em>.</p></dd>
<dt><a name="32"><b class="cmd"><a href="../../../../index.html#key806">pi</a></b> <i class="arg">n</i></a></dt>
<dd><p>Returns a BigFloat representing the Pi constant with <em>n</em> digits after the dot.
<em>n</em> is a positive integer.</p></dd>
<dt><a name="33"><b class="cmd">rad2deg</b> <i class="arg">radians</i></a></dt>
<dd></dd>
<dt><a name="34"><b class="cmd">deg2rad</b> <i class="arg">degrees</i></a></dt>
<dd><p><i class="arg">radians</i> - angle expressed in radians (BigFloat)</p>
<p><i class="arg">degrees</i> - angle expressed in degrees (BigFloat)</p>
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
<div id="section11" class="doctools_section"><h2><a name="section11">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: bignum :: float</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#computations">computations</a>, <a href="../../../../index.html#floating_point">floating-point</a>, <a href="../../../../index.html#interval">interval</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#multiprecision">multiprecision</a>, <a href="../../../../index.html#tcl">tcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008, by Stephane Arnold &lt;stephanearnold at yahoo dot fr&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








561
562
563
564
565
566
567






568
569
570
571
572
573
574
575
576
577
578
<div id="section11" class="doctools_section"><h2><a name="section11">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: bignum :: float</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key751">computations</a>, <a href="../../../../index.html#key393">floating-point</a>, <a href="../../../../index.html#key750">interval</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key289">multiprecision</a>, <a href="../../../../index.html#key288">tcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008, by Stephane Arnold &lt;stephanearnold at yahoo dot fr&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/bignum.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::bignum - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::bignum - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'bignum.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Salvatore Sanfilippo &amp;lt;antirez at invece dot org&amp;gt;   -- Copyright &amp;copy; 2004 Arjen Markus &amp;lt;arjenmarkus at users dot sourceforge dot net&amp;gt;
   -->
<!-- math::bignum.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::bignum(n) 3.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::bignum - Arbitrary precision integer numbers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'bignum.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Salvatore Sanfilippo &lt;antirez at invece dot org&gt;   -- Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus at users dot sourceforge dot net&gt;
   -->
<! -- math::bignum.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::bignum(n) 3.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::bignum - Arbitrary precision integer numbers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: bignum</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bignums">bignums</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#multiprecision">multiprecision</a>, <a href="../../../../index.html#tcl">tcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Salvatore Sanfilippo &lt;antirez at invece dot org&gt;<br>
Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus at users dot sourceforge dot net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|









334
335
336
337
338
339
340






341
342
343
344
345
346
347
348
349
350
351
352
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: bignum</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key287">bignums</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key289">multiprecision</a>, <a href="../../../../index.html#key288">tcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Salvatore Sanfilippo &lt;antirez at invece dot org&gt;<br>
Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus at users dot sourceforge dot net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/calculus.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::calculus - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::calculus - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'calculus.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002,2003,2004 Arjen Markus
   -->
<!-- math::calculus.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::calculus(n) 0.8.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::calculus - Integration and ordinary differential equations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'calculus.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002,2003,2004 Arjen Markus
   -->
<! -- math::calculus.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::calculus(n) 0.8.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::calculus - Integration and ordinary differential equations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">math::calculus 0.8.2</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::calculus::integral</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">nosteps</i> <i class="arg">func</i></a></li>
<li><a href="#2"><b class="cmd">::math::calculus::integralExpr</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">nosteps</i> <i class="arg">expression</i></a></li>
<li><a href="#3"><b class="cmd">::math::calculus::integral2D</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">func</i></a></li>
<li><a href="#4"><b class="cmd">::math::calculus::integral2D_accurate</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">func</i></a></li>
<li><a href="#5"><b class="cmd">::math::calculus::integral3D</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">zinterval</i> <i class="arg">func</i></a></li>







|







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">math::calculus 0.8.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::calculus::integral</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">nosteps</i> <i class="arg">func</i></a></li>
<li><a href="#2"><b class="cmd">::math::calculus::integralExpr</b> <i class="arg">begin</i> <i class="arg">end</i> <i class="arg">nosteps</i> <i class="arg">expression</i></a></li>
<li><a href="#3"><b class="cmd">::math::calculus::integral2D</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">func</i></a></li>
<li><a href="#4"><b class="cmd">::math::calculus::integral2D_accurate</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">func</i></a></li>
<li><a href="#5"><b class="cmd">::math::calculus::integral3D</b> <i class="arg">xinterval</i> <i class="arg">yinterval</i> <i class="arg">zinterval</i> <i class="arg">func</i></a></li>
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: calculus</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>romberg</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#calculus">calculus</a>, <a href="../../../../index.html#differential_equations">differential equations</a>, <a href="../../../../index.html#integration">integration</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#roots">roots</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002,2003,2004 Arjen Markus</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








487
488
489
490
491
492
493






494
495
496
497
498
499
500
501
502
503
504
505
506
507
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: calculus</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>romberg</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key784">calculus</a>, <a href="../../../../index.html#key785">differential equations</a>, <a href="../../../../index.html#key783">integration</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key786">roots</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002,2003,2004 Arjen Markus</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/math/changepoint.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html><html><head>
<title>math::changepoint - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'changepoint.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2020 by Arjen Markus
   -->
<!-- math::changepoint.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::changepoint(n) 0.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::changepoint - Change point detection methods</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::statistics</b></li>
<li>package require <b class="pkgname">math::changepoint <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::changepoint::cusum-detect</b> <i class="arg">data</i> <span class="opt">?args?</span></a></li>
<li><a href="#2"><b class="cmd">::math::changepoint::cusum-online</b> <span class="opt">?args?</span></a></li>
<li><a href="#3"><b class="cmd">$cusumObj</b> examine <i class="arg">value</i></a></li>
<li><a href="#4"><b class="cmd">$cusumObj</b> reset</a></li>
<li><a href="#5"><b class="cmd">::math::changepoint::binary-segmentation</b> <i class="arg">data</i> <span class="opt">?args?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">math::changepoint</b> package implements a number of well-known methods
to determine if a series of data contains a shift in the mean or not. Note that
these methods only indicate if a shift in the mean is probably. Due to the stochastic
nature of the data that will be analysed, false positives are possible.
The CUSUM method is implemented in both an &quot;offline&quot; and an &quot;online&quot; version, so that
it can be used either for a complete data series or for detecting changes in data that
come in one by one. The implementation has been based on these websites mostly:</p>
<ul class="doctools_itemized">
<li><p><a href="https://www.itl.nist.gov/div898/handbook/pmc/section3/pmc323.htm">https://www.itl.nist.gov/div898/handbook/pmc/section3/pmc323.htm</a></p></li>
<li><p><a href="https://en.wikipedia.org/wiki/CUSUM">https://en.wikipedia.org/wiki/CUSUM</a></p></li>
</ul>
<p>Basically, the deviation of the data from a given target value is accumulated and when
the total deviation becomes too large, a change point is reported.
A second method, binary segmentation, is implemented only as an &quot;offline&quot; method, as it
needs to examine the data series as a whole. In the variant contained here the following
ideas have been used:</p>
<ul class="doctools_itemized">
<li><p>The segments in which the data series may be separated shold not be too short, otherwise
the ultimate result could be segments of only one data point long. So a minimum length is
used.</p></li>
<li><p>To make the segmentation worthwhile there should be a minimum gain in reducing the cost
function (the sum of the squared deviations from the mean for each segment).</p></li>
</ul>
<p>This may not be in agreement with the descriptions of the method found in various
publications, but it is simple to understand and intuitive.
One publication that provides more information on the method in general is
&quot;Selective review of offline change point detection methods&quot; by Truong et al. <a href="https://arxiv.org/abs/1801.00718">https://arxiv.org/abs/1801.00718</a>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::changepoint::cusum-detect</b> <i class="arg">data</i> <span class="opt">?args?</span></a></dt>
<dd><p>Examine a given data series and return the location of the first change (if any)</p>
<dl class="doctools_arguments">
<dt>double <i class="arg">data</i></dt>
<dd><p>Series of data to be examined</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>Optional list of key-value pairs:</p>
<dl class="doctools_definitions">
<dt><b class="option">-target</b> <i class="arg">value</i></dt>
<dd><p>The target (or mean) for the time series</p></dd>
<dt><b class="option">-tolerance</b> <i class="arg">value</i></dt>
<dd><p>The tolerated standard deviation</p></dd>
<dt><b class="option">-kfactor</b> <i class="arg">value</i></dt>
<dd><p>The factor by which to multiply the standard deviation (defaults to 0.5, typically between 0.5 and 1.0)</p></dd>
<dt><b class="option">-hfactor</b> <i class="arg">value</i></dt>
<dd><p>The factor determining the limits betweem which the &quot;cusum&quot; statistic is accepted (typicaly 3.0-5.0, default 4.0)</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::changepoint::cusum-online</b> <span class="opt">?args?</span></a></dt>
<dd><p>Class to examine data passed in against expected properties. At least the keywords <i class="term">-target</i> and <i class="term">-tolerance</i> must be given.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">args</i></dt>
<dd><p>List of key-value pairs:</p>
<dl class="doctools_definitions">
<dt><b class="option">-target</b> <i class="arg">value</i></dt>
<dd><p>The target (or mean) for the time series</p></dd>
<dt><b class="option">-tolerance</b> <i class="arg">value</i></dt>
<dd><p>The tolerated standard deviation</p></dd>
<dt><b class="option">-kfactor</b> <i class="arg">value</i></dt>
<dd><p>The factor by which to multiply the standard deviation (defaults to 0.5, typically between 0.5 and 1.0)</p></dd>
<dt><b class="option">-hfactor</b> <i class="arg">value</i></dt>
<dd><p>The factor determining the limits betweem which the &quot;cusum&quot; statistic is accepted (typicaly 3.0-5.0, default 4.0)</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">$cusumObj</b> examine <i class="arg">value</i></a></dt>
<dd><p>Pass a value to the <i class="term">cusum-online</i> object and examine it. If, with this new value, the cumulative sum remains within the bounds,
zero (0) is returned, otherwise one (1) is returned.</p>
<dl class="doctools_arguments">
<dt>double <i class="arg">value</i></dt>
<dd><p>The new value</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">$cusumObj</b> reset</a></dt>
<dd><p>Reset the cumulative sum, so that the examination can start afresh.</p></dd>
<dt><a name="5"><b class="cmd">::math::changepoint::binary-segmentation</b> <i class="arg">data</i> <span class="opt">?args?</span></a></dt>
<dd><p>Apply the binary segmentation method recursively to find change points. Returns a list of indices of potential change points</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>Data to be examined</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>Optional key-value pairs:</p>
<dl class="doctools_definitions">
<dt><b class="option">-minlength</b> <i class="arg">number</i></dt>
<dd><p>Minimum number of points in each segment (default: 5)</p></dd>
<dt><b class="option">-threshold</b> <i class="arg">value</i></dt>
<dd><p>Factor applied to the standard deviation functioning as a threshold for accepting the change in cost function as an improvement (default: 1.0)</p></dd>
</dl></dd>
</dl></dd>
</dl>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#statistics">statistics</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2020 by Arjen Markus</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/math/combinatorics.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::combinatorics - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::combinatorics - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'combinatorics.man' by tcllib/doctools with format 'html'
   -->
<!-- math::combinatorics.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::combinatorics(n) 2.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::combinatorics - Combinatorial functions in the Tcl Math Library</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">math <span class="opt">?1.2.3?</span></b></li>
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">math::combinatorics <span class="opt">?2.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::ln_Gamma</b> <i class="arg">z</i></a></li>
<li><a href="#2"><b class="cmd">::math::factorial</b> <i class="arg">x</i></a></li>
<li><a href="#3"><b class="cmd">::math::choose</b> <i class="arg">n k</i></a></li>
<li><a href="#4"><b class="cmd">::math::Beta</b> <i class="arg">z w</i></a></li>
<li><a href="#5"><b class="cmd">::math::combinatorics::permutations</b> <i class="arg">n</i></a></li>
<li><a href="#6"><b class="cmd">::math::combinatorics::variations</b> <i class="arg">n</i> <i class="arg">k</i></a></li>
<li><a href="#7"><b class="cmd">::math::combinatorics::combinations</b> <i class="arg">n</i> <i class="arg">k</i></a></li>
<li><a href="#8"><b class="cmd">::math::combinatorics::derangements</b> <i class="arg">n</i></a></li>
<li><a href="#9"><b class="cmd">::math::combinatorics::catalan</b> <i class="arg">n</i></a></li>
<li><a href="#10"><b class="cmd">::math::combinatorics::firstStirling</b> <i class="arg">n</i> <i class="arg">m</i></a></li>
<li><a href="#11"><b class="cmd">::math::combinatorics::secondStirling</b> <i class="arg">n</i> <i class="arg">m</i></a></li>
<li><a href="#12"><b class="cmd">::math::combinatorics::partitionP</b> <i class="arg">n</i></a></li>
<li><a href="#13"><b class="cmd">::math::combinatorics::list-permutations</b> <i class="arg">n</i></a></li>
<li><a href="#14"><b class="cmd">::math::combinatorics::list-variations</b> <i class="arg">n</i> <i class="arg">k</i></a></li>
<li><a href="#15"><b class="cmd">::math::combinatorics::list-combinations</b> <i class="arg">n</i> <i class="arg">k</i></a></li>
<li><a href="#16"><b class="cmd">::math::combinatorics::list-derangements</b> <i class="arg">n</i></a></li>
<li><a href="#17"><b class="cmd">::math::combinatorics::list-powerset</b> <i class="arg">n</i></a></li>
<li><a href="#18"><b class="cmd">::math::combinatorics::permutationObj</b> new/create NAME <i class="arg">n</i></a></li>
<li><a href="#19"><b class="cmd">$perm</b> next</a></li>
<li><a href="#20"><b class="cmd">$perm</b> reset</a></li>
<li><a href="#21"><b class="cmd">$perm</b> setElements <i class="arg">elements</i></a></li>
<li><a href="#22"><b class="cmd">$perm</b> setElements</a></li>
<li><a href="#23"><b class="cmd">::math::combinatorics::combinationObj</b> new/create NAME <i class="arg">n</i> <i class="arg">k</i></a></li>
<li><a href="#24"><b class="cmd">$combin</b> next</a></li>
<li><a href="#25"><b class="cmd">$combin</b> reset</a></li>
<li><a href="#26"><b class="cmd">$combin</b> setElements <i class="arg">elements</i></a></li>
<li><a href="#27"><b class="cmd">$combin</b> setElements</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package"><a href="math.html">math</a></b> package contains implementations of several
functions useful in combinatorial problems. The <b class="package">math::combinatorics</b>
extends the collections based on features in Tcl 8.6.
Note: the meaning of the partitionP function, Catalan and Stirling numbers is explained on the
<a href="http://mathworld.wolfram.com">MathWorld website</a></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::ln_Gamma</b> <i class="arg">z</i></a></dt>
<dd><p>Returns the natural logarithm of the Gamma function for the argument
<i class="arg">z</i>.</p>
<p>The Gamma function is defined as the improper integral from zero to







|

|



|
|
|
|
|
|


|


















<
<






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





|
<
<
<







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127


128
129
130
131
132
133























134
135
136
137
138
139



140
141
142
143
144
145
146
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'combinatorics.man' by tcllib/doctools with format 'html'
   -->
<! -- math::combinatorics.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::combinatorics(n) 1.2.3 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::combinatorics - Combinatorial functions in the Tcl Math Library</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">math <span class="opt">?1.2.3?</span></b></li>


</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::ln_Gamma</b> <i class="arg">z</i></a></li>
<li><a href="#2"><b class="cmd">::math::factorial</b> <i class="arg">x</i></a></li>
<li><a href="#3"><b class="cmd">::math::choose</b> <i class="arg">n k</i></a></li>
<li><a href="#4"><b class="cmd">::math::Beta</b> <i class="arg">z w</i></a></li>























</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package"><a href="math.html">math</a></b> package contains implementations of several
functions useful in combinatorial problems.</p>



</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::ln_Gamma</b> <i class="arg">z</i></a></dt>
<dd><p>Returns the natural logarithm of the Gamma function for the argument
<i class="arg">z</i>.</p>
<p>The Gamma function is defined as the improper integral from zero to
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<dd><p>Returns the Beta function of the parameters <i class="arg">z</i> and <i class="arg">w</i>.</p>
<pre class="doctools_example">
   Beta(z,w) = Beta(w,z) = Gamma(z) * Gamma(w) / Gamma(z+w)
</pre>
<p>Results are returned as a floating point number precise to better than
nine significant digits provided that <i class="arg">w</i> and <i class="arg">z</i> are both at
least 1.</p></dd>
<dt><a name="5"><b class="cmd">::math::combinatorics::permutations</b> <i class="arg">n</i></a></dt>
<dd><p>Return the number of permutations of n items. The returned number
is always an integer, it is not limited by the range of 32-or 64-bits
integers using the arbitrary precision integers available in Tcl 8.5 and later.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be permuted.</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::math::combinatorics::variations</b> <i class="arg">n</i> <i class="arg">k</i></a></dt>
<dd><p>Return the number of variations k items selected from the total of n items.
The order of the items is taken into account.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be selected from.</p></dd>
<dt>int <i class="arg">k</i></dt>
<dd><p>The number of items to be selected in each variation.</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::combinatorics::combinations</b> <i class="arg">n</i> <i class="arg">k</i></a></dt>
<dd><p>Return the number of combinations of k items selected from the total of n items.
The order of the items is not important.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be selected from.</p></dd>
<dt>int <i class="arg">k</i></dt>
<dd><p>The number of items to be selected in each combination.</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::combinatorics::derangements</b> <i class="arg">n</i></a></dt>
<dd><p>Return the number of derangements of n items. A derangement is a permutation
where each item is displaced from the original position.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be rearranged.</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::combinatorics::catalan</b> <i class="arg">n</i></a></dt>
<dd><p>Return the n'th Catalan number. The number n is expected to be 1 or larger.
These numbers occur in various combinatorial problems.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The index of the Catalan number</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::combinatorics::firstStirling</b> <i class="arg">n</i> <i class="arg">m</i></a></dt>
<dd><p>Calculate a Stirling number of the first kind
(signed version, m cycles in a permutation of n items)</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Number of items</p></dd>
<dt>int <i class="arg">m</i></dt>
<dd><p>Number of cycles</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::combinatorics::secondStirling</b> <i class="arg">n</i> <i class="arg">m</i></a></dt>
<dd><p>Calculate a Stirling number of the second kind
(m non-empty subsets from n items)</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Number of items</p></dd>
<dt>int <i class="arg">m</i></dt>
<dd><p>Number of subsets</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::math::combinatorics::partitionP</b> <i class="arg">n</i></a></dt>
<dd><p>Calculate the number of ways an integer n can be written as the sum of positive integers.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Number in question</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::combinatorics::list-permutations</b> <i class="arg">n</i></a></dt>
<dd><p>Return the list of permutations of the numbers 0, ..., n-1.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be permuted.</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::math::combinatorics::list-variations</b> <i class="arg">n</i> <i class="arg">k</i></a></dt>
<dd><p>Return the list of variations of k numbers selected from the numbers 0, ..., n-1.
The order of the items is taken into account.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be selected from.</p></dd>
<dt>int <i class="arg">k</i></dt>
<dd><p>The number of items to be selected in each variation.</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::combinatorics::list-combinations</b> <i class="arg">n</i> <i class="arg">k</i></a></dt>
<dd><p>Return the list of combinations of k numbers selected from the numbers 0, ..., n-1.
The order of the items is ignored.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be selected from.</p></dd>
<dt>int <i class="arg">k</i></dt>
<dd><p>The number of items to be selected in each combination.</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::combinatorics::list-derangements</b> <i class="arg">n</i></a></dt>
<dd><p>Return the list of derangements of the numbers 0, ..., n-1.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be rearranged.</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">::math::combinatorics::list-powerset</b> <i class="arg">n</i></a></dt>
<dd><p>Return the list of all subsets of the numbers 0, ..., n-1.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be rearranged.</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::combinatorics::permutationObj</b> new/create NAME <i class="arg">n</i></a></dt>
<dd><p>Create a TclOO object for returning permutations one by one. If the last permutation
has been reached an empty list is returned.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be rearranged.</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">$perm</b> next</a></dt>
<dd><p>Return the next permutation of n objects.</p></dd>
<dt><a name="20"><b class="cmd">$perm</b> reset</a></dt>
<dd><p>Reset the object, so that the command <i class="term">next</i> returns the complete list again.</p></dd>
<dt><a name="21"><b class="cmd">$perm</b> setElements <i class="arg">elements</i></a></dt>
<dd><p>Register a list of items to be permuted, using the <i class="term">nextElements</i> command.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">elements</i></dt>
<dd><p>The list of n items that will be permuted.</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">$perm</b> setElements</a></dt>
<dd><p>Return the next permulation of the registered items.</p></dd>
<dt><a name="23"><b class="cmd">::math::combinatorics::combinationObj</b> new/create NAME <i class="arg">n</i> <i class="arg">k</i></a></dt>
<dd><p>Create a TclOO object for returning combinations one by one. If the last combination
has been reached an empty list is returned.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>The number of items to be rearranged.</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">$combin</b> next</a></dt>
<dd><p>Return the next combination of n objects.</p></dd>
<dt><a name="25"><b class="cmd">$combin</b> reset</a></dt>
<dd><p>Reset the object, so that the command <i class="term">next</i> returns the complete list again.</p></dd>
<dt><a name="26"><b class="cmd">$combin</b> setElements <i class="arg">elements</i></a></dt>
<dd><p>Register a list of items to be permuted, using the <i class="term">nextElements</i> command.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">elements</i></dt>
<dd><p>The list of n items that will be permuted.</p></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">$combin</b> setElements</a></dt>
<dd><p>Return the next combination of the registered items.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









<
<
<
<
<
<





184
185
186
187
188
189
190










































































































































191
192
193
194
195
196
197
198
199






200
201
202
203
204
<dd><p>Returns the Beta function of the parameters <i class="arg">z</i> and <i class="arg">w</i>.</p>
<pre class="doctools_example">
   Beta(z,w) = Beta(w,z) = Gamma(z) * Gamma(w) / Gamma(z+w)
</pre>
<p>Results are returned as a floating point number precise to better than
nine significant digits provided that <i class="arg">w</i> and <i class="arg">z</i> are both at
least 1.</p></dd>










































































































































</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/constants.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::constants - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::constants - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'constants.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;
   -->
<!-- math::constants.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::constants(n) 1.0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::constants - Mathematical and numerical constants</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'constants.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;
   -->
<! -- math::constants.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::constants(n) 1.0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::constants - Mathematical and numerical constants</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: constants</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#constants">constants</a>, <a href="../../../../index.html#degrees">degrees</a>, <a href="../../../../index.html#e">e</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#pi">pi</a>, <a href="../../../../index.html#radians">radians</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








236
237
238
239
240
241
242






243
244
245
246
247
248
249
250
251
252
253
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: constants</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key610">constants</a>, <a href="../../../../index.html#key808">degrees</a>, <a href="../../../../index.html#key807">e</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key806">pi</a>, <a href="../../../../index.html#key611">radians</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/decimal.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::decimal - Tcl Decimal Arithmetic Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::decimal - Tcl Decimal Arithmetic Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'decimal.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Mark Alston &amp;lt;mark at beernut dot com&amp;gt;
   -->
<!-- math::decimal.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::decimal(n) 1.0.3 tcllib &quot;Tcl Decimal Arithmetic Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::decimal - General decimal arithmetic</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'decimal.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Mark Alston &lt;mark at beernut dot com&gt;
   -->
<! -- math::decimal.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::decimal(n) 1.0.3 tcllib &quot;Tcl Decimal Arithmetic Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::decimal - General decimal arithmetic</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<p>This section shows some simple examples. Since the purpose of this library
is to perform decimal math operations, examples may be the simplest way
to learn how to work with it and to see the difference between using this
package and sticking with expr. Consult the API section of
this man page for information about individual procedures.</p>
<pre class="doctools_example">
    package require math::decimal
    # Various operations on two numbers.
    # We first convert them to decimal format.
    set a [::math::decimal::fromstr 8.2]
    set b [::math::decimal::fromstr .2]
    # Then we perform our operations. Here we add
    set c [::math::decimal::+ $a $b]
    # Finally we convert back to string format for presentation to the user.
    puts [::math::decimal::tostr $c] ; # =&gt; will output 8.4
    # Other examples
    #
    # Subtraction
    set c [::math::decimal::- $a $b]
    puts [::math::decimal::tostr $c] ; # =&gt; will output 8.0
    # Why bother using this instead of simply expr?
    puts [expr {8.2 + .2}] ; # =&gt; will output 8.399999999999999
    puts [expr {8.2 - .2}] ; # =&gt; will output 7.999999999999999
    # See http://speleotrove.com/decimal to learn more about why this happens.
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::decimal::fromstr</b> <i class="arg">string</i></a></dt>
<dd><p>Convert <em>string</em> into a decimal.</p></dd>







|




|
|








|
|







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<div id="section2" class="doctools_section"><h2><a name="section2">EXAMPLES</a></h2>
<p>This section shows some simple examples. Since the purpose of this library
is to perform decimal math operations, examples may be the simplest way
to learn how to work with it and to see the difference between using this
package and sticking with expr. Consult the API section of
this man page for information about individual procedures.</p>
<pre class="doctools_example">
    package require decimal
    # Various operations on two numbers.
    # We first convert them to decimal format.
    set a [::math::decimal::fromstr 8.2]
    set b [::math::decimal::fromstr .2]
    # Then we perform our operations. Here we multiply
    set c [::math::decimal::* $a $b]
    # Finally we convert back to string format for presentation to the user.
    puts [::math::decimal::tostr $c] ; # =&gt; will output 8.4
    # Other examples
    #
    # Subtraction
    set c [::math::decimal::- $a $b]
    puts [::math::decimal::tostr $c] ; # =&gt; will output 8.0
    # Why bother using this instead of simply expr?
    puts 8.399999999999999 ; # =&gt; will output 8.399999999999999
    puts 7.999999999999999 ; # =&gt; will output 7.999999999999999
    # See http://speleotrove.com/decimal to learn more about why this happens.
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::decimal::fromstr</b> <i class="arg">string</i></a></dt>
<dd><p>Convert <em>string</em> into a decimal.</p></dd>
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>decimal</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#decimal">decimal</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#tcl">tcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Mark Alston &lt;mark at beernut dot com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








312
313
314
315
316
317
318






319
320
321
322
323
324
325
326
327
328
329
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>decimal</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key769">decimal</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key288">tcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Mark Alston &lt;mark at beernut dot com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/exact.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>math::exact - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>math::exact - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'exact.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2015 Kevin B. Kenny &amp;lt;kennykb@acm.org&amp;gt;   -- Redistribution permitted under the terms of the Open Publication License &amp;lt;http://www.opencontent.org/openpub/&amp;gt;
   -->
<!-- math::exact.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::exact(n) 1.0.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::exact - Exact Real Arithmetic</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'exact.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2015 Kevin B. Kenny &lt;kennykb@acm.org&gt;   -- Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;
   -->
<! -- math::exact.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::exact(n) 1.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::exact - Exact Real Arithmetic</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">grammar::aycock 1.0</b></li>
<li>package require <b class="pkgname">math::exact 1.0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::exact::exactexpr</b> <i class="arg">expr</i></a></li>
<li><a href="#2"><i class="arg">number</i> <b class="cmd">ref</b></a></li>
<li><a href="#3"><i class="arg">number</i> <b class="cmd">unref</b></a></li>
<li><a href="#4"><i class="arg">number</i> <b class="cmd">asPrint</b> <i class="arg">precision</i></a></li>
<li><a href="#5"><i class="arg">number</i> <b class="cmd">asFloat</b> <i class="arg">precision</i></a></li>







|







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">grammar::aycock 1.0</b></li>
<li>package require <b class="pkgname">math::exact 1.0</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::exact::exactexpr</b> <i class="arg">expr</i></a></li>
<li><a href="#2"><i class="arg">number</i> <b class="cmd">ref</b></a></li>
<li><a href="#3"><i class="arg">number</i> <b class="cmd">unref</b></a></li>
<li><a href="#4"><i class="arg">number</i> <b class="cmd">asPrint</b> <i class="arg">precision</i></a></li>
<li><a href="#5"><i class="arg">number</i> <b class="cmd">asFloat</b> <i class="arg">precision</i></a></li>

Deleted idoc/www/tcllib/files/modules/math/filtergen.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html><html><head>
<title>math::filters - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'filtergen.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2020 by Arjen Markus
   -->
<!-- math::filters.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::filters(n) 0.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::filters - Digital filters</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::filters <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::filters::filterButterworth</b> <i class="arg">lowpass</i> <i class="arg">order</i> <i class="arg">samplefreq</i> <i class="arg">cutofffreq</i></a></li>
<li><a href="#2"><b class="cmd">::math::filters::filter</b> <i class="arg">coeffs</i> <i class="arg">data</i></a></li>
<li><a href="#3"><b class="cmd">::math::filters::filterObj</b> new <i class="arg">coeffs</i> <i class="arg">yinit</i></a></li>
<li><a href="#4"><b class="cmd">$filterObj</b> filter <i class="arg">x</i></a></li>
<li><a href="#5"><b class="cmd">$filterObj</b> reset</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">math::filters</b> package implements digital filters,
notably Butterworth low-pass and high-pass filters. The procedures
allow to filter an entire data series as well as filter data one
by one.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::filters::filterButterworth</b> <i class="arg">lowpass</i> <i class="arg">order</i> <i class="arg">samplefreq</i> <i class="arg">cutofffreq</i></a></dt>
<dd><p>Determine the coefficients for a Butterworth filter of given order. The coefficients are returned as
a list of the x-coefficients, the y-coefficients and the scale. The formula is (n is the filter order):</p>
<pre class="doctools_example">
                   n             n
    scale * y_k = sum x_(k-i) + sum y_(k-i)
                  i=0           i=1
</pre>
<dl class="doctools_arguments">
<dt>bool <i class="arg">lowpass</i></dt>
<dd><p>Generate a low-pass filter (1) or a high-pass filter (0)</p></dd>
<dt>integer <i class="arg">lowpass</i></dt>
<dd><p>The order of the filter to be generated</p></dd>
<dt>double <i class="arg">samplefreq</i></dt>
<dd><p>Sampling frequency of the data series</p></dd>
<dt>double <i class="arg">cutofffreq</i></dt>
<dd><p>Cut-off frequency for the filter</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::filters::filter</b> <i class="arg">coeffs</i> <i class="arg">data</i></a></dt>
<dd><p>Filter the entire data series based on the filter coefficients.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">coeffs</i></dt>
<dd><p>List of coefficients as generated by <em>filterButterworth</em> (or in fact any similar list of coefficients)</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>Data to be filtered</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::filters::filterObj</b> new <i class="arg">coeffs</i> <i class="arg">yinit</i></a></dt>
<dd><p>Create a filter object. The initial x data are taken as zero. The initial y data can be prescribed. If they are not given,
they are taken as zero as well.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">coeffs</i></dt>
<dd><p>List of coefficients as generated by <em>filterButterworth</em> (or in fact any similar list of coefficients)</p></dd>
<dt>list <i class="arg">yinit</i></dt>
<dd><p>(Optional) initial data for the filter result.</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">$filterObj</b> filter <i class="arg">x</i></a></dt>
<dd><p>Filter a single value and return the result.</p>
<dl class="doctools_arguments">
<dt>double <i class="arg">x</i></dt>
<dd><p>The value to be filtered</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">$filterObj</b> reset</a></dt>
<dd><p>Reset the filter object (start anew)</p></dd>
</dl>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#digital">digital</a>, <a href="../../../../index.html#filtering">filtering</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2020 by Arjen Markus</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/math/fourier.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>math::fourier - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>math::fourier - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'fourier.man' by tcllib/doctools with format 'html'
   -->
<!-- math::fourier.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::fourier(n) 1.0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::fourier - Discrete and fast fourier transforms</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'fourier.man' by tcllib/doctools with format 'html'
   -->
<! -- math::fourier.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::fourier(n) 1.0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::fourier - Discrete and fast fourier transforms</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: fourier</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#fft">FFT</a>, <a href="../../../../index.html#fourier_transform">Fourier transform</a>, <a href="../../../../index.html#complex_numbers">complex numbers</a>, <a href="../../../../index.html#mathematics">mathematics</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





235
236
237
238
239
240
241






242
243
244
245
246
247
248
249
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: fourier</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key803">FFT</a>, <a href="../../../../index.html#key802">Fourier transform</a>, <a href="../../../../index.html#key797">complex numbers</a>, <a href="../../../../index.html#key629">mathematics</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/fuzzy.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>math::fuzzy - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>math::fuzzy - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'fuzzy.man' by tcllib/doctools with format 'html'
   -->
<!-- math::fuzzy.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::fuzzy(n) 0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::fuzzy - Fuzzy comparison of floating-point numbers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'fuzzy.man' by tcllib/doctools with format 'html'
   -->
<! -- math::fuzzy.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::fuzzy(n) 0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::fuzzy - Fuzzy comparison of floating-point numbers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: fuzzy</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#floating_point">floating-point</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#rounding">rounding</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





236
237
238
239
240
241
242






243
244
245
246
247
248
249
250
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: fuzzy</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key393">floating-point</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key392">rounding</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/interpolate.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::interpolate - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::interpolate - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'interpolate.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2004 Kevn B. Kenny &amp;lt;kennykb@users.sourceforge.net&amp;gt;
   -->
<!-- math::interpolate.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::interpolate(n) 1.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::interpolate - Interpolation routines</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'interpolate.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;   -- Copyright &copy; 2004 Kevn B. Kenny &lt;kennykb@users.sourceforge.net&gt;
   -->
<! -- math::interpolate.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::interpolate(n) 1.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::interpolate - Interpolation routines</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: interpolate</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#interpolation">interpolation</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#spatial_interpolation">spatial interpolation</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Kevn B. Kenny &lt;kennykb@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|









353
354
355
356
357
358
359






360
361
362
363
364
365
366
367
368
369
370
371
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: interpolate</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key834">interpolation</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key835">spatial interpolation</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Kevn B. Kenny &lt;kennykb@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/linalg.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::linearalgebra - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::linearalgebra - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'linalg.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004-2008 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2004 Ed Hume &amp;lt;http://www.hume.com/contact.us.htm&amp;gt;   -- Copyright &amp;copy; 2008 Michael Buadin &amp;lt;relaxkmike@users.sourceforge.net&amp;gt;
   -->
<!-- math::linearalgebra.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::linearalgebra(n) 1.1.5 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::linearalgebra - Linear Algebra</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'linalg.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004-2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;   -- Copyright &copy; 2004 Ed Hume &lt;http://www.hume.com/contact.us.htm&gt;   -- Copyright &copy; 2008 Michael Buadin &lt;relaxkmike@users.sourceforge.net&gt;
   -->
<! -- math::linearalgebra.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::linearalgebra(n) 1.1.5 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::linearalgebra - Linear Algebra</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: linearalgebra</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#least_squares">least squares</a>, <a href="../../../../index.html#linear_algebra">linear algebra</a>, <a href="../../../../index.html#linear_equations">linear equations</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#matrices">matrices</a>, <a href="../../../../index.html#matrix">matrix</a>, <a href="../../../../index.html#vectors">vectors</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Ed Hume &lt;http://www.hume.com/contact.us.htm&gt;<br>
Copyright &copy; 2008 Michael Buadin &lt;relaxkmike@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|










977
978
979
980
981
982
983






984
985
986
987
988
989
990
991
992
993
994
995
996
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: linearalgebra</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key69">least squares</a>, <a href="../../../../index.html#key68">linear algebra</a>, <a href="../../../../index.html#key67">linear equations</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key66">matrices</a>, <a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key70">vectors</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Ed Hume &lt;http://www.hume.com/contact.us.htm&gt;<br>
Copyright &copy; 2008 Michael Buadin &lt;relaxkmike@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/machineparameters.html.


1
2
3
4
5
6
7
8
9

<!DOCTYPE html><html><head>
<title>math::machineparameters - tclrep</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
>
|
|







1
2
3
4
5
6
7
8
9
10

<html><head>
<title>tclrep/machineparameters - tclrep</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'machineparameters.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008 Michael Baudin &amp;lt;michael.baudin@sourceforge.net&amp;gt;
   -->
<!-- math::machineparameters.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::machineparameters(n) 1.0 tcllib &quot;tclrep&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::machineparameters - Compute double precision machine parameters.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLE</a></li>
<li class="doctools_section"><a href="#section3">REFERENCES</a></li>
<li class="doctools_section"><a href="#section4">CLASS API</a></li>
<li class="doctools_section"><a href="#section5">OBJECT API</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">math::machineparameters 0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">machineparameters</b> create <i class="arg">objectname</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectname</i> <b class="method">configure</b> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><i class="arg">objectname</i> <b class="method">cget</b> <i class="arg">opt</i></a></li>







|

|

|



|
|
|
|
|
|


|

|

















<







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'machineparameters.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008 Michael Baudin &lt;michael.baudin@sourceforge.net&gt;
   -->
<! -- tclrep/machineparameters.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tclrep/machineparameters(n) 1.0 tcllib &quot;tclrep&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tclrep/machineparameters - Compute double precision machine parameters.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLE</a></li>
<li class="doctools_section"><a href="#section3">REFERENCES</a></li>
<li class="doctools_section"><a href="#section4">CLASS API</a></li>
<li class="doctools_section"><a href="#section5">OBJECT API</a></li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">

<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">math::machineparameters 0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">machineparameters</b> create <i class="arg">objectname</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectname</i> <b class="method">configure</b> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><i class="arg">objectname</i> <b class="method">cget</b> <i class="arg">opt</i></a></li>
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Michael Baudin &lt;michael.baudin@sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





285
286
287
288
289
290
291






292
293
294
295
296
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Michael Baudin &lt;michael.baudin@sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/math.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>math - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>math - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'math.man' by tcllib/doctools with format 'html'
   -->
<!-- math.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math(n) 1.2.5 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math - Tcl Math Library</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'math.man' by tcllib/doctools with format 'html'
   -->
<! -- math.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math(n) 1.2.5 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math - Tcl Math Library</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#statistics">statistics</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





211
212
213
214
215
216
217






218
219
220
221
222
223
224
225
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key195">statistics</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/math_geometry.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::geometry - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::geometry - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'math_geometry.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2001 by Ideogramic ApS and other parties   -- Copyright &amp;copy; 2010 by Andreas Kupries   -- Copyright &amp;copy; 2010 by Kevin Kenny   -- Copyright &amp;copy; 2018 by Arjen Markus   -- Copyright &amp;copy; 2020 by Manfred Rosenberger
   -->
<!-- math::geometry.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::geometry(n) 1.4.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::geometry - Geometrical computations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">COORDINATE SYSTEM</a></li>
<li class="doctools_section"><a href="#section4">References</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::geometry <span class="opt">?1.4.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::geometry::+</b> <i class="arg">point1</i> <i class="arg">point2</i></a></li>
<li><a href="#2"><b class="cmd">::math::geometry::-</b> <i class="arg">point1</i> <i class="arg">point2</i></a></li>
<li><a href="#3"><b class="cmd">::math::geometry::p</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#4"><b class="cmd">::math::geometry::distance</b> <i class="arg">point1</i> <i class="arg">point2</i></a></li>
<li><a href="#5"><b class="cmd">::math::geometry::length</b> <i class="arg">point</i></a></li>
<li><a href="#6"><b class="cmd">::math::geometry::s*</b> <i class="arg">factor</i> <i class="arg">point</i></a></li>
<li><a href="#7"><b class="cmd">::math::geometry::direction</b> <i class="arg">angle</i></a></li>
<li><a href="#8"><b class="cmd">::math::geometry::h</b> <i class="arg">length</i></a></li>
<li><a href="#9"><b class="cmd">::math::geometry::v</b> <i class="arg">length</i></a></li>
<li><a href="#10"><b class="cmd">::math::geometry::between</b> <i class="arg">point1</i> <i class="arg">point2</i> <i class="arg">s</i></a></li>
<li><a href="#11"><b class="cmd">::math::geometry::octant</b> <i class="arg">point</i></a></li>
<li><a href="#12"><b class="cmd">::math::geometry::rect</b> <i class="arg">nw</i> <i class="arg">se</i></a></li>
<li><a href="#13"><b class="cmd">::math::geometry::nwse</b> <i class="arg">rect</i></a></li>
<li><a href="#14"><b class="cmd">::math::geometry::angle</b> <i class="arg">line</i></a></li>
<li><a href="#15"><b class="cmd">::math::geometry::angleBetween</b> <i class="arg">vector1</i> <i class="arg">vector2</i></a></li>
<li><a href="#16"><b class="cmd">::math::geometry::inproduct</b> <i class="arg">vector1</i> <i class="arg">vector2</i></a></li>
<li><a href="#17"><b class="cmd">::math::geometry::areaParallellogram</b> <i class="arg">vector1</i> <i class="arg">vector2</i></a></li>
<li><a href="#18"><b class="cmd">::math::geometry::calculateDistanceToLine</b> <i class="arg">P</i> <i class="arg">line</i></a></li>
<li><a href="#19"><b class="cmd">::math::geometry::calculateDistanceToLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></li>
<li><a href="#20"><b class="cmd">::math::geometry::calculateDistanceToPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#21"><b class="cmd">::math::geometry::calculateDistanceToPolygon</b> <i class="arg">P</i> <i class="arg">polygon</i></a></li>
<li><a href="#22"><b class="cmd">::math::geometry::findClosestPointOnLine</b> <i class="arg">P</i> <i class="arg">line</i></a></li>
<li><a href="#23"><b class="cmd">::math::geometry::findClosestPointOnLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></li>
<li><a href="#24"><b class="cmd">::math::geometry::findClosestPointOnPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#25"><b class="cmd">::math::geometry::lengthOfPolyline</b> <i class="arg">polyline</i></a></li>
<li><a href="#26"><b class="cmd">::math::geometry::movePointInDirection</b> <i class="arg">P</i> <i class="arg">direction</i> <i class="arg">dist</i></a></li>
<li><a href="#27"><b class="cmd">::math::geometry::lineSegmentsIntersect</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></li>
<li><a href="#28"><b class="cmd">::math::geometry::findLineSegmentIntersection</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></li>
<li><a href="#29"><b class="cmd">::math::geometry::findLineIntersection</b> <i class="arg">line1</i> <i class="arg">line2</i></a></li>
<li><a href="#30"><b class="cmd">::math::geometry::polylinesIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i></a></li>
<li><a href="#31"><b class="cmd">::math::geometry::polylinesBoundingIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <i class="arg">granularity</i></a></li>
<li><a href="#32"><b class="cmd">::math::geometry::intervalsOverlap</b> <i class="arg">y1</i> <i class="arg">y2</i> <i class="arg">y3</i> <i class="arg">y4</i> <i class="arg">strict</i></a></li>
<li><a href="#33"><b class="cmd">::math::geometry::rectanglesOverlap</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">Q1</i> <i class="arg">Q2</i> <i class="arg">strict</i></a></li>
<li><a href="#34"><b class="cmd">::math::geometry::bbox</b> <i class="arg">polyline</i></a></li>
<li><a href="#35"><b class="cmd">::math::geometry::overlapBBox</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <span class="opt">?strict?</span></a></li>
<li><a href="#36"><b class="cmd">::math::geometry::pointInsideBBox</b> <i class="arg">bbox</i> <i class="arg">point</i></a></li>
<li><a href="#37"><b class="cmd">::math::geometry::cathetusPoint</b> <i class="arg">pa</i> <i class="arg">pb</i> <i class="arg">cathetusLength</i> <span class="opt">?location?</span></a></li>
<li><a href="#38"><b class="cmd">::math::geometry::parallel</b> <i class="arg">line</i> <i class="arg">offset</i> <span class="opt">?orient?</span></a></li>
<li><a href="#39"><b class="cmd">::math::geometry::unitVector</b> <i class="arg">line</i></a></li>
<li><a href="#40"><b class="cmd">::math::geometry::pointInsidePolygon</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#41"><b class="cmd">::math::geometry::pointInsidePolygonAlt</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#42"><b class="cmd">::math::geometry::rectangleInsidePolygon</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">polyline</i></a></li>
<li><a href="#43"><b class="cmd">::math::geometry::areaPolygon</b> <i class="arg">polygon</i></a></li>
<li><a href="#44"><b class="cmd">::math::geometry::translate</b> <i class="arg">vector</i> <i class="arg">polyline</i></a></li>
<li><a href="#45"><b class="cmd">::math::geometry::rotate</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></li>
<li><a href="#46"><b class="cmd">::math::geometry::rotateAbout</b> <i class="arg">p</i> <i class="arg">angle</i> <i class="arg">polyline</i></a></li>
<li><a href="#47"><b class="cmd">::math::geometry::reflect</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></li>
<li><a href="#48"><b class="cmd">::math::geometry::degToRad</b> <i class="arg">angle</i></a></li>
<li><a href="#49"><b class="cmd">::math::geometry::radToDeg</b> <i class="arg">angle</i></a></li>
<li><a href="#50"><b class="cmd">::math::geometry::circle</b> <i class="arg">centre</i> <i class="arg">radius</i></a></li>
<li><a href="#51"><b class="cmd">::math::geometry::circleTwoPoints</b> <i class="arg">point1</i> <i class="arg">point2</i></a></li>
<li><a href="#52"><b class="cmd">::math::geometry::pointInsideCircle</b> <i class="arg">point</i> <i class="arg">circle</i></a></li>
<li><a href="#53"><b class="cmd">::math::geometry::lineIntersectsCircle</b> <i class="arg">line</i> <i class="arg">circle</i></a></li>
<li><a href="#54"><b class="cmd">::math::geometry::lineSegmentIntersectsCircle</b> <i class="arg">segment</i> <i class="arg">circle</i></a></li>
<li><a href="#55"><b class="cmd">::math::geometry::intersectionLineWithCircle</b> <i class="arg">line</i> <i class="arg">circle</i></a></li>
<li><a href="#56"><b class="cmd">::math::geometry::intersectionCircleWithCircle</b> <i class="arg">circle1</i> <i class="arg">circle2</i></a></li>
<li><a href="#57"><b class="cmd">::math::geometry::tangentLinesToCircle</b> <i class="arg">point</i> <i class="arg">circle</i></a></li>
<li><a href="#58"><b class="cmd">::math::geometry::intersectionPolylines</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <span class="opt">?mode?</span> <span class="opt">?granularity?</span></a></li>
<li><a href="#59"><b class="cmd">::math::geometry::intersectionPolylineCircle</b> <i class="arg">polyline</i> <i class="arg">circle</i> <span class="opt">?mode?</span> <span class="opt">?granularity?</span></a></li>
<li><a href="#60"><b class="cmd">::math::geometry::polylineCutOrigin</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <span class="opt">?granularity?</span></a></li>
<li><a href="#61"><b class="cmd">::math::geometry::polylineCutEnd</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <span class="opt">?granularity?</span></a></li>
<li><a href="#62"><b class="cmd">::math::geometry::splitPolyline</b> <i class="arg">polyline</i> <i class="arg">numberVertex</i></a></li>
<li><a href="#63"><b class="cmd">::math::geometry::enrichPolyline</b> <i class="arg">polyline</i> <i class="arg">accuracy</i></a></li>
<li><a href="#64"><b class="cmd">::math::geometry::cleanupPolyline</b> <i class="arg">polyline</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">math::geometry</b> package is a collection of functions for
computations and manipulations on two-dimensional geometrical objects,
such as points, lines and polygons.</p>
<p>The geometrical objects are implemented as plain lists of coordinates.
For instance a line is defined by a list of four numbers, the x- and
y-coordinate of a first point and the x- and y-coordinates of a second
point on the line.</p>
<p><em>Note:</em> In version 1.4.0 an inconsistency was repaired - see <a href="https://core.tcl-lang.org/tcllib/tktview?name=fb4812f82b">https://core.tcl-lang.org/tcllib/tktview?name=fb4812f82b</a>.
More in <span class="sectref"><a href="#section3">COORDINATE SYSTEM</a></span></p>
<p>The various types of object are recognised by the number of coordinate
pairs and the context in which they are used: a list of four elements
can be regarded as an infinite line, a finite line segment but also
as a polyline of one segment and a point set of two points.</p>
<p>Currently the following types of objects are distinguished:</p>
<ul class="doctools_itemized">
<li><p><em>point</em> - a list of two coordinates representing the x- and
y-coordinates respectively.</p></li>
<li><p><em>line</em> - a list of four coordinates, interpreted as the x- and
y-coordinates of two distinct points on the line.</p></li>
<li><p><em>line segment</em> - a list of four coordinates, interpreted as the
x- and y-coordinates of the first and the last points on the line
segment.</p></li>
<li><p><em>polyline</em> - a list of an even number of coordinates,
interpreted as the x- and y-coordinates of an ordered set of points.</p></li>
<li><p><em>polygon</em> - like a polyline, but the implicit assumption is that
the polyline is closed (if the first and last points do not coincide,
the missing segment is automatically added).</p></li>
<li><p><em>point set</em> - again a list of an even number of coordinates, but
the points are regarded without any ordering.</p></li>
<li><p><em>circle</em> - a list of three numbers, the first two are the coordinates of the
centre and the third is the radius.</p></li>
</ul>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::geometry::+</b> <i class="arg">point1</i> <i class="arg">point2</i></a></dt>
<dd><p>Compute the sum of the two vectors given as points and return it.







|

|

|



|
|
|
|
|
|


|









|
|
<









|
















<
<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
|
|
|
|
|
|
<
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











<
<




















<
<







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165





166
167
168
169
170
171

172
173
174















175
176
177
178
179
180
181
182
183
184
185


186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205


206
207
208
209
210
211
212
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'math_geometry.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2001 by Ideogramic ApS and other parties   -- Copyright &copy; 2004 by Arjen Markus   -- Copyright &copy; 2010 by Andreas Kupries   -- Copyright &copy; 2010 by Kevin Kenny
   -->
<! -- math::geometry.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::geometry(n) 1.2.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::geometry - Geometrical computations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#section3">References</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>

<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::geometry <span class="opt">?1.2.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::geometry::+</b> <i class="arg">point1</i> <i class="arg">point2</i></a></li>
<li><a href="#2"><b class="cmd">::math::geometry::-</b> <i class="arg">point1</i> <i class="arg">point2</i></a></li>
<li><a href="#3"><b class="cmd">::math::geometry::p</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#4"><b class="cmd">::math::geometry::distance</b> <i class="arg">point1</i> <i class="arg">point2</i></a></li>
<li><a href="#5"><b class="cmd">::math::geometry::length</b> <i class="arg">point</i></a></li>
<li><a href="#6"><b class="cmd">::math::geometry::s*</b> <i class="arg">factor</i> <i class="arg">point</i></a></li>
<li><a href="#7"><b class="cmd">::math::geometry::direction</b> <i class="arg">angle</i></a></li>
<li><a href="#8"><b class="cmd">::math::geometry::h</b> <i class="arg">length</i></a></li>
<li><a href="#9"><b class="cmd">::math::geometry::v</b> <i class="arg">length</i></a></li>
<li><a href="#10"><b class="cmd">::math::geometry::between</b> <i class="arg">point1</i> <i class="arg">point2</i> <i class="arg">s</i></a></li>
<li><a href="#11"><b class="cmd">::math::geometry::octant</b> <i class="arg">point</i></a></li>
<li><a href="#12"><b class="cmd">::math::geometry::rect</b> <i class="arg">nw</i> <i class="arg">se</i></a></li>
<li><a href="#13"><b class="cmd">::math::geometry::nwse</b> <i class="arg">rect</i></a></li>
<li><a href="#14"><b class="cmd">::math::geometry::angle</b> <i class="arg">line</i></a></li>



<li><a href="#15"><b class="cmd">::math::geometry::calculateDistanceToLine</b> <i class="arg">P</i> <i class="arg">line</i></a></li>
<li><a href="#16"><b class="cmd">::math::geometry::calculateDistanceToLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></li>
<li><a href="#17"><b class="cmd">::math::geometry::calculateDistanceToPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#18"><b class="cmd">::math::geometry::calculateDistanceToPolygon</b> <i class="arg">P</i> <i class="arg">polygon</i></a></li>
<li><a href="#19"><b class="cmd">::math::geometry::findClosestPointOnLine</b> <i class="arg">P</i> <i class="arg">line</i></a></li>
<li><a href="#20"><b class="cmd">::math::geometry::findClosestPointOnLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></li>
<li><a href="#21"><b class="cmd">::math::geometry::findClosestPointOnPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#22"><b class="cmd">::math::geometry::lengthOfPolyline</b> <i class="arg">polyline</i></a></li>
<li><a href="#23"><b class="cmd">::math::geometry::movePointInDirection</b> <i class="arg">P</i> <i class="arg">direction</i> <i class="arg">dist</i></a></li>
<li><a href="#24"><b class="cmd">::math::geometry::lineSegmentsIntersect</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></li>
<li><a href="#25"><b class="cmd">::math::geometry::findLineSegmentIntersection</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></li>
<li><a href="#26"><b class="cmd">::math::geometry::findLineIntersection</b> <i class="arg">line1</i> <i class="arg">line2</i></a></li>
<li><a href="#27"><b class="cmd">::math::geometry::polylinesIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i></a></li>
<li><a href="#28"><b class="cmd">::math::geometry::polylinesBoundingIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <i class="arg">granularity</i></a></li>
<li><a href="#29"><b class="cmd">::math::geometry::intervalsOverlap</b> <i class="arg">y1</i> <i class="arg">y2</i> <i class="arg">y3</i> <i class="arg">y4</i> <i class="arg">strict</i></a></li>
<li><a href="#30"><b class="cmd">::math::geometry::rectanglesOverlap</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">Q1</i> <i class="arg">Q2</i> <i class="arg">strict</i></a></li>
<li><a href="#31"><b class="cmd">::math::geometry::bbox</b> <i class="arg">polyline</i></a></li>





<li><a href="#32"><b class="cmd">::math::geometry::pointInsidePolygon</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#33"><b class="cmd">::math::geometry::pointInsidePolygonAlt</b> <i class="arg">P</i> <i class="arg">polyline</i></a></li>
<li><a href="#34"><b class="cmd">::math::geometry::rectangleInsidePolygon</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">polyline</i></a></li>
<li><a href="#35"><b class="cmd">::math::geometry::areaPolygon</b> <i class="arg">polygon</i></a></li>
<li><a href="#36"><b class="cmd">::math::geometry::translate</b> <i class="arg">vector</i> <i class="arg">polyline</i></a></li>
<li><a href="#37"><b class="cmd">::math::geometry::rotate</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></li>

<li><a href="#38"><b class="cmd">::math::geometry::reflect</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></li>
<li><a href="#39"><b class="cmd">::math::geometry::degToRad</b> <i class="arg">angle</i></a></li>
<li><a href="#40"><b class="cmd">::math::geometry::radToDeg</b> <i class="arg">angle</i></a></li>















</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">math::geometry</b> package is a collection of functions for
computations and manipulations on two-dimensional geometrical objects,
such as points, lines and polygons.</p>
<p>The geometrical objects are implemented as plain lists of coordinates.
For instance a line is defined by a list of four numbers, the x- and
y-coordinate of a first point and the x- and y-coordinates of a second
point on the line.</p>


<p>The various types of object are recognised by the number of coordinate
pairs and the context in which they are used: a list of four elements
can be regarded as an infinite line, a finite line segment but also
as a polyline of one segment and a point set of two points.</p>
<p>Currently the following types of objects are distinguished:</p>
<ul class="doctools_itemized">
<li><p><em>point</em> - a list of two coordinates representing the x- and
y-coordinates respectively.</p></li>
<li><p><em>line</em> - a list of four coordinates, interpreted as the x- and
y-coordinates of two distinct points on the line.</p></li>
<li><p><em>line segment</em> - a list of four coordinates, interpreted as the
x- and y-coordinates of the first and the last points on the line
segment.</p></li>
<li><p><em>polyline</em> - a list of an even number of coordinates,
interpreted as the x- and y-coordinates of an ordered set of points.</p></li>
<li><p><em>polygon</em> - like a polyline, but the implicit assumption is that
the polyline is closed (if the first and last points do not coincide,
the missing segment is automatically added).</p></li>
<li><p><em>point set</em> - again a list of an even number of coordinates, but
the points are regarded without any ordering.</p></li>


</ul>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::geometry::+</b> <i class="arg">point1</i> <i class="arg">point2</i></a></dt>
<dd><p>Compute the sum of the two vectors given as points and return it.
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
result of the command.</p></dd>
<dt><a name="6"><b class="cmd">::math::geometry::s*</b> <i class="arg">factor</i> <i class="arg">point</i></a></dt>
<dd><p>Scale the vector by the factor and return it as the
result of the command. This is a vector as well.</p></dd>
<dt><a name="7"><b class="cmd">::math::geometry::direction</b> <i class="arg">angle</i></a></dt>
<dd><p>Given the angle in degrees this command computes and returns
the unit vector pointing into this direction. The vector for
angle == 0 points to the right (east), and for angle == 90 up (north).</p></dd>
<dt><a name="8"><b class="cmd">::math::geometry::h</b> <i class="arg">length</i></a></dt>
<dd><p>Returns a horizontal vector on the X-axis of the specified length.
Positive lengths point to the right (east).</p></dd>
<dt><a name="9"><b class="cmd">::math::geometry::v</b> <i class="arg">length</i></a></dt>
<dd><p>Returns a vertical vector on the Y-axis of the specified length.
Positive lengths point down (south).</p></dd>
<dt><a name="10"><b class="cmd">::math::geometry::between</b> <i class="arg">point1</i> <i class="arg">point2</i> <i class="arg">s</i></a></dt>







|







229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
result of the command.</p></dd>
<dt><a name="6"><b class="cmd">::math::geometry::s*</b> <i class="arg">factor</i> <i class="arg">point</i></a></dt>
<dd><p>Scale the vector by the factor and return it as the
result of the command. This is a vector as well.</p></dd>
<dt><a name="7"><b class="cmd">::math::geometry::direction</b> <i class="arg">angle</i></a></dt>
<dd><p>Given the angle in degrees this command computes and returns
the unit vector pointing into this direction. The vector for
angle == 0 points to the right (up), and for angle == 90 up (north).</p></dd>
<dt><a name="8"><b class="cmd">::math::geometry::h</b> <i class="arg">length</i></a></dt>
<dd><p>Returns a horizontal vector on the X-axis of the specified length.
Positive lengths point to the right (east).</p></dd>
<dt><a name="9"><b class="cmd">::math::geometry::v</b> <i class="arg">length</i></a></dt>
<dd><p>Returns a vertical vector on the Y-axis of the specified length.
Positive lengths point down (south).</p></dd>
<dt><a name="10"><b class="cmd">::math::geometry::between</b> <i class="arg">point1</i> <i class="arg">point2</i> <i class="arg">s</i></a></dt>
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843

844
845
846
847
848
849
<dt><a name="14"><b class="cmd">::math::geometry::angle</b> <i class="arg">line</i></a></dt>
<dd><p>Calculate the angle from the positive x-axis to a given line
(in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">line</i></dt>
<dd><p>Coordinates of the line</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::geometry::angleBetween</b> <i class="arg">vector1</i> <i class="arg">vector2</i></a></dt>
<dd><p>Calculate the angle between two vectors (in degrees)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector1</i></dt>
<dd><p>First vector</p></dd>
<dt>list <i class="arg">vector2</i></dt>
<dd><p>Second vector</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::geometry::inproduct</b> <i class="arg">vector1</i> <i class="arg">vector2</i></a></dt>
<dd><p>Calculate the inner product of two vectors</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector1</i></dt>
<dd><p>First vector</p></dd>
<dt>list <i class="arg">vector2</i></dt>
<dd><p>Second vector</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">::math::geometry::areaParallellogram</b> <i class="arg">vector1</i> <i class="arg">vector2</i></a></dt>
<dd><p>Calculate the area of the parallellogram with the two vectors as its sides</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector1</i></dt>
<dd><p>First vector</p></dd>
<dt>list <i class="arg">vector2</i></dt>
<dd><p>Second vector</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::geometry::calculateDistanceToLine</b> <i class="arg">P</i> <i class="arg">line</i></a></dt>
<dd><p>Calculate the distance of point P to the (infinite) line and return the
result</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">line</i></dt>
<dd><p>List of four numbers, the coordinates of two points
on the line</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::geometry::calculateDistanceToLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></dt>
<dd><p>Calculate the distance of point P to the (finite) line segment and
return the result.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">linesegment</i></dt>
<dd><p>List of four numbers, the coordinates of the
first and last points of the line segment</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::geometry::calculateDistanceToPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Calculate the distance of point P to the polyline and
return the result. Note that a polyline needs not to be closed.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>List of numbers, the coordinates of the
vertices of the polyline</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::geometry::calculateDistanceToPolygon</b> <i class="arg">P</i> <i class="arg">polygon</i></a></dt>
<dd><p>Calculate the distance of point P to the polygon and
return the result. If the list of coordinates is not closed (first and last
points differ), it is automatically closed.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">polygon</i></dt>
<dd><p>List of numbers, the coordinates of the
vertices of the polygon</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::geometry::findClosestPointOnLine</b> <i class="arg">P</i> <i class="arg">line</i></a></dt>
<dd><p>Return the point on a line which is closest to a given point.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">line</i></dt>
<dd><p>List of four numbers, the coordinates of two points
on the line</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::geometry::findClosestPointOnLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></dt>
<dd><p>Return the point on a <em>line segment</em> which is closest to a given
point.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">linesegment</i></dt>
<dd><p>List of four numbers, the first and last
points on the line segment</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::geometry::findClosestPointOnPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Return the point on a <em>polyline</em> which is closest to a given
point.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>List of numbers, the vertices of the polyline</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::geometry::lengthOfPolyline</b> <i class="arg">polyline</i></a></dt>
<dd><p>Return the length of the <em>polyline</em> (note: it not regarded as a
polygon)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline</i></dt>
<dd><p>List of numbers, the vertices of the polyline</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::geometry::movePointInDirection</b> <i class="arg">P</i> <i class="arg">direction</i> <i class="arg">dist</i></a></dt>
<dd><p>Move a point over a given distance in a given direction and return the
new coordinates (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>Coordinates of the point to be moved</p></dd>
<dt>double <i class="arg">direction</i></dt>
<dd><p>Direction (in degrees; 0 is to the right, 90
upwards)</p></dd>
<dt>list <i class="arg">dist</i></dt>
<dd><p>Distance over which to move the point</p></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">::math::geometry::lineSegmentsIntersect</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></dt>
<dd><p>Check if two line segments intersect or coincide. Returns 1 if that is
the case, 0 otherwise (in two dimensions only). If an endpoint of one segment lies on
the other segment (or is very close to the segment), they are considered to intersect</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">linesegment1</i></dt>
<dd><p>First line segment</p></dd>
<dt>list <i class="arg">linesegment2</i></dt>
<dd><p>Second line segment</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::geometry::findLineSegmentIntersection</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></dt>
<dd><p>Find the intersection point of two line segments. Return the coordinates
or the keywords &quot;coincident&quot; or &quot;none&quot; if the line segments coincide or
have no points in common (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">linesegment1</i></dt>
<dd><p>First line segment</p></dd>
<dt>list <i class="arg">linesegment2</i></dt>
<dd><p>Second line segment</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::geometry::findLineIntersection</b> <i class="arg">line1</i> <i class="arg">line2</i></a></dt>
<dd><p>Find the intersection point of two (infinite) lines. Return the coordinates
or the keywords &quot;coincident&quot; or &quot;none&quot; if the lines coincide or
have no points in common (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">line1</i></dt>
<dd><p>First line</p></dd>
<dt>list <i class="arg">line2</i></dt>
<dd><p>Second line</p></dd>
</dl>
<p>See section <span class="sectref"><a href="#section4">References</a></span> for details on the algorithm and math behind it.</p></dd>
<dt><a name="30"><b class="cmd">::math::geometry::polylinesIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i></a></dt>
<dd><p>Check if two polylines intersect or not (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>First polyline</p></dd>
<dt>list <i class="arg">polyline2</i></dt>
<dd><p>Second polyline</p></dd>
</dl></dd>
<dt><a name="31"><b class="cmd">::math::geometry::polylinesBoundingIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <i class="arg">granularity</i></a></dt>
<dd><p>Check whether two polylines intersect, but reduce
the correctness of the result to the given granularity.
Use this for faster, but weaker, intersection checking.</p>
<p>How it works:</p>
<p>Each polyline is split into a number of smaller polylines,
consisting of granularity points each. If a pair of those smaller
lines' bounding boxes intersect, then this procedure returns 1,
otherwise it returns 0.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>First polyline</p></dd>
<dt>list <i class="arg">polyline2</i></dt>
<dd><p>Second polyline</p></dd>
<dt>int <i class="arg">granularity</i></dt>
<dd><p>Number of points in each part (&lt;=1 means check
every edge)</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">::math::geometry::intervalsOverlap</b> <i class="arg">y1</i> <i class="arg">y2</i> <i class="arg">y3</i> <i class="arg">y4</i> <i class="arg">strict</i></a></dt>
<dd><p>Check if two intervals overlap.</p>
<dl class="doctools_arguments">
<dt>double <i class="arg">y1,y2</i></dt>
<dd><p>Begin and end of first interval</p></dd>
<dt>double <i class="arg">y3,y4</i></dt>
<dd><p>Begin and end of second interval</p></dd>
<dt>logical <i class="arg">strict</i></dt>
<dd><p>Check for strict or non-strict overlap</p></dd>
</dl></dd>
<dt><a name="33"><b class="cmd">::math::geometry::rectanglesOverlap</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">Q1</i> <i class="arg">Q2</i> <i class="arg">strict</i></a></dt>
<dd><p>Check if two rectangles overlap.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P1</i></dt>
<dd><p>upper-left corner of the first rectangle</p></dd>
<dt>list <i class="arg">P2</i></dt>
<dd><p>lower-right corner of the first rectangle</p></dd>
<dt>list <i class="arg">Q1</i></dt>
<dd><p>upper-left corner of the second rectangle</p></dd>
<dt>list <i class="arg">Q2</i></dt>
<dd><p>lower-right corner of the second rectangle</p></dd>
<dt>list <i class="arg">strict</i></dt>
<dd><p>choosing strict or non-strict interpretation</p></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">::math::geometry::bbox</b> <i class="arg">polyline</i></a></dt>
<dd><p>Calculate the bounding box of a polyline. Returns a list of four
coordinates: the upper-left and the lower-right corner of the box.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be examined</p></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">::math::geometry::overlapBBox</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <span class="opt">?strict?</span></a></dt>
<dd><p>Check if the bounding boxes of two polylines overlap or not.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>The first polyline</p></dd>
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>The second polyline</p></dd>
<dt>int <i class="arg">strict</i></dt>
<dd><p>Whether strict overlap is to checked (1) or if the bounding boxes may touch (0, default)</p></dd>
</dl></dd>
<dt><a name="36"><b class="cmd">::math::geometry::pointInsideBBox</b> <i class="arg">bbox</i> <i class="arg">point</i></a></dt>
<dd><p>Check if the point is inside or on the bounding box or not.
Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">bbox</i></dt>
<dd><p>The bounding box given as a list of x/y coordinates</p></dd>
<dt>list <i class="arg">point</i></dt>
<dd><p>The point to be checked</p></dd>
</dl></dd>
<dt><a name="37"><b class="cmd">::math::geometry::cathetusPoint</b> <i class="arg">pa</i> <i class="arg">pb</i> <i class="arg">cathetusLength</i> <span class="opt">?location?</span></a></dt>
<dd><p>Return the third point of the rectangular triangle defined by the two given end points of the hypothenusa.
The triangle's side from point A (or B, if the location is given as &quot;b&quot;) to the third point is the cathetus length.
If the cathetus' length is lower than the length of the hypothenusa, an empty list is returned.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">pa</i></dt>
<dd><p>The starting point on hypotenuse</p></dd>
<dt>list <i class="arg">pb</i></dt>
<dd><p>The ending point on hypotenuse</p></dd>
<dt>float <i class="arg">cathetusLength</i></dt>
<dd><p>The length of the cathetus of the triangle</p></dd>
<dt>string <i class="arg">location</i></dt>
<dd><p>The location of the given cathetus,
&quot;a&quot; means given cathetus shares point pa (default)
&quot;b&quot; means given cathetus shares point pb</p></dd>
</dl></dd>
<dt><a name="38"><b class="cmd">::math::geometry::parallel</b> <i class="arg">line</i> <i class="arg">offset</i> <span class="opt">?orient?</span></a></dt>
<dd><p>Return a line parallel to the given line, with a distance &quot;offset&quot;. The orientation is determined by the
two points defining the line.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">line</i></dt>
<dd><p>The given line</p></dd>
<dt>float <i class="arg">offset</i></dt>
<dd><p>The distance to the given line</p></dd>
<dt>string <i class="arg">orient</i></dt>
<dd><p>Orientation of the new line with respect to the given line (defaults to &quot;right&quot;)</p></dd>
</dl></dd>
<dt><a name="39"><b class="cmd">::math::geometry::unitVector</b> <i class="arg">line</i></a></dt>
<dd><p>Return a unit vector from the given line or direction, if the <i class="term"><a href="../../../../index.html#line">line</a></i> argument is
a single point (then a line through the origin is assumed)
Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">line</i></dt>
<dd><p>The line in question (or a single point, implying a line through the origin)</p></dd>
</dl></dd>
<dt><a name="40"><b class="cmd">::math::geometry::pointInsidePolygon</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Determine if a point is completely inside a polygon. If the point
touches the polygon, then the point is not completely inside the
polygon.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>Coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be examined</p></dd>
</dl></dd>
<dt><a name="41"><b class="cmd">::math::geometry::pointInsidePolygonAlt</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Determine if a point is completely inside a polygon. If the point
touches the polygon, then the point is not completely inside the
polygon. <em>Note:</em> this alternative procedure uses the so-called
winding number to determine this. It handles self-intersecting polygons
in a &quot;natural&quot; way.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>Coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be examined</p></dd>
</dl></dd>
<dt><a name="42"><b class="cmd">::math::geometry::rectangleInsidePolygon</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">polyline</i></a></dt>
<dd><p>Determine if a rectangle is completely inside a polygon. If polygon
touches the rectangle, then the rectangle is not complete inside the
polygon.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P1</i></dt>
<dd><p>Upper-left corner of the rectangle</p></dd>
<dt>list <i class="arg">P2</i></dt>
<dd><p>Lower-right corner of the rectangle</p></dd>
<dt>list <i class="arg">polygon</i></dt>
<dd><p>The polygon in question</p></dd>
</dl></dd>
<dt><a name="43"><b class="cmd">::math::geometry::areaPolygon</b> <i class="arg">polygon</i></a></dt>
<dd><p>Calculate the area of a polygon.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polygon</i></dt>
<dd><p>The polygon in question</p></dd>
</dl></dd>
<dt><a name="44"><b class="cmd">::math::geometry::translate</b> <i class="arg">vector</i> <i class="arg">polyline</i></a></dt>
<dd><p>Translate a polyline over a given vector</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector</i></dt>
<dd><p>Translation vector</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be translated</p></dd>
</dl></dd>
<dt><a name="45"><b class="cmd">::math::geometry::rotate</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></dt>
<dd><p>Rotate a polyline over a given angle (degrees) around the origin</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle over which to rotate the polyline (degrees)</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be rotated</p></dd>
</dl></dd>
<dt><a name="46"><b class="cmd">::math::geometry::rotateAbout</b> <i class="arg">p</i> <i class="arg">angle</i> <i class="arg">polyline</i></a></dt>
<dd><p>Rotate a polyline around a given point p and return the new polyline.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">p</i></dt>
<dd><p>The point of rotation</p></dd>
<dt>float <i class="arg">angle</i></dt>
<dd><p>The angle over which to rotate the polyline (degrees)</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be rotated</p></dd>
</dl></dd>
<dt><a name="47"><b class="cmd">::math::geometry::reflect</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></dt>
<dd><p>Reflect a polyline in a line through the origin at a given angle (degrees) to the x-axis</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle of the line of reflection (degrees)</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be reflected</p></dd>
</dl></dd>
<dt><a name="48"><b class="cmd">::math::geometry::degToRad</b> <i class="arg">angle</i></a></dt>
<dd><p>Convert from degrees to radians</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle in degrees</p></dd>
</dl></dd>
<dt><a name="49"><b class="cmd">::math::geometry::radToDeg</b> <i class="arg">angle</i></a></dt>
<dd><p>Convert from radians to degrees</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle in radians</p></dd>
</dl></dd>
<dt><a name="50"><b class="cmd">::math::geometry::circle</b> <i class="arg">centre</i> <i class="arg">radius</i></a></dt>
<dd><p>Convenience procedure to create a circle from a point and a radius.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">centre</i></dt>
<dd><p>Coordinates of the circle centre</p></dd>
<dt>list <i class="arg">radius</i></dt>
<dd><p>Radius of the circle</p></dd>
</dl></dd>
<dt><a name="51"><b class="cmd">::math::geometry::circleTwoPoints</b> <i class="arg">point1</i> <i class="arg">point2</i></a></dt>
<dd><p>Convenience procedure to create a circle from two points on its circumference
The centre is the point between the two given points, the radius is half the
distance between them.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">point1</i></dt>
<dd><p>First point</p></dd>
<dt>list <i class="arg">point2</i></dt>
<dd><p>Second point</p></dd>
</dl></dd>
<dt><a name="52"><b class="cmd">::math::geometry::pointInsideCircle</b> <i class="arg">point</i> <i class="arg">circle</i></a></dt>
<dd><p>Determine if the given point is inside the circle or on the circumference (1)
or outside (0).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">point</i></dt>
<dd><p>Point to be checked</p></dd>
<dt>list <i class="arg">circle</i></dt>
<dd><p>Circle that may or may not contain the point</p></dd>
</dl></dd>
<dt><a name="53"><b class="cmd">::math::geometry::lineIntersectsCircle</b> <i class="arg">line</i> <i class="arg">circle</i></a></dt>
<dd><p>Determine if the given line intersects the circle or touches it (1)
or does not (0).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">line</i></dt>
<dd><p>Line to be checked</p></dd>
<dt>list <i class="arg">circle</i></dt>
<dd><p>Circle that may or may not be intersected</p></dd>
</dl></dd>
<dt><a name="54"><b class="cmd">::math::geometry::lineSegmentIntersectsCircle</b> <i class="arg">segment</i> <i class="arg">circle</i></a></dt>
<dd><p>Determine if the given line segment intersects the circle or touches it (1)
or does not (0).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">segment</i></dt>
<dd><p>Line segment to be checked</p></dd>
<dt>list <i class="arg">circle</i></dt>
<dd><p>Circle that may or may not be intersected</p></dd>
</dl></dd>
<dt><a name="55"><b class="cmd">::math::geometry::intersectionLineWithCircle</b> <i class="arg">line</i> <i class="arg">circle</i></a></dt>
<dd><p>Determine the points at which the given line intersects the circle. There can
be zero, one or two points. (If the line touches the circle or is close to it,
then one point is returned. An arbitrary margin of 1.0e-10 times the radius
is used to determine this situation.)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">line</i></dt>
<dd><p>Line to be checked</p></dd>
<dt>list <i class="arg">circle</i></dt>
<dd><p>Circle that may or may not be intersected</p></dd>
</dl></dd>
<dt><a name="56"><b class="cmd">::math::geometry::intersectionCircleWithCircle</b> <i class="arg">circle1</i> <i class="arg">circle2</i></a></dt>
<dd><p>Determine the points at which the given two circles intersect. There can
be zero, one or two points. (If the two circles touch the circle or are very close,
then one point is returned. An arbitrary margin of 1.0e-10 times the mean of the radii of
the two circles is used to determine this situation.)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">circle1</i></dt>
<dd><p>First circle</p></dd>
<dt>list <i class="arg">circle2</i></dt>
<dd><p>Second circle</p></dd>
</dl></dd>
<dt><a name="57"><b class="cmd">::math::geometry::tangentLinesToCircle</b> <i class="arg">point</i> <i class="arg">circle</i></a></dt>
<dd><p>Determine the tangent lines from the given point to the circle. There can
be zero, one or two lines. (If the point is on the cirucmference or very close to
the circle, then one line is returned. An arbitrary margin of 1.0e-10 times the
radius of the circle is used to determine this situation.)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">point</i></dt>
<dd><p>Point in question</p></dd>
<dt>list <i class="arg">circle</i></dt>
<dd><p>Circle to which the tangent lines are to be determined</p></dd>
</dl></dd>
<dt><a name="58"><b class="cmd">::math::geometry::intersectionPolylines</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <span class="opt">?mode?</span> <span class="opt">?granularity?</span></a></dt>
<dd><p>Return the first point or all points where the two polylines intersect. If the number of points in the polylines is large,
you can use the granularity to get an approximate answer faster.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>The first polyline</p></dd>
<dt>list <i class="arg">polyline2</i></dt>
<dd><p>The second polyline</p></dd>
<dt>string <i class="arg">mode</i></dt>
<dd><p>Whether to return only the first (default) or to return all intersection points (&quot;all&quot;)</p></dd>
<dt>int <i class="arg">granularity</i></dt>
<dd><p>The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)</p></dd>
</dl></dd>
<dt><a name="59"><b class="cmd">::math::geometry::intersectionPolylineCircle</b> <i class="arg">polyline</i> <i class="arg">circle</i> <span class="opt">?mode?</span> <span class="opt">?granularity?</span></a></dt>
<dd><p>Return the first point or all points where the polyline intersects the circle. If the number of points in the polyline is large,
you can use the granularity to get an approximate answer faster.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline that may intersect the circle</p></dd>
<dt>list <i class="arg">circle</i></dt>
<dd><p>The circle in question</p></dd>
<dt>string <i class="arg">mode</i></dt>
<dd><p>Whether to return only the first (default) or to return all intersection points (&quot;all&quot;)</p></dd>
<dt>int <i class="arg">granularity</i></dt>
<dd><p>The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)</p></dd>
</dl></dd>
<dt><a name="60"><b class="cmd">::math::geometry::polylineCutOrigin</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <span class="opt">?granularity?</span></a></dt>
<dd><p>Return the part of the first polyline from the origin up to the first intersection with the second. If the number of points in the polyline is large,
you can use the granularity to get an approximate answer faster.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>The first polyline (from which a part is to be returned)</p></dd>
<dt>list <i class="arg">polyline2</i></dt>
<dd><p>The second polyline</p></dd>
<dt>int <i class="arg">granularity</i></dt>
<dd><p>The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)</p></dd>
</dl></dd>
<dt><a name="61"><b class="cmd">::math::geometry::polylineCutEnd</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <span class="opt">?granularity?</span></a></dt>
<dd><p>Return the part of the first polyline from the last intersection point with the second to the end. If the number of points in the polyline is large,
you can use the granularity to get an approximate answer faster.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>The first polyline (from which a part is to be returned)</p></dd>
<dt>list <i class="arg">polyline2</i></dt>
<dd><p>The second polyline</p></dd>
<dt>int <i class="arg">granularity</i></dt>
<dd><p>The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)</p></dd>
</dl></dd>
<dt><a name="62"><b class="cmd">::math::geometry::splitPolyline</b> <i class="arg">polyline</i> <i class="arg">numberVertex</i></a></dt>
<dd><p>Split the poyline into a set of polylines where each separate polyline holds &quot;numberVertex&quot; vertices between the two end points.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be split up</p></dd>
<dt>int <i class="arg">numberVertex</i></dt>
<dd><p>The number of &quot;internal&quot; vertices</p></dd>
</dl></dd>
<dt><a name="63"><b class="cmd">::math::geometry::enrichPolyline</b> <i class="arg">polyline</i> <i class="arg">accuracy</i></a></dt>
<dd><p>Split up each segment of a polyline into a number of smaller segments and return the result.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be refined</p></dd>
<dt>int <i class="arg">accuracy</i></dt>
<dd><p>The number of subsegments to be created</p></dd>
</dl></dd>
<dt><a name="64"><b class="cmd">::math::geometry::cleanupPolyline</b> <i class="arg">polyline</i></a></dt>
<dd><p>Remove duplicate neighbouring vertices and return the result.</p>
<p>Arguments:</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be cleaned up</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">COORDINATE SYSTEM</a></h2>
<p>The coordinate system used by the package is the ordinary cartesian system, where the
positive x-axis is directed to the right and the positive y-axis is directed upwards.
Angles and directions are defined with respect to the positive x-axis in a counter-clockwise
direction, so that an angle of 90 degrees is the direction of the positive y-axis.
Note that the Tk canvas coordinates differ from this, as there the origin is located in the
upper left corner of the window. Up to and including version 1.3, the direction and octant
procedures of this package used this convention inconsistently.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http:/wiki.tcl.tk/12070">Polygon Intersection</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Line-line_intersection">http://en.wikipedia.org/wiki/Line-line_intersection</a></p></li>
<li><p><a href="http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/">http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/</a></p></li>
</ol>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: geometry</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#angle">angle</a>, <a href="../../../../index.html#distance">distance</a>, <a href="../../../../index.html#line">line</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#plane_geometry">plane geometry</a>, <a href="../../../../index.html#point">point</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2001 by Ideogramic ApS and other parties<br>

Copyright &copy; 2010 by Andreas Kupries<br>
Copyright &copy; 2010 by Kevin Kenny<br>
Copyright &copy; 2018 by Arjen Markus<br>
Copyright &copy; 2020 by Manfred Rosenberger</p>
</div>
</div></body></html>







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|









|









|









|










|








|









|








|






|











|









|









|









|
|







|

















|









|













|






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|









|











|











|





|





|

|





|

<
<
<
<
<
<
<
<
<
<
<
|







|





|





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|
<
<
<
<
<
<
<
<
<






|






<
<
<
<
<
<


|






>

|
<
<


270
271
272
273
274
275
276
























277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452

























































453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508











509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528



























































































































































529
530
531









532
533
534
535
536
537
538
539
540
541
542
543
544






545
546
547
548
549
550
551
552
553
554
555
556


557
558
<dt><a name="14"><b class="cmd">::math::geometry::angle</b> <i class="arg">line</i></a></dt>
<dd><p>Calculate the angle from the positive x-axis to a given line
(in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">line</i></dt>
<dd><p>Coordinates of the line</p></dd>
</dl></dd>
























<dt><a name="15"><b class="cmd">::math::geometry::calculateDistanceToLine</b> <i class="arg">P</i> <i class="arg">line</i></a></dt>
<dd><p>Calculate the distance of point P to the (infinite) line and return the
result</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">line</i></dt>
<dd><p>List of four numbers, the coordinates of two points
on the line</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::geometry::calculateDistanceToLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></dt>
<dd><p>Calculate the distance of point P to the (finite) line segment and
return the result.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">linesegment</i></dt>
<dd><p>List of four numbers, the coordinates of the
first and last points of the line segment</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">::math::geometry::calculateDistanceToPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Calculate the distance of point P to the polyline and
return the result. Note that a polyline needs not to be closed.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>List of numbers, the coordinates of the
vertices of the polyline</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::geometry::calculateDistanceToPolygon</b> <i class="arg">P</i> <i class="arg">polygon</i></a></dt>
<dd><p>Calculate the distance of point P to the polygon and
return the result. If the list of coordinates is not closed (first and last
points differ), it is automatically closed.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">polygon</i></dt>
<dd><p>List of numbers, the coordinates of the
vertices of the polygon</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::geometry::findClosestPointOnLine</b> <i class="arg">P</i> <i class="arg">line</i></a></dt>
<dd><p>Return the point on a line which is closest to a given point.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">line</i></dt>
<dd><p>List of four numbers, the coordinates of two points
on the line</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::geometry::findClosestPointOnLineSegment</b> <i class="arg">P</i> <i class="arg">linesegment</i></a></dt>
<dd><p>Return the point on a <em>line segment</em> which is closest to a given
point.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">linesegment</i></dt>
<dd><p>List of four numbers, the first and last
points on the line segment</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::geometry::findClosestPointOnPolyline</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Return the point on a <em>polyline</em> which is closest to a given
point.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>List of two numbers, the coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>List of numbers, the vertices of the polyline</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::geometry::lengthOfPolyline</b> <i class="arg">polyline</i></a></dt>
<dd><p>Return the length of the <em>polyline</em> (note: it not regarded as a
polygon)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline</i></dt>
<dd><p>List of numbers, the vertices of the polyline</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::geometry::movePointInDirection</b> <i class="arg">P</i> <i class="arg">direction</i> <i class="arg">dist</i></a></dt>
<dd><p>Move a point over a given distance in a given direction and return the
new coordinates (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>Coordinates of the point to be moved</p></dd>
<dt>double <i class="arg">direction</i></dt>
<dd><p>Direction (in degrees; 0 is to the right, 90
upwards)</p></dd>
<dt>list <i class="arg">dist</i></dt>
<dd><p>Distance over which to move the point</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::geometry::lineSegmentsIntersect</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></dt>
<dd><p>Check if two line segments intersect or coincide. Returns 1 if that is
the case, 0 otherwise (in two dimensions only). If an endpoint of one segment lies on
the other segment (or is very close to the segment), they are considered to intersect</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">linesegment1</i></dt>
<dd><p>First line segment</p></dd>
<dt>list <i class="arg">linesegment2</i></dt>
<dd><p>Second line segment</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::geometry::findLineSegmentIntersection</b> <i class="arg">linesegment1</i> <i class="arg">linesegment2</i></a></dt>
<dd><p>Find the intersection point of two line segments. Return the coordinates
or the keywords &quot;coincident&quot; or &quot;none&quot; if the line segments coincide or
have no points in common (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">linesegment1</i></dt>
<dd><p>First line segment</p></dd>
<dt>list <i class="arg">linesegment2</i></dt>
<dd><p>Second line segment</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::geometry::findLineIntersection</b> <i class="arg">line1</i> <i class="arg">line2</i></a></dt>
<dd><p>Find the intersection point of two (infinite) lines. Return the coordinates
or the keywords &quot;coincident&quot; or &quot;none&quot; if the lines coincide or
have no points in common (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">line1</i></dt>
<dd><p>First line</p></dd>
<dt>list <i class="arg">line2</i></dt>
<dd><p>Second line</p></dd>
</dl>
<p>See section <span class="sectref"><a href="#section3">References</a></span> for details on the algorithm and math behind it.</p></dd>
<dt><a name="27"><b class="cmd">::math::geometry::polylinesIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i></a></dt>
<dd><p>Check if two polylines intersect or not (in two dimensions only).</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>First polyline</p></dd>
<dt>list <i class="arg">polyline2</i></dt>
<dd><p>Second polyline</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::geometry::polylinesBoundingIntersect</b> <i class="arg">polyline1</i> <i class="arg">polyline2</i> <i class="arg">granularity</i></a></dt>
<dd><p>Check whether two polylines intersect, but reduce
the correctness of the result to the given granularity.
Use this for faster, but weaker, intersection checking.</p>
<p>How it works:</p>
<p>Each polyline is split into a number of smaller polylines,
consisting of granularity points each. If a pair of those smaller
lines' bounding boxes intersect, then this procedure returns 1,
otherwise it returns 0.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline1</i></dt>
<dd><p>First polyline</p></dd>
<dt>list <i class="arg">polyline2</i></dt>
<dd><p>Second polyline</p></dd>
<dt>int <i class="arg">granularity</i></dt>
<dd><p>Number of points in each part (&lt;=1 means check
every edge)</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::geometry::intervalsOverlap</b> <i class="arg">y1</i> <i class="arg">y2</i> <i class="arg">y3</i> <i class="arg">y4</i> <i class="arg">strict</i></a></dt>
<dd><p>Check if two intervals overlap.</p>
<dl class="doctools_arguments">
<dt>double <i class="arg">y1,y2</i></dt>
<dd><p>Begin and end of first interval</p></dd>
<dt>double <i class="arg">y3,y4</i></dt>
<dd><p>Begin and end of second interval</p></dd>
<dt>logical <i class="arg">strict</i></dt>
<dd><p>Check for strict or non-strict overlap</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd">::math::geometry::rectanglesOverlap</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">Q1</i> <i class="arg">Q2</i> <i class="arg">strict</i></a></dt>
<dd><p>Check if two rectangles overlap.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P1</i></dt>
<dd><p>upper-left corner of the first rectangle</p></dd>
<dt>list <i class="arg">P2</i></dt>
<dd><p>lower-right corner of the first rectangle</p></dd>
<dt>list <i class="arg">Q1</i></dt>
<dd><p>upper-left corner of the second rectangle</p></dd>
<dt>list <i class="arg">Q2</i></dt>
<dd><p>lower-right corner of the second rectangle</p></dd>
<dt>list <i class="arg">strict</i></dt>
<dd><p>choosing strict or non-strict interpretation</p></dd>
</dl></dd>
<dt><a name="31"><b class="cmd">::math::geometry::bbox</b> <i class="arg">polyline</i></a></dt>
<dd><p>Calculate the bounding box of a polyline. Returns a list of four
coordinates: the upper-left and the lower-right corner of the box.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be examined</p></dd>
</dl></dd>

























































<dt><a name="32"><b class="cmd">::math::geometry::pointInsidePolygon</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Determine if a point is completely inside a polygon. If the point
touches the polygon, then the point is not completely inside the
polygon.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>Coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be examined</p></dd>
</dl></dd>
<dt><a name="33"><b class="cmd">::math::geometry::pointInsidePolygonAlt</b> <i class="arg">P</i> <i class="arg">polyline</i></a></dt>
<dd><p>Determine if a point is completely inside a polygon. If the point
touches the polygon, then the point is not completely inside the
polygon. <em>Note:</em> this alternative procedure uses the so-called
winding number to determine this. It handles self-intersecting polygons
in a &quot;natural&quot; way.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P</i></dt>
<dd><p>Coordinates of the point</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be examined</p></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">::math::geometry::rectangleInsidePolygon</b> <i class="arg">P1</i> <i class="arg">P2</i> <i class="arg">polyline</i></a></dt>
<dd><p>Determine if a rectangle is completely inside a polygon. If polygon
touches the rectangle, then the rectangle is not complete inside the
polygon.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">P1</i></dt>
<dd><p>Upper-left corner of the rectangle</p></dd>
<dt>list <i class="arg">P2</i></dt>
<dd><p>Lower-right corner of the rectangle</p></dd>
<dt>list <i class="arg">polygon</i></dt>
<dd><p>The polygon in question</p></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">::math::geometry::areaPolygon</b> <i class="arg">polygon</i></a></dt>
<dd><p>Calculate the area of a polygon.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">polygon</i></dt>
<dd><p>The polygon in question</p></dd>
</dl></dd>
<dt><a name="36"><b class="cmd">::math::geometry::translate</b> <i class="arg">vector</i> <i class="arg">polyline</i></a></dt>
<dd><p>Translate a polyline over a given vector</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">vector</i></dt>
<dd><p>Translation vector</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be rotated</p></dd>
</dl></dd>
<dt><a name="37"><b class="cmd">::math::geometry::rotate</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></dt>
<dd><p>Rotate a polyline over a given angle (degrees) around the origin</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle over which to rotate the polyline (degrees)</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be translated</p></dd>
</dl></dd>











<dt><a name="38"><b class="cmd">::math::geometry::reflect</b> <i class="arg">angle</i> <i class="arg">polyline</i></a></dt>
<dd><p>Reflect a polyline in a line through the origin at a given angle (degrees) to the x-axis</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle of the line of reflection (degrees)</p></dd>
<dt>list <i class="arg">polyline</i></dt>
<dd><p>The polyline to be reflected</p></dd>
</dl></dd>
<dt><a name="39"><b class="cmd">::math::geometry::degToRad</b> <i class="arg">angle</i></a></dt>
<dd><p>Convert from degrees to radians</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle in degrees</p></dd>
</dl></dd>
<dt><a name="40"><b class="cmd">::math::geometry::radToDeg</b> <i class="arg">angle</i></a></dt>
<dd><p>Convert from radians to degrees</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">angle</i></dt>
<dd><p>Angle in radians</p></dd>
</dl></dd>



























































































































































</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>









<ol class="doctools_enumerated">
<li><p><a href="http:/wiki.tcl.tk/12070">Polygon Intersection</a></p></li>
<li><p><a href="http://en.wikipedia.org/wiki/Line-line_intersection">http://en.wikipedia.org/wiki/Line-line_intersection</a></p></li>
<li><p><a href="http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/">http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/</a></p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: geometry</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key582">angle</a>, <a href="../../../../index.html#key479">distance</a>, <a href="../../../../index.html#key580">line</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key579">plane geometry</a>, <a href="../../../../index.html#key581">point</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2001 by Ideogramic ApS and other parties<br>
Copyright &copy; 2004 by Arjen Markus<br>
Copyright &copy; 2010 by Andreas Kupries<br>
Copyright &copy; 2010 by Kevin Kenny</p>


</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/numtheory.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>math::numtheory - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>math::numtheory - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

155
156
157
158
159
160
161
162
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'numtheory.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2010 Lars Hellstr&amp;ouml;m &amp;lt;Lars dot Hellstrom at residenset dot net&amp;gt;
   -->
<!-- math::numtheory.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::numtheory(n) 1.1.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::numtheory - Number Theory</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::numtheory <span class="opt">?1.1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">math::numtheory::isprime</b> <i class="arg">N</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>
<li><a href="#2"><b class="cmd">math::numtheory::firstNprimes</b> <i class="arg">N</i></a></li>
<li><a href="#3"><b class="cmd">math::numtheory::primesLowerThan</b> <i class="arg">N</i></a></li>
<li><a href="#4"><b class="cmd">math::numtheory::primeFactors</b> <i class="arg">N</i></a></li>
<li><a href="#5"><b class="cmd">math::numtheory::primesLowerThan</b> <i class="arg">N</i></a></li>
<li><a href="#6"><b class="cmd">math::numtheory::primeFactors</b> <i class="arg">N</i></a></li>
<li><a href="#7"><b class="cmd">math::numtheory::uniquePrimeFactors</b> <i class="arg">N</i></a></li>
<li><a href="#8"><b class="cmd">math::numtheory::factors</b> <i class="arg">N</i></a></li>
<li><a href="#9"><b class="cmd">math::numtheory::totient</b> <i class="arg">N</i></a></li>
<li><a href="#10"><b class="cmd">math::numtheory::moebius</b> <i class="arg">N</i></a></li>
<li><a href="#11"><b class="cmd">math::numtheory::legendre</b> <i class="arg">a</i> <i class="arg">p</i></a></li>
<li><a href="#12"><b class="cmd">math::numtheory::jacobi</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#13"><b class="cmd">math::numtheory::gcd</b> <i class="arg">m</i> <i class="arg">n</i></a></li>
<li><a href="#14"><b class="cmd">math::numtheory::lcm</b> <i class="arg">m</i> <i class="arg">n</i></a></li>
<li><a href="#15"><b class="cmd">math::numtheory::numberPrimesGauss</b> <i class="arg">N</i></a></li>
<li><a href="#16"><b class="cmd">math::numtheory::numberPrimesLegendre</b> <i class="arg">N</i></a></li>
<li><a href="#17"><b class="cmd">math::numtheory::numberPrimesLegendreModified</b> <i class="arg">N</i></a></li>
<li><a href="#18"><b class="cmd">math::numtheory::differenceNumberPrimesLegendreModified</b> <i class="arg">lower</i> <i class="arg">upper</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is for collecting various number-theoretic operations, with

a slight bias to prime numbers.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">math::numtheory::isprime</b> <i class="arg">N</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>The <b class="cmd">isprime</b> command tests whether the integer <i class="arg">N</i> is a
  prime, returning a boolean true value for prime <i class="arg">N</i> and a
  boolean false value for non-prime <i class="arg">N</i>. The formal definition of
  'prime' used is the conventional, that the number being tested is
  greater than 1 and only has trivial divisors.</p>







|

|

|



|
|
|
|
|
|


|


















|



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|
>
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132

















133
134
135
136
137
138
139
140
141
142
143
144
145
146
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'numtheory.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;
   -->
<! -- math::numtheory.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::numtheory(n) 1.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::numtheory - Number Theory</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::numtheory <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">math::numtheory::isprime</b> <i class="arg">N</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></li>

















</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package is for collecting various number-theoretic operations,
though at the moment it only provides that of testing whether an
integer is a prime.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">math::numtheory::isprime</b> <i class="arg">N</i> <span class="opt">?<i class="arg">option</i> <i class="arg">value</i> ...?</span></a></dt>
<dd><p>The <b class="cmd">isprime</b> command tests whether the integer <i class="arg">N</i> is a
  prime, returning a boolean true value for prime <i class="arg">N</i> and a
  boolean false value for non-prime <i class="arg">N</i>. The formal definition of
  'prime' used is the conventional, that the number being tested is
  greater than 1 and only has trivial divisors.</p>
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<dt><b class="option">-randommr</b> <i class="arg">repetitions</i></dt>
<dd><p>which controls how many times the Miller-Rabin test should be
    repeated with randomly chosen bases. Each repetition reduces the
    probability of a false positive by a factor at least 4. The
    default for <i class="arg">repetitions</i> is 4.</p></dd>
</dl>
<p>Unknown options are silently ignored.</p></dd>
<dt><a name="2"><b class="cmd">math::numtheory::firstNprimes</b> <i class="arg">N</i></a></dt>
<dd><p>Return the first N primes</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Number of primes to return</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">math::numtheory::primesLowerThan</b> <i class="arg">N</i></a></dt>
<dd><p>Return the prime numbers lower/equal to N</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Maximum number to consider</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">math::numtheory::primeFactors</b> <i class="arg">N</i></a></dt>
<dd><p>Return a list of the prime numbers in the number N</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Number to be factorised</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">math::numtheory::primesLowerThan</b> <i class="arg">N</i></a></dt>
<dd><p>Return the prime numbers lower/equal to N</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Maximum number to consider</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">math::numtheory::primeFactors</b> <i class="arg">N</i></a></dt>
<dd><p>Return a list of the prime numbers in the number N</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Number to be factorised</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">math::numtheory::uniquePrimeFactors</b> <i class="arg">N</i></a></dt>
<dd><p>Return a list of the <em>unique</em> prime numbers in the number N</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Number to be factorised</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">math::numtheory::factors</b> <i class="arg">N</i></a></dt>
<dd><p>Return a list of all <em>unique</em> factors in the number N, including 1 and N itself</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Number to be factorised</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">math::numtheory::totient</b> <i class="arg">N</i></a></dt>
<dd><p>Evaluate the Euler totient function for the number N (number of numbers
relatively prime to N)</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Number in question</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">math::numtheory::moebius</b> <i class="arg">N</i></a></dt>
<dd><p>Evaluate the Moebius function for the number N</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Number in question</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">math::numtheory::legendre</b> <i class="arg">a</i> <i class="arg">p</i></a></dt>
<dd><p>Evaluate the Legendre symbol (a/p)</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">a</i> (in)</dt>
<dd><p>Upper number in the symbol</p></dd>
<dt>integer <i class="arg">p</i> (in)</dt>
<dd><p>Lower number in the symbol (must be non-zero)</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">math::numtheory::jacobi</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Evaluate the Jacobi symbol (a/b)</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">a</i> (in)</dt>
<dd><p>Upper number in the symbol</p></dd>
<dt>integer <i class="arg">b</i> (in)</dt>
<dd><p>Lower number in the symbol (must be odd)</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">math::numtheory::gcd</b> <i class="arg">m</i> <i class="arg">n</i></a></dt>
<dd><p>Return the greatest common divisor of <i class="term">m</i> and <i class="term">n</i></p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">m</i> (in)</dt>
<dd><p>First number</p></dd>
<dt>integer <i class="arg">n</i> (in)</dt>
<dd><p>Second number</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">math::numtheory::lcm</b> <i class="arg">m</i> <i class="arg">n</i></a></dt>
<dd><p>Return the lowest common multiple of <i class="term">m</i> and <i class="term">n</i></p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">m</i> (in)</dt>
<dd><p>First number</p></dd>
<dt>integer <i class="arg">n</i> (in)</dt>
<dd><p>Second number</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">math::numtheory::numberPrimesGauss</b> <i class="arg">N</i></a></dt>
<dd><p>Estimate the number of primes according the formula by Gauss.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Number in question, should be larger than 0</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">math::numtheory::numberPrimesLegendre</b> <i class="arg">N</i></a></dt>
<dd><p>Estimate the number of primes according the formula by Legendre.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Number in question, should be larger than 0</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">math::numtheory::numberPrimesLegendreModified</b> <i class="arg">N</i></a></dt>
<dd><p>Estimate the number of primes according the modified formula by Legendre.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">N</i> (in)</dt>
<dd><p>Number in question, should be larger than 0</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">math::numtheory::differenceNumberPrimesLegendreModified</b> <i class="arg">lower</i> <i class="arg">upper</i></a></dt>
<dd><p>Estimate the number of primes between tow limits according the modified formula by Legendre.</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">lower</i> (in)</dt>
<dd><p>Lower limit for the primes, should be larger than 0</p></dd>
<dt>integer <i class="arg">upper</i> (in)</dt>
<dd><p>Upper limit for the primes, should be larger than 0</p></dd>
</dl></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: numtheory</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#number_theory">number theory</a>, <a href="../../../../index.html#prime">prime</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









<
<
<
<
<
<


|








161
162
163
164
165
166
167

















































































































168
169
170
171
172
173
174
175
176






177
178
179
180
181
182
183
184
185
186
187
<dt><b class="option">-randommr</b> <i class="arg">repetitions</i></dt>
<dd><p>which controls how many times the Miller-Rabin test should be
    repeated with randomly chosen bases. Each repetition reduces the
    probability of a false positive by a factor at least 4. The
    default for <i class="arg">repetitions</i> is 4.</p></dd>
</dl>
<p>Unknown options are silently ignored.</p></dd>

















































































































</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: numtheory</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key772">number theory</a>, <a href="../../../../index.html#key773">prime</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010 Lars Hellstr&ouml;m &lt;Lars dot Hellstrom at residenset dot net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/optimize.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::optimize - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::optimize - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'optimize.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2004,2005 Kevn B. Kenny &amp;lt;kennykb@users.sourceforge.net&amp;gt;
   -->
<!-- math::optimize.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::optimize(n) 1.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::optimize - Optimisation routines</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'optimize.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;   -- Copyright &copy; 2004,2005 Kevn B. Kenny &lt;kennykb@users.sourceforge.net&gt;
   -->
<! -- math::optimize.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::optimize(n) 1.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::optimize - Optimisation routines</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: optimize</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#linear_program">linear program</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#maximum">maximum</a>, <a href="../../../../index.html#minimum">minimum</a>, <a href="../../../../index.html#optimization">optimization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;<br>
Copyright &copy; 2004,2005 Kevn B. Kenny &lt;kennykb@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|









377
378
379
380
381
382
383






384
385
386
387
388
389
390
391
392
393
394
395
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: optimize</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key312">linear program</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key310">maximum</a>, <a href="../../../../index.html#key309">minimum</a>, <a href="../../../../index.html#key311">optimization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;<br>
Copyright &copy; 2004,2005 Kevn B. Kenny &lt;kennykb@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/math/pca.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!DOCTYPE html><html><head>
<title>math::PCA - Principal Components Analysis</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pca.man' by tcllib/doctools with format 'html'
   -->
<!-- math::PCA.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::PCA(n) 1.0 tcllib &quot;Principal Components Analysis&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::PCA - Package for Principal Component Analysis</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">EXAMPLE</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.6?</span></b></li>
<li>package require <b class="pkgname">math::linearalgebra 1.0</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::PCA::createPCA</b> <i class="arg">data</i> <span class="opt">?args?</span></a></li>
<li><a href="#2"><b class="cmd">$pca using</b> <span class="opt">?number?</span>|<span class="opt">?-minproportion value?</span></a></li>
<li><a href="#3"><b class="cmd">$pca eigenvectors</b> <span class="opt">?option?</span></a></li>
<li><a href="#4"><b class="cmd">$pca eigenvalues</b> <span class="opt">?option?</span></a></li>
<li><a href="#5"><b class="cmd">$pca proportions</b> <span class="opt">?option?</span></a></li>
<li><a href="#6"><b class="cmd">$pca approximate</b> <i class="arg">observation</i></a></li>
<li><a href="#7"><b class="cmd">$pca approximatOriginal</b></a></li>
<li><a href="#8"><b class="cmd">$pca scores</b> <i class="arg">observation</i></a></li>
<li><a href="#9"><b class="cmd">$pca distance</b> <i class="arg">observation</i></a></li>
<li><a href="#10"><b class="cmd">$pca qstatistic</b> <i class="arg">observation</i> <span class="opt">?option?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The PCA package provides a means to perform principal components analysis
in Tcl, using an object-oriented technique as facilitated by TclOO. It
actually defines a single public method, <i class="term">::math::PCA::createPCA</i>,
which constructs an object based on the data that are passed to perform
the actual analysis.</p>
<p>The methods of the PCA objects that are created with this command allow one
to examine the principal components, to approximate (new) observations
using all or a selected number of components only and to examine the
properties of the components and the statistics of the approximations.</p>
<p>The package has been modelled after the PCA example provided by the
original linear algebra package by Ed Hume.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<p>The <i class="term">math::PCA</i> package provides one public command:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::PCA::createPCA</b> <i class="arg">data</i> <span class="opt">?args?</span></a></dt>
<dd><p>Create a new object, based on the data that are passed via the <i class="term">data</i> argument.
The principal components may be based on either correlations or covariances.
All observations will be normalised according to the mean and standard deviation
of the original data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- A list of observations (see the example below).</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>- A list of key-value pairs defining the options. Currently there is
only one key: <i class="term">-covariances</i>. This indicates if covariances are to be used
(if the value is 1) or instead correlations (value is 0). The default is to use
correlations.</p></dd>
</dl></dd>
</dl>
<p>The PCA object that is created has the following methods:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">$pca using</b> <span class="opt">?number?</span>|<span class="opt">?-minproportion value?</span></a></dt>
<dd><p>Set the number of components to be used in the analysis (the number of retained components).
Returns the number of components, also if no argument is given.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">number</i></dt>
<dd><p>- The number of components to be retained</p></dd>
<dt>double <i class="arg">value</i></dt>
<dd><p>- Select the number of components based on the minimum proportion
of variation that is retained by them. Should be a value between 0 and 1.</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">$pca eigenvectors</b> <span class="opt">?option?</span></a></dt>
<dd><p>Return the eigenvectors as a list of lists.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">option</i></dt>
<dd><p>- By default only the <em>retained</em> components are returned.
If all eigenvectors are required, use the option <i class="term">-all</i>.</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">$pca eigenvalues</b> <span class="opt">?option?</span></a></dt>
<dd><p>Return the eigenvalues as a list of lists.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">option</i></dt>
<dd><p>- By default only the eigenvalues of the <em>retained</em> components are returned.
If all eigenvalues are required, use the option <i class="term">-all</i>.</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">$pca proportions</b> <span class="opt">?option?</span></a></dt>
<dd><p>Return the proportions for all components, that is, the amount of variations that each
components can explain.</p></dd>
<dt><a name="6"><b class="cmd">$pca approximate</b> <i class="arg">observation</i></a></dt>
<dd><p>Return an approximation of the observation based on the retained components</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">observation</i></dt>
<dd><p>- The values for the observation.</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">$pca approximatOriginal</b></a></dt>
<dd><p>Return an approximation of the original data, using the retained components. It is
a convenience method that works on the complete set of original data.</p></dd>
<dt><a name="8"><b class="cmd">$pca scores</b> <i class="arg">observation</i></a></dt>
<dd><p>Return the scores per retained component for the given observation.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">observation</i></dt>
<dd><p>- The values for the observation.</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">$pca distance</b> <i class="arg">observation</i></a></dt>
<dd><p>Return the distance between the given observation and its approximation. (Note:
this distance is based on the normalised vectors.)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">observation</i></dt>
<dd><p>- The values for the observation.</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">$pca qstatistic</b> <i class="arg">observation</i> <span class="opt">?option?</span></a></dt>
<dd><p>Return the Q statistic, basically the square of the distance, for the given observation.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">observation</i></dt>
<dd><p>- The values for the observation.</p></dd>
<dt>string <i class="arg">option</i></dt>
<dd><p>- If the observation is part of the original data, you may want
to use the corrected Q statistic. This is achieved with the option &quot;-original&quot;.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLE</a></h2>
<p>TODO: NIST example</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>PCA</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#pca">PCA</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#statistics">statistics</a>, <a href="../../../../index.html#tcl">tcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/math/polynomials.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::polynomials - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::polynomials - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'polynomials.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;
   -->
<!-- math::polynomials.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::polynomials(n) 1.0.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::polynomials - Polynomial functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'polynomials.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;
   -->
<! -- math::polynomials.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::polynomials(n) 1.0.1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::polynomials - Polynomial functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: polynomials</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#polynomial_functions">polynomial functions</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








286
287
288
289
290
291
292






293
294
295
296
297
298
299
300
301
302
303
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: polynomials</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key814">polynomial functions</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/math/probopt.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!DOCTYPE html><html><head>
<title>math::probopt - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'probopt.man' by tcllib/doctools with format 'html'
   -->
<!-- math::probopt.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::probopt(n) 1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::probopt - Probabilistic optimisation methods</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">DETAILS ON THE ALGORITHMS</a></li>
<li class="doctools_section"><a href="#section3">References</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">math::probopt 1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::probopt::pso</b> <i class="arg">function</i> <i class="arg">bounds</i> <i class="arg">args</i></a></li>
<li><a href="#2"><b class="cmd">::math::probopt::sce</b> <i class="arg">function</i> <i class="arg">bounds</i> <i class="arg">args</i></a></li>
<li><a href="#3"><b class="cmd">::math::probopt::diffev</b> <i class="arg">function</i> <i class="arg">bounds</i> <i class="arg">args</i></a></li>
<li><a href="#4"><b class="cmd">::math::probopt::lipoMax</b> <i class="arg">function</i> <i class="arg">bounds</i> <i class="arg">args</i></a></li>
<li><a href="#5"><b class="cmd">::math::probopt::adaLipoMax</b> <i class="arg">function</i> <i class="arg">bounds</i> <i class="arg">args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The purpose of the <b class="package">math::probopt</b> package is to provide various optimisation
algorithms that are based on probabilistic techniques. The results of these algorithms
may therefore vary from one run to the next. The algorithms are all well-known and
well described and proponents generally claim they are efficient and reliable.</p>
<p>As most of these algorithms have one or more tunable parameters or even variations,
the interface to each accepts options to set these parameters or the select
the variation. These take the form of key-value pairs, for instance, <i class="term">-iterations 100</i>.</p>
<p>This manual does not offer any recommendations with regards to these algorithms, nor
does it provide much in the way of guidelines for the parameters. For this we refer to
online articles on the algorithms in question.</p>
<p>A few notes, however:</p>
<ul class="doctools_itemized">
<li><p>With the exception of LIPO, the algorithms are capable of dealing with irregular (non-smooth) and even discontinuous
functions.</p></li>
<li><p>The results depend on the random number seeding and are likely not to be very accurate, especially if the function
varies slowly in the vicinty of the optimum. They do give a good starting point for a deterministic algorithm.</p></li>
</ul>
<p>The collection consists of the following algorithms:</p>
<ul class="doctools_itemized">
<li><p>PSO - particle swarm optimisation</p></li>
<li><p>SCE - shuffled complexes evolution</p></li>
<li><p>DE - differential evolution</p></li>
<li><p>LIPO - Lipschitz optimisation</p></li>
</ul>
<p>The various procedures have a uniform interface:</p>
<pre class="doctools_example">
   set result [::math::probopt::algorithm function bounds args]
</pre>
<p>The arguments have the following meaning:</p>
<ul class="doctools_itemized">
<li><p>The argument <i class="term">function</i> is the name of the procedure that evaluates the function.
Its interface is:</p>
<pre class="doctools_example">
    set value [function coords]
</pre>
<p>where <i class="term">coords</i> is a list of coordinates at which to evaluate the function. It is
supposed to return the function value.</p></li>
<li><p>The argument <i class="term">bounds</i> is a list of pairs of minimum and maximum for each coordinate.
This list implicitly determines the dimension of the coordinate space in which the optimum
is to be sought, for instance for a function like <i class="term">x**2 + (y-1)**4</i>, you may specify
the bounds as <i class="term">{{-1 1} {-1 1}}</i>, that is, two pairs for the two coordinates.</p></li>
<li><p>The rest (<i class="term">args</i>) consists of zero or more key-value pairs to specify the options. Which
options are supported by which algorithm, is documented below.</p></li>
</ul>
<p>The result of the various optimisation procedures is a dictionary containing at least the
following elements:</p>
<ul class="doctools_itemized">
<li><p><i class="term">optimum-coordinates</i> is a list containing the coordinates of the optimum that was found.</p></li>
<li><p><i class="term">optimum-value</i> is the function value at those coordinates.</p></li>
<li><p><i class="term">evaluations</i> is the number of function evaluations.</p></li>
<li><p><i class="term">best-values</i> is a list of successive best values, obtained as
part of the iterations.</p></li>
</ul>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">DETAILS ON THE ALGORITHMS</a></h2>
<p>The algorithms in the package are the following:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::probopt::pso</b> <i class="arg">function</i> <i class="arg">bounds</i> <i class="arg">args</i></a></dt>
<dd><p>The &quot;particle swarm optimisation&quot; algorithm uses the idea that the candidate
optimum points should swarm around the best point found so far, with
variations to allow for improvements.</p>
<p>It recognises the following options:</p>
<ul class="doctools_itemized">
<li><p><i class="term">-swarmsize number</i>: Number of particles to consider (default: 50)</p></li>
<li><p><i class="term">-vweight    value</i>: Weight for the current &quot;velocity&quot; (0-1, default: 0.5)</p></li>
<li><p><i class="term">-pweight    value</i>: Weight for the individual particle's best position (0-1, default: 0.3)</p></li>
<li><p><i class="term">-gweight    value</i>: Weight for the &quot;best&quot; overall position as per particle (0-1, default: 0.3)</p></li>
<li><p><i class="term">-type       local/global</i>: Type of optimisation</p></li>
<li><p><i class="term">-neighbours number</i>: Size of the neighbourhood (default: 5, used if &quot;local&quot;)</p></li>
<li><p><i class="term">-iterations number</i>: Maximum number of iterations</p></li>
<li><p><i class="term">-tolerance  value</i>: Absolute minimal improvement for minimum value</p></li>
</ul></dd>
<dt><a name="2"><b class="cmd">::math::probopt::sce</b> <i class="arg">function</i> <i class="arg">bounds</i> <i class="arg">args</i></a></dt>
<dd><p>The &quot;shuffled complex evolution&quot; algorithm is an extension of the Nelder-Mead algorithm that
uses multiple complexes and reorganises these complexes to find the &quot;global&quot; optimum.</p>
<p>It recognises the following options:</p>
<ul class="doctools_itemized">
<li><p><i class="term">-complexes           number</i>: Number of particles to consider (default: 2)</p></li>
<li><p><i class="term">-mincomplexes        number</i>: Minimum number of complexes (default: 2; not currently used)</p></li>
<li><p><i class="term">-newpoints           number</i>: Number of new points to be generated (default: 1)</p></li>
<li><p><i class="term">-shuffle             number</i>: Number of iterations after which to reshuffle the complexes (if set to 0, the default, a number will be calculated from the number of dimensions)</p></li>
<li><p><i class="term">-pointspercomplex    number</i>: Number of points per complex (if set to 0, the default, a number will be calculated from the number of dimensions)</p></li>
<li><p><i class="term">-pointspersubcomplex number</i>: Number of points per subcomplex (used to select the best points in each complex; if set to 0, the default, a number will be calculated from the number of dimensions)</p></li>
<li><p><i class="term">-iterations          number</i>: Maximum number of iterations (default: 100)</p></li>
<li><p><i class="term">-maxevaluations      number</i>: Maximum number of function evaluations (when this number is reached the iteration is broken off. Default: 1000 million)</p></li>
<li><p><i class="term">-abstolerance        value</i>: Absolute minimal improvement for minimum value (default: 0.0)</p></li>
<li><p><i class="term">-reltolerance        value</i>: Relative minimal improvement for minimum value (default: 0.001)</p></li>
</ul></dd>
<dt><a name="3"><b class="cmd">::math::probopt::diffev</b> <i class="arg">function</i> <i class="arg">bounds</i> <i class="arg">args</i></a></dt>
<dd><p>The &quot;differential evolution&quot; algorithm uses a number of initial points that are then updated using randomly selected points. It is more or less akin
to genetic algorithms. It is controlled by two parameters, factor and lambda, where the first determines the update via random points and the second
the update with the best point found sofar.</p>
<p>It recognises the following options:</p>
<ul class="doctools_itemized">
<li><p><i class="term">-iterations          number</i>: Maximum number of iterations (default: 100)</p></li>
<li><p><i class="term">-number              number</i>: Number of point to work with (if set to 0, the default, it is calculated from the number of dimensions)</p></li>
<li><p><i class="term">-factor              value</i>: Weight of randomly selected points in the updating (0-1, default: 0.6)</p></li>
<li><p><i class="term">-lambda              value</i>: Weight of the best point found so far in the updating (0-1, default: 0.0)</p></li>
<li><p><i class="term">-crossover           value</i>: Fraction of new points to be considered for replacing the old ones (0-1, default: 0.5)</p></li>
<li><p><i class="term">-maxevaluations      number</i>: Maximum number of function evaluations (when this number is reached the iteration is broken off. Default: 1000 million)</p></li>
<li><p><i class="term">-abstolerance        value</i>: Absolute minimal improvement for minimum value (default: 0.0)</p></li>
<li><p><i class="term">-reltolerance        value</i>: Relative minimal improvement for minimum value (default: 0.001)</p></li>
</ul></dd>
<dt><a name="4"><b class="cmd">::math::probopt::lipoMax</b> <i class="arg">function</i> <i class="arg">bounds</i> <i class="arg">args</i></a></dt>
<dd><p>The &quot;Lipschitz optimisation&quot; algorithm uses the &quot;Lipschitz&quot; property of the given function to find a <em>maximum</em> in the given bounding box. There are
two variants, <i class="term">lipoMax</i> assumes a fixed estimate for the Lipschitz parameter.</p>
<p>It recognises the following options:</p>
<ul class="doctools_itemized">
<li><p><i class="term">-iterations          number</i>: Number of iterations (equals the actual number of function evaluations, default: 100)</p></li>
<li><p><i class="term">-lipschitz           value</i>: Estimate of the Lipschitz parameter (default: 10.0)</p></li>
</ul></dd>
<dt><a name="5"><b class="cmd">::math::probopt::adaLipoMax</b> <i class="arg">function</i> <i class="arg">bounds</i> <i class="arg">args</i></a></dt>
<dd><p>The &quot;adaptive Lipschitz optimisation&quot; algorithm uses the &quot;Lipschitz&quot; property of the given function to find a <em>maximum</em> in the given bounding box. The adaptive
variant actually uses two phases to find a suitable estimate for the Lipschitz parameter. This is controlled by the &quot;Bernoulli&quot; parameter.</p>
<p>When you specify a large number of iterations, the algorithm may take a very long time to complete as it is trying to improve on the Lipschitz parameter and
the chances of hitting a better estimate diminish fast.</p>
<p>It recognises the following options:</p>
<ul class="doctools_itemized">
<li><p><i class="term">-iterations          number</i>: Number of iterations (equals the actual number of function evaluations, default: 100)</p></li>
<li><p><i class="term">-bernoulli           value</i>: Parameter for random decisions (exploration versus exploitation, default: 0.1)</p></li>
</ul></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">References</a></h2>
<p>The various algorithms have been described in on-line publications. Here are a few:</p>
<ul class="doctools_itemized">
<li><p><i class="term">PSO</i>: Maurice Clerc, Standard Particle Swarm Optimisation (2012)
<a href="https://hal.archives-ouvertes.fr/file/index/docid/764996/filename/SPSO_descriptions.pdf">https://hal.archives-ouvertes.fr/file/index/docid/764996/filename/SPSO_descriptions.pdf</a></p>
<p>Alternatively: <a href="https://en.wikipedia.org/wiki/Particle_swarm_optimization">https://en.wikipedia.org/wiki/Particle_swarm_optimization</a></p></li>
<li><p><i class="term">SCE</i>: Qingyuan Duan, Soroosh Sorooshian, Vijai K. Gupta, Optimal use offo the SCE-UA global optimization method for calibrating watershed models
(1994), Journal of Hydrology 158, pp 265-284</p>
<p><a href="https://www.researchgate.net/publication/223408756_Optimal_Use_of_the_SCE-UA_Global_Optimization_Method_for_Calibrating_Watershed_Models">https://www.researchgate.net/publication/223408756_Optimal_Use_of_the_SCE-UA_Global_Optimization_Method_for_Calibrating_Watershed_Models</a></p></li>
<li><p><i class="term"><a href="../../../../index.html#de">DE</a></i>: Rainer Storn and Kenneth Price, Differential Evolution - A simple and efficient adaptivescheme for globaloptimization over continuous spaces
(1996)</p>
<p><a href="http://www1.icsi.berkeley.edu/~storn/TR-95-012.pdf">http://www1.icsi.berkeley.edu/~storn/TR-95-012.pdf</a></p></li>
<li><p><i class="term">LIPO</i>: Cedric Malherbe and Nicolas Vayatis, Global optimization of Lipschitz functions,
(june 2017)</p>
<p><a href="https://arxiv.org/pdf/1703.02628.pdf">https://arxiv.org/pdf/1703.02628.pdf</a></p></li>
</ul>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#mathematics">mathematics</a>, <a href="../../../../index.html#optimisation">optimisation</a>, <a href="../../../../index.html#probabilistic_calculations">probabilistic calculations</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/math/qcomplex.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::complexnumbers - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::complexnumbers - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'qcomplex.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;
   -->
<!-- math::complexnumbers.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::complexnumbers(n) 1.0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::complexnumbers - Straightforward complex number package</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'qcomplex.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;
   -->
<! -- math::complexnumbers.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::complexnumbers(n) 1.0.2 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::complexnumbers - Straightforward complex number package</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: complexnumbers</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#complex_numbers">complex numbers</a>, <a href="../../../../index.html#math">math</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








323
324
325
326
327
328
329






330
331
332
333
334
335
336
337
338
339
340
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: complexnumbers</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key797">complex numbers</a>, <a href="../../../../index.html#key71">math</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/math/quasirandom.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!DOCTYPE html><html><head>
<title>math::quasirandom - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'quasirandom.man' by tcllib/doctools with format 'html'
   -->
<!-- math::quasirandom.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::quasirandom(n) 1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::quasirandom - Quasi-random points for integration and Monte Carlo type methods</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">TODO</a></li>
<li class="doctools_section"><a href="#section4">References</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">math::quasirandom 1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::quasirandom::qrpoint create</b> <i class="arg">NAME</i> <i class="arg">DIM</i> <span class="opt">?ARGS?</span></a></li>
<li><a href="#2"><b class="cmd">gen next</b></a></li>
<li><a href="#3"><b class="cmd">gen set-start</b> <i class="arg">index</i></a></li>
<li><a href="#4"><b class="cmd">gen set-evaluations</b> <i class="arg">number</i></a></li>
<li><a href="#5"><b class="cmd">gen integral</b> <i class="arg">func</i> <i class="arg">minmax</i> <i class="arg">args</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>In many applications pseudo-random numbers and pseudo-random points in a (limited)
sample space play an important role. For instance in any type of Monte Carlo simulation.
Pseudo-random numbers, however, may be too random and as a consequence a large
number of data points is required to reduce the error or fluctuation in the results
to the desired value.</p>
<p>Quasi-random numbers can be used as an alternative: instead of &quot;completely&quot; arbitrary
points, points are generated that are diverse enough to cover the entire sample space
in a more or less uniform way. As a consequence convergence to the limit can be
much faster, when such quasi-random numbers are well-chosen.</p>
<p>The package defines a <i class="term"><a href="../../../../index.html#class">class</a></i> &quot;qrpoint&quot; that creates a command to generate
quasi-random points in 1, 2 or more dimensions. The command can either generate
separate points, so that they can be used in a user-defined algorithm or use these
points to calculate integrals of functions defined over 1, 2 or more dimensions.
It also holds several other common algorithms. (NOTE: these are not implemented yet)</p>
<p>One particular characteristic of the generators is that there are no tuning parameters
involved, which makes the use particularly simple.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<p>A quasi-random point generator is created using the <i class="term">qrpoint</i> class:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::quasirandom::qrpoint create</b> <i class="arg">NAME</i> <i class="arg">DIM</i> <span class="opt">?ARGS?</span></a></dt>
<dd><p>This command takes the following arguments:</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">NAME</i></dt>
<dd><p>The name of the command to be created (alternatively: the <i class="term">new</i> subcommand
will generate a unique name)</p></dd>
<dt>integer/string <i class="arg">DIM</i></dt>
<dd><p>The number of dimensions or one of: &quot;circle&quot;, &quot;disk&quot;, &quot;sphere&quot; or &quot;ball&quot;</p></dd>
<dt>strings <i class="arg">ARGS</i></dt>
<dd><p>Zero or more key-value pairs. The supported options are:</p>
<ul class="doctools_itemized">
<li><p><i class="term">-start index</i>: The index for the next point to be generated (default: 1)</p></li>
<li><p><i class="term">-evaluations number</i>: The number of evaluations to be used by default (default: 100)</p></li>
</ul></dd>
</dl></dd>
</dl>
<p>The points that are returned lie in the hyperblock [0,1[^n (n the number of dimensions)
or on the unit circle, within the unit disk, on the unit sphere or within the unit ball.</p>
<p>Each generator supports the following subcommands:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">gen next</b></a></dt>
<dd><p>Return the coordinates of the next quasi-random point</p></dd>
<dt><a name="3"><b class="cmd">gen set-start</b> <i class="arg">index</i></a></dt>
<dd><p>Reset the index for the next quasi-random point. This is useful to control which list of points is returned.
Returns the new or the current value, if no value is given.</p></dd>
<dt><a name="4"><b class="cmd">gen set-evaluations</b> <i class="arg">number</i></a></dt>
<dd><p>Reset the default number of evaluations in compound algorithms. Note that the actual number is the
smallest 4-fold larger or equal to the given number. (The 4-fold plays a role in the detailed integration
routine.)</p></dd>
<dt><a name="5"><b class="cmd">gen integral</b> <i class="arg">func</i> <i class="arg">minmax</i> <i class="arg">args</i></a></dt>
<dd><p>Calculate the integral of the given function over the block (or the circle, sphere etc.)</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">func</i></dt>
<dd><p>The name of the function to be integrated</p></dd>
<dt>list <i class="arg">minmax</i></dt>
<dd><p>List of pairs of minimum and maximum coordinates. This can be used to
map the quasi-random coordinates to the desired hyper-block.</p>
<p>If the space is a circle, disk etc. then this argument should be a single value, the radius.
The circle, disk, etc. is centred at the origin. If this is not what is required, then a coordinate
transformation should be made within the function.</p></dd>
<dt>strings <i class="arg">args</i></dt>
<dd><p>Zero or more key-value pairs. The following options are supported:</p>
<ul class="doctools_itemized">
<li><p><i class="term">-evaluations number</i>: The number of evaluations to be used. If not specified use the
default of the generator object.</p></li>
</ul></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TODO</a></h2>
<p>Implement other algorithms and variants</p>
<p>Implement more unit tests.</p>
<p>Comparison to pseudo-random numbers for integration.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">References</a></h2>
<p>Various algorithms exist for generating quasi-random numbers. The generators created in this package are based on:
<a href="http://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/">http://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#mathematics">mathematics</a>, <a href="../../../../index.html#quasi_random">quasi-random</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/math/rational_funcs.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::rationalfunctions - Math</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::rationalfunctions - Math</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'rational_funcs.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;
   -->
<!-- math::rationalfunctions.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::rationalfunctions(n) 1.0.1 tcllib &quot;Math&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::rationalfunctions - Polynomial functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'rational_funcs.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;
   -->
<! -- math::rationalfunctions.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::rationalfunctions(n) 1.0.1 tcllib &quot;Math&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::rationalfunctions - Polynomial functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: rationalfunctions</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#rational_functions">rational functions</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








264
265
266
267
268
269
270






271
272
273
274
275
276
277
278
279
280
281
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: rationalfunctions</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key656">rational functions</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/roman.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::roman - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::roman - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'roman.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Kenneth Green &amp;lt;kenneth.green@gmail.com&amp;gt;
   -->
<!-- math::roman.
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::roman() 1.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::roman - Tools for creating and manipulating roman numerals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'roman.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Kenneth Green &lt;kenneth.green@gmail.com&gt;
   -->
<! -- math::roman.
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::roman() 1.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::roman - Tools for creating and manipulating roman numerals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: roman</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#integer">integer</a>, <a href="../../../../index.html#roman_numeral">roman numeral</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Kenneth Green &lt;kenneth.green@gmail.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








170
171
172
173
174
175
176






177
178
179
180
181
182
183
184
185
186
187
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: roman</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key351">integer</a>, <a href="../../../../index.html#key350">roman numeral</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Kenneth Green &lt;kenneth.green@gmail.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/romberg.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>math::calculus::romberg - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>math::calculus::romberg - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'romberg.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Kevin B. Kenny &amp;lt;kennykb@acm.org&amp;gt;. All rights reserved. Redistribution permitted under the terms of the Open Publication License &amp;lt;http://www.opencontent.org/openpub/&amp;gt;
   -->
<!-- math::calculus::romberg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::calculus::romberg(n) 0.6 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::calculus::romberg - Romberg integration</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'romberg.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Kevin B. Kenny &lt;kennykb@acm.org&gt;. All rights reserved. Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;
   -->
<! -- math::calculus::romberg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::calculus::romberg(n) 0.6 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::calculus::romberg - Romberg integration</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: calculus</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="calculus.html">math::calculus</a>, <a href="interpolate.html">math::interpolate</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Kevin B. Kenny &lt;kennykb@acm.org&gt;. All rights reserved. Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<











386
387
388
389
390
391
392






393
394
395
396
397
398
399
400
401
402
403
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: calculus</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="calculus.html">math::calculus</a>, <a href="interpolate.html">math::interpolate</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Kevin B. Kenny &lt;kennykb@acm.org&gt;. All rights reserved. Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/special.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::special - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::special - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'special.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;
   -->
<!-- math::special.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::special(n) 0.4 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::special - Special mathematical functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'special.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;
   -->
<! -- math::special.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::special(n) 0.3 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::special - Special mathematical functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.5?</span></b></li>
<li>package require <b class="pkgname">math::special <span class="opt">?0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::special::eulerNumber</b> <i class="arg">index</i></a></li>
<li><a href="#2"><b class="cmd">::math::special::bernoulliNumber</b> <i class="arg">index</i></a></li>
<li><a href="#3"><b class="cmd">::math::special::Beta</b> <i class="arg">x</i> <i class="arg">y</i></a></li>
<li><a href="#4"><b class="cmd">::math::special::incBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i></a></li>
<li><a href="#5"><b class="cmd">::math::special::regIncBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i></a></li>
<li><a href="#6"><b class="cmd">::math::special::Gamma</b> <i class="arg">x</i></a></li>
<li><a href="#7"><b class="cmd">::math::special::digamma</b> <i class="arg">x</i></a></li>
<li><a href="#8"><b class="cmd">::math::special::erf</b> <i class="arg">x</i></a></li>
<li><a href="#9"><b class="cmd">::math::special::erfc</b> <i class="arg">x</i></a></li>
<li><a href="#10"><b class="cmd">::math::special::invnorm</b> <i class="arg">p</i></a></li>
<li><a href="#11"><b class="cmd">::math::special::J0</b> <i class="arg">x</i></a></li>
<li><a href="#12"><b class="cmd">::math::special::J1</b> <i class="arg">x</i></a></li>
<li><a href="#13"><b class="cmd">::math::special::Jn</b> <i class="arg">n</i> <i class="arg">x</i></a></li>
<li><a href="#14"><b class="cmd">::math::special::J1/2</b> <i class="arg">x</i></a></li>
<li><a href="#15"><b class="cmd">::math::special::J-1/2</b> <i class="arg">x</i></a></li>
<li><a href="#16"><b class="cmd">::math::special::I_n</b> <i class="arg">x</i></a></li>
<li><a href="#17"><b class="cmd">::math::special::cn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#18"><b class="cmd">::math::special::dn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#19"><b class="cmd">::math::special::sn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#20"><b class="cmd">::math::special::elliptic_K</b> <i class="arg">k</i></a></li>
<li><a href="#21"><b class="cmd">::math::special::elliptic_E</b> <i class="arg">k</i></a></li>
<li><a href="#22"><b class="cmd">::math::special::exponential_Ei</b> <i class="arg">x</i></a></li>
<li><a href="#23"><b class="cmd">::math::special::exponential_En</b> <i class="arg">n</i> <i class="arg">x</i></a></li>
<li><a href="#24"><b class="cmd">::math::special::exponential_li</b> <i class="arg">x</i></a></li>
<li><a href="#25"><b class="cmd">::math::special::exponential_Ci</b> <i class="arg">x</i></a></li>
<li><a href="#26"><b class="cmd">::math::special::exponential_Si</b> <i class="arg">x</i></a></li>
<li><a href="#27"><b class="cmd">::math::special::exponential_Chi</b> <i class="arg">x</i></a></li>
<li><a href="#28"><b class="cmd">::math::special::exponential_Shi</b> <i class="arg">x</i></a></li>
<li><a href="#29"><b class="cmd">::math::special::fresnel_C</b> <i class="arg">x</i></a></li>
<li><a href="#30"><b class="cmd">::math::special::fresnel_S</b> <i class="arg">x</i></a></li>
<li><a href="#31"><b class="cmd">::math::special::sinc</b> <i class="arg">x</i></a></li>
<li><a href="#32"><b class="cmd">::math::special::legendre</b> <i class="arg">n</i></a></li>
<li><a href="#33"><b class="cmd">::math::special::chebyshev</b> <i class="arg">n</i></a></li>
<li><a href="#34"><b class="cmd">::math::special::laguerre</b> <i class="arg">alpha</i> <i class="arg">n</i></a></li>
<li><a href="#35"><b class="cmd">::math::special::hermite</b> <i class="arg">n</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements several so-called special functions, like
the Gamma function, the Bessel functions and such.</p>
<p>Each function is implemented by a procedure that bears its name (well,







|
|


<
<
|
<
<
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







126
127
128
129
130
131
132
133
134
135
136


137


138

139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.3?</span></b></li>
<li>package require <b class="pkgname">math::special <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">


<li><a href="#1"><b class="cmd">::math::special::Beta</b> <i class="arg">x</i> <i class="arg">y</i></a></li>


<li><a href="#2"><b class="cmd">::math::special::Gamma</b> <i class="arg">x</i></a></li>

<li><a href="#3"><b class="cmd">::math::special::erf</b> <i class="arg">x</i></a></li>
<li><a href="#4"><b class="cmd">::math::special::erfc</b> <i class="arg">x</i></a></li>
<li><a href="#5"><b class="cmd">::math::special::invnorm</b> <i class="arg">p</i></a></li>
<li><a href="#6"><b class="cmd">::math::special::J0</b> <i class="arg">x</i></a></li>
<li><a href="#7"><b class="cmd">::math::special::J1</b> <i class="arg">x</i></a></li>
<li><a href="#8"><b class="cmd">::math::special::Jn</b> <i class="arg">n</i> <i class="arg">x</i></a></li>
<li><a href="#9"><b class="cmd">::math::special::J1/2</b> <i class="arg">x</i></a></li>
<li><a href="#10"><b class="cmd">::math::special::J-1/2</b> <i class="arg">x</i></a></li>
<li><a href="#11"><b class="cmd">::math::special::I_n</b> <i class="arg">x</i></a></li>
<li><a href="#12"><b class="cmd">::math::special::cn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#13"><b class="cmd">::math::special::dn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#14"><b class="cmd">::math::special::sn</b> <i class="arg">u</i> <i class="arg">k</i></a></li>
<li><a href="#15"><b class="cmd">::math::special::elliptic_K</b> <i class="arg">k</i></a></li>
<li><a href="#16"><b class="cmd">::math::special::elliptic_E</b> <i class="arg">k</i></a></li>
<li><a href="#17"><b class="cmd">::math::special::exponential_Ei</b> <i class="arg">x</i></a></li>
<li><a href="#18"><b class="cmd">::math::special::exponential_En</b> <i class="arg">n</i> <i class="arg">x</i></a></li>
<li><a href="#19"><b class="cmd">::math::special::exponential_li</b> <i class="arg">x</i></a></li>
<li><a href="#20"><b class="cmd">::math::special::exponential_Ci</b> <i class="arg">x</i></a></li>
<li><a href="#21"><b class="cmd">::math::special::exponential_Si</b> <i class="arg">x</i></a></li>
<li><a href="#22"><b class="cmd">::math::special::exponential_Chi</b> <i class="arg">x</i></a></li>
<li><a href="#23"><b class="cmd">::math::special::exponential_Shi</b> <i class="arg">x</i></a></li>
<li><a href="#24"><b class="cmd">::math::special::fresnel_C</b> <i class="arg">x</i></a></li>
<li><a href="#25"><b class="cmd">::math::special::fresnel_S</b> <i class="arg">x</i></a></li>
<li><a href="#26"><b class="cmd">::math::special::sinc</b> <i class="arg">x</i></a></li>
<li><a href="#27"><b class="cmd">::math::special::legendre</b> <i class="arg">n</i></a></li>
<li><a href="#28"><b class="cmd">::math::special::chebyshev</b> <i class="arg">n</i></a></li>
<li><a href="#29"><b class="cmd">::math::special::laguerre</b> <i class="arg">alpha</i> <i class="arg">n</i></a></li>
<li><a href="#30"><b class="cmd">::math::special::hermite</b> <i class="arg">n</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package implements several so-called special functions, like
the Gamma function, the Bessel functions and such.</p>
<p>Each function is implemented by a procedure that bears its name (well,
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
             |             |             |             |
Fresnel      | C           |  all of R   |     --      |   &lt; 2.0e-3
integrals    | S           |  all of R   |     --      |   &lt; 2.0e-3
             |             |             |             |
general      | Beta        | (see Gamma) |     --      |   &lt; 1.0e-9
             | Gamma       |  x != 0,-1, |     --      |   &lt; 1.0e-9
             |             |  -2, ...    |             |
             | incBeta     |             |  a, b &gt; 0   |   &lt; 1.0e-9
             | regIncBeta  |             |  a, b &gt; 0   |   &lt; 1.0e-9
             | digamma     |  x != 0,-1  |             |   &lt; 1.0e-9
             |             |  -2, ...    |             |
             |             |             |             |
             | sinc        |  all of R   |     --      |   exact
             |             |             |             |
orthogonal   | Legendre    |  all of R   | n = 0,1,... |   exact
polynomials  | Chebyshev   |  all of R   | n = 0,1,... |   exact
             | Laguerre    |  all of R   | n = 0,1,... |   exact
             |             |             | alpha el. R |
             | Hermite     |  all of R   | n = 0,1,... |   exact
</pre>
<p><em>Note:</em> Some of the error bounds are estimated, as no
&quot;formal&quot; bounds were available with the implemented approximation
method, others hold for the auxiliary functions used for estimating
the primary functions.</p>
<p>The following well-known functions are currently missing from the package:</p>
<ul class="doctools_itemized">
<li><p>Bessel functions of the second kind (Y_n, K_n)</p></li>
<li><p>Bessel functions of arbitrary order (and hence the Airy functions)</p></li>
<li><p>Chebyshev polynomials of the second kind (U_n)</p></li>

<li><p>The incomplete gamma function</p></li>
</ul>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::special::eulerNumber</b> <i class="arg">index</i></a></dt>
<dd><p>Return the index'th Euler number (note: these are integer values). As the
size of these numbers grows very fast, only a limited number are available.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">index</i></dt>
<dd><p>Index of the number to be returned (should be between 0 and 54)</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::special::bernoulliNumber</b> <i class="arg">index</i></a></dt>
<dd><p>Return the index'th Bernoulli number. As the size of the numbers grows very fast,
only a limited number are available.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">index</i></dt>
<dd><p>Index of the number to be returned (should be between 0 and 52)</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::special::Beta</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Compute the Beta function for arguments &quot;x&quot; and &quot;y&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>First argument for the Beta function</p></dd>
<dt>float <i class="arg">y</i></dt>
<dd><p>Second argument for the Beta function</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::special::incBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the incomplete Beta function for argument &quot;x&quot; with parameters &quot;a&quot; and &quot;b&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>First parameter for the incomplete Beta function, a &gt; 0</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>Second parameter for the incomplete Beta function, b &gt; 0</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the incomplete Beta function</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::special::regIncBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the regularized incomplete Beta function for argument &quot;x&quot; with parameters &quot;a&quot; and &quot;b&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>First parameter for the incomplete Beta function, a &gt; 0</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>Second parameter for the incomplete Beta function, b &gt; 0</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the regularized incomplete Beta function</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::math::special::Gamma</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Gamma function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Gamma function</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::special::digamma</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the digamma function (psi) for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the digamma function</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::special::erf</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the error function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the error function</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::special::erfc</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the complementary error function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the complementary error function</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::special::invnorm</b> <i class="arg">p</i></a></dt>
<dd><p>Compute the inverse of the normal distribution function for argument &quot;p&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">p</i></dt>
<dd><p>Argument for the inverse normal distribution function
(p must be greater than 0 and lower than 1)</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::special::J0</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the zeroth-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::math::special::J1</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the first-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::special::Jn</b> <i class="arg">n</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the nth-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">n</i></dt>
<dd><p>Order of the Bessel function</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::math::special::J1/2</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the half-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::special::J-1/2</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the minus-half-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::special::I_n</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the modified Bessel function of the first kind of order n for
the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">x</i></dt>
<dd><p>Positive integer order of the function</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">::math::special::cn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>cn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::special::dn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>dn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::special::sn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>sn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::special::elliptic_K</b> <i class="arg">k</i></a></dt>
<dd><p>Compute the complete elliptic integral of the first kind
for the argument &quot;k&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">k</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::special::elliptic_E</b> <i class="arg">k</i></a></dt>
<dd><p>Compute the complete elliptic integral of the second kind
for the argument &quot;k&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">k</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::special::exponential_Ei</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the exponential integral of the second kind
for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x != 0)</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::special::exponential_En</b> <i class="arg">n</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the exponential integral of the first kind
for the argument &quot;x&quot; and order n</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Order of the integral (n &gt;= 0)</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt;= 0)</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::special::exponential_li</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the logarithmic integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::special::exponential_Ci</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the cosine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::special::exponential_Si</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the sine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">::math::special::exponential_Chi</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the hyperbolic cosine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::special::exponential_Shi</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the hyperbolic sine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::special::fresnel_C</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Fresnel cosine integral for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd">::math::special::fresnel_S</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Fresnel sine integral for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="31"><b class="cmd">::math::special::sinc</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the sinc function for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">::math::special::legendre</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Legendre polynomial of degree n
(see <span class="sectref"><a href="#section4">THE ORTHOGONAL POLYNOMIALS</a></span>)</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="33"><b class="cmd">::math::special::chebyshev</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Chebyshev polynomial of degree n (of the first kind)</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">::math::special::laguerre</b> <i class="arg">alpha</i> <i class="arg">n</i></a></dt>
<dd><p>Return the Laguerre polynomial of degree n with parameter alpha</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>Parameter of the Laguerre polynomial</p></dd>
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">::math::special::hermite</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Hermite polynomial of degree n</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
</dl>
</div>







<
<
<
<
<

















>
|





<
<
<
<
<
<
<
<
<
<
<
<
<
<
|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|





<
<
<
<
<
<
|





|





|






|






|






|








|






|






|








|








|








|








|






|






|






|








|





|





|





|





|





|





|





|





|






|





|







|







223
224
225
226
227
228
229





230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253














254
255
256
257
258
259
260
261




















262
263
264
265
266
267






268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
             |             |             |             |
Fresnel      | C           |  all of R   |     --      |   &lt; 2.0e-3
integrals    | S           |  all of R   |     --      |   &lt; 2.0e-3
             |             |             |             |
general      | Beta        | (see Gamma) |     --      |   &lt; 1.0e-9
             | Gamma       |  x != 0,-1, |     --      |   &lt; 1.0e-9
             |             |  -2, ...    |             |





             | sinc        |  all of R   |     --      |   exact
             |             |             |             |
orthogonal   | Legendre    |  all of R   | n = 0,1,... |   exact
polynomials  | Chebyshev   |  all of R   | n = 0,1,... |   exact
             | Laguerre    |  all of R   | n = 0,1,... |   exact
             |             |             | alpha el. R |
             | Hermite     |  all of R   | n = 0,1,... |   exact
</pre>
<p><em>Note:</em> Some of the error bounds are estimated, as no
&quot;formal&quot; bounds were available with the implemented approximation
method, others hold for the auxiliary functions used for estimating
the primary functions.</p>
<p>The following well-known functions are currently missing from the package:</p>
<ul class="doctools_itemized">
<li><p>Bessel functions of the second kind (Y_n, K_n)</p></li>
<li><p>Bessel functions of arbitrary order (and hence the Airy functions)</p></li>
<li><p>Chebyshev polynomials of the second kind (U_n)</p></li>
<li><p>The digamma function (psi)</p></li>
<li><p>The incomplete gamma and beta functions</p></li>
</ul>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROCEDURES</a></h2>
<p>The package defines the following public procedures:</p>
<dl class="doctools_definitions">














<dt><a name="1"><b class="cmd">::math::special::Beta</b> <i class="arg">x</i> <i class="arg">y</i></a></dt>
<dd><p>Compute the Beta function for arguments &quot;x&quot; and &quot;y&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>First argument for the Beta function</p></dd>
<dt>float <i class="arg">y</i></dt>
<dd><p>Second argument for the Beta function</p></dd>
</dl></dd>




















<dt><a name="2"><b class="cmd">::math::special::Gamma</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Gamma function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Gamma function</p></dd>
</dl></dd>






<dt><a name="3"><b class="cmd">::math::special::erf</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the error function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the error function</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::special::erfc</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the complementary error function for argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the complementary error function</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::special::invnorm</b> <i class="arg">p</i></a></dt>
<dd><p>Compute the inverse of the normal distribution function for argument &quot;p&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">p</i></dt>
<dd><p>Argument for the inverse normal distribution function
(p must be greater than 0 and lower than 1)</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::math::special::J0</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the zeroth-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::special::J1</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the first-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::special::Jn</b> <i class="arg">n</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the nth-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">n</i></dt>
<dd><p>Order of the Bessel function</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::math::special::J1/2</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the half-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::special::J-1/2</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the minus-half-order Bessel function of the first kind for the
argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the Bessel function</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::special::I_n</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the modified Bessel function of the first kind of order n for
the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">x</i></dt>
<dd><p>Positive integer order of the function</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::math::special::cn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>cn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::special::dn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>dn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::math::special::sn</b> <i class="arg">u</i> <i class="arg">k</i></a></dt>
<dd><p>Compute the elliptic function <em>sn</em> for the argument &quot;u&quot; and
parameter &quot;k&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">u</i></dt>
<dd><p>Argument for the function</p></dd>
<dt>float <i class="arg">k</i></dt>
<dd><p>Parameter</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::special::elliptic_K</b> <i class="arg">k</i></a></dt>
<dd><p>Compute the complete elliptic integral of the first kind
for the argument &quot;k&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">k</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::special::elliptic_E</b> <i class="arg">k</i></a></dt>
<dd><p>Compute the complete elliptic integral of the second kind
for the argument &quot;k&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">k</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">::math::special::exponential_Ei</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the exponential integral of the second kind
for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x != 0)</p></dd>
</dl></dd>
<dt><a name="18"><b class="cmd">::math::special::exponential_En</b> <i class="arg">n</i> <i class="arg">x</i></a></dt>
<dd><p>Compute the exponential integral of the first kind
for the argument &quot;x&quot; and order n</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Order of the integral (n &gt;= 0)</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt;= 0)</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::special::exponential_li</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the logarithmic integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::special::exponential_Ci</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the cosine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::special::exponential_Si</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the sine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::special::exponential_Chi</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the hyperbolic cosine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::special::exponential_Shi</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the hyperbolic sine integral for the argument &quot;x&quot;</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function (x &gt; 0)</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::special::fresnel_C</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Fresnel cosine integral for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::special::fresnel_S</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the Fresnel sine integral for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::special::sinc</b> <i class="arg">x</i></a></dt>
<dd><p>Compute the sinc function for real argument x</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>Argument for the function</p></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">::math::special::legendre</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Legendre polynomial of degree n
(see <span class="sectref"><a href="#section4">THE ORTHOGONAL POLYNOMIALS</a></span>)</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::special::chebyshev</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Chebyshev polynomial of degree n (of the first kind)</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::special::laguerre</b> <i class="arg">alpha</i> <i class="arg">n</i></a></dt>
<dd><p>Return the Laguerre polynomial of degree n with parameter alpha</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>Parameter of the Laguerre polynomial</p></dd>
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd">::math::special::hermite</b> <i class="arg">n</i></a></dt>
<dd><p>Return the Hermite polynomial of degree n</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n</i></dt>
<dd><p>Degree of the polynomial</p></dd>
</dl></dd>
</dl>
</div>
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: special</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bessel_functions">Bessel functions</a>, <a href="../../../../index.html#error_function">error function</a>, <a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#special_functions">special functions</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








499
500
501
502
503
504
505






506
507
508
509
510
511
512
513
514
515
516
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: special</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key685">Bessel functions</a>, <a href="../../../../index.html#key683">error function</a>, <a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key684">special functions</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/statistics.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::statistics - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::statistics - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'statistics.man' by tcllib/doctools with format 'html'
   -->
<!-- math::statistics.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::statistics(n) 1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::statistics - Basic statistical functions and procedures</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'statistics.man' by tcllib/doctools with format 'html'
   -->
<! -- math::statistics.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::statistics(n) 1 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::statistics - Basic statistical functions and procedures</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">math::statistics 1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::statistics::mean</b> <i class="arg">data</i></a></li>
<li><a href="#2"><b class="cmd">::math::statistics::min</b> <i class="arg">data</i></a></li>
<li><a href="#3"><b class="cmd">::math::statistics::max</b> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::math::statistics::number</b> <i class="arg">data</i></a></li>







|







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">math::statistics 1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::statistics::mean</b> <i class="arg">data</i></a></li>
<li><a href="#2"><b class="cmd">::math::statistics::min</b> <i class="arg">data</i></a></li>
<li><a href="#3"><b class="cmd">::math::statistics::max</b> <i class="arg">data</i></a></li>
<li><a href="#4"><b class="cmd">::math::statistics::number</b> <i class="arg">data</i></a></li>
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<li><a href="#13"><b class="cmd">::math::statistics::corr</b> <i class="arg">data1</i> <i class="arg">data2</i></a></li>
<li><a href="#14"><b class="cmd">::math::statistics::interval-mean-stdev</b> <i class="arg">data</i> <i class="arg">confidence</i></a></li>
<li><a href="#15"><b class="cmd">::math::statistics::t-test-mean</b> <i class="arg">data</i> <i class="arg">est_mean</i> <i class="arg">est_stdev</i> <i class="arg">alpha</i></a></li>
<li><a href="#16"><b class="cmd">::math::statistics::test-normal</b> <i class="arg">data</i> <i class="arg">significance</i></a></li>
<li><a href="#17"><b class="cmd">::math::statistics::lillieforsFit</b> <i class="arg">data</i></a></li>
<li><a href="#18"><b class="cmd">::math::statistics::test-Duckworth</b> <i class="arg">list1</i> <i class="arg">list2</i> <i class="arg">significance</i></a></li>
<li><a href="#19"><b class="cmd">::math::statistics::test-anova-F</b> <i class="arg">alpha</i> <i class="arg">args</i></a></li>
<li><a href="#20"><b class="cmd">::math::statistics::test-Tukey-range</b> <i class="arg">alpha</i> <i class="arg">args</i></a></li>
<li><a href="#21"><b class="cmd">::math::statistics::test-Dunnett</b> <i class="arg">alpha</i> <i class="arg">control</i> <i class="arg">args</i></a></li>
<li><a href="#22"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">data</i> <i class="arg">confidence</i></a></li>
<li><a href="#23"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">limits</i> <i class="arg">counts</i> <i class="arg">confidence</i></a></li>
<li><a href="#24"><b class="cmd">::math::statistics::autocorr</b> <i class="arg">data</i></a></li>
<li><a href="#25"><b class="cmd">::math::statistics::crosscorr</b> <i class="arg">data1</i> <i class="arg">data2</i></a></li>
<li><a href="#26"><b class="cmd">::math::statistics::mean-histogram-limits</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></li>
<li><a href="#27"><b class="cmd">::math::statistics::minmax-histogram-limits</b> <i class="arg">min</i> <i class="arg">max</i> <i class="arg">number</i></a></li>
<li><a href="#28"><b class="cmd">::math::statistics::linear-model</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></li>
<li><a href="#29"><b class="cmd">::math::statistics::linear-residuals</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></li>
<li><a href="#30"><b class="cmd">::math::statistics::test-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></li>
<li><a href="#31"><b class="cmd">::math::statistics::print-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></li>
<li><a href="#32"><b class="cmd">::math::statistics::control-xbar</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></li>
<li><a href="#33"><b class="cmd">::math::statistics::control-Rchart</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></li>
<li><a href="#34"><b class="cmd">::math::statistics::test-xbar</b> <i class="arg">control</i> <i class="arg">data</i></a></li>
<li><a href="#35"><b class="cmd">::math::statistics::test-Rchart</b> <i class="arg">control</i> <i class="arg">data</i></a></li>
<li><a href="#36"><b class="cmd">::math::statistics::test-Kruskal-Wallis</b> <i class="arg">confidence</i> <i class="arg">args</i></a></li>
<li><a href="#37"><b class="cmd">::math::statistics::analyse-Kruskal-Wallis</b> <i class="arg">args</i></a></li>
<li><a href="#38"><b class="cmd">::math::statistics::test-Levene</b> <i class="arg">groups</i></a></li>
<li><a href="#39"><b class="cmd">::math::statistics::test-Brown-Forsythe</b> <i class="arg">groups</i></a></li>
<li><a href="#40"><b class="cmd">::math::statistics::group-rank</b> <i class="arg">args</i></a></li>
<li><a href="#41"><b class="cmd">::math::statistics::test-Wilcoxon</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></li>
<li><a href="#42"><b class="cmd">::math::statistics::spearman-rank</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></li>
<li><a href="#43"><b class="cmd">::math::statistics::spearman-rank-extended</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></li>
<li><a href="#44"><b class="cmd">::math::statistics::kernel-density</b> <i class="arg">data</i> opt <i class="arg">-option value</i> ...</a></li>
<li><a href="#45"><b class="cmd">::math::statistics::bootstrap</b> <i class="arg">data</i> <i class="arg">sampleSize</i> <span class="opt">?numberSamples?</span></a></li>
<li><a href="#46"><b class="cmd">::math::statistics::wasserstein-distance</b> <i class="arg">prob1</i> <i class="arg">prob2</i></a></li>
<li><a href="#47"><b class="cmd">::math::statistics::kl-divergence</b> <i class="arg">prob1</i> <i class="arg">prob2</i></a></li>
<li><a href="#48"><b class="cmd">::math::statistics::logistic-model</b> <i class="arg">xdata</i> <i class="arg">ydata</i></a></li>
<li><a href="#49"><b class="cmd">::math::statistics::logistic-probability</b> <i class="arg">coeffs</i> <i class="arg">x</i></a></li>

<li><a href="#50"><b class="cmd">::math::statistics::tstat</b> <i class="arg">dof</i> <span class="opt">?alpha?</span></a></li>
<li><a href="#51"><b class="cmd">::math::statistics::mv-wls</b> <i class="arg">wt1</i> <i class="arg">weights_and_values</i></a></li>
<li><a href="#52"><b class="cmd">::math::statistics::mv-ols</b> <i class="arg">values</i></a></li>
<li><a href="#53"><b class="cmd">::math::statistics::pdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#54"><b class="cmd">::math::statistics::pdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#55"><b class="cmd">::math::statistics::pdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></li>
<li><a href="#56"><b class="cmd">::math::statistics::pdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></li>
<li><a href="#57"><b class="cmd">::math::statistics::pdf-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></li>
<li><a href="#58"><b class="cmd">::math::statistics::pdf-symmetric-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></li>
<li><a href="#59"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></li>
<li><a href="#60"><b class="cmd">::math::statistics::pdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></li>
<li><a href="#61"><b class="cmd">::math::statistics::pdf-chisquare</b> <i class="arg">df</i> <i class="arg">value</i></a></li>
<li><a href="#62"><b class="cmd">::math::statistics::pdf-student-t</b> <i class="arg">df</i> <i class="arg">value</i></a></li>
<li><a href="#63"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#64"><b class="cmd">::math::statistics::pdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#65"><b class="cmd">::math::statistics::pdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#66"><b class="cmd">::math::statistics::pdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#67"><b class="cmd">::math::statistics::pdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#68"><b class="cmd">::math::statistics::pdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#69"><b class="cmd">::math::statistics::pdf-laplace</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#70"><b class="cmd">::math::statistics::pdf-kumaraswamy</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#71"><b class="cmd">::math::statistics::pdf-negative-binomial</b> <i class="arg">r</i> <i class="arg">p</i> <i class="arg">value</i></a></li>
<li><a href="#72"><b class="cmd">::math::statistics::cdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#73"><b class="cmd">::math::statistics::cdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#74"><b class="cmd">::math::statistics::cdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></li>
<li><a href="#75"><b class="cmd">::math::statistics::cdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></li>
<li><a href="#76"><b class="cmd">::math::statistics::cdf-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></li>
<li><a href="#77"><b class="cmd">::math::statistics::cdf-symmetric-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></li>
<li><a href="#78"><b class="cmd">::math::statistics::cdf-students-t</b> <i class="arg">degrees</i> <i class="arg">value</i></a></li>
<li><a href="#79"><b class="cmd">::math::statistics::cdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></li>
<li><a href="#80"><b class="cmd">::math::statistics::cdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></li>
<li><a href="#81"><b class="cmd">::math::statistics::cdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#82"><b class="cmd">::math::statistics::cdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#83"><b class="cmd">::math::statistics::cdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#84"><b class="cmd">::math::statistics::cdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#85"><b class="cmd">::math::statistics::cdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#86"><b class="cmd">::math::statistics::cdf-F</b> <i class="arg">nf1</i> <i class="arg">nf2</i> <i class="arg">value</i></a></li>
<li><a href="#87"><b class="cmd">::math::statistics::cdf-laplace</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#88"><b class="cmd">::math::statistics::cdf-kumaraswamy</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#89"><b class="cmd">::math::statistics::cdf-negative-binomial</b> <i class="arg">r</i> <i class="arg">p</i> <i class="arg">value</i></a></li>
<li><a href="#90"><b class="cmd">::math::statistics::empirical-distribution</b> <i class="arg">values</i></a></li>
<li><a href="#91"><b class="cmd">::math::statistics::random-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></li>
<li><a href="#92"><b class="cmd">::math::statistics::random-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></li>
<li><a href="#93"><b class="cmd">::math::statistics::random-exponential</b> <i class="arg">mean</i> <i class="arg">number</i></a></li>
<li><a href="#94"><b class="cmd">::math::statistics::random-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">number</i></a></li>
<li><a href="#95"><b class="cmd">::math::statistics::random-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">number</i></a></li>
<li><a href="#96"><b class="cmd">::math::statistics::random-symmetric-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">number</i></a></li>
<li><a href="#97"><b class="cmd">::math::statistics::random-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">number</i></a></li>
<li><a href="#98"><b class="cmd">::math::statistics::random-poisson</b> <i class="arg">mu</i> <i class="arg">number</i></a></li>
<li><a href="#99"><b class="cmd">::math::statistics::random-chisquare</b> <i class="arg">df</i> <i class="arg">number</i></a></li>
<li><a href="#100"><b class="cmd">::math::statistics::random-student-t</b> <i class="arg">df</i> <i class="arg">number</i></a></li>
<li><a href="#101"><b class="cmd">::math::statistics::random-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">number</i></a></li>
<li><a href="#102"><b class="cmd">::math::statistics::random-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></li>
<li><a href="#103"><b class="cmd">::math::statistics::random-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></li>
<li><a href="#104"><b class="cmd">::math::statistics::random-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></li>
<li><a href="#105"><b class="cmd">::math::statistics::random-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></li>
<li><a href="#106"><b class="cmd">::math::statistics::random-laplace</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></li>
<li><a href="#107"><b class="cmd">::math::statistics::random-kumaraswamy</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">number</i></a></li>
<li><a href="#108"><b class="cmd">::math::statistics::random-negative-binomial</b> <i class="arg">r</i> <i class="arg">p</i> <i class="arg">number</i></a></li>
<li><a href="#109"><b class="cmd">::math::statistics::histogram-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">limits</i> <i class="arg">number</i></a></li>
<li><a href="#110"><b class="cmd">::math::statistics::incompleteGamma</b> <i class="arg">x</i> <i class="arg">p</i> <span class="opt">?tol?</span></a></li>
<li><a href="#111"><b class="cmd">::math::statistics::incompleteBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i> <span class="opt">?tol?</span></a></li>
<li><a href="#112"><b class="cmd">::math::statistics::estimate-pareto</b> <i class="arg">values</i></a></li>
<li><a href="#113"><b class="cmd">::math::statistics::estimate-exponential</b> <i class="arg">values</i></a></li>
<li><a href="#114"><b class="cmd">::math::statistics::estimate-laplace</b> <i class="arg">values</i></a></li>
<li><a href="#115"><b class="cmd">::math::statistics::estimante-negative-binomial</b> <i class="arg">r</i> <i class="arg">values</i></a></li>
<li><a href="#116"><b class="cmd">::math::statistics::filter</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></li>
<li><a href="#117"><b class="cmd">::math::statistics::map</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></li>
<li><a href="#118"><b class="cmd">::math::statistics::samplescount</b> <i class="arg">varname</i> <i class="arg">list</i> <i class="arg">expression</i></a></li>
<li><a href="#119"><b class="cmd">::math::statistics::subdivide</b></a></li>
<li><a href="#120"><b class="cmd">::math::statistics::plot-scale</b> <i class="arg">canvas</i> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">ymin</i> <i class="arg">ymax</i></a></li>
<li><a href="#121"><b class="cmd">::math::statistics::plot-xydata</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></li>
<li><a href="#122"><b class="cmd">::math::statistics::plot-xyline</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></li>
<li><a href="#123"><b class="cmd">::math::statistics::plot-tdata</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></li>
<li><a href="#124"><b class="cmd">::math::statistics::plot-tline</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></li>
<li><a href="#125"><b class="cmd">::math::statistics::plot-histogram</b> <i class="arg">canvas</i> <i class="arg">counts</i> <i class="arg">limits</i> <i class="arg">tag</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">math::statistics</b> package contains functions and procedures for
basic statistical data analysis, such as:</p>
<ul class="doctools_itemized">







<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
|
|
|
|
>
|
|
|
|
|
|
|
<
<
|
|
|
|
|
|
|
|
|
|
<
<
<
|
|
|
|
<
<
|
|
|
|
|
|
|
|
|
<
<
<
|
|
|
|
|
<
<
|
|
|
|
|
|
|
|
|
<
<
<
|
|
|
|
<
<
<
|
|
|
|
|
|
|
|
|
|







149
150
151
152
153
154
155


156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171








172
173
174
175
176
177
178
179
180
181
182
183


184
185
186
187
188
189
190
191
192
193



194
195
196
197


198
199
200
201
202
203
204
205
206



207
208
209
210
211


212
213
214
215
216
217
218
219
220



221
222
223
224



225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<li><a href="#13"><b class="cmd">::math::statistics::corr</b> <i class="arg">data1</i> <i class="arg">data2</i></a></li>
<li><a href="#14"><b class="cmd">::math::statistics::interval-mean-stdev</b> <i class="arg">data</i> <i class="arg">confidence</i></a></li>
<li><a href="#15"><b class="cmd">::math::statistics::t-test-mean</b> <i class="arg">data</i> <i class="arg">est_mean</i> <i class="arg">est_stdev</i> <i class="arg">alpha</i></a></li>
<li><a href="#16"><b class="cmd">::math::statistics::test-normal</b> <i class="arg">data</i> <i class="arg">significance</i></a></li>
<li><a href="#17"><b class="cmd">::math::statistics::lillieforsFit</b> <i class="arg">data</i></a></li>
<li><a href="#18"><b class="cmd">::math::statistics::test-Duckworth</b> <i class="arg">list1</i> <i class="arg">list2</i> <i class="arg">significance</i></a></li>
<li><a href="#19"><b class="cmd">::math::statistics::test-anova-F</b> <i class="arg">alpha</i> <i class="arg">args</i></a></li>


<li><a href="#20"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">data</i> <i class="arg">confidence</i></a></li>
<li><a href="#21"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">limits</i> <i class="arg">counts</i> <i class="arg">confidence</i></a></li>
<li><a href="#22"><b class="cmd">::math::statistics::autocorr</b> <i class="arg">data</i></a></li>
<li><a href="#23"><b class="cmd">::math::statistics::crosscorr</b> <i class="arg">data1</i> <i class="arg">data2</i></a></li>
<li><a href="#24"><b class="cmd">::math::statistics::mean-histogram-limits</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></li>
<li><a href="#25"><b class="cmd">::math::statistics::minmax-histogram-limits</b> <i class="arg">min</i> <i class="arg">max</i> <i class="arg">number</i></a></li>
<li><a href="#26"><b class="cmd">::math::statistics::linear-model</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></li>
<li><a href="#27"><b class="cmd">::math::statistics::linear-residuals</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></li>
<li><a href="#28"><b class="cmd">::math::statistics::test-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></li>
<li><a href="#29"><b class="cmd">::math::statistics::print-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></li>
<li><a href="#30"><b class="cmd">::math::statistics::control-xbar</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></li>
<li><a href="#31"><b class="cmd">::math::statistics::control-Rchart</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></li>
<li><a href="#32"><b class="cmd">::math::statistics::test-xbar</b> <i class="arg">control</i> <i class="arg">data</i></a></li>
<li><a href="#33"><b class="cmd">::math::statistics::test-Rchart</b> <i class="arg">control</i> <i class="arg">data</i></a></li>
<li><a href="#34"><b class="cmd">::math::statistics::test-Kruskal-Wallis</b> <i class="arg">confidence</i> <i class="arg">args</i></a></li>
<li><a href="#35"><b class="cmd">::math::statistics::analyse-Kruskal-Wallis</b> <i class="arg">args</i></a></li>








<li><a href="#36"><b class="cmd">::math::statistics::group-rank</b> <i class="arg">args</i></a></li>
<li><a href="#37"><b class="cmd">::math::statistics::test-Wilcoxon</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></li>
<li><a href="#38"><b class="cmd">::math::statistics::spearman-rank</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></li>
<li><a href="#39"><b class="cmd">::math::statistics::spearman-rank-extended</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></li>
<li><a href="#40"><b class="cmd">::math::statistics::kernel-density</b> <i class="arg">data</i> opt <i class="arg">-option value</i> ...</a></li>
<li><a href="#41"><b class="cmd">::math::statistics::tstat</b> <i class="arg">dof</i> <span class="opt">?alpha?</span></a></li>
<li><a href="#42"><b class="cmd">::math::statistics::mv-wls</b> <i class="arg">wt1</i> <i class="arg">weights_and_values</i></a></li>
<li><a href="#43"><b class="cmd">::math::statistics::mv-ols</b> <i class="arg">values</i></a></li>
<li><a href="#44"><b class="cmd">::math::statistics::pdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#45"><b class="cmd">::math::statistics::pdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#46"><b class="cmd">::math::statistics::pdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></li>
<li><a href="#47"><b class="cmd">::math::statistics::pdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></li>


<li><a href="#48"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></li>
<li><a href="#49"><b class="cmd">::math::statistics::pdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></li>
<li><a href="#50"><b class="cmd">::math::statistics::pdf-chisquare</b> <i class="arg">df</i> <i class="arg">value</i></a></li>
<li><a href="#51"><b class="cmd">::math::statistics::pdf-student-t</b> <i class="arg">df</i> <i class="arg">value</i></a></li>
<li><a href="#52"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#53"><b class="cmd">::math::statistics::pdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#54"><b class="cmd">::math::statistics::pdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#55"><b class="cmd">::math::statistics::pdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#56"><b class="cmd">::math::statistics::pdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#57"><b class="cmd">::math::statistics::pdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>



<li><a href="#58"><b class="cmd">::math::statistics::cdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#59"><b class="cmd">::math::statistics::cdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></li>
<li><a href="#60"><b class="cmd">::math::statistics::cdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></li>
<li><a href="#61"><b class="cmd">::math::statistics::cdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></li>


<li><a href="#62"><b class="cmd">::math::statistics::cdf-students-t</b> <i class="arg">degrees</i> <i class="arg">value</i></a></li>
<li><a href="#63"><b class="cmd">::math::statistics::cdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></li>
<li><a href="#64"><b class="cmd">::math::statistics::cdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></li>
<li><a href="#65"><b class="cmd">::math::statistics::cdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></li>
<li><a href="#66"><b class="cmd">::math::statistics::cdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#67"><b class="cmd">::math::statistics::cdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#68"><b class="cmd">::math::statistics::cdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></li>
<li><a href="#69"><b class="cmd">::math::statistics::cdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></li>
<li><a href="#70"><b class="cmd">::math::statistics::cdf-F</b> <i class="arg">nf1</i> <i class="arg">nf2</i> <i class="arg">value</i></a></li>



<li><a href="#71"><b class="cmd">::math::statistics::empirical-distribution</b> <i class="arg">values</i></a></li>
<li><a href="#72"><b class="cmd">::math::statistics::random-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></li>
<li><a href="#73"><b class="cmd">::math::statistics::random-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></li>
<li><a href="#74"><b class="cmd">::math::statistics::random-exponential</b> <i class="arg">mean</i> <i class="arg">number</i></a></li>
<li><a href="#75"><b class="cmd">::math::statistics::random-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">number</i></a></li>


<li><a href="#76"><b class="cmd">::math::statistics::random-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">number</i></a></li>
<li><a href="#77"><b class="cmd">::math::statistics::random-poisson</b> <i class="arg">mu</i> <i class="arg">number</i></a></li>
<li><a href="#78"><b class="cmd">::math::statistics::random-chisquare</b> <i class="arg">df</i> <i class="arg">number</i></a></li>
<li><a href="#79"><b class="cmd">::math::statistics::random-student-t</b> <i class="arg">df</i> <i class="arg">number</i></a></li>
<li><a href="#80"><b class="cmd">::math::statistics::random-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">number</i></a></li>
<li><a href="#81"><b class="cmd">::math::statistics::random-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></li>
<li><a href="#82"><b class="cmd">::math::statistics::random-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></li>
<li><a href="#83"><b class="cmd">::math::statistics::random-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></li>
<li><a href="#84"><b class="cmd">::math::statistics::random-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></li>



<li><a href="#85"><b class="cmd">::math::statistics::histogram-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">limits</i> <i class="arg">number</i></a></li>
<li><a href="#86"><b class="cmd">::math::statistics::incompleteGamma</b> <i class="arg">x</i> <i class="arg">p</i> <span class="opt">?tol?</span></a></li>
<li><a href="#87"><b class="cmd">::math::statistics::incompleteBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i> <span class="opt">?tol?</span></a></li>
<li><a href="#88"><b class="cmd">::math::statistics::estimate-pareto</b> <i class="arg">values</i></a></li>



<li><a href="#89"><b class="cmd">::math::statistics::filter</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></li>
<li><a href="#90"><b class="cmd">::math::statistics::map</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></li>
<li><a href="#91"><b class="cmd">::math::statistics::samplescount</b> <i class="arg">varname</i> <i class="arg">list</i> <i class="arg">expression</i></a></li>
<li><a href="#92"><b class="cmd">::math::statistics::subdivide</b></a></li>
<li><a href="#93"><b class="cmd">::math::statistics::plot-scale</b> <i class="arg">canvas</i> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">ymin</i> <i class="arg">ymax</i></a></li>
<li><a href="#94"><b class="cmd">::math::statistics::plot-xydata</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></li>
<li><a href="#95"><b class="cmd">::math::statistics::plot-xyline</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></li>
<li><a href="#96"><b class="cmd">::math::statistics::plot-tdata</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></li>
<li><a href="#97"><b class="cmd">::math::statistics::plot-tline</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></li>
<li><a href="#98"><b class="cmd">::math::statistics::plot-histogram</b> <i class="arg">canvas</i> <i class="arg">counts</i> <i class="arg">limits</i> <i class="arg">tag</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">math::statistics</b> package contains functions and procedures for
basic statistical data analysis, such as:</p>
<ul class="doctools_itemized">
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<dt><a name="1"><b class="cmd">::math::statistics::mean</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">mean</i> value of the given list of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::statistics::min</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term"><a href="../../../../index.html#minimum">minimum</a></i> value of the given list of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::statistics::max</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term"><a href="../../../../index.html#maximum">maximum</a></i> value of the given list of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::statistics::number</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">number</i> of non-missing data in the given list</p>
<dl class="doctools_arguments">







|





|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<dt><a name="1"><b class="cmd">::math::statistics::mean</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">mean</i> value of the given list of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::statistics::min</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term"><a href="../../../../index.html#key309">minimum</a></i> value of the given list of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">::math::statistics::max</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term"><a href="../../../../index.html#key310">maximum</a></i> value of the given list of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::statistics::number</b> <i class="arg">data</i></a></dt>
<dd><p>Determine the <i class="term">number</i> of non-missing data in the given list</p>
<dl class="doctools_arguments">
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">list2</i></dt>
<dd><p>- Second list of data</p></dd>
<dt>float <i class="arg">significance</i></dt>
<dd><p>- Significance level (either 0.05, 0.01 or 0.001)</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::statistics::test-anova-F</b> <i class="arg">alpha</i> <i class="arg">args</i></a></dt>
<dd><p>Determine if two or more groups with normally distributed data have the same means.
The procedure returns 0 if the means are likely unequal, 1 if they are. This is
a one-way ANOVA test. The groups may also be stored in a nested list:
The procedure returns a list of the comparison results for each pair of groups. Each
element of this list contains: the index of the first group and that of the second group,
whether the means are likely to be different (1) or not (0) and the confidence interval
the conclusion is based on. The groups may also be stored in a nested list:</p>
<pre class="doctools_example">
    test-anova-F 0.05 $A $B $C
    #
    # Or equivalently:
    #
    test-anova-F 0.05 [list $A $B $C]
</pre>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Significance level</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more groups of data to be checked</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::statistics::test-Tukey-range</b> <i class="arg">alpha</i> <i class="arg">args</i></a></dt>
<dd><p>Determine if two or more groups with normally distributed data have the same means,
using Tukey's range test. It is complementary to the ANOVA test.
The procedure returns a list of the comparison results for each pair of groups. Each
element of this list contains: the index of the first group and that of the second group,
whether the means are likely to be different (1) or not (0) and the confidence interval
the conclusion is based on. The groups may also be stored in a nested list, just as with
the ANOVA test.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Significance level - either 0.05 or 0.01</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more groups of data to be checked</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::statistics::test-Dunnett</b> <i class="arg">alpha</i> <i class="arg">control</i> <i class="arg">args</i></a></dt>
<dd><p>Determine if one or more groups with normally distributed data have the same means as
the group of control data, using Dunnett's test. It is complementary to the ANOVA test.
The procedure returns a list of the comparison results for each group with the control group. Each
element of this list contains: whether the means are likely to be different (1) or not (0)
and the confidence interval the conclusion is based on. The groups may also be stored in a
nested list, just as with the ANOVA test.</p>
<p>Note: some care is required if there is only one group to compare the control with:</p>
<pre class="doctools_example">
    test-Dunnett-F 0.05 $control [list $A]
</pre>
<p>Otherwise the group A is split up into groups of one element - this is due to an ambiguity.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Significance level - either 0.05 or 0.01</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>- One or more groups of data to be checked</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">data</i> <i class="arg">confidence</i></a></dt>
<dd><p>Return the quantiles for a given set of data</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of raw data values</p></dd>
<dt>float <i class="arg">confidence</i></dt>
<dd><p>- Confidence level (0.95 or 0.99 for instance) or a list of confidence levels.</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">limits</i> <i class="arg">counts</i> <i class="arg">confidence</i></a></dt>
<dd><p>Return the quantiles based on histogram information (alternative to the
call with two arguments)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">limits</i></dt>
<dd><p>- List of upper limits from histogram</p></dd>
<dt>list <i class="arg">counts</i></dt>
<dd><p>- List of counts for for each interval in histogram</p></dd>
<dt>float <i class="arg">confidence</i></dt>
<dd><p>-  Confidence level (0.95 or 0.99 for instance) or a list of confidence levels.</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::statistics::autocorr</b> <i class="arg">data</i></a></dt>
<dd><p>Return the autocorrelation function as a list of values (assuming
equidistance between samples, about 1/2 of the number of raw data)</p>
<p>The correlation is determined in such a way that the first value is
always 1 and all others are equal to or smaller than 1. The number of
values involved will diminish as the &quot;time&quot; (the index in the list of
returned values) increases</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- Raw data for which the autocorrelation must be determined</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::statistics::crosscorr</b> <i class="arg">data1</i> <i class="arg">data2</i></a></dt>
<dd><p>Return the cross-correlation function as a list of values (assuming
equidistance between samples, about 1/2 of the number of raw data)</p>
<p>The correlation is determined in such a way that the values can never
exceed 1 in magnitude. The number of values involved will diminish
as the &quot;time&quot; (the index in the list of returned values) increases.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data1</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">data2</i></dt>
<dd><p>- Second list of data</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::statistics::mean-histogram-limits</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></dt>
<dd><p>Determine reasonable limits based on mean and standard deviation
for a histogram
Convenience function - the result is suitable for the histogram function.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean of the data</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of limits to generate (defaults to 8)</p></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">::math::statistics::minmax-histogram-limits</b> <i class="arg">min</i> <i class="arg">max</i> <i class="arg">number</i></a></dt>
<dd><p>Determine reasonable limits based on a minimum and maximum for a histogram</p>
<p>Convenience function - the result is suitable for the histogram function.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>- Expected minimum</p></dd>
<dt>float <i class="arg">max</i></dt>
<dd><p>- Expected maximum</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of limits to generate (defaults to 8)</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::statistics::linear-model</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></dt>
<dd><p>Determine the coefficients for a linear regression between
two series of data (the model: Y = A + B*X). Returns a list of
parameters describing the fit</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xdata</i></dt>
<dd><p>- List of independent data</p></dd>
<dt>list <i class="arg">ydata</i></dt>







|
|
|
<
<
<
<













<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|







|










|










|











|











|










|







443
444
445
446
447
448
449
450
451
452




453
454
455
456
457
458
459
460
461
462
463
464
465
































466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">list2</i></dt>
<dd><p>- Second list of data</p></dd>
<dt>float <i class="arg">significance</i></dt>
<dd><p>- Significance level (either 0.05, 0.01 or 0.001)</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::statistics::test-anova-F</b> <i class="arg">alpha</i> <i class="arg">args</i></a></dt>
<dd><p>Determine if two or more groups with normally distributed data have the same variances.
The procedure returns 0 if the variances are likely unequal, 1 if they are. This is
a one-way ANOVA test. The groups may also be stored in a nested list:</p>




<pre class="doctools_example">
    test-anova-F 0.05 $A $B $C
    #
    # Or equivalently:
    #
    test-anova-F 0.05 [list $A $B $C]
</pre>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Significance level</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more groups of data to be checked</p></dd>
</dl></dd>
































<dt><a name="20"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">data</i> <i class="arg">confidence</i></a></dt>
<dd><p>Return the quantiles for a given set of data</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of raw data values</p></dd>
<dt>float <i class="arg">confidence</i></dt>
<dd><p>- Confidence level (0.95 or 0.99 for instance) or a list of confidence levels.</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::statistics::quantiles</b> <i class="arg">limits</i> <i class="arg">counts</i> <i class="arg">confidence</i></a></dt>
<dd><p>Return the quantiles based on histogram information (alternative to the
call with two arguments)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">limits</i></dt>
<dd><p>- List of upper limits from histogram</p></dd>
<dt>list <i class="arg">counts</i></dt>
<dd><p>- List of counts for for each interval in histogram</p></dd>
<dt>float <i class="arg">confidence</i></dt>
<dd><p>-  Confidence level (0.95 or 0.99 for instance) or a list of confidence levels.</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::statistics::autocorr</b> <i class="arg">data</i></a></dt>
<dd><p>Return the autocorrelation function as a list of values (assuming
equidistance between samples, about 1/2 of the number of raw data)</p>
<p>The correlation is determined in such a way that the first value is
always 1 and all others are equal to or smaller than 1. The number of
values involved will diminish as the &quot;time&quot; (the index in the list of
returned values) increases</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- Raw data for which the autocorrelation must be determined</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::statistics::crosscorr</b> <i class="arg">data1</i> <i class="arg">data2</i></a></dt>
<dd><p>Return the cross-correlation function as a list of values (assuming
equidistance between samples, about 1/2 of the number of raw data)</p>
<p>The correlation is determined in such a way that the values can never
exceed 1 in magnitude. The number of values involved will diminish
as the &quot;time&quot; (the index in the list of returned values) increases.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data1</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">data2</i></dt>
<dd><p>- Second list of data</p></dd>
</dl></dd>
<dt><a name="24"><b class="cmd">::math::statistics::mean-histogram-limits</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></dt>
<dd><p>Determine reasonable limits based on mean and standard deviation
for a histogram
Convenience function - the result is suitable for the histogram function.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean of the data</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of limits to generate (defaults to 8)</p></dd>
</dl></dd>
<dt><a name="25"><b class="cmd">::math::statistics::minmax-histogram-limits</b> <i class="arg">min</i> <i class="arg">max</i> <i class="arg">number</i></a></dt>
<dd><p>Determine reasonable limits based on a minimum and maximum for a histogram</p>
<p>Convenience function - the result is suitable for the histogram function.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>- Expected minimum</p></dd>
<dt>float <i class="arg">max</i></dt>
<dd><p>- Expected maximum</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of limits to generate (defaults to 8)</p></dd>
</dl></dd>
<dt><a name="26"><b class="cmd">::math::statistics::linear-model</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></dt>
<dd><p>Determine the coefficients for a linear regression between
two series of data (the model: Y = A + B*X). Returns a list of
parameters describing the fit</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xdata</i></dt>
<dd><p>- List of independent data</p></dd>
<dt>list <i class="arg">ydata</i></dt>
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778

779
780
781
782
783
784
785
786
<li><p>Number of degrees of freedom df</p></li>
<li><p>Standard error of the intercept A</p></li>
<li><p>Significance level of A</p></li>
<li><p>Standard error of the slope B</p></li>
<li><p>Significance level of B</p></li>
</ul></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::statistics::linear-residuals</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></dt>
<dd><p>Determine the difference between actual data and predicted from
the linear model.</p>
<p>Returns a list of the differences between the actual data and the
predicted values.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xdata</i></dt>
<dd><p>- List of independent data</p></dd>
<dt>list <i class="arg">ydata</i></dt>
<dd><p>- List of dependent data to be fitted</p></dd>
<dt>boolean <i class="arg">intercept</i></dt>
<dd><p>- (Optional) compute the intercept (1, default) or fit
to a line through the origin (0)</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd">::math::statistics::test-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></dt>
<dd><p>Determine if two set of samples, each from a binomial distribution,
differ significantly or not (implying a different parameter).</p>
<p>Returns the &quot;chi-square&quot; value, which can be used to the determine the
significance.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n11</i></dt>
<dd><p>- Number of outcomes with the first value from the first sample.</p></dd>
<dt>int <i class="arg">n21</i></dt>
<dd><p>- Number of outcomes with the first value from the second sample.</p></dd>
<dt>int <i class="arg">n12</i></dt>
<dd><p>- Number of outcomes with the second value from the first sample.</p></dd>
<dt>int <i class="arg">n22</i></dt>
<dd><p>- Number of outcomes with the second value from the second sample.</p></dd>
</dl></dd>
<dt><a name="31"><b class="cmd">::math::statistics::print-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></dt>
<dd><p>Determine if two set of samples, each from a binomial distribution,
differ significantly or not (implying a different parameter).</p>
<p>Returns a short report, useful in an interactive session.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n11</i></dt>
<dd><p>- Number of outcomes with the first value from the first sample.</p></dd>
<dt>int <i class="arg">n21</i></dt>
<dd><p>- Number of outcomes with the first value from the second sample.</p></dd>
<dt>int <i class="arg">n12</i></dt>
<dd><p>- Number of outcomes with the second value from the first sample.</p></dd>
<dt>int <i class="arg">n22</i></dt>
<dd><p>- Number of outcomes with the second value from the second sample.</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">::math::statistics::control-xbar</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></dt>
<dd><p>Determine the control limits for an xbar chart. The number of data
in each subsample defaults to 4. At least 20 subsamples are required.</p>
<p>Returns the mean, the lower limit, the upper limit and the number of
data per subsample.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
<dt>int <i class="arg">nsamples</i></dt>
<dd><p>- Number of data per subsample</p></dd>
</dl></dd>
<dt><a name="33"><b class="cmd">::math::statistics::control-Rchart</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></dt>
<dd><p>Determine the control limits for an R chart. The number of data
in each subsample (nsamples) defaults to 4. At least 20 subsamples are required.</p>
<p>Returns the mean range, the lower limit, the upper limit and the number
of data per subsample.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
<dt>int <i class="arg">nsamples</i></dt>
<dd><p>- Number of data per subsample</p></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">::math::statistics::test-xbar</b> <i class="arg">control</i> <i class="arg">data</i></a></dt>
<dd><p>Determine if the data exceed the control limits for the xbar chart.</p>
<p>Returns a list of subsamples (their indices) that indeed violate the
limits.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">control</i></dt>
<dd><p>- Control limits as returned by the &quot;control-xbar&quot; procedure</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">::math::statistics::test-Rchart</b> <i class="arg">control</i> <i class="arg">data</i></a></dt>
<dd><p>Determine if the data exceed the control limits for the R chart.</p>
<p>Returns a list of subsamples (their indices) that indeed violate the
limits.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">control</i></dt>
<dd><p>- Control limits as returned by the &quot;control-Rchart&quot; procedure</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
</dl></dd>
<dt><a name="36"><b class="cmd">::math::statistics::test-Kruskal-Wallis</b> <i class="arg">confidence</i> <i class="arg">args</i></a></dt>
<dd><p>Check if the population medians of two or more groups are equal with a
given confidence level, using the Kruskal-Wallis test.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">confidence</i></dt>
<dd><p>- Confidence level to be used (0-1)</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more lists of data</p></dd>
</dl></dd>
<dt><a name="37"><b class="cmd">::math::statistics::analyse-Kruskal-Wallis</b> <i class="arg">args</i></a></dt>
<dd><p>Compute the statistical parameters for the Kruskal-Wallis test.
Returns the Kruskal-Wallis statistic and the probability that that
value would occur assuming the medians of the populations are
equal.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more lists of data</p></dd>
</dl></dd>
<dt><a name="38"><b class="cmd">::math::statistics::test-Levene</b> <i class="arg">groups</i></a></dt>
<dd><p>Compute the Levene statistic to determine if groups of data have the
same variance (are homoscadastic) or not. The data are organised
in groups. This version uses the mean of the data as the measure
to determine the deviations. The statistic is equivalent to an
F statistic with degrees of freedom k-1 and N-k, k being the
number of groups and N the total number of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">groups</i></dt>
<dd><p>- List of groups of data</p></dd>
</dl></dd>
<dt><a name="39"><b class="cmd">::math::statistics::test-Brown-Forsythe</b> <i class="arg">groups</i></a></dt>
<dd><p>Compute the Brown-Forsythe statistic to determine if groups of data have the
same variance (are homoscadastic) or not. Like the Levene test, but this
version uses the median of the data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">groups</i></dt>
<dd><p>- List of groups of data</p></dd>
</dl></dd>
<dt><a name="40"><b class="cmd">::math::statistics::group-rank</b> <i class="arg">args</i></a></dt>
<dd><p>Rank the groups of data with respect to the complete set.
Returns a list consisting of the group ID, the value and the rank
(possibly a rational number, in case of ties) for each data item.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more lists of data</p></dd>
</dl></dd>
<dt><a name="41"><b class="cmd">::math::statistics::test-Wilcoxon</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></dt>
<dd><p>Compute the Wilcoxon test statistic to determine if two samples have the
same median or not. (The statistic can be regarded as standard normal, if the
sample sizes are both larger than 10.) Returns the value of this statistic.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">sample_a</i></dt>
<dd><p>- List of data comprising the first sample</p></dd>
<dt>list <i class="arg">sample_b</i></dt>
<dd><p>- List of data comprising the second sample</p></dd>
</dl></dd>
<dt><a name="42"><b class="cmd">::math::statistics::spearman-rank</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></dt>
<dd><p>Return the Spearman rank correlation as an alternative to the ordinary (Pearson's) correlation
coefficient. The two samples should have the same number of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">sample_a</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">sample_b</i></dt>
<dd><p>- Second list of data</p></dd>
</dl></dd>
<dt><a name="43"><b class="cmd">::math::statistics::spearman-rank-extended</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></dt>
<dd><p>Return the Spearman rank correlation as an alternative to the ordinary (Pearson's) correlation
coefficient as well as additional data. The two samples should have the same number of data.
The procedure returns the correlation coefficient, the number of data pairs used and the
z-score, an approximately standard normal statistic, indicating the significance of the correlation.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">sample_a</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">sample_b</i></dt>
<dd><p>- Second list of data</p></dd>
</dl></dd>
<dt><a name="44"><b class="cmd">::math::statistics::kernel-density</b> <i class="arg">data</i> opt <i class="arg">-option value</i> ...</a></dt>

<dd><p>Return the density function based on kernel density estimation. The procedure is controlled by
a small set of options, each of which is given a reasonable default.</p>
<p>The return value consists of three lists: the centres of the bins, the associated probability
density and a list of computational parameters (begin and end of the interval, mean and standard
deviation and the used bandwidth). The computational parameters can be used for further analysis.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- The data to be examined</p></dd>







|













|














|













|










|










|









|









|








|








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|







|


|






|








|










|
>
|







549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658



















659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
<li><p>Number of degrees of freedom df</p></li>
<li><p>Standard error of the intercept A</p></li>
<li><p>Significance level of A</p></li>
<li><p>Standard error of the slope B</p></li>
<li><p>Significance level of B</p></li>
</ul></dd>
</dl></dd>
<dt><a name="27"><b class="cmd">::math::statistics::linear-residuals</b> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">intercept</i></a></dt>
<dd><p>Determine the difference between actual data and predicted from
the linear model.</p>
<p>Returns a list of the differences between the actual data and the
predicted values.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xdata</i></dt>
<dd><p>- List of independent data</p></dd>
<dt>list <i class="arg">ydata</i></dt>
<dd><p>- List of dependent data to be fitted</p></dd>
<dt>boolean <i class="arg">intercept</i></dt>
<dd><p>- (Optional) compute the intercept (1, default) or fit
to a line through the origin (0)</p></dd>
</dl></dd>
<dt><a name="28"><b class="cmd">::math::statistics::test-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></dt>
<dd><p>Determine if two set of samples, each from a binomial distribution,
differ significantly or not (implying a different parameter).</p>
<p>Returns the &quot;chi-square&quot; value, which can be used to the determine the
significance.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n11</i></dt>
<dd><p>- Number of outcomes with the first value from the first sample.</p></dd>
<dt>int <i class="arg">n21</i></dt>
<dd><p>- Number of outcomes with the first value from the second sample.</p></dd>
<dt>int <i class="arg">n12</i></dt>
<dd><p>- Number of outcomes with the second value from the first sample.</p></dd>
<dt>int <i class="arg">n22</i></dt>
<dd><p>- Number of outcomes with the second value from the second sample.</p></dd>
</dl></dd>
<dt><a name="29"><b class="cmd">::math::statistics::print-2x2</b> <i class="arg">n11</i> <i class="arg">n21</i> <i class="arg">n12</i> <i class="arg">n22</i></a></dt>
<dd><p>Determine if two set of samples, each from a binomial distribution,
differ significantly or not (implying a different parameter).</p>
<p>Returns a short report, useful in an interactive session.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">n11</i></dt>
<dd><p>- Number of outcomes with the first value from the first sample.</p></dd>
<dt>int <i class="arg">n21</i></dt>
<dd><p>- Number of outcomes with the first value from the second sample.</p></dd>
<dt>int <i class="arg">n12</i></dt>
<dd><p>- Number of outcomes with the second value from the first sample.</p></dd>
<dt>int <i class="arg">n22</i></dt>
<dd><p>- Number of outcomes with the second value from the second sample.</p></dd>
</dl></dd>
<dt><a name="30"><b class="cmd">::math::statistics::control-xbar</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></dt>
<dd><p>Determine the control limits for an xbar chart. The number of data
in each subsample defaults to 4. At least 20 subsamples are required.</p>
<p>Returns the mean, the lower limit, the upper limit and the number of
data per subsample.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
<dt>int <i class="arg">nsamples</i></dt>
<dd><p>- Number of data per subsample</p></dd>
</dl></dd>
<dt><a name="31"><b class="cmd">::math::statistics::control-Rchart</b> <i class="arg">data</i> <span class="opt">?nsamples?</span></a></dt>
<dd><p>Determine the control limits for an R chart. The number of data
in each subsample (nsamples) defaults to 4. At least 20 subsamples are required.</p>
<p>Returns the mean range, the lower limit, the upper limit and the number
of data per subsample.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
<dt>int <i class="arg">nsamples</i></dt>
<dd><p>- Number of data per subsample</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">::math::statistics::test-xbar</b> <i class="arg">control</i> <i class="arg">data</i></a></dt>
<dd><p>Determine if the data exceed the control limits for the xbar chart.</p>
<p>Returns a list of subsamples (their indices) that indeed violate the
limits.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">control</i></dt>
<dd><p>- Control limits as returned by the &quot;control-xbar&quot; procedure</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
</dl></dd>
<dt><a name="33"><b class="cmd">::math::statistics::test-Rchart</b> <i class="arg">control</i> <i class="arg">data</i></a></dt>
<dd><p>Determine if the data exceed the control limits for the R chart.</p>
<p>Returns a list of subsamples (their indices) that indeed violate the
limits.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">control</i></dt>
<dd><p>- Control limits as returned by the &quot;control-Rchart&quot; procedure</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of observed data</p></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">::math::statistics::test-Kruskal-Wallis</b> <i class="arg">confidence</i> <i class="arg">args</i></a></dt>
<dd><p>Check if the population medians of two or more groups are equal with a
given confidence level, using the Kruskal-Wallis test.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">confidence</i></dt>
<dd><p>- Confidence level to be used (0-1)</p></dd>
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more lists of data</p></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">::math::statistics::analyse-Kruskal-Wallis</b> <i class="arg">args</i></a></dt>
<dd><p>Compute the statistical parameters for the Kruskal-Wallis test.
Returns the Kruskal-Wallis statistic and the probability that that
value would occur assuming the medians of the populations are
equal.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more lists of data</p></dd>
</dl></dd>



















<dt><a name="36"><b class="cmd">::math::statistics::group-rank</b> <i class="arg">args</i></a></dt>
<dd><p>Rank the groups of data with respect to the complete set.
Returns a list consisting of the group ID, the value and the rank
(possibly a rational number, in case of ties) for each data item.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">args</i></dt>
<dd><p>- Two or more lists of data</p></dd>
</dl></dd>
<dt><a name="37"><b class="cmd">::math::statistics::test-Wilcoxon</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></dt>
<dd><p>Compute the Wilcoxon test statistic to determine if two samples have the
same median or not. (The statistic can be regarded as standard normal, if the
sample sizes are both larger than 10. Returns the value of this statistic.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">sample_a</i></dt>
<dd><p>- List of data comprising the first sample</p></dd>
<dt>list <i class="arg">sample_b</i></dt>
<dd><p>- List of data comprising the second sample</p></dd>
</dl></dd>
<dt><a name="38"><b class="cmd">::math::statistics::spearman-rank</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></dt>
<dd><p>Return the Spearman rank correlation as an alternative to the ordinary (Pearson's) correlation
coefficient. The two samples should have the same number of data.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">sample_a</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">sample_b</i></dt>
<dd><p>- Second list of data</p></dd>
</dl></dd>
<dt><a name="39"><b class="cmd">::math::statistics::spearman-rank-extended</b> <i class="arg">sample_a</i> <i class="arg">sample_b</i></a></dt>
<dd><p>Return the Spearman rank correlation as an alternative to the ordinary (Pearson's) correlation
coefficient as well as additional data. The two samples should have the same number of data.
The procedure returns the correlation coefficient, the number of data pairs used and the
z-score, an approximately standard normal statistic, indicating the significance of the correlation.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">sample_a</i></dt>
<dd><p>- First list of data</p></dd>
<dt>list <i class="arg">sample_b</i></dt>
<dd><p>- Second list of data</p></dd>
</dl></dd>
<dt><a name="40"><b class="cmd">::math::statistics::kernel-density</b> <i class="arg">data</i> opt <i class="arg">-option value</i> ...</a></dt>
<dd><p>]
Return the density function based on kernel density estimation. The procedure is controlled by
a small set of options, each of which is given a reasonable default.</p>
<p>The return value consists of three lists: the centres of the bins, the associated probability
density and a list of computational parameters (begin and end of the interval, mean and standard
deviation and the used bandwidth). The computational parameters can be used for further analysis.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>- The data to be examined</p></dd>
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
<dd><p>Begin and end of the interval for
which the density is returned (default: mean +/- 3*standard deviation)</p></dd>
<dt><b class="option">-kernel</b> <i class="arg">function</i></dt>
<dd><p>Kernel to be used (One of: gaussian, cosine,
epanechnikov, uniform, triangular, biweight, logistic; default: gaussian)</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="45"><b class="cmd">::math::statistics::bootstrap</b> <i class="arg">data</i> <i class="arg">sampleSize</i> <span class="opt">?numberSamples?</span></a></dt>
<dd><p>Create a subsample or subsamples from a given list of data. The data in the samples are chosen
from this list - multiples may occur. If there is only one subsample, the sample itself
is returned (as a list of &quot;sampleSize&quot; values), otherwise a list of samples is returned.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">data</i></dt>
<dd><p>List of values to chose from</p></dd>
<dt>int <i class="arg">sampleSize</i></dt>
<dd><p>Number of values per sample</p></dd>
<dt>int <i class="arg">numberSamples</i></dt>
<dd><p>Number of samples (default: 1)</p></dd>
</dl></dd>
<dt><a name="46"><b class="cmd">::math::statistics::wasserstein-distance</b> <i class="arg">prob1</i> <i class="arg">prob2</i></a></dt>
<dd><p>Compute the Wasserstein distance or earth mover's distance for two equidstantly spaced histograms
or probability densities. The histograms need not to be normalised to sum to one,
but they must have the same number of entries.</p>
<p>Note: the histograms are assumed to be based on the same equidistant intervals.
As the bounds are not passed, the value is expressed in the length of the intervals.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">prob1</i></dt>
<dd><p>List of values for the first histogram/probability density</p></dd>
<dt>list <i class="arg">prob2</i></dt>
<dd><p>List of values for the second histogram/probability density</p></dd>
</dl></dd>
<dt><a name="47"><b class="cmd">::math::statistics::kl-divergence</b> <i class="arg">prob1</i> <i class="arg">prob2</i></a></dt>
<dd><p>Compute the Kullback-Leibler (KL) divergence for two equidstantly spaced histograms
or probability densities. The histograms need not to be normalised to sum to one,
but they must have the same number of entries.</p>
<p>Note: the histograms are assumed to be based on the same equidistant intervals.
As the bounds are not passed, the value is expressed in the length of the intervals.</p>
<p>Note also that the KL divergence is not symmetric and that the second histogram
should not contain zeroes in places where the first histogram has non-zero values.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">prob1</i></dt>
<dd><p>List of values for the first histogram/probability density</p></dd>
<dt>list <i class="arg">prob2</i></dt>
<dd><p>List of values for the second histogram/probability density</p></dd>
</dl></dd>
<dt><a name="48"><b class="cmd">::math::statistics::logistic-model</b> <i class="arg">xdata</i> <i class="arg">ydata</i></a></dt>
<dd><p>Estimate the coefficients of the logistic model that fits the data best. The data consist
of independent x-values and the outcome 0 or 1 for each of the x-values. The result
can be used to estimate the probability that a certain x-value gives 1.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">xdata</i></dt>
<dd><p>List of values for which the success (1) or failure (0) is known</p></dd>
<dt>list <i class="arg">ydata</i></dt>
<dd><p>List of successes or failures corresponding to each value in <i class="term">xdata</i>.</p></dd>
</dl></dd>
<dt><a name="49"><b class="cmd">::math::statistics::logistic-probability</b> <i class="arg">coeffs</i> <i class="arg">x</i></a></dt>
<dd><p>Calculate the probability of success for the value <i class="term">x</i> given the coefficients of the
logistic model.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">coeffs</i></dt>
<dd><p>List of coefficients as determine by the <b class="cmd">logistic-model</b> command</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>X-value for which the probability needs to be determined</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">MULTIVARIATE LINEAR REGRESSION</a></h2>
<p>Besides the linear regression with a single independent variable, the
statistics package provides two procedures for doing ordinary
least squares (OLS) and weighted least squares (WLS) linear regression
with several variables. They were written by Eric Kemp-Benedict.</p>
<p>In addition to these two, it provides a procedure (tstat)
for calculating the value of the t-statistic for the specified number of
degrees of freedom that is required to demonstrate a given level of
significance.</p>
<p>Note: These procedures depend on the math::linearalgebra package.</p>
<p><em>Description of the procedures</em></p>
<dl class="doctools_definitions">
<dt><a name="50"><b class="cmd">::math::statistics::tstat</b> <i class="arg">dof</i> <span class="opt">?alpha?</span></a></dt>
<dd><p>Returns the value of the t-distribution t* satisfying</p>
<pre class="doctools_example">
    P(t*)  =  1 - alpha/2
    P(-t*) =  alpha/2
</pre>
<p>for the number of degrees of freedom dof.</p>
<p>Given a sample of normally-distributed data x, with an







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














|







717
718
719
720
721
722
723

























































724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
<dd><p>Begin and end of the interval for
which the density is returned (default: mean +/- 3*standard deviation)</p></dd>
<dt><b class="option">-kernel</b> <i class="arg">function</i></dt>
<dd><p>Kernel to be used (One of: gaussian, cosine,
epanechnikov, uniform, triangular, biweight, logistic; default: gaussian)</p></dd>
</dl></dd>
</dl></dd>

























































</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">MULTIVARIATE LINEAR REGRESSION</a></h2>
<p>Besides the linear regression with a single independent variable, the
statistics package provides two procedures for doing ordinary
least squares (OLS) and weighted least squares (WLS) linear regression
with several variables. They were written by Eric Kemp-Benedict.</p>
<p>In addition to these two, it provides a procedure (tstat)
for calculating the value of the t-statistic for the specified number of
degrees of freedom that is required to demonstrate a given level of
significance.</p>
<p>Note: These procedures depend on the math::linearalgebra package.</p>
<p><em>Description of the procedures</em></p>
<dl class="doctools_definitions">
<dt><a name="41"><b class="cmd">::math::statistics::tstat</b> <i class="arg">dof</i> <span class="opt">?alpha?</span></a></dt>
<dd><p>Returns the value of the t-distribution t* satisfying</p>
<pre class="doctools_example">
    P(t*)  =  1 - alpha/2
    P(-t*) =  alpha/2
</pre>
<p>for the number of degrees of freedom dof.</p>
<p>Given a sample of normally-distributed data x, with an
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
the given confidence level.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">dof</i></dt>
<dd><p>Number of degrees of freedom</p></dd>
<dt>float <i class="arg">alpha</i></dt>
<dd><p>Confidence level of the t-distribution. Defaults to 0.05.</p></dd>
</dl></dd>
<dt><a name="51"><b class="cmd">::math::statistics::mv-wls</b> <i class="arg">wt1</i> <i class="arg">weights_and_values</i></a></dt>
<dd><p>Carries out a weighted least squares linear regression for
the data points provided, with weights assigned to each point.</p>
<p>The linear model is of the form</p>
<pre class="doctools_example">
    y = b0 + b1 * x1 + b2 * x2 ... + bN * xN + error
</pre>
<p>and each point satisfies</p>







|







755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
the given confidence level.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">dof</i></dt>
<dd><p>Number of degrees of freedom</p></dd>
<dt>float <i class="arg">alpha</i></dt>
<dd><p>Confidence level of the t-distribution. Defaults to 0.05.</p></dd>
</dl></dd>
<dt><a name="42"><b class="cmd">::math::statistics::mv-wls</b> <i class="arg">wt1</i> <i class="arg">weights_and_values</i></a></dt>
<dd><p>Carries out a weighted least squares linear regression for
the data points provided, with weights assigned to each point.</p>
<p>The linear model is of the form</p>
<pre class="doctools_example">
    y = b0 + b1 * x1 + b2 * x2 ... + bN * xN + error
</pre>
<p>and each point satisfies</p>
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
<dt>list <i class="arg">weights_and_values</i></dt>
<dd><p>A list consisting of: the weight for the first observation, the data
for the first observation (as a sublist), the weight for the second
observation (as a sublist) and so on. The sublists of data are organised
as lists of the value of the dependent variable y and the independent
variables x1, x2 to xN.</p></dd>
</dl></dd>
<dt><a name="52"><b class="cmd">::math::statistics::mv-ols</b> <i class="arg">values</i></a></dt>
<dd><p>Carries out an ordinary least squares linear regression for
the data points provided.</p>
<p>This procedure simply calls ::mvlinreg::wls with the weights
set to 1.0, and returns the same information.</p></dd>
</dl>
<p><em>Example of the use:</em></p>
<pre class="doctools_example">







|







785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
<dt>list <i class="arg">weights_and_values</i></dt>
<dd><p>A list consisting of: the weight for the first observation, the data
for the first observation (as a sublist), the weight for the second
observation (as a sublist) and so on. The sublists of data are organised
as lists of the value of the dependent variable y and the independent
variables x1, x2 to xN.</p></dd>
</dl></dd>
<dt><a name="43"><b class="cmd">::math::statistics::mv-ols</b> <i class="arg">values</i></a></dt>
<dd><p>Carries out an ordinary least squares linear regression for
the data points provided.</p>
<p>This procedure simply calls ::mvlinreg::wls with the weights
set to 1.0, and returns the same information.</p></dd>
</dl>
<p><em>Example of the use:</em></p>
<pre class="doctools_example">
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
<li><p>The cumulative density (cdf-*)</p></li>
<li><p>Quantiles for the given distribution (quantiles-*)</p></li>
<li><p>Histograms for the given distribution (histogram-*)</p></li>
<li><p>List of random values with the given distribution (random-*)</p></li>
</ul>
<p>The following procedures have been implemented:</p>
<dl class="doctools_definitions">
<dt><a name="53"><b class="cmd">::math::statistics::pdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a normal distribution with
given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="54"><b class="cmd">::math::statistics::pdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a log-normal distribution with
given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="55"><b class="cmd">::math::statistics::pdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for an exponential
distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="56"><b class="cmd">::math::statistics::pdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a uniform
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="57"><b class="cmd">::math::statistics::pdf-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a triangular
distribution with given extremes. If the argument min is lower than the argument max, then smaller
values have higher probability and vice versa. In the first case the probability
density function is of the form <em>f(x) = 2(1-x)</em> and the other case it is of the form <em>f(x) = 2x</em>.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="58"><b class="cmd">::math::statistics::pdf-symmetric-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a symmetric triangular
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="59"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Gamma
distribution with given shape and rate parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">beta</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="60"><b class="cmd">::math::statistics::pdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></dt>
<dd><p>Return the probability of a given number of occurrences in the same
interval (k) for a Poisson distribution with given mean (mu)</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mu</i></dt>
<dd><p>- Mean number of occurrences</p></dd>
<dt>int <i class="arg">k</i></dt>
<dd><p>- Number of occurences</p></dd>
</dl></dd>
<dt><a name="61"><b class="cmd">::math::statistics::pdf-chisquare</b> <i class="arg">df</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a chi square
distribution with given degrees of freedom</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="62"><b class="cmd">::math::statistics::pdf-student-t</b> <i class="arg">df</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Student's t
distribution with given degrees of freedom</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="63"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Gamma
distribution with given shape and rate parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="64"><b class="cmd">::math::statistics::pdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Beta
distribution with given shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="65"><b class="cmd">::math::statistics::pdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Weibull
distribution with given scale and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="66"><b class="cmd">::math::statistics::pdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Gumbel
distribution with given location and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="67"><b class="cmd">::math::statistics::pdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Pareto
distribution with given scale and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="68"><b class="cmd">::math::statistics::pdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Cauchy
distribution with given location and shape parameters. Note that the Cauchy distribution
has no finite higher-order moments.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="69"><b class="cmd">::math::statistics::pdf-laplace</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Laplace
distribution with given location and shape parameters. The Laplace distribution
consists of two exponential functions, is peaked and has heavier tails than the
normal distribution.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter (mean)</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="70"><b class="cmd">::math::statistics::pdf-kumaraswamy</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Kumaraswamy
distribution with given parameters a and b. The Kumaraswamy distribution
is related to the Beta distribution, but has a tractable cumulative distribution function.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- Parameter a</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Parameter b</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="71"><b class="cmd">::math::statistics::pdf-negative-binomial</b> <i class="arg">r</i> <i class="arg">p</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a negative binomial
distribution with an allowed number of failures and the probability of success.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">r</i></dt>
<dd><p>- Allowed number of failures (at least 1)</p></dd>
<dt>float <i class="arg">p</i></dt>
<dd><p>- Probability of success</p></dd>
<dt>int <i class="arg">value</i></dt>
<dd><p>- Number of successes for which the probability is to be returned</p></dd>
</dl></dd>
<dt><a name="72"><b class="cmd">::math::statistics::cdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a normal
distribution with given mean and standard deviation, that is the
probability for values up to the given one.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="73"><b class="cmd">::math::statistics::cdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a log-normal
distribution with given mean and standard deviation, that is the
probability for values up to the given one.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="74"><b class="cmd">::math::statistics::cdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for an exponential
distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="75"><b class="cmd">::math::statistics::cdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a uniform
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="76"><b class="cmd">::math::statistics::cdf-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a triangular
distribution with given extremes. If xmin &lt; xmax, then lower values have
a higher probability and vice versa, see also <em>pdf-triangular</em></p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="77"><b class="cmd">::math::statistics::cdf-symmetric-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a symmetric triangular
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="78"><b class="cmd">::math::statistics::cdf-students-t</b> <i class="arg">degrees</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Student's t
distribution with given number of degrees.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">degrees</i></dt>
<dd><p>- Number of degrees of freedom</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="79"><b class="cmd">::math::statistics::cdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Gamma
distribution with given shape and rate parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">beta</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the cumulative probability is required</p></dd>
</dl></dd>
<dt><a name="80"><b class="cmd">::math::statistics::cdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></dt>
<dd><p>Return the cumulative probability of a given number of occurrences in
the same interval (k) for a Poisson distribution with given mean (mu).</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mu</i></dt>
<dd><p>- Mean number of occurrences</p></dd>
<dt>int <i class="arg">k</i></dt>
<dd><p>- Number of occurences</p></dd>
</dl></dd>
<dt><a name="81"><b class="cmd">::math::statistics::cdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Beta
distribution with given shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="82"><b class="cmd">::math::statistics::cdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Weibull
distribution with given scale and shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="83"><b class="cmd">::math::statistics::cdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Gumbel
distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="84"><b class="cmd">::math::statistics::cdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Pareto
distribution with given scale and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="85"><b class="cmd">::math::statistics::cdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Cauchy
distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="86"><b class="cmd">::math::statistics::cdf-F</b> <i class="arg">nf1</i> <i class="arg">nf2</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for an F
distribution with nf1 and nf2 degrees of freedom.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">nf1</i></dt>
<dd><p>- Degrees of freedom for the numerator</p></dd>
<dt>float <i class="arg">nf2</i></dt>
<dd><p>- Degrees of freedom for the denominator</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="87"><b class="cmd">::math::statistics::cdf-laplace</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Laplace
distribution with given location and shape parameters. The Laplace distribution
consists of two exponential functions, is peaked and has heavier tails than the
normal distribution.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter (mean)</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="88"><b class="cmd">::math::statistics::cdf-kumaraswamy</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Kumaraswamy
distribution with given parameters a and b. The Kumaraswamy distribution
is related to the Beta distribution, but has a tractable cumulative distribution function.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- Parameter a</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Parameter b</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="89"><b class="cmd">::math::statistics::cdf-negative-binomial</b> <i class="arg">r</i> <i class="arg">p</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a negative binomial
distribution with an allowed number of failures and the probability of success.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">r</i></dt>
<dd><p>- Allowed number of failures (at least 1)</p></dd>
<dt>float <i class="arg">p</i></dt>
<dd><p>- Probability of success</p></dd>
<dt>int <i class="arg">value</i></dt>
<dd><p>- Greatest number of successes</p></dd>
</dl></dd>
<dt><a name="90"><b class="cmd">::math::statistics::empirical-distribution</b> <i class="arg">values</i></a></dt>
<dd><p>Return a list of values and their empirical probability. The values are sorted in increasing order.
(The implementation follows the description at the corresponding Wikipedia page)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>- List of data to be examined</p></dd>
</dl></dd>
<dt><a name="91"><b class="cmd">::math::statistics::random-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a normal
distribution with given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="92"><b class="cmd">::math::statistics::random-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a log-normal
distribution with given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="93"><b class="cmd">::math::statistics::random-exponential</b> <i class="arg">mean</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying an exponential
distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="94"><b class="cmd">::math::statistics::random-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a uniform
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="95"><b class="cmd">::math::statistics::random-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a triangular
distribution with given extremes. If xmin &lt; xmax, then lower values have a higher probability
and vice versa (see also <em>pdf-triangular</em>.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="96"><b class="cmd">::math::statistics::random-symmetric-triangular</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a symmetric triangular
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="97"><b class="cmd">::math::statistics::random-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Gamma distribution with given shape and rate parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">beta</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="98"><b class="cmd">::math::statistics::random-poisson</b> <i class="arg">mu</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Poisson distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mu</i></dt>
<dd><p>- Mean of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="99"><b class="cmd">::math::statistics::random-chisquare</b> <i class="arg">df</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a chi square distribution with given degrees of freedom.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="100"><b class="cmd">::math::statistics::random-student-t</b> <i class="arg">df</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Student's t distribution with given degrees of freedom.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="101"><b class="cmd">::math::statistics::random-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Beta distribution with given shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="102"><b class="cmd">::math::statistics::random-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Weibull distribution with given scale and shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="103"><b class="cmd">::math::statistics::random-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Gumbel distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="104"><b class="cmd">::math::statistics::random-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Pareto distribution with given scale and shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="105"><b class="cmd">::math::statistics::random-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Cauchy distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="106"><b class="cmd">::math::statistics::random-laplace</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a Laplace
distribution with given location and shape parameters. The Laplace distribution
consists of two exponential functions, is peaked and has heavier tails than the
normal distribution.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter (mean)</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="107"><b class="cmd">::math::statistics::random-kumaraswamy</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisying a Kumaraswamy
distribution with given parameters a and b. The Kumaraswamy distribution
is related to the Beta distribution, but has a tractable cumulative distribution function.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- Parameter a</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Parameter b</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="108"><b class="cmd">::math::statistics::random-negative-binomial</b> <i class="arg">r</i> <i class="arg">p</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisying a negative binomial distribution.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">r</i></dt>
<dd><p>- Allowed number of failures (at least 1)</p></dd>
<dt>float <i class="arg">p</i></dt>
<dd><p>- Probability of success</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="109"><b class="cmd">::math::statistics::histogram-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">limits</i> <i class="arg">number</i></a></dt>
<dd><p>Return the expected histogram for a uniform distribution.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>list <i class="arg">limits</i></dt>
<dd><p>- Upper limits for the buckets in the histogram</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Total number of &quot;observations&quot; in the histogram</p></dd>
</dl></dd>
<dt><a name="110"><b class="cmd">::math::statistics::incompleteGamma</b> <i class="arg">x</i> <i class="arg">p</i> <span class="opt">?tol?</span></a></dt>
<dd><p>Evaluate the incomplete Gamma integral</p>
<pre class="doctools_example">
                    1       / x               p-1
      P(p,x) =  --------   |   dt exp(-t) * t
                Gamma(p)  / 0
</pre>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>- Value of x (limit of the integral)</p></dd>
<dt>float <i class="arg">p</i></dt>
<dd><p>- Value of p in the integrand</p></dd>
<dt>float <i class="arg">tol</i></dt>
<dd><p>- Required tolerance (default: 1.0e-9)</p></dd>
</dl></dd>
<dt><a name="111"><b class="cmd">::math::statistics::incompleteBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i> <span class="opt">?tol?</span></a></dt>
<dd><p>Evaluate the incomplete Beta integral</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>- Value of x (limit of the integral)</p></dd>
<dt>float <i class="arg">tol</i></dt>
<dd><p>- Required tolerance (default: 1.0e-9)</p></dd>
</dl></dd>
<dt><a name="112"><b class="cmd">::math::statistics::estimate-pareto</b> <i class="arg">values</i></a></dt>
<dd><p>Estimate the parameters for the Pareto distribution that comes closest to the given values.
Returns the estimated scale and shape parameters, as well as the standard error for the shape parameter.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>- List of values, assumed to be distributed according to a Pareto distribution</p></dd>
</dl></dd>
<dt><a name="113"><b class="cmd">::math::statistics::estimate-exponential</b> <i class="arg">values</i></a></dt>
<dd><p>Estimate the parameter for the exponential distribution that comes closest to the given values.
Returns an estimate of the one parameter and of the standard error.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>- List of values, assumed to be distributed according to an exponential distribution</p></dd>
</dl></dd>
<dt><a name="114"><b class="cmd">::math::statistics::estimate-laplace</b> <i class="arg">values</i></a></dt>
<dd><p>Estimate the parameters for the Laplace distribution that comes closest to the given values.
Returns an estimate of respectively the location and scale parameters, based on maximum likelihood.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>- List of values, assumed to be distributed according to an exponential distribution</p></dd>
</dl></dd>
<dt><a name="115"><b class="cmd">::math::statistics::estimante-negative-binomial</b> <i class="arg">r</i> <i class="arg">values</i></a></dt>
<dd><p>Estimate the probability of success for the negative binomial distribution that comes closest to the given values.
The allowed number of failures must be given.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">r</i></dt>
<dd><p>- Allowed number of failures (at least 1)</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- List of values, assumed to be distributed according to a negative binomial distribution.</p></dd>
</dl></dd>
</dl>
<p>TO DO: more function descriptions to be added</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">DATA MANIPULATION</a></h2>
<p>The data manipulation procedures act on lists or lists of lists:</p>
<dl class="doctools_definitions">
<dt><a name="116"><b class="cmd">::math::statistics::filter</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></dt>
<dd><p>Return a list consisting of the data for which the logical
expression is true (this command works analogously to the command <b class="cmd"><a href="../../../../index.html#foreach">foreach</a></b>).</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">varname</i></dt>
<dd><p>- Name of the variable used in the expression</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
<dt>string <i class="arg">expression</i></dt>
<dd><p>- Logical expression using the variable name</p></dd>
</dl></dd>
<dt><a name="117"><b class="cmd">::math::statistics::map</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></dt>
<dd><p>Return a list consisting of the data that are transformed via the
expression.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">varname</i></dt>
<dd><p>- Name of the variable used in the expression</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
<dt>string <i class="arg">expression</i></dt>
<dd><p>- Expression to be used to transform (map) the data</p></dd>
</dl></dd>
<dt><a name="118"><b class="cmd">::math::statistics::samplescount</b> <i class="arg">varname</i> <i class="arg">list</i> <i class="arg">expression</i></a></dt>
<dd><p>Return a list consisting of the <i class="term">counts</i> of all data in the
sublists of the &quot;list&quot; argument for which the expression is true.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">varname</i></dt>
<dd><p>- Name of the variable used in the expression</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of sublists, each containing the data</p></dd>
<dt>string <i class="arg">expression</i></dt>
<dd><p>- Logical expression to test the data (defaults to
&quot;true&quot;).</p></dd>
</dl></dd>
<dt><a name="119"><b class="cmd">::math::statistics::subdivide</b></a></dt>
<dd><p>Routine <em>PM</em> - not implemented yet</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PLOT PROCEDURES</a></h2>
<p>The following simple plotting procedures are available:</p>
<dl class="doctools_definitions">
<dt><a name="120"><b class="cmd">::math::statistics::plot-scale</b> <i class="arg">canvas</i> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">ymin</i> <i class="arg">ymax</i></a></dt>
<dd><p>Set the scale for a plot in the given canvas. All plot routines expect
this function to be called first. There is no automatic scaling
provided.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum x value</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum x value</p></dd>
<dt>float <i class="arg">ymin</i></dt>
<dd><p>- Minimum y value</p></dd>
<dt>float <i class="arg">ymax</i></dt>
<dd><p>- Maximum y value</p></dd>
</dl></dd>
<dt><a name="121"><b class="cmd">::math::statistics::plot-xydata</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a collection of dots. The tag can be used to manipulate the
appearance.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>float <i class="arg">xdata</i></dt>
<dd><p>- Series of independent data</p></dd>
<dt>float <i class="arg">ydata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="122"><b class="cmd">::math::statistics::plot-xyline</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a line through the data points. The tag can be used to
manipulate the appearance.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">xdata</i></dt>
<dd><p>- Series of independent data</p></dd>
<dt>list <i class="arg">ydata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="123"><b class="cmd">::math::statistics::plot-tdata</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a collection of dots. The horizontal coordinate is equal to the
index. The tag can be used to manipulate the appearance.
This type of presentation is suitable for autocorrelation functions for
instance or for inspecting the time-dependent behaviour.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">tdata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="124"><b class="cmd">::math::statistics::plot-tline</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a line. See plot-tdata for an explanation.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">tdata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="125"><b class="cmd">::math::statistics::plot-histogram</b> <i class="arg">canvas</i> <i class="arg">counts</i> <i class="arg">limits</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple histogram in the given canvas</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">counts</i></dt>
<dd><p>- Series of bucket counts</p></dd>
<dt>list <i class="arg">limits</i></dt>







|










|










|








|










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|










|








|








|








|










|










|










|










|










|











<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|











|











|








|










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|








|










|








|










|










|










|










|










|










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|






|










|










|








|










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|










|








|








|








|










|










|










|










|










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|











|














|











|






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






|

|








|










|











|






|















|













|













|













|










|







850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
























899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003




































1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047























1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142




































1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191























1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284



































1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330























1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
<li><p>The cumulative density (cdf-*)</p></li>
<li><p>Quantiles for the given distribution (quantiles-*)</p></li>
<li><p>Histograms for the given distribution (histogram-*)</p></li>
<li><p>List of random values with the given distribution (random-*)</p></li>
</ul>
<p>The following procedures have been implemented:</p>
<dl class="doctools_definitions">
<dt><a name="44"><b class="cmd">::math::statistics::pdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a normal distribution with
given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="45"><b class="cmd">::math::statistics::pdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a log-normal distribution with
given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="46"><b class="cmd">::math::statistics::pdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for an exponential
distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="47"><b class="cmd">::math::statistics::pdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a uniform
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
























<dt><a name="48"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Gamma
distribution with given shape and rate parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">beta</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="49"><b class="cmd">::math::statistics::pdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></dt>
<dd><p>Return the probability of a given number of occurrences in the same
interval (k) for a Poisson distribution with given mean (mu)</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mu</i></dt>
<dd><p>- Mean number of occurrences</p></dd>
<dt>int <i class="arg">k</i></dt>
<dd><p>- Number of occurences</p></dd>
</dl></dd>
<dt><a name="50"><b class="cmd">::math::statistics::pdf-chisquare</b> <i class="arg">df</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a chi square
distribution with given degrees of freedom</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="51"><b class="cmd">::math::statistics::pdf-student-t</b> <i class="arg">df</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Student's t
distribution with given degrees of freedom</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="52"><b class="cmd">::math::statistics::pdf-gamma</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Gamma
distribution with given shape and rate parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="53"><b class="cmd">::math::statistics::pdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Beta
distribution with given shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="54"><b class="cmd">::math::statistics::pdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Weibull
distribution with given scale and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="55"><b class="cmd">::math::statistics::pdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Gumbel
distribution with given location and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="56"><b class="cmd">::math::statistics::pdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Pareto
distribution with given scale and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="57"><b class="cmd">::math::statistics::pdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the probability of a given value for a Cauchy
distribution with given location and shape parameters. Note that the Cauchy distribution
has no finite higher-order moments.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>




































<dt><a name="58"><b class="cmd">::math::statistics::cdf-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a normal
distribution with given mean and standard deviation, that is the
probability for values up to the given one.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="59"><b class="cmd">::math::statistics::cdf-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a log-normal
distribution with given mean and standard deviation, that is the
probability for values up to the given one.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="60"><b class="cmd">::math::statistics::cdf-exponential</b> <i class="arg">mean</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for an exponential
distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="61"><b class="cmd">::math::statistics::cdf-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a uniform
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>























<dt><a name="62"><b class="cmd">::math::statistics::cdf-students-t</b> <i class="arg">degrees</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Student's t
distribution with given number of degrees.</p>
<dl class="doctools_arguments">
<dt>int <i class="arg">degrees</i></dt>
<dd><p>- Number of degrees of freedom</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="63"><b class="cmd">::math::statistics::cdf-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Gamma
distribution with given shape and rate parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">beta</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the cumulative probability is required</p></dd>
</dl></dd>
<dt><a name="64"><b class="cmd">::math::statistics::cdf-poisson</b> <i class="arg">mu</i> <i class="arg">k</i></a></dt>
<dd><p>Return the cumulative probability of a given number of occurrences in
the same interval (k) for a Poisson distribution with given mean (mu).</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mu</i></dt>
<dd><p>- Mean number of occurrences</p></dd>
<dt>int <i class="arg">k</i></dt>
<dd><p>- Number of occurences</p></dd>
</dl></dd>
<dt><a name="65"><b class="cmd">::math::statistics::cdf-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Beta
distribution with given shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="66"><b class="cmd">::math::statistics::cdf-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Weibull
distribution with given scale and shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="67"><b class="cmd">::math::statistics::cdf-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Gumbel
distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="68"><b class="cmd">::math::statistics::cdf-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Pareto
distribution with given scale and shape parameters</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="69"><b class="cmd">::math::statistics::cdf-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for a Cauchy
distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>
<dt><a name="70"><b class="cmd">::math::statistics::cdf-F</b> <i class="arg">nf1</i> <i class="arg">nf2</i> <i class="arg">value</i></a></dt>
<dd><p>Return the cumulative probability of a given value for an F
distribution with nf1 and nf2 degrees of freedom.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">nf1</i></dt>
<dd><p>- Degrees of freedom for the numerator</p></dd>
<dt>float <i class="arg">nf2</i></dt>
<dd><p>- Degrees of freedom for the denominator</p></dd>
<dt>float <i class="arg">value</i></dt>
<dd><p>- Value for which the probability is required</p></dd>
</dl></dd>




































<dt><a name="71"><b class="cmd">::math::statistics::empirical-distribution</b> <i class="arg">values</i></a></dt>
<dd><p>Return a list of values and their empirical probability. The values are sorted in increasing order.
(The implementation follows the description at the corresponding Wikipedia page)</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>- List of data to be examined</p></dd>
</dl></dd>
<dt><a name="72"><b class="cmd">::math::statistics::random-normal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a normal
distribution with given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="73"><b class="cmd">::math::statistics::random-lognormal</b> <i class="arg">mean</i> <i class="arg">stdev</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a log-normal
distribution with given mean and standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>- Standard deviation of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="74"><b class="cmd">::math::statistics::random-exponential</b> <i class="arg">mean</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying an exponential
distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>- Mean value of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="75"><b class="cmd">::math::statistics::random-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying a uniform
distribution with given extremes.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>























<dt><a name="76"><b class="cmd">::math::statistics::random-gamma</b> <i class="arg">alpha</i> <i class="arg">beta</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Gamma distribution with given shape and rate parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">alpha</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>float <i class="arg">beta</i></dt>
<dd><p>- Rate parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="77"><b class="cmd">::math::statistics::random-poisson</b> <i class="arg">mu</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Poisson distribution with given mean.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mu</i></dt>
<dd><p>- Mean of the distribution</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="78"><b class="cmd">::math::statistics::random-chisquare</b> <i class="arg">df</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a chi square distribution with given degrees of freedom.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="79"><b class="cmd">::math::statistics::random-student-t</b> <i class="arg">df</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Student's t distribution with given degrees of freedom.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>- Degrees of freedom</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="80"><b class="cmd">::math::statistics::random-beta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Beta distribution with given shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="81"><b class="cmd">::math::statistics::random-weibull</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Weibull distribution with given scale and shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="82"><b class="cmd">::math::statistics::random-gumbel</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Gumbel distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="83"><b class="cmd">::math::statistics::random-pareto</b> <i class="arg">scale</i> <i class="arg">shape</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Pareto distribution with given scale and shape parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>float <i class="arg">shape</i></dt>
<dd><p>- Shape parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>
<dt><a name="84"><b class="cmd">::math::statistics::random-cauchy</b> <i class="arg">location</i> <i class="arg">scale</i> <i class="arg">number</i></a></dt>
<dd><p>Return a list of &quot;number&quot; random values satisfying
a Cauchy distribution with given location and scale parameters.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">location</i></dt>
<dd><p>- Location parameter</p></dd>
<dt>float <i class="arg">scale</i></dt>
<dd><p>- Scale parameter</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Number of values to be returned</p></dd>
</dl></dd>



































<dt><a name="85"><b class="cmd">::math::statistics::histogram-uniform</b> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">limits</i> <i class="arg">number</i></a></dt>
<dd><p>Return the expected histogram for a uniform distribution.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum value of the distribution</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum value of the distribution</p></dd>
<dt>list <i class="arg">limits</i></dt>
<dd><p>- Upper limits for the buckets in the histogram</p></dd>
<dt>int <i class="arg">number</i></dt>
<dd><p>- Total number of &quot;observations&quot; in the histogram</p></dd>
</dl></dd>
<dt><a name="86"><b class="cmd">::math::statistics::incompleteGamma</b> <i class="arg">x</i> <i class="arg">p</i> <span class="opt">?tol?</span></a></dt>
<dd><p>Evaluate the incomplete Gamma integral</p>
<pre class="doctools_example">
                    1       / x               p-1
      P(p,x) =  --------   |   dt exp(-t) * t
                Gamma(p)  / 0
</pre>
<dl class="doctools_arguments">
<dt>float <i class="arg">x</i></dt>
<dd><p>- Value of x (limit of the integral)</p></dd>
<dt>float <i class="arg">p</i></dt>
<dd><p>- Value of p in the integrand</p></dd>
<dt>float <i class="arg">tol</i></dt>
<dd><p>- Required tolerance (default: 1.0e-9)</p></dd>
</dl></dd>
<dt><a name="87"><b class="cmd">::math::statistics::incompleteBeta</b> <i class="arg">a</i> <i class="arg">b</i> <i class="arg">x</i> <span class="opt">?tol?</span></a></dt>
<dd><p>Evaluate the incomplete Beta integral</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">a</i></dt>
<dd><p>- First shape parameter</p></dd>
<dt>float <i class="arg">b</i></dt>
<dd><p>- Second shape parameter</p></dd>
<dt>float <i class="arg">x</i></dt>
<dd><p>- Value of x (limit of the integral)</p></dd>
<dt>float <i class="arg">tol</i></dt>
<dd><p>- Required tolerance (default: 1.0e-9)</p></dd>
</dl></dd>
<dt><a name="88"><b class="cmd">::math::statistics::estimate-pareto</b> <i class="arg">values</i></a></dt>
<dd><p>Estimate the parameters for the Pareto distribution that comes closest to the given values.
Returns the estimated scale and shape parameters, as well as the standard error for the shape parameter.</p>
<dl class="doctools_arguments">
<dt>list <i class="arg">values</i></dt>
<dd><p>- List of values, assumed to be distributed according to a Pareto distribution</p></dd>
</dl></dd>























</dl>
<p>TO DO: more function descriptions to be added</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">DATA MANIPULATION</a></h2>
<p>The data manipulation procedures act on lists or lists of lists:</p>
<dl class="doctools_definitions">
<dt><a name="89"><b class="cmd">::math::statistics::filter</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></dt>
<dd><p>Return a list consisting of the data for which the logical
expression is true (this command works analogously to the command <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b>).</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">varname</i></dt>
<dd><p>- Name of the variable used in the expression</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
<dt>string <i class="arg">expression</i></dt>
<dd><p>- Logical expression using the variable name</p></dd>
</dl></dd>
<dt><a name="90"><b class="cmd">::math::statistics::map</b> <i class="arg">varname</i> <i class="arg">data</i> <i class="arg">expression</i></a></dt>
<dd><p>Return a list consisting of the data that are transformed via the
expression.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">varname</i></dt>
<dd><p>- Name of the variable used in the expression</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of data</p></dd>
<dt>string <i class="arg">expression</i></dt>
<dd><p>- Expression to be used to transform (map) the data</p></dd>
</dl></dd>
<dt><a name="91"><b class="cmd">::math::statistics::samplescount</b> <i class="arg">varname</i> <i class="arg">list</i> <i class="arg">expression</i></a></dt>
<dd><p>Return a list consisting of the <i class="term">counts</i> of all data in the
sublists of the &quot;list&quot; argument for which the expression is true.</p>
<dl class="doctools_arguments">
<dt>string <i class="arg">varname</i></dt>
<dd><p>- Name of the variable used in the expression</p></dd>
<dt>list <i class="arg">data</i></dt>
<dd><p>- List of sublists, each containing the data</p></dd>
<dt>string <i class="arg">expression</i></dt>
<dd><p>- Logical expression to test the data (defaults to
&quot;true&quot;).</p></dd>
</dl></dd>
<dt><a name="92"><b class="cmd">::math::statistics::subdivide</b></a></dt>
<dd><p>Routine <em>PM</em> - not implemented yet</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">PLOT PROCEDURES</a></h2>
<p>The following simple plotting procedures are available:</p>
<dl class="doctools_definitions">
<dt><a name="93"><b class="cmd">::math::statistics::plot-scale</b> <i class="arg">canvas</i> <i class="arg">xmin</i> <i class="arg">xmax</i> <i class="arg">ymin</i> <i class="arg">ymax</i></a></dt>
<dd><p>Set the scale for a plot in the given canvas. All plot routines expect
this function to be called first. There is no automatic scaling
provided.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>float <i class="arg">xmin</i></dt>
<dd><p>- Minimum x value</p></dd>
<dt>float <i class="arg">xmax</i></dt>
<dd><p>- Maximum x value</p></dd>
<dt>float <i class="arg">ymin</i></dt>
<dd><p>- Minimum y value</p></dd>
<dt>float <i class="arg">ymax</i></dt>
<dd><p>- Maximum y value</p></dd>
</dl></dd>
<dt><a name="94"><b class="cmd">::math::statistics::plot-xydata</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a collection of dots. The tag can be used to manipulate the
appearance.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>float <i class="arg">xdata</i></dt>
<dd><p>- Series of independent data</p></dd>
<dt>float <i class="arg">ydata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="95"><b class="cmd">::math::statistics::plot-xyline</b> <i class="arg">canvas</i> <i class="arg">xdata</i> <i class="arg">ydata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a line through the data points. The tag can be used to
manipulate the appearance.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">xdata</i></dt>
<dd><p>- Series of independent data</p></dd>
<dt>list <i class="arg">ydata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="96"><b class="cmd">::math::statistics::plot-tdata</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a collection of dots. The horizontal coordinate is equal to the
index. The tag can be used to manipulate the appearance.
This type of presentation is suitable for autocorrelation functions for
instance or for inspecting the time-dependent behaviour.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">tdata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="97"><b class="cmd">::math::statistics::plot-tline</b> <i class="arg">canvas</i> <i class="arg">tdata</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple XY plot in the given canvas - the data are
shown as a line. See plot-tdata for an explanation.</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">tdata</i></dt>
<dd><p>- Series of dependent data</p></dd>
<dt>string <i class="arg">tag</i></dt>
<dd><p>- Tag to give to the plotted data (defaults to xyplot)</p></dd>
</dl></dd>
<dt><a name="98"><b class="cmd">::math::statistics::plot-histogram</b> <i class="arg">canvas</i> <i class="arg">counts</i> <i class="arg">limits</i> <i class="arg">tag</i></a></dt>
<dd><p>Create a simple histogram in the given canvas</p>
<dl class="doctools_arguments">
<dt>widget <i class="arg">canvas</i></dt>
<dd><p>- Canvas widget to use</p></dd>
<dt>list <i class="arg">counts</i></dt>
<dd><p>- Series of bucket counts</p></dd>
<dt>list <i class="arg">limits</i></dt>
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: statistics</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#data_analysis">data analysis</a>, <a href="../../../../index.html#mathematics">mathematics</a>, <a href="../../../../index.html#statistics">statistics</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





1585
1586
1587
1588
1589
1590
1591






1592
1593
1594
1595
1596
1597
1598
1599
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: statistics</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key630">data analysis</a>, <a href="../../../../index.html#key629">mathematics</a>, <a href="../../../../index.html#key195">statistics</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/math/symdiff.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>math::calculus::symdiff - Symbolic differentiation for Tcl</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>math::calculus::symdiff - Symbolic differentiation for Tcl</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'symdiff.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2010 by Kevin B. Kenny &amp;lt;kennykb@acm.org&amp;gt;   -- Redistribution permitted under the terms of the Open Publication License &amp;lt;http://www.opencontent.org/openpub/&amp;gt;
   -->
<!-- math::calculus::symdiff.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::calculus::symdiff(n) 1.0.1 tcllib &quot;Symbolic differentiation for Tcl&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::calculus::symdiff - Symbolic differentiation for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'symdiff.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2010 by Kevin B. Kenny &lt;kennykb@acm.org&gt;   -- Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;
   -->
<! -- math::calculus::symdiff.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::calculus::symdiff(n) 1.0.1 tcllib &quot;Symbolic differentiation for Tcl&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::calculus::symdiff - Symbolic differentiation for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: calculus</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="calculus.html">math::calculus</a>, <a href="interpolate.html">math::interpolate</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010 by Kevin B. Kenny &lt;kennykb@acm.org&gt;<br>
Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<









200
201
202
203
204
205
206






207
208
209
210
211
212
213
214
215
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: calculus</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="calculus.html">math::calculus</a>, <a href="interpolate.html">math::interpolate</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010 by Kevin B. Kenny &lt;kennykb@acm.org&gt;<br>
Redistribution permitted under the terms of the Open Publication License &lt;http://www.opencontent.org/openpub/&gt;</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/math/trig.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
<!DOCTYPE html><html><head>
<title>math::trig - Tcl Math Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'trig.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2018 Arjen Markus
   -->
<!-- math::trig.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">math::trig(n) 1.0.0 tcllib &quot;Tcl Math Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>math::trig - Trigonometric anf hyperbolic functions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">FUNCTIONS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">math::trig 1.0.0</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::math::trig::radian_reduced</b> <i class="arg">angle</i></a></li>
<li><a href="#2"><b class="cmd">::math::trig::degree_reduced</b> <i class="arg">angle</i></a></li>
<li><a href="#3"><b class="cmd">::math::trig::cosec</b> <i class="arg">angle</i></a></li>
<li><a href="#4"><b class="cmd">::math::trig::sec</b> <i class="arg">angle</i></a></li>
<li><a href="#5"><b class="cmd">::math::trig::cotan</b> <i class="arg">angle</i></a></li>
<li><a href="#6"><b class="cmd">::math::trig::acosec</b> <i class="arg">value</i></a></li>
<li><a href="#7"><b class="cmd">::math::trig::asec</b> <i class="arg">value</i></a></li>
<li><a href="#8"><b class="cmd">::math::trig::acotan</b> <i class="arg">value</i></a></li>
<li><a href="#9"><b class="cmd">::math::trig::cosech</b> <i class="arg">value</i></a></li>
<li><a href="#10"><b class="cmd">::math::trig::sech</b> <i class="arg">value</i></a></li>
<li><a href="#11"><b class="cmd">::math::trig::cotanh</b> <i class="arg">value</i></a></li>
<li><a href="#12"><b class="cmd">::math::trig::asinh</b> <i class="arg">value</i></a></li>
<li><a href="#13"><b class="cmd">::math::trig::acosh</b> <i class="arg">value</i></a></li>
<li><a href="#14"><b class="cmd">::math::trig::atanh</b> <i class="arg">value</i></a></li>
<li><a href="#15"><b class="cmd">::math::trig::acosech</b> <i class="arg">value</i></a></li>
<li><a href="#16"><b class="cmd">::math::trig::asech</b> <i class="arg">value</i></a></li>
<li><a href="#17"><b class="cmd">::math::trig::acotanh</b> <i class="arg">value</i></a></li>
<li><a href="#18"><b class="cmd">::math::trig::sind</b> <i class="arg">angle</i></a></li>
<li><a href="#19"><b class="cmd">::math::trig::cosd</b> <i class="arg">angle</i></a></li>
<li><a href="#20"><b class="cmd">::math::trig::tand</b> <i class="arg">angle</i></a></li>
<li><a href="#21"><b class="cmd">::math::trig::cosecd</b> <i class="arg">angle</i></a></li>
<li><a href="#22"><b class="cmd">::math::trig::secd</b> <i class="arg">angle</i></a></li>
<li><a href="#23"><b class="cmd">::math::trig::cotand</b> <i class="arg">angle</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <i class="term">math::trig</i> package defines a set of trigonomic and hyperbolic functions
and their inverses. In addition it defines versions of the trigonomic functions
that take arguments in degrees instead of radians.</p>
<p>For easy use these functions may be imported into the <i class="term">tcl::mathfunc</i> namespace,
so that they can be used directly in the <i class="term">expr</i> command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">FUNCTIONS</a></h2>
<p>The functions <i class="term">radian_reduced</i> and <i class="term">degree_reduced</i> return a reduced angle, in
respectively radians and degrees, in the intervals [0, 2pi) and [0, 360):</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::math::trig::radian_reduced</b> <i class="arg">angle</i></a></dt>
<dd><p>Return the equivalent angle in the interval [0, 2pi).</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in radians)</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::math::trig::degree_reduced</b> <i class="arg">angle</i></a></dt>
<dd><p>Return the equivalent angle in the interval [0, 360).</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in degrees)</p></dd>
</dl></dd>
</dl>
<p>The following trigonomic functions are defined in addition to the ones defined
in the <i class="term">expr</i> command:</p>
<dl class="doctools_definitions">
<dt><a name="3"><b class="cmd">::math::trig::cosec</b> <i class="arg">angle</i></a></dt>
<dd><p>Calculate the cosecant of the angle (1/cos(angle))</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in radians)</p></dd>
</dl></dd>
<dt><a name="4"><b class="cmd">::math::trig::sec</b> <i class="arg">angle</i></a></dt>
<dd><p>Calculate the secant of the angle (1/sin(angle))</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in radians)</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::math::trig::cotan</b> <i class="arg">angle</i></a></dt>
<dd><p>Calculate the cotangent of the angle (1/tan(angle))</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in radians)</p></dd>
</dl></dd>
</dl>
<p>For these functions also the inverses are defined:</p>
<dl class="doctools_definitions">
<dt><a name="6"><b class="cmd">::math::trig::acosec</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the arc cosecant of the value</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::math::trig::asec</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the arc secant of the value</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::math::trig::acotan</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the arc cotangent of the value</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
</dl>
<p>The following hyperbolic and inverse hyperbolic functions are defined:</p>
<dl class="doctools_definitions">
<dt><a name="9"><b class="cmd">::math::trig::cosech</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the hyperbolic cosecant of the value (1/sinh(value))</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::math::trig::sech</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the hyperbolic secant of the value (1/cosh(value))</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::math::trig::cotanh</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the hyperbolic cotangent of the value (1/tanh(value))</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::math::trig::asinh</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the arc hyperbolic sine of the value</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::math::trig::acosh</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the arc hyperbolic cosine of the value</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::math::trig::atanh</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the arc hyperbolic tangent of the value</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::math::trig::acosech</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the arc hyperbolic cosecant of the value</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::math::trig::asech</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the arc hyperbolic secant of the value</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
<dt><a name="17"><b class="cmd">::math::trig::acotanh</b> <i class="arg">value</i></a></dt>
<dd><p>Calculate the arc hyperbolic cotangent of the value</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">value</i></dt>
<dd><p>Value of the argument</p></dd>
</dl></dd>
</dl>
<p>The following versions of the common trigonometric functions and their
inverses are defined:</p>
<dl class="doctools_definitions">
<dt><a name="18"><b class="cmd">::math::trig::sind</b> <i class="arg">angle</i></a></dt>
<dd><p>Calculate the sine of the angle (in degrees)</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in degrees)</p></dd>
</dl></dd>
<dt><a name="19"><b class="cmd">::math::trig::cosd</b> <i class="arg">angle</i></a></dt>
<dd><p>Calculate the cosine of the angle (in degrees)</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in radians)</p></dd>
</dl></dd>
<dt><a name="20"><b class="cmd">::math::trig::tand</b> <i class="arg">angle</i></a></dt>
<dd><p>Calculate the cotangent of the angle (in degrees)</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in degrees)</p></dd>
</dl></dd>
<dt><a name="21"><b class="cmd">::math::trig::cosecd</b> <i class="arg">angle</i></a></dt>
<dd><p>Calculate the cosecant of the angle (in degrees)</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in degrees)</p></dd>
</dl></dd>
<dt><a name="22"><b class="cmd">::math::trig::secd</b> <i class="arg">angle</i></a></dt>
<dd><p>Calculate the secant of the angle (in degrees)</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in degrees)</p></dd>
</dl></dd>
<dt><a name="23"><b class="cmd">::math::trig::cotand</b> <i class="arg">angle</i></a></dt>
<dd><p>Calculate the cotangent of the angle (in degrees)</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">angle</i></dt>
<dd><p>Angle (in degrees)</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>math :: trig</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#trigonometry">trigonometry</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2018 Arjen Markus</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/md4/md4.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>md4 - MD4 Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>md4 - MD4 Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'md4.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- md4.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">md4(n) 1.0.7 tcllib &quot;MD4 Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>md4 - MD4 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'md4.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- md4.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">md4(n) 1.0.6 tcllib &quot;MD4 Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>md4 - MD4 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">md4 <span class="opt">?1.0.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::md4::md4</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::md4::hmac</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::md4::MD4Init</b></a></li>
<li><a href="#4"><b class="cmd">::md4::MD4Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::md4::MD4Final</b> <i class="arg">token</i></a></li>







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">md4 <span class="opt">?1.0.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::md4::md4</b> <span class="opt">?<i class="arg">-hex</i>?</span> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::md4::hmac</b> <span class="opt">?<i class="arg">-hex</i>?</span> <i class="arg">-key key</i> [ <i class="arg">-channel channel</i> | <i class="arg">-file filename</i> | <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::md4::MD4Init</b></a></li>
<li><a href="#4"><b class="cmd">::md4::MD4Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
<li><a href="#5"><b class="cmd">::md4::MD4Final</b> <i class="arg">token</i></a></li>
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>md4</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md5/md5.html">md5</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#hashing">hashing</a>, <a href="../../../../index.html#md4">md4</a>, <a href="../../../../index.html#message_digest">message-digest</a>, <a href="../../../../index.html#rfc_1320">rfc 1320</a>, <a href="../../../../index.html#rfc_1321">rfc 1321</a>, <a href="../../../../index.html#rfc_2104">rfc 2104</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








248
249
250
251
252
253
254






255
256
257
258
259
260
261
262
263
264
265
266
267
268
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>md4</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md5/md5.html">md5</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key380">md4</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key379">rfc 1320</a>, <a href="../../../../index.html#key381">rfc 1321</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/md5/md5.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>md5 - MD5 Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>md5 - MD5 Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'md5.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- md5.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">md5(n) 2.0.8 tcllib &quot;MD5 Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>md5 - MD5 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'md5.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- md5.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">md5(n) 2.0.7 tcllib &quot;MD5 Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>md5 - MD5 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>md5</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#hashing">hashing</a>, <a href="../../../../index.html#md5">md5</a>, <a href="../../../../index.html#message_digest">message-digest</a>, <a href="../../../../index.html#rfc_1320">rfc 1320</a>, <a href="../../../../index.html#rfc_1321">rfc 1321</a>, <a href="../../../../index.html#rfc_2104">rfc 2104</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








253
254
255
256
257
258
259






260
261
262
263
264
265
266
267
268
269
270
271
272
273
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>md5</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key661">md5</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key379">rfc 1320</a>, <a href="../../../../index.html#key381">rfc 1321</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/md5crypt/md5crypt.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>md5crypt - MD5-based password encryption</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>md5crypt - MD5-based password encryption</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'md5crypt.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- md5crypt.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">md5crypt(n) 1.1.0 tcllib &quot;MD5-based password encryption&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>md5crypt - MD5-based password encryption</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'md5crypt.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- md5crypt.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">md5crypt(n) 1.1.0 tcllib &quot;MD5-based password encryption&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>md5crypt - MD5-based password encryption</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>md5crypt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md5/md5.html">md5</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#hashing">hashing</a>, <a href="../../../../index.html#md5">md5</a>, <a href="../../../../index.html#md5crypt">md5crypt</a>, <a href="../../../../index.html#message_digest">message-digest</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








191
192
193
194
195
196
197






198
199
200
201
202
203
204
205
206
207
208
209
210
211
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>md5crypt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md5/md5.html">md5</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key661">md5</a>, <a href="../../../../index.html#key767">md5crypt</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/mime/mime.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>mime - Mime</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>mime - Mime</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'mime.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 1999-2000 Marshall T. Rose
   -->
<!-- mime.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">mime(n) 1.6.3 tcllib &quot;Mime&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>mime - Manipulation of MIME body parts</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">KNOWN BUGS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">mime <span class="opt">?1.6.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::mime::initialize</b> <span class="opt">?<b class="option">-canonical</b> <i class="arg">type/subtype</i> <span class="opt">?<b class="option">-param</b> {<i class="arg">key value</i>}...?</span> <span class="opt">?<b class="option">-encoding</b> <i class="arg">value</i>?</span> <span class="opt">?<b class="option">-header</b> {<i class="arg">key value</i>}...?</span>?</span> (<b class="option">-file</b> <i class="arg">name</i> | <b class="option">-string</b> <i class="arg">value</i> | <b class="option">-parts</b> {<i class="arg">token1</i> ... <i class="arg">tokenN</i>})</a></li>
<li><a href="#2"><b class="cmd">::mime::finalize</b> <i class="arg">token</i> <span class="opt">?<b class="option">-subordinates</b> <b class="const">all</b> | <b class="const">dynamic</b> | <b class="const">none</b>?</span></a></li>
<li><a href="#3"><b class="cmd">::mime::getproperty</b> <i class="arg">token</i> <span class="opt">?<i class="arg">property</i> | <b class="option">-names</b>?</span></a></li>
<li><a href="#4"><b class="cmd">::mime::getheader</b> <i class="arg">token</i> <span class="opt">?<i class="arg">key</i> | <b class="option">-names</b>?</span></a></li>
<li><a href="#5"><b class="cmd">::mime::setheader</b> <i class="arg">token</i> <i class="arg">key value</i> <span class="opt">?<b class="option">-mode</b> <b class="const">write</b> | <b class="const">append</b> | <b class="const">delete</b>?</span></a></li>







|

|

|



|
|
|
|
|
|


|




















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'mime.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 1999-2000 Marshall T. Rose
   -->
<! -- mime.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">mime(n) 1.6 tcllib &quot;Mime&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>mime - Manipulation of MIME body parts</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">KNOWN BUGS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">mime <span class="opt">?1.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::mime::initialize</b> <span class="opt">?<b class="option">-canonical</b> <i class="arg">type/subtype</i> <span class="opt">?<b class="option">-param</b> {<i class="arg">key value</i>}...?</span> <span class="opt">?<b class="option">-encoding</b> <i class="arg">value</i>?</span> <span class="opt">?<b class="option">-header</b> {<i class="arg">key value</i>}...?</span>?</span> (<b class="option">-file</b> <i class="arg">name</i> | <b class="option">-string</b> <i class="arg">value</i> | <b class="option">-parts</b> {<i class="arg">token1</i> ... <i class="arg">tokenN</i>})</a></li>
<li><a href="#2"><b class="cmd">::mime::finalize</b> <i class="arg">token</i> <span class="opt">?<b class="option">-subordinates</b> <b class="const">all</b> | <b class="const">dynamic</b> | <b class="const">none</b>?</span></a></li>
<li><a href="#3"><b class="cmd">::mime::getproperty</b> <i class="arg">token</i> <span class="opt">?<i class="arg">property</i> | <b class="option">-names</b>?</span></a></li>
<li><a href="#4"><b class="cmd">::mime::getheader</b> <i class="arg">token</i> <span class="opt">?<i class="arg">key</i> | <b class="option">-names</b>?</span></a></li>
<li><a href="#5"><b class="cmd">::mime::setheader</b> <i class="arg">token</i> <i class="arg">key value</i> <span class="opt">?<b class="option">-mode</b> <b class="const">write</b> | <b class="const">append</b> | <b class="const">delete</b>?</span></a></li>
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>mime</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftp/ftp.html">ftp</a>, <a href="../../../../index.html#http">http</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="smtp.html">smtp</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#email">email</a>, <a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#mail">mail</a>, <a href="../../../../index.html#mime">mime</a>, <a href="../../../../index.html#net">net</a>, <a href="../../../../index.html#rfc_2045">rfc 2045</a>, <a href="../../../../index.html#rfc_2046">rfc 2046</a>, <a href="../../../../index.html#rfc_2049">rfc 2049</a>, <a href="../../../../index.html#rfc_821">rfc 821</a>, <a href="../../../../index.html#rfc_822">rfc 822</a>, <a href="../../../../index.html#smtp">smtp</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 1999-2000 Marshall T. Rose</p>
</div>
</div></body></html>







<
<
<
<
<
<


|


|








353
354
355
356
357
358
359






360
361
362
363
364
365
366
367
368
369
370
371
372
373
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>mime</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftp/ftp.html">ftp</a>, <a href="../../../../index.html#key446">http</a>, <a href="../pop3/pop3.html">pop3</a>, <a href="smtp.html">smtp</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key335">email</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key330">mail</a>, <a href="../../../../index.html#key230">mime</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key812">rfc 2045</a>, <a href="../../../../index.html#key813">rfc 2046</a>, <a href="../../../../index.html#key811">rfc 2049</a>, <a href="../../../../index.html#key332">rfc 821</a>, <a href="../../../../index.html#key333">rfc 822</a>, <a href="../../../../index.html#key337">smtp</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 1999-2000 Marshall T. Rose</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/mime/smtp.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>smtp - smtp client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>smtp - smtp client</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'smtp.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 1999-2000 Marshall T. Rose and others
   -->
<!-- smtp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">smtp(n) 1.5 tcllib &quot;smtp client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>smtp - Client-side tcl implementation of the smtp protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'smtp.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 1999-2000 Marshall T. Rose and others
   -->
<! -- smtp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">smtp(n) 1.4.5 tcllib &quot;smtp client&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>smtp - Client-side tcl implementation of the smtp protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl</b></li>
<li>package require <b class="pkgname">mime <span class="opt">?1.5.4?</span></b></li>
<li>package require <b class="pkgname">smtp <span class="opt">?1.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::smtp::sendmessage</b> <i class="arg">token</i> <i class="arg">option</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">smtp</b> library package provides the client side of the
Simple Mail Transfer Protocol (SMTP) (1) (2).</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::smtp::sendmessage</b> <i class="arg">token</i> <i class="arg">option</i>...</a></dt>
<dd><p>This command sends the MIME part (see package <b class="package"><a href="mime.html">mime</a></b>)
represented by <i class="arg">token</i> to an SMTP server. <i class="arg">options</i> is a list
of options and their associated values.  The recognized options are:</p>
<dl class="doctools_definitions">
<dt><b class="option">-servers</b></dt>
<dd><p>A list of SMTP servers. The default is <b class="const">localhost</b>.</p>
<p>If multiple servers are specified they are tried in sequence.
Note that the <b class="option">-ports</b> are iterated over in tandem with the
servers. If there are not enough ports for the number of servers the
default port (see below) is used. If there are more ports than servers
the superfluous ports are ignored.</p></dd>
<dt><b class="option">-ports</b></dt>
<dd><p>A list of SMTP ports. The default is <b class="const">25</b>.</p>
<p>See option <b class="option">-servers</b> above regardig the behaviour for
then multiple servers and ports are specified.</p></dd>
<dt><b class="option">-client</b></dt>
<dd><p>The name to use as our hostname when connecting to the server. By
default this is either localhost if one of the servers is localhost,
or is set to the string returned by <b class="cmd">info hostname</b>.</p></dd>
<dt><b class="option">-queue</b></dt>
<dd><p>Indicates that the SMTP server should be asked to queue the message
for later processing. A boolean value.</p></dd>







|
















|
<
<
<
<
<

|
<
<







129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153





154
155


156
157
158
159
160
161
162
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl</b></li>
<li>package require <b class="pkgname">mime <span class="opt">?1.5.4?</span></b></li>
<li>package require <b class="pkgname">smtp <span class="opt">?1.4.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::smtp::sendmessage</b> <i class="arg">token</i> <i class="arg">option</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">smtp</b> library package provides the client side of the
Simple Mail Transfer Protocol (SMTP) (1) (2).</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::smtp::sendmessage</b> <i class="arg">token</i> <i class="arg">option</i>...</a></dt>
<dd><p>This command sends the MIME part (see package <b class="package"><a href="mime.html">mime</a></b>)
represented by <i class="arg">token</i> to an SMTP server. <i class="arg">options</i> is a list
of options and their associated values.  The recognized options are:</p>
<dl class="doctools_definitions">
<dt><b class="option">-servers</b></dt>
<dd><p>A list of SMTP servers. The default is <b class="const">localhost</b>.</p></dd>





<dt><b class="option">-ports</b></dt>
<dd><p>A list of SMTP ports. The default is <b class="const">25</b>.</p></dd>


<dt><b class="option">-client</b></dt>
<dd><p>The name to use as our hostname when connecting to the server. By
default this is either localhost if one of the servers is localhost,
or is set to the string returned by <b class="cmd">info hostname</b>.</p></dd>
<dt><b class="option">-queue</b></dt>
<dd><p>Indicates that the SMTP server should be asked to queue the message
for later processing. A boolean value.</p></dd>
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
commas.</p></dd>
<dt><b class="option">-header</b></dt>
<dd><p>A list containing two elements, an smtp header and its associated
value (the -header option may occur zero or more times).</p></dd>
<dt><b class="option">-usetls</b></dt>
<dd><p>This package supports the RFC 3207 TLS extension (3) by default provided the
tls package is available. You can turn this off with this boolean option.</p></dd>
<dt><b class="option">-tlsimport</b></dt>
<dd><p>This boolean flag is <b class="const">false</b> by default.
When this flag is set the package will import TLS on a sucessfully
opened channel. This is needed for connections using native TLS
negotiation instead of <b class="const">STARTTLS</b>. The <b class="package"><a href="../../../../index.html#tls">tls</a></b> package
is automatically required when needed.</p></dd>
<dt><b class="option">-tlspolicy</b></dt>
<dd><p>This option lets you specify a command to be called if an error occurs
during TLS setup. The command is called with the SMTP code and diagnostic
message appended. The command should return 'secure' or 'insecure' where
insecure will cause the package to continue on the unencrypted channel.
Returning 'secure' will cause the socket to be closed and the next server
in the <b class="option">-servers</b> list to be tried.</p></dd>







<
<
<
<
<
<







173
174
175
176
177
178
179






180
181
182
183
184
185
186
commas.</p></dd>
<dt><b class="option">-header</b></dt>
<dd><p>A list containing two elements, an smtp header and its associated
value (the -header option may occur zero or more times).</p></dd>
<dt><b class="option">-usetls</b></dt>
<dd><p>This package supports the RFC 3207 TLS extension (3) by default provided the
tls package is available. You can turn this off with this boolean option.</p></dd>






<dt><b class="option">-tlspolicy</b></dt>
<dd><p>This option lets you specify a command to be called if an error occurs
during TLS setup. The command is called with the SMTP code and diagnostic
message appended. The command should return 'secure' or 'insecure' where
insecure will cause the package to continue on the unencrypted channel.
Returning 'secure' will cause the socket to be closed and the next server
in the <b class="option">-servers</b> list to be tried.</p></dd>
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
and <b class="package"><a href="../ripemd/ripemd160.html">ripemd160</a></b>.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLE</a></h2>
<pre class="doctools_example">
proc send_simple_message {recipient email_server subject body} {
    package require smtp
    package require mime
    set token [mime::initialize -canonical text/plain \
	-string $body]
    mime::setheader $token Subject $subject
    smtp::sendmessage $token \
	-recipients $recipient -servers $email_server
    mime::finalize $token
}
send_simple_message someone@somewhere.com localhost \
    &quot;This is the subject.&quot; &quot;This is the message.&quot;
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>







|


|



|




|
|

|







|
|







227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
and <b class="package"><a href="../ripemd/ripemd160.html">ripemd160</a></b>.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">EXAMPLE</a></h2>
<pre class="doctools_example">
proc send_simple_message {recipient email_server subject body} {
    package require smtp
    package require mime
    set token [mime::initialize -canonical text/plain \\
	-string $body]
    mime::setheader $token Subject $subject
    smtp::sendmessage $token \\
	-recipients $recipient -servers $email_server
    mime::finalize $token
}
send_simple_message someone@somewhere.com localhost \\
    &quot;This is the subject.&quot; &quot;This is the message.&quot;
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>smtp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftp/ftp.html">ftp</a>, <a href="../../../../index.html#http">http</a>, <a href="mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#email">email</a>, <a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#mail">mail</a>, <a href="../../../../index.html#mime">mime</a>, <a href="../../../../index.html#net">net</a>, <a href="../../../../index.html#rfc_2554">rfc 2554</a>, <a href="../../../../index.html#rfc_2821">rfc 2821</a>, <a href="../../../../index.html#rfc_3207">rfc 3207</a>, <a href="../../../../index.html#rfc_821">rfc 821</a>, <a href="../../../../index.html#rfc_822">rfc 822</a>, <a href="../../../../index.html#smtp">smtp</a>, <a href="../../../../index.html#tls">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 1999-2000 Marshall T. Rose and others</p>
</div>
</div></body></html>







<
<
<
<
<
<


|


|








281
282
283
284
285
286
287






288
289
290
291
292
293
294
295
296
297
298
299
300
301
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>smtp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../ftp/ftp.html">ftp</a>, <a href="../../../../index.html#key446">http</a>, <a href="mime.html">mime</a>, <a href="../pop3/pop3.html">pop3</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key335">email</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key330">mail</a>, <a href="../../../../index.html#key230">mime</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key336">rfc 2554</a>, <a href="../../../../index.html#key329">rfc 2821</a>, <a href="../../../../index.html#key334">rfc 3207</a>, <a href="../../../../index.html#key332">rfc 821</a>, <a href="../../../../index.html#key333">rfc 822</a>, <a href="../../../../index.html#key337">smtp</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 1999-2000 Marshall T. Rose and others</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/multiplexer/multiplexer.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>multiplexer - One-to-many communication with sockets.</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>multiplexer - One-to-many communication with sockets.</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'multiplexer.man' by tcllib/doctools with format 'html'
   -->
<!-- multiplexer.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">multiplexer(n) 0.2 tcllib &quot;One-to-many communication with sockets.&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>multiplexer - One-to-many communication with sockets.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'multiplexer.man' by tcllib/doctools with format 'html'
   -->
<! -- multiplexer.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">multiplexer(n) 0.2 tcllib &quot;One-to-many communication with sockets.&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>multiplexer - One-to-many communication with sockets.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>multiplexer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#chat">chat</a>, <a href="../../../../index.html#multiplexer">multiplexer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





221
222
223
224
225
226
227






228
229
230
231
232
233
234
235
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>multiplexer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key693">chat</a>, <a href="../../../../index.html#key694">multiplexer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/namespacex/namespacex.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>namespacex - Namespace utility commands</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>namespacex - Namespace utility commands</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'namespacex.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 200? Neil Madden (http://wiki.tcl.tk/12790)   -- Copyright &amp;copy; 200? Various (http://wiki.tcl.tk/1489)   -- Copyright &amp;copy; 2010 Documentation, Andreas Kupries
   -->
<!-- namespacex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">namespacex(n) 0.2 tcllib &quot;Namespace utility commands&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>namespacex - Namespace utility commands</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">namespacex <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::namespacex hook add</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">cmdprefix</i></a></li>
<li><a href="#2"><b class="cmd">::namespacex hook proc</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">arguments</i> <i class="arg">body</i></a></li>
<li><a href="#3"><b class="cmd">::namespacex hook on</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">guardcmdprefix</i> <i class="arg">actioncmdprefix</i></a></li>
<li><a href="#4"><b class="cmd">::namespacex hook next</b> <i class="arg">arg</i>...</a></li>
<li><a href="#5"><b class="cmd">::namespacex import fromns</b> <i class="arg">cmdname <span class="opt">?<i class="arg">newname</i> ...?</span></i></a></li>
<li><a href="#6"><b class="cmd">::namespacex info allchildren</b> <i class="arg">namespace</i></a></li>
<li><a href="#7"><b class="cmd">::namespacex info allvars</b> <i class="arg">namespace</i></a></li>
<li><a href="#8"><b class="cmd">::namespacex normalize</b> <i class="arg">namespace</i></a></li>
<li><a href="#9"><b class="cmd">::namespacex info vars</b> <i class="arg">namespace</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::namespacex state get</b> <i class="arg">namespace</i></a></li>
<li><a href="#11"><b class="cmd">::namespacex state set</b> <i class="arg">namespace</i> <i class="arg">dict</i></a></li>
<li><a href="#12"><b class="cmd">::namespacex state drop</b> <i class="arg">namespace</i></a></li>
<li><a href="#13"><b class="cmd">::namespacex strip</b> <i class="arg">prefix</i> <i class="arg">namespaces</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a number of utility commands for working with
namespaces.
The commands fall into four categories:</p>
<ol class="doctools_enumerated">
<li><p>Hook commands provide and manipulate a chain of commands which
replaces the single regular <b class="cmd"><a href="../../../../index.html#namespace_unknown">namespace unknown</a></b> handler.</p></li>
<li><p>An import command provides the ability to import any command
from another namespace.</p></li>
<li><p>Information commands allow querying of variables and child
namespaces.</p></li>
<li><p>State commands provide a means to serialize variable values in
a namespace.</p></li>
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::namespacex hook add</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">cmdprefix</i></a></dt>
<dd><p>Adds the <i class="arg">cmdprefix</i> to the chain of unknown command handlers that
are invoked when the <i class="arg">namespace</i> would otherwise invoke its
unknown handler.
If <i class="arg">namespace</i> is not specified, then <i class="arg">cmdprefix</i> is added to
the chain of handlers for the namespace of the caller.</p>
<p>The chain of <i class="arg">cmdprefix</i> are executed in reverse order of
addition, <em>i.e.</em> the most recently added <i class="arg">cmdprefix</i> is
executed first.
When executed, <i class="arg">cmdprefix</i> has additional arguments appended to it
as would any namespace unknown handler.</p></dd>
<dt><a name="2"><b class="cmd">::namespacex hook proc</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">arguments</i> <i class="arg">body</i></a></dt>
<dd><p>Adds an anonymous procedure to the chain of namespace unknown handlers
for the <i class="arg">namespace</i>.</p>
<p>If <i class="arg">namespace</i> is not specified, then the handler is added
to the chain of handlers for the namespace of the caller.</p>
<p>The <i class="arg">arguments</i> and <i class="arg">body</i> are specified as for the
core <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> command.</p></dd>
<dt><a name="3"><b class="cmd">::namespacex hook on</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">guardcmdprefix</i> <i class="arg">actioncmdprefix</i></a></dt>
<dd><p>Adds a guarded action to the chain of namespace unknown handlers for
the <i class="arg">namespace</i>.</p>
<p>If <i class="arg">namespace</i> is not specified, then the handler is added
to the chain of handlers for the namespace of the caller.</p>
<p>The <i class="arg">guardcmdprefix</i> is executed first. If it returns a
value that can be interpreted as false, then the next unknown hander
in the chain is executed. Otherwise, <i class="arg">actioncmdprefix</i> is executed
and the return value of the handler is the value returned by
<i class="arg">actioncmdprefix</i>.</p>
<p>When executed, both <i class="arg">guardcmdprefix</i> and
<i class="arg">actioncmdprefix</i> have the same additional arguments appended as
for any namespace unknown handler.</p></dd>
<dt><a name="4"><b class="cmd">::namespacex hook next</b> <i class="arg">arg</i>...</a></dt>
<dd><p>This command is available to namespace hooks to execute the next hook
in the chain of handlers for the namespace.</p></dd>
<dt><a name="5"><b class="cmd">::namespacex import fromns</b> <i class="arg">cmdname <span class="opt">?<i class="arg">newname</i> ...?</span></i></a></dt>
<dd><p>Imports the command <i class="arg">cmdname</i> from the <i class="arg">fromns</i> namespace into
the namespace of the caller.
The <i class="arg">cmdname</i> command is imported even if the <i class="arg">fromns</i> did not
originally export the command.</p>
<p>If <i class="arg">newname</i> is specified, then the imported command will
be known by that name. Otherwise, the command retains is original name
as given by <i class="arg">cmdname</i>.</p>
<p>Additional pairs of <i class="arg">cmdname</i> / <i class="arg">newname</i> arguments may
also be specified.</p></dd>
<dt><a name="6"><b class="cmd">::namespacex info allchildren</b> <i class="arg">namespace</i></a></dt>
<dd><p>Returns a list containing the names of all child namespaces in the
specified <i class="arg">namespace</i> and its children. The names are all fully
qualified.</p></dd>
<dt><a name="7"><b class="cmd">::namespacex info allvars</b> <i class="arg">namespace</i></a></dt>
<dd><p>Returns a list containing the names of all variables in the specified
<i class="arg">namespace</i> and its children. The names are all given relative to
<i class="arg">namespace</i>, and <em>not</em> fully qualified.</p></dd>
<dt><a name="8"><b class="cmd">::namespacex normalize</b> <i class="arg">namespace</i></a></dt>
<dd><p>Returns the absolute name of <i class="arg">namespace</i>, which is resolved
relative to the namespace of the caller, with all unneeded colon
characters removed.</p></dd>
<dt><a name="9"><b class="cmd">::namespacex info vars</b> <i class="arg">namespace</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list containing the names of all variables in
the specified <i class="arg">namespace</i>.
If the <i class="arg">pattern</i> argument is specified, then only variables
matching <i class="arg">pattern</i> are returned. Matching is determined using the
same rules as for <b class="cmd">string match</b>.</p></dd>
<dt><a name="10"><b class="cmd">::namespacex state get</b> <i class="arg">namespace</i></a></dt>
<dd><p>Returns a dictionary holding the names and values of all variables in
the specified <i class="arg">namespace</i> and its child namespaces.</p>
<p>Note that the names are all relative to <i class="arg">namespace</i>, and
<em>not</em> fully qualified.</p></dd>
<dt><a name="11"><b class="cmd">::namespacex state set</b> <i class="arg">namespace</i> <i class="arg">dict</i></a></dt>
<dd><p>Takes a dictionary holding the names and values for a set of variables
and replaces the current state of the specified <i class="arg">namespace</i> and
its child namespaces with this state.
The result of the command is the empty string.</p></dd>
<dt><a name="12"><b class="cmd">::namespacex state drop</b> <i class="arg">namespace</i></a></dt>
<dd><p>Unsets all variables in the specified <i class="arg">namespace</i> and its child
namespaces.
The result of the command is the empty string.</p></dd>
<dt><a name="13"><b class="cmd">::namespacex strip</b> <i class="arg">prefix</i> <i class="arg">namespaces</i></a></dt>
<dd><p>Each item in <i class="arg">namespaces</i> must be the absolute normalized name of
a child namespace of namespace <i class="arg">prefix</i>.
Returns the corresponding list of relative names of child namespaces.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>namespacex</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#extended_namespace">extended namespace</a>, <a href="../../../../index.html#info">info</a>, <a href="../../../../index.html#namespace_unknown">namespace unknown</a>, <a href="../../../../index.html#namespace_utilities">namespace utilities</a>, <a href="../../../../index.html#state_de_serialization">state (de)serialization</a>, <a href="../../../../index.html#unknown_hooking">unknown hooking</a>, <a href="../../../../index.html#utilities">utilities</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200? Neil Madden (http://wiki.tcl.tk/12790)<br>
Copyright &copy; 200? Various (http://wiki.tcl.tk/1489)<br>
Copyright &copy; 2010 Documentation, Andreas Kupries</p>
</div>
</div></body></html>







|

|

|



|
|
|
|
|
|


|








<
|








|






<
|
|
<
|
|
|
|
<





<
<
<
<
<
<
<
<
|
<
<
<

|


<
<
<
<
<
<
<
<
<
|

|
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
|
|
|
|
<
<
<
<
|
|
|
<
<
<
|
|
|
|
|
|
|
|
|

|
|
|

<
<
<
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<

|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

136
137

138
139
140
141

142
143
144
145
146








147



148
149
150
151









152
153
154





155











156
157











158
159
160
161
162
163
164
165
166




167
168
169



170
171
172
173
174
175
176
177
178
179
180
181
182
183




184
185














186
187
188
189
190
191
192
193
194
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'namespacex.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 200? Neil Madden (http://wiki.tcl.tk/12790)   -- Copyright &copy; 200? Various (http://wiki.tcl.tk/1489)   -- Copyright &copy; 2010 Documentation, Andreas Kupries
   -->
<! -- namespacex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">namespacex(n) 0.1 tcllib &quot;Namespace utility commands&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>namespacex - Namespace utility commands</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>

<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">namespacex <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::namespacex hook add</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">cmdprefix</i></a></li>
<li><a href="#2"><b class="cmd">::namespacex hook proc</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">arguments</i> <i class="arg">body</i></a></li>
<li><a href="#3"><b class="cmd">::namespacex hook on</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">guardcmdprefix</i> <i class="arg">actioncmdprefix</i></a></li>
<li><a href="#4"><b class="cmd">::namespacex hook next</b> <i class="arg">arg</i>...</a></li>

<li><a href="#5"><b class="cmd">::namespacex info allchildren</b> <i class="arg">namespace</i></a></li>
<li><a href="#6"><b class="cmd">::namespacex info allvars</b> <i class="arg">namespace</i></a></li>

<li><a href="#7"><b class="cmd">::namespacex info vars</b> <i class="arg">namespace</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::namespacex state get</b> <i class="arg">namespace</i></a></li>
<li><a href="#9"><b class="cmd">::namespacex state set</b> <i class="arg">namespace</i> <i class="arg">dict</i></a></li>
<li><a href="#10"><b class="cmd">::namespacex state drop</b> <i class="arg">namespace</i></a></li>

</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a number of utility commands for working with








namespaces.</p>



</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::namespacex hook add</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">cmdprefix</i></a></dt>









<dd></dd>
<dt><a name="2"><b class="cmd">::namespacex hook proc</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">arguments</i> <i class="arg">body</i></a></dt>
<dd></dd>





<dt><a name="3"><b class="cmd">::namespacex hook on</b> <span class="opt">?<i class="arg">namespace</i>?</span> <i class="arg">guardcmdprefix</i> <i class="arg">actioncmdprefix</i></a></dt>











<dd></dd>
<dt><a name="4"><b class="cmd">::namespacex hook next</b> <i class="arg">arg</i>...</a></dt>











<dd></dd>
<dt><a name="5"><b class="cmd">::namespacex info allchildren</b> <i class="arg">namespace</i></a></dt>
<dd><p>This command returns a list containing the names of all child
namespaces in the specified <i class="arg">namespace</i> and its children. The
names are all fully qualified.</p></dd>
<dt><a name="6"><b class="cmd">::namespacex info allvars</b> <i class="arg">namespace</i></a></dt>
<dd><p>This command returns a list containing the names of all variables in
the specified <i class="arg">namespace</i> and its children. The names are all
relative to <i class="arg">namespace</i>, and <em>not</em> fully qualified.</p></dd>




<dt><a name="7"><b class="cmd">::namespacex info vars</b> <i class="arg">namespace</i> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This command returns a list containing the names of all variables in
the specified <i class="arg">namespace</i>.</p></dd>



<dt><a name="8"><b class="cmd">::namespacex state get</b> <i class="arg">namespace</i></a></dt>
<dd><p>This command returns a dictionary holding the names and values of all
variables in the specified <i class="arg">namespace</i> and its child namespaces.</p>
<p>Note that the names are all relative to <i class="arg">namespace</i>,
and <em>not</em> fully qualified.</p></dd>
<dt><a name="9"><b class="cmd">::namespacex state set</b> <i class="arg">namespace</i> <i class="arg">dict</i></a></dt>
<dd><p>This command takes a dictionary holding the names and values for a set
of variables and replaces the current state of the specified
<i class="arg">namespace</i> and its child namespaces with this state.
The result of the command is the empty string.</p></dd>
<dt><a name="10"><b class="cmd">::namespacex state drop</b> <i class="arg">namespace</i></a></dt>
<dd><p>This command unsets all variables in the specified <i class="arg">namespace</i> and
its child namespaces.
The result of the command is the empty string.</p></dd>




</dl>
</div>














<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key87">extended namespace</a>, <a href="../../../../index.html#key83">info</a>, <a href="../../../../index.html#key86">namespace unknown</a>, <a href="../../../../index.html#key85">namespace utilities</a>, <a href="../../../../index.html#key84">state (de)serialization</a>, <a href="../../../../index.html#key88">unknown hooking</a>, <a href="../../../../index.html#key82">utilities</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 200? Neil Madden (http://wiki.tcl.tk/12790)<br>
Copyright &copy; 200? Various (http://wiki.tcl.tk/1489)<br>
Copyright &copy; 2010 Documentation, Andreas Kupries</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/ncgi/ncgi.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>ncgi - CGI Support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>ncgi - CGI Support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ncgi.man' by tcllib/doctools with format 'html'
   -->
<!-- ncgi.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ncgi(n) 1.4.4 tcllib &quot;CGI Support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ncgi - Procedures to manipulate CGI values.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">ncgi <span class="opt">?1.4.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ncgi::cookie</b> <i class="arg">cookie</i></a></li>
<li><a href="#2"><b class="cmd">::ncgi::decode</b> <i class="arg">str</i></a></li>
<li><a href="#3"><b class="cmd">::ncgi::empty</b> <i class="arg">name</i></a></li>
<li><a href="#4"><b class="cmd">::ncgi::exists</b> <i class="arg">name</i></a></li>
<li><a href="#5"><b class="cmd">::ncgi::encode</b> <i class="arg">string</i></a></li>







|

|



|
|
|
|
|
|


|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ncgi.man' by tcllib/doctools with format 'html'
   -->
<! -- ncgi.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ncgi(n) 1.4.3 tcllib &quot;CGI Support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ncgi - Procedures to manipulate CGI values.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">ncgi <span class="opt">?1.4.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::ncgi::cookie</b> <i class="arg">cookie</i></a></li>
<li><a href="#2"><b class="cmd">::ncgi::decode</b> <i class="arg">str</i></a></li>
<li><a href="#3"><b class="cmd">::ncgi::empty</b> <i class="arg">name</i></a></li>
<li><a href="#4"><b class="cmd">::ncgi::exists</b> <i class="arg">name</i></a></li>
<li><a href="#5"><b class="cmd">::ncgi::encode</b> <i class="arg">string</i></a></li>
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ncgi</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../html/html.html">html</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cgi">CGI</a>, <a href="../../../../index.html#cookie">cookie</a>, <a href="../../../../index.html#form">form</a>, <a href="../../../../index.html#html">html</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





361
362
363
364
365
366
367






368
369
370
371
372
373
374
375
376
377
378
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ncgi</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../html/html.html">html</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key676">CGI</a>, <a href="../../../../index.html#key675">cookie</a>, <a href="../../../../index.html#key616">form</a>, <a href="../../../../index.html#key617">html</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>CGI programming</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/nettool/nettool.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>nettool - nettool</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>nettool - nettool</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nettool.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2015-2018 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- nettool.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nettool(n) 0.5.2 tcllib &quot;nettool&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nettool - Tools for networked applications</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">nettool <span class="opt">?0.5.2?</span></b></li>
<li>package require <b class="pkgname">twapi 3.1</b></li>
<li>package require <b class="pkgname">ip 0.1</b></li>
<li>package require <b class="pkgname">platform 0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::cat</b> <i class="arg">filename</i></a></li>
<li><a href="#2"><b class="cmd">::nettool::allocate_port</b> <i class="arg">startingport</i></a></li>







|

|

|



|
|
|
|
|
|


|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nettool.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;
   -->
<! -- nettool.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nettool(n) 0.5.1 tcllib &quot;nettool&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nettool - Tools for networked applications</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">nettool <span class="opt">?0.5.1?</span></b></li>
<li>package require <b class="pkgname">twapi 3.1</b></li>
<li>package require <b class="pkgname">ip 0.1</b></li>
<li>package require <b class="pkgname">platform 0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::cat</b> <i class="arg">filename</i></a></li>
<li><a href="#2"><b class="cmd">::nettool::allocate_port</b> <i class="arg">startingport</i></a></li>
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>odie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#nettool">nettool</a>, <a href="../../../../index.html#odie">odie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>System</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015-2018 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


242
243
244
245
246
247
248






249
250
251
252
253
254
255
256
257
258
259
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>odie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key524">nettool</a>, <a href="../../../../index.html#key255">odie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>System</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/nmea/nmea.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>nmea - NMEA protocol implementation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>nmea - NMEA protocol implementation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nmea.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006-2009, Aaron Faupell &amp;lt;afaupell@users.sourceforge.net&amp;gt;
   -->
<!-- nmea.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nmea(n) 1.0.0 tcllib &quot;NMEA protocol implementation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nmea - Process NMEA data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nmea.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006-2009, Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;
   -->
<! -- nmea.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nmea(n) 1.0.0 tcllib &quot;NMEA protocol implementation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nmea - Process NMEA data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a standard interface for writing software which recieves
NMEA standard input data. It allows for reading data from COM ports, files,
or programmatic input. It also supports the checksumming and logging of incoming data.
After parsing, input is dispatched to user defined handler commands for processing.
To define a handler, see the <b class="cmd"><a href="../../../../index.html#event">event</a></b> command. There are no GPS specific functions
in this package. NMEA data consists of a sentence type, followed by a list of data.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::nmea::input</b> <i class="arg">sentence</i></a></dt>
<dd><p>Processes and dispatches the supplied sentence. If <i class="arg">sentence</i> contains no commas it is treated as a Tcl list, otherwise it must be standard comma delimited NMEA data, with an optional checksum and leading <b class="const">$</b>.</p>
<pre class="doctools_example">







|







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a standard interface for writing software which recieves
NMEA standard input data. It allows for reading data from COM ports, files,
or programmatic input. It also supports the checksumming and logging of incoming data.
After parsing, input is dispatched to user defined handler commands for processing.
To define a handler, see the <b class="cmd"><a href="../../../../index.html#key542">event</a></b> command. There are no GPS specific functions
in this package. NMEA data consists of a sentence type, followed by a list of data.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::nmea::input</b> <i class="arg">sentence</i></a></dt>
<dd><p>Processes and dispatches the supplied sentence. If <i class="arg">sentence</i> contains no commas it is treated as a Tcl list, otherwise it must be standard comma delimited NMEA data, with an optional checksum and leading <b class="const">$</b>.</p>
<pre class="doctools_example">
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nmea</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#gps">gps</a>, <a href="../../../../index.html#nmea">nmea</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009, Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








220
221
222
223
224
225
226






227
228
229
230
231
232
233
234
235
236
237
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nmea</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key408">gps</a>, <a href="../../../../index.html#key407">nmea</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009, Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/nns/nns_auto.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>nameserv::auto - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>nameserv::auto - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nns_auto.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- nameserv::auto.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::auto(n) 0.3 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::auto - Name service facility, Client Extension</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nns_auto.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- nameserv::auto.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::auto(n) 0.3 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::auto - Name service facility, Client Extension</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="nns_client.html">nameserv(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#automatic">automatic</a>, <a href="../../../../index.html#client">client</a>, <a href="../../../../index.html#name_service">name service</a>, <a href="../../../../index.html#reconnect">reconnect</a>, <a href="../../../../index.html#restore">restore</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








207
208
209
210
211
212
213






214
215
216
217
218
219
220
221
222
223
224
225
226
227
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="nns_client.html">nameserv(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key515">automatic</a>, <a href="../../../../index.html#key30">client</a>, <a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key514">reconnect</a>, <a href="../../../../index.html#key513">restore</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/nns/nns_client.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>nameserv - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>nameserv - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nns_client.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- nameserv.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv(n) 0.4.2 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv - Name service facility, Client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nns_client.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- nameserv.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv(n) 0.4.2 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv - Name service facility, Client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
that the name service will run this command implicitly when it loses
the connection to this client.</p></dd>
<dt><a name="3"><b class="cmd">::nameserv::search</b> <span class="opt">?<b class="option">-async</b>|<b class="option">-continuous</b>?</span> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This command searches the name service for all registered names
matching the specified glob-<i class="arg">pattern</i>. If not specified the
pattern defaults to <b class="const">*</b>, matching everything. The result of the
command is a dictionary mapping the matching names to the data
associated with them at <i class="term"><a href="../../../../index.html#bind">bind</a></i>-time.</p>
<p>If either option <b class="option">-async</b> or <b class="option">-continuous</b> were
specified the result of this command changes and becomes the Tcl
command of an object holding the actual result.
These two options are supported if and only if the service the client
is connected to supports the protocol feature
<i class="term">Search/Continuous</i>.</p>
<p>For <b class="option">-async</b> the result object is asynchronously filled with







|







189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
that the name service will run this command implicitly when it loses
the connection to this client.</p></dd>
<dt><a name="3"><b class="cmd">::nameserv::search</b> <span class="opt">?<b class="option">-async</b>|<b class="option">-continuous</b>?</span> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This command searches the name service for all registered names
matching the specified glob-<i class="arg">pattern</i>. If not specified the
pattern defaults to <b class="const">*</b>, matching everything. The result of the
command is a dictionary mapping the matching names to the data
associated with them at <i class="term"><a href="../../../../index.html#key714">bind</a></i>-time.</p>
<p>If either option <b class="option">-async</b> or <b class="option">-continuous</b> were
specified the result of this command changes and becomes the Tcl
command of an object holding the actual result.
These two options are supported if and only if the service the client
is connected to supports the protocol feature
<i class="term">Search/Continuous</i>.</p>
<p>For <b class="option">-async</b> the result object is asynchronously filled with
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
be found in section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p></dd>
<dt><a name="8"><b class="cmd">::nameserv::configure</b></a></dt>
<dd><p>In this form the command returns a dictionary of all supported
options, and their current values. The list of supported options and
their meaning can be found in section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p></dd>
<dt><a name="9"><b class="cmd">::nameserv::configure</b> <b class="option">-option</b></a></dt>
<dd><p>In this form the command is an alias for
&quot;<b class="cmd">::nameserv::cget</b> <b class="option">-option</b>&quot;.
The list of supported options and their meaning can be found in
section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p></dd>
<dt><a name="10"><b class="cmd">::nameserv::configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>In this form the command is used to configure one or more of the
supported options. At least one option has to be specified, and each
option is followed by its new value.
The list of supported options and their meaning can be found in
section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p>
<p>This form can be used only as long as the client has not contacted the
name service yet. After contact has been made reconfiguration is not
possible anymore. This means that this form of the command is for the
initalization of the client before it use.
The command forcing a contact with the name service are</p>
<dl class="doctools_commands">
<dt><b class="cmd"><a href="../../../../index.html#bind">bind</a></b></dt>
<dd></dd>
<dt><b class="cmd">release</b></dt>
<dd></dd>
<dt><b class="cmd">search</b></dt>
<dd></dd>
<dt><b class="cmd">server_protocol</b></dt>
<dd></dd>
<dt><b class="cmd">server_features</b></dt>
<dd></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CONNECTION HANDLING</a></h2>
<p>The client automatically connects to the service when one of the
commands below is run for the first time, or whenever one of the
commands is run after the connection was lost, when it was lost.</p>
<dl class="doctools_commands">
<dt><b class="cmd"><a href="../../../../index.html#bind">bind</a></b></dt>
<dd></dd>
<dt><b class="cmd">release</b></dt>
<dd></dd>
<dt><b class="cmd">search</b></dt>
<dd></dd>
<dt><b class="cmd">server_protocol</b></dt>
<dd></dd>







|














|

















|







228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
be found in section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p></dd>
<dt><a name="8"><b class="cmd">::nameserv::configure</b></a></dt>
<dd><p>In this form the command returns a dictionary of all supported
options, and their current values. The list of supported options and
their meaning can be found in section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p></dd>
<dt><a name="9"><b class="cmd">::nameserv::configure</b> <b class="option">-option</b></a></dt>
<dd><p>In this form the command is an alias for
&quot;<b class="cmd">::nameserv::cget</b> <b class="option">-option</b>]&quot;.
The list of supported options and their meaning can be found in
section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p></dd>
<dt><a name="10"><b class="cmd">::nameserv::configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>In this form the command is used to configure one or more of the
supported options. At least one option has to be specified, and each
option is followed by its new value.
The list of supported options and their meaning can be found in
section <span class="sectref"><a href="#section5">OPTIONS</a></span>.</p>
<p>This form can be used only as long as the client has not contacted the
name service yet. After contact has been made reconfiguration is not
possible anymore. This means that this form of the command is for the
initalization of the client before it use.
The command forcing a contact with the name service are</p>
<dl class="doctools_commands">
<dt><b class="cmd"><a href="../../../../index.html#key714">bind</a></b></dt>
<dd></dd>
<dt><b class="cmd">release</b></dt>
<dd></dd>
<dt><b class="cmd">search</b></dt>
<dd></dd>
<dt><b class="cmd">server_protocol</b></dt>
<dd></dd>
<dt><b class="cmd">server_features</b></dt>
<dd></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CONNECTION HANDLING</a></h2>
<p>The client automatically connects to the service when one of the
commands below is run for the first time, or whenever one of the
commands is run after the connection was lost, when it was lost.</p>
<dl class="doctools_commands">
<dt><b class="cmd"><a href="../../../../index.html#key714">bind</a></b></dt>
<dd></dd>
<dt><b class="cmd">release</b></dt>
<dd></dd>
<dt><b class="cmd">search</b></dt>
<dd></dd>
<dt><b class="cmd">server_protocol</b></dt>
<dd></dd>
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<dd><p>Destroys the object and cancels any continuous monitoring of the
service the object may have had active.</p></dd>
<dt><a name="12"><b class="cmd">$result</b> <b class="method">filled</b></a></dt>
<dd><p>The result is a boolean value indicating whether the search result has
already arrived (<b class="const">True</b>), or not (<b class="const">False</b>).</p></dd>
<dt><a name="13"><b class="cmd">$result</b> <b class="method">get</b> <i class="arg">name</i></a></dt>
<dd><p>Returns the data associated with the given <i class="arg">name</i> at
<i class="term"><a href="../../../../index.html#bind">bind</a></i>-time.</p></dd>
<dt><a name="14"><b class="cmd">$result</b> <b class="method">names</b></a></dt>
<dd><p>Returns a list containing all names known to the object at the time of
the invokation.</p></dd>
<dt><a name="15"><b class="cmd">$result</b> <b class="method">size</b></a></dt>
<dd><p>Returns an integer value specifying the size of the result at the time
of the invokation.</p></dd>
<dt><a name="16"><b class="cmd">$result</b> <b class="method">getall</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a dictionary containing the search result at the time of the
invokation, mapping the matching names to the data associated with
them at <i class="term"><a href="../../../../index.html#bind">bind</a></i>-time.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">HISTORY</a></h2>
<dl class="doctools_definitions">
<dt>0.3.1</dt>
<dd><p>Fixed SF Bug 1954771.</p></dd>







|









|







347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<dd><p>Destroys the object and cancels any continuous monitoring of the
service the object may have had active.</p></dd>
<dt><a name="12"><b class="cmd">$result</b> <b class="method">filled</b></a></dt>
<dd><p>The result is a boolean value indicating whether the search result has
already arrived (<b class="const">True</b>), or not (<b class="const">False</b>).</p></dd>
<dt><a name="13"><b class="cmd">$result</b> <b class="method">get</b> <i class="arg">name</i></a></dt>
<dd><p>Returns the data associated with the given <i class="arg">name</i> at
<i class="term"><a href="../../../../index.html#key714">bind</a></i>-time.</p></dd>
<dt><a name="14"><b class="cmd">$result</b> <b class="method">names</b></a></dt>
<dd><p>Returns a list containing all names known to the object at the time of
the invokation.</p></dd>
<dt><a name="15"><b class="cmd">$result</b> <b class="method">size</b></a></dt>
<dd><p>Returns an integer value specifying the size of the result at the time
of the invokation.</p></dd>
<dt><a name="16"><b class="cmd">$result</b> <b class="method">getall</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a dictionary containing the search result at the time of the
invokation, mapping the matching names to the data associated with
them at <i class="term"><a href="../../../../index.html#key714">bind</a></i>-time.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">HISTORY</a></h2>
<dl class="doctools_definitions">
<dt>0.3.1</dt>
<dd><p>Fixed SF Bug 1954771.</p></dd>
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="nns_common.html">nameserv::common(n)</a>, <a href="nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#client">client</a>, <a href="../../../../index.html#name_service">name service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








382
383
384
385
386
387
388






389
390
391
392
393
394
395
396
397
398
399
400
401
402
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="nns_common.html">nameserv::common(n)</a>, <a href="nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key30">client</a>, <a href="../../../../index.html#key29">name service</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/nns/nns_common.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>nameserv::common - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>nameserv::common - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nns_common.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- nameserv::common.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::common(n) 0.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::common - Name service facility, shared definitions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nns_common.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- nameserv::common.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::common(n) 0.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::common - Name service facility, shared definitions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>nameserv::client(n), <a href="nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#client">client</a>, <a href="../../../../index.html#name_service">name service</a>, <a href="../../../../index.html#server">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








158
159
160
161
162
163
164






165
166
167
168
169
170
171
172
173
174
175
176
177
178
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>nameserv::client(n), <a href="nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key30">client</a>, <a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key65">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/nns/nns_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>nns_intro - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>nns_intro - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nns_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- nns_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nns_intro(n) 1.0 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nns_intro - Name service facility, introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nns_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- nns_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nns_intro(n) 1.0 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nns_intro - Name service facility, introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../apps/nns.html">nns</a></i> (short for <em>nano nameservice</em>) is a facility built
for the package <b class="package"><a href="../comm/comm.html">comm</a></b>, adding a simple name service to it.
It is also built on top of <b class="package"><a href="../comm/comm.html">comm</a></b>, using it for the exchange
of messages between the client and server parts.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../../index.html#dns">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<p>Tcllib provides 2 applications and 4 packages which are working
together and provide access to the facility at different levels.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Applications</a></h2>







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../apps/nns.html">nns</a></i> (short for <em>nano nameservice</em>) is a facility built
for the package <b class="package"><a href="../comm/comm.html">comm</a></b>, adding a simple name service to it.
It is also built on top of <b class="package"><a href="../comm/comm.html">comm</a></b>, using it for the exchange
of messages between the client and server parts.</p>
<p>This name service facility has nothing to do with the Internet's
<i class="term">Domain Name System</i>, otherwise known as <i class="term"><a href="../../../../index.html#key599">DNS</a></i>. If the
reader is looking for a package dealing with that please see either of
the packages <b class="package"><a href="../dns/tcllib_dns.html">dns</a></b> and <b class="package">resolv</b>, both found in Tcllib
too.</p>
<p>Tcllib provides 2 applications and 4 packages which are working
together and provide access to the facility at different levels.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Applications</a></h2>
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="nns_client.html">nameserv(n)</a>, <a href="nns_auto.html">nameserv::auto(n)</a>, <a href="nns_common.html">nameserv::common(n)</a>, <a href="nns_protocol.html">nameserv::protocol(n)</a>, <a href="nns_server.html">nameserv::server(n)</a>, <a href="../../apps/nnsd.html">nnsd(n)</a>, nss(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#client">client</a>, <a href="../../../../index.html#name_service">name service</a>, <a href="../../../../index.html#server">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








196
197
198
199
200
201
202






203
204
205
206
207
208
209
210
211
212
213
214
215
216
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="nns_client.html">nameserv(n)</a>, <a href="nns_auto.html">nameserv::auto(n)</a>, <a href="nns_common.html">nameserv::common(n)</a>, <a href="nns_protocol.html">nameserv::protocol(n)</a>, <a href="nns_server.html">nameserv::server(n)</a>, <a href="../../apps/nnsd.html">nnsd(n)</a>, nss(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key30">client</a>, <a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key65">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/nns/nns_protocol.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>nameserv::protocol - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>nameserv::protocol - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nns_protocol.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- nameserv::protocol.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::protocol(n) 0.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::protocol - Name service facility, client/server protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nns_protocol.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- nameserv::protocol.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::protocol(n) 0.1 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::protocol - Name service facility, client/server protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../comm/comm_wire.html">comm_wire(n)</a>, <a href="nns_client.html">nameserv(n)</a>, <a href="nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#comm">comm</a>, <a href="../../../../index.html#name_service">name service</a>, <a href="../../../../index.html#protocol">protocol</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








250
251
252
253
254
255
256






257
258
259
260
261
262
263
264
265
266
267
268
269
270
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../comm/comm_wire.html">comm_wire(n)</a>, <a href="nns_client.html">nameserv(n)</a>, <a href="nns_server.html">nameserv::server(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key40">comm</a>, <a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key133">protocol</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/nns/nns_server.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>nameserv::server - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>nameserv::server - Name service facility</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nns_server.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- nameserv::server.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::server(n) 0.3.2 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::server - Name service facility, Server</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nns_server.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- nameserv::server.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nameserv::server(n) 0.3.2 tcllib &quot;Name service facility&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nameserv::server - Name service facility, Server</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
be found in section <span class="sectref"><a href="#section3">OPTIONS</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::nameserv::server::configure</b></a></dt>
<dd><p>In this form the command returns a dictionary of all supported
options, and their current values. The list of supported options and
their meaning can be found in section <span class="sectref"><a href="#section3">OPTIONS</a></span>.</p></dd>
<dt><a name="6"><b class="cmd">::nameserv::server::configure</b> <b class="option">-option</b></a></dt>
<dd><p>In this form the command is an alias for
&quot;<b class="cmd">::nameserv::server::cget</b> <b class="option">-option</b>&quot;.
The list of supported options and their meaning can be found in
section <span class="sectref"><a href="#section3">OPTIONS</a></span>.</p></dd>
<dt><a name="7"><b class="cmd">::nameserv::server::configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>In this form the command is used to configure one or more of the
supported options. At least one option has to be specified, and each
option is followed by its new value.
The list of supported options and their meaning can be found in







|







183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
be found in section <span class="sectref"><a href="#section3">OPTIONS</a></span>.</p></dd>
<dt><a name="5"><b class="cmd">::nameserv::server::configure</b></a></dt>
<dd><p>In this form the command returns a dictionary of all supported
options, and their current values. The list of supported options and
their meaning can be found in section <span class="sectref"><a href="#section3">OPTIONS</a></span>.</p></dd>
<dt><a name="6"><b class="cmd">::nameserv::server::configure</b> <b class="option">-option</b></a></dt>
<dd><p>In this form the command is an alias for
&quot;<b class="cmd">::nameserv::server::cget</b> <b class="option">-option</b>]&quot;.
The list of supported options and their meaning can be found in
section <span class="sectref"><a href="#section3">OPTIONS</a></span>.</p></dd>
<dt><a name="7"><b class="cmd">::nameserv::server::configure</b> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>In this form the command is used to configure one or more of the
supported options. At least one option has to be specified, and each
option is followed by its new value.
The list of supported options and their meaning can be found in
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>nameserv::client(n), <a href="nns_common.html">nameserv::common(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#name_service">name service</a>, <a href="../../../../index.html#server">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








233
234
235
236
237
238
239






240
241
242
243
244
245
246
247
248
249
250
251
252
253
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>nameserv::client(n), <a href="nns_common.html">nameserv::common(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key65">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/nntp/nntp.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>nntp - Tcl NNTP Client Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>nntp - Tcl NNTP Client Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nntp.man' by tcllib/doctools with format 'html'
   -->
<!-- nntp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nntp(n) 1.5.1 tcllib &quot;Tcl NNTP Client Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nntp - Tcl client for the NNTP protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nntp.man' by tcllib/doctools with format 'html'
   -->
<! -- nntp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">nntp(n) 1.5.1 tcllib &quot;Tcl NNTP Client Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>nntp - Tcl client for the NNTP protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nntp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#news">news</a>, <a href="../../../../index.html#nntp">nntp</a>, <a href="../../../../index.html#nntpclient">nntpclient</a>, <a href="../../../../index.html#rfc_1036">rfc 1036</a>, <a href="../../../../index.html#rfc_977">rfc 977</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





391
392
393
394
395
396
397






398
399
400
401
402
403
404
405
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nntp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key532">news</a>, <a href="../../../../index.html#key652">nntp</a>, <a href="../../../../index.html#key655">nntpclient</a>, <a href="../../../../index.html#key653">rfc 1036</a>, <a href="../../../../index.html#key654">rfc 977</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/ntp/ntp_time.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>ntp_time - Network Time Facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>ntp_time - Network Time Facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ntp_time.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- ntp_time.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ntp_time(n) 1.2.1 tcllib &quot;Network Time Facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ntp_time - Tcl Time Service Client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ntp_time.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- ntp_time.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ntp_time(n) 1.2.1 tcllib &quot;Network Time Facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ntp_time - Tcl Time Service Client</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::time::gettime</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">timeserver</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Get the time from <i class="arg">timeserver</i>. You may specify any of the options
listed for the <b class="cmd">configure</b> command here. This command returns a
token which must then be used with the remaining commands in this
package. Once you have finished, you should use <b class="cmd"><a href="../../../../index.html#cleanup">cleanup</a></b> to
release all resources. The default port is <b class="const">37</b>.</p></dd>
<dt><a name="2"><b class="cmd">::time::getsntp</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">timeserver</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Get the time from an SNTP server. This accepts exactly the same
arguments as <b class="cmd">::time::gettime</b> except that the default port is
<b class="const">123</b>. The result is a token as per <b class="cmd">::time::gettime</b> and
should be handled in the same way.</p>
<p>Note that it is unlikely that any SNTP server will reply using tcp so







|







156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::time::gettime</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">timeserver</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Get the time from <i class="arg">timeserver</i>. You may specify any of the options
listed for the <b class="cmd">configure</b> command here. This command returns a
token which must then be used with the remaining commands in this
package. Once you have finished, you should use <b class="cmd"><a href="../../../../index.html#key158">cleanup</a></b> to
release all resources. The default port is <b class="const">37</b>.</p></dd>
<dt><a name="2"><b class="cmd">::time::getsntp</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">timeserver</i> <span class="opt">?<i class="arg">port</i>?</span></a></dt>
<dd><p>Get the time from an SNTP server. This accepts exactly the same
arguments as <b class="cmd">::time::gettime</b> except that the default port is
<b class="const">123</b>. The result is a token as per <b class="cmd">::time::gettime</b> and
should be handled in the same way.</p>
<p>Note that it is unlikely that any SNTP server will reply using tcp so
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
  <em>ok</em>. May be <em>error</em> or <em>timeout</em> or <em>eof</em>.
  See also <b class="cmd">::time::error</b></p></dd>
<dt><a name="7"><b class="cmd">::time::error</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the error message provided for requests whose status is <em>error</em>.
  If there is no error message then an empty string is returned.</p></dd>
<dt><a name="8"><b class="cmd">::time::reset</b> <i class="arg">token</i> <i class="arg"><span class="opt">?reason?</span></i></a></dt>
<dd><p>Reset or cancel the query optionally specfying the reason to record
  for the <b class="cmd"><a href="../../../../index.html#error">error</a></b> command.</p></dd>
<dt><a name="9"><b class="cmd">::time::wait</b> <i class="arg">token</i></a></dt>
<dd><p>Wait for a query to complete and return the status upon completion.</p></dd>
<dt><a name="10"><b class="cmd">::time::cleanup</b> <i class="arg">token</i></a></dt>
<dd><p>Remove all state variables associated with the request.</p></dd>
</dl>
<pre class="doctools_example">
% set tok [::time::gettime ntp2a.mcc.ac.uk]







|







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
  <em>ok</em>. May be <em>error</em> or <em>timeout</em> or <em>eof</em>.
  See also <b class="cmd">::time::error</b></p></dd>
<dt><a name="7"><b class="cmd">::time::error</b> <i class="arg">token</i></a></dt>
<dd><p>Returns the error message provided for requests whose status is <em>error</em>.
  If there is no error message then an empty string is returned.</p></dd>
<dt><a name="8"><b class="cmd">::time::reset</b> <i class="arg">token</i> <i class="arg"><span class="opt">?reason?</span></i></a></dt>
<dd><p>Reset or cancel the query optionally specfying the reason to record
  for the <b class="cmd"><a href="../../../../index.html#key161">error</a></b> command.</p></dd>
<dt><a name="9"><b class="cmd">::time::wait</b> <i class="arg">token</i></a></dt>
<dd><p>Wait for a query to complete and return the status upon completion.</p></dd>
<dt><a name="10"><b class="cmd">::time::cleanup</b> <i class="arg">token</i></a></dt>
<dd><p>Remove all state variables associated with the request.</p></dd>
</dl>
<pre class="doctools_example">
% set tok [::time::gettime ntp2a.mcc.ac.uk]
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ntp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>ntp</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ntp">NTP</a>, <a href="../../../../index.html#sntp">SNTP</a>, <a href="../../../../index.html#rfc_2030">rfc 2030</a>, <a href="../../../../index.html#rfc_868">rfc 868</a>, <a href="../../../../index.html#time">time</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








239
240
241
242
243
244
245






246
247
248
249
250
251
252
253
254
255
256
257
258
259
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ntp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>ntp</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key80">NTP</a>, <a href="../../../../index.html#key78">SNTP</a>, <a href="../../../../index.html#key77">rfc 2030</a>, <a href="../../../../index.html#key79">rfc 868</a>, <a href="../../../../index.html#key81">time</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/oauth/oauth.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>oauth - oauth</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>oauth - oauth</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'oauth.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2014 Javi P. &amp;lt;hxm@eggdrop.es&amp;gt;
   -->
<!-- oauth.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oauth(n) 1.0.3 tcllib &quot;oauth&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oauth - oauth API base signature</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section3">Commands</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">oauth <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::oauth::config</b></a></li>
<li><a href="#2"><b class="cmd">::oauth::config</b> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::oauth::header</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::oauth::query</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">oauth</b> package provides a simple Tcl-only library
for communication with <a href="http://oauth.net">oauth</a> APIs.
This current version of the package supports the Oauth 1.0 Protocol,
as specified in <a href="http://tools.ietf.org/rfc/rfc5849.txt">RFC 5849</a>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>







|

|

|



|
|
|
|
|
|


|




















|
















|
|

|







|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'oauth.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2014 Javi P. &lt;hxm@eggdrop.es&gt;
   -->
<! -- oauth.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oauth(n) 1.0 tcllib &quot;oauth&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oauth - oauth API base signature</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">TLS Security Considerations</a></li>
<li class="doctools_section"><a href="#section3">Commands</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">oauth <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::oauth::config</b></a></li>
<li><a href="#2"><b class="cmd">::oauth::config</b> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">::oauth::header</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::oauth::query</b> <i class="arg">baseURL</i> <span class="opt">?<i class="arg">postQuery</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">oauth</b> package provides a simple Tcl-only library
for communication with <a href="http://oauth.net">oauth</a> APIs.
This current version of the package supports the Oauth 1.0 Protocol,
as specified in <a href="http://tools.ietf.org/rfc/rfc5849.txt">RFC 5849</a>.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>oauth</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#rfc_2718">RFC 2718</a>, <a href="../../../../index.html#rfc_5849">RFC 5849</a>, <a href="../../../../index.html#oauth">oauth</a>, <a href="../../../../index.html#twitter">twitter</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2014 Javi P. &lt;hxm@eggdrop.es&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








298
299
300
301
302
303
304






305
306
307
308
309
310
311
312
313
314
315
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>oauth</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key836">RFC 2718</a>, <a href="../../../../index.html#key837">RFC 5849</a>, <a href="../../../../index.html#key838">oauth</a>, <a href="../../../../index.html#key839">twitter</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2014 Javi P. &lt;hxm@eggdrop.es&gt;</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/oometa/oometa.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!DOCTYPE html><html><head>
<title>oometa - Data registry for TclOO frameworks</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'oometa.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2015 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- oometa.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oometa(n) 0.7.1 tcllib &quot;Data registry for TclOO frameworks&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oometa - oo::meta A data registry for classess</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Usage</a></li>
<li class="doctools_section"><a href="#section3">Concept</a></li>
<li class="doctools_section"><a href="#section4">COMMANDS</a></li>
<li class="doctools_section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">oo::meta::info</b></a></li>
<li><a href="#2"><b class="cmd">oo::meta::info branchget</b> <span class="opt">?<i class="arg">key</i>?</span> <span class="opt">?...?</span></a></li>
<li><a href="#3"><b class="cmd">oo::meta::info branchset</b> <span class="opt">?<i class="arg">key...</i>?</span> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#4"><b class="cmd">oo::meta::info dump</b> <i class="arg">class</i></a></li>
<li><a href="#5"><b class="cmd">oo::meta::info</b> <i class="arg">class</i> <b class="cmd">is</b> <i class="arg">type</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#6"><b class="cmd">oo::meta::info</b> <i class="arg">class</i> <b class="cmd"><a href="../../../../index.html#merge">merge</a></b> <span class="opt">?<i class="arg">dict</i>?</span> <span class="opt">?<i class="arg">dict</i>?</span> <span class="opt">?<i class="arg">...</i>?</span></a></li>
<li><a href="#7"><b class="cmd">oo::meta::info</b> <i class="arg">class</i> <b class="cmd">rebuild</b></a></li>
<li><a href="#8"><b class="cmd">oo::meta::metadata</b> <i class="arg">class</i></a></li>
<li><a href="#9"><b class="cmd">oo::define meta</b></a></li>
<li><a href="#10"><b class="cmd">oo::class method meta</b></a></li>
<li><a href="#11"><b class="cmd">oo::object method meta</b></a></li>
<li><a href="#12"><b class="cmd">oo::object method meta cget</b> <span class="opt">?<i class="arg">field</i>?</span> <span class="opt">?<i class="arg">...</i>?</span> <i class="arg">field</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">oo::meta</b> package provides a data registry service for TclOO classes.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Usage</a></h2>
<pre class="doctools_example">
oo::class create animal {
  meta set biodata animal: 1
}
oo::class create mammal {
  superclass animal
  meta set biodata mammal: 1
}
oo::class create cat {
  superclass mammal
  meta set biodata diet: carnivore
}
cat create felix
puts [felix meta dump biodata]
&gt; animal: 1 mammal: 1 diet: carnivore
felix meta set biodata likes: {birds mice}
puts [felix meta get biodata]
&gt; animal: 1 mammal: 1 diet: carnivore likes: {bird mice}
# Modify a class
mammal meta set biodata metabolism: warm-blooded
puts [felix meta get biodata]
&gt; animal: 1 mammal: 1 metabolism: warm-blooded diet: carnivore likes: {birds mice}
# Overwrite class info
felix meta set biodata mammal: yes
puts [felix meta get biodata]
&gt; animal: 1 mammal: yes metabolism: warm-blooded diet: carnivore likes: {birds mice}
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Concept</a></h2>
<p>The concept behind <b class="cmd">oo::meta</b> is that each class contributes a snippet of <em>local</em> data.
When <b class="cmd">oo::meta::metadata</b> is called, the system walks through the linear ancestry produced by
<b class="cmd">oo::meta::ancestors</b>, and recursively combines all of that local data for all of a class'
ancestors into a single dict.
Instances of oo::object can also combine class data with a local dict stored in the <em>meta</em> variable.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">oo::meta::info</b></a></dt>
<dd><p><b class="cmd">oo::meta::info</b> is intended to work on the metadata of a class in a manner similar to if the aggregate
pieces where assembled into a single dict. The system mimics all of the standard dict commands, and addes
the following:</p></dd>
<dt><a name="2"><b class="cmd">oo::meta::info branchget</b> <span class="opt">?<i class="arg">key</i>?</span> <span class="opt">?...?</span></a></dt>
<dd><p>Returns a dict representation of the element at <em>args</em>, but with any trailing : removed from field names.</p>
<pre class="doctools_example">
::oo::meta::info $myclass set option color {default: green widget: colorselect}
puts [::oo::meta::info $myclass get option color]
&gt; {default: green widget: color}
puts [::oo::meta::info $myclass branchget option color]
&gt; {default green widget color}
</pre>
</dd>
<dt><a name="3"><b class="cmd">oo::meta::info branchset</b> <span class="opt">?<i class="arg">key...</i>?</span> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>Merges <em>dict</em> with any other information contaned at node <span class="opt">?<i class="arg">key...</i>?</span>, and adding a trailing :
to all field names.</p>
<pre class="doctools_example">
::oo::meta::info $myclass branchset option color {default green widget colorselect}
puts [::oo::meta::info $myclass get option color]
&gt; {default: green widget: color}
</pre>
</dd>
<dt><a name="4"><b class="cmd">oo::meta::info dump</b> <i class="arg">class</i></a></dt>
<dd><p>Returns the complete snapshot of a class metadata, as producted by <b class="cmd">oo::meta::metadata</b></p></dd>
<dt><a name="5"><b class="cmd">oo::meta::info</b> <i class="arg">class</i> <b class="cmd">is</b> <i class="arg">type</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Returns a boolean true or false if the element <span class="opt">?<i class="arg">args</i>?</span> would match <b class="cmd">string is</b> <i class="arg">type</i> <i class="arg">value</i></p>
<pre class="doctools_example">
::oo::meta::info $myclass set constant mammal 1
puts [::oo::meta::info $myclass is true constant mammal]
&gt; 1
</pre>
</dd>
<dt><a name="6"><b class="cmd">oo::meta::info</b> <i class="arg">class</i> <b class="cmd"><a href="../../../../index.html#merge">merge</a></b> <span class="opt">?<i class="arg">dict</i>?</span> <span class="opt">?<i class="arg">dict</i>?</span> <span class="opt">?<i class="arg">...</i>?</span></a></dt>
<dd><p>Combines all of the arguments into a single dict, which is then stored as the new
local representation for this class.</p></dd>
<dt><a name="7"><b class="cmd">oo::meta::info</b> <i class="arg">class</i> <b class="cmd">rebuild</b></a></dt>
<dd><p>Forces the meta system to destroy any cached representation of a class' metadata before
the next access to <b class="cmd">oo::meta::metadata</b></p></dd>
<dt><a name="8"><b class="cmd">oo::meta::metadata</b> <i class="arg">class</i></a></dt>
<dd><p>Returns an aggregate picture of the metadata for <i class="arg">class</i>, combining its <em>local</em> data
with the <em>local</em> data from its ancestors.</p></dd>
<dt><a name="9"><b class="cmd">oo::define meta</b></a></dt>
<dd><p>The package injects a command <b class="cmd">oo::define::meta</b> which works to provide a class in the
process of definition access to <b class="cmd">oo::meta::info</b>, but without having to look the name up.</p>
<pre class="doctools_example">
oo::define myclass {
  meta set foo bar: baz
}
</pre>
</dd>
<dt><a name="10"><b class="cmd">oo::class method meta</b></a></dt>
<dd><p>The package injects a new method <b class="cmd">meta</b> into <b class="cmd">oo::class</b> which works to provide a class
instance access to <b class="cmd">oo::meta::info</b>.</p></dd>
<dt><a name="11"><b class="cmd">oo::object method meta</b></a></dt>
<dd><p>The package injects a new method <b class="cmd">meta</b> into <b class="cmd">oo::object</b>. <b class="cmd">oo::object</b> combines the data
for its class (as provided by <b class="cmd">oo::meta::metadata</b>), with a local variable <em>meta</em> to
produce a local picture of metadata.
This method provides the following additional commands:</p></dd>
<dt><a name="12"><b class="cmd">oo::object method meta cget</b> <span class="opt">?<i class="arg">field</i>?</span> <span class="opt">?<i class="arg">...</i>?</span> <i class="arg">field</i></a></dt>
<dd><p>Attempts to locate a singlar leaf, and return its value. For single option lookups, this
is faster than <b class="cmd">my meta getnull</b> <span class="opt">?<i class="arg">field</i>?</span> <span class="opt">?<i class="arg">...</i>?</span> <i class="arg">field</i>], because
it performs a search instead directly instead of producing the recursive merge product
between the class metadata, the local <em>meta</em> variable, and THEN performing the search.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tcloo</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tool">TOOL</a>, <a href="../../../../index.html#tcloo">TclOO</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>TclOO</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/ooutil/ooutil.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>oo::util - Utility commands for TclOO</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>oo::util - Utility commands for TclOO</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ooutil.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011-2015 Andreas Kupries, BSD licensed
   -->
<!-- oo::util.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oo::util(n) 1.2.2 tcllib &quot;Utility commands for TclOO&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oo::util - Utility commands for TclOO</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ooutil.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011-2015 Andreas Kupries, BSD licensed
   -->
<! -- oo::util.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oo::util(n) 1.2.2 tcllib &quot;Utility commands for TclOO&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oo::util - Utility commands for TclOO</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>oo::util</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../snit/snit.html">snit(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tcloo">TclOO</a>, <a href="../../../../index.html#callback">callback</a>, <a href="../../../../index.html#class_methods">class methods</a>, <a href="../../../../index.html#class_variables">class variables</a>, <a href="../../../../index.html#command_prefix">command prefix</a>, <a href="../../../../index.html#currying">currying</a>, <a href="../../../../index.html#method_reference">method reference</a>, <a href="../../../../index.html#my_method">my method</a>, <a href="../../../../index.html#singleton">singleton</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011-2015 Andreas Kupries, BSD licensed</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








262
263
264
265
266
267
268






269
270
271
272
273
274
275
276
277
278
279
280
281
282
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>oo::util</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../snit/snit.html">snit(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key757">TclOO</a>, <a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key758">class methods</a>, <a href="../../../../index.html#key761">class variables</a>, <a href="../../../../index.html#key595">command prefix</a>, <a href="../../../../index.html#key597">currying</a>, <a href="../../../../index.html#key756">method reference</a>, <a href="../../../../index.html#key760">my method</a>, <a href="../../../../index.html#key759">singleton</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011-2015 Andreas Kupries, BSD licensed</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/otp/otp.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>otp - RFC 2289 A One-Time Password System</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>otp - RFC 2289 A One-Time Password System</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'otp.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- otp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">otp(n) 1.0.0 tcllib &quot;RFC 2289 A One-Time Password System&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>otp - One-Time Passwords</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'otp.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- otp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">otp(n) 1.0.0 tcllib &quot;RFC 2289 A One-Time Password System&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>otp - One-Time Passwords</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>otp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../sasl/sasl.html">SASL</a>, <a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="../ripemd/ripemd160.html">ripemd160</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#hashing">hashing</a>, <a href="../../../../index.html#message_digest">message-digest</a>, <a href="../../../../index.html#password">password</a>, <a href="../../../../index.html#rfc_2289">rfc 2289</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








194
195
196
197
198
199
200






201
202
203
204
205
206
207
208
209
210
211
212
213
214
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>otp</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../sasl/sasl.html">SASL</a>, <a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="../ripemd/ripemd160.html">ripemd160</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key692">password</a>, <a href="../../../../index.html#key691">rfc 2289</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/page/page_intro.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>page_intro - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>page_intro - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'page_intro.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- page_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_intro(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_intro - page introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#page">page</a></i> (short for <em>parser generator</em>) stands for a set of
related packages which help in the construction of parser generators,
and other utilities doing text processing.</p>
<p>They are mainly geared towards supporting the Tcllib application
<b class="syscmd"><a href="../../apps/page.html">page</a></b>, with the package <b class="package">page::pluginmgr</b> in a central
role as the plugin management for the application. The other packages
are performing low-level text processing and utility tasks geared
towards parser generation and mainly accessed by <b class="syscmd"><a href="../../apps/page.html">page</a></b> through
plugins.</p>
<p>The packages implementing the plugins are not documented as regular
packages, as they cannot be loaded into a general interpreter, like
tclsh, without extensive preparation of the interpreter. Preparation
which is done for them by the plugin manager.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#page">page</a>, <a href="../../../../index.html#parser_generator">parser generator</a>, <a href="../../../../index.html#text_processing">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

|

|



|
|
|
|
|
|

















|




















<
<
<
<
<
<


|








88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146






147
148
149
150
151
152
153
154
155
156
157
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'page_intro.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- page_intro.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_intro(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_intro - page introduction</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><i class="term"><a href="../../../../index.html#key191">page</a></i> (short for <em>parser generator</em>) stands for a set of
related packages which help in the construction of parser generators,
and other utilities doing text processing.</p>
<p>They are mainly geared towards supporting the Tcllib application
<b class="syscmd"><a href="../../apps/page.html">page</a></b>, with the package <b class="package">page::pluginmgr</b> in a central
role as the plugin management for the application. The other packages
are performing low-level text processing and utility tasks geared
towards parser generation and mainly accessed by <b class="syscmd"><a href="../../apps/page.html">page</a></b> through
plugins.</p>
<p>The packages implementing the plugins are not documented as regular
packages, as they cannot be loaded into a general interpreter, like
tclsh, without extensive preparation of the interpreter. Preparation
which is done for them by the plugin manager.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key192">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/page/page_pluginmgr.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>page_pluginmgr - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>page_pluginmgr - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'page_pluginmgr.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- page_pluginmgr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_pluginmgr(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_pluginmgr - page plugin manager</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'page_pluginmgr.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- page_pluginmgr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_pluginmgr(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_pluginmgr - page plugin manager</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<dd><p>This command activates the collection of timing statistics in the
loaded reader plugin.</p></dd>
<dt><a name="9"><b class="cmd">::page::pluginmgr::rgettime</b></a></dt>
<dd><p>This command retrieves the collected timing statistics of the loaded
reader plugin after it was executed.</p></dd>
<dt><a name="10"><b class="cmd">::page::pluginmgr::rhelp</b></a></dt>
<dd><p>This command retrieves the help string of the loaded reader
plugin. This is expected to be in <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> format.</p></dd>
<dt><a name="11"><b class="cmd">::page::pluginmgr::rlabel</b></a></dt>
<dd><p>This command retrieves the human-readable name of the loaded reader
plugin.</p></dd>
<dt><a name="12"><b class="cmd">::page::pluginmgr::read</b> <i class="arg">read</i> <i class="arg">eof</i> <span class="opt">?<i class="arg">complete</i>?</span></a></dt>
<dd><p>This command invokes the loaded reader plugin to process the input,
and returns the results of the plugin as its own result. The input is
accessible through the callback commands <i class="arg">read</i>, and <i class="arg">eof</i>. The







|







295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<dd><p>This command activates the collection of timing statistics in the
loaded reader plugin.</p></dd>
<dt><a name="9"><b class="cmd">::page::pluginmgr::rgettime</b></a></dt>
<dd><p>This command retrieves the collected timing statistics of the loaded
reader plugin after it was executed.</p></dd>
<dt><a name="10"><b class="cmd">::page::pluginmgr::rhelp</b></a></dt>
<dd><p>This command retrieves the help string of the loaded reader
plugin. This is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="11"><b class="cmd">::page::pluginmgr::rlabel</b></a></dt>
<dd><p>This command retrieves the human-readable name of the loaded reader
plugin.</p></dd>
<dt><a name="12"><b class="cmd">::page::pluginmgr::read</b> <i class="arg">read</i> <i class="arg">eof</i> <span class="opt">?<i class="arg">complete</i>?</span></a></dt>
<dd><p>This command invokes the loaded reader plugin to process the input,
and returns the results of the plugin as its own result. The input is
accessible through the callback commands <i class="arg">read</i>, and <i class="arg">eof</i>. The
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<dd><p>This command activates the collection of timing statistics in the
loaded writer plugin.</p></dd>
<dt><a name="20"><b class="cmd">::page::pluginmgr::wgettime</b></a></dt>
<dd><p>This command retrieves the collected timing statistics of the loaded
writer plugin after it was executed.</p></dd>
<dt><a name="21"><b class="cmd">::page::pluginmgr::whelp</b></a></dt>
<dd><p>This command retrieves the help string of the loaded writer
plugin. This is expected to be in <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> format.</p></dd>
<dt><a name="22"><b class="cmd">::page::pluginmgr::wlabel</b></a></dt>
<dd><p>This command retrieves the human-readable name of the loaded writer
plugin.</p></dd>
<dt><a name="23"><b class="cmd">::page::pluginmgr::write</b> <i class="arg">chan</i> <i class="arg">data</i></a></dt>
<dd><p>The loaded writer plugin is invoked to generate the output. It is
given the <i class="arg">data</i> to generate the outpout from, and the Tcl handle
<i class="arg">chan</i> of the channel to write the generated output to. The







|







344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<dd><p>This command activates the collection of timing statistics in the
loaded writer plugin.</p></dd>
<dt><a name="20"><b class="cmd">::page::pluginmgr::wgettime</b></a></dt>
<dd><p>This command retrieves the collected timing statistics of the loaded
writer plugin after it was executed.</p></dd>
<dt><a name="21"><b class="cmd">::page::pluginmgr::whelp</b></a></dt>
<dd><p>This command retrieves the help string of the loaded writer
plugin. This is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="22"><b class="cmd">::page::pluginmgr::wlabel</b></a></dt>
<dd><p>This command retrieves the human-readable name of the loaded writer
plugin.</p></dd>
<dt><a name="23"><b class="cmd">::page::pluginmgr::write</b> <i class="arg">chan</i> <i class="arg">data</i></a></dt>
<dd><p>The loaded writer plugin is invoked to generate the output. It is
given the <i class="arg">data</i> to generate the outpout from, and the Tcl handle
<i class="arg">chan</i> of the channel to write the generated output to. The
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
<dd><p>This command activates the collection of timing statistics in the
identified transformation plugin.</p></dd>
<dt><a name="28"><b class="cmd">::page::pluginmgr::tgettime</b> <i class="arg">id</i></a></dt>
<dd><p>This command retrieves the collected timing statistics of the
identified transformation plugin after it was executed.</p></dd>
<dt><a name="29"><b class="cmd">::page::pluginmgr::thelp</b> <i class="arg">id</i></a></dt>
<dd><p>This command retrieves the help string of the identified
transformation plugin. This is expected to be in <i class="term"><a href="../../../../index.html#doctools">doctools</a></i>
format.</p></dd>
<dt><a name="30"><b class="cmd">::page::pluginmgr::tlabel</b> <i class="arg">id</i></a></dt>
<dd><p>This command retrieves the human-readable name of the identified
transformation plugin.</p></dd>
<dt><a name="31"><b class="cmd">::page::pluginmgr::transform_do</b> <i class="arg">id</i> <i class="arg">data</i></a></dt>
<dd><p>The identified transformation plugin is invoked to process the
specified <i class="arg">data</i>. The result of the plugin is returned as the







|







378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<dd><p>This command activates the collection of timing statistics in the
identified transformation plugin.</p></dd>
<dt><a name="28"><b class="cmd">::page::pluginmgr::tgettime</b> <i class="arg">id</i></a></dt>
<dd><p>This command retrieves the collected timing statistics of the
identified transformation plugin after it was executed.</p></dd>
<dt><a name="29"><b class="cmd">::page::pluginmgr::thelp</b> <i class="arg">id</i></a></dt>
<dd><p>This command retrieves the help string of the identified
transformation plugin. This is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i>
format.</p></dd>
<dt><a name="30"><b class="cmd">::page::pluginmgr::tlabel</b> <i class="arg">id</i></a></dt>
<dd><p>This command retrieves the human-readable name of the identified
transformation plugin.</p></dd>
<dt><a name="31"><b class="cmd">::page::pluginmgr::transform_do</b> <i class="arg">id</i> <i class="arg">data</i></a></dt>
<dd><p>The identified transformation plugin is invoked to process the
specified <i class="arg">data</i>. The result of the plugin is returned as the
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
<dt><a name="35"><b class="cmd">page_rgettime</b></a></dt>
<dd><p>This command is invoked to retrieve the collected timing statistics.</p></dd>
<dt><a name="36"><b class="cmd">page_rlabel</b></a></dt>
<dd><p>This command is invoked to retrieve a human-readable label for the
plugin.</p></dd>
<dt><a name="37"><b class="cmd">page_rhelp</b></a></dt>
<dd><p>This command is invoked to retrieve a help text for plugin. The text
is expected to be in <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> format.</p></dd>
<dt><a name="38"><b class="cmd">page_roptions</b></a></dt>
<dd><p>This command is invoked to retrieve the options understood by the
plugin.</p></dd>
<dt><a name="39"><b class="cmd">page_rconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></dt>
<dd><p>This command is invoked to reconfigure the plugin, specifically the
given <i class="arg">option</i> is set to the new <i class="arg">value</i>.</p></dd>
<dt><a name="40"><b class="cmd">page_rrun</b></a></dt>







|







427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
<dt><a name="35"><b class="cmd">page_rgettime</b></a></dt>
<dd><p>This command is invoked to retrieve the collected timing statistics.</p></dd>
<dt><a name="36"><b class="cmd">page_rlabel</b></a></dt>
<dd><p>This command is invoked to retrieve a human-readable label for the
plugin.</p></dd>
<dt><a name="37"><b class="cmd">page_rhelp</b></a></dt>
<dd><p>This command is invoked to retrieve a help text for plugin. The text
is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="38"><b class="cmd">page_roptions</b></a></dt>
<dd><p>This command is invoked to retrieve the options understood by the
plugin.</p></dd>
<dt><a name="39"><b class="cmd">page_rconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></dt>
<dd><p>This command is invoked to reconfigure the plugin, specifically the
given <i class="arg">option</i> is set to the new <i class="arg">value</i>.</p></dd>
<dt><a name="40"><b class="cmd">page_rrun</b></a></dt>
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
<dt><a name="52"><b class="cmd">page_wgettime</b></a></dt>
<dd><p>This command is invoked to retrieve the collected timing statistics.</p></dd>
<dt><a name="53"><b class="cmd">page_wlabel</b></a></dt>
<dd><p>This command is invoked to retrieve a human-readable label for the
plugin.</p></dd>
<dt><a name="54"><b class="cmd">page_whelp</b></a></dt>
<dd><p>This command is invoked to retrieve a help text for plugin. The text
is expected to be in <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> format.</p></dd>
<dt><a name="55"><b class="cmd">page_woptions</b></a></dt>
<dd><p>This command is invoked to retrieve the options understood by the
plugin.</p></dd>
<dt><a name="56"><b class="cmd">page_wconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></dt>
<dd><p>This command is invoked to reconfigure the plugin, specifically the
given <i class="arg">option</i> is set to the new <i class="arg">value</i>.</p></dd>
<dt><a name="57"><b class="cmd">page_wrun</b> <i class="arg">chan</i> <i class="arg">data</i></a></dt>







|







498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<dt><a name="52"><b class="cmd">page_wgettime</b></a></dt>
<dd><p>This command is invoked to retrieve the collected timing statistics.</p></dd>
<dt><a name="53"><b class="cmd">page_wlabel</b></a></dt>
<dd><p>This command is invoked to retrieve a human-readable label for the
plugin.</p></dd>
<dt><a name="54"><b class="cmd">page_whelp</b></a></dt>
<dd><p>This command is invoked to retrieve a help text for plugin. The text
is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="55"><b class="cmd">page_woptions</b></a></dt>
<dd><p>This command is invoked to retrieve the options understood by the
plugin.</p></dd>
<dt><a name="56"><b class="cmd">page_wconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></dt>
<dd><p>This command is invoked to reconfigure the plugin, specifically the
given <i class="arg">option</i> is set to the new <i class="arg">value</i>.</p></dd>
<dt><a name="57"><b class="cmd">page_wrun</b> <i class="arg">chan</i> <i class="arg">data</i></a></dt>
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
<dt><a name="66"><b class="cmd">page_tgettime</b></a></dt>
<dd><p>This command is invoked to retrieve the collected timing statistics.</p></dd>
<dt><a name="67"><b class="cmd">page_tlabel</b></a></dt>
<dd><p>This command is invoked to retrieve a human-readable label for the
plugin.</p></dd>
<dt><a name="68"><b class="cmd">page_thelp</b></a></dt>
<dd><p>This command is invoked to retrieve a help text for plugin. The text
is expected to be in <i class="term"><a href="../../../../index.html#doctools">doctools</a></i> format.</p></dd>
<dt><a name="69"><b class="cmd">page_toptions</b></a></dt>
<dd><p>This command is invoked to retrieve the options understood by the
plugin.</p></dd>
<dt><a name="70"><b class="cmd">page_tconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></dt>
<dd><p>This command is invoked to reconfigure the plugin, specifically the
given <i class="arg">option</i> is set to the new <i class="arg">value</i>.</p></dd>
<dt><a name="71"><b class="cmd">page_trun</b> <i class="arg">chan</i> <i class="arg">data</i></a></dt>







|







560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
<dt><a name="66"><b class="cmd">page_tgettime</b></a></dt>
<dd><p>This command is invoked to retrieve the collected timing statistics.</p></dd>
<dt><a name="67"><b class="cmd">page_tlabel</b></a></dt>
<dd><p>This command is invoked to retrieve a human-readable label for the
plugin.</p></dd>
<dt><a name="68"><b class="cmd">page_thelp</b></a></dt>
<dd><p>This command is invoked to retrieve a help text for plugin. The text
is expected to be in <i class="term"><a href="../../../../index.html#key179">doctools</a></i> format.</p></dd>
<dt><a name="69"><b class="cmd">page_toptions</b></a></dt>
<dd><p>This command is invoked to retrieve the options understood by the
plugin.</p></dd>
<dt><a name="70"><b class="cmd">page_tconfigure</b> <i class="arg">option</i> <i class="arg">value</i></a></dt>
<dd><p>This command is invoked to reconfigure the plugin, specifically the
given <i class="arg">option</i> is set to the new <i class="arg">value</i>.</p></dd>
<dt><a name="71"><b class="cmd">page_trun</b> <i class="arg">chan</i> <i class="arg">data</i></a></dt>
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#page">page</a>, <a href="../../../../index.html#parser_generator">parser generator</a>, <a href="../../../../index.html#text_processing">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








698
699
700
701
702
703
704






705
706
707
708
709
710
711
712
713
714
715
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key192">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/page/page_util_flow.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>page_util_flow - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>page_util_flow - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'page_util_flow.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- page_util_flow.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_flow(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_flow - page dataflow/treewalker utility</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'page_util_flow.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- page_util_flow.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_flow(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_flow - page dataflow/treewalker utility</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#dataflow">dataflow</a>, <a href="../../../../index.html#graph_walking">graph walking</a>, <a href="../../../../index.html#page">page</a>, <a href="../../../../index.html#parser_generator">parser generator</a>, <a href="../../../../index.html#text_processing">text processing</a>, <a href="../../../../index.html#tree_walking">tree walking</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








192
193
194
195
196
197
198






199
200
201
202
203
204
205
206
207
208
209
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key402">dataflow</a>, <a href="../../../../index.html#key194">graph walking</a>, <a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key190">tree walking</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/page/page_util_norm_lemon.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>page_util_norm_lemon - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>page_util_norm_lemon - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'page_util_norm_lemon.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- page_util_norm_lemon.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_norm_lemon(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_norm_lemon - page AST normalization, LEMON</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'page_util_norm_lemon.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- page_util_norm_lemon.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_norm_lemon(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_norm_lemon - page AST normalization, LEMON</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#graph_walking">graph walking</a>, <a href="../../../../index.html#lemon">lemon</a>, <a href="../../../../index.html#normalization">normalization</a>, <a href="../../../../index.html#page">page</a>, <a href="../../../../index.html#parser_generator">parser generator</a>, <a href="../../../../index.html#text_processing">text processing</a>, <a href="../../../../index.html#tree_walking">tree walking</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








154
155
156
157
158
159
160






161
162
163
164
165
166
167
168
169
170
171
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key194">graph walking</a>, <a href="../../../../index.html#key193">lemon</a>, <a href="../../../../index.html#key112">normalization</a>, <a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key190">tree walking</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/page/page_util_norm_peg.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>page_util_norm_peg - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>page_util_norm_peg - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'page_util_norm_peg.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- page_util_norm_peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_norm_peg(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_norm_peg - page AST normalization, PEG</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'page_util_norm_peg.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- page_util_norm_peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_norm_peg(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_norm_peg - page AST normalization, PEG</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#graph_walking">graph walking</a>, <a href="../../../../index.html#normalization">normalization</a>, <a href="../../../../index.html#page">page</a>, <a href="../../../../index.html#parser_generator">parser generator</a>, <a href="../../../../index.html#text_processing">text processing</a>, <a href="../../../../index.html#tree_walking">tree walking</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








192
193
194
195
196
197
198






199
200
201
202
203
204
205
206
207
208
209
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key194">graph walking</a>, <a href="../../../../index.html#key112">normalization</a>, <a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key190">tree walking</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/page/page_util_peg.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>page_util_peg - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>page_util_peg - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'page_util_peg.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- page_util_peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_peg(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_peg - page PEG transformation utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'page_util_peg.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- page_util_peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_peg(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_peg - page PEG transformation utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#page">page</a>, <a href="../../../../index.html#parser_generator">parser generator</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#text_processing">text processing</a>, <a href="../../../../index.html#transformation">transformation</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








205
206
207
208
209
210
211






212
213
214
215
216
217
218
219
220
221
222
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key279">transformation</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/page/page_util_quote.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>page_util_quote - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>page_util_quote - Parser generator tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'page_util_quote.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- page_util_quote.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_quote(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_quote - page character quoting utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'page_util_quote.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- page_util_quote.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">page_util_quote(n) 1.0 tcllib &quot;Parser generator tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>page_util_quote - page character quoting utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#page">page</a>, <a href="../../../../index.html#parser_generator">parser generator</a>, <a href="../../../../index.html#quoting">quoting</a>, <a href="../../../../index.html#text_processing">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








174
175
176
177
178
179
180






181
182
183
184
185
186
187
188
189
190
191
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>page</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key191">page</a>, <a href="../../../../index.html#key189">parser generator</a>, <a href="../../../../index.html#key604">quoting</a>, <a href="../../../../index.html#key192">text processing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Page Parser Generator</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pki/pki.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pki - public key encryption</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pki - public key encryption</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pki.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2010, 2011, 2012, 2013, Roy Keene, Andreas Kupries
   -->
<!-- pki.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pki(n) 0.10 tcllib &quot;public key encryption&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pki - Implementation of the public key cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pki.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2010, 2011, 2012, 2013, Roy Keene, Andreas Kupries
   -->
<! -- pki.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pki(n) 0.10 tcllib &quot;public key encryption&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pki - Implementation of the public key cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<dd><p>Decrypt a message using PKI (probably RSA). See <b class="cmd">::pki::encrypt</b> for option handling.</p>
<p>Mapping to OpenSSL's <b class="syscmd">openssl</b> application:</p>
<ol class="doctools_enumerated">
<li><p>&quot;openssl rsautl -decrypt&quot; == &quot;::pki::decrypt -binary -priv&quot;</p></li>
<li><p>&quot;openssl rsautl -verify&quot;  == &quot;::pki::decrypt -binary -pub&quot;</p></li>
</ol></dd>
<dt><a name="3"><b class="cmd">::pki::sign</b> <i class="arg">input</i> <i class="arg">key</i> <span class="opt">?<i class="arg">algo</i>?</span></a></dt>
<dd><p>Digitally sign message <i class="arg">input</i> using the private <i class="arg">key</i>.</p>
<p>If <i class="arg">algo</i> is ommited &quot;sha1&quot; is assumed. Possible values for
<i class="arg">algo</i> include &quot;<b class="const">md5</b>&quot;, &quot;<b class="const">sha1</b>&quot;, &quot;<b class="const">sha256</b>&quot;,
and &quot;<b class="const">raw</b>&quot;.</p>
<p>Specifying &quot;<b class="const">raw</b>&quot; for <i class="arg">algo</i> will inhibit the
building of an ASN.1 structure to encode which hashing algorithm was
chosen.
<em>Attention</em>: In this case the corresponding <b class="cmd">pkgi::verify</b>
must be called <b class="const">with</b> algorithm information.
Conversely, specifying a non-&quot;<b class="const">raw</b>&quot; algorithm here means that
the corresponding <b class="cmd">pkgi::verify</b> invokation has to be made
<em>without</em> algorithm information.</p>
<p>The <i class="arg">input</i> should be the plain text, hashing will be
performed on it.</p>
<p>The <i class="arg">key</i> should include the private key.</p></dd>
<dt><a name="4"><b class="cmd">::pki::verify</b> <i class="arg">signedmessage</i> <i class="arg">plaintext</i> <i class="arg">key</i> <span class="opt">?<i class="arg">algo</i>?</span></a></dt>
<dd><p>Verify a digital signature using a public <i class="arg">key</i>.  Returns true or false.</p>
<p><em>Attention</em>: The algorithm information <i class="arg">algo</i> has to
be specified if and only if the <b class="cmd">pki::sign</b> which generated the
<i class="arg">signedmessage</i> was called with algorithm &quot;<b class="const">raw</b>&quot;. This
inhibited the building of the ASN.1 structure encoding the chosen
hashing algorithm. Conversely, if a proper algorithm was specified
during signing then you <em>must not</em> specify an algorithm here.</p></dd>
<dt><a name="5"><b class="cmd">::pki::key</b> <i class="arg">key</i> <span class="opt">?<i class="arg">password</i>?</span> <span class="opt">?<i class="arg">encodePem</i>?</span></a></dt>
<dd><p>Convert a key structure into a serialized PEM (default) or DER encoded private key suitable for other applications.  For RSA keys this means PKCS#1.</p></dd>
<dt><a name="6"><b class="cmd">::pki::pkcs::parse_key</b> <i class="arg">key</i> <span class="opt">?<i class="arg">password</i>?</span></a></dt>
<dd><p>Convert a PKCS#1 private <i class="arg">key</i> into a usable key, i.e. one which
can be used as argument for
<b class="cmd">::pki::encrypt</b>,
<b class="cmd">::pki::decrypt</b>,







|
|
<
<
|
|
|
<
<
<
<
<
|
<
|

|
<
<
<
<
<
<







183
184
185
186
187
188
189
190
191


192
193
194





195

196
197
198






199
200
201
202
203
204
205
<dd><p>Decrypt a message using PKI (probably RSA). See <b class="cmd">::pki::encrypt</b> for option handling.</p>
<p>Mapping to OpenSSL's <b class="syscmd">openssl</b> application:</p>
<ol class="doctools_enumerated">
<li><p>&quot;openssl rsautl -decrypt&quot; == &quot;::pki::decrypt -binary -priv&quot;</p></li>
<li><p>&quot;openssl rsautl -verify&quot;  == &quot;::pki::decrypt -binary -pub&quot;</p></li>
</ol></dd>
<dt><a name="3"><b class="cmd">::pki::sign</b> <i class="arg">input</i> <i class="arg">key</i> <span class="opt">?<i class="arg">algo</i>?</span></a></dt>
<dd><p>Digitally sign message <i class="arg">input</i> using the private <i class="arg">key</i>.  If <i class="arg">algo</i>
is ommited &quot;sha1&quot; is assumed.  Possible values for <i class="arg">algo</i> include


&quot;md5&quot;, &quot;sha1&quot;, &quot;sha256&quot;, and &quot;raw&quot;.  Specifyin &quot;raw&quot; for <i class="arg">algo</i> will
inhibit the building of an ASN.1 structure to encode which hashing
algorithm was chosen.





The <i class="arg">input</i> should be the plain text, hashing will be performed on it.

The <i class="arg">key</i> should include the private key.</p></dd>
<dt><a name="4"><b class="cmd">::pki::verify</b> <i class="arg">signedmessage</i> <i class="arg">plaintext</i> <i class="arg">key</i> <span class="opt">?<i class="arg">algo</i>?</span></a></dt>
<dd><p>Verify a digital signature using a public <i class="arg">key</i>.  Returns true or false.</p></dd>






<dt><a name="5"><b class="cmd">::pki::key</b> <i class="arg">key</i> <span class="opt">?<i class="arg">password</i>?</span> <span class="opt">?<i class="arg">encodePem</i>?</span></a></dt>
<dd><p>Convert a key structure into a serialized PEM (default) or DER encoded private key suitable for other applications.  For RSA keys this means PKCS#1.</p></dd>
<dt><a name="6"><b class="cmd">::pki::pkcs::parse_key</b> <i class="arg">key</i> <span class="opt">?<i class="arg">password</i>?</span></a></dt>
<dd><p>Convert a PKCS#1 private <i class="arg">key</i> into a usable key, i.e. one which
can be used as argument for
<b class="cmd">::pki::encrypt</b>,
<b class="cmd">::pki::decrypt</b>,
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rsa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../aes/aes.html">aes(n)</a>, <a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../des/des.html">des(n)</a>, <a href="../md5/md5.html">md5(n)</a>, <a href="../sha1/sha1.html">sha1(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cipher">cipher</a>, <a href="../../../../index.html#data_integrity">data integrity</a>, <a href="../../../../index.html#encryption">encryption</a>, <a href="../../../../index.html#public_key_cipher">public key cipher</a>, <a href="../../../../index.html#rsa">rsa</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, 2011, 2012, 2013, Roy Keene, Andreas Kupries</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








307
308
309
310
311
312
313






314
315
316
317
318
319
320
321
322
323
324
325
326
327
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rsa</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../aes/aes.html">aes(n)</a>, <a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../des/des.html">des(n)</a>, <a href="../md5/md5.html">md5(n)</a>, <a href="../sha1/sha1.html">sha1(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key169">cipher</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key168">public key cipher</a>, <a href="../../../../index.html#key167">rsa</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2010, 2011, 2012, 2013, Roy Keene, Andreas Kupries</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pluginmgr/pluginmgr.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pluginmgr - Plugin management</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pluginmgr - Plugin management</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pluginmgr.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pluginmgr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pluginmgr(n) 0.3 tcllib &quot;Plugin management&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pluginmgr - Manage a plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pluginmgr.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pluginmgr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pluginmgr(n) 0.3 tcllib &quot;Plugin management&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pluginmgr - Manage a plugin</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
they may need.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pluginmgr</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></dt>
<dd><p>This command creates a new plugin manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the mamager object,
specifying the applicable plugins and their API.</p></dd>







|







188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
they may need.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">PUBLIC API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">PACKAGE COMMANDS</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pluginmgr</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">option value</i>...?</span></a></dt>
<dd><p>This command creates a new plugin manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">OBJECT COMMAND</a></span>
and <span class="sectref"><a href="#subsection3">OBJECT METHODS</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p>
<p>The options and their values coming after the name of the object are
used to set the initial configuration of the mamager object,
specifying the applicable plugins and their API.</p></dd>
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pluginmgr</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#plugin_management">plugin management</a>, <a href="../../../../index.html#plugin_search">plugin search</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








406
407
408
409
410
411
412






413
414
415
416
417
418
419
420
421
422
423
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pluginmgr</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key180">plugin management</a>, <a href="../../../../index.html#key181">plugin search</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/png/png.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>png - Image manipulation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>png - Image manipulation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'png.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004, Code: Aaron Faupell &amp;lt;afaupell@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2004, Doc:  Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- png.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">png(n) 0.3 tcllib &quot;Image manipulation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>png - PNG querying and manipulation of meta data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc32</b></li>
<li>package require <b class="pkgname">png <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::png::validate</b> <i class="arg">file</i></a></li>
<li><a href="#2"><b class="cmd">::png::isPNG</b> <i class="arg">file</i></a></li>
<li><a href="#3"><b class="cmd">::png::imageInfo</b> <i class="arg">file</i></a></li>
<li><a href="#4"><b class="cmd">::png::getTimestamp</b> <i class="arg">file</i></a></li>
<li><a href="#5"><b class="cmd">::png::setTimestamp</b> <i class="arg">file</i> <i class="arg">time</i></a></li>
<li><a href="#6"><b class="cmd">::png::getComments</b> <i class="arg">file</i></a></li>
<li><a href="#7"><b class="cmd">::png::removeComments</b> <i class="arg">file</i></a></li>
<li><a href="#8"><b class="cmd">::png::addComment</b> <i class="arg">file</i> <i class="arg">keyword</i> <i class="arg">text</i></a></li>
<li><a href="#9"><b class="cmd">::png::addComment</b> <i class="arg">file</i> <i class="arg">keyword</i> <i class="arg">lang</i> <i class="arg">keyword2</i> <i class="arg">text</i></a></li>
<li><a href="#10"><b class="cmd">::png::getPixelDimension</b> <i class="arg">file</i></a></li>
<li><a href="#11"><b class="cmd">::png::image</b> <i class="arg">file</i></a></li>
<li><a href="#12"><b class="cmd">::png::write</b> <i class="arg">file</i> <i class="arg">data</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to query and modify PNG images. PNG
stands for <i class="term">Portable Network Graphics</i> and is specified at
<a href="http://www.libpng.org/pub/png/spec/1.2">http://www.libpng.org/pub/png/spec/1.2</a>.</p>







|

|

|



|
|
|
|
|
|


|




















|











<
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150
151
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'png.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004, Code: Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;   -- Copyright &copy; 2004, Doc:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- png.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">png(n) 0.1.2 tcllib &quot;Image manipulation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>png - PNG querying and manipulation of meta data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">crc32</b></li>
<li>package require <b class="pkgname">png <span class="opt">?0.1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::png::validate</b> <i class="arg">file</i></a></li>
<li><a href="#2"><b class="cmd">::png::isPNG</b> <i class="arg">file</i></a></li>
<li><a href="#3"><b class="cmd">::png::imageInfo</b> <i class="arg">file</i></a></li>
<li><a href="#4"><b class="cmd">::png::getTimestamp</b> <i class="arg">file</i></a></li>
<li><a href="#5"><b class="cmd">::png::setTimestamp</b> <i class="arg">file</i> <i class="arg">time</i></a></li>
<li><a href="#6"><b class="cmd">::png::getComments</b> <i class="arg">file</i></a></li>
<li><a href="#7"><b class="cmd">::png::removeComments</b> <i class="arg">file</i></a></li>
<li><a href="#8"><b class="cmd">::png::addComment</b> <i class="arg">file</i> <i class="arg">keyword</i> <i class="arg">text</i></a></li>
<li><a href="#9"><b class="cmd">::png::addComment</b> <i class="arg">file</i> <i class="arg">keyword</i> <i class="arg">lang</i> <i class="arg">keyword2</i> <i class="arg">text</i></a></li>

<li><a href="#10"><b class="cmd">::png::image</b> <i class="arg">file</i></a></li>
<li><a href="#11"><b class="cmd">::png::write</b> <i class="arg">file</i> <i class="arg">data</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to query and modify PNG images. PNG
stands for <i class="term">Portable Network Graphics</i> and is specified at
<a href="http://www.libpng.org/pub/png/spec/1.2">http://www.libpng.org/pub/png/spec/1.2</a>.</p>
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<dt><a name="9"><b class="cmd">::png::addComment</b> <i class="arg">file</i> <i class="arg">keyword</i> <i class="arg">lang</i> <i class="arg">keyword2</i> <i class="arg">text</i></a></dt>
<dd><p>Adds a unicode (international) comment to the PNG image in <i class="arg">file</i>,
just before the first data chunk. Will throw an error if no data chunk
is found. <i class="arg">keyword</i> has to be less than 80 characters long to
conform to the PNG specification. <i class="arg">keyword2</i> is the translated
<i class="arg">keyword</i>, in the language specified by the language identifier
<i class="arg">lang</i>.</p></dd>
<dt><a name="10"><b class="cmd">::png::getPixelDimension</b> <i class="arg">file</i></a></dt>
<dd><p>Returns a dictionary with keys <b class="const">ppux</b>, <b class="const">ppuy</b> and
<b class="const">unit</b> if the information is present.  Otherwise, it returns the empty
string.</p>
<p>The values of <b class="const">ppux</b> and <b class="const">ppuy</b> return the pixel
per unit value in X or Y direction.</p>
<p>The allowed values for key <b class="const">unit</b> are <b class="const">meter</b> and
<b class="const">unknown</b>. In the case of meter, the dpi value can be calculated
by multiplying with the conversion factor <b class="const">0.0254</b>.</p></dd>
<dt><a name="11"><b class="cmd">::png::image</b> <i class="arg">file</i></a></dt>
<dd><p>Given a PNG file returns the image in the list of scanlines format used by Tk_GetColor.</p></dd>
<dt><a name="12"><b class="cmd">::png::write</b> <i class="arg">file</i> <i class="arg">data</i></a></dt>
<dd><p>Takes a list of scanlines in the Tk_GetColor format and writes the represented image
to <i class="arg">file</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>png</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#comment">comment</a>, <a href="../../../../index.html#image">image</a>, <a href="../../../../index.html#png">png</a>, <a href="../../../../index.html#timestamp">timestamp</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Code: Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;<br>
Copyright &copy; 2004, Doc:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<
<
<
<
|

|











<
<
<
<
<
<


|









225
226
227
228
229
230
231









232
233
234
235
236
237
238
239
240
241
242
243
244
245






246
247
248
249
250
251
252
253
254
255
256
257
<dt><a name="9"><b class="cmd">::png::addComment</b> <i class="arg">file</i> <i class="arg">keyword</i> <i class="arg">lang</i> <i class="arg">keyword2</i> <i class="arg">text</i></a></dt>
<dd><p>Adds a unicode (international) comment to the PNG image in <i class="arg">file</i>,
just before the first data chunk. Will throw an error if no data chunk
is found. <i class="arg">keyword</i> has to be less than 80 characters long to
conform to the PNG specification. <i class="arg">keyword2</i> is the translated
<i class="arg">keyword</i>, in the language specified by the language identifier
<i class="arg">lang</i>.</p></dd>









<dt><a name="10"><b class="cmd">::png::image</b> <i class="arg">file</i></a></dt>
<dd><p>Given a PNG file returns the image in the list of scanlines format used by Tk_GetColor.</p></dd>
<dt><a name="11"><b class="cmd">::png::write</b> <i class="arg">file</i> <i class="arg">data</i></a></dt>
<dd><p>Takes a list of scanlines in the Tk_GetColor format and writes the represented image
to <i class="arg">file</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>png</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key155">comment</a>, <a href="../../../../index.html#key121">image</a>, <a href="../../../../index.html#key704">png</a>, <a href="../../../../index.html#key703">timestamp</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Code: Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;<br>
Copyright &copy; 2004, Doc:  Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pop3/pop3.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>pop3 - Tcl POP3 Client Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>pop3 - Tcl POP3 Client Library</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pop3.man' by tcllib/doctools with format 'html'
   -->
<!-- pop3.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3(n) 1.9 tcllib &quot;Tcl POP3 Client Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3 - Tcl client for POP3 email protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pop3.man' by tcllib/doctools with format 'html'
   -->
<! -- pop3.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3(n) 1.9 tcllib &quot;Tcl POP3 Client Library&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3 - Tcl client for POP3 email protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
It works by opening the standard POP3 socket on the server,
transmitting the username and password, then providing a Tcl API to
access the POP3 protocol commands.  All server errors are returned as
Tcl errors (thrown) which must be caught with the Tcl <b class="cmd">catch</b>
command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>







|
|

|







|
|







150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
It works by opening the standard POP3 socket on the server,
transmitting the username and password, then providing a Tcl API to
access the POP3 protocol commands.  All server errors are returned as
Tcl errors (thrown) which must be caught with the Tcl <b class="cmd">catch</b>
command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<dd><p>The retrieval mode determines how exactly messages are read from the
server.
The allowed values are <b class="const">retr</b>, <b class="const">list</b> and <b class="const">slow</b>.
The default is <b class="const">retr</b>. See <b class="cmd">::pop3::retrieve</b> for more
information.</p></dd>
<dt><b class="option">-socketcmd</b> cmdprefix</dt>
<dd><p>This option allows the user to overide the use of the builtin
<b class="cmd"><a href="../../../../index.html#socket">socket</a></b> command with any API-compatible command. The envisioned
main use is the securing of the new connection via SSL, through the
specification of the command <b class="cmd">tls::socket</b>. This command is
specially recognized as well, changing the default port of the
connection to <b class="const">995</b>.</p></dd>
<dt><b class="option">-stls</b> boolean</dt>
<dd><p>Setting this option tells the package to secure the connection using
SSL or TLS. It performs STARTTLS as described in IETF RFC 2595, it







|







193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<dd><p>The retrieval mode determines how exactly messages are read from the
server.
The allowed values are <b class="const">retr</b>, <b class="const">list</b> and <b class="const">slow</b>.
The default is <b class="const">retr</b>. See <b class="cmd">::pop3::retrieve</b> for more
information.</p></dd>
<dt><b class="option">-socketcmd</b> cmdprefix</dt>
<dd><p>This option allows the user to overide the use of the builtin
<b class="cmd"><a href="../../../../index.html#key352">socket</a></b> command with any API-compatible command. The envisioned
main use is the securing of the new connection via SSL, through the
specification of the command <b class="cmd">tls::socket</b>. This command is
specially recognized as well, changing the default port of the
connection to <b class="const">995</b>.</p></dd>
<dt><b class="option">-stls</b> boolean</dt>
<dd><p>Setting this option tells the package to secure the connection using
SSL or TLS. It performs STARTTLS as described in IETF RFC 2595, it
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
<dt><a name="11"><b class="cmd">::pop3::close</b> <i class="arg">chan</i></a></dt>
<dd><p>Gracefully close the connect after sending a POP3 QUIT command down
the socket.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Secure mail transfer</a></h2>
<p>A pop3 connection can be secured with SSL/TLS by requiring the package
<b class="package"><a href="../../../../index.html#tls">TLS</a></b> and then using either the option <b class="option">-socketcmd</b> or
the option <b class="option">-stls</b> of the command <b class="cmd">pop3::open</b>.
The first method, option <b class="option">-socketcmd</b>, will force the use
of the <b class="cmd">tls::socket</b> command when opening the connection. This is
suitable for POP3 servers which expect SSL connections only. These will
generally be listening on port 995.</p>
<pre class="doctools_example">
	package require tls
	tls::init -cafile /path/to/ca/cert -keyfile ...
	# Create secured pop3 channel
	pop3::open -socketcmd tls::socket \
		$thehost $theuser $thepassword
	...
</pre>
<p>The second method, option <b class="option">-stls</b>, will connect to the standard POP3
port and then perform an STARTTLS handshake. This will only work for POP3
servers which have this capability. The package will confirm that the
server supports STARTTLS and the handshake was performed correctly before
proceeding with authentication.</p>
<pre class="doctools_example">
	package require tls
	tls::init -cafile /path/to/ca/cert -keyfile ...
	# Create secured pop3 channel
	pop3::open -stls 1 \
		$thehost $theuser $thepassword
	...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#email">email</a>, <a href="../../../../index.html#mail">mail</a>, <a href="../../../../index.html#pop">pop</a>, <a href="../../../../index.html#pop3">pop3</a>, <a href="../../../../index.html#rfc_1939">rfc 1939</a>, <a href="../../../../index.html#secure">secure</a>, <a href="../../../../index.html#ssl">ssl</a>, <a href="../../../../index.html#tls">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







|









|












|











<
<
<
<
<
<


|





300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341






342
343
344
345
346
347
348
349
<dt><a name="11"><b class="cmd">::pop3::close</b> <i class="arg">chan</i></a></dt>
<dd><p>Gracefully close the connect after sending a POP3 QUIT command down
the socket.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Secure mail transfer</a></h2>
<p>A pop3 connection can be secured with SSL/TLS by requiring the package
<b class="package"><a href="../../../../index.html#key331">TLS</a></b> and then using either the option <b class="option">-socketcmd</b> or
the option <b class="option">-stls</b> of the command <b class="cmd">pop3::open</b>.
The first method, option <b class="option">-socketcmd</b>, will force the use
of the <b class="cmd">tls::socket</b> command when opening the connection. This is
suitable for POP3 servers which expect SSL connections only. These will
generally be listening on port 995.</p>
<pre class="doctools_example">
	package require tls
	tls::init -cafile /path/to/ca/cert -keyfile ...
	# Create secured pop3 channel
	pop3::open -socketcmd tls::socket \\
		$thehost $theuser $thepassword
	...
</pre>
<p>The second method, option <b class="option">-stls</b>, will connect to the standard POP3
port and then perform an STARTTLS handshake. This will only work for POP3
servers which have this capability. The package will confirm that the
server supports STARTTLS and the handshake was performed correctly before
proceeding with authentication.</p>
<pre class="doctools_example">
	package require tls
	tls::init -cafile /path/to/ca/cert -keyfile ...
	# Create secured pop3 channel
	pop3::open -stls 1 \\
		$thehost $theuser $thepassword
	...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key335">email</a>, <a href="../../../../index.html#key330">mail</a>, <a href="../../../../index.html#key445">pop</a>, <a href="../../../../index.html#key444">pop3</a>, <a href="../../../../index.html#key443">rfc 1939</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pop3d/pop3d.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pop3d - Tcl POP3 Server Package</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pop3d - Tcl POP3 Server Package</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pop3d.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2005 Reinhard Max  &amp;lt;max@suse.de&amp;gt;
   -->
<!-- pop3d.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3d(n) 1.1.0 tcllib &quot;Tcl POP3 Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3d - Tcl POP3 server implementation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pop3d.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;   -- Copyright &copy; 2005 Reinhard Max  &lt;max@suse.de&gt;
   -->
<! -- pop3d.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3d(n) 1.1.0 tcllib &quot;Tcl POP3 Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3d - Tcl POP3 server implementation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
mailbox contents is required. If no such command is specified the
server will claim that all mailboxes are empty. The interface which
has to be provided by the command prefix is described in section
<span class="sectref"><a href="#section4">Mailboxes</a></span>.</p></dd>
<dt><b class="option">-socket</b> <i class="arg">command</i></dt>
<dd><p>Defines a <i class="arg">command</i> prefix to call for opening the listening socket.
This can be used to make the pop3 server listen on a SSL socket
as provided by the <b class="package"><a href="../../../../index.html#tls">tls</a></b> package, see the command <b class="cmd">tls::socket</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Authentication</a></h2>
<p>Here we describe the interface which has to be provided by the
authentication callback so that pop3 servers following the interface
of this module are able to use it.</p>
<dl class="doctools_definitions">







|







245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
mailbox contents is required. If no such command is specified the
server will claim that all mailboxes are empty. The interface which
has to be provided by the command prefix is described in section
<span class="sectref"><a href="#section4">Mailboxes</a></span>.</p></dd>
<dt><b class="option">-socket</b> <i class="arg">command</i></dt>
<dd><p>Defines a <i class="arg">command</i> prefix to call for opening the listening socket.
This can be used to make the pop3 server listen on a SSL socket
as provided by the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package, see the command <b class="cmd">tls::socket</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Authentication</a></h2>
<p>Here we describe the interface which has to be provided by the
authentication callback so that pop3 servers following the interface
of this module are able to use it.</p>
<dl class="doctools_definitions">
272
273
274
275
276
277
278

279
280
281
282
283
284
285
286
<p>Here we describe the interface which has to be provided by the storage
callback so that pop3 servers following the interface of this module
are able to use it. The <i class="arg">mbox</i> argument is the storage reference
as returned by the <b class="method">lookup</b> method of the authentication
command, see section <span class="sectref"><a href="#section3">Authentication</a></span>.</p>
<dl class="doctools_definitions">
<dt><a name="14"><i class="arg">storageCmd</i> <b class="method">dele</b> <i class="arg">mbox</i> <i class="arg">msgList</i></a></dt>

<dd><p>Deletes the messages whose numeric ids are contained in the
<i class="arg">msgList</i> from the mailbox specified via <i class="arg">mbox</i>.</p></dd>
<dt><a name="15"><i class="arg">storageCmd</i> <b class="method">lock</b> <i class="arg">mbox</i></a></dt>
<dd><p>This method locks the specified mailbox for use by a single connection
to the server. This is necessary to prevent havoc if several
connections to the same mailbox are open. The complementary method is
<b class="method">unlock</b>. The command will return true if the lock could be set
successfully or false if not.</p></dd>







>
|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<p>Here we describe the interface which has to be provided by the storage
callback so that pop3 servers following the interface of this module
are able to use it. The <i class="arg">mbox</i> argument is the storage reference
as returned by the <b class="method">lookup</b> method of the authentication
command, see section <span class="sectref"><a href="#section3">Authentication</a></span>.</p>
<dl class="doctools_definitions">
<dt><a name="14"><i class="arg">storageCmd</i> <b class="method">dele</b> <i class="arg">mbox</i> <i class="arg">msgList</i></a></dt>
<dd><p>]
Deletes the messages whose numeric ids are contained in the
<i class="arg">msgList</i> from the mailbox specified via <i class="arg">mbox</i>.</p></dd>
<dt><a name="15"><i class="arg">storageCmd</i> <b class="method">lock</b> <i class="arg">mbox</i></a></dt>
<dd><p>This method locks the specified mailbox for use by a single connection
to the server. This is necessary to prevent havoc if several
connections to the same mailbox are open. The complementary method is
<b class="method">unlock</b>. The command will return true if the lock could be set
successfully or false if not.</p></dd>
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
pop3 connection.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Secure mail transfer</a></h2>
<p>The option <b class="option">-socket</b> (see <span class="sectref"><a href="#section2">Options</a></span>) enables users of
the package to override how the server opens its listening socket.
The envisioned main use is the specification of the <b class="cmd">tls::socket</b>
command, see package <b class="package"><a href="../../../../index.html#tls">tls</a></b>, to secure the communication.</p>
<pre class="doctools_example">
	package require tls
	tls::init \
		...
	pop3d::new S -socket tls::socket
	...
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://www.rfc-editor.org/rfc/rfc1939.txt">RFC 1939</a></p></li>
<li><p><a href="http://www.rfc-editor.org/rfc/rfc2449.txt">RFC 2449</a></p></li>
</ol>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3d</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#network">network</a>, <a href="../../../../index.html#pop3">pop3</a>, <a href="../../../../index.html#protocol">protocol</a>, <a href="../../../../index.html#rfc_1939">rfc 1939</a>, <a href="../../../../index.html#secure">secure</a>, <a href="../../../../index.html#ssl">ssl</a>, <a href="../../../../index.html#tls">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2005 Reinhard Max  &lt;max@suse.de&gt;</p>
</div>
</div></body></html>







|


|


















<
<
<
<
<
<


|









304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332






333
334
335
336
337
338
339
340
341
342
343
344
pop3 connection.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Secure mail transfer</a></h2>
<p>The option <b class="option">-socket</b> (see <span class="sectref"><a href="#section2">Options</a></span>) enables users of
the package to override how the server opens its listening socket.
The envisioned main use is the specification of the <b class="cmd">tls::socket</b>
command, see package <b class="package"><a href="../../../../index.html#key331">tls</a></b>, to secure the communication.</p>
<pre class="doctools_example">
	package require tls
	tls::init \\
		...
	pop3d::new S -socket tls::socket
	...
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">References</a></h2>
<ol class="doctools_enumerated">
<li><p><a href="http://www.rfc-editor.org/rfc/rfc1939.txt">RFC 1939</a></p></li>
<li><p><a href="http://www.rfc-editor.org/rfc/rfc2449.txt">RFC 2449</a></p></li>
</ol>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3d</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key672">network</a>, <a href="../../../../index.html#key444">pop3</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key443">rfc 1939</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2005 Reinhard Max  &lt;max@suse.de&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pop3d/pop3d_dbox.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pop3d::dbox - Tcl POP3 Server Package</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pop3d::dbox - Tcl POP3 Server Package</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pop3d_dbox.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pop3d::dbox.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3d::dbox(n) 1.0.2 tcllib &quot;Tcl POP3 Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3d::dbox - Simple mailbox database for pop3d</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pop3d_dbox.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pop3d::dbox.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3d::dbox(n) 1.0.2 tcllib &quot;Tcl POP3 Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3d::dbox - Simple mailbox database for pop3d</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3d</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#network">network</a>, <a href="../../../../index.html#pop3">pop3</a>, <a href="../../../../index.html#protocol">protocol</a>, <a href="../../../../index.html#rfc_822">rfc 822</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








246
247
248
249
250
251
252






253
254
255
256
257
258
259
260
261
262
263
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3d</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key672">network</a>, <a href="../../../../index.html#key444">pop3</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key333">rfc 822</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pop3d/pop3d_udb.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pop3d::udb - Tcl POP3 Server Package</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pop3d::udb - Tcl POP3 Server Package</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pop3d_udb.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pop3d::udb.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3d::udb(n) 1.0.1 tcllib &quot;Tcl POP3 Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3d::udb - Simple user database for pop3d</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pop3d_udb.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pop3d::udb.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3d::udb(n) 1.0.1 tcllib &quot;Tcl POP3 Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3d::udb - Simple user database for pop3d</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<dt><a name="10"><i class="arg">dbName</i> <b class="method">save</b> <span class="opt">?<i class="arg">file</i>?</span></a></dt>
<dd><p>Saves the contents of the database into the given <i class="arg">file</i>. If the
file is not specified the system will use the path last used in a call
to <i class="arg">dbName</i> <b class="method">read</b>. The generated file can be read by the
<b class="method">read</b> method.</p></dd>
<dt><a name="11"><i class="arg">dbName</i> <b class="method">read</b> <i class="arg">file</i></a></dt>
<dd><p>Reads the specified <i class="arg">file</i> and adds the contained user definitions
to the database. As the file is actually <b class="cmd"><a href="../../../../index.html#source">source</a></b>'d a safe
interpreter is employed to safeguard against malicious code. This
interpreter knows the <b class="cmd">add</b> command for adding users and their
associated data to this database. This command has the same argument
signature as the method <b class="method">add</b>. The path of the <i class="arg">file</i> is
remembered internally so that it can be used in the next call of
<i class="arg">dbName</i> <b class="method">save</b> without an argument.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3d</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#network">network</a>, <a href="../../../../index.html#pop3">pop3</a>, <a href="../../../../index.html#protocol">protocol</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|















<
<
<
<
<
<


|








189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211






212
213
214
215
216
217
218
219
220
221
222
<dt><a name="10"><i class="arg">dbName</i> <b class="method">save</b> <span class="opt">?<i class="arg">file</i>?</span></a></dt>
<dd><p>Saves the contents of the database into the given <i class="arg">file</i>. If the
file is not specified the system will use the path last used in a call
to <i class="arg">dbName</i> <b class="method">read</b>. The generated file can be read by the
<b class="method">read</b> method.</p></dd>
<dt><a name="11"><i class="arg">dbName</i> <b class="method">read</b> <i class="arg">file</i></a></dt>
<dd><p>Reads the specified <i class="arg">file</i> and adds the contained user definitions
to the database. As the file is actually <b class="cmd"><a href="../../../../index.html#key436">source</a></b>'d a safe
interpreter is employed to safeguard against malicious code. This
interpreter knows the <b class="cmd">add</b> command for adding users and their
associated data to this database. This command has the same argument
signature as the method <b class="method">add</b>. The path of the <i class="arg">file</i> is
remembered internally so that it can be used in the next call of
<i class="arg">dbName</i> <b class="method">save</b> without an argument.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3d</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key672">network</a>, <a href="../../../../index.html#key444">pop3</a>, <a href="../../../../index.html#key133">protocol</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/practcl/practcl.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>practcl - The The Proper Rational API for C to Tool Command Language Module</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>practcl - The The Proper Rational API for C to Tool Command Language Module</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490

1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'practcl.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2016-2018 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- practcl.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">practcl(n) 0.16.4 tcllib &quot;The The Proper Rational API for C to Tool Command Language Module&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>practcl - The Practcl Module</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Commands</a></li>
<li class="doctools_section"><a href="#section3">Classes</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Class  practcl::doctool</a></li>
<li class="doctools_subsection"><a href="#subsection2">Class  practcl::metaclass</a></li>
<li class="doctools_subsection"><a href="#subsection3">Class  practcl::toolset</a></li>
<li class="doctools_subsection"><a href="#subsection4">Class  practcl::toolset.gcc</a></li>
<li class="doctools_subsection"><a href="#subsection5">Class  practcl::toolset.msvc</a></li>
<li class="doctools_subsection"><a href="#subsection6">Class  practcl::make_obj</a></li>
<li class="doctools_subsection"><a href="#subsection7">Class  practcl::object</a></li>
<li class="doctools_subsection"><a href="#subsection8">Class  practcl::dynamic</a></li>
<li class="doctools_subsection"><a href="#subsection9">Class  practcl::product</a></li>
<li class="doctools_subsection"><a href="#subsection10">Class  practcl::product.cheader</a></li>
<li class="doctools_subsection"><a href="#subsection11">Class  practcl::product.csource</a></li>
<li class="doctools_subsection"><a href="#subsection12">Class  practcl::product.clibrary</a></li>
<li class="doctools_subsection"><a href="#subsection13">Class  practcl::product.dynamic</a></li>
<li class="doctools_subsection"><a href="#subsection14">Class  practcl::product.critcl</a></li>
<li class="doctools_subsection"><a href="#subsection15">Class  practcl::module</a></li>
<li class="doctools_subsection"><a href="#subsection16">Class  practcl::project</a></li>
<li class="doctools_subsection"><a href="#subsection17">Class  practcl::library</a></li>
<li class="doctools_subsection"><a href="#subsection18">Class  practcl::tclkit</a></li>
<li class="doctools_subsection"><a href="#subsection19">Class  practcl::distribution</a></li>
<li class="doctools_subsection"><a href="#subsection20">Class  practcl::distribution.snapshot</a></li>
<li class="doctools_subsection"><a href="#subsection21">Class  practcl::distribution.fossil</a></li>
<li class="doctools_subsection"><a href="#subsection22">Class  practcl::distribution.git</a></li>
<li class="doctools_subsection"><a href="#subsection23">Class  practcl::subproject</a></li>
<li class="doctools_subsection"><a href="#subsection24">Class  practcl::subproject.source</a></li>
<li class="doctools_subsection"><a href="#subsection25">Class  practcl::subproject.teapot</a></li>
<li class="doctools_subsection"><a href="#subsection26">Class  practcl::subproject.kettle</a></li>
<li class="doctools_subsection"><a href="#subsection27">Class  practcl::subproject.critcl</a></li>
<li class="doctools_subsection"><a href="#subsection28">Class  practcl::subproject.sak</a></li>
<li class="doctools_subsection"><a href="#subsection29">Class  practcl::subproject.practcl</a></li>
<li class="doctools_subsection"><a href="#subsection30">Class  practcl::subproject.binary</a></li>
<li class="doctools_subsection"><a href="#subsection31">Class  practcl::subproject.tea</a></li>
<li class="doctools_subsection"><a href="#subsection32">Class  practcl::subproject.library</a></li>
<li class="doctools_subsection"><a href="#subsection33">Class  practcl::subproject.external</a></li>
<li class="doctools_subsection"><a href="#subsection34">Class  practcl::subproject.core</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">TclOO 1.0</b></li>

</ul>
<ul class="doctools_syntax">
<li><a href="#1">proc <b class="cmd">practcl::cat</b> <i class="arg">fname</i></a></li>
<li><a href="#2">proc <b class="cmd">practcl::docstrip</b> <i class="arg">text</i></a></li>
<li><a href="#3">proc <b class="cmd">putb</b> <span class="opt">?<i class="arg">map</i>?</span> <i class="arg">text</i></a></li>
<li><a href="#4">proc <b class="cmd"><a href="../../../../index.html#proc">Proc</a></b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#5">proc <b class="cmd">noop</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#6">proc <b class="cmd">practcl::debug</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#7">proc <b class="cmd">practcl::doexec</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#8">proc <b class="cmd">practcl::doexec_in</b> <i class="arg">path</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#9">proc <b class="cmd">practcl::dotclexec</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#10">proc <b class="cmd">practcl::domake</b> <i class="arg">path</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#11">proc <b class="cmd">practcl::domake.tcl</b> <i class="arg">path</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#12">proc <b class="cmd">practcl::fossil</b> <i class="arg">path</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#13">proc <b class="cmd">practcl::fossil_status</b> <i class="arg">dir</i></a></li>
<li><a href="#14">proc <b class="cmd">practcl::os</b></a></li>
<li><a href="#15">proc <b class="cmd">practcl::mkzip</b> <i class="arg">exename</i> <i class="arg">barekit</i> <i class="arg">vfspath</i></a></li>
<li><a href="#16">proc <b class="cmd">practcl::sort_dict</b> <i class="arg">list</i></a></li>
<li><a href="#17">proc <b class="cmd">practcl::local_os</b></a></li>
<li><a href="#18">proc <b class="cmd">practcl::config.tcl</b> <i class="arg">path</i></a></li>
<li><a href="#19">proc <b class="cmd">practcl::read_configuration</b> <i class="arg">path</i></a></li>
<li><a href="#20">proc <b class="cmd">practcl::tcllib_require</b> <i class="arg">pkg</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#21">proc <b class="cmd">practcl::platform::tcl_core_options</b> <i class="arg">os</i></a></li>
<li><a href="#22">proc <b class="cmd">practcl::platform::tk_core_options</b> <i class="arg">os</i></a></li>
<li><a href="#23">proc <b class="cmd">practcl::read_rc_file</b> <i class="arg">filename</i> <span class="opt">?<i class="arg">localdat</i> <b class="const"></b>?</span></a></li>
<li><a href="#24">proc <b class="cmd">practcl::read_sh_subst</b> <i class="arg">line</i> <i class="arg">info</i></a></li>
<li><a href="#25">proc <b class="cmd">practcl::read_sh_file</b> <i class="arg">filename</i> <span class="opt">?<i class="arg">localdat</i> <b class="const"></b>?</span></a></li>
<li><a href="#26">proc <b class="cmd">practcl::read_Config.sh</b> <i class="arg">filename</i></a></li>
<li><a href="#27">proc <b class="cmd">practcl::read_Makefile</b> <i class="arg">filename</i></a></li>
<li><a href="#28">proc <b class="cmd">practcl::cputs</b> <i class="arg">varname</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#29">proc <b class="cmd">practcl::tcl_to_c</b> <i class="arg">body</i></a></li>
<li><a href="#30">proc <b class="cmd">practcl::_tagblock</b> <i class="arg">text</i> <span class="opt">?<i class="arg">style</i> <b class="const">tcl</b>?</span> <span class="opt">?<i class="arg">note</i> <b class="const"></b>?</span></a></li>
<li><a href="#31">proc <b class="cmd">practcl::de_shell</b> <i class="arg">data</i></a></li>
<li><a href="#32">proc <b class="cmd">practcl::grep</b> <i class="arg">pattern</i> <span class="opt">?<i class="arg">files</i> <b class="const"></b>?</span></a></li>
<li><a href="#33">proc <b class="cmd">practcl::file_lexnormalize</b> <i class="arg">sp</i></a></li>
<li><a href="#34">proc <b class="cmd">practcl::file_relative</b> <i class="arg">base</i> <i class="arg">dst</i></a></li>
<li><a href="#35">proc <b class="cmd">practcl::findByPattern</b> <i class="arg">basedir</i> <i class="arg">patterns</i></a></li>
<li><a href="#36">proc <b class="cmd">practcl::log</b> <i class="arg">fname</i> <i class="arg">comment</i></a></li>
<li><a href="#37">proc <b class="cmd">practcl::_pkgindex_simpleIndex</b> <i class="arg">path</i></a></li>
<li><a href="#38">proc <b class="cmd">practcl::_pkgindex_directory</b> <i class="arg">path</i></a></li>
<li><a href="#39">proc <b class="cmd">practcl::_pkgindex_path_subdir</b> <i class="arg">path</i></a></li>
<li><a href="#40">proc <b class="cmd">practcl::pkgindex_path</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#41">proc <b class="cmd">practcl::installDir</b> <i class="arg">d1</i> <i class="arg">d2</i></a></li>
<li><a href="#42">proc <b class="cmd">practcl::copyDir</b> <i class="arg">d1</i> <i class="arg">d2</i> <span class="opt">?<i class="arg">toplevel</i> <b class="const">1</b>?</span></a></li>
<li><a href="#43">proc <b class="cmd">practcl::buildModule</b> <i class="arg">modpath</i></a></li>
<li><a href="#44">proc <b class="cmd">practcl::installModule</b> <i class="arg">modpath</i> <i class="arg">DEST</i></a></li>
<li><a href="#45">proc <b class="cmd">practcl::trigger</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#46">proc <b class="cmd">practcl::depends</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#47">proc <b class="cmd">practcl::target</b> <i class="arg">name</i> <i class="arg">info</i> <span class="opt">?<i class="arg">action</i> <b class="const"></b>?</span></a></li>
<li><a href="#48">method <b class="cmd">constructor</b></a></li>
<li><a href="#49">method <b class="cmd">argspec</b> <i class="arg">argspec</i></a></li>
<li><a href="#50">method <b class="cmd"><a href="../../../../index.html#comment">comment</a></b> <i class="arg">block</i></a></li>
<li><a href="#51">method <b class="cmd">keyword.Annotation</b> <i class="arg">resultvar</i> <i class="arg">commentblock</i> <i class="arg">type</i> <i class="arg">name</i> <i class="arg">body</i></a></li>
<li><a href="#52">method <b class="cmd">keyword.Class</b> <i class="arg">resultvar</i> <i class="arg">commentblock</i> <i class="arg">name</i> <i class="arg">body</i></a></li>
<li><a href="#53">method <b class="cmd">keyword.class</b> <i class="arg">resultvar</i> <i class="arg">commentblock</i> <i class="arg">name</i> <i class="arg">body</i></a></li>
<li><a href="#54">method <b class="cmd">keyword.Class_Method</b> <i class="arg">resultvar</i> <i class="arg">commentblock</i> <i class="arg">name</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#55">method <b class="cmd">keyword.method</b> <i class="arg">resultvar</i> <i class="arg">commentblock</i> <i class="arg">name</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#56">method <b class="cmd">keyword.proc</b> <i class="arg">commentblock</i> <i class="arg">name</i> <i class="arg">argspec</i></a></li>
<li><a href="#57">method <b class="cmd">reset</b></a></li>
<li><a href="#58">method <b class="cmd">Main</b></a></li>
<li><a href="#59">method <b class="cmd">section.method</b> <i class="arg">keyword</i> <i class="arg">method</i> <i class="arg">minfo</i></a></li>
<li><a href="#60">method <b class="cmd">section.annotation</b> <i class="arg">type</i> <i class="arg">name</i> <i class="arg">iinfo</i></a></li>
<li><a href="#61">method <b class="cmd">section.class</b> <i class="arg">class_name</i> <i class="arg">class_info</i></a></li>
<li><a href="#62">method <b class="cmd">section.command</b> <i class="arg">procinfo</i></a></li>
<li><a href="#63">method <b class="cmd"><a href="../../../../index.html#manpage">manpage</a></b> <span class="opt">?<b class="option">header <em>value</em></b>?</span> <span class="opt">?<b class="option">footer <em>value</em></b>?</span> <span class="opt">?<b class="option">authors <em>list</em></b>?</span></a></li>
<li><a href="#64">method <b class="cmd">scan_text</b> <i class="arg">text</i></a></li>
<li><a href="#65">method <b class="cmd">scan_file</b> <i class="arg">filename</i></a></li>
<li><a href="#66">method <b class="cmd">_MorphPatterns</b></a></li>
<li><a href="#67">method <b class="cmd"><a href="../../../../index.html#define">define</a></b> <i class="arg">submethod</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#68">method <b class="cmd">graft</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#69">method <b class="cmd">initialize</b></a></li>
<li><a href="#70">method <b class="cmd">link</b> <i class="arg">command</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#71">method <b class="cmd">morph</b> <i class="arg">classname</i></a></li>
<li><a href="#72">method <b class="cmd">script</b> <i class="arg">script</i></a></li>
<li><a href="#73">method <b class="cmd">select</b></a></li>
<li><a href="#74">method <b class="cmd"><a href="../../../../index.html#source">source</a></b> <i class="arg">filename</i></a></li>
<li><a href="#75">classmethod <b class="cmd">select</b> <i class="arg">object</i></a></li>
<li><a href="#76">method <b class="cmd">config.sh</b></a></li>
<li><a href="#77">method <b class="cmd">BuildDir</b> <i class="arg">PWD</i></a></li>
<li><a href="#78">method <b class="cmd">MakeDir</b> <i class="arg">srcdir</i></a></li>
<li><a href="#79">method <b class="cmd">read_configuration</b></a></li>
<li><a href="#80">method <b class="cmd">build-cflags</b> <i class="arg">PROJECT</i> <i class="arg">DEFS</i> <i class="arg">namevar</i> <i class="arg">versionvar</i> <i class="arg">defsvar</i></a></li>
<li><a href="#81">method <b class="cmd">critcl</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#82">method <b class="cmd">Autoconf</b></a></li>
<li><a href="#83">method <b class="cmd">BuildDir</b> <i class="arg">PWD</i></a></li>
<li><a href="#84">method <b class="cmd">ConfigureOpts</b></a></li>
<li><a href="#85">method <b class="cmd">MakeDir</b> <i class="arg">srcdir</i></a></li>
<li><a href="#86">method <b class="cmd">make {} autodetect</b></a></li>
<li><a href="#87">method <b class="cmd">make {} clean</b></a></li>
<li><a href="#88">method <b class="cmd">make {} compile</b></a></li>
<li><a href="#89">method <b class="cmd">make {} install</b> <i class="arg">DEST</i></a></li>
<li><a href="#90">method <b class="cmd">build-compile-sources</b> <i class="arg">PROJECT</i> <i class="arg">COMPILE</i> <i class="arg">CPPCOMPILE</i> <i class="arg">INCLUDES</i></a></li>
<li><a href="#91">method <b class="cmd">build-Makefile</b> <i class="arg">path</i> <i class="arg">PROJECT</i></a></li>
<li><a href="#92">method <b class="cmd">build-library</b> <i class="arg">outfile</i> <i class="arg">PROJECT</i></a></li>
<li><a href="#93">method <b class="cmd">build-tclsh</b> <i class="arg">outfile</i> <i class="arg">PROJECT</i> <span class="opt">?<i class="arg">path</i> <b class="const">auto</b>?</span></a></li>
<li><a href="#94">method <b class="cmd">BuildDir</b> <i class="arg">PWD</i></a></li>
<li><a href="#95">method <b class="cmd">make {} autodetect</b></a></li>
<li><a href="#96">method <b class="cmd">make {} clean</b></a></li>
<li><a href="#97">method <b class="cmd">make {} compile</b></a></li>
<li><a href="#98">method <b class="cmd">make {} install</b> <i class="arg">DEST</i></a></li>
<li><a href="#99">method <b class="cmd">MakeDir</b> <i class="arg">srcdir</i></a></li>
<li><a href="#100">method <b class="cmd">NmakeOpts</b></a></li>
<li><a href="#101">method <b class="cmd">constructor</b> <i class="arg">module_object</i> <i class="arg">name</i> <i class="arg">info</i> <span class="opt">?<i class="arg">action_body</i> <b class="const"></b>?</span></a></li>
<li><a href="#102">method <b class="cmd"><a href="../../../../index.html#do">do</a></b></a></li>
<li><a href="#103">method <b class="cmd">check</b></a></li>
<li><a href="#104">method <b class="cmd">output</b></a></li>
<li><a href="#105">method <b class="cmd">reset</b></a></li>
<li><a href="#106">method <b class="cmd">triggers</b></a></li>
<li><a href="#107">method <b class="cmd">constructor</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#108">method <b class="cmd">child</b> <i class="arg">method</i></a></li>
<li><a href="#109">method <b class="cmd">go</b></a></li>
<li><a href="#110">method <b class="cmd">cstructure</b> <i class="arg">name</i> <i class="arg">definition</i> <span class="opt">?<i class="arg">argdat</i> <b class="const"></b>?</span></a></li>
<li><a href="#111">method <b class="cmd">include</b> <i class="arg">header</i></a></li>
<li><a href="#112">method <b class="cmd">include_dir</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#113">method <b class="cmd">include_directory</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#114">method <b class="cmd">c_header</b> <i class="arg">body</i></a></li>
<li><a href="#115">method <b class="cmd">c_code</b> <i class="arg">body</i></a></li>
<li><a href="#116">method <b class="cmd">c_function</b> <i class="arg">header</i> <i class="arg">body</i> <span class="opt">?<i class="arg">info</i> <b class="const"></b>?</span></a></li>
<li><a href="#117">method <b class="cmd">c_tcloomethod</b> <i class="arg">name</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arginfo</i> <b class="const"></b>?</span></a></li>
<li><a href="#118">method <b class="cmd">cmethod</b> <i class="arg">name</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arginfo</i> <b class="const"></b>?</span></a></li>
<li><a href="#119">method <b class="cmd">c_tclproc_nspace</b> <i class="arg">nspace</i></a></li>
<li><a href="#120">method <b class="cmd">c_tclcmd</b> <i class="arg">name</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arginfo</i> <b class="const"></b>?</span></a></li>
<li><a href="#121">method <b class="cmd">c_tclproc_raw</b> <i class="arg">name</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arginfo</i> <b class="const"></b>?</span></a></li>
<li><a href="#122">method <b class="cmd">tcltype</b> <i class="arg">name</i> <i class="arg">argdat</i></a></li>
<li><a href="#123">method <b class="cmd">project-compile-products</b></a></li>
<li><a href="#124">method <b class="cmd">implement</b> <i class="arg">path</i></a></li>
<li><a href="#125">method <b class="cmd">initialize</b></a></li>
<li><a href="#126">method <b class="cmd">linktype</b></a></li>
<li><a href="#127">method <b class="cmd">generate-cfile-constant</b></a></li>
<li><a href="#128">method <b class="cmd">generate-cfile-header</b></a></li>
<li><a href="#129">method <b class="cmd">generate-cfile-tclapi</b></a></li>
<li><a href="#130">method <b class="cmd">generate-loader-module</b></a></li>
<li><a href="#131">method <b class="cmd">Collate_Source</b> <i class="arg">CWD</i></a></li>
<li><a href="#132">method <b class="cmd">select</b></a></li>
<li><a href="#133">classmethod <b class="cmd">select</b> <i class="arg">object</i></a></li>
<li><a href="#134">method <b class="cmd">code</b> <i class="arg">section</i> <i class="arg">body</i></a></li>
<li><a href="#135">method <b class="cmd">Collate_Source</b> <i class="arg">CWD</i></a></li>
<li><a href="#136">method <b class="cmd">project-compile-products</b></a></li>
<li><a href="#137">method <b class="cmd">generate-debug</b> <span class="opt">?<i class="arg">spaces</i> <b class="const"></b>?</span></a></li>
<li><a href="#138">method <b class="cmd">generate-cfile-constant</b></a></li>
<li><a href="#139">method <b class="cmd">generate-cfile-public-structure</b></a></li>
<li><a href="#140">method <b class="cmd">generate-cfile-header</b></a></li>
<li><a href="#141">method <b class="cmd">generate-cfile-global</b></a></li>
<li><a href="#142">method <b class="cmd">generate-cfile-private-typedef</b></a></li>
<li><a href="#143">method <b class="cmd">generate-cfile-private-structure</b></a></li>
<li><a href="#144">method <b class="cmd">generate-cfile-functions</b></a></li>
<li><a href="#145">method <b class="cmd">generate-cfile-tclapi</b></a></li>
<li><a href="#146">method <b class="cmd">generate-hfile-public-define</b></a></li>
<li><a href="#147">method <b class="cmd">generate-hfile-public-macro</b></a></li>
<li><a href="#148">method <b class="cmd">generate-hfile-public-typedef</b></a></li>
<li><a href="#149">method <b class="cmd">generate-hfile-public-structure</b></a></li>
<li><a href="#150">method <b class="cmd">generate-hfile-public-headers</b></a></li>
<li><a href="#151">method <b class="cmd">generate-hfile-public-function</b></a></li>
<li><a href="#152">method <b class="cmd">generate-hfile-public-includes</b></a></li>
<li><a href="#153">method <b class="cmd">generate-hfile-public-verbatim</b></a></li>
<li><a href="#154">method <b class="cmd">generate-loader-external</b></a></li>
<li><a href="#155">method <b class="cmd">generate-loader-module</b></a></li>
<li><a href="#156">method <b class="cmd">generate-stub-function</b></a></li>
<li><a href="#157">method <b class="cmd">IncludeAdd</b> <i class="arg">headervar</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#158">method <b class="cmd">generate-tcl-loader</b></a></li>
<li><a href="#159">method <b class="cmd">generate-tcl-pre</b></a></li>
<li><a href="#160">method <b class="cmd">generate-tcl-post</b></a></li>
<li><a href="#161">method <b class="cmd">linktype</b></a></li>
<li><a href="#162">method <b class="cmd">Ofile</b> <i class="arg">filename</i></a></li>
<li><a href="#163">method <b class="cmd">project-static-packages</b></a></li>
<li><a href="#164">method <b class="cmd">toolset-include-directory</b></a></li>
<li><a href="#165">method <b class="cmd">target</b> <i class="arg">method</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#166">method <b class="cmd">project-compile-products</b></a></li>
<li><a href="#167">method <b class="cmd">generate-loader-module</b></a></li>
<li><a href="#168">method <b class="cmd">project-compile-products</b></a></li>
<li><a href="#169">method <b class="cmd">linker-products</b> <i class="arg">configdict</i></a></li>
<li><a href="#170">method <b class="cmd">initialize</b></a></li>
<li><a href="#171">variable <b class="cmd">make_object</b></a></li>
<li><a href="#172">method <b class="cmd">_MorphPatterns</b></a></li>
<li><a href="#173">method <b class="cmd">add</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#174">method <b class="cmd">install-headers</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#175">method <b class="cmd">make {} _preamble</b></a></li>
<li><a href="#176">method <b class="cmd">make {} pkginfo</b></a></li>
<li><a href="#177">method <b class="cmd">make {} objects</b></a></li>
<li><a href="#178">method <b class="cmd">make {} object</b> <i class="arg">name</i></a></li>
<li><a href="#179">method <b class="cmd">make {} reset</b></a></li>
<li><a href="#180">method <b class="cmd">make {} trigger</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#181">method <b class="cmd">make {} depends</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#182">method <b class="cmd">make {} filename</b> <i class="arg">name</i></a></li>
<li><a href="#183">method <b class="cmd">make {} target</b> <i class="arg">name</i> <i class="arg">Info</i> <i class="arg">body</i></a></li>
<li><a href="#184">method <b class="cmd">make {} todo</b></a></li>
<li><a href="#185">method <b class="cmd">make {} do</b></a></li>
<li><a href="#186">method <b class="cmd">child</b> <i class="arg">which</i></a></li>
<li><a href="#187">method <b class="cmd">generate-c</b></a></li>
<li><a href="#188">method <b class="cmd">generate-h</b></a></li>
<li><a href="#189">method <b class="cmd">generate-loader</b></a></li>
<li><a href="#190">method <b class="cmd">initialize</b></a></li>
<li><a href="#191">method <b class="cmd">implement</b> <i class="arg">path</i></a></li>
<li><a href="#192">method <b class="cmd">linktype</b></a></li>
<li><a href="#193">method <b class="cmd">_MorphPatterns</b></a></li>
<li><a href="#194">method <b class="cmd">constructor</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#195">method <b class="cmd">add_object</b> <i class="arg">object</i></a></li>
<li><a href="#196">method <b class="cmd">add_project</b> <i class="arg">pkg</i> <i class="arg">info</i> <span class="opt">?<i class="arg">oodefine</i> <b class="const"></b>?</span></a></li>
<li><a href="#197">method <b class="cmd">add_tool</b> <i class="arg">pkg</i> <i class="arg">info</i> <span class="opt">?<i class="arg">oodefine</i> <b class="const"></b>?</span></a></li>
<li><a href="#198">method <b class="cmd">build-tclcore</b></a></li>
<li><a href="#199">method <b class="cmd">child</b> <i class="arg">which</i></a></li>
<li><a href="#200">method <b class="cmd">linktype</b></a></li>
<li><a href="#201">method <b class="cmd">project</b> <i class="arg">pkg</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#202">method <b class="cmd">tclcore</b></a></li>
<li><a href="#203">method <b class="cmd">tkcore</b></a></li>
<li><a href="#204">method <b class="cmd"><a href="../tool/tool.html">tool</a></b> <i class="arg">pkg</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#205">method <b class="cmd">clean</b> <i class="arg">PATH</i></a></li>
<li><a href="#206">method <b class="cmd">project-compile-products</b></a></li>
<li><a href="#207">method <b class="cmd">go</b></a></li>
<li><a href="#208">method <b class="cmd">generate-decls</b> <i class="arg">pkgname</i> <i class="arg">path</i></a></li>
<li><a href="#209">method <b class="cmd">implement</b> <i class="arg">path</i></a></li>
<li><a href="#210">method <b class="cmd">generate-make</b> <i class="arg">path</i></a></li>
<li><a href="#211">method <b class="cmd">linktype</b></a></li>
<li><a href="#212">method <b class="cmd">package-ifneeded</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#213">method <b class="cmd">shared_library</b> <span class="opt">?<i class="arg">filename</i> <b class="const"></b>?</span></a></li>
<li><a href="#214">method <b class="cmd">static_library</b> <span class="opt">?<i class="arg">filename</i> <b class="const"></b>?</span></a></li>
<li><a href="#215">method <b class="cmd">build-tclkit_main</b> <i class="arg">PROJECT</i> <i class="arg">PKG_OBJS</i></a></li>
<li><a href="#216">method <b class="cmd">Collate_Source</b> <i class="arg">CWD</i></a></li>
<li><a href="#217">method <b class="cmd">wrap</b> <i class="arg">PWD</i> <i class="arg">exename</i> <i class="arg">vfspath</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#218">classmethod <b class="cmd">Sandbox</b> <i class="arg">object</i></a></li>
<li><a href="#219">classmethod <b class="cmd">select</b> <i class="arg">object</i></a></li>
<li><a href="#220">classmethod <b class="cmd">claim_option</b></a></li>
<li><a href="#221">classmethod <b class="cmd">claim_object</b> <i class="arg">object</i></a></li>
<li><a href="#222">classmethod <b class="cmd">claim_path</b> <i class="arg">path</i></a></li>
<li><a href="#223">method <b class="cmd">scm_info</b></a></li>
<li><a href="#224">method <b class="cmd">DistroMixIn</b></a></li>
<li><a href="#225">method <b class="cmd">Sandbox</b></a></li>
<li><a href="#226">method <b class="cmd">SrcDir</b></a></li>
<li><a href="#227">method <b class="cmd">ScmTag</b></a></li>
<li><a href="#228">method <b class="cmd">ScmClone</b></a></li>
<li><a href="#229">method <b class="cmd">ScmUnpack</b></a></li>
<li><a href="#230">method <b class="cmd">ScmUpdate</b></a></li>
<li><a href="#231">method <b class="cmd">Unpack</b></a></li>
<li><a href="#232">classmethod <b class="cmd">claim_object</b> <i class="arg">object</i></a></li>
<li><a href="#233">classmethod <b class="cmd">claim_option</b></a></li>
<li><a href="#234">classmethod <b class="cmd">claim_path</b> <i class="arg">path</i></a></li>
<li><a href="#235">method <b class="cmd">ScmUnpack</b></a></li>
<li><a href="#236">classmethod <b class="cmd">claim_object</b> <i class="arg">obj</i></a></li>
<li><a href="#237">classmethod <b class="cmd">claim_option</b></a></li>
<li><a href="#238">classmethod <b class="cmd">claim_path</b> <i class="arg">path</i></a></li>
<li><a href="#239">method <b class="cmd">scm_info</b></a></li>
<li><a href="#240">method <b class="cmd">ScmClone</b></a></li>
<li><a href="#241">method <b class="cmd">ScmTag</b></a></li>
<li><a href="#242">method <b class="cmd">ScmUnpack</b></a></li>
<li><a href="#243">method <b class="cmd">ScmUpdate</b></a></li>
<li><a href="#244">classmethod <b class="cmd">claim_object</b> <i class="arg">obj</i></a></li>
<li><a href="#245">classmethod <b class="cmd">claim_option</b></a></li>
<li><a href="#246">classmethod <b class="cmd">claim_path</b> <i class="arg">path</i></a></li>
<li><a href="#247">method <b class="cmd">ScmTag</b></a></li>
<li><a href="#248">method <b class="cmd">ScmUnpack</b></a></li>
<li><a href="#249">method <b class="cmd">ScmUpdate</b></a></li>
<li><a href="#250">method <b class="cmd">_MorphPatterns</b></a></li>
<li><a href="#251">method <b class="cmd">BuildDir</b> <i class="arg">PWD</i></a></li>
<li><a href="#252">method <b class="cmd">child</b> <i class="arg">which</i></a></li>
<li><a href="#253">method <b class="cmd">compile</b></a></li>
<li><a href="#254">method <b class="cmd">go</b></a></li>
<li><a href="#255">method <b class="cmd">install</b> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#256">method <b class="cmd">linktype</b></a></li>
<li><a href="#257">method <b class="cmd">linker-products</b> <i class="arg">configdict</i></a></li>
<li><a href="#258">method <b class="cmd">linker-external</b> <i class="arg">configdict</i></a></li>
<li><a href="#259">method <b class="cmd">linker-extra</b> <i class="arg">configdict</i></a></li>
<li><a href="#260">method <b class="cmd">env-bootstrap</b></a></li>
<li><a href="#261">method <b class="cmd">env-exec</b></a></li>
<li><a href="#262">method <b class="cmd">env-install</b></a></li>
<li><a href="#263">method <b class="cmd">env-load</b></a></li>
<li><a href="#264">method <b class="cmd">env-present</b></a></li>
<li><a href="#265">method <b class="cmd">sources</b></a></li>
<li><a href="#266">method <b class="cmd"><a href="../../../../index.html#update">update</a></b></a></li>
<li><a href="#267">method <b class="cmd">unpack</b></a></li>
<li><a href="#268">method <b class="cmd">env-bootstrap</b></a></li>
<li><a href="#269">method <b class="cmd">env-present</b></a></li>
<li><a href="#270">method <b class="cmd">linktype</b></a></li>
<li><a href="#271">method <b class="cmd">env-bootstrap</b></a></li>
<li><a href="#272">method <b class="cmd">env-install</b></a></li>
<li><a href="#273">method <b class="cmd">env-present</b></a></li>
<li><a href="#274">method <b class="cmd">install</b> <i class="arg">DEST</i></a></li>
<li><a href="#275">method <b class="cmd">kettle</b> <i class="arg">path</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#276">method <b class="cmd">install</b> <i class="arg">DEST</i></a></li>
<li><a href="#277">method <b class="cmd">install</b> <i class="arg">DEST</i></a></li>
<li><a href="#278">method <b class="cmd">env-bootstrap</b></a></li>
<li><a href="#279">method <b class="cmd">env-install</b></a></li>
<li><a href="#280">method <b class="cmd">env-present</b></a></li>
<li><a href="#281">method <b class="cmd">install</b> <i class="arg">DEST</i></a></li>
<li><a href="#282">method <b class="cmd">install-module</b> <i class="arg">DEST</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#283">method <b class="cmd">env-bootstrap</b></a></li>
<li><a href="#284">method <b class="cmd">env-install</b></a></li>
<li><a href="#285">method <b class="cmd">install</b> <i class="arg">DEST</i></a></li>
<li><a href="#286">method <b class="cmd">install-module</b> <i class="arg">DEST</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#287">method <b class="cmd">clean</b></a></li>
<li><a href="#288">method <b class="cmd">env-install</b></a></li>
<li><a href="#289">method <b class="cmd">project-compile-products</b></a></li>
<li><a href="#290">method <b class="cmd">ComputeInstall</b></a></li>
<li><a href="#291">method <b class="cmd">go</b></a></li>
<li><a href="#292">method <b class="cmd">linker-products</b> <i class="arg">configdict</i></a></li>
<li><a href="#293">method <b class="cmd">project-static-packages</b></a></li>
<li><a href="#294">method <b class="cmd">BuildDir</b> <i class="arg">PWD</i></a></li>
<li><a href="#295">method <b class="cmd">compile</b></a></li>
<li><a href="#296">method <b class="cmd">Configure</b></a></li>
<li><a href="#297">method <b class="cmd">install</b> <i class="arg">DEST</i></a></li>
<li><a href="#298">method <b class="cmd">install</b> <i class="arg">DEST</i></a></li>
<li><a href="#299">method <b class="cmd">install</b> <i class="arg">DEST</i></a></li>
<li><a href="#300">method <b class="cmd">env-bootstrap</b></a></li>
<li><a href="#301">method <b class="cmd">env-present</b></a></li>
<li><a href="#302">method <b class="cmd">env-install</b></a></li>
<li><a href="#303">method <b class="cmd">go</b></a></li>
<li><a href="#304">method <b class="cmd">linktype</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The Practcl module is a tool for integrating large modules for C API
Tcl code that requires custom Tcl types and TclOO objects.</p>
<p>The concept with Practcl is that is a single file package that can
assist any tcl based project with distribution, compilation, linking,
VFS preparation, executable assembly, and installation. Practcl also
allows one project to invoke the build system from another project,
allowing complex projects such as a statically linked basekit to be
assembled with relative ease.</p>
<p>Practcl ships as a single file, and aside from a Tcl 8.6 interpreter,
has no external dependencies.</p>
<p>Making a practcl project</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Commands</a></h2>
<dl class="doctools_definitions">
<dt><a name="1">proc <b class="cmd">practcl::cat</b> <i class="arg">fname</i></a></dt>
<dd><p>Concatenate a file</p></dd>
<dt><a name="2">proc <b class="cmd">practcl::docstrip</b> <i class="arg">text</i></a></dt>
<dd><p>Strip the global comments from tcl code. Used to
 prevent the documentation markup comments from clogging
 up files intended for distribution in machine readable format.</p></dd>
<dt><a name="3">proc <b class="cmd">putb</b> <span class="opt">?<i class="arg">map</i>?</span> <i class="arg">text</i></a></dt>
<dd><p>Append a line of text to a variable. Optionally apply a string mapping.</p></dd>
<dt><a name="4">proc <b class="cmd"><a href="../../../../index.html#proc">Proc</a></b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Generate a proc if no command already exists by that name</p></dd>
<dt><a name="5">proc <b class="cmd">noop</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>A command to do nothing. A handy way of
 negating an instruction without
 having to comment it completely out.
 It's also a handy attachment point for
 an object to be named later</p></dd>
<dt><a name="6">proc <b class="cmd">practcl::debug</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="7">proc <b class="cmd">practcl::doexec</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Drop in a static copy of Tcl</p></dd>
<dt><a name="8">proc <b class="cmd">practcl::doexec_in</b> <i class="arg">path</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="9">proc <b class="cmd">practcl::dotclexec</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="10">proc <b class="cmd">practcl::domake</b> <i class="arg">path</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="11">proc <b class="cmd">practcl::domake.tcl</b> <i class="arg">path</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="12">proc <b class="cmd">practcl::fossil</b> <i class="arg">path</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="13">proc <b class="cmd">practcl::fossil_status</b> <i class="arg">dir</i></a></dt>
<dd></dd>
<dt><a name="14">proc <b class="cmd">practcl::os</b></a></dt>
<dd></dd>
<dt><a name="15">proc <b class="cmd">practcl::mkzip</b> <i class="arg">exename</i> <i class="arg">barekit</i> <i class="arg">vfspath</i></a></dt>
<dd><p>Build a zipfile. On tcl8.6 this invokes the native Zip implementation
 on older interpreters this invokes zip via exec</p></dd>
<dt><a name="16">proc <b class="cmd">practcl::sort_dict</b> <i class="arg">list</i></a></dt>
<dd><p>Dictionary sort a key/value list. Needed because pre tcl8.6
 does not have <em>lsort -stride 2</em></p></dd>
<dt><a name="17">proc <b class="cmd">practcl::local_os</b></a></dt>
<dd><p>Returns a dictionary describing the local operating system.
 Fields return include:</p>
<ul class="doctools_itemized">
 
<li><p>download - Filesystem path where fossil repositories and source tarballs are downloaded for the current user</p></li>
<li><p>EXEEXT - The extension to give to executables. (i.e. .exe on windows)</p></li>
<li><p>fossil_mirror - A URI for a local network web server who acts as a fossil repository mirror</p></li>
<li><p>local_install - Filesystem path where packages for local consumption by the current user are installed</p></li>
<li><p>prefix - The prefix as given to the Tcl core/TEA for installation to local_install in ./configure</p></li>
<li><p>sandbox - The file location where this project unpacks external projects</p></li>
<li><p>TEACUP_PROFILE - The ActiveState/Teacup canonical name for this platform (i.e. win32-ix86 macosx10.5-i386-x86_84)</p></li>
<li><p>TEACUP_OS - The local operating system (windows, macosx, openbsd, etc). Gives the same answer as tcl.m4, except that macosx is given as macosx instead of Darwin.</p></li>
<li><p>TEA_PLATFORM - The platform returned by uname -s-uname -r (on Unix), or &quot;windows&quot; on Windows</p></li>
<li><p>TEACUP_ARCH - The processor architecture for the local os (i.e. ix86, x86_64)</p></li>
<li><p>TEACUP_ARCH - The processor architecture for the local os (i.e. ix86, x86_64)</p></li>
<li><p>teapot - Filesystem path where teapot package files are downloaded for the current user</p></li>
<li><p>userhome - File path to store localized preferences, cache download files, etc for the current user</p></li>
</ul>
<p>This command uses a combination of local checks with Exec, any tclConfig.sh file that is
 resident, autoconf data where already computed, and data gleaned from a file named
 practcl.rc in userhome. The location for userhome varies by platform and operating system:</p>
<ul class="doctools_itemized">
 
<li><p>Windows: ::env(LOCALAPPDATA)/Tcl</p></li>
<li><p>Macos: ~/Library/Application Support/Tcl</p></li>
<li><p>Other: ~/tcl</p></li>
</ul></dd>
<dt><a name="18">proc <b class="cmd">practcl::config.tcl</b> <i class="arg">path</i></a></dt>
<dd><p>A transparent call to ::practcl::read_configuration to preserve backward compadibility
 with older copies of Practcl</p></dd>
<dt><a name="19">proc <b class="cmd">practcl::read_configuration</b> <i class="arg">path</i></a></dt>
<dd><p>Detect local platform. This command looks for data gleaned by autoconf or autosetup
 in the path specified, or perform its own logic tests if neither has been run.
 A file named config.site present in the location indicates that this project is
 cross compiling, and the data stored in that file is used for the compiler and linker.</p>
<p>This command looks for information from the following files, in the following order:</p>
<ul class="doctools_itemized">
 
<li><p>config.tcl - A file generated by autoconf/configure in newer editions of TEA, encoded as a Tcl script.</p></li>
<li><p>config.site - A file containing cross compiler information, encoded as a SH script</p></li>
<li><p>::env(VisualStudioVersion) - On Windows, and environmental value that indicates MS Visual Studio is installed</p></li>
</ul>
<p>This command returns a dictionary containing all of the data cleaned from the sources above.
 In the absence of any guidance this command returns the same output as ::practcl::local_os.
 In this mode, if the environmental variable VisualStudioVersion exists, this command
 will provide a template of fields that are appropriate for compiling on Windows under
 Microsoft Visual Studio. The USEMSVC flag in the dictionary is a boolean flag to indicate
 if this is indeed the case.</p></dd>
<dt><a name="20">proc <b class="cmd">practcl::tcllib_require</b> <i class="arg">pkg</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Try to load  a package, and failing that
 retrieve tcllib</p></dd>
<dt><a name="21">proc <b class="cmd">practcl::platform::tcl_core_options</b> <i class="arg">os</i></a></dt>
<dd><p>Return the string to pass to ./configure to compile the Tcl core for the given OS.</p>
<ul class="doctools_itemized">
 
<li><p>windows: --with-tzdata --with-encoding utf-8</p></li>
<li><p>macosx: --enable-corefoundation=yes  --enable-framework=no --with-tzdata --with-encoding utf-8</p></li>
<li><p>other: --with-tzdata --with-encoding utf-8</p></li>
</ul></dd>
<dt><a name="22">proc <b class="cmd">practcl::platform::tk_core_options</b> <i class="arg">os</i></a></dt>
<dd></dd>
<dt><a name="23">proc <b class="cmd">practcl::read_rc_file</b> <i class="arg">filename</i> <span class="opt">?<i class="arg">localdat</i> <b class="const"></b>?</span></a></dt>
<dd><p>Read a stylized key/value list stored in a file</p></dd>
<dt><a name="24">proc <b class="cmd">practcl::read_sh_subst</b> <i class="arg">line</i> <i class="arg">info</i></a></dt>
<dd><p>Converts a XXX.sh file into a series of Tcl variables</p></dd>
<dt><a name="25">proc <b class="cmd">practcl::read_sh_file</b> <i class="arg">filename</i> <span class="opt">?<i class="arg">localdat</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="26">proc <b class="cmd">practcl::read_Config.sh</b> <i class="arg">filename</i></a></dt>
<dd><p>A simpler form of read_sh_file tailored
 to pulling data from (tcl|tk)Config.sh</p></dd>
<dt><a name="27">proc <b class="cmd">practcl::read_Makefile</b> <i class="arg">filename</i></a></dt>
<dd><p>A simpler form of read_sh_file tailored
 to pulling data from a Makefile</p></dd>
<dt><a name="28">proc <b class="cmd">practcl::cputs</b> <i class="arg">varname</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Append arguments to a buffer
 The command works like puts in that each call will also insert
 a line feed. Unlike puts, blank links in the interstitial are
 suppressed</p></dd>
<dt><a name="29">proc <b class="cmd">practcl::tcl_to_c</b> <i class="arg">body</i></a></dt>
<dd></dd>
<dt><a name="30">proc <b class="cmd">practcl::_tagblock</b> <i class="arg">text</i> <span class="opt">?<i class="arg">style</i> <b class="const">tcl</b>?</span> <span class="opt">?<i class="arg">note</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="31">proc <b class="cmd">practcl::de_shell</b> <i class="arg">data</i></a></dt>
<dd></dd>
<dt><a name="32">proc <b class="cmd">practcl::grep</b> <i class="arg">pattern</i> <span class="opt">?<i class="arg">files</i> <b class="const"></b>?</span></a></dt>
<dd><p>Search for the pattern <em>pattern</em> amongst $files</p></dd>
<dt><a name="33">proc <b class="cmd">practcl::file_lexnormalize</b> <i class="arg">sp</i></a></dt>
<dd></dd>
<dt><a name="34">proc <b class="cmd">practcl::file_relative</b> <i class="arg">base</i> <i class="arg">dst</i></a></dt>
<dd><p>Calculate a relative path between base and dst</p>
<p>Example:</p>
<pre class="doctools_example">  ::practcl::file_relative ~/build/tcl/unix ~/build/tcl/library
  &gt; ../library
</pre>
</dd>
<dt><a name="35">proc <b class="cmd">practcl::findByPattern</b> <i class="arg">basedir</i> <i class="arg">patterns</i></a></dt>
<dd></dd>
<dt><a name="36">proc <b class="cmd">practcl::log</b> <i class="arg">fname</i> <i class="arg">comment</i></a></dt>
<dd><p>Record an event in the practcl log</p></dd>
<dt><a name="37">proc <b class="cmd">practcl::_pkgindex_simpleIndex</b> <i class="arg">path</i></a></dt>
<dd></dd>
<dt><a name="38">proc <b class="cmd">practcl::_pkgindex_directory</b> <i class="arg">path</i></a></dt>
<dd><p>Return true if the pkgindex file contains
 any statement other than &quot;package ifneeded&quot;
 and/or if any package ifneeded loads a DLL</p></dd>
<dt><a name="39">proc <b class="cmd">practcl::_pkgindex_path_subdir</b> <i class="arg">path</i></a></dt>
<dd><p>Helper function for ::practcl::pkgindex_path</p></dd>
<dt><a name="40">proc <b class="cmd">practcl::pkgindex_path</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Index all paths given as though they will end up in the same
 virtual file system</p></dd>
<dt><a name="41">proc <b class="cmd">practcl::installDir</b> <i class="arg">d1</i> <i class="arg">d2</i></a></dt>
<dd><p>Delete the contents of <em>d2</em>, and then
 recusively Ccopy the contents of <em>d1</em> to <em>d2</em>.</p></dd>
<dt><a name="42">proc <b class="cmd">practcl::copyDir</b> <i class="arg">d1</i> <i class="arg">d2</i> <span class="opt">?<i class="arg">toplevel</i> <b class="const">1</b>?</span></a></dt>
<dd><p>Recursively copy the contents of <em>d1</em> to <em>d2</em></p></dd>
<dt><a name="43">proc <b class="cmd">practcl::buildModule</b> <i class="arg">modpath</i></a></dt>
<dd></dd>
<dt><a name="44">proc <b class="cmd">practcl::installModule</b> <i class="arg">modpath</i> <i class="arg">DEST</i></a></dt>
<dd><p>Install a module from MODPATH to the directory specified.
 <em>dpath</em> is assumed to be the fully qualified path where module is to be placed.
 Any existing files will be deleted at that path.
 If the path is symlink the process will return with no error and no action.
 If the module has contents in the build/ directory that are newer than the
 .tcl files in the module source directory, and a build/build.tcl file exists,
 the build/build.tcl file is run.
 If the source directory includes a file named index.tcl, the directory is assumed
 to be in the tao style of modules, and the entire directory (and all subdirectories)
 are copied verbatim.
 If no index.tcl file is present, all .tcl files are copied from the module source
 directory, and a pkgIndex.tcl file is generated if non yet exists.
 I a folder named htdocs exists in the source directory, that directory is copied
 verbatim to the destination.</p></dd>
<dt><a name="45">proc <b class="cmd">practcl::trigger</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Trigger build targets, and recompute dependencies</p>
<p>Internals:</p>
<pre class="doctools_example">
  ::practcl::LOCAL make trigger {*}$args
  foreach {name obj} [::practcl::LOCAL make objects] {
    set ::make($name) [$obj do]
  }
</pre>
</dd>
<dt><a name="46">proc <b class="cmd">practcl::depends</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Calculate if a dependency for any of the arguments needs to
 be fulfilled or rebuilt.</p>
<p>Internals:</p>
<pre class="doctools_example">
  ::practcl::LOCAL make depends {*}$args
</pre>
</dd>
<dt><a name="47">proc <b class="cmd">practcl::target</b> <i class="arg">name</i> <i class="arg">info</i> <span class="opt">?<i class="arg">action</i> <b class="const"></b>?</span></a></dt>
<dd><p>Declare a build product. This proc is just a shorthand for
 <em>::practcl::LOCAL make task $name $info $action</em></p>
<p>Registering a build product with this command will create
 an entry in the global  array, and populate
 a value in the global  array.</p>
<p>Internals:</p>
<pre class="doctools_example">
  set obj [::practcl::LOCAL make task $name $info $action]
  set ::make($name) 0
  set filename [$obj define get filename]
  if {$filename ne {}} {
    set ::target($name) $filename
  }
</pre>
</dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Classes</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Class  practcl::doctool</a></h3>
<pre class="doctools_example">{ set authors {
   {John Doe} {jdoe@illustrious.edu}
   {Tom RichardHarry} {tomdickharry@illustrius.edu}
 }
 # Create the object
 ::practcl::doctool create AutoDoc
 set fout [open [file join $moddir module.tcl] w]
 foreach file [glob [file join $srcdir *.tcl]] {
   set content [::practcl::cat [file join $srcdir $file]]
    # Scan the file
    AutoDoc scan_text $content
    # Strip the comments from the distribution
    puts $fout [::practcl::docstrip $content]
 }
 # Write out the manual page
 set manout [open [file join $moddir module.man] w]
 dict set args header [string map $modmap [::practcl::cat [file join $srcdir manual.txt]]]
 dict set args footer [string map $modmap [::practcl::cat [file join $srcdir footer.txt]]]
 dict set args authors $authors
 puts $manout [AutoDoc manpage {*}$args]
 close $manout
}</pre>
<p>Tool for build scripts to dynamically generate manual files from comments
 in source code files</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="48">method <b class="cmd">constructor</b></a></dt>
<dd></dd>
<dt><a name="49">method <b class="cmd">argspec</b> <i class="arg">argspec</i></a></dt>
<dd><p>Process an argument list into an informational dict.
 This method also understands non-positional
 arguments expressed in the notation of Tip 471
 <a href="https://core.tcl-lang.org/tips/doc/trunk/tip/479.md">https://core.tcl-lang.org/tips/doc/trunk/tip/479.md</a>.</p>
<p>The output will be a dictionary of all of the fields and whether the fields
 are <b class="const">positional</b>, <b class="const">mandatory</b>, and whether they have a
 <b class="const">default</b> value.</p>
<p>Example:</p>
<pre class="doctools_example">   my argspec {a b {c 10}}
   &gt; a {positional 1 mandatory 1} b {positional 1 mandatory 1} c {positional 1 mandatory 0 default 10}
</pre>
</dd>
<dt><a name="50">method <b class="cmd"><a href="../../../../index.html#comment">comment</a></b> <i class="arg">block</i></a></dt>
<dd><p>Convert a block of comments into an informational dictionary.
 If lines in the comment start with a single word ending in a colon,
 all subsequent lines are appended to a dictionary field of that name.
 If no fields are given, all of the text is appended to the <b class="const">description</b>
 field.</p>
<p>Example:</p>
<pre class="doctools_example"> my comment {Does something cool}
 &gt; description {Does something cool}
 my comment {
 title : Something really cool
 author : Sean Woods
 author : John Doe
 description :
 This does something really cool!
 }
 &gt; description {This does something really cool!}
   title {Something really cool}
   author {Sean Woods
   John Doe}
</pre>
</dd>
<dt><a name="51">method <b class="cmd">keyword.Annotation</b> <i class="arg">resultvar</i> <i class="arg">commentblock</i> <i class="arg">type</i> <i class="arg">name</i> <i class="arg">body</i></a></dt>
<dd></dd>
<dt><a name="52">method <b class="cmd">keyword.Class</b> <i class="arg">resultvar</i> <i class="arg">commentblock</i> <i class="arg">name</i> <i class="arg">body</i></a></dt>
<dd><p>Process an oo::objdefine call that modifies the class object
 itself</p></dd>
<dt><a name="53">method <b class="cmd">keyword.class</b> <i class="arg">resultvar</i> <i class="arg">commentblock</i> <i class="arg">name</i> <i class="arg">body</i></a></dt>
<dd><p>Process an oo::define, clay::define, etc statement.</p></dd>
<dt><a name="54">method <b class="cmd">keyword.Class_Method</b> <i class="arg">resultvar</i> <i class="arg">commentblock</i> <i class="arg">name</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Process a statement for a clay style class method</p></dd>
<dt><a name="55">method <b class="cmd">keyword.method</b> <i class="arg">resultvar</i> <i class="arg">commentblock</i> <i class="arg">name</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Process a statement for a tcloo style object method</p></dd>
<dt><a name="56">method <b class="cmd">keyword.proc</b> <i class="arg">commentblock</i> <i class="arg">name</i> <i class="arg">argspec</i></a></dt>
<dd><p>Process a proc statement</p></dd>
<dt><a name="57">method <b class="cmd">reset</b></a></dt>
<dd><p>Reset the state of the object and its embedded coroutine</p></dd>
<dt><a name="58">method <b class="cmd">Main</b></a></dt>
<dd><p>Main body of the embedded coroutine for the object</p></dd>
<dt><a name="59">method <b class="cmd">section.method</b> <i class="arg">keyword</i> <i class="arg">method</i> <i class="arg">minfo</i></a></dt>
<dd><p>Generate the manual page text for a method or proc</p></dd>
<dt><a name="60">method <b class="cmd">section.annotation</b> <i class="arg">type</i> <i class="arg">name</i> <i class="arg">iinfo</i></a></dt>
<dd></dd>
<dt><a name="61">method <b class="cmd">section.class</b> <i class="arg">class_name</i> <i class="arg">class_info</i></a></dt>
<dd><p>Generate the manual page text for a class</p></dd>
<dt><a name="62">method <b class="cmd">section.command</b> <i class="arg">procinfo</i></a></dt>
<dd><p>Generate the manual page text for the commands section</p></dd>
<dt><a name="63">method <b class="cmd"><a href="../../../../index.html#manpage">manpage</a></b> <span class="opt">?<b class="option">header <em>value</em></b>?</span> <span class="opt">?<b class="option">footer <em>value</em></b>?</span> <span class="opt">?<b class="option">authors <em>list</em></b>?</span></a></dt>
<dd><p>Generate the manual page. Returns the completed text suitable for saving in .man file.
 The header argument is a block of doctools text to go in before the machine generated
 section. footer is a block of doctools text to go in after the machine generated
 section. authors is a list of individual authors and emails in the form of AUTHOR EMAIL ?AUTHOR EMAIL?...</p></dd>
<dt><a name="64">method <b class="cmd">scan_text</b> <i class="arg">text</i></a></dt>
<dd><p>Scan a block of text</p></dd>
<dt><a name="65">method <b class="cmd">scan_file</b> <i class="arg">filename</i></a></dt>
<dd><p>Scan a file of text</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Class  practcl::metaclass</a></h3>
<p>The metaclass for all practcl objects</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="66">method <b class="cmd">_MorphPatterns</b></a></dt>
<dd></dd>
<dt><a name="67">method <b class="cmd"><a href="../../../../index.html#define">define</a></b> <i class="arg">submethod</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="68">method <b class="cmd">graft</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="69">method <b class="cmd">initialize</b></a></dt>
<dd></dd>
<dt><a name="70">method <b class="cmd">link</b> <i class="arg">command</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="71">method <b class="cmd">morph</b> <i class="arg">classname</i></a></dt>
<dd></dd>
<dt><a name="72">method <b class="cmd">script</b> <i class="arg">script</i></a></dt>
<dd></dd>
<dt><a name="73">method <b class="cmd">select</b></a></dt>
<dd></dd>
<dt><a name="74">method <b class="cmd"><a href="../../../../index.html#source">source</a></b> <i class="arg">filename</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Class  practcl::toolset</a></h3>
<p>Ancestor-less class intended to be a mixin
 which defines a family of build related behaviors
 that are modified when targetting either gcc or msvc</p>
<p><b class="class">Class Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="75">classmethod <b class="cmd">select</b> <i class="arg">object</i></a></dt>
<dd><p>Perform the selection for the toolset mixin</p></dd>
</dl>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="76">method <b class="cmd">config.sh</b></a></dt>
<dd><p>find or fake a key/value list describing this project</p></dd>
<dt><a name="77">method <b class="cmd">BuildDir</b> <i class="arg">PWD</i></a></dt>
<dd><p>Compute the location where the product will be built</p></dd>
<dt><a name="78">method <b class="cmd">MakeDir</b> <i class="arg">srcdir</i></a></dt>
<dd><p>Return where the Makefile is located relative to <em>srcdir</em>.
 For this implementation the MakeDir is always srcdir.</p></dd>
<dt><a name="79">method <b class="cmd">read_configuration</b></a></dt>
<dd><p>Read information about the build process for this package.
 For this implementation, data is sought in the following locations
 in the following order:
 config.tcl (generated by practcl.) PKGConfig.sh. The Makefile</p>
<p>If the Makefile needs to be consulted, but does not exist, the
 Configure method is invoked</p></dd>
<dt><a name="80">method <b class="cmd">build-cflags</b> <i class="arg">PROJECT</i> <i class="arg">DEFS</i> <i class="arg">namevar</i> <i class="arg">versionvar</i> <i class="arg">defsvar</i></a></dt>
<dd><p>method DEFS
 This method populates 4 variables:
 name - The name of the package
 version - The version of the package
 defs - C flags passed to the compiler
 includedir - A list of paths to feed to the compiler for finding headers</p></dd>
<dt><a name="81">method <b class="cmd">critcl</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Invoke critcl in an external process</p></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Class  practcl::toolset.gcc</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::toolset</b></p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="82">method <b class="cmd">Autoconf</b></a></dt>
<dd></dd>
<dt><a name="83">method <b class="cmd">BuildDir</b> <i class="arg">PWD</i></a></dt>
<dd></dd>
<dt><a name="84">method <b class="cmd">ConfigureOpts</b></a></dt>
<dd></dd>
<dt><a name="85">method <b class="cmd">MakeDir</b> <i class="arg">srcdir</i></a></dt>
<dd><p>Detect what directory contains the Makefile template</p></dd>
<dt><a name="86">method <b class="cmd">make {} autodetect</b></a></dt>
<dd></dd>
<dt><a name="87">method <b class="cmd">make {} clean</b></a></dt>
<dd></dd>
<dt><a name="88">method <b class="cmd">make {} compile</b></a></dt>
<dd></dd>
<dt><a name="89">method <b class="cmd">make {} install</b> <i class="arg">DEST</i></a></dt>
<dd></dd>
<dt><a name="90">method <b class="cmd">build-compile-sources</b> <i class="arg">PROJECT</i> <i class="arg">COMPILE</i> <i class="arg">CPPCOMPILE</i> <i class="arg">INCLUDES</i></a></dt>
<dd></dd>
<dt><a name="91">method <b class="cmd">build-Makefile</b> <i class="arg">path</i> <i class="arg">PROJECT</i></a></dt>
<dd></dd>
<dt><a name="92">method <b class="cmd">build-library</b> <i class="arg">outfile</i> <i class="arg">PROJECT</i></a></dt>
<dd><p>Produce a static or dynamic library</p></dd>
<dt><a name="93">method <b class="cmd">build-tclsh</b> <i class="arg">outfile</i> <i class="arg">PROJECT</i> <span class="opt">?<i class="arg">path</i> <b class="const">auto</b>?</span></a></dt>
<dd><p>Produce a static executable</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Class  practcl::toolset.msvc</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::toolset</b></p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="94">method <b class="cmd">BuildDir</b> <i class="arg">PWD</i></a></dt>
<dd><p>MSVC always builds in the source directory</p></dd>
<dt><a name="95">method <b class="cmd">make {} autodetect</b></a></dt>
<dd><p>Do nothing</p></dd>
<dt><a name="96">method <b class="cmd">make {} clean</b></a></dt>
<dd></dd>
<dt><a name="97">method <b class="cmd">make {} compile</b></a></dt>
<dd></dd>
<dt><a name="98">method <b class="cmd">make {} install</b> <i class="arg">DEST</i></a></dt>
<dd></dd>
<dt><a name="99">method <b class="cmd">MakeDir</b> <i class="arg">srcdir</i></a></dt>
<dd><p>Detect what directory contains the Makefile template</p></dd>
<dt><a name="100">method <b class="cmd">NmakeOpts</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">Class  practcl::make_obj</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::metaclass</b></p>
<p>A build deliverable object. Normally an object file, header, or tcl script
 which must be compiled or generated in some way</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="101">method <b class="cmd">constructor</b> <i class="arg">module_object</i> <i class="arg">name</i> <i class="arg">info</i> <span class="opt">?<i class="arg">action_body</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="102">method <b class="cmd"><a href="../../../../index.html#do">do</a></b></a></dt>
<dd></dd>
<dt><a name="103">method <b class="cmd">check</b></a></dt>
<dd></dd>
<dt><a name="104">method <b class="cmd">output</b></a></dt>
<dd></dd>
<dt><a name="105">method <b class="cmd">reset</b></a></dt>
<dd></dd>
<dt><a name="106">method <b class="cmd">triggers</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Class  practcl::object</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::metaclass</b></p>
<p>A generic Practcl object</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="107">method <b class="cmd">constructor</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="108">method <b class="cmd">child</b> <i class="arg">method</i></a></dt>
<dd></dd>
<dt><a name="109">method <b class="cmd">go</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection8" class="doctools_subsection"><h3><a name="subsection8">Class  practcl::dynamic</a></h3>
<p>Dynamic blocks do not generate their own .c files,
 instead the contribute to the amalgamation
 of the main library file</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="110">method <b class="cmd">cstructure</b> <i class="arg">name</i> <i class="arg">definition</i> <span class="opt">?<i class="arg">argdat</i> <b class="const"></b>?</span></a></dt>
<dd><p>Parser functions</p></dd>
<dt><a name="111">method <b class="cmd">include</b> <i class="arg">header</i></a></dt>
<dd></dd>
<dt><a name="112">method <b class="cmd">include_dir</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="113">method <b class="cmd">include_directory</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="114">method <b class="cmd">c_header</b> <i class="arg">body</i></a></dt>
<dd></dd>
<dt><a name="115">method <b class="cmd">c_code</b> <i class="arg">body</i></a></dt>
<dd></dd>
<dt><a name="116">method <b class="cmd">c_function</b> <i class="arg">header</i> <i class="arg">body</i> <span class="opt">?<i class="arg">info</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="117">method <b class="cmd">c_tcloomethod</b> <i class="arg">name</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arginfo</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="118">method <b class="cmd">cmethod</b> <i class="arg">name</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arginfo</i> <b class="const"></b>?</span></a></dt>
<dd><p>Alias to classic name</p></dd>
<dt><a name="119">method <b class="cmd">c_tclproc_nspace</b> <i class="arg">nspace</i></a></dt>
<dd></dd>
<dt><a name="120">method <b class="cmd">c_tclcmd</b> <i class="arg">name</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arginfo</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="121">method <b class="cmd">c_tclproc_raw</b> <i class="arg">name</i> <i class="arg">body</i> <span class="opt">?<i class="arg">arginfo</i> <b class="const"></b>?</span></a></dt>
<dd><p>Alias to classic name</p></dd>
<dt><a name="122">method <b class="cmd">tcltype</b> <i class="arg">name</i> <i class="arg">argdat</i></a></dt>
<dd></dd>
<dt><a name="123">method <b class="cmd">project-compile-products</b></a></dt>
<dd><p>Module interactions</p></dd>
<dt><a name="124">method <b class="cmd">implement</b> <i class="arg">path</i></a></dt>
<dd></dd>
<dt><a name="125">method <b class="cmd">initialize</b></a></dt>
<dd><p>Practcl internals</p></dd>
<dt><a name="126">method <b class="cmd">linktype</b></a></dt>
<dd></dd>
<dt><a name="127">method <b class="cmd">generate-cfile-constant</b></a></dt>
<dd></dd>
<dt><a name="128">method <b class="cmd">generate-cfile-header</b></a></dt>
<dd></dd>
<dt><a name="129">method <b class="cmd">generate-cfile-tclapi</b></a></dt>
<dd><p>Generate code that provides implements Tcl API
 calls</p></dd>
<dt><a name="130">method <b class="cmd">generate-loader-module</b></a></dt>
<dd><p>Generate code that runs when the package/module is
 initialized into the interpreter</p></dd>
<dt><a name="131">method <b class="cmd">Collate_Source</b> <i class="arg">CWD</i></a></dt>
<dd></dd>
<dt><a name="132">method <b class="cmd">select</b></a></dt>
<dd><p>Once an object marks itself as some
 flavor of dynamic, stop trying to morph
 it into something else</p></dd>
</dl>
</div>
<div id="subsection9" class="doctools_subsection"><h3><a name="subsection9">Class  practcl::product</a></h3>
<p>A deliverable for the build system</p>
<p><b class="class">Class Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="133">classmethod <b class="cmd">select</b> <i class="arg">object</i></a></dt>
<dd></dd>
</dl>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="134">method <b class="cmd">code</b> <i class="arg">section</i> <i class="arg">body</i></a></dt>
<dd></dd>
<dt><a name="135">method <b class="cmd">Collate_Source</b> <i class="arg">CWD</i></a></dt>
<dd></dd>
<dt><a name="136">method <b class="cmd">project-compile-products</b></a></dt>
<dd></dd>
<dt><a name="137">method <b class="cmd">generate-debug</b> <span class="opt">?<i class="arg">spaces</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="138">method <b class="cmd">generate-cfile-constant</b></a></dt>
<dd></dd>
<dt><a name="139">method <b class="cmd">generate-cfile-public-structure</b></a></dt>
<dd><p>Populate const static data structures</p></dd>
<dt><a name="140">method <b class="cmd">generate-cfile-header</b></a></dt>
<dd></dd>
<dt><a name="141">method <b class="cmd">generate-cfile-global</b></a></dt>
<dd></dd>
<dt><a name="142">method <b class="cmd">generate-cfile-private-typedef</b></a></dt>
<dd></dd>
<dt><a name="143">method <b class="cmd">generate-cfile-private-structure</b></a></dt>
<dd></dd>
<dt><a name="144">method <b class="cmd">generate-cfile-functions</b></a></dt>
<dd><p>Generate code that provides subroutines called by
 Tcl API methods</p></dd>
<dt><a name="145">method <b class="cmd">generate-cfile-tclapi</b></a></dt>
<dd><p>Generate code that provides implements Tcl API
 calls</p></dd>
<dt><a name="146">method <b class="cmd">generate-hfile-public-define</b></a></dt>
<dd></dd>
<dt><a name="147">method <b class="cmd">generate-hfile-public-macro</b></a></dt>
<dd></dd>
<dt><a name="148">method <b class="cmd">generate-hfile-public-typedef</b></a></dt>
<dd></dd>
<dt><a name="149">method <b class="cmd">generate-hfile-public-structure</b></a></dt>
<dd></dd>
<dt><a name="150">method <b class="cmd">generate-hfile-public-headers</b></a></dt>
<dd></dd>
<dt><a name="151">method <b class="cmd">generate-hfile-public-function</b></a></dt>
<dd></dd>
<dt><a name="152">method <b class="cmd">generate-hfile-public-includes</b></a></dt>
<dd></dd>
<dt><a name="153">method <b class="cmd">generate-hfile-public-verbatim</b></a></dt>
<dd></dd>
<dt><a name="154">method <b class="cmd">generate-loader-external</b></a></dt>
<dd></dd>
<dt><a name="155">method <b class="cmd">generate-loader-module</b></a></dt>
<dd></dd>
<dt><a name="156">method <b class="cmd">generate-stub-function</b></a></dt>
<dd></dd>
<dt><a name="157">method <b class="cmd">IncludeAdd</b> <i class="arg">headervar</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="158">method <b class="cmd">generate-tcl-loader</b></a></dt>
<dd></dd>
<dt><a name="159">method <b class="cmd">generate-tcl-pre</b></a></dt>
<dd><p>This methods generates any Tcl script file
 which is required to pre-initialize the C library</p></dd>
<dt><a name="160">method <b class="cmd">generate-tcl-post</b></a></dt>
<dd></dd>
<dt><a name="161">method <b class="cmd">linktype</b></a></dt>
<dd></dd>
<dt><a name="162">method <b class="cmd">Ofile</b> <i class="arg">filename</i></a></dt>
<dd></dd>
<dt><a name="163">method <b class="cmd">project-static-packages</b></a></dt>
<dd><p>Methods called by the master project</p></dd>
<dt><a name="164">method <b class="cmd">toolset-include-directory</b></a></dt>
<dd><p>Methods called by the toolset</p></dd>
<dt><a name="165">method <b class="cmd">target</b> <i class="arg">method</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection10" class="doctools_subsection"><h3><a name="subsection10">Class  practcl::product.cheader</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::product</b></p>
<p>A product which generated from a C header file. Which is to say, nothing.</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="166">method <b class="cmd">project-compile-products</b></a></dt>
<dd></dd>
<dt><a name="167">method <b class="cmd">generate-loader-module</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Class  practcl::product.csource</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::product</b></p>
<p>A product which generated from a C source file. Normally an object (.o) file.</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="168">method <b class="cmd">project-compile-products</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection12" class="doctools_subsection"><h3><a name="subsection12">Class  practcl::product.clibrary</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::product</b></p>
<p>A product which is generated from a compiled C library.
 Usually a .a or a .dylib file, but in complex cases may
 actually just be a conduit for one project to integrate the
 source code of another</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="169">method <b class="cmd">linker-products</b> <i class="arg">configdict</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection13" class="doctools_subsection"><h3><a name="subsection13">Class  practcl::product.dynamic</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::dynamic</b> <b class="class">practcl::product</b></p>
<p>A product which is generated from C code that itself is generated
 by practcl or some other means. This C file may or may not produce
 its own .o file, depending on whether it is eligible to become part
 of an amalgamation</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="170">method <b class="cmd">initialize</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection14" class="doctools_subsection"><h3><a name="subsection14">Class  practcl::product.critcl</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::dynamic</b> <b class="class">practcl::product</b></p>
<p>A binary product produced by critcl. Note: The implementation is not
 written yet, this class does nothing.</p>
</div>
<div id="subsection15" class="doctools_subsection"><h3><a name="subsection15">Class  practcl::module</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::object</b> <b class="class">practcl::product.dynamic</b></p>
<p>In the end, all C code must be loaded into a module
 This will either be a dynamically loaded library implementing
 a tcl extension, or a compiled in segment of a custom shell/app</p>
<p><b class="class">Variable</b></p>
<dl class="doctools_definitions">
<dt><a name="171">variable <b class="cmd">make_object</b></a></dt>
<dd></dd>
</dl>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="172">method <b class="cmd">_MorphPatterns</b></a></dt>
<dd></dd>
<dt><a name="173">method <b class="cmd">add</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="174">method <b class="cmd">install-headers</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="175">method <b class="cmd">make {} _preamble</b></a></dt>
<dd></dd>
<dt><a name="176">method <b class="cmd">make {} pkginfo</b></a></dt>
<dd></dd>
<dt><a name="177">method <b class="cmd">make {} objects</b></a></dt>
<dd><p>Return a dictionary of all handles and associated objects</p></dd>
<dt><a name="178">method <b class="cmd">make {} object</b> <i class="arg">name</i></a></dt>
<dd><p>Return the object associated with handle <em>name</em></p></dd>
<dt><a name="179">method <b class="cmd">make {} reset</b></a></dt>
<dd><p>Reset all deputy objects</p></dd>
<dt><a name="180">method <b class="cmd">make {} trigger</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Exercise the triggers method for all handles listed</p></dd>
<dt><a name="181">method <b class="cmd">make {} depends</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Exercise the check method for all handles listed</p></dd>
<dt><a name="182">method <b class="cmd">make {} filename</b> <i class="arg">name</i></a></dt>
<dd><p>Return the file name of the build product for the listed
 handle</p></dd>
<dt><a name="183">method <b class="cmd">make {} target</b> <i class="arg">name</i> <i class="arg">Info</i> <i class="arg">body</i></a></dt>
<dd></dd>
<dt><a name="184">method <b class="cmd">make {} todo</b></a></dt>
<dd><p>Return a list of handles for object which return true for the
 do method</p></dd>
<dt><a name="185">method <b class="cmd">make {} do</b></a></dt>
<dd><p>For each target exercise the action specified in the <em>action</em>
 definition if the <em>do</em> method returns true</p></dd>
<dt><a name="186">method <b class="cmd">child</b> <i class="arg">which</i></a></dt>
<dd></dd>
<dt><a name="187">method <b class="cmd">generate-c</b></a></dt>
<dd><p>This methods generates the contents of an amalgamated .c file
 which implements the loader for a batch of tools</p></dd>
<dt><a name="188">method <b class="cmd">generate-h</b></a></dt>
<dd><p>This methods generates the contents of an amalgamated .h file
 which describes the public API of this module</p></dd>
<dt><a name="189">method <b class="cmd">generate-loader</b></a></dt>
<dd></dd>
<dt><a name="190">method <b class="cmd">initialize</b></a></dt>
<dd></dd>
<dt><a name="191">method <b class="cmd">implement</b> <i class="arg">path</i></a></dt>
<dd></dd>
<dt><a name="192">method <b class="cmd">linktype</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection16" class="doctools_subsection"><h3><a name="subsection16">Class  practcl::project</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::module</b></p>
<p>A toplevel project that is a collection of other projects</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="193">method <b class="cmd">_MorphPatterns</b></a></dt>
<dd></dd>
<dt><a name="194">method <b class="cmd">constructor</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="195">method <b class="cmd">add_object</b> <i class="arg">object</i></a></dt>
<dd></dd>
<dt><a name="196">method <b class="cmd">add_project</b> <i class="arg">pkg</i> <i class="arg">info</i> <span class="opt">?<i class="arg">oodefine</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="197">method <b class="cmd">add_tool</b> <i class="arg">pkg</i> <i class="arg">info</i> <span class="opt">?<i class="arg">oodefine</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="198">method <b class="cmd">build-tclcore</b></a></dt>
<dd><p>Compile the Tcl core. If the define <em>tk</em> is true, compile the
 Tk core as well</p></dd>
<dt><a name="199">method <b class="cmd">child</b> <i class="arg">which</i></a></dt>
<dd></dd>
<dt><a name="200">method <b class="cmd">linktype</b></a></dt>
<dd></dd>
<dt><a name="201">method <b class="cmd">project</b> <i class="arg">pkg</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Exercise the methods of a sub-object</p></dd>
<dt><a name="202">method <b class="cmd">tclcore</b></a></dt>
<dd></dd>
<dt><a name="203">method <b class="cmd">tkcore</b></a></dt>
<dd></dd>
<dt><a name="204">method <b class="cmd"><a href="../tool/tool.html">tool</a></b> <i class="arg">pkg</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection17" class="doctools_subsection"><h3><a name="subsection17">Class  practcl::library</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::project</b></p>
<p>A toplevel project that produces a library</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="205">method <b class="cmd">clean</b> <i class="arg">PATH</i></a></dt>
<dd></dd>
<dt><a name="206">method <b class="cmd">project-compile-products</b></a></dt>
<dd></dd>
<dt><a name="207">method <b class="cmd">go</b></a></dt>
<dd></dd>
<dt><a name="208">method <b class="cmd">generate-decls</b> <i class="arg">pkgname</i> <i class="arg">path</i></a></dt>
<dd></dd>
<dt><a name="209">method <b class="cmd">implement</b> <i class="arg">path</i></a></dt>
<dd></dd>
<dt><a name="210">method <b class="cmd">generate-make</b> <i class="arg">path</i></a></dt>
<dd><p>Backward compadible call</p></dd>
<dt><a name="211">method <b class="cmd">linktype</b></a></dt>
<dd></dd>
<dt><a name="212">method <b class="cmd">package-ifneeded</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Create a &quot;package ifneeded&quot;
 Args are a list of aliases for which this package will answer to</p></dd>
<dt><a name="213">method <b class="cmd">shared_library</b> <span class="opt">?<i class="arg">filename</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
<dt><a name="214">method <b class="cmd">static_library</b> <span class="opt">?<i class="arg">filename</i> <b class="const"></b>?</span></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection18" class="doctools_subsection"><h3><a name="subsection18">Class  practcl::tclkit</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::library</b></p>
<p>A toplevel project that produces a self-contained executable</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="215">method <b class="cmd">build-tclkit_main</b> <i class="arg">PROJECT</i> <i class="arg">PKG_OBJS</i></a></dt>
<dd></dd>
<dt><a name="216">method <b class="cmd">Collate_Source</b> <i class="arg">CWD</i></a></dt>
<dd></dd>
<dt><a name="217">method <b class="cmd">wrap</b> <i class="arg">PWD</i> <i class="arg">exename</i> <i class="arg">vfspath</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Wrap an executable</p></dd>
</dl>
</div>
<div id="subsection19" class="doctools_subsection"><h3><a name="subsection19">Class  practcl::distribution</a></h3>
<p>Standalone class to manage code distribution
 This class is intended to be mixed into another class
 (Thus the lack of ancestors)</p>
<p><b class="class">Class Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="218">classmethod <b class="cmd">Sandbox</b> <i class="arg">object</i></a></dt>
<dd></dd>
<dt><a name="219">classmethod <b class="cmd">select</b> <i class="arg">object</i></a></dt>
<dd></dd>
<dt><a name="220">classmethod <b class="cmd">claim_option</b></a></dt>
<dd></dd>
<dt><a name="221">classmethod <b class="cmd">claim_object</b> <i class="arg">object</i></a></dt>
<dd></dd>
<dt><a name="222">classmethod <b class="cmd">claim_path</b> <i class="arg">path</i></a></dt>
<dd></dd>
</dl>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="223">method <b class="cmd">scm_info</b></a></dt>
<dd></dd>
<dt><a name="224">method <b class="cmd">DistroMixIn</b></a></dt>
<dd></dd>
<dt><a name="225">method <b class="cmd">Sandbox</b></a></dt>
<dd></dd>
<dt><a name="226">method <b class="cmd">SrcDir</b></a></dt>
<dd></dd>
<dt><a name="227">method <b class="cmd">ScmTag</b></a></dt>
<dd></dd>
<dt><a name="228">method <b class="cmd">ScmClone</b></a></dt>
<dd></dd>
<dt><a name="229">method <b class="cmd">ScmUnpack</b></a></dt>
<dd></dd>
<dt><a name="230">method <b class="cmd">ScmUpdate</b></a></dt>
<dd></dd>
<dt><a name="231">method <b class="cmd">Unpack</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection20" class="doctools_subsection"><h3><a name="subsection20">Class  practcl::distribution.snapshot</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::distribution</b></p>
<p>A file distribution from zip, tarball, or other non-scm archive format</p>
<p><b class="class">Class Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="232">classmethod <b class="cmd">claim_object</b> <i class="arg">object</i></a></dt>
<dd></dd>
<dt><a name="233">classmethod <b class="cmd">claim_option</b></a></dt>
<dd></dd>
<dt><a name="234">classmethod <b class="cmd">claim_path</b> <i class="arg">path</i></a></dt>
<dd></dd>
</dl>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="235">method <b class="cmd">ScmUnpack</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection21" class="doctools_subsection"><h3><a name="subsection21">Class  practcl::distribution.fossil</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::distribution</b></p>
<p>A file distribution based on fossil</p>
<p><b class="class">Class Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="236">classmethod <b class="cmd">claim_object</b> <i class="arg">obj</i></a></dt>
<dd><p>Check for markers in the metadata</p></dd>
<dt><a name="237">classmethod <b class="cmd">claim_option</b></a></dt>
<dd></dd>
<dt><a name="238">classmethod <b class="cmd">claim_path</b> <i class="arg">path</i></a></dt>
<dd><p>Check for markers in the source root</p></dd>
</dl>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="239">method <b class="cmd">scm_info</b></a></dt>
<dd></dd>
<dt><a name="240">method <b class="cmd">ScmClone</b></a></dt>
<dd><p>Clone the source</p></dd>
<dt><a name="241">method <b class="cmd">ScmTag</b></a></dt>
<dd></dd>
<dt><a name="242">method <b class="cmd">ScmUnpack</b></a></dt>
<dd></dd>
<dt><a name="243">method <b class="cmd">ScmUpdate</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection22" class="doctools_subsection"><h3><a name="subsection22">Class  practcl::distribution.git</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::distribution</b></p>
<p>A file distribution based on git</p>
<p><b class="class">Class Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="244">classmethod <b class="cmd">claim_object</b> <i class="arg">obj</i></a></dt>
<dd></dd>
<dt><a name="245">classmethod <b class="cmd">claim_option</b></a></dt>
<dd></dd>
<dt><a name="246">classmethod <b class="cmd">claim_path</b> <i class="arg">path</i></a></dt>
<dd></dd>
</dl>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="247">method <b class="cmd">ScmTag</b></a></dt>
<dd></dd>
<dt><a name="248">method <b class="cmd">ScmUnpack</b></a></dt>
<dd></dd>
<dt><a name="249">method <b class="cmd">ScmUpdate</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection23" class="doctools_subsection"><h3><a name="subsection23">Class  practcl::subproject</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::module</b></p>
<p>A subordinate project</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="250">method <b class="cmd">_MorphPatterns</b></a></dt>
<dd></dd>
<dt><a name="251">method <b class="cmd">BuildDir</b> <i class="arg">PWD</i></a></dt>
<dd></dd>
<dt><a name="252">method <b class="cmd">child</b> <i class="arg">which</i></a></dt>
<dd></dd>
<dt><a name="253">method <b class="cmd">compile</b></a></dt>
<dd></dd>
<dt><a name="254">method <b class="cmd">go</b></a></dt>
<dd></dd>
<dt><a name="255">method <b class="cmd">install</b> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><p>Install project into the local build system</p></dd>
<dt><a name="256">method <b class="cmd">linktype</b></a></dt>
<dd></dd>
<dt><a name="257">method <b class="cmd">linker-products</b> <i class="arg">configdict</i></a></dt>
<dd></dd>
<dt><a name="258">method <b class="cmd">linker-external</b> <i class="arg">configdict</i></a></dt>
<dd></dd>
<dt><a name="259">method <b class="cmd">linker-extra</b> <i class="arg">configdict</i></a></dt>
<dd></dd>
<dt><a name="260">method <b class="cmd">env-bootstrap</b></a></dt>
<dd><p>Methods for packages/tools that can be downloaded
 possibly built and used internally by this Practcl
 process
 Load the facility into the interpreter</p></dd>
<dt><a name="261">method <b class="cmd">env-exec</b></a></dt>
<dd><p>Return a file path that exec can call</p></dd>
<dt><a name="262">method <b class="cmd">env-install</b></a></dt>
<dd><p>Install the tool into the local environment</p></dd>
<dt><a name="263">method <b class="cmd">env-load</b></a></dt>
<dd><p>Do whatever is necessary to get the tool
 into the local environment</p></dd>
<dt><a name="264">method <b class="cmd">env-present</b></a></dt>
<dd><p>Check if tool is available for load/already loaded</p></dd>
<dt><a name="265">method <b class="cmd">sources</b></a></dt>
<dd></dd>
<dt><a name="266">method <b class="cmd"><a href="../../../../index.html#update">update</a></b></a></dt>
<dd></dd>
<dt><a name="267">method <b class="cmd">unpack</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection24" class="doctools_subsection"><h3><a name="subsection24">Class  practcl::subproject.source</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject</b> <b class="class">practcl::library</b></p>
<p>A project which the kit compiles and integrates
 the source for itself</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="268">method <b class="cmd">env-bootstrap</b></a></dt>
<dd></dd>
<dt><a name="269">method <b class="cmd">env-present</b></a></dt>
<dd></dd>
<dt><a name="270">method <b class="cmd">linktype</b></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection25" class="doctools_subsection"><h3><a name="subsection25">Class  practcl::subproject.teapot</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject</b></p>
<p>a copy from the teapot</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="271">method <b class="cmd">env-bootstrap</b></a></dt>
<dd></dd>
<dt><a name="272">method <b class="cmd">env-install</b></a></dt>
<dd></dd>
<dt><a name="273">method <b class="cmd">env-present</b></a></dt>
<dd></dd>
<dt><a name="274">method <b class="cmd">install</b> <i class="arg">DEST</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection26" class="doctools_subsection"><h3><a name="subsection26">Class  practcl::subproject.kettle</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject</b></p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="275">method <b class="cmd">kettle</b> <i class="arg">path</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
<dt><a name="276">method <b class="cmd">install</b> <i class="arg">DEST</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection27" class="doctools_subsection"><h3><a name="subsection27">Class  practcl::subproject.critcl</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject</b></p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="277">method <b class="cmd">install</b> <i class="arg">DEST</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection28" class="doctools_subsection"><h3><a name="subsection28">Class  practcl::subproject.sak</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject</b></p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="278">method <b class="cmd">env-bootstrap</b></a></dt>
<dd></dd>
<dt><a name="279">method <b class="cmd">env-install</b></a></dt>
<dd></dd>
<dt><a name="280">method <b class="cmd">env-present</b></a></dt>
<dd></dd>
<dt><a name="281">method <b class="cmd">install</b> <i class="arg">DEST</i></a></dt>
<dd></dd>
<dt><a name="282">method <b class="cmd">install-module</b> <i class="arg">DEST</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection29" class="doctools_subsection"><h3><a name="subsection29">Class  practcl::subproject.practcl</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject</b></p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="283">method <b class="cmd">env-bootstrap</b></a></dt>
<dd></dd>
<dt><a name="284">method <b class="cmd">env-install</b></a></dt>
<dd></dd>
<dt><a name="285">method <b class="cmd">install</b> <i class="arg">DEST</i></a></dt>
<dd></dd>
<dt><a name="286">method <b class="cmd">install-module</b> <i class="arg">DEST</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd></dd>

</dl>
</div>
<div id="subsection30" class="doctools_subsection"><h3><a name="subsection30">Class  practcl::subproject.binary</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject</b></p>
<p>A subordinate binary package</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="287">method <b class="cmd">clean</b></a></dt>
<dd></dd>
<dt><a name="288">method <b class="cmd">env-install</b></a></dt>
<dd></dd>
<dt><a name="289">method <b class="cmd">project-compile-products</b></a></dt>
<dd></dd>
<dt><a name="290">method <b class="cmd">ComputeInstall</b></a></dt>
<dd></dd>
<dt><a name="291">method <b class="cmd">go</b></a></dt>
<dd></dd>
<dt><a name="292">method <b class="cmd">linker-products</b> <i class="arg">configdict</i></a></dt>
<dd></dd>
<dt><a name="293">method <b class="cmd">project-static-packages</b></a></dt>
<dd></dd>
<dt><a name="294">method <b class="cmd">BuildDir</b> <i class="arg">PWD</i></a></dt>
<dd></dd>
<dt><a name="295">method <b class="cmd">compile</b></a></dt>
<dd></dd>
<dt><a name="296">method <b class="cmd">Configure</b></a></dt>
<dd></dd>
<dt><a name="297">method <b class="cmd">install</b> <i class="arg">DEST</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection31" class="doctools_subsection"><h3><a name="subsection31">Class  practcl::subproject.tea</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject.binary</b></p>
<p>A subordinate TEA based binary package</p>
</div>
<div id="subsection32" class="doctools_subsection"><h3><a name="subsection32">Class  practcl::subproject.library</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject.binary</b> <b class="class">practcl::library</b></p>
<p>A subordinate C library built by this project</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="298">method <b class="cmd">install</b> <i class="arg">DEST</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection33" class="doctools_subsection"><h3><a name="subsection33">Class  practcl::subproject.external</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject.binary</b></p>
<p>A subordinate external C library</p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="299">method <b class="cmd">install</b> <i class="arg">DEST</i></a></dt>
<dd></dd>
</dl>
</div>
<div id="subsection34" class="doctools_subsection"><h3><a name="subsection34">Class  practcl::subproject.core</a></h3>
<p><em>ancestors</em>: <b class="class">practcl::subproject.binary</b></p>
<p><b class="class">Methods</b></p>
<dl class="doctools_definitions">
<dt><a name="300">method <b class="cmd">env-bootstrap</b></a></dt>
<dd></dd>
<dt><a name="301">method <b class="cmd">env-present</b></a></dt>
<dd></dd>
<dt><a name="302">method <b class="cmd">env-install</b></a></dt>
<dd></dd>
<dt><a name="303">method <b class="cmd">go</b></a></dt>
<dd></dd>
<dt><a name="304">method <b class="cmd">linktype</b></a></dt>
<dd></dd>
</dl>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>practcl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#practcl">practcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>TclOO</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2016-2018 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>







|

|

|



|
|
|
|
|
|


|








|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









>


<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
|
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






<
<
<
<
<
<
<
<
<

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
|
<
>


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|






<
<
<
<
<
<


|





|


88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121






































122
123
124
125
126
127
128
129
130
131
132
133




134
































135




































































136





137



























































138

















139

















140






141





142











143






































































144
145
146
147
148
149









150
151













































































































































































































































152


153
154





































155
















































































































































































































156











157























































































158





159













































160






161



















162





163

































164






























































165
















166
167
































168

























169

















170
















































171





































































172
173












174

175
176
177




































































178
179
180
181
182
183
184






185
186
187
188
189
190
191
192
193
194
195
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'practcl.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2016 Sean Woods &lt;yoda@etoyoc.com&gt;
   -->
<! -- practcl.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">practcl(n) 0.1 tcllib &quot;The The Proper Rational API for C to Tool Command Language Module&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>practcl - The Practcl Module</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>






































<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">TclOO 1.0</b></li>
<li>package require <b class="pkgname">practcl 0.1</b></li>
</ul>
<ul class="doctools_syntax">




<li><a href="#1"><b class="cmd">CPUTS</b> <i class="arg">varname</i> <i class="arg">body</i> <span class="opt">?<i class="arg">body</i>...?</span></a></li>
































<li><a href="#2"><b class="cmd">practcl::_isdirectory</b> <i class="arg">path</i></a></li>




































































<li><a href="#3"><b class="cmd">practcl::object</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>





<li><a href="#4"><b class="cmd">practcl::library</b> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>



























































<li><a href="#5"><b class="cmd">practcl::exe</b> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>

















<li><a href="#6"><b class="cmd">practcl::product</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>

















<li><a href="#7"><b class="cmd">practcl::cheader</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>






<li><a href="#8"><b class="cmd">practcl::csource</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>





<li><a href="#9"><b class="cmd">practcl::module</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>











<li><a href="#10"><b class="cmd">practcl::submodule</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></li>






































































</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The Practcl module is a tool for integrating large modules for C API
Tcl code that requires custom Tcl types and TclOO objects.</p>









</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>













































































































































































































































<dl class="doctools_definitions">


<dt><a name="1"><b class="cmd">CPUTS</b> <i class="arg">varname</i> <i class="arg">body</i> <span class="opt">?<i class="arg">body</i>...?</span></a></dt>
<dd><p>Appends blocks of text to a buffer. This command tries to reduce the number





































of line breaks between bodies.</p></dd>
















































































































































































































<dt><a name="2"><b class="cmd">practcl::_isdirectory</b> <i class="arg">path</i></a></dt>











<dd><p>Returns true if <i class="arg">path</i> is a directory, using the test</p></dd>























































































</dl>





<dl class="doctools_definitions">













































<dt><a name="3"><b class="cmd">practcl::object</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>






<dd><p>A generic Practcl object</p></dd>



















<dt><a name="4"><b class="cmd">practcl::library</b> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>





<dd><p>A Practcl object representing a library container</p></dd>

































<dt><a name="5"><b class="cmd">practcl::exe</b> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>






























































<dd><p>A Practcl object representing a wrapped executable</p></dd>
















<dt><a name="6"><b class="cmd">practcl::product</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
<dd><p>A Practcl object representing a compiled product</p></dd>
































<dt><a name="7"><b class="cmd">practcl::cheader</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>

























<dd><p>A Practcl object representing an externally generated c header</p></dd>

















<dt><a name="8"><b class="cmd">practcl::csource</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
















































<dd><p>A Practcl object representing an externally generated c source file</p></dd>





































































<dt><a name="9"><b class="cmd">practcl::module</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>
<dd><p>A Practcl object representing a dynamically generated C/H/Tcl suite</p></dd>












<dt><a name="10"><b class="cmd">practcl::submodule</b> <i class="arg">parent</i> <span class="opt">?<i class="arg">keyvaluelist</i>?</span></a></dt>

<dd><p>A Practcl object representing a dynamically generated C/H/Tcl suite, subordinate to a module</p></dd>
</dl>
</div>




































































<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>practcl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key366">practcl</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>TclOO</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2016 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/processman/processman.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>processman - processman</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>processman - processman</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'processman.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2015 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- processman.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">processman(n) 0.1 tcllib &quot;processman&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>processman - Tool for automating the period callback of commands</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'processman.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;
   -->
<! -- processman.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">processman(n) 0.1 tcllib &quot;processman&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>processman - Tool for automating the period callback of commands</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>odie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#odie">odie</a>, <a href="../../../../index.html#processman">processman</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>System</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








182
183
184
185
186
187
188






189
190
191
192
193
194
195
196
197
198
199
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>odie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key255">odie</a>, <a href="../../../../index.html#key256">processman</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>System</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/profiler/profiler.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>profiler - Tcl Profiler</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>profiler - Tcl Profiler</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'profiler.man' by tcllib/doctools with format 'html'
   -->
<!-- profiler.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">profiler(n) 0.5 tcllib &quot;Tcl Profiler&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>profiler - Tcl source code profiler</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">profiler <span class="opt">?0.5?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::profiler::init</b></a></li>
<li><a href="#2"><b class="cmd">::profiler::dump</b> <i class="arg">pattern</i></a></li>
<li><a href="#3"><b class="cmd">::profiler::print</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::profiler::reset</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::profiler::suspend</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::profiler::resume</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::profiler::new-disabled</b></a></li>
<li><a href="#8"><b class="cmd">::profiler::new-enabled</b></a></li>
<li><a href="#9"><b class="cmd">::profiler::sortFunctions</b> <i class="arg">key</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">profiler</b> package provides a simple Tcl source code
profiler.  It is a function-level profiler; that is, it collects only
function-level information, not the more detailed line-level
information.  It operates by redefining the Tcl <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> command.
Profiling is initiated via the <b class="cmd">::profiler::init</b> command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::profiler::init</b></a></dt>
<dd><p>Initiate profiling.  All procedures created after this command is
called will be profiled.  To profile an entire application, this







|

|



|
|
|
|
|
|


|


















|








|
<
<







|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137


138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'profiler.man' by tcllib/doctools with format 'html'
   -->
<! -- profiler.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">profiler(n) 0.3 tcllib &quot;Tcl Profiler&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>profiler - Tcl source code profiler</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">profiler <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::profiler::init</b></a></li>
<li><a href="#2"><b class="cmd">::profiler::dump</b> <i class="arg">pattern</i></a></li>
<li><a href="#3"><b class="cmd">::profiler::print</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::profiler::reset</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::profiler::suspend</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::profiler::resume</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::profiler::sortFunctions</b> <i class="arg">key</i></a></li>


</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">profiler</b> package provides a simple Tcl source code
profiler.  It is a function-level profiler; that is, it collects only
function-level information, not the more detailed line-level
information.  It operates by redefining the Tcl <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> command.
Profiling is initiated via the <b class="cmd">::profiler::init</b> command.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::profiler::init</b></a></dt>
<dd><p>Initiate profiling.  All procedures created after this command is
called will be profiled.  To profile an entire application, this
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
has been gathered previously.  Use resume command to re-enable
profiling.</p></dd>
<dt><a name="6"><b class="cmd">::profiler::resume</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Resume profiling for all functions matching <i class="arg">pattern</i>.  If no
pattern is specified, profiling will be resumed for all functions.
This command should be invoked after suspending the profiler in the
code.</p></dd>
<dt><a name="7"><b class="cmd">::profiler::new-disabled</b></a></dt>
<dd><p>Change the initial profiling state for new procedures. Invoking this
command disables profiling for all procedures created after this
command until <b class="cmd">new-enabled</b> is invoked. Activate profiling of
specific procedures via <b class="cmd">resume</b>.</p></dd>
<dt><a name="8"><b class="cmd">::profiler::new-enabled</b></a></dt>
<dd><p>Change the initial profiling state for new procedures. Invoking this
command enables profiling for all procedures created after this
command until <b class="cmd">new-disabled</b> is invoked. Prevent profiling of
specific procedures via <b class="cmd">suspend</b>.</p></dd>
<dt><a name="9"><b class="cmd">::profiler::sortFunctions</b> <i class="arg">key</i></a></dt>
<dd><p>Return a list of functions sorted by a particular profiling statistic.
Supported values for <i class="arg">key</i> are: <b class="const">calls</b>,
<b class="const">exclusiveTime</b>, <b class="const">compileTime</b>, <b class="const">nonCompileTime</b>,
<b class="const">totalRuntime</b>, <b class="const">avgExclusiveTime</b>, and
<b class="const">avgRuntime</b>.  The return result is a list of lists, where each
sublist consists of a function name and the value of <i class="arg">key</i> for
that function.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>profiler</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#performance">performance</a>, <a href="../../../../index.html#profile">profile</a>, <a href="../../../../index.html#speed">speed</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<
<
<
<
<
|
















<
<
<
<
<
<


|





194
195
196
197
198
199
200










201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217






218
219
220
221
222
223
224
225
has been gathered previously.  Use resume command to re-enable
profiling.</p></dd>
<dt><a name="6"><b class="cmd">::profiler::resume</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Resume profiling for all functions matching <i class="arg">pattern</i>.  If no
pattern is specified, profiling will be resumed for all functions.
This command should be invoked after suspending the profiler in the
code.</p></dd>










<dt><a name="7"><b class="cmd">::profiler::sortFunctions</b> <i class="arg">key</i></a></dt>
<dd><p>Return a list of functions sorted by a particular profiling statistic.
Supported values for <i class="arg">key</i> are: <b class="const">calls</b>,
<b class="const">exclusiveTime</b>, <b class="const">compileTime</b>, <b class="const">nonCompileTime</b>,
<b class="const">totalRuntime</b>, <b class="const">avgExclusiveTime</b>, and
<b class="const">avgRuntime</b>.  The return result is a list of lists, where each
sublist consists of a function name and the value of <i class="arg">key</i> for
that function.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>profiler</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key100">performance</a>, <a href="../../../../index.html#key649">profile</a>, <a href="../../../../index.html#key648">speed</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_astree.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::ast - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::ast - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_astree.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::ast.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::ast(n) 1.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::ast - Abstract Syntax Tree Serialization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_astree.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::ast.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::ast(n) 1.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::ast - Abstract Syntax Tree Serialization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








336
337
338
339
340
341
342






343
344
345
346
347
348
349
350
351
352
353
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_cparam_config_critcl.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::cparam::configuration::critcl - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::cparam::configuration::critcl - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_cparam_config_critcl.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::cparam::configuration::critcl.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::cparam::configuration::critcl(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::cparam::configuration::critcl - C/PARAM, Canned configuration, Critcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_cparam_config_critcl.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::cparam::configuration::critcl.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::cparam::configuration::critcl(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::cparam::configuration::critcl - C/PARAM, Canned configuration, Critcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_cparam_config_tea.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::cparam::configuration::tea - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::cparam::configuration::tea - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_cparam_config_tea.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::cparam::configuration::tea.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::cparam::configuration::tea(n) 0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::cparam::configuration::tea - C/PARAM, Canned configuration, TEA</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_cparam_config_tea.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::cparam::configuration::tea.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::cparam::configuration::tea(n) 0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::cparam::configuration::tea - C/PARAM, Canned configuration, TEA</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_from_api.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt_import_api - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt_import_api - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_from_api.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt_import_api.i
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_import_api(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_import_api - Parser Tools Import API</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_from_api.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt_import_api.i
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_import_api(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_import_api - Parser Tools Import API</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
generate the serialization.
The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section5">PEG serialization format</a></span>.</p></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of an invokation of
	the command <b class="cmd"><a href="../../../../index.html#import">import</a></b>. This call has to leave the plugin in
	a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Usage</a></h2>
<p>To use a converter do</p>
<pre class="doctools_example">
    # Get the converter (single command here, not class)







|







263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
generate the serialization.
The specification of what a <i class="term">canonical</i> serialization is can be
found in the section <span class="sectref"><a href="#section5">PEG serialization format</a></span>.</p></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of an invokation of
	the command <b class="cmd"><a href="../../../../index.html#key291">import</a></b>. This call has to leave the plugin in
	a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Usage</a></h2>
<p>To use a converter do</p>
<pre class="doctools_example">
    # Get the converter (single command here, not class)
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








525
526
527
528
529
530
531






532
533
534
535
536
537
538
539
540
541
542
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_introduction.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt_introduction - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt_introduction - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_introduction.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt_introduction.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_introduction(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_introduction - Introduction to Parser Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_introduction.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt_introduction.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_introduction(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_introduction - Introduction to Parser Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








277
278
279
280
281
282
283






284
285
286
287
288
289
290
291
292
293
294
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_json_language.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::json_language - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::json_language - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_json_language.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::json_language.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::json_language(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::json_language - The JSON Grammar Exchange Format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_json_language.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::json_language.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::json_language(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::json_language - The JSON Grammar Exchange Format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








523
524
525
526
527
528
529






530
531
532
533
534
535
536
537
538
539
540
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_param.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::param - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::param - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_param.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::param.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::param(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::param - PackRat Machine Specification</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_param.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::param.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::param(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::param - PackRat Machine Specification</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>Welcome to the PackRat Machine (short: <i class="term"><a href="../../../../index.html#param">PARAM</a></i>), a virtual
machine geared towards the support of recursive descent parsers,
especially packrat parsers. Towards this end it has features like the
caching and reuse of partial results, the caching of the encountered
input, and the ability to backtrack in both input and AST creation.</p>
<p>This document specifies the machine in terms of its architectural
state and instruction set.</p>
</div>







|







147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>Welcome to the PackRat Machine (short: <i class="term"><a href="../../../../index.html#key518">PARAM</a></i>), a virtual
machine geared towards the support of recursive descent parsers,
especially packrat parsers. Towards this end it has features like the
caching and reuse of partial results, the caching of the encountered
input, and the ability to backtrack in both input and AST creation.</p>
<p>This document specifies the machine in terms of its architectural
state and instruction set.</p>
</div>
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a>, <a href="../../../../index.html#virtual_machine">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








571
572
573
574
575
576
577






578
579
580
581
582
583
584
585
586
587
588
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a>, <a href="../../../../index.html#key24">virtual machine</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_parse_peg.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt_parse_peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt_parse_peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_parse_peg.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt_parse_peg.i
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_parse_peg(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_parse_peg - Parser Tools PEG Parser</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_parse_peg.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt_parse_peg.i
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_parse_peg(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_parse_peg - Parser Tools PEG Parser</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#read">read</a></b> is properly changed for
push-operation.</p>
<p>Upon successful completion the command returns an abstract syntax tree
as its result.
This AST is in the form specified in section
<b class="sectref">AST serialization format</b>.
As a plain nested Tcl-list it can then be processed with any Tcl
commands the user likes, doing transformations, semantic checks, etc.







|







174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#key411">read</a></b> is properly changed for
push-operation.</p>
<p>Upon successful completion the command returns an abstract syntax tree
as its result.
This AST is in the form specified in section
<b class="sectref">AST serialization format</b>.
As a plain nested Tcl-list it can then be processed with any Tcl
commands the user likes, doing transformations, semantic checks, etc.
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








214
215
216
217
218
219
220






221
222
223
224
225
226
227
228
229
230
231
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_parser_api.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt_parser_api - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt_parser_api - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_parser_api.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt_parser_api.i
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_parser_api(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_parser_api - Parser API</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_parser_api.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt_parser_api.i
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_parser_api(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_parser_api - Parser API</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#read">read</a></b> is properly changed for
push-operation.</p>
<p>Upon successful completion the command returns an abstract syntax tree
as its result.
This AST is in the form specified in section
<span class="sectref"><a href="#section5">AST serialization format</a></span>.
As a plain nested Tcl-list it can then be processed with any Tcl
commands the user likes, doing transformations, semantic checks, etc.







|







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#key411">read</a></b> is properly changed for
push-operation.</p>
<p>Upon successful completion the command returns an abstract syntax tree
as its result.
This AST is in the form specified in section
<span class="sectref"><a href="#section5">AST serialization format</a></span>.
As a plain nested Tcl-list it can then be processed with any Tcl
commands the user likes, doing transformations, semantic checks, etc.
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








467
468
469
470
471
472
473






474
475
476
477
478
479
480
481
482
483
484
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_container.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::container - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::container - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_peg_container.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::container.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::container(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::container - PEG Storage</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_peg_container.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::container.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::container(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::container - PEG Storage</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








650
651
652
653
654
655
656






657
658
659
660
661
662
663
664
665
666
667
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_container_peg.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::container::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::container::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_peg_container_peg.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::container::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::container::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::container::peg - PEG Storage. Canned PEG grammar specification</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_peg_container_peg.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::container::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::container::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::container::peg - PEG Storage. Canned PEG grammar specification</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








149
150
151
152
153
154
155






156
157
158
159
160
161
162
163
164
165
166
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_export.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::export - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::export - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_peg_export.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::export.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export - PEG Export</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_peg_export.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::export.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export - PEG Export</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">struct::map</b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
<li>package require <b class="pkgname">pt::peg::export <span class="opt">?1.0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::peg::export</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>







|


|







141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">configuration</b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
<li>package require <b class="pkgname">pt::peg::export <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::peg::export</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">export serial</b> <i class="arg">serial</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">export object</b> <i class="arg">object</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a manager for parsing expression grammars, with
each instance handling a set of plugins for the export of them to
other formats, i.e. their conversion to, for example <i class="term"><a href="../../../../index.html#nroff">nroff</a></i>,
<i class="term"><a href="../../../../index.html#html">HTML</a></i>, etc.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools,
and is one of the three pillars the management of parsing expression
grammars resides on.</p>
<p><img alt="arch_core_export" src="../../../../image/arch_core_export.png"></p>
<p>The other two pillars are, as shown above</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="pt_peg_import.html">PEG Import</a></i>, and</p></li>







|
|







167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a manager for parsing expression grammars, with
each instance handling a set of plugins for the export of them to
other formats, i.e. their conversion to, for example <i class="term"><a href="../../../../index.html#key21">nroff</a></i>,
<i class="term"><a href="../../../../index.html#key18">HTML</a></i>, etc.</p>
<p>It resides in the Export section of the Core Layer of Parser Tools,
and is one of the three pillars the management of parsing expression
grammars resides on.</p>
<p><img alt="arch_core_export" src="../../../../image/arch_core_export.png"></p>
<p>The other two pillars are, as shown above</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="pt_peg_import.html">PEG Import</a></i>, and</p></li>
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::peg::export</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new export manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>







|







220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::peg::export</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new export manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








522
523
524
525
526
527
528






529
530
531
532
533
534
535
536
537
538
539
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_export_container.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::export::container - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::export::container - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::export::container.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export::container(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export::container - PEG Export Plugin. Write CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::export::container.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export::container(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export::container - PEG Export Plugin. Write CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::export::container <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::container</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::export::container <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::container</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates CONTAINER markup encoding the grammar.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|







179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates CONTAINER markup encoding the grammar.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#container">CONTAINER</a>, <a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








535
536
537
538
539
540
541






542
543
544
545
546
547
548
549
550
551
552
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key349">CONTAINER</a>, <a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_export_json.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::export::json - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::export::json - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::export::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export::json - PEG Export Plugin. Write JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::export::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export::json - PEG Export Plugin. Write JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::export::json <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::export::json <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates JSON markup encoding the grammar.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|







179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates JSON markup encoding the grammar.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#json">JSON</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








588
589
590
591
592
593
594






595
596
597
598
599
600
601
602
603
604
605
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_export_peg.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::export::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::export::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::export::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export::peg - PEG Export Plugin. Write PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::export::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::export::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::export::peg - PEG Export Plugin. Write PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::export::peg <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::peg</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::export::peg <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::peg</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#export">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates PEG markup encoding the grammar.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>







|







179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_to_api.html">Parser Tools Export API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key260">export</a></b> <i class="arg">serial</i> <i class="arg">configuration</i></a></dt>
<dd><p>This command takes the canonical serialization of a parsing expression
grammar, as specified in section <span class="sectref"><a href="#section5">PEG serialization format</a></span>,
and contained in <i class="arg">serial</i>, the <i class="arg">configuration</i>, a dictionary,
and generates PEG markup encoding the grammar.
The created string is then returned as the result of the command.</p></dd>
</dl>
</div>
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#export">export</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








577
578
579
580
581
582
583






584
585
586
587
588
589
590
591
592
593
594
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key260">export</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_from_container.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::from::container - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::from::container - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_peg_from_container.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::from::container.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::from::container(n) 0 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::from::container - PEG Conversion. From CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_peg_from_container.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::from::container.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::from::container(n) 0 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::from::container - PEG Conversion. From CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








147
148
149
150
151
152
153






154
155
156
157
158
159
160
161
162
163
164
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_from_json.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::from::json - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::from::json - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'from.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::from::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::from::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::from::json - PEG Conversion. Read JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'from.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::from::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::from::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::from::json - PEG Conversion. Read JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#json">JSON</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#format_conversion">format conversion</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








556
557
558
559
560
561
562






563
564
565
566
567
568
569
570
571
572
573
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_from_peg.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::from::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::from::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'from.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::from::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::from::peg(n) 1.0.3 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::from::peg - PEG Conversion. Read PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'from.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::from::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::from::peg(n) 1.0.3 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::from::peg - PEG Conversion. Read PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#format_conversion">format conversion</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








535
536
537
538
539
540
541






542
543
544
545
546
547
548
549
550
551
552
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_import.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::import - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::import - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_peg_import.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::import.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import - PEG Import</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_peg_import.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::import.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import - PEG Import</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">fileutil::paths</b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
<li>package require <b class="pkgname">pt::peg::import <span class="opt">?1.0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::peg::import</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">import text</b> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">import file</b> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>







<

|


|







140
141
142
143
144
145
146

147
148
149
150
151
152
153
154
155
156
157
158
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>

<li>package require <b class="pkgname">snit</b></li>
<li>package require <b class="pkgname">configuration</b></li>
<li>package require <b class="pkgname">pt::peg</b></li>
<li>package require <b class="pkgname">pluginmgr</b></li>
<li>package require <b class="pkgname">pt::peg::import <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::peg::import</b> <i class="arg">objectName</i></a></li>
<li><a href="#2"><b class="cmd">objectName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">import text</b> <i class="arg">text</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">import file</b> <i class="arg">path</i> <span class="opt">?<i class="arg">format</i>?</span></a></li>
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a manager for parsing expression grammars, with
each instance handling a set of plugins for the import of them from
other formats, i.e. their conversion from, for example <i class="term">peg</i>,
<i class="term">container</i>, <i class="term"><a href="../../../../index.html#json">json</a></i>, etc.</p>
<p>It resides in the Import section of the Core Layer of Parser Tools,
and is one of the three pillars the management of parsing expression
grammars resides on.</p>
<p><img alt="arch_core_import" src="../../../../image/arch_core_import.png"></p>
<p>The other two pillars are, as shown above</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="pt_peg_export.html">PEG Export</a></i>, and</p></li>







|







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a manager for parsing expression grammars, with
each instance handling a set of plugins for the import of them from
other formats, i.e. their conversion from, for example <i class="term">peg</i>,
<i class="term">container</i>, <i class="term"><a href="../../../../index.html#key206">json</a></i>, etc.</p>
<p>It resides in the Import section of the Core Layer of Parser Tools,
and is one of the three pillars the management of parsing expression
grammars resides on.</p>
<p><img alt="arch_core_import" src="../../../../image/arch_core_import.png"></p>
<p>The other two pillars are, as shown above</p>
<ol class="doctools_enumerated">
<li><p><i class="term"><a href="pt_peg_export.html">PEG Export</a></i>, and</p></li>
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::peg::import</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new import manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#object">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>







|







222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
its plugins in detail.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::peg::import</b> <i class="arg">objectName</i></a></dt>
<dd><p>This command creates a new import manager object with an associated
Tcl command whose name is <i class="arg">objectName</i>. This <i class="term"><a href="../../../../index.html#key243">object</a></i> command
is explained in full detail in the sections <span class="sectref"><a href="#subsection2">Object command</a></span>
and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The object command will be created
under the current namespace if the <i class="arg">objectName</i> is not fully
qualified, and in the specified namespace otherwise.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Object command</a></h3>
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








538
539
540
541
542
543
544






545
546
547
548
549
550
551
552
553
554
555
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_import_container.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::import::container - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::import::container - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_peg_import_container.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::import::container.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import::container(n) 0 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import::container - PEG Import Plugin. From CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_peg_import_container.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::import::container.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import::container(n) 0 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import::container - PEG Import Plugin. From CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








147
148
149
150
151
152
153






154
155
156
157
158
159
160
161
162
163
164
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_import_json.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::import::json - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::import::json - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::import::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import::json - PEG Import Plugin. Read JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::import::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import::json - PEG Import Plugin. Read JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::import::json <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the







|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::import::json <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::json</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_from_api.html">Parser Tools Import API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">text</i></a></dt>
<dd><p>This command takes the JSON markup encoding a parsing
expression grammar and contained in <i class="arg">text</i>, and generates the
canonical serialization of said grammar, as specified in section
<span class="sectref"><a href="#section4">PEG serialization format</a></span>.
The created value is then returned as the result of the command.</p></dd>
</dl>
</div>







|







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_from_api.html">Parser Tools Import API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i></a></dt>
<dd><p>This command takes the JSON markup encoding a parsing
expression grammar and contained in <i class="arg">text</i>, and generates the
canonical serialization of said grammar, as specified in section
<span class="sectref"><a href="#section4">PEG serialization format</a></span>.
The created value is then returned as the result of the command.</p></dd>
</dl>
</div>
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#json">JSON</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#import">import</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








564
565
566
567
568
569
570






571
572
573
574
575
576
577
578
579
580
581
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_import_peg.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::import::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::import::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::import::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import::peg - PEG Import Plugin. Read PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'plugin.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::import::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::import::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::import::peg - PEG Import Plugin. Read PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::import::peg <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::peg</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the







|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::import::peg <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">pt::peg::to::peg</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_from_api.html">Parser Tools Import API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#import">import</a></b> <i class="arg">text</i></a></dt>
<dd><p>This command takes the PEG markup encoding a parsing
expression grammar and contained in <i class="arg">text</i>, and generates the
canonical serialization of said grammar, as specified in section
<span class="sectref"><a href="#section4">PEG serialization format</a></span>.
The created value is then returned as the result of the command.</p></dd>
</dl>
</div>







|







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
</ol>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The API provided by this package satisfies the specification of the
Plugin API found in the <i class="term"><a href="pt_from_api.html">Parser Tools Import API</a></i>
specification.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd"><a href="../../../../index.html#key291">import</a></b> <i class="arg">text</i></a></dt>
<dd><p>This command takes the PEG markup encoding a parsing
expression grammar and contained in <i class="arg">text</i>, and generates the
canonical serialization of said grammar, as specified in section
<span class="sectref"><a href="#section4">PEG serialization format</a></span>.
The created value is then returned as the result of the command.</p></dd>
</dl>
</div>
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#import">import</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#plugin">plugin</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








545
546
547
548
549
550
551






552
553
554
555
556
557
558
559
560
561
562
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key291">import</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key252">plugin</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_interp.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::interp - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::interp - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_peg_interp.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::interp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::interp(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::interp - Interpreter for parsing expression grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_peg_interp.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::interp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::interp(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::interp - Interpreter for parsing expression grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#read">read</a></b> is properly changed for
push-operation.</p>
<p>Upon successful completion the command returns an abstract syntax tree
as its result.
This AST is in the form specified in section
<span class="sectref"><a href="#section2">AST serialization format</a></span>.
As a plain nested Tcl-list it can then be processed with any Tcl
commands the user likes, doing transformations, semantic checks, etc.







|







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#key411">read</a></b> is properly changed for
push-operation.</p>
<p>Upon successful completion the command returns an abstract syntax tree
as its result.
This AST is in the form specified in section
<span class="sectref"><a href="#section2">AST serialization format</a></span>.
As a plain nested Tcl-list it can then be processed with any Tcl
commands the user likes, doing transformations, semantic checks, etc.
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








464
465
466
467
468
469
470






471
472
473
474
475
476
477
478
479
480
481
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_introduction.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::pegrammar - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::pegrammar - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_peg_introduction.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::pegrammar.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pegrammar(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pegrammar - Introduction to Parsing Expression Grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_peg_introduction.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::pegrammar.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pegrammar(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pegrammar - Introduction to Parsing Expression Grammars</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>Welcome to the introduction to <i class="term"><a href="../../../../index.html#parsing_expression_grammar">Parsing Expression Grammar</a></i>s
(short: <i class="term"><a href="../../../../index.html#peg">PEG</a></i>), the formalism used by the Parser Tools.
It is assumed that the reader has a basic knowledge of parsing theory,
i.e. <i class="term">Context-Free Grammars</i> (short: <i class="term"><a href="../../../../index.html#cfg">CFG</a></i>),
<i class="term">languages</i>, and associated terms like <i class="term"><a href="../../../../index.html#ll_k_">LL(k)</a></i>,
<i class="term">LR(k)</i>, <i class="term"><a href="../../../../index.html#terminal">terminal</a></i> and <i class="term">nonterminal</i> <i class="term">symbols</i>,
etc.
We do not intend to recapitulate such basic definitions or terms like
<i class="term">useful</i>, <i class="term">reachable</i>, (left/right) <i class="term">recursive</i>,
<i class="term">nullable</i>, first/last/follow sets, etc.
Please see the <span class="sectref"><a href="#section3">References</a></span> at the end instead if you are in
need of places and books which provide such background information.</p>
<p>PEGs are formally very similar to CFGs, with terminal and nonterminal
symbols, start symbol, and rules defining the structure of each
nonterminal symbol.
The main difference lies in the choice(sic!) of <i class="term">choice</i>
operators. Where CFGs use an <i class="term">unordered choice</i> to represent
alternatives PEGs use <i class="term">prioritized choice</i>. Which is fancy way
of saying that a parser has to try the first alternative first and can
try the other alternatives if only if it fails for the first, and so
on.</p>
<p>On the CFG side this gives rise to LL(k) and LR(k) for making the
choice <i class="term">deterministic</i> with a bounded <i class="term">lookahead</i> of k
terminal symbols, where LL is in essence <i class="term">topdown</i> aka
<i class="term"><a href="../../../../index.html#recursive_descent">recursive descent</a></i> parsing, and LR <i class="term">bottomup</i> aka
<i class="term">shift reduce</i> parsing.</p>
<p>On the PEG side we can parse input with recursive descent and
<i class="term">backtracking</i> of failed choices, the latter of which amounts to
unlimited lookahead.
By additionally recording the success or failure of nonterminals at
the specific locations they were tried at and reusing this information
after backtracking we can avoid the exponential blowup of running time







|
|

|
|
|


















|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>Welcome to the introduction to <i class="term"><a href="../../../../index.html#key14">Parsing Expression Grammar</a></i>s
(short: <i class="term"><a href="../../../../index.html#key6">PEG</a></i>), the formalism used by the Parser Tools.
It is assumed that the reader has a basic knowledge of parsing theory,
i.e. <i class="term">Context-Free Grammars</i> (short: <i class="term"><a href="../../../../index.html#key22">CFG</a></i>),
<i class="term">languages</i>, and associated terms like <i class="term"><a href="../../../../index.html#key15">LL(k)</a></i>,
<i class="term">LR(k)</i>, <i class="term"><a href="../../../../index.html#key92">terminal</a></i> and <i class="term">nonterminal</i> <i class="term">symbols</i>,
etc.
We do not intend to recapitulate such basic definitions or terms like
<i class="term">useful</i>, <i class="term">reachable</i>, (left/right) <i class="term">recursive</i>,
<i class="term">nullable</i>, first/last/follow sets, etc.
Please see the <span class="sectref"><a href="#section3">References</a></span> at the end instead if you are in
need of places and books which provide such background information.</p>
<p>PEGs are formally very similar to CFGs, with terminal and nonterminal
symbols, start symbol, and rules defining the structure of each
nonterminal symbol.
The main difference lies in the choice(sic!) of <i class="term">choice</i>
operators. Where CFGs use an <i class="term">unordered choice</i> to represent
alternatives PEGs use <i class="term">prioritized choice</i>. Which is fancy way
of saying that a parser has to try the first alternative first and can
try the other alternatives if only if it fails for the first, and so
on.</p>
<p>On the CFG side this gives rise to LL(k) and LR(k) for making the
choice <i class="term">deterministic</i> with a bounded <i class="term">lookahead</i> of k
terminal symbols, where LL is in essence <i class="term">topdown</i> aka
<i class="term"><a href="../../../../index.html#key10">recursive descent</a></i> parsing, and LR <i class="term">bottomup</i> aka
<i class="term">shift reduce</i> parsing.</p>
<p>On the PEG side we can parse input with recursive descent and
<i class="term">backtracking</i> of failed choices, the latter of which amounts to
unlimited lookahead.
By additionally recording the success or failure of nonterminals at
the specific locations they were tried at and reusing this information
after backtracking we can avoid the exponential blowup of running time
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<div id="section2" class="doctools_section"><h2><a name="section2">Formal definition</a></h2>
<p>For the mathematically inclined, a Parsing Expression Grammar is a
4-tuple (VN,VT,R,eS) where</p>
<ul class="doctools_itemized">
<li><p>VN is a set of <i class="term">nonterminal symbols</i>,</p></li>
<li><p>VT is a set of <i class="term">terminal symbols</i>,</p></li>
<li><p>R is a finite set of rules, where each rule is a pair (A,e), A in VN,
and <i class="term"><a href="../../../../index.html#e">e</a></i> a <i class="term"><a href="../../../../index.html#parsing_expression">parsing expression</a></i>.</p></li>
<li><p>eS is a parsing expression, the <i class="term">start expression</i>.</p></li>
</ul>
<p>Further constraints are</p>
<ul class="doctools_itemized">
<li><p>The intersection of VN and VT is empty.</p></li>
<li><p>For all A in VT exists exactly one pair (A,e) in R. In other words, R
is a function from nonterminal symbols to parsing expressions.</p></li>
</ul>
<p>Parsing expressions are inductively defined via</p>
<ul class="doctools_itemized">
<li><p>The empty string (epsilon) is a parsing expression.</p></li>
<li><p>A terminal symbol <i class="term">a</i> is a parsing expression.</p></li>
<li><p>A nonterminal symbol <i class="term">A</i> is a parsing expression.</p></li>
<li><p><i class="term">e1</i><i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">sequence</i>.</p></li>
<li><p><i class="term">e1</i>/<i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">ordered choice</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#e">e</a></i>* is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#e">e</a></i>. This is called <i class="term">zero-or-more repetitions</i>, also known
as <i class="term">kleene closure</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#e">e</a></i>+ is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#e">e</a></i>. This is called <i class="term">one-or-more repetitions</i>, also known
as <i class="term">positive kleene closure</i>.</p></li>
<li><p>!<i class="term"><a href="../../../../index.html#e">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called a <i class="term">not lookahead predicate</i>.</p></li>
<li><p>&amp;<i class="term"><a href="../../../../index.html#e">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called an <i class="term">and lookahead predicate</i>.</p></li>
</ul>
<p>PEGs are used to define a grammatical structure for streams of symbols
over VT. They are a modern phrasing of older formalisms invented by
Alexander Birham. These formalisms were called TS (TMG recognition
scheme), and gTS (generalized TS). Later they were renamed to TPDL
(Top-Down Parsing Languages) and gTPDL (generalized TPDL).</p>







|

















|
|

|
|

|

|







193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<div id="section2" class="doctools_section"><h2><a name="section2">Formal definition</a></h2>
<p>For the mathematically inclined, a Parsing Expression Grammar is a
4-tuple (VN,VT,R,eS) where</p>
<ul class="doctools_itemized">
<li><p>VN is a set of <i class="term">nonterminal symbols</i>,</p></li>
<li><p>VT is a set of <i class="term">terminal symbols</i>,</p></li>
<li><p>R is a finite set of rules, where each rule is a pair (A,e), A in VN,
and <i class="term"><a href="../../../../index.html#key807">e</a></i> a <i class="term"><a href="../../../../index.html#key8">parsing expression</a></i>.</p></li>
<li><p>eS is a parsing expression, the <i class="term">start expression</i>.</p></li>
</ul>
<p>Further constraints are</p>
<ul class="doctools_itemized">
<li><p>The intersection of VN and VT is empty.</p></li>
<li><p>For all A in VT exists exactly one pair (A,e) in R. In other words, R
is a function from nonterminal symbols to parsing expressions.</p></li>
</ul>
<p>Parsing expressions are inductively defined via</p>
<ul class="doctools_itemized">
<li><p>The empty string (epsilon) is a parsing expression.</p></li>
<li><p>A terminal symbol <i class="term">a</i> is a parsing expression.</p></li>
<li><p>A nonterminal symbol <i class="term">A</i> is a parsing expression.</p></li>
<li><p><i class="term">e1</i><i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">sequence</i>.</p></li>
<li><p><i class="term">e1</i>/<i class="term">e2</i> is a parsing expression for parsing expressions
<i class="term">e1</i> and <i class="term">2</i>. This is called <i class="term">ordered choice</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key807">e</a></i>* is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#key807">e</a></i>. This is called <i class="term">zero-or-more repetitions</i>, also known
as <i class="term">kleene closure</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key807">e</a></i>+ is a parsing expression for parsing expression
<i class="term"><a href="../../../../index.html#key807">e</a></i>. This is called <i class="term">one-or-more repetitions</i>, also known
as <i class="term">positive kleene closure</i>.</p></li>
<li><p>!<i class="term"><a href="../../../../index.html#key807">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called a <i class="term">not lookahead predicate</i>.</p></li>
<li><p>&amp;<i class="term"><a href="../../../../index.html#key807">e</a></i> is a parsing expression for parsing expression
<i class="term">e1</i>. This is called an <i class="term">and lookahead predicate</i>.</p></li>
</ul>
<p>PEGs are used to define a grammatical structure for streams of symbols
over VT. They are a modern phrasing of older formalisms invented by
Alexander Birham. These formalisms were called TS (TMG recognition
scheme), and gTS (generalized TS). Later they were renamed to TPDL
(Top-Down Parsing Languages) and gTPDL (generalized TPDL).</p>
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








253
254
255
256
257
258
259






260
261
262
263
264
265
266
267
268
269
270
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_language.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg_language - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg_language - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_peg_language.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg_language.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg_language(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg_language - PEG Language Tutorial</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_peg_language.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg_language.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg_language(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg_language - PEG Language Tutorial</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








512
513
514
515
516
517
518






519
520
521
522
523
524
525
526
527
528
529
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_op.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt_peg_op - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt_peg_op - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_peg_op.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt_peg_op.i
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_peg_op(i) 1.1.0 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_peg_op - Parser Tools PE Grammar Utility Operations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::op <span class="opt">?1.1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::peg::peg::op</b> <b class="method">called</b> <i class="arg">container</i></a></li>
<li><a href="#2"><b class="cmd">::peg::peg::op</b> <b class="method">dechain</b> <i class="arg">container</i></a></li>
<li><a href="#3"><b class="cmd">::peg::peg::op</b> <b class="method">drop unreachable</b> <i class="arg">container</i></a></li>
<li><a href="#4"><b class="cmd">::peg::peg::op</b> <b class="method">drop unrealizable</b> <i class="arg">container</i></a></li>
<li><a href="#5"><b class="cmd">::peg::peg::op</b> <b class="method">flatten</b> <i class="arg">container</i></a></li>







|

|

|



|
|
|
|
|
|


|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_peg_op.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt_peg_op.i
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_peg_op(i) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_peg_op - Parser Tools PE Grammar Utility Operations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::peg::op 1.0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::peg::peg::op</b> <b class="method">called</b> <i class="arg">container</i></a></li>
<li><a href="#2"><b class="cmd">::peg::peg::op</b> <b class="method">dechain</b> <i class="arg">container</i></a></li>
<li><a href="#3"><b class="cmd">::peg::peg::op</b> <b class="method">drop unreachable</b> <i class="arg">container</i></a></li>
<li><a href="#4"><b class="cmd">::peg::peg::op</b> <b class="method">drop unrealizable</b> <i class="arg">container</i></a></li>
<li><a href="#5"><b class="cmd">::peg::peg::op</b> <b class="method">flatten</b> <i class="arg">container</i></a></li>
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








262
263
264
265
266
267
268






269
270
271
272
273
274
275
276
277
278
279
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_to_container.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::to::container - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::to::container - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::to::container.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::container(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::container - PEG Conversion. Write CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::to::container.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::container(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::container - PEG Conversion. Write CONTAINER format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#container">CONTAINER</a>, <a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#format_conversion">format conversion</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








549
550
551
552
553
554
555






556
557
558
559
560
561
562
563
564
565
566
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key349">CONTAINER</a>, <a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_to_cparam.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::to::cparam - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::to::cparam - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::to::cparam.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::cparam(n) 1.1.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::cparam - PEG Conversion. Write CPARAM format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::to::cparam.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::cparam(n) 1.1.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::cparam - PEG Conversion. Write CPARAM format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cparam">CPARAM</a>, <a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#format_conversion">format conversion</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








582
583
584
585
586
587
588






589
590
591
592
593
594
595
596
597
598
599
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key810">CPARAM</a>, <a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_to_json.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::to::json - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::to::json - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::to::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::json - PEG Conversion. Write JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::to::json.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::json(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::json - PEG Conversion. Write JSON format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#json">JSON</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#format_conversion">format conversion</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








606
607
608
609
610
611
612






613
614
615
616
617
618
619
620
621
622
623
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key259">JSON</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_to_param.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::to::param - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::to::param - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::to::param.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::param(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::param - PEG Conversion. Write PARAM format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::to::param.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::param(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::param - PEG Conversion. Write PARAM format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#param">PARAM</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#format_conversion">format conversion</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








1067
1068
1069
1070
1071
1072
1073






1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key518">PARAM</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_to_peg.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::to::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::to::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::to::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::peg(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::peg - PEG Conversion. Write PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::to::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::peg(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::peg - PEG Conversion. Write PEG format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#format_conversion">format conversion</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








590
591
592
593
594
595
596






597
598
599
600
601
602
603
604
605
606
607
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_peg_to_tclparam.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg::to::tclparam - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg::to::tclparam - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg::to::tclparam.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::tclparam(n) 1.0.3 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::tclparam - PEG Conversion. Write TCLPARAM format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'to.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg::to::tclparam.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg::to::tclparam(n) 1.0.3 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg::to::tclparam - PEG Conversion. Write TCLPARAM format</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
containing a canned configuration which will generate immediately
useful full parsers. These are</p>
<dl class="doctools_definitions">
<dt><b class="package"><a href="pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></b></dt>
<dd><p>Generated parsers are classes based on the <b class="package"><a href="../snit/snit.html">snit</a></b> package,
i.e. snit::type's.</p></dd>
<dt><b class="package"><a href="pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></b></dt>
<dd><p>Generated parsers are classes based on the <b class="package"><a href="../../../../index.html#oo">OO</a></b> package.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Tcl/PARAM code representation of parsing expression grammars</a></h2>
<p>The Tcl/PARAM representation of parsing expression grammars is Tcl
code whose execution will parse input per the grammar. The code is
based on the virtual machine documented in the
<i class="term"><a href="pt_param.html">PackRat Machine Specification</a></i>, using its instructions







|







281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
containing a canned configuration which will generate immediately
useful full parsers. These are</p>
<dl class="doctools_definitions">
<dt><b class="package"><a href="pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></b></dt>
<dd><p>Generated parsers are classes based on the <b class="package"><a href="../snit/snit.html">snit</a></b> package,
i.e. snit::type's.</p></dd>
<dt><b class="package"><a href="pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></b></dt>
<dd><p>Generated parsers are classes based on the <b class="package">OO</b> package.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Tcl/PARAM code representation of parsing expression grammars</a></h2>
<p>The Tcl/PARAM representation of parsing expression grammars is Tcl
code whose execution will parse input per the grammar. The code is
based on the virtual machine documented in the
<i class="term"><a href="pt_param.html">PackRat Machine Specification</a></i>, using its instructions
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tclparam">TCLPARAM</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#format_conversion">format conversion</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








553
554
555
556
557
558
559






560
561
562
563
564
565
566
567
568
569
570
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key108">TCLPARAM</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key110">format conversion</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_pegrammar.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::peg - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_pegrammar.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg - Parsing Expression Grammar Serialization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_pegrammar.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::peg.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::peg(n) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::peg - Parsing Expression Grammar Serialization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








467
468
469
470
471
472
473






474
475
476
477
478
479
480
481
482
483
484
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_pexpr_op.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::pe::op - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::pe::op - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_pexpr_op.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::pe::op.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pe::op(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pe::op - Parsing Expression Utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_pexpr_op.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::pe::op.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pe::op(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pe::op - Parsing Expression Utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








330
331
332
333
334
335
336






337
338
339
340
341
342
343
344
345
346
347
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_pexpression.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::pe - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::pe - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_pexpression.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::pe.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pe(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pe - Parsing Expression Serialization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_pexpression.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::pe.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pe(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pe - Parsing Expression Serialization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








456
457
458
459
460
461
462






463
464
465
466
467
468
469
470
471
472
473
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_pgen.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::pgen - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::pgen - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_pgen.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::pgen.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pgen(n) 1.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pgen - Parser Generator</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Example</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::pgen <span class="opt">?1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::pgen</b> <i class="arg">inputformat</i> <i class="arg">text</i> <i class="arg">resultformat</i> <span class="opt">?<i class="arg">options...</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a command implementing a
<i class="term"><a href="../../../../index.html#parser_generator">parser generator</a></i>
taking parsing expression grammars as input.</p>
<p>It is the implementation of method <b class="method">generate</b> of <b class="cmd"><a href="../../apps/pt.html">pt</a></b>, the
<i class="term"><a href="../../apps/pt.html">Parser Tools Application</a></i>.</p>
<p>As such the intended audience of this document are people wishing to
modify and/or extend this part of <b class="cmd"><a href="../../apps/pt.html">pt</a></b>'s functionality. Users of
<b class="cmd"><a href="../../apps/pt.html">pt</a></b> on the other hand are hereby refered to the applications'
manpage, i.e. <i class="term"><a href="../../apps/pt.html">Parser Tools Application</a></i>.</p>







|

|

|



|
|
|
|
|
|


|




















|













|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_pgen.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::pgen.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::pgen(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::pgen - Parser Generator</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Example</a></li>
<li class="doctools_section"><a href="#section4">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::pgen <span class="opt">?1.0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::pgen</b> <i class="arg">inputformat</i> <i class="arg">text</i> <i class="arg">resultformat</i> <span class="opt">?<i class="arg">options...</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Are you lost ?
Do you have trouble understanding this document ?
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package provides a command implementing a
<i class="term"><a href="../../../../index.html#key189">parser generator</a></i>
taking parsing expression grammars as input.</p>
<p>It is the implementation of method <b class="method">generate</b> of <b class="cmd"><a href="../../apps/pt.html">pt</a></b>, the
<i class="term"><a href="../../apps/pt.html">Parser Tools Application</a></i>.</p>
<p>As such the intended audience of this document are people wishing to
modify and/or extend this part of <b class="cmd"><a href="../../apps/pt.html">pt</a></b>'s functionality. Users of
<b class="cmd"><a href="../../apps/pt.html">pt</a></b> on the other hand are hereby refered to the applications'
manpage, i.e. <i class="term"><a href="../../apps/pt.html">Parser Tools Application</a></i>.</p>
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








283
284
285
286
287
288
289






290
291
292
293
294
295
296
297
298
299
300
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_rdengine.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::rde - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::rde - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_rdengine.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::rde.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::rde(n) 1.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::rde - Parsing Runtime Support, PARAM based</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_rdengine.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::rde.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::rde(n) 1.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::rde - Parsing Runtime Support, PARAM based</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#read">read</a></b> is properly changed for
push-operation.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">complete</b></a></dt>
<dd><p>This method completes parsing, either returning the AST made from the
elements of ARS, or throwing an error containing the current ER.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">chan</b></a></dt>
<dd><p>This method returns the handle of the channel which is IN.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">line</b></a></dt>







|







294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<p>Note here that the Parser Tools are based on Tcl 8.5+. In other words,
the channel argument is not restricted to files, sockets, etc. We have
the full power of <i class="term">reflected channels</i> available.</p>
<p>It should also be noted that the parser pulls the characters from the
input stream as it needs them. If a parser created by this package has
to be operated in a push aka event-driven manner it will be necessary
to go to Tcl 8.6+ and use the <b class="package"><a href="../coroutine/coro_auto.html">coroutine::auto</a></b> to wrap it
into a coroutine where <b class="cmd"><a href="../../../../index.html#key411">read</a></b> is properly changed for
push-operation.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">complete</b></a></dt>
<dd><p>This method completes parsing, either returning the AST made from the
elements of ARS, or throwing an error containing the current ER.</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">chan</b></a></dt>
<dd><p>This method returns the handle of the channel which is IN.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">line</b></a></dt>
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








816
817
818
819
820
821
822






823
824
825
826
827
828
829
830
831
832
833
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_tclparam_config_nx.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::tclparam::configuration::nx - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::tclparam::configuration::nx - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_tclparam_config_nx.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::tclparam::configuration::nx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::tclparam::configuration::nx(n) 1.0.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::tclparam::configuration::nx - Tcl/PARAM, Canned configuration, NX</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::tclparam::configuration::nx <span class="opt">?1.0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::tclparam::configuration::nx</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>







|

|

|



|
|
|
|
|
|


|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_tclparam_config_nx.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::tclparam::configuration::nx.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::tclparam::configuration::nx(n) 1.0.0 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::tclparam::configuration::nx - Tcl/PARAM, Canned configuration, NX</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">pt::tclparam::configuration::nx <span class="opt">?1.0.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pt::tclparam::configuration::nx</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_tclparam_config_snit.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::tclparam::configuration::snit - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::tclparam::configuration::snit - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_tclparam_config_snit.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::tclparam::configuration::snit.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::tclparam::configuration::snit(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::tclparam::configuration::snit - Tcl/PARAM, Canned configuration, Snit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_tclparam_config_snit.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::tclparam::configuration::snit.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::tclparam::configuration::snit(n) 1.0.2 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::tclparam::configuration::snit - Tcl/PARAM, Canned configuration, Snit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_tclparam_config_tcloo.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::tclparam::configuration::tcloo - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::tclparam::configuration::tcloo - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_tclparam_config_tcloo.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::tclparam::configuration::tcloo.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::tclparam::configuration::tcloo(n) 1.0.4 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::tclparam::configuration::tcloo - Tcl/PARAM, Canned configuration, Tcloo</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_tclparam_config_tcloo.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::tclparam::configuration::tcloo.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::tclparam::configuration::tcloo(n) 1.0.4 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::tclparam::configuration::tcloo - Tcl/PARAM, Canned configuration, Tcloo</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package is an adjunct to <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b>, to make
the use of this highly configurable package easier by providing a
canned configuration. When applied this configuration causes the
package <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b> to generate
<b class="package"><a href="../../../../index.html#oo">OO</a></b>-based parser packages.</p>
<p>It is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::tclparam::configuration::tcloo</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>The command applies the configuration provided by this package to the
<i class="arg">cmdprefix</i>, causing the creation of <b class="package"><a href="../../../../index.html#oo">OO</a></b>-based parsers
whose class is <i class="arg">name</i>, in package <i class="arg">pkg</i> with <i class="arg">version</i>.</p>
<p>The use of a command prefix as API allows application of the
configuration to not only <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b>
(<b class="cmd">pt::peg::to::tclparam configure</b>), but also export manager
instances and PEG containers (<b class="cmd">$export configuration set</b> and
<b class="cmd">[$container exporter] configuration set</b> respectively).</p>
<p>Or anything other command prefix accepting two arguments, option and
value.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|







|

















<
<
<
<
<
<


|








141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
In that case please read the overview provided by the
<i class="term"><a href="pt_introduction.html">Introduction to Parser Tools</a></i>. This document is the
entrypoint to the whole system the current package is a part of.</p>
<p>This package is an adjunct to <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b>, to make
the use of this highly configurable package easier by providing a
canned configuration. When applied this configuration causes the
package <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b> to generate
<b class="package">OO</b>-based parser packages.</p>
<p>It is a supporting package in the Core Layer of Parser Tools.</p>
<p><img alt="arch_core_support" src="../../../../image/arch_core_support.png"></p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pt::tclparam::configuration::tcloo</b> <b class="method">def</b> <i class="arg">name</i> <i class="arg">pkg</i> <i class="arg">version</i> <i class="arg">cmdprefix</i></a></dt>
<dd><p>The command applies the configuration provided by this package to the
<i class="arg">cmdprefix</i>, causing the creation of <b class="package">OO</b>-based parsers
whose class is <i class="arg">name</i>, in package <i class="arg">pkg</i> with <i class="arg">version</i>.</p>
<p>The use of a command prefix as API allows application of the
configuration to not only <b class="package"><a href="pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></b>
(<b class="cmd">pt::peg::to::tclparam configure</b>), but also export manager
instances and PEG containers (<b class="cmd">$export configuration set</b> and
<b class="cmd">[$container exporter] configuration set</b> respectively).</p>
<p>Or anything other command prefix accepting two arguments, option and
value.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_to_api.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt_export_api - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt_export_api - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_to_api.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt_export_api.i
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_export_api(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_export_api - Parser Tools Export API</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_to_api.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt_export_api.i
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt_export_api(i) 1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt_export_api - Parser Tools Export API</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
options any converter has to accept, and thus any plugin as well.
Any other options accepted by a specific plugin will be described in
its manpage.</p></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of an invokation of
	the command <b class="cmd"><a href="../../../../index.html#export">export</a></b>. This call has to leave the plugin in
	a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Options</a></h2>
<p>Each export converter and plugin for an export converter has to accept
the options below in their <b class="method">configure</b> method. Converters are
allowed to ignore the contents of these options when performing a







|







254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
options any converter has to accept, and thus any plugin as well.
Any other options accepted by a specific plugin will be described in
its manpage.</p></dd>
</dl></dd>
</dl>
</li>
<li><p>A single usage cycle of a plugin consists of an invokation of
	the command <b class="cmd"><a href="../../../../index.html#key260">export</a></b>. This call has to leave the plugin in
	a state where another usage cycle can be run without problems.</p></li>
</ol>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Options</a></h2>
<p>Each export converter and plugin for an export converter has to accept
the options below in their <b class="method">configure</b> method. Converters are
allowed to ignore the contents of these options when performing a
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








539
540
541
542
543
544
545






546
547
548
549
550
551
552
553
554
555
556
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/pt/pt_util.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>pt::util - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>pt::util - Parser Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pt_util.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- pt::util.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::util(n) 1.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::util - General utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pt_util.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- pt::util.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">pt::util(n) 1.1 tcllib &quot;Parser Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pt::util - General utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ebnf">EBNF</a>, <a href="../../../../index.html#ll_k_">LL(k)</a>, <a href="../../../../index.html#peg">PEG</a>, <a href="../../../../index.html#tdpl">TDPL</a>, <a href="../../../../index.html#context_free_languages">context-free languages</a>, <a href="../../../../index.html#expression">expression</a>, <a href="../../../../index.html#grammar">grammar</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#parser">parser</a>, <a href="../../../../index.html#parsing_expression">parsing expression</a>, <a href="../../../../index.html#parsing_expression_grammar">parsing expression grammar</a>, <a href="../../../../index.html#push_down_automaton">push down automaton</a>, <a href="../../../../index.html#recursive_descent">recursive descent</a>, <a href="../../../../index.html#state">state</a>, <a href="../../../../index.html#top_down_parsing_languages">top-down parsing languages</a>, <a href="../../../../index.html#transducer">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








172
173
174
175
176
177
178






179
180
181
182
183
184
185
186
187
188
189
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pt</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key3">EBNF</a>, <a href="../../../../index.html#key15">LL(k)</a>, <a href="../../../../index.html#key6">PEG</a>, <a href="../../../../index.html#key7">TDPL</a>, <a href="../../../../index.html#key4">context-free languages</a>, <a href="../../../../index.html#key0">expression</a>, <a href="../../../../index.html#key11">grammar</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key9">parser</a>, <a href="../../../../index.html#key8">parsing expression</a>, <a href="../../../../index.html#key14">parsing expression grammar</a>, <a href="../../../../index.html#key1">push down automaton</a>, <a href="../../../../index.html#key10">recursive descent</a>, <a href="../../../../index.html#key2">state</a>, <a href="../../../../index.html#key13">top-down parsing languages</a>, <a href="../../../../index.html#key12">transducer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Parsing and Grammars</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/rc4/rc4.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>rc4 - RC4 Stream Cipher</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>rc4 - RC4 Stream Cipher</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'rc4.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- rc4.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">rc4(n) 1.1.0 tcllib &quot;RC4 Stream Cipher&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rc4 - Implementation of the RC4 stream cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'rc4.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- rc4.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">rc4(n) 1.1.0 tcllib &quot;RC4 Stream Cipher&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rc4 - Implementation of the RC4 stream cipher</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rc4</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../aes/aes.html">aes(n)</a>, <a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../des/des.html">des(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#arcfour">arcfour</a>, <a href="../../../../index.html#data_integrity">data integrity</a>, <a href="../../../../index.html#encryption">encryption</a>, <a href="../../../../index.html#rc4">rc4</a>, <a href="../../../../index.html#security">security</a>, <a href="../../../../index.html#stream_cipher">stream cipher</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








213
214
215
216
217
218
219






220
221
222
223
224
225
226
227
228
229
230
231
232
233
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rc4</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../aes/aes.html">aes(n)</a>, <a href="../blowfish/blowfish.html">blowfish(n)</a>, <a href="../des/des.html">des(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key125">arcfour</a>, <a href="../../../../index.html#key124">data integrity</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key123">rc4</a>, <a href="../../../../index.html#key122">security</a>, <a href="../../../../index.html#key126">stream cipher</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/rcs/rcs.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>rcs - RCS low level utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>rcs - RCS low level utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'rcs.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005, Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2005, Colin McCormack &amp;lt;coldstore@users.sourceforge.net&amp;gt;
   -->
<!-- rcs.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">rcs(n) 2.0.2 tcllib &quot;RCS low level utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rcs - RCS low level utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'rcs.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;   -- Copyright &copy; 2005, Colin McCormack &lt;coldstore@users.sourceforge.net&gt;
   -->
<! -- rcs.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">rcs(n) 2.0.2 tcllib &quot;RCS low level utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rcs - RCS low level utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<li><a href="#5"><b class="cmd">::rcs::decodeRcsPatch</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd">::rcs::encodeRcsPatch</b> <i class="arg">pcmds</i></a></li>
<li><a href="#7"><b class="cmd">::rcs::applyRcsPatch</b> <i class="arg">text</i> <i class="arg">pcmds</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <i class="term">Revision Control System</i>, short <i class="term"><a href="../../../../index.html#rcs">RCS</a></i>, is a set of
applications and related data formats which allow a system to persist
the history of changes to a text. It, and its relative SCCS are the
basis for many other such systems, like <i class="term"><a href="../../../../index.html#cvs">CVS</a></i>, etc.</p>
<p>This package <em>does not</em> implement RCS.</p>
<p>It only provides a number of low level commands which should be useful
in the implementation of any revision management system, namely:</p>
<ol class="doctools_enumerated">
<li><p>The conversion of texts into and out of a data structures which allow
the easy modification of such text by <i class="term">patches</i>, i.e. sequences
of instructions for the transformation of one text into an other.</p></li>







|


|







141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<li><a href="#5"><b class="cmd">::rcs::decodeRcsPatch</b> <i class="arg">text</i></a></li>
<li><a href="#6"><b class="cmd">::rcs::encodeRcsPatch</b> <i class="arg">pcmds</i></a></li>
<li><a href="#7"><b class="cmd">::rcs::applyRcsPatch</b> <i class="arg">text</i> <i class="arg">pcmds</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <i class="term">Revision Control System</i>, short <i class="term"><a href="../../../../index.html#key633">RCS</a></i>, is a set of
applications and related data formats which allow a system to persist
the history of changes to a text. It, and its relative SCCS are the
basis for many other such systems, like <i class="term"><a href="../../../../index.html#key634">CVS</a></i>, etc.</p>
<p>This package <em>does not</em> implement RCS.</p>
<p>It only provides a number of low level commands which should be useful
in the implementation of any revision management system, namely:</p>
<ol class="doctools_enumerated">
<li><p>The conversion of texts into and out of a data structures which allow
the easy modification of such text by <i class="term">patches</i>, i.e. sequences
of instructions for the transformation of one text into an other.</p></li>
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
stores the resulting text in the file with path <i class="arg">filename</i>. The
file is created if it did not exist, and must be writable. The result
of the command is the empty string.</p></dd>
<dt><a name="5"><b class="cmd">::rcs::decodeRcsPatch</b> <i class="arg">text</i></a></dt>
<dd><p>Converts the <i class="arg">text</i> argument into a patch command list (PCL) as
specified in the section <span class="sectref"><a href="#section5">RCS PATCH COMMAND LIST</a></span> and
returns this list as its result.
It is assumed that the input text is in <i class="term"><a href="../../../../index.html#diff_n_format">diff -n format</a></i>, also
known as <i class="term"><a href="../../../../index.html#rcs_patch">RCS patch</a></i> format, as specified in the section
<span class="sectref"><a href="#section4">RCS PATCH FORMAT</a></span>.
Please note that the command ignores no-ops in the input, in other
words the resulting PCL contains only instructions doing something.</p></dd>
<dt><a name="6"><b class="cmd">::rcs::encodeRcsPatch</b> <i class="arg">pcmds</i></a></dt>
<dd><p>This command provides the complementary operation to
<b class="cmd">::rcs::decodeRcsPatch</b>. It convert a patch comand list (PCL) list
as specified in the section <span class="sectref"><a href="#section5">RCS PATCH COMMAND LIST</a></span> back







|
|







185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
stores the resulting text in the file with path <i class="arg">filename</i>. The
file is created if it did not exist, and must be writable. The result
of the command is the empty string.</p></dd>
<dt><a name="5"><b class="cmd">::rcs::decodeRcsPatch</b> <i class="arg">text</i></a></dt>
<dd><p>Converts the <i class="arg">text</i> argument into a patch command list (PCL) as
specified in the section <span class="sectref"><a href="#section5">RCS PATCH COMMAND LIST</a></span> and
returns this list as its result.
It is assumed that the input text is in <i class="term"><a href="../../../../index.html#key635">diff -n format</a></i>, also
known as <i class="term"><a href="../../../../index.html#key632">RCS patch</a></i> format, as specified in the section
<span class="sectref"><a href="#section4">RCS PATCH FORMAT</a></span>.
Please note that the command ignores no-ops in the input, in other
words the resulting PCL contains only instructions doing something.</p></dd>
<dt><a name="6"><b class="cmd">::rcs::encodeRcsPatch</b> <i class="arg">pcmds</i></a></dt>
<dd><p>This command provides the complementary operation to
<b class="cmd">::rcs::decodeRcsPatch</b>. It convert a patch comand list (PCL) list
as specified in the section <span class="sectref"><a href="#section5">RCS PATCH COMMAND LIST</a></span> back
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
canonical representation of their input text. The commands taking a
dictionary and returning text will generally accept all
representations, canonical or not.</p>
<p>The result of applying a patch to a text dictionary will in general
cause the dictionary to become non-canonical.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">RCS PATCH FORMAT</a></h2>
<p>A <i class="term"><a href="../../../../index.html#patch">patch</a></i> is in general a series of instructions how to transform
an input text T into a different text T', and also encoded in text
form as well.</p>
<p>The text format for patches understood by this package is a very
simple one, known under the names <i class="term"><a href="../../../../index.html#rcs_patch">RCS patch</a></i> or
<i class="term"><a href="../../../../index.html#diff_n_format">diff -n format</a></i>.</p>
<p>Patches in this format contain only two different commands, for the
deletion of old text, and addition of new text. The replacement of
some text by a different text is handled as combination of a deletion
following by an addition.</p>
<p>The format is line oriented, with each line containing either a
command or text data associated with the preceding command.
The first line of a <i class="term"><a href="../../../../index.html#rcs_patch">RCS patch</a></i> is always a command line.</p>
<p>The commands are:</p>
<dl class="doctools_definitions">
<dt>&quot;&quot;</dt>
<dd><p>The empty line is a command which does nothing.</p></dd>
<dt>&quot;a<b class="variable">start</b> <b class="variable">n</b>&quot;</dt>
<dd><p>A line starting with the character <b class="const">a</b> is a command for the
addition of text to the output. It is followed by <b class="variable">n</b> lines of







|



|
|






|







243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
canonical representation of their input text. The commands taking a
dictionary and returning text will generally accept all
representations, canonical or not.</p>
<p>The result of applying a patch to a text dictionary will in general
cause the dictionary to become non-canonical.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">RCS PATCH FORMAT</a></h2>
<p>A <i class="term"><a href="../../../../index.html#key662">patch</a></i> is in general a series of instructions how to transform
an input text T into a different text T', and also encoded in text
form as well.</p>
<p>The text format for patches understood by this package is a very
simple one, known under the names <i class="term"><a href="../../../../index.html#key632">RCS patch</a></i> or
<i class="term"><a href="../../../../index.html#key635">diff -n format</a></i>.</p>
<p>Patches in this format contain only two different commands, for the
deletion of old text, and addition of new text. The replacement of
some text by a different text is handled as combination of a deletion
following by an addition.</p>
<p>The format is line oriented, with each line containing either a
command or text data associated with the preceding command.
The first line of a <i class="term"><a href="../../../../index.html#key632">RCS patch</a></i> is always a command line.</p>
<p>The commands are:</p>
<dl class="doctools_definitions">
<dt>&quot;&quot;</dt>
<dd><p>The empty line is a command which does nothing.</p></dd>
<dt>&quot;a<b class="variable">start</b> <b class="variable">n</b>&quot;</dt>
<dd><p>A line starting with the character <b class="const">a</b> is a command for the
addition of text to the output. It is followed by <b class="variable">n</b> lines of
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rcs</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../../../../index.html#struct">struct</a>, <a href="../textutil/textutil.html">textutil</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cvs">CVS</a>, <a href="../../../../index.html#rcs">RCS</a>, <a href="../../../../index.html#rcs_patch">RCS patch</a>, <a href="../../../../index.html#sccs">SCCS</a>, <a href="../../../../index.html#diff_n_format">diff -n format</a>, <a href="../../../../index.html#patching">patching</a>, <a href="../../../../index.html#text_conversion">text conversion</a>, <a href="../../../../index.html#text_differences">text differences</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2005, Colin McCormack &lt;coldstore@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|


|









330
331
332
333
334
335
336






337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rcs</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../../../../index.html#key327">struct</a>, <a href="../textutil/textutil.html">textutil</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key634">CVS</a>, <a href="../../../../index.html#key633">RCS</a>, <a href="../../../../index.html#key632">RCS patch</a>, <a href="../../../../index.html#key631">SCCS</a>, <a href="../../../../index.html#key635">diff -n format</a>, <a href="../../../../index.html#key636">patching</a>, <a href="../../../../index.html#key638">text conversion</a>, <a href="../../../../index.html#key637">text differences</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2005, Colin McCormack &lt;coldstore@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/report/report.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>report - Matrix reports</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>report - Matrix reports</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'report.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002-2014 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- report.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">report(n) 0.3.2 tcllib &quot;Matrix reports&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>report - Create and manipulate report objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'report.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- report.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">report(n) 0.3.2 tcllib &quot;Matrix reports&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>report - Create and manipulate report objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<li><a href="#14"><i class="arg">reportName</i> <b class="method">bcaption</b> <i class="arg">size</i></a></li>
<li><a href="#15"><i class="arg">reportName</i> <b class="cmd">size</b> <i class="arg">column</i> <span class="opt">?<i class="arg">number</i>|<b class="const">dyn</b>?</span></a></li>
<li><a href="#16"><i class="arg">reportName</i> <b class="cmd">sizes</b> <span class="opt">?<i class="arg">size-list</i>?</span></a></li>
<li><a href="#17"><i class="arg">reportName</i> <b class="cmd">pad</b> <i class="arg">column</i> <span class="opt">?<b class="const">left</b>|<b class="const">right</b>|<b class="const">both</b> <span class="opt">?<i class="arg">padstring</i>?</span>?</span></a></li>
<li><a href="#18"><i class="arg">reportName</i> <b class="cmd">justify</b> <i class="arg">column</i> <span class="opt">?<b class="const">left</b>|<b class="const">right</b>|<b class="const">center</b>?</span></a></li>
<li><a href="#19"><i class="arg">reportName</i> <b class="cmd">printmatrix</b> <i class="arg">matrix</i></a></li>
<li><a href="#20"><i class="arg">reportName</i> <b class="cmd">printmatrix2channel</b> <i class="arg">matrix chan</i></a></li>
<li><a href="#21"><i class="arg">reportName</i> <b class="cmd"><a href="../../../../index.html#columns">columns</a></b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides report objects which can be used by the
formatting methods of matrix objects to generate tabular reports of
the matrix in various forms. The report objects defined here break
each report down into three <span class="sectref"><a href="#section2">REGIONS</a></span> and ten classes of
<i class="term"><a href="../../../../index.html#lines">lines</a></i> (various separator- and data-lines). See the following
section for more detailed explanations.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::report::report</b> <i class="arg">reportName</i> <i class="arg">columns</i> <span class="opt">?<b class="const">style</b> <i class="arg">style arg...</i>?</span></a></dt>
<dd><p>Creates a new report object for a report having <i class="arg">columns</i> columns
with an associated global Tcl command whose name is
<i class="arg">reportName</i>. This command may be used to invoke various
configuration operations on the report. It has the following general







|








|







152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<li><a href="#14"><i class="arg">reportName</i> <b class="method">bcaption</b> <i class="arg">size</i></a></li>
<li><a href="#15"><i class="arg">reportName</i> <b class="cmd">size</b> <i class="arg">column</i> <span class="opt">?<i class="arg">number</i>|<b class="const">dyn</b>?</span></a></li>
<li><a href="#16"><i class="arg">reportName</i> <b class="cmd">sizes</b> <span class="opt">?<i class="arg">size-list</i>?</span></a></li>
<li><a href="#17"><i class="arg">reportName</i> <b class="cmd">pad</b> <i class="arg">column</i> <span class="opt">?<b class="const">left</b>|<b class="const">right</b>|<b class="const">both</b> <span class="opt">?<i class="arg">padstring</i>?</span>?</span></a></li>
<li><a href="#18"><i class="arg">reportName</i> <b class="cmd">justify</b> <i class="arg">column</i> <span class="opt">?<b class="const">left</b>|<b class="const">right</b>|<b class="const">center</b>?</span></a></li>
<li><a href="#19"><i class="arg">reportName</i> <b class="cmd">printmatrix</b> <i class="arg">matrix</i></a></li>
<li><a href="#20"><i class="arg">reportName</i> <b class="cmd">printmatrix2channel</b> <i class="arg">matrix chan</i></a></li>
<li><a href="#21"><i class="arg">reportName</i> <b class="cmd"><a href="../../../../index.html#key507">columns</a></b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides report objects which can be used by the
formatting methods of matrix objects to generate tabular reports of
the matrix in various forms. The report objects defined here break
each report down into three <span class="sectref"><a href="#section2">REGIONS</a></span> and ten classes of
<i class="term"><a href="../../../../index.html#key510">lines</a></i> (various separator- and data-lines). See the following
section for more detailed explanations.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::report::report</b> <i class="arg">reportName</i> <i class="arg">columns</i> <span class="opt">?<b class="const">style</b> <i class="arg">style arg...</i>?</span></a></dt>
<dd><p>Creates a new report object for a report having <i class="arg">columns</i> columns
with an associated global Tcl command whose name is
<i class="arg">reportName</i>. This command may be used to invoke various
configuration operations on the report. It has the following general
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
data region is allowed to be empty.</p></dd>
<dt><a name="20"><i class="arg">reportName</i> <b class="cmd">printmatrix2channel</b> <i class="arg">matrix chan</i></a></dt>
<dd><p>Formats the <i class="arg">matrix</i> according to the configuration of the report
and writes the result into the channel <i class="arg">chan</i>. The matrix has to
have the same number of columns as the report. The matrix also has to
have enough rows so that the top and bottom caption regions do not
overlap. The data region is allowed to be empty.</p></dd>
<dt><a name="21"><i class="arg">reportName</i> <b class="cmd"><a href="../../../../index.html#columns">columns</a></b></a></dt>
<dd><p>Returns the number of columns in the report.</p></dd>
</dl>
<p>The methods <b class="method">size</b>, <b class="method">pad</b> and <b class="method">justify</b> all take
a column index as their first argument. This index is allowed to use
all the forms of an index as accepted by the <b class="cmd">lindex</b> command. The
allowed range for indices is
	&quot;0,...,[<b class="variable">reportName</b> columns]-1&quot;.</p>







|







400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
data region is allowed to be empty.</p></dd>
<dt><a name="20"><i class="arg">reportName</i> <b class="cmd">printmatrix2channel</b> <i class="arg">matrix chan</i></a></dt>
<dd><p>Formats the <i class="arg">matrix</i> according to the configuration of the report
and writes the result into the channel <i class="arg">chan</i>. The matrix has to
have the same number of columns as the report. The matrix also has to
have enough rows so that the top and bottom caption regions do not
overlap. The data region is allowed to be empty.</p></dd>
<dt><a name="21"><i class="arg">reportName</i> <b class="cmd"><a href="../../../../index.html#key507">columns</a></b></a></dt>
<dd><p>Returns the number of columns in the report.</p></dd>
</dl>
<p>The methods <b class="method">size</b>, <b class="method">pad</b> and <b class="method">justify</b> all take
a column index as their first argument. This index is allowed to use
all the forms of an index as accepted by the <b class="cmd">lindex</b> command. The
allowed range for indices is
	&quot;0,...,[<b class="variable">reportName</b> columns]-1&quot;.</p>
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>report</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#matrix">matrix</a>, <a href="../../../../index.html#report">report</a>, <a href="../../../../index.html#table">table</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








462
463
464
465
466
467
468






469
470
471
472
473
474
475
476
477
478
479
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>report</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key107">report</a>, <a href="../../../../index.html#key106">table</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2014 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/rest/rest.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>rest - A framework for RESTful web services</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>rest - A framework for RESTful web services</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'rest.man' by tcllib/doctools with format 'html'
   -->
<!-- rest.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">rest(n) 1.3.1 tcllib &quot;A framework for RESTful web services&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rest - define REST web APIs and call them inline or asychronously</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'rest.man' by tcllib/doctools with format 'html'
   -->
<! -- rest.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">rest(n) 1.2 tcllib &quot;A framework for RESTful web services&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rest - define REST web APIs and call them inline or asychronously</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">rest <span class="opt">?1.3.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::rest::simple</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::rest::get</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::rest::post</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::rest::patch</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::rest::head</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::rest::put</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::rest::delete</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#8"><b class="cmd">::rest::save</b> <i class="arg">name</i> <i class="arg">file</i></a></li>
<li><a href="#9"><b class="cmd">::rest::describe</b> <i class="arg">name</i></a></li>
<li><a href="#10"><b class="cmd">::rest::parameters</b> <i class="arg">url</i> <span class="opt">?<i class="arg">key</i>?</span></a></li>
<li><a href="#11"><b class="cmd">::rest::parse_opts</b> <i class="arg">static</i> <i class="arg">required</i> <i class="arg">optional</i> <i class="arg">words</i></a></li>
<li><a href="#12"><b class="cmd">::rest::substitute</b> <i class="arg">string</i> <i class="arg">var</i></a></li>
<li><a href="#13"><b class="cmd">::rest::create_interface</b> <i class="arg">name</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>There are two types of usage this package supports: <i class="term">simple calls</i>,
and complete <i class="term">interfaces</i>.
In an <i class="term">interface</i> you specify a set of rules and then the package







|





<
|
|
|
|
|
|
|
|
|







124
125
126
127
128
129
130
131
132
133
134
135
136

137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">rest <span class="opt">?1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::rest::simple</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::rest::get</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::rest::post</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>

<li><a href="#4"><b class="cmd">::rest::head</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::rest::put</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::rest::delete</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></li>
<li><a href="#7"><b class="cmd">::rest::save</b> <i class="arg">name</i> <i class="arg">file</i></a></li>
<li><a href="#8"><b class="cmd">::rest::describe</b> <i class="arg">name</i></a></li>
<li><a href="#9"><b class="cmd">::rest::parameters</b> <i class="arg">url</i> <span class="opt">?<i class="arg">key</i>?</span></a></li>
<li><a href="#10"><b class="cmd">::rest::parse_opts</b> <i class="arg">static</i> <i class="arg">required</i> <i class="arg">optional</i> <i class="arg">words</i></a></li>
<li><a href="#11"><b class="cmd">::rest::substitute</b> <i class="arg">string</i> <i class="arg">var</i></a></li>
<li><a href="#12"><b class="cmd">::rest::create_interface</b> <i class="arg">name</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>There are two types of usage this package supports: <i class="term">simple calls</i>,
and complete <i class="term">interfaces</i>.
In an <i class="term">interface</i> you specify a set of rules and then the package
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::rest::simple</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::rest::get</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="3"><b class="cmd">::rest::post</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="4"><b class="cmd">::rest::patch</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">::rest::head</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="6"><b class="cmd">::rest::put</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="7"><b class="cmd">::rest::delete</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd><p>These commands are all equivalent except for the http method
used.
If you use <b class="cmd">simple</b> then the method should be specified as an
option in the <i class="arg">config</i> dictionary. If that is not done it defaults
to <b class="const">get</b>. If a <i class="arg">body</i> is needed then the <i class="arg">config</i>
dictionary must be present, however it is allowed to be empty.</p>
<p>The <i class="arg">config</i> dictionary supports the following keys</p>







<
<
|

|

|







165
166
167
168
169
170
171


172
173
174
175
176
177
178
179
180
181
182
183
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::rest::simple</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::rest::get</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="3"><b class="cmd">::rest::post</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>


<dt><a name="4"><b class="cmd">::rest::head</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="5"><b class="cmd">::rest::put</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd></dd>
<dt><a name="6"><b class="cmd">::rest::delete</b> <i class="arg">url</i> <i class="arg">query</i> <span class="opt">?<i class="arg">config</i>?</span> <span class="opt">?<i class="arg">body</i>?</span></a></dt>
<dd><p>These commands are all equivalent except for the http method
used.
If you use <b class="cmd">simple</b> then the method should be specified as an
option in the <i class="arg">config</i> dictionary. If that is not done it defaults
to <b class="const">get</b>. If a <i class="arg">body</i> is needed then the <i class="arg">config</i>
dictionary must be present, however it is allowed to be empty.</p>
<p>The <i class="arg">config</i> dictionary supports the following keys</p>
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
       req_args { p: }
       opt_args { u: }
    }
    rest::create_interface yweather
    puts [yweather::forecast -p 94089]
</pre>
<dl class="doctools_definitions">
<dt><a name="8"><b class="cmd">::rest::save</b> <i class="arg">name</i> <i class="arg">file</i></a></dt>
<dd><p>This command saves a copy of the dynamically created procedures for
all the API calls specified in the array variable <i class="arg">name</i> to the
<i class="arg">file</i>, for later loading.</p>
<p>The result of the command is the empty string</p></dd>
<dt><a name="9"><b class="cmd">::rest::describe</b> <i class="arg">name</i></a></dt>
<dd><p>This command prints a description of all API calls specified in the array
variable <i class="arg">name</i> to the channel <b class="const">stdout</b>.</p>
<p>The result of the command is the empty string.</p></dd>
<dt><a name="10"><b class="cmd">::rest::parameters</b> <i class="arg">url</i> <span class="opt">?<i class="arg">key</i>?</span></a></dt>
<dd><p>This command parses an <i class="arg">url</i> query string into a dictionary and
returns said dictionary as its result.</p>
<p>If <i class="arg">key</i> is specified the command will not return the
entire dictionary, but only the value of that <i class="arg">key</i>.</p></dd>
<dt><a name="11"><b class="cmd">::rest::parse_opts</b> <i class="arg">static</i> <i class="arg">required</i> <i class="arg">optional</i> <i class="arg">words</i></a></dt>
<dd><p>This command implements a custom parserfor command options.</p>
<dl class="doctools_arguments">
<dt>dict <i class="arg">static</i></dt>
<dd><p>A dictionary of options and their values that are always present in
the output.</p></dd>
<dt>list <i class="arg">required</i></dt>
<dd><p>A list of options that must be supplied by <i class="arg">words</i></p></dd>







|




|



|




|







237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
       req_args { p: }
       opt_args { u: }
    }
    rest::create_interface yweather
    puts [yweather::forecast -p 94089]
</pre>
<dl class="doctools_definitions">
<dt><a name="7"><b class="cmd">::rest::save</b> <i class="arg">name</i> <i class="arg">file</i></a></dt>
<dd><p>This command saves a copy of the dynamically created procedures for
all the API calls specified in the array variable <i class="arg">name</i> to the
<i class="arg">file</i>, for later loading.</p>
<p>The result of the command is the empty string</p></dd>
<dt><a name="8"><b class="cmd">::rest::describe</b> <i class="arg">name</i></a></dt>
<dd><p>This command prints a description of all API calls specified in the array
variable <i class="arg">name</i> to the channel <b class="const">stdout</b>.</p>
<p>The result of the command is the empty string.</p></dd>
<dt><a name="9"><b class="cmd">::rest::parameters</b> <i class="arg">url</i> <span class="opt">?<i class="arg">key</i>?</span></a></dt>
<dd><p>This command parses an <i class="arg">url</i> query string into a dictionary and
returns said dictionary as its result.</p>
<p>If <i class="arg">key</i> is specified the command will not return the
entire dictionary, but only the value of that <i class="arg">key</i>.</p></dd>
<dt><a name="10"><b class="cmd">::rest::parse_opts</b> <i class="arg">static</i> <i class="arg">required</i> <i class="arg">optional</i> <i class="arg">words</i></a></dt>
<dd><p>This command implements a custom parserfor command options.</p>
<dl class="doctools_arguments">
<dt>dict <i class="arg">static</i></dt>
<dd><p>A dictionary of options and their values that are always present in
the output.</p></dd>
<dt>list <i class="arg">required</i></dt>
<dd><p>A list of options that must be supplied by <i class="arg">words</i></p></dd>
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
</dl></dd>
<dt>list <i class="arg">words</i></dt>
<dd><p>The words to parse into options and values.</p></dd>
</dl>
<p>The result of the command is a list containing two elements.
The first element is a dictionary containing the parsed options and
their values.  The second element is a list of the remaining words.</p></dd>
<dt><a name="12"><b class="cmd">::rest::substitute</b> <i class="arg">string</i> <i class="arg">var</i></a></dt>
<dd><p>This command takes a <i class="arg">string</i>, substitutes values for any option
identifiers found inside and returns the modified string as its
results.</p>
<p>The values to substitute are found in the variable <i class="arg">var</i>,
which is expected to contain a dictionary mapping from the option
identifiers to replace to their values.
<em>Note</em> that option identifiers which have no key in <i class="arg">var</i> are
replaced with the empty string.</p>
<p>The option identifiers in <i class="arg">string</i> have to follow the
syntax <b class="const">%...%</b> where <b class="variable">...</b> may contain any combination of
lower-case alphanumeric characters, plus underscore, colon and dash.</p></dd>
<dt><a name="13"><b class="cmd">::rest::create_interface</b> <i class="arg">name</i></a></dt>
<dd><p>This command creates procedures for all the API calls specified in the
array variable <i class="arg">name</i>.</p>
<p>The name of that array becomes a namespace containing the defined
commands. Each key of the array specifies the name of the call, with
the associated configuration a dictionary, i.e. key/value pairs.
The legal keys and their meanings are:</p>
<dl class="doctools_definitions">







|











|







276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
</dl></dd>
<dt>list <i class="arg">words</i></dt>
<dd><p>The words to parse into options and values.</p></dd>
</dl>
<p>The result of the command is a list containing two elements.
The first element is a dictionary containing the parsed options and
their values.  The second element is a list of the remaining words.</p></dd>
<dt><a name="11"><b class="cmd">::rest::substitute</b> <i class="arg">string</i> <i class="arg">var</i></a></dt>
<dd><p>This command takes a <i class="arg">string</i>, substitutes values for any option
identifiers found inside and returns the modified string as its
results.</p>
<p>The values to substitute are found in the variable <i class="arg">var</i>,
which is expected to contain a dictionary mapping from the option
identifiers to replace to their values.
<em>Note</em> that option identifiers which have no key in <i class="arg">var</i> are
replaced with the empty string.</p>
<p>The option identifiers in <i class="arg">string</i> have to follow the
syntax <b class="const">%...%</b> where <b class="variable">...</b> may contain any combination of
lower-case alphanumeric characters, plus underscore, colon and dash.</p></dd>
<dt><a name="12"><b class="cmd">::rest::create_interface</b> <i class="arg">name</i></a></dt>
<dd><p>This command creates procedures for all the API calls specified in the
array variable <i class="arg">name</i>.</p>
<p>The name of that array becomes a namespace containing the defined
commands. Each key of the array specifies the name of the call, with
the associated configuration a dictionary, i.e. key/value pairs.
The legal keys and their meanings are:</p>
<dl class="doctools_definitions">
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
<dd></dd>
</dl>
<p>Please either read the package's implementation, or use
<b class="cmd">rest::describe</b> after loading it for their details.</p>
<p>Do not forget developers' documentation on the respective sites either.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">TLS</a></h2>
<p>The <b class="package">rest</b> package can be used with <i class="term"><a href="../../../../index.html#https">https</a></i>-secured
services, by requiring the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package and then registering
it with the <b class="package"><a href="../../../../index.html#http">http</a></b> package it is sitting on top of.
Example</p>
<pre class="doctools_example">
    package require tls
    http::register https 443 ::tls::socket
</pre>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rest</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
</div></body></html>







|
|
|







|
|

|







|
|















<
<
<
<
<
<


528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572






573
574
<dd></dd>
</dl>
<p>Please either read the package's implementation, or use
<b class="cmd">rest::describe</b> after loading it for their details.</p>
<p>Do not forget developers' documentation on the respective sites either.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">TLS</a></h2>
<p>The <b class="package">rest</b> package can be used with <i class="term">https</i>-secured
services, by requiring the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package and then registering
it with the <b class="package"><a href="../../../../index.html#key446">http</a></b> package it is sitting on top of.
Example</p>
<pre class="doctools_example">
    package require tls
    http::register https 443 ::tls::socket
</pre>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>rest</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/ripemd/ripemd128.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>ripemd128 - RIPEMD Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>ripemd128 - RIPEMD Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ripemd128.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- ripemd128.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ripemd128(n) 1.0.5 tcllib &quot;RIPEMD Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ripemd128 - RIPEMD-128 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ripemd128.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- ripemd128.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ripemd128(n) 1.0.5 tcllib &quot;RIPEMD Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ripemd128 - RIPEMD-128 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ripemd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="ripemd160.html">ripemd160</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ripemd">RIPEMD</a>, <a href="../../../../index.html#hashing">hashing</a>, <a href="../../../../index.html#md4">md4</a>, <a href="../../../../index.html#message_digest">message-digest</a>, <a href="../../../../index.html#rfc_1320">rfc 1320</a>, <a href="../../../../index.html#rfc_1321">rfc 1321</a>, <a href="../../../../index.html#rfc_2104">rfc 2104</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








261
262
263
264
265
266
267






268
269
270
271
272
273
274
275
276
277
278
279
280
281
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ripemd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="ripemd160.html">ripemd160</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key378">RIPEMD</a>, <a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key380">md4</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key379">rfc 1320</a>, <a href="../../../../index.html#key381">rfc 1321</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/ripemd/ripemd160.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>ripemd160 - RIPEMD Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>ripemd160 - RIPEMD Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ripemd160.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- ripemd160.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ripemd160(n) 1.0.5 tcllib &quot;RIPEMD Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ripemd160 - RIPEMD-160 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ripemd160.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- ripemd160.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">ripemd160(n) 1.0.5 tcllib &quot;RIPEMD Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ripemd160 - RIPEMD-160 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ripemd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="ripemd128.html">ripemd128</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ripemd">RIPEMD</a>, <a href="../../../../index.html#hashing">hashing</a>, <a href="../../../../index.html#md4">md4</a>, <a href="../../../../index.html#message_digest">message-digest</a>, <a href="../../../../index.html#rfc_1320">rfc 1320</a>, <a href="../../../../index.html#rfc_1321">rfc 1321</a>, <a href="../../../../index.html#rfc_2104">rfc 2104</a>, <a href="../../../../index.html#security">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








250
251
252
253
254
255
256






257
258
259
260
261
262
263
264
265
266
267
268
269
270
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>ripemd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="ripemd128.html">ripemd128</a>, <a href="../sha1/sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key378">RIPEMD</a>, <a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key380">md4</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key379">rfc 1320</a>, <a href="../../../../index.html#key381">rfc 1321</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/sasl/gtoken.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>SASL::XGoogleToken - Simple Authentication and Security Layer (SASL)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>SASL::XGoogleToken - Simple Authentication and Security Layer (SASL)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'gtoken.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- SASL::XGoogleToken.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL::XGoogleToken(n) 1.0.1 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL::XGoogleToken - Implementation of SASL NTLM mechanism for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'gtoken.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- SASL::XGoogleToken.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL::XGoogleToken(n) 1.0.1 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL::XGoogleToken - Implementation of SASL NTLM mechanism for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the XGoogleToken authentication mechanism for
the Simple Authentication and Security Layer (SASL).</p>
<p>Please read the documentation for package <b class="package">sasl</b>
for details.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#sasl">SASL</a>, <a href="../../../../index.html#xgoogletoken">XGoogleToken</a>, <a href="../../../../index.html#authentication">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|
|

|







|
|


















<
<
<
<
<
<


|








136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the XGoogleToken authentication mechanism for
the Simple Authentication and Security Layer (SASL).</p>
<p>Please read the documentation for package <b class="package">sasl</b>
for details.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">AUTHORS</a></h2>
<p>Pat Thoyts</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key396">SASL</a>, <a href="../../../../index.html#key395">XGoogleToken</a>, <a href="../../../../index.html#key394">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/sasl/ntlm.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>SASL::NTLM - Simple Authentication and Security Layer (SASL)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>SASL::NTLM - Simple Authentication and Security Layer (SASL)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ntlm.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005-2006, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- SASL::NTLM.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL::NTLM(n) 1.1.2 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL::NTLM - Implementation of SASL NTLM mechanism for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ntlm.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005-2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- SASL::NTLM.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL::NTLM(n) 1.1.2 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL::NTLM - Implementation of SASL NTLM mechanism for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ntlm">NTLM</a>, <a href="../../../../index.html#sasl">SASL</a>, <a href="../../../../index.html#authentication">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








152
153
154
155
156
157
158






159
160
161
162
163
164
165
166
167
168
169
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key711">NTLM</a>, <a href="../../../../index.html#key396">SASL</a>, <a href="../../../../index.html#key394">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/sasl/sasl.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>SASL - Simple Authentication and Security Layer (SASL)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>SASL - Simple Authentication and Security Layer (SASL)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'sasl.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005-2006, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- SASL.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL(n) 1.3.3 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL - Implementation of SASL mechanisms for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'sasl.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005-2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- SASL.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL(n) 1.3.3 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL - Implementation of SASL mechanisms for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#sasl">SASL</a>, <a href="../../../../index.html#authentication">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








386
387
388
389
390
391
392






393
394
395
396
397
398
399
400
401
402
403
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key396">SASL</a>, <a href="../../../../index.html#key394">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/sasl/scram.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>SASL::SCRAM - Simple Authentication and Security Layer (SASL)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>SASL::SCRAM - Simple Authentication and Security Layer (SASL)</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'scram.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2013 Sergei Golovan &amp;lt;sgolovan@nes.ru&amp;gt;
   -->
<!-- SASL::SCRAM.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL::SCRAM(n) 0.1 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL::SCRAM - Implementation of SASL SCRAM mechanism for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'scram.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2013 Sergei Golovan &lt;sgolovan@nes.ru&gt;
   -->
<! -- SASL::SCRAM.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">SASL::SCRAM(n) 0.1 tcllib &quot;Simple Authentication and Security Layer (SASL)&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>SASL::SCRAM - Implementation of SASL SCRAM mechanism for Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#sasl">SASL</a>, <a href="../../../../index.html#scram">SCRAM</a>, <a href="../../../../index.html#authentication">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2013 Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








152
153
154
155
156
157
158






159
160
161
162
163
164
165
166
167
168
169
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sasl</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key396">SASL</a>, <a href="../../../../index.html#key768">SCRAM</a>, <a href="../../../../index.html#key394">authentication</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2013 Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/sha1/sha1.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>sha1 - SHA-x Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>sha1 - SHA-x Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'sha1.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- sha1.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sha1(n) 2.0.4 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sha1 - SHA1 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'sha1.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- sha1.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sha1(n) 2.0.3 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sha1 - SHA1 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sha1 <span class="opt">?2.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::sha1::sha1</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::sha1::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></li>
<li><a href="#3"><b class="cmd">::sha1::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#4"><b class="cmd">::sha1::SHA1Init</b></a></li>
<li><a href="#5"><b class="cmd">::sha1::SHA1Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>







|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sha1 <span class="opt">?2.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::sha1::sha1</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::sha1::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></li>
<li><a href="#3"><b class="cmd">::sha1::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#4"><b class="cmd">::sha1::SHA1Init</b></a></li>
<li><a href="#5"><b class="cmd">::sha1::SHA1Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
giving <i class="arg">-bin</i>.</p>
<p>The data to be hashed can be specified either as a string argument to
the <b class="cmd">sha1</b> command, or as a filename or a pre-opened channel. If the
<i class="arg">-filename</i> argument is given then the file is opened, the data read
and hashed and the file is closed. If the <i class="arg">-channel</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed. <em>NOTE</em> use of the channel or filename
options results in the internal use of <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b>. To avoid nested
event loops in Tk or tclhttpd applications you should use the
incremental programming API (see below).</p>
<p>Only one of <i class="arg">-file</i>, <i class="arg">-channel</i> or <i class="arg">string</i> should be given.</p>
<p>If the <i class="arg">string</i> to hash can be mistaken for an option
(leading dash &quot;-&quot;), use the option <b class="option">--</b> before it to terminate
option processing and force interpretation as a string.</p></dd>
<dt><a name="2"><b class="cmd">::sha1::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></dt>







|







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
giving <i class="arg">-bin</i>.</p>
<p>The data to be hashed can be specified either as a string argument to
the <b class="cmd">sha1</b> command, or as a filename or a pre-opened channel. If the
<i class="arg">-filename</i> argument is given then the file is opened, the data read
and hashed and the file is closed. If the <i class="arg">-channel</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed. <em>NOTE</em> use of the channel or filename
options results in the internal use of <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>. To avoid nested
event loops in Tk or tclhttpd applications you should use the
incremental programming API (see below).</p>
<p>Only one of <i class="arg">-file</i>, <i class="arg">-channel</i> or <i class="arg">string</i> should be given.</p>
<p>If the <i class="arg">string</i> to hash can be mistaken for an option
(leading dash &quot;-&quot;), use the option <b class="option">--</b> before it to terminate
option processing and force interpretation as a string.</p></dd>
<dt><a name="2"><b class="cmd">::sha1::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></dt>
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sha1</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="../ripemd/ripemd128.html">ripemd128</a>, <a href="../ripemd/ripemd160.html">ripemd160</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#fips_180_1">FIPS 180-1</a>, <a href="../../../../index.html#hashing">hashing</a>, <a href="../../../../index.html#message_digest">message-digest</a>, <a href="../../../../index.html#rfc_2104">rfc 2104</a>, <a href="../../../../index.html#security">security</a>, <a href="../../../../index.html#sha1">sha1</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








260
261
262
263
264
265
266






267
268
269
270
271
272
273
274
275
276
277
278
279
280
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sha1</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="../ripemd/ripemd128.html">ripemd128</a>, <a href="../ripemd/ripemd160.html">ripemd160</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key213">FIPS 180-1</a>, <a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a>, <a href="../../../../index.html#key441">sha1</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/sha1/sha256.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>sha256 - SHA-x Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>sha256 - SHA-x Message-Digest Algorithm</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'sha256.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008, Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- sha256.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sha256(n) 1.0.4 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sha256 - SHA256 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'sha256.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- sha256.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sha256(n) 1.0.3 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sha256 - SHA256 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sha256 <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::sha2::sha256</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::sha2::sha224</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::sha2::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></li>
<li><a href="#4"><b class="cmd">::sha2::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#5"><b class="cmd">::sha2::SHA256Init</b></a></li>







|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sha256 <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::sha2::sha256</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::sha2::sha224</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::sha2::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></li>
<li><a href="#4"><b class="cmd">::sha2::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#5"><b class="cmd">::sha2::SHA256Init</b></a></li>
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
data by giving <i class="arg">-bin</i>.</p>
<p>The data to be hashed can be specified either as a string argument to
the <b class="cmd">sha256</b> command, or as a filename or a pre-opened channel. If the
<i class="arg">-filename</i> argument is given then the file is opened, the data read
and hashed and the file is closed. If the <i class="arg">-channel</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed. <em>NOTE</em> use of the channel or filename
options results in the internal use of <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b>. To avoid nested
event loops in Tk or tclhttpd applications you should use the
incremental programming API (see below).</p>
<p>Only one of <i class="arg">-file</i>, <i class="arg">-channel</i> or <i class="arg">string</i> should be given.</p>
<p>If the <i class="arg">string</i> to hash can be mistaken for an option
(leading dash &quot;-&quot;), use the option <b class="option">--</b> before it to terminate
option processing and force interpretation as a string.</p></dd>
<dt><a name="2"><b class="cmd">::sha2::sha224</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></dt>







|







167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
data by giving <i class="arg">-bin</i>.</p>
<p>The data to be hashed can be specified either as a string argument to
the <b class="cmd">sha256</b> command, or as a filename or a pre-opened channel. If the
<i class="arg">-filename</i> argument is given then the file is opened, the data read
and hashed and the file is closed. If the <i class="arg">-channel</i> argument is
given then data is read from the channel until the end of file. The
channel is not closed. <em>NOTE</em> use of the channel or filename
options results in the internal use of <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>. To avoid nested
event loops in Tk or tclhttpd applications you should use the
incremental programming API (see below).</p>
<p>Only one of <i class="arg">-file</i>, <i class="arg">-channel</i> or <i class="arg">string</i> should be given.</p>
<p>If the <i class="arg">string</i> to hash can be mistaken for an option
(leading dash &quot;-&quot;), use the option <b class="option">--</b> before it to terminate
option processing and force interpretation as a string.</p></dd>
<dt><a name="2"><b class="cmd">::sha2::sha224</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></dt>
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sha1</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="../ripemd/ripemd128.html">ripemd128</a>, <a href="../ripemd/ripemd160.html">ripemd160</a>, <a href="sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#fips_180_1">FIPS 180-1</a>, <a href="../../../../index.html#hashing">hashing</a>, <a href="../../../../index.html#message_digest">message-digest</a>, <a href="../../../../index.html#rfc_2104">rfc 2104</a>, <a href="../../../../index.html#security">security</a>, <a href="../../../../index.html#sha256">sha256</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








269
270
271
272
273
274
275






276
277
278
279
280
281
282
283
284
285
286
287
288
289
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>sha1</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../md4/md4.html">md4</a>, <a href="../md5/md5.html">md5</a>, <a href="../ripemd/ripemd128.html">ripemd128</a>, <a href="../ripemd/ripemd160.html">ripemd160</a>, <a href="sha1.html">sha1</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key213">FIPS 180-1</a>, <a href="../../../../index.html#key216">hashing</a>, <a href="../../../../index.html#key215">message-digest</a>, <a href="../../../../index.html#key214">rfc 2104</a>, <a href="../../../../index.html#key122">security</a>, <a href="../../../../index.html#key212">sha256</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008, Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/simulation/annealing.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>simulation::annealing - Tcl Simulation Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>simulation::annealing - Tcl Simulation Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'annealing.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;
   -->
<!-- simulation::annealing.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">simulation::annealing(n) 0.2 tcllib &quot;Tcl Simulation Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>simulation::annealing - Simulated annealing</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'annealing.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;
   -->
<! -- simulation::annealing.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">simulation::annealing(n) 0.2 tcllib &quot;Tcl Simulation Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>simulation::annealing - Simulated annealing</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
solution you may want to try different values of the trials parameter
for instance. Also ensure that the function to be minimized depends on
all or most parameters - see the source code for a counter example and
run that.</p></li>
</ul>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#optimization">optimization</a>, <a href="../../../../index.html#simulated_annealing">simulated annealing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|








312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
solution you may want to try different values of the trials parameter
for instance. Also ensure that the function to be minimized depends on
all or most parameters - see the source code for a counter example and
run that.</p></li>
</ul>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key311">optimization</a>, <a href="../../../../index.html#key319">simulated annealing</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/simulation/montecarlo.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>simulation::montecarlo - Tcl Simulation Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>simulation::montecarlo - Tcl Simulation Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'montecarlo.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;
   -->
<!-- simulation::montecarlo.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">simulation::montecarlo(n) 0.1 tcllib &quot;Tcl Simulation Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>simulation::montecarlo - Monte Carlo simulations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'montecarlo.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;
   -->
<! -- simulation::montecarlo.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">simulation::montecarlo(n) 0.1 tcllib &quot;Tcl Simulation Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>simulation::montecarlo - Monte Carlo simulations</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<p>The procedure <i class="term">singleExperiment</i> works by constructing a
temporary procedure that does the actual work. It loops for the given
number of trials.</p>
<p>As it constructs a temporary procedure, local variables defined at the
start continue to exist in the loop.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#montecarlo_simulation">montecarlo simulation</a>, <a href="../../../../index.html#stochastic_modelling">stochastic modelling</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|








283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<p>The procedure <i class="term">singleExperiment</i> works by constructing a
temporary procedure that does the actual work. It loops for the given
number of trials.</p>
<p>As it constructs a temporary procedure, local variables defined at the
start continue to exist in the loop.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key748">montecarlo simulation</a>, <a href="../../../../index.html#key747">stochastic modelling</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/simulation/simulation_random.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>simulation::random - Tcl Simulation Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>simulation::random - Tcl Simulation Tools</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'simulation_random.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Arjen Markus &amp;lt;arjenmarkus@users.sourceforge.net&amp;gt;
   -->
<!-- simulation::random.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">simulation::random(n) 0.4 tcllib &quot;Tcl Simulation Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>simulation::random - Pseudo-random number generators</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.4?</span></b></li>
<li>package require <b class="pkgname">simulation::random 0.4</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::simulation::random::prng_Bernoulli</b> <i class="arg">p</i></a></li>
<li><a href="#2"><b class="cmd">::simulation::random::prng_Discrete</b> <i class="arg">n</i></a></li>
<li><a href="#3"><b class="cmd">::simulation::random::prng_Poisson</b> <i class="arg">lambda</i></a></li>
<li><a href="#4"><b class="cmd">::simulation::random::prng_Uniform</b> <i class="arg">min</i> <i class="arg">max</i></a></li>
<li><a href="#5"><b class="cmd">::simulation::random::prng_Triangular</b> <i class="arg">min</i> <i class="arg">max</i></a></li>
<li><a href="#6"><b class="cmd">::simulation::random::prng_SymmTriangular</b> <i class="arg">min</i> <i class="arg">max</i></a></li>
<li><a href="#7"><b class="cmd">::simulation::random::prng_Exponential</b> <i class="arg">min</i> <i class="arg">mean</i></a></li>
<li><a href="#8"><b class="cmd">::simulation::random::prng_Normal</b> <i class="arg">mean</i> <i class="arg">stdev</i></a></li>
<li><a href="#9"><b class="cmd">::simulation::random::prng_Pareto</b> <i class="arg">min</i> <i class="arg">steep</i></a></li>
<li><a href="#10"><b class="cmd">::simulation::random::prng_Gumbel</b> <i class="arg">min</i> <i class="arg">f</i></a></li>
<li><a href="#11"><b class="cmd">::simulation::random::prng_chiSquared</b> <i class="arg">df</i></a></li>
<li><a href="#12"><b class="cmd">::simulation::random::prng_Disk</b> <i class="arg">rad</i></a></li>
<li><a href="#13"><b class="cmd">::simulation::random::prng_Sphere</b> <i class="arg">rad</i></a></li>
<li><a href="#14"><b class="cmd">::simulation::random::prng_Ball</b> <i class="arg">rad</i></a></li>
<li><a href="#15"><b class="cmd">::simulation::random::prng_Rectangle</b> <i class="arg">length</i> <i class="arg">width</i></a></li>
<li><a href="#16"><b class="cmd">::simulation::random::prng_Block</b> <i class="arg">length</i> <i class="arg">width</i> <i class="arg">depth</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package consists of commands to generate pseudo-random number
generators. These new commands deliver</p>
<ul class="doctools_itemized">







|

|

|



|
|
|
|
|
|


|


















|






<
<
|
|
|
|
|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136


137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'simulation_random.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;
   -->
<! -- simulation::random.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">simulation::random(n) 0.1 tcllib &quot;Tcl Simulation Tools&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>simulation::random - Pseudo-random number generators</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">PROCEDURES</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl <span class="opt">?8.4?</span></b></li>
<li>package require <b class="pkgname">simulation::random 0.1</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::simulation::random::prng_Bernoulli</b> <i class="arg">p</i></a></li>
<li><a href="#2"><b class="cmd">::simulation::random::prng_Discrete</b> <i class="arg">n</i></a></li>
<li><a href="#3"><b class="cmd">::simulation::random::prng_Poisson</b> <i class="arg">lambda</i></a></li>
<li><a href="#4"><b class="cmd">::simulation::random::prng_Uniform</b> <i class="arg">min</i> <i class="arg">max</i></a></li>


<li><a href="#5"><b class="cmd">::simulation::random::prng_Exponential</b> <i class="arg">min</i> <i class="arg">mean</i></a></li>
<li><a href="#6"><b class="cmd">::simulation::random::prng_Normal</b> <i class="arg">mean</i> <i class="arg">stdev</i></a></li>
<li><a href="#7"><b class="cmd">::simulation::random::prng_Pareto</b> <i class="arg">min</i> <i class="arg">steep</i></a></li>
<li><a href="#8"><b class="cmd">::simulation::random::prng_Gumbel</b> <i class="arg">min</i> <i class="arg">f</i></a></li>
<li><a href="#9"><b class="cmd">::simulation::random::prng_chiSquared</b> <i class="arg">df</i></a></li>
<li><a href="#10"><b class="cmd">::simulation::random::prng_Disk</b> <i class="arg">rad</i></a></li>
<li><a href="#11"><b class="cmd">::simulation::random::prng_Sphere</b> <i class="arg">rad</i></a></li>
<li><a href="#12"><b class="cmd">::simulation::random::prng_Ball</b> <i class="arg">rad</i></a></li>
<li><a href="#13"><b class="cmd">::simulation::random::prng_Rectangle</b> <i class="arg">length</i> <i class="arg">width</i></a></li>
<li><a href="#14"><b class="cmd">::simulation::random::prng_Block</b> <i class="arg">length</i> <i class="arg">width</i> <i class="arg">depth</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package consists of commands to generate pseudo-random number
generators. These new commands deliver</p>
<ul class="doctools_itemized">
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
between &quot;min&quot; and &quot;max&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">max</i></dt>
<dd><p>Maximum number that will be generated</p></dd>
</dl></dd>
<dt><a name="5"><b class="cmd">::simulation::random::prng_Triangular</b> <i class="arg">min</i> <i class="arg">max</i></a></dt>
<dd><p>Create a command (PRNG) that generates triangularly distributed numbers
between &quot;min&quot; and &quot;max&quot;. If the argument min is lower than the argument max, then smaller
values have higher probability and vice versa. In the first case the probability
density function is of the form <em>f(x) = 2(1-x)</em> and the other case it is of the form <em>f(x) = 2x</em>.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">max</i></dt>
<dd><p>Maximum number that will be generated</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::simulation::random::prng_SymmTriangular</b> <i class="arg">min</i> <i class="arg">max</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers distributed according to a symmetric triangle
around the mean of &quot;min&quot; and &quot;max&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">max</i></dt>
<dd><p>Maximum number that will be generated</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::simulation::random::prng_Exponential</b> <i class="arg">min</i> <i class="arg">mean</i></a></dt>
<dd><p>Create a command (PRNG) that generates exponentially distributed numbers
with a given minimum value and a given mean value.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">mean</i></dt>
<dd><p>Mean value for the numbers</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::simulation::random::prng_Normal</b> <i class="arg">mean</i> <i class="arg">stdev</i></a></dt>
<dd><p>Create a command (PRNG) that generates normally distributed numbers
with a given mean value and a given standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>Mean value for the numbers</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>Standard deviation</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::simulation::random::prng_Pareto</b> <i class="arg">min</i> <i class="arg">steep</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers distributed according to
Pareto with a given minimum value and a given distribution steepness.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">steep</i></dt>
<dd><p>Steepness of the distribution</p></dd>
</dl></dd>
<dt><a name="10"><b class="cmd">::simulation::random::prng_Gumbel</b> <i class="arg">min</i> <i class="arg">f</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers distributed according to
Gumbel with a given minimum value and a given scale factor. The
probability density function is:</p>
<pre class="doctools_example">
     P(v) = exp( -exp(f*(v-min)))
</pre>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">f</i></dt>
<dd><p>Scale factor for the values</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::simulation::random::prng_chiSquared</b> <i class="arg">df</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers distributed according to
the chi-squared distribution with df degrees of freedom. The mean is 0
and the standard deviation is 1.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>Degrees of freedom</p></dd>
</dl></dd>
</dl>
<p>The package defines the following public procedures for random point sets:</p>
<dl class="doctools_definitions">
<dt><a name="12"><b class="cmd">::simulation::random::prng_Disk</b> <i class="arg">rad</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y)-coordinates for points
uniformly spread over a disk of given radius.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">rad</i></dt>
<dd><p>Radius of the disk</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::simulation::random::prng_Sphere</b> <i class="arg">rad</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y,z)-coordinates for points
uniformly spread over the surface of a sphere of given radius.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">rad</i></dt>
<dd><p>Radius of the disk</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::simulation::random::prng_Ball</b> <i class="arg">rad</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y,z)-coordinates for points
uniformly spread within a ball of given radius.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">rad</i></dt>
<dd><p>Radius of the ball</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">::simulation::random::prng_Rectangle</b> <i class="arg">length</i> <i class="arg">width</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y)-coordinates for points
uniformly spread over a rectangle.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">length</i></dt>
<dd><p>Length of the rectangle (x-direction)</p></dd>
<dt>float <i class="arg">width</i></dt>
<dd><p>Width of the rectangle (y-direction)</p></dd>
</dl></dd>
<dt><a name="16"><b class="cmd">::simulation::random::prng_Block</b> <i class="arg">length</i> <i class="arg">width</i> <i class="arg">depth</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y,z)-coordinates for points
uniformly spread over a block</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">length</i></dt>
<dd><p>Length of the block (x-direction)</p></dd>
<dt>float <i class="arg">width</i></dt>
<dd><p>Width of the block (y-direction)</p></dd>
<dt>float <i class="arg">depth</i></dt>
<dd><p>Depth of the block (z-direction)</p></dd>
</dl></dd>
</dl>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#math">math</a>, <a href="../../../../index.html#random_numbers">random numbers</a>, <a href="../../../../index.html#simulation">simulation</a>, <a href="../../../../index.html#statistical_distribution">statistical distribution</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|








|








|








|












|










|






|






|






|








|













|








196
197
198
199
200
201
202




















203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
between &quot;min&quot; and &quot;max&quot;.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">max</i></dt>
<dd><p>Maximum number that will be generated</p></dd>
</dl></dd>




















<dt><a name="5"><b class="cmd">::simulation::random::prng_Exponential</b> <i class="arg">min</i> <i class="arg">mean</i></a></dt>
<dd><p>Create a command (PRNG) that generates exponentially distributed numbers
with a given minimum value and a given mean value.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">mean</i></dt>
<dd><p>Mean value for the numbers</p></dd>
</dl></dd>
<dt><a name="6"><b class="cmd">::simulation::random::prng_Normal</b> <i class="arg">mean</i> <i class="arg">stdev</i></a></dt>
<dd><p>Create a command (PRNG) that generates normally distributed numbers
with a given mean value and a given standard deviation.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">mean</i></dt>
<dd><p>Mean value for the numbers</p></dd>
<dt>float <i class="arg">stdev</i></dt>
<dd><p>Standard deviation</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::simulation::random::prng_Pareto</b> <i class="arg">min</i> <i class="arg">steep</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers distributed according to
Pareto with a given minimum value and a given distribution steepness.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">steep</i></dt>
<dd><p>Steepness of the distribution</p></dd>
</dl></dd>
<dt><a name="8"><b class="cmd">::simulation::random::prng_Gumbel</b> <i class="arg">min</i> <i class="arg">f</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers distributed according to
Gumbel with a given minimum value and a given scale factor. The
probability density function is:</p>
<pre class="doctools_example">
     P(v) = exp( -exp(f*(v-min)))
</pre>
<dl class="doctools_arguments">
<dt>float <i class="arg">min</i></dt>
<dd><p>Minimum number that will be generated</p></dd>
<dt>float <i class="arg">f</i></dt>
<dd><p>Scale factor for the values</p></dd>
</dl></dd>
<dt><a name="9"><b class="cmd">::simulation::random::prng_chiSquared</b> <i class="arg">df</i></a></dt>
<dd><p>Create a command (PRNG) that generates numbers distributed according to
the chi-squared distribution with df degrees of freedom. The mean is 0
and the standard deviation is 1.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">df</i></dt>
<dd><p>Degrees of freedom</p></dd>
</dl></dd>
</dl>
<p>The package defines the following public procedures for random point sets:</p>
<dl class="doctools_definitions">
<dt><a name="10"><b class="cmd">::simulation::random::prng_Disk</b> <i class="arg">rad</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y)-coordinates for points
uniformly spread over a disk of given radius.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">rad</i></dt>
<dd><p>Radius of the disk</p></dd>
</dl></dd>
<dt><a name="11"><b class="cmd">::simulation::random::prng_Sphere</b> <i class="arg">rad</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y,z)-coordinates for points
uniformly spread over the surface of a sphere of given radius.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">rad</i></dt>
<dd><p>Radius of the disk</p></dd>
</dl></dd>
<dt><a name="12"><b class="cmd">::simulation::random::prng_Ball</b> <i class="arg">rad</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y,z)-coordinates for points
uniformly spread within a ball of given radius.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">rad</i></dt>
<dd><p>Radius of the ball</p></dd>
</dl></dd>
<dt><a name="13"><b class="cmd">::simulation::random::prng_Rectangle</b> <i class="arg">length</i> <i class="arg">width</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y)-coordinates for points
uniformly spread over a rectangle.</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">length</i></dt>
<dd><p>Length of the rectangle (x-direction)</p></dd>
<dt>float <i class="arg">width</i></dt>
<dd><p>Width of the rectangle (y-direction)</p></dd>
</dl></dd>
<dt><a name="14"><b class="cmd">::simulation::random::prng_Block</b> <i class="arg">length</i> <i class="arg">width</i> <i class="arg">depth</i></a></dt>
<dd><p>Create a command (PRNG) that generates (x,y,z)-coordinates for points
uniformly spread over a block</p>
<dl class="doctools_arguments">
<dt>float <i class="arg">length</i></dt>
<dd><p>Length of the block (x-direction)</p></dd>
<dt>float <i class="arg">width</i></dt>
<dd><p>Width of the block (y-direction)</p></dd>
<dt>float <i class="arg">depth</i></dt>
<dd><p>Depth of the block (z-direction)</p></dd>
</dl></dd>
</dl>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key71">math</a>, <a href="../../../../index.html#key642">random numbers</a>, <a href="../../../../index.html#key641">simulation</a>, <a href="../../../../index.html#key640">statistical distribution</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Mathematics</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Arjen Markus &lt;arjenmarkus@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/smtpd/smtpd.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>smtpd - Tcl SMTP Server Package</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>smtpd - Tcl SMTP Server Package</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'smtpd.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- smtpd.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">smtpd(n) 1.5 tcllib &quot;Tcl SMTP Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>smtpd - Tcl SMTP server implementation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'smtpd.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- smtpd.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">smtpd(n) 1.5 tcllib &quot;Tcl SMTP Server Package&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>smtpd - Tcl SMTP server implementation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<p>In short, this code should probably not be used as a permanently
running Mail Transfer Agent on an Internet connected server, even
though we are careful not to evaluate remote user input. There are
many other well tested and security audited programs that can be used
as mail servers for internet connected hosts.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>







|
|

|







|
|







166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<p>In short, this code should probably not be used as a permanently
running Mail Transfer Agent on an Internet connected server, even
though we are careful not to evaluate remote user input. There are
many other well tested and security audited programs that can be used
as mail servers for internet connected hosts.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
package a little more complicated to read. If there is a good reason
for running multiple SMTP services then it will only be necessary to
fix the <b class="variable">options</b> array and the <b class="variable">::smtpd::stopped</b> variable
usage.</p>
<p>As the server code uses <b class="cmd">fileevent</b>(n) handlers to process the
input on sockets you will need to run the event loop. This means
either you should be running from within <b class="syscmd">wish</b>(1) or you
should <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b>(n) on the <b class="variable">::smtpd::stopped</b> variable which is
set when the server is stopped.</p></dd>
<dt><a name="2"><b class="cmd">::smtpd::stop</b></a></dt>
<dd><p>Halt the server and release the listening socket. If the server has
not been started then this command does nothing.
The <b class="variable">::smtpd::stopped</b> variable is set for use with
<b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b>(n).</p>
<p>It should be noted that stopping the server does not disconnect any
currently active sessions as these are operating over an independent
channel. Only explicitly tracking and closing these sessions, or
exiting the server process will close down all the running
sessions. This is similar to the usual unix daemon practice where the
server performs a <b class="syscmd">fork</b>(2) and the client session continues on
the child process.</p></dd>







|





|







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
package a little more complicated to read. If there is a good reason
for running multiple SMTP services then it will only be necessary to
fix the <b class="variable">options</b> array and the <b class="variable">::smtpd::stopped</b> variable
usage.</p>
<p>As the server code uses <b class="cmd">fileevent</b>(n) handlers to process the
input on sockets you will need to run the event loop. This means
either you should be running from within <b class="syscmd">wish</b>(1) or you
should <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>(n) on the <b class="variable">::smtpd::stopped</b> variable which is
set when the server is stopped.</p></dd>
<dt><a name="2"><b class="cmd">::smtpd::stop</b></a></dt>
<dd><p>Halt the server and release the listening socket. If the server has
not been started then this command does nothing.
The <b class="variable">::smtpd::stopped</b> variable is set for use with
<b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>(n).</p>
<p>It should be noted that stopping the server does not disconnect any
currently active sessions as these are operating over an independent
channel. Only explicitly tracking and closing these sessions, or
exiting the server process will close down all the running
sessions. This is similar to the usual unix daemon practice where the
server performs a <b class="syscmd">fork</b>(2) and the client session continues on
the child process.</p></dd>
295
296
297
298
299
300
301

302
303
304
305
306
307
308
309
<p>The content of any error message will not be passed back to the client.</p></dd>
<dt><b class="cmd">validate_recipient</b> callback</dt>
<dd><p>The validate_recipient callback is similar to the validate_sender
callback and permits you to verify a local mailbox and accept mail for
a local user address during RCPT command handling. To reject mail,
throw an error as above. The error message is ignored.</p></dd>
<dt><b class="cmd">deliverMIME</b> callback</dt>

<dd><p>The deliverMIME callback is called once a mail message has been
successfully passed to the server. A mime token is constructed from
the sender, recipients and data and the users procedure it called with
this single argument. When the call returns, the mime token is cleaned
up so if the user wishes to preserve the data she must make a copy.</p>
<pre class="doctools_example">
 proc deliverMIME {token} {
     set sender [lindex [mime::getheader $token From] 0]







>
|







296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<p>The content of any error message will not be passed back to the client.</p></dd>
<dt><b class="cmd">validate_recipient</b> callback</dt>
<dd><p>The validate_recipient callback is similar to the validate_sender
callback and permits you to verify a local mailbox and accept mail for
a local user address during RCPT command handling. To reject mail,
throw an error as above. The error message is ignored.</p></dd>
<dt><b class="cmd">deliverMIME</b> callback</dt>
<dd><p>]
The deliverMIME callback is called once a mail message has been
successfully passed to the server. A mime token is constructed from
the sender, recipients and data and the users procedure it called with
this single argument. When the call returns, the mime token is cleaned
up so if the user wishes to preserve the data she must make a copy.</p>
<pre class="doctools_example">
 proc deliverMIME {token} {
     set sender [lindex [mime::getheader $token From] 0]
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
recipient has yet been defined.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">VARIABLES</a></h2>
<dl class="doctools_definitions">
<dt><b class="variable">::smtpd::stopped</b></dt>
<dd><p>This variable is set to <b class="const">true</b> during the <b class="cmd">::smtpd::stop</b>
command to permit the use of the <b class="cmd"><a href="../../../../index.html#vwait">vwait</a></b>(n) command.</p></dd>
</dl>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">AUTHOR</a></h2>
<p>Written by Pat Thoyts <a href="mailto:patthoyts@users.sourceforge.net">mailto:patthoyts@users.sourceforge.net</a>.</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">LICENSE</a></h2>
<p>This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file
&quot;<b class="file">license.terms</b>&quot; for more details.</p>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>smtpd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#rfc_2821">rfc 2821</a>, <a href="../../../../index.html#rfc_821">rfc 821</a>, <a href="../../../../index.html#services">services</a>, <a href="../../../../index.html#smtp">smtp</a>, <a href="../../../../index.html#smtpd">smtpd</a>, <a href="../../../../index.html#socket">socket</a>, <a href="../../../../index.html#vwait">vwait</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|


















<
<
<
<
<
<


|








332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357






358
359
360
361
362
363
364
365
366
367
368
recipient has yet been defined.</p></dd>
</dl>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">VARIABLES</a></h2>
<dl class="doctools_definitions">
<dt><b class="variable">::smtpd::stopped</b></dt>
<dd><p>This variable is set to <b class="const">true</b> during the <b class="cmd">::smtpd::stop</b>
command to permit the use of the <b class="cmd"><a href="../../../../index.html#key418">vwait</a></b>(n) command.</p></dd>
</dl>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">AUTHOR</a></h2>
<p>Written by Pat Thoyts <a href="mailto:patthoyts@users.sourceforge.net">mailto:patthoyts@users.sourceforge.net</a>.</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">LICENSE</a></h2>
<p>This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file
&quot;<b class="file">license.terms</b>&quot; for more details.</p>
</div>
<div id="section9" class="doctools_section"><h2><a name="section9">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>smtpd</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key329">rfc 2821</a>, <a href="../../../../index.html#key332">rfc 821</a>, <a href="../../../../index.html#key605">services</a>, <a href="../../../../index.html#key337">smtp</a>, <a href="../../../../index.html#key671">smtpd</a>, <a href="../../../../index.html#key352">socket</a>, <a href="../../../../index.html#key418">vwait</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/snit/snit.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>snit - Snit's Not Incr Tcl, OO system</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>snit - Snit's Not Incr Tcl, OO system</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'snit.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003-2009, by William H. Duquette
   -->
<!-- snit.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">snit(n) 2.3.2 tcllib &quot;Snit's Not Incr Tcl, OO system&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>snit - Snit's Not Incr Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'snit.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2009, by William H. Duquette
   -->
<! -- snit.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">snit(n) 2.3.2 tcllib &quot;Snit's Not Incr Tcl, OO system&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>snit - Snit's Not Incr Tcl</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">snit::type</b> <i class="arg">name</i> <i class="arg">definition</i></a></li>
<li><a href="#2"><b class="cmd">typevariable</b> <i class="arg">name</i> <span class="opt">?<b class="const">-array</b>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#3"><b class="cmd">typemethod</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#4"><b class="cmd">typeconstructor</b> <i class="arg">body</i></a></li>
<li><a href="#5"><b class="cmd">variable</b> <i class="arg">name</i> <span class="opt">?<b class="const">-array</b>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#6"><b class="cmd"><a href="../../../../index.html#method">method</a></b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#7"><b class="cmd">option</b> <i class="arg">namespec</i> <span class="opt">?<i class="arg">defaultValue</i>?</span></a></li>
<li><a href="#8"><b class="cmd">option</b> <i class="arg">namespec</i> <span class="opt">?<i class="arg">options...</i>?</span></a></li>
<li><a href="#9"><b class="cmd">constructor</b> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#10"><b class="cmd">destructor</b> <i class="arg">body</i></a></li>
<li><a href="#11"><b class="cmd"><a href="../../../../index.html#proc">proc</a></b> <i class="arg">name</i> <i class="arg">args</i> <i class="arg">body</i></a></li>
<li><a href="#12"><b class="cmd">delegate</b> <b class="const">method</b> <i class="arg">name</i> <b class="const">to</b> <i class="arg">comp</i> <span class="opt">?<b class="const">as</b> <i class="arg">target</i>?</span></a></li>
<li><a href="#13"><b class="cmd">delegate</b> <b class="const">method</b> <i class="arg">name</i> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <b class="const">using</b> <i class="arg">pattern</i></a></li>
<li><a href="#14"><b class="cmd">delegate</b> <b class="const">method</b> <b class="const">*</b> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <span class="opt">?<b class="const">using</b> <i class="arg">pattern</i>?</span> <span class="opt">?<b class="const">except</b> <i class="arg">exceptions</i>?</span></a></li>
<li><a href="#15"><b class="cmd">delegate</b> <b class="const">option</b> <i class="arg">namespec</i> <b class="const">to</b> <i class="arg">comp</i></a></li>
<li><a href="#16"><b class="cmd">delegate</b> <b class="const">option</b> <i class="arg">namespec</i> <b class="const">to</b> <i class="arg">comp</i> <b class="const">as</b> <i class="arg">target</i></a></li>
<li><a href="#17"><b class="cmd">delegate</b> <b class="const">option</b> <b class="const">*</b> <b class="const">to</b> <i class="arg">comp</i></a></li>
<li><a href="#18"><b class="cmd">delegate</b> <b class="const">option</b> <b class="const">*</b> <b class="const">to</b> <i class="arg">comp</i> <b class="const">except</b> <i class="arg">exceptions</i></a></li>







|




|







152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">snit::type</b> <i class="arg">name</i> <i class="arg">definition</i></a></li>
<li><a href="#2"><b class="cmd">typevariable</b> <i class="arg">name</i> <span class="opt">?<b class="const">-array</b>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#3"><b class="cmd">typemethod</b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#4"><b class="cmd">typeconstructor</b> <i class="arg">body</i></a></li>
<li><a href="#5"><b class="cmd">variable</b> <i class="arg">name</i> <span class="opt">?<b class="const">-array</b>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#6"><b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#7"><b class="cmd">option</b> <i class="arg">namespec</i> <span class="opt">?<i class="arg">defaultValue</i>?</span></a></li>
<li><a href="#8"><b class="cmd">option</b> <i class="arg">namespec</i> <span class="opt">?<i class="arg">options...</i>?</span></a></li>
<li><a href="#9"><b class="cmd">constructor</b> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#10"><b class="cmd">destructor</b> <i class="arg">body</i></a></li>
<li><a href="#11"><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">name</i> <i class="arg">args</i> <i class="arg">body</i></a></li>
<li><a href="#12"><b class="cmd">delegate</b> <b class="const">method</b> <i class="arg">name</i> <b class="const">to</b> <i class="arg">comp</i> <span class="opt">?<b class="const">as</b> <i class="arg">target</i>?</span></a></li>
<li><a href="#13"><b class="cmd">delegate</b> <b class="const">method</b> <i class="arg">name</i> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <b class="const">using</b> <i class="arg">pattern</i></a></li>
<li><a href="#14"><b class="cmd">delegate</b> <b class="const">method</b> <b class="const">*</b> <span class="opt">?<b class="const">to</b> <i class="arg">comp</i>?</span> <span class="opt">?<b class="const">using</b> <i class="arg">pattern</i>?</span> <span class="opt">?<b class="const">except</b> <i class="arg">exceptions</i>?</span></a></li>
<li><a href="#15"><b class="cmd">delegate</b> <b class="const">option</b> <i class="arg">namespec</i> <b class="const">to</b> <i class="arg">comp</i></a></li>
<li><a href="#16"><b class="cmd">delegate</b> <b class="const">option</b> <i class="arg">namespec</i> <b class="const">to</b> <i class="arg">comp</i> <b class="const">as</b> <i class="arg">target</i></a></li>
<li><a href="#17"><b class="cmd">delegate</b> <b class="const">option</b> <b class="const">*</b> <b class="const">to</b> <i class="arg">comp</i></a></li>
<li><a href="#18"><b class="cmd">delegate</b> <b class="const">option</b> <b class="const">*</b> <b class="const">to</b> <i class="arg">comp</i> <b class="const">except</b> <i class="arg">exceptions</i></a></li>
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
but on delegation.  Object systems based on inheritance only allow you
to inherit from classes defined using the same system, which is
limiting.  In Tcl, an object is
anything that acts like an object; it shouldn't matter how the object
was implemented.  Snit is intended to help you build applications out of
the materials at hand; thus, Snit is designed to be able to
incorporate and build on any object, whether it's a hand-coded object,
a <b class="package"><a href="../../../../index.html#tk">Tk</a></b> widget, an <b class="package"><a href="../../../../index.html#incr_tcl">Incr Tcl</a></b> object,
a <b class="package"><a href="../../../../index.html#bwidget">BWidget</a></b> or almost anything else.</p>
<p>This man page is intended to be a reference only; see the accompanying
<b class="cmd"><a href="snitfaq.html">snitfaq</a></b> for a gentler, more tutorial introduction to Snit
concepts.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">SNIT VERSIONS</a></h2>
<p>This man page covers both Snit 2.2 and Snit 1.3.  The primary
difference between the two versions is simply that Snit 2.2 contains







|
|







251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
but on delegation.  Object systems based on inheritance only allow you
to inherit from classes defined using the same system, which is
limiting.  In Tcl, an object is
anything that acts like an object; it shouldn't matter how the object
was implemented.  Snit is intended to help you build applications out of
the materials at hand; thus, Snit is designed to be able to
incorporate and build on any object, whether it's a hand-coded object,
a <b class="package"><a href="../../../../index.html#key209">Tk</a></b> widget, an <b class="package"><a href="../../../../index.html#key244">Incr Tcl</a></b> object,
a <b class="package"><a href="../../../../index.html#key241">BWidget</a></b> or almost anything else.</p>
<p>This man page is intended to be a reference only; see the accompanying
<b class="cmd"><a href="snitfaq.html">snitfaq</a></b> for a gentler, more tutorial introduction to Snit
concepts.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">SNIT VERSIONS</a></h2>
<p>This man page covers both Snit 2.2 and Snit 1.3.  The primary
difference between the two versions is simply that Snit 2.2 contains
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
<pre class="doctools_example">    typemethod {a b} {arg} { puts &quot;Got $arg&quot; }
</pre>
<p>This statement implicitly defines a type method called <b class="const">a</b> which
has a subcommand <b class="const">b</b>.  <b class="const">b</b> is called like this:</p>
<pre class="doctools_example">    $type a b &quot;Hello, world!&quot;
</pre>
<p><b class="const">a</b> may have any number of subcommands.  This makes it possible
to define a hierarchical command structure; see <b class="cmd"><a href="../../../../index.html#method">method</a></b>, below,
for more examples.</p>
<p>Type methods can call commands from the namespace in which the type is
defined without importing them, e.g., if the type name is
<b class="cmd">::parentns::typename</b>, then the type's type methods can call
<b class="cmd">::parentns::someproc</b> just as <b class="cmd">someproc</b>.
<em>Snit 1.x Incompatibility:</em> This does not work in Snit 1.x, as
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p>







|







304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
<pre class="doctools_example">    typemethod {a b} {arg} { puts &quot;Got $arg&quot; }
</pre>
<p>This statement implicitly defines a type method called <b class="const">a</b> which
has a subcommand <b class="const">b</b>.  <b class="const">b</b> is called like this:</p>
<pre class="doctools_example">    $type a b &quot;Hello, world!&quot;
</pre>
<p><b class="const">a</b> may have any number of subcommands.  This makes it possible
to define a hierarchical command structure; see <b class="cmd"><a href="../../../../index.html#key372">method</a></b>, below,
for more examples.</p>
<p>Type methods can call commands from the namespace in which the type is
defined without importing them, e.g., if the type name is
<b class="cmd">::parentns::typename</b>, then the type's type methods can call
<b class="cmd">::parentns::someproc</b> just as <b class="cmd">someproc</b>.
<em>Snit 1.x Incompatibility:</em> This does not work in Snit 1.x, as
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p>
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p></dd>
<dt><a name="5"><b class="cmd">variable</b> <i class="arg">name</i> <span class="opt">?<b class="const">-array</b>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Defines an instance variable, a private variable associated with each
instance of this type, and optionally its initial value.
If the <b class="const">-array</b> option is included, then
<i class="arg">value</i> should be a dictionary; it will be
assigned to the variable using <b class="cmd">array set</b>.</p></dd>
<dt><a name="6"><b class="cmd"><a href="../../../../index.html#method">method</a></b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Defines an instance method, a subcommand of each instance of this
type, with the specified name, argument list and body.
The <i class="arg">arglist</i> is a normal Tcl argument list and may contain
default arguments and the <b class="variable">args</b> argument.</p>
<p>The method is implicitly passed the following arguments as well:
<b class="variable">type</b>, which contains the fully-qualified type name; <b class="variable">self</b>,
which contains the current instance command name; <b class="variable">selfns</b>, which







|







340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p></dd>
<dt><a name="5"><b class="cmd">variable</b> <i class="arg">name</i> <span class="opt">?<b class="const">-array</b>?</span> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Defines an instance variable, a private variable associated with each
instance of this type, and optionally its initial value.
If the <b class="const">-array</b> option is included, then
<i class="arg">value</i> should be a dictionary; it will be
assigned to the variable using <b class="cmd">array set</b>.</p></dd>
<dt><a name="6"><b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">name</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Defines an instance method, a subcommand of each instance of this
type, with the specified name, argument list and body.
The <i class="arg">arglist</i> is a normal Tcl argument list and may contain
default arguments and the <b class="variable">args</b> argument.</p>
<p>The method is implicitly passed the following arguments as well:
<b class="variable">type</b>, which contains the fully-qualified type name; <b class="variable">self</b>,
which contains the current instance command name; <b class="variable">selfns</b>, which
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
As with methods, the destructor can call commands from the namespace
in which the type is
defined without importing them, e.g., if the type name is
<b class="cmd">::parentns::typename</b>, then the destructor can call
<b class="cmd">::parentns::someproc</b> just as <b class="cmd">someproc</b>.
<em>Snit 1.x Incompatibility:</em> This does not work in Snit 1.x, as
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p></dd>
<dt><a name="11"><b class="cmd"><a href="../../../../index.html#proc">proc</a></b> <i class="arg">name</i> <i class="arg">args</i> <i class="arg">body</i></a></dt>
<dd><p>Defines a new Tcl procedure in the type's namespace.</p>
<p>The defined proc differs from a normal Tcl proc in that all type
variables are automatically visible.  The proc can access
instance variables as well, provided that it is passed
<b class="variable">selfns</b> (with precisely that name) as one of its arguments.</p>
<p>Although they are not implicitly defined for procs, the argument names
<b class="const">type</b>, <b class="const">self</b>, and <b class="const">win</b> should be avoided.</p>







|







553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
As with methods, the destructor can call commands from the namespace
in which the type is
defined without importing them, e.g., if the type name is
<b class="cmd">::parentns::typename</b>, then the destructor can call
<b class="cmd">::parentns::someproc</b> just as <b class="cmd">someproc</b>.
<em>Snit 1.x Incompatibility:</em> This does not work in Snit 1.x, as
it depends on <b class="cmd">namespace path</b>, a new command in Tcl 8.5.</p></dd>
<dt><a name="11"><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">name</i> <i class="arg">args</i> <i class="arg">body</i></a></dt>
<dd><p>Defines a new Tcl procedure in the type's namespace.</p>
<p>The defined proc differs from a normal Tcl proc in that all type
variables are automatically visible.  The proc can access
instance variables as well, provided that it is passed
<b class="variable">selfns</b> (with precisely that name) as one of its arguments.</p>
<p>Although they are not implicitly defined for procs, the argument names
<b class="const">type</b>, <b class="const">self</b>, and <b class="const">win</b> should be avoided.</p>
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
<dt><b class="const">-canreplace</b> <i class="arg">flag</i></dt>
<dd><p>If false (the default) Snit will not create an instance of a
<b class="cmd">snit::type</b> that has the same name as an existing command; this
prevents subtle errors.  Setting this pragma to true restores the
behavior of Snit V0.93 and earlier versions.</p></dd>
<dt><b class="const">-hastypeinfo</b> <i class="arg">flag</i></dt>
<dd><p>If true (the default), the generated type will have a type method
called <b class="cmd"><a href="../../../../index.html#info">info</a></b> that is used for type introspection; the <b class="cmd"><a href="../../../../index.html#info">info</a></b>
type method is documented below.  If false, it will not.</p></dd>
<dt><b class="const">-hastypedestroy</b> <i class="arg">flag</i></dt>
<dd><p>If true (the default), the generated type will have a type method
called <b class="cmd">destroy</b> that is used to destroy the type and all of its
instances.  The <b class="cmd">destroy</b> type method is documented below.  If
false, it will not.</p></dd>
<dt><b class="const">-hastypemethods</b> <i class="arg">flag</i></dt>







|







812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
<dt><b class="const">-canreplace</b> <i class="arg">flag</i></dt>
<dd><p>If false (the default) Snit will not create an instance of a
<b class="cmd">snit::type</b> that has the same name as an existing command; this
prevents subtle errors.  Setting this pragma to true restores the
behavior of Snit V0.93 and earlier versions.</p></dd>
<dt><b class="const">-hastypeinfo</b> <i class="arg">flag</i></dt>
<dd><p>If true (the default), the generated type will have a type method
called <b class="cmd"><a href="../../../../index.html#key83">info</a></b> that is used for type introspection; the <b class="cmd"><a href="../../../../index.html#key83">info</a></b>
type method is documented below.  If false, it will not.</p></dd>
<dt><b class="const">-hastypedestroy</b> <i class="arg">flag</i></dt>
<dd><p>If true (the default), the generated type will have a type method
called <b class="cmd">destroy</b> that is used to destroy the type and all of its
instances.  The <b class="cmd">destroy</b> type method is documented below.  If
false, it will not.</p></dd>
<dt><b class="const">-hastypemethods</b> <i class="arg">flag</i></dt>
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
page.</p>
<p>A macro is simply a Tcl proc that is defined in the slave interpreter
used to compile type and widget definitions.  Thus, macros have
access to all of the type and widget definition statements.  See
<span class="sectref"><a href="#subsection10">Macros and Meta-programming</a></span> for more details.</p>
<p>The macro <i class="arg">name</i> cannot be the same as any standard Tcl command,
or any Snit type or widget definition statement, e.g., you can't
redefine the <b class="cmd"><a href="../../../../index.html#method">method</a></b> or <b class="cmd">delegate</b> statements, or the
standard <b class="cmd"><a href="../../../../index.html#set">set</a></b>, <b class="cmd"><a href="../../../../index.html#list">list</a></b>, or <b class="cmd"><a href="../../../../index.html#string">string</a></b> commands.</p></dd>
<dt><a name="36"><b class="cmd">snit::compile</b> <i class="arg">which</i> <i class="arg">type</i> <i class="arg">body</i></a></dt>
<dd><p>Snit defines a type, widget, or widgetadaptor by &quot;compiling&quot; the
definition into a Tcl script; this script is then evaluated in the
Tcl interpreter, which actually defines the new type.</p>
<p>This command exposes the &quot;compiler&quot;.  Given a definition <i class="arg">body</i>
for the named <i class="arg">type</i>, where <i class="arg">which</i> is <b class="const">type</b>,
<b class="const">widget</b>, or <b class="const">widgetadaptor</b>, <b class="cmd">snit::compile</b> returns a list







|
|







956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
page.</p>
<p>A macro is simply a Tcl proc that is defined in the slave interpreter
used to compile type and widget definitions.  Thus, macros have
access to all of the type and widget definition statements.  See
<span class="sectref"><a href="#subsection10">Macros and Meta-programming</a></span> for more details.</p>
<p>The macro <i class="arg">name</i> cannot be the same as any standard Tcl command,
or any Snit type or widget definition statement, e.g., you can't
redefine the <b class="cmd"><a href="../../../../index.html#key372">method</a></b> or <b class="cmd">delegate</b> statements, or the
standard <b class="cmd"><a href="../../../../index.html#key301">set</a></b>, <b class="cmd"><a href="../../../../index.html#key302">list</a></b>, or <b class="cmd"><a href="../../../../index.html#key280">string</a></b> commands.</p></dd>
<dt><a name="36"><b class="cmd">snit::compile</b> <i class="arg">which</i> <i class="arg">type</i> <i class="arg">body</i></a></dt>
<dd><p>Snit defines a type, widget, or widgetadaptor by &quot;compiling&quot; the
definition into a Tcl script; this script is then evaluated in the
Tcl interpreter, which actually defines the new type.</p>
<p>This command exposes the &quot;compiler&quot;.  Given a definition <i class="arg">body</i>
for the named <i class="arg">type</i>, where <i class="arg">which</i> is <b class="const">type</b>,
<b class="const">widget</b>, or <b class="const">widgetadaptor</b>, <b class="cmd">snit::compile</b> returns a list
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
option.</p></dd>
<dt><a name="50"><b class="cmd">$object</b> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the object, calling the <b class="cmd">destructor</b> and freeing all
related memory.</p>
<p><em>Note:</em>
The <b class="method">destroy</b> method isn't defined for <b class="cmd">snit::widget</b> or
<b class="cmd">snit::widgetadaptor</b> objects; instances of these are destroyed by
calling <b class="package"><a href="../../../../index.html#tk">Tk</a></b>'s <b class="cmd">destroy</b> command, just as normal
widgets are.</p></dd>
<dt><a name="51"><b class="cmd">$object</b> <b class="method">info type</b></a></dt>
<dd><p>Returns the instance's type.</p></dd>
<dt><a name="52"><b class="cmd">$object</b> <b class="method">info vars</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of the object's instance variables (excluding Snit
internal variables).  The names are fully qualified.</p>
<p>If <i class="arg">pattern</i> is given, it's used as a <b class="cmd">string match</b>







|







1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
option.</p></dd>
<dt><a name="50"><b class="cmd">$object</b> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the object, calling the <b class="cmd">destructor</b> and freeing all
related memory.</p>
<p><em>Note:</em>
The <b class="method">destroy</b> method isn't defined for <b class="cmd">snit::widget</b> or
<b class="cmd">snit::widgetadaptor</b> objects; instances of these are destroyed by
calling <b class="package"><a href="../../../../index.html#key209">Tk</a></b>'s <b class="cmd">destroy</b> command, just as normal
widgets are.</p></dd>
<dt><a name="51"><b class="cmd">$object</b> <b class="method">info type</b></a></dt>
<dd><p>Returns the instance's type.</p></dd>
<dt><a name="52"><b class="cmd">$object</b> <b class="method">info vars</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>Returns a list of the object's instance variables (excluding Snit
internal variables).  The names are fully qualified.</p>
<p>If <i class="arg">pattern</i> is given, it's used as a <b class="cmd">string match</b>
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
<b class="cmd">cget</b> commands.</p>
<p>The resource and class names are used to initialize option default
values by querying the Tk option database.  The resource name is
usually just the option name minus the hyphen, but may contain
uppercase letters at word boundaries; the class name is usually just
the resource name with an initial capital, but not always.  For
example, here are the option, resource, and class names for several
<b class="cmd"><a href="../../../../index.html#text">text</a></b> widget options:</p>
<pre class="doctools_example">    -background         background         Background
    -borderwidth        borderWidth        BorderWidth
    -insertborderwidth  insertBorderWidth  BorderWidth
    -padx               padX               Pad
</pre>
<p>As is easily seen, sometimes the resource and class names can be
inferred from the option name, but not always.</p>







|







1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
<b class="cmd">cget</b> commands.</p>
<p>The resource and class names are used to initialize option default
values by querying the Tk option database.  The resource name is
usually just the option name minus the hyphen, but may contain
uppercase letters at word boundaries; the class name is usually just
the resource name with an initial capital, but not always.  For
example, here are the option, resource, and class names for several
<b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget options:</p>
<pre class="doctools_example">    -background         background         Background
    -borderwidth        borderWidth        BorderWidth
    -insertborderwidth  insertBorderWidth  BorderWidth
    -padx               padX               Pad
</pre>
<p>As is easily seen, sometimes the resource and class names can be
inferred from the option name, but not always.</p>
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
	# ...
    }
</pre>
<p>In this case, the widget class name is &quot;Mywidget&quot;.  The widget has the
following options: <b class="option">-background</b>, which is locally defined, and
<b class="option">-borderwidth</b>, which is explicitly delegated; all other widgets are
delegated to a component called &quot;text&quot;, which is probably a Tk
<b class="cmd"><a href="../../../../index.html#text">text</a></b> widget.  If so, <b class="cmd">mywidget</b> has all the same options as
a <b class="cmd"><a href="../../../../index.html#text">text</a></b> widget.  The option, resource, and class names are as
follows:</p>
<pre class="doctools_example">    -background  background  Background
    -borderwidth borderwidth Borderwidth
    -padx        padX        Pad
</pre>
<p>Note that the locally defined option, <b class="option">-background</b>, happens to have
the same three names as the standard Tk <b class="option">-background</b> option; and
<b class="option">-pad</b>, which is delegated implicitly to the <b class="variable">text</b>
component, has the
same three names for <b class="cmd">mywidget</b> as it does for the <b class="cmd"><a href="../../../../index.html#text">text</a></b>
widget.  <b class="option">-borderwidth</b>, on the other hand, has different resource and
class names than usual, because the internal word &quot;width&quot; isn't
capitalized.  For consistency, it should be; this is done as follows:</p>
<pre class="doctools_example">    snit::widget mywidget {
	option -background
	delegate option {-borderwidth borderWidth} to hull
	delegate option * to text







|
|









|







1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
	# ...
    }
</pre>
<p>In this case, the widget class name is &quot;Mywidget&quot;.  The widget has the
following options: <b class="option">-background</b>, which is locally defined, and
<b class="option">-borderwidth</b>, which is explicitly delegated; all other widgets are
delegated to a component called &quot;text&quot;, which is probably a Tk
<b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget.  If so, <b class="cmd">mywidget</b> has all the same options as
a <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget.  The option, resource, and class names are as
follows:</p>
<pre class="doctools_example">    -background  background  Background
    -borderwidth borderwidth Borderwidth
    -padx        padX        Pad
</pre>
<p>Note that the locally defined option, <b class="option">-background</b>, happens to have
the same three names as the standard Tk <b class="option">-background</b> option; and
<b class="option">-pad</b>, which is delegated implicitly to the <b class="variable">text</b>
component, has the
same three names for <b class="cmd">mywidget</b> as it does for the <b class="cmd"><a href="../../../../index.html#key248">text</a></b>
widget.  <b class="option">-borderwidth</b>, on the other hand, has different resource and
class names than usual, because the internal word &quot;width&quot; isn't
capitalized.  For consistency, it should be; this is done as follows:</p>
<pre class="doctools_example">    snit::widget mywidget {
	option -background
	delegate option {-borderwidth borderWidth} to hull
	delegate option * to text
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
	#...
    }
</pre>
<p>In this case, the <b class="cmd">installhull</b> command will create the hull using
a command like this:</p>
<pre class="doctools_example">    set hull [text $win -foreground white]
</pre>
<p>The hull is a <b class="cmd"><a href="../../../../index.html#text">text</a></b> widget, so its widget class is &quot;Text&quot;.  Just
as with <b class="cmd">snit::widget</b> hulls, Snit assumes that it will pick up
all of its normal option values automatically; options delegated from
a different name are initialized from the option database in the same
way.</p>
<p><b class="const">Initializing options delegated to other components:</b>
Non-hull components are matched against the option database in two
ways.  First, a component widget remains a widget still, and therefore







|







1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
	#...
    }
</pre>
<p>In this case, the <b class="cmd">installhull</b> command will create the hull using
a command like this:</p>
<pre class="doctools_example">    set hull [text $win -foreground white]
</pre>
<p>The hull is a <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget, so its widget class is &quot;Text&quot;.  Just
as with <b class="cmd">snit::widget</b> hulls, Snit assumes that it will pick up
all of its normal option values automatically; options delegated from
a different name are initialized from the option database in the same
way.</p>
<p><b class="const">Initializing options delegated to other components:</b>
Non-hull components are matched against the option database in two
ways.  First, a component widget remains a widget still, and therefore
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
a result, it has access to all the commands used to define types and
widgets.</p>
<p>Given this new macro, you can define a property in one line of code:</p>
<pre class="doctools_example">    snit::type dog {
        property mood happy
    }
</pre>
<p>Within a macro, the commands <b class="cmd">variable</b> and <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> refer to
the Snit type-definition commands, not the standard Tcl commands.  To
get the standard Tcl commands, use <b class="cmd">_variable</b> and <b class="cmd">_proc</b>.</p>
<p>Because a single slave interpreter is used for compiling all Snit
types and widgets in the application, there's the possibility of macro
name collisions.  If you're writing a reuseable package using Snit,
and you use some <b class="cmd">snit::macro</b>s, define them in your package
namespace:</p>







|







1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
a result, it has access to all the commands used to define types and
widgets.</p>
<p>Given this new macro, you can define a property in one line of code:</p>
<pre class="doctools_example">    snit::type dog {
        property mood happy
    }
</pre>
<p>Within a macro, the commands <b class="cmd">variable</b> and <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> refer to
the Snit type-definition commands, not the standard Tcl commands.  To
get the standard Tcl commands, use <b class="cmd">_variable</b> and <b class="cmd">_proc</b>.</p>
<p>Because a single slave interpreter is used for compiling all Snit
types and widgets in the application, there's the possibility of macro
name collisions.  If you're writing a reuseable package using Snit,
and you use some <b class="cmd">snit::macro</b>s, define them in your package
namespace:</p>
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
Defining subtypes of Snit's validation types is described above,
under <span class="sectref"><a href="#subsection11">Validation Types</a></span>.</p>
<p>The next simplest way to create a new validation type is as a
validation type command.  A validation type is simply an
object that has a <b class="method">validate</b> method; the <b class="method">validate</b>
method must take one argument, a value, return the value if it is
valid, and throw an error with <b class="cmd">-errorcode</b> INVALID if the
value is invalid.  This can be done with a simple <b class="cmd"><a href="../../../../index.html#proc">proc</a></b>.  For
example, the <b class="cmd">snit::boolean</b> validate type could have been
implemented like this:</p>
<pre class="doctools_example">    proc ::snit::boolean {&quot;validate&quot; value} {
        if {![string is boolean -strict $value]} {
            return -code error -errorcode INVALID  &quot;invalid boolean \&quot;$value\&quot;, should be one of: 1, 0, ...&quot;
        }
        return $value







|







1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
Defining subtypes of Snit's validation types is described above,
under <span class="sectref"><a href="#subsection11">Validation Types</a></span>.</p>
<p>The next simplest way to create a new validation type is as a
validation type command.  A validation type is simply an
object that has a <b class="method">validate</b> method; the <b class="method">validate</b>
method must take one argument, a value, return the value if it is
valid, and throw an error with <b class="cmd">-errorcode</b> INVALID if the
value is invalid.  This can be done with a simple <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>.  For
example, the <b class="cmd">snit::boolean</b> validate type could have been
implemented like this:</p>
<pre class="doctools_example">    proc ::snit::boolean {&quot;validate&quot; value} {
        if {![string is boolean -strict $value]} {
            return -code error -errorcode INVALID  &quot;invalid boolean \&quot;$value\&quot;, should be one of: 1, 0, ...&quot;
        }
        return $value
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>snit</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bwidget">BWidget</a>, <a href="../../../../index.html#c_">C++</a>, <a href="../../../../index.html#incr_tcl">Incr Tcl</a>, <a href="../../../../index.html#snit">Snit</a>, <a href="../../../../index.html#adaptors">adaptors</a>, <a href="../../../../index.html#class">class</a>, <a href="../../../../index.html#mega_widget">mega widget</a>, <a href="../../../../index.html#object">object</a>, <a href="../../../../index.html#object_oriented">object oriented</a>, <a href="../../../../index.html#type">type</a>, <a href="../../../../index.html#widget">widget</a>, <a href="../../../../index.html#widget_adaptors">widget adaptors</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2009, by William H. Duquette</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








2062
2063
2064
2065
2066
2067
2068






2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>snit</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key241">BWidget</a>, <a href="../../../../index.html#key237">C++</a>, <a href="../../../../index.html#key244">Incr Tcl</a>, <a href="../../../../index.html#key798">Snit</a>, <a href="../../../../index.html#key242">adaptors</a>, <a href="../../../../index.html#key240">class</a>, <a href="../../../../index.html#key239">mega widget</a>, <a href="../../../../index.html#key243">object</a>, <a href="../../../../index.html#key236">object oriented</a>, <a href="../../../../index.html#key117">type</a>, <a href="../../../../index.html#key235">widget</a>, <a href="../../../../index.html#key238">widget adaptors</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2009, by William H. Duquette</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/snit/snitfaq.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>snitfaq - Snit's Not Incr Tcl, OO system</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>snitfaq - Snit's Not Incr Tcl, OO system</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'snitfaq.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003-2006, by William H. Duquette
   -->
<!-- snitfaq.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">snitfaq(n) 2.2 tcllib &quot;Snit's Not Incr Tcl, OO system&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>snitfaq - Snit Frequently Asked Questions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'snitfaq.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2006, by William H. Duquette
   -->
<! -- snitfaq.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">snitfaq(n) 2.2 tcllib &quot;Snit's Not Incr Tcl, OO system&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>snitfaq - Snit Frequently Asked Questions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
<b class="cmd">namespace path</b>, the type's code can call any of the other
commands defined in <b class="cmd">::mypackage::</b>.</p>
<p>This is extremely convenient.  However, it also means that commands
defined in the parent namespace, <b class="cmd">::mypackage::</b> can block the
type's access to identically named commands in the global namespace.
This can lead to bugs.  For example, Tcllib includes a type called
<b class="cmd">::tie::std::file</b>.  This type's code calls the standard
<b class="cmd"><a href="../../../../index.html#file">file</a></b> command.  When run with Snit 2.2, the code broke--
the type's command, <b class="cmd">::tie::std::file</b>, is itself a command
in the type's parent namespace, and so instead of calling
the standard <b class="cmd"><a href="../../../../index.html#file">file</a></b> command, the type found itself calling
itself.</p></li>
</ul>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Are there other differences between Snit 1.x and Snit 2.2?</a></h3>
<p>Yes.</p>
<ul class="doctools_itemized">
<li><p>Method dispatch is considerably faster.</p></li>







|


|







564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
<b class="cmd">namespace path</b>, the type's code can call any of the other
commands defined in <b class="cmd">::mypackage::</b>.</p>
<p>This is extremely convenient.  However, it also means that commands
defined in the parent namespace, <b class="cmd">::mypackage::</b> can block the
type's access to identically named commands in the global namespace.
This can lead to bugs.  For example, Tcllib includes a type called
<b class="cmd">::tie::std::file</b>.  This type's code calls the standard
<b class="cmd"><a href="../../../../index.html#key31">file</a></b> command.  When run with Snit 2.2, the code broke--
the type's command, <b class="cmd">::tie::std::file</b>, is itself a command
in the type's parent namespace, and so instead of calling
the standard <b class="cmd"><a href="../../../../index.html#key31">file</a></b> command, the type found itself calling
itself.</p></li>
</ul>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Are there other differences between Snit 1.x and Snit 2.2?</a></h3>
<p>Yes.</p>
<ul class="doctools_itemized">
<li><p>Method dispatch is considerably faster.</p></li>
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
properties are options accessed using the <b class="method">configure</b> and
<b class="method">cget</b> methods.  Snit uses the same conventions as Tk widgets do.</p>
</div>
<div id="subsection13" class="doctools_subsection"><h3><a name="subsection13">What is an abstract data type?</a></h3>
<p>In computer science terms, an abstract data type is a complex data
structure along with a set of operations--a stack, a queue, a
binary tree, etc--that is to say, in modern terms, an object.  In systems
that include some form of inheritance the word <i class="term"><a href="../../../../index.html#class">class</a></i> is
usually used instead of <i class="term">abstract data type</i>, but as Snit
doesn't implement inheritance as it's ordinarily understood
the older term seems more appropriate.  Sometimes this is called
<i class="term">object-based</i> programming as opposed to object-oriented
programming.  Note that you can easily create the effect of
inheritance using <span class="sectref"><a href="#section14">COMPONENTS</a></span> and <span class="sectref"><a href="#section16">DELEGATION</a></span>.</p>
<p>In Snit, as in Tk, a <i class="term"><a href="../../../../index.html#type">type</a></i> is a command that creates instances
-- objects -- which belong to the type.  Most types define some number
of <i class="term">options</i> which can be set at creation time, and usually can be
changed later.</p>
<p>Further, an <i class="term">instance</i> is also a Tcl command--a command that
gives access to the operations which are defined for that abstract
data type.  Conventionally, the operations are defined as subcommands
of the instance command.  For example, to insert
text into a Tk text widget, you use the text widget's <b class="method">insert</b>
subcommand:</p>
<pre class="doctools_example">    # Create a text widget and insert some text in it.
    text .mytext -width 80 -height 24
    .mytext insert end &quot;Howdy!&quot;
</pre>
<p>In this example, <b class="cmd"><a href="../../../../index.html#text">text</a></b> is the <i class="term"><a href="../../../../index.html#type">type</a></i> command and
<b class="cmd">.mytext</b> is the <i class="term">instance</i> command.</p>
<p>In Snit, object subcommands are generally called
<span class="sectref"><a href="#section5">INSTANCE METHODS</a></span>.</p>
</div>
<div id="subsection14" class="doctools_subsection"><h3><a name="subsection14">What kinds of abstract data types does Snit provide?</a></h3>
<p>Snit allows you to define three kinds of abstract data type:</p>
<ul class="doctools_itemized">







|






|













|







615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
properties are options accessed using the <b class="method">configure</b> and
<b class="method">cget</b> methods.  Snit uses the same conventions as Tk widgets do.</p>
</div>
<div id="subsection13" class="doctools_subsection"><h3><a name="subsection13">What is an abstract data type?</a></h3>
<p>In computer science terms, an abstract data type is a complex data
structure along with a set of operations--a stack, a queue, a
binary tree, etc--that is to say, in modern terms, an object.  In systems
that include some form of inheritance the word <i class="term"><a href="../../../../index.html#key240">class</a></i> is
usually used instead of <i class="term">abstract data type</i>, but as Snit
doesn't implement inheritance as it's ordinarily understood
the older term seems more appropriate.  Sometimes this is called
<i class="term">object-based</i> programming as opposed to object-oriented
programming.  Note that you can easily create the effect of
inheritance using <span class="sectref"><a href="#section14">COMPONENTS</a></span> and <span class="sectref"><a href="#section16">DELEGATION</a></span>.</p>
<p>In Snit, as in Tk, a <i class="term"><a href="../../../../index.html#key117">type</a></i> is a command that creates instances
-- objects -- which belong to the type.  Most types define some number
of <i class="term">options</i> which can be set at creation time, and usually can be
changed later.</p>
<p>Further, an <i class="term">instance</i> is also a Tcl command--a command that
gives access to the operations which are defined for that abstract
data type.  Conventionally, the operations are defined as subcommands
of the instance command.  For example, to insert
text into a Tk text widget, you use the text widget's <b class="method">insert</b>
subcommand:</p>
<pre class="doctools_example">    # Create a text widget and insert some text in it.
    text .mytext -width 80 -height 24
    .mytext insert end &quot;Howdy!&quot;
</pre>
<p>In this example, <b class="cmd"><a href="../../../../index.html#key248">text</a></b> is the <i class="term"><a href="../../../../index.html#key117">type</a></i> command and
<b class="cmd">.mytext</b> is the <i class="term">instance</i> command.</p>
<p>In Snit, object subcommands are generally called
<span class="sectref"><a href="#section5">INSTANCE METHODS</a></span>.</p>
</div>
<div id="subsection14" class="doctools_subsection"><h3><a name="subsection14">What kinds of abstract data types does Snit provide?</a></h3>
<p>Snit allows you to define three kinds of abstract data type:</p>
<ul class="doctools_itemized">
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
<p>An instance method is a procedure associated with a specific object
and called as a subcommand of the object's command.  It is given free
access to all of the object's type variables, instance variables, and
so forth.</p>
</div>
<div id="subsection25" class="doctools_subsection"><h3><a name="subsection25">How do I define an instance method?</a></h3>
<p>Instance methods are defined in the type definition using
the <b class="cmd"><a href="../../../../index.html#method">method</a></b> statement.  Consider the following code that might be
used to add dogs to a computer simulation:</p>
<pre class="doctools_example">% snit::type dog {
    method bark {} {
        return &quot;$self barks.&quot;
    }
    method chase {thing} {
        return &quot;$self chases $thing.&quot;
    }
}
::dog
%
</pre>
<p>A dog can bark, and it can chase things.</p>
<p>The <b class="cmd"><a href="../../../../index.html#method">method</a></b> statement looks just like a normal Tcl <b class="cmd"><a href="../../../../index.html#proc">proc</a></b>,
except that it appears in a <b class="cmd">snit::type</b> definition.  Notice that
every instance method gets an implicit argument called <b class="variable">self</b>;
this argument contains the object's name.  (There's more on
implicit method arguments below.)</p>
</div>
<div id="subsection26" class="doctools_subsection"><h3><a name="subsection26">How does a client call an instance method?</a></h3>
<p>The method name becomes a subcommand of the object.  For example,







|













|







859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
<p>An instance method is a procedure associated with a specific object
and called as a subcommand of the object's command.  It is given free
access to all of the object's type variables, instance variables, and
so forth.</p>
</div>
<div id="subsection25" class="doctools_subsection"><h3><a name="subsection25">How do I define an instance method?</a></h3>
<p>Instance methods are defined in the type definition using
the <b class="cmd"><a href="../../../../index.html#key372">method</a></b> statement.  Consider the following code that might be
used to add dogs to a computer simulation:</p>
<pre class="doctools_example">% snit::type dog {
    method bark {} {
        return &quot;$self barks.&quot;
    }
    method chase {thing} {
        return &quot;$self chases $thing.&quot;
    }
}
::dog
%
</pre>
<p>A dog can bark, and it can chase things.</p>
<p>The <b class="cmd"><a href="../../../../index.html#key372">method</a></b> statement looks just like a normal Tcl <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>,
except that it appears in a <b class="cmd">snit::type</b> definition.  Notice that
every instance method gets an implicit argument called <b class="variable">self</b>;
this argument contains the object's name.  (There's more on
implicit method arguments below.)</p>
</div>
<div id="subsection26" class="doctools_subsection"><h3><a name="subsection26">How does a client call an instance method?</a></h3>
<p>The method name becomes a subcommand of the object.  For example,
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
</div>
<div id="subsection29" class="doctools_subsection"><h3><a name="subsection29">What is a hierarchical method?</a></h3>
<p>An object's methods are subcommands of the object's instance command.
Hierarchical methods allow an object's methods to have subcommands of
their own; and these can in turn have subcommands, and so on.  This
allows the programmer to define a tree-shaped command structure, such
as is used by many of the Tk widgets--the subcommands of the
Tk <b class="cmd"><a href="../../../../index.html#text">text</a></b> widget's <b class="cmd">tag</b> method are hierarchical methods.</p>
</div>
<div id="subsection30" class="doctools_subsection"><h3><a name="subsection30">How do I define a hierarchical method?</a></h3>
<p>Define methods whose names consist of multiple words.  These words
define the hierarchy implicitly.  For example, the following code
defines a <b class="cmd">tag</b> method with subcommands <b class="cmd">cget</b> and
<b class="cmd">configure</b>:</p>
<pre class="doctools_example">snit::widget mytext {







|







927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
</div>
<div id="subsection29" class="doctools_subsection"><h3><a name="subsection29">What is a hierarchical method?</a></h3>
<p>An object's methods are subcommands of the object's instance command.
Hierarchical methods allow an object's methods to have subcommands of
their own; and these can in turn have subcommands, and so on.  This
allows the programmer to define a tree-shaped command structure, such
as is used by many of the Tk widgets--the subcommands of the
Tk <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget's <b class="cmd">tag</b> method are hierarchical methods.</p>
</div>
<div id="subsection30" class="doctools_subsection"><h3><a name="subsection30">How do I define a hierarchical method?</a></h3>
<p>Define methods whose names consist of multiple words.  These words
define the hierarchy implicitly.  For example, the following code
defines a <b class="cmd">tag</b> method with subcommands <b class="cmd">cget</b> and
<b class="cmd">configure</b>:</p>
<pre class="doctools_example">snit::widget mytext {
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
::fido
% fido chase cat
::fido chases cat. ::fido barks.
%
</pre>
</div>
<div id="subsection33" class="doctools_subsection"><h3><a name="subsection33">Are there any limitations on instance method arguments?</a></h3>
<p>Method argument lists are defined just like normal Tcl <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> argument
lists; in particular, they can include arguments with default values
 and the <b class="variable">args</b> argument.</p>
<p>However, every method also has a number of implicit arguments
provided by Snit in addition to those explicitly defined.  The names
of these implicit arguments may not used to name explicit arguments.</p>
</div>
<div id="subsection34" class="doctools_subsection"><h3><a name="subsection34">What implicit arguments are passed to each instance method?</a></h3>







|







982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
::fido
% fido chase cat
::fido chases cat. ::fido barks.
%
</pre>
</div>
<div id="subsection33" class="doctools_subsection"><h3><a name="subsection33">Are there any limitations on instance method arguments?</a></h3>
<p>Method argument lists are defined just like normal Tcl <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> argument
lists; in particular, they can include arguments with default values
 and the <b class="variable">args</b> argument.</p>
<p>However, every method also has a number of implicit arguments
provided by Snit in addition to those explicitly defined.  The names
of these implicit arguments may not used to name explicit arguments.</p>
</div>
<div id="subsection34" class="doctools_subsection"><h3><a name="subsection34">What implicit arguments are passed to each instance method?</a></h3>
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
more information.</p>
</div>
<div id="subsection39" class="doctools_subsection"><h3><a name="subsection39">How do I pass an instance method as a callback?</a></h3>
<p>It depends on the context.</p>
<p>Suppose in my application I have a <b class="cmd">dog</b> object named <b class="cmd">fido</b>,
and I want <b class="cmd">fido</b> to bark when a Tk button called <b class="cmd">.bark</b> is
pressed.  In this case, I create the callback command in the usual
way, using <b class="cmd"><a href="../../../../index.html#list">list</a></b>:</p>
<pre class="doctools_example">    button .bark -text &quot;Bark!&quot; -command [list fido bark]
</pre>
<p>In typical Tcl style, we use a callback to hook two independent
components together.  But suppose that the <b class="cmd">dog</b> object has
a graphical interface and owns the button itself?  In this case,
the <b class="cmd">dog</b> must pass one of its own instance methods to the
button it owns.  The obvious thing to do is this:</p>







|







1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
more information.</p>
</div>
<div id="subsection39" class="doctools_subsection"><h3><a name="subsection39">How do I pass an instance method as a callback?</a></h3>
<p>It depends on the context.</p>
<p>Suppose in my application I have a <b class="cmd">dog</b> object named <b class="cmd">fido</b>,
and I want <b class="cmd">fido</b> to bark when a Tk button called <b class="cmd">.bark</b> is
pressed.  In this case, I create the callback command in the usual
way, using <b class="cmd"><a href="../../../../index.html#key302">list</a></b>:</p>
<pre class="doctools_example">    button .bark -text &quot;Bark!&quot; -command [list fido bark]
</pre>
<p>In typical Tcl style, we use a callback to hook two independent
components together.  But suppose that the <b class="cmd">dog</b> object has
a graphical interface and owns the button itself?  In this case,
the <b class="cmd">dog</b> must pass one of its own instance methods to the
button it owns.  The obvious thing to do is this:</p>
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
        #...
    }
}
::dog
%
</pre>
<p>The command <b class="cmd">mymethod</b> takes any number of arguments, and can be
used like <b class="cmd"><a href="../../../../index.html#list">list</a></b> to build up a callback command; the only
difference is that <b class="cmd">mymethod</b> returns a
form of the command that won't change even if the instance's name
changes.</p>
<p>On the other hand, you might prefer to allow a widgetadaptor to
override a method such that your renamed widget will call the
widgetadaptor's method instead of its own.  In this case,
using <b class="cmd">[list $self bark]</b> will do what you want...but







|







1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
        #...
    }
}
::dog
%
</pre>
<p>The command <b class="cmd">mymethod</b> takes any number of arguments, and can be
used like <b class="cmd"><a href="../../../../index.html#key302">list</a></b> to build up a callback command; the only
difference is that <b class="cmd">mymethod</b> returns a
form of the command that won't change even if the instance's name
changes.</p>
<p>On the other hand, you might prefer to allow a widgetadaptor to
override a method such that your renamed widget will call the
widgetadaptor's method instead of its own.  In this case,
using <b class="cmd">[list $self bark]</b> will do what you want...but
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
If extreme cases, you might wish to avoid it; there are two methods
for doing so.</p>
<p>The first is to define a single instance variable, an array, and store
all of your instance data in the array.  This way, you're only paying
the declaration penalty for one variable--and you probably need the
variable most of the time anyway.  This method breaks down if your
instance variables include multiple arrays; in Tcl 8.5, however,
the <b class="cmd"><a href="../../../../index.html#dict">dict</a></b> command might come to your rescue.</p>
<p>The second method is to declare your instance variables explicitly
in your instance code, while <em>not</em> including them in the type
definition:</p>
<pre class="doctools_example">snit::type dog {
    constructor {} {
        variable mood
        set mood happy







|







1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
If extreme cases, you might wish to avoid it; there are two methods
for doing so.</p>
<p>The first is to define a single instance variable, an array, and store
all of your instance data in the array.  This way, you're only paying
the declaration penalty for one variable--and you probably need the
variable most of the time anyway.  This method breaks down if your
instance variables include multiple arrays; in Tcl 8.5, however,
the <b class="cmd"><a href="../../../../index.html#key705">dict</a></b> command might come to your rescue.</p>
<p>The second method is to declare your instance variables explicitly
in your instance code, while <em>not</em> including them in the type
definition:</p>
<pre class="doctools_example">snit::type dog {
    constructor {} {
        variable mood
        set mood happy
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
    }
}
</pre>
<p>Suppose the <b class="cmd">dog</b> type maintains a list of the names of the dogs
that have pedigrees.  The <b class="cmd">pedigreedDogs</b> type method returns this
list.</p>
<p>The <b class="cmd">typemethod</b> statement looks just like a normal Tcl
<b class="cmd"><a href="../../../../index.html#proc">proc</a></b>, except that it appears in a <b class="cmd">snit::type</b> definition.
Notice that every type method gets an implicit argument called
<b class="variable">type</b>, which contains the fully-qualified type name.</p>
</div>
<div id="subsection72" class="doctools_subsection"><h3><a name="subsection72">How does a client call a type method?</a></h3>
<p>The type method name becomes a subcommand of the type's command.  For
example, assuming that the constructor adds each pedigreed dog to the
list of <b class="variable">pedigreedDogs</b>,</p>







|







1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
    }
}
</pre>
<p>Suppose the <b class="cmd">dog</b> type maintains a list of the names of the dogs
that have pedigrees.  The <b class="cmd">pedigreedDogs</b> type method returns this
list.</p>
<p>The <b class="cmd">typemethod</b> statement looks just like a normal Tcl
<b class="cmd"><a href="../../../../index.html#key592">proc</a></b>, except that it appears in a <b class="cmd">snit::type</b> definition.
Notice that every type method gets an implicit argument called
<b class="variable">type</b>, which contains the fully-qualified type name.</p>
</div>
<div id="subsection72" class="doctools_subsection"><h3><a name="subsection72">How does a client call a type method?</a></h3>
<p>The type method name becomes a subcommand of the type's command.  For
example, assuming that the constructor adds each pedigreed dog to the
list of <b class="variable">pedigreedDogs</b>,</p>
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
<p>It's sometimes useful to define private type methods, that is, type
methods intended to be called only by other type or instance methods
of the same object.</p>
<p>Snit doesn't implement any access control on type methods; by
convention, the names of public methods begin with a lower-case
letter, and the names of private methods begin with an upper-case
letter.</p>
<p>Alternatively, a Snit <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> can be used as a private type method; see
<span class="sectref"><a href="#section10">PROCS</a></span>.</p>
</div>
<div id="subsection75" class="doctools_subsection"><h3><a name="subsection75">Are there any limitations on type method arguments?</a></h3>
<p>Method argument lists are defined just like normal Tcl proc argument
lists; in particular, they can include arguments with default values
and the <b class="variable">args</b> argument.</p>
<p>However, every type method is called with an implicit argument called







|







1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
<p>It's sometimes useful to define private type methods, that is, type
methods intended to be called only by other type or instance methods
of the same object.</p>
<p>Snit doesn't implement any access control on type methods; by
convention, the names of public methods begin with a lower-case
letter, and the names of private methods begin with an upper-case
letter.</p>
<p>Alternatively, a Snit <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> can be used as a private type method; see
<span class="sectref"><a href="#section10">PROCS</a></span>.</p>
</div>
<div id="subsection75" class="doctools_subsection"><h3><a name="subsection75">Are there any limitations on type method arguments?</a></h3>
<p>Method argument lists are defined just like normal Tcl proc argument
lists; in particular, they can include arguments with default values
and the <b class="variable">args</b> argument.</p>
<p>However, every type method is called with an implicit argument called
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
<p>Yes, you can define hierarchical type methods in just the same way as
you can define hierarchical instance methods.  See
<span class="sectref"><a href="#section5">INSTANCE METHODS</a></span> for more.</p>
</div>
</div>
<div id="section10" class="doctools_section"><h2><a name="section10">PROCS</a></h2>
<div id="subsection79" class="doctools_subsection"><h3><a name="subsection79">What is a proc?</a></h3>
<p>A Snit <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> is really just a Tcl proc defined within the type's
namespace.  You can use procs for private code that isn't related to
any particular instance.</p>
</div>
<div id="subsection80" class="doctools_subsection"><h3><a name="subsection80">How do I define a proc?</a></h3>
<p>Procs are defined by including a <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> statement in the type
definition:</p>
<pre class="doctools_example">snit::type mytype {
    # Pops and returns the first item from the list stored in the
    # listvar, updating the listvar
   proc pop {listvar} { ... }
   # ...
}
</pre>
</div>
<div id="subsection81" class="doctools_subsection"><h3><a name="subsection81">Are there any limitations on proc names?</a></h3>
<p>Any name can be used, so long as it does not begin with <b class="const">Snit_</b>;
names beginning with <b class="const">Snit_</b> are reserved for Snit's own use.
However, the wise programmer will avoid <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> names (<b class="cmd"><a href="../../../../index.html#set">set</a></b>,
<b class="cmd"><a href="../../../../index.html#list">list</a></b>, <b class="cmd">if</b>, etc.) that would shadow standard Tcl
command names.</p>
<p><b class="cmd"><a href="../../../../index.html#proc">proc</a></b> names, being private, should begin with a capital letter according
to convention; however, as there are typically no public <b class="cmd"><a href="../../../../index.html#proc">proc</a></b>s
in the type's namespace it doesn't matter much either way.</p>
</div>
<div id="subsection82" class="doctools_subsection"><h3><a name="subsection82">How does a method call a proc?</a></h3>
<p>Just like it calls any Tcl command.  For example,</p>
<pre class="doctools_example">snit::type mytype {
    # Pops and returns the first item from the list stored in the
    # listvar, updating the listvar
    proc pop {listvar} { ... }
    variable requestQueue {}
    # Get one request from the queue and process it.
    method processRequest {} {
        set req [pop requestQueue]
    }
}
</pre>
</div>
<div id="subsection83" class="doctools_subsection"><h3><a name="subsection83">How can I pass a proc to another object as a callback?</a></h3>
<p>The <b class="cmd">myproc</b> command returns a callback command for the
<b class="cmd"><a href="../../../../index.html#proc">proc</a></b>, just as <b class="cmd">mymethod</b> does for a method.</p>
</div>
</div>
<div id="section11" class="doctools_section"><h2><a name="section11">TYPE CONSTRUCTORS</a></h2>
<div id="subsection84" class="doctools_subsection"><h3><a name="subsection84">What is a type constructor?</a></h3>
<p>A type constructor is a body of code that initializes the type as a
whole, rather like a C++ static initializer.  The body of a type
constructor is executed once when the type is defined, and never







|




|












|
|

|
|


















|







1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
<p>Yes, you can define hierarchical type methods in just the same way as
you can define hierarchical instance methods.  See
<span class="sectref"><a href="#section5">INSTANCE METHODS</a></span> for more.</p>
</div>
</div>
<div id="section10" class="doctools_section"><h2><a name="section10">PROCS</a></h2>
<div id="subsection79" class="doctools_subsection"><h3><a name="subsection79">What is a proc?</a></h3>
<p>A Snit <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> is really just a Tcl proc defined within the type's
namespace.  You can use procs for private code that isn't related to
any particular instance.</p>
</div>
<div id="subsection80" class="doctools_subsection"><h3><a name="subsection80">How do I define a proc?</a></h3>
<p>Procs are defined by including a <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> statement in the type
definition:</p>
<pre class="doctools_example">snit::type mytype {
    # Pops and returns the first item from the list stored in the
    # listvar, updating the listvar
   proc pop {listvar} { ... }
   # ...
}
</pre>
</div>
<div id="subsection81" class="doctools_subsection"><h3><a name="subsection81">Are there any limitations on proc names?</a></h3>
<p>Any name can be used, so long as it does not begin with <b class="const">Snit_</b>;
names beginning with <b class="const">Snit_</b> are reserved for Snit's own use.
However, the wise programmer will avoid <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> names (<b class="cmd"><a href="../../../../index.html#key301">set</a></b>,
<b class="cmd"><a href="../../../../index.html#key302">list</a></b>, <b class="cmd">if</b>, etc.) that would shadow standard Tcl
command names.</p>
<p><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> names, being private, should begin with a capital letter according
to convention; however, as there are typically no public <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>s
in the type's namespace it doesn't matter much either way.</p>
</div>
<div id="subsection82" class="doctools_subsection"><h3><a name="subsection82">How does a method call a proc?</a></h3>
<p>Just like it calls any Tcl command.  For example,</p>
<pre class="doctools_example">snit::type mytype {
    # Pops and returns the first item from the list stored in the
    # listvar, updating the listvar
    proc pop {listvar} { ... }
    variable requestQueue {}
    # Get one request from the queue and process it.
    method processRequest {} {
        set req [pop requestQueue]
    }
}
</pre>
</div>
<div id="subsection83" class="doctools_subsection"><h3><a name="subsection83">How can I pass a proc to another object as a callback?</a></h3>
<p>The <b class="cmd">myproc</b> command returns a callback command for the
<b class="cmd"><a href="../../../../index.html#key592">proc</a></b>, just as <b class="cmd">mymethod</b> does for a method.</p>
</div>
</div>
<div id="section11" class="doctools_section"><h2><a name="section11">TYPE CONSTRUCTORS</a></h2>
<div id="subsection84" class="doctools_subsection"><h3><a name="subsection84">What is a type constructor?</a></h3>
<p>A type constructor is a body of code that initializes the type as a
whole, rather like a C++ static initializer.  The body of a type
constructor is executed once when the type is defined, and never
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
snit::type dog {
    typecomponent vet
    # ...
}
</pre>
</div>
<div id="subsection111" class="doctools_subsection"><h3><a name="subsection111">How do I install a type component?</a></h3>
<p>Just use the <b class="cmd"><a href="../../../../index.html#set">set</a></b> command to assign the component's object
command to the type component.  Because types
(even <b class="cmd">snit::widget</b> types) are not widgets, and do not have
options anyway, the extra features of the <b class="cmd">install</b> command are
not needed.</p>
<p>You'll usually install type components in the type constructor, as
shown here:</p>
<pre class="doctools_example">snit::type veterinarian { ... }







|







2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
snit::type dog {
    typecomponent vet
    # ...
}
</pre>
</div>
<div id="subsection111" class="doctools_subsection"><h3><a name="subsection111">How do I install a type component?</a></h3>
<p>Just use the <b class="cmd"><a href="../../../../index.html#key301">set</a></b> command to assign the component's object
command to the type component.  Because types
(even <b class="cmd">snit::widget</b> types) are not widgets, and do not have
options anyway, the extra features of the <b class="cmd">install</b> command are
not needed.</p>
<p>You'll usually install type components in the type constructor, as
shown here:</p>
<pre class="doctools_example">snit::type veterinarian { ... }
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
        $self configurelist $args
    }
}
</pre>
<p>This is the hard way to do it, by it demonstrates what delegation is
all about.  See the following answers for the easy way to do it.</p>
<p>Note that the constructor calls the <b class="method">configurelist</b> method
<b class="cmd"><a href="../../../../index.html#after">after</a></b> it creates its <b class="cmd">tail</b>; otherwise,
if <b class="option">-taillength</b> appeared in the list of <b class="variable">args</b> we'd get an
error.</p>
</div>
<div id="subsection114" class="doctools_subsection"><h3><a name="subsection114">How can I delegate a method to a component object?</a></h3>
<p>Delegation occurs frequently enough that Snit makes it easy. Any
method can be delegated to any component or type component
by placing a single <b class="cmd">delegate</b> statement in the type definition.







|







2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
        $self configurelist $args
    }
}
</pre>
<p>This is the hard way to do it, by it demonstrates what delegation is
all about.  See the following answers for the easy way to do it.</p>
<p>Note that the constructor calls the <b class="method">configurelist</b> method
<b class="cmd"><a href="../../../../index.html#key414">after</a></b> it creates its <b class="cmd">tail</b>; otherwise,
if <b class="option">-taillength</b> appeared in the list of <b class="variable">args</b> we'd get an
error.</p>
</div>
<div id="subsection114" class="doctools_subsection"><h3><a name="subsection114">How can I delegate a method to a component object?</a></h3>
<p>Delegation occurs frequently enough that Snit makes it easy. Any
method can be delegated to any component or type component
by placing a single <b class="cmd">delegate</b> statement in the type definition.
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
<p>This code has the same effect as the code shown under the previous
question: when a <b class="cmd">dog</b>'s <b class="cmd">wag</b> method is called, the call and
its arguments are passed along automatically to the <b class="cmd">tail</b> object.</p>
<p>Note that when a component is mentioned in a <b class="cmd">delegate</b> statement,
the component's instance variable is defined implicitly.  However,
it's still good practice to declare it explicitly using the
<b class="cmd">component</b> statement.</p>
<p>Note also that you can define a method name using the <b class="cmd"><a href="../../../../index.html#method">method</a></b>
statement, or you can define it using <b class="cmd">delegate</b>; you can't do
both.</p>
</div>
<div id="subsection115" class="doctools_subsection"><h3><a name="subsection115">Can I delegate to a method with a different name?</a></h3>
<p>Suppose you wanted to delegate the <b class="cmd">dog</b>'s <b class="method">wagtail</b> method to
the <b class="cmd">tail</b>'s <b class="method">wag</b> method.  After all you wag the tail, not
the dog.  It's easily done:</p>







|







2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
<p>This code has the same effect as the code shown under the previous
question: when a <b class="cmd">dog</b>'s <b class="cmd">wag</b> method is called, the call and
its arguments are passed along automatically to the <b class="cmd">tail</b> object.</p>
<p>Note that when a component is mentioned in a <b class="cmd">delegate</b> statement,
the component's instance variable is defined implicitly.  However,
it's still good practice to declare it explicitly using the
<b class="cmd">component</b> statement.</p>
<p>Note also that you can define a method name using the <b class="cmd"><a href="../../../../index.html#key372">method</a></b>
statement, or you can define it using <b class="cmd">delegate</b>; you can't do
both.</p>
</div>
<div id="subsection115" class="doctools_subsection"><h3><a name="subsection115">Can I delegate to a method with a different name?</a></h3>
<p>Suppose you wanted to delegate the <b class="cmd">dog</b>'s <b class="method">wagtail</b> method to
the <b class="cmd">tail</b>'s <b class="method">wag</b> method.  After all you wag the tail, not
the dog.  It's easily done:</p>
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
The name of an instance of a <b class="cmd">snit::widget</b> must be a valid Tk
widget name, and its parent widget must already exist.</p></li>
<li><p>An instance of a <b class="cmd">snit::type</b> can be destroyed by calling
its <b class="cmd">destroy</b> method.  Instances of a <b class="cmd">snit::widget</b> have no
destroy method; use the Tk <b class="cmd">destroy</b> command instead.</p></li>
<li><p>Every instance of a <b class="cmd">snit::widget</b> has one predefined component
called its <b class="variable">hull</b> component.
The hull is usually a Tk <b class="cmd"><a href="../../../../index.html#frame">frame</a></b> or <b class="cmd">toplevel</b> widget; any other
widgets created as part of the <b class="cmd">snit::widget</b> will usually be
contained within the hull.</p></li>
<li><p><b class="cmd">snit::widget</b>s can have their options receive default values from
<span class="sectref"><a href="#section19">THE TK OPTION DATABASE</a></span>.</p></li>
</ul>
</div>
<div id="subsection128" class="doctools_subsection"><h3><a name="subsection128">What is a hull component?</a></h3>
<p>Snit can't create a Tk widget object; only Tk can do that.
Thus, every instance of a <b class="cmd">snit::widget</b> must be wrapped around a
genuine Tk widget; this Tk widget is called the <i class="term">hull component</i>.
Snit effectively piggybacks the behavior you define (methods, options,
and so forth) on top of the hull component so that the whole thing
behaves like a standard Tk widget.</p>
<p>For <b class="cmd">snit::widget</b>s the hull component must be a Tk widget that
defines the <b class="const">-class</b> option.</p>
<p><b class="cmd">snit::widgetadaptor</b>s differ from <b class="cmd">snit::widget</b>s chiefly in
that any kind of widget can be used as the hull component; see
<span class="sectref"><a href="#section18">WIDGET ADAPTORS</a></span>.</p>
</div>
<div id="subsection129" class="doctools_subsection"><h3><a name="subsection129">How can I set the hull type for a snit::widget?</a></h3>
<p>A <b class="cmd">snit::widget</b>'s hull component will usually be a Tk <b class="cmd"><a href="../../../../index.html#frame">frame</a></b>
widget; however, it may be any Tk widget that defines the
<b class="const">-class</b> option.  You can
explicitly choose the hull type you prefer by including the <b class="cmd">hulltype</b>
command in the widget definition:</p>
<pre class="doctools_example">snit::widget mytoplevel {
    hulltype toplevel
    # ...
}
</pre>
<p>If no <b class="cmd">hulltype</b> command appears, the hull will be a <b class="cmd"><a href="../../../../index.html#frame">frame</a></b>.</p>
<p>By default, Snit recognizes the following hull types: the Tk widgets
<b class="cmd"><a href="../../../../index.html#frame">frame</a></b>, <b class="cmd">labelframe</b>, <b class="cmd">toplevel</b>, and the Tile widgets
<b class="cmd">ttk::frame</b>, <b class="cmd">ttk::labelframe</b>, and <b class="cmd">ttk::toplevel</b>.  To
enable the use of some other kind of widget as the hull type, you can
<b class="cmd">lappend</b> the widget command to the variable <b class="variable">snit::hulltypes</b> (always
provided the widget defines the <b class="const">-class</b> option.  For example,
suppose Tk gets a new widget type called a <b class="cmd">prettyframe</b>:</p>
<pre class="doctools_example">lappend snit::hulltypes prettyframe
snit::widget mywidget {







|




















|









|

|







2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
The name of an instance of a <b class="cmd">snit::widget</b> must be a valid Tk
widget name, and its parent widget must already exist.</p></li>
<li><p>An instance of a <b class="cmd">snit::type</b> can be destroyed by calling
its <b class="cmd">destroy</b> method.  Instances of a <b class="cmd">snit::widget</b> have no
destroy method; use the Tk <b class="cmd">destroy</b> command instead.</p></li>
<li><p>Every instance of a <b class="cmd">snit::widget</b> has one predefined component
called its <b class="variable">hull</b> component.
The hull is usually a Tk <b class="cmd"><a href="../../../../index.html#key674">frame</a></b> or <b class="cmd">toplevel</b> widget; any other
widgets created as part of the <b class="cmd">snit::widget</b> will usually be
contained within the hull.</p></li>
<li><p><b class="cmd">snit::widget</b>s can have their options receive default values from
<span class="sectref"><a href="#section19">THE TK OPTION DATABASE</a></span>.</p></li>
</ul>
</div>
<div id="subsection128" class="doctools_subsection"><h3><a name="subsection128">What is a hull component?</a></h3>
<p>Snit can't create a Tk widget object; only Tk can do that.
Thus, every instance of a <b class="cmd">snit::widget</b> must be wrapped around a
genuine Tk widget; this Tk widget is called the <i class="term">hull component</i>.
Snit effectively piggybacks the behavior you define (methods, options,
and so forth) on top of the hull component so that the whole thing
behaves like a standard Tk widget.</p>
<p>For <b class="cmd">snit::widget</b>s the hull component must be a Tk widget that
defines the <b class="const">-class</b> option.</p>
<p><b class="cmd">snit::widgetadaptor</b>s differ from <b class="cmd">snit::widget</b>s chiefly in
that any kind of widget can be used as the hull component; see
<span class="sectref"><a href="#section18">WIDGET ADAPTORS</a></span>.</p>
</div>
<div id="subsection129" class="doctools_subsection"><h3><a name="subsection129">How can I set the hull type for a snit::widget?</a></h3>
<p>A <b class="cmd">snit::widget</b>'s hull component will usually be a Tk <b class="cmd"><a href="../../../../index.html#key674">frame</a></b>
widget; however, it may be any Tk widget that defines the
<b class="const">-class</b> option.  You can
explicitly choose the hull type you prefer by including the <b class="cmd">hulltype</b>
command in the widget definition:</p>
<pre class="doctools_example">snit::widget mytoplevel {
    hulltype toplevel
    # ...
}
</pre>
<p>If no <b class="cmd">hulltype</b> command appears, the hull will be a <b class="cmd"><a href="../../../../index.html#key674">frame</a></b>.</p>
<p>By default, Snit recognizes the following hull types: the Tk widgets
<b class="cmd"><a href="../../../../index.html#key674">frame</a></b>, <b class="cmd">labelframe</b>, <b class="cmd">toplevel</b>, and the Tile widgets
<b class="cmd">ttk::frame</b>, <b class="cmd">ttk::labelframe</b>, and <b class="cmd">ttk::toplevel</b>.  To
enable the use of some other kind of widget as the hull type, you can
<b class="cmd">lappend</b> the widget command to the variable <b class="variable">snit::hulltypes</b> (always
provided the widget defines the <b class="const">-class</b> option.  For example,
suppose Tk gets a new widget type called a <b class="cmd">prettyframe</b>:</p>
<pre class="doctools_example">lappend snit::hulltypes prettyframe
snit::widget mywidget {
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
prior to calling <b class="cmd">installhull</b> will fail.</p>
</div>
<div id="subsection133" class="doctools_subsection"><h3><a name="subsection133">Can I adapt a widget created elsewhere in the program?</a></h3>
<p>Yes.</p>
<p>At times, it can be convenient to adapt a pre-existing widget instead
of creating your own.
For example, the Bwidget <b class="cmd">PagesManager</b> widget manages a
set of <b class="cmd"><a href="../../../../index.html#frame">frame</a></b> widgets, only one of which is visible at a time.
The application chooses which <b class="cmd"><a href="../../../../index.html#frame">frame</a></b> is visible.  All of the
These <b class="cmd"><a href="../../../../index.html#frame">frame</a></b>s are created by the <b class="cmd">PagesManager</b> itself, using
its <b class="method">add</b> method.  It's convenient to adapt these frames to
do what we'd like them to do.</p>
<p>In a case like this, the Tk widget will already exist when the
<b class="cmd">snit::widgetadaptor</b> is created.  Snit provides an alternate form
of the <b class="cmd">installhull</b> command for this purpose:</p>
<pre class="doctools_example">snit::widgetadaptor pageadaptor {
    constructor {args} {







|
|
|







2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
prior to calling <b class="cmd">installhull</b> will fail.</p>
</div>
<div id="subsection133" class="doctools_subsection"><h3><a name="subsection133">Can I adapt a widget created elsewhere in the program?</a></h3>
<p>Yes.</p>
<p>At times, it can be convenient to adapt a pre-existing widget instead
of creating your own.
For example, the Bwidget <b class="cmd">PagesManager</b> widget manages a
set of <b class="cmd"><a href="../../../../index.html#key674">frame</a></b> widgets, only one of which is visible at a time.
The application chooses which <b class="cmd"><a href="../../../../index.html#key674">frame</a></b> is visible.  All of the
These <b class="cmd"><a href="../../../../index.html#key674">frame</a></b>s are created by the <b class="cmd">PagesManager</b> itself, using
its <b class="method">add</b> method.  It's convenient to adapt these frames to
do what we'd like them to do.</p>
<p>In a case like this, the Tk widget will already exist when the
<b class="cmd">snit::widgetadaptor</b> is created.  Snit provides an alternate form
of the <b class="cmd">installhull</b> command for this purpose:</p>
<pre class="doctools_example">snit::widgetadaptor pageadaptor {
    constructor {args} {
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
<b class="cmd">widgetclass</b> statement within the <b class="cmd">snit::widget</b> definition:</p>
<pre class="doctools_example">snit::widget ::mylibrary::scrolledText {
    widgetclass Text
    # ...
}
</pre>
<p>The above definition says that a <b class="cmd">scrolledText</b> megawidget has the
same widget class as an ordinary <b class="cmd"><a href="../../../../index.html#text">text</a></b> widget.  This might or
might not be a good idea, depending on how the rest of the megawidget
is defined, and how its options are delegated.</p>
</div>
<div id="subsection138" class="doctools_subsection"><h3><a name="subsection138">What is my snit::widgetadaptor's widget class?</a></h3>
<p>The widget class of a <b class="cmd">snit::widgetadaptor</b> is just the widget
class of its hull widget; Snit has no control over this.</p>
<p>Note that the widget class can be changed only for <b class="cmd"><a href="../../../../index.html#frame">frame</a></b> and
<b class="cmd">toplevel</b> widgets, which is why these are the valid hull types
for <b class="cmd">snit::widget</b>s.</p>
<p>Try to use <b class="cmd">snit::widgetadaptor</b>s only to make small modifications
to another widget's behavior.  Then, it will usually not make sense to
change the widget's widget class anyway.</p>
</div>
<div id="subsection139" class="doctools_subsection"><h3><a name="subsection139">What are option resource and class names?</a></h3>
<p>Every Tk widget option has three names: the option name, the resource
name, and the class name.
The option name begins with a hyphen and is all lowercase; it's used
when creating widgets, and with the <b class="cmd">configure</b> and <b class="cmd">cget</b>
commands.</p>
<p>The resource and class names are used to initialize option
default values by querying the option database.
The resource name is usually just the option
name minus the hyphen, but may contain uppercase letters at word
boundaries; the class name is usually just the resource
name with an initial capital, but not always.  For example, here are
the option, resource, and class names for several Tk <b class="cmd"><a href="../../../../index.html#text">text</a></b>
widget options:</p>
<pre class="doctools_example">    -background         background         Background
    -borderwidth        borderWidth        BorderWidth
    -insertborderwidth  insertBorderWidth  BorderWidth
    -padx               padX               Pad
</pre>
<p>As is easily seen, sometimes the resource and class names can be







|






|


















|







2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
<b class="cmd">widgetclass</b> statement within the <b class="cmd">snit::widget</b> definition:</p>
<pre class="doctools_example">snit::widget ::mylibrary::scrolledText {
    widgetclass Text
    # ...
}
</pre>
<p>The above definition says that a <b class="cmd">scrolledText</b> megawidget has the
same widget class as an ordinary <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget.  This might or
might not be a good idea, depending on how the rest of the megawidget
is defined, and how its options are delegated.</p>
</div>
<div id="subsection138" class="doctools_subsection"><h3><a name="subsection138">What is my snit::widgetadaptor's widget class?</a></h3>
<p>The widget class of a <b class="cmd">snit::widgetadaptor</b> is just the widget
class of its hull widget; Snit has no control over this.</p>
<p>Note that the widget class can be changed only for <b class="cmd"><a href="../../../../index.html#key674">frame</a></b> and
<b class="cmd">toplevel</b> widgets, which is why these are the valid hull types
for <b class="cmd">snit::widget</b>s.</p>
<p>Try to use <b class="cmd">snit::widgetadaptor</b>s only to make small modifications
to another widget's behavior.  Then, it will usually not make sense to
change the widget's widget class anyway.</p>
</div>
<div id="subsection139" class="doctools_subsection"><h3><a name="subsection139">What are option resource and class names?</a></h3>
<p>Every Tk widget option has three names: the option name, the resource
name, and the class name.
The option name begins with a hyphen and is all lowercase; it's used
when creating widgets, and with the <b class="cmd">configure</b> and <b class="cmd">cget</b>
commands.</p>
<p>The resource and class names are used to initialize option
default values by querying the option database.
The resource name is usually just the option
name minus the hyphen, but may contain uppercase letters at word
boundaries; the class name is usually just the resource
name with an initial capital, but not always.  For example, here are
the option, resource, and class names for several Tk <b class="cmd"><a href="../../../../index.html#key248">text</a></b>
widget options:</p>
<pre class="doctools_example">    -background         background         Background
    -borderwidth        borderWidth        BorderWidth
    -insertborderwidth  insertBorderWidth  BorderWidth
    -padx               padX               Pad
</pre>
<p>As is easily seen, sometimes the resource and class names can be
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
    # ...
}
</pre>
<p>In this case, the <b class="cmd">installhull</b> command will create the hull using
a command like this:</p>
<pre class="doctools_example">    set hull [text $win -foreground white]
</pre>
<p>The hull is a <b class="cmd"><a href="../../../../index.html#text">text</a></b> widget, so its widget class is <b class="const">Text</b>.  Just
as with <b class="cmd">snit::widget</b> hulls, Snit assumes that it will pick up
all of its normal option values automatically, without help from Snit.
Options delegated from a different name are initialized from the
option database in the same way as described above.</p>
<p>In earlier versions of Snit, <b class="cmd">snit::widgetadaptor</b>s were expected
to call <b class="cmd">installhull</b> like this:</p>
<pre class="doctools_example">    installhull [text $win -foreground white]
</pre>
<p>This form still works--but Snit will not query the option database as
described above.</p>
</div>
<div id="subsection144" class="doctools_subsection"><h3><a name="subsection144">How does Snit initialize options delegated to other components?</a></h3>
<p>For hull components, Snit assumes that Tk will do most of the work
automatically.  Non-hull components are somewhat more complicated, because
they are matched against the option database twice.</p>
<p>A component widget remains a widget still, and is therefore
initialized from the option database in the usual way.  A <b class="cmd"><a href="../../../../index.html#text">text</a></b>
widget remains a <b class="cmd"><a href="../../../../index.html#text">text</a></b> widget whether it is a component of a
megawidget or not, and will be created as such.</p>
<p>But then, the option database is queried for all options delegated to
the component, and the component is initialized accordingly--provided
that the <b class="cmd">install</b> command is used to create it.</p>
<p>Before option database support was added to Snit, the usual way to
create a component was to simply create it in the constructor and
assign its command name to the component variable:</p>







|
















|
|







2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
    # ...
}
</pre>
<p>In this case, the <b class="cmd">installhull</b> command will create the hull using
a command like this:</p>
<pre class="doctools_example">    set hull [text $win -foreground white]
</pre>
<p>The hull is a <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget, so its widget class is <b class="const">Text</b>.  Just
as with <b class="cmd">snit::widget</b> hulls, Snit assumes that it will pick up
all of its normal option values automatically, without help from Snit.
Options delegated from a different name are initialized from the
option database in the same way as described above.</p>
<p>In earlier versions of Snit, <b class="cmd">snit::widgetadaptor</b>s were expected
to call <b class="cmd">installhull</b> like this:</p>
<pre class="doctools_example">    installhull [text $win -foreground white]
</pre>
<p>This form still works--but Snit will not query the option database as
described above.</p>
</div>
<div id="subsection144" class="doctools_subsection"><h3><a name="subsection144">How does Snit initialize options delegated to other components?</a></h3>
<p>For hull components, Snit assumes that Tk will do most of the work
automatically.  Non-hull components are somewhat more complicated, because
they are matched against the option database twice.</p>
<p>A component widget remains a widget still, and is therefore
initialized from the option database in the usual way.  A <b class="cmd"><a href="../../../../index.html#key248">text</a></b>
widget remains a <b class="cmd"><a href="../../../../index.html#key248">text</a></b> widget whether it is a component of a
megawidget or not, and will be created as such.</p>
<p>But then, the option database is queried for all options delegated to
the component, and the component is initialized accordingly--provided
that the <b class="cmd">install</b> command is used to create it.</p>
<p>Before option database support was added to Snit, the usual way to
create a component was to simply create it in the constructor and
assign its command name to the component variable:</p>
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
syntax.  If it doesn't, don't use <b class="cmd">install</b>.</p>
</div>
</div>
<div id="section20" class="doctools_section"><h2><a name="section20">ENSEMBLE COMMANDS</a></h2>
<div id="subsection146" class="doctools_subsection"><h3><a name="subsection146">What is an ensemble command?</a></h3>
<p>An ensemble command is a command with subcommands.  Snit objects are
all ensemble commands; however, the term more usually refers to
commands like the standard Tcl commands <b class="cmd"><a href="../../../../index.html#string">string</a></b>, <b class="cmd"><a href="../../../../index.html#file">file</a></b>,
and <b class="cmd">clock</b>.  In a sense, these are singleton objects--there's
only one instance of them.</p>
</div>
<div id="subsection147" class="doctools_subsection"><h3><a name="subsection147">How can I create an ensemble command using Snit?</a></h3>
<p>There are two ways--as a <b class="cmd">snit::type</b>, or as an instance of
a <b class="cmd">snit::type</b>.</p>
</div>
<div id="subsection148" class="doctools_subsection"><h3><a name="subsection148">How can I create an ensemble command using an instance of a snit::type?</a></h3>
<p>Define a type whose <span class="sectref"><a href="#section5">INSTANCE METHODS</a></span> are the subcommands
of your ensemble command.  Then, create an instance of the type with
the desired name.</p>
<p>For example, the following code uses <span class="sectref"><a href="#section16">DELEGATION</a></span> to create
a work-alike for the standard <b class="cmd"><a href="../../../../index.html#string">string</a></b> command:</p>
<pre class="doctools_example">snit::type ::mynamespace::mystringtype {
    delegate method * to stringhandler
    constructor {} {
        set stringhandler string
    }
}
::mynamespace::mystringtype mystring
</pre>
<p>We create the type in a namespace, so that the type command is hidden;
then we create a single instance with the desired name--
<b class="cmd">mystring</b>, in this case.</p>
<p>This method has two drawbacks.  First, it leaves the type command
floating about.  More seriously, your shiny new ensemble
command will have <b class="method">info</b> and <b class="method">destroy</b> subcommands that
you probably have no use for.  But read on.</p>
</div>
<div id="subsection149" class="doctools_subsection"><h3><a name="subsection149">How can I create an ensemble command using a snit::type?</a></h3>
<p>Define a type whose <span class="sectref"><a href="#section9">TYPE METHODS</a></span> are the subcommands
of your ensemble command.</p>
<p>For example, the following code uses <span class="sectref"><a href="#section16">DELEGATION</a></span> to create
a work-alike for the standard <b class="cmd"><a href="../../../../index.html#string">string</a></b> command:</p>
<pre class="doctools_example">snit::type mystring {
    delegate typemethod * to stringhandler
    typeconstructor {
        set stringhandler string
    }
}
</pre>







|












|




















|







2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
syntax.  If it doesn't, don't use <b class="cmd">install</b>.</p>
</div>
</div>
<div id="section20" class="doctools_section"><h2><a name="section20">ENSEMBLE COMMANDS</a></h2>
<div id="subsection146" class="doctools_subsection"><h3><a name="subsection146">What is an ensemble command?</a></h3>
<p>An ensemble command is a command with subcommands.  Snit objects are
all ensemble commands; however, the term more usually refers to
commands like the standard Tcl commands <b class="cmd"><a href="../../../../index.html#key280">string</a></b>, <b class="cmd"><a href="../../../../index.html#key31">file</a></b>,
and <b class="cmd">clock</b>.  In a sense, these are singleton objects--there's
only one instance of them.</p>
</div>
<div id="subsection147" class="doctools_subsection"><h3><a name="subsection147">How can I create an ensemble command using Snit?</a></h3>
<p>There are two ways--as a <b class="cmd">snit::type</b>, or as an instance of
a <b class="cmd">snit::type</b>.</p>
</div>
<div id="subsection148" class="doctools_subsection"><h3><a name="subsection148">How can I create an ensemble command using an instance of a snit::type?</a></h3>
<p>Define a type whose <span class="sectref"><a href="#section5">INSTANCE METHODS</a></span> are the subcommands
of your ensemble command.  Then, create an instance of the type with
the desired name.</p>
<p>For example, the following code uses <span class="sectref"><a href="#section16">DELEGATION</a></span> to create
a work-alike for the standard <b class="cmd"><a href="../../../../index.html#key280">string</a></b> command:</p>
<pre class="doctools_example">snit::type ::mynamespace::mystringtype {
    delegate method * to stringhandler
    constructor {} {
        set stringhandler string
    }
}
::mynamespace::mystringtype mystring
</pre>
<p>We create the type in a namespace, so that the type command is hidden;
then we create a single instance with the desired name--
<b class="cmd">mystring</b>, in this case.</p>
<p>This method has two drawbacks.  First, it leaves the type command
floating about.  More seriously, your shiny new ensemble
command will have <b class="method">info</b> and <b class="method">destroy</b> subcommands that
you probably have no use for.  But read on.</p>
</div>
<div id="subsection149" class="doctools_subsection"><h3><a name="subsection149">How can I create an ensemble command using a snit::type?</a></h3>
<p>Define a type whose <span class="sectref"><a href="#section9">TYPE METHODS</a></span> are the subcommands
of your ensemble command.</p>
<p>For example, the following code uses <span class="sectref"><a href="#section16">DELEGATION</a></span> to create
a work-alike for the standard <b class="cmd"><a href="../../../../index.html#key280">string</a></b> command:</p>
<pre class="doctools_example">snit::type mystring {
    delegate typemethod * to stringhandler
    typeconstructor {
        set stringhandler string
    }
}
</pre>
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
<div id="section23" class="doctools_section"><h2><a name="section23">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>snit</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bwidget">BWidget</a>, <a href="../../../../index.html#c_">C++</a>, <a href="../../../../index.html#incr_tcl">Incr Tcl</a>, <a href="../../../../index.html#adaptors">adaptors</a>, <a href="../../../../index.html#class">class</a>, <a href="../../../../index.html#mega_widget">mega widget</a>, <a href="../../../../index.html#object">object</a>, <a href="../../../../index.html#object_oriented">object oriented</a>, <a href="../../../../index.html#widget">widget</a>, <a href="../../../../index.html#widget_adaptors">widget adaptors</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2006, by William H. Duquette</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








3238
3239
3240
3241
3242
3243
3244






3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
<div id="section23" class="doctools_section"><h2><a name="section23">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>snit</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key241">BWidget</a>, <a href="../../../../index.html#key237">C++</a>, <a href="../../../../index.html#key244">Incr Tcl</a>, <a href="../../../../index.html#key242">adaptors</a>, <a href="../../../../index.html#key240">class</a>, <a href="../../../../index.html#key239">mega widget</a>, <a href="../../../../index.html#key243">object</a>, <a href="../../../../index.html#key236">object oriented</a>, <a href="../../../../index.html#key235">widget</a>, <a href="../../../../index.html#key238">widget adaptors</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2006, by William H. Duquette</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/soundex/soundex.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>soundex - Soundex</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>soundex - Soundex</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'soundex.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; ????, Algorithm: Donald E. Knuth   -- Copyright &amp;copy; 2003, Documentation: Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 1998, Tcl port: Evan Rempel &amp;lt;erempel@uvic.ca&amp;gt;
   -->
<!-- soundex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">soundex(n) 1.0 tcllib &quot;Soundex&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>soundex - Soundex</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'soundex.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; ????, Algorithm: Donald E. Knuth   -- Copyright &copy; 2003, Documentation: Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;   -- Copyright &copy; 1998, Tcl port: Evan Rempel &lt;erempel@uvic.ca&gt;
   -->
<! -- soundex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">soundex(n) 1.0 tcllib &quot;Soundex&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>soundex - Soundex</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>soundex</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#knuth">knuth</a>, <a href="../../../../index.html#soundex">soundex</a>, <a href="../../../../index.html#text_comparison">text comparison</a>, <a href="../../../../index.html#text_likeness">text likeness</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; ????, Algorithm: Donald E. Knuth<br>
Copyright &copy; 2003, Documentation: Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 1998, Tcl port: Evan Rempel &lt;erempel@uvic.ca&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|










156
157
158
159
160
161
162






163
164
165
166
167
168
169
170
171
172
173
174
175
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>soundex</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key285">knuth</a>, <a href="../../../../index.html#key284">soundex</a>, <a href="../../../../index.html#key283">text comparison</a>, <a href="../../../../index.html#key286">text likeness</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; ????, Algorithm: Donald E. Knuth<br>
Copyright &copy; 2003, Documentation: Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 1998, Tcl port: Evan Rempel &lt;erempel@uvic.ca&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/stooop/stooop.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>stooop - Simple Tcl Only Object Oriented Programming</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>stooop - Simple Tcl Only Object Oriented Programming</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'stooop.man' by tcllib/doctools with format 'html'
   -->
<!-- stooop.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">stooop(n) 4.4.1 tcllib &quot;Simple Tcl Only Object Oriented Programming&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>stooop - Object oriented extension.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'stooop.man' by tcllib/doctools with format 'html'
   -->
<! -- stooop.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">stooop(n) 4.4.1 tcllib &quot;Simple Tcl Only Object Oriented Programming&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>stooop - Object oriented extension.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<li><a href="#9"><b class="cmd">::stooop::report</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to extend Tcl in an object oriented
manner, using a familiar C++ like syntax and behaviour. Stooop only
introduces a few new commands: <b class="cmd"><a href="../../../../index.html#class">class</a></b>, <b class="cmd">new</b>, <b class="cmd">delete</b>,
<b class="cmd">virtual</b> and <b class="cmd">classof</b>. Along with a few coding conventions,
that is basically all you need to know to use stooop. Stooop is meant
to be as simple to use as possible.</p>
<p>This manual is very succinct and is to be used as a quick reminder for
the programmer, who should have read the thorough <a href="stooop_man.html">stooop_man.html</a>
HTML documentation at this point.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::stooop::class</b> <i class="arg">name body</i></a></dt>
<dd><p>This command creates a class. The body, similar in contents to a Tcl
namespace (which a class actually also is), contains member procedure
definitions. Member procedures can also be defined outside the class
body, by prefixing their name with <b class="const">class::</b>, as you would
proceed with namespace procedures.</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#proc">proc</a></b> <i class="arg">class</i> {<b class="const">this</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span>} <span class="opt">?<i class="arg">base</i> {<span class="opt">?<i class="arg">arg arg ...</i>?</span>} ...?</span> <i class="arg">body</i></dt>
<dd><p>This is the constructor procedure for the class. It is invoked
following a <b class="cmd">new</b> invocation on the class. It must have the same
name as the class and a first argument named <b class="const">this</b>. Any number
of base classes specifications, including arguments to be passed to
their constructor, are allowed before the actual body of the
procedure.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#proc">proc</a></b> ~<i class="arg">class</i> {<b class="const">this</b>} <i class="arg">body</i></dt>
<dd><p>This is the destructor procedure for the class. It is invoked
following a <b class="cmd">delete</b> invocation. Its name must be the
concatenation of a single <b class="const">~</b> character followed by the class
name (as in C++). It must have a single argument named <b class="const">this</b>.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#proc">proc</a></b> <i class="arg">name</i> {<b class="const">this</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span>} <i class="arg">body</i></dt>
<dd><p>This is a member procedure of the class, as its first argument is
named <b class="const">this</b>. It allows a simple access of member data for the
object referenced by <b class="const">this</b> inside the procedure. For example:</p>
<pre class="doctools_example">
   set ($this,data) 0
</pre>
</dd>
<dt><b class="cmd"><a href="../../../../index.html#proc">proc</a></b> <i class="arg">name</i> {<span class="opt">?<i class="arg">arg arg ...</i>?</span>} <i class="arg">body</i></dt>
<dd><p>This is a static (as in C++) member procedure of the class, as its
first argument is not named <b class="const">this</b>. Static (global) class data
can be accessed as in:</p>
<pre class="doctools_example">
   set (data) 0
</pre>
</dd>
<dt><b class="cmd"><a href="../../../../index.html#proc">proc</a></b> <i class="arg">class</i> {<b class="const">this copy</b>} <i class="arg">body</i></dt>
<dd><p>This is the optional copy procedure for the class. It must have the
same name as the class and exactly 2 arguments named <b class="const">this</b> and
<b class="const">copy</b>. It is invoked following a <b class="cmd">new</b> invocation on an
existing object of the class.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::stooop::new</b> <i class="arg">class</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>This command is used to create an object. The first argument is the







|














|






|




|







|







|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<li><a href="#9"><b class="cmd">::stooop::report</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides commands to extend Tcl in an object oriented
manner, using a familiar C++ like syntax and behaviour. Stooop only
introduces a few new commands: <b class="cmd"><a href="../../../../index.html#key240">class</a></b>, <b class="cmd">new</b>, <b class="cmd">delete</b>,
<b class="cmd">virtual</b> and <b class="cmd">classof</b>. Along with a few coding conventions,
that is basically all you need to know to use stooop. Stooop is meant
to be as simple to use as possible.</p>
<p>This manual is very succinct and is to be used as a quick reminder for
the programmer, who should have read the thorough <a href="stooop_man.html">stooop_man.html</a>
HTML documentation at this point.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::stooop::class</b> <i class="arg">name body</i></a></dt>
<dd><p>This command creates a class. The body, similar in contents to a Tcl
namespace (which a class actually also is), contains member procedure
definitions. Member procedures can also be defined outside the class
body, by prefixing their name with <b class="const">class::</b>, as you would
proceed with namespace procedures.</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">class</i> {<b class="const">this</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span>} <span class="opt">?<i class="arg">base</i> {<span class="opt">?<i class="arg">arg arg ...</i>?</span>} ...?</span> <i class="arg">body</i></dt>
<dd><p>This is the constructor procedure for the class. It is invoked
following a <b class="cmd">new</b> invocation on the class. It must have the same
name as the class and a first argument named <b class="const">this</b>. Any number
of base classes specifications, including arguments to be passed to
their constructor, are allowed before the actual body of the
procedure.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> ~<i class="arg">class</i> {<b class="const">this</b>} <i class="arg">body</i></dt>
<dd><p>This is the destructor procedure for the class. It is invoked
following a <b class="cmd">delete</b> invocation. Its name must be the
concatenation of a single <b class="const">~</b> character followed by the class
name (as in C++). It must have a single argument named <b class="const">this</b>.</p></dd>
<dt><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">name</i> {<b class="const">this</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span>} <i class="arg">body</i></dt>
<dd><p>This is a member procedure of the class, as its first argument is
named <b class="const">this</b>. It allows a simple access of member data for the
object referenced by <b class="const">this</b> inside the procedure. For example:</p>
<pre class="doctools_example">
   set ($this,data) 0
</pre>
</dd>
<dt><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">name</i> {<span class="opt">?<i class="arg">arg arg ...</i>?</span>} <i class="arg">body</i></dt>
<dd><p>This is a static (as in C++) member procedure of the class, as its
first argument is not named <b class="const">this</b>. Static (global) class data
can be accessed as in:</p>
<pre class="doctools_example">
   set (data) 0
</pre>
</dd>
<dt><b class="cmd"><a href="../../../../index.html#key592">proc</a></b> <i class="arg">class</i> {<b class="const">this copy</b>} <i class="arg">body</i></dt>
<dd><p>This is the optional copy procedure for the class. It must have the
same name as the class and exactly 2 arguments named <b class="const">this</b> and
<b class="const">copy</b>. It is invoked following a <b class="cmd">new</b> invocation on an
existing object of the class.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::stooop::new</b> <i class="arg">class</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>This command is used to create an object. The first argument is the
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
instanciation.</p></dd>
<dt><b class="variable">STOOOPCHECKALL</b></dt>
<dd><p>Setting this variable to any true value will cause stooop to activate
both procedure and data member checking.</p></dd>
<dt><b class="variable">STOOOPCHECKOBJECTS</b></dt>
<dd><p>Setting this variable to any true value will cause stooop to activate
object checking. The following stooop namespace procedures then become
available for debugging: <b class="cmd">printObjects</b>, <b class="cmd"><a href="../../../../index.html#record">record</a></b> and
<b class="cmd"><a href="../report/report.html">report</a></b>.</p></dd>
<dt><b class="variable">STOOOPTRACEPROCEDURES</b></dt>
<dd><p>Setting this environment variable to either <b class="const">stdout</b>,
<b class="const">stderr</b> or a file name, activates procedure tracing. The
stooop library will then output to the specified channel 1 line of
informational text for each member procedure invocation.</p></dd>
<dt><b class="variable">STOOOPTRACEPROCEDURESFORMAT</b></dt>







|







232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
instanciation.</p></dd>
<dt><b class="variable">STOOOPCHECKALL</b></dt>
<dd><p>Setting this variable to any true value will cause stooop to activate
both procedure and data member checking.</p></dd>
<dt><b class="variable">STOOOPCHECKOBJECTS</b></dt>
<dd><p>Setting this variable to any true value will cause stooop to activate
object checking. The following stooop namespace procedures then become
available for debugging: <b class="cmd">printObjects</b>, <b class="cmd"><a href="../../../../index.html#key307">record</a></b> and
<b class="cmd"><a href="../report/report.html">report</a></b>.</p></dd>
<dt><b class="variable">STOOOPTRACEPROCEDURES</b></dt>
<dd><p>Setting this environment variable to either <b class="const">stdout</b>,
<b class="const">stderr</b> or a file name, activates procedure tracing. The
stooop library will then output to the specified channel 1 line of
informational text for each member procedure invocation.</p></dd>
<dt><b class="variable">STOOOPTRACEPROCEDURESFORMAT</b></dt>
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<dt><b class="variable">STOOOPTRACEDATAFORMAT</b></dt>
<dd><p>Defines the trace data output format. Defaults to
<b class="const">&quot;class: %C, procedure: %p, array: %A, object: %O, member: %m, operation: %o, value: %v&quot;</b>.</p></dd>
<dt><b class="variable">STOOOPTRACEDATAOPERATIONS</b></dt>
<dd><p>When tracing data output, by default, all read, write and unsetting
accesses are reported, but the user can set this variable to any
combination of the letters <b class="const">r</b>, <b class="const">w</b>, and <b class="const">u</b> for
more specific tracing (please refer to the <b class="cmd"><a href="../../../../index.html#trace">trace</a></b> Tcl manual page
for more information).</p></dd>
<dt><b class="variable">STOOOPTRACEALL</b></dt>
<dd><p>Setting this environment variable to either <b class="const">stdout</b>,
<b class="const">stderr</b> or a file name, enables both procedure and data
tracing.</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::stooop::printObjects</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>







|







254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<dt><b class="variable">STOOOPTRACEDATAFORMAT</b></dt>
<dd><p>Defines the trace data output format. Defaults to
<b class="const">&quot;class: %C, procedure: %p, array: %A, object: %O, member: %m, operation: %o, value: %v&quot;</b>.</p></dd>
<dt><b class="variable">STOOOPTRACEDATAOPERATIONS</b></dt>
<dd><p>When tracing data output, by default, all read, write and unsetting
accesses are reported, but the user can set this variable to any
combination of the letters <b class="const">r</b>, <b class="const">w</b>, and <b class="const">u</b> for
more specific tracing (please refer to the <b class="cmd"><a href="../../../../index.html#key74">trace</a></b> Tcl manual page
for more information).</p></dd>
<dt><b class="variable">STOOOPTRACEALL</b></dt>
<dd><p>Setting this environment variable to either <b class="const">stdout</b>,
<b class="const">stderr</b> or a file name, enables both procedure and data
tracing.</p></dd>
</dl></dd>
<dt><a name="7"><b class="cmd">::stooop::printObjects</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stooop</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#c_">C++</a>, <a href="../../../../index.html#class">class</a>, <a href="../../../../index.html#object">object</a>, <a href="../../../../index.html#object_oriented">object oriented</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





287
288
289
290
291
292
293






294
295
296
297
298
299
300
301
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stooop</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key237">C++</a>, <a href="../../../../index.html#key240">class</a>, <a href="../../../../index.html#key243">object</a>, <a href="../../../../index.html#key236">object oriented</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/stooop/switched.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>switched - Simple Tcl Only Object Oriented Programming</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>switched - Simple Tcl Only Object Oriented Programming</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'switched.man' by tcllib/doctools with format 'html'
   -->
<!-- switched.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">switched(n) 2.2.1 tcllib &quot;Simple Tcl Only Object Oriented Programming&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>switched - switch/option management.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'switched.man' by tcllib/doctools with format 'html'
   -->
<! -- switched.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">switched(n) 2.2.1 tcllib &quot;Simple Tcl Only Object Oriented Programming&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>switched - switch/option management.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
listed in the <b class="method">options</b> procedure) but obviously does not check
the validity of the value passed to the <b class="method">set-<b class="option">option</b></b>
procedure, which should throw an error (for example by using the Tcl
error command) if the value is invalid.</p>
<p>The switched layer also keeps track of the options current
values, so that a <b class="method">set-<b class="option">option</b></b> procedure is called
only when the corresponding option value passed as parameter is
different from the current value (see <b class="variable">-option</b> data members
description).</p></dd>
<dt><b class="variable">-option</b></dt>
<dd><p>The <b class="variable">-option</b> data member is an options current value.
There is one for each option listed in the options procedure. It is a
read-only value which the switched layer checks against when an option
is changed.
It is rarely used at the layer derived from switched, except in the
few cases, such as in the following example:</p>
<pre class="doctools_example">
...







|

|
|







312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
listed in the <b class="method">options</b> procedure) but obviously does not check
the validity of the value passed to the <b class="method">set-<b class="option">option</b></b>
procedure, which should throw an error (for example by using the Tcl
error command) if the value is invalid.</p>
<p>The switched layer also keeps track of the options current
values, so that a <b class="method">set-<b class="option">option</b></b> procedure is called
only when the corresponding option value passed as parameter is
different from the current value (see  data members
description).</p></dd>
<dt></dt>
<dd><p>The  data member is an options current value.
There is one for each option listed in the options procedure. It is a
read-only value which the switched layer checks against when an option
is changed.
It is rarely used at the layer derived from switched, except in the
few cases, such as in the following example:</p>
<pre class="doctools_example">
...
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
    puts &quot;manufacturer: $switched::($this,-manufacturer)&quot;
    ...
}
</pre>
<p>In this case, the manufacturer's name is stored at the switched
layer level (this is why the set-manufacturer procedure has nothing to
do) and later retrieved in the printData procedure.</p></dd>
<dt><b class="variable">complete</b></dt>
<dd><p>The <b class="variable">complete</b> data member (not to be confused with the
<b class="method">complete</b> procedure) is a boolean.
Its initial value is <b class="const">false</b> and it is set to <b class="const">true</b> at
the very end of the switched <b class="method">complete</b> procedure.
It becomes useful when some options should be set at construction time
only and not dynamically, as the following example shows:</p>
<pre class="doctools_example">
proc car::set-width {this value} {
    if {$switched::($this,complete)} {







|
|
|







339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
    puts &quot;manufacturer: $switched::($this,-manufacturer)&quot;
    ...
}
</pre>
<p>In this case, the manufacturer's name is stored at the switched
layer level (this is why the set-manufacturer procedure has nothing to
do) and later retrieved in the printData procedure.</p></dd>
<dt></dt>
<dd><p>The  data member (not to be confused with
the <b class="method">complete</b> procedure) is a boolean.
Its initial value is <b class="const">false</b> and it is set to <b class="const">true</b> at
the very end of the switched <b class="method">complete</b> procedure.
It becomes useful when some options should be set at construction time
only and not dynamically, as the following example shows:</p>
<pre class="doctools_example">
proc car::set-width {this value} {
    if {$switched::($this,complete)} {
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stooop</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#c_">C++</a>, <a href="../../../../index.html#class">class</a>, <a href="../../../../index.html#object">object</a>, <a href="../../../../index.html#object_oriented">object oriented</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





364
365
366
367
368
369
370






371
372
373
374
375
376
377
378
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stooop</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key237">C++</a>, <a href="../../../../index.html#key240">class</a>, <a href="../../../../index.html#key243">object</a>, <a href="../../../../index.html#key236">object oriented</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/string/token.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>string::token - Text and string utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>string::token - Text and string utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'token.man' by tcllib/doctools with format 'html'
   -->
<!-- string::token.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">string::token(n) 1 tcllib &quot;Text and string utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>string::token - Regex based iterative lexing</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'token.man' by tcllib/doctools with format 'html'
   -->
<! -- string::token.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">string::token(n) 1 tcllib &quot;Text and string utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>string::token - Regex based iterative lexing</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#lexing">lexing</a>, <a href="../../../../index.html#regex">regex</a>, <a href="../../../../index.html#string">string</a>, <a href="../../../../index.html#tokenization">tokenization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





196
197
198
199
200
201
202






203
204
205
206
207
208
209
210
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key697">lexing</a>, <a href="../../../../index.html#key696">regex</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key695">tokenization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/string/token_shell.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>string::token::shell - Text and string utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>string::token::shell - Text and string utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'token_shell.man' by tcllib/doctools with format 'html'
   -->
<!-- string::token::shell.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">string::token::shell(n) 1.2 tcllib &quot;Text and string utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>string::token::shell - Parsing of shell command line</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'token_shell.man' by tcllib/doctools with format 'html'
   -->
<! -- string::token::shell.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">string::token::shell(n) 1.2 tcllib &quot;Text and string utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>string::token::shell - Parsing of shell command line</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bash">bash</a>, <a href="../../../../index.html#lexing">lexing</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#shell">shell</a>, <a href="../../../../index.html#string">string</a>, <a href="../../../../index.html#tokenization">tokenization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





220
221
222
223
224
225
226






227
228
229
230
231
232
233
234
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key743">bash</a>, <a href="../../../../index.html#key697">lexing</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key742">shell</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key695">tokenization</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/stringprep/stringprep.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>stringprep - Preparation of Internationalized Strings</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>stringprep - Preparation of Internationalized Strings</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'stringprep.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2009, Sergei Golovan &amp;lt;sgolovan@nes.ru&amp;gt;
   -->
<!-- stringprep.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">stringprep(n) 1.0.1 tcllib &quot;Preparation of Internationalized Strings&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>stringprep - Implementation of stringprep</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'stringprep.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2009, Sergei Golovan &lt;sgolovan@nes.ru&gt;
   -->
<! -- stringprep.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">stringprep(n) 1.0.1 tcllib &quot;Preparation of Internationalized Strings&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>stringprep - Implementation of stringprep</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="unicode.html">unicode(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#stringprep">stringprep</a>, <a href="../../../../index.html#unicode">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





216
217
218
219
220
221
222






223
224
225
226
227
228
229
230
231
232
233
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="unicode.html">unicode(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key646">stringprep</a>, <a href="../../../../index.html#key647">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/stringprep/stringprep_data.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>stringprep::data - Preparation of Internationalized Strings</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>stringprep::data - Preparation of Internationalized Strings</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'stringprep_data.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2009, Sergei Golovan &amp;lt;sgolovan@nes.ru&amp;gt;
   -->
<!-- stringprep::data.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">stringprep::data(n) 1.0.1 tcllib &quot;Preparation of Internationalized Strings&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>stringprep::data - stringprep data tables, generated, internal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'stringprep_data.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2009, Sergei Golovan &lt;sgolovan@nes.ru&gt;
   -->
<! -- stringprep::data.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">stringprep::data(n) 1.0.1 tcllib &quot;Preparation of Internationalized Strings&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>stringprep::data - stringprep data tables, generated, internal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#stringprep">stringprep</a>, <a href="../../../../index.html#unicode">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





140
141
142
143
144
145
146






147
148
149
150
151
152
153
154
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key646">stringprep</a>, <a href="../../../../index.html#key647">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2009, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/stringprep/unicode.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>unicode - Unicode normalization</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>unicode - Unicode normalization</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'unicode.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007, Sergei Golovan &amp;lt;sgolovan@nes.ru&amp;gt;
   -->
<!-- unicode.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">unicode(n) 1.0.0 tcllib &quot;Unicode normalization&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>unicode - Implementation of Unicode normalization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'unicode.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007, Sergei Golovan &lt;sgolovan@nes.ru&gt;
   -->
<! -- unicode.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">unicode(n) 1.0.0 tcllib &quot;Unicode normalization&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>unicode - Implementation of Unicode normalization</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="stringprep.html">stringprep(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#normalization">normalization</a>, <a href="../../../../index.html#unicode">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





191
192
193
194
195
196
197






198
199
200
201
202
203
204
205
206
207
208
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="stringprep.html">stringprep(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key112">normalization</a>, <a href="../../../../index.html#key647">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/stringprep/unicode_data.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>unicode::data - Preparation of Internationalized Strings</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>unicode::data - Preparation of Internationalized Strings</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'unicode_data.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007, Sergei Golovan &amp;lt;sgolovan@nes.ru&amp;gt;
   -->
<!-- unicode::data.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">unicode::data(n) 1.0.0 tcllib &quot;Preparation of Internationalized Strings&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>unicode::data - unicode data tables, generated, internal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'unicode_data.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007, Sergei Golovan &lt;sgolovan@nes.ru&gt;
   -->
<! -- unicode::data.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">unicode::data(n) 1.0.0 tcllib &quot;Preparation of Internationalized Strings&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>unicode::data - unicode data tables, generated, internal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#stringprep">stringprep</a>, <a href="../../../../index.html#unicode">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





140
141
142
143
144
145
146






147
148
149
150
151
152
153
154
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>stringprep</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key646">stringprep</a>, <a href="../../../../index.html#key647">unicode</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007, Sergei Golovan &lt;sgolovan@nes.ru&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/disjointset.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>struct::disjointset - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>struct::disjointset - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'disjointset.man' by tcllib/doctools with format 'html'
   -->
<!-- struct::disjointset.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::disjointset(n) 1.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::disjointset - Disjoint set data structure</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">struct::disjointset <span class="opt">?1.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::disjointset</b> <i class="arg">disjointsetName</i></a></li>
<li><a href="#2"><i class="arg">disjointsetName</i> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">disjointsetName</i> <b class="method">add-element</b> <i class="arg">item</i></a></li>
<li><a href="#4"><i class="arg">disjointsetName</i> <b class="method">add-partition</b> <i class="arg">elements</i></a></li>
<li><a href="#5"><i class="arg">disjointsetName</i> <b class="method">partitions</b></a></li>
<li><a href="#6"><i class="arg">disjointsetName</i> <b class="method">num-partitions</b></a></li>
<li><a href="#7"><i class="arg">disjointsetName</i> <b class="method">equal</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#8"><i class="arg">disjointsetName</i> <b class="method">merge</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#9"><i class="arg">disjointsetName</i> <b class="method">find</b> <i class="arg">e</i></a></li>
<li><a href="#10"><i class="arg">disjointsetName</i> <b class="method">exemplars</b></a></li>
<li><a href="#11"><i class="arg">disjointsetName</i> <b class="method">find-exemplar</b> <i class="arg">e</i></a></li>
<li><a href="#12"><i class="arg">disjointsetName</i> <b class="method">destroy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides <i class="term">disjoint sets</i>. An alternative name for
this kind of structure is <i class="term">merge-find</i>.</p>
<p>Normally when dealing with sets and their elements the question is &quot;Is
this element E contained in this set S?&quot;, with both E and S known.</p>
<p>Here the question is &quot;Which of several sets contains the element
E?&quot;. I.e. while the element is known, the set is not, and we wish to
find it quickly. It is not quite the inverse of the original question,
but close.
Another operation which is often wanted is that of quickly merging two
sets into one, with the result still fast for finding elements. Hence
the alternative term <i class="term">merge-find</i> for this.</p>
<p>Why now is this named a <i class="term">disjoint-set</i> ?
Because another way of describing the whole situation is that we have</p>
<ul class="doctools_itemized">
<li><p>a finite <i class="term"><a href="../../../../index.html#set">set</a></i> S, containing</p></li>
<li><p>a number of <i class="term">elements</i> E, split into</p></li>
<li><p>a set of <i class="term">partitions</i> P. The latter term
       applies, because the intersection of each pair P, P' of
       partitions is empty, with the union of all partitions
       covering the whole set.</p></li>
<li><p>An alternative name for the <i class="term">partitions</i> would be
       <i class="term">equvalence classes</i>, and all elements in the same







|

|



|
|
|
|
|
|


|

















|
|




|
|
|
|
|
|
|
<
<
<


















|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'disjointset.man' by tcllib/doctools with format 'html'
   -->
<! -- struct::disjointset.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::disjointset(n) 1.0 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::disjointset - Disjoint set data structure</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::disjointset <span class="opt">?1.0?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::disjointset</b> <i class="arg">disjointsetName</i></a></li>
<li><a href="#2"><i class="arg">disjointsetName</i> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">disjointsetName</i> <b class="method">add-partition</b> <i class="arg">elements</i></a></li>
<li><a href="#4"><i class="arg">disjointsetName</i> <b class="method">partitions</b></a></li>
<li><a href="#5"><i class="arg">disjointsetName</i> <b class="method">num-partitions</b></a></li>
<li><a href="#6"><i class="arg">disjointsetName</i> <b class="method">equal</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#7"><i class="arg">disjointsetName</i> <b class="method">merge</b> <i class="arg">a</i> <i class="arg">b</i></a></li>
<li><a href="#8"><i class="arg">disjointsetName</i> <b class="method">find</b> <i class="arg">e</i></a></li>
<li><a href="#9"><i class="arg">disjointsetName</i> <b class="method">destroy</b></a></li>



</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides <i class="term">disjoint sets</i>. An alternative name for
this kind of structure is <i class="term">merge-find</i>.</p>
<p>Normally when dealing with sets and their elements the question is &quot;Is
this element E contained in this set S?&quot;, with both E and S known.</p>
<p>Here the question is &quot;Which of several sets contains the element
E?&quot;. I.e. while the element is known, the set is not, and we wish to
find it quickly. It is not quite the inverse of the original question,
but close.
Another operation which is often wanted is that of quickly merging two
sets into one, with the result still fast for finding elements. Hence
the alternative term <i class="term">merge-find</i> for this.</p>
<p>Why now is this named a <i class="term">disjoint-set</i> ?
Because another way of describing the whole situation is that we have</p>
<ul class="doctools_itemized">
<li><p>a finite <i class="term"><a href="../../../../index.html#key301">set</a></i> S, containing</p></li>
<li><p>a number of <i class="term">elements</i> E, split into</p></li>
<li><p>a set of <i class="term">partitions</i> P. The latter term
       applies, because the intersection of each pair P, P' of
       partitions is empty, with the union of all partitions
       covering the whole set.</p></li>
<li><p>An alternative name for the <i class="term">partitions</i> would be
       <i class="term">equvalence classes</i>, and all elements in the same
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">disjointsetName</i> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The <b class="cmd">option</b> and the <i class="arg">arg</i>s determine the exact behavior of
the command. The following commands are possible for disjointset
objects:</p></dd>
</dl></dd>
<dt><a name="3"><i class="arg">disjointsetName</i> <b class="method">add-element</b> <i class="arg">item</i></a></dt>
<dd><p>Creates a new partition in the specified disjoint set, and fills it
with the single item <i class="arg">item</i>.  The command maintains
the integrity of the disjoint set, i.e. it verifies that none of the
<i class="arg">elements</i> are already part of the disjoint set and throws an
error otherwise.</p>
<p>The result of this method is the empty string.</p>
<p>This method runs in constant time.</p></dd>
<dt><a name="4"><i class="arg">disjointsetName</i> <b class="method">add-partition</b> <i class="arg">elements</i></a></dt>
<dd><p>Creates a new partition in specified disjoint set, and fills it with
the values found in the set of <i class="arg">elements</i>. The command maintains
the integrity of the disjoint set, i.e. it verifies that none of the
<i class="arg">elements</i> are already part of the disjoint set and throws an
error otherwise.</p>
<p>The result of the command is the empty string.</p>
<p>This method runs in time proportional to the size of <i class="arg">elements</i>].</p></dd>
<dt><a name="5"><i class="arg">disjointsetName</i> <b class="method">partitions</b></a></dt>
<dd><p>Returns the set of partitions the named disjoint set currently
consists of. The form of the result is a list of lists; the inner
lists contain the elements of the partitions.</p>
<p>This method runs in time O(N*alpha(N)),
where N is the number of elements in the disjoint set and alpha
is the inverse Ackermann function.</p></dd>
<dt><a name="6"><i class="arg">disjointsetName</i> <b class="method">num-partitions</b></a></dt>
<dd><p>Returns the number of partitions the named disjoint set currently
consists of.</p>
<p>This method runs in constant time.</p></dd>
<dt><a name="7"><i class="arg">disjointsetName</i> <b class="method">equal</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Determines if the two elements <i class="arg">a</i> and <i class="arg">b</i> of the disjoint set
belong to the same partition. The result of the method is a boolean
value, <b class="const">True</b> if the two elements are contained in the same
partition, and <b class="const">False</b> otherwise.</p>
<p>An error will be thrown if either <i class="arg">a</i> or <i class="arg">b</i> are not elements
of the disjoint set.</p>
<p>This method runs in amortized time O(alpha(N)), where N is the number of
elements in the larger partition and alpha is the inverse Ackermann function.</p></dd>
<dt><a name="8"><i class="arg">disjointsetName</i> <b class="method">merge</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Determines the partitions the elements <i class="arg">a</i> and <i class="arg">b</i> are
contained in and merges them into a single partition.  If the two
elements were already contained in the same partition nothing will
change.</p>
<p>The result of the method is the empty string.</p>
<p>This method runs in amortized time O(alpha(N)), where N is the number of
items in the larger of the partitions being merged. The worst case time
is O(N).</p></dd>
<dt><a name="9"><i class="arg">disjointsetName</i> <b class="method">find</b> <i class="arg">e</i></a></dt>
<dd><p>Returns a list of the members of the partition of the disjoint set
which contains the element
<i class="arg">e</i>.</p>
<p>This method runs in O(N*alpha(N)) time, where N is the total number of
items in the disjoint set and alpha is the inverse Ackermann function,
See <b class="method">find-exemplar</b> for a faster method, if all that is needed
is a unique identifier for the partition, rather than an enumeration
of all its elements.</p></dd>
<dt><a name="10"><i class="arg">disjointsetName</i> <b class="method">exemplars</b></a></dt>
<dd><p>Returns a list containing an exemplar of each partition in the disjoint
set. The exemplar is a member of the partition, chosen arbitrarily.</p>
<p>This method runs in O(N*alpha(N)) time, where N is the total number of items
in the disjoint set and alpha is the inverse Ackermann function.</p></dd>
<dt><a name="11"><i class="arg">disjointsetName</i> <b class="method">find-exemplar</b> <i class="arg">e</i></a></dt>
<dd><p>Returns the exemplar of the partition of the disjoint set containing
the element <i class="arg">e</i>.  Throws an error if <i class="arg">e</i> is not found in the
disjoint set.  The exemplar is an arbitrarily chosen member of the partition.
The only operation that will change the exemplar of any partition is
<b class="method">merge</b>.</p>
<p>This method runs in O(alpha(N)) time, where N is the number of items in
the partition containing E, and alpha is the inverse Ackermann function.</p></dd>
<dt><a name="12"><i class="arg">disjointsetName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the disjoint set object and all associated memory.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: disjointset</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#disjoint_set">disjoint set</a>, <a href="../../../../index.html#equivalence_class">equivalence class</a>, <a href="../../../../index.html#find">find</a>, <a href="../../../../index.html#merge_find">merge find</a>, <a href="../../../../index.html#partition">partition</a>, <a href="../../../../index.html#partitioned_set">partitioned set</a>, <a href="../../../../index.html#union">union</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div></body></html>







|
<
<
<
<
<
<
<
<





|
<
|

|
<
<
<
<
|

|
<
|





|
<
<
|




|
<
<
<
|
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|










<
<
<
<
<
<


|





194
195
196
197
198
199
200
201








202
203
204
205
206
207

208
209
210




211
212
213

214
215
216
217
218
219
220


221
222
223
224
225
226



227

228
229


















230
231
232
233
234
235
236
237
238
239
240






241
242
243
244
245
246
247
248
general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><i class="arg">disjointsetName</i> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p>The <b class="cmd">option</b> and the <i class="arg">arg</i>s determine the exact behavior of
the command. The following commands are possible for disjointset
objects:</p></dd>
</dl></dd>
<dt><a name="3"><i class="arg">disjointsetName</i> <b class="method">add-partition</b> <i class="arg">elements</i></a></dt>








<dd><p>Creates a new partition in specified disjoint set, and fills it with
the values found in the set of <i class="arg">elements</i>. The command maintains
the integrity of the disjoint set, i.e. it verifies that none of the
<i class="arg">elements</i> are already part of the disjoint set and throws an
error otherwise.</p>
<p>The result of the command is the empty string.</p></dd>

<dt><a name="4"><i class="arg">disjointsetName</i> <b class="method">partitions</b></a></dt>
<dd><p>Returns the set of partitions the named disjoint set currently
consists of.</p></dd>




<dt><a name="5"><i class="arg">disjointsetName</i> <b class="method">num-partitions</b></a></dt>
<dd><p>Returns the number of partitions the named disjoint set currently
consists of.</p></dd>

<dt><a name="6"><i class="arg">disjointsetName</i> <b class="method">equal</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Determines if the two elements <i class="arg">a</i> and <i class="arg">b</i> of the disjoint set
belong to the same partition. The result of the method is a boolean
value, <b class="const">True</b> if the two elements are contained in the same
partition, and <b class="const">False</b> otherwise.</p>
<p>An error will be thrown if either <i class="arg">a</i> or <i class="arg">b</i> are not elements
of the disjoint set.</p></dd>


<dt><a name="7"><i class="arg">disjointsetName</i> <b class="method">merge</b> <i class="arg">a</i> <i class="arg">b</i></a></dt>
<dd><p>Determines the partitions the elements <i class="arg">a</i> and <i class="arg">b</i> are
contained in and merges them into a single partition.  If the two
elements were already contained in the same partition nothing will
change.</p>
<p>The result of the method is the empty string.</p></dd>



<dt><a name="8"><i class="arg">disjointsetName</i> <b class="method">find</b> <i class="arg">e</i></a></dt>

<dd><p>Returns the partition of the disjoint set which contains the element
<i class="arg">e</i>.</p></dd>


















<dt><a name="9"><i class="arg">disjointsetName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the disjoint set object and all associated memory.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: disjointset</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key623">disjoint set</a>, <a href="../../../../index.html#key622">equivalence class</a>, <a href="../../../../index.html#key626">find</a>, <a href="../../../../index.html#key625">merge find</a>, <a href="../../../../index.html#key627">partition</a>, <a href="../../../../index.html#key628">partitioned set</a>, <a href="../../../../index.html#key624">union</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/graph.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::graph - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::graph - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'graph.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002-2009,2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- struct::graph.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::graph(n) 2.4.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::graph - Create and manipulate directed graph objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Changes for 2.0</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::graph <span class="opt">?2.4.3?</span></b></li>
<li>package require <b class="pkgname">struct::list <span class="opt">?1.5?</span></b></li>
<li>package require <b class="pkgname">struct::set <span class="opt">?2.2.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::graph</b> <span class="opt">?<i class="arg">graphName</i>?</span> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">source</i>?</span></a></li>
<li><a href="#2"><b class="cmd">graphName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">graphName</i> <b class="method">=</b> <i class="arg">sourcegraph</i></a></li>







|

|

|



|
|
|
|
|
|


|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'graph.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- struct::graph.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::graph(n) 2.4 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::graph - Create and manipulate directed graph objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Changes for 2.0</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::graph <span class="opt">?2.4?</span></b></li>
<li>package require <b class="pkgname">struct::list <span class="opt">?1.5?</span></b></li>
<li>package require <b class="pkgname">struct::set <span class="opt">?2.2.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::graph</b> <span class="opt">?<i class="arg">graphName</i>?</span> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">source</i>?</span></a></li>
<li><a href="#2"><b class="cmd">graphName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">graphName</i> <b class="method">=</b> <i class="arg">sourcegraph</i></a></li>
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>A directed graph is a structure containing two collections of
elements, called <i class="term">nodes</i> and <i class="term">arcs</i> respectively, together
with a relation (&quot;connectivity&quot;) that places a general structure upon
the nodes and arcs.</p>
<p>Each arc is connected to two nodes, one of which is called the
<i class="term"><a href="../../../../index.html#source">source</a></i> and the other the <i class="term">target</i>. This imposes a
direction upon the arc, which is said to go from the source to the
target. It is allowed that source and target of an arc are the same
node. Such an arc is called a <i class="term"><a href="../../../../index.html#loop">loop</a></i>.
Whenever a node is either the source or target of an arc both are said
to be <i class="term"><a href="../../../../index.html#adjacent">adjacent</a></i>. This extends into a relation between nodes,
i.e. if two nodes are connected through at least one arc they are said
to be <i class="term"><a href="../../../../index.html#adjacent">adjacent</a></i> too.</p>
<p>Each node can be the source and target for any number of arcs. The
former are called the <i class="term">outgoing arcs</i> of the node, the latter
the <i class="term">incoming arcs</i> of the node. The number of arcs in either
set is called the <i class="term">in-degree</i> resp. the <i class="term">out-degree</i> of the
node.</p>
<p>In addition to maintaining the node and arc relationships, this graph
implementation allows any number of named <i class="term">attributes</i> to be
associated with the graph itself, and each node or arc.</p>
<p><em>Note:</em> The major version of the package <b class="package"><a href="../../../../index.html#struct">struct</a></b> has
been changed to version 2.0, due to backward incompatible changes in
the API of this module. Please read the section
<span class="sectref"><a href="#section2">Changes for 2.0</a></span> for a full list of all changes,
incompatible and otherwise.</p>
<p><em>Note:</em> A C-implementation of the command can be had from the
location <a href="http://www.purl.org/NET/schlenker/tcl/cgraph">http://www.purl.org/NET/schlenker/tcl/cgraph</a>. See also
<a href="http://wiki.tcl.tk/cgraph">http://wiki.tcl.tk/cgraph</a>.  This implementation uses a bit less







|


|

|

|








|







205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>A directed graph is a structure containing two collections of
elements, called <i class="term">nodes</i> and <i class="term">arcs</i> respectively, together
with a relation (&quot;connectivity&quot;) that places a general structure upon
the nodes and arcs.</p>
<p>Each arc is connected to two nodes, one of which is called the
<i class="term"><a href="../../../../index.html#key436">source</a></i> and the other the <i class="term">target</i>. This imposes a
direction upon the arc, which is said to go from the source to the
target. It is allowed that source and target of an arc are the same
node. Such an arc is called a <i class="term"><a href="../../../../index.html#key457">loop</a></i>.
Whenever a node is either the source or target of an arc both are said
to be <i class="term"><a href="../../../../index.html#key485">adjacent</a></i>. This extends into a relation between nodes,
i.e. if two nodes are connected through at least one arc they are said
to be <i class="term"><a href="../../../../index.html#key485">adjacent</a></i> too.</p>
<p>Each node can be the source and target for any number of arcs. The
former are called the <i class="term">outgoing arcs</i> of the node, the latter
the <i class="term">incoming arcs</i> of the node. The number of arcs in either
set is called the <i class="term">in-degree</i> resp. the <i class="term">out-degree</i> of the
node.</p>
<p>In addition to maintaining the node and arc relationships, this graph
implementation allows any number of named <i class="term">attributes</i> to be
associated with the graph itself, and each node or arc.</p>
<p><em>Note:</em> The major version of the package <b class="package"><a href="../../../../index.html#key327">struct</a></b> has
been changed to version 2.0, due to backward incompatible changes in
the API of this module. Please read the section
<span class="sectref"><a href="#section2">Changes for 2.0</a></span> for a full list of all changes,
incompatible and otherwise.</p>
<p><em>Note:</em> A C-implementation of the command can be had from the
location <a href="http://www.purl.org/NET/schlenker/tcl/cgraph">http://www.purl.org/NET/schlenker/tcl/cgraph</a>. See also
<a href="http://wiki.tcl.tk/cgraph">http://wiki.tcl.tk/cgraph</a>.  This implementation uses a bit less
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
list containing all arcs is returned. Restrictions can limit the list
of returned arcs based on the nodes that are connected by the arc, on
the keyed values associated with the arc, or both. A general filter
command can be used as well. The restrictions that involve connected
nodes take a variable number of nodes as argument, specified after the
name of the restriction itself.</p>
<p>The restrictions imposed by either <b class="option">-in</b>, <b class="option">-out</b>,
<b class="option">-adj</b>, <b class="option">-inner</b>, or <b class="option">-embedding</b> are applied
first. Specifying more than one of them is illegal.</p>
<p>After that the restrictions set via <b class="option">-key</b> (and
<b class="option">-value</b>) are applied. Specifying more than one <b class="option">-key</b>
(and <b class="option">-value</b>) is illegal. Specifying <b class="option">-value</b> alone,
without <b class="option">-key</b> is illegal as well.</p>
<p>Any restriction set through <b class="option">-filter</b> is applied
last. Specifying more than one <b class="option">-filter</b> is illegal.</p>







|







428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
list containing all arcs is returned. Restrictions can limit the list
of returned arcs based on the nodes that are connected by the arc, on
the keyed values associated with the arc, or both. A general filter
command can be used as well. The restrictions that involve connected
nodes take a variable number of nodes as argument, specified after the
name of the restriction itself.</p>
<p>The restrictions imposed by either <b class="option">-in</b>, <b class="option">-out</b>,
<b class="option">-adj</b>, <b class="option">-inner</b>, or <b class="option">-embedded</b> are applied
first. Specifying more than one of them is illegal.</p>
<p>After that the restrictions set via <b class="option">-key</b> (and
<b class="option">-value</b>) are applied. Specifying more than one <b class="option">-key</b>
(and <b class="option">-value</b>) is illegal. Specifying <b class="option">-value</b> alone,
without <b class="option">-key</b> is illegal as well.</p>
<p>Any restriction set through <b class="option">-filter</b> is applied
last. Specifying more than one <b class="option">-filter</b> is illegal.</p>
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
<dd><p>Return a list of all arcs which are adjacent to two of the nodes in
the set. This is the set of arcs in the subgraph spawned by the
specified nodes.</p></dd>
<dt><b class="option">-embedding</b></dt>
<dd><p>Return a list of all arcs adjacent to exactly one of the nodes in the
set. This is the set of arcs connecting the subgraph spawned by the
specified nodes to the rest of the graph.</p></dd>
</dl>
<p><em>Attention</em>: After the above options any word with a leading dash
which is not a valid option is treated as a node name instead of an
invalid option to error out on. This condition holds until either a
valid option terminates the list of nodes, or the end of the command
is reached, whichever comes first.</p>
<p>The remaining filter options are:</p>
<dl class="doctools_definitions">
<dt><b class="option">-key</b> <i class="arg">key</i></dt>
<dd><p>Limit the list of arcs that are returned to those arcs that have an
associated key <i class="arg">key</i>.</p></dd>
<dt><b class="option">-value</b> <i class="arg">value</i></dt>
<dd><p>This restriction can only be used in combination with
<b class="option">-key</b>. It limits the list of arcs that are returned to those
arcs whose associated key <i class="arg">key</i> has the value <i class="arg">value</i>.</p></dd>







<
<
<
<
<
<
<
<







459
460
461
462
463
464
465








466
467
468
469
470
471
472
<dd><p>Return a list of all arcs which are adjacent to two of the nodes in
the set. This is the set of arcs in the subgraph spawned by the
specified nodes.</p></dd>
<dt><b class="option">-embedding</b></dt>
<dd><p>Return a list of all arcs adjacent to exactly one of the nodes in the
set. This is the set of arcs connecting the subgraph spawned by the
specified nodes to the rest of the graph.</p></dd>








<dt><b class="option">-key</b> <i class="arg">key</i></dt>
<dd><p>Limit the list of arcs that are returned to those arcs that have an
associated key <i class="arg">key</i>.</p></dd>
<dt><b class="option">-value</b> <i class="arg">value</i></dt>
<dd><p>This restriction can only be used in combination with
<b class="option">-key</b>. It limits the list of arcs that are returned to those
arcs whose associated key <i class="arg">key</i> has the value <i class="arg">value</i>.</p></dd>
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
nothing if the <i class="arg">key</i> does not exist.</p></dd>
<dt><a name="58"><i class="arg">graphName</i> <b class="method">nodes</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?-value <i class="arg">value</i>?</span> <span class="opt">?-filter <i class="arg">cmdprefix</i>?</span> <span class="opt">?-in|-out|-adj|-inner|-embedding <i class="arg">node</i> <i class="arg">node</i>...?</span></a></dt>
<dd><p>Return a list of nodes in the graph. Restrictions can limit the list
of returned nodes based on neighboring nodes, or based on the keyed
values associated with the node. The restrictions that involve
neighboring nodes have a list of nodes as argument, specified after
the name of the restriction itself.</p>
<p>The possible restrictions are the same as for method <b class="method">arcs</b>.
Note that while the exact meanings change slightly, as they operate on
nodes instead of arcs, the general behaviour is the same, especially
when it comes to the handling of words with a leading dash in node
lists.</p>
<p>The command recognizes:</p>
<dl class="doctools_definitions">
<dt><b class="option">-in</b></dt>
<dd><p>Return a list of all nodes with at least one outgoing arc ending in a
node found in the specified set of nodes. Alternatively specified as
the set of source nodes for the <b class="option">-in</b> arcs of the node set. The
<i class="term">incoming neighbours</i>.</p></dd>
<dt><b class="option">-out</b></dt>







|
|
<
<
<
|







562
563
564
565
566
567
568
569
570



571
572
573
574
575
576
577
578
nothing if the <i class="arg">key</i> does not exist.</p></dd>
<dt><a name="58"><i class="arg">graphName</i> <b class="method">nodes</b> <span class="opt">?-key <i class="arg">key</i>?</span> <span class="opt">?-value <i class="arg">value</i>?</span> <span class="opt">?-filter <i class="arg">cmdprefix</i>?</span> <span class="opt">?-in|-out|-adj|-inner|-embedding <i class="arg">node</i> <i class="arg">node</i>...?</span></a></dt>
<dd><p>Return a list of nodes in the graph. Restrictions can limit the list
of returned nodes based on neighboring nodes, or based on the keyed
values associated with the node. The restrictions that involve
neighboring nodes have a list of nodes as argument, specified after
the name of the restriction itself.</p>
<p>The possible restrictions are the same as for method
<b class="method">arcs</b>. The exact meanings change slightly, as they operate on



nodes instead of arcs. The command recognizes:</p>
<dl class="doctools_definitions">
<dt><b class="option">-in</b></dt>
<dd><p>Return a list of all nodes with at least one outgoing arc ending in a
node found in the specified set of nodes. Alternatively specified as
the set of source nodes for the <b class="option">-in</b> arcs of the node set. The
<i class="term">incoming neighbours</i>.</p></dd>
<dt><b class="option">-out</b></dt>
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
whether in the same node, or at some other node. This is a global
consistency requirement for the serialization.</p></li>
<li><p>And a dictionary containing the attributes associated with the arc.</p></li>
<li><p>The weight associated with the arc. This value is optional. Its
non-presence means that the arc in question has no weight associated
with it.</p>
<p><em>Note:</em> This information is new, compared to the
serialization of <b class="package"><a href="../../../../index.html#graph">graph</a></b> 2.3 and earlier. By making it an
optional element the new format is maximally compatible with the
old. This means that any graph not using weights will generate a
serialization which is still understood by the older graph package. A
serialization will not be understood any longer by the older packages
if, and only if the graph it was generated from actually has arcs with
weights.</p></li>
</ol>
<p>For all attribute dictionaries they keys are the names of the
attributes, and the values are the values for each name.</p>
<p><em>Note:</em> The order of the nodes in the serialization has no
relevance, nor has the order of the arcs per node.</p>
<pre class="doctools_example">
    # A possible serialization for the graph structure
    #
    #        d -----&gt; %2
    #       /         ^ \
    #      /         /   \
    #     /         b     \
    #    /         /       \
    #  %1 &lt;- a - %0         e
    #    ^         \\      /
    #     \\        c     /
    #      \\        \\  /
    #       \\        v v
    #        f ------ %3
    # is







|















|
|
|
|







656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
whether in the same node, or at some other node. This is a global
consistency requirement for the serialization.</p></li>
<li><p>And a dictionary containing the attributes associated with the arc.</p></li>
<li><p>The weight associated with the arc. This value is optional. Its
non-presence means that the arc in question has no weight associated
with it.</p>
<p><em>Note:</em> This information is new, compared to the
serialization of <b class="package"><a href="../../../../index.html#key305">graph</a></b> 2.3 and earlier. By making it an
optional element the new format is maximally compatible with the
old. This means that any graph not using weights will generate a
serialization which is still understood by the older graph package. A
serialization will not be understood any longer by the older packages
if, and only if the graph it was generated from actually has arcs with
weights.</p></li>
</ol>
<p>For all attribute dictionaries they keys are the names of the
attributes, and the values are the values for each name.</p>
<p><em>Note:</em> The order of the nodes in the serialization has no
relevance, nor has the order of the arcs per node.</p>
<pre class="doctools_example">
    # A possible serialization for the graph structure
    #
    #        d -----&gt; %2
    #       /         ^ \\
    #      /         /   \\
    #     /         b     \\
    #    /         /       \\
    #  %1 &lt;- a - %0         e
    #    ^         \\      /
    #     \\        c     /
    #      \\        \\  /
    #       \\        v v
    #        f ------ %3
    # is
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: graph</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#adjacent">adjacent</a>, <a href="../../../../index.html#arc">arc</a>, <a href="../../../../index.html#cgraph">cgraph</a>, <a href="../../../../index.html#degree">degree</a>, <a href="../../../../index.html#edge">edge</a>, <a href="../../../../index.html#graph">graph</a>, <a href="../../../../index.html#loop">loop</a>, <a href="../../../../index.html#neighbour">neighbour</a>, <a href="../../../../index.html#node">node</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#subgraph">subgraph</a>, <a href="../../../../index.html#vertex">vertex</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2009,2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


771
772
773
774
775
776
777






778
779
780
781
782
783
784
785
786
787
788
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: graph</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key485">adjacent</a>, <a href="../../../../index.html#key473">arc</a>, <a href="../../../../index.html#key615">cgraph</a>, <a href="../../../../index.html#key475">degree</a>, <a href="../../../../index.html#key460">edge</a>, <a href="../../../../index.html#key305">graph</a>, <a href="../../../../index.html#key457">loop</a>, <a href="../../../../index.html#key489">neighbour</a>, <a href="../../../../index.html#key463">node</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key480">subgraph</a>, <a href="../../../../index.html#key464">vertex</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/graph1.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::graph_v1 - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::graph_v1 - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'graph1.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- struct::graph_v1.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::graph_v1(n) 1.2.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::graph_v1 - Create and manipulate directed graph objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'graph1.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- struct::graph_v1.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::graph_v1(n) 1.2.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::graph_v1 - Create and manipulate directed graph objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: graph</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cgraph">cgraph</a>, <a href="../../../../index.html#graph">graph</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








398
399
400
401
402
403
404






405
406
407
408
409
410
411
412
413
414
415
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: graph</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key615">cgraph</a>, <a href="../../../../index.html#key305">graph</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/graphops.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::graph::op - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::graph::op - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'graphops.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008 Alejandro Paz &amp;lt;vidriloco@gmail.com&amp;gt;   -- Copyright &amp;copy; 2008 (docs) Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2009 Michal Antoniewski &amp;lt;antoniewski.m@gmail.com&amp;gt;
   -->
<!-- struct::graph::op.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::graph::op(n) 0.11.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::graph::op - Operation for (un)directed graph objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'graphops.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008 Alejandro Paz &lt;vidriloco@gmail.com&gt;   -- Copyright &copy; 2008 (docs) Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;   -- Copyright &copy; 2009 Michal Antoniewski &lt;antoniewski.m@gmail.com&gt;
   -->
<! -- struct::graph::op.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::graph::op(n) 0.11.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::graph::op - Operation for (un)directed graph objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">struct::graph::op <span class="opt">?0.11.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">struct::graph::op::toAdjacencyMatrix</b> <i class="arg">g</i></a></li>
<li><a href="#2"><b class="cmd">struct::graph::op::toAdjacencyList</b> <i class="arg">G</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">struct::graph::op::kruskal</b> <i class="arg">g</i></a></li>
<li><a href="#4"><b class="cmd">struct::graph::op::prim</b> <i class="arg">g</i></a></li>







|







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::graph::op <span class="opt">?0.11.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">struct::graph::op::toAdjacencyMatrix</b> <i class="arg">g</i></a></li>
<li><a href="#2"><b class="cmd">struct::graph::op::toAdjacencyList</b> <i class="arg">G</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#3"><b class="cmd">struct::graph::op::kruskal</b> <i class="arg">g</i></a></li>
<li><a href="#4"><b class="cmd">struct::graph::op::prim</b> <i class="arg">g</i></a></li>
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
the name of the node the row/column is for. All other elements are
boolean values, <b class="const">True</b> if there is an arc between the 2 nodes
of the respective row and column, and <b class="const">False</b> otherwise.</p>
<p>Note that the matrix is symmetric. It does not represent the
directionality of arcs, only their presence between nodes. It is also
unable to represent parallel arcs in <i class="arg">g</i>.</p></dd>
<dt><a name="2"><b class="cmd">struct::graph::op::toAdjacencyList</b> <i class="arg">G</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>Procedure creates for input graph <i class="arg">G</i>, it's representation as <i class="term"><a href="../../../../index.html#adjacency_list">Adjacency List</a></i>.
It handles both directed and undirected graphs (default is undirected).
It returns dictionary that for each node (key) returns list of nodes adjacent
to it. When considering weighted version, for each adjacent node there is also
weight of the edge included.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph object <i class="arg">G</i> (input)</dt>
<dd><p>A graph to convert into an <i class="term"><a href="../../../../index.html#adjacency_list">Adjacency List</a></i>.</p></dd>
</dl></dd>
<dt>Options:</dt>
<dd><dl class="doctools_options">
<dt><b class="option">-directed</b></dt>
<dd><p>By default <i class="arg">G</i> is operated as if it were an <i class="term">Undirected graph</i>.
Using this option tells the command to handle <i class="arg">G</i> as the directed graph it is.</p></dd>
<dt><b class="option">-weights</b></dt>
<dd><p>By default any weight information the graph <i class="arg">G</i> may have is ignored.
Using this option tells the command to put weight information into the result.
In that case it is expected that all arcs have a proper weight, and an error
is thrown if that is not the case.</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">struct::graph::op::kruskal</b> <i class="arg">g</i></a></dt>
<dd><p>This command takes the graph <i class="arg">g</i> and returns a list containing the
names of the arcs in <i class="arg">g</i> which span up a minimum weight spanning tree
(MST), or, in the case of an un-connected graph, a minimum weight spanning
forest (except for the 1-vertex components). Kruskal's algorithm is used
to compute the tree or forest.
This algorithm has a time complexity of <i class="term">O(E*log E)</i> or <i class="term">O(E* log V)</i>,
where <i class="term">V</i> is the number of vertices and <i class="term"><a href="../../../../index.html#e">E</a></i> is the number of edges
in graph <i class="arg">g</i>.</p>
<p>The command will throw an error if one or more arcs in <i class="arg">g</i> have no
weight associated with them.</p>
<p>A note regarding the result, the command refrains from explicitly
listing the nodes of the MST as this information is implicitly
provided in the arcs already.</p></dd>
<dt><a name="4"><b class="cmd">struct::graph::op::prim</b> <i class="arg">g</i></a></dt>
<dd><p>This command takes the graph <i class="arg">g</i> and returns a list containing the
names of the arcs in <i class="arg">g</i> which span up a minimum weight spanning tree
(MST), or, in the case of an un-connected graph, a minimum weight spanning
forest (except for the 1-vertex components). Prim's algorithm is used to
compute the tree or forest.
This algorithm has a time complexity between <i class="term">O(E+V*log V)</i> and <i class="term">O(V*V)</i>,
depending on the implementation (Fibonacci heap + Adjacency list versus
Adjacency Matrix).  As usual <i class="term">V</i> is the number of vertices and
<i class="term"><a href="../../../../index.html#e">E</a></i> the number of edges in graph <i class="arg">g</i>.</p>
<p>The command will throw an error if one or more arcs in <i class="arg">g</i> have no
weight associated with them.</p>
<p>A note regarding the result, the command refrains from explicitly
listing the nodes of the MST as this information is implicitly
provided in the arcs already.</p></dd>
<dt><a name="5"><b class="cmd">struct::graph::op::isBipartite?</b> <i class="arg">g</i> <span class="opt">?<i class="arg">bipartvar</i>?</span></a></dt>
<dd><p>This command takes the graph <i class="arg">g</i> and returns a boolean value







|








|




















|















|







214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
the name of the node the row/column is for. All other elements are
boolean values, <b class="const">True</b> if there is an arc between the 2 nodes
of the respective row and column, and <b class="const">False</b> otherwise.</p>
<p>Note that the matrix is symmetric. It does not represent the
directionality of arcs, only their presence between nodes. It is also
unable to represent parallel arcs in <i class="arg">g</i>.</p></dd>
<dt><a name="2"><b class="cmd">struct::graph::op::toAdjacencyList</b> <i class="arg">G</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>Procedure creates for input graph <i class="arg">G</i>, it's representation as <i class="term"><a href="../../../../index.html#key468">Adjacency List</a></i>.
It handles both directed and undirected graphs (default is undirected).
It returns dictionary that for each node (key) returns list of nodes adjacent
to it. When considering weighted version, for each adjacent node there is also
weight of the edge included.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph object <i class="arg">G</i> (input)</dt>
<dd><p>A graph to convert into an <i class="term"><a href="../../../../index.html#key468">Adjacency List</a></i>.</p></dd>
</dl></dd>
<dt>Options:</dt>
<dd><dl class="doctools_options">
<dt><b class="option">-directed</b></dt>
<dd><p>By default <i class="arg">G</i> is operated as if it were an <i class="term">Undirected graph</i>.
Using this option tells the command to handle <i class="arg">G</i> as the directed graph it is.</p></dd>
<dt><b class="option">-weights</b></dt>
<dd><p>By default any weight information the graph <i class="arg">G</i> may have is ignored.
Using this option tells the command to put weight information into the result.
In that case it is expected that all arcs have a proper weight, and an error
is thrown if that is not the case.</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="3"><b class="cmd">struct::graph::op::kruskal</b> <i class="arg">g</i></a></dt>
<dd><p>This command takes the graph <i class="arg">g</i> and returns a list containing the
names of the arcs in <i class="arg">g</i> which span up a minimum weight spanning tree
(MST), or, in the case of an un-connected graph, a minimum weight spanning
forest (except for the 1-vertex components). Kruskal's algorithm is used
to compute the tree or forest.
This algorithm has a time complexity of <i class="term">O(E*log E)</i> or <i class="term">O(E* log V)</i>,
where <i class="term">V</i> is the number of vertices and <i class="term"><a href="../../../../index.html#key807">E</a></i> is the number of edges
in graph <i class="arg">g</i>.</p>
<p>The command will throw an error if one or more arcs in <i class="arg">g</i> have no
weight associated with them.</p>
<p>A note regarding the result, the command refrains from explicitly
listing the nodes of the MST as this information is implicitly
provided in the arcs already.</p></dd>
<dt><a name="4"><b class="cmd">struct::graph::op::prim</b> <i class="arg">g</i></a></dt>
<dd><p>This command takes the graph <i class="arg">g</i> and returns a list containing the
names of the arcs in <i class="arg">g</i> which span up a minimum weight spanning tree
(MST), or, in the case of an un-connected graph, a minimum weight spanning
forest (except for the 1-vertex components). Prim's algorithm is used to
compute the tree or forest.
This algorithm has a time complexity between <i class="term">O(E+V*log V)</i> and <i class="term">O(V*V)</i>,
depending on the implementation (Fibonacci heap + Adjacency list versus
Adjacency Matrix).  As usual <i class="term">V</i> is the number of vertices and
<i class="term"><a href="../../../../index.html#key807">E</a></i> the number of edges in graph <i class="arg">g</i>.</p>
<p>The command will throw an error if one or more arcs in <i class="arg">g</i> have no
weight associated with them.</p>
<p>A note regarding the result, the command refrains from explicitly
listing the nodes of the MST as this information is implicitly
provided in the arcs already.</p></dd>
<dt><a name="5"><b class="cmd">struct::graph::op::isBipartite?</b> <i class="arg">g</i> <span class="opt">?<i class="arg">bipartvar</i>?</span></a></dt>
<dd><p>This command takes the graph <i class="arg">g</i> and returns a boolean value
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<i class="arg">g</i>.</p></dd>
<dt><a name="9"><b class="cmd">struct::graph::op::isConnected?</b> <i class="arg">g</i></a></dt>
<dd><p>This is a convenience command determining whether the graph <i class="arg">g</i> is
<i class="term">connected</i> or not.  The result is a boolean value, <b class="const">true</b>
if the graph is connected, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="10"><b class="cmd">struct::graph::op::isCutVertex?</b> <i class="arg">g</i> <i class="arg">n</i></a></dt>
<dd><p>This command determines whether the node <i class="arg">n</i> in the graph <i class="arg">g</i>
is a <i class="term"><a href="../../../../index.html#cut_vertex">cut vertex</a></i> (aka <i class="term"><a href="../../../../index.html#articulation_point">articulation point</a></i>). The result
is a boolean value, <b class="const">true</b> if the node is a cut vertex, and
<b class="const">false</b> otherwise.</p>
<p>The command will throw an error if <i class="arg">n</i> is not a node of the graph
<i class="arg">g</i>.</p></dd>
<dt><a name="11"><b class="cmd">struct::graph::op::isBridge?</b> <i class="arg">g</i> <i class="arg">a</i></a></dt>
<dd><p>This command determines whether the arc <i class="arg">a</i> in the graph <i class="arg">g</i>
is a <i class="term"><a href="../../../../index.html#bridge">bridge</a></i> (aka <i class="term"><a href="../../../../index.html#cut_edge">cut edge</a></i>, or <i class="term"><a href="../../../../index.html#isthmus">isthmus</a></i>). The
result is a boolean value, <b class="const">true</b> if the arc is a bridge, and
<b class="const">false</b> otherwise.</p>
<p>The command will throw an error if <i class="arg">a</i> is not an arc of the graph
<i class="arg">g</i>.</p></dd>
<dt><a name="12"><b class="cmd">struct::graph::op::isEulerian?</b> <i class="arg">g</i> <span class="opt">?<i class="arg">tourvar</i>?</span></a></dt>
<dd><p>This command determines whether the graph <i class="arg">g</i> is <i class="term">eulerian</i>
or not.  The result is a boolean value, <b class="const">true</b> if the graph is







|






|







302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<i class="arg">g</i>.</p></dd>
<dt><a name="9"><b class="cmd">struct::graph::op::isConnected?</b> <i class="arg">g</i></a></dt>
<dd><p>This is a convenience command determining whether the graph <i class="arg">g</i> is
<i class="term">connected</i> or not.  The result is a boolean value, <b class="const">true</b>
if the graph is connected, and <b class="const">false</b> otherwise.</p></dd>
<dt><a name="10"><b class="cmd">struct::graph::op::isCutVertex?</b> <i class="arg">g</i> <i class="arg">n</i></a></dt>
<dd><p>This command determines whether the node <i class="arg">n</i> in the graph <i class="arg">g</i>
is a <i class="term"><a href="../../../../index.html#key486">cut vertex</a></i> (aka <i class="term"><a href="../../../../index.html#key483">articulation point</a></i>). The result
is a boolean value, <b class="const">true</b> if the node is a cut vertex, and
<b class="const">false</b> otherwise.</p>
<p>The command will throw an error if <i class="arg">n</i> is not a node of the graph
<i class="arg">g</i>.</p></dd>
<dt><a name="11"><b class="cmd">struct::graph::op::isBridge?</b> <i class="arg">g</i> <i class="arg">a</i></a></dt>
<dd><p>This command determines whether the arc <i class="arg">a</i> in the graph <i class="arg">g</i>
is a <i class="term"><a href="../../../../index.html#key467">bridge</a></i> (aka <i class="term"><a href="../../../../index.html#key484">cut edge</a></i>, or <i class="term"><a href="../../../../index.html#key491">isthmus</a></i>). The
result is a boolean value, <b class="const">true</b> if the arc is a bridge, and
<b class="const">false</b> otherwise.</p>
<p>The command will throw an error if <i class="arg">a</i> is not an arc of the graph
<i class="arg">g</i>.</p></dd>
<dt><a name="12"><b class="cmd">struct::graph::op::isEulerian?</b> <i class="arg">g</i> <span class="opt">?<i class="arg">tourvar</i>?</span></a></dt>
<dd><p>This command determines whether the graph <i class="arg">g</i> is <i class="term">eulerian</i>
or not.  The result is a boolean value, <b class="const">true</b> if the graph is
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<i class="arg">start</i>. Tree format is the default.</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">struct::graph::op::distance</b> <i class="arg">g</i> <i class="arg">origin</i> <i class="arg">destination</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed distance between the two
nodes <i class="arg">origin</i> and <i class="arg">destination</i> in the graph <i class="arg">g</i>. It
accepts the option <b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p></dd>
<dt><a name="16"><b class="cmd">struct::graph::op::eccentricity</b> <i class="arg">g</i> <i class="arg">n</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed <i class="term"><a href="../../../../index.html#eccentricity">eccentricity</a></i> of the
node <i class="arg">n</i> in the graph <i class="arg">g</i>. It accepts the option
<b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p>
<p>The (un)directed <i class="term"><a href="../../../../index.html#eccentricity">eccentricity</a></i> of a node is the maximal
(un)directed distance between the node and any other node in the
graph.</p></dd>
<dt><a name="17"><b class="cmd">struct::graph::op::radius</b> <i class="arg">g</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed <i class="term"><a href="../../../../index.html#radius">radius</a></i> of the graph
<i class="arg">g</i>. It accepts the option <b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p>
<p>The (un)directed <i class="term"><a href="../../../../index.html#radius">radius</a></i> of a graph is the minimal (un)directed
<i class="term"><a href="../../../../index.html#eccentricity">eccentricity</a></i> of all nodes in the graph.</p></dd>
<dt><a name="18"><b class="cmd">struct::graph::op::diameter</b> <i class="arg">g</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed <i class="term"><a href="../../../../index.html#diameter">diameter</a></i> of the graph
<i class="arg">g</i>. It accepts the option <b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p>
<p>The (un)directed <i class="term"><a href="../../../../index.html#diameter">diameter</a></i> of a graph is the maximal (un)directed
<i class="term"><a href="../../../../index.html#eccentricity">eccentricity</a></i> of all nodes in the graph.</p></dd>
<dt><a name="19"><b class="cmd">struct::graph::op::BellmanFord</b> <i class="arg">G</i> <i class="arg">startnode</i></a></dt>
<dd><p>Searching for <span class="sectref"><a href="#subsection1">shortests paths</a></span> between chosen node and all other nodes in graph <i class="arg">G</i>. Based
on relaxation method. In comparison to <b class="cmd">struct::graph::op::dijkstra</b> it doesn't need assumption that all weights
on edges in input graph <i class="arg">G</i> have to be positive.</p>
<p>That generality sets the complexity of algorithm to - <i class="term">O(V*E)</i>, where <i class="term">V</i> is the number of vertices
and <i class="term"><a href="../../../../index.html#e">E</a></i> is number of edges in graph <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph object <i class="arg">G</i> (input)</dt>
<dd><p>Directed, connected and edge weighted graph <i class="arg">G</i>, without any negative cycles ( presence of cycles with the negative sum
of weight means that there is no shortest path, since the total weight becomes lower each time the cycle is
traversed ). Negative weights on edges are allowed.</p></dd>







|


|



|

|
|

|

|
|





|







353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<i class="arg">start</i>. Tree format is the default.</p></dd>
</dl></dd>
<dt><a name="15"><b class="cmd">struct::graph::op::distance</b> <i class="arg">g</i> <i class="arg">origin</i> <i class="arg">destination</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed distance between the two
nodes <i class="arg">origin</i> and <i class="arg">destination</i> in the graph <i class="arg">g</i>. It
accepts the option <b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p></dd>
<dt><a name="16"><b class="cmd">struct::graph::op::eccentricity</b> <i class="arg">g</i> <i class="arg">n</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed <i class="term"><a href="../../../../index.html#key501">eccentricity</a></i> of the
node <i class="arg">n</i> in the graph <i class="arg">g</i>. It accepts the option
<b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p>
<p>The (un)directed <i class="term"><a href="../../../../index.html#key501">eccentricity</a></i> of a node is the maximal
(un)directed distance between the node and any other node in the
graph.</p></dd>
<dt><a name="17"><b class="cmd">struct::graph::op::radius</b> <i class="arg">g</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed <i class="term"><a href="../../../../index.html#key469">radius</a></i> of the graph
<i class="arg">g</i>. It accepts the option <b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p>
<p>The (un)directed <i class="term"><a href="../../../../index.html#key469">radius</a></i> of a graph is the minimal (un)directed
<i class="term"><a href="../../../../index.html#key501">eccentricity</a></i> of all nodes in the graph.</p></dd>
<dt><a name="18"><b class="cmd">struct::graph::op::diameter</b> <i class="arg">g</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command determines the (un)directed <i class="term"><a href="../../../../index.html#key458">diameter</a></i> of the graph
<i class="arg">g</i>. It accepts the option <b class="option">-arcmode</b> of <b class="cmd">struct::graph::op::dijkstra</b>.</p>
<p>The (un)directed <i class="term"><a href="../../../../index.html#key458">diameter</a></i> of a graph is the maximal (un)directed
<i class="term"><a href="../../../../index.html#key501">eccentricity</a></i> of all nodes in the graph.</p></dd>
<dt><a name="19"><b class="cmd">struct::graph::op::BellmanFord</b> <i class="arg">G</i> <i class="arg">startnode</i></a></dt>
<dd><p>Searching for <span class="sectref"><a href="#subsection1">shortests paths</a></span> between chosen node and all other nodes in graph <i class="arg">G</i>. Based
on relaxation method. In comparison to <b class="cmd">struct::graph::op::dijkstra</b> it doesn't need assumption that all weights
on edges in input graph <i class="arg">G</i> have to be positive.</p>
<p>That generality sets the complexity of algorithm to - <i class="term">O(V*E)</i>, where <i class="term">V</i> is the number of vertices
and <i class="term"><a href="../../../../index.html#key807">E</a></i> is number of edges in graph <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph object <i class="arg">G</i> (input)</dt>
<dd><p>Directed, connected and edge weighted graph <i class="arg">G</i>, without any negative cycles ( presence of cycles with the negative sum
of weight means that there is no shortest path, since the total weight becomes lower each time the cycle is
traversed ). Negative weights on edges are allowed.</p></dd>
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
<dd><p>List of nodes and its weights in graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Set of nodes, which is solution found by algorithm.</p></dd>
</dl>
<p><em>Note:</em><i class="term">WeightedKCenter</i> is a <span class="sectref"><a href="#subsection7">3-approximation algorithm.</a></span></p></dd>
<dt><a name="28"><b class="cmd">struct::graph::op::GreedyMaxIndependentSet</b> <i class="arg">G</i></a></dt>
<dd><p>A <i class="term">maximal independent set</i> is an <i class="term"><a href="../../../../index.html#independent_set">independent set</a></i> such that adding any other node
to the set forces the set to contain an edge.</p>
<p>Algorithm for input graph <i class="arg">G</i> returns set of nodes (list), which are contained in Max Independent
Set found by algorithm.</p></dd>
<dt><a name="29"><b class="cmd">struct::graph::op::GreedyWeightedMaxIndependentSet</b> <i class="arg">G</i> <i class="arg">nodeWeights</i></a></dt>
<dd><p>Weighted variation of <i class="term">Maximal Independent Set</i>. It takes as an input argument
not only graph <i class="arg">G</i> but also set of weights for all vertices in graph <i class="arg">G</i>.</p>
<p><em>Note:</em>







|







522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
<dd><p>List of nodes and its weights in graph <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Set of nodes, which is solution found by algorithm.</p></dd>
</dl>
<p><em>Note:</em><i class="term">WeightedKCenter</i> is a <span class="sectref"><a href="#subsection7">3-approximation algorithm.</a></span></p></dd>
<dt><a name="28"><b class="cmd">struct::graph::op::GreedyMaxIndependentSet</b> <i class="arg">G</i></a></dt>
<dd><p>A <i class="term">maximal independent set</i> is an <i class="term"><a href="../../../../index.html#key471">independent set</a></i> such that adding any other node
to the set forces the set to contain an edge.</p>
<p>Algorithm for input graph <i class="arg">G</i> returns set of nodes (list), which are contained in Max Independent
Set found by algorithm.</p></dd>
<dt><a name="29"><b class="cmd">struct::graph::op::GreedyWeightedMaxIndependentSet</b> <i class="arg">G</i> <i class="arg">nodeWeights</i></a></dt>
<dd><p>Weighted variation of <i class="term">Maximal Independent Set</i>. It takes as an input argument
not only graph <i class="arg">G</i> but also set of weights for all vertices in graph <i class="arg">G</i>.</p>
<p><em>Note:</em>
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
are equal to 0 are not returned ( it is like there was no link in the flow network
between nodes connected by such edge).</p></dd>
</dl>
<p>The general idea of algorithm is finding the shortest augumenting paths in graph <i class="arg">G</i>, as long
as they exist, and for each path updating the edge's weights along that path,
with maximum possible throughput. The final (maximum) flow is found
when there is no other augumenting path from source to sink.</p>
<p><em>Note:</em> Algorithm complexity : <i class="term">O(V*E)</i>, where <i class="term">V</i> is the number of nodes and <i class="term"><a href="../../../../index.html#e">E</a></i> is the number
of edges in graph <i class="term">G</i>.</p></dd>
<dt><a name="32"><b class="cmd">struct::graph::op::BusackerGowen</b> <i class="arg">G</i> <i class="arg">desiredFlow</i> <i class="arg">s</i> <i class="arg">t</i></a></dt>
<dd><p>Algorithm finds solution for a <span class="sectref"><a href="#subsection6">minimum cost flow problem</a></span>. So, the goal is to find a flow,
whose max value can be <i class="arg">desiredFlow</i>, from source node <i class="arg">s</i> to sink node <i class="arg">t</i> in given flow network <i class="arg">G</i>.
That network except throughputs at edges has also defined a non-negative cost on each edge - cost of using that edge when
directing flow with that edge ( it can illustrate e.g. fuel usage, time or any other measure dependent on usages ).</p>
<dl class="doctools_definitions">







|







562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
are equal to 0 are not returned ( it is like there was no link in the flow network
between nodes connected by such edge).</p></dd>
</dl>
<p>The general idea of algorithm is finding the shortest augumenting paths in graph <i class="arg">G</i>, as long
as they exist, and for each path updating the edge's weights along that path,
with maximum possible throughput. The final (maximum) flow is found
when there is no other augumenting path from source to sink.</p>
<p><em>Note:</em> Algorithm complexity : <i class="term">O(V*E)</i>, where <i class="term">V</i> is the number of nodes and <i class="term"><a href="../../../../index.html#key807">E</a></i> is the number
of edges in graph <i class="term">G</i>.</p></dd>
<dt><a name="32"><b class="cmd">struct::graph::op::BusackerGowen</b> <i class="arg">G</i> <i class="arg">desiredFlow</i> <i class="arg">s</i> <i class="arg">t</i></a></dt>
<dd><p>Algorithm finds solution for a <span class="sectref"><a href="#subsection6">minimum cost flow problem</a></span>. So, the goal is to find a flow,
whose max value can be <i class="arg">desiredFlow</i>, from source node <i class="arg">s</i> to sink node <i class="arg">t</i> in given flow network <i class="arg">G</i>.
That network except throughputs at edges has also defined a non-negative cost on each edge - cost of using that edge when
directing flow with that edge ( it can illustrate e.g. fuel usage, time or any other measure dependent on usages ).</p>
<dl class="doctools_definitions">
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
<dt><b class="option">paths</b></dt>
<dd><p>When selected <i class="arg">outputFormat</i> is <b class="const">paths</b> - procedure returns dictionary containing
for each node <i class="term">v</i>, a list of nodes, which is a path between source node <i class="arg">s</i> and node <i class="term">v</i>.</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">struct::graph::op::BFS</b> <i class="arg">G</i> <i class="arg">s</i> <span class="opt">?<i class="arg">outputFormat</i>...?</span></a></dt>
<dd><p>Breadth-First Search - algorithm creates the BFS Tree.
Memory and time complexity: <i class="term">O(V + E)</i>, where <i class="term">V</i> is the number of nodes and <i class="term"><a href="../../../../index.html#e">E</a></i>
is number of edges.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Input graph.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>







|







611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
<dt><b class="option">paths</b></dt>
<dd><p>When selected <i class="arg">outputFormat</i> is <b class="const">paths</b> - procedure returns dictionary containing
for each node <i class="term">v</i>, a list of nodes, which is a path between source node <i class="arg">s</i> and node <i class="term">v</i>.</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="34"><b class="cmd">struct::graph::op::BFS</b> <i class="arg">G</i> <i class="arg">s</i> <span class="opt">?<i class="arg">outputFormat</i>...?</span></a></dt>
<dd><p>Breadth-First Search - algorithm creates the BFS Tree.
Memory and time complexity: <i class="term">O(V + E)</i>, where <i class="term">V</i> is the number of nodes and <i class="term"><a href="../../../../index.html#key807">E</a></i>
is number of edges.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Input graph.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
<dt><b class="option">tree</b></dt>
<dd><p>When selected <b class="option">outputFormat</b> is <b class="option">tree</b> - procedure returns a tree structure (<b class="cmd"><a href="struct_tree.html">struct::tree</a></b>),
which is equivalent to BFS tree found by algorithm.</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">struct::graph::op::MinimumDiameterSpanningTree</b> <i class="arg">G</i></a></dt>
<dd><p>The goal is to find for input graph <i class="arg">G</i>, the <i class="term">spanning tree</i> that
has the minimum <i class="term"><a href="../../../../index.html#diameter">diameter</a></i> value.</p>
<p>General idea of algorithm is to run <i class="term"><a href="../../../../index.html#bfs">BFS</a></i> over all vertices in graph
<i class="arg">G</i>. If the diameter <i class="term">d</i> of the tree is odd, then we are sure that tree
given by <i class="term"><a href="../../../../index.html#bfs">BFS</a></i> is minimum (considering diameter value). When, diameter <i class="term">d</i>
is even, then optimal tree can have minimum <i class="term"><a href="../../../../index.html#diameter">diameter</a></i> equal to <i class="term">d</i> or
<i class="term">d-1</i>.</p>
<p>In that case, what algorithm does is rebuilding the tree given by <i class="term"><a href="../../../../index.html#bfs">BFS</a></i>, by
adding a vertice between root node and root's child node (nodes), such that
subtree created with child node as root node is the greatest one (has the
greatests height). In the next step for such rebuilded tree, we run again <i class="term"><a href="../../../../index.html#bfs">BFS</a></i>
with new node as root node. If the height of the tree didn't changed, we have found
a better solution.</p>
<p>For input graph <i class="arg">G</i> algorithm returns the graph structure (<b class="cmd"><a href="graph.html">struct::graph</a></b>) that is
a spanning tree with minimum diameter found by algorithm.</p></dd>
<dt><a name="36"><b class="cmd">struct::graph::op::MinimumDegreeSpanningTree</b> <i class="arg">G</i></a></dt>
<dd><p>Algorithm finds for input graph <i class="arg">G</i>, a spanning tree <i class="term">T</i> with the minimum possible
degree. That problem is <i class="term">NP-hard</i>, so algorithm is an approximation algorithm.</p>







|
|

|
|

|


|







633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
<dt><b class="option">tree</b></dt>
<dd><p>When selected <b class="option">outputFormat</b> is <b class="option">tree</b> - procedure returns a tree structure (<b class="cmd"><a href="struct_tree.html">struct::tree</a></b>),
which is equivalent to BFS tree found by algorithm.</p></dd>
</dl></dd>
</dl></dd>
<dt><a name="35"><b class="cmd">struct::graph::op::MinimumDiameterSpanningTree</b> <i class="arg">G</i></a></dt>
<dd><p>The goal is to find for input graph <i class="arg">G</i>, the <i class="term">spanning tree</i> that
has the minimum <i class="term"><a href="../../../../index.html#key458">diameter</a></i> value.</p>
<p>General idea of algorithm is to run <i class="term"><a href="../../../../index.html#key465">BFS</a></i> over all vertices in graph
<i class="arg">G</i>. If the diameter <i class="term">d</i> of the tree is odd, then we are sure that tree
given by <i class="term"><a href="../../../../index.html#key465">BFS</a></i> is minimum (considering diameter value). When, diameter <i class="term">d</i>
is even, then optimal tree can have minimum <i class="term"><a href="../../../../index.html#key458">diameter</a></i> equal to <i class="term">d</i> or
<i class="term">d-1</i>.</p>
<p>In that case, what algorithm does is rebuilding the tree given by <i class="term"><a href="../../../../index.html#key465">BFS</a></i>, by
adding a vertice between root node and root's child node (nodes), such that
subtree created with child node as root node is the greatest one (has the
greatests height). In the next step for such rebuilded tree, we run again <i class="term"><a href="../../../../index.html#key465">BFS</a></i>
with new node as root node. If the height of the tree didn't changed, we have found
a better solution.</p>
<p>For input graph <i class="arg">G</i> algorithm returns the graph structure (<b class="cmd"><a href="graph.html">struct::graph</a></b>) that is
a spanning tree with minimum diameter found by algorithm.</p></dd>
<dt><a name="36"><b class="cmd">struct::graph::op::MinimumDegreeSpanningTree</b> <i class="arg">G</i></a></dt>
<dd><p>Algorithm finds for input graph <i class="arg">G</i>, a spanning tree <i class="term">T</i> with the minimum possible
degree. That problem is <i class="term">NP-hard</i>, so algorithm is an approximation algorithm.</p>
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
<dd><p>Algorithm returns dictionary containing it's flow value for each edge (key) in network <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> <b class="cmd">struct::graph::op::BlockingFlowByDinic</b> gives <i class="term">O(m*n^2)</i> complexity and
<b class="cmd">struct::graph::op::BlockingFlowByMKM</b> gives <i class="term">O(n^3)</i> complexity, where <i class="term">n</i> is the number of nodes
and <i class="term">m</i> is the number of edges in flow network <i class="arg">G</i>.</p></dd>
<dt><a name="38"><b class="cmd">struct::graph::op::BlockingFlowByDinic</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i></a></dt>
<dd><p>Algorithm for given network <i class="arg">G</i> with source <i class="arg">s</i> and sink <i class="arg">t</i>, finds a <span class="sectref"><a href="#subsection6">blocking
flow</a></span>, which can be used to obtain a <i class="term"><a href="../../../../index.html#maximum_flow">maximum flow</a></i> for that network <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Directed graph <i class="arg">G</i> representing the flow network. Each edge should have attribute
<i class="term">throughput</i> set with integer value.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for the flow network <i class="arg">G</i>.</p></dd>
<dt>Node <i class="arg">t</i> (input)</dt>
<dd><p>The sink node for the flow network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns dictionary containing it's blocking flow value for each edge (key) in network <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> Algorithm's complexity is <i class="term">O(n*m)</i>, where <i class="term">n</i> is the number of nodes
and <i class="term">m</i> is the number of edges in flow network <i class="arg">G</i>.</p></dd>
<dt><a name="39"><b class="cmd">struct::graph::op::BlockingFlowByMKM</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i></a></dt>
<dd><p>Algorithm for given network <i class="arg">G</i> with source <i class="arg">s</i> and sink <i class="arg">t</i>, finds a <span class="sectref"><a href="#subsection6">blocking
flow</a></span>, which can be used to obtain a <i class="term"><a href="../../../../index.html#maximum_flow">maximum flow</a></i> for that <i class="term"><a href="../../../../index.html#network">network</a></i> <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Directed graph <i class="arg">G</i> representing the flow network. Each edge should have attribute
<i class="term">throughput</i> set with integer value.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for the flow network <i class="arg">G</i>.</p></dd>
<dt>Node <i class="arg">t</i> (input)</dt>
<dd><p>The sink node for the flow network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns dictionary containing it's blocking flow value for each edge (key) in network <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> Algorithm's complexity is <i class="term">O(n^2)</i>, where <i class="term">n</i> is the number of nodes in flow network <i class="arg">G</i>.</p></dd>
<dt><a name="40"><b class="cmd">struct::graph::op::createResidualGraph</b> <i class="arg">G</i> <i class="arg">f</i></a></dt>
<dd><p>Procedure creates a <i class="term"><a href="../../../../index.html#residual_graph">residual graph</a></i> (or <span class="sectref"><a href="#subsection6">residual network</a></span> ) for network <i class="arg">G</i> and given
flow <i class="arg">f</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Flow network (directed graph where each edge has set attribute: <i class="term">throughput</i> ).</p></dd>
<dt>dictionary <i class="arg">f</i> (input)</dt>
<dd><p>Current flows in flow network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Procedure returns graph structure that is a <i class="term"><a href="../../../../index.html#residual_graph">residual graph</a></i> created from input flow
network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt><a name="41"><b class="cmd">struct::graph::op::createAugmentingNetwork</b> <i class="arg">G</i> <i class="arg">f</i> <i class="arg">path</i></a></dt>
<dd><p>Procedure creates an <span class="sectref"><a href="#subsection6">augmenting network</a></span> for a given residual network <i class="arg">G</i>
, flow <i class="arg">f</i> and augmenting path <i class="arg">path</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>







|


















|
















|










|







696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
<dd><p>Algorithm returns dictionary containing it's flow value for each edge (key) in network <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> <b class="cmd">struct::graph::op::BlockingFlowByDinic</b> gives <i class="term">O(m*n^2)</i> complexity and
<b class="cmd">struct::graph::op::BlockingFlowByMKM</b> gives <i class="term">O(n^3)</i> complexity, where <i class="term">n</i> is the number of nodes
and <i class="term">m</i> is the number of edges in flow network <i class="arg">G</i>.</p></dd>
<dt><a name="38"><b class="cmd">struct::graph::op::BlockingFlowByDinic</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i></a></dt>
<dd><p>Algorithm for given network <i class="arg">G</i> with source <i class="arg">s</i> and sink <i class="arg">t</i>, finds a <span class="sectref"><a href="#subsection6">blocking
flow</a></span>, which can be used to obtain a <i class="term"><a href="../../../../index.html#key498">maximum flow</a></i> for that network <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Directed graph <i class="arg">G</i> representing the flow network. Each edge should have attribute
<i class="term">throughput</i> set with integer value.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for the flow network <i class="arg">G</i>.</p></dd>
<dt>Node <i class="arg">t</i> (input)</dt>
<dd><p>The sink node for the flow network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns dictionary containing it's blocking flow value for each edge (key) in network <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> Algorithm's complexity is <i class="term">O(n*m)</i>, where <i class="term">n</i> is the number of nodes
and <i class="term">m</i> is the number of edges in flow network <i class="arg">G</i>.</p></dd>
<dt><a name="39"><b class="cmd">struct::graph::op::BlockingFlowByMKM</b> <i class="arg">G</i> <i class="arg">s</i> <i class="arg">t</i></a></dt>
<dd><p>Algorithm for given network <i class="arg">G</i> with source <i class="arg">s</i> and sink <i class="arg">t</i>, finds a <span class="sectref"><a href="#subsection6">blocking
flow</a></span>, which can be used to obtain a <i class="term"><a href="../../../../index.html#key498">maximum flow</a></i> for that <i class="term"><a href="../../../../index.html#key672">network</a></i> <i class="arg">G</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Directed graph <i class="arg">G</i> representing the flow network. Each edge should have attribute
<i class="term">throughput</i> set with integer value.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for the flow network <i class="arg">G</i>.</p></dd>
<dt>Node <i class="arg">t</i> (input)</dt>
<dd><p>The sink node for the flow network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Algorithm returns dictionary containing it's blocking flow value for each edge (key) in network <i class="arg">G</i>.</p></dd>
</dl>
<p><em>Note:</em> Algorithm's complexity is <i class="term">O(n^2)</i>, where <i class="term">n</i> is the number of nodes in flow network <i class="arg">G</i>.</p></dd>
<dt><a name="40"><b class="cmd">struct::graph::op::createResidualGraph</b> <i class="arg">G</i> <i class="arg">f</i></a></dt>
<dd><p>Procedure creates a <i class="term"><a href="../../../../index.html#key466">residual graph</a></i> (or <span class="sectref"><a href="#subsection6">residual network</a></span> ) for network <i class="arg">G</i> and given
flow <i class="arg">f</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">G</i> (input)</dt>
<dd><p>Flow network (directed graph where each edge has set attribute: <i class="term">throughput</i> ).</p></dd>
<dt>dictionary <i class="arg">f</i> (input)</dt>
<dd><p>Current flows in flow network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Procedure returns graph structure that is a <i class="term"><a href="../../../../index.html#key466">residual graph</a></i> created from input flow
network <i class="arg">G</i>.</p></dd>
</dl></dd>
<dt><a name="41"><b class="cmd">struct::graph::op::createAugmentingNetwork</b> <i class="arg">G</i> <i class="arg">f</i> <i class="arg">path</i></a></dt>
<dd><p>Procedure creates an <span class="sectref"><a href="#subsection6">augmenting network</a></span> for a given residual network <i class="arg">G</i>
, flow <i class="arg">f</i> and augmenting path <i class="arg">path</i>.</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">Gf</i> (input)</dt>
<dd><p>Residual network, where each edge has it's attribute <i class="term">throughput</i> set with certain value.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for the residual network <i class="arg">Gf</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Procedure returns a <i class="term"><a href="../../../../index.html#level_graph">level graph</a></i> created from input <i class="term">residual network</i>.</p></dd>
</dl></dd>
<dt><a name="43"><b class="cmd">struct::graph::op::TSPLocalSearching</b> <i class="arg">G</i> <i class="arg">C</i></a></dt>
<dd><p>Algorithm is a <i class="term">heuristic of local searching</i> for <i class="term">Travelling Salesman Problem</i>. For some
solution of <i class="term">TSP problem</i>, it checks if it's possible to find a better solution. As <i class="term">TSP</i>
is well known NP-Complete problem, so algorithm is a approximation algorithm (with 2 approximation factor).</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>







|







773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
<dd><dl class="doctools_arguments">
<dt>Graph Object <i class="arg">Gf</i> (input)</dt>
<dd><p>Residual network, where each edge has it's attribute <i class="term">throughput</i> set with certain value.</p></dd>
<dt>Node <i class="arg">s</i> (input)</dt>
<dd><p>The source node for the residual network <i class="arg">Gf</i>.</p></dd>
</dl></dd>
<dt>Result:</dt>
<dd><p>Procedure returns a <i class="term"><a href="../../../../index.html#key487">level graph</a></i> created from input <i class="term">residual network</i>.</p></dd>
</dl></dd>
<dt><a name="43"><b class="cmd">struct::graph::op::TSPLocalSearching</b> <i class="arg">G</i> <i class="arg">C</i></a></dt>
<dd><p>Algorithm is a <i class="term">heuristic of local searching</i> for <i class="term">Travelling Salesman Problem</i>. For some
solution of <i class="term">TSP problem</i>, it checks if it's possible to find a better solution. As <i class="term">TSP</i>
is well known NP-Complete problem, so algorithm is a approximation algorithm (with 2 approximation factor).</p>
<dl class="doctools_definitions">
<dt>Arguments:</dt>
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
square the increase of approximation factor, so 2 and 3 approximations are mainly used.</p></dd>
<dt><a name="45"><b class="cmd">struct::graph::op::createSquaredGraph</b> <i class="arg">G</i></a></dt>
<dd><p>X-Squared graph is a graph with the same set of nodes as input graph <i class="arg">G</i>, but a different set of edges. X-Squared graph
has edge <i class="term">(u,v)</i>, if and only if, the distance between <i class="term">u</i> and <i class="term">v</i> nodes is not greater than X and <i class="term">u != v</i>.</p>
<p>Procedure for input graph <i class="arg">G</i>, returns its two-squared graph.</p>
<p><em>Note:</em> Distances used in choosing new set of edges are considering the number of edges, not the sum of weights at edges.</p></dd>
<dt><a name="46"><b class="cmd">struct::graph::op::createCompleteGraph</b> <i class="arg">G</i> <i class="arg">originalEdges</i></a></dt>
<dd><p>For input graph <i class="arg">G</i> procedure adds missing arcs to make it a <i class="term"><a href="../../../../index.html#complete_graph">complete graph</a></i>. It also holds in
variable <i class="arg">originalEdges</i> the set of arcs that graph <i class="arg">G</i> possessed before that operation.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Background theory and terms</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Shortest Path Problem</a></h3>
<dl class="doctools_definitions">
<dt>Definition (<i class="term">single-pair shortest path problem</i>):</dt>
<dd><p>Formally, given a weighted graph (let <i class="term">V</i> be the set of vertices, and <i class="term"><a href="../../../../index.html#e">E</a></i> a set of edges),
and one vertice <i class="term">v</i> of <i class="term">V</i>, find a path <i class="term">P</i> from <i class="term">v</i> to a <i class="term">v'</i> of V so that
the sum of weights on edges along the path is minimal among all paths connecting v to v'.</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">The single-source shortest path problem</i>, in which we have to find shortest paths from a source vertex v to all other vertices in the graph.</p></li>
<li><p><i class="term">The single-destination shortest path problem</i>, in which we have to find shortest paths from all vertices in the graph to a single destination vertex v. This can be reduced to the single-source shortest path problem by reversing the edges in the graph.</p></li>
<li><p><i class="term">The all-pairs shortest path problem</i>, in which we have to find shortest paths between every pair of vertices v, v' in the graph.</p></li>







|







|







817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
square the increase of approximation factor, so 2 and 3 approximations are mainly used.</p></dd>
<dt><a name="45"><b class="cmd">struct::graph::op::createSquaredGraph</b> <i class="arg">G</i></a></dt>
<dd><p>X-Squared graph is a graph with the same set of nodes as input graph <i class="arg">G</i>, but a different set of edges. X-Squared graph
has edge <i class="term">(u,v)</i>, if and only if, the distance between <i class="term">u</i> and <i class="term">v</i> nodes is not greater than X and <i class="term">u != v</i>.</p>
<p>Procedure for input graph <i class="arg">G</i>, returns its two-squared graph.</p>
<p><em>Note:</em> Distances used in choosing new set of edges are considering the number of edges, not the sum of weights at edges.</p></dd>
<dt><a name="46"><b class="cmd">struct::graph::op::createCompleteGraph</b> <i class="arg">G</i> <i class="arg">originalEdges</i></a></dt>
<dd><p>For input graph <i class="arg">G</i> procedure adds missing arcs to make it a <i class="term"><a href="../../../../index.html#key488">complete graph</a></i>. It also holds in
variable <i class="arg">originalEdges</i> the set of arcs that graph <i class="arg">G</i> possessed before that operation.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Background theory and terms</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Shortest Path Problem</a></h3>
<dl class="doctools_definitions">
<dt>Definition (<i class="term">single-pair shortest path problem</i>):</dt>
<dd><p>Formally, given a weighted graph (let <i class="term">V</i> be the set of vertices, and <i class="term"><a href="../../../../index.html#key807">E</a></i> a set of edges),
and one vertice <i class="term">v</i> of <i class="term">V</i>, find a path <i class="term">P</i> from <i class="term">v</i> to a <i class="term">v'</i> of V so that
the sum of weights on edges along the path is minimal among all paths connecting v to v'.</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">The single-source shortest path problem</i>, in which we have to find shortest paths from a source vertex v to all other vertices in the graph.</p></li>
<li><p><i class="term">The single-destination shortest path problem</i>, in which we have to find shortest paths from all vertices in the graph to a single destination vertex v. This can be reduced to the single-source shortest path problem by reversing the edges in the graph.</p></li>
<li><p><i class="term">The all-pairs shortest path problem</i>, in which we have to find shortest paths between every pair of vertices v, v' in the graph.</p></li>
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
<dl class="doctools_definitions">
<dt>Definition:</dt>
<dd><p>For given edge-weighted (weights on edges should be positive) graph the goal is to find the cycle that visits each node in graph
exactly once (<i class="term">Hamiltonian cycle</i>).</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Metric TSP</i> - A very natural restriction of the <i class="term">TSP</i> is to require that the distances between cities form a <i class="term">metric</i>, i.e.,
they satisfy <i class="term">the triangle inequality</i>. That is, for any 3 cities <i class="term">A</i>, <i class="term">B</i> and <i class="term"><a href="../../../../index.html#c">C</a></i>, the distance between <i class="term">A</i> and <i class="term"><a href="../../../../index.html#c">C</a></i>
must be at most the distance from <i class="term">A</i> to <i class="term">B</i> plus the distance from <i class="term">B</i> to <i class="term"><a href="../../../../index.html#c">C</a></i>. Most natural instances of <i class="term">TSP</i>
satisfy this constraint.</p></li>
<li><p><i class="term">Euclidean TSP</i> - Euclidean TSP, or <i class="term">planar TSP</i>, is the <i class="term">TSP</i> with the distance being the ordinary <i class="term">Euclidean distance</i>.
<i class="term">Euclidean TSP</i> is a particular case of <i class="term">TSP</i> with <i class="term">triangle inequality</i>, since distances in plane obey triangle inequality. However,
it seems to be easier than general <i class="term">TSP</i> with <i class="term">triangle inequality</i>. For example, <i class="term">the minimum spanning tree</i> of the graph associated
with an instance of <i class="term">Euclidean TSP</i> is a <i class="term">Euclidean minimum spanning tree</i>, and so can be computed in expected <i class="term">O(n log n)</i> time for
<i class="term">n</i> points (considerably less than the number of edges). This enables the simple <i class="term">2-approximation algorithm</i> for TSP with triangle
inequality above to operate more quickly.</p></li>







|
|







848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
<dl class="doctools_definitions">
<dt>Definition:</dt>
<dd><p>For given edge-weighted (weights on edges should be positive) graph the goal is to find the cycle that visits each node in graph
exactly once (<i class="term">Hamiltonian cycle</i>).</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Metric TSP</i> - A very natural restriction of the <i class="term">TSP</i> is to require that the distances between cities form a <i class="term">metric</i>, i.e.,
they satisfy <i class="term">the triangle inequality</i>. That is, for any 3 cities <i class="term">A</i>, <i class="term">B</i> and <i class="term"><a href="../../../../index.html#key290">C</a></i>, the distance between <i class="term">A</i> and <i class="term"><a href="../../../../index.html#key290">C</a></i>
must be at most the distance from <i class="term">A</i> to <i class="term">B</i> plus the distance from <i class="term">B</i> to <i class="term"><a href="../../../../index.html#key290">C</a></i>. Most natural instances of <i class="term">TSP</i>
satisfy this constraint.</p></li>
<li><p><i class="term">Euclidean TSP</i> - Euclidean TSP, or <i class="term">planar TSP</i>, is the <i class="term">TSP</i> with the distance being the ordinary <i class="term">Euclidean distance</i>.
<i class="term">Euclidean TSP</i> is a particular case of <i class="term">TSP</i> with <i class="term">triangle inequality</i>, since distances in plane obey triangle inequality. However,
it seems to be easier than general <i class="term">TSP</i> with <i class="term">triangle inequality</i>. For example, <i class="term">the minimum spanning tree</i> of the graph associated
with an instance of <i class="term">Euclidean TSP</i> is a <i class="term">Euclidean minimum spanning tree</i>, and so can be computed in expected <i class="term">O(n log n)</i> time for
<i class="term">n</i> points (considerably less than the number of edges). This enables the simple <i class="term">2-approximation algorithm</i> for TSP with triangle
inequality above to operate more quickly.</p></li>
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
<dt>Definition:</dt>
<dd><p>Given a graph <i class="term">G = (V,E)</i>, a matching or <i class="term">edge-independent set</i> <i class="term">M</i> in <i class="term">G</i> is a set of pairwise non-adjacent edges,
that is, no two edges share a common vertex. A vertex is <i class="term">matched</i> if it is incident to an edge in the <i class="term">matching M</i>.
Otherwise the vertex is <i class="term">unmatched</i>.</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Maximal matching</i> - a matching <i class="term">M</i> of a graph G with the property that if any edge not in <i class="term">M</i> is added to <i class="term">M</i>,
it is no longer a <i class="term"><a href="../../../../index.html#matching">matching</a></i>, that is, <i class="term">M</i> is maximal if it is not a proper subset of any other <i class="term"><a href="../../../../index.html#matching">matching</a></i> in graph G.
In other words, a <i class="term">matching M</i> of a graph G is maximal if every edge in G has a non-empty intersection with at least one edge in <i class="term">M</i>.</p></li>
<li><p><i class="term">Maximum matching</i> - a matching that contains the largest possible number of edges. There may be many <i class="term">maximum matchings</i>.
The <i class="term">matching number</i> of a graph G is the size of a <i class="term">maximum matching</i>. Note that every <i class="term">maximum matching</i> is <i class="term">maximal</i>,
but not every <i class="term">maximal matching</i> is a <i class="term">maximum matching</i>.</p></li>
<li><p><i class="term">Perfect matching</i> - a matching which matches all vertices of the graph. That is, every vertex of the graph is incident to exactly one
edge of the matching. Every <i class="term">perfect matching</i> is <i class="term"><a href="../../../../index.html#maximum">maximum</a></i> and hence <i class="term">maximal</i>. In some literature, the term <i class="term">complete matching</i>
is used. A <i class="term">perfect matching</i> is also a <i class="term">minimum-size edge cover</i>. Moreover, the size of a <i class="term">maximum matching</i> is no larger than the
size of a <i class="term">minimum edge cover</i>.</p></li>
<li><p><i class="term">Near-perfect matching</i> - a matching in which exactly one vertex is unmatched. This can only occur when the graph has an odd number of vertices,
and such a <i class="term"><a href="../../../../index.html#matching">matching</a></i> must be <i class="term"><a href="../../../../index.html#maximum">maximum</a></i>. If, for every vertex in a graph, there is a near-perfect matching that omits only that vertex, the graph
is also called <i class="term">factor-critical</i>.</p></li>
</ul></dd>
<dt>Related terms:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Alternating path</i> - given a matching <i class="term">M</i>, an <i class="term">alternating path</i> is a path in which the edges belong alternatively
to the matching and not to the matching.</p></li>
<li><p><i class="term"><a href="../../../../index.html#augmenting_path">Augmenting path</a></i> - given a matching <i class="term">M</i>, an <i class="term"><a href="../../../../index.html#augmenting_path">augmenting path</a></i> is an <i class="term">alternating path</i> that starts from
and ends on free (unmatched) vertices.</p></li>
</ul></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Cut Problems</a></h3>
<dl class="doctools_definitions">
<dt>Definition:</dt>
<dd><p>A <i class="term">cut</i> is a partition of the vertices of a graph into two <i class="term">disjoint subsets</i>. The <i class="term">cut-set</i> of the <i class="term">cut</i> is the
set of edges whose end points are in different subsets of the partition. Edges are said to be crossing the cut if they are in its <i class="term">cut-set</i>.</p>
<p>Formally:</p>
<ul class="doctools_itemized">
<li><p>a <i class="term">cut</i> <i class="term">C = (S,T)</i> is a partition of <i class="term">V</i> of a graph <i class="term">G = (V, E)</i>.</p></li>
<li><p>an <i class="term">s-t cut</i> <i class="term">C = (S,T)</i> of a <i class="term"><a href="../../../../index.html#flow_network">flow network</a></i> <i class="term">N = (V, E)</i> is a cut of <i class="term">N</i> such that <i class="term">s</i> is included in <i class="term">S</i>
and <i class="term">t</i> is included in <i class="term">T</i>, where <i class="term">s</i> and <i class="term">t</i> are the <i class="term"><a href="../../../../index.html#source">source</a></i> and the <i class="term">sink</i> of <i class="term">N</i> respectively.</p></li>
<li><p>The <i class="term">cut-set</i> of a <i class="term">cut C = (S,T)</i> is such set of edges from graph <i class="term">G = (V, E)</i> that each edge <i class="term">(u, v)</i> satisfies
condition that <i class="term">u</i> is included in <i class="term">S</i> and <i class="term">v</i> is included in <i class="term">T</i>.</p></li>
</ul>
<p>In an <i class="term">unweighted undirected</i> graph, the size or weight of a cut is the number of edges crossing the cut. In a <i class="term">weighted graph</i>,
the same term is defined by the sum of the weights of the edges crossing the cut.</p>
<p>In a <i class="term"><a href="../../../../index.html#flow_network">flow network</a></i>, an <i class="term">s-t cut</i> is a cut that requires the <i class="term"><a href="../../../../index.html#source">source</a></i> and the <i class="term">sink</i> to be in different subsets,
and its <i class="term">cut-set</i> only consists of edges going from the <i class="term">source's</i> side to the <i class="term">sink's</i> side. The capacity of an <i class="term">s-t cut</i>
is defined by the sum of capacity of each edge in the <i class="term">cut-set</i>.</p>
<p>The <i class="term">cut</i> of a graph can sometimes refer to its <i class="term">cut-set</i> instead of the partition.</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Minimum cut</i> - A cut is minimum if the size of the cut is not larger than the size of any other cut.</p></li>
<li><p><i class="term">Maximum cut</i> - A cut is maximum if the size of the cut is not smaller than the size of any other cut.</p></li>







|





|



|






|












|
|





|







873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
<dt>Definition:</dt>
<dd><p>Given a graph <i class="term">G = (V,E)</i>, a matching or <i class="term">edge-independent set</i> <i class="term">M</i> in <i class="term">G</i> is a set of pairwise non-adjacent edges,
that is, no two edges share a common vertex. A vertex is <i class="term">matched</i> if it is incident to an edge in the <i class="term">matching M</i>.
Otherwise the vertex is <i class="term">unmatched</i>.</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Maximal matching</i> - a matching <i class="term">M</i> of a graph G with the property that if any edge not in <i class="term">M</i> is added to <i class="term">M</i>,
it is no longer a <i class="term"><a href="../../../../index.html#key5">matching</a></i>, that is, <i class="term">M</i> is maximal if it is not a proper subset of any other <i class="term"><a href="../../../../index.html#key5">matching</a></i> in graph G.
In other words, a <i class="term">matching M</i> of a graph G is maximal if every edge in G has a non-empty intersection with at least one edge in <i class="term">M</i>.</p></li>
<li><p><i class="term">Maximum matching</i> - a matching that contains the largest possible number of edges. There may be many <i class="term">maximum matchings</i>.
The <i class="term">matching number</i> of a graph G is the size of a <i class="term">maximum matching</i>. Note that every <i class="term">maximum matching</i> is <i class="term">maximal</i>,
but not every <i class="term">maximal matching</i> is a <i class="term">maximum matching</i>.</p></li>
<li><p><i class="term">Perfect matching</i> - a matching which matches all vertices of the graph. That is, every vertex of the graph is incident to exactly one
edge of the matching. Every <i class="term">perfect matching</i> is <i class="term"><a href="../../../../index.html#key310">maximum</a></i> and hence <i class="term">maximal</i>. In some literature, the term <i class="term">complete matching</i>
is used. A <i class="term">perfect matching</i> is also a <i class="term">minimum-size edge cover</i>. Moreover, the size of a <i class="term">maximum matching</i> is no larger than the
size of a <i class="term">minimum edge cover</i>.</p></li>
<li><p><i class="term">Near-perfect matching</i> - a matching in which exactly one vertex is unmatched. This can only occur when the graph has an odd number of vertices,
and such a <i class="term"><a href="../../../../index.html#key5">matching</a></i> must be <i class="term"><a href="../../../../index.html#key310">maximum</a></i>. If, for every vertex in a graph, there is a near-perfect matching that omits only that vertex, the graph
is also called <i class="term">factor-critical</i>.</p></li>
</ul></dd>
<dt>Related terms:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Alternating path</i> - given a matching <i class="term">M</i>, an <i class="term">alternating path</i> is a path in which the edges belong alternatively
to the matching and not to the matching.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key490">Augmenting path</a></i> - given a matching <i class="term">M</i>, an <i class="term"><a href="../../../../index.html#key490">augmenting path</a></i> is an <i class="term">alternating path</i> that starts from
and ends on free (unmatched) vertices.</p></li>
</ul></dd>
</dl>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Cut Problems</a></h3>
<dl class="doctools_definitions">
<dt>Definition:</dt>
<dd><p>A <i class="term">cut</i> is a partition of the vertices of a graph into two <i class="term">disjoint subsets</i>. The <i class="term">cut-set</i> of the <i class="term">cut</i> is the
set of edges whose end points are in different subsets of the partition. Edges are said to be crossing the cut if they are in its <i class="term">cut-set</i>.</p>
<p>Formally:</p>
<ul class="doctools_itemized">
<li><p>a <i class="term">cut</i> <i class="term">C = (S,T)</i> is a partition of <i class="term">V</i> of a graph <i class="term">G = (V, E)</i>.</p></li>
<li><p>an <i class="term">s-t cut</i> <i class="term">C = (S,T)</i> of a <i class="term"><a href="../../../../index.html#key499">flow network</a></i> <i class="term">N = (V, E)</i> is a cut of <i class="term">N</i> such that <i class="term">s</i> is included in <i class="term">S</i>
and <i class="term">t</i> is included in <i class="term">T</i>, where <i class="term">s</i> and <i class="term">t</i> are the <i class="term"><a href="../../../../index.html#key436">source</a></i> and the <i class="term">sink</i> of <i class="term">N</i> respectively.</p></li>
<li><p>The <i class="term">cut-set</i> of a <i class="term">cut C = (S,T)</i> is such set of edges from graph <i class="term">G = (V, E)</i> that each edge <i class="term">(u, v)</i> satisfies
condition that <i class="term">u</i> is included in <i class="term">S</i> and <i class="term">v</i> is included in <i class="term">T</i>.</p></li>
</ul>
<p>In an <i class="term">unweighted undirected</i> graph, the size or weight of a cut is the number of edges crossing the cut. In a <i class="term">weighted graph</i>,
the same term is defined by the sum of the weights of the edges crossing the cut.</p>
<p>In a <i class="term"><a href="../../../../index.html#key499">flow network</a></i>, an <i class="term">s-t cut</i> is a cut that requires the <i class="term"><a href="../../../../index.html#key436">source</a></i> and the <i class="term">sink</i> to be in different subsets,
and its <i class="term">cut-set</i> only consists of edges going from the <i class="term">source's</i> side to the <i class="term">sink's</i> side. The capacity of an <i class="term">s-t cut</i>
is defined by the sum of capacity of each edge in the <i class="term">cut-set</i>.</p>
<p>The <i class="term">cut</i> of a graph can sometimes refer to its <i class="term">cut-set</i> instead of the partition.</p></dd>
<dt>Generalizations:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">Minimum cut</i> - A cut is minimum if the size of the cut is not larger than the size of any other cut.</p></li>
<li><p><i class="term">Maximum cut</i> - A cut is maximum if the size of the cut is not smaller than the size of any other cut.</p></li>
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
<dl class="doctools_definitions">
<dt>Definitions:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">the maximum flow problem</i> - the goal is to find a feasible flow through a single-source, single-sink flow network that is maximum.
The <i class="term">maximum flow problem</i> can be seen as a special case of more complex network flow problems, such as the <i class="term">circulation problem</i>.
The maximum value of an <i class="term">s-t flow</i> is equal to the minimum capacity of an <i class="term">s-t cut</i> in the network, as stated in the
<i class="term">max-flow min-cut theorem</i>.</p>
<p>More formally for flow network <i class="term">G = (V,E)</i>, where for each edge <i class="term">(u, v)</i> we have its throuhgput <i class="term">c(u,v)</i> defined. As <i class="term"><a href="../../../../index.html#flow">flow</a></i>
<i class="term">F</i> we define set of non-negative integer attributes <i class="term">f(u,v)</i> assigned to edges, satisfying such conditions:</p>
<ol class="doctools_enumerated">
<li><p>for each edge <i class="term">(u, v)</i> in <i class="term">G</i> such condition should be satisfied:      0 &lt;= f(u,v) &lt;= c(u,v)</p></li>
<li><p>Network <i class="term">G</i> has source node <i class="term">s</i> such that the flow <i class="term">F</i> is equal to the sum of outcoming flow decreased by the sum of incoming flow from that source node <i class="term">s</i>.</p></li>
<li><p>Network <i class="term">G</i> has sink node <i class="term">t</i> such that the the <i class="term">-F</i> value is equal to the sum of the incoming flow decreased by the sum of outcoming flow from that sink node <i class="term">t</i>.</p></li>
<li><p>For each node that is not a <i class="term"><a href="../../../../index.html#source">source</a></i> or <i class="term">sink</i> the sum of incoming flow and sum of outcoming flow should be equal.</p></li>
</ol>
</li>
<li><p><i class="term">the minimum cost flow problem</i> - the goal is finding the cheapest possible way of sending a certain amount of flow through a <i class="term"><a href="../../../../index.html#flow_network">flow network</a></i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#blocking_flow">blocking flow</a></i> - a <i class="term"><a href="../../../../index.html#blocking_flow">blocking flow</a></i> for a <i class="term">residual network</i> <i class="term">Gf</i> we name such flow <i class="term">b</i> in <i class="term">Gf</i> that:</p>
<ol class="doctools_enumerated">
<li><p>Each path from <i class="term">sink</i> to <i class="term"><a href="../../../../index.html#source">source</a></i> is the shortest path in <i class="term">Gf</i>.</p></li>
<li><p>Each shortest path in <i class="term">Gf</i> contains an edge with fully used throughput in <i class="term">Gf+b</i>.</p></li>
</ol>
</li>
<li><p><i class="term">residual network</i> - for a flow network <i class="term">G</i> and flow <i class="term">f</i> <i class="term">residual network</i> is built with those edges, which can
send larger flow. It contains only those edges, which can send flow larger than 0.</p></li>
<li><p><i class="term">level network</i> - it has the same set of nodes as <i class="term"><a href="../../../../index.html#residual_graph">residual graph</a></i>, but has only those edges <i class="term">(u,v)</i> from <i class="arg">Gf</i>
for which such equality is satisfied: <i class="term">distance(s,u)+1 = distance(s,v)</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#augmenting_network">augmenting network</a></i> - it is a modification of <i class="term">residual network</i> considering the new
flow values. Structure stays unchanged but values of throughputs and costs at edges
are different.</p></li>
</ul></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Approximation algorithm</a></h3>
<dl class="doctools_definitions">







|





|


|
|

|





|

|







951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
<dl class="doctools_definitions">
<dt>Definitions:</dt>
<dd><ul class="doctools_itemized">
<li><p><i class="term">the maximum flow problem</i> - the goal is to find a feasible flow through a single-source, single-sink flow network that is maximum.
The <i class="term">maximum flow problem</i> can be seen as a special case of more complex network flow problems, such as the <i class="term">circulation problem</i>.
The maximum value of an <i class="term">s-t flow</i> is equal to the minimum capacity of an <i class="term">s-t cut</i> in the network, as stated in the
<i class="term">max-flow min-cut theorem</i>.</p>
<p>More formally for flow network <i class="term">G = (V,E)</i>, where for each edge <i class="term">(u, v)</i> we have its throuhgput <i class="term">c(u,v)</i> defined. As <i class="term"><a href="../../../../index.html#key141">flow</a></i>
<i class="term">F</i> we define set of non-negative integer attributes <i class="term">f(u,v)</i> assigned to edges, satisfying such conditions:</p>
<ol class="doctools_enumerated">
<li><p>for each edge <i class="term">(u, v)</i> in <i class="term">G</i> such condition should be satisfied:      0 &lt;= f(u,v) &lt;= c(u,v)</p></li>
<li><p>Network <i class="term">G</i> has source node <i class="term">s</i> such that the flow <i class="term">F</i> is equal to the sum of outcoming flow decreased by the sum of incoming flow from that source node <i class="term">s</i>.</p></li>
<li><p>Network <i class="term">G</i> has sink node <i class="term">t</i> such that the the <i class="term">-F</i> value is equal to the sum of the incoming flow decreased by the sum of outcoming flow from that sink node <i class="term">t</i>.</p></li>
<li><p>For each node that is not a <i class="term"><a href="../../../../index.html#key436">source</a></i> or <i class="term">sink</i> the sum of incoming flow and sum of outcoming flow should be equal.</p></li>
</ol>
</li>
<li><p><i class="term">the minimum cost flow problem</i> - the goal is finding the cheapest possible way of sending a certain amount of flow through a <i class="term"><a href="../../../../index.html#key499">flow network</a></i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key456">blocking flow</a></i> - a <i class="term"><a href="../../../../index.html#key456">blocking flow</a></i> for a <i class="term">residual network</i> <i class="term">Gf</i> we name such flow <i class="term">b</i> in <i class="term">Gf</i> that:</p>
<ol class="doctools_enumerated">
<li><p>Each path from <i class="term">sink</i> to <i class="term"><a href="../../../../index.html#key436">source</a></i> is the shortest path in <i class="term">Gf</i>.</p></li>
<li><p>Each shortest path in <i class="term">Gf</i> contains an edge with fully used throughput in <i class="term">Gf+b</i>.</p></li>
</ol>
</li>
<li><p><i class="term">residual network</i> - for a flow network <i class="term">G</i> and flow <i class="term">f</i> <i class="term">residual network</i> is built with those edges, which can
send larger flow. It contains only those edges, which can send flow larger than 0.</p></li>
<li><p><i class="term">level network</i> - it has the same set of nodes as <i class="term"><a href="../../../../index.html#key466">residual graph</a></i>, but has only those edges <i class="term">(u,v)</i> from <i class="arg">Gf</i>
for which such equality is satisfied: <i class="term">distance(s,u)+1 = distance(s,v)</i>.</p></li>
<li><p><i class="term"><a href="../../../../index.html#key470">augmenting network</a></i> - it is a modification of <i class="term">residual network</i> considering the new
flow values. Structure stays unchanged but values of throughputs and costs at edges
are different.</p></li>
</ul></dd>
</dl>
</div>
<div id="subsection7" class="doctools_subsection"><h3><a name="subsection7">Approximation algorithm</a></h3>
<dl class="doctools_definitions">
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: graph</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#adjacency_list">adjacency list</a>, <a href="../../../../index.html#adjacency_matrix">adjacency matrix</a>, <a href="../../../../index.html#adjacent">adjacent</a>, <a href="../../../../index.html#approximation_algorithm">approximation algorithm</a>, <a href="../../../../index.html#arc">arc</a>, <a href="../../../../index.html#articulation_point">articulation point</a>, <a href="../../../../index.html#augmenting_network">augmenting network</a>, <a href="../../../../index.html#augmenting_path">augmenting path</a>, <a href="../../../../index.html#bfs">bfs</a>, <a href="../../../../index.html#bipartite">bipartite</a>, <a href="../../../../index.html#blocking_flow">blocking flow</a>, <a href="../../../../index.html#bridge">bridge</a>, <a href="../../../../index.html#complete_graph">complete graph</a>, <a href="../../../../index.html#connected_component">connected component</a>, <a href="../../../../index.html#cut_edge">cut edge</a>, <a href="../../../../index.html#cut_vertex">cut vertex</a>, <a href="../../../../index.html#degree">degree</a>, <a href="../../../../index.html#degree_constrained_spanning_tree">degree constrained spanning tree</a>, <a href="../../../../index.html#diameter">diameter</a>, <a href="../../../../index.html#dijkstra">dijkstra</a>, <a href="../../../../index.html#distance">distance</a>, <a href="../../../../index.html#eccentricity">eccentricity</a>, <a href="../../../../index.html#edge">edge</a>, <a href="../../../../index.html#flow_network">flow network</a>, <a href="../../../../index.html#graph">graph</a>, <a href="../../../../index.html#heuristic">heuristic</a>, <a href="../../../../index.html#independent_set">independent set</a>, <a href="../../../../index.html#isthmus">isthmus</a>, <a href="../../../../index.html#level_graph">level graph</a>, <a href="../../../../index.html#local_searching">local searching</a>, <a href="../../../../index.html#loop">loop</a>, <a href="../../../../index.html#matching">matching</a>, <a href="../../../../index.html#max_cut">max cut</a>, <a href="../../../../index.html#maximum_flow">maximum flow</a>, <a href="../../../../index.html#minimal_spanning_tree">minimal spanning tree</a>, <a href="../../../../index.html#minimum_cost_flow">minimum cost flow</a>, <a href="../../../../index.html#minimum_degree_spanning_tree">minimum degree spanning tree</a>, <a href="../../../../index.html#minimum_diameter_spanning_tree">minimum diameter spanning tree</a>, <a href="../../../../index.html#neighbour">neighbour</a>, <a href="../../../../index.html#node">node</a>, <a href="../../../../index.html#radius">radius</a>, <a href="../../../../index.html#residual_graph">residual graph</a>, <a href="../../../../index.html#shortest_path">shortest path</a>, <a href="../../../../index.html#squared_graph">squared graph</a>, <a href="../../../../index.html#strongly_connected_component">strongly connected component</a>, <a href="../../../../index.html#subgraph">subgraph</a>, <a href="../../../../index.html#travelling_salesman">travelling salesman</a>, <a href="../../../../index.html#vertex">vertex</a>, <a href="../../../../index.html#vertex_cover">vertex cover</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Alejandro Paz &lt;vidriloco@gmail.com&gt;<br>
Copyright &copy; 2008 (docs) Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2009 Michal Antoniewski &lt;antoniewski.m@gmail.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|










1026
1027
1028
1029
1030
1031
1032






1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: graph</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key468">adjacency list</a>, <a href="../../../../index.html#key492">adjacency matrix</a>, <a href="../../../../index.html#key485">adjacent</a>, <a href="../../../../index.html#key494">approximation algorithm</a>, <a href="../../../../index.html#key473">arc</a>, <a href="../../../../index.html#key483">articulation point</a>, <a href="../../../../index.html#key470">augmenting network</a>, <a href="../../../../index.html#key490">augmenting path</a>, <a href="../../../../index.html#key465">bfs</a>, <a href="../../../../index.html#key495">bipartite</a>, <a href="../../../../index.html#key456">blocking flow</a>, <a href="../../../../index.html#key467">bridge</a>, <a href="../../../../index.html#key488">complete graph</a>, <a href="../../../../index.html#key481">connected component</a>, <a href="../../../../index.html#key484">cut edge</a>, <a href="../../../../index.html#key486">cut vertex</a>, <a href="../../../../index.html#key475">degree</a>, <a href="../../../../index.html#key476">degree constrained spanning tree</a>, <a href="../../../../index.html#key458">diameter</a>, <a href="../../../../index.html#key496">dijkstra</a>, <a href="../../../../index.html#key479">distance</a>, <a href="../../../../index.html#key501">eccentricity</a>, <a href="../../../../index.html#key460">edge</a>, <a href="../../../../index.html#key499">flow network</a>, <a href="../../../../index.html#key305">graph</a>, <a href="../../../../index.html#key474">heuristic</a>, <a href="../../../../index.html#key471">independent set</a>, <a href="../../../../index.html#key491">isthmus</a>, <a href="../../../../index.html#key487">level graph</a>, <a href="../../../../index.html#key482">local searching</a>, <a href="../../../../index.html#key457">loop</a>, <a href="../../../../index.html#key5">matching</a>, <a href="../../../../index.html#key478">max cut</a>, <a href="../../../../index.html#key498">maximum flow</a>, <a href="../../../../index.html#key461">minimal spanning tree</a>, <a href="../../../../index.html#key472">minimum cost flow</a>, <a href="../../../../index.html#key462">minimum degree spanning tree</a>, <a href="../../../../index.html#key500">minimum diameter spanning tree</a>, <a href="../../../../index.html#key489">neighbour</a>, <a href="../../../../index.html#key463">node</a>, <a href="../../../../index.html#key469">radius</a>, <a href="../../../../index.html#key466">residual graph</a>, <a href="../../../../index.html#key477">shortest path</a>, <a href="../../../../index.html#key493">squared graph</a>, <a href="../../../../index.html#key455">strongly connected component</a>, <a href="../../../../index.html#key480">subgraph</a>, <a href="../../../../index.html#key459">travelling salesman</a>, <a href="../../../../index.html#key464">vertex</a>, <a href="../../../../index.html#key497">vertex cover</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Alejandro Paz &lt;vidriloco@gmail.com&gt;<br>
Copyright &copy; 2008 (docs) Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;<br>
Copyright &copy; 2009 Michal Antoniewski &lt;antoniewski.m@gmail.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/matrix.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::matrix - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::matrix - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'matrix.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002-2013,2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- struct::matrix.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::matrix(n) 2.0.4 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::matrix - Create and manipulate matrix objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::matrix <span class="opt">?2.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::matrix</b> <span class="opt">?<i class="arg">matrixName</i>?</span> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">source</i>?</span></a></li>
<li><a href="#2"><b class="cmd">matrixName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">matrixName</i> <b class="method">=</b> <i class="arg">sourcematrix</i></a></li>
<li><a href="#4"><i class="arg">matrixName</i> <b class="method">--&gt;</b> <i class="arg">destmatrix</i></a></li>
<li><a href="#5"><i class="arg">matrixName</i> <b class="method">add column</b> <span class="opt">?<i class="arg">values</i>?</span></a></li>







|

|

|



|
|
|
|
|
|


|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'matrix.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- struct::matrix.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::matrix(n) 2.0.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::matrix - Create and manipulate matrix objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::matrix <span class="opt">?2.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::matrix</b> <span class="opt">?<i class="arg">matrixName</i>?</span> <span class="opt">?<b class="const">=</b>|<b class="const">:=</b>|<b class="const">as</b>|<b class="const">deserialize</b> <i class="arg">source</i>?</span></a></li>
<li><a href="#2"><b class="cmd">matrixName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">matrixName</i> <b class="method">=</b> <i class="arg">sourcematrix</i></a></li>
<li><a href="#4"><i class="arg">matrixName</i> <b class="method">--&gt;</b> <i class="arg">destmatrix</i></a></li>
<li><a href="#5"><i class="arg">matrixName</i> <b class="method">add column</b> <span class="opt">?<i class="arg">values</i>?</span></a></li>
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: matrix</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#matrix">matrix</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2013,2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


545
546
547
548
549
550
551






552
553
554
555
556
557
558
559
560
561
562
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: matrix</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key51">matrix</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2013 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/matrix1.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::matrix_v1 - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::matrix_v1 - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'matrix1.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002,2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- struct::matrix_v1.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::matrix_v1(n) 1.2.2 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::matrix_v1 - Create and manipulate matrix objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::matrix <span class="opt">?1.2.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">matrixName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#2"><i class="arg">matrixName</i> <b class="method">add column</b> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#3"><i class="arg">matrixName</i> <b class="method">add row</b> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#4"><i class="arg">matrixName</i> <b class="method">add columns</b> <i class="arg">n</i></a></li>
<li><a href="#5"><i class="arg">matrixName</i> <b class="method">add rows</b> <i class="arg">n</i></a></li>







|

|

|



|
|
|
|
|
|


|



















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'matrix1.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- struct::matrix_v1.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::matrix_v1(n) 1.2.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::matrix_v1 - Create and manipulate matrix objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::matrix <span class="opt">?1.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">matrixName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#2"><i class="arg">matrixName</i> <b class="method">add column</b> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#3"><i class="arg">matrixName</i> <b class="method">add row</b> <span class="opt">?<i class="arg">values</i>?</span></a></li>
<li><a href="#4"><i class="arg">matrixName</i> <b class="method">add columns</b> <i class="arg">n</i></a></li>
<li><a href="#5"><i class="arg">matrixName</i> <b class="method">add rows</b> <i class="arg">n</i></a></li>
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: matrix</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#matrix">matrix</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002,2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


433
434
435
436
437
438
439






440
441
442
443
444
445
446
447
448
449
450
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: matrix</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key51">matrix</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/pool.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::pool - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::pool - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'pool.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002, Erik Leunissen &amp;lt;e.leunissen@hccnet.nl&amp;gt;
   -->
<!-- struct::pool.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::pool(n) 1.2.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::pool - Create and manipulate pool objects (of discrete items)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'pool.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002, Erik Leunissen &lt;e.leunissen@hccnet.nl&gt;
   -->
<! -- struct::pool.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::pool(n) 1.2.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::pool - Create and manipulate pool objects (of discrete items)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<i class="term">owned</i> or <i class="term">occupied</i>; it is not available anymore. If
an item is <i class="term">free</i>, it is <i class="term">available</i>. Deallocating an
item is equivalent to setting free or releasing an item. The person or
entity to which the item has been allotted is said to own the item.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">ITEMS</a></h2>
<p><em>Discrete items</em></p>
<p>The <b class="cmd"><a href="../../../../index.html#pool">pool</a></b> command is designed for
<em>discrete items only</em>. Note that there are pools where
allocation occurs on a non-discrete basis, for example computer
memory. There are also pools from which the shares that are doled out
are not expected to be returned, for example a charity fund or a pan
of soup from which you may receive a portion. Finally, there are even
pools from which nothing is ever allocated or returned, like a
swimming pool or a cesspool.</p>







|







197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<i class="term">owned</i> or <i class="term">occupied</i>; it is not available anymore. If
an item is <i class="term">free</i>, it is <i class="term">available</i>. Deallocating an
item is equivalent to setting free or releasing an item. The person or
entity to which the item has been allotted is said to own the item.</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">ITEMS</a></h2>
<p><em>Discrete items</em></p>
<p>The <b class="cmd"><a href="../../../../index.html#key304">pool</a></b> command is designed for
<em>discrete items only</em>. Note that there are pools where
allocation occurs on a non-discrete basis, for example computer
memory. There are also pools from which the shares that are doled out
are not expected to be returned, for example a charity fund or a pan
of soup from which you may receive a portion. Finally, there are even
pools from which nothing is ever allocated or returned, like a
swimming pool or a cesspool.</p>
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: pool</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#discrete_items">discrete items</a>, <a href="../../../../index.html#finite">finite</a>, <a href="../../../../index.html#pool">pool</a>, <a href="../../../../index.html#struct">struct</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Erik Leunissen &lt;e.leunissen@hccnet.nl&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








430
431
432
433
434
435
436






437
438
439
440
441
442
443
444
445
446
447
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: pool</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key787">discrete items</a>, <a href="../../../../index.html#key788">finite</a>, <a href="../../../../index.html#key304">pool</a>, <a href="../../../../index.html#key327">struct</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Erik Leunissen &lt;e.leunissen@hccnet.nl&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/prioqueue.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>struct::prioqueue - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>struct::prioqueue - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'prioqueue.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003 Michael Schlenker &amp;lt;mic42@users.sourceforge.net&amp;gt;
   -->
<!-- struct::prioqueue.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::prioqueue(n) 1.4 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::prioqueue - Create and manipulate prioqueue objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'prioqueue.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;
   -->
<! -- struct::prioqueue.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::prioqueue(n) 1.4 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::prioqueue - Create and manipulate prioqueue objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::prioqueue <span class="opt">?1.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::prioqueue</b> <span class="opt">?<b class="option">-ascii|-dictionary|-integer|-real</b>?</span> <span class="opt">?<i class="arg">prioqueueName</i>?</span></a></li>
<li><a href="#2"><i class="arg">prioqueueName</i> <b class="cmd">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">prioqueueName</i> <b class="cmd">clear</b></a></li>
<li><a href="#4"><i class="arg">prioqueueName</i> <b class="cmd"><a href="../../../../index.html#remove">remove</a></b> <i class="arg">item</i></a></li>
<li><a href="#5"><i class="arg">prioqueueName</i> <b class="cmd">destroy</b></a></li>
<li><a href="#6"><i class="arg">prioqueueName</i> <b class="cmd">get</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#7"><i class="arg">prioqueueName</i> <b class="cmd">peek</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#8"><i class="arg">prioqueueName</i> <b class="cmd">peekpriority</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#9"><i class="arg">prioqueueName</i> <b class="cmd">put</b> <i class="arg">item prio</i> <span class="opt">?<i class="arg">item prio ...</i>?</span></a></li>
<li><a href="#10"><i class="arg">prioqueueName</i> <b class="cmd">size</b></a></li>
</ul>







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::prioqueue <span class="opt">?1.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::prioqueue</b> <span class="opt">?<b class="option">-ascii|-dictionary|-integer|-real</b>?</span> <span class="opt">?<i class="arg">prioqueueName</i>?</span></a></li>
<li><a href="#2"><i class="arg">prioqueueName</i> <b class="cmd">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">prioqueueName</i> <b class="cmd">clear</b></a></li>
<li><a href="#4"><i class="arg">prioqueueName</i> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">item</i></a></li>
<li><a href="#5"><i class="arg">prioqueueName</i> <b class="cmd">destroy</b></a></li>
<li><a href="#6"><i class="arg">prioqueueName</i> <b class="cmd">get</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#7"><i class="arg">prioqueueName</i> <b class="cmd">peek</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#8"><i class="arg">prioqueueName</i> <b class="cmd">peekpriority</b> <span class="opt">?<i class="arg">count</i>?</span></a></li>
<li><a href="#9"><i class="arg">prioqueueName</i> <b class="cmd">put</b> <i class="arg">item prio</i> <span class="opt">?<i class="arg">item prio ...</i>?</span></a></li>
<li><a href="#10"><i class="arg">prioqueueName</i> <b class="cmd">size</b></a></li>
</ul>
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<em>prioqueueName</em>. This command may be used to invoke various
operations on the prioqueue.  It has the following general form:</p></dd>
<dt><a name="2"><i class="arg">prioqueueName</i> <b class="cmd">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><b class="cmd">option</b> and the <i class="arg">arg</i>s determine the exact behavior of the
command.  The following commands are possible for prioqueue objects:</p></dd>
<dt><a name="3"><i class="arg">prioqueueName</i> <b class="cmd">clear</b></a></dt>
<dd><p>Remove all items from the prioqueue.</p></dd>
<dt><a name="4"><i class="arg">prioqueueName</i> <b class="cmd"><a href="../../../../index.html#remove">remove</a></b> <i class="arg">item</i></a></dt>
<dd><p>Remove the selected item from this priority queue.</p></dd>
<dt><a name="5"><i class="arg">prioqueueName</i> <b class="cmd">destroy</b></a></dt>
<dd><p>Destroy the prioqueue, including its storage space and associated
command.</p></dd>
<dt><a name="6"><i class="arg">prioqueueName</i> <b class="cmd">get</b> <span class="opt">?<i class="arg">count</i>?</span></a></dt>
<dd><p>Return the front <i class="arg">count</i> items of the prioqueue (but not their
priorities) and remove them from the prioqueue.







|







161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<em>prioqueueName</em>. This command may be used to invoke various
operations on the prioqueue.  It has the following general form:</p></dd>
<dt><a name="2"><i class="arg">prioqueueName</i> <b class="cmd">option</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><b class="cmd">option</b> and the <i class="arg">arg</i>s determine the exact behavior of the
command.  The following commands are possible for prioqueue objects:</p></dd>
<dt><a name="3"><i class="arg">prioqueueName</i> <b class="cmd">clear</b></a></dt>
<dd><p>Remove all items from the prioqueue.</p></dd>
<dt><a name="4"><i class="arg">prioqueueName</i> <b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">item</i></a></dt>
<dd><p>Remove the selected item from this priority queue.</p></dd>
<dt><a name="5"><i class="arg">prioqueueName</i> <b class="cmd">destroy</b></a></dt>
<dd><p>Destroy the prioqueue, including its storage space and associated
command.</p></dd>
<dt><a name="6"><i class="arg">prioqueueName</i> <b class="cmd">get</b> <span class="opt">?<i class="arg">count</i>?</span></a></dt>
<dd><p>Return the front <i class="arg">count</i> items of the prioqueue (but not their
priorities) and remove them from the prioqueue.
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: prioqueue</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ordered_list">ordered list</a>, <a href="../../../../index.html#prioqueue">prioqueue</a>, <a href="../../../../index.html#priority_queue">priority queue</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








207
208
209
210
211
212
213






214
215
216
217
218
219
220
221
222
223
224
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: prioqueue</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key752">ordered list</a>, <a href="../../../../index.html#key308">prioqueue</a>, <a href="../../../../index.html#key753">priority queue</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003 Michael Schlenker &lt;mic42@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/queue.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::queue - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::queue - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'queue.man' by tcllib/doctools with format 'html'
   -->
<!-- struct::queue.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::queue(n) 1.4.5 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::queue - Create and manipulate queue objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'queue.man' by tcllib/doctools with format 'html'
   -->
<! -- struct::queue.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::queue(n) 1.4.5 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::queue - Create and manipulate queue objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: queue</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#graph">graph</a>, <a href="../../../../index.html#list">list</a>, <a href="../../../../index.html#matrix">matrix</a>, <a href="../../../../index.html#pool">pool</a>, <a href="../../../../index.html#prioqueue">prioqueue</a>, <a href="../../../../index.html#record">record</a>, <a href="../../../../index.html#set">set</a>, <a href="../../../../index.html#skiplist">skiplist</a>, <a href="../../../../index.html#stack">stack</a>, <a href="../../../../index.html#tree">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





187
188
189
190
191
192
193






194
195
196
197
198
199
200
201
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: queue</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key305">graph</a>, <a href="../../../../index.html#key302">list</a>, <a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key304">pool</a>, <a href="../../../../index.html#key308">prioqueue</a>, <a href="../../../../index.html#key307">record</a>, <a href="../../../../index.html#key301">set</a>, <a href="../../../../index.html#key306">skiplist</a>, <a href="../../../../index.html#key303">stack</a>, <a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/record.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::record - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::record - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174

175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261

262
263
264
265
266
267
268
269
270
271

272
273
274
275
276

277

278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306

307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325

326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'record.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002, Brett Schwarz &amp;lt;brett_schwarz@yahoo.com&amp;gt;
   -->
<!-- struct::record.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::record(n) 1.2.2 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::record - Define and create records (similar to 'C' structures)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RECORD MEMBERS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">Getting Values</a></li>
<li class="doctools_subsection"><a href="#subsection2">Setting Values</a></li>
<li class="doctools_subsection"><a href="#subsection3">Alias access</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section3">RECORD COMMAND</a></li>
<li class="doctools_section"><a href="#section4">INSTANCE COMMAND</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a>
<ul>
<li class="doctools_subsection"><a href="#subsection4">Example 1 - Contact Information</a></li>
<li class="doctools_subsection"><a href="#subsection5">Example 2 - Linked List</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::record <span class="opt">?1.2.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">record define</b> <i class="arg">recordName</i> <i class="arg">recordMembers</i> <span class="opt">?<i class="arg">instanceName1 instanceName2 ...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">record show</b> <i class="arg">record</i></a></li>
<li><a href="#3"><b class="cmd">record show</b> <i class="arg">instances</i> <i class="arg">recordName</i></a></li>
<li><a href="#4"><b class="cmd">record show</b> <i class="arg">members</i> <i class="arg">recordName</i></a></li>
<li><a href="#5"><b class="cmd">record show</b> <i class="arg">values</i> <i class="arg">instanceName</i></a></li>
<li><a href="#6"><b class="cmd">record exists</b> <i class="arg">record</i> <i class="arg">recordName</i></a></li>
<li><a href="#7"><b class="cmd">record exists</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></li>
<li><a href="#8"><b class="cmd">record delete</b> <i class="arg">record</i> <i class="arg">recordName</i></a></li>
<li><a href="#9"><b class="cmd">record delete</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></li>
<li><a href="#10"><i class="arg">instanceName</i> <b class="method">cget</b> -<i class="arg">member</i></a></li>
<li><a href="#11"><i class="arg">instanceName</i> <b class="method">cget</b> -<i class="arg">member1</i> -<i class="arg">member2</i></a></li>
<li><a href="#12"><i class="arg">instanceName</i> <b class="method">cget</b></a></li>
<li><a href="#13"><i class="arg">instanceName</i> <b class="method">configure</b></a></li>
<li><a href="#14"><i class="arg">instanceName</i></a></li>
<li><a href="#15"><i class="arg">instanceName</i> <b class="method">configure</b> -<i class="arg">member</i> <i class="arg">value</i></a></li>
<li><a href="#16"><i class="arg">instanceName</i> <b class="method">configure</b> -<i class="arg">member1</i> <i class="arg">value1</i> -<i class="arg">member2</i> <i class="arg">value2</i></a></li>
<li><a href="#17"><i class="arg">recordName</i> <i class="arg">instanceName</i>|<b class="const">#auto</b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></li>
<li><a href="#18"><i class="arg">instanceName</i> <b class="method">cget</b> <span class="opt">?<i class="arg">-member1 -member2 ...</i>?</span></a></li>
<li><a href="#19"><i class="arg">instanceName</i> <b class="method">configure</b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">::struct::record</b> package provides a mechanism to group
variables together as one data structure, similar to a <i class="term"><a href="../../../../index.html#c">C</a></i>
structure. The members of a record can be variables or other
records. However, a record can not contain circular records,
i.e. records that contain the same record as a member.</p>

<p>This package was structured so that it is very similar to how
Tk objects work. Each record definition creates a record object that
encompasses that definition. Subsequently, that record object can
create instances of that record. These instances can then be
manipulated with the <b class="method">cget</b> and <b class="method">configure</b> methods.</p>
<p>The package only contains one top level command, but several
sub commands (see below). It also obeys the namespace in which the
record was defined, hence the objects returned are fully qualified.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">record define</b> <i class="arg">recordName</i> <i class="arg">recordMembers</i> <span class="opt">?<i class="arg">instanceName1 instanceName2 ...</i>?</span></a></dt>
<dd><p>Defines a record. <i class="arg">recordName</i> is the name of the record, and is
also used as an object command. This object command is used to create
instances of the record definition. The <i class="arg">recordMembers</i> are the
members of the record that make up the record definition. These are
variables and other records. If optional <i class="arg">instanceName</i> args are
specified, then an instance is generated after the definition is
created for each <i class="arg">instanceName</i>.</p></dd>
<dt><a name="2"><b class="cmd">record show</b> <i class="arg">record</i></a></dt>
<dd><p>Returns a list of records that have been defined.</p></dd>
<dt><a name="3"><b class="cmd">record show</b> <i class="arg">instances</i> <i class="arg">recordName</i></a></dt>
<dd><p>Returns the instances that have been instantiated by
<i class="arg">recordName</i>.</p></dd>
<dt><a name="4"><b class="cmd">record show</b> <i class="arg">members</i> <i class="arg">recordName</i></a></dt>
<dd><p>Returns the members that are defined for record <i class="arg">recordName</i>.

It returns the same format as how the records were defined.</p></dd>
<dt><a name="5"><b class="cmd">record show</b> <i class="arg">values</i> <i class="arg">instanceName</i></a></dt>
<dd><p>Returns a list of values that are set for the instance
<i class="arg">instanceName</i>. The output is a list of key/value pairs. If there
are nested records, then the values of the nested records will
itself be a list.</p></dd>
<dt><a name="6"><b class="cmd">record exists</b> <i class="arg">record</i> <i class="arg">recordName</i></a></dt>
<dd><p>Tests for the existence of a <i class="arg">record</i> with the
name <i class="arg">recordName</i>.</p></dd>
<dt><a name="7"><b class="cmd">record exists</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></dt>
<dd><p>Tests for the existence of a <i class="arg">instance</i> with the
name <i class="arg">instanceName</i>.</p></dd>
<dt><a name="8"><b class="cmd">record delete</b> <i class="arg">record</i> <i class="arg">recordName</i></a></dt>
<dd><p>Deletes <i class="arg">recordName</i>, and all instances of <i class="arg">recordName</i>.
It will return an error if the record does not exist.</p></dd>
<dt><a name="9"><b class="cmd">record delete</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></dt>
<dd><p>Deletes <i class="arg">instance</i> with the name of <i class="arg">instanceName</i>. It will
return an error if the instance does not exist. Note that this
recursively deletes any nested instances as well.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RECORD MEMBERS</a></h2>
<p>Record members can either be variables, or other records, However, the
same record can not be nested witin itself (circular). To define a
nested record, you need to specify the <b class="const">record</b> keyword, along
the with name of the record, and the name of the instance of that
nested record (within the container). For example, it would look like
this:</p>
<pre class="doctools_example">
# this is the nested record
record define mynestedrecord {
    nest1
    nest2
}
# This is the main record
record define myrecord {
    mem1
    mem2
    {record mynestedrecord mem3}
}
</pre>
<p>You can also assign default or initial values to the members of a
record, by enclosing the member entry in braces:</p>
<pre class="doctools_example">
record define myrecord {
    mem1
    {mem2 5}
}
</pre>
<p>All instances created from this record definition will initially have
<b class="const">5</b> as the value for member <i class="arg">mem2</i>. If no default is given,
then the value will be the empty string.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Getting Values</a></h3>
<p>To get a value of a member, there are several ways to do this.</p>
<dl class="doctools_definitions">
<dt><a name="10"><i class="arg">instanceName</i> <b class="method">cget</b> -<i class="arg">member</i></a></dt>
<dd><p>In this form the built-in <b class="method">cget</b> instance method returns the
value of the specified <i class="arg">member</i>. Note the leading dash.</p>
<p>To reach a nested member use <i class="term">dot notation</i>:</p>
<pre class="doctools_example">
<i class="arg">instanceName</i> <b class="method">cget</b> -mem3.nest1
</pre>
</dd>

<dt><a name="11"><i class="arg">instanceName</i> <b class="method">cget</b> -<i class="arg">member1</i> -<i class="arg">member2</i></a></dt>
<dd><p>In this form the built-in <b class="method">cget</b> instance method returns a list
containing the values of both specified members, in the order of specification.</p></dd>
<dt><a name="12"><i class="arg">instanceName</i> <b class="method">cget</b></a></dt>
<dd></dd>
<dt><a name="13"><i class="arg">instanceName</i> <b class="method">configure</b></a></dt>
<dd></dd>
<dt><a name="14"><i class="arg">instanceName</i></a></dt>
<dd><p>These forms are all equivalent. They return a dictionary of all
members and the associated values.</p></dd>

</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Setting Values</a></h3>
<p>To set a value of a member, there are several ways to do this.</p>
<dl class="doctools_definitions">

<dt><a name="15"><i class="arg">instanceName</i> <b class="method">configure</b> -<i class="arg">member</i> <i class="arg">value</i></a></dt>

<dd><p>In this form the built-in <b class="method">configure</b> instance method sets the
specified <i class="arg">member</i> to the given <i class="arg">value</i>. Note the leading
dash.</p>
<p>To reach a nested member use <i class="term">dot notation</i>:</p>
<pre class="doctools_example">
<i class="arg">instanceName</i> <b class="method">configure</b> -mem3.nest1 value
</pre>
</dd>
<dt><a name="16"><i class="arg">instanceName</i> <b class="method">configure</b> -<i class="arg">member1</i> <i class="arg">value1</i> -<i class="arg">member2</i> <i class="arg">value2</i></a></dt>
<dd><p>In this form the built-in <b class="method">configure</b> instance method sets all
specified members to the associated values.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Alias access</a></h3>
<p>In the original implementation, access was done by using dot notation
similar to how <i class="term"><a href="../../../../index.html#c">C</a></i> structures are accessed. However, there was a
concensus to make the interface more Tcl like, which made sense.
However, the original alias access still exists. It might prove to be
helpful to some.</p>
<p>Basically, for every member of every instance, an alias is
created. This alias is used to get and set values for that member.
An example will illustrate the point, using the above defined records:</p>
<pre class="doctools_example">
% # Create an instance first
% myrecord inst1
::inst1
% # To get a member of an instance, just use the alias. It behaves
% # like a Tcl command:
% inst1.mem1

% # To set a member via the alias, just include a value. And optionally
% # the equal sign - syntactic sugar.
% inst1.mem1 = 5
5
% inst1.mem1
5
% # For nested records, just continue with the dot notation.
% # note, no equal sign.
% inst1.mem3.nest1 10
10
% inst1.mem3.nest1
10
% # just the instance by itself gives all member/values pairs for that
% # instance
% inst1
-mem1 5 -mem2 {} -mem3 {-nest1 10 -nest2 {}}
% # and to get all members within the nested record
% inst1.mem3
-nest1 10 -nest2 {}

</pre>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">RECORD COMMAND</a></h2>
<p>The following subcommands and corresponding arguments are available to
any record command:</p>
<dl class="doctools_definitions">
<dt><a name="17"><i class="arg">recordName</i> <i class="arg">instanceName</i>|<b class="const">#auto</b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></dt>
<dd><p>Using the <i class="arg">recordName</i> object command that was created from the
record definition, instances of the record definition can be
created.
Once an instance is created, it inherits the members of the record
definition, very similar to how objects work.
During instance generation, an object command for the instance is
created as well, using <i class="arg">instanceName</i>.</p>
<p>This object command is used to access the data members of the
instance.
During the instantiation, while values for that instance may be given,
when done, <em>all</em> values must be given, and be given as
key/value pairs, like for method <b class="method">configure</b>. Nested records
have to be in list format.</p>
<p>Optionally, <b class="const">#auto</b> can be used in place of
<i class="arg">instanceName</i>. When <b class="const">#auto</b> is used, the instance name will
be automatically generated, and of the form
<b class="const">recordName<b class="variable">N</b></b>, where <b class="variable">N</b> is a unique integer (starting
at 0) that is generated.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">INSTANCE COMMAND</a></h2>
<p>The following subcommands and corresponding arguments are available to
any record instance command:</p>
<dl class="doctools_definitions">
<dt><a name="18"><i class="arg">instanceName</i> <b class="method">cget</b> <span class="opt">?<i class="arg">-member1 -member2 ...</i>?</span></a></dt>
<dd><p>Each instance has the method <b class="method">cget</b>. This is very similar to
how Tk widget's <b class="method">cget</b> command works. It queries the values of
the members for that particular instance. If no arguments are given,
then a dictionary is returned.</p></dd>
<dt><a name="19"><i class="arg">instanceName</i> <b class="method">configure</b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></dt>
<dd><p>Each instance has the method <b class="method">configure</b>. This is very similar
to how Tk widget's <b class="method">configure</b> command works. It sets the
values of the particular members for that particular instance. If no
arguments are given, then a dictionary list is returned.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<p>Two examples are provided to give a good illustration on how to use
this package.</p>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">Example 1 - Contact Information</a></h3>
<p>Probably the most obvious example would be to hold contact
information, such as addresses, phone numbers, comments, etc. Since a
person can have multiple phone numbers, multiple email addresses, etc,
we will use nested records to define these. So, the first thing we do
is define the nested records:</p>
<pre class="doctools_example">
##
##  This is an interactive example, to see what is returned by
##  each command as well.
##
% namespace import ::struct::record::*
% # define a nested record. Notice that country has default 'USA'.
% record define locations {
    street
    street2
    city







|

|

|



|
|
|
|
|
|


|








|
<
<
<
<
<
<


|
<
<
<
<
<










|











<
<
<
<
<
<
<
|
|
|




|
|
<
|
|
>
|
<
|
|
|
|
<
<


|
|
|
|
|
<
|






|
>
|












|
|

|
|
<







|
<













|
|






|
|
<
|

|
<
|
<
<
<
|
<
<
>
|
<
|
|
<
|
<
|
<
|
>
|
<
|

|
>
|
>
|
<
<
|
<
|
|
<
<
<
<
<
<
|
|
<
|
<
|
|
<
|

|


|
|

>
|
|




|
|




|
|





>


<

|
|

|
|
|
<
|
<
|
|
|
|
<
<
<
|
|
|
<
<
|






|
|
|
|
|
|
|
|
|
|



|

|
|
|
|
|
|


|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120






121
122
123





124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145







146
147
148
149
150
151
152
153
154

155
156
157
158

159
160
161
162


163
164
165
166
167
168
169

170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

197
198
199
200
201
202
203
204

205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

228
229
230

231



232


233
234

235
236

237

238

239
240
241

242
243
244
245
246
247
248


249

250
251






252
253

254

255
256

257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287

288
289
290
291
292
293
294

295

296
297
298
299



300
301
302


303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'record.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002, Brett Schwarz &lt;brett_schwarz@yahoo.com&gt;
   -->
<! -- struct::record.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::record(n) 1.2.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::record - Define and create records (similar to 'C' structures)</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">RECORD MEMBERS</a></li>






<li class="doctools_section"><a href="#section3">RECORD COMMAND</a></li>
<li class="doctools_section"><a href="#section4">INSTANCE COMMAND</a></li>
<li class="doctools_section"><a href="#section5">EXAMPLES</a></li>





<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">struct::record <span class="opt">?1.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">record define</b> <i class="arg">recordName</i> <i class="arg">recordMembers</i> <span class="opt">?<i class="arg">instanceName1 instanceName2 ...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">record show</b> <i class="arg">record</i></a></li>
<li><a href="#3"><b class="cmd">record show</b> <i class="arg">instances</i> <i class="arg">recordName</i></a></li>
<li><a href="#4"><b class="cmd">record show</b> <i class="arg">members</i> <i class="arg">recordName</i></a></li>
<li><a href="#5"><b class="cmd">record show</b> <i class="arg">values</i> <i class="arg">instanceName</i></a></li>
<li><a href="#6"><b class="cmd">record exists</b> <i class="arg">record</i> <i class="arg">recordName</i></a></li>
<li><a href="#7"><b class="cmd">record exists</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></li>
<li><a href="#8"><b class="cmd">record delete</b> <i class="arg">record</i> <i class="arg">recordName</i></a></li>
<li><a href="#9"><b class="cmd">record delete</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></li>







<li><a href="#10"><i class="arg">recordName</i> <b class="method"><i class="arg">instanceName|#auto</i></b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></li>
<li><a href="#11"><i class="arg">instanceName</i> <b class="method">cget</b> <span class="opt">?<i class="arg">-member1 -member2 ...</i>?</span></a></li>
<li><a href="#12"><i class="arg">instanceName</i> <b class="method">configure</b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="cmd">::struct::record</b> package provides a mechanism to group variables together
as one data structure, similar to a 'C' structure. The members of a

record can be variables or other records. However, a record can not contain circular
record, i.e. records that contain the same record as a
member.</p>
<p>This package was structured so that it is very similar to how Tk objects work. Each record

definition creates a record object that encompasses that definition. Subsequently, that
record object can create instances of that record. These instances can then
be manipulated with the <b class="method">cget</b> and <b class="method">configure</b> methods.</p>
<p>The package only contains one top level command, but several sub commands (see below). It also obeys the namespace in which the record was define, hence the objects returned are fully qualified.</p>


<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">record define</b> <i class="arg">recordName</i> <i class="arg">recordMembers</i> <span class="opt">?<i class="arg">instanceName1 instanceName2 ...</i>?</span></a></dt>
<dd><p>Defines a record. <i class="arg">recordName</i> is the name of the record, and is also
used as an object command. This object command is used to create instances of the
record definition. <i class="arg">recordMembers</i> are the members of
the record that make up the record definition. These are variables
and other record. If optional <i class="arg">instanceName</i> args are given, then an instance

is generated after the definition is created for each <i class="arg">instanceName</i>.</p></dd>
<dt><a name="2"><b class="cmd">record show</b> <i class="arg">record</i></a></dt>
<dd><p>Returns a list of records that have been defined.</p></dd>
<dt><a name="3"><b class="cmd">record show</b> <i class="arg">instances</i> <i class="arg">recordName</i></a></dt>
<dd><p>Returns the instances that have been instantiated by
<i class="arg">recordName</i>.</p></dd>
<dt><a name="4"><b class="cmd">record show</b> <i class="arg">members</i> <i class="arg">recordName</i></a></dt>
<dd><p>Returns the members that are defined for
record <i class="arg">recordName</i>. It returns the same format as how the
records were defined.</p></dd>
<dt><a name="5"><b class="cmd">record show</b> <i class="arg">values</i> <i class="arg">instanceName</i></a></dt>
<dd><p>Returns a list of values that are set for the instance
<i class="arg">instanceName</i>. The output is a list of key/value pairs. If there
are nested records, then the values of the nested records will
itself be a list.</p></dd>
<dt><a name="6"><b class="cmd">record exists</b> <i class="arg">record</i> <i class="arg">recordName</i></a></dt>
<dd><p>Tests for the existence of a <i class="arg">record</i> with the
name <i class="arg">recordName</i>.</p></dd>
<dt><a name="7"><b class="cmd">record exists</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></dt>
<dd><p>Tests for the existence of a <i class="arg">instance</i> with the
name <i class="arg">instanceName</i>.</p></dd>
<dt><a name="8"><b class="cmd">record delete</b> <i class="arg">record</i> <i class="arg">recordName</i></a></dt>
<dd><p>Deletes <i class="arg">recordName</i>, and all instances of <i class="arg">recordName</i>. It will return
an error if the record does not exist.</p></dd>
<dt><a name="9"><b class="cmd">record delete</b> <i class="arg">instance</i> <i class="arg">instanceName</i></a></dt>
<dd><p>Deletes <i class="arg">instance</i> with the name of <i class="arg">instanceName</i>. It
will return an error if the instance does not exist.</p></dd>

</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">RECORD MEMBERS</a></h2>
<p>Record members can either be variables, or other records, However, the
same record can not be nested witin itself (circular). To define a
nested record, you need to specify the <b class="const">record</b> keyword, along
the with name of the record, and the name of the instance of that
nested record. For example, it would look like this:</p>

<pre class="doctools_example">
# this is the nested record
record define mynestedrecord {
    nest1
    nest2
}
# This is the main record
record define myrecord {
    mem1
    mem2
    {record mynestedrecord mem3}
}
</pre>
<p>You can also assign default or initial values to the members of a record,
by enclosing the member entry in braces:</p>
<pre class="doctools_example">
record define myrecord {
    mem1
    {mem2 5}
}
</pre>
<p>All instances created from this record definition, will initially have 5 as
the value for <i class="arg">mem2</i>. If no default is given, then the value will be the empty string.</p>

<p><em>Getting Values</em></p>
<p>To get a value of a member, there are several ways to do this.</p>
<ol class="doctools_enumerated">

<li><p>To get a member value, then use the instance built-in <b class="method">cget</b> method:</p>



<p><i class="arg">instanceName</i> <b class="method">cget</b> -mem1</p></li>


<li><p>To get multiple member values, you can specify them all in one command:</p>
<p><i class="arg">instanceName</i> <b class="method">cget</b> -mem1 -mem2</p></li>

<li><p>To get a list of the key/value of all of the members, there are 3 ways:</p>
<p>- <i class="arg">instanceName</i> <b class="method">cget</b></p>

<p>- <i class="arg">instanceName</i> <b class="method">configure</b></p>

<p>- <i class="arg">instanceName</i></p></li>

<li><p>To get a value of a nested member, then use the dot notation:</p>
<p><i class="arg">instanceName</i> <b class="method">cget</b> -mem3.nest1</p></li>
</ol>

<p><em>Setting Values</em></p>
<p>To set a value of a member, there are several ways to do this.</p>
<ol class="doctools_enumerated">
<li><p>To set a member value, then use the instance built-in <b class="method">configure</b> method:</p>
<p><i class="arg">instanceName</i> <b class="method">configure</b> -mem1 val1</p></li>
<li><p>To set multiple member values, you can specify them all in one command:</p>
<p><i class="arg">instanceName</i> <b class="method">configure</b> -mem1 va1 -mem2 val2</p></li>


<li><p>To set a value of a nested member, then use the dot notation:</p>

<p><i class="arg">instanceName</i> <b class="method">configure</b> -mem3.nest1 value</p></li>
</ol>






<p><em>Alias access</em></p>
<p>In the original implementation, access was done by using dot notation similar to how 'C' structures are accessed. However,

there was a concensus to make the interface more Tcl like, which made sense. However, the original alias access still

exists. It might prove to be helpful to some.</p>
<p>Basically, for every member of every instance, an alias is created. This alias is used to get and set values for that

member. An example will illustrate the point, using the above defined records:</p>
<pre class="doctools_example">
# Create an instance first
% myrecord inst1
::inst1
% # To get a member of an instance, just use the
% # alias (it behaves like a Tcl command):
% inst1.mem1
%
% # To set a member via the alias, just include
% # a value (optionally the equal sign - syntactic sugar)
% inst1.mem1 = 5
5
% inst1.mem1
5
% # For nested records, just continue with the
% # dot notation (note no equal sign)
% inst1.mem3.nest1 10
10
% inst1.mem3.nest1
10
% # just the instance by itself gives all
% # member/values pairs for that instance
% inst1
-mem1 5 -mem2 {} -mem3 {-nest1 10 -nest2 {}}
% # and to get all members within the nested record
% inst1.mem3
-nest1 10 -nest2 {}
%
</pre>
</div>

<div id="section3" class="doctools_section"><h2><a name="section3">RECORD COMMAND</a></h2>
<p>The following subcommands and corresponding arguments are available to any
record command:</p>
<dl class="doctools_definitions">
<dt><a name="10"><i class="arg">recordName</i> <b class="method"><i class="arg">instanceName|#auto</i></b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></dt>
<dd><p>Using the <i class="arg">recordName</i> object command that was created from the record definition,
instances of the record definition can be created. Once a instance is

created, then it inherits the members of the record definition, very

similar to how objects work. During instance generation, an object command for the instance
is created as well, using <i class="arg">instanceName</i>. This object command is used
to access the data members of the instance. During the instantiation, values for
that instance can be given, <em>but</em> all values must be given, and be given



in key/value pairs. Nested records, need to be in list format.</p>
<p>Optionally, <i class="arg">#auto</i> can be used in place of <i class="arg">instanceName</i>. When #auto is used,
then a instance name will automatically be generated, of the form recordName&lt;integer&gt;, where


&lt;integer&gt; is a unique integer (starting at 0) that is generated.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">INSTANCE COMMAND</a></h2>
<p>The following subcommands and corresponding arguments are available to
any record instance command:</p>
<dl class="doctools_definitions">
<dt><a name="11"><i class="arg">instanceName</i> <b class="method">cget</b> <span class="opt">?<i class="arg">-member1 -member2 ...</i>?</span></a></dt>
<dd><p>Each instance has the sub command <b class="method">cget</b> associated with it. This
is very similar to how Tk widget's cget command works. It queries
the values of the member for that particular instance. If
no arguments are given, then a key/value list is returned.</p></dd>
<dt><a name="12"><i class="arg">instanceName</i> <b class="method">configure</b> <span class="opt">?<i class="arg">-member1 value1 -member2 value2 ...</i>?</span></a></dt>
<dd><p>Each instance has the sub command <b class="method">configure</b> associated with it. This
is very similar to how Tk widget's configure command works. It sets
the values of the particular member for that particular instance. If
no arguments are given, then a key/value list is returned.</p></dd>
</dl>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">EXAMPLES</a></h2>
<p>Two examples are provided to give an good illustration on how to use
this package.</p>
<p><em>Example 1</em></p>
<p>Probably the most obvious example would be to hold contact information,
such as addresses, phone numbers, comments, etc. Since a person can have
multiple phone numbers, multiple email addresses, etc, we will use nested
records to define these. So, the first thing we do is define the nested
records:</p>
<pre class="doctools_example">
##
##  This is an interactive example, to see what is
##  returned by each command as well.
##
% namespace import ::struct::record::*
% # define a nested record. Notice that country has default 'USA'.
% record define locations {
    street
    street2
    city
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
::contacts2
% record show members contacts2
first middle last {record locations home} {record locations work}
% record show members contacts
first middle last {record locations home} {record locations work}
%
</pre>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">Example 2 - Linked List</a></h3>
<p>This next example just illustrates a simple linked list</p>
<pre class="doctools_example">
% # define a very simple record for linked list
% record define linkedlist {
    value
    next
}
::linkedlist
% linkedlist lstart
::lstart
% lstart config -value 1 -next [linkedlist #auto]
% [lstart cget -next] config -value 2 -next [linkedlist #auto]
% [[lstart cget -next] cget -next] config -value 3 -next &quot;end&quot;
% set next lstart
lstart
% while 1 {
    lappend values [$next cget -value]
    set next [$next cget -next]
    if {[string match &quot;end&quot; $next]} break
}
% puts &quot;$values&quot;
1 2 3
% # cleanup linked list
% # We could just use delete record linkedlist also
% foreach I [record show instances linkedlist] {
    record delete instance $I
}
% record show instances linkedlist
%
</pre>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: record</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#data_structures">data structures</a>, <a href="../../../../index.html#record">record</a>, <a href="../../../../index.html#struct">struct</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Brett Schwarz &lt;brett_schwarz@yahoo.com&gt;</p>
</div>
</div></body></html>







|
<



|



|
|

|
|




|
|
|




|
|
|

|


<








<
<
<
<
<
<


|








377
378
379
380
381
382
383
384

385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414

415
416
417
418
419
420
421
422






423
424
425
426
427
428
429
430
431
432
433
::contacts2
% record show members contacts2
first middle last {record locations home} {record locations work}
% record show members contacts
first middle last {record locations home} {record locations work}
%
</pre>
<p><em>Example 1</em></p>

<p>This next example just illustrates a simple linked list</p>
<pre class="doctools_example">
% # define a very simple record for linked list
% record define llist {
    value
    next
}
::llist
% llist lstart
::lstart
% lstart config -value 1 -next [llist #auto]
% [lstart cget -next] config -value 2 -next [llist #auto]
% [[lstart cget -next] cget -next] config -value 3 -next &quot;end&quot;
% set next lstart
lstart
% while 1 {
lappend values [$next cget -value]
set next [$next cget -next]
if {[string match &quot;end&quot; $next]} {break}
}
% puts &quot;$values&quot;
1 2 3
% # cleanup linked list
% # We could just use delete record llist also
% foreach I [record show instances llist] {
record delete instance $I
}
% record show instances llist
%
</pre>

</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: record</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key328">data structures</a>, <a href="../../../../index.html#key307">record</a>, <a href="../../../../index.html#key327">struct</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002, Brett Schwarz &lt;brett_schwarz@yahoo.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/skiplist.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::skiplist - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::skiplist - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'skiplist.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2000 Keith Vetter
   -->
<!-- struct::skiplist.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::skiplist(n) 1.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::skiplist - Create and manipulate skiplists</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'skiplist.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2000 Keith Vetter
   -->
<! -- struct::skiplist.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::skiplist(n) 1.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::skiplist - Create and manipulate skiplists</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: skiplist</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#skiplist">skiplist</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2000 Keith Vetter</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








185
186
187
188
189
190
191






192
193
194
195
196
197
198
199
200
201
202
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: skiplist</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key306">skiplist</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2000 Keith Vetter</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/stack.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>struct::stack - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>struct::stack - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'stack.man' by tcllib/doctools with format 'html'
   -->
<!-- struct::stack.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::stack(n) 1.5.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::stack - Create and manipulate stack objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'stack.man' by tcllib/doctools with format 'html'
   -->
<! -- struct::stack.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::stack(n) 1.5.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::stack - Create and manipulate stack objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: stack</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#graph">graph</a>, <a href="../../../../index.html#matrix">matrix</a>, <a href="../../../../index.html#queue">queue</a>, <a href="../../../../index.html#tree">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





201
202
203
204
205
206
207






208
209
210
211
212
213
214
215
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: stack</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key305">graph</a>, <a href="../../../../index.html#key51">matrix</a>, <a href="../../../../index.html#key50">queue</a>, <a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/struct_list.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::list - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::list - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'struct_list.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2003-2005 by Kevin B. Kenny. All rights reserved   -- Copyright &amp;copy; 2003-2012 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- struct::list.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::list(n) 1.8.4 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::list - Procedures for manipulating lists</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'struct_list.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2003-2005 by Kevin B. Kenny. All rights reserved   -- Copyright &copy; 2003-2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- struct::list.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::list(n) 1.8.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::list - Procedures for manipulating lists</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::list <span class="opt">?1.8.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::list</b> <b class="method">longestCommonSubsequence</b> <i class="arg">sequence1</i> <i class="arg">sequence2</i> <span class="opt">?<i class="arg">maxOccurs</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::struct::list</b> <b class="method">longestCommonSubsequence2</b> <i class="arg">sequence1 sequence2</i> <span class="opt">?<i class="arg">maxOccurs</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::struct::list</b> <b class="method">lcsInvert</b> <i class="arg">lcsData</i> <i class="arg">len1</i> <i class="arg">len2</i></a></li>
<li><a href="#4"><b class="cmd">::struct::list</b> <b class="method">lcsInvert2</b> <i class="arg">lcs1</i> <i class="arg">lcs2</i> <i class="arg">len1</i> <i class="arg">len2</i></a></li>
<li><a href="#5"><b class="cmd">::struct::list</b> <b class="method">lcsInvertMerge</b> <i class="arg">lcsData</i> <i class="arg">len1</i> <i class="arg">len2</i></a></li>







|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">struct::list <span class="opt">?1.8.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::list</b> <b class="method">longestCommonSubsequence</b> <i class="arg">sequence1</i> <i class="arg">sequence2</i> <span class="opt">?<i class="arg">maxOccurs</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::struct::list</b> <b class="method">longestCommonSubsequence2</b> <i class="arg">sequence1 sequence2</i> <span class="opt">?<i class="arg">maxOccurs</i>?</span></a></li>
<li><a href="#3"><b class="cmd">::struct::list</b> <b class="method">lcsInvert</b> <i class="arg">lcsData</i> <i class="arg">len1</i> <i class="arg">len2</i></a></li>
<li><a href="#4"><b class="cmd">::struct::list</b> <b class="method">lcsInvert2</b> <i class="arg">lcs1</i> <i class="arg">lcs2</i> <i class="arg">len1</i> <i class="arg">len2</i></a></li>
<li><a href="#5"><b class="cmd">::struct::list</b> <b class="method">lcsInvertMerge</b> <i class="arg">lcsData</i> <i class="arg">len1</i> <i class="arg">len2</i></a></li>
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
columns are counted from <b class="const">0</b>, which references the first
column. The table associated with the column index has to have at
least <i class="arg">keycol</i>+1 columns. An error will be thrown if there are
less.</p>
<p>The <i class="arg">table</i> arguments represent a table or matrix of rows and
columns of values. We use the same representation as generated and
consumed by the methods <b class="method">get rect</b> and <b class="method">set rect</b> of
<b class="cmd"><a href="../../../../index.html#matrix">matrix</a></b> objects. In other words, each argument is a list,
representing the whole matrix.  Its elements are lists too, each
representing a single rows of the matrix. The elements of the
row-lists are the column values.</p>
<p>The table resulting from the join operation is returned as the result
of the command. We use the same representation as described above for
the input <i class="arg">table</i>s.</p></dd>
<dt><a name="23"><b class="cmd">::struct::list</b> <b class="method">dbJoinKeyed</b> <span class="opt">?<b class="option">-inner</b>|<b class="option">-left</b>|<b class="option">-right</b>|<b class="option">-full</b>?</span> <span class="opt">?<b class="option">-keys</b> <i class="arg">varname</i>?</span> <i class="arg">table</i>...</a></dt>







|







553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
columns are counted from <b class="const">0</b>, which references the first
column. The table associated with the column index has to have at
least <i class="arg">keycol</i>+1 columns. An error will be thrown if there are
less.</p>
<p>The <i class="arg">table</i> arguments represent a table or matrix of rows and
columns of values. We use the same representation as generated and
consumed by the methods <b class="method">get rect</b> and <b class="method">set rect</b> of
<b class="cmd"><a href="../../../../index.html#key51">matrix</a></b> objects. In other words, each argument is a list,
representing the whole matrix.  Its elements are lists too, each
representing a single rows of the matrix. The elements of the
row-lists are the column values.</p>
<p>The table resulting from the join operation is returned as the result
of the command. We use the same representation as described above for
the input <i class="arg">table</i>s.</p></dd>
<dt><a name="23"><b class="cmd">::struct::list</b> <b class="method">dbJoinKeyed</b> <span class="opt">?<b class="option">-inner</b>|<b class="option">-left</b>|<b class="option">-right</b>|<b class="option">-full</b>?</span> <span class="opt">?<b class="option">-keys</b> <i class="arg">varname</i>?</span> <i class="arg">table</i>...</a></dt>
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
permutation for which <i class="arg">body</i> is currently executed. The result of
the loop command is the empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LONGEST COMMON SUBSEQUENCE AND FILE COMPARISON</a></h2>
<p>The <b class="method">longestCommonSubsequence</b> subcommand forms the core of a
flexible system for doing differential comparisons of files, similar
to the capability offered by the Unix command <b class="syscmd"><a href="../../../../index.html#diff">diff</a></b>.
While this procedure is quite rapid for many tasks of file comparison,
its performance degrades severely if <i class="arg">sequence2</i> contains many
equal elements (as, for instance, when using this procedure to compare
two files, a quarter of whose lines are blank.  This drawback is
intrinsic to the algorithm used (see the Reference for details).</p>
<p>One approach to dealing with the performance problem that is sometimes
effective in practice is arbitrarily to exclude elements that appear







|







596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
permutation for which <i class="arg">body</i> is currently executed. The result of
the loop command is the empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">LONGEST COMMON SUBSEQUENCE AND FILE COMPARISON</a></h2>
<p>The <b class="method">longestCommonSubsequence</b> subcommand forms the core of a
flexible system for doing differential comparisons of files, similar
to the capability offered by the Unix command <b class="syscmd"><a href="../../../../index.html#key563">diff</a></b>.
While this procedure is quite rapid for many tasks of file comparison,
its performance degrades severely if <i class="arg">sequence2</i> contains many
equal elements (as, for instance, when using this procedure to compare
two files, a quarter of whose lines are blank.  This drawback is
intrinsic to the algorithm used (see the Reference for details).</p>
<p>One approach to dealing with the performance problem that is sometimes
effective in practice is arbitrarily to exclude elements that appear
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: list</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#fisher_yates">Fisher-Yates</a>, <a href="../../../../index.html#assign">assign</a>, <a href="../../../../index.html#common">common</a>, <a href="../../../../index.html#comparison">comparison</a>, <a href="../../../../index.html#diff">diff</a>, <a href="../../../../index.html#differential">differential</a>, <a href="../../../../index.html#equal">equal</a>, <a href="../../../../index.html#equality">equality</a>, <a href="../../../../index.html#filter">filter</a>, <a href="../../../../index.html#first_permutation">first permutation</a>, <a href="../../../../index.html#flatten">flatten</a>, <a href="../../../../index.html#folding">folding</a>, <a href="../../../../index.html#full_outer_join">full outer join</a>, <a href="../../../../index.html#generate_permutations">generate permutations</a>, <a href="../../../../index.html#inner_join">inner join</a>, <a href="../../../../index.html#join">join</a>, <a href="../../../../index.html#left_outer_join">left outer join</a>, <a href="../../../../index.html#list">list</a>, <a href="../../../../index.html#longest_common_subsequence">longest common subsequence</a>, <a href="../../../../index.html#map">map</a>, <a href="../../../../index.html#next_permutation">next permutation</a>, <a href="../../../../index.html#outer_join">outer join</a>, <a href="../../../../index.html#permutation">permutation</a>, <a href="../../../../index.html#reduce">reduce</a>, <a href="../../../../index.html#repeating">repeating</a>, <a href="../../../../index.html#repetition">repetition</a>, <a href="../../../../index.html#reshuffle">reshuffle</a>, <a href="../../../../index.html#reverse">reverse</a>, <a href="../../../../index.html#right_outer_join">right outer join</a>, <a href="../../../../index.html#shuffle">shuffle</a>, <a href="../../../../index.html#subsequence">subsequence</a>, <a href="../../../../index.html#swapping">swapping</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2005 by Kevin B. Kenny. All rights reserved<br>
Copyright &copy; 2003-2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|









687
688
689
690
691
692
693






694
695
696
697
698
699
700
701
702
703
704
705
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: list</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key569">Fisher-Yates</a>, <a href="../../../../index.html#key571">assign</a>, <a href="../../../../index.html#key552">common</a>, <a href="../../../../index.html#key554">comparison</a>, <a href="../../../../index.html#key563">diff</a>, <a href="../../../../index.html#key557">differential</a>, <a href="../../../../index.html#key560">equal</a>, <a href="../../../../index.html#key573">equality</a>, <a href="../../../../index.html#key223">filter</a>, <a href="../../../../index.html#key561">first permutation</a>, <a href="../../../../index.html#key558">flatten</a>, <a href="../../../../index.html#key566">folding</a>, <a href="../../../../index.html#key564">full outer join</a>, <a href="../../../../index.html#key572">generate permutations</a>, <a href="../../../../index.html#key568">inner join</a>, <a href="../../../../index.html#key559">join</a>, <a href="../../../../index.html#key553">left outer join</a>, <a href="../../../../index.html#key302">list</a>, <a href="../../../../index.html#key551">longest common subsequence</a>, <a href="../../../../index.html#key201">map</a>, <a href="../../../../index.html#key576">next permutation</a>, <a href="../../../../index.html#key575">outer join</a>, <a href="../../../../index.html#key550">permutation</a>, <a href="../../../../index.html#key217">reduce</a>, <a href="../../../../index.html#key574">repeating</a>, <a href="../../../../index.html#key281">repetition</a>, <a href="../../../../index.html#key567">reshuffle</a>, <a href="../../../../index.html#key555">reverse</a>, <a href="../../../../index.html#key556">right outer join</a>, <a href="../../../../index.html#key570">shuffle</a>, <a href="../../../../index.html#key565">subsequence</a>, <a href="../../../../index.html#key562">swapping</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2003-2005 by Kevin B. Kenny. All rights reserved<br>
Copyright &copy; 2003-2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/struct/struct_map.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html><html><head>
<title>struct::map - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'struct_map.man' by tcllib/doctools with format 'html'
   -->
<!-- struct::map.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::map(n) 1 tcllib &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::map - Manage key/value maps</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">struct::map <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::struct::map</b> <i class="arg">mapName</i></a></li>
<li><a href="#2"><b class="cmd">mapName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">mapName</i> <b class="method">get</b></a></li>
<li><a href="#4"><i class="arg">mapName</i> <b class="method">names</b></a></li>
<li><a href="#5"><i class="arg">mapName</i> <b class="method">set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#6"><i class="arg">mapName</i> <b class="method">unset</b> <span class="opt">?<i class="arg">pattern</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Provides a snit class whose instances manage a key/value map.
In other words, an object wrapper around Tcl arrays.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<p>The main command provides construction of maps:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::struct::map</b> <i class="arg">mapName</i></a></dt>
<dd><p>Creates a new, empty map with an associated global Tcl command whose
name is <i class="arg">mapName</i>.
It may be used to invoke various operations on the map.
It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">mapName</b> <b class="method">method</b> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><b class="method">method</b> and <i class="arg">arg</i>uments determine the exact behavior of
the command.</p></dd>
</dl>
<p>If <i class="arg">mapName</i> is specified as <b class="const">%AUTO%</b> a unique name will be
generated by the package itself.
The result of the command is the fully-qualified name of the instance
command.</p></dd>
</dl>
<p>The following commands are possible for map objects:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">mapName</i> <b class="method">get</b></a></dt>
<dd><p>Returns the entire map as a Tcl dictionary.</p></dd>
<dt><a name="4"><i class="arg">mapName</i> <b class="method">names</b></a></dt>
<dd><p>Returns the list of all keys known to the map, in arbitrary order.</p></dd>
<dt><a name="5"><i class="arg">mapName</i> <b class="method">set</b> <i class="arg">name</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p>Sets key <i class="arg">name</i> to the specified <i class="arg">value</i>, if the value specified.
Returns the value for the key.
Throws an error if the key is not known.</p></dd>
<dt><a name="6"><i class="arg">mapName</i> <b class="method">unset</b> <span class="opt">?<i class="arg">pattern</i>...?</span></a></dt>
<dd><p>Removes all keys matching at least one of the glob <i class="arg">pattern</i>s from
the map.
If no pattern is specified all keys are removed.
In other words, the default pattern is <b class="const">*</b>.
The result of the command is the empty string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: list</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/struct/struct_set.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::set - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::set - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'struct_set.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- struct::set.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::set(n) 2.2.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::set - Procedures for manipulating sets</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'struct_set.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- struct::set.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::set(n) 2.2.3 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::set - Procedures for manipulating sets</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: set</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cardinality">cardinality</a>, <a href="../../../../index.html#difference">difference</a>, <a href="../../../../index.html#emptiness">emptiness</a>, <a href="../../../../index.html#exclusion">exclusion</a>, <a href="../../../../index.html#inclusion">inclusion</a>, <a href="../../../../index.html#intersection">intersection</a>, <a href="../../../../index.html#membership">membership</a>, <a href="../../../../index.html#set">set</a>, <a href="../../../../index.html#symmetric_difference">symmetric difference</a>, <a href="../../../../index.html#union">union</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








227
228
229
230
231
232
233






234
235
236
237
238
239
240
241
242
243
244
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: set</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key730">cardinality</a>, <a href="../../../../index.html#key733">difference</a>, <a href="../../../../index.html#key729">emptiness</a>, <a href="../../../../index.html#key731">exclusion</a>, <a href="../../../../index.html#key728">inclusion</a>, <a href="../../../../index.html#key732">intersection</a>, <a href="../../../../index.html#key727">membership</a>, <a href="../../../../index.html#key301">set</a>, <a href="../../../../index.html#key726">symmetric difference</a>, <a href="../../../../index.html#key624">union</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/struct_tree.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::tree - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::tree - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'struct_tree.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002-2004,2012 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- struct::tree.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::tree(n) 2.1.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::tree - Create and manipulate tree objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'struct_tree.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002-2004,2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- struct::tree.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::tree(n) 2.1.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::tree - Create and manipulate tree objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<li><p>Trees are accessed through an object command, whereas arrays are
accessed as variables. (This means trees cannot be local to a procedure.)</p></li>
<li><p>Trees have a hierarchical structure, whereas an array is just an
unordered collection.</p></li>
<li><p>Each node of a tree has a separate collection of attributes and
values. This is like an array where every value is a dictionary.</p></li>
</ol>
<p><em>Note:</em> The major version of the package <b class="package"><a href="../../../../index.html#struct">struct</a></b> has
been changed to version 2.0, due to backward incompatible changes in
the API of this module. Please read the section
<span class="sectref"><a href="#subsection3">Changes for 2.0</a></span> for a full list of all changes,
incompatible and otherwise.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Tree CLASS API</a></h3>







|







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<li><p>Trees are accessed through an object command, whereas arrays are
accessed as variables. (This means trees cannot be local to a procedure.)</p></li>
<li><p>Trees have a hierarchical structure, whereas an array is just an
unordered collection.</p></li>
<li><p>Each node of a tree has a separate collection of attributes and
values. This is like an array where every value is a dictionary.</p></li>
</ol>
<p><em>Note:</em> The major version of the package <b class="package"><a href="../../../../index.html#key327">struct</a></b> has
been changed to version 2.0, due to backward incompatible changes in
the API of this module. Please read the section
<span class="sectref"><a href="#subsection3">Changes for 2.0</a></span> for a full list of all changes,
incompatible and otherwise.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Tree CLASS API</a></h3>
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
<p>Please read the documentation for the methods <b class="method">serialize</b>,
<b class="method">deserialize</b>, <b class="method">=</b>, and <b class="method">--&gt;</b>, and the
documentation on the construction of tree objects.</p>
<p>Beyond the copying of whole tree objects these new API's also enable
the transfer of tree objects over arbitrary channels and for easy
persistence.</p></li>
<li><p>The walker API has been streamlined and made more similar to the
command <b class="cmd"><a href="../../../../index.html#foreach">foreach</a></b>. In detail:</p>
<ul class="doctools_itemized">
<li><p>The superfluous option <b class="option">-command</b> has been removed.</p></li>
<li><p>Ditto for the place holders. Instead of the placeholders two loop
variables have to be specified to contain node and action information.</p></li>
<li><p>The old command argument has been documented as a script now, which it
was in the past too.</p></li>
<li><p>The fact that <b class="const">enter</b> actions are called before the walker looks







|







640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
<p>Please read the documentation for the methods <b class="method">serialize</b>,
<b class="method">deserialize</b>, <b class="method">=</b>, and <b class="method">--&gt;</b>, and the
documentation on the construction of tree objects.</p>
<p>Beyond the copying of whole tree objects these new API's also enable
the transfer of tree objects over arbitrary channels and for easy
persistence.</p></li>
<li><p>The walker API has been streamlined and made more similar to the
command <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b>. In detail:</p>
<ul class="doctools_itemized">
<li><p>The superfluous option <b class="option">-command</b> has been removed.</p></li>
<li><p>Ditto for the place holders. Instead of the placeholders two loop
variables have to be specified to contain node and action information.</p></li>
<li><p>The old command argument has been documented as a script now, which it
was in the past too.</p></li>
<li><p>The fact that <b class="const">enter</b> actions are called before the walker looks
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: tree</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#breadth_first">breadth-first</a>, <a href="../../../../index.html#depth_first">depth-first</a>, <a href="../../../../index.html#in_order">in-order</a>, <a href="../../../../index.html#node">node</a>, <a href="../../../../index.html#post_order">post-order</a>, <a href="../../../../index.html#pre_order">pre-order</a>, <a href="../../../../index.html#serialization">serialization</a>, <a href="../../../../index.html#tree">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2004,2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








682
683
684
685
686
687
688






689
690
691
692
693
694
695
696
697
698
699
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: tree</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key702">breadth-first</a>, <a href="../../../../index.html#key700">depth-first</a>, <a href="../../../../index.html#key699">in-order</a>, <a href="../../../../index.html#key463">node</a>, <a href="../../../../index.html#key701">post-order</a>, <a href="../../../../index.html#key698">pre-order</a>, <a href="../../../../index.html#key109">serialization</a>, <a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002-2004,2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/struct/struct_tree1.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>struct::tree_v1 - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>struct::tree_v1 - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'struct_tree1.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2002 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- struct::tree_v1.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::tree_v1(n) 1.2.2 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::tree_v1 - Create and manipulate tree objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'struct_tree1.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- struct::tree_v1.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">struct::tree_v1(n) 1.2.2 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>struct::tree_v1 - Create and manipulate tree objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
any of its children. In-order walking means that a parent node is
visited after its first child and before the second. This is a
generalization of in-order walking for binary trees and will do the
right thing if a binary is walked. The combination of a breadth-first
walk with in-order is illegal.</p>
<p>As the walk progresses, the command <i class="arg">cmd</i> will be evaluated at
each node.  Percent substitution will be performed on <i class="arg">cmd</i> before
evaluation, just as in a <b class="cmd"><a href="../../../../index.html#bind">bind</a></b> script.  The following
substitutions are recognized:</p>
<dl class="doctools_definitions">
<dt><b class="const">%%</b></dt>
<dd><p>Insert the literal % character.</p></dd>
<dt><b class="const">%t</b></dt>
<dd><p>Name of the tree object.</p></dd>
<dt><b class="const">%n</b></dt>







|







310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
any of its children. In-order walking means that a parent node is
visited after its first child and before the second. This is a
generalization of in-order walking for binary trees and will do the
right thing if a binary is walked. The combination of a breadth-first
walk with in-order is illegal.</p>
<p>As the walk progresses, the command <i class="arg">cmd</i> will be evaluated at
each node.  Percent substitution will be performed on <i class="arg">cmd</i> before
evaluation, just as in a <b class="cmd"><a href="../../../../index.html#key714">bind</a></b> script.  The following
substitutions are recognized:</p>
<dl class="doctools_definitions">
<dt><b class="const">%%</b></dt>
<dd><p>Insert the literal % character.</p></dd>
<dt><b class="const">%t</b></dt>
<dd><p>Name of the tree object.</p></dd>
<dt><b class="const">%n</b></dt>
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: tree</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tree">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








337
338
339
340
341
342
343






344
345
346
347
348
349
350
351
352
353
354
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>struct :: tree</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key300">tree</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2002 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tar/tar.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tar - Tar file handling</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tar - Tar file handling</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tar.man' by tcllib/doctools with format 'html'
   -->
<!-- tar.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tar(n) 0.11 tcllib &quot;Tar file handling&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tar - Tar file creation, extraction &amp; manipulation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">tar <span class="opt">?0.11?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tar::contents</b> <i class="arg">tarball</i> <span class="opt">?<b class="option">-chan</b>?</span></a></li>
<li><a href="#2"><b class="cmd">::tar::stat</b> <i class="arg">tarball</i> <span class="opt">?file?</span> <span class="opt">?<b class="option">-chan</b>?</span></a></li>
<li><a href="#3"><b class="cmd">::tar::untar</b> <i class="arg">tarball</i> <i class="arg">args</i></a></li>
<li><a href="#4"><b class="cmd">::tar::get</b> <i class="arg">tarball</i> <i class="arg">fileName</i> <span class="opt">?<b class="option">-chan</b>?</span></a></li>
<li><a href="#5"><b class="cmd">::tar::create</b> <i class="arg">tarball</i> <i class="arg">files</i> <i class="arg">args</i></a></li>







|

|



|
|
|
|
|
|


|

















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tar.man' by tcllib/doctools with format 'html'
   -->
<! -- tar.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tar(n) 0.10 tcllib &quot;Tar file handling&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tar - Tar file creation, extraction &amp; manipulation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">tar <span class="opt">?0.10?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tar::contents</b> <i class="arg">tarball</i> <span class="opt">?<b class="option">-chan</b>?</span></a></li>
<li><a href="#2"><b class="cmd">::tar::stat</b> <i class="arg">tarball</i> <span class="opt">?file?</span> <span class="opt">?<b class="option">-chan</b>?</span></a></li>
<li><a href="#3"><b class="cmd">::tar::untar</b> <i class="arg">tarball</i> <i class="arg">args</i></a></li>
<li><a href="#4"><b class="cmd">::tar::get</b> <i class="arg">tarball</i> <i class="arg">fileName</i> <span class="opt">?<b class="option">-chan</b>?</span></a></li>
<li><a href="#5"><b class="cmd">::tar::create</b> <i class="arg">tarball</i> <i class="arg">files</i> <i class="arg">args</i></a></li>
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<pre class="doctools_example">
% foreach {file size} [::tar::untar tarball.tar -glob *.jpg] {
puts &quot;Extracted $file ($size bytes)&quot;
}
</pre>
</dd>
<dt><a name="4"><b class="cmd">::tar::get</b> <i class="arg">tarball</i> <i class="arg">fileName</i> <span class="opt">?<b class="option">-chan</b>?</span></a></dt>
<dd><p>Returns the contents of <i class="arg">fileName</i> from the <i class="arg">tarball</i>.</p>
<pre class="doctools_example">
% set readme [::tar::get tarball.tar doc/README] {
% puts $readme
}
</pre>
<p>If the option <b class="option">-chan</b> is present <i class="arg">tarball</i> is
interpreted as an open channel.  It is assumed that the channel was
opened for reading, and configured for binary input.  The command will
<em>not</em> close the channel.</p>
<p>An error is thrown when <i class="arg">fileName</i> is not found in the tar
archive.</p></dd>
<dt><a name="5"><b class="cmd">::tar::create</b> <i class="arg">tarball</i> <i class="arg">files</i> <i class="arg">args</i></a></dt>
<dd><p>Creates a new tar file containing the <i class="arg">files</i>. <i class="arg">files</i> must be specified
as a single argument which is a proper list of filenames.</p>
<dl class="doctools_options">
<dt><b class="option">-dereference</b></dt>
<dd><p>Normally <b class="cmd">create</b> will store links as an actual link pointing at a file that may
or may not exist in the archive. Specifying this option will cause the actual file point to







|





|
<
|
|
<
<







189
190
191
192
193
194
195
196
197
198
199
200
201
202

203
204


205
206
207
208
209
210
211
<pre class="doctools_example">
% foreach {file size} [::tar::untar tarball.tar -glob *.jpg] {
puts &quot;Extracted $file ($size bytes)&quot;
}
</pre>
</dd>
<dt><a name="4"><b class="cmd">::tar::get</b> <i class="arg">tarball</i> <i class="arg">fileName</i> <span class="opt">?<b class="option">-chan</b>?</span></a></dt>
<dd><p>Returns the contents of <i class="arg">fileName</i> from the <i class="arg">tarball</i></p>
<pre class="doctools_example">
% set readme [::tar::get tarball.tar doc/README] {
% puts $readme
}
</pre>
<p>If the option <b class="option">-chan</b> is present <i class="arg">tarball</i> is interpreted as an open channel.

It is assumed that the channel was opened for reading, and configured for binary input.
The command will <em>not</em> close the channel.</p></dd>


<dt><a name="5"><b class="cmd">::tar::create</b> <i class="arg">tarball</i> <i class="arg">files</i> <i class="arg">args</i></a></dt>
<dd><p>Creates a new tar file containing the <i class="arg">files</i>. <i class="arg">files</i> must be specified
as a single argument which is a proper list of filenames.</p>
<dl class="doctools_options">
<dt><b class="option">-dereference</b></dt>
<dd><p>Normally <b class="cmd">create</b> will store links as an actual link pointing at a file that may
or may not exist in the archive. Specifying this option will cause the actual file point to
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tar</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#archive">archive</a>, <a href="../../../../index.html#tape_archive">tape archive</a>, <a href="../../../../index.html#tar">tar</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





255
256
257
258
259
260
261






262
263
264
265
266
267
268
269
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tar</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key736">archive</a>, <a href="../../../../index.html#key735">tape archive</a>, <a href="../../../../index.html#key737">tar</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tepam/tepam_argument_dialogbox.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>tepam::argument_dialogbox - Tcl's Enhanced Procedure and Argument Manager</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>tepam::argument_dialogbox - Tcl's Enhanced Procedure and Argument Manager</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tepam_argument_dialogbox.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2013, Andreas Drollinger
   -->
<!-- tepam::argument_dialogbox.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam::argument_dialogbox(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam::argument_dialogbox - TEPAM argument_dialogbox, reference manual</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tepam_argument_dialogbox.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009-2013, Andreas Drollinger
   -->
<! -- tepam::argument_dialogbox.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam::argument_dialogbox(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam::argument_dialogbox - TEPAM argument_dialogbox, reference manual</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<pre class="doctools_example">set DialogResult [<b class="cmd">tepam::argument_dialogbox {</b>
   <b class="cmd">-title</b> &quot;Itinerary selection&quot;
   <b class="cmd">-file</b> {<i class="arg">-label &quot;Itinerary report&quot; -variable report_file</i>}
   ...
   <b class="cmd">-checkbutton</b> {<i class="arg">-label &quot;Don't use highways&quot; -variable no_highway</i>} <b class="cmd">}</b>]</pre>
</dd>
</dl>
<p>The commands <b class="cmd">argument_dialogbox</b> as well as <b class="cmd"><a href="../../../../index.html#procedure">procedure</a></b> are exported from the namespace <b class="namespace">tepam</b>. To use these commands without the <b class="namespace">tepam::</b> namespace prefix, it is sufficient to import them into the main namespace:</p>
<pre class="doctools_example"><b class="cmd">namespace import tepam::*</b>
set DialogResult [<b class="cmd">argument_dialogbox</b> \
   -title &quot;Itinerary selection&quot;
   ...</pre>
<p>The following subsections explain the different argument item types that are accepted by the <b class="cmd">argument_dialogbox</b>, classified into three groups. The first data entry item definition format will be used in the remaining document, knowing that this format can always be transformed into the second format by putting all arguments into a single list that is then provided to <b class="cmd">argument_dialogbox</b>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Context Definition Items</a></h3>
<p>The first item group allows specifying some context aspects of an argument dialog box. These items are taking a simple character string as item attribute:</p>







|







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<pre class="doctools_example">set DialogResult [<b class="cmd">tepam::argument_dialogbox {</b>
   <b class="cmd">-title</b> &quot;Itinerary selection&quot;
   <b class="cmd">-file</b> {<i class="arg">-label &quot;Itinerary report&quot; -variable report_file</i>}
   ...
   <b class="cmd">-checkbutton</b> {<i class="arg">-label &quot;Don't use highways&quot; -variable no_highway</i>} <b class="cmd">}</b>]</pre>
</dd>
</dl>
<p>The commands <b class="cmd">argument_dialogbox</b> as well as <b class="cmd"><a href="../../../../index.html#key41">procedure</a></b> are exported from the namespace <b class="namespace">tepam</b>. To use these commands without the <b class="namespace">tepam::</b> namespace prefix, it is sufficient to import them into the main namespace:</p>
<pre class="doctools_example"><b class="cmd">namespace import tepam::*</b>
set DialogResult [<b class="cmd">argument_dialogbox</b> \
   -title &quot;Itinerary selection&quot;
   ...</pre>
<p>The following subsections explain the different argument item types that are accepted by the <b class="cmd">argument_dialogbox</b>, classified into three groups. The first data entry item definition format will be used in the remaining document, knowing that this format can always be transformed into the second format by putting all arguments into a single list that is then provided to <b class="cmd">argument_dialogbox</b>.</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Context Definition Items</a></h3>
<p>The first item group allows specifying some context aspects of an argument dialog box. These items are taking a simple character string as item attribute:</p>
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
<p>To reuse the saved parameters not just in the actual application session but also in another one, it is sufficient to store the <b class="variable">last_parameter</b> array variable contents in a configuration file which is loaded the next time an application is launched.</p></dd>
</dl>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_introduction.html">tepam(n)</a>, <a href="tepam_procedure.html">tepam::procedure(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#data_entry_form">data entry form</a>, <a href="../../../../index.html#parameter_entry_form">parameter entry form</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Argument entry form, mega widget</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013, Andreas Drollinger</p>
</div>
</div></body></html>







|








596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
<p>To reuse the saved parameters not just in the actual application session but also in another one, it is sufficient to store the <b class="variable">last_parameter</b> array variable contents in a configuration file which is loaded the next time an application is launched.</p></dd>
</dl>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_introduction.html">tepam(n)</a>, <a href="tepam_procedure.html">tepam::procedure(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key403">data entry form</a>, <a href="../../../../index.html#key404">parameter entry form</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Argument entry form, mega widget</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013, Andreas Drollinger</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tepam/tepam_doc_gen.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>tepam::doc_gen - Tcl's Enhanced Procedure and Argument Manager</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>tepam::doc_gen - Tcl's Enhanced Procedure and Argument Manager</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tepam_doc_gen.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2013, Andreas Drollinger
   -->
<!-- tepam::doc_gen.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam::doc_gen(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam::doc_gen - TEPAM DOC Generation, reference manual</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tepam_doc_gen.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2013, Andreas Drollinger
   -->
<! -- tepam::doc_gen.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam::doc_gen(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam::doc_gen - TEPAM DOC Generation, reference manual</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package generates documentations of TEPAM procedures (procedures that have been declared with <b class="cmd"><a href="tepam_procedure.html">tepam::procedure</a></b>). The documents are generated in the classic UNIX document style using the following document sections: Name, Synopsis, Description, Arguments and Example. <b class="package">TEPAM Doc Gen</b> provides support for various document formats. Support for additional formats can be added if necessary.</p>
<p>The <b class="package">TEPAM Doc Gen</b> package provides the following commands:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">tepam::doc_gen::generate</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-style <i class="arg">style</i>?</span> <span class="opt">?-header_footer?</span> <span class="opt">?-dest_file <i class="arg">dest_file</i>?</span> <i class="arg">name</i></a></dt>
<dd><p>This command generates the documentation for a specified procedure (<i class="arg">name</i>) in one of the supported formats (TXT, HTML, POD (Perl Doc), DT (TclLib DocTool), or in a custom specific format. The format is specified via <span class="opt">?format?</span>. The flag <span class="opt">?-header_footer?</span> adds to the documentation file header and footer. If <span class="opt">?dest_file?</span> is specified the documentation is stored in a file (the file header and footer are added automatically in this case) and the file name is returned. Otherwise the documentation string is returned by <b class="cmd">generate</b>.</p></dd>
<dt><a name="2"><b class="cmd">tepam::doc_gen::patch</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-style <i class="arg">style</i>?</span> <span class="opt">?-search_pattern <i class="arg">search_pattern</i>?</span> <span class="opt">?-src_string <i class="arg">src_string</i> | -src_file <i class="arg">src_file</i>?</span> <span class="opt">?-dest_file <i class="arg">dest_file</i>?</span> <span class="opt">?name?</span></a></dt>
<dd><p>This command inserts procedure documentations into an existing master document at the locations indicated by insertion placeholders which are matching the pattern of <span class="opt">?search_pattern?</span>. The existing master document is either provided as data to the argument (<span class="opt">?src_string?</span>) or via a file (<span class="opt">?src_file?</span>). The final document is returned by <b class="cmd"><a href="../../../../index.html#patch">patch</a></b> if no destination file is defined (<span class="opt">?dest_file?</span>). Otherwise, the document is stored in the specified file, and the number of insertion placeholders that could be handled successfully is returned.</p>
<p>Any insertion placeholders of the master document are handled by default. By defining the argument <span class="opt">?name?</span> the documentation insertion will be restricted to a particular procedure.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">ARGUMENTS</a></h2>
<dl class="doctools_definitions">
<dt><span class="opt">?-format <i class="arg">format</i>?</span></dt>
<dd><p>Specifies the documentation format. <b class="package">TEPAM Doc Gen</b> provides support for the following formats:</p>
<ul class="doctools_itemized">
<li><p>TXT - Text format (default)</p></li>
<li><p>HTML</p></li>
<li><p>POD - Perl Plain Old Documentation format (PerlPOD)</p></li>
<li><p>DT - TclLib DocTool format</p></li>
</ul>
<p>Section <span class="sectref"><a href="#section4">ADDING SUPPORT FOR NEW DOCUMENT FORMATS</a></span> shows how support for additional formats can be added.</p></dd>
<dt><span class="opt">?-style <i class="arg">style</i>?</span></dt>
<dd><p>The documentation is by default generated in Tcl style (e.g. <b class="cmd">command arg1 arg2 ...</b>). C-style documentation can be generated by setting this argument to 'C' (e.g. <b class="cmd">command(arg1,arg2,...)</b>).</p></dd>
<dt><span class="opt">?-dest_file <i class="arg">dest_file</i>?</span></dt>
<dd><p>If <span class="opt">?dest_file?</span> is defined the documentation is written into the specified destination file. Otherwise the documentation string is returned by the commands <b class="cmd">generate</b> and <b class="cmd"><a href="../../../../index.html#patch">patch</a></b>.</p></dd>
<dt><i class="arg">name</i> / <span class="opt">?name?</span></dt>
<dd><p>This is the name of the procedure for which the documentation has to be generated. This is a mandatory argument for <b class="cmd">generate</b>, but an optional argument for <b class="cmd"><a href="../../../../index.html#patch">patch</a></b>.</p></dd>
<dt><span class="opt">?-header_footer?</span></dt>
<dd><p><b class="cmd">Generate</b> adds to the generated procedure documentation the file header and footer only if a file is generated. By selecting the flag <span class="opt">?-header_footer?</span> the header and footer are also generated if the documentation is returned as string by <b class="cmd">generate</b>.</p></dd>
<dt><span class="opt">?-src_string <i class="arg">src_string</i> | -src_file <i class="arg">src_file</i>?</span></dt>
<dd><p><b class="cmd"><a href="../../../../index.html#patch">Patch</a></b> inserts procedure documentations into an existing document that is either provided as string to the argument (<span class="opt">?src_string?</span>) or as a file (<span class="opt">?src_file?</span>). One of these two arguments need to be specified.</p></dd>
<dt><span class="opt">?-search_pattern <i class="arg">search_pattern</i>?</span></dt>
<dd><p>The argument <span class="opt">?search_pattern?</span> defines the documentation insertion placeholder used in a document. It is a regular expression accepted by <b class="cmd">regexp</b> and needs to contain a parenthesized sub-expression that contains the procedure name for which the documentation needs to be inserted.</p>
<p>The default insertion placeholder pattern is <em>\{!(.*?)!\}</em>, which means that the procedure name will be embedded between <em>{!</em> and <em>!}</em>. The section <span class="sectref"><a href="#section5">EXAMPLES</a></span> contains a custom insertion placeholder pattern example.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PREDEFINED DOCUMENT FORMATS</a></h2>
<p><b class="package">TEPAM Doc Gen</b> pre-defines the following document formats:</p>







|

















|

|



|







154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package generates documentations of TEPAM procedures (procedures that have been declared with <b class="cmd"><a href="tepam_procedure.html">tepam::procedure</a></b>). The documents are generated in the classic UNIX document style using the following document sections: Name, Synopsis, Description, Arguments and Example. <b class="package">TEPAM Doc Gen</b> provides support for various document formats. Support for additional formats can be added if necessary.</p>
<p>The <b class="package">TEPAM Doc Gen</b> package provides the following commands:</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">tepam::doc_gen::generate</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-style <i class="arg">style</i>?</span> <span class="opt">?-header_footer?</span> <span class="opt">?-dest_file <i class="arg">dest_file</i>?</span> <i class="arg">name</i></a></dt>
<dd><p>This command generates the documentation for a specified procedure (<i class="arg">name</i>) in one of the supported formats (TXT, HTML, POD (Perl Doc), DT (TclLib DocTool), or in a custom specific format. The format is specified via <span class="opt">?format?</span>. The flag <span class="opt">?-header_footer?</span> adds to the documentation file header and footer. If <span class="opt">?dest_file?</span> is specified the documentation is stored in a file (the file header and footer are added automatically in this case) and the file name is returned. Otherwise the documentation string is returned by <b class="cmd">generate</b>.</p></dd>
<dt><a name="2"><b class="cmd">tepam::doc_gen::patch</b> <span class="opt">?-format <i class="arg">format</i>?</span> <span class="opt">?-style <i class="arg">style</i>?</span> <span class="opt">?-search_pattern <i class="arg">search_pattern</i>?</span> <span class="opt">?-src_string <i class="arg">src_string</i> | -src_file <i class="arg">src_file</i>?</span> <span class="opt">?-dest_file <i class="arg">dest_file</i>?</span> <span class="opt">?name?</span></a></dt>
<dd><p>This command inserts procedure documentations into an existing master document at the locations indicated by insertion placeholders which are matching the pattern of <span class="opt">?search_pattern?</span>. The existing master document is either provided as data to the argument (<span class="opt">?src_string?</span>) or via a file (<span class="opt">?src_file?</span>). The final document is returned by <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> if no destination file is defined (<span class="opt">?dest_file?</span>). Otherwise, the document is stored in the specified file, and the number of insertion placeholders that could be handled successfully is returned.</p>
<p>Any insertion placeholders of the master document are handled by default. By defining the argument <span class="opt">?name?</span> the documentation insertion will be restricted to a particular procedure.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">ARGUMENTS</a></h2>
<dl class="doctools_definitions">
<dt><span class="opt">?-format <i class="arg">format</i>?</span></dt>
<dd><p>Specifies the documentation format. <b class="package">TEPAM Doc Gen</b> provides support for the following formats:</p>
<ul class="doctools_itemized">
<li><p>TXT - Text format (default)</p></li>
<li><p>HTML</p></li>
<li><p>POD - Perl Plain Old Documentation format (PerlPOD)</p></li>
<li><p>DT - TclLib DocTool format</p></li>
</ul>
<p>Section <span class="sectref"><a href="#section4">ADDING SUPPORT FOR NEW DOCUMENT FORMATS</a></span> shows how support for additional formats can be added.</p></dd>
<dt><span class="opt">?-style <i class="arg">style</i>?</span></dt>
<dd><p>The documentation is by default generated in Tcl style (e.g. <b class="cmd">command arg1 arg2 ...</b>). C-style documentation can be generated by setting this argument to 'C' (e.g. <b class="cmd">command(arg1,arg2,...)</b>).</p></dd>
<dt><span class="opt">?-dest_file <i class="arg">dest_file</i>?</span></dt>
<dd><p>If <span class="opt">?dest_file?</span> is defined the documentation is written into the specified destination file. Otherwise the documentation string is returned by the commands <b class="cmd">generate</b> and <b class="cmd"><a href="../../../../index.html#key662">patch</a></b>.</p></dd>
<dt><i class="arg">name</i> / <span class="opt">?name?</span></dt>
<dd><p>This is the name of the procedure for which the documentation has to be generated. This is a mandatory argument for <b class="cmd">generate</b>, but an optional argument for <b class="cmd"><a href="../../../../index.html#key662">patch</a></b>.</p></dd>
<dt><span class="opt">?-header_footer?</span></dt>
<dd><p><b class="cmd">Generate</b> adds to the generated procedure documentation the file header and footer only if a file is generated. By selecting the flag <span class="opt">?-header_footer?</span> the header and footer are also generated if the documentation is returned as string by <b class="cmd">generate</b>.</p></dd>
<dt><span class="opt">?-src_string <i class="arg">src_string</i> | -src_file <i class="arg">src_file</i>?</span></dt>
<dd><p><b class="cmd"><a href="../../../../index.html#key662">Patch</a></b> inserts procedure documentations into an existing document that is either provided as string to the argument (<span class="opt">?src_string?</span>) or as a file (<span class="opt">?src_file?</span>). One of these two arguments need to be specified.</p></dd>
<dt><span class="opt">?-search_pattern <i class="arg">search_pattern</i>?</span></dt>
<dd><p>The argument <span class="opt">?search_pattern?</span> defines the documentation insertion placeholder used in a document. It is a regular expression accepted by <b class="cmd">regexp</b> and needs to contain a parenthesized sub-expression that contains the procedure name for which the documentation needs to be inserted.</p>
<p>The default insertion placeholder pattern is <em>\{!(.*?)!\}</em>, which means that the procedure name will be embedded between <em>{!</em> and <em>!}</em>. The section <span class="sectref"><a href="#section5">EXAMPLES</a></span> contains a custom insertion placeholder pattern example.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PREDEFINED DOCUMENT FORMATS</a></h2>
<p><b class="package">TEPAM Doc Gen</b> pre-defines the following document formats:</p>
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
<dd><p>Generates the part of the command line or the synopsis that is specific to an argument. The generated string has to indicate if an argument is optional, named and if it is a flag.</p>
<p>The following parameters are provided to this procedure:</p>
<dl class="doctools_definitions">
   
<dt><i class="arg">Name</i></dt>
<dd><p>Name of the argument</p></dd>
<dt><i class="arg">IsOptional</i></dt>
<dd><p>If true (=<b class="const">1</b>) the argument is optional which should be indicated by the generated string (for example by putting the argument into brackets {[]} or into question marks '?'):</p>
<pre class="doctools_example">gen(TXT,ArgumentString) mtype 1 0 string -&gt; <em>&quot;[mtype]&quot;</em></pre>
</dd>
<dt><i class="arg">IsNamed</i></dt>
<dd><p>If true (=<b class="const">1</b>) an argument is a named argument (option). The generated string should in this case contain the argument/option name, followed by the argument itself:</p>
<pre class="doctools_example">gen(TXT,ArgumentString) mtype 0 1 string -&gt; <em>&quot;-mtype &lt;mtype&gt;&quot;</em></pre>
<p>Named arguments can also be optional:</p>
<pre class="doctools_example">gen(TXT,ArgumentString) mtype 1 1 string -&gt; <em>&quot;[-mtype &lt;mtype&gt;]&quot;</em></pre>







|







324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
<dd><p>Generates the part of the command line or the synopsis that is specific to an argument. The generated string has to indicate if an argument is optional, named and if it is a flag.</p>
<p>The following parameters are provided to this procedure:</p>
<dl class="doctools_definitions">
   
<dt><i class="arg">Name</i></dt>
<dd><p>Name of the argument</p></dd>
<dt><i class="arg">IsOptional</i></dt>
<dd><p>If true (=<b class="const">1</b>) the argument is optional which should be indicated by the generated string (for example by putting the argument into brackets {} or into question marks '?'):</p>
<pre class="doctools_example">gen(TXT,ArgumentString) mtype 1 0 string -&gt; <em>&quot;[mtype]&quot;</em></pre>
</dd>
<dt><i class="arg">IsNamed</i></dt>
<dd><p>If true (=<b class="const">1</b>) an argument is a named argument (option). The generated string should in this case contain the argument/option name, followed by the argument itself:</p>
<pre class="doctools_example">gen(TXT,ArgumentString) mtype 0 1 string -&gt; <em>&quot;-mtype &lt;mtype&gt;&quot;</em></pre>
<p>Named arguments can also be optional:</p>
<pre class="doctools_example">gen(TXT,ArgumentString) mtype 1 1 string -&gt; <em>&quot;[-mtype &lt;mtype&gt;]&quot;</em></pre>
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<em># Open the HTML file, and write the HTML formatted documentation</em>
set fHtml [open doc_gen.dt.html w]
puts $fHtml [myDoc format $dt]
close $fHtml
</pre>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">tepam::doc_gen::patch</a></h3>
<p>While <b class="cmd">generate</b> provides a limited number of possibilities to vary the document structure, <b class="cmd"><a href="../../../../index.html#patch">patch</a></b> offers more flexibility. Multiple documentations for different procedures and meta information can for example be added.</p>
<p>The following listing shows how the <b class="cmd"><a href="../../../../index.html#patch">patch</a></b> command works. It defines first a HTML master document string that contains 2 procedure documentation placeholders (<em>{*&lt;ProcedureName&gt;*}</em>). There placeholders are replaced by <b class="cmd"><a href="../../../../index.html#patch">patch</a></b> with the generated documentation of the referred procedures. Since nonstandard placeholders are used, <b class="cmd"><a href="../../../../index.html#patch">patch</a></b> is called with an explicit placeholder pattern definition (argument <i class="arg">search_pattern</i>).</p>
<pre class="doctools_example">
<em># Define the HTML master document</em>
set HtmlMasterDoc {\
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;tepam::doc_gen&lt;/title&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;tepam_doc_stylesheet.css&quot;&gt;







|
|







367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<em># Open the HTML file, and write the HTML formatted documentation</em>
set fHtml [open doc_gen.dt.html w]
puts $fHtml [myDoc format $dt]
close $fHtml
</pre>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">tepam::doc_gen::patch</a></h3>
<p>While <b class="cmd">generate</b> provides a limited number of possibilities to vary the document structure, <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> offers more flexibility. Multiple documentations for different procedures and meta information can for example be added.</p>
<p>The following listing shows how the <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> command works. It defines first a HTML master document string that contains 2 procedure documentation placeholders (<em>{*&lt;ProcedureName&gt;*}</em>). There placeholders are replaced by <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> with the generated documentation of the referred procedures. Since nonstandard placeholders are used, <b class="cmd"><a href="../../../../index.html#key662">patch</a></b> is called with an explicit placeholder pattern definition (argument <i class="arg">search_pattern</i>).</p>
<pre class="doctools_example">
<em># Define the HTML master document</em>
set HtmlMasterDoc {\
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;tepam::doc_gen&lt;/title&gt;
    &lt;link rel=&quot;stylesheet&quot; href=&quot;tepam_doc_stylesheet.css&quot;&gt;
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
</pre>
</div>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_introduction.html">tepam(n)</a>, <a href="tepam_procedure.html">tepam::procedure(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#automatic_documentation">automatic documentation</a>, <a href="../../../../index.html#documentation">documentation</a>, <a href="../../../../index.html#procedure_documentation">procedure documentation</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2013, Andreas Drollinger</p>
</div>
</div></body></html>







|








399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
</pre>
</div>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_introduction.html">tepam(n)</a>, <a href="tepam_procedure.html">tepam::procedure(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key831">automatic documentation</a>, <a href="../../../../index.html#key185">documentation</a>, <a href="../../../../index.html#key832">procedure documentation</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2013, Andreas Drollinger</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tepam/tepam_introduction.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>tepam - Tcl's Enhanced Procedure and Argument Manager</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>tepam - Tcl's Enhanced Procedure and Argument Manager</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tepam_introduction.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2013, Andreas Drollinger
   -->
<!-- tepam.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam - An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tepam_introduction.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009-2013, Andreas Drollinger
   -->
<! -- tepam.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam - An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<li><p>Automatic help and usage text generation if a procedure is called with the <i class="arg">-help</i> flag.</p></li>
<li><p>Automatic generation of an interactive argument definition form, in case a procedure is called with the <i class="arg">-interactive</i> flag.</p></li>
<li><p>Procedure calls can be logged which is useful to get for interactively called procedures the command call lines.</p></li>
<li><p>Powerful and code efficient generation of complex parameter definition forms.</p></li>
</ul>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROCEDURE DECLARATION</a></h2>
<p>TEPAM's procedure declaration syntax is simple and self-explaining. Instead of declaring a procedure with the Tcl key word <b class="cmd"><a href="../../../../index.html#proc">proc</a></b>, a procedure is declared with the TEPAM command <b class="cmd"><a href="../../../../index.html#procedure">procedure</a></b> which takes as <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> also 3 arguments: The procedure name, the procedure header and the procedure body.</p>
<p>The following example declares the subcommand <b class="cmd"><a href="../../../../index.html#message">message</a></b> of the procedure <b class="cmd">display</b>. This command has several named and unnamed arguments:</p>
<pre class="doctools_example"><b class="cmd"><a href="tepam_procedure.html">tepam::procedure</a></b> {display message} {
   -return            -
   -short_description &quot;Displays a simple message box&quot;
   -description       &quot;This procedure allows displaying a configurable message box.&quot;
   -args {
      {-mtype -default Warning -choices {Info Warning Error} -description &quot;Message type&quot;}
      {-font -type font -default {Arial 10 italic} -description &quot;Message text font&quot;}







|
|







147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<li><p>Automatic help and usage text generation if a procedure is called with the <i class="arg">-help</i> flag.</p></li>
<li><p>Automatic generation of an interactive argument definition form, in case a procedure is called with the <i class="arg">-interactive</i> flag.</p></li>
<li><p>Procedure calls can be logged which is useful to get for interactively called procedures the command call lines.</p></li>
<li><p>Powerful and code efficient generation of complex parameter definition forms.</p></li>
</ul>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">PROCEDURE DECLARATION</a></h2>
<p>TEPAM's procedure declaration syntax is simple and self-explaining. Instead of declaring a procedure with the Tcl key word <b class="cmd"><a href="../../../../index.html#key592">proc</a></b>, a procedure is declared with the TEPAM command <b class="cmd"><a href="../../../../index.html#key41">procedure</a></b> which takes as <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> also 3 arguments: The procedure name, the procedure header and the procedure body.</p>
<p>The following example declares the subcommand <b class="cmd"><a href="../../../../index.html#key361">message</a></b> of the procedure <b class="cmd">display</b>. This command has several named and unnamed arguments:</p>
<pre class="doctools_example"><b class="cmd"><a href="tepam_procedure.html">tepam::procedure</a></b> {display message} {
   -return            -
   -short_description &quot;Displays a simple message box&quot;
   -description       &quot;This procedure allows displaying a configurable message box.&quot;
   -args {
      {-mtype -default Warning -choices {Info Warning Error} -description &quot;Message type&quot;}
      {-font -type font -default {Arial 10 italic} -description &quot;Message text font&quot;}
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
   foreach var {mtype font level fg bg no_border log_file text} {
      if {[info exists $var]} {
         puts  &quot;  $var=[set $var]&quot;
      }
   }
</em>}</pre>
<p>A call of procedure that has been declared in this way will first invoke the TEPAM argument manager, before the procedure body is executed. The argument manager parses the provided arguments, validates them, completes them eventually with some default values, and makes them finally available to the procedure body as local variables. In case an argument is missing or has a wrong type, the argument manager generates an error message that explains the reason for the error.</p>
<p>As the example above shows, the TEPAM command <b class="cmd"><a href="../../../../index.html#procedure">procedure</a></b> accepts subcommand definitions as procedure name and allows defining much more information than just the argument list inside the procedure header. The procedure body on the other hand is identical between a command declared with <b class="cmd"><a href="../../../../index.html#proc">proc</a></b> and a command declared with <b class="cmd"><a href="../../../../index.html#procedure">procedure</a></b>.</p>
<p>The procedure header allows defining in addition to the arguments some procedure attributes, like a description, information concerning the return value, etc. This information is basically used for the automatic generation of comprehensive help and usage texts.</p>
<p>A list of argument definition statements assigned to the <i class="arg">-args</i> argument is defining the procedure arguments. Each argument definition statement starts with the argument name, optionally followed by some argument attributes.</p>
<p>Three types of arguments can be defined: Unnamed arguments, named arguments and flags. The distinction between the named and unnamed arguments is made by the first argument name character which is simply &quot;-&quot; for named arguments. A flag is defined as named argument that has the type  <em>none</em>.</p>
<p>Named and unnamed arguments are mandatory, unless they are declared with the <i class="arg">-optional</i> flag and unless they have a default value specified with the <i class="arg">-default</i> option. Named arguments and the last unnamed argument can have the attribute <i class="arg">-multiple</i>, which means that they can be defined multiple times. The expected argument data type is specified with the <i class="arg">-type</i> option. TEPAM defines a large set of standard data types which can easily be completed with application specific data types.</p>
<p>The argument declaration order has only an importance for unnamed arguments that are by default parsed after the named arguments (Tcl style). A variable allows changing this behavior in a way that unnamed arguments are parsed first, before the named arguments (Tk style).</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PROCEDURE HELP</a></h2>







|







172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
   foreach var {mtype font level fg bg no_border log_file text} {
      if {[info exists $var]} {
         puts  &quot;  $var=[set $var]&quot;
      }
   }
</em>}</pre>
<p>A call of procedure that has been declared in this way will first invoke the TEPAM argument manager, before the procedure body is executed. The argument manager parses the provided arguments, validates them, completes them eventually with some default values, and makes them finally available to the procedure body as local variables. In case an argument is missing or has a wrong type, the argument manager generates an error message that explains the reason for the error.</p>
<p>As the example above shows, the TEPAM command <b class="cmd"><a href="../../../../index.html#key41">procedure</a></b> accepts subcommand definitions as procedure name and allows defining much more information than just the argument list inside the procedure header. The procedure body on the other hand is identical between a command declared with <b class="cmd"><a href="../../../../index.html#key592">proc</a></b> and a command declared with <b class="cmd"><a href="../../../../index.html#key41">procedure</a></b>.</p>
<p>The procedure header allows defining in addition to the arguments some procedure attributes, like a description, information concerning the return value, etc. This information is basically used for the automatic generation of comprehensive help and usage texts.</p>
<p>A list of argument definition statements assigned to the <i class="arg">-args</i> argument is defining the procedure arguments. Each argument definition statement starts with the argument name, optionally followed by some argument attributes.</p>
<p>Three types of arguments can be defined: Unnamed arguments, named arguments and flags. The distinction between the named and unnamed arguments is made by the first argument name character which is simply &quot;-&quot; for named arguments. A flag is defined as named argument that has the type  <em>none</em>.</p>
<p>Named and unnamed arguments are mandatory, unless they are declared with the <i class="arg">-optional</i> flag and unless they have a default value specified with the <i class="arg">-default</i> option. Named arguments and the last unnamed argument can have the attribute <i class="arg">-multiple</i>, which means that they can be defined multiple times. The expected argument data type is specified with the <i class="arg">-type</i> option. TEPAM defines a large set of standard data types which can easily be completed with application specific data types.</p>
<p>The argument declaration order has only an importance for unnamed arguments that are by default parsed after the named arguments (Tcl style). A variable allows changing this behavior in a way that unnamed arguments are parsed first, before the named arguments (Tk style).</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">PROCEDURE HELP</a></h2>
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
   Color: 'red'
   Font: 'Courier 12 italic'</em></pre>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_argument_dialogbox.html">tepam::argument_dialogbox(n)</a>, <a href="tepam_procedure.html">tepam::procedure(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#argument_integrity">argument integrity</a>, <a href="../../../../index.html#argument_validation">argument validation</a>, <a href="../../../../index.html#arguments">arguments</a>, <a href="../../../../index.html#entry_mask">entry mask</a>, <a href="../../../../index.html#parameter_entry_form">parameter entry form</a>, <a href="../../../../index.html#procedure">procedure</a>, <a href="../../../../index.html#subcommand">subcommand</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Procedures, arguments, parameters, options</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013, Andreas Drollinger</p>
</div>
</div></body></html>







|








346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
   Color: 'red'
   Font: 'Courier 12 italic'</em></pre>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_argument_dialogbox.html">tepam::argument_dialogbox(n)</a>, <a href="tepam_procedure.html">tepam::procedure(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key764">argument integrity</a>, <a href="../../../../index.html#key765">argument validation</a>, <a href="../../../../index.html#key763">arguments</a>, <a href="../../../../index.html#key766">entry mask</a>, <a href="../../../../index.html#key404">parameter entry form</a>, <a href="../../../../index.html#key41">procedure</a>, <a href="../../../../index.html#key762">subcommand</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Procedures, arguments, parameters, options</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013, Andreas Drollinger</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tepam/tepam_procedure.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>tepam::procedure - Tcl's Enhanced Procedure and Argument Manager</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>tepam::procedure - Tcl's Enhanced Procedure and Argument Manager</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tepam_procedure.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2013, Andreas Drollinger
   -->
<!-- tepam::procedure.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam::procedure(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam::procedure - TEPAM procedure, reference manual</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tepam_procedure.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009-2013, Andreas Drollinger
   -->
<! -- tepam::procedure.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tepam::procedure(n) 0.5.0 tcllib &quot;Tcl's Enhanced Procedure and Argument Manager&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tepam::procedure - TEPAM procedure, reference manual</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
   }
} {
   puts &quot;Message type: <b class="variable">$mtype</b>&quot;
   puts &quot;Message: <b class="variable">$text</b>&quot;
}</pre>
</dd>
</dl>
<p>The commands <b class="cmd"><a href="../../../../index.html#procedure">procedure</a></b> as well as <b class="cmd">argument_dialogbox</b> are exported from the namespace <b class="namespace">tepam</b>. To use these commands without the <b class="namespace">tepam::</b> namespace prefix, it is sufficient to import them into the main namespace:</p>
<pre class="doctools_example"><b class="cmd">namespace import tepam::*</b>
<b class="cmd"><a href="../../../../index.html#procedure">procedure</a></b> {display_message} {
   -args {
      ...</pre>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Procedure Attributes</a></h3>
<p>The first group of attributes affect the behavior of the declared procedure:</p>
<dl class="doctools_definitions">
<dt>-named_arguments_first <b class="const">0</b>|<b class="const">1</b></dt>
<dd><p>This attribute defines the calling style of a procedure. TEPAM uses by default the <em>named arguments first, unnamed arguments later</em> style (Tcl). This default behavior can globally be changed by setting the variable <b class="variable">tepam::named_arguments_first</b> to <b class="const">0</b>. This global calling style can be changed individually for a procedure with the <i class="arg">-named_arguments_first</i> attribute.</p></dd>







|

|







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
   }
} {
   puts &quot;Message type: <b class="variable">$mtype</b>&quot;
   puts &quot;Message: <b class="variable">$text</b>&quot;
}</pre>
</dd>
</dl>
<p>The commands <b class="cmd"><a href="../../../../index.html#key41">procedure</a></b> as well as <b class="cmd">argument_dialogbox</b> are exported from the namespace <b class="namespace">tepam</b>. To use these commands without the <b class="namespace">tepam::</b> namespace prefix, it is sufficient to import them into the main namespace:</p>
<pre class="doctools_example"><b class="cmd">namespace import tepam::*</b>
<b class="cmd"><a href="../../../../index.html#key41">procedure</a></b> {display_message} {
   -args {
      ...</pre>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Procedure Attributes</a></h3>
<p>The first group of attributes affect the behavior of the declared procedure:</p>
<dl class="doctools_definitions">
<dt>-named_arguments_first <b class="const">0</b>|<b class="const">1</b></dt>
<dd><p>This attribute defines the calling style of a procedure. TEPAM uses by default the <em>named arguments first, unnamed arguments later</em> style (Tcl). This default behavior can globally be changed by setting the variable <b class="variable">tepam::named_arguments_first</b> to <b class="const">0</b>. This global calling style can be changed individually for a procedure with the <i class="arg">-named_arguments_first</i> attribute.</p></dd>
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<dt>Argument name (<em>&lt;argument_name_&lt;n&gt;&gt;</em>)</dt>
<dd><p>The provided argument name specifies whether the argument is an <em>unnamed argument</em> or a <em>named argument</em>. In addition to this, an argument name can also be blank to indicate an argument comment, or it can start with # to indicate a section comment.</p>
<dl class="doctools_definitions">
<dt><i class="arg">&quot;&lt;Name&gt;&quot;</i></dt>
<dd><p>This is the simplest form of an argument name: An argument whose name is not starting with '-' is an <em>unnamed argument</em>. The parameter provided during a procedure call will be assigned to a variable with the name <em>&lt;Name&gt;</em>.</p>
<pre class="doctools_example">tepam::procedure {print_string} {
   -args {
      {<b class="cmd"><a href="../../../../index.html#text">text</a></b> -type string -description &quot;This is an unnamed argument&quot;}
   }
} {
   puts <b class="cmd">$text</b>
}
print_string <b class="cmd">&quot;Hello&quot;</b>
<em> -&gt; Hello</em></pre>
</dd>







|







351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<dt>Argument name (<em>&lt;argument_name_&lt;n&gt;&gt;</em>)</dt>
<dd><p>The provided argument name specifies whether the argument is an <em>unnamed argument</em> or a <em>named argument</em>. In addition to this, an argument name can also be blank to indicate an argument comment, or it can start with # to indicate a section comment.</p>
<dl class="doctools_definitions">
<dt><i class="arg">&quot;&lt;Name&gt;&quot;</i></dt>
<dd><p>This is the simplest form of an argument name: An argument whose name is not starting with '-' is an <em>unnamed argument</em>. The parameter provided during a procedure call will be assigned to a variable with the name <em>&lt;Name&gt;</em>.</p>
<pre class="doctools_example">tepam::procedure {print_string} {
   -args {
      {<b class="cmd"><a href="../../../../index.html#key248">text</a></b> -type string -description &quot;This is an unnamed argument&quot;}
   }
} {
   puts <b class="cmd">$text</b>
}
print_string <b class="cmd">&quot;Hello&quot;</b>
<em> -&gt; Hello</em></pre>
</dd>
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
<p>Named arguments can be defined multiple times. If the named argument has the <em>-multiply</em> attribute, all argument values will be collected in a list. Otherwise, only the last provided attribute value will be retained:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1 -n2 N2 -n1 M1 U1 U2</b>
<em>-&gt; n1:'M1', n2:'N2', u1:'U1', u2:'U2'</em></pre>
<p>The name of the first unnamed argument has therefore not to start with the '-' character. The unnamed argument is otherwise considered as name of another named argument. This is especially important if the first unnamed argument is given by a variable that can contain any character strings:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1 -n2 N2 &quot;-&gt;&quot; &quot;&lt;-&quot;</b>
<em>-&gt; my_proc: Argument '-&gt;' not known</em>
set U1 &quot;-&gt;&quot;
my_proc <b class="cmd">-n1 N1 -n2 N2 $U1 U2</b>
my_proc: Argument '-&gt;' not known</pre>
<p>The '--' flag allows separating unambiguously the unnamed arguments from the named arguments. All data after the '--' flag will be considered as unnamed argument:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1 -n2 N2 -- &quot;-&gt;&quot; &quot;&lt;-&quot;</b>
<em>-&gt; n1:'N1', n2:'N2', u1:'-&gt;', u2:'&lt;-'</em>
set U1 &quot;-&gt;&quot;
my_proc <b class="cmd">-n1 N1 -n2 N2 -- $U1 U2</b>
<em>-&gt; n1:'N1', n2:'N2', u1:'-&gt;', u2:'&lt;-'</em></pre>







|







715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
<p>Named arguments can be defined multiple times. If the named argument has the <em>-multiply</em> attribute, all argument values will be collected in a list. Otherwise, only the last provided attribute value will be retained:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1 -n2 N2 -n1 M1 U1 U2</b>
<em>-&gt; n1:'M1', n2:'N2', u1:'U1', u2:'U2'</em></pre>
<p>The name of the first unnamed argument has therefore not to start with the '-' character. The unnamed argument is otherwise considered as name of another named argument. This is especially important if the first unnamed argument is given by a variable that can contain any character strings:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1 -n2 N2 &quot;-&gt;&quot; &quot;&lt;-&quot;</b>
<em>-&gt; my_proc: Argument '-&gt;' not known</em>
set U1 &quot;-&gt;&quot;
my_proc -n1 N1 -n2 N2 $U1 U2}]
my_proc: Argument '-&gt;' not known</pre>
<p>The '--' flag allows separating unambiguously the unnamed arguments from the named arguments. All data after the '--' flag will be considered as unnamed argument:</p>
<pre class="doctools_example">my_proc <b class="cmd">-n1 N1 -n2 N2 -- &quot;-&gt;&quot; &quot;&lt;-&quot;</b>
<em>-&gt; n1:'N1', n2:'N2', u1:'-&gt;', u2:'&lt;-'</em>
set U1 &quot;-&gt;&quot;
my_proc <b class="cmd">-n1 N1 -n2 N2 -- $U1 U2</b>
<em>-&gt; n1:'N1', n2:'N2', u1:'-&gt;', u2:'&lt;-'</em></pre>
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
<em>-&gt; args: -mtype Warning {It is 7:00}</em></pre>
</div>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_introduction.html">tepam(n)</a>, <a href="tepam_argument_dialogbox.html">tepam::argument_dialogbox(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#argument_integrity">argument integrity</a>, <a href="../../../../index.html#argument_validation">argument validation</a>, <a href="../../../../index.html#arguments">arguments</a>, <a href="../../../../index.html#procedure">procedure</a>, <a href="../../../../index.html#subcommand">subcommand</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Procedures, arguments, parameters, options</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013, Andreas Drollinger</p>
</div>
</div></body></html>







|








792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
<em>-&gt; args: -mtype Warning {It is 7:00}</em></pre>
</div>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="tepam_introduction.html">tepam(n)</a>, <a href="tepam_argument_dialogbox.html">tepam::argument_dialogbox(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key764">argument integrity</a>, <a href="../../../../index.html#key765">argument validation</a>, <a href="../../../../index.html#key763">arguments</a>, <a href="../../../../index.html#key41">procedure</a>, <a href="../../../../index.html#key762">subcommand</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Procedures, arguments, parameters, options</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2013, Andreas Drollinger</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/ansi_cattr.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::ansi::code::attr - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::ansi::code::attr - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ansi_cattr.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::ansi::code::attr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code::attr(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code::attr - ANSI attribute sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ansi_cattr.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::ansi::code::attr.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code::attr(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code::attr - ANSI attribute sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ansi">ansi</a>, <a href="../../../../index.html#attribute_control">attribute control</a>, <a href="../../../../index.html#color_control">color control</a>, <a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#terminal">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








274
275
276
277
278
279
280






281
282
283
284
285
286
287
288
289
290
291
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key166">ansi</a>, <a href="../../../../index.html#key165">attribute control</a>, <a href="../../../../index.html#key164">color control</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/ansi_cctrl.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::ansi::code::ctrl - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::ansi::code::ctrl - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ansi_cctrl.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::ansi::code::ctrl.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code::ctrl(n) 0.2 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code::ctrl - ANSI control sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ansi_cctrl.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::ansi::code::ctrl.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code::ctrl(n) 0.2 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code::ctrl - ANSI control sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ansi">ansi</a>, <a href="../../../../index.html#attribute_control">attribute control</a>, <a href="../../../../index.html#color_control">color control</a>, <a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#terminal">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








454
455
456
457
458
459
460






461
462
463
464
465
466
467
468
469
470
471
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key166">ansi</a>, <a href="../../../../index.html#key165">attribute control</a>, <a href="../../../../index.html#key164">color control</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/ansi_cmacros.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::ansi::code::macros - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::ansi::code::macros - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ansi_cmacros.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::ansi::code::macros.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code::macros(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code::macros - Macro sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ansi_cmacros.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::ansi::code::macros.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code::macros(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code::macros - Macro sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ansi">ansi</a>, <a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#frame">frame</a>, <a href="../../../../index.html#menu">menu</a>, <a href="../../../../index.html#terminal">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








183
184
185
186
187
188
189






190
191
192
193
194
195
196
197
198
199
200
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key166">ansi</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key674">frame</a>, <a href="../../../../index.html#key673">menu</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/ansi_code.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::ansi::code - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::ansi::code - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ansi_code.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::ansi::code.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code(n) 0.2 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code - Helper for control sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ansi_code.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::ansi::code.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::code(n) 0.2 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::code - Helper for control sequences</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#declare">declare</a>, <a href="../../../../index.html#define">define</a>, <a href="../../../../index.html#terminal">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








159
160
161
162
163
164
165






166
167
168
169
170
171
172
173
174
175
176
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key338">declare</a>, <a href="../../../../index.html#key339">define</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/ansi_ctrlu.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::ansi::ctrl::unix - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::ansi::ctrl::unix - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ansi_ctrlu.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006-2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::ansi::ctrl::unix.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::ctrl::unix(n) 0.1.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::ctrl::unix - Control operations and queries</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ansi_ctrlu.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006-2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::ansi::ctrl::unix.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::ctrl::unix(n) 0.1.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::ctrl::unix - Control operations and queries</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><em>WARNING</em>: This package is unix-specific and depends on the
availability of two unix system commands for terminal control,
i.e. <b class="syscmd">stty</b> and <b class="syscmd">tput</b>, both of which have to be found
in the <b class="variable">$PATH</b>. If any of these two commands is missing the
loading of the package will fail.</p>
<p>The package provides commands to switch the standard input of the
current process between <i class="term"><a href="../../../../index.html#raw">raw</a></i> and <i class="term"><a href="../../../../index.html#cooked">cooked</a></i> input modes, and
to query the size of terminals, i.e. the available number of columns
and lines.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Introspection</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::ansi::ctrl::unix::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command imports some or all attribute commands into the namespace
<i class="arg">ns</i>. This is by default the namespace <em>ctrl</em>. Note that this
is relative namespace name, placing the imported command into a child
of the current namespace. By default all commands are imported, this
can howver be restricted by listing the names of the wanted commands
after the namespace argument.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Operations</a></h3>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">::term::ansi::ctrl::unix::raw</b></a></dt>
<dd><p>This command switches the standard input of the current process to
<i class="term"><a href="../../../../index.html#raw">raw</a></i> input mode. This means that from then on all characters
typed by the user are immediately reported to the application instead
of waiting in the OS buffer until the Enter/Return key is received.</p></dd>
<dt><a name="3"><b class="cmd">::term::ansi::ctrl::unix::cooked</b></a></dt>
<dd><p>This command switches the standard input of the current process to
<i class="term"><a href="../../../../index.html#cooked">cooked</a></i> input mode. This means that from then on all characters
typed by the user are kept in OS buffers for editing until the
Enter/Return key is received.</p></dd>
<dt><a name="4"><b class="cmd">::term::ansi::ctrl::unix::columns</b></a></dt>
<dd><p>This command queries the terminal connected to the standard input for
the number of columns available for display.</p></dd>
<dt><a name="5"><b class="cmd">::term::ansi::ctrl::unix::rows</b></a></dt>
<dd><p>This command queries the terminal connected to the standard input for
the number of rows (aka lines) available for display.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#ansi">ansi</a>, <a href="../../../../index.html#columns">columns</a>, <a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#cooked">cooked</a>, <a href="../../../../index.html#input_mode">input mode</a>, <a href="../../../../index.html#lines">lines</a>, <a href="../../../../index.html#raw">raw</a>, <a href="../../../../index.html#rows">rows</a>, <a href="../../../../index.html#terminal">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|



















|




|


















<
<
<
<
<
<


|








147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197






198
199
200
201
202
203
204
205
206
207
208
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p><em>WARNING</em>: This package is unix-specific and depends on the
availability of two unix system commands for terminal control,
i.e. <b class="syscmd">stty</b> and <b class="syscmd">tput</b>, both of which have to be found
in the <b class="variable">$PATH</b>. If any of these two commands is missing the
loading of the package will fail.</p>
<p>The package provides commands to switch the standard input of the
current process between <i class="term"><a href="../../../../index.html#key508">raw</a></i> and <i class="term"><a href="../../../../index.html#key506">cooked</a></i> input modes, and
to query the size of terminals, i.e. the available number of columns
and lines.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Introspection</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::ansi::ctrl::unix::import</b> <span class="opt">?<i class="arg">ns</i>?</span> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This command imports some or all attribute commands into the namespace
<i class="arg">ns</i>. This is by default the namespace <em>ctrl</em>. Note that this
is relative namespace name, placing the imported command into a child
of the current namespace. By default all commands are imported, this
can howver be restricted by listing the names of the wanted commands
after the namespace argument.</p></dd>
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">Operations</a></h3>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">::term::ansi::ctrl::unix::raw</b></a></dt>
<dd><p>This command switches the standard input of the current process to
<i class="term"><a href="../../../../index.html#key508">raw</a></i> input mode. This means that from then on all characters
typed by the user are immediately reported to the application instead
of waiting in the OS buffer until the Enter/Return key is received.</p></dd>
<dt><a name="3"><b class="cmd">::term::ansi::ctrl::unix::cooked</b></a></dt>
<dd><p>This command switches the standard input of the current process to
<i class="term"><a href="../../../../index.html#key506">cooked</a></i> input mode. This means that from then on all characters
typed by the user are kept in OS buffers for editing until the
Enter/Return key is received.</p></dd>
<dt><a name="4"><b class="cmd">::term::ansi::ctrl::unix::columns</b></a></dt>
<dd><p>This command queries the terminal connected to the standard input for
the number of columns available for display.</p></dd>
<dt><a name="5"><b class="cmd">::term::ansi::ctrl::unix::rows</b></a></dt>
<dd><p>This command queries the terminal connected to the standard input for
the number of rows (aka lines) available for display.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key166">ansi</a>, <a href="../../../../index.html#key507">columns</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key506">cooked</a>, <a href="../../../../index.html#key505">input mode</a>, <a href="../../../../index.html#key510">lines</a>, <a href="../../../../index.html#key508">raw</a>, <a href="../../../../index.html#key509">rows</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/ansi_send.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::ansi::send - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::ansi::send - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ansi_send.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::ansi::send.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::send(n) 0.2 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::send - Output of ANSI control sequences to terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ansi_send.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::ansi::send.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::ansi::send(n) 0.2 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::ansi::send - Output of ANSI control sequences to terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#character_output">character output</a>, <a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#terminal">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








438
439
440
441
442
443
444






445
446
447
448
449
450
451
452
453
454
455
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key420">character output</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/imenu.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::interact::menu - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::interact::menu - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'imenu.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::interact::menu.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::interact::menu(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::interact::menu - Terminal widget, menu</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'imenu.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::interact::menu.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::interact::menu(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::interact::menu - Terminal widget, menu</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#menu">menu</a>, <a href="../../../../index.html#terminal">terminal</a>, <a href="../../../../index.html#text_display">text display</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








244
245
246
247
248
249
250






251
252
253
254
255
256
257
258
259
260
261
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key673">menu</a>, <a href="../../../../index.html#key92">terminal</a>, <a href="../../../../index.html#key789">text display</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/ipager.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::interact::pager - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::interact::pager - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ipager.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::interact::pager.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::interact::pager(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::interact::pager - Terminal widget, paging</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ipager.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::interact::pager.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::interact::pager(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::interact::pager - Terminal widget, paging</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#pager">pager</a>, <a href="../../../../index.html#terminal">terminal</a>, <a href="../../../../index.html#text_display">text display</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








244
245
246
247
248
249
250






251
252
253
254
255
256
257
258
259
260
261
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key790">pager</a>, <a href="../../../../index.html#key92">terminal</a>, <a href="../../../../index.html#key789">text display</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/receive.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::receive - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::receive - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'receive.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::receive.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::receive(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::receive - General input from terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'receive.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::receive.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::receive(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::receive - General input from terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<li><a href="#5"><b class="cmd">::term::receive::unlisten</b> <span class="opt">?<i class="arg">chan</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the most primitive commands for receiving
characters to a terminal. They are in essence convenient wrappers
around the builtin commands <b class="cmd"><a href="../../../../index.html#read">read</a></b> and <b class="cmd">fileevent</b>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::receive::getch</b> <span class="opt">?<i class="arg">chan</i>?</span></a></dt>
<dd><p>This command reads a single character from the channel with handle
<i class="arg">chan</i> and returns it as the result of the command.</p>
<p>If not specified <i class="arg">chan</i> defaults to <b class="const">stdin</b>.</p>
<p>It is the responsibility of the caller to make sure that the channel
can provide single characters. On unix this can be done, for example,







|







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<li><a href="#5"><b class="cmd">::term::receive::unlisten</b> <span class="opt">?<i class="arg">chan</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides the most primitive commands for receiving
characters to a terminal. They are in essence convenient wrappers
around the builtin commands <b class="cmd"><a href="../../../../index.html#key411">read</a></b> and <b class="cmd">fileevent</b>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::term::receive::getch</b> <span class="opt">?<i class="arg">chan</i>?</span></a></dt>
<dd><p>This command reads a single character from the channel with handle
<i class="arg">chan</i> and returns it as the result of the command.</p>
<p>If not specified <i class="arg">chan</i> defaults to <b class="const">stdin</b>.</p>
<p>It is the responsibility of the caller to make sure that the channel
can provide single characters. On unix this can be done, for example,
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#character_input">character input</a>, <a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#get_character">get character</a>, <a href="../../../../index.html#listener">listener</a>, <a href="../../../../index.html#receiver">receiver</a>, <a href="../../../../index.html#terminal">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








173
174
175
176
177
178
179






180
181
182
183
184
185
186
187
188
189
190
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key96">character input</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key94">get character</a>, <a href="../../../../index.html#key97">listener</a>, <a href="../../../../index.html#key93">receiver</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/term.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'term.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term - General terminal control</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'term.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term - General terminal control</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#terminal">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








140
141
142
143
144
145
146






147
148
149
150
151
152
153
154
155
156
157
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/term_bind.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::receive::bind - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::receive::bind - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'term_bind.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::receive::bind.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::receive::bind(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::receive::bind - Keyboard dispatch from terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'term_bind.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::receive::bind.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::receive::bind(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::receive::bind - Keyboard dispatch from terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#character_input">character input</a>, <a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#dispatcher">dispatcher</a>, <a href="../../../../index.html#listener">listener</a>, <a href="../../../../index.html#receiver">receiver</a>, <a href="../../../../index.html#terminal">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








217
218
219
220
221
222
223






224
225
226
227
228
229
230
231
232
233
234
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key96">character input</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key517">dispatcher</a>, <a href="../../../../index.html#key97">listener</a>, <a href="../../../../index.html#key93">receiver</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/term/term_send.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>term::send - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>term::send - Terminal control</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'term_send.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- term::send.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::send(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::send - General output to terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'term_send.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- term::send.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">term::send(n) 0.1 tcllib &quot;Terminal control&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>term::send - General output to terminals</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#character_output">character output</a>, <a href="../../../../index.html#control">control</a>, <a href="../../../../index.html#terminal">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








154
155
156
157
158
159
160






161
162
163
164
165
166
167
168
169
170
171
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>term</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key420">character output</a>, <a href="../../../../index.html#key95">control</a>, <a href="../../../../index.html#key92">terminal</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Terminal control</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/textutil/adjust.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>textutil::adjust - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>textutil::adjust - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'adjust.man' by tcllib/doctools with format 'html'
   -->
<!-- textutil::adjust.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::adjust(n) 0.7.3 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::adjust - Procedures to adjust, indent, and undent paragraphs</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'adjust.man' by tcllib/doctools with format 'html'
   -->
<! -- textutil::adjust.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::adjust(n) 0.7.3 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::adjust - Procedures to adjust, indent, and undent paragraphs</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
205
206
207
208
209
210
211
212

213
214
215
216
217
218
219
220
there are no space chars at the end of this line, and there may be
some space chars at the beginning, despite of the <b class="option">-full</b> option.</p></dd>
</dl></dd>
<dt><b class="option">-length</b> <i class="arg">integer</i></dt>
<dd><p>Set the length of the <em>logical</em> line in the string to
<i class="arg">integer</i>.  <i class="arg">integer</i> must be a positive integer
value. Defaults to <b class="const">72</b>.</p></dd>
<dt><b class="option">-strictlength</b> <i class="arg">boolean</i></dt>

<dd><p>If set to <b class="const">false</b> (default), a line can exceed the specified
<b class="option">-length</b> if a single word is longer than <b class="option">-length</b>. If
set to <b class="const">true</b>, words that are longer than <b class="option">-length</b> are
split so that no line exceeds the specified <b class="option">-length</b>.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::textutil::adjust::readPatterns</b> <i class="arg">filename</i></a></dt>
<dd><p>Loads the internal storage for hyphenation patterns with the contents
of the file <i class="arg">filename</i>. This has to be done prior to calling







|
>
|







206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
there are no space chars at the end of this line, and there may be
some space chars at the beginning, despite of the <b class="option">-full</b> option.</p></dd>
</dl></dd>
<dt><b class="option">-length</b> <i class="arg">integer</i></dt>
<dd><p>Set the length of the <em>logical</em> line in the string to
<i class="arg">integer</i>.  <i class="arg">integer</i> must be a positive integer
value. Defaults to <b class="const">72</b>.</p></dd>
<dt><b class="option">-strictlength</b></dt>
<dd><p><i class="arg">boolean</i>]
If set to <b class="const">false</b> (default), a line can exceed the specified
<b class="option">-length</b> if a single word is longer than <b class="option">-length</b>. If
set to <b class="const">true</b>, words that are longer than <b class="option">-length</b> are
split so that no line exceeds the specified <b class="option">-length</b>.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::textutil::adjust::readPatterns</b> <i class="arg">filename</i></a></dt>
<dd><p>Loads the internal storage for hyphenation patterns with the contents
of the file <i class="arg">filename</i>. This has to be done prior to calling
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tex">TeX</a>, <a href="../../../../index.html#adjusting">adjusting</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#hyphenation">hyphenation</a>, <a href="../../../../index.html#indenting">indenting</a>, <a href="../../../../index.html#justification">justification</a>, <a href="../../../../index.html#paragraph">paragraph</a>, <a href="../../../../index.html#string">string</a>, <a href="../../../../index.html#undenting">undenting</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





259
260
261
262
263
264
265






266
267
268
269
270
271
272
273
274
275
276
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key345">TeX</a>, <a href="../../../../index.html#key346">adjusting</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key348">hyphenation</a>, <a href="../../../../index.html#key344">indenting</a>, <a href="../../../../index.html#key343">justification</a>, <a href="../../../../index.html#key347">paragraph</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key342">undenting</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/textutil/expander.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>textutil::expander - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>textutil::expander - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'expander.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; William H. Duquette, http://www.wjduquette.com/expand
   -->
<!-- textutil::expander.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::expander(n) 1.3.1 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::expander - Procedures to process templates and expand text.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'expander.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; William H. Duquette, http://www.wjduquette.com/expand
   -->
<! -- textutil::expander.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::expander(n) 1.3.1 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::expander - Procedures to process templates and expand text.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<li><a href="#17"><i class="arg">expanderName</i> <b class="method">setbrackets</b> <i class="arg">lbrack rbrack</i></a></li>
<li><a href="#18"><i class="arg">expanderName</i> <b class="method">textcmd</b> <span class="opt">?<i class="arg">newTextCmd</i>?</span></a></li>
<li><a href="#19"><i class="arg">expanderName</i> <b class="method">where</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The Tcl <b class="cmd"><a href="../../../../index.html#subst">subst</a></b> command is often used to support a kind of
template processing. Given a string with embedded variables or
function calls, <b class="cmd"><a href="../../../../index.html#subst">subst</a></b> will interpolate the variable and function
values, returning the new string:</p>
<pre class="doctools_example">
    % set greeting &quot;Howdy&quot;
    Howdy
    % proc place {} {return &quot;World&quot;}
    % subst {$greeting, [place]!}
    Howdy, World!
    %
</pre>
<p>By defining a suitable set of Tcl commands, <b class="cmd"><a href="../../../../index.html#subst">subst</a></b> can be used to
implement a markup language similar to HTML.</p>
<p>The <b class="cmd"><a href="../../../../index.html#subst">subst</a></b> command is efficient, but it has three drawbacks for
this kind of template processing:</p>
<ul class="doctools_itemized">
<li><p>There's no way to identify and process the plain text between two
embedded Tcl commands; that makes it difficult to handle plain text in
a context-sensitive way.</p></li>
<li><p>Embedded commands are necessarily bracketed by <b class="const">[</b> and
<b class="const">]</b>; it's convenient to be able to choose different brackets







|

|









|

|







162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<li><a href="#17"><i class="arg">expanderName</i> <b class="method">setbrackets</b> <i class="arg">lbrack rbrack</i></a></li>
<li><a href="#18"><i class="arg">expanderName</i> <b class="method">textcmd</b> <span class="opt">?<i class="arg">newTextCmd</i>?</span></a></li>
<li><a href="#19"><i class="arg">expanderName</i> <b class="method">where</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The Tcl <b class="cmd"><a href="../../../../index.html#key273">subst</a></b> command is often used to support a kind of
template processing. Given a string with embedded variables or
function calls, <b class="cmd"><a href="../../../../index.html#key273">subst</a></b> will interpolate the variable and function
values, returning the new string:</p>
<pre class="doctools_example">
    % set greeting &quot;Howdy&quot;
    Howdy
    % proc place {} {return &quot;World&quot;}
    % subst {$greeting, [place]!}
    Howdy, World!
    %
</pre>
<p>By defining a suitable set of Tcl commands, <b class="cmd"><a href="../../../../index.html#key273">subst</a></b> can be used to
implement a markup language similar to HTML.</p>
<p>The <b class="cmd"><a href="../../../../index.html#key273">subst</a></b> command is efficient, but it has three drawbacks for
this kind of template processing:</p>
<ul class="doctools_itemized">
<li><p>There's no way to identify and process the plain text between two
embedded Tcl commands; that makes it difficult to handle plain text in
a context-sensitive way.</p></li>
<li><p>Embedded commands are necessarily bracketed by <b class="const">[</b> and
<b class="const">]</b>; it's convenient to be able to choose different brackets
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>[uri, http://www.wjduquette.com/expand, regexp, <a href="../../../../index.html#split">split</a>, <a href="../../../../index.html#string">string</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#string">string</a>, <a href="../../../../index.html#template_processing">template processing</a>, <a href="../../../../index.html#text_expansion">text expansion</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; William H. Duquette, http://www.wjduquette.com/expand</p>
</div>
</div></body></html>







<
<
<
<
<
<


|


|








497
498
499
500
501
502
503






504
505
506
507
508
509
510
511
512
513
514
515
516
517
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>[uri, http://www.wjduquette.com/expand, regexp, <a href="../../../../index.html#key440">split</a>, <a href="../../../../index.html#key280">string</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key781">template processing</a>, <a href="../../../../index.html#key782">text expansion</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Documentation tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; William H. Duquette, http://www.wjduquette.com/expand</p>
</div>
</div></body></html>

Deleted idoc/www/tcllib/files/modules/textutil/patch.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!DOCTYPE html><html><head>
<title>textutil::patch - Text and string utilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'patch.man' by tcllib/doctools with format 'html'
   -->
<!-- textutil::patch.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::patch(n) 0.1 tcllib &quot;Text and string utilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::patch - Application of uni-diff patches to directory trees</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil::patch <span class="opt">?0.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::patch::apply</b> <i class="arg">basedirectory</i> <i class="arg">striplevel</i> <i class="arg">patch</i> <i class="arg">reportcmd</i></a></li>
<li><a href="#2"><b class="cmd">{*}reportcmd</b> <b class="method">apply</b> <i class="arg">filename</i></a></li>
<li><a href="#3"><b class="cmd">{*}reportcmd</b> <b class="method">fail</b> <i class="arg">filename</i> <i class="arg">hunk</i> <i class="arg">expected</i> <i class="arg">seen</i></a></li>
<li><a href="#4"><b class="cmd">{*}reportcmd</b> <b class="method">fail-already</b> <i class="arg">filename</i> <i class="arg">hunk</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides a single command which applies a patch in
<a href="https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html">unified format</a>
to a directory tree.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::textutil::patch::apply</b> <i class="arg">basedirectory</i> <i class="arg">striplevel</i> <i class="arg">patch</i> <i class="arg">reportcmd</i></a></dt>
<dd><p>Applies the <i class="arg">patch</i> (text of the path, not file) to the files in
the <i class="arg">basedirectory</i> using the specified <i class="arg">striplevel</i>.
The result of the command is the empty string.</p>
<p>The <i class="arg">striplevel</i> argument is equivalent to option
<b class="option">-p</b> of the <b class="syscmd"><a href="../../../../index.html#patch">patch</a></b> command.</p>
<p>Errors are thrown when the <i class="arg">patch</i> does not parse, and
nothing is done to the files in <i class="arg">basedirectory</i>.</p>
<p>All activities during the application of the patch, including
the inability to apply a hunk are reported through the command prefix
<i class="arg">reportcmd</i> instead. Files with problems are left unchanged.  Note
however that this does <em>not prevent</em> changes to files with no
problems, before and after the problematic file(s).</p>
<p>The command prefix is called in 3 possible forms:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">{*}reportcmd</b> <b class="method">apply</b> <i class="arg">filename</i></a></dt>
<dd><p>The caller begins operation on file <i class="arg">fname</i>, applying all hunks
collected for said file.</p></dd>
<dt><a name="3"><b class="cmd">{*}reportcmd</b> <b class="method">fail</b> <i class="arg">filename</i> <i class="arg">hunk</i> <i class="arg">expected</i> <i class="arg">seen</i></a></dt>
<dd><p>Application of hunk number <i class="arg">hunk</i> of file <i class="arg">filename</i> has failed.
The command expected to find the text <i class="arg">expected</i>, and saw <i class="arg">seen</i> instead.</p></dd>
<dt><a name="4"><b class="cmd">{*}reportcmd</b> <b class="method">fail-already</b> <i class="arg">filename</i> <i class="arg">hunk</i></a></dt>
<dd><p>Application of hunk number <i class="arg">hunk</i> of file <i class="arg">filename</i> has failed.
The command believes that this hunk has already been applied to the file.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#diff_run">diff -ruN</a>, <a href="../../../../index.html#diff_unified_format">diff, unified format</a>, <a href="../../../../index.html#fossil">fossil</a>, <a href="../../../../index.html#git">git</a>, <a href="../../../../index.html#patch">patch</a>, <a href="../../../../index.html#unified_format_diff">unified format diff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































Changes to idoc/www/tcllib/files/modules/textutil/repeat.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>textutil::repeat - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>textutil::repeat - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'repeat.man' by tcllib/doctools with format 'html'
   -->
<!-- textutil::repeat.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::repeat(n) 0.7.1 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::repeat - Procedures to repeat strings.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'repeat.man' by tcllib/doctools with format 'html'
   -->
<! -- textutil::repeat.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::repeat(n) 0.7.1 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::repeat - Procedures to repeat strings.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#blanks">blanks</a>, <a href="../../../../index.html#repetition">repetition</a>, <a href="../../../../index.html#string">string</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





153
154
155
156
157
158
159






160
161
162
163
164
165
166
167
168
169
170
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key282">blanks</a>, <a href="../../../../index.html#key281">repetition</a>, <a href="../../../../index.html#key280">string</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/textutil/tabify.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>textutil::tabify - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>textutil::tabify - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tabify.man' by tcllib/doctools with format 'html'
   -->
<!-- textutil::tabify.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::tabify(n) 0.7 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::tabify - Procedures to (un)tabify strings</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tabify.man' by tcllib/doctools with format 'html'
   -->
<! -- textutil::tabify.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::tabify(n) 0.7 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::tabify - Procedures to (un)tabify strings</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#string">string</a>, <a href="../../../../index.html#tabstops">tabstops</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





173
174
175
176
177
178
179






180
181
182
183
184
185
186
187
188
189
190
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key544">tabstops</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/textutil/textutil.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>textutil - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>textutil - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'textutil.man' by tcllib/doctools with format 'html'
   -->
<!-- textutil.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil(n) 0.8 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil - Procedures to manipulate texts and strings.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'textutil.man' by tcllib/doctools with format 'html'
   -->
<! -- textutil.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil(n) 0.8 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil - Procedures to manipulate texts and strings.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
generated list will be shorter than <i class="arg">len</i>.</p></dd>
<dt><a name="8"><b class="cmd">::textutil::splitx</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>Split the <i class="arg">string</i> and return a list. The string is split
according to the regular expression <i class="arg">regexp</i> instead of a simple
list of chars. Note that if you add parenthesis into the <i class="arg">regexp</i>,
the parentheses part of separator would be added into list as
additional element. If the <i class="arg">string</i> is empty the result is the
empty list, like for <b class="cmd"><a href="../../../../index.html#split">split</a></b>. If <i class="arg">regexp</i> is empty the
<i class="arg">string</i> is split at every character, like <b class="cmd"><a href="../../../../index.html#split">split</a></b> does.
The regular expression <i class="arg">regexp</i> defaults to &quot;[\\t \\r\\n]+&quot;.</p></dd>
<dt><a name="9"><b class="cmd">::textutil::tabify</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Tabify the <i class="arg">string</i> by replacing any substring of <i class="arg">num</i> space
chars by a tabulation and return the result as a new string. <i class="arg">num</i>
defaults to 8.</p></dd>
<dt><a name="10"><b class="cmd">::textutil::tabify2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Similar to <b class="cmd">::textutil::tabify</b> this command tabifies the







|
|







302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
generated list will be shorter than <i class="arg">len</i>.</p></dd>
<dt><a name="8"><b class="cmd">::textutil::splitx</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>Split the <i class="arg">string</i> and return a list. The string is split
according to the regular expression <i class="arg">regexp</i> instead of a simple
list of chars. Note that if you add parenthesis into the <i class="arg">regexp</i>,
the parentheses part of separator would be added into list as
additional element. If the <i class="arg">string</i> is empty the result is the
empty list, like for <b class="cmd"><a href="../../../../index.html#key440">split</a></b>. If <i class="arg">regexp</i> is empty the
<i class="arg">string</i> is split at every character, like <b class="cmd"><a href="../../../../index.html#key440">split</a></b> does.
The regular expression <i class="arg">regexp</i> defaults to &quot;[\\t \\r\\n]+&quot;.</p></dd>
<dt><a name="9"><b class="cmd">::textutil::tabify</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Tabify the <i class="arg">string</i> by replacing any substring of <i class="arg">num</i> space
chars by a tabulation and return the result as a new string. <i class="arg">num</i>
defaults to 8.</p></dd>
<dt><a name="10"><b class="cmd">::textutil::tabify2</b> <i class="arg">string</i> <span class="opt">?<i class="arg">num</i>?</span></a></dt>
<dd><p>Similar to <b class="cmd">::textutil::tabify</b> this command tabifies the
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tex">TeX</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#hyphenation">hyphenation</a>, <a href="../../../../index.html#indenting">indenting</a>, <a href="../../../../index.html#paragraph">paragraph</a>, <a href="../../../../index.html#regular_expression">regular expression</a>, <a href="../../../../index.html#string">string</a>, <a href="../../../../index.html#trimming">trimming</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





406
407
408
409
410
411
412






413
414
415
416
417
418
419
420
421
422
423
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key345">TeX</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key348">hyphenation</a>, <a href="../../../../index.html#key344">indenting</a>, <a href="../../../../index.html#key347">paragraph</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key429">trimming</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/textutil/textutil_split.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>textutil::split - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>textutil::split - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'textutil_split.man' by tcllib/doctools with format 'html'
   -->
<!-- textutil::split.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::split(n) 0.8 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::split - Procedures to split texts</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil::split <span class="opt">?0.8?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::split::splitn</b> <i class="arg">string</i> <span class="opt">?<i class="arg">len</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::textutil::split::splitx</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></li>
</ul>
</div>
</div>







|

|



|
|
|
|
|
|


|


















|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'textutil_split.man' by tcllib/doctools with format 'html'
   -->
<! -- textutil::split.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::split(n) 0.7 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::split - Procedures to split texts</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">textutil::split <span class="opt">?0.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::textutil::split::splitn</b> <i class="arg">string</i> <span class="opt">?<i class="arg">len</i>?</span></a></li>
<li><a href="#2"><b class="cmd">::textutil::split::splitx</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></li>
</ul>
</div>
</div>
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
then return an empty list. If the length of the <i class="arg">string</i> is not an
entire multiple of the chunk length, then the last chunk in the
generated list will be shorter than <i class="arg">len</i>.</p></dd>
<dt><a name="2"><b class="cmd">::textutil::split::splitx</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>This command splits the <i class="arg">string</i> and return a list. The string is
split according to the regular expression <i class="arg">regexp</i> instead of a
simple list of chars.
<em>Note</em>: When parentheses are used in the <i class="arg">regexp</i>, i.e. regex
capture groups, then these groups will be added into the result list
as additional elements. If the <i class="arg">string</i> is empty the result is the
empty list, like for <b class="cmd"><a href="../../../../index.html#split">split</a></b>.
If <i class="arg">regexp</i> is empty the <i class="arg">string</i> is split at every character,
like <b class="cmd"><a href="../../../../index.html#split">split</a></b> does.
The regular expression <i class="arg">regexp</i> defaults to &quot;[\\t \\r\\n]+&quot;.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#regular_expression">regular expression</a>, <a href="../../../../index.html#split">split</a>, <a href="../../../../index.html#string">string</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







|
|
|
|
<
|










<
<
<
<
<
<





|





146
147
148
149
150
151
152
153
154
155
156

157
158
159
160
161
162
163
164
165
166
167






168
169
170
171
172
173
174
175
176
177
178
then return an empty list. If the length of the <i class="arg">string</i> is not an
entire multiple of the chunk length, then the last chunk in the
generated list will be shorter than <i class="arg">len</i>.</p></dd>
<dt><a name="2"><b class="cmd">::textutil::split::splitx</b> <i class="arg">string</i> <span class="opt">?<i class="arg">regexp</i>?</span></a></dt>
<dd><p>This command splits the <i class="arg">string</i> and return a list. The string is
split according to the regular expression <i class="arg">regexp</i> instead of a
simple list of chars.
Note that if you parentheses are added into the <i class="arg">regexp</i>, the
parentheses part of separator will be added into the result list as
additional element. If the <i class="arg">string</i> is empty the result is the
empty list, like for <b class="cmd"><a href="../../../../index.html#key440">split</a></b>. If <i class="arg">regexp</i> is empty the

<i class="arg">string</i> is split at every character, like <b class="cmd"><a href="../../../../index.html#key440">split</a></b> does.
The regular expression <i class="arg">regexp</i> defaults to &quot;[\\t \\r\\n]+&quot;.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key440">split</a>, <a href="../../../../index.html#key280">string</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/textutil/textutil_string.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>textutil::string - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>textutil::string - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'textutil_string.man' by tcllib/doctools with format 'html'
   -->
<!-- textutil::string.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::string(n) 0.8 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::string - Procedures to manipulate texts and strings.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'textutil_string.man' by tcllib/doctools with format 'html'
   -->
<! -- textutil::string.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::string(n) 0.8 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::string - Procedures to manipulate texts and strings.</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#capitalize">capitalize</a>, <a href="../../../../index.html#chop">chop</a>, <a href="../../../../index.html#common_prefix">common prefix</a>, <a href="../../../../index.html#formatting">formatting</a>, <a href="../../../../index.html#prefix">prefix</a>, <a href="../../../../index.html#string">string</a>, <a href="../../../../index.html#uncapitalize">uncapitalize</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





174
175
176
177
178
179
180






181
182
183
184
185
186
187
188
189
190
191
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key689">capitalize</a>, <a href="../../../../index.html#key688">chop</a>, <a href="../../../../index.html#key690">common prefix</a>, <a href="../../../../index.html#key247">formatting</a>, <a href="../../../../index.html#key687">prefix</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key686">uncapitalize</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/textutil/trim.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>textutil::trim - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>textutil::trim - Text and string utilities, macro processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'trim.man' by tcllib/doctools with format 'html'
   -->
<!-- textutil::trim.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::trim(n) 0.7 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::trim - Procedures to trim strings</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'trim.man' by tcllib/doctools with format 'html'
   -->
<! -- textutil::trim.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">textutil::trim(n) 0.7 tcllib &quot;Text and string utilities, macro processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>textutil::trim - Procedures to trim strings</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#prefix">prefix</a>, <a href="../../../../index.html#regular_expression">regular expression</a>, <a href="../../../../index.html#string">string</a>, <a href="../../../../index.html#trimming">trimming</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





178
179
180
181
182
183
184






185
186
187
188
189
190
191
192
193
194
195
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>textutil</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>regexp(n), split(n), string(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key687">prefix</a>, <a href="../../../../index.html#key324">regular expression</a>, <a href="../../../../index.html#key280">string</a>, <a href="../../../../index.html#key429">trimming</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Text processing</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tie/tie.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>tie - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>tie - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tie.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004-2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tie.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tie(n) 1.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tie - Array persistence</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tie.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tie.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tie(n) 1.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tie - Array persistence</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tie</b> package provides a framework for the creation of
persistent Tcl array variables. It should be noted that the provided
mechanism is generic enough to also allow its usage for the
distribution of the contents of Tcl arrays over multiple threads and
processes, i.e. communication.</p>
<p>This, persistence and communication, is accomplished by <i class="term">tying</i>)
a Tcl array variable to a <i class="term"><a href="../../../../index.html#data_source">data source</a></i>. Examples of data
sources are other Tcl arrays and files.</p>
<p>It should be noted that a single Tcl array variable can be tied to
more than one <i class="term"><a href="../../../../index.html#data_source">data source</a></i>. It is this feature which allows
the framework to be used for communication as well. Just tie several
Tcl arrays in many client processes to a Tcl array in a server and all
changes to any of them will be distributed to all. Less centralized
variants of this are of course possible as well.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">USING TIES</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">TIE API</a></h3>
<p>This section describes the basic API used to establish and remove ties
between Tcl array variables and data sources. This interface is the
only one a casual user has to be concerned about. The following
sections about the various internal interfaces can be safely skipped.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tie::tie</b> <i class="arg">arrayvarname</i> <i class="arg">options</i>... <i class="arg">dstype</i> <i class="arg">dsname</i>...</a></dt>
<dd><p>This command establishes a tie between the Tcl array whose name is
provided by the argument <i class="arg">arrayvarname</i> and the
<i class="term"><a href="../../../../index.html#data_source">data source</a></i> identified by the <i class="arg">dstype</i> and its series of
<i class="arg">dsname</i> arguments. All changes made to the Tcl array after this
command returns will be saved to the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> for
safekeeping (or distribution).</p>
<p>The result of the command is always a token which identifies the new
tie. This token can be used later to destroy this specific tie.</p>
<dl class="doctools_arguments">
<dt>varname <i class="arg">arrayvarname</i> (in)</dt>
<dd><p>The name of the Tcl array variable to connect the new tie to.</p></dd>
<dt>name|command <i class="arg">dstype</i> (in)</dt>
<dd><p>This argument specifies the type of the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> we wish
to access.
The <i class="arg">dstype</i> can be one of <b class="const">log</b>, <b class="const">array</b>,
<b class="const">remotearray</b>, <b class="const">file</b>, <b class="const">growfile</b>, or
<b class="const">dsource</b>; in addition, the programmer can register additional
data source types.
Each <i class="arg">dstype</i> is followed by one or more arguments that identify
the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> to which the array is to be tied.</p></dd>
<dt>string <i class="arg">dsname</i> (in)</dt>
<dd><p>The series of <i class="arg">dsname</i> arguments coming after the <i class="arg">dstype</i>
identifies the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> we wish to connect to, and has to
be appropriate for the chosen type.</p></dd>
</dl>
<p>The command understands a number of additional options which guide the
process of setting up the connection between Tcl array and
<i class="term"><a href="../../../../index.html#data_source">data source</a></i>.</p>
<dl class="doctools_options">
<dt><b class="option">-open</b></dt>
<dd><p>The Tcl array for the new tie is <i class="term">loaded</i> from the
<i class="term"><a href="../../../../index.html#data_source">data source</a></i>, and the previously existing contents of the Tcl
array are erased. Care is taken to <em>not</em> erase the previous
contents should the creation of the tie fail.</p>
<p>This option and the option <b class="option">-save</b> exclude each other. If
neither this nor option <b class="option">-save</b> are specified then this option
is assumed as default.</p></dd>
<dt><b class="option">-save</b></dt>
<dd><p>The Tcl array for the new tie is <i class="term">saved</i> to the
<i class="term"><a href="../../../../index.html#data_source">data source</a></i>, and the previously existing contents of the
<i class="term"><a href="../../../../index.html#data_source">data source</a></i> are erased.</p>
<p>This option and the option <b class="option">-open</b> exclude each other. If
neither this nor option <b class="option">-open</b> are specified then option
<b class="option">-open</b> is assumed as default.</p></dd>
<dt><b class="option">-merge</b></dt>
<dd><p>Using this option prevents the erasure of any previously existing
content and merges the data instead. It can be specified in
conjunction with either <b class="option">-open</b> or <b class="option">-save</b>. They
determine how data existing in both Tcl array and
<i class="term"><a href="../../../../index.html#data_source">data source</a></i>, i.e duplicates, are dealt with.</p>
<p>When used with <b class="option">-open</b> data in the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> has
precedence.
In other words, for duplicates the data in the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> is
loaded into the Tcl array.</p>
<p>When used with <b class="option">-save</b> data in the Tcl array has precedence. In
other words, for duplicates the data in the Tcl array is saved into
the <i class="term"><a href="../../../../index.html#data_source">data source</a></i>.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::tie::untie</b> <i class="arg">arrayvarname</i> <span class="opt">?<i class="arg">token</i>?</span></a></dt>
<dd><p>This command dissolves one or more ties associated with the Tcl array
named by <i class="arg">arrayvarname</i>. If no <i class="arg">token</i> is specified then all
ties to that Tcl array are dissolved. Otherwise only the tie the token
stands for is removed, if it is actually connected to the
array. Trying to remove a specific tie not belonging to the provided
array will cause an error.</p>
<p>It should be noted that while severing a tie will destroy management
information internal to the package the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> which was
handled by the tie will not be touched, only closed.</p>
<p>After the command returns none of changes made to the array will be
saved to the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> anymore.</p>
<p>The result of the command is an empty string.</p>
<dl class="doctools_arguments">
<dt>varname <i class="arg">arrayname</i> (in)</dt>
<dd><p>The name of a Tcl array variable which may have ties.</p></dd>
<dt>handle <i class="arg">token</i> (in)</dt>
<dd><p>A handle representing a specific tie. This argument is optional.</p></dd>
</dl></dd>







|


|















|

|







|






|


|




|



|







|
|








|
|

|



|









|


|







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tie</b> package provides a framework for the creation of
persistent Tcl array variables. It should be noted that the provided
mechanism is generic enough to also allow its usage for the
distribution of the contents of Tcl arrays over multiple threads and
processes, i.e. communication.</p>
<p>This, persistence and communication, is accomplished by <i class="term">tying</i>)
a Tcl array variable to a <i class="term"><a href="../../../../index.html#key365">data source</a></i>. Examples of data
sources are other Tcl arrays and files.</p>
<p>It should be noted that a single Tcl array variable can be tied to
more than one <i class="term"><a href="../../../../index.html#key365">data source</a></i>. It is this feature which allows
the framework to be used for communication as well. Just tie several
Tcl arrays in many client processes to a Tcl array in a server and all
changes to any of them will be distributed to all. Less centralized
variants of this are of course possible as well.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">USING TIES</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">TIE API</a></h3>
<p>This section describes the basic API used to establish and remove ties
between Tcl array variables and data sources. This interface is the
only one a casual user has to be concerned about. The following
sections about the various internal interfaces can be safely skipped.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tie::tie</b> <i class="arg">arrayvarname</i> <i class="arg">options</i>... <i class="arg">dstype</i> <i class="arg">dsname</i>...</a></dt>
<dd><p>This command establishes a tie between the Tcl array whose name is
provided by the argument <i class="arg">arrayvarname</i> and the
<i class="term"><a href="../../../../index.html#key365">data source</a></i> identified by the <i class="arg">dstype</i> and its series of
<i class="arg">dsname</i> arguments. All changes made to the Tcl array after this
command returns will be saved to the <i class="term"><a href="../../../../index.html#key365">data source</a></i> for
safekeeping (or distribution).</p>
<p>The result of the command is always a token which identifies the new
tie. This token can be used later to destroy this specific tie.</p>
<dl class="doctools_arguments">
<dt>varname <i class="arg">arrayvarname</i> (in)</dt>
<dd><p>The name of the Tcl array variable to connect the new tie to.</p></dd>
<dt>name|command <i class="arg">dstype</i> (in)</dt>
<dd><p>This argument specifies the type of the <i class="term"><a href="../../../../index.html#key365">data source</a></i> we wish
to access.
The <i class="arg">dstype</i> can be one of <b class="const">log</b>, <b class="const">array</b>,
<b class="const">remotearray</b>, <b class="const">file</b>, <b class="const">growfile</b>, or
<b class="const">dsource</b>; in addition, the programmer can register additional
data source types.
Each <i class="arg">dstype</i> is followed by one or more arguments that identify
the <i class="term"><a href="../../../../index.html#key365">data source</a></i> to which the array is to be tied.</p></dd>
<dt>string <i class="arg">dsname</i> (in)</dt>
<dd><p>The series of <i class="arg">dsname</i> arguments coming after the <i class="arg">dstype</i>
identifies the <i class="term"><a href="../../../../index.html#key365">data source</a></i> we wish to connect to, and has to
be appropriate for the chosen type.</p></dd>
</dl>
<p>The command understands a number of additional options which guide the
process of setting up the connection between Tcl array and
<i class="term"><a href="../../../../index.html#key365">data source</a></i>.</p>
<dl class="doctools_options">
<dt><b class="option">-open</b></dt>
<dd><p>The Tcl array for the new tie is <i class="term">loaded</i> from the
<i class="term"><a href="../../../../index.html#key365">data source</a></i>, and the previously existing contents of the Tcl
array are erased. Care is taken to <em>not</em> erase the previous
contents should the creation of the tie fail.</p>
<p>This option and the option <b class="option">-save</b> exclude each other. If
neither this nor option <b class="option">-save</b> are specified then this option
is assumed as default.</p></dd>
<dt><b class="option">-save</b></dt>
<dd><p>The Tcl array for the new tie is <i class="term">saved</i> to the
<i class="term"><a href="../../../../index.html#key365">data source</a></i>, and the previously existing contents of the
<i class="term"><a href="../../../../index.html#key365">data source</a></i> are erased.</p>
<p>This option and the option <b class="option">-open</b> exclude each other. If
neither this nor option <b class="option">-open</b> are specified then option
<b class="option">-open</b> is assumed as default.</p></dd>
<dt><b class="option">-merge</b></dt>
<dd><p>Using this option prevents the erasure of any previously existing
content and merges the data instead. It can be specified in
conjunction with either <b class="option">-open</b> or <b class="option">-save</b>. They
determine how data existing in both Tcl array and
<i class="term"><a href="../../../../index.html#key365">data source</a></i>, i.e duplicates, are dealt with.</p>
<p>When used with <b class="option">-open</b> data in the <i class="term"><a href="../../../../index.html#key365">data source</a></i> has
precedence.
In other words, for duplicates the data in the <i class="term"><a href="../../../../index.html#key365">data source</a></i> is
loaded into the Tcl array.</p>
<p>When used with <b class="option">-save</b> data in the Tcl array has precedence. In
other words, for duplicates the data in the Tcl array is saved into
the <i class="term"><a href="../../../../index.html#key365">data source</a></i>.</p></dd>
</dl></dd>
<dt><a name="2"><b class="cmd">::tie::untie</b> <i class="arg">arrayvarname</i> <span class="opt">?<i class="arg">token</i>?</span></a></dt>
<dd><p>This command dissolves one or more ties associated with the Tcl array
named by <i class="arg">arrayvarname</i>. If no <i class="arg">token</i> is specified then all
ties to that Tcl array are dissolved. Otherwise only the tie the token
stands for is removed, if it is actually connected to the
array. Trying to remove a specific tie not belonging to the provided
array will cause an error.</p>
<p>It should be noted that while severing a tie will destroy management
information internal to the package the <i class="term"><a href="../../../../index.html#key365">data source</a></i> which was
handled by the tie will not be touched, only closed.</p>
<p>After the command returns none of changes made to the array will be
saved to the <i class="term"><a href="../../../../index.html#key365">data source</a></i> anymore.</p>
<p>The result of the command is an empty string.</p>
<dl class="doctools_arguments">
<dt>varname <i class="arg">arrayname</i> (in)</dt>
<dd><p>The name of a Tcl array variable which may have ties.</p></dd>
<dt>handle <i class="arg">token</i> (in)</dt>
<dd><p>A handle representing a specific tie. This argument is optional.</p></dd>
</dl></dd>
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">STANDARD DATA SOURCE TYPES</a></h3>
<p>This package provides the six following types as examples and standard
data sources.</p>
<dl class="doctools_definitions">
<dt><b class="const">log</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#data_source">data source</a></i> does not maintain any actual data, nor
persistence. It does not accept any identifying arguments. All changes
are simply logged to <b class="const">stdout</b>.</p></dd>
<dt><b class="const">array</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#data_source">data source</a></i> uses a regular Tcl array as the origin of
the persistent data. It accepts a single identifying argument, the
name of this Tcl array. All changes are mirrored to that array.</p></dd>
<dt><b class="const">remotearray</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#data_source">data source</a></i> is similar to <b class="const">array</b>. The difference
is that the Tcl array to which we are mirroring is not directly
accessible, but through a <b class="cmd"><a href="../../../../index.html#send">send</a></b>-like command.</p>
<p>It accepts three identifying arguments, the name of the other Tcl
array, the command prefix for the <b class="cmd"><a href="../../../../index.html#send">send</a></b>-like accessor command,
and an identifier for the remote entity hosting the array, in this
order. All changes are mirrored to that array, via the command
prefix. All commands will be executed in the context of the global
namespace.</p>
<p><b class="cmd"><a href="../../../../index.html#send">send</a></b>-like means that the command prefix has to have <b class="cmd"><a href="../../../../index.html#send">send</a></b>
syntax and semantics. I.e. it is a channel over which we can send
arbitrary commands to some other entity.
The remote array <i class="term"><a href="../../../../index.html#data_source">data source</a></i> however uses only the commands
<b class="cmd"><a href="../../../../index.html#set">set</a></b>, <b class="cmd">unset</b>, <b class="cmd">array exists</b>, <b class="cmd">array names</b>, <b class="cmd">array set</b>, and
<b class="cmd">array get</b> to retrieve and set values in the remote array.</p>
<p>The command prefix and the entity id are separate to allow the data
source to use options like <b class="option">-async</b> when assembling the actual
commands.</p>
<p>Examples of command prefixes, listed with the id of the remote entity,
without options. In reality only the part before the id is the command
prefix:</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#send">send</a></b> <i class="arg">tkname</i></dt>
<dd><p>The Tcl array is in a remote interpreter and is accessed via Tk's X
communication.</p></dd>
<dt><b class="cmd">comm::comm send</b> <i class="arg">hostportid</i></dt>
<dd><p>The Tcl array is in a remote interpreter and is accessed through a
socket.</p></dd>
<dt><b class="cmd">thread::send</b> <i class="arg">threadid</i></dt>
<dd><p>The Tcl array is in a remote interpreter in a different thread of this
process.</p></dd>
</dl></dd>
<dt><b class="const">file</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#data_source">data source</a></i> uses a single file as origin of the
persistent data. It accepts a single identifying argument, the path to
this file. The file has to be both readable and writable. It may not
exist, the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> will create it in that case. This (and
only this) situation will require that the directory for the file
exists and is writable as well.</p>
<p>All changes are saved in the file, as proper Tcl commands, one command
per operation. In other words, the file will always contain a proper
Tcl script.</p>
<p>If the file exists when the tie using it is set up, then it will be
compacted, i.e. superfluous operations are removed, if the operations
log stored in it contains either at least one operation clearing the
whole array, or at least 1.5 times more operations than entries in the
loaded array.</p></dd>
<dt><b class="const">growfile</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#data_source">data source</a></i> is like <b class="const">file</b> in terms of the storage
medium for the array data, and how it is configured. In constrast to
the former it however assumes and ensures that the tied array will
never shrink. I.e. the creation of new array entries, and the
modification of existing entries is allowed, but the deletion of
entries is not, and causes the data source to throw errors.</p>
<p>This restriction allows us to simplify both file format and access to
the file radically. For one, the file is read only once and the
internal cache cannot be invalidated. Second, writing data is reduced
to a simple append, and no compaction step is necessary. The format of
the contents is the string representation of a dictionary which can be
incrementally extended forever at the end.</p></dd>
<dt><b class="const">dsource</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#data_source">data source</a></i> uses an explicitly specified
<i class="term">data source object</i> as the source for the persistent
data. It accepts a single identifying argument, the command prefix,
i.e. object command.</p>
<p>To use this type it is necessary to know how the framework manages
ties and what <span class="sectref"><a href="#subsection3">data source objects</a></span> are.</p>
<p>All changes are delegated to the specified object.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CREATING NEW DATA SOURCES</a></h2>
<p>This section is of no interest to the casual user of ties. Only
developers wishing to create new data sources have to know the
information provided herein.</p>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">DATA SOURCE OBJECTS</a></h3>
<p>All ties are represented internally by an in-memory object which
mediates between the tie framework and the specific
<i class="term"><a href="../../../../index.html#data_source">data source</a></i>, like an array, file, etc.
This is the <i class="term">data source object</i>.</p>
<p>Its class, the <span class="sectref"><a href="#subsection5">data source class</a></span> is <em>not</em> generic,
but specific to the type of the <i class="term"><a href="../../../../index.html#data_source">data source</a></i>. Writing a new
<i class="term"><a href="../../../../index.html#data_source">data source</a></i> requires us to write such a class, and then
registering it with the framework as a new type.</p>
<p>The following subsections describe the various APIs a
<span class="sectref"><a href="#subsection5">data source class</a></span> and the objects it generates will have
to follow to be compatible with the tie framework.</p>
<p>Data source objects are normally automatically created and destroyed
by the framework when a tie is created, or removed. This management
can be explicitly bypassed through the usage of the &quot;dsource&quot; type.
The <i class="term"><a href="../../../../index.html#data_source">data source</a></i> for this type is a
<i class="term">data source object</i> itself, and this object is outside of the
scope of the tie framework and not managed by it.
In other words, this type allows the creation of ties which talk to
pre-existing <i class="term">data source object</i>s, and these objects will
survive the removal of the ties using them as well.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">REGISTERING A NEW DATA SOURCE CLASS</a></h3>
<p>After a <span class="sectref"><a href="#subsection5">data source class</a></span> has been written it is necessary
to register it as a new type with the framework.</p>
<dl class="doctools_definitions">
<dt><a name="6"><b class="cmd">::tie::register</b> <i class="arg">dsclasscmd</i> <b class="const">as</b> <i class="arg">dstype</i></a></dt>
<dd><p>Using this command causes the tie framework to remember the class
command <i class="arg">dsclasscmd</i> of a <span class="sectref"><a href="#subsection5">data source class</a></span> under the
type name <i class="arg">dstype</i>.</p>
<p>After the call the argument <i class="arg">dstype</i> of the basic user command
<b class="cmd">::tie::tie</b> will accept <i class="arg">dstype</i> as a type name and translate
it internally to the appropriate class command for the creation of
<span class="sectref"><a href="#subsection3">data source objects</a></span> for the new <i class="term"><a href="../../../../index.html#data_source">data source</a></i>.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">DATA SOURCE CLASS</a></h3>
<p>Each data source class is represented by a single command, also called
the <i class="term">class command</i>, or <i class="term">object creation command</i>. Its
syntax is</p>
<dl class="doctools_definitions">







|



|



|

|

|




|


|
|








|










|


|











|












|
















|


|
|







|

















|







277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
</dl>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">STANDARD DATA SOURCE TYPES</a></h3>
<p>This package provides the six following types as examples and standard
data sources.</p>
<dl class="doctools_definitions">
<dt><b class="const">log</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> does not maintain any actual data, nor
persistence. It does not accept any identifying arguments. All changes
are simply logged to <b class="const">stdout</b>.</p></dd>
<dt><b class="const">array</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> uses a regular Tcl array as the origin of
the persistent data. It accepts a single identifying argument, the
name of this Tcl array. All changes are mirrored to that array.</p></dd>
<dt><b class="const">remotearray</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> is similar to <b class="const">array</b>. The difference
is that the Tcl array to which we are mirroring is not directly
accessible, but through a <b class="cmd"><a href="../../../../index.html#key353">send</a></b>-like command.</p>
<p>It accepts three identifying arguments, the name of the other Tcl
array, the command prefix for the <b class="cmd"><a href="../../../../index.html#key353">send</a></b>-like accessor command,
and an identifier for the remote entity hosting the array, in this
order. All changes are mirrored to that array, via the command
prefix. All commands will be executed in the context of the global
namespace.</p>
<p><b class="cmd"><a href="../../../../index.html#key353">send</a></b>-like means that the command prefix has to have <b class="cmd"><a href="../../../../index.html#key353">send</a></b>
syntax and semantics. I.e. it is a channel over which we can send
arbitrary commands to some other entity.
The remote array <i class="term"><a href="../../../../index.html#key365">data source</a></i> however uses only the commands
<b class="cmd"><a href="../../../../index.html#key301">set</a></b>, <b class="cmd">unset</b>, <b class="cmd">array exists</b>, <b class="cmd">array names</b>, <b class="cmd">array set</b>, and
<b class="cmd">array get</b> to retrieve and set values in the remote array.</p>
<p>The command prefix and the entity id are separate to allow the data
source to use options like <b class="option">-async</b> when assembling the actual
commands.</p>
<p>Examples of command prefixes, listed with the id of the remote entity,
without options. In reality only the part before the id is the command
prefix:</p>
<dl class="doctools_definitions">
<dt><b class="cmd"><a href="../../../../index.html#key353">send</a></b> <i class="arg">tkname</i></dt>
<dd><p>The Tcl array is in a remote interpreter and is accessed via Tk's X
communication.</p></dd>
<dt><b class="cmd">comm::comm send</b> <i class="arg">hostportid</i></dt>
<dd><p>The Tcl array is in a remote interpreter and is accessed through a
socket.</p></dd>
<dt><b class="cmd">thread::send</b> <i class="arg">threadid</i></dt>
<dd><p>The Tcl array is in a remote interpreter in a different thread of this
process.</p></dd>
</dl></dd>
<dt><b class="const">file</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> uses a single file as origin of the
persistent data. It accepts a single identifying argument, the path to
this file. The file has to be both readable and writable. It may not
exist, the <i class="term"><a href="../../../../index.html#key365">data source</a></i> will create it in that case. This (and
only this) situation will require that the directory for the file
exists and is writable as well.</p>
<p>All changes are saved in the file, as proper Tcl commands, one command
per operation. In other words, the file will always contain a proper
Tcl script.</p>
<p>If the file exists when the tie using it is set up, then it will be
compacted, i.e. superfluous operations are removed, if the operations
log stored in it contains either at least one operation clearing the
whole array, or at least 1.5 times more operations than entries in the
loaded array.</p></dd>
<dt><b class="const">growfile</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> is like <b class="const">file</b> in terms of the storage
medium for the array data, and how it is configured. In constrast to
the former it however assumes and ensures that the tied array will
never shrink. I.e. the creation of new array entries, and the
modification of existing entries is allowed, but the deletion of
entries is not, and causes the data source to throw errors.</p>
<p>This restriction allows us to simplify both file format and access to
the file radically. For one, the file is read only once and the
internal cache cannot be invalidated. Second, writing data is reduced
to a simple append, and no compaction step is necessary. The format of
the contents is the string representation of a dictionary which can be
incrementally extended forever at the end.</p></dd>
<dt><b class="const">dsource</b></dt>
<dd><p>This <i class="term"><a href="../../../../index.html#key365">data source</a></i> uses an explicitly specified
<i class="term">data source object</i> as the source for the persistent
data. It accepts a single identifying argument, the command prefix,
i.e. object command.</p>
<p>To use this type it is necessary to know how the framework manages
ties and what <span class="sectref"><a href="#subsection3">data source objects</a></span> are.</p>
<p>All changes are delegated to the specified object.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">CREATING NEW DATA SOURCES</a></h2>
<p>This section is of no interest to the casual user of ties. Only
developers wishing to create new data sources have to know the
information provided herein.</p>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">DATA SOURCE OBJECTS</a></h3>
<p>All ties are represented internally by an in-memory object which
mediates between the tie framework and the specific
<i class="term"><a href="../../../../index.html#key365">data source</a></i>, like an array, file, etc.
This is the <i class="term">data source object</i>.</p>
<p>Its class, the <span class="sectref"><a href="#subsection5">data source class</a></span> is <em>not</em> generic,
but specific to the type of the <i class="term"><a href="../../../../index.html#key365">data source</a></i>. Writing a new
<i class="term"><a href="../../../../index.html#key365">data source</a></i> requires us to write such a class, and then
registering it with the framework as a new type.</p>
<p>The following subsections describe the various APIs a
<span class="sectref"><a href="#subsection5">data source class</a></span> and the objects it generates will have
to follow to be compatible with the tie framework.</p>
<p>Data source objects are normally automatically created and destroyed
by the framework when a tie is created, or removed. This management
can be explicitly bypassed through the usage of the &quot;dsource&quot; type.
The <i class="term"><a href="../../../../index.html#key365">data source</a></i> for this type is a
<i class="term">data source object</i> itself, and this object is outside of the
scope of the tie framework and not managed by it.
In other words, this type allows the creation of ties which talk to
pre-existing <i class="term">data source object</i>s, and these objects will
survive the removal of the ties using them as well.</p>
</div>
<div id="subsection4" class="doctools_subsection"><h3><a name="subsection4">REGISTERING A NEW DATA SOURCE CLASS</a></h3>
<p>After a <span class="sectref"><a href="#subsection5">data source class</a></span> has been written it is necessary
to register it as a new type with the framework.</p>
<dl class="doctools_definitions">
<dt><a name="6"><b class="cmd">::tie::register</b> <i class="arg">dsclasscmd</i> <b class="const">as</b> <i class="arg">dstype</i></a></dt>
<dd><p>Using this command causes the tie framework to remember the class
command <i class="arg">dsclasscmd</i> of a <span class="sectref"><a href="#subsection5">data source class</a></span> under the
type name <i class="arg">dstype</i>.</p>
<p>After the call the argument <i class="arg">dstype</i> of the basic user command
<b class="cmd">::tie::tie</b> will accept <i class="arg">dstype</i> as a type name and translate
it internally to the appropriate class command for the creation of
<span class="sectref"><a href="#subsection3">data source objects</a></span> for the new <i class="term"><a href="../../../../index.html#key365">data source</a></i>.</p></dd>
</dl>
</div>
<div id="subsection5" class="doctools_subsection"><h3><a name="subsection5">DATA SOURCE CLASS</a></h3>
<p>Each data source class is represented by a single command, also called
the <i class="term">class command</i>, or <i class="term">object creation command</i>. Its
syntax is</p>
<dl class="doctools_definitions">
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
The interface this command has to follow is described in the section
<span class="sectref"><a href="#subsection6">DATA SOURCE OBJECT API</a></span></p></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">DATA SOURCE OBJECT API</a></h3>
<p>Please read the section <span class="sectref"><a href="#subsection5">DATA SOURCE CLASS</a></span> first, to know
how to generate new <i class="term">object commands</i>.</p>
<p>Each <i class="term">object command</i> for a <i class="term"><a href="../../../../index.html#data_source">data source</a></i> object has to
provide at least the methods listed below for proper inter-operation
with the tie framework. Note that the names of most of the methods
match the subcommands of the builtin <b class="cmd"><a href="../../../../index.html#array">array</a></b> command.</p>
<dl class="doctools_definitions">
<dt><a name="8"><b class="cmd">ds</b> <b class="method">destroy</b></a></dt>
<dd><p>This method is called when the object <b class="cmd">ds</b> is destroyed. It now
has to release all its internal resources associated with the external
data source.</p></dd>
<dt><a name="9"><b class="cmd">ds</b> <b class="method">names</b></a></dt>
<dd><p>This command has to return a list containing the names of all keys
found in the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> the object talks to. This is
equivalent to <b class="cmd">array names</b>.</p></dd>
<dt><a name="10"><b class="cmd">ds</b> <b class="method">size</b></a></dt>
<dd><p>This command has to return an integer number specifying the number of
keys found in the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> the object talks to. This is
equivalent to <b class="cmd">array size</b>.</p></dd>
<dt><a name="11"><b class="cmd">ds</b> <b class="method">get</b></a></dt>
<dd><p>This command has to return a dictionary containing the data found in
the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> the object talks to. This is equivalent to
<b class="cmd">array get</b>.</p></dd>
<dt><a name="12"><b class="cmd">ds</b> <b class="method">set</b> <i class="arg">dict</i></a></dt>
<dd><p>This command takes a dictionary and adds its contents to the data
source the object talks to. This is equivalent to <b class="cmd">array set</b>.</p></dd>
<dt><a name="13"><b class="cmd">ds</b> <b class="method">unset</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This command takes a pattern and removes all elements whose keys
matching it from the <i class="term"><a href="../../../../index.html#data_source">data source</a></i>. If no pattern is specified
it defaults to <b class="const">*</b>, causing the removal of all elements. This
is nearly equivalent to <b class="cmd">array unset</b>.</p></dd>
<dt><a name="14"><b class="cmd">ds</b> <b class="method">setv</b> <i class="arg">index</i> <i class="arg">value</i></a></dt>
<dd><p>This command has to save the <i class="arg">value</i> in the <i class="term"><a href="../../../../index.html#data_source">data source</a></i>
the object talks to, under the key <i class="arg">index</i>.</p>
<p>The result of the command is ignored. If an error is thrown then this
error will show up as error of the set operation which caused the
method call.</p></dd>
<dt><a name="15"><b class="cmd">ds</b> <b class="method">unsetv</b> <i class="arg">index</i></a></dt>
<dd><p>This command has to remove the value under the key <i class="arg">index</i> from
the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> the object talks to.</p>
<p>The result of the command is ignored. If an error is thrown then this
error will show up as error of the unset operation which caused the
method call.</p></dd>
<dt><a name="16"><b class="cmd">ds</b> <b class="method">getv</b> <i class="arg">index</i></a></dt>
<dd><p>This command has to return the value for the key <i class="arg">index</i> in the
<i class="term"><a href="../../../../index.html#data_source">data source</a></i> the object talks to.</p></dd>
</dl>
<p>And here a small table comparing the <i class="term"><a href="../../../../index.html#data_source">data source</a></i> methods to
the regular Tcl commands for accessing an array.</p>
<pre class="doctools_example">
        Regular Tcl             Data source
        -----------             -----------
        array names a           ds names
        array size  a           ds size
        array get   a           ds get







|


|







|



|



|






|



|






|





|

|







421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
The interface this command has to follow is described in the section
<span class="sectref"><a href="#subsection6">DATA SOURCE OBJECT API</a></span></p></dd>
</dl>
</div>
<div id="subsection6" class="doctools_subsection"><h3><a name="subsection6">DATA SOURCE OBJECT API</a></h3>
<p>Please read the section <span class="sectref"><a href="#subsection5">DATA SOURCE CLASS</a></span> first, to know
how to generate new <i class="term">object commands</i>.</p>
<p>Each <i class="term">object command</i> for a <i class="term"><a href="../../../../index.html#key365">data source</a></i> object has to
provide at least the methods listed below for proper inter-operation
with the tie framework. Note that the names of most of the methods
match the subcommands of the builtin <b class="cmd"><a href="../../../../index.html#key37">array</a></b> command.</p>
<dl class="doctools_definitions">
<dt><a name="8"><b class="cmd">ds</b> <b class="method">destroy</b></a></dt>
<dd><p>This method is called when the object <b class="cmd">ds</b> is destroyed. It now
has to release all its internal resources associated with the external
data source.</p></dd>
<dt><a name="9"><b class="cmd">ds</b> <b class="method">names</b></a></dt>
<dd><p>This command has to return a list containing the names of all keys
found in the <i class="term"><a href="../../../../index.html#key365">data source</a></i> the object talks to. This is
equivalent to <b class="cmd">array names</b>.</p></dd>
<dt><a name="10"><b class="cmd">ds</b> <b class="method">size</b></a></dt>
<dd><p>This command has to return an integer number specifying the number of
keys found in the <i class="term"><a href="../../../../index.html#key365">data source</a></i> the object talks to. This is
equivalent to <b class="cmd">array size</b>.</p></dd>
<dt><a name="11"><b class="cmd">ds</b> <b class="method">get</b></a></dt>
<dd><p>This command has to return a dictionary containing the data found in
the <i class="term"><a href="../../../../index.html#key365">data source</a></i> the object talks to. This is equivalent to
<b class="cmd">array get</b>.</p></dd>
<dt><a name="12"><b class="cmd">ds</b> <b class="method">set</b> <i class="arg">dict</i></a></dt>
<dd><p>This command takes a dictionary and adds its contents to the data
source the object talks to. This is equivalent to <b class="cmd">array set</b>.</p></dd>
<dt><a name="13"><b class="cmd">ds</b> <b class="method">unset</b> <span class="opt">?<i class="arg">pattern</i>?</span></a></dt>
<dd><p>This command takes a pattern and removes all elements whose keys
matching it from the <i class="term"><a href="../../../../index.html#key365">data source</a></i>. If no pattern is specified
it defaults to <b class="const">*</b>, causing the removal of all elements. This
is nearly equivalent to <b class="cmd">array unset</b>.</p></dd>
<dt><a name="14"><b class="cmd">ds</b> <b class="method">setv</b> <i class="arg">index</i> <i class="arg">value</i></a></dt>
<dd><p>This command has to save the <i class="arg">value</i> in the <i class="term"><a href="../../../../index.html#key365">data source</a></i>
the object talks to, under the key <i class="arg">index</i>.</p>
<p>The result of the command is ignored. If an error is thrown then this
error will show up as error of the set operation which caused the
method call.</p></dd>
<dt><a name="15"><b class="cmd">ds</b> <b class="method">unsetv</b> <i class="arg">index</i></a></dt>
<dd><p>This command has to remove the value under the key <i class="arg">index</i> from
the <i class="term"><a href="../../../../index.html#key365">data source</a></i> the object talks to.</p>
<p>The result of the command is ignored. If an error is thrown then this
error will show up as error of the unset operation which caused the
method call.</p></dd>
<dt><a name="16"><b class="cmd">ds</b> <b class="method">getv</b> <i class="arg">index</i></a></dt>
<dd><p>This command has to return the value for the key <i class="arg">index</i> in the
<i class="term"><a href="../../../../index.html#key365">data source</a></i> the object talks to.</p></dd>
</dl>
<p>And here a small table comparing the <i class="term"><a href="../../../../index.html#key365">data source</a></i> methods to
the regular Tcl commands for accessing an array.</p>
<pre class="doctools_example">
        Regular Tcl             Data source
        -----------             -----------
        array names a           ds names
        array size  a           ds size
        array get   a           ds get
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#array">array</a>, <a href="../../../../index.html#database">database</a>, <a href="../../../../index.html#file">file</a>, <a href="../../../../index.html#metakit">metakit</a>, <a href="../../../../index.html#persistence">persistence</a>, <a href="../../../../index.html#tie">tie</a>, <a href="../../../../index.html#untie">untie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








491
492
493
494
495
496
497






498
499
500
501
502
503
504
505
506
507
508
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key37">array</a>, <a href="../../../../index.html#key34">database</a>, <a href="../../../../index.html#key31">file</a>, <a href="../../../../index.html#key36">metakit</a>, <a href="../../../../index.html#key33">persistence</a>, <a href="../../../../index.html#key35">tie</a>, <a href="../../../../index.html#key32">untie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004-2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tie/tie_std.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>tie - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>tie - Tcl Data Structures</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tie_std.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008-2015 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tie.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tie(n) 1.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tie - Array persistence, standard data sources</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tie_std.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tie.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tie(n) 1.1 tcllib &quot;Tcl Data Structures&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tie - Array persistence, standard data sources</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#array">array</a>, <a href="../../../../index.html#database">database</a>, <a href="../../../../index.html#file">file</a>, <a href="../../../../index.html#metakit">metakit</a>, <a href="../../../../index.html#persistence">persistence</a>, <a href="../../../../index.html#tie">tie</a>, <a href="../../../../index.html#untie">untie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








147
148
149
150
151
152
153






154
155
156
157
158
159
160
161
162
163
164
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tie</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key37">array</a>, <a href="../../../../index.html#key34">database</a>, <a href="../../../../index.html#key31">file</a>, <a href="../../../../index.html#key36">metakit</a>, <a href="../../../../index.html#key33">persistence</a>, <a href="../../../../index.html#key35">tie</a>, <a href="../../../../index.html#key32">untie</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2015 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tiff/tiff.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>tiff - TIFF image manipulation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>tiff - TIFF image manipulation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tiff.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2005-2006, Aaron Faupell &amp;lt;afaupell@users.sourceforge.net&amp;gt;
   -->
<!-- tiff.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tiff(n) 0.2.1 tcllib &quot;TIFF image manipulation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tiff - TIFF reading, writing, and querying and manipulation of meta data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tiff.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2005-2006, Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;
   -->
<! -- tiff.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tiff(n) 0.2.1 tcllib &quot;TIFF image manipulation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tiff - TIFF reading, writing, and querying and manipulation of meta data</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tiff</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#image">image</a>, <a href="../../../../index.html#tif">tif</a>, <a href="../../../../index.html#tiff">tiff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006, Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








277
278
279
280
281
282
283






284
285
286
287
288
289
290
291
292
293
294
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tiff</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key121">image</a>, <a href="../../../../index.html#key120">tif</a>, <a href="../../../../index.html#key119">tiff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File formats</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2005-2006, Aaron Faupell &lt;afaupell@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tool/meta.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>oo::util - Utility commands for TclOO</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>oo::util - Utility commands for TclOO</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'meta.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011-2015 Andreas Kupries, BSD licensed
   -->
<!-- oo::util.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oo::util(n) 1.2.2 tcllib &quot;Utility commands for TclOO&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oo::util - Utility commands for TclOO</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'meta.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011-2015 Andreas Kupries, BSD licensed
   -->
<! -- oo::util.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">oo::util(n) 1.2.2 tcllib &quot;Utility commands for TclOO&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>oo::util - Utility commands for TclOO</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>oo::util</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../snit/snit.html">snit(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tcloo">TclOO</a>, <a href="../../../../index.html#callback">callback</a>, <a href="../../../../index.html#class_methods">class methods</a>, <a href="../../../../index.html#class_variables">class variables</a>, <a href="../../../../index.html#command_prefix">command prefix</a>, <a href="../../../../index.html#currying">currying</a>, <a href="../../../../index.html#method_reference">method reference</a>, <a href="../../../../index.html#my_method">my method</a>, <a href="../../../../index.html#singleton">singleton</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011-2015 Andreas Kupries, BSD licensed</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








262
263
264
265
266
267
268






269
270
271
272
273
274
275
276
277
278
279
280
281
282
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>oo::util</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../snit/snit.html">snit(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key757">TclOO</a>, <a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key758">class methods</a>, <a href="../../../../index.html#key761">class variables</a>, <a href="../../../../index.html#key595">command prefix</a>, <a href="../../../../index.html#key597">currying</a>, <a href="../../../../index.html#key756">method reference</a>, <a href="../../../../index.html#key760">my method</a>, <a href="../../../../index.html#key759">singleton</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011-2015 Andreas Kupries, BSD licensed</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tool/tool.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tool - Standardized OO Framework for development</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tool - Standardized OO Framework for development</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tool.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2015 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- tool.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tool(n) 0.4.2 tcllib &quot;Standardized OO Framework for development&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tool - TclOO Library (TOOL) Framework</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Keywords</a></li>







|

|

|



|
|
|
|
|
|




|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tool.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;
   -->
<! -- tool.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tool(n) 0.4.2 tcllib &quot;Standardized OO Framework for development&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tool - Dictionary Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Keywords</a></li>
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<li>package require <b class="pkgname">sha1</b></li>
<li>package require <b class="pkgname">dicttool</b></li>
<li>package require <b class="pkgname">oo::meta</b></li>
<li>package require <b class="pkgname">oo::dialect</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1">tool::define <b class="cmd">class_method</b> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#2">tool::define <b class="cmd"><a href="../../../../index.html#array">array</a></b> <i class="arg">name</i> <i class="arg">contents</i></a></li>
<li><a href="#3">tool::define <b class="cmd">array_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></li>
<li><a href="#4">tool::define <b class="cmd">dict_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></li>
<li><a href="#5">tool::define <b class="cmd"><a href="../../../../index.html#method">method</a></b> <i class="arg">methodname</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#6">tool::define <b class="cmd">option</b> <i class="arg">name</i> <i class="arg">dictopts</i></a></li>
<li><a href="#7">tool::define <b class="cmd">property</b> <span class="opt">?branch?</span> <i class="arg">field</i> <i class="arg">value</i></a></li>
<li><a href="#8">tool::define <b class="cmd">variable</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#9"><em>object</em> <b class="cmd">cget</b> <i class="arg">option</i></a></li>
<li><a href="#10"><em>object</em> <b class="cmd">configure</b> <span class="opt">?keyvaluelist?</span></a></li>
<li><a href="#11"><em>object</em> <b class="cmd">configure</b> <i class="arg">field</i> <i class="arg">value</i> <span class="opt">?field?</span> <span class="opt">?value?</span> <span class="opt">?...?</span></a></li>
<li><a href="#12"><em>object</em> <b class="cmd">configurelist</b> <span class="opt">?keyvaluelist?</span></a></li>







|


|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<li>package require <b class="pkgname">sha1</b></li>
<li>package require <b class="pkgname">dicttool</b></li>
<li>package require <b class="pkgname">oo::meta</b></li>
<li>package require <b class="pkgname">oo::dialect</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1">tool::define <b class="cmd">class_method</b> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#2">tool::define <b class="cmd"><a href="../../../../index.html#key37">array</a></b> <i class="arg">name</i> <i class="arg">contents</i></a></li>
<li><a href="#3">tool::define <b class="cmd">array_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></li>
<li><a href="#4">tool::define <b class="cmd">dict_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></li>
<li><a href="#5">tool::define <b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">methodname</i> <i class="arg">arglist</i> <i class="arg">body</i></a></li>
<li><a href="#6">tool::define <b class="cmd">option</b> <i class="arg">name</i> <i class="arg">dictopts</i></a></li>
<li><a href="#7">tool::define <b class="cmd">property</b> <span class="opt">?branch?</span> <i class="arg">field</i> <i class="arg">value</i></a></li>
<li><a href="#8">tool::define <b class="cmd">variable</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#9"><em>object</em> <b class="cmd">cget</b> <i class="arg">option</i></a></li>
<li><a href="#10"><em>object</em> <b class="cmd">configure</b> <span class="opt">?keyvaluelist?</span></a></li>
<li><a href="#11"><em>object</em> <b class="cmd">configure</b> <i class="arg">field</i> <i class="arg">value</i> <span class="opt">?field?</span> <span class="opt">?value?</span> <span class="opt">?...?</span></a></li>
<li><a href="#12"><em>object</em> <b class="cmd">configurelist</b> <span class="opt">?keyvaluelist?</span></a></li>
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<div id="section2" class="doctools_section"><h2><a name="section2">Keywords</a></h2>
<p>TOOL adds new (or modifies) keywords used in the definitions of classes. However,
the new keywords are only available via calls to <em>tool::class create</em> or <em>tool::define</em></p>
<dl class="doctools_definitions">
<dt><a name="1">tool::define <b class="cmd">class_method</b> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Defines a method for the class object itself. This method will be passed on to descendents of the class,
unlike <b class="cmd">self method</b>.</p></dd>
<dt><a name="2">tool::define <b class="cmd"><a href="../../../../index.html#array">array</a></b> <i class="arg">name</i> <i class="arg">contents</i></a></dt>
<dd><p>Declares a variable <i class="arg">name</i> which will be initialized as an array, populated with <i class="arg">contents</i> for objects of this class, as well as any
objects for classes which are descendents of this class.</p></dd>
<dt><a name="3">tool::define <b class="cmd">array_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></dt>
<dd><p>Declares a method ensemble <i class="arg">methodname</i> which will control access to variable
<i class="arg">varname</i>. Cases are a key/value list of method names and bodies which will be
overlaid on top of the standard template. See <b class="package">tool::array_ensemble</b>.</p>
<p>One method name is reserved: <b class="cmd">initialize</b>. <b class="cmd">initialize</b> Declares the initial values to be populated in the array, as a key/value list,
and will not be expressed as a method for the ensemble.</p></dd>
<dt><a name="4">tool::define <b class="cmd">dict_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></dt>
<dd><p>Declares a method ensemble <i class="arg">methodname</i> which will control access to variable
<i class="arg">varname</i>. Cases are a key/value list of method names and bodies which will be
overlaid on top of the standard template. See <b class="package"><a href="tool_dict_ensemble.html">tool::dict_ensemble</a></b>.</p>
<p>One method name is reserved: <b class="cmd">initialize</b>. <b class="cmd">initialize</b> Declares the initial values to be populated in the array, as a key/value list,
and will not be expressed as a method for the ensemble.</p></dd>
<dt><a name="5">tool::define <b class="cmd"><a href="../../../../index.html#method">method</a></b> <i class="arg">methodname</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>If <i class="arg">methodname</i> contains ::, the method is considered to be
part of a method ensemble. See <b class="package">tool::method_ensembles</b>. Otherwise
this command behaves exactly like the standard <b class="namespace">oo::define</b> <b class="cmd"><a href="../../../../index.html#method">method</a></b>
command.</p></dd>
<dt><a name="6">tool::define <b class="cmd">option</b> <i class="arg">name</i> <i class="arg">dictopts</i></a></dt>
<dd><p>Declares an option. <i class="arg">dictopts</i> is a key/value list defining parameters for the option. See <b class="package">tool::option_handling</b>.</p>
<pre class="doctools_example">
tool::class create myclass {
  option color {
    post-command: {puts [list %self%'s %field% is now %value%]}







|














|


|







200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<div id="section2" class="doctools_section"><h2><a name="section2">Keywords</a></h2>
<p>TOOL adds new (or modifies) keywords used in the definitions of classes. However,
the new keywords are only available via calls to <em>tool::class create</em> or <em>tool::define</em></p>
<dl class="doctools_definitions">
<dt><a name="1">tool::define <b class="cmd">class_method</b> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>Defines a method for the class object itself. This method will be passed on to descendents of the class,
unlike <b class="cmd">self method</b>.</p></dd>
<dt><a name="2">tool::define <b class="cmd"><a href="../../../../index.html#key37">array</a></b> <i class="arg">name</i> <i class="arg">contents</i></a></dt>
<dd><p>Declares a variable <i class="arg">name</i> which will be initialized as an array, populated with <i class="arg">contents</i> for objects of this class, as well as any
objects for classes which are descendents of this class.</p></dd>
<dt><a name="3">tool::define <b class="cmd">array_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></dt>
<dd><p>Declares a method ensemble <i class="arg">methodname</i> which will control access to variable
<i class="arg">varname</i>. Cases are a key/value list of method names and bodies which will be
overlaid on top of the standard template. See <b class="package">tool::array_ensemble</b>.</p>
<p>One method name is reserved: <b class="cmd">initialize</b>. <b class="cmd">initialize</b> Declares the initial values to be populated in the array, as a key/value list,
and will not be expressed as a method for the ensemble.</p></dd>
<dt><a name="4">tool::define <b class="cmd">dict_ensemble</b> <i class="arg">methodname</i> <i class="arg">varname</i> <span class="opt">?cases?</span></a></dt>
<dd><p>Declares a method ensemble <i class="arg">methodname</i> which will control access to variable
<i class="arg">varname</i>. Cases are a key/value list of method names and bodies which will be
overlaid on top of the standard template. See <b class="package"><a href="tool_dict_ensemble.html">tool::dict_ensemble</a></b>.</p>
<p>One method name is reserved: <b class="cmd">initialize</b>. <b class="cmd">initialize</b> Declares the initial values to be populated in the array, as a key/value list,
and will not be expressed as a method for the ensemble.</p></dd>
<dt><a name="5">tool::define <b class="cmd"><a href="../../../../index.html#key372">method</a></b> <i class="arg">methodname</i> <i class="arg">arglist</i> <i class="arg">body</i></a></dt>
<dd><p>If <i class="arg">methodname</i> contains ::, the method is considered to be
part of a method ensemble. See <b class="package">tool::method_ensembles</b>. Otherwise
this command behaves exactly like the standard <b class="namespace">oo::define</b> <b class="cmd"><a href="../../../../index.html#key372">method</a></b>
command.</p></dd>
<dt><a name="6">tool::define <b class="cmd">option</b> <i class="arg">name</i> <i class="arg">dictopts</i></a></dt>
<dd><p>Declares an option. <i class="arg">dictopts</i> is a key/value list defining parameters for the option. See <b class="package">tool::option_handling</b>.</p>
<pre class="doctools_example">
tool::class create myclass {
  option color {
    post-command: {puts [list %self%'s %field% is now %value%]}
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Sean Woods</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tcloo</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tool">TOOL</a>, <a href="../../../../index.html#tcloo">TclOO</a>, <a href="../../../../index.html#framework">framework</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>TclOO</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>







|



<
<
<
<
<
<


|


|





331
332
333
334
335
336
337
338
339
340
341






342
343
344
345
346
347
348
349
350
351
352
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">AUTHORS</a></h2>
<p>Sean Woods</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tool</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key776">TOOL</a>, <a href="../../../../index.html#key757">TclOO</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/tool/tool_dict_ensemble.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tool::dict_ensemble - Standardized OO Framework for development</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tool::dict_ensemble - Standardized OO Framework for development</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tool_dict_ensemble.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2015 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- tool::dict_ensemble.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tool::dict_ensemble(n) 0.4.2 tcllib &quot;Standardized OO Framework for development&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tool::dict_ensemble - Dictionary Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tool_dict_ensemble.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;
   -->
<! -- tool::dict_ensemble.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tool::dict_ensemble(n) 0.4.2 tcllib &quot;Standardized OO Framework for development&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tool::dict_ensemble - Dictionary Tools</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tool</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tool">TOOL</a>, <a href="../../../../index.html#tcloo">TclOO</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








153
154
155
156
157
158
159






160
161
162
163
164
165
166
167
168
169
170
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>tool</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key776">TOOL</a>, <a href="../../../../index.html#key757">TclOO</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/transfer/connect.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>transfer::connect - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>transfer::connect - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'connect.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- transfer::connect.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::connect(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::connect - Connection setup</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'connect.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- transfer::connect.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::connect(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::connect - Connection setup</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects holding enough information to enable
them to either actively connect to a counterpart, or to passively wait
for a connection from said counterpart.
I.e. any object created by this packages is always in one of two
complementary modes, called <i class="term"><a href="../../../../index.html#active">active</a></i> (the object initiates the
connection) and <i class="term"><a href="../../../../index.html#passive">passive</a></i> (the object receives the connection).</p>
<p>Of the two objects in a connecting pair one has to be configured for
<i class="term"><a href="../../../../index.html#active">active</a></i> mode, and the other then has to be configured for
<i class="term"><a href="../../../../index.html#passive">passive</a></i> mode. This establishes which of the two partners
connects to whom (the <i class="term"><a href="../../../../index.html#active">active</a></i> to the other), or, who is waiting
on whom (the <i class="term"><a href="../../../../index.html#passive">passive</a></i> on the other).
Note that this is completely independent of the direction of any data
transmission using the connection after it has been established.
An active object can, after establishing the connection, either
transmit or receive data. Equivalently the passive object can do the
same after the waiting for its partner has ended.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::connect</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new connection object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#object">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>







|
|

|
|
|
|












|







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides objects holding enough information to enable
them to either actively connect to a counterpart, or to passively wait
for a connection from said counterpart.
I.e. any object created by this packages is always in one of two
complementary modes, called <i class="term"><a href="../../../../index.html#key613">active</a></i> (the object initiates the
connection) and <i class="term"><a href="../../../../index.html#key614">passive</a></i> (the object receives the connection).</p>
<p>Of the two objects in a connecting pair one has to be configured for
<i class="term"><a href="../../../../index.html#key613">active</a></i> mode, and the other then has to be configured for
<i class="term"><a href="../../../../index.html#key614">passive</a></i> mode. This establishes which of the two partners
connects to whom (the <i class="term"><a href="../../../../index.html#key613">active</a></i> to the other), or, who is waiting
on whom (the <i class="term"><a href="../../../../index.html#key614">passive</a></i> on the other).
Note that this is completely independent of the direction of any data
transmission using the connection after it has been established.
An active object can, after establishing the connection, either
transmit or receive data. Equivalently the passive object can do the
same after the waiting for its partner has ended.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::connect</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new connection object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object.
This is safe to do for an <i class="term"><a href="../../../../index.html#active">active</a></i> object when a connection has
been started, as the completion callback is synchronous.
For a <i class="term"><a href="../../../../index.html#passive">passive</a></i> object currently waiting for its partner to
establish the connection however this is not safe and will cause
errors later on, when the connection setup completes and tries to
access the now missing data structures of the destroyed object.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">connect</b> <i class="arg">command</i></a></dt>
<dd><p>This method starts the connection setup per the configuration of the
object. When the connection is established the callback <i class="arg">command</i>
will be invoked with one additional argument, the channel handle of
the socket over which data can be transfered.</p>
<p>The detailed behaviour of the method depends on the configured
mode.</p>
<dl class="doctools_definitions">
<dt><i class="term"><a href="../../../../index.html#active">active</a></i></dt>
<dd><p>The connection setup is done synchronously. The object waits until the
connection is established. The method returns the empty string as its
result.</p></dd>
<dt><i class="term"><a href="../../../../index.html#passive">passive</a></i></dt>
<dd><p>The connection setup is done asynchronously. The method returns
immediately after a listening socket has been set up. The connection
will be established in the background.
The method returns the port number of the listening socket, for use by
the caller. One important use is the transfer of this information to
the counterpart so that it knows where it has to connect to.</p>
<p>This is necessary as the object might have been configured for port







|

|











|



|







193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
specifications.</p></dd>
</dl>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">Object methods</a></h3>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">objectName</i> <b class="method">destroy</b></a></dt>
<dd><p>This method destroys the object.
This is safe to do for an <i class="term"><a href="../../../../index.html#key613">active</a></i> object when a connection has
been started, as the completion callback is synchronous.
For a <i class="term"><a href="../../../../index.html#key614">passive</a></i> object currently waiting for its partner to
establish the connection however this is not safe and will cause
errors later on, when the connection setup completes and tries to
access the now missing data structures of the destroyed object.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">connect</b> <i class="arg">command</i></a></dt>
<dd><p>This method starts the connection setup per the configuration of the
object. When the connection is established the callback <i class="arg">command</i>
will be invoked with one additional argument, the channel handle of
the socket over which data can be transfered.</p>
<p>The detailed behaviour of the method depends on the configured
mode.</p>
<dl class="doctools_definitions">
<dt><i class="term"><a href="../../../../index.html#key613">active</a></i></dt>
<dd><p>The connection setup is done synchronously. The object waits until the
connection is established. The method returns the empty string as its
result.</p></dd>
<dt><i class="term"><a href="../../../../index.html#key614">passive</a></i></dt>
<dd><p>The connection setup is done asynchronously. The method returns
immediately after a listening socket has been set up. The connection
will be established in the background.
The method returns the port number of the listening socket, for use by
the caller. One important use is the transfer of this information to
the counterpart so that it knows where it has to connect to.</p>
<p>This is necessary as the object might have been configured for port
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<dd><p>In this mode the option <b class="option">-host</b> has no relevance and is ignored
should it be configured.
The only option the object needs is <b class="option">-port</b>, and it specifies
the TCP port on which the listening socket is opened to await the
connection from the partner.</p></dd>
</dl></dd>
<dt><b class="option">-host</b> <i class="arg">hostname-or-ipaddr</i></dt>
<dd><p>This option specifies the host to connect to in <i class="term"><a href="../../../../index.html#active">active</a></i> mode,
either by name or ip-address. An object configured for <i class="term"><a href="../../../../index.html#passive">passive</a></i>
mode ignores this option.</p></dd>
<dt><b class="option">-port</b> <i class="arg">int</i></dt>
<dd><p>For <i class="term"><a href="../../../../index.html#active">active</a></i> mode this option specifies the port the object is
expected to connect to. For <i class="term"><a href="../../../../index.html#passive">passive</a></i> mode however it is the port
where the object creates the listening socket waiting for a
connection. It defaults to <b class="const">0</b>, which allows the OS to choose
the actual port to listen on.</p></dd>
<dt><b class="option">-socketcmd</b> <i class="arg">command</i></dt>
<dd><p>This option allows the user to specify which command to use to open a
socket. The default is to use the builtin <b class="cmd">::socket</b>. Any
compatible with that command is allowed.</p>
<p>The envisioned main use is the specfication of <b class="cmd">tls::socket</b>. I.e.
this option allows the creation of secure transfer channels, without
making this package explicitly dependent on the <b class="package"><a href="../../../../index.html#tls">tls</a></b> package.</p>
<p>See also section <span class="sectref"><a href="#section3">Secure connections</a></span>.</p></dd>
<dt><b class="option">-encoding</b> encodingname</dt>
<dd></dd>
<dt><b class="option">-eofchar</b> eofspec</dt>
<dd></dd>
<dt><b class="option">-translation</b> transspec</dt>
<dd><p>These options are the same as are recognized by the builtin command
<b class="cmd">fconfigure</b>. They provide the configuration to be set for the
channel between the two partners after it has been established, but
before the callback is invoked (See method <b class="method">connect</b>).</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Secure connections</a></h2>
<p>One way to secure connections made by objects of this package is to
require the package <b class="package"><a href="../../../../index.html#tls">tls</a></b> and then configure the option
<b class="option">-socketcmd</b> to force the use of command <b class="cmd">tls::socket</b> to
open the socket.</p>
<pre class="doctools_example">
    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...
    # Create a connector with secure socket setup,
    transfer::connect C -socketcmd tls::socket ...
    ...
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#active">active</a>, <a href="../../../../index.html#channel">channel</a>, <a href="../../../../index.html#connection">connection</a>, <a href="../../../../index.html#passive">passive</a>, <a href="../../../../index.html#secure">secure</a>, <a href="../../../../index.html#ssl">ssl</a>, <a href="../../../../index.html#tls">tls</a>, <a href="../../../../index.html#transfer">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|
|


|
|









|















|












|
|

|







|
|















<
<
<
<
<
<


|








252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330






331
332
333
334
335
336
337
338
339
340
341
<dd><p>In this mode the option <b class="option">-host</b> has no relevance and is ignored
should it be configured.
The only option the object needs is <b class="option">-port</b>, and it specifies
the TCP port on which the listening socket is opened to await the
connection from the partner.</p></dd>
</dl></dd>
<dt><b class="option">-host</b> <i class="arg">hostname-or-ipaddr</i></dt>
<dd><p>This option specifies the host to connect to in <i class="term"><a href="../../../../index.html#key613">active</a></i> mode,
either by name or ip-address. An object configured for <i class="term"><a href="../../../../index.html#key614">passive</a></i>
mode ignores this option.</p></dd>
<dt><b class="option">-port</b> <i class="arg">int</i></dt>
<dd><p>For <i class="term"><a href="../../../../index.html#key613">active</a></i> mode this option specifies the port the object is
expected to connect to. For <i class="term"><a href="../../../../index.html#key614">passive</a></i> mode however it is the port
where the object creates the listening socket waiting for a
connection. It defaults to <b class="const">0</b>, which allows the OS to choose
the actual port to listen on.</p></dd>
<dt><b class="option">-socketcmd</b> <i class="arg">command</i></dt>
<dd><p>This option allows the user to specify which command to use to open a
socket. The default is to use the builtin <b class="cmd">::socket</b>. Any
compatible with that command is allowed.</p>
<p>The envisioned main use is the specfication of <b class="cmd">tls::socket</b>. I.e.
this option allows the creation of secure transfer channels, without
making this package explicitly dependent on the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package.</p>
<p>See also section <span class="sectref"><a href="#section3">Secure connections</a></span>.</p></dd>
<dt><b class="option">-encoding</b> encodingname</dt>
<dd></dd>
<dt><b class="option">-eofchar</b> eofspec</dt>
<dd></dd>
<dt><b class="option">-translation</b> transspec</dt>
<dd><p>These options are the same as are recognized by the builtin command
<b class="cmd">fconfigure</b>. They provide the configuration to be set for the
channel between the two partners after it has been established, but
before the callback is invoked (See method <b class="method">connect</b>).</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Secure connections</a></h2>
<p>One way to secure connections made by objects of this package is to
require the package <b class="package"><a href="../../../../index.html#key331">tls</a></b> and then configure the option
<b class="option">-socketcmd</b> to force the use of command <b class="cmd">tls::socket</b> to
open the socket.</p>
<pre class="doctools_example">
    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...
    # Create a connector with secure socket setup,
    transfer::connect C -socketcmd tls::socket ...
    ...
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key613">active</a>, <a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key612">connection</a>, <a href="../../../../index.html#key614">passive</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/transfer/copyops.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>transfer::copy - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>transfer::copy - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'copyops.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- transfer::copy.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::copy(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::copy - Data transfer foundation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'copyops.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- transfer::copy.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::copy(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::copy - Data transfer foundation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel">channel</a>, <a href="../../../../index.html#copy">copy</a>, <a href="../../../../index.html#transfer">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








240
241
242
243
244
245
246






247
248
249
250
251
252
253
254
255
256
257
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/transfer/ddest.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>transfer::data::destination - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>transfer::data::destination - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'ddest.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- transfer::data::destination.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::data::destination(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::data::destination - Data destination</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'ddest.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- transfer::data::destination.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::data::destination(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::data::destination - Data destination</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
information from a channel into the described destination.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::data::destination</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new data destination object with an associated
Tcl command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#object">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection1">Object command</a></span> and <span class="sectref"><a href="#subsection2">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection3">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>







|







154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
information from a channel into the described destination.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::data::destination</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new data destination object with an associated
Tcl command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection1">Object command</a></span> and <span class="sectref"><a href="#subsection2">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection3">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel">channel</a>, <a href="../../../../index.html#copy">copy</a>, <a href="../../../../index.html#data_destination">data destination</a>, <a href="../../../../index.html#transfer">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








240
241
242
243
244
245
246






247
248
249
250
251
252
253
254
255
256
257
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key61">data destination</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/transfer/dsource.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>transfer::data::source - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>transfer::data::source - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'dsource.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- transfer::data::source.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::data::source(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::data::source - Data source</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'dsource.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- transfer::data::source.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::data::source(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::data::source - Data source</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::data::source</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new data source object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#object">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>







|







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::data::source</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new data source object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel">channel</a>, <a href="../../../../index.html#copy">copy</a>, <a href="../../../../index.html#data_source">data source</a>, <a href="../../../../index.html#transfer">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








272
273
274
275
276
277
278






279
280
281
282
283
284
285
286
287
288
289
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key365">data source</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/transfer/receiver.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>transfer::receiver - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>transfer::receiver - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'receiver.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- transfer::receiver.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::receiver(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::receiver - Data source</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'receiver.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- transfer::receiver.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::receiver(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::receiver - Data source</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::receiver</b> <i class="arg">object</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new receiver object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#object">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>







|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::receiver</b> <i class="arg">object</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new receiver object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<em>Note</em> however that the signature of the command prefix specified
for the <b class="option">-command</b> callback differs from the signature for the
same option of the receiver object.
This callback is only given the number of bytes and transfered, and
possibly an error message. No reference to the internally used
receiver object is made.</p>
<p>The result returned by the command is the empty string
if it was set to make an <i class="term"><a href="../../../../index.html#active">active</a></i> connection, and the port the
internal receiver object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#passive">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="3"><b class="cmd">transfer::receiver</b> <b class="method">stream file</b> <i class="arg">path</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This method is like <b class="method">stream channel</b>, except that the
received data is written to the file <i class="arg">path</i>, replacing any prior
content.</p></dd>
</dl>







|

|







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<em>Note</em> however that the signature of the command prefix specified
for the <b class="option">-command</b> callback differs from the signature for the
same option of the receiver object.
This callback is only given the number of bytes and transfered, and
possibly an error message. No reference to the internally used
receiver object is made.</p>
<p>The result returned by the command is the empty string
if it was set to make an <i class="term"><a href="../../../../index.html#key613">active</a></i> connection, and the port the
internal receiver object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#key614">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="3"><b class="cmd">transfer::receiver</b> <b class="method">stream file</b> <i class="arg">path</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This method is like <b class="method">stream channel</b>, except that the
received data is written to the file <i class="arg">path</i>, replacing any prior
content.</p></dd>
</dl>
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
The method will throw an error if a reception is already/still in
progress.
I.e. it is not possible to run two receptions in parallel, only in
sequence.
Errors will also be thrown if the configuration of the data
destination is invalid, or if no completion callback was specified.</p>
<p>The result returned by the method is the empty string
for an object configured to make an <i class="term"><a href="../../../../index.html#active">active</a></i> connection, and the port the
 object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#passive">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">busy</b></a></dt>
<dd><p>This method returns a boolean value telling us whether a reception
is in progress (<b class="const">True</b>), or not (<b class="const">False</b>).</p></dd>
</dl>
</div>







|

|







234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
The method will throw an error if a reception is already/still in
progress.
I.e. it is not possible to run two receptions in parallel, only in
sequence.
Errors will also be thrown if the configuration of the data
destination is invalid, or if no completion callback was specified.</p>
<p>The result returned by the method is the empty string
for an object configured to make an <i class="term"><a href="../../../../index.html#key613">active</a></i> connection, and the port the
 object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#key614">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">busy</b></a></dt>
<dd><p>This method returns a boolean value telling us whether a reception
is in progress (<b class="const">True</b>), or not (<b class="const">False</b>).</p></dd>
</dl>
</div>
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<dd><p>In this mode the option <b class="option">-host</b> has no relevance and is ignored
should it be configured.
The only option the object needs is <b class="option">-port</b>, and it specifies
the TCP port on which the listening socket is opened to await the
connection from the partner.</p></dd>
</dl></dd>
<dt><b class="option">-host</b> <i class="arg">hostname-or-ipaddr</i></dt>
<dd><p>This option specifies the host to connect to in <i class="term"><a href="../../../../index.html#active">active</a></i> mode,
either by name or ip-address. An object configured for <i class="term"><a href="../../../../index.html#passive">passive</a></i>
mode ignores this option.</p></dd>
<dt><b class="option">-port</b> <i class="arg">int</i></dt>
<dd><p>For <i class="term"><a href="../../../../index.html#active">active</a></i> mode this option specifies the port the object is
expected to connect to. For <i class="term"><a href="../../../../index.html#passive">passive</a></i> mode however it is the port
where the object creates the listening socket waiting for a
connection. It defaults to <b class="const">0</b>, which allows the OS to choose
the actual port to listen on.</p></dd>
<dt><b class="option">-socketcmd</b> <i class="arg">command</i></dt>
<dd><p>This option allows the user to specify which command to use to open a
socket. The default is to use the builtin <b class="cmd">::socket</b>. Any
compatible with that command is allowed.</p>
<p>The envisioned main use is the specfication of <b class="cmd">tls::socket</b>. I.e.
this option allows the creation of secure transfer channels, without
making this package explicitly dependent on the <b class="package"><a href="../../../../index.html#tls">tls</a></b> package.</p>
<p>See also section <span class="sectref"><a href="#section3">Secure connections</a></span>.</p></dd>
<dt><b class="option">-encoding</b> encodingname</dt>
<dd></dd>
<dt><b class="option">-eofchar</b> eofspec</dt>
<dd></dd>
<dt><b class="option">-translation</b> transspec</dt>
<dd><p>These options are the same as are recognized by the builtin command







|
|


|
|









|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<dd><p>In this mode the option <b class="option">-host</b> has no relevance and is ignored
should it be configured.
The only option the object needs is <b class="option">-port</b>, and it specifies
the TCP port on which the listening socket is opened to await the
connection from the partner.</p></dd>
</dl></dd>
<dt><b class="option">-host</b> <i class="arg">hostname-or-ipaddr</i></dt>
<dd><p>This option specifies the host to connect to in <i class="term"><a href="../../../../index.html#key613">active</a></i> mode,
either by name or ip-address. An object configured for <i class="term"><a href="../../../../index.html#key614">passive</a></i>
mode ignores this option.</p></dd>
<dt><b class="option">-port</b> <i class="arg">int</i></dt>
<dd><p>For <i class="term"><a href="../../../../index.html#key613">active</a></i> mode this option specifies the port the object is
expected to connect to. For <i class="term"><a href="../../../../index.html#key614">passive</a></i> mode however it is the port
where the object creates the listening socket waiting for a
connection. It defaults to <b class="const">0</b>, which allows the OS to choose
the actual port to listen on.</p></dd>
<dt><b class="option">-socketcmd</b> <i class="arg">command</i></dt>
<dd><p>This option allows the user to specify which command to use to open a
socket. The default is to use the builtin <b class="cmd">::socket</b>. Any
compatible with that command is allowed.</p>
<p>The envisioned main use is the specfication of <b class="cmd">tls::socket</b>. I.e.
this option allows the creation of secure transfer channels, without
making this package explicitly dependent on the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package.</p>
<p>See also section <span class="sectref"><a href="#section3">Secure connections</a></span>.</p></dd>
<dt><b class="option">-encoding</b> encodingname</dt>
<dd></dd>
<dt><b class="option">-eofchar</b> eofspec</dt>
<dd></dd>
<dt><b class="option">-translation</b> transspec</dt>
<dd><p>These options are the same as are recognized by the builtin command
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
the reception of the data. The callback is always invoked with one
additional argument, the number of bytes received so far.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Secure connections</a></h2>
<p>One way to secure connections made by objects of this package is to
require the package <b class="package"><a href="../../../../index.html#tls">tls</a></b> and then configure the option
<b class="option">-socketcmd</b> to force the use of command <b class="cmd">tls::socket</b> to
open the socket.</p>
<pre class="doctools_example">
    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...
    # Create a connector with secure socket setup,
    transfer::receiver R -socketcmd tls::socket ...
    ...
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel">channel</a>, <a href="../../../../index.html#copy">copy</a>, <a href="../../../../index.html#data_destination">data destination</a>, <a href="../../../../index.html#receiver">receiver</a>, <a href="../../../../index.html#secure">secure</a>, <a href="../../../../index.html#ssl">ssl</a>, <a href="../../../../index.html#tls">tls</a>, <a href="../../../../index.html#transfer">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|












|
|

|







|
|















<
<
<
<
<
<


|








322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369






370
371
372
373
374
375
376
377
378
379
380
the reception of the data. The callback is always invoked with one
additional argument, the number of bytes received so far.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Secure connections</a></h2>
<p>One way to secure connections made by objects of this package is to
require the package <b class="package"><a href="../../../../index.html#key331">tls</a></b> and then configure the option
<b class="option">-socketcmd</b> to force the use of command <b class="cmd">tls::socket</b> to
open the socket.</p>
<pre class="doctools_example">
    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...
    # Create a connector with secure socket setup,
    transfer::receiver R -socketcmd tls::socket ...
    ...
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key61">data destination</a>, <a href="../../../../index.html#key93">receiver</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/transfer/tqueue.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>transfer::copy::queue - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>transfer::copy::queue - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tqueue.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- transfer::copy::queue.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::copy::queue(n) 0.1 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::copy::queue - Queued transfers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tqueue.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- transfer::copy::queue.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::copy::queue(n) 0.1 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::copy::queue - Queued transfers</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::copy::queue</b> <i class="arg">objectName</i> <i class="arg">outchannel</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new queue object for the management of the
channel <i class="arg">outchannel</i>, with an associated Tcl command whose name is
<i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#object">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#section3">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>







|







191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::copy::queue</b> <i class="arg">objectName</i> <i class="arg">outchannel</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new queue object for the management of the
channel <i class="arg">outchannel</i>, with an associated Tcl command whose name is
<i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#section3">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<dd><p>This method destroys the object. Doing so while the object is busy
will cause errors later on, when the currently executed request
completes and tries to access the now missing data structures of the
destroyed object.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">busy</b></a></dt>
<dd><p>This method returns a boolean value telling us if the object is
currently serving a request (i.e. <i class="term">busy</i>, value <b class="const">True</b>), or
not (i.e. <i class="term"><a href="../../../../index.html#idle">idle</a></i>, value <b class="const">False</b>).</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">pending</b></a></dt>
<dd><p>This method returns the number of requests currently waiting in the
queue for their execution. A request currently served is not counted
as waiting.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">put</b> <i class="arg">request</i></a></dt>
<dd><p>This method enters the transfer <i class="arg">request</i> into the object's queue
of waiting requests.
If the object is <i class="term"><a href="../../../../index.html#idle">idle</a></i> it will become <i class="term">busy</i>, immediately
servicing the request. Otherwise servicing the new request will be
defered until all preceding requests have been served.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Options</a></h2>
<p>The only option known is <b class="option">-on-status-change</b>. It is optional







|







|







222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<dd><p>This method destroys the object. Doing so while the object is busy
will cause errors later on, when the currently executed request
completes and tries to access the now missing data structures of the
destroyed object.</p></dd>
<dt><a name="4"><i class="arg">objectName</i> <b class="method">busy</b></a></dt>
<dd><p>This method returns a boolean value telling us if the object is
currently serving a request (i.e. <i class="term">busy</i>, value <b class="const">True</b>), or
not (i.e. <i class="term"><a href="../../../../index.html#key541">idle</a></i>, value <b class="const">False</b>).</p></dd>
<dt><a name="5"><i class="arg">objectName</i> <b class="method">pending</b></a></dt>
<dd><p>This method returns the number of requests currently waiting in the
queue for their execution. A request currently served is not counted
as waiting.</p></dd>
<dt><a name="6"><i class="arg">objectName</i> <b class="method">put</b> <i class="arg">request</i></a></dt>
<dd><p>This method enters the transfer <i class="arg">request</i> into the object's queue
of waiting requests.
If the object is <i class="term"><a href="../../../../index.html#key541">idle</a></i> it will become <i class="term">busy</i>, immediately
servicing the request. Otherwise servicing the new request will be
defered until all preceding requests have been served.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Options</a></h2>
<p>The only option known is <b class="option">-on-status-change</b>. It is optional
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel">channel</a>, <a href="../../../../index.html#copy">copy</a>, <a href="../../../../index.html#queue">queue</a>, <a href="../../../../index.html#transfer">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








261
262
263
264
265
266
267






268
269
270
271
272
273
274
275
276
277
278
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key50">queue</a>, <a href="../../../../index.html#key62">transfer</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/transfer/transmitter.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>transfer::transmitter - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>transfer::transmitter - Data transfer facilities</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'transmitter.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2006-2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- transfer::transmitter.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::transmitter(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::transmitter - Data source</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'transmitter.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- transfer::transmitter.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">transfer::transmitter(n) 0.2 tcllib &quot;Data transfer facilities&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>transfer::transmitter - Data source</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::transmitter</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new transmitter object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#object">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>







|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">Package commands</a></h3>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">transfer::transmitter</b> <i class="arg">objectName</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p>This command creates a new transmitter object with an associated Tcl
command whose name is <i class="arg">objectName</i>.
This <i class="term"><a href="../../../../index.html#key243">object</a></i> command is explained in full detail in the sections
<span class="sectref"><a href="#subsection2">Object command</a></span> and <span class="sectref"><a href="#subsection3">Object methods</a></span>. The set of
supported <i class="arg">options</i> is explained in section <span class="sectref"><a href="#subsection4">Options</a></span>.</p>
<p>The object command will be created under the current namespace if the
<i class="arg">objectName</i> is not fully qualified, and in the specified
namespace otherwise.
The fully qualified name of the object command is returned as the
result of the command.</p></dd>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<em>Note</em> however that the signature of the command prefix specified
for the <b class="option">-command</b> callback differs from the signature for the
same option of the transmitter object.
This callback is only given the number of bytes and transfered, and
possibly an error message. No reference to the internally used
transmitter object is made.</p>
<p>The result returned by the command is the empty string
if it was set to make an <i class="term"><a href="../../../../index.html#active">active</a></i> connection, and the port the
internal transmitter object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#passive">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="3"><b class="cmd">transfer::transmitter</b> <b class="method">stream file</b> <i class="arg">path</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This method is like <b class="method">stream channel</b>, except that the data
contained in the file <i class="arg">path</i> is transfered.</p></dd>
</dl>
</div>







|

|







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<em>Note</em> however that the signature of the command prefix specified
for the <b class="option">-command</b> callback differs from the signature for the
same option of the transmitter object.
This callback is only given the number of bytes and transfered, and
possibly an error message. No reference to the internally used
transmitter object is made.</p>
<p>The result returned by the command is the empty string
if it was set to make an <i class="term"><a href="../../../../index.html#key613">active</a></i> connection, and the port the
internal transmitter object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#key614">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="3"><b class="cmd">transfer::transmitter</b> <b class="method">stream file</b> <i class="arg">path</i> <i class="arg">host</i> <i class="arg">port</i> <span class="opt">?<i class="arg">arg</i>...?</span></a></dt>
<dd><p>This method is like <b class="method">stream channel</b>, except that the data
contained in the file <i class="arg">path</i> is transfered.</p></dd>
</dl>
</div>
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
progress.
I.e. it is not possible to run two transmissions in parallel on a
single object, only in sequence. Multiple transmitter objects are
needed to manage parallel transfers, one per transmission.
Errors will also be thrown if the configuration of the data source is
invalid, or if no completion callback was specified.</p>
<p>The result returned by the method is the empty string
for an object configured to make an <i class="term"><a href="../../../../index.html#active">active</a></i> connection, and the port the
 object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#passive">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">busy</b></a></dt>
<dd><p>This method returns a boolean value telling us whether a transmission
is in progress (<b class="const">True</b>), or not (<b class="const">False</b>).</p></dd>
</dl>
</div>







|

|







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
progress.
I.e. it is not possible to run two transmissions in parallel on a
single object, only in sequence. Multiple transmitter objects are
needed to manage parallel transfers, one per transmission.
Errors will also be thrown if the configuration of the data source is
invalid, or if no completion callback was specified.</p>
<p>The result returned by the method is the empty string
for an object configured to make an <i class="term"><a href="../../../../index.html#key613">active</a></i> connection, and the port the
 object is listening on otherwise, i.e when it is
configured to connect <i class="term"><a href="../../../../index.html#key614">passive</a></i>ly.
See also the package <b class="package"><a href="connect.html">transfer::connect</a></b> and the description
of the method <b class="method">connect</b> for where this behaviour comes from.</p></dd>
<dt><a name="7"><i class="arg">objectName</i> <b class="method">busy</b></a></dt>
<dd><p>This method returns a boolean value telling us whether a transmission
is in progress (<b class="const">True</b>), or not (<b class="const">False</b>).</p></dd>
</dl>
</div>
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
<dd><p>In this mode the option <b class="option">-host</b> has no relevance and is ignored
should it be configured.
The only option the object needs is <b class="option">-port</b>, and it specifies
the TCP port on which the listening socket is opened to await the
connection from the partner.</p></dd>
</dl></dd>
<dt><b class="option">-host</b> <i class="arg">hostname-or-ipaddr</i></dt>
<dd><p>This option specifies the host to connect to in <i class="term"><a href="../../../../index.html#active">active</a></i> mode,
either by name or ip-address. An object configured for <i class="term"><a href="../../../../index.html#passive">passive</a></i>
mode ignores this option.</p></dd>
<dt><b class="option">-port</b> <i class="arg">int</i></dt>
<dd><p>For <i class="term"><a href="../../../../index.html#active">active</a></i> mode this option specifies the port the object is
expected to connect to. For <i class="term"><a href="../../../../index.html#passive">passive</a></i> mode however it is the port
where the object creates the listening socket waiting for a
connection. It defaults to <b class="const">0</b>, which allows the OS to choose
the actual port to listen on.</p></dd>
<dt><b class="option">-socketcmd</b> <i class="arg">command</i></dt>
<dd><p>This option allows the user to specify which command to use to open a
socket. The default is to use the builtin <b class="cmd">::socket</b>. Any
compatible with that command is allowed.</p>
<p>The envisioned main use is the specfication of <b class="cmd">tls::socket</b>. I.e.
this option allows the creation of secure transfer channels, without
making this package explicitly dependent on the <b class="package"><a href="../../../../index.html#tls">tls</a></b> package.</p>
<p>See also section <span class="sectref"><a href="#section3">Secure connections</a></span>.</p></dd>
<dt><b class="option">-encoding</b> encodingname</dt>
<dd></dd>
<dt><b class="option">-eofchar</b> eofspec</dt>
<dd></dd>
<dt><b class="option">-translation</b> transspec</dt>
<dd><p>These options are the same as are recognized by the builtin command







|
|


|
|









|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<dd><p>In this mode the option <b class="option">-host</b> has no relevance and is ignored
should it be configured.
The only option the object needs is <b class="option">-port</b>, and it specifies
the TCP port on which the listening socket is opened to await the
connection from the partner.</p></dd>
</dl></dd>
<dt><b class="option">-host</b> <i class="arg">hostname-or-ipaddr</i></dt>
<dd><p>This option specifies the host to connect to in <i class="term"><a href="../../../../index.html#key613">active</a></i> mode,
either by name or ip-address. An object configured for <i class="term"><a href="../../../../index.html#key614">passive</a></i>
mode ignores this option.</p></dd>
<dt><b class="option">-port</b> <i class="arg">int</i></dt>
<dd><p>For <i class="term"><a href="../../../../index.html#key613">active</a></i> mode this option specifies the port the object is
expected to connect to. For <i class="term"><a href="../../../../index.html#key614">passive</a></i> mode however it is the port
where the object creates the listening socket waiting for a
connection. It defaults to <b class="const">0</b>, which allows the OS to choose
the actual port to listen on.</p></dd>
<dt><b class="option">-socketcmd</b> <i class="arg">command</i></dt>
<dd><p>This option allows the user to specify which command to use to open a
socket. The default is to use the builtin <b class="cmd">::socket</b>. Any
compatible with that command is allowed.</p>
<p>The envisioned main use is the specfication of <b class="cmd">tls::socket</b>. I.e.
this option allows the creation of secure transfer channels, without
making this package explicitly dependent on the <b class="package"><a href="../../../../index.html#key331">tls</a></b> package.</p>
<p>See also section <span class="sectref"><a href="#section3">Secure connections</a></span>.</p></dd>
<dt><b class="option">-encoding</b> encodingname</dt>
<dd></dd>
<dt><b class="option">-eofchar</b> eofspec</dt>
<dd></dd>
<dt><b class="option">-translation</b> transspec</dt>
<dd><p>These options are the same as are recognized by the builtin command
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
of the transmission of the data. The callback is always invoked with
one additional argument, the number of bytes transmitted so far.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Secure connections</a></h2>
<p>One way to secure connections made by objects of this package is to
require the package <b class="package"><a href="../../../../index.html#tls">tls</a></b> and then configure the option
<b class="option">-socketcmd</b> to force the use of command <b class="cmd">tls::socket</b> to
open the socket.</p>
<pre class="doctools_example">
    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...
    # Create a connector with secure socket setup,
    transfer::transmitter T -socketcmd tls::socket ...
    ...
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel">channel</a>, <a href="../../../../index.html#copy">copy</a>, <a href="../../../../index.html#data_source">data source</a>, <a href="../../../../index.html#secure">secure</a>, <a href="../../../../index.html#ssl">ssl</a>, <a href="../../../../index.html#tls">tls</a>, <a href="../../../../index.html#transfer">transfer</a>, <a href="../../../../index.html#transmitter">transmitter</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|












|
|

|







|
|















<
<
<
<
<
<


|








327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374






375
376
377
378
379
380
381
382
383
384
385
of the transmission of the data. The callback is always invoked with
one additional argument, the number of bytes transmitted so far.</p></dd>
</dl>
</div>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Secure connections</a></h2>
<p>One way to secure connections made by objects of this package is to
require the package <b class="package"><a href="../../../../index.html#key331">tls</a></b> and then configure the option
<b class="option">-socketcmd</b> to force the use of command <b class="cmd">tls::socket</b> to
open the socket.</p>
<pre class="doctools_example">
    # Load and initialize tls
    package require tls
    tls::init -cafile /path/to/ca/cert -keyfile ...
    # Create a connector with secure socket setup,
    transfer::transmitter T -socketcmd tls::socket ...
    ...
</pre>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>transfer</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key63">channel</a>, <a href="../../../../index.html#key64">copy</a>, <a href="../../../../index.html#key365">data source</a>, <a href="../../../../index.html#key356">secure</a>, <a href="../../../../index.html#key359">ssl</a>, <a href="../../../../index.html#key331">tls</a>, <a href="../../../../index.html#key62">transfer</a>, <a href="../../../../index.html#key718">transmitter</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Transfer module</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2006-2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/treeql/treeql.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>treeql - Tree Query Language</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>treeql - Tree Query Language</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'treeql.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004 Colin McCormack &amp;lt;coldstore@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2004 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- treeql.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">treeql(n) 1.3.1 tcllib &quot;Tree Query Language&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>treeql - Query tree objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'treeql.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004 Colin McCormack &lt;coldstore@users.sourceforge.net&gt;   -- Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- treeql.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">treeql(n) 1.3.1 tcllib &quot;Tree Query Language&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>treeql - Query tree objects</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
    #   values for the attribute 'data',
    #   for all nodes in the set which
    #   have such an attribute.
    # - And returns this information.
    # Below we can see the same query, but rewritten
    # to show the structure as it is seen by the query
    # interpreter.
    q query \
	    root \
	    children \
	    get data
</pre>
<p>The operators of the TreeQL language available for this are explained
in the section about <span class="sectref"><a href="#section3">The Tree Query Language</a></span>. This section
also explains the term <i class="term">node set</i> used above.</p></dd>
<dt><a name="3"><i class="arg">qo</i> <b class="method">result</b></a></dt>
<dd><p>This method returns a list containing the current node set.</p></dd>







|
|
|







251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
    #   values for the attribute 'data',
    #   for all nodes in the set which
    #   have such an attribute.
    # - And returns this information.
    # Below we can see the same query, but rewritten
    # to show the structure as it is seen by the query
    # interpreter.
    q query \\
	    root \\
	    children \\
	    get data
</pre>
<p>The operators of the TreeQL language available for this are explained
in the section about <span class="sectref"><a href="#section3">The Tree Query Language</a></span>. This section
also explains the term <i class="term">node set</i> used above.</p></dd>
<dt><a name="3"><i class="arg">qo</i> <b class="method">result</b></a></dt>
<dd><p>This method returns a list containing the current node set.</p></dd>
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<p>The main concept which has to be understood is that of the
<i class="term">node set</i>.
Each query object maintains exactly one such <i class="term">node set</i>, and
essentially all operators use it and input argument and for their
result.
This structure simply contains the handles of all nodes which are
currently of interest to the query object.
To name it a <i class="term"><a href="../../../../index.html#set">set</a></i> is a bit of a misnomer, because</p>
<ol class="doctools_enumerated">
<li><p>A node (handle) can occur in the structure more than once, and</p></li>
<li><p>the order of nodes in the structure is important as well.
Whenever an operator processes all nodes in the node set it will do so
in the order they occur in the structure.</p></li>
</ol>
<p>Regarding the possible multiple occurrence of a node, consider a node







|







295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<p>The main concept which has to be understood is that of the
<i class="term">node set</i>.
Each query object maintains exactly one such <i class="term">node set</i>, and
essentially all operators use it and input argument and for their
result.
This structure simply contains the handles of all nodes which are
currently of interest to the query object.
To name it a <i class="term"><a href="../../../../index.html#key301">set</a></i> is a bit of a misnomer, because</p>
<ol class="doctools_enumerated">
<li><p>A node (handle) can occur in the structure more than once, and</p></li>
<li><p>the order of nodes in the structure is important as well.
Whenever an operator processes all nodes in the node set it will do so
in the order they occur in the structure.</p></li>
</ol>
<p>Regarding the possible multiple occurrence of a node, consider a node
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
<dt><b class="method">string</b> <i class="arg">op</i> <i class="arg">attr</i></dt>
<dd><p>Applies the string operator <i class="arg">op</i> to the attribute named
<i class="arg">attr</i>, for all nodes <b class="variable">N</b> in the node set, collects the
results of that application and places them into the node set.</p>
<p>The operator will fail if a node does not have an attribute named
<i class="arg">attr</i>.</p>
<p>The argument <i class="arg">op</i> is interpreted as partial argument list for the
builtin command <b class="cmd"><a href="../../../../index.html#string">string</a></b>.  Its first word has to be any of the
sub-commands understood by <b class="cmd"><a href="../../../../index.html#string">string</a></b>.  This has to be followed by
all arguments required for the subcommand, except the last.  that last
argument is supplied by the attribute value.</p></dd>
<dt><b class="method">get</b> <i class="arg">pattern</i></dt>
<dd><p>For all nodes <b class="variable">N</b> in the node set it determines all their
attributes with names matching the glob <i class="arg">pattern</i>, then the values
of these attributes, at last it replaces the node set with the list of
these attribute values.</p></dd>







|
|







497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
<dt><b class="method">string</b> <i class="arg">op</i> <i class="arg">attr</i></dt>
<dd><p>Applies the string operator <i class="arg">op</i> to the attribute named
<i class="arg">attr</i>, for all nodes <b class="variable">N</b> in the node set, collects the
results of that application and places them into the node set.</p>
<p>The operator will fail if a node does not have an attribute named
<i class="arg">attr</i>.</p>
<p>The argument <i class="arg">op</i> is interpreted as partial argument list for the
builtin command <b class="cmd"><a href="../../../../index.html#key280">string</a></b>.  Its first word has to be any of the
sub-commands understood by <b class="cmd"><a href="../../../../index.html#key280">string</a></b>.  This has to be followed by
all arguments required for the subcommand, except the last.  that last
argument is supplied by the attribute value.</p></dd>
<dt><b class="method">get</b> <i class="arg">pattern</i></dt>
<dd><p>For all nodes <b class="variable">N</b> in the node set it determines all their
attributes with names matching the glob <i class="arg">pattern</i>, then the values
of these attributes, at last it replaces the node set with the list of
these attribute values.</p></dd>
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
node set generated by the query. At last it restores the current node
set as it was before the execution of the query.</p>
<p>The script <i class="arg">body</i> is executed in the context of the caller.</p></dd>
<dt><b class="method">over</b> <i class="arg">var</i> <i class="arg">body</i></dt>
<dd><p>Executes the script <i class="arg">body</i> for each node in the node set, with the
variable named by <i class="arg">var</i> bound to the name of the current node.
The script <i class="arg">body</i> is executed in the context of the caller.</p>
<p>This is like the builtin <b class="cmd"><a href="../../../../index.html#foreach">foreach</a></b>, with the node set as the
source of the list to iterate over.</p>
<p>The results of executing the <i class="arg">body</i> are ignored.</p></dd>
<dt><b class="method">delete</b></dt>
<dd><p>Deletes all the nodes contained in the current node set from the tree.</p></dd>
</dl>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Typed node support</a></h3>







|







592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
node set generated by the query. At last it restores the current node
set as it was before the execution of the query.</p>
<p>The script <i class="arg">body</i> is executed in the context of the caller.</p></dd>
<dt><b class="method">over</b> <i class="arg">var</i> <i class="arg">body</i></dt>
<dd><p>Executes the script <i class="arg">body</i> for each node in the node set, with the
variable named by <i class="arg">var</i> bound to the name of the current node.
The script <i class="arg">body</i> is executed in the context of the caller.</p>
<p>This is like the builtin <b class="cmd"><a href="../../../../index.html#key218">foreach</a></b>, with the node set as the
source of the list to iterate over.</p>
<p>The results of executing the <i class="arg">body</i> are ignored.</p></dd>
<dt><b class="method">delete</b></dt>
<dd><p>Deletes all the nodes contained in the current node set from the tree.</p></dd>
</dl>
</div>
<div id="subsection11" class="doctools_subsection"><h3><a name="subsection11">Typed node support</a></h3>
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>treeql</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cost">Cost</a>, <a href="../../../../index.html#dom">DOM</a>, <a href="../../../../index.html#treeql">TreeQL</a>, <a href="../../../../index.html#xpath">XPath</a>, <a href="../../../../index.html#xslt">XSLT</a>, <a href="../../../../index.html#structured_queries">structured queries</a>, <a href="../../../../index.html#tree">tree</a>, <a href="../../../../index.html#tree_query_language">tree query language</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Colin McCormack &lt;coldstore@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|









639
640
641
642
643
644
645






646
647
648
649
650
651
652
653
654
655
656
657
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>treeql</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key819">Cost</a>, <a href="../../../../index.html#key816">DOM</a>, <a href="../../../../index.html#key818">TreeQL</a>, <a href="../../../../index.html#key817">XPath</a>, <a href="../../../../index.html#key821">XSLT</a>, <a href="../../../../index.html#key822">structured queries</a>, <a href="../../../../index.html#key300">tree</a>, <a href="../../../../index.html#key820">tree query language</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Data structures</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004 Colin McCormack &lt;coldstore@users.sourceforge.net&gt;<br>
Copyright &copy; 2004 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/try/tcllib_throw.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>throw - Forward compatibility implementation of [throw]</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>throw - Forward compatibility implementation of [throw]</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_throw.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2015 Miguel Mart&amp;iacute;nez L&amp;oacute;pez, BSD licensed
   -->
<!-- throw.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">throw(n) 1 tcllib &quot;Forward compatibility implementation of [throw]&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>throw - throw - Throw an error exception with a message</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_throw.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2015 Miguel Mart&iacute;nez L&oacute;pez, BSD licensed
   -->
<! -- throw.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">throw(n) 1 tcllib &quot;Forward compatibility implementation of [throw]&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>throw - throw - Throw an error exception with a message</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>try</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>error(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#error">error</a>, <a href="../../../../index.html#return">return</a>, <a href="../../../../index.html#throw">throw</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Miguel Mart&iacute;nez L&oacute;pez, BSD licensed</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








155
156
157
158
159
160
161






162
163
164
165
166
167
168
169
170
171
172
173
174
175
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>try</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>error(n)</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key161">error</a>, <a href="../../../../index.html#key187">return</a>, <a href="../../../../index.html#key188">throw</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2015 Miguel Mart&iacute;nez L&oacute;pez, BSD licensed</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/try/tcllib_try.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>try - Forward compatibility implementation of [try]</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>try - Forward compatibility implementation of [try]</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_try.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008 Donal K. Fellows, BSD licensed
   -->
<!-- try.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">try(n) 1 tcllib &quot;Forward compatibility implementation of [try]&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>try - try - Trap and process errors and exceptions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_try.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008 Donal K. Fellows, BSD licensed
   -->
<! -- try.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">try(n) 1 tcllib &quot;Forward compatibility implementation of [try]&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>try - try - Trap and process errors and exceptions</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>try</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>catch(n), error(n), return(n), <a href="tcllib_throw.html">throw(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#cleanup">cleanup</a>, <a href="../../../../index.html#error">error</a>, <a href="../../../../index.html#exception">exception</a>, <a href="../../../../index.html#final">final</a>, <a href="../../../../index.html#resource_management">resource management</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Donal K. Fellows, BSD licensed</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








220
221
222
223
224
225
226






227
228
229
230
231
232
233
234
235
236
237
238
239
240
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>try</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>catch(n), error(n), return(n), <a href="tcllib_throw.html">throw(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key158">cleanup</a>, <a href="../../../../index.html#key161">error</a>, <a href="../../../../index.html#key162">exception</a>, <a href="../../../../index.html#key160">final</a>, <a href="../../../../index.html#key159">resource management</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Utility</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Donal K. Fellows, BSD licensed</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/udpcluster/udpcluster.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>udpcluster - Lightweight UDP based tool for cluster node discovery</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>udpcluster - Lightweight UDP based tool for cluster node discovery</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'udpcluster.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2016-2018 Sean Woods &amp;lt;yoda@etoyoc.com&amp;gt;
   -->
<!-- udpcluster.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">udpcluster(n) 0.3.3 tcllib &quot;Lightweight UDP based tool for cluster node discovery&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>udpcluster - UDP Peer-to-Peer cluster</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">udpcluster <span class="opt">?0.3.3?</span></b></li>
<li>package require <b class="pkgname">ip</b></li>
<li>package require <b class="pkgname">nettool</b></li>
<li>package require <b class="pkgname">comm</b></li>
<li>package require <b class="pkgname">interp</b></li>
<li>package require <b class="pkgname">dicttool</b></li>
<li>package require <b class="pkgname">cron</b></li>
</ul>







|

|

|



|
|
|
|
|
|


|


















<







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128

129
130
131
132
133
134
135
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'udpcluster.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2016 Sean Woods &lt;yoda@etoyoc.com&gt;
   -->
<! -- udpcluster.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">udpcluster(n) 0.3 tcllib &quot;Lightweight UDP based tool for cluster node discovery&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>udpcluster - UDP Peer-to-Peer cluster</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>

<li>package require <b class="pkgname">ip</b></li>
<li>package require <b class="pkgname">nettool</b></li>
<li>package require <b class="pkgname">comm</b></li>
<li>package require <b class="pkgname">interp</b></li>
<li>package require <b class="pkgname">dicttool</b></li>
<li>package require <b class="pkgname">cron</b></li>
</ul>
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#name_service">name service</a>, <a href="../../../../index.html#server">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2016-2018 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


167
168
169
170
171
172
173






174
175
176
177
178
179
180
181
182
183
184
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>nameserv</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key29">name service</a>, <a href="../../../../index.html#key65">server</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2016 Sean Woods &lt;yoda@etoyoc.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/uev/uevent.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>uevent - User events</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>uevent - User events</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'uevent.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2012 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- uevent.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uevent(n) 0.3.1 tcllib &quot;User events&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uevent - User events</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'uevent.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- uevent.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uevent(n) 0.3.1 tcllib &quot;User events&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uevent - User events</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">uevent <span class="opt">?0.3.1?</span></b></li>
<li>package require <b class="pkgname">logger</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::uevent::bind</b> <i class="arg">tag</i> <i class="arg">event</i> <i class="arg">command</i></a></li>
<li><a href="#2"><b class="cmd"><a href="../../../../index.html#command">command</a></b> <i class="arg">tag</i> <i class="arg">event</i> <i class="arg">details</i></a></li>
<li><a href="#3"><b class="cmd">::uevent::unbind</b> <i class="arg">token</i></a></li>
<li><a href="#4"><b class="cmd">::uevent::generate</b> <i class="arg">tag</i> <i class="arg">event</i> <span class="opt">?<i class="arg">details</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::uevent::list</b></a></li>
<li><a href="#6"><b class="cmd">::uevent::list</b> <i class="arg">tag</i></a></li>
<li><a href="#7"><b class="cmd">::uevent::list</b> <i class="arg">tag</i> <i class="arg">event</i></a></li>
<li><a href="#8"><b class="cmd">::uevent::watch::tag::add</b> <i class="arg">pattern</i> <i class="arg">command</i></a></li>
<li><a href="#9"><b class="cmd">{*}command</b> <b class="const">bound</b> <i class="arg">tag</i></a></li>







|







129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">uevent <span class="opt">?0.3.1?</span></b></li>
<li>package require <b class="pkgname">logger</b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::uevent::bind</b> <i class="arg">tag</i> <i class="arg">event</i> <i class="arg">command</i></a></li>
<li><a href="#2"><b class="cmd"><a href="../../../../index.html#key275">command</a></b> <i class="arg">tag</i> <i class="arg">event</i> <i class="arg">details</i></a></li>
<li><a href="#3"><b class="cmd">::uevent::unbind</b> <i class="arg">token</i></a></li>
<li><a href="#4"><b class="cmd">::uevent::generate</b> <i class="arg">tag</i> <i class="arg">event</i> <span class="opt">?<i class="arg">details</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::uevent::list</b></a></li>
<li><a href="#6"><b class="cmd">::uevent::list</b> <i class="arg">tag</i></a></li>
<li><a href="#7"><b class="cmd">::uevent::list</b> <i class="arg">tag</i> <i class="arg">event</i></a></li>
<li><a href="#8"><b class="cmd">::uevent::watch::tag::add</b> <i class="arg">pattern</i> <i class="arg">command</i></a></li>
<li><a href="#9"><b class="cmd">{*}command</b> <b class="const">bound</b> <i class="arg">tag</i></a></li>
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<dd><p>Using this command registers the <i class="arg">command</i> prefix to be triggered
when the <i class="arg">event</i> occurs for the <i class="arg">tag</i>. The result of the
command is an opaque token representing the binding. Note that if the
same combination of &lt;<i class="arg">tag</i>,<i class="arg">event</i>,<i class="arg">command</i>&gt; is used
multiple times the same token is returned by every call.</p>
<p>The signature of the <i class="arg">command</i> prefix is</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd"><a href="../../../../index.html#command">command</a></b> <i class="arg">tag</i> <i class="arg">event</i> <i class="arg">details</i></a></dt>
<dd></dd>
</dl>
<p>where <i class="arg">details</i> contains the argument(s) of the event. Its
contents are event specific and have to be agreed upon between actual
event generator and consumer. This package simply transfers the
information and does not perform any processing beyond that.</p></dd>
<dt><a name="3"><b class="cmd">::uevent::unbind</b> <i class="arg">token</i></a></dt>







|







182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<dd><p>Using this command registers the <i class="arg">command</i> prefix to be triggered
when the <i class="arg">event</i> occurs for the <i class="arg">tag</i>. The result of the
command is an opaque token representing the binding. Note that if the
same combination of &lt;<i class="arg">tag</i>,<i class="arg">event</i>,<i class="arg">command</i>&gt; is used
multiple times the same token is returned by every call.</p>
<p>The signature of the <i class="arg">command</i> prefix is</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd"><a href="../../../../index.html#key275">command</a></b> <i class="arg">tag</i> <i class="arg">event</i> <i class="arg">details</i></a></dt>
<dd></dd>
</dl>
<p>where <i class="arg">details</i> contains the argument(s) of the event. Its
contents are event specific and have to be agreed upon between actual
event generator and consumer. This package simply transfers the
information and does not perform any processing beyond that.</p></dd>
<dt><a name="3"><b class="cmd">::uevent::unbind</b> <i class="arg">token</i></a></dt>
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uevent</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../hook/hook.html">hook(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#bind">bind</a>, <a href="../../../../index.html#event">event</a>, <a href="../../../../index.html#generate_event">generate event</a>, <a href="../../../../index.html#hook">hook</a>, <a href="../../../../index.html#unbind">unbind</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|








266
267
268
269
270
271
272






273
274
275
276
277
278
279
280
281
282
283
284
285
286
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uevent</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../hook/hook.html">hook(n)</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key714">bind</a>, <a href="../../../../index.html#key542">event</a>, <a href="../../../../index.html#key713">generate event</a>, <a href="../../../../index.html#key680">hook</a>, <a href="../../../../index.html#key712">unbind</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2012 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/uev/uevent_onidle.html.

1
2
3
4
5
6
7
8
<!DOCTYPE html><html><head>
<title>uevent::onidle - User events</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
|







1
2
3
4
5
6
7
8
<html><head>
<title>uevent::onidle - User events</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'uevent_onidle.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- uevent::onidle.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uevent::onidle(n) 0.1 tcllib &quot;User events&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uevent::onidle - Request merging and deferal to idle time</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'uevent_onidle.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- uevent::onidle.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uevent::onidle(n) 0.1 tcllib &quot;User events&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uevent::onidle - Request merging and deferal to idle time</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uevent</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#callback">callback</a>, <a href="../../../../index.html#deferal">deferal</a>, <a href="../../../../index.html#event">event</a>, <a href="../../../../index.html#idle">idle</a>, <a href="../../../../index.html#merge">merge</a>, <a href="../../../../index.html#on_idle">on-idle</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





172
173
174
175
176
177
178






179
180
181
182
183
184
185
186
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uevent</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key540">callback</a>, <a href="../../../../index.html#key543">deferal</a>, <a href="../../../../index.html#key542">event</a>, <a href="../../../../index.html#key541">idle</a>, <a href="../../../../index.html#key539">merge</a>, <a href="../../../../index.html#key538">on-idle</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/units/units.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>units - Convert and manipulate quantities with units</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>units - Convert and manipulate quantities with units</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'units.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2000-2005 Mayo Foundation
   -->
<!-- units.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">units(n) 1.2 tcllib &quot;Convert and manipulate quantities with units&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>units - unit conversion</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'units.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2000-2005 Mayo Foundation
   -->
<! -- units.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">units(n) 1.2 tcllib &quot;Convert and manipulate quantities with units&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>units - unit conversion</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>units</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#angle">angle</a>, <a href="../../../../index.html#constants">constants</a>, <a href="../../../../index.html#conversion">conversion</a>, <a href="../../../../index.html#distance">distance</a>, <a href="../../../../index.html#radians">radians</a>, <a href="../../../../index.html#unit">unit</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2000-2005 Mayo Foundation</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





464
465
466
467
468
469
470






471
472
473
474
475
476
477
478
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>units</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key582">angle</a>, <a href="../../../../index.html#key610">constants</a>, <a href="../../../../index.html#key20">conversion</a>, <a href="../../../../index.html#key479">distance</a>, <a href="../../../../index.html#key611">radians</a>, <a href="../../../../index.html#key609">unit</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2000-2005 Mayo Foundation</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/uri/uri.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>uri - Tcl Uniform Resource Identifier Management</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>uri - Tcl Uniform Resource Identifier Management</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172

173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216

217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'uri.man' by tcllib/doctools with format 'html'
   -->
<!-- uri.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uri(n) 1.2.7 tcllib &quot;Tcl Uniform Resource Identifier Management&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uri - URI utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">SCHEMES</a></li>
<li class="doctools_section"><a href="#section4">EXTENDING</a></li>
<li class="doctools_section"><a href="#section5">QUIRK OPTIONS</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">BACKWARD COMPATIBILITY</a></li>
<li class="doctools_subsection"><a href="#subsection2">NEW DESIGNS</a></li>
<li class="doctools_subsection"><a href="#subsection3">DEFAULT VALUES</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section6">EXAMPLES</a></li>
<li class="doctools_section"><a href="#section7">CREDITS</a></li>
<li class="doctools_section"><a href="#section8">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">uri <span class="opt">?1.2.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">uri::setQuirkOption</b> <i class="arg">option</i> <span class="opt">?<i class="arg">value</i>?</span></a></li>
<li><a href="#2"><b class="cmd">uri::split</b> <i class="arg">url</i> <span class="opt">?<i class="arg">defaultscheme</i>?</span></a></li>
<li><a href="#3"><b class="cmd">uri::join</b> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>?</span>...</a></li>
<li><a href="#4"><b class="cmd">uri::resolve</b> <i class="arg">base</i> <i class="arg">url</i></a></li>
<li><a href="#5"><b class="cmd">uri::isrelative</b> <i class="arg">url</i></a></li>
<li><a href="#6"><b class="cmd">uri::geturl</b> <i class="arg">url</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#7"><b class="cmd">uri::canonicalize</b> <i class="arg">uri</i></a></li>
<li><a href="#8"><b class="cmd">uri::register</b> <i class="arg">schemeList</i> <i class="arg">script</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package does two things.</p>
<p>First, it provides a number of
commands for manipulating URLs/URIs and fetching data specified by
them. For fetching data this package analyses the requested URL/URI and
then dispatches it to the appropriate package (<b class="package"><a href="../../../../index.html#http">http</a></b>, <b class="package"><a href="../ftp/ftp.html">ftp</a></b>, ...) for
actual retrieval.  Currently these commands are defined for the schemes
<i class="term"><a href="../../../../index.html#http">http</a></i>, <i class="term"><a href="../../../../index.html#https">https</a></i>, <i class="term"><a href="../../../../index.html#ftp">ftp</a></i>, <i class="term"><a href="../../../../index.html#mailto">mailto</a></i>, <i class="term"><a href="../../../../index.html#news">news</a></i>,
<i class="term"><a href="../../../../index.html#ldap">ldap</a></i>, <i class="term">ldaps</i> and <i class="term"><a href="../../../../index.html#file">file</a></i>.  The package <b class="package">uri::urn</b> adds scheme <i class="term"><a href="../../../../index.html#urn">urn</a></i>.</p>
<p>Second, it provides regular expressions
for a number of <b class="const">registered</b> URL/URI schemes. Registered
schemes are currently <i class="term"><a href="../../../../index.html#ftp">ftp</a></i>, <i class="term"><a href="../../../../index.html#ldap">ldap</a></i>, <i class="term">ldaps</i>, <i class="term"><a href="../../../../index.html#file">file</a></i>,
<i class="term"><a href="../../../../index.html#http">http</a></i>, <i class="term"><a href="../../../../index.html#https">https</a></i>, <i class="term"><a href="../../../../index.html#gopher">gopher</a></i>, <i class="term"><a href="../../../../index.html#mailto">mailto</a></i>, <i class="term"><a href="../../../../index.html#news">news</a></i>,
<i class="term"><a href="../../../../index.html#wais">wais</a></i> and <i class="term"><a href="../../../../index.html#prospero">prospero</a></i>.  The package <b class="package">uri::urn</b> adds scheme
<i class="term"><a href="../../../../index.html#urn">urn</a></i>.</p>
<p>The commands of the package conform to
RFC 3986 (<a href="https://www.rfc-editor.org/rfc/rfc3986.txt">https://www.rfc-editor.org/rfc/rfc3986.txt</a>),
with the exception of a loophole arising from RFC 1630 and described
in RFC 3986 Sections 5.2.2 and 5.4.2. The loophole allows a relative
URI to include a scheme if it is the same as the scheme of the base
URI against which it is resolved. RFC 3986 recommends avoiding this usage.</p>

</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">uri::setQuirkOption</b> <i class="arg">option</i> <span class="opt">?<i class="arg">value</i>?</span></a></dt>
<dd><p><b class="cmd">uri::setQuirkOption</b> is an accessor command for a number of &quot;quirk options&quot;.
The command has the same semantics as the command <b class="cmd"><a href="../../../../index.html#set">set</a></b>: when called with one argument it reads an existing value; with two arguments it writes a new value.  The value of a &quot;quirk option&quot; is boolean: the value <b class="const">false</b> requests conformance with RFC 3986, while <b class="const">true</b> requests use of the quirk.  See section <span class="sectref"><a href="#section5">QUIRK OPTIONS</a></span> for discussion of the different options and their purpose.</p></dd>
<dt><a name="2"><b class="cmd">uri::split</b> <i class="arg">url</i> <span class="opt">?<i class="arg">defaultscheme</i>?</span></a></dt>
<dd><p><b class="cmd">uri::split</b> takes a <i class="arg">url</i>, decodes it and then returns a
list of key/value pairs suitable for <b class="cmd">array set</b> containing the
constituents of the <i class="arg">url</i>. If the scheme is missing from the <i class="arg">url</i>
it defaults to the value of <i class="arg">defaultscheme</i> if it was specified,
or <i class="term"><a href="../../../../index.html#http">http</a></i> else. Currently the schemes <i class="term"><a href="../../../../index.html#http">http</a></i>,
<i class="term"><a href="../../../../index.html#https">https</a></i>, <i class="term"><a href="../../../../index.html#ftp">ftp</a></i>, <i class="term"><a href="../../../../index.html#mailto">mailto</a></i>, <i class="term"><a href="../../../../index.html#news">news</a></i>, <i class="term"><a href="../../../../index.html#ldap">ldap</a></i>, <i class="term">ldaps</i> and
<i class="term"><a href="../../../../index.html#file">file</a></i> are supported by the package itself.
See section <span class="sectref"><a href="#section4">EXTENDING</a></span> on how to expand that range.</p>
<p>The set of constituents of a URL (= the set of keys in the returned
dictionary) is dependent on the scheme of the URL. The only key which
is therefore always present is <b class="const">scheme</b>. For the following
schemes the constituents and their keys are known:</p>
<dl class="doctools_definitions">
<dt>ftp</dt>
<dd><p><b class="const">user</b>, <b class="const">pwd</b>, <b class="const">host</b>, <b class="const">port</b>,
<b class="const">path</b>, <b class="const">type</b>, <b class="const">pbare</b>.  The pbare is optional.</p></dd>
<dt>http(s)</dt>
<dd><p><b class="const">user</b>, <b class="const">pwd</b>, <b class="const">host</b>, <b class="const">port</b>,
<b class="const">path</b>, <b class="const">query</b>, <b class="const">fragment</b>, <b class="const">pbare</b>.  The pbare is optional.</p></dd>

<dt>file</dt>
<dd><p><b class="const">path</b>, <b class="const">host</b>. The host is optional.</p></dd>
<dt>mailto</dt>
<dd><p><b class="const">user</b>, <b class="const">host</b>. The host is optional.</p></dd>
<dt>ldap(s)</dt>
<dd><p><b class="const">host</b>, <b class="const">port</b>, <b class="const">dn</b>, <b class="const">attrs</b>, <b class="const">scope</b>, <b class="const">filter</b>, <b class="const">extensions</b></p></dd>
<dt>news</dt>
<dd><p>Either <b class="const">message-id</b> or <b class="const">newsgroup-name</b>.</p></dd>
</dl>
<p>For discussion of the boolean <b class="const">pbare</b> see options <em>NoInitialSlash</em> and <em>NoExtraKeys</em> in <span class="sectref"><a href="#section5">QUIRK OPTIONS</a></span>.</p>
<p>The constituents are returned as slices of the argument <i class="arg">url</i>, without removal of percent-encoding (&quot;url-encoding&quot;) or other adaptations.  Notably, on Windows&reg; the <b class="const">path</b> in scheme <i class="term"><a href="../../../../index.html#file">file</a></i> is not a valid local filename.  See <span class="sectref"><a href="#section6">EXAMPLES</a></span> for more information.</p></dd>
<dt><a name="3"><b class="cmd">uri::join</b> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>?</span>...</a></dt>
<dd><p><b class="cmd">uri::join</b> takes a list of key/value pairs (generated by
<b class="cmd">uri::split</b>, for example) and returns the canonical URL they
represent. Currently the schemes <i class="term"><a href="../../../../index.html#http">http</a></i>, <i class="term"><a href="../../../../index.html#https">https</a></i>,
<i class="term"><a href="../../../../index.html#ftp">ftp</a></i>, <i class="term"><a href="../../../../index.html#mailto">mailto</a></i>, <i class="term"><a href="../../../../index.html#news">news</a></i>, <i class="term"><a href="../../../../index.html#ldap">ldap</a></i>, <i class="term">ldaps</i> and <i class="term"><a href="../../../../index.html#file">file</a></i>
are supported by the package itself. See section <span class="sectref"><a href="#section4">EXTENDING</a></span> on how to expand that range.</p>
<p>The arguments are expected to be slices of a valid URL, with percent-encoding (&quot;url-encoding&quot;) and any other necessary adaptations.  Notably, on Windows the <b class="const">path</b> in scheme <i class="term"><a href="../../../../index.html#file">file</a></i> is not a valid local filename.  See <span class="sectref"><a href="#section6">EXAMPLES</a></span> for more information.</p></dd>

<dt><a name="4"><b class="cmd">uri::resolve</b> <i class="arg">base</i> <i class="arg">url</i></a></dt>
<dd><p><b class="cmd">uri::resolve</b> resolves the specified <i class="arg">url</i> relative to
<i class="arg">base</i>, in conformance with RFC 3986. In other words: a
non-relative <i class="arg">url</i> is returned
unchanged, whereas for a relative <i class="arg">url</i> the missing parts are
taken from <i class="arg">base</i> and prepended to it. The result of this
operation is returned. For an empty <i class="arg">url</i> the result is
<i class="arg">base</i>, without its URI fragment (if any).  The command is available for schemes <i class="term"><a href="../../../../index.html#http">http</a></i>, <i class="term"><a href="../../../../index.html#https">https</a></i>, <i class="term"><a href="../../../../index.html#ftp">ftp</a></i>, and <i class="term"><a href="../../../../index.html#file">file</a></i>.</p></dd>
<dt><a name="5"><b class="cmd">uri::isrelative</b> <i class="arg">url</i></a></dt>
<dd><p><b class="cmd">uri::isrelative</b> determines whether the specified <i class="arg">url</i> is
absolute or relative.  The command is available for a <i class="arg">url</i> of any scheme.</p></dd>
<dt><a name="6"><b class="cmd">uri::geturl</b> <i class="arg">url</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p><b class="cmd">uri::geturl</b> decodes the specified <i class="arg">url</i> and then dispatches
the request to the package appropriate for the scheme found in the
URL. The command assumes that the package to handle the given scheme
either has the same name as the scheme itself (including possible
capitalization) followed by <b class="cmd">::geturl</b>, or, in case of this
failing, has the same name as the scheme itself (including possible
capitalization). It further assumes that whatever package was loaded
provides a <b class="cmd">geturl</b>-command in the namespace of the same name as
the package itself. This command is called with the given <i class="arg">url</i>
and all given <i class="arg">options</i>. Currently <b class="cmd">geturl</b> does not handle
any options itself.</p>
<p><em>Note:</em> <i class="term"><a href="../../../../index.html#file">file</a></i>-URLs are an exception to the rule
described above. They are handled internally.</p>
<p>It is not possible to specify results of the command. They depend on
the <b class="cmd">geturl</b>-command for the scheme the request was dispatched to.</p></dd>
<dt><a name="7"><b class="cmd">uri::canonicalize</b> <i class="arg">uri</i></a></dt>
<dd><p><b class="cmd">uri::canonicalize</b> returns the canonical form of a URI.  The
canonical form of a URI is one where relative path specifications,
i.e. &quot;.&quot; and &quot;..&quot;, have been resolved.  The command is available for all
URI schemes that have <b class="cmd">uri::split</b> and <b class="cmd">uri::join</b> commands. The command
returns a canonicalized URI if the URI scheme has a <b class="const">path</b> component (i.e. <i class="term"><a href="../../../../index.html#http">http</a></i>, <i class="term"><a href="../../../../index.html#https">https</a></i>, <i class="term"><a href="../../../../index.html#ftp">ftp</a></i>, and <i class="term"><a href="../../../../index.html#file">file</a></i>).  For schemes that have <b class="cmd">uri::split</b> and <b class="cmd">uri::join</b> commands but no <b class="const">path</b> component (i.e. <i class="term"><a href="../../../../index.html#mailto">mailto</a></i>, <i class="term"><a href="../../../../index.html#news">news</a></i>, <i class="term"><a href="../../../../index.html#ldap">ldap</a></i>, and <i class="term">ldaps</i>), the command returns the <i class="arg">uri</i> unchanged.</p></dd>
<dt><a name="8"><b class="cmd">uri::register</b> <i class="arg">schemeList</i> <i class="arg">script</i></a></dt>
<dd><p><b class="cmd">uri::register</b> registers the first element of <i class="arg">schemeList</i> as
a new scheme and the remaining elements as aliases for this scheme. It
creates the namespace for the scheme and executes the <i class="arg">script</i> in
the new namespace. The script has to declare variables containing
regular expressions relevant to the scheme. At least the variable
<b class="variable">schemepart</b> has to be declared as that one is used to extend
the variables keeping track of the registered schemes.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">SCHEMES</a></h2>
<p>In addition to the commands mentioned above this package provides
regular expression to recognize URLs for a number of URL schemes.</p>
<p>For each supported scheme a namespace of the same name as the scheme
itself is provided inside of the namespace <em>uri</em> containing the
variable <b class="variable">url</b> whose contents are a regular expression to
recognize URLs of that scheme. Additional variables may contain
regular expressions for parts of URLs for that scheme.</p>
<p>The variable <b class="variable">uri::schemes</b> contains a list of all registered
schemes. Currently these are <i class="term"><a href="../../../../index.html#ftp">ftp</a></i>, <i class="term"><a href="../../../../index.html#ldap">ldap</a></i>, <i class="term">ldaps</i>, <i class="term"><a href="../../../../index.html#file">file</a></i>,
<i class="term"><a href="../../../../index.html#http">http</a></i>, <i class="term"><a href="../../../../index.html#https">https</a></i>, <i class="term"><a href="../../../../index.html#gopher">gopher</a></i>, <i class="term"><a href="../../../../index.html#mailto">mailto</a></i>, <i class="term"><a href="../../../../index.html#news">news</a></i>,
<i class="term"><a href="../../../../index.html#wais">wais</a></i> and <i class="term"><a href="../../../../index.html#prospero">prospero</a></i>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXTENDING</a></h2>
<p>Extending the range of schemes supported by <b class="cmd">uri::split</b> and
<b class="cmd">uri::join</b> is easy because both commands do not handle the
request by themselves but dispatch it to another command in the
<em>uri</em> namespace using the scheme of the URL as criterion.</p>
<p><b class="cmd">uri::split</b> and <b class="cmd">uri::join</b>
call <b class="cmd">Split[string totitle &lt;scheme&gt;]</b>
and  <b class="cmd">Join[string totitle &lt;scheme&gt;]</b> respectively.</p>
<p>The provision of split and join commands is sufficient to extend the commands <b class="cmd">uri::canonicalize</b> and <b class="cmd">uri::geturl</b>
(the latter subject to the availability of a suitable package with a <b class="cmd">geturl</b> command).  In contrast, to extend the command <b class="cmd">uri::resolve</b> to a new scheme, the command itself must be modified.</p>
<p>To extend the range of schemes for which pattern information is
available, use the command <b class="cmd">uri::register</b>.</p>
<p>An example of a package that provides both commands and pattern information for a new scheme is <b class="package">uri::urn</b>, which adds scheme <i class="term"><a href="../../../../index.html#urn">urn</a></i>.</p>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">QUIRK OPTIONS</a></h2>
<p>The value of a &quot;quirk option&quot; is boolean: the value <b class="const">false</b> requests conformance with RFC 3986, while <b class="const">true</b> requests use of the quirk.  Use command <b class="cmd">uri::setQuirkOption</b> to access the values of quirk options.</p>
<p>Quirk options are useful both for allowing backwards compatibility when a command
specification changes, and for adding useful features that are not included
in RFC specifications.  The following quirk options are currently defined:</p>
<dl class="doctools_definitions">
<dt><em>NoInitialSlash</em></dt>
<dd><p>This quirk option concerns the leading character of <b class="const">path</b> (if non-empty) in the schemes <i class="term"><a href="../../../../index.html#http">http</a></i>, <i class="term"><a href="../../../../index.html#https">https</a></i>, and <i class="term"><a href="../../../../index.html#ftp">ftp</a></i>.</p>
<p>RFC 3986 defines <b class="const">path</b> in an absolute URI to have an initial &quot;/&quot;, unless the value of <b class="const">path</b> is the empty string. For the scheme <i class="term"><a href="../../../../index.html#file">file</a></i>, all versions of package <b class="package">uri</b> follow this rule.  The quirk option <em>NoInitialSlash</em> does not apply to scheme <i class="term"><a href="../../../../index.html#file">file</a></i>.</p>
<p>For the schemes <i class="term"><a href="../../../../index.html#http">http</a></i>, <i class="term"><a href="../../../../index.html#https">https</a></i>, and <i class="term"><a href="../../../../index.html#ftp">ftp</a></i>, versions of <b class="package">uri</b> before 1.2.7 define the <b class="const">path</b> <em>NOT</em> to include an initial &quot;/&quot;.  When the quirk option <em>NoInitialSlash</em> is <b class="const">true</b> (the default), this behavior is also used in version 1.2.7.  To use instead values of <b class="const">path</b> as defined by RFC 3986, set this quirk option to <b class="const">false</b>.</p>
<p>This setting does not affect RFC 3986 conformance.  If <em>NoInitialSlash</em> is <b class="const">true</b>, then the value of <b class="const">path</b> in the schemes <i class="term"><a href="../../../../index.html#http">http</a></i>, <i class="term"><a href="../../../../index.html#https">https</a></i>, or <i class="term"><a href="../../../../index.html#ftp">ftp</a></i>, cannot distinguish between URIs in which the full &quot;RFC 3986 path&quot; is the empty string &quot;&quot; or a single slash &quot;/&quot; respectively.  The missing information is recorded in an additional <b class="cmd">uri::split</b> key <b class="const">pbare</b>.</p>
<p>The boolean <b class="const">pbare</b> is defined when quirk options <em>NoInitialSlash</em> and <em>NoExtraKeys</em> have values <b class="const">true</b> and <b class="const">false</b> respectively.  In this case, if the value of <b class="const">path</b> is the empty string &quot;&quot;, <b class="const">pbare</b> is <b class="const">true</b> if the full &quot;RFC 3986 path&quot; is &quot;&quot;, and <b class="const">pbare</b> is <b class="const">false</b> if the full &quot;RFC 3986 path&quot; is &quot;/&quot;.</p>
<p>Using this quirk option <em>NoInitialSlash</em> is a matter of preference.</p></dd>
<dt><em>NoExtraKeys</em></dt>
<dd><p>This quirk option permits full backward compatibility with versions of <b class="package">uri</b> before 1.2.7, by omitting the <b class="cmd">uri::split</b> key <b class="const">pbare</b> described above (see quirk option <em>NoInitialSlash</em>).  The outcome is greater backward compatibility of the <b class="cmd">uri::split</b> command, but an inability to distinguish between URIs in which the full &quot;RFC 3986 path&quot; is the empty string &quot;&quot; or a single slash &quot;/&quot; respectively - i.e. a minor non-conformance with RFC 3986.</p>
<p>If the quirk option <em>NoExtraKeys</em> is <b class="const">false</b> (the default), command <b class="cmd">uri::split</b> returns an additional key <b class="const">pbare</b>, and the commands comply with RFC 3986. If the quirk option <em>NoExtraKeys</em> is <b class="const">true</b>, the key <b class="const">pbare</b> is not defined and there is not full conformance with RFC 3986.</p>
<p>Using the quirk option <em>NoExtraKeys</em> is <em>NOT</em> recommended, because if set to <b class="const">true</b> it will reduce conformance with RFC 3986.  The option is included only for compatibility with code, written for earlier versions of <b class="package">uri</b>, that needs values of <b class="const">path</b> without a leading &quot;/&quot;, <em>AND ALSO</em> cannot tolerate unexpected keys in the results of <b class="cmd">uri::split</b>.</p></dd>
<dt><em>HostAsDriveLetter</em></dt>
<dd><p>When handling the scheme <i class="term"><a href="../../../../index.html#file">file</a></i> on the
Windows platform, versions of <b class="package">uri</b> before 1.2.7
use the <b class="const">host</b> field to represent a Windows drive letter and the colon that follows it, and the <b class="const">path</b> field to represent the filename path after the colon.  Such URIs are invalid, and are not recognized by any RFC. When the quirk option <em>HostAsDriveLetter</em> is <b class="const">true</b>, this behavior is also used in version 1.2.7.  To use <i class="term"><a href="../../../../index.html#file">file</a></i> URIs on Windows that conform to RFC 3986, set this quirk option to <b class="const">false</b> (the default).</p>
<p>Using this quirk is <em>NOT</em> recommended, because if set to <b class="const">true</b> it will cause the <b class="package">uri</b> commands to expect and produce invalid URIs.  The option is included only for compatibility with legacy code.</p></dd>
<dt><em>RemoveDoubleSlashes</em></dt>
<dd><p>When a URI is canonicalized by <b class="cmd">uri::canonicalize</b>, its <b class="const">path</b> is normalized by removal of segments &quot;.&quot; and &quot;..&quot;.  RFC 3986 does not mandate
the removal of empty segments &quot;&quot; (i.e. the merger of double slashes, which is a feature of filename normalization but not of URI <b class="const">path</b> normalization): it treats URIs with excess slashes as referring to different resources.  When the quirk option <em>RemoveDoubleSlashes</em> is <b class="const">true</b> (the default), empty segments will be removed from <b class="const">path</b>.  To prevent removal, and thereby conform to RFC 3986, set this quirk option to <b class="const">false</b>.</p>
<p>Using this quirk is a matter of preference.  A URI with double slashes in its path was most likely generated by error, certainly so if it has a straightforward mapping to a file on a server.  In some cases it may be better to sanitize the URI; in others, to keep the URI and let the server handle the possible error.</p></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">BACKWARD COMPATIBILITY</a></h3>
<p>To behave as similarly as possible to versions of <b class="package">uri</b> earlier than 1.2.7, set the following quirk options:</p>
<ul class="doctools_itemized">
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">NoInitialSlash</i> 1</p></li>
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">NoExtraKeys</i> 1</p></li>
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">HostAsDriveLetter</i> 1</p></li>
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">RemoveDoubleSlashes</i> 0</p></li>
</ul>
<p>In code that can tolerate the return by <b class="cmd">uri::split</b> of an additional key <b class="const">pbare</b>, set</p>
<ul class="doctools_itemized">
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">NoExtraKeys</i> 0</p></li>
</ul>
<p>in order to achieve greater compliance with RFC 3986.</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">NEW DESIGNS</a></h3>
<p>For new projects, the following settings are recommended:</p>
<ul class="doctools_itemized">
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">NoInitialSlash</i> 0</p></li>
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">NoExtraKeys</i> 0</p></li>
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">HostAsDriveLetter</i> 0</p></li>
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">RemoveDoubleSlashes</i> 0|1</p></li>
</ul>
</div>
<div id="subsection3" class="doctools_subsection"><h3><a name="subsection3">DEFAULT VALUES</a></h3>
<p>The default values for package <b class="package">uri</b> version 1.2.7 are intended to be a compromise between backwards compatibility and improved features.  Different default values may be chosen in future versions of package <b class="package">uri</b>.</p>
<ul class="doctools_itemized">
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">NoInitialSlash</i> 1</p></li>
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">NoExtraKeys</i> 0</p></li>
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">HostAsDriveLetter</i> 0</p></li>
<li><p><b class="cmd">uri::setQuirkOption</b> <i class="arg">RemoveDoubleSlashes</i> 1</p></li>
</ul>
</div>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">EXAMPLES</a></h2>
<p>A Windows&reg; local filename such as &quot;<b class="const">C:\Other Files\startup.txt</b>&quot; is not suitable for use as the <b class="const">path</b> element of a URI in the scheme <i class="term"><a href="../../../../index.html#file">file</a></i>.</p>
<p>The Tcl command <b class="cmd">file normalize</b> will convert the backslashes to forward slashes.  To generate a valid <b class="const">path</b> for the scheme <i class="term"><a href="../../../../index.html#file">file</a></i>, the normalized filename must be prepended with &quot;<b class="const">/</b>&quot;, and then any characters that do not match the <b class="cmd">regexp</b> bracket expression</p>
<pre class="doctools_example">
    [a-zA-Z0-9$_.+!*'(,)?:@&amp;=-]
</pre>
<p>must be percent-encoded.</p>
<p>The result in this example is &quot;<b class="const">/C:/Other%20Files/startup.txt</b>&quot; which is a valid value for <b class="const">path</b>.</p>
<pre class="doctools_example">
% uri::join path /C:/Other%20Files/startup.txt scheme file
file:///C:/Other%20Files/startup.txt
% uri::split file:///C:/Other%20Files/startup.txt
path /C:/Other%20Files/startup.txt scheme file
</pre>
<p>On UNIX&reg; systems filenames begin with &quot;<b class="const">/</b>&quot; which is also used as the directory separator.  The only action needed to convert a filename to a valid <b class="const">path</b> is percent-encoding.</p>
</div>
<div id="section7" class="doctools_section"><h2><a name="section7">CREDITS</a></h2>
<p>Original code (regular expressions) by Andreas Kupries.
Modularisation by Steve Ball, also the split/join/resolve
functionality. RFC 3986 conformance by Keith Nash.</p>
</div>
<div id="section8" class="doctools_section"><h2><a name="section8">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uri</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#fetching_information">fetching information</a>, <a href="../../../../index.html#file">file</a>, <a href="../../../../index.html#ftp">ftp</a>, <a href="../../../../index.html#gopher">gopher</a>, <a href="../../../../index.html#http">http</a>, <a href="../../../../index.html#https">https</a>, <a href="../../../../index.html#ldap">ldap</a>, <a href="../../../../index.html#mailto">mailto</a>, <a href="../../../../index.html#news">news</a>, <a href="../../../../index.html#prospero">prospero</a>, <a href="../../../../index.html#rfc_1630">rfc 1630</a>, <a href="../../../../index.html#rfc_2255">rfc 2255</a>, <a href="../../../../index.html#rfc_2396">rfc 2396</a>, <a href="../../../../index.html#rfc_3986">rfc 3986</a>, <a href="../../../../index.html#uri">uri</a>, <a href="../../../../index.html#url">url</a>, <a href="../../../../index.html#wais">wais</a>, <a href="../../../../index.html#www">www</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







|

|



|
|
|
|
|
|


|











|
<
<
<
<
<
<
|
<
<








|


<
|
|
|
|
|
|
|




|
|
|
|
|
|
<
<
<
<
<
<
<
<
|
|
<
<
<
<
>



<
<
<
|
|

|

|
|
|

|
|





|


|
>




<
<


|
<
<
|

|
|
|
|
<
>
|

<
|



|
|

|
|


|








|



|


|
<
<
|



|







|



|
|
|
|
|
|





|



<
<
<
<
<

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|

|






<
<
<
<
<
<


|





88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121






122


123
124
125
126
127
128
129
130
131
132
133

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150








151
152




153
154
155
156



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181


182
183
184


185
186
187
188
189
190

191
192
193

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221


222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252





253
254












































































255
256
257
258
259
260
261
262
263
264
265






266
267
268
269
270
271
272
273
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'uri.man' by tcllib/doctools with format 'html'
   -->
<! -- uri.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uri(n) 1.2.6 tcllib &quot;Tcl Uniform Resource Identifier Management&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uri - URI utilities</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">COMMANDS</a></li>
<li class="doctools_section"><a href="#section3">SCHEMES</a></li>
<li class="doctools_section"><a href="#section4">EXTENDING</a></li>
<li class="doctools_section"><a href="#section5">CREDITS</a></li>






<li class="doctools_section"><a href="#section6">Bugs, Ideas, Feedback</a></li>


<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">uri <span class="opt">?1.2.6?</span></b></li>
</ul>
<ul class="doctools_syntax">

<li><a href="#1"><b class="cmd">uri::split</b> <i class="arg">url</i> <span class="opt">?<i class="arg">defaultscheme</i>?</span></a></li>
<li><a href="#2"><b class="cmd">uri::join</b> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>?</span>...</a></li>
<li><a href="#3"><b class="cmd">uri::resolve</b> <i class="arg">base</i> <i class="arg">url</i></a></li>
<li><a href="#4"><b class="cmd">uri::isrelative</b> <i class="arg">url</i></a></li>
<li><a href="#5"><b class="cmd">uri::geturl</b> <i class="arg">url</i> <span class="opt">?<i class="arg">options</i>...?</span></a></li>
<li><a href="#6"><b class="cmd">uri::canonicalize</b> <i class="arg">uri</i></a></li>
<li><a href="#7"><b class="cmd">uri::register</b> <i class="arg">schemeList</i> <i class="arg">script</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package contains two parts. First it provides regular expressions
for a number of url/uri schemes. Second it provides a number of
commands for manipulating urls/uris and fetching data specified by
them. For the latter this package analyses the requested url/uri and
then dispatches it to the appropriate package (http, ftp, ...) for
actual fetching.</p>








<p>The package currently does not conform to
RFC 2396 (<a href="http://www.rfc-editor.org/rfc/rfc2396.txt">http://www.rfc-editor.org/rfc/rfc2396.txt</a>),




but quite likely should be. Patches and other help are welcome.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">



<dt><a name="1"><b class="cmd">uri::split</b> <i class="arg">url</i> <span class="opt">?<i class="arg">defaultscheme</i>?</span></a></dt>
<dd><p><b class="cmd">uri::split</b> takes an <i class="arg">url</i>, decodes it and then returns a
list of key/value pairs suitable for <b class="cmd">array set</b> containing the
constituents of the <i class="arg">url</i>. If the scheme is missing from the url
it defaults to the value of <i class="arg">defaultscheme</i> if it was specified,
or <i class="term"><a href="../../../../index.html#key446">http</a></i> else. Currently only the schemes <i class="term"><a href="../../../../index.html#key446">http</a></i>,
<i class="term"><a href="../../../../index.html#key294">ftp</a></i>, <i class="term"><a href="../../../../index.html#key534">mailto</a></i>, <i class="term"><a href="../../../../index.html#key577">urn</a></i>, <i class="term"><a href="../../../../index.html#key532">news</a></i>, <i class="term"><a href="../../../../index.html#key130">ldap</a></i> and
<i class="term"><a href="../../../../index.html#key31">file</a></i> are supported by the package itself.
See section <span class="sectref"><a href="#section4">EXTENDING</a></span> on how to expand that range.</p>
<p>The set of constituents of an url (= the set of keys in the returned
dictionary) is dependent on the scheme of the url. The only key which
is therefore always present is <b class="const">scheme</b>. For the following
schemes the constituents and their keys are known:</p>
<dl class="doctools_definitions">
<dt>ftp</dt>
<dd><p><b class="const">user</b>, <b class="const">pwd</b>, <b class="const">host</b>, <b class="const">port</b>,
<b class="const">path</b>, <b class="const">type</b></p></dd>
<dt>http(s)</dt>
<dd><p><b class="const">user</b>, <b class="const">pwd</b>, <b class="const">host</b>, <b class="const">port</b>,
<b class="const">path</b>, <b class="const">query</b>, <b class="const">fragment</b>. The fragment
is optional.</p></dd>
<dt>file</dt>
<dd><p><b class="const">path</b>, <b class="const">host</b>. The host is optional.</p></dd>
<dt>mailto</dt>
<dd><p><b class="const">user</b>, <b class="const">host</b>. The host is optional.</p></dd>


<dt>news</dt>
<dd><p>Either <b class="const">message-id</b> or <b class="const">newsgroup-name</b>.</p></dd>
</dl></dd>


<dt><a name="2"><b class="cmd">uri::join</b> <span class="opt">?<i class="arg">key</i> <i class="arg">value</i>?</span>...</a></dt>
<dd><p><b class="cmd">uri::join</b> takes a list of key/value pairs (generated by
<b class="cmd">uri::split</b>, for example) and returns the canonical url they
represent. Currently only the schemes <i class="term"><a href="../../../../index.html#key446">http</a></i>, <i class="term"><a href="../../../../index.html#key294">ftp</a></i>,
<i class="term"><a href="../../../../index.html#key534">mailto</a></i>, <i class="term"><a href="../../../../index.html#key577">urn</a></i>, <i class="term"><a href="../../../../index.html#key532">news</a></i>, <i class="term"><a href="../../../../index.html#key130">ldap</a></i> and <i class="term"><a href="../../../../index.html#key31">file</a></i>
are supported. See section <span class="sectref"><a href="#section4">EXTENDING</a></span> on how to expand that

range.</p></dd>
<dt><a name="3"><b class="cmd">uri::resolve</b> <i class="arg">base</i> <i class="arg">url</i></a></dt>
<dd><p><b class="cmd">uri::resolve</b> resolves the specified <i class="arg">url</i> relative to

<i class="arg">base</i>. In other words: A non-relative <i class="arg">url</i> is returned
unchanged, whereas for a relative <i class="arg">url</i> the missing parts are
taken from <i class="arg">base</i> and prepended to it. The result of this
operation is returned. For an empty <i class="arg">url</i> the result is
<i class="arg">base</i>.</p></dd>
<dt><a name="4"><b class="cmd">uri::isrelative</b> <i class="arg">url</i></a></dt>
<dd><p><b class="cmd">uri::isrelative</b> determines whether the specified <i class="arg">url</i> is
absolute or relative.</p></dd>
<dt><a name="5"><b class="cmd">uri::geturl</b> <i class="arg">url</i> <span class="opt">?<i class="arg">options</i>...?</span></a></dt>
<dd><p><b class="cmd">uri::geturl</b> decodes the specified <i class="arg">url</i> and then dispatches
the request to the package appropriate for the scheme found in the
url. The command assumes that the package to handle the given scheme
either has the same name as the scheme itself (including possible
capitalization) followed by <b class="cmd">::geturl</b>, or, in case of this
failing, has the same name as the scheme itself (including possible
capitalization). It further assumes that whatever package was loaded
provides a <b class="cmd">geturl</b>-command in the namespace of the same name as
the package itself. This command is called with the given <i class="arg">url</i>
and all given <i class="arg">options</i>. Currently <b class="cmd">geturl</b> does not handle
any options itself.</p>
<p><em>Note:</em> <i class="term"><a href="../../../../index.html#key31">file</a></i>-urls are an exception to the rule
described above. They are handled internally.</p>
<p>It is not possible to specify results of the command. They depend on
the <b class="cmd">geturl</b>-command for the scheme the request was dispatched to.</p></dd>
<dt><a name="6"><b class="cmd">uri::canonicalize</b> <i class="arg">uri</i></a></dt>
<dd><p><b class="cmd">uri::canonicalize</b> returns the canonical form of a URI.  The
canonical form of a URI is one where relative path specifications,
ie. . and .., have been resolved.</p></dd>


<dt><a name="7"><b class="cmd">uri::register</b> <i class="arg">schemeList</i> <i class="arg">script</i></a></dt>
<dd><p><b class="cmd">uri::register</b> registers the first element of <i class="arg">schemeList</i> as
a new scheme and the remaining elements as aliases for this scheme. It
creates the namespace for the scheme and executes the <i class="arg">script</i> in
the new namespace. The script has to declare variables containing the
regular expressions relevant to the scheme. At least the variable
<b class="variable">schemepart</b> has to be declared as that one is used to extend
the variables keeping track of the registered schemes.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">SCHEMES</a></h2>
<p>In addition to the commands mentioned above this package provides
regular expression to recognize urls for a number of url schemes.</p>
<p>For each supported scheme a namespace of the same name as the scheme
itself is provided inside of the namespace <em>uri</em> containing the
variable <b class="variable">url</b> whose contents are a regular expression to
recognize urls of that scheme. Additional variables may contain
regular expressions for parts of urls for that scheme.</p>
<p>The variable <b class="variable">uri::schemes</b> contains a list of all supported
schemes. Currently these are <i class="term"><a href="../../../../index.html#key294">ftp</a></i>, <i class="term"><a href="../../../../index.html#key130">ldap</a></i>, <i class="term"><a href="../../../../index.html#key31">file</a></i>,
<i class="term"><a href="../../../../index.html#key446">http</a></i>, <i class="term"><a href="../../../../index.html#key531">gopher</a></i>, <i class="term"><a href="../../../../index.html#key534">mailto</a></i>, <i class="term"><a href="../../../../index.html#key532">news</a></i>,
<i class="term"><a href="../../../../index.html#key530">wais</a></i> and <i class="term"><a href="../../../../index.html#key529">prospero</a></i>.</p>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EXTENDING</a></h2>
<p>Extending the range of schemes supported by <b class="cmd">uri::split</b> and
<b class="cmd">uri::join</b> is easy because both commands do not handle the
request by themselves but dispatch it to another command in the
<em>uri</em> namespace using the scheme of the url as criterion.</p>
<p><b class="cmd">uri::split</b> and <b class="cmd">uri::join</b>
call <b class="cmd">Split[string totitle &lt;scheme&gt;]</b>
and  <b class="cmd">Join[string totitle &lt;scheme&gt;]</b> respectively.</p>





</div>
<div id="section5" class="doctools_section"><h2><a name="section5">CREDITS</a></h2>












































































<p>Original code (regular expressions) by Andreas Kupries.
Modularisation by Steve Ball, also the split/join/resolve
functionality.</p>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uri</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key533">fetching information</a>, <a href="../../../../index.html#key31">file</a>, <a href="../../../../index.html#key294">ftp</a>, <a href="../../../../index.html#key531">gopher</a>, <a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key130">ldap</a>, <a href="../../../../index.html#key534">mailto</a>, <a href="../../../../index.html#key532">news</a>, <a href="../../../../index.html#key529">prospero</a>, <a href="../../../../index.html#key535">rfc 2255</a>, <a href="../../../../index.html#key537">rfc 2396</a>, <a href="../../../../index.html#key528">uri</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key530">wais</a>, <a href="../../../../index.html#key536">www</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/uri/urn-scheme.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>uri_urn - Tcl Uniform Resource Identifier Management</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>uri_urn - Tcl Uniform Resource Identifier Management</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'urn-scheme.man' by tcllib/doctools with format 'html'
   -->
<!-- uri_urn.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uri_urn(n) 1.0.3 tcllib &quot;Tcl Uniform Resource Identifier Management&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uri_urn - URI utilities, URN scheme</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'urn-scheme.man' by tcllib/doctools with format 'html'
   -->
<! -- uri_urn.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uri_urn(n) 1.0.3 tcllib &quot;Tcl Uniform Resource Identifier Management&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uri_urn - URI utilities, URN scheme</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<li><a href="#1"><b class="cmd">uri::urn::quote</b> <i class="arg">url</i></a></li>
<li><a href="#2"><b class="cmd">uri::urn::unquote</b> <i class="arg">url</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides two commands to quote and unquote the disallowed
characters for url using the <i class="term"><a href="../../../../index.html#urn">urn</a></i> scheme, registers the scheme
with the package <b class="package"><a href="uri.html">uri</a></b>, and provides internal helpers which
will be automatically used by the commands <b class="cmd">uri::split</b> and
<b class="cmd">uri::join</b> of package <b class="package"><a href="uri.html">uri</a></b> to handle urls using the
<i class="term"><a href="../../../../index.html#urn">urn</a></i> scheme.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">uri::urn::quote</b> <i class="arg">url</i></a></dt>
<dd><p>This command quotes the characters disallowed by the <i class="term"><a href="../../../../index.html#urn">urn</a></i> scheme
(per RFC 2141 sec2.2) in the <i class="arg">url</i> and returns the modified url as
its result.</p></dd>
<dt><a name="2"><b class="cmd">uri::urn::unquote</b> <i class="arg">url</i></a></dt>
<dd><p>This commands performs the reverse of <b class="cmd">::uri::urn::quote</b>. It
takes an <i class="term"><a href="../../../../index.html#urn">urn</a></i> url, removes the quoting from all disallowed
characters, and returns the modified urls as its result.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uri</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#rfc_2141">rfc 2141</a>, <a href="../../../../index.html#uri">uri</a>, <a href="../../../../index.html#url">url</a>, <a href="../../../../index.html#urn">urn</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







|



|




|




|










<
<
<
<
<
<


|





131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162






163
164
165
166
167
168
169
170
<li><a href="#1"><b class="cmd">uri::urn::quote</b> <i class="arg">url</i></a></li>
<li><a href="#2"><b class="cmd">uri::urn::unquote</b> <i class="arg">url</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package provides two commands to quote and unquote the disallowed
characters for url using the <i class="term"><a href="../../../../index.html#key577">urn</a></i> scheme, registers the scheme
with the package <b class="package"><a href="uri.html">uri</a></b>, and provides internal helpers which
will be automatically used by the commands <b class="cmd">uri::split</b> and
<b class="cmd">uri::join</b> of package <b class="package"><a href="uri.html">uri</a></b> to handle urls using the
<i class="term"><a href="../../../../index.html#key577">urn</a></i> scheme.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">uri::urn::quote</b> <i class="arg">url</i></a></dt>
<dd><p>This command quotes the characters disallowed by the <i class="term"><a href="../../../../index.html#key577">urn</a></i> scheme
(per RFC 2141 sec2.2) in the <i class="arg">url</i> and returns the modified url as
its result.</p></dd>
<dt><a name="2"><b class="cmd">uri::urn::unquote</b> <i class="arg">url</i></a></dt>
<dd><p>This commands performs the reverse of <b class="cmd">::uri::urn::quote</b>. It
takes an <i class="term"><a href="../../../../index.html#key577">urn</a></i> url, removes the quoting from all disallowed
characters, and returns the modified urls as its result.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uri</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key578">rfc 2141</a>, <a href="../../../../index.html#key528">uri</a>, <a href="../../../../index.html#key246">url</a>, <a href="../../../../index.html#key577">urn</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/uuid/uuid.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>uuid - uuid</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>uuid - uuid</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'uuid.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2004, Pat Thoyts &amp;lt;patthoyts@users.sourceforge.net&amp;gt;
   -->
<!-- uuid.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uuid(n) 1.0.6 tcllib &quot;uuid&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uuid - UUID generation and comparison</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'uuid.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;
   -->
<! -- uuid.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">uuid(n) 1.0.4 tcllib &quot;uuid&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>uuid - UUID generation and comparison</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">uuid <span class="opt">?1.0.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::uuid::uuid generate</b></a></li>
<li><a href="#2"><b class="cmd">::uuid::uuid equal</b> <i class="arg">id1</i> <i class="arg">id2</i></a></li>
</ul>
</div>
</div>







|







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">uuid <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::uuid::uuid generate</b></a></li>
<li><a href="#2"><b class="cmd">::uuid::uuid equal</b> <i class="arg">id1</i> <i class="arg">id2</i></a></li>
</ul>
</div>
</div>
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uuid</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#guid">GUID</a>, <a href="../../../../index.html#uuid">UUID</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








169
170
171
172
173
174
175






176
177
178
179
180
181
182
183
184
185
186
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>uuid</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key210">GUID</a>, <a href="../../../../index.html#key211">UUID</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Hashes, checksums, and encryption</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2004, Pat Thoyts &lt;patthoyts@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/cc_amex.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::creditcard::amex - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::creditcard::amex - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::creditcard::amex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::amex(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::amex - Validation for AMEX creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::creditcard::amex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::amex(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::amex - Validation for AMEX creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#amex">AMEX</a>, <a href="../../../../index.html#american_express">American Express</a>, <a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#bank">bank</a>, <a href="../../../../index.html#card_for_credit">card for credit</a>, <a href="../../../../index.html#credit_card">credit card</a>, <a href="../../../../index.html#finance">finance</a>, <a href="../../../../index.html#isa">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








203
204
205
206
207
208
209






210
211
212
213
214
215
216
217
218
219
220
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key398">AMEX</a>, <a href="../../../../index.html#key397">American Express</a>, <a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key269">bank</a>, <a href="../../../../index.html#key267">card for credit</a>, <a href="../../../../index.html#key270">credit card</a>, <a href="../../../../index.html#key268">finance</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/cc_discover.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::creditcard::discover - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::creditcard::discover - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::creditcard::discover.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::discover(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::discover - Validation for Discover creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::creditcard::discover.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::discover(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::discover - Validation for Discover creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#discover">Discover</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#bank">bank</a>, <a href="../../../../index.html#card_for_credit">card for credit</a>, <a href="../../../../index.html#credit_card">credit card</a>, <a href="../../../../index.html#finance">finance</a>, <a href="../../../../index.html#isa">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








203
204
205
206
207
208
209






210
211
212
213
214
215
216
217
218
219
220
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key271">Discover</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key269">bank</a>, <a href="../../../../index.html#key267">card for credit</a>, <a href="../../../../index.html#key270">credit card</a>, <a href="../../../../index.html#key268">finance</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/cc_mastercard.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::creditcard::mastercard - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::creditcard::mastercard - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::creditcard::mastercard.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::mastercard(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::mastercard - Validation for Mastercard creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::creditcard::mastercard.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::mastercard(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::mastercard - Validation for Mastercard creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#mastercard">MasterCard</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#bank">bank</a>, <a href="../../../../index.html#card_for_credit">card for credit</a>, <a href="../../../../index.html#credit_card">credit card</a>, <a href="../../../../index.html#finance">finance</a>, <a href="../../../../index.html#isa">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








203
204
205
206
207
208
209






210
211
212
213
214
215
216
217
218
219
220
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key670">MasterCard</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key269">bank</a>, <a href="../../../../index.html#key267">card for credit</a>, <a href="../../../../index.html#key270">credit card</a>, <a href="../../../../index.html#key268">finance</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/cc_visa.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::creditcard::visa - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::creditcard::visa - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::creditcard::visa.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::visa(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::visa - Validation for VISA creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::creditcard::visa.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::creditcard::visa(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::creditcard::visa - Validation for VISA creditcard number</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#visa">VISA</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#bank">bank</a>, <a href="../../../../index.html#card_for_credit">card for credit</a>, <a href="../../../../index.html#credit_card">credit card</a>, <a href="../../../../index.html#finance">finance</a>, <a href="../../../../index.html#isa">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








203
204
205
206
207
208
209






210
211
212
213
214
215
216
217
218
219
220
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key709">VISA</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key269">bank</a>, <a href="../../../../index.html#key267">card for credit</a>, <a href="../../../../index.html#key270">credit card</a>, <a href="../../../../index.html#key268">finance</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/ean13.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::gs1::ean13 - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::gs1::ean13 - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::gs1::ean13.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::gs1::ean13(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::gs1::ean13 - Validation for EAN13</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::gs1::ean13.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::gs1::ean13(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::gs1::ean13 - Validation for EAN13</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#ean">EAN</a>, <a href="../../../../index.html#ean13">EAN13</a>, <a href="../../../../index.html#european_article_number">European Article Number</a>, <a href="../../../../index.html#international_article_number">International Article Number</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#isa">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








199
200
201
202
203
204
205






206
207
208
209
210
211
212
213
214
215
216
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key103">EAN</a>, <a href="../../../../index.html#key104">EAN13</a>, <a href="../../../../index.html#key102">European Article Number</a>, <a href="../../../../index.html#key105">International Article Number</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/iban.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::iban - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::iban - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::iban.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::iban(n) 1.7 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::iban - Validation for IBAN</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::iban.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::iban(n) 1.6 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::iban - Validation for IBAN</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::iban <span class="opt">?1.7?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::iban</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::iban</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>







|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">snit 2</b></li>
<li>package require <b class="pkgname">valtype::common</b></li>
<li>package require <b class="pkgname">valtype::iban <span class="opt">?1.6?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">valtype::iban</b> <b class="method">validate</b> <i class="arg">value</i></a></li>
<li><a href="#2"><b class="cmd">valtype::iban</b> <b class="method">checkdigit</b> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#iban">IBAN</a>, <a href="../../../../index.html#international_bank_account_number">International Bank Account Number</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#bank">bank</a>, <a href="../../../../index.html#finance">finance</a>, <a href="../../../../index.html#isa">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








197
198
199
200
201
202
203






204
205
206
207
208
209
210
211
212
213
214
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key383">IBAN</a>, <a href="../../../../index.html#key382">International Bank Account Number</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key269">bank</a>, <a href="../../../../index.html#key268">finance</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/imei.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::imei - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::imei - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::imei.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::imei(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::imei - Validation for IMEI</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::imei.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::imei(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::imei - Validation for IMEI</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#imei">IMEI</a>, <a href="../../../../index.html#international_mobile_equipment_identity">International Mobile Equipment Identity</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#cell_phone">cell-phone</a>, <a href="../../../../index.html#isa">isA</a>, <a href="../../../../index.html#mobile_phone">mobile phone</a>, <a href="../../../../index.html#phone">phone</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








200
201
202
203
204
205
206






207
208
209
210
211
212
213
214
215
216
217
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key791">IMEI</a>, <a href="../../../../index.html#key794">International Mobile Equipment Identity</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key795">cell-phone</a>, <a href="../../../../index.html#key55">isA</a>, <a href="../../../../index.html#key792">mobile phone</a>, <a href="../../../../index.html#key793">phone</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/isbn.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::isbn - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::isbn - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::isbn.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::isbn(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::isbn - Validation for ISBN</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::isbn.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::isbn(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::isbn - Validation for ISBN</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#book_number">Book Number</a>, <a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#ean">EAN</a>, <a href="../../../../index.html#ean13">EAN13</a>, <a href="../../../../index.html#european_article_number">European Article Number</a>, <a href="../../../../index.html#isbn">ISBN</a>, <a href="../../../../index.html#international_article_number">International Article Number</a>, <a href="../../../../index.html#international_standard_book_number">International Standard Book Number</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#isa">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








206
207
208
209
210
211
212






213
214
215
216
217
218
219
220
221
222
223
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key363">Book Number</a>, <a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key103">EAN</a>, <a href="../../../../index.html#key104">EAN13</a>, <a href="../../../../index.html#key102">European Article Number</a>, <a href="../../../../index.html#key362">ISBN</a>, <a href="../../../../index.html#key105">International Article Number</a>, <a href="../../../../index.html#key364">International Standard Book Number</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/luhn.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::luhn - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::luhn - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::luhn.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::luhn(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::luhn - Validation for plain number with a LUHN checkdigit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::luhn.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::luhn(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::luhn - Validation for plain number with a LUHN checkdigit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#isa">isA</a>, <a href="../../../../index.html#luhn">luhn</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








197
198
199
200
201
202
203






204
205
206
207
208
209
210
211
212
213
214
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a>, <a href="../../../../index.html#key59">luhn</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/luhn5.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::luhn5 - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::luhn5 - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::luhn5.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::luhn5(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::luhn5 - Validation for plain number with a LUHN5 checkdigit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::luhn5.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::luhn5(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::luhn5 - Validation for plain number with a LUHN5 checkdigit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#isa">isA</a>, <a href="../../../../index.html#luhn">luhn</a>, <a href="../../../../index.html#luhn_5">luhn-5</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








197
198
199
200
201
202
203






204
205
206
207
208
209
210
211
212
213
214
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a>, <a href="../../../../index.html#key59">luhn</a>, <a href="../../../../index.html#key54">luhn-5</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/usnpi.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::usnpi - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::usnpi - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::usnpi.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::usnpi(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::usnpi - Validation for USNPI</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::usnpi.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::usnpi(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::usnpi - Validation for USNPI</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#npi">NPI</a>, <a href="../../../../index.html#national_provider_identifier">National Provider Identifier</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#us_npi">US-NPI</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#isa">isA</a>, <a href="../../../../index.html#medicare">medicare</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








200
201
202
203
204
205
206






207
208
209
210
211
212
213
214
215
216
217
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key234">NPI</a>, <a href="../../../../index.html#key231">National Provider Identifier</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key232">US-NPI</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a>, <a href="../../../../index.html#key233">medicare</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/valtype_common.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::common - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::common - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'valtype_common.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::common.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::common(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::common - Validation, common code</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'valtype_common.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::common.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::common(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::common - Validation, common code</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#isa">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








210
211
212
213
214
215
216






217
218
219
220
221
222
223
224
225
226
227
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/valtype/verhoeff.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>valtype::verhoeff - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>valtype::verhoeff - Validation types</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- valtype::verhoeff.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::verhoeff(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::verhoeff - Validation for plain number with a VERHOEFF checkdigit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vtype.inc' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- valtype::verhoeff.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">valtype::verhoeff(n) 1 tcllib &quot;Validation types&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>valtype::verhoeff - Validation for plain number with a VERHOEFF checkdigit</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#checking">Checking</a>, <a href="../../../../index.html#testing">Testing</a>, <a href="../../../../index.html#type_checking">Type checking</a>, <a href="../../../../index.html#validation">Validation</a>, <a href="../../../../index.html#value_checking">Value checking</a>, <a href="../../../../index.html#isa">isA</a>, <a href="../../../../index.html#verhoeff">verhoeff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








197
198
199
200
201
202
203






204
205
206
207
208
209
210
211
212
213
214
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>valtype</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key53">Checking</a>, <a href="../../../../index.html#key58">Testing</a>, <a href="../../../../index.html#key57">Type checking</a>, <a href="../../../../index.html#key60">Validation</a>, <a href="../../../../index.html#key56">Value checking</a>, <a href="../../../../index.html#key55">isA</a>, <a href="../../../../index.html#key749">verhoeff</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Validation, Type checking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/cat.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::cat - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::cat - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'cat.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::cat.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::cat(n) 1.0.3 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::cat - Concatenation channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'cat.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::cat.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::cat(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::cat - Concatenation channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::cat <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::cat</b> <i class="arg">chan</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::cat</b> package provides a command creating
concatenation channels. These are non-seekable channels owning a list
of subordinate channels whose contents they return in order, until all
are exhausted. In this manner the channel is the concatentation of the
contents of all the sub-ordinate channels.</p>
<p>Note that the created channels take ownership of the channels
they were constructed with. Whenever they have exhausted one of their
channel it will be closed. Similarly, closing the cat channel will
close all the sub-ordinates it still has.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/core.html">tcl::chan::core</a></b> framework.</p>
<p>Event handling is delegated to the currently active sub-channel.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::cat</b> <i class="arg">chan</i>...</a></dt>
<dd><p>This command creates the concatenation channel using all the provided
channels, and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#concatenation_channel">concatenation channel</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|
















|

















<
<
<
<
<
<


|








126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167






168
169
170
171
172
173
174
175
176
177
178
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::core <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::cat <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::cat</b> <i class="arg">chan</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::cat</b> package provides a command creating
concatenation channels. These are non-seekable channels owning a list
of subordinate channels whose contents they return in order, until all
are exhausted. In this manner the channel is the concatentation of the
contents of all the sub-ordinate channels.</p>
<p>Note that the created channels take ownership of the channels
they were constructed with. Whenever they have exhausted one of their
channel it will be closed. Similarly, closing the cat channel will
close all the sub-ordinates it still has.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/core.html">tcl::chan::core</a></b> framework.</p>
<p>Event handling is delegated to the currently active sub-channel.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::cat</b> <i class="arg">chan</i>...</a></dt>
<dd><p>This command creates the concatenation channel using all the provided
channels, and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key163">concatenation channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/facade.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::facade - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::facade - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'facade.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::facade.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::facade(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::facade - Facade channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'facade.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::facade.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::facade(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::facade - Facade channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#concatenation_channel">concatenation channel</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








179
180
181
182
183
184
185






186
187
188
189
190
191
192
193
194
195
196
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key163">concatenation channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/halfpipe.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::halfpipe - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::halfpipe - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'halfpipe.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009, 2019 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::halfpipe.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::halfpipe(n) 1.0.1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::halfpipe - In-memory channel, half of a fifo2</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'halfpipe.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::halfpipe.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::halfpipe(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::halfpipe - In-memory channel, half of a fifo2</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
126
127
128
129
130
131
132
133

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::halfpipe <span class="opt">?1.0.1?</span></b></li>

</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::halfpipe</b> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectCmd</i> <b class="method">put</b> <i class="arg">bytes</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::halfpipe</b> package provides a command creating
one half of a <b class="package"><a href="tcllib_fifo2.html">tcl::chan::fifo2</a></b> pair. Writing into such a
channel invokes a set of callbacks which then handle the data. This is
similar to a channel handler, except having a much simpler API.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::halfpipe</b> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i>...?</span></a></dt>
<dd><p>This command creates a halfpipe channel and configures it with the
callbacks to run when the channel is closed, data was written to it,







|
>












|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::halfpipe <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::halfpipe <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::halfpipe</b> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i>...?</span></a></li>
<li><a href="#2"><i class="arg">objectCmd</i> <b class="method">put</b> <i class="arg">bytes</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::halfpipe</b> package provides a command creating
one half of a <b class="package"><a href="tcllib_fifo2.html">tcl::chan::fifo2</a></b> pair. Writing into such a
channel invokes a set of callbacks which then handle the data. This is
similar to a channel handler, except having a much simpler API.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::halfpipe</b> <span class="opt">?<b class="option">-option</b> <i class="arg">value</i>...?</span></a></dt>
<dd><p>This command creates a halfpipe channel and configures it with the
callbacks to run when the channel is closed, data was written to it,
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#callbacks">callbacks</a>, <a href="../../../../index.html#fifo">fifo</a>, <a href="../../../../index.html#in_memory_channel">in-memory channel</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009, 2019 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|





|


185
186
187
188
189
190
191






192
193
194
195
196
197
198
199
200
201
202
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key721">callbacks</a>, <a href="../../../../index.html#key608">fifo</a>, <a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/nullzero.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::nullzero - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::nullzero - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'nullzero.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::nullzero.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::nullzero(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::nullzero - Null/Zero channel combination</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'nullzero.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::nullzero.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::nullzero(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::nullzero - Null/Zero channel combination</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::nullzero</b> package provides a command creating channels,
which are a combination of null and zero devices. They immediately forget
whatever is written to them, and on reading return an infinite stream of null
characters.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_null.html">tcl::chan::null</a></b> and
<b class="package"><a href="tcllib_zero.html">tcl::chan::zero</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel handler
is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::nullzero</b></a></dt>
<dd><p>This command creates a new nullzero channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#_dev_null">/dev/null</a>, <a href="../../../../index.html#_dev_zero">/dev/zero</a>, <a href="../../../../index.html#null">null</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a>, <a href="../../../../index.html#zero">zero</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|















<
<
<
<
<
<


|








140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162






163
164
165
166
167
168
169
170
171
172
173
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::nullzero</b> package provides a command creating channels,
which are a combination of null and zero devices. They immediately forget
whatever is written to them, and on reading return an infinite stream of null
characters.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_null.html">tcl::chan::null</a></b> and
<b class="package"><a href="tcllib_zero.html">tcl::chan::zero</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel handler
is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::nullzero</b></a></dt>
<dd><p>This command creates a new nullzero channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key770">/dev/null</a>, <a href="../../../../index.html#key114">/dev/zero</a>, <a href="../../../../index.html#key771">null</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a>, <a href="../../../../index.html#key113">zero</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/randseed.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::randomseed - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::randomseed - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'randseed.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::randomseed.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::randomseed(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::randomseed - Utilities for random channels</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'randseed.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::randomseed.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::randomseed(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::randomseed - Utilities for random channels</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#_dev_random">/dev/random</a>, <a href="../../../../index.html#merge">merge</a>, <a href="../../../../index.html#random">random</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#seed">seed</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








156
157
158
159
160
161
162






163
164
165
166
167
168
169
170
171
172
173
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key591">/dev/random</a>, <a href="../../../../index.html#key539">merge</a>, <a href="../../../../index.html#key590">random</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key833">seed</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/std.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::std - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::std - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'std.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2011 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::std.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::std(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::std - Standard I/O, unification of stdin and stdout</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'std.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::std.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::std(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::std - Standard I/O, unification of stdin and stdout</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::std</b> package provides a command creating
a standard channel which unifies stdin and stdout into a single
read- and writable channel. The result is not seek-able, like
the original standard channels.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/core.html">tcl::chan::core</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::std</b></a></dt>
<dd><p>This command creates the std channel and returns its handle.</p>
<p>The channel is created only once, on the first call, and all
future calls simply return this handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#standard_io">standard io</a>, <a href="../../../../index.html#stdin">stdin</a>, <a href="../../../../index.html#stdout">stdout</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

















<
<
<
<
<
<


|








138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162






163
164
165
166
167
168
169
170
171
172
173
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::std</b> package provides a command creating
a standard channel which unifies stdin and stdout into a single
read- and writable channel. The result is not seek-able, like
the original standard channels.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/core.html">tcl::chan::core</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::std</b></a></dt>
<dd><p>This command creates the std channel and returns its handle.</p>
<p>The channel is created only once, on the first call, and all
future calls simply return this handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key827">standard io</a>, <a href="../../../../index.html#key828">stdin</a>, <a href="../../../../index.html#key829">stdout</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2011 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/tcllib_fifo.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::fifo - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::fifo - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_fifo.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::fifo.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::fifo(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::fifo - In-memory fifo channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_fifo.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::fifo.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::fifo(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::fifo - In-memory fifo channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::fifo</b> package provides a command creating
channels which live purely in memory. Access is fifo-like, i.e. things
are read out of the channel in the order they were written to it.
This is equivalent to the fifo channels provided by the package
<b class="package">Memchan</b>, except that this is written in pure Tcl, not C. On
the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and before,
whereas this package requires Tcl 8.5 or higher, and <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::fifo</b></a></dt>
<dd><p>This command creates a new fifo channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#fifo">fifo</a>, <a href="../../../../index.html#in_memory_channel">in-memory channel</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

|
|















<
<
<
<
<
<


|








138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163






164
165
166
167
168
169
170
171
172
173
174
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::fifo</b> package provides a command creating
channels which live purely in memory. Access is fifo-like, i.e. things
are read out of the channel in the order they were written to it.
This is equivalent to the fifo channels provided by the package
<b class="package">Mmechan</b>, except that this is written in pure Tcl, not C. On
the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and before,
whereas this package requires Tcl 8.5 or higher, and <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::fifo</b></a></dt>
<dd><p>This command creates a new fifo channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key608">fifo</a>, <a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/tcllib_fifo2.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::fifo2 - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::fifo2 - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_fifo2.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::fifo2.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::fifo2(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::fifo2 - In-memory interconnected fifo channels</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_fifo2.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::fifo2.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::fifo2(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::fifo2 - In-memory interconnected fifo channels</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<p>The <b class="package">tcl::chan::fifo2</b> package provides a command creating
pairs of channels which live purely in memory and are connected to
each other in a fifo manner. What is written to one half of the pair
can be read from the other half, in the same order. One particular
application for this is communication between threads, with one half
of the pair moved to the thread to talk to.
This is equivalent to the fifo2 channels provided by the package
<b class="package">Memchan</b>, except that this is written in pure Tcl, not C. On
the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and before,
whereas this package requires Tcl 8.5 or higher, and <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::fifo2</b></a></dt>
<dd><p>This command creates a new connected pair of fifo channels and returns
their handles, as a list containing two elements.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#connected_fifos">connected fifos</a>, <a href="../../../../index.html#fifo">fifo</a>, <a href="../../../../index.html#in_memory_channel">in-memory channel</a>, <a href="../../../../index.html#inter_thread_communication">inter-thread communication</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

|
|
















<
<
<
<
<
<


|








142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168






169
170
171
172
173
174
175
176
177
178
179
<p>The <b class="package">tcl::chan::fifo2</b> package provides a command creating
pairs of channels which live purely in memory and are connected to
each other in a fifo manner. What is written to one half of the pair
can be read from the other half, in the same order. One particular
application for this is communication between threads, with one half
of the pair moved to the thread to talk to.
This is equivalent to the fifo2 channels provided by the package
<b class="package">Mmechan</b>, except that this is written in pure Tcl, not C. On
the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and before,
whereas this package requires Tcl 8.5 or higher, and <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::fifo2</b></a></dt>
<dd><p>This command creates a new connected pair of fifo channels and returns
their handles, as a list containing two elements.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key741">connected fifos</a>, <a href="../../../../index.html#key608">fifo</a>, <a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key740">inter-thread communication</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/tcllib_memchan.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::memchan - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::memchan - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_memchan.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009-2017 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::memchan.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::memchan(n) 1.0.4 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::memchan - In-memory channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_memchan.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::memchan.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::memchan(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::memchan - In-memory channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::memchan <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::memchan</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::memchan</b> package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable. This is equivalent to the memchan channels provided by
the package <b class="package">Memchan</b>, except that this is written in pure Tcl,
not C. On the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and
before, whereas this package requires Tcl 8.5 or higher, and
<b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b>.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_string.html">tcl::chan::string</a></b> and
<b class="package"><a href="tcllib_variable.html">tcl::chan::variable</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::memchan</b></a></dt>
<dd><p>This command creates a new memchan channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#in_memory_channel">in-memory channel</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009-2017 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|













|


|















<
<
<
<
<
<


|





|


126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165






166
167
168
169
170
171
172
173
174
175
176
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::memchan <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::memchan</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::memchan</b> package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable. This is equivalent to the memchan channels provided by
the package <b class="package">Memchan</b>, except that this is written in pure Tcl,
not C. On the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and
before, whereas this package requires Tcl 8.5 or higher, and
<b class="package"><a href="../../../../index.html#key757">TclOO</a></b>.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_string.html">tcl::chan::string</a></b> and
<b class="package"><a href="tcllib_variable.html">tcl::chan::variable</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::memchan</b></a></dt>
<dd><p>This command creates a new memchan channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/tcllib_null.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::null - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::null - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_null.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::null.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::null(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::null - Null channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_null.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::null.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::null(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::null - Null channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::null</b> package provides a command creating null
channels, i.e. write-only channels which immediately forget whatever
is written to them. This is equivalent to the null channels provided by
the package <b class="package">Memchan</b>, except that this is written in pure Tcl,
not C. On the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and
before, whereas this package requires Tcl 8.5 or higher, and
<b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b>.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_zero.html">tcl::chan::zero</a></b> and
<b class="package"><a href="nullzero.html">tcl::chan::nullzero</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::null</b></a></dt>
<dd><p>This command creates a new null channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#_dev_null">/dev/null</a>, <a href="../../../../index.html#null">null</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|


|















<
<
<
<
<
<


|








140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165






166
167
168
169
170
171
172
173
174
175
176
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::null</b> package provides a command creating null
channels, i.e. write-only channels which immediately forget whatever
is written to them. This is equivalent to the null channels provided by
the package <b class="package">Memchan</b>, except that this is written in pure Tcl,
not C. On the other hand, <b class="package">Memchan</b> is usable with Tcl 8.4 and
before, whereas this package requires Tcl 8.5 or higher, and
<b class="package"><a href="../../../../index.html#key757">TclOO</a></b>.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_zero.html">tcl::chan::zero</a></b> and
<b class="package"><a href="nullzero.html">tcl::chan::nullzero</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::null</b></a></dt>
<dd><p>This command creates a new null channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key770">/dev/null</a>, <a href="../../../../index.html#key771">null</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/tcllib_random.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::random - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::random - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_random.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::random.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::random(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::random - Random channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_random.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::random.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::random(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::random - Random channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
random channels, i.e. read-only channels which return an infinite
stream of pseudo-random characters upon reading. This is similar to
the random channels provided by the package <b class="package">Memchan</b>, except
that this is written in pure Tcl, not C, and uses a much simpler
generator as well. On the other hand, <b class="package">Memchan</b> is usable with
Tcl 8.4 and before, whereas this package requires Tcl 8.5 or higher,
and TclOO.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::random</b> <i class="arg">seed</i></a></dt>
<dd><p>This command creates a new random channel and returns its handle.
The seed is a list of integer numbers used to initialize the
internal feedback shift register of the generator.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#_dev_random">/dev/random</a>, <a href="../../../../index.html#random">random</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

















<
<
<
<
<
<


|








142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166






167
168
169
170
171
172
173
174
175
176
177
random channels, i.e. read-only channels which return an infinite
stream of pseudo-random characters upon reading. This is similar to
the random channels provided by the package <b class="package">Memchan</b>, except
that this is written in pure Tcl, not C, and uses a much simpler
generator as well. On the other hand, <b class="package">Memchan</b> is usable with
Tcl 8.4 and before, whereas this package requires Tcl 8.5 or higher,
and TclOO.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::random</b> <i class="arg">seed</i></a></dt>
<dd><p>This command creates a new random channel and returns its handle.
The seed is a list of integer numbers used to initialize the
internal feedback shift register of the generator.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key591">/dev/random</a>, <a href="../../../../index.html#key590">random</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/tcllib_string.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::string - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::string - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_string.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::string.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::string(n) 1.0.3 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::string - Read-only in-memory channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_string.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::string.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::string(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::string - Read-only in-memory channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::string <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::string</b> <i class="arg">content</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::string</b> package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable.
In contrast to the channels created by <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b>
they are read-only however, their content is provided at the time of
construction and immutable afterward.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b> and
<b class="package"><a href="tcllib_variable.html">tcl::chan::variable</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::string</b> <i class="arg">content</i></a></dt>
<dd><p>This command creates a new string channel and returns its handle. The
channel provides random read-only access to the <i class="arg">content</i> string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#in_memory_channel">in-memory channel</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|















|
















<
<
<
<
<
<


|








126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165






166
167
168
169
170
171
172
173
174
175
176
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::string <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::string</b> <i class="arg">content</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::string</b> package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable.
In contrast to the channels created by <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b>
they are read-only however, their content is provided at the time of
construction and immutable afterward.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b> and
<b class="package"><a href="tcllib_variable.html">tcl::chan::variable</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::string</b> <i class="arg">content</i></a></dt>
<dd><p>This command creates a new string channel and returns its handle. The
channel provides random read-only access to the <i class="arg">content</i> string.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/tcllib_variable.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::variable - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::variable - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_variable.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::variable.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::variable(n) 1.0.4 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::variable - In-memory channel using variable for storage</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_variable.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::variable.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::variable(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::variable - In-memory channel using variable for storage</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::variable <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::variable</b> <i class="arg">varname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::variable</b> package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable.
In contrast to the channels created by <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b>
the data is not hidden in the channel however, but stored in an
associated variable, specified at the time of construction.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b> and
<b class="package"><a href="tcllib_string.html">tcl::chan::string</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::variable</b> <i class="arg">varname</i></a></dt>
<dd><p>This command creates a new variable channel and returns its handle.
The content of the channel is stored in the associated namespace
variable <i class="arg">varname</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#in_memory_channel">in-memory channel</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|















|

















<
<
<
<
<
<


|








126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166






167
168
169
170
171
172
173
174
175
176
177
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.5</b></li>
<li>package require <b class="pkgname">TclOO</b></li>
<li>package require <b class="pkgname">tcl::chan::events <span class="opt">?1?</span></b></li>
<li>package require <b class="pkgname">tcl::chan::variable <span class="opt">?1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::tcl::chan::variable</b> <i class="arg">varname</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::variable</b> package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable.
In contrast to the channels created by <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b>
the data is not hidden in the channel however, but stored in an
associated variable, specified at the time of construction.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_memchan.html">tcl::chan::memchan</a></b> and
<b class="package"><a href="tcllib_string.html">tcl::chan::string</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::variable</b> <i class="arg">varname</i></a></dt>
<dd><p>This command creates a new variable channel and returns its handle.
The content of the channel is stored in the associated namespace
variable <i class="arg">varname</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key46">in-memory channel</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/tcllib_zero.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::zero - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::zero - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_zero.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::zero.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::zero(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::zero - Zero channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_zero.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::zero.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::zero(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::zero - Zero channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
characters upon reading. This is equivalent to the zero channels
provided by the package <b class="package">Memchan</b>, except that this is written
in pure Tcl, not C. On the other hand, <b class="package">Memchan</b> is usable with
Tcl 8.4 and before, whereas this package requires Tcl 8.5 or higher,
and TclOO.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_null.html">tcl::chan::null</a></b> and
<b class="package"><a href="nullzero.html">tcl::chan::nullzero</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::zero</b></a></dt>
<dd><p>This command creates a new zero channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#_dev_zero">/dev/zero</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a>, <a href="../../../../index.html#zero">zero</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|















<
<
<
<
<
<


|








143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165






166
167
168
169
170
171
172
173
174
175
176
characters upon reading. This is equivalent to the zero channels
provided by the package <b class="package">Memchan</b>, except that this is written
in pure Tcl, not C. On the other hand, <b class="package">Memchan</b> is usable with
Tcl 8.4 and before, whereas this package requires Tcl 8.5 or higher,
and TclOO.</p>
<p>Packages related to this are <b class="package"><a href="tcllib_null.html">tcl::chan::null</a></b> and
<b class="package"><a href="nullzero.html">tcl::chan::nullzero</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::zero</b></a></dt>
<dd><p>This command creates a new zero channel and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key114">/dev/zero</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a>, <a href="../../../../index.html#key113">zero</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_base/textwindow.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::textwindow - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::textwindow - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'textwindow.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::textwindow.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::textwindow(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::textwindow - Textwindow channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'textwindow.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::textwindow.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::textwindow(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::textwindow - Textwindow channel</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::textwindow</b> package provides a command creating
write-only channels connected to text widgets. Anything written to the
channel is printed into the associated widget.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::textwindow</b> <i class="arg">widget</i></a></dt>
<dd><p>This command creates a new textwindow channel and returns its handle.
Data written to this channel will appear in the associated <i class="arg">widget</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#tk">Tk</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#text_widget">text widget</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|
















<
<
<
<
<
<


|








137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160






161
162
163
164
165
166
167
168
169
170
171
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::textwindow</b> package provides a command creating
write-only channels connected to text widgets. Anything written to the
channel is printed into the associated widget.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the channel
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/events.html">tcl::chan::events</a></b> framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::chan::textwindow</b> <i class="arg">widget</i></a></dt>
<dd><p>This command creates a new textwindow channel and returns its handle.
Data written to this channel will appear in the associated <i class="arg">widget</i>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key209">Tk</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key208">text widget</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_core/core.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::core - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::core - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'core.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::core.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::core(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::core - Basic reflected/virtual channel support</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'core.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::core.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::core(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::core - Basic reflected/virtual channel support</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<li><a href="#2"><i class="arg">objectName</i> <b class="method">initialize</b> <i class="arg">thechannel</i> <i class="arg">mode</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">finalize</b> <i class="arg">thechannel</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::core</b> package provides a <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b>
class implementing common behaviour needed by virtually every
reflected or virtual channel (initialization, finalization).</p>
<p>This class expects to be used as either superclass of a concrete
channel class, or to be mixed into such a class.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<dl class="doctools_definitions">







|







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<li><a href="#2"><i class="arg">objectName</i> <b class="method">initialize</b> <i class="arg">thechannel</i> <i class="arg">mode</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">finalize</b> <i class="arg">thechannel</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::core</b> package provides a <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>
class implementing common behaviour needed by virtually every
reflected or virtual channel (initialization, finalization).</p>
<p>This class expects to be used as either superclass of a concrete
channel class, or to be mixed into such a class.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<dl class="doctools_definitions">
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








183
184
185
186
187
188
189






190
191
192
193
194
195
196
197
198
199
200
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_core/events.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::chan::events - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::chan::events - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'events.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::chan::events.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::events(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::events - Event support for reflected/virtual channels</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'events.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::chan::events.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::chan::events(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::chan::events - Event support for reflected/virtual channels</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<li><a href="#3"><i class="arg">objectName</i> <b class="method">watch</b> <i class="arg">thechannel</i> <i class="arg">eventmask</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">allow</b> <i class="arg">eventname</i>...</a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">disallow</b> <i class="arg">eventname</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::events</b> package provides a <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b>
class implementing common behaviour needed by virtually every
reflected or virtual channel supporting event driven IO. It is a
sub-class of <b class="package"><a href="core.html">tcl::chan::core</a></b>, inheriting all of its behaviour.</p>
<p>This class expects to be used as either superclass of a concrete
channel class, or to be mixed into such a class.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>







|







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<li><a href="#3"><i class="arg">objectName</i> <b class="method">watch</b> <i class="arg">thechannel</i> <i class="arg">eventmask</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">allow</b> <i class="arg">eventname</i>...</a></li>
<li><a href="#5"><i class="arg">objectName</i> <b class="method">disallow</b> <i class="arg">eventname</i>...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::chan::events</b> package provides a <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>
class implementing common behaviour needed by virtually every
reflected or virtual channel supporting event driven IO. It is a
sub-class of <b class="package"><a href="core.html">tcl::chan::core</a></b>, inheriting all of its behaviour.</p>
<p>This class expects to be used as either superclass of a concrete
channel class, or to be mixed into such a class.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#event_management">event management</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








191
192
193
194
195
196
197






198
199
200
201
202
203
204
205
206
207
208
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key516">event management</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_core/transformcore.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::core - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::core - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'transformcore.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::core.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::core(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::core - Basic reflected/virtual channel transform support</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'transformcore.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::core.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::core(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::core - Basic reflected/virtual channel transform support</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<li><a href="#2"><i class="arg">objectName</i> <b class="method">initialize</b> <i class="arg">thechannel</i> <i class="arg">mode</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">finalize</b> <i class="arg">thechannel</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::core</b> package provides a <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b>
class implementing common behaviour needed by virtually every
reflected or virtual channel transformation (initialization, finalization).</p>
<p>This class expects to be used as either superclass of a concrete
channel class, or to be mixed into such a class.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<dl class="doctools_definitions">







|







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<li><a href="#2"><i class="arg">objectName</i> <b class="method">initialize</b> <i class="arg">thechannel</i> <i class="arg">mode</i></a></li>
<li><a href="#3"><i class="arg">objectName</i> <b class="method">finalize</b> <i class="arg">thechannel</i></a></li>
<li><a href="#4"><i class="arg">objectName</i> <b class="method">destroy</b></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::core</b> package provides a <b class="package"><a href="../../../../index.html#key757">TclOO</a></b>
class implementing common behaviour needed by virtually every
reflected or virtual channel transformation (initialization, finalization).</p>
<p>This class expects to be used as either superclass of a concrete
channel class, or to be mixed into such a class.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Class API</a></h2>
<dl class="doctools_definitions">
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_219">tip 219</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








183
184
185
186
187
188
189






190
191
192
193
194
195
196
197
198
199
200
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key45">tip 219</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/adler32.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::adler32 - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::adler32 - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'adler32.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::adler32.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::adler32(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::adler32 - Adler32 transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'adler32.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::adler32.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::adler32(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::adler32 - Adler32 transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
it has seen for each direction and stores them in Tcl variables
specified at construction time.</p>
<p>Related transformations in this module are
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>,
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::adler32</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>This command creates an adler32 checksumming transformation on top of







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
it has seen for each direction and stores them in Tcl variables
specified at construction time.</p>
<p>Related transformations in this module are
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>,
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::adler32</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>This command creates an adler32 checksumming transformation on top of
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#adler32">adler32</a>, <a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#checksum">checksum</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








176
177
178
179
180
181
182






183
184
185
186
187
188
189
190
191
192
193
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key668">adler32</a>, <a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/hex.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::hex - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::hex - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'hex.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::hex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::hex(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::hex - Hexadecimal encoding transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'hex.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::hex.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::hex(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::hex - Hexadecimal encoding transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::hex</b> package provides a command creating
a channel transformation which hex encodes data written to it, and
decodes the data read from it.</p>
<p>A related transformations in this module is
<b class="package"><a href="vt_base64.html">tcl::transform::base64</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::hex</b> <i class="arg">chan</i></a></dt>
<dd><p>This command creates a hex transformation on top of the channel
<i class="arg">chan</i> and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#hexadecimal">hexadecimal</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

















<
<
<
<
<
<


|








138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162






163
164
165
166
167
168
169
170
171
172
173
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::hex</b> package provides a command creating
a channel transformation which hex encodes data written to it, and
decodes the data read from it.</p>
<p>A related transformations in this module is
<b class="package"><a href="vt_base64.html">tcl::transform::base64</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::hex</b> <i class="arg">chan</i></a></dt>
<dd><p>This command creates a hex transformation on top of the channel
<i class="arg">chan</i> and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key734">hexadecimal</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/identity.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::identity - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::identity - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'identity.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::identity.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::identity(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::identity - Identity transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'identity.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::identity.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::identity(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::identity - Identity transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
observers people may wish to write.</p>
<p>The transformations in this module which derived from
identity's code are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::identity</b> <i class="arg">chan</i></a></dt>
<dd><p>This command creates an identity transformation on top of the channel
<i class="arg">chan</i> and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#identity">identity</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

















<
<
<
<
<
<


|








145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169






170
171
172
173
174
175
176
177
178
179
180
observers people may wish to write.</p>
<p>The transformations in this module which derived from
identity's code are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::identity</b> <i class="arg">chan</i></a></dt>
<dd><p>This command creates an identity transformation on top of the channel
<i class="arg">chan</i> and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key442">identity</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/limitsize.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::limitsize - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::limitsize - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'limitsize.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::limitsize.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::limitsize(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::limitsize - limiting input</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'limitsize.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::limitsize.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::limitsize(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::limitsize - limiting input</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::limitsize</b> package provides a command
creating a channel transformation which limits the number of
characters which can be read from the channel. A generator for an
artificial EOF.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::limitsize</b> <i class="arg">chan</i> <i class="arg">max</i></a></dt>
<dd><p>This command creates a size limiting transformation on top of the
channel <i class="arg">chan</i> and returns its handle.</p>
<p><i class="arg">max</i> is the number of bytes which can be read from the
channel before EOF is signaled by the transformation. Note that
popping the transformation clears the EOF it generated as well.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#limitsize">limitsize</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#size_limit">size limit</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|




















<
<
<
<
<
<


|








137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164






165
166
167
168
169
170
171
172
173
174
175
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::limitsize</b> package provides a command
creating a channel transformation which limits the number of
characters which can be read from the channel. A generator for an
artificial EOF.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::limitsize</b> <i class="arg">chan</i> <i class="arg">max</i></a></dt>
<dd><p>This command creates a size limiting transformation on top of the
channel <i class="arg">chan</i> and returns its handle.</p>
<p><i class="arg">max</i> is the number of bytes which can be read from the
channel before EOF is signaled by the transformation. Note that
popping the transformation clears the EOF it generated as well.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key725">limitsize</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key724">size limit</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/observe.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::observe - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::observe - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'observe.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::observe.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::observe(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::observe - Observer transformation, stream copy</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'observe.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::observe.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::observe(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::observe - Observer transformation, stream copy</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
additionally copies the data it has seen for each direction into
channels specified at construction time.</p>
<p>Related transformations in this module are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>, and
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::observe</b> <i class="arg">chan</i> <i class="arg">logw</i> <i class="arg">logr</i></a></dt>
<dd><p>This command creates an observer transformation on top of the channel
<i class="arg">chan</i> and returns its handle. The channel handles <i class="arg">logr</i> and
<i class="arg">logw</i> are there the data is copied to.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#observer">observer</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#stream_copy">stream copy</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|


















<
<
<
<
<
<


|








143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168






169
170
171
172
173
174
175
176
177
178
179
additionally copies the data it has seen for each direction into
channels specified at construction time.</p>
<p>Related transformations in this module are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>, and
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::observe</b> <i class="arg">chan</i> <i class="arg">logw</i> <i class="arg">logr</i></a></dt>
<dd><p>This command creates an observer transformation on top of the channel
<i class="arg">chan</i> and returns its handle. The channel handles <i class="arg">logr</i> and
<i class="arg">logw</i> are there the data is copied to.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key650">observer</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key651">stream copy</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/rot.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::rot - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::rot - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'rot.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::rot.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::rot(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::rot - rot-encryption</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'rot.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::rot.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::rot(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::rot - rot-encryption</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::rot</b> package provides a command creating
a channel transformation which performs primitive encryption (on
writing) and decryption (on reading) on the alphabetic characters. The
algorithm is the Caesar-cipher, a specific variant of which is rot13.</p>
<p>A related transformations in this module is
<b class="package"><a href="vt_otp.html">tcl::transform::otp</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::rot</b> <i class="arg">chan</i> <i class="arg">key</i></a></dt>
<dd><p>This command creates a rot encryption transformation on top of the







|







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::rot</b> package provides a command creating
a channel transformation which performs primitive encryption (on
writing) and decryption (on reading) on the alphabetic characters. The
algorithm is the Caesar-cipher, a specific variant of which is rot13.</p>
<p>A related transformations in this module is
<b class="package"><a href="vt_otp.html">tcl::transform::otp</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::rot</b> <i class="arg">chan</i> <i class="arg">key</i></a></dt>
<dd><p>This command creates a rot encryption transformation on top of the
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#caesar_cipher">caesar cipher</a>, <a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#cipher">cipher</a>, <a href="../../../../index.html#decryption">decryption</a>, <a href="../../../../index.html#encryption">encryption</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#rot">rot</a>, <a href="../../../../index.html#rot13">rot13</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








163
164
165
166
167
168
169






170
171
172
173
174
175
176
177
178
179
180
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key401">caesar cipher</a>, <a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key169">cipher</a>, <a href="../../../../index.html#key375">decryption</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key400">rot</a>, <a href="../../../../index.html#key399">rot13</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/spacer.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::spacer - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::spacer - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'spacer.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::spacer.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::spacer(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::spacer - Space insertation and removal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'spacer.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::spacer.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::spacer(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::spacer - Space insertation and removal</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::spacer</b> package provides a command
creating a channel transformation which adds spacing to the data
written to it, and removes such spacing from the data read from it.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::spacer</b> <i class="arg">chan</i> <i class="arg">n</i> <span class="opt">?<i class="arg">space</i>?</span></a></dt>
<dd><p>This command creates a spacer transformation on top of the channel







|







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::spacer</b> package provides a command
creating a channel transformation which adds spacing to the data
written to it, and removes such spacing from the data read from it.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::spacer</b> <i class="arg">chan</i> <i class="arg">n</i> <span class="opt">?<i class="arg">space</i>?</span></a></dt>
<dd><p>This command creates a spacer transformation on top of the channel
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#spacing">spacing</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








158
159
160
161
162
163
164






165
166
167
168
169
170
171
172
173
174
175
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key520">spacing</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/tcllib_zlib.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::zlib - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::zlib - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'tcllib_zlib.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::zlib.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::zlib(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::zlib - zlib (de)compression</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'tcllib_zlib.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::zlib.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::zlib(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::zlib - zlib (de)compression</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::zlib</b> package provides a command creating
a channel transformation which zlib compresses the written data, and
decompresses on reading.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::zlib</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">level</i>?</span></a></dt>
<dd><p>This command creates a zlib compressor transformation on top of the
channel <i class="arg">chan</i> and returns its handle.</p>
<p>The <i class="arg">level</i> specifies how much effort is put into the
compression, from <b class="const">0</b> to <b class="const">9</b>, and defaults to <b class="const">4</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#compression">compression</a>, <a href="../../../../index.html#decompression">decompression</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#tip_234">tip 234</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a>, <a href="../../../../index.html#zlib">zlib</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|



















<
<
<
<
<
<


|








136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162






163
164
165
166
167
168
169
170
171
172
173
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::zlib</b> package provides a command creating
a channel transformation which zlib compresses the written data, and
decompresses on reading.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::zlib</b> <i class="arg">chan</i> <span class="opt">?<i class="arg">level</i>?</span></a></dt>
<dd><p>This command creates a zlib compressor transformation on top of the
channel <i class="arg">chan</i> and returns its handle.</p>
<p>The <i class="arg">level</i> specifies how much effort is put into the
compression, from <b class="const">0</b> to <b class="const">9</b>, and defaults to <b class="const">4</b>.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key266">compression</a>, <a href="../../../../index.html#key43">decompression</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key548">tip 234</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a>, <a href="../../../../index.html#key547">zlib</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/vt_base64.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::base64 - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::base64 - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vt_base64.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::base64.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::base64(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::base64 - Base64 encoding transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vt_base64.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::base64.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::base64(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::base64 - Base64 encoding transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::base64</b> package provides a command
creating a channel transformation which base64 encodes data written to
it, and decodes the data read from it.</p>
<p>A related transformations in this module is
<b class="package"><a href="hex.html">tcl::transform::hex</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::base64</b> <i class="arg">chan</i></a></dt>
<dd><p>This command creates a base64 transformation on top of the channel
<i class="arg">chan</i> and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#base64">base64</a>, <a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#tip_317">tip 317</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







|

















<
<
<
<
<
<


|








138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162






163
164
165
166
167
168
169
170
171
172
173
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::base64</b> package provides a command
creating a channel transformation which base64 encodes data written to
it, and decodes the data read from it.</p>
<p>A related transformations in this module is
<b class="package"><a href="hex.html">tcl::transform::hex</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::base64</b> <i class="arg">chan</i></a></dt>
<dd><p>This command creates a base64 transformation on top of the channel
<i class="arg">chan</i> and returns its handle.</p></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key587">base64</a>, <a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key586">tip 317</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/vt_counter.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::counter - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::counter - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vt_counter.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::counter.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::counter(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::counter - Counter transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vt_counter.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::counter.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::counter(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::counter - Counter transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
additionally counts the bytes it has seen for each direction and
stores these counts in Tcl variables specified at construction time.</p>
<p>Related transformations in this module are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>,
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::counter</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>This command creates a counter transformation on top of the channel







|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
additionally counts the bytes it has seen for each direction and
stores these counts in Tcl variables specified at construction time.</p>
<p>Related transformations in this module are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_crc32.html">tcl::transform::crc32</a></b>,
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::counter</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>This command creates a counter transformation on top of the channel
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#counter">counter</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








175
176
177
178
179
180
181






182
183
184
185
186
187
188
189
190
191
192
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key276">counter</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/vt_crc32.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::crc32 - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::crc32 - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vt_crc32.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::crc32.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::crc32(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::crc32 - Crc32 transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vt_crc32.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::crc32.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::crc32(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::crc32 - Crc32 transformation</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
has seen for each direction and stores them in Tcl variables specified
at construction time. The checksum in question is zlib's crc32.</p>
<p>Related transformations in this module are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::crc32</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>This command creates a crc32 checksumming transformation on top of







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
has seen for each direction and stores them in Tcl variables specified
at construction time. The checksum in question is zlib's crc32.</p>
<p>Related transformations in this module are
<b class="package"><a href="adler32.html">tcl::transform::adler32</a></b>,
<b class="package"><a href="vt_counter.html">tcl::transform::counter</a></b>,
<b class="package"><a href="identity.html">tcl::transform::identity</a></b>, and
<b class="package"><a href="observe.html">tcl::transform::observe</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::crc32</b> <i class="arg">chan</i> <b class="option">-option</b> <i class="arg">value</i>...</a></dt>
<dd><p>This command creates a crc32 checksumming transformation on top of
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#checksum">checksum</a>, <a href="../../../../index.html#crc32">crc32</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








176
177
178
179
180
181
182






183
184
185
186
187
188
189
190
191
192
193
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key150">checksum</a>, <a href="../../../../index.html#key147">crc32</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/virtchannel_transform/vt_otp.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>tcl::transform::otp - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>tcl::transform::otp - Reflected/virtual channel support</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'vt_otp.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- tcl::transform::otp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::otp(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::otp - Encryption via one-time pad</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'vt_otp.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- tcl::transform::otp.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">tcl::transform::otp(n) 1 tcllib &quot;Reflected/virtual channel support&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>tcl::transform::otp - Encryption via one-time pad</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::otp</b> package provides a command creating
a channel transformation which uses externally provided one-time pads
to perform encryption (on writing) and decryption (on reading).</p>
<p>A related transformations in this module is
<b class="package"><a href="rot.html">tcl::transform::rot</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#tcloo">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::otp</b> <i class="arg">chan</i> <i class="arg">keychanw</i> <i class="arg">keychanr</i></a></dt>
<dd><p>This command creates a one-time pad based encryption transformation on







|







138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">tcl::transform::otp</b> package provides a command creating
a channel transformation which uses externally provided one-time pads
to perform encryption (on writing) and decryption (on reading).</p>
<p>A related transformations in this module is
<b class="package"><a href="rot.html">tcl::transform::rot</a></b>.</p>
<p>The internal <b class="package"><a href="../../../../index.html#key757">TclOO</a></b> class implementing the transform
handler is a sub-class of the <b class="package"><a href="../virtchannel_core/transformcore.html">tcl::transform::core</a></b>
framework.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::tcl::transform::otp</b> <i class="arg">chan</i> <i class="arg">keychanw</i> <i class="arg">keychanr</i></a></dt>
<dd><p>This command creates a one-time pad based encryption transformation on
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#channel_transformation">channel transformation</a>, <a href="../../../../index.html#cipher">cipher</a>, <a href="../../../../index.html#decryption">decryption</a>, <a href="../../../../index.html#encryption">encryption</a>, <a href="../../../../index.html#one_time_pad">one time pad</a>, <a href="../../../../index.html#otp">otp</a>, <a href="../../../../index.html#reflected_channel">reflected channel</a>, <a href="../../../../index.html#tip_230">tip 230</a>, <a href="../../../../index.html#transformation">transformation</a>, <a href="../../../../index.html#virtual_channel">virtual channel</a>, <a href="../../../../index.html#xor">xor</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








160
161
162
163
164
165
166






167
168
169
170
171
172
173
174
175
176
177
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>virtchannel</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key277">channel transformation</a>, <a href="../../../../index.html#key169">cipher</a>, <a href="../../../../index.html#key375">decryption</a>, <a href="../../../../index.html#key127">encryption</a>, <a href="../../../../index.html#key376">one time pad</a>, <a href="../../../../index.html#key377">otp</a>, <a href="../../../../index.html#key47">reflected channel</a>, <a href="../../../../index.html#key278">tip 230</a>, <a href="../../../../index.html#key279">transformation</a>, <a href="../../../../index.html#key44">virtual channel</a>, <a href="../../../../index.html#key374">xor</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Channels</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/websocket/websocket.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>websocket - websocket client and server</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>websocket - websocket client and server</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'websocket.man' by tcllib/doctools with format 'html'
   -->
<!-- websocket.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">websocket(n) 1.3.1 tcllib &quot;websocket client and server&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>websocket - Tcl implementation of the websocket protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'websocket.man' by tcllib/doctools with format 'html'
   -->
<! -- websocket.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">websocket(n) 1.3.1 tcllib &quot;websocket client and server&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>websocket - Tcl implementation of the websocket protocol</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<dt><a name="3"><b class="cmd">::websocket::server</b> <i class="arg">sock</i></a></dt>
<dd><p>This command registers the (accept) socket <i class="arg">sock</i> as the
identifier fo an HTTP server that is capable of doing WebSockets.
Paths onto which this server will listen for incoming connections
should be declared using <b class="cmd">::websocket::live</b>.</p></dd>
<dt><a name="4"><b class="cmd">::websocket::live</b> <i class="arg">sock</i> <i class="arg">path</i> <i class="arg">cb</i> <span class="opt">?<i class="arg">proto</i>?</span></a></dt>
<dd><p>This procedure registers callbacks that will be performed on a
WebSocket compliant server registered with <b class="cmd">::websocket::server</b>
whenever a client connects to a matching path and protocol. 
<i class="arg">sock</i> is the listening socket of the websocket compliant server
declared using <b class="cmd">::websocket::server</b>.  <i class="arg">path</i> is a glob-style
path to match in client request, whenever this will occur.  <i class="arg">cb</i>
is the command to callback (see Callbacks).  <i class="arg">proto</i> is a
glob-style protocol name matcher.</p></dd>
<dt><a name="5"><b class="cmd">::websocket::test</b> <i class="arg">srvSock</i> <i class="arg">cliSock</i> <i class="arg">path</i> <span class="opt">?<i class="arg">hdrs</i>?</span> <span class="opt">?<i class="arg">qry</i>?</span></a></dt>







|







290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<dt><a name="3"><b class="cmd">::websocket::server</b> <i class="arg">sock</i></a></dt>
<dd><p>This command registers the (accept) socket <i class="arg">sock</i> as the
identifier fo an HTTP server that is capable of doing WebSockets.
Paths onto which this server will listen for incoming connections
should be declared using <b class="cmd">::websocket::live</b>.</p></dd>
<dt><a name="4"><b class="cmd">::websocket::live</b> <i class="arg">sock</i> <i class="arg">path</i> <i class="arg">cb</i> <span class="opt">?<i class="arg">proto</i>?</span></a></dt>
<dd><p>This procedure registers callbacks that will be performed on a
WebSocket compliant server registered with <b class="cmd">::websocket::server</b>]
whenever a client connects to a matching path and protocol. 
<i class="arg">sock</i> is the listening socket of the websocket compliant server
declared using <b class="cmd">::websocket::server</b>.  <i class="arg">path</i> is a glob-style
path to match in client request, whenever this will occur.  <i class="arg">cb</i>
is the command to callback (see Callbacks).  <i class="arg">proto</i> is a
glob-style protocol name matcher.</p></dd>
<dt><a name="5"><b class="cmd">::websocket::test</b> <i class="arg">srvSock</i> <i class="arg">cliSock</i> <i class="arg">path</i> <span class="opt">?<i class="arg">hdrs</i>?</span> <span class="opt">?<i class="arg">qry</i>?</span></a></dt>
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
}
set sock [::websocket::open ws://echo.websocket.org/ handler]
after 400 test $sock
vwait forever
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#tls">TLS</a></b> package to handle the
security for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#tls">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#tls">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#tls">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>websocket</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../../../../index.html#http">http</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#http">http</a>, <a href="../../../../index.html#internet">internet</a>, <a href="../../../../index.html#net">net</a>, <a href="../../../../index.html#rfc_6455">rfc 6455</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>







|
|

|







|
|















<
<
<
<
<
<


|


|





458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492






493
494
495
496
497
498
499
500
501
502
503
}
set sock [::websocket::open ws://echo.websocket.org/ handler]
after 400 test $sock
vwait forever
</pre>
</div>
<div id="section5" class="doctools_section"><h2><a name="section5">TLS Security Considerations</a></h2>
<p>This package uses the <b class="package"><a href="../../../../index.html#key331">TLS</a></b> package to handle the security
for <b class="const">https</b> urls and other socket connections.</p>
<p>Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of <b class="package"><a href="../../../../index.html#key331">TLS</a></b>, nor of
this package itself however.
Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.</p>
<p>For example, in light of the recent
<a href="http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html">POODLE attack</a> discovered by Google many servers will disable support
for the SSLv3 protocol.
To handle this change the applications using <b class="package"><a href="../../../../index.html#key331">TLS</a></b> must be
patched, and not this package, nor <b class="package"><a href="../../../../index.html#key331">TLS</a></b> itself.
Such a patch may be as simple as generally activating <b class="const">tls1</b>
support, as shown in the example below.</p>
<pre class="doctools_example">
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol
    ... your own application code ...
</pre>
</div>
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>websocket</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../../../../index.html#key446">http</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key446">http</a>, <a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key295">net</a>, <a href="../../../../index.html#key447">rfc 6455</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/wip/wip.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>wip - Word Interpreter</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>wip - Word Interpreter</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'wip.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2007-2010 Andreas Kupries &amp;lt;andreas_kupries@users.sourceforge.net&amp;gt;
   -->
<!-- wip.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">wip(n) 2.2 tcllib &quot;Word Interpreter&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>wip - Word Interpreter</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'wip.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;
   -->
<! -- wip.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">wip(n) 2.2 tcllib &quot;Word Interpreter&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>wip - Word Interpreter</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>wip</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#interpreter">interpreter</a>, <a href="../../../../index.html#list">list</a>, <a href="../../../../index.html#word">word</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








399
400
401
402
403
404
405






406
407
408
409
410
411
412
413
414
415
416
<div id="section6" class="doctools_section"><h2><a name="section6">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>wip</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key38">interpreter</a>, <a href="../../../../index.html#key302">list</a>, <a href="../../../../index.html#key272">word</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Programming tools</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2007-2010 Andreas Kupries &lt;andreas_kupries@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/yaml/huddle.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>huddle - HUDDLE</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>huddle - HUDDLE</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'huddle.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008-2011 KATO Kanryu &amp;lt;kanryu6@users.sourceforge.net&amp;gt;   -- Copyright &amp;copy; 2015 Miguel Mart&amp;iacute;nez L&amp;oacute;pez &amp;lt;aplicacionamedida@gmail.com&amp;gt;
   -->
<!-- huddle.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">huddle(n) 0.3 tcllib &quot;HUDDLE&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>huddle - Create and manipulate huddle object</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'huddle.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008-2011 KATO Kanryu &lt;kanryu6@users.sourceforge.net&gt;   -- Copyright &copy; 2015 Miguel Mart&iacute;nez L&oacute;pez &lt;aplicacionamedida@gmail.com&gt;
   -->
<! -- huddle.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">huddle(n) 0.2 tcllib &quot;HUDDLE&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>huddle - Create and manipulate huddle object</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">huddle <span class="opt">?0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">huddle create</b> <i class="arg">key</i> <i class="arg">value</i> <span class="opt">?<i class="arg">key value ...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">huddle list</b> <span class="opt">?<i class="arg">value value ...</i>?</span></a></li>
<li><a href="#3"><b class="cmd">huddle number</b> <i class="arg">number</i></a></li>
<li><a href="#4"><b class="cmd">huddle string</b> <i class="arg">string</i></a></li>
<li><a href="#5"><b class="cmd">huddle boolean</b> <i class="arg">expression to evaluate as true or false</i></a></li>







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">huddle <span class="opt">?0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">huddle create</b> <i class="arg">key</i> <i class="arg">value</i> <span class="opt">?<i class="arg">key value ...</i>?</span></a></li>
<li><a href="#2"><b class="cmd">huddle list</b> <span class="opt">?<i class="arg">value value ...</i>?</span></a></li>
<li><a href="#3"><b class="cmd">huddle number</b> <i class="arg">number</i></a></li>
<li><a href="#4"><b class="cmd">huddle string</b> <i class="arg">string</i></a></li>
<li><a href="#5"><b class="cmd">huddle boolean</b> <i class="arg">expression to evaluate as true or false</i></a></li>
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<li><a href="#22"><b class="cmd">huddle compile</b> <i class="arg">spec</i> <i class="arg">data</i></a></li>
<li><a href="#23"><b class="cmd">huddle isHuddle</b> <i class="arg">object</i></a></li>
<li><a href="#24"><b class="cmd">huddle checkHuddle</b> <i class="arg">object</i></a></li>
<li><a href="#25"><b class="cmd">huddle to_node</b> <i class="arg">object</i> <span class="opt">?<i class="arg">tag</i>?</span></a></li>
<li><a href="#26"><b class="cmd">huddle wrap</b> <i class="arg">tag</i> <i class="arg">src</i></a></li>
<li><a href="#27"><b class="cmd">huddle call</b> <i class="arg">tag</i> <i class="arg">command</i> <i class="arg">args</i></a></li>
<li><a href="#28"><b class="cmd">huddle addType</b> <i class="arg">callback</i></a></li>
<li><a href="#29"><b class="cmd"><a href="../../../../index.html#callback">callback</a></b> <i class="arg">command</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#30"><b class="cmd">setting</b></a></li>
<li><a href="#31"><b class="cmd">get_sub</b> <i class="arg">src</i> <i class="arg">key</i></a></li>
<li><a href="#32"><b class="cmd">strip</b> <i class="arg">src</i></a></li>
<li><a href="#33"><b class="cmd"><a href="../../../../index.html#set">set</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#34"><b class="cmd"><a href="../../../../index.html#remove">remove</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Huddle provides a generic Tcl-based serialization/intermediary format.
Currently, each node is wrapped in a tag with simple type information.</p>
<p>When converting huddle-notation to other serialization formats like







|



|
|







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<li><a href="#22"><b class="cmd">huddle compile</b> <i class="arg">spec</i> <i class="arg">data</i></a></li>
<li><a href="#23"><b class="cmd">huddle isHuddle</b> <i class="arg">object</i></a></li>
<li><a href="#24"><b class="cmd">huddle checkHuddle</b> <i class="arg">object</i></a></li>
<li><a href="#25"><b class="cmd">huddle to_node</b> <i class="arg">object</i> <span class="opt">?<i class="arg">tag</i>?</span></a></li>
<li><a href="#26"><b class="cmd">huddle wrap</b> <i class="arg">tag</i> <i class="arg">src</i></a></li>
<li><a href="#27"><b class="cmd">huddle call</b> <i class="arg">tag</i> <i class="arg">command</i> <i class="arg">args</i></a></li>
<li><a href="#28"><b class="cmd">huddle addType</b> <i class="arg">callback</i></a></li>
<li><a href="#29"><b class="cmd"><a href="../../../../index.html#key540">callback</a></b> <i class="arg">command</i> <span class="opt">?<i class="arg">args</i>?</span></a></li>
<li><a href="#30"><b class="cmd">setting</b></a></li>
<li><a href="#31"><b class="cmd">get_sub</b> <i class="arg">src</i> <i class="arg">key</i></a></li>
<li><a href="#32"><b class="cmd">strip</b> <i class="arg">src</i></a></li>
<li><a href="#33"><b class="cmd"><a href="../../../../index.html#key301">set</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
<li><a href="#34"><b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Huddle provides a generic Tcl-based serialization/intermediary format.
Currently, each node is wrapped in a tag with simple type information.</p>
<p>When converting huddle-notation to other serialization formats like
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
confirmed:
  - JSON
  - YAML(generally, but cannot discribe YAML-tags)
limitation:
  - cannot discribe aliases from a node to other node.
</pre>
<p>The <b class="package">huddle</b> package returns
data as a Tcl <b class="cmd"><a href="../../../../index.html#dict">dict</a></b>.  Either the <b class="package"><a href="../../../../index.html#dict">dict</a></b> package or Tcl 8.5 is
required for use.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">huddle create</b> <i class="arg">key</i> <i class="arg">value</i> <span class="opt">?<i class="arg">key value ...</i>?</span></a></dt>
<dd><p>Create a huddle object as a dict. It can contain other huddle objects.</p></dd>
<dt><a name="2"><b class="cmd">huddle list</b> <span class="opt">?<i class="arg">value value ...</i>?</span></a></dt>







|







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
confirmed:
  - JSON
  - YAML(generally, but cannot discribe YAML-tags)
limitation:
  - cannot discribe aliases from a node to other node.
</pre>
<p>The <b class="package">huddle</b> package returns
data as a Tcl <b class="cmd"><a href="../../../../index.html#key705">dict</a></b>.  Either the <b class="package"><a href="../../../../index.html#key705">dict</a></b> package or Tcl 8.5 is
required for use.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">huddle create</b> <i class="arg">key</i> <i class="arg">value</i> <span class="opt">?<i class="arg">key value ...</i>?</span></a></dt>
<dd><p>Create a huddle object as a dict. It can contain other huddle objects.</p></dd>
<dt><a name="2"><b class="cmd">huddle list</b> <span class="opt">?<i class="arg">value value ...</i>?</span></a></dt>
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
<dd><p>callback function name for additional type.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TYPE CALLBACK</a></h2>
<p>The definition of callback for user-type.</p>
<dl class="doctools_definitions">
<dt><a name="29"><b class="cmd"><a href="../../../../index.html#callback">callback</a></b> <i class="arg">command</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><dl class="doctools_options">
<dt><b class="option">command</b></dt>
<dd><p>huddle subcomand which is needed to reply by the callback.</p></dd>
<dt><b class="option">args</b></dt>
<dd><p>arguments of subcommand. The number of list of arguments is different for each subcommand.</p></dd>
</dl></dd>
</dl>







|







395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
<dd><p>callback function name for additional type.</p></dd>
</dl></dd>
</dl>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">TYPE CALLBACK</a></h2>
<p>The definition of callback for user-type.</p>
<dl class="doctools_definitions">
<dt><a name="29"><b class="cmd"><a href="../../../../index.html#key540">callback</a></b> <i class="arg">command</i> <span class="opt">?<i class="arg">args</i>?</span></a></dt>
<dd><dl class="doctools_options">
<dt><b class="option">command</b></dt>
<dd><p>huddle subcomand which is needed to reply by the callback.</p></dd>
<dt><b class="option">args</b></dt>
<dd><p>arguments of subcommand. The number of list of arguments is different for each subcommand.</p></dd>
</dl></dd>
</dl>
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
<dd><p>returns a sub node specified by <i class="arg">key</i>.</p>
<dl class="doctools_options">
<dt><b class="option">src</b></dt>
<dd><p>a node content in huddle object.</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">strip</b> <i class="arg">src</i></a></dt>
<dd><p>returns stripped node contents. if the type has child nodes, every node must be stripped.</p></dd>
<dt><a name="33"><b class="cmd"><a href="../../../../index.html#set">set</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>sets a sub-node from the tagged-content, and returns self.</p></dd>
<dt><a name="34"><b class="cmd"><a href="../../../../index.html#remove">remove</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>removes a sub-node from the tagged-content, and returns self.</p></dd>
</dl>
<p><b class="cmd">strip</b> must be defined at all types.
<b class="cmd">get_sub</b> must be defined at container types.
<b class="cmd">set/remove</b> shuould be defined, if you call them.</p>
<pre class="doctools_example">
# callback sample for my-dict







|

|







423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
<dd><p>returns a sub node specified by <i class="arg">key</i>.</p>
<dl class="doctools_options">
<dt><b class="option">src</b></dt>
<dd><p>a node content in huddle object.</p></dd>
</dl></dd>
<dt><a name="32"><b class="cmd">strip</b> <i class="arg">src</i></a></dt>
<dd><p>returns stripped node contents. if the type has child nodes, every node must be stripped.</p></dd>
<dt><a name="33"><b class="cmd"><a href="../../../../index.html#key301">set</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>sets a sub-node from the tagged-content, and returns self.</p></dd>
<dt><a name="34"><b class="cmd"><a href="../../../../index.html#key228">remove</a></b> <i class="arg">src</i> <i class="arg">key</i> <i class="arg">value</i></a></dt>
<dd><p>removes a sub-node from the tagged-content, and returns self.</p></dd>
</dl>
<p><b class="cmd">strip</b> must be defined at all types.
<b class="cmd">get_sub</b> must be defined at container types.
<b class="cmd">set/remove</b> shuould be defined, if you call them.</p>
<pre class="doctools_example">
# callback sample for my-dict
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>huddle</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="yaml.html">yaml</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#data_exchange">data exchange</a>, <a href="../../../../index.html#exchange_format">exchange format</a>, <a href="../../../../index.html#huddle">huddle</a>, <a href="../../../../index.html#json">json</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#text_processing">text processing</a>, <a href="../../../../index.html#yaml">yaml</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2011 KATO Kanryu &lt;kanryu6@users.sourceforge.net&gt;<br>
Copyright &copy; 2015 Miguel Mart&iacute;nez L&oacute;pez &lt;aplicacionamedida@gmail.com&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|






610
611
612
613
614
615
616






617
618
619
620
621
622
623
624
625
626
627
628
<div id="section7" class="doctools_section"><h2><a name="section7">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>huddle</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="yaml.html">yaml</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key205">data exchange</a>, <a href="../../../../index.html#key204">exchange format</a>, <a href="../../../../index.html#key588">huddle</a>, <a href="../../../../index.html#key206">json</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key589">yaml</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2011 KATO Kanryu &lt;kanryu6@users.sourceforge.net&gt;<br>
Copyright &copy; 2015 Miguel Mart&iacute;nez L&oacute;pez &lt;aplicacionamedida@gmail.com&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/yaml/yaml.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>yaml - YAML processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>yaml - YAML processing</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'yaml.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008 KATO Kanryu &amp;lt;kanryu6@users.sourceforge.net&amp;gt;
   -->
<!-- yaml.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">yaml(n) 0.4.1 tcllib &quot;YAML processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>yaml - YAML Format Encoder/Decoder</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|

|

|



|
|
|
|
|
|


|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'yaml.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008 KATO Kanryu &lt;kanryu6@users.sourceforge.net&gt;
   -->
<! -- yaml.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">yaml(n) 0.3.9 tcllib &quot;YAML processing&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>yaml - YAML Format Encoder/Decoder</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">yaml <span class="opt">?0.4.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::yaml::yaml2dict</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></li>
<li><a href="#2"><b class="cmd">::yaml::yaml2huddle</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></li>
<li><a href="#3"><b class="cmd">::yaml::setOption</b> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::yaml::dict2yaml</b> <i class="arg">dict</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::yaml::list2yaml</b> <i class="arg">list</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::yaml::huddle2yaml</b> <i class="arg">huddle</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">yaml</b> package provides a simple Tcl-only library for parsing the
YAML <a href="http://www.yaml.org/">http://www.yaml.org/</a> data exchange format as specified in
<a href="http://www.yaml.org/spec/1.1/">http://www.yaml.org/spec/1.1/</a>.</p>
<p>The <b class="package">yaml</b> package returns
data as a Tcl <b class="cmd"><a href="../../../../index.html#dict">dict</a></b>.  Either the <b class="package"><a href="../../../../index.html#dict">dict</a></b> package or Tcl 8.5 is
required for use.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::yaml::yaml2dict</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::yaml::yaml2huddle</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></dt>







|
















|







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">yaml <span class="opt">?0.3.9?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::yaml::yaml2dict</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></li>
<li><a href="#2"><b class="cmd">::yaml::yaml2huddle</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></li>
<li><a href="#3"><b class="cmd">::yaml::setOption</b> <span class="opt">?<i class="arg">options</i>?</span></a></li>
<li><a href="#4"><b class="cmd">::yaml::dict2yaml</b> <i class="arg">dict</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></li>
<li><a href="#5"><b class="cmd">::yaml::list2yaml</b> <i class="arg">list</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></li>
<li><a href="#6"><b class="cmd">::yaml::huddle2yaml</b> <i class="arg">huddle</i> <span class="opt">?<i class="arg">indent</i>?</span> <span class="opt">?<i class="arg">wordwrap</i>?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The <b class="package">yaml</b> package provides a simple Tcl-only library for parsing the
YAML <a href="http://www.yaml.org/">http://www.yaml.org/</a> data exchange format as specified in
<a href="http://www.yaml.org/spec/1.1/">http://www.yaml.org/spec/1.1/</a>.</p>
<p>The <b class="package">yaml</b> package returns
data as a Tcl <b class="cmd"><a href="../../../../index.html#key705">dict</a></b>.  Either the <b class="package"><a href="../../../../index.html#key705">dict</a></b> package or Tcl 8.5 is
required for use.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">COMMANDS</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::yaml::yaml2dict</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></dt>
<dd></dd>
<dt><a name="2"><b class="cmd">::yaml::yaml2huddle</b> <span class="opt">?<i class="arg">options</i>?</span> <i class="arg">txt</i></a></dt>
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>yaml</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../base64/base64.html">base64</a>, <a href="huddle.html">huddle</a>, <a href="../json/json.html">json</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#data_exchange">data exchange</a>, <a href="../../../../index.html#huddle">huddle</a>, <a href="../../../../index.html#parsing">parsing</a>, <a href="../../../../index.html#text_processing">text processing</a>, <a href="../../../../index.html#yaml">yaml</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 KATO Kanryu &lt;kanryu6@users.sourceforge.net&gt;</p>
</div>
</div></body></html>







<
<
<
<
<
<





|





269
270
271
272
273
274
275






276
277
278
279
280
281
282
283
284
285
286
<div id="section5" class="doctools_section"><h2><a name="section5">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>yaml</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p><a href="../base64/base64.html">base64</a>, <a href="huddle.html">huddle</a>, <a href="../json/json.html">json</a></p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key205">data exchange</a>, <a href="../../../../index.html#key588">huddle</a>, <a href="../../../../index.html#key26">parsing</a>, <a href="../../../../index.html#key192">text processing</a>, <a href="../../../../index.html#key589">yaml</a></p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008 KATO Kanryu &lt;kanryu6@users.sourceforge.net&gt;</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/zip/decode.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>zipfile::decode - Zip archive handling</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>zipfile::decode - Zip archive handling</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'decode.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008-2016 Andreas Kupries
   -->
<!-- zipfile::decode.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">zipfile::decode(n) 0.7.1 tcllib &quot;Zip archive handling&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>zipfile::decode - Access to zip archives</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'decode.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008-2016 Andreas Kupries
   -->
<! -- zipfile::decode.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">zipfile::decode(n) 0.7.1 tcllib &quot;Zip archive handling&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>zipfile::decode - Access to zip archives</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
123
124
125
126
127
128
129

130
131
132
133
134
135
136
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>

<li>package require <b class="pkgname">fileutil::decode 0.2.1</b></li>
<li>package require <b class="pkgname">Trf</b></li>
<li>package require <b class="pkgname">zlibtcl</b></li>
<li>package require <b class="pkgname">zipfile::decode <span class="opt">?0.7.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::zipfile::decode::archive</b></a></li>







>







124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.4</b></li>
<li>package require <b class="pkgname">fileutil::magic::mimetype</b></li>
<li>package require <b class="pkgname">fileutil::decode 0.2.1</b></li>
<li>package require <b class="pkgname">Trf</b></li>
<li>package require <b class="pkgname">zlibtcl</b></li>
<li>package require <b class="pkgname">zipfile::decode <span class="opt">?0.7.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::zipfile::decode::archive</b></a></li>
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<li><a href="#10"><b class="cmd">::zipfile::decode::open</b> <i class="arg">archive</i></a></li>
<li><a href="#11"><b class="cmd">::zipfile::decode::unzip</b> <i class="arg">adict</i> <i class="arg">dstdir</i></a></li>
<li><a href="#12"><b class="cmd">::zipfile::decode::unzipfile</b> <i class="arg">archive</i> <i class="arg">dstdir</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Note: packages Trf and zlibtcl are not required if TCL 8.6 is available.
This package provides commands to decompress and access the contents
of zip archives.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::zipfile::decode::archive</b></a></dt>
<dd><p>This command decodes the last opened (and not yet closed) zip archive
file.







<
|







147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
<li><a href="#10"><b class="cmd">::zipfile::decode::open</b> <i class="arg">archive</i></a></li>
<li><a href="#11"><b class="cmd">::zipfile::decode::unzip</b> <i class="arg">adict</i> <i class="arg">dstdir</i></a></li>
<li><a href="#12"><b class="cmd">::zipfile::decode::unzipfile</b> <i class="arg">archive</i> <i class="arg">dstdir</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>

<p>This package provides commands to decompress and access the contents
of zip archives.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::zipfile::decode::archive</b></a></dt>
<dd><p>This command decodes the last opened (and not yet closed) zip archive
file.
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>zipfile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#decompression">decompression</a>, <a href="../../../../index.html#zip">zip</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2016 Andreas Kupries</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








221
222
223
224
225
226
227






228
229
230
231
232
233
234
235
236
237
238
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>zipfile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key43">decompression</a>, <a href="../../../../index.html#key42">zip</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2016 Andreas Kupries</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/zip/encode.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>zipfile::encode - Zip archive handling</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>zipfile::encode - Zip archive handling</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'encode.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2008-2009 Andreas Kupries
   -->
<!-- zipfile::encode.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">zipfile::encode(n) 0.4 tcllib &quot;Zip archive handling&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>zipfile::encode - Generation of zip archives</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>







|

|

|



|
|
|
|
|
|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'encode.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2008-2009 Andreas Kupries
   -->
<! -- zipfile::encode.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">zipfile::encode(n) 0.4 tcllib &quot;Zip archive handling&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>zipfile::encode - Generation of zip archives</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
filesystem.
All added files which were owned by the archive are deleted at this
point.
On the issue of ordering, the files are added to the archive in the
same order as they were specified via <b class="method">file:</b>. <em>Note</em> that
this behaviour is new for version 0.4 and higher. Before 0.4 no
specific order was documented. It was lexicographically sorted. The
change was made to support <b class="cmd"><a href="../../../../index.html#zip">zip</a></b>-based file formats which require
a specific order of files in the archive, for example &quot;<b class="file">.epub</b>&quot;.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>zipfile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#compression">compression</a>, <a href="../../../../index.html#zip">zip</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2009 Andreas Kupries</p>
</div>
</div></body></html>







|










<
<
<
<
<
<


|








182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199






200
201
202
203
204
205
206
207
208
209
210
filesystem.
All added files which were owned by the archive are deleted at this
point.
On the issue of ordering, the files are added to the archive in the
same order as they were specified via <b class="method">file:</b>. <em>Note</em> that
this behaviour is new for version 0.4 and higher. Before 0.4 no
specific order was documented. It was lexicographically sorted. The
change was made to support <b class="cmd"><a href="../../../../index.html#key42">zip</a></b>-based file formats which require
a specific order of files in the archive, for example &quot;<b class="file">.epub</b>&quot;.</p></dd>
</dl>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>zipfile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key266">compression</a>, <a href="../../../../index.html#key42">zip</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2008-2009 Andreas Kupries</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/files/modules/zip/mkzip.html.


1
2
3
4
5
6
7
8

<!DOCTYPE html><html><head>
<title>zipfile::mkzip - Zip archive creation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
>
|







1
2
3
4
5
6
7
8
9

<html><head>
<title>zipfile::mkzip - Zip archive creation</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file 'mkzip.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2009 Pat Thoyts
   -->
<!-- zipfile::mkzip.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
&#124; <a href="../../../../toc.html">Main Table Of Contents</a>
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">zipfile::mkzip(n) 1.2.1 tcllib &quot;Zip archive creation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>zipfile::mkzip - Build a zip archive</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">zipfile::mkzip <span class="opt">?1.2.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::zipfile::mkzip::mkzip</b> <i class="arg">zipfile</i> <span class="opt">?<b class="option">-zipkit</b>?</span> <span class="opt">?<b class="option">-runtime</b> <i class="arg">prefix</i>?</span> <span class="opt">?<b class="option">-comment</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-directory</b> <i class="arg">rootpath</i>?</span> <span class="opt">?<b class="option">-exclude</b> <i class="arg">exclude</i>?</span> <span class="opt">?<b class="option">--</b>?</span> <span class="opt">?<i class="arg">path</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package utilizes the zlib functions in Tcl 8.6 to build zip
archives.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::zipfile::mkzip::mkzip</b> <i class="arg">zipfile</i> <span class="opt">?<b class="option">-zipkit</b>?</span> <span class="opt">?<b class="option">-runtime</b> <i class="arg">prefix</i>?</span> <span class="opt">?<b class="option">-comment</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-directory</b> <i class="arg">rootpath</i>?</span> <span class="opt">?<b class="option">-exclude</b> <i class="arg">exclude</i>?</span> <span class="opt">?<b class="option">--</b>?</span> <span class="opt">?<i class="arg">path</i>...?</span></a></dt>
<dd><p>From <a href="http://wiki.tcl.tk/15158">http://wiki.tcl.tk/15158</a></p>
<p>This command constructs a zip archive from a directory tree
using nothing but Tcl 8.6 core features. The resulting zip file should
be compatible with other <b class="syscmd"><a href="../../../../index.html#zip">zip</a></b> programs - with the possible
exception of unicode support. The files generated by this command use
utf-8 encoding for all filenames and comments and it has been noticed
particularly on Windows the <b class="syscmd">info-zip</b> and the Windows built-in
zip view have rather poor support for this part of the ZIP file
specification. The <b class="syscmd">7-Zip</b> program does correctly display utf8
filenames however and the <b class="package">vfs::zip</b> package will use these of
course.</p>







|

|

|



|
|
|
|
|
|


|



















|
















|







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file 'mkzip.man' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; 2009 Pat Thoyts
   -->
<! -- zipfile::mkzip.n
   -->
<body><hr> [
   <a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">zipfile::mkzip(n) 1.2 tcllib &quot;Zip archive creation&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>zipfile::mkzip - Build a zip archive</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a></li>
<li class="doctools_section"><a href="#section3">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.6</b></li>
<li>package require <b class="pkgname">zipfile::mkzip <span class="opt">?1.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::zipfile::mkzip::mkzip</b> <i class="arg">zipfile</i> <span class="opt">?<b class="option">-zipkit</b>?</span> <span class="opt">?<b class="option">-runtime</b> <i class="arg">prefix</i>?</span> <span class="opt">?<b class="option">-comment</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-directory</b> <i class="arg">rootpath</i>?</span> <span class="opt">?<b class="option">-exclude</b> <i class="arg">exclude</i>?</span> <span class="opt">?<b class="option">--</b>?</span> <span class="opt">?<i class="arg">path</i>...?</span></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>This package utilizes the zlib functions in Tcl 8.6 to build zip
archives.</p>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::zipfile::mkzip::mkzip</b> <i class="arg">zipfile</i> <span class="opt">?<b class="option">-zipkit</b>?</span> <span class="opt">?<b class="option">-runtime</b> <i class="arg">prefix</i>?</span> <span class="opt">?<b class="option">-comment</b> <i class="arg">string</i>?</span> <span class="opt">?<b class="option">-directory</b> <i class="arg">rootpath</i>?</span> <span class="opt">?<b class="option">-exclude</b> <i class="arg">exclude</i>?</span> <span class="opt">?<b class="option">--</b>?</span> <span class="opt">?<i class="arg">path</i>...?</span></a></dt>
<dd><p>From <a href="http://wiki.tcl.tk/15158">http://wiki.tcl.tk/15158</a></p>
<p>This command constructs a zip archive from a directory tree
using nothing but Tcl 8.6 core features. The resulting zip file should
be compatible with other <b class="syscmd"><a href="../../../../index.html#key42">zip</a></b> programs - with the possible
exception of unicode support. The files generated by this command use
utf-8 encoding for all filenames and comments and it has been noticed
particularly on Windows the <b class="syscmd">info-zip</b> and the Windows built-in
zip view have rather poor support for this part of the ZIP file
specification. The <b class="syscmd">7-Zip</b> program does correctly display utf8
filenames however and the <b class="package">vfs::zip</b> package will use these of
course.</p>
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>zipfile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
<p>When proposing code changes, please provide <em>unified diffs</em>,
i.e the output of <b class="const">diff -u</b>.</p>
<p>Note further that <em>attachments</em> are strongly preferred over
inlined patches. Attachments can be made by going to the <b class="const">Edit</b>
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#decompression">decompression</a>, <a href="../../../../index.html#zip">zip</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Pat Thoyts</p>
</div>
</div></body></html>







<
<
<
<
<
<


|








205
206
207
208
209
210
211






212
213
214
215
216
217
218
219
220
221
222
<div id="section3" class="doctools_section"><h2><a name="section3">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>zipfile</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>






</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key43">decompression</a>, <a href="../../../../index.html#key42">zip</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>File</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2009 Pat Thoyts</p>
</div>
</div></body></html>

Changes to idoc/www/tcllib/toc.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982




983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010




1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624




1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
<!DOCTYPE html><html><head>
<title> Table Of Contents </title>
</head>
<!-- Generated by tcllib/doctools/toc with format 'html'
   -->
<!-- Table Of Contents
   -->
<body>
<hr> [
   <a href="../../../../../home">Tcllib Home</a>
&#124; <a href="../index.html">Keyword Index</a>
&#124; <a href="../toc0.html">Categories</a>
&#124; <a href="../toc1.html">Modules</a>
&#124; <a href="../toc2.html">Applications</a>
 ] <hr>
<h3>Table Of Contents</h3>
<hr><dl><dt><h2>tcllib</h2></dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='aes'><a href="files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ascii85'><a href="files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='asn'><a href="files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='autoproxy'><a href="files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='base32'><a href="files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='base32_core'><a href="files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='base32_hex'><a href="files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='base64'><a href="files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bee'><a href="files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench'><a href="files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_in'><a href="files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_out_csv'><a href="files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_out_text'><a href="files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_intro'><a href="files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_lang_intro'><a href="files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_lang_spec'><a href="files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bibtex'><a href="files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='blowfish'><a href="files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cache_async'><a href="files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='cksum'><a href="files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='clay'><a href="files/modules/clay/clay.html">clay</a></td>
<td class="#doctools_tocright">A minimalist framework for large scale OO Projects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='clock_iso8601'><a href="files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='clock_rfc2822'><a href="files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing RFC 2822 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='cmdline'><a href="files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='comm'><a href="files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='comm_wire'><a href="files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='control'><a href="files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='coroutine'><a href="files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='coroutine_auto'><a href="files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='counter'><a href="files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='crc16'><a href="files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='crc32'><a href="files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cron'><a href="files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='csv'><a href="files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='debug'><a href="files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='debug_caller'><a href="files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='debug_heartbeat'><a href="files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='debug_timestamp'><a href="files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='defer'><a href="files/modules/defer/defer.html">defer</a></td>
<td class="#doctools_tocright">Defered execution</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='deleg_method'><a href="files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='deleg_proc'><a href="files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='des'><a href="files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dicttool'><a href="files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='dns'><a href="files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_intro'><a href="files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_lang_cmdref'><a href="files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_lang_faq'><a href="files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_lang_intro'><a href="files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_lang_syntax'><a href="files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_plugin_apiref'><a href="files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docstrip'><a href="files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docstrip_util'><a href="files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_intro'><a href="files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_lang_cmdref'><a href="files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_lang_faq'><a href="files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_lang_intro'><a href="files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_lang_syntax'><a href="files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_plugin_apiref'><a href="files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools'><a href="files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools2idx_introduction'><a href="files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools2toc_introduction'><a href="files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_changelog'><a href="files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_cvs'><a href="files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_html_cssdefaults'><a href="files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx'><a href="files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx'><a href="files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export'><a href="files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_docidx'><a href="files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_html'><a href="files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_json'><a href="files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_nroff'><a href="files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_text'><a href="files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_wiki'><a href="files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_import'><a href="files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_import_docidx'><a href="files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_import_json'><a href="files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_parse'><a href="files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_structure'><a href="files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat'><a href="files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_c'><a href="files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_de'><a href="files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_en'><a href="files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_fr'><a href="files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_c'><a href="files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_de'><a href="files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_en'><a href="files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_fr'><a href="files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_nroff_man_macros'><a href="files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_tcl_parse'><a href="files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc'><a href="files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc'><a href="files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export'><a href="files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_doctoc'><a href="files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_html'><a href="files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_json'><a href="files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_nroff'><a href="files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_text'><a href="files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_wiki'><a href="files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_import'><a href="files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_import_doctoc'><a href="files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_import_json'><a href="files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_parse'><a href="files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_structure'><a href="files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_intro'><a href="files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_lang_cmdref'><a href="files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_lang_faq'><a href="files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_lang_intro'><a href="files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_lang_syntax'><a href="files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_plugin_apiref'><a href="files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='dtplite'><a href="files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dtplite'><a href="files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil'><a href="files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_magic_cfront'><a href="files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_magic_cgen'><a href="files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_magic_filetype'><a href="files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_magic_rt'><a href="files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_multi'><a href="files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_multi_op'><a href="files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_paths'><a href="files/modules/fileutil/paths.html">fileutil::paths</a></td>
<td class="#doctools_tocright">Manage search path pools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_traverse'><a href="files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ftp'><a href="files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ftp_geturl'><a href="files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ftpd'><a href="files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='generator'><a href="files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='gpx'><a href="files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_aycock'><a href="files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_fa'><a href="files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_fa_dacceptor'><a href="files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_fa_dexec'><a href="files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_fa_op'><a href="files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu'><a href="files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu_core'><a href="files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu_gasm'><a href="files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_tcl'><a href="files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_util'><a href="files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_ast'><a href="files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_intro'><a href="files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_vm'><a href="files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_peg'><a href="files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_peg_interp'><a href="files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='hook'><a href="files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='html'><a href="files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='htmlparse'><a href="files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='httpd'><a href="files/modules/httpd/httpd.html">httpd</a></td>
<td class="#doctools_tocright">A TclOO and coroutine based web server</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='huddle'><a href="files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ident'><a href="files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='imap4'><a href="files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='inifile'><a href="files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='interp'><a href="files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='irc'><a href="files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='javascript'><a href="files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='jpeg'><a href="files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='json'><a href="files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='json_write'><a href="files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='lambda'><a href="files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='lazyset'><a href="files/modules/lazyset/lazyset.html">lazyset</a></td>
<td class="#doctools_tocright">Lazy evaluation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ldap'><a href="files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ldapx'><a href="files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='log'><a href="files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='logger'><a href="files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='logger_appender'><a href="files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='logger_utils'><a href="files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='map_geocode_nominatim'><a href="files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='map_slippy'><a href="files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='map_slippy_cache'><a href="files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='map_slippy_fetcher'><a href="files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='mapproj'><a href="files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='markdown'><a href="files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math'><a href="files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_bigfloat'><a href="files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_bignum'><a href="files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_calculus'><a href="files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_calculus_romberg'><a href="files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_calculus_symdiff'><a href="files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_changepoint'><a href="files/modules/math/changepoint.html">math::changepoint</a></td>
<td class="#doctools_tocright">Change point detection methods</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_combinatorics'><a href="files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_complexnumbers'><a href="files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_constants'><a href="files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_decimal'><a href="files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_exact'><a href="files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_filters'><a href="files/modules/math/filtergen.html">math::filters</a></td>
<td class="#doctools_tocright">Digital filters</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_fourier'><a href="files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_fuzzy'><a href="files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_geometry'><a href="files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_interpolate'><a href="files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_linearalgebra'><a href="files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_machineparameters'><a href="files/modules/math/machineparameters.html">math::machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_numtheory'><a href="files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_optimize'><a href="files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_pca'><a href="files/modules/math/pca.html">math::PCA</a></td>
<td class="#doctools_tocright">Package for Principal Component Analysis</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_polynomials'><a href="files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_probopt'><a href="files/modules/math/probopt.html">math::probopt</a></td>
<td class="#doctools_tocright">Probabilistic optimisation methods</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_quasirandom'><a href="files/modules/math/quasirandom.html">math::quasirandom</a></td>
<td class="#doctools_tocright">Quasi-random points for integration and Monte Carlo type methods</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_rationalfunctions'><a href="files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_roman'><a href="files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_special'><a href="files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_statistics'><a href="files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_trig'><a href="files/modules/math/trig.html">math::trig</a></td>
<td class="#doctools_tocright">Trigonometric anf hyperbolic functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md4'><a href="files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='md5'><a href="files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md5crypt'><a href="files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='mime'><a href="files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='mpexpand'><a href="files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='multiplexer'><a href="files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv'><a href="files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv_auto'><a href="files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv_common'><a href="files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv_protocol'><a href="files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv_server'><a href="files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='namespacex'><a href="files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ncgi'><a href="files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nettool'><a href="files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nmea'><a href="files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nns'><a href="files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nns_intro'><a href="files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nnsd'><a href="files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nnslog'><a href="files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nntp'><a href="files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ntp_time'><a href="files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='oauth'><a href="files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oo_util'><a href="files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='oo_util'><a href="files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oometa'><a href="files/modules/oometa/oometa.html">oometa</a></td>
<td class="#doctools_tocright">oo::meta A data registry for classess</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='otp'><a href="files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page'><a href="files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_intro'><a href="files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_pluginmgr'><a href="files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_flow'><a href="files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_norm_lemon'><a href="files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_norm_peg'><a href="files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_peg'><a href="files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_quote'><a href="files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='picoirc'><a href="files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pki'><a href="files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pluginmgr'><a href="files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='png'><a href="files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3'><a href="files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pop3d'><a href="files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3d_dbox'><a href="files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pop3d_udb'><a href="files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='practcl'><a href="files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='processman'><a href="files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='profiler'><a href="files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt'><a href="files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_ast'><a href="files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_cparam_configuration_critcl'><a href="files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_cparam_configuration_tea'><a href="files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_json_language'><a href="files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_param'><a href="files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_pe'><a href="files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_pe_op'><a href="files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg'><a href="files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_container'><a href="files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_container_peg'><a href="files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_export'><a href="files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_export_container'><a href="files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_export_json'><a href="files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_export_peg'><a href="files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_from_container'><a href="files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_from_json'><a href="files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_from_peg'><a href="files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_import'><a href="files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_import_container'><a href="files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_import_json'><a href="files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_import_peg'><a href="files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_interp'><a href="files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_container'><a href="files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_cparam'><a href="files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_json'><a href="files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_param'><a href="files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_peg'><a href="files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_tclparam'><a href="files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_language'><a href="files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_pegrammar'><a href="files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_pgen'><a href="files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_rde'><a href="files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_nx'><a href="files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_snit'><a href="files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_tcloo'><a href="files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_util'><a href="files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_export_api'><a href="files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_import_api'><a href="files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_introduction'><a href="files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_parse_peg'><a href="files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_parser_api'><a href="files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_op'><a href="files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='rc4'><a href="files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='rcs'><a href="files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='report'><a href="files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='rest'><a href="files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ripemd128'><a href="files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ripemd160'><a href="files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='s3'><a href="files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sasl'><a href="files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sasl_ntlm'><a href="files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sasl_scram'><a href="files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sasl_xgoogletoken'><a href="files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sha1'><a href="files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sha256'><a href="files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='simulation_annealing'><a href="files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='simulation_montecarlo'><a href="files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='simulation_random'><a href="files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='smtp'><a href="files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='smtpd'><a href="files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='snit'><a href="files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='snitfaq'><a href="files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='soundex'><a href="files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='stooop'><a href="files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='string_token'><a href="files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='string_token_shell'><a href="files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='stringprep'><a href="files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='stringprep_data'><a href="files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_disjointset'><a href="files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_graph'><a href="files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_graph_op'><a href="files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_graph_v1'><a href="files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_list'><a href="files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_map'><a href="files/modules/struct/struct_map.html">struct::map</a></td>
<td class="#doctools_tocright">Manage key/value maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_matrix'><a href="files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_matrix_v1'><a href="files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_pool'><a href="files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_prioqueue'><a href="files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_queue'><a href="files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_record'><a href="files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_set'><a href="files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_skiplist'><a href="files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_stack'><a href="files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_tree'><a href="files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_tree_v1'><a href="files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sum'><a href="files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='switched'><a href="files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tar'><a href="files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_cat'><a href="files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_core'><a href="files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_events'><a href="files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_facade'><a href="files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_fifo'><a href="files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_fifo2'><a href="files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_halfpipe'><a href="files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_memchan'><a href="files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_null'><a href="files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_nullzero'><a href="files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_random'><a href="files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_std'><a href="files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_string'><a href="files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_textwindow'><a href="files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_variable'><a href="files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_zero'><a href="files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_randomseed'><a href="files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_adler32'><a href="files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_base64'><a href="files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_core'><a href="files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_counter'><a href="files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_crc32'><a href="files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_hex'><a href="files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_identity'><a href="files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_limitsize'><a href="files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_observe'><a href="files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_otp'><a href="files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_rot'><a href="files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_spacer'><a href="files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_zlib'><a href="files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_community_communication'><a href="files/devdoc/tcl_community_communication.html">tcl_community_communication</a></td>
<td class="#doctools_tocright">Tcl Community - Kind Communication</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcldes'><a href="files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcldesjr'><a href="files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcldocstrip'><a href="files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcllib_devguide'><a href="files/devdoc/tcllib_devguide.html">tcllib_devguide</a></td>
<td class="#doctools_tocright">Tcllib - The Developer's Guide</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcllib_install_guide'><a href="files/devdoc/tcllib_installer.html">tcllib_install_guide</a></td>
<td class="#doctools_tocright">Tcllib - The Installer's Guide</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcllib_ip'><a href="files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcllib_license'><a href="files/devdoc/tcllib_license.html">tcllib_license</a></td>
<td class="#doctools_tocright">Tcllib - License</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcllib_releasemgr'><a href="files/devdoc/tcllib_releasemgr.html">tcllib_releasemgr</a></td>
<td class="#doctools_tocright">Tcllib - The Release Manager's Guide</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcllib_sources'><a href="files/devdoc/tcllib_sources.html">tcllib_sources</a></td>
<td class="#doctools_tocright">Tcllib - How To Get The Sources</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tepam'><a href="files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tepam_argument_dialogbox'><a href="files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tepam_doc_gen'><a href="files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tepam_procedure'><a href="files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term'><a href="files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_code'><a href="files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_code_attr'><a href="files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_code_ctrl'><a href="files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_code_macros'><a href="files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_ctrl_unix'><a href="files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_send'><a href="files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_interact_menu'><a href="files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_interact_pager'><a href="files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_receive'><a href="files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_receive_bind'><a href="files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_send'><a href="files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil'><a href="files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_adjust'><a href="files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_expander'><a href="files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_patch'><a href="files/modules/textutil/patch.html">textutil::patch</a></td>
<td class="#doctools_tocright">Application of uni-diff patches to directory trees</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_repeat'><a href="files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_split'><a href="files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_string'><a href="files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_tabify'><a href="files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_trim'><a href="files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='throw'><a href="files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tie'><a href="files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tie'><a href="files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tiff'><a href="files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tool'><a href="files/modules/tool/tool.html">tool</a></td>




<td class="#doctools_tocright">TclOO Library (TOOL) Framework</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tool_dict_ensemble'><a href="files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_connect'><a href="files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_copy'><a href="files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_copy_queue'><a href="files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_data_destination'><a href="files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_data_source'><a href="files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_receiver'><a href="files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_transmitter'><a href="files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='treeql'><a href="files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='try'><a href="files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='udpcluster'><a href="files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='uevent'><a href="files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uevent_onidle'><a href="files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='unicode'><a href="files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='unicode_data'><a href="files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='units'><a href="files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uri'><a href="files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='uri_urn'><a href="files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uuencode'><a href="files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='uuid'><a href="files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_common'><a href="files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_amex'><a href="files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_discover'><a href="files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_mastercard'><a href="files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_visa'><a href="files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_gs1_ean13'><a href="files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_iban'><a href="files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_imei'><a href="files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_isbn'><a href="files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_luhn'><a href="files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_luhn5'><a href="files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_usnpi'><a href="files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_verhoeff'><a href="files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='websocket'><a href="files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='wip'><a href="files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='xsxp'><a href="files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='yaml'><a href="files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='yencode'><a href="files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='zipfile_decode'><a href="files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='zipfile_encode'><a href="files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='zipfile_mkzip'><a href="files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table>
</dd></dl><hr></body></html>
|


|

|




|
|
|
|

|
|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|
|


|



<
<
<
<
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


<
<
<
<

|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



<
<
<
<
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


<
<
<
<

|



|



|



|



|



|



|



|



|



|



|



<
<
<
<
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


<
<
<
<

|



|



|



|



|



<
<
<
<
|


|
|


|
|


|
|


|
|


<
<
<
<

|



|



<
<
<
<
|


|
|
|

<
<
<
<

|
|


|
|


|
|


<
<
<
<
<
<
<
<
|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


<
<
<
<
|


|
|


|
|


|
|


|
|


|
|


>
>
>
>

<
<
<
<
|


|
|


|
|


|
|


|
|


|
|


>
>
>
>

<
<
<
<
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|
<
<
<
<
|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


<
<
<
<
<
<
<
<

|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|



<
<
<
|
<
|

|
|
|

|
|


|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

<
<
<
<

|
|


|
|


|
|


|
|


|
|


|
<
<
<
<
<
<
<
<



|



|



|



|



|
>
>
>
>
<
<
<
<



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107




108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166




167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483




484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578




579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623




624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694




695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715




716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734




735
736
737
738
739
740
741
742
743




744
745
746
747
748
749
750




751
752
753
754
755
756
757
758
759
760
761
762
763








764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907




908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935




936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963




964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232




1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310








1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415



1416

1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502




1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524








1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548




1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
<html><head>
<title> Table Of Contents </title>
</head>
<! -- Generated by tcllib/doctools/toc with format 'html'
   -->
<! -- Table Of Contents
   -->
<body>
<hr> [
   <a href="../../../../../home">Tcllib Home</a>
| <a href="../index.html">Keyword Index</a>
| <a href="../toc0.html">Categories</a>
| <a href="../toc1.html">Modules</a>
| <a href="../toc2.html">Applications</a>
 ] <hr>
<h3> Table Of Contents </h3>
<hr><dl><dt><h2> tcllib </h2><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_toceven" >








<td class="#doctools_tocleft" ><a href="files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/struct_list.html">struct::list</a></td>




<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>








<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >



<td class="#doctools_tocleft" ><a href="files/modules/des/tcldesjr.html">tclDESjr</a></td>

<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/math/machineparameters.html">tclrep/machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/textutil/trim.html">textutil::trim</a></td>








<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>




<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table>
</dl><hr></body></html>

Changes to idoc/www/toc.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693




694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844



845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878




879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097




1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127




1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221




1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252







1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749




1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787




1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102



2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525







2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591




2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877


2878
2879
2880
2881
2882
2883
2884
2885


2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921



2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988







2989
2990







2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052



3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174








3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238












3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487




3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512



3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549








3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580




3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610




3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642







3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733







3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
<!DOCTYPE html><html><head>
<title> Table Of Contents </title>
</head>
<!-- Generated by tcllib/doctools/toc with format 'html'
   -->
<!-- Table Of Contents
   -->
<body>
<hr> [
   <a href="../../../../home">Tcllib Home</a>
&#124; <a href="index.html">Keyword Index</a>
&#124; <a href="toc0.html">Categories</a>
&#124; <a href="toc1.html">Modules</a>
&#124; <a href="toc2.html">Applications</a>
 ] <hr>
<h3>Table Of Contents</h3>
<hr><dl><dt><h2></h2></dt><dd>
<dl><dt><a name='by_categories'>By Categories</dt><dd>
<dl><dt><a name='argument_entry_form_mega_widget'>Argument entry form, mega widget</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tepam_argument_dialogbox'><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
</table></dl>
<dl><dt><a name='benchmark_tools'>Benchmark tools</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench'><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_in'><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_out_csv'><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_out_text'><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_intro'><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_lang_intro'><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_lang_spec'><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt><a name='cgi_programming'>CGI programming</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='html'><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='javascript'><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='json'><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='json_write'><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ncgi'><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt><a name='channels'>Channels</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_cat'><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_core'><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_events'><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_facade'><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_fifo'><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_fifo2'><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_halfpipe'><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_memchan'><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_null'><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_nullzero'><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_random'><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_std'><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_string'><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_textwindow'><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_variable'><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_zero'><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_randomseed'><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_adler32'><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_base64'><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_core'><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_counter'><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_crc32'><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_hex'><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_identity'><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_limitsize'><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_observe'><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_otp'><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_rot'><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_spacer'><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_zlib'><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt><a name='coroutine'>Coroutine</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='coroutine'><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='coroutine_auto'><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt><a name='data_structures'>Data structures</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='counter'><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='report'><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_disjointset'><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_graph'><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_graph_op'><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_graph_v1'><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_list'><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_matrix'><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_matrix_v1'><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_pool'><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_prioqueue'><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_queue'><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_record'><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_set'><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_skiplist'><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_stack'><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_tree'><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_tree_v1'><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='treeql'><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt><a name='debugging_tracing_and_logging'>debugging, tracing, and logging</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='debug'><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='debug_caller'><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='debug_heartbeat'><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='debug_timestamp'><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt><a name='documentation_tools'>Documentation tools</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_intro'><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_lang_cmdref'><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_lang_faq'><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_lang_intro'><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_lang_syntax'><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_plugin_apiref'><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docstrip'><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docstrip_util'><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_intro'><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_lang_cmdref'><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_lang_faq'><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_lang_intro'><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_lang_syntax'><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_plugin_apiref'><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools'><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools2idx_introduction'><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools2toc_introduction'><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_changelog'><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_cvs'><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_html_cssdefaults'><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx'><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx'><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export'><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_import'><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_parse'><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_structure'><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat'><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_c'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_de'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_en'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_fr'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_c'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_de'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_en'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_fr'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_nroff_man_macros'><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_tcl_parse'><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc'><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc'><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export'><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_import'><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_parse'><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_structure'><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_intro'><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_lang_cmdref'><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_lang_faq'><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_lang_intro'><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_lang_syntax'><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_plugin_apiref'><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='dtplite'><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dtplite'><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='mpexpand'><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcldocstrip'><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tepam_doc_gen'><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_expander'><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
</table></dl>
<dl><dt><a name='file'>File</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='zipfile_decode'><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='zipfile_encode'><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='zipfile_mkzip'><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl>
<dl><dt><a name='file_formats'>File formats</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='gpx'><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='jpeg'><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='png'><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tar'><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tiff'><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt><a name='grammars_and_finite_automata'>Grammars and finite automata</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_aycock'><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_fa'><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_fa_dacceptor'><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_fa_dexec'><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_fa_op'><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu'><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu_core'><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu_gasm'><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_tcl'><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_util'><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_ast'><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_intro'><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_vm'><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_peg'><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_peg_interp'><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt><a name='hashes_checksums_and_encryption'>Hashes, checksums, and encryption</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='aes'><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='blowfish'><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cksum'><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='crc16'><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='crc32'><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='des'><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md4'><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='md5'><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md5crypt'><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='otp'><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pki'><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='rc4'><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ripemd128'><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ripemd160'><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sha1'><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sha256'><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='soundex'><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sum'><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcldes'><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcldesjr'><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uuid'><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt><a name='mathematics'>Mathematics</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math'><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_bigfloat'><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_bignum'><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_calculus'><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_calculus_romberg'><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_changepoint'><a href="tcllib/files/modules/math/changepoint.html">math::changepoint</a></td>
<td class="#doctools_tocright">Change point detection methods</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_combinatorics'><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_complexnumbers'><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_constants'><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_decimal'><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_exact'><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_filters'><a href="tcllib/files/modules/math/filtergen.html">math::filters</a></td>
<td class="#doctools_tocright">Digital filters</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_fourier'><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_fuzzy'><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_geometry'><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_interpolate'><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_linearalgebra'><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_numtheory'><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_optimize'><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_pca'><a href="tcllib/files/modules/math/pca.html">math::PCA</a></td>
<td class="#doctools_tocright">Package for Principal Component Analysis</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_polynomials'><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_probopt'><a href="tcllib/files/modules/math/probopt.html">math::probopt</a></td>
<td class="#doctools_tocright">Probabilistic optimisation methods</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_quasirandom'><a href="tcllib/files/modules/math/quasirandom.html">math::quasirandom</a></td>
<td class="#doctools_tocright">Quasi-random points for integration and Monte Carlo type methods</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_rationalfunctions'><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_roman'><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_special'><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_statistics'><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_trig'><a href="tcllib/files/modules/math/trig.html">math::trig</a></td>
<td class="#doctools_tocright">Trigonometric anf hyperbolic functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='simulation_annealing'><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='simulation_montecarlo'><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='simulation_random'><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt><a name='networking'>Networking</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='asn'><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='autoproxy'><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bee'><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='dns'><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ftp'><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ftp_geturl'><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ftpd'><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>




</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='httpd'><a href="tcllib/files/modules/httpd/httpd.html">httpd</a></td>
<td class="#doctools_tocright">A TclOO and coroutine based web server</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ident'><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='imap4'><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='irc'><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ldap'><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ldapx'><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv'><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv_auto'><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv_common'><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv_protocol'><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv_server'><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nmea'><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nns'><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nns_intro'><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nnsd'><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nnslog'><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nntp'><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ntp_time'><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='oauth'><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='picoirc'><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pop3'><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3d'><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pop3d_dbox'><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3d_udb'><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='s3'><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sasl'><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sasl_ntlm'><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sasl_scram'><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sasl_xgoogletoken'><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='smtp'><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='smtpd'><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcllib_ip'><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='udpcluster'><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uri'><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='uri_urn'><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='websocket'><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt><a name='page_parser_generator'>Page Parser Generator</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page'><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_intro'><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_pluginmgr'><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_flow'><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_norm_lemon'><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_norm_peg'><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_peg'><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_quote'><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt><a name='parsing_and_grammars'>Parsing and Grammars</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt'><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_ast'><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_cparam_configuration_critcl'><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_cparam_configuration_tea'><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_json_language'><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_param'><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_pe'><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_pe_op'><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg'><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_container'><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_container_peg'><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_export'><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_export_container'><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_export_json'><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_export_peg'><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_from_container'><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_from_json'><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>




<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_from_peg'><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_import'><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_import_container'><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_import_json'><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_import_peg'><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_interp'><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_container'><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_cparam'><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_json'><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_param'><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_peg'><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_tclparam'><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_language'><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_pegrammar'><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_pgen'><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_rde'><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_nx'><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_snit'><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_tcloo'><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_util'><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_export_api'><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_import_api'><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_introduction'><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_parse_peg'><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_parser_api'><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_op'><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt><a name='procedures_arguments_parameters_options'>Procedures, arguments, parameters, options</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tepam'><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tepam_procedure'><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt><a name='programming_tools'>Programming tools</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='clay'><a href="tcllib/files/modules/clay/clay.html">clay</a></td>
<td class="#doctools_tocright">A minimalist framework for large scale OO Projects</td>
</tr>
<tr class="#doctools_tocodd"  >







<td class="#doctools_tocleft" ><a name='cmdline'><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='comm'><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='comm_wire'><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='control'><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='deleg_method'><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='deleg_proc'><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil'><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_magic_cfront'><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_magic_cgen'><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_magic_filetype'><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_magic_rt'><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_multi'><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_multi_op'><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_traverse'><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='hook'><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='interp'><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='log'><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='logger'><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='logger_appender'><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='logger_utils'><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='multiplexer'><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pluginmgr'><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='profiler'><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='snit'><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='snitfaq'><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='stooop'><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='switched'><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tie'><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tie'><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uevent'><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='wip'><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt><a name='system'>System</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cron'><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nettool'><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='processman'><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt><a name='tcloo'>TclOO</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oometa'><a href="tcllib/files/modules/oometa/oometa.html">oometa</a></td>
<td class="#doctools_tocright">oo::meta A data registry for classess</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='practcl'><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tool'><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">TclOO Library (TOOL) Framework</td>
</tr>
</table></dl>
<dl><dt><a name='terminal_control'>Terminal control</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term'><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_code'><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_code_attr'><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_code_ctrl'><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_code_macros'><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_ctrl_unix'><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_send'><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_interact_menu'><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_interact_pager'><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_receive'><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_receive_bind'><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_send'><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt><a name='text_formatter_plugin'>Text formatter plugin</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_docidx'><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_html'><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_json'><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_nroff'><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_text'><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_wiki'><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_import_docidx'><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_import_json'><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_doctoc'><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_html'><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_json'><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_nroff'><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_text'><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_wiki'><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_import_doctoc'><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_import_json'><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
</table></dl>
<dl><dt><a name='text_processing'>Text processing</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ascii85'><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='base32'><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='base32_core'><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='base32_hex'><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='base64'><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bibtex'><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='clock_iso8601'><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='clock_rfc2822'><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing RFC 2822 dates/times</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='csv'><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='htmlparse'><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='inifile'><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='markdown'><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='mime'><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='rcs'><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='string_token'><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='string_token_shell'><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil'><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_adjust'><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_patch'><a href="tcllib/files/modules/textutil/patch.html">textutil::patch</a></td>
<td class="#doctools_tocright">Application of uni-diff patches to directory trees</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_repeat'><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_split'><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_string'><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_tabify'><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_trim'><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uuencode'><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='xsxp'><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='yencode'><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt><a name='transfer_module'>Transfer module</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_connect'><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_copy'><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_copy_queue'><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_data_destination'><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_data_source'><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_receiver'><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_transmitter'><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt><a name='unfiled'>Unfiled</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cache_async'><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_paths'><a href="tcllib/files/modules/fileutil/paths.html">fileutil::paths</a></td>
<td class="#doctools_tocright">Manage search path pools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='generator'><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='huddle'><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='map_geocode_nominatim'><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='map_slippy'><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='map_slippy_cache'><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='map_slippy_fetcher'><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='mapproj'><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_calculus_symdiff'><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_machineparameters'><a href="tcllib/files/modules/math/machineparameters.html">math::machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='namespacex'><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='rest'><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='stringprep'><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='stringprep_data'><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_map'><a href="tcllib/files/modules/struct/struct_map.html">struct::map</a></td>
<td class="#doctools_tocright">Manage key/value maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uevent_onidle'><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='unicode'><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='unicode_data'><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='units'><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a name='yaml'><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt><a name='utilities'>Utilities</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dicttool'><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt><a name='utility'>Utility</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='defer'><a href="tcllib/files/modules/defer/defer.html">defer</a></td>
<td class="#doctools_tocright">Defered execution</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='lambda'><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='lazyset'><a href="tcllib/files/modules/lazyset/lazyset.html">lazyset</a></td>
<td class="#doctools_tocright">Lazy evaluation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='oo_util'><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oo_util'><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='throw'><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a name='tool_dict_ensemble'><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='try'><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt><a name='validation_type_checking'>Validation, Type checking</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_common'><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_amex'><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_discover'><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_mastercard'><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_visa'><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_gs1_ean13'><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_iban'><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_imei'><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_isbn'><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_luhn'><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_luhn5'><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_usnpi'><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_verhoeff'><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl>
</dl>
<dl><dt><a name='by_type'>By Type</dt><dd>
<dl><dt><a name='applications'>Applications</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dtplite'><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nns'><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nnsd'><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nnslog'><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page'><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt'><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcldocstrip'><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
</table></dl>
<dl><dt><a name='modules'>Modules</dt><dd>
<dl><dt><a name='aes'>aes</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='aes'><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
</table></dl>
<dl><dt><a name='amazon_s3'>amazon-s3</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='s3'><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='xsxp'><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
</table></dl>
<dl><dt><a name='asn'>asn</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='asn'><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
</table></dl>
<dl><dt><a name='base32'>base32</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='base32'><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='base32_core'><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='base32_hex'><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
</table></dl>
<dl><dt><a name='base64'>base64</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ascii85'><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='base64'><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uuencode'><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='yencode'><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt><a name='bee'>bee</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bee'><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt><a name='bench'>bench</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench'><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_in'><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_out_csv'><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_out_text'><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_intro'><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_lang_intro'><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_lang_spec'><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt><a name='bibtex'>bibtex</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bibtex'><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
</table></dl>
<dl><dt><a name='blowfish'>blowfish</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='blowfish'><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
</table></dl>
<dl><dt><a name='cache'>cache</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cache_async'><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
</table></dl>
<dl><dt><a name='clay'>clay</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='clay'><a href="tcllib/files/modules/clay/clay.html">clay</a></td>
<td class="#doctools_tocright">A minimalist framework for large scale OO Projects</td>
</tr>
</table></dl>
<dl><dt><a name='clock'>clock</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='clock_iso8601'><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='clock_rfc2822'><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing RFC 2822 dates/times</td>
</tr>
</table></dl>
<dl><dt><a name='cmdline'>cmdline</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cmdline'><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
</table></dl>
<dl><dt><a name='comm'>comm</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='comm'><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='comm_wire'><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
</table></dl>
<dl><dt><a name='control'>control</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='control'><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
</table></dl>
<dl><dt><a name='coroutine'>coroutine</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='coroutine'><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='coroutine_auto'><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt><a name='counter'>counter</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='counter'><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
</table></dl>
<dl><dt><a name='crc'>crc</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cksum'><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='crc16'><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='crc32'><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sum'><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
</table></dl>
<dl><dt><a name='cron'>cron</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cron'><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt><a name='csv'>csv</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='csv'><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
</table></dl>
<dl><dt><a name='debug'>debug</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='debug'><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>



<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='debug_caller'><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='debug_heartbeat'><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='debug_timestamp'><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt><a name='defer'>defer</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='defer'><a href="tcllib/files/modules/defer/defer.html">defer</a></td>
<td class="#doctools_tocright">Defered execution</td>
</tr>
</table></dl>
<dl><dt><a name='des'>des</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='des'><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcldes'><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcldesjr'><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
</table></dl>
<dl><dt><a name='dicttool'>dicttool</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dicttool'><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt><a name='dns'>dns</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dns'><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcllib_ip'><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
</table></dl>
<dl><dt><a name='docstrip'>docstrip</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docstrip'><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docstrip_util'><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
</table></dl>
<dl><dt><a name='doctools'>doctools</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_intro'><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_lang_cmdref'><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_lang_faq'><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_lang_intro'><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_lang_syntax'><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_plugin_apiref'><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_intro'><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_lang_cmdref'><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_lang_faq'><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_lang_intro'><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_lang_syntax'><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_plugin_apiref'><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools'><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_changelog'><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_cvs'><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx'><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc'><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_intro'><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_lang_cmdref'><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_lang_faq'><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_lang_intro'><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_lang_syntax'><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_plugin_apiref'><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='mpexpand'><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
</table></dl>
<dl><dt><a name='doctools2base'>doctools2base</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_html_cssdefaults'><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat'><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_nroff_man_macros'><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_tcl_parse'><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
</table></dl>
<dl><dt><a name='doctools2idx'>doctools2idx</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools2idx_introduction'><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx'><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export'><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_docidx'><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_html'><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_json'><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_nroff'><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_text'><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_wiki'><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_import'><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_import_docidx'><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_import_json'><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_parse'><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_structure'><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_c'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_de'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_en'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_fr'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
</table></dl>
<dl><dt><a name='doctools2toc'>doctools2toc</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools2toc_introduction'><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_c'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_de'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_en'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_fr'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc'><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export'><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_doctoc'><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_html'><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_json'><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_nroff'><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_text'><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_wiki'><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_import'><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_import_doctoc'><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_import_json'><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_parse'><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_structure'><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
</table></dl>
<dl><dt><a name='dtplite'>dtplite</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dtplite'><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
</table></dl>
<dl><dt><a name='fileutil'>fileutil</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil'><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_multi'><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_multi_op'><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_paths'><a href="tcllib/files/modules/fileutil/paths.html">fileutil::paths</a></td>
<td class="#doctools_tocright">Manage search path pools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_traverse'><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
</table></dl>
<dl><dt><a name='ftp'>ftp</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ftp'><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ftp_geturl'><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
</table></dl>
<dl><dt><a name='ftpd'>ftpd</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ftpd'><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
</table></dl>
<dl><dt><a name='fumagic'>fumagic</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_magic_cfront'><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_magic_cgen'><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_magic_filetype'><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_magic_rt'><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
</table></dl>
<dl><dt><a name='generator'>generator</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='generator'><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
</table></dl>
<dl><dt><a name='gpx'>gpx</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='gpx'><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
</table></dl>
<dl><dt><a name='grammar_aycock'>grammar_aycock</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_aycock'><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
</table></dl>
<dl><dt><a name='grammar_fa'>grammar_fa</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >







<td class="#doctools_tocleft" ><a name='grammar_fa'><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_fa_dacceptor'><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_fa_dexec'><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_fa_op'><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
</table></dl>
<dl><dt><a name='grammar_me'>grammar_me</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu'><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu_core'><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu_gasm'><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_tcl'><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_util'><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_ast'><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_intro'><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_vm'><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
</table></dl>
<dl><dt><a name='grammar_peg'>grammar_peg</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_peg'><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_peg_interp'><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt><a name='hook'>hook</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='hook'><a href="tcllib/files/modules/hook/hook.html">hook</a></td>




<td class="#doctools_tocright">Hooks</td>
</tr>
</table></dl>
<dl><dt><a name='html'>html</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='html'><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
</table></dl>
<dl><dt><a name='htmlparse'>htmlparse</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='htmlparse'><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
</table></dl>
<dl><dt><a name='http'>http</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='autoproxy'><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
</table></dl>
<dl><dt><a name='httpd'>httpd</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='httpd'><a href="tcllib/files/modules/httpd/httpd.html">httpd</a></td>
<td class="#doctools_tocright">A TclOO and coroutine based web server</td>
</tr>
</table></dl>
<dl><dt><a name='ident'>ident</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ident'><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
</table></dl>
<dl><dt><a name='imap4'>imap4</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='imap4'><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
</table></dl>
<dl><dt><a name='inifile'>inifile</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='inifile'><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
</table></dl>
<dl><dt><a name='interp'>interp</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='deleg_method'><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='deleg_proc'><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='interp'><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
</table></dl>
<dl><dt><a name='irc'>irc</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='irc'><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='picoirc'><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
</table></dl>
<dl><dt><a name='javascript'>javascript</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='javascript'><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
</table></dl>
<dl><dt><a name='jpeg'>jpeg</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='jpeg'><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt><a name='json'>json</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='json'><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='json_write'><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
</table></dl>
<dl><dt><a name='lambda'>lambda</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='lambda'><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
</table></dl>
<dl><dt><a name='lazyset'>lazyset</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='lazyset'><a href="tcllib/files/modules/lazyset/lazyset.html">lazyset</a></td>
<td class="#doctools_tocright">Lazy evaluation</td>
</tr>
</table></dl>
<dl><dt><a name='ldap'>ldap</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ldap'><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ldapx'><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
</table></dl>
<dl><dt><a name='log'>log</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='log'><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='logger'><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='logger_appender'><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='logger_utils'><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
</table></dl>
<dl><dt><a name='map'>map</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='map_geocode_nominatim'><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='map_slippy'><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='map_slippy_cache'><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='map_slippy_fetcher'><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
</table></dl>
<dl><dt><a name='mapproj'>mapproj</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='mapproj'><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
</table></dl>
<dl><dt><a name='markdown'>markdown</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='markdown'><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
</table></dl>
<dl><dt><a name='math'>math</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math'><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_bigfloat'><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_bignum'><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_calculus'><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_calculus_romberg'><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_calculus_symdiff'><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_changepoint'><a href="tcllib/files/modules/math/changepoint.html">math::changepoint</a></td>
<td class="#doctools_tocright">Change point detection methods</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_combinatorics'><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_complexnumbers'><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_constants'><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_decimal'><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_exact'><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_filters'><a href="tcllib/files/modules/math/filtergen.html">math::filters</a></td>
<td class="#doctools_tocright">Digital filters</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_fourier'><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_fuzzy'><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_geometry'><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_interpolate'><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_linearalgebra'><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_machineparameters'><a href="tcllib/files/modules/math/machineparameters.html">math::machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_numtheory'><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_optimize'><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_pca'><a href="tcllib/files/modules/math/pca.html">math::PCA</a></td>
<td class="#doctools_tocright">Package for Principal Component Analysis</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_polynomials'><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_probopt'><a href="tcllib/files/modules/math/probopt.html">math::probopt</a></td>
<td class="#doctools_tocright">Probabilistic optimisation methods</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_quasirandom'><a href="tcllib/files/modules/math/quasirandom.html">math::quasirandom</a></td>
<td class="#doctools_tocright">Quasi-random points for integration and Monte Carlo type methods</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_rationalfunctions'><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>


<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_roman'><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_special'><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>


<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_statistics'><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_trig'><a href="tcllib/files/modules/math/trig.html">math::trig</a></td>
<td class="#doctools_tocright">Trigonometric anf hyperbolic functions</td>
</tr>
</table></dl>
<dl><dt><a name='md4'>md4</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md4'><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt><a name='md5'>md5</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md5'><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt><a name='md5crypt'>md5crypt</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md5crypt'><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
</table></dl>
<dl><dt><a name='mime'>mime</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='mime'><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>



<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='smtp'><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
</table></dl>
<dl><dt><a name='multiplexer'>multiplexer</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='multiplexer'><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
</table></dl>
<dl><dt><a name='namespacex'>namespacex</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='namespacex'><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
</table></dl>
<dl><dt><a name='ncgi'>ncgi</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ncgi'><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt><a name='nettool'>nettool</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nettool'><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
</table></dl>
<dl><dt><a name='nmea'>nmea</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nmea'><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
</table></dl>
<dl><dt><a name='nns'>nns</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv'><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv_auto'><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv_common'><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv_protocol'><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv_server'><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nns_intro'><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
</table></dl>







<dl><dt><a name='nntp'>nntp</dt><dd>
<table class="#doctools_toc">







<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nntp'><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
</table></dl>
<dl><dt><a name='ntp'>ntp</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ntp_time'><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
</table></dl>
<dl><dt><a name='oauth'>oauth</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oauth'><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
</table></dl>
<dl><dt><a name='oometa'>oometa</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oometa'><a href="tcllib/files/modules/oometa/oometa.html">oometa</a></td>
<td class="#doctools_tocright">oo::meta A data registry for classess</td>
</tr>
</table></dl>
<dl><dt><a name='ooutil'>ooutil</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oo_util'><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
</table></dl>
<dl><dt><a name='otp'>otp</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='otp'><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
</table></dl>
<dl><dt><a name='page'>page</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_intro'><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_pluginmgr'><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_flow'><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_norm_lemon'><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_norm_peg'><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>



<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_peg'><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_quote'><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt><a name='pki'>pki</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pki'><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
</table></dl>
<dl><dt><a name='pluginmgr'>pluginmgr</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pluginmgr'><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
</table></dl>
<dl><dt><a name='png'>png</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='png'><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt><a name='pop3'>pop3</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3'><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
</table></dl>
<dl><dt><a name='pop3d'>pop3d</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3d'><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pop3d_dbox'><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3d_udb'><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
</table></dl>
<dl><dt><a name='practcl'>practcl</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='practcl'><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
</table></dl>
<dl><dt><a name='processman'>processman</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='processman'><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt><a name='profiler'>profiler</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='profiler'><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
</table></dl>
<dl><dt><a name='pt'>pt</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_ast'><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_cparam_configuration_critcl'><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_cparam_configuration_tea'><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_json_language'><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_param'><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_pe'><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_pe_op'><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg'><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_container'><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_container_peg'><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_export'><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_export_container'><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>








</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_export_json'><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_export_peg'><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_from_container'><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_from_json'><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_from_peg'><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_import'><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_import_container'><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_import_json'><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_import_peg'><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_interp'><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_container'><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_cparam'><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_json'><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_param'><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_peg'><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_tclparam'><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>












</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_language'><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_pegrammar'><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_pgen'><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_rde'><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_nx'><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_snit'><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_tcloo'><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_util'><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_export_api'><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_import_api'><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_introduction'><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_parse_peg'><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_parser_api'><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_op'><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt><a name='rc4'>rc4</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='rc4'><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
</table></dl>
<dl><dt><a name='rcs'>rcs</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='rcs'><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
</table></dl>
<dl><dt><a name='report'>report</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='report'><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
</table></dl>
<dl><dt><a name='rest'>rest</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='rest'><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
</table></dl>
<dl><dt><a name='ripemd'>ripemd</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ripemd128'><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ripemd160'><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt><a name='sasl'>sasl</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sasl'><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sasl_ntlm'><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sasl_scram'><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sasl_xgoogletoken'><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
</table></dl>
<dl><dt><a name='sha1'>sha1</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sha1'><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sha256'><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt><a name='simulation'>simulation</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='simulation_annealing'><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='simulation_montecarlo'><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='simulation_random'><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt><a name='smtpd'>smtpd</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='smtpd'><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
</table></dl>
<dl><dt><a name='snit'>snit</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='snit'><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='snitfaq'><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
</table></dl>
<dl><dt><a name='soundex'>soundex</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='soundex'><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
</table></dl>
<dl><dt><a name='stooop'>stooop</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='stooop'><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='switched'><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
</table></dl>
<dl><dt><a name='string'>string</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='string_token'><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='string_token_shell'><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
</table></dl>
<dl><dt><a name='stringprep'>stringprep</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='stringprep'><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='stringprep_data'><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='unicode'><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='unicode_data'><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
</table></dl>
<dl><dt><a name='struct'>struct</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_disjointset'><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_graph'><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_graph_op'><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_graph_v1'><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_list'><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_map'><a href="tcllib/files/modules/struct/struct_map.html">struct::map</a></td>
<td class="#doctools_tocright">Manage key/value maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_matrix'><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_matrix_v1'><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_pool'><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_prioqueue'><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>




</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_queue'><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_record'><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_set'><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_skiplist'><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_stack'><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_tree'><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_tree_v1'><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
</table></dl>
<dl><dt><a name='tar'>tar</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tar'><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
</table></dl>
<dl><dt><a name='tepam'>tepam</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tepam'><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tepam_argument_dialogbox'><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tepam_doc_gen'><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tepam_procedure'><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt><a name='term'>term</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term'><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>








<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_code'><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_code_attr'><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_code_ctrl'><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_code_macros'><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_ctrl_unix'><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_send'><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_interact_menu'><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_interact_pager'><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>




</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_receive'><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_receive_bind'><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_send'><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt><a name='textutil'>textutil</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil'><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_adjust'><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_expander'><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_patch'><a href="tcllib/files/modules/textutil/patch.html">textutil::patch</a></td>




<td class="#doctools_tocright">Application of uni-diff patches to directory trees</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_repeat'><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_split'><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_string'><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_tabify'><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_trim'><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
</table></dl>
<dl><dt><a name='tie'>tie</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tie'><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tie'><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>







</tr>
</table></dl>
<dl><dt><a name='tiff'>tiff</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tiff'><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt><a name='tool'>tool</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oo_util'><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tool'><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">TclOO Library (TOOL) Framework</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tool_dict_ensemble'><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt><a name='transfer'>transfer</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_connect'><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_copy'><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_copy_queue'><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_data_destination'><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_data_source'><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_receiver'><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_transmitter'><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt><a name='treeql'>treeql</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='treeql'><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt><a name='try'>try</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='throw'><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='try'><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt><a name='udpcluster'>udpcluster</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='udpcluster'><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
</table></dl>
<dl><dt><a name='uev'>uev</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uevent'><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='uevent_onidle'><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
</table></dl>







<dl><dt><a name='units'>units</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='units'><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
</table></dl>
<dl><dt><a name='uri'>uri</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uri'><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='uri_urn'><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
</table></dl>
<dl><dt><a name='uuid'>uuid</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uuid'><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt><a name='valtype'>valtype</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_common'><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_amex'><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_discover'><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_mastercard'><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_visa'><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_gs1_ean13'><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_iban'><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_imei'><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_isbn'><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_luhn'><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_luhn5'><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_usnpi'><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_verhoeff'><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl>
<dl><dt><a name='virtchannel_base'>virtchannel_base</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_cat'><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_facade'><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_fifo'><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_fifo2'><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_halfpipe'><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_memchan'><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_null'><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_nullzero'><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_random'><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_std'><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_string'><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_textwindow'><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_variable'><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_zero'><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_randomseed'><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
</table></dl>
<dl><dt><a name='virtchannel_core'>virtchannel_core</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_core'><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_events'><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_core'><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
</table></dl>
<dl><dt><a name='virtchannel_transform'>virtchannel_transform</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_adler32'><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_base64'><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_counter'><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_crc32'><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_hex'><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_identity'><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_limitsize'><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_observe'><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_otp'><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_rot'><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_spacer'><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_zlib'><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt><a name='websocket'>websocket</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='websocket'><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt><a name='wip'>wip</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='wip'><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt><a name='yaml'>yaml</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='huddle'><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='yaml'><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt><a name='zip'>zip</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='zipfile_decode'><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='zipfile_encode'><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='zipfile_mkzip'><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl>
</dl></dl>
</dd></dl><hr></body></html>
|


|

|




|
|
|
|

|
|
|
|


|



|


|



|



|



|



|



|



|



|


|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|


|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|

<
<
<
<

>
>
>
>

|



|



|



|



|



|



|



|


|



|



|



|



|



<
<
<
<
|


|
|


|
|


|
|


|
|


<
<
<
<

|



|



|



|



|



|



|



<
<
<
<
|


|
|
|

<
<
<
<

<
<
<
<
|


|
|


|
|


|
|
|

|
|
|

|
|
|

>
>
>

|
|

<
<
<
<
<
<
<

|



|



|



|



|



|

>
>
>
>

<
<
<
<

|
|


|
|


|
|


|
|


<
<
<
<
|
|

|
|
<
<
<
<



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|

<
<
<
<

>
>
>
>

|



|



|



|



|



|



|
<
<
<
<
>
>
>
>



|



|



|



|



|



|



|



|



|



|



|



|



|


<
<
<
<
<
<
<
<

|
|


|
|


|
|


|
|


|
|


|
|


|
|
<
<
<
<

>
>
>
>

|
|


|
|


|
|

<
<
<
|
|
|

|
|
|


|


|
|


>
>
>
>
>
>
>
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|



|


|



|



|



|


<
<
<
<
|


<
<
<
<

|


|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|
|


|



|



|



|



|



|



|



|

<
<
<
<

|
|
|

|
|
|

|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|



|


|



|



|



|



|



|



|



|


|



|
|


|
|


|
|


|



|



|



|



|



|



<
<
<
<
|


|
|


|
|


|
|


|
|
|

|
|


|
|


|
|


<
<
<
<

>
>
>
>
|



|


|



|


<
<
<
<
|


<
<
<
<

|



|



|



>
>
>
>
|


|
|



|


|



|



|



|



|



|



|



|



|



|



|



|



|


|
<
|
|


|



|



|



|



|



|



|



|
|


|



|


|



|



|


|



|


|



|



|



|


|



|



|



|



|


|



|


|



|



|



|



|



|



|



|


|



|

<
<
<
<
<
<
<

|
|


|


|
|


|


|



|
|


|


|



|


|



|



|


|



|


|



|



|


|



|


|



|



|



|



<
<
<
<
<
<
<
|


|
|


|


|
|

>
>
>
|
|
|

|
|
|

|
|
|

<
<
<
|
|
|


|


|



|



|



|


|



|


|



|



|


|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|


|



|



|



<
<
<
<
|



|


|



|



|


|



|


|



|



|



|



|


|



|


|



|

<
<
<
<
<
<
<

>
>
>
>
>
>
>
|



|



|



|



|


|


<
<
<
<
<
<
<
<

|
|


|
|


|
|


|
|


|
|

<
<
<

|
|


|
|


|


|
>
>
>
>
|


|


|
|


|


|
|


|


|
|


|


|
|


|


|



|


|



|


|



|


|



|



|



|


|



|



|


|



|


|



|


|



|



|


|



<
<
<
<
<
<
<
|


|



|



|


|



|



|



|



|


|



|



|



|



|


|



|


|



|


|



|



|



|



|



|



<
<
<
<
|


|
|


|
|


|
|


|
|


<
<
<
<

|



|



|



|



|



|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|

>
>
|
<
<
<
|
|
|

>
>
|
<
<
<
|
|
|


|


|
|


|


|
|

<
<
<
|
|
|


|


|
|

>
>
>
|
|
|


|


<
<
<
<
<
|
<
<
|


|


|
|


|


<
<
<
<
<
<
<
|



|


|



|



|



|



|



|



>
>
>
>
>
>
>
|

>
>
>
>
>
>
>

|
|


|


|
|


|


|
|


|


|
<
<
<
<
<
<
<
|

<
<
<
|
|
|

<
<
<

|
|


|
|


|
|


|
|


|
|

>
>
>
<
<
<
<

|
|


|


|
|


|


|
|


|


|
|


|


<
<
<
<
<
<
<
|



|



|



|


|



|


|



|


|



|


|



|



|



|



|



|



|



|



|



|



|



|

>
>
>
>
>
>
>
>


<
<
<
<
<
<
<
<
|



|



|



|



|



|



|



|



|



|



|



|



|



|

>
>
>
>
>
>
>
>
>
>
>
>

<
<
<
<

<
<
<
<
<
<
<
<
|



|



|



|



|



|



|



|



|



|



|



|


|



|


|



|


|



|


|



|


|



|



|


|



|



|



|



|


|



|



|


|



|



|



|


|



|


|



|



|


|



|


|



|



|


|



|



|


|



|



|



|



|


|



|



|



|



|



|
|


|



|
|


|
|


|
|
>
>
>
>

<
<
<
<

|
|


|
|


|
|


|
|


|


>
>
>

|
|


|


<
<
<
<
<
<
<
|



|



|



|



|


|


>
>
>
>
>
>
>
>

<
<
<
<
<
<
<
<
|



|



|



|



|



|

>
>
>
>

<
<
<
<

|



|



|


|



|



|



|
>
>
>
>
|

<
<
<
<

<
<
<
<
|


|
|


|
|



|


|



|

>
>
>
>
>
>
>


|


<
<
<
<
<
<
<
|



|
|


|



|


|



|



|



|



|



|



|



|


|



|


|



|



|


|



|


|



|



>
>
>
>
>
>
>
|


<
<
<
<
<
<
<
|



|



|


|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|


|



|


|



|


|



|



|


|



|



|


|
<
|
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688




689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745




746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764




765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793




794
795
796
797
798
799
800




801




802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831







832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859




860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876




877
878
879
880
881




882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060




1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091




1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149








1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176




1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193



1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358




1359
1360
1361




1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545




1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661




1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692




1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711




1712
1713
1714




1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794

1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933







1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018







2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046



2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385




2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442







2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472








2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492



2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619







2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709




2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728




2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783



2784
2785
2786
2787
2788
2789
2790



2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808



2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830





2831


2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844







2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914







2915
2916



2917
2918
2919
2920



2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943




2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972







2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064








3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131




3132








3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372




3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403







3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434








3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461




3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492




3493




3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526







3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615







3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854

3855
<html><head>
<title> Table Of Contents </title>
</head>
<! -- Generated by tcllib/doctools/toc with format 'html'
   -->
<! -- Table Of Contents
   -->
<body>
<hr> [
   <a href="../../../../home">Tcllib Home</a>
| <a href="index.html">Keyword Index</a>
| <a href="toc0.html">Categories</a>
| <a href="toc1.html">Modules</a>
| <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Table Of Contents </h3>
<hr><dl><dt><h2>  </h2><dd>
<dl><dt>By Categories<dd>
<dl><dt>Argument entry form, mega widget<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
</table></dl>
<dl><dt>Benchmark tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt>CGI programming<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt>Channels<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt>Coroutine<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt>Data structures<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt>debugging, tracing, and logging<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt>Documentation tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
</table></dl>
<dl><dt>File<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl>
<dl><dt>File formats<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>Grammars and finite automata<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt>Hashes, checksums, and encryption<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>




</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt>Mathematics<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>




<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt>Networking<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>







<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>




<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt>Page Parser Generator<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt>Parsing and Grammars<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>




</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>




<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>








<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>




</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>



<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt>Procedures, arguments, parameters, options<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt>Programming tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt>System<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>TclOO<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>




</table></dl>
<dl><dt>Terminal control<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt>Text formatter plugin<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
</table></dl>
<dl><dt>Text processing<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>




</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt>Transfer module<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt>Unfiled<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/machineparameters.html">tclrep/machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>Utilites<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>Utility<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt>Validation, Type checking<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl></table></dl>

<dl><dt>By Type<dd>
<dl><dt>Applications<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
</table></dl>
<dl><dt>Modules<dd>
<dl><dt>aes<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
</table></dl>
<dl><dt>amazon-s3<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
</table></dl>
<dl><dt>asn<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
</table></dl>
<dl><dt>base32<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
</table></dl>
<dl><dt>base64<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt>bee<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>bench<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt>bibtex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
</table></dl>
<dl><dt>blowfish<dd>
<table class="#doctools_toc">







<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
</table></dl>
<dl><dt>cache<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
</table></dl>
<dl><dt>clock<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
</table></dl>
<dl><dt>cmdline<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
</table></dl>
<dl><dt>comm<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
</table></dl>
<dl><dt>control<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
</table></dl>
<dl><dt>coroutine<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt>counter<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
</table></dl>
<dl><dt>crc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
</table></dl>







<dl><dt>cron<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>csv<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
</table></dl>
<dl><dt>debug<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>



<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt>des<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
</table></dl>
<dl><dt>dicttool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>dns<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
</table></dl>
<dl><dt>docstrip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
</table></dl>
<dl><dt>doctools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
</table></dl>
<dl><dt>doctools2base<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
</table></dl>
<dl><dt>doctools2idx<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
</table></dl>
<dl><dt>doctools2toc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
</table></dl>
<dl><dt>dtplite<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
</table></dl>
<dl><dt>fileutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
</table></dl>
<dl><dt>ftp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
</table></dl>
<dl><dt>ftpd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
</table></dl>
<dl><dt>fumagic<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
</table></dl>
<dl><dt>generator<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
</table></dl>
<dl><dt>gpx<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
</table></dl>
<dl><dt>grammar_aycock<dd>
<table class="#doctools_toc">







<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
</table></dl>
<dl><dt>grammar_fa<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
</table></dl>
<dl><dt>grammar_me<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>








<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
</table></dl>
<dl><dt>grammar_peg<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt>hook<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
</table></dl>
<dl><dt>html<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
</table></dl>
<dl><dt>htmlparse<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
</table></dl>
<dl><dt>http<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
</table></dl>
<dl><dt>ident<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
</table></dl>
<dl><dt>imap4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
</table></dl>
<dl><dt>inifile<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
</table></dl>
<dl><dt>interp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
</table></dl>
<dl><dt>irc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
</table></dl>
<dl><dt>javascript<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
</table></dl>
<dl><dt>jpeg<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>json<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
</table></dl>
<dl><dt>lambda<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
</table></dl>







<dl><dt>ldap<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
</table></dl>
<dl><dt>log<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
</table></dl>
<dl><dt>map<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
</table></dl>
<dl><dt>mapproj<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
</table></dl>
<dl><dt>markdown<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
</table></dl>
<dl><dt>math<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/machineparameters.html">tclrep/machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
</table></dl>
<dl><dt>md4<dd>
<table class="#doctools_toc">



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>md5<dd>
<table class="#doctools_toc">



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>md5crypt<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
</table></dl>
<dl><dt>mime<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>



<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
</table></dl>
<dl><dt>multiplexer<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
</table></dl>
<dl><dt>namespacex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
</table></dl>
<dl><dt>ncgi<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >





<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>


<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt>nettool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
</table></dl>
<dl><dt>nmea<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >







<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
</table></dl>
<dl><dt>nns<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
</table></dl>
<dl><dt>nntp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
</table></dl>
<dl><dt>ntp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
</table></dl>
<dl><dt>oauth<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
</table></dl>
<dl><dt>ooutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
</table></dl>
<dl><dt>otp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
</table></dl>
<dl><dt>page<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>







<td class="#doctools_tocright">page introduction</td>
</tr>



<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt>pki<dd>
<table class="#doctools_toc">




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
</table></dl>
<dl><dt>pluginmgr<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
</table></dl>
<dl><dt>png<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>pop3<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
</table></dl>
<dl><dt>pop3d<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >







<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
</table></dl>
<dl><dt>practcl<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
</table></dl>
<dl><dt>processman<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>profiler<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
</table></dl>
<dl><dt>pt<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >








<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>




<tr class="#doctools_tocodd"  >








<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt>rc4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
</table></dl>
<dl><dt>rcs<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
</table></dl>
<dl><dt>report<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
</table></dl>
<dl><dt>rest<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
</table></dl>
<dl><dt>ripemd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>sasl<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
</table></dl>
<dl><dt>sha1<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>simulation<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt>smtpd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
</table></dl>
<dl><dt>snit<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
</table></dl>
<dl><dt>soundex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
</table></dl>
<dl><dt>stooop<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
</table></dl>
<dl><dt>string<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
</table></dl>
<dl><dt>stringprep<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
</table></dl>
<dl><dt>struct<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
</table></dl>
<dl><dt>tar<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
</table></dl>
<dl><dt>tepam<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >







<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt>term<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >








<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt>textutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>




<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
</table></dl>
<dl><dt>tie<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
</table></dl>
<dl><dt>tiff<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>tool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >







<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>transfer<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt>treeql<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt>try<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt>udpcluster<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
</table></dl>
<dl><dt>uev<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
</table></dl>
<dl><dt>units<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
</table></dl>
<dl><dt>uri<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >







<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
</table></dl>
<dl><dt>uuid<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt>valtype<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl>
<dl><dt>virtchannel_base<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
</table></dl>
<dl><dt>virtchannel_core<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
</table></dl>
<dl><dt>virtchannel_transform<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt>websocket<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt>wip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt>yaml<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>zip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl></table></dl></table></dl>

</dl><hr></body></html>

Changes to idoc/www/toc0.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402







1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534



1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570




1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623




1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684




1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
<!DOCTYPE html><html><head>
<title> Table Of Contents </title>
</head>
<!-- Generated by tcllib/doctools/toc with format 'html'
   -->
<!-- Table Of Contents
   -->
<body>
<hr> [
   <a href="../../../../home">Tcllib Home</a>
&#124; <a href="index.html">Keyword Index</a>
&#124; <a href="toc0.html">Categories</a>
&#124; <a href="toc1.html">Modules</a>
&#124; <a href="toc2.html">Applications</a>
 ] <hr>
<h3>Table Of Contents</h3>
<hr><dl><dt><h2></h2></dt><dd>
<dl><dt><a name='by_categories'>By Categories</dt><dd>
<dl><dt><a name='argument_entry_form_mega_widget'>Argument entry form, mega widget</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tepam_argument_dialogbox'><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
</table></dl>
<dl><dt><a name='benchmark_tools'>Benchmark tools</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench'><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_in'><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_out_csv'><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_out_text'><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_intro'><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_lang_intro'><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_lang_spec'><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt><a name='cgi_programming'>CGI programming</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='html'><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='javascript'><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='json'><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='json_write'><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ncgi'><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt><a name='channels'>Channels</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_cat'><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_core'><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_events'><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_facade'><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_fifo'><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_fifo2'><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_halfpipe'><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_memchan'><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_null'><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_nullzero'><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_random'><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_std'><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_string'><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_textwindow'><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_variable'><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_zero'><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_randomseed'><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_adler32'><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_base64'><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_core'><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_counter'><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_crc32'><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_hex'><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_identity'><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_limitsize'><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_observe'><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_otp'><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_rot'><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_spacer'><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_zlib'><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt><a name='coroutine'>Coroutine</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='coroutine'><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='coroutine_auto'><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt><a name='data_structures'>Data structures</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='counter'><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='report'><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_disjointset'><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_graph'><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_graph_op'><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_graph_v1'><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_list'><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_matrix'><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_matrix_v1'><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_pool'><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_prioqueue'><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_queue'><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_record'><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_set'><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_skiplist'><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_stack'><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_tree'><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_tree_v1'><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='treeql'><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt><a name='debugging_tracing_and_logging'>debugging, tracing, and logging</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='debug'><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='debug_caller'><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='debug_heartbeat'><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='debug_timestamp'><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt><a name='documentation_tools'>Documentation tools</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_intro'><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_lang_cmdref'><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_lang_faq'><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_lang_intro'><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_lang_syntax'><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_plugin_apiref'><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docstrip'><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docstrip_util'><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_intro'><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_lang_cmdref'><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_lang_faq'><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_lang_intro'><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_lang_syntax'><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_plugin_apiref'><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools'><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools2idx_introduction'><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools2toc_introduction'><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_changelog'><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_cvs'><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_html_cssdefaults'><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx'><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx'><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export'><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_import'><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_parse'><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_structure'><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat'><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_c'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_de'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_en'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_fr'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_c'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_de'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_en'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_fr'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_nroff_man_macros'><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_tcl_parse'><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc'><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc'><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export'><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_import'><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_parse'><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_structure'><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_intro'><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_lang_cmdref'><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_lang_faq'><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_lang_intro'><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_lang_syntax'><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_plugin_apiref'><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='dtplite'><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dtplite'><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='mpexpand'><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcldocstrip'><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tepam_doc_gen'><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_expander'><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
</table></dl>
<dl><dt><a name='file'>File</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='zipfile_decode'><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='zipfile_encode'><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='zipfile_mkzip'><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl>
<dl><dt><a name='file_formats'>File formats</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='gpx'><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='jpeg'><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='png'><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tar'><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tiff'><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt><a name='grammars_and_finite_automata'>Grammars and finite automata</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_aycock'><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_fa'><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_fa_dacceptor'><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_fa_dexec'><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_fa_op'><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu'><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu_core'><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu_gasm'><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_tcl'><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_util'><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_ast'><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_intro'><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_vm'><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_peg'><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_peg_interp'><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt><a name='hashes_checksums_and_encryption'>Hashes, checksums, and encryption</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='aes'><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='blowfish'><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cksum'><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='crc16'><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='crc32'><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='des'><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md4'><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='md5'><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md5crypt'><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='otp'><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pki'><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='rc4'><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ripemd128'><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ripemd160'><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sha1'><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sha256'><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='soundex'><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sum'><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcldes'><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcldesjr'><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uuid'><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt><a name='mathematics'>Mathematics</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math'><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_bigfloat'><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_bignum'><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_calculus'><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_calculus_romberg'><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_changepoint'><a href="tcllib/files/modules/math/changepoint.html">math::changepoint</a></td>
<td class="#doctools_tocright">Change point detection methods</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_combinatorics'><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_complexnumbers'><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_constants'><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_decimal'><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_exact'><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_filters'><a href="tcllib/files/modules/math/filtergen.html">math::filters</a></td>
<td class="#doctools_tocright">Digital filters</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_fourier'><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_fuzzy'><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_geometry'><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_interpolate'><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_linearalgebra'><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_numtheory'><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_optimize'><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_pca'><a href="tcllib/files/modules/math/pca.html">math::PCA</a></td>
<td class="#doctools_tocright">Package for Principal Component Analysis</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_polynomials'><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_probopt'><a href="tcllib/files/modules/math/probopt.html">math::probopt</a></td>
<td class="#doctools_tocright">Probabilistic optimisation methods</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_quasirandom'><a href="tcllib/files/modules/math/quasirandom.html">math::quasirandom</a></td>
<td class="#doctools_tocright">Quasi-random points for integration and Monte Carlo type methods</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_rationalfunctions'><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_roman'><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_special'><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_statistics'><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_trig'><a href="tcllib/files/modules/math/trig.html">math::trig</a></td>
<td class="#doctools_tocright">Trigonometric anf hyperbolic functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='simulation_annealing'><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='simulation_montecarlo'><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='simulation_random'><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt><a name='networking'>Networking</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='asn'><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='autoproxy'><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bee'><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='dns'><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ftp'><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ftp_geturl'><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ftpd'><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='httpd'><a href="tcllib/files/modules/httpd/httpd.html">httpd</a></td>
<td class="#doctools_tocright">A TclOO and coroutine based web server</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ident'><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='imap4'><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='irc'><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ldap'><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ldapx'><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv'><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv_auto'><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv_common'><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv_protocol'><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv_server'><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nmea'><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nns'><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nns_intro'><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nnsd'><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nnslog'><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nntp'><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ntp_time'><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='oauth'><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='picoirc'><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pop3'><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3d'><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pop3d_dbox'><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3d_udb'><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='s3'><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sasl'><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sasl_ntlm'><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sasl_scram'><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sasl_xgoogletoken'><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='smtp'><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='smtpd'><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcllib_ip'><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='udpcluster'><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uri'><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='uri_urn'><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='websocket'><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt><a name='page_parser_generator'>Page Parser Generator</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page'><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_intro'><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_pluginmgr'><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_flow'><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_norm_lemon'><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_norm_peg'><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_peg'><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_quote'><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt><a name='parsing_and_grammars'>Parsing and Grammars</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt'><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_ast'><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_cparam_configuration_critcl'><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_cparam_configuration_tea'><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_json_language'><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_param'><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_pe'><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_pe_op'><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg'><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_container'><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_container_peg'><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_export'><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_export_container'><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_export_json'><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_export_peg'><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_from_container'><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_from_json'><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_from_peg'><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_import'><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_import_container'><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_import_json'><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_import_peg'><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_interp'><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_container'><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_cparam'><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_json'><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_param'><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_peg'><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_tclparam'><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_language'><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_pegrammar'><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_pgen'><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_rde'><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_nx'><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_snit'><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_tcloo'><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_util'><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_export_api'><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_import_api'><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_introduction'><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_parse_peg'><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_parser_api'><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_op'><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt><a name='procedures_arguments_parameters_options'>Procedures, arguments, parameters, options</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tepam'><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tepam_procedure'><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt><a name='programming_tools'>Programming tools</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='clay'><a href="tcllib/files/modules/clay/clay.html">clay</a></td>
<td class="#doctools_tocright">A minimalist framework for large scale OO Projects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='cmdline'><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='comm'><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='comm_wire'><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='control'><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='deleg_method'><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='deleg_proc'><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil'><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_magic_cfront'><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_magic_cgen'><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_magic_filetype'><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_magic_rt'><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_multi'><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_multi_op'><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_traverse'><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='hook'><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='interp'><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='log'><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='logger'><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='logger_appender'><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='logger_utils'><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='multiplexer'><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pluginmgr'><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='profiler'><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='snit'><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='snitfaq'><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='stooop'><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='switched'><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tie'><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tie'><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uevent'><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='wip'><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt><a name='system'>System</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cron'><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nettool'><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='processman'><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt><a name='tcloo'>TclOO</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oometa'><a href="tcllib/files/modules/oometa/oometa.html">oometa</a></td>
<td class="#doctools_tocright">oo::meta A data registry for classess</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='practcl'><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
<tr class="#doctools_toceven" >







<td class="#doctools_tocleft" ><a name='tool'><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">TclOO Library (TOOL) Framework</td>
</tr>
</table></dl>
<dl><dt><a name='terminal_control'>Terminal control</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term'><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_code'><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_code_attr'><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_code_ctrl'><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_code_macros'><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_ctrl_unix'><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_send'><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_interact_menu'><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_interact_pager'><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_receive'><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_receive_bind'><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_send'><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt><a name='text_formatter_plugin'>Text formatter plugin</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_docidx'><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_html'><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_json'><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_nroff'><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_text'><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_wiki'><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_import_docidx'><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_import_json'><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_doctoc'><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_html'><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_json'><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_nroff'><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_text'><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_wiki'><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_import_doctoc'><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_import_json'><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
</table></dl>
<dl><dt><a name='text_processing'>Text processing</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ascii85'><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='base32'><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='base32_core'><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='base32_hex'><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='base64'><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bibtex'><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='clock_iso8601'><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='clock_rfc2822'><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing RFC 2822 dates/times</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='csv'><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='htmlparse'><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='inifile'><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='markdown'><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='mime'><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='rcs'><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='string_token'><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='string_token_shell'><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil'><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_adjust'><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_patch'><a href="tcllib/files/modules/textutil/patch.html">textutil::patch</a></td>
<td class="#doctools_tocright">Application of uni-diff patches to directory trees</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_repeat'><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_split'><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_string'><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_tabify'><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_trim'><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a name='uuencode'><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='xsxp'><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='yencode'><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt><a name='transfer_module'>Transfer module</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_connect'><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_copy'><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_copy_queue'><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_data_destination'><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_data_source'><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_receiver'><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_transmitter'><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt><a name='unfiled'>Unfiled</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cache_async'><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_paths'><a href="tcllib/files/modules/fileutil/paths.html">fileutil::paths</a></td>
<td class="#doctools_tocright">Manage search path pools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='generator'><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='huddle'><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='map_geocode_nominatim'><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='map_slippy'><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='map_slippy_cache'><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='map_slippy_fetcher'><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='mapproj'><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_calculus_symdiff'><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_machineparameters'><a href="tcllib/files/modules/math/machineparameters.html">math::machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='namespacex'><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='rest'><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='stringprep'><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='stringprep_data'><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_map'><a href="tcllib/files/modules/struct/struct_map.html">struct::map</a></td>
<td class="#doctools_tocright">Manage key/value maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uevent_onidle'><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='unicode'><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='unicode_data'><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='units'><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='yaml'><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt><a name='utilities'>Utilities</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dicttool'><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt><a name='utility'>Utility</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='defer'><a href="tcllib/files/modules/defer/defer.html">defer</a></td>
<td class="#doctools_tocright">Defered execution</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='lambda'><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='lazyset'><a href="tcllib/files/modules/lazyset/lazyset.html">lazyset</a></td>
<td class="#doctools_tocright">Lazy evaluation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='oo_util'><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oo_util'><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='throw'><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tool_dict_ensemble'><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='try'><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt><a name='validation_type_checking'>Validation, Type checking</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_common'><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_amex'><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_discover'><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_mastercard'><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_visa'><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_gs1_ean13'><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_iban'><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_imei'><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_isbn'><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_luhn'><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_luhn5'><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_usnpi'><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_verhoeff'><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl>
</dl>
</dd></dl><hr></body></html>
|


|

|




|
|
|
|

|
|
|
|


|



|


|



|



|



|



|



|



|



|


|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|


|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|



<
<
<
<
|


|
|


|
|


|
|


|
|


<
<
<
<

|



|



|



|



|



|



|



<
<
<
<
|


|
|
|
<
<
<
<


<
<
<
<
|


|
|


|
|


|
|
|

|
|
|

|
|
|

<
<
<
<

|


|



|



|



|



|



|



|



<
<
<
<
|


<
<
<
<

|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|
<
<
<
|
<
|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|

<
<
<
<
<
<
<
<

<
<
<
<

|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|

<
<
<

|
|


|
|


|
|


|


|
|


|
|


>
>
>
>
>
>
>
|
|


|


|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|

<
<
<
<

<
<
<
<

|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|

<
<
<

|
|


|
|

>
>
>

|
|


|
|


|
|


|
|


|
|


|
|


|
|


<
<
<
|
<
|

>
>
>
>

|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


>
>
>
>
|


|
|


|
|



|


|



|



|



|



|



|



|



|


|



<
<
<
<
|


|
|


>
>
>
>

|



|



|



|



|



|



<
<
<
<
|


|
|


|
|


|
|


|
|
|

|
|


|
|


|
|


|
|


|
|



|


|



|


|
|


|
|


|
|


|
|


|
|


<
<
<
<
|


|
|



|


|



|



|



|



|



|



|



|



|



|



|



|



|


|
<
|
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745




746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764




765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793




794
795
796
797
798
799




800
801




802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824




825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856




857
858
859




860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214



1215

1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290








1291




1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327



1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430




1431




1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471



1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511



1512

1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625




1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661




1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731




1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794

1795
<html><head>
<title> Table Of Contents </title>
</head>
<! -- Generated by tcllib/doctools/toc with format 'html'
   -->
<! -- Table Of Contents
   -->
<body>
<hr> [
   <a href="../../../../home">Tcllib Home</a>
| <a href="index.html">Keyword Index</a>
| <a href="toc0.html">Categories</a>
| <a href="toc1.html">Modules</a>
| <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Table Of Contents </h3>
<hr><dl><dt><h2>  </h2><dd>
<dl><dt>By Categories<dd>
<dl><dt>Argument entry form, mega widget<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
</table></dl>
<dl><dt>Benchmark tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt>CGI programming<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt>Channels<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt>Coroutine<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt>Data structures<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt>debugging, tracing, and logging<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt>Documentation tools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
</table></dl>
<dl><dt>File<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl>
<dl><dt>File formats<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>Grammars and finite automata<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt>Hashes, checksums, and encryption<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt>Mathematics<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>




</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>




</table></dl>
<dl><dt>Networking<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt>Page Parser Generator<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt>Parsing and Grammars<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt>Procedures, arguments, parameters, options<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt>Programming tools<dd>



<table class="#doctools_toc">

<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>








</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt>System<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>TclOO<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
</table></dl>
<dl><dt>Terminal control<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt>Text formatter plugin<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>




</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
</table></dl>
<dl><dt>Text processing<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >



<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>

<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt>Transfer module<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt>Unfiled<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/machineparameters.html">tclrep/machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>Utilites<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>Utility<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt>Validation, Type checking<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl></table></dl>

</dl><hr></body></html>

Changes to idoc/www/toc1.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208








209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251



252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428

429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472




473








474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537




538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567








568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671








672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911


912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936




937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
<!DOCTYPE html><html><head>
<title> Table Of Contents </title>
</head>
<!-- Generated by tcllib/doctools/toc with format 'html'
   -->
<!-- Table Of Contents
   -->
<body>
<hr> [
   <a href="../../../../home">Tcllib Home</a>
&#124; <a href="index.html">Keyword Index</a>
&#124; <a href="toc0.html">Categories</a>
&#124; <a href="toc1.html">Modules</a>
&#124; <a href="toc2.html">Applications</a>
 ] <hr>
<h3>Table Of Contents</h3>
<hr><dl><dt><h2></h2></dt><dd>
<dl><dt><a name='modules'>Modules</dt><dd>
<dl><dt><a name='aes'>aes</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='aes'><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
</table></dl>
<dl><dt><a name='amazon_s3'>amazon-s3</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='s3'><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='xsxp'><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
</table></dl>
<dl><dt><a name='asn'>asn</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='asn'><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
</table></dl>
<dl><dt><a name='base32'>base32</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='base32'><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='base32_core'><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='base32_hex'><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
</table></dl>
<dl><dt><a name='base64'>base64</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ascii85'><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='base64'><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uuencode'><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='yencode'><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>




</table></dl>
<dl><dt><a name='bee'>bee</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bee'><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt><a name='bench'>bench</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench'><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_in'><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_out_csv'><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_out_text'><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_intro'><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='bench_lang_intro'><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bench_lang_spec'><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt><a name='bibtex'>bibtex</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='bibtex'><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
</table></dl>
<dl><dt><a name='blowfish'>blowfish</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='blowfish'><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
</table></dl>
<dl><dt><a name='cache'>cache</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cache_async'><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>
</tr>
</table></dl>
<dl><dt><a name='clay'>clay</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='clay'><a href="tcllib/files/modules/clay/clay.html">clay</a></td>
<td class="#doctools_tocright">A minimalist framework for large scale OO Projects</td>
</tr>
</table></dl>
<dl><dt><a name='clock'>clock</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='clock_iso8601'><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='clock_rfc2822'><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing RFC 2822 dates/times</td>
</tr>
</table></dl>
<dl><dt><a name='cmdline'>cmdline</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cmdline'><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
</table></dl>
<dl><dt><a name='comm'>comm</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='comm'><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='comm_wire'><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
</table></dl>
<dl><dt><a name='control'>control</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='control'><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
</table></dl>
<dl><dt><a name='coroutine'>coroutine</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='coroutine'><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='coroutine_auto'><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt><a name='counter'>counter</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='counter'><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
</table></dl>
<dl><dt><a name='crc'>crc</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cksum'><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='crc16'><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >








<td class="#doctools_tocleft" ><a name='crc32'><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sum'><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
</table></dl>
<dl><dt><a name='cron'>cron</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='cron'><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt><a name='csv'>csv</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='csv'><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
</table></dl>
<dl><dt><a name='debug'>debug</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='debug'><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='debug_caller'><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='debug_heartbeat'><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='debug_timestamp'><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt><a name='defer'>defer</dt><dd>
<table class="#doctools_toc">



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='defer'><a href="tcllib/files/modules/defer/defer.html">defer</a></td>
<td class="#doctools_tocright">Defered execution</td>
</tr>
</table></dl>
<dl><dt><a name='des'>des</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='des'><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcldes'><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcldesjr'><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
</table></dl>
<dl><dt><a name='dicttool'>dicttool</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dicttool'><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt><a name='dns'>dns</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dns'><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcllib_ip'><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
</table></dl>
<dl><dt><a name='docstrip'>docstrip</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docstrip'><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docstrip_util'><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
</table></dl>
<dl><dt><a name='doctools'>doctools</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_intro'><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_lang_cmdref'><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_lang_faq'><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_lang_intro'><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='docidx_lang_syntax'><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='docidx_plugin_apiref'><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_intro'><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_lang_cmdref'><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_lang_faq'><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_lang_intro'><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctoc_lang_syntax'><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctoc_plugin_apiref'><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools'><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_changelog'><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_cvs'><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx'><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc'><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_intro'><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_lang_cmdref'><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_lang_faq'><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_lang_intro'><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_lang_syntax'><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_plugin_apiref'><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='mpexpand'><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
</table></dl>
<dl><dt><a name='doctools2base'>doctools2base</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_html_cssdefaults'><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat'><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_nroff_man_macros'><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_tcl_parse'><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
</table></dl>
<dl><dt><a name='doctools2idx'>doctools2idx</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools2idx_introduction'><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx'><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>

<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export'><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_docidx'><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_html'><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_json'><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_nroff'><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_text'><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_export_wiki'><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_import'><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_import_docidx'><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_idx_import_json'><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_idx_parse'><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>




<tr class="#doctools_tocodd"  >








<td class="#doctools_tocleft" ><a name='doctools_idx_structure'><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_c'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_de'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_en'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_idx_fr'><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
</table></dl>
<dl><dt><a name='doctools2toc'>doctools2toc</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools2toc_introduction'><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_c'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_de'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_en'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_msgcat_toc_fr'><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc'><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export'><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_doctoc'><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>
<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_html'><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_json'><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_nroff'><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>




<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_text'><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_export_wiki'><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_import'><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_import_doctoc'><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_import_json'><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='doctools_toc_parse'><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='doctools_toc_structure'><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>








</table></dl>
<dl><dt><a name='dtplite'>dtplite</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dtplite'><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
</table></dl>
<dl><dt><a name='fileutil'>fileutil</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil'><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_multi'><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_multi_op'><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_paths'><a href="tcllib/files/modules/fileutil/paths.html">fileutil::paths</a></td>
<td class="#doctools_tocright">Manage search path pools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_traverse'><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
</table></dl>
<dl><dt><a name='ftp'>ftp</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ftp'><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ftp_geturl'><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
</table></dl>
<dl><dt><a name='ftpd'>ftpd</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ftpd'><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
</table></dl>
<dl><dt><a name='fumagic'>fumagic</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_magic_cfront'><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_magic_cgen'><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='fileutil_magic_filetype'><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='fileutil_magic_rt'><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
</table></dl>
<dl><dt><a name='generator'>generator</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='generator'><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
</table></dl>
<dl><dt><a name='gpx'>gpx</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='gpx'><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
</table></dl>
<dl><dt><a name='grammar_aycock'>grammar_aycock</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_aycock'><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
</table></dl>
<dl><dt><a name='grammar_fa'>grammar_fa</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_fa'><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_fa_dacceptor'><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_fa_dexec'><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >








<td class="#doctools_tocleft" ><a name='grammar_fa_op'><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
</table></dl>
<dl><dt><a name='grammar_me'>grammar_me</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu'><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu_core'><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_cpu_gasm'><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_tcl'><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_util'><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_ast'><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_me_intro'><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_me_vm'><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
</table></dl>
<dl><dt><a name='grammar_peg'>grammar_peg</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='grammar_peg'><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='grammar_peg_interp'><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt><a name='hook'>hook</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='hook'><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>
</table></dl>
<dl><dt><a name='html'>html</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='html'><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
</table></dl>
<dl><dt><a name='htmlparse'>htmlparse</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='htmlparse'><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
</table></dl>
<dl><dt><a name='http'>http</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='autoproxy'><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
</table></dl>
<dl><dt><a name='httpd'>httpd</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='httpd'><a href="tcllib/files/modules/httpd/httpd.html">httpd</a></td>
<td class="#doctools_tocright">A TclOO and coroutine based web server</td>
</tr>
</table></dl>
<dl><dt><a name='ident'>ident</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ident'><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
</table></dl>
<dl><dt><a name='imap4'>imap4</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='imap4'><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
</table></dl>
<dl><dt><a name='inifile'>inifile</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='inifile'><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
</table></dl>
<dl><dt><a name='interp'>interp</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='deleg_method'><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='deleg_proc'><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='interp'><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
</table></dl>
<dl><dt><a name='irc'>irc</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='irc'><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='picoirc'><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
</table></dl>
<dl><dt><a name='javascript'>javascript</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='javascript'><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
</table></dl>
<dl><dt><a name='jpeg'>jpeg</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='jpeg'><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt><a name='json'>json</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='json'><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='json_write'><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>
</tr>
</table></dl>
<dl><dt><a name='lambda'>lambda</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='lambda'><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
</table></dl>
<dl><dt><a name='lazyset'>lazyset</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='lazyset'><a href="tcllib/files/modules/lazyset/lazyset.html">lazyset</a></td>
<td class="#doctools_tocright">Lazy evaluation</td>
</tr>
</table></dl>
<dl><dt><a name='ldap'>ldap</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ldap'><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ldapx'><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
</table></dl>
<dl><dt><a name='log'>log</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='log'><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='logger'><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='logger_appender'><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='logger_utils'><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
</table></dl>
<dl><dt><a name='map'>map</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='map_geocode_nominatim'><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='map_slippy'><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='map_slippy_cache'><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='map_slippy_fetcher'><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
</table></dl>
<dl><dt><a name='mapproj'>mapproj</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='mapproj'><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
</table></dl>
<dl><dt><a name='markdown'>markdown</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='markdown'><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
</table></dl>
<dl><dt><a name='math'>math</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math'><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>


<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_bigfloat'><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_bignum'><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_calculus'><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_calculus_romberg'><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_calculus_symdiff'><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_changepoint'><a href="tcllib/files/modules/math/changepoint.html">math::changepoint</a></td>
<td class="#doctools_tocright">Change point detection methods</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a name='math_combinatorics'><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_complexnumbers'><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_constants'><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_decimal'><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_exact'><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_filters'><a href="tcllib/files/modules/math/filtergen.html">math::filters</a></td>
<td class="#doctools_tocright">Digital filters</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_fourier'><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_fuzzy'><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_geometry'><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_interpolate'><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_linearalgebra'><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_machineparameters'><a href="tcllib/files/modules/math/machineparameters.html">math::machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_numtheory'><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_optimize'><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_pca'><a href="tcllib/files/modules/math/pca.html">math::PCA</a></td>
<td class="#doctools_tocright">Package for Principal Component Analysis</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_polynomials'><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_probopt'><a href="tcllib/files/modules/math/probopt.html">math::probopt</a></td>
<td class="#doctools_tocright">Probabilistic optimisation methods</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_quasirandom'><a href="tcllib/files/modules/math/quasirandom.html">math::quasirandom</a></td>
<td class="#doctools_tocright">Quasi-random points for integration and Monte Carlo type methods</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_rationalfunctions'><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_roman'><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_special'><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='math_statistics'><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='math_trig'><a href="tcllib/files/modules/math/trig.html">math::trig</a></td>
<td class="#doctools_tocright">Trigonometric anf hyperbolic functions</td>
</tr>
</table></dl>
<dl><dt><a name='md4'>md4</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md4'><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt><a name='md5'>md5</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md5'><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt><a name='md5crypt'>md5crypt</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='md5crypt'><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
</table></dl>
<dl><dt><a name='mime'>mime</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='mime'><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='smtp'><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
</table></dl>
<dl><dt><a name='multiplexer'>multiplexer</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='multiplexer'><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
</table></dl>
<dl><dt><a name='namespacex'>namespacex</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='namespacex'><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
</table></dl>
<dl><dt><a name='ncgi'>ncgi</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ncgi'><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt><a name='nettool'>nettool</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nettool'><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
</table></dl>
<dl><dt><a name='nmea'>nmea</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nmea'><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
</table></dl>
<dl><dt><a name='nns'>nns</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv'><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv_auto'><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv_common'><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nameserv_protocol'><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nameserv_server'><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nns_intro'><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
</table></dl>
<dl><dt><a name='nntp'>nntp</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nntp'><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
</table></dl>
<dl><dt><a name='ntp'>ntp</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ntp_time'><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
</table></dl>
<dl><dt><a name='oauth'>oauth</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oauth'><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
</table></dl>
<dl><dt><a name='oometa'>oometa</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oometa'><a href="tcllib/files/modules/oometa/oometa.html">oometa</a></td>
<td class="#doctools_tocright">oo::meta A data registry for classess</td>
</tr>
</table></dl>
<dl><dt><a name='ooutil'>ooutil</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oo_util'><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
</table></dl>
<dl><dt><a name='otp'>otp</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='otp'><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
</table></dl>
<dl><dt><a name='page'>page</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_intro'><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_pluginmgr'><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_flow'><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_norm_lemon'><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_norm_peg'><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='page_util_peg'><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page_util_quote'><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt><a name='pki'>pki</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pki'><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
</table></dl>
<dl><dt><a name='pluginmgr'>pluginmgr</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pluginmgr'><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
</table></dl>
<dl><dt><a name='png'>png</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='png'><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt><a name='pop3'>pop3</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3'><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
</table></dl>
<dl><dt><a name='pop3d'>pop3d</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3d'><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pop3d_dbox'><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pop3d_udb'><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
</table></dl>
<dl><dt><a name='practcl'>practcl</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='practcl'><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
</table></dl>
<dl><dt><a name='processman'>processman</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='processman'><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt><a name='profiler'>profiler</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='profiler'><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
</table></dl>
<dl><dt><a name='pt'>pt</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_ast'><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_cparam_configuration_critcl'><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_cparam_configuration_tea'><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_json_language'><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_param'><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_pe'><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_pe_op'><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg'><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_container'><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_container_peg'><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_export'><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_export_container'><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_export_json'><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_export_peg'><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_from_container'><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_from_json'><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_from_peg'><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_import'><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_import_container'><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_import_json'><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_import_peg'><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_interp'><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_container'><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_cparam'><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_json'><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_param'><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_to_peg'><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_to_tclparam'><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_peg_language'><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_pegrammar'><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_pgen'><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_rde'><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_nx'><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_snit'><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_tclparam_configuration_tcloo'><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_util'><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_export_api'><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_import_api'><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_introduction'><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_parse_peg'><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='pt_parser_api'><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt_peg_op'><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt><a name='rc4'>rc4</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='rc4'><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
</table></dl>
<dl><dt><a name='rcs'>rcs</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='rcs'><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
</table></dl>
<dl><dt><a name='report'>report</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='report'><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
</table></dl>
<dl><dt><a name='rest'>rest</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='rest'><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
</table></dl>
<dl><dt><a name='ripemd'>ripemd</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='ripemd128'><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='ripemd160'><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt><a name='sasl'>sasl</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sasl'><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sasl_ntlm'><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sasl_scram'><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sasl_xgoogletoken'><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
</table></dl>
<dl><dt><a name='sha1'>sha1</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='sha1'><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='sha256'><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt><a name='simulation'>simulation</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='simulation_annealing'><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='simulation_montecarlo'><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='simulation_random'><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt><a name='smtpd'>smtpd</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='smtpd'><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
</table></dl>
<dl><dt><a name='snit'>snit</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='snit'><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='snitfaq'><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
</table></dl>
<dl><dt><a name='soundex'>soundex</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='soundex'><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
</table></dl>
<dl><dt><a name='stooop'>stooop</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='stooop'><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='switched'><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
</table></dl>
<dl><dt><a name='string'>string</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='string_token'><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='string_token_shell'><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
</table></dl>
<dl><dt><a name='stringprep'>stringprep</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='stringprep'><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='stringprep_data'><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='unicode'><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='unicode_data'><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
</table></dl>
<dl><dt><a name='struct'>struct</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_disjointset'><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_graph'><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_graph_op'><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_graph_v1'><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_list'><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_map'><a href="tcllib/files/modules/struct/struct_map.html">struct::map</a></td>
<td class="#doctools_tocright">Manage key/value maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_matrix'><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_matrix_v1'><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_pool'><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_prioqueue'><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_queue'><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_record'><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_set'><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_skiplist'><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_stack'><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='struct_tree'><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='struct_tree_v1'><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
</table></dl>
<dl><dt><a name='tar'>tar</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tar'><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
</table></dl>
<dl><dt><a name='tepam'>tepam</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tepam'><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tepam_argument_dialogbox'><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tepam_doc_gen'><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tepam_procedure'><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt><a name='term'>term</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term'><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_code'><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_code_attr'><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_code_ctrl'><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_code_macros'><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_ansi_ctrl_unix'><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_ansi_send'><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_interact_menu'><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_interact_pager'><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_receive'><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='term_receive_bind'><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='term_send'><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt><a name='textutil'>textutil</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil'><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_adjust'><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_expander'><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_patch'><a href="tcllib/files/modules/textutil/patch.html">textutil::patch</a></td>
<td class="#doctools_tocright">Application of uni-diff patches to directory trees</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_repeat'><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_split'><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_string'><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='textutil_tabify'><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='textutil_trim'><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
</table></dl>
<dl><dt><a name='tie'>tie</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tie'><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tie'><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
</table></dl>
<dl><dt><a name='tiff'>tiff</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tiff'><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt><a name='tool'>tool</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='oo_util'><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tool'><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">TclOO Library (TOOL) Framework</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tool_dict_ensemble'><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt><a name='transfer'>transfer</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_connect'><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_copy'><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_copy_queue'><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_data_destination'><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_data_source'><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='transfer_receiver'><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='transfer_transmitter'><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt><a name='treeql'>treeql</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='treeql'><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt><a name='try'>try</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='throw'><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='try'><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt><a name='udpcluster'>udpcluster</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='udpcluster'><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
</table></dl>
<dl><dt><a name='uev'>uev</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uevent'><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='uevent_onidle'><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
</table></dl>
<dl><dt><a name='units'>units</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='units'><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
</table></dl>
<dl><dt><a name='uri'>uri</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uri'><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='uri_urn'><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
</table></dl>
<dl><dt><a name='uuid'>uuid</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='uuid'><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt><a name='valtype'>valtype</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_common'><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_amex'><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_discover'><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_mastercard'><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_creditcard_visa'><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_gs1_ean13'><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_iban'><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_imei'><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_isbn'><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_luhn'><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_luhn5'><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='valtype_usnpi'><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='valtype_verhoeff'><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl>
<dl><dt><a name='virtchannel_base'>virtchannel_base</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_cat'><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_facade'><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_fifo'><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_fifo2'><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_halfpipe'><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_memchan'><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_null'><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_nullzero'><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_random'><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_std'><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_string'><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_textwindow'><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_variable'><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_zero'><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_randomseed'><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
</table></dl>
<dl><dt><a name='virtchannel_core'>virtchannel_core</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_chan_core'><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_chan_events'><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_core'><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
</table></dl>
<dl><dt><a name='virtchannel_transform'>virtchannel_transform</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_adler32'><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_base64'><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_counter'><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_crc32'><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_hex'><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_identity'><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_limitsize'><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_observe'><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_otp'><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_rot'><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcl_transform_spacer'><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='tcl_transform_zlib'><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt><a name='websocket'>websocket</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='websocket'><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt><a name='wip'>wip</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='wip'><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt><a name='yaml'>yaml</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='huddle'><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='yaml'><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt><a name='zip'>zip</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='zipfile_decode'><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='zipfile_encode'><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='zipfile_mkzip'><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl>
</dl>
</dd></dl><hr></body></html>
|


|

|




|
|
|
|

|
|
|
|


|



|


|



|



|


|



|


|



|



|



|


|



|



|

<
<
<
<

>
>
>
>

|


|



|


|



|



|



|



|



|



|



|


|



|


|



|


|

<
<
<
<
<
<
<


|


|



|
|


|


|



|


|



|



|


|



|


|



|



|


|



|

<
<
<
<
<
<
<
<

>
>
>
>
>
>
>
>
|



|



|


|



|


|



|

<
<
<
<
<
<
<
<

|
|


|
|

<
<
|
>
>
>
|
|
|


|


|



|



|



|


|



|


|



|



|


|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


<
<
<
<
<
<
<
<
<
<
<

|
|

>
>
>

|
|


|
|

<
<
<

|
|


|
|

>
|
<
|
<
|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

|
|
|

>
>
>
>

>
>
>
>
>
>
>
>
|



|



|



|



|



|


|



|



|

<
<
<
<
<
<
<
<


|
|


|
|


|
|


|
|


|
<
<
<
<
>
>
>
>
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|

>
>
>
>
>
>
>
>

|


|



|


|



|



|



<
<
<
<
|



|


|



|



|


|



|


|



|



|



|



|


|



|


|



|


|



|


|

<
<
<
<
<
<
<
<


>
>
>
>
>
>
>
>
|



|


|



|



|



|



|



|



|



|



|


|



|



|


|


<
<
<
<
<
<
<

|


|
|


|


|
|


|


|
|


|


|



|


|



|


|



|


|



|



|



|


|



|



|


|



|


|



|


|



|

<
<
<
<
<
<
<


|


|
|


|


|



|



|


|



|



|



|



|


|



|



|



|



|
<
<
<
<
<
<
<


|
|


|


|
|

>
>
|
<
<
<

|
|


|
|


|
|


|
|


|
|


>
>
>
>
|


|
|


|
|


|
|


|
|


<
<
<
<

|



|



|



|



|



<
<
<
<
|


|
|


<
<
<
<

|



<
<
<
<
<
<
<
<
|



|



|



|



|
|


|


|



|


|



|


|



|


|



|



|


|



|


|



|


|



|


|



|


|



|


|



|



|



|



|



|



|


|



|


|



|


|



|


<
<
<
<
<
<
<
|



|


|



|


|



|



|



|



|



|



|



|


|



|


|



|


|



|


|



|


|



|



|



|


|



|


|



|


|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|


|



|


|



|


|



|


|



|



|


|



|



|



|



|


|



|



|


|



|



|



|


|



|


|



|



|


|



|


|



|



|


|



|



|


|



|



|



|



|


|



|



|



|



|



<
<
<
<
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|


|
|



|


|



|


|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



<
<
<
<
|


|
|


|
|


|
|


|
|



|


|



|



|


|



|


|



|
|


|



|


|



|



|



|



|



|



|



|


|



|


|



|



|


|



|


|



|



|


|



|


|



|



|


|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|



|



|



|


|



|



|



|


|



|



|



|



|



|



|



|



|



|



|



|



|


|



|


|



|


|



|



|


|



|



|


|
<
|
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192








193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225








226
227
228
229
230
231
232
233


234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380











381
382
383
384
385
386
387
388
389
390
391
392
393
394
395



396
397
398
399
400
401
402
403
404
405

406

407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492








493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511




512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576




577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643








644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709







710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801







802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860







861
862
863
864
865
866
867
868
869
870
871
872
873
874
875



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919




920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940




941
942
943
944
945
946
947




948
949
950
951
952








953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090







1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540




1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676




1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045

2046
<html><head>
<title> Table Of Contents </title>
</head>
<! -- Generated by tcllib/doctools/toc with format 'html'
   -->
<! -- Table Of Contents
   -->
<body>
<hr> [
   <a href="../../../../home">Tcllib Home</a>
| <a href="index.html">Keyword Index</a>
| <a href="toc0.html">Categories</a>
| <a href="toc1.html">Modules</a>
| <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Table Of Contents </h3>
<hr><dl><dt><h2>  </h2><dd>
<dl><dt>Modules<dd>
<dl><dt>aes<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/aes/aes.html">aes</a></td>
<td class="#doctools_tocright">Implementation of the AES block cipher</td>
</tr>
</table></dl>
<dl><dt>amazon-s3<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/S3.html">S3</a></td>
<td class="#doctools_tocright">Amazon S3 Web Service Interface</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/amazon-s3/xsxp.html">xsxp</a></td>
<td class="#doctools_tocright">eXtremely Simple Xml Parser</td>
</tr>
</table></dl>
<dl><dt>asn<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/asn/asn.html">asn</a></td>
<td class="#doctools_tocright">ASN.1 BER encoder/decoder</td>
</tr>
</table></dl>
<dl><dt>base32<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32.html">base32</a></td>
<td class="#doctools_tocright">base32 standard encoding</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32core.html">base32::core</a></td>
<td class="#doctools_tocright">Expanding basic base32 maps</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base32/base32hex.html">base32::hex</a></td>
<td class="#doctools_tocright">base32 extended hex encoding</td>
</tr>
</table></dl>
<dl><dt>base64<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/ascii85.html">ascii85</a></td>
<td class="#doctools_tocright">ascii85-encode/decode binary data</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/base64.html">base64</a></td>
<td class="#doctools_tocright">base64-encode/decode binary data</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/uuencode.html">uuencode</a></td>
<td class="#doctools_tocright">UU-encode/decode binary data</td>




</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/base64/yencode.html">yencode</a></td>
<td class="#doctools_tocright">Y-encode/decode binary data</td>
</tr>
</table></dl>
<dl><dt>bee<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bee/bee.html">bee</a></td>
<td class="#doctools_tocright">BitTorrent Serialization Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>bench<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench.html">bench</a></td>
<td class="#doctools_tocright">bench - Processing benchmark suites</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_read.html">bench::in</a></td>
<td class="#doctools_tocright">bench::in - Reading benchmark results</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wcsv.html">bench::out::csv</a></td>
<td class="#doctools_tocright">bench::out::csv - Formatting benchmark results as CSV</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_wtext.html">bench::out::text</a></td>
<td class="#doctools_tocright">bench::out::text - Formatting benchmark results as human readable text</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_intro.html">bench_intro</a></td>
<td class="#doctools_tocright">bench introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_intro.html">bench_lang_intro</a></td>
<td class="#doctools_tocright">bench language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bench/bench_lang_spec.html">bench_lang_spec</a></td>
<td class="#doctools_tocright">bench language specification</td>
</tr>
</table></dl>
<dl><dt>bibtex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/bibtex/bibtex.html">bibtex</a></td>
<td class="#doctools_tocright">Parse bibtex files</td>
</tr>
</table></dl>
<dl><dt>blowfish<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/blowfish/blowfish.html">blowfish</a></td>
<td class="#doctools_tocright">Implementation of the Blowfish block cipher</td>
</tr>
</table></dl>
<dl><dt>cache<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cache/async.html">cache::async</a></td>
<td class="#doctools_tocright">Asynchronous in-memory cache</td>







</tr>
</table></dl>
<dl><dt>clock<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/iso8601.html">clock_iso8601</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/clock/rfc2822.html">clock_rfc2822</a></td>
<td class="#doctools_tocright">Parsing ISO 8601 dates/times</td>
</tr>
</table></dl>
<dl><dt>cmdline<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cmdline/cmdline.html">cmdline</a></td>
<td class="#doctools_tocright">Procedures to process command lines and options.</td>
</tr>
</table></dl>
<dl><dt>comm<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm.html">comm</a></td>
<td class="#doctools_tocright">A remote communication facility for Tcl (8.3 and later)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/comm/comm_wire.html">comm_wire</a></td>
<td class="#doctools_tocright">The comm wire protocol</td>
</tr>
</table></dl>
<dl><dt>control<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/control/control.html">control</a></td>
<td class="#doctools_tocright">Procedures for control flow structures.</td>
</tr>
</table></dl>
<dl><dt>coroutine<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/tcllib_coroutine.html">coroutine</a></td>
<td class="#doctools_tocright">Coroutine based event and IO handling</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/coroutine/coro_auto.html">coroutine::auto</a></td>
<td class="#doctools_tocright">Automatic event and IO coroutine awareness</td>
</tr>
</table></dl>
<dl><dt>counter<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/counter/counter.html">counter</a></td>
<td class="#doctools_tocright">Procedures for counters and histograms</td>
</tr>
</table></dl>
<dl><dt>crc<dd>
<table class="#doctools_toc">








<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/cksum.html">cksum</a></td>
<td class="#doctools_tocright">Calculate a cksum(1) compatible checksum</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc16.html">crc16</a></td>
<td class="#doctools_tocright">Perform a 16bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/crc32.html">crc32</a></td>
<td class="#doctools_tocright">Perform a 32bit Cyclic Redundancy Check</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/crc/sum.html">sum</a></td>
<td class="#doctools_tocright">Calculate a sum(1) compatible checksum</td>
</tr>
</table></dl>
<dl><dt>cron<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/cron/cron.html">cron</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>csv<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/csv/csv.html">csv</a></td>
<td class="#doctools_tocright">Procedures to handle CSV data.</td>
</tr>
</table></dl>
<dl><dt>debug<dd>
<table class="#doctools_toc">








<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug.html">debug</a></td>
<td class="#doctools_tocright">debug narrative - core</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_caller.html">debug::caller</a></td>
<td class="#doctools_tocright">debug narrative - caller</td>
</tr>


<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_heartbeat.html">debug::heartbeat</a></td>
<td class="#doctools_tocright">debug narrative - heartbeat</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/debug/debug_timestamp.html">debug::timestamp</a></td>
<td class="#doctools_tocright">debug narrative - timestamping</td>
</tr>
</table></dl>
<dl><dt>des<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/des.html">des</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldes.html">tclDES</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/des/tcldesjr.html">tclDESjr</a></td>
<td class="#doctools_tocright">Implementation of the DES and triple-DES ciphers</td>
</tr>
</table></dl>
<dl><dt>dicttool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dicttool/dicttool.html">dicttool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>dns<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_dns.html">dns</a></td>
<td class="#doctools_tocright">Tcl Domain Name Service Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dns/tcllib_ip.html">tcllib_ip</a></td>
<td class="#doctools_tocright">IPv4 and IPv6 address manipulation</td>
</tr>
</table></dl>
<dl><dt>docstrip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip.html">docstrip</a></td>
<td class="#doctools_tocright">Docstrip style source code extraction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/docstrip/docstrip_util.html">docstrip_util</a></td>
<td class="#doctools_tocright">Docstrip-related utilities</td>
</tr>
</table></dl>
<dl><dt>doctools<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_intro.html">docidx_intro</a></td>
<td class="#doctools_tocright">docidx introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_cmdref.html">docidx_lang_cmdref</a></td>
<td class="#doctools_tocright">docidx language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_faq.html">docidx_lang_faq</a></td>
<td class="#doctools_tocright">docidx language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_intro.html">docidx_lang_intro</a></td>
<td class="#doctools_tocright">docidx language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_lang_syntax.html">docidx_lang_syntax</a></td>
<td class="#doctools_tocright">docidx language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx_plugin_apiref.html">docidx_plugin_apiref</a></td>
<td class="#doctools_tocright">docidx plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_intro.html">doctoc_intro</a></td>
<td class="#doctools_tocright">doctoc introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_cmdref.html">doctoc_lang_cmdref</a></td>
<td class="#doctools_tocright">doctoc language command reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_faq.html">doctoc_lang_faq</a></td>
<td class="#doctools_tocright">doctoc language faq</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_intro.html">doctoc_lang_intro</a></td>
<td class="#doctools_tocright">doctoc language introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_lang_syntax.html">doctoc_lang_syntax</a></td>
<td class="#doctools_tocright">doctoc language syntax</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc_plugin_apiref.html">doctoc_plugin_apiref</a></td>
<td class="#doctools_tocright">doctoc plugin API reference</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools.html">doctools</a></td>
<td class="#doctools_tocright">doctools - Processing documents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/changelog.html">doctools::changelog</a></td>
<td class="#doctools_tocright">Processing text in Emacs ChangeLog format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/cvs.html">doctools::cvs</a></td>
<td class="#doctools_tocright">Processing text in 'cvs log' format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/docidx.html">doctools::idx</a></td>
<td class="#doctools_tocright">docidx - Processing indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctoc.html">doctools::toc</a></td>
<td class="#doctools_tocright">doctoc - Processing tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_intro.html">doctools_intro</a></td>
<td class="#doctools_tocright">doctools introduction</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_cmdref.html">doctools_lang_cmdref</a></td>
<td class="#doctools_tocright">doctools language command reference</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_faq.html">doctools_lang_faq</a></td>
<td class="#doctools_tocright">doctools language faq</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_intro.html">doctools_lang_intro</a></td>
<td class="#doctools_tocright">doctools language introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_lang_syntax.html">doctools_lang_syntax</a></td>
<td class="#doctools_tocright">doctools language syntax</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/doctools_plugin_apiref.html">doctools_plugin_apiref</a></td>
<td class="#doctools_tocright">doctools plugin API reference</td>
</tr>











<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools/mpexpand.html">mpexpand</a></td>
<td class="#doctools_tocright">Markup processor</td>
</tr>
</table></dl>
<dl><dt>doctools2base<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/html_cssdefaults.html">doctools::html::cssdefaults</a></td>
<td class="#doctools_tocright">Default CSS style for HTML export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcllib_msgcat.html">doctools::msgcat</a></td>
<td class="#doctools_tocright">Message catalog management for the various document parsers</td>
</tr>



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/nroff_manmacros.html">doctools::nroff::man_macros</a></td>
<td class="#doctools_tocright">Default CSS style for NROFF export plugins</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2base/tcl_parse.html">doctools::tcl::parse</a></td>
<td class="#doctools_tocright">Processing text in 'subst -novariables' format</td>
</tr>
</table></dl>
<dl><dt>doctools2idx<dd>

<table class="#doctools_toc">

<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_introduction.html">doctools2idx_introduction</a></td>
<td class="#doctools_tocright">DocTools - Keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_container.html">doctools::idx</a></td>
<td class="#doctools_tocright">Holding keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export.html">doctools::idx::export</a></td>
<td class="#doctools_tocright">Exporting keyword indices</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/export_docidx.html">doctools::idx::export::docidx</a></td>
<td class="#doctools_tocright">docidx export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_html.html">doctools::idx::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_json.html">doctools::idx::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_nroff.html">doctools::idx::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_text.html">doctools::idx::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_export_wiki.html">doctools::idx::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import.html">doctools::idx::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/import_docidx.html">doctools::idx::import::docidx</a></td>
<td class="#doctools_tocright">docidx import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_import_json.html">doctools::idx::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_parse.html">doctools::idx::parse</a></td>
<td class="#doctools_tocright">Parsing text in docidx format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_structure.html">doctools::idx::structure</a></td>
<td class="#doctools_tocright">Docidx serialization utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_c.html">doctools::msgcat::idx::c</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (C)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_de.html">doctools::msgcat::idx::de</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (DE)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_en.html">doctools::msgcat::idx::en</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (EN)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2idx/idx_msgcat_fr.html">doctools::msgcat::idx::fr</a></td>
<td class="#doctools_tocright">Message catalog for the docidx parser (FR)</td>
</tr>
</table></dl>
<dl><dt>doctools2toc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_introduction.html">doctools2toc_introduction</a></td>
<td class="#doctools_tocright">DocTools - Tables of Contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_c.html">doctools::msgcat::toc::c</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (C)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_de.html">doctools::msgcat::toc::de</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (DE)</td>








</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_en.html">doctools::msgcat::toc::en</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (EN)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_msgcat_fr.html">doctools::msgcat::toc::fr</a></td>
<td class="#doctools_tocright">Message catalog for the doctoc parser (FR)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_container.html">doctools::toc</a></td>
<td class="#doctools_tocright">Holding tables of contents</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export.html">doctools::toc::export</a></td>
<td class="#doctools_tocright">Exporting tables of contents</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/export_doctoc.html">doctools::toc::export::doctoc</a></td>




<td class="#doctools_tocright">doctoc export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_html.html">doctools::toc::export::html</a></td>
<td class="#doctools_tocright">HTML export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_json.html">doctools::toc::export::json</a></td>
<td class="#doctools_tocright">JSON export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_nroff.html">doctools::toc::export::nroff</a></td>
<td class="#doctools_tocright">nroff export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_text.html">doctools::toc::export::text</a></td>
<td class="#doctools_tocright">plain text export plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_export_wiki.html">doctools::toc::export::wiki</a></td>
<td class="#doctools_tocright">wiki export plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import.html">doctools::toc::import</a></td>
<td class="#doctools_tocright">Importing keyword indices</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/import_doctoc.html">doctools::toc::import::doctoc</a></td>
<td class="#doctools_tocright">doctoc import plugin</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_import_json.html">doctools::toc::import::json</a></td>
<td class="#doctools_tocright">JSON import plugin</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_parse.html">doctools::toc::parse</a></td>
<td class="#doctools_tocright">Parsing text in doctoc format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/doctools2toc/toc_structure.html">doctools::toc::structure</a></td>
<td class="#doctools_tocright">Doctoc serialization utilities</td>
</tr>
</table></dl>
<dl><dt>dtplite<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/dtplite/pkg_dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
</table></dl>
<dl><dt>fileutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/fileutil.html">fileutil</a></td>
<td class="#doctools_tocright">Procedures implementing some file utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multi.html">fileutil::multi</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather, standard object</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/multiop.html">fileutil::multi::op</a></td>
<td class="#doctools_tocright">Multi-file operation, scatter/gather</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fileutil/traverse.html">fileutil_traverse</a></td>
<td class="#doctools_tocright">Iterative directory traversal</td>
</tr>
</table></dl>
<dl><dt>ftp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp.html">ftp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the ftp protocol</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftp/ftp_geturl.html">ftp::geturl</a></td>
<td class="#doctools_tocright">Uri handler for ftp urls</td>
</tr>
</table></dl>
<dl><dt>ftpd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ftpd/ftpd.html">ftpd</a></td>
<td class="#doctools_tocright">Tcl FTP server implementation</td>
</tr>
</table></dl>
<dl><dt>fumagic<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cfront.html">fileutil::magic::cfront</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/cgen.html">fileutil::magic::cgen</a></td>
<td class="#doctools_tocright">Generator core for compiler of magic(5) files</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/filetypes.html">fileutil::magic::filetype</a></td>
<td class="#doctools_tocright">Procedures implementing file-type recognition</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/fumagic/rtcore.html">fileutil::magic::rt</a></td>
<td class="#doctools_tocright">Runtime core for file type recognition engines written in pure Tcl</td>
</tr>
</table></dl>
<dl><dt>generator<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/generator/generator.html">generator</a></td>
<td class="#doctools_tocright">Procedures for creating and using generators.</td>
</tr>
</table></dl>
<dl><dt>gpx<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/gpx/gpx.html">gpx</a></td>
<td class="#doctools_tocright">Extracts waypoints, tracks and routes from GPX files</td>
</tr>
</table></dl>
<dl><dt>grammar_aycock<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_aycock/aycock.html">grammar::aycock</a></td>
<td class="#doctools_tocright">Aycock-Horspool-Earley parser generator for Tcl</td>
</tr>
</table></dl>
<dl><dt>grammar_fa<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/fa.html">grammar::fa</a></td>
<td class="#doctools_tocright">Create and manipulate finite automatons</td>








</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dacceptor.html">grammar::fa::dacceptor</a></td>
<td class="#doctools_tocright">Create and use deterministic acceptors</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/dexec.html">grammar::fa::dexec</a></td>
<td class="#doctools_tocright">Execute deterministic finite automatons</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_fa/faop.html">grammar::fa::op</a></td>
<td class="#doctools_tocright">Operations on finite automatons</td>
</tr>
</table></dl>
<dl><dt>grammar_me<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpu.html">grammar::me::cpu</a></td>
<td class="#doctools_tocright">Virtual machine implementation II for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_cpucore.html">grammar::me::cpu::core</a></td>
<td class="#doctools_tocright">ME virtual machine state manipulation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/gasm.html">grammar::me::cpu::gasm</a></td>
<td class="#doctools_tocright">ME assembler</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_tcl.html">grammar::me::tcl</a></td>
<td class="#doctools_tocright">Virtual machine implementation I for parsing token streams</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_util.html">grammar::me::util</a></td>
<td class="#doctools_tocright">AST utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_ast.html">grammar::me_ast</a></td>
<td class="#doctools_tocright">Various representations of ASTs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_intro.html">grammar::me_intro</a></td>
<td class="#doctools_tocright">Introduction to virtual machines for parsing token streams</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_me/me_vm.html">grammar::me_vm</a></td>
<td class="#doctools_tocright">Virtual machine for parsing token streams</td>
</tr>
</table></dl>
<dl><dt>grammar_peg<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg.html">grammar::peg</a></td>
<td class="#doctools_tocright">Create and manipulate parsing expression grammars</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/grammar_peg/peg_interp.html">grammar::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
</table></dl>
<dl><dt>hook<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/hook/hook.html">hook</a></td>
<td class="#doctools_tocright">Hooks</td>
</tr>







</table></dl>
<dl><dt>html<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/html/html.html">html</a></td>
<td class="#doctools_tocright">Procedures to generate HTML structures</td>
</tr>
</table></dl>
<dl><dt>htmlparse<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/htmlparse/htmlparse.html">htmlparse</a></td>
<td class="#doctools_tocright">Procedures to parse HTML strings</td>
</tr>
</table></dl>
<dl><dt>http<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/http/autoproxy.html">autoproxy</a></td>
<td class="#doctools_tocright">Automatic HTTP proxy usage and authentication</td>
</tr>
</table></dl>
<dl><dt>ident<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ident/ident.html">ident</a></td>
<td class="#doctools_tocright">Ident protocol client</td>
</tr>
</table></dl>
<dl><dt>imap4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/imap4/imap4.html">imap4</a></td>
<td class="#doctools_tocright">imap client-side tcl implementation of imap protocol</td>
</tr>
</table></dl>
<dl><dt>inifile<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/inifile/ini.html">inifile</a></td>
<td class="#doctools_tocright">Parsing of Windows INI files</td>
</tr>
</table></dl>
<dl><dt>interp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_method.html">deleg_method</a></td>
<td class="#doctools_tocright">Creation of comm delegates (snit methods)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/deleg_proc.html">deleg_proc</a></td>
<td class="#doctools_tocright">Creation of comm delegates (procedures)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/interp/tcllib_interp.html">interp</a></td>
<td class="#doctools_tocright">Interp creation and aliasing</td>
</tr>
</table></dl>
<dl><dt>irc<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/irc.html">irc</a></td>
<td class="#doctools_tocright">Create IRC connection and interface.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/irc/picoirc.html">picoirc</a></td>
<td class="#doctools_tocright">Small and simple embeddable IRC client.</td>
</tr>
</table></dl>
<dl><dt>javascript<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/javascript/javascript.html">javascript</a></td>
<td class="#doctools_tocright">Procedures to generate HTML and Java Script structures.</td>
</tr>
</table></dl>
<dl><dt>jpeg<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/jpeg/jpeg.html">jpeg</a></td>
<td class="#doctools_tocright">JPEG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>json<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json.html">json</a></td>
<td class="#doctools_tocright">JSON parser</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/json/json_write.html">json::write</a></td>
<td class="#doctools_tocright">JSON generation</td>







</tr>
</table></dl>
<dl><dt>lambda<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/lambda/lambda.html">lambda</a></td>
<td class="#doctools_tocright">Utility commands for anonymous procedures</td>
</tr>
</table></dl>
<dl><dt>ldap<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldap.html">ldap</a></td>
<td class="#doctools_tocright">LDAP client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ldap/ldapx.html">ldapx</a></td>
<td class="#doctools_tocright">LDAP extended object interface</td>
</tr>
</table></dl>
<dl><dt>log<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/log.html">log</a></td>
<td class="#doctools_tocright">Procedures to log messages of libraries and applications.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/logger.html">logger</a></td>
<td class="#doctools_tocright">System to control logging of events.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerAppender.html">logger::appender</a></td>
<td class="#doctools_tocright">Collection of predefined appenders for logger</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/log/loggerUtils.html">logger::utils</a></td>
<td class="#doctools_tocright">Utilities for logger</td>
</tr>
</table></dl>
<dl><dt>map<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_geocode_nominatim.html">map::geocode::nominatim</a></td>
<td class="#doctools_tocright">Resolving geographical names with a Nominatim service</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy.html">map::slippy</a></td>
<td class="#doctools_tocright">Common code for slippy based map packages</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_cache.html">map::slippy::cache</a></td>
<td class="#doctools_tocright">Management of a tile cache in the local filesystem</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/map/map_slippy_fetcher.html">map::slippy::fetcher</a></td>
<td class="#doctools_tocright">Accessing a server providing tiles for slippy-based maps</td>
</tr>
</table></dl>
<dl><dt>mapproj<dd>







<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mapproj/mapproj.html">mapproj</a></td>
<td class="#doctools_tocright">Map projection routines</td>
</tr>
</table></dl>
<dl><dt>markdown<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/markdown/markdown.html">markdown</a></td>
<td class="#doctools_tocright">Converts Markdown text to HTML</td>
</tr>
</table></dl>
<dl><dt>math<dd>
<table class="#doctools_toc">



<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math.html">math</a></td>
<td class="#doctools_tocright">Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bigfloat.html">math::bigfloat</a></td>
<td class="#doctools_tocright">Arbitrary precision floating-point numbers</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/bignum.html">math::bignum</a></td>
<td class="#doctools_tocright">Arbitrary precision integer numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/calculus.html">math::calculus</a></td>
<td class="#doctools_tocright">Integration and ordinary differential equations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/romberg.html">math::calculus::romberg</a></td>
<td class="#doctools_tocright">Romberg integration</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/symdiff.html">math::calculus::symdiff</a></td>
<td class="#doctools_tocright">Symbolic differentiation for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/combinatorics.html">math::combinatorics</a></td>
<td class="#doctools_tocright">Combinatorial functions in the Tcl Math Library</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/qcomplex.html">math::complexnumbers</a></td>
<td class="#doctools_tocright">Straightforward complex number package</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/constants.html">math::constants</a></td>
<td class="#doctools_tocright">Mathematical and numerical constants</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/decimal.html">math::decimal</a></td>
<td class="#doctools_tocright">General decimal arithmetic</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/exact.html">math::exact</a></td>
<td class="#doctools_tocright">Exact Real Arithmetic</td>
</tr>




<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fourier.html">math::fourier</a></td>
<td class="#doctools_tocright">Discrete and fast fourier transforms</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/fuzzy.html">math::fuzzy</a></td>
<td class="#doctools_tocright">Fuzzy comparison of floating-point numbers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/math_geometry.html">math::geometry</a></td>
<td class="#doctools_tocright">Geometrical computations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/interpolate.html">math::interpolate</a></td>
<td class="#doctools_tocright">Interpolation routines</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/linalg.html">math::linearalgebra</a></td>
<td class="#doctools_tocright">Linear Algebra</td>
</tr>
<tr class="#doctools_toceven" >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/numtheory.html">math::numtheory</a></td>
<td class="#doctools_tocright">Number Theory</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/optimize.html">math::optimize</a></td>
<td class="#doctools_tocright">Optimisation routines</td>
</tr>




<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/polynomials.html">math::polynomials</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_tocodd"  >








<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/rational_funcs.html">math::rationalfunctions</a></td>
<td class="#doctools_tocright">Polynomial functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/roman.html">math::roman</a></td>
<td class="#doctools_tocright">Tools for creating and manipulating roman numerals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/special.html">math::special</a></td>
<td class="#doctools_tocright">Special mathematical functions</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/statistics.html">math::statistics</a></td>
<td class="#doctools_tocright">Basic statistical functions and procedures</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/math/machineparameters.html">tclrep/machineparameters</a></td>
<td class="#doctools_tocright">Compute double precision machine parameters.</td>
</tr>
</table></dl>
<dl><dt>md4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md4/md4.html">md4</a></td>
<td class="#doctools_tocright">MD4 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>md5<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5/md5.html">md5</a></td>
<td class="#doctools_tocright">MD5 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>md5crypt<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/md5crypt/md5crypt.html">md5crypt</a></td>
<td class="#doctools_tocright">MD5-based password encryption</td>
</tr>
</table></dl>
<dl><dt>mime<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/mime.html">mime</a></td>
<td class="#doctools_tocright">Manipulation of MIME body parts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/mime/smtp.html">smtp</a></td>
<td class="#doctools_tocright">Client-side tcl implementation of the smtp protocol</td>
</tr>
</table></dl>
<dl><dt>multiplexer<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/multiplexer/multiplexer.html">multiplexer</a></td>
<td class="#doctools_tocright">One-to-many communication with sockets.</td>
</tr>
</table></dl>
<dl><dt>namespacex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/namespacex/namespacex.html">namespacex</a></td>
<td class="#doctools_tocright">Namespace utility commands</td>
</tr>
</table></dl>
<dl><dt>ncgi<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ncgi/ncgi.html">ncgi</a></td>
<td class="#doctools_tocright">Procedures to manipulate CGI values.</td>
</tr>
</table></dl>
<dl><dt>nettool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nettool/nettool.html">nettool</a></td>
<td class="#doctools_tocright">Tools for networked applications</td>
</tr>
</table></dl>
<dl><dt>nmea<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nmea/nmea.html">nmea</a></td>
<td class="#doctools_tocright">Process NMEA data</td>
</tr>
</table></dl>
<dl><dt>nns<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_client.html">nameserv</a></td>
<td class="#doctools_tocright">Name service facility, Client</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_auto.html">nameserv::auto</a></td>
<td class="#doctools_tocright">Name service facility, Client Extension</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_common.html">nameserv::common</a></td>
<td class="#doctools_tocright">Name service facility, shared definitions</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_protocol.html">nameserv::protocol</a></td>
<td class="#doctools_tocright">Name service facility, client/server protocol</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_server.html">nameserv::server</a></td>
<td class="#doctools_tocright">Name service facility, Server</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nns/nns_intro.html">nns_intro</a></td>
<td class="#doctools_tocright">Name service facility, introduction</td>
</tr>
</table></dl>
<dl><dt>nntp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/nntp/nntp.html">nntp</a></td>
<td class="#doctools_tocright">Tcl client for the NNTP protocol</td>
</tr>
</table></dl>
<dl><dt>ntp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ntp/ntp_time.html">ntp_time</a></td>
<td class="#doctools_tocright">Tcl Time Service Client</td>
</tr>
</table></dl>
<dl><dt>oauth<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/oauth/oauth.html">oauth</a></td>
<td class="#doctools_tocright">oauth API base signature</td>
</tr>
</table></dl>
<dl><dt>ooutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >







<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ooutil/ooutil.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
</table></dl>
<dl><dt>otp<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/otp/otp.html">otp</a></td>
<td class="#doctools_tocright">One-Time Passwords</td>
</tr>
</table></dl>
<dl><dt>page<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_intro.html">page_intro</a></td>
<td class="#doctools_tocright">page introduction</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_pluginmgr.html">page_pluginmgr</a></td>
<td class="#doctools_tocright">page plugin manager</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_flow.html">page_util_flow</a></td>
<td class="#doctools_tocright">page dataflow/treewalker utility</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_lemon.html">page_util_norm_lemon</a></td>
<td class="#doctools_tocright">page AST normalization, LEMON</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_norm_peg.html">page_util_norm_peg</a></td>
<td class="#doctools_tocright">page AST normalization, PEG</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_peg.html">page_util_peg</a></td>
<td class="#doctools_tocright">page PEG transformation utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/page/page_util_quote.html">page_util_quote</a></td>
<td class="#doctools_tocright">page character quoting utilities</td>
</tr>
</table></dl>
<dl><dt>pki<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pki/pki.html">pki</a></td>
<td class="#doctools_tocright">Implementation of the public key cipher</td>
</tr>
</table></dl>
<dl><dt>pluginmgr<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pluginmgr/pluginmgr.html">pluginmgr</a></td>
<td class="#doctools_tocright">Manage a plugin</td>
</tr>
</table></dl>
<dl><dt>png<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/png/png.html">png</a></td>
<td class="#doctools_tocright">PNG querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>pop3<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3/pop3.html">pop3</a></td>
<td class="#doctools_tocright">Tcl client for POP3 email protocol</td>
</tr>
</table></dl>
<dl><dt>pop3d<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d.html">pop3d</a></td>
<td class="#doctools_tocright">Tcl POP3 server implementation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_dbox.html">pop3d::dbox</a></td>
<td class="#doctools_tocright">Simple mailbox database for pop3d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pop3d/pop3d_udb.html">pop3d::udb</a></td>
<td class="#doctools_tocright">Simple user database for pop3d</td>
</tr>
</table></dl>
<dl><dt>practcl<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/practcl/practcl.html">practcl</a></td>
<td class="#doctools_tocright">The Practcl Module</td>
</tr>
</table></dl>
<dl><dt>processman<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/processman/processman.html">processman</a></td>
<td class="#doctools_tocright">Tool for automating the period callback of commands</td>
</tr>
</table></dl>
<dl><dt>profiler<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/profiler/profiler.html">profiler</a></td>
<td class="#doctools_tocright">Tcl source code profiler</td>
</tr>
</table></dl>
<dl><dt>pt<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_astree.html">pt::ast</a></td>
<td class="#doctools_tocright">Abstract Syntax Tree Serialization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_critcl.html">pt::cparam::configuration::critcl</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, Critcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_cparam_config_tea.html">pt::cparam::configuration::tea</a></td>
<td class="#doctools_tocright">C/PARAM, Canned configuration, TEA</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_json_language.html">pt::json_language</a></td>
<td class="#doctools_tocright">The JSON Grammar Exchange Format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_param.html">pt::param</a></td>
<td class="#doctools_tocright">PackRat Machine Specification</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpression.html">pt::pe</a></td>
<td class="#doctools_tocright">Parsing Expression Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pexpr_op.html">pt::pe::op</a></td>
<td class="#doctools_tocright">Parsing Expression Utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pegrammar.html">pt::peg</a></td>
<td class="#doctools_tocright">Parsing Expression Grammar Serialization</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container.html">pt::peg::container</a></td>
<td class="#doctools_tocright">PEG Storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_container_peg.html">pt::peg::container::peg</a></td>
<td class="#doctools_tocright">PEG Storage. Canned PEG grammar specification</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export.html">pt::peg::export</a></td>
<td class="#doctools_tocright">PEG Export</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_container.html">pt::peg::export::container</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write CONTAINER format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_json.html">pt::peg::export::json</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_export_peg.html">pt::peg::export::peg</a></td>
<td class="#doctools_tocright">PEG Export Plugin. Write PEG format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_container.html">pt::peg::from::container</a></td>
<td class="#doctools_tocright">PEG Conversion. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_json.html">pt::peg::from::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_from_peg.html">pt::peg::from::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import.html">pt::peg::import</a></td>
<td class="#doctools_tocright">PEG Import</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_container.html">pt::peg::import::container</a></td>
<td class="#doctools_tocright">PEG Import Plugin. From CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_json.html">pt::peg::import::json</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read JSON format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_import_peg.html">pt::peg::import::peg</a></td>
<td class="#doctools_tocright">PEG Import Plugin. Read PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_interp.html">pt::peg::interp</a></td>
<td class="#doctools_tocright">Interpreter for parsing expression grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_container.html">pt::peg::to::container</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CONTAINER format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_cparam.html">pt::peg::to::cparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write CPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_json.html">pt::peg::to::json</a></td>
<td class="#doctools_tocright">PEG Conversion. Write JSON format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_param.html">pt::peg::to::param</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_peg.html">pt::peg::to::peg</a></td>
<td class="#doctools_tocright">PEG Conversion. Write PEG format</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_to_tclparam.html">pt::peg::to::tclparam</a></td>
<td class="#doctools_tocright">PEG Conversion. Write TCLPARAM format</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_language.html">pt::peg_language</a></td>
<td class="#doctools_tocright">PEG Language Tutorial</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_introduction.html">pt::pegrammar</a></td>
<td class="#doctools_tocright">Introduction to Parsing Expression Grammars</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_pgen.html">pt::pgen</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_rdengine.html">pt::rde</a></td>
<td class="#doctools_tocright">Parsing Runtime Support, PARAM based</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_nx.html">pt::tclparam::configuration::nx</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, NX</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_snit.html">pt::tclparam::configuration::snit</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Snit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_tclparam_config_tcloo.html">pt::tclparam::configuration::tcloo</a></td>
<td class="#doctools_tocright">Tcl/PARAM, Canned configuration, Tcloo</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_util.html">pt::util</a></td>
<td class="#doctools_tocright">General utilities</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_to_api.html">pt_export_api</a></td>
<td class="#doctools_tocright">Parser Tools Export API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_from_api.html">pt_import_api</a></td>
<td class="#doctools_tocright">Parser Tools Import API</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_introduction.html">pt_introduction</a></td>
<td class="#doctools_tocright">Introduction to Parser Tools</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parse_peg.html">pt_parse_peg</a></td>
<td class="#doctools_tocright">Parser Tools PEG Parser</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_parser_api.html">pt_parser_api</a></td>
<td class="#doctools_tocright">Parser API</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/pt/pt_peg_op.html">pt_peg_op</a></td>
<td class="#doctools_tocright">Parser Tools PE Grammar Utility Operations</td>
</tr>
</table></dl>
<dl><dt>rc4<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rc4/rc4.html">rc4</a></td>
<td class="#doctools_tocright">Implementation of the RC4 stream cipher</td>
</tr>
</table></dl>
<dl><dt>rcs<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rcs/rcs.html">rcs</a></td>
<td class="#doctools_tocright">RCS low level utilities</td>
</tr>
</table></dl>
<dl><dt>report<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/report/report.html">report</a></td>
<td class="#doctools_tocright">Create and manipulate report objects</td>
</tr>
</table></dl>
<dl><dt>rest<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/rest/rest.html">rest</a></td>
<td class="#doctools_tocright">define REST web APIs and call them inline or asychronously</td>
</tr>
</table></dl>
<dl><dt>ripemd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd128.html">ripemd128</a></td>
<td class="#doctools_tocright">RIPEMD-128 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/ripemd/ripemd160.html">ripemd160</a></td>
<td class="#doctools_tocright">RIPEMD-160 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>sasl<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/sasl.html">SASL</a></td>
<td class="#doctools_tocright">Implementation of SASL mechanisms for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/ntlm.html">SASL::NTLM</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/scram.html">SASL::SCRAM</a></td>
<td class="#doctools_tocright">Implementation of SASL SCRAM mechanism for Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sasl/gtoken.html">SASL::XGoogleToken</a></td>
<td class="#doctools_tocright">Implementation of SASL NTLM mechanism for Tcl</td>
</tr>
</table></dl>
<dl><dt>sha1<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha1.html">sha1</a></td>
<td class="#doctools_tocright">SHA1 Message-Digest Algorithm</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/sha1/sha256.html">sha256</a></td>
<td class="#doctools_tocright">SHA256 Message-Digest Algorithm</td>
</tr>
</table></dl>
<dl><dt>simulation<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/annealing.html">simulation::annealing</a></td>
<td class="#doctools_tocright">Simulated annealing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/montecarlo.html">simulation::montecarlo</a></td>
<td class="#doctools_tocright">Monte Carlo simulations</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/simulation/simulation_random.html">simulation::random</a></td>
<td class="#doctools_tocright">Pseudo-random number generators</td>
</tr>
</table></dl>
<dl><dt>smtpd<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/smtpd/smtpd.html">smtpd</a></td>
<td class="#doctools_tocright">Tcl SMTP server implementation</td>
</tr>
</table></dl>
<dl><dt>snit<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snit.html">snit</a></td>
<td class="#doctools_tocright">Snit's Not Incr Tcl</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/snit/snitfaq.html">snitfaq</a></td>
<td class="#doctools_tocright">Snit Frequently Asked Questions</td>
</tr>
</table></dl>
<dl><dt>soundex<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/soundex/soundex.html">soundex</a></td>
<td class="#doctools_tocright">Soundex</td>
</tr>
</table></dl>
<dl><dt>stooop<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/stooop.html">stooop</a></td>
<td class="#doctools_tocright">Object oriented extension.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stooop/switched.html">switched</a></td>
<td class="#doctools_tocright">switch/option management.</td>
</tr>
</table></dl>
<dl><dt>string<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token.html">string::token</a></td>
<td class="#doctools_tocright">Regex based iterative lexing</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/string/token_shell.html">string::token::shell</a></td>
<td class="#doctools_tocright">Parsing of shell command line</td>
</tr>
</table></dl>
<dl><dt>stringprep<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep.html">stringprep</a></td>
<td class="#doctools_tocright">Implementation of stringprep</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/stringprep_data.html">stringprep::data</a></td>
<td class="#doctools_tocright">stringprep data tables, generated, internal</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode.html">unicode</a></td>
<td class="#doctools_tocright">Implementation of Unicode normalization</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/stringprep/unicode_data.html">unicode::data</a></td>
<td class="#doctools_tocright">unicode data tables, generated, internal</td>
</tr>
</table></dl>
<dl><dt>struct<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/disjointset.html">struct::disjointset</a></td>
<td class="#doctools_tocright">Disjoint set data structure</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph.html">struct::graph</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graphops.html">struct::graph::op</a></td>
<td class="#doctools_tocright">Operation for (un)directed graph objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/graph1.html">struct::graph_v1</a></td>
<td class="#doctools_tocright">Create and manipulate directed graph objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_list.html">struct::list</a></td>
<td class="#doctools_tocright">Procedures for manipulating lists</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix.html">struct::matrix</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/matrix1.html">struct::matrix_v1</a></td>
<td class="#doctools_tocright">Create and manipulate matrix objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/pool.html">struct::pool</a></td>
<td class="#doctools_tocright">Create and manipulate pool objects (of discrete items)</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/prioqueue.html">struct::prioqueue</a></td>
<td class="#doctools_tocright">Create and manipulate prioqueue objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/queue.html">struct::queue</a></td>
<td class="#doctools_tocright">Create and manipulate queue objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/record.html">struct::record</a></td>
<td class="#doctools_tocright">Define and create records (similar to 'C' structures)</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_set.html">struct::set</a></td>
<td class="#doctools_tocright">Procedures for manipulating sets</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/skiplist.html">struct::skiplist</a></td>
<td class="#doctools_tocright">Create and manipulate skiplists</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/stack.html">struct::stack</a></td>
<td class="#doctools_tocright">Create and manipulate stack objects</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree.html">struct::tree</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/struct/struct_tree1.html">struct::tree_v1</a></td>
<td class="#doctools_tocright">Create and manipulate tree objects</td>
</tr>
</table></dl>
<dl><dt>tar<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tar/tar.html">tar</a></td>
<td class="#doctools_tocright">Tar file creation, extraction &amp; manipulation</td>
</tr>
</table></dl>
<dl><dt>tepam<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_introduction.html">tepam</a></td>
<td class="#doctools_tocright">An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_argument_dialogbox.html">tepam::argument_dialogbox</a></td>
<td class="#doctools_tocright">TEPAM argument_dialogbox, reference manual</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_doc_gen.html">tepam::doc_gen</a></td>
<td class="#doctools_tocright">TEPAM DOC Generation, reference manual</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tepam/tepam_procedure.html">tepam::procedure</a></td>
<td class="#doctools_tocright">TEPAM procedure, reference manual</td>
</tr>
</table></dl>
<dl><dt>term<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term.html">term</a></td>
<td class="#doctools_tocright">General terminal control</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_code.html">term::ansi::code</a></td>
<td class="#doctools_tocright">Helper for control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cattr.html">term::ansi::code::attr</a></td>
<td class="#doctools_tocright">ANSI attribute sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cctrl.html">term::ansi::code::ctrl</a></td>
<td class="#doctools_tocright">ANSI control sequences</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_cmacros.html">term::ansi::code::macros</a></td>
<td class="#doctools_tocright">Macro sequences</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_ctrlu.html">term::ansi::ctrl::unix</a></td>
<td class="#doctools_tocright">Control operations and queries</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ansi_send.html">term::ansi::send</a></td>
<td class="#doctools_tocright">Output of ANSI control sequences to terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/imenu.html">term::interact::menu</a></td>
<td class="#doctools_tocright">Terminal widget, menu</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/ipager.html">term::interact::pager</a></td>
<td class="#doctools_tocright">Terminal widget, paging</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/receive.html">term::receive</a></td>
<td class="#doctools_tocright">General input from terminals</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_bind.html">term::receive::bind</a></td>
<td class="#doctools_tocright">Keyboard dispatch from terminals</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/term/term_send.html">term::send</a></td>
<td class="#doctools_tocright">General output to terminals</td>
</tr>
</table></dl>
<dl><dt>textutil<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil.html">textutil</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/adjust.html">textutil::adjust</a></td>
<td class="#doctools_tocright">Procedures to adjust, indent, and undent paragraphs</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/expander.html">textutil::expander</a></td>
<td class="#doctools_tocright">Procedures to process templates and expand text.</td>
</tr>
<tr class="#doctools_tocodd"  >




<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/repeat.html">textutil::repeat</a></td>
<td class="#doctools_tocright">Procedures to repeat strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_split.html">textutil::split</a></td>
<td class="#doctools_tocright">Procedures to split texts</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/textutil_string.html">textutil::string</a></td>
<td class="#doctools_tocright">Procedures to manipulate texts and strings.</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/tabify.html">textutil::tabify</a></td>
<td class="#doctools_tocright">Procedures to (un)tabify strings</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/textutil/trim.html">textutil::trim</a></td>
<td class="#doctools_tocright">Procedures to trim strings</td>
</tr>
</table></dl>
<dl><dt>tie<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie.html">tie</a></td>
<td class="#doctools_tocright">Array persistence</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tie/tie_std.html">tie</a></td>
<td class="#doctools_tocright">Array persistence, standard data sources</td>
</tr>
</table></dl>
<dl><dt>tiff<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tiff/tiff.html">tiff</a></td>
<td class="#doctools_tocright">TIFF reading, writing, and querying and manipulation of meta data</td>
</tr>
</table></dl>
<dl><dt>tool<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/meta.html">oo::util</a></td>
<td class="#doctools_tocright">Utility commands for TclOO</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool.html">tool</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/tool/tool_dict_ensemble.html">tool::dict_ensemble</a></td>
<td class="#doctools_tocright">Dictionary Tools</td>
</tr>
</table></dl>
<dl><dt>transfer<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/connect.html">transfer::connect</a></td>
<td class="#doctools_tocright">Connection setup</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/copyops.html">transfer::copy</a></td>
<td class="#doctools_tocright">Data transfer foundation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/tqueue.html">transfer::copy::queue</a></td>
<td class="#doctools_tocright">Queued transfers</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/ddest.html">transfer::data::destination</a></td>
<td class="#doctools_tocright">Data destination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/dsource.html">transfer::data::source</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/receiver.html">transfer::receiver</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/transfer/transmitter.html">transfer::transmitter</a></td>
<td class="#doctools_tocright">Data source</td>
</tr>
</table></dl>
<dl><dt>treeql<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/treeql/treeql.html">treeql</a></td>
<td class="#doctools_tocright">Query tree objects</td>
</tr>
</table></dl>
<dl><dt>try<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_throw.html">throw</a></td>
<td class="#doctools_tocright">throw - Throw an error exception with a message</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/try/tcllib_try.html">try</a></td>
<td class="#doctools_tocright">try - Trap and process errors and exceptions</td>
</tr>
</table></dl>
<dl><dt>udpcluster<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/udpcluster/udpcluster.html">udpcluster</a></td>
<td class="#doctools_tocright">UDP Peer-to-Peer cluster</td>
</tr>
</table></dl>
<dl><dt>uev<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent.html">uevent</a></td>
<td class="#doctools_tocright">User events</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uev/uevent_onidle.html">uevent::onidle</a></td>
<td class="#doctools_tocright">Request merging and deferal to idle time</td>
</tr>
</table></dl>
<dl><dt>units<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/units/units.html">units</a></td>
<td class="#doctools_tocright">unit conversion</td>
</tr>
</table></dl>
<dl><dt>uri<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/uri.html">uri</a></td>
<td class="#doctools_tocright">URI utilities</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uri/urn-scheme.html">uri_urn</a></td>
<td class="#doctools_tocright">URI utilities, URN scheme</td>
</tr>
</table></dl>
<dl><dt>uuid<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/uuid/uuid.html">uuid</a></td>
<td class="#doctools_tocright">UUID generation and comparison</td>
</tr>
</table></dl>
<dl><dt>valtype<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/valtype_common.html">valtype::common</a></td>
<td class="#doctools_tocright">Validation, common code</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_amex.html">valtype::creditcard::amex</a></td>
<td class="#doctools_tocright">Validation for AMEX creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_discover.html">valtype::creditcard::discover</a></td>
<td class="#doctools_tocright">Validation for Discover creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_mastercard.html">valtype::creditcard::mastercard</a></td>
<td class="#doctools_tocright">Validation for Mastercard creditcard number</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/cc_visa.html">valtype::creditcard::visa</a></td>
<td class="#doctools_tocright">Validation for VISA creditcard number</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/ean13.html">valtype::gs1::ean13</a></td>
<td class="#doctools_tocright">Validation for EAN13</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/iban.html">valtype::iban</a></td>
<td class="#doctools_tocright">Validation for IBAN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/imei.html">valtype::imei</a></td>
<td class="#doctools_tocright">Validation for IMEI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/isbn.html">valtype::isbn</a></td>
<td class="#doctools_tocright">Validation for ISBN</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn.html">valtype::luhn</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN checkdigit</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/luhn5.html">valtype::luhn5</a></td>
<td class="#doctools_tocright">Validation for plain number with a LUHN5 checkdigit</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/usnpi.html">valtype::usnpi</a></td>
<td class="#doctools_tocright">Validation for USNPI</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/valtype/verhoeff.html">valtype::verhoeff</a></td>
<td class="#doctools_tocright">Validation for plain number with a VERHOEFF checkdigit</td>
</tr>
</table></dl>
<dl><dt>virtchannel_base<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/cat.html">tcl::chan::cat</a></td>
<td class="#doctools_tocright">Concatenation channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/facade.html">tcl::chan::facade</a></td>
<td class="#doctools_tocright">Facade channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo.html">tcl::chan::fifo</a></td>
<td class="#doctools_tocright">In-memory fifo channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_fifo2.html">tcl::chan::fifo2</a></td>
<td class="#doctools_tocright">In-memory interconnected fifo channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/halfpipe.html">tcl::chan::halfpipe</a></td>
<td class="#doctools_tocright">In-memory channel, half of a fifo2</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_memchan.html">tcl::chan::memchan</a></td>
<td class="#doctools_tocright">In-memory channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_null.html">tcl::chan::null</a></td>
<td class="#doctools_tocright">Null channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/nullzero.html">tcl::chan::nullzero</a></td>
<td class="#doctools_tocright">Null/Zero channel combination</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_random.html">tcl::chan::random</a></td>
<td class="#doctools_tocright">Random channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/std.html">tcl::chan::std</a></td>
<td class="#doctools_tocright">Standard I/O, unification of stdin and stdout</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_string.html">tcl::chan::string</a></td>
<td class="#doctools_tocright">Read-only in-memory channel</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/textwindow.html">tcl::chan::textwindow</a></td>
<td class="#doctools_tocright">Textwindow channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_variable.html">tcl::chan::variable</a></td>
<td class="#doctools_tocright">In-memory channel using variable for storage</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/tcllib_zero.html">tcl::chan::zero</a></td>
<td class="#doctools_tocright">Zero channel</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_base/randseed.html">tcl::randomseed</a></td>
<td class="#doctools_tocright">Utilities for random channels</td>
</tr>
</table></dl>
<dl><dt>virtchannel_core<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/core.html">tcl::chan::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel support</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/events.html">tcl::chan::events</a></td>
<td class="#doctools_tocright">Event support for reflected/virtual channels</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_core/transformcore.html">tcl::transform::core</a></td>
<td class="#doctools_tocright">Basic reflected/virtual channel transform support</td>
</tr>
</table></dl>
<dl><dt>virtchannel_transform<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/adler32.html">tcl::transform::adler32</a></td>
<td class="#doctools_tocright">Adler32 transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_base64.html">tcl::transform::base64</a></td>
<td class="#doctools_tocright">Base64 encoding transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_counter.html">tcl::transform::counter</a></td>
<td class="#doctools_tocright">Counter transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_crc32.html">tcl::transform::crc32</a></td>
<td class="#doctools_tocright">Crc32 transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/hex.html">tcl::transform::hex</a></td>
<td class="#doctools_tocright">Hexadecimal encoding transformation</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/identity.html">tcl::transform::identity</a></td>
<td class="#doctools_tocright">Identity transformation</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/limitsize.html">tcl::transform::limitsize</a></td>
<td class="#doctools_tocright">limiting input</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/observe.html">tcl::transform::observe</a></td>
<td class="#doctools_tocright">Observer transformation, stream copy</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/vt_otp.html">tcl::transform::otp</a></td>
<td class="#doctools_tocright">Encryption via one-time pad</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/rot.html">tcl::transform::rot</a></td>
<td class="#doctools_tocright">rot-encryption</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/spacer.html">tcl::transform::spacer</a></td>
<td class="#doctools_tocright">Space insertation and removal</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/virtchannel_transform/tcllib_zlib.html">tcl::transform::zlib</a></td>
<td class="#doctools_tocright">zlib (de)compression</td>
</tr>
</table></dl>
<dl><dt>websocket<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/websocket/websocket.html">websocket</a></td>
<td class="#doctools_tocright">Tcl implementation of the websocket protocol</td>
</tr>
</table></dl>
<dl><dt>wip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/wip/wip.html">wip</a></td>
<td class="#doctools_tocright">Word Interpreter</td>
</tr>
</table></dl>
<dl><dt>yaml<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/huddle.html">huddle</a></td>
<td class="#doctools_tocright">Create and manipulate huddle object</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/yaml/yaml.html">yaml</a></td>
<td class="#doctools_tocright">YAML Format Encoder/Decoder</td>
</tr>
</table></dl>
<dl><dt>zip<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/decode.html">zipfile::decode</a></td>
<td class="#doctools_tocright">Access to zip archives</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/encode.html">zipfile::encode</a></td>
<td class="#doctools_tocright">Generation of zip archives</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/modules/zip/mkzip.html">zipfile::mkzip</a></td>
<td class="#doctools_tocright">Build a zip archive</td>
</tr>
</table></dl></table></dl>

</dl><hr></body></html>

Changes to idoc/www/toc2.html.

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
<!DOCTYPE html><html><head>
<title> Table Of Contents </title>
</head>
<!-- Generated by tcllib/doctools/toc with format 'html'
   -->
<!-- Table Of Contents
   -->
<body>
<hr> [
   <a href="../../../../home">Tcllib Home</a>
&#124; <a href="index.html">Keyword Index</a>
&#124; <a href="toc0.html">Categories</a>
&#124; <a href="toc1.html">Modules</a>
&#124; <a href="toc2.html">Applications</a>
 ] <hr>
<h3>Table Of Contents</h3>
<hr><dl><dt><h2></h2></dt><dd>
<dl><dt><a name='applications'>Applications</dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='dtplite'><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nns'><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='nnsd'><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='nnslog'><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='page'><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='pt'><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='tcldocstrip'><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
</table></dl>
</dd></dl><hr></body></html>
|


|

|




|
|
|
|

|
|
|


|



|



|



|



|



|



|



|
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
<html><head>
<title> Table Of Contents </title>
</head>
<! -- Generated by tcllib/doctools/toc with format 'html'
   -->
<! -- Table Of Contents
   -->
<body>
<hr> [
   <a href="../../../../home">Tcllib Home</a>
| <a href="index.html">Keyword Index</a>
| <a href="toc0.html">Categories</a>
| <a href="toc1.html">Modules</a>
| <a href="toc2.html">Applications</a>
 ] <hr>
<h3> Table Of Contents </h3>
<hr><dl><dt><h2>  </h2><dd>
<dl><dt>Applications<dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/dtplite.html">dtplite</a></td>
<td class="#doctools_tocright">Lightweight DocTools Markup Processor</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nns.html">nns</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnsd.html">nnsd</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Server Application</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/nnslog.html">nnslog</a></td>
<td class="#doctools_tocright">Name service facility, Commandline Logging Client Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/page.html">page</a></td>
<td class="#doctools_tocright">Parser Generator</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/pt.html">pt</a></td>
<td class="#doctools_tocright">Parser Tools Application</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a href="tcllib/files/apps/tcldocstrip.html">tcldocstrip</a></td>
<td class="#doctools_tocright">Tcl-based Docstrip Processor</td>
</tr>
</table></dl>
</dl><hr></body></html>

Changes to installer.tcl.

278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
	# Starpack. No defaults for location.
    } else {
	# Starkit, or unwrapped. Derive defaults location from the
	# location of the executable running the installer, or the
	# location of its library.

	# For a starkit [info library] is inside the running
	# tclkit. Detect this and derive the location from the
	# location of the executable itself for that case.

	if {[string match [info nameofexecutable]* [info library]]} {
	    # Starkit
	    set libdir [file join [file dirname [file dirname [info nameofexecutable]]] lib]
	} else {
	    # Unwrapped.







|







278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
	# Starpack. No defaults for location.
    } else {
	# Starkit, or unwrapped. Derive defaults location from the
	# location of the executable running the installer, or the
	# location of its library.

	# For a starkit [info library] is inside the running
	# tclkit. Detect this and derive the lcoation from the
	# location of the executable itself for that case.

	if {[string match [info nameofexecutable]* [info library]]} {
	    # Starkit
	    set libdir [file join [file dirname [file dirname [info nameofexecutable]]] lib]
	} else {
	    # Unwrapped.

Changes to license.terms.

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
This software is copyrighted by Ajuba Solutions and other parties.
The following terms apply to all files associated with the software
unless explicitly disclaimed in individual files.

The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose,
provided that existing copyright notices are retained in all copies
and that this notice is included verbatim in any distributions. No
written agreement, license, or royalty fee is required for any of the
authorized uses.  Modifications to this software may be copyrighted by
their authors and need not follow the licensing terms described here,
provided that the new terms are clearly indicated on the first page of
each file where they apply.

IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND
THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights" in
the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
Government shall have only "Restricted Rights" as defined in Clause
252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license.

|
|


|
|
|
|
|
|
|
|








|
|
|
|
|


|
|







|
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
This software is copyrighted by Ajuba Solutions and other parties.
The following terms apply to all files associated with the software unless
explicitly disclaimed in individual files.

The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.

IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.

GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights"
in the software and related documentation as defined in the Federal 
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
Government shall have only "Restricted Rights" as defined in Clause
252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license. 

Deleted modules/0compatibility/d_config.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# (c) 2019 Andreas Kupries
# Redirection wrapper for deprecated package
# Deprecated:
# - doctools::config
# Replacement:
# - struct::map

package require Tcl 8.4
package require struct::map

namespace eval ::doctools {}

proc ::doctools::config {args} { uplevel 1 [linsert $args 0 ::struct::map] }

package provide doctools::config 0.1
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































Deleted modules/0compatibility/d_config.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# -*- tcl -*-
# config.test:  Testsuite for DEPRECATED package doctools::config
#
# Copyright (c) 2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

support {
    use snit/snit.tcl  snit
    use struct/map.tcl struct::map
}
testing {
    useLocal d_config.tcl doctools::config
}

# ---------------------------------------------------------------------
# [] constructor
# [] destructor
# [] get
# [] names
# [] set
# [] unset

#----------------------------------------------------------------------
## Constructor, destructor

test doctools-config-1.0 {constructor, wrong args, too many} -body {
    doctools::config M X
} -returnCodes error -result {Error in constructor: wrong # args: should be "::struct::map::I::Snit_constructor type selfns win self"}

test doctools-config-1.1 {instance, bogus method} -setup {
    doctools::config M
} -cleanup {
    M destroy
} -body {
    M bogus
} -returnCodes error -result {"::M bogus" is not defined}

#----------------------------------------------------------------------
## get

test doctools-config-2.0 {get, wrong args, too many} -setup {
    doctools::config M
} -cleanup {
    M destroy
} -body {
    M get X
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodget type selfns win self"}

test doctools-config-2.1 {get, base state, none} -setup {
    doctools::config M
} -cleanup {
    M destroy
} -body {
    M get
} -result {}

#----------------------------------------------------------------------
## names

test doctools-config-3.0 {names, wrong args, too many} -setup {
    doctools::config M
} -cleanup {
    M destroy
} -body {
    M names X
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodnames type selfns win self"}

test doctools-config-3.1 {names, base state, none} -setup {
    doctools::config M
} -cleanup {
    M destroy
} -body {
    M names
} -result {}

#----------------------------------------------------------------------
## set

test doctools-config-4.0 {set, wrong args, not enough} -setup {
    doctools::config M
} -cleanup {
    M destroy
} -body {
    M set
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test doctools-config-4.1 {set, wrong args, too many} -setup {
    doctools::config M
} -cleanup {
    M destroy
} -body {
    M set K V X
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test doctools-config-4.2 {set, state change, result} -setup {
    doctools::config M
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M set K V] [M names] [M get]
} -result {{} {} V K {K V}}

#----------------------------------------------------------------------
## unset

test doctools-config-5.2 {unset, known key, state change, result} -setup {
    doctools::config M
    M set K V
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M unset K] [M names] [M get]
} -result {K {K V} {} {} {}}

test doctools-config-5.3 {unset, missing key, no state change, result} -setup {
    doctools::config M
    M set K V
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M unset K'] [M names] [M get]
} -result {K {K V} {} K {K V}}

test doctools-config-5.4 {unset, no pattern, clear, result} -setup {
    doctools::config M
    M set K V
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M unset] [M names] [M get]
} -result {K {K V} {} {} {}}

#----------------------------------------------------------------------
testsuiteCleanup
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































Deleted modules/0compatibility/d_paths.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# (c) 2019 Andreas Kupries
# Redirection wrapper for deprecated package
# Deprecated:
# - doctools::paths
# Replacement:
# - fileutil::paths

package require Tcl 8.4
package require fileutil::paths

namespace eval ::doctools {}

proc ::doctools::paths {args} { uplevel 1 [linsert $args 0 ::fileutil::paths] }

package provide doctools::paths 0.1
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































Deleted modules/0compatibility/d_paths.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# -*- tcl -*-
# paths.test:  Testsuite for DEPRECATED package doctools::paths
#
# Copyright (c) 2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

support {
    use snit/snit.tcl      snit
    use fileutil/paths.tcl fileutil::paths
}    
testing {
    useLocal d_paths.tcl doctools::paths
}

# ---------------------------------------------------------------------
# [] constructor
# [] destructor
# [] paths
# [] add
# [] remove
# [] clear

#----------------------------------------------------------------------
## Constructor, destructor

test doctools-paths-1.0 {constructor, wrong args, too many} -body {
    doctools::paths P X
} -returnCodes error -result {Error in constructor: wrong # args: should be "::fileutil::paths::Snit_constructor type selfns win self"}

test doctools-paths-1.1 {instance, bogus method} -setup {
    doctools::paths P
} -cleanup {
    P destroy
} -body {
    P bogus
} -returnCodes error -result {"::P bogus" is not defined}

#----------------------------------------------------------------------
## paths

test doctools-paths-2.0 {paths, wrong args, too many} -setup {
    doctools::paths P
} -cleanup {
    P destroy
} -body {
    P paths X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodpaths type selfns win self"}

test doctools-paths-2.1 {paths, base state, none} -setup {
    doctools::paths P
} -cleanup {
    P destroy
} -body {
    P paths
} -result {}

#----------------------------------------------------------------------
## add

test doctools-paths-3.0 {add, wrong args, not enough} -setup {
    doctools::paths P
} -cleanup {
    P destroy
} -body {
    P add
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test doctools-paths-3.1 {add, wrong args, too many} -setup {
    doctools::paths P
} -cleanup {
    P destroy
} -body {
    P add F X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test doctools-paths-3.2 {add, state change, result} -setup {
    doctools::paths P
} -cleanup {
    P destroy
} -body {
    list [P add F] [P paths]
} -result {{} F}

#----------------------------------------------------------------------
## remove

test doctools-paths-4.0 {remove, wrong args, not enough} -setup {
    doctools::paths P
} -cleanup {
    P destroy
} -body {
    P remove
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

test doctools-paths-4.1 {remove, wrong args, too many} -setup {
    doctools::paths P
} -cleanup {
    P destroy
} -body {
    P remove F X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

test doctools-paths-4.2 {remove, known path, state change, result} -setup {
    doctools::paths P
    P add F
} -cleanup {
    P destroy
} -body {
    list [P remove F] [P paths]
} -result {{} {}}

test doctools-paths-4.3 {remove, missing path, no state change, result} -setup {
    doctools::paths P
    P add Z
} -cleanup {
    P destroy
} -body {
    list [P remove F] [P paths]
} -result {{} Z}

#----------------------------------------------------------------------
## clear

test doctools-paths-5.0 {clear, wrong args, too many} -setup {
    doctools::paths P
} -cleanup {
    P destroy
} -body {
    P clear X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodclear type selfns win self"}

test doctools-paths-5.1 {clear, return to base state} -setup {
    doctools::paths P
    P add F
} -cleanup {
    P destroy
} -body {
    list [P clear] [P paths]
} -result {{} {}}

#----------------------------------------------------------------------
testsuiteCleanup
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































Deleted modules/0compatibility/p_config.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# (c) 2019 Andreas Kupries
# Redirection wrapper for deprecated package
# Deprecated:
# - configuration
# Replacement:
# - struct::map

package require Tcl 8.4
package require struct::map

proc ::configuration {args} { uplevel 1 [linsert $args 0 ::struct::map] }

package provide configuration 1
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Deleted modules/0compatibility/p_config.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# -*- tcl -*-
# config.test:  Testsuite for DEPRECATED package configuration
#
# Copyright (c) 2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

support {
    use snit/snit.tcl  snit
    use struct/map.tcl struct::map
}
testing {
    useLocal p_config.tcl configuration
}

# ---------------------------------------------------------------------
# [] constructor
# [] destructor
# [] get
# [] names
# [] set
# [] unset

#----------------------------------------------------------------------
## Constructor, destructor

test configuration-1.0 {constructor, wrong args, too many} -body {
    configuration M X
} -returnCodes error -result {Error in constructor: wrong # args: should be "::struct::map::I::Snit_constructor type selfns win self"}

test configuration-1.1 {instance, bogus method} -setup {
    configuration M
} -cleanup {
    M destroy
} -body {
    M bogus
} -returnCodes error -result {"::M bogus" is not defined}

#----------------------------------------------------------------------
## get

test configuration-2.0 {get, wrong args, too many} -setup {
    configuration M
} -cleanup {
    M destroy
} -body {
    M get X
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodget type selfns win self"}

test configuration-2.1 {get, base state, none} -setup {
    configuration M
} -cleanup {
    M destroy
} -body {
    M get
} -result {}

#----------------------------------------------------------------------
## names

test configuration-3.0 {names, wrong args, too many} -setup {
    configuration M
} -cleanup {
    M destroy
} -body {
    M names X
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodnames type selfns win self"}

test configuration-3.1 {names, base state, none} -setup {
    configuration M
} -cleanup {
    M destroy
} -body {
    M names
} -result {}

#----------------------------------------------------------------------
## set

test configuration-4.0 {set, wrong args, not enough} -setup {
    configuration M
} -cleanup {
    M destroy
} -body {
    M set
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test configuration-4.1 {set, wrong args, too many} -setup {
    configuration M
} -cleanup {
    M destroy
} -body {
    M set K V X
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test configuration-4.2 {set, state change, result} -setup {
    configuration M
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M set K V] [M names] [M get]
} -result {{} {} V K {K V}}

#----------------------------------------------------------------------
## unset

test configuration-5.2 {unset, known key, state change, result} -setup {
    configuration M
    M set K V
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M unset K] [M names] [M get]
} -result {K {K V} {} {} {}}

test configuration-5.3 {unset, missing key, no state change, result} -setup {
    configuration M
    M set K V
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M unset K'] [M names] [M get]
} -result {K {K V} {} K {K V}}

test configuration-5.4 {unset, no pattern, clear, result} -setup {
    configuration M
    M set K V
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M unset] [M names] [M get]
} -result {K {K V} {} {} {}}

#----------------------------------------------------------------------
testsuiteCleanup
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































Deleted modules/0compatibility/p_paths.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# (c) 2019 Andreas Kupries
# Redirection wrapper for deprecated package
# Deprecated:
# - paths
# Replacement:
# - fileutil::paths

package require Tcl 8.4
package require fileutil::paths

proc ::paths {args} { uplevel 1 [linsert $args 0 ::fileutil::paths] }

package provide paths 1
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Deleted modules/0compatibility/p_paths.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# -*- tcl -*-
# paths.test:  Testsuite for DEPRECATED package paths (pt)
#
# Copyright (c) 2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

support {
    use snit/snit.tcl      snit
    use fileutil/paths.tcl fileutil::paths
}    
testing {
    useLocal p_paths.tcl paths
}

# ---------------------------------------------------------------------
# [] constructor
# [] destructor
# [] paths
# [] add
# [] remove
# [] clear

#----------------------------------------------------------------------
## Constructor, destructor

test paths-1.0 {constructor, wrong args, too many} -body {
    paths P X
} -returnCodes error -result {Error in constructor: wrong # args: should be "::fileutil::paths::Snit_constructor type selfns win self"}

test paths-1.1 {instance, bogus method} -setup {
    paths P
} -cleanup {
    P destroy
} -body {
    P bogus
} -returnCodes error -result {"::P bogus" is not defined}

#----------------------------------------------------------------------
## paths

test paths-2.0 {paths, wrong args, too many} -setup {
    paths P
} -cleanup {
    P destroy
} -body {
    P paths X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodpaths type selfns win self"}

test paths-2.1 {paths, base state, none} -setup {
    paths P
} -cleanup {
    P destroy
} -body {
    P paths
} -result {}

#----------------------------------------------------------------------
## add

test paths-3.0 {add, wrong args, not enough} -setup {
    paths P
} -cleanup {
    P destroy
} -body {
    P add
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test paths-3.1 {add, wrong args, too many} -setup {
    paths P
} -cleanup {
    P destroy
} -body {
    P add F X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test paths-3.2 {add, state change, result} -setup {
    paths P
} -cleanup {
    P destroy
} -body {
    list [P add F] [P paths]
} -result {{} F}

#----------------------------------------------------------------------
## remove

test paths-4.0 {remove, wrong args, not enough} -setup {
    paths P
} -cleanup {
    P destroy
} -body {
    P remove
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

test paths-4.1 {remove, wrong args, too many} -setup {
    paths P
} -cleanup {
    P destroy
} -body {
    P remove F X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

test paths-4.2 {remove, known path, state change, result} -setup {
    paths P
    P add F
} -cleanup {
    P destroy
} -body {
    list [P remove F] [P paths]
} -result {{} {}}

test paths-4.3 {remove, missing path, no state change, result} -setup {
    paths P
    P add Z
} -cleanup {
    P destroy
} -body {
    list [P remove F] [P paths]
} -result {{} Z}

#----------------------------------------------------------------------
## clear

test paths-5.0 {clear, wrong args, too many} -setup {
    paths P
} -cleanup {
    P destroy
} -body {
    P clear X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodclear type selfns win self"}

test paths-5.1 {clear, return to base state} -setup {
    paths P
    P add F
} -cleanup {
    P destroy
} -body {
    list [P clear] [P paths]
} -result {{} {}}

#----------------------------------------------------------------------
testsuiteCleanup
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































Deleted modules/0compatibility/pkgIndex.tcl.

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
# Compatibility wrapper for deprecated packages.
##
# Stages
# [D1] Next Release   - Noted deprecated, with redirection wrappers
# [D2] Release After  - Wrappers become Blockers, throwing error noting redirection
# [D3] Release Beyond - All removed.
##
# Currently in deprecation
# - D1 doctools::path	(doctools2base)
# - D1 doctools::config	(doctools2base)
# - D1 configuration	(pt)
# - D1 paths		(pt)
#
# :Attention:
# - Original    `doctools::paths`     Tcl 8.4 required
#   Replacement `fileutilutil::paths` Tcl 8.5 required!

if {![package vsatisfies [package provide Tcl] 8.4]} {return}

package ifneeded configuration    1   [list source [file join $dir p_config.tcl]]
package ifneeded doctools::config 0.1 [list source [file join $dir d_config.tcl]]
package ifneeded doctools::paths  0.1 [list source [file join $dir d_paths.tcl]]
package ifneeded paths            1   [list source [file join $dir p_paths.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}


if {![package vsatisfies [package provide Tcl] 8.6]} {return}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Changes to modules/aes/aes.man.

160
161
162
163
164
165
166
167
168

[list_end]

[section AUTHORS]
Thorsten Schloermann, Pat Thoyts

[vset CATEGORY aes]
[include ../common-text/feedback.inc]
[manpage_end]







|

160
161
162
163
164
165
166
167
168

[list_end]

[section AUTHORS]
Thorsten Schloermann, Pat Thoyts

[vset CATEGORY aes]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/amazon-s3/S3.man.

1442
1443
1444
1445
1446
1447
1448
1449
1450
each moving on to the next unstarted task as it finishes each.
This is still being designed, and it is intended primarily
to be run on Amazon's Elastic Compute Cloud.

[include ../common-text/tls-security-notes.inc]

[vset CATEGORY amazon-s3]
[include ../common-text/feedback.inc]
[manpage_end]







|

1442
1443
1444
1445
1446
1447
1448
1449
1450
each moving on to the next unstarted task as it finishes each.
This is still being designed, and it is intended primarily
to be run on Amazon's Elastic Compute Cloud.

[include ../common-text/tls-security-notes.inc]

[vset CATEGORY amazon-s3]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/amazon-s3/S3.test.

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
source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0

testsNeed xml ; # aka TclXML, author Steve Ball, of Zveno (Australia)

if {[catch {package require xml}]} {
    puts "    Aborting the tests found in \"[file tail [info script]]\""
    puts "    Requiring xml package, not found."
    return
}

# Put your own keys into test-assets/aws-access-id, aws-secret-access_key
# -------------------------------------------------------------------------

if {![file exists [asset aws-access-id]] ||
    ![file exists [asset aws-secret-access-key]]
} {
    if {[file exists [asset no-aws]]} {
	puts "    Skipping the tests found in \"[file tail [info script]]\""
	puts "    AWS not configured by user choice."

    } else {
	puts "    Aborting the tests found in \"[file tail [info script]]\""
	puts "    AWS configuration required, missing."
	puts "    Place access id and secret key into the files"
	puts "    - [asset aws-access-id], and"
	puts "    - [asset aws-secret-access-key]"
    }
    return
}

# -------------------------------------------------------------------------

support {

    useLocal xsxp.tcl xsxp ;# Here we need (tcl)xml
}
testing {
    useLocal S3.tcl S3
}

# -------------------------------------------------------------------------

# I normally leave BucketDeletion false, because Amazon gets cranky
# if you delete a bucket and then try to recreate it any time soon.

# This may clobber files starting with the characers "S3T". Don't
# run it in a directory with such files you want.

# Put your own keys in test-assets/test-S3.config.

tcltest::customMatch S3err S3ErrorMatch

tcltest::testConstraint BucketDeletion false
tcltest::testConstraint REST true
tcltest::testConstraint BucketIO true
tcltest::testConstraint ItemIO true







<
<






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

>
|













|







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
source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0



if {[catch {package require xml}]} {
    puts "    Aborting the tests found in \"[file tail [info script]]\""
    puts "    Requiring xml package, not found."
    return
}























support {
    # Requires xml (TclXML)
    useLocal xsxp.tcl xsxp
}
testing {
    useLocal S3.tcl S3
}

# -------------------------------------------------------------------------

# I normally leave BucketDeletion false, because Amazon gets cranky
# if you delete a bucket and then try to recreate it any time soon.

# This may clobber files starting with the characers "S3T". Don't
# run it in a directory with such files you want.

# Put your own keys in S3-test.config.

tcltest::customMatch S3err S3ErrorMatch

tcltest::testConstraint BucketDeletion false
tcltest::testConstraint REST true
tcltest::testConstraint BucketIO true
tcltest::testConstraint ItemIO true
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
}

proc bgerror {args} {set ::S3::afterResult [list "BGERROR" $args $::errorInfo]}

# Allow easy incorporation of user's AccessID and SecretKey

proc S3loadKeys {} {
    source [asset test-S3.config]
}

namespace import ::tcltest::test

proc CleanUpBuckets {{buckets 0}} {
    S3loadKeys
    set bucket [S3::SuggestBucket TclTestS3b]







|







121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
}

proc bgerror {args} {set ::S3::afterResult [list "BGERROR" $args $::errorInfo]}

# Allow easy incorporation of user's AccessID and SecretKey

proc S3loadKeys {} {
    source test-S3.config
}

namespace import ::tcltest::test

proc CleanUpBuckets {{buckets 0}} {
    S3loadKeys
    set bucket [S3::SuggestBucket TclTestS3b]

Added modules/amazon-s3/test-S3.config.





>
>
1
2
S3::Configure -accesskeyid use-yours \
-secretaccesskey put-yours-here

Deleted modules/amazon-s3/test-assets/test-S3.config.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
# Scope: proc S3loadkeys
    
set i [open [asset aws-access-id]         r]
set k [open [asset aws-secret-access-key] r]

set id [read $i] ; close $i
set ky [read $k] ; close $k

S3::Configure -accesskeyid $id -secretaccesskey $ky

# Memoize
proc S3loadKeys {} \
    [list S3::Configure -accesskeyid $id -secretaccesskey $ky]
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Changes to modules/amazon-s3/xsxp.man.

129
130
131
132
133
134
135
136
137
[call [cmd xsxp::prettyprint] [arg pxml] [opt [arg chan]]]
This outputs to [arg chan] (default stdout) a pretty-printed
version of [arg pxml].

[list_end]

[vset CATEGORY amazon-s3]
[include ../common-text/feedback.inc]
[manpage_end]







|

129
130
131
132
133
134
135
136
137
[call [cmd xsxp::prettyprint] [arg pxml] [opt [arg chan]]]
This outputs to [arg chan] (default stdout) a pretty-printed
version of [arg pxml].

[list_end]

[vset CATEGORY amazon-s3]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/asn/asn.man.

456
457
458
459
460
461
462
463
464

[section EXAMPLES]

Examples for the usage of this package can be found in the
implementation of package [package ldap].

[vset CATEGORY asn]
[include ../common-text/feedback.inc]
[manpage_end]







|

456
457
458
459
460
461
462
463
464

[section EXAMPLES]

Examples for the usage of this package can be found in the
implementation of package [package ldap].

[vset CATEGORY asn]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/base32/base32.man.

67
68
69
70
71
72
73
74
75
	5 F   14 O   23 X
	6 G   15 P   24 Y
	7 H   16 Q   25 Z
	8 I   17 R   26 2
}]

[vset CATEGORY base32]
[include ../common-text/feedback.inc]
[manpage_end]







|

67
68
69
70
71
72
73
74
75
	5 F   14 O   23 X
	6 G   15 P   24 Y
	7 H   16 Q   25 Z
	8 I   17 R   26 2
}]

[vset CATEGORY base32]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/base32/base32core.man.

58
59
60
61
62
63
64
65
66
[enum] The length of the input is not a multiple of eight,
[enum] The padding appears not at the end of input, but in the middle,
[enum] The padding has not of length six, four, three, or one characters,
[list_end]
[list_end]

[vset CATEGORY base32]
[include ../common-text/feedback.inc]
[manpage_end]







|

58
59
60
61
62
63
64
65
66
[enum] The length of the input is not a multiple of eight,
[enum] The padding appears not at the end of input, but in the middle,
[enum] The padding has not of length six, four, three, or one characters,
[list_end]
[list_end]

[vset CATEGORY base32]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/base32/base32hex.man.

70
71
72
73
74
75
76
77
78
	5 5   14 E        23 N
	6 6   15 F        24 O
	7 7        16 G   25 P
	8 8        17 H   26 Q
}]

[vset CATEGORY base32]
[include ../common-text/feedback.inc]
[manpage_end]







|

70
71
72
73
74
75
76
77
78
	5 5   14 E        23 N
	6 6   15 F        24 O
	7 7        16 G   25 P
	8 8        17 H   26 Q
}]

[vset CATEGORY base32]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/base64/ascii85.man.

67
68
69
70
71
72
73
74
75
[list_begin enum]
[enum] [uri http://en.wikipedia.org/wiki/Ascii85]
[enum] Postscript Language Reference Manual, 3rd Edition, page 131.
       [uri http://www.adobe.com/devnet/postscript/pdfs/PLRM.pdf]
[list_end]

[vset CATEGORY base64]
[include ../common-text/feedback.inc]
[manpage_end]







|

67
68
69
70
71
72
73
74
75
[list_begin enum]
[enum] [uri http://en.wikipedia.org/wiki/Ascii85]
[enum] Postscript Language Reference Manual, 3rd Edition, page 131.
       [uri http://www.adobe.com/devnet/postscript/pdfs/PLRM.pdf]
[list_end]

[vset CATEGORY base64]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/base64/base64.man.

62
63
64
65
66
67
68
69
70
% set chemical [encoding convertto utf-8 "C\u2088H\u2081\u2080N\u2084O\u2082"]
% set encoded [base64::encode $chemical]
Q+KCiEjigoHigoBO4oKET+KCgg==
% set caffeine [encoding convertfrom utf-8 [base64::decode $encoded]]
}]

[vset CATEGORY base64]
[include ../common-text/feedback.inc]
[manpage_end]







|

62
63
64
65
66
67
68
69
70
% set chemical [encoding convertto utf-8 "C\u2088H\u2081\u2080N\u2084O\u2082"]
% set encoded [base64::encode $chemical]
Q+KCiEjigoHigoBO4oKET+KCgg==
% set caffeine [encoding convertfrom utf-8 [base64::decode $encoded]]
}]

[vset CATEGORY base64]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/base64/uuencode.man.

89
90
91
92
93
94
95
96
97
[para]
[example {
% uuencode::uudecode $d
{hello.txt 644 {Hello World}}
}]

[vset CATEGORY base64]
[include ../common-text/feedback.inc]
[manpage_end]







|

89
90
91
92
93
94
95
96
97
[para]
[example {
% uuencode::uudecode $d
{hello.txt 644 {Hello World}}
}]

[vset CATEGORY base64]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/base64/yencode.man.

88
89
90
91
92
93
94
95
96
[section References]

[list_begin enum]
[enum] [uri http://www.yenc.org/yenc-draft.1.3.txt]
[list_end]

[vset CATEGORY base64]
[include ../common-text/feedback.inc]
[manpage_end]







|

88
89
90
91
92
93
94
95
96
[section References]

[list_begin enum]
[enum] [uri http://www.yenc.org/yenc-draft.1.3.txt]
[list_end]

[vset CATEGORY base64]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/bee/bee.man.

335
336
337
338
339
340
341
342
343
By wrapping an integer number into [const i]...[const e] the format
makes sure that they are different from strings, which all begin with
a digit.

[section EXAMPLES]

[vset CATEGORY bee]
[include ../common-text/feedback.inc]
[manpage_end]







|

335
336
337
338
339
340
341
342
343
By wrapping an integer number into [const i]...[const e] the format
makes sure that they are different from strings, which all begin with
a digit.

[section EXAMPLES]

[vset CATEGORY bee]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/bee/bee.pcx.

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	checkWord
    }}
pcx::check 0.1 std ::bee::encodeDict \
    {checkSimpleArgs 1 1 {
	checkDict
    }}
pcx::check 0.1 std ::bee::encodeDictArgs \
    {checkSimpleArgsModNk 0 -1 2 0 {
	checkWord
	checkWord
    }}
pcx::check 0.1 std ::bee::encodeList \
    {checkSimpleArgs 1 1 {
	checkList
    }}







|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	checkWord
    }}
pcx::check 0.1 std ::bee::encodeDict \
    {checkSimpleArgs 1 1 {
	checkDict
    }}
pcx::check 0.1 std ::bee::encodeDictArgs \
    {checkSimpleArgsModNk 0 2 {
	checkWord
	checkWord
    }}
pcx::check 0.1 std ::bee::encodeList \
    {checkSimpleArgs 1 1 {
	checkList
    }}

Changes to modules/bee/bee.test.

1
2
3
4
5


6
7
8
9
10
11
12
# -*- tcl -*-
# bee.test:  tests for the bee encoding.
#
# Copyright (c) 2004,2018 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]




|

>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
# bee.test:  tests for the bee encoding.
#
# Copyright (c) 2004 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: bee.test,v 1.9 2006/10/09 21:41:39 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
}


test bee-12.0 {decoder, torrent file} {
    set end 0

    # tcltest::viewFile does not do binary :(
    set f [open  [asset example.torrent] r]
    fconfigure $f -translation binary
    set d [read $f]
    close $f

    set data [bee::decode $d end]

    # Cut the binary stuff out of the result, to much, display problems







|







303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
}


test bee-12.0 {decoder, torrent file} {
    set end 0

    # tcltest::viewFile does not do binary :(
    set f [open  [file join $::tcltest::testsDirectory example.torrent] r]
    fconfigure $f -translation binary
    set d [read $f]
    close $f

    set data [bee::decode $d end]

    # Cut the binary stuff out of the result, to much, display problems
376
377
378
379
380
381
382
383
	removeFile bee16.$n
	set res
    } [lrange $result 0 1] ; # {}
}

# ....... ............................................................
testsuiteCleanup
return







<
378
379
380
381
382
383
384

	removeFile bee16.$n
	set res
    } [lrange $result 0 1] ; # {}
}

# ....... ............................................................
testsuiteCleanup

Added modules/bee/example.torrent.

cannot compute difference between binary files

Deleted modules/bee/test-assets/example.torrent.

cannot compute difference between binary files

Changes to modules/bench/bench.man.

288
289
290
291
292
293
294
295
296
The benchmark could be executed, however the result from its body did
not match the declared expectations.

[list_end]
[list_end]

[vset CATEGORY bench]
[include ../common-text/feedback.inc]
[manpage_end]







|

288
289
290
291
292
293
294
295
296
The benchmark could be executed, however the result from its body did
not match the declared expectations.

[list_end]
[list_end]

[vset CATEGORY bench]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/bench/bench_intro.man.

83
84
85
86
87
88
89
90
91
[section {HISTORICAL NOTES}]

This module and package have been derived from Jeff Hobbs'
[syscmd tclbench] application for the benchmarking of the Tcl core and
its ancestor [file runbench.tcl].

[vset CATEGORY bench]
[include ../common-text/feedback.inc]
[manpage_end]







|

83
84
85
86
87
88
89
90
91
[section {HISTORICAL NOTES}]

This module and package have been derived from Jeff Hobbs'
[syscmd tclbench] application for the benchmarking of the Tcl core and
its ancestor [file runbench.tcl].

[vset CATEGORY bench]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/bench/bench_lang_intro.man.

145
146
147
148
149
150
151
152
153
to understand the formal [term {bench language specfication}]. It will
also serve as the detailed specification and cheat sheet for all
available commands and their syntax.

[para]

[vset CATEGORY bench]
[include ../common-text/feedback.inc]
[manpage_end]







|

145
146
147
148
149
150
151
152
153
to understand the formal [term {bench language specfication}]. It will
also serve as the detailed specification and cheat sheet for all
available commands and their syntax.

[para]

[vset CATEGORY bench]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/bench/bench_lang_spec.man.

124
125
126
127
128
129
130
131
132
responsibility is to create whatever resources are needed by the body
to run without failing.

[list_end]
[list_end]

[vset CATEGORY bench]
[include ../common-text/feedback.inc]
[manpage_end]







|

124
125
126
127
128
129
130
131
132
responsibility is to create whatever resources are needed by the body
to run without failing.

[list_end]
[list_end]

[vset CATEGORY bench]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/bench/bench_read.man.

57
58
59
60
61
62
63
64
65
[para]

and automatically detects which format is used by the input file.

[list_end]

[vset CATEGORY bench]
[include ../common-text/feedback.inc]
[manpage_end]







|

57
58
59
60
61
62
63
64
65
[para]

and automatically detects which format is used by the input file.

[list_end]

[vset CATEGORY bench]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/bench/bench_wcsv.man.

46
47
48
49
50
51
52
53
54
For other formatting styles see the packages [package bench] and
[package bench::out::text] which provide commands to format benchmark
results in raw form, or for human consumption, respectively.

[list_end]

[vset CATEGORY bench]
[include ../common-text/feedback.inc]
[manpage_end]







|

46
47
48
49
50
51
52
53
54
For other formatting styles see the packages [package bench] and
[package bench::out::text] which provide commands to format benchmark
results in raw form, or for human consumption, respectively.

[list_end]

[vset CATEGORY bench]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/bench/bench_wtext.man.

47
48
49
50
51
52
53
54
55
For other formatting styles see the packages [package bench] and
[package bench::out::csv] which provide commands to format benchmark
results in raw form, or as importable CSV data, respectively.

[list_end]

[vset CATEGORY bench]
[include ../common-text/feedback.inc]
[manpage_end]







|

47
48
49
50
51
52
53
54
55
For other formatting styles see the packages [package bench] and
[package bench::out::csv] which provide commands to format benchmark
results in raw form, or as importable CSV data, respectively.

[list_end]

[vset CATEGORY bench]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/bibtex/ChangeLog.

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
2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	*

2011-12-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.14 ========================
	*

2011-01-24  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.13 ========================
	*

2009-12-07  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.12 ========================
	*

2008-12-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11.1 ========================
	*

2008-10-16  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11 ========================
	*

2008-06-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* bibtex.pcx: New file. Syntax definitions for the public commands
	  of the bibtex package.

2007-09-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.10 ========================
	*

2007-03-19  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* bibtex.man: Fixed all warnings due to use of now deprecated
	  commands. Added a section about how to give feedback.

2006-10-03  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.9 ========================
	*

2006-01-22  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* bibtex.test: More boilerplate simplified via use of test support.

2006-01-19  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* bibtex.test: Hooked into the new common test support code.

2005-10-06  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.8 ========================
	*

2005-04-16  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* example.tcl: Moved out of the module into a new directory
	  'bibtex/' under the examples tree.

2005-03-14  Andreas Kupries  <andreas_kupries@users.sourceforge.net>




|





|





|





|





|





|










|










|













|







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
2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2011-12-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.14 ========================
	* 

2011-01-24  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.13 ========================
	* 

2009-12-07  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.12 ========================
	* 

2008-12-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11.1 ========================
	* 

2008-10-16  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11 ========================
	* 

2008-06-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* bibtex.pcx: New file. Syntax definitions for the public commands
	  of the bibtex package.

2007-09-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.10 ========================
	* 

2007-03-19  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* bibtex.man: Fixed all warnings due to use of now deprecated
	  commands. Added a section about how to give feedback.

2006-10-03  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.9 ========================
	* 

2006-01-22  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* bibtex.test: More boilerplate simplified via use of test support.

2006-01-19  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* bibtex.test: Hooked into the new common test support code.

2005-10-06  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.8 ========================
	* 

2005-04-16  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* example.tcl: Moved out of the module into a new directory
	  'bibtex/' under the examples tree.

2005-03-14  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

Changes to modules/bibtex/bibtex.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 0.7]
[manpage_begin bibtex n [vset VERSION]]
[keywords bibliography]
[keywords bibtex]
[keywords parsing]
[keywords {text processing}]
[copyright {2005 for documentation, Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {bibtex}]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 0.6]
[manpage_begin bibtex n [vset VERSION]]
[keywords bibliography]
[keywords bibtex]
[keywords parsing]
[keywords {text processing}]
[copyright {2005 for documentation, Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {bibtex}]
172
173
174
175
176
177
178
179
180
replacement strings. This command has the correct signature for use as
a [option -stringcommand] callback in an invokation of the command
[cmd ::bibtex::parse].

[list_end]

[vset CATEGORY bibtex]
[include ../common-text/feedback.inc]
[manpage_end]







|

172
173
174
175
176
177
178
179
180
replacement strings. This command has the correct signature for use as
a [option -stringcommand] callback in an invokation of the command
[cmd ::bibtex::parse].

[list_end]

[vset CATEGORY bibtex]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/bibtex/bibtex.tcl.

407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
}

proc ::bibtex::ParseBlock {block} {
    set ret   [list]
    set index 0
    while {
	[regexp -start $index -indices -- \
	     {(\S+)\s*=(.*)} $block -> key rest]
    } {
	foreach {ks ke} $key break
	set k [Tidy [string range $block $ks $ke]]
	foreach {rs re} $rest break
	foreach {v index} \
		[ParseBibString $rs [string range $block $rs $re]] \
		break







|







407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
}

proc ::bibtex::ParseBlock {block} {
    set ret   [list]
    set index 0
    while {
	[regexp -start $index -indices -- \
		{(\S+)[^=]*=(.*)} $block -> key rest]
    } {
	foreach {ks ke} $key break
	set k [Tidy [string range $block $ks $ke]]
	foreach {rs re} $rest break
	foreach {v index} \
		[ParseBibString $rs [string range $block $rs $re]] \
		break
443
444
445
446
447
448
449
450
451
452
453
454
455

456
457

458
459
460
461
462
463
464
465
466
467

468
469
470
471
472
473
474
		continue
	    } elseif {$char eq ","} {
		if {$count == 0} break
	    } elseif {$char eq "\\"} {
		set escape 1
		continue
	    } elseif {$char eq "\""} {
	        # Handling the case where str is surrounded by
	        # quotation marks instead of braces (as some journals
	        # may, perhaps erroneously, print some field. e.g.:
	        # https://www.epj.org/)
	        if {$count == 0} {
	            incr count

	        } elseif {$count == 1} {
 	            incr count -1

 	        }
		continue
	    }
	    # else: Nothing
	}
	append retstr $char
    }
    regsub -all {\s+} $retstr { } retstr
    return [list [string trim $retstr] $index]
}


# ### ### ### ######### ######### #########
## Internal. Package configuration and state.

namespace eval bibtex {
    # Counter for the generation of parser tokens.
    variable id 0







|
|
<
<
|
|
>
|
|
>
|









>







443
444
445
446
447
448
449
450
451


452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
		continue
	    } elseif {$char eq ","} {
		if {$count == 0} break
	    } elseif {$char eq "\\"} {
		set escape 1
		continue
	    } elseif {$char eq "\""} {
		# Managing the count ensures that comma inside of a
		# string is not considered as the end of the field.


		if {!$string} {
		    incr count
		    set string 1
		} else {
		    incr count -1
		    set string 0
		}
		continue
	    }
	    # else: Nothing
	}
	append retstr $char
    }
    regsub -all {\s+} $retstr { } retstr
    return [list [string trim $retstr] $index]
}


# ### ### ### ######### ######### #########
## Internal. Package configuration and state.

namespace eval bibtex {
    # Counter for the generation of parser tokens.
    variable id 0
493
494
495
496
497
498
499
500
501
    # -commentcommand  -- callback for @comment blocks
    # -progresscommand -- callback to indicate progress of parse
    ##
}

# ### ### ### ######### ######### #########
## Ready to go
package provide bibtex 0.7
# EOF







|

494
495
496
497
498
499
500
501
502
    # -commentcommand  -- callback for @comment blocks
    # -progresscommand -- callback to indicate progress of parse
    ##
}

# ### ### ### ######### ######### #########
## Ready to go
package provide bibtex 0.6
# EOF

Changes to modules/bibtex/bibtex.test.

1
2
3
4
5


6
7
8
9
10
11
12
# -*- tcl -*-
# bibtex.test:  tests for the bibtex parser.
#
# Copyright (c) 2005 by Andreas Kupries <a.kupries@westend.com>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]






>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
# bibtex.test:  tests for the bibtex parser.
#
# Copyright (c) 2005 by Andreas Kupries <a.kupries@westend.com>
# All rights reserved.
#
# RCS: @(#) $Id: bibtex.test,v 1.7 2006/10/09 21:41:40 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
	year      1990 \
	pages     471--478 \
	address   {Boston, MA} \
	]]]


test bibtex-2.0 {Parse string, direct result} {
    set str [viewFile [asset bytecode.bib]]
    bibtex::parse $str
} $bytecode

test bibtex-2.1 {Parse string, sax mode} {
    set track {}
    set str [viewFile [asset bytecode.bib]]
    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   {track string__} \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \
	    $str]
    bibtex::destroy $t
    list $t $track
} [list bibtex2 [list \
	{progress bibtex2 100} \
	[linsert [lindex $bytecode 0] 0 record__ bibtex2]
]]

test bibtex-2.2 {Parse channel, direct result} {
    # The contents of penn_sub.bib have been taken out of
    # ftp://ftp.cis.upenn.edu/pub/anoop/bib/pennbib.bib

    set chan    [open [asset penn_sub.bib] r]
    set records [bibtex::parse -channel $chan]
    close $chan
    set records
} $pennfull

test bibtex-2.3 {Parse channel, sax mode} {
    set track {}
    set chan [open [asset penn_sub.bib] r]

    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   {track string__} \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \







|





|


















|







|







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
	year      1990 \
	pages     471--478 \
	address   {Boston, MA} \
	]]]


test bibtex-2.0 {Parse string, direct result} {
    set str [viewFile [file join [file dirname [info script]] bytecode.bib]]
    bibtex::parse $str
} $bytecode

test bibtex-2.1 {Parse string, sax mode} {
    set track {}
    set str [viewFile [file join [file dirname [info script]] bytecode.bib]]
    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   {track string__} \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \
	    $str]
    bibtex::destroy $t
    list $t $track
} [list bibtex2 [list \
	{progress bibtex2 100} \
	[linsert [lindex $bytecode 0] 0 record__ bibtex2]
]]

test bibtex-2.2 {Parse channel, direct result} {
    # The contents of penn_sub.bib have been taken out of
    # ftp://ftp.cis.upenn.edu/pub/anoop/bib/pennbib.bib

    set chan    [open [file join [file dirname [info script]] penn_sub.bib] r]
    set records [bibtex::parse -channel $chan]
    close $chan
    set records
} $pennfull

test bibtex-2.3 {Parse channel, sax mode} {
    set track {}
    set chan [open [file join [file dirname [info script]] penn_sub.bib] r]

    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   {track string__} \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
	{string__ bibtex4 {aaai90 {Proc. National Conference on Artificial Intelligence, Boston}}} \
	{progress bibtex4 100} \
	[linsert [lindex $penn 0] 0 record__ bibtex4] \
	]

test bibtex-2.4 {Parse channel, sax mode 2} {
    set track {}
    set chan [open [asset penn_sub.bib] r]

    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   addstr \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \







|







164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
	{string__ bibtex4 {aaai90 {Proc. National Conference on Artificial Intelligence, Boston}}} \
	{progress bibtex4 100} \
	[linsert [lindex $penn 0] 0 record__ bibtex4] \
	]

test bibtex-2.4 {Parse channel, sax mode 2} {
    set track {}
    set chan [open [file join [file dirname [info script]] penn_sub.bib] r]

    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   addstr \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
	[linsert [lindex $pennfull 0] 0 record__ bibtex5] \
	]

test bibtex-2.5 {Parse channel, async} {
    # The contents of penn_sub.bib have been taken out of
    # ftp://ftp.cis.upenn.edu/pub/anoop/bib/pennbib.bib

    set chan [open [asset penn_sub.bib] r]
    proc done {args} {global done ; set done $args ; return}

    set done ""
    set t [bibtex::parse -command done -channel $chan]
    vwait ::done
    bibtex::destroy $t
    close $chan







|







188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
	[linsert [lindex $pennfull 0] 0 record__ bibtex5] \
	]

test bibtex-2.5 {Parse channel, async} {
    # The contents of penn_sub.bib have been taken out of
    # ftp://ftp.cis.upenn.edu/pub/anoop/bib/pennbib.bib

    set chan [open [file join [file dirname [info script]] penn_sub.bib] r]
    proc done {args} {global done ; set done $args ; return}

    set done ""
    set t [bibtex::parse -command done -channel $chan]
    vwait ::done
    bibtex::destroy $t
    close $chan
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
test bibtex-3.2 {Destroying a parser} {
    set code [catch {::bibtex::destroy foo} msg]
    list $code $msg
} {1 {Illegal bibtex parser "foo"}}

test bibtex-4.0 {Destroying a parser} {

    set chan [open [asset bytecode.bib] r]
    proc done {args} {global done ; set done $args ; return}

    set done ""
    set t [bibtex::parse -command done -channel $chan]
    bibtex::destroy $t
    close $chan
} {}

# -------------------------------------------------------------------------

test bibtex-5.0 {Tkt 8bec717add, parse} {
    bibtex::parse [viewFile [asset epj.bib]]
} {{article refId0 {author {Santonocito, Domenico and Blumenfeld, Yorick} title {The hot GDR revisited} doi 10.1140/epja/s10050-020-00279-6 url https://doi.org/10.1140/epja/s10050-020-00279-6 journal {Eur. Phys. J. A} year 2020 volume 56 number 11 pages 279}}}

# ... Tests of addStrings ...
#     (Requires introspection of parser state)
# -------------------------------------------------------------------------
testsuiteCleanup
return








|








<
<
<
<
<
<


|

<
<
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232






233
234
235
236


test bibtex-3.2 {Destroying a parser} {
    set code [catch {::bibtex::destroy foo} msg]
    list $code $msg
} {1 {Illegal bibtex parser "foo"}}

test bibtex-4.0 {Destroying a parser} {

    set chan [open [file join [file dirname [info script]] bytecode.bib] r]
    proc done {args} {global done ; set done $args ; return}

    set done ""
    set t [bibtex::parse -command done -channel $chan]
    bibtex::destroy $t
    close $chan
} {}







# ... Tests of addStrings ...
#     (Requires introspection of parser state)

testsuiteCleanup


Added modules/bibtex/bytecode.bib.













>
>
>
>
>
>
1
2
3
4
5
6
@Book{krasner83,
  title = 	 "Smalltalk-80: Bits of History, Words of Advice",
  publisher = 	 "Addison-Wesley",
  year = 	 1983,
  editor =	 "Glen Krasner"
}

Added modules/bibtex/penn_sub.bib.























>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
@String{aaai90 = "Proc. National Conference on Artificial Intelligence,
                 Boston"}
@InProceedings{Carberry90,
  author =       "Sandra Carberry",
  title =        "Incorporating default inferences into plan
                 recognition",
  booktitle =    "aaai90",
  year =         "1990",
  pages =        "471--478",
  address =      "Boston, MA",
}

Changes to modules/bibtex/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded bibtex 0.7 [list source [file join $dir bibtex.tcl]]

|
1
2
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded bibtex 0.6 [list source [file join $dir bibtex.tcl]]

Deleted modules/bibtex/test-assets/bytecode.bib.

1
2
3
4
5
6
@Book{krasner83,
  title = 	 "Smalltalk-80: Bits of History, Words of Advice",
  publisher = 	 "Addison-Wesley",
  year = 	 1983,
  editor =	 "Glen Krasner"
}
<
<
<
<
<
<












Deleted modules/bibtex/test-assets/epj.bib.

1
2
3
4
5
6
7
8
9
10
11
@article{ refId0,
	author = {{Santonocito, Domenico} and {Blumenfeld, Yorick}},
	title = {The hot GDR revisited},
	DOI= "10.1140/epja/s10050-020-00279-6",
	url= "https://doi.org/10.1140/epja/s10050-020-00279-6",
	journal = {Eur. Phys. J. A},
	year = 2020,
	volume = 56,
	number = 11,
	pages = "279",
}
<
<
<
<
<
<
<
<
<
<
<






















Deleted modules/bibtex/test-assets/penn_sub.bib.

1
2
3
4
5
6
7
8
9
10
11
@String{aaai90 = "Proc. National Conference on Artificial Intelligence,
                 Boston"}
@InProceedings{Carberry90,
  author =       "Sandra Carberry",
  title =        "Incorporating default inferences into plan
                 recognition",
  booktitle =    "aaai90",
  year =         "1990",
  pages =        "471--478",
  address =      "Boston, MA",
}
<
<
<
<
<
<
<
<
<
<
<






















Changes to modules/blowfish/blowfish.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[vset VERSION 1.0.5]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin blowfish n [vset VERSION]]
[see_also 3des]
[see_also des]
[see_also rc4]
[keywords {block cipher}]
[keywords blowfish]
[keywords cryptography]
[keywords encryption]
[keywords security]
[copyright {2003, Pat Thoyts <patthoyts@users.sourceforge.net>}]
[moddesc   {Blowfish Block Cipher}]
[titledesc {Implementation of the Blowfish block cipher}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.4]
[require blowfish [opt [vset VERSION]]]
[description]
[para]

This package is an implementation in Tcl of the Blowfish algorithm
developed by Bruce Schneier [lb]1[rb]. Blowfish is a 64-bit block cipher
designed to operate quickly on 32 bit architectures and accepting a
variable key length. This implementation supports ECB and CBC mode
<

|













|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin blowfish n 1.0.3]
[see_also 3des]
[see_also des]
[see_also rc4]
[keywords {block cipher}]
[keywords blowfish]
[keywords cryptography]
[keywords encryption]
[keywords security]
[copyright {2003, Pat Thoyts <patthoyts@users.sourceforge.net>}]
[moddesc   {Blowfish Block Cipher}]
[titledesc {Implementation of the Blowfish block cipher}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.4]
[require blowfish [opt 1.0.4]]
[description]
[para]

This package is an implementation in Tcl of the Blowfish algorithm
developed by Bruce Schneier [lb]1[rb]. Blowfish is a 64-bit block cipher
designed to operate quickly on 32 bit architectures and accepting a
variable key length. This implementation supports ECB and CBC mode
157
158
159
160
161
162
163
164
165

[list_end]

[section AUTHORS]
Frank Pilhofer, Pat Thoyts

[vset CATEGORY blowfish]
[include ../common-text/feedback.inc]
[manpage_end]







|

156
157
158
159
160
161
162
163
164

[list_end]

[section AUTHORS]
Frank Pilhofer, Pat Thoyts

[vset CATEGORY blowfish]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/blowfish/blowfish.tcl.

505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
#
proc ::blowfish::Chunk {Key in {out {}} {chunksize 4096} {pad \0}} {
    upvar #0 $Key state
    
    if {[eof $in]} {
        fileevent $in readable {}
        set state(reading) 0
        set data $state(remainder)

        # Only pad at the end of the stream.
        if {[string length $pad] > 0} {
            set data [Pad $data 8 $pad]
        }
    } else {
        set data [read $in $chunksize]
        #puts "Chunk: reading [string len $data] bytes"
        set data $state(remainder)$data

        # If data is not a multiple of 8, state(remainder) will hold
        # excess bytes for the next round.
        set pagedlen         [expr {([string length $data] / 8) * 8}]
        set state(remainder) [string range $data $pagedlen end]
        incr pagedlen        -1
        set data             [string range $data 0 $pagedlen]
    }

    if {![string length $data]} return

    if {[set code [catch {
        set cipher [$state(cmd) $Key $data]
    } msg]]} {
        fileevent $in readable {}
        set state(reading) 0
        set state(err) [list $code $msg]
        return
    }
    
    if {$out == {}} {
        append state(output) $cipher
    } else {
        puts -nonewline $out $cipher
    }
}

# -------------------------------------------------------------------------

# LoadAccelerator --
#







<
|
<
<
<
|
<
|
<
<
|
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<



|

|







505
506
507
508
509
510
511

512



513

514


515








516
517







518
519
520
521
522
523
524
525
526
527
528
529
530
#
proc ::blowfish::Chunk {Key in {out {}} {chunksize 4096} {pad \0}} {
    upvar #0 $Key state
    
    if {[eof $in]} {
        fileevent $in readable {}
        set state(reading) 0

    }





    set data [read $in $chunksize]


    # FIX ME: we should ony pad after eof








    if {[string length $pad] > 0} {
        set data [Pad $data 8]







    }
    
    if {$out == {}} {
        append state(output) [$state(cmd) $Key $data]
    } else {
        puts -nonewline $out [$state(cmd) $Key $data]
    }
}

# -------------------------------------------------------------------------

# LoadAccelerator --
#
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
    }
    return $char
}

proc ::blowfish::Pad {data blocksize {fill \0}} {
    set len [string length $data]
    if {$len == 0} {
        # do not pad an empty string
    } elseif {($len % $blocksize) != 0} {
        set pad [expr {$blocksize - ($len % $blocksize)}]
        append data [string repeat $fill $pad]
    }
    return $data
}








|







581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
    }
    return $char
}

proc ::blowfish::Pad {data blocksize {fill \0}} {
    set len [string length $data]
    if {$len == 0} {
        set data [string repeat $fill $blocksize]
    } elseif {($len % $blocksize) != 0} {
        set pad [expr {$blocksize - ($len % $blocksize)}]
        append data [string repeat $fill $pad]
    }
    return $data
}

656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
    
    if {$opts(-key) == {}} {
        return -code error "no key provided: the -key option is required"
    }
    
    set r {}
    if {$opts(-in) == {}} {
        # Immediate data (plain text is argument).
        
        if {[llength $args] != 1} {
            return -code error "wrong \# args:\
                should be \"blowfish ?options...? -key keydata plaintext\""
        }

        set data [lindex $args 0]
        if {[string length $opts(-pad)] > 0} {







<
|







634
635
636
637
638
639
640

641
642
643
644
645
646
647
648
    
    if {$opts(-key) == {}} {
        return -code error "no key provided: the -key option is required"
    }
    
    set r {}
    if {$opts(-in) == {}} {


        if {[llength $args] != 1} {
            return -code error "wrong \# args:\
                should be \"blowfish ?options...? -key keydata plaintext\""
        }

        set data [lindex $args 0]
        if {[string length $opts(-pad)] > 0} {
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730

        if {$opts(-out) != {}} {
            puts -nonewline $opts(-out) $r
            set r {}
        }
        
    } else {
        # Channel data (plain text is read from a binary channel).
        
        if {[llength $args] != 0} {
            return -code error "wrong \# args:\
                should be \"blowfish ?options...? -key keydata -in channel\""
        }
        
        set Key [Init $opts(-mode) $opts(-key) $opts(-iv)]
        upvar $Key state
        set state(reading) 1
        if {[string equal $opts(-dir) "encrypt"]} {
            set state(cmd) Encrypt
        } else {
            set state(cmd) Decrypt
        }
        set state(output) ""
        set state(remainder) ""
        fileevent $opts(-in) readable \
            [list [namespace origin Chunk] \
                 $Key $opts(-in) $opts(-out) $opts(-chunksize) $opts(-pad)]
        if {[info commands ::tkwait] != {}} {
            tkwait variable [subst $Key](reading)
        } else {
            vwait [subst $Key](reading)
        }

        if {[info exists state(err)]} {
            foreach {code msg} $state(err) break
            return -code $code $msg
        }
        
        if {$opts(-out) == {}} {
            set r $state(output)
        }
        Final $Key

    }








<
|














<








<
<
<
<
<
<







663
664
665
666
667
668
669

670
671
672
673
674
675
676
677
678
679
680
681
682
683
684

685
686
687
688
689
690
691
692






693
694
695
696
697
698
699

        if {$opts(-out) != {}} {
            puts -nonewline $opts(-out) $r
            set r {}
        }
        
    } else {


        if {[llength $args] != 0} {
            return -code error "wrong \# args:\
                should be \"blowfish ?options...? -key keydata -in channel\""
        }
        
        set Key [Init $opts(-mode) $opts(-key) $opts(-iv)]
        upvar $Key state
        set state(reading) 1
        if {[string equal $opts(-dir) "encrypt"]} {
            set state(cmd) Encrypt
        } else {
            set state(cmd) Decrypt
        }
        set state(output) ""

        fileevent $opts(-in) readable \
            [list [namespace origin Chunk] \
                 $Key $opts(-in) $opts(-out) $opts(-chunksize) $opts(-pad)]
        if {[info commands ::tkwait] != {}} {
            tkwait variable [subst $Key](reading)
        } else {
            vwait [subst $Key](reading)
        }






        if {$opts(-out) == {}} {
            set r $state(output)
        }
        Final $Key

    }

741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
    variable e {}
    foreach e {trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide blowfish 1.0.5

# -------------------------------------------------------------------------
#
# Local Variables:
# mode: tcl
# indent-tabs-mode: nil
# End:







|







710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
    variable e {}
    foreach e {trf} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide blowfish 1.0.4

# -------------------------------------------------------------------------
#
# Local Variables:
# mode: tcl
# indent-tabs-mode: nil
# End:

Changes to modules/blowfish/blowfish.test.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

testing {
    useLocal blowfish.tcl blowfish
}

# -------------------------------------------------------------------------
# Handle multiple implementation testing

# TODO: Implement the standard procedures for multi-implementation
# handling done in other modules.

array set preserve [array get ::blowfish::accel]

proc implementations {} {
    variable ::blowfish::accel
    foreach {a v} [array get accel] {if {$v} {lappend r $a}}
    lappend r tcl; set r
}







|
<
<
<







13
14
15
16
17
18
19
20



21
22
23
24
25
26
27

testing {
    useLocal blowfish.tcl blowfish
}

# -------------------------------------------------------------------------
# Handle multiple implementation testing
#



array set preserve [array get ::blowfish::accel]

proc implementations {} {
    variable ::blowfish::accel
    foreach {a v} [array get accel] {if {$v} {lappend r $a}}
    lappend r tcl; set r
}
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
# Report versions
#
if {[::blowfish::LoadAccelerator trf]} {
    puts "> Trf based"
}
puts "> pure Tcl"

proc do-imm {data script} {
    upvar 1 in in msg msg

    set in $data

    list [catch {
        uplevel 1 $script
    } msg] $msg
}

proc do-chan {data script} {
    upvar 1 in in msg msg

    set p  [makeBinaryFile $data IN]
    set in [open $p r]
    fconfigure $in -translation binary -encoding binary
            
    set r [list [catch {
        uplevel 1 $script
    } msg] $msg]

    close $in
    file delete $p
    return $r
}

# -------------------------------------------------------------------------
# Now the package specific tests....
# -------------------------------------------------------------------------

# -------------------------------------------------------------------------

#test blowfish-1.0 {blowfish basic command options} {







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







43
44
45
46
47
48
49


























50
51
52
53
54
55
56
# Report versions
#
if {[::blowfish::LoadAccelerator trf]} {
    puts "> Trf based"
}
puts "> pure Tcl"



























# -------------------------------------------------------------------------
# Now the package specific tests....
# -------------------------------------------------------------------------

# -------------------------------------------------------------------------

#test blowfish-1.0 {blowfish basic command options} {
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
    FEDCBA9876543210        FFFFFFFFFFFFFFFF        6B5C5A9C5D9E0A5A
}

set n 0
foreach impl [implementations] {
    select_implementation $impl
    foreach {key plain cipher} $vectors {
        set plainb [binary format H* $plain]
        set keyb   [binary format H* $key]

        test blowfish-$impl-2.$n-imm "blowfish ecb test vector $n (impl $impl)" {
            do-imm $plainb {
                string toupper \
                    [::blowfish::Hex \
                         [::blowfish::blowfish -mode ecb -dir enc \
                              -key $keyb \
                              $in]]
            }
        } [list 0 $cipher]

        test blowfish-$impl-2.$n-chan "blowfish ecb test vector $n (impl $impl)" {
            do-chan $plainb {
                string toupper \
                    [::blowfish::Hex \
                         [::blowfish::blowfish -mode ecb -dir enc \
                              -key $keyb \
                              -in $in]]
            }
        } [list 0 $cipher]

        incr n
        unset plainb keyb
    }
    reset_implementation
}

set vectors {
    F9AD597C49DB005E F0
    E91D21C1D961A6D6 F0E1







<
<
<
|
<
<
<
<
<
<
<
|
<
<
<



|
|
|

<

<







100
101
102
103
104
105
106



107







108



109
110
111
112
113
114
115

116

117
118
119
120
121
122
123
    FEDCBA9876543210        FFFFFFFFFFFFFFFF        6B5C5A9C5D9E0A5A
}

set n 0
foreach impl [implementations] {
    select_implementation $impl
    foreach {key plain cipher} $vectors {



        test blowfish-$impl-2.$n "blowfish ecb test vector $n (impl $impl)" {







            list [catch {



                string toupper \
                    [::blowfish::Hex \
                         [::blowfish::blowfish -mode ecb -dir enc \
                              -key [binary format H* $key] \
                              [binary format H* $plain]]]
            } msg] $msg
        } [list 0 $cipher]

        incr n

    }
    reset_implementation
}

set vectors {
    F9AD597C49DB005E F0
    E91D21C1D961A6D6 F0E1
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238

239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
}

set plain [binary format H* FEDCBA9876543210]
foreach impl [implementations] {
    select_implementation $impl
    set n 0
    foreach {cipher key} $vectors {
        test blowfish-$impl-4.$n-imm "blowfish ecb test variable length key (impl $impl)" {
            set keyb [binary format H* $key]
            
            do-imm $plain {
                string toupper \
                    [::blowfish::Hex \
                         [::blowfish::blowfish \
                              -mode ecb \
                              -dir enc \
                              -key $keyb \
                              $in]]
            }
        } [list 0 $cipher]

        test blowfish-$impl-4.$n-chan "blowfish ecb test variable length key (impl $impl)" {
            do-chan $plain {
                string toupper \
                    [::blowfish::Hex \
                         [::blowfish::blowfish \
                              -mode ecb \
                              -dir enc \
                              -key $keyb \
                              -in $in]]
            }
        } [list 0 $cipher]

        incr n
        unset keyb
    }
    reset_implementation
}

set key [binary format H* 0123456789ABCDEFF0E1D2C3B4A59687]
set iv  [binary format H* FEDCBA9876543210]
set plain [binary format H* \
               37363534333231204E6F77206973207468652074696D6520666F722000000000]

foreach impl [implementations] {
    select_implementation $impl

    test blowfish-$impl-6.1-imm "blowfish cbc mode (impl $impl)" {
        do-imm $plain {

            string toupper \
                [::blowfish::Hex \
                     [::blowfish::blowfish \
                          -dir enc \
                          -mode cbc \
                          -iv $iv \
                          -key $key \
                          $in]]
        }
    } [list 0 6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC]
    
    test blowfish-$impl-6.1-chan "blowfish cbc mode (impl $impl)" {
        do-chan $plain {
            string toupper \
                [::blowfish::Hex \
                     [::blowfish::blowfish \
                          -dir enc \
                          -mode cbc \
                          -iv $iv \
                          -key $key \
                          -in $in]]
        }
    } [list 0 6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC]
    
    reset_implementation
}

#cfb E73214A2822139CAF26ECF6D2EB9E76E3DA3DE04D1517200519D57A6C3
#ofb E73214A2822139CA62B343CC5B65587310DD908D0C241B2263C2CF80DA

foreach impl [implementations] {







|
<
|
<





|
|
<
<
|
<
<
<
<
<
<
<
<
<
<

<

<











<
|
<
>







|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
|
<







146
147
148
149
150
151
152
153

154

155
156
157
158
159
160
161


162










163

164

165
166
167
168
169
170
171
172
173
174
175

176

177
178
179
180
181
182
183
184
185
186
187












188

189
190
191
192
193
194
195
}

set plain [binary format H* FEDCBA9876543210]
foreach impl [implementations] {
    select_implementation $impl
    set n 0
    foreach {cipher key} $vectors {
        test blowfish-$impl-4.$n "blowfish ecb test variable length key (impl $impl)" {

            list [catch {

                string toupper \
                    [::blowfish::Hex \
                         [::blowfish::blowfish \
                              -mode ecb \
                              -dir enc \
                              -key [binary format H* $key] \
                              $plain]]


            } msg] $msg










        } [list 0 $cipher]

        incr n

    }
    reset_implementation
}

set key [binary format H* 0123456789ABCDEFF0E1D2C3B4A59687]
set iv  [binary format H* FEDCBA9876543210]
set plain [binary format H* \
               37363534333231204E6F77206973207468652074696D6520666F722000000000]

foreach impl [implementations] {
    select_implementation $impl

    test blowfish-$impl-6.1 "blowfish cbc mode (impl $impl)" {

        list [catch {
            string toupper \
                [::blowfish::Hex \
                     [::blowfish::blowfish \
                          -dir enc \
                          -mode cbc \
                          -iv $iv \
                          -key $key \
                          $plain]]
        } msg] $msg
    } [list 0 \












           6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC]

    reset_implementation
}

#cfb E73214A2822139CAF26ECF6D2EB9E76E3DA3DE04D1517200519D57A6C3
#ofb E73214A2822139CA62B343CC5B65587310DD908D0C241B2263C2CF80DA

foreach impl [implementations] {
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336


337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360

361
362
363
364


365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
    } {0 0}

    test blowfish-$impl-8.0 {check hyphen in crypt data} {
        list [catch {
            set key "uP/AD/oGb6q/"
            set text "ececho cleardata"
            set cipher [blowfish::blowfish -mode ecb -key $key -dir encrypt $text]
            set plain  [blowfish::blowfish -mode ecb -key $key -dir decrypt $cipher]
            string compare $plain $text
        } msg] $msg
    } {0 0}

    test blowfish-$impl-8.1 {check hyphen in plaintext} {
        list [catch {
            set key "uP/AD/oGb6q/"
            set text "-cecho cleardata"
            set cipher [blowfish::blowfish -mode ecb -key $key -dir encrypt $text]
            set plain  [blowfish::blowfish -mode ecb -key $key -dir decrypt $cipher]
            string compare $plain $text
        } msg] $msg
    } {0 0}

    test blowfish-$impl-8.2 {check hyphen in key} {
        list [catch {
            set key "-P/AD/oGb6q/"
            set text "ececho cleardata"
            set cipher [blowfish::blowfish -mode ecb -key $key -dir encrypt $text]
            set plain [blowfish::blowfish -mode ecb -key $key -dir decrypt $cipher]
            string compare $plain $text
        } msg] $msg
    } {0 0}

    test blowfish-$impl-8.3 {check option termination} {
        list [catch {
            set key "uP/AD/oGb6q/"
            set text "ececho cleardata"
            set cipher [blowfish::blowfish -mode ecb -key $key -dir encrypt -- $text]
            set plain  [blowfish::blowfish -mode ecb -key $key -dir decrypt -- $cipher]
            string compare $plain $text
        } msg] $msg
    } {0 0}



    set key "uP/AD/oGb6q/"
    set text "01234"

    test blowfish-$impl-9.0-imm {check -pad option, as} {
        do-imm $text {
            blowfish::blowfish -mode ecb -hex -key $key -dir encrypt -pad a -- $in
        }
    } {0 8927243c2d7d568c}

    test blowfish-$impl-9.0-chan {check -pad option, as} {
        do-chan $text {
            blowfish::blowfish -mode ecb -hex -key $key -dir encrypt -pad a -in $in
        }
    } {0 8927243c2d7d568c}

    test blowfish-$impl-9.1-imm {check -pad option, spaces} {
        do-imm $text {
            blowfish::blowfish -mode ecb -hex -key $key -dir encrypt -pad { } -- $in
        }
    } {0 3fc711286b8eca79}

    test blowfish-$impl-9.1-chan {check -pad option, spaces} {
        do-chan $text {
            blowfish::blowfish -mode ecb -hex -key $key -dir encrypt -pad { } -in $in

        }
    } {0 3fc711286b8eca79}

    test blowfish-$impl-9.2-imm {check -pad option, no padding} {


        set r [do-imm $text {
            set cipher [blowfish::blowfish -mode ecb -hex -key $key \
                            -dir encrypt -pad "" -- $in]
        }]
        lreplace $r end end \
            [expr {
                   [string equal $msg \
                        {invalid block size: blocks must be 8 bytes}] \
                || [string equal $msg \
                        {can not encrypt incomplete block at end of input}]}]
    } {1 1}

    test blowfish-$impl-9.2-chan {check -pad option, no padding} {
        set r [do-chan $text {
            blowfish::blowfish -mode ecb -hex -key $key -dir encrypt -pad "" -in $in
        }]
        lreplace $r end end \
            [expr {
                   [string equal $msg \
                        {invalid block size: blocks must be 8 bytes}] \
                || [string equal $msg \
                        {can not encrypt incomplete block at end of input}]}]
    } {1 1}

    set key  [binary format H* "04B915BA43FEB5B6"]
    set text [binary format H* "42FD443059577FA2"]
    
    test blowfish-$impl-9.3-imm {check -dir option default is encrypt} {
        do-imm $text {
            blowfish::blowfish -mode ecb -pad "" -hex -key $key -- $in
        }
    } {0 353882b109ce8f1a}
    
    test blowfish-$impl-9.3-chan {check -dir option default is encrypt} {
        do-chan $text {
            blowfish::blowfish -mode ecb -pad "" -hex -key $key -in $in
        }
    } {0 353882b109ce8f1a}

    unset text key

    reset_implementation
}

# -------------------------------------------------------------------------

testsuiteCleanup

# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|









|



















|




>
>
|
|
<
<
<
|
<
<
<
<
<
|
|


|
|
<
<
<
|
<
|
|
>
|


|
>
>
|

|
|
<







|
<
<
<
<
<
<
<
<
<
<
|
|
|
<
<
<
|
<
<
|
<
|
<
|

<
<












221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266



267





268
269
270
271
272
273



274

275
276
277
278
279
280
281
282
283
284
285
286
287

288
289
290
291
292
293
294
295










296
297
298



299


300

301

302
303


304
305
306
307
308
309
310
311
312
313
314
315
    } {0 0}

    test blowfish-$impl-8.0 {check hyphen in crypt data} {
        list [catch {
            set key "uP/AD/oGb6q/"
            set text "ececho cleardata"
            set cipher [blowfish::blowfish -mode ecb -key $key -dir encrypt $text]
            set plain [blowfish::blowfish -mode ecb -key $key -dir decrypt $cipher]
            string compare $plain $text
        } msg] $msg
    } {0 0}

    test blowfish-$impl-8.1 {check hyphen in plaintext} {
        list [catch {
            set key "uP/AD/oGb6q/"
            set text "-cecho cleardata"
            set cipher [blowfish::blowfish -mode ecb -key $key -dir encrypt $text]
            set plain [blowfish::blowfish -mode ecb -key $key -dir decrypt $cipher]
            string compare $plain $text
        } msg] $msg
    } {0 0}

    test blowfish-$impl-8.2 {check hyphen in key} {
        list [catch {
            set key "-P/AD/oGb6q/"
            set text "ececho cleardata"
            set cipher [blowfish::blowfish -mode ecb -key $key -dir encrypt $text]
            set plain [blowfish::blowfish -mode ecb -key $key -dir decrypt $cipher]
            string compare $plain $text
        } msg] $msg
    } {0 0}

    test blowfish-$impl-8.3 {check option termination} {
        list [catch {
            set key "uP/AD/oGb6q/"
            set text "ececho cleardata"
            set cipher [blowfish::blowfish -mode ecb -key $key -dir encrypt -- $text]
            set plain [blowfish::blowfish -mode ecb -key $key -dir decrypt -- $cipher]
            string compare $plain $text
        } msg] $msg
    } {0 0}

    test blowfish-$impl-9.0 {check -pad option} {
        list [catch {
            set key "uP/AD/oGb6q/"
            set text "01234"



            set cipher [blowfish::blowfish -mode ecb -hex -key $key \





                            -dir encrypt -pad a -- $text]
        } msg] $msg
    } {0 8927243c2d7d568c}

    test blowfish-$impl-9.1 {check -pad option} {
        list [catch {



            set key "uP/AD/oGb6q/"

            set text "01234"
            set cipher [blowfish::blowfish -mode ecb -hex -key $key \
                            -dir encrypt -pad { } -- $text]
        } msg] $msg
    } {0 3fc711286b8eca79}

    test blowfish-$impl-9.2 {check -pad option} {
        list [catch {
            set key "uP/AD/oGb6q/"
            set text "01234"
            set cipher [blowfish::blowfish -mode ecb -hex -key $key \
                            -dir encrypt -pad "" -- $text]
        } msg] \

            [expr {
                   [string equal $msg \
                        {invalid block size: blocks must be 8 bytes}] \
                || [string equal $msg \
                        {can not encrypt incomplete block at end of input}]}]
    } {1 1}

    test blowfish-$impl-9.3 {check -dir option default is encrypt} {










        list [catch {
            set key "04B915BA43FEB5B6"
            set text "42FD443059577FA2"



            set cipher [blowfish::blowfish -mode ecb -pad "" -hex\


                            -key [binary format H* $key]\

                            -- [binary format H* $text]]

        } msg] $msg
    } {0 353882b109ce8f1a}



    reset_implementation
}

# -------------------------------------------------------------------------

testsuiteCleanup

# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/blowfish/pkgIndex.tcl.

1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.2]} {
    # PRAGMA: returnok
    return
}
package ifneeded blowfish 1.0.5 [list source [file join $dir blowfish.tcl]]




|
1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.2]} {
    # PRAGMA: returnok
    return
}
package ifneeded blowfish 1.0.4 [list source [file join $dir blowfish.tcl]]

Changes to modules/cache/ChangeLog.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2018-08-28  Aldo Buratti

    *
    * BugFix in method 'clear'
        * Added a test in async.test
    * Release 0.3.1
    *

2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2011-12-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>
<
<
<
<
<
<
<
<















1
2
3
4
5
6
7








2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2011-12-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

Changes to modules/cache/async.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[vset Version 0.3.1]
[manpage_begin cache::async n [vset Version]]
[keywords asynchronous]
[keywords cache]
[keywords callback]
[keywords synchronous]
[copyright {2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {In-memory caches}]
[titledesc {Asynchronous in-memory cache}]
[require Tcl 8.4]
[require cache::async [opt [vset Version]]]
[description]

This package provides objects which cache data in memory, and operate
asynchronously with regard to request and responses. The objects are
agnostic with regard to cache keys and values, and unknown methods are
delegated to the provider of cached data. These two properties make it
easy to use caches as a facade for any data provider.
<
|








|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

[manpage_begin cache::async n 0.3]
[keywords asynchronous]
[keywords cache]
[keywords callback]
[keywords synchronous]
[copyright {2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {In-memory caches}]
[titledesc {Asynchronous in-memory cache}]
[require Tcl 8.4]
[require cache::async [opt 0.3]]
[description]

This package provides objects which cache data in memory, and operate
asynchronously with regard to request and responses. The objects are
agnostic with regard to cache keys and values, and unknown methods are
delegated to the provider of cached data. These two properties make it
easy to use caches as a facade for any data provider.
136
137
138
139
140
141
142
143
144
This method resets the state of either the specified [arg key] or of
all keys known to the cache, making it unkown. This forces future
[method get]-requests to reload the information from the provider.

[list_end]

[vset CATEGORY cache]
[include ../common-text/feedback.inc]
[manpage_end]







|

135
136
137
138
139
140
141
142
143
This method resets the state of either the specified [arg key] or of
all keys known to the cache, making it unkown. This forces future
[method get]-requests to reload the information from the provider.

[list_end]

[vset CATEGORY cache]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/cache/async.tcl.

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	# not present the state will not change, and queries in flight
	# simply refill the cache as they would do anyway without the
	# 'clear'.

	if {![llength $args]} {
	    array unset myhit  *
	    array unset mymiss *
	} elseif {[llength $args] == 1} {
	    set key [lindex $args 0]
	    unset -nocomplain  myhit($key)
	    unset -nocomplain mymiss($key)
	} else {
	    WrongArgs ?key?
	}
	return







|







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	# not present the state will not change, and queries in flight
	# simply refill the cache as they would do anyway without the
	# 'clear'.

	if {![llength $args]} {
	    array unset myhit  *
	    array unset mymiss *
	} elseif {[llength $arg] == 1} {
	    set key [lindex $args 0]
	    unset -nocomplain  myhit($key)
	    unset -nocomplain mymiss($key)
	} else {
	    WrongArgs ?key?
	}
	return
178
179
180
181
182
183
184
185

    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide cache::async 0.3.1







|
178
179
180
181
182
183
184
185

    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide cache::async 0.3

Changes to modules/cache/async.test.

222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
    ca destroy
} -result {BEGIN
WAIT
DATA_HOLE get KEY ::ca
DONE {unset KEY}
RESUME}

# -- $obj clear ---------------------------------------------------------------

test cache-async-6.0 {clear a not existing value} -setup {
    cache::async ca DATA_NONE
    res!
} -body {
    res+ BEGIN
    ca clear KEY
    res+ END
    res?lines
} -cleanup {
    ca destroy
} -result {BEGIN
END}

test cache-async-6.1 {clear an existing value} -setup {
    cache::async ca DATA_NONE
    ca set KEY VALUE
    res!
} -body {
    res+ BEGIN
    ca clear KEY
    res+ END
    res?lines
} -cleanup {
    ca destroy
} -result {BEGIN
END}

# -------------------------------------------------------------------------
testsuiteCleanup







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


222
223
224
225
226
227
228





























229
230
    ca destroy
} -result {BEGIN
WAIT
DATA_HOLE get KEY ::ca
DONE {unset KEY}
RESUME}






























# -------------------------------------------------------------------------
testsuiteCleanup

Changes to modules/cache/pkgIndex.tcl.

1
2
3
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded cache::async 0.3.1 [list source [file join $dir async.tcl]]


|

1
2
3
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded cache::async 0.3 [list source [file join $dir async.tcl]]

Deleted modules/clay/build/build.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
set srcdir [file dirname [file normalize [file join [pwd] [info script]]]]
set moddir [file dirname $srcdir]

set version 0.8.6
set module clay
set filename clay
if {[file exists [file join $moddir .. .. scripts practcl.tcl]]} {
  source [file join $moddir .. .. scripts practcl.tcl]
} elseif {[file exists [file join $moddir .. practcl build doctool.tcl]]} {
  source [file join $moddir .. practcl build doctool.tcl]
} else {
  package require practcl 0.14
}
::practcl::doctool create AutoDoc

set fout [open [file join $moddir ${filename}.tcl] w]
dict set modmap %module% $module
dict set modmap %version% $version
dict set modmap %license% BSD
dict set modmap %filename% $filename

set authors {{Sean Woods} {<yoda@etoyoc.com>}}

puts $fout [string map $modmap {###
# %filename%.tcl
#
# Copyright (c) 2018 Sean Woods
#
# BSD License
###
# @@ Meta Begin
# Package %module% %version%
# Meta platform     tcl
# Meta summary      A minimalist framework for complex TclOO development
# Meta description  This package introduces the method "clay" to both oo::object
# Meta description  and oo::class which facilitate complex interactions between objects
# Meta description  and their ancestor and mixed in classes.
# Meta category     TclOO
# Meta subject      framework
# Meta require      {Tcl 8.6}}]
foreach {name email} $authors {
  puts $fout   "# Meta author       $name"
}
puts $fout [string map $modmap {# Meta license      %license%
# @@ Meta End
}]

puts $fout [string map $modmap {###
# Amalgamated package for %module%
# Do not edit directly, tweak the source in build/ and rerun
# build.tcl
###
package provide %module% %version%
namespace eval ::%module% {}
}]


# Track what files we have included so far
set loaded {}
lappend loaded build.tcl test.tcl

foreach file {
  procs.tcl
  core.tcl uuid.tcl
  dict.tcl list.tcl dictargs.tcl
  dialect.tcl
  metaclass.tcl
  ensemble.tcl
  class.tcl
  object.tcl
} {
  lappend loaded $file
  set content [::practcl::cat [file join $srcdir {*}$file]]
  AutoDoc scan_text $content
  puts $fout "###\n# START: [file tail $file]\n###"
  puts $fout [::practcl::docstrip $content]
  puts $fout "###\n# END: [file tail $file]\n###"
}
# These files can be loaded in any order
foreach file [lsort -dictionary [glob [file join $srcdir *.tcl]]] {
  if {[file tail $file] in $loaded} continue
  lappend loaded $file
  set content [::practcl::cat [file join $srcdir {*}$file]]
  AutoDoc scan_text $content
  puts $fout "###\n# START: [file tail $file]\n###"
  puts $fout [::practcl::docstrip $content]
  puts $fout "###\n# END: [file tail $file]\n###"
}

# Provide some cleanup and our final package provide
puts $fout [string map $modmap {
namespace eval ::%module% {
  namespace export *
}
}]
close $fout

###
# Build our pkgIndex.tcl file
###
set fout [open [file join $moddir pkgIndex.tcl] w]
puts $fout [string map $modmap {# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.6]} {return}
}]
puts $fout [string map $modmap {
package ifneeded %module% %version% [list source [file join $dir %module%.tcl]]
}]

close $fout

###
# Generate the test script
###
namespace eval ::clay {}
source [file join $srcdir procs.tcl]
set fout [open [file join $moddir $filename.test] w]
puts $fout {
namespace eval ::oo::dialect {}
set ::oo::dialect::has(tip470) 0
}
puts $fout [source [file join $srcdir test.tcl]]
puts $fout {

if {![package vsatisfies [package provide Tcl] 8.7]} {return}
puts "Repeating tests with 8.7 features"
namespace eval ::oo::dialect {}
set ::oo::dialect::has(tip470) 1
}
puts $fout [source [file join $srcdir test.tcl]]
close $fout
set manout [open [file join $moddir $filename.man] w]
puts $manout [AutoDoc manpage map $modmap \
  header [::practcl::cat [file join $srcdir manual.txt]] \
  authors $authors \
  footer [::practcl::cat [file join $srcdir footer.txt]] \
]
close $manout

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































Deleted modules/clay/build/class.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
::oo::define ::clay::class {

  ###
  # description:
  # The [method clay] method allows a class object access
  # to a combination of its own clay data as
  # well as to that of its ancestors
  # ensemble:
  # ancestors {
  #   argspec {}
  #   description {Return this class and all ancestors in search order.}
  # }
  # dump {
  #   argspec {}
  #   description {Return a complete dump of this object's clay data, but only this object's clay data.}
  # }
  # find {
  #   argspec {path {mandatory 1 positional 1 repeating 1}}
  #   description {
  #     Pull a chunk of data from the clay system. If the last element of [emph path] is a branch,
  #     returns a recursive merge of all data from this object and it's constituent classes of the data in that branch.
  #     If the last element is a leaf, search this object for a matching leaf, or search all  constituent classes for a matching
  #     leaf and return the first value found.
  #     If no value is found, returns an empty string.
  #     If a branch is returned the topmost . entry is omitted.
  #   }
  # }
  # get {
  #   argspec {path {mandatory 1 positional 1 repeating 1}}
  #   description {
  #     Pull a chunk of data from the class's clay system.
  #     If no value is found, returns an empty string.
  #     If a branch is returned the topmost . entry is omitted.
  #   }
  # }
  # GET {
  #   argspec {path {mandatory 1 positional 1 repeating 1}}
  #   description {
  #     Pull a chunk of data from the class's clay system.
  #     If no value is found, returns an empty string.
  #   }
  #}
  # merge {
  #   argspec {dict {mandatory 1 positional 1 repeating 1}}
  #   description {Recursively merge the dictionaries given into the object's local clay storage.}
  # }
  # replace {
  #   argspec {dictionary {mandatory 1 positional 1}}
  #   description {Replace the contents of the internal clay storage with the dictionary given.}
  # }
  # search {
  #   argspec {path {mandatory 1 positional 1 repeating 1}}
  #   description {Return the first matching value for the path in either this class's clay data or one of its ancestors}
  # }
  # set {
  #   argspec {path {mandatory 1 positional 1 repeating 1} value {mandatory 1 postional 1}}
  #   description {Merge the conents of [const value] with the object's clay storage at [const path].}
  # }
  ###
  method clay {submethod args} {
    my variable clay
    if {![info exists clay]} {
      set clay {}
    }
    switch $submethod {
      ancestors {
        tailcall ::clay::ancestors [self]
      }
      branch {
        set path [::clay::tree::storage $args]
        if {![dict exists $clay {*}$path .]} {
          dict set clay {*}$path . {}
        }
      }
      exists {
        if {![info exists clay]} {
          return 0
        }
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return 1
        }
        if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
          return 1
        }
        return 0
      }
      dump {
        return $clay
      }
      dget {
         if {![info exists clay]} {
          return {}
        }
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
          return [dict get $clay {*}[lrange $path 0 end-1] [lindex $path end]:]
        }
        return {}
      }
      is_branch {
        set path [::clay::tree::storage $args]
        return [dict exists $clay {*}$path .]
      }
      getnull -
      get {
        if {![info exists clay]} {
          return {}
        }
        set path [::clay::tree::storage $args]
        if {[llength $path]==0} {
          return $clay
        }
        if {[dict exists $clay {*}$path .]} {
          return [::clay::tree::sanitize [dict get $clay {*}$path]]
        }
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
          return [dict get $clay {*}[lrange $path 0 end-1] [lindex $path end]:]
        }
        return {}
      }
      find {
        set path [::clay::tree::storage $args]
        if {![info exists clay]} {
          set clay {}
        }
        set clayorder [::clay::ancestors [self]]
        set found 0
        if {[llength $path]==0} {
          set result [dict create . {}]
          foreach class $clayorder {
            ::clay::tree::dictmerge result [$class clay dump]
          }
          return [::clay::tree::sanitize $result]
        }
        foreach class $clayorder {
          if {[$class clay exists {*}$path .]} {
            # Found a branch break
            set found 1
            break
          }
          if {[$class clay exists {*}$path]} {
            # Found a leaf. Return that value immediately
            return [$class clay get {*}$path]
          }
          if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
            return [dict get $clay {*}[lrange $path 0 end-1] [lindex $path end]:]
          }
        }
        if {!$found} {
          return {}
        }
        set result {}
        # Leaf searches return one data field at a time
        # Search in our local dict
        # Search in the in our list of classes for an answer
        foreach class [lreverse $clayorder] {
          ::clay::tree::dictmerge result [$class clay dget {*}$path]
        }
        return [::clay::tree::sanitize $result]
      }
      merge {
        foreach arg $args {
          ::clay::tree::dictmerge clay {*}$arg
        }
      }
      noop {
        # Do nothing. Used as a sign of clay savviness
      }
      search {
        foreach aclass [::clay::ancestors [self]] {
          if {[$aclass clay exists {*}$args]} {
            return [$aclass clay get {*}$args]
          }
        }
      }
      set {
        ::clay::tree::dictset clay {*}$args
      }
      unset {
        dict unset clay {*}$args
      }
      default {
        dict $submethod clay {*}$args
      }
    }
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































Deleted modules/clay/build/core.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package require Tcl 8.6 ;# try in pipeline.tcl. Possibly other things.
if {[info commands irmmd5] eq {}} {
  if {[catch {package require odielibc}]} {
    package require md5 2
  }
}
::namespace eval ::clay {}
::namespace eval ::clay::classes {}
::namespace eval ::clay::define {}
::namespace eval ::clay::tree {}
::namespace eval ::clay::dict {}
::namespace eval ::clay::list {}
::namespace eval ::clay::uuid {}

if {![info exists ::clay::idle_destroy]} {
  set ::clay::idle_destroy {}
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted modules/clay/build/dialect.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
###
# Adapted from Tcllib's oo::dialect
#
# Copyright (c) 2015-2018 Sean Woods
# Copyright (c) 2015 Donald K Fellows
#
# BSD License
###
# @@ Meta Begin
# Package clay::dialect 0.4
# Meta platform     tcl
# Meta summary      A utility for defining a domain specific language for TclOO systems
# Meta description  This package allows developers to generate
# Meta description  domain specific languages to describe TclOO
# Meta description  classes and objects.
# Meta category     TclOO
# Meta subject      oodialect
# Meta require      {Tcl 8.6}
# Meta author       Sean Woods
# Meta author       Donald K. Fellows
# Meta license      BSD
# @@ Meta End
namespace eval ::clay::dialect {
  namespace export create
  # Allow test rigs to overwrite the flags before invoking this script
  foreach {flag test} {
    tip470 {package vsatisfies [package provide Tcl] 8.7}
  } {
    if {![info exists ::clay::dialect::has($flag)]} {
      set ::clay::dialect::has($flag) [eval $test]
    }
  }
}


proc ::clay::dialect::Push {class} {
  ::variable class_stack
  lappend class_stack $class
}
proc ::clay::dialect::Peek {} {
  ::variable class_stack
  return [lindex $class_stack end]
}
proc ::clay::dialect::Pop {} {
  ::variable class_stack
  set class_stack [lrange $class_stack 0 end-1]
}

if {$::clay::dialect::has(tip470)} {
proc ::clay::dialect::current_class {} {
  return [uplevel 1 self]
}
} else {
proc ::clay::dialect::current_class {} {
  tailcall Peek
}
}

###
# This proc will generate a namespace, a "mother of all classes", and a
# rudimentary set of policies for this dialect.
###
proc ::clay::dialect::create {name {parent ""}} {
  variable has
  set NSPACE [NSNormalize [uplevel 1 {namespace current}] $name]
  ::namespace eval $NSPACE {::namespace eval define {}}
  ###
  # Build the "define" namespace
  ###

  if {$parent eq ""} {
    ###
    # With no "parent" language, begin with all of the keywords in
    # oo::define
    ###
    foreach command [info commands ::oo::define::*] {
      set procname [namespace tail $command]
      interp alias {} ${NSPACE}::define::$procname {} \
        ::clay::dialect::DefineThunk $procname
    }
    # Create an empty dynamic_methods proc
    proc ${NSPACE}::dynamic_methods {class} {}
    namespace eval $NSPACE {
      ::namespace export dynamic_methods
      ::namespace eval define {::namespace export *}
    }
    set ANCESTORS {}
  } else {
    ###
    # If we have a parent language, that language already has the
    # [oo::define] keywords as well as additional keywords and behaviors.
    # We should begin with that
    ###
    set pnspace [NSNormalize [uplevel 1 {namespace current}] $parent]
    apply [list parent {
      ::namespace export dynamic_methods
      ::namespace import -force ${parent}::dynamic_methods
    } $NSPACE] $pnspace

    apply [list parent {
      ::namespace import -force ${parent}::define::*
      ::namespace export *
    } ${NSPACE}::define] $pnspace
      set ANCESTORS [list ${pnspace}::object]
  }
  ###
  # Build our dialect template functions
  ###
  proc ${NSPACE}::define {oclass args} [string map [list %NSPACE% $NSPACE] {
  ###
  # To facilitate library reloading, allow
  # a dialect to create a class from DEFINE
  ###
  set class [::clay::dialect::NSNormalize [uplevel 1 {namespace current}] $oclass]
    if {[info commands $class] eq {}} {
      %NSPACE%::class create $class {*}${args}
    } else {
      ::clay::dialect::Define %NSPACE% $class {*}${args}
    }
}]
  interp alias {} ${NSPACE}::define::current_class {} \
    ::clay::dialect::current_class
  interp alias {} ${NSPACE}::define::aliases {} \
    ::clay::dialect::Aliases $NSPACE
  interp alias {} ${NSPACE}::define::superclass {} \
    ::clay::dialect::SuperClass $NSPACE

  if {[info command ${NSPACE}::class] ne {}} {
    ::rename ${NSPACE}::class {}
  }
  ###
  # Build the metaclass for our language
  ###
  ::oo::class create ${NSPACE}::class {
    superclass ::clay::dialect::MotherOfAllMetaClasses
  }
  # Wire up the create method to add in the extra argument we need; the
  # MotherOfAllMetaClasses will know what to do with it.
  ::oo::objdefine ${NSPACE}::class \
    method create {name {definitionScript ""}} \
      "next \$name [list ${NSPACE}::define] \$definitionScript"

  ###
  # Build the mother of all classes. Note that $ANCESTORS is already
  # guaranteed to be a list in canonical form.
  ###
  uplevel #0 [string map [list %NSPACE% [list $NSPACE] %name% [list $name] %ANCESTORS% $ANCESTORS] {
    %NSPACE%::class create %NSPACE%::object {
     superclass %ANCESTORS%
      # Put MOACish stuff in here
    }
  }]
  if { "${NSPACE}::class" ni $::clay::dialect::core_classes } {
    lappend ::clay::dialect::core_classes "${NSPACE}::class"
  }
  if { "${NSPACE}::object" ni $::clay::dialect::core_classes } {
    lappend ::clay::dialect::core_classes "${NSPACE}::object"
  }
}

# Support commands; not intended to be called directly.
proc ::clay::dialect::NSNormalize {namespace qualname} {
  if {![string match ::* $qualname]} {
    set qualname ${namespace}::$qualname
  }
  regsub -all {::+} $qualname "::"
}

proc ::clay::dialect::DefineThunk {target args} {
  tailcall ::oo::define [Peek] $target {*}$args
}

proc ::clay::dialect::Canonical {namespace NSpace class} {
  namespace upvar $namespace cname cname
  #if {[string match ::* $class]} {
  #  return $class
  #}
  if {[info exists cname($class)]} {
    return $cname($class)
  }
  if {[info exists ::clay::dialect::cname($class)]} {
    return $::clay::dialect::cname($class)
  }
  if {[info exists ::clay::dialect::cname(${NSpace}::${class})]} {
    return $::clay::dialect::cname(${NSpace}::${class})
  }
  foreach item [list "${NSpace}::$class" "::$class"] {
    if {[info commands $item] ne {}} {
      return $item
    }
  }
  return ${NSpace}::$class
}

###
# Implementation of the languages' define command
###
proc ::clay::dialect::Define {namespace class args} {
  Push $class
  try {
  	if {[llength $args]==1} {
      namespace eval ${namespace}::define [lindex $args 0]
    } else {
      ${namespace}::define::[lindex $args 0] {*}[lrange $args 1 end]
    }
  	${namespace}::dynamic_methods $class
  } finally {
    Pop
  }
}

###
# Implementation of how we specify the other names that this class will answer
# to
###

proc ::clay::dialect::Aliases {namespace args} {
  set class [Peek]
  namespace upvar $namespace cname cname
  set NSpace [join [lrange [split $class ::] 1 end-2] ::]
  set cname($class) $class
  foreach name $args {
    set cname($name) $class
    #set alias $name
    set alias [NSNormalize $NSpace $name]
    # Add a local metaclass reference
    if {![info exists ::clay::dialect::cname($alias)]} {
      lappend ::clay::dialect::aliases($class) $alias
      ##
      # Add a global reference, first come, first served
      ##
      set ::clay::dialect::cname($alias) $class
    }
  }
}

###
# Implementation of a superclass keyword which will enforce the inheritance of
# our language's mother of all classes
###

proc ::clay::dialect::SuperClass {namespace args} {
  set class [Peek]
  namespace upvar $namespace class_info class_info
  dict set class_info($class) superclass 1
  set ::clay::dialect::cname($class) $class
  set NSpace [join [lrange [split $class ::] 1 end-2] ::]
  set unique {}
  foreach item $args {
    set Item [Canonical $namespace $NSpace $item]
    dict set unique $Item $item
  }
  set root ${namespace}::object
  if {$class ne $root} {
    dict set unique $root $root
  }
  tailcall ::oo::define $class superclass {*}[dict keys $unique]
}

###
# Implementation of the common portions of the the metaclass for our
# languages.
###
if {[info command ::clay::dialect::MotherOfAllMetaClasses] eq {}} {
::oo::class create ::clay::dialect::MotherOfAllMetaClasses {
  superclass ::oo::class
  constructor {define definitionScript} {
    $define [self] {
      superclass
    }
    $define [self] $definitionScript
  }
  method aliases {} {
    if {[info exists ::clay::dialect::aliases([self])]} {
      return $::clay::dialect::aliases([self])
    }
  }
}
}

namespace eval ::clay::dialect {
  variable core_classes {::oo::class ::oo::object}
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































Deleted modules/clay/build/dict.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
###
# If the path (given by the list of elements) exists, return that value.
# Otherwise return an empty string. Designed to replace [example {
# if {[dict exists $dictionary {*}$args]} {
#   return [dict get $dictionary {*}$args]
# } else {
#   return {}
# }
# }]
# example:
# set value [dict getnull $arglist $option]
# arglist:
# dictionary {mandatory 1 positional 1}
# element {mandatory 0 positional 1 repeating 1}
###
::clay::PROC ::tcl::dict::getnull {dictionary args} {
  if {[exists $dictionary {*}$args]} {
    get $dictionary {*}$args
  }
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] getnull ::tcl::dict::getnull]
}


###
# Test if value is a dict.
# [para]
# This command is added to the [fun dict] ensemble as [fun {dict is_dict}]
###
::clay::PROC ::tcl::dict::is_dict { d } {
  # is it a dict, or can it be treated like one?
  if {[catch {dict size $d} err]} {
    #::set ::errorInfo {}
    return 0
  }
  return 1
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] is_dict ::tcl::dict::is_dict]
}

###
# A routine to recursively dig through dicts and merge
# adapted from http://stevehavelka.com/tcl-dict-operation-nested-merge/
###
::clay::PROC ::tcl::dict::rmerge {args} {
  ::set result [dict create . {}]
  # Merge b into a, and handle nested dicts appropriately
  ::foreach b $args {
    for { k v } $b {
      ::set field [string trim $k :/]
      if {![::clay::tree::is_branch $b $k]} {
        # Element names that end in ":" are assumed to be literals
        set result $k $v
      } elseif { [exists $result $k] } {
        # key exists in a and b?  let's see if both values are dicts
        # both are dicts, so merge the dicts
        if { [is_dict [get $result $k]] && [is_dict $v] } {
          set result $k [rmerge [get $result $k] $v]
        } else {
          set result $k $v
        }
      } else {
        set result $k $v
      }
    }
  }
  return $result
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] rmerge ::tcl::dict::rmerge]
}

###
# Return true if the element [variable path] with the value [variable dict]
# is a dict. [variable path] is given as a list to descend into sub-dicts of
# the current dict.
# The rules are as follows:
# [list_begin enumerated]
# [enum]
# If the last character of the last element of [variable path] is a colon (:)
# return false
# [enum]
# If the last character of the last element of [variable path] is a slash (/)
# return true
# [enum]
# If a sub-element if [variable path] named [const .info] is present return true
# [list_end]
# [para]
# [para]
# This command is added to the [fun dict] ensemble as [fun {clay::tree::is_branch}]
# example:
# > set mydict {sub/ {sub/ {field {A block of text}}}
# > clay::tree::is_branch $mydict sub/
# 1
# > clay::tree::is_branch $mydict {sub/ sub/}
# 1
# > clay::tree::is_branch $mydict {sub/ sub/ field}
# 0
###
::clay::PROC ::clay::tree::is_branch { dict path } {
  set field [lindex $path end]
  if {[string index $field end] eq ":"} {
    return 0
  }
  if {[string index $field 0] eq "."} {
    return 0
  }
  if {[string index $field end] eq "/"} {
    return 1
  }
  return [dict exists $dict {*}$path .]
}

###
# Output a dictionary as an indented stream of
# data suitable for output to the screen. The system uses
# the rules for [fun {clay::tree::is_branch}] to determine if
# an value in a dictionary is a leaf or a branch.
# example:
# > set mydict {sub/ {sub/ {field {A block of text}}}
# > clay::tree::print $mydict
# sub/ {
#   sub/ {
#     field {A block of text}
#   }
# }
###
::clay::PROC ::clay::tree::print {dict} {
  ::set result {}
  ::set level -1
  ::clay::tree::_dictputb $level result $dict
  return $result
}

###
# Helper function for ::clay::tree::print
# Formats the string representation for a dictionary element within
# a human readable stream of lines, and determines if it needs to call itself
# with further indentation to express a sub-branch
###
::clay::PROC ::clay::tree::_dictputb {level varname dict} {
  upvar 1 $varname result
  incr level
  dict for {field value} $dict {
    if {$field eq "."} continue
    if {[clay::tree::is_branch $dict $field]} {
      putb result "[string repeat "  " $level]$field \{"
      _dictputb $level result $value
      putb result "[string repeat "  " $level]\}"
    } else {
      putb result "[string repeat "  " $level][list $field $value]"
    }
  }
}

###
# Output a dictionary removing any . entries added by [fun {clay::tree::merge}]
###
proc ::clay::tree::sanitize {dict} {
  ::set result {}
  ::set level -1
  ::clay::tree::_sanitizeb {} result $dict
  return $result
}

###
# Helper function for ::clay::tree::sanitize
# Formats the string representation for a dictionary element within
# a human readable stream of lines, and determines if it needs to call itself
# with further indentation to express a sub-branch
###
proc ::clay::tree::_sanitizeb {path varname dict} {
  upvar 1 $varname result
  dict for {field value} $dict {
    if {$field eq "."} continue
    if {[clay::tree::is_branch $dict $field]} {
      _sanitizeb [list {*}$path $field] result $value
    } else {
      dict set result {*}$path $field $value
    }
  }
}

###
# Return the path as a storage path for clay::tree
# with all branch terminators removed.
# This command will also break arguments up if they
# contain /.
# example:
# > clay::tree::storage {foo bar baz bang}
# foo bar baz bang
# > clay::tree::storage {foo bar baz bang/}
# foo bar baz bang
# > clay::tree::storage {foo bar baz bang:}
# foo bar baz bang:
# > clay::tree::storage {foo/bar/baz bang:}
# foo bar baz bang:
# > clay::tree::storage {foo/bar/baz/bang}
# foo bar baz bang
###
proc ::clay::tree::storage {rawpath} {
  set isleafvar 0
  set path {}
  set tail [string index $rawpath end]
  foreach element $rawpath {
    set items [split [string trim $element /] /]
    foreach item $items {
      if {$item eq {}} continue
      lappend path $item
    }
  }
  return $path
}

###
# Set an element with a recursive dictionary,
# marking all branches on the way down to the
# final element.
# If the value does not exists in the nested dictionary
# it is added as a leaf. If the value already exists as a branch
# the value given is merged if the value is a valid dict. If the
# incoming value is not a valid dict, the value overrides the value
# stored, and the value is treated as a leaf from then on.
# example:
# > set r {}
# > ::clay::tree::dictset r option color default Green
# . {} option {. {} color {. {} default Green}}
# > ::clay::tree::dictset r option {Something not dictlike}
# . {} option {Something not dictlike}
# # Note that if the value is not a dict, and you try to force it to be
# # an error with be thrown on the merge
# > ::clay::tree::dictset r option color default Blue
# missing value to go with key
###
proc ::clay::tree::dictset {varname args} {
  upvar 1 $varname result
  if {[llength $args] < 2} {
    error "Usage: ?path...? path value"
  } elseif {[llength $args]==2} {
    set rawpath [lindex $args 0]
  } else {
    set rawpath  [lrange $args 0 end-1]
  }
  set value [lindex $args end]
  set path [storage $rawpath]
  set dot .
  set one {}
  dict set result $dot $one
  set dpath {}
  foreach item [lrange $path 0 end-1] {
    set field $item
    lappend dpath [string trim $item /]
    dict set result {*}$dpath $dot $one
  }
  set field [lindex $rawpath end]
  set ext   [string index $field end]
  if {$ext eq {:} || ![dict is_dict $value]} {
    dict set result {*}$path $value
    return
  }
  if {$ext eq {/} && ![dict exists $result {*}$path $dot]} {
    dict set result {*}$path $dot $one
  }
  if {[dict exists $result {*}$path $dot]} {
    dict set result {*}$path [::clay::tree::merge [dict get $result {*}$path] $value]
    return
  }
  dict set result {*}$path $value
}

###
# A recursive form of dict merge, intended for modifying variables in place.
# example:
# > set mydict {sub/ {sub/ {description {a block of text}}}}
# > ::clay::tree::dictmerge mydict {sub/ {sub/ {field {another block of text}}}}]
# > clay::tree::print $mydict
# sub/ {
#   sub/ {
#     description {a block of text}
#     field {another block of text}
#   }
# }
###
proc ::clay::tree::dictmerge {varname args} {
  upvar 1 $varname result
  set dot .
  set one {}
  dict set result $dot $one
  foreach dict $args {
    dict for {f v} $dict {
      set field [string trim $f /]
      set bbranch [clay::tree::is_branch $dict $f]
      if {![dict exists $result $field]} {
        dict set result $field $v
        if {$bbranch} {
          dict set result $field [clay::tree::merge $v]
        } else {
          dict set result $field $v
        }
      } elseif {[dict exists $result $field $dot]} {
        if {$bbranch} {
          dict set result $field [clay::tree::merge [dict get $result $field] $v]
        } else {
          dict set result $field $v
        }
      }
    }
  }
  return $result
}



###
# A recursive form of dict merge
# [para]
# A routine to recursively dig through dicts and merge
# adapted from http://stevehavelka.com/tcl-dict-operation-nested-merge/
# example:
# > set mydict {sub/ {sub/ {description {a block of text}}}}
# > set odict [clay::tree::merge $mydict {sub/ {sub/ {field {another block of text}}}}]
# > clay::tree::print $odict
# sub/ {
#   sub/ {
#     description {a block of text}
#     field {another block of text}
#   }
# }
###
proc ::clay::tree::merge {args} {
  ###
  # The result of a merge is always a dict with branches
  ###
  set dot .
  set one {}
  dict set result $dot $one
  set argument 0
  foreach b $args {
    # Merge b into a, and handle nested dicts appropriately
    if {![dict is_dict $b]} {
      error "Element $b is not a dictionary"
    }
    dict for { k v } $b {
      if {$k eq $dot} {
        dict set result $dot $one
        continue
      }
      set bbranch [is_branch $b $k]
      set field [string trim $k /]
      if { ![dict exists $result $field] } {
        if {$bbranch} {
          dict set result $field [merge $v]
        } else {
          dict set result $field $v
        }
      } else {
        set abranch [dict exists $result $field $dot]
        if {$abranch && $bbranch} {
          dict set result $field [merge [dict get $result $field] $v]
        } else {
          dict set result $field $v
          if {$bbranch} {
            dict set result $field $dot $one
          }
        }
      }
    }
  }
  return $result
}
###
# Returns true if the path specified by args either does not exist,
# if exists and contains an empty string or the value of NULL or null.
# [para]
# This function is added to the global dict ensemble as [fun {dict isnull}]
###
::clay::PROC ::tcl::dict::isnull {dictionary args} {
  if {![exists $dictionary {*}$args]} {return 1}
  return [expr {[get $dictionary {*}$args] in {{} NULL null}}]
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] isnull ::tcl::dict::isnull]
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/clay/build/dictargs.tcl.

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
namespace eval ::dictargs {}
if {[info commands ::dictargs::parse] eq {}} {
  proc ::dictargs::parse {argdef argdict} {
    set result {}
    dict for {field info} $argdef {
      if {![string is alnum [string index $field 0]]} {
        error "$field is not a simple variable name"
      }
      upvar 1 $field _var
      set aliases {}
      if {[dict exists $argdict $field]} {
        set _var [dict get $argdict $field]
        continue
      }
      if {[dict exists $info aliases:]} {
        set found 0
        foreach {name} [dict get $info aliases:] {
          if {[dict exists $argdict $name]} {
            set _var [dict get $argdict $name]
            set found 1
            break
          }
        }
        if {$found} continue
      }
      if {[dict exists $info default:]} {
        set _var [dict get $info default:]
        continue
      }
      set mandatory 1
      if {[dict exists $info mandatory:]} {
        set mandatory [dict get $info mandatory:]
      }
      if {$mandatory} {
        error "$field is required"
      }
    }
  }
}

###
# Named Procedures as new command
###
proc ::dictargs::proc {name argspec body} {
  set result {}
  append result "::dictargs::parse \{$argspec\} \$args" \;
  append result $body
  uplevel 1 [list ::proc $name [list [list args [list dictargs $argspec]]] $result]
}

proc ::dictargs::method {name argspec body} {
  set class [lindex [::info level -1] 1]
  set result {}
  append result "::dictargs::parse \{$argspec\} \$args" \;
  append result $body
  oo::define $class method $name [list [list args [list dictargs $argspec]]] $result
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































Deleted modules/clay/build/ensemble.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
::namespace eval ::clay::define {}

###
# Produce the body of an ensemble's public dispatch method
# ensemble is the name of the the ensemble.
# einfo is a dictionary of methods for the ensemble, and each value is a script
# to execute on dispatch
# example:
# ::clay::ensemble_methodbody foo {
#   bar {tailcall my Foo_bar {*}$args}
#   baz {tailcall my Foo_baz {*}$args}
#   clock {return [clock seconds]}
#   default {puts "You gave me $method"}
# }
###
proc ::clay::ensemble_methodbody {ensemble einfo} {
  set default standard
  set preamble {}
  set eswitch {}
  set Ensemble [string totitle $ensemble]
  if {$Ensemble eq "."} continue
  foreach {msubmethod minfo} [lsort -dictionary -stride 2 $einfo] {
    if {$msubmethod eq "."} continue
    if {![dict exists $minfo body:]} {
      continue
    }
    set submethod [string trim $msubmethod :/-]
    if {$submethod eq "default"} {
      set default [dict get $minfo body:]
    } else {
      dict set eswitch $submethod [dict get $minfo body:]
    }
    if {[dict exists $submethod aliases:]} {
      foreach alias [dict get $minfo aliases:] {
        if {![dict exists $eswitch $alias]} {
          dict set eswitch $alias [dict get $minfo body:]
        }
      }
    }
  }
  set methodlist [lsort -dictionary [dict keys $eswitch]]
  if {![dict exists $eswitch <list>]} {
    dict set eswitch <list> {return $methodlist}
  }
  if {$default eq "standard"} {
    set default "error \"unknown method $ensemble \$method. Valid: \$methodlist\""
  }
  dict set eswitch default $default
  set mbody {}
  append mbody \n [list set methodlist $methodlist]
  append mbody \n "switch -- \$method \{$eswitch\}" \n
  return $mbody
}

::proc ::clay::define::Ensemble {rawmethod args} {
  if {[llength $args]==2} {
    lassign $args argspec body
    set argstyle tcl
  } elseif {[llength $args]==3} {
    lassign $args argstyle argspec body
  } else {
    error "Usage: Ensemble name ?argstyle? argspec body"
  }
  set class [current_class]
  #if {$::clay::trace>2} {
  #  puts [list $class Ensemble $rawmethod $argspec $body]
  #}
  set mlist [split $rawmethod "::"]
  set ensemble [string trim [lindex $mlist 0] :/]
  set method   [string trim [lindex $mlist 2] :/]
  if {[string index $method 0] eq "_"} {
    $class clay set method_ensemble $ensemble $method $body
    return
  }
  set realmethod  [string totitle $ensemble]_${method}
  set realbody {}
  if {$argstyle eq "dictargs"} {
    append realbody "::dictargs::parse \{$argspec\} \$args" \n
  }
  if {[$class clay exists method_ensemble $ensemble _preamble]} {
    append realbody [$class clay get method_ensemble $ensemble _preamble] \n
  }
  append realbody $body
  if {$method eq "default"} {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod \$method {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::define $class method $realmethod [list method [list args $argspec]] $realbody
    } else {
      oo::define $class method $realmethod [list method {*}$argspec] $realbody
    }
  } else {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::define $class method $realmethod [list [list args $argspec]] $realbody
    } else {
      oo::define $class method $realmethod $argspec $realbody
    }
  }
  if {$::clay::trace>2} {
    puts [list $class clay set method_ensemble/ $ensemble [string trim $method :/]  ...]
  }
}


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































Deleted modules/clay/build/event.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
if {[info commands ::cron::object_destroy] eq {}} {
  # Provide a noop if we aren't running with the cron scheduler
  namespace eval ::cron {}
  proc ::cron::object_destroy args {}
}
::namespace eval ::clay::event {}

###
# Process the queue of objects to be destroyed
###
proc ::clay::cleanup {} {
  if {![info exists ::clay::idle_destroy]} return
  foreach obj $::clay::idle_destroy {
    if {[info commands $obj] ne {}} {
      catch {$obj destroy}
    }
  }
  set ::clay::idle_destroy {}
}

proc ::clay::object_create {objname {class {}}} {
  #if {$::clay::trace>0} {
  #  puts [list $objname CREATE]
  #}
}

proc ::clay::object_rename {object newname} {
  if {$::clay::trace>0} {
    puts [list $object RENAME -> $newname]
  }
}

###
# Mark an objects for destruction on the next cleanup
###
proc ::clay::object_destroy args {
  if {![info exists ::clay::idle_destroy]} {
    set ::clay::idle_destroy {}
  }
  foreach objname $args {
    if {$::clay::trace>0} {
      puts [list $objname DESTROY]
    }
    ::cron::object_destroy $objname
    if {$objname in $::clay::idle_destroy} continue
    lappend ::clay::idle_destroy $objname
  }
}

###
# description: Cancel a scheduled event
###
proc ::clay::event::cancel {self {task *}} {
  variable timer_event
  variable timer_script

  foreach {id event} [array get timer_event $self:$task] {
    ::after cancel $event
    set timer_event($id) {}
    set timer_script($id) {}
  }
}

###
# description:
#    Generate an event
#    Adds a subscription mechanism for objects
#    to see who has recieved this event and prevent
#    spamming or infinite recursion
###
proc ::clay::event::generate {self event args} {
  set wholist [Notification_list $self $event]
  if {$wholist eq {}} return
  set dictargs [::oo::meta::args_to_options {*}$args]
  set info $dictargs
  set strict 0
  set debug 0
  set sender $self
  dict with dictargs {}
  dict set info id     [::clay::event::nextid]
  dict set info origin $self
  dict set info sender $sender
  dict set info rcpt   {}
  foreach who $wholist {
    catch {::clay::event::notify $who $self $event $info}
  }
}

###
# title: Return a unique event handle
###
proc ::clay::event::nextid {} {
  return "event#[format %0.8x [incr ::clay::event_count]]"
}

###
# description:
#    Called recursively to produce a list of
#    who recieves notifications
###
proc ::clay::event::Notification_list {self event {stackvar {}}} {
  set notify_list {}
  foreach {obj patternlist} [array get ::clay::object_subscribe] {
    if {$obj eq $self} continue
    if {$obj in $notify_list} continue
    set match 0
    foreach {objpat eventlist} $patternlist {
      if {![string match $objpat $self]} continue
      foreach eventpat $eventlist {
        if {![string match $eventpat $event]} continue
        set match 1
        break
      }
      if {$match} {
        break
      }
    }
    if {$match} {
      lappend notify_list $obj
    }
  }
  return $notify_list
}

###
# Final delivery to intended recipient object
###
proc ::clay::event::notify {rcpt sender event eventinfo} {
  if {[info commands $rcpt] eq {}} return
  if {$::clay::trace} {
    puts [list event notify rcpt $rcpt sender $sender event $event info $eventinfo]
  }
  $rcpt notify $event $sender $eventinfo
}

###
# Evaluate an event script in the global namespace
###
proc ::clay::event::process {self handle script} {
  variable timer_event
  variable timer_script

  array unset timer_event $self:$handle
  array unset timer_script $self:$handle

  set err [catch {uplevel #0 $script} result errdat]
  if $err {
    puts "BGError: $self $handle $script
ERR: $result
[dict get $errdat -errorinfo]
***"
  }
}

###
# description: Schedule an event to occur later
###
proc ::clay::event::schedule {self handle interval script} {
  variable timer_event
  variable timer_script
  if {$::clay::trace} {
    puts [list $self schedule $handle $interval]
  }
  if {[info exists timer_event($self:$handle)]} {
    if {$script eq $timer_script($self:$handle)} {
      return
    }
    ::after cancel $timer_event($self:$handle)
  }
  set timer_script($self:$handle) $script
  set timer_event($self:$handle) [::after $interval [list ::clay::event::process $self $handle $script]]
}

###
# Subscribe an object to an event pattern
###
proc ::clay::event::subscribe {self who event} {
  upvar #0 ::clay::object_subscribe($self) subscriptions
  if {![info exists subscriptions]} {
    set subscriptions {}
  }
  set match 0
  foreach {objpat eventlist} $subscriptions {
    if {![string match $objpat $who]} continue
    foreach eventpat $eventlist {
      if {[string match $eventpat $event]} {
        # This rule already exists
        return
      }
    }
  }
  dict lappend subscriptions $who $event
}

###
# Unsubscribe an object from an event pattern
###
proc ::clay::event::unsubscribe {self args} {
  upvar #0 ::clay::object_subscribe($self) subscriptions
  if {![info exists subscriptions]} {
    return
  }
  switch [llength $args] {
    1 {
      set event [lindex $args 0]
      if {$event eq "*"} {
        # Shortcut, if the
        set subscriptions {}
      } else {
        set newlist {}
        foreach {objpat eventlist} $subscriptions {
          foreach eventpat $eventlist {
            if {[string match $event $eventpat]} continue
            dict lappend newlist $objpat $eventpat
          }
        }
        set subscriptions $newlist
      }
    }
    2 {
      set who [lindex $args 0]
      set event [lindex $args 1]
      if {$who eq "*" && $event eq "*"} {
        set subscriptions {}
      } else {
        set newlist {}
        foreach {objpat eventlist} $subscriptions {
          if {[string match $who $objpat]} {
            foreach eventpat $eventlist {
              if {[string match $event $eventpat]} continue
              dict lappend newlist $objpat $eventpat
            }
          }
        }
        set subscriptions $newlist
      }
    }
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































Deleted modules/clay/build/footer.txt.

1
2
[vset CATEGORY oo]
[include ../common-text/feedback.inc]
<
<




Deleted modules/clay/build/list.tcl.

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
###
# Add elements to a list if that are not already present in the list.
# As a side effect, if variable [variable varname] does not exists,
# create it as an empty list.
# arglist:
# varname {positional 1 mandatory 1}
# element {positional 1 mandatory 0 repeating 1}
# example:
# ladd contents foo bar
# puts $contents
# > foo bar
# ladd contents foo bar baz bang
# puts $contents
# > foo bar baz bang
###
::clay::PROC ::clay::ladd {varname args} {
  upvar 1 $varname var
  if ![info exists var] {
      set var {}
  }
  foreach item $args {
    if {$item in $var} continue
    lappend var $item
  }
  return $var
}

###
# Delete all instances of the elements given from a list contained in [variable varname].
# If the variable does exist this is a noop.
# arglist:
# varname {positional 1 mandatory 1}
# element {positional 1 mandatory 0 repeating 1}
# example:
# set contents {foo bar baz bang foo foo foo}
# ldelete contents foo
# puts $contents
# > bar baz bang
###
::clay::PROC ::clay::ldelete {varname args} {
  upvar 1 $varname var
  if ![info exists var] {
      return
  }
  foreach item [lsort -unique $args] {
    while {[set i [lsearch $var $item]]>=0} {
      set var [lreplace $var $i $i]
    }
  }
  return $var
}

###
# Return a random element from [variable list]
###
::clay::PROC ::clay::lrandom list {
  set len [llength $list]
  set idx [expr int(rand()*$len)]
  return [lindex $list $idx]
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































Deleted modules/clay/build/manual.txt.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[keywords oo]
[copyright {2018 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Clay Framework}]
[titledesc {A minimalist framework for large scale OO Projects}]
[category  {Programming tools}]
[keywords TclOO]
[require Tcl 8.6]
[require uuid]
[require oo::dialect]
[description]
Clay introduces a method ensemble to both [class oo::class] and [class oo::object] called
clay. This ensemble handles all of the high level interactions within the framework.
Clay stores structured data. Clan manages method delegation. Clay has facilities to
manage the complex interactions that come about with mixins.
[para]
The central concept is that inside of every object and class
(which are actually objects too) is a dict called clay. What is stored in that dict is
left to the imagination. But because this dict is exposed via a public method, we can
share structured data between object, classes, and mixins.
[para]
[subsection {Structured Data}]
Clay uses a standardized set of method interactions and introspection that TclOO already provides to perform on-the-fly searches. On-the-fly searches mean that the data is never stale, and we avoid many of the sorts of collisions that would arise when objects start mixing in other classes during operation.
[para]
The [method clay] methods for both classes and objects have a get and a set method. For objects, get will search through the local clay dict. If the requested leaf is not found, or the query is for a branch, the system will then begin to poll the clay methods of all of the class that implements the object, all of that classes’ ancestors, as well as all of the classes that have been mixed into this object, and all of their ancestors.
[para]
Intended branches on a tree end with a directory slash (/). Intended leaves are left unadorned. This is a guide for the tool that builds the search
results to know what parts of a dict are intended to be branches and which are intended to be leaves.
For simple cases, branch marking can be ignored:
[example {
::oo::class create ::foo { }
::foo clay set property/ color blue
::foo clay set property/ shape round

set A [::foo new]
$A clay get property/
{color blue shape round}

$A clay set property/ shape square
$A clay get property/
{color blue shape square}
}]
[para]
But when you start storing blocks of text, guessing what field is a dict and what isn’t gets messy:
[example {
::foo clay set description {A generic thing of designated color and shape}

$A clay get description
{A generic thing of designated color and shape}

Without a convention for discerning branches for leaves what should have been a value can be accidentally parsed as a dictionary, and merged with all of the other values that were never intended to be merge. Here is an example of it all going wrong:
::oo::class create ::foo { }
# Add description as a leaf
::foo clay set description \
  {A generic thing of designated color and shape}
# Add description as a branch
::foo clay set description/ \
  {A generic thing of designated color and shape}

::oo::class create ::bar {
  superclass foo
}
# Add description as a leaf
::bar clay set description \
  {A drinking establishment of designated color and shape and size}
# Add description as a branch
::bar clay set description/ \
  {A drinking establishment of designated color and shape and size}

set B [::bar new]
# As a leaf we get the value verbatim from he nearest ancestor
$B clay get description
  {A drinking establishment of designated color and shape and size}
# As a branch we get a recursive merge
$B clay get description/
{A drinking establishment of designated color and size thing of}
}]
[subsection {Clay Dialect}]
Clay is built using the oo::dialect module from Tcllib. oo::dialect allows you to either add keywords directly to clay, or to create your own
metaclass and keyword set using Clay as a foundation. For details on the keywords and what they do, consult the functions in the ::clay::define namespace.
[subsection {Method Delegation}]
Method Delegation
It is sometimes useful to have an external object that can be invoked as if it were a method of the object. Clay provides a delegate ensemble method to perform that delegation, as well as introspect which methods are delegated in that manner. All delegated methods are marked with html-like tag markings (< >) around them.
[example {
::clay::define counter {
  Variable counter 0
  method incr {{howmuch 1}} {
    my variable counter
    incr counter $howmuch
  }
  method value {} {
    my variable counter
    return $counter
  }
  method reset {} {
    my variable counter
    set counter 0
  }
}
::clay::define example {
  variable buffer
  constructor {} {
    # Build a counter object
    set obj [namespace current]::counter
    ::counter create $obj
    # Delegate the counter
    my delegate <counter> $obj
  }
  method line {text} {
    my <counter> incr
    append buffer $text
  }
}

set A [example new]
$A line {Who’s line is it anyway?}
$A <counter> value
1
}]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































Deleted modules/clay/build/metaclass.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
#-------------------------------------------------------------------------
# TITLE:
#    clay.tcl
#
# PROJECT:
#    clay: TclOO Helper Library
#
# DESCRIPTION:
#    clay(n): Implementation File
#
#-------------------------------------------------------------------------
::clay::dialect::create ::clay


proc ::clay::dynamic_methods class {
  foreach command [info commands [namespace current]::dynamic_methods_*] {
    $command $class
  }
}

proc ::clay::dynamic_methods_class {thisclass} {
  set methods {}
  set mdata [$thisclass clay find class_typemethod]
  foreach {method info} $mdata {
    if {$method eq {.}} continue
    set method [string trimright $method :/-]
    if {$method in $methods} continue
    lappend methods $method
    set arglist [dict getnull $info arglist]
    set body    [dict getnull $info body]
    ::oo::objdefine $thisclass method $method $arglist $body
  }
}

###
# New OO Keywords for clay
###
proc ::clay::define::Array {name {values {}}} {
  set class [current_class]
  set name [string trim $name :/]
  $class clay branch array $name
  dict for {var val} $values {
    $class clay set array/ $name $var $val
  }
}

###
# An annotation that objects of this class interact with delegated
# methods. The annotation is intended to be a dictionary, and the
# only reserved key is [emph {description}], a human readable description.
###
proc ::clay::define::Delegate {name info} {
  set class [current_class]
  foreach {field value} $info {
    $class clay set component/ [string trim $name :/]/ $field $value
  }
}

###
# topic: 2cfc44a49f067124fda228458f77f177
# title: Specify the constructor for a class
###
proc ::clay::define::constructor {arglist rawbody} {
  set body {
my variable DestroyEvent
set DestroyEvent 0
::clay::object_create [self] [info object class [self]]
# Initialize public variables and options
my InitializePublic
  }
  append body $rawbody
  set class [current_class]
  ::oo::define $class constructor $arglist $body
}

###
# Specify the a method for the class object itself, instead of for objects of the class
###
proc ::clay::define::Class_Method {name arglist body} {
  set class [current_class]
  $class clay set class_typemethod/ [string trim $name :/] [dict create arglist $arglist body $body]
}

###
# And alias to the new Class_Method keyword
###
proc ::clay::define::class_method {name arglist body} {
  set class [current_class]
  $class clay set class_typemethod/ [string trim $name :/] [dict create arglist $arglist body $body]
}

proc ::clay::define::clay {args} {
  set class [current_class]
  if {[lindex $args 0] in "cget set branch"} {
    $class clay {*}$args
  } else {
    $class clay set {*}$args
  }
}

###
# topic: 4cb3696bf06d1e372107795de7fe1545
# title: Specify the destructor for a class
###
proc ::clay::define::destructor rawbody {
  set body {
# Run the destructor once and only once
set self [self]
my variable DestroyEvent
if {$DestroyEvent} return
set DestroyEvent 1
}
  append body $rawbody
  ::oo::define [current_class] destructor $body
}

proc ::clay::define::Dict {name {values {}}} {
  set class [current_class]
  set name [string trim $name :/]
  $class clay branch dict $name
  foreach {var val} $values {
    $class clay set dict/ $name/ $var $val
  }
}

###
# Define an option for the class
###
proc ::clay::define::Option {name args} {
  set class [current_class]
  set dictargs {default {}}
  foreach {var val} [::clay::args_to_dict {*}$args] {
    dict set dictargs [string trim $var -:/] $val
  }
  set name [string trimleft $name -]

  ###
  # Option Class handling
  ###
  set optclass [dict getnull $dictargs class]
  if {$optclass ne {}} {
    foreach {f v} [$class clay find option_class $optclass] {
      if {![dict exists $dictargs $f]} {
        dict set dictargs $f $v
      }
    }
    if {$optclass eq "variable"} {
      variable $name [dict getnull $dictargs default]
    }
  }
  foreach {f v} $dictargs {
    $class clay set option $name $f $v
  }
}

proc ::clay::define::Method {name argstyle argspec body} {
  set class [current_class]
  set result {}
  switch $argstyle {
    dictargs {
      append result "::dictargs::parse \{$argspec\} \$args" \;
    }
  }
  append result $body
  oo::define $class method $name [list [list args [list dictargs $argspec]]] $result
}

###
# Define a class of options
# All field / value pairs will be be inherited by an option that
# specify [emph name] as it class field.
###
proc ::clay::define::Option_Class {name args} {
  set class [current_class]
  set dictargs {default {}}
  set name [string trimleft $name -:]
  foreach {f v} [::clay::args_to_dict {*}$args] {
    $class clay set option_class $name [string trim $f -/:] $v
  }
}

###
# topic: 615b7c43b863b0d8d1f9107a8d126b21
# title: Specify a variable which should be initialized in the constructor
# description:
#    This keyword can also be expressed:
#    [example {property variable NAME {default DEFAULT}}]
#    [para]
#    Variables registered in the variable property are also initialized
#    (if missing) when the object changes class via the [emph morph] method.
###
proc ::clay::define::Variable {name {default {}}} {
  set class [current_class]
  set name [string trimright $name :/]
  $class clay set variable/ $name $default
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































Deleted modules/clay/build/object.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
# clay::object
#
# This class is inherited by all classes that have options.
#
::oo::define ::clay::object {

  ###
  # description:
  # The [method clay] method allows an object access
  # to a combination of its own clay data as
  # well as to that of its class
  # ensemble:
  # ancestors {
  #   argspec {}
  #   description {Return the class this object belongs to, all classes mixed into this object, and all ancestors of those classes in search order.}
  # }
  # cache {
  #   argspec {path {mandatory 1 positional 1} value {mandatory 1 positional 1}}
  #   description {Store VALUE in such a way that request in SEARCH for PATH will always return it until the cache is flushed}
  # }
  # cget {
  #   argspec {field {mandatory 1 positional 1}}
  #   description {
  # Pull a value from either the object's clay structure or one of its constituent classes that matches the field name.
  # The order of search us:
  # [para] 1. The as a value in local dict variable config
  # [para] 2. The as a value in local dict variable clay
  # [para] 3. As a leaf in any ancestor as a root of the clay tree
  # [para] 4. As a leaf in any ancestor as [const const] [emph field]
  # [para] 5. As a leaf in any ancestor as [const option] [emph field] [const default]
  #   }
  # }
  # delegate {
  #   argspec {stub {mandatory 0 positional 1} object {mandatory 0 positional 1}}
  #   description {
  # Introspect or control method delegation. With no arguments, the method will return a
  # key/value list of stubs and objects. With just the [arg stub] argument, the method will
  # return the object (if any) attached to the stub. With a [arg stub] and an [arg object]
  # this command will forward all calls to the method [arg stub] to the [arg object].
  # }
  # }
  # dump { argspec {} description {Return a complete dump of this object's clay data, as well as the data from all constituent classes recursively blended in.}}
  # ensemble_map {argspec {} description {Return a dictionary describing the method ensembles to be assembled for this object}}
  # eval {argspec {script {mandatory 1 positional 1}} description {Evaluated a script in the namespace of this object}}
  # evolve {argspec {} description {Trigger the [method InitializePublic] private method}}
  # exists {argspec {path {mandatory 1 positional 1 repeating 1}} description {Returns 1 if [emph path] exists in either the object's clay data. Values greater than one indicate the element exists in one of the object's constituent classes. A value of zero indicates the path could not be found.}}
  # flush {argspec {} description {Wipe any caches built by the clay implementation}}
  # forward {argspec {method {positional 1 mandatory 1} object {positional 1 mandatory 1}} description {A convenience wrapper for
  # [example {oo::objdefine [self] forward {*}$args}]
  # }
  # }
  # get {argspec {path {mandatory 1 positional 1 repeating 1}}
  #   description {Pull a chunk of data from the clay system. If the last element of [emph path] is a branch (ends in a slash /),
  #   returns a recursive merge of all data from this object and it's constituent classes of the data in that branch.
  #   If the last element is a leaf, search this object for a matching leaf, or search all  constituent classes for a matching
  #   leaf and return the first value found.
  #   If no value is found, returns an empty string.
  # }
  # }
  # leaf {argspec {path {mandatory 1 positional 1 repeating 1}} description {A modified get which is tailored to pull only leaf elements}}
  # merge {argspec {dict {mandatory 1 positional 1 repeating 1}} description {Recursively merge the dictionaries given into the object's local clay storage.}}
  # mixin {argspec {class {mandatory 1 positional 1 repeating 1}} description {
  # Perform [lb]oo::objdefine [lb]self[rb] mixin[rb] on this object, with a few additional rules:
  #   Prior to the call, for any class was previously mixed in, but not in the new result, execute the script registered to mixin/ unmap-script (if given.)
  #   For all new classes, that were not present prior to this call, after the native TclOO mixin is invoked, execute the script registered to mixin/ map-script (if given.)
  #   Fall all classes that are now present and “mixed inâ€, execute the script registered to mixin/ react-script (if given.)
  # }}
  # mixinmap {
  #   argspec {stub {mandatory 0 positional 1} classes {mandatory 0 positional 1}}
  #   description {With no arguments returns the map of stubs and classes mixed into the current object. When only stub is given,
  #  returns the classes mixed in on that stub. When stub and classlist given, replace the classes currently on that stub with the given
  #  classes and invoke clay mixin on the new matrix of mixed in classes.
  # }
  # }
  # provenance {argspec {path {mandatory 1 positional 1 repeating 1}} description {Return either [const self] if that path exists in the current object, or return the first class (if any) along the clay search path which contains that element.}}
  # replace {argspec {dictionary {mandatory 1 positional 1}} description {Replace the contents of the internal clay storage with the dictionary given.}}
  # search {
  #   argspec {path {mandatory 1 positional 1} valuevar {mandatory 1 positional 1} isleafvar {mandatory 1 positional 1}}
  #   description {Return true, and set valuevar to the value and isleafar to true for false if PATH was found in the cache.}
  #}
  # source {argspec {filename {mandatory 1 positional 1}} description {Source the given filename within the object's namespace}}
  # set {argspec {path {mandatory 1 positional 1 repeating 1} value {mandatory 1 postional 1}} description {Merge the conents of [const value] with the object's clay storage at [const path].}}
  ###
  method clay {submethod args} {
    my variable clay claycache clayorder config option_canonical
    if {![info exists clay]} {set clay {}}
    if {![info exists claycache]} {set claycache {}}
    if {![info exists config]} {set config {}}
    if {![info exists clayorder] || [llength $clayorder]==0} {
      set clayorder {}
      if {[dict exists $clay cascade]} {
        dict for {f v} [dict get $clay cascade] {
          if {$f eq "."} continue
          if {[info commands $v] ne {}} {
            lappend clayorder $v
          }
        }
      }
      lappend clayorder {*}[::clay::ancestors [info object class [self]] {*}[lreverse [info object mixins [self]]]]
    }
    switch $submethod {
      ancestors {
        return $clayorder
      }
      branch {
        set path [::clay::tree::storage $args]
        if {![dict exists $clay {*}$path .]} {
          dict set clay {*}$path . {}
        }
      }
      busy {
        my variable clay_busy
        if {[llength $args]} {
          set clay_busy [string is true [lindex $args 0]]
          set claycache {}
        }
        if {![info exists clay_busy]} {
          set clay_busy 0
        }
        return $clay_busy
      }
      cache {
        set path [lindex $args 0]
        set value [lindex $args 1]
        dict set claycache $path $value
      }
      cget {
        # Leaf searches return one data field at a time
        # Search in our local dict
        if {[llength $args]==1} {
          set field [string trim [lindex $args 0] -:/]
          if {[info exists option_canonical($field)]} {
            set field $option_canonical($field)
          }
          if {[dict exists $config $field]} {
            return [dict get $config $field]
          }
        }
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[dict exists $claycache {*}$path]} {
          if {[dict exists $claycache {*}$path .]} {
            return [dict remove [dict get $claycache {*}$path] .]
          } else {
            return [dict get $claycache {*}$path]
          }
        }
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          if {[$class clay exists {*}$path]} {
            set value [$class clay get {*}$path]
            dict set claycache {*}$path $value
            return $value
          }
          if {[$class clay exists const {*}$path]} {
            set value [$class clay get const {*}$path]
            dict set claycache {*}$path $value
            return $value
          }
          if {[$class clay exists option {*}$path default]} {
            set value [$class clay get option {*}$path default]
            dict set claycache {*}$path $value
            return $value
          }
        }
        return {}
      }
      delegate {
        if {![dict exists $clay .delegate <class>]} {
          dict set clay .delegate <class> [info object class [self]]
        }
        if {[llength $args]==0} {
          return [dict get $clay .delegate]
        }
        if {[llength $args]==1} {
          set stub <[string trim [lindex $args 0] <>]>
          if {![dict exists $clay .delegate $stub]} {
            return {}
          }
          return [dict get $clay .delegate $stub]
        }
        if {([llength $args] % 2)} {
          error "Usage: delegate
    OR
    delegate stub
    OR
    delegate stub OBJECT ?stub OBJECT? ..."
        }
        foreach {stub object} $args {
          set stub <[string trim $stub <>]>
          dict set clay .delegate $stub $object
          oo::objdefine [self] forward ${stub} $object
          oo::objdefine [self] export ${stub}
        }
      }
      dump {
        # Do a full dump of clay data
        set result {}
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          ::clay::tree::dictmerge result [$class clay dump]
        }
        ::clay::tree::dictmerge result $clay
        return $result
      }
      ensemble_map {
        set path [::clay::tree::storage method_ensemble]
        if {[dict exists $claycache {*}$path]} {
          return [dict get $claycache {*}$path]
        }
        set emap {}
        foreach class $clayorder {
          if {![$class clay exists {*}$path .]} continue
          dict for {ensemble einfo} [$class clay dget {*}$path] {
            if {$ensemble eq "."} continue
            dict for {method body} $einfo {
              if {$method eq "."} continue
              dict set emap $ensemble $method class: $class
              dict set emap $ensemble $method body: $body
            }
          }
        }
        if {[dict exists $clay {*}$path]} {
          dict for {ensemble einfo} [dict get $clay {*}$path] {
            dict for {method body} $einfo {
              if {$method eq "."} continue
              dict set emap $ensemble $method class: $class
              dict set emap $ensemble $method body: $body
            }
          }
        }
        dict set claycache {*}$path $emap
        return $emap
      }
      eval {
        set script [lindex $args 0]
        set buffer {}
        set thisline {}
        foreach line [split $script \n] {
          append thisline $line
          if {![info complete $thisline]} {
            append thisline \n
            continue
          }
          set thisline [string trim $thisline]
          if {[string index $thisline 0] eq "#"} continue
          if {[string length $thisline]==0} continue
          if {[lindex $thisline 0] eq "my"} {
            # Line already calls out "my", accept verbatim
            append buffer $thisline \n
          } elseif {[string range $thisline 0 2] eq "::"} {
            # Fully qualified commands accepted verbatim
            append buffer $thisline \n
          } elseif {
            append buffer "my $thisline" \n
          }
          set thisline {}
        }
        eval $buffer
      }
      evolve -
      initialize {
        my InitializePublic
      }
      exists {
        # Leaf searches return one data field at a time
        # Search in our local dict
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return 1
        }
        # Search in our local cache
        if {[dict exists $claycache {*}$path]} {
          return 2
        }
        set count 2
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          incr count
          if {[$class clay exists {*}$path]} {
            return $count
          }
        }
        return 0
      }
      flush {
        set claycache {}
        set clayorder [::clay::ancestors [info object class [self]] {*}[lreverse [info object mixins [self]]]]
      }
      forward {
        oo::objdefine [self] forward {*}$args
      }
      dget {
        set path [::clay::tree::storage $args]
        if {[llength $path]==0} {
          # Do a full dump of clay data
          set result {}
          # Search in the in our list of classes for an answer
          foreach class $clayorder {
            ::clay::tree::dictmerge result [$class clay dump]
          }
          ::clay::tree::dictmerge result $clay
          return $result
        }
        if {[dict exists $clay {*}$path] && ![dict exists $clay {*}$path .]} {
          # Path is a leaf
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[my clay search $path value isleaf]} {
          return $value
        }

        set found 0
        set branch [dict exists $clay {*}$path .]
        foreach class $clayorder {
          if {[$class clay exists {*}$path .]} {
            set found 1
            break
          }
          if {!$branch && [$class clay exists {*}$path]} {
            set result [$class clay dget {*}$path]
            my clay cache $path $result
            return $result
          }
        }
        # Path is a branch
        set result [dict getnull $clay {*}$path]
        foreach class $clayorder {
          if {![$class clay exists {*}$path .]} continue
          ::clay::tree::dictmerge result [$class clay dget {*}$path]
        }
        #if {[dict exists $clay {*}$path .]} {
        #  ::clay::tree::dictmerge result
        #}
        my clay cache $path $result
        return $result
      }
      getnull -
      get {
        set path [::clay::tree::storage $args]
        if {[llength $path]==0} {
          # Do a full dump of clay data
          set result {}
          # Search in the in our list of classes for an answer
          foreach class $clayorder {
            ::clay::tree::dictmerge result [$class clay dump]
          }
          ::clay::tree::dictmerge result $clay
          return [::clay::tree::sanitize $result]
        }
        if {[dict exists $clay {*}$path] && ![dict exists $clay {*}$path .]} {
          # Path is a leaf
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[my clay search $path value isleaf]} {
          if {!$isleaf} {
            return [clay::tree::sanitize $value]
          } else {
            return $value
          }
        }
        set found 0
        set branch [dict exists $clay {*}$path .]
        foreach class $clayorder {
          if {[$class clay exists {*}$path .]} {
            set found 1
            break
          }
          if {!$branch && [$class clay exists {*}$path]} {
            set result [$class clay dget {*}$path]
            my clay cache $path $result
            return $result
          }
        }
        # Path is a branch
        set result [dict getnull $clay {*}$path]
        #foreach class [lreverse $clayorder] {
        #  if {![$class clay exists {*}$path .]} continue
        #  ::clay::tree::dictmerge result [$class clay dget {*}$path]
        #}
        foreach class $clayorder {
          if {![$class clay exists {*}$path .]} continue
          ::clay::tree::dictmerge result [$class clay dget {*}$path]
        }
        #if {[dict exists $clay {*}$path .]} {
        #  ::clay::tree::dictmerge result [dict get $clay {*}$path]
        #}
        my clay cache $path $result
        return [clay::tree::sanitize $result]
      }
      leaf {
        # Leaf searches return one data field at a time
        # Search in our local dict
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path .]} {
          return [clay::tree::sanitize [dict get $clay {*}$path]]
        }
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[my clay search $path value isleaf]} {
          if {!$isleaf} {
            return [clay::tree::sanitize $value]
          } else {
            return $value
          }
        }
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          if {[$class clay exists {*}$path]} {
            set value [$class clay get {*}$path]
            my clay cache $path $value
            return $value
          }
        }
      }
      merge {
        foreach arg $args {
          ::clay::tree::dictmerge clay {*}$arg
        }
      }
      mixin {
        ###
        # Mix in the class
        ###
        my clay flush
        set prior  [info object mixins [self]]
        set newmixin {}
        foreach item $args {
          lappend newmixin ::[string trimleft $item :]
        }
        set newmap $args
        foreach class $prior {
          if {$class ni $newmixin} {
            set script [$class clay search mixin/ unmap-script]
            if {[string length $script]} {
              if {[catch $script err errdat]} {
                puts stderr "[self] MIXIN ERROR POPPING $class:\n[dict get $errdat -errorinfo]"
              }
            }
          }
        }
        ::oo::objdefine [self] mixin {*}$args
        ###
        # Build a compsite map of all ensembles defined by the object's current
        # class as well as all of the classes being mixed in
        ###
        my InitializePublic
        foreach class $newmixin {
          if {$class ni $prior} {
            set script [$class clay search mixin/ map-script]
            if {[string length $script]} {
              if {[catch $script err errdat]} {
                puts stderr "[self] MIXIN ERROR PUSHING $class:\n[dict get $errdat -errorinfo]"
              }
            }
          }
        }
        foreach class $newmixin {
          set script [$class clay search mixin/ react-script]
          if {[string length $script]} {
            if {[catch $script err errdat]} {
              puts stderr "[self] MIXIN ERROR PEEKING $class:\n[dict get $errdat -errorinfo]"
            }
            break
          }
        }
      }
      mixinmap {
        if {![dict exists $clay .mixin]} {
          dict set clay .mixin {}
        }
        if {[llength $args]==0} {
          return [dict get $clay .mixin]
        } elseif {[llength $args]==1} {
          return [dict getnull $clay .mixin [lindex $args 0]]
        } else {
          dict for {slot classes} $args {
            dict set clay .mixin $slot $classes
          }
          set classlist {}
          dict for {item class} [dict get $clay .mixin] {
            if {$class ne {}} {
              lappend classlist $class
            }
          }
          my clay mixin {*}[lreverse $classlist]
        }
      }
      provenance {
        if {[dict exists $clay {*}$args]} {
          return self
        }
        foreach class $clayorder {
          if {[$class clay exists {*}$args]} {
            return $class
          }
        }
        return {}
      }
      refcount {
        my variable refcount
        if {![info exists refcount]} {
          return 0
        }
        return $refcount
      }
      refcount_incr {
        my variable refcount
        incr refcount
      }
      refcount_decr {
        my variable refcount
        incr refcount -1
        if {$refcount <= 0} {
          ::clay::object_destroy [self]
        }
      }
      replace {
        set clay [lindex $args 0]
      }
      search {
        set path [lindex $args 0]
        upvar 1 [lindex $args 1] value [lindex $args 2] isleaf
        set isleaf [expr {![dict exists $claycache $path .]}]
        if {[dict exists $claycache $path]} {
          set value [dict get $claycache $path]
          return 1
        }
        return 0
      }
      source {
        source [lindex $args 0]
      }
      set {
        #puts [list [self] clay SET {*}$args]
        ::clay::tree::dictset clay {*}$args
      }
      default {
        dict $submethod clay {*}$args
      }
    }
  }

  ###
  # Instantiate variables. Called on object creation and during clay mixin.
  ###
  method InitializePublic {} {
    my variable clayorder clay claycache config option_canonical clay_busy
    if {[info exists clay_busy] && $clay_busy} {
      # Avoid repeated calls to InitializePublic if we know that someone is
      # going to invoke it at the end of whatever process is going on
      return
    }
    set claycache {}
    set clayorder [::clay::ancestors [info object class [self]] {*}[lreverse [info object mixins [self]]]]
    if {![info exists clay]} {
      set clay {}
    }
    if {![info exists config]} {
      set config {}
    }
    dict for {var value} [my clay get variable] {
      if { $var in {. clay} } continue
      set var [string trim $var :/]
      my variable $var
      if {![info exists $var]} {
        if {$::clay::trace>2} {puts [list initialize variable $var $value]}
        set $var $value
      }
    }
    dict for {var value} [my clay get dict/] {
      if { $var in {. clay} } continue
      set var [string trim $var :/]
      my variable $var
      if {![info exists $var]} {
        set $var {}
      }
      foreach {f v} $value {
        if {$f eq "."} continue
        if {![dict exists ${var} $f]} {
          if {$::clay::trace>2} {puts [list initialize dict $var $f $v]}
          dict set ${var} $f $v
        }
      }
    }
    foreach {var value} [my clay get array/] {
      if { $var in {. clay} } continue
      set var [string trim $var :/]
      if { $var eq {clay} } continue
      my variable $var
      if {![info exists $var]} { array set $var {} }
      foreach {f v} $value {
        if {![array exists ${var}($f)]} {
          if {$f eq "."} continue
          if {$::clay::trace>2} {puts [list initialize array $var\($f\) $v]}
          set ${var}($f) $v
        }
      }
    }
    foreach {field info} [my clay get option/] {
      if { $field in {. clay} } continue
      set field [string trim $field -/:]
      foreach alias [dict getnull $info aliases] {
        set option_canonical($alias) $field
      }
      if {[dict exists $config $field]} continue
      set getcmd [dict getnull $info default-command]
      if {$getcmd ne {}} {
        set value [{*}[string map [list %field% $field %self% [namespace which my]] $getcmd]]
      } else {
        set value [dict getnull $info default]
      }
      dict set config $field $value
      set setcmd [dict getnull $info set-command]
      if {$setcmd ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $value] %self% [namespace which my]] $setcmd]
      }
    }

    foreach {ensemble einfo} [my clay ensemble_map] {
      #if {[dict exists $einfo _body]} continue
      if {$ensemble eq "."} continue
      set body [::clay::ensemble_methodbody $ensemble $einfo]
      if {$::clay::trace>2} {
        set rawbody $body
        set body {puts [list [self] <object> [self method]]}
        append body \n $rawbody
      }
      oo::objdefine [self] method $ensemble {{method default} args} $body
    }
  }
}

::clay::object clay branch array
::clay::object clay branch mixin
::clay::object clay branch option
::clay::object clay branch dict clay
::clay::object clay set variable DestroyEvent 0


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/clay/build/procs.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
namespace eval ::clay {}
set ::clay::trace 0

if {[info commands ::cron::object_destroy] eq {}} {
  # Provide a noop if we aren't running with the cron scheduler
  namespace eval ::cron {}
  proc ::cron::object_destroy args {}
}

###
# Because many features in this package may be added as
# commands to future tcl cores, or be provided in binary
# form by packages, I need a declaritive way of saying
# [emph {Create this command if there isn't one already}].
# The [emph ninja] argument is a script to execute if the
# command is created by this mechanism.
###
proc ::clay::PROC {name arglist body {ninja {}}} {
  if {[info commands $name] ne {}} return
  proc $name $arglist $body
  eval $ninja
}
if {[info commands ::PROC] eq {}} {
  namespace eval ::clay { namespace export PROC }
  namespace eval :: { namespace import ::clay::PROC }
}

proc ::clay::_ancestors {resultvar class} {
  upvar 1 $resultvar result
  if {$class in $result} {
    return
  }
  lappend result $class
  foreach aclass [::info class superclasses $class] {
    _ancestors result $aclass
  }
}

proc ::clay::ancestors {args} {
  set result {}
  set queue  {}
  set metaclasses {}

  foreach class $args {
    set ancestors($class) {}
    _ancestors ancestors($class) $class
  }
  foreach class [lreverse $args] {
    foreach aclass $ancestors($class) {
      if {$aclass in $result} continue
      set skip 0
      foreach bclass $args {
        if {$class eq $bclass} continue
        if {$aclass in $ancestors($bclass)} {
          set skip 1
          break
        }
      }
      if {$skip} continue
      lappend result $aclass
    }
  }
  foreach class [lreverse $args] {
    foreach aclass $ancestors($class) {
      if {$aclass in $result} continue
      lappend result $aclass
    }
  }
  ###
  # Screen out classes that do not participate in clay
  # interactions
  ###
  set output {}
  foreach {item} $result {
    if {[catch {$item clay noop} err]} {
      continue
    }
    lappend output $item
  }
  return $output
}

proc ::clay::args_to_dict args {
  if {[llength $args]==1} {
    return [lindex $args 0]
  }
  return $args
}

proc ::clay::args_to_options args {
  set result {}
  foreach {var val} [args_to_dict {*}$args] {
    lappend result [string trim $var -:] $val
  }
  return $result
}

###
# topic: 4969d897a83d91a230a17f166dbcaede
###
proc ::clay::dynamic_arguments {ensemble method arglist args} {
  set idx 0
  set len [llength $args]
  if {$len > [llength $arglist]} {
    ###
    # Catch if the user supplies too many arguments
    ###
    set dargs 0
    if {[lindex $arglist end] ni {args dictargs}} {
      return -code error -level 2 "Usage: $ensemble $method [string trim [dynamic_wrongargs_message $arglist]]"
    }
  }
  foreach argdef $arglist {
    if {$argdef eq "args"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      break
    }
    if {$argdef eq "dictargs"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      ###
      # Perform args processing in the style of clay
      ###
      set dictargs [::clay::args_to_options {*}[lrange $args $idx end]]
      uplevel 1 [list set dictargs $dictargs]
      break
    }
    if {$idx > $len} {
      ###
      # Catch if the user supplies too few arguments
      ###
      if {[llength $argdef]==1} {
        return -code error -level 2 "Usage: $ensemble $method [string trim [dynamic_wrongargs_message $arglist]]"
      } else {
        uplevel 1 [list set [lindex $argdef 0] [lindex $argdef 1]]
      }
    } else {
      uplevel 1 [list set [lindex $argdef 0] [lindex $args $idx]]
    }
    incr idx
  }
}

###
# topic: 53ab28ac5c6ee601fe1fe07b073be88e
###
proc ::clay::dynamic_wrongargs_message {arglist} {
  set result ""
  set dargs 0
  foreach argdef $arglist {
    if {$argdef in {args dictargs}} {
      set dargs 1
      break
    }
    if {[llength $argdef]==1} {
      append result " $argdef"
    } else {
      append result " ?[lindex $argdef 0]?"
    }
  }
  if { $dargs } {
    append result " ?option value?..."
  }
  return $result
}

proc ::clay::is_dict { d } {
  # is it a dict, or can it be treated like one?
  if {[catch {::dict size $d} err]} {
    #::set ::errorInfo {}
    return 0
  }
  return 1
}

proc ::clay::is_null value {
  return [expr {$value in {{} NULL}}]
}

proc ::clay::leaf args {
  set marker [string index [lindex $args end] end]
  set result [path {*}${args}]
  if {$marker eq "/"} {
    return $result
  }
  return [list {*}[lrange $result 0 end-1] [string trim [string trim [lindex $result end]] /]]
}

proc ::clay::K {a b} {set a}
if {[info commands ::K] eq {}} {
  namespace eval ::clay { namespace export K }
  namespace eval :: { namespace import ::clay::K }
}

###
# Perform a noop. Useful in prototyping for commenting out blocks
# of code without actually having to comment them out. It also makes
# a handy default for method delegation if a delegate has not been
# assigned yet.
proc ::clay::noop args {}
if {[info commands ::noop] eq {}} {
  namespace eval ::clay { namespace export noop }
  namespace eval :: { namespace import ::clay::noop }
}


###
# Process the queue of objects to be destroyed
###
proc ::clay::cleanup {} {
  set count 0
  if {![info exists ::clay::idle_destroy]} return
  set objlist $::clay::idle_destroy
  set ::clay::idle_destroy {}
  foreach obj $objlist {
    if {![catch {$obj destroy}]} {
      incr count
    }
  }
  return $count
}

proc ::clay::object_create {objname {class {}}} {
  #if {$::clay::trace>0} {
  #  puts [list $objname CREATE]
  #}
}

proc ::clay::object_rename {object newname} {
  if {$::clay::trace>0} {
    puts [list $object RENAME -> $newname]
  }
}

###
# Mark an objects for destruction on the next cleanup
###
proc ::clay::object_destroy args {
  if {![info exists ::clay::idle_destroy]} {
    set ::clay::idle_destroy {}
  }
  foreach objname $args {
    if {$::clay::trace>0} {
      puts [list $objname DESTROY]
    }
    ::cron::object_destroy $objname
    if {$objname in $::clay::idle_destroy} continue
    lappend ::clay::idle_destroy $objname
  }
}


proc ::clay::path args {
  set result {}
  foreach item $args {
    set item [string trim $item :./]
    foreach subitem [split $item /] {
      lappend result [string trim ${subitem}]/
    }
  }
  return $result
}

###
# Append a line of text to a variable. Optionally apply a string mapping.
# arglist:
#   map {mandatory 0 positional 1}
#   text {mandatory 1 positional 1}
###
proc ::clay::putb {buffername args} {
  upvar 1 $buffername buffer
  switch [llength $args] {
    1 {
      append buffer [lindex $args 0] \n
    }
    2 {
      append buffer [string map {*}$args] \n
    }
    default {
      error "usage: putb buffername ?map? string"
    }
  }
}
if {[info command ::putb] eq {}} {
  namespace eval ::clay { namespace export putb }
  namespace eval :: { namespace import ::clay::putb }
}

proc ::clay::script_path {} {
  set path [file dirname [file join [pwd] [info script]]]
  return $path
}

proc ::clay::NSNormalize qualname {
  if {![string match ::* $qualname]} {
    set qualname ::clay::classes::$qualname
  }
  regsub -all {::+} $qualname "::"
}

proc ::clay::uuid_generate args {
  return [uuid generate]
}

namespace eval ::clay {
  variable option_class {}
  variable core_classes {::oo::class ::oo::object}
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































Deleted modules/clay/build/singleton.tcl.

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
###
# An object which is intended to be it's own class.
# arglist:
#   name    {mandatory 1 positional 1 description {the fully qualified name of the object}}
#   script  {mandatory 1 positional 1 description {
# A script that will be executed in the object's namespace.
# The command [bold clay] is provided, and will allow the script to exercise the object's own
# clay method. The command [bold method] is provided, and will define or modify a per-instance
# version of the object's method. The command [bold Ensemble] is provided, and will define or
# modify an ensemble method (though customized for this object)
# }}
###
proc ::clay::singleton {name script} {
  if {[info commands $name] eq {}} {
    ::clay::object create $name
  }
  oo::objdefine $name {
method SingletonProcs {} {
proc class class {
  uplevel 1 "oo::objdefine \[self\] class $class"
  my clay delegate class $class
}
proc clay args {
  my clay {*}$args
}
proc Ensemble {rawmethod args} {
  if {[llength $args]==2} {
    lassign $args argspec body
    set argstyle tcl
  } elseif {[llength $args]==3} {
    lassign $args argstyle argspec body
  } else {
    error "Usage: Ensemble name ?argstyle? argspec body"
  }
  set class [uplevel 1 self]
  #if {$::clay::trace>2} {
  #  puts [list $class Ensemble $rawmethod $argspec $body]
  #}
  set mlist [split $rawmethod "::"]
  set ensemble [string trim [lindex $mlist 0] :/]
  set method   [string trim [lindex $mlist 2] :/]
  if {[string index $method 0] eq "_"} {
    $class clay set method_ensemble $ensemble $method $body
    return
  }
  set realmethod  [string totitle $ensemble]_${method}
  set realbody {}
  if {$argstyle eq "dictargs"} {
    append realbody "::dictargs::parse \{$argspec\} \$args" \n
  }
  if {[$class clay exists method_ensemble $ensemble _preamble]} {
    append realbody [$class clay get method_ensemble $ensemble _preamble] \n
  }
  append realbody $body
  if {$method eq "default"} {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod \$method {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::objdefine $class method $realmethod [list method [list args $argspec]] $realbody
    } else {
      oo::objdefine $class method $realmethod [list method {*}$argspec] $realbody
    }
  } else {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::objdefine $class method $realmethod [list [list args $argspec]] $realbody
    } else {
      oo::objdefine $class method $realmethod $argspec $realbody
    }
  }
  if {$::clay::trace>2} {
    puts [list $class clay set method_ensemble/ $ensemble [string trim $method :/]  ...]
  }
}
proc method args {
  uplevel 1 "oo::objdefine \[self\] method {*}$args"
}
}
method script script {
  my clay busy 1
  my SingletonProcs
  eval $script
  my clay busy 0
  my InitializePublic
}
}
  $name script $script
  return $name
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































Deleted modules/clay/build/test.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
###
# Test script build functions
###

set result {}
putb result {# clay.test - Copyright (c) 2018 Sean Woods
# -------------------------------------------------------------------------

set MODDIR [file dirname [file dirname [file join [pwd] [info script]]]]
if {[file exists [file join $MODDIR devtools testutilities.tcl]]} {
  # Running inside tcllib
  set TCLLIBMOD $MODDIR
} else {
  set TCLLIBMOD [file join $MODDIR .. .. tcllib modules]
}
source [file join $TCLLIBMOD devtools testutilities.tcl]

testsNeedTcl     8.6
testsNeedTcltest 2
testsNeed        TclOO 1

support {}
testing {
    useLocal clay.tcl clay
}
}

putb result {
set ::clay::trace 0
}

###
# UUID test
###
putb result {

# -------------------------------------------------------------------------
# Handle multiple implementation testing
#

array set preserve [array get ::clay::uuid::accel]

proc implementations {} {
    variable ::clay::uuid::accel
    foreach {a v} [array get accel] {if {$v} {lappend r $a}}
    lappend r tcl; set r
}

proc select_implementation {impl} {
    variable ::clay::uuid::accel
    foreach e [array names accel] { set accel($e) 0 }
    if {[string compare "tcl" $impl] != 0} {
        set accel($impl) 1
    }
}

proc reset_implementation {} {
    variable ::clay::uuid::accel
    array set accel [array get ::preserve]
}

# -------------------------------------------------------------------------
# Setup any constraints
#

# -------------------------------------------------------------------------
# Now the package specific tests....
# -------------------------------------------------------------------------

# -------------------------------------------------------------------------

foreach impl [implementations] {
    select_implementation $impl

    test uuid-1.0-$impl "uuid requires args" {
        list [catch {clay::uuid} msg]
    } {1}

    test uuid-1.1-$impl "uuid generate should create a 36 char string uuid" {
        list [catch {string length [clay::uuid generate]} msg] $msg
    } {0 36}

    test uuid-1.2-$impl "uuid comparison of uuid with self should be true" {
        list [catch {
            set a [clay::uuid generate]
            clay::uuid equal $a $a
        } msg] $msg
    } {0 1}

    test uuid-1.3-$impl "uuid comparison of two different\
        uuids should be false" {
        list [catch {
            set a [clay::uuid generate]
            set b [clay::uuid generate]
            clay::uuid equal $a $b
        } msg] $msg
    } {0 0}

    reset_implementation
}
}


putb result {
# Modification History:
###
# Modification 2018-10-30
# Fixed an error in our ancestry mapping and developed tests to
# ensure we are actually following in the order TclOO follows methods
###
# Modification 2018-10-21
# The clay metaclass no longer exports the clay method
# to oo::class and oo::object, and clay::ancestors no
# longer returns any class that lacks the clay method
###
# Modification 2018-10-10
# clay::ancestors now rigged to descend into all classes depth-first
# and then place metaclasses at the end of the search
###
# -------------------------------------------------------------------------

# -------------------------------------------------------------------------
# Test Helpers
###
proc dict_compare {a b} {
  set result {}
  set A {}
  dict for {f v} $a {
    set f [string trim $f :/]
    if {$f eq {.}} continue
    dict set A $f $v
  }
  set B {}
  dict for {f v} $b {
    set f [string trim $f :/]
    if {$f eq {.}} continue
    dict set B $f $v
  }
  dict for {f v} $A {
    if {[dict exists $B $f]} {
      if {[dict get $B $f] ne $v} {
        lappend result [list B $f [dict get $B $f] [list != $v]]
      }
    } else {
      lappend result [list B $f $v missing]
    }
  }
  dict for {f v} $B {
    if {![dict exists $A $f]} {
      lappend result [list A $f $v missing]
    }
  }
  return $result
}

test dict-compare-001 {Test our testing method} {
  dict_compare {} {}
} {}

test dict-compare-002 {Test our testing method} {
  dict_compare {a 1} {}
} {{B a 1 missing}}

test dict-compare-003 {Test our testing method} {
  dict_compare {a 1 b 2} {a 1 b 2}
} {}

test dict-compare-003.a {Test our testing method} {
  dict_compare {a 1 b 2} {b 2 a 1 }
} {}

test dict-compare-003.b {Test our testing method} {
  dict_compare {b 2 a 1} {a 1 b 2}
} {}


test dict-compare-004 {Test our testing method} {
  dict_compare {a: 1 b: 2} {a 1 b 2}
} {}

test dict-compare-005 {Test our testing method} {
  dict_compare {a 1 b 3} {a 1 b 2}
} {{B b 2 {!= 3}}}
}


###
# Tests for clay::tree
###

putb result {
###
# Test canonical mapping
###
}
set test 0
  foreach {pattern canonical storage} {
    {foo bar baz}       {foo/ bar/ baz}         {foo bar baz}
    {foo bar baz/}      {foo/ bar/ baz/}        {foo bar baz}
    {foo bar .}         {foo/ bar}              {foo bar .}
    {foo/ bar/ .}       {foo/ bar}              {foo bar .}
    {foo . bar . baz .} {foo/ bar/ baz}         {foo . bar . baz .}
    {foo bar baz bat:}  {foo/ bar/ baz/ bat:}   {foo bar baz bat:}
    {foo:}              {foo:}                  {foo:}
    {foo/bar/baz/bat:}  {foo/ bar/ baz/ bat:}   {foo bar baz bat:}
} {
    dict set map %pattern% $pattern
    dict set map %canonical% $canonical
    dict set map %storage% $storage
    incr test

    dict set map %test% [format "test-storage-%04d" $test]
    putb result $map {
test {%test%} {Test ::clay::tree::storage with %pattern%} {
  clay::tree::storage {%pattern%}
} {%storage%}
}
}

putb result {
dict set r foo/ bar/ baz 1
dict set s foo/ bar/ baz 0
set t [clay::tree::merge $r $s]

test rmerge-0001 {Test that the root is marked as a branch} {
  dict get $t foo bar baz
} 0

set r [dict create]
clay::tree::dictmerge r {
  foo/ {
    bar/ {
      baz 1
      bing: 2
      bang { bim 3 boom 4 }
      womp: {a 1 b 2}
    }
  }
}

test dictmerge-0001 {Test that the root is marked as a branch} {
  dict exists $r .
} 1
test dictmerge-0002 {Test that branch foo is marked correctly} {
  dict exists $r foo .
} 1
test dictmerge-0003 {Test that branch bar is marked correctly} {
  dict exists $r foo bar .
} 1
test dictmerge-0004 {Test that leaf foo/bar/bang is not marked as branch despite being a dict} {
  dict exists $r foo bar bang .
} 0
test dictmerge-0004 {Test that leaf foo/bar/bang/bim exists} {
  dict exists $r foo bar bang bim
} 1
test dictmerge-0005 {Test that leaf foo/bar/bang/boom exists} {
  dict exists $r foo bar bang boom
} 1

###
# Replace bang with bang/
###
clay::tree::dictmerge r {
  foo/ {
    bar/ {
      bang/ {
        whoop 1
      }
    }
  }
}

test dictmerge-0006 {Test that leaf foo/bar/bang/bim ceases to exist} {
  dict exists $r foo bar bang bim
} 0
test dictmerge-0007 {Test that leaf foo/bar/bang/boom exists} {
  dict exists $r foo bar bang boom
} 0

test dictmerge-0008 {Test that leaf foo/bar/bang is now a branch} {
  dict exists $r foo bar bang .
} 1

test branch-0001 {Test that foo/ is a branch} {
  clay::tree::is_branch $r foo/
} 1
test branch-0002 {Test that foo is a branch} {
  clay::tree::is_branch $r foo
} 1
test branch-0003 {Test that foo/bar/ is a branch} {
  clay::tree::is_branch $r {foo/ bar/}
} 1
test branch-0004 {Test that foo bar is not branch} {
  clay::tree::is_branch $r {foo bar}
} 1
test branch-0004 {Test that foo/ bar is not branch} {
  clay::tree::is_branch $r {foo/ bar}
} 0
}

set test 0
foreach {path isbranch} {
  foo 1
  {foo bar} 1
  {foo bar baz} 0
  {foo bar bing} 0
  {foo bar bang} 1
  {foo bar bang whoop} 0
} {
  set mpath [lrange $path 0 end-1]
  set item  [lindex $path end]
  set tests [list {} {} $isbranch {} : 0 {} / 1 . {} 0]
  dict set map %mpath% $mpath
  dict set map %item% $item
  foreach {head tail isbranch} $tests {
    dict set map %head% $head
    dict set map %tail% $tail
    dict set map %isbranch% $isbranch
    dict set map %test% [format "test-branch-%04d" [incr test]]
    putb result $map {
test {%test%} {Test that %mpath% %head%%item%%tail% is_branch = %isbranch%} {
  clay::tree::is_branch $r {%mpath% %head%%item%%tail%}
} %isbranch%
}
  }
}

putb result {
# -------------------------------------------------------------------------
# dictmerge Testing - oometa
unset -nocomplain foo
clay::tree::dictmerge foo {
  option/ {
    color/ {
      label Color
      default green
    }
  }
}
clay::tree::dictmerge foo {
  option/ {
    color/ {
      default purple
    }
  }
}

test oometa-0001 {Invoking dictmerge with empty args on a non existent variable create an empty variable} {
  dict get $foo option color default
} purple
test oometa-0002 {Invoking dictmerge with empty args on a non existent variable create an empty variable} {
  dict get $foo option color label
} Color

unset -nocomplain foo
set foo {. {}}
::clay::tree::dictmerge foo {. {} color {. {} default green label Color}}
::clay::tree::dictmerge foo {. {} color {. {} default purple}}
test oometa-0003 {Recursive merge problem from oometa/clay find} {
  dict get $foo color default
} purple
test oometa-0004 {Recursive merge problem from oometa/clay find} {
  dict get $foo color label
} Color

unset -nocomplain foo
set foo {. {}}
::clay::tree::dictmerge foo {. {} color {. {} default purple}}
::clay::tree::dictmerge foo {. {} color {. {} default green label Color}}
test oometa-0005 {Recursive merge problem from oometa/clay find} {
  dict get $foo color default
} green
test oometa-0006 {Recursive merge problem from oometa/clay find} {
  dict get $foo color label
} Color

test oometa-0008 {Un-Sanitized output} {
  set foo
} {. {} color {. {} default green label Color}}

test oometa-0009 {Sanitize} {
  clay::tree::sanitize $foo
} {color {default green label Color}}
}


putb result {
# -------------------------------------------------------------------------
# dictmerge Testing - clay
unset -nocomplain foo
test clay-0001 {Invoking dictmerge with empty args on a non existent variable create an empty variable} {
  ::clay::tree::dictmerge foo
  set foo
} {. {}}

unset -nocomplain foo
::clay::tree::dictset foo bar/ baz/ bell bang

test clay-0002 {For new entries dictmerge is essentially a set} {
  dict get $foo bar baz bell
} {bang}
::clay::tree::dictset foo bar/ baz/ boom/ bang
test clay-0003 {For entries that do exist a zipper merge is performed} {
  dict get $foo bar baz bell
} {bang}
test clay-0004 {For entries that do exist a zipper merge is performed} {
  dict get $foo bar baz boom
} {bang}

::clay::tree::dictset foo bar/ baz/ bop {color green flavor strawberry}

test clay-0005 {Leaves are replaced even if they look like a dict} {
  dict get $foo bar baz bop
} {color green flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bop {color yellow}
test clay-0006 {Leaves are replaced even if they look like a dict} {
  dict get $foo bar baz bop
} {color yellow}

::clay::tree::dictset foo bar/ baz/ bang/ {color green flavor strawberry}
test clay-0007a {Branches are merged} {
  dict get $foo bar baz bang
} {. {} color green flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bang/ color yellow
test clay-0007b {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color yellow flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bang/ {color blue}
test clay-0007c {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color blue flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bang/ shape: {Sort of round}
test clay-0007d {Branches are merged} {
  dict get $foo bar baz bang
} {. {} color blue flavor strawberry shape: {Sort of round}}

::clay::tree::dictset foo bar/ baz/ bang/ color yellow
test clay-0007e {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color yellow flavor strawberry shape: {Sort of round}}

::clay::tree::dictset foo bar/ baz/ bang/ {color blue}
test clay-0007f {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color blue flavor strawberry shape: {Sort of round}}

::clay::tree::dictset foo dict my_var 10
::clay::tree::dictset foo dict my_other_var 9

test clay-0007g {Branches are merged}  {
  dict get $foo dict
} {. {} my_var 10 my_other_var 9}

::clay::tree::dictset foo dict/ my_other_other_var 8
test clay-0007h {Branches are merged}  {
  dict get $foo dict
} {. {} my_var 10 my_other_var 9 my_other_other_var 8}


::clay::tree::dictmerge foo {option/ {color {type color} flavor {sense taste}}}
::clay::tree::dictmerge foo {option/ {format {default ascii}}}

test clay-0008 {Whole dicts are merged}  {
  dict get $foo option color
} {type color}
test clay-0009 {Whole dicts are merged}  {
  dict get $foo option flavor
} {sense taste}
test clay-0010 {Whole dicts are merged}  {
  dict get $foo option format
} {default ascii}

###
# Tests for the httpd module
###
test clay-0010 {Test that leaves are merged properly}
set bar {}
::clay::tree::dictmerge bar {
   proxy/ {port 10101 host myhost.localhost}
}
::clay::tree::dictmerge bar {
   mimetxt {Host: localhost
Content_Type: text/plain
Content-Length: 15
}
   http {HTTP_HOST {} CONTENT_LENGTH 15 HOST localhost CONTENT_TYPE text/plain UUID 3a7b4cdc-28d7-49b7-b18d-9d7d18382b9e REMOTE_ADDR 127.0.0.1 REMOTE_HOST 127.0.0.1 REQUEST_METHOD POST REQUEST_URI /echo REQUEST_PATH echo REQUEST_VERSION 1.0 DOCUMENT_ROOT {} QUERY_STRING {} REQUEST_RAW {POST /echo HTTP/1.0} SERVER_PORT 10001 SERVER_NAME 127.0.0.1 SERVER_PROTOCOL HTTP/1.1 SERVER_SOFTWARE {TclHttpd 4.2.0} LOCALHOST 0} UUID 3a7b4cdc-28d7-49b7-b18d-9d7d18382b9e uriinfo {fragment {} port {} path echo scheme http host {} query {} pbare 0 pwd {} user {}}
   mixin {reply ::test::content.echo}
   prefix /echo
   proxy_port 10010
   proxy/ {host localhost}
}

test clay-0011 {Whole dicts are merged}  {
  dict get $bar proxy_port
} {10010}

test clay-0012 {Whole dicts are merged}  {
  dict get $bar http CONTENT_LENGTH
} 15
test clay-0013 {Whole dicts are merged}  {
  dict get $bar proxy host
} localhost
test clay-0014 {Whole dicts are merged}  {
  dict get $bar proxy port
} 10101
}

putb result {
###
# Dialect Testing
###
::clay::dialect::create ::alpha

proc ::alpha::define::is_alpha {} {
  dict set ::testinfo([current_class]) is_alpha 1
}

::alpha::define ::alpha::object {
  is_alpha
}

::clay::dialect::create ::bravo ::alpha

proc ::bravo::define::is_bravo {} {
  dict set ::testinfo([current_class]) is_bravo 1
}

::bravo::define ::bravo::object {
  is_bravo
}

::clay::dialect::create ::charlie ::bravo

proc ::charlie::define::is_charlie {} {
  dict set ::testinfo([current_class]) is_charlie 1
}

::charlie::define ::charlie::object {
  is_charlie
}

::clay::dialect::create ::delta ::charlie

proc ::delta::define::is_delta {} {
  dict set ::testinfo([current_class]) is_delta 1
}

::delta::define ::delta::object {
  is_delta
}

::delta::class create adam {
  is_alpha
  is_bravo
  is_charlie
  is_delta
}

test oodialect-keyword-001 {Testing keyword application} {
  set ::testinfo(::adam)
} {is_alpha 1 is_bravo 1 is_charlie 1 is_delta 1}

test oodialect-keyword-002 {Testing keyword application} {
  set ::testinfo(::alpha::object)
} {is_alpha 1}

test oodialect-keyword-003 {Testing keyword application} {
  set ::testinfo(::bravo::object)
} {is_bravo 1}

test oodialect-keyword-004 {Testing keyword application} {
  set ::testinfo(::charlie::object)
} {is_charlie 1}

test oodialect-keyword-005 {Testing keyword application} {
  set ::testinfo(::delta::object)
} {is_delta 1}

###
# Declare an object from a namespace
###
namespace eval ::test1 {
  ::alpha::class create a {
    aliases A
    is_alpha
  }
  ::alpha::define b {
    aliases B BEE
    is_alpha
  }
  ::alpha::class create ::c {
    aliases C
    is_alpha
  }
  ::alpha::define ::d {
    aliases D
    is_alpha
  }
}

test oodialect-naming-001 {Testing keyword application} {
  set ::testinfo(::test1::a)
} {is_alpha 1}

test oodialect-naming-002 {Testing keyword application} {
  set ::testinfo(::test1::b)
} {is_alpha 1}

test oodialect-naming-003 {Testing keyword application} {
  set ::testinfo(::c)
} {is_alpha 1}

test oodialect-naming-004 {Testing keyword application} {
  set ::testinfo(::d)
} {is_alpha 1}

test oodialect-aliasing-001 {Testing keyword application} {
namespace eval ::test1 {
    ::alpha::define e {
       superclass A
    }
}
} ::test1::e

test oodialect-aliasing-002 {Testing keyword application} {
namespace eval ::test1 {
    ::bravo::define f {
       superclass A
    }
}
} ::test1::f


test oodialect-aliasing-003 {Testing aliase method on class} {
  ::test1::a aliases
} {::test1::A}

###
# Test modified 2018-10-21
###
test oodialect-ancestry-003 {Testing heritage} {
  ::clay::ancestors ::test1::f
} {}

###
# Test modified 2018-10-21
###
test oodialect-ancestry-004 {Testing heritage} {
  ::clay::ancestors ::alpha::object
} {}

###
# Test modified 2018-10-21
###
test oodialect-ancestry-005 {Testing heritage} {
  ::clay::ancestors ::delta::object
} {}

}

putb result {
# -------------------------------------------------------------------------
# clay submodule testing
# -------------------------------------------------------------------------

}
putb result {
# Test canonical path building
set path {const/ foo/ bar/ baz/}
}
set testnum 0
foreach {pattern} {
  {const foo bar baz}
  {const/ foo/ bar/ baz}
  {const/foo/bar/baz}
  {const/foo bar/baz}
  {const/foo/bar baz}
  {const foo/bar/baz}
  {const foo bar/baz}
  {const/foo bar baz}
} {
  putb result [list %pattern% $pattern %testnum% [format %04d [incr testnum]]] {
test oo-clay-path-%testnum% "Test path: %pattern%" {
  ::clay::path %pattern%
} $path
}
}
putb result {set path {const/ foo/ bar/ baz/ bing}}
set testnum 0
foreach {pattern} {
  {const foo bar baz bing}
  {const/ foo/ bar/ baz/ bing}
  {const/foo/bar/baz/bing}
  {const/foo bar/baz/bing:}
  {const/foo/bar baz bing}
  {const/foo/bar baz bing:}
  {const foo/bar/baz/bing}
  {const foo bar/baz/bing}
  {const/foo bar baz bing}
} {
  putb result [list %pattern% $pattern %testnum% [format %04d [incr testnum]]] {
test oo-clay-leaf-%testnum% "Test leaf: %pattern%" {
  ::clay::leaf %pattern%
} $path
}
}

putb result {namespace eval ::foo {}}

set class-a ::foo::classa
set commands-a {
  clay set const color  blue
  clay set const/flavor strawberry
  clay set {const/ sound} zoink
  clay set info/ {
    animal no
    building no
    subelement {pedantic yes}
  }

  # Provide a method that returns a constant so we can compare clay's inheritance to
  # TclOO
  method color {} {
    return blue
  }
  method flavor {} {
    return strawberry
  }
  method sound {} {
    return zoink
  }
}
set claydict-a {
  const/ {color blue flavor strawberry sound zoink}
  info/  {
    animal no
    building no
    subelement {pedantic yes}
  }
}

putb result [list %class% ${class-a} %commands% ${commands-a}] {
clay::define %class% {
%commands%
}
}

set testnum 0
foreach {top children} ${claydict-a} {
  foreach {child value} $children {
    set map {}
    dict set map %class% ${class-a}
    dict set map %top% $top
    dict set map %child% $child
    dict set map %value% $value
    dict set map %testnum% [format %04d [incr testnum]]
    putb result $map {
test oo-class-clay-method-%testnum% "Test %class% %top% %child% exists" {
  %class% clay exists %top% %child%
} 1
}
    dict set map %test% [format %04d [incr testnum]]
    putb result $map {
test oo-class-clay-method-%testnum% "Test %class% %top% %child% value" {
  %class% clay get %top% %child%
} {%value%}
}
  }
}


set class-b ::foo::classb
set claydict-b {
  const/ {color black flavor vanilla feeling dread}
  info/  {subelement {spoon yes}}
}
set commands-b {}
foreach {top children} ${claydict-b} {
  foreach {child value} $children {
    putb commands-b "  [list clay set $top $child $value]"
    putb commands-b "  [list method $child {} [list return $value]]"
  }
}
putb result [list %class% ${class-b} %commands% ${commands-b}] {
clay::define %class% {
%commands%
}
}

foreach {top children} ${claydict-b} {
  foreach {child value} $children {
    set map {}
    dict set map %class% ${class-b}
    dict set map %top% $top
    dict set map %child% $child
    dict set map %value% $value
    dict set map %testnum% [format %04d [incr testnum]]
    putb result $map {
test oo-class-clay-method-%testnum% "Test %class% %top% %child% exists" {
  %class% clay exists %top% %child%
} 1
}
    dict set map %test% [format %04d [incr testnum]]
    putb result $map {
test oo-class-clay-method-%testnum% "Test %class% %top% %child% value" {
  %class% clay get %top% %child%
} {%value%}
}
  }
}

set commands-c {superclass ::foo::classb ::foo::classa}
set class-c ::foo::class.ab
putb result [list %class% ${class-c} %commands% ${commands-c}] {
clay::define %class% {
%commands%
}
}
set commands-d {superclass ::foo::classa ::foo::classb}
set class-d ::foo::class.ba
putb result [list %class% ${class-d} %commands% ${commands-d}] {
clay::define %class% {
%commands%
}
}

###
# Tests for objects
###

putb result {# -------------------------------------------------------------------------
# Singleton
::clay::define ::test::singletonbehavior {
  method bar {} {
    return CLASS
  }
  method booze {} {
    return CLASS
  }
  Ensemble foo::bang {} {
    return CLASS
  }
  Ensemble foo::both {} {
    return CLASS
  }
  Ensemble foo::mixin {} {
    return CLASS
  }
  Ensemble foo::sloppy {} {
    return CLASS
  }
}
::clay::define ::test::flavor.strawberry {
  clay define property flavor strawbery
  method bar {} {
    return STRAWBERRY
  }
  Ensemble foo::bing {} {
    return STRAWBERRY
  }
  Ensemble foo::both {} {
    return STRAWBERRY
  }
  Ensemble foo::mixin {} {
    return STRAWBERRY
  }
  Ensemble foo::sloppy {} {
    return STRAWBERRY
  }
}
::clay::singleton ::TEST {
  class ::test::singletonbehavior
  clay mixinmap flavor ::test::flavor.strawberry
  clay set property color green
  method bar {} {
    return OBJECT
  }
  method booze {} {
    return OBJECT
  }
  method baz {} {
    return OBJECT
  }
  Ensemble foo::bar {} {
    return OBJECT
  }
  Ensemble foo::both {} {
    return OBJECT
  }
}

test oo-object-singleton-001 {Test singleton superclass keyword} {
  ::TEST clay delegate class
} {::test::singletonbehavior}

test oo-object-singleton-002 {Test singleton ensemble 1} {
  ::TEST foo <list>
} {bang bar bing both mixin sloppy}

test oo-object-singleton-003 {Test singleton ensemble from script} {
  ::TEST foo bar
} {OBJECT}
test oo-object-singleton-004 {Test singleton ensemble from mixin} {
  ::TEST foo bing
} {STRAWBERRY}
test oo-object-singleton-005 {Test singleton ensemble from class} {
  ::TEST foo bang
} {CLASS}
# Test note: the behavior from TclOO is unexpected
# Intuitively, a local method should override a mixin
# but this is not the case
test oo-object-singleton-006 {Test singleton ensemble from conflict, should resolve to object} {
  ::TEST foo both
} {STRAWBERRY}
test oo-object-singleton-007 {Test singleton ensemble from conflict, should resolve to mixin} {
  ::TEST foo sloppy
} {STRAWBERRY}
###
# Test note:
# This should work but does not
###
#test oo-object-singleton-009 {Test property from mixin/class} {
#  ::TEST clay get property flavor
#} {strawberry}
test oo-object-singleton-008 {Test property from script} {
  ::TEST clay get property color
} {green}


# Test note: the behavior from TclOO is unexpected
# Intuitively, a local method should override a mixin
# but this is not the case
test oo-object-singleton-010 {Test method declared in script} {
  ::TEST bar
} {STRAWBERRY}

test oo-object-singleton-011 {Test method declared in script} {
  ::TEST booze
} {OBJECT}
TEST destroy

# OBJECT of ::foo::classa
set OBJECTA [::foo::classa new]

###
# Test object degation
###
proc ::foo::fakeobject {a b} {
  return [expr {$a + $b}]
}

::clay::object create TEST
TEST clay delegate funct ::foo::fakeobject
test oo-object-delegate-001 {Test object delegation} {
  ::TEST clay delegate
} {<class> ::clay::object <funct> ::foo::fakeobject}

test oo-object-delegate-002 {Test object delegation} {
  ::TEST clay delegate funct
} {::foo::fakeobject}

test oo-object-delegate-002a {Test object delegation} {
  ::TEST clay delegate <funct>
} {::foo::fakeobject}

test oo-object-delegate-003 {Test object delegation} {
  ::TEST <funct> 1 1
} {2}
test oo-object-delegate-004 {Test object delegation} {
  ::TEST <funct> 10 -7
} {3}

# Replace the function out from under
proc ::foo::fakeobject {a b} {
  return [expr {$a * $b}]
}
test oo-object-delegate-005 {Test object delegation} {
  ::TEST <funct> 10 -7
} {-70}

# Object with ::foo::classa mixed in
set MIXINA  [::oo::object new]
oo::objdefine $MIXINA mixin ::foo::classa
}
set matrix ${claydict-a}
set testnum 0
foreach {top children} $matrix {
  foreach {child value} $children {
    set map {}
    dict set map %object1% OBJECTA
    dict set map %object2% MIXINA

    dict set map %top% $top
    dict set map %child% $child
    dict set map %value% $value
    dict set map %testnum% [format %04d [incr testnum]]
    putb result $map {
test oo-object-clay-method-native-%testnum% {Test native object gets the property %top%/%child%} {
  $%object1% clay get %top% %child%
} {%value%}
test oo-object-clay-method-mixin-%testnum% {Test mixin object gets the property %top%/%child%} {
  $%object2% clay get %top% %child%
} {%value%}
}
    if {$top eq "const/"} {
      putb result $map {
test oo-object-clay-method-native-methodcheck-%testnum% {Test that %top%/%child% would mimic method interheritance for a native class} {
  $%object1% %child%
} {%value%}
test oo-object-clay-method-mixin-%testnum% {Test that %top%/%child% would mimic method interheritance for a mixed in class} {
  $%object2% %child%
} {%value%}
    }
    }
  }
}

putb result {# -------------------------------------------------------------------------
# OBJECT of ::foo::classb
set OBJECTB [::foo::classb new]
# Object with ::foo::classb mixed in
set MIXINB  [::oo::object new]
oo::objdefine $MIXINB mixin ::foo::classb
}
set matrix ${claydict-b}
#set testnum 0
foreach {top children} $matrix {
  foreach {child value} $children {
    set map {}
    dict set map %object1% OBJECTB
    dict set map %object2% MIXINB

    dict set map %top% $top
    dict set map %child% $child
    dict set map %value% $value
    dict set map %testnum% [format %04d [incr testnum]]
    putb result $map {
test oo-object-clay-method-native-%testnum% {Test native object gets the property %top%/%child%} {
  $%object1% clay get %top% %child%
} {%value%}
test oo-object-clay-method-mixin-%testnum% {Test mixin object gets the property %top%/%child%} {
  $%object2% clay get %top% %child%
} {%value%}
}
    if {$top eq "const/"} {
      putb result $map {
test oo-object-clay-method-native-methodcheck-%testnum% {Test that %top%/%child% would mimic method interheritance for a native class} {
  $%object1% %child%
} {%value%}
test oo-object-clay-method-mixin-%testnum% {Test that %top%/%child% would mimic method interheritance for a mixed in class} {
  $%object2% %child%
} {%value%}
    }
    }
  }
}

putb result {# -------------------------------------------------------------------------
# OBJECT descended from ::foo::classa ::foo::classb
set OBJECTAB [::foo::class.ab new]
# Object where classes were mixed in ::foo::classa ::foo::classb
set MIXINAB  [::oo::object new]
# Test modified 2018-10-30, mixin order was wrong before
oo::objdefine $MIXINAB mixin ::foo::classb ::foo::classa
}
set matrix ${claydict-b}
foreach {top children} ${claydict-a} {
  foreach {child value} $children {
    if {![dict exists $matrix $top $child]} {
      dict set matrix $top $child $value
    }
  }
}
#set testnum 0
foreach {top children} $matrix {
  foreach {child value} $children {
    set map {}
    dict set map %object1% OBJECTAB
    dict set map %object2% MIXINAB

    dict set map %top% $top
    dict set map %child% $child
    dict set map %value% $value
    dict set map %testnum% [format %04d [incr testnum]]
    putb result $map {
test oo-object-clay-method-native-%testnum% {Test native object gets the property %top%/%child%} {
  $%object1% clay get %top% %child%
} {%value%}
test oo-object-clay-method-mixin-%testnum% {Test mixin object gets the property %top%/%child%} {
  $%object2% clay get %top% %child%
} {%value%}
}
    if {$top eq "const/"} {
      putb result $map {
test oo-object-clay-method-native-methodcheck-%testnum% {Test that %top%/%child% would mimic method interheritance for a native class} {
  $%object1% %child%
} {%value%}
test oo-object-clay-method-mixin-%testnum% {Test that %top%/%child% would mimic method interheritance for a mixed in class} {
  $%object2% %child%
} {%value%}
    }
    }
  }
}

putb result {# -------------------------------------------------------------------------
# OBJECT descended from ::foo::classb ::foo::classa
set OBJECTBA [::foo::class.ba new]
# Object where classes were mixed in ::foo::classb ::foo::classa
set MIXINBA  [::oo::object new]
# Test modified 2018-10-30, mixin order was wrong before
oo::objdefine $MIXINBA mixin ::foo::classa ::foo::classb
}
set matrix ${claydict-a}
foreach {top children} ${claydict-b} {
  foreach {child value} $children {
    if {![dict exists $matrix $top $child]} {
      dict set matrix $top $child $value
    }
  }
}
#set testnum 0
foreach {top children} $matrix {
  foreach {child value} $children {
    set map {}
    dict set map %object1% OBJECTBA
    dict set map %object2% MIXINBA

    dict set map %top% $top
    dict set map %child% $child
    dict set map %value% $value
    dict set map %testnum% [format %04d [incr testnum]]
    putb result $map {
test oo-object-clay-method-native-%testnum% {Test native object gets the property} {
  $%object1% clay get %top% %child%
} {%value%}
test oo-object-clay-method-mixin-%testnum% {Test mixin object gets the property} {
  $%object2% clay get %top% %child%
} {%value%}
}

    if {$top eq "const/"} {
      putb result $map {
test oo-object-clay-method-native-methodcheck-%testnum% {Test that %top%/%child% would mimic method interheritance for a native class} {
  $%object1% %child%
} {%value%}
test oo-object-clay-method-mixin-%testnum% {Test that %top%/%child% would mimic method interheritance for a mixed in class} {
  $%object2% %child%
} {%value%}
    }
    }
  }
}

putb resut {
###
# Test local setting if clay data in an object
###
set OBJECT [::foo::classa new]
test oo-object-clay-method-local-0001 {Test native object gets the property} {
  $OBJECT clay get const/ color
} {blue}
test oo-object-clay-method-local-0002 {Test that local settings override the inherited properties} {
  $OBJECT clay set const/ color black
  $OBJECT clay set const/
} {black}

test oo-object-clay-method-local-0003 {Test native object gets an empty property} {
  $OBJECT clay get color
} {}
test oo-object-clay-method-local-0004 {Test that local settings override the empty property} {
  $OBJECT clay set color orange
  $OBJECT clay get color
} {orange}

}

putb result {
###
# put a do-nothing constructor on the books
###
::clay::define ::clay::object {
  constructor args {}
}

oo::objdefine ::clay::object method foo args { return bar }

test clay-core-method-0001 {Test that adding methods to the core ::clay::object class works} {
  ::clay::object foo
} {bar}

namespace eval ::TEST {}
::clay::define ::TEST::myclass {
  clay color red
  clay flavor strawberry

}

###
# Test adding a clay property
###
test clay-class-clay-0001 {Test that a clay statement is recorded in the object of the class} {
  ::TEST::myclass clay get color
} red
test clay-class-clay-0002 {Test that a clay statement is recorded in the object of the class} {
  ::TEST::myclass clay get flavor
} strawberry

###
# Test that objects of the class get the same properties
###
set OBJ [::clay::object new {}]
set OBJ2 [::TEST::myclass new {}]

test clay-object-clay-a-0001 {Test that objects not thee class do not get properties} {
  $OBJ clay get color
} {}
test clay-object-clay-a-0002 {Test that objects not thee class do not get properties} {
  $OBJ clay get flavor
} {}
test clay-object-clay-a-0003 {Test that objects of the class get properties} {
  $OBJ2 clay get color
} red
test clay-object-clay-a-0004 {Test that objects of the class get properties} {
  $OBJ2 clay get flavor
} strawberry

###
# Test modified 2018-10-21
###
test clay-object-clay-a-0005 {Test the clay ancestors function} {
  $OBJ clay ancestors
} {::clay::object}

###
# Test modified 2018-10-21
###
test clay-object-clay-a-0006 {Test the clay ancestors function} {
  $OBJ2 clay ancestors
} {::TEST::myclass ::clay::object}

test clay-object-clay-a-0007 {Test the clay provenance  function} {
  $OBJ2 clay provenance  flavor
} ::TEST::myclass

###
# Test that object local setting override the class
###
test clay-object-clay-a-0008 {Test that object local setting override the class} {
  $OBJ2 clay set color purple
  $OBJ2 clay get color
} purple
test clay-object-clay-a-0009 {Test that object local setting override the class} {
  $OBJ2 clay provenance  color
} self

::clay::define ::TEST::myclasse {
  superclass ::TEST::myclass

  clay color blue
  method do args {
    return "I did $args"
  }

  Ensemble which::color {} {
    return [my clay get color]
  }
  clay set method_ensemble which farbe: {tailcall my Which_color {*}$args}
}

###
# Test clay information is passed town to subclasses
###
test clay-class-clay-0003 {Test that a clay statement is recorded in the object of the class} {
  ::TEST::myclasse clay get color
} blue
test clay-class-clay-0004 {Test that clay statements from the ancestors of this class are not present (we handle them seperately in objects)} {
  ::TEST::myclasse clay get flavor
} {}
test clay-class-clay-0005 {Test that clay statements from the ancestors of this class are found with the FIND method} {
  ::TEST::myclasse clay find flavor
} {strawberry}

###
# Test that properties reach objects
###
set OBJ3 [::TEST::myclasse new {}]
test clay-object-clay-b-0001 {Test that objects of the class get properties} {
  $OBJ3 clay get color
} blue
test clay-object-clay-b-0002 {Test the clay provenance  function} {
  $OBJ3 clay provenance  color
} ::TEST::myclasse
test clay-object-clay-b-0003 {Test that objects of the class get properties} {
  $OBJ3 clay get flavor
} strawberry
test clay-object-clay-b-0004 {Test the clay provenance  function} {
  $OBJ3 clay provenance  flavor
} ::TEST::myclass

###
# Test modified 2018-10-21
###
test clay-object-clay-b-0005 {Test the clay provenance  function} {
  $OBJ3 clay ancestors
} {::TEST::myclasse ::TEST::myclass ::clay::object}

###
# Test defining a standard method
###
test clay-object-method-0001 {Test and standard method} {
  $OBJ3 do this really cool thing
} {I did this really cool thing}

test clay-object-method-0003 {Test an ensemble} {
  $OBJ3 which color
} blue
# Test setting properties
test clay-object-method-0004 {Test an ensemble} {
  $OBJ3 clay set color black
  $OBJ3 which color
} black

# Test setting properties
test clay-object-method-0004 {Test an ensemble alias} {
  $OBJ3 which farbe
} black


###
# Added 2019-06-24
# Test that grabbing a leaf does not pollute the cache
###
::clay::define ::TEST::class_with_deep_tree {
  clay set tree deep has depth 1
  clay set tree shallow has depth 0
}

$OBJ3 clay mixinmap deep ::TEST::class_with_deep_tree

test clay-deep-nested-0001 {Test that a leaf query does not pollute the cache} {
  $OBJ3 clay get tree shallow has depth
} 0
test clay-deep-nested-0001 {Test that a leaf query does not pollute the cache} {
  $OBJ3 clay get tree
} {deep {has {depth 1}} shallow {has {depth 0}}}



###
# Test that if you try to replace a global command you get an error
###
test clay-nspace-0001 {Test that if you try to replace a global command you get an error} -body {
::clay::define open {
  method bar {} { return foo }

}
}  -returnCodes {error} -result "::open does not refer to an object"

::clay::define fubar {
  method bar {} { return foo }
}
test clay-nspace-0002 {Test a non qualified class ends up in the current namespace} {
  info commands ::fubar
} {::fubar}

namespace eval ::cluster {
::clay::define fubar {
  method bar {} { return foo }
}

::clay::define ::clay::pot {
  method bar {} { return foo }
}

}
test clay-nspace-0003 {Test a non qualified class ends up in the current namespace} {
  info commands ::cluster::fubar
} {::cluster::fubar}
test clay-nspace-0003 {Test a fully qualified class ends up in the proper namespace} {
  info commands ::clay::pot
} {::clay::pot}

#set ::clay::trace 3

###
# New test - Added 2019-09-15
# Test that the "method" variable is exposed to a default method
###

::clay::define ::ensembleWithDefault {
  Ensemble foo::bar {} { return A }
  Ensemble foo::baz {} { return B }
  Ensemble foo::bang {} { return C }

  Ensemble foo::default {} { return $method }
}


set OBJ [::ensembleWithDefault new]
test clay-ensemble-default-0001 {Test a normal ensemble method} {
  $OBJ foo bar
} {A}
test clay-ensemble-default-0002 {Test a normal ensemble method} {
  $OBJ foo baz
} {B}
test clay-ensemble-default-0003 {Test a normal ensemble method} {
  $OBJ foo <list>
} [lsort -dictionary {bar baz bang}]

test clay-ensemble-default-0004 {Test a normal ensemble method} {
  $OBJ foo bing
} {bing}
test clay-ensemble-default-0005 {Test a normal ensemble method} {
  $OBJ foo bong
} {bong}
###
# Mixin tests
###

###
# Define a core class
###
::clay::define ::TEST::thing {

  method do args {
    return "I did $args"
  }
}


::clay::define ::TEST::vegetable {

  clay color unknown
  clay flavor unknown

  Ensemble which::flavor {} {
    return [my clay get flavor]
  }
  Ensemble which::color {} {
    return [my clay get color]
  }

}

::clay::define ::TEST::animal {

  clay color unknown
  clay sound unknown

  Ensemble which::sound {} {
    return [my clay get sound]
  }
  Ensemble which::color {} {
    return [my clay get color]
  }
  method sound {} {
    return unknown
  }
}

::clay::define ::TEST::species.cat {
  superclass ::TEST::animal
  clay sound meow
  method sound {} {
    return meow
  }
}

::clay::define ::TEST::coloring.calico {
  clay color calico

}

::clay::define ::TEST::condition.dark {
  Ensemble which::color {} {
    return grey
  }
}

::clay::define ::TEST::mood.happy {
  Ensemble which::sound {} {
    return purr
  }
  method sound {} {
    return purr
  }
}
test clay-object-0001 {Test than an object is created when clay::define is invoked} {
  info commands ::TEST::mood.happy
} ::TEST::mood.happy

set OBJ [::TEST::thing new]
test clay-mixin-a-0001 {Test that prior to a mixin an ensemble doesn't exist} -body {
  $OBJ which color
} -returnCodes error -result {unknown method "which": must be clay, destroy or do}

test clay-mixin-a-0002 {Test and standard method from an ancestor} {
  $OBJ do this really cool thing
} {I did this really cool thing}

$OBJ clay mixinmap species ::TEST::animal
test clay-mixin-b-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {unknown}

test clay-mixin-b-0002 {Test that an ensemble is created during a mixin} {
  $OBJ which sound
} {unknown}

test clay-mixin-b-0003 {Test that an ensemble is created during a mixin} \
  -body {$OBJ which flavor} -returnCodes {error} \
  -result {unknown method which flavor. Valid: color sound}

###
# Test Modified: 2018-10-21
###
test clay-mixin-b-0004 {Test that mixins resolve in the correct order} {
  $OBJ clay ancestors
} {::TEST::animal ::TEST::thing ::clay::object}

###
# Replacing a mixin replaces the behaviors
###
$OBJ clay mixinmap species ::TEST::vegetable
test clay-mixin-c-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {unknown}
test clay-mixin-c-0002 {Test that an ensemble is created during a mixin} \
  -body {$OBJ which sound} \
  -returnCodes {error} \
  -result {unknown method which sound. Valid: color flavor}
test clay-mixin-c-0003 {Test that an ensemble is created during a mixin} {
  $OBJ which flavor
} {unknown}
###
# Test Modified: 2018-10-21
###
test clay-mixin-c-0004 {Test that mixins resolve in the correct order} {
  $OBJ clay ancestors
} {::TEST::vegetable ::TEST::thing ::clay::object}

###
# Replacing a mixin
$OBJ clay mixinmap species ::TEST::species.cat
test clay-mixin-e-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {unknown}
test clay-mixin-e-0002a {Test that an ensemble is created during a mixin} {
  $OBJ sound
} {meow}
test clay-mixin-e-0002b {Test that an ensemble is created during a mixin} {
  $OBJ clay get sound
} {meow}
test clay-mixin-e-0002 {Test that an ensemble is created during a mixin} {
  $OBJ which sound
} {meow}
test clay-mixin-e-0003 {Test that an ensemble is created during a mixin} \
  -body {$OBJ which flavor} -returnCodes {error} \
  -result {unknown method which flavor. Valid: color sound}
###
# Test Modified: 2018-10-30, 2018-10-21, 2018-10-10
###
test clay-mixin-e-0004 {Test that clay data follows the rules of inheritence and order of mixin} {
  $OBJ clay ancestors
} {::TEST::species.cat ::TEST::animal ::TEST::thing ::clay::object}

$OBJ clay mixinmap coloring ::TEST::coloring.calico
test clay-mixin-f-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {calico}
test clay-mixin-f-0002 {Test that an ensemble is created during a mixin} {
  $OBJ which sound
} {meow}
test clay-mixin-f-0003 {Test that an ensemble is created during a mixin} \
  -body {$OBJ which flavor} -returnCodes {error} \
  -result {unknown method which flavor. Valid: color sound}

###
# Test modified 2018-10-30, 2018-10-21, 2018-10-10
###
test clay-mixin-f-0004 {Test that clay data follows the rules of inheritence and order of mixin} {
  $OBJ clay ancestors
} {::TEST::coloring.calico ::TEST::species.cat ::TEST::animal ::TEST::thing ::clay::object}

test clay-mixin-f-0005 {Test that clay data from a mixin works} {
  $OBJ clay provenance  color
} {::TEST::coloring.calico}

###
# Test variable initialization
###
::clay::define ::TEST::has_var {
  Variable my_variable 10

  method get_my_variable {} {
    my variable my_variable
    return $my_variable
  }
}

set OBJ [::TEST::has_var new]
test clay-class-variable-0001 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get variable/ my_variable
} {10}

# Modified 2018-10-30 (order is different)
test clay-class-variable-0002 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get variable
} {my_variable 10 DestroyEvent 0}

# Modified 2018-10-30 (order is different)
test clay-class-variable-0003 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay dget variable
} {. {} my_variable 10 DestroyEvent 0}

test clay-class-variable-0004 {Test that variables declared in the class definition are initialized} {
  $OBJ get_my_variable
} 10

###
# Test array initialization
###
::clay::define ::TEST::has_array {
  Array my_array {timeout 10}

  method get_my_array {field} {
    my variable my_array
    return $my_array($field)
  }
}

set OBJ [::TEST::has_array new]
test clay-class-array-0001 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get array
} {my_array {timeout 10}}

test clay-class-array-0002 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay dget array
} {. {} my_array {. {} timeout 10}}

test clay-class-array-0003 {Test that variables declared in the class definition are initialized} {
  $OBJ get_my_array timeout
} 10

::clay::define ::TEST::has_more_array {
  superclass ::TEST::has_array
  Array my_array {color blue}
}
test clay-class-array-0008 {Test that the parser injected the right value in the right place for clay to catch it} {
  ::TEST::has_more_array clay get array
} {my_array {color blue}}

test clay-class-array-0009 {Test that the parser injected the right value in the right place for clay to catch it} {
  ::TEST::has_more_array clay find array
} {my_array {timeout 10 color blue}}

# Modified 2018-10-30 (order is different)
set BOBJ [::TEST::has_more_array new]
test clay-class-array-0004 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay get array
} {my_array {color blue timeout 10}}

# Modified 2018-10-30 (order is different)
test clay-class-array-0005 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay dget array
} {. {} my_array {. {} color blue timeout 10}}

test clay-class-arrau-0006 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_array timeout
} 10
test clay-class-arrau-0007 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_array color
} blue

::clay::define ::TEST::has_empty_array {
  Array my_array {}

  method my_array_exists {} {
    my variable my_array
    return [info exists my_array]
  }
  method get {field} {
    my variable my_array
    return $my_array($field)
  }
  method set {field value} {
    my variable my_array
    set my_array($field) $value
  }
}

test clay-class-array-0008 {Test that an declaration of an array with no values produces and empty array} {
  set COBJ [::TEST::has_empty_array new]
  $COBJ my_array_exists
} 1

test clay-class-array-0009 {Test that an declaration of an array with no values produces and empty array} {
  $COBJ set test "A random value"
  $COBJ get test
} {A random value}
###
# Test dict initialization
###
::clay::define ::TEST::has_dict {
  Dict my_dict {timeout 10}

  method get_my_dict {args} {
    my variable my_dict
    if {[llength $args]==0} {
      return $my_dict
    }
    return [dict get $my_dict {*}$args]
  }

}

set OBJ [::TEST::has_dict new]
test clay-class-dict-0001 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get dict
} {my_dict {timeout 10}}

test clay-class-dict-0002 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay dget dict
} {. {} my_dict {. {} timeout 10}}

test clay-class-dict-0003 {Test that variables declared in the class definition are initialized} {
  $OBJ get_my_dict timeout
} 10

test clay-class-dict-0004 {Test that an empty dict is annotated} {
  $OBJ clay get dict
} {my_dict {timeout 10}}


::clay::define ::TEST::has_more_dict {
  superclass ::TEST::has_dict
  Dict my_dict {color blue}
}
set BOBJ [::TEST::has_more_dict new]

# Modified 2018-10-30
test clay-class-dict-0004 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay get dict
} {my_dict {color blue timeout 10}}

# Modified 2018-10-30
test clay-class-dict-0005 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay dget dict
} {. {} my_dict {. {} color blue timeout 10}}

test clay-class-dict-0006 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_dict timeout
} 10

test clay-class-dict-0007 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_dict color
} blue

::clay::define ::TEST::has_empty_dict {
  Dict my_empty_dict {}

  method get_my_empty_dict {args} {
    my variable my_empty_dict
    if {[llength $args]==0} {
      return $my_empty_dict
    }
    return [dict get $my_empty_dict {*}$args]
  }
}

set COBJ [::TEST::has_empty_dict new]

test clay-class-dict-0008 {Test that the parser injected the right value in the right place for clay to catch it} {
  $COBJ clay dget dict
} {my_empty_dict {. {}}}

test clay-class-dict-0009 {Test that an empty dict is initialized} {
  $COBJ get_my_empty_dict
} {}

###
# Test object delegation
###
::clay::define ::TEST::organelle {
  method add args {
    set total 0
    foreach item $args {
      set total [expr {$total+$item}]
    }
    return $total
  }
}
::clay::define ::TEST::master {
  constructor {} {
    set mysub [namespace current]::sub
    ::TEST::organelle create $mysub
    my clay delegate sub $mysub
  }
}

set OBJ [::TEST::master new]
###
# Test that delegation is working
###
test clay-delegation-0001 {Test an array driven ensemble} {
  $OBJ <sub> add 5 5
} 10


###
# Test the Ensemble keyword
###
::clay::define ::TEST::with_ensemble {

  Ensemble myensemble {pattern args} {
    set ensemble [self method]
    set emap [my clay ensemble_map $ensemble]
    set mlist [dict keys $emap [string tolower $pattern]]
    if {[llength $mlist] != 1} {
      error "Couldn't figure out what to do with $pattern"
    }
    set method [lindex $mlist 0]
    set argspec [dict get $emap $method argspec]
    set body    [dict get $emap $method body]
    if {$argspec ni {args {}}} {
      ::clay::dynamic_arguments $ensemble $method [list $argspec] {*}$args
    }
    eval $body
  }

  Ensemble myensemble::go args {
    return 1
  }
}

::clay::define ::TEST::with_ensemble.dance {
  Ensemble myensemble::dance args {
    return 1
  }
}
::clay::define ::TEST::with_ensemble.cannot_dance {
  Ensemble myensemble::dance args {
    return 0
  }
}

set OBJA [::clay::object new]
set OBJB [::clay::object new]

$OBJA clay mixinmap \
  core ::TEST::with_ensemble \
  friends ::TEST::with_ensemble.dance

$OBJB clay mixinmap \
  core ::TEST::with_ensemble \
  friends ::TEST::with_ensemble.cannot_dance
}

set testnum 0

set matrix {
  go {
    OBJA 1
    OBJB 1
  }
  dance {
    OBJA 1
    OBJB 0
  }
}
foreach {action output} $matrix {
  putb result "# Test $action"
  foreach {object value} $output {
    set map [dict create %object% $object %action% $action %value% $value]
    dict set map %testnum% [format %04d [incr testnum]]
    putb result $map {test clay-dynamic-ensemble-%testnum% {Test ensemble with static method} {
  $%object% myensemble %action%
} {%value%}}
  }
}

putb result {

###
# Class method testing
###

clay::class create WidgetClass {
  Class_Method working {} {
    return {Works}
  }

  Class_Method unknown args {
    set tkpath [lindex $args 0]
    if {[string index $tkpath 0] eq "."} {
      set obj [my new $tkpath {*}[lrange $args 1 end]]
      $obj tkalias $tkpath
      return $tkpath
    }
    next {*}$args
  }

  constructor {TkPath args} {
    my variable hull
    set hull $TkPath
    my clay delegate hull $TkPath
  }

  method tkalias tkname {
    set oldname $tkname
    my variable tkalias
    set tkalias $tkname
    set self [self]
    set hullwidget [::info object namespace $self]::tkwidget
    my clay delegate tkwidget $hullwidget
    #rename ::$tkalias $hullwidget
    my clay delegate hullwidget $hullwidget
    #::tool::object_rename [self] ::$tkalias
    rename [self] ::$tkalias
    #my Hull_Bind $tkname
    return $hullwidget
  }
}

test tool-class-method-000 {Test that class methods actually work...} {
  WidgetClass working
} {Works}

test tool-class-method-001 {Test Tk style creator} {
  WidgetClass .foo
  .foo clay delegate hull
} {.foo}

::clay::define WidgetNewClass {
  superclass WidgetClass
}

test tool-class-method-002 {Test Tk style creator inherited by morph} {
  WidgetNewClass .bar
  .bar clay delegate hull
} {.bar}



###
# Test ensemble inheritence
###
clay::define NestedClassA {
  Ensemble do::family {} {
    return NestedClassA
  }
  Ensemble do::something {} {
    return A
  }
  Ensemble do::whop {} {
    return A
  }
}
clay::define NestedClassB {
  superclass NestedClassA
  Ensemble do::family {} {
    set r [next family]
    lappend r NestedClassB
    return $r
  }
  Ensemble do::whop {} {
    return B
  }
}
clay::define NestedClassC {
  superclass NestedClassB

  Ensemble do::somethingelse {} {
    return C
  }
}
clay::define NestedClassD {
  superclass NestedClassB

  Ensemble do::somethingelse {} {
    return D
  }
}

clay::define NestedClassE {
  superclass NestedClassD NestedClassC
}

clay::define NestedClassF {
  superclass NestedClassC NestedClassD
}

NestedClassC create NestedObjectC

###
# These tests no longer work because method ensembles are now dynamically
# generated by object, that are not attached to the class anymore
#
####
#test tool-ensemble-001 {Test that an ensemble can access [next] even if no object of the ancestor class have been instantiated} {
#  NestedObjectC do family
#} {::NestedClassA ::NestedClassB ::NestedClassC}

test tool-ensemble-002 {Test that a later ensemble definition trumps a more primitive one} {
  NestedObjectC do whop
} {B}
test tool-ensemble-003 {Test that an ensemble definitions in an ancestor carry over} {
  NestedObjectC do something
} {A}

NestedClassE create NestedObjectE
NestedClassF create NestedObjectF


test tool-ensemble-004 {Test that ensembles follow the same rules for inheritance as methods} {
  NestedObjectE do somethingelse
} {D}

test tool-ensemble-005 {Test that ensembles follow the same rules for inheritance as methods} {
  NestedObjectF do somethingelse
} {C}

###
# Set of tests to exercise the mixinmap system
###
clay::define MixinMainClass {
  Variable mainvar unchanged

  Ensemble test::which {} {
    my variable mainvar
    return $mainvar
  }

  Ensemble test::main args {
    puts [list this is main $method $args]
  }

}

set mixoutscript {my test untool $class}
set mixinscript {my test tool $class}
clay::define MixinTool {
  Variable toolvar unchanged.mixin
  clay set mixin/ unmap-script $mixoutscript
  clay set mixin/ map-script $mixinscript
  clay set mixin/ name {Generic Tool}

  Ensemble test::untool class {
    my variable toolvar mainvar
    set mainvar {}
    set toolvar {}
  }

  Ensemble test::tool class {
    my variable toolvar mainvar
    set mainvar [$class clay get mixin name]
    set toolvar [$class clay get mixin name]
  }
}

clay::define MixinToolA {
  superclass MixinTool

  clay set mixin/ name {Tool A}
}

clay::define MixinToolB {
  superclass MixinTool

  clay set mixin/ name {Tool B}

  method test_newfunc {} {
    return "B"
  }
}

test tool-mixinspec-001 {Test application of mixin specs} {
  MixinTool clay get mixin map-script
} $mixinscript

test tool-mixinspec-002 {Test application of mixin specs} {
  MixinToolA clay get mixin map-script
} {}

test tool-mixinspec-003 {Test application of mixin specs} {
  MixinToolA clay find mixin map-script
} $mixinscript

test tool-mixinspec-004 {Test application of mixin specs} {
  MixinToolB clay find mixin map-script
} $mixinscript


MixinMainClass create mixintest

test tool-mixinmap-001 {Test object prior to mixins} {
  mixintest test which
} {unchanged}

mixintest clay mixinmap tool MixinToolA
test tool-mixinmap-002 {Test mixin map script ran} {
  mixintest test which
} {Tool A}

mixintest clay mixinmap tool MixinToolB

test tool-mixinmap-003 {Test mixin map script ran} {
  mixintest test which
} {Tool B}

test tool-mixinmap-003 {Test mixin map script ran} {
  mixintest test_newfunc
} {B}

mixintest clay mixinmap tool {}
test tool-mixinmap-004 {Test object prior to mixins} {
  mixintest test which
} {}
}

###
# Test clay mixinslots
###
putb result {

clay::define ::clay::object {
  method path {} {
    return [self class]
  }
}


clay::define ::MixinRoot {
  clay set opts core   root
  clay set opts option unset
  clay set opts color  unset

  Ensemble info::root {} {
    return MixinRoot
  }
  Ensemble info::shade {} {
    return avacodo
  }
  Ensemble info::default {} {
    return Undefined
  }

  method did {} {
    return MixinRoot
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

clay::define ::MixinOption1 {
  clay set opts option option1

  Ensemble info::option {} {
    return MixinOption1
  }
  Ensemble info::other {} {
    return MixinOption1
  }

  method did {} {
    return MixinOption1
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

clay::define ::MixinOption2 {
  superclass ::MixinOption1

  clay set opts option option2

  Ensemble info::option {} {
    return MixinOption2
  }

  method did {} {
    return MixinOption2
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}


clay::define ::MixinColor1 {
  clay set opts color blue

  Ensemble info::color {} {
    return MixinColor1
  }
  Ensemble info::shade {} {
    return blue
  }

  method did {} {
    return MixinColor1
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

clay::define ::MixinColor2 {
  clay set opts color green

  Ensemble info::color {} {
    return MixinColor2
  }
  Ensemble info::shade {} {
    return green
  }

  method did {} {
    return MixinColor2
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

set obj [clay::object new]

$obj clay mixinmap root ::MixinRoot
}
set testnum 0
set batnum  0

set obj {$obj}
set template {
test tool-prototype-%battery%-%test% {%comment%} {
  %obj% %method%
} {%answer%}
}
set map {}

dict set map %obj% {$obj}
dict set map %battery% [format %04d [incr batnum]]
dict set map %comment% {Mixin core}

foreach {method answer} {
  {info root} {MixinRoot}
  {info option} {Undefined}
  {info color} {Undefined}
  {info other} {Undefined}
  {info shade} {avacodo}
  {did} {MixinRoot}
  {path} {::MixinRoot ::clay::object}
  {clay get opts} {core root option unset color unset}
  {clay get opts core} root
  {clay get opts option} unset
  {clay get opts color} unset
  {clay ancestors} {::MixinRoot ::clay::object}
} {
  set testid [format %04d [incr testnum]]
  dict set map %test% $testid
  dict set map %method% $method
  dict set map %answer% $answer
  putb result $map $template
}

set testnum 0
putb result {$obj clay mixinmap option ::MixinOption1}
dict set map %battery% [format %04d [incr batnum]]
dict set map %comment% {Mixin option1}
foreach {method answer} {
  {info root} {MixinRoot}
  {info option} {MixinOption1}
  {info color} {Undefined}
  {info other} {MixinOption1}
  {info shade} {avacodo}
  {did} {MixinOption1}
  {path} {::MixinOption1 ::MixinRoot ::clay::object}
  {clay get opts} {option option1 core root color unset}
  {clay get opts core} root
  {clay get opts option} option1
  {clay get opts color} unset
  {clay ancestors} {::MixinOption1 ::MixinRoot ::clay::object}
} {
  set testid [format %04d [incr testnum]]
  dict set map %test% $testid
  dict set map %method% $method
  dict set map %answer% $answer
  putb result $map $template
}

set testnum 0
putb result {
set obj2 [clay::object new]
$obj2 clay mixinmap root ::MixinRoot option ::MixinOption1
}
putb result {$obj clay mixinmap option ::MixinOption1}
dict set map %obj% {$obj2}
dict set map %battery% [format %04d [incr batnum]]
dict set map %comment% {Mixin option1 - clean object}
foreach {method answer} {
  {info root} {MixinRoot}
  {info option} {MixinOption1}
  {info color} {Undefined}
  {info other} {MixinOption1}
  {info shade} {avacodo}
  {did} {MixinOption1}
  {path} {::MixinOption1 ::MixinRoot ::clay::object}
  {clay get opts} {option option1 core root color unset}
  {clay get opts core} root
  {clay get opts option} option1
  {clay get opts color} unset
  {clay ancestors} {::MixinOption1 ::MixinRoot ::clay::object}
} {
  set testid [format %04d [incr testnum]]
  dict set map %test% $testid
  dict set map %method% $method
  dict set map %answer% $answer
  putb result $map $template
}

set testnum 0
putb result {$obj clay mixinmap option ::MixinOption2}
dict set map %battery% [format %04d [incr batnum]]
dict set map %comment% {Mixin option2}
dict set map %obj% {$obj}
foreach {method answer} {
  {info root} {MixinRoot}
  {info option} {MixinOption2}
  {info color} {Undefined}
  {info other} {MixinOption1}
  {info shade} {avacodo}
  {did} {MixinOption2}
  {path} {::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}
  {clay get opts} {option option2 core root color unset}
  {clay get opts core} root
  {clay get opts option} option2
  {clay get opts color} unset
  {clay ancestors} {::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}
} {
  set testid [format %04d [incr testnum]]
  dict set map %test% $testid
  dict set map %method% $method
  dict set map %answer% $answer
  putb result $map $template
}

set testnum 0
putb result {$obj clay mixinmap color MixinColor1}
dict set map %battery% [format %04d [incr batnum]]
dict set map %comment% {Mixin color1}
foreach {method answer} {
  {info root} {MixinRoot}
  {info option} {MixinOption2}
  {info color} {MixinColor1}
  {info other} {MixinOption1}
  {info shade} {blue}
  {did} {MixinColor1}
  {path} {::MixinColor1 ::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}
  {clay get opts} {color blue option option2 core root}
  {clay get opts core} root
  {clay get opts option} option2
  {clay get opts color} blue
  {clay ancestors} {::MixinColor1 ::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}
} {
  set testid [format %04d [incr testnum]]
  dict set map %test% $testid
  dict set map %method% $method
  dict set map %answer% $answer
  putb result $map $template
}
set testnum 0
putb result {$obj clay mixinmap color MixinColor2}
dict set map %battery% [format %04d [incr batnum]]
dict set map %comment% {Mixin color2}
foreach {method answer} {
  {info root} {MixinRoot}
  {info option} {MixinOption2}
  {info color} {MixinColor2}
  {info other} {MixinOption1}
  {info shade} {green}
  {clay get opts} {color green option option2 core root}
  {clay get opts core} root
  {clay get opts option} option2
  {clay get opts color} green
  {clay ancestors} {::MixinColor2 ::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}
} {
  set testid [format %04d [incr testnum]]
  dict set map %test% $testid
  dict set map %method% $method
  dict set map %answer% $answer
  putb result $map $template
}

set testnum 0
putb result {$obj clay mixinmap option MixinOption1}
dict set map %battery% [format %04d [incr batnum]]
dict set map %comment% {Mixin color2 + Option1}
foreach {method answer} {
  {info root} {MixinRoot}
  {info option} {MixinOption1}
  {info color} {MixinColor2}
  {info other} {MixinOption1}
  {info shade} {green}
  {clay get opts} {color green option option1 core root}
  {clay get opts core} root
  {clay get opts option} option1
  {clay get opts color} green
  {clay ancestors} {::MixinColor2 ::MixinOption1 ::MixinRoot ::clay::object}
} {
  set testid [format %04d [incr testnum]]
  dict set map %test% $testid
  dict set map %method% $method
  dict set map %answer% $answer
  putb result $map $template
}

set testnum 0
putb result {$obj clay mixinmap option {}}
dict set map %battery% [format %04d [incr batnum]]
dict set map %comment% {Mixin color2 + no option}
foreach {method answer} {
  {info root} {MixinRoot}
  {info option} {Undefined}
  {info color} {MixinColor2}
  {info other} {Undefined}
  {info shade} {green}
  {clay get opts} {color green core root option unset}
  {clay get opts core} root
  {clay get opts option} unset
  {clay get opts color} green
  {clay ancestors} {::MixinColor2 ::MixinRoot ::clay::object}
} {
  set testid [format %04d [incr testnum]]
  dict set map %test% $testid
  dict set map %method% $method
  dict set map %answer% $answer
  putb result $map $template
}

set testnum 0
putb result {$obj clay mixinmap color {}}
dict set map %battery% [format %04d [incr batnum]]
dict set map %comment% {Mixin core (return to normal)}
foreach {method answer} {
  {info root} {MixinRoot}
  {info option} {Undefined}
  {info color} {Undefined}
  {info other} {Undefined}
  {info shade} {avacodo}
  {clay get opts} {core root option unset color unset}
  {clay get opts core} root
  {clay get opts option} unset
  {clay get opts color} unset
  {clay ancestors} {::MixinRoot ::clay::object}
} {
  set testid [format %04d [incr testnum]]
  dict set map %test% $testid
  dict set map %method% $method
  dict set map %answer% $answer
  putb result $map $template
}

putb result {
###
# Tip479 Tests
###
clay::define tip479class {

  Method newitem dictargs {
    id {type: number}
    color {default: green}
    shape {options: {round square}}
    flavor {default: grape}
  } {
    my variable items
    foreach {f v} $args {
      dict set items $id $f $v
    }
    if {"color" ni [dict keys $args]} {
      dict set items $id color $color
    }
    return [dict get $items $id]
  }

  method itemget {id field} {
    my variable items
    return [dict get $id $field]
  }
}

set obj [tip479class new]
test tip479-001 {Test that a later ensemble definition trumps a more primitive one} {
  $obj newitem id 1 color orange shape round
} {id 1 color orange shape round}

# Fail because we left off a mandatory argument
test tip479-002 {Test that a later ensemble definition trumps a more primitive one} \
  -errorCode NONE -body {
  $obj newitem id 2
} -result {shape is required}

###
# Leave off a value that has a default
# note: Method had special handling for color, but not flavor
###
test tip479-003 {Test that a later ensemble definition trumps a more primitive one} {
  $obj newitem id 3 shape round
} {id 3 shape round color green}

###
# Add extra arguments
###
test tip479-004 {Test that a later ensemble definition trumps a more primitive one} {
  $obj newitem id 4 shape round trim leather
} {id 4 shape round trim leather color green}

clay::define tip479classE {

  Ensemble item::new dictargs {
    id {type: number}
    color {default: green}
    shape {options: {round square}}
    flavor {default: grape}
  } {
    my variable items
    foreach {f v} $args {
      dict set items $id $f $v
    }
    if {"color" ni [dict keys $args]} {
      dict set items $id color $color
    }
    return [dict get $items $id]
  }

  Ensemble item::get {id field} {
    my variable items
    return [dict get $id $field]
  }
}


set obj [tip479classE new]
test tip479-001 {Test that a later ensemble definition trumps a more primitive one} {
  $obj item new id 1 color orange shape round
} {id 1 color orange shape round}

# Fail because we left off a mandatory argument
test tip479-002 {Test that a later ensemble definition trumps a more primitive one} \
  -errorCode NONE -body {
  $obj item new id 2
} -result {shape is required}

###
# Leave off a value that has a default
# note: Method had special handling for color, but not flavor
###
test tip479-003 {Test that a later ensemble definition trumps a more primitive one} {
  $obj item new id 3 shape round
} {id 3 shape round color green}

###
# Add extra arguments
###
test tip479-004 {Test that a later ensemble definition trumps a more primitive one} {
  $obj item new id 4 shape round trim leather
} {id 4 shape round trim leather color green}

}

###
# TESTS NEEDED:
# destructor
###

putb result {
testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:
}
return $result
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/clay/build/uuid.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
###
# Adapted from tcllib module
#
# uuid.tcl - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# UUIDs are 128 bit values that attempt to be unique in time and space.
#
# Reference:
#   http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt
#
# uuid: scheme:
# http://www.globecom.net/ietf/draft/draft-kindel-uuid-uri-00.html
#
# Usage: clay::uuid generate
#        clay::uuid equal $idA $idB
namespace eval ::clay::uuid {
    namespace export uuid
}

###
# Optimization
# Caches machine info after the first pass
###

proc ::clay::uuid::generate_tcl_machinfo {} {
  variable machinfo
  if {[info exists machinfo]} {
    return $machinfo
  }
  lappend machinfo [clock seconds]; # timestamp
  lappend machinfo [clock clicks];  # system incrementing counter
  lappend machinfo [info hostname]; # spatial unique id (poor)
  lappend machinfo [pid];           # additional entropy
  lappend machinfo [array get ::tcl_platform]

  ###
  # If we have /dev/urandom just stream 128 bits from that
  ###
  if {[file exists /dev/urandom]} {
    set fin [open /dev/urandom r]
    binary scan [read $fin 128] H* machinfo
    close $fin
  } elseif {[catch {package require nettool}]} {
    # More spatial information -- better than hostname.
    # bug 1150714: opening a server socket may raise a warning messagebox
    #   with WinXP firewall, using ipconfig will return all IP addresses
    #   including ipv6 ones if available. ipconfig is OK on win98+
    if {[string equal $::tcl_platform(platform) "windows"]} {
      catch {exec ipconfig} config
      lappend machinfo $config
    } else {
      catch {
          set s [socket -server void -myaddr [info hostname] 0]
          ::clay::K [fconfigure $s -sockname] [close $s]
      } r
      lappend machinfo $r
    }

    if {[package provide Tk] != {}} {
      lappend machinfo [winfo pointerxy .]
      lappend machinfo [winfo id .]
    }
  } else {
    ###
    # If the nettool package works on this platform
    # use the stream of hardware ids from it
    ###
    lappend machinfo {*}[::nettool::hwid_list]
  }
  return $machinfo
}

# Generates a binary UUID as per the draft spec. We generate a pseudo-random
# type uuid (type 4). See section 3.4
#
if {[info commands irmmd5] ne {}} {
proc ::clay::uuid::generate {{type {}}} {
    variable nextuuid
    set s [irmmd5 "$type [incr nextuuid(type)] [generate_tcl_machinfo]"]
    foreach {a b} {0 7 8 11 12 15 16 19 20 31} {
         append r [string range $s $a $b] -
     }
     return [string tolower [string trimright $r -]]
}
proc ::clay::uuid::short {{type {}}} {
  variable nextuuid
  set r [irmmd5 "$type [incr nextuuid(type)] [generate_tcl_machinfo]"]
  return [string range $r 0 16]
}

} else {
package require md5 2
proc ::clay::uuid::raw {{type {}}} {
    variable nextuuid
    set tok [md5::MD5Init]
    md5::MD5Update $tok "$type [incr nextuuid($type)] [generate_tcl_machinfo]"
    set r [md5::MD5Final $tok]
    return $r
    #return [::clay::uuid::tostring $r]
}
proc ::clay::uuid::generate {{type {}}} {
    return [::clay::uuid::tostring [::clay::uuid::raw  $type]]
}
proc ::clay::uuid::short {{type {}}} {
  set r [::clay::uuid::raw $type]
  binary scan $r H* s
  return [string range $s 0 16]
}
}
proc ::clay::uuid::tostring {uuid} {
    binary scan $uuid H* s
    foreach {a b} {0 7 8 11 12 15 16 19 20 31} {
        append r [string range $s $a $b] -
    }
    return [string tolower [string trimright $r -]]
}
# Convert a string representation of a uuid into its binary format.
#
proc ::clay::uuid::fromstring {uuid} {
    return [binary format H* [string map {- {}} $uuid]]
}

# Compare two uuids for equality.
#
proc ::clay::uuid::equal {left right} {
    set l [fromstring $left]
    set r [fromstring $right]
    return [string equal $l $r]
}

# uuid generate -> string rep of a new uuid
# uuid equal uuid1 uuid2
#
proc ::clay::uuid {cmd args} {
    switch -exact -- $cmd {
        generate {
           return [::clay::uuid::generate {*}$args]
        }
        short {
          set uuid [::clay::uuid::short {*}$args]
        }
        equal {
            tailcall ::clay::uuid::equal {*}$args
        }
        default {
            return -code error "bad option \"$cmd\":\
                must be generate or equal"
        }
    }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































Deleted modules/clay/clay.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 0.8.6]
[manpage_begin clay n [vset PACKAGE_VERSION]]
[keywords oo]
[copyright {2018 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Clay Framework}]
[titledesc {A minimalist framework for large scale OO Projects}]
[category  {Programming tools}]
[keywords TclOO]
[require Tcl 8.6]
[require uuid]
[require oo::dialect]
[description]
Clay introduces a method ensemble to both [class oo::class] and [class oo::object] called
clay. This ensemble handles all of the high level interactions within the framework.
Clay stores structured data. Clan manages method delegation. Clay has facilities to
manage the complex interactions that come about with mixins.
[para]
The central concept is that inside of every object and class
(which are actually objects too) is a dict called clay. What is stored in that dict is
left to the imagination. But because this dict is exposed via a public method, we can
share structured data between object, classes, and mixins.
[para]
[subsection {Structured Data}]
Clay uses a standardized set of method interactions and introspection that TclOO already provides to perform on-the-fly searches. On-the-fly searches mean that the data is never stale, and we avoid many of the sorts of collisions that would arise when objects start mixing in other classes during operation.
[para]
The [method clay] methods for both classes and objects have a get and a set method. For objects, get will search through the local clay dict. If the requested leaf is not found, or the query is for a branch, the system will then begin to poll the clay methods of all of the class that implements the object, all of that classes’ ancestors, as well as all of the classes that have been mixed into this object, and all of their ancestors.
[para]
Intended branches on a tree end with a directory slash (/). Intended leaves are left unadorned. This is a guide for the tool that builds the search
results to know what parts of a dict are intended to be branches and which are intended to be leaves.
For simple cases, branch marking can be ignored:
[example {
::oo::class create ::foo { }
::foo clay set property/ color blue
::foo clay set property/ shape round

set A [::foo new]
$A clay get property/
{color blue shape round}

$A clay set property/ shape square
$A clay get property/
{color blue shape square}
}]
[para]
But when you start storing blocks of text, guessing what field is a dict and what isn’t gets messy:
[example {
::foo clay set description {A generic thing of designated color and shape}

$A clay get description
{A generic thing of designated color and shape}

Without a convention for discerning branches for leaves what should have been a value can be accidentally parsed as a dictionary, and merged with all of the other values that were never intended to be merge. Here is an example of it all going wrong:
::oo::class create ::foo { }
# Add description as a leaf
::foo clay set description \
  {A generic thing of designated color and shape}
# Add description as a branch
::foo clay set description/ \
  {A generic thing of designated color and shape}

::oo::class create ::bar {
  superclass foo
}
# Add description as a leaf
::bar clay set description \
  {A drinking establishment of designated color and shape and size}
# Add description as a branch
::bar clay set description/ \
  {A drinking establishment of designated color and shape and size}

set B [::bar new]
# As a leaf we get the value verbatim from he nearest ancestor
$B clay get description
  {A drinking establishment of designated color and shape and size}
# As a branch we get a recursive merge
$B clay get description/
{A drinking establishment of designated color and size thing of}
}]
[subsection {Clay Dialect}]
Clay is built using the oo::dialect module from Tcllib. oo::dialect allows you to either add keywords directly to clay, or to create your own
metaclass and keyword set using Clay as a foundation. For details on the keywords and what they do, consult the functions in the ::clay::define namespace.
[subsection {Method Delegation}]
Method Delegation
It is sometimes useful to have an external object that can be invoked as if it were a method of the object. Clay provides a delegate ensemble method to perform that delegation, as well as introspect which methods are delegated in that manner. All delegated methods are marked with html-like tag markings (< >) around them.
[example {
::clay::define counter {
  Variable counter 0
  method incr {{howmuch 1}} {
    my variable counter
    incr counter $howmuch
  }
  method value {} {
    my variable counter
    return $counter
  }
  method reset {} {
    my variable counter
    set counter 0
  }
}
::clay::define example {
  variable buffer
  constructor {} {
    # Build a counter object
    set obj [namespace current]::counter
    ::counter create $obj
    # Delegate the counter
    my delegate <counter> $obj
  }
  method line {text} {
    my <counter> incr
    append buffer $text
  }
}

set A [example new]
$A line {Who’s line is it anyway?}
$A <counter> value
1
}]


[section {Commands}]
[list_begin definitions]
[call proc [cmd clay::PROC] [arg name] [arg arglist] [arg body] [opt "[arg ninja] [const ""]"]]

 Because many features in this package may be added as
 commands to future tcl cores, or be provided in binary
 form by packages, I need a declaritive way of saying
 [emph {Create this command if there isn't one already}].
 The [emph ninja] argument is a script to execute if the
 command is created by this mechanism.




[call proc [cmd clay::_ancestors] [arg resultvar] [arg class]]


[call proc [cmd clay::ancestors] [opt "[arg args]"]]


[call proc [cmd clay::args_to_dict] [opt "[arg args]"]]


[call proc [cmd clay::args_to_options] [opt "[arg args]"]]


[call proc [cmd clay::dynamic_arguments] [arg ensemble] [arg method] [arg arglist] [opt "[arg args]"]]



[call proc [cmd clay::dynamic_wrongargs_message] [arg arglist]]



[call proc [cmd clay::is_dict] [arg d]]


[call proc [cmd clay::is_null] [arg value]]


[call proc [cmd clay::leaf] [opt "[arg args]"]]


[call proc [cmd clay::K] [arg a] [arg b]]


[call proc [cmd clay::noop] [opt "[arg args]"]]

 Perform a noop. Useful in prototyping for commenting out blocks
 of code without actually having to comment them out. It also makes
 a handy default for method delegation if a delegate has not been
 assigned yet.



[call proc [cmd clay::cleanup]]

 Process the queue of objects to be destroyed




[call proc [cmd clay::object_create] [arg objname] [opt "[arg class] [const ""]"]]


[call proc [cmd clay::object_rename] [arg object] [arg newname]]


[call proc [cmd clay::object_destroy] [opt "[arg args]"]]

 Mark an objects for destruction on the next cleanup




[call proc [cmd clay::path] [opt "[arg args]"]]


[call proc [cmd clay::putb] [opt "[arg map]"] [arg text]]

 Append a line of text to a variable. Optionally apply a string mapping.


[call proc [cmd clay::script_path]]


[call proc [cmd clay::NSNormalize] [arg qualname]]


[call proc [cmd clay::uuid_generate] [opt "[arg args]"]]


[call proc [cmd clay::uuid::generate_tcl_machinfo]]


[call proc [cmd clay::uuid::tostring] [arg uuid]]


[call proc [cmd clay::uuid::fromstring] [arg uuid]]
 Convert a string representation of a uuid into its binary format.




[call proc [cmd clay::uuid::equal] [arg left] [arg right]]
 Compare two uuids for equality.




[call proc [cmd clay::uuid] [arg cmd] [opt "[arg args]"]]
 uuid generate -> string rep of a new uuid
 uuid equal uuid1 uuid2




[call proc [cmd clay::tree::sanitize] [arg dict]]

 Output a dictionary removing any . entries added by [fun {clay::tree::merge}]




[call proc [cmd clay::tree::_sanitizeb] [arg path] [arg varname] [arg dict]]

 Helper function for ::clay::tree::sanitize
 Formats the string representation for a dictionary element within
 a human readable stream of lines, and determines if it needs to call itself
 with further indentation to express a sub-branch




[call proc [cmd clay::tree::storage] [arg rawpath]]

 Return the path as a storage path for clay::tree
 with all branch terminators removed.
 This command will also break arguments up if they
 contain /.

[para]Example: [example { > clay::tree::storage {foo bar baz bang}
 foo bar baz bang
 > clay::tree::storage {foo bar baz bang/}
 foo bar baz bang
 > clay::tree::storage {foo bar baz bang:}
 foo bar baz bang:
 > clay::tree::storage {foo/bar/baz bang:}
 foo bar baz bang:
 > clay::tree::storage {foo/bar/baz/bang}
 foo bar baz bang


}]

[call proc [cmd clay::tree::dictset] [arg varname] [opt "[arg args]"]]

 Set an element with a recursive dictionary,
 marking all branches on the way down to the
 final element.
 If the value does not exists in the nested dictionary
 it is added as a leaf. If the value already exists as a branch
 the value given is merged if the value is a valid dict. If the
 incoming value is not a valid dict, the value overrides the value
 stored, and the value is treated as a leaf from then on.

[para]Example: [example { > set r {}
 > ::clay::tree::dictset r option color default Green
 . {} option {. {} color {. {} default Green}}
 > ::clay::tree::dictset r option {Something not dictlike}
 . {} option {Something not dictlike}
 # Note that if the value is not a dict, and you try to force it to be
 # an error with be thrown on the merge
 > ::clay::tree::dictset r option color default Blue
 missing value to go with key


}]

[call proc [cmd clay::tree::dictmerge] [arg varname] [opt "[arg args]"]]

 A recursive form of dict merge, intended for modifying variables in place.

[para]Example: [example { > set mydict {sub/ {sub/ {description {a block of text}}}}
 > ::clay::tree::dictmerge mydict {sub/ {sub/ {field {another block of text}}}}]
 > clay::tree::print $mydict
 sub/ {
   sub/ {
     description {a block of text}
     field {another block of text}
   }
 }


}]

[call proc [cmd clay::tree::merge] [opt "[arg args]"]]

 A recursive form of dict merge
 [para]
 A routine to recursively dig through dicts and merge
 adapted from http://stevehavelka.com/tcl-dict-operation-nested-merge/

[para]Example: [example { > set mydict {sub/ {sub/ {description {a block of text}}}}
 > set odict [clay::tree::merge $mydict {sub/ {sub/ {field {another block of text}}}}]
 > clay::tree::print $odict
 sub/ {
   sub/ {
     description {a block of text}
     field {another block of text}
   }
 }


}]

[call proc [cmd dictargs::proc] [arg name] [arg argspec] [arg body]]

 Named Procedures as new command




[call proc [cmd dictargs::method] [arg name] [arg argspec] [arg body]]


[call proc [cmd clay::dialect::Push] [arg class]]


[call proc [cmd clay::dialect::Peek]]


[call proc [cmd clay::dialect::Pop]]


[call proc [cmd clay::dialect::create] [arg name] [opt "[arg parent] [const ""]"]]

 This proc will generate a namespace, a "mother of all classes", and a
 rudimentary set of policies for this dialect.




[call proc [cmd clay::dialect::NSNormalize] [arg namespace] [arg qualname]]
 Support commands; not intended to be called directly.



[call proc [cmd clay::dialect::DefineThunk] [arg target] [opt "[arg args]"]]


[call proc [cmd clay::dialect::Canonical] [arg namespace] [arg NSpace] [arg class]]


[call proc [cmd clay::dialect::Define] [arg namespace] [arg class] [opt "[arg args]"]]

 Implementation of the languages' define command




[call proc [cmd clay::dialect::Aliases] [arg namespace] [opt "[arg args]"]]


[call proc [cmd clay::dialect::SuperClass] [arg namespace] [opt "[arg args]"]]


[call proc [cmd clay::dynamic_methods] [arg class]]


[call proc [cmd clay::dynamic_methods_class] [arg thisclass]]


[call proc [cmd clay::define::Array] [arg name] [opt "[arg values] [const ""]"]]

 New OO Keywords for clay




[call proc [cmd clay::define::Delegate] [arg name] [arg info]]

 An annotation that objects of this class interact with delegated
 methods. The annotation is intended to be a dictionary, and the
 only reserved key is [emph {description}], a human readable description.




[call proc [cmd clay::define::constructor] [arg arglist] [arg rawbody]]



[call proc [cmd clay::define::Class_Method] [arg name] [arg arglist] [arg body]]

 Specify the a method for the class object itself, instead of for objects of the class




[call proc [cmd clay::define::class_method] [arg name] [arg arglist] [arg body]]

 And alias to the new Class_Method keyword




[call proc [cmd clay::define::clay] [opt "[arg args]"]]


[call proc [cmd clay::define::destructor] [arg rawbody]]



[call proc [cmd clay::define::Dict] [arg name] [opt "[arg values] [const ""]"]]


[call proc [cmd clay::define::Option] [arg name] [opt "[arg args]"]]

 Define an option for the class




[call proc [cmd clay::define::Method] [arg name] [arg argstyle] [arg argspec] [arg body]]


[call proc [cmd clay::define::Option_Class] [arg name] [opt "[arg args]"]]

 Define a class of options
 All field / value pairs will be be inherited by an option that
 specify [emph name] as it class field.




[call proc [cmd clay::define::Variable] [arg name] [opt "[arg default] [const ""]"]]

    This keyword can also be expressed:
    [example {property variable NAME {default DEFAULT}}]
    [para]
    Variables registered in the variable property are also initialized
    (if missing) when the object changes class via the [emph morph] method.




[call proc [cmd clay::ensemble_methodbody] [arg ensemble] [arg einfo]]

 Produce the body of an ensemble's public dispatch method
 ensemble is the name of the the ensemble.
 einfo is a dictionary of methods for the ensemble, and each value is a script
 to execute on dispatch

[para]Example: [example { ::clay::ensemble_methodbody foo {
   bar {tailcall my Foo_bar {*}$args}
   baz {tailcall my Foo_baz {*}$args}
   clock {return [clock seconds]}
   default {puts "You gave me $method"}
 }


}]

[call proc [cmd clay::define::Ensemble] [arg rawmethod] [opt "[arg args]"]]


[call proc [cmd clay::event::cancel] [arg self] [opt "[arg task] [const "*"]"]]

Cancel a scheduled event




[call proc [cmd clay::event::generate] [arg self] [arg event] [opt "[arg args]"]]

    Generate an event
    Adds a subscription mechanism for objects
    to see who has recieved this event and prevent
    spamming or infinite recursion




[call proc [cmd clay::event::nextid]]



[call proc [cmd clay::event::Notification_list] [arg self] [arg event] [opt "[arg stackvar] [const ""]"]]

    Called recursively to produce a list of
    who recieves notifications




[call proc [cmd clay::event::notify] [arg rcpt] [arg sender] [arg event] [arg eventinfo]]

 Final delivery to intended recipient object




[call proc [cmd clay::event::process] [arg self] [arg handle] [arg script]]

 Evaluate an event script in the global namespace




[call proc [cmd clay::event::schedule] [arg self] [arg handle] [arg interval] [arg script]]

Schedule an event to occur later




[call proc [cmd clay::event::subscribe] [arg self] [arg who] [arg event]]

 Subscribe an object to an event pattern




[call proc [cmd clay::event::unsubscribe] [arg self] [opt "[arg args]"]]

 Unsubscribe an object from an event pattern




[call proc [cmd clay::singleton] [arg name] [arg script]]

 An object which is intended to be it's own class.


[list_end]

[section Classes]
[subsection {Class  clay::class}]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "clay ancestors"]]
Return this class and all ancestors in search order.

[call method [cmd "clay dump"]]
Return a complete dump of this object's clay data, but only this object's clay data.

[call method [cmd "clay find"] [arg path] [opt [option "path..."]]]

     Pull a chunk of data from the clay system. If the last element of [emph path] is a branch,
     returns a recursive merge of all data from this object and it's constituent classes of the data in that branch.
     If the last element is a leaf, search this object for a matching leaf, or search all  constituent classes for a matching
     leaf and return the first value found.
     If no value is found, returns an empty string.
     If a branch is returned the topmost . entry is omitted.
   

[call method [cmd "clay get"] [arg path] [opt [option "path..."]]]

     Pull a chunk of data from the class's clay system.
     If no value is found, returns an empty string.
     If a branch is returned the topmost . entry is omitted.
   

[call method [cmd "clay GET"] [arg path] [opt [option "path..."]]]

     Pull a chunk of data from the class's clay system.
     If no value is found, returns an empty string.
   

[call method [cmd "clay merge"] [arg dict] [opt [option "dict..."]]]
Recursively merge the dictionaries given into the object's local clay storage.

[call method [cmd "clay replace"] [arg dictionary]]
Replace the contents of the internal clay storage with the dictionary given.

[call method [cmd "clay search"] [arg path] [opt [option "path..."]]]
Return the first matching value for the path in either this class's clay data or one of its ancestors

[call method [cmd "clay set"] [arg path] [opt [option "path..."]] [arg value]]
Merge the conents of [const value] with the object's clay storage at [const path].

[list_end]
[para]

[subsection {Class  clay::object}]
 clay::object

 This class is inherited by all classes that have options.



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "clay ancestors"]]
Return the class this object belongs to, all classes mixed into this object, and all ancestors of those classes in search order.

[call method [cmd "clay cache"] [arg path] [arg value]]
Store VALUE in such a way that request in SEARCH for PATH will always return it until the cache is flushed

[call method [cmd "clay cget"] [arg field]]

 Pull a value from either the object's clay structure or one of its constituent classes that matches the field name.
 The order of search us:
 [para] 1. The as a value in local dict variable config
 [para] 2. The as a value in local dict variable clay
 [para] 3. As a leaf in any ancestor as a root of the clay tree
 [para] 4. As a leaf in any ancestor as [const const] [emph field]
 [para] 5. As a leaf in any ancestor as [const option] [emph field] [const default]
   

[call method [cmd "clay delegate"] [opt "[arg stub]"] [opt "[arg object]"]]

 Introspect or control method delegation. With no arguments, the method will return a
 key/value list of stubs and objects. With just the [arg stub] argument, the method will
 return the object (if any) attached to the stub. With a [arg stub] and an [arg object]
 this command will forward all calls to the method [arg stub] to the [arg object].
 

[call method [cmd "clay dump"]]
Return a complete dump of this object's clay data, as well as the data from all constituent classes recursively blended in.

[call method [cmd "clay ensemble_map"]]
Return a dictionary describing the method ensembles to be assembled for this object

[call method [cmd "clay eval"] [arg script]]
Evaluated a script in the namespace of this object

[call method [cmd "clay evolve"]]
Trigger the [method InitializePublic] private method

[call method [cmd "clay exists"] [arg path] [opt [option "path..."]]]
Returns 1 if [emph path] exists in either the object's clay data. Values greater than one indicate the element exists in one of the object's constituent classes. A value of zero indicates the path could not be found.

[call method [cmd "clay flush"]]
Wipe any caches built by the clay implementation

[call method [cmd "clay forward"] [arg method] [arg object]]
A convenience wrapper for
 [example {oo::objdefine [self] forward {*}$args}]
 

[call method [cmd "clay get"] [arg path] [opt [option "path..."]]]
Pull a chunk of data from the clay system. If the last element of [emph path] is a branch (ends in a slash /),
   returns a recursive merge of all data from this object and it's constituent classes of the data in that branch.
   If the last element is a leaf, search this object for a matching leaf, or search all  constituent classes for a matching
   leaf and return the first value found.
   If no value is found, returns an empty string.
 

[call method [cmd "clay leaf"] [arg path] [opt [option "path..."]]]
A modified get which is tailored to pull only leaf elements

[call method [cmd "clay merge"] [arg dict] [opt [option "dict..."]]]
Recursively merge the dictionaries given into the object's local clay storage.

[call method [cmd "clay mixin"] [arg class] [opt [option "class..."]]]

 Perform [lb]oo::objdefine [lb]self[rb] mixin[rb] on this object, with a few additional rules:
   Prior to the call, for any class was previously mixed in, but not in the new result, execute the script registered to mixin/ unmap-script (if given.)
   For all new classes, that were not present prior to this call, after the native TclOO mixin is invoked, execute the script registered to mixin/ map-script (if given.)
   Fall all classes that are now present and “mixed inâ€, execute the script registered to mixin/ react-script (if given.)
 

[call method [cmd "clay mixinmap"] [opt "[arg stub]"] [opt "[arg classes]"]]
With no arguments returns the map of stubs and classes mixed into the current object. When only stub is given,
  returns the classes mixed in on that stub. When stub and classlist given, replace the classes currently on that stub with the given
  classes and invoke clay mixin on the new matrix of mixed in classes.
 

[call method [cmd "clay provenance"] [arg path] [opt [option "path..."]]]
Return either [const self] if that path exists in the current object, or return the first class (if any) along the clay search path which contains that element.

[call method [cmd "clay replace"] [arg dictionary]]
Replace the contents of the internal clay storage with the dictionary given.

[call method [cmd "clay search"] [arg path] [arg valuevar] [arg isleafvar]]
Return true, and set valuevar to the value and isleafar to true for false if PATH was found in the cache.

[call method [cmd "clay source"] [arg filename]]
Source the given filename within the object's namespace

[call method [cmd "clay set"] [arg path] [opt [option "path..."]] [arg value]]
Merge the conents of [const value] with the object's clay storage at [const path].

[call method [cmd "InitializePublic"]]

 Instantiate variables. Called on object creation and during clay mixin.




[list_end]
[para]

[section AUTHORS]
Sean Woods [uri mailto:<yoda@etoyoc.com>][para]
[vset CATEGORY oo]
[include ../common-text/feedback.inc]

[manpage_end]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/clay/clay.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
###
# clay.tcl
#
# Copyright (c) 2018 Sean Woods
#
# BSD License
###
# @@ Meta Begin
# Package clay 0.8.6
# Meta platform     tcl
# Meta summary      A minimalist framework for complex TclOO development
# Meta description  This package introduces the method "clay" to both oo::object
# Meta description  and oo::class which facilitate complex interactions between objects
# Meta description  and their ancestor and mixed in classes.
# Meta category     TclOO
# Meta subject      framework
# Meta require      {Tcl 8.6}
# Meta author       Sean Woods
# Meta license      BSD
# @@ Meta End

###
# Amalgamated package for clay
# Do not edit directly, tweak the source in build/ and rerun
# build.tcl
###
package provide clay 0.8.6
namespace eval ::clay {}

###
# START: procs.tcl
###
namespace eval ::clay {
}
set ::clay::trace 0
if {[info commands ::cron::object_destroy] eq {}} {
  # Provide a noop if we aren't running with the cron scheduler
  namespace eval ::cron {}
  proc ::cron::object_destroy args {}
}
proc ::clay::PROC {name arglist body {ninja {}}} {
  if {[info commands $name] ne {}} return
  proc $name $arglist $body
  eval $ninja
}
if {[info commands ::PROC] eq {}} {
  namespace eval ::clay { namespace export PROC }
  namespace eval :: { namespace import ::clay::PROC }
}
proc ::clay::_ancestors {resultvar class} {
  upvar 1 $resultvar result
  if {$class in $result} {
    return
  }
  lappend result $class
  foreach aclass [::info class superclasses $class] {
    _ancestors result $aclass
  }
}
proc ::clay::ancestors {args} {
  set result {}
  set queue  {}
  set metaclasses {}

  foreach class $args {
    set ancestors($class) {}
    _ancestors ancestors($class) $class
  }
  foreach class [lreverse $args] {
    foreach aclass $ancestors($class) {
      if {$aclass in $result} continue
      set skip 0
      foreach bclass $args {
        if {$class eq $bclass} continue
        if {$aclass in $ancestors($bclass)} {
          set skip 1
          break
        }
      }
      if {$skip} continue
      lappend result $aclass
    }
  }
  foreach class [lreverse $args] {
    foreach aclass $ancestors($class) {
      if {$aclass in $result} continue
      lappend result $aclass
    }
  }
  ###
  # Screen out classes that do not participate in clay
  # interactions
  ###
  set output {}
  foreach {item} $result {
    if {[catch {$item clay noop} err]} {
      continue
    }
    lappend output $item
  }
  return $output
}
proc ::clay::args_to_dict args {
  if {[llength $args]==1} {
    return [lindex $args 0]
  }
  return $args
}
proc ::clay::args_to_options args {
  set result {}
  foreach {var val} [args_to_dict {*}$args] {
    lappend result [string trim $var -:] $val
  }
  return $result
}
proc ::clay::dynamic_arguments {ensemble method arglist args} {
  set idx 0
  set len [llength $args]
  if {$len > [llength $arglist]} {
    ###
    # Catch if the user supplies too many arguments
    ###
    set dargs 0
    if {[lindex $arglist end] ni {args dictargs}} {
      return -code error -level 2 "Usage: $ensemble $method [string trim [dynamic_wrongargs_message $arglist]]"
    }
  }
  foreach argdef $arglist {
    if {$argdef eq "args"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      break
    }
    if {$argdef eq "dictargs"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      ###
      # Perform args processing in the style of clay
      ###
      set dictargs [::clay::args_to_options {*}[lrange $args $idx end]]
      uplevel 1 [list set dictargs $dictargs]
      break
    }
    if {$idx > $len} {
      ###
      # Catch if the user supplies too few arguments
      ###
      if {[llength $argdef]==1} {
        return -code error -level 2 "Usage: $ensemble $method [string trim [dynamic_wrongargs_message $arglist]]"
      } else {
        uplevel 1 [list set [lindex $argdef 0] [lindex $argdef 1]]
      }
    } else {
      uplevel 1 [list set [lindex $argdef 0] [lindex $args $idx]]
    }
    incr idx
  }
}
proc ::clay::dynamic_wrongargs_message {arglist} {
  set result ""
  set dargs 0
  foreach argdef $arglist {
    if {$argdef in {args dictargs}} {
      set dargs 1
      break
    }
    if {[llength $argdef]==1} {
      append result " $argdef"
    } else {
      append result " ?[lindex $argdef 0]?"
    }
  }
  if { $dargs } {
    append result " ?option value?..."
  }
  return $result
}
proc ::clay::is_dict { d } {
  # is it a dict, or can it be treated like one?
  if {[catch {::dict size $d} err]} {
    #::set ::errorInfo {}
    return 0
  }
  return 1
}
proc ::clay::is_null value {
  return [expr {$value in {{} NULL}}]
}
proc ::clay::leaf args {
  set marker [string index [lindex $args end] end]
  set result [path {*}${args}]
  if {$marker eq "/"} {
    return $result
  }
  return [list {*}[lrange $result 0 end-1] [string trim [string trim [lindex $result end]] /]]
}
proc ::clay::K {a b} {set a}
if {[info commands ::K] eq {}} {
  namespace eval ::clay { namespace export K }
  namespace eval :: { namespace import ::clay::K }
}
proc ::clay::noop args {}
if {[info commands ::noop] eq {}} {
  namespace eval ::clay { namespace export noop }
  namespace eval :: { namespace import ::clay::noop }
}
proc ::clay::cleanup {} {
  set count 0
  if {![info exists ::clay::idle_destroy]} return
  set objlist $::clay::idle_destroy
  set ::clay::idle_destroy {}
  foreach obj $objlist {
    if {![catch {$obj destroy}]} {
      incr count
    }
  }
  return $count
}
proc ::clay::object_create {objname {class {}}} {
  #if {$::clay::trace>0} {
  #  puts [list $objname CREATE]
  #}
}
proc ::clay::object_rename {object newname} {
  if {$::clay::trace>0} {
    puts [list $object RENAME -> $newname]
  }
}
proc ::clay::object_destroy args {
  if {![info exists ::clay::idle_destroy]} {
    set ::clay::idle_destroy {}
  }
  foreach objname $args {
    if {$::clay::trace>0} {
      puts [list $objname DESTROY]
    }
    ::cron::object_destroy $objname
    if {$objname in $::clay::idle_destroy} continue
    lappend ::clay::idle_destroy $objname
  }
}
proc ::clay::path args {
  set result {}
  foreach item $args {
    set item [string trim $item :./]
    foreach subitem [split $item /] {
      lappend result [string trim ${subitem}]/
    }
  }
  return $result
}
proc ::clay::putb {buffername args} {
  upvar 1 $buffername buffer
  switch [llength $args] {
    1 {
      append buffer [lindex $args 0] \n
    }
    2 {
      append buffer [string map {*}$args] \n
    }
    default {
      error "usage: putb buffername ?map? string"
    }
  }
}
if {[info command ::putb] eq {}} {
  namespace eval ::clay { namespace export putb }
  namespace eval :: { namespace import ::clay::putb }
}
proc ::clay::script_path {} {
  set path [file dirname [file join [pwd] [info script]]]
  return $path
}
proc ::clay::NSNormalize qualname {
  if {![string match ::* $qualname]} {
    set qualname ::clay::classes::$qualname
  }
  regsub -all {::+} $qualname "::"
}
proc ::clay::uuid_generate args {
  return [uuid generate]
}
namespace eval ::clay {
  variable option_class {}
  variable core_classes {::oo::class ::oo::object}
}

###
# END: procs.tcl
###
###
# START: core.tcl
###
package require Tcl 8.6 ;# try in pipeline.tcl. Possibly other things.
if {[info commands irmmd5] eq {}} {
  if {[catch {package require odielibc}]} {
    package require md5 2
  }
}
::namespace eval ::clay {
}
::namespace eval ::clay::classes {
}
::namespace eval ::clay::define {
}
::namespace eval ::clay::tree {
}
::namespace eval ::clay::dict {
}
::namespace eval ::clay::list {
}
::namespace eval ::clay::uuid {
}
if {![info exists ::clay::idle_destroy]} {
  set ::clay::idle_destroy {}
}

###
# END: core.tcl
###
###
# START: uuid.tcl
###
namespace eval ::clay::uuid {
    namespace export uuid
}
proc ::clay::uuid::generate_tcl_machinfo {} {
  variable machinfo
  if {[info exists machinfo]} {
    return $machinfo
  }
  lappend machinfo [clock seconds]; # timestamp
  lappend machinfo [clock clicks];  # system incrementing counter
  lappend machinfo [info hostname]; # spatial unique id (poor)
  lappend machinfo [pid];           # additional entropy
  lappend machinfo [array get ::tcl_platform]

  ###
  # If we have /dev/urandom just stream 128 bits from that
  ###
  if {[file exists /dev/urandom]} {
    set fin [open /dev/urandom r]
    binary scan [read $fin 128] H* machinfo
    close $fin
  } elseif {[catch {package require nettool}]} {
    # More spatial information -- better than hostname.
    # bug 1150714: opening a server socket may raise a warning messagebox
    #   with WinXP firewall, using ipconfig will return all IP addresses
    #   including ipv6 ones if available. ipconfig is OK on win98+
    if {[string equal $::tcl_platform(platform) "windows"]} {
      catch {exec ipconfig} config
      lappend machinfo $config
    } else {
      catch {
          set s [socket -server void -myaddr [info hostname] 0]
          ::clay::K [fconfigure $s -sockname] [close $s]
      } r
      lappend machinfo $r
    }

    if {[package provide Tk] != {}} {
      lappend machinfo [winfo pointerxy .]
      lappend machinfo [winfo id .]
    }
  } else {
    ###
    # If the nettool package works on this platform
    # use the stream of hardware ids from it
    ###
    lappend machinfo {*}[::nettool::hwid_list]
  }
  return $machinfo
}
if {[info commands irmmd5] ne {}} {
proc ::clay::uuid::generate {{type {}}} {
    variable nextuuid
    set s [irmmd5 "$type [incr nextuuid(type)] [generate_tcl_machinfo]"]
    foreach {a b} {0 7 8 11 12 15 16 19 20 31} {
         append r [string range $s $a $b] -
     }
     return [string tolower [string trimright $r -]]
}
proc ::clay::uuid::short {{type {}}} {
  variable nextuuid
  set r [irmmd5 "$type [incr nextuuid(type)] [generate_tcl_machinfo]"]
  return [string range $r 0 16]
}

} else {
package require md5 2
proc ::clay::uuid::raw {{type {}}} {
    variable nextuuid
    set tok [md5::MD5Init]
    md5::MD5Update $tok "$type [incr nextuuid($type)] [generate_tcl_machinfo]"
    set r [md5::MD5Final $tok]
    return $r
    #return [::clay::uuid::tostring $r]
}
proc ::clay::uuid::generate {{type {}}} {
    return [::clay::uuid::tostring [::clay::uuid::raw  $type]]
}
proc ::clay::uuid::short {{type {}}} {
  set r [::clay::uuid::raw $type]
  binary scan $r H* s
  return [string range $s 0 16]
}
}
proc ::clay::uuid::tostring {uuid} {
    binary scan $uuid H* s
    foreach {a b} {0 7 8 11 12 15 16 19 20 31} {
        append r [string range $s $a $b] -
    }
    return [string tolower [string trimright $r -]]
}
proc ::clay::uuid::fromstring {uuid} {
    return [binary format H* [string map {- {}} $uuid]]
}
proc ::clay::uuid::equal {left right} {
    set l [fromstring $left]
    set r [fromstring $right]
    return [string equal $l $r]
}
proc ::clay::uuid {cmd args} {
    switch -exact -- $cmd {
        generate {
           return [::clay::uuid::generate {*}$args]
        }
        short {
          set uuid [::clay::uuid::short {*}$args]
        }
        equal {
            tailcall ::clay::uuid::equal {*}$args
        }
        default {
            return -code error "bad option \"$cmd\":\
                must be generate or equal"
        }
    }
}

###
# END: uuid.tcl
###
###
# START: dict.tcl
###
::clay::PROC ::tcl::dict::getnull {dictionary args} {
  if {[exists $dictionary {*}$args]} {
    get $dictionary {*}$args
  }
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] getnull ::tcl::dict::getnull]
}
::clay::PROC ::tcl::dict::is_dict { d } {
  # is it a dict, or can it be treated like one?
  if {[catch {dict size $d} err]} {
    #::set ::errorInfo {}
    return 0
  }
  return 1
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] is_dict ::tcl::dict::is_dict]
}
::clay::PROC ::tcl::dict::rmerge {args} {
  ::set result [dict create . {}]
  # Merge b into a, and handle nested dicts appropriately
  ::foreach b $args {
    for { k v } $b {
      ::set field [string trim $k :/]
      if {![::clay::tree::is_branch $b $k]} {
        # Element names that end in ":" are assumed to be literals
        set result $k $v
      } elseif { [exists $result $k] } {
        # key exists in a and b?  let's see if both values are dicts
        # both are dicts, so merge the dicts
        if { [is_dict [get $result $k]] && [is_dict $v] } {
          set result $k [rmerge [get $result $k] $v]
        } else {
          set result $k $v
        }
      } else {
        set result $k $v
      }
    }
  }
  return $result
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] rmerge ::tcl::dict::rmerge]
}
::clay::PROC ::clay::tree::is_branch { dict path } {
  set field [lindex $path end]
  if {[string index $field end] eq ":"} {
    return 0
  }
  if {[string index $field 0] eq "."} {
    return 0
  }
  if {[string index $field end] eq "/"} {
    return 1
  }
  return [dict exists $dict {*}$path .]
}
::clay::PROC ::clay::tree::print {dict} {
  ::set result {}
  ::set level -1
  ::clay::tree::_dictputb $level result $dict
  return $result
}
::clay::PROC ::clay::tree::_dictputb {level varname dict} {
  upvar 1 $varname result
  incr level
  dict for {field value} $dict {
    if {$field eq "."} continue
    if {[clay::tree::is_branch $dict $field]} {
      putb result "[string repeat "  " $level]$field \{"
      _dictputb $level result $value
      putb result "[string repeat "  " $level]\}"
    } else {
      putb result "[string repeat "  " $level][list $field $value]"
    }
  }
}
proc ::clay::tree::sanitize {dict} {
  ::set result {}
  ::set level -1
  ::clay::tree::_sanitizeb {} result $dict
  return $result
}
proc ::clay::tree::_sanitizeb {path varname dict} {
  upvar 1 $varname result
  dict for {field value} $dict {
    if {$field eq "."} continue
    if {[clay::tree::is_branch $dict $field]} {
      _sanitizeb [list {*}$path $field] result $value
    } else {
      dict set result {*}$path $field $value
    }
  }
}
proc ::clay::tree::storage {rawpath} {
  set isleafvar 0
  set path {}
  set tail [string index $rawpath end]
  foreach element $rawpath {
    set items [split [string trim $element /] /]
    foreach item $items {
      if {$item eq {}} continue
      lappend path $item
    }
  }
  return $path
}
proc ::clay::tree::dictset {varname args} {
  upvar 1 $varname result
  if {[llength $args] < 2} {
    error "Usage: ?path...? path value"
  } elseif {[llength $args]==2} {
    set rawpath [lindex $args 0]
  } else {
    set rawpath  [lrange $args 0 end-1]
  }
  set value [lindex $args end]
  set path [storage $rawpath]
  set dot .
  set one {}
  dict set result $dot $one
  set dpath {}
  foreach item [lrange $path 0 end-1] {
    set field $item
    lappend dpath [string trim $item /]
    dict set result {*}$dpath $dot $one
  }
  set field [lindex $rawpath end]
  set ext   [string index $field end]
  if {$ext eq {:} || ![dict is_dict $value]} {
    dict set result {*}$path $value
    return
  }
  if {$ext eq {/} && ![dict exists $result {*}$path $dot]} {
    dict set result {*}$path $dot $one
  }
  if {[dict exists $result {*}$path $dot]} {
    dict set result {*}$path [::clay::tree::merge [dict get $result {*}$path] $value]
    return
  }
  dict set result {*}$path $value
}
proc ::clay::tree::dictmerge {varname args} {
  upvar 1 $varname result
  set dot .
  set one {}
  dict set result $dot $one
  foreach dict $args {
    dict for {f v} $dict {
      set field [string trim $f /]
      set bbranch [clay::tree::is_branch $dict $f]
      if {![dict exists $result $field]} {
        dict set result $field $v
        if {$bbranch} {
          dict set result $field [clay::tree::merge $v]
        } else {
          dict set result $field $v
        }
      } elseif {[dict exists $result $field $dot]} {
        if {$bbranch} {
          dict set result $field [clay::tree::merge [dict get $result $field] $v]
        } else {
          dict set result $field $v
        }
      }
    }
  }
  return $result
}
proc ::clay::tree::merge {args} {
  ###
  # The result of a merge is always a dict with branches
  ###
  set dot .
  set one {}
  dict set result $dot $one
  set argument 0
  foreach b $args {
    # Merge b into a, and handle nested dicts appropriately
    if {![dict is_dict $b]} {
      error "Element $b is not a dictionary"
    }
    dict for { k v } $b {
      if {$k eq $dot} {
        dict set result $dot $one
        continue
      }
      set bbranch [is_branch $b $k]
      set field [string trim $k /]
      if { ![dict exists $result $field] } {
        if {$bbranch} {
          dict set result $field [merge $v]
        } else {
          dict set result $field $v
        }
      } else {
        set abranch [dict exists $result $field $dot]
        if {$abranch && $bbranch} {
          dict set result $field [merge [dict get $result $field] $v]
        } else {
          dict set result $field $v
          if {$bbranch} {
            dict set result $field $dot $one
          }
        }
      }
    }
  }
  return $result
}
::clay::PROC ::tcl::dict::isnull {dictionary args} {
  if {![exists $dictionary {*}$args]} {return 1}
  return [expr {[get $dictionary {*}$args] in {{} NULL null}}]
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] isnull ::tcl::dict::isnull]
}

###
# END: dict.tcl
###
###
# START: list.tcl
###
::clay::PROC ::clay::ladd {varname args} {
  upvar 1 $varname var
  if ![info exists var] {
      set var {}
  }
  foreach item $args {
    if {$item in $var} continue
    lappend var $item
  }
  return $var
}
::clay::PROC ::clay::ldelete {varname args} {
  upvar 1 $varname var
  if ![info exists var] {
      return
  }
  foreach item [lsort -unique $args] {
    while {[set i [lsearch $var $item]]>=0} {
      set var [lreplace $var $i $i]
    }
  }
  return $var
}
::clay::PROC ::clay::lrandom list {
  set len [llength $list]
  set idx [expr int(rand()*$len)]
  return [lindex $list $idx]
}

###
# END: list.tcl
###
###
# START: dictargs.tcl
###
namespace eval ::dictargs {
}
if {[info commands ::dictargs::parse] eq {}} {
  proc ::dictargs::parse {argdef argdict} {
    set result {}
    dict for {field info} $argdef {
      if {![string is alnum [string index $field 0]]} {
        error "$field is not a simple variable name"
      }
      upvar 1 $field _var
      set aliases {}
      if {[dict exists $argdict $field]} {
        set _var [dict get $argdict $field]
        continue
      }
      if {[dict exists $info aliases:]} {
        set found 0
        foreach {name} [dict get $info aliases:] {
          if {[dict exists $argdict $name]} {
            set _var [dict get $argdict $name]
            set found 1
            break
          }
        }
        if {$found} continue
      }
      if {[dict exists $info default:]} {
        set _var [dict get $info default:]
        continue
      }
      set mandatory 1
      if {[dict exists $info mandatory:]} {
        set mandatory [dict get $info mandatory:]
      }
      if {$mandatory} {
        error "$field is required"
      }
    }
  }
}
proc ::dictargs::proc {name argspec body} {
  set result {}
  append result "::dictargs::parse \{$argspec\} \$args" \;
  append result $body
  uplevel 1 [list ::proc $name [list [list args [list dictargs $argspec]]] $result]
}
proc ::dictargs::method {name argspec body} {
  set class [lindex [::info level -1] 1]
  set result {}
  append result "::dictargs::parse \{$argspec\} \$args" \;
  append result $body
  oo::define $class method $name [list [list args [list dictargs $argspec]]] $result
}

###
# END: dictargs.tcl
###
###
# START: dialect.tcl
###
namespace eval ::clay::dialect {
  namespace export create
  foreach {flag test} {
    tip470 {package vsatisfies [package provide Tcl] 8.7}
  } {
    if {![info exists ::clay::dialect::has($flag)]} {
      set ::clay::dialect::has($flag) [eval $test]
    }
  }
}
proc ::clay::dialect::Push {class} {
  ::variable class_stack
  lappend class_stack $class
}
proc ::clay::dialect::Peek {} {
  ::variable class_stack
  return [lindex $class_stack end]
}
proc ::clay::dialect::Pop {} {
  ::variable class_stack
  set class_stack [lrange $class_stack 0 end-1]
}
if {$::clay::dialect::has(tip470)} {
proc ::clay::dialect::current_class {} {
  return [uplevel 1 self]
}
} else {
proc ::clay::dialect::current_class {} {
  tailcall Peek
}
}
proc ::clay::dialect::create {name {parent ""}} {
  variable has
  set NSPACE [NSNormalize [uplevel 1 {namespace current}] $name]
  ::namespace eval $NSPACE {::namespace eval define {}}
  ###
  # Build the "define" namespace
  ###

  if {$parent eq ""} {
    ###
    # With no "parent" language, begin with all of the keywords in
    # oo::define
    ###
    foreach command [info commands ::oo::define::*] {
      set procname [namespace tail $command]
      interp alias {} ${NSPACE}::define::$procname {} \
        ::clay::dialect::DefineThunk $procname
    }
    # Create an empty dynamic_methods proc
    proc ${NSPACE}::dynamic_methods {class} {}
    namespace eval $NSPACE {
      ::namespace export dynamic_methods
      ::namespace eval define {::namespace export *}
    }
    set ANCESTORS {}
  } else {
    ###
    # If we have a parent language, that language already has the
    # [oo::define] keywords as well as additional keywords and behaviors.
    # We should begin with that
    ###
    set pnspace [NSNormalize [uplevel 1 {namespace current}] $parent]
    apply [list parent {
      ::namespace export dynamic_methods
      ::namespace import -force ${parent}::dynamic_methods
    } $NSPACE] $pnspace

    apply [list parent {
      ::namespace import -force ${parent}::define::*
      ::namespace export *
    } ${NSPACE}::define] $pnspace
      set ANCESTORS [list ${pnspace}::object]
  }
  ###
  # Build our dialect template functions
  ###
  proc ${NSPACE}::define {oclass args} [string map [list %NSPACE% $NSPACE] {
  ###
  # To facilitate library reloading, allow
  # a dialect to create a class from DEFINE
  ###
  set class [::clay::dialect::NSNormalize [uplevel 1 {namespace current}] $oclass]
    if {[info commands $class] eq {}} {
      %NSPACE%::class create $class {*}${args}
    } else {
      ::clay::dialect::Define %NSPACE% $class {*}${args}
    }
}]
  interp alias {} ${NSPACE}::define::current_class {} \
    ::clay::dialect::current_class
  interp alias {} ${NSPACE}::define::aliases {} \
    ::clay::dialect::Aliases $NSPACE
  interp alias {} ${NSPACE}::define::superclass {} \
    ::clay::dialect::SuperClass $NSPACE

  if {[info command ${NSPACE}::class] ne {}} {
    ::rename ${NSPACE}::class {}
  }
  ###
  # Build the metaclass for our language
  ###
  ::oo::class create ${NSPACE}::class {
    superclass ::clay::dialect::MotherOfAllMetaClasses
  }
  # Wire up the create method to add in the extra argument we need; the
  # MotherOfAllMetaClasses will know what to do with it.
  ::oo::objdefine ${NSPACE}::class \
    method create {name {definitionScript ""}} \
      "next \$name [list ${NSPACE}::define] \$definitionScript"

  ###
  # Build the mother of all classes. Note that $ANCESTORS is already
  # guaranteed to be a list in canonical form.
  ###
  uplevel #0 [string map [list %NSPACE% [list $NSPACE] %name% [list $name] %ANCESTORS% $ANCESTORS] {
    %NSPACE%::class create %NSPACE%::object {
     superclass %ANCESTORS%
      # Put MOACish stuff in here
    }
  }]
  if { "${NSPACE}::class" ni $::clay::dialect::core_classes } {
    lappend ::clay::dialect::core_classes "${NSPACE}::class"
  }
  if { "${NSPACE}::object" ni $::clay::dialect::core_classes } {
    lappend ::clay::dialect::core_classes "${NSPACE}::object"
  }
}
proc ::clay::dialect::NSNormalize {namespace qualname} {
  if {![string match ::* $qualname]} {
    set qualname ${namespace}::$qualname
  }
  regsub -all {::+} $qualname "::"
}
proc ::clay::dialect::DefineThunk {target args} {
  tailcall ::oo::define [Peek] $target {*}$args
}
proc ::clay::dialect::Canonical {namespace NSpace class} {
  namespace upvar $namespace cname cname
  #if {[string match ::* $class]} {
  #  return $class
  #}
  if {[info exists cname($class)]} {
    return $cname($class)
  }
  if {[info exists ::clay::dialect::cname($class)]} {
    return $::clay::dialect::cname($class)
  }
  if {[info exists ::clay::dialect::cname(${NSpace}::${class})]} {
    return $::clay::dialect::cname(${NSpace}::${class})
  }
  foreach item [list "${NSpace}::$class" "::$class"] {
    if {[info commands $item] ne {}} {
      return $item
    }
  }
  return ${NSpace}::$class
}
proc ::clay::dialect::Define {namespace class args} {
  Push $class
  try {
  	if {[llength $args]==1} {
      namespace eval ${namespace}::define [lindex $args 0]
    } else {
      ${namespace}::define::[lindex $args 0] {*}[lrange $args 1 end]
    }
  	${namespace}::dynamic_methods $class
  } finally {
    Pop
  }
}
proc ::clay::dialect::Aliases {namespace args} {
  set class [Peek]
  namespace upvar $namespace cname cname
  set NSpace [join [lrange [split $class ::] 1 end-2] ::]
  set cname($class) $class
  foreach name $args {
    set cname($name) $class
    #set alias $name
    set alias [NSNormalize $NSpace $name]
    # Add a local metaclass reference
    if {![info exists ::clay::dialect::cname($alias)]} {
      lappend ::clay::dialect::aliases($class) $alias
      ##
      # Add a global reference, first come, first served
      ##
      set ::clay::dialect::cname($alias) $class
    }
  }
}
proc ::clay::dialect::SuperClass {namespace args} {
  set class [Peek]
  namespace upvar $namespace class_info class_info
  dict set class_info($class) superclass 1
  set ::clay::dialect::cname($class) $class
  set NSpace [join [lrange [split $class ::] 1 end-2] ::]
  set unique {}
  foreach item $args {
    set Item [Canonical $namespace $NSpace $item]
    dict set unique $Item $item
  }
  set root ${namespace}::object
  if {$class ne $root} {
    dict set unique $root $root
  }
  tailcall ::oo::define $class superclass {*}[dict keys $unique]
}
if {[info command ::clay::dialect::MotherOfAllMetaClasses] eq {}} {
::oo::class create ::clay::dialect::MotherOfAllMetaClasses {
  superclass ::oo::class
  constructor {define definitionScript} {
    $define [self] {
      superclass
    }
    $define [self] $definitionScript
  }
  method aliases {} {
    if {[info exists ::clay::dialect::aliases([self])]} {
      return $::clay::dialect::aliases([self])
    }
  }
}
}
namespace eval ::clay::dialect {
  variable core_classes {::oo::class ::oo::object}
}

###
# END: dialect.tcl
###
###
# START: metaclass.tcl
###
::clay::dialect::create ::clay
proc ::clay::dynamic_methods class {
  foreach command [info commands [namespace current]::dynamic_methods_*] {
    $command $class
  }
}
proc ::clay::dynamic_methods_class {thisclass} {
  set methods {}
  set mdata [$thisclass clay find class_typemethod]
  foreach {method info} $mdata {
    if {$method eq {.}} continue
    set method [string trimright $method :/-]
    if {$method in $methods} continue
    lappend methods $method
    set arglist [dict getnull $info arglist]
    set body    [dict getnull $info body]
    ::oo::objdefine $thisclass method $method $arglist $body
  }
}
proc ::clay::define::Array {name {values {}}} {
  set class [current_class]
  set name [string trim $name :/]
  $class clay branch array $name
  dict for {var val} $values {
    $class clay set array/ $name $var $val
  }
}
proc ::clay::define::Delegate {name info} {
  set class [current_class]
  foreach {field value} $info {
    $class clay set component/ [string trim $name :/]/ $field $value
  }
}
proc ::clay::define::constructor {arglist rawbody} {
  set body {
my variable DestroyEvent
set DestroyEvent 0
::clay::object_create [self] [info object class [self]]
# Initialize public variables and options
my InitializePublic
  }
  append body $rawbody
  set class [current_class]
  ::oo::define $class constructor $arglist $body
}
proc ::clay::define::Class_Method {name arglist body} {
  set class [current_class]
  $class clay set class_typemethod/ [string trim $name :/] [dict create arglist $arglist body $body]
}
proc ::clay::define::class_method {name arglist body} {
  set class [current_class]
  $class clay set class_typemethod/ [string trim $name :/] [dict create arglist $arglist body $body]
}
proc ::clay::define::clay {args} {
  set class [current_class]
  if {[lindex $args 0] in "cget set branch"} {
    $class clay {*}$args
  } else {
    $class clay set {*}$args
  }
}
proc ::clay::define::destructor rawbody {
  set body {
# Run the destructor once and only once
set self [self]
my variable DestroyEvent
if {$DestroyEvent} return
set DestroyEvent 1
}
  append body $rawbody
  ::oo::define [current_class] destructor $body
}
proc ::clay::define::Dict {name {values {}}} {
  set class [current_class]
  set name [string trim $name :/]
  $class clay branch dict $name
  foreach {var val} $values {
    $class clay set dict/ $name/ $var $val
  }
}
proc ::clay::define::Option {name args} {
  set class [current_class]
  set dictargs {default {}}
  foreach {var val} [::clay::args_to_dict {*}$args] {
    dict set dictargs [string trim $var -:/] $val
  }
  set name [string trimleft $name -]

  ###
  # Option Class handling
  ###
  set optclass [dict getnull $dictargs class]
  if {$optclass ne {}} {
    foreach {f v} [$class clay find option_class $optclass] {
      if {![dict exists $dictargs $f]} {
        dict set dictargs $f $v
      }
    }
    if {$optclass eq "variable"} {
      variable $name [dict getnull $dictargs default]
    }
  }
  foreach {f v} $dictargs {
    $class clay set option $name $f $v
  }
}
proc ::clay::define::Method {name argstyle argspec body} {
  set class [current_class]
  set result {}
  switch $argstyle {
    dictargs {
      append result "::dictargs::parse \{$argspec\} \$args" \;
    }
  }
  append result $body
  oo::define $class method $name [list [list args [list dictargs $argspec]]] $result
}
proc ::clay::define::Option_Class {name args} {
  set class [current_class]
  set dictargs {default {}}
  set name [string trimleft $name -:]
  foreach {f v} [::clay::args_to_dict {*}$args] {
    $class clay set option_class $name [string trim $f -/:] $v
  }
}
proc ::clay::define::Variable {name {default {}}} {
  set class [current_class]
  set name [string trimright $name :/]
  $class clay set variable/ $name $default
}

###
# END: metaclass.tcl
###
###
# START: ensemble.tcl
###
::namespace eval ::clay::define {
}
proc ::clay::ensemble_methodbody {ensemble einfo} {
  set default standard
  set preamble {}
  set eswitch {}
  set Ensemble [string totitle $ensemble]
  if {$Ensemble eq "."} continue
  foreach {msubmethod minfo} [lsort -dictionary -stride 2 $einfo] {
    if {$msubmethod eq "."} continue
    if {![dict exists $minfo body:]} {
      continue
    }
    set submethod [string trim $msubmethod :/-]
    if {$submethod eq "default"} {
      set default [dict get $minfo body:]
    } else {
      dict set eswitch $submethod [dict get $minfo body:]
    }
    if {[dict exists $submethod aliases:]} {
      foreach alias [dict get $minfo aliases:] {
        if {![dict exists $eswitch $alias]} {
          dict set eswitch $alias [dict get $minfo body:]
        }
      }
    }
  }
  set methodlist [lsort -dictionary [dict keys $eswitch]]
  if {![dict exists $eswitch <list>]} {
    dict set eswitch <list> {return $methodlist}
  }
  if {$default eq "standard"} {
    set default "error \"unknown method $ensemble \$method. Valid: \$methodlist\""
  }
  dict set eswitch default $default
  set mbody {}
  append mbody \n [list set methodlist $methodlist]
  append mbody \n "switch -- \$method \{$eswitch\}" \n
  return $mbody
}
::proc ::clay::define::Ensemble {rawmethod args} {
  if {[llength $args]==2} {
    lassign $args argspec body
    set argstyle tcl
  } elseif {[llength $args]==3} {
    lassign $args argstyle argspec body
  } else {
    error "Usage: Ensemble name ?argstyle? argspec body"
  }
  set class [current_class]
  #if {$::clay::trace>2} {
  #  puts [list $class Ensemble $rawmethod $argspec $body]
  #}
  set mlist [split $rawmethod "::"]
  set ensemble [string trim [lindex $mlist 0] :/]
  set method   [string trim [lindex $mlist 2] :/]
  if {[string index $method 0] eq "_"} {
    $class clay set method_ensemble $ensemble $method $body
    return
  }
  set realmethod  [string totitle $ensemble]_${method}
  set realbody {}
  if {$argstyle eq "dictargs"} {
    append realbody "::dictargs::parse \{$argspec\} \$args" \n
  }
  if {[$class clay exists method_ensemble $ensemble _preamble]} {
    append realbody [$class clay get method_ensemble $ensemble _preamble] \n
  }
  append realbody $body
  if {$method eq "default"} {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod \$method {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::define $class method $realmethod [list method [list args $argspec]] $realbody
    } else {
      oo::define $class method $realmethod [list method {*}$argspec] $realbody
    }
  } else {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::define $class method $realmethod [list [list args $argspec]] $realbody
    } else {
      oo::define $class method $realmethod $argspec $realbody
    }
  }
  if {$::clay::trace>2} {
    puts [list $class clay set method_ensemble/ $ensemble [string trim $method :/]  ...]
  }
}

###
# END: ensemble.tcl
###
###
# START: class.tcl
###
::oo::define ::clay::class {
  method clay {submethod args} {
    my variable clay
    if {![info exists clay]} {
      set clay {}
    }
    switch $submethod {
      ancestors {
        tailcall ::clay::ancestors [self]
      }
      branch {
        set path [::clay::tree::storage $args]
        if {![dict exists $clay {*}$path .]} {
          dict set clay {*}$path . {}
        }
      }
      exists {
        if {![info exists clay]} {
          return 0
        }
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return 1
        }
        if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
          return 1
        }
        return 0
      }
      dump {
        return $clay
      }
      dget {
         if {![info exists clay]} {
          return {}
        }
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
          return [dict get $clay {*}[lrange $path 0 end-1] [lindex $path end]:]
        }
        return {}
      }
      is_branch {
        set path [::clay::tree::storage $args]
        return [dict exists $clay {*}$path .]
      }
      getnull -
      get {
        if {![info exists clay]} {
          return {}
        }
        set path [::clay::tree::storage $args]
        if {[llength $path]==0} {
          return $clay
        }
        if {[dict exists $clay {*}$path .]} {
          return [::clay::tree::sanitize [dict get $clay {*}$path]]
        }
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
          return [dict get $clay {*}[lrange $path 0 end-1] [lindex $path end]:]
        }
        return {}
      }
      find {
        set path [::clay::tree::storage $args]
        if {![info exists clay]} {
          set clay {}
        }
        set clayorder [::clay::ancestors [self]]
        set found 0
        if {[llength $path]==0} {
          set result [dict create . {}]
          foreach class $clayorder {
            ::clay::tree::dictmerge result [$class clay dump]
          }
          return [::clay::tree::sanitize $result]
        }
        foreach class $clayorder {
          if {[$class clay exists {*}$path .]} {
            # Found a branch break
            set found 1
            break
          }
          if {[$class clay exists {*}$path]} {
            # Found a leaf. Return that value immediately
            return [$class clay get {*}$path]
          }
          if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
            return [dict get $clay {*}[lrange $path 0 end-1] [lindex $path end]:]
          }
        }
        if {!$found} {
          return {}
        }
        set result {}
        # Leaf searches return one data field at a time
        # Search in our local dict
        # Search in the in our list of classes for an answer
        foreach class [lreverse $clayorder] {
          ::clay::tree::dictmerge result [$class clay dget {*}$path]
        }
        return [::clay::tree::sanitize $result]
      }
      merge {
        foreach arg $args {
          ::clay::tree::dictmerge clay {*}$arg
        }
      }
      noop {
        # Do nothing. Used as a sign of clay savviness
      }
      search {
        foreach aclass [::clay::ancestors [self]] {
          if {[$aclass clay exists {*}$args]} {
            return [$aclass clay get {*}$args]
          }
        }
      }
      set {
        ::clay::tree::dictset clay {*}$args
      }
      unset {
        dict unset clay {*}$args
      }
      default {
        dict $submethod clay {*}$args
      }
    }
  }
}

###
# END: class.tcl
###
###
# START: object.tcl
###
::oo::define ::clay::object {
  method clay {submethod args} {
    my variable clay claycache clayorder config option_canonical
    if {![info exists clay]} {set clay {}}
    if {![info exists claycache]} {set claycache {}}
    if {![info exists config]} {set config {}}
    if {![info exists clayorder] || [llength $clayorder]==0} {
      set clayorder {}
      if {[dict exists $clay cascade]} {
        dict for {f v} [dict get $clay cascade] {
          if {$f eq "."} continue
          if {[info commands $v] ne {}} {
            lappend clayorder $v
          }
        }
      }
      lappend clayorder {*}[::clay::ancestors [info object class [self]] {*}[lreverse [info object mixins [self]]]]
    }
    switch $submethod {
      ancestors {
        return $clayorder
      }
      branch {
        set path [::clay::tree::storage $args]
        if {![dict exists $clay {*}$path .]} {
          dict set clay {*}$path . {}
        }
      }
      busy {
        my variable clay_busy
        if {[llength $args]} {
          set clay_busy [string is true [lindex $args 0]]
          set claycache {}
        }
        if {![info exists clay_busy]} {
          set clay_busy 0
        }
        return $clay_busy
      }
      cache {
        set path [lindex $args 0]
        set value [lindex $args 1]
        dict set claycache $path $value
      }
      cget {
        # Leaf searches return one data field at a time
        # Search in our local dict
        if {[llength $args]==1} {
          set field [string trim [lindex $args 0] -:/]
          if {[info exists option_canonical($field)]} {
            set field $option_canonical($field)
          }
          if {[dict exists $config $field]} {
            return [dict get $config $field]
          }
        }
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[dict exists $claycache {*}$path]} {
          if {[dict exists $claycache {*}$path .]} {
            return [dict remove [dict get $claycache {*}$path] .]
          } else {
            return [dict get $claycache {*}$path]
          }
        }
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          if {[$class clay exists {*}$path]} {
            set value [$class clay get {*}$path]
            dict set claycache {*}$path $value
            return $value
          }
          if {[$class clay exists const {*}$path]} {
            set value [$class clay get const {*}$path]
            dict set claycache {*}$path $value
            return $value
          }
          if {[$class clay exists option {*}$path default]} {
            set value [$class clay get option {*}$path default]
            dict set claycache {*}$path $value
            return $value
          }
        }
        return {}
      }
      delegate {
        if {![dict exists $clay .delegate <class>]} {
          dict set clay .delegate <class> [info object class [self]]
        }
        if {[llength $args]==0} {
          return [dict get $clay .delegate]
        }
        if {[llength $args]==1} {
          set stub <[string trim [lindex $args 0] <>]>
          if {![dict exists $clay .delegate $stub]} {
            return {}
          }
          return [dict get $clay .delegate $stub]
        }
        if {([llength $args] % 2)} {
          error "Usage: delegate
    OR
    delegate stub
    OR
    delegate stub OBJECT ?stub OBJECT? ..."
        }
        foreach {stub object} $args {
          set stub <[string trim $stub <>]>
          dict set clay .delegate $stub $object
          oo::objdefine [self] forward ${stub} $object
          oo::objdefine [self] export ${stub}
        }
      }
      dump {
        # Do a full dump of clay data
        set result {}
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          ::clay::tree::dictmerge result [$class clay dump]
        }
        ::clay::tree::dictmerge result $clay
        return $result
      }
      ensemble_map {
        set path [::clay::tree::storage method_ensemble]
        if {[dict exists $claycache {*}$path]} {
          return [dict get $claycache {*}$path]
        }
        set emap {}
        foreach class $clayorder {
          if {![$class clay exists {*}$path .]} continue
          dict for {ensemble einfo} [$class clay dget {*}$path] {
            if {$ensemble eq "."} continue
            dict for {method body} $einfo {
              if {$method eq "."} continue
              dict set emap $ensemble $method class: $class
              dict set emap $ensemble $method body: $body
            }
          }
        }
        if {[dict exists $clay {*}$path]} {
          dict for {ensemble einfo} [dict get $clay {*}$path] {
            dict for {method body} $einfo {
              if {$method eq "."} continue
              dict set emap $ensemble $method class: $class
              dict set emap $ensemble $method body: $body
            }
          }
        }
        dict set claycache {*}$path $emap
        return $emap
      }
      eval {
        set script [lindex $args 0]
        set buffer {}
        set thisline {}
        foreach line [split $script \n] {
          append thisline $line
          if {![info complete $thisline]} {
            append thisline \n
            continue
          }
          set thisline [string trim $thisline]
          if {[string index $thisline 0] eq "#"} continue
          if {[string length $thisline]==0} continue
          if {[lindex $thisline 0] eq "my"} {
            # Line already calls out "my", accept verbatim
            append buffer $thisline \n
          } elseif {[string range $thisline 0 2] eq "::"} {
            # Fully qualified commands accepted verbatim
            append buffer $thisline \n
          } elseif {
            append buffer "my $thisline" \n
          }
          set thisline {}
        }
        eval $buffer
      }
      evolve -
      initialize {
        my InitializePublic
      }
      exists {
        # Leaf searches return one data field at a time
        # Search in our local dict
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return 1
        }
        # Search in our local cache
        if {[dict exists $claycache {*}$path]} {
          return 2
        }
        set count 2
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          incr count
          if {[$class clay exists {*}$path]} {
            return $count
          }
        }
        return 0
      }
      flush {
        set claycache {}
        set clayorder [::clay::ancestors [info object class [self]] {*}[lreverse [info object mixins [self]]]]
      }
      forward {
        oo::objdefine [self] forward {*}$args
      }
      dget {
        set path [::clay::tree::storage $args]
        if {[llength $path]==0} {
          # Do a full dump of clay data
          set result {}
          # Search in the in our list of classes for an answer
          foreach class $clayorder {
            ::clay::tree::dictmerge result [$class clay dump]
          }
          ::clay::tree::dictmerge result $clay
          return $result
        }
        if {[dict exists $clay {*}$path] && ![dict exists $clay {*}$path .]} {
          # Path is a leaf
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[my clay search $path value isleaf]} {
          return $value
        }

        set found 0
        set branch [dict exists $clay {*}$path .]
        foreach class $clayorder {
          if {[$class clay exists {*}$path .]} {
            set found 1
            break
          }
          if {!$branch && [$class clay exists {*}$path]} {
            set result [$class clay dget {*}$path]
            my clay cache $path $result
            return $result
          }
        }
        # Path is a branch
        set result [dict getnull $clay {*}$path]
        foreach class $clayorder {
          if {![$class clay exists {*}$path .]} continue
          ::clay::tree::dictmerge result [$class clay dget {*}$path]
        }
        #if {[dict exists $clay {*}$path .]} {
        #  ::clay::tree::dictmerge result
        #}
        my clay cache $path $result
        return $result
      }
      getnull -
      get {
        set path [::clay::tree::storage $args]
        if {[llength $path]==0} {
          # Do a full dump of clay data
          set result {}
          # Search in the in our list of classes for an answer
          foreach class $clayorder {
            ::clay::tree::dictmerge result [$class clay dump]
          }
          ::clay::tree::dictmerge result $clay
          return [::clay::tree::sanitize $result]
        }
        if {[dict exists $clay {*}$path] && ![dict exists $clay {*}$path .]} {
          # Path is a leaf
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[my clay search $path value isleaf]} {
          if {!$isleaf} {
            return [clay::tree::sanitize $value]
          } else {
            return $value
          }
        }
        set found 0
        set branch [dict exists $clay {*}$path .]
        foreach class $clayorder {
          if {[$class clay exists {*}$path .]} {
            set found 1
            break
          }
          if {!$branch && [$class clay exists {*}$path]} {
            set result [$class clay dget {*}$path]
            my clay cache $path $result
            return $result
          }
        }
        # Path is a branch
        set result [dict getnull $clay {*}$path]
        #foreach class [lreverse $clayorder] {
        #  if {![$class clay exists {*}$path .]} continue
        #  ::clay::tree::dictmerge result [$class clay dget {*}$path]
        #}
        foreach class $clayorder {
          if {![$class clay exists {*}$path .]} continue
          ::clay::tree::dictmerge result [$class clay dget {*}$path]
        }
        #if {[dict exists $clay {*}$path .]} {
        #  ::clay::tree::dictmerge result [dict get $clay {*}$path]
        #}
        my clay cache $path $result
        return [clay::tree::sanitize $result]
      }
      leaf {
        # Leaf searches return one data field at a time
        # Search in our local dict
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path .]} {
          return [clay::tree::sanitize [dict get $clay {*}$path]]
        }
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[my clay search $path value isleaf]} {
          if {!$isleaf} {
            return [clay::tree::sanitize $value]
          } else {
            return $value
          }
        }
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          if {[$class clay exists {*}$path]} {
            set value [$class clay get {*}$path]
            my clay cache $path $value
            return $value
          }
        }
      }
      merge {
        foreach arg $args {
          ::clay::tree::dictmerge clay {*}$arg
        }
      }
      mixin {
        ###
        # Mix in the class
        ###
        my clay flush
        set prior  [info object mixins [self]]
        set newmixin {}
        foreach item $args {
          lappend newmixin ::[string trimleft $item :]
        }
        set newmap $args
        foreach class $prior {
          if {$class ni $newmixin} {
            set script [$class clay search mixin/ unmap-script]
            if {[string length $script]} {
              if {[catch $script err errdat]} {
                puts stderr "[self] MIXIN ERROR POPPING $class:\n[dict get $errdat -errorinfo]"
              }
            }
          }
        }
        ::oo::objdefine [self] mixin {*}$args
        ###
        # Build a compsite map of all ensembles defined by the object's current
        # class as well as all of the classes being mixed in
        ###
        my InitializePublic
        foreach class $newmixin {
          if {$class ni $prior} {
            set script [$class clay search mixin/ map-script]
            if {[string length $script]} {
              if {[catch $script err errdat]} {
                puts stderr "[self] MIXIN ERROR PUSHING $class:\n[dict get $errdat -errorinfo]"
              }
            }
          }
        }
        foreach class $newmixin {
          set script [$class clay search mixin/ react-script]
          if {[string length $script]} {
            if {[catch $script err errdat]} {
              puts stderr "[self] MIXIN ERROR PEEKING $class:\n[dict get $errdat -errorinfo]"
            }
            break
          }
        }
      }
      mixinmap {
        if {![dict exists $clay .mixin]} {
          dict set clay .mixin {}
        }
        if {[llength $args]==0} {
          return [dict get $clay .mixin]
        } elseif {[llength $args]==1} {
          return [dict getnull $clay .mixin [lindex $args 0]]
        } else {
          dict for {slot classes} $args {
            dict set clay .mixin $slot $classes
          }
          set classlist {}
          dict for {item class} [dict get $clay .mixin] {
            if {$class ne {}} {
              lappend classlist $class
            }
          }
          my clay mixin {*}[lreverse $classlist]
        }
      }
      provenance {
        if {[dict exists $clay {*}$args]} {
          return self
        }
        foreach class $clayorder {
          if {[$class clay exists {*}$args]} {
            return $class
          }
        }
        return {}
      }
      refcount {
        my variable refcount
        if {![info exists refcount]} {
          return 0
        }
        return $refcount
      }
      refcount_incr {
        my variable refcount
        incr refcount
      }
      refcount_decr {
        my variable refcount
        incr refcount -1
        if {$refcount <= 0} {
          ::clay::object_destroy [self]
        }
      }
      replace {
        set clay [lindex $args 0]
      }
      search {
        set path [lindex $args 0]
        upvar 1 [lindex $args 1] value [lindex $args 2] isleaf
        set isleaf [expr {![dict exists $claycache $path .]}]
        if {[dict exists $claycache $path]} {
          set value [dict get $claycache $path]
          return 1
        }
        return 0
      }
      source {
        source [lindex $args 0]
      }
      set {
        #puts [list [self] clay SET {*}$args]
        ::clay::tree::dictset clay {*}$args
      }
      default {
        dict $submethod clay {*}$args
      }
    }
  }
  method InitializePublic {} {
    my variable clayorder clay claycache config option_canonical clay_busy
    if {[info exists clay_busy] && $clay_busy} {
      # Avoid repeated calls to InitializePublic if we know that someone is
      # going to invoke it at the end of whatever process is going on
      return
    }
    set claycache {}
    set clayorder [::clay::ancestors [info object class [self]] {*}[lreverse [info object mixins [self]]]]
    if {![info exists clay]} {
      set clay {}
    }
    if {![info exists config]} {
      set config {}
    }
    dict for {var value} [my clay get variable] {
      if { $var in {. clay} } continue
      set var [string trim $var :/]
      my variable $var
      if {![info exists $var]} {
        if {$::clay::trace>2} {puts [list initialize variable $var $value]}
        set $var $value
      }
    }
    dict for {var value} [my clay get dict/] {
      if { $var in {. clay} } continue
      set var [string trim $var :/]
      my variable $var
      if {![info exists $var]} {
        set $var {}
      }
      foreach {f v} $value {
        if {$f eq "."} continue
        if {![dict exists ${var} $f]} {
          if {$::clay::trace>2} {puts [list initialize dict $var $f $v]}
          dict set ${var} $f $v
        }
      }
    }
    foreach {var value} [my clay get array/] {
      if { $var in {. clay} } continue
      set var [string trim $var :/]
      if { $var eq {clay} } continue
      my variable $var
      if {![info exists $var]} { array set $var {} }
      foreach {f v} $value {
        if {![array exists ${var}($f)]} {
          if {$f eq "."} continue
          if {$::clay::trace>2} {puts [list initialize array $var\($f\) $v]}
          set ${var}($f) $v
        }
      }
    }
    foreach {field info} [my clay get option/] {
      if { $field in {. clay} } continue
      set field [string trim $field -/:]
      foreach alias [dict getnull $info aliases] {
        set option_canonical($alias) $field
      }
      if {[dict exists $config $field]} continue
      set getcmd [dict getnull $info default-command]
      if {$getcmd ne {}} {
        set value [{*}[string map [list %field% $field %self% [namespace which my]] $getcmd]]
      } else {
        set value [dict getnull $info default]
      }
      dict set config $field $value
      set setcmd [dict getnull $info set-command]
      if {$setcmd ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $value] %self% [namespace which my]] $setcmd]
      }
    }

    foreach {ensemble einfo} [my clay ensemble_map] {
      #if {[dict exists $einfo _body]} continue
      if {$ensemble eq "."} continue
      set body [::clay::ensemble_methodbody $ensemble $einfo]
      if {$::clay::trace>2} {
        set rawbody $body
        set body {puts [list [self] <object> [self method]]}
        append body \n $rawbody
      }
      oo::objdefine [self] method $ensemble {{method default} args} $body
    }
  }
}
::clay::object clay branch array
::clay::object clay branch mixin
::clay::object clay branch option
::clay::object clay branch dict clay
::clay::object clay set variable DestroyEvent 0

###
# END: object.tcl
###
###
# START: event.tcl
###
if {[info commands ::cron::object_destroy] eq {}} {
  # Provide a noop if we aren't running with the cron scheduler
  namespace eval ::cron {}
  proc ::cron::object_destroy args {}
}
::namespace eval ::clay::event {
}
proc ::clay::cleanup {} {
  if {![info exists ::clay::idle_destroy]} return
  foreach obj $::clay::idle_destroy {
    if {[info commands $obj] ne {}} {
      catch {$obj destroy}
    }
  }
  set ::clay::idle_destroy {}
}
proc ::clay::object_create {objname {class {}}} {
  #if {$::clay::trace>0} {
  #  puts [list $objname CREATE]
  #}
}
proc ::clay::object_rename {object newname} {
  if {$::clay::trace>0} {
    puts [list $object RENAME -> $newname]
  }
}
proc ::clay::object_destroy args {
  if {![info exists ::clay::idle_destroy]} {
    set ::clay::idle_destroy {}
  }
  foreach objname $args {
    if {$::clay::trace>0} {
      puts [list $objname DESTROY]
    }
    ::cron::object_destroy $objname
    if {$objname in $::clay::idle_destroy} continue
    lappend ::clay::idle_destroy $objname
  }
}
proc ::clay::event::cancel {self {task *}} {
  variable timer_event
  variable timer_script

  foreach {id event} [array get timer_event $self:$task] {
    ::after cancel $event
    set timer_event($id) {}
    set timer_script($id) {}
  }
}
proc ::clay::event::generate {self event args} {
  set wholist [Notification_list $self $event]
  if {$wholist eq {}} return
  set dictargs [::oo::meta::args_to_options {*}$args]
  set info $dictargs
  set strict 0
  set debug 0
  set sender $self
  dict with dictargs {}
  dict set info id     [::clay::event::nextid]
  dict set info origin $self
  dict set info sender $sender
  dict set info rcpt   {}
  foreach who $wholist {
    catch {::clay::event::notify $who $self $event $info}
  }
}
proc ::clay::event::nextid {} {
  return "event#[format %0.8x [incr ::clay::event_count]]"
}
proc ::clay::event::Notification_list {self event {stackvar {}}} {
  set notify_list {}
  foreach {obj patternlist} [array get ::clay::object_subscribe] {
    if {$obj eq $self} continue
    if {$obj in $notify_list} continue
    set match 0
    foreach {objpat eventlist} $patternlist {
      if {![string match $objpat $self]} continue
      foreach eventpat $eventlist {
        if {![string match $eventpat $event]} continue
        set match 1
        break
      }
      if {$match} {
        break
      }
    }
    if {$match} {
      lappend notify_list $obj
    }
  }
  return $notify_list
}
proc ::clay::event::notify {rcpt sender event eventinfo} {
  if {[info commands $rcpt] eq {}} return
  if {$::clay::trace} {
    puts [list event notify rcpt $rcpt sender $sender event $event info $eventinfo]
  }
  $rcpt notify $event $sender $eventinfo
}
proc ::clay::event::process {self handle script} {
  variable timer_event
  variable timer_script

  array unset timer_event $self:$handle
  array unset timer_script $self:$handle

  set err [catch {uplevel #0 $script} result errdat]
  if $err {
    puts "BGError: $self $handle $script
ERR: $result
[dict get $errdat -errorinfo]
***"
  }
}
proc ::clay::event::schedule {self handle interval script} {
  variable timer_event
  variable timer_script
  if {$::clay::trace} {
    puts [list $self schedule $handle $interval]
  }
  if {[info exists timer_event($self:$handle)]} {
    if {$script eq $timer_script($self:$handle)} {
      return
    }
    ::after cancel $timer_event($self:$handle)
  }
  set timer_script($self:$handle) $script
  set timer_event($self:$handle) [::after $interval [list ::clay::event::process $self $handle $script]]
}
proc ::clay::event::subscribe {self who event} {
  upvar #0 ::clay::object_subscribe($self) subscriptions
  if {![info exists subscriptions]} {
    set subscriptions {}
  }
  set match 0
  foreach {objpat eventlist} $subscriptions {
    if {![string match $objpat $who]} continue
    foreach eventpat $eventlist {
      if {[string match $eventpat $event]} {
        # This rule already exists
        return
      }
    }
  }
  dict lappend subscriptions $who $event
}
proc ::clay::event::unsubscribe {self args} {
  upvar #0 ::clay::object_subscribe($self) subscriptions
  if {![info exists subscriptions]} {
    return
  }
  switch [llength $args] {
    1 {
      set event [lindex $args 0]
      if {$event eq "*"} {
        # Shortcut, if the
        set subscriptions {}
      } else {
        set newlist {}
        foreach {objpat eventlist} $subscriptions {
          foreach eventpat $eventlist {
            if {[string match $event $eventpat]} continue
            dict lappend newlist $objpat $eventpat
          }
        }
        set subscriptions $newlist
      }
    }
    2 {
      set who [lindex $args 0]
      set event [lindex $args 1]
      if {$who eq "*" && $event eq "*"} {
        set subscriptions {}
      } else {
        set newlist {}
        foreach {objpat eventlist} $subscriptions {
          if {[string match $who $objpat]} {
            foreach eventpat $eventlist {
              if {[string match $event $eventpat]} continue
              dict lappend newlist $objpat $eventpat
            }
          }
        }
        set subscriptions $newlist
      }
    }
  }
}

###
# END: event.tcl
###
###
# START: singleton.tcl
###
proc ::clay::singleton {name script} {
  if {[info commands $name] eq {}} {
    ::clay::object create $name
  }
  oo::objdefine $name {
method SingletonProcs {} {
proc class class {
  uplevel 1 "oo::objdefine \[self\] class $class"
  my clay delegate class $class
}
proc clay args {
  my clay {*}$args
}
proc Ensemble {rawmethod args} {
  if {[llength $args]==2} {
    lassign $args argspec body
    set argstyle tcl
  } elseif {[llength $args]==3} {
    lassign $args argstyle argspec body
  } else {
    error "Usage: Ensemble name ?argstyle? argspec body"
  }
  set class [uplevel 1 self]
  #if {$::clay::trace>2} {
  #  puts [list $class Ensemble $rawmethod $argspec $body]
  #}
  set mlist [split $rawmethod "::"]
  set ensemble [string trim [lindex $mlist 0] :/]
  set method   [string trim [lindex $mlist 2] :/]
  if {[string index $method 0] eq "_"} {
    $class clay set method_ensemble $ensemble $method $body
    return
  }
  set realmethod  [string totitle $ensemble]_${method}
  set realbody {}
  if {$argstyle eq "dictargs"} {
    append realbody "::dictargs::parse \{$argspec\} \$args" \n
  }
  if {[$class clay exists method_ensemble $ensemble _preamble]} {
    append realbody [$class clay get method_ensemble $ensemble _preamble] \n
  }
  append realbody $body
  if {$method eq "default"} {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod \$method {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::objdefine $class method $realmethod [list method [list args $argspec]] $realbody
    } else {
      oo::objdefine $class method $realmethod [list method {*}$argspec] $realbody
    }
  } else {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::objdefine $class method $realmethod [list [list args $argspec]] $realbody
    } else {
      oo::objdefine $class method $realmethod $argspec $realbody
    }
  }
  if {$::clay::trace>2} {
    puts [list $class clay set method_ensemble/ $ensemble [string trim $method :/]  ...]
  }
}
proc method args {
  uplevel 1 "oo::objdefine \[self\] method {*}$args"
}
}
method script script {
  my clay busy 1
  my SingletonProcs
  eval $script
  my clay busy 0
  my InitializePublic
}
}
  $name script $script
  return $name
}

###
# END: singleton.tcl
###

namespace eval ::clay {
  namespace export *
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/clay/clay.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279

namespace eval ::oo::dialect {}
set ::oo::dialect::has(tip470) 0

# clay.test - Copyright (c) 2018 Sean Woods
# -------------------------------------------------------------------------

set MODDIR [file dirname [file dirname [file join [pwd] [info script]]]]
if {[file exists [file join $MODDIR devtools testutilities.tcl]]} {
  # Running inside tcllib
  set TCLLIBMOD $MODDIR
} else {
  set TCLLIBMOD [file join $MODDIR .. .. tcllib modules]
}
source [file join $TCLLIBMOD devtools testutilities.tcl]

testsNeedTcl     8.6
testsNeedTcltest 2
testsNeed        TclOO 1

support {}
testing {
    useLocal clay.tcl clay
}


set ::clay::trace 0



# -------------------------------------------------------------------------
# Handle multiple implementation testing
#

array set preserve [array get ::clay::uuid::accel]

proc implementations {} {
    variable ::clay::uuid::accel
    foreach {a v} [array get accel] {if {$v} {lappend r $a}}
    lappend r tcl; set r
}

proc select_implementation {impl} {
    variable ::clay::uuid::accel
    foreach e [array names accel] { set accel($e) 0 }
    if {[string compare "tcl" $impl] != 0} {
        set accel($impl) 1
    }
}

proc reset_implementation {} {
    variable ::clay::uuid::accel
    array set accel [array get ::preserve]
}

# -------------------------------------------------------------------------
# Setup any constraints
#

# -------------------------------------------------------------------------
# Now the package specific tests....
# -------------------------------------------------------------------------

# -------------------------------------------------------------------------

foreach impl [implementations] {
    select_implementation $impl

    test uuid-1.0-$impl "uuid requires args" {
        list [catch {clay::uuid} msg]
    } {1}

    test uuid-1.1-$impl "uuid generate should create a 36 char string uuid" {
        list [catch {string length [clay::uuid generate]} msg] $msg
    } {0 36}

    test uuid-1.2-$impl "uuid comparison of uuid with self should be true" {
        list [catch {
            set a [clay::uuid generate]
            clay::uuid equal $a $a
        } msg] $msg
    } {0 1}

    test uuid-1.3-$impl "uuid comparison of two different uuids should be false" {
        list [catch {
            set a [clay::uuid generate]
            set b [clay::uuid generate]
            clay::uuid equal $a $b
        } msg] $msg
    } {0 0}

    reset_implementation
}


# Modification History:
###
# Modification 2018-10-30
# Fixed an error in our ancestry mapping and developed tests to
# ensure we are actually following in the order TclOO follows methods
###
# Modification 2018-10-21
# The clay metaclass no longer exports the clay method
# to oo::class and oo::object, and clay::ancestors no
# longer returns any class that lacks the clay method
###
# Modification 2018-10-10
# clay::ancestors now rigged to descend into all classes depth-first
# and then place metaclasses at the end of the search
###
# -------------------------------------------------------------------------

# -------------------------------------------------------------------------
# Test Helpers
###
proc dict_compare {a b} {
  set result {}
  set A {}
  dict for {f v} $a {
    set f [string trim $f :/]
    if {$f eq {.}} continue
    dict set A $f $v
  }
  set B {}
  dict for {f v} $b {
    set f [string trim $f :/]
    if {$f eq {.}} continue
    dict set B $f $v
  }
  dict for {f v} $A {
    if {[dict exists $B $f]} {
      if {[dict get $B $f] ne $v} {
        lappend result [list B $f [dict get $B $f] [list != $v]]
      }
    } else {
      lappend result [list B $f $v missing]
    }
  }
  dict for {f v} $B {
    if {![dict exists $A $f]} {
      lappend result [list A $f $v missing]
    }
  }
  return $result
}

test dict-compare-001 {Test our testing method} {
  dict_compare {} {}
} {}

test dict-compare-002 {Test our testing method} {
  dict_compare {a 1} {}
} {{B a 1 missing}}

test dict-compare-003 {Test our testing method} {
  dict_compare {a 1 b 2} {a 1 b 2}
} {}

test dict-compare-003.a {Test our testing method} {
  dict_compare {a 1 b 2} {b 2 a 1 }
} {}

test dict-compare-003.b {Test our testing method} {
  dict_compare {b 2 a 1} {a 1 b 2}
} {}


test dict-compare-004 {Test our testing method} {
  dict_compare {a: 1 b: 2} {a 1 b 2}
} {}

test dict-compare-005 {Test our testing method} {
  dict_compare {a 1 b 3} {a 1 b 2}
} {{B b 2 {!= 3}}}


###
# Test canonical mapping
###


test {test-storage-0001} {Test ::clay::tree::storage with foo bar baz} {
  clay::tree::storage {foo bar baz}
} {foo bar baz}


test {test-storage-0002} {Test ::clay::tree::storage with foo bar baz/} {
  clay::tree::storage {foo bar baz/}
} {foo bar baz}


test {test-storage-0003} {Test ::clay::tree::storage with foo bar .} {
  clay::tree::storage {foo bar .}
} {foo bar .}


test {test-storage-0004} {Test ::clay::tree::storage with foo/ bar/ .} {
  clay::tree::storage {foo/ bar/ .}
} {foo bar .}


test {test-storage-0005} {Test ::clay::tree::storage with foo . bar . baz .} {
  clay::tree::storage {foo . bar . baz .}
} {foo . bar . baz .}


test {test-storage-0006} {Test ::clay::tree::storage with foo bar baz bat:} {
  clay::tree::storage {foo bar baz bat:}
} {foo bar baz bat:}


test {test-storage-0007} {Test ::clay::tree::storage with foo:} {
  clay::tree::storage {foo:}
} {foo:}


test {test-storage-0008} {Test ::clay::tree::storage with foo/bar/baz/bat:} {
  clay::tree::storage {foo/bar/baz/bat:}
} {foo bar baz bat:}


dict set r foo/ bar/ baz 1
dict set s foo/ bar/ baz 0
set t [clay::tree::merge $r $s]

test rmerge-0001 {Test that the root is marked as a branch} {
  dict get $t foo bar baz
} 0

set r [dict create]
clay::tree::dictmerge r {
  foo/ {
    bar/ {
      baz 1
      bing: 2
      bang { bim 3 boom 4 }
      womp: {a 1 b 2}
    }
  }
}

test dictmerge-0001 {Test that the root is marked as a branch} {
  dict exists $r .
} 1
test dictmerge-0002 {Test that branch foo is marked correctly} {
  dict exists $r foo .
} 1
test dictmerge-0003 {Test that branch bar is marked correctly} {
  dict exists $r foo bar .
} 1
test dictmerge-0004 {Test that leaf foo/bar/bang is not marked as branch despite being a dict} {
  dict exists $r foo bar bang .
} 0
test dictmerge-0004 {Test that leaf foo/bar/bang/bim exists} {
  dict exists $r foo bar bang bim
} 1
test dictmerge-0005 {Test that leaf foo/bar/bang/boom exists} {
  dict exists $r foo bar bang boom
} 1

###
# Replace bang with bang/
###
clay::tree::dictmerge r {
  foo/ {
    bar/ {
      bang/ {
        whoop 1
      }
    }
  }
}

test dictmerge-0006 {Test that leaf foo/bar/bang/bim ceases to exist} {
  dict exists $r foo bar bang bim
} 0
test dictmerge-0007 {Test that leaf foo/bar/bang/boom exists} {
  dict exists $r foo bar bang boom
} 0

test dictmerge-0008 {Test that leaf foo/bar/bang is now a branch} {
  dict exists $r foo bar bang .
} 1

test branch-0001 {Test that foo/ is a branch} {
  clay::tree::is_branch $r foo/
} 1
test branch-0002 {Test that foo is a branch} {
  clay::tree::is_branch $r foo
} 1
test branch-0003 {Test that foo/bar/ is a branch} {
  clay::tree::is_branch $r {foo/ bar/}
} 1
test branch-0004 {Test that foo bar is not branch} {
  clay::tree::is_branch $r {foo bar}
} 1
test branch-0004 {Test that foo/ bar is not branch} {
  clay::tree::is_branch $r {foo/ bar}
} 0


test {test-branch-0001} {Test that  foo is_branch = 1} {
  clay::tree::is_branch $r { foo}
} 1


test {test-branch-0002} {Test that  foo: is_branch = 0} {
  clay::tree::is_branch $r { foo:}
} 0


test {test-branch-0003} {Test that  foo/ is_branch = 1} {
  clay::tree::is_branch $r { foo/}
} 1


test {test-branch-0004} {Test that  .foo is_branch = 0} {
  clay::tree::is_branch $r { .foo}
} 0


test {test-branch-0005} {Test that foo bar is_branch = 1} {
  clay::tree::is_branch $r {foo bar}
} 1


test {test-branch-0006} {Test that foo bar: is_branch = 0} {
  clay::tree::is_branch $r {foo bar:}
} 0


test {test-branch-0007} {Test that foo bar/ is_branch = 1} {
  clay::tree::is_branch $r {foo bar/}
} 1


test {test-branch-0008} {Test that foo .bar is_branch = 0} {
  clay::tree::is_branch $r {foo .bar}
} 0


test {test-branch-0009} {Test that foo bar baz is_branch = 0} {
  clay::tree::is_branch $r {foo bar baz}
} 0


test {test-branch-0010} {Test that foo bar baz: is_branch = 0} {
  clay::tree::is_branch $r {foo bar baz:}
} 0


test {test-branch-0011} {Test that foo bar baz/ is_branch = 1} {
  clay::tree::is_branch $r {foo bar baz/}
} 1


test {test-branch-0012} {Test that foo bar .baz is_branch = 0} {
  clay::tree::is_branch $r {foo bar .baz}
} 0


test {test-branch-0013} {Test that foo bar bing is_branch = 0} {
  clay::tree::is_branch $r {foo bar bing}
} 0


test {test-branch-0014} {Test that foo bar bing: is_branch = 0} {
  clay::tree::is_branch $r {foo bar bing:}
} 0


test {test-branch-0015} {Test that foo bar bing/ is_branch = 1} {
  clay::tree::is_branch $r {foo bar bing/}
} 1


test {test-branch-0016} {Test that foo bar .bing is_branch = 0} {
  clay::tree::is_branch $r {foo bar .bing}
} 0


test {test-branch-0017} {Test that foo bar bang is_branch = 1} {
  clay::tree::is_branch $r {foo bar bang}
} 1


test {test-branch-0018} {Test that foo bar bang: is_branch = 0} {
  clay::tree::is_branch $r {foo bar bang:}
} 0


test {test-branch-0019} {Test that foo bar bang/ is_branch = 1} {
  clay::tree::is_branch $r {foo bar bang/}
} 1


test {test-branch-0020} {Test that foo bar .bang is_branch = 0} {
  clay::tree::is_branch $r {foo bar .bang}
} 0


test {test-branch-0021} {Test that foo bar bang whoop is_branch = 0} {
  clay::tree::is_branch $r {foo bar bang whoop}
} 0


test {test-branch-0022} {Test that foo bar bang whoop: is_branch = 0} {
  clay::tree::is_branch $r {foo bar bang whoop:}
} 0


test {test-branch-0023} {Test that foo bar bang whoop/ is_branch = 1} {
  clay::tree::is_branch $r {foo bar bang whoop/}
} 1


test {test-branch-0024} {Test that foo bar bang .whoop is_branch = 0} {
  clay::tree::is_branch $r {foo bar bang .whoop}
} 0


# -------------------------------------------------------------------------
# dictmerge Testing - oometa
unset -nocomplain foo
clay::tree::dictmerge foo {
  option/ {
    color/ {
      label Color
      default green
    }
  }
}
clay::tree::dictmerge foo {
  option/ {
    color/ {
      default purple
    }
  }
}

test oometa-0001 {Invoking dictmerge with empty args on a non existent variable create an empty variable} {
  dict get $foo option color default
} purple
test oometa-0002 {Invoking dictmerge with empty args on a non existent variable create an empty variable} {
  dict get $foo option color label
} Color

unset -nocomplain foo
set foo {. {}}
::clay::tree::dictmerge foo {. {} color {. {} default green label Color}}
::clay::tree::dictmerge foo {. {} color {. {} default purple}}
test oometa-0003 {Recursive merge problem from oometa/clay find} {
  dict get $foo color default
} purple
test oometa-0004 {Recursive merge problem from oometa/clay find} {
  dict get $foo color label
} Color

unset -nocomplain foo
set foo {. {}}
::clay::tree::dictmerge foo {. {} color {. {} default purple}}
::clay::tree::dictmerge foo {. {} color {. {} default green label Color}}
test oometa-0005 {Recursive merge problem from oometa/clay find} {
  dict get $foo color default
} green
test oometa-0006 {Recursive merge problem from oometa/clay find} {
  dict get $foo color label
} Color

test oometa-0008 {Un-Sanitized output} {
  set foo
} {. {} color {. {} default green label Color}}

test oometa-0009 {Sanitize} {
  clay::tree::sanitize $foo
} {color {default green label Color}}


# -------------------------------------------------------------------------
# dictmerge Testing - clay
unset -nocomplain foo
test clay-0001 {Invoking dictmerge with empty args on a non existent variable create an empty variable} {
  ::clay::tree::dictmerge foo
  set foo
} {. {}}

unset -nocomplain foo
::clay::tree::dictset foo bar/ baz/ bell bang

test clay-0002 {For new entries dictmerge is essentially a set} {
  dict get $foo bar baz bell
} {bang}
::clay::tree::dictset foo bar/ baz/ boom/ bang
test clay-0003 {For entries that do exist a zipper merge is performed} {
  dict get $foo bar baz bell
} {bang}
test clay-0004 {For entries that do exist a zipper merge is performed} {
  dict get $foo bar baz boom
} {bang}

::clay::tree::dictset foo bar/ baz/ bop {color green flavor strawberry}

test clay-0005 {Leaves are replaced even if they look like a dict} {
  dict get $foo bar baz bop
} {color green flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bop {color yellow}
test clay-0006 {Leaves are replaced even if they look like a dict} {
  dict get $foo bar baz bop
} {color yellow}

::clay::tree::dictset foo bar/ baz/ bang/ {color green flavor strawberry}
test clay-0007a {Branches are merged} {
  dict get $foo bar baz bang
} {. {} color green flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bang/ color yellow
test clay-0007b {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color yellow flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bang/ {color blue}
test clay-0007c {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color blue flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bang/ shape: {Sort of round}
test clay-0007d {Branches are merged} {
  dict get $foo bar baz bang
} {. {} color blue flavor strawberry shape: {Sort of round}}

::clay::tree::dictset foo bar/ baz/ bang/ color yellow
test clay-0007e {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color yellow flavor strawberry shape: {Sort of round}}

::clay::tree::dictset foo bar/ baz/ bang/ {color blue}
test clay-0007f {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color blue flavor strawberry shape: {Sort of round}}

::clay::tree::dictset foo dict my_var 10
::clay::tree::dictset foo dict my_other_var 9

test clay-0007g {Branches are merged}  {
  dict get $foo dict
} {. {} my_var 10 my_other_var 9}

::clay::tree::dictset foo dict/ my_other_other_var 8
test clay-0007h {Branches are merged}  {
  dict get $foo dict
} {. {} my_var 10 my_other_var 9 my_other_other_var 8}


::clay::tree::dictmerge foo {option/ {color {type color} flavor {sense taste}}}
::clay::tree::dictmerge foo {option/ {format {default ascii}}}

test clay-0008 {Whole dicts are merged}  {
  dict get $foo option color
} {type color}
test clay-0009 {Whole dicts are merged}  {
  dict get $foo option flavor
} {sense taste}
test clay-0010 {Whole dicts are merged}  {
  dict get $foo option format
} {default ascii}

###
# Tests for the httpd module
###
test clay-0010 {Test that leaves are merged properly}
set bar {}
::clay::tree::dictmerge bar {
   proxy/ {port 10101 host myhost.localhost}
}
::clay::tree::dictmerge bar {
   mimetxt {Host: localhost
Content_Type: text/plain
Content-Length: 15
}
   http {HTTP_HOST {} CONTENT_LENGTH 15 HOST localhost CONTENT_TYPE text/plain UUID 3a7b4cdc-28d7-49b7-b18d-9d7d18382b9e REMOTE_ADDR 127.0.0.1 REMOTE_HOST 127.0.0.1 REQUEST_METHOD POST REQUEST_URI /echo REQUEST_PATH echo REQUEST_VERSION 1.0 DOCUMENT_ROOT {} QUERY_STRING {} REQUEST_RAW {POST /echo HTTP/1.0} SERVER_PORT 10001 SERVER_NAME 127.0.0.1 SERVER_PROTOCOL HTTP/1.1 SERVER_SOFTWARE {TclHttpd 4.2.0} LOCALHOST 0} UUID 3a7b4cdc-28d7-49b7-b18d-9d7d18382b9e uriinfo {fragment {} port {} path echo scheme http host {} query {} pbare 0 pwd {} user {}}
   mixin {reply ::test::content.echo}
   prefix /echo
   proxy_port 10010
   proxy/ {host localhost}
}

test clay-0011 {Whole dicts are merged}  {
  dict get $bar proxy_port
} {10010}

test clay-0012 {Whole dicts are merged}  {
  dict get $bar http CONTENT_LENGTH
} 15
test clay-0013 {Whole dicts are merged}  {
  dict get $bar proxy host
} localhost
test clay-0014 {Whole dicts are merged}  {
  dict get $bar proxy port
} 10101


###
# Dialect Testing
###
::clay::dialect::create ::alpha

proc ::alpha::define::is_alpha {} {
  dict set ::testinfo([current_class]) is_alpha 1
}

::alpha::define ::alpha::object {
  is_alpha
}

::clay::dialect::create ::bravo ::alpha

proc ::bravo::define::is_bravo {} {
  dict set ::testinfo([current_class]) is_bravo 1
}

::bravo::define ::bravo::object {
  is_bravo
}

::clay::dialect::create ::charlie ::bravo

proc ::charlie::define::is_charlie {} {
  dict set ::testinfo([current_class]) is_charlie 1
}

::charlie::define ::charlie::object {
  is_charlie
}

::clay::dialect::create ::delta ::charlie

proc ::delta::define::is_delta {} {
  dict set ::testinfo([current_class]) is_delta 1
}

::delta::define ::delta::object {
  is_delta
}

::delta::class create adam {
  is_alpha
  is_bravo
  is_charlie
  is_delta
}

test oodialect-keyword-001 {Testing keyword application} {
  set ::testinfo(::adam)
} {is_alpha 1 is_bravo 1 is_charlie 1 is_delta 1}

test oodialect-keyword-002 {Testing keyword application} {
  set ::testinfo(::alpha::object)
} {is_alpha 1}

test oodialect-keyword-003 {Testing keyword application} {
  set ::testinfo(::bravo::object)
} {is_bravo 1}

test oodialect-keyword-004 {Testing keyword application} {
  set ::testinfo(::charlie::object)
} {is_charlie 1}

test oodialect-keyword-005 {Testing keyword application} {
  set ::testinfo(::delta::object)
} {is_delta 1}

###
# Declare an object from a namespace
###
namespace eval ::test1 {
  ::alpha::class create a {
    aliases A
    is_alpha
  }
  ::alpha::define b {
    aliases B BEE
    is_alpha
  }
  ::alpha::class create ::c {
    aliases C
    is_alpha
  }
  ::alpha::define ::d {
    aliases D
    is_alpha
  }
}

test oodialect-naming-001 {Testing keyword application} {
  set ::testinfo(::test1::a)
} {is_alpha 1}

test oodialect-naming-002 {Testing keyword application} {
  set ::testinfo(::test1::b)
} {is_alpha 1}

test oodialect-naming-003 {Testing keyword application} {
  set ::testinfo(::c)
} {is_alpha 1}

test oodialect-naming-004 {Testing keyword application} {
  set ::testinfo(::d)
} {is_alpha 1}

test oodialect-aliasing-001 {Testing keyword application} {
namespace eval ::test1 {
    ::alpha::define e {
       superclass A
    }
}
} ::test1::e

test oodialect-aliasing-002 {Testing keyword application} {
namespace eval ::test1 {
    ::bravo::define f {
       superclass A
    }
}
} ::test1::f


test oodialect-aliasing-003 {Testing aliase method on class} {
  ::test1::a aliases
} {::test1::A}

###
# Test modified 2018-10-21
###
test oodialect-ancestry-003 {Testing heritage} {
  ::clay::ancestors ::test1::f
} {}

###
# Test modified 2018-10-21
###
test oodialect-ancestry-004 {Testing heritage} {
  ::clay::ancestors ::alpha::object
} {}

###
# Test modified 2018-10-21
###
test oodialect-ancestry-005 {Testing heritage} {
  ::clay::ancestors ::delta::object
} {}



# -------------------------------------------------------------------------
# clay submodule testing
# -------------------------------------------------------------------------



# Test canonical path building
set path {const/ foo/ bar/ baz/}


test oo-clay-path-0001 "Test path: const foo bar baz" {
  ::clay::path const foo bar baz
} $path


test oo-clay-path-0002 "Test path: const/ foo/ bar/ baz" {
  ::clay::path const/ foo/ bar/ baz
} $path


test oo-clay-path-0003 "Test path: const/foo/bar/baz" {
  ::clay::path const/foo/bar/baz
} $path


test oo-clay-path-0004 "Test path: const/foo bar/baz" {
  ::clay::path const/foo bar/baz
} $path


test oo-clay-path-0005 "Test path: const/foo/bar baz" {
  ::clay::path const/foo/bar baz
} $path


test oo-clay-path-0006 "Test path: const foo/bar/baz" {
  ::clay::path const foo/bar/baz
} $path


test oo-clay-path-0007 "Test path: const foo bar/baz" {
  ::clay::path const foo bar/baz
} $path


test oo-clay-path-0008 "Test path: const/foo bar baz" {
  ::clay::path const/foo bar baz
} $path

set path {const/ foo/ bar/ baz/ bing}

test oo-clay-leaf-0001 "Test leaf: const foo bar baz bing" {
  ::clay::leaf const foo bar baz bing
} $path


test oo-clay-leaf-0002 "Test leaf: const/ foo/ bar/ baz/ bing" {
  ::clay::leaf const/ foo/ bar/ baz/ bing
} $path


test oo-clay-leaf-0003 "Test leaf: const/foo/bar/baz/bing" {
  ::clay::leaf const/foo/bar/baz/bing
} $path


test oo-clay-leaf-0004 "Test leaf: const/foo bar/baz/bing:" {
  ::clay::leaf const/foo bar/baz/bing:
} $path


test oo-clay-leaf-0005 "Test leaf: const/foo/bar baz bing" {
  ::clay::leaf const/foo/bar baz bing
} $path


test oo-clay-leaf-0006 "Test leaf: const/foo/bar baz bing:" {
  ::clay::leaf const/foo/bar baz bing:
} $path


test oo-clay-leaf-0007 "Test leaf: const foo/bar/baz/bing" {
  ::clay::leaf const foo/bar/baz/bing
} $path


test oo-clay-leaf-0008 "Test leaf: const foo bar/baz/bing" {
  ::clay::leaf const foo bar/baz/bing
} $path


test oo-clay-leaf-0009 "Test leaf: const/foo bar baz bing" {
  ::clay::leaf const/foo bar baz bing
} $path

namespace eval ::foo {}

clay::define ::foo::classa {

  clay set const color  blue
  clay set const/flavor strawberry
  clay set {const/ sound} zoink
  clay set info/ {
    animal no
    building no
    subelement {pedantic yes}
  }

  # Provide a method that returns a constant so we can compare clay's inheritance to
  # TclOO
  method color {} {
    return blue
  }
  method flavor {} {
    return strawberry
  }
  method sound {} {
    return zoink
  }

}


test oo-class-clay-method-0001 "Test ::foo::classa const/ color exists" {
  ::foo::classa clay exists const/ color
} 1


test oo-class-clay-method-0001 "Test ::foo::classa const/ color value" {
  ::foo::classa clay get const/ color
} {blue}


test oo-class-clay-method-0003 "Test ::foo::classa const/ flavor exists" {
  ::foo::classa clay exists const/ flavor
} 1


test oo-class-clay-method-0003 "Test ::foo::classa const/ flavor value" {
  ::foo::classa clay get const/ flavor
} {strawberry}


test oo-class-clay-method-0005 "Test ::foo::classa const/ sound exists" {
  ::foo::classa clay exists const/ sound
} 1


test oo-class-clay-method-0005 "Test ::foo::classa const/ sound value" {
  ::foo::classa clay get const/ sound
} {zoink}


test oo-class-clay-method-0007 "Test ::foo::classa info/ animal exists" {
  ::foo::classa clay exists info/ animal
} 1


test oo-class-clay-method-0007 "Test ::foo::classa info/ animal value" {
  ::foo::classa clay get info/ animal
} {no}


test oo-class-clay-method-0009 "Test ::foo::classa info/ building exists" {
  ::foo::classa clay exists info/ building
} 1


test oo-class-clay-method-0009 "Test ::foo::classa info/ building value" {
  ::foo::classa clay get info/ building
} {no}


test oo-class-clay-method-0011 "Test ::foo::classa info/ subelement exists" {
  ::foo::classa clay exists info/ subelement
} 1


test oo-class-clay-method-0011 "Test ::foo::classa info/ subelement value" {
  ::foo::classa clay get info/ subelement
} {pedantic yes}


clay::define ::foo::classb {
  clay set const/ color black
  method color {} {return black}
  clay set const/ flavor vanilla
  method flavor {} {return vanilla}
  clay set const/ feeling dread
  method feeling {} {return dread}
  clay set info/ subelement {spoon yes}
  method subelement {} {return {spoon yes}}

}


test oo-class-clay-method-0013 "Test ::foo::classb const/ color exists" {
  ::foo::classb clay exists const/ color
} 1


test oo-class-clay-method-0013 "Test ::foo::classb const/ color value" {
  ::foo::classb clay get const/ color
} {black}


test oo-class-clay-method-0015 "Test ::foo::classb const/ flavor exists" {
  ::foo::classb clay exists const/ flavor
} 1


test oo-class-clay-method-0015 "Test ::foo::classb const/ flavor value" {
  ::foo::classb clay get const/ flavor
} {vanilla}


test oo-class-clay-method-0017 "Test ::foo::classb const/ feeling exists" {
  ::foo::classb clay exists const/ feeling
} 1


test oo-class-clay-method-0017 "Test ::foo::classb const/ feeling value" {
  ::foo::classb clay get const/ feeling
} {dread}


test oo-class-clay-method-0019 "Test ::foo::classb info/ subelement exists" {
  ::foo::classb clay exists info/ subelement
} 1


test oo-class-clay-method-0019 "Test ::foo::classb info/ subelement value" {
  ::foo::classb clay get info/ subelement
} {spoon yes}


clay::define ::foo::class.ab {
superclass ::foo::classb ::foo::classa
}


clay::define ::foo::class.ba {
superclass ::foo::classa ::foo::classb
}

# -------------------------------------------------------------------------
# Singleton
::clay::define ::test::singletonbehavior {
  method bar {} {
    return CLASS
  }
  method booze {} {
    return CLASS
  }
  Ensemble foo::bang {} {
    return CLASS
  }
  Ensemble foo::both {} {
    return CLASS
  }
  Ensemble foo::mixin {} {
    return CLASS
  }
  Ensemble foo::sloppy {} {
    return CLASS
  }
}
::clay::define ::test::flavor.strawberry {
  clay define property flavor strawbery
  method bar {} {
    return STRAWBERRY
  }
  Ensemble foo::bing {} {
    return STRAWBERRY
  }
  Ensemble foo::both {} {
    return STRAWBERRY
  }
  Ensemble foo::mixin {} {
    return STRAWBERRY
  }
  Ensemble foo::sloppy {} {
    return STRAWBERRY
  }
}
::clay::singleton ::TEST {
  class ::test::singletonbehavior
  clay mixinmap flavor ::test::flavor.strawberry
  clay set property color green
  method bar {} {
    return OBJECT
  }
  method booze {} {
    return OBJECT
  }
  method baz {} {
    return OBJECT
  }
  Ensemble foo::bar {} {
    return OBJECT
  }
  Ensemble foo::both {} {
    return OBJECT
  }
}

test oo-object-singleton-001 {Test singleton superclass keyword} {
  ::TEST clay delegate class
} {::test::singletonbehavior}

test oo-object-singleton-002 {Test singleton ensemble 1} {
  ::TEST foo <list>
} {bang bar bing both mixin sloppy}

test oo-object-singleton-003 {Test singleton ensemble from script} {
  ::TEST foo bar
} {OBJECT}
test oo-object-singleton-004 {Test singleton ensemble from mixin} {
  ::TEST foo bing
} {STRAWBERRY}
test oo-object-singleton-005 {Test singleton ensemble from class} {
  ::TEST foo bang
} {CLASS}
# Test note: the behavior from TclOO is unexpected
# Intuitively, a local method should override a mixin
# but this is not the case
test oo-object-singleton-006 {Test singleton ensemble from conflict, should resolve to object} {
  ::TEST foo both
} {STRAWBERRY}
test oo-object-singleton-007 {Test singleton ensemble from conflict, should resolve to mixin} {
  ::TEST foo sloppy
} {STRAWBERRY}
###
# Test note:
# This should work but does not
###
#test oo-object-singleton-009 {Test property from mixin/class} {
#  ::TEST clay get property flavor
#} {strawberry}
test oo-object-singleton-008 {Test property from script} {
  ::TEST clay get property color
} {green}


# Test note: the behavior from TclOO is unexpected
# Intuitively, a local method should override a mixin
# but this is not the case
test oo-object-singleton-010 {Test method declared in script} {
  ::TEST bar
} {STRAWBERRY}

test oo-object-singleton-011 {Test method declared in script} {
  ::TEST booze
} {OBJECT}
TEST destroy

# OBJECT of ::foo::classa
set OBJECTA [::foo::classa new]

###
# Test object degation
###
proc ::foo::fakeobject {a b} {
  return [expr {$a + $b}]
}

::clay::object create TEST
TEST clay delegate funct ::foo::fakeobject
test oo-object-delegate-001 {Test object delegation} {
  ::TEST clay delegate
} {<class> ::clay::object <funct> ::foo::fakeobject}

test oo-object-delegate-002 {Test object delegation} {
  ::TEST clay delegate funct
} {::foo::fakeobject}

test oo-object-delegate-002a {Test object delegation} {
  ::TEST clay delegate <funct>
} {::foo::fakeobject}

test oo-object-delegate-003 {Test object delegation} {
  ::TEST <funct> 1 1
} {2}
test oo-object-delegate-004 {Test object delegation} {
  ::TEST <funct> 10 -7
} {3}

# Replace the function out from under
proc ::foo::fakeobject {a b} {
  return [expr {$a * $b}]
}
test oo-object-delegate-005 {Test object delegation} {
  ::TEST <funct> 10 -7
} {-70}

# Object with ::foo::classa mixed in
set MIXINA  [::oo::object new]
oo::objdefine $MIXINA mixin ::foo::classa


test oo-object-clay-method-native-0001 {Test native object gets the property const//color} {
  $OBJECTA clay get const/ color
} {blue}
test oo-object-clay-method-mixin-0001 {Test mixin object gets the property const//color} {
  $MIXINA clay get const/ color
} {blue}


test oo-object-clay-method-native-methodcheck-0001 {Test that const//color would mimic method interheritance for a native class} {
  $OBJECTA color
} {blue}
test oo-object-clay-method-mixin-0001 {Test that const//color would mimic method interheritance for a mixed in class} {
  $MIXINA color
} {blue}
    

test oo-object-clay-method-native-0002 {Test native object gets the property const//flavor} {
  $OBJECTA clay get const/ flavor
} {strawberry}
test oo-object-clay-method-mixin-0002 {Test mixin object gets the property const//flavor} {
  $MIXINA clay get const/ flavor
} {strawberry}


test oo-object-clay-method-native-methodcheck-0002 {Test that const//flavor would mimic method interheritance for a native class} {
  $OBJECTA flavor
} {strawberry}
test oo-object-clay-method-mixin-0002 {Test that const//flavor would mimic method interheritance for a mixed in class} {
  $MIXINA flavor
} {strawberry}
    

test oo-object-clay-method-native-0003 {Test native object gets the property const//sound} {
  $OBJECTA clay get const/ sound
} {zoink}
test oo-object-clay-method-mixin-0003 {Test mixin object gets the property const//sound} {
  $MIXINA clay get const/ sound
} {zoink}


test oo-object-clay-method-native-methodcheck-0003 {Test that const//sound would mimic method interheritance for a native class} {
  $OBJECTA sound
} {zoink}
test oo-object-clay-method-mixin-0003 {Test that const//sound would mimic method interheritance for a mixed in class} {
  $MIXINA sound
} {zoink}
    

test oo-object-clay-method-native-0004 {Test native object gets the property info//animal} {
  $OBJECTA clay get info/ animal
} {no}
test oo-object-clay-method-mixin-0004 {Test mixin object gets the property info//animal} {
  $MIXINA clay get info/ animal
} {no}


test oo-object-clay-method-native-0005 {Test native object gets the property info//building} {
  $OBJECTA clay get info/ building
} {no}
test oo-object-clay-method-mixin-0005 {Test mixin object gets the property info//building} {
  $MIXINA clay get info/ building
} {no}


test oo-object-clay-method-native-0006 {Test native object gets the property info//subelement} {
  $OBJECTA clay get info/ subelement
} {pedantic yes}
test oo-object-clay-method-mixin-0006 {Test mixin object gets the property info//subelement} {
  $MIXINA clay get info/ subelement
} {pedantic yes}

# -------------------------------------------------------------------------
# OBJECT of ::foo::classb
set OBJECTB [::foo::classb new]
# Object with ::foo::classb mixed in
set MIXINB  [::oo::object new]
oo::objdefine $MIXINB mixin ::foo::classb


test oo-object-clay-method-native-0007 {Test native object gets the property const//color} {
  $OBJECTB clay get const/ color
} {black}
test oo-object-clay-method-mixin-0007 {Test mixin object gets the property const//color} {
  $MIXINB clay get const/ color
} {black}


test oo-object-clay-method-native-methodcheck-0007 {Test that const//color would mimic method interheritance for a native class} {
  $OBJECTB color
} {black}
test oo-object-clay-method-mixin-0007 {Test that const//color would mimic method interheritance for a mixed in class} {
  $MIXINB color
} {black}
    

test oo-object-clay-method-native-0008 {Test native object gets the property const//flavor} {
  $OBJECTB clay get const/ flavor
} {vanilla}
test oo-object-clay-method-mixin-0008 {Test mixin object gets the property const//flavor} {
  $MIXINB clay get const/ flavor
} {vanilla}


test oo-object-clay-method-native-methodcheck-0008 {Test that const//flavor would mimic method interheritance for a native class} {
  $OBJECTB flavor
} {vanilla}
test oo-object-clay-method-mixin-0008 {Test that const//flavor would mimic method interheritance for a mixed in class} {
  $MIXINB flavor
} {vanilla}
    

test oo-object-clay-method-native-0009 {Test native object gets the property const//feeling} {
  $OBJECTB clay get const/ feeling
} {dread}
test oo-object-clay-method-mixin-0009 {Test mixin object gets the property const//feeling} {
  $MIXINB clay get const/ feeling
} {dread}


test oo-object-clay-method-native-methodcheck-0009 {Test that const//feeling would mimic method interheritance for a native class} {
  $OBJECTB feeling
} {dread}
test oo-object-clay-method-mixin-0009 {Test that const//feeling would mimic method interheritance for a mixed in class} {
  $MIXINB feeling
} {dread}
    

test oo-object-clay-method-native-0010 {Test native object gets the property info//subelement} {
  $OBJECTB clay get info/ subelement
} {spoon yes}
test oo-object-clay-method-mixin-0010 {Test mixin object gets the property info//subelement} {
  $MIXINB clay get info/ subelement
} {spoon yes}

# -------------------------------------------------------------------------
# OBJECT descended from ::foo::classa ::foo::classb
set OBJECTAB [::foo::class.ab new]
# Object where classes were mixed in ::foo::classa ::foo::classb
set MIXINAB  [::oo::object new]
# Test modified 2018-10-30, mixin order was wrong before
oo::objdefine $MIXINAB mixin ::foo::classb ::foo::classa


test oo-object-clay-method-native-0011 {Test native object gets the property const//color} {
  $OBJECTAB clay get const/ color
} {black}
test oo-object-clay-method-mixin-0011 {Test mixin object gets the property const//color} {
  $MIXINAB clay get const/ color
} {black}


test oo-object-clay-method-native-methodcheck-0011 {Test that const//color would mimic method interheritance for a native class} {
  $OBJECTAB color
} {black}
test oo-object-clay-method-mixin-0011 {Test that const//color would mimic method interheritance for a mixed in class} {
  $MIXINAB color
} {black}
    

test oo-object-clay-method-native-0012 {Test native object gets the property const//flavor} {
  $OBJECTAB clay get const/ flavor
} {vanilla}
test oo-object-clay-method-mixin-0012 {Test mixin object gets the property const//flavor} {
  $MIXINAB clay get const/ flavor
} {vanilla}


test oo-object-clay-method-native-methodcheck-0012 {Test that const//flavor would mimic method interheritance for a native class} {
  $OBJECTAB flavor
} {vanilla}
test oo-object-clay-method-mixin-0012 {Test that const//flavor would mimic method interheritance for a mixed in class} {
  $MIXINAB flavor
} {vanilla}
    

test oo-object-clay-method-native-0013 {Test native object gets the property const//feeling} {
  $OBJECTAB clay get const/ feeling
} {dread}
test oo-object-clay-method-mixin-0013 {Test mixin object gets the property const//feeling} {
  $MIXINAB clay get const/ feeling
} {dread}


test oo-object-clay-method-native-methodcheck-0013 {Test that const//feeling would mimic method interheritance for a native class} {
  $OBJECTAB feeling
} {dread}
test oo-object-clay-method-mixin-0013 {Test that const//feeling would mimic method interheritance for a mixed in class} {
  $MIXINAB feeling
} {dread}
    

test oo-object-clay-method-native-0014 {Test native object gets the property const//sound} {
  $OBJECTAB clay get const/ sound
} {zoink}
test oo-object-clay-method-mixin-0014 {Test mixin object gets the property const//sound} {
  $MIXINAB clay get const/ sound
} {zoink}


test oo-object-clay-method-native-methodcheck-0014 {Test that const//sound would mimic method interheritance for a native class} {
  $OBJECTAB sound
} {zoink}
test oo-object-clay-method-mixin-0014 {Test that const//sound would mimic method interheritance for a mixed in class} {
  $MIXINAB sound
} {zoink}
    

test oo-object-clay-method-native-0015 {Test native object gets the property info//subelement} {
  $OBJECTAB clay get info/ subelement
} {spoon yes}
test oo-object-clay-method-mixin-0015 {Test mixin object gets the property info//subelement} {
  $MIXINAB clay get info/ subelement
} {spoon yes}


test oo-object-clay-method-native-0016 {Test native object gets the property info//animal} {
  $OBJECTAB clay get info/ animal
} {no}
test oo-object-clay-method-mixin-0016 {Test mixin object gets the property info//animal} {
  $MIXINAB clay get info/ animal
} {no}


test oo-object-clay-method-native-0017 {Test native object gets the property info//building} {
  $OBJECTAB clay get info/ building
} {no}
test oo-object-clay-method-mixin-0017 {Test mixin object gets the property info//building} {
  $MIXINAB clay get info/ building
} {no}

# -------------------------------------------------------------------------
# OBJECT descended from ::foo::classb ::foo::classa
set OBJECTBA [::foo::class.ba new]
# Object where classes were mixed in ::foo::classb ::foo::classa
set MIXINBA  [::oo::object new]
# Test modified 2018-10-30, mixin order was wrong before
oo::objdefine $MIXINBA mixin ::foo::classa ::foo::classb


test oo-object-clay-method-native-0018 {Test native object gets the property} {
  $OBJECTBA clay get const/ color
} {blue}
test oo-object-clay-method-mixin-0018 {Test mixin object gets the property} {
  $MIXINBA clay get const/ color
} {blue}


test oo-object-clay-method-native-methodcheck-0018 {Test that const//color would mimic method interheritance for a native class} {
  $OBJECTBA color
} {blue}
test oo-object-clay-method-mixin-0018 {Test that const//color would mimic method interheritance for a mixed in class} {
  $MIXINBA color
} {blue}
    

test oo-object-clay-method-native-0019 {Test native object gets the property} {
  $OBJECTBA clay get const/ flavor
} {strawberry}
test oo-object-clay-method-mixin-0019 {Test mixin object gets the property} {
  $MIXINBA clay get const/ flavor
} {strawberry}


test oo-object-clay-method-native-methodcheck-0019 {Test that const//flavor would mimic method interheritance for a native class} {
  $OBJECTBA flavor
} {strawberry}
test oo-object-clay-method-mixin-0019 {Test that const//flavor would mimic method interheritance for a mixed in class} {
  $MIXINBA flavor
} {strawberry}
    

test oo-object-clay-method-native-0020 {Test native object gets the property} {
  $OBJECTBA clay get const/ sound
} {zoink}
test oo-object-clay-method-mixin-0020 {Test mixin object gets the property} {
  $MIXINBA clay get const/ sound
} {zoink}


test oo-object-clay-method-native-methodcheck-0020 {Test that const//sound would mimic method interheritance for a native class} {
  $OBJECTBA sound
} {zoink}
test oo-object-clay-method-mixin-0020 {Test that const//sound would mimic method interheritance for a mixed in class} {
  $MIXINBA sound
} {zoink}
    

test oo-object-clay-method-native-0021 {Test native object gets the property} {
  $OBJECTBA clay get const/ feeling
} {dread}
test oo-object-clay-method-mixin-0021 {Test mixin object gets the property} {
  $MIXINBA clay get const/ feeling
} {dread}


test oo-object-clay-method-native-methodcheck-0021 {Test that const//feeling would mimic method interheritance for a native class} {
  $OBJECTBA feeling
} {dread}
test oo-object-clay-method-mixin-0021 {Test that const//feeling would mimic method interheritance for a mixed in class} {
  $MIXINBA feeling
} {dread}
    

test oo-object-clay-method-native-0022 {Test native object gets the property} {
  $OBJECTBA clay get info/ animal
} {no}
test oo-object-clay-method-mixin-0022 {Test mixin object gets the property} {
  $MIXINBA clay get info/ animal
} {no}


test oo-object-clay-method-native-0023 {Test native object gets the property} {
  $OBJECTBA clay get info/ building
} {no}
test oo-object-clay-method-mixin-0023 {Test mixin object gets the property} {
  $MIXINBA clay get info/ building
} {no}


test oo-object-clay-method-native-0024 {Test native object gets the property} {
  $OBJECTBA clay get info/ subelement
} {pedantic yes}
test oo-object-clay-method-mixin-0024 {Test mixin object gets the property} {
  $MIXINBA clay get info/ subelement
} {pedantic yes}


###
# put a do-nothing constructor on the books
###
::clay::define ::clay::object {
  constructor args {}
}

oo::objdefine ::clay::object method foo args { return bar }

test clay-core-method-0001 {Test that adding methods to the core ::clay::object class works} {
  ::clay::object foo
} {bar}

namespace eval ::TEST {}
::clay::define ::TEST::myclass {
  clay color red
  clay flavor strawberry

}

###
# Test adding a clay property
###
test clay-class-clay-0001 {Test that a clay statement is recorded in the object of the class} {
  ::TEST::myclass clay get color
} red
test clay-class-clay-0002 {Test that a clay statement is recorded in the object of the class} {
  ::TEST::myclass clay get flavor
} strawberry

###
# Test that objects of the class get the same properties
###
set OBJ [::clay::object new {}]
set OBJ2 [::TEST::myclass new {}]

test clay-object-clay-a-0001 {Test that objects not thee class do not get properties} {
  $OBJ clay get color
} {}
test clay-object-clay-a-0002 {Test that objects not thee class do not get properties} {
  $OBJ clay get flavor
} {}
test clay-object-clay-a-0003 {Test that objects of the class get properties} {
  $OBJ2 clay get color
} red
test clay-object-clay-a-0004 {Test that objects of the class get properties} {
  $OBJ2 clay get flavor
} strawberry

###
# Test modified 2018-10-21
###
test clay-object-clay-a-0005 {Test the clay ancestors function} {
  $OBJ clay ancestors
} {::clay::object}

###
# Test modified 2018-10-21
###
test clay-object-clay-a-0006 {Test the clay ancestors function} {
  $OBJ2 clay ancestors
} {::TEST::myclass ::clay::object}

test clay-object-clay-a-0007 {Test the clay provenance  function} {
  $OBJ2 clay provenance  flavor
} ::TEST::myclass

###
# Test that object local setting override the class
###
test clay-object-clay-a-0008 {Test that object local setting override the class} {
  $OBJ2 clay set color purple
  $OBJ2 clay get color
} purple
test clay-object-clay-a-0009 {Test that object local setting override the class} {
  $OBJ2 clay provenance  color
} self

::clay::define ::TEST::myclasse {
  superclass ::TEST::myclass

  clay color blue
  method do args {
    return "I did $args"
  }

  Ensemble which::color {} {
    return [my clay get color]
  }
  clay set method_ensemble which farbe: {tailcall my Which_color {*}$args}
}

###
# Test clay information is passed town to subclasses
###
test clay-class-clay-0003 {Test that a clay statement is recorded in the object of the class} {
  ::TEST::myclasse clay get color
} blue
test clay-class-clay-0004 {Test that clay statements from the ancestors of this class are not present (we handle them seperately in objects)} {
  ::TEST::myclasse clay get flavor
} {}
test clay-class-clay-0005 {Test that clay statements from the ancestors of this class are found with the FIND method} {
  ::TEST::myclasse clay find flavor
} {strawberry}

###
# Test that properties reach objects
###
set OBJ3 [::TEST::myclasse new {}]
test clay-object-clay-b-0001 {Test that objects of the class get properties} {
  $OBJ3 clay get color
} blue
test clay-object-clay-b-0002 {Test the clay provenance  function} {
  $OBJ3 clay provenance  color
} ::TEST::myclasse
test clay-object-clay-b-0003 {Test that objects of the class get properties} {
  $OBJ3 clay get flavor
} strawberry
test clay-object-clay-b-0004 {Test the clay provenance  function} {
  $OBJ3 clay provenance  flavor
} ::TEST::myclass

###
# Test modified 2018-10-21
###
test clay-object-clay-b-0005 {Test the clay provenance  function} {
  $OBJ3 clay ancestors
} {::TEST::myclasse ::TEST::myclass ::clay::object}

###
# Test defining a standard method
###
test clay-object-method-0001 {Test and standard method} {
  $OBJ3 do this really cool thing
} {I did this really cool thing}

test clay-object-method-0003 {Test an ensemble} {
  $OBJ3 which color
} blue
# Test setting properties
test clay-object-method-0004 {Test an ensemble} {
  $OBJ3 clay set color black
  $OBJ3 which color
} black

# Test setting properties
test clay-object-method-0004 {Test an ensemble alias} {
  $OBJ3 which farbe
} black


###
# Added 2019-06-24
# Test that grabbing a leaf does not pollute the cache
###
::clay::define ::TEST::class_with_deep_tree {
  clay set tree deep has depth 1
  clay set tree shallow has depth 0
}

$OBJ3 clay mixinmap deep ::TEST::class_with_deep_tree

test clay-deep-nested-0001 {Test that a leaf query does not pollute the cache} {
  $OBJ3 clay get tree shallow has depth
} 0
test clay-deep-nested-0001 {Test that a leaf query does not pollute the cache} {
  $OBJ3 clay get tree
} {deep {has {depth 1}} shallow {has {depth 0}}}



###
# Test that if you try to replace a global command you get an error
###
test clay-nspace-0001 {Test that if you try to replace a global command you get an error} -body {
::clay::define open {
  method bar {} { return foo }

}
}  -returnCodes {error} -result "::open does not refer to an object"

::clay::define fubar {
  method bar {} { return foo }
}
test clay-nspace-0002 {Test a non qualified class ends up in the current namespace} {
  info commands ::fubar
} {::fubar}

namespace eval ::cluster {
::clay::define fubar {
  method bar {} { return foo }
}

::clay::define ::clay::pot {
  method bar {} { return foo }
}

}
test clay-nspace-0003 {Test a non qualified class ends up in the current namespace} {
  info commands ::cluster::fubar
} {::cluster::fubar}
test clay-nspace-0003 {Test a fully qualified class ends up in the proper namespace} {
  info commands ::clay::pot
} {::clay::pot}

#set ::clay::trace 3

###
# New test - Added 2019-09-15
# Test that the "method" variable is exposed to a default method
###

::clay::define ::ensembleWithDefault {
  Ensemble foo::bar {} { return A }
  Ensemble foo::baz {} { return B }
  Ensemble foo::bang {} { return C }

  Ensemble foo::default {} { return $method }
}


set OBJ [::ensembleWithDefault new]
test clay-ensemble-default-0001 {Test a normal ensemble method} {
  $OBJ foo bar
} {A}
test clay-ensemble-default-0002 {Test a normal ensemble method} {
  $OBJ foo baz
} {B}
test clay-ensemble-default-0003 {Test a normal ensemble method} {
  $OBJ foo <list>
} [lsort -dictionary {bar baz bang}]

test clay-ensemble-default-0004 {Test a normal ensemble method} {
  $OBJ foo bing
} {bing}
test clay-ensemble-default-0005 {Test a normal ensemble method} {
  $OBJ foo bong
} {bong}
###
# Mixin tests
###

###
# Define a core class
###
::clay::define ::TEST::thing {

  method do args {
    return "I did $args"
  }
}


::clay::define ::TEST::vegetable {

  clay color unknown
  clay flavor unknown

  Ensemble which::flavor {} {
    return [my clay get flavor]
  }
  Ensemble which::color {} {
    return [my clay get color]
  }

}

::clay::define ::TEST::animal {

  clay color unknown
  clay sound unknown

  Ensemble which::sound {} {
    return [my clay get sound]
  }
  Ensemble which::color {} {
    return [my clay get color]
  }
  method sound {} {
    return unknown
  }
}

::clay::define ::TEST::species.cat {
  superclass ::TEST::animal
  clay sound meow
  method sound {} {
    return meow
  }
}

::clay::define ::TEST::coloring.calico {
  clay color calico

}

::clay::define ::TEST::condition.dark {
  Ensemble which::color {} {
    return grey
  }
}

::clay::define ::TEST::mood.happy {
  Ensemble which::sound {} {
    return purr
  }
  method sound {} {
    return purr
  }
}
test clay-object-0001 {Test than an object is created when clay::define is invoked} {
  info commands ::TEST::mood.happy
} ::TEST::mood.happy

set OBJ [::TEST::thing new]
test clay-mixin-a-0001 {Test that prior to a mixin an ensemble doesn't exist} -body {
  $OBJ which color
} -returnCodes error -result {unknown method "which": must be clay, destroy or do}

test clay-mixin-a-0002 {Test and standard method from an ancestor} {
  $OBJ do this really cool thing
} {I did this really cool thing}

$OBJ clay mixinmap species ::TEST::animal
test clay-mixin-b-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {unknown}

test clay-mixin-b-0002 {Test that an ensemble is created during a mixin} {
  $OBJ which sound
} {unknown}

test clay-mixin-b-0003 {Test that an ensemble is created during a mixin}  -body {$OBJ which flavor} -returnCodes {error}  -result {unknown method which flavor. Valid: color sound}

###
# Test Modified: 2018-10-21
###
test clay-mixin-b-0004 {Test that mixins resolve in the correct order} {
  $OBJ clay ancestors
} {::TEST::animal ::TEST::thing ::clay::object}

###
# Replacing a mixin replaces the behaviors
###
$OBJ clay mixinmap species ::TEST::vegetable
test clay-mixin-c-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {unknown}
test clay-mixin-c-0002 {Test that an ensemble is created during a mixin}  -body {$OBJ which sound}  -returnCodes {error}  -result {unknown method which sound. Valid: color flavor}
test clay-mixin-c-0003 {Test that an ensemble is created during a mixin} {
  $OBJ which flavor
} {unknown}
###
# Test Modified: 2018-10-21
###
test clay-mixin-c-0004 {Test that mixins resolve in the correct order} {
  $OBJ clay ancestors
} {::TEST::vegetable ::TEST::thing ::clay::object}

###
# Replacing a mixin
$OBJ clay mixinmap species ::TEST::species.cat
test clay-mixin-e-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {unknown}
test clay-mixin-e-0002a {Test that an ensemble is created during a mixin} {
  $OBJ sound
} {meow}
test clay-mixin-e-0002b {Test that an ensemble is created during a mixin} {
  $OBJ clay get sound
} {meow}
test clay-mixin-e-0002 {Test that an ensemble is created during a mixin} {
  $OBJ which sound
} {meow}
test clay-mixin-e-0003 {Test that an ensemble is created during a mixin}  -body {$OBJ which flavor} -returnCodes {error}  -result {unknown method which flavor. Valid: color sound}
###
# Test Modified: 2018-10-30, 2018-10-21, 2018-10-10
###
test clay-mixin-e-0004 {Test that clay data follows the rules of inheritence and order of mixin} {
  $OBJ clay ancestors
} {::TEST::species.cat ::TEST::animal ::TEST::thing ::clay::object}

$OBJ clay mixinmap coloring ::TEST::coloring.calico
test clay-mixin-f-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {calico}
test clay-mixin-f-0002 {Test that an ensemble is created during a mixin} {
  $OBJ which sound
} {meow}
test clay-mixin-f-0003 {Test that an ensemble is created during a mixin}  -body {$OBJ which flavor} -returnCodes {error}  -result {unknown method which flavor. Valid: color sound}

###
# Test modified 2018-10-30, 2018-10-21, 2018-10-10
###
test clay-mixin-f-0004 {Test that clay data follows the rules of inheritence and order of mixin} {
  $OBJ clay ancestors
} {::TEST::coloring.calico ::TEST::species.cat ::TEST::animal ::TEST::thing ::clay::object}

test clay-mixin-f-0005 {Test that clay data from a mixin works} {
  $OBJ clay provenance  color
} {::TEST::coloring.calico}

###
# Test variable initialization
###
::clay::define ::TEST::has_var {
  Variable my_variable 10

  method get_my_variable {} {
    my variable my_variable
    return $my_variable
  }
}

set OBJ [::TEST::has_var new]
test clay-class-variable-0001 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get variable/ my_variable
} {10}

# Modified 2018-10-30 (order is different)
test clay-class-variable-0002 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get variable
} {my_variable 10 DestroyEvent 0}

# Modified 2018-10-30 (order is different)
test clay-class-variable-0003 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay dget variable
} {. {} my_variable 10 DestroyEvent 0}

test clay-class-variable-0004 {Test that variables declared in the class definition are initialized} {
  $OBJ get_my_variable
} 10

###
# Test array initialization
###
::clay::define ::TEST::has_array {
  Array my_array {timeout 10}

  method get_my_array {field} {
    my variable my_array
    return $my_array($field)
  }
}

set OBJ [::TEST::has_array new]
test clay-class-array-0001 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get array
} {my_array {timeout 10}}

test clay-class-array-0002 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay dget array
} {. {} my_array {. {} timeout 10}}

test clay-class-array-0003 {Test that variables declared in the class definition are initialized} {
  $OBJ get_my_array timeout
} 10

::clay::define ::TEST::has_more_array {
  superclass ::TEST::has_array
  Array my_array {color blue}
}
test clay-class-array-0008 {Test that the parser injected the right value in the right place for clay to catch it} {
  ::TEST::has_more_array clay get array
} {my_array {color blue}}

test clay-class-array-0009 {Test that the parser injected the right value in the right place for clay to catch it} {
  ::TEST::has_more_array clay find array
} {my_array {timeout 10 color blue}}

# Modified 2018-10-30 (order is different)
set BOBJ [::TEST::has_more_array new]
test clay-class-array-0004 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay get array
} {my_array {color blue timeout 10}}

# Modified 2018-10-30 (order is different)
test clay-class-array-0005 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay dget array
} {. {} my_array {. {} color blue timeout 10}}

test clay-class-arrau-0006 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_array timeout
} 10
test clay-class-arrau-0007 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_array color
} blue

::clay::define ::TEST::has_empty_array {
  Array my_array {}

  method my_array_exists {} {
    my variable my_array
    return [info exists my_array]
  }
  method get {field} {
    my variable my_array
    return $my_array($field)
  }
  method set {field value} {
    my variable my_array
    set my_array($field) $value
  }
}

test clay-class-array-0008 {Test that an declaration of an array with no values produces and empty array} {
  set COBJ [::TEST::has_empty_array new]
  $COBJ my_array_exists
} 1

test clay-class-array-0009 {Test that an declaration of an array with no values produces and empty array} {
  $COBJ set test "A random value"
  $COBJ get test
} {A random value}
###
# Test dict initialization
###
::clay::define ::TEST::has_dict {
  Dict my_dict {timeout 10}

  method get_my_dict {args} {
    my variable my_dict
    if {[llength $args]==0} {
      return $my_dict
    }
    return [dict get $my_dict {*}$args]
  }

}

set OBJ [::TEST::has_dict new]
test clay-class-dict-0001 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get dict
} {my_dict {timeout 10}}

test clay-class-dict-0002 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay dget dict
} {. {} my_dict {. {} timeout 10}}

test clay-class-dict-0003 {Test that variables declared in the class definition are initialized} {
  $OBJ get_my_dict timeout
} 10

test clay-class-dict-0004 {Test that an empty dict is annotated} {
  $OBJ clay get dict
} {my_dict {timeout 10}}


::clay::define ::TEST::has_more_dict {
  superclass ::TEST::has_dict
  Dict my_dict {color blue}
}
set BOBJ [::TEST::has_more_dict new]

# Modified 2018-10-30
test clay-class-dict-0004 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay get dict
} {my_dict {color blue timeout 10}}

# Modified 2018-10-30
test clay-class-dict-0005 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay dget dict
} {. {} my_dict {. {} color blue timeout 10}}

test clay-class-dict-0006 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_dict timeout
} 10

test clay-class-dict-0007 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_dict color
} blue

::clay::define ::TEST::has_empty_dict {
  Dict my_empty_dict {}

  method get_my_empty_dict {args} {
    my variable my_empty_dict
    if {[llength $args]==0} {
      return $my_empty_dict
    }
    return [dict get $my_empty_dict {*}$args]
  }
}

set COBJ [::TEST::has_empty_dict new]

test clay-class-dict-0008 {Test that the parser injected the right value in the right place for clay to catch it} {
  $COBJ clay dget dict
} {my_empty_dict {. {}}}

test clay-class-dict-0009 {Test that an empty dict is initialized} {
  $COBJ get_my_empty_dict
} {}

###
# Test object delegation
###
::clay::define ::TEST::organelle {
  method add args {
    set total 0
    foreach item $args {
      set total [expr {$total+$item}]
    }
    return $total
  }
}
::clay::define ::TEST::master {
  constructor {} {
    set mysub [namespace current]::sub
    ::TEST::organelle create $mysub
    my clay delegate sub $mysub
  }
}

set OBJ [::TEST::master new]
###
# Test that delegation is working
###
test clay-delegation-0001 {Test an array driven ensemble} {
  $OBJ <sub> add 5 5
} 10


###
# Test the Ensemble keyword
###
::clay::define ::TEST::with_ensemble {

  Ensemble myensemble {pattern args} {
    set ensemble [self method]
    set emap [my clay ensemble_map $ensemble]
    set mlist [dict keys $emap [string tolower $pattern]]
    if {[llength $mlist] != 1} {
      error "Couldn't figure out what to do with $pattern"
    }
    set method [lindex $mlist 0]
    set argspec [dict get $emap $method argspec]
    set body    [dict get $emap $method body]
    if {$argspec ni {args {}}} {
      ::clay::dynamic_arguments $ensemble $method [list $argspec] {*}$args
    }
    eval $body
  }

  Ensemble myensemble::go args {
    return 1
  }
}

::clay::define ::TEST::with_ensemble.dance {
  Ensemble myensemble::dance args {
    return 1
  }
}
::clay::define ::TEST::with_ensemble.cannot_dance {
  Ensemble myensemble::dance args {
    return 0
  }
}

set OBJA [::clay::object new]
set OBJB [::clay::object new]

$OBJA clay mixinmap  core ::TEST::with_ensemble  friends ::TEST::with_ensemble.dance

$OBJB clay mixinmap  core ::TEST::with_ensemble  friends ::TEST::with_ensemble.cannot_dance

# Test go
test clay-dynamic-ensemble-0001 {Test ensemble with static method} {
  $OBJA myensemble go
} {1}
test clay-dynamic-ensemble-0002 {Test ensemble with static method} {
  $OBJB myensemble go
} {1}
# Test dance
test clay-dynamic-ensemble-0003 {Test ensemble with static method} {
  $OBJA myensemble dance
} {1}
test clay-dynamic-ensemble-0004 {Test ensemble with static method} {
  $OBJB myensemble dance
} {0}


###
# Class method testing
###

clay::class create WidgetClass {
  Class_Method working {} {
    return {Works}
  }

  Class_Method unknown args {
    set tkpath [lindex $args 0]
    if {[string index $tkpath 0] eq "."} {
      set obj [my new $tkpath {*}[lrange $args 1 end]]
      $obj tkalias $tkpath
      return $tkpath
    }
    next {*}$args
  }

  constructor {TkPath args} {
    my variable hull
    set hull $TkPath
    my clay delegate hull $TkPath
  }

  method tkalias tkname {
    set oldname $tkname
    my variable tkalias
    set tkalias $tkname
    set self [self]
    set hullwidget [::info object namespace $self]::tkwidget
    my clay delegate tkwidget $hullwidget
    #rename ::$tkalias $hullwidget
    my clay delegate hullwidget $hullwidget
    #::tool::object_rename [self] ::$tkalias
    rename [self] ::$tkalias
    #my Hull_Bind $tkname
    return $hullwidget
  }
}

test tool-class-method-000 {Test that class methods actually work...} {
  WidgetClass working
} {Works}

test tool-class-method-001 {Test Tk style creator} {
  WidgetClass .foo
  .foo clay delegate hull
} {.foo}

::clay::define WidgetNewClass {
  superclass WidgetClass
}

test tool-class-method-002 {Test Tk style creator inherited by morph} {
  WidgetNewClass .bar
  .bar clay delegate hull
} {.bar}



###
# Test ensemble inheritence
###
clay::define NestedClassA {
  Ensemble do::family {} {
    return NestedClassA
  }
  Ensemble do::something {} {
    return A
  }
  Ensemble do::whop {} {
    return A
  }
}
clay::define NestedClassB {
  superclass NestedClassA
  Ensemble do::family {} {
    set r [next family]
    lappend r NestedClassB
    return $r
  }
  Ensemble do::whop {} {
    return B
  }
}
clay::define NestedClassC {
  superclass NestedClassB

  Ensemble do::somethingelse {} {
    return C
  }
}
clay::define NestedClassD {
  superclass NestedClassB

  Ensemble do::somethingelse {} {
    return D
  }
}

clay::define NestedClassE {
  superclass NestedClassD NestedClassC
}

clay::define NestedClassF {
  superclass NestedClassC NestedClassD
}

NestedClassC create NestedObjectC

###
# These tests no longer work because method ensembles are now dynamically
# generated by object, that are not attached to the class anymore
#
####
#test tool-ensemble-001 {Test that an ensemble can access [next] even if no object of the ancestor class have been instantiated} {
#  NestedObjectC do family
#} {::NestedClassA ::NestedClassB ::NestedClassC}

test tool-ensemble-002 {Test that a later ensemble definition trumps a more primitive one} {
  NestedObjectC do whop
} {B}
test tool-ensemble-003 {Test that an ensemble definitions in an ancestor carry over} {
  NestedObjectC do something
} {A}

NestedClassE create NestedObjectE
NestedClassF create NestedObjectF


test tool-ensemble-004 {Test that ensembles follow the same rules for inheritance as methods} {
  NestedObjectE do somethingelse
} {D}

test tool-ensemble-005 {Test that ensembles follow the same rules for inheritance as methods} {
  NestedObjectF do somethingelse
} {C}

###
# Set of tests to exercise the mixinmap system
###
clay::define MixinMainClass {
  Variable mainvar unchanged

  Ensemble test::which {} {
    my variable mainvar
    return $mainvar
  }

  Ensemble test::main args {
    puts [list this is main $method $args]
  }

}

set mixoutscript {my test untool $class}
set mixinscript {my test tool $class}
clay::define MixinTool {
  Variable toolvar unchanged.mixin
  clay set mixin/ unmap-script $mixoutscript
  clay set mixin/ map-script $mixinscript
  clay set mixin/ name {Generic Tool}

  Ensemble test::untool class {
    my variable toolvar mainvar
    set mainvar {}
    set toolvar {}
  }

  Ensemble test::tool class {
    my variable toolvar mainvar
    set mainvar [$class clay get mixin name]
    set toolvar [$class clay get mixin name]
  }
}

clay::define MixinToolA {
  superclass MixinTool

  clay set mixin/ name {Tool A}
}

clay::define MixinToolB {
  superclass MixinTool

  clay set mixin/ name {Tool B}

  method test_newfunc {} {
    return "B"
  }
}

test tool-mixinspec-001 {Test application of mixin specs} {
  MixinTool clay get mixin map-script
} $mixinscript

test tool-mixinspec-002 {Test application of mixin specs} {
  MixinToolA clay get mixin map-script
} {}

test tool-mixinspec-003 {Test application of mixin specs} {
  MixinToolA clay find mixin map-script
} $mixinscript

test tool-mixinspec-004 {Test application of mixin specs} {
  MixinToolB clay find mixin map-script
} $mixinscript


MixinMainClass create mixintest

test tool-mixinmap-001 {Test object prior to mixins} {
  mixintest test which
} {unchanged}

mixintest clay mixinmap tool MixinToolA
test tool-mixinmap-002 {Test mixin map script ran} {
  mixintest test which
} {Tool A}

mixintest clay mixinmap tool MixinToolB

test tool-mixinmap-003 {Test mixin map script ran} {
  mixintest test which
} {Tool B}

test tool-mixinmap-003 {Test mixin map script ran} {
  mixintest test_newfunc
} {B}

mixintest clay mixinmap tool {}
test tool-mixinmap-004 {Test object prior to mixins} {
  mixintest test which
} {}



clay::define ::clay::object {
  method path {} {
    return [self class]
  }
}


clay::define ::MixinRoot {
  clay set opts core   root
  clay set opts option unset
  clay set opts color  unset

  Ensemble info::root {} {
    return MixinRoot
  }
  Ensemble info::shade {} {
    return avacodo
  }
  Ensemble info::default {} {
    return Undefined
  }

  method did {} {
    return MixinRoot
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

clay::define ::MixinOption1 {
  clay set opts option option1

  Ensemble info::option {} {
    return MixinOption1
  }
  Ensemble info::other {} {
    return MixinOption1
  }

  method did {} {
    return MixinOption1
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

clay::define ::MixinOption2 {
  superclass ::MixinOption1

  clay set opts option option2

  Ensemble info::option {} {
    return MixinOption2
  }

  method did {} {
    return MixinOption2
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}


clay::define ::MixinColor1 {
  clay set opts color blue

  Ensemble info::color {} {
    return MixinColor1
  }
  Ensemble info::shade {} {
    return blue
  }

  method did {} {
    return MixinColor1
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

clay::define ::MixinColor2 {
  clay set opts color green

  Ensemble info::color {} {
    return MixinColor2
  }
  Ensemble info::shade {} {
    return green
  }

  method did {} {
    return MixinColor2
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

set obj [clay::object new]

$obj clay mixinmap root ::MixinRoot


test tool-prototype-0001-0001 {Mixin core} {
  $obj info root
} {MixinRoot}


test tool-prototype-0001-0002 {Mixin core} {
  $obj info option
} {Undefined}


test tool-prototype-0001-0003 {Mixin core} {
  $obj info color
} {Undefined}


test tool-prototype-0001-0004 {Mixin core} {
  $obj info other
} {Undefined}


test tool-prototype-0001-0005 {Mixin core} {
  $obj info shade
} {avacodo}


test tool-prototype-0001-0006 {Mixin core} {
  $obj did
} {MixinRoot}


test tool-prototype-0001-0007 {Mixin core} {
  $obj path
} {::MixinRoot ::clay::object}


test tool-prototype-0001-0008 {Mixin core} {
  $obj clay get opts
} {core root option unset color unset}


test tool-prototype-0001-0009 {Mixin core} {
  $obj clay get opts core
} {root}


test tool-prototype-0001-0010 {Mixin core} {
  $obj clay get opts option
} {unset}


test tool-prototype-0001-0011 {Mixin core} {
  $obj clay get opts color
} {unset}


test tool-prototype-0001-0012 {Mixin core} {
  $obj clay ancestors
} {::MixinRoot ::clay::object}

$obj clay mixinmap option ::MixinOption1

test tool-prototype-0002-0001 {Mixin option1} {
  $obj info root
} {MixinRoot}


test tool-prototype-0002-0002 {Mixin option1} {
  $obj info option
} {MixinOption1}


test tool-prototype-0002-0003 {Mixin option1} {
  $obj info color
} {Undefined}


test tool-prototype-0002-0004 {Mixin option1} {
  $obj info other
} {MixinOption1}


test tool-prototype-0002-0005 {Mixin option1} {
  $obj info shade
} {avacodo}


test tool-prototype-0002-0006 {Mixin option1} {
  $obj did
} {MixinOption1}


test tool-prototype-0002-0007 {Mixin option1} {
  $obj path
} {::MixinOption1 ::MixinRoot ::clay::object}


test tool-prototype-0002-0008 {Mixin option1} {
  $obj clay get opts
} {option option1 core root color unset}


test tool-prototype-0002-0009 {Mixin option1} {
  $obj clay get opts core
} {root}


test tool-prototype-0002-0010 {Mixin option1} {
  $obj clay get opts option
} {option1}


test tool-prototype-0002-0011 {Mixin option1} {
  $obj clay get opts color
} {unset}


test tool-prototype-0002-0012 {Mixin option1} {
  $obj clay ancestors
} {::MixinOption1 ::MixinRoot ::clay::object}


set obj2 [clay::object new]
$obj2 clay mixinmap root ::MixinRoot option ::MixinOption1

$obj clay mixinmap option ::MixinOption1

test tool-prototype-0003-0001 {Mixin option1 - clean object} {
  $obj2 info root
} {MixinRoot}


test tool-prototype-0003-0002 {Mixin option1 - clean object} {
  $obj2 info option
} {MixinOption1}


test tool-prototype-0003-0003 {Mixin option1 - clean object} {
  $obj2 info color
} {Undefined}


test tool-prototype-0003-0004 {Mixin option1 - clean object} {
  $obj2 info other
} {MixinOption1}


test tool-prototype-0003-0005 {Mixin option1 - clean object} {
  $obj2 info shade
} {avacodo}


test tool-prototype-0003-0006 {Mixin option1 - clean object} {
  $obj2 did
} {MixinOption1}


test tool-prototype-0003-0007 {Mixin option1 - clean object} {
  $obj2 path
} {::MixinOption1 ::MixinRoot ::clay::object}


test tool-prototype-0003-0008 {Mixin option1 - clean object} {
  $obj2 clay get opts
} {option option1 core root color unset}


test tool-prototype-0003-0009 {Mixin option1 - clean object} {
  $obj2 clay get opts core
} {root}


test tool-prototype-0003-0010 {Mixin option1 - clean object} {
  $obj2 clay get opts option
} {option1}


test tool-prototype-0003-0011 {Mixin option1 - clean object} {
  $obj2 clay get opts color
} {unset}


test tool-prototype-0003-0012 {Mixin option1 - clean object} {
  $obj2 clay ancestors
} {::MixinOption1 ::MixinRoot ::clay::object}

$obj clay mixinmap option ::MixinOption2

test tool-prototype-0004-0001 {Mixin option2} {
  $obj info root
} {MixinRoot}


test tool-prototype-0004-0002 {Mixin option2} {
  $obj info option
} {MixinOption2}


test tool-prototype-0004-0003 {Mixin option2} {
  $obj info color
} {Undefined}


test tool-prototype-0004-0004 {Mixin option2} {
  $obj info other
} {MixinOption1}


test tool-prototype-0004-0005 {Mixin option2} {
  $obj info shade
} {avacodo}


test tool-prototype-0004-0006 {Mixin option2} {
  $obj did
} {MixinOption2}


test tool-prototype-0004-0007 {Mixin option2} {
  $obj path
} {::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}


test tool-prototype-0004-0008 {Mixin option2} {
  $obj clay get opts
} {option option2 core root color unset}


test tool-prototype-0004-0009 {Mixin option2} {
  $obj clay get opts core
} {root}


test tool-prototype-0004-0010 {Mixin option2} {
  $obj clay get opts option
} {option2}


test tool-prototype-0004-0011 {Mixin option2} {
  $obj clay get opts color
} {unset}


test tool-prototype-0004-0012 {Mixin option2} {
  $obj clay ancestors
} {::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}

$obj clay mixinmap color MixinColor1

test tool-prototype-0005-0001 {Mixin color1} {
  $obj info root
} {MixinRoot}


test tool-prototype-0005-0002 {Mixin color1} {
  $obj info option
} {MixinOption2}


test tool-prototype-0005-0003 {Mixin color1} {
  $obj info color
} {MixinColor1}


test tool-prototype-0005-0004 {Mixin color1} {
  $obj info other
} {MixinOption1}


test tool-prototype-0005-0005 {Mixin color1} {
  $obj info shade
} {blue}


test tool-prototype-0005-0006 {Mixin color1} {
  $obj did
} {MixinColor1}


test tool-prototype-0005-0007 {Mixin color1} {
  $obj path
} {::MixinColor1 ::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}


test tool-prototype-0005-0008 {Mixin color1} {
  $obj clay get opts
} {color blue option option2 core root}


test tool-prototype-0005-0009 {Mixin color1} {
  $obj clay get opts core
} {root}


test tool-prototype-0005-0010 {Mixin color1} {
  $obj clay get opts option
} {option2}


test tool-prototype-0005-0011 {Mixin color1} {
  $obj clay get opts color
} {blue}


test tool-prototype-0005-0012 {Mixin color1} {
  $obj clay ancestors
} {::MixinColor1 ::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}

$obj clay mixinmap color MixinColor2

test tool-prototype-0006-0001 {Mixin color2} {
  $obj info root
} {MixinRoot}


test tool-prototype-0006-0002 {Mixin color2} {
  $obj info option
} {MixinOption2}


test tool-prototype-0006-0003 {Mixin color2} {
  $obj info color
} {MixinColor2}


test tool-prototype-0006-0004 {Mixin color2} {
  $obj info other
} {MixinOption1}


test tool-prototype-0006-0005 {Mixin color2} {
  $obj info shade
} {green}


test tool-prototype-0006-0006 {Mixin color2} {
  $obj clay get opts
} {color green option option2 core root}


test tool-prototype-0006-0007 {Mixin color2} {
  $obj clay get opts core
} {root}


test tool-prototype-0006-0008 {Mixin color2} {
  $obj clay get opts option
} {option2}


test tool-prototype-0006-0009 {Mixin color2} {
  $obj clay get opts color
} {green}


test tool-prototype-0006-0010 {Mixin color2} {
  $obj clay ancestors
} {::MixinColor2 ::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}

$obj clay mixinmap option MixinOption1

test tool-prototype-0007-0001 {Mixin color2 + Option1} {
  $obj info root
} {MixinRoot}


test tool-prototype-0007-0002 {Mixin color2 + Option1} {
  $obj info option
} {MixinOption1}


test tool-prototype-0007-0003 {Mixin color2 + Option1} {
  $obj info color
} {MixinColor2}


test tool-prototype-0007-0004 {Mixin color2 + Option1} {
  $obj info other
} {MixinOption1}


test tool-prototype-0007-0005 {Mixin color2 + Option1} {
  $obj info shade
} {green}


test tool-prototype-0007-0006 {Mixin color2 + Option1} {
  $obj clay get opts
} {color green option option1 core root}


test tool-prototype-0007-0007 {Mixin color2 + Option1} {
  $obj clay get opts core
} {root}


test tool-prototype-0007-0008 {Mixin color2 + Option1} {
  $obj clay get opts option
} {option1}


test tool-prototype-0007-0009 {Mixin color2 + Option1} {
  $obj clay get opts color
} {green}


test tool-prototype-0007-0010 {Mixin color2 + Option1} {
  $obj clay ancestors
} {::MixinColor2 ::MixinOption1 ::MixinRoot ::clay::object}

$obj clay mixinmap option {}

test tool-prototype-0008-0001 {Mixin color2 + no option} {
  $obj info root
} {MixinRoot}


test tool-prototype-0008-0002 {Mixin color2 + no option} {
  $obj info option
} {Undefined}


test tool-prototype-0008-0003 {Mixin color2 + no option} {
  $obj info color
} {MixinColor2}


test tool-prototype-0008-0004 {Mixin color2 + no option} {
  $obj info other
} {Undefined}


test tool-prototype-0008-0005 {Mixin color2 + no option} {
  $obj info shade
} {green}


test tool-prototype-0008-0006 {Mixin color2 + no option} {
  $obj clay get opts
} {color green core root option unset}


test tool-prototype-0008-0007 {Mixin color2 + no option} {
  $obj clay get opts core
} {root}


test tool-prototype-0008-0008 {Mixin color2 + no option} {
  $obj clay get opts option
} {unset}


test tool-prototype-0008-0009 {Mixin color2 + no option} {
  $obj clay get opts color
} {green}


test tool-prototype-0008-0010 {Mixin color2 + no option} {
  $obj clay ancestors
} {::MixinColor2 ::MixinRoot ::clay::object}

$obj clay mixinmap color {}

test tool-prototype-0009-0001 {Mixin core (return to normal)} {
  $obj info root
} {MixinRoot}


test tool-prototype-0009-0002 {Mixin core (return to normal)} {
  $obj info option
} {Undefined}


test tool-prototype-0009-0003 {Mixin core (return to normal)} {
  $obj info color
} {Undefined}


test tool-prototype-0009-0004 {Mixin core (return to normal)} {
  $obj info other
} {Undefined}


test tool-prototype-0009-0005 {Mixin core (return to normal)} {
  $obj info shade
} {avacodo}


test tool-prototype-0009-0006 {Mixin core (return to normal)} {
  $obj clay get opts
} {core root option unset color unset}


test tool-prototype-0009-0007 {Mixin core (return to normal)} {
  $obj clay get opts core
} {root}


test tool-prototype-0009-0008 {Mixin core (return to normal)} {
  $obj clay get opts option
} {unset}


test tool-prototype-0009-0009 {Mixin core (return to normal)} {
  $obj clay get opts color
} {unset}


test tool-prototype-0009-0010 {Mixin core (return to normal)} {
  $obj clay ancestors
} {::MixinRoot ::clay::object}


###
# Tip479 Tests
###
clay::define tip479class {

  Method newitem dictargs {
    id {type: number}
    color {default: green}
    shape {options: {round square}}
    flavor {default: grape}
  } {
    my variable items
    foreach {f v} $args {
      dict set items $id $f $v
    }
    if {"color" ni [dict keys $args]} {
      dict set items $id color $color
    }
    return [dict get $items $id]
  }

  method itemget {id field} {
    my variable items
    return [dict get $id $field]
  }
}

set obj [tip479class new]
test tip479-001 {Test that a later ensemble definition trumps a more primitive one} {
  $obj newitem id 1 color orange shape round
} {id 1 color orange shape round}

# Fail because we left off a mandatory argument
test tip479-002 {Test that a later ensemble definition trumps a more primitive one} -body {
  $obj newitem id 2
} -result {shape is required} -returnCodes error

###
# Leave off a value that has a default
# note: Method had special handling for color, but not flavor
###
test tip479-003 {Test that a later ensemble definition trumps a more primitive one} {
  $obj newitem id 3 shape round
} {id 3 shape round color green}

###
# Add extra arguments
###
test tip479-004 {Test that a later ensemble definition trumps a more primitive one} {
  $obj newitem id 4 shape round trim leather
} {id 4 shape round trim leather color green}

clay::define tip479classE {

  Ensemble item::new dictargs {
    id {type: number}
    color {default: green}
    shape {options: {round square}}
    flavor {default: grape}
  } {
    my variable items
    foreach {f v} $args {
      dict set items $id $f $v
    }
    if {"color" ni [dict keys $args]} {
      dict set items $id color $color
    }
    return [dict get $items $id]
  }

  Ensemble item::get {id field} {
    my variable items
    return [dict get $id $field]
  }
}


set obj [tip479classE new]
test tip479-001 {Test that a later ensemble definition trumps a more primitive one} {
  $obj item new id 1 color orange shape round
} {id 1 color orange shape round}

# Fail because we left off a mandatory argument
test tip479-002 {Test that a later ensemble definition trumps a more primitive one} -body {
  $obj item new id 2
} -result {shape is required} -returnCodes error

###
# Leave off a value that has a default
# note: Method had special handling for color, but not flavor
###
test tip479-003 {Test that a later ensemble definition trumps a more primitive one} {
  $obj item new id 3 shape round
} {id 3 shape round color green}

###
# Add extra arguments
###
test tip479-004 {Test that a later ensemble definition trumps a more primitive one} {
  $obj item new id 4 shape round trim leather
} {id 4 shape round trim leather color green}



testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:




if {![package vsatisfies [package provide Tcl] 8.7]} {return}
puts "Repeating tests with 8.7 features"
namespace eval ::oo::dialect {}
set ::oo::dialect::has(tip470) 1

# clay.test - Copyright (c) 2018 Sean Woods
# -------------------------------------------------------------------------

set MODDIR [file dirname [file dirname [file join [pwd] [info script]]]]
if {[file exists [file join $MODDIR devtools testutilities.tcl]]} {
  # Running inside tcllib
  set TCLLIBMOD $MODDIR
} else {
  set TCLLIBMOD [file join $MODDIR .. .. tcllib modules]
}
source [file join $TCLLIBMOD devtools testutilities.tcl]

testsNeedTcl     8.6
testsNeedTcltest 2
testsNeed        TclOO 1

support {}
testing {
    useLocal clay.tcl clay
}


set ::clay::trace 0



# -------------------------------------------------------------------------
# Handle multiple implementation testing
#

array set preserve [array get ::clay::uuid::accel]

proc implementations {} {
    variable ::clay::uuid::accel
    foreach {a v} [array get accel] {if {$v} {lappend r $a}}
    lappend r tcl; set r
}

proc select_implementation {impl} {
    variable ::clay::uuid::accel
    foreach e [array names accel] { set accel($e) 0 }
    if {[string compare "tcl" $impl] != 0} {
        set accel($impl) 1
    }
}

proc reset_implementation {} {
    variable ::clay::uuid::accel
    array set accel [array get ::preserve]
}

# -------------------------------------------------------------------------
# Setup any constraints
#

# -------------------------------------------------------------------------
# Now the package specific tests....
# -------------------------------------------------------------------------

# -------------------------------------------------------------------------

foreach impl [implementations] {
    select_implementation $impl

    test uuid-1.0-$impl "uuid requires args" {
        list [catch {clay::uuid} msg]
    } {1}

    test uuid-1.1-$impl "uuid generate should create a 36 char string uuid" {
        list [catch {string length [clay::uuid generate]} msg] $msg
    } {0 36}

    test uuid-1.2-$impl "uuid comparison of uuid with self should be true" {
        list [catch {
            set a [clay::uuid generate]
            clay::uuid equal $a $a
        } msg] $msg
    } {0 1}

    test uuid-1.3-$impl "uuid comparison of two different uuids should be false" {
        list [catch {
            set a [clay::uuid generate]
            set b [clay::uuid generate]
            clay::uuid equal $a $b
        } msg] $msg
    } {0 0}

    reset_implementation
}


# Modification History:
###
# Modification 2018-10-30
# Fixed an error in our ancestry mapping and developed tests to
# ensure we are actually following in the order TclOO follows methods
###
# Modification 2018-10-21
# The clay metaclass no longer exports the clay method
# to oo::class and oo::object, and clay::ancestors no
# longer returns any class that lacks the clay method
###
# Modification 2018-10-10
# clay::ancestors now rigged to descend into all classes depth-first
# and then place metaclasses at the end of the search
###
# -------------------------------------------------------------------------

# -------------------------------------------------------------------------
# Test Helpers
###
proc dict_compare {a b} {
  set result {}
  set A {}
  dict for {f v} $a {
    set f [string trim $f :/]
    if {$f eq {.}} continue
    dict set A $f $v
  }
  set B {}
  dict for {f v} $b {
    set f [string trim $f :/]
    if {$f eq {.}} continue
    dict set B $f $v
  }
  dict for {f v} $A {
    if {[dict exists $B $f]} {
      if {[dict get $B $f] ne $v} {
        lappend result [list B $f [dict get $B $f] [list != $v]]
      }
    } else {
      lappend result [list B $f $v missing]
    }
  }
  dict for {f v} $B {
    if {![dict exists $A $f]} {
      lappend result [list A $f $v missing]
    }
  }
  return $result
}

test dict-compare-001 {Test our testing method} {
  dict_compare {} {}
} {}

test dict-compare-002 {Test our testing method} {
  dict_compare {a 1} {}
} {{B a 1 missing}}

test dict-compare-003 {Test our testing method} {
  dict_compare {a 1 b 2} {a 1 b 2}
} {}

test dict-compare-003.a {Test our testing method} {
  dict_compare {a 1 b 2} {b 2 a 1 }
} {}

test dict-compare-003.b {Test our testing method} {
  dict_compare {b 2 a 1} {a 1 b 2}
} {}


test dict-compare-004 {Test our testing method} {
  dict_compare {a: 1 b: 2} {a 1 b 2}
} {}

test dict-compare-005 {Test our testing method} {
  dict_compare {a 1 b 3} {a 1 b 2}
} {{B b 2 {!= 3}}}


###
# Test canonical mapping
###


test {test-storage-0001} {Test ::clay::tree::storage with foo bar baz} {
  clay::tree::storage {foo bar baz}
} {foo bar baz}


test {test-storage-0002} {Test ::clay::tree::storage with foo bar baz/} {
  clay::tree::storage {foo bar baz/}
} {foo bar baz}


test {test-storage-0003} {Test ::clay::tree::storage with foo bar .} {
  clay::tree::storage {foo bar .}
} {foo bar .}


test {test-storage-0004} {Test ::clay::tree::storage with foo/ bar/ .} {
  clay::tree::storage {foo/ bar/ .}
} {foo bar .}


test {test-storage-0005} {Test ::clay::tree::storage with foo . bar . baz .} {
  clay::tree::storage {foo . bar . baz .}
} {foo . bar . baz .}


test {test-storage-0006} {Test ::clay::tree::storage with foo bar baz bat:} {
  clay::tree::storage {foo bar baz bat:}
} {foo bar baz bat:}


test {test-storage-0007} {Test ::clay::tree::storage with foo:} {
  clay::tree::storage {foo:}
} {foo:}


test {test-storage-0008} {Test ::clay::tree::storage with foo/bar/baz/bat:} {
  clay::tree::storage {foo/bar/baz/bat:}
} {foo bar baz bat:}


dict set r foo/ bar/ baz 1
dict set s foo/ bar/ baz 0
set t [clay::tree::merge $r $s]

test rmerge-0001 {Test that the root is marked as a branch} {
  dict get $t foo bar baz
} 0

set r [dict create]
clay::tree::dictmerge r {
  foo/ {
    bar/ {
      baz 1
      bing: 2
      bang { bim 3 boom 4 }
      womp: {a 1 b 2}
    }
  }
}

test dictmerge-0001 {Test that the root is marked as a branch} {
  dict exists $r .
} 1
test dictmerge-0002 {Test that branch foo is marked correctly} {
  dict exists $r foo .
} 1
test dictmerge-0003 {Test that branch bar is marked correctly} {
  dict exists $r foo bar .
} 1
test dictmerge-0004 {Test that leaf foo/bar/bang is not marked as branch despite being a dict} {
  dict exists $r foo bar bang .
} 0
test dictmerge-0004 {Test that leaf foo/bar/bang/bim exists} {
  dict exists $r foo bar bang bim
} 1
test dictmerge-0005 {Test that leaf foo/bar/bang/boom exists} {
  dict exists $r foo bar bang boom
} 1

###
# Replace bang with bang/
###
clay::tree::dictmerge r {
  foo/ {
    bar/ {
      bang/ {
        whoop 1
      }
    }
  }
}

test dictmerge-0006 {Test that leaf foo/bar/bang/bim ceases to exist} {
  dict exists $r foo bar bang bim
} 0
test dictmerge-0007 {Test that leaf foo/bar/bang/boom exists} {
  dict exists $r foo bar bang boom
} 0

test dictmerge-0008 {Test that leaf foo/bar/bang is now a branch} {
  dict exists $r foo bar bang .
} 1

test branch-0001 {Test that foo/ is a branch} {
  clay::tree::is_branch $r foo/
} 1
test branch-0002 {Test that foo is a branch} {
  clay::tree::is_branch $r foo
} 1
test branch-0003 {Test that foo/bar/ is a branch} {
  clay::tree::is_branch $r {foo/ bar/}
} 1
test branch-0004 {Test that foo bar is not branch} {
  clay::tree::is_branch $r {foo bar}
} 1
test branch-0004 {Test that foo/ bar is not branch} {
  clay::tree::is_branch $r {foo/ bar}
} 0


test {test-branch-0001} {Test that  foo is_branch = 1} {
  clay::tree::is_branch $r { foo}
} 1


test {test-branch-0002} {Test that  foo: is_branch = 0} {
  clay::tree::is_branch $r { foo:}
} 0


test {test-branch-0003} {Test that  foo/ is_branch = 1} {
  clay::tree::is_branch $r { foo/}
} 1


test {test-branch-0004} {Test that  .foo is_branch = 0} {
  clay::tree::is_branch $r { .foo}
} 0


test {test-branch-0005} {Test that foo bar is_branch = 1} {
  clay::tree::is_branch $r {foo bar}
} 1


test {test-branch-0006} {Test that foo bar: is_branch = 0} {
  clay::tree::is_branch $r {foo bar:}
} 0


test {test-branch-0007} {Test that foo bar/ is_branch = 1} {
  clay::tree::is_branch $r {foo bar/}
} 1


test {test-branch-0008} {Test that foo .bar is_branch = 0} {
  clay::tree::is_branch $r {foo .bar}
} 0


test {test-branch-0009} {Test that foo bar baz is_branch = 0} {
  clay::tree::is_branch $r {foo bar baz}
} 0


test {test-branch-0010} {Test that foo bar baz: is_branch = 0} {
  clay::tree::is_branch $r {foo bar baz:}
} 0


test {test-branch-0011} {Test that foo bar baz/ is_branch = 1} {
  clay::tree::is_branch $r {foo bar baz/}
} 1


test {test-branch-0012} {Test that foo bar .baz is_branch = 0} {
  clay::tree::is_branch $r {foo bar .baz}
} 0


test {test-branch-0013} {Test that foo bar bing is_branch = 0} {
  clay::tree::is_branch $r {foo bar bing}
} 0


test {test-branch-0014} {Test that foo bar bing: is_branch = 0} {
  clay::tree::is_branch $r {foo bar bing:}
} 0


test {test-branch-0015} {Test that foo bar bing/ is_branch = 1} {
  clay::tree::is_branch $r {foo bar bing/}
} 1


test {test-branch-0016} {Test that foo bar .bing is_branch = 0} {
  clay::tree::is_branch $r {foo bar .bing}
} 0


test {test-branch-0017} {Test that foo bar bang is_branch = 1} {
  clay::tree::is_branch $r {foo bar bang}
} 1


test {test-branch-0018} {Test that foo bar bang: is_branch = 0} {
  clay::tree::is_branch $r {foo bar bang:}
} 0


test {test-branch-0019} {Test that foo bar bang/ is_branch = 1} {
  clay::tree::is_branch $r {foo bar bang/}
} 1


test {test-branch-0020} {Test that foo bar .bang is_branch = 0} {
  clay::tree::is_branch $r {foo bar .bang}
} 0


test {test-branch-0021} {Test that foo bar bang whoop is_branch = 0} {
  clay::tree::is_branch $r {foo bar bang whoop}
} 0


test {test-branch-0022} {Test that foo bar bang whoop: is_branch = 0} {
  clay::tree::is_branch $r {foo bar bang whoop:}
} 0


test {test-branch-0023} {Test that foo bar bang whoop/ is_branch = 1} {
  clay::tree::is_branch $r {foo bar bang whoop/}
} 1


test {test-branch-0024} {Test that foo bar bang .whoop is_branch = 0} {
  clay::tree::is_branch $r {foo bar bang .whoop}
} 0


# -------------------------------------------------------------------------
# dictmerge Testing - oometa
unset -nocomplain foo
clay::tree::dictmerge foo {
  option/ {
    color/ {
      label Color
      default green
    }
  }
}
clay::tree::dictmerge foo {
  option/ {
    color/ {
      default purple
    }
  }
}

test oometa-0001 {Invoking dictmerge with empty args on a non existent variable create an empty variable} {
  dict get $foo option color default
} purple
test oometa-0002 {Invoking dictmerge with empty args on a non existent variable create an empty variable} {
  dict get $foo option color label
} Color

unset -nocomplain foo
set foo {. {}}
::clay::tree::dictmerge foo {. {} color {. {} default green label Color}}
::clay::tree::dictmerge foo {. {} color {. {} default purple}}
test oometa-0003 {Recursive merge problem from oometa/clay find} {
  dict get $foo color default
} purple
test oometa-0004 {Recursive merge problem from oometa/clay find} {
  dict get $foo color label
} Color

unset -nocomplain foo
set foo {. {}}
::clay::tree::dictmerge foo {. {} color {. {} default purple}}
::clay::tree::dictmerge foo {. {} color {. {} default green label Color}}
test oometa-0005 {Recursive merge problem from oometa/clay find} {
  dict get $foo color default
} green
test oometa-0006 {Recursive merge problem from oometa/clay find} {
  dict get $foo color label
} Color

test oometa-0008 {Un-Sanitized output} {
  set foo
} {. {} color {. {} default green label Color}}

test oometa-0009 {Sanitize} {
  clay::tree::sanitize $foo
} {color {default green label Color}}


# -------------------------------------------------------------------------
# dictmerge Testing - clay
unset -nocomplain foo
test clay-0001 {Invoking dictmerge with empty args on a non existent variable create an empty variable} {
  ::clay::tree::dictmerge foo
  set foo
} {. {}}

unset -nocomplain foo
::clay::tree::dictset foo bar/ baz/ bell bang

test clay-0002 {For new entries dictmerge is essentially a set} {
  dict get $foo bar baz bell
} {bang}
::clay::tree::dictset foo bar/ baz/ boom/ bang
test clay-0003 {For entries that do exist a zipper merge is performed} {
  dict get $foo bar baz bell
} {bang}
test clay-0004 {For entries that do exist a zipper merge is performed} {
  dict get $foo bar baz boom
} {bang}

::clay::tree::dictset foo bar/ baz/ bop {color green flavor strawberry}

test clay-0005 {Leaves are replaced even if they look like a dict} {
  dict get $foo bar baz bop
} {color green flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bop {color yellow}
test clay-0006 {Leaves are replaced even if they look like a dict} {
  dict get $foo bar baz bop
} {color yellow}

::clay::tree::dictset foo bar/ baz/ bang/ {color green flavor strawberry}
test clay-0007a {Branches are merged} {
  dict get $foo bar baz bang
} {. {} color green flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bang/ color yellow
test clay-0007b {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color yellow flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bang/ {color blue}
test clay-0007c {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color blue flavor strawberry}

::clay::tree::dictset foo bar/ baz/ bang/ shape: {Sort of round}
test clay-0007d {Branches are merged} {
  dict get $foo bar baz bang
} {. {} color blue flavor strawberry shape: {Sort of round}}

::clay::tree::dictset foo bar/ baz/ bang/ color yellow
test clay-0007e {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color yellow flavor strawberry shape: {Sort of round}}

::clay::tree::dictset foo bar/ baz/ bang/ {color blue}
test clay-0007f {Branches are merged}  {
  dict get $foo bar baz bang
} {. {} color blue flavor strawberry shape: {Sort of round}}

::clay::tree::dictset foo dict my_var 10
::clay::tree::dictset foo dict my_other_var 9

test clay-0007g {Branches are merged}  {
  dict get $foo dict
} {. {} my_var 10 my_other_var 9}

::clay::tree::dictset foo dict/ my_other_other_var 8
test clay-0007h {Branches are merged}  {
  dict get $foo dict
} {. {} my_var 10 my_other_var 9 my_other_other_var 8}


::clay::tree::dictmerge foo {option/ {color {type color} flavor {sense taste}}}
::clay::tree::dictmerge foo {option/ {format {default ascii}}}

test clay-0008 {Whole dicts are merged}  {
  dict get $foo option color
} {type color}
test clay-0009 {Whole dicts are merged}  {
  dict get $foo option flavor
} {sense taste}
test clay-0010 {Whole dicts are merged}  {
  dict get $foo option format
} {default ascii}

###
# Tests for the httpd module
###
test clay-0010 {Test that leaves are merged properly}
set bar {}
::clay::tree::dictmerge bar {
   proxy/ {port 10101 host myhost.localhost}
}
::clay::tree::dictmerge bar {
   mimetxt {Host: localhost
Content_Type: text/plain
Content-Length: 15
}
   http {HTTP_HOST {} CONTENT_LENGTH 15 HOST localhost CONTENT_TYPE text/plain UUID 3a7b4cdc-28d7-49b7-b18d-9d7d18382b9e REMOTE_ADDR 127.0.0.1 REMOTE_HOST 127.0.0.1 REQUEST_METHOD POST REQUEST_URI /echo REQUEST_PATH echo REQUEST_VERSION 1.0 DOCUMENT_ROOT {} QUERY_STRING {} REQUEST_RAW {POST /echo HTTP/1.0} SERVER_PORT 10001 SERVER_NAME 127.0.0.1 SERVER_PROTOCOL HTTP/1.1 SERVER_SOFTWARE {TclHttpd 4.2.0} LOCALHOST 0} UUID 3a7b4cdc-28d7-49b7-b18d-9d7d18382b9e uriinfo {fragment {} port {} path echo scheme http host {} query {} pbare 0 pwd {} user {}}
   mixin {reply ::test::content.echo}
   prefix /echo
   proxy_port 10010
   proxy/ {host localhost}
}

test clay-0011 {Whole dicts are merged}  {
  dict get $bar proxy_port
} {10010}

test clay-0012 {Whole dicts are merged}  {
  dict get $bar http CONTENT_LENGTH
} 15
test clay-0013 {Whole dicts are merged}  {
  dict get $bar proxy host
} localhost
test clay-0014 {Whole dicts are merged}  {
  dict get $bar proxy port
} 10101


###
# Dialect Testing
###
::clay::dialect::create ::alpha

proc ::alpha::define::is_alpha {} {
  dict set ::testinfo([current_class]) is_alpha 1
}

::alpha::define ::alpha::object {
  is_alpha
}

::clay::dialect::create ::bravo ::alpha

proc ::bravo::define::is_bravo {} {
  dict set ::testinfo([current_class]) is_bravo 1
}

::bravo::define ::bravo::object {
  is_bravo
}

::clay::dialect::create ::charlie ::bravo

proc ::charlie::define::is_charlie {} {
  dict set ::testinfo([current_class]) is_charlie 1
}

::charlie::define ::charlie::object {
  is_charlie
}

::clay::dialect::create ::delta ::charlie

proc ::delta::define::is_delta {} {
  dict set ::testinfo([current_class]) is_delta 1
}

::delta::define ::delta::object {
  is_delta
}

::delta::class create adam {
  is_alpha
  is_bravo
  is_charlie
  is_delta
}

test oodialect-keyword-001 {Testing keyword application} {
  set ::testinfo(::adam)
} {is_alpha 1 is_bravo 1 is_charlie 1 is_delta 1}

test oodialect-keyword-002 {Testing keyword application} {
  set ::testinfo(::alpha::object)
} {is_alpha 1}

test oodialect-keyword-003 {Testing keyword application} {
  set ::testinfo(::bravo::object)
} {is_bravo 1}

test oodialect-keyword-004 {Testing keyword application} {
  set ::testinfo(::charlie::object)
} {is_charlie 1}

test oodialect-keyword-005 {Testing keyword application} {
  set ::testinfo(::delta::object)
} {is_delta 1}

###
# Declare an object from a namespace
###
namespace eval ::test1 {
  ::alpha::class create a {
    aliases A
    is_alpha
  }
  ::alpha::define b {
    aliases B BEE
    is_alpha
  }
  ::alpha::class create ::c {
    aliases C
    is_alpha
  }
  ::alpha::define ::d {
    aliases D
    is_alpha
  }
}

test oodialect-naming-001 {Testing keyword application} {
  set ::testinfo(::test1::a)
} {is_alpha 1}

test oodialect-naming-002 {Testing keyword application} {
  set ::testinfo(::test1::b)
} {is_alpha 1}

test oodialect-naming-003 {Testing keyword application} {
  set ::testinfo(::c)
} {is_alpha 1}

test oodialect-naming-004 {Testing keyword application} {
  set ::testinfo(::d)
} {is_alpha 1}

test oodialect-aliasing-001 {Testing keyword application} {
namespace eval ::test1 {
    ::alpha::define e {
       superclass A
    }
}
} ::test1::e

test oodialect-aliasing-002 {Testing keyword application} {
namespace eval ::test1 {
    ::bravo::define f {
       superclass A
    }
}
} ::test1::f


test oodialect-aliasing-003 {Testing aliase method on class} {
  ::test1::a aliases
} {::test1::A}

###
# Test modified 2018-10-21
###
test oodialect-ancestry-003 {Testing heritage} {
  ::clay::ancestors ::test1::f
} {}

###
# Test modified 2018-10-21
###
test oodialect-ancestry-004 {Testing heritage} {
  ::clay::ancestors ::alpha::object
} {}

###
# Test modified 2018-10-21
###
test oodialect-ancestry-005 {Testing heritage} {
  ::clay::ancestors ::delta::object
} {}



# -------------------------------------------------------------------------
# clay submodule testing
# -------------------------------------------------------------------------



# Test canonical path building
set path {const/ foo/ bar/ baz/}


test oo-clay-path-0001 "Test path: const foo bar baz" {
  ::clay::path const foo bar baz
} $path


test oo-clay-path-0002 "Test path: const/ foo/ bar/ baz" {
  ::clay::path const/ foo/ bar/ baz
} $path


test oo-clay-path-0003 "Test path: const/foo/bar/baz" {
  ::clay::path const/foo/bar/baz
} $path


test oo-clay-path-0004 "Test path: const/foo bar/baz" {
  ::clay::path const/foo bar/baz
} $path


test oo-clay-path-0005 "Test path: const/foo/bar baz" {
  ::clay::path const/foo/bar baz
} $path


test oo-clay-path-0006 "Test path: const foo/bar/baz" {
  ::clay::path const foo/bar/baz
} $path


test oo-clay-path-0007 "Test path: const foo bar/baz" {
  ::clay::path const foo bar/baz
} $path


test oo-clay-path-0008 "Test path: const/foo bar baz" {
  ::clay::path const/foo bar baz
} $path

set path {const/ foo/ bar/ baz/ bing}

test oo-clay-leaf-0001 "Test leaf: const foo bar baz bing" {
  ::clay::leaf const foo bar baz bing
} $path


test oo-clay-leaf-0002 "Test leaf: const/ foo/ bar/ baz/ bing" {
  ::clay::leaf const/ foo/ bar/ baz/ bing
} $path


test oo-clay-leaf-0003 "Test leaf: const/foo/bar/baz/bing" {
  ::clay::leaf const/foo/bar/baz/bing
} $path


test oo-clay-leaf-0004 "Test leaf: const/foo bar/baz/bing:" {
  ::clay::leaf const/foo bar/baz/bing:
} $path


test oo-clay-leaf-0005 "Test leaf: const/foo/bar baz bing" {
  ::clay::leaf const/foo/bar baz bing
} $path


test oo-clay-leaf-0006 "Test leaf: const/foo/bar baz bing:" {
  ::clay::leaf const/foo/bar baz bing:
} $path


test oo-clay-leaf-0007 "Test leaf: const foo/bar/baz/bing" {
  ::clay::leaf const foo/bar/baz/bing
} $path


test oo-clay-leaf-0008 "Test leaf: const foo bar/baz/bing" {
  ::clay::leaf const foo bar/baz/bing
} $path


test oo-clay-leaf-0009 "Test leaf: const/foo bar baz bing" {
  ::clay::leaf const/foo bar baz bing
} $path

namespace eval ::foo {}

clay::define ::foo::classa {

  clay set const color  blue
  clay set const/flavor strawberry
  clay set {const/ sound} zoink
  clay set info/ {
    animal no
    building no
    subelement {pedantic yes}
  }

  # Provide a method that returns a constant so we can compare clay's inheritance to
  # TclOO
  method color {} {
    return blue
  }
  method flavor {} {
    return strawberry
  }
  method sound {} {
    return zoink
  }

}


test oo-class-clay-method-0001 "Test ::foo::classa const/ color exists" {
  ::foo::classa clay exists const/ color
} 1


test oo-class-clay-method-0001 "Test ::foo::classa const/ color value" {
  ::foo::classa clay get const/ color
} {blue}


test oo-class-clay-method-0003 "Test ::foo::classa const/ flavor exists" {
  ::foo::classa clay exists const/ flavor
} 1


test oo-class-clay-method-0003 "Test ::foo::classa const/ flavor value" {
  ::foo::classa clay get const/ flavor
} {strawberry}


test oo-class-clay-method-0005 "Test ::foo::classa const/ sound exists" {
  ::foo::classa clay exists const/ sound
} 1


test oo-class-clay-method-0005 "Test ::foo::classa const/ sound value" {
  ::foo::classa clay get const/ sound
} {zoink}


test oo-class-clay-method-0007 "Test ::foo::classa info/ animal exists" {
  ::foo::classa clay exists info/ animal
} 1


test oo-class-clay-method-0007 "Test ::foo::classa info/ animal value" {
  ::foo::classa clay get info/ animal
} {no}


test oo-class-clay-method-0009 "Test ::foo::classa info/ building exists" {
  ::foo::classa clay exists info/ building
} 1


test oo-class-clay-method-0009 "Test ::foo::classa info/ building value" {
  ::foo::classa clay get info/ building
} {no}


test oo-class-clay-method-0011 "Test ::foo::classa info/ subelement exists" {
  ::foo::classa clay exists info/ subelement
} 1


test oo-class-clay-method-0011 "Test ::foo::classa info/ subelement value" {
  ::foo::classa clay get info/ subelement
} {pedantic yes}


clay::define ::foo::classb {
  clay set const/ color black
  method color {} {return black}
  clay set const/ flavor vanilla
  method flavor {} {return vanilla}
  clay set const/ feeling dread
  method feeling {} {return dread}
  clay set info/ subelement {spoon yes}
  method subelement {} {return {spoon yes}}

}


test oo-class-clay-method-0013 "Test ::foo::classb const/ color exists" {
  ::foo::classb clay exists const/ color
} 1


test oo-class-clay-method-0013 "Test ::foo::classb const/ color value" {
  ::foo::classb clay get const/ color
} {black}


test oo-class-clay-method-0015 "Test ::foo::classb const/ flavor exists" {
  ::foo::classb clay exists const/ flavor
} 1


test oo-class-clay-method-0015 "Test ::foo::classb const/ flavor value" {
  ::foo::classb clay get const/ flavor
} {vanilla}


test oo-class-clay-method-0017 "Test ::foo::classb const/ feeling exists" {
  ::foo::classb clay exists const/ feeling
} 1


test oo-class-clay-method-0017 "Test ::foo::classb const/ feeling value" {
  ::foo::classb clay get const/ feeling
} {dread}


test oo-class-clay-method-0019 "Test ::foo::classb info/ subelement exists" {
  ::foo::classb clay exists info/ subelement
} 1


test oo-class-clay-method-0019 "Test ::foo::classb info/ subelement value" {
  ::foo::classb clay get info/ subelement
} {spoon yes}


clay::define ::foo::class.ab {
superclass ::foo::classb ::foo::classa
}


clay::define ::foo::class.ba {
superclass ::foo::classa ::foo::classb
}

# -------------------------------------------------------------------------
# Singleton
::clay::define ::test::singletonbehavior {
  method bar {} {
    return CLASS
  }
  method booze {} {
    return CLASS
  }
  Ensemble foo::bang {} {
    return CLASS
  }
  Ensemble foo::both {} {
    return CLASS
  }
  Ensemble foo::mixin {} {
    return CLASS
  }
  Ensemble foo::sloppy {} {
    return CLASS
  }
}
::clay::define ::test::flavor.strawberry {
  clay define property flavor strawbery
  method bar {} {
    return STRAWBERRY
  }
  Ensemble foo::bing {} {
    return STRAWBERRY
  }
  Ensemble foo::both {} {
    return STRAWBERRY
  }
  Ensemble foo::mixin {} {
    return STRAWBERRY
  }
  Ensemble foo::sloppy {} {
    return STRAWBERRY
  }
}
::clay::singleton ::TEST {
  class ::test::singletonbehavior
  clay mixinmap flavor ::test::flavor.strawberry
  clay set property color green
  method bar {} {
    return OBJECT
  }
  method booze {} {
    return OBJECT
  }
  method baz {} {
    return OBJECT
  }
  Ensemble foo::bar {} {
    return OBJECT
  }
  Ensemble foo::both {} {
    return OBJECT
  }
}

test oo-object-singleton-001 {Test singleton superclass keyword} {
  ::TEST clay delegate class
} {::test::singletonbehavior}

test oo-object-singleton-002 {Test singleton ensemble 1} {
  ::TEST foo <list>
} {bang bar bing both mixin sloppy}

test oo-object-singleton-003 {Test singleton ensemble from script} {
  ::TEST foo bar
} {OBJECT}
test oo-object-singleton-004 {Test singleton ensemble from mixin} {
  ::TEST foo bing
} {STRAWBERRY}
test oo-object-singleton-005 {Test singleton ensemble from class} {
  ::TEST foo bang
} {CLASS}
# Test note: the behavior from TclOO is unexpected
# Intuitively, a local method should override a mixin
# but this is not the case
test oo-object-singleton-006 {Test singleton ensemble from conflict, should resolve to object} {
  ::TEST foo both
} {STRAWBERRY}
test oo-object-singleton-007 {Test singleton ensemble from conflict, should resolve to mixin} {
  ::TEST foo sloppy
} {STRAWBERRY}
###
# Test note:
# This should work but does not
###
#test oo-object-singleton-009 {Test property from mixin/class} {
#  ::TEST clay get property flavor
#} {strawberry}
test oo-object-singleton-008 {Test property from script} {
  ::TEST clay get property color
} {green}


# Test note: the behavior from TclOO is unexpected
# Intuitively, a local method should override a mixin
# but this is not the case
test oo-object-singleton-010 {Test method declared in script} {
  ::TEST bar
} {STRAWBERRY}

test oo-object-singleton-011 {Test method declared in script} {
  ::TEST booze
} {OBJECT}
TEST destroy

# OBJECT of ::foo::classa
set OBJECTA [::foo::classa new]

###
# Test object degation
###
proc ::foo::fakeobject {a b} {
  return [expr {$a + $b}]
}

::clay::object create TEST
TEST clay delegate funct ::foo::fakeobject
test oo-object-delegate-001 {Test object delegation} {
  ::TEST clay delegate
} {<class> ::clay::object <funct> ::foo::fakeobject}

test oo-object-delegate-002 {Test object delegation} {
  ::TEST clay delegate funct
} {::foo::fakeobject}

test oo-object-delegate-002a {Test object delegation} {
  ::TEST clay delegate <funct>
} {::foo::fakeobject}

test oo-object-delegate-003 {Test object delegation} {
  ::TEST <funct> 1 1
} {2}
test oo-object-delegate-004 {Test object delegation} {
  ::TEST <funct> 10 -7
} {3}

# Replace the function out from under
proc ::foo::fakeobject {a b} {
  return [expr {$a * $b}]
}
test oo-object-delegate-005 {Test object delegation} {
  ::TEST <funct> 10 -7
} {-70}

# Object with ::foo::classa mixed in
set MIXINA  [::oo::object new]
oo::objdefine $MIXINA mixin ::foo::classa


test oo-object-clay-method-native-0001 {Test native object gets the property const//color} {
  $OBJECTA clay get const/ color
} {blue}
test oo-object-clay-method-mixin-0001 {Test mixin object gets the property const//color} {
  $MIXINA clay get const/ color
} {blue}


test oo-object-clay-method-native-methodcheck-0001 {Test that const//color would mimic method interheritance for a native class} {
  $OBJECTA color
} {blue}
test oo-object-clay-method-mixin-0001 {Test that const//color would mimic method interheritance for a mixed in class} {
  $MIXINA color
} {blue}
    

test oo-object-clay-method-native-0002 {Test native object gets the property const//flavor} {
  $OBJECTA clay get const/ flavor
} {strawberry}
test oo-object-clay-method-mixin-0002 {Test mixin object gets the property const//flavor} {
  $MIXINA clay get const/ flavor
} {strawberry}


test oo-object-clay-method-native-methodcheck-0002 {Test that const//flavor would mimic method interheritance for a native class} {
  $OBJECTA flavor
} {strawberry}
test oo-object-clay-method-mixin-0002 {Test that const//flavor would mimic method interheritance for a mixed in class} {
  $MIXINA flavor
} {strawberry}
    

test oo-object-clay-method-native-0003 {Test native object gets the property const//sound} {
  $OBJECTA clay get const/ sound
} {zoink}
test oo-object-clay-method-mixin-0003 {Test mixin object gets the property const//sound} {
  $MIXINA clay get const/ sound
} {zoink}


test oo-object-clay-method-native-methodcheck-0003 {Test that const//sound would mimic method interheritance for a native class} {
  $OBJECTA sound
} {zoink}
test oo-object-clay-method-mixin-0003 {Test that const//sound would mimic method interheritance for a mixed in class} {
  $MIXINA sound
} {zoink}
    

test oo-object-clay-method-native-0004 {Test native object gets the property info//animal} {
  $OBJECTA clay get info/ animal
} {no}
test oo-object-clay-method-mixin-0004 {Test mixin object gets the property info//animal} {
  $MIXINA clay get info/ animal
} {no}


test oo-object-clay-method-native-0005 {Test native object gets the property info//building} {
  $OBJECTA clay get info/ building
} {no}
test oo-object-clay-method-mixin-0005 {Test mixin object gets the property info//building} {
  $MIXINA clay get info/ building
} {no}


test oo-object-clay-method-native-0006 {Test native object gets the property info//subelement} {
  $OBJECTA clay get info/ subelement
} {pedantic yes}
test oo-object-clay-method-mixin-0006 {Test mixin object gets the property info//subelement} {
  $MIXINA clay get info/ subelement
} {pedantic yes}

# -------------------------------------------------------------------------
# OBJECT of ::foo::classb
set OBJECTB [::foo::classb new]
# Object with ::foo::classb mixed in
set MIXINB  [::oo::object new]
oo::objdefine $MIXINB mixin ::foo::classb


test oo-object-clay-method-native-0007 {Test native object gets the property const//color} {
  $OBJECTB clay get const/ color
} {black}
test oo-object-clay-method-mixin-0007 {Test mixin object gets the property const//color} {
  $MIXINB clay get const/ color
} {black}


test oo-object-clay-method-native-methodcheck-0007 {Test that const//color would mimic method interheritance for a native class} {
  $OBJECTB color
} {black}
test oo-object-clay-method-mixin-0007 {Test that const//color would mimic method interheritance for a mixed in class} {
  $MIXINB color
} {black}
    

test oo-object-clay-method-native-0008 {Test native object gets the property const//flavor} {
  $OBJECTB clay get const/ flavor
} {vanilla}
test oo-object-clay-method-mixin-0008 {Test mixin object gets the property const//flavor} {
  $MIXINB clay get const/ flavor
} {vanilla}


test oo-object-clay-method-native-methodcheck-0008 {Test that const//flavor would mimic method interheritance for a native class} {
  $OBJECTB flavor
} {vanilla}
test oo-object-clay-method-mixin-0008 {Test that const//flavor would mimic method interheritance for a mixed in class} {
  $MIXINB flavor
} {vanilla}
    

test oo-object-clay-method-native-0009 {Test native object gets the property const//feeling} {
  $OBJECTB clay get const/ feeling
} {dread}
test oo-object-clay-method-mixin-0009 {Test mixin object gets the property const//feeling} {
  $MIXINB clay get const/ feeling
} {dread}


test oo-object-clay-method-native-methodcheck-0009 {Test that const//feeling would mimic method interheritance for a native class} {
  $OBJECTB feeling
} {dread}
test oo-object-clay-method-mixin-0009 {Test that const//feeling would mimic method interheritance for a mixed in class} {
  $MIXINB feeling
} {dread}
    

test oo-object-clay-method-native-0010 {Test native object gets the property info//subelement} {
  $OBJECTB clay get info/ subelement
} {spoon yes}
test oo-object-clay-method-mixin-0010 {Test mixin object gets the property info//subelement} {
  $MIXINB clay get info/ subelement
} {spoon yes}

# -------------------------------------------------------------------------
# OBJECT descended from ::foo::classa ::foo::classb
set OBJECTAB [::foo::class.ab new]
# Object where classes were mixed in ::foo::classa ::foo::classb
set MIXINAB  [::oo::object new]
# Test modified 2018-10-30, mixin order was wrong before
oo::objdefine $MIXINAB mixin ::foo::classb ::foo::classa


test oo-object-clay-method-native-0011 {Test native object gets the property const//color} {
  $OBJECTAB clay get const/ color
} {black}
test oo-object-clay-method-mixin-0011 {Test mixin object gets the property const//color} {
  $MIXINAB clay get const/ color
} {black}


test oo-object-clay-method-native-methodcheck-0011 {Test that const//color would mimic method interheritance for a native class} {
  $OBJECTAB color
} {black}
test oo-object-clay-method-mixin-0011 {Test that const//color would mimic method interheritance for a mixed in class} {
  $MIXINAB color
} {black}
    

test oo-object-clay-method-native-0012 {Test native object gets the property const//flavor} {
  $OBJECTAB clay get const/ flavor
} {vanilla}
test oo-object-clay-method-mixin-0012 {Test mixin object gets the property const//flavor} {
  $MIXINAB clay get const/ flavor
} {vanilla}


test oo-object-clay-method-native-methodcheck-0012 {Test that const//flavor would mimic method interheritance for a native class} {
  $OBJECTAB flavor
} {vanilla}
test oo-object-clay-method-mixin-0012 {Test that const//flavor would mimic method interheritance for a mixed in class} {
  $MIXINAB flavor
} {vanilla}
    

test oo-object-clay-method-native-0013 {Test native object gets the property const//feeling} {
  $OBJECTAB clay get const/ feeling
} {dread}
test oo-object-clay-method-mixin-0013 {Test mixin object gets the property const//feeling} {
  $MIXINAB clay get const/ feeling
} {dread}


test oo-object-clay-method-native-methodcheck-0013 {Test that const//feeling would mimic method interheritance for a native class} {
  $OBJECTAB feeling
} {dread}
test oo-object-clay-method-mixin-0013 {Test that const//feeling would mimic method interheritance for a mixed in class} {
  $MIXINAB feeling
} {dread}
    

test oo-object-clay-method-native-0014 {Test native object gets the property const//sound} {
  $OBJECTAB clay get const/ sound
} {zoink}
test oo-object-clay-method-mixin-0014 {Test mixin object gets the property const//sound} {
  $MIXINAB clay get const/ sound
} {zoink}


test oo-object-clay-method-native-methodcheck-0014 {Test that const//sound would mimic method interheritance for a native class} {
  $OBJECTAB sound
} {zoink}
test oo-object-clay-method-mixin-0014 {Test that const//sound would mimic method interheritance for a mixed in class} {
  $MIXINAB sound
} {zoink}
    

test oo-object-clay-method-native-0015 {Test native object gets the property info//subelement} {
  $OBJECTAB clay get info/ subelement
} {spoon yes}
test oo-object-clay-method-mixin-0015 {Test mixin object gets the property info//subelement} {
  $MIXINAB clay get info/ subelement
} {spoon yes}


test oo-object-clay-method-native-0016 {Test native object gets the property info//animal} {
  $OBJECTAB clay get info/ animal
} {no}
test oo-object-clay-method-mixin-0016 {Test mixin object gets the property info//animal} {
  $MIXINAB clay get info/ animal
} {no}


test oo-object-clay-method-native-0017 {Test native object gets the property info//building} {
  $OBJECTAB clay get info/ building
} {no}
test oo-object-clay-method-mixin-0017 {Test mixin object gets the property info//building} {
  $MIXINAB clay get info/ building
} {no}

# -------------------------------------------------------------------------
# OBJECT descended from ::foo::classb ::foo::classa
set OBJECTBA [::foo::class.ba new]
# Object where classes were mixed in ::foo::classb ::foo::classa
set MIXINBA  [::oo::object new]
# Test modified 2018-10-30, mixin order was wrong before
oo::objdefine $MIXINBA mixin ::foo::classa ::foo::classb


test oo-object-clay-method-native-0018 {Test native object gets the property} {
  $OBJECTBA clay get const/ color
} {blue}
test oo-object-clay-method-mixin-0018 {Test mixin object gets the property} {
  $MIXINBA clay get const/ color
} {blue}


test oo-object-clay-method-native-methodcheck-0018 {Test that const//color would mimic method interheritance for a native class} {
  $OBJECTBA color
} {blue}
test oo-object-clay-method-mixin-0018 {Test that const//color would mimic method interheritance for a mixed in class} {
  $MIXINBA color
} {blue}
    

test oo-object-clay-method-native-0019 {Test native object gets the property} {
  $OBJECTBA clay get const/ flavor
} {strawberry}
test oo-object-clay-method-mixin-0019 {Test mixin object gets the property} {
  $MIXINBA clay get const/ flavor
} {strawberry}


test oo-object-clay-method-native-methodcheck-0019 {Test that const//flavor would mimic method interheritance for a native class} {
  $OBJECTBA flavor
} {strawberry}
test oo-object-clay-method-mixin-0019 {Test that const//flavor would mimic method interheritance for a mixed in class} {
  $MIXINBA flavor
} {strawberry}
    

test oo-object-clay-method-native-0020 {Test native object gets the property} {
  $OBJECTBA clay get const/ sound
} {zoink}
test oo-object-clay-method-mixin-0020 {Test mixin object gets the property} {
  $MIXINBA clay get const/ sound
} {zoink}


test oo-object-clay-method-native-methodcheck-0020 {Test that const//sound would mimic method interheritance for a native class} {
  $OBJECTBA sound
} {zoink}
test oo-object-clay-method-mixin-0020 {Test that const//sound would mimic method interheritance for a mixed in class} {
  $MIXINBA sound
} {zoink}
    

test oo-object-clay-method-native-0021 {Test native object gets the property} {
  $OBJECTBA clay get const/ feeling
} {dread}
test oo-object-clay-method-mixin-0021 {Test mixin object gets the property} {
  $MIXINBA clay get const/ feeling
} {dread}


test oo-object-clay-method-native-methodcheck-0021 {Test that const//feeling would mimic method interheritance for a native class} {
  $OBJECTBA feeling
} {dread}
test oo-object-clay-method-mixin-0021 {Test that const//feeling would mimic method interheritance for a mixed in class} {
  $MIXINBA feeling
} {dread}
    

test oo-object-clay-method-native-0022 {Test native object gets the property} {
  $OBJECTBA clay get info/ animal
} {no}
test oo-object-clay-method-mixin-0022 {Test mixin object gets the property} {
  $MIXINBA clay get info/ animal
} {no}


test oo-object-clay-method-native-0023 {Test native object gets the property} {
  $OBJECTBA clay get info/ building
} {no}
test oo-object-clay-method-mixin-0023 {Test mixin object gets the property} {
  $MIXINBA clay get info/ building
} {no}


test oo-object-clay-method-native-0024 {Test native object gets the property} {
  $OBJECTBA clay get info/ subelement
} {pedantic yes}
test oo-object-clay-method-mixin-0024 {Test mixin object gets the property} {
  $MIXINBA clay get info/ subelement
} {pedantic yes}


###
# put a do-nothing constructor on the books
###
::clay::define ::clay::object {
  constructor args {}
}

oo::objdefine ::clay::object method foo args { return bar }

test clay-core-method-0001 {Test that adding methods to the core ::clay::object class works} {
  ::clay::object foo
} {bar}

namespace eval ::TEST {}
::clay::define ::TEST::myclass {
  clay color red
  clay flavor strawberry

}

###
# Test adding a clay property
###
test clay-class-clay-0001 {Test that a clay statement is recorded in the object of the class} {
  ::TEST::myclass clay get color
} red
test clay-class-clay-0002 {Test that a clay statement is recorded in the object of the class} {
  ::TEST::myclass clay get flavor
} strawberry

###
# Test that objects of the class get the same properties
###
set OBJ [::clay::object new {}]
set OBJ2 [::TEST::myclass new {}]

test clay-object-clay-a-0001 {Test that objects not thee class do not get properties} {
  $OBJ clay get color
} {}
test clay-object-clay-a-0002 {Test that objects not thee class do not get properties} {
  $OBJ clay get flavor
} {}
test clay-object-clay-a-0003 {Test that objects of the class get properties} {
  $OBJ2 clay get color
} red
test clay-object-clay-a-0004 {Test that objects of the class get properties} {
  $OBJ2 clay get flavor
} strawberry

###
# Test modified 2018-10-21
###
test clay-object-clay-a-0005 {Test the clay ancestors function} {
  $OBJ clay ancestors
} {::clay::object}

###
# Test modified 2018-10-21
###
test clay-object-clay-a-0006 {Test the clay ancestors function} {
  $OBJ2 clay ancestors
} {::TEST::myclass ::clay::object}

test clay-object-clay-a-0007 {Test the clay provenance  function} {
  $OBJ2 clay provenance  flavor
} ::TEST::myclass

###
# Test that object local setting override the class
###
test clay-object-clay-a-0008 {Test that object local setting override the class} {
  $OBJ2 clay set color purple
  $OBJ2 clay get color
} purple
test clay-object-clay-a-0009 {Test that object local setting override the class} {
  $OBJ2 clay provenance  color
} self

::clay::define ::TEST::myclasse {
  superclass ::TEST::myclass

  clay color blue
  method do args {
    return "I did $args"
  }

  Ensemble which::color {} {
    return [my clay get color]
  }
  clay set method_ensemble which farbe: {tailcall my Which_color {*}$args}
}

###
# Test clay information is passed town to subclasses
###
test clay-class-clay-0003 {Test that a clay statement is recorded in the object of the class} {
  ::TEST::myclasse clay get color
} blue
test clay-class-clay-0004 {Test that clay statements from the ancestors of this class are not present (we handle them seperately in objects)} {
  ::TEST::myclasse clay get flavor
} {}
test clay-class-clay-0005 {Test that clay statements from the ancestors of this class are found with the FIND method} {
  ::TEST::myclasse clay find flavor
} {strawberry}

###
# Test that properties reach objects
###
set OBJ3 [::TEST::myclasse new {}]
test clay-object-clay-b-0001 {Test that objects of the class get properties} {
  $OBJ3 clay get color
} blue
test clay-object-clay-b-0002 {Test the clay provenance  function} {
  $OBJ3 clay provenance  color
} ::TEST::myclasse
test clay-object-clay-b-0003 {Test that objects of the class get properties} {
  $OBJ3 clay get flavor
} strawberry
test clay-object-clay-b-0004 {Test the clay provenance  function} {
  $OBJ3 clay provenance  flavor
} ::TEST::myclass

###
# Test modified 2018-10-21
###
test clay-object-clay-b-0005 {Test the clay provenance  function} {
  $OBJ3 clay ancestors
} {::TEST::myclasse ::TEST::myclass ::clay::object}

###
# Test defining a standard method
###
test clay-object-method-0001 {Test and standard method} {
  $OBJ3 do this really cool thing
} {I did this really cool thing}

test clay-object-method-0003 {Test an ensemble} {
  $OBJ3 which color
} blue
# Test setting properties
test clay-object-method-0004 {Test an ensemble} {
  $OBJ3 clay set color black
  $OBJ3 which color
} black

# Test setting properties
test clay-object-method-0004 {Test an ensemble alias} {
  $OBJ3 which farbe
} black


###
# Added 2019-06-24
# Test that grabbing a leaf does not pollute the cache
###
::clay::define ::TEST::class_with_deep_tree {
  clay set tree deep has depth 1
  clay set tree shallow has depth 0
}

$OBJ3 clay mixinmap deep ::TEST::class_with_deep_tree

test clay-deep-nested-0001 {Test that a leaf query does not pollute the cache} {
  $OBJ3 clay get tree shallow has depth
} 0
test clay-deep-nested-0001 {Test that a leaf query does not pollute the cache} {
  $OBJ3 clay get tree
} {deep {has {depth 1}} shallow {has {depth 0}}}



###
# Test that if you try to replace a global command you get an error
###
test clay-nspace-0001 {Test that if you try to replace a global command you get an error} -body {
::clay::define open {
  method bar {} { return foo }

}
}  -returnCodes {error} -result "::open does not refer to an object"

::clay::define fubar {
  method bar {} { return foo }
}
test clay-nspace-0002 {Test a non qualified class ends up in the current namespace} {
  info commands ::fubar
} {::fubar}

namespace eval ::cluster {
::clay::define fubar {
  method bar {} { return foo }
}

::clay::define ::clay::pot {
  method bar {} { return foo }
}

}
test clay-nspace-0003 {Test a non qualified class ends up in the current namespace} {
  info commands ::cluster::fubar
} {::cluster::fubar}
test clay-nspace-0003 {Test a fully qualified class ends up in the proper namespace} {
  info commands ::clay::pot
} {::clay::pot}

#set ::clay::trace 3

###
# New test - Added 2019-09-15
# Test that the "method" variable is exposed to a default method
###

::clay::define ::ensembleWithDefault {
  Ensemble foo::bar {} { return A }
  Ensemble foo::baz {} { return B }
  Ensemble foo::bang {} { return C }

  Ensemble foo::default {} { return $method }
}


set OBJ [::ensembleWithDefault new]
test clay-ensemble-default-0001 {Test a normal ensemble method} {
  $OBJ foo bar
} {A}
test clay-ensemble-default-0002 {Test a normal ensemble method} {
  $OBJ foo baz
} {B}
test clay-ensemble-default-0003 {Test a normal ensemble method} {
  $OBJ foo <list>
} [lsort -dictionary {bar baz bang}]

test clay-ensemble-default-0004 {Test a normal ensemble method} {
  $OBJ foo bing
} {bing}
test clay-ensemble-default-0005 {Test a normal ensemble method} {
  $OBJ foo bong
} {bong}
###
# Mixin tests
###

###
# Define a core class
###
::clay::define ::TEST::thing {

  method do args {
    return "I did $args"
  }
}


::clay::define ::TEST::vegetable {

  clay color unknown
  clay flavor unknown

  Ensemble which::flavor {} {
    return [my clay get flavor]
  }
  Ensemble which::color {} {
    return [my clay get color]
  }

}

::clay::define ::TEST::animal {

  clay color unknown
  clay sound unknown

  Ensemble which::sound {} {
    return [my clay get sound]
  }
  Ensemble which::color {} {
    return [my clay get color]
  }
  method sound {} {
    return unknown
  }
}

::clay::define ::TEST::species.cat {
  superclass ::TEST::animal
  clay sound meow
  method sound {} {
    return meow
  }
}

::clay::define ::TEST::coloring.calico {
  clay color calico

}

::clay::define ::TEST::condition.dark {
  Ensemble which::color {} {
    return grey
  }
}

::clay::define ::TEST::mood.happy {
  Ensemble which::sound {} {
    return purr
  }
  method sound {} {
    return purr
  }
}
test clay-object-0001 {Test than an object is created when clay::define is invoked} {
  info commands ::TEST::mood.happy
} ::TEST::mood.happy

set OBJ [::TEST::thing new]
test clay-mixin-a-0001 {Test that prior to a mixin an ensemble doesn't exist} -body {
  $OBJ which color
} -returnCodes error -result {unknown method "which": must be clay, destroy or do}

test clay-mixin-a-0002 {Test and standard method from an ancestor} {
  $OBJ do this really cool thing
} {I did this really cool thing}

$OBJ clay mixinmap species ::TEST::animal
test clay-mixin-b-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {unknown}

test clay-mixin-b-0002 {Test that an ensemble is created during a mixin} {
  $OBJ which sound
} {unknown}

test clay-mixin-b-0003 {Test that an ensemble is created during a mixin}  -body {$OBJ which flavor} -returnCodes {error}  -result {unknown method which flavor. Valid: color sound}

###
# Test Modified: 2018-10-21
###
test clay-mixin-b-0004 {Test that mixins resolve in the correct order} {
  $OBJ clay ancestors
} {::TEST::animal ::TEST::thing ::clay::object}

###
# Replacing a mixin replaces the behaviors
###
$OBJ clay mixinmap species ::TEST::vegetable
test clay-mixin-c-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {unknown}
test clay-mixin-c-0002 {Test that an ensemble is created during a mixin}  -body {$OBJ which sound}  -returnCodes {error}  -result {unknown method which sound. Valid: color flavor}
test clay-mixin-c-0003 {Test that an ensemble is created during a mixin} {
  $OBJ which flavor
} {unknown}
###
# Test Modified: 2018-10-21
###
test clay-mixin-c-0004 {Test that mixins resolve in the correct order} {
  $OBJ clay ancestors
} {::TEST::vegetable ::TEST::thing ::clay::object}

###
# Replacing a mixin
$OBJ clay mixinmap species ::TEST::species.cat
test clay-mixin-e-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {unknown}
test clay-mixin-e-0002a {Test that an ensemble is created during a mixin} {
  $OBJ sound
} {meow}
test clay-mixin-e-0002b {Test that an ensemble is created during a mixin} {
  $OBJ clay get sound
} {meow}
test clay-mixin-e-0002 {Test that an ensemble is created during a mixin} {
  $OBJ which sound
} {meow}
test clay-mixin-e-0003 {Test that an ensemble is created during a mixin}  -body {$OBJ which flavor} -returnCodes {error}  -result {unknown method which flavor. Valid: color sound}
###
# Test Modified: 2018-10-30, 2018-10-21, 2018-10-10
###
test clay-mixin-e-0004 {Test that clay data follows the rules of inheritence and order of mixin} {
  $OBJ clay ancestors
} {::TEST::species.cat ::TEST::animal ::TEST::thing ::clay::object}

$OBJ clay mixinmap coloring ::TEST::coloring.calico
test clay-mixin-f-0001 {Test that an ensemble is created during a mixin} {
  $OBJ which color
} {calico}
test clay-mixin-f-0002 {Test that an ensemble is created during a mixin} {
  $OBJ which sound
} {meow}
test clay-mixin-f-0003 {Test that an ensemble is created during a mixin}  -body {$OBJ which flavor} -returnCodes {error}  -result {unknown method which flavor. Valid: color sound}

###
# Test modified 2018-10-30, 2018-10-21, 2018-10-10
###
test clay-mixin-f-0004 {Test that clay data follows the rules of inheritence and order of mixin} {
  $OBJ clay ancestors
} {::TEST::coloring.calico ::TEST::species.cat ::TEST::animal ::TEST::thing ::clay::object}

test clay-mixin-f-0005 {Test that clay data from a mixin works} {
  $OBJ clay provenance  color
} {::TEST::coloring.calico}

###
# Test variable initialization
###
::clay::define ::TEST::has_var {
  Variable my_variable 10

  method get_my_variable {} {
    my variable my_variable
    return $my_variable
  }
}

set OBJ [::TEST::has_var new]
test clay-class-variable-0001 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get variable/ my_variable
} {10}

# Modified 2018-10-30 (order is different)
test clay-class-variable-0002 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get variable
} {my_variable 10 DestroyEvent 0}

# Modified 2018-10-30 (order is different)
test clay-class-variable-0003 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay dget variable
} {. {} my_variable 10 DestroyEvent 0}

test clay-class-variable-0004 {Test that variables declared in the class definition are initialized} {
  $OBJ get_my_variable
} 10

###
# Test array initialization
###
::clay::define ::TEST::has_array {
  Array my_array {timeout 10}

  method get_my_array {field} {
    my variable my_array
    return $my_array($field)
  }
}

set OBJ [::TEST::has_array new]
test clay-class-array-0001 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get array
} {my_array {timeout 10}}

test clay-class-array-0002 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay dget array
} {. {} my_array {. {} timeout 10}}

test clay-class-array-0003 {Test that variables declared in the class definition are initialized} {
  $OBJ get_my_array timeout
} 10

::clay::define ::TEST::has_more_array {
  superclass ::TEST::has_array
  Array my_array {color blue}
}
test clay-class-array-0008 {Test that the parser injected the right value in the right place for clay to catch it} {
  ::TEST::has_more_array clay get array
} {my_array {color blue}}

test clay-class-array-0009 {Test that the parser injected the right value in the right place for clay to catch it} {
  ::TEST::has_more_array clay find array
} {my_array {timeout 10 color blue}}

# Modified 2018-10-30 (order is different)
set BOBJ [::TEST::has_more_array new]
test clay-class-array-0004 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay get array
} {my_array {color blue timeout 10}}

# Modified 2018-10-30 (order is different)
test clay-class-array-0005 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay dget array
} {. {} my_array {. {} color blue timeout 10}}

test clay-class-arrau-0006 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_array timeout
} 10
test clay-class-arrau-0007 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_array color
} blue

::clay::define ::TEST::has_empty_array {
  Array my_array {}

  method my_array_exists {} {
    my variable my_array
    return [info exists my_array]
  }
  method get {field} {
    my variable my_array
    return $my_array($field)
  }
  method set {field value} {
    my variable my_array
    set my_array($field) $value
  }
}

test clay-class-array-0008 {Test that an declaration of an array with no values produces and empty array} {
  set COBJ [::TEST::has_empty_array new]
  $COBJ my_array_exists
} 1

test clay-class-array-0009 {Test that an declaration of an array with no values produces and empty array} {
  $COBJ set test "A random value"
  $COBJ get test
} {A random value}
###
# Test dict initialization
###
::clay::define ::TEST::has_dict {
  Dict my_dict {timeout 10}

  method get_my_dict {args} {
    my variable my_dict
    if {[llength $args]==0} {
      return $my_dict
    }
    return [dict get $my_dict {*}$args]
  }

}

set OBJ [::TEST::has_dict new]
test clay-class-dict-0001 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay get dict
} {my_dict {timeout 10}}

test clay-class-dict-0002 {Test that the parser injected the right value in the right place for clay to catch it} {
  $OBJ clay dget dict
} {. {} my_dict {. {} timeout 10}}

test clay-class-dict-0003 {Test that variables declared in the class definition are initialized} {
  $OBJ get_my_dict timeout
} 10

test clay-class-dict-0004 {Test that an empty dict is annotated} {
  $OBJ clay get dict
} {my_dict {timeout 10}}


::clay::define ::TEST::has_more_dict {
  superclass ::TEST::has_dict
  Dict my_dict {color blue}
}
set BOBJ [::TEST::has_more_dict new]

# Modified 2018-10-30
test clay-class-dict-0004 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay get dict
} {my_dict {color blue timeout 10}}

# Modified 2018-10-30
test clay-class-dict-0005 {Test that the parser injected the right value in the right place for clay to catch it} {
  $BOBJ clay dget dict
} {. {} my_dict {. {} color blue timeout 10}}

test clay-class-dict-0006 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_dict timeout
} 10

test clay-class-dict-0007 {Test that variables declared in the class definition are initialized} {
  $BOBJ get_my_dict color
} blue

::clay::define ::TEST::has_empty_dict {
  Dict my_empty_dict {}

  method get_my_empty_dict {args} {
    my variable my_empty_dict
    if {[llength $args]==0} {
      return $my_empty_dict
    }
    return [dict get $my_empty_dict {*}$args]
  }
}

set COBJ [::TEST::has_empty_dict new]

test clay-class-dict-0008 {Test that the parser injected the right value in the right place for clay to catch it} {
  $COBJ clay dget dict
} {my_empty_dict {. {}}}

test clay-class-dict-0009 {Test that an empty dict is initialized} {
  $COBJ get_my_empty_dict
} {}

###
# Test object delegation
###
::clay::define ::TEST::organelle {
  method add args {
    set total 0
    foreach item $args {
      set total [expr {$total+$item}]
    }
    return $total
  }
}
::clay::define ::TEST::master {
  constructor {} {
    set mysub [namespace current]::sub
    ::TEST::organelle create $mysub
    my clay delegate sub $mysub
  }
}

set OBJ [::TEST::master new]
###
# Test that delegation is working
###
test clay-delegation-0001 {Test an array driven ensemble} {
  $OBJ <sub> add 5 5
} 10


###
# Test the Ensemble keyword
###
::clay::define ::TEST::with_ensemble {

  Ensemble myensemble {pattern args} {
    set ensemble [self method]
    set emap [my clay ensemble_map $ensemble]
    set mlist [dict keys $emap [string tolower $pattern]]
    if {[llength $mlist] != 1} {
      error "Couldn't figure out what to do with $pattern"
    }
    set method [lindex $mlist 0]
    set argspec [dict get $emap $method argspec]
    set body    [dict get $emap $method body]
    if {$argspec ni {args {}}} {
      ::clay::dynamic_arguments $ensemble $method [list $argspec] {*}$args
    }
    eval $body
  }

  Ensemble myensemble::go args {
    return 1
  }
}

::clay::define ::TEST::with_ensemble.dance {
  Ensemble myensemble::dance args {
    return 1
  }
}
::clay::define ::TEST::with_ensemble.cannot_dance {
  Ensemble myensemble::dance args {
    return 0
  }
}

set OBJA [::clay::object new]
set OBJB [::clay::object new]

$OBJA clay mixinmap  core ::TEST::with_ensemble  friends ::TEST::with_ensemble.dance

$OBJB clay mixinmap  core ::TEST::with_ensemble  friends ::TEST::with_ensemble.cannot_dance

# Test go
test clay-dynamic-ensemble-0001 {Test ensemble with static method} {
  $OBJA myensemble go
} {1}
test clay-dynamic-ensemble-0002 {Test ensemble with static method} {
  $OBJB myensemble go
} {1}
# Test dance
test clay-dynamic-ensemble-0003 {Test ensemble with static method} {
  $OBJA myensemble dance
} {1}
test clay-dynamic-ensemble-0004 {Test ensemble with static method} {
  $OBJB myensemble dance
} {0}


###
# Class method testing
###

clay::class create WidgetClass {
  Class_Method working {} {
    return {Works}
  }

  Class_Method unknown args {
    set tkpath [lindex $args 0]
    if {[string index $tkpath 0] eq "."} {
      set obj [my new $tkpath {*}[lrange $args 1 end]]
      $obj tkalias $tkpath
      return $tkpath
    }
    next {*}$args
  }

  constructor {TkPath args} {
    my variable hull
    set hull $TkPath
    my clay delegate hull $TkPath
  }

  method tkalias tkname {
    set oldname $tkname
    my variable tkalias
    set tkalias $tkname
    set self [self]
    set hullwidget [::info object namespace $self]::tkwidget
    my clay delegate tkwidget $hullwidget
    #rename ::$tkalias $hullwidget
    my clay delegate hullwidget $hullwidget
    #::tool::object_rename [self] ::$tkalias
    rename [self] ::$tkalias
    #my Hull_Bind $tkname
    return $hullwidget
  }
}

test tool-class-method-000 {Test that class methods actually work...} {
  WidgetClass working
} {Works}

test tool-class-method-001 {Test Tk style creator} {
  WidgetClass .foo
  .foo clay delegate hull
} {.foo}

::clay::define WidgetNewClass {
  superclass WidgetClass
}

test tool-class-method-002 {Test Tk style creator inherited by morph} {
  WidgetNewClass .bar
  .bar clay delegate hull
} {.bar}



###
# Test ensemble inheritence
###
clay::define NestedClassA {
  Ensemble do::family {} {
    return NestedClassA
  }
  Ensemble do::something {} {
    return A
  }
  Ensemble do::whop {} {
    return A
  }
}
clay::define NestedClassB {
  superclass NestedClassA
  Ensemble do::family {} {
    set r [next family]
    lappend r NestedClassB
    return $r
  }
  Ensemble do::whop {} {
    return B
  }
}
clay::define NestedClassC {
  superclass NestedClassB

  Ensemble do::somethingelse {} {
    return C
  }
}
clay::define NestedClassD {
  superclass NestedClassB

  Ensemble do::somethingelse {} {
    return D
  }
}

clay::define NestedClassE {
  superclass NestedClassD NestedClassC
}

clay::define NestedClassF {
  superclass NestedClassC NestedClassD
}

NestedClassC create NestedObjectC

###
# These tests no longer work because method ensembles are now dynamically
# generated by object, that are not attached to the class anymore
#
####
#test tool-ensemble-001 {Test that an ensemble can access [next] even if no object of the ancestor class have been instantiated} {
#  NestedObjectC do family
#} {::NestedClassA ::NestedClassB ::NestedClassC}

test tool-ensemble-002 {Test that a later ensemble definition trumps a more primitive one} {
  NestedObjectC do whop
} {B}
test tool-ensemble-003 {Test that an ensemble definitions in an ancestor carry over} {
  NestedObjectC do something
} {A}

NestedClassE create NestedObjectE
NestedClassF create NestedObjectF


test tool-ensemble-004 {Test that ensembles follow the same rules for inheritance as methods} {
  NestedObjectE do somethingelse
} {D}

test tool-ensemble-005 {Test that ensembles follow the same rules for inheritance as methods} {
  NestedObjectF do somethingelse
} {C}

###
# Set of tests to exercise the mixinmap system
###
clay::define MixinMainClass {
  Variable mainvar unchanged

  Ensemble test::which {} {
    my variable mainvar
    return $mainvar
  }

  Ensemble test::main args {
    puts [list this is main $method $args]
  }

}

set mixoutscript {my test untool $class}
set mixinscript {my test tool $class}
clay::define MixinTool {
  Variable toolvar unchanged.mixin
  clay set mixin/ unmap-script $mixoutscript
  clay set mixin/ map-script $mixinscript
  clay set mixin/ name {Generic Tool}

  Ensemble test::untool class {
    my variable toolvar mainvar
    set mainvar {}
    set toolvar {}
  }

  Ensemble test::tool class {
    my variable toolvar mainvar
    set mainvar [$class clay get mixin name]
    set toolvar [$class clay get mixin name]
  }
}

clay::define MixinToolA {
  superclass MixinTool

  clay set mixin/ name {Tool A}
}

clay::define MixinToolB {
  superclass MixinTool

  clay set mixin/ name {Tool B}

  method test_newfunc {} {
    return "B"
  }
}

test tool-mixinspec-001 {Test application of mixin specs} {
  MixinTool clay get mixin map-script
} $mixinscript

test tool-mixinspec-002 {Test application of mixin specs} {
  MixinToolA clay get mixin map-script
} {}

test tool-mixinspec-003 {Test application of mixin specs} {
  MixinToolA clay find mixin map-script
} $mixinscript

test tool-mixinspec-004 {Test application of mixin specs} {
  MixinToolB clay find mixin map-script
} $mixinscript


MixinMainClass create mixintest

test tool-mixinmap-001 {Test object prior to mixins} {
  mixintest test which
} {unchanged}

mixintest clay mixinmap tool MixinToolA
test tool-mixinmap-002 {Test mixin map script ran} {
  mixintest test which
} {Tool A}

mixintest clay mixinmap tool MixinToolB

test tool-mixinmap-003 {Test mixin map script ran} {
  mixintest test which
} {Tool B}

test tool-mixinmap-003 {Test mixin map script ran} {
  mixintest test_newfunc
} {B}

mixintest clay mixinmap tool {}
test tool-mixinmap-004 {Test object prior to mixins} {
  mixintest test which
} {}



clay::define ::clay::object {
  method path {} {
    return [self class]
  }
}


clay::define ::MixinRoot {
  clay set opts core   root
  clay set opts option unset
  clay set opts color  unset

  Ensemble info::root {} {
    return MixinRoot
  }
  Ensemble info::shade {} {
    return avacodo
  }
  Ensemble info::default {} {
    return Undefined
  }

  method did {} {
    return MixinRoot
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

clay::define ::MixinOption1 {
  clay set opts option option1

  Ensemble info::option {} {
    return MixinOption1
  }
  Ensemble info::other {} {
    return MixinOption1
  }

  method did {} {
    return MixinOption1
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

clay::define ::MixinOption2 {
  superclass ::MixinOption1

  clay set opts option option2

  Ensemble info::option {} {
    return MixinOption2
  }

  method did {} {
    return MixinOption2
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}


clay::define ::MixinColor1 {
  clay set opts color blue

  Ensemble info::color {} {
    return MixinColor1
  }
  Ensemble info::shade {} {
    return blue
  }

  method did {} {
    return MixinColor1
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

clay::define ::MixinColor2 {
  clay set opts color green

  Ensemble info::color {} {
    return MixinColor2
  }
  Ensemble info::shade {} {
    return green
  }

  method did {} {
    return MixinColor2
  }

  method path {} {
    return [list [self class] {*}[next]]
  }
}

set obj [clay::object new]

$obj clay mixinmap root ::MixinRoot


test tool-prototype-0001-0001 {Mixin core} {
  $obj info root
} {MixinRoot}


test tool-prototype-0001-0002 {Mixin core} {
  $obj info option
} {Undefined}


test tool-prototype-0001-0003 {Mixin core} {
  $obj info color
} {Undefined}


test tool-prototype-0001-0004 {Mixin core} {
  $obj info other
} {Undefined}


test tool-prototype-0001-0005 {Mixin core} {
  $obj info shade
} {avacodo}


test tool-prototype-0001-0006 {Mixin core} {
  $obj did
} {MixinRoot}


test tool-prototype-0001-0007 {Mixin core} {
  $obj path
} {::MixinRoot ::clay::object}


test tool-prototype-0001-0008 {Mixin core} {
  $obj clay get opts
} {core root option unset color unset}


test tool-prototype-0001-0009 {Mixin core} {
  $obj clay get opts core
} {root}


test tool-prototype-0001-0010 {Mixin core} {
  $obj clay get opts option
} {unset}


test tool-prototype-0001-0011 {Mixin core} {
  $obj clay get opts color
} {unset}


test tool-prototype-0001-0012 {Mixin core} {
  $obj clay ancestors
} {::MixinRoot ::clay::object}

$obj clay mixinmap option ::MixinOption1

test tool-prototype-0002-0001 {Mixin option1} {
  $obj info root
} {MixinRoot}


test tool-prototype-0002-0002 {Mixin option1} {
  $obj info option
} {MixinOption1}


test tool-prototype-0002-0003 {Mixin option1} {
  $obj info color
} {Undefined}


test tool-prototype-0002-0004 {Mixin option1} {
  $obj info other
} {MixinOption1}


test tool-prototype-0002-0005 {Mixin option1} {
  $obj info shade
} {avacodo}


test tool-prototype-0002-0006 {Mixin option1} {
  $obj did
} {MixinOption1}


test tool-prototype-0002-0007 {Mixin option1} {
  $obj path
} {::MixinOption1 ::MixinRoot ::clay::object}


test tool-prototype-0002-0008 {Mixin option1} {
  $obj clay get opts
} {option option1 core root color unset}


test tool-prototype-0002-0009 {Mixin option1} {
  $obj clay get opts core
} {root}


test tool-prototype-0002-0010 {Mixin option1} {
  $obj clay get opts option
} {option1}


test tool-prototype-0002-0011 {Mixin option1} {
  $obj clay get opts color
} {unset}


test tool-prototype-0002-0012 {Mixin option1} {
  $obj clay ancestors
} {::MixinOption1 ::MixinRoot ::clay::object}


set obj2 [clay::object new]
$obj2 clay mixinmap root ::MixinRoot option ::MixinOption1

$obj clay mixinmap option ::MixinOption1

test tool-prototype-0003-0001 {Mixin option1 - clean object} {
  $obj2 info root
} {MixinRoot}


test tool-prototype-0003-0002 {Mixin option1 - clean object} {
  $obj2 info option
} {MixinOption1}


test tool-prototype-0003-0003 {Mixin option1 - clean object} {
  $obj2 info color
} {Undefined}


test tool-prototype-0003-0004 {Mixin option1 - clean object} {
  $obj2 info other
} {MixinOption1}


test tool-prototype-0003-0005 {Mixin option1 - clean object} {
  $obj2 info shade
} {avacodo}


test tool-prototype-0003-0006 {Mixin option1 - clean object} {
  $obj2 did
} {MixinOption1}


test tool-prototype-0003-0007 {Mixin option1 - clean object} {
  $obj2 path
} {::MixinOption1 ::MixinRoot ::clay::object}


test tool-prototype-0003-0008 {Mixin option1 - clean object} {
  $obj2 clay get opts
} {option option1 core root color unset}


test tool-prototype-0003-0009 {Mixin option1 - clean object} {
  $obj2 clay get opts core
} {root}


test tool-prototype-0003-0010 {Mixin option1 - clean object} {
  $obj2 clay get opts option
} {option1}


test tool-prototype-0003-0011 {Mixin option1 - clean object} {
  $obj2 clay get opts color
} {unset}


test tool-prototype-0003-0012 {Mixin option1 - clean object} {
  $obj2 clay ancestors
} {::MixinOption1 ::MixinRoot ::clay::object}

$obj clay mixinmap option ::MixinOption2

test tool-prototype-0004-0001 {Mixin option2} {
  $obj info root
} {MixinRoot}


test tool-prototype-0004-0002 {Mixin option2} {
  $obj info option
} {MixinOption2}


test tool-prototype-0004-0003 {Mixin option2} {
  $obj info color
} {Undefined}


test tool-prototype-0004-0004 {Mixin option2} {
  $obj info other
} {MixinOption1}


test tool-prototype-0004-0005 {Mixin option2} {
  $obj info shade
} {avacodo}


test tool-prototype-0004-0006 {Mixin option2} {
  $obj did
} {MixinOption2}


test tool-prototype-0004-0007 {Mixin option2} {
  $obj path
} {::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}


test tool-prototype-0004-0008 {Mixin option2} {
  $obj clay get opts
} {option option2 core root color unset}


test tool-prototype-0004-0009 {Mixin option2} {
  $obj clay get opts core
} {root}


test tool-prototype-0004-0010 {Mixin option2} {
  $obj clay get opts option
} {option2}


test tool-prototype-0004-0011 {Mixin option2} {
  $obj clay get opts color
} {unset}


test tool-prototype-0004-0012 {Mixin option2} {
  $obj clay ancestors
} {::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}

$obj clay mixinmap color MixinColor1

test tool-prototype-0005-0001 {Mixin color1} {
  $obj info root
} {MixinRoot}


test tool-prototype-0005-0002 {Mixin color1} {
  $obj info option
} {MixinOption2}


test tool-prototype-0005-0003 {Mixin color1} {
  $obj info color
} {MixinColor1}


test tool-prototype-0005-0004 {Mixin color1} {
  $obj info other
} {MixinOption1}


test tool-prototype-0005-0005 {Mixin color1} {
  $obj info shade
} {blue}


test tool-prototype-0005-0006 {Mixin color1} {
  $obj did
} {MixinColor1}


test tool-prototype-0005-0007 {Mixin color1} {
  $obj path
} {::MixinColor1 ::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}


test tool-prototype-0005-0008 {Mixin color1} {
  $obj clay get opts
} {color blue option option2 core root}


test tool-prototype-0005-0009 {Mixin color1} {
  $obj clay get opts core
} {root}


test tool-prototype-0005-0010 {Mixin color1} {
  $obj clay get opts option
} {option2}


test tool-prototype-0005-0011 {Mixin color1} {
  $obj clay get opts color
} {blue}


test tool-prototype-0005-0012 {Mixin color1} {
  $obj clay ancestors
} {::MixinColor1 ::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}

$obj clay mixinmap color MixinColor2

test tool-prototype-0006-0001 {Mixin color2} {
  $obj info root
} {MixinRoot}


test tool-prototype-0006-0002 {Mixin color2} {
  $obj info option
} {MixinOption2}


test tool-prototype-0006-0003 {Mixin color2} {
  $obj info color
} {MixinColor2}


test tool-prototype-0006-0004 {Mixin color2} {
  $obj info other
} {MixinOption1}


test tool-prototype-0006-0005 {Mixin color2} {
  $obj info shade
} {green}


test tool-prototype-0006-0006 {Mixin color2} {
  $obj clay get opts
} {color green option option2 core root}


test tool-prototype-0006-0007 {Mixin color2} {
  $obj clay get opts core
} {root}


test tool-prototype-0006-0008 {Mixin color2} {
  $obj clay get opts option
} {option2}


test tool-prototype-0006-0009 {Mixin color2} {
  $obj clay get opts color
} {green}


test tool-prototype-0006-0010 {Mixin color2} {
  $obj clay ancestors
} {::MixinColor2 ::MixinOption2 ::MixinOption1 ::MixinRoot ::clay::object}

$obj clay mixinmap option MixinOption1

test tool-prototype-0007-0001 {Mixin color2 + Option1} {
  $obj info root
} {MixinRoot}


test tool-prototype-0007-0002 {Mixin color2 + Option1} {
  $obj info option
} {MixinOption1}


test tool-prototype-0007-0003 {Mixin color2 + Option1} {
  $obj info color
} {MixinColor2}


test tool-prototype-0007-0004 {Mixin color2 + Option1} {
  $obj info other
} {MixinOption1}


test tool-prototype-0007-0005 {Mixin color2 + Option1} {
  $obj info shade
} {green}


test tool-prototype-0007-0006 {Mixin color2 + Option1} {
  $obj clay get opts
} {color green option option1 core root}


test tool-prototype-0007-0007 {Mixin color2 + Option1} {
  $obj clay get opts core
} {root}


test tool-prototype-0007-0008 {Mixin color2 + Option1} {
  $obj clay get opts option
} {option1}


test tool-prototype-0007-0009 {Mixin color2 + Option1} {
  $obj clay get opts color
} {green}


test tool-prototype-0007-0010 {Mixin color2 + Option1} {
  $obj clay ancestors
} {::MixinColor2 ::MixinOption1 ::MixinRoot ::clay::object}

$obj clay mixinmap option {}

test tool-prototype-0008-0001 {Mixin color2 + no option} {
  $obj info root
} {MixinRoot}


test tool-prototype-0008-0002 {Mixin color2 + no option} {
  $obj info option
} {Undefined}


test tool-prototype-0008-0003 {Mixin color2 + no option} {
  $obj info color
} {MixinColor2}


test tool-prototype-0008-0004 {Mixin color2 + no option} {
  $obj info other
} {Undefined}


test tool-prototype-0008-0005 {Mixin color2 + no option} {
  $obj info shade
} {green}


test tool-prototype-0008-0006 {Mixin color2 + no option} {
  $obj clay get opts
} {color green core root option unset}


test tool-prototype-0008-0007 {Mixin color2 + no option} {
  $obj clay get opts core
} {root}


test tool-prototype-0008-0008 {Mixin color2 + no option} {
  $obj clay get opts option
} {unset}


test tool-prototype-0008-0009 {Mixin color2 + no option} {
  $obj clay get opts color
} {green}


test tool-prototype-0008-0010 {Mixin color2 + no option} {
  $obj clay ancestors
} {::MixinColor2 ::MixinRoot ::clay::object}

$obj clay mixinmap color {}

test tool-prototype-0009-0001 {Mixin core (return to normal)} {
  $obj info root
} {MixinRoot}


test tool-prototype-0009-0002 {Mixin core (return to normal)} {
  $obj info option
} {Undefined}


test tool-prototype-0009-0003 {Mixin core (return to normal)} {
  $obj info color
} {Undefined}


test tool-prototype-0009-0004 {Mixin core (return to normal)} {
  $obj info other
} {Undefined}


test tool-prototype-0009-0005 {Mixin core (return to normal)} {
  $obj info shade
} {avacodo}


test tool-prototype-0009-0006 {Mixin core (return to normal)} {
  $obj clay get opts
} {core root option unset color unset}


test tool-prototype-0009-0007 {Mixin core (return to normal)} {
  $obj clay get opts core
} {root}


test tool-prototype-0009-0008 {Mixin core (return to normal)} {
  $obj clay get opts option
} {unset}


test tool-prototype-0009-0009 {Mixin core (return to normal)} {
  $obj clay get opts color
} {unset}


test tool-prototype-0009-0010 {Mixin core (return to normal)} {
  $obj clay ancestors
} {::MixinRoot ::clay::object}


###
# Tip479 Tests
###
clay::define tip479class {

  Method newitem dictargs {
    id {type: number}
    color {default: green}
    shape {options: {round square}}
    flavor {default: grape}
  } {
    my variable items
    foreach {f v} $args {
      dict set items $id $f $v
    }
    if {"color" ni [dict keys $args]} {
      dict set items $id color $color
    }
    return [dict get $items $id]
  }

  method itemget {id field} {
    my variable items
    return [dict get $id $field]
  }
}

set obj [tip479class new]
test tip479-001 {Test that a later ensemble definition trumps a more primitive one} {
  $obj newitem id 1 color orange shape round
} {id 1 color orange shape round}

# Fail because we left off a mandatory argument
test tip479-002 {Test that a later ensemble definition trumps a more primitive one} -body {
  $obj newitem id 2
} -result {shape is required} -returnCodes error

###
# Leave off a value that has a default
# note: Method had special handling for color, but not flavor
###
test tip479-003 {Test that a later ensemble definition trumps a more primitive one} {
  $obj newitem id 3 shape round
} {id 3 shape round color green}

###
# Add extra arguments
###
test tip479-004 {Test that a later ensemble definition trumps a more primitive one} {
  $obj newitem id 4 shape round trim leather
} {id 4 shape round trim leather color green}

clay::define tip479classE {

  Ensemble item::new dictargs {
    id {type: number}
    color {default: green}
    shape {options: {round square}}
    flavor {default: grape}
  } {
    my variable items
    foreach {f v} $args {
      dict set items $id $f $v
    }
    if {"color" ni [dict keys $args]} {
      dict set items $id color $color
    }
    return [dict get $items $id]
  }

  Ensemble item::get {id field} {
    my variable items
    return [dict get $id $field]
  }
}


set obj [tip479classE new]
test tip479-001 {Test that a later ensemble definition trumps a more primitive one} {
  $obj item new id 1 color orange shape round
} {id 1 color orange shape round}

# Fail because we left off a mandatory argument
test tip479-002 {Test that a later ensemble definition trumps a more primitive one} -body {
  $obj item new id 2
} -result {shape is required} -returnCodes error

###
# Leave off a value that has a default
# note: Method had special handling for color, but not flavor
###
test tip479-003 {Test that a later ensemble definition trumps a more primitive one} {
  $obj item new id 3 shape round
} {id 3 shape round color green}

###
# Add extra arguments
###
test tip479-004 {Test that a later ensemble definition trumps a more primitive one} {
  $obj item new id 4 shape round trim leather
} {id 4 shape round trim leather color green}



testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/clay/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.6]} {return}


package ifneeded clay 0.8.6 [list source [file join $dir clay.tcl]]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























Changes to modules/clock/iso8601.man.

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
89
90
91
[option -gmt],
[option -locale], and
[option -timezone]
of the builtin command [cmd {clock scan}].

[list_end]

[section {Date formats}]

The commands accept the following 23 date formats:

[example_begin]
(year)-(month)-(day)
(year)(month)(day)
(year)-(day in year)
(year)(day in year)
(year in century)-(month)-(day)
(year)-(month)			Day defaults to the 1st of the month
(year in century)(month)(day)		
(year in century)-(day in year)		
(year in century)(day in year)		
--(month)-(day)			Year defaults to the current year
--(month)(day)			Year defaults to the current year
--(day in year)			Year defaults to the current year
---(day)  		        Year defaults to the current year, month to current month
(fiscal year)-W(week)-(wday)
(fiscal year)W(week)-(wday)
(fiscal year in century)-W(week)-(wday)
(fiscal year in century)W(week)(wday)
(fiscal year)-W(week)		Weekday defaults to monday
(fiscal year)W(week)		Weekday defaults to monday
-W(week)-(wday)			Year defaults to current fiscal year
-W(week)(wday)			Year defaults to current fiscal year
(wday)				Year defaults to current fiscal year, week to current week
(year)				Month defaults to january, day to 1st of the month
[example_end]

The possible parts/fields in the above, and their meanings, are:

[list_begin definitions]
[def year] Year with century, 4 digits
[def month] Month in year, 2 digits
[def day] Day in month, 2 digits.
[def {year in century}] Year without century, 2 digits
[def {day in year}] Day in year, 3 digits
[def {fiscal year}] ISO 8601 fiscal year with century, 4 digits
[def {fiscal year in century}] ISO 8601 fiscal year without century, 2 digits
[def week] ISO 8601 week number
[def wday] Week day, 1 digit, Monday (1) to Sunday (7,0)
[list_end]

[vset CATEGORY clock::iso8601]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|

38
39
40
41
42
43
44












































45
46
47
[option -gmt],
[option -locale], and
[option -timezone]
of the builtin command [cmd {clock scan}].

[list_end]













































[vset CATEGORY clock::iso8601]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/clock/rfc2822.man.

1
2
3
4
5
6
7
8
9
10
11
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin clock_rfc2822 n 0.1]
[moddesc   {Date/Time Utilities}]
[titledesc {Parsing RFC 2822 dates/times}]
[category  {Text processing}]
[require Tcl 8.5]
[require clock::rfc2822 [opt 0.1]]
[description]

This package provides functionality to parse dates in
RFC 2822 format.



|







1
2
3
4
5
6
7
8
9
10
11
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin clock_rfc2822 n 0.1]
[moddesc   {Date/Time Utilities}]
[titledesc {Parsing ISO 8601 dates/times}]
[category  {Text processing}]
[require Tcl 8.5]
[require clock::rfc2822 [opt 0.1]]
[description]

This package provides functionality to parse dates in
RFC 2822 format.
19
20
21
22
23
24
25
26
27
This command parses an RFC2822 date string and returns
the given date in seconds since epoch. An error is thrown
if the command is unable to parse the date.

[list_end]

[vset CATEGORY clock::rfc2822]
[include ../common-text/feedback.inc]
[manpage_end]







|

19
20
21
22
23
24
25
26
27
This command parses an RFC2822 date string and returns
the given date in seconds since epoch. An error is thrown
if the command is unable to parse the date.

[list_end]

[vset CATEGORY clock::rfc2822]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/clock/rfc2822.tcl.

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#
# Results:
#       None.
#
# Side effects:

proc ::clock::rfc2822::InitDatePats { permissible } {
    # Produce formats for the observed variants of RFC 2822 dates.
    # Permissible variants come first in the list; impermissible ones
    # come later.

    # The month and day may be "%b %d" or "%d %b"

    foreach mdpat {{[[:alpha:]]+[[:space:]]+\d\d?}
        {\d\d?[[:space:]]+[[:alpha:]]+}} \







|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#
# Results:
#       None.
#
# Side effects:

proc ::clock::rfc2822::InitDatePats { permissible } {
    # Produce formats for the observed variants of ISO2822 dates.
    # Permissible variants come first in the list; impermissible ones
    # come later.

    # The month and day may be "%b %d" or "%d %b"

    foreach mdpat {{[[:alpha:]]+[[:space:]]+\d\d?}
        {\d\d?[[:space:]]+[[:alpha:]]+}} \

Changes to modules/cmdline/ChangeLog.

1
2
3
4
5
6
7
8
9
10
11
12
2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	*

2013-01-08  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* typedCmdline.test: Fixed test results of typed-cmdline-6.14 for
	  Tcl 8.6 and higher. Rewritten to use constraints properly
	  instead of via conditional execution.





|







1
2
3
4
5
6
7
8
9
10
11
12
2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2013-01-08  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* typedCmdline.test: Fixed test results of typed-cmdline-6.14 for
	  Tcl 8.6 and higher. Rewritten to use constraints properly
	  instead of via conditional execution.

Changes to modules/cmdline/cmdline.man.

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
specified.  This also generates an error message that lists the
allowed flags if an incorrect flag is specified. The optional
[arg usage]-argument contains a string to include in front of the
generated message. If not present it defaults to "options:".

[para]

[arg argvVar] contains the name of the list of arguments to process.
If options are found the list is modified and the processed arguments
are removed from the start of the list.

[para]

[arg optlist] contains a list of lists where each element specifies an
option in the form: [arg flag] [arg default] [arg comment].

[para]

If [arg flag] ends in ".arg" then the value is taken from the command
line. Otherwise it is a boolean and appears in the result if present







<
<
<
<
<
<







77
78
79
80
81
82
83






84
85
86
87
88
89
90
specified.  This also generates an error message that lists the
allowed flags if an incorrect flag is specified. The optional
[arg usage]-argument contains a string to include in front of the
generated message. If not present it defaults to "options:".

[para]







[arg optlist] contains a list of lists where each element specifies an
option in the form: [arg flag] [arg default] [arg comment].

[para]

If [arg flag] ends in ".arg" then the value is taken from the command
line. Otherwise it is a boolean and appears in the result if present
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
            {t.arg  -1  "use specified time"}
        }
        set usage ": MyCommandName\
                      \[options] filename ...\noptions:"

        try {
            array set params [::cmdline::getoptions argv $options $usage]

	    # Note: argv is modified now. The recognized options are
	    # removed from it, leaving the non-option arguments behind.
        } trap {CMDLINE USAGE} {msg o} {
            # Trap the usage signal, print the message, and exit the application.
            # Note: Other errors are not caught and passed through to higher levels!
	    puts $msg
	    exit 1
        }








<
<
<







170
171
172
173
174
175
176



177
178
179
180
181
182
183
            {t.arg  -1  "use specified time"}
        }
        set usage ": MyCommandName\
                      \[options] filename ...\noptions:"

        try {
            array set params [::cmdline::getoptions argv $options $usage]



        } trap {CMDLINE USAGE} {msg o} {
            # Trap the usage signal, print the message, and exit the application.
            # Note: Other errors are not caught and passed through to higher levels!
	    puts $msg
	    exit 1
        }

205
206
207
208
209
210
211
212
213
This example, taken (and slightly modified) from the package
[package fileutil], shows how to use cmdline.  First, a list of
options is created, then the 'args' list is passed to cmdline for
processing.  Subsequently, different options are checked to see if
they have been passed to the script, and what their value is.

[vset CATEGORY cmdline]
[include ../common-text/feedback.inc]
[manpage_end]







|

196
197
198
199
200
201
202
203
204
This example, taken (and slightly modified) from the package
[package fileutil], shows how to use cmdline.  First, a list of
options is created, then the 'args' list is passed to cmdline for
processing.  Subsequently, different options are checked to see if
they have been passed to the script, and what their value is.

[vset CATEGORY cmdline]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/cmdline/cmdline.tcl.

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
# cmdline.tcl --
#
#	This package provides a utility for parsing command line
#	arguments that are processed by our various applications.
#	It also includes a utility routine to determine the
#	application name for use in command line errors.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2001-2015 by Andreas Kupries <andreas_kupries@users.sf.net>.
# Copyright (c) 2003      by David N. Welton  <davidw@dedasys.com>
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: cmdline.tcl,v 1.28 2011/02/23 17:41:52 andreas_kupries Exp $

package require Tcl 8.2
package provide cmdline 1.5

namespace eval ::cmdline {
    namespace export getArgv0 getopt getKnownOpt getfiles getoptions \
	    getKnownOptions usage
}

# ::cmdline::getopt --
#
#	The cmdline::getopt works in a fashion like the standard
#	C based getopt function.  Given an option string and a
#	pointer to an array or args this command will process the
#	first argument and return info on how to proceed.
#
# Arguments:
#	argvVar		Name of the argv list that you
#			want to process.  If options are found the
#			arg list is modified and the processed arguments
#			are removed from the start of the list.
#	optstring	A list of command options that the application
#			will accept.  If the option ends in ".arg" the
#			getopt routine will use the next argument as
#			an argument to the option.  Otherwise the option
#			is a boolean that is set to 1 if present.
#	optVar		The variable pointed to by optVar
#			contains the option that was found (without the
#			leading '-' and without the .arg extension).
#	valVar		Upon success, the variable pointed to by valVar
#			contains the value for the specified option.
#			This value comes from the command line for .arg












|













|










|
|







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
# cmdline.tcl --
#
#	This package provides a utility for parsing command line
#	arguments that are processed by our various applications.
#	It also includes a utility routine to determine the
#	application name for use in command line errors.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2001-2015 by Andreas Kupries <andreas_kupries@users.sf.net>.
# Copyright (c) 2003      by David N. Welton  <davidw@dedasys.com>
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: cmdline.tcl,v 1.28 2011/02/23 17:41:52 andreas_kupries Exp $

package require Tcl 8.2
package provide cmdline 1.5

namespace eval ::cmdline {
    namespace export getArgv0 getopt getKnownOpt getfiles getoptions \
	    getKnownOptions usage
}

# ::cmdline::getopt --
#
#	The cmdline::getopt works in a fashion like the standard
#	C based getopt function.  Given an option string and a 
#	pointer to an array or args this command will process the
#	first argument and return info on how to proceed.
#
# Arguments:
#	argvVar		Name of the argv list that you
#			want to process.  If options are found the
#			arg list is modified and the processed arguments
#			are removed from the start of the list.
#	optstring	A list of command options that the application
#			will accept.  If the option ends in ".arg" the
#			getopt routine will use the next argument as 
#			an argument to the option.  Otherwise the option	
#			is a boolean that is set to 1 if present.
#	optVar		The variable pointed to by optVar
#			contains the option that was found (without the
#			leading '-' and without the .arg extension).
#	valVar		Upon success, the variable pointed to by valVar
#			contains the value for the specified option.
#			This value comes from the command line for .arg
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
    }
    return $result
}

# ::cmdline::getKnownOpt --
#
#	The cmdline::getKnownOpt works in a fashion like the standard
#	C based getopt function.  Given an option string and a
#	pointer to an array or args this command will process the
#	first argument and return info on how to proceed.
#
# Arguments:
#	argvVar		Name of the argv list that you
#			want to process.  If options are found the
#			arg list is modified and the processed arguments
#			are removed from the start of the list.  Note that
#			unknown options and the args that follow them are
#			left in this list.
#	optstring	A list of command options that the application
#			will accept.  If the option ends in ".arg" the
#			getopt routine will use the next argument as
#			an argument to the option.  Otherwise the option
#			is a boolean that is set to 1 if present.
#	optVar		The variable pointed to by optVar
#			contains the option that was found (without the
#			leading '-' and without the .arg extension).
#	valVar		Upon success, the variable pointed to by valVar
#			contains the value for the specified option.
#			This value comes from the command line for .arg
#			options, otherwise the value is 1.
#			If getopt fails, the valVar is filled with an
#			error message.
#
# Results:
# 	The getKnownOpt function returns 1 if an option was found,
#	0 if no more options were found, -1 if an unknown option was
#	encountered, and -2 if any other error occurred.

proc ::cmdline::getKnownOpt {argvVar optstring optVar valVar} {
    upvar 1 $argvVar argsList
    upvar 1 $optVar  option
    upvar 1 $valVar  value

    # default settings for a normal return







|












|
|














|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
    }
    return $result
}

# ::cmdline::getKnownOpt --
#
#	The cmdline::getKnownOpt works in a fashion like the standard
#	C based getopt function.  Given an option string and a 
#	pointer to an array or args this command will process the
#	first argument and return info on how to proceed.
#
# Arguments:
#	argvVar		Name of the argv list that you
#			want to process.  If options are found the
#			arg list is modified and the processed arguments
#			are removed from the start of the list.  Note that
#			unknown options and the args that follow them are
#			left in this list.
#	optstring	A list of command options that the application
#			will accept.  If the option ends in ".arg" the
#			getopt routine will use the next argument as 
#			an argument to the option.  Otherwise the option	
#			is a boolean that is set to 1 if present.
#	optVar		The variable pointed to by optVar
#			contains the option that was found (without the
#			leading '-' and without the .arg extension).
#	valVar		Upon success, the variable pointed to by valVar
#			contains the value for the specified option.
#			This value comes from the command line for .arg
#			options, otherwise the value is 1.
#			If getopt fails, the valVar is filled with an
#			error message.
#
# Results:
# 	The getKnownOpt function returns 1 if an option was found,
#	0 if no more options were found, -1 if an unknown option was
#	encountered, and -2 if any other error occurred. 

proc ::cmdline::getKnownOpt {argvVar optstring optVar valVar} {
    upvar 1 $argvVar argsList
    upvar 1 $optVar  option
    upvar 1 $valVar  value

    # default settings for a normal return
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#	Process a set of command line options, filling in defaults
#	for those not specified.  This also generates an error message
#	that lists the allowed flags if an incorrect flag is specified.
#
# Arguments:
#	arglistVar	The name of the argument list, typically argv.
#			We remove all known options and their args from it.
#                       In other words, after the call to this command the
#                       referenced variable contains only the non-options,
#                       and unknown options.
#	optlist		A list-of-lists where each element specifies an option
#			in the form:
#				(where flag takes no argument)
#					flag comment
#
#				(or where flag takes an argument)
#					flag default comment
#
#			If flag ends in ".arg" then the value is taken from the
#			command line. Otherwise it is a boolean and appears in
#			the result if present on the command line. If flag ends
#			in ".secret", it will not be displayed in the usage.
#	usage		Text to include in the usage display. Defaults to
#			"options:"
#
# Results
#	Name value pairs suitable for using with array set.
#       A modified `arglistVar`.

proc ::cmdline::getoptions {arglistVar optlist {usage options:}} {
    upvar 1 $arglistVar argv

    set opts [GetOptionDefaults $optlist result]

    set argc [llength $argv]







<
<
<


|
|

|











<







171
172
173
174
175
176
177



178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

195
196
197
198
199
200
201
#	Process a set of command line options, filling in defaults
#	for those not specified.  This also generates an error message
#	that lists the allowed flags if an incorrect flag is specified.
#
# Arguments:
#	arglistVar	The name of the argument list, typically argv.
#			We remove all known options and their args from it.



#	optlist		A list-of-lists where each element specifies an option
#			in the form:
#				(where flag takes no argument) 
#					flag comment 
#
#				(or where flag takes an argument) 
#					flag default comment
#
#			If flag ends in ".arg" then the value is taken from the
#			command line. Otherwise it is a boolean and appears in
#			the result if present on the command line. If flag ends
#			in ".secret", it will not be displayed in the usage.
#	usage		Text to include in the usage display. Defaults to
#			"options:"
#
# Results
#	Name value pairs suitable for using with array set.


proc ::cmdline::getoptions {arglistVar optlist {usage options:}} {
    upvar 1 $arglistVar argv

    set opts [GetOptionDefaults $optlist result]

    set argc [llength $argv]
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
#	for those not specified.  This ignores unknown flags, but generates
#	an error message that lists the correct usage if a known option
#	is used incorrectly.
#
# Arguments:
#	arglistVar	The name of the argument list, typically argv.  This
#			We remove all known options and their args from it.
#                       In other words, after the call to this command the
#                       referenced variable contains only the non-options,
#                       and unknown options.
#	optlist		A list-of-lists where each element specifies an option
#			in the form:
#				flag default comment
#			If flag ends in ".arg" then the value is taken from the
#			command line. Otherwise it is a boolean and appears in
#			the result if present on the command line. If flag ends
#			in ".secret", it will not be displayed in the usage.
#	usage		Text to include in the usage display. Defaults to
#			"options:"
#
# Results
#	Name value pairs suitable for using with array set.
#       A modified `arglistVar`.

proc ::cmdline::getKnownOptions {arglistVar optlist {usage options:}} {
    upvar 1 $arglistVar argv

    set opts [GetOptionDefaults $optlist result]

    # As we encounter them, keep the unknown options and their







<
<
<












<







218
219
220
221
222
223
224



225
226
227
228
229
230
231
232
233
234
235
236

237
238
239
240
241
242
243
#	for those not specified.  This ignores unknown flags, but generates
#	an error message that lists the correct usage if a known option
#	is used incorrectly.
#
# Arguments:
#	arglistVar	The name of the argument list, typically argv.  This
#			We remove all known options and their args from it.



#	optlist		A list-of-lists where each element specifies an option
#			in the form:
#				flag default comment
#			If flag ends in ".arg" then the value is taken from the
#			command line. Otherwise it is a boolean and appears in
#			the result if present on the command line. If flag ends
#			in ".secret", it will not be displayed in the usage.
#	usage		Text to include in the usage display. Defaults to
#			"options:"
#
# Results
#	Name value pairs suitable for using with array set.


proc ::cmdline::getKnownOptions {arglistVar optlist {usage options:}} {
    upvar 1 $arglistVar argv

    set opts [GetOptionDefaults $optlist result]

    # As we encounter them, keep the unknown options and their
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
    upvar 1 $defaultArrayVar result

    set opts {? help}
    foreach opt $optlist {
	set name [lindex $opt 0]
	if {[regsub -- {\.secret$} $name {} name] == 1} {
	    # Need to hide this from the usage display and getopt
	}
	lappend opts $name
	if {[regsub -- {\.arg$} $name {} name] == 1} {

	    # Set defaults for those that take values.

	    set default [lindex $opt 1]
	    set result($name) $default







|







303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
    upvar 1 $defaultArrayVar result

    set opts {? help}
    foreach opt $optlist {
	set name [lindex $opt 0]
	if {[regsub -- {\.secret$} $name {} name] == 1} {
	    # Need to hide this from the usage display and getopt
	}   
	lappend opts $name
	if {[regsub -- {\.arg$} $name {} name] == 1} {

	    # Set defaults for those that take values.

	    set default [lindex $opt 1]
	    set result($name) $default
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
	set result $patterns
    }
    set files {}
    foreach file $result {
	# Make file an absolute path so that we will never conflict
	# with files that might be contained in our zip file.
	set fullPath [file join [pwd] $file]

	if {[file isfile $fullPath]} {
	    lappend files $fullPath
	} elseif {! $quiet} {
	    puts stdout "warning: no files match \"$file\""
	}
    }
    return $files







|







396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
	set result $patterns
    }
    set files {}
    foreach file $result {
	# Make file an absolute path so that we will never conflict
	# with files that might be contained in our zip file.
	set fullPath [file join [pwd] $file]
	
	if {[file isfile $fullPath]} {
	    lappend files $fullPath
	} elseif {! $quiet} {
	    puts stdout "warning: no files match \"$file\""
	}
    }
    return $files
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
#
#    This package provides a utility for parsing typed command
#    line arguments that may be processed by various applications.
#
# Copyright (c) 2000 by Ross Palmer Mohn.
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: cmdline.tcl,v 1.28 2011/02/23 17:41:52 andreas_kupries Exp $

namespace eval ::cmdline {
    namespace export typedGetopt typedGetoptions typedUsage

    # variable cmdline::charclasses --
    #







|







441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
#
#    This package provides a utility for parsing typed command
#    line arguments that may be processed by various applications.
#
# Copyright (c) 2000 by Ross Palmer Mohn.
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: cmdline.tcl,v 1.28 2011/02/23 17:41:52 andreas_kupries Exp $

namespace eval ::cmdline {
    namespace export typedGetopt typedGetoptions typedUsage

    # variable cmdline::charclasses --
    #
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
                                set oneof ""
                                if {$type == "arg"} {
                                    set charclass an
                                } elseif {$type == "oneof"} {
                                    set oneof ", one of $charclass"
                                    set charclass an
                                }

                                if {$quantifier == "?"} {
                                    set retval 1
                                    set retvar $opt
                                    set optarg ""
                                } elseif {$quantifier == "+"} {
                                    set retvar $opt
                                    if {[llength $optarg] < 1} {







|







624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
                                set oneof ""
                                if {$type == "arg"} {
                                    set charclass an
                                } elseif {$type == "oneof"} {
                                    set oneof ", one of $charclass"
                                    set charclass an
                                }
    
                                if {$quantifier == "?"} {
                                    set retval 1
                                    set retvar $opt
                                    set optarg ""
                                } elseif {$quantifier == "+"} {
                                    set retvar $opt
                                    if {[llength $optarg] < 1} {
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
                                } elseif {$type == "oneof"} {
                                    set oneof ", one of $charclass"
                                    set charclass an
                                }
                                set optarg "Option requires $charclass argument$oneof -- $opt"
                                set retvar $opt
                                set retval -3

                                if {$quantifier == "?"} {
                                    set retval 1
                                    set optarg ""
                                }
                                set quantifier ""
                            }
                             if {![regexp -- {[+*]} $quantifier]} {







|







666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
                                } elseif {$type == "oneof"} {
                                    set oneof ", one of $charclass"
                                    set charclass an
                                }
                                set optarg "Option requires $charclass argument$oneof -- $opt"
                                set retvar $opt
                                set retval -3
    
                                if {$quantifier == "?"} {
                                    set retval 1
                                    set optarg ""
                                }
                                set quantifier ""
                            }
                             if {![regexp -- {[+*]} $quantifier]} {
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
    }
    return $str
}

# ::cmdline::prefixSearch --
#
#	Search a Tcl list for a pattern; searches first for an exact match,
#	and if that fails, for a unique prefix that matches the pattern
#	(i.e, first "lsearch -exact", then "lsearch -glob $pattern*"
#
# Arguments:
#	list		list of words
#	pattern		word to search for
#
# Results:







|







860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
    }
    return $str
}

# ::cmdline::prefixSearch --
#
#	Search a Tcl list for a pattern; searches first for an exact match,
#	and if that fails, for a unique prefix that matches the pattern 
#	(i.e, first "lsearch -exact", then "lsearch -glob $pattern*"
#
# Arguments:
#	list		list of words
#	pattern		word to search for
#
# Results:

Changes to modules/cmdline/cmdline.test.

146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
    list [dictsort [cmdline::getoptions argList {{foo.arg blat} {a.arg b}}]] $argList
} {{a b foo blat} {}}
test cmdline-2.8 {cmdline::getoptions, errors} {
    set argList {-a -foo}
    list [catch {cmdline::getoptions argList {{foo.arg blat} a}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-2.9 {cmdline::getoptions, errors} {
    set argList {-a -?}
    list [catch {cmdline::getoptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-2.10 {cmdline::getoptions, errors} {
    set argList {-help}
    list [catch {cmdline::getoptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-2.11 {cmdline::getoptions, usage string in errors} {
    set argList {-help}
    list [catch {cmdline::getoptions argList {{foo.arg blat} a} {testing}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] testing
 -foo value            <blat>
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]

test cmdline-2.12 {cmdline::getoptions, bug 3189786} {
    set argList {-help}
    list [catch {cmdline::getoptions argList {myarg a} {testing}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] testing
 -myarg
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]

# cmdline::usage

test cmdline-3.1 {cmdline::usage,hidden options} {
    set argList {-help}
    list [catch {cmdline::getoptions argList {{foo.secret blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-3.2 {cmdline::usage, with & without arg} {
    set argList {-help}
    list [catch {cmdline::getoptions argList \
	    {{foo.arg blat testing} {a {} {line 2}}}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value           testing <blat>
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]


test cmdline-3.3 {cmdline::usage, bug 3189786} {
    set argList {-help}
    list [catch {cmdline::getoptions argList {{mysecret blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -mysecret            blat
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]

# cmdline::getfiles








|










|










|










|










|
|












|










|












|







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
    list [dictsort [cmdline::getoptions argList {{foo.arg blat} {a.arg b}}]] $argList
} {{a b foo blat} {}}
test cmdline-2.8 {cmdline::getoptions, errors} {
    set argList {-a -foo}
    list [catch {cmdline::getoptions argList {{foo.arg blat} a}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-2.9 {cmdline::getoptions, errors} {
    set argList {-a -?}
    list [catch {cmdline::getoptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-2.10 {cmdline::getoptions, errors} {
    set argList {-help}
    list [catch {cmdline::getoptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-2.11 {cmdline::getoptions, usage string in errors} {
    set argList {-help}
    list [catch {cmdline::getoptions argList {{foo.arg blat} a} {testing}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] testing
 -foo value            <blat>
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]

test cmdline-2.12 {cmdline::getoptions, bug 3189786} {
    set argList {-help}
    list [catch {cmdline::getoptions argList {myarg a} {testing}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] testing
 -myarg               
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]

# cmdline::usage

test cmdline-3.1 {cmdline::usage,hidden options} {
    set argList {-help}
    list [catch {cmdline::getoptions argList {{foo.secret blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-3.2 {cmdline::usage, with & without arg} {
    set argList {-help}
    list [catch {cmdline::getoptions argList \
	    {{foo.arg blat testing} {a {} {line 2}}}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value           testing <blat>
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]


test cmdline-3.3 {cmdline::usage, bug 3189786} {
    set argList {-help}
    list [catch {cmdline::getoptions argList {{mysecret blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -mysecret            blat
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]

# cmdline::getfiles

264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
set foo2 [makeFile {} cmdlineJunk/foo2]
set bar3 [makeFile {} cmdlineJunk/bar3]

test cmdline-4.1 {cmdline::getfiles} {pcOnly} {
    runGetFilesTest {
	cmdline::getfiles {} 0
    }
} {}
test cmdline-4.2 {cmdline::getfiles, one pattern} {pcOnly} {
    runGetFilesTest {
	cd cmdlineJunk
	set result [cmdline::getfiles {foo*} 0]
	puts -nonewline [lsort $result]
	exit
    }







|







264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
set foo2 [makeFile {} cmdlineJunk/foo2]
set bar3 [makeFile {} cmdlineJunk/bar3]

test cmdline-4.1 {cmdline::getfiles} {pcOnly} {
    runGetFilesTest {
	cmdline::getfiles {} 0
    }
} {}    
test cmdline-4.2 {cmdline::getfiles, one pattern} {pcOnly} {
    runGetFilesTest {
	cd cmdlineJunk
	set result [cmdline::getfiles {foo*} 0]
	puts -nonewline [lsort $result]
	exit
    }
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
    list [cmdline::getKnownOptions argList {{foo.arg blat}}] $argList
} {{foo buzz} {-unknown u1 u2 u3}}
test cmdline-7.12 {cmdline::getKnownOptions, errors} {
    set argList {-a -foo}
    list [catch {cmdline::getKnownOptions argList {{foo.arg blat} a}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-7.13 {cmdline::getKnownOptions, errors} {
    set argList {-a -?}
    list [catch {cmdline::getKnownOptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-7.14 {cmdline::getKnownOptions, errors} {
    set argList {-help}
    list [catch {cmdline::getKnownOptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-7.15 {cmdline::getKnownOptions, usage string in errors} {
    set argList {-help}
    list [catch {cmdline::getKnownOptions argList {{foo.arg blat} a} {testing}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] testing
 -foo value            <blat>
 -a
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]

testsuiteCleanup
return







|










|










|










|







506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
    list [cmdline::getKnownOptions argList {{foo.arg blat}}] $argList
} {{foo buzz} {-unknown u1 u2 u3}}
test cmdline-7.12 {cmdline::getKnownOptions, errors} {
    set argList {-a -foo}
    list [catch {cmdline::getKnownOptions argList {{foo.arg blat} a}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-7.13 {cmdline::getKnownOptions, errors} {
    set argList {-a -?}
    list [catch {cmdline::getKnownOptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-7.14 {cmdline::getKnownOptions, errors} {
    set argList {-help}
    list [catch {cmdline::getKnownOptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo value            <blat>
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]
test cmdline-7.15 {cmdline::getKnownOptions, usage string in errors} {
    set argList {-help}
    list [catch {cmdline::getKnownOptions argList {{foo.arg blat} a} {testing}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] testing
 -foo value            <blat>
 -a                   
 --                   Forcibly stop option processing
 -help                Print this message
 -?                   Print this message
" {}]

testsuiteCleanup
return

Changes to modules/cmdline/typedCmdline.test.

303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
    set argList {}
    list [cmdline::typedGetoptions argList {{foo.integer {} {option foo with integer argument}}}] $argList
} {{} {}}
test typed-cmdline-7.6 {cmdline::typedGetoptions, integer flag, missing arg, no default value} {
    set argList {-foo}
    list [catch {cmdline::typedGetoptions argList {{foo.integer {} {blah blah}}}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo integer         blah blah
 -help                Print this message
 -?                   Print this message
" {}]
test typed-cmdline-7.7 {cmdline::typedGetoptions, integer flag, no default value} {
    set argList {-foo 123}
    list [cmdline::typedGetoptions argList {{foo.integer {} {option foo with integer argument}}}] $argList
} {{foo 123} {}}
test typed-cmdline-7.8 {cmdline::typedGetoptions, missing integer flag with arg, default value} {
    set argList {-* 123}
    list [dictsort [cmdline::typedGetoptions argList {{foo.integer 234} {*.double 5.234 {Unusual}}}]] $argList
} {{* 123 foo 234} {}}
test typed-cmdline-7.9 {cmdline::typedGetoptions, missing integer flag with arg, default value} {
    set argList {-f}
    list [dictsort [cmdline::typedGetoptions argList {{foo.integer 234} {*.double 5.234 {Unusual}}}]] $argList
} {{* 5.234 foo 234} {}}
test typed-cmdline-7.10 {cmdline::typedGetoptions, missing integer flag with arg, default value} {
    set argList {-f}
    list [catch {cmdline::typedGetoptions argList {foo.integer *.double fooey}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo integer
 -* double
 -fooey
 -help                Print this message
 -?                   Print this message
" -f]
test typed-cmdline-7.11 {cmdline::typedGetoptions, missing integer flag with arg, default value} {
    set argList {}
    list [cmdline::typedGetoptions argList {{foo.integer 234}}] $argList
} {{foo 234} {}}







|



















|
|
|







303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
    set argList {}
    list [cmdline::typedGetoptions argList {{foo.integer {} {option foo with integer argument}}}] $argList
} {{} {}}
test typed-cmdline-7.6 {cmdline::typedGetoptions, integer flag, missing arg, no default value} {
    set argList {-foo}
    list [catch {cmdline::typedGetoptions argList {{foo.integer {} {blah blah}}}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo integer         blah blah 
 -help                Print this message
 -?                   Print this message
" {}]
test typed-cmdline-7.7 {cmdline::typedGetoptions, integer flag, no default value} {
    set argList {-foo 123}
    list [cmdline::typedGetoptions argList {{foo.integer {} {option foo with integer argument}}}] $argList
} {{foo 123} {}}
test typed-cmdline-7.8 {cmdline::typedGetoptions, missing integer flag with arg, default value} {
    set argList {-* 123}
    list [dictsort [cmdline::typedGetoptions argList {{foo.integer 234} {*.double 5.234 {Unusual}}}]] $argList
} {{* 123 foo 234} {}}
test typed-cmdline-7.9 {cmdline::typedGetoptions, missing integer flag with arg, default value} {
    set argList {-f}
    list [dictsort [cmdline::typedGetoptions argList {{foo.integer 234} {*.double 5.234 {Unusual}}}]] $argList
} {{* 5.234 foo 234} {}}
test typed-cmdline-7.10 {cmdline::typedGetoptions, missing integer flag with arg, default value} {
    set argList {-f}
    list [catch {cmdline::typedGetoptions argList {foo.integer *.double fooey}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo integer          
 -* double             
 -fooey               
 -help                Print this message
 -?                   Print this message
" -f]
test typed-cmdline-7.11 {cmdline::typedGetoptions, missing integer flag with arg, default value} {
    set argList {}
    list [cmdline::typedGetoptions argList {{foo.integer 234}}] $argList
} {{foo 234} {}}
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
    set argList {-bar -foo 123 234}
    list [cmdline::typedGetoptions argList {foo.integer* bar}] $argList
} {{foo {123 234} bar {}} {}}
test typed-cmdline-7.20 {cmdline::typedGetopt, xdigit options} {
    set argList {-foo 50gC}
    list [catch {cmdline::typedGetoptions argList {foo.(50GC|50gc) bar}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo 50GC|50gc
 -bar
 -help                Print this message
 -?                   Print this message
" 50gC]
test typed-cmdline-7.21 {cmdline::typedGetoptions, errors} {
    set argList {-b -foo}
    list [catch {cmdline::typedGetoptions argList {foo.arg a}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo arg
 -a
 -help                Print this message
 -?                   Print this message
" {-b -foo}]
test typed-cmdline-7.22 {cmdline::typedGetoptions, errors} {
    set argList {-b -foo}
    list [catch {cmdline::typedGetoptions argList {{foo.arg {} {blah blah}} a}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo arg             blah blah
 -a
 -help                Print this message
 -?                   Print this message
" {-b -foo}]
test typed-cmdline-7.23 {cmdline::typedGetoptions, errors} {
    set argList {-a -?}
    list [catch {cmdline::typedGetoptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo arg              <blat>
 -a
 -help                Print this message
 -?                   Print this message
" {}]
test typed-cmdline-7.24 {cmdline::typedGetoptions, errors} {
    set argList {-help}
    list [catch {cmdline::typedGetoptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo arg              <blat>
 -a
 -help                Print this message
 -?                   Print this message
" {}]
test typed-cmdline-7.25 {cmdline::typedGetoptions, usage string in errors} {
    set argList {-help}
    list [catch {cmdline::typedGetoptions argList {{foo.arg blat} a} {testing:}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] testing:
 -foo arg              <blat>
 -a
 -help                Print this message
 -?                   Print this message
" {}]
test typed-cmdline-7.26 {cmdline::typedGetoptions, unusual option} {
    set argList {-x?y -a -foo}
    list [dictsort [cmdline::typedGetoptions argList {{foo.arg blat} x?y x*y a}]] $argList
} {{a {} foo blat x?y {}} {}}
test typed-cmdline-7.27 {cmdline::typedGetoptions, unusual option, abbreviation error} {
    set argList {-x -a -foo}
    list [catch {cmdline::typedGetoptions argList {{foo.arg blat} x?y x*y a}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo arg              <blat>
 -x?y
 -x*y
 -a
 -help                Print this message
 -?                   Print this message
" {-x -a -foo}]
test typed-cmdline-7.28 {cmdline::typedGetoptions, unusual option, abbreviation} {
    set argList {-x -a -foo}
    list [dictsort [cmdline::typedGetoptions argList {{foo.arg blat} x?y a}]] $argList
} {{a {} foo blat x?y {}} {}}







|
|







|
|







|
|









|









|









|












|
|
|







369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
    set argList {-bar -foo 123 234}
    list [cmdline::typedGetoptions argList {foo.integer* bar}] $argList
} {{foo {123 234} bar {}} {}}
test typed-cmdline-7.20 {cmdline::typedGetopt, xdigit options} {
    set argList {-foo 50gC}
    list [catch {cmdline::typedGetoptions argList {foo.(50GC|50gc) bar}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo 50GC|50gc        
 -bar                 
 -help                Print this message
 -?                   Print this message
" 50gC]
test typed-cmdline-7.21 {cmdline::typedGetoptions, errors} {
    set argList {-b -foo}
    list [catch {cmdline::typedGetoptions argList {foo.arg a}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo arg              
 -a                   
 -help                Print this message
 -?                   Print this message
" {-b -foo}]
test typed-cmdline-7.22 {cmdline::typedGetoptions, errors} {
    set argList {-b -foo}
    list [catch {cmdline::typedGetoptions argList {{foo.arg {} {blah blah}} a}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo arg             blah blah 
 -a                   
 -help                Print this message
 -?                   Print this message
" {-b -foo}]
test typed-cmdline-7.23 {cmdline::typedGetoptions, errors} {
    set argList {-a -?}
    list [catch {cmdline::typedGetoptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo arg              <blat>
 -a                   
 -help                Print this message
 -?                   Print this message
" {}]
test typed-cmdline-7.24 {cmdline::typedGetoptions, errors} {
    set argList {-help}
    list [catch {cmdline::typedGetoptions argList {{foo.arg blat} a}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo arg              <blat>
 -a                   
 -help                Print this message
 -?                   Print this message
" {}]
test typed-cmdline-7.25 {cmdline::typedGetoptions, usage string in errors} {
    set argList {-help}
    list [catch {cmdline::typedGetoptions argList {{foo.arg blat} a} {testing:}} msg] $msg \
	    $argList
} [list 1 "[cmdline::getArgv0] testing:
 -foo arg              <blat>
 -a                   
 -help                Print this message
 -?                   Print this message
" {}]
test typed-cmdline-7.26 {cmdline::typedGetoptions, unusual option} {
    set argList {-x?y -a -foo}
    list [dictsort [cmdline::typedGetoptions argList {{foo.arg blat} x?y x*y a}]] $argList
} {{a {} foo blat x?y {}} {}}
test typed-cmdline-7.27 {cmdline::typedGetoptions, unusual option, abbreviation error} {
    set argList {-x -a -foo}
    list [catch {cmdline::typedGetoptions argList {{foo.arg blat} x?y x*y a}} msg] $msg $argList
} [list 1 "[cmdline::getArgv0] options:
 -foo arg              <blat>
 -x?y                 
 -x*y                 
 -a                   
 -help                Print this message
 -?                   Print this message
" {-x -a -foo}]
test typed-cmdline-7.28 {cmdline::typedGetoptions, unusual option, abbreviation} {
    set argList {-x -a -foo}
    list [dictsort [cmdline::typedGetoptions argList {{foo.arg blat} x?y a}]] $argList
} {{a {} foo blat x?y {}} {}}

Changes to modules/comm/comm.man.

1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
Tcl-DP provides an RPC-based remote execution interface, but is a
compiled Tcl extension.  See
[uri http://www.cs.cornell.edu/Info/Projects/zeno/Projects/Tcl-DP.html].

[para]
Michael Doyle <miked@eolas.com> has code that implements the Tcl-DP
RPC interface using standard Tcl sockets, much like [package comm].
The DpTcl package is available at
[uri http://chiselapp.com/user/gwlester/repository/DpTcl].

[para]
Andreas Kupries <andreas_kupries@users.sourceforge.net> uses
[package comm] and has built a simple nameserver as part of his Pool
library.  See [uri http://www.purl.org/net/akupries/soft/pool/index.htm].

[vset CATEGORY comm]
[include ../common-text/feedback.inc]
[manpage_end]







<
<







|

1215
1216
1217
1218
1219
1220
1221


1222
1223
1224
1225
1226
1227
1228
1229
1230
Tcl-DP provides an RPC-based remote execution interface, but is a
compiled Tcl extension.  See
[uri http://www.cs.cornell.edu/Info/Projects/zeno/Projects/Tcl-DP.html].

[para]
Michael Doyle <miked@eolas.com> has code that implements the Tcl-DP
RPC interface using standard Tcl sockets, much like [package comm].



[para]
Andreas Kupries <andreas_kupries@users.sourceforge.net> uses
[package comm] and has built a simple nameserver as part of his Pool
library.  See [uri http://www.purl.org/net/akupries/soft/pool/index.htm].

[vset CATEGORY comm]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/comm/comm.n.html.

1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
<p>
Tcl-DP provides an RPC-based remote execution interface, but is a compiled
Tcl extension.  See
<i>http://www.cs.cornell.edu/Info/Projects/zeno/Projects/Tcl-DP.html</i>.<tt> </tt>
<p>
Michael Doyle &lt;miked@eolas.com&gt; has code that implements the Tcl-DP RPC
interface using standard Tcl sockets, much like
<b>comm</b>.
The DpTcl package is available at
<i>http://chiselapp.com/user/gwlester/repository/DpTcl</i>.
<tt> </tt>
<p>
Andreas Kupries &lt;a.kupries@westend.com&gt; uses
<b>comm
</b>and has built a simple nameserver as part of his Pool library.<tt> </tt>
See
<i>http://www.westend.com/~kupries/doc/pool/index.htm</i>.<tt> </tt>
<!--  eof -->
<p><hr>
Markup created by <em>unroff</em> 1.0,&#160;<tt> </tt>&#160;<tt> </tt>May 30, 1998.
</body>
</html>







|
<
<
<











1049
1050
1051
1052
1053
1054
1055
1056



1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
<p>
Tcl-DP provides an RPC-based remote execution interface, but is a compiled
Tcl extension.  See
<i>http://www.cs.cornell.edu/Info/Projects/zeno/Projects/Tcl-DP.html</i>.<tt> </tt>
<p>
Michael Doyle &lt;miked@eolas.com&gt; has code that implements the Tcl-DP RPC
interface using standard Tcl sockets, much like
<b>comm</b>.<tt> </tt>



<p>
Andreas Kupries &lt;a.kupries@westend.com&gt; uses
<b>comm
</b>and has built a simple nameserver as part of his Pool library.<tt> </tt>
See
<i>http://www.westend.com/~kupries/doc/pool/index.htm</i>.<tt> </tt>
<!--  eof -->
<p><hr>
Markup created by <em>unroff</em> 1.0,&#160;<tt> </tt>&#160;<tt> </tt>May 30, 1998.
</body>
</html>

Added modules/comm/comm.slaveboot.





















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
# -*- tcl -*-
# Script to boot a child running an open comm server

set spawncode [makeFile {
    catch {wm withdraw .}
    ##puts [set fh [open ~/foo w]] $argv ; close $fh

    source [lindex $argv 0]     ; # load 'snit'
    source [lindex $argv 1].tcl ; # load 'comm'
    # and wait for commands. But first send our
    # own server socket to the initiator
    ::comm::comm send [lindex $argv 2] [list slaveat [::comm::comm self]]
    vwait forever
} spawn]

proc slaveat {id} {
    #puts "Slave @ $id"
    proc slave {} [list return $id]
    set ::go .
}

#puts "self @ [::comm::comm self]"

exec \
    [info nameofexecutable] $spawncode \
    [tcllibPath snit/snit.tcl] \
    [file rootname [info script]] \
    [::comm::comm self] &

#puts "Waiting for spawned comm system to boot"
# Wait for the slave to initialize itself.
vwait ::go

#puts "Running tests"
#::comm::comm debug 1

proc slavestop {} {
    ::comm::comm send -async [slave] {{exit}}
    ::comm::comm abort
    removeFile spawn
    return
}

Changes to modules/comm/comm.test.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# -*- tcl -*-
# Tests for the comm module.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2001 by ActiveState Tool Corp.
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# Tests for the comm module.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2001 by ActiveState Tool Corp.
# All rights reserved.
#
# RCS: @(#) $Id: comm.test,v 1.14 2010/09/15 19:48:33 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
}

# ------------------------------------------------------------------------
# First order of things is to spawn a separate tclsh into the background
# and have it execute comm too, with some general code to respond to our
# requests

source [asset comm.slaveboot]

# ------------------------------------------------------------------------

test comm-1.0 {set remote variable} {
    ::comm::comm send [slave] {set foo b}
} {b}








|







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
}

# ------------------------------------------------------------------------
# First order of things is to spawn a separate tclsh into the background
# and have it execute comm too, with some general code to respond to our
# requests

useLocalFile comm.slaveboot

# ------------------------------------------------------------------------

test comm-1.0 {set remote variable} {
    ::comm::comm send [slave] {set foo b}
} {b}

268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301

test comm-6.0 {secured communication via tls package} hastls {
    # Setup secured channel in main process.
    tls::init \
	-keyfile  [tcllibPath devtools/receiver.key] \
	-certfile [tcllibPath devtools/receiver.crt] \
	-cafile   [tcllibPath devtools/ca.crt] \
	-ssl2 0    \
	-ssl3 0    \
	-tls1 1    \
	-require 1
    comm::comm new BAR -socketcmd tls::socket -listen 1

    # Setup secured channel in slave process
    ::comm::comm send [slave] {
	package require tls
	set fox dog
    }
    ::comm::comm send [slave] \
	[list \
	     tls::init \
	     -keyfile  [tcllibPath devtools/transmitter.key] \
	     -certfile [tcllibPath devtools/transmitter.crt] \
	     -cafile   [tcllibPath devtools/ca.crt] \
	     -ssl2 0    \
	     -ssl3 0    \
	     -tls1 1    \
	     -require 1]
    set FOO [::comm::comm send [slave] {
	comm::comm new FOO -socketcmd tls::socket -listen 1
	FOO self
    }] ; # {}

    # Run command interaction over the secured channel







|
|
|














|
|
|







270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303

test comm-6.0 {secured communication via tls package} hastls {
    # Setup secured channel in main process.
    tls::init \
	-keyfile  [tcllibPath devtools/receiver.key] \
	-certfile [tcllibPath devtools/receiver.crt] \
	-cafile   [tcllibPath devtools/ca.crt] \
	-ssl2 1    \
	-ssl3 1    \
	-tls1 0    \
	-require 1
    comm::comm new BAR -socketcmd tls::socket -listen 1

    # Setup secured channel in slave process
    ::comm::comm send [slave] {
	package require tls
	set fox dog
    }
    ::comm::comm send [slave] \
	[list \
	     tls::init \
	     -keyfile  [tcllibPath devtools/transmitter.key] \
	     -certfile [tcllibPath devtools/transmitter.crt] \
	     -cafile   [tcllibPath devtools/ca.crt] \
	     -ssl2 1    \
	     -ssl3 1    \
	     -tls1 0    \
	     -require 1]
    set FOO [::comm::comm send [slave] {
	comm::comm new FOO -socketcmd tls::socket -listen 1
	FOO self
    }] ; # {}

    # Run command interaction over the secured channel

Changes to modules/comm/comm_wire.man.

276
277
278
279
280
281
282
283
284
		 negotiated.

		 IOW if v2 is used the client will not see a version
	         reply during the negotiation handshake.
}]

[vset CATEGORY comm]
[include ../common-text/feedback.inc]
[manpage_end]







|

276
277
278
279
280
281
282
283
284
		 negotiated.

		 IOW if v2 is used the client will not see a version
	         reply during the negotiation handshake.
}]

[vset CATEGORY comm]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Deleted modules/comm/test-assets/comm.slaveboot.

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
# -*- tcl -*-
# Script to boot a child running an open comm server

set spawncode [asset slave.tcl]

proc slaveat {id} {
    #puts "Slave @ $id"
    proc slave {} [list return $id]
    set ::go .
}

#puts "self @ [::comm::comm self]"

exec \
    [info nameofexecutable] $spawncode \
    [tcllibPath snit/snit.tcl] \
    [localPath  comm.tcl] \
    [::comm::comm self] &

#puts "Waiting for spawned comm system to boot"
# Wait for the slave to initialize itself.
vwait ::go

#puts "Running tests"
#::comm::comm debug 1

proc slavestop {} {
    ::comm::comm send -async [slave] {{exit}}
    ::comm::comm abort
    removeFile spawn
    return
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted modules/comm/test-assets/slave.tcl.

1
2
3
4
5
6
7
8
9
10
# -*- tcl -*-
catch {wm withdraw .}
##puts [set fh [open ~/foo w]] $argv ; close $fh

source [lindex $argv 0] ; # load 'snit'
source [lindex $argv 1] ; # load 'comm'
# and wait for commands. But first send our
# own server socket to the initiator
::comm::comm send [lindex $argv 2] [list slaveat [::comm::comm self]]
vwait forever
<
<
<
<
<
<
<
<
<
<




















Deleted modules/common-text/feedback.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[section {Bugs, Ideas, Feedback}]
[vset TRACKER http://core.tcl.tk/tcllib/reportlist]
[vset LABEL   {Tcllib Trackers}]

This document, and the package it describes, will undoubtedly contain
bugs and other problems.

Please report such in the category [emph [vset CATEGORY]] of the
[uri [vset TRACKER] [vset LABEL]].

Please also report any ideas for enhancements you may have for either
package and/or documentation.

[para]
When proposing code changes, please provide [emph {unified diffs}],
i.e the output of [const {diff -u}].

[para]
Note further that [emph attachments] are strongly preferred over
inlined patches. Attachments can be made by going to the [const Edit]
form of the ticket immediately after its creation, and then using the
left-most button in the secondary navigation bar.

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































Changes to modules/common-text/tls-security-notes.inc.


1
2





























[section {TLS Security Considerations}]
[include tls-security-text.inc]




























>

|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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

[section {TLS Security Considerations}]

This package uses the [package TLS] package to handle the security
for [const https] urls and other socket connections.

[para] Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of [package TLS], nor of
this package itself however.

Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.

[para] For example, in light of the recent
[uri http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html \
{POODLE attack}] discovered by Google many servers will disable support
for the SSLv3 protocol.

To handle this change the applications using [package TLS] must be
patched, and not this package, nor [package TLS] itself.

Such a patch may be as simple as generally activating [const tls1]
support, as shown in the example below.

[example {
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...
}]

Deleted modules/common-text/tls-security-text.inc.

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

[para] This package uses the [package TLS] package to handle the
security for [const https] urls and other socket connections.

[para] Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of [package TLS], nor of
this package itself however.

Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.

[para] For example, in light of the recent
[uri http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html \
{POODLE attack}] discovered by Google many servers will disable support
for the SSLv3 protocol.

To handle this change the applications using [package TLS] must be
patched, and not this package, nor [package TLS] itself.

Such a patch may be as simple as generally activating [const tls1]
support, as shown in the example below.

[example {
    package require tls
    tls::init -tls1 1 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...
}]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Changes to modules/control/control.man.

157
158
159
160
161
162
163
164
165
% catch a
1
% catch b
0
}]

[vset CATEGORY control]
[include ../common-text/feedback.inc]
[manpage_end]







|

157
158
159
160
161
162
163
164
165
% catch a
1
% catch b
0
}]

[vset CATEGORY control]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/coroutine/coro_auto.man.

38
39
40
41
42
43
44
45
46
[def [cmd global]]
[def [cmd read]]
[def [cmd update]]
[def [cmd vwait]]
[list_end]

[vset CATEGORY coroutine]
[include ../common-text/feedback.inc]
[manpage_end]







|

38
39
40
41
42
43
44
45
46
[def [cmd global]]
[def [cmd read]]
[def [cmd update]]
[def [cmd vwait]]
[list_end]

[vset CATEGORY coroutine]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/coroutine/coroutine.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
## -- Tcl Module -- -*- tcl -*-
# # ## ### ##### ######## #############

# @@ Meta Begin
# Package coroutine 1.2
# Meta platform        tcl
# Meta require         {Tcl 8.6}
# Meta license         BSD
# Meta as::author      {Andreas Kupries}
# Meta as::author      {Colin Macleod}
# Meta as::author      {Colin McCormack}
# Meta as::author      {Donal Fellows}




|







1
2
3
4
5
6
7
8
9
10
11
12
## -- Tcl Module -- -*- tcl -*-
# # ## ### ##### ######## #############

# @@ Meta Begin
# Package coroutine 1.1.1
# Meta platform        tcl
# Meta require         {Tcl 8.6}
# Meta license         BSD
# Meta as::author      {Andreas Kupries}
# Meta as::author      {Colin Macleod}
# Meta as::author      {Colin McCormack}
# Meta as::author      {Donal Fellows}
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
proc ::coroutine::util::global {args} {
    # Frame #1 is the coroutine-specific stack frame at its
    # bottom. Variables there are out of view of the main code, and
    # can be made visible in the entire coroutine underneath.

    set cmd [list upvar "#1"]
    foreach var $args {
	lappend cmd $var $var
    }
    tailcall {*}$cmd
}

# - -- --- ----- -------- -------------

proc ::coroutine::util::after {delay} {
    ::after $delay [list [info coroutine]]
    yield
    return
}

# - -- --- ----- -------- -------------

proc ::coroutine::util::exit {{status 0}} {







|







|







86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
proc ::coroutine::util::global {args} {
    # Frame #1 is the coroutine-specific stack frame at its
    # bottom. Variables there are out of view of the main code, and
    # can be made visible in the entire coroutine underneath.

    set cmd [list upvar "#1"]
    foreach var $args {
	lappend cmd $var $var 
    }
    tailcall {*}$cmd
}

# - -- --- ----- -------- -------------

proc ::coroutine::util::after {delay} {
    ::after $delay [info coroutine]
    yield
    return
}

# - -- --- ----- -------- -------------

proc ::coroutine::util::exit {{status 0}} {
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
    # Step 2. To prevent the next section of the coroutine code from
    # running entirely within the variable trace (*) we now use an
    # idle handler to defer it until the trace is definitely
    # done. This trick by Peter Spjuth.
    #
    # (*) At this point we are in VWaitTrace running the coroutine.

    ::after idle [list [info coroutine]]
    yield
    return
}

proc ::coroutine::util::VWaitTrace {coroutine args} {
    $coroutine
    return
}

# - -- --- ----- -------- -------------

proc ::coroutine::util::update {{what {}}} {
    if {$what eq "idletasks"} {
        ::after idle [list [info coroutine]]
    } elseif {$what ne {}} {
        # Force proper error message for bad call.
        tailcall ::tcl::update $what
    } else {
        ::after 0 [list [info coroutine]]
    }
    yield
    return
}

# - -- --- ----- -------- -------------

proc ::coroutine::util::gets {args} {
    # Process arguments.
    # Acceptable syntax:
    # * gets CHAN ?VARNAME?







|













|




|



|







125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
    # Step 2. To prevent the next section of the coroutine code from
    # running entirely within the variable trace (*) we now use an
    # idle handler to defer it until the trace is definitely
    # done. This trick by Peter Spjuth.
    #
    # (*) At this point we are in VWaitTrace running the coroutine.

    ::after idle [info coroutine]
    yield
    return
}

proc ::coroutine::util::VWaitTrace {coroutine args} {
    $coroutine
    return
}

# - -- --- ----- -------- -------------

proc ::coroutine::util::update {{what {}}} {
    if {$what eq "idletasks"} {
        ::after idle [info coroutine]
    } elseif {$what ne {}} {
        # Force proper error message for bad call.
        tailcall ::tcl::update $what
    } else {
        ::after 0 [info coroutine]
    }
    yield
    return
} 

# - -- --- ----- -------- -------------

proc ::coroutine::util::gets {args} {
    # Process arguments.
    # Acceptable syntax:
    # * gets CHAN ?VARNAME?
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
	# not enough, or too many arguments (0, or > 2): Calling the
	# builtin gets command with the bogus arguments gives us the
	# necessary error with the proper message.
	tailcall ::chan gets {*}$args
    }

    # Loop until we have a complete line. Yield to the event loop
    # where necessary. During
    set blocking [::chan configure $chan -blocking]
    while {1} {
        ::chan configure $chan -blocking 0

	try {
	    set result [::chan gets $chan line]
	} on error {result opts} {







|







172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
	# not enough, or too many arguments (0, or > 2): Calling the
	# builtin gets command with the bogus arguments gives us the
	# necessary error with the proper message.
	tailcall ::chan gets {*}$args
    }

    # Loop until we have a complete line. Yield to the event loop
    # where necessary. During 
    set blocking [::chan configure $chan -blocking]
    while {1} {
        ::chan configure $chan -blocking 0

	try {
	    set result [::chan gets $chan line]
	} on error {result opts} {
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
                return $line
            }
        }
    }
}


proc ::coroutine::util::gets_safety {chan limit varname {timeout 120000}} {
    # Process arguments.
    # Acceptable syntax:
    # * gets CHAN ?VARNAME?

    # Loop until we have a complete line. Yield to the event loop
    # where necessary. During
    set blocking [::chan configure $chan -blocking]
    upvar 1 $varname line
    try {
	while {1} {
	    ::chan configure $chan -blocking 0
	    if {[::chan pending input $chan]>= $limit} {
		error {Too many notes, Mozart. Too many notes}
	    }
	    try {
		set result [::chan gets $chan line]
	    } on error {result opts} {
		return -code $result -options $opts
	    }

	    if {[::chan blocked $chan]} {
	  set timeoutevent [::after $timeout [list [info coroutine] timeout]]
		::chan event $chan readable [list [info coroutine] readable]
		set event [yield]
		if {$event eq "timeout"} {
		  error "Connection Timed Out"
		}
		::after cancel $timeoutevent
		::chan event $chan readable {}
	    } else {
		return $result
	    }
	}
    } finally {
        ::chan configure $chan -blocking $blocking







|





|













|

<
|
|
<
<
<
<







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229

230
231




232
233
234
235
236
237
238
                return $line
            }
        }
    }
}


proc ::coroutine::util::gets_safety {chan limit varname} {
    # Process arguments.
    # Acceptable syntax:
    # * gets CHAN ?VARNAME?

    # Loop until we have a complete line. Yield to the event loop
    # where necessary. During 
    set blocking [::chan configure $chan -blocking]
    upvar 1 $varname line
    try {
	while {1} {
	    ::chan configure $chan -blocking 0
	    if {[::chan pending input $chan]>= $limit} {
		error {Too many notes, Mozart. Too many notes}
	    }
	    try {
		set result [::chan gets $chan line]
	    } on error {result opts} {
		return -code $result -options $opts
	    }
    
	    if {[::chan blocked $chan]} {

		::chan event $chan readable [list [info coroutine]]
		yield




		::chan event $chan readable {}
	    } else {
		return $result
	    }
	}
    } finally {
        ::chan configure $chan -blocking $blocking
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304

305





306

307


308


309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335






336
337




338
339

340
341
342
343
344
345
346
    # n characters have been read (or eof reached).

    set buf {}

    if {$total eq "Inf"} {
	# Loop until eof.

	while 1 {
	    set blocking [::chan configure $chan -blocking]
	    ::chan configure $chan -blocking 0
	    if {[::chan eof $chan]} {
		break
	    } elseif {[::chan blocked $chan]} {
		::chan event $chan readable [list [info coroutine]]
		yield
		::chan event $chan readable {}
	    }

	    try {
		set result [::chan read $chan]
	    } on error {result opts} {
		::chan configure $chan -blocking $blocking
		return -code $result -options $opts

	    } finally {





		::chan configure $chan -blocking $blocking

	    }


	    append buf $result


	}
    } else {
	# Loop until total characters have been read, or eof found,
	# whichever is first.

	set left $total
	while 1 {
	    set blocking [::chan configure $chan -blocking]
	    ::chan configure $chan -blocking 0

	    if {[::chan eof $chan]} {
		break
	    } elseif {[::chan blocked $chan]} {
		::chan event $chan readable [list [info coroutine]]
		yield
		::chan event $chan readable {}
	    }

	    try {
		set result [::chan read $chan $left]
	    } on error {result opts} {
		::chan configure $chan -blocking $blocking
		return -code $result -options $opts
	    } finally {
		::chan configure $chan -blocking $blocking
	    }







	    append buf $result
	    incr left -[string length $result]




	    if {!$left} {
		break

	    }
	}
    }

    if {$chop && [string index $buf end] eq "\n"} {
	set buf [string range $buf 0 end-1]
    }







|


<
<
<
<
<
<
<






>
|
>
>
>
>
>

>
|
>
>
|
>
>






|



<
<
<
<
<
<
<
<





<
<


>
>
>
>
>
>
|
|
>
>
>
>
|
|
>







277
278
279
280
281
282
283
284
285
286







287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317








318
319
320
321
322


323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
    # n characters have been read (or eof reached).

    set buf {}

    if {$total eq "Inf"} {
	# Loop until eof.

	while {1} {
	    set blocking [::chan configure $chan -blocking]
	    ::chan configure $chan -blocking 0








	    try {
		set result [::chan read $chan]
	    } on error {result opts} {
		::chan configure $chan -blocking $blocking
		return -code $result -options $opts
	    }

	    if {[::chan blocked $chan]} {
		::chan event $chan readable [list [info coroutine]]
		yield
		::chan event $chan readable {}
	    } else {
		::chan configure $chan -blocking $blocking
		append buf $result

		if {[::chan eof $chan]} {
		    ::chan close $chan
		    break
		}
	    }
	}
    } else {
	# Loop until total characters have been read, or eof found,
	# whichever is first.

	set left $total
	while {1} {
	    set blocking [::chan configure $chan -blocking]
	    ::chan configure $chan -blocking 0









	    try {
		set result [::chan read $chan $left]
	    } on error {result opts} {
		::chan configure $chan -blocking $blocking
		return -code $result -options $opts


	    }

	    if {[::chan blocked $chan]} {
		::chan event $chan readable [list [info coroutine]]
		yield
		::chan event $chan readable {}
	    } else {
		::chan configure $chan -blocking $blocking
		append buf $result
		incr   left -[string length $result]

		if {[::chan eof $chan]} {
		    ::chan close $chan
		    break
		} elseif {!$left} {
		    break
		}
	    }
	}
    }

    if {$chop && [string index $buf end] eq "\n"} {
	set buf [string range $buf 0 end-1]
    }
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
        upvar 1 $varName var
        trace add variable var write $callback
    }

    set choice [yield]

    foreach varName $args {
	#checker exclude warnShadowVar
        upvar 1 $varName var
        trace remove variable var write $callback
    }

    # Step 2. To prevent the next section of the coroutine code from
    # running entirely within the variable trace (*) we now use an
    # idle handler to defer it until the trace is definitely
    # done. This trick by Peter Spjuth.
    #
    # (*) At this point we are in AWaitSignal running the coroutine.

    ::after idle [list [info coroutine]]
    yield

    return $choice
}

proc ::coroutine::util::AWaitSignal {coroutine var index op} {
    if {$op ne "write"} { return }
    set fullvar $var
    if {$index ne ""} { append fullvar ($index) }
    $coroutine $fullvar
}

# # ## ### ##### ######## #############
## Internal (package specific) commands

proc ::coroutine::util::ID {} {
    variable counter
    return [namespace current]::C[incr counter]
}

# # ## ### ##### ######## #############
## Internal (package specific) state

namespace eval ::coroutine::util {
    #checker exclude warnShadowVar
    variable counter 0
}

# # ## ### ##### ######## #############
## Ready
package provide coroutine 1.2
return







|











|










|



















|

364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
        upvar 1 $varName var
        trace add variable var write $callback
    }

    set choice [yield]

    foreach varName $args {
	#checker exclude warnShadowVar 
        upvar 1 $varName var
        trace remove variable var write $callback
    }

    # Step 2. To prevent the next section of the coroutine code from
    # running entirely within the variable trace (*) we now use an
    # idle handler to defer it until the trace is definitely
    # done. This trick by Peter Spjuth.
    #
    # (*) At this point we are in AWaitSignal running the coroutine.

    ::after idle [info coroutine]
    yield

    return $choice
}

proc ::coroutine::util::AWaitSignal {coroutine var index op} {
    if {$op ne "write"} { return }
    set fullvar $var
    if {$index ne ""} { append fullvar ($index) }
    $coroutine $fullvar
} 

# # ## ### ##### ######## #############
## Internal (package specific) commands

proc ::coroutine::util::ID {} {
    variable counter
    return [namespace current]::C[incr counter]
}

# # ## ### ##### ######## #############
## Internal (package specific) state

namespace eval ::coroutine::util {
    #checker exclude warnShadowVar
    variable counter 0
}

# # ## ### ##### ######## #############
## Ready
package provide coroutine 1.1.3
return

Changes to modules/coroutine/pkgIndex.tcl.

1
2
3
if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded coroutine       1.2   [list source [file join $dir coroutine.tcl]]
package ifneeded coroutine::auto 1.1.3 [list source [file join $dir coro_auto.tcl]]

|

1
2
3
if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded coroutine       1.1.3 [list source [file join $dir coroutine.tcl]]
package ifneeded coroutine::auto 1.1.3 [list source [file join $dir coro_auto.tcl]]

Changes to modules/coroutine/tcllib_coroutine.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset CORO_VERSION 1.2]
[manpage_begin coroutine n [vset CORO_VERSION]]
[keywords after]
[keywords channel]
[keywords coroutine]
[keywords events]
[keywords exit]
[keywords gets]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset CORO_VERSION 1.1.3]
[manpage_begin coroutine n [vset CORO_VERSION]]
[keywords after]
[keywords channel]
[keywords coroutine]
[keywords events]
[keywords exit]
[keywords gets]
109
110
111
112
113
114
115
116
117

This command causes the coroutine calling it to wait for a write to
the named namespace variable [arg varname].

[list_end]

[vset CATEGORY coroutine]
[include ../common-text/feedback.inc]
[manpage_end]







|

109
110
111
112
113
114
115
116
117

This command causes the coroutine calling it to wait for a write to
the named namespace variable [arg varname].

[list_end]

[vset CATEGORY coroutine]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/counter/counter.man.

242
243
244
245
246
247
248
249
250
Resets the counter with the name [arg tag] to an initial state. The
[arg args] determine the new characteristics of the counter. They have
the same meaning as described for [cmd ::counter::init].

[list_end]

[vset CATEGORY counter]
[include ../common-text/feedback.inc]
[manpage_end]







|

242
243
244
245
246
247
248
249
250
Resets the counter with the name [arg tag] to an initial state. The
[arg args] determine the new characteristics of the counter. They have
the same meaning as described for [cmd ::counter::init].

[list_end]

[vset CATEGORY counter]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/crc/cksum.man.

123
124
125
126
127
128
129
130
131
2609532967
}]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY crc]
[include ../common-text/feedback.inc]
[manpage_end]







|

123
124
125
126
127
128
129
130
131
2609532967
}]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY crc]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/crc/crc16.man.

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
[vset VERSION 1.1.4]
[manpage_begin crc16 n [vset VERSION]]
[see_also cksum(n)]
[see_also crc32(n)]
[see_also sum(n)]
[keywords checksum]
[keywords cksum]
[keywords crc]
[keywords crc16]
[keywords crc32]
[keywords {cyclic redundancy check}]
[keywords {data integrity}]
[keywords security]
[copyright {2002, 2017, Pat Thoyts}]
[moddesc   {Cyclic Redundancy Checks}]
[titledesc {Perform a 16bit Cyclic Redundancy Check}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require crc16 [opt [vset VERSION]]]
[description]
[para]

This package provides a Tcl-only implementation of the CRC
algorithms based upon information provided at
http://www.microconsultants.com/tips/crc/crc.txt

There are a number of permutations available for calculating CRC
checksums and this package can handle all of them. Defaults are set up
for the most common cases.

[section COMMANDS]

[list_begin definitions]

[call [cmd ::crc::crc16] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [const --] [arg message]]
[call [cmd ::crc::crc16] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] "-filename [arg file]"]
[call [cmd ::crc::crc-ccitt] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [const --] [arg message]]
[call [cmd ::crc::crc-ccitt] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] "-filename [arg file]"]
[call [cmd ::crc::xmodem] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [const --] [arg message]]
[call [cmd ::crc::xmodem] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] "-filename [arg file]"]

The command takes either string data or a file name and returns a checksum
value calculated using the CRC algorithm. The command used sets up the
CRC polynomial, initial value and bit ordering for the desired
standard checksum calculation. The result is formatted
<
|











|




|
















|



|



|








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

[manpage_begin crc16 n 1.1.2]
[see_also cksum(n)]
[see_also crc32(n)]
[see_also sum(n)]
[keywords checksum]
[keywords cksum]
[keywords crc]
[keywords crc16]
[keywords crc32]
[keywords {cyclic redundancy check}]
[keywords {data integrity}]
[keywords security]
[copyright {2002, Pat Thoyts}]
[moddesc   {Cyclic Redundancy Checks}]
[titledesc {Perform a 16bit Cyclic Redundancy Check}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require crc16 [opt 1.1.2]]
[description]
[para]

This package provides a Tcl-only implementation of the CRC
algorithms based upon information provided at
http://www.microconsultants.com/tips/crc/crc.txt

There are a number of permutations available for calculating CRC
checksums and this package can handle all of them. Defaults are set up
for the most common cases.

[section COMMANDS]

[list_begin definitions]

[call [cmd ::crc::crc16] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [arg message]]
[call [cmd ::crc::crc16] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] "-filename [arg file]"]
[call [cmd ::crc::crc-ccitt] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [arg message]]
[call [cmd ::crc::crc-ccitt] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] "-filename [arg file]"]
[call [cmd ::crc::xmodem] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] [arg message]]
[call [cmd ::crc::xmodem] [opt "-format [arg format]"] \
  [opt "-seed [arg value]"] [opt "-implementation [arg procname]"] "-filename [arg file]"]

The command takes either string data or a file name and returns a checksum
value calculated using the CRC algorithm. The command used sets up the
CRC polynomial, initial value and bit ordering for the desired
standard checksum calculation. The result is formatted
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
The package provides some implementations of standard CRC polynomials
for the XMODEM, CCITT and the usual CRC-16 checksum. For convenience,
additional commands have been provided that make use of these
implementations.

[def "--"]

Terminate option processing. Please note that using the option
termination flag is important when processing data from parameters. If
the binary data looks like one of the options given above then the
data will be read as an option if this marker is not included.

Always use the [arg --] option termination flag before giving the data
argument.

[list_end]

[section EXAMPLES]

[para]
[example {
% crc::crc16 -- "Hello, World!"
64077
}]

[para]
[example {
% crc::crc-ccitt -- "Hello, World!"
26586
}]

[para]
[example {
% crc::crc16 -format 0x%X -- "Hello, World!"
0xFA4D
}]

[para]
[example {
% crc::crc16 -file crc16.tcl
51675
}]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY crc]
[include ../common-text/feedback.inc]
[manpage_end]







|
<
<
<
<
<
<







|





|





|













|

100
101
102
103
104
105
106
107






108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
The package provides some implementations of standard CRC polynomials
for the XMODEM, CCITT and the usual CRC-16 checksum. For convenience,
additional commands have been provided that make use of these
implementations.

[def "--"]

Terminate option processing.







[list_end]

[section EXAMPLES]

[para]
[example {
% crc::crc16 "Hello, World!"
64077
}]

[para]
[example {
% crc::crc-ccitt "Hello, World!"
26586
}]

[para]
[example {
% crc::crc16 -format 0x%X "Hello, World!"
0xFA4D
}]

[para]
[example {
% crc::crc16 -file crc16.tcl
51675
}]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY crc]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/crc/crc16.tcl.

1
2
3
4
5
6
7
8
# crc16.tcl -- Copyright (C) 2002, 2017 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# Cyclic Redundancy Check - this is a Tcl implementation of a general
# table-driven CRC implementation. This code should be able to generate
# the lookup table and implement the correct algorithm for most types
# of CRC. CRC-16, CRC-32 and the CCITT version of CRC-16. [1][2][3]
# Most transmission CRCs use the CCITT polynomial (including X.25, SDLC
# and Kermit).
|







1
2
3
4
5
6
7
8
# crc16.tcl -- Copyright (C) 2002 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# Cyclic Redundancy Check - this is a Tcl implementation of a general
# table-driven CRC implementation. This code should be able to generate
# the lookup table and implement the correct algorithm for most types
# of CRC. CRC-16, CRC-32 and the CCITT version of CRC-16. [1][2][3]
# Most transmission CRCs use the CCITT polynomial (including X.25, SDLC
# and Kermit).
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
    # Array to hold the generated tables
    variable table
    if {![info exists table]} { array set table {}}

    # calculate the sign bit for the current platform.
    variable signbit
    if {![info exists signbit]} {
        if {[info exists tcl_platform(wordSize)]} {
            set signbit [expr {1 << (8*$tcl_platform(wordSize)-1)}]
        } else {
            # Old Tcl. Find bit by shifting until wrap around to 0.
            # With int() result limited to system word size the loop will end.
            variable v
            for {set v 1} {int($v) != 0} {set signbit $v; set v [expr {$v<<1}]} {}
            unset v
        }
    }
}

# -------------------------------------------------------------------------
# Generate a CRC lookup table.
# This creates a CRC algorithm lookup table for a 'width' bits checksum
# using the 'poly' polynomial for all values of an input byte.







<
<
<
<
<
|
|
|
<







59
60
61
62
63
64
65





66
67
68

69
70
71
72
73
74
75
    # Array to hold the generated tables
    variable table
    if {![info exists table]} { array set table {}}

    # calculate the sign bit for the current platform.
    variable signbit
    if {![info exists signbit]} {





        variable v
        for {set v 1} {int($v) != 0} {set signbit $v; set v [expr {$v<<1}]} {}
        unset v

    }
}

# -------------------------------------------------------------------------
# Generate a CRC lookup table.
# This creates a CRC algorithm lookup table for a 'width' bits checksum
# using the 'poly' polynomial for all values of an input byte.
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
            -i*   { set opts(impl) [uplevel 1 namespace origin [Pop args 1]] }
            -s*   { set opts(seed) [Pop args 1] }
            default {
                if {[llength $args] == 1} { break }
                if {[string compare $option "--"] == 0} { Pop args; break }
                set options [join [lsort [array names opts]] ", -"]
                return -code error "bad option $option:\
                       must be one of -$options or -- to indicate end of options"
            }
        }
        Pop args
    }

    if {$opts(filename) != {}} {
        set opts(channel) [open $opts(filename) r]







|







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
            -i*   { set opts(impl) [uplevel 1 namespace origin [Pop args 1]] }
            -s*   { set opts(seed) [Pop args 1] }
            default {
                if {[llength $args] == 1} { break }
                if {[string compare $option "--"] == 0} { Pop args; break }
                set options [join [lsort [array names opts]] ", -"]
                return -code error "bad option $option:\
                       must be one of -$options"
            }
        }
        Pop args
    }

    if {$opts(filename) != {}} {
        set opts(channel) [open $opts(filename) r]
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
        if {$opts(filename) != {}} {
            close $opts(channel)
        }
    } else {
        if {[llength $args] != 1} {
            return -code error "wrong \# args: should be\
                   \"crc16 ?-format string? ?-seed value? ?-impl procname?\
                   -file name | -- data\""
        }
        set r [$opts(impl) [lindex $args 0] $opts(seed)]
    }
    return [format $opts(format) $r]
}

# -------------------------------------------------------------------------







|







258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
        if {$opts(filename) != {}} {
            close $opts(channel)
        }
    } else {
        if {[llength $args] != 1} {
            return -code error "wrong \# args: should be\
                   \"crc16 ?-format string? ?-seed value? ?-impl procname?\
                   -file name | data\""
        }
        set r [$opts(impl) [lindex $args 0] $opts(seed)]
    }
    return [format $opts(format) $r]
}

# -------------------------------------------------------------------------
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
proc ::crc::crc-32 {args} {
    return [eval [list crc -impl [namespace origin CRC-32] -seed 0xFFFFFFFF]\
                $args]
}

# -------------------------------------------------------------------------

package provide crc16 1.1.4

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|







288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
proc ::crc::crc-32 {args} {
    return [eval [list crc -impl [namespace origin CRC-32] -seed 0xFFFFFFFF]\
                $args]
}

# -------------------------------------------------------------------------

package provide crc16 1.1.2

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/crc/crc32.man.

1
2
3
4
5
6
7
8
[vset VERSION 1.3.3]
[manpage_begin crc32 n [vset VERSION]]
[see_also cksum(n)]
[see_also crc16(n)]
[see_also sum(n)]
[keywords checksum]
[keywords cksum]
[keywords crc]
|







1
2
3
4
5
6
7
8
[vset VERSION 1.3.2]
[manpage_begin crc32 n [vset VERSION]]
[see_also cksum(n)]
[see_also crc16(n)]
[see_also sum(n)]
[keywords checksum]
[keywords cksum]
[keywords crc]
144
145
146
147
148
149
150
151
152
3964322768
}]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY crc]
[include ../common-text/feedback.inc]
[manpage_end]







|

144
145
146
147
148
149
150
151
152
3964322768
}]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY crc]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/crc/crc32.tcl.

83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
                           0xBAD03605 0xCDD70693 0x54DE5729 0x23D967BF \
                           0xB3667A2E 0xC4614AB8 0x5D681B02 0x2A6F2B94 \
                           0xB40BBE37 0xC30C8EA1 0x5A05DF1B 0x2D02EF8D]

    # calculate the sign bit for the current platform.
    variable signbit
    if {![info exists signbit]} {
        if {[info exists tcl_platform(wordSize)]} {
            set signbit [expr {1 << (8*$tcl_platform(wordSize)-1)}]
        } else {
            # Old Tcl. Find bit by shifting until wrap around to 0.
            # With int() result limited to system word size the loop will end.
            variable v
            for {set v 1} {int($v) != 0} {set signbit $v; set v [expr {$v<<1}]} {}
            unset v
        }
    }
    
    variable uid ; if {![info exists uid]} {set uid 0}
}

# -------------------------------------------------------------------------








<
<
<
<
<
|
|
|
<







83
84
85
86
87
88
89





90
91
92

93
94
95
96
97
98
99
                           0xBAD03605 0xCDD70693 0x54DE5729 0x23D967BF \
                           0xB3667A2E 0xC4614AB8 0x5D681B02 0x2A6F2B94 \
                           0xB40BBE37 0xC30C8EA1 0x5A05DF1B 0x2D02EF8D]

    # calculate the sign bit for the current platform.
    variable signbit
    if {![info exists signbit]} {





	variable v
        for {set v 1} {int($v) != 0} {set signbit $v; set v [expr {$v<<1}]} {}
        unset v

    }
    
    variable uid ; if {![info exists uid]} {set uid 0}
}

# -------------------------------------------------------------------------

369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
    variable e {}
    foreach e {trf critcl} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide crc32 1.3.3

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|







363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
    variable e {}
    foreach e {trf critcl} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide crc32 1.3.2

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/crc/pkgIndex.tcl.

1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded cksum 1.1.4 [list source [file join $dir cksum.tcl]]
package ifneeded crc16 1.1.4 [list source [file join $dir crc16.tcl]]
package ifneeded crc32 1.3.3 [list source [file join $dir crc32.tcl]]
package ifneeded sum   1.1.2 [list source [file join $dir sum.tcl]]


|
|

1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded cksum 1.1.4 [list source [file join $dir cksum.tcl]]
package ifneeded crc16 1.1.2 [list source [file join $dir crc16.tcl]]
package ifneeded crc32 1.3.2 [list source [file join $dir crc32.tcl]]
package ifneeded sum   1.1.2 [list source [file join $dir sum.tcl]]

Changes to modules/crc/sum.man.

100
101
102
103
104
105
106
107
108
13392
}]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY crc]
[include ../common-text/feedback.inc]
[manpage_end]







|

100
101
102
103
104
105
106
107
108
13392
}]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY crc]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/cron/cron.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 2.1]
[manpage_begin cron n [vset PACKAGE_VERSION]]
[keywords {cron}]
[keywords {odie}]
[copyright {2016-2018 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {cron}]
[titledesc {Tool for automating the period callback of commands}]
[category  System]
[require Tcl 8.6]
[require cron [opt [vset PACKAGE_VERSION]]]
[description]
[para]

|



|







1
2
3
4
5
6
7
8
9
10
11
12
13
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 2.0]
[manpage_begin cron n [vset PACKAGE_VERSION]]
[keywords {cron}]
[keywords {odie}]
[copyright {2016 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {cron}]
[titledesc {Tool for automating the period callback of commands}]
[category  System]
[require Tcl 8.6]
[require cron [opt [vset PACKAGE_VERSION]]]
[description]
[para]
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
[call [cmd {::cron::task info}] [arg process]]
Returns a dict describing [arg process]. See [cmd {::cron::task set}] for a description of the options.

[call [cmd {::cron::task set}] [arg process] [arg field] [arg value] [arg ?field...?] [arg ?value...?]]
[para]
If [arg process] does not exist, it is created. Options Include:
[list_begin definitions]
[def [cmd command]]
If [cmd coroutine] is black, a global command which implements this process. If [cmd coroutine] is not
black, the command to invoke to create or recreate the coroutine.
[def [cmd coroutine]]
The name of the coroutine (if any) which implements this process.
[def [cmd frequency]]
If -1, this process is terminated after the next event. If 0 this process should be called during every
idle event. If positive, this process should generate events periodically. The frequency is an integer number
of milliseconds between events.

[def [cmd object]]
The object associated with this process or coroutine.
[def [cmd scheduled]]
If non-zero, the absolute time from the epoch (in milliseconds) that this process will trigger an event.
If zero, and the [cmd frequency] is also zero, this process is called every idle loop.
[def [cmd running]]
A boolean flag. If true it indicates the process never returned or yielded during the event loop,
and will not be called again until it does so.
[list_end]
[call [cmd ::cron::wake] [arg ?who?]]

Wake up cron, and arrange for its event loop to be run during the next Idle cycle.

[example_begin]
::cron::wake {I just did something important}
[example_end]
[list_end]
[para]
Several utility commands are provided that are used internally within cron and for
testing cron, but may or may not be useful in the general cases.
[list_begin definitions]

[call [cmd ::cron::clock_step] [arg milliseconds]]
[para]
Return a clock time absolute to the epoch which falls on the next
border between one second and the next for the value of [arg milliseconds]

[call [cmd ::cron::clock_delay] [arg milliseconds]]
[para]
Return a clock time absolute to the epoch which falls on the next
border between one second and the next [arg milliseconds] in the future.

[call [cmd ::cron::clock_sleep] [arg seconds] [arg ?offset?]]
[para]
Return a clock time absolute to the epoch which falls exactly [arg seconds] in
the future. If offset is given it may be positive or negative, and will shift
the final time to before or after the second would flip.

[call [cmd ::cron::clock_set] [arg newtime]]
[para]
Sets the internal clock for cron. This command will advance the time in 100ms
increment, triggering events, until the internal time catches up with [arg newtime].
[para]
[arg newtime] is expressed in absolute milliseconds since the beginning of the epoch.


[list_end]
[para]
[vset CATEGORY odie]
[include ../common-text/feedback.inc]
[manpage_end]







|


|

|

|
|

|

|
|

|
















|


|

|


|












|





|

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
[call [cmd {::cron::task info}] [arg process]]
Returns a dict describing [arg process]. See [cmd {::cron::task set}] for a description of the options.

[call [cmd {::cron::task set}] [arg process] [arg field] [arg value] [arg ?field...?] [arg ?value...?]]
[para]
If [arg process] does not exist, it is created. Options Include:
[list_begin definitions]
[cmd command]
If [cmd coroutine] is black, a global command which implements this process. If [cmd coroutine] is not
black, the command to invoke to create or recreate the coroutine.
[cmd coroutine]
The name of the coroutine (if any) which implements this process.
[cmd frequency]
If -1, this process is terminated after the next event. If 0 this process should be called during every
idle event. If positive, this process should generate events periodically. The frequency is an interger number
of milleseconds between events.

[cmd object]
The object associated with this process or coroutine.
[cmd scheduled]
If non-zero, the absolute time from the epoch (in milleseconds) that this process will trigger an event.
If zero, and the [cmd frequency] is also zero, this process is called every idle loop.
[cmd running]
A boolean flag. If true it indicates the process never returned or yielded during the event loop,
and will not be called again until it does so.
[list_end]
[call [cmd ::cron::wake] [arg ?who?]]

Wake up cron, and arrange for its event loop to be run during the next Idle cycle.

[example_begin]
::cron::wake {I just did something important}
[example_end]
[list_end]
[para]
Several utility commands are provided that are used internally within cron and for
testing cron, but may or may not be useful in the general cases.
[list_begin definitions]

[call [cmd ::cron::clock_step] [arg milleseconds]]
[para]
Return a clock time absolute to the epoch which falls on the next
border between one second and the next for the value of [arg milleseconds]

[call [cmd ::cron::clock_delay] [arg milleseconds]]
[para]
Return a clock time absolute to the epoch which falls on the next
border between one second and the next [arg milleseconds] in the future.

[call [cmd ::cron::clock_sleep] [arg seconds] [arg ?offset?]]
[para]
Return a clock time absolute to the epoch which falls exactly [arg seconds] in
the future. If offset is given it may be positive or negative, and will shift
the final time to before or after the second would flip.

[call [cmd ::cron::clock_set] [arg newtime]]
[para]
Sets the internal clock for cron. This command will advance the time in 100ms
increment, triggering events, until the internal time catches up with [arg newtime].
[para]
[arg newtime] is expressed in absolute milleseconds since the beginning of the epoch.


[list_end]
[para]
[vset CATEGORY odie]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/cron/cron.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
###
# This file implements a process table
# Instead of having individual components try to maintain their own timers
# we centrally manage how often tasks should be kicked off here.
###
#
# Author: Sean Woods (for T&E Solutions)
package require Tcl 8.6 ;# See coroutine
package require coroutine
package require dicttool
::namespace eval ::cron {}

proc ::cron::task {command args} {
  if {$::cron::trace > 1} {
    puts [list ::cron::task $command $args]







<







1
2
3
4
5
6
7

8
9
10
11
12
13
14
###
# This file implements a process table
# Instead of having individual components try to maintain their own timers
# we centrally manage how often tasks should be kicked off here.
###
#
# Author: Sean Woods (for T&E Solutions)

package require coroutine
package require dicttool
::namespace eval ::cron {}

proc ::cron::task {command args} {
  if {$::cron::trace > 1} {
    puts [list ::cron::task $command $args]
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
    info {
      set process [lindex $args 0]
      if {![::info exists ::cron::processTable($process)]} {
        error "Process $process does not exist"
      }
      return $::cron::processTable($process)
    }
    frequency {
      set process [lindex $args 0]
      set time [lindex $args 1]
      if {![info exists ::cron::processTable($process)]} return
      dict with ::cron::processTable($process) {
        set now [clock_step [current_time]]
        set frequency [expr {0+$time}]
        if {$scheduled>($now+$time)} {
          dict set ::cron::processTable($process) scheduled [expr {$now+$time}]
        }
      }
    }
    sleep {
      set process [lindex $args 0]
      set time [lindex $args 1]
      if {![info exists ::cron::processTable($process)]} return
      dict with ::cron::processTable($process) {
        set now [clock_step [current_time]]
        set frequency 0
        set scheduled [expr {$now+$time}]
      }
    }
    create -
    set {
      set process [lindex $args 0]
      if {![::info exists ::cron::processTable($process)]} {
        set ::cron::processTable($process) [task TEMPLATE]
      }
      if {[llength $args]==2} {







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







28
29
30
31
32
33
34






















35
36
37
38
39
40
41
    info {
      set process [lindex $args 0]
      if {![::info exists ::cron::processTable($process)]} {
        error "Process $process does not exist"
      }
      return $::cron::processTable($process)
    }






















    create -
    set {
      set process [lindex $args 0]
      if {![::info exists ::cron::processTable($process)]} {
        set ::cron::processTable($process) [task TEMPLATE]
      }
      if {[llength $args]==2} {
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    set scheduled [expr {[clock scan $timecode]*1000}]
  }
  ::cron::task set $process \
    frequency -1 \
    command $command \
    scheduled $scheduled \
    coroutine {}

  if {$::cron::trace > 1} {
    puts [list ::cron::task info $process - > [::cron::task info $process]]
  }
  ::cron::wake NEW
  return $process
}








|







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
    set scheduled [expr {[clock scan $timecode]*1000}]
  }
  ::cron::task set $process \
    frequency -1 \
    command $command \
    scheduled $scheduled \
    coroutine {}
  
  if {$::cron::trace > 1} {
    puts [list ::cron::task info $process - > [::cron::task info $process]]
  }
  ::cron::wake NEW
  return $process
}

190
191
192
193
194
195
196
197
198

199
200
201
202
203
204
205
proc ::cron::object_coroutine {objname coroutine {info {}}} {
  if {$::cron::trace > 1} {
    puts [list ::cron::object_coroutine $objname $coroutine $info]
  }
  task set $coroutine \
    {*}$info \
    object $objname \
    coroutine $coroutine


  return $coroutine
}

# Notification that an object has been destroyed, and that
# it should give up any toys associated with events
proc ::cron::object_destroy {objname} {
  if {$::cron::trace > 1} {







|

>







167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
proc ::cron::object_coroutine {objname coroutine {info {}}} {
  if {$::cron::trace > 1} {
    puts [list ::cron::object_coroutine $objname $coroutine $info]
  }
  task set $coroutine \
    {*}$info \
    object $objname \
    coroutine $coroutine \

  ::cron::wake NEW
  return $coroutine
}

# Notification that an object has been destroyed, and that
# it should give up any toys associated with events
proc ::cron::object_destroy {objname} {
  if {$::cron::trace > 1} {
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
}

###
# topic: 97015814408714af539f35856f85bce6
###
proc ::cron::run process {
  variable processTable
  set mnow [clock_step [current_time]]
  if {[dict exists processTable($process) scheduled] && [dict exists processTable($process) scheduled]>0} {
    dict set processTable($process) scheduled [expr {$mnow-1000}]
  } else {
    dict set processTable($process) lastrun 0
  }
  ::cron::wake PROCESS
}

proc ::cron::clock_step timecode {
  return [expr {$timecode-($timecode%1000)}]
}








<
<
<
<
|
<







193
194
195
196
197
198
199




200

201
202
203
204
205
206
207
}

###
# topic: 97015814408714af539f35856f85bce6
###
proc ::cron::run process {
  variable processTable




  dict set processTable($process) lastrun 0

  ::cron::wake PROCESS
}

proc ::cron::clock_step timecode {
  return [expr {$timecode-($timecode%1000)}]
}

257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
  for {} {$time < $newtime} {incr time 100} {
    uplevel #0 {::cron::do_one_event CLOCK_ADVANCE}
  }
  set time $newtime
  uplevel #0 {::cron::do_one_event CLOCK_ADVANCE}
}

proc ::cron::once_in_a_while body {
  set script {set _eventid_ $::cron::current_event}
  append script $body
  # Add a safety to allow this while to only execute once per call
  append script {if {$_eventid_==$::cron::current_event} yield}
  uplevel 1 [list while 1 $body]
}

proc ::cron::sleep ms {
  if {$::cron::trace > 1} {
    puts [list ::cron::sleep $ms [info coroutine]]
  }

  set coro [info coroutine]
  # When the clock is being externally
  # controlled, advance the clock when
  # a sleep is called
  variable time
  if {$time >= 0 && $coro eq {}} {
    ::cron::clock_set [expr {$time+$ms}]
    return
  }
  if {$coro ne {}} {
    set mnow [current_time]
    set start $mnow
    set end [expr {$start+$ms}]
    set eventid $coro
    if {$::cron::trace} {
      puts "::cron::sleep $ms $coro"
    }
    # Mark as running
    task set $eventid scheduled $end coroutine $coro running 1
    ::cron::wake WAKE_IN_CORO
    yield 2
    while {$end >= $mnow} {
      if {$::cron::trace} {
        puts "::cron::sleep $ms $coro (loop)"
      }
      set mnow [current_time]
      yield 2
    }
    # Mark as not running to resume idle computation
    task set $eventid running 0
    if {$::cron::trace} {
      puts "/::cron::sleep $ms $coro"
    }
  } else {
    set eventid [incr ::cron::eventcount]
    set var ::cron::event_#$eventid
    set $var 0
    if {$::cron::trace} {
      puts "::cron::sleep $ms $eventid waiting for $var"
      ::after $ms "set $var 1 ; puts \"::cron::sleep - $eventid - FIRED\""
    } else {







<
<
<
<
<
<
<
<




|

<
<
<













<
|

|





|

<
<



|







230
231
232
233
234
235
236








237
238
239
240
241
242



243
244
245
246
247
248
249
250
251
252
253
254
255

256
257
258
259
260
261
262
263
264
265


266
267
268
269
270
271
272
273
274
275
276
  for {} {$time < $newtime} {incr time 100} {
    uplevel #0 {::cron::do_one_event CLOCK_ADVANCE}
  }
  set time $newtime
  uplevel #0 {::cron::do_one_event CLOCK_ADVANCE}
}









proc ::cron::sleep ms {
  if {$::cron::trace > 1} {
    puts [list ::cron::sleep $ms [info coroutine]]
  }
  
  set coro [info coroutine]



  variable time
  if {$time >= 0 && $coro eq {}} {
    ::cron::clock_set [expr {$time+$ms}]
    return
  }
  if {$coro ne {}} {
    set mnow [current_time]
    set start $mnow
    set end [expr {$start+$ms}]
    set eventid $coro
    if {$::cron::trace} {
      puts "::cron::sleep $ms $coro"
    }

    task set $eventid scheduled $end coroutine $coro
    ::cron::wake WAKE_IN_CORO
    yield
    while {$end >= $mnow} {
      if {$::cron::trace} {
        puts "::cron::sleep $ms $coro (loop)"
      }
      set mnow [current_time]
      yield
    }


    if {$::cron::trace} {
      puts "/::cron::sleep $ms $coro"
    }
  } else {  
    set eventid [incr ::cron::eventcount]
    set var ::cron::event_#$eventid
    set $var 0
    if {$::cron::trace} {
      puts "::cron::sleep $ms $eventid waiting for $var"
      ::after $ms "set $var 1 ; puts \"::cron::sleep - $eventid - FIRED\""
    } else {
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
  ###
  variable processTable
  variable processing
  variable all_coroutines
  variable coroutine_object
  variable coroutine_busy
  variable nextevent
  variable current_event

  while 1 {
    incr current_event
    set lastevent 0
    set now [current_time]
    # Wake me up in 5 minute intervals, just out of principle
    set nextevent [expr {$now-($now % 300000) + 300000}]
    set next_idle_event [expr {$now+250}]
    if {$::cron::trace > 1} {
      puts [list CRON TASK RUNNER nextevent $nextevent]







<
|

<







296
297
298
299
300
301
302

303
304

305
306
307
308
309
310
311
  ###
  variable processTable
  variable processing
  variable all_coroutines
  variable coroutine_object
  variable coroutine_busy
  variable nextevent

  
  while 1 {

    set lastevent 0
    set now [current_time]
    # Wake me up in 5 minute intervals, just out of principle
    set nextevent [expr {$now-($now % 300000) + 300000}]
    set next_idle_event [expr {$now+250}]
    if {$::cron::trace > 1} {
      puts [list CRON TASK RUNNER nextevent $nextevent]
392
393
394
395
396
397
398
399
400





401
402
403
404
405

406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
          }
          set lastevent $now
        }
      }
    }
    foreach task $tasks {
      dict set processTable($task) lastrun $now
      if {[dict exists processTable($task) foreground] && [dict set processTable($task) foreground]} continue
      if {[dict exists processTable($task) running] && [dict set processTable($task) running]} continue





      if {$::cron::trace > 2} {
        puts [list RUNNING $task [task info $task]]
      }
      set coro [dict getnull $processTable($task) coroutine]
      dict set processTable($task) running 1

      set command [dict getnull $processTable($task) command]
      if {$command eq {} && $coro eq {}} {
        # Task has nothing to do. Slot it for destruction
        lappend cancellist $task
      } elseif {$coro ne {}} {
        if {[info command $coro] eq {}} {
          set object [dict get $processTable($task) object]
          # Trigger coroutine again if a command was given
          # If this coroutine is associated with an object, ensure
          # the object still exists before invoking its method
          if {$command eq {} || ($object ne {} && [info command $object] eq {})} {
            lappend cancellist $task
            dict set processTable($task) running 0
            continue
          }
          if {$::cron::trace} {
            puts [list RESTARTING $task - coroutine $coro - with $command]
          }
          ::coroutine $coro {*}$command
        }
        try $coro on return {} {







<
|
>
>
>
>
>



<

>













|







349
350
351
352
353
354
355

356
357
358
359
360
361
362
363
364

365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
          }
          set lastevent $now
        }
      }
    }
    foreach task $tasks {
      dict set processTable($task) lastrun $now

      if {[dict exists processTable($task) running] && [dict set processTable($task) running]} {
        if {$::cron::trace} {
          puts "Process: $task is stuck"
        }
        continue
      }
      if {$::cron::trace > 2} {
        puts [list RUNNING $task [task info $task]]
      }

      dict set processTable($task) running 1
      set coro [dict getnull $processTable($task) coroutine]
      set command [dict getnull $processTable($task) command]
      if {$command eq {} && $coro eq {}} {
        # Task has nothing to do. Slot it for destruction
        lappend cancellist $task
      } elseif {$coro ne {}} {
        if {[info command $coro] eq {}} {
          set object [dict get $processTable($task) object]
          # Trigger coroutine again if a command was given
          # If this coroutine is associated with an object, ensure
          # the object still exists before invoking its method
          if {$command eq {} || ($object ne {} && [info command $object] eq {})} {
            lappend cancellist $task
            dict set processTable($task) running 0
            continue            
          }
          if {$::cron::trace} {
            puts [list RESTARTING $task - coroutine $coro - with $command]
          }
          ::coroutine $coro {*}$command
        }
        try $coro on return {} {
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515













516
517
518
519
520
521
522
523
524
525
526
527
528
529
530


531
532
533
534
535
536
537
    set delay [expr {$nextevent-$now}]
    if {$delay <= 0} {
      yield 0
    } else {
      if {$::cron::trace > 1} {
        puts "NEXT EVENT $delay - NEXT TASK $nexttask"
      }
      yield $delay
    }
  }
}

proc ::cron::wake {{who ???}} {
  ##
  # Only triggered by cron jobs kicking off other cron jobs within
  # the script body
  ##
  if {$::cron::trace} {
    puts "::cron::wake $who"













  }
  if {$::cron::busy} {
    return
  }
  after cancel $::cron::next_event
  set ::cron::next_event [after idle [list ::cron::do_one_event $who]]
}

proc ::cron::do_one_event {{who ???}} {
  if {$::cron::trace} {
    puts "::cron::do_one_event $who"
  }
  after cancel $::cron::next_event
  set now [current_time]
  set ::cron::busy 1


  while {$::cron::busy} {
    if {[info command ::cron::COROUTINE] eq {}} {
      ::coroutine ::cron::COROUTINE ::cron::runTasksCoro
    }
    set cron_delay [::cron::COROUTINE]
    if {$cron_delay==0} {
      if {[incr loops]>10} {







|











>
>
>
>
>
>
>
>
>
>
>
>
>







|







>
>







458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
    set delay [expr {$nextevent-$now}]
    if {$delay <= 0} {
      yield 0
    } else {
      if {$::cron::trace > 1} {
        puts "NEXT EVENT $delay - NEXT TASK $nexttask"
      }
      yield $delay      
    }
  }
}

proc ::cron::wake {{who ???}} {
  ##
  # Only triggered by cron jobs kicking off other cron jobs within
  # the script body
  ##
  if {$::cron::trace} {
    puts "::cron::wake $who"
  }
  if {$who eq "PANIC"} {
    # Cron is overdue and may be stuck
    set ::cron::busy 0
    set ::cron::panic_event {}
  }
  if {$::cron::busy && $::cron::panic_event eq {}} {
    if {$::cron::trace} {
      puts "CRON BUSY... RESCHEDULING PANIC"
    }
    after cancel $::cron::panic_event
    set ::cron::panic_event [after 120000 {::cron::wake PANIC}]
    return
  }
  if {$::cron::busy} {
    return
  }
  after cancel $::cron::next_event
  set ::cron::next_event [after idle [list ::cron::do_one_event $who]]
}
  
proc ::cron::do_one_event {{who ???}} {
  if {$::cron::trace} {
    puts "::cron::do_one_event $who"
  }
  after cancel $::cron::next_event
  set now [current_time]
  set ::cron::busy 1
  after cancel $::cron::panic_event
  set ::cron::panic_event [after 120000 {::cron::wake PANIC}]
  while {$::cron::busy} {
    if {[info command ::cron::COROUTINE] eq {}} {
      ::coroutine ::cron::COROUTINE ::cron::runTasksCoro
    }
    set cron_delay [::cron::COROUTINE]
    if {$cron_delay==0} {
      if {[incr loops]>10} {
595
596
597
598
599
600
601
602
603

604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
###
namespace eval ::cron {
  variable lastcall 0
  variable processTable
  variable busy 0
  variable next_event {}
  variable trace 0
  variable current_event
  variable time -1

  if {![info exists current_event]} {
    set current_event 0
  }
  if {![info exists ::cron::loops]} {
    array set ::cron::loops {
      active 0
      main 0
      idle 0
      wake 0
    }
  }
}

::cron::wake STARTUP
package provide cron 2.1








|

>
|
|












|

571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
###
namespace eval ::cron {
  variable lastcall 0
  variable processTable
  variable busy 0
  variable next_event {}
  variable trace 0
  variable event_loops
  variable time -1
  variable panic_event {}
  if {![info exists event_loops]} {
    set event_loops 0
  }
  if {![info exists ::cron::loops]} {
    array set ::cron::loops {
      active 0
      main 0
      idle 0
      wake 0
    }
  }
}

::cron::wake STARTUP
package provide cron 2.0

Changes to modules/cron/pkgIndex.tcl.










1
2









if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded cron 2.1 [list source [file join $dir cron.tcl]]
>
>
>
>
>
>
>
>
>
|
|
1
2
3
4
5
6
7
8
9
10
11
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

package ifneeded cron 2.0 [list source [file join $dir cron.tcl]]

Added modules/csv/2926387.csv.









>
>
>
>
1
2
3
4
a,b,c
d,"e,
e",f

Changes to modules/csv/csv.man.

239
240
241
242
243
244
245
246
247
d) (the empty string)
}]

instead. As can be seen only item (d) is different, now the empty string
instead of a ".

[vset CATEGORY csv]
[include ../common-text/feedback.inc]
[manpage_end]







|

239
240
241
242
243
244
245
246
247
d) (the empty string)
}]

instead. As can be seen only item (d) is different, now the empty string
instead of a ".

[vset CATEGORY csv]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/csv/csv.test.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# -*- tcl -*-
# Tests for the find function.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2001-2011 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# Tests for the find function.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2001-2011 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: csv.test,v 1.23 2011/11/23 02:22:10 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
    ::struct::matrix m
    catch {::csv::read2matrix dummy m foo} result
    m destroy
    set result
} {illegal separator character "foo", is a string}

test csv-5.1 {reading csv files} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f
    set result [list [q size] [q get 2]]
    q destroy
    set result
} {251 {{000 VERSIONS: 2:8.4a3 1:8.4a3 1:8.4a3%} {001 {CATCH return ok} 7 13 53.85}}}

test csv-5.2 {reading csv files} {
    set f [open [asset mem_debug_bench_a.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f
    set result [list [q size] [q get 2]]
    q destroy
    set result
} {251 {{000 VERSIONS: 2:8.4a3 1:8.4a3 1:8.4a3%} {001 {CATCH return ok} 7 13 53.85}}}

test csv-5.3 {reading csv files} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.4 {reading csv files} {
    set f [open [asset mem_debug_bench_a.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.5 {reading csv files} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set result [list]
    foreach c {0 1 2 3 4} {
	lappend result [m columnwidth $c]
    }
    m destroy
    set result
} {3 39 7 7 8}

test csv-5.6 {reading csv files, linking} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    m link a
    set result [array size a]
    m destroy
    set result
} {1255}


test csv-5.7 {reading csv files, empty expansion mode} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::matrix m
    ::csv::read2matrix $f m , empty
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.8 {reading csv files, auto expansion mode} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 1
    ::csv::read2matrix $f m , auto
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

# =========================================================================
# Bug 2926387

test csv-5.9.0 {reading csv files, inner field newline processing, bug 2926387} {
    set m [struct::matrix]
    set f [open [asset 2926387.csv] r]
    csv::read2matrix $f $m , auto
    close $f
    set result [$m serialize]
    $m destroy
    set result
} {2 3 {{a b c} {d {e,
e} f}}}

test csv-5.9.1 {reading csv files, inner field newline processing, bug 2926387} {
    set q [struct::queue]
    set f [open [asset 2926387.csv] r]
    csv::read2queue $f $q
    close $f
    set result [$q get [$q size]]
    $q destroy
    set result
} {{a b c} {d {e,
e} f}}

# =========================================================================

test csv-6.1 {writing csv files} {
    set f [open [asset eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set f [open [makeFile {} eval-out1.csv] w]
    ::csv::writematrix m $f







|









|









|










|










|














|












|









|














|










|











|







349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
    ::struct::matrix m
    catch {::csv::read2matrix dummy m foo} result
    m destroy
    set result
} {illegal separator character "foo", is a string}

test csv-5.1 {reading csv files} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f
    set result [list [q size] [q get 2]]
    q destroy
    set result
} {251 {{000 VERSIONS: 2:8.4a3 1:8.4a3 1:8.4a3%} {001 {CATCH return ok} 7 13 53.85}}}

test csv-5.2 {reading csv files} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench_a.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f
    set result [list [q size] [q get 2]]
    q destroy
    set result
} {251 {{000 VERSIONS: 2:8.4a3 1:8.4a3 1:8.4a3%} {001 {CATCH return ok} 7 13 53.85}}}

test csv-5.3 {reading csv files} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.4 {reading csv files} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench_a.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.5 {reading csv files} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set result [list]
    foreach c {0 1 2 3 4} {
	lappend result [m columnwidth $c]
    }
    m destroy
    set result
} {3 39 7 7 8}

test csv-5.6 {reading csv files, linking} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    m link a
    set result [array size a]
    m destroy
    set result
} {1255}


test csv-5.7 {reading csv files, empty expansion mode} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::matrix m
    ::csv::read2matrix $f m , empty
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.8 {reading csv files, auto expansion mode} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 1
    ::csv::read2matrix $f m , auto
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

# =========================================================================
# Bug 2926387

test csv-5.9.0 {reading csv files, inner field newline processing, bug 2926387} {
    set m [struct::matrix]
    set f [open [file join $::tcltest::testsDirectory 2926387.csv] r]
    csv::read2matrix $f $m , auto
    close $f
    set result [$m serialize]
    $m destroy
    set result
} {2 3 {{a b c} {d {e,
e} f}}}

test csv-5.9.1 {reading csv files, inner field newline processing, bug 2926387} {
    set q [struct::queue]
    set f [open [file join $::tcltest::testsDirectory 2926387.csv] r]
    csv::read2queue $f $q
    close $f
    set result [$q get [$q size]]
    $q destroy
    set result
} {{a b c} {d {e,
e} f}}

# =========================================================================

test csv-6.1 {writing csv files} {
    set f [open [localPath eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set f [open [makeFile {} eval-out1.csv] w]
    ::csv::writematrix m $f
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05}

test csv-6.2 {writing csv files} {
    set f [open [asset eval.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f

    set f [open [makeFile {} eval-out2.csv] w]
    ::csv::writequeue q $f
    close $f







|







489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05}

test csv-6.2 {writing csv files} {
    set f [open [localPath eval.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f

    set f [open [makeFile {} eval-out2.csv] w]
    ::csv::writequeue q $f
    close $f
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05}


test csv-7.1 {reporting} {
    set f [open [asset eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set result [m format 2string csv::report]
    m destroy
    set result
} {023,EVAL cmd eval in list obj var,26,45,57.78
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05
}

test csv-7.2 {reporting} {
    set f [open [asset eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set f [open [makeFile {} eval-out3.csv] w]
    m format 2chan csv::report $f







|

















|







511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05}


test csv-7.1 {reporting} {
    set f [open [localPath eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set result [m format 2string csv::report]
    m destroy
    set result
} {023,EVAL cmd eval in list obj var,26,45,57.78
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05
}

test csv-7.2 {reporting} {
    set f [open [localPath eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set f [open [makeFile {} eval-out3.csv] w]
    m format 2chan csv::report $f

Added modules/csv/eval.csv.













>
>
>
>
>
>
1
2
3
4
5
6
023,EVAL cmd eval in list obj var,26,45,57.78
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05

Added modules/csv/mem_debug_bench.csv.























































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
000,VERSIONS:,2:8.4a3,1:8.4a3,1:8.4a3%
001,CATCH return ok,7,13,53.85
002,CATCH return error,68,91,74.73
003,CATCH no catch used,7,14,50.00
004,IF if true numeric,12,33,36.36
005,IF elseif true numeric,15,47,31.91
006,IF else true numeric,15,46,32.61
007,IF if true num/num,13,32,40.62
008,IF if false num/num,13,32,40.62
009,IF if false al/num,28,57,49.12
010,IF if true al/num,34,54,62.96
011,IF if false al/num,34,58,58.62
012,IF if true al/al,33,100,33.00
013,IF elseif true al/al,50,87,57.47
014,IF else true al/al,50,92,54.35
015,SWITCH first true,50,81,61.73
016,SWITCH second true,55,84,65.48
017,SWITCH ninth true,56,96,58.33
018,SWITCH default true,48,81,59.26
019,DATA create in a list,5419,13514,40.10
020,DATA create in an array,5861,15537,37.72
021,DATA access in a list,4424,9967,44.39
022,DATA access in an array,4373,9167,47.70
023,EVAL cmd eval in list obj var,26,45,57.78
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05
029,EXPR unbraced,174,250,69.60
030,EXPR braced,27,60,45.00
031,EXPR inline,28,51,54.90
032,EXPR one operand,8,13,61.54
033,EXPR ten operands,15,25,60.00
034,EXPR fifty operands,46,73,63.01
035,EXPR incr with incr,13,20,65.00
036,EXPR incr with expr,8,14,57.14
037,KLIST shuffle0 llength 1,154,260,59.23
038,KLIST shuffle0 llength 10,521,950,54.84
039,KLIST shuffle0 llength 100,4126,7781,53.03
040,KLIST shuffle0 llength 1000,46309,85434,54.20
041,KLIST shuffle0 llength 10000,612676,1000055,61.26
042,KLIST shuffle1 llength 1,100,181,55.25
043,KLIST shuffle1 llength 10,432,835,51.74
044,KLIST shuffle1 llength 100,5872,14144,41.52
045,KLIST shuffle1 llength 1000,1293956,1235661,104.72
046,KLIST shuffle1a llength 1,115,200,57.50
047,KLIST shuffle1a llength 10,442,1012,43.68
048,KLIST shuffle1a llength 100,4212,9609,43.83
049,KLIST shuffle1a llength 1000,42350,98262,43.10
050,KLIST shuffle1a llength 10000,445084,1052460,42.29
051,KLIST shuffle2 llength 1,123,205,60.00
052,KLIST shuffle2 llength 10,484,922,52.49
053,KLIST shuffle2 llength 100,4377,8347,52.44
054,KLIST shuffle2 llength 1000,46002,89585,51.35
055,KLIST shuffle2 llength 10000,525442,926369,56.72
056,KLIST shuffle3 llength 1,116,196,59.18
057,KLIST shuffle3 llength 10,420,911,46.10
058,KLIST shuffle3 llength 100,3730,8465,44.06
059,KLIST shuffle3 llength 1000,39397,87416,45.07
060,KLIST shuffle3 llength 10000,949689,1391544,68.25
061,KLIST shuffle4 llength 1,116,204,56.86
062,KLIST shuffle4 llength 10,450,1000,45.00
063,KLIST shuffle4 llength 100,4067,9326,43.61
064,KLIST shuffle4 llength 1000,39142,92580,42.28
065,KLIST shuffle4 llength 10000,421581,944205,44.65
066,"STR/LIST length; obj shimmer",3268,6767,48.29
067,"LIST length; pure list",17,21,80.95
068,STR length of a LIST,12,25,48.00
069,"LIST exact search; first item",18,24,75.00
070,"LIST exact search; middle item",74,111,66.67
071,"LIST exact search; last item",142,236,60.17
072,"LIST exact search; non-item",344,603,57.05
073,"LIST sorted search; first item",19,29,65.52
074,"LIST sorted search; middle item",19,27,70.37
075,"LIST sorted search; last item",19,27,70.37
076,"LIST sorted search; non-item",19,27,70.37
077,"LIST exact search; untyped item",148,230,64.35
078,"LIST exact search; typed item",107,119,89.92
079,"LIST sorted search; typed item",18,29,62.07
080,LIST sort,3620,4994,72.49
081,LIST typed sort,2923,3885,75.24
082,LIST remove first element,310,763,40.63
083,LIST remove middle element,308,761,40.47
084,LIST remove last element,312,757,41.22
085,LIST replace first element,291,740,39.32
086,LIST replace middle element,295,741,39.81
087,LIST replace last element,295,743,39.70
088,LIST replace first el with multiple,315,770,40.91
089,LIST replace middle el with multiple,314,764,41.10
090,LIST replace last el with multiple,288,750,38.40
091,LIST replace range,288,737,39.08
092,LIST remove in mixed list,411,959,42.86
093,LIST replace in mixed list,398,932,42.70
094,LIST index first element,14,24,58.33
095,LIST index middle element,14,28,50.00
096,LIST index last element,14,28,50.00
097,LIST insert an item at start,297,750,39.60
098,LIST insert an item at middle,303,746,40.62
099,"LIST insert an item at ""end""",299,746,40.08
100,"LIST small; early range",26,41,63.41
101,"LIST small; late range",23,33,69.70
102,"LIST large; early range",42,94,44.68
103,"LIST large; late range",41,106,38.68
104,LIST append to list,406,426,95.31
105,LIST join list,1147,1687,67.99
106,"LOOP for; iterate list",6848,16393,41.77
107,"LOOP foreach; iterate list",2169,5913,36.68
108,LOOP for (to 1000),2756,8183,33.68
109,LOOP while (to 1000),2753,8181,33.65
110,"LOOP for; iterate string",8350,15966,52.30
111,"LOOP foreach; iterate string",2684,7094,37.83
112,MAP string 1 val,686,1097,62.53
113,MAP string 2 val,1578,2375,66.44
114,MAP string 3 val,1938,2674,72.48
115,MAP string 4 val,2427,3324,73.01
116,MAP string 1 val -nocase,3772,5524,68.28
117,MAP string 2 val -nocase,6633,9624,68.92
118,MAP string 3 val -nocase,8809,12682,69.46
119,MAP string 4 val -nocase,10692,15353,69.64
120,MAP regsub 1 val,3884,4345,89.39
121,MAP regsub 2 val,16420,17435,94.18
122,MAP regsub 3 val,22056,23287,94.71
123,MAP regsub 4 val,27550,29333,93.92
124,MAP regsub 1 val -nocase,4004,4322,92.64
125,MAP regsub 2 val -nocase,16519,17289,95.55
126,MAP regsub 3 val -nocase,22075,23427,94.23
127,MAP regsub 4 val -nocase,27981,29438,95.05
128,"MAP string; no match",1011,1734,58.30
129,"MAP string -nocase; no match",7090,10589,66.96
130,"MAP regsub; no match",1226,2328,52.66
131,"MAP regsub -nocase; no match",1287,2295,56.08
132,MAP string short,44,58,75.86
133,MAP regsub short,188,219,85.84
134,MTHD direct ns proc call,8,15,53.33
135,MTHD imported ns proc call,8,16,50.00
136,MTHD interp alias proc call,25,44,56.82
137,MTHD indirect proc eval,36,58,62.07
138,MTHD indirect proc eval #2,58,100,58.00
139,MTHD array stored proc call,11,25,44.00
140,MTHD switch method call,53,86,61.63
141,MTHD ns lookup call,113,189,59.79
142,MTHD inline call,3,9,33.33
143,PROC explicit return,7,12,58.33
144,PROC implicit return,7,17,41.18
145,PROC explicit return (2),7,13,53.85
146,PROC implicit return (2),7,15,46.67
147,PROC explicit return (3),7,12,58.33
148,PROC implicit return (3),7,12,58.33
149,PROC heavily commented,7,12,58.33
150,"PROC do-nothing; no args",6,11,54.55
151,"PROC do-nothing; one arg",7,12,58.33
152,PROC local links with global,1611,2827,56.99
153,PROC local links with upvar,1308,2630,49.73
154,PROC local links with variable,1309,2358,55.51
155,"READ 595K; gets",386913,551429,70.17
156,"READ 595K; read",85889,164758,52.13
157,"READ 595K; read & size",86171,164854,52.27
158,"READ 3050b; gets",2152,3481,61.82
159,"READ 3050b; read",561,682,82.26
160,"READ 3050b; read & size",606,738,82.11
161,"BREAD 595K; gets",392519,568992,68.98
162,"BREAD 595K; read",51133,110961,46.08
163,"BREAD 595K; read & size",51194,110552,46.31
164,"BREAD 3050b; gets",2213,3174,69.72
165,"BREAD 3050b; read",329,472,69.70
166,"BREAD 3050b; read & size",377,517,72.92
167,REGEXP literal regexp,48,58,82.76
168,REGEXP var-based regexp,51,60,85.00
169,REGEXP count all matches,149,161,92.55
170,REGEXP extract all matches,201,255,78.82
171,STARTUP time to launch tclsh,26402,32329,81.67
172,STR str [string compare],15,38,39.47
173,STR str [string equal],15,38,39.47
174,"STR str $a equal """"",13,32,40.62
175,"STR str num == """"",15,38,39.47
176,STR str $a eq $b,21,49,42.86
177,STR str $a ne $b,21,49,42.86
178,STR str $a eq $b (same obj),19,45,42.22
179,STR str $a ne $b (same obj),19,46,41.30
180,STR length (==4010),13,23,56.52
181,STR index 0,19,30,63.33
182,STR index 100,20,31,64.52
183,STR index 500,19,30,63.33
184,STR index2 0,20,32,62.50
185,STR index2 100,21,30,70.00
186,STR index2 500,20,31,64.52
187,STR first (success),17,23,73.91
188,STR first (failure),115,116,99.14
189,STR first (total failure),106,103,102.91
190,STR last (success),17,23,73.91
191,STR last (failure),91,109,83.49
192,STR last (total failure),82,86,95.35
193,"STR match; simple (success early)",17,31,54.84
194,"STR match; simple (success late)",18,30,60.00
195,"STR match; simple (failure)",18,28,64.29
196,"STR match; simple (total failure)",16,29,55.17
197,"STR match; complex (success early)",18,34,52.94
198,"STR match; complex (success late)",152,165,92.12
199,"STR match; complex (failure)",121,134,90.30
200,"STR match; complex (total failure)",95,101,94.06
201,"STR range; index 100..200 of 4010",26,40,65.00
202,"STR replace; no replacement",87,126,69.05
203,"STR replace; equal replacement",93,133,69.92
204,"STR replace; longer replacement",103,146,70.55
205,"STR repeat; abcdefghij * 10",16,23,69.57
206,"STR repeat; abcdefghij * 100",48,47,102.13
207,"STR repeat; abcdefghij * 1000",231,257,89.88
208,"STR repeat; 4010 chars * 10",282,744,37.90
209,"STR repeat; 4010 chars * 100",6976,14673,47.54
210,"STR reverse iter1; 100 chars",1534,2295,66.84
211,"STR reverse iter1; 100 uchars",1457,2322,62.75
212,"STR reverse iter2; 100 chars",1123,2042,55.00
213,"STR reverse iter2; 100 uchars",1042,1972,52.84
214,"STR reverse recur1; 100 chars",3458,7067,48.93
215,"STR reverse recur1; 100 uchars",3523,6650,52.98
216,"STR split; 4010 chars",2806,4605,60.93
217,"STR split; 12100 uchars",7890,13813,57.12
218,"STR split iter; 4010 chars",11129,28087,39.62
219,"STR split iter; 12100 uchars",33318,86314,38.60
220,STR append,99,160,61.88
221,STR append (1KB + 1KB),95,134,70.90
222,STR append (10KB + 1KB),209,537,38.92
223,STR append (1MB + 2b * 1000),38681,190529,20.30
224,STR append (1MB + 1KB),28344,173073,16.38
225,STR append (1MB + 1KB * 20),29077,173622,16.75
226,STR append (1MB + 1KB * 1000),66893,207868,32.18
227,STR append (1MB + 1MB * 3),125505,327765,38.29
228,STR append (1MB + 1MB * 5),158507,855295,18.53
229,STR append (1MB + (1b + 1K + 1b) * 100),33101,174031,19.02
230,STR info locals match,946,1521,62.20
231,TRACE no trace set,34,121,28.10
232,TRACE read,34,50,68.00
233,TRACE write,33,50,66.00
234,TRACE unset,33,48,68.75
235,TRACE all set (rwu),34,52,65.38
236,UNSET var exists,12,19,63.16
237,UNSET catch var exists,13,23,56.52
238,UNSET catch var !exist,77,105,73.33
239,UNSET info check var exists,16,27,59.26
240,UNSET info check var !exist,12,27,44.44
241,UNSET nocomplain var exists,12,18,66.67
242,UNSET nocomplain var !exist,12,16,75.00
243,VAR access locally set,10,19,52.63
244,VAR access local proc arg,10,20,50.00
245,VAR access global,35,49,71.43
246,VAR access upvar,40,54,74.07
247,VAR set scalar,7,15,46.67
248,VAR set array element,14,28,50.00
249,VAR 100 'set's in array,161,272,59.19
250,VAR 'array set' of 100 elems,306,467,65.52

Added modules/csv/mem_debug_bench_a.csv.

































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
000,VERSIONS:,2:8.4a3,1:8.4a3,1:8.4a3%
001,CATCH return ok,7,13,53.85
002,CATCH return error,68,91,74.73
003,CATCH no catch used,7,14,50.00
004,IF if true numeric,12,33,36.36
005,IF elseif true numeric,15,47,31.91

006,IF else true numeric,15,46,32.61
007,IF if true num/num,13,32,40.62
008,IF if false num/num,13,32,40.62
009,IF if false al/num,28,57,49.12
010,IF if true al/num,34,54,62.96
011,IF if false al/num,34,58,58.62
012,IF if true al/al,33,100,33.00
013,IF elseif true al/al,50,87,57.47
014,IF else true al/al,50,92,54.35
015,SWITCH first true,50,81,61.73
016,SWITCH second true,55,84,65.48
017,SWITCH ninth true,56,96,58.33
018,SWITCH default true,48,81,59.26
019,DATA create in a list,5419,13514,40.10
020,DATA create in an array,5861,15537,37.72
021,DATA access in a list,4424,9967,44.39

022,DATA access in an array,4373,9167,47.70
023,EVAL cmd eval in list obj var,26,45,57.78
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05
029,EXPR unbraced,174,250,69.60
030,EXPR braced,27,60,45.00
031,EXPR inline,28,51,54.90
032,EXPR one operand,8,13,61.54
033,EXPR ten operands,15,25,60.00


034,EXPR fifty operands,46,73,63.01
035,EXPR incr with incr,13,20,65.00
036,EXPR incr with expr,8,14,57.14
037,KLIST shuffle0 llength 1,154,260,59.23
038,KLIST shuffle0 llength 10,521,950,54.84
039,KLIST shuffle0 llength 100,4126,7781,53.03
040,KLIST shuffle0 llength 1000,46309,85434,54.20
041,KLIST shuffle0 llength 10000,612676,1000055,61.26
042,KLIST shuffle1 llength 1,100,181,55.25
043,KLIST shuffle1 llength 10,432,835,51.74
044,KLIST shuffle1 llength 100,5872,14144,41.52
045,KLIST shuffle1 llength 1000,1293956,1235661,104.72
046,KLIST shuffle1a llength 1,115,200,57.50
047,KLIST shuffle1a llength 10,442,1012,43.68
048,KLIST shuffle1a llength 100,4212,9609,43.83
049,KLIST shuffle1a llength 1000,42350,98262,43.10
050,KLIST shuffle1a llength 10000,445084,1052460,42.29
051,KLIST shuffle2 llength 1,123,205,60.00
052,KLIST shuffle2 llength 10,484,922,52.49

053,KLIST shuffle2 llength 100,4377,8347,52.44
054,KLIST shuffle2 llength 1000,46002,89585,51.35
055,KLIST shuffle2 llength 10000,525442,926369,56.72
056,KLIST shuffle3 llength 1,116,196,59.18
057,KLIST shuffle3 llength 10,420,911,46.10
058,KLIST shuffle3 llength 100,3730,8465,44.06
059,KLIST shuffle3 llength 1000,39397,87416,45.07
060,KLIST shuffle3 llength 10000,949689,1391544,68.25
061,KLIST shuffle4 llength 1,116,204,56.86
062,KLIST shuffle4 llength 10,450,1000,45.00
063,KLIST shuffle4 llength 100,4067,9326,43.61
064,KLIST shuffle4 llength 1000,39142,92580,42.28
065,KLIST shuffle4 llength 10000,421581,944205,44.65
066,"STR/LIST length; obj shimmer",3268,6767,48.29
067,"LIST length; pure list",17,21,80.95
068,STR length of a LIST,12,25,48.00
069,"LIST exact search; first item",18,24,75.00
070,"LIST exact search; middle item",74,111,66.67
071,"LIST exact search; last item",142,236,60.17
072,"LIST exact search; non-item",344,603,57.05
073,"LIST sorted search; first item",19,29,65.52
074,"LIST sorted search; middle item",19,27,70.37
075,"LIST sorted search; last item",19,27,70.37
076,"LIST sorted search; non-item",19,27,70.37
077,"LIST exact search; untyped item",148,230,64.35
078,"LIST exact search; typed item",107,119,89.92
079,"LIST sorted search; typed item",18,29,62.07
080,LIST sort,3620,4994,72.49
081,LIST typed sort,2923,3885,75.24
082,LIST remove first element,310,763,40.63
083,LIST remove middle element,308,761,40.47
084,LIST remove last element,312,757,41.22
085,LIST replace first element,291,740,39.32
086,LIST replace middle element,295,741,39.81
087,LIST replace last element,295,743,39.70
088,LIST replace first el with multiple,315,770,40.91
089,LIST replace middle el with multiple,314,764,41.10
090,LIST replace last el with multiple,288,750,38.40
091,LIST replace range,288,737,39.08
092,LIST remove in mixed list,411,959,42.86
093,LIST replace in mixed list,398,932,42.70
094,LIST index first element,14,24,58.33
095,LIST index middle element,14,28,50.00
096,LIST index last element,14,28,50.00
097,LIST insert an item at start,297,750,39.60
098,LIST insert an item at middle,303,746,40.62
099,"LIST insert an item at ""end""",299,746,40.08
100,"LIST small; early range",26,41,63.41
101,"LIST small; late range",23,33,69.70
102,"LIST large; early range",42,94,44.68
103,"LIST large; late range",41,106,38.68
104,LIST append to list,406,426,95.31
105,LIST join list,1147,1687,67.99
106,"LOOP for; iterate list",6848,16393,41.77
107,"LOOP foreach; iterate list",2169,5913,36.68
108,LOOP for (to 1000),2756,8183,33.68
109,LOOP while (to 1000),2753,8181,33.65
110,"LOOP for; iterate string",8350,15966,52.30
111,"LOOP foreach; iterate string",2684,7094,37.83
112,MAP string 1 val,686,1097,62.53
113,MAP string 2 val,1578,2375,66.44
114,MAP string 3 val,1938,2674,72.48
115,MAP string 4 val,2427,3324,73.01
116,MAP string 1 val -nocase,3772,5524,68.28
117,MAP string 2 val -nocase,6633,9624,68.92
118,MAP string 3 val -nocase,8809,12682,69.46
119,MAP string 4 val -nocase,10692,15353,69.64
120,MAP regsub 1 val,3884,4345,89.39
121,MAP regsub 2 val,16420,17435,94.18
122,MAP regsub 3 val,22056,23287,94.71
123,MAP regsub 4 val,27550,29333,93.92
124,MAP regsub 1 val -nocase,4004,4322,92.64
125,MAP regsub 2 val -nocase,16519,17289,95.55
126,MAP regsub 3 val -nocase,22075,23427,94.23
127,MAP regsub 4 val -nocase,27981,29438,95.05
128,"MAP string; no match",1011,1734,58.30
129,"MAP string -nocase; no match",7090,10589,66.96
130,"MAP regsub; no match",1226,2328,52.66
131,"MAP regsub -nocase; no match",1287,2295,56.08
132,MAP string short,44,58,75.86
133,MAP regsub short,188,219,85.84
134,MTHD direct ns proc call,8,15,53.33
135,MTHD imported ns proc call,8,16,50.00
136,MTHD interp alias proc call,25,44,56.82
137,MTHD indirect proc eval,36,58,62.07
138,MTHD indirect proc eval #2,58,100,58.00
139,MTHD array stored proc call,11,25,44.00
140,MTHD switch method call,53,86,61.63
141,MTHD ns lookup call,113,189,59.79
142,MTHD inline call,3,9,33.33
143,PROC explicit return,7,12,58.33
144,PROC implicit return,7,17,41.18
145,PROC explicit return (2),7,13,53.85
146,PROC implicit return (2),7,15,46.67
147,PROC explicit return (3),7,12,58.33
148,PROC implicit return (3),7,12,58.33
149,PROC heavily commented,7,12,58.33
150,"PROC do-nothing; no args",6,11,54.55
151,"PROC do-nothing; one arg",7,12,58.33
152,PROC local links with global,1611,2827,56.99
153,PROC local links with upvar,1308,2630,49.73
154,PROC local links with variable,1309,2358,55.51
155,"READ 595K; gets",386913,551429,70.17
156,"READ 595K; read",85889,164758,52.13
157,"READ 595K; read & size",86171,164854,52.27
158,"READ 3050b; gets",2152,3481,61.82
159,"READ 3050b; read",561,682,82.26
160,"READ 3050b; read & size",606,738,82.11
161,"BREAD 595K; gets",392519,568992,68.98
162,"BREAD 595K; read",51133,110961,46.08
163,"BREAD 595K; read & size",51194,110552,46.31
164,"BREAD 3050b; gets",2213,3174,69.72
165,"BREAD 3050b; read",329,472,69.70
166,"BREAD 3050b; read & size",377,517,72.92
167,REGEXP literal regexp,48,58,82.76
168,REGEXP var-based regexp,51,60,85.00
169,REGEXP count all matches,149,161,92.55
170,REGEXP extract all matches,201,255,78.82
171,STARTUP time to launch tclsh,26402,32329,81.67
172,STR str [string compare],15,38,39.47
173,STR str [string equal],15,38,39.47
174,"STR str $a equal """"",13,32,40.62
175,"STR str num == """"",15,38,39.47
176,STR str $a eq $b,21,49,42.86
177,STR str $a ne $b,21,49,42.86
178,STR str $a eq $b (same obj),19,45,42.22
179,STR str $a ne $b (same obj),19,46,41.30
180,STR length (==4010),13,23,56.52
181,STR index 0,19,30,63.33
182,STR index 100,20,31,64.52
183,STR index 500,19,30,63.33
184,STR index2 0,20,32,62.50
185,STR index2 100,21,30,70.00
186,STR index2 500,20,31,64.52
187,STR first (success),17,23,73.91
188,STR first (failure),115,116,99.14
189,STR first (total failure),106,103,102.91
190,STR last (success),17,23,73.91
191,STR last (failure),91,109,83.49
192,STR last (total failure),82,86,95.35
193,"STR match; simple (success early)",17,31,54.84
194,"STR match; simple (success late)",18,30,60.00
195,"STR match; simple (failure)",18,28,64.29
196,"STR match; simple (total failure)",16,29,55.17
197,"STR match; complex (success early)",18,34,52.94
198,"STR match; complex (success late)",152,165,92.12
199,"STR match; complex (failure)",121,134,90.30
200,"STR match; complex (total failure)",95,101,94.06
201,"STR range; index 100..200 of 4010",26,40,65.00
202,"STR replace; no replacement",87,126,69.05
203,"STR replace; equal replacement",93,133,69.92
204,"STR replace; longer replacement",103,146,70.55
205,"STR repeat; abcdefghij * 10",16,23,69.57
206,"STR repeat; abcdefghij * 100",48,47,102.13
207,"STR repeat; abcdefghij * 1000",231,257,89.88
208,"STR repeat; 4010 chars * 10",282,744,37.90
209,"STR repeat; 4010 chars * 100",6976,14673,47.54
210,"STR reverse iter1; 100 chars",1534,2295,66.84
211,"STR reverse iter1; 100 uchars",1457,2322,62.75
212,"STR reverse iter2; 100 chars",1123,2042,55.00
213,"STR reverse iter2; 100 uchars",1042,1972,52.84
214,"STR reverse recur1; 100 chars",3458,7067,48.93
215,"STR reverse recur1; 100 uchars",3523,6650,52.98
216,"STR split; 4010 chars",2806,4605,60.93
217,"STR split; 12100 uchars",7890,13813,57.12
218,"STR split iter; 4010 chars",11129,28087,39.62
219,"STR split iter; 12100 uchars",33318,86314,38.60
220,STR append,99,160,61.88
221,STR append (1KB + 1KB),95,134,70.90
222,STR append (10KB + 1KB),209,537,38.92
223,STR append (1MB + 2b * 1000),38681,190529,20.30
224,STR append (1MB + 1KB),28344,173073,16.38
225,STR append (1MB + 1KB * 20),29077,173622,16.75
226,STR append (1MB + 1KB * 1000),66893,207868,32.18
227,STR append (1MB + 1MB * 3),125505,327765,38.29
228,STR append (1MB + 1MB * 5),158507,855295,18.53
229,STR append (1MB + (1b + 1K + 1b) * 100),33101,174031,19.02
230,STR info locals match,946,1521,62.20
231,TRACE no trace set,34,121,28.10
232,TRACE read,34,50,68.00
233,TRACE write,33,50,66.00
234,TRACE unset,33,48,68.75
235,TRACE all set (rwu),34,52,65.38
236,UNSET var exists,12,19,63.16
237,UNSET catch var exists,13,23,56.52
238,UNSET catch var !exist,77,105,73.33
239,UNSET info check var exists,16,27,59.26
240,UNSET info check var !exist,12,27,44.44
241,UNSET nocomplain var exists,12,18,66.67
242,UNSET nocomplain var !exist,12,16,75.00
243,VAR access locally set,10,19,52.63
244,VAR access local proc arg,10,20,50.00
245,VAR access global,35,49,71.43
246,VAR access upvar,40,54,74.07
247,VAR set scalar,7,15,46.67
248,VAR set array element,14,28,50.00
249,VAR 100 'set's in array,161,272,59.19
250,VAR 'array set' of 100 elems,306,467,65.52

Deleted modules/csv/test-assets/2926387.csv.

1
2
3
4
a,b,c
d,"e,
e",f

<
<
<
<








Deleted modules/csv/test-assets/eval.csv.

1
2
3
4
5
6
023,EVAL cmd eval in list obj var,26,45,57.78
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05
<
<
<
<
<
<












Deleted modules/csv/test-assets/mem_debug_bench.csv.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
000,VERSIONS:,2:8.4a3,1:8.4a3,1:8.4a3%
001,CATCH return ok,7,13,53.85
002,CATCH return error,68,91,74.73
003,CATCH no catch used,7,14,50.00
004,IF if true numeric,12,33,36.36
005,IF elseif true numeric,15,47,31.91
006,IF else true numeric,15,46,32.61
007,IF if true num/num,13,32,40.62
008,IF if false num/num,13,32,40.62
009,IF if false al/num,28,57,49.12
010,IF if true al/num,34,54,62.96
011,IF if false al/num,34,58,58.62
012,IF if true al/al,33,100,33.00
013,IF elseif true al/al,50,87,57.47
014,IF else true al/al,50,92,54.35
015,SWITCH first true,50,81,61.73
016,SWITCH second true,55,84,65.48
017,SWITCH ninth true,56,96,58.33
018,SWITCH default true,48,81,59.26
019,DATA create in a list,5419,13514,40.10
020,DATA create in an array,5861,15537,37.72
021,DATA access in a list,4424,9967,44.39
022,DATA access in an array,4373,9167,47.70
023,EVAL cmd eval in list obj var,26,45,57.78
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05
029,EXPR unbraced,174,250,69.60
030,EXPR braced,27,60,45.00
031,EXPR inline,28,51,54.90
032,EXPR one operand,8,13,61.54
033,EXPR ten operands,15,25,60.00
034,EXPR fifty operands,46,73,63.01
035,EXPR incr with incr,13,20,65.00
036,EXPR incr with expr,8,14,57.14
037,KLIST shuffle0 llength 1,154,260,59.23
038,KLIST shuffle0 llength 10,521,950,54.84
039,KLIST shuffle0 llength 100,4126,7781,53.03
040,KLIST shuffle0 llength 1000,46309,85434,54.20
041,KLIST shuffle0 llength 10000,612676,1000055,61.26
042,KLIST shuffle1 llength 1,100,181,55.25
043,KLIST shuffle1 llength 10,432,835,51.74
044,KLIST shuffle1 llength 100,5872,14144,41.52
045,KLIST shuffle1 llength 1000,1293956,1235661,104.72
046,KLIST shuffle1a llength 1,115,200,57.50
047,KLIST shuffle1a llength 10,442,1012,43.68
048,KLIST shuffle1a llength 100,4212,9609,43.83
049,KLIST shuffle1a llength 1000,42350,98262,43.10
050,KLIST shuffle1a llength 10000,445084,1052460,42.29
051,KLIST shuffle2 llength 1,123,205,60.00
052,KLIST shuffle2 llength 10,484,922,52.49
053,KLIST shuffle2 llength 100,4377,8347,52.44
054,KLIST shuffle2 llength 1000,46002,89585,51.35
055,KLIST shuffle2 llength 10000,525442,926369,56.72
056,KLIST shuffle3 llength 1,116,196,59.18
057,KLIST shuffle3 llength 10,420,911,46.10
058,KLIST shuffle3 llength 100,3730,8465,44.06
059,KLIST shuffle3 llength 1000,39397,87416,45.07
060,KLIST shuffle3 llength 10000,949689,1391544,68.25
061,KLIST shuffle4 llength 1,116,204,56.86
062,KLIST shuffle4 llength 10,450,1000,45.00
063,KLIST shuffle4 llength 100,4067,9326,43.61
064,KLIST shuffle4 llength 1000,39142,92580,42.28
065,KLIST shuffle4 llength 10000,421581,944205,44.65
066,"STR/LIST length; obj shimmer",3268,6767,48.29
067,"LIST length; pure list",17,21,80.95
068,STR length of a LIST,12,25,48.00
069,"LIST exact search; first item",18,24,75.00
070,"LIST exact search; middle item",74,111,66.67
071,"LIST exact search; last item",142,236,60.17
072,"LIST exact search; non-item",344,603,57.05
073,"LIST sorted search; first item",19,29,65.52
074,"LIST sorted search; middle item",19,27,70.37
075,"LIST sorted search; last item",19,27,70.37
076,"LIST sorted search; non-item",19,27,70.37
077,"LIST exact search; untyped item",148,230,64.35
078,"LIST exact search; typed item",107,119,89.92
079,"LIST sorted search; typed item",18,29,62.07
080,LIST sort,3620,4994,72.49
081,LIST typed sort,2923,3885,75.24
082,LIST remove first element,310,763,40.63
083,LIST remove middle element,308,761,40.47
084,LIST remove last element,312,757,41.22
085,LIST replace first element,291,740,39.32
086,LIST replace middle element,295,741,39.81
087,LIST replace last element,295,743,39.70
088,LIST replace first el with multiple,315,770,40.91
089,LIST replace middle el with multiple,314,764,41.10
090,LIST replace last el with multiple,288,750,38.40
091,LIST replace range,288,737,39.08
092,LIST remove in mixed list,411,959,42.86
093,LIST replace in mixed list,398,932,42.70
094,LIST index first element,14,24,58.33
095,LIST index middle element,14,28,50.00
096,LIST index last element,14,28,50.00
097,LIST insert an item at start,297,750,39.60
098,LIST insert an item at middle,303,746,40.62
099,"LIST insert an item at ""end""",299,746,40.08
100,"LIST small; early range",26,41,63.41
101,"LIST small; late range",23,33,69.70
102,"LIST large; early range",42,94,44.68
103,"LIST large; late range",41,106,38.68
104,LIST append to list,406,426,95.31
105,LIST join list,1147,1687,67.99
106,"LOOP for; iterate list",6848,16393,41.77
107,"LOOP foreach; iterate list",2169,5913,36.68
108,LOOP for (to 1000),2756,8183,33.68
109,LOOP while (to 1000),2753,8181,33.65
110,"LOOP for; iterate string",8350,15966,52.30
111,"LOOP foreach; iterate string",2684,7094,37.83
112,MAP string 1 val,686,1097,62.53
113,MAP string 2 val,1578,2375,66.44
114,MAP string 3 val,1938,2674,72.48
115,MAP string 4 val,2427,3324,73.01
116,MAP string 1 val -nocase,3772,5524,68.28
117,MAP string 2 val -nocase,6633,9624,68.92
118,MAP string 3 val -nocase,8809,12682,69.46
119,MAP string 4 val -nocase,10692,15353,69.64
120,MAP regsub 1 val,3884,4345,89.39
121,MAP regsub 2 val,16420,17435,94.18
122,MAP regsub 3 val,22056,23287,94.71
123,MAP regsub 4 val,27550,29333,93.92
124,MAP regsub 1 val -nocase,4004,4322,92.64
125,MAP regsub 2 val -nocase,16519,17289,95.55
126,MAP regsub 3 val -nocase,22075,23427,94.23
127,MAP regsub 4 val -nocase,27981,29438,95.05
128,"MAP string; no match",1011,1734,58.30
129,"MAP string -nocase; no match",7090,10589,66.96
130,"MAP regsub; no match",1226,2328,52.66
131,"MAP regsub -nocase; no match",1287,2295,56.08
132,MAP string short,44,58,75.86
133,MAP regsub short,188,219,85.84
134,MTHD direct ns proc call,8,15,53.33
135,MTHD imported ns proc call,8,16,50.00
136,MTHD interp alias proc call,25,44,56.82
137,MTHD indirect proc eval,36,58,62.07
138,MTHD indirect proc eval #2,58,100,58.00
139,MTHD array stored proc call,11,25,44.00
140,MTHD switch method call,53,86,61.63
141,MTHD ns lookup call,113,189,59.79
142,MTHD inline call,3,9,33.33
143,PROC explicit return,7,12,58.33
144,PROC implicit return,7,17,41.18
145,PROC explicit return (2),7,13,53.85
146,PROC implicit return (2),7,15,46.67
147,PROC explicit return (3),7,12,58.33
148,PROC implicit return (3),7,12,58.33
149,PROC heavily commented,7,12,58.33
150,"PROC do-nothing; no args",6,11,54.55
151,"PROC do-nothing; one arg",7,12,58.33
152,PROC local links with global,1611,2827,56.99
153,PROC local links with upvar,1308,2630,49.73
154,PROC local links with variable,1309,2358,55.51
155,"READ 595K; gets",386913,551429,70.17
156,"READ 595K; read",85889,164758,52.13
157,"READ 595K; read & size",86171,164854,52.27
158,"READ 3050b; gets",2152,3481,61.82
159,"READ 3050b; read",561,682,82.26
160,"READ 3050b; read & size",606,738,82.11
161,"BREAD 595K; gets",392519,568992,68.98
162,"BREAD 595K; read",51133,110961,46.08
163,"BREAD 595K; read & size",51194,110552,46.31
164,"BREAD 3050b; gets",2213,3174,69.72
165,"BREAD 3050b; read",329,472,69.70
166,"BREAD 3050b; read & size",377,517,72.92
167,REGEXP literal regexp,48,58,82.76
168,REGEXP var-based regexp,51,60,85.00
169,REGEXP count all matches,149,161,92.55
170,REGEXP extract all matches,201,255,78.82
171,STARTUP time to launch tclsh,26402,32329,81.67
172,STR str [string compare],15,38,39.47
173,STR str [string equal],15,38,39.47
174,"STR str $a equal """"",13,32,40.62
175,"STR str num == """"",15,38,39.47
176,STR str $a eq $b,21,49,42.86
177,STR str $a ne $b,21,49,42.86
178,STR str $a eq $b (same obj),19,45,42.22
179,STR str $a ne $b (same obj),19,46,41.30
180,STR length (==4010),13,23,56.52
181,STR index 0,19,30,63.33
182,STR index 100,20,31,64.52
183,STR index 500,19,30,63.33
184,STR index2 0,20,32,62.50
185,STR index2 100,21,30,70.00
186,STR index2 500,20,31,64.52
187,STR first (success),17,23,73.91
188,STR first (failure),115,116,99.14
189,STR first (total failure),106,103,102.91
190,STR last (success),17,23,73.91
191,STR last (failure),91,109,83.49
192,STR last (total failure),82,86,95.35
193,"STR match; simple (success early)",17,31,54.84
194,"STR match; simple (success late)",18,30,60.00
195,"STR match; simple (failure)",18,28,64.29
196,"STR match; simple (total failure)",16,29,55.17
197,"STR match; complex (success early)",18,34,52.94
198,"STR match; complex (success late)",152,165,92.12
199,"STR match; complex (failure)",121,134,90.30
200,"STR match; complex (total failure)",95,101,94.06
201,"STR range; index 100..200 of 4010",26,40,65.00
202,"STR replace; no replacement",87,126,69.05
203,"STR replace; equal replacement",93,133,69.92
204,"STR replace; longer replacement",103,146,70.55
205,"STR repeat; abcdefghij * 10",16,23,69.57
206,"STR repeat; abcdefghij * 100",48,47,102.13
207,"STR repeat; abcdefghij * 1000",231,257,89.88
208,"STR repeat; 4010 chars * 10",282,744,37.90
209,"STR repeat; 4010 chars * 100",6976,14673,47.54
210,"STR reverse iter1; 100 chars",1534,2295,66.84
211,"STR reverse iter1; 100 uchars",1457,2322,62.75
212,"STR reverse iter2; 100 chars",1123,2042,55.00
213,"STR reverse iter2; 100 uchars",1042,1972,52.84
214,"STR reverse recur1; 100 chars",3458,7067,48.93
215,"STR reverse recur1; 100 uchars",3523,6650,52.98
216,"STR split; 4010 chars",2806,4605,60.93
217,"STR split; 12100 uchars",7890,13813,57.12
218,"STR split iter; 4010 chars",11129,28087,39.62
219,"STR split iter; 12100 uchars",33318,86314,38.60
220,STR append,99,160,61.88
221,STR append (1KB + 1KB),95,134,70.90
222,STR append (10KB + 1KB),209,537,38.92
223,STR append (1MB + 2b * 1000),38681,190529,20.30
224,STR append (1MB + 1KB),28344,173073,16.38
225,STR append (1MB + 1KB * 20),29077,173622,16.75
226,STR append (1MB + 1KB * 1000),66893,207868,32.18
227,STR append (1MB + 1MB * 3),125505,327765,38.29
228,STR append (1MB + 1MB * 5),158507,855295,18.53
229,STR append (1MB + (1b + 1K + 1b) * 100),33101,174031,19.02
230,STR info locals match,946,1521,62.20
231,TRACE no trace set,34,121,28.10
232,TRACE read,34,50,68.00
233,TRACE write,33,50,66.00
234,TRACE unset,33,48,68.75
235,TRACE all set (rwu),34,52,65.38
236,UNSET var exists,12,19,63.16
237,UNSET catch var exists,13,23,56.52
238,UNSET catch var !exist,77,105,73.33
239,UNSET info check var exists,16,27,59.26
240,UNSET info check var !exist,12,27,44.44
241,UNSET nocomplain var exists,12,18,66.67
242,UNSET nocomplain var !exist,12,16,75.00
243,VAR access locally set,10,19,52.63
244,VAR access local proc arg,10,20,50.00
245,VAR access global,35,49,71.43
246,VAR access upvar,40,54,74.07
247,VAR set scalar,7,15,46.67
248,VAR set array element,14,28,50.00
249,VAR 100 'set's in array,161,272,59.19
250,VAR 'array set' of 100 elems,306,467,65.52
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































Deleted modules/csv/test-assets/mem_debug_bench_a.csv.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
000,VERSIONS:,2:8.4a3,1:8.4a3,1:8.4a3%
001,CATCH return ok,7,13,53.85
002,CATCH return error,68,91,74.73
003,CATCH no catch used,7,14,50.00
004,IF if true numeric,12,33,36.36
005,IF elseif true numeric,15,47,31.91

006,IF else true numeric,15,46,32.61
007,IF if true num/num,13,32,40.62
008,IF if false num/num,13,32,40.62
009,IF if false al/num,28,57,49.12
010,IF if true al/num,34,54,62.96
011,IF if false al/num,34,58,58.62
012,IF if true al/al,33,100,33.00
013,IF elseif true al/al,50,87,57.47
014,IF else true al/al,50,92,54.35
015,SWITCH first true,50,81,61.73
016,SWITCH second true,55,84,65.48
017,SWITCH ninth true,56,96,58.33
018,SWITCH default true,48,81,59.26
019,DATA create in a list,5419,13514,40.10
020,DATA create in an array,5861,15537,37.72
021,DATA access in a list,4424,9967,44.39

022,DATA access in an array,4373,9167,47.70
023,EVAL cmd eval in list obj var,26,45,57.78
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05
029,EXPR unbraced,174,250,69.60
030,EXPR braced,27,60,45.00
031,EXPR inline,28,51,54.90
032,EXPR one operand,8,13,61.54
033,EXPR ten operands,15,25,60.00


034,EXPR fifty operands,46,73,63.01
035,EXPR incr with incr,13,20,65.00
036,EXPR incr with expr,8,14,57.14
037,KLIST shuffle0 llength 1,154,260,59.23
038,KLIST shuffle0 llength 10,521,950,54.84
039,KLIST shuffle0 llength 100,4126,7781,53.03
040,KLIST shuffle0 llength 1000,46309,85434,54.20
041,KLIST shuffle0 llength 10000,612676,1000055,61.26
042,KLIST shuffle1 llength 1,100,181,55.25
043,KLIST shuffle1 llength 10,432,835,51.74
044,KLIST shuffle1 llength 100,5872,14144,41.52
045,KLIST shuffle1 llength 1000,1293956,1235661,104.72
046,KLIST shuffle1a llength 1,115,200,57.50
047,KLIST shuffle1a llength 10,442,1012,43.68
048,KLIST shuffle1a llength 100,4212,9609,43.83
049,KLIST shuffle1a llength 1000,42350,98262,43.10
050,KLIST shuffle1a llength 10000,445084,1052460,42.29
051,KLIST shuffle2 llength 1,123,205,60.00
052,KLIST shuffle2 llength 10,484,922,52.49

053,KLIST shuffle2 llength 100,4377,8347,52.44
054,KLIST shuffle2 llength 1000,46002,89585,51.35
055,KLIST shuffle2 llength 10000,525442,926369,56.72
056,KLIST shuffle3 llength 1,116,196,59.18
057,KLIST shuffle3 llength 10,420,911,46.10
058,KLIST shuffle3 llength 100,3730,8465,44.06
059,KLIST shuffle3 llength 1000,39397,87416,45.07
060,KLIST shuffle3 llength 10000,949689,1391544,68.25
061,KLIST shuffle4 llength 1,116,204,56.86
062,KLIST shuffle4 llength 10,450,1000,45.00
063,KLIST shuffle4 llength 100,4067,9326,43.61
064,KLIST shuffle4 llength 1000,39142,92580,42.28
065,KLIST shuffle4 llength 10000,421581,944205,44.65
066,"STR/LIST length; obj shimmer",3268,6767,48.29
067,"LIST length; pure list",17,21,80.95
068,STR length of a LIST,12,25,48.00
069,"LIST exact search; first item",18,24,75.00
070,"LIST exact search; middle item",74,111,66.67
071,"LIST exact search; last item",142,236,60.17
072,"LIST exact search; non-item",344,603,57.05
073,"LIST sorted search; first item",19,29,65.52
074,"LIST sorted search; middle item",19,27,70.37
075,"LIST sorted search; last item",19,27,70.37
076,"LIST sorted search; non-item",19,27,70.37
077,"LIST exact search; untyped item",148,230,64.35
078,"LIST exact search; typed item",107,119,89.92
079,"LIST sorted search; typed item",18,29,62.07
080,LIST sort,3620,4994,72.49
081,LIST typed sort,2923,3885,75.24
082,LIST remove first element,310,763,40.63
083,LIST remove middle element,308,761,40.47
084,LIST remove last element,312,757,41.22
085,LIST replace first element,291,740,39.32
086,LIST replace middle element,295,741,39.81
087,LIST replace last element,295,743,39.70
088,LIST replace first el with multiple,315,770,40.91
089,LIST replace middle el with multiple,314,764,41.10
090,LIST replace last el with multiple,288,750,38.40
091,LIST replace range,288,737,39.08
092,LIST remove in mixed list,411,959,42.86
093,LIST replace in mixed list,398,932,42.70
094,LIST index first element,14,24,58.33
095,LIST index middle element,14,28,50.00
096,LIST index last element,14,28,50.00
097,LIST insert an item at start,297,750,39.60
098,LIST insert an item at middle,303,746,40.62
099,"LIST insert an item at ""end""",299,746,40.08
100,"LIST small; early range",26,41,63.41
101,"LIST small; late range",23,33,69.70
102,"LIST large; early range",42,94,44.68
103,"LIST large; late range",41,106,38.68
104,LIST append to list,406,426,95.31
105,LIST join list,1147,1687,67.99
106,"LOOP for; iterate list",6848,16393,41.77
107,"LOOP foreach; iterate list",2169,5913,36.68
108,LOOP for (to 1000),2756,8183,33.68
109,LOOP while (to 1000),2753,8181,33.65
110,"LOOP for; iterate string",8350,15966,52.30
111,"LOOP foreach; iterate string",2684,7094,37.83
112,MAP string 1 val,686,1097,62.53
113,MAP string 2 val,1578,2375,66.44
114,MAP string 3 val,1938,2674,72.48
115,MAP string 4 val,2427,3324,73.01
116,MAP string 1 val -nocase,3772,5524,68.28
117,MAP string 2 val -nocase,6633,9624,68.92
118,MAP string 3 val -nocase,8809,12682,69.46
119,MAP string 4 val -nocase,10692,15353,69.64
120,MAP regsub 1 val,3884,4345,89.39
121,MAP regsub 2 val,16420,17435,94.18
122,MAP regsub 3 val,22056,23287,94.71
123,MAP regsub 4 val,27550,29333,93.92
124,MAP regsub 1 val -nocase,4004,4322,92.64
125,MAP regsub 2 val -nocase,16519,17289,95.55
126,MAP regsub 3 val -nocase,22075,23427,94.23
127,MAP regsub 4 val -nocase,27981,29438,95.05
128,"MAP string; no match",1011,1734,58.30
129,"MAP string -nocase; no match",7090,10589,66.96
130,"MAP regsub; no match",1226,2328,52.66
131,"MAP regsub -nocase; no match",1287,2295,56.08
132,MAP string short,44,58,75.86
133,MAP regsub short,188,219,85.84
134,MTHD direct ns proc call,8,15,53.33
135,MTHD imported ns proc call,8,16,50.00
136,MTHD interp alias proc call,25,44,56.82
137,MTHD indirect proc eval,36,58,62.07
138,MTHD indirect proc eval #2,58,100,58.00
139,MTHD array stored proc call,11,25,44.00
140,MTHD switch method call,53,86,61.63
141,MTHD ns lookup call,113,189,59.79
142,MTHD inline call,3,9,33.33
143,PROC explicit return,7,12,58.33
144,PROC implicit return,7,17,41.18
145,PROC explicit return (2),7,13,53.85
146,PROC implicit return (2),7,15,46.67
147,PROC explicit return (3),7,12,58.33
148,PROC implicit return (3),7,12,58.33
149,PROC heavily commented,7,12,58.33
150,"PROC do-nothing; no args",6,11,54.55
151,"PROC do-nothing; one arg",7,12,58.33
152,PROC local links with global,1611,2827,56.99
153,PROC local links with upvar,1308,2630,49.73
154,PROC local links with variable,1309,2358,55.51
155,"READ 595K; gets",386913,551429,70.17
156,"READ 595K; read",85889,164758,52.13
157,"READ 595K; read & size",86171,164854,52.27
158,"READ 3050b; gets",2152,3481,61.82
159,"READ 3050b; read",561,682,82.26
160,"READ 3050b; read & size",606,738,82.11
161,"BREAD 595K; gets",392519,568992,68.98
162,"BREAD 595K; read",51133,110961,46.08
163,"BREAD 595K; read & size",51194,110552,46.31
164,"BREAD 3050b; gets",2213,3174,69.72
165,"BREAD 3050b; read",329,472,69.70
166,"BREAD 3050b; read & size",377,517,72.92
167,REGEXP literal regexp,48,58,82.76
168,REGEXP var-based regexp,51,60,85.00
169,REGEXP count all matches,149,161,92.55
170,REGEXP extract all matches,201,255,78.82
171,STARTUP time to launch tclsh,26402,32329,81.67
172,STR str [string compare],15,38,39.47
173,STR str [string equal],15,38,39.47
174,"STR str $a equal """"",13,32,40.62
175,"STR str num == """"",15,38,39.47
176,STR str $a eq $b,21,49,42.86
177,STR str $a ne $b,21,49,42.86
178,STR str $a eq $b (same obj),19,45,42.22
179,STR str $a ne $b (same obj),19,46,41.30
180,STR length (==4010),13,23,56.52
181,STR index 0,19,30,63.33
182,STR index 100,20,31,64.52
183,STR index 500,19,30,63.33
184,STR index2 0,20,32,62.50
185,STR index2 100,21,30,70.00
186,STR index2 500,20,31,64.52
187,STR first (success),17,23,73.91
188,STR first (failure),115,116,99.14
189,STR first (total failure),106,103,102.91
190,STR last (success),17,23,73.91
191,STR last (failure),91,109,83.49
192,STR last (total failure),82,86,95.35
193,"STR match; simple (success early)",17,31,54.84
194,"STR match; simple (success late)",18,30,60.00
195,"STR match; simple (failure)",18,28,64.29
196,"STR match; simple (total failure)",16,29,55.17
197,"STR match; complex (success early)",18,34,52.94
198,"STR match; complex (success late)",152,165,92.12
199,"STR match; complex (failure)",121,134,90.30
200,"STR match; complex (total failure)",95,101,94.06
201,"STR range; index 100..200 of 4010",26,40,65.00
202,"STR replace; no replacement",87,126,69.05
203,"STR replace; equal replacement",93,133,69.92
204,"STR replace; longer replacement",103,146,70.55
205,"STR repeat; abcdefghij * 10",16,23,69.57
206,"STR repeat; abcdefghij * 100",48,47,102.13
207,"STR repeat; abcdefghij * 1000",231,257,89.88
208,"STR repeat; 4010 chars * 10",282,744,37.90
209,"STR repeat; 4010 chars * 100",6976,14673,47.54
210,"STR reverse iter1; 100 chars",1534,2295,66.84
211,"STR reverse iter1; 100 uchars",1457,2322,62.75
212,"STR reverse iter2; 100 chars",1123,2042,55.00
213,"STR reverse iter2; 100 uchars",1042,1972,52.84
214,"STR reverse recur1; 100 chars",3458,7067,48.93
215,"STR reverse recur1; 100 uchars",3523,6650,52.98
216,"STR split; 4010 chars",2806,4605,60.93
217,"STR split; 12100 uchars",7890,13813,57.12
218,"STR split iter; 4010 chars",11129,28087,39.62
219,"STR split iter; 12100 uchars",33318,86314,38.60
220,STR append,99,160,61.88
221,STR append (1KB + 1KB),95,134,70.90
222,STR append (10KB + 1KB),209,537,38.92
223,STR append (1MB + 2b * 1000),38681,190529,20.30
224,STR append (1MB + 1KB),28344,173073,16.38
225,STR append (1MB + 1KB * 20),29077,173622,16.75
226,STR append (1MB + 1KB * 1000),66893,207868,32.18
227,STR append (1MB + 1MB * 3),125505,327765,38.29
228,STR append (1MB + 1MB * 5),158507,855295,18.53
229,STR append (1MB + (1b + 1K + 1b) * 100),33101,174031,19.02
230,STR info locals match,946,1521,62.20
231,TRACE no trace set,34,121,28.10
232,TRACE read,34,50,68.00
233,TRACE write,33,50,66.00
234,TRACE unset,33,48,68.75
235,TRACE all set (rwu),34,52,65.38
236,UNSET var exists,12,19,63.16
237,UNSET catch var exists,13,23,56.52
238,UNSET catch var !exist,77,105,73.33
239,UNSET info check var exists,16,27,59.26
240,UNSET info check var !exist,12,27,44.44
241,UNSET nocomplain var exists,12,18,66.67
242,UNSET nocomplain var !exist,12,16,75.00
243,VAR access locally set,10,19,52.63
244,VAR access local proc arg,10,20,50.00
245,VAR access global,35,49,71.43
246,VAR access upvar,40,54,74.07
247,VAR set scalar,7,15,46.67
248,VAR set array element,14,28,50.00
249,VAR 100 'set's in array,161,272,59.19
250,VAR 'array set' of 100 elems,306,467,65.52
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































Changes to modules/debug/debug.man.

239
240
241
242
243
244
245
246
247

[para] The result of the method is the specified text.

[comment {= = == === ===== ======== ============= =====================}]
[list_end]

[vset CATEGORY debug]
[include ../common-text/feedback.inc]
[manpage_end]







|

239
240
241
242
243
244
245
246
247

[para] The result of the method is the specified text.

[comment {= = == === ===== ======== ============= =====================}]
[list_end]

[vset CATEGORY debug]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/debug/debug_caller.man.

36
37
38
39
40
41
42
43
44
The main anticipiated use case for this is the exclusion of arguments
expected to contain large Tcl values, i.e. long lists, large
dictionaries, etc. to prevent them from overwhelming the narrative.

[list_end]

[vset CATEGORY debug]
[include ../common-text/feedback.inc]
[manpage_end]







|

36
37
38
39
40
41
42
43
44
The main anticipiated use case for this is the exclusion of arguments
expected to contain large Tcl values, i.e. long lists, large
dictionaries, etc. to prevent them from overwhelming the narrative.

[list_end]

[vset CATEGORY debug]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/debug/debug_heartbeat.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.0.1]
[manpage_begin debug::heartbeat n [vset VERSION]]
[keywords debug]
[keywords heartbeat]
[keywords log]
[keywords narrative]
[keywords trace]
[copyright {200?, Colin McCormack, Wub Server Utilities}]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1]
[manpage_begin debug::heartbeat n [vset VERSION]]
[keywords debug]
[keywords heartbeat]
[keywords log]
[keywords narrative]
[keywords trace]
[copyright {200?, Colin McCormack, Wub Server Utilities}]
35
36
37
38
39
40
41
42
43
counter and the time in milliseconds since the last beat, thus
providing insight into timing variationsn and deviations from the
nominal [arg delta].

[list_end]

[vset CATEGORY debug]
[include ../common-text/feedback.inc]
[manpage_end]







|

35
36
37
38
39
40
41
42
43
counter and the time in milliseconds since the last beat, thus
providing insight into timing variationsn and deviations from the
nominal [arg delta].

[list_end]

[vset CATEGORY debug]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/debug/debug_timestamp.man.

26
27
28
29
30
31
32
33
34
last call, making it useful in a tag-specific prefix to automatically
provide caller information for all uses of the tag. Or in a message,
when only specific places need such detail.

[list_end]

[vset CATEGORY debug]
[include ../common-text/feedback.inc]
[manpage_end]







|

26
27
28
29
30
31
32
33
34
last call, making it useful in a tag-specific prefix to automatically
provide caller information for all uses of the tag. Or in a message,
when only specific places need such detail.

[list_end]

[vset CATEGORY debug]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/debug/heartbeat.tcl.

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    variable duration $delta
    variable timer

    if {$duration > 0} {
	# stop a previous heartbeat before starting the next
	catch { after cancel $timer }
	on heartbeat
	::debug::every $duration {
	    debug.heartbeat {[::debug::pulse]}
	}
    } else {
	catch { after cancel $timer }
	off heartbeat
    }
}








|
|







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    variable duration $delta
    variable timer

    if {$duration > 0} {
	# stop a previous heartbeat before starting the next
	catch { after cancel $timer }
	on heartbeat
	every $duration {
	    debug.heartbeat {[debug::pulse]}
	}
    } else {
	catch { after cancel $timer }
	off heartbeat
    }
}

60
61
62
63
64
65
66
67
68
    variable hbtimer   [::tcl::clock::milliseconds]
    variable timer
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide debug::heartbeat 1.0.1
return







|

60
61
62
63
64
65
66
67
68
    variable hbtimer   [::tcl::clock::milliseconds]
    variable timer
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide debug::heartbeat 1
return

Deleted modules/debug/heartbeat.test.

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
# heartbeat.test - Copyright (c) 2019 A. Kupries
# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2

testing {
    useLocal heartbeat.tcl debug::heartbeat
}

# -------------------------------------------------------------------------

test heartbeat-1.0 {wrong args, too many} -body {
    debug heartbeat 500 X
} -returnCodes error -result {wrong # args: should be "debug heartbeat ?delta?"}

test heartbeat-2.0 {run the beat} -setup {
    # capture the beat
    rename ::puts ::puts_x
    proc puts {args} {
        lappend ::captured [info level 0]
    }
    set forever {}
    set captured {}
    set sep "\n    "
} -cleanup {
    # undo capture
    rename ::puts {}
    rename ::puts_x ::puts
    unset forever captured sep _
} -body {
    after 1100 { set ::forever now }
    debug heartbeat 200
    vwait forever
    set _ "${sep}[join [lreplace $captured 0 0 start] ${sep}]\n"
} -match glob -result {
    start
    puts stderr {heartbeat | 1 *}
    puts stderr {heartbeat | 2 *}
    puts stderr {heartbeat | 3 *}
    puts stderr {heartbeat | 4 *}
    puts stderr {heartbeat | 5 *}
    puts stderr {heartbeat | 6 *}
}

# -------------------------------------------------------------------------

testsuiteCleanup
return
# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































Changes to modules/debug/pkgIndex.tcl.

1
2
3
4
5
if {![package vsatisfies [package require Tcl] 8.5]} return
package ifneeded debug            1.0.6 [list source [file join $dir debug.tcl]]
package ifneeded debug::heartbeat 1.0.1 [list source [file join $dir heartbeat.tcl]]
package ifneeded debug::timestamp 1     [list source [file join $dir timestamp.tcl]]
package ifneeded debug::caller    1.1   [list source [file join $dir caller.tcl]]


|


1
2
3
4
5
if {![package vsatisfies [package require Tcl] 8.5]} return
package ifneeded debug            1.0.6 [list source [file join $dir debug.tcl]]
package ifneeded debug::heartbeat 1     [list source [file join $dir heartbeat.tcl]]
package ifneeded debug::timestamp 1     [list source [file join $dir timestamp.tcl]]
package ifneeded debug::caller    1.1   [list source [file join $dir caller.tcl]]

Deleted modules/defer/defer.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
[vset VERSION 1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin defer n [vset VERSION]]
[keywords golang]
[keywords cleanup]
[copyright {2017, Roy Keene}]
[moddesc {Defered execution ala Go}]
[titledesc {Defered execution}]
[category  {Utility}]
[require Tcl 8.6]
[require defer [opt [vset VERSION]]]
[description]

The [cmd defer] commands allow a developer to schedule actions to happen
as part of the current variable scope terminating.  This is most useful
for dealing with cleanup activities.  Since the defered actions always
execute, and always execute in the reverse order from which the defer
statements themselves execute, the programmer can schedule the cleanup
of a resource (for example, a channel) as soon as that resource is
acquired.  Then, later if the procedure or lambda ends, either due to
an error, or an explicit return, the cleanup of that resource will
always occur.

[para]

[section {COMMANDS}]

[list_begin definitions]

[call [cmd "::defer::defer"] \
        [opt [arg command]] \
        [opt [arg arg1]] \
        [opt [arg arg2]] \
        [opt [arg argN...]]]

Defers execution of some code until the current variable scope
ends.  Each argument is concatencated together to form the script
to execute at deferal time.

Multiple defer statements may be used, they are executed in the order
of last-in, first-out.

[comment {
	Just like Go !
}]

The return value is an identifier which can be used later with 
[cmd defer::cancel]

[call [cmd "::defer::with"] \
	[arg variableList] [arg script]]

Defers execution of a script while copying the current value of some
variables, whose names specified in [arg variableList], into the script.
The script acts like a lambda but executes at the same level as the
[cmd defer::with]
call.

The return value is the same as
[cmd ::defer::defer]

[call [cmd ::defer::autowith] [arg script]]

The same as
[cmd ::defer::with] but uses all local variables in the variable list.

[call [cmd ::defer::cancel] \
    [opt [arg id...]]]

Cancels the execution of a defered action.  The [arg id] argument is the
identifier returned by
[cmd ::defer::defer],
[cmd ::defer::with], or
[cmd ::defer::autowith].

Any number of arguments may be supplied, and all of the IDs supplied
will be cancelled.

[list_end]

[section "EXAMPLES"]

[example {
	package require defer 1
	apply {{} {
		set fd [open /dev/null]
		defer::defer close $fd
	}}
}]

[section "REFERENCES"]

[list_begin enumerated]
[enum]
[list_end]

[section AUTHORS]
Roy Keene

[vset CATEGORY defer]
[include ../common-text/feedback.inc]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































Deleted modules/defer/defer.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#! /usr/bin/env tclsh

# Copyright (c) 2017 Roy Keene
# 
# Permission is hereby granted, free of charge, to any person obtaining a 
# copy of this software and associated documentation files (the "Software"), 
# to deal in the Software without restriction, including without limitation 
# the rights to use, copy, modify, merge, publish, distribute, sublicense, 
# and/or sell copies of the Software, and to permit persons to whom the 
# Software is furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in 
# all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
# DEALINGS IN THE SOFTWARE.

package require Tcl 8.6

namespace eval ::defer {
	namespace export defer

	variable idVar "<defer>\n<trace variable>"
}

proc ::defer::with {args} {
	if {[llength $args] == 1} {
		set varlist [list]
		set code [lindex $args 0]
	} elseif {[llength $args] == 2} {
		set varlist [lindex $args 0]
		set code [lindex $args 1]
	} else {
		return -code error "wrong # args: defer::with ?varlist? script"
	}

	if {[info level] == 1} {
		set global true
	} else {
		set global false
	}

	# We can't reliably handle cleanup from the global scope, don't let people
	# register ineffective handlers for now
	if {$global} {
		return -code error "defer may not be used from the global scope"
	}

	# Generate an ID to un-defer if requested
	set id [clock clicks]
	for {set i 0} {$i < 5} {incr i} {
		append id [expr rand()]
	}

	# If a list of variable names has been supplied, slurp up their values
	# and add the appropriate script to set those variables in the lambda
	## Generate a list of commands to create the variables
	foreach var $varlist {
		if {![uplevel 1 [list info exists $var]]} {
			continue
		}

		if {[uplevel 1 [list array exists $var]]} {
			set val [uplevel 1 [list array get $var]]
			lappend codeSetVars [list unset -nocomplain $var]
			lappend codeSetVars [list array set $var $val]
		} else {
			set val [uplevel 1 [list set $var]]
			lappend codeSetVars [list set $var $val]
		}
	}

	## Format the above commands in the structure of a Tcl command
	if {[info exists codeSetVars]} {
		set codeSetVars [join $codeSetVars "; "]
		set code "${codeSetVars}; ${code}"
	}

	## Unset the "args" variable, which is just an artifact of the lambda
	set code "# ${id}\nunset args; ${code}"

	# Register our interest in a variable to monitor for it to disappear

	uplevel 1 [list trace add variable $::defer::idVar unset [list apply [list args $code]]]

	return $id
}

proc ::defer::defer {args} {
	set code $args
	tailcall ::defer::with $code
}

proc ::defer::autowith {script} {
	tailcall ::defer::with [uplevel 1 {info vars}] $script
}

proc ::defer::cancel {args} {
	set idList $args

	set traces [uplevel 1 [list trace info variable $::defer::idVar]]

	foreach trace $traces {
		set action [lindex $trace 0]
		set code   [lindex $trace 1]

		foreach id $idList {
			if {[string match "*# $id*" $code]} {
				uplevel 1 [list trace remove variable $::defer::idVar $action $code]
			}
		}
	}
}

package provide defer 1
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































Deleted modules/defer/defer.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# defer.test - Copyright (c) 2017 Roy Keene
# -*- tcl -*-

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.6
testsNeedTcltest 2

testing {
	useLocal defer.tcl defer
}

# -------------------------------------------------------------------------

# Series 1: defer::defer
test defer-1.0 {defer::defer simple} -setup {
	set deferTest FAIL
} -body {
	apply {{} {
		defer::defer apply {{} {
			uplevel 2 {set deferTest PASS}
		}}
	}}

	set deferTest
} -cleanup {
	unset -nocomplain deferTest
} -result {PASS}

test defer-1.1 {defer::defer fd} -setup {
	set fd [file tempfile]
} -body {
	apply {{fd} {
		defer::defer close $fd
	}} $fd

	lsearch -exact [chan names] $fd
} -cleanup {
	catch {
		close $fd
	}
	unset fd
} -result {-1}

# Series 2: defer::with
test defer-2.0 {defer::with simple} -setup {
	set deferTest FAIL
} -body {
	apply {{} {
		set withCheck true
		defer::with withCheck {
			if {$withCheck} {
				uplevel 1 {set deferTest PASS}
			}
		}
	}}

	set deferTest
} -cleanup {
	unset -nocomplain deferTest
} -result {PASS}

test defer-2.1 {defer::with fd} -setup {
	set fd [file tempfile]
} -body {
	apply {{fd} {
		defer::with fd {
			close $fd
		}
	}} $fd

	lsearch -exact [chan names] $fd
} -cleanup {
	catch {
		close $fd
	}
	unset fd
} -result {-1}

# Series 3: defer::autowith
test defer-3.0 {defer::autowith simple} -setup {
	set deferTest FAIL
} -body {
	apply {{} {
		set autoWithCheck true

		defer::autowith {
			if {$autoWithCheck} {
				uplevel 1 {set deferTest PASS}
			}
		}
	}}

	set deferTest
} -cleanup {
	unset -nocomplain deferTest
} -result {PASS}

test defer-3.1 {defer::autowith fd} -setup {
	set fd [file tempfile]
} -body {
	apply {{fd} {
		defer::autowith {
			close $fd
		}
	}} $fd

	lsearch -exact [chan names] $fd
} -cleanup {
	catch {
		close $fd
	}
	unset fd
} -result {-1}

# Series 4: defer::cancel
test defer-4.0 {defer::cancel simple} -setup {
	set deferTest FAIL-1
} -body {
	apply {{} {
		set defId [defer::with "" {
			uplevel 1 {set deferTest FAIL-2}
		}]

		defer::with "" {
			uplevel 1 {set deferTest PASS}
		}

		defer::cancel $defId
	}}

	set deferTest
} -cleanup {
	unset -nocomplain deferTest
} -result {PASS}

# Series 5: Order is LIFO
test defer-5.0 {defer is LIFO} -setup {
	set deferTest "INVALID"
} -body {
	apply {{} {
		for {set i 0} {$i < 10} {incr i} {
			defer::defer uplevel 1 [list set deferTest "RESULT:$i"]
		}
	}}

	set deferTest
} -cleanup {
	unset -nocomplain deferTest
} -result {RESULT:0}

# Series 6: Usage checks
test defer-6.0 {defer::defer global fails} -body {
	defer::defer info patchlevel
} -returnCodes ERROR -result {defer may not be used from the global scope}

test defer-6.1 {defer::defer with no args works} -body {
	apply {{} {
		defer::defer

		return "PASS"
	}}
} -result {PASS}

test defer-6.2 {defer::with syntax too few args} -body {
	apply {{} {
		defer::with
	}}
} -returnCodes ERROR -match glob -result {wrong # args: *}

test defer-6.3 {defer::with syntax too many args} -body {
	apply {{} {
		defer::with [list] error BADARG
	}}
} -returnCodes ERROR -match glob -result {wrong # args: *}

test defer-6.4 {defer::autowith syntax too few args} -body {
	apply {{} {
		defer::autowith
	}}
} -returnCodes ERROR -match glob -result {wrong # args: *}

test defer-6.5 {defer::autowith syntax too many args} -body {
	apply {{} {
		defer::autowith error BADARG
	}}
} -returnCodes ERROR -match glob -result {wrong # args: *}

test defer-6.6 {defer::cancel syntax too few args} -body {
	apply {{} {
		defer::cancel

		return "PASS"
	}}
} -result {PASS}

test defer-6.7 {defer::cancel syntax too many args} -body {
	apply {{} {
		defer::cancel A B

		return "PASS"
	}}
} -result {PASS}

# -------------------------------------------------------------------------
testsuiteCleanup
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































Deleted modules/defer/pkgIndex.tcl.

1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.6]} {
    # PRAGMA: returnok
    return
}
package ifneeded defer 1 [list source [file join $dir defer.tcl]]
<
<
<
<
<










Changes to modules/des/des.man.

198
199
200
201
202
203
204
205
206

[section "AUTHORS"]
Jochen C Loewer,
Mac Cody,
Pat Thoyts

[vset CATEGORY des]
[include ../common-text/feedback.inc]
[manpage_end]







|

198
199
200
201
202
203
204
205
206

[section "AUTHORS"]
Jochen C Loewer,
Mac Cody,
Pat Thoyts

[vset CATEGORY des]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/des/tcldes.man.

18
19
20
21
22
23
24
25
26
[para]

The [package tclDES] package is a helper package for [package des].

[para] Please see the documentation of [package des] for details.

[vset CATEGORY des]
[include ../common-text/feedback.inc]
[manpage_end]







|

18
19
20
21
22
23
24
25
26
[para]

The [package tclDES] package is a helper package for [package des].

[para] Please see the documentation of [package des] for details.

[vset CATEGORY des]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/des/tcldesjr.man.

18
19
20
21
22
23
24
25
26
[para]

The [package tclDESjr] package is a helper package for [package des].

[para] Please see the documentation of [package des] for details.

[vset CATEGORY des]
[include ../common-text/feedback.inc]
[manpage_end]







|

18
19
20
21
22
23
24
25
26
[para]

The [package tclDESjr] package is a helper package for [package des].

[para] Please see the documentation of [package des] for details.

[vset CATEGORY des]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/devtools/ca.crt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

16
-----BEGIN CERTIFICATE-----
MIIClTCCAf6gAwIBAgIJAKWjOP4GKWjiMA0GCSqGSIb3DQEBCwUAMIGBMQswCQYD
VQQGEwJDQTELMAkGA1UECBMCQkMxEjAQBgNVBAcTCVZhbmNvdXZlcjEMMAoGA1UE
ChMDVENBMQ8wDQYDVQQLEwZUY2xsaWIxFzAVBgNVBAMTDlRjbGxpYiBSb290IENB
MRkwFwYJKoZIhvcNAQkBDAp0Y2xsaWJAdGNhMB4XDTE4MDIxNDA0MjUzOFoXDTI4
MDIxNDA0MjUzOFowgYExCzAJBgNVBAYTAkNBMQswCQYDVQQIEwJCQzESMBAGA1UE
BxMJVmFuY291dmVyMQwwCgYDVQQKEwNUQ0ExDzANBgNVBAsTBlRjbGxpYjEXMBUG
A1UEAxMOVGNsbGliIFJvb3QgQ0ExGTAXBgkqhkiG9w0BCQEMCnRjbGxpYkB0Y2Ew
gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALda0hrGvGLuaLICFkkwiz0AvDqK
fFsc1nNw4A9FcQ8cpA2SMeoKLyBLANLxrn99eboSCvW+XADZ8u7uwPU2/rnLmqaZ
mGZXA2jCKMVK6yxvbXvw2oYQGUN3xYhSQtEaYOoGrjn1HpkMpDJmx4TCCwMpwZmh
I95MCZtwvnSEGJQvAgMBAAGjEzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcN
AQELBQADgYEAKoNEQtMwqRxT3/hCFfYkrWW7s6sJ65xWpbyvMs1H0o9PRbaicbDC
f9FEEzQiNdcFlMd1Xe2aGrda0Ka/Dk02QF4tyX7t88zFLevOq6W1jQ022LbWoJ69
hTmcxvY7KbwpHjMGKnlb9neQidjtqH6jOCrEqESmWMKwezRIh9abvhw=

-----END CERTIFICATE-----

|


|
|

|



|
|
|
|
>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-----BEGIN CERTIFICATE-----
MIICtDCCAh2gAwIBAgIJAKWjOP4GKWjhMA0GCSqGSIb3DQEBBAUAMIGBMQswCQYD
VQQGEwJDQTELMAkGA1UECBMCQkMxEjAQBgNVBAcTCVZhbmNvdXZlcjEMMAoGA1UE
ChMDVENBMQ8wDQYDVQQLEwZUY2xsaWIxFzAVBgNVBAMTDlRjbGxpYiBSb290IENB
MRkwFwYJKoZIhvcNAQkBFgp0Y2xsaWJAdGNhMB4XDTEzMDEyMTIxNDUyOFoXDTIz
MDEyOTIxNDUyOFowgYExCzAJBgNVBAYTAkNBMQswCQYDVQQIEwJCQzESMBAGA1UE
BxMJVmFuY291dmVyMQwwCgYDVQQKEwNUQ0ExDzANBgNVBAsTBlRjbGxpYjEXMBUG
A1UEAxMOVGNsbGliIFJvb3QgQ0ExGTAXBgkqhkiG9w0BCQEWCnRjbGxpYkB0Y2Ew
gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALda0hrGvGLuaLICFkkwiz0AvDqK
fFsc1nNw4A9FcQ8cpA2SMeoKLyBLANLxrn99eboSCvW+XADZ8u7uwPU2/rnLmqaZ
mGZXA2jCKMVK6yxvbXvw2oYQGUN3xYhSQtEaYOoGrjn1HpkMpDJmx4TCCwMpwZmh
I95MCZtwvnSEGJQvAgMBAAGjMjAwMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
FCHaYPrHbeAAAjyHQIo1129sS+ElMA0GCSqGSIb3DQEBBAUAA4GBAEMba535SbVo
wZRim/hZbH97WoWNvGA+GuEyiVvae4TQaOpFVAOxwU/l0K6qXumIs8XTCdUh9T6P
T3TOxzVL7wHRQf8QR7buZEGooss/3Nw9lZmSJbfuxg2z0qG8r6FqhnDmNK0yimBt
VmuLWF+l8gb0lBYCEZdP0AMGT6UdE5J8
-----END CERTIFICATE-----

Changes to modules/devtools/dialog.tcl.

206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
	coserv::run $id {
	    package require tls

	    tls::init \
		-keyfile  $devtools/transmitter.key \
		-certfile $devtools/transmitter.crt \
		-cafile   $devtools/ca.crt \
		-ssl2 0    \
		-ssl3 0    \
		-tls1 1    \
		-require 1

	    proc Server {} {
		global port
		# Start listener for dialog
		set listener [tls::socket -server Accept 0]
		set port     [lindex [fconfigure $listener -sockname] 2]







|
|
|







206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
	coserv::run $id {
	    package require tls

	    tls::init \
		-keyfile  $devtools/transmitter.key \
		-certfile $devtools/transmitter.crt \
		-cafile   $devtools/ca.crt \
		-ssl2 1    \
		-ssl3 1    \
		-tls1 0    \
		-require 1

	    proc Server {} {
		global port
		# Start listener for dialog
		set listener [tls::socket -server Accept 0]
		set port     [lindex [fconfigure $listener -sockname] 2]

Changes to modules/devtools/receiver.crt.

1
2



3
4
5
6
7
8
9
10
11
12
13
14
15


16
-----BEGIN CERTIFICATE-----
MIICkjCCAfugAwIBAgIHBWUkgOH7szANBgkqhkiG9w0BAQsFADCBgTELMAkGA1UE



BhMCQ0ExCzAJBgNVBAgTAkJDMRIwEAYDVQQHEwlWYW5jb3V2ZXIxDDAKBgNVBAoT
A1RDQTEPMA0GA1UECxMGVGNsbGliMRcwFQYDVQQDEw5UY2xsaWIgUm9vdCBDQTEZ
MBcGCSqGSIb3DQEJAQwKdGNsbGliQHRjYTAeFw0xODAyMTQwNDI1MzlaFw0yNzAy
MTQwNDI1MzlaMIGAMQswCQYDVQQGEwJDQTELMAkGA1UECBMCQkMxEjAQBgNVBAcT
CVZhbmNvdXZlcjEMMAoGA1UEChMDVENBMQ8wDQYDVQQLEwZUY2xsaWIxETAPBgNV
BAMTCFJlY2VpdmVyMR4wHAYJKoZIhvcNAQkBDA9yZWNlaXZlckB0Y2xsaWIwgZ8w
DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMuOCwS+kvPyfaW6ZbwGtDSaGcLmwA9I
CERQ/k4v548C3uPSveDFgxBX4uQIdAgc4hwjkI6hobWS9zQTNfTzkRKBfaSw55EJ
nhz2Y5hwZtd9eWTdYZvM409VSgjw6uuWCAPhebmdGWDtE+wBPN/irG3Lm3ewfRcb
MZh7K2iCu+CRAgMBAAGjEzARMA8GA1UdEwEB/wQFMAMBAQAwDQYJKoZIhvcNAQEL
BQADgYEAr6VhQtqKByFxak7viHqoklytL6JmLTQhyTQmIeVmTjDPgVqGhwsX7bW/
vTSq9VYXwxhSgrJ+VZ9hpPH+pIff6g7r2Vx+6IwbCs7DjkjoIDeYqsXgySQGkvdp
rhm/YWnJF7t24GeyrVNMMDnVGH3YUj3txiJzIIWu4lQUOru1dbI=


-----END CERTIFICATE-----

|
>
>
>
|
|
|
<
<
<
|
|
|
|
|
|
|
>
>

1
2
3
4
5
6
7
8



9
10
11
12
13
14
15
16
17
18
-----BEGIN CERTIFICATE-----
MIIC4TCCAkqgAwIBAgICEAEwDQYJKoZIhvcNAQEEBQAwgYExCzAJBgNVBAYTAkNB
MQswCQYDVQQIEwJCQzESMBAGA1UEBxMJVmFuY291dmVyMQwwCgYDVQQKEwNUQ0Ex
DzANBgNVBAsTBlRjbGxpYjEXMBUGA1UEAxMOVGNsbGliIFJvb3QgQ0ExGTAXBgkq
hkiG9w0BCQEWCnRjbGxpYkB0Y2EwHhcNMTMwMTIxMjE0NzAyWhcNMjMwMTE5MjE0
NzAyWjCBgDELMAkGA1UEBhMCQ0ExCzAJBgNVBAgTAkJDMRIwEAYDVQQHEwlWYW5j
b3V2ZXIxDDAKBgNVBAoTA1RDQTEPMA0GA1UECxMGVGNsbGliMREwDwYDVQQDEwhS
ZWNlaXZlcjEeMBwGCSqGSIb3DQEJARYPcmVjZWl2ZXJAdGNsbGliMIGfMA0GCSqG



SIb3DQEBAQUAA4GNADCBiQKBgQDLjgsEvpLz8n2lumW8BrQ0mhnC5sAPSAhEUP5O
L+ePAt7j0r3gxYMQV+LkCHQIHOIcI5COoaG1kvc0EzX085ESgX2ksOeRCZ4c9mOY
cGbXfXlk3WGbzONPVUoI8OrrlggD4Xm5nRlg7RPsATzf4qxty5t3sH0XGzGYeyto
grvgkQIDAQABo2cwZTAfBgNVHSMEGDAWgBQh2mD6x23gAAI8h0CKNddvbEvhJTA0
BgNVHSUELTArBggrBgEFBQcDAQYIKwYBBQUHAwIGCisGAQQBgjcKAwMGCWCGSAGG
+EIEATAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBAUAA4GBAE8ZtGhrr36XSQvM
e3bKS5NtiDd5EdNlbYJmx6y7mGYYev5NShXtY/Zj6B2Zs/Cb5gdxKJowHHLtjFpJ
L/7TMkuDGmXfZJOfoDo5kuJpRy6Cl0340fwhdFftMUV36COzgttvZRBoareT5ix0
L+C7CHTyjD7J+FM8EYS09G/v5J7/
-----END CERTIFICATE-----

Deleted modules/devtools/recreate-certs.

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
#! /usr/bin/env tclsh

set dir [file normalize [file dirname [info script]]]

lappend auto_path [file join $dir ..]

package require pki 0.10

proc loadCertData {directory} {
    foreach certFile [glob -nocomplain -directory $directory *.crt] {
	set rootFile [file rootname $certFile]
	set id [file tail $rootFile]
	set keyFile "${rootFile}.key"
	set keyPassFile "${rootFile}.key.password"

	if {![file readable $certFile] || ![file readable $keyFile]} {
	    continue
	}

	set password ""
	if {[file exists $keyPassFile]} {
	    set fd [open $keyPassFile r]
	    set password [gets $fd]
	    close $fd
	}

	set fd [open $certFile]
	set cert [dict get [::pki::parse [read $fd]] certificate]
	close $fd

	set fd [open $keyFile]
	set cert [dict merge $cert [::pki::pkcs::parse_key [read $fd] $password]]
	close $fd

	dict set toProcess $id [dict create certFile $certFile data $cert]
    }

    return $toProcess
}

proc updateCerts {caCert certs} {
    foreach {id cert} $certs {
	set certFile [dict get $cert certFile]
	set cert [dict get $cert data]

	set validStart [clock seconds]
	set extensions [dict get $cert extensions]

	if {$id eq "ca"} {
	    set oldSerialNumber [dict get $cert serial_number]

	    set isCA true
	    set validEnd   [clock add $validStart 10 years]
	    set serialNumber [expr {$oldSerialNumber + 1}]
	} else {
	    set isCA false
	    set validEnd   [clock add $validStart 9 years]
	    set serialNumber [clock microseconds]
	}

	# pki 0.10 didnt support these
	dict unset extensions id-ce-authorityKeyIdentifier
	dict unset extensions id-ce-subjectKeyIdentifier
	dict unset extensions 2.5.29.37

	set newCert [::pki::x509::create_cert $cert $caCert $serialNumber $validStart $validEnd $isCA $extensions 1 sha256]

	set fd [open $certFile w]
	puts $fd [string trimright $newCert "\n"]
	close $fd
    }
}

set certInfo [loadCertData $dir]
set caCert [dict get $certInfo ca data]

updateCerts $caCert $certInfo
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































Changes to modules/devtools/testutilities.tcl.

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    puts "    Aborting the tests found in [file tail [info script]]."
    puts "    Requiring at least tcltest $version, have [package present tcltest]"

    # This causes a 'return' in the calling scope.
    return -code return
}

proc testsNeed {name {version {}}} {
    # This command ensures that a minimum version of package <name> is
    # used to run the tests in the calling testsuite. If the minimum
    # is not met by the active interpreter we forcibly bail out of the
    # testsuite calling the command. The command has to be called
    # immediately after loading the utilities.

    if {$version != {}} {
	if {[catch {
	    package require $name $version
	}]} {
	    puts "    Aborting the tests found in \"[file tail [info script]]\""
	    puts "    Requiring at least \"$name $version\", package not found."
	    
	    return -code return
	}

	if {[package vsatisfies [package present $name] $version]} return

	puts "    Aborting the tests found in \"[file tail [info script]]\""
	puts "    Requiring at least \"$name $version\", have [package present $name]."

	# This causes a 'return' in the calling scope.
	return -code return
    } else {
	if {[catch {
	    package require $name
	}]} {
	    puts "    Aborting the tests found in \"[file tail [info script]]\""
	    puts "    Requiring \"$name\", package not found."
	    
	    return -code return
	}
    }
}

# ### ### ### ######### ######### #########

## Save/restore the environment, for testsuites which have to
## manipulate it to (1) either achieve the effects they test
## for/against, or (2) to shield themselves against manipulation by







|






<
|
|
|
|
|
|
|
|

|

|
|

|
|
<
<
<
<
<
<
<
<
<
<







65
66
67
68
69
70
71
72
73
74
75
76
77
78

79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94










95
96
97
98
99
100
101
    puts "    Aborting the tests found in [file tail [info script]]."
    puts "    Requiring at least tcltest $version, have [package present tcltest]"

    # This causes a 'return' in the calling scope.
    return -code return
}

proc testsNeed {name version} {
    # This command ensures that a minimum version of package <name> is
    # used to run the tests in the calling testsuite. If the minimum
    # is not met by the active interpreter we forcibly bail out of the
    # testsuite calling the command. The command has to be called
    # immediately after loading the utilities.


    if {[catch {
	package require $name $version
    }]} {
	puts "    Aborting the tests found in \"[file tail [info script]]\""
	puts "    Requiring at least $name $version, package not found."

	return -code return
    }

    if {[package vsatisfies [package present $name] $version]} return

    puts "    Aborting the tests found in \"[file tail [info script]]\""
    puts "    Requiring at least $name $version, have [package present $name]."

    # This causes a 'return' in the calling scope.
    return -code return










}

# ### ### ### ######### ######### #########

## Save/restore the environment, for testsuites which have to
## manipulate it to (1) either achieve the effects they test
## for/against, or (2) to shield themselves against manipulation by
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
## Easy definition and initialization of test constraints.

proc InitializeTclTest {} {
    global tcltestinit
    if {[info exists tcltestinit] && $tcltestinit} return
    set tcltestinit 1

    proc ::tcltest::byConstraint {dict} {
	foreach {constraint value} $dict {
	    if {![testConstraint $constraint]} continue
	    return $value
	}
	return -code error "No result available. Failed to match any of the constraints ([join [lsort -dict [dict keys $dict]] ,])."
    }
    
    if {![package vsatisfies [package provide tcltest] 2.0]} {
	# Tcltest 2.0+ provides a documented public API to define and
	# initialize a test constraint. For earlier versions of the
	# package the user has to directly set a non-public undocumented
	# variable in the package's namespace. We create a command doing
	# this and emulating the public API.








<
<
<
<
<
<
<
<







153
154
155
156
157
158
159








160
161
162
163
164
165
166
## Easy definition and initialization of test constraints.

proc InitializeTclTest {} {
    global tcltestinit
    if {[info exists tcltestinit] && $tcltestinit} return
    set tcltestinit 1









    if {![package vsatisfies [package provide tcltest] 2.0]} {
	# Tcltest 2.0+ provides a documented public API to define and
	# initialize a test constraint. For earlier versions of the
	# package the user has to directly set a non-public undocumented
	# variable in the package's namespace. We create a command doing
	# this and emulating the public API.

208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245

    ::tcltest::testConstraint tcl8.3only \
	[expr {![package vsatisfies [package provide Tcl] 8.4]}]

    ::tcltest::testConstraint tcl8.3plus \
	[expr {[package vsatisfies [package provide Tcl] 8.3]}]

    ::tcltest::testConstraint tcl8.4only \
	[expr {![package vsatisfies [package provide Tcl] 8.5]}]

    ::tcltest::testConstraint tcl8.4plus \
	[expr {[package vsatisfies [package provide Tcl] 8.4]}]

    ::tcltest::testConstraint tcl8.5only [expr {
	![package vsatisfies [package provide Tcl] 8.6] &&
	 [package vsatisfies [package provide Tcl] 8.5]
    }]

    ::tcltest::testConstraint tcl8.5plus \
	[expr {[package vsatisfies [package provide Tcl] 8.5]}]

    ::tcltest::testConstraint tcl8.6plus \
	[expr {[package vsatisfies [package provide Tcl] 8.6]}]

    ::tcltest::testConstraint tcl8.6not10 \
	[expr { [package vsatisfies [package provide Tcl] 8.6] &&
	       ![package vsatisfies [package provide Tcl] 8.6.10]}]

    ::tcltest::testConstraint tcl8.6.10plus \
	[expr {[package vsatisfies [package provide Tcl] 8.6.10]}]

    ::tcltest::testConstraint tcl8.4minus \
	[expr {![package vsatisfies [package provide Tcl] 8.5]}]

    ::tcltest::testConstraint tcl8.5minus \
	[expr {![package vsatisfies [package provide Tcl] 8.6]}]

    # ### ### ### ######### ######### #########







<
<
<



<
<
<
<
<






<
<
<
<
<
<
<







189
190
191
192
193
194
195



196
197
198





199
200
201
202
203
204







205
206
207
208
209
210
211

    ::tcltest::testConstraint tcl8.3only \
	[expr {![package vsatisfies [package provide Tcl] 8.4]}]

    ::tcltest::testConstraint tcl8.3plus \
	[expr {[package vsatisfies [package provide Tcl] 8.3]}]




    ::tcltest::testConstraint tcl8.4plus \
	[expr {[package vsatisfies [package provide Tcl] 8.4]}]






    ::tcltest::testConstraint tcl8.5plus \
	[expr {[package vsatisfies [package provide Tcl] 8.5]}]

    ::tcltest::testConstraint tcl8.6plus \
	[expr {[package vsatisfies [package provide Tcl] 8.6]}]








    ::tcltest::testConstraint tcl8.4minus \
	[expr {![package vsatisfies [package provide Tcl] 8.5]}]

    ::tcltest::testConstraint tcl8.5minus \
	[expr {![package vsatisfies [package provide Tcl] 8.6]}]

    # ### ### ### ######### ######### #########
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# ### ### ### ######### ######### #########
## Commands to load files from various locations within the local
## Tcllib, and the loading of local Tcllib packages. None of them goes
## through the auto-loader, nor the regular package management, to
## avoid contamination of the testsuite by packages and code outside
## of the Tcllib under test.

# Shorthand for access to module-local assets files for tests.
proc asset {path} {
    file join $::tcltest::testsDirectory test-assets $path
}

proc asset-get {path} {
    set c [open [asset $path] r]
    set d [read $c]
    close $c
    return $d
}

# General access to module-local files
proc localPath {fname} {
    return [file join $::tcltest::testsDirectory $fname]
}

# General access to global (project-local) files
proc tcllibPath {fname} {
    return [file join $::tcllib::testutils::tcllib $fname]
}

proc useLocalFile {fname} {
    return [uplevel 1 [list source [localPath $fname]]]
}







<
<
<
<
<
<
<
<
<
<
<
<
<




<







390
391
392
393
394
395
396













397
398
399
400

401
402
403
404
405
406
407
# ### ### ### ######### ######### #########
## Commands to load files from various locations within the local
## Tcllib, and the loading of local Tcllib packages. None of them goes
## through the auto-loader, nor the regular package management, to
## avoid contamination of the testsuite by packages and code outside
## of the Tcllib under test.














proc localPath {fname} {
    return [file join $::tcltest::testsDirectory $fname]
}


proc tcllibPath {fname} {
    return [file join $::tcllib::testutils::tcllib $fname]
}

proc useLocalFile {fname} {
    return [uplevel 1 [list source [localPath $fname]]]
}

Changes to modules/devtools/transmitter.crt.

1
2



3
4
5
6
7
8
9
10
11
12
13
14
15


16
-----BEGIN CERTIFICATE-----
MIICmDCCAgGgAwIBAgIHBWUkgOOxHzANBgkqhkiG9w0BAQsFADCBgTELMAkGA1UE



BhMCQ0ExCzAJBgNVBAgTAkJDMRIwEAYDVQQHEwlWYW5jb3V2ZXIxDDAKBgNVBAoT
A1RDQTEPMA0GA1UECxMGVGNsbGliMRcwFQYDVQQDEw5UY2xsaWIgUm9vdCBDQTEZ
MBcGCSqGSIb3DQEJAQwKdGNsbGliQHRjYTAeFw0xODAyMTQwNDI1MzlaFw0yNzAy
MTQwNDI1MzlaMIGGMQswCQYDVQQGEwJDQTELMAkGA1UECBMCQkMxEjAQBgNVBAcT
CVZhbmNvdXZlcjEMMAoGA1UEChMDVENBMQ8wDQYDVQQLEwZUY2xsaWIxFDASBgNV
BAMTC1RyYW5zbWl0dGVyMSEwHwYJKoZIhvcNAQkBDBJ0cmFuc21pdHRlckB0Y2xs
aWIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALeOlwrMJa23mwpIcNc7fiM7
Yb4N9tg4auA+79hqrNTFXGwVLIrnqME1rUaV1UD585U7woNflQ5zwoqXP4CEarlh
x4ZDgKNZMrdgdR5U54GqzOqmEbYPm+W8V/Z2ohRng3xr4CH7mDC0LAGjuA8D4/Ek
VpNZG0bSc3iVZMuN4X27AgMBAAGjEzARMA8GA1UdEwEB/wQFMAMBAQAwDQYJKoZI
hvcNAQELBQADgYEANvQXt0S+JkiLDTP7g6SVulBOjOWJWAj6RJnvIdW5kwLHulsu
WKmKuHXU41+iBKKsG7t67tfF7TJT3+imsaLYjaiX6Drk1MPvGtSECOkBIfT2PT3E
DRYwxXX9youKe5gAZVaMQEbMOjbrZUcSMm8pxIqp7fb7mxQar+IN8s542z4=


-----END CERTIFICATE-----

|
>
>
>
|
|
|
<
<
<
|
|
|
|
|
|
|
>
>

1
2
3
4
5
6
7
8



9
10
11
12
13
14
15
16
17
18
-----BEGIN CERTIFICATE-----
MIIC5zCCAlCgAwIBAgICEAAwDQYJKoZIhvcNAQEEBQAwgYExCzAJBgNVBAYTAkNB
MQswCQYDVQQIEwJCQzESMBAGA1UEBxMJVmFuY291dmVyMQwwCgYDVQQKEwNUQ0Ex
DzANBgNVBAsTBlRjbGxpYjEXMBUGA1UEAxMOVGNsbGliIFJvb3QgQ0ExGTAXBgkq
hkiG9w0BCQEWCnRjbGxpYkB0Y2EwHhcNMTMwMTIxMjE0NjUxWhcNMjMwMTE5MjE0
NjUxWjCBhjELMAkGA1UEBhMCQ0ExCzAJBgNVBAgTAkJDMRIwEAYDVQQHEwlWYW5j
b3V2ZXIxDDAKBgNVBAoTA1RDQTEPMA0GA1UECxMGVGNsbGliMRQwEgYDVQQDEwtU
cmFuc21pdHRlcjEhMB8GCSqGSIb3DQEJARYSdHJhbnNtaXR0ZXJAdGNsbGliMIGf



MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3jpcKzCWtt5sKSHDXO34jO2G+DfbY
OGrgPu/YaqzUxVxsFSyK56jBNa1GldVA+fOVO8KDX5UOc8KKlz+AhGq5YceGQ4Cj
WTK3YHUeVOeBqszqphG2D5vlvFf2dqIUZ4N8a+Ah+5gwtCwBo7gPA+PxJFaTWRtG
0nN4lWTLjeF9uwIDAQABo2cwZTAfBgNVHSMEGDAWgBQh2mD6x23gAAI8h0CKNddv
bEvhJTA0BgNVHSUELTArBggrBgEFBQcDAQYIKwYBBQUHAwIGCisGAQQBgjcKAwMG
CWCGSAGG+EIEATAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBAUAA4GBAA9Ec5V0
wQCOSr2wz2qzWOQlw2KGtBCJaM/vckt5YJmpHIkp9cVP/tlHPG9qzG9VfQs4nOKa
wUjZ8xVt6kKA8gWbBm3mFSsI2JhT/q77FCWoMC56d7cLqqU6D2fmC1ksNMljhJ5n
UNgvspAEL5Txryh9VRYNRUZGjowquXXYUWht
-----END CERTIFICATE-----

Changes to modules/dicttool/dicttool.man.

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
[vset VERSION 1.0]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin dicttool n [vset VERSION]]
[keywords dict]
[copyright {2017 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Extensions to the standard "dict" command}]
[category Utilities]
[titledesc {Dictionary Tools}]
[require Tcl 8.5]
[require dicttool [opt [vset VERSION]]]
[description]
[para]
The [package dicttool] package enhances the standard [emph dict] command with several new
commands. In addition, the package also defines several "creature comfort" list commands as well.
Each command checks to see if a command already exists of the same name before adding itself,
just in case any of these slip into the core.

[list_begin definitions]
[call [cmd ladd] [arg varname] [arg args]]

This command will add a new instance of each element in [arg args] to [arg varname], but only if that element
is not already present.

[call [cmd ldelete] [arg varname] [arg args]]

This command will delete all instances of each element in [arg args] from [arg varname].

[call [cmd {dict getnull}] [arg args]]

Operates like [cmd {dict get}], however if the key [arg args] does not exist, it returns an empty
list instead of throwing an error.

[call [cmd {dict print}] [arg dict]]
<

|



|


<















|








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

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin dicttool n 1.0]
[keywords dict]
[copyright {2017 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Extensions to the standard "dict" command}]
[category Utilites]
[titledesc {Dictionary Tools}]
[require Tcl 8.5]

[description]
[para]
The [package dicttool] package enhances the standard [emph dict] command with several new
commands. In addition, the package also defines several "creature comfort" list commands as well.
Each command checks to see if a command already exists of the same name before adding itself,
just in case any of these slip into the core.

[list_begin definitions]
[call [cmd ladd] [arg varname] [arg args]]

This command will add a new instance of each element in [arg args] to [arg varname], but only if that element
is not already present.

[call [cmd ldelete] [arg varname] [arg args]]

This command will add a delete all instances of each element in [arg args] from [arg varname].

[call [cmd {dict getnull}] [arg args]]

Operates like [cmd {dict get}], however if the key [arg args] does not exist, it returns an empty
list instead of throwing an error.

[call [cmd {dict print}] [arg dict]]
70
71
72
73
74
75
76
77
78
  }
}
}]

[list_end]

[vset CATEGORY dict]
[include ../common-text/feedback.inc]
[manpage_end]







|

68
69
70
71
72
73
74
75
76
  }
}
}]

[list_end]

[vset CATEGORY dict]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/dicttool/dicttool.md.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#### ladd *varname* *args*

This command will add a new instance of each element in *args* to *varname*,
but only if that element is not already present.

#### ldelete] *varname* *args*

This command will delete all instances of each element in *args* from *varname*.

#### dict getnull *args*

Operates like **dict get**, however if the key *args* does not exist, it returns an empty
list instead of throwing an error.

#### dict print *dict*







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#### ladd *varname* *args*

This command will add a new instance of each element in *args* to *varname*,
but only if that element is not already present.

#### ldelete] *varname* *args*

This command will add a delete all instances of each element in *args* from *varname*.

#### dict getnull *args*

Operates like **dict get**, however if the key *args* does not exist, it returns an empty
list instead of throwing an error.

#### dict print *dict*

Changes to modules/dicttool/dicttool.tcl.

Changes to modules/dns/ChangeLog.

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
	* pkgIndex.tcl: to 1.2.1.
	* tcllib_ip.man:

2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	*

2011-12-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.14 ========================
	*

2011-01-24  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.13 ========================
	*

2010-08-16  Andreas Kupries  <andreask@activestate.com>

	* ip.tcl: Added new commands 'collapse' and 'subtract' for
	* ip.test: more 'arithmetic' on network ranges. Extended
	* pkgIndex.tcl: documentation and testsuite. Version bumped
	* tcllib_ip.man: to 1.2. Base code by Roy Keene, with thanks.

2009-12-07  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.12 ========================
	*

2009-04-13  Andreas Kupries  <andreask@activestate.com>

	* ip.tcl (::ip::IPv4?, ::ip::version): Corrected check for colons
	* tcllib_ip.man: (wrong order of arguments), and moved this check,
	* pkgIndex.tcl: a speed optimization from the look of it, into the
	  main IPv4 test to be used everywhere. Bumped the package version
	  to 1.1.3. Fixes [Bug 2123397].

2008-12-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11.1 ========================
	*

2008-11-22  Michael Schlenker <mic42@users.sourceforge.net>

	* dns.tcl: Fixed typo in flags for errorcode decoding

2008-10-16  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11 ========================
	*

2008-03-14  Andreas Kupries  <andreask@activestate.com>

	* spf.tcl (::spf::_exists): Fixed bad use of 'return', reported in
	* pkgIndex.tcl: [SF Tcllib Bug 1826418], by Erik Leunissen. Bumped
	  to version 1.1.1.

2007-09-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.10 ========================
	*

2007-08-26  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Applied patch #1610330 from Sergei Golovan to provide
	asynchronous connection for dns over tcp.

2007-08-25  Pat Thoyts  <patthoyts@users.sourceforge.net>







|





|





|












|













|


|






|











|







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
	* pkgIndex.tcl: to 1.2.1.
	* tcllib_ip.man:

2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2011-12-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.14 ========================
	* 

2011-01-24  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.13 ========================
	* 

2010-08-16  Andreas Kupries  <andreask@activestate.com>

	* ip.tcl: Added new commands 'collapse' and 'subtract' for
	* ip.test: more 'arithmetic' on network ranges. Extended
	* pkgIndex.tcl: documentation and testsuite. Version bumped
	* tcllib_ip.man: to 1.2. Base code by Roy Keene, with thanks.

2009-12-07  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.12 ========================
	* 

2009-04-13  Andreas Kupries  <andreask@activestate.com>

	* ip.tcl (::ip::IPv4?, ::ip::version): Corrected check for colons
	* tcllib_ip.man: (wrong order of arguments), and moved this check,
	* pkgIndex.tcl: a speed optimization from the look of it, into the
	  main IPv4 test to be used everywhere. Bumped the package version
	  to 1.1.3. Fixes [Bug 2123397].

2008-12-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11.1 ========================
	* 

2008-11-22  Michael Schlenker <mic42@users.sourceforge.net>
	
	* dns.tcl: Fixed typo in flags for errorcode decoding

2008-10-16  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11 ========================
	* 

2008-03-14  Andreas Kupries  <andreask@activestate.com>

	* spf.tcl (::spf::_exists): Fixed bad use of 'return', reported in
	* pkgIndex.tcl: [SF Tcllib Bug 1826418], by Erik Leunissen. Bumped
	  to version 1.1.1.

2007-09-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.10 ========================
	* 

2007-08-26  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Applied patch #1610330 from Sergei Golovan to provide
	asynchronous connection for dns over tcp.

2007-08-25  Pat Thoyts  <patthoyts@users.sourceforge.net>
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

	* tcllib_ip.man: Bumped version to 1.1.2 due to the bugfix made
	* ip.tcl:        by the last change.
	* pkgIndex.tcl:

2007-07-05  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* ip.tcl:   bug #1739359 - reject domain names that look like
	* ip.test:  ipv4 addresses

2007-03-21  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* tcllib_ip.man: Fixed all warnings due to use of now deprecated
	* tcllib_dns.man: commands. Added a section about how to give feedback.

2006-11-04  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* ipMoreC.tcl: Silence critcl warning.

2006-10-03  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.9 ========================
	*

2006-09-19  Andreas Kupries  <andreask@activestate.com>

	* tcllib_ip.man: Bumped version to 1.1.1
	* ip.tcl:
	* pkgIndex.tcl:








|

|













|







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

	* tcllib_ip.man: Bumped version to 1.1.2 due to the bugfix made
	* ip.tcl:        by the last change.
	* pkgIndex.tcl:

2007-07-05  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* ip.tcl:   bug #1739359 - reject domain names that look like 
	* ip.test:  ipv4 addresses
	
2007-03-21  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* tcllib_ip.man: Fixed all warnings due to use of now deprecated
	* tcllib_dns.man: commands. Added a section about how to give feedback.

2006-11-04  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* ipMoreC.tcl: Silence critcl warning.

2006-10-03  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.9 ========================
	* 

2006-09-19  Andreas Kupries  <andreask@activestate.com>

	* tcllib_ip.man: Bumped version to 1.1.1
	* ip.tcl:
	* pkgIndex.tcl:

169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
	  <kot@users.sf.net>. One path through the code did not mask the
	  data down to 32bit.

2005-10-06  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.8 ========================
	*

2005-10-04  Andreas Kupries <andreask@activestate.com>

	* ipMoreC.tcl: disabling the new critcl parts of ip for the
	  platforms it is known to not work for. A better solution will be
	  worked on after the release.








|







169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
	  <kot@users.sf.net>. One path through the code did not mask the
	  data down to 32bit.

2005-10-06  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.8 ========================
	* 

2005-10-04  Andreas Kupries <andreask@activestate.com>

	* ipMoreC.tcl: disabling the new critcl parts of ip for the
	  platforms it is known to not work for. A better solution will be
	  worked on after the release.

204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
	* dns.tcl (TcpEvent): Fixed [SF Tcllib Bug 1173444]. The cause was
	  a series of typos, the procedure argument 'token' was referenced
	  to in the code via 'tok'.

2004-11-21  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl:     Fixed bug in ReadUShort.

	* dns.tcl:     Incremented the version to 1.2.1 and updated the
	* ip.tcl:      manual.

	* dns.tcl:     Added support for RFC2782 (DNS SRV) which provides
	               for service discovery via DNS.
		       Added dns::nameservers command to return the list
	               of nameservers configured -- this is not
	               necessarily all that reliable but should be useful.
		       Implemented for Windows and Unix.

	* ip.tcl:      Added an error message to deal with invalid address
	               formats during normalization.

2004-11-06  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* ip.tcl:       Bug #1060460 - support for IPv4 in IPv6-style
	                addresses in ip::normalize.

2004-10-19  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl:       Applied fix for bug #1018934 "incorrectly
	                 detecting query as a reverse lookup"

2004-10-05  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.7 ========================
	*

2004-07-31  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* spf.test:      Added lots of macro tests and fixed some bugs
	* spf.tcl:       that this revealed.

2004-07-30  Pat Thoyts  <patthoyts@users.sourceforge.net>







|

|
|

|







|














|







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
	* dns.tcl (TcpEvent): Fixed [SF Tcllib Bug 1173444]. The cause was
	  a series of typos, the procedure argument 'token' was referenced
	  to in the code via 'tok'.

2004-11-21  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl:     Fixed bug in ReadUShort.
	
	* dns.tcl:     Incremented the version to 1.2.1 and updated the
	* ip.tcl:      manual. 
	
	* dns.tcl:     Added support for RFC2782 (DNS SRV) which provides
	               for service discovery via DNS. 
		       Added dns::nameservers command to return the list
	               of nameservers configured -- this is not
	               necessarily all that reliable but should be useful.
		       Implemented for Windows and Unix.

	* ip.tcl:      Added an error message to deal with invalid address
	               formats during normalization.
	
2004-11-06  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* ip.tcl:       Bug #1060460 - support for IPv4 in IPv6-style
	                addresses in ip::normalize.

2004-10-19  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl:       Applied fix for bug #1018934 "incorrectly
	                 detecting query as a reverse lookup"

2004-10-05  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.7 ========================
	* 

2004-07-31  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* spf.test:      Added lots of macro tests and fixed some bugs
	* spf.tcl:       that this revealed.

2004-07-30  Pat Thoyts  <patthoyts@users.sourceforge.net>
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356

	* dns.tcl: Fix issue setting the log level properly.

2004-05-23  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.6.1 ========================
	*

2004-02-15  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.6 ========================
	*

2004-01-22  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Added automatic recognition of reverse lookups (where
	query is 1.2.3.4). These are converted to in-addr.arpa lookups.
	Added a dns::result to return the whole decoded answer record.
	Added SPF record type (an alias for TXT).
	Incremented package version to 1.0.5

2003-07-09  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Added decoding for SOA response records.

2003-05-09  Andreas Kupries  <andreask@activestate.com>

	* resolv.tcl (::resolv::init): Added missing [expr] bracing.

2003-05-05  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.4 ========================
	*

2003-04-14  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Added error message to the timeout.
	* resolv.tcl: incorporated some of Emmanuel's updated code.

2003-04-12  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.man: *Renamed* to tcllib_dns.man to avoid a name clash with
	the dns manpage from the scotty package.

2003-04-11  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Try to read the whole reply when using tcp. Added a
	catch to avoid bgerrors within the handler.
	* dns.tcl:
	* dns.man:
	* pkgIndex.tcl: hiked version to 1.0.4

2003-04-11  Andreas Kupries  <andreask@pliers.activestate.com>

	* dns.tcl:
	* dns.man:
	* pkgIndex.tcl:  Fixed bug #614591. Set version of the package to
	  to 1.0.3 throughout. Added package 'resolv' to index.

2003-03-04  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: converted from the log package to logger. Enable UDP as
	the default if available.

2003-02-27  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* resolv.tcl: Imported Emmanuel Frecon's code from the Tclers
	Wiki. Provides a name cache and simplifies usage of the dns
	package.

2003-02-25  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Tested the UDP transmission using a fixed TclUDP.
	* dns.tcl: Implemented inverse queries. (Pretty useless though).
	* dns.tcl: Added errorcode procedure.

2003-01-30  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Implemented UDP transmission. Currently not tested
	because tcludp doesn't handle binary data.

2003-01-24  Pat Thoyts  <patthoyts@users.sourceforge.net>








|





|











|









|













|




|

















|





|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356

	* dns.tcl: Fix issue setting the log level properly.

2004-05-23  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.6.1 ========================
	* 

2004-02-15  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.6 ========================
	* 

2004-01-22  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Added automatic recognition of reverse lookups (where
	query is 1.2.3.4). These are converted to in-addr.arpa lookups.
	Added a dns::result to return the whole decoded answer record.
	Added SPF record type (an alias for TXT).
	Incremented package version to 1.0.5

2003-07-09  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Added decoding for SOA response records. 

2003-05-09  Andreas Kupries  <andreask@activestate.com>

	* resolv.tcl (::resolv::init): Added missing [expr] bracing.

2003-05-05  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.4 ========================
	* 

2003-04-14  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Added error message to the timeout.
	* resolv.tcl: incorporated some of Emmanuel's updated code.

2003-04-12  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.man: *Renamed* to tcllib_dns.man to avoid a name clash with
	the dns manpage from the scotty package.

2003-04-11  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Try to read the whole reply when using tcp. Added a 
	catch to avoid bgerrors within the handler.
	* dns.tcl:
	* dns.man:
	* pkgIndex.tcl: hiked version to 1.0.4
	
2003-04-11  Andreas Kupries  <andreask@pliers.activestate.com>

	* dns.tcl:
	* dns.man:
	* pkgIndex.tcl:  Fixed bug #614591. Set version of the package to
	  to 1.0.3 throughout. Added package 'resolv' to index.

2003-03-04  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: converted from the log package to logger. Enable UDP as
	the default if available.

2003-02-27  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* resolv.tcl: Imported Emmanuel Frecon's code from the Tclers
	Wiki. Provides a name cache and simplifies usage of the dns
	package.
	
2003-02-25  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Tested the UDP transmission using a fixed TclUDP.
	* dns.tcl: Implemented inverse queries. (Pretty useless though).
	* dns.tcl: Added errorcode procedure.
	
2003-01-30  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* dns.tcl: Implemented UDP transmission. Currently not tested
	because tcludp doesn't handle binary data.

2003-01-24  Pat Thoyts  <patthoyts@users.sourceforge.net>

366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385

2002-08-30  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* dns.tcl: Updated 'info exist' to 'info exists'.

2002-06-07  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* dns.man:
	* dns.tcl:
	* pkgIndex.tcl: Version up to 1.0.1

	* dns.tcl: moved var initialization code to the end, as it uses
	  the 'dns::configure' command, and thus should be called after
	  its definition. This is the reason for bug #564670, thus now
	  fixed.

2002-06-05  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* dns.man: Added note to manpage regarding DNS via TCP and
	  possible pitfalls.







|












366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385

2002-08-30  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* dns.tcl: Updated 'info exist' to 'info exists'.

2002-06-07  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* dns.man: 
	* dns.tcl:
	* pkgIndex.tcl: Version up to 1.0.1

	* dns.tcl: moved var initialization code to the end, as it uses
	  the 'dns::configure' command, and thus should be called after
	  its definition. This is the reason for bug #564670, thus now
	  fixed.

2002-06-05  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* dns.man: Added note to manpage regarding DNS via TCP and
	  possible pitfalls.

Changes to modules/dns/dns.tcl.

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
# dns.tcl - Copyright (C) 2002 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# Provide a Tcl only Domain Name Service client. See RFC 1034 and RFC 1035
# for information about the DNS protocol. This should insulate Tcl scripts
# from problems with using the system library resolver for slow name servers.
#
# This implementation uses TCP only for DNS queries. The protocol recommends
# that UDP be used in these cases but Tcl does not include UDP sockets by
# default. The package should be simple to extend to use a TclUDP extension
# in the future.
#
# Support for SPF (http://spf.pobox.com/rfcs.html) will need updating
# if or when the proposed draft becomes accepted.
#
# Support added for RFC1886 - DNS Extensions to support IP version 6
# Support added for RFC2782 - DNS RR for specifying the location of services
# Support added for RFC1995 - Incremental Zone Transfer in DNS
# Support added for RFC7858 - DNS over Transport Layer Security
#
# TODO:
#  - When using tcp we should make better use of the open connection and
#    send multiple queries along the same connection.
#
#  - We must switch to using TCP for truncated UDP packets.
#






|










<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

18
19
20
21
22
23
24
# dns.tcl - Copyright (C) 2002 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# Provide a Tcl only Domain Name Service client. See RFC 1034 and RFC 1035
# for information about the DNS protocol. This should insulate Tcl scripts
# from problems with using the system library resolver for slow name servers.
#
# This implementation uses TCP only for DNS queries. The protocol reccommends
# that UDP be used in these cases but Tcl does not include UDP sockets by
# default. The package should be simple to extend to use a TclUDP extension
# in the future.
#
# Support for SPF (http://spf.pobox.com/rfcs.html) will need updating
# if or when the proposed draft becomes accepted.
#
# Support added for RFC1886 - DNS Extensions to support IP version 6
# Support added for RFC2782 - DNS RR for specifying the location of services
# Support added for RFC1995 - Incremental Zone Transfer in DNS

#
# TODO:
#  - When using tcp we should make better use of the open connection and
#    send multiple queries along the same connection.
#
#  - We must switch to using TCP for truncated UDP packets.
#
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
        array set options {
            port       53
            timeout    30000
            protocol   tcp
            search     {}
            nameserver {localhost}
            loglevel   warn
            usetls     0
            cafile     ""
            cadir      ""
        }
        if {[file exists /etc/ssl/certs/ca-certificates.crt]} {
            set options(cafile) /etc/ssl/certs/ca-certificates.crt
        }
        variable log [logger::init dns]
        ${log}::setlevel $options(loglevel)
    }

    # We can use either ceptcl or tcludp for UDP support.
    if {![catch {package require udp 1.0.4} msg]} { ;# tcludp 1.0.4+
        # If TclUDP 1.0.4 or better is available, use it.
        set options(protocol) udp
    } else {
        if {![catch {package require ceptcl} msg]} {
            set options(protocol) udp
        }
    }

    variable types
    array set types {
        A 1  NS 2  MD 3  MF 4  CNAME 5  SOA 6  MB 7  MG 8  MR 9
        NULL 10  WKS 11  PTR 12  HINFO 13  MINFO 14  MX 15  TXT 16
        SPF 16 AAAA 28 SRV 33 NAPTR 35 IXFR 251 AXFR 252 MAILB 253
        MAILA 254
        ANY 255 * 255
    }

    variable classes
    array set classes { IN 1  CS 2  CH  3  HS 4  * 255}

    variable uid
    if {![info exists uid]} {
        set uid 0







<
<
<
<
<
<
















|
|

|
<

|







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
        array set options {
            port       53
            timeout    30000
            protocol   tcp
            search     {}
            nameserver {localhost}
            loglevel   warn






        }
        variable log [logger::init dns]
        ${log}::setlevel $options(loglevel)
    }

    # We can use either ceptcl or tcludp for UDP support.
    if {![catch {package require udp 1.0.4} msg]} { ;# tcludp 1.0.4+
        # If TclUDP 1.0.4 or better is available, use it.
        set options(protocol) udp
    } else {
        if {![catch {package require ceptcl} msg]} {
            set options(protocol) udp
        }
    }

    variable types
    array set types { 
        A 1  NS 2  MD 3  MF 4  CNAME 5  SOA 6  MB 7  MG 8  MR 9 
        NULL 10  WKS 11  PTR 12  HINFO 13  MINFO 14  MX 15  TXT 16
        SPF 16 AAAA 28 SRV 33 IXFR 251 AXFR 252  MAILB 253  MAILA 254

        ANY 255 * 255
    } 

    variable classes
    array set classes { IN 1  CS 2  CH  3  HS 4  * 255}

    variable uid
    if {![info exists uid]} {
        set uid 0
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
        return $r
    }

    set cget 0
    if {[llength $args] == 1} {
        set cget 1
    }

    while {[string match -* [lindex $args 0]]} {
        switch -glob -- [lindex $args 0] {
            -n* -
            -ser* {
                if {$cget} {
                    return $options(nameserver)
                } else {
                    set options(nameserver) [Pop args 1]
                }
            }
            -po*  {
                if {$cget} {
                    return $options(port)
                } else {
                    set options(port) [Pop args 1]
                }
            }
            -ti*  {
                if {$cget} {
                    return $options(timeout)
                } else {
                    set options(timeout) [Pop args 1]
                }
            }
            -pr*  {
                if {$cget} {
                    return $options(protocol)
                } else {
                    set proto [string tolower [Pop args 1]]
                    if {[string compare udp $proto] == 0 \
                            && [string compare tcp $proto] == 0} {
                        return -code error "invalid protocol \"$proto\":\
                            protocol must be either \"udp\" or \"tcp\""
                    }
                    set options(protocol) $proto
                }
            }
            -sea* {
                if {$cget} {
                    return $options(search)
                } else {
                    set options(search) [Pop args 1]
                }
            }
            -log* {
                if {$cget} {
                    return $options(loglevel)
                } else {
                    set options(loglevel) [Pop args 1]
                    ${log}::setlevel $options(loglevel)
                }
            }
            -cafile {
                if {$cget} {
                    return $options(cafile)
                } else {
                    set options(cafile) [Pop args 1]
                }
            }
            -cadir {
                if {$cget} {
                    return $options(cadir)
                } else {
                    set options(cadir) [Pop args 1]
                }
            }
            --    { Pop args ; break }
            default {
                set opts [join [lsort [array names options]] ", -"]
                return -code error "bad option [lindex $args 0]:\
                        must be one of -$opts"
            }
        }







|





|

|


|



|


|
















|


|



|










<
<
<
<
<
<
<
<
<
<
<
<
<
<







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157














158
159
160
161
162
163
164
        return $r
    }

    set cget 0
    if {[llength $args] == 1} {
        set cget 1
    }
   
    while {[string match -* [lindex $args 0]]} {
        switch -glob -- [lindex $args 0] {
            -n* -
            -ser* {
                if {$cget} {
                    return $options(nameserver) 
                } else {
                    set options(nameserver) [Pop args 1] 
                }
            }
            -po*  { 
                if {$cget} {
                    return $options(port)
                } else {
                    set options(port) [Pop args 1] 
                }
            }
            -ti*  { 
                if {$cget} {
                    return $options(timeout)
                } else {
                    set options(timeout) [Pop args 1]
                }
            }
            -pr*  {
                if {$cget} {
                    return $options(protocol)
                } else {
                    set proto [string tolower [Pop args 1]]
                    if {[string compare udp $proto] == 0 \
                            && [string compare tcp $proto] == 0} {
                        return -code error "invalid protocol \"$proto\":\
                            protocol must be either \"udp\" or \"tcp\""
                    }
                    set options(protocol) $proto 
                }
            }
            -sea* { 
                if {$cget} {
                    return $options(search)
                } else {
                    set options(search) [Pop args 1] 
                }
            }
            -log* {
                if {$cget} {
                    return $options(loglevel)
                } else {
                    set options(loglevel) [Pop args 1]
                    ${log}::setlevel $options(loglevel)
                }
            }














            --    { Pop args ; break }
            default {
                set opts [join [lsort [array names options]] ", -"]
                return -code error "bad option [lindex $args 0]:\
                        must be one of -$opts"
            }
        }
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
    set state(-recurse)    1;                   # Recursion Desired
    set state(-command)    {};                  # asynchronous handler
    set state(-timeout)    $options(timeout);   # connection timeout default.
    set state(-nameserver) $options(nameserver);# default nameserver
    set state(-port)       $options(port);      # default namerservers port
    set state(-search)     $options(search);    # domain search list
    set state(-protocol)   $options(protocol);  # which protocol udp/tcp
    set state(-usetls)     $options(usetls);    # use RFC7858 privacy
    set state(-cafile)     $options(cafile);    # certificate authority file
    set state(-cadir)      $options(cadir);     # certificate authority dir

    # Handle DNS URL's
    if {[string match "dns:*" $query]} {
        array set URI [uri::split $query]
        foreach {opt value} [uri::split $query] {
            if {$value != {} && [info exists state(-$opt)]} {
                set state(-$opt) $value
            }
        }
        set state(query) $URI(query)
        ${log}::debug "parsed query: $query"
    }

    while {[string match -* [lindex $args 0]]} {
        switch -glob -- [lindex $args 0] {
            -n* - ns -
            -ser* { set state(-nameserver) [Pop args 1] }
            -po*  { set state(-port) [Pop args 1] }
            -usetls { set state(-usetls) [Pop args 1] }
            -cafile { set state(-cafile) [Pop args 1] }
            -cadir { set state(-cadir) [Pop args 1] }
            -ti*  { set state(-timeout) [Pop args 1] }
            -co*  { set state(-command) [Pop args 1] }
            -cl*  { set state(-class) [Pop args 1] }
            -ty*  { set state(-type) [Pop args 1] }
            -pr*  { set state(-protocol) [Pop args 1] }
            -sea* { set state(-search) [Pop args 1] }
            -re*  { set state(-recurse) [Pop args 1] }







<
<
<







|










<
<
<







198
199
200
201
202
203
204



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222



223
224
225
226
227
228
229
    set state(-recurse)    1;                   # Recursion Desired
    set state(-command)    {};                  # asynchronous handler
    set state(-timeout)    $options(timeout);   # connection timeout default.
    set state(-nameserver) $options(nameserver);# default nameserver
    set state(-port)       $options(port);      # default namerservers port
    set state(-search)     $options(search);    # domain search list
    set state(-protocol)   $options(protocol);  # which protocol udp/tcp




    # Handle DNS URL's
    if {[string match "dns:*" $query]} {
        array set URI [uri::split $query]
        foreach {opt value} [uri::split $query] {
            if {$value != {} && [info exists state(-$opt)]} {
                set state(-$opt) $value
            }   
        }
        set state(query) $URI(query)
        ${log}::debug "parsed query: $query"
    }

    while {[string match -* [lindex $args 0]]} {
        switch -glob -- [lindex $args 0] {
            -n* - ns -
            -ser* { set state(-nameserver) [Pop args 1] }
            -po*  { set state(-port) [Pop args 1] }



            -ti*  { set state(-timeout) [Pop args 1] }
            -co*  { set state(-command) [Pop args 1] }
            -cl*  { set state(-class) [Pop args 1] }
            -ty*  { set state(-type) [Pop args 1] }
            -pr*  { set state(-protocol) [Pop args 1] }
            -sea* { set state(-search) [Pop args 1] }
            -re*  { set state(-recurse) [Pop args 1] }
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
        Pop args
    }

    if {$state(-nameserver) == {}} {
        return -code error "no nameserver specified"
    }

    if {$state(-usetls)} {
        package require tls
        set state(-protocol) "tcp"
        if {$state(-port) == $options(port)} {
            set state(-port) 853
        }
    }

    if {$state(-protocol) == "udp"} {
        if {[llength [package provide ceptcl]] == 0 \
                && [llength [package provide udp]] == 0} {
            return -code error "udp support is not available,\
                get ceptcl or tcludp"
        }
    }

    # Check for reverse lookups. IPv4 first, then IPv6.
    if {[regexp {^(?:\d{0,3}\.){3}\d{0,3}$} $state(query)]} {
        set addr [lreverse [split $state(query) .]]
        lappend addr in-addr arpa
        set state(query) [join $addr .]
        set state(-type) PTR
    } elseif {[string match {*:*} $state(query)]} {
        set addr [ip::normalize $state(query)]
        set addr [split [string reverse $addr] :]
        set addr [join [split [join $addr ""] {}] .]
        lappend addr ip6 arpa
        set state(query) [join $addr .]
        set state(-type) PTR
    }

    BuildMessage $token

    if {$state(-protocol) == "tcp"} {
        TcpTransmit $token
    } else {
        UdpTransmit $token
    }
    if {$state(-command) == {}} {
        wait $token







<
<
<
<
<
<
<
<







|
|





<
<
<
<
<
<
<



|







239
240
241
242
243
244
245








246
247
248
249
250
251
252
253
254
255
256
257
258
259







260
261
262
263
264
265
266
267
268
269
270
        Pop args
    }

    if {$state(-nameserver) == {}} {
        return -code error "no nameserver specified"
    }









    if {$state(-protocol) == "udp"} {
        if {[llength [package provide ceptcl]] == 0 \
                && [llength [package provide udp]] == 0} {
            return -code error "udp support is not available,\
                get ceptcl or tcludp"
        }
    }
    
    # Check for reverse lookups
    if {[regexp {^(?:\d{0,3}\.){3}\d{0,3}$} $state(query)]} {
        set addr [lreverse [split $state(query) .]]
        lappend addr in-addr arpa
        set state(query) [join $addr .]
        set state(-type) PTR







    }

    BuildMessage $token
    
    if {$state(-protocol) == "tcp"} {
        TcpTransmit $token
    } else {
        UdpTransmit $token
    }
    if {$state(-command) == {}} {
        wait $token
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
        return -code error "wrong # args:\
            should be \"dump ?option? methodName\""
    }

    # FRINK: nocheck
    variable $token
    upvar 0 $token state

    set result {}
    switch -glob -- $type {
        -qu*    -
        -req*   {
            set result [DumpMessage $state(request)]
        }
        -rep*   {







|







450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
        return -code error "wrong # args:\
            should be \"dump ?option? methodName\""
    }

    # FRINK: nocheck
    variable $token
    upvar 0 $token state
    
    set result {}
    switch -glob -- $type {
        -qu*    -
        -req*   {
            set result [DumpMessage $state(request)]
        }
        -rep*   {
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
            # QUERY
            set state(request) [binary format SSSSSS $state(id) \
                [expr {($state(opcode) << 11) | ($state(-recurse) << 8)}] \
                                    $qdcount 0 $nscount 0]
            append state(request) $qsection $nsdata
        }
        1 {
            # IQUERY
            set state(request) [binary format SSSSSS $state(id) \
                [expr {($state(opcode) << 11) | ($state(-recurse) << 8)}] \
                0 $qdcount 0 0 0]
            append state(request) \
                [binary format cSSI 0 \
                     $types($state(-type)) $classes($state(-class)) 0]
            switch -exact -- $state(-type) {







|







533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
            # QUERY
            set state(request) [binary format SSSSSS $state(id) \
                [expr {($state(opcode) << 11) | ($state(-recurse) << 8)}] \
                                    $qdcount 0 $nscount 0]
            append state(request) $qsection $nsdata
        }
        1 {
            # IQUERY            
            set state(request) [binary format SSSSSS $state(id) \
                [expr {($state(opcode) << 11) | ($state(-recurse) << 8)}] \
                0 $qdcount 0 0 0]
            append state(request) \
                [binary format cSSI 0 \
                     $types($state(-type)) $classes($state(-class)) 0]
            switch -exact -- $state(-type) {
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
    variable classes
    array set rr {name "" type A class IN ttl 0 rdlength 0 rdata ""}
    array set rr $args
    set data [PackName $rr(name)]

    switch -exact -- $rr(type) {
        CNAME - MB - MD - MF - MG - MR - NS - PTR {
            set rr(rdata) [PackName $rr(rdata)]
        }
        HINFO {
            array set r {CPU {} OS {}}
            array set r $rr(rdata)
            set rr(rdata) [PackString $r(CPU)]
            append rr(rdata) [PackString $r(OS)]
        }
        MINFO {
            array set r {RMAILBX {} EMAILBX {}}







|

|







593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
    variable classes
    array set rr {name "" type A class IN ttl 0 rdlength 0 rdata ""}
    array set rr $args
    set data [PackName $rr(name)]

    switch -exact -- $rr(type) {
        CNAME - MB - MD - MF - MG - MR - NS - PTR {
            set rr(rdata) [PackName $rr(rdata)] 
        }
        HINFO { 
            array set r {CPU {} OS {}}
            array set r $rr(rdata)
            set rr(rdata) [PackString $r(CPU)]
            append rr(rdata) [PackString $r(OS)]
        }
        MINFO {
            array set r {RMAILBX {} EMAILBX {}}
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
            set str $rr(rdata)
            set len [string length [set str $rr(rdata)]]
            set rr(rdata) ""
            for {set n 0} {$n < $len} {incr n} {
                set s [string range $str $n [incr n 253]]
                append rr(rdata) [PackString $s]
            }
        }
        NULL {}
        SOA {
            array set r {MNAME {} RNAME {}
                SERIAL 0 REFRESH 0 RETRY 0 EXPIRE 0 MINIMUM 0}
            array set r $rr(rdata)
            set rr(rdata) [PackName $r(MNAME)]
            append rr(rdata) [PackName $r(RNAME)]







|







620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
            set str $rr(rdata)
            set len [string length [set str $rr(rdata)]]
            set rr(rdata) ""
            for {set n 0} {$n < $len} {incr n} {
                set s [string range $str $n [incr n 253]]
                append rr(rdata) [PackString $s]
            }
        }          
        NULL {}
        SOA {
            array set r {MNAME {} RNAME {}
                SERIAL 0 REFRESH 0 RETRY 0 EXPIRE 0 MINIMUM 0}
            array set r $rr(rdata)
            set rr(rdata) [PackName $r(MNAME)]
            append rr(rdata) [PackName $r(RNAME)]
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
    fileevent $s writable {}
    if {[catch {fconfigure $s -peername}]} {
	# TCP connection failed
        Finish $token "can't connect to server"
	return
    }

    if {$state(-usetls)} {
        tls::import $s -server false -request 1 \
            -cadir $state(-cadir) \
            -cafile $state(-cafile) \
            -ssl2 false -ssl3 false -tls1 true \
            -command [list ::dns::TlsCallback $token]
        if {[catch {tls::handshake $s} err]} {
            Finish $token $err
            return
        }
    }

    fconfigure $s -blocking 0 -translation binary -buffering none

    # For TCP the message must be prefixed with a 16bit length field.
    set req [binary format S [string length $state(request)]]
    append req $state(request)

    fileevent $s readable [list [namespace current]::TcpEvent $token]
    puts -nonewline $s $req
}

proc ::dns::TlsCallback {token cmd channel args} {
    variable log
    variable $token
    upvar 0 $token state
    switch -exact -- $cmd {
        info {
            foreach {major minor message} $args break
            ${log}::debug "TLS: $major/$minor $message"
        }
        verify {
            foreach {depth cert status error} $args break
            lappend state(certChain) \
                [list depth $depth status $status error $error cert $cert]
            return $status
        }
        error {
            return -code error "tls error: $args"
        }
        default {
            return -code error "unexpected message type \"$cmd\" in TLS callback"
        }
    }
    return 1
}

# -------------------------------------------------------------------------
# Description:
#  Transmit a DNS request using UDP datagrams
#
# Note:







<
<
<
<
<
<
<
<
<
<
<
<






<

|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







679
680
681
682
683
684
685












686
687
688
689
690
691

692
693
694























695
696
697
698
699
700
701
    fileevent $s writable {}
    if {[catch {fconfigure $s -peername}]} {
	# TCP connection failed
        Finish $token "can't connect to server"
	return
    }













    fconfigure $s -blocking 0 -translation binary -buffering none

    # For TCP the message must be prefixed with a 16bit length field.
    set req [binary format S [string length $state(request)]]
    append req $state(request)


    puts -nonewline $s $req

    fileevent $s readable [list [namespace current]::TcpEvent $token]























}

# -------------------------------------------------------------------------
# Description:
#  Transmit a DNS request using UDP datagrams
#
# Note:
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
    # setup the timeout
    if {$state(-timeout) > 0} {
        set state(after) [after $state(-timeout) \
                              [list [namespace origin reset] \
                                   $token timeout\
                                  "operation timed out"]]
    }

    if {[llength [package provide ceptcl]] > 0} {
        # using ceptcl
        set state(sock) [cep -type datagram $state(-nameserver) $state(-port)]
        fconfigure $state(sock) -blocking 0
    } else {
        # using tcludp
        set state(sock) [udp_open]
        udp_conf $state(sock) $state(-nameserver) $state(-port)
    }
    fconfigure $state(sock) -translation binary -buffering none
    set state(status) connect
    puts -nonewline $state(sock) $state(request)

    fileevent $state(sock) readable [list [namespace current]::UdpEvent $token]

    return $token
}

# -------------------------------------------------------------------------

# Description:
#  Tidy up after a tcp transaction.







|












|

|







711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
    # setup the timeout
    if {$state(-timeout) > 0} {
        set state(after) [after $state(-timeout) \
                              [list [namespace origin reset] \
                                   $token timeout\
                                  "operation timed out"]]
    }
    
    if {[llength [package provide ceptcl]] > 0} {
        # using ceptcl
        set state(sock) [cep -type datagram $state(-nameserver) $state(-port)]
        fconfigure $state(sock) -blocking 0
    } else {
        # using tcludp
        set state(sock) [udp_open]
        udp_conf $state(sock) $state(-nameserver) $state(-port)
    }
    fconfigure $state(sock) -translation binary -buffering none
    set state(status) connect
    puts -nonewline $state(sock) $state(request)
    
    fileevent $state(sock) readable [list [namespace current]::UdpEvent $token]
    
    return $token
}

# -------------------------------------------------------------------------

# Description:
#  Tidy up after a tcp transaction.
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
    if {[string length $errormsg] != 0} {
	set state(error) $errormsg
	set state(status) error
    }
    catch {close $state(sock)}
    catch {after cancel $state(after)}
    if {[info exists state(-command)] && $state(-command) != {}} {
	if {[catch {
            uplevel #0 [linsert $state(-command) end $token]
        } err]} {
	    if {[string length $errormsg] == 0} {
		set state(error) [list $err $errorInfo $errorCode]
		set state(status) error
	    }
	}
        if {[info exists state(-command)]} {
            unset state(-command)







|
<
<







748
749
750
751
752
753
754
755


756
757
758
759
760
761
762
    if {[string length $errormsg] != 0} {
	set state(error) $errormsg
	set state(status) error
    }
    catch {close $state(sock)}
    catch {after cancel $state(after)}
    if {[info exists state(-command)] && $state(-command) != {}} {
	if {[catch {eval $state(-command) {$token}} err]} {


	    if {[string length $errormsg] == 0} {
		set state(error) [list $err $errorInfo $errorCode]
		set state(status) error
	    }
	}
        if {[info exists state(-command)]} {
            unset state(-command)
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884

    binary scan $state(reply) SS id flags
    set status [expr {$flags & 0x000F}]

    switch -- $status {
        0 {
            set state(status) ok
            Finish $token
        }
        1 { Finish $token "Format error - unable to interpret the query." }
        2 { Finish $token "Server failure - internal server error." }
        3 { Finish $token "Name Error - domain does not exist" }
        4 { Finish $token "Not implemented - the query type is not available." }
        5 { Finish $token "Refused - your request has been refused by the server." }
        default {







|







789
790
791
792
793
794
795
796
797
798
799
800
801
802
803

    binary scan $state(reply) SS id flags
    set status [expr {$flags & 0x000F}]

    switch -- $status {
        0 {
            set state(status) ok
            Finish $token 
        }
        1 { Finish $token "Format error - unable to interpret the query." }
        2 { Finish $token "Server failure - internal server error." }
        3 { Finish $token "Name Error - domain does not exist" }
        4 { Finish $token "Not implemented - the query type is not available." }
        5 { Finish $token "Refused - your request has been refused by the server." }
        default {
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
    }

    set status [catch {read $state(sock)} result]
    if {$status != 0} {
        ${log}::debug "Event error: $result"
        Finish $token "error reading data: $result"
    } elseif { [string length $result] >= 0 } {
        ${log}::debug "read [string length $result] bytes for $token"
        if {[catch {
            # Handle incomplete reads - check the size and keep reading.
            if {![info exists state(size)]} {
                binary scan $result S state(size)
                set result [string range $result 2 end]
            }
            append state(reply) $result

            # check the length and flags and chop off the tcp length prefix.
            if {[string length $state(reply)] >= $state(size)} {
                binary scan $result S id
                set id [expr {$id & 0xFFFF}]
                if {$id != [expr {$state(id) & 0xFFFF}]} {
                    ${log}::error "received packed with incorrect id"
                }







<




|


|







824
825
826
827
828
829
830

831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
    }

    set status [catch {read $state(sock)} result]
    if {$status != 0} {
        ${log}::debug "Event error: $result"
        Finish $token "error reading data: $result"
    } elseif { [string length $result] >= 0 } {

        if {[catch {
            # Handle incomplete reads - check the size and keep reading.
            if {![info exists state(size)]} {
                binary scan $result S state(size)
                set result [string range $result 2 end]            
            }
            append state(reply) $result
            
            # check the length and flags and chop off the tcp length prefix.
            if {[string length $state(reply)] >= $state(size)} {
                binary scan $result S id
                set id [expr {$id & 0xFFFF}]
                if {$id != [expr {$state(id) & 0xFFFF}]} {
                    ${log}::error "received packed with incorrect id"
                }
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
    if {$id != [expr {$state(id) & 0xFFFF}]} {
        ${log}::error "received packed with incorrect id"
    }
    # bug #1158037 - doing this causes problems > 65535 requests!
    #Receive [namespace current]::$id
    Receive $token
}

# -------------------------------------------------------------------------

proc ::dns::Flags {token {varname {}}} {
    # FRINK: nocheck
    variable $token
    upvar 0 $token state

    if {$varname != {}} {
        upvar $varname flags
    }

    array set flags {query 0 opcode 0 authoritative 0 errorcode 0
        truncated 0 recursion_desired 0 recursion_allowed 0}








|






|







881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
    if {$id != [expr {$state(id) & 0xFFFF}]} {
        ${log}::error "received packed with incorrect id"
    }
    # bug #1158037 - doing this causes problems > 65535 requests!
    #Receive [namespace current]::$id
    Receive $token
}
    
# -------------------------------------------------------------------------

proc ::dns::Flags {token {varname {}}} {
    # FRINK: nocheck
    variable $token
    upvar 0 $token state
    
    if {$varname != {}} {
        upvar $varname flags
    }

    array set flags {query 0 opcode 0 authoritative 0 errorcode 0
        truncated 0 recursion_desired 0 recursion_allowed 0}

1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
    upvar $indexvar index
    set result {}

    for {set cn 0} {$cn < $nitems} {incr cn} {
        set r {}
        lappend r name [ReadName data $index offset]
        incr index $offset

        # Read off QTYPE and QCLASS for this query.
        set ndx $index
        incr index 3
        binary scan [string range $data $ndx $index] SS qtype qclass
        set qtype [expr {$qtype & 0xFFFF}]
        set qclass [expr {$qclass & 0xFFFF}]
        incr index
        lappend r type [KeyOf types $qtype $qtype] \
                  class [KeyOf classes $qclass $qclass]
        lappend result $r
    }
    return $result
}

# -------------------------------------------------------------------------

# Read an answer section from a DNS message.
#
proc ::dns::ReadAnswer {nitems data indexvar {raw 0}} {
    variable types
    variable classes
    upvar $indexvar index
    set result {}

    for {set cn 0} {$cn < $nitems} {incr cn} {
        set r {}
        lappend r name [ReadName data $index offset]
        incr index $offset

        # Read off TYPE, CLASS, TTL and RDLENGTH
        binary scan [string range $data $index end] SSIS type class ttl rdlength

        set type [expr {$type & 0xFFFF}]
        set type [KeyOf types $type $type]

        set class [expr {$class & 0xFFFF}]







|













|


|











|







1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
    upvar $indexvar index
    set result {}

    for {set cn 0} {$cn < $nitems} {incr cn} {
        set r {}
        lappend r name [ReadName data $index offset]
        incr index $offset
        
        # Read off QTYPE and QCLASS for this query.
        set ndx $index
        incr index 3
        binary scan [string range $data $ndx $index] SS qtype qclass
        set qtype [expr {$qtype & 0xFFFF}]
        set qclass [expr {$qclass & 0xFFFF}]
        incr index
        lappend r type [KeyOf types $qtype $qtype] \
                  class [KeyOf classes $qclass $qclass]
        lappend result $r
    }
    return $result
}
        
# -------------------------------------------------------------------------

# Read an answer section from a DNS message. 
#
proc ::dns::ReadAnswer {nitems data indexvar {raw 0}} {
    variable types
    variable classes
    upvar $indexvar index
    set result {}

    for {set cn 0} {$cn < $nitems} {incr cn} {
        set r {}
        lappend r name [ReadName data $index offset]
        incr index $offset
        
        # Read off TYPE, CLASS, TTL and RDLENGTH
        binary scan [string range $data $index end] SSIS type class ttl rdlength

        set type [expr {$type & 0xFFFF}]
        set type [KeyOf types $type $type]

        set class [expr {$class & 0xFFFF}]
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
                A {
                    set rdata [join [Expand $rdata] .]
                }
                AAAA {
                    set rdata [ip::contract [ip::ToString $rdata]]
                }
                NS - CNAME - PTR {
                    set rdata [ReadName data $index off]
                }
                MX {
                    binary scan $rdata S preference
                    set exchange [ReadName data [expr {$index + 2}] off]
                    set rdata [list $preference $exchange]
                }
                SRV {
                    set x $index
                    set rdata [list priority [ReadUShort data $x off]]
                    incr x $off
                    lappend rdata weight [ReadUShort data $x off]
                    incr x $off
                    lappend rdata port [ReadUShort data $x off]
                    incr x $off
                    lappend rdata target [ReadName data $x off]
                }
		NAPTR {
		    set x $index
		    set rdata [list order [ReadUShort data $x off]]
		    incr x $off
		    lappend rdata preference [ReadUShort data $x off]
		    incr x $off
		    lappend rdata flags [ReadString data $x off]
		    incr x $off
		    lappend rdata service [ReadString data $x off]
		    incr x $off
		    lappend rdata regex [ReadString data $x off]
		    incr x $off
		    set domain {}
		    while {$x < $index + $rdlength} {
			lappend domain [ReadString data $x off]
			incr x $off
		    }
		    lappend rdata replacement [join $domain .]
		}
                TXT {
		    set x $index
		    set rdata ""
		    while {$x < $index + $rdlength} {
			append rdata [ReadString data $x off]
			incr x $off
		    }
                }
                SOA {
                    set x $index
                    set rdata [list MNAME [ReadName data $x off]]
                    incr x $off
                    lappend rdata RNAME [ReadName data $x off]
                    incr x $off
                    lappend rdata SERIAL [ReadULong data $x off]
                    incr x $off
                    lappend rdata REFRESH [ReadLong data $x off]
                    incr x $off
                    lappend rdata RETRY [ReadLong data $x off]







|















<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<

<
<
<
|
<
|
<



|







1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116




1117












1118


1119



1120

1121

1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
                A {
                    set rdata [join [Expand $rdata] .]
                }
                AAAA {
                    set rdata [ip::contract [ip::ToString $rdata]]
                }
                NS - CNAME - PTR {
                    set rdata [ReadName data $index off] 
                }
                MX {
                    binary scan $rdata S preference
                    set exchange [ReadName data [expr {$index + 2}] off]
                    set rdata [list $preference $exchange]
                }
                SRV {
                    set x $index
                    set rdata [list priority [ReadUShort data $x off]]
                    incr x $off
                    lappend rdata weight [ReadUShort data $x off]
                    incr x $off
                    lappend rdata port [ReadUShort data $x off]
                    incr x $off
                    lappend rdata target [ReadName data $x off]




                    incr x $off












                }


                TXT {



                    set rdata [ReadString data $index $rdlength]

                }

                SOA {
                    set x $index
                    set rdata [list MNAME [ReadName data $x off]]
                    incr x $off 
                    lappend rdata RNAME [ReadName data $x off]
                    incr x $off
                    lappend rdata SERIAL [ReadULong data $x off]
                    incr x $off
                    lappend rdata REFRESH [ReadLong data $x off]
                    incr x $off
                    lappend rdata RETRY [ReadLong data $x off]
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
        lappend result $r
    }
    return $result
}


# Read a 32bit integer from a DNS packet. These are compatible with
# the ReadName proc. Additionally - ReadULong takes measures to ensure
# the unsignedness of the value obtained.
#
proc ::dns::ReadLong {datavar index usedvar} {
    upvar $datavar data
    upvar $usedvar used
    set r {}
    set used 0







|







1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
        lappend result $r
    }
    return $result
}


# Read a 32bit integer from a DNS packet. These are compatible with
# the ReadName proc. Additionally - ReadULong takes measures to ensure 
# the unsignedness of the value obtained.
#
proc ::dns::ReadLong {datavar index usedvar} {
    upvar $datavar data
    upvar $usedvar used
    set r {}
    set used 0
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337

1338

1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
    upvar $datavar data
    upvar $usedvar used
    set r {}
    set used 0
    if {[binary scan $data @${index}cccc b1 b2 b3 b4]} {
        set used 4
        # This gets us an unsigned value.
        set r [expr {($b4 & 0xFF) + (($b3 & 0xFF) << 8)
                     + (($b2 & 0xFF) << 16) + ($b1 << 24)}]
    }
    return $r
}

proc ::dns::ReadUShort {datavar index usedvar} {
    upvar $datavar data
    upvar $usedvar used
    set r {}
    set used 0
    if {[binary scan [string range $data $index end] cc b1 b2]} {
        set used 2
        # This gets us an unsigned value.
        set r [expr {(($b2 & 0xff) + (($b1 & 0xff) << 8)) & 0xffff}]
    }
    return $r
}

# Read off the NAME or QNAME element. This reads off each label in turn,
# dereferencing pointer labels until we have finished. The length of data
# used is passed back using the usedvar variable.
#
proc ::dns::ReadName {datavar index usedvar} {
    upvar $datavar data
    upvar $usedvar used
    set startindex $index

    set r {}
    set len 1
    set max [string length $data]

    while {$len != 0 && $index < $max} {
        # Read the label length (and preread the pointer offset)
        binary scan [string range $data $index end] cc len lenb
        set len [expr {$len & 0xFF}]
        incr index

        if {$len != 0} {
            if {[expr {$len & 0xc0}]} {
                binary scan [binary format cc [expr {$len & 0x3f}] [expr {$lenb & 0xff}]] S offset
                incr index
                lappend r [ReadName data $offset junk]
                set len 0
            } else {
                lappend r [string range $data $index [expr {$index + $len - 1}]]
                incr index $len
            }
        }
    }
    set used [expr {$index - $startindex}]
    return [join $r .]
}

proc ::dns::ReadString {datavar index usedvar} {
    upvar $datavar data
    upvar $usedvar used
    set startindex $index

    set r {}



    if {[binary scan [string range $data $index end] c len] == 1} {
	set len [expr {$len & 0xFF}]
	incr index

	if {$len != 0} {
	    set r [string range $data $index [expr {$index + $len - 1}]]
	    incr index $len
	}
    }
    set used [expr {$index - $startindex}]
    return $r
}

# -------------------------------------------------------------------------

# Support for finding the local nameservers
#







|
|












|




|











|





|
















|

<



>

>
|
|
|

|
|
|
|

<







1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228

1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243

1244
1245
1246
1247
1248
1249
1250
    upvar $datavar data
    upvar $usedvar used
    set r {}
    set used 0
    if {[binary scan $data @${index}cccc b1 b2 b3 b4]} {
        set used 4
        # This gets us an unsigned value.
        set r [expr {($b4 & 0xFF) + (($b3 & 0xFF) << 8) 
                     + (($b2 & 0xFF) << 16) + ($b1 << 24)}] 
    }
    return $r
}

proc ::dns::ReadUShort {datavar index usedvar} {
    upvar $datavar data
    upvar $usedvar used
    set r {}
    set used 0
    if {[binary scan [string range $data $index end] cc b1 b2]} {
        set used 2
        # This gets us an unsigned value.
        set r [expr {(($b2 & 0xff) + (($b1 & 0xff) << 8)) & 0xffff}] 
    }
    return $r
}

# Read off the NAME or QNAME element. This reads off each label in turn, 
# dereferencing pointer labels until we have finished. The length of data
# used is passed back using the usedvar variable.
#
proc ::dns::ReadName {datavar index usedvar} {
    upvar $datavar data
    upvar $usedvar used
    set startindex $index

    set r {}
    set len 1
    set max [string length $data]
    
    while {$len != 0 && $index < $max} {
        # Read the label length (and preread the pointer offset)
        binary scan [string range $data $index end] cc len lenb
        set len [expr {$len & 0xFF}]
        incr index
        
        if {$len != 0} {
            if {[expr {$len & 0xc0}]} {
                binary scan [binary format cc [expr {$len & 0x3f}] [expr {$lenb & 0xff}]] S offset
                incr index
                lappend r [ReadName data $offset junk]
                set len 0
            } else {
                lappend r [string range $data $index [expr {$index + $len - 1}]]
                incr index $len
            }
        }
    }
    set used [expr {$index - $startindex}]
    return [join $r .]
}

proc ::dns::ReadString {datavar index length} {
    upvar $datavar data

    set startindex $index

    set r {}
    set max [expr {$index + $length}]

    while {$index < $max} {
        binary scan [string range $data $index end] c len
        set len [expr {$len & 0xFF}]
        incr index

        if {$len != 0} {
            append r [string range $data $index [expr {$index + $len - 1}]]
            incr index $len
        }
    }

    return $r
}

# -------------------------------------------------------------------------

# Support for finding the local nameservers
#
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
                set parts(type) $type
            }
        }

        # Handle the nameserver specification
        if {[string match "//*" $uri]} {
            set uri [string range $uri 2 end]
            array set tmp [GetUPHP uri]
            set parts(nameserver) $tmp(host)
            set parts(port) $tmp(port)
        }

        # what's left is the query domain name.
        set parts(query) [string trimleft $uri /]
    }

    return [array get parts]
}








|



|







1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
                set parts(type) $type
            }
        }

        # Handle the nameserver specification
        if {[string match "//*" $uri]} {
            set uri [string range $uri 2 end]
            array set tmp [GetHostPort uri]
            set parts(nameserver) $tmp(host)
            set parts(port) $tmp(port)
        }
        
        # what's left is the query domain name.
        set parts(query) [string trimleft $uri /]
    }

    return [array get parts]
}

1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
    return "dns:$query"
}

# -------------------------------------------------------------------------

catch {dns::configure -nameserver [lindex [dns::nameservers] 0]}

package provide dns 1.5.0

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:







|





1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
    return "dns:$query"
}

# -------------------------------------------------------------------------

catch {dns::configure -nameserver [lindex [dns::nameservers] 0]}

package provide dns 1.3.5

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:

Changes to modules/dns/dns.test.

1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# dns.test - Copyright (C) 2002 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# Tests for the Tcllib dns package
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 2.0

testing {
    useLocal dns.tcl dns
}

# -------------------------------------------------------------------------
# Tests








>








|







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
# dns.test - Copyright (C) 2002 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# Tests for the Tcllib dns package
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# RCS: @(#) $Id: dns.test,v 1.6 2006/10/09 21:41:40 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

testing {
    useLocal dns.tcl dns
}

# -------------------------------------------------------------------------
# Tests

Changes to modules/dns/ip.tcl.

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
    if {[IPv4? $addr]} {
        set version 4
    } elseif {[IPv6? $addr]} {
        set version 6
    }
    return $version
}

proc ::ip::equal {lhs rhs} {
    foreach {LHS LM} [SplitIp $lhs] break
    foreach {RHS RM} [SplitIp $rhs] break
    if {[set version [version $LHS]] != [version $RHS]} {
        return -code error "type mismatch:\
            cannot compare different address types"
    }







|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
    if {[IPv4? $addr]} {
        set version 4
    } elseif {[IPv6? $addr]} {
        set version 6
    }
    return $version
}
        
proc ::ip::equal {lhs rhs} {
    foreach {LHS LM} [SplitIp $lhs] break
    foreach {RHS RM} [SplitIp $rhs] break
    if {[set version [version $LHS]] != [version $RHS]} {
        return -code error "type mismatch:\
            cannot compare different address types"
    }
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
	set subnet [intToString [nextNet $subnet $newmask]]
    }

    return $ret
}

# Returns an IP address prefix.
# For instance:
#  prefix 192.168.1.4/16 => 192.168.0.0
#  prefix fec0::4/16     => fec0:0:0:0:0:0:0:0
#  prefix fec0::4/ffff:: => fec0:0:0:0:0:0:0:0
#
proc ::ip::prefix {ip} {
    foreach {addr mask} [SplitIp $ip] break
    set version [version $addr]
    set addr [Normalize $addr $version]
    return [ToString [Mask$version $addr $mask]]
}

# Return the address type. For IPv4 this is one of private, reserved
# or normal
# For IPv6 it is one of site local, link local, multicast, unicast,
# unspecified or loopback.
proc ::ip::type {ip} {
    set version [version $ip]
    upvar [namespace current]::IPv${version}Ranges types
    set ip [prefix $ip]







|











|







299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
	set subnet [intToString [nextNet $subnet $newmask]]
    }

    return $ret
}

# Returns an IP address prefix.
# For instance: 
#  prefix 192.168.1.4/16 => 192.168.0.0
#  prefix fec0::4/16     => fec0:0:0:0:0:0:0:0
#  prefix fec0::4/ffff:: => fec0:0:0:0:0:0:0:0
#
proc ::ip::prefix {ip} {
    foreach {addr mask} [SplitIp $ip] break
    set version [version $addr]
    set addr [Normalize $addr $version]
    return [ToString [Mask$version $addr $mask]]
}

# Return the address type. For IPv4 this is one of private, reserved 
# or normal
# For IPv6 it is one of site local, link local, multicast, unicast,
# unspecified or loopback.
proc ::ip::type {ip} {
    set version [version $ip]
    upvar [namespace current]::IPv${version}Ranges types
    set ip [prefix $ip]
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
    binary scan $mask I4 Mask
    foreach A $Addr M $Mask {
        lappend r [expr {$A & $M}]
    }
    return [binary format I4 $r]
}



# A network address specification is an IPv4 address with an optional bitmask
# Split an address specification into a IPv4 address and a network bitmask.
# This doesn't validate the address portion.
# If a spec with no mask is provided then the mask will be 32
# (all bits significant).
# Masks may be either integer number of significant bits or dotted-quad







|







407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
    binary scan $mask I4 Mask
    foreach A $Addr M $Mask {
        lappend r [expr {$A & $M}]
    }
    return [binary format I4 $r]
}

        

# A network address specification is an IPv4 address with an optional bitmask
# Split an address specification into a IPv4 address and a network bitmask.
# This doesn't validate the address portion.
# If a spec with no mask is provided then the mask will be 32
# (all bits significant).
# Masks may be either integer number of significant bits or dotted-quad

Changes to modules/dns/ipMore.tcl.

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
#
# Usage:
#       package require ip
#       (The command are loaded from the regular package).
#
# Description:
#       A detailed description of the functionality provided by the library.
#
# Requirements:
#
# Variables:
#       namespace   ::ip
#
# Notes:
#       1.
#
# Keywords:
#
#
# Category:
#
#
# End of Header

package require msgcat

# Try to load various C based accelerator packages for two of the
# commands.







|











|
|







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
#
# Usage:
#       package require ip
#       (The command are loaded from the regular package).
#
# Description:
#       A detailed description of the functionality provided by the library.
#      
# Requirements:
#
# Variables:
#       namespace   ::ip
#
# Notes:
#       1.
#
# Keywords:
#
#
# Category: 
#       
#
# End of Header

package require msgcat

# Try to load various C based accelerator packages for two of the
# commands.
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#        <prefix>
#            string in the <ipaddr>/<mask> format
#
# Return Values:
#        <prefix> in native format {<hexip> <hexmask>}
#
# Description:
#
# Examples:
#   % ip::prefixToNative 1.1.1.0/24
#   0x01010100 0xffffff00
#
# Sample Input:
#
# Sample Output:
# Notes:
#   fixed bug in C extension that modified
#    calling context variable
# See Also:
#
# End of Header

proc ip::prefixToNativeTcl {prefix} {
    set plist {}







|








|







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#        <prefix>
#            string in the <ipaddr>/<mask> format
#
# Return Values:
#        <prefix> in native format {<hexip> <hexmask>}
#
# Description:
#       
# Examples:
#   % ip::prefixToNative 1.1.1.0/24
#   0x01010100 0xffffff00
#
# Sample Input:
#
# Sample Output:
# Notes:
#   fixed bug in C extension that modified 
#    calling context variable
# See Also:
#
# End of Header

proc ip::prefixToNativeTcl {prefix} {
    set plist {}
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# Purpose:
#        convert from native (hex) form to dotted form
#
# Synopsis:
#       nativeToPrefix <nativeList>|<native> [-ipv4]
#
# Arguments:
#        <nativeList>
#            list of native form ip addresses native form is:
#        <native>
#            tcllist in format {<hexip> <hexmask>}
#        -ipv4
#            the provided native format addresses are in ipv4 format (default)
#
# Return Values:
#        if nativeToPrefix is called with <native> a single (non-listified) address
#            is returned
#        if nativeToPrefix is called with a <nativeList> address list, then
#            a list of addresses is returned
#
#        return form is: <ipaddr>/<mask>
#
# Description:
#
# Examples:
#   % ip::nativeToPrefix {0x01010100 0xffffff00} -ipv4
#   1.1.1.0/24
#
# Sample Input:
#
# Sample Output:







|









|





|







158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# Purpose:
#        convert from native (hex) form to dotted form
#
# Synopsis:
#       nativeToPrefix <nativeList>|<native> [-ipv4]
#
# Arguments:
#        <nativeList> 
#            list of native form ip addresses native form is:
#        <native>
#            tcllist in format {<hexip> <hexmask>}
#        -ipv4
#            the provided native format addresses are in ipv4 format (default)
#
# Return Values:
#        if nativeToPrefix is called with <native> a single (non-listified) address
#            is returned
#        if nativeToPrefix is called with a <nativeList> address list, then 
#            a list of addresses is returned
#
#        return form is: <ipaddr>/<mask>
#
# Description:
#       
# Examples:
#   % ip::nativeToPrefix {0x01010100 0xffffff00} -ipv4
#   1.1.1.0/24
#
# Sample Input:
#
# Sample Output:
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
#        -ipv4
#            the provided integer addresses is ipv4 (default)
#
# Return Values:
#        ip address in dotted form
#
# Description:
#
# Examples:
#       ip::intToString 4294967295
#       255.255.255.255
#
# Sample Input:
#
# Sample Output:







|







242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
#        -ipv4
#            the provided integer addresses is ipv4 (default)
#
# Return Values:
#        ip address in dotted form
#
# Description:
#       
# Examples:
#       ip::intToString 4294967295
#       255.255.255.255
#
# Sample Input:
#
# Sample Output:
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
#        <ipaddr>
#            decimal dotted form ip address
#
# Return Values:
#        integer form of <ipaddr>
#
# Description:
#
# Examples:
#   % ::ip::toInteger 1.1.1.0
#   16843008
#
# Sample Input:
#
# Sample Output:







|







291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
#        <ipaddr>
#            decimal dotted form ip address
#
# Return Values:
#        integer form of <ipaddr>
#
# Description:
#       
# Examples:
#   % ::ip::toInteger 1.1.1.0
#   16843008
#
# Sample Input:
#
# Sample Output:
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
#        <ipaddr>
#            decimal dotted from ip address
#
# Return Values:
#        hex form of <ipaddr>
#
# Description:
#
# Examples:
#   % ::ip::toHex 1.1.1.0
#   0x01010100
#
# Sample Input:
#
# Sample Output:







|







331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
#        <ipaddr>
#            decimal dotted from ip address
#
# Return Values:
#        hex form of <ipaddr>
#
# Description:
#       
# Examples:
#   % ::ip::toHex 1.1.1.0
#   0x01010100
#
# Sample Input:
#
# Sample Output:
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
#        <mask>
#            mask in either dotted form or mask length form (255.255.255.0 or 24)
#
# Return Values:
#        integer form of mask
#
# Description:
#
# Examples:
#   ::ip::maskToInt 24
#   4294967040
#
#
# Sample Input:
#
# Sample Output:

# Notes:
#
# See Also:







|




|







371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
#        <mask>
#            mask in either dotted form or mask length form (255.255.255.0 or 24)
#
# Return Values:
#        integer form of mask
#
# Description:
#       
# Examples:
#   ::ip::maskToInt 24
#   4294967040
#
#   
# Sample Input:
#
# Sample Output:

# Notes:
#
# See Also:
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
#
# Arguments:
#        <prefix>
#            route in the form of <ipaddr>/<mask> or native form {<hexip> <hexmask>}
#        -ipv4
#            the provided native format addresses are in ipv4 format (default)
#            note: broadcast addresses are not valid in ipv6
#
#
# Return Values:
#        ipaddress of broadcast
#
# Description:
#
# Examples:
#   ::ip::broadcastAddress 1.1.1.0/24
#   1.1.1.255
#
#   ::ip::broadcastAddress {0x01010100 0xffffff00}
#   0x010101ff
#
# Sample Input:
#
# Sample Output:








|





|



|







415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
#
# Arguments:
#        <prefix>
#            route in the form of <ipaddr>/<mask> or native form {<hexip> <hexmask>}
#        -ipv4
#            the provided native format addresses are in ipv4 format (default)
#            note: broadcast addresses are not valid in ipv6
#            
#
# Return Values:
#        ipaddress of broadcast
#
# Description:
#       
# Examples:
#   ::ip::broadcastAddress 1.1.1.0/24
#   1.1.1.255
#   
#   ::ip::broadcastAddress {0x01010100 0xffffff00}
#   0x010101ff
#
# Sample Input:
#
# Sample Output:

456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
    if {[llength $prefix] == 2} {
	lassign $prefix net mask
    } else {
	set net [maskToInt [ip::prefix $prefix]]
	set mask [maskToInt [ip::mask $prefix]]
    }
    set ba [expr {$net  | ((~$mask)&0xffffffff)}]

    if {[llength $prefix]==2} {
	return [format "0x%08x" $ba]
    }
    return [ToString [binary format I $ba]]
}

##Procedure Header







|







456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
    if {[llength $prefix] == 2} {
	lassign $prefix net mask
    } else {
	set net [maskToInt [ip::prefix $prefix]]
	set mask [maskToInt [ip::mask $prefix]]
    }
    set ba [expr {$net  | ((~$mask)&0xffffffff)}]
    
    if {[llength $prefix]==2} {
	return [format "0x%08x" $ba]
    }
    return [ToString [binary format I $ba]]
}

##Procedure Header
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
#         -ipv4
#            the provided integer/hex format masks are ipv4 (default)
#
# Return Values:
#        prefix length
#
# Description:
#
# Examples:
#   ::ip::maskToLength 0xffffff00 -ipv4
#   24
#
#   % ::ip::maskToLength 255.255.255.0
#   24
#







|







487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
#         -ipv4
#            the provided integer/hex format masks are ipv4 (default)
#
# Return Values:
#        prefix length
#
# Description:
#       
# Examples:
#   ::ip::maskToLength 0xffffff00 -ipv4
#   24
#
#   % ::ip::maskToLength 255.255.255.0
#   24
#
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
		252 {incr prefix 6}
		248 {incr prefix 5}
		240 {incr prefix 4}
		224 {incr prefix 3}
		192 {incr prefix 2}
		128 {incr prefix 1}
		0   {}
		default {
		    return -code error [msgcat::mc "not an ip mask: %s" $mask]
		}
	    }
	    break
	}
	return $prefix
    }







|







536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
		252 {incr prefix 6}
		248 {incr prefix 5}
		240 {incr prefix 4}
		224 {incr prefix 3}
		192 {incr prefix 2}
		128 {incr prefix 1}
		0   {}
		default { 
		    return -code error [msgcat::mc "not an ip mask: %s" $mask]
		}
	    }
	    break
	}
	return $prefix
    }
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
#        converts mask length to dotted mask form
#
# Synopsis:
#       lengthToMask <maskLength> [-ipv4]
#
# Arguments:
#        <maskLength>
#            mask length
#        -ipv4
#            the provided mask length is ipv4 (default)
#
# Return Values:
#        mask in dotted form
#
# Description:
#
# Examples:
#   ::ip::lengthToMask 24
#   255.255.255.0
#
# Sample Input:
#
# Sample Output:







|

|





|







561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
#        converts mask length to dotted mask form
#
# Synopsis:
#       lengthToMask <maskLength> [-ipv4]
#
# Arguments:
#        <maskLength>
#            mask length   
#        -ipv4
#            the provided mask length is ipv4 (default)  
#
# Return Values:
#        mask in dotted form
#
# Description:
#       
# Examples:
#   ::ip::lengthToMask 24
#   255.255.255.0
#
# Sample Input:
#
# Sample Output:
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
#        -ipv4
#            the provided hex/integer addresses are in ipv4 format (default)
#
# Return Values:
#        ipaddress in same position in next network in hex
#
# Description:
#
# Examples:
#
# Sample Input:
#
# Sample Output:
# Notes:
#







|







623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
#        -ipv4
#            the provided hex/integer addresses are in ipv4 format (default)
#
# Return Values:
#        ipaddress in same position in next network in hex
#
# Description:
#       
# Examples:
#
# Sample Input:
#
# Sample Output:
# Notes:
#
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
	    -ipv4 {set args [lrange $args 1 end]}
	    default {
		set count [lindex $args 0]
		set args [lrange $args 1 end]
	    }
	}
    }
    if {![string is integer -strict $prefix]} {
	set prefix [toInteger $prefix]
    }
    if {![string is integer -strict $mask] || ($mask < 33 && $mask > 0)} {
	set mask [maskToInt $mask]
    }
    set prefix [expr {$prefix + ((($mask ^ 0xFFffFFff) + 1) * $count) }]
    return [format "0x%08x" $prefix]
}


##Procedure Header
# Copyright (c) 2004 Cisco Systems, Inc.







|




|







646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
	    -ipv4 {set args [lrange $args 1 end]}
	    default {
		set count [lindex $args 0]
		set args [lrange $args 1 end]
	    }
	}
    }
    if {![string is integer -strict $prefix]} { 
	set prefix [toInteger $prefix]
    }
    if {![string is integer -strict $mask] || ($mask < 33 && $mask > 0)} {
	set mask [maskToInt $mask]
    }    
    set prefix [expr {$prefix + ((($mask ^ 0xFFffFFff) + 1) * $count) }]
    return [format "0x%08x" $prefix]
}


##Procedure Header
# Copyright (c) 2004 Cisco Systems, Inc.
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
#        <prefixN>
#            in form <ipaddr>/<mask> prefixes to compare against
#
# Return Values:
#        1 if there is an overlap
#
# Description:
#
# Examples:
#        % ::ip::isOverlap 1.1.1.0/24 2.1.0.1/32
#        0
#
#        ::ip::isOverlap 1.1.1.0/24 2.1.0.1/32 1.1.1.1/32
#        1
# Sample Input:







|







679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
#        <prefixN>
#            in form <ipaddr>/<mask> prefixes to compare against
#
# Return Values:
#        1 if there is an overlap
#
# Description:
#       
# Examples:
#        % ::ip::isOverlap 1.1.1.0/24 2.1.0.1/32
#        0
#
#        ::ip::isOverlap 1.1.1.0/24 2.1.0.1/32 1.1.1.1/32
#        1
# Sample Input:
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
		set allList [list]
	    }
	    -inline {set inline 1}
	    -ipv4 {}
	}
    }
    set args [lassign [lrange $args end-2 end] ip1int mask1int prefixList]
    if {$inline} {
	set overLap [list]
    } else {
	set overLap 0
    }
    set count 0
    foreach prefix $prefixList {
	incr count







|







782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
		set allList [list]
	    }
	    -inline {set inline 1}
	    -ipv4 {}
	}
    }
    set args [lassign [lrange $args end-2 end] ip1int mask1int prefixList]
    if {$inline} { 
	set overLap [list]
    } else {
	set overLap 0
    }
    set count 0
    foreach prefix $prefixList {
	incr count
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
#
# Description:
#
# Examples:
#        % ::ip::ipToLayer2Multicast 224.0.0.2
#        01.00.5e.00.00.02
# Sample Input:
#
# Sample Output:
# Notes:
#
# See Also:
#
# End of Header








|







838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
#
# Description:
#
# Examples:
#        % ::ip::ipToLayer2Multicast 224.0.0.2
#        01.00.5e.00.00.02
# Sample Input:
#        
# Sample Output:
# Notes:
#
# See Also:
#
# End of Header

872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
#
# Arguments:
#        <prefix>
#            prefix is <ipaddr>/<masklen>
#        -exclude <list of prefixes>
#            list if ipprefixes that host should not be in
# Return Values:
#        ip address
#
# Description:
#
# Examples:
# %::ip::ipHostFromPrefix  1.1.1.5/24
# 1.1.1.1
#
# %::ip::ipHostFromPrefix  1.1.1.1/32
# 1.1.1.1
#
#
# Sample Input:
#
# Sample Output:
# Notes:
#
# See Also:
#
# End of Header








|












|







872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
#
# Arguments:
#        <prefix>
#            prefix is <ipaddr>/<masklen>
#        -exclude <list of prefixes>
#            list if ipprefixes that host should not be in
# Return Values:
#        ip address 
#
# Description:
#
# Examples:
# %::ip::ipHostFromPrefix  1.1.1.5/24
# 1.1.1.1
#
# %::ip::ipHostFromPrefix  1.1.1.1/32
# 1.1.1.1
#
#
# Sample Input:
#        
# Sample Output:
# Notes:
#
# See Also:
#
# End of Header

912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
    set format {-ipv4}
    # if we got here, then options were set
    if {[info exists opts(-exclude)]} {
	#basic algo is:
	# 1. throw away prefixes that are less specific that $prefix
	# 2. of remaining pfx, throw away prefixes that do not overlap
	# 3. run reducetoAggregates on specific nets
	# 4.

	# 1. convert to hex format
	set currHex [prefixToNative $prefix ]
	set exclHex [prefixToNative $opts(-exclude) ]
	# sort the prefixes by their mask, include the $prefix as a marker
	#  so we know from where to throw away prefixes
	set sortedPfx [lsort -integer -index 1 [concat [list $currHex]  $exclHex]]
	# throw away prefixes that are less specific than $prefix
	set specPfx [lrange $sortedPfx [expr {[lsearch -exact $sortedPfx $currHex] +1} ] end]

	#2. throw away non-overlapping prefixes
	set specPfx [isOverlapNative -all -inline \
			 [lindex $currHex 0 ] \
			 [lindex $currHex 1 ] \
			 $specPfx ]
	#3. run reduce aggregates
	set specPfx [reduceToAggregates $specPfx]

	#4 now have to pick an address that overlaps with $currHex but not with
	#   $specPfx
	# 4.1 find the largest prefix w/ most specific mask and go to the next net


	# current ats tcl does not allow this in one command, so
	#  for now just going to grab the last prefix (list is already sorted)
	set sPfx [lindex $specPfx end]
	set startPfx $sPfx
	# add currHex to specPfx
	set oChkPfx [concat $specPfx [list $currHex]]









|
|








|





|





|

|







912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
    set format {-ipv4}
    # if we got here, then options were set
    if {[info exists opts(-exclude)]} {
	#basic algo is:
	# 1. throw away prefixes that are less specific that $prefix
	# 2. of remaining pfx, throw away prefixes that do not overlap
	# 3. run reducetoAggregates on specific nets
	# 4. 
	
	# 1. convert to hex format
	set currHex [prefixToNative $prefix ]
	set exclHex [prefixToNative $opts(-exclude) ]
	# sort the prefixes by their mask, include the $prefix as a marker
	#  so we know from where to throw away prefixes
	set sortedPfx [lsort -integer -index 1 [concat [list $currHex]  $exclHex]]
	# throw away prefixes that are less specific than $prefix
	set specPfx [lrange $sortedPfx [expr {[lsearch -exact $sortedPfx $currHex] +1} ] end]
	
	#2. throw away non-overlapping prefixes
	set specPfx [isOverlapNative -all -inline \
			 [lindex $currHex 0 ] \
			 [lindex $currHex 1 ] \
			 $specPfx ]
	#3. run reduce aggregates 
	set specPfx [reduceToAggregates $specPfx]

	#4 now have to pick an address that overlaps with $currHex but not with
	#   $specPfx
	# 4.1 find the largest prefix w/ most specific mask and go to the next net
	

	# current ats tcl does not allow this in one command, so 
	#  for now just going to grab the last prefix (list is already sorted)
	set sPfx [lindex $specPfx end]
	set startPfx $sPfx
	# add currHex to specPfx
	set oChkPfx [concat $specPfx [list $currHex]]


1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
#
# Examples:
#
#  % ::ip::reduceToAggregates {1.1.1.0/24 1.1.0.0/8  2.1.1.0/24 1.1.1.1/32 }
#  1.0.0.0/8 2.1.1.0/24
#
# Sample Input:
#
# Sample Output:
# Notes:
#
# See Also:
#
# End of Header

proc ::ip::reduceToAggregates { prefixList } {
    #find out format of $prefixeList
    set dotConv 0
    if {[llength [lindex $prefixList 0]]==1} {
	#format is dotted form convert all prefixes to native form
	set prefixList [ip::prefixToNative $prefixList]
	set dotConv 1
    }

    set nonOverLapping $prefixList
    while {1==1} {
	set overlapFound 0
	set remaining $nonOverLapping
	set nonOverLapping {}
	while {[llength $remaining]} {
	    set current [lvarpop remaining]
	    set overLap [ip::isOverlapNative [lindex $current 0] [lindex $current 1] $remaining]
	    if {$overLap} {
		#there was a overlap find out which prefix has a the smaller mask, and keep that one
		if {[lindex $current 1] > [lindex [lindex $remaining [expr {$overLap -1}]] 1]} {
		    #current has more restrictive mask, throw that prefix away
		    # keep other prefix
		    lappend nonOverLapping [lindex $remaining [expr {$overLap -1}]]
		} else {
		    lappend nonOverLapping $current
		}
		lvarpop remaining [expr {$overLap -1}]
		set overlapFound 1
	    } else {
		#no overlap, keep all prefixes, don't touch the stuff in
		# remaining, it is needed for other overlap checking
		lappend nonOverLapping $current
	    }
	}
	if {$overlapFound==0} {break}
    }
    if {$dotConv} {return [nativeToPrefix $nonOverLapping]}







|















|




















|







1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
#
# Examples:
#
#  % ::ip::reduceToAggregates {1.1.1.0/24 1.1.0.0/8  2.1.1.0/24 1.1.1.1/32 }
#  1.0.0.0/8 2.1.1.0/24
#
# Sample Input:
#        
# Sample Output:
# Notes:
#
# See Also:
#
# End of Header

proc ::ip::reduceToAggregates { prefixList } {
    #find out format of $prefixeList
    set dotConv 0
    if {[llength [lindex $prefixList 0]]==1} {
	#format is dotted form convert all prefixes to native form
	set prefixList [ip::prefixToNative $prefixList]
	set dotConv 1
    }
    
    set nonOverLapping $prefixList
    while {1==1} {
	set overlapFound 0
	set remaining $nonOverLapping
	set nonOverLapping {}
	while {[llength $remaining]} {
	    set current [lvarpop remaining]
	    set overLap [ip::isOverlapNative [lindex $current 0] [lindex $current 1] $remaining]
	    if {$overLap} {
		#there was a overlap find out which prefix has a the smaller mask, and keep that one
		if {[lindex $current 1] > [lindex [lindex $remaining [expr {$overLap -1}]] 1]} {
		    #current has more restrictive mask, throw that prefix away
		    # keep other prefix
		    lappend nonOverLapping [lindex $remaining [expr {$overLap -1}]]
		} else {
		    lappend nonOverLapping $current
		}
		lvarpop remaining [expr {$overLap -1}]
		set overlapFound 1
	    } else {
		#no overlap, keep all prefixes, don't touch the stuff in 
		# remaining, it is needed for other overlap checking
		lappend nonOverLapping $current
	    }
	}
	if {$overlapFound==0} {break}
    }
    if {$dotConv} {return [nativeToPrefix $nonOverLapping]}
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
# Description:
#
# Examples:
#        % ::ip::longestPrefixMatch 1.1.1.1 {1.1.1.0/24 1.0.0.0/8  2.1.1.0/24 1.1.1.0/28 }
#        1.1.1.0/28
#
# Sample Input:
#
# Sample Output:
# Notes:
#
# See Also:
#
# End of Header








|







1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
# Description:
#
# Examples:
#        % ::ip::longestPrefixMatch 1.1.1.1 {1.1.1.0/24 1.0.0.0/8  2.1.1.0/24 1.1.1.0/28 }
#        1.1.1.0/28
#
# Sample Input:
#        
# Sample Output:
# Notes:
#
# See Also:
#
# End of Header

1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
# Description:
#
# Examples:
#        % lsort -command ip::cmpDotIP {1.0.0.0 2.2.0.0 128.0.0.0 3.3.3.3}
#        1.0.0.0 2.2.0.0 3.3.3.3 128.0.0.0
#
# Sample Input:
#
# Sample Output:
# Notes:
#
# See Also:
#
# End of Header
#            ip address in <ipprefix> format, dotted form, or integer form







|







1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
# Description:
#
# Examples:
#        % lsort -command ip::cmpDotIP {1.0.0.0 2.2.0.0 128.0.0.0 3.3.3.3}
#        1.0.0.0 2.2.0.0 3.3.3.3 128.0.0.0
#
# Sample Input:
#        
# Sample Output:
# Notes:
#
# See Also:
#
# End of Header
#            ip address in <ipprefix> format, dotted form, or integer form
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
#        <ipaddr2>
#            ip address
#
# Return Values:
#        integer distance (addr2 - addr1)
#
# Description:
#
# Examples:
#   % ::ip::distance 1.1.1.0 1.1.1.5
#   5
#
# Sample Input:
#
# Sample Output:







|







1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
#        <ipaddr2>
#            ip address
#
# Return Values:
#        integer distance (addr2 - addr1)
#
# Description:
#       
# Examples:
#   % ::ip::distance 1.1.1.0 1.1.1.5
#   5
#
# Sample Input:
#
# Sample Output:
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
#            The integer to increment the address by.
#            Default is 1.
#
# Return Values:
#        The increment ip address.
#
# Description:
#
# Examples:
#   % ::ip::nextIp 1.1.1.0 5
#   1.1.1.5
#
# Sample Input:
#
# Sample Output:

proc ::ip::nextIp {ip {offset 1}} {







|

|







1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
#            The integer to increment the address by.
#            Default is 1.
#
# Return Values:
#        The increment ip address.
#
# Description:
#       
# Examples:
#   % ::ip::nextIp 1.1.1.0 5 
#   1.1.1.5
#
# Sample Input:
#
# Sample Output:

proc ::ip::nextIp {ip {offset 1}} {

Changes to modules/dns/ipMore.test.

125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
    } -constraints {
    } -cleanup {
    } -body {
        ip::nativeToPrefix {{0x01010100 0xffffff00} {0x01000000 0xff000000} {0x02010100 0xffffff00} {0x01010101 0xffffffff}} -ipv4
    } -result {1.1.1.0/24 1.0.0.0/8 2.1.1.0/24 1.1.1.1/32}

    ::tcltest::test ip::nativeToPrefix-3 {
        0 test
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        ip::nativeToPrefix {0x0 0x0} -ipv4
    } -result {0.0.0.0/0}








|







125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
    } -constraints {
    } -cleanup {
    } -body {
        ip::nativeToPrefix {{0x01010100 0xffffff00} {0x01000000 0xff000000} {0x02010100 0xffffff00} {0x01010101 0xffffffff}} -ipv4
    } -result {1.1.1.0/24 1.0.0.0/8 2.1.1.0/24 1.1.1.1/32}

    ::tcltest::test ip::nativeToPrefix-3 {
        0 test 
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        ip::nativeToPrefix {0x0 0x0} -ipv4
    } -result {0.0.0.0/0}

241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

    ::tcltest::test ::ip::lengthToMask-2 {
        dotted form, default is ipv4
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        ::ip::lengthToMask 24
    } -result {255.255.255.0}

    ::tcltest::test ::ip:maskToInt-1 {
        integer form
    } -setup {
    } -constraints {
    } -cleanup {







|







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

    ::tcltest::test ::ip::lengthToMask-2 {
        dotted form, default is ipv4
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        ::ip::lengthToMask 24 
    } -result {255.255.255.0}

    ::tcltest::test ::ip:maskToInt-1 {
        integer form
    } -setup {
    } -constraints {
    } -cleanup {
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375

    ::tcltest::test ::ip:nextNet-8 {
        1.1.1.1/32 -> 1.1.29.0 by 2, default is ipv4
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        ip::nextNet 0x01010101 [ip::maskToInt 32] 2
    } -result {0x01010103}

    ::tcltest::test ::ip:isOverlap-1 {
        no overlap test
    } -setup {
    } -constraints {
    } -cleanup {







|







361
362
363
364
365
366
367
368
369
370
371
372
373
374
375

    ::tcltest::test ::ip:nextNet-8 {
        1.1.1.1/32 -> 1.1.29.0 by 2, default is ipv4
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        ip::nextNet 0x01010101 [ip::maskToInt 32] 2 
    } -result {0x01010103}

    ::tcltest::test ::ip:isOverlap-1 {
        no overlap test
    } -setup {
    } -constraints {
    } -cleanup {
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
    ::tcltest::test ::ip:isOverlapNativeTcl-2 {
        yes overlap test
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl  -ipv4 0x01010100 0xffffff00 {{0x02010001 0xffffffff} {0x01010101 0xffffffff}}]
        expr $a > 0
    } -result {1}

    ::tcltest::test ::ip:isOverlapNativeTcl-3 {
        yes overlap test
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl  -ipv4 0x01010100 0xffffff00 {{0x02010001 0xffffffff} {0x01010101 0xffffffff}}]
    } -result {2}

    ::tcltest::test ::ip:isOverlapNativeTcl-4 {
        -all overlap test
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl  -ipv4 -all 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff}
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {2 3}

    ::tcltest::test ::ip:isOverlapNativeTcl-5 {
        -all overlap test with -inline
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl  -ipv4 -all -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff}
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff} {0x01010102 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativeTcl-6 {
        test with -inline
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl -ipv4 -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff}
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativeTcl-7 {
        test with -all -inline one element return
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl -ipv4 -all -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff}
            {0x01010101 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativeTcl-8 {
        test with -inline
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl -ipv4 -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff}
        }]
    } -result {}

    ::tcltest::test ::ip:isOverlapNativec-1 {
        no overlap test
    } -setup {
    } -constraints {







|


















|












|












|












|











|







421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
    ::tcltest::test ::ip:isOverlapNativeTcl-2 {
        yes overlap test
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl  -ipv4 0x01010100 0xffffff00 {{0x02010001 0xffffffff} {0x01010101 0xffffffff}}]
        expr $a > 0 
    } -result {1}

    ::tcltest::test ::ip:isOverlapNativeTcl-3 {
        yes overlap test
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl  -ipv4 0x01010100 0xffffff00 {{0x02010001 0xffffffff} {0x01010101 0xffffffff}}]
    } -result {2}

    ::tcltest::test ::ip:isOverlapNativeTcl-4 {
        -all overlap test
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl  -ipv4 -all 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff} 
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {2 3}

    ::tcltest::test ::ip:isOverlapNativeTcl-5 {
        -all overlap test with -inline
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl  -ipv4 -all -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff} 
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff} {0x01010102 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativeTcl-6 {
        test with -inline
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl -ipv4 -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff} 
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativeTcl-7 {
        test with -all -inline one element return
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl -ipv4 -all -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff} 
            {0x01010101 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativeTcl-8 {
        test with -inline
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativeTcl -ipv4 -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff} 
        }]
    } -result {}

    ::tcltest::test ::ip:isOverlapNativec-1 {
        no overlap test
    } -setup {
    } -constraints {
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
        -all overlap test
    } -setup {
    } -constraints {
        Cextension
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativec -ipv4  -all 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff}
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {2 3}

    ::tcltest::test ::ip:isOverlapNativec-5 {
        -all overlap test with -inline
    } -setup {
    } -constraints {
        Cextension
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativec -ipv4 -all -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff}
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff} {0x01010102 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativec-6 {
        test with -inline
    } -setup {
    } -constraints {
        Cextension
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativec -ipv4 -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff}
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativec-7 {
        test with -all -inline one element return
    } -setup {
    } -constraints {
        Cextension
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativec -ipv4 -all -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff}
            {0x01010101 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativec-8 {
        test with -inline with not overlaps, returns nothing
    } -setup {
    } -constraints {
        Cextension
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativec -ipv4  -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff}
        }]
    } -result {}



    ::tcltest::test ::ip:ipToLayer2Multicast-1 {
    } -setup {







|













|













|













|












|







535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
        -all overlap test
    } -setup {
    } -constraints {
        Cextension
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativec -ipv4  -all 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff} 
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {2 3}

    ::tcltest::test ::ip:isOverlapNativec-5 {
        -all overlap test with -inline
    } -setup {
    } -constraints {
        Cextension
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativec -ipv4 -all -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff} 
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff} {0x01010102 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativec-6 {
        test with -inline
    } -setup {
    } -constraints {
        Cextension
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativec -ipv4 -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff} 
            {0x01010101 0xffffffff}
            {0x01010102 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativec-7 {
        test with -all -inline one element return
    } -setup {
    } -constraints {
        Cextension
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativec -ipv4 -all -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff} 
            {0x01010101 0xffffffff}
        }]
    } -result {{0x01010101 0xffffffff}}

    ::tcltest::test ::ip:isOverlapNativec-8 {
        test with -inline with not overlaps, returns nothing
    } -setup {
    } -constraints {
        Cextension
    } -cleanup {
    } -body {
        set a [::ip::isOverlapNativec -ipv4  -inline 0x01010100 0xffffff00 {
            {0x02010001 0xffffffff} 
        }]
    } -result {}



    ::tcltest::test ::ip:ipToLayer2Multicast-1 {
    } -setup {
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
        unset testPrefix
    } -body {
        set testPrefix 1.1.1.0/24
        set exlList {
            1.1.1.18/32
            1.1.1.13/32
            1.1.1.17/32
            2.1.1.0/24
            1.1.0.0/16
            1.1.1.12/30
            1.1.1.4/30
        }
        set x [::ip::ipHostFromPrefix  $testPrefix -exclude $exlList ]
        ip::longestPrefixMatch $x [concat $exlList [list $testPrefix]] -ipv4
    } -result {1.1.1.0/24}

    ::tcltest::test ::ip:reduceToAggregates {
    } -setup {







|
|

|







633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
        unset testPrefix
    } -body {
        set testPrefix 1.1.1.0/24
        set exlList {
            1.1.1.18/32
            1.1.1.13/32
            1.1.1.17/32
            2.1.1.0/24 
            1.1.0.0/16 
            1.1.1.12/30
            1.1.1.4/30 
        }
        set x [::ip::ipHostFromPrefix  $testPrefix -exclude $exlList ]
        ip::longestPrefixMatch $x [concat $exlList [list $testPrefix]] -ipv4
    } -result {1.1.1.0/24}

    ::tcltest::test ::ip:reduceToAggregates {
    } -setup {
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
        unset x
        unset y
    } -body {
        set x 128.0.0.2
        set y {1.0.0.0/8 2.2.0.0/16 128.0.0.0/16 3.3.3.3/32}
        ::ip::longestPrefixMatch $x $y -ipv4
        # there was a problem when using varibles, it looked like
        # tcl was modifying the original variables in an
        # upvar fashion
        ::ip::longestPrefixMatch $x $y -ipv4
    } -result {128.0.0.0/16}

    ::tcltest::test ::ip:longestPrefixMatch-5 {
        check where the match list is only a single prefix (non-match case)
    } -setup {







|







685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
        unset x
        unset y
    } -body {
        set x 128.0.0.2
        set y {1.0.0.0/8 2.2.0.0/16 128.0.0.0/16 3.3.3.3/32}
        ::ip::longestPrefixMatch $x $y -ipv4
        # there was a problem when using varibles, it looked like
        # tcl was modifying the original variables in an 
        # upvar fashion
        ::ip::longestPrefixMatch $x $y -ipv4
    } -result {128.0.0.0/16}

    ::tcltest::test ::ip:longestPrefixMatch-5 {
        check where the match list is only a single prefix (non-match case)
    } -setup {
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
    } -constraints {
    } -cleanup {
    } -body {
        ::ip::longestPrefixMatch 128.0.0.2 {128.0.0.0/8} -ipv4
    } -result {128.0.0.0/8}

    ::tcltest::test ::ip:cmpDotIP-1 {
        test sorting of cmpDotIP
    } -setup {
        set iplist {1.0.0.0 2.2.0.0 128.0.0.0 3.3.3.3}
    } -constraints {
    } -cleanup {
        unset iplist
    } -body {
        set a [lsort -command ip::cmpDotIP $iplist]







|







709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
    } -constraints {
    } -cleanup {
    } -body {
        ::ip::longestPrefixMatch 128.0.0.2 {128.0.0.0/8} -ipv4
    } -result {128.0.0.0/8}

    ::tcltest::test ::ip:cmpDotIP-1 {
        test sorting of cmpDotIP 
    } -setup {
        set iplist {1.0.0.0 2.2.0.0 128.0.0.0 3.3.3.3}
    } -constraints {
    } -cleanup {
        unset iplist
    } -body {
        set a [lsort -command ip::cmpDotIP $iplist]

Changes to modules/dns/ipMoreC.tcl.

1
2
3
4
5
6
7
8
9
# Skip this for window and a specific version of Solaris
#
# This could do with an explanation -- why are we avoiding these platforms
# and perhaps using critcl's platform::platform command might be better?
#
if {[string equal $::tcl_platform(platform) windows] ||
    ([string equal $::tcl_platform(os)      SunOS] &&
     [string equal $::tcl_platform(osVersion) 5.6])
} {

|







1
2
3
4
5
6
7
8
9
# Skip this for window and a specific version of Solaris
# 
# This could do with an explanation -- why are we avoiding these platforms
# and perhaps using critcl's platform::platform command might be better?
#
if {[string equal $::tcl_platform(platform) windows] ||
    ([string equal $::tcl_platform(os)      SunOS] &&
     [string equal $::tcl_platform(osVersion) 5.6])
} {
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
#include <tcl.h>
#include <inttypes.h>
#include <arpa/inet.h>
#include <string.h>
#include <sys/socket.h>
}

critcl::ccommand prefixToNativec {clientData interp objc objv} {
    int elemLen, maskLen, ipLen, mask;
	int rval,convertListc,i;
	Tcl_Obj **convertListv;
	Tcl_Obj *listPtr,*returnPtr, *addrList;
	char *stringIP, *slashPos, *stringMask;
	char v4HEX[11];

	uint32_t inaddr;
	listPtr = NULL;

	/* printf ("\n in prefixToNativeC"); */
	/* printf ("\n objc = %d",objc); */

	if (objc != 2) {
		Tcl_WrongNumArgs(interp, 1, objv, "<ipaddress>/<mask>");
		return TCL_ERROR;
	}


	if (Tcl_ListObjGetElements (interp, objv[1],
								&convertListc, &convertListv) != TCL_OK) {
		return TCL_ERROR;
	}
	returnPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
	for (i = 0; i < convertListc; i++) {
		/*  need to create a duplicate here because when we modify */
		/*  the stringIP it'll mess up the original in the calling */







|






|












|







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
#include <tcl.h>
#include <inttypes.h>
#include <arpa/inet.h>
#include <string.h>
#include <sys/socket.h>
}

critcl::ccommand prefixToNativec {clientData interp objc objv} { 
    int elemLen, maskLen, ipLen, mask;
	int rval,convertListc,i;
	Tcl_Obj **convertListv;
	Tcl_Obj *listPtr,*returnPtr, *addrList;
	char *stringIP, *slashPos, *stringMask;
	char v4HEX[11];
	
	uint32_t inaddr;
	listPtr = NULL;

	/* printf ("\n in prefixToNativeC"); */
	/* printf ("\n objc = %d",objc); */

	if (objc != 2) {
		Tcl_WrongNumArgs(interp, 1, objv, "<ipaddress>/<mask>");
		return TCL_ERROR;
	}


	if (Tcl_ListObjGetElements (interp, objv[1], 
								&convertListc, &convertListv) != TCL_OK) {
		return TCL_ERROR;
	}
	returnPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
	for (i = 0; i < convertListc; i++) {
		/*  need to create a duplicate here because when we modify */
		/*  the stringIP it'll mess up the original in the calling */
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
			if (maskLen < 3) {
				mask = atoi(stringMask);
				mask = (0xFFFFFFFF << (32 - mask)) & 0xFFFFFFFF;
			} else {
				/* mask is in dotted form */
				if ((rval = inet_pton(AF_INET,stringMask,&mask)) < 1 ) {
					Tcl_AddErrorInfo(interp, "\n    bad format encountered in mask conversion");
					return TCL_ERROR;
				}
				mask = htonl(mask);
			}
			ipLen = (uintptr_t)slashPos  - (uintptr_t)stringIP;
			/* divide the string into ip and mask portion */
			*slashPos = '\0';
			/* printf("\n %d %d %d %d", (uintptr_t)stringMask, maskLen, (uintptr_t)stringIP, ipLen); */
		}
		if ( (rval = inet_pton(AF_INET,stringIP,&inaddr)) < 1) {
			Tcl_AddErrorInfo(interp,
							 "\n    bad format encountered in ip conversion");
			return TCL_ERROR;
		};
		inaddr = htonl(inaddr);
		/* apply the mask the to the ip portion, just to make sure  */
		/*  what we return is cleaned up */
		inaddr = inaddr & mask;
		sprintf(v4HEX,"0x%08X",inaddr);
		/* printf ("\n\n ### %s",v4HEX); */
		Tcl_ListObjAppendElement(interp, listPtr,
								 Tcl_NewStringObj(v4HEX,-1));
		sprintf(v4HEX,"0x%08X",mask);
		Tcl_ListObjAppendElement(interp, listPtr,
								 Tcl_NewStringObj(v4HEX,-1));
		Tcl_ListObjAppendElement(interp, returnPtr, listPtr);
		Tcl_DecrRefCount(addrList);
	}

	if (convertListc==1) {
		Tcl_SetObjResult(interp,listPtr);
	} else {
		Tcl_SetObjResult(interp,returnPtr);
	}

	return TCL_OK;
}

critcl::ccommand isOverlapNativec {clientData interp objc objv} {
        int i;
        unsigned int ipaddr,ipMask, mask1mask2;
        unsigned int ipaddr2,ipMask2;
        int compareListc,comparePrefixMaskc;
        int allSet,inlineSet,index;
        Tcl_Obj **compareListv,**comparePrefixMaskv, *listPtr;
        Tcl_Obj *result;
    static CONST char *options[] = {







|









|

















|





|




|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
			if (maskLen < 3) {
				mask = atoi(stringMask);
				mask = (0xFFFFFFFF << (32 - mask)) & 0xFFFFFFFF;
			} else {
				/* mask is in dotted form */
				if ((rval = inet_pton(AF_INET,stringMask,&mask)) < 1 ) {
					Tcl_AddErrorInfo(interp, "\n    bad format encountered in mask conversion");
					return TCL_ERROR;	
				}
				mask = htonl(mask);
			}
			ipLen = (uintptr_t)slashPos  - (uintptr_t)stringIP;
			/* divide the string into ip and mask portion */
			*slashPos = '\0';
			/* printf("\n %d %d %d %d", (uintptr_t)stringMask, maskLen, (uintptr_t)stringIP, ipLen); */
		}
		if ( (rval = inet_pton(AF_INET,stringIP,&inaddr)) < 1) {
			Tcl_AddErrorInfo(interp, 
							 "\n    bad format encountered in ip conversion");
			return TCL_ERROR;
		};
		inaddr = htonl(inaddr);
		/* apply the mask the to the ip portion, just to make sure  */
		/*  what we return is cleaned up */
		inaddr = inaddr & mask;
		sprintf(v4HEX,"0x%08X",inaddr);
		/* printf ("\n\n ### %s",v4HEX); */
		Tcl_ListObjAppendElement(interp, listPtr,
								 Tcl_NewStringObj(v4HEX,-1));
		sprintf(v4HEX,"0x%08X",mask);
		Tcl_ListObjAppendElement(interp, listPtr,
								 Tcl_NewStringObj(v4HEX,-1));
		Tcl_ListObjAppendElement(interp, returnPtr, listPtr);
		Tcl_DecrRefCount(addrList);
	}
	
	if (convertListc==1) {
		Tcl_SetObjResult(interp,listPtr);
	} else {
		Tcl_SetObjResult(interp,returnPtr);
	}
	
	return TCL_OK;
}

critcl::ccommand isOverlapNativec {clientData interp objc objv} {
        int i; 
        unsigned int ipaddr,ipMask, mask1mask2;
        unsigned int ipaddr2,ipMask2;
        int compareListc,comparePrefixMaskc;
        int allSet,inlineSet,index;
        Tcl_Obj **compareListv,**comparePrefixMaskv, *listPtr;
        Tcl_Obj *result;
    static CONST char *options[] = {
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

        if (allSet || inlineSet) {
                listPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
        }

        for (i = 0; i < compareListc; i++) {
					    /* split the ipaddr2 and ipmask2  */
                if (Tcl_ListObjGetElements (interp,
					    compareListv[i],
					    &comparePrefixMaskc,
					    &comparePrefixMaskv) != TCL_OK) {
		    return TCL_ERROR;
                }
                if (comparePrefixMaskc != 2) {
		    Tcl_AddErrorInfo(interp,"need format {{<ipaddr> <mask>} {<ipad..}}");
                        return TCL_ERROR;
                }







|
|
|







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

        if (allSet || inlineSet) {
                listPtr = Tcl_NewListObj(0, (Tcl_Obj **) NULL);
        }

        for (i = 0; i < compareListc; i++) {
					    /* split the ipaddr2 and ipmask2  */
                if (Tcl_ListObjGetElements (interp, 
					    compareListv[i], 
					    &comparePrefixMaskc, 
					    &comparePrefixMaskv) != TCL_OK) {
		    return TCL_ERROR;
                }
                if (comparePrefixMaskc != 2) {
		    Tcl_AddErrorInfo(interp,"need format {{<ipaddr> <mask>} {<ipad..}}");
                        return TCL_ERROR;
                }

Changes to modules/dns/msgs/en.msg.

1
2
3
4
5
6
7
8
# -*- tcl -*-
package require    msgcat
namespace import ::msgcat::*

mcset en "option %s not supported"          "option %s not supported"
mcset en "option %s not supported"	    "option %s not supported"
mcset en "not an ip mask: %s"		    "not an ip mask: %s"
mcset en "ip host could not be found in %s" "ip host could not be found in %s"




|
|
|

1
2
3
4
5
6
7
8
# -*- tcl -*-
package require    msgcat
namespace import ::msgcat::*

mcset en "option %s not supported"          "option %s not supported"	   
mcset en "option %s not supported"	    "option %s not supported"	   
mcset en "not an ip mask: %s"		    "not an ip mask: %s"		   
mcset en "ip host could not be found in %s" "ip host could not be found in %s"

Changes to modules/dns/pkgIndex.tcl.

1
2


3
4
5
6
7
# pkgIndex.tcl -



if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded dns    1.5.0 [list source [file join $dir dns.tcl]]
package ifneeded resolv 1.0.3 [list source [file join $dir resolv.tcl]]
package ifneeded ip     1.4   [list source [file join $dir ip.tcl]]
package ifneeded spf    1.1.1 [list source [file join $dir spf.tcl]]

|
>
>

|



1
2
3
4
5
6
7
8
9
# pkgIndex.tcl -
#
# $Id: pkgIndex.tcl,v 1.21 2010/08/16 17:35:18 andreas_kupries Exp $

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded dns    1.3.5 [list source [file join $dir dns.tcl]]
package ifneeded resolv 1.0.3 [list source [file join $dir resolv.tcl]]
package ifneeded ip     1.4   [list source [file join $dir ip.tcl]]
package ifneeded spf    1.1.1 [list source [file join $dir spf.tcl]]

Changes to modules/dns/resolv.tcl.

220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
    set t [::dns::resolve $hostname -server $R(dns)]
    ::dns::wait $t;                       # wait with event processing
    set status [dns::status $t]
    if {$status == "ok"} {
        set ip [lindex [::dns::address $t] 0]
        ::dns::cleanup $t
    } elseif {$status == "error"
              && [::dns::errorcode $t] == 3
              && $R(retries) < [llength $R(search)]} {
        ::dns::cleanup $t
        set suffix [lindex $R(search) $R(retries)]
        incr R(retries)
        set new [lindex [split $hostname .] 0].[string trim $suffix .]
        set ip [Resolve $new]
    } else {







|







220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
    set t [::dns::resolve $hostname -server $R(dns)]
    ::dns::wait $t;                       # wait with event processing
    set status [dns::status $t]
    if {$status == "ok"} {
        set ip [lindex [::dns::address $t] 0]
        ::dns::cleanup $t
    } elseif {$status == "error"
              && [::dns::errorcode $t] == 3 
              && $R(retries) < [llength $R(search)]} {
        ::dns::cleanup $t
        set suffix [lindex $R(search) $R(retries)]
        incr R(retries)
        set new [lindex [split $hostname .] 0].[string trim $suffix .]
        set ip [Resolve $new]
    } else {

Changes to modules/dns/spf.tcl.

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
namespace eval spf {
    namespace export spf

    variable uid
    if {![info exists uid]} {set uid 0}

    variable log
    if {![info exists log]} {
        set log [logger::init spf]
        ${log}::setlevel warn
        proc ${log}::stdoutcmd {level text} {
            variable service
            puts "\[[clock format [clock seconds] -format {%H:%M:%S}]\
                $service $level\] $text"
        }







|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
namespace eval spf {
    namespace export spf

    variable uid
    if {![info exists uid]} {set uid 0}

    variable log
    if {![info exists log]} { 
        set log [logger::init spf]
        ${log}::setlevel warn
        proc ${log}::stdoutcmd {level text} {
            variable service
            puts "\[[clock format [clock seconds] -format {%H:%M:%S}]\
                $service $level\] $text"
        }
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
                set result unknown
                break
            }
        } else {
            set r [catch {::spf::_$cmd $ip $domain $sender $param} res]
            if {$r} {
                if {$r == 2} {return $res};# deal with return -code return
                if {[string equal $res "none"]
                    || [string equal $res "error"]
                    || [string equal $res "unknown"]} {
                    return $res
                }
                return -code error "error in \"$cmd\": $res"
            }
            if {$res} { set result $prefix }
        }

        ${log}::debug "$prefix $cmd\($param) -> $result"
        if {[string equal $result "+"]} break
    }

    return $result
}

proc ::spf::loglevel {level} {
    variable log
    ${log}::setlevel $level
}







|





|


|



|







113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
                set result unknown
                break
            }
        } else {
            set r [catch {::spf::_$cmd $ip $domain $sender $param} res]
            if {$r} {
                if {$r == 2} {return $res};# deal with return -code return
                if {[string equal $res "none"] 
                    || [string equal $res "error"]
                    || [string equal $res "unknown"]} {
                    return $res
                }
                return -code error "error in \"$cmd\": $res"
            }            
            if {$res} { set result $prefix }
        }
        
        ${log}::debug "$prefix $cmd\($param) -> $result"
        if {[string equal $result "+"]} break
    }
    
    return $result
}

proc ::spf::loglevel {level} {
    variable log
    ${log}::setlevel $level
}
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
    set r ?
    set new_domain [Expand [string range $param 1 end] $ip $domain $sender]
    if {[lsearch $Seen $new_domain] == -1} {
        lappend Seen $new_domain
        set spf [SPF $new_domain]
        if {[string equal $spf none]} {
            return $spf
        }
        set r [Spf $ip $new_domain $sender $spf]
    }
    return [string equal $r "+"]
}

# 4.4:	This mechanism matches if <ip> is one of the target's
#	IP addresses.







|







174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
    set r ?
    set new_domain [Expand [string range $param 1 end] $ip $domain $sender]
    if {[lsearch $Seen $new_domain] == -1} {
        lappend Seen $new_domain
        set spf [SPF $new_domain]
        if {[string equal $spf none]} {
            return $spf
        } 
        set r [Spf $ip $new_domain $sender $spf]
    }
    return [string equal $r "+"]
}

# 4.4:	This mechanism matches if <ip> is one of the target's
#	IP addresses.
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
                if {[llength $addr] < 2} {
                    set res $sender
                } else {
                    set res [lindex $addr 1]
                }
            }
            h - d { set res $domain }
            i {
                set res [ip::normalize $ip]
                if {[ip::is ipv6 $res]} {
                    # Convert 0000:0001 to 0.1
                    set t {}
                    binary scan [ip::Normalize $ip 6] c* octets
                    foreach octet $octets {
                        set hi [expr {($octet & 0xF0) >> 4}]
                        set lo [expr {$octet & 0x0F}]
                        lappend t [format %x $hi] [format %x $lo]
                    }
                    set res [join $t .]
                }
            }
            v {
                if {[ip::is ipv6 $ip]} {
                    set res ip6
                } else {
                    set res "in-addr"
                }
            }
            c {
                set res [ip::normalize $ip]
                if {[ip::is ipv6 $res]} {
                    set res [ip::contract $res]
                }
            }
            r {
                set s [socket -server {} -myaddr [info host] 0]
                set res [lindex [fconfigure $s -sockname] 1]
                close $s
            }
            t { set res [clock seconds] }
        }
        if {$T != {} || $R || $D != {}} {







|













|






|





|







380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
                if {[llength $addr] < 2} {
                    set res $sender
                } else {
                    set res [lindex $addr 1]
                }
            }
            h - d { set res $domain }
            i { 
                set res [ip::normalize $ip]
                if {[ip::is ipv6 $res]} {
                    # Convert 0000:0001 to 0.1
                    set t {}
                    binary scan [ip::Normalize $ip 6] c* octets
                    foreach octet $octets {
                        set hi [expr {($octet & 0xF0) >> 4}]
                        set lo [expr {$octet & 0x0F}]
                        lappend t [format %x $hi] [format %x $lo]
                    }
                    set res [join $t .]
                }
            }
            v { 
                if {[ip::is ipv6 $ip]} {
                    set res ip6
                } else {
                    set res "in-addr"
                }
            }
            c { 
                set res [ip::normalize $ip]
                if {[ip::is ipv6 $res]} {
                    set res [ip::contract $res]
                }
            }
            r { 
                set s [socket -server {} -myaddr [info host] 0]
                set res [lindex [fconfigure $s -sockname] 1]
                close $s
            }
            t { set res [clock seconds] }
        }
        if {$T != {} || $R || $D != {}} {
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
}

proc ::spf::MX {domain} {
    set r [Resolve $domain MX ::dns::name]
    return [lsort -index 0 $r]
}


# -------------------------------------------------------------------------

package provide spf 1.1.1

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:







|








513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
}

proc ::spf::MX {domain} {
    set r [Resolve $domain MX ::dns::name]
    return [lsort -index 0 $r]
}

    
# -------------------------------------------------------------------------

package provide spf 1.1.1

# -------------------------------------------------------------------------
# Local Variables:
#   indent-tabs-mode: nil
# End:

Changes to modules/dns/spf.test.

192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
    %{l}                       strong-bad
    %{l-}                      strong.bad
    %{lr}                      strong-bad
    %{lr-}                     bad.strong
    %{l1r-}                        strong
    %{ir}.%{v}._spf.%{d2}              3.2.0.192.in-addr._spf.example.com
    %{lr-}.lp._spf.%{d2}                   bad.strong.lp._spf.example.com

    %{lr-}.lp.%{ir}.%{v}._spf.%{d2}
                         bad.strong.lp.3.2.0.192.in-addr._spf.example.com

    %{ir}.%{v}.%{l1r-}.lp._spf.%{d2}
                             3.2.0.192.in-addr.strong.lp._spf.example.com

    %{d2}.trusted-domains.example.net
                                  example.com.trusted-domains.example.net
}
set n 0
foreach {macro check} $Data {
    test spf-5.[incr n] [list spf macro language $macro] {
        list [catch {







|


|


|







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
    %{l}                       strong-bad
    %{l-}                      strong.bad
    %{lr}                      strong-bad
    %{lr-}                     bad.strong
    %{l1r-}                        strong
    %{ir}.%{v}._spf.%{d2}              3.2.0.192.in-addr._spf.example.com
    %{lr-}.lp._spf.%{d2}                   bad.strong.lp._spf.example.com
    
    %{lr-}.lp.%{ir}.%{v}._spf.%{d2}
                         bad.strong.lp.3.2.0.192.in-addr._spf.example.com
    
    %{ir}.%{v}.%{l1r-}.lp._spf.%{d2}
                             3.2.0.192.in-addr.strong.lp._spf.example.com
    
    %{d2}.trusted-domains.example.net
                                  example.com.trusted-domains.example.net
}
set n 0
foreach {macro check} $Data {
    test spf-5.[incr n] [list spf macro language $macro] {
        list [catch {

Changes to modules/dns/tcllib_dns.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[vset DNS_VERSION 1.5.0]
[manpage_begin dns n [vset DNS_VERSION]]
[see_also resolver(5)]
[keywords DNS]
[keywords {domain name service}]
[keywords resolver]
[keywords {rfc 1034}]
[keywords {rfc 1035}]
[keywords {rfc 1886}]
[keywords {rfc 7858}]
[copyright {2002, Pat Thoyts}]
[moddesc   {Domain Name Service}]
[titledesc {Tcl Domain Name Service Client}]
[category  Networking]
[require Tcl 8.2]
[require dns [opt [vset DNS_VERSION]]]
[description]
|








<







1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
[vset DNS_VERSION 1.3.5]
[manpage_begin dns n [vset DNS_VERSION]]
[see_also resolver(5)]
[keywords DNS]
[keywords {domain name service}]
[keywords resolver]
[keywords {rfc 1034}]
[keywords {rfc 1035}]
[keywords {rfc 1886}]

[copyright {2002, Pat Thoyts}]
[moddesc   {Domain Name Service}]
[titledesc {Tcl Domain Name Service Client}]
[category  Networking]
[require Tcl 8.2]
[require dns [opt [vset DNS_VERSION]]]
[description]
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
[para]

[emph Note:] The package defaults to using DNS over TCP
connections. If you wish to use UDP you will need to have the
[package tcludp] package installed and have a version that
correctly handles binary data (> 1.0.4).
This is available at [uri http://tcludp.sourceforge.net/].
If the [package udp] package is present then UDP will be used by
default.

[para]

[emph Note:] The package supports DNS over TLS (RFC 7858) for
enhanced privacy of DNS queries. Using this feature requires
the TLS package.

[section COMMANDS]

[list_begin definitions]

[call [cmd ::dns::resolve] [arg query] [opt [arg "options"]]]








|
<
<
<
<
<
<
<







36
37
38
39
40
41
42
43







44
45
46
47
48
49
50
[para]

[emph Note:] The package defaults to using DNS over TCP
connections. If you wish to use UDP you will need to have the
[package tcludp] package installed and have a version that
correctly handles binary data (> 1.0.4).
This is available at [uri http://tcludp.sourceforge.net/].
If the [package udp] package is present then UDP will be used by default.








[section COMMANDS]

[list_begin definitions]

[call [cmd ::dns::resolve] [arg query] [opt [arg "options"]]]

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
  of IN for internet domain names, CS, CH, HS or * for any class.
[def "[cmd -recurse] [arg boolean]"]
  Set to [arg false] if you do not want the name server to recursively
  act upon your request. Normally set to [arg true].
[def "[cmd -command] [arg procname]"]
  Set a procedure to be called upon request completion. The procedure
  will be passed the token as its only argument.
[def "[cmd -usetls] [arg boolean]"]
  Set the [arg true] to use DNS over TLS. This will force the use of
  TCP and change the default port to 853. Certificate validation is
  required so a source of trusted certificate authority certificates
  must be provided using [arg -cafile ] or [arg -cadir].
[def "[cmd -cafile] [arg filepath]"]
  Specify a file containing a collection of trusted certificate
  authority certficates. See the [cmd update-ca-certificates] command
  manual page for details or the [cmd -CAfile] option help from
  [cmd openssl].
[def "[cmd -cadir] [arg dirpath]"]
  Specify a directory containing trusted certificate authority
  certificates. This must be provided if [cmd -cafile] is not
  specified for certificate validation to work when [cmd -usetls] is
  enabled. See the [cmd openssl] documentation for the required
  structure of this directory.

[list_end]

[para]
[call [cmd ::dns::configure] [opt [arg "options"]]]

The [cmd ::dns::configure] command is used to setup the dns
package. The server to query, the protocol and domain search path are







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







76
77
78
79
80
81
82

















83
84
85
86
87
88
89
  of IN for internet domain names, CS, CH, HS or * for any class.
[def "[cmd -recurse] [arg boolean]"]
  Set to [arg false] if you do not want the name server to recursively
  act upon your request. Normally set to [arg true].
[def "[cmd -command] [arg procname]"]
  Set a procedure to be called upon request completion. The procedure
  will be passed the token as its only argument.

















[list_end]

[para]
[call [cmd ::dns::configure] [opt [arg "options"]]]

The [cmd ::dns::configure] command is used to setup the dns
package. The server to query, the protocol and domain search path are
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
  Set the domain search list. This is currently not used.
[def "[cmd -timeout] [arg milliseconds]"]
  Set the default timeout value for DNS lookups. Default is 30 seconds.
[def "[cmd -loglevel] [arg level]"]
  Set the log level used for emitting diagnostic messages from this
  package. The default is [term warn]. See the [package log] package
  for details of the available levels.
[def "[cmd -cafile] [arg filepath]"]
   Set the default file path to be used for the [cmd -cafile]
   option to [cmd dns::resolve].
[def "[cmd -cadir] [arg dirpath]"]
   Set the default directory path to be used for the [cmd -cadir]
   option to [cmd dns::resolve].
[list_end]

[para]
[call [cmd ::dns::name] [arg token]]
  Returns a list of all domain names returned as an answer to your query.

[para]







<
<
<
<
<
<







104
105
106
107
108
109
110






111
112
113
114
115
116
117
  Set the domain search list. This is currently not used.
[def "[cmd -timeout] [arg milliseconds]"]
  Set the default timeout value for DNS lookups. Default is 30 seconds.
[def "[cmd -loglevel] [arg level]"]
  Set the log level used for emitting diagnostic messages from this
  package. The default is [term warn]. See the [package log] package
  for details of the available levels.






[list_end]

[para]
[call [cmd ::dns::name] [arg token]]
  Returns a list of all domain names returned as an answer to your query.

[para]
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
% set tok [dns::resolve 127.0.0.1]
::dns::1
% dns::name $tok
localhost
% dns::cleanup $tok
}]

[para]
Using DNS over TLS (RFC 7858):
[example {
% set tok [dns::resolve www.tcl.tk -nameserver dns-tls.bitwiseshift.net \
  -usetls 1 -cafile /etc/ssl/certs/ca-certificates.crt]
::dns::12
% dns::wait $tok
ok
% dns::address $tok
104.25.119.118 104.25.120.118
}]

[comment { -----------------------------------------------------------  }]

[section {REFERENCES}]

[list_begin enumerated]

[enum]







<
<
<
<
<
<
<
<
<
<
<
<







191
192
193
194
195
196
197












198
199
200
201
202
203
204
% set tok [dns::resolve 127.0.0.1]
::dns::1
% dns::name $tok
localhost
% dns::cleanup $tok
}]













[comment { -----------------------------------------------------------  }]

[section {REFERENCES}]

[list_begin enumerated]

[enum]
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
    ([uri http://www.ietf.org/rfc/rfc2782.txt])

[enum]
    Ohta, M. "Incremental Zone Transfer in DNS",
    RFC 1995, August 1996,
    ([uri http://www.ietf.org/rfc/rfc1995.txt])

[enum]
    Hu, Z., etc al.
    "Specification for DNS over Transport Layer Security (TLS)",
    RFC 7858, May 2016,
    ([uri http://www.ietf.org/rfc/rfc7858.txt])

[list_end]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY dns]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<
<
<






|

228
229
230
231
232
233
234






235
236
237
238
239
240
241
242
    ([uri http://www.ietf.org/rfc/rfc2782.txt])

[enum]
    Ohta, M. "Incremental Zone Transfer in DNS",
    RFC 1995, August 1996,
    ([uri http://www.ietf.org/rfc/rfc1995.txt])







[list_end]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY dns]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/dns/tcllib_ip.man.

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

[section COMMANDS]

[list_begin definitions]

[call [cmd ::ip::version] [arg address]]

Returns the protocol version of the address ([const 4] or [const 6]),
or [const -1] if the address is neither IPv4 or IPv6.

[call [cmd ::ip::is] [arg class] [arg address]]

Returns true if the address is a member of the given protocol
class. The class parameter may be either [const ipv4] or [const ipv6]
This is effectively a boolean equivalent of the [cmd version]
command. The [arg class] argument may be shortened to [const 4] or
[const 6].

[call [cmd ::ip::equal] [arg address] [arg address]]

Compare two address specifications for equivalence. The arguments are
normalized and the address prefix determined (if a mask is
supplied). The normalized addresses are then compared bit-by-bit and
the procedure returns true if they match.







|
|




|

|
|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

[section COMMANDS]

[list_begin definitions]

[call [cmd ::ip::version] [arg address]]

Returns the protocol version of the address (4 or 6) or 0 if the
address is neither IPv4 or IPv6.

[call [cmd ::ip::is] [arg class] [arg address]]

Returns true if the address is a member of the given protocol
class. The class parameter may be either [arg ipv4] or [arg ipv6]
This is effectively a boolean equivalent of the [cmd version]
command. The [arg class] argument may be shortened to [arg 4] or
[arg 6].

[call [cmd ::ip::equal] [arg address] [arg address]]

Compare two address specifications for equivalence. The arguments are
normalized and the address prefix determined (if a mask is
supplied). The normalized addresses are then compared bit-by-bit and
the procedure returns true if they match.
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[call [cmd ::ip::contract] [arg address]]

Convert a [cmd normalize]d internet address into a more compact form
suitable for displaying to users.

[call [cmd ::ip::distance] [arg ipaddr1] [arg ipaddr2]]

This command computes the (integer) distance from IPv4 address
[arg ipaddr1] to IPv4 address [arg ipaddr2], i.e. "ipaddr2 - ipaddr1"

[para]
[example {
   % ::ip::distance 1.1.1.1  1.1.1.5
   4
}]







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[call [cmd ::ip::contract] [arg address]]

Convert a [cmd normalize]d internet address into a more compact form
suitable for displaying to users.

[call [cmd ::ip::distance] [arg ipaddr1] [arg ipaddr2]]

This command computes the (integer) distance from IPv4 address 
[arg ipaddr1] to IPv4 address [arg ipaddr2], i.e. "ipaddr2 - ipaddr1"

[para]
[example {
   % ::ip::distance 1.1.1.1  1.1.1.5
   4
}]
443
444
445
446
447
448
449
450
451

[list_end]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY dns]
[include ../common-text/feedback.inc]
[manpage_end]







|

443
444
445
446
447
448
449
450
451

[list_end]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY dns]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/docstrip/tcldocstrip.dtx.

432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
%   changing version numbers. (LH)}
% 
% Since this leaves |manpage_begin| of the \textsf{doctools} manpages 
% the odd man out, we'd better begin with that.
% \begin{tcl}
%<*man,utilman>
%<man>[manpage_begin docstrip n 1.2]
%<utilman>[vset VERSION 1.3.1]
%<utilman>[manpage_begin docstrip_util n [vset VERSION]]
%<man>[see_also docstrip_util]
%<utilman>[see_also docstrip]
%<utilman>[see_also doctools]
%<utilman>[see_also doctools_fmt]
%<utilman>[keywords .ddt]
[keywords .dtx]
%<utilman>[keywords catalogue]







<
|







432
433
434
435
436
437
438

439
440
441
442
443
444
445
446
%   changing version numbers. (LH)}
% 
% Since this leaves |manpage_begin| of the \textsf{doctools} manpages 
% the odd man out, we'd better begin with that.
% \begin{tcl}
%<*man,utilman>
%<man>[manpage_begin docstrip n 1.2]

%<utilman>[manpage_begin docstrip_util n 1.3]
%<man>[see_also docstrip_util]
%<utilman>[see_also docstrip]
%<utilman>[see_also doctools]
%<utilman>[see_also doctools_fmt]
%<utilman>[keywords .ddt]
[keywords .dtx]
%<utilman>[keywords catalogue]
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
% The \textsf{docstrip::util} package has a dependency on the 
% \textsf{docstrip} package, but not the other way around. Hence the 
% next block is slightly shorter.
% \begin{tcl}
%<utilpkg>package provide docstrip::util 1.3.1
%<idx>package ifneeded docstrip::util 1.3.1\
%<idx>  [list source [file join $dir docstrip_util.tcl]]
%<utilman>[require docstrip::util [opt [vset VERSION]]]
% \end{tcl}
% This ends the interleaved parts of the headers.
% 
% The following is a trick to use non-ASCII characters in manpages 
% without having to put them as such in the source: when an emdash 
% (U+2014) is needed, just write |[vset emdash]|.
% \begin{tcl}







|







492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
% The \textsf{docstrip::util} package has a dependency on the 
% \textsf{docstrip} package, but not the other way around. Hence the 
% next block is slightly shorter.
% \begin{tcl}
%<utilpkg>package provide docstrip::util 1.3.1
%<idx>package ifneeded docstrip::util 1.3.1\
%<idx>  [list source [file join $dir docstrip_util.tcl]]
%<utilman>[require docstrip::util [opt 1.3]]
% \end{tcl}
% This ends the interleaved parts of the headers.
% 
% The following is a trick to use non-ASCII characters in manpages 
% without having to put them as such in the source: when an emdash 
% (U+2014) is needed, just write |[vset emdash]|.
% \begin{tcl}

Changes to modules/doctools/changelog.man.

79
80
81
82
83
84
85
86
87
command merges all of them into a single structure, and collapses
multiple entries for the same date and author into a single entry. The
new structure is returned as the result of the command.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

79
80
81
82
83
84
85
86
87
command merges all of them into a single structure, and collapses
multiple entries for the same date and author into a single entry. The
new structure is returned as the result of the command.

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/changelog.tcl.

1
2
3
4
5
6
7
8



9
10
11
12
13
14
15
# changelog.tcl --
#
#	Handling of ChangeLog's.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.




# FUTURE -- Expand pre-parsed log (nested lists) into flat structures
# FUTURE --  => date/author/file/cref + cref/text
# FUTURE -- I.e. relational/tabular structure, useable in table displays,
# FUTURE -- sort by date, author, file to see aggregated changes
# FUTURE --  => Connectivity to 'struct::matrix', Reports!





|



>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# changelog.tcl --
#
#	Handling of ChangeLog's.
#
# Copyright (c) 2003-2008 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: changelog.tcl,v 1.8 2008/07/08 23:03:58 andreas_kupries Exp $


# FUTURE -- Expand pre-parsed log (nested lists) into flat structures
# FUTURE --  => date/author/file/cref + cref/text
# FUTURE -- I.e. relational/tabular structure, useable in table displays,
# FUTURE -- sort by date, author, file to see aggregated changes
# FUTURE --  => Connectivity to 'struct::matrix', Reports!

139
140
141
142
143
144
145
146
147
148
149
150
151
152
153

    if {
	([string length $comment] > 0) ||
	([llength $files] > 0)
    } {
	lappend clist   [list $files [string trim $comment]]
	set     files   [list]
	set     comment ""
    }
    return
}

proc ::doctools::changelog::closeEntry {} {
    upvar 1 clist clist comment comment files files first first \
	date date author author entries entries







|







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156

    if {
	([string length $comment] > 0) ||
	([llength $files] > 0)
    } {
	lappend clist   [list $files [string trim $comment]]
	set     files   [list]
	set     comment ""	
    }
    return
}

proc ::doctools::changelog::closeEntry {} {
    upvar 1 clist clist comment comment files files first first \
	date date author author entries entries

Changes to modules/doctools/checker.tcl.

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
    Enter description
    if {[IsNot header]} {Error hdrcmd}
    Go body
    fmt_description [Sectdef section Description description]
}

# Storage for (sub)section ids to enable checking for ambigous
# identification. The ids on this level are logical names. The backends
# are given physical names (via counters).
global sect   ; # Map of logical -> physical ids
global sectt  ; # Map of logical -> section title
global sectci ; # Current section (id)
global sectct ; # Current section (title)
global countersection
global countersubsection







|







308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
    Enter description
    if {[IsNot header]} {Error hdrcmd}
    Go body
    fmt_description [Sectdef section Description description]
}

# Storage for (sub)section ids to enable checking for ambigous
# identificaton. The ids on this level are logical names. The backends
# are given physical names (via counters).
global sect   ; # Map of logical -> physical ids
global sectt  ; # Map of logical -> section title
global sectci ; # Current section (id)
global sectct ; # Current section (title)
global countersection
global countersubsection
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
		}
		set pid $sect($fid)
	    }
	}
    }

    # If we have no text take the section title as text, if we
    # can. Last fallback for text is the id.
    if {$title == {}} {
	if {$pid != {}} {
	    set title $sectt($fid)
	} else {
	    set title $id
	}
    }







|







612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
		}
		set pid $sect($fid)
	    }
	}
    }

    # If we have no text take the section title as text, if we
    # can. Last fallback for thext is the id.
    if {$title == {}} {
	if {$pid != {}} {
	    set title $sectt($fid)
	} else {
	    set title $id
	}
    }

Changes to modules/doctools/checker_toc.tcl.

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
#		+-----------------------+-----------
#		| toc_end		| -> done
# --------------+-----------------------+----------------------
# division	| item			| -> division //
#		+-----------------------+-----------
#		| division_start	| -> division, PUSH division
#		+-----------------------+-----------
#		| division_end		| POP (-> division / -> contents)
# --------------+-----------------------+----------------------
# end		| toc_end		| -> done
#		+-----------------------+-----------
#		| division_start	| PUSH division
# --------------+-----------------------+----------------------

# State machine, as above ... Command centered
# --------------+-----------------------+----------------------
# state		| allowed commands	| new state (if any)
# --------------+-----------------------+----------------------
# all except	| include vset		|
# ==============+=======================+======================
# toc_begin	| toc_begin		| -> contents
# --------------+-----------------------+----------------------
# contents	| item			| -> contents
# division	|			| -> division
# --------------+-----------------------+----------------------
# contents	| division_start	| -> end, PUSH division
# division	|			| -> division, PUSH division
# end		|			| PUSH division
# --------------+-----------------------+----------------------
# division	| division_end		| POP (-> division / -> end)
# --------------+-----------------------+----------------------
# contents	| toc_end		| -> done
# end		|			| -> done
# --------------+-----------------------+----------------------







|


















|







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
#		+-----------------------+-----------
#		| toc_end		| -> done
# --------------+-----------------------+----------------------
# division	| item			| -> division //
#		+-----------------------+-----------
#		| division_start	| -> division, PUSH division
#		+-----------------------+-----------
#		| division_end		| POP (-> division / -> end)
# --------------+-----------------------+----------------------
# end		| toc_end		| -> done
#		+-----------------------+-----------
#		| division_start	| PUSH division
# --------------+-----------------------+----------------------

# State machine, as above ... Command centered
# --------------+-----------------------+----------------------
# state		| allowed commands	| new state (if any)
# --------------+-----------------------+----------------------
# all except	| include vset		|
# ==============+=======================+======================
# toc_begin	| toc_begin		| -> contents
# --------------+-----------------------+----------------------
# contents	| item			| -> contents
# division	|			| -> division
# --------------+-----------------------+----------------------
# contents	| division_start	| -> end, PUSH division
# division	|			| -> divison, PUSH division
# end		|			| PUSH division
# --------------+-----------------------+----------------------
# division	| division_end		| POP (-> division / -> end)
# --------------+-----------------------+----------------------
# contents	| toc_end		| -> done
# end		|			| -> done
# --------------+-----------------------+----------------------
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125


126
127
128
129
130
131
132
    set msg [::msgcat::mc $code]
    dt_warning "TOC warning ($code): [join [split [format $msg $text] \n] "\nTOC warning ($code): "]"
    return
}

proc Is    {s} {global state ; return [string equal $state $s]}
proc IsNot {s} {global state ; return [expr {![string equal $state $s]}]}
proc Go    {s} {Log " ==\[$s\]" ; global state ; set state $s; return}
proc Push  {s} {Log " >>\[$s\]" ; global state stack ; lappend stack $state ; set state $s; return}
proc Pop   {}  {Log* " <<"     ;  global state stack ; set state [lindex $stack end] ; set stack [lrange $stack 0 end-1] ; Log " \\\\\[$state\]" ; return}
proc State {} {global state stack ; return "$stack || $state"}

proc Enter {cmd} {Log* "\n\[[State]\] $cmd"}

proc Log* {args} {}
proc Log  {args} {}
#proc Log* {text} {puts -nonewline $text}
#proc Log  {text} {puts            $text}



# -------------------------------------------------------------
# Framing
proc ck_initialize {} {
    global state   ; set state toc_begin
    global stack   ; set stack [list]
}







|
|
|


|

<
<


>
>







108
109
110
111
112
113
114
115
116
117
118
119
120
121


122
123
124
125
126
127
128
129
130
131
132
    set msg [::msgcat::mc $code]
    dt_warning "TOC warning ($code): [join [split [format $msg $text] \n] "\nTOC warning ($code): "]"
    return
}

proc Is    {s} {global state ; return [string equal $state $s]}
proc IsNot {s} {global state ; return [expr {![string equal $state $s]}]}
proc Go    {s} {Log " >>\[$s\]" ; global state ; set state $s; return}
proc Push  {s} {Log " //\[$s\]" ; global state stack ; lappend stack $state ; set state $s; return}
proc Pop   {}  {Log* " pop" ;  global state stack ; set state [lindex $stack end] ; set stack [lrange $stack 0 end-1] ; Log " \\\\\[$state\]" ; return}
proc State {} {global state stack ; return "$stack || $state"}

proc Enter {cmd} {Log* "\[[State]\] $cmd"}



#proc Log* {text} {puts -nonewline $text}
#proc Log  {text} {puts            $text}
proc Log* {text} {}
proc Log  {text} {}

# -------------------------------------------------------------
# Framing
proc ck_initialize {} {
    global state   ; set state toc_begin
    global stack   ; set stack [list]
}
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194

195
196
197
198
199
200
201
}

# -------------------------------------------------------------
# Formatting commands
proc toc_begin {label title} {
    Enter toc_begin
    if {[IsNot toc_begin]} {Error toc/begincmd}
    Go   end
    Push contents
    fmt_toc_begin $label $title
}
proc toc_end {} {
    Enter toc_end
    if {[IsNot end] && [IsNot contents]} {Error toc/endcmd}
    Go done
    fmt_toc_end
}
proc division_start {title {symfile {}}} {
    Enter division_start
    if {
	[IsNot contents] && [IsNot end] && [IsNot division]
    } {Error toc/sectcmd}

    Push division
    fmt_division_start $title $symfile
}
proc division_end {} {
    Enter division_end
    if {[IsNot division]} {Error toc/sectecmd [State]}
    Pop







<
|













>







173
174
175
176
177
178
179

180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
}

# -------------------------------------------------------------
# Formatting commands
proc toc_begin {label title} {
    Enter toc_begin
    if {[IsNot toc_begin]} {Error toc/begincmd}

    Go contents
    fmt_toc_begin $label $title
}
proc toc_end {} {
    Enter toc_end
    if {[IsNot end] && [IsNot contents]} {Error toc/endcmd}
    Go done
    fmt_toc_end
}
proc division_start {title {symfile {}}} {
    Enter division_start
    if {
	[IsNot contents] && [IsNot end] && [IsNot division]
    } {Error toc/sectcmd}
    if {[Is contents] || [Is end]} {Go end} else {Go division}
    Push division
    fmt_division_start $title $symfile
}
proc division_end {} {
    Enter division_end
    if {[IsNot division]} {Error toc/sectecmd [State]}
    Pop

Changes to modules/doctools/cvs.man.

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[para]

The values are lists of the files the entry is touching.

[list_end]
[para]

[call [cmd ::doctools::cvs::toChangeLog] [arg evar] [arg cvar] [arg fvar]]

The three arguments for this command are the same as the last three
arguments of the command [cmd ::doctools::cvs::scanLog]. This command
however expects them to be filled with information about one or more
logs. It takes this information and converts it into a text in the
format of a ChangeLog as accepted and generated by [syscmd emacs]. The
constructed text is returned as the result of the command.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|











|

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[para]

The values are lists of the files the entry is touching.

[list_end]
[para]

[call [cmd ::doctools::cvs::toChangeLog] [arg evar] [arg cvar] [arg fvar]]]

The three arguments for this command are the same as the last three
arguments of the command [cmd ::doctools::cvs::scanLog]. This command
however expects them to be filled with information about one or more
logs. It takes this information and converts it into a text in the
format of a ChangeLog as accepted and generated by [syscmd emacs]. The
constructed text is returned as the result of the command.

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/cvs.tcl.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# cvs.tcl --
#
#	Handling of various cvs output formats.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require Tcl 8.2
package require textutil

namespace eval ::doctools {}
namespace eval ::doctools::cvs {
    namespace export scanLog toChangeLog




|



>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# cvs.tcl --
#
#	Handling of various cvs output formats.
#
# Copyright (c) 2003-2008 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: cvs.tcl,v 1.10 2008/07/08 23:03:58 andreas_kupries Exp $

package require Tcl 8.2
package require textutil

namespace eval ::doctools {}
namespace eval ::doctools::cvs {
    namespace export scanLog toChangeLog

Changes to modules/doctools/docidx.man.

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
[vset PACKAGE_VERSION 1.1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::idx n [vset PACKAGE_VERSION]]
[see_also docidx_intro]
[see_also docidx_lang_cmdref]
[see_also docidx_lang_intro]
[see_also docidx_lang_syntax]
[see_also docidx_plugin_apiref]
[keywords conversion]
[keywords docidx]
[keywords documentation]
[keywords HTML]
[keywords index]
[keywords {keyword index}]
[keywords latex]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords markdown]
[keywords TMML]
[keywords wiki]
[copyright {2003-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {docidx - Processing indices}]
[category  {Documentation tools}]
[require Tcl 8.2]
[require doctools::idx [opt [vset PACKAGE_VERSION]]]
[description]

|

















<


|







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
[vset PACKAGE_VERSION 1.0.5]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::idx n [vset PACKAGE_VERSION]]
[see_also docidx_intro]
[see_also docidx_lang_cmdref]
[see_also docidx_lang_intro]
[see_also docidx_lang_syntax]
[see_also docidx_plugin_apiref]
[keywords conversion]
[keywords docidx]
[keywords documentation]
[keywords HTML]
[keywords index]
[keywords {keyword index}]
[keywords latex]
[keywords manpage]
[keywords markup]
[keywords nroff]

[keywords TMML]
[keywords wiki]
[copyright {2003-2014 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {docidx - Processing indices}]
[category  {Documentation tools}]
[require Tcl 8.2]
[require doctools::idx [opt [vset PACKAGE_VERSION]]]
[description]

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391

[def list]

This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.

[def markdown]

This engine generates [term Markdown] markup.

[def nroff]

This engine generates nroff output, for processing by [syscmd nroff],
or [syscmd groff]. The result will be standard man pages as they are
known in the unix world.

[def null]







<
<
<
<







373
374
375
376
377
378
379




380
381
382
383
384
385
386

[def list]

This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.





[def nroff]

This engine generates nroff output, for processing by [syscmd nroff],
or [syscmd groff]. The result will be standard man pages as they are
known in the unix world.

[def null]
402
403
404
405
406
407
408
409
410

This engine generates Wiki markup as understood by Jean Claude
Wippler's [syscmd wikit] application.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

397
398
399
400
401
402
403
404
405

This engine generates Wiki markup as understood by Jean Claude
Wippler's [syscmd wikit] application.

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/docidx.tcl.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# docidx.tcl --
#
#	Implementation of docidx objects for Tcl.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require Tcl 8.2
package require textutil::expander

# @mdgen OWNER: api_idx.tcl
# @mdgen OWNER: checker_idx.tcl
# @mdgen OWNER: mpformats/*.tcl




|



>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# docidx.tcl --
#
#	Implementation of docidx objects for Tcl.
#
# Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: docidx.tcl,v 1.22 2010/06/08 19:13:53 andreas_kupries Exp $

package require Tcl 8.2
package require textutil::expander

# @mdgen OWNER: api_idx.tcl
# @mdgen OWNER: checker_idx.tcl
# @mdgen OWNER: mpformats/*.tcl
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#	Varies based on command to perform

proc ::doctools::idx::DocIdxProc {name {cmd ""} args} {
    # Do minimal args checks here
    if { [llength [info level 0]] == 2 } {
	error "wrong # args: should be \"$name option ?arg arg ...?\""
    }

    # Split the args into command and args components

    if { [llength [info commands ::doctools::idx::_$cmd]] == 0 } {
	variable commands
	set optlist [join $commands ", "]
	set optlist [linsert $optlist "end-1" "or"]
	return -code error "bad option \"$cmd\": must be $optlist"







|







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#	Varies based on command to perform

proc ::doctools::idx::DocIdxProc {name {cmd ""} args} {
    # Do minimal args checks here
    if { [llength [info level 0]] == 2 } {
	error "wrong # args: should be \"$name option ?arg arg ...?\""
    }
    
    # Split the args into command and args components

    if { [llength [info commands ::doctools::idx::_$cmd]] == 0 } {
	variable commands
	set optlist [join $commands ", "]
	set optlist [linsert $optlist "end-1" "or"]
	return -code error "bad option \"$cmd\": must be $optlist"
953
954
955
956
957
958
959
960
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools::idx 1.1







|
955
956
957
958
959
960
961
962
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools::idx 1.0.5

Changes to modules/doctools/docidx.test.

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
# -*- tcl -*-
# docidx.test:  tests for the doctools::idx package.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2003-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    use textutil/expander.tcl textutil::expander
    use fileutil/fileutil.tcl fileutil
}
testing {
    useLocal docidx.tcl doctools::idx
}

# -------------------------------------------------------------------------








|

>
>












<







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
# -*- tcl -*-
# docidx.test:  tests for the doctools::idx package.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2003-2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: docidx.test,v 1.15 2009/02/12 05:42:47 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    use textutil/expander.tcl textutil::expander

}
testing {
    useLocal docidx.tcl doctools::idx
}

# -------------------------------------------------------------------------

303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
    mydocidx destroy
    set result
} {Docidx Error in macro at line 1, column 30:
[index_end]
--> (FmtError) IDX error (idx/endcmd), "index_end" : Command not allowed here..}


# -------------------------------------------------------------------------
## Series of tests for all available backends, check their formatting.

set k 11
foreach format {
    null html nroff
    text wiki markdown
} {
    set n 0
    foreach src [TestFilesGlob tests/idx/idx/*] {
	# Get the expected result
	set dst [localPath [file join tests idx $format [file tail $src]]]
	set map {} ; lappend map @USR@ $tcl_platform(user)
	set rem {} ; lappend rem $tcl_platform(user) @USR@
	if {$format eq "nroff"} {
		lappend map ".so man.macros\n" [fileutil::cat [localPath mpformats/man.macros]]
	}
	if {[catch {
	    set expected [string map $map [fileutil::cat $dst]]
	}]} { set expected **missing** }

	test docidx-${format}-${k}.$n "docidx backends, $format/[file tail $src]" {
	    new mydocidx
	    mydocidx configure \
		-format    $format \
		-file      .FILE.
	    if {[catch {
		set res [mydocidx format [fileutil::cat $src]]
	    }]} {
		set res $::errorInfo
	    }
	    mydocidx destroy
	    #fileutil::writeFile ${dst}.actual [string map $rem $res]
	    set res
	} $expected

	#fileutil::writeFile ${dst}.expected $expected
	incr n
    }
    incr k
}

# -------------------------------------------------------------------------

namespace forget ::doctools::idx::new

# -------------------------------------------------------------------------

testsuiteCleanup
return







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






304
305
306
307
308
309
310












































311
312
313
314
315
316
    mydocidx destroy
    set result
} {Docidx Error in macro at line 1, column 30:
[index_end]
--> (FmtError) IDX error (idx/endcmd), "index_end" : Command not allowed here..}














































namespace forget ::doctools::idx::new

# -------------------------------------------------------------------------

testsuiteCleanup
return

Changes to modules/doctools/docidx_intro.man.

98
99
100
101
102
103
104
105
106
respectively.

They are described in their own sets of documents, starting at the
[term {doctoc introduction}] and the [term {doctools introduction}],
respectively.

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

98
99
100
101
102
103
104
105
106
respectively.

They are described in their own sets of documents, starting at the
[term {doctoc introduction}] and the [term {doctools introduction}],
respectively.

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/docidx_lang_cmdref.man.

108
109
110
111
112
113
114
115
116

Templating. In this form the command is replaced by the value of the
named document variable

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

108
109
110
111
112
113
114
115
116

Templating. In this form the command is replaced by the value of the
named document variable

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/docidx_lang_faq.man.

20
21
22
23
24
25
26
27
28

[section OVERVIEW]

[include include/placeholder.inc]
[include include/examples.inc]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

20
21
22
23
24
25
26
27
28

[section OVERVIEW]

[include include/placeholder.inc]
[include include/examples.inc]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/docidx_lang_intro.man.

206
207
208
209
210
211
212
213
214
On the other hand, docidx is perfectly suited for the automatic
generation from doctools documents, and this is the route Tcllib's
easy and simple [syscmd dtplite] goes, creating an index for a set of
documents behind the scenes, without the writer having to do so on
their own.

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

206
207
208
209
210
211
212
213
214
On the other hand, docidx is perfectly suited for the automatic
generation from doctools documents, and this is the route Tcllib's
easy and simple [syscmd dtplite] goes, creating an index for a set of
documents behind the scenes, without the writer having to do so on
their own.

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/docidx_lang_syntax.man.

112
113
114
115
116
117
118
119
120
[enum][cmd rb], or
[enum][cmd vset] (1-argument form).
[list_end]

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

112
113
114
115
116
117
118
119
120
[enum][cmd rb], or
[enum][cmd vset] (1-argument form).
[list_end]

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/docidx_plugin_apiref.man.

413
414
415
416
417
418
419
420
421
[para] The formatted text is expected as the result of the command,
and added to the output. If no special processing is required it has
to simply return its argument without change.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

413
414
415
416
417
418
419
420
421
[para] The formatted text is expected as the result of the command,
and added to the output. If no special processing is required it has
to simply return its argument without change.

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctoc.man.

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
[vset PACKAGE_VERSION 1.2]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::toc n [vset PACKAGE_VERSION]]
[see_also doctoc_intro]
[see_also doctoc_lang_cmdref]
[see_also doctoc_lang_intro]
[see_also doctoc_lang_syntax]
[see_also doctoc_plugin_apiref]
[keywords conversion]
[keywords doctoc]
[keywords documentation]
[keywords HTML]
[keywords latex]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords {table of contents}]
[keywords markdown]
[keywords TMML]
[keywords toc]
[keywords wiki]
[copyright {2003-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {doctoc - Processing tables of contents}]
[category  {Documentation tools}]
[require Tcl 8.2]
[require doctools::toc [opt [vset PACKAGE_VERSION]]]
[description]

|
















<



|







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
[vset PACKAGE_VERSION 1.1.4]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::toc n [vset PACKAGE_VERSION]]
[see_also doctoc_intro]
[see_also doctoc_lang_cmdref]
[see_also doctoc_lang_intro]
[see_also doctoc_lang_syntax]
[see_also doctoc_plugin_apiref]
[keywords conversion]
[keywords doctoc]
[keywords documentation]
[keywords HTML]
[keywords latex]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords {table of contents}]

[keywords TMML]
[keywords toc]
[keywords wiki]
[copyright {2003-2014 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {doctoc - Processing tables of contents}]
[category  {Documentation tools}]
[require Tcl 8.2]
[require doctools::toc [opt [vset PACKAGE_VERSION]]]
[description]

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391

[def list]

This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.

[def markdown]

This engine generates [term Markdown] markup.

[def nroff]

This engine generates nroff output, for processing by [syscmd nroff],
or [syscmd groff]. The result will be standard man pages as they are
known in the unix world.

[def null]







<
<
<
<







373
374
375
376
377
378
379




380
381
382
383
384
385
386

[def list]

This engine retrieves version, section and title of the manpage from
the document. As such it can be used to generate a directory listing
for a set of manpages.





[def nroff]

This engine generates nroff output, for processing by [syscmd nroff],
or [syscmd groff]. The result will be standard man pages as they are
known in the unix world.

[def null]
402
403
404
405
406
407
408
409
410

This engine generates Wiki markup as understood by Jean Claude
Wippler's [syscmd wikit] application.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

397
398
399
400
401
402
403
404
405

This engine generates Wiki markup as understood by Jean Claude
Wippler's [syscmd wikit] application.

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctoc.tcl.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# doctoc.tcl --
#
#	Implementation of doctoc objects for Tcl.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require Tcl 8.2
package require textutil::expander

# @mdgen OWNER: api_toc.tcl
# @mdgen OWNER: checker_toc.tcl
# @mdgen OWNER: mpformats/*.tcl




|



>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# doctoc.tcl --
#
#	Implementation of doctoc objects for Tcl.
#
# Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: doctoc.tcl,v 1.22 2010/06/08 19:13:53 andreas_kupries Exp $

package require Tcl 8.2
package require textutil::expander

# @mdgen OWNER: api_toc.tcl
# @mdgen OWNER: checker_toc.tcl
# @mdgen OWNER: mpformats/*.tcl
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#	Varies based on command to perform

proc ::doctools::toc::DocTocProc {name {cmd ""} args} {
    # Do minimal args checks here
    if { [llength [info level 0]] == 2 } {
	error "wrong # args: should be \"$name option ?arg arg ...?\""
    }

    # Split the args into command and args components

    if { [llength [info commands ::doctools::toc::_$cmd]] == 0 } {
	variable commands
	set optlist [join $commands ", "]
	set optlist [linsert $optlist "end-1" "or"]
	return -code error "bad option \"$cmd\": must be $optlist"







|







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#	Varies based on command to perform

proc ::doctools::toc::DocTocProc {name {cmd ""} args} {
    # Do minimal args checks here
    if { [llength [info level 0]] == 2 } {
	error "wrong # args: should be \"$name option ?arg arg ...?\""
    }
    
    # Split the args into command and args components

    if { [llength [info commands ::doctools::toc::_$cmd]] == 0 } {
	variable commands
	set optlist [join $commands ", "]
	set optlist [linsert $optlist "end-1" "or"]
	return -code error "bad option \"$cmd\": must be $optlist"
959
960
961
962
963
964
965
966
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools::toc 1.2







|
961
962
963
964
965
966
967
968
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools::toc 1.1.4

Changes to modules/doctools/doctoc.test.

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
# -*- tcl -*-
# doctoc.test:  tests for the doctools::toc package.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2003-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    use textutil/expander.tcl textutil::expander
    use fileutil/fileutil.tcl fileutil
}
testing {
    useLocal doctoc.tcl doctools::toc
}

# -------------------------------------------------------------------------








|

>
>












<







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
# -*- tcl -*-
# doctoc.test:  tests for the doctools::toc package.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2003-2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: doctoc.test,v 1.14 2009/02/12 05:42:47 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    use textutil/expander.tcl textutil::expander

}
testing {
    useLocal doctoc.tcl doctools::toc
}

# -------------------------------------------------------------------------

285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361

362
363
    catch {mydoctoc format foo} result
    mydoctoc destroy
    set result
} {Doctoc Error in plain text at line 1, column 0:
[plain_text foo]
--> (FmtError) TOC error (toc/plaintext), "plain_text foo" : Plain text beyond whitespace is not allowed..}

test doctoc-9.1 {doctoc syntax v1.1, empty toc, ok} {
    new mydoctoc -format null
    set result [mydoctoc format {[toc_begin TOC Test][toc_end]}]
    mydoctoc destroy
    set result
} {}

test doctoc-9.2 {doctoc syntax v1.1, mixing items and divisions, ok} {
    new mydoctoc -format null
    set result [mydoctoc format {[toc_begin TOC Test][item I1f i1 i1d][division_start D Df][item I2f i2 i2d][division_end][toc_end]}]
    mydoctoc destroy
    set result
} {}

test doctoc-9.3 {doctoc syntax v1.1, empty division, ok} {
    new mydoctoc -format null
    set result [mydoctoc format {[toc_begin TOC Test][division_start D Df][division_end][toc_end]}]
    mydoctoc destroy
    set result
} {}


# -------------------------------------------------------------------------
## Series of tests for all available backends, check their formatting.

set k 11
foreach format {
    html tmml nroff
    text wiki markdown
    null
} {
    set n 0
    foreach src [TestFilesGlob tests/toc/toc/*] {
	# Get the expected result
	set dst [localPath [file join tests toc $format [file tail $src]]]
	set map {} ; lappend map @USR@ $tcl_platform(user)
	set rem {} ; lappend rem $tcl_platform(user) @USR@
	if {$format eq "nroff"} {
		lappend map ".so man.macros\n" [fileutil::cat [localPath mpformats/man.macros]]
	}
	if {[catch {
	    set expected [string map $map [fileutil::cat $dst]]
	}]} { set expected **missing** }

	test doctoc-${format}-${k}.$n "doctoc backends, $format/[file tail $src]" {
	    new mydoctoc
	    mydoctoc configure \
		-format    $format \
		-file      .FILE.
	    if {[catch {
		set res [mydoctoc format [fileutil::cat $src]]
	    }]} {
		set res $::errorInfo
	    }
	    mydoctoc destroy
	    #fileutil::writeFile ${dst}.actual [string map $rem $res]
	    set res
	} $expected

	#fileutil::writeFile ${dst}.expected $expected
	incr n
    }
    incr k
}

# -------------------------------------------------------------------------

namespace forget ::doctools::toc::new

# -------------------------------------------------------------------------

testsuiteCleanup
return







|
|
|
|



|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
|
<
<
<

|
|
<
|
<
<
<
<
<
<
|
<
|
<
<
<
<
|
<
<
<
<




>


286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303






















304





305



306
307
308

309






310

311




312




313
314
315
316
317
318
319
    catch {mydoctoc format foo} result
    mydoctoc destroy
    set result
} {Doctoc Error in plain text at line 1, column 0:
[plain_text foo]
--> (FmtError) TOC error (toc/plaintext), "plain_text foo" : Plain text beyond whitespace is not allowed..}

test docidx-9.1 {doctoc syntax v1.1, empty toc, ok} {
    new mydocidx -format null
    set result [mydocidx format {[toc_begin TOC Test][toc_end]}]
    mydocidx destroy
    set result
} {}

test docidx-9.2 {doctoc syntax v1.1, mixing items and divisions, ok} {
    new mydocidx -format null
    set result [mydocidx format {[toc_begin TOC Test][item I1f i1 i1d][division_start D Df][item I2f i2 i2d][division_end][toc_end]}]
    mydocidx destroy






















    set result





} {}




test docidx-9.3 {doctoc syntax v1.1, empty division, ok} {
    new mydocidx -format null

    set result [mydocidx format {[toc_begin TOC Test][division_start D Df][division_end][toc_end]}]






    mydocidx destroy

    set result




} {}





namespace forget ::doctools::toc::new

# -------------------------------------------------------------------------

testsuiteCleanup
return

Changes to modules/doctools/doctoc_intro.man.

97
98
99
100
101
102
103
104
105
of [term {keyword indices}], and general documentation, respectively.

They are described in their own sets of documents, starting at the
[term {docidx introduction}] and the [term {doctools introduction}],
respectively.

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

97
98
99
100
101
102
103
104
105
of [term {keyword indices}], and general documentation, respectively.

They are described in their own sets of documents, starting at the
[term {docidx introduction}] and the [term {doctools introduction}],
respectively.

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctoc_lang_cmdref.man.

119
120
121
122
123
124
125
126
127

Templating. In this form the command is replaced by the value of the
named document variable

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

119
120
121
122
123
124
125
126
127

Templating. In this form the command is replaced by the value of the
named document variable

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctoc_lang_faq.man.

20
21
22
23
24
25
26
27
28

[section OVERVIEW]

[include include/placeholder.inc]
[include include/examples.inc]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

20
21
22
23
24
25
26
27
28

[section OVERVIEW]

[include include/placeholder.inc]
[include include/examples.inc]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctoc_lang_intro.man.

289
290
291
292
293
294
295
296
297
On the other hand, doctoc is perfectly suited for the automatic
generation from doctools documents, and this is the route Tcllib's
easy and simple [syscmd dtplite] goes, creating a table of contents
for a set of documents behind the scenes, without the writer having to
do so on their own.

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

289
290
291
292
293
294
295
296
297
On the other hand, doctoc is perfectly suited for the automatic
generation from doctools documents, and this is the route Tcllib's
easy and simple [syscmd dtplite] goes, creating a table of contents
for a set of documents behind the scenes, without the writer having to
do so on their own.

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctoc_lang_syntax.man.

97
98
99
100
101
102
103
104
105

division  = DIVISION_START
            contents
            DIVISION_END
}]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

97
98
99
100
101
102
103
104
105

division  = DIVISION_START
            contents
            DIVISION_END
}]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctoc_plugin_apiref.man.

413
414
415
416
417
418
419
420
421
[para] The formatted text is expected as the result of the command,
and added to the output. If no special processing is required it has
to simply return its argument without change.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

413
414
415
416
417
418
419
420
421
[para] The formatted text is expected as the result of the command,
and added to the output. If no special processing is required it has
to simply return its argument without change.

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctools.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 1.5.6]
[manpage_begin doctools n [vset PACKAGE_VERSION]]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_intro]
[see_also doctools_lang_syntax]
[see_also doctools_plugin_apiref]
[keywords conversion]
[keywords documentation]
[keywords HTML]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords markdown]
[keywords TMML]
[copyright {2003-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {doctools - Processing documents}]
[category  {Documentation tools}]
[require Tcl 8.2]
[require doctools [opt [vset PACKAGE_VERSION]]]
[description]


|












<

|







1
2
3
4
5
6
7
8
9
10
11
12
13
14

15
16
17
18
19
20
21
22
23
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 1.4.19]
[manpage_begin doctools n [vset PACKAGE_VERSION]]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_intro]
[see_also doctools_lang_syntax]
[see_also doctools_plugin_apiref]
[keywords conversion]
[keywords documentation]
[keywords HTML]
[keywords manpage]
[keywords markup]
[keywords nroff]

[keywords TMML]
[copyright {2003-2014 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {doctools - Processing documents}]
[category  {Documentation tools}]
[require Tcl 8.2]
[require doctools [opt [vset PACKAGE_VERSION]]]
[description]

439
440
441
442
443
444
445
446
447
448
449
450
451
452
453

[def xref]

The value for this parameter has to be a list of triples specifying
cross-reference information. This information is used by the engine to
create more hyperlinks. Each triple is a list containing a pattern,
symbolic filename and fragment reference, in this order. If a pattern
is specified multiple times the last occurrence of the pattern will be
used.

[para]

The engine will consult the xref database when encountering specific
commands and will create a link if the relevant text matches one of
the patterns. No link will be created if no match was found. The link







|







438
439
440
441
442
443
444
445
446
447
448
449
450
451
452

[def xref]

The value for this parameter has to be a list of triples specifying
cross-reference information. This information is used by the engine to
create more hyperlinks. Each triple is a list containing a pattern,
symbolic filename and fragment reference, in this order. If a pattern
is specified multiple times the last occurence of the pattern will be
used.

[para]

The engine will consult the xref database when encountering specific
commands and will create a link if the relevant text matches one of
the patterns. No link will be created if no match was found. The link
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575

[def nroff]

This engine generates nroff output, for processing by [syscmd nroff],
or [syscmd groff]. The result will be standard man pages as they are
known in the unix world.

[def markdown]

This engine generates [term Markdown] markup. This engine supports two
parameters:

[list_begin definitions]
[def header]

The value for this parameter has to be valid selfcontained markdown
markup for the body section of a markdown document. The default value
is the empty string. The value is inserted into the generated output
just before the table of contents.

[para]

This can be used to insert boilerplate header markup into the
generated document.

[def xref]

The value for this parameter has to be a list of triples specifying
cross-reference information.

[para]

The full details of expected syntax and engine-internal use are
explained above for the [term html] engine.

[list_end]
[para]

[def null]

This engine generates no outout at all. This can be used if one just
wants to validate some input.

[def tmml]

This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.

[def wiki]

This engine generates Wiki markup as understood by Jean Claude
Wippler's [syscmd wikit] application.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















|

517
518
519
520
521
522
523































524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543

[def nroff]

This engine generates nroff output, for processing by [syscmd nroff],
or [syscmd groff]. The result will be standard man pages as they are
known in the unix world.
































[def null]

This engine generates no outout at all. This can be used if one just
wants to validate some input.

[def tmml]

This engine generates TMML markup as specified by Joe English. The Tcl
Manpage Markup Language is a derivate of XML.

[def wiki]

This engine generates Wiki markup as understood by Jean Claude
Wippler's [syscmd wikit] application.

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctools.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
# doctools.tcl --
#
#	Implementation of doctools objects for Tcl.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

package require Tcl 8.2
package require textutil::expander





|







1
2
3
4
5
6
7
8
9
10
11
12
# doctools.tcl --
#
#	Implementation of doctools objects for Tcl.
#
# Copyright (c) 2003-2014 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

package require Tcl 8.2
package require textutil::expander

164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#	name	Name of the doctools object.
#	args	Options configuring the new object.
#
# Results:
#	name	Name of the doctools created

proc ::doctools::new {name args} {

    if { [llength [info commands ::$name]] } {
	return -code error "command \"$name\" already exists, unable to create doctools object"
    }
    if {[llength $args] % 2 == 1} {
	return -code error "wrong # args: doctools::new name ?opt val...??"
    }








|







164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#	name	Name of the doctools object.
#	args	Options configuring the new object.
#
# Results:
#	name	Name of the doctools created

proc ::doctools::new {name args} {
    
    if { [llength [info commands ::$name]] } {
	return -code error "command \"$name\" already exists, unable to create doctools object"
    }
    if {[llength $args] % 2 == 1} {
	return -code error "wrong # args: doctools::new name ?opt val...??"
    }

229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
#	Varies based on command to perform

proc ::doctools::DoctoolsProc {name {cmd ""} args} {
    # Do minimal args checks here
    if { [llength [info level 0]] == 2 } {
	error "wrong # args: should be \"$name option ?arg arg ...?\""
    }

    # Split the args into command and args components

    if { [llength [info commands ::doctools::_$cmd]] == 0 } {
	variable commands
	set optlist [join $commands ", "]
	set optlist [linsert $optlist "end-1" "or"]
	return -code error "bad option \"$cmd\": must be $optlist"







|







229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
#	Varies based on command to perform

proc ::doctools::DoctoolsProc {name {cmd ""} args} {
    # Do minimal args checks here
    if { [llength [info level 0]] == 2 } {
	error "wrong # args: should be \"$name option ?arg arg ...?\""
    }
    
    # Split the args into command and args components

    if { [llength [info commands ::doctools::_$cmd]] == 0 } {
	variable commands
	set optlist [join $commands ", "]
	set optlist [linsert $optlist "end-1" "or"]
	return -code error "bad option \"$cmd\": must be $optlist"
1354
1355
1356
1357
1358
1359
1360
1361
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools 1.5.6







|
1354
1355
1356
1357
1358
1359
1360
1361
    # => FOO/mpformats

    #catch {search [file join $here                lib doctools mpformats]}
    #catch {search [file join [file dirname $here] lib doctools mpformats]}
    catch {search [file join $here                             mpformats]}
}

package provide doctools 1.4.19

Changes to modules/doctools/doctools.test.

1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16
# -*- tcl -*-
# doctools.test:  tests for the doctools package.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2003-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]








|

>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- tcl -*-
# doctools.test:  tests for the doctools package.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2003-2010 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: doctools.test,v 1.28 2011/01/13 02:41:44 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

312
313
314
315
316
317
318
319
320

321
322
323
324


325
326
327
328
329
330
331
332
333
334
335
--> (FmtError) Manpage error (body), "plain_text foo" : Plain text not allowed outside of the body of the manpage.}

# -------------------------------------------------------------------------
## Series of tests for all available backends, check their formatting.

set k 11
foreach format {
    html  tmml nroff
    latex text wiki markdown

    desc  list null
} {
    set n 0
    foreach src [TestFilesGlob tests/fmt/man/*] {


	# Get the expected result
	set dst [localPath [file join tests fmt $format [file tail $src]]]
	set map {} ; lappend map @USR@ $tcl_platform(user)
	set rem {} ; lappend rem $tcl_platform(user) @USR@
	if {$format eq "nroff"} {
		lappend map ".so man.macros\n" [fileutil::cat [localPath mpformats/man.macros]]
	}
	if {[catch {
	    set expected [string map $map [fileutil::cat $dst]]
	}]} { set expected **missing** }








|
|
>



|
>
>

|
|
|







314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
--> (FmtError) Manpage error (body), "plain_text foo" : Plain text not allowed outside of the body of the manpage.}

# -------------------------------------------------------------------------
## Series of tests for all available backends, check their formatting.

set k 11
foreach format {
    html  tmml
    nroff latex
    text  wiki
    desc  list null
} {
    set n 0
    foreach src [TestFilesGlob tests/man/*] {
	if {[file tail $src] == "CVS"} continue

	# Get the expected result
	set dst [localPath [file join tests $format [file tail $src]]]
	set map @ID@   ; lappend map \$Id\$ ; lappend map @USR@ $tcl_platform(user)
	set rem \$Id\$ ; lappend rem @ID@   ; lappend $tcl_platform(user) @USR@
	if {$format eq "nroff"} {
		lappend map ".so man.macros\n" [fileutil::cat [localPath mpformats/man.macros]]
	}
	if {[catch {
	    set expected [string map $map [fileutil::cat $dst]]
	}]} { set expected **missing** }

357
358
359
360
361
362
363
364


365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
}


# -------------------------------------------------------------------------
## Test of special 'raw' mode available to the HTML backend.

set n 0
foreach src [TestFilesGlob tests/fmt/man/*] {


    # Get the expected result
    set dst [localPath [file join tests fmt html [file tail $src]]]
    set map {} ; lappend map @USR@ $tcl_platform(user)
    set rem {} ; lappend rem $tcl_platform(user) @USR@

    if {[catch {
	set expected [string map $map [fileutil::cat $dst]]
    }]} { set expected **missing** }

    # Transform regular output to contents of body/, i.e. raw output.
    regsub {</body>.*} $expected {} expected
    regsub {.*<body>}  $expected {} expected
    append expected \n
    #if {$n == 5 || $n == 8} { set expected \n$expected }

    # Run the test ...
    test doctools-html-raw-11.$n "doctools backends, html-raw/[file tail $src]" {
	new mydoctools
	mydoctools configure \
	    -format    html \
	    -module    .MODULE. \







|
>
>

|
|
|









|







362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
}


# -------------------------------------------------------------------------
## Test of special 'raw' mode available to the HTML backend.

set n 0
foreach src [TestFilesGlob tests/man/*] {
    if {[file tail $src] == "CVS"} continue

    # Get the expected result
    set dst [localPath [file join tests html [file tail $src]]]
    set map @ID@   ; lappend map \$Id\$ ; lappend map @USR@ $tcl_platform(user)
    set rem \$Id\$ ; lappend rem @ID@   ; lappend $tcl_platform(user) @USR@

    if {[catch {
	set expected [string map $map [fileutil::cat $dst]]
    }]} { set expected **missing** }

    # Transform regular output to contents of body/, i.e. raw output.
    regsub {</body>.*} $expected {} expected
    regsub {.*<body>}  $expected {} expected
    append expected \n
    if {$n == 5 || $n == 8} { set expected \n$expected }

    # Run the test ...
    test doctools-html-raw-11.$n "doctools backends, html-raw/[file tail $src]" {
	new mydoctools
	mydoctools configure \
	    -format    html \
	    -module    .MODULE. \
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
    incr n
}

# -------------------------------------------------------------------------
## Series of tests for the frontend, cover all possible syntax errors.

set n 0
foreach src [TestFilesGlob tests/fmt/syntax/e_*] {
    set dst      [file join [file dirname $src] r_[string range [file tail ${src}] 2 end]]
    set expected [string trim [fileutil::cat $dst]]

    test doctools-syntax-error-10.$n "doctools frontend, syntax error, [file tail $src]" {
	new mydoctools
	mydoctools configure    \
	    -format    null     \







|







407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
    incr n
}

# -------------------------------------------------------------------------
## Series of tests for the frontend, cover all possible syntax errors.

set n 0
foreach src [TestFilesGlob tests/syntax/e_*] {
    set dst      [file join [file dirname $src] r_[string range [file tail ${src}] 2 end]]
    set expected [string trim [fileutil::cat $dst]]

    test doctools-syntax-error-10.$n "doctools frontend, syntax error, [file tail $src]" {
	new mydoctools
	mydoctools configure    \
	    -format    null     \

Changes to modules/doctools/doctools_intro.man.

95
96
97
98
99
100
101
102
103
respectively.

They are described in their own sets of documents, starting at the
[term {docidx introduction}] and the [term {doctoc introduction}],
respectively.

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

95
96
97
98
99
100
101
102
103
respectively.

They are described in their own sets of documents, starting at the
[term {docidx introduction}] and the [term {doctoc introduction}],
respectively.

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctools_lang_cmdref.man.

462
463
464
465
466
467
468
469
470
Text markup. The argument is marked up as the name of a
[term widget]. The text may have other markup already applied to
it. Main use is the highlighting of widget names in free-form text.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

462
463
464
465
466
467
468
469
470
Text markup. The argument is marked up as the name of a
[term widget]. The text may have other markup already applied to
it. Main use is the highlighting of widget names in free-form text.

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctools_lang_faq.man.

20
21
22
23
24
25
26
27
28

[section OVERVIEW]

[include include/placeholder.inc]
[include include/examples.inc]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

20
21
22
23
24
25
26
27
28

[section OVERVIEW]

[include include/placeholder.inc]
[include include/examples.inc]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctools_lang_intro.man.

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [description]
    [vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]
}]

This also shows us that all doctools documents are split into two
parts, the [term header] and the [term body]. Everything coming before
[lb][cmd description][rb] belongs to the header, and everything coming
after belongs to the body, with the whole document bracketed by the







|







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [description]
    [vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]
}]

This also shows us that all doctools documents are split into two
parts, the [term header] and the [term body]. Everything coming before
[lb][cmd description][rb] belongs to the header, and everything coming
after belongs to the body, with the whole document bracketed by the
116
117
118
119
120
121
122










123
124
125
126
127
128
129
130
131
132
133
134
135










136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155










156
157
158
159
160
161
162
163
164
165
166
167
168
169










170
171
172
173
174
175
176
177
178
179
180
181
182










183
184
185
186
187
188
189
190
191
192










193
194
195
196
197
198
199
200
201










202
203
204
205
206
207
208

[para]

Given the above a less minimal example of a document is

[example_begin]
[lb]manpage_begin NAME SECTION VERSION[rb]










[lb][cmd {copyright {YEAR AUTHOR}}][rb]
[lb][cmd {titledesc TITLE}][rb]
[lb][cmd {moddesc   MODULE_TITLE}][rb]
[lb][cmd {require   PACKAGE VERSION}][rb]
[lb][cmd {require   PACKAGE}][rb]
[lb]description[rb]
[lb]manpage_end[rb]
[example_end]

Remember that the whitespace is optional. The document

[example {
    [manpage_begin NAME SECTION VERSION]










    [copyright {YEAR AUTHOR}][titledesc TITLE][moddesc MODULE_TITLE]
    [require PACKAGE VERSION][require PACKAGE][description]
    [vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]
}]

has the same meaning as the example before.

[para]

On the other hand, if [term whitespace] is present it consists not
only of any sequence of characters containing the space character,
horizontal and vertical tabs, carriage return, and newline, but it may
contain comment markup as well, in the form of the [cmd comment]
command.

[example_begin]
[lb][cmd {comment { ... }}][rb]
[lb]manpage_begin NAME SECTION VERSION[rb]










[lb]copyright {YEAR AUTHOR}[rb]
[lb]titledesc TITLE[rb]
[lb]moddesc   MODULE_TITLE[rb][lb][cmd {comment { ... }}][rb]
[lb]require   PACKAGE VERSION[rb]
[lb]require   PACKAGE[rb]
[lb]description[rb]
[lb]manpage_end[rb]
[lb][cmd {comment { ... }}][rb]
[example_end]

[subsection {Advanced structure}]

In the simple examples of the last section we fudged a bit regarding
the markup actually allowed to be used before the [cmd manpage_begin]










command opening the document.

[para]

Instead of only whitespace the two templating commands [cmd include]
and [cmd vset] are also allowed, to enable the writer to either set
and/or import configuration settings relevant to the document. I.e. it
is possible to write

[example_begin]
[lb][cmd {include FILE}][rb]
[lb][cmd {vset VAR VALUE}][rb]
[lb]manpage_begin NAME SECTION VERSION[rb]










[lb]description[rb]
[lb]manpage_end[rb]
[example_end]

Even more important, these two commands are allowed anywhere where a
markup command is allowed, without regard for any other
structure. I.e. for example in the header as well.

[example_begin]
[lb]manpage_begin NAME SECTION VERSION[rb]










[lb][cmd {include FILE}][rb]
[lb][cmd {vset VAR VALUE}][rb]
[lb]description[rb]
[lb]manpage_end[rb]
[example_end]

The only restriction [cmd include] has to obey is that the contents of
the included file must be valid at the place of the inclusion. I.e. a
file included before [cmd manpage_begin] may contain only the










templating commands [cmd vset] and [cmd include], a file included in
the header may contain only header commands, etc.

[subsection {Text structure}]

The body of the document consists mainly of text, possibly split into
sections, subsections, and paragraphs, with parts marked up to







>
>
>
>
>
>
>
>
>
>













>
>
>
>
>
>
>
>
>
>



|
















>
>
>
>
>
>
>
>
>
>














>
>
>
>
>
>
>
>
>
>













>
>
>
>
>
>
>
>
>
>










>
>
>
>
>
>
>
>
>
>









>
>
>
>
>
>
>
>
>
>







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278

[para]

Given the above a less minimal example of a document is

[example_begin]
[lb]manpage_begin NAME SECTION VERSION[rb]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
[lb][cmd {copyright {YEAR AUTHOR}}][rb]
[lb][cmd {titledesc TITLE}][rb]
[lb][cmd {moddesc   MODULE_TITLE}][rb]
[lb][cmd {require   PACKAGE VERSION}][rb]
[lb][cmd {require   PACKAGE}][rb]
[lb]description[rb]
[lb]manpage_end[rb]
[example_end]

Remember that the whitespace is optional. The document

[example {
    [manpage_begin NAME SECTION VERSION]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
    [copyright {YEAR AUTHOR}][titledesc TITLE][moddesc MODULE_TITLE]
    [require PACKAGE VERSION][require PACKAGE][description]
    [vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]
}]

has the same meaning as the example before.

[para]

On the other hand, if [term whitespace] is present it consists not
only of any sequence of characters containing the space character,
horizontal and vertical tabs, carriage return, and newline, but it may
contain comment markup as well, in the form of the [cmd comment]
command.

[example_begin]
[lb][cmd {comment { ... }}][rb]
[lb]manpage_begin NAME SECTION VERSION[rb]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
[lb]copyright {YEAR AUTHOR}[rb]
[lb]titledesc TITLE[rb]
[lb]moddesc   MODULE_TITLE[rb][lb][cmd {comment { ... }}][rb]
[lb]require   PACKAGE VERSION[rb]
[lb]require   PACKAGE[rb]
[lb]description[rb]
[lb]manpage_end[rb]
[lb][cmd {comment { ... }}][rb]
[example_end]

[subsection {Advanced structure}]

In the simple examples of the last section we fudged a bit regarding
the markup actually allowed to be used before the [cmd manpage_begin]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
command opening the document.

[para]

Instead of only whitespace the two templating commands [cmd include]
and [cmd vset] are also allowed, to enable the writer to either set
and/or import configuration settings relevant to the document. I.e. it
is possible to write

[example_begin]
[lb][cmd {include FILE}][rb]
[lb][cmd {vset VAR VALUE}][rb]
[lb]manpage_begin NAME SECTION VERSION[rb]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
[lb]description[rb]
[lb]manpage_end[rb]
[example_end]

Even more important, these two commands are allowed anywhere where a
markup command is allowed, without regard for any other
structure. I.e. for example in the header as well.

[example_begin]
[lb]manpage_begin NAME SECTION VERSION[rb]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
[lb][cmd {include FILE}][rb]
[lb][cmd {vset VAR VALUE}][rb]
[lb]description[rb]
[lb]manpage_end[rb]
[example_end]

The only restriction [cmd include] has to obey is that the contents of
the included file must be valid at the place of the inclusion. I.e. a
file included before [cmd manpage_begin] may contain only the
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
templating commands [cmd vset] and [cmd include], a file included in
the header may contain only header commands, etc.

[subsection {Text structure}]

The body of the document consists mainly of text, possibly split into
sections, subsections, and paragraphs, with parts marked up to
221
222
223
224
225
226
227










228
229
230
231
232
233
234
of this command closes the previous paragraph and automatically opens
the next. The first paragraph is automatically opened at the beginning
of the body, by [cmd description]. In the same manner the last
paragraph automatically ends at [cmd manpage_end].

[example_begin]
[lb]manpage_begin NAME SECTION VERSION[rb]










[lb]description[rb]
 ...
[lb][cmd para][rb]
 ...
[lb][cmd para][rb]
 ...
[lb]manpage_end[rb]







>
>
>
>
>
>
>
>
>
>







291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
of this command closes the previous paragraph and automatically opens
the next. The first paragraph is automatically opened at the beginning
of the body, by [cmd description]. In the same manner the last
paragraph automatically ends at [cmd manpage_end].

[example_begin]
[lb]manpage_begin NAME SECTION VERSION[rb]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
[lb]description[rb]
 ...
[lb][cmd para][rb]
 ...
[lb][cmd para][rb]
 ...
[lb]manpage_end[rb]
250
251
252
253
254
255
256










257
258
259
260
261
262
263
[para]

Empty sections are [emph not] ignored. We are free to (not) use
paragraphs within sections.

[example_begin]
[lb]manpage_begin NAME SECTION VERSION[rb]










[lb]description[rb]
 ...
[lb][cmd {section {Section A}}][rb]
 ...
[lb]para[rb]
 ...
[lb][cmd {section {Section B}}][rb]







>
>
>
>
>
>
>
>
>
>







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
[para]

Empty sections are [emph not] ignored. We are free to (not) use
paragraphs within sections.

[example_begin]
[lb]manpage_begin NAME SECTION VERSION[rb]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
[lb]description[rb]
 ...
[lb][cmd {section {Section A}}][rb]
 ...
[lb]para[rb]
 ...
[lb][cmd {section {Section B}}][rb]
277
278
279
280
281
282
283










284
285
286
287
288
289
290
[para]

Empty subsections are [emph not] ignored. We are free to (not) use
paragraphs within subsections.

[example_begin]
[lb]manpage_begin NAME SECTION VERSION[rb]










[lb]description[rb]
 ...
[lb]section {Section A}[rb]
 ...
[lb][cmd {subsection {Sub 1}}][rb]
 ...
[lb]para[rb]







>
>
>
>
>
>
>
>
>
>







367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
[para]

Empty subsections are [emph not] ignored. We are free to (not) use
paragraphs within subsections.

[example_begin]
[lb]manpage_begin NAME SECTION VERSION[rb]
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
[lb]description[rb]
 ...
[lb]section {Section A}[rb]
 ...
[lb][cmd {subsection {Sub 1}}][rb]
 ...
[lb]para[rb]
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
highlighting added.

It shows their use within a block of text, as the arguments of a list
item command ([cmd call]), and our ability to nest them.

[example_begin]
  ...
  [lb]call [lb][cmd {cmd arg_def}][rb] [lb][cmd {arg type}][rb] [lb][cmd {arg name}][rb] [lb][cmd opt] [lb][cmd {arg mode}][rb][rb][rb]

  Text structure. List element. Argument list. Automatically closes the
  previous list element. Specifies the data-[lb][cmd {arg type}][rb] of the described
  argument of a command, its [lb][cmd {arg name}][rb] and its i/o-[lb][cmd {arg mode}][rb]. The
  latter is optional.
  ...
[example_end]







|







452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
highlighting added.

It shows their use within a block of text, as the arguments of a list
item command ([cmd call]), and our ability to nest them.

[example_begin]
  ...
  [lb]call [lb][cmd {cmd arg_def}][rb] [lb][cmd {arg type}][rb] [lb][cmd {arg name}][rb]] [lb][cmd opt] [lb][cmd {arg mode}][rb][rb][rb]

  Text structure. List element. Argument list. Automatically closes the
  previous list element. Specifies the data-[lb][cmd {arg type}][rb] of the described
  argument of a command, its [lb][cmd {arg name}][rb] and its i/o-[lb][cmd {arg mode}][rb]. The
  latter is optional.
  ...
[example_end]
417
418
419
420
421
422
423










424
425
426
427
428
429
430

[list_end]

[para]

All the cross-reference commands can occur anywhere in the document
between [cmd manpage_begin] and [cmd manpage_end]. As such the writer










can choose whether she wants to have them at the beginning of the
body, or at its end, maybe near the place a keyword is actually
defined by the main content, or considers them as meta data which
should be in the header, etc.

[para]








>
>
>
>
>
>
>
>
>
>







517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540

[list_end]

[para]

All the cross-reference commands can occur anywhere in the document
between [cmd manpage_begin] and [cmd manpage_end]. As such the writer
[see_also doctools_intro]
[see_also doctools_lang_cmdref]
[see_also doctools_lang_faq]
[see_also doctools_lang_syntax]
[keywords {doctools commands}]
[keywords {doctools language}]
[keywords {doctools markup}]
[keywords {doctools syntax}]
[keywords markup]
[keywords {semantic markup}]
can choose whether she wants to have them at the beginning of the
body, or at its end, maybe near the place a keyword is actually
defined by the main content, or considers them as meta data which
should be in the header, etc.

[para]

609
610
611
612
613
614
615
616
617
To be able to validate a document while writing it, it is also
recommended to familiarize oneself with one of the applications for
the processing and conversion of doctools documents, i.e. either
Tcllib's easy and simple [syscmd dtplite], or Tclapps'
ultra-configurable [syscmd dtp].

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

719
720
721
722
723
724
725
726
727
To be able to validate a document while writing it, it is also
recommended to familiarize oneself with one of the applications for
the processing and conversion of doctools documents, i.e. either
Tcllib's easy and simple [syscmd dtplite], or Tclapps'
ultra-configurable [syscmd dtp].

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctools_lang_syntax.man.

134
135
136
137
138
139
140
141
142
enum_list   = [ <WHITE> ] { ENUM         paras }
item_list   = [ <WHITE> ] { ITEM         paras }
optd_list   = [ <WHITE> ] { OPT_DEF      paras }
tkoptd_list = [ <WHITE> ] { TKOPTION_DEF paras }
}]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

134
135
136
137
138
139
140
141
142
enum_list   = [ <WHITE> ] { ENUM         paras }
item_list   = [ <WHITE> ] { ITEM         paras }
optd_list   = [ <WHITE> ] { OPT_DEF      paras }
tkoptd_list = [ <WHITE> ] { TKOPTION_DEF paras }
}]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/doctools_plugin_apiref.man.

470
471
472
473
474
475
476
477
478
[para] The formatted text is expected as the result of the command,
and added to the output. If no special processing is required it has
to simply return its argument without change.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

470
471
472
473
474
475
476
477
478
[para] The formatted text is expected as the result of the command,
and added to the output. If no special processing is required it has
to simply return its argument without change.

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/mpexpand.man.

99
100
101
102
103
104
105
106
107

[section NOTES]
[para]

Possible future formats are plain text, pdf and postscript.

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

99
100
101
102
103
104
105
106
107

[section NOTES]
[para]

Possible future formats are plain text, pdf and postscript.

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools/mpformats/_common.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
	return $state(mdesc)
    }
    return $state(tdesc)
}

proc c_copyrightsymbol {} {return "(c)"}
proc c_set_copyright {text} {global state ; lappend state(copyright) $text ; return}
proc c_get_copyright {} {
    return [join [c_get_copyright_r] \n]
}
proc c_get_copyright_r {} {
    global state

    set cc $state(copyright)
    if {$cc == {}} {set cc [dt_copyright]}
    if {$cc == {}} {return {}}

    set stmts {}
    set re {^Copyright +(?:\(c\)|\\\(co|&copy;)? *(.+)$}
    foreach stmt $cc {
	if { [string equal -nocase "public domain" [string trim $stmt]] } {
            lappend stmts "Public domain"
	} elseif { [regexp -nocase -- $re $stmt -> stmt] } {
            lappend stmts $stmt
	} else {
            lappend stmts "Copyright [c_copyrightsymbol] $stmt"
	}
    }

    return $stmts
}

proc c_provenance {} {
    return "Generated from file '[file tail [dt_ibase]]' by tcllib/doctools with format '[dt_format]'"
}

################################################################







<
<
<
|


















|







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
89
90
91
92
93
94
95
96
97
	return $state(mdesc)
    }
    return $state(tdesc)
}

proc c_copyrightsymbol {} {return "(c)"}
proc c_set_copyright {text} {global state ; lappend state(copyright) $text ; return}



proc c_get_copyright {}     {
    global state

    set cc $state(copyright)
    if {$cc == {}} {set cc [dt_copyright]}
    if {$cc == {}} {return {}}

    set stmts {}
    set re {^Copyright +(?:\(c\)|\\\(co|&copy;)? *(.+)$}
    foreach stmt $cc {
	if { [string equal -nocase "public domain" [string trim $stmt]] } {
            lappend stmts "Public domain"
	} elseif { [regexp -nocase -- $re $stmt -> stmt] } {
            lappend stmts $stmt
	} else {
            lappend stmts "Copyright [c_copyrightsymbol] $stmt"
	}
    }

    return [join $stmts \n]
}

proc c_provenance {} {
    return "Generated from file '[file tail [dt_ibase]]' by tcllib/doctools with format '[dt_format]'"
}

################################################################
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
######################################################################
# Cross-reference tracking (for a single file).
#
global SectionNames	;# array mapping 'section name' to 'reference id'
global SectionList      ;# List of sections, their ids, and levels, in
set    SectionList {}   ;# order of definition.

proc c_sections {} {
    global SectionList
    set    SectionList
}

proc c_sectionKnown {id} {
    global SectionNames
    info exists SectionNames($id)
}

# sectionId --
#	Format section name as an XML ID.
#
proc c_sectionId {name} {
    # Identical to '__sid' in checker.tcl
    regsub -all {[ 	]+} [string tolower [string trim $name]] _ id
    regsub -all {"} $id _ id ; # "
    return $id
}
    
# possibleReference text gi --
#	Check if $text is a potential cross-reference;
#	if so, format as a reference;
#	otherwise format as a $gi element.
#
proc c_possibleReference {text gi {label {}}} {
    global SectionNames







<
<
<
<
<
<
<
<
<
<









|







201
202
203
204
205
206
207










208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
######################################################################
# Cross-reference tracking (for a single file).
#
global SectionNames	;# array mapping 'section name' to 'reference id'
global SectionList      ;# List of sections, their ids, and levels, in
set    SectionList {}   ;# order of definition.











# sectionId --
#	Format section name as an XML ID.
#
proc c_sectionId {name} {
    # Identical to '__sid' in checker.tcl
    regsub -all {[ 	]+} [string tolower [string trim $name]] _ id
    regsub -all {"} $id _ id ; # "
    return $id
}

# possibleReference text gi --
#	Check if $text is a potential cross-reference;
#	if so, format as a reference;
#	otherwise format as a $gi element.
#
proc c_possibleReference {text gi {label {}}} {
    global SectionNames

Changes to modules/doctools/mpformats/_html.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
# Copyright (c) 2001-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# Helper rules for the creation of the memchan website from the .exp files.
# General formatting instructions ...
#
# htmlEscape text --
#	Replaces HTML markup characters in $text with the
#	appropriate entity references.
#

global textMap;
set    textMap {

|



|







1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
# Copyright (c) 2001-2008 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# Helper rules for the creation of the memchan website from the .exp files.
# General formatting instructions ...

# htmlEscape text --
#	Replaces HTML markup characters in $text with the
#	appropriate entity references.
#

global textMap;
set    textMap {
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

    if 0 {
	puts_stderr @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
	puts_stderr $text
	puts_stderr @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    }

    return [string trimleft $text]
}

# markup text --
#	Protect markup characters in $text with \1.
#	These will be stripped out in PostProcess.
#
proc markup {text} {
    global markupMap
    return [string map $markupMap $text]
}

proc use_bg {} {
    set c [bgcolor]
    #puts stderr "using $c"
    if {$c == {}} {return ""}
    return bgcolor=$c
}

proc MakeLink {l t} { link $l $t }

proc nbsp   {}         {return [markup "&nbsp;"]}
proc p      {}         {return [markup <p>]}
proc ptop   {}         {return [markup "<p valign=top>"]}
proc td     {}         {return [markup "<td [use_bg]>"]}
proc trtop  {}         {return [markup "<tr valign=top [use_bg]>"]}
proc tr     {}         {return [markup "<tr            [use_bg]>"]}







|


















<







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

116
117
118
119
120
121
122

    if 0 {
	puts_stderr @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
	puts_stderr $text
	puts_stderr @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    }

    return $text
}

# markup text --
#	Protect markup characters in $text with \1.
#	These will be stripped out in PostProcess.
#
proc markup {text} {
    global markupMap
    return [string map $markupMap $text]
}

proc use_bg {} {
    set c [bgcolor]
    #puts stderr "using $c"
    if {$c == {}} {return ""}
    return bgcolor=$c
}



proc nbsp   {}         {return [markup "&nbsp;"]}
proc p      {}         {return [markup <p>]}
proc ptop   {}         {return [markup "<p valign=top>"]}
proc td     {}         {return [markup "<td [use_bg]>"]}
proc trtop  {}         {return [markup "<tr valign=top [use_bg]>"]}
proc tr     {}         {return [markup "<tr            [use_bg]>"]}
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
	taga $t $args
    } else {
	tag $t
    }
}

proc ht_comment {text}   {
    return "[markup <]!-- [htmlEscape [join [split $text \n] "   -- "]]\n   --[markup >]"
}

# wrap content gi --
#	Returns $content wrapped inside <$gi> ... </$gi> tags.
#
proc wrap {content gi} {
    return "[tag $gi]${content}[tag/ $gi]"







|







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
	taga $t $args
    } else {
	tag $t
    }
}

proc ht_comment {text}   {
    return "[markup <]! -- [join [split $text \n] "   -- "]\n   --[markup >]"
}

# wrap content gi --
#	Returns $content wrapped inside <$gi> ... </$gi> tags.
#
proc wrap {content gi} {
    return "[tag $gi]${content}[tag/ $gi]"

Deleted modules/doctools/mpformats/_markdown.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# -*- tcl -*-
##
# Support for markdown, overrides parts of coore text.
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
##
# # ## ### ##### ########

# # ## ### ##### ########
## `markdown` formatting

proc SectTitle {lb title} {
    upvar 1 $lb lines
    lappend lines "[Hash] $title"
    return
}

proc SubsectTitle {lb title} {
    upvar 1 $lb lines
    lappend lines "[Hash][Hash] $title"
    return
}

proc Sub3Title {lb title} {
    upvar 1 $lb lines
    lappend lines "[Hash][Hash][Hash] $title"
    return
}

proc Sub4Title {lb title} {
    upvar 1 $lb lines
    lappend lines "[Hash][Hash][Hash][Hash] $title"
    return
}

proc _Strong {text} { return [Undr][Undr]${text}[Undr][Undr] }
proc _Em     {text} { return [Star]${text}[Star] }

##
# # ## ### ##### ########
##

set __comments 0

proc MDCInit {} { global __comments ; set __comments 0 }

proc MDComment {text} {
    global __comments
    Text "\n[OBrk]//[format %09d [incr __comments]][CBrk]: [Hash] [OPar]$text[CPar]"
}

proc MDCDone {} {
    TextTrimLeadingSpace
    CloseParagraph [Verbatim]
}

##
# # ## ### ##### ########
##

proc MakeLink {l t} { ALink $t $l } ;# - xref - todo: consolidate

proc ALink {dst label} { return "[OBrk]$label[CBrk][OPar]$dst[CPar]" }

proc SetAnchor {text {name {}}} {
    if {$name == {}} { set name [Anchor $text] }
    return "<a name='$name'></a>$text"
}

proc Anchor {text} {
    global kwid
    if {[info exists kwid($text)]} {
	return "$kwid($text)"
    }
    return [A $text]
}

proc A {text} {
    set anchor [regsub -all {[^a-zA-Z0-9]} [string tolower $text] {_}]
    set anchor [regsub -all {__+} $anchor [Undr]]
    return $anchor
}

# Generate special code sequences for markdown command characters.  At
# the end of the render the command sequences are converted to regular
# final form whereas all unprotected special characters are quoted.

proc Back {} { return "\1\\" }
proc Tick {} { return "\1`" }
proc Star {} { return "\1*" }
proc Undr {} { return "\1_" }
proc Hash {} { return "\1#" }
proc Plus {} { return "\1+" }
proc Dash {} { return "\1-" }
proc Dot  {} { return "\1." }
proc Bang {} { return "\1!" }
proc OBra {} { return "\1\{" }
proc CBra {} { return "\1\}" }
proc OBrk {} { return "\1\[" }
proc CBrk {} { return "\1\]" }
proc OPar {} { return "\1(" }
proc CPar {} { return "\1)" }
proc VBar {} { return "\1|" }

proc LB  {} { return "\1\n" }
proc LB. {} { return "\1" }

proc c_copyrightsymbol {} {return "&copy;"}

# Modified bulleting

DIB [list [Dash] [Star] [Plus]]
DEB [list "1[Dot]" "1[CPar]"]

proc Unmark {x} {
    lappend map "\1\n" "  \n"
    # Marked special characters are commands. Convert into regular
    # form. Unmarked special characters need quoting.
    lappend map \1\\ \\
    lappend map \1`  `
    lappend map \1*  *
    lappend map \1_  _
    lappend map \1#  "#"
    lappend map \1+  +
    lappend map \1-  -
    lappend map \1.  .
    lappend map \1!  !
    lappend map \1\{ \{
    lappend map \1\} \}
    lappend map \1\[ \[
    lappend map \1\] \]
    lappend map \1(  (
    lappend map \1)  )
    lappend map \1|  |

    lappend map \\ \\\\
    lappend map `  \\`
    lappend map *  \\*
    lappend map _  \\_
    lappend map "#" "\\#"
    lappend map +  \\+
    lappend map -  \\-
    lappend map .  \\.
    lappend map !  \\!
    lappend map \{ \\\{
    lappend map \} \\\}
    lappend map \[ \\\[
    lappend map \] \\\]
    lappend map (  \\(
    lappend map )  \\)
    lappend map | "&#124;"

    #puts_stderr ZZZ(($x))
    set x [string map $map $x]

    #puts_stderr ZZZ<<$x>>
    set x
}

# Invert handling of special characters for text specified by the
# user, i.e. engine parameters of some kind.
#
# Quoted special characters are unquoted, and unquoted special
# characters get marked/protected.

proc Mark {x} {
    # Dequote non-special specials.
    lappend map \\\\     \\
    lappend map \\`	 `
    lappend map \\*	 *
    lappend map \\_	 _
    lappend map "\\#"	 "#"
    lappend map \\+	 +
    lappend map \\-	 -
    lappend map \\.	 .
    lappend map \\!	 !
    lappend map \\\{	 \{
    lappend map \\\}	 \}
    lappend map \\\[	 \[
    lappend map \\\]	 \]
    lappend map \\(	 (
    lappend map \\)	 )
    lappend map "&#124;" |

    # Protect special specials
    lappend map \\  \1\\
    lappend map `   \1`
    lappend map *   \1*
    lappend map _   \1_
    lappend map "#" \1#
    lappend map +   \1+
    lappend map -   \1-
    lappend map .   \1.
    lappend map !   \1!
    lappend map \{  \1\{
    lappend map \}  \1\}
    lappend map \[  \1\[
    lappend map \]  \1\]
    lappend map (   \1(
    lappend map )   \1)
    lappend map |   \1|

    #puts_stderr ZZZ(($x))
    set x [string map $map $x]

    #puts_stderr ZZZ<<$x>>
    set x
}

rename PostProcess PostProcessT
proc PostProcess {text} { Unmark [PostProcessT $text] }

##
# # ## ### ##### ########
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































Changes to modules/doctools/mpformats/_nroff.tcl.

1
2
3
4
5

6
7
8
9
10
11
12
# -*- tcl -*-
#
# -- nroff commands
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>


################################################################
# nroff specific commands
#
# All dot-commands (f.e. .PP) are returned with a leading \n\1,
# enforcing that they are on a new line and will be protected as markup.
# Any empty line created because of this is filtered out in the 




|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
#
# -- nroff commands
#
# Copyright (c) 2003-2005 Andreas Kupries <andreas_kupries@sourceforge.net>


################################################################
# nroff specific commands
#
# All dot-commands (f.e. .PP) are returned with a leading \n\1,
# enforcing that they are on a new line and will be protected as markup.
# Any empty line created because of this is filtered out in the 
173
174
175
176
177
178
179
180
181
182

    lappend map	\n\1.IP\n\1.\1.\n  \n\1.IP\n\1.\1.\n
    lappend map \n\1.IP\n\1.       \n\1.

    set lines [string map $map $lines]

    # Return the modified result buffer
    return [string trim [string map $finalMap $lines]]\n
}








|


174
175
176
177
178
179
180
181
182
183

    lappend map	\n\1.IP\n\1.\1.\n  \n\1.IP\n\1.\1.\n
    lappend map \n\1.IP\n\1.       \n\1.

    set lines [string map $map $lines]

    # Return the modified result buffer
    return [string map $finalMap $lines]
}

Changes to modules/doctools/mpformats/_text.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
#
# -- Core support for text engines.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.

################################################################

if {0} {
    catch {rename proc proc__} msg ; puts_stderr >>$msg
    proc__ proc {cmd argl body} {
	puts_stderr "proc $cmd $argl ..."


|
|
<
<







1
2
3
4


5
6
7
8
9
10
11
# -*- tcl -*-
#
# _text.tcl -- Core support for text engines.




################################################################

if {0} {
    catch {rename proc proc__} msg ; puts_stderr >>$msg
    proc__ proc {cmd argl body} {
	puts_stderr "proc $cmd $argl ..."
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
    puts_stderr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    rename proc {}
    rename proc__ proc
    puts_stderr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}


































































































































































































































































































































































































proc parray_stderr {a {pattern *}} {
    upvar 1 $a array
    if {![array exists array]} {
        error "\"$a\" isn't an array"
    }
    set maxl 0
    foreach name [lsort [array names array $pattern]] {
        if {[string length $name] > $maxl} {
            set maxl [string length $name]
        }
    }
    set maxl [expr {$maxl + [string length $a] + 2}]
    foreach name [lsort [array names array $pattern]] {
        set nameString [format %s(%s) $a $name]
        puts_stderr "    [format "%-*s = {%s}" $maxl $nameString $array($name)]"
    }
}

# # ## ### ##### ########
##

dt_source _text_utils.tcl
# Formatting utilities

dt_source _text_margin.tcl
# RMargin, LMI

dt_source _text_state.tcl
# On, Off, IsOff

dt_source _text_para.tcl
# Text, Text?, TextClear, TextPlain (-> IsOff)

dt_source _text_cstack.tcl
# ContextReset, ContextPush, ContextPop (-> CAttrCurrent, ContextSet)

dt_source _text_ccore.tcl
# ContextSetup, ContextSet, ContextNew, ContextCommit, CAttrName, CAttrCurrent,
# CAttrRef, CAttrUnset, CAttrSet, CAttrAppend, CAttrIncr, CAttrGet, CAttrHas

dt_source _text_bullets.tcl
# DIB, IBullet (-> CAttrRef)
# DEB, EBullet (-> CAttrRef)

dt_source _text_dlist.tcl
# DListClear, Section, Subsection, CloseParagraph (-> Text?, TextClear, CAttrCurrent)
# PostProcess
# - SECT    (-> SectTitle)
# - SUBSECT (-> SubsectTitle)
# - PARA (-> TEXT context accessors)

# # ## ### ##### ########
##

proc TextInitialize {} {
    DListClear
    TextClear
    ContextReset
    Off
    ContextSetup
    
    # Root context
    ContextNew Base {
	MarginReset
	PrefixReset
	WPrefixReset
	VerbatimOff
	ListNone
	BulletReset
	ItemReset
	EnumReset
    }
    return
}

# # ## ### ##### ########
## `text` formatting

proc SectTitle {lb title} {
    upvar 1 $lb lines
    #lappend lines ""
    lappend lines $title
    lappend lines [RepeatM = $title]
    return
}

proc SubsectTitle {lb title} {
    upvar 1 $lb lines
    #lappend lines ""
    lappend lines $title
    lappend lines [RepeatM - $title]
    return
}

proc Strong {text} { SplitLine $text _Strong }
proc Em     {text} { SplitLine $text _Em }

proc _Strong {text} { return *${text}* }
proc _Em     {text} { return _${text}_ }

proc SplitLine {text cmd} {
    #puts_stderr AAA/SLI=[string map [list \1 \\1 \t \\t { } \\s] <<[join [split $text \n] >>\n<<]>>]
    if {![string match *\n* $text]} {
	foreach {lead content} [LeadSplit $text] break
	return ${lead}[uplevel 1 [list $cmd $content]]
    }
    set r {}   
    foreach line [split $text \n] {
	foreach {lead content} [LeadSplit $line] break
	if {$content == {}} {
	    lappend r {}
	    continue
	}
	lappend r ${lead}[uplevel 1 [list $cmd $content]]
    }
    set text [string trimright [join $r \n]]\n
    #puts_stderr AAA/SLE=[string map [list \1 \\1 \t \\t { } \\s] <<[join [split $text \n] >>\n<<]>>]
    return $text
}

proc LeadSplit {line} {
    regexp {^([ \t]*)(.*)([ \t]*)$} $line -> lead content _
    list $lead $content
}

# # ## ### ##### ########
## Bulleting
#
# itembullet  = index of the bullet to use in the next itemized list
# enumbullet  = index of the bullet to use in the next enumerated list

proc EnumReset {} { CAttrSet enumbullet 0 }
proc ItemReset {} { CAttrSet itembullet 0 }

# # ## ### ##### ########
##

proc text_plain_text  {text} { TextPlain   $text }
proc text_postprocess {text} { PostProcess $text }

#return

# Debugging
proc text_postprocess {text} {
    if {[set code [catch {
	PostProcess $text
    } res]]} {
	global errorInfo errorCode
	puts_stderr
	puts_stderr $errorCode
	puts_stderr $errorInfo
	return -code $code -errorinfo $errorInfo -errorcode $errorCode $msg
    }
    return $res
}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


















<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429


430






































































































































    puts_stderr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    rename proc {}
    rename proc__ proc
    puts_stderr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}


################################################################
# Formatting constants ... Might be engine variables in the future.

global lmarginIncrement ; set lmarginIncrement 4
global rmarginThreshold ; set rmarginThreshold 20
global bulleting        ; set bulleting        {* - # @ ~ %}
global enumeration      ; set enumeration      {[%] (%) <%>}

proc Bullet {ivar} {
    global bulleting ; upvar $ivar i
    set res [lindex $bulleting $i]
    set i [expr {($i + 1) % [llength $bulleting]}]
    return $res
}

proc EnumBullet {ivar} {
    global enumeration ; upvar $ivar i
    set res [lindex $enumeration $i]
    set i [expr {($i + 1) % [llength $enumeration]}]
    return $res
}

################################################################

#
# The engine maintains several data structures per document and pass.
# Most important is an internal representation of the text better
# suited to perform the final layouting, the display list. Elements of
# the display list are lists containing 2 elements, an operation, and
# its arguments, in this order. The arguments are a list again, its
# contents are specific to the operation.
#
# The operations are:
#
# - SECT	Section.    Title.
# - SUBSECT     Subsection. Title.
# - PARA	Paragraph.  Environment reference and text.
#
# The PARA operation is the workhorse of the engine, dooing all the
# formatting, using the information in an "environment" as the guide
# for doing so. The environments themselves are generated during the
# second pass through the contents. They contain the information about
# nesting (i.e. indentation), bulleting and the like.
#

global cmds ; set cmds [list]   ; # Display list
global pEnv ; array set pEnv {} ; # Defined paragraph environments (bulleting, indentation, other).
global para ; set para ""       ; # Text buffer for paragraphs.

global nextId     ; set       nextId     0      ; # Counter for environment generation.
global currentId  ; set       currentId  {}     ; # Id of current environment in 'pEnv'
global currentEnv ; array set currentEnv {}     ; # Current environment, expanded form.
global contexts   ; set       contexts   [list] ; # Stack of saved environments.
global off        ; set off   1                 ; # Supression of plain text in some places.

################################################################
# Management of the current context.

proc Text  {text}    {global para ; append para $text ; return}
proc Store {op args} {global cmds ; lappend cmds [list $op $args] ; return}
proc Off   {}        {global off ; set off 1 ; return}
proc On    {}        {global off para ; set off 0 ; set para "" ; return}
proc IsOff {}        {global off ; return [expr {$off == 1}]}

# Debugging ...
#proc Text  {text}    {puts_stderr "TXT \{$text\}"; global para; append para $text ; return}
#proc Store {op args} {puts_stderr "STO $op $args"; global cmds; lappend cmds [list $op $args]; return}
#proc Off   {}        {puts_stderr OFF ; global off ; set off 1 ; return}
#proc On    {}        {puts_stderr ON_ ; global off para ; set off 0 ; set para "" ; return}


proc NewEnv {name script} {
    global currentId  nextId currentEnv

    #puts_stderr "NewEnv ($name)"

    set    parentId  $currentId
    set    currentId $nextId
    incr              nextId

    append currentEnv(NAME) -$parentId-$name
    set currentEnv(parent) $parentId
    set currentEnv(id)     $currentId

    # Always squash a verbatim environment inherited from the previous
    # environment ...
    catch {unset currentEnv(verbenv)}

    uplevel $script
    SaveEnv
    return $currentId
}

################################################################

proc TextInitialize {} {
    global off  ; set off 1
    global cmds ; set cmds [list]   ; # Display list
    global pEnv ; array set pEnv {} ; # Defined paragraph environments (bulleting, indentation, other).
    global para ; set para ""       ; # Text buffer for paragraphs.

    global nextId     ; set       nextId     0      ; # Counter for environment generation.
    global currentId  ; set       currentId  {}     ; # Id of current environment in 'pEnv'
    global currentEnv ; array set currentEnv {}     ; # Current environment, expanded form.
    global contexts   ; set       contexts   [list] ; # Stack of saved environments.

    # lmargin  = location of left margin for text.
    # prefix   = prefix string to use for all lines.
    # wspfx    = whitespace prefix for all but the first line
    # listtype = type of list, if any
    # bullet   = bullet to use for unordered, bullet template for ordered.
    # verbatim = flag if verbatim formatting requested.
    # next     = if present the environment to use after closing the paragraph using this one.

    NewEnv Base {
	array set currentEnv {
	    lmargin     0
	    prefix      {}
	    wspfx       {}
	    listtype    {}
	    bullet      {}
	    verbatim    0
	    bulleting   0
	    enumeration 0
	}
    }
    return
}

################################################################

proc Section    {name} {Store SECT    $name ; return}
proc Subsection {name} {Store SUBSECT $name ; return}

proc CloseParagraph {{id {}}} {
    global para currentId
    if {$para != {}} {
	if {$id == {}} {set id $currentId}
	Store PARA $id $para
	#puts_stderr "CloseParagraph $id"
    }
    set para ""
    return
} 

proc SaveContext {} {
    global  contexts  currentId
    lappend contexts $currentId

    #global currentEnv ; puts_stderr "Save>> $currentId ($currentEnv(NAME))"
    return
}

proc RestoreContext {} {
    global                contexts
    SetContext   [lindex $contexts end]
    set contexts [lrange $contexts 0 end-1]

    #global currentId currentEnv ; puts_stderr "<<Restored $currentId ($currentEnv(NAME))"
    return
}

proc SetContext {id} {
    global    currentId currentEnv pEnv
    set       currentId $id

    # Ensure that array is clean before setting hte new block of
    # information.
    unset     currentEnv
    array set currentEnv $pEnv($currentId)

    #puts_stderr "--Set $currentId ($currentEnv(NAME))"
    return
}

proc SaveEnv {} {
    global pEnv  currentId             currentEnv
    set    pEnv($currentId) [array get currentEnv]
    return
}

################################################################

proc NewVerbatim {} {
    global currentEnv
    return [NewEnv Verbatim {set currentEnv(verbatim) 1}]
}

proc Verbatim {} {
    global currentEnv
    if {![info exists currentEnv(verbenv)]} {
	SaveContext
	set verb [NewVerbatim]
	RestoreContext

	# Remember verbatim mode in the base environment
	set currentEnv(verbenv) $verb
	SaveEnv
    }
    return $currentEnv(verbenv)
}

################################################################

proc text_plain_text {text} {
    #puts_stderr "<<text_plain_text>>"

    if  {[IsOff]} {return}

    # Note: Whenever we get plain text it is possible that a macro for
    # visual markup actually generated output before the expander got
    # to the current text. This output was captured by the expander in
    # its current context. Given the current organization of the
    # engine we have to retrieve this formatted text from the expander
    # or it will be lost. This is the purpose of the 'ctopandclear',
    # which retrieves the data and also clears the capture buffer. The
    # latter to prevent us from retrieving it again later, after the
    # next macro added more data.

    set text [ex_ctopandclear]$text

    # ... TODO ... Handling of example => verbatim

    if {[string length [string trim $text]] == 0} return

    Text $text
    return
}

################################################################

proc text_postprocess {text} {

    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    #puts_stderr <<$text>>
    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    global cmds
    # The argument is not relevant. Access the display list, perform
    # the final layouting and return its result.

    set linebuffer [list]
    array set state {lmargin 0 rmargin 0}
    foreach cmd $cmds {
	foreach {op arguments} $cmd break
	$op $arguments
    }

    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    return [join $linebuffer \n]
}


proc SECT {text} {
    upvar linebuffer linebuffer

    # text is actually the list of arguments, having one element, the text.
    set text [lindex $text 0]
    #puts_stderr "SECT $text"
    #puts_stderr ""

    # Write section title, underline it

    lappend linebuffer ""
    lappend linebuffer $text
    lappend linebuffer [textutil::repeat::strRepeat = [string length $text]]
    return
}

proc SUBSECT {text} {
    upvar linebuffer linebuffer

    # text is actually the list of arguments, having one element, the text.
    set text [lindex $text 0]
    #puts_stderr "SUBSECT $text"
    #puts_stderr ""

    # Write subsection title, underline it (with less emphasis)

    lappend linebuffer ""
    lappend linebuffer $text
    lappend linebuffer [textutil::repeat::strRepeat - [string length $text]]
    return
}

proc PARA {arguments} {
    global pEnv
    upvar linebuffer linebuffer

    foreach {env text} $arguments break
    array set para $pEnv($env)

    #puts_stderr "PARA $env"
    #parray_stderr para
    #puts_stderr "     \{$text\}"
    #puts_stderr ""

    # Use the information in the referenced environment to format the paragraph.

    if {$para(verbatim)} {
	set text [textutil::adjust::undent $text]
    } else {
	# The size is determined through the set left and right margins
	# right margin is fixed at 80, left margin is variable. Size
	# is at least 20. I.e. when left margin > 60 right margin is
	# shifted out to the right.

	set size [expr {80 - $para(lmargin)}]
	if {$size < 20} {set size 20}

	set text [textutil::adjust::adjust $text -length $size]
    }

    # Now apply prefixes, (ws prefixes bulleting), at last indentation.

    if {[string length $para(prefix)] > 0} {
	set text [textutil::adjust::indent $text $para(prefix)]
    }

    if {$para(listtype) != {}} {
	switch -exact $para(listtype) {
	    bullet {
		# Indent for bullet, but not the first line. This is
		# prefixed by the bullet itself.

		set thebullet $para(bullet)
	    }
	    enum {
		# Handling the enumeration counter. Special case: An
		# example as first paragraph in an item has to use the
		# counter in environment it is derived from to prevent
		# miscounting.

		if {[info exists para(example)]} {
		    set parent $para(parent)
		    array set __ $pEnv($parent)
		    if {![info exists __(counter)]} {
			set __(counter) 1
		    } else {
			incr __(counter)
		    }
		    set pEnv($parent) [array get __] ; # Save context change ...
		    set n $__(counter)
		} else {
		    if {![info exists para(counter)]} {
			set para(counter) 1
		    } else {
			incr para(counter)
		    }
		    set pEnv($env) [array get para] ; # Save context change ...
		    set n $para(counter)
		}

		set thebullet [string map [list % $n] $para(bullet)]
	    }
	}

	set blen [string length $thebullet]
	if {$blen >= [string length $para(wspfx)]} {
	    set text    "$thebullet\n[textutil::adjust::indent $text $para(wspfx)]"
	} else {
	    set fprefix $thebullet[string range $para(wspfx) $blen end]
	    set text    "${fprefix}[textutil::adjust::indent $text $para(wspfx) 1]"
	}
    }

    if {$para(lmargin) > 0} {
	set text [textutil::adjust::indent $text \
		      [textutil::repeat::strRepeat " " $para(lmargin)]]
    }

    lappend linebuffer ""
    lappend linebuffer $text
    return
}

################################################################

proc strong      {text} {return *${text}*}
proc em          {text} {return _${text}_}

################################################################

proc parray_stderr {a {pattern *}} {
    upvar 1 $a array
    if {![array exists array]} {
        error "\"$a\" isn't an array"
    }
    set maxl 0
    foreach name [lsort [array names array $pattern]] {
        if {[string length $name] > $maxl} {
            set maxl [string length $name]
        }
    }
    set maxl [expr {$maxl + [string length $a] + 2}]
    foreach name [lsort [array names array $pattern]] {
        set nameString [format %s(%s) $a $name]
        puts_stderr "    [format "%-*s = {%s}" $maxl $nameString $array($name)]"
    }
}



################################################################






































































































































Deleted modules/doctools/mpformats/_text_bullets.tcl.

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
# -*- tcl -*-
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
# _text_bullets.tcl -- Bulleting configuration and use.

global itembullets      ; set itembullets      {* - # @ ~ %}
global enumbullets      ; set enumbullets      {[%] (%) <%>}

proc IB  {}        { global itembullets ; return $itembullets      }
proc EB  {}        { global enumbullets ; return $enumbullets      }
proc DIB {bullets} { global itembullets ; set itembullets $bullets }
proc DEB {bullets} { global enumbullets ; set enumbullets $bullets }

proc NB {bullets countervar} {
    upvar 1 $countervar counter
    set bullet  [lindex $bullets $counter]
    set counter [expr {($counter + 1) % [llength $bullets]}]
    return $bullet
}

proc ItemBullet {countervar} { upvar 1 $countervar counter ; NB [IB] counter }
proc EnumBullet {countervar} { upvar 1 $countervar counter ; NB [EB] counter }

# xref current content
proc IBullet {} { ItemBullet [CAttrRef itembullet] }
proc EBullet {} { EnumBullet [CAttrRef enumbullet] }

return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































Deleted modules/doctools/mpformats/_text_ccore.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# -*- tcl -*-
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
# _text_ccore.tcl -- Management of current context, and database of all contexts

global nextId      ; # Counter for context generation.
global contextData ; # In-memory database of known contexts.
global contextName ; # Map context handles to name.

global currentHandle  ; # Handle of context in 'currentContext'.
global currentContext ; # Current context, for direct access of all attributes

# # ## ### ##### ########
## Internals

proc ContextCommit {} {
    global contextData  currentHandle             currentContext
    set    contextData($currentHandle) [array get currentContext]
    return
}

proc NextId {} {
    global nextId
    set new $nextId
    incr     nextId
    return $new
}

# # ## ### ##### ########
## Basic management

proc ContextSetup {} {
    global contextData ; unset -nocomplain contextData ; array set contextData {}
    global contextName ; unset -nocomplain contextName ; array set contextName {}
    global nextId ; set                                            nextId 0
    
    global currentHandle  ; set                                          currentHandle  {}
    global currentContext ; unset -nocomplain currentContext ; array set currentContext {}
    return
}

proc ContextSet {id} {
    global    currentHandle currentContext contextData
    set       currentHandle $id

    #puts_stderr "--Set ($id) ([CAttrName $id])"

    # Ensure that array is clean before setting hte new block of
    # information.
    unset     currentContext
    array set currentContext $contextData($currentHandle)

    #puts_stderr "--Set $contextData($currentHandle)"
    return
}

proc ContextExists {id} {
    global contextData
    info exists contextData($id)
}

proc ContextNew {name script} {
    global currentHandle contextName currentContext
    set in [array get currentContext]
    
    set parentId  $currentHandle
    set currentHandle [NextId]

    #puts_stderr "ContextNew ${currentHandle}:($name) in ${parentId}:[CAttrName $parentId]"

    CAttrAppend NAME   /${name}:$currentHandle
    CAttrSet    parent $parentId
    CAttrSet    id     $currentHandle
    CAttrUnset  verbenv ;# Each context must have its own verbatim variant.
    
    # Customize the context - modifier commands
    uplevel $script

    # ContextCommit state for future use.
    ContextCommit
    set contextName($currentHandle) [CAttrGet NAME]
    
    return $currentHandle
}

# # ## ### ##### ########
## Generic accessors

proc CAttrName {{id {}}} {
    global contextName
    if {$id == {}} { global currentHandle ; set id $currentHandle }
    if {![info exists contextName($id)]} { return <$id> }
    return $contextName($id)
}

proc CAttrCurrent {} { global currentHandle ; return $currentHandle }

proc CAttrSet    {key value}     { global currentContext ; set    currentContext($key) $value }
proc CAttrAppend {key value}     { global currentContext ; append currentContext($key) $value }
proc CAttrIncr   {key {value 1}} { global currentContext ; incr   currentContext($key) $value }
proc CAttrGet    {key}           { global currentContext ; set currentContext($key) }
proc CAttrHas    {key}           { global currentContext ; info exists currentContext($key) }
proc CAttrUnset  {key}           { global currentContext ; catch { unset currentContext($key) } }
proc CAttrRef    {key}           { return "::currentContext($key)" }

# # ## ### ##### ########
## Verbatim
#
# Attributes:
# - verbatim    = flag if verbatim formatting requested, i.e. no paragraph reflow.
# - verbenv     = if present, id of verbatim variant of this environment

proc NewVerbatim {} {
    return [ContextNew Verbatim { VerbatimOn }]
}

proc Verbatim {} {
    if {![CAttrHas verbenv]} {
	ContextPush
	set verbenv [NewVerbatim]
	ContextPop
	# Remember the associated verbatim mode in the base
	# environment and database.
	CAttrSet verbenv $verbenv
	ContextCommit
    }
    return [CAttrGet verbenv]
}

proc VerbatimOff {} { CAttrSet verbatim 0 }
proc VerbatimOn  {} { CAttrSet verbatim 1 }
proc Verbatim?   {} { CAttrGet verbatim }

# # ## ### ##### ########

proc Parent? {} { CAttrGet parent }

# # ## ### ##### ########
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































Deleted modules/doctools/mpformats/_text_cstack.tcl.

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
# -*- tcl -*-
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
# _text_cstack.tcl -- Stack of contexts and accessors

global contexts ; set contexts {}

################################################################
# Management of the stack

proc ContextReset {} { global contexts ; set contexts {} ; return }

proc ContextPush {} {
    global  contexts
    lappend contexts [set id [CAttrCurrent]]

    #puts_stderr "Push:[llength $contexts]>> [CAttrName $id]"
    return
}

proc ContextPop {} {
    global contexts
    set id       [lindex $contexts end]
    set contexts [lrange $contexts 0 end-1]

    #puts_stderr "<<Pop:[llength $contexts]  [CAttrName $id]"
    ContextSet   $id
    return
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































Deleted modules/doctools/mpformats/_text_dlist.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# -*- tcl -*-
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
# _text_dlist.tcl -- Display list variables and accessors

#
# The engine maintains several data structures per document and pass.
# Most important is an internal representation of the text better
# suited to perform the final layouting, the display list. Elements of
# the display list are lists containing 2 elements, an operation, and
# its arguments, in this order. The arguments are a list again, its
# contents are specific to the operation.
#
# The operations are:
#
# - SECT	Section.    Title.
# - SUBSECT     Subsection. Title.
# - PARA	Paragraph.  Context reference and text.
#
# The PARA operation is the workhorse of the engine, dooing all the
# formatting, using the information in an "context" as the guide
# for doing so. The contexts themselves are generated during the
# second pass through the contents. They contain the information about
# nesting (i.e. indentation), bulleting and the like.
#

# # ## ### ##### ########
## State: Display list

global __dlist

# # ## ### ##### ########
## Internal: Extend

proc Store {op args} { global __dlist ; lappend __dlist [list $op $args] ; return}

# Debugging ...
#proc Store {op args} {puts_stderr "STO $op $args"; global __dlist; lappend __dlist [list $op $args]; return}

# # ## ### ##### ########
## API
#
# API Section		Add section
# API Subsection	Add subsection
# API CloseParagraph	Add paragraph using text and (current) env
#                       Boolean result indicates if something was added, or not

proc DListClear {} { global __dlist ; unset -nocomplain __dlist ; set __dlist {} }

proc Section    {name} {Store SECT    $name ; return}
proc Subsection {name} {Store SUBSECT $name ; return}

proc CloseParagraph {{id {}}} {
    set para [Text?]
    if {$para == {}} { return 0 }
    if {$id == {}} { set id [CAttrCurrent] }
    if {![ContextExists $id]} {
	error "Unknown context $id for paragraph"
    }
    Store PARA $id $para
    #puts_stderr "CloseParagraph $id [CAttrName $id]"
    #puts_stderr "  (($para))"
    TextClear
    return 1
} 

proc PostProcess {text} {
    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    #puts_stderr <<$text>>
    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    global __dlist
    # The argument is not relevant. Access the display list, perform
    # the final layouting and return its result.

    set lines {}
    array set state {lmargin 0 rmargin 0}
    foreach cmd $__dlist {
	lappend lines ""
	foreach {op arguments} $cmd break
	$op $arguments
    }

    #puts_stderr XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    return [Compose lines]\n
}

# # ## ### ##### ########
## PARA attributes
#
# Attributes
# - bullet      = bullet (template) to use for (un)ordered lists.
# - counter     = if present, item counter for enumeration list.
# - listtype    = type of list, if any.
# - lmargin     = left-indent, location of left margin for text.
# - prefix      = prefix to use for all lines of the parapgraph.
# - wspfx       = whitespace prefix for all but the first line of the paragraph.

proc BulletReset  {} { CAttrSet bullet {} }
proc ListNone     {} { CAttrSet listtype {} }
proc MarginIn     {} { CAttrIncr lmargin [LMI] }
proc MarginReset  {} { CAttrSet lmargin 0 }
proc PrefixReset  {} { CAttrSet prefix {} }
proc WPrefixReset {} { CAttrSet wspfx {} }

proc Prefix!   {p} { CAttrSet prefix $p }
proc Prefix+   {p} { CAttrAppend prefix $p }
proc WPrefix!  {p} { CAttrSet wspfx  $p }

proc Bullet?   {} { CAttrGet bullet }
proc ListType? {} { CAttrGet listtype }
proc Margin?   {} { CAttrGet lmargin }
proc Prefix?   {} { CAttrGet prefix }
proc WPrefix?  {} { CAttrGet wspfx }

proc List! {type bullet wprefix} {

    #puts_stderr L!(($type))
    #puts_stderr L!(($bullet))[string length $bullet],[string length [DeIce $bullet]]
    #puts_stderr L!(([Dots $wprefix]))
    
    CAttrSet listtype $type
    CAttrSet bullet   $bullet
    CAttrSet wspfx    $wprefix
}

proc EnumCounter {} {
    if {![CAttrHas counter]} {
	CAttrSet counter 1
    } else {
	CAttrIncr counter
    }
    ContextCommit	
    #puts_stderr "Counter ... [CAttrName] => [CAttrGet counter]"
    return [CAttrGet counter]
}

proc EnumId {} {
    # Handling the enumeration counter.
    #
    # Special case: An example as first paragraph in an item has to
    # use the counter in the context it is derived from to prevent
    # miscounting.

    #puts_stderr "EnumId: [CAttrName] | [CAttrName [Parent?]]"
    
    if {[Example?]} {
	ContextPush
	ContextSet [Parent?]
	set n [EnumCounter]
	ContextPop
    } else {
	set n [EnumCounter]
    }
    return $n
}

# # ## ### ##### ########
## Hooks

proc SECT {text} {
    #puts_stderr "SECT $text"
    #puts_stderr ""
    # text is actually the list of arguments, having one element, the text.
    upvar 1 lines lines
    set text [lindex $text 0]
    SectTitle lines $text
    return
}

proc SUBSECT {text} {
    #puts_stderr "SUBSECT $text"
    #puts_stderr ""
    # text is actually the list of arguments, having one element, the text.
    upvar 1 lines lines
    set text [lindex $text 0]
    SubsectTitle lines $text
    return
}

proc PARA {arguments} {
    upvar lines lines

    # Note. As the display list is processed at the very end we can
    # reuse the current context and accessors to hold and query the
    # context of each paragraph.
    
    foreach {env text} $arguments break
    ContextSet $env

    #puts_stderr "PARA $env [CAttrName $env]"
    #parray_stderr ::currentContext ;# consider capsulation
    #puts_stderr "    (($text))"
    #puts_stderr ""

    # Use the information in the referenced context to format the
    # paragraph.

    set lm    [Margin?]
    set lt    [ListType?]
    set blank [WPrefix?]
    
    if {[Verbatim?]} {
	set text [Undent $text]
	#puts_stderr "UN  (($text))"
    } else {
	set  plm $lm
	incr plm [string length $blank]
	set text [Reflow $text [RMargin $plm]]
    }

    # Now apply prefixes, (ws prefixes bulleting), at last indentation.

    set p [Prefix?]
    if {[string length $p]} {
	set text [Indent $text $p]
	#puts_stderr "IN  (($text))"
    }

    if {$lt != {}} {
	switch -exact $lt {
	    bullet {
		# Indent for bullet, but not the first line. This is
		# prefixed by the bullet itself.
		set thebullet [Bullet?]
	    }
	    enum {
		#puts_stderr EB

		set n [EnumId]
		set thebullet [string map [list % $n] [Bullet?]]

		#puts_stderr "E $n | $thebullet |"
	    }
	}

	set blank [WPrefix?]

	#puts_stderr B.(($lt))
	#puts_stderr B.(($thebullet))[string length $thebullet],[string length [DeIce $thebullet]]
	#puts_stderr B.(([Dots $blank]))

	if {[string length [DeIce $thebullet]] >= [string length $blank]} {
	    # The item's bullet is longer than the space for indenting.
	    # Put bullet and text on separate lines, indent text in full.

	    #puts_stderr B.DROP

	    set text "$thebullet\n[Indent $text $blank]"
	} else {
	    # The item's bullet fits into the space for
	    # indenting. Make hanging indent of text and place the
	    # bullet in front of the first line, with suitable partial
	    # spacing.

	    #puts_stderr B.SAME
	    #puts_stderr B.(([Dots [ReHead $blank $thebullet]]))

	    set text [Indent1 $text [ReHead $blank $thebullet] $blank]
	}
    }

    if {$lm} {
	#puts_stderr "LMA $lm"
	set text [Indent $text [Blank $lm]]
    }

    #puts_stderr "FIN (($text))"
    
    lappend lines $text
    return
}

# # ## ### ##### ########
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































Deleted modules/doctools/mpformats/_text_margin.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- tcl -*-
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
# _text_margin.tcl -- Margin control

global lmarginIncrement ; set lmarginIncrement 4
global rmarginThreshold ; set rmarginThreshold 20

proc LMI {} { global lmarginIncrement ; return $lmarginIncrement }
proc RMT {} { global rmarginThreshold ; return $rmarginThreshold }

proc RMargin {indent} {
    set rmt [RMT]
    set rmargin [expr {80 - $indent}]
    if {$rmargin < $rmt} { set rmargin $rmt }
    return $rmargin
}

return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































Deleted modules/doctools/mpformats/_text_para.tcl.

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
# -*- tcl -*-
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
# _text_para.tcl -- Paragraph variables and accessors - Text accumulator

# # ## ### ##### ########
## State: Text buffer for paragraphs.

global __currentp

# # ## ### ##### ########
## API

proc Text {text} {
    #puts_stderr "T++ (($text))"
    global __currentp
    append __currentp $text
    return
}
proc Text?     {} { global __currentp ; return $__currentp }
proc TextClear {} { global __currentp ; set __currentp "" }

proc TextTrimLeadingSpace {} {
    global __currentp
    regsub {^([ \t\v\f]*\x01?\n)*} $__currentp {} __currentp
    return
}

proc TextTrimTrailingSpace {} {
    global __currentp
    regsub {([ \t\v\f]*\x01?\n)*$} $__currentp {} __currentp
    append __currentp \n
    return
}

proc TextPlain {text} {
    if  {[IsOff]} {return}

    # Note: Whenever we get plain text it is possible that a macro for
    # visual markup actually generated output before the expander got
    # to the current text. This output was captured by the expander in
    # its current context. Given the current organization of the
    # engine we have to retrieve this formatted text from the expander
    # or it will be lost. This is the purpose of the 'ctopandclear',
    # which retrieves the data and also clears the capture buffer. The
    # latter to prevent us from retrieving it again later, after the
    # next macro added more data.

    set text [ex_ctopandclear]$text

    #puts_stderr "<<text_plain_text>>=<<[string map [list \t \\t { } \\s \n \\n \r \\r \v \\v \f \\f \1 \\1] $text]>>"

    # ... TODO ... Handling of example => verbatim

    if {[string length [string trim $text]] == 0} return

    Text $text
    return
}

##
# # ## ### ##### ########
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































Deleted modules/doctools/mpformats/_text_state.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- tcl -*-
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
# _text_state.tcl -- State variables and accessors

# # ## ### ##### ########
# State: Flag to suppress of plain text in some places.

global __off

# # ## ### ##### ########
# API

proc Off   {} { global __off ; set __off 1 ; return}
proc On    {} { global __off ; set __off 0 ; TextClear ; return}
proc IsOff {} { global __off ; return $__off }

# Debugging ...
#proc Off   {}        {puts_stderr OFF ; global __off ; set __off 1 ; return}
#proc On    {}        {puts_stderr ON_ ; global __off ; set __off 0 ; TextClear ; return}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































Deleted modules/doctools/mpformats/_text_utils.tcl.

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
# -*- tcl -*-
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
# _text_utils.tcl -- Text formatting utilities

# # ## ### ##### ########
## API

proc Dots {x} { string map {{ } . {	} .} $x }

proc Compose {lb} {
    upvar 1 $lb linebuffer
    return [string trimright [join $linebuffer \n]]
}

proc ReHead {line prefix} {
    set n [string length [DeIce $prefix]]
    incr n -1
    string replace $line 0 $n $prefix
}

proc MaxLen {v s} {
    upvar 1 $v max
    set n [string length $s]
    if {$n <= $max} return
    set max $n
}

proc DeIce {x} { string map [list \1 {}] $x }

proc BlankMargin {} { global lmarginIncrement ; Blank $lmarginIncrement }

proc Repeat  {char n}      { textutil::repeat::strRepeat $char $n }
proc Blank   {n}           { textutil::repeat::blank $n }
proc RepeatM {char text}   { Repeat $char [string length [DeIce $text]] }
proc BlankM  {text}        { Blank        [string length [DeIce $text]] }
proc Undent  {text}        { textutil::adjust::undent $text }
proc Reflow  {text maxlen} { textutil::adjust::adjust $text -length $maxlen }
proc Indent  {text prefix} { textutil::adjust::indent $text $prefix }
proc Indent1 {text p1 p}   { return "${p1}[textutil::adjust::indent $text $p 1]" }
proc InFlow {text maxlen prefix1 prefix} {
    # Reformats the paragraph `text` to keep line length under
    # `maxlen` and then indents the result using `prefix1` and
    # `prefix`.  `prefix1` is applied to the first line, and `prefix`
    # to the remainder. The caller is responsible for ensuring that
    # both prefixes have the same length.
    Indent1 [Reflow $text $maxlen] $prefix1 $prefix
}

proc Provenance {} {
    textutil::string::uncap [c_provenance]
}

# # ## ### ##### ########
# Internals

# # ## ### ##### ########
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































Changes to modules/doctools/mpformats/_xml.tcl.

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
# -*- tcl -*-



# [expand] utilities for generating XML.
#
# Copyright (C) 2001 Joe English <jenglish@sourceforge.net>.
# Freely redistributable.
#
# Copyright (C) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
######################################################################


# Handling XML delimiters in content:
#
# Plain text is initially passed through unescaped;
# internally-generated markup is protected by preceding it with \1.
# The final PostProcess step strips the escape character from
# real markup and replaces markup characters from content
# with entity references.
#

variable attvalMap { {&} &amp;  {<} &lt;  {>} &gt; {"} &quot; {'} &apos; } ; # "
variable markupMap { {&} {\1&}  {<} {\1<}  {>} {\1>} }
variable finalMap  { {\1&} {&}  {\1<} {<}  {\1>} {>}
		     {&} &amp;  {<} &lt;   {>} &gt; }

proc fmt_postprocess {text} {
    variable finalMap
    return [string trim [string map $finalMap $text]]\n
}

# markup text --
#	Protect markup characters in $text with \1.
#	These will be stripped out in PostProcess.
#
proc markup {text} {

>
>
>





<

>















|

|







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
# -*- tcl -*-
#
# $Id: _xml.tcl,v 1.9 2004/04/22 21:16:46 jenglish Exp $
#
# [expand] utilities for generating XML.
#
# Copyright (C) 2001 Joe English <jenglish@sourceforge.net>.
# Freely redistributable.
#

######################################################################


# Handling XML delimiters in content:
#
# Plain text is initially passed through unescaped;
# internally-generated markup is protected by preceding it with \1.
# The final PostProcess step strips the escape character from
# real markup and replaces markup characters from content
# with entity references.
#

variable attvalMap { {&} &amp;  {<} &lt;  {>} &gt; {"} &quot; {'} &apos; } ; # "
variable markupMap { {&} {\1&}  {<} {\1<}  {>} {\1>} }
variable finalMap  { {\1&} {&}  {\1<} {<}  {\1>} {>}
		     {&} &amp;  {<} &lt;   {>} &gt; }

proc fmt_postprocess {text}	{
    variable finalMap
    return [string map $finalMap $text]
}

# markup text --
#	Protect markup characters in $text with \1.
#	These will be stripped out in PostProcess.
#
proc markup {text} {

Deleted modules/doctools/mpformats/_xref.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# -*- tcl -*-
##
# Shared code for the management of cross-references between
# documents. Origin in HTML. Other user: Markdown.
#
# Copyright (c) 2001,2019 Andreas Kupries <andreas_kupries@sourceforge.net>

# Hook:
# - MakeLink {label target} - Format specific
# - GetXref                 - Engine parameter access

# # ## ### ##### ######## ############# #####################
## API

proc XrefInit {} {
    global xref
    foreach item [GetXref] {
	foreach {pattern fname fragment} $item break
	set fname_ref [dt_fmap $fname]
	if {$fragment != {}} {append fname_ref #$fragment}
	set xref($pattern) $fname_ref
    }
    proc XrefInit {} {}
    return
}

proc XrefMatch {word args} {
    global xref

    foreach ext $args {
	if {$ext != {}} {
	    if {[info exists xref($ext,$word)]} {
		return [XrefLink $xref($ext,$word) $word]
	    }
	}
    }
    if {[info exists xref($word)]} {
	return [XrefLink $xref($word) $word]
    }

    # Convert the word to all-lower case and then try again.

    set lword [string tolower $word]

    foreach ext $args {
	if {$ext != {}} {
	    if {[info exists xref($ext,$lword)]} {
		return [XrefLink $xref($ext,$lword) $word]
	    }
	}
    }
    if {[info exists xref($lword)]} {
	return [XrefLink $xref($lword) $word]
    }

    return $word
}

proc XrefList {list {ext {}}} {
    set res [list]
    foreach w $list {lappend res [XrefMatch $w $ext]}
    return $res
}

proc XrefLink {dest label} {
    # Ensure that the link is properly done relative to this file!

    set here [LinkHere]
    set dest [LinkTo $dest $here]

    if {[string equal $dest [lindex [file split $here] end]]} {
	# Suppress self-referential links, i.e. links made from the
	# current file to itself. Note that links to specific parts of
	# the current file are not suppressed, only exact links.
	return $label
    }
    return [MakeLink $label $dest]
}

# # ## ### ##### ######## ############# #####################
## Internals

proc LinkHere {} {
    return [dt_fmap [dt_mainfile]]
}

proc LinkTo {dest here} {
    # Ensure that the link is properly done relative to this file!

    set save $dest

    #puts_stderr "XrefLink $dest $label"

    set here [file split $here]
    set dest [file split $dest]

    #puts_stderr "XrefLink < $here"
    #puts_stderr "XrefLink > $dest"

    while {[string equal [lindex $dest 0] [lindex $here 0]]} {
	set dest [lrange $dest 1 end]
	set here [lrange $here 1 end]
	if {[llength $dest] == 0} {break}
    }
    set ul [llength $dest]
    set hl [llength $here]

    if {$ul == 0} {
	set dest [lindex [file split $save] end]
    } else {
	while {$hl > 1} {
	    set dest [linsert $dest 0 ..]
	    incr hl -1
	}
	set dest [eval file join $dest]
    }

    #puts_stderr "XrefLink --> $dest"
    return $dest
}

# # ## ### ##### ######## ############# #####################
## State

global xref ; array set xref {}

##
# # ## ### ##### ######## ############# #####################
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































Changes to modules/doctools/mpformats/c.msg.

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
mcset c tkoption_list    "Command restricted to usage in tkoption lists"
mcset c depr_strong      "Deprecated command \"%s\".\n\tPlease consider appropriate semantic markup or \[emph\] instead."
mcset c depr_lstitem     "Deprecated command \"%s\".\n\tPlease use \[def\] instead."
mcset c depr_nl          "Deprecated command \"%s\".\n\tPlease use \[para\] instead."
mcset c depr_bullet      "Deprecated command \"%s\".\n\tPlease use \[item\] instead."
mcset c depr_ltype       "Deprecated list type \"%s\".\n\tPlease use \"%s\" instead."
mcset c sectambig        "(Sub)Section title \"%s\" causes ambiguous section references."
mcset c missingsect      "Referred (Sub)Section \"%s\" is not known."

# TOC messages

mcset c end/open/toc  "\[toc_end\] missing."
mcset c toc/plaintext "Plain text beyond whitespace is not allowed."
mcset c toc/begincmd  "Command not allowed here."
mcset c toc/endcmd    "Command not allowed here."







|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
mcset c tkoption_list    "Command restricted to usage in tkoption lists"
mcset c depr_strong      "Deprecated command \"%s\".\n\tPlease consider appropriate semantic markup or \[emph\] instead."
mcset c depr_lstitem     "Deprecated command \"%s\".\n\tPlease use \[def\] instead."
mcset c depr_nl          "Deprecated command \"%s\".\n\tPlease use \[para\] instead."
mcset c depr_bullet      "Deprecated command \"%s\".\n\tPlease use \[item\] instead."
mcset c depr_ltype       "Deprecated list type \"%s\".\n\tPlease use \"%s\" instead."
mcset c sectambig        "(Sub)Section title \"%s\" causes ambiguous section references."
mcset c missingsect      "Refered (Sub)Section \"%s\" is not known."

# TOC messages

mcset c end/open/toc  "\[toc_end\] missing."
mcset c toc/plaintext "Plain text beyond whitespace is not allowed."
mcset c toc/begincmd  "Command not allowed here."
mcset c toc/endcmd    "Command not allowed here."

Changes to modules/doctools/mpformats/en.msg.

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
mcset en tkoption_list    "Command restricted to usage in tkoption lists"
mcset en depr_strong      "Deprecated command \"%s\".\n\tPlease consider appropriate semantic markup or \[emph\] instead."
mcset en depr_lstitem     "Deprecated command \"%s\".\n\tPlease use \[def\] instead."
mcset en depr_nl          "Deprecated command \"%s\".\n\tPlease use \[para\] instead."
mcset en depr_bullet      "Deprecated command \"%s\".\n\tPlease use \[item\] instead."
mcset en depr_ltype       "Deprecated list type \"%s\".\n\tPlease use \"%s\" instead."
mcset en sectambig        "(Sub)Section title \"%s\" causes ambiguous section references."
mcset en missingsect      "Referred (Sub)Section \"%s\" is not known."

mcset en end/open/toc  "\[toc_end\] missing."
mcset en toc/plaintext "Plain text beyond whitespace is not allowed."
mcset en toc/begincmd  "Command not allowed here."
mcset en toc/endcmd    "Command not allowed here."
mcset en toc/titlecmd  "Command not allowed here."
mcset en toc/sectcmd   "Command not allowed here."







|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
mcset en tkoption_list    "Command restricted to usage in tkoption lists"
mcset en depr_strong      "Deprecated command \"%s\".\n\tPlease consider appropriate semantic markup or \[emph\] instead."
mcset en depr_lstitem     "Deprecated command \"%s\".\n\tPlease use \[def\] instead."
mcset en depr_nl          "Deprecated command \"%s\".\n\tPlease use \[para\] instead."
mcset en depr_bullet      "Deprecated command \"%s\".\n\tPlease use \[item\] instead."
mcset en depr_ltype       "Deprecated list type \"%s\".\n\tPlease use \"%s\" instead."
mcset en sectambig        "(Sub)Section title \"%s\" causes ambiguous section references."
mcset en missingsect      "Refered (Sub)Section \"%s\" is not known."

mcset en end/open/toc  "\[toc_end\] missing."
mcset en toc/plaintext "Plain text beyond whitespace is not allowed."
mcset en toc/begincmd  "Command not allowed here."
mcset en toc/endcmd    "Command not allowed here."
mcset en toc/titlecmd  "Command not allowed here."
mcset en toc/sectcmd   "Command not allowed here."

Changes to modules/doctools/mpformats/fmt.html.

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
# -*- tcl -*-
#
# fmt.html
#
# Copyright (c) 2001-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# Definitions to convert a tcl based manpage definition into
# a manpage based upon HTML markup.
#
################################################################
################################################################

dt_source _common.tcl   ; # Shared code
dt_source _html.tcl     ; # HTML basic formatting
dt_source _xref.tcl     ; # xref management

global _in_example
set    _in_example 0

proc c_copyrightsymbol {} {return "[markup "&"]copy;"}

proc bgcolor {} {return ""}
proc border  {} {return 0}
proc Year    {} {clock format [clock seconds] -format %Y}





|









<
<
<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14




15
16
17
18
19
20
21
# -*- tcl -*-
#
# fmt.html
#
# Copyright (c) 2001-2008 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# Definitions to convert a tcl based manpage definition into
# a manpage based upon HTML markup.
#
################################################################
################################################################

dt_source _common.tcl   ; # Shared code
dt_source _html.tcl     ; # HTML basic formatting





proc c_copyrightsymbol {} {return "[markup "&"]copy;"}

proc bgcolor {} {return ""}
proc border  {} {return 0}
proc Year    {} {clock format [clock seconds] -format %Y}

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
    set liststack [lreplace $liststack end end]
    foreach {t l} $t break
    litc_set $l
    return $t
}

proc fmt_plain_text {text} {
    global _in_example
    if {$_in_example} {
	set text [string map [list \\\\\n \\\n] $text]
    }
    return $text
}

################################################################
# Formatting commands.

c_pass 1 fmt_manpage_begin {title section version} {c_cinit ; c_clrSections ; return}







<
<
<
<







44
45
46
47
48
49
50




51
52
53
54
55
56
57
    set liststack [lreplace $liststack end end]
    foreach {t l} $t break
    litc_set $l
    return $t
}

proc fmt_plain_text {text} {




    return $text
}

################################################################
# Formatting commands.

c_pass 1 fmt_manpage_begin {title section version} {c_cinit ; c_clrSections ; return}
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
    set copyright   [c_get_copyright]

    set pagetitle "$title - $shortdesc"
    
    set hdr ""

    if {![Get raw]} {
	append  hdr [markup {<!DOCTYPE html>}]
	append  hdr [tag html] [tag head] \n
	append  hdr [tag_ title $pagetitle] \n

	if {![Extend hdr ByParameter meta]} {
	    # Insert standard CSS definitions.
	    append hdr [tag_ style \
			    "[markup <]!--${defaultstyle}--[markup >]" \







<







72
73
74
75
76
77
78

79
80
81
82
83
84
85
    set copyright   [c_get_copyright]

    set pagetitle "$title - $shortdesc"
    
    set hdr ""

    if {![Get raw]} {

	append  hdr [tag html] [tag head] \n
	append  hdr [tag_ title $pagetitle] \n

	if {![Extend hdr ByParameter meta]} {
	    # Insert standard CSS definitions.
	    append hdr [tag_ style \
			    "[markup <]!--${defaultstyle}--[markup >]" \
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
    c_newSection {Table Of Contents} 1 0 toc

    if {[llength [c_xref_seealso]]  > 0} {c_newSection {See Also} 1 end see-also}
    if {[llength [c_xref_keywords]] > 0} {c_newSection Keywords   1 end keywords}
    if {[c_xref_category]         ne ""} {c_newSection Category   1 end category}
    if {[c_get_copyright]         != {}} {c_newSection Copyright  1 end copyright}

    set sections [c_sections]

    # Pass 2: Generate the markup for the TOC, indenting the
    #         links according to the level of each section.

    append result [fmt_section {Table Of Contents} toc] [para_close] \n
    append result [taga ul {class doctools_toc}] \n

    set lastlevel 1
    set close 0
    foreach {name id level} $sections {
	# level in {1,2}, 1 = section, 2 = subsection
	if {$level == $lastlevel} {
	    # Close previous item.
	    if {$close} { append result [tag/ li] \n }
	} elseif {$level > $lastlevel} {
	    # Start list of subsections
	    append result \n [tag ul] \n
	} else { # level < lastlevel







|










|







224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
    c_newSection {Table Of Contents} 1 0 toc

    if {[llength [c_xref_seealso]]  > 0} {c_newSection {See Also} 1 end see-also}
    if {[llength [c_xref_keywords]] > 0} {c_newSection Keywords   1 end keywords}
    if {[c_xref_category]         ne ""} {c_newSection Category   1 end category}
    if {[c_get_copyright]         != {}} {c_newSection Copyright  1 end copyright}

    set sections $::SectionList

    # Pass 2: Generate the markup for the TOC, indenting the
    #         links according to the level of each section.

    append result [fmt_section {Table Of Contents} toc] [para_close] \n
    append result [taga ul {class doctools_toc}] \n

    set lastlevel 1
    set close 0
    foreach {name id level} $sections {
	# level in {1,2}, 1 = sectio n, 2 = subsection
	if {$level == $lastlevel} {
	    # Close previous item.
	    if {$close} { append result [tag/ li] \n }
	} elseif {$level > $lastlevel} {
	    # Start list of subsections
	    append result \n [tag ul] \n
	} else { # level < lastlevel
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
    if {$lastlevel > 1 } { append result [tag/ ul] \n }
    if {$close}          { append result [tag/ li] \n }

    append result [tag/ ul] \n

    # Implicit sections coming after the TOC (Synopsis, then the
    # description which starts the actual document). The other
    # implicit sections are added at the end of the document and
    # are generated by 'fmt_manpage_end' in the second pass.

    if {$syn != {} || $req != {}} {
	append result [fmt_section Synopsis synopsis] [para_close] [taga div {class doctools_synopsis}] \n
	if {$req != {}} {
	    append result [tag_ ul \n$req\n class doctools_requirements] \n
	}







|







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
    if {$lastlevel > 1 } { append result [tag/ ul] \n }
    if {$close}          { append result [tag/ li] \n }

    append result [tag/ ul] \n

    # Implicit sections coming after the TOC (Synopsis, then the
    # description which starts the actual document). The other
    # implict sections are added at the end of the document and
    # are generated by 'fmt_manpage_end' in the second pass.

    if {$syn != {} || $req != {}} {
	append result [fmt_section Synopsis synopsis] [para_close] [taga div {class doctools_synopsis}] \n
	if {$req != {}} {
	    append result [tag_ ul \n$req\n class doctools_requirements] \n
	}
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381

382

383
384
385
386
387
388
389
390
391
    append text "Database Class:\t[bold $dbclass optdbclass][tag br]\n"
    fmt_lst_item $text
}

################################################################

proc fmt_example_begin {} {
    global _in_example ; set _in_example 1
    return [para_close]\n[tag* pre class doctools_example]
}
proc fmt_example_end   {} {
    global _in_example ; set _in_example 0
    return [tag/ pre]\n[para_open]
}
proc fmt_example {code} {
    return "[fmt_example_begin][fmt_plain_text $code][fmt_example_end]"
}

################################################################

proc fmt_arg  {text} { italic $text                arg }
proc fmt_cmd  {text} { bold   [XrefMatch $text sa] cmd }
proc fmt_emph {text} { em     $text }
proc fmt_opt  {text} { span   "?$text?" opt }

proc fmt_comment {text} {ht_comment $text}
proc fmt_sectref {title {id {}}} {

    if {$id == {}} { set id [c_sectionId $title] }


    if {[c_sectionKnown $id]} {
    	return [span [link $title "#$id"] sectref]
    } else {
	return [bold $title sectref]
    }
}

proc fmt_syscmd  {text} {bold [XrefMatch $text sa] syscmd}







<
|


<















>
|
>
|
|







346
347
348
349
350
351
352

353
354
355

356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
    append text "Database Class:\t[bold $dbclass optdbclass][tag br]\n"
    fmt_lst_item $text
}

################################################################

proc fmt_example_begin {} {

	return [para_close]\n[tag* pre class doctools_example]
}
proc fmt_example_end   {} {

    return [tag/ pre]\n[para_open]
}
proc fmt_example {code} {
    return "[fmt_example_begin][fmt_plain_text $code][fmt_example_end]"
}

################################################################

proc fmt_arg  {text} { italic $text                arg }
proc fmt_cmd  {text} { bold   [XrefMatch $text sa] cmd }
proc fmt_emph {text} { em     $text }
proc fmt_opt  {text} { span   "?$text?" opt }

proc fmt_comment {text} {ht_comment $text}
proc fmt_sectref {title {id {}}} {
    global SectionNames
    if {$id == {}} {
	set id [c_sectionId $title]
    }
    if {[info exists SectionNames($id)]} {
    	return [span [link $title "#$id"] sectref]
    } else {
	return [bold $title sectref]
    }
}

proc fmt_syscmd  {text} {bold [XrefMatch $text sa] syscmd}
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
    if {!$para_is_open} {return ""}
    set para_is_open 0
    return [tag/ p]
}

################################################################

proc GetXref {} { Get xref } ;# xref access to engine parameters

global    __var
array set __var {
    meta   {}
    header {}
    footer {}
    xref   {}







|







503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
    if {!$para_is_open} {return ""}
    set para_is_open 0
    return [tag/ p]
}

################################################################

global xref ; array set xref {}

global    __var
array set __var {
    meta   {}
    header {}
    footer {}
    xref   {}
636
637
638
639
640
641
642








































































































    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
}

################################################################















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
}

################################################################

proc XrefInit {} {
    global xref __var
    foreach item $__var(xref) {
	foreach {pattern fname fragment} $item break
	set fname_ref [dt_fmap $fname]
	if {$fragment != {}} {append fname_ref #$fragment}
	set xref($pattern) $fname_ref
    }
    proc XrefInit {} {}
    return
}

proc XrefMatch {word args} {
    global xref

    foreach ext $args {
	if {$ext != {}} {
	    if {[info exists xref($ext,$word)]} {
		return [XrefLink $xref($ext,$word) $word]
	    }
	}
    }
    if {[info exists xref($word)]} {
	return [XrefLink $xref($word) $word]
    }

    # Convert the word to all-lower case and then try again.

    set lword [string tolower $word]

    foreach ext $args {
	if {$ext != {}} {
	    if {[info exists xref($ext,$lword)]} {
		return [XrefLink $xref($ext,$lword) $word]
	    }
	}
    }
    if {[info exists xref($lword)]} {
	return [XrefLink $xref($lword) $word]
    }

    return $word
}

proc XrefList {list {ext {}}} {
    set res [list]
    foreach w $list {lappend res [XrefMatch $w $ext]}
    return $res
}

proc LinkHere {} {
    return [dt_fmap [dt_mainfile]]
}

proc LinkTo {dest here} {
    # Ensure that the link is properly done relative to this file!

    set save $dest

    #puts_stderr "XrefLink $dest $label"

    set here [file split $here]
    set dest [file split $dest]

    #puts_stderr "XrefLink < $here"
    #puts_stderr "XrefLink > $dest"

    while {[string equal [lindex $dest 0] [lindex $here 0]]} {
	set dest [lrange $dest 1 end]
	set here [lrange $here 1 end]
	if {[llength $dest] == 0} {break}
    }
    set ul [llength $dest]
    set hl [llength $here]

    if {$ul == 0} {
	set dest [lindex [file split $save] end]
    } else {
	while {$hl > 1} {
	    set dest [linsert $dest 0 ..]
	    incr hl -1
	}
	set dest [eval file join $dest]
    }

    #puts_stderr "XrefLink --> $dest"
    return $dest
}

proc XrefLink {dest label} {
    # Ensure that the link is properly done relative to this file!

    set here [LinkHere]
    set dest [LinkTo $dest $here]

    if {[string equal $dest [lindex [file split $here] end]]} {
	# Suppress self-referential links, i.e. links made from the
	# current file to itself. Note that links to specific parts of
	# the current file are not suppressed, only exact links.
	return $label
    }
    return [link $label $dest]
}

Changes to modules/doctools/mpformats/fmt.latex.

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
89
90
# -*- tcl -*-



# (c) 2001-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# [mpexpand] definitions to convert a tcl based manpage definition into
# a manpage based upon LaTeX markup.
#
################################################################

##
## This engine needs a rewrite for a better handling
## of characters special to TeX / LaTeX.
##

dt_source _common.tcl   ; # Shared code

global _in_example
set    _in_example 0

global _has_images
set    _has_images 0

global _has_examples
set    _has_examples 0

# Called to handle plain text from the input
proc fmt_plain_text {text} {
    global _in_example
    if {$_in_example} {	
	lappend map \\\\\n \1\\textbackslash\n
	lappend map \\\n   \1\\textbackslash\n	
	set text [string map $map $text]
	return $text
    }
    return [texEscape $text]
}

proc Year {} {clock format [clock seconds] -format %Y}

c_holdBuffers require

proc fmt_postprocess {text} {
    # Trim trailing whitespace, for all lines.
    regsub -all -- "\[ \t]+\n" $text "\n" text
    # Strip superfluous line breaks
    regsub -all -- "\n+" $text "\n" text
    # Normalize paragraph breaks (subsume leading and traling whitespace)
    regsub -all -- "\[\t \n]+\1@P" $text "\1@P" text
    regsub -all -- "\1@P\[\t \n]+" $text "\1@P" text
    # Insert the paragraph breaks, unify multiple adjacent breaks
    regsub -all -- "(\1@P)+" $text "\n\n" text
    # Finalize the protected special characters
    return [string trimleft [string map {\1\\ \\ \1$ $} $text]]
    #return $text
}

################################################################
## Backend for LaTeX markup

c_pass 1 fmt_manpage_begin {title section version} NOP
c_pass 2 fmt_manpage_begin {title section version} {
    global _has_images _has_examples

    set module      [dt_module]
    set shortdesc   [c_get_module]
    set description [c_get_title]
    set copyright   [c_get_copyright]

    set     hdr ""
    append  hdr [Comment [c_provenance]] \n
    if {$copyright != {}} {
	append  hdr [Comment $copyright] \n
    }
    append  hdr [Comment "$title.$section"] \n
    append  hdr \n
    append  hdr "\1\\documentclass\{article\}" \n

    if {$_has_images} {
	append hdr "\1\\usepackage{epsfig}" \n
	append hdr "\1\\usepackage{epstopdf}" \n
    }
    if {$_has_examples} {
	append hdr "\1\\usepackage{alltt}" \n
    }

    append  hdr "\1\\begin\{document\}" \n
    append  hdr "\1\\author\{[dt_user]\}" \n

    set    titletext ""
    append titletext "$module / $title -- "
    append titletext "$shortdesc : $description"

>
>
>
|



















<
<
<



|
<
<
<










<
<
<

<
<
<
<
<
<
|








|











|







<
<
<







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
# -*- tcl -*-
#
# fmt.latex
#
# (c) 2001 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# [mpexpand] definitions to convert a tcl based manpage definition into
# a manpage based upon LaTeX markup.
#
################################################################

##
## This engine needs a rewrite for a better handling
## of characters special to TeX / LaTeX.
##

dt_source _common.tcl   ; # Shared code

global _in_example
set    _in_example 0

global _has_images
set    _has_images 0




# Called to handle plain text from the input
proc fmt_plain_text {text} {
    global _in_example
    if {$_in_example} {



	return $text
    }
    return [texEscape $text]
}

proc Year {} {clock format [clock seconds] -format %Y}

c_holdBuffers require

proc fmt_postprocess {text} {



    regsub -all -- "\n+" $text "\n" text






    return [string map {\1\\ \\ \1$ $} $text]
    #return $text
}

################################################################
## Backend for LaTeX markup

c_pass 1 fmt_manpage_begin {title section version} NOP
c_pass 2 fmt_manpage_begin {title section version} {
    global _has_images

    set module      [dt_module]
    set shortdesc   [c_get_module]
    set description [c_get_title]
    set copyright   [c_get_copyright]

    set     hdr ""
    append  hdr [Comment [c_provenance]] \n
    if {$copyright != {}} {
	append  hdr [Comment $copyright] \n
    }
    append  hdr [Comment "CVS: \$Id\$ $title.$section"] \n
    append  hdr \n
    append  hdr "\1\\documentclass\{article\}" \n

    if {$_has_images} {
	append hdr "\1\\usepackage{epsfig}" \n
	append hdr "\1\\usepackage{epstopdf}" \n
    }




    append  hdr "\1\\begin\{document\}" \n
    append  hdr "\1\\author\{[dt_user]\}" \n

    set    titletext ""
    append titletext "$module / $title -- "
    append titletext "$shortdesc : $description"
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
    }
    append  res "\1\\end\{document\}"
    return $res
}

proc fmt_section    {name id} {return    "\1\\section\{[texEscape $name]\}\1\\label\{$id\}"}
proc fmt_subsection {name id} {return "\1\\subsection\{[texEscape $name]\}\1\\label\{$id\}"}

proc fmt_para   {} { return \1@P }
proc fmt_nl     {} { return \1@P }

c_pass 2 fmt_require {pkg {version {}}} NOP
c_pass 1 fmt_require {pkg {version {}}} {
    if {$version != {}} {
	set res "package require [Bold "$pkg $version"]\n"
    } else {
	set res "package require [Bold $pkg]\n"







<
|
<







127
128
129
130
131
132
133

134

135
136
137
138
139
140
141
    }
    append  res "\1\\end\{document\}"
    return $res
}

proc fmt_section    {name id} {return    "\1\\section\{[texEscape $name]\}\1\\label\{$id\}"}
proc fmt_subsection {name id} {return "\1\\subsection\{[texEscape $name]\}\1\\label\{$id\}"}

proc fmt_para    {}        {return \n\n}


c_pass 2 fmt_require {pkg {version {}}} NOP
c_pass 1 fmt_require {pkg {version {}}} {
    if {$version != {}} {
	set res "package require [Bold "$pkg $version"]\n"
    } else {
	set res "package require [Bold $pkg]\n"
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
    append text "Database Class:	[Bold $dbclass]\\\\\n"
    return "\n%\n\1\\item\[\] $text\n%\n"
}

################################################################

proc fmt_example_begin {} {
    global _has_examples _in_example
    set _has_examples 1
    set    _in_example 1
    return "\1\\begin{alltt}\n"
}
proc fmt_example_end   {} {
    global _in_example
    set    _in_example 0
    return "\1\\end{alltt}\n"
}
# No mapping of special characters
proc fmt_example {code} {
    return [fmt_example_begin][fmt_plain_text $code][fmt_example_end]
}

proc fmt_arg    {text} {Underline $text}
proc fmt_cmd    {text} {Bold      $text}
proc fmt_emph   {text} {Italic    $text}
proc fmt_opt    {text} {return   ?$text?}

proc fmt_comment {text} {
    set res [list]







|
<

|




|


|
<
|
|







290
291
292
293
294
295
296
297

298
299
300
301
302
303
304
305
306
307

308
309
310
311
312
313
314
315
316
    append text "Database Class:	[Bold $dbclass]\\\\\n"
    return "\n%\n\1\\item\[\] $text\n%\n"
}

################################################################

proc fmt_example_begin {} {
    global _in_example

    set    _in_example 1
    return {\begin{verbatim}}
}
proc fmt_example_end   {} {
    global _in_example
    set    _in_example 0
    return {\end{verbatim}}
}
# No mapping of special characters
proc fmt_example {code} { return "\1\\begin\{verbatim\}\n${code}\n\1\\end\{verbatim\}\n" }


proc fmt_nl     {}     {return}
proc fmt_arg    {text} {Underline $text}
proc fmt_cmd    {text} {Bold      $text}
proc fmt_emph   {text} {Italic    $text}
proc fmt_opt    {text} {return   ?$text?}

proc fmt_comment {text} {
    set res [list]
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
proc fmt_file    {text} {return "\"[Italic $text]\""}
proc fmt_namespace     {text} {Bold $text]}
proc fmt_uri     {text {label {}}} {
    if {$label == {}} {
	# Without label we use the link directly as part of the text.
	return [Underline $text]
    } else {
	# Label is used in the text, referred link is delegated into a
	# footnote.
	return "[Underline $label] \1\\footnote\{[texEscape $text]\}"
    }
}
proc fmt_image {text {label {}}} {
    global _has_images
    # text = symbolic name of the image.







|







335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
proc fmt_file    {text} {return "\"[Italic $text]\""}
proc fmt_namespace     {text} {Bold $text]}
proc fmt_uri     {text {label {}}} {
    if {$label == {}} {
	# Without label we use the link directly as part of the text.
	return [Underline $text]
    } else {
	# Label is used in the text, refered link is delegated into a
	# footnote.
	return "[Underline $label] \1\\footnote\{[texEscape $text]\}"
    }
}
proc fmt_image {text {label {}}} {
    global _has_images
    # text = symbolic name of the image.
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
	\1\\_ \1\\_
	\1\\% \1\\%
	\1\\^ \1\\^
	\1\\$ \1\\$
	\1\\# \1\\#
	\1\\& \1\\&
	\1\\ \1\\
	\\ \1$\\backslash$
	_ \1\\_
	% \1\\%
	^ \1\\^
	$ \1\\$
	< \1$<$
	> \1$>$
	# \1\\#
	& \1\\&
    } $text]
    if {$x} {
	#puts_stderr "==> '$text'"
    }
    return $text
}

################################################################







|
<
<
<
<
<
<
<
<








389
390
391
392
393
394
395
396








397
398
399
400
401
402
403
404
	\1\\_ \1\\_
	\1\\% \1\\%
	\1\\^ \1\\^
	\1\\$ \1\\$
	\1\\# \1\\#
	\1\\& \1\\&
	\1\\ \1\\
	\\ \1$\\backslash$ _ \1\\_ % \1\\% ^ \1\\^ $ \1\\$ < \1$<$ > \1$>$ # \1\\# & \1\\&








    } $text]
    if {$x} {
	#puts_stderr "==> '$text'"
    }
    return $text
}

################################################################

Deleted modules/doctools/mpformats/fmt.markdown.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
# -*- tcl -*-
# Convert a doctools document into markdown formatted text
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>

# Note: While markdown is a text format its intended target is HTML,
# making its formatting nearer to that with the ability to set anchors
# and refer to them, linkage in general.

# Notes, Attention
# - A number of characters are special to markdown. Such characters in
#   user input are \-quoted to make them non-special to the markdown
#   processor handling our generated document.
#
# - Exceptions are the special characters in verbatim code-blocks
#   (indent 4), and in `...` sequences (verbatim inline). In such
#   blocks they are not special and must not be quoted.
#
#   The generator currently only used verbatim blocks, for doctools
#   examples. It does not use verbatim inlines.

# # ## ### ##### ######## #############
## Load shared code and modify it to our needs.

dt_source _common.tcl
dt_source _text.tcl
dt_source fmt.text
dt_source _markdown.tcl
dt_source _xref.tcl

# # ## ### ##### ########
## Override crucial parts of the regular text formatter

proc In? {} {
    if {![CAttrHas mdindent]} {
	CAttrSet mdindent ""
    }
    CAttrGet mdindent
}

proc In! {ws} {
    CAttrSet mdindent $ws
}

proc Example {complex} {
    if {![CAttrHas exenv$complex]} {
	ContextPush
	set exenv [NewExample $complex]
	ContextPop
	CAttrSet exenv$complex $exenv
	ContextCommit
    }
    return [CAttrGet exenv$complex]
}

proc NewExample {complex} {
    return [ContextNew Example$complex {
	VerbatimOn
	Example!
	if {$complex} {
	    # Block quote
	    Prefix+ "> "
	} else {
	    # Code block
	    Prefix+ "    "
	}
    }] ; # {}
}

proc NewUnorderedList {} {
    # Itemized list - unordered list - bullet
    # 1. Base context provides indentation.
    # 2. First paragraph in a list item.
    # 3. All other paragraphs.
    ContextPush

    #puts_stderr "UL [CAttrName]"
    #puts_stderr "UL |[string map {{ } _} [In?]]|outer"

    set base [ContextNew Itemized {
	LC
	set bullet "[In?]  [IBullet]"
	set ws     "[BlankM $bullet] "
	In! $ws
    }] ; # {}

    #puts_stderr "UL |[string map {{ } _} $bullet]|[string length $bullet]"
    #puts_stderr "UL |[string map {{ } _} $ws]|[string length $ws]"

    set first [ContextNew First {
	List! bullet $bullet $ws
    }] ; ContextSet $base ; # {}

    set next [ContextNew Next {
	WPrefix! $ws
	Prefix!  $ws
    }] ; ContextSet $base ; # {}

    OUL $first $next
    ContextCommit

    ContextPop
    ContextSet $base
    return
}

proc NewOrderedList {} {
    # Ordered list - enumeration - enum
    # 1. Base context provides indentation.
    # 2. First paragraph in a list item.
    # 3. All other paragraphs.
    ContextPush

    #puts_stderr "OL [CAttrName]"
    #puts_stderr "OL |[string map {{ } _} [In?]]|outer"

    set base [ContextNew Enumerated {
	LC
	set bullet "[In?]  [EBullet]"
	set ws     "[BlankM $bullet] "
	In! $ws
    }] ; # {}

    #puts_stderr "OL |[string map {{ } _} $bullet]|[string length $bullet]"
    #puts_stderr "OL |[string map {{ } _} $ws]|[string length $ws]"

    set first [ContextNew First {
	List! bullet $bullet $ws
    }] ; ContextSet $base ; # {}

    set next [ContextNew Next {
	WPrefix! $ws
	Prefix!  $ws
    }] ; ContextSet $base ; # {}

    OUL $first $next
    ContextCommit

    ContextPop
    ContextSet $base
    return
}

proc NewDefinitionList {} {
    # Definition list - terms & definitions
    # 1. Base context provides indentation.
    # 2. Term context
    # 3. Definition context
    ContextPush

    # Markdown has no native definition lists. We translate them into
    # itemized lists, rendering the term part as the first paragraph
    # of each entry, and the definition as all following.

    #puts_stderr "DL [CAttrName]"
    #puts_stderr "DL |[string map {{ } _} [In?]]|outer"

    set base [ContextNew Definitions {
	LC
	set bullet "[In?]  [IBullet]"
	set ws "[BlankM $bullet] "
	In! $ws
    }] ; # {}

    #puts_stderr "DL |[string map {{ } _} $bullet]|[string length $bullet]"
    #puts_stderr "DL |[string map {{ } _} $ws]|[string length $ws]"

    set term [ContextNew Term {
	List! bullet $bullet $ws
	VerbatimOn
    }] ; ContextSet $base ; # {}

    set def [ContextNew Def {
	WPrefix! $ws
	Prefix!  $ws
    }] ; ContextSet $base ; # {}

    TD $term $def
    ContextCommit

    ContextPop
    ContextSet $base
    return
}

##
# # ## ### ##### ########
##

c_pass 1 fmt_section {name id} { c_newSection $name 1 end $id }
c_pass 2 fmt_section {name id} {
    CloseParagraph
    Section [SetAnchor $name $id]
    return
}

c_pass 1 fmt_subsection {name id} { c_newSection $name 2 end $id }
c_pass 2 fmt_subsection {name id} {
    CloseParagraph
    Subsection [SetAnchor $name $id]
    return
}

proc fmt_sectref {title {id {}}} {
    if {$id == {}} { set id [c_sectionId $title] }
    if {[c_sectionKnown $id]} {
    	return [ALink "[Hash]$id" $title]
    } else {
	return [Strong $title]
    }
}

c_pass 1 fmt_usage {cmd args} {
    set text [join [linsert $args 0 $cmd] " "]
    c_hold synopsis "$text[LB.]"
}

c_pass 1 fmt_call  {cmd args} {
    set text [join [linsert $args 0 $cmd] " "]
    set dest "[Hash][c_cnext]"
    c_hold synopsis "[MakeLink $text $dest][LB.]"
}
c_pass 2 fmt_call {cmd args} {
    set text [join [linsert $args 0 $cmd] " "]
    return [fmt_lst_item [SetAnchor $text [c_cnext]]]
}

c_pass 1 fmt_require {pkg {version {}}} {
    set result "package require $pkg"
    if {$version != {}} {append result " $version"}
    c_hold require "$result  "
    return
}

c_pass 2 fmt_tkoption_def {name dbname dbclass} {
    set    text ""
    append text "Command-Line Switch:\t[fmt_option $name][LB]"
    append text "Database Name:\t[Strong $dbname][LB]"
    append text "Database Class:\t[Strong $dbclass]\n"
    fmt_lst_item $text
}

proc fmt_syscmd  {text} { Strong [XrefMatch $text sa] }
proc fmt_package {text} { Strong [XrefMatch $text sa kw] }
proc fmt_term    {text} { Em     [XrefMatch $text kw sa] }

proc fmt_arg     {text} { Em     $text }
proc fmt_cmd     {text} { Strong [XrefMatch $text sa] }
proc fmt_method  {text} { Strong $text }
proc fmt_option  {text} { Strong $text }

proc fmt_uri {text {label {}}} {
    if {$label == {}} { set label $text }
    ALink $text $label
}

proc fmt_image {text {label {}}} {
    # text = symbolic name of the image.

    # formatting based on the available data ...

    set img [dt_imgdst $text {png gif jpg}]
    if {$img != {}} {
	set img [LinkTo $img [LinkHere]]
	if {$label != {}} {
	    return "[Bang][OBrk][CBrk][OPar]$img \"$label\"[CPar]"
	} else {
	    return "[Bang][OBrk][CBrk][OPar]$img[CPar]"
	}
    }

    set img [dt_imgdata $text {txt}]
    if {$img != {}} {
	# Show ASCII image like an example (code block => fixed font, no reflow)
	# A label is shown as a pseudo-caption (paragraph after image).
	fmt_example $img
	if {$label != {}} {
	    Text [Strong "IMAGE: $label"]
	    CloseCurrent
	}
    }

    return $img
}

c_pass 1 fmt_manpage_begin {title section version} {c_cinit ; c_clrSections ; return}
c_pass 2 fmt_manpage_begin {title section version} {
    Off
    MDCInit
    XrefInit
    c_cinit

    set module      [dt_module]
    set shortdesc   [c_get_module]
    set description [c_get_title]
    set copyright   [c_get_copyright]
    set pagetitle   "$title - $shortdesc"

    MDComment  "$title - $shortdesc"
    MDComment  [c_provenance]
    if {$copyright != {}} {
	# Note, multiple copyright clauses => multiple lines, comments
	# are single-line => split for generation, strip MD markup for
	# linebreaks, will be re-added when committing the complete
	# comment block.
	foreach line [split $copyright \n] {
	    MDComment [string trimright $line " \t\1"]
	}
    }
    MDComment  "[string trimleft $title :]($section) $version $module \"$shortdesc\""
    MDCDone

    Text [GetT header @TITLE@ $pagetitle]
    CloseParagraph

    Section NAME
    Text "$title - $description"
    CloseParagraph
    return
}

c_pass 2 fmt_description {id} {
    On
    set syn [c_held synopsis]
    set req [c_held require]

    # Create the TOC.

    # Pass 1: We have a number of special sections which were not
    #         listed explicitly in the document sources. Add them
    #         now. Note the inverse order for the sections added
    #         at the beginning.

    c_newSection Description 1 0 $id
    if {$syn != {} || $req != {}} {c_newSection Synopsis 1 0 synopsis}
    c_newSection {Table Of Contents} 1 0 toc

    if {[llength [c_xref_seealso]]  > 0} {c_newSection {See Also} 1 end seealso}
    if {[llength [c_xref_keywords]] > 0} {c_newSection Keywords   1 end keywords}
    if {[c_xref_category]         ne ""} {c_newSection Category   1 end category}
    if {[c_get_copyright]         != {}} {c_newSection Copyright  1 end copyright}

    # Pass 2: Generate the markup for the TOC, indenting the
    #         links according to the level of each section.

    TOC

    # Implicit sections coming after the TOC (Synopsis, then the
    # description which starts the actual document). The other
    # implicit sections are added at the end of the document and are
    # generated by 'fmt_manpage_end' in the second pass.
    
    if {$syn != {} || $req != {}} {
	Section [SetAnchor SYNOPSIS synopsis]
	if {($req != {}) && ($syn != {})} {
	    Text $req\n\n$syn
	} else {
	    if {$req != {}} {Text $req}
	    if {$syn != {}} {Text $syn}
	}
	CloseParagraph [Verbatim]
    }

    Section [SetAnchor DESCRIPTION description]
    return
}

c_pass 2 fmt_manpage_end {} {
    set sa [c_xref_seealso]
    set kw [c_xref_keywords]
    set ca [c_xref_category]
    set ct [c_get_copyright]

    CloseParagraph
    if {[llength $sa]} { Special {SEE ALSO} seealso   [join [XrefList [lsort $sa] sa] ", "] }
    if {[llength $kw]} { Special KEYWORDS   keywords  [join [XrefList [lsort $kw] kw] ", "] }
    if {$ca ne ""}     { Special CATEGORY   category  $ca            }
    if {$ct != {}}     { Special COPYRIGHT  copyright $ct [Verbatim] }
    return
}

proc Breaks {lines} {
    set r {}
    foreach line $lines { lappend r $line[LB] }
    return $r
}

proc LeadSpaces {lines} {
    set r {}
    foreach line $lines { lappend r [LeadSpace $line] }
    return $r
}

proc LeadSpace {line} {
    # Split into leading and trailing whitespace, plus content
    regexp {^([ \t]*)(.*)([ \t]*)$} $line -> lead content _
    # Drop trailing spaces, make leading non-breaking, keep content (and inner spaces).
    return [RepeatM "&nbsp;" $lead]$content
}

c_pass 2 fmt_example_end {} {
    #puts_stderr "AAA/fmt_example_end"
    # Flush markup from preceding commands into the text buffer.
    TextPlain ""

    TextTrimLeadingSpace

    # Check for protected markdown markup in the input. If present
    # this is a complex example with highlighted parts.
    set complex [string match *\1* [Text?]]

    #puts_stderr "AAA/fmt_example_end/$complex"
    
    # In examples (verbatim markup) markdown's special characters are
    # no such by default, thus must not be quoted. Mark them as
    # protected from quoting. Further look for and convert
    # continuation lines protected from Tcl substitution into a
    # regular continuation line.
    set t [Text?]
    set t [string map [list \\\\\n \\\n] $t]
    if {$complex} {
	# Process for block quote
	# - make leading spaces non-breaking
	# - force linebreaks
	set t [join [Breaks [LeadSpaces [split $t \n]]] {}]
    } else {
	# Process for code block (verbatim)
	set t [Mark $t]
    }
    TextClear
    Text $t
    TextTrimTrailingSpace
    
    set penv [GetCurrent]
    if {$penv != {}} {
	# In a list we save the current list context, activate the
	# proper paragraph context and create its example
	# variant. After closing the paragraph using the example we
	# restore and reactivate the list context.
	ContextPush
	ContextSet $penv
	CloseParagraph [Example $complex]
	ContextPop
    } else {
	# In a regular paragraph we simple close the example
	CloseParagraph [Example $complex]
    }

    #puts_stderr "AAA/fmt_example_end/Done"
    return
}

proc c_get_copyright {} {
    return [join [c_get_copyright_r] [LB]]
}

##
# # ## ### ##### ########
##

proc Special {title id text {p {}}} {
    Section [SetAnchor $title $id]
    Text $text
    CloseParagraph $p
}

proc TOC {} {
    # While we could go through (fmt_list_begin itemized, item ...,
    # fmt_list_end) it looks to be easier to directly emit paragraphs
    # into the display list. No need to track anything. Just map entry
    # level directly to the proper context.
    Section [SetAnchor {Table Of Contents} toc]

    ContextPush
    lappend toc _bogus_
    lappend toc [ContextNew TOC/Section { List! bullet "  [Dash]"     "    "     }]
    lappend toc [ContextNew TOC/SubSect { List! bullet "      [Dash]" "        " }]
    ContextPop

    foreach {name id level} [c_sections] {
	# level in {1,2}, 1 = section, 2 = subsection
	Text [ALink "[Hash]$id" $name]
	CloseParagraph [lindex $toc $level]
    }

    return
}

# # ## ### ##### ########
## Engine Parameters
## - xref	cross-reference data
## - header	HTML or MD to place at the top of the document, before the title.

proc GetXref {} { Get xref } ;# xref access to engine parameters

global    __var
array set __var {
    xref   {}
    header {}
}
proc Get               {varname}      {global __var ; return $__var($varname)}
proc fmt_listvariables {}             {global __var ; return [array names __var]}
proc fmt_varset        {varname text} {
    global __var
    if {![info exists __var($varname)]} {
	return -code error "Unknown engine variable \"$varname\""
    }
    set __var($varname) $text
    return
}

# Extended `Get`, templating.
proc GetT {varname args} {
    set content [Get $varname]
    if {$content == {}} { return "" }
    if {[llength $args]} {
	set content [string map $args $content]
    }

    # The content is specified by the user. It is expected to be valid
    # markdown. That means that any special characters are only quoted
    # when they are not special. Internally this is inverted.

    return "[Mark $content]\n"
}

##
# # ## ### ##### ########
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to modules/doctools/mpformats/fmt.nroff.

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
# -*- tcl -*-
#
# -- doctools NROFF formatting engine.
#
# Copyright (c) 2001-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# [expand] definitions to convert a tcl based manpage definition into
# a manpage based upon *roff markup. Additional definition files allow
# the conversion into HTML and TMML.


################################################################
# Load shared code, load nroff support.

dt_source _common.tcl
dt_source _nroff.tcl

global _in_example
set    _in_example 0

################################################################
# Define the API commands.

# Called to handle plain text from the input
proc fmt_plain_text {text} {
    global _in_example
    if {$_in_example} {
	set text [string map [list \\\\\n \\\n] $text]
    }
    return $text
}

c_pass 1 fmt_manpage_begin {title section version} c_begin
c_pass 2 fmt_manpage_begin {title section version} {
    c_begin

    set module      [dt_module]
    set shortdesc   [c_get_module]
    set description [c_get_title]




|












<
<
<



<
<
<
<
<
<
<
<
<







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
# -*- tcl -*-
#
# -- doctools NROFF formatting engine.
#
# Copyright (c) 2001-2011 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# [expand] definitions to convert a tcl based manpage definition into
# a manpage based upon *roff markup. Additional definition files allow
# the conversion into HTML and TMML.


################################################################
# Load shared code, load nroff support.

dt_source _common.tcl
dt_source _nroff.tcl




################################################################
# Define the API commands.










c_pass 1 fmt_manpage_begin {title section version} c_begin
c_pass 2 fmt_manpage_begin {title section version} {
    c_begin

    set module      [dt_module]
    set shortdesc   [c_get_module]
    set description [c_get_title]
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
	append nroff [nr_nofill] \n
	append nroff $ct \n
	append nroff [nr_fill]
    }
    return $nroff
}

proc fmt_postprocess {nroff} { nroff_postprocess $nroff }

proc fmt_section    {name {id {}}} {return [nr_section    $name]}
proc fmt_subsection {name {id {}}} {return [nr_subsection $name]}
proc fmt_para {} {
    if {[dt_lnesting]} { return [nr_item] }
    nr_p
}







|







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
	append nroff [nr_nofill] \n
	append nroff $ct \n
	append nroff [nr_fill]
    }
    return $nroff
}

proc fmt_postprocess {nroff} {return [nroff_postprocess $nroff]}

proc fmt_section    {name {id {}}} {return [nr_section    $name]}
proc fmt_subsection {name {id {}}} {return [nr_subsection $name]}
proc fmt_para {} {
    if {[dt_lnesting]} { return [nr_item] }
    nr_p
}
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
    append text "[nr_item]\n"
    return $text
}

################################################################

proc fmt_example_begin {} {
    global _in_example ; set _in_example 1
    return [nr_cs]\n
}
proc fmt_example_end   {} {
    global _in_example ; set _in_example 0
    if {[dt_lnesting]} {
	return [nr_ce][nr_item]
    }
    nr_ce
}
proc fmt_example {code} {
    global _in_example ; set _in_example 1
    set lines [list "" [nr_cs]]
    foreach line [split $code "\n"] {
    	lappend lines [fmt_plain_text $line]
    }
    lappend lines [nr_ce] ""
    set _in_example 0
    return [join $lines "\n"]
}

proc fmt_nl     {}     {nr_vspace}
proc fmt_arg    {text} {underline $text}
proc fmt_cmd    {text} {bold      $text}
proc fmt_emph   {text} {underline $text}







<



<





|
<





<







185
186
187
188
189
190
191

192
193
194

195
196
197
198
199
200

201
202
203
204
205

206
207
208
209
210
211
212
    append text "[nr_item]\n"
    return $text
}

################################################################

proc fmt_example_begin {} {

    return [nr_cs]\n
}
proc fmt_example_end   {} {

    if {[dt_lnesting]} {
	return [nr_ce][nr_item]
    }
    nr_ce
}
proc fmt_example {code} { 

    set lines [list "" [nr_cs]]
    foreach line [split $code "\n"] {
    	lappend lines [fmt_plain_text $line]
    }
    lappend lines [nr_ce] ""

    return [join $lines "\n"]
}

proc fmt_nl     {}     {nr_vspace}
proc fmt_arg    {text} {underline $text}
proc fmt_cmd    {text} {bold      $text}
proc fmt_emph   {text} {underline $text}

Changes to modules/doctools/mpformats/fmt.text.

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
89
90
91
92
93
94

95
96
97
98
99

100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116


117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268

269
270
271
272
273
274
275
# -*- tcl -*-
#
# -- Engine to convert a doctools document into plain text.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>



# # ## ### ##### ######## #############
## Load shared code and modify it to our needs.

dt_source _common.tcl
dt_source _text.tcl

proc c_copyrightsymbol {} {return "(c)"}


# # ## ### ##### ########
## Special manpage contexts

# example     = if present, context is for an example
# exenv       = if present, reference to example variant of current context

proc Example!  {} { CAttrSet example . }
proc Example?  {} { CAttrHas example }


proc NewExample {} {





    return [ContextNew Example { VerbatimOn ; Example! ; Prefix! "| " }] ; # {}
}

proc Example {} {

    if {![CAttrHas exenv]} {
	ContextPush
	set exenv [NewExample]
	ContextPop
	CAttrSet exenv $exenv

	ContextCommit

    }
    return [CAttrGet exenv]
}

proc NewList {what} {
    # List contexts
    # Per list type several contexts are required.
    #puts_stderr "LIST OUT [CAttrName] NewList $what"
    
    switch -exact -- $what {
	enumerated {NewOrderedList}
	itemized   {NewUnorderedList}
	arguments -
	commands  -
	options   -
	tkoptions -
	definitions {NewDefinitionList}
    }

    #puts_stderr "LIST INN [CAttrName]"
    return
}

proc NewUnorderedList {} {


    # Itemized list - unordered list - bullet
    # 1. Base context provides indentation.
    # 2. First paragraph in a list item.
    # 3. All other paragraphs.
    ContextPush

    set base [ContextNew Itemized {

	LC
	MarginIn
	set bullet [IBullet]
    }] ; # {}


    set first [ContextNew First {
	List! bullet $bullet [BlankMargin]
    }] ; ContextSet $base ; # {}

    set next [ContextNew Next {
	MarginIn
    }] ; ContextSet $base ; # {}

    OUL $first $next
    ContextCommit

    ContextPop
    ContextSet $base
    return
}

proc NewOrderedList {} {


    # Ordered list - enumeration - enum
    # 1. Base context provides indentation.
    # 2. First paragraph in a list item.
    # 3. All other paragraphs.
    ContextPush
    
    set base [ContextNew Enumerated {

	LC
	MarginIn
	set bullet [EBullet]
    }] ; # {}


    set first [ContextNew First {
	List! enum $bullet [BlankMargin]
    }] ; ContextSet $base ; # {}

    set next [ContextNew Next {
	MarginIn
    }] ; ContextSet $base ; # {}

    OUL $first $next
    ContextCommit

    ContextPop
    ContextSet $base
    return
}

proc NewDefinitionList {} {


    # Definition list - terms & definitions
    # 1. Base context provides indentation.
    # 2. Term context
    # 3. Definition context
    ContextPush

    set base [ContextNew Definitions {
	LC
	MarginIn
    }] ; # {}

    set term [ContextNew Term {
	VerbatimOn
    }] ; ContextSet $base ; # {}

    set def [ContextNew Def {
	MarginIn
    }] ; ContextSet $base ; # {}

    TD $term $def
    ContextCommit
    
    ContextPop
    ContextSet $base
    return
}

# # ## ### ##### ########
##

proc LC {} {
    # Clear inherited list type information from the current context
    CAttrUnset _first
    CAttrUnset _next
    CAttrUnset _term
    CAttrUnset _definition
}

proc OUL {f n} {
    CAttrSet _first $f
    CAttrSet _next  $n
}

proc TD {t d} {
    CAttrSet _term       $t
    CAttrSet _definition $d
}

proc IsPara   {} { CAttrHas _next }
proc Paras    {} { global __pcount ; set  __pcount }
proc PAdvance {} {
    global __pcount ; incr __pcount 1
    #puts_stderr "    ZZZ/ItemParas/Advance:$__pcount"
}
proc PReset   {} {
    #puts_stderr "    ZZZ/ItemParas/Reset"
    global __pcount ; set  __pcount 0 }

global __pcount  ; set __pcount  0
global __pcstack ; set __pcstack {}

proc PSave {} {
    global __pcount __pcstack
    lappend __pcstack $__pcount
    PReset
}

proc PRestore {} {
    global __pcount __pcstack
    set __pcount  [lindex $__pcstack end]
    set __pcstack [lrange $__pcstack 0 end-1]
    #puts_stderr "    ZZZ/ItemParas/Restore:$__pcount"
    return
}

proc First    {} { CAttrGet _first }
proc Other    {} { CAttrGet _next }
proc Term     {} { CAttrGet _term }
proc Def      {} { CAttrGet _definition }
proc IsDef    {} { CAttrHas _definition }

# # ## ### ##### ########
##

proc CloseCurrent {} {
    if {[IsDef]} {
	#puts_stderr "    ZZZ/CloseCurrent/Definitions"
	# Currently in a definition list.
	CloseParagraph [Def]
    } elseif {[IsPara]} {
	#puts_stderr "    ZZZ/CloseCurrent/UOL"
	# Currently in an (un)ordered list.
	#puts_stderr "    ZZZ/ItemParas/[Paras]"
	if {![Paras]} {
	    # No paragraphs yet, this is first in the item
	    if {[CloseParagraph [First]]} PAdvance
	} else {
	    # More paragraphs in the item
	    if {[CloseParagraph [Other]]} PAdvance
	}
    } else {
	#puts_stderr "    ZZZ/CloseCurrent/Plain"
	# Currently in a regular paragraph
	CloseParagraph
    }
}

proc GetCurrent {} {
    if {[IsDef]} {
	#puts_stderr "    ZZZ/GetCurrent/Definitions"
	# Currently in a definition list.
	return [Def]
    } elseif {[IsPara]} {
	#puts_stderr "    ZZZ/GetCurrent/UOL"
	# Currently in an (un)ordered list.
	#puts_stderr "    ZZZ/ItemParas/[Paras]"
	if {![Paras]} {
	    set res [First]
	} else {
	    set res [Other]
	}
	PAdvance
	return $res
    } else {
	#puts_stderr "    ZZZ/GetCurrent/Plain"
	# Currently in a regular paragraph
	return {}
    }
}

# # ## ### ##### ########
##

c_holdBuffers require

rename fmt_initialize   BaseInitialize
proc fmt_initialize {} {BaseInitialize ; TextInitialize ; return}

proc fmt_postprocess {text} { text_postprocess $text }

# # ## ### ##### ########
## Implementations of the formatting commands.

c_pass 1 fmt_plain_text {text} NOP
c_pass 2 fmt_plain_text {text} { text_plain_text $text }

c_pass 1 fmt_manpage_begin {title section version} NOP
c_pass 2 fmt_manpage_begin {title section version} {
    Off
    set module      [dt_module]
    set shortdesc   [c_get_module]
    set description [c_get_title]


    set     hdr [list]
    lappend hdr "$title - $shortdesc"
    lappend hdr [c_provenance]
    lappend hdr "[string trimleft $title :]($section) $version $module \"$shortdesc\""
    set     hdr [join $hdr \n]



|

|
|
>
>
|
|



<


>
|
<

<
<
|
<
<
>


>
>
>
>
>
|



>
|
|
|
|
|
>
|
>

|



|
|
<
|









<
<
<



>
>

|


<

|
>
|
<
|

|
>
|
|
|

|
|
|

|
|
|
|
<




>
>

|


<
|
|
>
|
<
|

|
>
|
|
|

|
|
|

|
|
|
|
<




>
>

|
|
|
<

|
<
|

<
|
|
|

|
|
|

<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<


<
<
<
<
<
<

<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<


<
|

<

|
|


|







>







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
89
90
91
92
93
94
95
96

97
98
99
100

101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

117
118
119
120
121
122
123
124
125
126

127
128

129
130

131
132
133
134
135
136
137
138


139













140

























141










142
143






144


145






















146













147












148
149

150
151

152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# -*- tcl -*-
#
# fmt.text -- Engine to convert a doctools document into plain text.
#
# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
#
################################################################
################################################################

# Load shared code and modify it to our needs.

dt_source _common.tcl
dt_source _text.tcl

proc c_copyrightsymbol {} {return "(c)"}

rename fmt_initialize     BaseInitialize
proc   fmt_initialize {} {BaseInitialize ; TextInitialize ; return}




################################################################


# Special manpage environments

proc NewExample {} {
    global currentEnv
    return [NewEnv Example {
	set    currentEnv(verbatim) 1
	append currentEnv(prefix)   "| "
	set    currentEnv(example) .
    }] ; # {}
}

proc Example {} {
    global currentEnv
    if {![info exists currentEnv(exenv)]} {
	SaveContext
	set verb [NewExample]
	RestoreContext

	# Remember verbatim mode in the base environment
	set currentEnv(exenv) $verb
	SaveEnv
    }
    return $currentEnv(exenv)
}

proc NewList {what} {
    # List environments
    # Per list several environments are required.


    switch -exact -- $what {
	enumerated {NewOrderedList}
	itemized   {NewUnorderedList}
	arguments -
	commands  -
	options   -
	tkoptions -
	definitions {NewDefinitionList}
    }



}

proc NewUnorderedList {} {
    global currentEnv lmarginIncrement

    # Itemized list - unordered list - bullet
    # 1. Base environment provides indentation.
    # 2. First paragraph in a list item.
    # 3. All other paragraphs.


    set base [NewEnv Itemized {
	incr currentEnv(lmargin)   $lmarginIncrement


	set bullet [Bullet currentEnv(bulleting)]
    }] ; # {}
    set first [NewEnv First {
	set currentEnv(wspfx) [::textutil::repeat::blank $lmarginIncrement]
	set currentEnv(listtype)  bullet
	set currentEnv(bullet) $bullet
    }] ; SetContext $base ; # {}

    set next [NewEnv Next {
	incr currentEnv(lmargin)   $lmarginIncrement
    }] ; SetContext $base ; # {}

    set currentEnv(_first) $first
    set currentEnv(_next)  $next
    set currentEnv(pcount) 0
    SaveEnv

    return
}

proc NewOrderedList {} {
    global currentEnv lmarginIncrement

    # Ordered list - enumeration - enum
    # 1. Base environment provides indentation.
    # 2. First paragraph in a list item.
    # 3. All other paragraphs.


    set base [NewEnv Enumerated {
	incr currentEnv(lmargin)   $lmarginIncrement


	set bullet [EnumBullet currentEnv(enumeration)]
    }] ; # {}
    set first [NewEnv First {
	set currentEnv(wspfx)  [::textutil::repeat::blank $lmarginIncrement]
	set currentEnv(listtype)  enum
	set currentEnv(bullet) $bullet
    }] ; SetContext $base ; # {}

    set next [NewEnv Next {
	incr currentEnv(lmargin)   $lmarginIncrement
    }] ; SetContext $base ; # {}

    set currentEnv(_first) $first
    set currentEnv(_next)  $next
    set currentEnv(pcount) 0
    SaveEnv

    return
}

proc NewDefinitionList {} {
    global currentEnv lmarginIncrement

    # Definition list - terms & definitions
    # 1. Base environment provides indentation.
    # 2. Term environment
    # 3. Definition environment


    set base [NewEnv DefL {

	incr currentEnv(lmargin)   $lmarginIncrement
    }] ; # {}

    set term [NewEnv Term {
	set currentEnv(verbatim) 1
    }] ; SetContext $base ; # {}

    set def [NewEnv Def {
	incr currentEnv(lmargin) $lmarginIncrement
    }] ; SetContext $base ; # {}



    set currentEnv(_term)       $term













    set currentEnv(_definition) $def

























    SaveEnv










    return
}









################################################################






















# Final layouting.


























c_holdBuffers require


proc fmt_postprocess {text} {text_postprocess $text}



################################################################
# Implementations of the formatting commands.

c_pass 1 fmt_plain_text {text} NOP
c_pass 2 fmt_plain_text {text} {text_plain_text $text}

c_pass 1 fmt_manpage_begin {title section version} NOP
c_pass 2 fmt_manpage_begin {title section version} {
    Off
    set module      [dt_module]
    set shortdesc   [c_get_module]
    set description [c_get_title]
    set copyright   [c_get_copyright]

    set     hdr [list]
    lappend hdr "$title - $shortdesc"
    lappend hdr [c_provenance]
    lappend hdr "[string trimleft $title :]($section) $version $module \"$shortdesc\""
    set     hdr [join $hdr \n]

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
c_pass 1 fmt_section     {name {id {}}} NOP
c_pass 2 fmt_section     {name {id {}}} {CloseParagraph ; Section $name ; return}

c_pass 1 fmt_subsection  {name {id {}}} NOP
c_pass 2 fmt_subsection  {name {id {}}} {CloseParagraph ; Subsection $name ; return}

c_pass 1 fmt_para {} NOP
c_pass 2 fmt_para {} {
    CloseCurrent
    #puts_stderr "AAA/fmt_para/START"
    return
}

# NL is an alias of PARA
# See also fmt_example_begin
c_pass 1 fmt_nl {} NOP
c_pass 2 fmt_nl {} {CloseCurrent ; return }

c_pass 2 fmt_require {pkg {version {}}} NOP
c_pass 1 fmt_require {pkg {version {}}} {
    set result "package require $pkg"
    if {$version != {}} {append result " $version"}
    c_hold require $result
    return







|
<
<
<
<
<
<
<
<
<







205
206
207
208
209
210
211
212









213
214
215
216
217
218
219
c_pass 1 fmt_section     {name {id {}}} NOP
c_pass 2 fmt_section     {name {id {}}} {CloseParagraph ; Section $name ; return}

c_pass 1 fmt_subsection  {name {id {}}} NOP
c_pass 2 fmt_subsection  {name {id {}}} {CloseParagraph ; Subsection $name ; return}

c_pass 1 fmt_para {} NOP
c_pass 2 fmt_para {} {CloseParagraph ; return}










c_pass 2 fmt_require {pkg {version {}}} NOP
c_pass 1 fmt_require {pkg {version {}}} {
    set result "package require $pkg"
    if {$version != {}} {append result " $version"}
    c_hold require $result
    return
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369








370
371
372
373
374
375
376
377
378
379
380
381
382
383
384





385
386
387
388
389
390
391
392
393
394
395
396
397
398





399
400
401
402
403
404
405
406
407

408
409
410

411
412
413
414
415
416

417
418
419

420
421
422
423
424
425
426
427
	CloseParagraph [Verbatim]
    }

    Section DESCRIPTION
    return
}

# # ## ### ##### ########
##

c_pass 1 fmt_list_begin {what {hint {}}} NOP
c_pass 2 fmt_list_begin {what {hint {}}} {
    CloseCurrent

    #puts_stderr "AAA/fmt_list_begin/Setup $what"









    ContextPush ;# push outer
    NewList $what ;# base/controller of current/new/inner
    Off
    PSave

    #puts_stderr "AAA/fmt_list_begin/Enter"
    return
}

c_pass 1 fmt_list_end {} NOP
c_pass 2 fmt_list_end {} {
    CloseCurrent

    #puts_stderr "AAA/fmt_list_end/Exit"






    ContextPop ;# return to outer
    PRestore

    #puts_stderr "AAA/fmt_list_end/Done"
    return
}

c_pass 1 fmt_lst_item {text} NOP
c_pass 2 fmt_lst_item {text} {
    if {[IsOff]} { On } else { CloseParagraph [Def] }

    #puts_stderr "AAA/fmt_lst_item/(($text))"






    Text $text
    CloseParagraph [Term]

    #puts_stderr "AAA/fmt_lst_item/Done"
    return
}

c_pass 1 fmt_bullet {} NOP
c_pass 2 fmt_bullet {} {

    if {[IsOff]} { On } else { CloseCurrent }

    #puts_stderr "AAA/fmt_bullet/START"

    PReset
    return
}

c_pass 1 fmt_enum {} NOP
c_pass 2 fmt_enum {} {

    if {[IsOff]} { On } else { CloseCurrent }

    #puts_stderr "AAA/fmt_enum/START"

    PReset
    return
}

c_pass 1 fmt_cmd_def  {command} NOP
c_pass 2 fmt_cmd_def  {command} {fmt_lst_item [fmt_cmd $command]}

c_pass 1 fmt_arg_def {type name {mode {}}} NOP







|
<



|

|
>
>
>
>
>
>
>
>
|
|
|

<

|





|

|
>
>
>
>
>
|
<
|

|





|

|

>
>
>
>
>

|

|





>
|
|
<
>
|





>
|
|
<
>
|







243
244
245
246
247
248
249
250

251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268

269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284

285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313

314
315
316
317
318
319
320
321
322
323

324
325
326
327
328
329
330
331
332
	CloseParagraph [Verbatim]
    }

    Section DESCRIPTION
    return
}

################################################################


c_pass 1 fmt_list_begin {what {hint {}}} NOP
c_pass 2 fmt_list_begin {what {hint {}}} {
    #puts_stderr "<<fmt_list_begin $what>>"

    global currentEnv
    if {[info exists currentEnv(_definition)]} {
	CloseParagraph $currentEnv(_definition)
    } elseif {[info exists currentEnv(pcount)]} {
	if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}
	if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
	incr currentEnv(pcount)
    } else {
	CloseParagraph
    }
    SaveContext
    NewList $what
    Off


    #puts_stderr "<<fmt_list_begin _____>>"
    return
}

c_pass 1 fmt_list_end {} NOP
c_pass 2 fmt_list_end {} {
    #puts_stderr "<<fmt_list_end>>"

    global currentEnv
    if {[info exists currentEnv(_definition)]} {
	CloseParagraph $currentEnv(_definition)
    } else {
	if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}
	if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
    }

    RestoreContext

    #puts_stderr "<<fmt_list_end ____>>"
    return
}

c_pass 1 fmt_lst_item {text} NOP
c_pass 2 fmt_lst_item {text} {
    global currentEnv

    #puts_stderr "<<fmt_lst_item \{$text\}>>"

    if {[IsOff]} {
	On
    } else {
	CloseParagraph $currentEnv(_definition)
    }
    Text $text
    CloseParagraph $currentEnv(_term)

    #puts_stderr "<<fmt_lst_item _____>>"
    return
}

c_pass 1 fmt_bullet {} NOP
c_pass 2 fmt_bullet {} {
    global currentEnv
    if {[IsOff]} {On ; return}
    if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}

    if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
    set  currentEnv(pcount) 0
    return
}

c_pass 1 fmt_enum {} NOP
c_pass 2 fmt_enum {} {
    global currentEnv
    if {[IsOff]} {On ; return}
    if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}

    if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
    set  currentEnv(pcount) 0
    return
}

c_pass 1 fmt_cmd_def  {command} NOP
c_pass 2 fmt_cmd_def  {command} {fmt_lst_item [fmt_cmd $command]}

c_pass 1 fmt_arg_def {type name {mode {}}} NOP
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457







458

459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511












512

513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
    return
}

c_pass 1 fmt_tkoption_def {name dbname dbclass} NOP
c_pass 2 fmt_tkoption_def {name dbname dbclass} {
    set    text ""
    append text "Command-Line Switch:\t[fmt_option $name]\n"
    append text "Database Name:\t[Strong $dbname]\n"
    append text "Database Class:\t[Strong $dbclass]\n"
    fmt_lst_item $text
}

# # ## ### ##### ########
##

c_pass 1 fmt_example_begin {} NOP
c_pass 2 fmt_example_begin {} {
    #puts_stderr "AAA/fmt_example_begin"









    CloseCurrent

    #puts_stderr "AAA/fmt_example_begin/Done"
    return
}

c_pass 1 fmt_example_end {} NOP
c_pass 2 fmt_example_end {} {
    #puts_stderr "AAA/fmt_example_end"
    #puts_stderr AAA/EIN=[string map [list \1 \\1 \t \\t { } \\s] <<[join [split [Text?] \n] >>\n<<]>>]

    # Flush markup from preceding commands into the text buffer.
    TextPlain ""
    
    TextTrimLeadingSpace

    # Look for and convert continuation lines protected from Tcl
    # substitution into a regular continuation line.
    set t [string map [list \\\\\n \\\n] [Text?]]
    TextClear
    Text $t

    #puts_stderr AAA/EFT=[string map [list \1\\1 \t \\t { } \\s] <<[join [split [Text?] \n] >>\n<<]>>]
    
    set penv [GetCurrent]
    if {$penv != {}} {
	# In a list we save the current list context, activate the
	# proper paragraph context and create its example
	# variant. After closing the paragraph using the example we
	# restore and reactivate the list context.
	ContextPush
	ContextSet $penv
	#if {[CloseParagraph [Example]]} PAdvance
	CloseParagraph [Example]
	ContextPop
    } else {
	# In a regular paragraph we simple close the example
	#if {[CloseParagraph [Example]]} PAdvance
	CloseParagraph [Example]
    }

    #puts_stderr "AAA/fmt_example_end/Done"
    return
}

c_pass 1 fmt_example {code} NOP
c_pass 2 fmt_example {code} {
    fmt_example_begin
    fmt_plain_text $code
    fmt_example_end
    return
}













# # ## ### ##### ########

## Visual markup of words and phrases.

proc fmt_arg     {text} { return $text }
proc fmt_cmd     {text} { return $text }
proc fmt_emph	 {text} { Em     $text }
proc fmt_opt     {text} { return "?$text?" }
proc fmt_comment {text} { return }
proc fmt_sectref {text {label {}}} {
    if {![string length $label]} {set label $text}
    return "-> $text"
}

proc fmt_syscmd  {text} { Strong $text }
proc fmt_method  {text} { return $text }
proc fmt_option  {text} { return $text }
proc fmt_widget  {text} { Strong $text }
proc fmt_fun     {text} { Strong $text }
proc fmt_type    {text} { Strong $text }
proc fmt_package {text} { Strong $text }
proc fmt_class   {text} { Strong $text }
proc fmt_var     {text} { Strong $text }
proc fmt_file    {text} { return "\"$text\"" }
proc fmt_namespace     {text} { Strong $text }
proc fmt_uri     {text {label {}}} {
    if {$label == {}} {
	# Without label we use the link directly as part of the text.
	return "<URL:$text>"
    } else {
	return "[Em $label] <URL:$text>"
    }
}
proc fmt_image {text {label {}}} {
    # text = symbolic name of the image.

    set img [dt_imgdata $text {txt}]
    if {$img != {}} {
	if {$label == {}} {
	    return "IMAGE: $text"
	} else {
	    return "IMAGE: $text $label"
	}
    }

    return $img
}

proc fmt_term    {text} { Em     $text }
proc fmt_const   {text} { Strong $text }
proc fmt_mdash {} { return " --- " }
proc fmt_ndash {} { return " -- " }

# # ## ### ##### ########
return







|
|



|
<



|
>
>
>
>
>
>
>
|
>
|
|
<





|
|
|
|
|
|
<
|
<
<
<
<
<
|
<
|
<

|
|
|
|
|
|
<

|

<
<


<
<











>
>
>
>
>
>
>
>
>
>
>
>
|
>
|

|
|
|
|
|




<
|
|
|
|
|
|
|
|
|
|
|





|






|
|








<
|
|



|
<
345
346
347
348
349
350
351
352
353
354
355
356
357

358
359
360
361
362
363
364
365
366
367
368
369
370
371
372

373
374
375
376
377
378
379
380
381
382
383

384





385

386

387
388
389
390
391
392
393

394
395
396


397
398


399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434

435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467

468
469
470
471
472
473

    return
}

c_pass 1 fmt_tkoption_def {name dbname dbclass} NOP
c_pass 2 fmt_tkoption_def {name dbname dbclass} {
    set    text ""
    append text "Command-Line Switch:\t[fmt_option $name]\n"
    append text "Database Name:\t[strong $dbname]\n"
    append text "Database Class:\t[strong $dbclass]\n"
    fmt_lst_item $text
}

################################################################


c_pass 1 fmt_example_begin {} NOP
c_pass 2 fmt_example_begin {} {
    global currentEnv para
    if {[info exists currentEnv(_definition)]} {
	CloseParagraph $currentEnv(_definition)
    } elseif {[info exists currentEnv(pcount)]} {
	if {$para != {}} {
	    if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}
	    if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
	    incr currentEnv(pcount)
	}
    } else {
	CloseParagraph
    }

    return
}

c_pass 1 fmt_example_end {} NOP
c_pass 2 fmt_example_end {} {
    global currentEnv para
    set penv {}
    if {[info exists currentEnv(_definition)]} {
	set penv $currentEnv(_definition)
    } elseif {[info exists currentEnv(pcount)]} {
	if {$currentEnv(pcount) == 0} {set penv $currentEnv(_first)}

	if {$currentEnv(pcount) >  0} {set penv $currentEnv(_next)}





	incr currentEnv(pcount)

    }

    if {$penv != {}} {
	# Save current list context, get chosen paragraph context and
	# then create an example context form this. After closing the
	# paragraph we get back our main list context.

	SaveContext
	SetContext $penv

	CloseParagraph [Example]
	RestoreContext
    } else {


	CloseParagraph [Example]
    }


    return
}

c_pass 1 fmt_example {code} NOP
c_pass 2 fmt_example {code} {
    fmt_example_begin
    fmt_plain_text $code
    fmt_example_end
    return
}

c_pass 1 fmt_nl {} NOP
c_pass 2 fmt_nl {} {
    global currentEnv
    if {[info exists currentEnv(_definition)]} {
	CloseParagraph $currentEnv(_definition)
    } else {
	if {$currentEnv(pcount) == 0} {CloseParagraph $currentEnv(_first)}
	if {$currentEnv(pcount) >  0} {CloseParagraph $currentEnv(_next)}
	incr currentEnv(pcount)
    }
    return
}

################################################################
# Visual markup of words and phrases.

proc fmt_arg     {text} {return $text}
proc fmt_cmd     {text} {return $text}
proc fmt_emph	 {text} {em     $text }
proc fmt_opt     {text} {return "?$text?" }
proc fmt_comment {text} {return}
proc fmt_sectref {text {label {}}} {
    if {![string length $label]} {set label $text}
    return "-> $text"
}

proc fmt_syscmd  {text} {strong $text}
proc fmt_method  {text} {return $text}
proc fmt_option  {text} {return $text}
proc fmt_widget  {text} {strong $text}
proc fmt_fun     {text} {strong $text}
proc fmt_type    {text} {strong $text}
proc fmt_package {text} {strong $text}
proc fmt_class   {text} {strong $text}
proc fmt_var     {text} {strong $text}
proc fmt_file    {text} {return "\"$text\""}
proc fmt_namespace     {text} {strong $text}
proc fmt_uri     {text {label {}}} {
    if {$label == {}} {
	# Without label we use the link directly as part of the text.
	return "<URL:$text>"
    } else {
	return "[em $label] <URL:$text>"
    }
}
proc fmt_image {text {label {}}} {
    # text = symbolic name of the image.

    set img [dt_imgdata $text {txt}]
    if {$img eq {}} {
	if {$label eq {}} {
	    return "IMAGE: $text"
	} else {
	    return "IMAGE: $text $label"
	}
    }

    return $img
}

proc fmt_term    {text} {em     $text}
proc fmt_const   {text} {strong $text}
proc fmt_mdash {} { return " --- " }
proc fmt_ndash {} { return " -- " }

################################################################

Changes to modules/doctools/mpformats/fmt.tmml.

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
proc fmt_cmd	{text}	{ wrap $text cmd }
proc fmt_emph	{text}	{ wrap $text emph }
proc fmt_opt 	{text}	{ wrap $text o }

c_pass 1 fmt_example_begin {}	NOP
c_pass 1 fmt_example_end {} 	NOP
c_pass 1 fmt_example {code}	NOP
c_pass 2 fmt_example_begin {}	{
    global inexample ; set inexample 1
    sequence [xmlContext $::block] [start example]
}
c_pass 2 fmt_example_end   {}	{
    global inexample ; set inexample 0
    end example
}
c_pass 2 fmt_example {code} {
    set code [string map [list \\\\\n \\\n] $code]
    sequence [xmlContext $::block] [wrap $code example]
}

global inexample
set    inexample 0

proc fmt_plain_text {text} {
    global inexample
    if {$inexample} {
	set text [string map [list \\\\\n \\\n] $text]
    }
    return $text
}

proc fmt_comment {text} {xmlComment $text}
proc fmt_sectref {text {id {}}} {
    global SectionNames
    if {$id == {}} {
	set id [c_sectionId $text]
    }







|
<
<
<
|
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<







36
37
38
39
40
41
42
43



44





45












46
47
48
49
50
51
52
proc fmt_cmd	{text}	{ wrap $text cmd }
proc fmt_emph	{text}	{ wrap $text emph }
proc fmt_opt 	{text}	{ wrap $text o }

c_pass 1 fmt_example_begin {}	NOP
c_pass 1 fmt_example_end {} 	NOP
c_pass 1 fmt_example {code}	NOP
c_pass 2 fmt_example_begin {}	{ sequence [xmlContext $::block] [start example] }



c_pass 2 fmt_example_end   {}	{ end example }





c_pass 2 fmt_example {code} 	{ sequence [xmlContext $::block] [wrap $code example] }













proc fmt_comment {text} {xmlComment $text}
proc fmt_sectref {text {id {}}} {
    global SectionNames
    if {$id == {}} {
	set id [c_sectionId $text]
    }

Changes to modules/doctools/mpformats/fmt.wiki.

1



2
3
4
5
6
7
8
9
# -*- tcl -*-



# (c) 2002-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# [expand] definitions to convert a tcl based manpage definition into
# Wiki markup.
#
################################################################

dt_source _common.tcl   ; # Shared code

>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
# -*- tcl -*-
#
# fmt.nroff
#
# (c) 2002 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# [expand] definitions to convert a tcl based manpage definition into
# Wiki markup.
#
################################################################

dt_source _common.tcl   ; # Shared code
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
		lappend lines [string map {[ [[ ] ]]} [string trim $line]]
	    } else {
		# Everything else
		lappend lines [string map {[ [[ ] ]]} [string trimright $line]]
	    }
	}
    }
    set wiki [join $lines \n]

    regsub {^[ ]+} $wiki {} wiki
    return [string trim $wiki]\n
}


################################################################
## Backend for *roff markup

c_pass 1 fmt_manpage_begin {title section version} NOP







|


|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
		lappend lines [string map {[ [[ ] ]]} [string trim $line]]
	    } else {
		# Everything else
		lappend lines [string map {[ [[ ] ]]} [string trimright $line]]
	    }
	}
    }
    set wiki [join $lines \n]\n

    regsub {^[ ]+} $wiki {} wiki
    return $wiki
}


################################################################
## Backend for *roff markup

c_pass 1 fmt_manpage_begin {title section version} NOP
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
    }
    return $wiki
}

proc fmt_section    {name {id {}}} {return "\n\n**$name**\n\n"}
proc fmt_subsection {name {id {}}} {return "\n\n***$name***\n\n"}

# TODO: Modify behaviour depending on context (normal vs list)
proc fmt_para    {}     {return \n}
proc fmt_nl      {}     {return \n}

c_pass 2 fmt_require {pkg {version {}}} NOP
c_pass 1 fmt_require {pkg {version {}}} {
    if {$version != {}} {set version " $version"}
    # @mdgen NODEP: '''
    c_hold synopsis "package require '''$pkg$version'''\n"
}







<

<







120
121
122
123
124
125
126

127

128
129
130
131
132
133
134
    }
    return $wiki
}

proc fmt_section    {name {id {}}} {return "\n\n**$name**\n\n"}
proc fmt_subsection {name {id {}}} {return "\n\n***$name***\n\n"}


proc fmt_para    {}     {return \n}


c_pass 2 fmt_require {pkg {version {}}} NOP
c_pass 1 fmt_require {pkg {version {}}} {
    if {$version != {}} {set version " $version"}
    # @mdgen NODEP: '''
    c_hold synopsis "package require '''$pkg$version'''\n"
}
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233

234
235
236
237
238
239
240
}

################################################################

global textmode
set    textmode ""

# NOTE: The example_begin/end combo allows for the example
# text to contain markup. The currently used verbatim
# environment will cause show the wiki markup of the example,
# instead of formatting per that markup.
#
# TODO: Strip internal markup from the example text, wiki cannot
# handle such at all.

proc fmt_example_begin {} {
    global  mode_save textmode
    lappend mode_save $textmode
    set     textmode example
    return "\n======\n"
}
proc fmt_example_end   {} {
    global  mode_save textmode
    set textmode  [lindex $mode_save end]
    set mode_save [lrange $mode_save 0 end-1]
    return "\n======\n"
}
proc fmt_example {code} {
    set code [string map [list \\\\\n \\\n] $code]
    return "\n======\n$code\n======\n"
}

proc emph    {text} {return ''$text''}
proc strong  {text} {return '''$text'''}


proc fmt_arg     {text} {return ''$text''}
proc fmt_cmd     {text} {return '''$text'''}
proc fmt_emph    {text} {return ''$text''}
proc fmt_opt     {text} {return ?$text?}
proc fmt_comment {text} {return {}}
proc fmt_sectref {text {label {}}} {
    if {![string length $label]} {set label $text}







<
<
<
<
<
<
<
<













<
|





>







200
201
202
203
204
205
206








207
208
209
210
211
212
213
214
215
216
217
218
219

220
221
222
223
224
225
226
227
228
229
230
231
232
233
}

################################################################

global textmode
set    textmode ""









proc fmt_example_begin {} {
    global  mode_save textmode
    lappend mode_save $textmode
    set     textmode example
    return "\n======\n"
}
proc fmt_example_end   {} {
    global  mode_save textmode
    set textmode  [lindex $mode_save end]
    set mode_save [lrange $mode_save 0 end-1]
    return "\n======\n"
}
proc fmt_example {code} {

    return "$code"
}

proc emph    {text} {return ''$text''}
proc strong  {text} {return '''$text'''}

proc fmt_nl      {}     {return ""}
proc fmt_arg     {text} {return ''$text''}
proc fmt_cmd     {text} {return '''$text'''}
proc fmt_emph    {text} {return ''$text''}
proc fmt_opt     {text} {return ?$text?}
proc fmt_comment {text} {return {}}
proc fmt_sectref {text {label {}}} {
    if {![string length $label]} {set label $text}
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
    # For the wiki we have to force certain text into a single line.
    # We also have to make sure that the text is on the same line as
    # the initiator (i.e. list bullet).

    global textmode

    if {"$textmode" == "example"} {
	set text [string map [list \\\\\n \\\n] $text]
	return "$text"
    }

    regsub -all "\[ \t\n\]+" $text { } text
    return $text
}

################################################################







<








283
284
285
286
287
288
289

290
291
292
293
294
295
296
297
    # For the wiki we have to force certain text into a single line.
    # We also have to make sure that the text is on the same line as
    # the initiator (i.e. list bullet).

    global textmode

    if {"$textmode" == "example"} {

	return "$text"
    }

    regsub -all "\[ \t\n\]+" $text { } text
    return $text
}

################################################################

Changes to modules/doctools/mpformats/idx.html.

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
89
90
91
92
93
proc Ref {r l} {
    global  key  lk
    lappend key($lk) $r $l
    return {}
}

proc F {text} {
    # Keep only alphanumeric, take first, uppercase
    # Returns nothing if input has no alphanumeric characters.
    return [string toupper [string index [regsub -all {[^a-zA-Z0-9]} $text {}] 0]]
}

proc LoadKwid {} {
    global kwid
    # Engine parameter - load predefined keyword anchors.
    set             ki [Get kwid]
    if {![llength  $ki]} return
    array set kwid $ki
    return
}

proc BeginHeader {} {
    global la ti
    upvar 1 lines lines
    lappend lines [markup {<!DOCTYPE html>}]
    lappend lines [markup <html>]
    lappend lines [ht_comment [c_provenance]]
    lappend lines [ht_comment "$la"]
    lappend lines [markup <head>]
    lappend lines "[markup <title>] $la [markup </title>]"
    return
}







<
<
|














<







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
89
90
proc Ref {r l} {
    global  key  lk
    lappend key($lk) $r $l
    return {}
}

proc F {text} {


    return [string toupper [string index $text 0]]
}

proc LoadKwid {} {
    global kwid
    # Engine parameter - load predefined keyword anchors.
    set             ki [Get kwid]
    if {![llength  $ki]} return
    array set kwid $ki
    return
}

proc BeginHeader {} {
    global la ti
    upvar 1 lines lines

    lappend lines [markup <html>]
    lappend lines [ht_comment [c_provenance]]
    lappend lines [ht_comment "$la"]
    lappend lines [markup <head>]
    lappend lines "[markup <title>] $la [markup </title>]"
    return
}
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

proc Navbar {} {
    global ch cnt dot
    upvar 1 lines lines

    set nav {}
    foreach c [lsort -dict [array names ch]] {
	set ref c[F $c];#[incr cnt]
	set ch($c) $ref
	lappend nav [ALink $ref $c]
    }

    lappend lines [markup "<hr><div class=\"#doctools_idxnav\">"]
    lappend lines [join $nav $dot]
    lappend lines [markup </div>]
    return
}

proc BeginIndex {} {
    upvar 1 lines lines
    lappend lines [markup "<hr><table class=\"#doctools_idx\" width=\"100%\">"]
    return
}

proc Keys {} {
    global key
    upvar 1 lines lines
    set lc {}
    set kwlist {}

    # For a good display we sort keywords in dictionary order.
    # We ignore their leading non-alphanumeric characters.
    set kwlist {}
    foreach kw [array names key] {
       set kwx [string trim [regsub -all {^[^a-zA-Z0-9]+} $kw {}]]
       lappend kwlist [list $kwx $kw]
    }
    foreach item [lsort -index 0 -dict $kwlist] {
       foreach {_ k} $item break
	set c [F $k] ; if {$lc != $c} { Section $c ; set lc $c }
	BeginKey   $k
	References $k
	EndKey
    }
    return
}







|




















<
|
<
<
<
<
<
<
<
<
<







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169

170









171
172
173
174
175
176
177

proc Navbar {} {
    global ch cnt dot
    upvar 1 lines lines

    set nav {}
    foreach c [lsort -dict [array names ch]] {
	set ref c[incr cnt]
	set ch($c) $ref
	lappend nav [ALink $ref $c]
    }

    lappend lines [markup "<hr><div class=\"#doctools_idxnav\">"]
    lappend lines [join $nav $dot]
    lappend lines [markup </div>]
    return
}

proc BeginIndex {} {
    upvar 1 lines lines
    lappend lines [markup "<hr><table class=\"#doctools_idx\" width=\"100%\">"]
    return
}

proc Keys {} {
    global key
    upvar 1 lines lines
    set lc {}

    foreach k [lsort -dict [array names key]] {









	set c [F $k] ; if {$lc != $c} { Section $c ; set lc $c }
	BeginKey   $k
	References $k
	EndKey
    }
    return
}
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269


270
271
272
273
274
275
276
277
    return [markup {<td class="#doctools_idxright" width="65%">}]
}

proc SetAnchor {text} {
    return [markup "<a name=[Anchor $text]> $text </a>"]
}

proc A {text} {
    set anchor [regsub -all {[^a-zA-Z0-9]} [string tolower $text] {_}]
    set anchor [regsub -all {__+} $anchor _]
    return $anchor
}

proc Anchor {text} {
    global kwid
    if {[info exists kwid($text)]} {
	return "\"$kwid($text)\""
    }


    return "\"[A $text]\""
}

proc Row {} {
    global even
    set res [expr {$even
    ? "\#doctools_idxeven"
    : "\#doctools_idxodd"}]







<
<
<
<
<
<

|



>
>
|







239
240
241
242
243
244
245






246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
    return [markup {<td class="#doctools_idxright" width="65%">}]
}

proc SetAnchor {text} {
    return [markup "<a name=[Anchor $text]> $text </a>"]
}







proc Anchor {text} {
    global kwid cnt
    if {[info exists kwid($text)]} {
	return "\"$kwid($text)\""
    }
    set anchor key$cnt
    incr cnt
    return "\"$anchor\""
}

proc Row {} {
    global even
    set res [expr {$even
    ? "\#doctools_idxeven"
    : "\#doctools_idxodd"}]

Deleted modules/doctools/mpformats/idx.markdown.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# -*- tcl -*-
# Engine to convert a docidx document into markdown text.
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

dt_source _idx_common.tcl
dt_source _text.tcl
dt_source _markdown.tcl

proc c_copyrightsymbol {} {return "(c)"}

######################################################################
# Conversion specification.
# One-pass processing.

rename idx_postprocess {}
rename text_postprocess idx_postprocess
proc   fmt_plain_text {text} {return {}}

################################################################
## Backend for plain text markup

proc fmt_index_begin {label title} {
    MDCInit
    if {($label != {}) && ($title != {})} {
	set title "$label -- $title"
    } elseif {$label != {}} {
	set title $label
    } elseif {$title != {}} {
	 # title is set
    }

    TextInitialize

    MDComment "Index [Provenance]"
    MDCDone

    SectTitle hdr $title
    Text [Compose hdr]
    CloseParagraph [Verbatim]
    return
}

proc fmt_index_end {} {
    LoadKwid
    NavBar
    Keys
    return
    
    set rmargin [RMargin $max]

    incr max
    set blank [Blank $max] ;# indent

    foreach key [lsort [array names map]] {
	set keys [join $map($key) ", "]
	Text [InFlow $keys $rmargin [ReHead $blank $key] $blank]
	CloseParagraph [Verbatim]
    }
    return
}

proc fmt_key {text} {
    global key lk ch
    set lk $text
    set key($lk) {}
    set ch([F $lk]) .
    return
}

proc fmt_manpage {f l} {Ref [dt_fmap $f] $l}
proc fmt_url     {u l} {Ref $u           $l}
proc fmt_comment {text}       {return}

# ### ### ### ######### ######### #########

proc NavBar {} {
    global ch dot
    if {![array size ch]} return
    
    set nav {}
    foreach c [lsort -dict [array names ch]] {
	set ref c[F $c]
	set ch($c) $ref
	lappend nav [ALink [Hash]$ref $c]
    }

    Separator
    
    Text [join $nav $dot]
    CloseParagraph [Verbatim]

    Separator
    return
}

proc Keys {} {
    global key
    set lc {}
    set kwlist {}

    # For a good display we sort keywords in dictionary order.
    # We ignore their leading non-alphanumeric characters.
    set kwlist {}
    foreach kw [array names key] {
       set kwx [string trim [regsub -all {^[^a-zA-Z0-9]+} $kw {}]]
       lappend kwlist [list $kwx $kw]
    }
    foreach item [lsort -index 0 -dict $kwlist] {
       foreach {_ k} $item break
	set c [F $k]
	if {$lc != $c} {
	    CloseParagraph [Verbatim]
	    Section $c ; set lc $c
	}
	BeginKey   $k
	References $k
	EndKey
    }

    CloseParagraph [Verbatim]
    return

}

proc Section {c} {
    global ch
    Text "[Hash][Hash][Hash][Hash] [SetAnchor "Keywords: $c" $ch($c)]"
    CloseParagraph [Verbatim]

    Text "[VBar][VBar][VBar]\n"
    Text "[VBar][Dash][Dash][Dash][VBar][Dash][Dash][Dash][VBar]\n"
    return
}

proc BeginKey {k} {
    Text "[VBar][SetAnchor $k][VBar]"
}

proc References {k} {
    global key dot
    set refs {}
    foreach {ref label} $key($k) {
	lappend refs [ALink $ref $label]
    }
    Text [join $refs $dot]
    return
}

proc EndKey {} {
    Text "[VBar]\n"
}

proc Separator {} {
    Text [Dash][Dash][Dash][Dash]
    CloseParagraph [Verbatim]
}

# ### ### ### ######### ######### #########
## Engine state

proc LoadKwid {} {
    global kwid
    # Engine parameter - load predefined keyword anchors.
    set             ki [Get kwid]
    if {![llength  $ki]} return
    array set kwid $ki
    return
}

proc Ref {r l} {
    global  key  lk
    lappend key($lk) $r $l
    return
}

proc F {text} {
    # Keep only alphanumeric, take first, uppercase
    # Returns nothing if input has no alphanumeric characters.
    return [string toupper [string index [regsub -all {[^a-zA-Z0-9]} $text {}] 0]]
}

# key  : string -> dict(ref -> label) "key formatting"
# ch   : string -> '.'                "key starting characters"
# lk   : string                       "last key"
# kwid : string -> ...
# even : bool

global key  ; array set key  {}
global ch   ; array set ch   {}
global lk   ; set       lk   {}
global la   ; set       la   {}
global ti   ; set       ti   {}
global kwid ; array set kwid {}
global dot  ; set dot   " &[Hash]183; "

# ### ### ### ######### ######### #########
## Engine parameters

global    __var
array set __var {
    kwid {}
}
proc Get               {varname}      {global __var ; return $__var($varname)}
proc idx_listvariables {}             {global __var ; return [array names __var]}
proc idx_varset        {varname text} {
    global __var
    if {![info exists __var($varname)]} {
	return -code error "Unknown engine variable \"$varname\""
    }
    set __var($varname) $text
    return
}

##
# ### ### ### ######### ######### #########
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































Changes to modules/doctools/mpformats/idx.nroff.

1



2
3
4
5
6
7
8
# -*- tcl -*-



# Engine to convert a docidx document into nroff.
#
# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################


>
>
>







1
2
3
4
5
6
7
8
9
10
11
# -*- tcl -*-
#
# $Id: idx.nroff,v 1.7 2009/01/30 04:56:47 andreas_kupries Exp $
#
# Engine to convert a docidx document into nroff.
#
# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

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
89
90
91
92

93
94
95
96
97
98
99
100
101

#proc fmt_plain_text {text} {if {$text != {}} {return \n} else {return {}}}
proc fmt_plain_text {text} {return {}}

################################################################
## Backend for NROFF markup

global map ; array set map {}
global key ; set key {}
global max ; set max 0

global prec ok haskey
set    prec   ""
set    ok     0
set    haskey 0

proc fmt_index_begin     {label title}      {
    global prec ok
    set ok 1
    set     hdr [nr_comment {}]\n
    if {$prec != {}} {
	set hdr [nr_comment $prec]\n
    }
    append  hdr [nr_comment [c_provenance]]\n
    append  hdr [nr_title "\"[string trimleft $label :]\" n"]\n
    append  hdr [nr_read man.macros]\n
    append  hdr [nr_bolds]\n
    append  hdr [nr_section INDEX]\n
    append  hdr $title[nr_in]\n
    return $hdr
}

proc fmt_index_end {} {
    global map
    foreach key [lsort [array names map]] {
	append r $key [nr_in] \n
	foreach ref  $map($key) {
	foreach {file label} $ref break
	    append r [Man $file $label]
	}
	append r [nr_out] \n
    }
    
    append r [nr_out]
    return $r
}

proc fmt_key     {text}       { global key     ; set key $text ; return }
proc fmt_manpage {file label} { global map key ; lappend map($key) [list $file $label] ; return }
proc fmt_url     {url  label} { global map key ; lappend map($key) [list $url  $label] ; return }

proc Key {text} {
    global haskey
    set res ""
    if {$haskey} {append res [nr_out]\n}
    append res $text[nr_in]\n
    set haskey 1
    return $res
}

proc Man {file label} {return [nr_blt [nr_bld]$file[nr_rst]]\n$label\n}


proc fmt_comment {text} {
    global prec ok
    if {$ok} { return [nr_comment $text] }
    append prec $text \n
    return
}

################################################################







<
<
<
<




















<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<







<
|
>



|

|



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

#proc fmt_plain_text {text} {if {$text != {}} {return \n} else {return {}}}
proc fmt_plain_text {text} {return {}}

################################################################
## Backend for NROFF markup





global prec ok haskey
set    prec   ""
set    ok     0
set    haskey 0

proc fmt_index_begin     {label title}      {
    global prec ok
    set ok 1
    set     hdr [nr_comment {}]\n
    if {$prec != {}} {
	set hdr [nr_comment $prec]\n
    }
    append  hdr [nr_comment [c_provenance]]\n
    append  hdr [nr_title "\"[string trimleft $label :]\" n"]\n
    append  hdr [nr_read man.macros]\n
    append  hdr [nr_bolds]\n
    append  hdr [nr_section INDEX]\n
    append  hdr $title[nr_in]\n
    return $hdr
}

proc fmt_index_end {}          {return [nr_out]}














proc fmt_key       {text}      {




    global haskey
    set res ""
    if {$haskey} {append res [nr_out]\n}
    append res $text[nr_in]\n
    set haskey 1
    return $res
}

proc fmt_manpage   {file label} {return [nr_blt [nr_bld]$file[nr_rst]]\n$label\n}
proc fmt_url       {url label}  {return [nr_blt [nr_bld]$url[nr_rst]]\n$label\n}

proc fmt_comment {text} {
    global prec ok
    if {$ok} {return [nr_comment $text]}
    append prec $text \n
    return {}
}

################################################################

Changes to modules/doctools/mpformats/idx.text.

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
# -*- tcl -*-



# Engine to convert a docidx document into plain text.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

dt_source _idx_common.tcl
dt_source _text.tcl

proc c_copyrightsymbol {} {return "(c)"}

######################################################################
# Conversion specification.
# One-pass processing.

rename idx_postprocess {}
rename text_postprocess idx_postprocess
proc   fmt_plain_text {text} {return {}}

################################################################
## Backend for plain text markup

global map ; array set map {}
global key ; set key {}
global max ; set max 0

proc fmt_index_begin {label title} {


    global map ; unset map ; array set map {}
    global key ; set key {}
    global max ; set max 0




    if {($label != {}) && ($title != {})} {
	set title "$label -- $title"
    } elseif {$label != {}} {
	set title $label
    } elseif {$title != {}} {
	 # title is set
    }

    TextInitialize

    lappend   hdr "Index [Provenance]"
    SectTitle hdr $title
    Text [Compose hdr]
    CloseParagraph [Verbatim]
    return
}

proc fmt_index_end {} {
    global map max


    set rmargin [RMargin $max]

    incr max
    set blank [Blank $max] ;# indent

    foreach key [lsort [array names map]] {

	set keys [join $map($key) ", "]
	Text [InFlow $keys $rmargin [ReHead $blank $key] $blank]
	CloseParagraph [Verbatim]
    }
    return
}

proc fmt_key {text} {
    global key max ; set key $text
    MaxLen max $text
    return
}

proc fmt_manpage {file label} {global map key ; lappend map($key) $file ; return}
proc fmt_url     {url label}  {global map key ; lappend map($key) $url  ; return}
proc fmt_comment {text}       {return}

################################################################

>
>
>


|






<


















>
>




>
>
>







|
<
|
<
<
|



<



>
|
|

|


>
|
<




<


|


<

|



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
# -*- tcl -*-
#
# $Id: idx.text,v 1.4 2010/06/08 19:32:36 andreas_kupries Exp $
#
# Engine to convert a docidx document into plain text.
#
# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

dt_source _idx_common.tcl
dt_source _text.tcl

proc c_copyrightsymbol {} {return "(c)"}

######################################################################
# Conversion specification.
# One-pass processing.

rename idx_postprocess {}
rename text_postprocess idx_postprocess
proc   fmt_plain_text {text} {return {}}

################################################################
## Backend for plain text markup

global map ; array set map {}
global key ; set key {}
global max ; set max 0

proc fmt_index_begin {label title} {
    TextInitialize

    global map ; unset map ; array set map {}
    global key ; set key {}
    global max ; set max 0

    set hdr ""
    append hdr "Index [textutil::string::uncap [c_provenance]]\n\n"

    if {($label != {}) && ($title != {})} {
	set title "$label -- $title"
    } elseif {$label != {}} {
	set title $label
    } elseif {$title != {}} {
	 # title is set
    }
    append hdr $title \n

    append hdr [textutil::repeat::strRepeat = [string length $title]]


    Text  $hdr
    CloseParagraph [Verbatim]
    return
}

proc fmt_index_end {} {
    global map max

    set break 0
    set rmargin [expr {80 - $max}]
    if {$rmargin < 20} {set rmargin 20}
    incr max
    set pfx [textutil::repeat::blank $max]

    foreach key [lsort [array names map]] {
	set   opfx $key[string range $pfx [string length $key] end]
	Text $opfx[textutil::adjust::indent [textutil::adjust::adjust [join $map($key) ", "] -length $rmargin] $pfx 1]

	CloseParagraph [Verbatim]
    }
    return
}

proc fmt_key {text} {
    global key max ; set key $text
    if {[string length $text] > $max} {set max [string length $text]}
    return
}

proc fmt_manpage {file label} {global map key ; lappend map($key) $file ; return}
proc fmt_url     {url label}  {global map key ; lappend map($key) $url ; return}
proc fmt_comment {text}       {return}

################################################################

Changes to modules/doctools/mpformats/toc.html.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

104
105
106
107
108



109
110

111
112
113
114

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# -*- tcl -*-



# Engine to convert a doctoc document into HTML.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

dt_source _toc_common.tcl
dt_source _html.tcl

######################################################################
# Conversion specification.
#
# One-pass processing.

rename toc_postprocess {}
rename fmt_postprocess toc_postprocess

proc fmt_plain_text {text} {return {}}

################################################################
## Backend for HTML markup





proc fmt_toc_begin {label title} {
    set hdr ""
    if {![Get raw]} {
	append  hdr "[markup {<!DOCTYPE html>}]"
	append  hdr "[markup <html><head>]\n"
	append  hdr "[markup <title>] $label [markup </title>]\n"

	# Engine parameter - insert 'meta'
	if {[set meta [Get meta]] != {}} {append hdr [markup $meta]\n}

	append  hdr "[markup </head>]\n"
	append  hdr [ht_comment [c_provenance]]\n
	append  hdr [ht_comment "$label"]\n
	append  hdr \n
	append  hdr [markup <body>]\n
    }
    
    # Engine parameter - insert 'header'
    if {[set header [Get header]] != {}} {
	lappend map @TITLE@ $label
	set header [string map $map $header]
	append hdr [markup $header]\n
    }

    append hdr [markup <h3>]
    append hdr $label
    append hdr [markup </h3>] \n
    append hdr [markup <hr><dl><dt><h2>]
    append hdr $title
    append hdr [markup </h2></dt><dd>] \n
    LSetup
    IPush
    return $hdr
}

proc fmt_toc_end {} {

    set text "\n"
    # Close table of items since last division
    if {[Items]} { append text [tag/ table] \n }

    # Engine parameter - insert 'footer'
    set footer [Get footer]
    if {$footer != {}} {set footer \n[markup $footer]\n}

    append text [tag /dd] [tag /dl] [tag hr] $footer

    if {![Get raw]} {
	append text [tag/ body] [tag/ html] \n
    }

    IPop ; # Assert items == {}
    LOut ; # Assert level == 0
    return $text
}

proc fmt_division_start {title symfile} {
    # Close table of items before the division.  Reset counter for
    # items between end of this and following division.
    if {[Items]} { append r [tag/ table] \n ; IReset }
        
    if {$symfile ne ""} {


	append t [markup "<a href=\"[dt_fmap $symfile]\">"]
	append t $title
	append t [markup </a>]
	set title $t
    }

    append r \n [markup "<dl><dt><a name='[Anchor $title]'>"]
    append r $title
    append r [markup </dt><dd>]

    LIn
    IPush
    return $r
}

proc fmt_division_end {} {
    if {[Items]} { append t [tag/ table] }
    append t [tag /dl]

    Even!
    IPop
    LOut
    return $t
}




proc fmt_item {file label desc} {

    if {[IFirst]} { append text \n[markup "<table class=\"#doctools_toc\">"]\n }
    INext

    if {[Even]} {

	append text [markup "<tr class=\"#doctools_toceven\" >"]\n
    } else {
	append text [markup "<tr class=\"#doctools_tocodd\"  >"]\n
    }
    EFlip
    append text [markup "<td class=\"#doctools_tocleft\" >"]
    append text [markup "<a name='[Anchor $label]'><a href=\"[dt_fmap $file]\">"]
    append text $label
    append text [tag/ a][tag/ td]\n
    append text [markup "<td class=\"#doctools_tocright\">"]${desc}[tag /td]\n
    append text [tag/ tr]\n
    return $text
}

proc fmt_comment {text} {ht_comment $text}

################################################################

proc Term {text} { return [tag dt]${text}[tag /dt] }
proc Def  {text} { return [tag dd]${text}[tag /dd] }

proc Anchor {text} {
    set anchor [regsub -all {[^a-zA-Z0-9]} [string tolower $text] {_}]
    set anchor [regsub -all {__+} $anchor _]
    return $anchor
}

################################################################

global __level
global __items  ; set __items  {}
global __istack ; set __istack {}
global __even   ; set __even   1

proc Even! {} { global __even ; set __even 1 }
proc Even  {} { global __even ; set __even }
proc EFlip {} { global __even ; set __even [expr {1 - $__even}] }
    

proc LSetup {} { global __level ; set  __level  0 }
proc LIn    {} { global __level ; incr __level  1 }
proc LOut   {} { global __level ; incr __level -1 }
proc LTop   {} { global __level ; expr {!$__level } }

proc IReset {} { global __items ; set  __items 0 }
proc INext  {} { global __items ; incr __items }
proc IFirst {} { global __items ; expr {!$__items} }
proc Items  {} { global __items ; set __items }

proc IPush {} {
    global  __istack  __items
    lappend __istack $__items
    set __items 0
    return
}

proc IPop {} {
    global __items __istack
    set __items  [lindex   $__istack end]
    set __istack [lreplace $__istack end end]
    return
}

################################################################

global    __var
array set __var {
    meta   {}
    header {}

>
>
>


|


















|

>
>
>
>
|


<




















<
<
|
|
<
<
<
<


<
|
>

<
|



|

|


|

<
<
<


<

|
<
<
|
|
>
>
|
<
<
<
<
|
<
<
<
|
<
<
<
<
<
|
<
<
>
|
<
<
|

>
>
>

|
>
|
<
|
|
>




|
|
<
<
<




<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







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
89
90
91
92
93
94
95

96
97
98
99
100
101
102
103
104



105
106
107
108

109















































110
111
112
113
114
115
116
# -*- tcl -*-
#
# $Id: toc.html,v 1.6 2005/09/28 04:51:19 andreas_kupries Exp $
#
# Engine to convert a doctoc document into HTML.
#
# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

dt_source _toc_common.tcl
dt_source _html.tcl

######################################################################
# Conversion specification.
#
# One-pass processing.

rename toc_postprocess {}
rename fmt_postprocess toc_postprocess

proc fmt_plain_text {text} {return {}}

################################################################
## Backend for TMML markup

global firstitem   ; set firstitem   1
global maintable   ; set maintable   1
global even        ; set even        1

proc fmt_toc_begin     {label title}      {
    set hdr ""
    if {![Get raw]} {

	append  hdr "[markup <html><head>]\n"
	append  hdr "[markup <title>] $label [markup </title>]\n"

	# Engine parameter - insert 'meta'
	if {[set meta [Get meta]] != {}} {append hdr [markup $meta]\n}

	append  hdr "[markup </head>]\n"
	append  hdr [ht_comment [c_provenance]]\n
	append  hdr [ht_comment "$label"]\n
	append  hdr \n
	append  hdr [markup <body>]\n
    }
    
    # Engine parameter - insert 'header'
    if {[set header [Get header]] != {}} {
	lappend map @TITLE@ $label
	set header [string map $map $header]
	append hdr [markup $header]\n
    }



    append  hdr "[markup <h3>] $label [markup </h3>]\n"
    append  hdr "[markup <hr><dl><dt><h2>] $title [markup </h2><dd>]\n"




    return $hdr
}

proc fmt_toc_end       {}           {
    global maintable
    set text "\n"

    if {$maintable} {append text [tag/ table]\n}

    # Engine parameter - insert 'footer'
    set footer [Get footer]
    if {$footer != {}} {set footer \n[markup ${footer}]\n}

    append text [tag /dl][tag hr]${footer}

    if {![Get raw]} {
	append text [tag/ body][tag/ html]\n
    }



    return $text
}

proc fmt_division_start {title symfile} {
    global maintable ; set maintable 0



    if {$symfile == ""} {
	return \n[markup <dl><dt>]$title[markup <dd>]
    } else {
	return \n[markup <dl><dt>][markup "<a href=\"[dt_fmap $symfile]\">"]$title[markup </a><dd>]




    }



}





proc fmt_division_end   {}           {


    global firstitem ; set firstitem 1
    global even      ; set even 1


    return [markup </table></dl>]
}
proc fmt_item          {file label desc} {
    global firstitem even
    set text ""

    if {$firstitem} {
	set firstitem 0
	append text \n[markup "<table class=\"#doctools_toc\">"]\n

    }

    if {$even} {
	append text [markup "<tr class=\"#doctools_toceven\" >"]\n
    } else {
	append text [markup "<tr class=\"#doctools_tocodd\"  >"]\n
    }
    set even [expr {1-$even}]
    append text [markup "<td class=\"#doctools_tocleft\" >"][markup "<a href=\"[dt_fmap $file]\">"]$label[tag/ a][tag/ td]\n



    append text [markup "<td class=\"#doctools_tocright\">"]${desc}[tag /td]\n
    append text [tag/ tr]\n
    return $text
}

proc fmt_comment       {text}       {ht_comment $text}
















































################################################################

global    __var
array set __var {
    meta   {}
    header {}

Deleted modules/doctools/mpformats/toc.markdown.

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
# -*- tcl -*-
# Engine to convert a doctoc document into markdown formatted text
#
# Copyright (c) 2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

dt_source _toc_common.tcl
dt_source _text.tcl
dt_source _markdown.tcl

######################################################################
# Conversion specification.
# One-pass processing.

rename toc_postprocess {}
rename text_postprocess toc_postprocess

proc fmt_plain_text {text} {return {}}

################################################################
## Backend for Markdown markup

proc fmt_toc_begin {label title} {
    MDCInit
    set title "$label -- $title"
    
    TextInitialize

    MDComment "Table of contents [Provenance]"
    MDCDone

    SectTitle hdr $title
    Text [Compose hdr]    
    CloseParagraph [Verbatim]

    ListOpen
    return
}

proc fmt_toc_end {} { return }

proc fmt_division_start {title symfile} {

    Text [ALink $symfile $title]
    CloseParagraph [Verbatim]

    ListOpen
}

proc fmt_division_end  {} {
    ContextPop ;# Ref (a)
    return
}

proc fmt_item {file label desc} {
    Text "[ALink $file $label] $desc"
    CloseParagraph [Verbatim]
    return
}

proc fmt_comment {text} { return }

proc ListOpen {} {
    ContextPush ;# Ref (a)
    ContextNew Division {
	# Indenting is done by replicating the outer ws-prefix.
	set bullet "[WPrefix?]  [IBullet]"
	List! bullet $bullet "[BlankM $bullet] "
    }
    return
}

################################################################
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Changes to modules/doctools/mpformats/toc.nroff.

1



2
3
4
5
6
7
8
9
10
11
# -*- tcl -*-



# Engine to convert a doctoc document into nroff.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

dt_source _toc_common.tcl
dt_source _nroff.tcl


>
>
>


|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
#
# $Id: toc.nroff,v 1.7 2009/01/30 04:56:47 andreas_kupries Exp $
#
# Engine to convert a doctoc document into nroff.
#
# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

dt_source _toc_common.tcl
dt_source _nroff.tcl

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
################################################################
## Backend for TMML markup

global prec ok
set    prec ""
set    ok   0

proc fmt_toc_begin {label title} {
    global prec ok
    set ok 1
    set     hdr [nr_comment {}]\n
    if {$prec != {}} {
	set hdr [nr_comment $prec]\n
    }
    append  hdr [nr_comment [c_provenance]]\n
    append  hdr [nr_title "\"[string trimleft $label :]\" n"]\n
    append  hdr [nr_read man.macros]\n
    append  hdr [nr_bolds]\n
    append  hdr [nr_section CONTENTS]\n
    append  hdr $title[nr_in]\n
    return $hdr
}
proc fmt_toc_end        {}           {}
proc fmt_division_start {title symfile} {return [nr_blt $title][nr_in]\n}
proc fmt_division_end   {}              {return [nr_out]\n}
proc fmt_item           {file label desc} {return "[nr_blt [nr_bld]$label[nr_rst]]\n[nr_ul]$file[nr_rst]: $desc\n"}

proc fmt_comment {text} {
    global prec ok
    if {$ok} {return [nr_comment $text]}
    append prec $text \n
    return {}
}

################################################################







|















|











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
################################################################
## Backend for TMML markup

global prec ok
set    prec ""
set    ok   0

proc fmt_toc_begin     {label title}      {
    global prec ok
    set ok 1
    set     hdr [nr_comment {}]\n
    if {$prec != {}} {
	set hdr [nr_comment $prec]\n
    }
    append  hdr [nr_comment [c_provenance]]\n
    append  hdr [nr_title "\"[string trimleft $label :]\" n"]\n
    append  hdr [nr_read man.macros]\n
    append  hdr [nr_bolds]\n
    append  hdr [nr_section CONTENTS]\n
    append  hdr $title[nr_in]\n
    return $hdr
}
proc fmt_toc_end        {}           {}
proc fmt_division_start {title symfile} {return $title[nr_in]\n}
proc fmt_division_end   {}              {return [nr_out]\n}
proc fmt_item           {file label desc} {return "[nr_blt [nr_bld]$label[nr_rst]]\n[nr_ul]$file[nr_rst]: $desc\n"}

proc fmt_comment {text} {
    global prec ok
    if {$ok} {return [nr_comment $text]}
    append prec $text \n
    return {}
}

################################################################

Changes to modules/doctools/mpformats/toc.text.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# -*- tcl -*-



# Engine to convert a doctoc document into plain text.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

dt_source _toc_common.tcl
dt_source _text.tcl

######################################################################
# Conversion specification.
# One-pass processing.

rename toc_postprocess {}
rename text_postprocess toc_postprocess

proc fmt_plain_text {text} {return {}}

################################################################
## Backend for TEXT markup

global seclist ; set seclist {}
global max     ; set max 0

proc InitSections {} {
    global seclist ; set seclist {} ;# list of items in this division
    global max     ; set max 0      ;# length of longest file path in the division
    return


}

proc ProcessSections {} {
    global seclist max
    


    if {![llength $seclist]} {
	# Division is empty, nothing to do
	return

    }

    incr max 2  ; set rmargin [RMargin  $max]
    incr max -1 ; set blank   [Blank    $max]
    incr max -1 ; set dots   "[Repeat . $max] "

    # Example wrt max handling, blank, and dots:
    #
    # string = "longest",  max = 7 +2 => max = lmargin = 9
    # blank  = "________" (max = 8, using _ as visible placeholder)
    # dots   = "......._" (max = 7 (dots))
    
    foreach {file desc} $seclist {
	Text [InFlow $desc $rmargin [ReHead $dots "$file "] $blank]
	CloseParagraph [Verbatim]



    }

    set seclist {}
    return
}

proc fmt_toc_begin {label title} {
    set title "$label -- $title"
    
    TextInitialize
    lappend   hdr "Table of contents [Provenance]"
    lappend   hdr ""
    SectTitle hdr $title
    Text [Compose hdr]    
    CloseParagraph [Verbatim]
    return
}




proc fmt_toc_end {} {

    ProcessSections
    return
}

proc fmt_division_start {title symfile} {
    # We may have sections before the new division
    ProcessSections

    InitSections
    SubsectTitle hdr $title
    Text [Compose hdr]
    CloseParagraph [Verbatim]

    ContextPush ;# Ref (a)
    ContextNew Division { MarginIn }
    return
}

proc fmt_division_end   {}      {
    ProcessSections
    ContextPop ;# Ref (a)
    return
}

proc fmt_item {file label desc} {
    global  seclist max
    lappend seclist $file $desc
    MaxLen max $file
    return
}

proc fmt_comment {text} {return}

################################################################

>
>
>


|

















|




|
<
<
|
>
>
|
|
<
|
|
>
>
|
<
|
>
|
|
|
|
<
|
<
|
<
<
<
|
<
|
|
>
>
>

<
<


|
<
<
|
<
<
<
<
<
<
<
|
|
>
>
>
|
>
|
|
|
|
|
<
<
|
<
<
<
|
|
<
<
|
|

<
<
|


<

|

|


<
<


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
# -*- tcl -*-
#
# $Id: toc.text,v 1.8 2010/06/08 19:13:53 andreas_kupries Exp $
#
# Engine to convert a doctoc document into plain text.
#
# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
######################################################################

dt_source _toc_common.tcl
dt_source _text.tcl

######################################################################
# Conversion specification.
# One-pass processing.

rename toc_postprocess {}
rename text_postprocess toc_postprocess

proc fmt_plain_text {text} {return {}}

################################################################
## Backend for TMML markup

global seclist ; set seclist {}
global max     ; set max 0

proc fmt_comment       {text}        {return}


proc fmt_toc_end       {}            {return}
proc fmt_toc_begin     {label title} {
    TextInitialize

    set     title "$label -- $title"

    set     hdr ""
    append  hdr "Table of contents [textutil::string::uncap [c_provenance]]\n"
    append  hdr \n
    append  hdr $title \n
    append  hdr [textutil::repeat::strRepeat = [string length $title]]

    Text   $hdr
    CloseParagraph [Verbatim]
}
proc fmt_division_start {title symfile} {
    global lmarginIncrement currentEnv
    global seclist ; set seclist {}

    global max     ; set max 0





    Text $title\n

    Text [textutil::repeat::strRepeat - [string length $title]]
    CloseParagraph [Verbatim]
    SaveContext
    NewEnv Division {
	incr currentEnv(lmargin) $lmarginIncrement
    }


    return
}
proc fmt_division_end   {}      {


    global seclist max








    if {[llength $seclist] > 0} {
	set break 0
	incr max 2
	set  rmargin [expr {80 - $max}]
	if {$rmargin < 20} {set rmargin 20}
	set pfx [textutil::blank $max]
	incr max -1
	set fpfx "[textutil::repeat::strRepeat . $max] "

	foreach {file desc} $seclist {
	    set   opfx "$file [string range $fpfx [string length $file] end]"


	    Text $opfx[textutil::adjust::indent [textutil::adjust::adjust $desc -length $rmargin] $pfx 1]



	    CloseParagraph [Verbatim]
	}


	set seclist {}
    }



    RestoreContext
    return
}

proc fmt_item {file label desc} {
    global seclist max
    lappend seclist $file $desc
    if {[string length $file] > $max} {set max [string length $file]}
    return
}



################################################################

Changes to modules/doctools/mpformats/toc.tmml.

1



2
3
4
5
6
7
8
9
10
11
# -*- tcl -*-



# Engine to convert a doctoc document into TMML.
#
# Copyright (c) 2003-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
# See also <URL: http://tmml.sourceforge.net>
#
######################################################################

dt_source _toc_common.tcl

>
>
>


|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
#
# $Id: toc.tmml,v 1.6 2005/09/28 04:51:19 andreas_kupries Exp $
#
# Engine to convert a doctoc document into TMML.
#
# Copyright (c) 2003 Andreas Kupries <andreas_kupries@sourceforge.net>
# Freely redistributable.
#
# See also <URL: http://tmml.sourceforge.net>
#
######################################################################

dt_source _toc_common.tcl
22
23
24
25
26
27
28
29
30
31
32
33
34
proc fmt_plain_text {text} {if {$text != {}} {return \n} else {return {}}}

################################################################
## Backend for TMML markup

proc fmt_toc_begin      {label title}     {sequence [start manual package $label] [wrap $title title]}
proc fmt_toc_end        {}                {end manual}
proc fmt_division_start {title symfile}   {sequence [start division] [wrap $title title]}
proc fmt_division_end   {}                {end   division}
proc fmt_item           {file label desc} {emptyElement subdoc href [dt_fmap $file]}
proc fmt_comment        {text}            {xmlComment $text}

################################################################







|





25
26
27
28
29
30
31
32
33
34
35
36
37
proc fmt_plain_text {text} {if {$text != {}} {return \n} else {return {}}}

################################################################
## Backend for TMML markup

proc fmt_toc_begin      {label title}     {sequence [start manual package $label] [wrap $title title]}
proc fmt_toc_end        {}                {end manual}
proc fmt_division_start {title symfile}   {sequence [start division] [wrap $text title]}
proc fmt_division_end   {}                {end   division}
proc fmt_item           {file label desc} {emptyElement subdoc href [dt_fmap $file]}
proc fmt_comment        {text}            {xmlComment $text}

################################################################

Changes to modules/doctools/pkgIndex.tcl.

1
2
3
4
5
6
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded doctools            1.5.6 [list source [file join $dir doctools.tcl]]
package ifneeded doctools::toc       1.2   [list source [file join $dir doctoc.tcl]]
package ifneeded doctools::idx       1.1   [list source [file join $dir docidx.tcl]]
package ifneeded doctools::cvs       1     [list source [file join $dir cvs.tcl]]
package ifneeded doctools::changelog 1.1   [list source [file join $dir changelog.tcl]]

|
|
|
|
|
1
2
3
4
5
6
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded doctools            1.4.19 [list source [file join $dir doctools.tcl]]
package ifneeded doctools::toc       1.1.4  [list source [file join $dir doctoc.tcl]]
package ifneeded doctools::idx       1.0.5  [list source [file join $dir docidx.tcl]]
package ifneeded doctools::cvs       1      [list source [file join $dir cvs.tcl]]
package ifneeded doctools::changelog 1.1    [list source [file join $dir changelog.tcl]]

Added modules/doctools/tests/desc/00.

Added modules/doctools/tests/desc/01.

Added modules/doctools/tests/desc/02.





>
>
1
2
AAA ..THE_MODULE.. ..THE_TITLE..
BBB ..THE_MODULE.. ..THE_TITLE..

Added modules/doctools/tests/desc/03.

Added modules/doctools/tests/desc/04.

Added modules/doctools/tests/desc/05.

Added modules/doctools/tests/desc/06.

Added modules/doctools/tests/desc/07.

Added modules/doctools/tests/desc/08.







>
>
>
1
2
3
AAA ..THE_MODULE.. ..THE_TITLE..
BBB ..THE_MODULE.. ..THE_TITLE..
CCC ..THE_MODULE.. ..THE_TITLE..

Deleted modules/doctools/tests/fmt/desc/00.

Deleted modules/doctools/tests/fmt/desc/01.

Deleted modules/doctools/tests/fmt/desc/02.

1
2
AAA ..THE_MODULE.. ..THE_TITLE..
BBB ..THE_MODULE.. ..THE_TITLE..
<
<




Deleted modules/doctools/tests/fmt/desc/03.

Deleted modules/doctools/tests/fmt/desc/04.

Deleted modules/doctools/tests/fmt/desc/05.

Deleted modules/doctools/tests/fmt/desc/06.

Deleted modules/doctools/tests/fmt/desc/07.

Deleted modules/doctools/tests/fmt/desc/08.

1
2
3
AAA ..THE_MODULE.. ..THE_TITLE..
BBB ..THE_MODULE.. ..THE_TITLE..
CCC ..THE_MODULE.. ..THE_TITLE..
<
<
<






Deleted modules/doctools/tests/fmt/desc/09.

Deleted modules/doctools/tests/fmt/desc/10.

Deleted modules/doctools/tests/fmt/desc/11.

Deleted modules/doctools/tests/fmt/desc/12.

Deleted modules/doctools/tests/fmt/desc/13.

Deleted modules/doctools/tests/fmt/desc/14.

Deleted modules/doctools/tests/fmt/desc/15.

Deleted modules/doctools/tests/fmt/desc/16.

Deleted modules/doctools/tests/fmt/desc/17.

Deleted modules/doctools/tests/fmt/desc/18.

Deleted modules/doctools/tests/fmt/desc/19.

Deleted modules/doctools/tests/fmt/desc/20.

Deleted modules/doctools/tests/fmt/desc/21.

Deleted modules/doctools/tests/fmt/desc/22.

Deleted modules/doctools/tests/fmt/desc/23.

Deleted modules/doctools/tests/fmt/desc/24.

Deleted modules/doctools/tests/fmt/desc/25.

Deleted modules/doctools/tests/fmt/desc/26.

Deleted modules/doctools/tests/fmt/desc/27.

Deleted modules/doctools/tests/fmt/desc/28.

Deleted modules/doctools/tests/fmt/html/00.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































Deleted modules/doctools/tests/fmt/html/01.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; **Copyright**
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Argument	::<i class="arg">Argument</i>::
Class		::<b class="class">Class</b>::
Command		::<b class="cmd">Command</b>::
Comment		::::
Const		::<b class="const">Constant</b>::
Emphasis	::<em>Emphasis</em>::
File		::&quot;<b class="file">File/Path</b>&quot;::
Function	::<b class="function">Function</b>::
Method		::<b class="method">Method</b>::
Namespace	::<b class="namespace">Namespace</b>::
Option		::<b class="option">Option</b>::
Optional	::<span class="opt">?Optional?</span>::
Package		::<b class="package">Package</b>::
Syscmd		::<b class="syscmd">SystemCommand</b>::
Term		::<i class="term">Term</i>::
Type		::<b class="type">Type</b>::
Uri		::<a href="Uri">Uri</a>::
Variable	::<b class="variable">Variable</b>::
Widget		::<b class="widget">Widget</b>::</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; **Copyright**</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































Deleted modules/doctools/tests/fmt/html/02.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html><html><head>
<title>TEST - ..THE_MODULE..</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;..THE_MODULE..&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST - ..THE_TITLE..</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">AAA</b></li>
<li>package require <b class="pkgname">BBB VVV</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>ELSE, OTHER</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p>KEYA, KEYZ</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































Deleted modules/doctools/tests/fmt/html/03.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">AaA</a></li>
<li class="doctools_section"><a href="#section3">BbB</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">BbB.cCc</a></li>
<li class="doctools_subsection"><a href="#subsection2">BbB.dDd</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">EeE</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">AaA</a></h2>
<p>1</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">BbB</a></h2>
<p>22</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">BbB.cCc</a></h3>
<p>333</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">BbB.dDd</a></h3>
<p>4444</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EeE</a></h2>
<p>5555</p>
<p>At <span class="sectref"><a href="#section2">AaA</a></span>.</p>
<p>At <b class="sectref">__undefined__</b>.</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































Deleted modules/doctools/tests/fmt/html/04.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>BEGINNE HIER</p>
<pre class="doctools_example">
	 Example Block  More Lines
</pre>
<pre class="doctools_example">
Inlined Example \
Next Line
</pre>
<p>FERTIG</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































Deleted modules/doctools/tests/fmt/html/05.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html><html><head>
<title>BASIC - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- BASIC.a
   -->
<body><div class="doctools">
<h1 class="doctools_title">BASIC(a) 5 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>BASIC -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1">a-command</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>OK</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">argument-1</i></dt>
<dd><p>verification</p></dd>
<dt>string <i class="arg">argument-2</i> (out)</dt>
<dd><p>mogrification</p></dd>
</dl>
<dl class="doctools_commands">
<dt><b class="cmd">command-a</b></dt>
<dd><p>explanation</p></dd>
<dt><b class="cmd">command-b</b></dt>
<dd><p>elucidation</p></dd>
</dl>
<dl class="doctools_definitions">
<dt>term</dt>
<dd><p>definition</p></dd>
<dt><a name="1">a-command</a></dt>
<dd><p>semantic</p></dd>
</dl>
<ol class="doctools_enumerated">
<li><p>A</p></li>
<li><p>B</p>
<p>C</p>
<p>D</p></li>
</ol>
<ul class="doctools_itemized">
<li><p>1</p></li>
<li><p>2</p>
<p>2a</p>
<p>2b</p></li>
</ul>
<dl class="doctools_options">
<dt><b class="option">option-1</b></dt>
<dd><p>meaning</p></dd>
<dt><b class="option">option-2</b> value</dt>
<dd><p>elaboration</p></dd>
</dl>
<dl class="doctools_tkoptions">
<dt>Command-Line Switch:	<b class="option">background</b><br>
Database Name:	<b class="optdbname">Background</b><br>
Database Class:	<b class="optdbclass">Color</b><br>
</dt>
<dd><p>candy</p></dd>
<dt>Command-Line Switch:	<b class="option">foreground</b><br>
Database Name:	<b class="optdbname">Foreground</b><br>
Database Class:	<b class="optdbclass">Color</b><br>
</dt>
<dd><p>caramel</p></dd>
</dl>
<p>KO</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































Deleted modules/doctools/tests/fmt/html/06.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<ul class="doctools_itemized">
<li><p>1</p>
<p>2</p>
<p>3</p></li>
<li>
<ol class="doctools_enumerated">
<li><p>a</p>
<p>b</p>
<p>c</p></li>
<li>
<dl class="doctools_definitions">
<dt>foo</dt>
<dd><p>snafu</p></dd>
<dt>bar</dt>
<dd><p>barf</p></dd>
<dt>roo</dt>
<dd><p>gork</p></dd>
</dl>
</li>
<li><p>a</p>
<p>b</p>
<p>c</p></li>
</ol>
</li>
<li><p>4</p>
<p>5</p>
<p>6</p></li>
</ul>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































Deleted modules/doctools/tests/fmt/html/07.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<ul class="doctools_itemized">
<li><p>1</p></li>
<li><p>2</p>
<ol class="doctools_enumerated">
<li><p>a</p></li>
<li><p>b</p>
<dl class="doctools_definitions">
<dt>foo</dt>
<dd><p>snafu</p></dd>
<dt>bar</dt>
<dd><p>barf</p></dd>
<dt>roo</dt>
<dd><p>gork</p></dd>
</dl>
<p>bb</p></li>
<li><p>a</p></li>
</ol>
<p>22</p></li>
<li><p>3</p></li>
</ul>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































Deleted modules/doctools/tests/fmt/html/08.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html><html><head>
<title>ALL - ..THE_MODULE..</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; **Copyright**
   -->
<!-- ALL.a
   -->
<body><div class="doctools">
<h1 class="doctools_title">ALL(a) 5 .MODULE. &quot;..THE_MODULE..&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ALL - ..THE_TITLE..</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">NARGLE</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">AAA</b></li>
<li>package require <b class="pkgname">BBB VVV</b></li>
<li>package require <b class="pkgname">CCC <span class="opt">?VVV?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1">CMDNAME ...</a></li>
<li><a href="#2">CMDNAME ...</a></li>
<li><a href="#3">CMDNAME ...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<dl class="doctools_commands">
<dt><b class="cmd">NAME</b></dt>
<dd><p>DESCRIPTION ::<b class="cmd">Command</b>::</p></dd>
<dt><b class="cmd">NAME</b></dt>
<dd><p>DESCRIPTION ::::</p></dd>
<dt><b class="cmd">NAME</b></dt>
<dd><p>DESCRIPTION ::<b class="const">Constant</b>::</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt>TERM</dt>
<dd><p>DESCRIPTION ::<em>Emphasis</em>::</p></dd>
<dt>TERM</dt>
<dd><p>DESCRIPTION ::&quot;<b class="file">File/Path</b>&quot;::</p>
<dl class="doctools_tkoptions">
<dt>Command-Line Switch:	<b class="option">NAME</b><br>
Database Name:	<b class="optdbname">DBNAME</b><br>
Database Class:	<b class="optdbclass">CLASS</b><br>
</dt>
<dd><p>DESCRIPTION <span class="sectref"><a href="#subsection1">NARGLE</a></span></p></dd>
<dt>Command-Line Switch:	<b class="option">NAME</b><br>
Database Name:	<b class="optdbname">DBNAME</b><br>
Database Class:	<b class="optdbclass">CLASS</b><br>
</dt>
<dd><p>DESCRIPTION ::<b class="function">Function</b>::</p></dd>
<dt>Command-Line Switch:	<b class="option">NAME</b><br>
Database Name:	<b class="optdbname">DBNAME</b><br>
Database Class:	<b class="optdbclass">CLASS</b><br>
</dt>
<dd><p>DESCRIPTION ::<b class="method">Method</b>::</p></dd>
</dl></dd>
<dt>TERM</dt>
<dd><p>DESCRIPTION</p></dd>
<dt><a name="1">CMDNAME ...</a></dt>
<dd><p>DESCRIPTION ::<b class="namespace">Namespace</b>::</p>
<dl class="doctools_arguments">
<dt>TYPE <i class="arg">NAME</i></dt>
<dd><p>DESCRIPTION ::<i class="arg">Argument</i>::</p></dd>
<dt>TYPE <i class="arg">NAME</i></dt>
<dd><p>DESCRIPTION ::<b class="option">Option</b>::</p></dd>
<dt>TYPE <i class="arg">NAME</i> (MODE)</dt>
<dd><p>DESCRIPTION ::<span class="opt">?Optional?</span>::</p>
<pre class="doctools_example">
    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER
</pre>
</dd>
</dl></dd>
<dt><a name="2">CMDNAME ...</a></dt>
<dd><p>DESCRIPTION ::<b class="package">Package</b>::</p></dd>
<dt><a name="3">CMDNAME ...</a></dt>
<dd><p>DESCRIPTION ::<b class="syscmd">SystemCommand</b>::</p>
<dl class="doctools_options">
<dt><b class="option">NAME</b></dt>
<dd><p>DESCRIPTION ::<i class="term">Term</i>::</p></dd>
<dt><b class="option">NAME</b></dt>
<dd><p>DESCRIPTION ::<b class="type">Type</b>::</p></dd>
<dt><b class="option">NAME</b> ARGUMENT</dt>
<dd><p>DESCRIPTION ::<a href="Uri">Uri</a>::</p></dd>
</dl></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">NARGLE</a></h3>
<ol class="doctools_enumerated">
<li><p>PARAGRAPH ::<a href="Uri">UriLabel</a>::</p></li>
<li><p>PARAGRAPH ::<b class="variable">Variable</b>::</p></li>
<li><p>PARAGRAPH ::<b class="widget">Widget</b>::</p>
<ul class="doctools_itemized">
<li><p>PARAGRAPH ::<b class="class">Class</b>::</p></li>
<li><p>PARAGRAPH</p></li>
<li><p>PARAGRAPH</p></li>
</ul>
</li>
</ol>
</div>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>ELSE, OTHER</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p>KEYA, KEYZ</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; **Copyright**</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































Deleted modules/doctools/tests/fmt/html/09.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem</p>
<pre class="doctools_example">
1 lorem ipsum dolores
</pre>
<p>ipsum</p>
<pre class="doctools_example"> 2 lorem ipsum dolores </pre>
<p>dolores</p>
<pre class="doctools_example">
3 lorem ipsum dolores
</pre>
<p>lorem</p>
<pre class="doctools_example"> 4 lorem ipsum dolores
</pre>
<p>ipsum</p>
<pre class="doctools_example">
5 lorem ipsum dolores </pre>
<p>dolores</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































Deleted modules/doctools/tests/fmt/html/10.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html><html><head>
<title>test-itemized - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-itemized.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-itemized(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-itemized -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<ul class="doctools_itemized">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ul>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































Deleted modules/doctools/tests/fmt/html/11.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html><html><head>
<title>test-enumerated - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-enumerated.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-enumerated(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-enumerated -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<ol class="doctools_enumerated">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ol>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































Deleted modules/doctools/tests/fmt/html/12.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html><html><head>
<title>test-definitions - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-definitions.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-definitions(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-definitions -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd><p>ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
</dl>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































Deleted modules/doctools/tests/fmt/html/13.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html><html><head>
<title>test-itemized-examples - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-itemized-examples.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-itemized-examples(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-itemized-examples -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<ul class="doctools_itemized">
<li>
<pre class="doctools_example"> A lorem ipsum dolores </pre>
</li>
<li><p>lorem ipsum dolores</p>
<pre class="doctools_example"> B lorem ipsum dolores </pre>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<pre class="doctools_example"> C lorem ipsum dolores </pre>
</li>
<li><p>lorem ipsum dolores</p></li>
</ul>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































Deleted modules/doctools/tests/fmt/html/14.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html><html><head>
<title>test-enumerated-examples - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-enumerated-examples.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-enumerated-examples(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-enumerated-examples -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<ol class="doctools_enumerated">
<li>
<pre class="doctools_example"> A1 lorem ipsum dolores </pre>
</li>
<li><p>lorem ipsum dolores</p>
<pre class="doctools_example"> B2 lorem ipsum dolores </pre>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<pre class="doctools_example"> C3 lorem ipsum dolores </pre>
</li>
<li><p>lorem ipsum dolores</p></li>
</ol>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































Deleted modules/doctools/tests/fmt/html/15.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html><html><head>
<title>test-definition-examples - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-definition-examples.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-definition-examples(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-definition-examples -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd>
<pre class="doctools_example"> A1 lorem ipsum dolores </pre>
</dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<pre class="doctools_example"> B2 lorem ipsum dolores </pre>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<pre class="doctools_example"> C3 lorem ipsum dolores </pre>
</dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p></dd>
</dl>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































Deleted modules/doctools/tests/fmt/html/16.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html><html><head>
<title>test-itemized-nested - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-itemized-nested.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-itemized-nested(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-itemized-nested -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<ul class="doctools_itemized">
<li><p>lorem ipsum dolores</p>
<ul class="doctools_itemized">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ul>
</li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<ul class="doctools_itemized">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ul>
<p>lorem ipsum dolores</p></li>
</ul>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Deleted modules/doctools/tests/fmt/html/17.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html><html><head>
<title>test-enumerated-nested - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-enumerated-nested.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-enumerated-nested(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-enumerated-nested -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<ol class="doctools_enumerated">
<li><p>lorem ipsum dolores</p>
<ol class="doctools_enumerated">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ol>
</li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<ol class="doctools_enumerated">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ol>
<p>lorem ipsum dolores</p></li>
</ol>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Deleted modules/doctools/tests/fmt/html/18.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html><html><head>
<title>test-definitions-nested - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-definitions-nested.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-definitions-nested(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-definitions-nested -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd><p>ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
</dl></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd><p>ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
</dl>
<p>lorem ipsum dolores</p></dd>
</dl>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































Deleted modules/doctools/tests/fmt/html/19.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html><html><head>
<title>test-itemized-enumerated - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-itemized-enumerated.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-itemized-enumerated(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-itemized-enumerated -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<ul class="doctools_itemized">
<li><p>lorem ipsum dolores</p>
<ol class="doctools_enumerated">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ol>
</li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<ol class="doctools_enumerated">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ol>
<p>lorem ipsum dolores</p></li>
</ul>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Deleted modules/doctools/tests/fmt/html/20.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html><html><head>
<title>test-enumerated-itemized - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-enumerated-itemized.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-enumerated-itemized(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-enumerated-itemized -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<ol class="doctools_enumerated">
<li><p>lorem ipsum dolores</p>
<ul class="doctools_itemized">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ul>
</li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<ul class="doctools_itemized">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ul>
<p>lorem ipsum dolores</p></li>
</ol>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Deleted modules/doctools/tests/fmt/html/21.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html><html><head>
<title>test-definitions-itemized - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-definitions-itemized.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-definitions-itemized(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-definitions-itemized -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<ul class="doctools_itemized">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ul></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p>
<ul class="doctools_itemized">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ul>
<p>lorem ipsum dolores</p></dd>
</dl>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































Deleted modules/doctools/tests/fmt/html/22.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html><html><head>
<title>test-itemized-definitions - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-itemized-definitions.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-itemized-definitions(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-itemized-definitions -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<ul class="doctools_itemized">
<li><p>lorem ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd><p>ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
</dl>
</li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd><p>ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
</dl>
<p>lorem ipsum dolores</p></li>
</ul>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































Deleted modules/doctools/tests/fmt/html/23.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html><html><head>
<title>test-enumerated-definitions - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-enumerated-definitions.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-enumerated-definitions(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-enumerated-definitions -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<ol class="doctools_enumerated">
<li><p>lorem ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd><p>ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
</dl>
</li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd><p>ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
</dl>
<p>lorem ipsum dolores</p></li>
</ol>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































Deleted modules/doctools/tests/fmt/html/24.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html><html><head>
<title>test-definitions-enumerated - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- test-definitions-enumerated.1
   -->
<body><div class="doctools">
<h1 class="doctools_title">test-definitions-enumerated(1) n .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>test-definitions-enumerated -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>lorem ipsum dolores</p>
<dl class="doctools_definitions">
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<ol class="doctools_enumerated">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ol></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p></dd>
<dt>lorem</dt>
<dd><p>ipsum dolores</p>
<p>lorem ipsum dolores</p>
<ol class="doctools_enumerated">
<li><p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
<li><p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p>
<p>lorem ipsum dolores</p></li>
</ol>
<p>lorem ipsum dolores</p></dd>
</dl>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































Deleted modules/doctools/tests/fmt/html/25.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<pre class="doctools_example">
Special markdown __non-special__
</pre>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































Deleted modules/doctools/tests/fmt/html/26.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<pre class="doctools_example">
Example Block  More Lines \
Ever More
Never
</pre>
<p>............... Weiter .............</p>
<pre class="doctools_example">
Second \
Continuing Lines \
Done
</pre>
<p>............... Vorwaerts ..........</p>
<pre class="doctools_example">
   <b class="cmd">command</b>    x \
-- <b class="cmd">command</b> --
</pre>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































Deleted modules/doctools/tests/fmt/html/27.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; .COPYRIGHT.
   -->
<!-- TEST.T
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(T) 0 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>= = == === ===== ======== =============</p>
<pre class="doctools_example">[<b class="cmd">bar</b> \
  foo]</pre>
<p>= = == === ===== ======== =============</p>
<pre class="doctools_example">
<em>  many lines
  highlighted
</em>
</pre>
<p>= = == === ===== ======== =============</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































Deleted modules/doctools/tests/fmt/html/28.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html><html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2019 Me   -- Copyright &amp;copy; 2019 Myself   -- Copyright &amp;copy; 2019 And I
   -->
<!-- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 1.1.23.58132.1 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; 2019 Me<br>
Copyright &copy; 2019 Myself<br>
Copyright &copy; 2019 And I</p>
</div>
</div></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































Deleted modules/doctools/tests/fmt/latex/00.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Deleted modules/doctools/tests/fmt/latex/01.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) **Copyright**
% TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
Argument	::\underline{Argument}::
Class		::{\bf Class}::
Command		::{\bf Command}::
Comment		::::
Const		::{\bf Constant}::
Emphasis	::{\it Emphasis}::
File		::"{\it File/Path}"::
Function	::{\bf Function}::
Method		::{\bf Method}::
Namespace	::{\bf Namespace]}::
Option		::{\bf Option}::
Optional	::?Optional?::
Package		::{\bf Package}::
Syscmd		::{\bf SystemCommand}::
Term		::{\it Term}::
Type		::{\bf Type}::
Uri		::\underline{Uri}::
Variable	::{\bf Variable}::
Widget		::{\bf Widget}::
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) **Copyright**\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































Deleted modules/doctools/tests/fmt/latex/02.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST -- ..THE\_MODULE.. : ..THE\_TITLE..}
\maketitle
\section{Synopsis}\label{synopsis}
\begin{flushleft}
package require {\bf AAA}
package require {\bf BBB VVV}
\end{flushleft}
\section{Description}\label{section1}
\section{See Also}\label{see-also}
ELSE, OTHER
\section{Keywords}\label{keywords}
KEYA, KEYZ
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































Deleted modules/doctools/tests/fmt/latex/03.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\section{AaA}\label{section2}
1
\section{BbB}\label{section3}
22
\subsection{BbB.cCc}\label{subsection1}
333
\subsection{BbB.dDd}\label{subsection2}
4444
\section{EeE}\label{section4}
5555

At {\bf AaA (\ref{section2})}.

At {\bf \_\_undefined\_\_ (\ref{\_\_undefined\_\_})}.
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































Deleted modules/doctools/tests/fmt/latex/04.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% TEST.z
\documentclass{article}
\usepackage{alltt}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
BEGINNE HIER
\begin{alltt}
	 Example Block  More Lines
\end{alltt}

\begin{alltt}
Inlined Example \textbackslash
Next Line
\end{alltt}
FERTIG
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































Deleted modules/doctools/tests/fmt/latex/05.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% BASIC.a
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / BASIC --  : }
\maketitle
\section{Synopsis}\label{synopsis}
\begin{itemize}
\item[] a-command
\end{itemize}
\section{Description}\label{section1}
OK

\begin{itemize}
%
\item[] \underline{argument-1} integer
%
verification
%
\item[] \underline{argument-2} string (out)
%
 mogrification
\end{itemize}

\begin{itemize}
%
\item[] {\bf command-a}
%
 explanation
%
\item[] {\bf command-b}
%
elucidation
\end{itemize}

\begin{itemize}
%
\item[] term
%
 definition
%
\item[] a-command
%
semantic
\end{itemize}

\begin{enumerate}
%
\item
%
A
%
\item
%
 B

C

D
\end{enumerate}

\begin{itemize}
%
\item
%
1
%
\item
%
 2

2a

2b
\end{itemize}

\begin{itemize}
%
\item[] {\bf option-1}
%
 meaning
%
\item[] {\bf option-2} value
%
elaboration
\end{itemize}

\begin{itemize}
%
\item[] Command-Line Switch:	{\bf background}\\
Database Name:	{\bf Background}\\
Database Class:	{\bf Color}\\
%
 candy
%
\item[] Command-Line Switch:	{\bf foreground}\\
Database Name:	{\bf Foreground}\\
Database Class:	{\bf Color}\\
%
caramel
\end{itemize}

KO
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































Deleted modules/doctools/tests/fmt/latex/06.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\begin{itemize}
%
\item
%
 1

2

3
%
\item
%
\begin{enumerate}
%
\item
%
 a

b

c
%
\item
%
\begin{itemize}
%
\item[] foo
%
 snafu
%
\item[] bar
%
 barf
%
\item[] roo
%
 gork
\end{itemize}
%
\item
%
 a

b

c
\end{enumerate}
%
\item
%
 4

5

6
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































Deleted modules/doctools/tests/fmt/latex/07.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\begin{itemize}
%
\item
%
 1
%
\item
%
 2
\begin{enumerate}
%
\item
%
 a
%
\item
%
 b
\begin{itemize}
%
\item[] foo
%
 snafu
%
\item[] bar
%
 barf
%
\item[] roo
%
 gork
\end{itemize}
bb
%
\item
%
 a
\end{enumerate}
22
%
\item
%
 3
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































Deleted modules/doctools/tests/fmt/latex/08.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) **Copyright**
% ALL.a
\documentclass{article}
\usepackage{alltt}
\begin{document}
\author{@USR@}
\title{.MODULE. / ALL -- ..THE\_MODULE.. : ..THE\_TITLE..}
\maketitle
\section{Synopsis}\label{synopsis}
\begin{flushleft}
package require {\bf AAA}
package require {\bf BBB VVV}
package require {\bf CCC ?VVV?}
\end{flushleft}
\begin{itemize}
\item[] CMDNAME ...
\item[] CMDNAME ...
\item[] CMDNAME ...
\end{itemize}
\section{Description}\label{section1}
\begin{itemize}
%
\item[] {\bf NAME}
%
 DESCRIPTION ::{\bf Command}::
%
\item[] {\bf NAME}
%
 DESCRIPTION ::::
%
\item[] {\bf NAME}
%
 DESCRIPTION ::{\bf Constant}::
\end{itemize}
\section{API}\label{section2}
\begin{itemize}
%
\item[] TERM
%
 DESCRIPTION ::{\it Emphasis}::
%
\item[] TERM
%
 DESCRIPTION ::"{\it File/Path}"::
\begin{itemize}
%
\item[] Command-Line Switch:	{\bf NAME}\\
Database Name:	{\bf DBNAME}\\
Database Class:	{\bf CLASS}\\
%
 DESCRIPTION {\bf NARGLE (\ref{subsection1})}
%
\item[] Command-Line Switch:	{\bf NAME}\\
Database Name:	{\bf DBNAME}\\
Database Class:	{\bf CLASS}\\
%
 DESCRIPTION ::{\bf Function}::
%
\item[] Command-Line Switch:	{\bf NAME}\\
Database Name:	{\bf DBNAME}\\
Database Class:	{\bf CLASS}\\
%
 DESCRIPTION ::{\bf Method}::
\end{itemize}
%
\item[] TERM
%
 DESCRIPTION
%
\item[] CMDNAME ...
%
 DESCRIPTION ::{\bf Namespace]}::
\begin{itemize}
%
\item[] \underline{NAME} TYPE
%
 DESCRIPTION ::\underline{Argument}::
%
\item[] \underline{NAME} TYPE
%
 DESCRIPTION ::{\bf Option}::
%
\item[] \underline{NAME} TYPE (MODE)
%
 DESCRIPTION ::?Optional?::
\begin{alltt}
    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER
\end{alltt}
\end{itemize}
%
\item[] CMDNAME ...
%
 DESCRIPTION ::{\bf Package}::
%
\item[] CMDNAME ...
%
 DESCRIPTION ::{\bf SystemCommand}::
\begin{itemize}
%
\item[] {\bf NAME}
%
 DESCRIPTION ::{\it Term}::
%
\item[] {\bf NAME}
%
 DESCRIPTION ::{\bf Type}::
%
\item[] {\bf NAME} ARGUMENT
%
 DESCRIPTION ::\underline{Uri}::
\end{itemize}
\end{itemize}
\subsection{NARGLE}\label{subsection1}
\begin{enumerate}
%
\item
%
 PARAGRAPH ::\underline{UriLabel} \footnote{Uri}::
%
\item
%
 PARAGRAPH ::{\bf Variable}::
%
\item
%
 PARAGRAPH ::{\bf Widget}::
\begin{itemize}
%
\item
%
 PARAGRAPH ::{\bf Class}::
%
\item
%
 PARAGRAPH
%
\item
%
 PARAGRAPH
\end{itemize}
\end{enumerate}
\section{See Also}\label{see-also}
ELSE, OTHER
\section{Keywords}\label{keywords}
KEYA, KEYZ
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) **Copyright**\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































Deleted modules/doctools/tests/fmt/latex/09.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% TEST.z
\documentclass{article}
\usepackage{alltt}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
lorem
\begin{alltt}
1 lorem ipsum dolores
\end{alltt}
ipsum
\begin{alltt}
 2 lorem ipsum dolores \end{alltt}
dolores
\begin{alltt}
3 lorem ipsum dolores
\end{alltt}
lorem
\begin{alltt}
 4 lorem ipsum dolores
\end{alltt}
ipsum
\begin{alltt}
5 lorem ipsum dolores \end{alltt}
dolores
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































Deleted modules/doctools/tests/fmt/latex/10.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-itemized.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-itemized --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{itemize}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































Deleted modules/doctools/tests/fmt/latex/11.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-enumerated.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-enumerated --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{enumerate}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{enumerate}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































Deleted modules/doctools/tests/fmt/latex/12.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-definitions.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-definitions --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{itemize}
%
\item[] lorem
%
 ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































Deleted modules/doctools/tests/fmt/latex/13.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-itemized-examples.1
\documentclass{article}
\usepackage{alltt}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-itemized-examples --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{itemize}
%
\item
%
\begin{alltt}
 A lorem ipsum dolores \end{alltt}
%
\item
%
 lorem ipsum dolores
\begin{alltt}
 B lorem ipsum dolores \end{alltt}
lorem ipsum dolores
%
\item
%
 lorem ipsum dolores
\begin{alltt}
 C lorem ipsum dolores \end{alltt}
%
\item
%
 lorem ipsum dolores
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































Deleted modules/doctools/tests/fmt/latex/14.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-enumerated-examples.1
\documentclass{article}
\usepackage{alltt}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-enumerated-examples --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{enumerate}
%
\item
%
\begin{alltt}
 A1 lorem ipsum dolores \end{alltt}
%
\item
%
 lorem ipsum dolores
\begin{alltt}
 B2 lorem ipsum dolores \end{alltt}
lorem ipsum dolores
%
\item
%
 lorem ipsum dolores
\begin{alltt}
 C3 lorem ipsum dolores \end{alltt}
%
\item
%
 lorem ipsum dolores
\end{enumerate}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































Deleted modules/doctools/tests/fmt/latex/15.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-definition-examples.1
\documentclass{article}
\usepackage{alltt}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-definition-examples --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{itemize}
%
\item[] lorem
%
\begin{alltt}
 A1 lorem ipsum dolores \end{alltt}
%
\item[] lorem
%
 ipsum dolores
\begin{alltt}
 B2 lorem ipsum dolores \end{alltt}
lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores
\begin{alltt}
 C3 lorem ipsum dolores \end{alltt}
%
\item[] lorem
%
 ipsum dolores
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































Deleted modules/doctools/tests/fmt/latex/16.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-itemized-nested.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-itemized-nested --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{itemize}
%
\item
%
 lorem ipsum dolores
\begin{itemize}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
\begin{itemize}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}

lorem ipsum dolores
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Deleted modules/doctools/tests/fmt/latex/17.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-enumerated-nested.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-enumerated-nested --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{enumerate}
%
\item
%
 lorem ipsum dolores
\begin{enumerate}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{enumerate}
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
\begin{enumerate}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{enumerate}

lorem ipsum dolores
\end{enumerate}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Deleted modules/doctools/tests/fmt/latex/18.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-definitions-nested.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-definitions-nested --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{itemize}
%
\item[] lorem
%
 ipsum dolores
\begin{itemize}
%
\item[] lorem
%
 ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
\begin{itemize}
%
\item[] lorem
%
 ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}

lorem ipsum dolores
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Deleted modules/doctools/tests/fmt/latex/19.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-itemized-enumerated.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-itemized-enumerated --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{itemize}
%
\item
%
 lorem ipsum dolores
\begin{enumerate}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{enumerate}
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
\begin{enumerate}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{enumerate}

lorem ipsum dolores
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Deleted modules/doctools/tests/fmt/latex/20.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-enumerated-itemized.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-enumerated-itemized --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{enumerate}
%
\item
%
 lorem ipsum dolores
\begin{itemize}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
\begin{itemize}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}

lorem ipsum dolores
\end{enumerate}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Deleted modules/doctools/tests/fmt/latex/21.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-definitions-itemized.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-definitions-itemized --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{itemize}
%
\item[] lorem
%
 ipsum dolores
\begin{itemize}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
\begin{itemize}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}

lorem ipsum dolores
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Deleted modules/doctools/tests/fmt/latex/22.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-itemized-definitions.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-itemized-definitions --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{itemize}
%
\item
%
 lorem ipsum dolores
\begin{itemize}
%
\item[] lorem
%
 ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
\begin{itemize}
%
\item[] lorem
%
 ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}

lorem ipsum dolores
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Deleted modules/doctools/tests/fmt/latex/23.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-enumerated-definitions.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-enumerated-definitions --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{enumerate}
%
\item
%
 lorem ipsum dolores
\begin{itemize}
%
\item[] lorem
%
 ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
\begin{itemize}
%
\item[] lorem
%
 ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{itemize}

lorem ipsum dolores
\end{enumerate}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Deleted modules/doctools/tests/fmt/latex/24.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% test-definitions-enumerated.1
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / test-definitions-enumerated --  : }
\maketitle
\section{Description}\label{section1}
lorem ipsum dolores
\begin{itemize}
%
\item[] lorem
%
 ipsum dolores
\begin{enumerate}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{enumerate}
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
%
\item[] lorem
%
 ipsum dolores

lorem ipsum dolores
\begin{enumerate}
%
\item
%
 lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores
%
\item
%
 lorem ipsum dolores

lorem ipsum dolores

lorem ipsum dolores
\end{enumerate}

lorem ipsum dolores
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Deleted modules/doctools/tests/fmt/latex/25.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% TEST.z
\documentclass{article}
\usepackage{alltt}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\begin{alltt}
Special markdown __non-special__
\end{alltt}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted modules/doctools/tests/fmt/latex/26.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% TEST.z
\documentclass{article}
\usepackage{alltt}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\begin{alltt}
Example Block  More Lines \textbackslash
Ever More
Never
\end{alltt}

............... Weiter .............

\begin{alltt}
Second \textbackslash
Continuing Lines \textbackslash
Done
\end{alltt}
............... Vorwaerts ..........
\begin{alltt}
   {\bf command}    x \textbackslash
-- {\bf command} --
\end{alltt}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































Deleted modules/doctools/tests/fmt/latex/27.

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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% TEST.T
\documentclass{article}
\usepackage{alltt}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
= = == === ===== ======== =============
\begin{alltt}
[{\bf bar} \textbackslash
  foo]\end{alltt}
= = == === ===== ======== =============
\begin{alltt}
{\it   many lines
  highlighted
}
\end{alltt}
= = == === ===== ======== =============
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































Deleted modules/doctools/tests/fmt/latex/28.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) 2019 Me
% Copyright (c) 2019 Myself
% Copyright (c) 2019 And I
% TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) 2019 Me\linebreak
Copyright (c) 2019 Myself\linebreak
Copyright (c) 2019 And I\linebreak
\end{flushleft}
\end{document}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted modules/doctools/tests/fmt/list/00.

1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/01.

1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/02.

1
manpage {seealso {ELSE OTHER} keywords {KEYA KEYZ} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc ..THE_MODULE.. desc ..THE_TITLE.. fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/03.

1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/04.

1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/05.

1
manpage {seealso {} keywords {} file .FILE. section a category {} module .MODULE. version 5 title BASIC shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/06.

1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/07.

1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/08.

1
manpage {seealso {ELSE OTHER} keywords {KEYA KEYZ} file .FILE. section a category {} module .MODULE. version 5 title ALL shortdesc ..THE_MODULE.. desc ..THE_TITLE.. fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/09.

1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/10.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-itemized shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/11.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-enumerated shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/12.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-definitions shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/13.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-itemized-examples shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/14.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-enumerated-examples shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/15.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-definition-examples shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/16.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-itemized-nested shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/17.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-enumerated-nested shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/18.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-definitions-nested shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/19.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-itemized-enumerated shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/20.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-enumerated-itemized shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/21.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-definitions-itemized shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/22.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-itemized-definitions shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/23.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-enumerated-definitions shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/24.

1
manpage {seealso {} keywords {} file .FILE. section 1 category {} module .MODULE. version n title test-definitions-enumerated shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/25.

1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/26.

1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/27.

1
manpage {seealso {} keywords {} file .FILE. section T category {} module .MODULE. version 0 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/list/28.

1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 1.1.23.58132.1 title TEST shortdesc {} desc {} fid .FILE}
<


Deleted modules/doctools/tests/fmt/man/00.

1
2
3
4
[comment { -- Basic structure }]
[manpage_begin TEST z 3.14.15.926]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/man/01.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[comment { -- Inline markup }]
[manpage_begin TEST z 3.14.15.926]
[copyright **Copyright**]
[description]
Argument	::[arg Argument]::
Class		::[class Class]::
Command		::[cmd Command]::
Comment		::[comment Comment]::
Const		::[const Constant]::
Emphasis	::[emph Emphasis]::
File		::[file File/Path]::
Function	::[fun Function]::
Method		::[method Method]::
Namespace	::[namespace Namespace]::
Option		::[option Option]::
Optional	::[opt Optional]::
Package		::[package Package]::
Syscmd		::[syscmd SystemCommand]::
Term		::[term Term]::
Type		::[type Type]::
Uri		::[uri Uri]::
Variable	::[var Variable]::
Widget		::[widget Widget]::
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































Deleted modules/doctools/tests/fmt/man/02.

1
2
3
4
5
6
7
8
9
10
[comment { -- Meta markup }]
[manpage_begin TEST z 3.14.15.926]
[moddesc ..THE_MODULE..]
[titledesc ..THE_TITLE..]
[require AAA]
[require BBB VVV]
[keywords KEYA KEYZ]
[see_also OTHER ELSE]
[description]
[manpage_end]
<
<
<
<
<
<
<
<
<
<




















Deleted modules/doctools/tests/fmt/man/03.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[comment { -- Sectioning }]
[manpage_begin TEST z 3.14.15.926]
[description]
[section AaA]
1
[section BbB]
22
[subsection BbB.cCc]
333
[subsection BbB.dDd]
4444
[section EeE]
5555

[para]
At [sectref AaA].
[para]
At [sectref __undefined__].
[manpage_end]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































Deleted modules/doctools/tests/fmt/man/04.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[comment { -- Example 1 }]
[manpage_begin TEST z 3.14.15.926]
[description]
BEGINNE HIER
[example {
	 Example Block \
	 More Lines
}]
[para]
[para]
[example_begin]
Inlined Example \
Next Line
[example_end]
FERTIG
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































Deleted modules/doctools/tests/fmt/man/05.

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
[comment { -- Lists 1 }]
[manpage_begin BASIC a 5]
[description]
OK
[para]
[list_begin arguments]
[arg_def integer argument-1]
verification
[arg_def string argument-2 out] mogrification
[list_end]
[para]
[list_begin commands]
[cmd_def command-a] explanation
[cmd_def command-b]
elucidation
[list_end]
[para]
[list_begin definitions]
[def term] definition
[call a-command]
semantic
[list_end]
[para]
[list_begin enumerated]
[enum]
A
[enum] B
[para]
C
[para]
D
[list_end]
[para]
[list_begin itemized]
[item]
1
[item] 2
[para]
2a
[para]
2b
[list_end]
[para]
[list_begin options]
[opt_def option-1] meaning
[opt_def option-2 value]
elaboration
[list_end]
[para]
[list_begin tkoptions]
[tkoption_def background Background Color] candy
[tkoption_def foreground Foreground Color]
caramel
[list_end]
[para]
KO
[comment DONE]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































Deleted modules/doctools/tests/fmt/man/06.

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
[comment { -- Lists 2 }]
[manpage_begin TEST z 3.14.15.926]
[description]
[comment {
    nested lists, same and different types, examples have examples at
    least three levels deep, for a proper inner level, i.e. not only
    first/last level, but something truly in the middle. Also three
    list items of the relevant on each level, see the proper handling
    of indentations. For that we also need paragraphs in the items.

    start: itemized/enumerated/definition
}]
[list_begin itemized]
[item] 1 [para] 2 [para] 3
[item]
[list_begin enumerated]
[enum] a [para] b [para] c
[enum]
[list_begin definitions]
[def foo] snafu
[def bar] barf
[def roo] gork
[list_end]
[enum] a [para] b [para] c
[list_end]
[item] 4 [para] 5 [para] 6
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































Deleted modules/doctools/tests/fmt/man/07.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[manpage_begin TEST z 3.14.15.926]
[description]
[comment {
    nested list 2, put text before and after the embedded list.
}]
[list_begin itemized]
[item] 1
[item] 2
[list_begin enumerated]
[enum] a
[enum] b
[list_begin definitions]
[def foo] snafu
[def bar] barf
[def roo] gork
[list_end]
bb
[enum] a
[list_end]
22
[item] 3
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































Deleted modules/doctools/tests/fmt/man/08.

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
[comment {LISTS, ALL TYPES}]
[manpage_begin ALL a 5]
[copyright **Copyright**]
[moddesc ..THE_MODULE..]
[titledesc ..THE_TITLE..]
[require AAA]
[require BBB VVV]
[require CCC [opt VVV]]
[description]
[list_begin commands]
[cmd_def NAME] DESCRIPTION ::[cmd Command]::
[cmd_def NAME] DESCRIPTION ::[comment Comment]::
[cmd_def NAME] DESCRIPTION ::[const Constant]::
[list_end]
[section API]
[list_begin definitions]
[def TERM] DESCRIPTION ::[emph Emphasis]::
[def TERM] DESCRIPTION ::[file File/Path]::
[list_begin tkoptions]
[tkoption_def NAME DBNAME CLASS] DESCRIPTION [sectref NARGLE]
[tkoption_def NAME DBNAME CLASS] DESCRIPTION ::[fun Function]::
[tkoption_def NAME DBNAME CLASS] DESCRIPTION ::[method Method]::
[list_end]
[def TERM] DESCRIPTION
[call CMDNAME ...] DESCRIPTION ::[namespace Namespace]::
[list_begin arguments]
[arg_def TYPE NAME] DESCRIPTION ::[arg Argument]::
[arg_def TYPE NAME] DESCRIPTION ::[option Option]::
[arg_def TYPE NAME MODE] DESCRIPTION ::[opt Optional]::
[example {
    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER
}]
[list_end]
[call CMDNAME ...] DESCRIPTION ::[package Package]::
[call CMDNAME ...] DESCRIPTION ::[syscmd SystemCommand]::
[list_begin options]
[opt_def NAME] DESCRIPTION ::[term Term]::
[opt_def NAME] DESCRIPTION ::[type Type]::
[opt_def NAME ARGUMENT] DESCRIPTION ::[uri Uri]::
[list_end]
[list_end]
[subsection NARGLE]
[list_begin enumerated]
[enum] PARAGRAPH ::[uri Uri UriLabel]::
[enum] PARAGRAPH ::[var Variable]::
[enum] PARAGRAPH ::[widget Widget]::
[list_begin itemized]
[item] PARAGRAPH ::[class Class]::
[item] PARAGRAPH
[item] PARAGRAPH
[list_end]
[list_end]
[keywords KEYA KEYZ]
[see_also OTHER ELSE]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































Deleted modules/doctools/tests/fmt/man/09.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[comment { -- Example 2 }]
[manpage_begin TEST z 3.14.15.926]
[description]
lorem
[example {
1 lorem ipsum dolores
}]
ipsum
[example { 2 lorem ipsum dolores }]
dolores
[example_begin]
3 lorem ipsum dolores
[example_end]
lorem
[example { 4 lorem ipsum dolores
}]
ipsum
[example {
5 lorem ipsum dolores }]
dolores
[manpage_end]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































Deleted modules/doctools/tests/fmt/man/10.

1
2
3
4
5
6
7
8
9
10
11
12
13
[comment { -- List 3 - itemized }]
[manpage_begin test-itemized 1 n]
[description]
lorem ipsum dolores
[list_begin itemized]
[item] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<


























Deleted modules/doctools/tests/fmt/man/11.

1
2
3
4
5
6
7
8
9
10
11
12
13
[comment { -- List 4 - enumerated }]
[manpage_begin test-enumerated 1 n]
[description]
lorem ipsum dolores
[list_begin enumerated]
[enum] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<


























Deleted modules/doctools/tests/fmt/man/12.

1
2
3
4
5
6
7
8
9
10
11
12
13
[comment { -- List 5 - definitions }]
[manpage_begin test-definitions 1 n]
[description]
lorem ipsum dolores
[list_begin definitions]
[def lorem] ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<


























Deleted modules/doctools/tests/fmt/man/13.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[comment { -- List 6 - itemized examples }]
[manpage_begin test-itemized-examples 1 n]
[description]
lorem ipsum dolores
[list_begin itemized]
[item]
[example { A lorem ipsum dolores }]
[item] lorem ipsum dolores
[example { B lorem ipsum dolores }]
lorem ipsum dolores
[item] lorem ipsum dolores
[example { C lorem ipsum dolores }]
[item] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























Deleted modules/doctools/tests/fmt/man/14.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[comment { -- List 7 - enumerated examples }]
[manpage_begin test-enumerated-examples 1 n]
[description]
lorem ipsum dolores
[list_begin enumerated]
[enum]
[example { A1 lorem ipsum dolores }]
[enum] lorem ipsum dolores
[example { B2 lorem ipsum dolores }]
lorem ipsum dolores
[enum] lorem ipsum dolores
[example { C3 lorem ipsum dolores }]
[enum] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























Deleted modules/doctools/tests/fmt/man/15.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[comment { -- List 8 - definition examples }]
[manpage_begin test-definition-examples 1 n]
[description]
lorem ipsum dolores
[list_begin definitions]
[def lorem]
[example { A1 lorem ipsum dolores }]
[def lorem] ipsum dolores
[example { B2 lorem ipsum dolores }]
lorem ipsum dolores
[def lorem] ipsum dolores
[example { C3 lorem ipsum dolores }]
[def lorem] ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























Deleted modules/doctools/tests/fmt/man/16.

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
[comment { -- List 9 - itemized nested }]
[manpage_begin test-itemized-nested 1 n]
[description]
lorem ipsum dolores
[list_begin itemized]
[item] lorem ipsum dolores
[list_begin itemized]
[item] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[list_begin itemized]
[item] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/man/17.

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
[comment { -- List 10 - enumerated nested }]
[manpage_begin test-enumerated-nested 1 n]
[description]
lorem ipsum dolores
[list_begin enumerated]
[enum] lorem ipsum dolores
[list_begin enumerated]
[enum] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[list_begin enumerated]
[enum] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/man/18.

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
[comment { -- List 11 - definitions nested }]
[manpage_begin test-definitions-nested 1 n]
[description]
lorem ipsum dolores
[list_begin definitions]
[def lorem] ipsum dolores
[list_begin definitions]
[def lorem] ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[list_begin definitions]
[def lorem] ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/man/19.

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
[comment { -- List 12 - itemized enumerated }]
[manpage_begin test-itemized-enumerated 1 n]
[description]
lorem ipsum dolores
[list_begin itemized]
[item] lorem ipsum dolores
[list_begin enumerated]
[enum] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[list_begin enumerated]
[enum] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/man/20.

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
[comment { -- List 13 - enumerated itemized }]
[manpage_begin test-enumerated-itemized 1 n]
[description]
lorem ipsum dolores
[list_begin enumerated]
[enum] lorem ipsum dolores
[list_begin itemized]
[item] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[list_begin itemized]
[item] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/man/21.

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
[comment { -- List 14 - definitions itemized }]
[manpage_begin test-definitions-itemized 1 n]
[description]
lorem ipsum dolores
[list_begin definitions]
[def lorem] ipsum dolores
[list_begin itemized]
[item] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[list_begin itemized]
[item] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/man/22.

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
[comment { -- List 15 - itemized definitions }]
[manpage_begin test-itemized-definitions 1 n]
[description]
lorem ipsum dolores
[list_begin itemized]
[item] lorem ipsum dolores
[list_begin definitions]
[def lorem] ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[item] lorem ipsum dolores
[para] lorem ipsum dolores
[list_begin definitions]
[def lorem] ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/man/23.

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
[comment { -- List 16 - enumerated definitions }]
[manpage_begin test-enumerated-definitions 1 n]
[description]
lorem ipsum dolores
[list_begin enumerated]
[enum] lorem ipsum dolores
[list_begin definitions]
[def lorem] ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[list_begin definitions]
[def lorem] ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/man/24.

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
[comment { -- List 17 - definitions enumerated }]
[manpage_begin test-definitions-enumerated 1 n]
[description]
lorem ipsum dolores
[list_begin definitions]
[def lorem] ipsum dolores
[list_begin enumerated]
[enum] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[def lorem] ipsum dolores
[para] lorem ipsum dolores
[list_begin enumerated]
[enum] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[enum] lorem ipsum dolores
[para] lorem ipsum dolores
[para] lorem ipsum dolores
[list_end]
[para] lorem ipsum dolores
[list_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/man/25.

1
2
3
4
5
6
7
[comment { -- Example 2 }]
[manpage_begin TEST z 3.14.15.926]
[description]
[example {
Special markdown __non-special__
}]
[manpage_end]
<
<
<
<
<
<
<














Deleted modules/doctools/tests/fmt/man/26.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[comment { -- Example 3 }]
[manpage_begin TEST z 3.14.15.926]
[description]
[example {
Example Block \
More Lines \\
Ever More
Never
}]
[para]
............... Weiter .............
[para]
[example_begin]
Second \
Continuing Lines \\
Done
[example_end]
............... Vorwaerts ..........
[example_begin]
   [cmd command]    x \\
-- [cmd command] --
[example_end]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































Deleted modules/doctools/tests/fmt/man/27.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[comment { -- Example 4 }]
[manpage_begin TEST T 0]
[description]
= = == === ===== ======== =============
[example_begin][lb][cmd bar] \
  foo[rb][example_end]
= = == === ===== ======== =============
[example_begin]
[emph {  many lines
  highlighted
}]
[example_end]
= = == === ===== ======== =============
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Deleted modules/doctools/tests/fmt/man/28.

1
2
3
4
5
6
7
[comment { -- Multi copyright }]
[manpage_begin TEST z 1.1.23.58132.1]
[copyright {2019 Me}]
[copyright {2019 Myself}]
[copyright {2019 And I}]
[description]
[manpage_end]
<
<
<
<
<
<
<














Deleted modules/doctools/tests/fmt/markdown/00.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (TEST\(z\) 3\.14\.15\.926 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































Deleted modules/doctools/tests/fmt/markdown/01.

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

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \*\*Copyright\*\*)
[//000000004]: # (TEST\(z\) 3\.14\.15\.926 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

Argument ::*Argument*:: Class ::__Class__:: Command ::__Command__::
Comment :::: Const ::__Constant__:: Emphasis ::*Emphasis*:: File
::"File/Path":: Function ::__Function__:: Method ::__Method__::
Namespace ::__Namespace__:: Option ::__Option__:: Optional
::?Optional?:: Package ::__Package__:: Syscmd ::__SystemCommand__:: Term
::*Term*:: Type ::__Type__:: Uri ::[Uri](Uri):: Variable
::__Variable__:: Widget ::__Widget__::

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \*\*Copyright\*\*
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































Deleted modules/doctools/tests/fmt/markdown/02.

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

[//000000001]: # (TEST \- \.\.THE\_MODULE\.\.)
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (TEST\(z\) 3\.14\.15\.926 \.MODULE\. "\.\.THE\_MODULE\.\.")

# NAME

TEST \- \.\.THE\_TITLE\.\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require AAA  
package require BBB VVV  

# <a name='description'></a>DESCRIPTION

# <a name='seealso'></a>SEE ALSO

ELSE, OTHER

# <a name='keywords'></a>KEYWORDS

KEYA, KEYZ

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































Deleted modules/doctools/tests/fmt/markdown/03.

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

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (TEST\(z\) 3\.14\.15\.926 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [AaA](#section2)

  - [BbB](#section3)

      - [BbB\.cCc](#subsection1)

      - [BbB\.dDd](#subsection2)

  - [EeE](#section4)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

# <a name='section2'></a>AaA

1

# <a name='section3'></a>BbB

22

## <a name='subsection1'></a>BbB\.cCc

333

## <a name='subsection2'></a>BbB\.dDd

4444

# <a name='section4'></a>EeE

5555

At [AaA](#section2)\.

At __\_\_undefined\_\___\.

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































Deleted modules/doctools/tests/fmt/markdown/04.

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

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (TEST\(z\) 3\.14\.15\.926 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

BEGINNE HIER

    Example Block  More Lines

    Inlined Example \
    Next Line

FERTIG

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted modules/doctools/tests/fmt/markdown/05.

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
89
90
91
92
93

[//000000001]: # (BASIC \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (BASIC\(a\) 5 \.MODULE\. "")

# NAME

BASIC \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

[a\-command](#1)  

# <a name='description'></a>DESCRIPTION

OK

  - integer *argument\-1*

    verification

  - string *argument\-2* \(out\)

    mogrification

  - __command\-a__

    explanation

  - __command\-b__

    elucidation

  - term

    definition

  - <a name='1'></a>a\-command

    semantic

  1. A

  1. B

     C

     D

  - 1

  - 2

    2a

    2b

  - __option\-1__

    meaning

  - __option\-2__ value

    elaboration

  - Command\-Line Switch:	__background__  
    Database Name:	__Background__  
    Database Class:	__Color__

    candy

  - Command\-Line Switch:	__foreground__  
    Database Name:	__Foreground__  
    Database Class:	__Color__

    caramel

KO

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































Deleted modules/doctools/tests/fmt/markdown/06.

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

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (TEST\(z\) 3\.14\.15\.926 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

  - 1

    2

    3

      1. a

         b

         c

           * foo

             snafu

           * bar

             barf

           * roo

             gork

      1. a

         b

         c

  - 4

    5

    6

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































Deleted modules/doctools/tests/fmt/markdown/07.

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

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (TEST\(z\) 3\.14\.15\.926 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

  - 1

  - 2

      1. a

      1. b

           * foo

             snafu

           * bar

             barf

           * roo

             gork

         bb

      1. a

    22

  - 3

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































Deleted modules/doctools/tests/fmt/markdown/08.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

[//000000001]: # (ALL \- \.\.THE\_MODULE\.\.)
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \*\*Copyright\*\*)
[//000000004]: # (ALL\(a\) 5 \.MODULE\. "\.\.THE\_MODULE\.\.")

# NAME

ALL \- \.\.THE\_TITLE\.\.

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

      - [NARGLE](#subsection1)

  - [See Also](#seealso)

  - [Keywords](#keywords)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require AAA  
package require BBB VVV  
package require CCC ?VVV?  

[CMDNAME \.\.\.](#1)  
[CMDNAME \.\.\.](#2)  
[CMDNAME \.\.\.](#3)  

# <a name='description'></a>DESCRIPTION

  - __NAME__

    DESCRIPTION ::__Command__::

  - __NAME__

    DESCRIPTION ::::

  - __NAME__

    DESCRIPTION ::__Constant__::

# <a name='section2'></a>API

  - TERM

    DESCRIPTION ::*Emphasis*::

  - TERM

    DESCRIPTION ::"File/Path"::

      * Command\-Line Switch:	__NAME__  
        Database Name:	__DBNAME__  
        Database Class:	__CLASS__

        DESCRIPTION [NARGLE](#subsection1)

      * Command\-Line Switch:	__NAME__  
        Database Name:	__DBNAME__  
        Database Class:	__CLASS__

        DESCRIPTION ::__Function__::

      * Command\-Line Switch:	__NAME__  
        Database Name:	__DBNAME__  
        Database Class:	__CLASS__

        DESCRIPTION ::__Method__::

  - TERM

    DESCRIPTION

  - <a name='1'></a>CMDNAME \.\.\.

    DESCRIPTION ::__Namespace__::

      * TYPE *NAME*

        DESCRIPTION ::*Argument*::

      * TYPE *NAME*

        DESCRIPTION ::__Option__::

      * TYPE *NAME* \(MODE\)

        DESCRIPTION ::?Optional?::

            THE ARGUMENT IS USED IN THIS
            AND/OR THAT MANNER

  - <a name='2'></a>CMDNAME \.\.\.

    DESCRIPTION ::__Package__::

  - <a name='3'></a>CMDNAME \.\.\.

    DESCRIPTION ::__SystemCommand__::

      * __NAME__

        DESCRIPTION ::*Term*::

      * __NAME__

        DESCRIPTION ::__Type__::

      * __NAME__ ARGUMENT

        DESCRIPTION ::[Uri](Uri)::

## <a name='subsection1'></a>NARGLE

  1. PARAGRAPH ::[UriLabel](Uri)::

  1. PARAGRAPH ::__Variable__::

  1. PARAGRAPH ::__Widget__::

       - PARAGRAPH ::__Class__::

       - PARAGRAPH

       - PARAGRAPH

# <a name='seealso'></a>SEE ALSO

ELSE, OTHER

# <a name='keywords'></a>KEYWORDS

KEYA, KEYZ

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \*\*Copyright\*\*
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































Deleted modules/doctools/tests/fmt/markdown/09.

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

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (TEST\(z\) 3\.14\.15\.926 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem

    1 lorem ipsum dolores

ipsum

    2 lorem ipsum dolores

dolores

    3 lorem ipsum dolores

lorem

    4 lorem ipsum dolores

ipsum

    5 lorem ipsum dolores

dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































Deleted modules/doctools/tests/fmt/markdown/10.

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

[//000000001]: # (test\-itemized \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-itemized\(1\) n \.MODULE\. "")

# NAME

test\-itemized \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  - lorem ipsum dolores

  - lorem ipsum dolores

    lorem ipsum dolores

  - lorem ipsum dolores

    lorem ipsum dolores

    lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































Deleted modules/doctools/tests/fmt/markdown/11.

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

[//000000001]: # (test\-enumerated \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-enumerated\(1\) n \.MODULE\. "")

# NAME

test\-enumerated \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  1. lorem ipsum dolores

  1. lorem ipsum dolores

     lorem ipsum dolores

  1. lorem ipsum dolores

     lorem ipsum dolores

     lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































Deleted modules/doctools/tests/fmt/markdown/12.

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

[//000000001]: # (test\-definitions \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-definitions\(1\) n \.MODULE\. "")

# NAME

test\-definitions \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  - lorem

    ipsum dolores

  - lorem

    ipsum dolores

    lorem ipsum dolores

  - lorem

    ipsum dolores

    lorem ipsum dolores

    lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































Deleted modules/doctools/tests/fmt/markdown/13.

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

[//000000001]: # (test\-itemized\-examples \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-itemized\-examples\(1\) n \.MODULE\. "")

# NAME

test\-itemized\-examples \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  -     A lorem ipsum dolores

  - lorem ipsum dolores

        B lorem ipsum dolores

    lorem ipsum dolores

  - lorem ipsum dolores

        C lorem ipsum dolores

  - lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/markdown/14.

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

[//000000001]: # (test\-enumerated\-examples \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-enumerated\-examples\(1\) n \.MODULE\. "")

# NAME

test\-enumerated\-examples \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  1.     A1 lorem ipsum dolores

  1. lorem ipsum dolores

         B2 lorem ipsum dolores

     lorem ipsum dolores

  1. lorem ipsum dolores

         C3 lorem ipsum dolores

  1. lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/markdown/15.

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

[//000000001]: # (test\-definition\-examples \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-definition\-examples\(1\) n \.MODULE\. "")

# NAME

test\-definition\-examples \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  - lorem

        A1 lorem ipsum dolores

  - lorem

    ipsum dolores

        B2 lorem ipsum dolores

    lorem ipsum dolores

  - lorem

    ipsum dolores

        C3 lorem ipsum dolores

  - lorem

    ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































Deleted modules/doctools/tests/fmt/markdown/16.

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

[//000000001]: # (test\-itemized\-nested \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-itemized\-nested\(1\) n \.MODULE\. "")

# NAME

test\-itemized\-nested \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  - lorem ipsum dolores

      * lorem ipsum dolores

      * lorem ipsum dolores

        lorem ipsum dolores

      * lorem ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

  - lorem ipsum dolores

    lorem ipsum dolores

  - lorem ipsum dolores

    lorem ipsum dolores

      * lorem ipsum dolores

      * lorem ipsum dolores

        lorem ipsum dolores

      * lorem ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

    lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































Deleted modules/doctools/tests/fmt/markdown/17.

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

[//000000001]: # (test\-enumerated\-nested \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-enumerated\-nested\(1\) n \.MODULE\. "")

# NAME

test\-enumerated\-nested \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  1. lorem ipsum dolores

       1) lorem ipsum dolores

       1) lorem ipsum dolores

          lorem ipsum dolores

       1) lorem ipsum dolores

          lorem ipsum dolores

          lorem ipsum dolores

  1. lorem ipsum dolores

     lorem ipsum dolores

  1. lorem ipsum dolores

     lorem ipsum dolores

       1) lorem ipsum dolores

       1) lorem ipsum dolores

          lorem ipsum dolores

       1) lorem ipsum dolores

          lorem ipsum dolores

          lorem ipsum dolores

     lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































Deleted modules/doctools/tests/fmt/markdown/18.

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

[//000000001]: # (test\-definitions\-nested \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-definitions\-nested\(1\) n \.MODULE\. "")

# NAME

test\-definitions\-nested \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  - lorem

    ipsum dolores

      * lorem

        ipsum dolores

      * lorem

        ipsum dolores

        lorem ipsum dolores

      * lorem

        ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

  - lorem

    ipsum dolores

    lorem ipsum dolores

  - lorem

    ipsum dolores

    lorem ipsum dolores

      * lorem

        ipsum dolores

      * lorem

        ipsum dolores

        lorem ipsum dolores

      * lorem

        ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

    lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































Deleted modules/doctools/tests/fmt/markdown/19.

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

[//000000001]: # (test\-itemized\-enumerated \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-itemized\-enumerated\(1\) n \.MODULE\. "")

# NAME

test\-itemized\-enumerated \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  - lorem ipsum dolores

      1. lorem ipsum dolores

      1. lorem ipsum dolores

         lorem ipsum dolores

      1. lorem ipsum dolores

         lorem ipsum dolores

         lorem ipsum dolores

  - lorem ipsum dolores

    lorem ipsum dolores

  - lorem ipsum dolores

    lorem ipsum dolores

      1. lorem ipsum dolores

      1. lorem ipsum dolores

         lorem ipsum dolores

      1. lorem ipsum dolores

         lorem ipsum dolores

         lorem ipsum dolores

    lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































Deleted modules/doctools/tests/fmt/markdown/20.

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

[//000000001]: # (test\-enumerated\-itemized \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-enumerated\-itemized\(1\) n \.MODULE\. "")

# NAME

test\-enumerated\-itemized \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  1. lorem ipsum dolores

       - lorem ipsum dolores

       - lorem ipsum dolores

         lorem ipsum dolores

       - lorem ipsum dolores

         lorem ipsum dolores

         lorem ipsum dolores

  1. lorem ipsum dolores

     lorem ipsum dolores

  1. lorem ipsum dolores

     lorem ipsum dolores

       - lorem ipsum dolores

       - lorem ipsum dolores

         lorem ipsum dolores

       - lorem ipsum dolores

         lorem ipsum dolores

         lorem ipsum dolores

     lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































Deleted modules/doctools/tests/fmt/markdown/21.

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

[//000000001]: # (test\-definitions\-itemized \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-definitions\-itemized\(1\) n \.MODULE\. "")

# NAME

test\-definitions\-itemized \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  - lorem

    ipsum dolores

      * lorem ipsum dolores

      * lorem ipsum dolores

        lorem ipsum dolores

      * lorem ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

  - lorem

    ipsum dolores

    lorem ipsum dolores

  - lorem

    ipsum dolores

    lorem ipsum dolores

      * lorem ipsum dolores

      * lorem ipsum dolores

        lorem ipsum dolores

      * lorem ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

    lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































Deleted modules/doctools/tests/fmt/markdown/22.

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

[//000000001]: # (test\-itemized\-definitions \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-itemized\-definitions\(1\) n \.MODULE\. "")

# NAME

test\-itemized\-definitions \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  - lorem ipsum dolores

      * lorem

        ipsum dolores

      * lorem

        ipsum dolores

        lorem ipsum dolores

      * lorem

        ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

  - lorem ipsum dolores

    lorem ipsum dolores

  - lorem ipsum dolores

    lorem ipsum dolores

      * lorem

        ipsum dolores

      * lorem

        ipsum dolores

        lorem ipsum dolores

      * lorem

        ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

    lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































Deleted modules/doctools/tests/fmt/markdown/23.

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

[//000000001]: # (test\-enumerated\-definitions \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-enumerated\-definitions\(1\) n \.MODULE\. "")

# NAME

test\-enumerated\-definitions \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  1. lorem ipsum dolores

       - lorem

         ipsum dolores

       - lorem

         ipsum dolores

         lorem ipsum dolores

       - lorem

         ipsum dolores

         lorem ipsum dolores

         lorem ipsum dolores

  1. lorem ipsum dolores

     lorem ipsum dolores

  1. lorem ipsum dolores

     lorem ipsum dolores

       - lorem

         ipsum dolores

       - lorem

         ipsum dolores

         lorem ipsum dolores

       - lorem

         ipsum dolores

         lorem ipsum dolores

         lorem ipsum dolores

     lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































Deleted modules/doctools/tests/fmt/markdown/24.

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

[//000000001]: # (test\-definitions\-enumerated \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (test\-definitions\-enumerated\(1\) n \.MODULE\. "")

# NAME

test\-definitions\-enumerated \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

lorem ipsum dolores

  - lorem

    ipsum dolores

      1. lorem ipsum dolores

      1. lorem ipsum dolores

         lorem ipsum dolores

      1. lorem ipsum dolores

         lorem ipsum dolores

         lorem ipsum dolores

  - lorem

    ipsum dolores

    lorem ipsum dolores

  - lorem

    ipsum dolores

    lorem ipsum dolores

      1. lorem ipsum dolores

      1. lorem ipsum dolores

         lorem ipsum dolores

      1. lorem ipsum dolores

         lorem ipsum dolores

         lorem ipsum dolores

    lorem ipsum dolores

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































Deleted modules/doctools/tests/fmt/markdown/25.

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

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (TEST\(z\) 3\.14\.15\.926 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

    Special markdown __non-special__

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































Deleted modules/doctools/tests/fmt/markdown/26.

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

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (TEST\(z\) 3\.14\.15\.926 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

    Example Block  More Lines \
    Ever More
    Never

\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. Weiter \.\.\.\.\.\.\.\.\.\.\.\.\.

    Second \
    Continuing Lines \
    Done

\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. Vorwaerts \.\.\.\.\.\.\.\.\.\.

> __command__    x \\  
> \-\- __command__ \-\-

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































Deleted modules/doctools/tests/fmt/markdown/27.

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

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; \.COPYRIGHT\.)
[//000000004]: # (TEST\(T\) 0 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

= = == === ===== ======== =============

> \[__bar__ \\  
> &nbsp;&nbsp;foo\]

= = == === ===== ======== =============

> &nbsp;&nbsp;*many lines*  
> &nbsp;&nbsp;*highlighted*

= = == === ===== ======== =============

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; \.COPYRIGHT\.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































Deleted modules/doctools/tests/fmt/markdown/28.

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

[//000000001]: # (TEST \- )
[//000000002]: # (Generated from file '\.FILE\.' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2019 Me)
[//000000004]: # (Copyright &copy; 2019 Myself)
[//000000005]: # (Copyright &copy; 2019 And I)
[//000000006]: # (TEST\(z\) 1\.1\.23\.58132\.1 \.MODULE\. "")

# NAME

TEST \-

# <a name='toc'></a>Table Of Contents

  - [Table Of Contents](#toc)

  - [Description](#section1)

  - [Copyright](#copyright)

# <a name='description'></a>DESCRIPTION

# <a name='copyright'></a>COPYRIGHT

Copyright &copy; 2019 Me  
Copyright &copy; 2019 Myself  
Copyright &copy; 2019 And I
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































Deleted modules/doctools/tests/fmt/markdown/index.

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

  * [00.md](00.md)
  * [01.md](01.md)
  * [02.md](02.md)
  * [03.md](03.md)
  * [04.md](04.md)
  * [05.md](05.md)
  * [06.md](06.md)
  * [07.md](07.md)
  * [08.md](08.md)
  * [09.md](09.md)
  * [10.md](10.md)
  * [11.md](11.md)
  * [12.md](12.md)
  * [13.md](13.md)
  * [14.md](14.md)
  * [15.md](15.md)
  * [16.md](16.md)
  * [17.md](17.md)
  * [18.md](18.md)
  * [19.md](19.md)
  * [20.md](20.md)
  * [21.md](21.md)
  * [22.md](22.md)
  * [23.md](23.md)
  * [24.md](24.md)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































Deleted modules/doctools/tests/fmt/nroff/00.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























Deleted modules/doctools/tests/fmt/nroff/01.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) **Copyright**
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
Argument	::\fIArgument\fR::
Class		::\fBClass\fR::
Command		::\fBCommand\fR::
Comment		::::
Const		::\fBConstant\fR::
Emphasis	::\fIEmphasis\fR::
File		::"\fIFile/Path\fR"::
Function	::\fBFunction\fR::
Method		::\fBMethod\fR::
Namespace	::\fBNamespace\fR::
Option		::\fBOption\fR::
Optional	::?Optional?::
Package		::\fBPackage\fR::
Syscmd		::\fBSystemCommand\fR::
Term		::\fITerm\fR::
Type		::\fBType\fR::
Uri		::\fIUri\fR::
Variable	::\fBVariable\fR::
Widget		::\fBWidget\fR::
.SH COPYRIGHT
.nf
Copyright (c) **Copyright**

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































Deleted modules/doctools/tests/fmt/nroff/02.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. "\&.\&.THE_MODULE\&.\&."
.so man.macros
.BS
.SH NAME
TEST \- \&.\&.THE_TITLE\&.\&.
.SH SYNOPSIS
package require \fBAAA \fR
.sp
package require \fBBBB  VVV\fR
.sp
.BE
.SH DESCRIPTION
.SH "SEE ALSO"
ELSE, OTHER
.SH KEYWORDS
KEYA, KEYZ
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































Deleted modules/doctools/tests/fmt/nroff/03.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.SH AAA
1
.SH BBB
22
.SS BBB\&.CCC
333
.SS BBB\&.DDD
4444
.SH EEE
5555
.PP
At \fBAaA\fR\&.
.PP
At \fB__undefined__\fR\&.
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/nroff/04.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
BEGINNE HIER
.CS


	 Example Block  More Lines

.CE
.PP
.PP
.CS


Inlined Example \\
Next Line

.CE
FERTIG
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted modules/doctools/tests/fmt/nroff/05.

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
89
90
91
92
93
94
95
96
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "BASIC" a 5 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
BASIC \-
.SH SYNOPSIS
a-command
.sp
.BE
.SH DESCRIPTION
OK
.PP
.TP
integer \fIargument-1\fR
verification
.TP
string \fIargument-2\fR (out)
mogrification
.PP
.PP
.TP
\fBcommand-a\fR
explanation
.TP
\fBcommand-b\fR
elucidation
.PP
.PP
.TP
term
definition
.TP
a-command
semantic
.PP
.PP
.IP [1]
A
.IP [2]
B
.sp
C
.sp
D
.PP
.PP
.IP \(bu
1
.IP \(bu
2
.sp
2a
.sp
2b
.PP
.PP
.TP
\fBoption-1\fR
meaning
.TP
\fBoption-2\fR value
elaboration
.PP
.PP
.LP
.nf
.ta 6c
Command-Line Switch:	\fBbackground\fR
Database Name:	\fBBackground\fR
Database Class:	\fBColor\fR

.fi
.IP
candy
.LP
.nf
.ta 6c
Command-Line Switch:	\fBforeground\fR
Database Name:	\fBForeground\fR
Database Class:	\fBColor\fR

.fi
.IP
caramel
.PP
.PP
KO
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































Deleted modules/doctools/tests/fmt/nroff/06.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.IP \(bu
1
.sp
2
.sp
3
.IP \(bu
.RS
.IP [1]
a
.sp
b
.sp
c
.IP [2]
.RS
.TP
foo
snafu
.TP
bar
barf
.TP
roo
gork
.RE
.IP [3]
a
.sp
b
.sp
c
.RE
.IP \(bu
4
.sp
5
.sp
6
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































Deleted modules/doctools/tests/fmt/nroff/07.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.IP \(bu
1
.IP \(bu
2
.RS
.IP [1]
a
.IP [2]
b
.RS
.TP
foo
snafu
.TP
bar
barf
.TP
roo
gork
.RE
.IP
bb
.IP [3]
a
.RE
.IP
22
.IP \(bu
3
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































Deleted modules/doctools/tests/fmt/nroff/08.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) **Copyright**
'\"
.TH "ALL" a 5 \&.MODULE\&. "\&.\&.THE_MODULE\&.\&."
.so man.macros
.BS
.SH NAME
ALL \- \&.\&.THE_TITLE\&.\&.
.SH SYNOPSIS
package require \fBAAA \fR
.sp
package require \fBBBB  VVV\fR
.sp
package require \fBCCC  ?VVV?\fR
.sp
CMDNAME \&.\&.\&.
.sp
CMDNAME \&.\&.\&.
.sp
CMDNAME \&.\&.\&.
.sp
.BE
.SH DESCRIPTION
.TP
\fBNAME\fR
DESCRIPTION ::\fBCommand\fR::
.TP
\fBNAME\fR
DESCRIPTION ::::
.TP
\fBNAME\fR
DESCRIPTION ::\fBConstant\fR::
.PP
.SH API
.TP
TERM
DESCRIPTION ::\fIEmphasis\fR::
.TP
TERM
DESCRIPTION ::"\fIFile/Path\fR"::
.RS
.LP
.nf
.ta 6c
Command-Line Switch:	\fBNAME\fR
Database Name:	\fBDBNAME\fR
Database Class:	\fBCLASS\fR

.fi
.IP
DESCRIPTION \fBNARGLE\fR
.LP
.nf
.ta 6c
Command-Line Switch:	\fBNAME\fR
Database Name:	\fBDBNAME\fR
Database Class:	\fBCLASS\fR

.fi
.IP
DESCRIPTION ::\fBFunction\fR::
.LP
.nf
.ta 6c
Command-Line Switch:	\fBNAME\fR
Database Name:	\fBDBNAME\fR
Database Class:	\fBCLASS\fR

.fi
.IP
DESCRIPTION ::\fBMethod\fR::
.RE
.TP
TERM
DESCRIPTION
.TP
CMDNAME \&.\&.\&.
DESCRIPTION ::\fBNamespace\fR::
.RS
.TP
TYPE \fINAME\fR
DESCRIPTION ::\fIArgument\fR::
.TP
TYPE \fINAME\fR
DESCRIPTION ::\fBOption\fR::
.TP
TYPE \fINAME\fR (MODE)
DESCRIPTION ::?Optional?::
.CS


    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER

.CE
.RE
.TP
CMDNAME \&.\&.\&.
DESCRIPTION ::\fBPackage\fR::
.TP
CMDNAME \&.\&.\&.
DESCRIPTION ::\fBSystemCommand\fR::
.RS
.TP
\fBNAME\fR
DESCRIPTION ::\fITerm\fR::
.TP
\fBNAME\fR
DESCRIPTION ::\fBType\fR::
.TP
\fBNAME\fR ARGUMENT
DESCRIPTION ::\fIUri\fR::
.RE
.PP
.SS NARGLE
.IP [1]
PARAGRAPH ::\fIUriLabel\fR [Uri]::
.IP [2]
PARAGRAPH ::\fBVariable\fR::
.IP [3]
PARAGRAPH ::\fBWidget\fR::
.RS
.IP \(bu
PARAGRAPH ::\fBClass\fR::
.IP \(bu
PARAGRAPH
.IP \(bu
PARAGRAPH
.RE
.PP
.SH "SEE ALSO"
ELSE, OTHER
.SH KEYWORDS
KEYA, KEYZ
.SH COPYRIGHT
.nf
Copyright (c) **Copyright**

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































Deleted modules/doctools/tests/fmt/nroff/09.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
lorem
.CS


1 lorem ipsum dolores

.CE
ipsum
.CS

 2 lorem ipsum dolores
.CE
dolores
.CS


3 lorem ipsum dolores

.CE
lorem
.CS

 4 lorem ipsum dolores

.CE
ipsum
.CS


5 lorem ipsum dolores
.CE
dolores
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































Deleted modules/doctools/tests/fmt/nroff/10.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-itemized" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-itemized \-
.SH DESCRIPTION
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/nroff/11.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-enumerated" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-enumerated \-
.SH DESCRIPTION
lorem ipsum dolores
.IP [1]
lorem ipsum dolores
.IP [2]
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/nroff/12.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-definitions" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-definitions \-
.SH DESCRIPTION
lorem ipsum dolores
.TP
lorem
ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted modules/doctools/tests/fmt/nroff/13.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-itemized-examples" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-itemized-examples \-
.SH DESCRIPTION
lorem ipsum dolores
.IP \(bu
.CS

 A lorem ipsum dolores
.CE
.IP \(bu
lorem ipsum dolores
.CS

 B lorem ipsum dolores
.CE
.IP
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.CS

 C lorem ipsum dolores
.CE
.IP \(bu
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































Deleted modules/doctools/tests/fmt/nroff/14.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-enumerated-examples" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-enumerated-examples \-
.SH DESCRIPTION
lorem ipsum dolores
.IP [1]
.CS

 A1 lorem ipsum dolores
.CE
.IP [2]
lorem ipsum dolores
.CS

 B2 lorem ipsum dolores
.CE
.IP
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.CS

 C3 lorem ipsum dolores
.CE
.IP [4]
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































Deleted modules/doctools/tests/fmt/nroff/15.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-definition-examples" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-definition-examples \-
.SH DESCRIPTION
lorem ipsum dolores
.TP
lorem
.CS

 A1 lorem ipsum dolores
.CE
.TP
lorem
ipsum dolores
.CS

 B2 lorem ipsum dolores
.CE
.IP
lorem ipsum dolores
.TP
lorem
ipsum dolores
.CS

 C3 lorem ipsum dolores
.CE
.TP
lorem
ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































Deleted modules/doctools/tests/fmt/nroff/16.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-itemized-nested" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-itemized-nested \-
.SH DESCRIPTION
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.RS
.IP \(bu
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.RS
.IP \(bu
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































Deleted modules/doctools/tests/fmt/nroff/17.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-enumerated-nested" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-enumerated-nested \-
.SH DESCRIPTION
lorem ipsum dolores
.IP [1]
lorem ipsum dolores
.RS
.IP [1]
lorem ipsum dolores
.IP [2]
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.IP [2]
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.sp
lorem ipsum dolores
.RS
.IP [1]
lorem ipsum dolores
.IP [2]
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































Deleted modules/doctools/tests/fmt/nroff/18.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-definitions-nested" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-definitions-nested \-
.SH DESCRIPTION
lorem ipsum dolores
.TP
lorem
ipsum dolores
.RS
.TP
lorem
ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.RS
.TP
lorem
ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































Deleted modules/doctools/tests/fmt/nroff/19.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-itemized-enumerated" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-itemized-enumerated \-
.SH DESCRIPTION
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.RS
.IP [1]
lorem ipsum dolores
.IP [2]
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.RS
.IP [1]
lorem ipsum dolores
.IP [2]
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































Deleted modules/doctools/tests/fmt/nroff/20.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-enumerated-itemized" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-enumerated-itemized \-
.SH DESCRIPTION
lorem ipsum dolores
.IP [1]
lorem ipsum dolores
.RS
.IP \(bu
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.IP [2]
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.sp
lorem ipsum dolores
.RS
.IP \(bu
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































Deleted modules/doctools/tests/fmt/nroff/21.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-definitions-itemized" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-definitions-itemized \-
.SH DESCRIPTION
lorem ipsum dolores
.TP
lorem
ipsum dolores
.RS
.IP \(bu
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.RS
.IP \(bu
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































Deleted modules/doctools/tests/fmt/nroff/22.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-itemized-definitions" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-itemized-definitions \-
.SH DESCRIPTION
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.RS
.TP
lorem
ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP \(bu
lorem ipsum dolores
.sp
lorem ipsum dolores
.RS
.TP
lorem
ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































Deleted modules/doctools/tests/fmt/nroff/23.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-enumerated-definitions" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-enumerated-definitions \-
.SH DESCRIPTION
lorem ipsum dolores
.IP [1]
lorem ipsum dolores
.RS
.TP
lorem
ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.IP [2]
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.sp
lorem ipsum dolores
.RS
.TP
lorem
ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































Deleted modules/doctools/tests/fmt/nroff/24.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "test-definitions-enumerated" 1 n \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
test-definitions-enumerated \-
.SH DESCRIPTION
lorem ipsum dolores
.TP
lorem
ipsum dolores
.RS
.IP [1]
lorem ipsum dolores
.IP [2]
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.TP
lorem
ipsum dolores
.sp
lorem ipsum dolores
.RS
.IP [1]
lorem ipsum dolores
.IP [2]
lorem ipsum dolores
.sp
lorem ipsum dolores
.IP [3]
lorem ipsum dolores
.sp
lorem ipsum dolores
.sp
lorem ipsum dolores
.RE
.sp
lorem ipsum dolores
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































Deleted modules/doctools/tests/fmt/nroff/25.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.CS


Special markdown __non-special__

.CE
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































Deleted modules/doctools/tests/fmt/nroff/26.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.CS


Example Block  More Lines \\
Ever More
Never

.CE
.PP
\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&. Weiter \&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.
.PP
.CS


Second \\
Continuing Lines \\
Done

.CE
\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&.\&. Vorwaerts \&.\&.\&.\&.\&.\&.\&.\&.\&.\&.
.CS


   \fBcommand\fR    x \\
-- \fBcommand\fR --

.CE
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































Deleted modules/doctools/tests/fmt/nroff/27.

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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" T 0 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
= = == === ===== ======== =============
.CS

[\fBbar\fR \\
  foo]
.CE
= = == === ===== ======== =============
.CS


\fI  many lines
  highlighted
\fR

.CE
= = == === ===== ======== =============
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































Deleted modules/doctools/tests/fmt/nroff/28.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2019 Me
'\" Copyright (c) 2019 Myself
'\" Copyright (c) 2019 And I
'\"
.TH "TEST" z 1\&.1\&.23\&.58132\&.1 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.SH COPYRIGHT
.nf
Copyright (c) 2019 Me
Copyright (c) 2019 Myself
Copyright (c) 2019 And I

.fi
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Deleted modules/doctools/tests/fmt/null/00.

Deleted modules/doctools/tests/fmt/null/01.

Deleted modules/doctools/tests/fmt/null/02.

Deleted modules/doctools/tests/fmt/null/03.

Deleted modules/doctools/tests/fmt/null/04.

Deleted modules/doctools/tests/fmt/null/05.

Deleted modules/doctools/tests/fmt/null/06.

Deleted modules/doctools/tests/fmt/null/07.

Deleted modules/doctools/tests/fmt/null/08.

Deleted modules/doctools/tests/fmt/null/09.

Deleted modules/doctools/tests/fmt/null/10.

Deleted modules/doctools/tests/fmt/null/11.

Deleted modules/doctools/tests/fmt/null/12.

Deleted modules/doctools/tests/fmt/null/13.

Deleted modules/doctools/tests/fmt/null/14.

Deleted modules/doctools/tests/fmt/null/15.

Deleted modules/doctools/tests/fmt/null/16.

Deleted modules/doctools/tests/fmt/null/17.

Deleted modules/doctools/tests/fmt/null/18.

Deleted modules/doctools/tests/fmt/null/19.

Deleted modules/doctools/tests/fmt/null/20.

Deleted modules/doctools/tests/fmt/null/21.

Deleted modules/doctools/tests/fmt/null/22.

Deleted modules/doctools/tests/fmt/null/23.

Deleted modules/doctools/tests/fmt/null/24.

Deleted modules/doctools/tests/fmt/null/25.

Deleted modules/doctools/tests/fmt/null/26.

Deleted modules/doctools/tests/fmt/null/27.

Deleted modules/doctools/tests/fmt/null/28.

Deleted modules/doctools/tests/fmt/syntax/26.

Deleted modules/doctools/tests/fmt/syntax/28.

Deleted modules/doctools/tests/fmt/syntax/e_arg_list.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[arg_def arg-type arg-name]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_body.

1
2
3
4
Text before manpage_begin is not allowed
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_arg_def1.

1
2
3
4
[arg_def arg-type arg-name]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_arg_def2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[arg_def arg-type arg-name]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_arg_def3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[arg_def arg-type arg-name]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_call1.

1
2
3
4
[call .command.]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_call2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[call .command.]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_call3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[call .command.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_cmd_def1.

1
2
3
4
[cmd_def .command.]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_cmd_def2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[cmd_def .command.]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_cmd_def3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[cmd_def .command.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_def1.

1
2
3
4
[def]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_def2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[def]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_def3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[def]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_enum1.

1
2
3
4
[enum]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_enum2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[enum]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_enum3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[enum]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_example1.

1
2
3
4
[example {}]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_example2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[example {}]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_example3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[example {}]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_example_begin1.

1
2
3
4
[example_begin]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_example_begin2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[example_begin]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_example_begin3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[example_begin]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_item1.

1
2
3
4
[item]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_item2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[item]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_item3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[item]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_list_begin1.

1
2
3
4
[list_begin definitions]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_list_begin2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[list_begin definitions]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_list_begin3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[list_begin definitions]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_list_end1.

1
2
3
4
[list_end]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_list_end2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[list_end]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_list_end3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[list_end]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_manpage_end.

1
2
3
4
5
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {example not closed}]
[example_begin]
[manpage_end]
<
<
<
<
<










Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_opt_def1.

1
2
3
4
[opt_def .option.]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_opt_def2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[opt_def .option.]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_opt_def3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[opt_def .option.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_para1.

1
2
3
4
[para]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_para2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[para]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_para3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[para]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_section1.

1
2
3
4
[section foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_section2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[section foo]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_section3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[section foo]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_sectref1.

1
2
3
4
[sectref S]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_sectref2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[sectref S]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_sectref3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[sectref S]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_subsection1.

1
2
3
4
[subsection foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_subsection2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[subsection foo]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_subsection3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad subsection}]
[example_begin]
[subsection foo]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_tkoption_def1.

1
2
3
4
[tkoption_def .option. .dbname. .dbclass.]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_tkoption_def2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[tkoption_def .option. .dbname. .dbclass.]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_bodycmd_tkoption_def3.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[tkoption_def .option. .dbname. .dbclass.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_bulletlist.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[item]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_cmd_list.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[cmd_def .command.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_deflist_call.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin arguments]
[call .command.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_deflist_def.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin options]
[def]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_end_open_example.

1
2
3
4
5
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {example not closed}]
[example_begin]

<
<
<
<
<










Deleted modules/doctools/tests/fmt/syntax/e_end_open_list.

1
2
3
4
5
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[list_begin commands]
[comment {list not closed}]
[manpage_end]
<
<
<
<
<










Deleted modules/doctools/tests/fmt/syntax/e_end_open_mp.

1
2
[manpage_begin ERROR e 2.71828182845904523536]
[comment {manpage not closed}]
<
<




Deleted modules/doctools/tests/fmt/syntax/e_enumlist.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[enum]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_examplecmd1.

1
2
3
4
[example_end]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_examplecmd2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[example_end]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_examplecmd3.

1
2
3
4
5
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_end]
[manpage_end]
<
<
<
<
<










Deleted modules/doctools/tests/fmt/syntax/e_hdrcmd_copyright1.

1
2
3
4
[copyright foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_hdrcmd_copyright2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[copyright foo]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_hdrcmd_description1.

1
2
3
4
[description]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_hdrcmd_description2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_hdrcmd_moddesc1.

1
2
3
4
[moddesc foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_hdrcmd_moddesc2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[moddesc foo]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_hdrcmd_require1.

1
2
3
4
[require foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_hdrcmd_require2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[require foo]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_hdrcmd_titledesc1.

1
2
3
4
[titledesc foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_hdrcmd_titledesc2.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[titledesc foo]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_invalidlist_list_begin.

1
2
3
4
5
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[list_begin bogus]
[list_end]
[manpage_end]
<
<
<
<
<










Deleted modules/doctools/tests/fmt/syntax/e_listcmd_arg_def.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[arg_def arg-type arg-name]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_listcmd_call.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[call .command.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_listcmd_cmd_def.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[cmd_def .command.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_listcmd_def.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[def]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_listcmd_enum.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[enum]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_listcmd_item.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[item]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_listcmd_opt_def.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[opt_def .option.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_listcmd_tkoption_def.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[tkoption_def .option. .dbname. .dbclass.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_mpbegin.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[manpage_begin BOGUS e 2.71828182845904523536]
[description]
[manpage_end]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_arg.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[arg .a.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_class.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[class .c.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_cmd.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[cmd .c.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_comment.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[comment .c]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_const.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[const .c.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_emph.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[emph .t.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_file.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[file .f.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_fun.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[fun .f.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_keywords.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[keywords .kw.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_method.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[method .m.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_namespace.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[namespace .n.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_opt.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[opt .o]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_option.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[option .o.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_package.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[package .p.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_see_also.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[see_also .sa.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_syscmd.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[syscmd .t]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_term.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[term .t.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_type.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[type .t.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_uri.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[uri .u.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_usage.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[usage .c.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_var.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[var .v]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nodonecmd_widget.

1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[widget .w.]
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/e_nolistcmd_section.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[section foo]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_nolistcmd_subsection.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad subsection}]
[list_begin definitions]
[subsection foo]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_nolisthdr_example.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad example before list item}]
[list_begin definitions]
[example {}]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_nolisthdr_example_begin.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad example_begin before list item}]
[list_begin definitions]
[example_begin]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_nolisthdr_list_begin.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad list_begin before list item}]
[list_begin definitions]
[list_begin definitions]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_nolisthdr_para.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad para before list item}]
[list_begin definitions]
[para]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_nolisthdr_sectref.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad sectref S before list item}]
[list_begin definitions]
[sectref S]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_nolisttxt.

1
2
3
4
5
6
7
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[list_begin definitions]
Text between list_begin and first item is not allowed
[def foo]
[list_end]
[manpage_end]
<
<
<
<
<
<
<














Deleted modules/doctools/tests/fmt/syntax/e_opt_list.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[opt_def .option.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/e_tkoption_list.

1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[tkoption_def .option. .dbname. .dbclass.]
[manpage_end]
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/r_arg_list.

1
2
3
Doctools Error in macro at line 5, column 0:
[arg_def arg-type arg-name]
--> (FmtError) Manpage error (arg_list), "arg_def arg-type arg-name" : Command restricted to usage in argument lists.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_body.

1
2
3
4
Doctools Error in plain text at line 1, column 0:
[plain_text {Text before manpag...]
--> (FmtError) Manpage error (body), "plain_text Text before manpage_begin is not allowed
" : Plain text not allowed outside of the body of the manpage.
<
<
<
<








Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_arg_def1.

1
2
3
Doctools Error in macro at line 1, column 0:
[arg_def arg-type arg-name]
--> (FmtError) Manpage error (bodycmd), "arg_def arg-type arg-name" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_arg_def2.

1
2
3
Doctools Error in macro at line 2, column 0:
[arg_def arg-type arg-name]
--> (FmtError) Manpage error (bodycmd), "arg_def arg-type arg-name" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_arg_def3.

1
2
3
Doctools Error in macro at line 5, column 0:
[arg_def arg-type arg-name]
--> (FmtError) Manpage error (bodycmd), "arg_def arg-type arg-name" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_call1.

1
2
3
Doctools Error in macro at line 1, column 0:
[call .command.]
--> (FmtError) Manpage error (bodycmd), "call .command." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_call2.

1
2
3
Doctools Error in macro at line 2, column 0:
[call .command.]
--> (FmtError) Manpage error (bodycmd), "call .command." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_call3.

1
2
3
Doctools Error in macro at line 5, column 0:
[call .command.]
--> (FmtError) Manpage error (bodycmd), "call .command." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_cmd_def1.

1
2
3
Doctools Error in macro at line 1, column 0:
[cmd_def .command.]
--> (FmtError) Manpage error (bodycmd), "cmd_def .command." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_cmd_def2.

1
2
3
Doctools Error in macro at line 2, column 0:
[cmd_def .command.]
--> (FmtError) Manpage error (bodycmd), "cmd_def .command." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_cmd_def3.

1
2
3
Doctools Error in macro at line 5, column 0:
[cmd_def .command.]
--> (FmtError) Manpage error (bodycmd), "cmd_def .command." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_def1.

1
2
3
Doctools Error in macro at line 1, column 0:
[def]
--> (FmtError) Manpage error (bodycmd), "def" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_def2.

1
2
3
Doctools Error in macro at line 2, column 0:
[def]
--> (FmtError) Manpage error (bodycmd), "def" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_def3.

1
2
3
Doctools Error in macro at line 5, column 0:
[def]
--> (FmtError) Manpage error (bodycmd), "def" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_enum1.

1
2
3
Doctools Error in macro at line 1, column 0:
[enum]
--> (FmtError) Manpage error (bodycmd), "enum" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_enum2.

1
2
3
Doctools Error in macro at line 2, column 0:
[enum]
--> (FmtError) Manpage error (bodycmd), "enum" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_enum3.

1
2
3
Doctools Error in macro at line 5, column 0:
[enum]
--> (FmtError) Manpage error (bodycmd), "enum" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_example1.

1
2
3
Doctools Error in macro at line 1, column 0:
[example {}]
--> (FmtError) Manpage error (bodycmd), "example " : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_example2.

1
2
3
Doctools Error in macro at line 2, column 0:
[example {}]
--> (FmtError) Manpage error (bodycmd), "example " : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_example3.

1
2
3
Doctools Error in macro at line 5, column 0:
[example {}]
--> (FmtError) Manpage error (bodycmd), "example " : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_example_begin1.

1
2
3
Doctools Error in macro at line 1, column 0:
[example_begin]
--> (FmtError) Manpage error (bodycmd), "example_begin" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_example_begin2.

1
2
3
Doctools Error in macro at line 2, column 0:
[example_begin]
--> (FmtError) Manpage error (bodycmd), "example_begin" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_example_begin3.

1
2
3
Doctools Error in macro at line 5, column 0:
[example_begin]
--> (FmtError) Manpage error (bodycmd), "example_begin" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_item1.

1
2
3
Doctools Error in macro at line 1, column 0:
[item]
--> (FmtError) Manpage error (bodycmd), "item" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_item2.

1
2
3
Doctools Error in macro at line 2, column 0:
[item]
--> (FmtError) Manpage error (bodycmd), "item" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_item3.

1
2
3
Doctools Error in macro at line 5, column 0:
[item]
--> (FmtError) Manpage error (bodycmd), "item" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_list_begin1.

1
2
3
Doctools Error in macro at line 1, column 0:
[list_begin definitions]
--> (FmtError) Manpage error (bodycmd), "list_begin definitions" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_list_begin2.

1
2
3
Doctools Error in macro at line 2, column 0:
[list_begin definitions]
--> (FmtError) Manpage error (bodycmd), "list_begin definitions" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_list_begin3.

1
2
3
Doctools Error in macro at line 5, column 0:
[list_begin definitions]
--> (FmtError) Manpage error (bodycmd), "list_begin definitions" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_list_end1.

1
2
3
Doctools Error in macro at line 1, column 0:
[list_end]
--> (FmtError) Manpage error (bodycmd), "list_end" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_list_end2.

1
2
3
Doctools Error in macro at line 2, column 0:
[list_end]
--> (FmtError) Manpage error (bodycmd), "list_end" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_list_end3.

1
2
3
Doctools Error in macro at line 5, column 0:
[list_end]
--> (FmtError) Manpage error (bodycmd), "list_end" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_manpage_end.

1
2
3
Doctools Error in macro at line 5, column 0:
[manpage_end]
--> (FmtError) Manpage error (bodycmd), "manpage_end" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_opt_def1.

1
2
3
Doctools Error in macro at line 1, column 0:
[opt_def .option.]
--> (FmtError) Manpage error (bodycmd), "opt_def .option." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_opt_def2.

1
2
3
Doctools Error in macro at line 2, column 0:
[opt_def .option.]
--> (FmtError) Manpage error (bodycmd), "opt_def .option." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_opt_def3.

1
2
3
Doctools Error in macro at line 5, column 0:
[opt_def .option.]
--> (FmtError) Manpage error (bodycmd), "opt_def .option." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_para1.

1
2
3
Doctools Error in macro at line 1, column 0:
[para]
--> (FmtError) Manpage error (bodycmd), "para" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_para2.

1
2
3
Doctools Error in macro at line 2, column 0:
[para]
--> (FmtError) Manpage error (bodycmd), "para" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_para3.

1
2
3
Doctools Error in macro at line 5, column 0:
[para]
--> (FmtError) Manpage error (bodycmd), "para" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_section1.

1
2
3
Doctools Error in macro at line 1, column 0:
[section foo]
--> (FmtError) Manpage error (bodycmd), "section foo" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_section2.

1
2
3
Doctools Error in macro at line 2, column 0:
[section foo]
--> (FmtError) Manpage error (bodycmd), "section foo" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_section3.

1
2
3
Doctools Error in macro at line 5, column 0:
[section foo]
--> (FmtError) Manpage error (bodycmd), "section foo" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_sectref1.

1
2
3
Doctools Error in macro at line 1, column 0:
[sectref S]
--> (FmtError) Manpage error (bodycmd), "sectref S" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_sectref2.

1
2
3
Doctools Error in macro at line 2, column 0:
[sectref S]
--> (FmtError) Manpage error (bodycmd), "sectref S" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_sectref3.

1
2
3
Doctools Error in macro at line 5, column 0:
[sectref S]
--> (FmtError) Manpage error (bodycmd), "sectref S" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_subsection1.

1
2
3
Doctools Error in macro at line 1, column 0:
[subsection foo]
--> (FmtError) Manpage error (bodycmd), "subsection foo" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_subsection2.

1
2
3
Doctools Error in macro at line 2, column 0:
[subsection foo]
--> (FmtError) Manpage error (bodycmd), "subsection foo" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_subsection3.

1
2
3
Doctools Error in macro at line 5, column 0:
[subsection foo]
--> (FmtError) Manpage error (bodycmd), "subsection foo" : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_tkoption_def1.

1
2
3
Doctools Error in macro at line 1, column 0:
[tkoption_def .option. .dbname....]
--> (FmtError) Manpage error (bodycmd), "tkoption_def .option. .dbname. .dbclass." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_tkoption_def2.

1
2
3
Doctools Error in macro at line 2, column 0:
[tkoption_def .option. .dbname....]
--> (FmtError) Manpage error (bodycmd), "tkoption_def .option. .dbname. .dbclass." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bodycmd_tkoption_def3.

1
2
3
Doctools Error in macro at line 5, column 0:
[tkoption_def .option. .dbname....]
--> (FmtError) Manpage error (bodycmd), "tkoption_def .option. .dbname. .dbclass." : Command not allowed outside of the body of the manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_bulletlist.

1
2
3
Doctools Error in macro at line 5, column 0:
[item]
--> (FmtError) Manpage error (bulletlist), "item" : Command restricted to usage in itemized lists.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_cmd_list.

1
2
3
Doctools Error in macro at line 5, column 0:
[cmd_def .command.]
--> (FmtError) Manpage error (cmd_list), "cmd_def .command." : Command restricted to usage in command lists.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_deflist_call.

1
2
3
Doctools Error in macro at line 5, column 0:
[call .command.]
--> (FmtError) Manpage error (deflist), "call .command." : Command restricted to usage in definition lists.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_deflist_def.

1
2
3
Doctools Error in macro at line 5, column 0:
[def]
--> (FmtError) Manpage error (deflist), "def" : Command restricted to usage in definition lists.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_end_open_example.

1
(FmtError) Manpage error (end/open/example), "ck_complete" : End of manpage reached, [example_end] missing.
<


Deleted modules/doctools/tests/fmt/syntax/r_end_open_list.

1
(FmtError) Manpage error (end/open/list), "ck_complete" : End of manpage reached, [list_end] missing.
<


Deleted modules/doctools/tests/fmt/syntax/r_end_open_mp.

1
(FmtError) Manpage error (end/open/mp), "ck_complete" : End of manpage reached, [manpage_end] missing.
<


Deleted modules/doctools/tests/fmt/syntax/r_enumlist.

1
2
3
Doctools Error in macro at line 5, column 0:
[enum]
--> (FmtError) Manpage error (enumlist), "enum" : Command restricted to usage in enumerated lists.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_examplecmd1.

1
2
3
Doctools Error in macro at line 1, column 0:
[example_end]
--> (FmtError) Manpage error (examplecmd), "example_end" : Command allowed only to close example section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_examplecmd2.

1
2
3
Doctools Error in macro at line 2, column 0:
[example_end]
--> (FmtError) Manpage error (examplecmd), "example_end" : Command allowed only to close example section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_examplecmd3.

1
2
3
Doctools Error in macro at line 4, column 0:
[example_end]
--> (FmtError) Manpage error (examplecmd), "example_end" : Command allowed only to close example section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_hdrcmd_copyright1.

1
2
3
Doctools Error in macro at line 1, column 0:
[copyright foo]
--> (FmtError) Manpage error (hdrcmd), "copyright foo" : Command not allowed outside of the header section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_hdrcmd_copyright2.

1
2
3
Doctools Error in macro at line 3, column 0:
[copyright foo]
--> (FmtError) Manpage error (hdrcmd), "copyright foo" : Command not allowed outside of the header section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_hdrcmd_description1.

1
2
3
Doctools Error in macro at line 1, column 0:
[description]
--> (FmtError) Manpage error (hdrcmd), "description" : Command not allowed outside of the header section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_hdrcmd_description2.

1
2
3
Doctools Error in macro at line 3, column 0:
[description]
--> (FmtError) Manpage error (hdrcmd), "description" : Command not allowed outside of the header section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_hdrcmd_moddesc1.

1
2
3
Doctools Error in macro at line 1, column 0:
[moddesc foo]
--> (FmtError) Manpage error (hdrcmd), "moddesc foo" : Command not allowed outside of the header section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_hdrcmd_moddesc2.

1
2
3
Doctools Error in macro at line 3, column 0:
[moddesc foo]
--> (FmtError) Manpage error (hdrcmd), "moddesc foo" : Command not allowed outside of the header section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_hdrcmd_require1.

1
2
3
Doctools Error in macro at line 1, column 0:
[require foo]
--> (FmtError) Manpage error (hdrcmd), "require foo" : Command not allowed outside of the header section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_hdrcmd_require2.

1
2
3
Doctools Error in macro at line 3, column 0:
[require foo]
--> (FmtError) Manpage error (hdrcmd), "require foo" : Command not allowed outside of the header section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_hdrcmd_titledesc1.

1
2
3
Doctools Error in macro at line 1, column 0:
[titledesc foo]
--> (FmtError) Manpage error (hdrcmd), "titledesc foo" : Command not allowed outside of the header section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_hdrcmd_titledesc2.

1
2
3
Doctools Error in macro at line 3, column 0:
[titledesc foo]
--> (FmtError) Manpage error (hdrcmd), "titledesc foo" : Command not allowed outside of the header section.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_invalidlist_list_begin.

1
2
3
Doctools Error in macro at line 3, column 0:
[list_begin bogus]
--> (FmtError) Manpage error (invalidlist), "list_begin bogus" : Invalid list type "bogus".
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_listcmd_arg_def.

1
2
3
Doctools Error in macro at line 5, column 0:
[arg_def arg-type arg-name]
--> (FmtError) Manpage error (listcmd), "arg_def arg-type arg-name" : Command not allowed outside of a list.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_listcmd_call.

1
2
3
Doctools Error in macro at line 5, column 0:
[call .command.]
--> (FmtError) Manpage error (listcmd), "call .command." : Command not allowed outside of a list.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_listcmd_cmd_def.

1
2
3
Doctools Error in macro at line 5, column 0:
[cmd_def .command.]
--> (FmtError) Manpage error (listcmd), "cmd_def .command." : Command not allowed outside of a list.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_listcmd_def.

1
2
3
Doctools Error in macro at line 5, column 0:
[def]
--> (FmtError) Manpage error (listcmd), "def" : Command not allowed outside of a list.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_listcmd_enum.

1
2
3
Doctools Error in macro at line 5, column 0:
[enum]
--> (FmtError) Manpage error (listcmd), "enum" : Command not allowed outside of a list.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_listcmd_item.

1
2
3
Doctools Error in macro at line 5, column 0:
[item]
--> (FmtError) Manpage error (listcmd), "item" : Command not allowed outside of a list.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_listcmd_opt_def.

1
2
3
Doctools Error in macro at line 5, column 0:
[opt_def .option.]
--> (FmtError) Manpage error (listcmd), "opt_def .option." : Command not allowed outside of a list.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_listcmd_tkoption_def.

1
2
3
Doctools Error in macro at line 5, column 0:
[tkoption_def .option. .dbname....]
--> (FmtError) Manpage error (listcmd), "tkoption_def .option. .dbname. .dbclass." : Command not allowed outside of a list.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_mpbegin.

1
2
3
Doctools Error in macro at line 2, column 0:
[manpage_begin BOGUS e 2.718281...]
--> (FmtError) Manpage error (mpbegin), "manpage_begin BOGUS e 2.71828182845904523536" : Command must be first of manpage.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_arg.

1
2
3
Doctools Error in macro at line 4, column 0:
[arg .a.]
--> (FmtError) Manpage error (nodonecmd), "arg .a." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_class.

1
2
3
Doctools Error in macro at line 4, column 0:
[class .c.]
--> (FmtError) Manpage error (nodonecmd), "class .c." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_cmd.

1
2
3
Doctools Error in macro at line 4, column 0:
[cmd .c.]
--> (FmtError) Manpage error (nodonecmd), "cmd .c." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_comment.

1
2
3
Doctools Error in macro at line 4, column 0:
[comment .c]
--> (FmtError) Manpage error (nodonecmd), "comment .c" : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_const.

1
2
3
Doctools Error in macro at line 4, column 0:
[const .c.]
--> (FmtError) Manpage error (nodonecmd), "const .c." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_emph.

1
2
3
Doctools Error in macro at line 4, column 0:
[emph .t.]
--> (FmtError) Manpage error (nodonecmd), "emph .t." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_file.

1
2
3
Doctools Error in macro at line 4, column 0:
[file .f.]
--> (FmtError) Manpage error (nodonecmd), "file .f." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_fun.

1
2
3
Doctools Error in macro at line 4, column 0:
[fun .f.]
--> (FmtError) Manpage error (nodonecmd), "fun .f." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_keywords.

1
2
3
Doctools Error in macro at line 4, column 0:
[keywords .kw.]
--> (FmtError) Manpage error (nodonecmd), "keywords .kw." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_method.

1
2
3
Doctools Error in macro at line 4, column 0:
[method .m.]
--> (FmtError) Manpage error (nodonecmd), "method .m." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_namespace.

1
2
3
Doctools Error in macro at line 4, column 0:
[namespace .n.]
--> (FmtError) Manpage error (nodonecmd), "_namespace .n." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_opt.

1
2
3
Doctools Error in macro at line 4, column 0:
[opt .o]
--> (FmtError) Manpage error (nodonecmd), "opt .o" : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_option.

1
2
3
Doctools Error in macro at line 4, column 0:
[option .o.]
--> (FmtError) Manpage error (nodonecmd), "option .o." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_package.

1
2
3
Doctools Error in macro at line 4, column 0:
[package .p.]
--> (FmtError) Manpage error (nodonecmd), "package .p." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_see_also.

1
2
3
Doctools Error in macro at line 4, column 0:
[see_also .sa.]
--> (FmtError) Manpage error (nodonecmd), "see_also .sa." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_syscmd.

1
2
3
Doctools Error in macro at line 4, column 0:
[syscmd .t]
--> (FmtError) Manpage error (nodonecmd), "syscmd .t" : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_term.

1
2
3
Doctools Error in macro at line 4, column 0:
[term .t.]
--> (FmtError) Manpage error (nodonecmd), "term .t." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_type.

1
2
3
Doctools Error in macro at line 4, column 0:
[type .t.]
--> (FmtError) Manpage error (nodonecmd), "type .t." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_uri.

1
2
3
Doctools Error in macro at line 4, column 0:
[uri .u.]
--> (FmtError) Manpage error (nodonecmd), "uri .u." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_usage.

1
2
3
Doctools Error in macro at line 4, column 0:
[usage .c.]
--> (FmtError) Manpage error (nodonecmd), "usage .c." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_var.

1
2
3
Doctools Error in macro at line 4, column 0:
[var .v]
--> (FmtError) Manpage error (nodonecmd), "var .v" : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nodonecmd_widget.

1
2
3
Doctools Error in macro at line 4, column 0:
[widget .w.]
--> (FmtError) Manpage error (nodonecmd), "widget .w." : Command not allowed after [manpage_end].
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nolistcmd_section.

1
2
3
Doctools Error in macro at line 5, column 0:
[section foo]
--> (FmtError) Manpage error (nolistcmd), "section foo" : Command not allowed inside of a list.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nolistcmd_subsection.

1
2
3
Doctools Error in macro at line 5, column 0:
[subsection foo]
--> (FmtError) Manpage error (nolistcmd), "subsection foo" : Command not allowed inside of a list.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nolisthdr_example.

1
2
3
Doctools Error in macro at line 5, column 0:
[example {}]
--> (FmtError) Manpage error (nolisthdr), "example " : Command not allowed between beginning of a list and its first item.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nolisthdr_example_begin.

1
2
3
Doctools Error in macro at line 5, column 0:
[example_begin]
--> (FmtError) Manpage error (nolisthdr), "example_begin" : Command not allowed between beginning of a list and its first item.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nolisthdr_list_begin.

1
2
3
Doctools Error in macro at line 5, column 0:
[list_begin definitions]
--> (FmtError) Manpage error (nolisthdr), "list_begin definitions" : Command not allowed between beginning of a list and its first item.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nolisthdr_para.

1
2
3
Doctools Error in macro at line 5, column 0:
[para]
--> (FmtError) Manpage error (nolisthdr), "para" : Command not allowed between beginning of a list and its first item.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nolisthdr_sectref.

1
2
3
Doctools Error in macro at line 5, column 0:
[sectref S]
--> (FmtError) Manpage error (nolisthdr), "sectref S" : Command not allowed between beginning of a list and its first item.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_nolisttxt.

1
2
3
4
5
6
Doctools Error in plain text at line 3, column 24:
[plain_text {
Text between list...]
--> (FmtError) Manpage error (nolisttxt), "plain_text 
Text between list_begin and first item is not allowed
" : Plain text not allowed between beginning of a list and its first item.
<
<
<
<
<
<












Deleted modules/doctools/tests/fmt/syntax/r_opt_list.

1
2
3
Doctools Error in macro at line 5, column 0:
[opt_def .option.]
--> (FmtError) Manpage error (opt_list), "opt_def .option." : Command restricted to usage in option lists.
<
<
<






Deleted modules/doctools/tests/fmt/syntax/r_tkoption_list.

1
2
3
Doctools Error in macro at line 5, column 0:
[tkoption_def .option. .dbname....]
--> (FmtError) Manpage error (tkoption_list), "tkoption_def .option. .dbname. .dbclass." : Command restricted to usage in tkoption lists.
<
<
<






Deleted modules/doctools/tests/fmt/text/00.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































Deleted modules/doctools/tests/fmt/text/01.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

Argument ::Argument:: Class ::*Class*:: Command ::Command:: Comment :::: Const
::*Constant*:: Emphasis ::_Emphasis_:: File ::"File/Path":: Function
::*Function*:: Method ::Method:: Namespace ::*Namespace*:: Option ::Option::
Optional ::?Optional?:: Package ::*Package*:: Syscmd ::*SystemCommand*:: Term
::_Term_:: Type ::*Type*:: Uri ::<URL:Uri>:: Variable ::*Variable*:: Widget
::*Widget*::

COPYRIGHT
=========

Copyright (c) **Copyright**
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































Deleted modules/doctools/tests/fmt/text/02.

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

TEST - ..THE_MODULE..
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. "..THE_MODULE.."

NAME
====

TEST - ..THE_TITLE..

SYNOPSIS
========

package require AAA
package require BBB VVV

DESCRIPTION
===========

SEE ALSO
========

ELSE, OTHER

KEYWORDS
========

KEYA, KEYZ

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































Deleted modules/doctools/tests/fmt/text/03.

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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

AaA
===

1

BbB
===

22

BbB.cCc
-------

333

BbB.dDd
-------

4444

EeE
===

5555

At -> AaA.

At -> __undefined__.

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































Deleted modules/doctools/tests/fmt/text/04.

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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

BEGINNE HIER

| Example Block  More Lines

| Inlined Example \
| Next Line

FERTIG

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































Deleted modules/doctools/tests/fmt/text/05.

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

BASIC - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
BASIC(a) 5 .MODULE. ""

NAME
====

BASIC -

SYNOPSIS
========

a-command 

DESCRIPTION
===========

OK

    integer argument-1

        verification

    string argument-2 (out)

        mogrification

    command-a

        explanation

    command-b

        elucidation

    term

        definition

    a-command

        semantic

    [1] A

    [2] B

        C

        D

    *   1

    *   2

        2a

        2b

    option-1

        meaning

    option-2 value

        elaboration

    Command-Line Switch:	background
    Database Name:	*Background*
    Database Class:	*Color*

        candy

    Command-Line Switch:	foreground
    Database Name:	*Foreground*
    Database Class:	*Color*

        caramel

KO

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































Deleted modules/doctools/tests/fmt/text/06.

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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

    *   1

        2

        3

        [1] a

            b

            c

            foo

                snafu

            bar

                barf

            roo

                gork

        [2] a

            b

            c

    *   4

        5

        6

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































Deleted modules/doctools/tests/fmt/text/07.

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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

    *   1

    *   2

        [1] a

        [2] b

            foo

                snafu

            bar

                barf

            roo

                gork

            bb

        [3] a

        22

    *   3

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































Deleted modules/doctools/tests/fmt/text/08.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

ALL - ..THE_MODULE..
Generated from file '.FILE.' by tcllib/doctools with format 'text'
ALL(a) 5 .MODULE. "..THE_MODULE.."

NAME
====

ALL - ..THE_TITLE..

SYNOPSIS
========

package require AAA
package require BBB VVV
package require CCC ?VVV?

CMDNAME ...
CMDNAME ...
CMDNAME ...

DESCRIPTION
===========

    NAME

        DESCRIPTION ::Command::

    NAME

        DESCRIPTION ::::

    NAME

        DESCRIPTION ::*Constant*::

API
===

    TERM

        DESCRIPTION ::_Emphasis_::

    TERM

        DESCRIPTION ::"File/Path"::

        Command-Line Switch:	NAME
        Database Name:	*DBNAME*
        Database Class:	*CLASS*

            DESCRIPTION -> NARGLE

        Command-Line Switch:	NAME
        Database Name:	*DBNAME*
        Database Class:	*CLASS*

            DESCRIPTION ::*Function*::

        Command-Line Switch:	NAME
        Database Name:	*DBNAME*
        Database Class:	*CLASS*

            DESCRIPTION ::Method::

    TERM

        DESCRIPTION

    CMDNAME ...

        DESCRIPTION ::*Namespace*::

        TYPE NAME

            DESCRIPTION ::Argument::

        TYPE NAME

            DESCRIPTION ::Option::

        TYPE NAME (MODE)

            DESCRIPTION ::?Optional?::

            | THE ARGUMENT IS USED IN THIS
            | AND/OR THAT MANNER

    CMDNAME ...

        DESCRIPTION ::*Package*::

    CMDNAME ...

        DESCRIPTION ::*SystemCommand*::

        NAME

            DESCRIPTION ::_Term_::

        NAME

            DESCRIPTION ::*Type*::

        NAME ARGUMENT

            DESCRIPTION ::<URL:Uri>::

NARGLE
------

    [1] PARAGRAPH ::_UriLabel_ <URL:Uri>::

    [2] PARAGRAPH ::*Variable*::

    [3] PARAGRAPH ::*Widget*::

        *   PARAGRAPH ::*Class*::

        *   PARAGRAPH

        *   PARAGRAPH

SEE ALSO
========

ELSE, OTHER

KEYWORDS
========

KEYA, KEYZ

COPYRIGHT
=========

Copyright (c) **Copyright**
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































Deleted modules/doctools/tests/fmt/text/09.

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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

lorem

| 1 lorem ipsum dolores

ipsum

| 2 lorem ipsum dolores

dolores

| 3 lorem ipsum dolores

lorem

| 4 lorem ipsum dolores

ipsum

| 5 lorem ipsum dolores

dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/text/10.

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

test-itemized - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-itemized(1) n .MODULE. ""

NAME
====

test-itemized -

DESCRIPTION
===========

lorem ipsum dolores

    *   lorem ipsum dolores

    *   lorem ipsum dolores

        lorem ipsum dolores

    *   lorem ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































Deleted modules/doctools/tests/fmt/text/11.

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

test-enumerated - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-enumerated(1) n .MODULE. ""

NAME
====

test-enumerated -

DESCRIPTION
===========

lorem ipsum dolores

    [1] lorem ipsum dolores

    [2] lorem ipsum dolores

        lorem ipsum dolores

    [3] lorem ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































Deleted modules/doctools/tests/fmt/text/12.

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

test-definitions - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-definitions(1) n .MODULE. ""

NAME
====

test-definitions -

DESCRIPTION
===========

lorem ipsum dolores

    lorem

        ipsum dolores

    lorem

        ipsum dolores

        lorem ipsum dolores

    lorem

        ipsum dolores

        lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































Deleted modules/doctools/tests/fmt/text/13.

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

test-itemized-examples - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-itemized-examples(1) n .MODULE. ""

NAME
====

test-itemized-examples -

DESCRIPTION
===========

lorem ipsum dolores

    *   | A lorem ipsum dolores

    *   lorem ipsum dolores

        | B lorem ipsum dolores

        lorem ipsum dolores

    *   lorem ipsum dolores

        | C lorem ipsum dolores

    *   lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































Deleted modules/doctools/tests/fmt/text/14.

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

test-enumerated-examples - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-enumerated-examples(1) n .MODULE. ""

NAME
====

test-enumerated-examples -

DESCRIPTION
===========

lorem ipsum dolores

    [1] | A1 lorem ipsum dolores

    [2] lorem ipsum dolores

        | B2 lorem ipsum dolores

        lorem ipsum dolores

    [3] lorem ipsum dolores

        | C3 lorem ipsum dolores

    [4] lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































Deleted modules/doctools/tests/fmt/text/15.

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

test-definition-examples - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-definition-examples(1) n .MODULE. ""

NAME
====

test-definition-examples -

DESCRIPTION
===========

lorem ipsum dolores

    lorem

        | A1 lorem ipsum dolores

    lorem

        ipsum dolores

        | B2 lorem ipsum dolores

        lorem ipsum dolores

    lorem

        ipsum dolores

        | C3 lorem ipsum dolores

    lorem

        ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































Deleted modules/doctools/tests/fmt/text/16.

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

test-itemized-nested - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-itemized-nested(1) n .MODULE. ""

NAME
====

test-itemized-nested -

DESCRIPTION
===========

lorem ipsum dolores

    *   lorem ipsum dolores

        -   lorem ipsum dolores

        -   lorem ipsum dolores

            lorem ipsum dolores

        -   lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

    *   lorem ipsum dolores

        lorem ipsum dolores

    *   lorem ipsum dolores

        lorem ipsum dolores

        -   lorem ipsum dolores

        -   lorem ipsum dolores

            lorem ipsum dolores

        -   lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































Deleted modules/doctools/tests/fmt/text/17.

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

test-enumerated-nested - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-enumerated-nested(1) n .MODULE. ""

NAME
====

test-enumerated-nested -

DESCRIPTION
===========

lorem ipsum dolores

    [1] lorem ipsum dolores

        (1) lorem ipsum dolores

        (2) lorem ipsum dolores

            lorem ipsum dolores

        (3) lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

    [2] lorem ipsum dolores

        lorem ipsum dolores

    [3] lorem ipsum dolores

        lorem ipsum dolores

        (1) lorem ipsum dolores

        (2) lorem ipsum dolores

            lorem ipsum dolores

        (3) lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































Deleted modules/doctools/tests/fmt/text/18.

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

test-definitions-nested - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-definitions-nested(1) n .MODULE. ""

NAME
====

test-definitions-nested -

DESCRIPTION
===========

lorem ipsum dolores

    lorem

        ipsum dolores

        lorem

            ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

    lorem

        ipsum dolores

        lorem ipsum dolores

    lorem

        ipsum dolores

        lorem ipsum dolores

        lorem

            ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































Deleted modules/doctools/tests/fmt/text/19.

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

test-itemized-enumerated - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-itemized-enumerated(1) n .MODULE. ""

NAME
====

test-itemized-enumerated -

DESCRIPTION
===========

lorem ipsum dolores

    *   lorem ipsum dolores

        [1] lorem ipsum dolores

        [2] lorem ipsum dolores

            lorem ipsum dolores

        [3] lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

    *   lorem ipsum dolores

        lorem ipsum dolores

    *   lorem ipsum dolores

        lorem ipsum dolores

        [1] lorem ipsum dolores

        [2] lorem ipsum dolores

            lorem ipsum dolores

        [3] lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































Deleted modules/doctools/tests/fmt/text/20.

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

test-enumerated-itemized - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-enumerated-itemized(1) n .MODULE. ""

NAME
====

test-enumerated-itemized -

DESCRIPTION
===========

lorem ipsum dolores

    [1] lorem ipsum dolores

        *   lorem ipsum dolores

        *   lorem ipsum dolores

            lorem ipsum dolores

        *   lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

    [2] lorem ipsum dolores

        lorem ipsum dolores

    [3] lorem ipsum dolores

        lorem ipsum dolores

        *   lorem ipsum dolores

        *   lorem ipsum dolores

            lorem ipsum dolores

        *   lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































Deleted modules/doctools/tests/fmt/text/21.

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

test-definitions-itemized - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-definitions-itemized(1) n .MODULE. ""

NAME
====

test-definitions-itemized -

DESCRIPTION
===========

lorem ipsum dolores

    lorem

        ipsum dolores

        *   lorem ipsum dolores

        *   lorem ipsum dolores

            lorem ipsum dolores

        *   lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

    lorem

        ipsum dolores

        lorem ipsum dolores

    lorem

        ipsum dolores

        lorem ipsum dolores

        *   lorem ipsum dolores

        *   lorem ipsum dolores

            lorem ipsum dolores

        *   lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































Deleted modules/doctools/tests/fmt/text/22.

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

test-itemized-definitions - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-itemized-definitions(1) n .MODULE. ""

NAME
====

test-itemized-definitions -

DESCRIPTION
===========

lorem ipsum dolores

    *   lorem ipsum dolores

        lorem

            ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

    *   lorem ipsum dolores

        lorem ipsum dolores

    *   lorem ipsum dolores

        lorem ipsum dolores

        lorem

            ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































Deleted modules/doctools/tests/fmt/text/23.

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

test-enumerated-definitions - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-enumerated-definitions(1) n .MODULE. ""

NAME
====

test-enumerated-definitions -

DESCRIPTION
===========

lorem ipsum dolores

    [1] lorem ipsum dolores

        lorem

            ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

    [2] lorem ipsum dolores

        lorem ipsum dolores

    [3] lorem ipsum dolores

        lorem ipsum dolores

        lorem

            ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

        lorem

            ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































Deleted modules/doctools/tests/fmt/text/24.

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

test-definitions-enumerated - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
test-definitions-enumerated(1) n .MODULE. ""

NAME
====

test-definitions-enumerated -

DESCRIPTION
===========

lorem ipsum dolores

    lorem

        ipsum dolores

        [1] lorem ipsum dolores

        [2] lorem ipsum dolores

            lorem ipsum dolores

        [3] lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

    lorem

        ipsum dolores

        lorem ipsum dolores

    lorem

        ipsum dolores

        lorem ipsum dolores

        [1] lorem ipsum dolores

        [2] lorem ipsum dolores

            lorem ipsum dolores

        [3] lorem ipsum dolores

            lorem ipsum dolores

            lorem ipsum dolores

        lorem ipsum dolores

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































Deleted modules/doctools/tests/fmt/text/25.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

| Special markdown __non-special__

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Deleted modules/doctools/tests/fmt/text/26.

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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

| Example Block  More Lines \
| Ever More
| Never

............... Weiter .............

| Second \
| Continuing Lines \
| Done

............... Vorwaerts ..........

| command    x \
| -- command --

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted modules/doctools/tests/fmt/text/27.

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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(T) 0 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

= = == === ===== ======== =============

| [bar \
|   foo]

= = == === ===== ======== =============

| _many lines_
| _highlighted_

= = == === ===== ======== =============

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































Deleted modules/doctools/tests/fmt/text/28.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 1.1.23.58132.1 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

COPYRIGHT
=========

Copyright (c) 2019 Me
Copyright (c) 2019 Myself
Copyright (c) 2019 And I
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Deleted modules/doctools/tests/fmt/tmml/00.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Deleted modules/doctools/tests/fmt/tmml/01.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) **Copyright**'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>



<section id='section1'>
<title>DESCRIPTION</title>
Argument	::<m>Argument</m>::
Class		::<class>Class</class>::
Command		::<cmd>Command</cmd>::
Comment		::::
Const		::<l>Constant</l>::
Emphasis	::<emph>Emphasis</emph>::
File		::<file>File/Path</file>::
Function	::<fun>Function</fun>::
Method		::<method>Method</method>::
Namespace	::<term>Namespace</term>::
Option		::<option>Option</option>::
Optional	::<o>Optional</o>::
Package		::<package>Package</package>::
Syscmd		::<syscmd>SystemCommand</syscmd>::
Term		::<term>Term</term>::
Type		::<type>Type</type>::
Uri		::<url>Uri</url>::
Variable	::<variable>Variable</variable>::
Widget		::<widget>Widget</widget>::
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/tmml/02.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc>..THE_TITLE..</desc>

</namesection>







<synopsis>
<syntax>
package require <package>AAA</package> 
package require <package>BBB</package> VVV
</syntax>
</synopsis>
<section id='section1'>
<title>DESCRIPTION</title>
</section>
<seealso>
<ref>OTHER</ref>
<ref>ELSE</ref>
</seealso>
<keywords>
<keyword>KEYA</keyword>
<keyword>KEYZ</keyword>
</keywords>

</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































Deleted modules/doctools/tests/fmt/tmml/03.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
</section>
<section id='section2'>
<title>AAA</title>
1
</section>
<section id='section3'>
<title>BBB</title>
22

<subsection id='subsection1'>
<title>BBB.CCC</title>
333
</subsection>
<subsection id='subsection2'>
<title>BBB.DDD</title>
4444
</subsection>
</section>
<section id='section4'>
<title>EEE</title>
5555


<p>
At <ref refid='section2'>AaA</ref>.
</p>
<p>
At <emph>__undefined__</emph>.
</p>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































Deleted modules/doctools/tests/fmt/tmml/04.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
BEGINNE HIER

<example>
	 Example Block  More Lines

</example>

<p>
</p>
<p>
</p>
<example>
Inlined Example \
Next Line

</example>
FERTIG
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































Deleted modules/doctools/tests/fmt/tmml/05.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='BASIC' version='5' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>BASIC</name>
<desc></desc>

</namesection>

<synopsis>
<syntax>
a-command 
</syntax>
</synopsis>
<section id='section1'>
<title>DESCRIPTION</title>
OK

<p>
</p>
<arglist>

<argdef>
<argtype>integer</argtype>
<name>argument-1</name>

<desc>
verification
</desc>
</argdef>
<argdef>
<argtype>string</argtype>
<name>argument-2</name>
<argmode>out</argmode>
<desc> mogrification
</desc>
</argdef>

</arglist>

<p>
</p>
<commandlist>

<commanddef>
<command>command-a</command>
<desc> explanation
</desc>
</commanddef>
<commanddef>
<command>command-b</command>
<desc>
elucidation
</desc>
</commanddef>

</commandlist>

<p>
</p>
<dl>

<dle>
<dt>term</dt>
<dd> definition
</dd>
</dle>
<dle>
<dt>a-command </dt>
<dd>
semantic
</dd>
</dle>

</dl>

<p>
</p>
<ol>

<li>
A
</li>
<li> B
<br/>
C
<br/>
D
</li>

</ol>

<p>
</p>
<ul>

<li>
1
</li>
<li> 2
<br/>
2a
<br/>
2b
</li>

</ul>

<p>
</p>
<optlist>

<optdef>
<optname>option-1</optname>

<desc> meaning
</desc>
</optdef>
<optdef>
<optname>option-2</optname>
<optarg>value</optarg>
<desc>
elaboration
</desc>
</optdef>

</optlist>

<p>
</p>
<optionlist>

<optiondef>
<name>background</name>
<dbname>Background</dbname>
<dbclass>Color</dbclass>
<desc> candy
</desc>
</optiondef>
<optiondef>
<name>foreground</name>
<dbname>Foreground</dbname>
<dbclass>Color</dbclass>
<desc>
caramel
</desc>
</optiondef>

</optionlist>

<p>
KO

</p>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































Deleted modules/doctools/tests/fmt/tmml/06.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>


<ul>

<li> 1 <br/> 2 <br/> 3
</li>
<li>

<ol>

<li> a <br/> b <br/> c
</li>
<li>

<dl>

<dle>
<dt>foo</dt>
<dd> snafu
</dd>
</dle>
<dle>
<dt>bar</dt>
<dd> barf
</dd>
</dle>
<dle>
<dt>roo</dt>
<dd> gork
</dd>
</dle>

</dl>
</li>
<li> a <br/> b <br/> c
</li>

</ol>
</li>
<li> 4 <br/> 5 <br/> 6
</li>

</ul>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































Deleted modules/doctools/tests/fmt/tmml/07.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>


<ul>

<li> 1
</li>
<li> 2

<ol>

<li> a
</li>
<li> b

<dl>

<dle>
<dt>foo</dt>
<dd> snafu
</dd>
</dle>
<dle>
<dt>bar</dt>
<dd> barf
</dd>
</dle>
<dle>
<dt>roo</dt>
<dd> gork
</dd>
</dle>

</dl>
bb
</li>
<li> a
</li>

</ol>
22
</li>
<li> 3
</li>

</ul>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































Deleted modules/doctools/tests/fmt/tmml/08.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='ALL' version='5' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) **Copyright**'/>
</head>
<namesection>
<name>ALL</name>
<desc>..THE_TITLE..</desc>

</namesection>







<synopsis>
<syntax>
package require <package>AAA</package> 
package require <package>BBB</package> VVV
package require <package>CCC</package> <o>VVV</o>
CMDNAME ...
CMDNAME ...
CMDNAME ...
</syntax>
</synopsis>
<section id='section1'>
<title>DESCRIPTION</title>

<commandlist>

<commanddef>
<command>NAME</command>
<desc> DESCRIPTION ::<cmd>Command</cmd>::
</desc>
</commanddef>
<commanddef>
<command>NAME</command>
<desc> DESCRIPTION ::::
</desc>
</commanddef>
<commanddef>
<command>NAME</command>
<desc> DESCRIPTION ::<l>Constant</l>::
</desc>
</commanddef>

</commandlist>
</section>
<section id='section2'>
<title>API</title>

<dl>

<dle>
<dt>TERM</dt>
<dd> DESCRIPTION ::<emph>Emphasis</emph>::
</dd>
</dle>
<dle>
<dt>TERM</dt>
<dd> DESCRIPTION ::<file>File/Path</file>::

<optionlist>

<optiondef>
<name>NAME</name>
<dbname>DBNAME</dbname>
<dbclass>CLASS</dbclass>
<desc> DESCRIPTION <ref refid='subsection1'>NARGLE</ref>
</desc>
</optiondef>
<optiondef>
<name>NAME</name>
<dbname>DBNAME</dbname>
<dbclass>CLASS</dbclass>
<desc> DESCRIPTION ::<fun>Function</fun>::
</desc>
</optiondef>
<optiondef>
<name>NAME</name>
<dbname>DBNAME</dbname>
<dbclass>CLASS</dbclass>
<desc> DESCRIPTION ::<method>Method</method>::
</desc>
</optiondef>

</optionlist>
</dd>
</dle>
<dle>
<dt>TERM</dt>
<dd> DESCRIPTION
</dd>
</dle>
<dle>
<dt>CMDNAME ...</dt>
<dd> DESCRIPTION ::<term>Namespace</term>::

<arglist>

<argdef>
<argtype>TYPE</argtype>
<name>NAME</name>

<desc> DESCRIPTION ::<m>Argument</m>::
</desc>
</argdef>
<argdef>
<argtype>TYPE</argtype>
<name>NAME</name>

<desc> DESCRIPTION ::<option>Option</option>::
</desc>
</argdef>
<argdef>
<argtype>TYPE</argtype>
<name>NAME</name>
<argmode>MODE</argmode>
<desc> DESCRIPTION ::<o>Optional</o>::

<example>
    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER

</example>
</desc>
</argdef>

</arglist>
</dd>
</dle>
<dle>
<dt>CMDNAME ...</dt>
<dd> DESCRIPTION ::<package>Package</package>::
</dd>
</dle>
<dle>
<dt>CMDNAME ...</dt>
<dd> DESCRIPTION ::<syscmd>SystemCommand</syscmd>::

<optlist>

<optdef>
<optname>NAME</optname>

<desc> DESCRIPTION ::<term>Term</term>::
</desc>
</optdef>
<optdef>
<optname>NAME</optname>

<desc> DESCRIPTION ::<type>Type</type>::
</desc>
</optdef>
<optdef>
<optname>NAME</optname>
<optarg>ARGUMENT</optarg>
<desc> DESCRIPTION ::<url>Uri</url>::
</desc>
</optdef>

</optlist>
</dd>
</dle>

</dl>

<subsection id='subsection1'>
<title>NARGLE</title>
</subsection>
<ol>

<li> PARAGRAPH ::<url>Uri</url>::
</li>
<li> PARAGRAPH ::<variable>Variable</variable>::
</li>
<li> PARAGRAPH ::<widget>Widget</widget>::

<ul>

<li> PARAGRAPH ::<class>Class</class>::
</li>
<li> PARAGRAPH
</li>
<li> PARAGRAPH
</li>

</ul>
</li>

</ol>


</section>
<seealso>
<ref>OTHER</ref>
<ref>ELSE</ref>
</seealso>
<keywords>
<keyword>KEYA</keyword>
<keyword>KEYZ</keyword>
</keywords>

</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































Deleted modules/doctools/tests/fmt/tmml/09.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem

<example>
1 lorem ipsum dolores

</example>
ipsum

<example> 2 lorem ipsum dolores 
</example>
dolores

<example>
3 lorem ipsum dolores

</example>
lorem

<example> 4 lorem ipsum dolores

</example>
ipsum

<example>
5 lorem ipsum dolores 
</example>
dolores
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































Deleted modules/doctools/tests/fmt/tmml/10.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-itemized' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-itemized</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<ul>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ul>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































Deleted modules/doctools/tests/fmt/tmml/11.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-enumerated' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-enumerated</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<ol>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ol>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































Deleted modules/doctools/tests/fmt/tmml/12.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-definitions' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-definitions</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd> ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>

</dl>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































Deleted modules/doctools/tests/fmt/tmml/13.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-itemized-examples' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-itemized-examples</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<ul>

<li>

<example> A lorem ipsum dolores 
</example>
</li>
<li> lorem ipsum dolores

<example> B lorem ipsum dolores 
</example>
lorem ipsum dolores
</li>
<li> lorem ipsum dolores

<example> C lorem ipsum dolores 
</example>
</li>
<li> lorem ipsum dolores
</li>

</ul>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































Deleted modules/doctools/tests/fmt/tmml/14.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-enumerated-examples' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-enumerated-examples</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<ol>

<li>

<example> A1 lorem ipsum dolores 
</example>
</li>
<li> lorem ipsum dolores

<example> B2 lorem ipsum dolores 
</example>
lorem ipsum dolores
</li>
<li> lorem ipsum dolores

<example> C3 lorem ipsum dolores 
</example>
</li>
<li> lorem ipsum dolores
</li>

</ol>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































Deleted modules/doctools/tests/fmt/tmml/15.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-definition-examples' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-definition-examples</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd>

<example> A1 lorem ipsum dolores 
</example>
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores

<example> B2 lorem ipsum dolores 
</example>
lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores

<example> C3 lorem ipsum dolores 
</example>
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
</dd>
</dle>

</dl>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































Deleted modules/doctools/tests/fmt/tmml/16.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-itemized-nested' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-itemized-nested</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<ul>

<li> lorem ipsum dolores

<ul>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ul>
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores

<ul>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ul>
<br/> lorem ipsum dolores
</li>

</ul>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































Deleted modules/doctools/tests/fmt/tmml/17.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-enumerated-nested' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-enumerated-nested</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<ol>

<li> lorem ipsum dolores

<ol>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ol>
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores

<ol>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ol>
<br/> lorem ipsum dolores
</li>

</ol>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































Deleted modules/doctools/tests/fmt/tmml/18.

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
89
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-definitions-nested' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-definitions-nested</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd> ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd> ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>

</dl>
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd> ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>

</dl>
<br/> lorem ipsum dolores
</dd>
</dle>

</dl>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































Deleted modules/doctools/tests/fmt/tmml/19.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-itemized-enumerated' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-itemized-enumerated</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<ul>

<li> lorem ipsum dolores

<ol>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ol>
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores

<ol>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ol>
<br/> lorem ipsum dolores
</li>

</ul>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































Deleted modules/doctools/tests/fmt/tmml/20.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-enumerated-itemized' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-enumerated-itemized</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<ol>

<li> lorem ipsum dolores

<ul>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ul>
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores

<ul>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ul>
<br/> lorem ipsum dolores
</li>

</ol>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































Deleted modules/doctools/tests/fmt/tmml/21.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-definitions-itemized' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-definitions-itemized</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd> ipsum dolores

<ul>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ul>
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores

<ul>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ul>
<br/> lorem ipsum dolores
</dd>
</dle>

</dl>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































Deleted modules/doctools/tests/fmt/tmml/22.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-itemized-definitions' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-itemized-definitions</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<ul>

<li> lorem ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd> ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>

</dl>
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd> ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>

</dl>
<br/> lorem ipsum dolores
</li>

</ul>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































Deleted modules/doctools/tests/fmt/tmml/23.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-enumerated-definitions' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-enumerated-definitions</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<ol>

<li> lorem ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd> ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>

</dl>
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd> ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>

</dl>
<br/> lorem ipsum dolores
</li>

</ol>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































Deleted modules/doctools/tests/fmt/tmml/24.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='test-definitions-enumerated' version='n' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>test-definitions-enumerated</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
lorem ipsum dolores

<dl>

<dle>
<dt>lorem</dt>
<dd> ipsum dolores

<ol>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ol>
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores
</dd>
</dle>
<dle>
<dt>lorem</dt>
<dd> ipsum dolores
<br/> lorem ipsum dolores

<ol>

<li> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>
<li> lorem ipsum dolores
<br/> lorem ipsum dolores
<br/> lorem ipsum dolores
</li>

</ol>
<br/> lorem ipsum dolores
</dd>
</dle>

</dl>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































Deleted modules/doctools/tests/fmt/tmml/25.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>

<example>
Special markdown __non-special__

</example>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































Deleted modules/doctools/tests/fmt/tmml/26.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>

<example>
Example Block  More Lines \
Ever More
Never

</example>

<p>
............... Weiter .............
</p>
<p>
</p>
<example>
Second \
Continuing Lines \
Done

</example>
............... Vorwaerts ..........

<example>
   <cmd>command</cmd>    x \
-- <cmd>command</cmd> --

</example>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































Deleted modules/doctools/tests/fmt/tmml/27.

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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='0' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
= = == === ===== ======== =============

<example>[<cmd>bar</cmd> \
  foo]
</example>
= = == === ===== ======== =============

<example>
<emph>  many lines
  highlighted
</emph>

</example>
= = == === ===== ======== =============
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































Deleted modules/doctools/tests/fmt/tmml/28.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='1.1.23.58132.1' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) 2019 Me'/>
<info key='copyright' value='Copyright (c) 2019 Myself'/>
<info key='copyright' value='Copyright (c) 2019 And I'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>





<section id='section1'>
<title>DESCRIPTION</title>
</section>



</manpage>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































Deleted modules/doctools/tests/fmt/wiki/00.

1
2
3
4
5
6
7
8
9
10
11
12
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**



**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
























Deleted modules/doctools/tests/fmt/wiki/01.

1
2
3
4
5
6
7
8
9
10
11
12
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**

Argument ::''Argument'':: Class ::'''Class''':: Command ::'''Command''':: Comment :::: Const ::'''Constant''':: Emphasis ::''Emphasis'':: File ::"''File/Path''":: Function ::'''Function''':: Method ::'''Method''':: Namespace ::'''Namespace''':: Option ::'''Option''':: Optional ::?Optional?:: Package ::'''Package''':: Syscmd ::'''SystemCommand''':: Term ::''Term'':: Type ::'''Type''':: Uri ::Uri:: Variable ::'''Variable''':: Widget ::'''Widget'''::

**COPYRIGHT**

 Copyright (c) **Copyright**
<
<
<
<
<
<
<
<
<
<
<
<
























Deleted modules/doctools/tests/fmt/wiki/02.

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
'''TEST 3.14.15.926''' '''.MODULE.''' ''..THE_MODULE..''

..THE_TITLE..


**SYNOPSIS**


package require '''AAA'''

package require '''BBB VVV'''




**DESCRIPTION**



**SEE ALSO**


ELSE, OTHER


**KEYWORDS**


KEYA, KEYZ


**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































Deleted modules/doctools/tests/fmt/wiki/03.

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
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**



**AaA**

1

**BbB**

22

***BbB.cCc***

333

***BbB.dDd***

4444

**EeE**

5555
At '''AaA'''.
At '''__undefined__'''.

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































Deleted modules/doctools/tests/fmt/wiki/04.

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
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**

BEGINNE HIER
======

	 Example Block  More Lines

======



======

Inlined Example \
Next Line

======
FERTIG

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































Deleted modules/doctools/tests/fmt/wiki/05.

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
'''BASIC 5''' '''.MODULE.'''




**SYNOPSIS**


   * a-command




**DESCRIPTION**

OK


+++
''argument-1'' integer    verification
''argument-2'' string (out)    mogrification
+++




   '''command-a''':   explanation 

   '''command-b''':   elucidation  


   term:    definition 

   a-command :    semantic  


   1.  A

   1.  B
C
D


   *  1

   *  2
2a
2b


   '''option-1''':    meaning 

   '''option-2''' value:    elaboration  


Command-Line Switch:	'''background'''
Database Name:	'''Background'''
Database Class:	'''Color'''
   *  candy

Command-Line Switch:	'''foreground'''
Database Name:	'''Foreground'''
Database Class:	'''Color'''
   *  caramel
KO

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































Deleted modules/doctools/tests/fmt/wiki/06.

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
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**



   *  1
2
3

   *

   1.  a
b
c

   1.

   foo:    snafu 

   bar:    barf 

   roo:    gork  

   1.  a
b
c

   *  4
5
6

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































Deleted modules/doctools/tests/fmt/wiki/07.

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
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**



   *  1

   *  2

   1.  a

   1.  b

   foo:    snafu 

   bar:    barf 

   roo:    gork  bb 

   1.  a  22

   *  3

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































Deleted modules/doctools/tests/fmt/wiki/08.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
'''ALL 5''' '''.MODULE.''' ''..THE_MODULE..''

..THE_TITLE..


**SYNOPSIS**


package require '''AAA'''

package require '''BBB VVV'''

package require '''CCC ?VVV?'''

   * CMDNAME ...

   * CMDNAME ...

   * CMDNAME ...




**DESCRIPTION**



   '''NAME''':   DESCRIPTION ::'''Command''':: 

   '''NAME''':   DESCRIPTION :::: 

   '''NAME''':   DESCRIPTION ::'''Constant'''::  

**API**



   TERM:    DESCRIPTION ::''Emphasis'':: 

   TERM:    DESCRIPTION ::"''File/Path''"::  

Command-Line Switch:	'''NAME'''
Database Name:	'''DBNAME'''
Database Class:	'''CLASS'''
   *  DESCRIPTION '''NARGLE'''

Command-Line Switch:	'''NAME'''
Database Name:	'''DBNAME'''
Database Class:	'''CLASS'''
   *  DESCRIPTION ::'''Function'''::

Command-Line Switch:	'''NAME'''
Database Name:	'''DBNAME'''
Database Class:	'''CLASS'''
   *  DESCRIPTION ::'''Method'''::

   TERM:    DESCRIPTION 

   CMDNAME ...:    DESCRIPTION ::'''Namespace''':: 

+++
''NAME'' TYPE    DESCRIPTION ::''Argument''::
''NAME'' TYPE    DESCRIPTION ::'''Option'''::
''NAME'' TYPE (MODE)    DESCRIPTION ::?Optional?::
======

    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER

======

+++



   CMDNAME ...:    DESCRIPTION ::'''Package''':: 

   CMDNAME ...:    DESCRIPTION ::'''SystemCommand'''::  

   '''NAME''':    DESCRIPTION ::''Term'':: 

   '''NAME''':    DESCRIPTION ::'''Type''':: 

   '''NAME''' ARGUMENT:    DESCRIPTION ::Uri::   

***NARGLE***



   1.  PARAGRAPH ::Uri%|%UriLabel%|%::

   1.  PARAGRAPH ::'''Variable'''::

   1.  PARAGRAPH ::'''Widget'''::

   *  PARAGRAPH ::'''Class'''::

   *  PARAGRAPH

   *  PARAGRAPH

**SEE ALSO**


ELSE, OTHER


**KEYWORDS**


KEYA, KEYZ


**COPYRIGHT**

 Copyright (c) **Copyright**
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































Deleted modules/doctools/tests/fmt/wiki/09.

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
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**

lorem
======

1 lorem ipsum dolores

======
ipsum
======
 2 lorem ipsum dolores 
======
dolores
======

3 lorem ipsum dolores

======
lorem
======
 4 lorem ipsum dolores

======
ipsum
======

5 lorem ipsum dolores 
======
dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































Deleted modules/doctools/tests/fmt/wiki/10.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'''test-itemized n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   *  lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































Deleted modules/doctools/tests/fmt/wiki/11.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'''test-enumerated n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   1.  lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































Deleted modules/doctools/tests/fmt/wiki/12.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'''test-definitions n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   lorem:    ipsum dolores 

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































Deleted modules/doctools/tests/fmt/wiki/13.

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
'''test-itemized-examples n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   *
======
 A lorem ipsum dolores 
======


   *  lorem ipsum dolores
======
 B lorem ipsum dolores 
======
lorem ipsum dolores

   *  lorem ipsum dolores
======
 C lorem ipsum dolores 
======


   *  lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted modules/doctools/tests/fmt/wiki/14.

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
'''test-enumerated-examples n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   1.
======
 A1 lorem ipsum dolores 
======


   1.  lorem ipsum dolores
======
 B2 lorem ipsum dolores 
======
lorem ipsum dolores

   1.  lorem ipsum dolores
======
 C3 lorem ipsum dolores 
======


   1.  lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted modules/doctools/tests/fmt/wiki/15.

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
'''test-definition-examples n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   lorem:    
======
 A1 lorem ipsum dolores 
======


   lorem:    ipsum dolores 
======
 B2 lorem ipsum dolores 
======
lorem ipsum dolores

   lorem:    ipsum dolores 
======
 C3 lorem ipsum dolores 
======


   lorem:    ipsum dolores  

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted modules/doctools/tests/fmt/wiki/16.

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
'''test-itemized-nested n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   *  lorem ipsum dolores

   *  lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/wiki/17.

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
'''test-enumerated-nested n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   1.  lorem ipsum dolores

   1.  lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/wiki/18.

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
'''test-definitions-nested n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   lorem:    ipsum dolores  

   lorem:    ipsum dolores 

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/wiki/19.

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
'''test-itemized-enumerated n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   *  lorem ipsum dolores

   1.  lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/wiki/20.

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
'''test-enumerated-itemized n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   1.  lorem ipsum dolores

   *  lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/wiki/21.

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
'''test-definitions-itemized n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   lorem:    ipsum dolores  

   *  lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores

   *  lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/wiki/22.

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
'''test-itemized-definitions n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   *  lorem ipsum dolores

   lorem:    ipsum dolores 

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   *  lorem ipsum dolores
lorem ipsum dolores

   lorem:    ipsum dolores 

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/wiki/23.

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
'''test-enumerated-definitions n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   1.  lorem ipsum dolores

   lorem:    ipsum dolores 

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   lorem:    ipsum dolores 

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/wiki/24.

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
'''test-definitions-enumerated n''' '''.MODULE.'''




**DESCRIPTION**

lorem ipsum dolores

   lorem:    ipsum dolores  

   1.  lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores

   lorem:    ipsum dolores 
lorem ipsum dolores

   1.  lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores

   1.  lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores
lorem ipsum dolores

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/doctools/tests/fmt/wiki/25.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**


======

Special markdown __non-special__

======


**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































Deleted modules/doctools/tests/fmt/wiki/26.

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
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**


======

Example Block  More Lines \
Ever More
Never

======

............... Weiter .............

======

Second \
Continuing Lines \
Done

======
............... Vorwaerts ..........
======

   '''command'''    x \
-- '''command''' --

======


**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































Deleted modules/doctools/tests/fmt/wiki/27.

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
'''TEST 0''' '''.MODULE.'''




**DESCRIPTION**

= = == === ===== ======== =============
======
['''bar''' \
  foo]
======
= = == === ===== ======== =============
======

''  many lines
  highlighted
''

======
= = == === ===== ======== =============

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































Deleted modules/doctools/tests/fmt/wiki/28.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
'''TEST 1.1.23.58132.1''' '''.MODULE.'''




**DESCRIPTION**



**COPYRIGHT**

 Copyright (c) 2019 Me
 Copyright (c) 2019 Myself
 Copyright (c) 2019 And I
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Added modules/doctools/tests/html/00.











































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; .COPYRIGHT.
   -->
<! -- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>

Added modules/doctools/tests/html/01.

















































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; **Copyright**
   -->
<! -- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>Argument	::<i class="arg">Argument</i>::
Class		::<b class="class">Class</b>::
Command		::<b class="cmd">Command</b>::
Comment		::::
Const		::<b class="const">Constant</b>::
Emphasis	::<em>Emphasis</em>::
File		::&quot;<b class="file">File/Path</b>&quot;::
Function	::<b class="function">Function</b>::
Method		::<b class="method">Method</b>::
Namespace	::<b class="namespace">Namespace</b>::
Option		::<b class="option">Option</b>::
Optional	::<span class="opt">?Optional?</span>::
Package		::<b class="package">Package</b>::
Syscmd		::<b class="syscmd">SystemCommand</b>::
Term		::<i class="term">Term</i>::
Type		::<b class="type">Type</b>::
Uri		::<a href="Uri">Uri</a>::
Variable	::<b class="variable">Variable</b>::
Widget		::<b class="widget">Widget</b>::</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; **Copyright**</p>
</div>
</div></body></html>

Added modules/doctools/tests/html/02.













































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<html><head>
<title>TEST - ..THE_MODULE..</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; .COPYRIGHT.
   -->
<! -- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;..THE_MODULE..&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST - ..THE_TITLE..</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">AAA</b></li>
<li>package require <b class="pkgname">BBB VVV</b></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>ELSE, OTHER</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p>KEYA, KEYZ</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>

Added modules/doctools/tests/html/03.





























































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; .COPYRIGHT.
   -->
<! -- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">AaA</a></li>
<li class="doctools_section"><a href="#section3">BbB</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">BbB.cCc</a></li>
<li class="doctools_subsection"><a href="#subsection2">BbB.dDd</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#section4">EeE</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">AaA</a></h2>
<p>1</p>
</div>
<div id="section3" class="doctools_section"><h2><a name="section3">BbB</a></h2>
<p>22</p>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">BbB.cCc</a></h3>
<p>333</p>
</div>
<div id="subsection2" class="doctools_subsection"><h3><a name="subsection2">BbB.dDd</a></h3>
<p>4444</p>
</div>
</div>
<div id="section4" class="doctools_section"><h2><a name="section4">EeE</a></h2>
<p>5555</p>
<p>At <span class="sectref"><a href="#section2">AaA</a></span>.</p>
<p>At <b class="sectref">__undefined__</b>.</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>

Added modules/doctools/tests/html/04.





























































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; .COPYRIGHT.
   -->
<! -- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>BEGINNE HIER</p>
<pre class="doctools_example">
	 Example Block  More Lines
</pre>
<pre class="doctools_example">
Inlined Example \
Next Line
</pre>
<p>FERTIG</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>

Added modules/doctools/tests/html/05.

































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

<html><head>
<title>BASIC - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; .COPYRIGHT.
   -->
<! -- BASIC.a
   -->
<body><div class="doctools">
<h1 class="doctools_title">BASIC(a) 5 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>BASIC -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_syntax">
<li><a href="#1">a-command</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>OK</p>
<dl class="doctools_arguments">
<dt>integer <i class="arg">argument-1</i></dt>
<dd><p>verification</p></dd>
<dt>string <i class="arg">argument-2</i> (out)</dt>
<dd><p>mogrification</p></dd>
</dl>
<dl class="doctools_commands">
<dt><b class="cmd">command-a</b></dt>
<dd><p>explanation</p></dd>
<dt><b class="cmd">command-b</b></dt>
<dd><p>elucidation</p></dd>
</dl>
<dl class="doctools_definitions">
<dt>term</dt>
<dd><p>definition</p></dd>
<dt><a name="1">a-command</a></dt>
<dd><p>semantic</p></dd>
</dl>
<ol class="doctools_enumerated">
<li><p>A</p></li>
<li><p>B</p>
<p>C</p>
<p>D</p></li>
</ol>
<ul class="doctools_itemized">
<li><p>1</p></li>
<li><p>2</p>
<p>2a</p>
<p>2b</p></li>
</ul>
<dl class="doctools_options">
<dt><b class="option">option-1</b></dt>
<dd><p>meaning</p></dd>
<dt><b class="option">option-2</b> value</dt>
<dd><p>elaboration</p></dd>
</dl>
<dl class="doctools_tkoptions">
<dt>Command-Line Switch:	<b class="option">background</b><br>
Database Name:	<b class="optdbname">Background</b><br>
Database Class:	<b class="optdbclass">Color</b><br>
</dt>
<dd><p>candy</p></dd>
<dt>Command-Line Switch:	<b class="option">foreground</b><br>
Database Name:	<b class="optdbname">Foreground</b><br>
Database Class:	<b class="optdbclass">Color</b><br>
</dt>
<dd><p>caramel</p></dd>
</dl>
<p>KO</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>

Added modules/doctools/tests/html/06.



































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; .COPYRIGHT.
   -->
<! -- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<ul class="doctools_itemized">
<li><p>1</p>
<p>2</p>
<p>3</p></li>
<li>
<ol class="doctools_enumerated">
<li><p>a</p>
<p>b</p>
<p>c</p></li>
<li>
<dl class="doctools_definitions">
<dt>foo</dt>
<dd><p>snafu</p></dd>
<dt>bar</dt>
<dd><p>barf</p></dd>
<dt>roo</dt>
<dd><p>gork</p></dd>
</dl>
</li>
<li><p>a</p>
<p>b</p>
<p>c</p></li>
</ol>
</li>
<li><p>4</p>
<p>5</p>
<p>6</p></li>
</ul>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>

Added modules/doctools/tests/html/07.



















































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<html><head>
<title>TEST - </title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; .COPYRIGHT.
   -->
<! -- TEST.z
   -->
<body><div class="doctools">
<h1 class="doctools_title">TEST(z) 3.14.15.926 .MODULE. &quot;&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>TEST -</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<ul class="doctools_itemized">
<li><p>1</p></li>
<li><p>2</p>
<ol class="doctools_enumerated">
<li><p>a</p></li>
<li><p>b</p>
<dl class="doctools_definitions">
<dt>foo</dt>
<dd><p>snafu</p></dd>
<dt>bar</dt>
<dd><p>barf</p></dd>
<dt>roo</dt>
<dd><p>gork</p></dd>
</dl>
<p>bb</p></li>
<li><p>a</p></li>
</ol>
<p>22</p></li>
<li><p>3</p></li>
</ul>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; .COPYRIGHT.</p>
</div>
</div></body></html>

Added modules/doctools/tests/html/08.



























































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

<html><head>
<title>ALL - ..THE_MODULE..</title>
<style type="text/css"><!--
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
--></style>
</head>
<! -- Generated from file '.FILE.' by tcllib/doctools with format 'html'
   -->
<! -- Copyright &copy; **Copyright**
   -->
<! -- ALL.a
   -->
<body><div class="doctools">
<h1 class="doctools_title">ALL(a) 5 .MODULE. &quot;..THE_MODULE..&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>ALL - ..THE_TITLE..</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">API</a>
<ul>
<li class="doctools_subsection"><a href="#subsection1">NARGLE</a></li>
</ul>
</li>
<li class="doctools_section"><a href="#see-also">See Also</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">AAA</b></li>
<li>package require <b class="pkgname">BBB VVV</b></li>
<li>package require <b class="pkgname">CCC <span class="opt">?VVV?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1">CMDNAME ...</a></li>
<li><a href="#2">CMDNAME ...</a></li>
<li><a href="#3">CMDNAME ...</a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<dl class="doctools_commands">
<dt><b class="cmd">NAME</b></dt>
<dd><p>DESCRIPTION ::<b class="cmd">Command</b>::</p></dd>
<dt><b class="cmd">NAME</b></dt>
<dd><p>DESCRIPTION ::::</p></dd>
<dt><b class="cmd">NAME</b></dt>
<dd><p>DESCRIPTION ::<b class="const">Constant</b>::</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">API</a></h2>
<dl class="doctools_definitions">
<dt>TERM</dt>
<dd><p>DESCRIPTION ::<em>Emphasis</em>::</p></dd>
<dt>TERM</dt>
<dd><p>DESCRIPTION ::&quot;<b class="file">File/Path</b>&quot;::</p>
<dl class="doctools_tkoptions">
<dt>Command-Line Switch:	<b class="option">NAME</b><br>
Database Name:	<b class="optdbname">DBNAME</b><br>
Database Class:	<b class="optdbclass">CLASS</b><br>
</dt>
<dd><p>DESCRIPTION <span class="sectref"><a href="#subsection1">NARGLE</a></span></p></dd>
<dt>Command-Line Switch:	<b class="option">NAME</b><br>
Database Name:	<b class="optdbname">DBNAME</b><br>
Database Class:	<b class="optdbclass">CLASS</b><br>
</dt>
<dd><p>DESCRIPTION ::<b class="function">Function</b>::</p></dd>
<dt>Command-Line Switch:	<b class="option">NAME</b><br>
Database Name:	<b class="optdbname">DBNAME</b><br>
Database Class:	<b class="optdbclass">CLASS</b><br>
</dt>
<dd><p>DESCRIPTION ::<b class="method">Method</b>::</p></dd>
</dl></dd>
<dt>TERM</dt>
<dd><p>DESCRIPTION</p></dd>
<dt><a name="1">CMDNAME ...</a></dt>
<dd><p>DESCRIPTION ::<b class="namespace">Namespace</b>::</p>
<dl class="doctools_arguments">
<dt>TYPE <i class="arg">NAME</i></dt>
<dd><p>DESCRIPTION ::<i class="arg">Argument</i>::</p></dd>
<dt>TYPE <i class="arg">NAME</i></dt>
<dd><p>DESCRIPTION ::<b class="option">Option</b>::</p></dd>
<dt>TYPE <i class="arg">NAME</i> (MODE)</dt>
<dd><p>DESCRIPTION ::<span class="opt">?Optional?</span>::</p>
<pre class="doctools_example">
    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER
</pre>
</dd>
</dl></dd>
<dt><a name="2">CMDNAME ...</a></dt>
<dd><p>DESCRIPTION ::<b class="package">Package</b>::</p></dd>
<dt><a name="3">CMDNAME ...</a></dt>
<dd><p>DESCRIPTION ::<b class="syscmd">SystemCommand</b>::</p>
<dl class="doctools_options">
<dt><b class="option">NAME</b></dt>
<dd><p>DESCRIPTION ::<i class="term">Term</i>::</p></dd>
<dt><b class="option">NAME</b></dt>
<dd><p>DESCRIPTION ::<b class="type">Type</b>::</p></dd>
<dt><b class="option">NAME</b> ARGUMENT</dt>
<dd><p>DESCRIPTION ::<a href="Uri">Uri</a>::</p></dd>
</dl></dd>
</dl>
<div id="subsection1" class="doctools_subsection"><h3><a name="subsection1">NARGLE</a></h3>
<ol class="doctools_enumerated">
<li><p>PARAGRAPH ::<a href="Uri">UriLabel</a>::</p></li>
<li><p>PARAGRAPH ::<b class="variable">Variable</b>::</p></li>
<li><p>PARAGRAPH ::<b class="widget">Widget</b>::</p>
<ul class="doctools_itemized">
<li><p>PARAGRAPH ::<b class="class">Class</b>::</p></li>
<li><p>PARAGRAPH</p></li>
<li><p>PARAGRAPH</p></li>
</ul>
</li>
</ol>
</div>
</div>
<div id="see-also" class="doctools_section"><h2><a name="see-also">See Also</a></h2>
<p>ELSE, OTHER</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p>KEYA, KEYZ</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright &copy; **Copyright**</p>
</div>
</div></body></html>

Deleted modules/doctools/tests/idx/html/00.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!DOCTYPE html>
<html>
<!-- Generated by tcllib/doctools/idx with format 'html'
   -->
<!-- KWIC
   -->
<head>
<title> KWIC </title>
</head>
<body>
<h3> KWIC -- Test </h3>
<hr><div class="#doctools_idxnav">
</div>
<hr><table class="#doctools_idx" width="100%">
</table>
</body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































Deleted modules/doctools/tests/idx/html/01.

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
<!DOCTYPE html>
<html>
<!-- Generated by tcllib/doctools/idx with format 'html'
   -->
<!-- KWIC
   -->
<head>
<title> KWIC </title>
</head>
<body>
<h3> KWIC -- Test </h3>
<hr><div class="#doctools_idxnav">
<a href="#cL"> L </a>
</div>
<hr><table class="#doctools_idx" width="100%">
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cL">Keywords: L</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="lorem"> lorem </a></td>
<td class="#doctools_idxright" width="65%">
<a href="ipsum"> dolores </a>
</td></tr>
</table>
</body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































Deleted modules/doctools/tests/idx/html/02.

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
<!DOCTYPE html>
<html>
<!-- Generated by tcllib/doctools/idx with format 'html'
   -->
<!-- KWIC
   -->
<head>
<title> KWIC </title>
</head>
<body>
<h3> KWIC -- Test </h3>
<hr><div class="#doctools_idxnav">
<a href="#cD"> D </a> &#183; <a href="#cL"> L </a>
</div>
<hr><table class="#doctools_idx" width="100%">
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cD">Keywords: D</a>
</th></tr>
<tr class="#doctools_idxeven" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="dolores"> dolores </a></td>
<td class="#doctools_idxright" width="65%">
<a href="lorem"> ipsum </a> &#183; <a href="dolores"> lorem </a> &#183; <a href="ipsum"> dolores </a>
</td></tr>
<tr class="#doctools_idxheader"><th colspan="2">
<a name="cL">Keywords: L</a>
</th></tr>
<tr class="#doctools_idxodd" valign=top>
<td class="#doctools_idxleft" width="35%"><a name="lorem"> lorem </a></td>
<td class="#doctools_idxright" width="65%">
<a href="ipsum"> dolores </a> &#183; <a href="lorem"> ipsum </a>
</td></tr>
</table>
</body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































Deleted modules/doctools/tests/idx/idx/00.

1
2
3
[comment { -- basic empty }]
[index_begin KWIC Test]
[index_end]
<
<
<






Deleted modules/doctools/tests/idx/idx/01.

1
2
3
4
5
[comment { -- basic key }]
[index_begin KWIC Test]
[key lorem]
[manpage ipsum dolores]
[index_end]
<
<
<
<
<










Deleted modules/doctools/tests/idx/idx/02.

1
2
3
4
5
6
7
8
9
10
[comment { -- multiple keys }]
[index_begin KWIC Test]
[key lorem]
[manpage ipsum dolores]
[manpage lorem ipsum]
[key dolores]
[manpage lorem ipsum]
[manpage dolores lorem]
[manpage ipsum dolores]
[index_end]
<
<
<
<
<
<
<
<
<
<




















Deleted modules/doctools/tests/idx/markdown/00.

1
2
3
4

[//000000001]: # (Index generated by tcllib/doctools/idx with format 'markdown')

# KWIC \-\- Test
<
<
<
<








Deleted modules/doctools/tests/idx/markdown/01.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

[//000000001]: # (Index generated by tcllib/doctools/idx with format 'markdown')

# KWIC \-\- Test

----

[L](#cL)

----

#### <a name='cL'></a>Keywords: L

|||
|---|---|
|<a name='lorem'></a>lorem|[dolores](ipsum)|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































Deleted modules/doctools/tests/idx/markdown/02.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

[//000000001]: # (Index generated by tcllib/doctools/idx with format 'markdown')

# KWIC \-\- Test

----

[D](#cD) &#183; [L](#cL)

----

#### <a name='cD'></a>Keywords: D

|||
|---|---|
|<a name='dolores'></a>dolores|[ipsum](lorem) &#183; [lorem](dolores) &#183; [dolores](ipsum)|


#### <a name='cL'></a>Keywords: L

|||
|---|---|
|<a name='lorem'></a>lorem|[dolores](ipsum) &#183; [ipsum](lorem)|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































Deleted modules/doctools/tests/idx/markdown/index.

1
2
3
4

  * [00.md](00.md)
  * [01.md](01.md)
  * [02.md](02.md)
<
<
<
<








Deleted modules/doctools/tests/idx/nroff/00.

1
2
3
4
5
6
7
8
9
'\"
'\" Generated by tcllib/doctools/idx with format 'nroff'
.TH "KWIC" n
.so man.macros
.BS
.SH INDEX
Test
.RS
.RE
<
<
<
<
<
<
<
<
<


















Deleted modules/doctools/tests/idx/nroff/01.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'\"
'\" Generated by tcllib/doctools/idx with format 'nroff'
.TH "KWIC" n
.so man.macros
.BS
.SH INDEX
Test
.RS
lorem
.RS
.TP
\fBipsum\fR
dolores
.RE
.RE
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























Deleted modules/doctools/tests/idx/nroff/02.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
'\"
'\" Generated by tcllib/doctools/idx with format 'nroff'
.TH "KWIC" n
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
.\"	and indent is equivalent to second arg of .IP (shouldn't ever be
.\"	needed;  use .AS below instead)
.\"
.\" .AS ?type? ?name?
.\"	Give maximum sizes of arguments for setting tab stops.  Type and
.\"	name are examples of largest possible arguments that will be passed
.\"	to .AP later.  If args are omitted, default tab stops are used.
.\"
.\" .BS
.\"	Start box enclosure.  From here until next .BE, everything will be
.\"	enclosed in one large box.
.\"
.\" .BE
.\"	End of box enclosure.
.\"
.\" .CS
.\"	Begin code excerpt.
.\"
.\" .CE
.\"	End code excerpt.
.\"
.\" .VS ?version? ?br?
.\"	Begin vertical sidebar, for use in marking newly-changed parts
.\"	of man pages.  The first argument is ignored and used for recording
.\"	the version when the .VS was added, so that the sidebars can be
.\"	found and removed when they reach a certain age.  If another argument
.\"	is present, then a line break is forced before starting the sidebar.
.\"
.\" .VE
.\"	End of vertical sidebar.
.\"
.\" .DS
.\"	Begin an indented unfilled display.
.\"
.\" .DE
.\"	End of indented unfilled display.
.\"
.\" .SO ?manpage?
.\"	Start of list of standard options for a Tk widget. The manpage
.\"	argument defines where to look up the standard options; if
.\"	omitted, defaults to "options". The options follow on successive
.\"	lines, in three columns separated by tabs.
.\"
.\" .SE
.\"	End of list of standard options for a Tk widget.
.\"
.\" .OP cmdName dbName dbClass
.\"	Start of description of a specific option.  cmdName gives the
.\"	option's name as specified in the class command, dbName gives
.\"	the option's name in the option database, and dbClass gives
.\"	the option's class in the option database.
.\"
.\" .UL arg1 arg2
.\"	Print arg1 underlined, then print arg2 normally.
.\"
.\" .QW arg1 ?arg2?
.\"	Print arg1 in quotes, then arg2 normally (for trailing punctuation).
.\"
.\" .PQ arg1 ?arg2?
.\"	Print an open parenthesis, arg1 in quotes, then arg2 normally
.\"	(for trailing punctuation) and then a closing parenthesis.
.\"
.\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
.\"	# Start an argument description
.de AP
.ie !"\\$4"" .TP \\$4
.el \{\
.   ie !"\\$2"" .TP \\n()Cu
.   el          .TP 15
.\}
.ta \\n()Au \\n()Bu
.ie !"\\$3"" \{\
\&\\$1 \\fI\\$2\\fP (\\$3)
.\".b
.\}
.el \{\
.br
.ie !"\\$2"" \{\
\&\\$1	\\fI\\$2\\fP
.\}
.el \{\
\&\\fI\\$1\\fP
.\}
.\}
..
.\"	# define tabbing values for .AP
.de AS
.nr )A 10n
.if !"\\$1"" .nr )A \\w'\\$1'u+3n
.nr )B \\n()Au+15n
.\"
.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
.nr )C \\n()Bu+\\w'(in/out)'u+2n
..
.AS Tcl_Interp Tcl_CreateInterp in/out
.\"	# BS - start boxed text
.\"	# ^y = starting y location
.\"	# ^b = 1
.de BS
.br
.mk ^y
.nr ^b 1u
.if n .nf
.if n .ti 0
.if n \l'\\n(.lu\(ul'
.if n .fi
..
.\"	# BE - end boxed text (draw box now)
.de BE
.nf
.ti 0
.mk ^t
.ie n \l'\\n(^lu\(ul'
.el \{\
.\"	Draw four-sided box normally, but don't draw top of
.\"	box if the box started on an earlier page.
.ie !\\n(^b-1 \{\
\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.el \}\
\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
.\}
.\}
.fi
.br
.nr ^b 0
..
.\"	# VS - start vertical sidebar
.\"	# ^Y = starting y location
.\"	# ^v = 1 (for troff;  for nroff this doesn't matter)
.de VS
.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
..
.\"	# VE - end of vertical sidebar
.de VE
.ie n 'mc
.el \{\
.ev 2
.nf
.ti 0
.mk ^t
\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
.sp -1
.fi
.ev
.\}
.nr ^v 0
..
.\"	# Special macro to handle page bottom:  finish off current
.\"	# box/sidebar if in box/sidebar mode, then invoked standard
.\"	# page bottom macro.
.de ^B
.ev 2
'ti 0
'nf
.mk ^t
.if \\n(^b \{\
.\"	Draw three-sided box if this is the box's first page,
.\"	draw two sides but no top otherwise.
.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
.\}
.if \\n(^v \{\
.nr ^x \\n(^tu+1v-\\n(^Yu
\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
.\}
.bp
'fi
.ev
.if \\n(^b \{\
.mk ^y
.nr ^b 2
.\}
.if \\n(^v \{\
.mk ^Y
.\}
..
.\"	# DS - begin display
.de DS
.RS
.nf
.sp
..
.\"	# DE - end display
.de DE
.fi
.RE
.sp
..
.\"	# SO - start of list of standard options
.de SO
'ie '\\$1'' .ds So \\fBoptions\\fR
'el .ds So \\fB\\$1\\fR
.SH "STANDARD OPTIONS"
.LP
.nf
.ta 5.5c 11c
.ft B
..
.\"	# SE - end of list of standard options
.de SE
.fi
.ft R
.LP
See the \\*(So manual entry for details on the standard options.
..
.\"	# OP - start of full description for a single option
.de OP
.LP
.nf
.ta 4c
Command-Line Name:	\\fB\\$1\\fR
Database Name:	\\fB\\$2\\fR
Database Class:	\\fB\\$3\\fR
.fi
.IP
..
.\"	# CS - begin code excerpt
.de CS
.RS
.nf
.ta .25i .5i .75i 1i
..
.\"	# CE - end code excerpt
.de CE
.fi
.RE
..
.\"	# UL - underline word
.de UL
\\$1\l'|0\(ul'\\$2
..
.\"	# QW - apply quotation marks to word
.de QW
.ie '\\*(lq'"' ``\\$1''\\$2
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\$2
..
.\"	# PQ - apply parens and quotation marks to word
.de PQ
.ie '\\*(lq'"' (``\\$1''\\$2)\\$3
.\"" fix emacs highlighting
.el (\\*(lq\\$1\\*(rq\\$2)\\$3
..
.\"	# QR - quoted range
.de QR
.ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3
.\"" fix emacs highlighting
.el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3
..
.\"	# MT - "empty" string
.de MT
.QW ""
..
.BS
.SH INDEX
Test
.RS
dolores
.RS
.TP
\fBlorem\fR
ipsum
.TP
\fBdolores\fR
lorem
.TP
\fBipsum\fR
dolores
.RE
lorem
.RS
.TP
\fBipsum\fR
dolores
.TP
\fBlorem\fR
ipsum
.RE
.RE
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































Deleted modules/doctools/tests/idx/null/00.

Deleted modules/doctools/tests/idx/null/01.

Deleted modules/doctools/tests/idx/null/02.

Deleted modules/doctools/tests/idx/text/00.

1
2
3
4

Index generated by tcllib/doctools/idx with format 'text'
KWIC -- Test
============
<
<
<
<








Deleted modules/doctools/tests/idx/text/01.

1
2
3
4
5
6

Index generated by tcllib/doctools/idx with format 'text'
KWIC -- Test
============

lorem ipsum
<
<
<
<
<
<












Deleted modules/doctools/tests/idx/text/02.

1
2
3
4
5
6
7
8

Index generated by tcllib/doctools/idx with format 'text'
KWIC -- Test
============

dolores lorem, dolores, ipsum

lorem   ipsum, lorem
<
<
<
<
<
<
<
<
















Deleted modules/doctools/tests/idx/wiki/00.

1
2
3
Index '''KWIC'''
'''Test'''

<
<
<






Deleted modules/doctools/tests/idx/wiki/01.

1
2
3
4
Index '''KWIC'''
'''Test'''

   '''lorem''':   ipsum
<
<
<
<








Deleted modules/doctools/tests/idx/wiki/02.

1
2
3
4
5
Index '''KWIC'''
'''Test'''

   '''lorem''':   ipsum lorem
   '''dolores''':   lorem dolores ipsum
<
<
<
<
<










Added modules/doctools/tests/latex/00.





























>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% CVS: @ID@ TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}

Added modules/doctools/tests/latex/01.



































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) **Copyright**
% CVS: @ID@ TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
Argument	::\underline{Argument}::
Class		::{\bf Class}::
Command		::{\bf Command}::
Comment		::::
Const		::{\bf Constant}::
Emphasis	::{\it Emphasis}::
File		::"{\it File/Path}"::
Function	::{\bf Function}::
Method		::{\bf Method}::
Namespace	::{\bf Namespace]}::
Option		::{\bf Option}::
Optional	::?Optional?::
Package		::{\bf Package}::
Syscmd		::{\bf SystemCommand}::
Term		::{\it Term}::
Type		::{\bf Type}::
Uri		::\underline{Uri}::
Variable	::{\bf Variable}::
Widget		::{\bf Widget}::
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) **Copyright**\linebreak
\end{flushleft}
\end{document}

Added modules/doctools/tests/latex/02.















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% CVS: @ID@ TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST -- ..THE\_MODULE.. : ..THE\_TITLE..}
\maketitle
\section{Synopsis}\label{synopsis}
\begin{flushleft}
package require {\bf AAA}
package require {\bf BBB VVV}
\end{flushleft}
\section{Description}\label{section1}
\section{See Also}\label{see-also}
ELSE, OTHER
\section{Keywords}\label{keywords}
KEYA, KEYZ
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}

Added modules/doctools/tests/latex/03.





















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% CVS: @ID@ TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\section{AaA}\label{section2}
1
\section{BbB}\label{section3}
22
\subsection{BbB.cCc}\label{subsection1}
333
\subsection{BbB.dDd}\label{subsection2}
4444
\section{EeE}\label{section4}
5555
At {\bf AaA (\ref{section2})}.
At {\bf \_\_undefined\_\_ (\ref{\_\_undefined\_\_})}.
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}

Added modules/doctools/tests/latex/04.















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% CVS: @ID@ TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
BEGINNE HIER
\begin{verbatim}
	 Example Block  More Lines
\end{verbatim}
\begin{verbatim}
Inlined Example \
Next Line
\end{verbatim}
FERTIG
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}

Added modules/doctools/tests/latex/05.







































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99

% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% CVS: @ID@ BASIC.a
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / BASIC --  : }
\maketitle
\section{Synopsis}\label{synopsis}
\begin{itemize}
\item[] a-command 
\end{itemize}
\section{Description}\label{section1}
OK
\begin{itemize}
%
\item[] \underline{argument-1} integer
%
verification
%
\item[] \underline{argument-2} string (out)
%
 mogrification
\end{itemize}
\begin{itemize}
%
\item[] {\bf command-a}
%
 explanation
%
\item[] {\bf command-b}
%
elucidation
\end{itemize}
\begin{itemize}
%
\item[] term
%
 definition
%
\item[] a-command 
%
semantic
\end{itemize}
\begin{enumerate}
%
\item
%
A
%
\item
%
 B
C
D
\end{enumerate}
\begin{itemize}
%
\item
%
1
%
\item
%
 2
2a
2b
\end{itemize}
\begin{itemize}
%
\item[] {\bf option-1}
%
 meaning
%
\item[] {\bf option-2} value
%
elaboration
\end{itemize}
\begin{itemize}
%
\item[] Command-Line Switch:	{\bf background}\\
Database Name:	{\bf Background}\\
Database Class:	{\bf Color}\\
%
 candy
%
\item[] Command-Line Switch:	{\bf foreground}\\
Database Name:	{\bf Foreground}\\
Database Class:	{\bf Color}\\
%
caramel
\end{itemize}
KO
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}

Added modules/doctools/tests/latex/06.













































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% CVS: @ID@ TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\begin{itemize}
%
\item
%
 1  2  3
%
\item
%
\begin{enumerate}
%
\item
%
 a  b  c
%
\item
%
\begin{itemize}
%
\item[] foo
%
 snafu
%
\item[] bar
%
 barf
%
\item[] roo
%
 gork
\end{itemize}
%
\item
%
 a  b  c
\end{enumerate}
%
\item
%
 4  5  6
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}

Added modules/doctools/tests/latex/07.





















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) .COPYRIGHT.
% CVS: @ID@ TEST.z
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / TEST --  : }
\maketitle
\section{Description}\label{section1}
\begin{itemize}
%
\item
%
 1
%
\item
%
 2
\begin{enumerate}
%
\item
%
 a
%
\item
%
 b
\begin{itemize}
%
\item[] foo
%
 snafu
%
\item[] bar
%
 barf
%
\item[] roo
%
 gork
\end{itemize}
bb
%
\item
%
 a
\end{enumerate}
22
%
\item
%
 3
\end{itemize}
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) .COPYRIGHT.\linebreak
\end{flushleft}
\end{document}

Added modules/doctools/tests/latex/08.

















































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152

% Generated from file '.FILE.' by tcllib/doctools with format 'latex'
% Copyright (c) **Copyright**
% CVS: @ID@ ALL.a
\documentclass{article}
\begin{document}
\author{@USR@}
\title{.MODULE. / ALL -- ..THE\_MODULE.. : ..THE\_TITLE..}
\maketitle
\section{Synopsis}\label{synopsis}
\begin{flushleft}
package require {\bf AAA}
package require {\bf BBB VVV}
package require {\bf CCC ?VVV?}
\end{flushleft}
\begin{itemize}
\item[] CMDNAME ...
\item[] CMDNAME ...
\item[] CMDNAME ...
\end{itemize}
\section{Description}\label{section1}
\begin{itemize}
%
\item[] {\bf NAME}
%
 DESCRIPTION ::{\bf Command}::
%
\item[] {\bf NAME}
%
 DESCRIPTION ::::
%
\item[] {\bf NAME}
%
 DESCRIPTION ::{\bf Constant}::
\end{itemize}
\section{API}\label{section2}
\begin{itemize}
%
\item[] TERM
%
 DESCRIPTION ::{\it Emphasis}::
%
\item[] TERM
%
 DESCRIPTION ::"{\it File/Path}"::
\begin{itemize}
%
\item[] Command-Line Switch:	{\bf NAME}\\
Database Name:	{\bf DBNAME}\\
Database Class:	{\bf CLASS}\\
%
 DESCRIPTION {\bf NARGLE (\ref{subsection1})}
%
\item[] Command-Line Switch:	{\bf NAME}\\
Database Name:	{\bf DBNAME}\\
Database Class:	{\bf CLASS}\\
%
 DESCRIPTION ::{\bf Function}::
%
\item[] Command-Line Switch:	{\bf NAME}\\
Database Name:	{\bf DBNAME}\\
Database Class:	{\bf CLASS}\\
%
 DESCRIPTION ::{\bf Method}::
\end{itemize}
%
\item[] TERM
%
 DESCRIPTION
%
\item[] CMDNAME ...
%
 DESCRIPTION ::{\bf Namespace]}::
\begin{itemize}
%
\item[] \underline{NAME} TYPE
%
 DESCRIPTION ::\underline{Argument}::
%
\item[] \underline{NAME} TYPE
%
 DESCRIPTION ::{\bf Option}::
%
\item[] \underline{NAME} TYPE (MODE)
%
 DESCRIPTION ::?Optional?::
\begin{verbatim}
    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER
\end{verbatim}
\end{itemize}
%
\item[] CMDNAME ...
%
 DESCRIPTION ::{\bf Package}::
%
\item[] CMDNAME ...
%
 DESCRIPTION ::{\bf SystemCommand}::
\begin{itemize}
%
\item[] {\bf NAME}
%
 DESCRIPTION ::{\it Term}::
%
\item[] {\bf NAME}
%
 DESCRIPTION ::{\bf Type}::
%
\item[] {\bf NAME} ARGUMENT
%
 DESCRIPTION ::\underline{Uri}::
\end{itemize}
\end{itemize}
\subsection{NARGLE}\label{subsection1}
\begin{enumerate}
%
\item
%
 PARAGRAPH ::\underline{UriLabel} \footnote{Uri}::
%
\item
%
 PARAGRAPH ::{\bf Variable}::
%
\item
%
 PARAGRAPH ::{\bf Widget}::
\begin{itemize}
%
\item
%
 PARAGRAPH ::{\bf Class}::
%
\item
%
 PARAGRAPH
%
\item
%
 PARAGRAPH
\end{itemize}
\end{enumerate}
\section{See Also}\label{see-also}
ELSE, OTHER
\section{Keywords}\label{keywords}
KEYA, KEYZ
\section{Copyright}\label{copyright}
\begin{flushleft}
Copyright (c) **Copyright**\linebreak
\end{flushleft}
\end{document}

Added modules/doctools/tests/list/00.



>
1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/01.



>
1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/02.



>
1
manpage {seealso {ELSE OTHER} keywords {KEYA KEYZ} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc ..THE_MODULE.. desc ..THE_TITLE.. fid .FILE}

Added modules/doctools/tests/list/03.



>
1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/04.



>
1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/05.



>
1
manpage {seealso {} keywords {} file .FILE. section a category {} module .MODULE. version 5 title BASIC shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/06.



>
1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/07.



>
1
manpage {seealso {} keywords {} file .FILE. section z category {} module .MODULE. version 3.14.15.926 title TEST shortdesc {} desc {} fid .FILE}

Added modules/doctools/tests/list/08.



>
1
manpage {seealso {ELSE OTHER} keywords {KEYA KEYZ} file .FILE. section a category {} module .MODULE. version 5 title ALL shortdesc ..THE_MODULE.. desc ..THE_TITLE.. fid .FILE}

Added modules/doctools/tests/man/00.







>
>
>
1
2
3
[manpage_begin TEST z 3.14.15.926]
[description]
[manpage_end]

Added modules/doctools/tests/man/01.















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[manpage_begin TEST z 3.14.15.926]
[copyright **Copyright**]
[description]
Argument	::[arg Argument]::
Class		::[class Class]::
Command		::[cmd Command]::
Comment		::[comment Comment]::
Const		::[const Constant]::
Emphasis	::[emph Emphasis]::
File		::[file File/Path]::
Function	::[fun Function]::
Method		::[method Method]::
Namespace	::[namespace Namespace]::
Option		::[option Option]::
Optional	::[opt Optional]::
Package		::[package Package]::
Syscmd		::[syscmd SystemCommand]::
Term		::[term Term]::
Type		::[type Type]::
Uri		::[uri Uri]::
Variable	::[var Variable]::
Widget		::[widget Widget]::
[manpage_end]

Added modules/doctools/tests/man/02.



















>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
[manpage_begin TEST z 3.14.15.926]
[moddesc ..THE_MODULE..]
[titledesc ..THE_TITLE..]
[require AAA]
[require BBB VVV]
[keywords KEYA KEYZ]
[see_also OTHER ELSE]
[description]
[manpage_end]

Added modules/doctools/tests/man/03.







































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[manpage_begin TEST z 3.14.15.926]
[description]
[section AaA]
1
[section BbB]
22
[subsection BbB.cCc]
333
[subsection BbB.dDd]
4444
[section EeE]
5555

[para]
At [sectref AaA].
[para]
At [sectref __undefined__].
[manpage_end]

Added modules/doctools/tests/man/04.

































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[manpage_begin TEST z 3.14.15.926]
[description]
BEGINNE HIER
[example {
	 Example Block \
	 More Lines
}]
[para]
[para]
[example_begin]
Inlined Example \
Next Line
[example_end]
FERTIG
[manpage_end]

Added modules/doctools/tests/man/05.





















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
[comment {LISTS, BASIC}]
[manpage_begin BASIC a 5]
[description]
OK
[para]
[list_begin arguments]
[arg_def integer argument-1]
verification
[arg_def string argument-2 out] mogrification
[list_end]
[para]
[list_begin commands]
[cmd_def command-a] explanation
[cmd_def command-b]
elucidation
[list_end]
[para]
[list_begin definitions]
[def term] definition
[call a-command]
semantic
[list_end]
[para]
[list_begin enumerated]
[enum]
A
[enum] B
[para]
C
[para]
D
[list_end]
[para]
[list_begin itemized]
[item]
1
[item] 2
[para]
2a
[para]
2b
[list_end]
[para]
[list_begin options]
[opt_def option-1] meaning
[opt_def option-2 value]
elaboration
[list_end]
[para]
[list_begin tkoptions]
[tkoption_def background Background Color] candy
[tkoption_def foreground Foreground Color]
caramel
[list_end]
[para]
KO
[comment DONE]
[manpage_end]

Added modules/doctools/tests/man/06.























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
[manpage_begin TEST z 3.14.15.926]
[description]
[comment {
    nested lists, same and different types, examples have examples at
    least three levels deep, for a proper inner level, i.e. not only
    first/last level, but something truly in the middle. Also three
    list items of the relevant on each level, see the proper handling
    of indentations. For that we also need paragraphs in the items.

    start: itemized/enumerated/definition
}]
[list_begin itemized]
[item] 1 [para] 2 [para] 3
[item]
[list_begin enumerated]
[enum] a [para] b [para] c
[enum]
[list_begin definitions]
[def foo] snafu
[def bar] barf
[def roo] gork
[list_end]
[enum] a [para] b [para] c
[list_end]
[item] 4 [para] 5 [para] 6
[list_end]
[manpage_end]

Added modules/doctools/tests/man/07.















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[manpage_begin TEST z 3.14.15.926]
[description]
[comment {
    nested list 2, put text before and after the embedded list.
}]
[list_begin itemized]
[item] 1
[item] 2
[list_begin enumerated]
[enum] a
[enum] b
[list_begin definitions]
[def foo] snafu
[def bar] barf
[def roo] gork
[list_end]
bb
[enum] a
[list_end]
22
[item] 3
[list_end]
[manpage_end]

Added modules/doctools/tests/man/08.

















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
[comment {LISTS, ALL TYPES}]
[manpage_begin ALL a 5]
[copyright **Copyright**]
[moddesc ..THE_MODULE..]
[titledesc ..THE_TITLE..]
[require AAA]
[require BBB VVV]
[require CCC [opt VVV]]
[description]
[list_begin commands]
[cmd_def NAME] DESCRIPTION ::[cmd Command]::
[cmd_def NAME] DESCRIPTION ::[comment Comment]::
[cmd_def NAME] DESCRIPTION ::[const Constant]::
[list_end]
[section API]
[list_begin definitions]
[def TERM] DESCRIPTION ::[emph Emphasis]::
[def TERM] DESCRIPTION ::[file File/Path]::
[list_begin tkoptions]
[tkoption_def NAME DBNAME CLASS] DESCRIPTION [sectref NARGLE]
[tkoption_def NAME DBNAME CLASS] DESCRIPTION ::[fun Function]::
[tkoption_def NAME DBNAME CLASS] DESCRIPTION ::[method Method]::
[list_end]
[def TERM] DESCRIPTION
[call CMDNAME ...] DESCRIPTION ::[namespace Namespace]::
[list_begin arguments]
[arg_def TYPE NAME] DESCRIPTION ::[arg Argument]::
[arg_def TYPE NAME] DESCRIPTION ::[option Option]::
[arg_def TYPE NAME MODE] DESCRIPTION ::[opt Optional]::
[example {
    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER
}]
[list_end]
[call CMDNAME ...] DESCRIPTION ::[package Package]::
[call CMDNAME ...] DESCRIPTION ::[syscmd SystemCommand]::
[list_begin options]
[opt_def NAME] DESCRIPTION ::[term Term]::
[opt_def NAME] DESCRIPTION ::[type Type]::
[opt_def NAME ARGUMENT] DESCRIPTION ::[uri Uri]::
[list_end]
[list_end]
[subsection NARGLE]
[list_begin enumerated]
[enum] PARAGRAPH ::[uri Uri UriLabel]::
[enum] PARAGRAPH ::[var Variable]::
[enum] PARAGRAPH ::[widget Widget]::
[list_begin itemized]
[item] PARAGRAPH ::[class Class]::
[item] PARAGRAPH
[item] PARAGRAPH
[list_end]
[list_end]
[keywords KEYA KEYZ]
[see_also OTHER ELSE]
[manpage_end]

Added modules/doctools/tests/nroff/00.































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi

Added modules/doctools/tests/nroff/01.





































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) **Copyright**
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
Argument	::\fIArgument\fR::
Class		::\fBClass\fR::
Command		::\fBCommand\fR::
Comment		::::
Const		::\fBConstant\fR::
Emphasis	::\fIEmphasis\fR::
File		::"\fIFile/Path\fR"::
Function	::\fBFunction\fR::
Method		::\fBMethod\fR::
Namespace	::\fBNamespace\fR::
Option		::\fBOption\fR::
Optional	::?Optional?::
Package		::\fBPackage\fR::
Syscmd		::\fBSystemCommand\fR::
Term		::\fITerm\fR::
Type		::\fBType\fR::
Uri		::\fIUri\fR::
Variable	::\fBVariable\fR::
Widget		::\fBWidget\fR::
.SH COPYRIGHT
.nf
Copyright (c) **Copyright**

.fi

Added modules/doctools/tests/nroff/02.



















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. "\&.\&.THE_MODULE\&.\&."
.so man.macros
.BS
.SH NAME
TEST \- \&.\&.THE_TITLE\&.\&.
.SH SYNOPSIS
package require \fBAAA \fR
.sp
package require \fBBBB  VVV\fR
.sp
.BE
.SH DESCRIPTION
.SH "SEE ALSO"
ELSE, OTHER
.SH KEYWORDS
KEYA, KEYZ
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi

Added modules/doctools/tests/nroff/03.



























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.SH AAA
1
.SH BBB
22
.SS BBB\&.CCC
333
.SS BBB\&.DDD
4444
.SH EEE
5555
.PP
At \fBAaA\fR\&.
.PP
At \fB__undefined__\fR\&.
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi

Added modules/doctools/tests/nroff/04.

































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
BEGINNE HIER
.CS


	 Example Block  More Lines

.CE
.PP
.PP
.CS


Inlined Example \\
Next Line

.CE
FERTIG
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi

Added modules/doctools/tests/nroff/05.

































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "BASIC" a 5 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
BASIC \-
.SH SYNOPSIS
a-command
.sp
.BE
.SH DESCRIPTION
OK
.PP
.TP
integer \fIargument-1\fR
verification
.TP
string \fIargument-2\fR (out)
mogrification
.PP
.PP
.TP
\fBcommand-a\fR
explanation
.TP
\fBcommand-b\fR
elucidation
.PP
.PP
.TP
term
definition
.TP
a-command
semantic
.PP
.PP
.IP [1]
A
.IP [2]
B
.sp
C
.sp
D
.PP
.PP
.IP \(bu
1
.IP \(bu
2
.sp
2a
.sp
2b
.PP
.PP
.TP
\fBoption-1\fR
meaning
.TP
\fBoption-2\fR value
elaboration
.PP
.PP
.LP
.nf
.ta 6c
Command-Line Switch:	\fBbackground\fR
Database Name:	\fBBackground\fR
Database Class:	\fBColor\fR

.fi
.IP
candy
.LP
.nf
.ta 6c
Command-Line Switch:	\fBforeground\fR
Database Name:	\fBForeground\fR
Database Class:	\fBColor\fR

.fi
.IP
caramel
.PP
.PP
KO
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi

Added modules/doctools/tests/nroff/06.















































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.IP \(bu
1
.sp
2
.sp
3
.IP \(bu
.RS
.IP [1]
a
.sp
b
.sp
c
.IP [2]
.RS
.TP
foo
snafu
.TP
bar
barf
.TP
roo
gork
.RE
.IP [3]
a
.sp
b
.sp
c
.RE
.IP \(bu
4
.sp
5
.sp
6
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi

Added modules/doctools/tests/nroff/07.



























































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) \&.COPYRIGHT\&.
'\"
.TH "TEST" z 3\&.14\&.15\&.926 \&.MODULE\&. ""
.so man.macros
.BS
.SH NAME
TEST \-
.SH DESCRIPTION
.IP \(bu
1
.IP \(bu
2
.RS
.IP [1]
a
.IP [2]
b
.RS
.TP
foo
snafu
.TP
bar
barf
.TP
roo
gork
.RE
.IP
bb
.IP [3]
a
.RE
.IP
22
.IP \(bu
3
.PP
.SH COPYRIGHT
.nf
Copyright (c) \&.COPYRIGHT\&.

.fi

Added modules/doctools/tests/nroff/08.

























































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
'\"
'\" Generated from file '\&.FILE\&.' by tcllib/doctools with format 'nroff'
'\" Copyright (c) **Copyright**
'\"
.TH "ALL" a 5 \&.MODULE\&. "\&.\&.THE_MODULE\&.\&."
.so man.macros
.BS
.SH NAME
ALL \- \&.\&.THE_TITLE\&.\&.
.SH SYNOPSIS
package require \fBAAA \fR
.sp
package require \fBBBB  VVV\fR
.sp
package require \fBCCC  ?VVV?\fR
.sp
CMDNAME \&.\&.\&.
.sp
CMDNAME \&.\&.\&.
.sp
CMDNAME \&.\&.\&.
.sp
.BE
.SH DESCRIPTION
.TP
\fBNAME\fR
DESCRIPTION ::\fBCommand\fR::
.TP
\fBNAME\fR
DESCRIPTION ::::
.TP
\fBNAME\fR
DESCRIPTION ::\fBConstant\fR::
.PP
.SH API
.TP
TERM
DESCRIPTION ::\fIEmphasis\fR::
.TP
TERM
DESCRIPTION ::"\fIFile/Path\fR"::
.RS
.LP
.nf
.ta 6c
Command-Line Switch:	\fBNAME\fR
Database Name:	\fBDBNAME\fR
Database Class:	\fBCLASS\fR

.fi
.IP
DESCRIPTION \fBNARGLE\fR
.LP
.nf
.ta 6c
Command-Line Switch:	\fBNAME\fR
Database Name:	\fBDBNAME\fR
Database Class:	\fBCLASS\fR

.fi
.IP
DESCRIPTION ::\fBFunction\fR::
.LP
.nf
.ta 6c
Command-Line Switch:	\fBNAME\fR
Database Name:	\fBDBNAME\fR
Database Class:	\fBCLASS\fR

.fi
.IP
DESCRIPTION ::\fBMethod\fR::
.RE
.TP
TERM
DESCRIPTION
.TP
CMDNAME \&.\&.\&.
DESCRIPTION ::\fBNamespace\fR::
.RS
.TP
TYPE \fINAME\fR
DESCRIPTION ::\fIArgument\fR::
.TP
TYPE \fINAME\fR
DESCRIPTION ::\fBOption\fR::
.TP
TYPE \fINAME\fR (MODE)
DESCRIPTION ::?Optional?::
.CS


    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER

.CE
.RE
.TP
CMDNAME \&.\&.\&.
DESCRIPTION ::\fBPackage\fR::
.TP
CMDNAME \&.\&.\&.
DESCRIPTION ::\fBSystemCommand\fR::
.RS
.TP
\fBNAME\fR
DESCRIPTION ::\fITerm\fR::
.TP
\fBNAME\fR
DESCRIPTION ::\fBType\fR::
.TP
\fBNAME\fR ARGUMENT
DESCRIPTION ::\fIUri\fR::
.RE
.PP
.SS NARGLE
.IP [1]
PARAGRAPH ::\fIUriLabel\fR [Uri]::
.IP [2]
PARAGRAPH ::\fBVariable\fR::
.IP [3]
PARAGRAPH ::\fBWidget\fR::
.RS
.IP \(bu
PARAGRAPH ::\fBClass\fR::
.IP \(bu
PARAGRAPH
.IP \(bu
PARAGRAPH
.RE
.PP
.SH "SEE ALSO"
ELSE, OTHER
.SH KEYWORDS
KEYA, KEYZ
.SH COPYRIGHT
.nf
Copyright (c) **Copyright**

.fi

Added modules/doctools/tests/null/00.

Added modules/doctools/tests/null/01.

Added modules/doctools/tests/null/02.

Added modules/doctools/tests/null/03.

Added modules/doctools/tests/null/04.

Added modules/doctools/tests/null/05.

Added modules/doctools/tests/null/06.

Added modules/doctools/tests/null/07.

Added modules/doctools/tests/null/08.

Added modules/doctools/tests/syntax/e_arg_list.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[arg_def arg-type arg-name]
[manpage_end]

Added modules/doctools/tests/syntax/e_body.









>
>
>
>
1
2
3
4
Text before manpage_begin is not allowed
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_arg_def1.









>
>
>
>
1
2
3
4
[arg_def arg-type arg-name]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_arg_def2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[arg_def arg-type arg-name]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_arg_def3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[arg_def arg-type arg-name]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_call1.









>
>
>
>
1
2
3
4
[call .command.]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_call2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[call .command.]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_call3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[call .command.]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_cmd_def1.









>
>
>
>
1
2
3
4
[cmd_def .command.]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_cmd_def2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[cmd_def .command.]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_cmd_def3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[cmd_def .command.]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_def1.









>
>
>
>
1
2
3
4
[def]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_def2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[def]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_def3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[def]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_enum1.









>
>
>
>
1
2
3
4
[enum]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_enum2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[enum]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_enum3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[enum]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_example1.









>
>
>
>
1
2
3
4
[example {}]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_example2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[example {}]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_example3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[example {}]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_example_begin1.









>
>
>
>
1
2
3
4
[example_begin]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_example_begin2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[example_begin]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_example_begin3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[example_begin]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_item1.









>
>
>
>
1
2
3
4
[item]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_item2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[item]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_item3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[item]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_list_begin1.









>
>
>
>
1
2
3
4
[list_begin definitions]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_list_begin2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[list_begin definitions]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_list_begin3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[list_begin definitions]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_list_end1.









>
>
>
>
1
2
3
4
[list_end]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_list_end2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[list_end]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_list_end3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[list_end]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_manpage_end.











>
>
>
>
>
1
2
3
4
5
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {example not closed}]
[example_begin]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_opt_def1.









>
>
>
>
1
2
3
4
[opt_def .option.]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_opt_def2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[opt_def .option.]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_opt_def3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[opt_def .option.]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_para1.









>
>
>
>
1
2
3
4
[para]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_para2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[para]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_para3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[para]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_section1.









>
>
>
>
1
2
3
4
[section foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_section2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[section foo]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_section3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[section foo]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_sectref1.









>
>
>
>
1
2
3
4
[sectref S]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_sectref2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[sectref S]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_sectref3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[sectref S]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_subsection1.









>
>
>
>
1
2
3
4
[subsection foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_subsection2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[subsection foo]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_subsection3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad subsection}]
[example_begin]
[subsection foo]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_tkoption_def1.









>
>
>
>
1
2
3
4
[tkoption_def .option. .dbname. .dbclass.]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_tkoption_def2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[tkoption_def .option. .dbname. .dbclass.]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_bodycmd_tkoption_def3.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_begin]
[tkoption_def .option. .dbname. .dbclass.]
[manpage_end]

Added modules/doctools/tests/syntax/e_bulletlist.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[item]
[manpage_end]

Added modules/doctools/tests/syntax/e_cmd_list.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[cmd_def .command.]
[manpage_end]

Added modules/doctools/tests/syntax/e_deflist_call.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin arguments]
[call .command.]
[manpage_end]

Added modules/doctools/tests/syntax/e_deflist_def.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin options]
[def]
[manpage_end]

Added modules/doctools/tests/syntax/e_end_open_example.











>
>
>
>
>
1
2
3
4
5
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {example not closed}]
[example_begin]

Added modules/doctools/tests/syntax/e_end_open_list.











>
>
>
>
>
1
2
3
4
5
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[list_begin commands]
[comment {list not closed}]
[manpage_end]

Added modules/doctools/tests/syntax/e_end_open_mp.





>
>
1
2
[manpage_begin ERROR e 2.71828182845904523536]
[comment {manpage not closed}]

Added modules/doctools/tests/syntax/e_enumlist.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[enum]
[manpage_end]

Added modules/doctools/tests/syntax/e_examplecmd1.









>
>
>
>
1
2
3
4
[example_end]
[manpage_end ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_examplecmd2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[example_end]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_examplecmd3.











>
>
>
>
>
1
2
3
4
5
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[example_end]
[manpage_end]

Added modules/doctools/tests/syntax/e_hdrcmd_copyright1.









>
>
>
>
1
2
3
4
[copyright foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_hdrcmd_copyright2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[copyright foo]
[manpage_end]

Added modules/doctools/tests/syntax/e_hdrcmd_description1.









>
>
>
>
1
2
3
4
[description]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_hdrcmd_description2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_hdrcmd_moddesc1.









>
>
>
>
1
2
3
4
[moddesc foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_hdrcmd_moddesc2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[moddesc foo]
[manpage_end]

Added modules/doctools/tests/syntax/e_hdrcmd_require1.









>
>
>
>
1
2
3
4
[require foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_hdrcmd_require2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[require foo]
[manpage_end]

Added modules/doctools/tests/syntax/e_hdrcmd_titledesc1.









>
>
>
>
1
2
3
4
[titledesc foo]
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_hdrcmd_titledesc2.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[titledesc foo]
[manpage_end]

Added modules/doctools/tests/syntax/e_invalidlist_list_begin.











>
>
>
>
>
1
2
3
4
5
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[list_begin bogus]
[list_end]
[manpage_end]

Added modules/doctools/tests/syntax/e_listcmd_arg_def.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[arg_def arg-type arg-name]
[manpage_end]

Added modules/doctools/tests/syntax/e_listcmd_call.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[call .command.]
[manpage_end]

Added modules/doctools/tests/syntax/e_listcmd_cmd_def.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[cmd_def .command.]
[manpage_end]

Added modules/doctools/tests/syntax/e_listcmd_def.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[def]
[manpage_end]

Added modules/doctools/tests/syntax/e_listcmd_enum.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[enum]
[manpage_end]

Added modules/doctools/tests/syntax/e_listcmd_item.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[item]
[manpage_end]

Added modules/doctools/tests/syntax/e_listcmd_opt_def.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[opt_def .option.]
[manpage_end]

Added modules/doctools/tests/syntax/e_listcmd_tkoption_def.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]

[tkoption_def .option. .dbname. .dbclass.]
[manpage_end]

Added modules/doctools/tests/syntax/e_mpbegin.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[manpage_begin BOGUS e 2.71828182845904523536]
[description]
[manpage_end]

Added modules/doctools/tests/syntax/e_nodonecmd_arg.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[arg .a.]

Added modules/doctools/tests/syntax/e_nodonecmd_class.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[class .c.]

Added modules/doctools/tests/syntax/e_nodonecmd_cmd.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[cmd .c.]

Added modules/doctools/tests/syntax/e_nodonecmd_comment.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[comment .c]

Added modules/doctools/tests/syntax/e_nodonecmd_const.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[const .c.]

Added modules/doctools/tests/syntax/e_nodonecmd_emph.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[emph .t.]

Added modules/doctools/tests/syntax/e_nodonecmd_file.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[file .f.]

Added modules/doctools/tests/syntax/e_nodonecmd_fun.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[fun .f.]

Added modules/doctools/tests/syntax/e_nodonecmd_keywords.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[keywords .kw.]

Added modules/doctools/tests/syntax/e_nodonecmd_method.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[method .m.]

Added modules/doctools/tests/syntax/e_nodonecmd_namespace.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[namespace .n.]

Added modules/doctools/tests/syntax/e_nodonecmd_opt.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[opt .o]

Added modules/doctools/tests/syntax/e_nodonecmd_option.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[option .o.]

Added modules/doctools/tests/syntax/e_nodonecmd_package.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[package .p.]

Added modules/doctools/tests/syntax/e_nodonecmd_see_also.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[see_also .sa.]

Added modules/doctools/tests/syntax/e_nodonecmd_syscmd.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[syscmd .t]

Added modules/doctools/tests/syntax/e_nodonecmd_term.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[term .t.]

Added modules/doctools/tests/syntax/e_nodonecmd_type.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[type .t.]

Added modules/doctools/tests/syntax/e_nodonecmd_uri.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[uri .u.]

Added modules/doctools/tests/syntax/e_nodonecmd_usage.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[usage .c.]

Added modules/doctools/tests/syntax/e_nodonecmd_var.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[var .v]

Added modules/doctools/tests/syntax/e_nodonecmd_widget.









>
>
>
>
1
2
3
4
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[manpage_end]
[widget .w.]

Added modules/doctools/tests/syntax/e_nolistcmd_section.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[section foo]
[manpage_end]

Added modules/doctools/tests/syntax/e_nolistcmd_subsection.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad subsection}]
[list_begin definitions]
[subsection foo]
[manpage_end]

Added modules/doctools/tests/syntax/e_nolisthdr_example.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad example before list item}]
[list_begin definitions]
[example {}]
[manpage_end]

Added modules/doctools/tests/syntax/e_nolisthdr_example_begin.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad example_begin before list item}]
[list_begin definitions]
[example_begin]
[manpage_end]

Added modules/doctools/tests/syntax/e_nolisthdr_list_begin.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad list_begin before list item}]
[list_begin definitions]
[list_begin definitions]
[manpage_end]

Added modules/doctools/tests/syntax/e_nolisthdr_para.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad para before list item}]
[list_begin definitions]
[para]
[manpage_end]

Added modules/doctools/tests/syntax/e_nolisthdr_sectref.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad sectref S before list item}]
[list_begin definitions]
[sectref S]
[manpage_end]

Added modules/doctools/tests/syntax/e_nolisttxt.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[list_begin definitions]
Text between list_begin and first item is not allowed
[def foo]
[list_end]
[manpage_end]

Added modules/doctools/tests/syntax/e_opt_list.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[opt_def .option.]
[manpage_end]

Added modules/doctools/tests/syntax/e_tkoption_list.













>
>
>
>
>
>
1
2
3
4
5
6
[manpage_begin ERROR e 2.71828182845904523536]
[description]
[comment {bad section}]
[list_begin definitions]
[tkoption_def .option. .dbname. .dbclass.]
[manpage_end]

Added modules/doctools/tests/syntax/r_arg_list.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[arg_def arg-type arg-name]
--> (FmtError) Manpage error (arg_list), "arg_def arg-type arg-name" : Command restricted to usage in argument lists.

Added modules/doctools/tests/syntax/r_body.









>
>
>
>
1
2
3
4
Doctools Error in plain text at line 1, column 0:
[plain_text {Text before manpag...]
--> (FmtError) Manpage error (body), "plain_text Text before manpage_begin is not allowed
" : Plain text not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_arg_def1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[arg_def arg-type arg-name]
--> (FmtError) Manpage error (bodycmd), "arg_def arg-type arg-name" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_arg_def2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[arg_def arg-type arg-name]
--> (FmtError) Manpage error (bodycmd), "arg_def arg-type arg-name" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_arg_def3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[arg_def arg-type arg-name]
--> (FmtError) Manpage error (bodycmd), "arg_def arg-type arg-name" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_call1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[call .command.]
--> (FmtError) Manpage error (bodycmd), "call .command." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_call2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[call .command.]
--> (FmtError) Manpage error (bodycmd), "call .command." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_call3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[call .command.]
--> (FmtError) Manpage error (bodycmd), "call .command." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_cmd_def1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[cmd_def .command.]
--> (FmtError) Manpage error (bodycmd), "cmd_def .command." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_cmd_def2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[cmd_def .command.]
--> (FmtError) Manpage error (bodycmd), "cmd_def .command." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_cmd_def3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[cmd_def .command.]
--> (FmtError) Manpage error (bodycmd), "cmd_def .command." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_def1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[def]
--> (FmtError) Manpage error (bodycmd), "def" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_def2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[def]
--> (FmtError) Manpage error (bodycmd), "def" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_def3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[def]
--> (FmtError) Manpage error (bodycmd), "def" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_enum1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[enum]
--> (FmtError) Manpage error (bodycmd), "enum" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_enum2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[enum]
--> (FmtError) Manpage error (bodycmd), "enum" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_enum3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[enum]
--> (FmtError) Manpage error (bodycmd), "enum" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_example1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[example {}]
--> (FmtError) Manpage error (bodycmd), "example " : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_example2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[example {}]
--> (FmtError) Manpage error (bodycmd), "example " : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_example3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[example {}]
--> (FmtError) Manpage error (bodycmd), "example " : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_example_begin1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[example_begin]
--> (FmtError) Manpage error (bodycmd), "example_begin" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_example_begin2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[example_begin]
--> (FmtError) Manpage error (bodycmd), "example_begin" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_example_begin3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[example_begin]
--> (FmtError) Manpage error (bodycmd), "example_begin" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_item1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[item]
--> (FmtError) Manpage error (bodycmd), "item" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_item2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[item]
--> (FmtError) Manpage error (bodycmd), "item" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_item3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[item]
--> (FmtError) Manpage error (bodycmd), "item" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_list_begin1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[list_begin definitions]
--> (FmtError) Manpage error (bodycmd), "list_begin definitions" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_list_begin2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[list_begin definitions]
--> (FmtError) Manpage error (bodycmd), "list_begin definitions" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_list_begin3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[list_begin definitions]
--> (FmtError) Manpage error (bodycmd), "list_begin definitions" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_list_end1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[list_end]
--> (FmtError) Manpage error (bodycmd), "list_end" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_list_end2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[list_end]
--> (FmtError) Manpage error (bodycmd), "list_end" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_list_end3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[list_end]
--> (FmtError) Manpage error (bodycmd), "list_end" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_manpage_end.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[manpage_end]
--> (FmtError) Manpage error (bodycmd), "manpage_end" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_opt_def1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[opt_def .option.]
--> (FmtError) Manpage error (bodycmd), "opt_def .option." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_opt_def2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[opt_def .option.]
--> (FmtError) Manpage error (bodycmd), "opt_def .option." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_opt_def3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[opt_def .option.]
--> (FmtError) Manpage error (bodycmd), "opt_def .option." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_para1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[para]
--> (FmtError) Manpage error (bodycmd), "para" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_para2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[para]
--> (FmtError) Manpage error (bodycmd), "para" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_para3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[para]
--> (FmtError) Manpage error (bodycmd), "para" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_section1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[section foo]
--> (FmtError) Manpage error (bodycmd), "section foo" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_section2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[section foo]
--> (FmtError) Manpage error (bodycmd), "section foo" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_section3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[section foo]
--> (FmtError) Manpage error (bodycmd), "section foo" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_sectref1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[sectref S]
--> (FmtError) Manpage error (bodycmd), "sectref S" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_sectref2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[sectref S]
--> (FmtError) Manpage error (bodycmd), "sectref S" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_sectref3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[sectref S]
--> (FmtError) Manpage error (bodycmd), "sectref S" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_subsection1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[subsection foo]
--> (FmtError) Manpage error (bodycmd), "subsection foo" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_subsection2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[subsection foo]
--> (FmtError) Manpage error (bodycmd), "subsection foo" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_subsection3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[subsection foo]
--> (FmtError) Manpage error (bodycmd), "subsection foo" : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_tkoption_def1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[tkoption_def .option. .dbname....]
--> (FmtError) Manpage error (bodycmd), "tkoption_def .option. .dbname. .dbclass." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_tkoption_def2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[tkoption_def .option. .dbname....]
--> (FmtError) Manpage error (bodycmd), "tkoption_def .option. .dbname. .dbclass." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bodycmd_tkoption_def3.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[tkoption_def .option. .dbname....]
--> (FmtError) Manpage error (bodycmd), "tkoption_def .option. .dbname. .dbclass." : Command not allowed outside of the body of the manpage.

Added modules/doctools/tests/syntax/r_bulletlist.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[item]
--> (FmtError) Manpage error (bulletlist), "item" : Command restricted to usage in itemized lists.

Added modules/doctools/tests/syntax/r_cmd_list.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[cmd_def .command.]
--> (FmtError) Manpage error (cmd_list), "cmd_def .command." : Command restricted to usage in command lists.

Added modules/doctools/tests/syntax/r_deflist_call.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[call .command.]
--> (FmtError) Manpage error (deflist), "call .command." : Command restricted to usage in definition lists.

Added modules/doctools/tests/syntax/r_deflist_def.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[def]
--> (FmtError) Manpage error (deflist), "def" : Command restricted to usage in definition lists.

Added modules/doctools/tests/syntax/r_end_open_example.



>
1
(FmtError) Manpage error (end/open/example), "ck_complete" : End of manpage reached, [example_end] missing.

Added modules/doctools/tests/syntax/r_end_open_list.



>
1
(FmtError) Manpage error (end/open/list), "ck_complete" : End of manpage reached, [list_end] missing.

Added modules/doctools/tests/syntax/r_end_open_mp.



>
1
(FmtError) Manpage error (end/open/mp), "ck_complete" : End of manpage reached, [manpage_end] missing.

Added modules/doctools/tests/syntax/r_enumlist.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[enum]
--> (FmtError) Manpage error (enumlist), "enum" : Command restricted to usage in enumerated lists.

Added modules/doctools/tests/syntax/r_examplecmd1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[example_end]
--> (FmtError) Manpage error (examplecmd), "example_end" : Command allowed only to close example section.

Added modules/doctools/tests/syntax/r_examplecmd2.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[example_end]
--> (FmtError) Manpage error (examplecmd), "example_end" : Command allowed only to close example section.

Added modules/doctools/tests/syntax/r_examplecmd3.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[example_end]
--> (FmtError) Manpage error (examplecmd), "example_end" : Command allowed only to close example section.

Added modules/doctools/tests/syntax/r_hdrcmd_copyright1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[copyright foo]
--> (FmtError) Manpage error (hdrcmd), "copyright foo" : Command not allowed outside of the header section.

Added modules/doctools/tests/syntax/r_hdrcmd_copyright2.







>
>
>
1
2
3
Doctools Error in macro at line 3, column 0:
[copyright foo]
--> (FmtError) Manpage error (hdrcmd), "copyright foo" : Command not allowed outside of the header section.

Added modules/doctools/tests/syntax/r_hdrcmd_description1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[description]
--> (FmtError) Manpage error (hdrcmd), "description" : Command not allowed outside of the header section.

Added modules/doctools/tests/syntax/r_hdrcmd_description2.







>
>
>
1
2
3
Doctools Error in macro at line 3, column 0:
[description]
--> (FmtError) Manpage error (hdrcmd), "description" : Command not allowed outside of the header section.

Added modules/doctools/tests/syntax/r_hdrcmd_moddesc1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[moddesc foo]
--> (FmtError) Manpage error (hdrcmd), "moddesc foo" : Command not allowed outside of the header section.

Added modules/doctools/tests/syntax/r_hdrcmd_moddesc2.







>
>
>
1
2
3
Doctools Error in macro at line 3, column 0:
[moddesc foo]
--> (FmtError) Manpage error (hdrcmd), "moddesc foo" : Command not allowed outside of the header section.

Added modules/doctools/tests/syntax/r_hdrcmd_require1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[require foo]
--> (FmtError) Manpage error (hdrcmd), "require foo" : Command not allowed outside of the header section.

Added modules/doctools/tests/syntax/r_hdrcmd_require2.







>
>
>
1
2
3
Doctools Error in macro at line 3, column 0:
[require foo]
--> (FmtError) Manpage error (hdrcmd), "require foo" : Command not allowed outside of the header section.

Added modules/doctools/tests/syntax/r_hdrcmd_titledesc1.







>
>
>
1
2
3
Doctools Error in macro at line 1, column 0:
[titledesc foo]
--> (FmtError) Manpage error (hdrcmd), "titledesc foo" : Command not allowed outside of the header section.

Added modules/doctools/tests/syntax/r_hdrcmd_titledesc2.







>
>
>
1
2
3
Doctools Error in macro at line 3, column 0:
[titledesc foo]
--> (FmtError) Manpage error (hdrcmd), "titledesc foo" : Command not allowed outside of the header section.

Added modules/doctools/tests/syntax/r_invalidlist_list_begin.







>
>
>
1
2
3
Doctools Error in macro at line 3, column 0:
[list_begin bogus]
--> (FmtError) Manpage error (invalidlist), "list_begin bogus" : Invalid list type "bogus".

Added modules/doctools/tests/syntax/r_listcmd_arg_def.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[arg_def arg-type arg-name]
--> (FmtError) Manpage error (listcmd), "arg_def arg-type arg-name" : Command not allowed outside of a list.

Added modules/doctools/tests/syntax/r_listcmd_call.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[call .command.]
--> (FmtError) Manpage error (listcmd), "call .command." : Command not allowed outside of a list.

Added modules/doctools/tests/syntax/r_listcmd_cmd_def.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[cmd_def .command.]
--> (FmtError) Manpage error (listcmd), "cmd_def .command." : Command not allowed outside of a list.

Added modules/doctools/tests/syntax/r_listcmd_def.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[def]
--> (FmtError) Manpage error (listcmd), "def" : Command not allowed outside of a list.

Added modules/doctools/tests/syntax/r_listcmd_enum.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[enum]
--> (FmtError) Manpage error (listcmd), "enum" : Command not allowed outside of a list.

Added modules/doctools/tests/syntax/r_listcmd_item.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[item]
--> (FmtError) Manpage error (listcmd), "item" : Command not allowed outside of a list.

Added modules/doctools/tests/syntax/r_listcmd_opt_def.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[opt_def .option.]
--> (FmtError) Manpage error (listcmd), "opt_def .option." : Command not allowed outside of a list.

Added modules/doctools/tests/syntax/r_listcmd_tkoption_def.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[tkoption_def .option. .dbname....]
--> (FmtError) Manpage error (listcmd), "tkoption_def .option. .dbname. .dbclass." : Command not allowed outside of a list.

Added modules/doctools/tests/syntax/r_mpbegin.







>
>
>
1
2
3
Doctools Error in macro at line 2, column 0:
[manpage_begin BOGUS e 2.718281...]
--> (FmtError) Manpage error (mpbegin), "manpage_begin BOGUS e 2.71828182845904523536" : Command must be first of manpage.

Added modules/doctools/tests/syntax/r_nodonecmd_arg.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[arg .a.]
--> (FmtError) Manpage error (nodonecmd), "arg .a." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_class.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[class .c.]
--> (FmtError) Manpage error (nodonecmd), "class .c." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_cmd.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[cmd .c.]
--> (FmtError) Manpage error (nodonecmd), "cmd .c." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_comment.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[comment .c]
--> (FmtError) Manpage error (nodonecmd), "comment .c" : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_const.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[const .c.]
--> (FmtError) Manpage error (nodonecmd), "const .c." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_emph.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[emph .t.]
--> (FmtError) Manpage error (nodonecmd), "emph .t." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_file.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[file .f.]
--> (FmtError) Manpage error (nodonecmd), "file .f." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_fun.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[fun .f.]
--> (FmtError) Manpage error (nodonecmd), "fun .f." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_keywords.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[keywords .kw.]
--> (FmtError) Manpage error (nodonecmd), "keywords .kw." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_method.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[method .m.]
--> (FmtError) Manpage error (nodonecmd), "method .m." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_namespace.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[namespace .n.]
--> (FmtError) Manpage error (nodonecmd), "_namespace .n." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_opt.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[opt .o]
--> (FmtError) Manpage error (nodonecmd), "opt .o" : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_option.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[option .o.]
--> (FmtError) Manpage error (nodonecmd), "option .o." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_package.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[package .p.]
--> (FmtError) Manpage error (nodonecmd), "package .p." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_see_also.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[see_also .sa.]
--> (FmtError) Manpage error (nodonecmd), "see_also .sa." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_syscmd.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[syscmd .t]
--> (FmtError) Manpage error (nodonecmd), "syscmd .t" : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_term.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[term .t.]
--> (FmtError) Manpage error (nodonecmd), "term .t." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_type.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[type .t.]
--> (FmtError) Manpage error (nodonecmd), "type .t." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_uri.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[uri .u.]
--> (FmtError) Manpage error (nodonecmd), "uri .u." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_usage.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[usage .c.]
--> (FmtError) Manpage error (nodonecmd), "usage .c." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_var.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[var .v]
--> (FmtError) Manpage error (nodonecmd), "var .v" : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nodonecmd_widget.







>
>
>
1
2
3
Doctools Error in macro at line 4, column 0:
[widget .w.]
--> (FmtError) Manpage error (nodonecmd), "widget .w." : Command not allowed after [manpage_end].

Added modules/doctools/tests/syntax/r_nolistcmd_section.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[section foo]
--> (FmtError) Manpage error (nolistcmd), "section foo" : Command not allowed inside of a list.

Added modules/doctools/tests/syntax/r_nolistcmd_subsection.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[subsection foo]
--> (FmtError) Manpage error (nolistcmd), "subsection foo" : Command not allowed inside of a list.

Added modules/doctools/tests/syntax/r_nolisthdr_example.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[example {}]
--> (FmtError) Manpage error (nolisthdr), "example " : Command not allowed between beginning of a list and its first item.

Added modules/doctools/tests/syntax/r_nolisthdr_example_begin.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[example_begin]
--> (FmtError) Manpage error (nolisthdr), "example_begin" : Command not allowed between beginning of a list and its first item.

Added modules/doctools/tests/syntax/r_nolisthdr_list_begin.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[list_begin definitions]
--> (FmtError) Manpage error (nolisthdr), "list_begin definitions" : Command not allowed between beginning of a list and its first item.

Added modules/doctools/tests/syntax/r_nolisthdr_para.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[para]
--> (FmtError) Manpage error (nolisthdr), "para" : Command not allowed between beginning of a list and its first item.

Added modules/doctools/tests/syntax/r_nolisthdr_sectref.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[sectref S]
--> (FmtError) Manpage error (nolisthdr), "sectref S" : Command not allowed between beginning of a list and its first item.

Added modules/doctools/tests/syntax/r_nolisttxt.













>
>
>
>
>
>
1
2
3
4
5
6
Doctools Error in plain text at line 3, column 24:
[plain_text {
Text between list...]
--> (FmtError) Manpage error (nolisttxt), "plain_text 
Text between list_begin and first item is not allowed
" : Plain text not allowed between beginning of a list and its first item.

Added modules/doctools/tests/syntax/r_opt_list.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[opt_def .option.]
--> (FmtError) Manpage error (opt_list), "opt_def .option." : Command restricted to usage in option lists.

Added modules/doctools/tests/syntax/r_tkoption_list.







>
>
>
1
2
3
Doctools Error in macro at line 5, column 0:
[tkoption_def .option. .dbname....]
--> (FmtError) Manpage error (tkoption_list), "tkoption_def .option. .dbname. .dbclass." : Command restricted to usage in tkoption lists.

Added modules/doctools/tests/text/00.



































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/01.

















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

Argument ::Argument:: Class ::*Class*:: Command ::Command:: Comment :::: Const
::*Constant*:: Emphasis ::_Emphasis_:: File ::"File/Path":: Function
::*Function*:: Method ::Method:: Namespace ::*Namespace*:: Option ::Option::
Optional ::?Optional?:: Package ::*Package*:: Syscmd ::*SystemCommand*:: Term
::_Term_:: Type ::*Type*:: Uri ::<URL:Uri>:: Variable ::*Variable*:: Widget
::*Widget*::

COPYRIGHT
=========

Copyright (c) **Copyright**

Added modules/doctools/tests/text/02.



































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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

TEST - ..THE_MODULE..
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. "..THE_MODULE.."

NAME
====

TEST - ..THE_TITLE..

SYNOPSIS
========

package require AAA
package require BBB VVV

DESCRIPTION
===========

SEE ALSO
========

ELSE, OTHER

KEYWORDS
========

KEYA, KEYZ

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/03.





























































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

AaA
===

1

BbB
===

22

BbB.cCc
-------

333

BbB.dDd
-------

4444

EeE
===

5555

At -> AaA.

At -> __undefined__.

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/04.

























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

BEGINNE HIER


| Example Block  More Lines


| Inlined Example \
| Next Line

FERTIG

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/05.













































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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

BASIC - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
BASIC(a) 5 .MODULE. ""

NAME
====

BASIC -

SYNOPSIS
========

a-command 

DESCRIPTION
===========

OK

    integer argument-1

        verification

    string argument-2 (out)

        mogrification

    command-a

        explanation

    command-b

        elucidation

    term

        definition

    a-command

        semantic

    [1] A

    [2] B

        C

        D

    *   1

    *   2

        2a

        2b

    option-1

        meaning

    option-2 value

        elaboration

    Command-Line Switch:	background
    Database Name:	*Background*
    Database Class:	*Color*

        candy

    Command-Line Switch:	foreground
    Database Name:	*Foreground*
    Database Class:	*Color*

        caramel

KO

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/06.











































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

    *   1

        2

        3

        [1] a

            b

            c

            foo

                snafu

            bar

                barf

            roo

                gork

        [2] a

            b

            c

    *   4

        5

        6

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/07.



























































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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

TEST - 
Generated from file '.FILE.' by tcllib/doctools with format 'text'
TEST(z) 3.14.15.926 .MODULE. ""

NAME
====

TEST -

DESCRIPTION
===========

    *   1

    *   2

        [1] a

        [2] b

            foo

                snafu

            bar

                barf

            roo

                gork

        [3] bb

        [4] a

    *   22

    *   3

COPYRIGHT
=========

Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/text/08.





















































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138

ALL - ..THE_MODULE..
Generated from file '.FILE.' by tcllib/doctools with format 'text'
ALL(a) 5 .MODULE. "..THE_MODULE.."

NAME
====

ALL - ..THE_TITLE..

SYNOPSIS
========

package require AAA
package require BBB VVV
package require CCC ?VVV?

CMDNAME ...
CMDNAME ...
CMDNAME ...

DESCRIPTION
===========

    NAME

        DESCRIPTION ::Command::

    NAME

        DESCRIPTION ::::

    NAME

        DESCRIPTION ::*Constant*::

API
===

    TERM

        DESCRIPTION ::_Emphasis_::

    TERM

        DESCRIPTION ::"File/Path"::

        Command-Line Switch:	NAME
        Database Name:	*DBNAME*
        Database Class:	*CLASS*

            DESCRIPTION -> NARGLE

        Command-Line Switch:	NAME
        Database Name:	*DBNAME*
        Database Class:	*CLASS*

            DESCRIPTION ::*Function*::

        Command-Line Switch:	NAME
        Database Name:	*DBNAME*
        Database Class:	*CLASS*

            DESCRIPTION ::Method::

    TERM

        DESCRIPTION

    CMDNAME ...

        DESCRIPTION ::*Namespace*::

        TYPE NAME

            DESCRIPTION ::Argument::

        TYPE NAME

            DESCRIPTION ::Option::

        TYPE NAME (MODE)

            DESCRIPTION ::?Optional?::


            | THE ARGUMENT IS USED IN THIS
            | AND/OR THAT MANNER

    CMDNAME ...

        DESCRIPTION ::*Package*::

    CMDNAME ...

        DESCRIPTION ::*SystemCommand*::

        NAME

            DESCRIPTION ::_Term_::

        NAME

            DESCRIPTION ::*Type*::

        NAME ARGUMENT

            DESCRIPTION ::<URL:Uri>::

NARGLE
------

    [1] PARAGRAPH ::_UriLabel_ <URL:Uri>::

    [2] PARAGRAPH ::*Variable*::

    [3] PARAGRAPH ::*Widget*::

        *   PARAGRAPH ::*Class*::

        *   PARAGRAPH

        *   PARAGRAPH

SEE ALSO
========

ELSE, OTHER

KEYWORDS
========

KEYA, KEYZ

COPYRIGHT
=========

Copyright (c) **Copyright**

Added modules/doctools/tests/tmml/00.







































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
</section>



</manpage>

Added modules/doctools/tests/tmml/01.















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) **Copyright**'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>



<section id='section1'>
<title>DESCRIPTION</title>
Argument	::<m>Argument</m>::
Class		::<class>Class</class>::
Command		::<cmd>Command</cmd>::
Comment		::::
Const		::<l>Constant</l>::
Emphasis	::<emph>Emphasis</emph>::
File		::<file>File/Path</file>::
Function	::<fun>Function</fun>::
Method		::<method>Method</method>::
Namespace	::<term>Namespace</term>::
Option		::<option>Option</option>::
Optional	::<o>Optional</o>::
Package		::<package>Package</package>::
Syscmd		::<syscmd>SystemCommand</syscmd>::
Term		::<term>Term</term>::
Type		::<type>Type</type>::
Uri		::<url>Uri</url>::
Variable	::<variable>Variable</variable>::
Widget		::<widget>Widget</widget>::
</section>



</manpage>

Added modules/doctools/tests/tmml/02.









































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc>..THE_TITLE..</desc>

</namesection>







<synopsis>
<syntax>
package require <package>AAA</package> 
package require <package>BBB</package> VVV
</syntax>
</synopsis>
<section id='section1'>
<title>DESCRIPTION</title>
</section>
<seealso>
<ref>OTHER</ref>
<ref>ELSE</ref>
</seealso>
<keywords>
<keyword>KEYA</keyword>
<keyword>KEYZ</keyword>
</keywords>

</manpage>

Added modules/doctools/tests/tmml/03.



































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
</section>
<section id='section2'>
<title>AAA</title>
1
</section>
<section id='section3'>
<title>BBB</title>
22

<subsection id='subsection1'>
<title>BBB.CCC</title>
333
</subsection>
<subsection id='subsection2'>
<title>BBB.DDD</title>
4444
</subsection>
</section>
<section id='section4'>
<title>EEE</title>
5555


<p>
At <ref refid='section2'>AaA</ref>.
</p>
<p>
At <emph>__undefined__</emph>.
</p>
</section>



</manpage>

Added modules/doctools/tests/tmml/04.











































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>
BEGINNE HIER

<example>
	 Example Block  More Lines

</example>

<p>
</p>
<p>
</p>
<example>
Inlined Example \
Next Line

</example>
FERTIG
</section>



</manpage>

Added modules/doctools/tests/tmml/05.





































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='BASIC' version='5' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>BASIC</name>
<desc></desc>

</namesection>

<synopsis>
<syntax>
a-command 
</syntax>
</synopsis>
<section id='section1'>
<title>DESCRIPTION</title>
OK

<p>
</p>
<arglist>

<argdef>
<argtype>integer</argtype>
<name>argument-1</name>

<desc>
verification
</desc>
</argdef>
<argdef>
<argtype>string</argtype>
<name>argument-2</name>
<argmode>out</argmode>
<desc> mogrification
</desc>
</argdef>

</arglist>

<p>
</p>
<commandlist>

<commanddef>
<command>command-a</command>
<desc> explanation
</desc>
</commanddef>
<commanddef>
<command>command-b</command>
<desc>
elucidation
</desc>
</commanddef>

</commandlist>

<p>
</p>
<dl>

<dle>
<dt>term</dt>
<dd> definition
</dd>
</dle>
<dle>
<dt>a-command </dt>
<dd>
semantic
</dd>
</dle>

</dl>

<p>
</p>
<ol>

<li>
A
</li>
<li> B
<br/>
C
<br/>
D
</li>

</ol>

<p>
</p>
<ul>

<li>
1
</li>
<li> 2
<br/>
2a
<br/>
2b
</li>

</ul>

<p>
</p>
<optlist>

<optdef>
<optname>option-1</optname>

<desc> meaning
</desc>
</optdef>
<optdef>
<optname>option-2</optname>
<optarg>value</optarg>
<desc>
elaboration
</desc>
</optdef>

</optlist>

<p>
</p>
<optionlist>

<optiondef>
<name>background</name>
<dbname>Background</dbname>
<dbclass>Color</dbclass>
<desc> candy
</desc>
</optiondef>
<optiondef>
<name>foreground</name>
<dbname>Foreground</dbname>
<dbclass>Color</dbclass>
<desc>
caramel
</desc>
</optiondef>

</optionlist>

<p>
KO

</p>
</section>



</manpage>

Added modules/doctools/tests/tmml/06.





























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>


<ul>

<li> 1 <br/> 2 <br/> 3
</li>
<li>

<ol>

<li> a <br/> b <br/> c
</li>
<li>

<dl>

<dle>
<dt>foo</dt>
<dd> snafu
</dd>
</dle>
<dle>
<dt>bar</dt>
<dd> barf
</dd>
</dle>
<dle>
<dt>roo</dt>
<dd> gork
</dd>
</dle>

</dl>
</li>
<li> a <br/> b <br/> c
</li>

</ol>
</li>
<li> 4 <br/> 5 <br/> 6
</li>

</ul>
</section>



</manpage>

Added modules/doctools/tests/tmml/07.

































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='TEST' version='3.14.15.926' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) .COPYRIGHT.'/>
</head>
<namesection>
<name>TEST</name>
<desc></desc>

</namesection>


<section id='section1'>
<title>DESCRIPTION</title>


<ul>

<li> 1
</li>
<li> 2

<ol>

<li> a
</li>
<li> b

<dl>

<dle>
<dt>foo</dt>
<dd> snafu
</dd>
</dle>
<dle>
<dt>bar</dt>
<dd> barf
</dd>
</dle>
<dle>
<dt>roo</dt>
<dd> gork
</dd>
</dle>

</dl>
bb
</li>
<li> a
</li>

</ol>
22
</li>
<li> 3
</li>

</ul>
</section>



</manpage>

Added modules/doctools/tests/tmml/08.































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

<!-- Generated from file '.FILE.' by tcllib/doctools with format 'tmml' -->
<manpage id='.FILE' cat='cmd' title='ALL' version='5' package='.MODULE.'>
<head>
<info key='copyright' value='Copyright (c) **Copyright**'/>
</head>
<namesection>
<name>ALL</name>
<desc>..THE_TITLE..</desc>

</namesection>







<synopsis>
<syntax>
package require <package>AAA</package> 
package require <package>BBB</package> VVV
package require <package>CCC</package> <o>VVV</o>
CMDNAME ...
CMDNAME ...
CMDNAME ...
</syntax>
</synopsis>
<section id='section1'>
<title>DESCRIPTION</title>

<commandlist>

<commanddef>
<command>NAME</command>
<desc> DESCRIPTION ::<cmd>Command</cmd>::
</desc>
</commanddef>
<commanddef>
<command>NAME</command>
<desc> DESCRIPTION ::::
</desc>
</commanddef>
<commanddef>
<command>NAME</command>
<desc> DESCRIPTION ::<l>Constant</l>::
</desc>
</commanddef>

</commandlist>
</section>
<section id='section2'>
<title>API</title>

<dl>

<dle>
<dt>TERM</dt>
<dd> DESCRIPTION ::<emph>Emphasis</emph>::
</dd>
</dle>
<dle>
<dt>TERM</dt>
<dd> DESCRIPTION ::<file>File/Path</file>::

<optionlist>

<optiondef>
<name>NAME</name>
<dbname>DBNAME</dbname>
<dbclass>CLASS</dbclass>
<desc> DESCRIPTION <ref refid='subsection1'>NARGLE</ref>
</desc>
</optiondef>
<optiondef>
<name>NAME</name>
<dbname>DBNAME</dbname>
<dbclass>CLASS</dbclass>
<desc> DESCRIPTION ::<fun>Function</fun>::
</desc>
</optiondef>
<optiondef>
<name>NAME</name>
<dbname>DBNAME</dbname>
<dbclass>CLASS</dbclass>
<desc> DESCRIPTION ::<method>Method</method>::
</desc>
</optiondef>

</optionlist>
</dd>
</dle>
<dle>
<dt>TERM</dt>
<dd> DESCRIPTION
</dd>
</dle>
<dle>
<dt>CMDNAME ...</dt>
<dd> DESCRIPTION ::<term>Namespace</term>::

<arglist>

<argdef>
<argtype>TYPE</argtype>
<name>NAME</name>

<desc> DESCRIPTION ::<m>Argument</m>::
</desc>
</argdef>
<argdef>
<argtype>TYPE</argtype>
<name>NAME</name>

<desc> DESCRIPTION ::<option>Option</option>::
</desc>
</argdef>
<argdef>
<argtype>TYPE</argtype>
<name>NAME</name>
<argmode>MODE</argmode>
<desc> DESCRIPTION ::<o>Optional</o>::

<example>
    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER

</example>
</desc>
</argdef>

</arglist>
</dd>
</dle>
<dle>
<dt>CMDNAME ...</dt>
<dd> DESCRIPTION ::<package>Package</package>::
</dd>
</dle>
<dle>
<dt>CMDNAME ...</dt>
<dd> DESCRIPTION ::<syscmd>SystemCommand</syscmd>::

<optlist>

<optdef>
<optname>NAME</optname>

<desc> DESCRIPTION ::<term>Term</term>::
</desc>
</optdef>
<optdef>
<optname>NAME</optname>

<desc> DESCRIPTION ::<type>Type</type>::
</desc>
</optdef>
<optdef>
<optname>NAME</optname>
<optarg>ARGUMENT</optarg>
<desc> DESCRIPTION ::<url>Uri</url>::
</desc>
</optdef>

</optlist>
</dd>
</dle>

</dl>

<subsection id='subsection1'>
<title>NARGLE</title>
</subsection>
<ol>

<li> PARAGRAPH ::<url>Uri</url>::
</li>
<li> PARAGRAPH ::<variable>Variable</variable>::
</li>
<li> PARAGRAPH ::<widget>Widget</widget>::

<ul>

<li> PARAGRAPH ::<class>Class</class>::
</li>
<li> PARAGRAPH
</li>
<li> PARAGRAPH
</li>

</ul>
</li>

</ol>


</section>
<seealso>
<ref>OTHER</ref>
<ref>ELSE</ref>
</seealso>
<keywords>
<keyword>KEYA</keyword>
<keyword>KEYZ</keyword>
</keywords>

</manpage>

Deleted modules/doctools/tests/toc/html/00.

1
2
3
4
5
6
7
8
9
10
11
<!DOCTYPE html><html><head>
<title> TOC </title>
</head>
<!-- Generated by tcllib/doctools/toc with format 'html'
   -->
<!-- TOC
   -->
<body>
<h3>TOC</h3>
<hr><dl><dt><h2>Test</h2></dt><dd>
</dd></dl><hr></body></html>
<
<
<
<
<
<
<
<
<
<
<






















Deleted modules/doctools/tests/toc/html/01.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html><html><head>
<title> TOC </title>
</head>
<!-- Generated by tcllib/doctools/toc with format 'html'
   -->
<!-- TOC
   -->
<body>
<h3>TOC</h3>
<hr><dl><dt><h2>Test</h2></dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='i1'><a href="I1f">i1</a></td>
<td class="#doctools_tocright">i1d</td>
</tr>
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='i2'><a href="I2f">i2</a></td>
<td class="#doctools_tocright">i2d</td>
</tr>
</table>
</dd></dl><hr></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































Deleted modules/doctools/tests/toc/html/02.

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
<!DOCTYPE html><html><head>
<title> TOC </title>
</head>
<!-- Generated by tcllib/doctools/toc with format 'html'
   -->
<!-- TOC
   -->
<body>
<h3>TOC</h3>
<hr><dl><dt><h2>Test</h2></dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='i1'><a href="I1f">i1</a></td>
<td class="#doctools_tocright">i1d</td>
</tr>
</table>
<dl><dt><a name='_1_a_href_1_df_1_1_d_1_a_1_'><a href="Df">D</a></dt><dd>
<table class="#doctools_toc">
<tr class="#doctools_tocodd"  >
<td class="#doctools_tocleft" ><a name='i2'><a href="I2f">i2</a></td>
<td class="#doctools_tocright">i2d</td>
</tr>
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='i3'><a href="I3f">i3</a></td>
<td class="#doctools_tocright">i3d</td>
</tr>
</table></dl>
<table class="#doctools_toc">
<tr class="#doctools_toceven" >
<td class="#doctools_tocleft" ><a name='i4'><a href="I4f">i4</a></td>
<td class="#doctools_tocright">i4d</td>
</tr>
</table>
</dd></dl><hr></body></html>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































Deleted modules/doctools/tests/toc/markdown/00.

1
2
3
4

[//000000001]: # (Table of contents generated by tcllib/doctools/toc with format 'markdown')

# TOC \-\- Test
<
<
<
<








Deleted modules/doctools/tests/toc/markdown/01.

1
2
3
4
5
6
7
8

[//000000001]: # (Table of contents generated by tcllib/doctools/toc with format 'markdown')

# TOC \-\- Test

  - [i1](I1f) i1d

  - [i2](I2f) i2d
<
<
<
<
<
<
<
<
















Deleted modules/doctools/tests/toc/markdown/02.

1
2
3
4
5
6
7
8
9
10
11
12
13
14

[//000000001]: # (Table of contents generated by tcllib/doctools/toc with format 'markdown')

# TOC \-\- Test

  - [i1](I1f) i1d

  - [D](Df)

      * [i2](I2f) i2d

      * [i3](I3f) i3d

  - [i4](I4f) i4d
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Deleted modules/doctools/tests/toc/markdown/index.

1
2
3
4

  * [00.md](00.md)
  * [01.md](01.md)
  * [02.md](02.md)
<
<
<
<








Deleted modules/doctools/tests/toc/nroff/00.

1
2
3
4
5
6
7
8
'\"
'\" Generated by tcllib/doctools/toc with format 'nroff'
.TH "TOC" n
.so man.macros
.BS
.SH CONTENTS
Test
.RS
<
<
<
<
<
<
<
<
















Deleted modules/doctools/tests/toc/nroff/01.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
'\"
'\" Generated by tcllib/doctools/toc with format 'nroff'
.TH "TOC" n
.so man.macros
.BS
.SH CONTENTS
Test
.RS
.TP
\fBi1\fR
\fII1f\fR: i1d
.TP
\fBi2\fR
\fII2f\fR: i2d
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Deleted modules/doctools/tests/toc/nroff/02.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'\"
'\" Generated by tcllib/doctools/toc with format 'nroff'
.TH "TOC" n
.so man.macros
.BS
.SH CONTENTS
Test
.RS
.TP
\fBi1\fR
\fII1f\fR: i1d
.TP
D
.RS
.TP
\fBi2\fR
\fII2f\fR: i2d
.TP
\fBi3\fR
\fII3f\fR: i3d
.RE
.TP
\fBi4\fR
\fII4f\fR: i4d
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































Deleted modules/doctools/tests/toc/null/00.

Deleted modules/doctools/tests/toc/null/01.

Deleted modules/doctools/tests/toc/null/02.

Deleted modules/doctools/tests/toc/text/00.

1
2
3
4
5

Table of contents generated by tcllib/doctools/toc with format 'text'

TOC -- Test
===========
<
<
<
<
<










Deleted modules/doctools/tests/toc/text/01.

1
2
3
4
5
6
7
8
9

Table of contents generated by tcllib/doctools/toc with format 'text'

TOC -- Test
===========

I1f i1d

I2f i2d
<
<
<
<
<
<
<
<
<


















Deleted modules/doctools/tests/toc/text/02.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Table of contents generated by tcllib/doctools/toc with format 'text'

TOC -- Test
===========

I1f i1d

D
-

    I2f i2d

    I3f i3d

I4f i4d
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































Deleted modules/doctools/tests/toc/tmml/00.

1
2
3
4
<manual package='TOC'>
<title>Test</title>

</manual>
<
<
<
<








Deleted modules/doctools/tests/toc/tmml/01.

1
2
3
4
5
6
<manual package='TOC'>
<title>Test</title>
<subdoc href='I1f'/>
<subdoc href='I2f'/>

</manual>
<
<
<
<
<
<












Deleted modules/doctools/tests/toc/tmml/02.

1
2
3
4
5
6
7
8
9
10
11
12
<manual package='TOC'>
<title>Test</title>
<subdoc href='I1f'/>
<division>
<title>D</title>
<subdoc href='I2f'/>
<subdoc href='I3f'/>

</division>
<subdoc href='I4f'/>

</manual>
<
<
<
<
<
<
<
<
<
<
<
<
























Deleted modules/doctools/tests/toc/toc/00.

1
2
3
[comment { -- empty toc }]
[toc_begin TOC Test]
[toc_end]
<
<
<






Deleted modules/doctools/tests/toc/toc/01.

1
2
3
4
5
[comment { -- just items }]
[toc_begin TOC Test]
[item I1f i1 i1d]
[item I2f i2 i2d]
[toc_end]
<
<
<
<
<










Deleted modules/doctools/tests/toc/toc/02.

1
2
3
4
5
6
7
8
9
[comment { -- item + division mix }]
[toc_begin TOC Test]
[item I1f i1 i1d]
[division_start D Df]
[item I2f i2 i2d]
[item I3f i3 i3d]
[division_end]
[item I4f i4 i4d]
[toc_end]
<
<
<
<
<
<
<
<
<


















Deleted modules/doctools/tests/toc/wiki/00.

1
2
3
4
5

Table of Contents '''TOC'''
'''Test'''


<
<
<
<
<










Deleted modules/doctools/tests/toc/wiki/01.

1
2
3
4
5
6
7

Table of Contents '''TOC'''
'''Test'''
   [[i1]]:   I1f -- i1d
   [[i2]]:   I2f -- i2d


<
<
<
<
<
<
<














Deleted modules/doctools/tests/toc/wiki/02.

1
2
3
4
5
6
7
8
9
10
11

Table of Contents '''TOC'''
'''Test'''
   [[i1]]:   I1f -- i1d
'''D'''
   [[i2]]:   I2f -- i2d
   [[i3]]:   I3f -- i3d

   [[i4]]:   I4f -- i4d


<
<
<
<
<
<
<
<
<
<
<






















Added modules/doctools/tests/wiki/00.



























>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**



**COPYRIGHT**

 Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/01.



























>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**

Argument ::''Argument'':: Class ::'''Class''':: Command ::'''Command''':: Comment :::: Const ::'''Constant''':: Emphasis ::''Emphasis'':: File ::"''File/Path''":: Function ::'''Function''':: Method ::'''Method''':: Namespace ::'''Namespace''':: Option ::'''Option''':: Optional ::?Optional?:: Package ::'''Package''':: Syscmd ::'''SystemCommand''':: Term ::''Term'':: Type ::'''Type''':: Uri ::Uri:: Variable ::'''Variable''':: Widget ::'''Widget'''::

**COPYRIGHT**

 Copyright (c) **Copyright**

Added modules/doctools/tests/wiki/02.







































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'''TEST 3.14.15.926''' '''.MODULE.''' ''..THE_MODULE..''

..THE_TITLE..


**SYNOPSIS**


package require '''AAA'''

package require '''BBB VVV'''




**DESCRIPTION**



**SEE ALSO**


ELSE, OTHER


**KEYWORDS**


KEYA, KEYZ


**COPYRIGHT**

 Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/03.







































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**



**AaA**

1

**BbB**

22

***BbB.cCc***

333

***BbB.dDd***

4444

**EeE**

5555
At '''AaA'''.
At '''__undefined__'''.

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/04.

























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**

BEGINNE HIER
======

	 Example Block  More Lines

======



======

Inlined Example \
Next Line

======
FERTIG

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/05.





































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'''BASIC 5''' '''.MODULE.'''




**SYNOPSIS**


   * a-command




**DESCRIPTION**

OK


+++
''argument-1'' integer    verification
''argument-2'' string (out)    mogrification
+++




   '''command-a''':   explanation 

   '''command-b''':   elucidation  


   term:    definition 

   a-command :    semantic  


   1.  A

   1.  B  C  D


   *  1

   *  2  2a  2b


   '''option-1''':    meaning 

   '''option-2''' value:    elaboration  


Command-Line Switch:	'''background'''
Database Name:	'''Background'''
Database Class:	'''Color'''
   *  candy

Command-Line Switch:	'''foreground'''
Database Name:	'''Foreground'''
Database Class:	'''Color'''
   *  caramel
KO

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/06.































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**



   *  1  2  3

   *

   1.  a  b  c

   1.

   foo:    snafu 

   bar:    barf 

   roo:    gork  

   1.  a  b  c

   *  4  5  6

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/07.































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
'''TEST 3.14.15.926''' '''.MODULE.'''




**DESCRIPTION**



   *  1

   *  2

   1.  a

   1.  b

   foo:    snafu 

   bar:    barf 

   roo:    gork  bb 

   1.  a  22

   *  3

**COPYRIGHT**

 Copyright (c) .COPYRIGHT.

Added modules/doctools/tests/wiki/08.











































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
'''ALL 5''' '''.MODULE.''' ''..THE_MODULE..''

..THE_TITLE..


**SYNOPSIS**


package require '''AAA'''

package require '''BBB VVV'''

package require '''CCC ?VVV?'''

   * CMDNAME ...

   * CMDNAME ...

   * CMDNAME ...




**DESCRIPTION**



   '''NAME''':   DESCRIPTION ::'''Command''':: 

   '''NAME''':   DESCRIPTION :::: 

   '''NAME''':   DESCRIPTION ::'''Constant'''::  

**API**



   TERM:    DESCRIPTION ::''Emphasis'':: 

   TERM:    DESCRIPTION ::"''File/Path''"::  

Command-Line Switch:	'''NAME'''
Database Name:	'''DBNAME'''
Database Class:	'''CLASS'''
   *  DESCRIPTION '''NARGLE'''

Command-Line Switch:	'''NAME'''
Database Name:	'''DBNAME'''
Database Class:	'''CLASS'''
   *  DESCRIPTION ::'''Function'''::

Command-Line Switch:	'''NAME'''
Database Name:	'''DBNAME'''
Database Class:	'''CLASS'''
   *  DESCRIPTION ::'''Method'''::

   TERM:    DESCRIPTION 

   CMDNAME ...:    DESCRIPTION ::'''Namespace''':: 

+++
''NAME'' TYPE    DESCRIPTION ::''Argument''::
''NAME'' TYPE    DESCRIPTION ::'''Option'''::
''NAME'' TYPE (MODE)    DESCRIPTION ::?Optional?::
======

    THE ARGUMENT IS USED IN THIS
    AND/OR THAT MANNER

======

+++



   CMDNAME ...:    DESCRIPTION ::'''Package''':: 

   CMDNAME ...:    DESCRIPTION ::'''SystemCommand'''::  

   '''NAME''':    DESCRIPTION ::''Term'':: 

   '''NAME''':    DESCRIPTION ::'''Type''':: 

   '''NAME''' ARGUMENT:    DESCRIPTION ::Uri::   

***NARGLE***



   1.  PARAGRAPH ::Uri%|%UriLabel%|%::

   1.  PARAGRAPH ::'''Variable'''::

   1.  PARAGRAPH ::'''Widget'''::

   *  PARAGRAPH ::'''Class'''::

   *  PARAGRAPH

   *  PARAGRAPH

**SEE ALSO**


ELSE, OTHER


**KEYWORDS**


KEYA, KEYZ


**COPYRIGHT**

 Copyright (c) **Copyright**

Added modules/doctools2base/config.tcl.



































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
# docidx.tcl --
#
#	Generic configuration management, for use by import and export
#	managers.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: config.tcl,v 1.2 2011/11/17 08:00:45 andreas_kupries Exp $

# Each object manages a set of configuration variables.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::doctools::config {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creating, destruction

    # Default constructor.
    # Default destructor.

    # ### ### ### ######### ######### #########
    ## Public methods. Reading and writing the configuration.

    method names {} {
	return [array names myconfiguration]
    }

    method get {} {
	return [array get myconfiguration]
    }

    method set {name {value {}}} {
	# 7 instead of 3 in the condition below, because of the 4
	# implicit arguments snit is providing to each method.
	if {[llength [info level 0]] == 7} {
	    set myconfiguration($name) $value
	} elseif {![info exists myconfiguration($name)]} {
	    return -code error "can't read \"$name\": no such variable"
	}
	return $myconfiguration($name)
    }

    method unset {args} {
	if {![llength $args]} { lappend args * }
	foreach pattern $args {
	    array unset myconfiguration $pattern
	}
	return
    }

    # ### ### ### ######### ######### #########
    ## Internal methods :: None.

    # ### ### ### ######### ######### #########
    ## State :: Configuration data, Tcl array

    variable myconfiguration -array {}

    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::config 0.1
return

Changes to modules/doctools2base/html_cssdefaults.man.

32
33
34
35
36
37
38
39
40

This command returns the text of the default CSS style to use for HTML
markup generated by the various HTML export plugins.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

32
33
34
35
36
37
38
39
40

This command returns the text of the default CSS style to use for HTML
markup generated by the various HTML export plugins.

[list_end]

[vset CATEGORY doctools]
[include include/feedback.inc]
[manpage_end]

Added modules/doctools2base/include/feedback.inc.

























>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
[section {Bugs, Ideas, Feedback}]
[vset TRACKER http://core.tcl.tk/tcllib/reportlist]
[vset LABEL   {Tcllib Trackers}]

This document, and the package it describes, will undoubtedly contain
bugs and other problems.

Please report such in the category [emph [vset CATEGORY]] of the
[uri [vset TRACKER] [vset LABEL]].

Please also report any ideas for enhancements you may have for either
package and/or documentation.

Changes to modules/doctools2base/nroff_manmacros.man.

32
33
34
35
36
37
38
39
40

This command returns the text of the default CSS style to use for NROFF
generated by the various NROFF export plugins.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

32
33
34
35
36
37
38
39
40

This command returns the text of the default CSS style to use for NROFF
generated by the various NROFF export plugins.

[list_end]

[vset CATEGORY doctools]
[include include/feedback.inc]
[manpage_end]

Added modules/doctools2base/paths.tcl.

























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
# docidx.tcl --
#
#	Generic path list management, for use by import management.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: paths.tcl,v 1.2 2009/04/29 02:09:46 andreas_kupries Exp $

# Each object manages a list of paths.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::doctools::paths {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction

    # Default constructor.
    # Default destructor.

    # ### ### ### ######### ######### #########
    ## Methods :: Querying and manipulating the list of paths.

    method paths {} {
	return $mypaths
    }

    method add {path} {
	set pos [lsearch $mypaths $path]
	if {$pos >= 0 } return
	lappend mypaths $path
	return
    }

    method remove {path} {
	set pos [lsearch $mypaths $path]
	if {$pos < 0} return
	set  mypaths [lreplace $mypaths $pos $pos]
	return
    }

    method clear {} {
	set mypaths {}
	return
    }

    # ### ### ### ######### ######### #########
    ## Internal methods :: None

    # ### ### ### ######### ######### #########
    ## State :: List of paths.

    variable mypaths {}

    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::paths 0.1
return

Changes to modules/doctools2base/pkgIndex.tcl.

1
2
3
4
5
6

7
8
9
10
11


12
13
14
15
16
17
if {![package vsatisfies [package provide Tcl] 8.4]} {return}

# Packages for the doctools {idx,toc,doc} v2 implementation
# (still v1.1 doc{idx,toc} languages).

# Supporting packages

# - Handling text generation, the nroff man.macros definitions,
#            HTML/XML generation, and the default CSS style
# - Handling of message catalogs as packages.
# - Recursive descent parser for Tcl strings (as expected by 'subst -novariables').



package ifneeded doctools::text              0.1 [list source [file join $dir text.tcl]]
package ifneeded doctools::nroff::man_macros 0.1 [list source [file join $dir nroff_manmacros.tcl]]
package ifneeded doctools::html              0.1 [list source [file join $dir html.tcl]]
package ifneeded doctools::html::cssdefaults 0.1 [list source [file join $dir html_cssdefaults.tcl]]
package ifneeded doctools::msgcat            0.1 [list source [file join $dir msgcat.tcl]]
package ifneeded doctools::tcl::parse        0.1 [list source [file join $dir tcl_parse.tcl]]






>





>
>






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
if {![package vsatisfies [package provide Tcl] 8.4]} {return}

# Packages for the doctools {idx,toc,doc} v2 implementation
# (still v1.1 doc{idx,toc} languages).

# Supporting packages
# - Handling configuration variables, and include paths.
# - Handling text generation, the nroff man.macros definitions,
#            HTML/XML generation, and the default CSS style
# - Handling of message catalogs as packages.
# - Recursive descent parser for Tcl strings (as expected by 'subst -novariables').

package ifneeded doctools::config            0.1 [list source [file join $dir config.tcl]]
package ifneeded doctools::paths             0.1 [list source [file join $dir paths.tcl]]
package ifneeded doctools::text              0.1 [list source [file join $dir text.tcl]]
package ifneeded doctools::nroff::man_macros 0.1 [list source [file join $dir nroff_manmacros.tcl]]
package ifneeded doctools::html              0.1 [list source [file join $dir html.tcl]]
package ifneeded doctools::html::cssdefaults 0.1 [list source [file join $dir html_cssdefaults.tcl]]
package ifneeded doctools::msgcat            0.1 [list source [file join $dir msgcat.tcl]]
package ifneeded doctools::tcl::parse        0.1 [list source [file join $dir tcl_parse.tcl]]

Changes to modules/doctools2base/tcl_parse.man.

176
177
178
179
180
181
182
183
184

[enum]
All leaves of the tree are either Text or Command nodes.
Word nodes cannot be leaves.
[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

176
177
178
179
180
181
182
183
184

[enum]
All leaves of the tree are either Text or Command nodes.
Word nodes cannot be leaves.
[list_end]

[vset CATEGORY doctools]
[include include/feedback.inc]
[manpage_end]

Changes to modules/doctools2base/tcllib_msgcat.man.

59
60
61
62
63
64
65
66
67
"doctools::msgcat::[arg prefix]::[var langcode]", with [arg prefix]
the argument to the command, and the [var langcode] supplied by the
result of [cmd msgcat::mcpreferences].

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

59
60
61
62
63
64
65
66
67
"doctools::msgcat::[arg prefix]::[var langcode]", with [arg prefix]
the argument to the command, and the [var langcode] supplied by the
result of [cmd msgcat::mcpreferences].

[list_end]

[vset CATEGORY doctools]
[include include/feedback.inc]
[manpage_end]

Changes to modules/doctools2idx/container.test.

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
# -*- tcl -*-
# idx.test:  Tests for the doctools::idx package. Index management.
#
# Copyright (c) 2009-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    use struct/list.tcl          struct::list
    use snit/snit.tcl            snit
    use fileutil/fileutil.tcl    fileutil
    use fileutil/paths.tcl       fileutil::paths
    use log/logger.tcl           logger
    use pluginmgr/pluginmgr.tcl  pluginmgr
    use struct/map.tcl           struct::map



    useLocal export.tcl      doctools::idx::export
    useLocal import.tcl      doctools::idx::import
    use doctools2base/nroff_manmacros.tcl doctools::nroff::man_macros

    source [tcllibPath doctools2base/tests/common]
}
testing {



|

>
>














<


<

>
>







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
# -*- tcl -*-
# idx.test:  Tests for the doctools::idx package. Index management.
#
# Copyright (c) 2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: container.test,v 1.2 2009/04/29 02:10:34 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    use struct/list.tcl          struct::list
    use snit/snit.tcl            snit
    use fileutil/fileutil.tcl    fileutil

    use log/logger.tcl           logger
    use pluginmgr/pluginmgr.tcl  pluginmgr


    use doctools2base/config.tcl          doctools::config
    use doctools2base/paths.tcl           doctools::paths
    useLocal export.tcl      doctools::idx::export
    useLocal import.tcl      doctools::idx::import
    use doctools2base/nroff_manmacros.tcl doctools::nroff::man_macros

    source [tcllibPath doctools2base/tests/common]
}
testing {

Changes to modules/doctools2idx/export.tcl.

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
# export.tcl --
#
#	Exporting indices into other formats.
#
# Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



# Each object manages a set of plugins for the conversion of keyword
# indices into some textual representation. I.e. this object manages
# the conversion to specialized serializations of keyword indices.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require struct::map
package require doctools::idx::structure
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::doctools::idx::export {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myconfig using ::struct::map ${selfns}::config
	return
    }

    destructor {
	$myconfig destroy
	# Clear the cache of loaded export plugins.
	foreach k [array names myplugin] {
|



|



>
>









|
















|







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
# docidx.tcl --
#
#	Exporting indices into other formats.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: export.tcl,v 1.1 2009/04/01 04:28:37 andreas_kupries Exp $

# Each object manages a set of plugins for the conversion of keyword
# indices into some textual representation. I.e. this object manages
# the conversion to specialized serializations of keyword indices.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require doctools::config
package require doctools::idx::structure
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::doctools::idx::export {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myconfig using ::doctools::config ${selfns}::config
	return
    }

    destructor {
	$myconfig destroy
	# Clear the cache of loaded export plugins.
	foreach k [array names myplugin] {
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

	if {!$iscanonical} {
	    set serial [doctools::idx::structure canonicalize $serial]
	}

	set     configuration [$myconfig get]
	lappend configuration user   $::tcl_platform(user)
	lappend configuration format [$plugin plugin]

	return [$plugin do export $serial $configuration]
    }

    # ### ### ### ######### ######### #########
    ## Internal methods








|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

	if {!$iscanonical} {
	    set serial [doctools::idx::structure canonicalize $serial]
	}

	set     configuration [$myconfig get]
	lappend configuration user   $::tcl_platform(user)
	lappend configuraton  format [$plugin plugin]

	return [$plugin do export $serial $configuration]
    }

    # ### ### ### ######### ######### #########
    ## Internal methods

115
116
117
118
119
120
121
122
123
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::idx::export 0.2.1
return







|

117
118
119
120
121
122
123
124
125
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::idx::export 0.1
return

Changes to modules/doctools2idx/export.test.

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
# -*- tcl -*-
# idx.test:  tests for the doctools::idx package.
#
# Copyright (c) 2009-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    use fileutil/fileutil.tcl    fileutil      ;# tests/common

    use struct/list.tcl          struct::list
    use snit/snit.tcl            snit
    use log/logger.tcl           logger
    use pluginmgr/pluginmgr.tcl  pluginmgr
    use struct/map.tcl           struct::map


    useLocal structure.tcl   doctools::idx::structure
    use doctools2base/nroff_manmacros.tcl doctools::nroff::man_macros

    source [tcllibPath doctools2base/tests/common]
}
testing {
    useLocalKeep export.tcl doctools::idx::export



|

>
>

















<

>







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
# -*- tcl -*-
# idx.test:  tests for the doctools::idx package.
#
# Copyright (c) 2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: export.test,v 1.2 2009/04/29 02:10:34 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    use fileutil/fileutil.tcl    fileutil      ;# tests/common

    use struct/list.tcl          struct::list
    use snit/snit.tcl            snit
    use log/logger.tcl           logger
    use pluginmgr/pluginmgr.tcl  pluginmgr


    use doctools2base/config.tcl          doctools::config
    useLocal structure.tcl   doctools::idx::structure
    use doctools2base/nroff_manmacros.tcl doctools::nroff::man_macros

    source [tcllibPath doctools2base/tests/common]
}
testing {
    useLocalKeep export.tcl doctools::idx::export
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109

test doctools-idx-export-5.0 {config names, wrong#args} -setup {
    doctools::idx::export E
} -body {
    E config names X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodnames type selfns win self"}

test doctools-idx-export-6.0 {config get, wrong#args} -setup {
    doctools::idx::export E
} -body {
    E config get X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodget type selfns win self"}

test doctools-idx-export-7.0 {config set, wrong#args} -setup {
    doctools::idx::export E
} -body {
    E config set
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test doctools-idx-export-7.1 {config set, wrong#args} -setup {
    doctools::idx::export E
} -body {
    E config set N V X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

# -------------------------------------------------------------------------

test doctools-idx-export-12.0 {config set, define single var} -setup {
    doctools::idx::export E
} -body {
    E config set N V







|







|







|







|







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

test doctools-idx-export-5.0 {config names, wrong#args} -setup {
    doctools::idx::export E
} -body {
    E config names X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodnames type selfns win self"}

test doctools-idx-export-6.0 {config get, wrong#args} -setup {
    doctools::idx::export E
} -body {
    E config get X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodget type selfns win self"}

test doctools-idx-export-7.0 {config set, wrong#args} -setup {
    doctools::idx::export E
} -body {
    E config set
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodset type selfns win self name ?value?"}

test doctools-idx-export-7.1 {config set, wrong#args} -setup {
    doctools::idx::export E
} -body {
    E config set N V X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodset type selfns win self name ?value?"}

# -------------------------------------------------------------------------

test doctools-idx-export-12.0 {config set, define single var} -setup {
    doctools::idx::export E
} -body {
    E config set N V

Changes to modules/doctools2idx/export_docidx.man.

1
2
3
4
5
6
7
[comment {-*- tcl -*- --- doctools ---}]
[vset PACKAGE docidx]
[vset NAME    docidx]
[vset REQUIRE null]
[vset CONFIG  docidx]
[vset VERSION 0.2.1]
[include include/export/plugin.inc]





|

1
2
3
4
5
6
7
[comment {-*- tcl -*- --- doctools ---}]
[vset PACKAGE docidx]
[vset NAME    docidx]
[vset REQUIRE null]
[vset CONFIG  docidx]
[vset VERSION 0.1]
[include include/export/plugin.inc]

Changes to modules/doctools2idx/idx_container.man.

288
289
290
291
292
293
294
295
296
In that case an error will be thrown if the container has no export
manager attached to it.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

288
289
290
291
292
293
294
295
296
In that case an error will be thrown if the container has no export
manager attached to it.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2idx/idx_export.man.

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
[vset VERSION 0.2.1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::idx::export n [vset VERSION]]
[keywords conversion]
[keywords docidx]
[keywords documentation]
[keywords export]
[keywords formatting]
[keywords generation]
[keywords HTML]
[keywords index]
[keywords json]
[keywords {keyword index}]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords plugin]
[keywords reference]
[keywords {tcler's wiki}]
[keywords text]
[keywords url]
[keywords wiki]
[copyright {2009-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {Exporting keyword indices}]
[category  {Documentation tools}]
[require doctools::idx::export [opt [vset VERSION]]]
[require Tcl 8.4]
[require struct::map]
[require doctools::idx::structure]
[require snit]
[require pluginmgr]
[description]

This package provides a class to manage the plugins for the export of
keyword indices to other formats, i.e. their conversion to, for
<

|



















|



|

|








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

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::idx::export n 0.1]
[keywords conversion]
[keywords docidx]
[keywords documentation]
[keywords export]
[keywords formatting]
[keywords generation]
[keywords HTML]
[keywords index]
[keywords json]
[keywords {keyword index}]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords plugin]
[keywords reference]
[keywords {tcler's wiki}]
[keywords text]
[keywords url]
[keywords wiki]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {Exporting keyword indices}]
[category  {Documentation tools}]
[require doctools::idx::export [opt 0.1]]
[require Tcl 8.4]
[require doctools::config]
[require doctools::idx::structure]
[require snit]
[require pluginmgr]
[description]

This package provides a class to manage the plugins for the export of
keyword indices to other formats, i.e. their conversion to, for
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
If no value is specified it simply returns the current value, without
changing it.

[para]

Note that while the user can set the predefined configuration
variables [const user] and [const format] doing so will have no
effect, these values will be internally overridden when invoking an
import plugin.

[call [arg objectName] [method {config unset}] [arg pattern]...]

This method unsets all configuration variables matching the specified
glob [arg pattern]s. If no pattern is specified it will unset all
currently defined configuration variables.







|







197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
If no value is specified it simply returns the current value, without
changing it.

[para]

Note that while the user can set the predefined configuration
variables [const user] and [const format] doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.

[call [arg objectName] [method {config unset}] [arg pattern]...]

This method unsets all configuration variables matching the specified
glob [arg pattern]s. If no pattern is specified it will unset all
currently defined configuration variables.
301
302
303
304
305
306
307
308
309
       the command [cmd export]. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

300
301
302
303
304
305
306
307
308
       the command [cmd export]. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2idx/idx_import.man.

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
[vset VERSION 0.2.1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::idx::import n [vset VERSION]]
[keywords conversion]
[keywords docidx]
[keywords documentation]
[keywords import]
[keywords index]
[keywords json]
[keywords {keyword index}]
[keywords manpage]
[keywords markup]
[keywords parsing]
[keywords plugin]
[keywords reference]
[keywords url]
[copyright {2009-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {Importing keyword indices}]
[category  {Documentation tools}]
[require doctools::idx::import [opt [vset VERSION]]]
[require Tcl 8.4]
[require struct::map]
[require doctools::idx::structure]
[require snit]
[require pluginmgr]
[description]

This package provides a class to manage the plugins for the import of
keyword indices from other formats, i.e. their conversion from, for
<

|













|



|

|








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

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::idx::import n 0.1]
[keywords conversion]
[keywords docidx]
[keywords documentation]
[keywords import]
[keywords index]
[keywords json]
[keywords {keyword index}]
[keywords manpage]
[keywords markup]
[keywords parsing]
[keywords plugin]
[keywords reference]
[keywords url]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {Importing keyword indices}]
[category  {Documentation tools}]
[require doctools::idx::import [opt 0.1]]
[require Tcl 8.4]
[require doctools::config]
[require doctools::idx::structure]
[require snit]
[require pluginmgr]
[description]

This package provides a class to manage the plugins for the import of
keyword indices from other formats, i.e. their conversion from, for
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
If no value is specified it simply returns the current value, without
changing it.

[para]

Note that while the user can set the predefined configuration
variables [const user] and [const format] doing so will have no
effect, these values will be internally overridden when invoking an
import plugin.

[call [arg objectName] [method {config unset}] [arg pattern]...]

This method unsets all configuration variables matching the specified
glob [arg pattern]s. If no pattern is specified it will unset all
currently defined configuration variables.







|







207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
If no value is specified it simply returns the current value, without
changing it.

[para]

Note that while the user can set the predefined configuration
variables [const user] and [const format] doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.

[call [arg objectName] [method {config unset}] [arg pattern]...]

This method unsets all configuration variables matching the specified
glob [arg pattern]s. If no pattern is specified it will unset all
currently defined configuration variables.
387
388
389
390
391
392
393
394
395
       the command [cmd import]. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

386
387
388
389
390
391
392
393
394
       the command [cmd import]. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2idx/idx_introduction.man.

138
139
140
141
142
143
144
145
146
the [manpage {DocTools - Tables Of Contents}] and
the [manpage {DocTools - General}], respectively.

[section {Package Overview}]
[include include/dependencies.inc]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

138
139
140
141
142
143
144
145
146
the [manpage {DocTools - Tables Of Contents}] and
the [manpage {DocTools - General}], respectively.

[section {Package Overview}]
[include include/dependencies.inc]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2idx/idx_parse.man.

131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

[enum]
Each error element will be a list containing six strings describing an
error in detail. The strings will be

[list_begin enumerated]
[enum]
The path of the file the error occurred in. This may be empty.

[enum]
The range of the token the error was found at. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file). Offsets
are counted from zero.








|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

[enum]
Each error element will be a list containing six strings describing an
error in detail. The strings will be

[list_begin enumerated]
[enum]
The path of the file the error occured in. This may be empty.

[enum]
The range of the token the error was found at. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file). Offsets
are counted from zero.

167
168
169
170
171
172
173
174
175
[list_end]
[list_end]

[include include/format/docidx.inc]
[include include/serialization.inc]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

167
168
169
170
171
172
173
174
175
[list_end]
[list_end]

[include include/format/docidx.inc]
[include include/serialization.inc]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2idx/idx_structure.man.

121
122
123
124
125
126
127
128
129
[sectref {Keyword index serialization format}].

[list_end]

[include include/serialization.inc]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

121
122
123
124
125
126
127
128
129
[sectref {Keyword index serialization format}].

[list_end]

[include include/serialization.inc]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2idx/import.tcl.

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
# import.tcl --
#
#	Importing indices into other formats.
#
# Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



# Each object manages a set of plugins for the conversion of keyword
# indices into some textual representation. I.e. this object manages
# the conversion to specialized serializations of keyword indices.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require struct::map
package require doctools::idx::structure
package require fileutil::paths
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::doctools::idx::import {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myconfig  using ::struct::map     ${selfns}::config
	install myinclude using ::fileutil::paths ${selfns}::include
	return
    }

    destructor {
	$myconfig  destroy
	$myinclude destroy
	# Clear the cache of loaded import plugins.
|



|



>
>









|

|















|
|







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
# docidx.tcl --
#
#	Importing indices into other formats.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: import.tcl,v 1.2 2011/11/17 08:00:45 andreas_kupries Exp $

# Each object manages a set of plugins for the conversion of keyword
# indices into some textual representation. I.e. this object manages
# the conversion to specialized serializations of keyword indices.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require doctools::config
package require doctools::idx::structure
package require doctools::paths
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::doctools::idx::import {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myconfig  using ::doctools::config ${selfns}::config
	install myinclude using ::doctools::paths  ${selfns}::include
	return
    }

    destructor {
	$myconfig  destroy
	$myinclude destroy
	# Clear the cache of loaded import plugins.
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
    # ### ### ### ######### ######### #########

    method {import text} {text {format {}}} {
	set plugin [$self GetPlugin $format]

	set     configuration [$myconfig get]
	lappend configuration user   $::tcl_platform(user)
	lappend configuration format [$plugin plugin]

	return [$plugin do import $text $configuration]
    }

    method {import file} {path {format {}}} {
	# The plugin is not trusted to handle the file to convert.
	return [$self import text [fileutil::cat $path] $format]







|







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    # ### ### ### ######### ######### #########

    method {import text} {text {format {}}} {
	set plugin [$self GetPlugin $format]

	set     configuration [$myconfig get]
	lappend configuration user   $::tcl_platform(user)
	lappend configuraton  format [$plugin plugin]

	return [$plugin do import $text $configuration]
    }

    method {import file} {path {format {}}} {
	# The plugin is not trusted to handle the file to convert.
	return [$self import text [fileutil::cat $path] $format]
181
182
183
184
185
186
187
188
189
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::idx::import 0.2.1
return







|

183
184
185
186
187
188
189
190
191
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::idx::import 0.1
return

Changes to modules/doctools2idx/import.test.

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
# -*- tcl -*-
# -- idx_import.test:
# -- Tests for package "doctools::idx::import": Management of import plugins.
#
# Copyright (c) 2009-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    use struct/list.tcl         struct::list
    use snit/snit.tcl           snit
    use fileutil/fileutil.tcl   fileutil
    use fileutil/paths.tcl      fileutil::paths
    use log/logger.tcl          logger
    use pluginmgr/pluginmgr.tcl pluginmgr
    use struct/map.tcl          struct::map



    source [tcllibPath doctools2base/tests/common]
}
testing {
    useLocalKeep import.tcl doctools::idx::import
}





|

>
>














<


|
>
>







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
# -*- tcl -*-
# -- idx_import.test:
# -- Tests for package "doctools::idx::import": Management of import plugins.
#
# Copyright (c) 2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: import.test,v 1.1 2009/04/01 04:28:37 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    use struct/list.tcl         struct::list
    use snit/snit.tcl           snit
    use fileutil/fileutil.tcl   fileutil

    use log/logger.tcl          logger
    use pluginmgr/pluginmgr.tcl pluginmgr

    use      doctools2base/config.tcl    doctools::config
    use      doctools2base/paths.tcl     doctools::paths

    source [tcllibPath doctools2base/tests/common]
}
testing {
    useLocalKeep import.tcl doctools::idx::import
}

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

test doctools-idx-import-5.0 {config names, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I config names X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodnames type selfns win self"}

test doctools-idx-import-6.0 {config get, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I config get X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodget type selfns win self"}

test doctools-idx-import-7.0 {config set, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I config set
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test doctools-idx-import-7.1 {config set, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I config set N V X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

# config unset - accepts any number of arguments.

# -------------------------------------------------------------------------
## `include paths` component, provided via fileutil::paths, search path for includes

test doctools-idx-import-8.0 {include paths, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include paths X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodpaths type selfns win self"}

test doctools-idx-import-9.0 {include clear, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include clear X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodclear type selfns win self"}

test doctools-idx-import-10.0 {include add, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include add
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test doctools-idx-import-10.1 {include add, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include add P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test doctools-idx-import-11.0 {include remove, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include remove
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

test doctools-idx-import-11.1 {include remove, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include remove P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

# -------------------------------------------------------------------------

test doctools-idx-import-12.0 {config set, define single var} -setup {
    doctools::idx::import I
} -body {
    I config set N V







|







|







|







|



<
<
<






|







|







|







|







|







|







120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

test doctools-idx-import-5.0 {config names, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I config names X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodnames type selfns win self"}

test doctools-idx-import-6.0 {config get, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I config get X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodget type selfns win self"}

test doctools-idx-import-7.0 {config set, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I config set
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodset type selfns win self name ?value?"}

test doctools-idx-import-7.1 {config set, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I config set N V X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodset type selfns win self name ?value?"}

# config unset - accepts any number of arguments.




test doctools-idx-import-8.0 {include paths, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include paths X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodpaths type selfns win self"}

test doctools-idx-import-9.0 {include clear, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include clear X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodclear type selfns win self"}

test doctools-idx-import-10.0 {include add, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include add
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodadd type selfns win self path"}

test doctools-idx-import-10.1 {include add, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include add P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodadd type selfns win self path"}

test doctools-idx-import-11.0 {include remove, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include remove
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodremove type selfns win self path"}

test doctools-idx-import-11.1 {include remove, wrong#args} -setup {
    doctools::idx::import I
} -body {
    I include remove P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodremove type selfns win self path"}

# -------------------------------------------------------------------------

test doctools-idx-import-12.0 {config set, define single var} -setup {
    doctools::idx::import I
} -body {
    I config set N V

Changes to modules/doctools2idx/import_json.tcl.

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

proc import {text configuration} {
    # Note: We cannot fail here on duplicate keys in the input,
    # especially for keywords and references, as we do for Tcl-based
    # canonical index serializations, because our underlying JSON
    # parser automatically merges them, by taking only the last found
    # definition. I.e. of two or more definitions for a key X the last
    # overwrites all previous occurrences.
    return [doctools::idx::structure canonicalize [json::json2dict $text]]
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::idx::import::json 0.1
return







|








63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

proc import {text configuration} {
    # Note: We cannot fail here on duplicate keys in the input,
    # especially for keywords and references, as we do for Tcl-based
    # canonical index serializations, because our underlying JSON
    # parser automatically merges them, by taking only the last found
    # definition. I.e. of two or more definitions for a key X the last
    # overwrites all previous occurences.
    return [doctools::idx::structure canonicalize [json::json2dict $text]]
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::idx::import::json 0.1
return

Changes to modules/doctools2idx/include/dependencies.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[comment {
         ASCII diagram of the dependencies between the doctools v2 idx packages
         ======================================================================
}][example {
                                    ~~~~~~~~~~~ doctools::idx ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::idx::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::idx::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
struct::map             =                         |     |    |                  =       doctools::include       struct::map      fileutil::paths
                        |                         |     |    |                  |
                doctools::idx::export::<*>        |     |    |          doctools::idx::import::<*>
                        docidx                    |     |    |                  docidx, json
                        json                      |     |    |                  |           \\
                        html                      |     |    |          doctools::idx::parse \\
                        nroff                     |     |    |                  |             \\
                        wiki                      |     |    |  +---------------+              json










|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[comment {
         ASCII diagram of the dependencies between the doctools v2 idx packages
         ======================================================================
}][example {
                                    ~~~~~~~~~~~ doctools::idx ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::idx::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::idx::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
doctools::config        =                         |     |    |                  =       doctools::include       doctools::config doctools::paths
                        |                         |     |    |                  |
                doctools::idx::export::<*>        |     |    |          doctools::idx::import::<*>
                        docidx                    |     |    |                  docidx, json
                        json                      |     |    |                  |           \\
                        html                      |     |    |          doctools::idx::parse \\
                        nroff                     |     |    |                  |             \\
                        wiki                      |     |    |  +---------------+              json

Changes to modules/doctools2idx/include/export/plugin.inc.

1
2
3
4
5
6
7
8
9
10
[comment {-*- tcl -*- --- !doctools ---}]
[manpage_begin doctools::idx::export::[vset PACKAGE] n [vset VERSION]]
[copyright {2009-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc "[vset NAME] export plugin"]
[category  {Text formatter plugin}]
[require Tcl 8.4]
[require doctools::idx::export::[vset PACKAGE] [opt [vset VERSION]]]
[include format/[vset REQUIRE].inc]
[keywords doctools index serialization export [vset NAME]]


|







1
2
3
4
5
6
7
8
9
10
[comment {-*- tcl -*- --- !doctools ---}]
[manpage_begin doctools::idx::export::[vset PACKAGE] n [vset VERSION]]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc "[vset NAME] export plugin"]
[category  {Text formatter plugin}]
[require Tcl 8.4]
[require doctools::idx::export::[vset PACKAGE] [opt [vset VERSION]]]
[include format/[vset REQUIRE].inc]
[keywords doctools index serialization export [vset NAME]]
47
48
49
50
51
52
53
54
55

[list_end]

[include config/[vset CONFIG].inc]
[include ../serialization.inc]

[vset CATEGORY doctools]
[include ../../../common-text/feedback.inc]
[manpage_end]







|

47
48
49
50
51
52
53
54
55

[list_end]

[include config/[vset CONFIG].inc]
[include ../serialization.inc]

[vset CATEGORY doctools]
[include ../../../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2idx/include/import/plugin.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[comment {-*- tcl -*- --- !doctools ---}]
[vset VERSION 0.2.1]
[manpage_begin doctools::idx::import::[vset PACKAGE] n [vset VERSION]]
[copyright {2009-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc "[vset NAME] import plugin"]
[category  {Text formatter plugin}]
[require Tcl 8.5]
[require doctools::idx::import::[vset PACKAGE] [opt [vset VERSION]]]
[include format/[vset REQUIRE].inc]
[keywords doctools index deserialization import [vset NAME]]
[description]

This package implements the doctools keyword index import plugin for
the parsing of [vset NAME] markup.


<
|
|



|
|







1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
[comment {-*- tcl -*- --- !doctools ---}]

[manpage_begin doctools::idx::import::[vset PACKAGE] n 0.1]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc "[vset NAME] import plugin"]
[category  {Text formatter plugin}]
[require Tcl 8.4]
[require doctools::idx::import::[vset PACKAGE] [opt 0.1]]
[include format/[vset REQUIRE].inc]
[keywords doctools index deserialization import [vset NAME]]
[description]

This package implements the doctools keyword index import plugin for
the parsing of [vset NAME] markup.

48
49
50
51
52
53
54
55
56
[list_end]


[include config/[vset CONFIG].inc]
[include ../serialization.inc]

[vset CATEGORY doctools]
[include ../../../common-text/feedback.inc]
[manpage_end]







|

47
48
49
50
51
52
53
54
55
[list_end]


[include config/[vset CONFIG].inc]
[include ../serialization.inc]

[vset CATEGORY doctools]
[include ../../../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2idx/include/msgcat.inc.

38
39
40
41
42
43
44
45
46

[section API]

This package has no exported API.


[vset CATEGORY doctools]
[include ../../common-text/feedback.inc]
[manpage_end]







|

38
39
40
41
42
43
44
45
46

[section API]

This package has no exported API.


[vset CATEGORY doctools]
[include ../../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2idx/include/serialization.inc.

61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

[enum]
The [term type] of a reference can be one of two values,

[list_begin definitions][comment {-- types --}]
[def [const manpage]]
The identifier of the reference is interpreted as symbolic file name,
referring to one of the documents the index was made for.

[def [const url]]
The identifier of the reference is interpreted as an url, referring to
some external location, like a website, etc.

[list_end][comment {-- types --}]
[list_end][comment {-- regular points --}]

[def {canonical serialization}]








|


|







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

[enum]
The [term type] of a reference can be one of two values,

[list_begin definitions][comment {-- types --}]
[def [const manpage]]
The identifier of the reference is interpreted as symbolic file name,
refering to one of the documents the index was made for.

[def [const url]]
The identifier of the reference is interpreted as an url, refering to
some external location, like a website, etc.

[list_end][comment {-- types --}]
[list_end][comment {-- regular points --}]

[def {canonical serialization}]

Changes to modules/doctools2idx/parse.tcl.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#                          attributes for reference and label.
#
# The order of the keywords under root, and of the references under
# their keyword reflects the order of the information in the parsed
# document.

# Attributes in the nodes, except root provide location information,
# i.e. referring from there in the input the information is coming from
# (human-readable output: line/col for end of token, offset start/end
# for range covered by token.

# # ## ### ##### ######## ############# #####################
## Requirements

package require Tcl 8.4                  ; # Required runtime.







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#                          attributes for reference and label.
#
# The order of the keywords under root, and of the references under
# their keyword reflects the order of the information in the parsed
# document.

# Attributes in the nodes, except root provide location information,
# i.e. refering from there in the input the information is coming from
# (human-readable output: line/col for end of token, offset start/end
# for range covered by token.

# # ## ### ##### ######## ############# #####################
## Requirements

package require Tcl 8.4                  ; # Required runtime.

Changes to modules/doctools2idx/pkgIndex.tcl.

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
if {![package vsatisfies [package provide Tcl] 8.4]} {return}

# Packages for the doctools idx v2 implementation
# (still v1.1 docidx language).

# - Index container, mutable index objects
# - Export and import management
# - Export and import plugins
# - Parser for docidx markup, and handling serializations
# - Message catalogs for the parser

package ifneeded doctools::idx                 2     [list source [file join $dir container.tcl]]

package ifneeded doctools::idx::export         0.2.1 [list source [file join $dir export.tcl]]


package ifneeded doctools::idx::export::docidx 0.1 [list source [file join $dir export_docidx.tcl]]
package ifneeded doctools::idx::export::html   0.2 [list source [file join $dir export_html.tcl]]
package ifneeded doctools::idx::export::json   0.1 [list source [file join $dir export_json.tcl]]
package ifneeded doctools::idx::export::nroff  0.3 [list source [file join $dir export_nroff.tcl]]
package ifneeded doctools::idx::export::text   0.2 [list source [file join $dir export_text.tcl]]
package ifneeded doctools::idx::export::wiki   0.2 [list source [file join $dir export_wiki.tcl]]

package ifneeded doctools::idx::import::docidx 0.1 [list source [file join $dir import_docidx.tcl]]
package ifneeded doctools::idx::import::json   0.1 [list source [file join $dir import_json.tcl]]

package ifneeded doctools::idx::parse          0.1 [list source [file join $dir parse.tcl]]
package ifneeded doctools::idx::structure      0.1 [list source [file join $dir structure.tcl]]

package ifneeded doctools::msgcat::idx::c      0.1 [list source [file join $dir msgcat_c.tcl]]
package ifneeded doctools::msgcat::idx::de     0.1 [list source [file join $dir msgcat_de.tcl]]
package ifneeded doctools::msgcat::idx::en     0.1 [list source [file join $dir msgcat_en.tcl]]
package ifneeded doctools::msgcat::idx::fr     0.1 [list source [file join $dir msgcat_fr.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}

package ifneeded doctools::idx::import         0.2.1 [list source [file join $dir import.tcl]]











|
>
|
>


















<
<
<
<
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




if {![package vsatisfies [package provide Tcl] 8.4]} {return}

# Packages for the doctools idx v2 implementation
# (still v1.1 docidx language).

# - Index container, mutable index objects
# - Export and import management
# - Export and import plugins
# - Parser for docidx markup, and handling serializations
# - Message catalogs for the parser

package ifneeded doctools::idx                 2   [list source [file join $dir container.tcl]]

package ifneeded doctools::idx::export         0.1 [list source [file join $dir export.tcl]]
package ifneeded doctools::idx::import         0.1 [list source [file join $dir import.tcl]]

package ifneeded doctools::idx::export::docidx 0.1 [list source [file join $dir export_docidx.tcl]]
package ifneeded doctools::idx::export::html   0.2 [list source [file join $dir export_html.tcl]]
package ifneeded doctools::idx::export::json   0.1 [list source [file join $dir export_json.tcl]]
package ifneeded doctools::idx::export::nroff  0.3 [list source [file join $dir export_nroff.tcl]]
package ifneeded doctools::idx::export::text   0.2 [list source [file join $dir export_text.tcl]]
package ifneeded doctools::idx::export::wiki   0.2 [list source [file join $dir export_wiki.tcl]]

package ifneeded doctools::idx::import::docidx 0.1 [list source [file join $dir import_docidx.tcl]]
package ifneeded doctools::idx::import::json   0.1 [list source [file join $dir import_json.tcl]]

package ifneeded doctools::idx::parse          0.1 [list source [file join $dir parse.tcl]]
package ifneeded doctools::idx::structure      0.1 [list source [file join $dir structure.tcl]]

package ifneeded doctools::msgcat::idx::c      0.1 [list source [file join $dir msgcat_c.tcl]]
package ifneeded doctools::msgcat::idx::de     0.1 [list source [file join $dir msgcat_de.tcl]]
package ifneeded doctools::msgcat::idx::en     0.1 [list source [file join $dir msgcat_en.tcl]]
package ifneeded doctools::msgcat::idx::fr     0.1 [list source [file join $dir msgcat_fr.tcl]]




Changes to modules/doctools2toc/ChangeLog.

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

	*
	* Released and tagged Tcllib 1.12 ========================
	* 

2009-11-14  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* container.test: Fixed up typos in comments referring to keyword
	* export.tcl: indices, while the packages are all about tables of
	* export_doctoc.tcl: contents. Unchanged functionality, version
	* export_doctoc.test: left unchanged.
	* export_html.tcl:
	* export_html.test:
	* export_json.tcl:
	* export_json.test:







|







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

	*
	* Released and tagged Tcllib 1.12 ========================
	* 

2009-11-14  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* container.test: Fixed up typos in comments refering to keyword
	* export.tcl: indices, while the packages are all about tables of
	* export_doctoc.tcl: contents. Unchanged functionality, version
	* export_doctoc.test: left unchanged.
	* export_html.tcl:
	* export_html.test:
	* export_json.tcl:
	* export_json.test:

Changes to modules/doctools2toc/container.test.

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
# -*- tcl -*-
# toc.test:  Tests for the doctools::toc package. ToC management.
#
# Copyright (c) 2009-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    useAccel [useTcllibC] struct/tree.tcl  struct::tree
    TestAccelInit                          struct::tree

    use struct/list.tcl          struct::list
    use snit/snit.tcl            snit
    use fileutil/fileutil.tcl    fileutil
    use fileutil/paths.tcl       fileutil::paths
    use log/logger.tcl           logger
    use pluginmgr/pluginmgr.tcl  pluginmgr
    use struct/map.tcl           struct::map



    useLocal export.tcl      doctools::toc::export
    useLocal import.tcl      doctools::toc::import
    use doctools2base/nroff_manmacros.tcl doctools::nroff::man_macros

    source [tcllibPath doctools2base/tests/common]
}
testing {



|

>
>

















<


<

>
>







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
# -*- tcl -*-
# toc.test:  Tests for the doctools::toc package. ToC management.
#
# Copyright (c) 2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: container.test,v 1.3 2009/11/15 05:50:03 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    useAccel [useTcllibC] struct/tree.tcl  struct::tree
    TestAccelInit                          struct::tree

    use struct/list.tcl          struct::list
    use snit/snit.tcl            snit
    use fileutil/fileutil.tcl    fileutil

    use log/logger.tcl           logger
    use pluginmgr/pluginmgr.tcl  pluginmgr


    use doctools2base/config.tcl          doctools::config
    use doctools2base/paths.tcl           doctools::paths
    useLocal export.tcl      doctools::toc::export
    useLocal import.tcl      doctools::toc::import
    use doctools2base/nroff_manmacros.tcl doctools::nroff::man_macros

    source [tcllibPath doctools2base/tests/common]
}
testing {

Changes to modules/doctools2toc/export.tcl.

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
# export.tcl --
#
#	Exporting indices into other formats.
#
# Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



# Each object manages a set of plugins for the conversion of keyword
# indices into some textual representation. I.e. this object manages
# the conversion to specialized serializations of keyword indices.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require struct::map
package require doctools::toc::structure
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::doctools::toc::export {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myconfig using ::struct::map ${selfns}::config
	return
    }

    destructor {
	$myconfig destroy
	# Clear the cache of loaded export plugins.
	foreach k [array names myplugin] {
|



|



>
>









|
















|







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
# doctoc.tcl --
#
#	Exporting indices into other formats.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: export.tcl,v 1.2 2009/11/15 05:50:03 andreas_kupries Exp $

# Each object manages a set of plugins for the conversion of keyword
# indices into some textual representation. I.e. this object manages
# the conversion to specialized serializations of keyword indices.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require doctools::config
package require doctools::toc::structure
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::doctools::toc::export {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myconfig using ::doctools::config ${selfns}::config
	return
    }

    destructor {
	$myconfig destroy
	# Clear the cache of loaded export plugins.
	foreach k [array names myplugin] {
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

	if {!$iscanonical} {
	    set serial [doctools::toc::structure canonicalize $serial]
	}

	set     configuration [$myconfig get]
	lappend configuration user   $::tcl_platform(user)
	lappend configuration format [$plugin plugin]

	return [$plugin do export $serial $configuration]
    }

    # ### ### ### ######### ######### #########
    ## Internal methods








|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

	if {!$iscanonical} {
	    set serial [doctools::toc::structure canonicalize $serial]
	}

	set     configuration [$myconfig get]
	lappend configuration user   $::tcl_platform(user)
	lappend configuraton  format [$plugin plugin]

	return [$plugin do export $serial $configuration]
    }

    # ### ### ### ######### ######### #########
    ## Internal methods

115
116
117
118
119
120
121
122
123
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::toc::export 0.2.1
return







|

117
118
119
120
121
122
123
124
125
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::toc::export 0.1
return

Changes to modules/doctools2toc/export.test.

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
# -*- tcl -*-
# toc.test:  tests for the doctools::toc package.
#
# Copyright (c) 2009-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    use fileutil/fileutil.tcl    fileutil      ;# tests/common

    use struct/list.tcl          struct::list
    use snit/snit.tcl            snit
    use log/logger.tcl           logger
    use pluginmgr/pluginmgr.tcl  pluginmgr
    use struct/map.tcl           struct::map


    useLocal structure.tcl   doctools::toc::structure
    use doctools2base/nroff_manmacros.tcl doctools::nroff::man_macros

    source [tcllibPath doctools2base/tests/common]
}
testing {
    useLocalKeep export.tcl doctools::toc::export



|

>
>

















<

>







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
# -*- tcl -*-
# toc.test:  tests for the doctools::toc package.
#
# Copyright (c) 2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: export.test,v 1.2 2009/04/29 02:10:56 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    use fileutil/fileutil.tcl    fileutil      ;# tests/common

    use struct/list.tcl          struct::list
    use snit/snit.tcl            snit
    use log/logger.tcl           logger
    use pluginmgr/pluginmgr.tcl  pluginmgr


    use doctools2base/config.tcl          doctools::config
    useLocal structure.tcl   doctools::toc::structure
    use doctools2base/nroff_manmacros.tcl doctools::nroff::man_macros

    source [tcllibPath doctools2base/tests/common]
}
testing {
    useLocalKeep export.tcl doctools::toc::export
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109

test doctools-toc-export-5.0 {config names, wrong#args} -setup {
    doctools::toc::export E
} -body {
    E config names X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodnames type selfns win self"}

test doctools-toc-export-6.0 {config get, wrong#args} -setup {
    doctools::toc::export E
} -body {
    E config get X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodget type selfns win self"}

test doctools-toc-export-7.0 {config set, wrong#args} -setup {
    doctools::toc::export E
} -body {
    E config set
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test doctools-toc-export-7.1 {config set, wrong#args} -setup {
    doctools::toc::export E
} -body {
    E config set N V X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

# -------------------------------------------------------------------------

test doctools-toc-export-12.0 {config set, define single var} -setup {
    doctools::toc::export E
} -body {
    E config set N V







|







|







|







|







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

test doctools-toc-export-5.0 {config names, wrong#args} -setup {
    doctools::toc::export E
} -body {
    E config names X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodnames type selfns win self"}

test doctools-toc-export-6.0 {config get, wrong#args} -setup {
    doctools::toc::export E
} -body {
    E config get X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodget type selfns win self"}

test doctools-toc-export-7.0 {config set, wrong#args} -setup {
    doctools::toc::export E
} -body {
    E config set
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodset type selfns win self name ?value?"}

test doctools-toc-export-7.1 {config set, wrong#args} -setup {
    doctools::toc::export E
} -body {
    E config set N V X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodset type selfns win self name ?value?"}

# -------------------------------------------------------------------------

test doctools-toc-export-12.0 {config set, define single var} -setup {
    doctools::toc::export E
} -body {
    E config set N V

Changes to modules/doctools2toc/export_doctoc.man.

1
2
3
4
5
6
7
[comment {-*- tcl -*- --- doctools ---}]
[vset PACKAGE doctoc]
[vset NAME    doctoc]
[vset REQUIRE null]
[vset CONFIG  doctoc]
[vset VERSION 0.2.1]
[include include/export/plugin.inc]





|

1
2
3
4
5
6
7
[comment {-*- tcl -*- --- doctools ---}]
[vset PACKAGE doctoc]
[vset NAME    doctoc]
[vset REQUIRE null]
[vset CONFIG  doctoc]
[vset VERSION 0.1]
[include include/export/plugin.inc]

Changes to modules/doctools2toc/export_doctoc.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# doctoc.tcl --
#
#	The doctoc export plugin. Generation of doctoc markup.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: export_doctoc.tcl,v 1.3 2009/11/15 05:50:03 andreas_kupries Exp $

# This package is a plugin for the doctools::toc v2 system.  It takes
# the list serialization of a table of contents and produces text in
# doctoc format.

# ### ### ### ######### ######### #########
## Requisites

# @mdgen NODEP: doctools::toc::export::plugin













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# doctoc.tcl --
#
#	The doctoc export plugin. Generation of doctoc markup.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: export_doctoc.tcl,v 1.3 2009/11/15 05:50:03 andreas_kupries Exp $

# This package is a plugin for the doctools::toc v2 system.  It takes
# the list serialization of a table of contens and produces text in
# doctoc format.

# ### ### ### ######### ######### #########
## Requisites

# @mdgen NODEP: doctools::toc::export::plugin

Changes to modules/doctools2toc/import.tcl.

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
# import.tcl --
#
#	Importing indices into other formats.
#
# Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



# Each object manages a set of plugins for the conversion of keyword
# indices into some textual representation. I.e. this object manages
# the conversion to specialized serializations of keyword indices.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require struct::map
package require doctools::toc::structure
package require fileutil::paths
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::doctools::toc::import {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myconfig  using ::struct::map     ${selfns}::config
	install myinclude using ::fileutil::paths ${selfns}::include
	return
    }

    destructor {
	$myconfig  destroy
	$myinclude destroy
	# Clear the cache of loaded import plugins.
|



|



>
>









|

|















|
|







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
# doctoc.tcl --
#
#	Importing indices into other formats.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: import.tcl,v 1.3 2011/11/17 08:00:45 andreas_kupries Exp $

# Each object manages a set of plugins for the conversion of keyword
# indices into some textual representation. I.e. this object manages
# the conversion to specialized serializations of keyword indices.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require doctools::config
package require doctools::toc::structure
package require doctools::paths
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::doctools::toc::import {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myconfig  using ::doctools::config ${selfns}::config
	install myinclude using ::doctools::paths  ${selfns}::include
	return
    }

    destructor {
	$myconfig  destroy
	$myinclude destroy
	# Clear the cache of loaded import plugins.
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
    # ### ### ### ######### ######### #########

    method {import text} {text {format {}}} {
	set plugin [$self GetPlugin $format]

	set     configuration [$myconfig get]
	lappend configuration user   $::tcl_platform(user)
	lappend configuration format [$plugin plugin]

	return [$plugin do import $text $configuration]
    }

    method {import file} {path {format {}}} {
	# The plugin is not trusted to handle the file to convert.
	return [$self import text [fileutil::cat $path] $format]







|







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    # ### ### ### ######### ######### #########

    method {import text} {text {format {}}} {
	set plugin [$self GetPlugin $format]

	set     configuration [$myconfig get]
	lappend configuration user   $::tcl_platform(user)
	lappend configuraton  format [$plugin plugin]

	return [$plugin do import $text $configuration]
    }

    method {import file} {path {format {}}} {
	# The plugin is not trusted to handle the file to convert.
	return [$self import text [fileutil::cat $path] $format]
181
182
183
184
185
186
187
188
189
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::toc::import 0.2.1
return







|

183
184
185
186
187
188
189
190
191
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::toc::import 0.1
return

Changes to modules/doctools2toc/import.test.

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
# -*- tcl -*-
# -- toc_import.test:
# -- Tests for package "doctools::toc::import": Management of import plugins.
#
# Copyright (c) 2009-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    use struct/list.tcl         struct::list
    use snit/snit.tcl           snit
    use fileutil/fileutil.tcl   fileutil
    use fileutil/paths.tcl      fileutil::paths
    use log/logger.tcl          logger
    use pluginmgr/pluginmgr.tcl pluginmgr
    use struct/map.tcl          struct::map



    source [tcllibPath doctools2base/tests/common]
}
testing {
    useLocalKeep import.tcl doctools::toc::import
}





|

>
>














<


|
>
>







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
# -*- tcl -*-
# -- toc_import.test:
# -- Tests for package "doctools::toc::import": Management of import plugins.
#
# Copyright (c) 2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: import.test,v 1.1 2009/04/18 21:14:18 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    use struct/list.tcl         struct::list
    use snit/snit.tcl           snit
    use fileutil/fileutil.tcl   fileutil

    use log/logger.tcl          logger
    use pluginmgr/pluginmgr.tcl pluginmgr

    use      doctools2base/config.tcl    doctools::config
    use      doctools2base/paths.tcl     doctools::paths

    source [tcllibPath doctools2base/tests/common]
}
testing {
    useLocalKeep import.tcl doctools::toc::import
}

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

test doctools-toc-import-5.0 {config names, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I config names X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodnames type selfns win self"}

test doctools-toc-import-6.0 {config get, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I config get X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodget type selfns win self"}

test doctools-toc-import-7.0 {config set, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I config set
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test doctools-toc-import-7.1 {config set, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I config set N V X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

# config unset - accepts any number of arguments.

# -------------------------------------------------------------------------
## `include paths` component, provided via fileutil::paths, search path for includes

test doctools-toc-import-8.0 {include paths, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include paths X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodpaths type selfns win self"}

test doctools-toc-import-9.0 {include clear, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include clear X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodclear type selfns win self"}

test doctools-toc-import-10.0 {include add, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include add
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test doctools-toc-import-10.1 {include add, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include add P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test doctools-toc-import-11.0 {include remove, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include remove
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

test doctools-toc-import-11.1 {include remove, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include remove P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

# -------------------------------------------------------------------------

test doctools-toc-import-12.0 {config set, define single var} -setup {
    doctools::toc::import I
} -body {
    I config set N V







|







|







|







|



<
<
<






|







|







|







|







|







|







120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

test doctools-toc-import-5.0 {config names, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I config names X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodnames type selfns win self"}

test doctools-toc-import-6.0 {config get, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I config get X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodget type selfns win self"}

test doctools-toc-import-7.0 {config set, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I config set
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodset type selfns win self name ?value?"}

test doctools-toc-import-7.1 {config set, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I config set N V X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::config::Snit_methodset type selfns win self name ?value?"}

# config unset - accepts any number of arguments.




test doctools-toc-import-8.0 {include paths, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include paths X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodpaths type selfns win self"}

test doctools-toc-import-9.0 {include clear, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include clear X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodclear type selfns win self"}

test doctools-toc-import-10.0 {include add, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include add
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodadd type selfns win self path"}

test doctools-toc-import-10.1 {include add, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include add P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodadd type selfns win self path"}

test doctools-toc-import-11.0 {include remove, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include remove
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodremove type selfns win self path"}

test doctools-toc-import-11.1 {include remove, wrong#args} -setup {
    doctools::toc::import I
} -body {
    I include remove P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::doctools::paths::Snit_methodremove type selfns win self path"}

# -------------------------------------------------------------------------

test doctools-toc-import-12.0 {config set, define single var} -setup {
    doctools::toc::import I
} -body {
    I config set N V

Changes to modules/doctools2toc/import_json.tcl.

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

proc import {text configuration} {
    # Note: We cannot fail here on duplicate keys in the input,
    # especially for keywords and references, as we do for Tcl-based
    # canonical toc serializations, because our underlying JSON parser
    # automatically merges them, by taking only the last found
    # definition. I.e. of two or more definitions for a key X the last
    # overwrites all previous occurrences.
    return [doctools::toc::structure canonicalize [json::json2dict $text]]
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::toc::import::json 0.1
return







|








62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

proc import {text configuration} {
    # Note: We cannot fail here on duplicate keys in the input,
    # especially for keywords and references, as we do for Tcl-based
    # canonical toc serializations, because our underlying JSON parser
    # automatically merges them, by taking only the last found
    # definition. I.e. of two or more definitions for a key X the last
    # overwrites all previous occurences.
    return [doctools::toc::structure canonicalize [json::json2dict $text]]
}

# ### ### ### ######### ######### #########
## Ready

package provide doctools::toc::import::json 0.1
return

Changes to modules/doctools2toc/include/dependencies.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[comment {
         ASCII diagram of the dependencies between the doctools v2 toc packages
         ======================================================================
}][example {
                                    ~~~~~~~~~~~ doctools::toc ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::toc::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::toc::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
struct:map              =                         |     |    |                  =       doctools::include       struct::map      fileutil::paths
                        |                         |     |    |                  |
                doctools::toc::export::<*>        |     |    |          doctools::toc::import::<*>
                        doctoc                    |     |    |                  doctoc, json
                        json                      |     |    |                  |           \\
                        html                      |     |    |          doctools::toc::parse \\
                        nroff                     |     |    |                  |             \\
                        wiki                      |     |    |  +---------------+              json










|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[comment {
         ASCII diagram of the dependencies between the doctools v2 toc packages
         ======================================================================
}][example {
                                    ~~~~~~~~~~~ doctools::toc ~~~~~~~~~~~
                                   ~~                   |               ~~
                doctools::toc::export ~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~ doctools::toc::import
                        |                               |                       |
        +---------------+-------------------------+     |    +------------------+---------------+-----------------------+---------------+
        |               |                         |     |    |                  |               |                       |               |
doctools::config        =                         |     |    |                  =       doctools::include       doctools::config doctools::paths
                        |                         |     |    |                  |
                doctools::toc::export::<*>        |     |    |          doctools::toc::import::<*>
                        doctoc                    |     |    |                  doctoc, json
                        json                      |     |    |                  |           \\
                        html                      |     |    |          doctools::toc::parse \\
                        nroff                     |     |    |                  |             \\
                        wiki                      |     |    |  +---------------+              json

Changes to modules/doctools2toc/include/export/plugin.inc.

1
2
3
4
5
6
7
8
9
10
[comment {-*- tcl -*- --- !doctools ---}]
[manpage_begin doctools::toc::export::[vset PACKAGE] n [vset VERSION]]
[copyright {2009-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc "[vset NAME] export plugin"]
[category  {Text formatter plugin}]
[require Tcl 8.4]
[require doctools::toc::export::[vset PACKAGE] [opt [vset VERSION]]]
[include format/[vset REQUIRE].inc]
[keywords doctools toc {table of contents} serialization export [vset NAME]]


|







1
2
3
4
5
6
7
8
9
10
[comment {-*- tcl -*- --- !doctools ---}]
[manpage_begin doctools::toc::export::[vset PACKAGE] n [vset VERSION]]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc "[vset NAME] export plugin"]
[category  {Text formatter plugin}]
[require Tcl 8.4]
[require doctools::toc::export::[vset PACKAGE] [opt [vset VERSION]]]
[include format/[vset REQUIRE].inc]
[keywords doctools toc {table of contents} serialization export [vset NAME]]
47
48
49
50
51
52
53
54
55

[list_end]

[include config/[vset CONFIG].inc]
[include ../serialization.inc]

[vset CATEGORY doctools]
[include ../../../common-text/feedback.inc]
[manpage_end]







|

47
48
49
50
51
52
53
54
55

[list_end]

[include config/[vset CONFIG].inc]
[include ../serialization.inc]

[vset CATEGORY doctools]
[include ../../../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2toc/include/import/plugin.inc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[comment {-*- tcl -*- --- !doctools ---}]
[vset VERSION 0.2.1]
[manpage_begin doctools::toc::import::[vset PACKAGE] n [vset VERSION]]
[copyright {2009-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc "[vset NAME] import plugin"]
[category  {Text formatter plugin}]
[require Tcl 8.5]
[require doctools::toc::import::[vset PACKAGE] [opt [vset VERSION]]]
[include format/[vset REQUIRE].inc]
[keywords doctools toc {table of contents} deserialization import [vset NAME]]
[description]

This package implements the doctools table of contents import plugin
for the parsing of [vset NAME] markup.


<
|
|



|
|







1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
[comment {-*- tcl -*- --- !doctools ---}]

[manpage_begin doctools::toc::import::[vset PACKAGE] n 0.1]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc "[vset NAME] import plugin"]
[category  {Text formatter plugin}]
[require Tcl 8.4]
[require doctools::toc::import::[vset PACKAGE] [opt 0.1]]
[include format/[vset REQUIRE].inc]
[keywords doctools toc {table of contents} deserialization import [vset NAME]]
[description]

This package implements the doctools table of contents import plugin
for the parsing of [vset NAME] markup.

48
49
50
51
52
53
54
55
56
[list_end]


[include config/[vset CONFIG].inc]
[include ../serialization.inc]

[vset CATEGORY doctools]
[include ../../../common-text/feedback.inc]
[manpage_end]







|

47
48
49
50
51
52
53
54
55
[list_end]


[include config/[vset CONFIG].inc]
[include ../serialization.inc]

[vset CATEGORY doctools]
[include ../../../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2toc/include/msgcat.inc.

38
39
40
41
42
43
44
45
46

[section API]

This package has no exported API.


[vset CATEGORY doctools]
[include ../../common-text/feedback.inc]
[manpage_end]







|

38
39
40
41
42
43
44
45
46

[section API]

This package has no exported API.


[vset CATEGORY doctools]
[include ../../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2toc/parse.tcl.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# - children of divisions = if any, elements of the division, references and divisions.
#
# The order of the elements under root, and of the elements under
# their division reflects the order of the information in the parsed
# document.

# Attributes in the nodes, except root provide location information,
# i.e. referring from there in the input the information is coming from
# (human-readable output: line/col for end of token, offset start/end
# for range covered by token.

# # ## ### ##### ######## ############# #####################
## Requirements

package require Tcl 8.4                  ; # Required runtime.







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# - children of divisions = if any, elements of the division, references and divisions.
#
# The order of the elements under root, and of the elements under
# their division reflects the order of the information in the parsed
# document.

# Attributes in the nodes, except root provide location information,
# i.e. refering from there in the input the information is coming from
# (human-readable output: line/col for end of token, offset start/end
# for range covered by token.

# # ## ### ##### ######## ############# #####################
## Requirements

package require Tcl 8.4                  ; # Required runtime.

Changes to modules/doctools2toc/pkgIndex.tcl.

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
if {![package vsatisfies [package provide Tcl] 8.4]} {return}

# Packages for the doctools toc v2 implementation
# (still v1.1 doctoc language).

# - Index container, mutable toc objects
# - Export and import management
# - Export and import plugins
# - Parser for doctoc markup, and handling serializations
# - Message catalogs for the parser

package ifneeded doctools::toc                 2     [list source [file join $dir container.tcl]]

package ifneeded doctools::toc::export         0.2.1 [list source [file join $dir export.tcl]]


package ifneeded doctools::toc::export::doctoc 0.1 [list source [file join $dir export_doctoc.tcl]]
package ifneeded doctools::toc::export::html   0.1 [list source [file join $dir export_html.tcl]]
package ifneeded doctools::toc::export::json   0.1 [list source [file join $dir export_json.tcl]]
package ifneeded doctools::toc::export::nroff  0.2 [list source [file join $dir export_nroff.tcl]]
package ifneeded doctools::toc::export::text   0.1 [list source [file join $dir export_text.tcl]]
package ifneeded doctools::toc::export::wiki   0.1 [list source [file join $dir export_wiki.tcl]]

package ifneeded doctools::toc::import::doctoc 0.1 [list source [file join $dir import_doctoc.tcl]]
package ifneeded doctools::toc::import::json   0.1 [list source [file join $dir import_json.tcl]]

package ifneeded doctools::toc::parse          0.1 [list source [file join $dir parse.tcl]]
package ifneeded doctools::toc::structure      0.1 [list source [file join $dir structure.tcl]]

package ifneeded doctools::msgcat::toc::c      0.1 [list source [file join $dir msgcat_c.tcl]]
package ifneeded doctools::msgcat::toc::de     0.1 [list source [file join $dir msgcat_de.tcl]]
package ifneeded doctools::msgcat::toc::en     0.1 [list source [file join $dir msgcat_en.tcl]]
package ifneeded doctools::msgcat::toc::fr     0.1 [list source [file join $dir msgcat_fr.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}

package ifneeded doctools::toc::import         0.2.1 [list source [file join $dir import.tcl]]











|
>
|
>


















<
<
<
<
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




if {![package vsatisfies [package provide Tcl] 8.4]} {return}

# Packages for the doctools toc v2 implementation
# (still v1.1 doctoc language).

# - Index container, mutable toc objects
# - Export and import management
# - Export and import plugins
# - Parser for doctoc markup, and handling serializations
# - Message catalogs for the parser

package ifneeded doctools::toc                 2   [list source [file join $dir container.tcl]]

package ifneeded doctools::toc::export         0.1 [list source [file join $dir export.tcl]]
package ifneeded doctools::toc::import         0.1 [list source [file join $dir import.tcl]]

package ifneeded doctools::toc::export::doctoc 0.1 [list source [file join $dir export_doctoc.tcl]]
package ifneeded doctools::toc::export::html   0.1 [list source [file join $dir export_html.tcl]]
package ifneeded doctools::toc::export::json   0.1 [list source [file join $dir export_json.tcl]]
package ifneeded doctools::toc::export::nroff  0.2 [list source [file join $dir export_nroff.tcl]]
package ifneeded doctools::toc::export::text   0.1 [list source [file join $dir export_text.tcl]]
package ifneeded doctools::toc::export::wiki   0.1 [list source [file join $dir export_wiki.tcl]]

package ifneeded doctools::toc::import::doctoc 0.1 [list source [file join $dir import_doctoc.tcl]]
package ifneeded doctools::toc::import::json   0.1 [list source [file join $dir import_json.tcl]]

package ifneeded doctools::toc::parse          0.1 [list source [file join $dir parse.tcl]]
package ifneeded doctools::toc::structure      0.1 [list source [file join $dir structure.tcl]]

package ifneeded doctools::msgcat::toc::c      0.1 [list source [file join $dir msgcat_c.tcl]]
package ifneeded doctools::msgcat::toc::de     0.1 [list source [file join $dir msgcat_de.tcl]]
package ifneeded doctools::msgcat::toc::en     0.1 [list source [file join $dir msgcat_en.tcl]]
package ifneeded doctools::msgcat::toc::fr     0.1 [list source [file join $dir msgcat_fr.tcl]]




Changes to modules/doctools2toc/toc_container.man.

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

The result of the method is the empty string.

[call [arg objectName] [method up] [arg id]]

This method returns the handle of the parent for the element
identified by its handle [arg id], or the empty string if [arg id]
referred to the root element.

[call [arg objectName] [method next] [arg id]]

This method returns the handle of the right sibling for the element
identified by its handle [arg id], or the handle of the parent if the
element has no right sibling, or the empty string if [arg id] referred
to the root element.

[call [arg objectName] [method prev] [arg id]]

This method returns the handle of the left sibling for the element
identified by its handle [arg id], or the handle of the parent if the
element has no left sibling, or the empty string if [arg id] referred
to the root element.

[call [arg objectName] [method child] [arg id] [arg label] [opt [arg ...]]]

This method returns the handle of a child of the element identified by
its handle [arg id]. The child itself is identified by a series of
labels.







|





|






|







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

The result of the method is the empty string.

[call [arg objectName] [method up] [arg id]]

This method returns the handle of the parent for the element
identified by its handle [arg id], or the empty string if [arg id]
refered to the root element.

[call [arg objectName] [method next] [arg id]]

This method returns the handle of the right sibling for the element
identified by its handle [arg id], or the handle of the parent if the
element has no right sibling, or the empty string if [arg id] refered
to the root element.

[call [arg objectName] [method prev] [arg id]]

This method returns the handle of the left sibling for the element
identified by its handle [arg id], or the handle of the parent if the
element has no left sibling, or the empty string if [arg id] refered
to the root element.

[call [arg objectName] [method child] [arg id] [arg label] [opt [arg ...]]]

This method returns the handle of a child of the element identified by
its handle [arg id]. The child itself is identified by a series of
labels.
362
363
364
365
366
367
368
369
370
In that case an error will be thrown if the container has no export
manager attached to it.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

362
363
364
365
366
367
368
369
370
In that case an error will be thrown if the container has no export
manager attached to it.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2toc/toc_export.man.

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
[vset VERSION 0.2.1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::toc::export n [vset VERSION]]
[keywords conversion]
[keywords doctoc]
[keywords documentation]
[keywords export]
[keywords formatting]
[keywords generation]
[keywords HTML]
[keywords json]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords plugin]
[keywords reference]
[keywords table]
[keywords {table of contents}]
[keywords {tcler's wiki}]
[keywords text]
[keywords url]
[keywords wiki]
[copyright {2009-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {Exporting tables of contents}]
[category  {Documentation tools}]
[require doctools::toc::export [opt [vset VERSION]]]
[require Tcl 8.4]
[require struct::map]
[require doctools::toc::structure]
[require snit]
[require pluginmgr]
[description]

This package provides a class to manage the plugins for the export of
tables of contents to other formats, i.e. their conversion to, for
<

|



















|



|

|








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

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::toc::export n 0.1]
[keywords conversion]
[keywords doctoc]
[keywords documentation]
[keywords export]
[keywords formatting]
[keywords generation]
[keywords HTML]
[keywords json]
[keywords manpage]
[keywords markup]
[keywords nroff]
[keywords plugin]
[keywords reference]
[keywords table]
[keywords {table of contents}]
[keywords {tcler's wiki}]
[keywords text]
[keywords url]
[keywords wiki]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {Exporting tables of contents}]
[category  {Documentation tools}]
[require doctools::toc::export [opt 0.1]]
[require Tcl 8.4]
[require doctools::config]
[require doctools::toc::structure]
[require snit]
[require pluginmgr]
[description]

This package provides a class to manage the plugins for the export of
tables of contents to other formats, i.e. their conversion to, for
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
If no value is specified it simply returns the current value, without
changing it.

[para]

Note that while the user can set the predefined configuration
variables [const user] and [const format] doing so will have no
effect, these values will be internally overridden when invoking an
import plugin.

[call [arg objectName] [method {config unset}] [arg pattern]...]

This method unsets all configuration variables matching the specified
glob [arg pattern]s. If no pattern is specified it will unset all
currently defined configuration variables.







|







197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
If no value is specified it simply returns the current value, without
changing it.

[para]

Note that while the user can set the predefined configuration
variables [const user] and [const format] doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.

[call [arg objectName] [method {config unset}] [arg pattern]...]

This method unsets all configuration variables matching the specified
glob [arg pattern]s. If no pattern is specified it will unset all
currently defined configuration variables.
299
300
301
302
303
304
305
306
307
       the command [cmd export]. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

298
299
300
301
302
303
304
305
306
       the command [cmd export]. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2toc/toc_import.man.

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
[vset VERSION 0.2.1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::toc::import n [vset VERSION]]
[keywords conversion]
[keywords doctoc]
[keywords documentation]
[keywords import]
[keywords json]
[keywords manpage]
[keywords markup]
[keywords parsing]
[keywords plugin]
[keywords reference]
[keywords table]
[keywords {table of contents}]
[keywords url]
[copyright {2009-2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {Importing keyword indices}]
[category  {Documentation tools}]
[require doctools::toc::import [opt [vset VERSION]]]
[require Tcl 8.4]
[require struct::map]
[require doctools::toc::structure]
[require snit]
[require pluginmgr]
[description]

This package provides a class to manage the plugins for the import of
tables of contents from other formats, i.e. their conversion from, for
<

|













|



|

|








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

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::toc::import n 0.1]
[keywords conversion]
[keywords doctoc]
[keywords documentation]
[keywords import]
[keywords json]
[keywords manpage]
[keywords markup]
[keywords parsing]
[keywords plugin]
[keywords reference]
[keywords table]
[keywords {table of contents}]
[keywords url]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {Importing keyword indices}]
[category  {Documentation tools}]
[require doctools::toc::import [opt 0.1]]
[require Tcl 8.4]
[require doctools::config]
[require doctools::toc::structure]
[require snit]
[require pluginmgr]
[description]

This package provides a class to manage the plugins for the import of
tables of contents from other formats, i.e. their conversion from, for
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
If no value is specified it simply returns the current value, without
changing it.

[para]

Note that while the user can set the predefined configuration
variables [const user] and [const format] doing so will have no
effect, these values will be internally overridden when invoking an
import plugin.

[call [arg objectName] [method {config unset}] [arg pattern]...]

This method unsets all configuration variables matching the specified
glob [arg pattern]s. If no pattern is specified it will unset all
currently defined configuration variables.







|







207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
If no value is specified it simply returns the current value, without
changing it.

[para]

Note that while the user can set the predefined configuration
variables [const user] and [const format] doing so will have no
effect, these values will be internally overriden when invoking an
import plugin.

[call [arg objectName] [method {config unset}] [arg pattern]...]

This method unsets all configuration variables matching the specified
glob [arg pattern]s. If no pattern is specified it will unset all
currently defined configuration variables.
387
388
389
390
391
392
393
394
395
       the command [cmd import]. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

386
387
388
389
390
391
392
393
394
       the command [cmd import]. This call has to leave the plugin in
       a state where another usage cycle can be run without problems.

[list_end]

[include include/serialization.inc]
[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2toc/toc_introduction.man.

135
136
137
138
139
140
141
142
143
the [manpage {DocTools - Keyword Indices}] and
the [manpage {DocTools - General}], respectively.

[section {Package Overview}]
[include include/dependencies.inc]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

135
136
137
138
139
140
141
142
143
the [manpage {DocTools - Keyword Indices}] and
the [manpage {DocTools - General}], respectively.

[section {Package Overview}]
[include include/dependencies.inc]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2toc/toc_parse.man.

131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

[enum]
Each error element will be a list containing six strings describing an
error in detail. The strings will be

[list_begin enumerated]
[enum]
The path of the file the error occurred in. This may be empty.

[enum]
The range of the token the error was found at. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file). Offsets
are counted from zero.








|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

[enum]
Each error element will be a list containing six strings describing an
error in detail. The strings will be

[list_begin enumerated]
[enum]
The path of the file the error occured in. This may be empty.

[enum]
The range of the token the error was found at. This range is a
two-element list containing the offset of the first and last character
in the range, counted from the beginning of the input (file). Offsets
are counted from zero.

167
168
169
170
171
172
173
174
175
[list_end]
[list_end]

[include include/format/doctoc.inc]
[include include/serialization.inc]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

167
168
169
170
171
172
173
174
175
[list_end]
[list_end]

[include include/format/doctoc.inc]
[include include/serialization.inc]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/doctools2toc/toc_structure.man.

143
144
145
146
147
148
149
150
151
section [sectref {ToC serialization format}].

[list_end]

[include include/serialization.inc]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

143
144
145
146
147
148
149
150
151
section [sectref {ToC serialization format}].

[list_end]

[include include/serialization.inc]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/dtplite/dtplite.tcl.

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
# -*- tcl -*- \
# @@ Meta Begin
# Application dtplite 1.3.1
# Meta platform     tcl
# Meta summary      Lightweight DocTools Processor
# Meta description  This application is a simple processor
# Meta description  for documents written in the doctools
# Meta description  markup language. It covers the most
# Meta description  common use cases, but is not as
# Meta description  configurable as its big brother dtp.
# Meta category     Processing doctools documents
# Meta subject      doctools doctoc docidx
# Meta require      {doctools 1}
# Meta require      {doctools::idx 1}
# Meta require      {doctools::toc 1}
# Meta require      fileutil
# Meta require      textutil::repeat
# Meta author       Andreas Kupries
# Meta license      BSD
# @@ Meta End

package provide dtplite 1.3.1

# dtp lite - Lightweight DocTools Processor
# ======== = ==============================
#
# Use cases
# ---------
#


|


















|







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
# -*- tcl -*- \
# @@ Meta Begin
# Application dtplite 1.2
# Meta platform     tcl
# Meta summary      Lightweight DocTools Processor
# Meta description  This application is a simple processor
# Meta description  for documents written in the doctools
# Meta description  markup language. It covers the most
# Meta description  common use cases, but is not as
# Meta description  configurable as its big brother dtp.
# Meta category     Processing doctools documents
# Meta subject      doctools doctoc docidx
# Meta require      {doctools 1}
# Meta require      {doctools::idx 1}
# Meta require      {doctools::toc 1}
# Meta require      fileutil
# Meta require      textutil::repeat
# Meta author       Andreas Kupries
# Meta license      BSD
# @@ Meta End

package provide dtplite 1.3

# dtp lite - Lightweight DocTools Processor
# ======== = ==============================
#
# Use cases
# ---------
#
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#	a global documentation tree of all installed packages.
#
# Additional features.
#
# *	As described above the format name is used as the extension
#	for the generated files. Does it make sense to introduce an
#	option with which we can overide this, or should we simply
#	expect that a calling script does a proper renaming of all the
#	files ?  ... The option is better. In HTML output we have
#	links between the files, and renaming from the outside just
#	breaks the links. This option is '-ext'. It is ignored if the
#	output is a single file (fully specified via -o), or stdout.
#
#	-ext extension
#







|







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#	a global documentation tree of all installed packages.
#
# Additional features.
#
# *	As described above the format name is used as the extension
#	for the generated files. Does it make sense to introduce an
#	option with which we can overide this, or should we simply
#	extect that a calling script does a proper renaming of all the
#	files ?  ... The option is better. In HTML output we have
#	links between the files, and renaming from the outside just
#	breaks the links. This option is '-ext'. It is ignored if the
#	output is a single file (fully specified via -o), or stdout.
#
#	-ext extension
#
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
    return [join $lines \n]\n
}

proc ::dtplite::TocWrite {ftoc findex text {map {}}} {
    variable format

    if {[string equal $format null]} return

    #Print stdout "Writing toc (base) .${ftoc}doc ..."
    Write [At .${ftoc}doc] $text

    set ft [Output $ftoc]

    doctools::toc::new toc -format $format -file $ft
    if {[HaveKeywords]} {
        NavbuttonPush {Keyword Index} [Output $findex] $ftoc
    }
    HeaderSetup toc $ft
    if {[HaveKeywords]} {
        NavbuttonPop
    }
    FooterSetup  toc
    StyleSetup   toc $ftoc

    foreach {k v} $map {toc map $k $v}

    Print stdout "Writing toc ($format) $ft ..."
    Write [At $ft] [toc format $text]

    toc destroy
    return
}

proc ::dtplite::TocAlign {fv lv div} {
    upvar 1 $fv mxf $lv mxl
    set mxf 0







<
<
|
















<

<







1181
1182
1183
1184
1185
1186
1187


1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204

1205

1206
1207
1208
1209
1210
1211
1212
    return [join $lines \n]\n
}

proc ::dtplite::TocWrite {ftoc findex text {map {}}} {
    variable format

    if {[string equal $format null]} return


    Write [At .tocdoc] $text

    set ft [Output $ftoc]

    doctools::toc::new toc -format $format -file $ft
    if {[HaveKeywords]} {
        NavbuttonPush {Keyword Index} [Output $findex] $ftoc
    }
    HeaderSetup toc $ft
    if {[HaveKeywords]} {
        NavbuttonPop
    }
    FooterSetup  toc
    StyleSetup   toc $ftoc

    foreach {k v} $map {toc map $k $v}


    Write [At $ft] [toc format $text]

    toc destroy
    return
}

proc ::dtplite::TocAlign {fv lv div} {
    upvar 1 $fv mxf $lv mxl
    set mxf 0
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
	foreach k $keywords {
	    set kx [list $k $symfile $label]
	    if {![info exists kdup($kx)]} {
		lappend keys($k) [list $symfile $label]
		set kdup($kx) .
	    }
	    if {[info exist kwid($k)]} continue
	    set kwid($k) [IdxAnchor $k]
	    incr start
	}
    }
    return [list $start [array get keys]]
}

proc ::dtplite::IdxAnchor {text} {
    set anchor [regsub -all {[^a-zA-Z0-9]} [string tolower $text] {_}]
    set anchor [regsub -all {__+} $anchor _]
    return $anchor
}

proc ::dtplite::IdxItem {f meta} {
    array set md $meta
    set keywords $md(keywords)
    set title    $md(title)
    return [list $f $keywords $title]
}

proc ::dtplite::IdxGenerate {desc data} {
    # Sort by keyword label.
    # Write as docidx.

    array set keys $data

    TagsBegin
    Tag+ index_begin [list {Keyword Index} $desc]

    # For a good display we sort keywords in dictionary order.
    # We ignore their leading non-alphanumeric characters.
    set kwlist {}
    foreach kw [array names keys] {
	set kwx [string trim [regsub -all {^[^a-zA-Z0-9]+} $kw {}]]
	lappend kwlist [list $kwx $kw]
    }
    foreach item [lsort -index 0 -dict $kwlist] {
	foreach {_ k} $item break
	IdxAlign mxf $keys($k)

	Tag+ key [list $k]
	foreach v [lsort -dict -index 1 $keys($k)] {
	    foreach {file label} $v break
	    Tag+ manpage [FmtR mxf $file] [list $label]
	}
    }

    Tag+ index_end
    #puts ____________________\n[join $lines \n]\n_________________________
    return [join $lines \n]\n
}

proc ::dtplite::IdxWrite {findex ftoc text} {
    variable format

    if {[string equal $format null]} return
    if {![HaveKeywords]} return

    #Print stdout "Writing index (base) .idxdoc ..."
    Write [At .idxdoc] $text

    set fi [Output $findex]

    doctools::idx::new idx -format $format -file $fi

    NavbuttonPush {Table Of Contents} [Output $ftoc] $findex
    HeaderSetup   idx $findex
    NavbuttonPop
    FooterSetup   idx
    StyleSetup    idx $findex
    XrefSetupKwid idx

    Print stdout "Writing index ($format) $fi ..."
    Write [At $fi] [idx format $text]

    idx destroy
    return
}

proc ::dtplite::IdxAlign {v keys} {
    upvar 1 $v mxf
    set mxf 0







|






<
<
<
<
<
<
















<
<
<
|
<
<
<
<
<




















<













<

<







1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286






1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302



1303





1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323

1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336

1337

1338
1339
1340
1341
1342
1343
1344
	foreach k $keywords {
	    set kx [list $k $symfile $label]
	    if {![info exists kdup($kx)]} {
		lappend keys($k) [list $symfile $label]
		set kdup($kx) .
	    }
	    if {[info exist kwid($k)]} continue
	    set kwid($k) key$start
	    incr start
	}
    }
    return [list $start [array get keys]]
}







proc ::dtplite::IdxItem {f meta} {
    array set md $meta
    set keywords $md(keywords)
    set title    $md(title)
    return [list $f $keywords $title]
}

proc ::dtplite::IdxGenerate {desc data} {
    # Sort by keyword label.
    # Write as docidx.

    array set keys $data

    TagsBegin
    Tag+ index_begin [list {Keyword Index} $desc]




    foreach k [lsort -dict [array names keys]] {





	IdxAlign mxf $keys($k)

	Tag+ key [list $k]
	foreach v [lsort -dict -index 1 $keys($k)] {
	    foreach {file label} $v break
	    Tag+ manpage [FmtR mxf $file] [list $label]
	}
    }

    Tag+ index_end
    #puts ____________________\n[join $lines \n]\n_________________________
    return [join $lines \n]\n
}

proc ::dtplite::IdxWrite {findex ftoc text} {
    variable format

    if {[string equal $format null]} return
    if {![HaveKeywords]} return


    Write [At .idxdoc] $text

    set fi [Output $findex]

    doctools::idx::new idx -format $format -file $fi

    NavbuttonPush {Table Of Contents} [Output $ftoc] $findex
    HeaderSetup   idx $findex
    NavbuttonPop
    FooterSetup   idx
    StyleSetup    idx $findex
    XrefSetupKwid idx


    Write [At $fi] [idx format $text]

    idx destroy
    return
}

proc ::dtplite::IdxAlign {v keys} {
    upvar 1 $v mxf
    set mxf 0
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
    if {![llength $nav]} { return {} }
    upvar 1 $sepv sep $firstv first

    if {$sep} {append hdr <br>\n}
    set sep 0

    foreach item $nav {
	if {!$first} {append hdr "&#124; "} else {append hdr "  "}
	set first 0
	foreach {label url} $item break

	if {[string length $ref] &&
	    ![string match *://* $url] &&
	    ![string match /*    $url]} {
	    # The specified url is a plain relative path and we have a







|







1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
    if {![llength $nav]} { return {} }
    upvar 1 $sepv sep $firstv first

    if {$sep} {append hdr <br>\n}
    set sep 0

    foreach item $nav {
	if {!$first} {append hdr "| "} else {append hdr "  "}
	set first 0
	foreach {label url} $item break

	if {[string length $ref] &&
	    ![string match *://* $url] &&
	    ![string match /*    $url]} {
	    # The specified url is a plain relative path and we have a

Changes to modules/dtplite/pkgIndex.tcl.

1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.2]} {
    # PRAGMA: returnok
    return
}
package ifneeded dtplite 1.3.1 [list source [file join $dir dtplite.tcl]]




|
1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.2]} {
    # PRAGMA: returnok
    return
}
package ifneeded dtplite 1.3 [list source [file join $dir dtplite.tcl]]

Changes to modules/dtplite/pkg_dtplite.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 1.3.1]
[manpage_begin dtplite n [vset PACKAGE_VERSION]]
[see_also {docidx introduction}]
[see_also {doctoc introduction}]
[see_also {doctools introduction}]
[keywords conversion]
[keywords docidx]
[keywords doctoc]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 1.3]
[manpage_begin dtplite n [vset PACKAGE_VERSION]]
[see_also {docidx introduction}]
[see_also {doctoc introduction}]
[see_also {doctools introduction}]
[keywords conversion]
[keywords docidx]
[keywords doctoc]
441
442
443
444
445
446
447
448
449

They are left in place, i.e. not deleted, to serve as demonstrations
of doctoc and docidx markup.

[list_end]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]







|

441
442
443
444
445
446
447
448
449

They are left in place, i.e. not deleted, to serve as demonstrations
of doctoc and docidx markup.

[list_end]

[vset CATEGORY doctools]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/exif/exif.man.

72
73
74
75
76
77
78
79
80

[section ACKNOWLEDGEMENTS]

This code is a direct translation of version 1.3 of exif.pl by Chris
Breeze.  See the source for full headers, references, etc.

[vset CATEGORY exif]
[include ../common-text/feedback.inc]
[manpage_end]







|

72
73
74
75
76
77
78
79
80

[section ACKNOWLEDGEMENTS]

This code is a direct translation of version 1.3 of exif.pl by Chris
Breeze.  See the source for full headers, references, etc.

[vset CATEGORY exif]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/exif/exif.test.

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
# -*- tcl -*-
# exif.test:  tests for the exif structure.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2001-2006 by Andreas Kupries <a.kupries@westend.com>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.3
testsNeedTcltest 1.0

testing {
    useLocal exif.tcl exif
}

# -------------------------------------------------------------------------

test exif-makernote-19.0 {makernote field 19 (afpoint) is optional} {
    # AFPoint == AutoFocus Point

    set f [open [asset noafpoint.jpg] r]
    fconfigure $f -translation binary
    array set resa [exif::analyze $f]
    close $f
    set resa(FocalPlaneXResolution) [format %13.8f $resa(FocalPlaneXResolution)]
    set resa(FocalPlaneYResolution) [format %13.8f $resa(FocalPlaneYResolution)]
    set res [dictsort [array get resa]]
    unset resa
    set res
} {AFPointsUsed {3 right} AperatureValue 7.1 AutoFocusMode {AI servo} CameraMake Canon CameraModel {Canon PowerShot S100} ColorSpace 1 ComponentsConfigured 0x00030201 Contrast Normal DateTime {2004:09:06 05:22:56} DateTimeDigitized {2004:09:06 05:22:56} DateTimeOriginal {2004:09:06 05:22:56} ExifImageHeight 1200 ExifImageWidth 1600 ExifInteroperabilityOffset 1088 ExifVersion 0210 ExposureBiasValue 0 ExposureTime {1/250.0 seconds} FNumber 7.1 FileSource {3 - Digital camera} FirmwareVersion {Firmware Version 1.0} Flash no FlashMode auto FlashPixVersion 0100 FocalLength {5.40625 mm} FocalPlaneResolutionUnit inch FocalPlaneXResolution 7766.99029126 FocalPlaneYResolution 7741.93548387 ISO unknown ImageFormat {IMG:JPEG file} ImageNumber 140-4060 ImageQuality Fine ImageSize large MacroMode normal MeteringMode unknown Orientation 1 Owner Irochka ResolutionUnit inch Saturation Normal SensingMethod 2 Sharpness Normal ShootingMode {Single frame} ShutterSpeedValue {250 Hz} SubjectDistance {3.358 m} UnknownTag-0x10 100925440 UserComment {554 - } WhiteBalance Auto XResolution 180.0 YCbCrPositioning {Center of pixel array} YResolution 180.0}

testsuiteCleanup









>
>



















|











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
# -*- tcl -*-
# exif.test:  tests for the exif structure.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2001-2006 by Andreas Kupries <a.kupries@westend.com>
# All rights reserved.
#
# RCS: @(#) $Id: exif.test,v 1.6 2006/10/09 21:41:40 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.3
testsNeedTcltest 1.0

testing {
    useLocal exif.tcl exif
}

# -------------------------------------------------------------------------

test exif-makernote-19.0 {makernote field 19 (afpoint) is optional} {
    # AFPoint == AutoFocus Point

    set f [open [file join $::tcltest::testsDirectory noafpoint.jpg] r]
    fconfigure $f -translation binary
    array set resa [exif::analyze $f]
    close $f
    set resa(FocalPlaneXResolution) [format %13.8f $resa(FocalPlaneXResolution)]
    set resa(FocalPlaneYResolution) [format %13.8f $resa(FocalPlaneYResolution)]
    set res [dictsort [array get resa]]
    unset resa
    set res
} {AFPointsUsed {3 right} AperatureValue 7.1 AutoFocusMode {AI servo} CameraMake Canon CameraModel {Canon PowerShot S100} ColorSpace 1 ComponentsConfigured 0x00030201 Contrast Normal DateTime {2004:09:06 05:22:56} DateTimeDigitized {2004:09:06 05:22:56} DateTimeOriginal {2004:09:06 05:22:56} ExifImageHeight 1200 ExifImageWidth 1600 ExifInteroperabilityOffset 1088 ExifVersion 0210 ExposureBiasValue 0 ExposureTime {1/250.0 seconds} FNumber 7.1 FileSource {3 - Digital camera} FirmwareVersion {Firmware Version 1.0} Flash no FlashMode auto FlashPixVersion 0100 FocalLength {5.40625 mm} FocalPlaneResolutionUnit inch FocalPlaneXResolution 7766.99029126 FocalPlaneYResolution 7741.93548387 ISO unknown ImageFormat {IMG:JPEG file} ImageNumber 140-4060 ImageQuality Fine ImageSize large MacroMode normal MeteringMode unknown Orientation 1 Owner Irochka ResolutionUnit inch Saturation Normal SensingMethod 2 Sharpness Normal ShootingMode {Single frame} ShutterSpeedValue {250 Hz} SubjectDistance {3.358 m} UnknownTag-0x10 100925440 UserComment {554 - } WhiteBalance Auto XResolution 180.0 YCbCrPositioning {Center of pixel array} YResolution 180.0}

testsuiteCleanup

Added modules/exif/noafpoint.jpg.

cannot compute difference between binary files

Deleted modules/exif/test-assets/noafpoint.jpg.

cannot compute difference between binary files

Changes to modules/fileutil/filetype.test.

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
# -*- tcl -*-
# Tests for the find function.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2001 by ActiveState Tool Corp.
# Copyright (c) 2005-2007,2017 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5 ;# See fumagic.testsupport
testsNeedTcltest 1.0

support {
    useTcllibFile fumagic/fumagic.testsupport ; # Filetype helpers. 8.5+ (dict, apply)
    use           cmdline/cmdline.tcl cmdline
}
testing {
    useLocal fileutil.tcl fileutil
}

# -------------------------------------------------------------------------








|

>
>







|



|







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
# -*- tcl -*-
# Tests for the find function.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2001 by ActiveState Tool Corp.
# Copyright (c) 2005-2007 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: filetype.test,v 1.1 2007/08/03 23:07:25 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    useTcllibFile fumagic/fumagic.testsupport ; # Filetype helpers.
    use           cmdline/cmdline.tcl cmdline
}
testing {
    useLocal fileutil.tcl fileutil
}

# -------------------------------------------------------------------------
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
    set f [makeGzipFile]
    set res [catch {fileutil::fileType $f} msg]
    removeGzipFile
    list $res $msg
} [list 0 [list binary compressed gzip]]

test fileType-1.22 {text pdf} {
    set f [asset pdf4tcl_01.pdf]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list text pdf]]

# -------------------------------------------------------------------------

test fileType-1.23 {sqlite3, fossil repo} {
    set f [asset p.fossil]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 fossil-repository]]

test fileType-1.24 {sqlite3, fossil checkout} {
    set f [asset p.ckout]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 fossil-checkout]]

test fileType-1.25 {sqlite3, fossil global config} {
    set f [asset p.global]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 fossil-global-config]]

test fileType-1.26 {sqlite3, no app} {
    set f [asset p.sqlite]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 A00000000]]

# -------------------------------------------------------------------------

unset path
testsuiteCleanup
return







|




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





177
178
179
180
181
182
183
184
185
186
187
188


























189
190
191
192
193
    set f [makeGzipFile]
    set res [catch {fileutil::fileType $f} msg]
    removeGzipFile
    list $res $msg
} [list 0 [list binary compressed gzip]]

test fileType-1.22 {text pdf} {
    set f [localPath test-data/pdf4tcl_01.pdf]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list text pdf]]



























# -------------------------------------------------------------------------

unset path
testsuiteCleanup
return

Changes to modules/fileutil/fileutil.man.

1
2
3
4
5
6
7
8
[vset PACKAGE_VERSION 1.16]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin fileutil n [vset PACKAGE_VERSION]]
[keywords cat]
[keywords {file utilities}]
[keywords grep]
[keywords {temp file}]
[keywords test]
|







1
2
3
4
5
6
7
8
[vset PACKAGE_VERSION 1.15]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin fileutil n [vset PACKAGE_VERSION]]
[keywords cat]
[keywords {file utilities}]
[keywords grep]
[keywords {temp file}]
[keywords test]
514
515
516
517
518
519
520
521
522
option to prevent the traverser from following symbolic links, like so:

[include include/cross-index-trav.inc]

[list_end]

[vset CATEGORY fileutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

514
515
516
517
518
519
520
521
522
option to prevent the traverser from following symbolic links, like so:

[include include/cross-index-trav.inc]

[list_end]

[vset CATEGORY fileutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/fileutil/fileutil.tcl.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: fileutil.tcl,v 1.78 2010/06/17 04:46:19 andreas_kupries Exp $

package require Tcl 8.2
package require cmdline
package provide fileutil 1.16

namespace eval ::fileutil {
    namespace export \
	    grep find findByPattern cat touch foreachLine \
	    jail stripPwd stripN stripPath tempdir tempfile \
	    install fileType writeFile appendToFile \
	    insertIntoFile removeFromFile replaceInFile \







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: fileutil.tcl,v 1.78 2010/06/17 04:46:19 andreas_kupries Exp $

package require Tcl 8.2
package require cmdline
package provide fileutil 1.15

namespace eval ::fileutil {
    namespace export \
	    grep find findByPattern cat touch foreachLine \
	    jail stripPwd stripN stripPath tempdir tempfile \
	    install fileType writeFile appendToFile \
	    insertIntoFile removeFromFile replaceInFile \
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
	}
	return $path
    }
}

# ::fileutil::jail --
#
#	Ensures that the input path 'filename' stays within the
#	directory 'jail'. In this way it prevents user-supplied paths
#	from escaping the jail.
#
# Arguments:
#	jail		The path to the directory the other must
#			not escape from.
#	filename	The path to prevent from escaping.
#







|
|







622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
	}
	return $path
    }
}

# ::fileutil::jail --
#
#	Ensures that the input path 'filename' stays within the the
#	directory 'jail'. In this way it preventsuser-supplied paths
#	from escaping the jail.
#
# Arguments:
#	jail		The path to the directory the other must
#			not escape from.
#	filename	The path to prevent from escaping.
#
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
            set sig [string range $test $next [expr {$next + 1}]]
            if { $sig == "NE" || $sig == "PE" } {
                lappend type executable [string tolower $sig]
            } else {
                lappend type executable dos
            }
        }
    } elseif { $binary && [string match "SQLite format 3\x00*" $test] } {
	lappend type sqlite3

	# Check for various sqlite-based application file formats.
	set appid [string range $test 68 71]
	if {$appid eq "\x0f\x05\x51\x12"} {
	    lappend type fossil-checkout
	} elseif {$appid eq "\x0f\x05\x51\x13"} {
	    lappend type fossil-global-config
	} elseif {$appid eq "\x0f\x05\x51\x11"} {
	    lappend type fossil-repository
	} else {
	    # encode the appid as hex and append that.
	    binary scan $appid H8 aid
	    lappend type A$aid
	}
	
    } elseif { $binary && [string match "BZh91AY\&SY*" $test] } {
        lappend type compressed bzip
    } elseif { $binary && [string match "\x1f\x8b*" $test] } {
        lappend type compressed gzip
    } elseif { $binary && [string range $test 257 262] == "ustar\x00" } {
        lappend type compressed tar
    } elseif { $binary && [string match "\x50\x4b\x03\x04*" $test] } {







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1624
1625
1626
1627
1628
1629
1630

















1631
1632
1633
1634
1635
1636
1637
            set sig [string range $test $next [expr {$next + 1}]]
            if { $sig == "NE" || $sig == "PE" } {
                lappend type executable [string tolower $sig]
            } else {
                lappend type executable dos
            }
        }

















    } elseif { $binary && [string match "BZh91AY\&SY*" $test] } {
        lappend type compressed bzip
    } elseif { $binary && [string match "\x1f\x8b*" $test] } {
        lappend type compressed gzip
    } elseif { $binary && [string range $test 257 262] == "ustar\x00" } {
        lappend type compressed tar
    } elseif { $binary && [string match "\x50\x4b\x03\x04*" $test] } {

Changes to modules/fileutil/fileutil.test.

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5 ;# See fumagic.testsupport
testsNeedTcltest 1.0

support {
    useTcllibFile fumagic/fumagic.testsupport ;# 8.5+ (dict, apply)
    use           cmdline/cmdline.tcl cmdline
}
testing {
    useLocal fileutil.tcl fileutil
}

# -------------------------------------------------------------------------







|



|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    useTcllibFile fumagic/fumagic.testsupport
    use           cmdline/cmdline.tcl cmdline
}
testing {
    useLocal fileutil.tcl fileutil
}

# -------------------------------------------------------------------------

Changes to modules/fileutil/multi.man.

48
49
50
51
52
53
54
55
56

The result of the command is the result generated by the last file
command it executed.

[list_end]

[vset CATEGORY fileutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

48
49
50
51
52
53
54
55
56

The result of the command is the result generated by the last file
command it executed.

[list_end]

[vset CATEGORY fileutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/fileutil/multiop.man.

394
395
396
397
398
399
400
401
402
    into /scratch           \\
    but not *.html not index \\
    the  index               \\
    as   pkgIndex.tcl
}]

[vset CATEGORY fileutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

394
395
396
397
398
399
400
401
402
    into /scratch           \\
    but not *.html not index \\
    the  index               \\
    as   pkgIndex.tcl
}]

[vset CATEGORY fileutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Deleted modules/fileutil/paths.man.

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
[comment {-*- text -*- doctools manpage}]
[vset VERSION 1]
[manpage_begin fileutil::paths n [vset VERSION]]
[titledesc {Manage search path pools}]
[require Tcl 8.4]
[require fileutil::paths [opt [vset VERSION]]]
[description]

Provides a snit class whose instances manage a pool of (search) paths.

[section API]

The main command provides construction of search path pools:

[list_begin definitions]

[call [cmd ::fileutil::paths] [arg poolName]]

Creates a new, empty pool of search paths with an associated global
Tcl command whose name is [arg poolName].

It may be used to invoke various operations on the pool.

It has the following general form:

[list_begin definitions]
[call [cmd poolName] [method method] [opt [arg "arg arg ..."]]]
[method method] and [arg arg]uments determine the exact behavior of
the command.
[list_end][comment --instance-command--]

If [arg poolName] is specified as [const %AUTO%] a unique name will be
generated by the package itself.

The result of the command is the fully-qualified name of the instance
command. 

[list_end][comment --class-command--]

[para]

The following commands are possible for pool objects:

[list_begin definitions]

[call [arg poolName] [method add] [arg path]]

Adds the [arg path] to the pool.

Nothing is done if the [arg path] is already known to the pool.

The result of the command is the empty string.

[call [arg poolName] [method clear]]

Clears the entire pool. In other words, removes all paths from it.

The result of the command is the empty string.

[call [arg poolName] [method paths]]

Returns the list of all paths known to the pool, in the order they
were added.

[call [arg poolName] [method remove] [arg path]]

Removes the [arg path] from the pool, if it is known to the pool.

Unknown paths are ignored without error.

The result of the command is the empty string.

[list_end]

[include ../common-text/feedback.inc]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































Deleted modules/fileutil/paths.tcl.

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
# paths.tcl --
#
#	Manage lists of search paths.
#
# Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

# Each object instance manages a list of paths.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::fileutil::paths {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction

    # Default constructor.
    # Default destructor.

    # ### ### ### ######### ######### #########
    ## Methods :: Querying and manipulating the list of paths.

    method paths {} {
	return $mypaths
    }

    method add {path} {
	set pos [lsearch $mypaths $path]
	if {$pos >= 0 } return
	lappend mypaths $path
	return
    }

    method remove {path} {
	set pos [lsearch $mypaths $path]
	if {$pos < 0} return
	set mypaths [lreplace $mypaths $pos $pos]
	return
    }

    method clear {} {
	set mypaths {}
	return
    }

    # ### ### ### ######### ######### #########
    ## Internal methods :: None

    # ### ### ### ######### ######### #########
    ## State :: List of paths.

    variable mypaths {}

    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide fileutil::paths 1
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































Deleted modules/fileutil/paths.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# -*- tcl -*-
# paths.test:  Testsuite for package fileutil::paths
#
# Copyright (c) 2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

support {
    use snit/snit.tcl snit
}    
testing {
    useLocal paths.tcl fileutil::paths
}

# ---------------------------------------------------------------------
# [] constructor
# [] destructor
# [] paths
# [] add
# [] remove
# [] clear

#----------------------------------------------------------------------
## Constructor, destructor

test fileutil-paths-1.0 {constructor, wrong args, too many} -body {
    fileutil::paths P X
} -returnCodes error -result {Error in constructor: wrong # args: should be "::fileutil::paths::Snit_constructor type selfns win self"}

test fileutil-paths-1.1 {instance, bogus method} -setup {
    fileutil::paths P
} -cleanup {
    P destroy
} -body {
    P bogus
} -returnCodes error -result {"::P bogus" is not defined}

#----------------------------------------------------------------------
## paths

test fileutil-paths-2.0 {paths, wrong args, too many} -setup {
    fileutil::paths P
} -cleanup {
    P destroy
} -body {
    P paths X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodpaths type selfns win self"}

test fileutil-paths-2.1 {paths, base state, none} -setup {
    fileutil::paths P
} -cleanup {
    P destroy
} -body {
    P paths
} -result {}

#----------------------------------------------------------------------
## add

test fileutil-paths-3.0 {add, wrong args, not enough} -setup {
    fileutil::paths P
} -cleanup {
    P destroy
} -body {
    P add
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test fileutil-paths-3.1 {add, wrong args, too many} -setup {
    fileutil::paths P
} -cleanup {
    P destroy
} -body {
    P add F X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test fileutil-paths-3.2 {add, state change, result} -setup {
    fileutil::paths P
} -cleanup {
    P destroy
} -body {
    list [P add F] [P paths]
} -result {{} F}

#----------------------------------------------------------------------
## remove

test fileutil-paths-4.0 {remove, wrong args, not enough} -setup {
    fileutil::paths P
} -cleanup {
    P destroy
} -body {
    P remove
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

test fileutil-paths-4.1 {remove, wrong args, too many} -setup {
    fileutil::paths P
} -cleanup {
    P destroy
} -body {
    P remove F X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

test fileutil-paths-4.2 {remove, known path, state change, result} -setup {
    fileutil::paths P
    P add F
} -cleanup {
    P destroy
} -body {
    list [P remove F] [P paths]
} -result {{} {}}

test fileutil-paths-4.3 {remove, missing path, no state change, result} -setup {
    fileutil::paths P
    P add Z
} -cleanup {
    P destroy
} -body {
    list [P remove F] [P paths]
} -result {{} Z}

#----------------------------------------------------------------------
## clear

test fileutil-paths-5.0 {clear, wrong args, too many} -setup {
    fileutil::paths P
} -cleanup {
    P destroy
} -body {
    P clear X
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodclear type selfns win self"}

test fileutil-paths-5.1 {clear, return to base state} -setup {
    fileutil::paths P
    P add F
} -cleanup {
    P destroy
} -body {
    list [P clear] [P paths]
} -result {{} {}}

#----------------------------------------------------------------------
testsuiteCleanup
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































Changes to modules/fileutil/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded fileutil 1.16 [list source [file join $dir fileutil.tcl]]

if {![package vsatisfies [package provide Tcl] 8.3]} {return}
package ifneeded fileutil::traverse 0.6 [list source [file join $dir traverse.tcl]]

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded fileutil::multi     0.1   [list source [file join $dir multi.tcl]]
package ifneeded fileutil::multi::op 0.5.3 [list source [file join $dir multiop.tcl]]
package ifneeded fileutil::decode    0.2.1 [list source [file join $dir decode.tcl]]
package ifneeded fileutil::paths     1     [list source [file join $dir paths.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} return

if {![package vsatisfies [package provide Tcl] 8.6]} return

|








<
<
<
<
<
1
2
3
4
5
6
7
8
9
10





if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded fileutil 1.15 [list source [file join $dir fileutil.tcl]]

if {![package vsatisfies [package provide Tcl] 8.3]} {return}
package ifneeded fileutil::traverse 0.6 [list source [file join $dir traverse.tcl]]

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded fileutil::multi     0.1   [list source [file join $dir multi.tcl]]
package ifneeded fileutil::multi::op 0.5.3 [list source [file join $dir multiop.tcl]]
package ifneeded fileutil::decode    0.2.1 [list source [file join $dir decode.tcl]]





Deleted modules/fileutil/test-assets/p.ckout.

cannot compute difference between binary files

Deleted modules/fileutil/test-assets/p.fossil.

cannot compute difference between binary files

Deleted modules/fileutil/test-assets/p.global.

cannot compute difference between binary files

Deleted modules/fileutil/test-assets/p.sqlite.

cannot compute difference between binary files

Deleted modules/fileutil/test-assets/pdf4tcl_01.pdf.

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
%PDF-1.4
%åäö
5 0 obj
<<
/Length 6 0 R
>>
stream
/Courier 12 Tf
0 Tr
12 TL
BT
(Hello) Tj

ET

endstream
endobj

6 0 obj
45
endobj

4 0 obj
<</Type /Page
/Parent 2 0 R
/Resources 3 0 R
/MediaBox [0 0 595 842]
/Contents [5 0 R]
>>
endobj

7 0 obj
<<
/Type /Font
/Subtype /Type1
/Encoding /WinAnsiEncoding
/Name /Courier
/BaseFont /Courier
>>
endobj
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R
>>
endobj

2 0 obj
<<
/Type /Pages
/Count 1
/Kids [4 0 R ]
>>
endobj

3 0 obj
<<
/ProcSet[/PDF /Text /ImageC]
/Font <<
/Courier 7 0 R
>>
>>
endobj

xref
0 8
0000000000 65535 f 
0000000347 00000 n 
0000000397 00000 n 
0000000456 00000 n 
0000000131 00000 n 
0000000014 00000 n 
0000000112 00000 n 
0000000237 00000 n 
trailer
<<
/Size 8
/Root 1 0 R
>>

startxref
534
%%EOF
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































Added modules/fileutil/test-data/pdf4tcl_01.pdf.







































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
%PDF-1.4
%åäö
5 0 obj
<<
/Length 6 0 R
>>
stream
/Courier 12 Tf
0 Tr
12 TL
BT
(Hello) Tj

ET

endstream
endobj

6 0 obj
45
endobj

4 0 obj
<</Type /Page
/Parent 2 0 R
/Resources 3 0 R
/MediaBox [0 0 595 842]
/Contents [5 0 R]
>>
endobj

7 0 obj
<<
/Type /Font
/Subtype /Type1
/Encoding /WinAnsiEncoding
/Name /Courier
/BaseFont /Courier
>>
endobj
1 0 obj
<<
/Type /Catalog
/Pages 2 0 R
>>
endobj

2 0 obj
<<
/Type /Pages
/Count 1
/Kids [4 0 R ]
>>
endobj

3 0 obj
<<
/ProcSet[/PDF /Text /ImageC]
/Font <<
/Courier 7 0 R
>>
>>
endobj

xref
0 8
0000000000 65535 f 
0000000347 00000 n 
0000000397 00000 n 
0000000456 00000 n 
0000000131 00000 n 
0000000014 00000 n 
0000000112 00000 n 
0000000237 00000 n 
trailer
<<
/Size 8
/Root 1 0 R
>>

startxref
534
%%EOF

Changes to modules/fileutil/traverse.man.

157
158
159
160
161
162
163
164
165
traverser from following symbolic links, like so:

[include include/cross-index-trav.inc]

[list_end]

[vset CATEGORY fileutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

157
158
159
160
161
162
163
164
165
traverser from following symbolic links, like so:

[include include/cross-index-trav.inc]

[list_end]

[vset CATEGORY fileutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/ftp/ftp.man.

432
433
434
435
436
437
438
439
440
[para]

An update command placed in the procedure [cmd ::ftp::DisplayMsg] may
run into persistent errors or infinite loops. The solution to this
problem is to use [cmd {update idletasks}] instead of [cmd update].

[vset CATEGORY ftp]
[include ../common-text/feedback.inc]
[manpage_end]







|

432
433
434
435
436
437
438
439
440
[para]

An update command placed in the procedure [cmd ::ftp::DisplayMsg] may
run into persistent errors or infinite loops. The solution to this
problem is to use [cmd {update idletasks}] instead of [cmd update].

[vset CATEGORY ftp]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/ftp/ftp_geturl.man.

49
50
51
52
53
54
55
56
57

The attributes of the link, including the path it refers to.

[list_end]
[list_end]

[vset CATEGORY ftp]
[include ../common-text/feedback.inc]
[manpage_end]







|

49
50
51
52
53
54
55
56
57

The attributes of the link, including the path it refers to.

[list_end]
[list_end]

[vset CATEGORY ftp]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/ftpd/ftpd.man.

271
272
273
274
275
276
277
278
279
Accessible to all callbacks and all filesystem commands (which are a
special form of callback) and contains the handle of the socket
channel which was active when the callback was invoked.

[list_end]

[vset CATEGORY ftpd]
[include ../common-text/feedback.inc]
[manpage_end]







|

271
272
273
274
275
276
277
278
279
Accessible to all callbacks and all filesystem commands (which are a
special form of callback) and contains the handle of the socket
channel which was active when the callback was invoked.

[list_end]

[vset CATEGORY ftpd]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/fumagic/cfront.man.

63
64
65
66
67
68
69
70
71
The name of each new procedure is derived from the name of the
file/directory used in its creation, with file/directory [file FOO]
causing the creation of procedure [const ::fileutil::magic::/FOO::run].

[list_end]

[vset CATEGORY {fileutil :: magic}]
[include ../common-text/feedback.inc]
[manpage_end]







|

63
64
65
66
67
68
69
70
71
The name of each new procedure is derived from the name of the
file/directory used in its creation, with file/directory [file FOO]
causing the creation of procedure [const ::fileutil::magic::/FOO::run].

[list_end]

[vset CATEGORY {fileutil :: magic}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/fumagic/cgen.man.

55
56
57
58
59
60
61
62
63
The generated script makes extensive use of the commands provided by
the recognizer runtime package [package fileutil::magic::rt] to
perform its duties.

[list_end]

[vset CATEGORY {fileutil :: magic}]
[include ../common-text/feedback.inc]
[manpage_end]







|

55
56
57
58
59
60
61
62
63
The generated script makes extensive use of the commands provided by
the recognizer runtime package [package fileutil::magic::rt] to
perform its duties.

[list_end]

[vset CATEGORY {fileutil :: magic}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/fumagic/filetypes.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[vset VERSION 2.0]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin fileutil::magic::filetype n [vset VERSION]]
[see_also file(1)]
[see_also fileutil]
[see_also magic(5)]
[keywords {file recognition}]
[keywords {file type}]
[keywords {file utilities}]
[keywords type]
[moddesc   {file utilities}]
[titledesc {Procedures implementing file-type recognition}]
[category  {Programming tools}]
[require Tcl 8.6]
[require fileutil::magic::filetype [opt [vset VERSION]]]
[description]
[para]

This package provides a command for the recognition of file types in
pure Tcl.

[para]
<

|











|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin fileutil::magic::filetype n 1.2.0]
[see_also file(1)]
[see_also fileutil]
[see_also magic(5)]
[keywords {file recognition}]
[keywords {file type}]
[keywords {file utilities}]
[keywords type]
[moddesc   {file utilities}]
[titledesc {Procedures implementing file-type recognition}]
[category  {Programming tools}]
[require Tcl 8.6]
[require fileutil::magic::filetype [opt 1.2.0]]
[description]
[para]

This package provides a command for the recognition of file types in
pure Tcl.

[para]
54
55
56
57
58
59
60
61
62
This site contains the current sources for the file command, including
the magic definitions used by it. The latter were used by us to
generate this recognizer.

[list_end]

[vset CATEGORY {fileutil :: magic}]
[include ../common-text/feedback.inc]
[manpage_end]







|

53
54
55
56
57
58
59
60
61
This site contains the current sources for the file command, including
the magic definitions used by it. The latter were used by us to
generate this recognizer.

[list_end]

[vset CATEGORY {fileutil :: magic}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/fumagic/filetypes.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# filetypes.tcl --
#
#	Tcl based file type recognizer using the runtime core and
#	generated from /usr/share/misc/magic.mime. Limited output,
#	but only mime-types, i.e. standardized.
#
# Copyright (c) 2016-2017 Poor Yorick     <tk.tcl.core.tcllib@pooryorick.com>
# Copyright (c) 2004-2005 Colin McCormack <coldstore@users.sourceforge.net>
# Copyright (c) 2005-2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: filetypes.tcl,v 1.6 2006/09/27 21:19:35 andreas_kupries Exp $






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# filetypes.tcl --
#
#	Tcl based file type recognizer using the runtime core and
#	generated from /usr/share/misc/magic.mime. Limited output,
#	but only mime-types, i.e. standardized.
#
# Copyright (c) 2016      Poor Yorick     <tk.tcl.core.tcllib@pooryorick.com>
# Copyright (c) 2004-2005 Colin McCormack <coldstore@users.sourceforge.net>
# Copyright (c) 2005-2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: filetypes.tcl,v 1.6 2006/09/27 21:19:35 andreas_kupries Exp $
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
#####

# ### ### ### ######### ######### #########
## Requirements.

package require Tcl 8.6
package require fileutil::magic::rt 2   ; # We need the runtime core v2.

# ### ### ### ######### ######### #########
## Implementation

namespace eval ::fileutil::magic::filetype {
    namespace import ::fileutil::magic::rt::*
}







|







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
#####

# ### ### ### ######### ######### #########
## Requirements.

package require Tcl 8.6
package require fileutil::magic::rt    ; # We need the runtime core.

# ### ### ### ######### ######### #########
## Implementation

namespace eval ::fileutil::magic::filetype {
    namespace import ::fileutil::magic::rt::*
}
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
	if {$found}  {
	    yield [list $weight $result [split $mime /] [split $ext /]]
	}
    }
    return
}

package provide fileutil::magic::filetype 2.0
# The actual recognizer is the command below.

##
## -- Do not edit after this line !
## -- ** BEGIN GENERATED CODE ** --

namespace eval ::fileutil::magic::filetype {







|







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
	if {$found}  {
	    yield [list $weight $result [split $mime /] [split $ext /]]
	}
    }
    return
}

package provide fileutil::magic::filetype 1.2.0
# The actual recognizer is the command below.

##
## -- Do not edit after this line !
## -- ** BEGIN GENERATED CODE ** --

namespace eval ::fileutil::magic::filetype {

Changes to modules/fumagic/filetypes.test.

1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16
# -*- tcl -*-
#
# Testing "fumagic" (FileUtil Magic). Filetype recognizer.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2005-2006 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

package require tcltest
source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- tcl -*-
#
# Testing "fumagic" (FileUtil Magic). Filetype recognizer.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2005-2006 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: filetypes.test,v 1.9 2006/10/09 21:41:40 andreas_kupries Exp $

# -------------------------------------------------------------------------

package require tcltest
source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

Changes to modules/fumagic/fumagic.testsupport.

1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
# Testsuite support specific to 'fileutil::magic'.
# ### ### ### ######### ######### #########

package require Tcl 8.5 ;# dict, apply.

# This file can assume that the general testsupport (see
# devtools/testutilities.tcl) is already loaded and active.

# ### ### ### ######### ######### #########
## Transient variables to hold more complex texts

set xmlData {<?xml version="1.0" encoding="ISO-8859-1"?>




<
<







1
2
3
4


5
6
7
8
9
10
11
# -*- tcl -*-
# Testsuite support specific to 'fileutil::magic'.
# ### ### ### ######### ######### #########



# This file can assume that the general testsupport (see
# devtools/testutilities.tcl) is already loaded and active.

# ### ### ### ######### ######### #########
## Transient variables to hold more complex texts

set xmlData {<?xml version="1.0" encoding="ISO-8859-1"?>

Changes to modules/fumagic/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
if {![package vsatisfies [package provide Tcl] 8.6]} {return}

# Recognizers
package ifneeded fileutil::magic::filetype 2.0 [list source [file join $dir filetypes.tcl]]

# Runtime
package ifneeded fileutil::magic::rt 2.0 [list source [file join $dir rtcore.tcl]]

# Compiler packages
package ifneeded fileutil::magic::cgen   1.2.0 [list source [file join $dir cgen.tcl]]
package ifneeded fileutil::magic::cfront 1.2.0 [list source [file join $dir cfront.tcl]]






|


|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
if {![package vsatisfies [package provide Tcl] 8.6]} {return}

# Recognizers
package ifneeded fileutil::magic::filetype 1.2.0 [list source [file join $dir filetypes.tcl]]

# Runtime
package ifneeded fileutil::magic::rt 1.2.0 [list source [file join $dir rtcore.tcl]]

# Compiler packages
package ifneeded fileutil::magic::cgen   1.2.0 [list source [file join $dir cgen.tcl]]
package ifneeded fileutil::magic::cfront 1.2.0 [list source [file join $dir cfront.tcl]]



Changes to modules/fumagic/rtcore.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[vset VERSION 2.0]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin fileutil::magic::rt n [vset VERSION]]
[see_also file(1)]
[see_also fileutil]
[see_also magic(5)]
[keywords {file recognition}]
[keywords {file type}]
[keywords {file utilities}]
[keywords mime]
[keywords type]
[moddesc   {file utilities}]
[titledesc {Runtime core for file type recognition engines written in pure Tcl}]
[category  {Programming tools}]
[require Tcl 8.5]
[require fileutil::magic::rt [opt [vset VERSION]]]
[description]
[para]

This package provides the runtime core for file type recognition
engines written in pure Tcl and is thus used by all other packages in
this module, i.e. the two frontend packages
[package fileutil::magic::mimetypes] and
<

|












|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin fileutil::magic::rt n 1.2.0]
[see_also file(1)]
[see_also fileutil]
[see_also magic(5)]
[keywords {file recognition}]
[keywords {file type}]
[keywords {file utilities}]
[keywords mime]
[keywords type]
[moddesc   {file utilities}]
[titledesc {Runtime core for file type recognition engines written in pure Tcl}]
[category  {Programming tools}]
[require Tcl 8.5]
[require fileutil::magic::rt [opt 1.2.0]]
[description]
[para]

This package provides the runtime core for file type recognition
engines written in pure Tcl and is thus used by all other packages in
this module, i.e. the two frontend packages
[package fileutil::magic::mimetypes] and
243
244
245
246
247
248
249
250
251
[def [const ledate]]  see above, stored in small/little endian
[def [const ldate]]   32-bit integer timestamp, stored in native endianess
[def [const beldate]] see above, stored in big endian
[def [const leldate]] see above, stored in small/little endian
[list_end]

[vset CATEGORY {fileutil :: magic}]
[include ../common-text/feedback.inc]
[manpage_end]







|

242
243
244
245
246
247
248
249
250
[def [const ledate]]  see above, stored in small/little endian
[def [const ldate]]   32-bit integer timestamp, stored in native endianess
[def [const beldate]] see above, stored in big endian
[def [const leldate]] see above, stored in small/little endian
[list_end]

[vset CATEGORY {fileutil :: magic}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/fumagic/rtcore.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
# rtcore.tcl --
#
#	Runtime core for file type recognition engines written in pure Tcl.
#
# Copyright (c) 2016-2017 Poor Yorick     <tk.tcl.core.tcllib@pooryorick.com>
# Copyright (c) 2004-2005 Colin McCormack <coldstore@users.sourceforge.net>
# Copyright (c) 2005      Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: rtcore.tcl,v 1.5 2005/09/28 04:51:19 andreas_kupries Exp $




|







1
2
3
4
5
6
7
8
9
10
11
12
# rtcore.tcl --
#
#	Runtime core for file type recognition engines written in pure Tcl.
#
# Copyright (c) 2016      Poor Yorick     <tk.tcl.core.tcllib@pooryorick.com>
# Copyright (c) 2004-2005 Colin McCormack <coldstore@users.sourceforge.net>
# Copyright (c) 2005      Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: rtcore.tcl,v 1.5 2005/09/28 04:51:19 andreas_kupries Exp $
840
841
842
843
844
845
846
847
848
    }
}

::fileutil::magic::rt::Init
# ### ### ### ######### ######### #########
## Ready for use.

package provide fileutil::magic::rt 2.0
# EOF







|

840
841
842
843
844
845
846
847
848
    }
}

::fileutil::magic::rt::Init
# ### ### ### ######### ######### #########
## Ready for use.

package provide fileutil::magic::rt 1.2.0
# EOF

Changes to modules/gpx/gpx.man.

150
151
152
153
154
155
156
157
158

[list_end]

[section AUTHOR]
Keith Vetter

[vset CATEGORY gpx]
[include ../common-text/feedback.inc]
[manpage_end]







|

150
151
152
153
154
155
156
157
158

[list_end]

[section AUTHOR]
Keith Vetter

[vset CATEGORY gpx]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_fa/dacceptor.man.

94
95
96
97
98
99
100
101
102
[list_end]

[para]

[section EXAMPLES]

[vset CATEGORY grammar_fa]
[include ../common-text/feedback.inc]
[manpage_end]







|

94
95
96
97
98
99
100
101
102
[list_end]

[para]

[section EXAMPLES]

[vset CATEGORY grammar_fa]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_fa/dexec.man.

175
176
177
178
179
180
181
182
183
[list_end]

[para]

[section EXAMPLES]

[vset CATEGORY grammar_fa]
[include ../common-text/feedback.inc]
[manpage_end]







|

175
176
177
178
179
180
181
182
183
[list_end]

[para]

[section EXAMPLES]

[vset CATEGORY grammar_fa]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_fa/fa.man.

644
645
646
647
648
649
650
651
652

[para]

Transducers are not handled by this package. They will get their own
package in the future.

[vset CATEGORY grammar_fa]
[include ../common-text/feedback.inc]
[manpage_end]







|

644
645
646
647
648
649
650
651
652

[para]

Transducers are not handled by this package. They will get their own
package in the future.

[vset CATEGORY grammar_fa]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_fa/faop.man.

472
473
474
475
476
477
478
479
480
[list_end]

[para]

[section EXAMPLES]

[vset CATEGORY grammar_fa]
[include ../common-text/feedback.inc]
[manpage_end]







|

472
473
474
475
476
477
478
479
480
[list_end]

[para]

[section EXAMPLES]

[vset CATEGORY grammar_fa]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_me/gasm.man.

431
432
433
434
435
436
437
438
439
[para]

The command returns the empty string as its result.

[list_end]

[vset CATEGORY grammar_me]
[include ../common-text/feedback.inc]
[manpage_end]







|

431
432
433
434
435
436
437
438
439
[para]

The command returns the empty string as its result.

[list_end]

[vset CATEGORY grammar_me]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_me/me_ast.man.

126
127
128
129
130
131
132
133
134
This new attribute is defined for all nodes, and contains the
locations from attribute [term range] translated into line number and
column index. Lines are counted from 1, columns are counted from 0.

[list_end]

[vset CATEGORY grammar_me]
[include ../common-text/feedback.inc]
[manpage_end]







|

126
127
128
129
130
131
132
133
134
This new attribute is defined for all nodes, and contains the
locations from attribute [term range] translated into line number and
column index. Lines are counted from 1, columns are counted from 0.

[list_end]

[vset CATEGORY grammar_me]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_me/me_cpu.man.

281
282
283
284
285
286
287
288
289
[call [arg meName] [method destroy]]

This method deletes the object and releases all resurces it claimed.

[list_end]

[vset CATEGORY grammar_me]
[include ../common-text/feedback.inc]
[manpage_end]







|

281
282
283
284
285
286
287
288
289
[call [arg meName] [method destroy]]

This method deletes the object and releases all resurces it claimed.

[list_end]

[vset CATEGORY grammar_me]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_me/me_cpu.test.

111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

# -------------------------------------------------------------------------
# In this section we run all the tests depending on a grammar::me::cpu::core,
# and thus have to test all the available implementations.

set tests [file join [file dirname [info script]] me_cpu.testsuite]

#catch {memory validate on}

set impl tcl
set usec [time {source $tests} 1]

if 0 {
    foreach impl [grammar::me::cpu::core::Implementations] {
	grammar::me::cpu::core::SwitchTo $impl







|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

# -------------------------------------------------------------------------
# In this section we run all the tests depending on a grammar::me::cpu::core,
# and thus have to test all the available implementations.

set tests [file join [file dirname [info script]] me_cpu.testsuite]

catch {memory validate on}

set impl tcl
set usec [time {source $tests} 1]

if 0 {
    foreach impl [grammar::me::cpu::core::Implementations] {
	grammar::me::cpu::core::SwitchTo $impl

Changes to modules/grammar_me/me_cpucore.man.

366
367
368
369
370
371
372
373
374
[para]

[term nc], the nonterminal cache is keyed by nonterminal name and
location, each value a four-element list containing current location,
match status, semantic value, and error status, in this order.

[vset CATEGORY grammar_me]
[include ../common-text/feedback.inc]
[manpage_end]







|

366
367
368
369
370
371
372
373
374
[para]

[term nc], the nonterminal cache is keyed by nonterminal name and
location, each value a four-element list containing current location,
match status, semantic value, and error status, in this order.

[vset CATEGORY grammar_me]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_me/me_cpucore.test.

112
113
114
115
116
117
118
119
120
121
122
123
124
125
126

# -------------------------------------------------------------------------
# In this section we run all the tests depending on a grammar::me::cpu::core,
# and thus have to test all the available implementations.

set tests [file join [file dirname [info script]] me_cpucore.testsuite]

#catch {memory validate on}

set impl tcl
set usec [time {source $tests} 1]

if 0 {
    foreach impl [grammar::me::cpu::core::Implementations] {
	grammar::me::cpu::core::SwitchTo $impl







|







112
113
114
115
116
117
118
119
120
121
122
123
124
125
126

# -------------------------------------------------------------------------
# In this section we run all the tests depending on a grammar::me::cpu::core,
# and thus have to test all the available implementations.

set tests [file join [file dirname [info script]] me_cpucore.testsuite]

catch {memory validate on}

set impl tcl
set usec [time {source $tests} 1]

if 0 {
    foreach impl [grammar::me::cpu::core::Implementations] {
	grammar::me::cpu::core::SwitchTo $impl

Changes to modules/grammar_me/me_intro.man.

86
87
88
89
90
91
92
93
94
Core functionality for state manipulation and stepping used in the
bytecode based implementation of ME virtual machines.

[list_end]
[para]

[vset CATEGORY grammar_me]
[include ../common-text/feedback.inc]
[manpage_end]







|

86
87
88
89
90
91
92
93
94
Core functionality for state manipulation and stepping used in the
bytecode based implementation of ME virtual machines.

[list_end]
[para]

[vset CATEGORY grammar_me]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_me/me_tcl.man.

335
336
337
338
339
340
341
342
343
The command takes the marker as argument as it comes from the
Tcl stack, not the machine state. It replaces [term ias_mpop].

[list_end]
[para]

[vset CATEGORY grammar_me]
[include ../common-text/feedback.inc]
[manpage_end]







|

335
336
337
338
339
340
341
342
343
The command takes the marker as argument as it comes from the
Tcl stack, not the machine state. It replaces [term ias_mpop].

[list_end]
[para]

[vset CATEGORY grammar_me]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_me/me_util.man.

75
76
77
78
79
80
81
82
83
If a [arg root] node is specified the AST is generated from that node
downward. Otherwise the root of the tree object is used as the
starting point.

[list_end]

[vset CATEGORY grammar_me]
[include ../common-text/feedback.inc]
[manpage_end]







|

75
76
77
78
79
80
81
82
83
If a [arg root] node is specified the AST is generated from that node
downward. Otherwise the root of the tree object is used as the
starting point.

[list_end]

[vset CATEGORY grammar_me]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_me/me_util.test.

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

# -------------------------------------------------------------------------
# In this section we run all the tests depending on a struct::tree,
# and thus have to test all the available implementations.

set tests [file join [file dirname [info script]] me_util.testsuite]

#catch {memory validate on}

TestAccelDo struct::tree impl {
    # The global variable 'impl' is part of the public API the
    # testsuit (in htmlparse_tree.testsuite) can expect from the
    # environment.

    namespace import -force struct::tree







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

# -------------------------------------------------------------------------
# In this section we run all the tests depending on a struct::tree,
# and thus have to test all the available implementations.

set tests [file join [file dirname [info script]] me_util.testsuite]

catch {memory validate on}

TestAccelDo struct::tree impl {
    # The global variable 'impl' is part of the public API the
    # testsuit (in htmlparse_tree.testsuite) can expect from the
    # environment.

    namespace import -force struct::tree

Changes to modules/grammar_me/me_vm.man.

655
656
657
658
659
660
661
662
663

This instruction pops an entry from the AST Marker stack [term MS] and
discards it.

[list_end]

[vset CATEGORY grammar_me]
[include ../common-text/feedback.inc]
[manpage_end]







|

655
656
657
658
659
660
661
662
663

This instruction pops an entry from the AST Marker stack [term MS] and
discards it.

[list_end]

[vset CATEGORY grammar_me]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_peg/peg.man.

713
714
715
716
717
718
719
720
721
[enum]
[uri {http://scifac.ru.ac.za/compilers/} \
	{Compilers and Compiler Generators}], an online book using
CoCo/R, a generator for recursive descent parsers.
[list_end]

[vset CATEGORY grammar_peg]
[include ../common-text/feedback.inc]
[manpage_end]







|

713
714
715
716
717
718
719
720
721
[enum]
[uri {http://scifac.ru.ac.za/compilers/} \
	{Compilers and Compiler Generators}], an online book using
CoCo/R, a generator for recursive descent parsers.
[list_end]

[vset CATEGORY grammar_peg]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/grammar_peg/peg_interp.man.

114
115
116
117
118
119
120
121
122
described in section [sectref-external {AST VALUES}] of
document [term grammar::me_ast].

[list_end]
[para]

[vset CATEGORY grammar_peg]
[include ../common-text/feedback.inc]
[manpage_end]







|

114
115
116
117
118
119
120
121
122
described in section [sectref-external {AST VALUES}] of
document [term grammar::me_ast].

[list_end]
[para]

[vset CATEGORY grammar_peg]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/hook/hook.man.

367
368
369
370
371
372
373
374
375
All bindings involving [widget .view] are deleted.

[section Credits]

Hook has been designed and implemented by William H. Duquette.

[vset CATEGORY hook]
[include ../common-text/feedback.inc]
[manpage_end]







|

367
368
369
370
371
372
373
374
375
All bindings involving [widget .view] are deleted.

[section Credits]

Hook has been designed and implemented by William H. Duquette.

[vset CATEGORY hook]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/hook/hook.test.

1
2
3
4
5
6
7
8
9
10
11
12
13
# hook.test -*- tcl -*-
#
#       This file contains the test suite for hook.tcl.
#
# Copyright (C) 2010 by Will Duquette
# Copyright (c) 2019 by Andreas Kupries
#
# See the file "license.terms" for information on usage and 
# redistribution of this file, and for a DISCLAIMER OF ALL 
# WARRANTIES.

#-----------------------------------------------------------------------



|


<







1
2
3
4
5

6
7
8
9
10
11
12
# hook.test -*- tcl -*-
#
#       This file contains the test suite for hook-0.1.tcl.
#
# Copyright (C) 2010 by Will Duquette

#
# See the file "license.terms" for information on usage and 
# redistribution of this file, and for a DISCLAIMER OF ALL 
# WARRANTIES.

#-----------------------------------------------------------------------

92
93
94
95
96
97
98






99
100
101
102
103
104
105
}

proc GetError {} {
    variable info

    return $info(errorList)
}







#-----------------------------------------------------------------------
# cget

test cget-1.1 {unknown option name} -body {
    hook cget -nonesuch
} -returnCodes {







>
>
>
>
>
>







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
}

proc GetError {} {
    variable info

    return $info(errorList)
}

if {[package vsatisfies [package provide Tcl] 8.6]} {
    proc EResult {a b} { return $b }
} else {
    proc EResult {a b} { return $a }
}

#-----------------------------------------------------------------------
# cget

test cget-1.1 {unknown option name} -body {
    hook cget -nonesuch
} -returnCodes {
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468

469
470
471
472
473
474
475
    hook configure -errorcommand ErrorCommand

    hook bind S1 <H1> O1 {error "simulated error"}
    hook call S1 <H1>
    GetError
} -cleanup {
    cleanup
} -result [tcltest::byConstraint {
    tcl8.6.10plus {{{S1 <H1> {} O1} {simulated error} {-code 1 -level 0 -errorstack {INNER {error {simulated error}} UP 1 CALL {::hook::call S1 <H1>}} -errorcode NONE}}}
    tcl8.6not10   {{{S1 <H1> {} O1} {simulated error} {-code 1 -level 0 -errorstack {INNER {error {simulated error}} UP 1 CALL {call S1 <H1>}} -errorcode NONE}}}
    tcl8.5minus   {{{S1 <H1> {} O1} {simulated error} {-code 1 -level 0 -errorcode NONE}}}
}]

test errorcommand-1.3 {handled errors don't break sequence of calls} -body {
    hook configure -errorcommand ErrorCommand

    TestBind  S1 <H1> O1
    hook bind S1 <H1> O2 {error "simulated error"}
    TestBind  S1 <H1> O3
    hook call S1 <H1>
    list [GetCalls] [GetError]
} -cleanup {
    cleanup
} -result [tcltest::byConstraint {
    tcl8.6.10plus {{{S1 <H1> O1 {}} {S1 <H1> O3 {}}} {{{S1 <H1> {} O2} {simulated error} {-code 1 -level 0 -errorstack {INNER {error {simulated error}} UP 1 CALL {::hook::call S1 <H1>}} -errorcode NONE}}}}
    tcl8.6not10   {{{S1 <H1> O1 {}} {S1 <H1> O3 {}}} {{{S1 <H1> {} O2} {simulated error} {-code 1 -level 0 -errorstack {INNER {error {simulated error}} UP 1 CALL {call S1 <H1>}} -errorcode NONE}}}}
    tcl8.5minus   {{{S1 <H1> O1 {}} {S1 <H1> O3 {}}} {{{S1 <H1> {} O2} {simulated error} {-code 1 -level 0 -errorcode NONE}}}}
}]

test errorcommand-1.4 {-errorcommand handles other exceptions} -body {
    hook configure -errorcommand ErrorCommand

    hook bind S1 <H1> O1 {return -code break "simulated break"}
    hook call S1 <H1>
    GetError
} -cleanup {
    cleanup
} -result {{{S1 <H1> {} O1} {simulated break} {-code 3 -level 1}}}


#-----------------------------------------------------------------------
# -tracecommand

test tracecommand-1.1 {-tracecommand is called} -body {
    TestBind S1 <H1> O1
    TestBind S1 <H1> O2







|
|
|
<
<











|
|
|
<
<










>







436
437
438
439
440
441
442
443
444
445


446
447
448
449
450
451
452
453
454
455
456
457
458
459


460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
    hook configure -errorcommand ErrorCommand

    hook bind S1 <H1> O1 {error "simulated error"}
    hook call S1 <H1>
    GetError
} -cleanup {
    cleanup
} -result [EResult \
	       {{{S1 <H1> {} O1} {simulated error} {-code 1 -level 0 -errorcode NONE}}} \
	       {{{S1 <H1> {} O1} {simulated error} {-code 1 -level 0 -errorstack {INNER {error {simulated error}} UP 1 CALL {::hook::call S1 <H1>}} -errorcode NONE}}}]



test errorcommand-1.3 {handled errors don't break sequence of calls} -body {
    hook configure -errorcommand ErrorCommand

    TestBind  S1 <H1> O1
    hook bind S1 <H1> O2 {error "simulated error"}
    TestBind  S1 <H1> O3
    hook call S1 <H1>
    list [GetCalls] [GetError]
} -cleanup {
    cleanup
} -result [EResult \
	       {{{S1 <H1> O1 {}} {S1 <H1> O3 {}}} {{{S1 <H1> {} O2} {simulated error} {-code 1 -level 0 -errorcode NONE}}}} \
	       {{{S1 <H1> O1 {}} {S1 <H1> O3 {}}} {{{S1 <H1> {} O2} {simulated error} {-code 1 -level 0 -errorstack {INNER {error {simulated error}} UP 1 CALL {::hook::call S1 <H1>}} -errorcode NONE}}}}]



test errorcommand-1.4 {-errorcommand handles other exceptions} -body {
    hook configure -errorcommand ErrorCommand

    hook bind S1 <H1> O1 {return -code break "simulated break"}
    hook call S1 <H1>
    GetError
} -cleanup {
    cleanup
} -result {{{S1 <H1> {} O1} {simulated break} {-code 3 -level 1}}}


#-----------------------------------------------------------------------
# -tracecommand

test tracecommand-1.1 {-tracecommand is called} -body {
    TestBind S1 <H1> O1
    TestBind S1 <H1> O2
484
485
486
487
488
489
490
491
    cleanup
} -result {{S1 <H1> {} {O1 O2}} {S2 <H2> {} O2} {S3 <H3> {} {}}}

#-----------------------------------------------------------------------
# Clean up and finish

::tcltest::cleanupTests
return







<
486
487
488
489
490
491
492

    cleanup
} -result {{S1 <H1> {} {O1 O2}} {S2 <H2> {} O2} {S3 <H3> {} {}}}

#-----------------------------------------------------------------------
# Clean up and finish

::tcltest::cleanupTests

Changes to modules/html/html.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset HTML_VERSION 1.5]
[manpage_begin html n [vset HTML_VERSION]]
[see_also htmlparse]
[see_also ncgi]
[keywords checkbox]
[keywords checkbutton]
[keywords form]
[keywords html]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset HTML_VERSION 1.4.4]
[manpage_begin html n [vset HTML_VERSION]]
[see_also htmlparse]
[see_also ncgi]
[keywords checkbox]
[keywords checkbutton]
[keywords form]
[keywords html]
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284

[call [cmd ::html::mailto] [arg email] [opt [arg subject]]]

Generate a hypertext link to a mailto: URL.

[call [cmd ::html::meta] [arg args]]

Compatibility name for [cmd html::meta_name].

[call [cmd ::html::meta_name] [arg args]]

[emph {Side effect only}].

Call this before [cmd ::html::head] to define a [term meta] tag for
the page.

The arguments ([arg args]) are a Tcl-style name, value list that is
used for the [const name=] and [const content=] attributes of the
[term meta] tag.  The [term meta] tag is included in the result of
[cmd ::html::head].


[call [cmd ::html::meta_equiv] [arg args]]

[emph {Side effect only}].

Call this before [cmd ::html::head] to define a [term meta] tag for
the page.

The arguments ([arg args]) are a Tcl-style name, value list that is
used for the [const http-equiv=] and [const content=] attributes of
the [term meta] tag.  The [term meta] tag is included in the result of
[cmd ::html::head].

[call [cmd ::html::meta_charset] [arg charset]]

[emph {Side effect only}].

Call this before [cmd ::html::head] to
define a [term meta] tag for the page.

The [arg charset] is used with the [const charset=] attribute of the
[term meta] tag.  The [term meta] tag is included in the result of
[cmd ::html::head].

[call [cmd ::html::css] [arg href]]

[emph {Side effect only}].  Call this before [cmd ::html::head] to
define a [term link] tag for a linked CSS document.  The [arg href] 







<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<







236
237
238
239
240
241
242




243



























244
245

246
247
248
249
250
251
252

[call [cmd ::html::mailto] [arg email] [opt [arg subject]]]

Generate a hypertext link to a mailto: URL.

[call [cmd ::html::meta] [arg args]]





[emph {Side effect only}].  Call this before [cmd ::html::head] to



























define a [term meta] tag for the page.  The [arg args] is a Tcl-style name,
value list that is used for the name= and value= parameters for the

[term meta] tag.  The [term meta] tag is included in the result of
[cmd ::html::head].

[call [cmd ::html::css] [arg href]]

[emph {Side effect only}].  Call this before [cmd ::html::head] to
define a [term link] tag for a linked CSS document.  The [arg href] 
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
[call [cmd ::html::set] [arg {var val}]]

This procedure is similar to the built-in Tcl [cmd set] command.  The
main difference is that it returns "" so it can be called from an HTML
template file without appending unwanted results.  The other
difference is that it must take two arguments.

[call [cmd ::html::submit] [arg label] [opt [arg name]] [opt [arg title]]]

Generate an [term input] tag of type [term submit].

The [arg name] defaults to "submit".

When a non-empty [arg title] string is specified the button gains a
[const title=] attribute with that value.

[call [cmd ::html::tableFromArray] [arg arrname] [opt [arg param]] [opt [arg pat]]]

Generate a two-column [term table] and nested rows to display a Tcl array. The
table gets a heading that matches the array name, and each generated row
contains a name, value pair. The array names are sorted ([cmd lsort] without
special options). The argument [arg param] is for the [term table] tag and has







|

|
<
<
<
<
<







385
386
387
388
389
390
391
392
393
394





395
396
397
398
399
400
401
[call [cmd ::html::set] [arg {var val}]]

This procedure is similar to the built-in Tcl [cmd set] command.  The
main difference is that it returns "" so it can be called from an HTML
template file without appending unwanted results.  The other
difference is that it must take two arguments.

[call [cmd ::html::submit] [arg label] [opt [arg name]]]

Generate an [term input] tag of type [term submit]. [arg name] defaults to "submit".






[call [cmd ::html::tableFromArray] [arg arrname] [opt [arg param]] [opt [arg pat]]]

Generate a two-column [term table] and nested rows to display a Tcl array. The
table gets a heading that matches the array name, and each generated row
contains a name, value pair. The array names are sorted ([cmd lsort] without
special options). The argument [arg param] is for the [term table] tag and has
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
[enum] XHTML10S
[enum] XHTML10T
[enum] XHTML10F
[enum] XHTML11
[enum] XHTMLB
[list_end]

[call [cmd ::html::wrapTag] [arg tag] [opt [arg text]] [opt [arg args]]]

A helper to wrap a [arg text] in a pair of open/close [arg tag]s.

The arguments ([arg args]) are a Tcl-style name, value list that is
used to provide attributes and associated values to the opening tag.

The result is a string with the open [arg tag] along with the optional
attributes, the optional text, and the closed tag.

[list_end]

[vset CATEGORY html]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<
<
<
<
<
<
<



|

465
466
467
468
469
470
471










472
473
474
475
476
[enum] XHTML10S
[enum] XHTML10T
[enum] XHTML10F
[enum] XHTML11
[enum] XHTMLB
[list_end]











[list_end]

[vset CATEGORY html]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/html/html.tcl.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# Originally by Brent Welch, with help from Dan Kuchler and Melissa Chawla

package require Tcl 8.2
package require ncgi
package provide html 1.5

namespace eval ::html {

    # State about the current page

    variable page








|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# Originally by Brent Welch, with help from Dan Kuchler and Melissa Chawla

package require Tcl 8.2
package require ncgi
package provide html 1.4.4

namespace eval ::html {

    # State about the current page

    variable page

477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
#
# Arguments:
#	args	A name-value list of meta tag names and values.
#
# Side Effects:
#	Stores HTML for the <meta> tag for use later by html::head

# Ref: https://www.w3schools.com/tags/tag_meta.asp

proc ::html::meta {args} {
    # compatibility command
    variable page
    append html ""
    ::foreach {name value} $args {
	append html "<meta name=\"$name\" content=\"[quoteFormValue $value]\">"
    }
    lappend page(meta) $html
    return ""
}

proc ::html::meta_name {args} {
    variable page
    append html ""
    ::foreach {name value} $args {
	append html "<meta name=\"$name\" content=\"[quoteFormValue $value]\">"
    }
    lappend page(meta) $html
    return ""
}

proc ::html::meta_charset {charset} {
    variable page
    append html "<meta charset=\"[quoteFormValue $charset]\">"
    lappend page(meta) $html
    return ""
}

proc ::html::meta_equiv {args} {
    variable page
    append html ""
    ::foreach {name value} $args {
	append html "<meta http-equiv=\"$name\" content=\"[quoteFormValue $value]\">"
    }
    lappend page(meta) $html
    return ""
}

# ::html::refresh
#







<
<

<

|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







477
478
479
480
481
482
483


484

485
486
487
488



























489
490
491
492
493
494
495
#
# Arguments:
#	args	A name-value list of meta tag names and values.
#
# Side Effects:
#	Stores HTML for the <meta> tag for use later by html::head



proc ::html::meta {args} {

    variable page
    ::set html ""
    ::foreach {name value} $args {
	append html "<meta name=\"$name\" content=\"[quoteFormValue $value]\">"



























    }
    lappend page(meta) $html
    return ""
}

# ::html::refresh
#
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
    ::set page(author) "<!-- $author -->\n"
    return ""
}

# ::html::tagParam
#
#	Return a name, value string for the tag parameters.
#	The values come from "hard-wired" values in the
#	param argument, or from the defaults set with html::init.
#
# Arguments:
#	tag	Name of the HTML tag (case insensitive).
#	param	pname=value info that overrides any default values
#
# Results
#	A string of the form:







|
|







578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
    ::set page(author) "<!-- $author -->\n"
    return ""
}

# ::html::tagParam
#
#	Return a name, value string for the tag parameters.
#	The values come from "hard-wired" values in the 
#	param agrument, or from the defaults set with html::init.
#
# Arguments:
#	tag	Name of the HTML tag (case insensitive).
#	param	pname=value info that overrides any default values
#
# Results
#	A string of the form:
950
951
952
953
954
955
956
957
958
959
960
961
962
963

964
965
966
967
968
969
970
971
972
973
974

# ::html::submit --
#
#	Format a submit button.
#
# Arguments:
#	label		The string to appear in the submit button.
#	name		The name for the submit button element.
#	title		The string to appear on the submit button.
#			Optional. If not specified no title is shown.
#
# Results:
#	The html fragment


proc ::html::submit {label {name submit} {title {}}} {
    ::set html "<input type=\"submit\" name=\"$name\" value=\"$label\""
    ::if {$title != ""} { append html " title=\"$title\"" }
    append html ">\n"
}

# ::html::varEmpty --
#
#	Return true if the variable doesn't exist or is an empty string
#
# Arguments:







|
<
<




>
|
|
<
<







920
921
922
923
924
925
926
927


928
929
930
931
932
933
934


935
936
937
938
939
940
941

# ::html::submit --
#
#	Format a submit button.
#
# Arguments:
#	label		The string to appear in the submit button.
#	name		The name for the submit button element


#
# Results:
#	The html fragment


proc ::html::submit {label {name submit}} {
    ::set html "<input type=\"submit\" name=\"$name\" value=\"$label\">\n"


}

# ::html::varEmpty --
#
#	Return true if the variable doesn't exist or is an empty string
#
# Arguments:
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
proc ::html::h6 {string {param {}}} {
    html::h 6 $string $param
}
proc ::html::h {level string {param {}}} {
    return "<[string trimright "h$level [tagParam h$level $param]"]>$string</h$level>\n"
}

# ::html::wrapTag
#   Takes an optional text and wraps it in a tag pair, along with
#   optional attributes for the tag
#
# Arguments:
#   tag      The HTML tag name 
#   text     Optional text to insert between open/close tag
#   args     List of optional attributes and values to use for the tag
#
# Results:
#   String with the text wrapped in the open/close tag

proc ::html::wrapTag {tag {text ""} args} {
    ::set html ""
    ::set params ""
    ::foreach {i j} $args {
        append params "$i=\"[quoteFormValue $j]\" "
    }
    append html [openTag $tag [string trimright $params]]
    append html $text
    append html [closeTag]
    return $html
}

# ::html::openTag
#	Remember that a tag  is opened so it can be closed later.
#	This is used to automatically clean up at the end of a page.
#
# Arguments:
#	tag	The HTML tag name
#	param	Any parameters for the tag







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1010
1011
1012
1013
1014
1015
1016
























1017
1018
1019
1020
1021
1022
1023
proc ::html::h6 {string {param {}}} {
    html::h 6 $string $param
}
proc ::html::h {level string {param {}}} {
    return "<[string trimright "h$level [tagParam h$level $param]"]>$string</h$level>\n"
}

























# ::html::openTag
#	Remember that a tag  is opened so it can be closed later.
#	This is used to automatically clean up at the end of a page.
#
# Arguments:
#	tag	The HTML tag name
#	param	Any parameters for the tag
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302

# ::html::font
#
#	Generate a standard <font> tag.  This depends on defaults being
#	set via html::init
#
# Arguments:
#	args	Font parameters.
#
# Results:
#	HTML

proc ::html::font {args} {

    # e.g., font.face, font.size, font.color







|







1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245

# ::html::font
#
#	Generate a standard <font> tag.  This depends on defaults being
#	set via html::init
#
# Arguments:
#	args	Font parameters.  
#
# Results:
#	HTML

proc ::html::font {args} {

    # e.g., font.face, font.size, font.color
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
proc ::html::extractParam {param key {varName ""}} {
    ::if {$varName == ""} {
	upvar $key result
    } else {
	upvar $varName result
    }
    ::set ws " \t\n\r"

    # look for name=value combinations.  Either (') or (") are valid delimeters
    ::if {
      [regsub -nocase [format {.*%s[%s]*=[%s]*"([^"]*).*} $key $ws $ws] $param {\1} value] ||
      [regsub -nocase [format {.*%s[%s]*=[%s]*'([^']*).*} $key $ws $ws] $param {\1} value] ||
      [regsub -nocase [format {.*%s[%s]*=[%s]*([^%s]+).*} $key $ws $ws $ws] $param {\1} value] } {
        ::set result $value
        return 1
    }

    # now look for valueless names
    # I should strip out name=value pairs, so we don't end up with "name"
    # inside the "value" part of some other key word - some day

    ::set bad \[^a-zA-Z\]+
    ::if {[regexp -nocase  "$bad$key$bad" -$param-]} {
	return 1
    } else {
	return 0
    }
}







|












|







1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
proc ::html::extractParam {param key {varName ""}} {
    ::if {$varName == ""} {
	upvar $key result
    } else {
	upvar $varName result
    }
    ::set ws " \t\n\r"
 
    # look for name=value combinations.  Either (') or (") are valid delimeters
    ::if {
      [regsub -nocase [format {.*%s[%s]*=[%s]*"([^"]*).*} $key $ws $ws] $param {\1} value] ||
      [regsub -nocase [format {.*%s[%s]*=[%s]*'([^']*).*} $key $ws $ws] $param {\1} value] ||
      [regsub -nocase [format {.*%s[%s]*=[%s]*([^%s]+).*} $key $ws $ws $ws] $param {\1} value] } {
        ::set result $value
        return 1
    }

    # now look for valueless names
    # I should strip out name=value pairs, so we don't end up with "name"
    # inside the "value" part of some other key word - some day
	
    ::set bad \[^a-zA-Z\]+
    ::if {[regexp -nocase  "$bad$key$bad" -$param-]} {
	return 1
    } else {
	return 0
    }
}
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
#	s	The near-HTML text
#
# Results:
#	The text with entities in place of specials characters.

proc ::html::html_entities {s} {
    variable entities
    ::set text [string map $entities $s]
    ::if {[string is ascii $text]} {
        return $text
    }
    # Escape unicode characters
    ::set N [string length $text]
    ::set c 0
    ::set result {}
    ::for {::set x 0} {$x < $N} {::incr x} {
        ::set char [string index $text $x]
        ::set code [::scan $char %c]
        ::if {$code>255} {
            ::append result "&#$code\;"
        } else {
            ::append result $char
        }
    }
    return $result
}

# ::html::nl2br --
#	Replaces all line-endings in the text with <br> tags.
#
# Arguments:
#	s	The near-HTML text







|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1388
1389
1390
1391
1392
1393
1394
1395

















1396
1397
1398
1399
1400
1401
1402
#	s	The near-HTML text
#
# Results:
#	The text with entities in place of specials characters.

proc ::html::html_entities {s} {
    variable entities
    return [string map $entities $s]

















}

# ::html::nl2br --
#	Replaces all line-endings in the text with <br> tags.
#
# Arguments:
#	s	The near-HTML text
1574
1575
1576
1577
1578
1579
1580
1581
#	None.

proc ::html::js-clear {} {
    variable page
    catch { unset page(js) }
    return
}








<
1500
1501
1502
1503
1504
1505
1506

#	None.

proc ::html::js-clear {} {
    variable page
    catch { unset page(js) }
    return
}

Changes to modules/html/html.test.

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
# -*- tcl -*- Tests for the html module.
#
# This file contains a collection of tests for a module in the
# Standard Tcl Library. Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2006 Michael Schlenker <mic42@users.sourceforge.net>
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

support {
    use      ncgi/ncgi.tcl      ncgi
}

testing {
    useLocal html.tcl html
}

# -------------------------------------------------------------------------

test html-1.1 {html::init} -body {










>
>










<
<
<
<







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
# -*- tcl -*- Tests for the html module.
#
# This file contains a collection of tests for a module in the
# Standard Tcl Library. Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2006 Michael Schlenker <mic42@users.sourceforge.net>
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: html.test,v 1.23 2006/10/09 21:41:40 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0





testing {
    useLocal html.tcl html
}

# -------------------------------------------------------------------------

test html-1.1 {html::init} -body {
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
} -result "<html><head>\n\t<title>The Title</title>\n</head>\n"

test html-2.3 {html::head} -body {
    html::description "The Description"
    html::keywords key word
    html::author "Cathy Coder"
    html::meta metakey metavalue
    html::meta_name other value
    html::meta_charset utf-8
    html::meta_equiv refresh 30
    html::head "The Title"
} -result {<html><head>
	<title>The Title</title>
	<!-- Cathy Coder -->
	<meta name="description" content="The Description">
	<meta name="keywords" content="key, word">
	<meta name="metakey" content="metavalue">
	<meta name="other" content="value">
	<meta charset="utf-8">
	<meta http-equiv="refresh" content="30">
</head>
}

test html-3.1 {html::title, not enough args} -body {
    html::title
} -returnCodes error -result {wrong # args: should be "html::title title"}








<
<
<







<
<
<







60
61
62
63
64
65
66



67
68
69
70
71
72
73



74
75
76
77
78
79
80
} -result "<html><head>\n\t<title>The Title</title>\n</head>\n"

test html-2.3 {html::head} -body {
    html::description "The Description"
    html::keywords key word
    html::author "Cathy Coder"
    html::meta metakey metavalue



    html::head "The Title"
} -result {<html><head>
	<title>The Title</title>
	<!-- Cathy Coder -->
	<meta name="description" content="The Description">
	<meta name="keywords" content="key, word">
	<meta name="metakey" content="metavalue">



</head>
}

test html-3.1 {html::title, not enough args} -body {
    html::title
} -returnCodes error -result {wrong # args: should be "html::title title"}

311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
    ncgi::parse
    html::textInput email value=default@foo.com
} {<input type="text" name="email" value="welch@scriptics.com">
}

test html-13.6 {html::textInput} {
    html::init
    ncgi::reset
    ncgi::parse
    html::textInput email default@foo.com size="80"
} {<input type="text" name="email" value="default@foo.com" size="80">
}

test html-13.7 {html::textInput} {
    html::init {







|







303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
    ncgi::parse
    html::textInput email value=default@foo.com
} {<input type="text" name="email" value="welch@scriptics.com">
}

test html-13.6 {html::textInput} {
    html::init
    ncgi::reset 
    ncgi::parse
    html::textInput email default@foo.com size="80"
} {<input type="text" name="email" value="default@foo.com" size="80">
}

test html-13.7 {html::textInput} {
    html::init {
469
470
471
472
473
474
475

476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
    }
    ncgi::reset info=[ncgi::encode "</textarea><script>alert(1)</script>"]
    ncgi::parse
    html::textarea info
} {<textarea name="info" cols="50" rows="8">&lt;/textarea&gt;&lt;script&gt;alert(1)&lt;/script&gt;</textarea>
}


test html-24.1 {html::submit, wrong args, not enough} {
    catch {html::submit}
} {1}

test html-24.2 {html::submit, wrong args, too many} {
    catch {html::submit wrong num args X}
} {1}

test html-24.3 {html::submit, label only} {
    html::submit "Push Me"
} {<input type="submit" name="submit" value="Push Me">
}

test html-24.4 {html::submit, label and name} {
    html::submit "Push Me" push
} {<input type="submit" name="push" value="Push Me">
}

test html-24.5 {html::submit, label, name, and title} {
    html::submit "Push Me" push a-title
} {<input type="submit" name="push" value="Push Me" title="a-title">
}

test html-25.1 {html::varEmpty} {
    catch {html::varEmpty}
} 1
test html-25.2 {html::varEmpty} {
    catch {html::varEmpty wrong num args}
} 1








>
|



|
|


|




|




<
<
<
<
<







461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486





487
488
489
490
491
492
493
    }
    ncgi::reset info=[ncgi::encode "</textarea><script>alert(1)</script>"]
    ncgi::parse
    html::textarea info
} {<textarea name="info" cols="50" rows="8">&lt;/textarea&gt;&lt;script&gt;alert(1)&lt;/script&gt;</textarea>
}


test html-24.1 {html::submit} {
    catch {html::submit}
} {1}

test html-24.2 {html::submit} {
    catch {html::submit wrong num args}
} {1}

test html-24.3 {html::submit} {
    html::submit "Push Me"
} {<input type="submit" name="submit" value="Push Me">
}

test html-24.4 {html::submit} {
    html::submit "Push Me" push
} {<input type="submit" name="push" value="Push Me">
}






test html-25.1 {html::varEmpty} {
    catch {html::varEmpty}
} 1
test html-25.2 {html::varEmpty} {
    catch {html::varEmpty wrong num args}
} 1

945
946
947
948
949
950
951

952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
	<link rel="stylesheet" type="text/css" href="http://test.css">
	<script language="javascript" type="text/javascript" src="http://test.js"></script>
</head>}

# -------------------------------------------------------------------------
# TODO: html::css-clear, html::js-clear


test html-tkt-afe4366e2e-38.0 {html::doctype, not enough args} -body {
    html::doctype
} -returnCodes error -result {wrong # args: should be "html::doctype arg"}

test html-tkt-afe4366e2e-38.1 {html::doctype, too many args} -body {
    html::doctype HTML401T X
} -returnCodes error -result {wrong # args: should be "html::doctype arg"}

test html-tkt-afe4366e2e-38.2 {html::doctype, unknown type} -body {
    html::doctype HTML401TXXX
} -returnCodes error -result {Unknown doctype "HTML401TXXX"}

test html-tkt-afe4366e2e-38.3 {html::doctype} -body {
    html::doctype HTML401T
} -result {<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">}

# -------------------------------------------------------------------------

test html-tkt-1076403-39.0 {html::wrapTag, not enough args} -body {
    html::wrapTag
} -returnCodes error -result [tcltest::wrongNumArgs html::wrapTag {tag ?text? args} 0]

test html-tkt-1076403-39.1 {html::wrapTag, tag alone} -body {
    html::wrapTag p
} -result {<p></p>}

test html-tkt-1076403-39.2 {html::wrapTag, tag and text} -body {
    html::wrapTag p "test"
} -result {<p>test</p>}

test html-tkt-1076403-39.3 {html::wrapTag, tag, text, and attribute} -body {
    html::wrapTag p "test" align left
} -result {<p align="left">test</p>}

test html-tkt-1076403-39.4 {html::wrapTag, tag, text, and attributes} -body {
    html::wrapTag pre "test" align left width 20
} -result {<pre align="left" width="20">test</pre>}

# -------------------------------------------------------------------------
testsuiteCleanup







>
|



|



|



|




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957






















958
	<link rel="stylesheet" type="text/css" href="http://test.css">
	<script language="javascript" type="text/javascript" src="http://test.js"></script>
</head>}

# -------------------------------------------------------------------------
# TODO: html::css-clear, html::js-clear


test html-tktafe4366e2e-38.0 {html::doctype, not enough args} -body {
    html::doctype
} -returnCodes error -result {wrong # args: should be "html::doctype arg"}

test html-tktafe4366e2e-38.1 {html::doctype, too many args} -body {
    html::doctype HTML401T X
} -returnCodes error -result {wrong # args: should be "html::doctype arg"}

test html-tktafe4366e2e-38.2 {html::doctype, unknown type} -body {
    html::doctype HTML401TXXX
} -returnCodes error -result {Unknown doctype "HTML401TXXX"}

test html-tktafe4366e2e-38.3 {html::doctype} -body {
    html::doctype HTML401T
} -result {<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">}

# -------------------------------------------------------------------------






















testsuiteCleanup

Changes to modules/html/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded html 1.5 [list source [file join $dir html.tcl]]

|
1
2
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded html 1.4.4 [list source [file join $dir html.tcl]]

Changes to modules/htmlparse/htmlparse.man.

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
error if it sees incomplete HTML and has no place to store it to. This
makes sense for the normal mode. Only incomplete tags are detected,
not missing tags.  Optional, defaults to 'no variable'.

[list_end]

[list_begin definitions]

[def [emph "Interface to the command prefix"]]

In normal mode the parser will invoke the command prefix with four
arguments appended. See [cmd ::htmlparse::debugCallback] for a
description.

[para]







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
error if it sees incomplete HTML and has no place to store it to. This
makes sense for the normal mode. Only incomplete tags are detected,
not missing tags.  Optional, defaults to 'no variable'.

[list_end]

[list_begin definitions]
[para]
[def [emph "Interface to the command prefix"]]

In normal mode the parser will invoke the command prefix with four
arguments appended. See [cmd ::htmlparse::debugCallback] for a
description.

[para]
258
259
260
261
262
263
264
265
266

[cmd ::htmlparse::2tree]. It removes all nodes representing forms and
form elements. Its only argument is the name of the tree to cut down.

[list_end]

[vset CATEGORY htmlparse]
[include ../common-text/feedback.inc]
[manpage_end]







|

258
259
260
261
262
263
264
265
266

[cmd ::htmlparse::2tree]. It removes all nodes representing forms and
form elements. Its only argument is the name of the tree to cut down.

[list_end]

[vset CATEGORY htmlparse]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/htmlparse/htmlparse.test.

545
546
547
548
549
550
551
552
553
554
555
556
557
558
559

# -------------------------------------------------------------------------
# In this section we run all the tests depending on a struct::tree,
# and thus have to test all the available implementations.

set tests [file join [file dirname [info script]] htmlparse.tree_testsuite]

#catch {memory validate on}

TestAccelDo struct::tree impl {
    # The global variable 'impl' is part of the public API the
    # testsuit (in htmlparse_tree.testsuite) can expect from the
    # environment.

    namespace import -force struct::tree







|







545
546
547
548
549
550
551
552
553
554
555
556
557
558
559

# -------------------------------------------------------------------------
# In this section we run all the tests depending on a struct::tree,
# and thus have to test all the available implementations.

set tests [file join [file dirname [info script]] htmlparse.tree_testsuite]

catch {memory validate on}

TestAccelDo struct::tree impl {
    # The global variable 'impl' is part of the public API the
    # testsuit (in htmlparse_tree.testsuite) can expect from the
    # environment.

    namespace import -force struct::tree

Changes to modules/http/ChangeLog.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
2017-10-28  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* autoproxy.tcl: allow unsetting basic auth information
	* autoproxy.test: added basic tests of the package options
	* autoproxy.man: update documentation for "configure -basic --"
	Bumped to version 1.5.4 given new option.

2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2012-05-28  Andreas Kupries  <andreask@activestate.com>
<
<
<
<
<
<
<














1
2
3
4
5
6
7







2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2012-05-28  Andreas Kupries  <andreask@activestate.com>

Deleted modules/http/autoproxy-tls-security-notes.inc.

1
2
3
4
5
6
7
8
9
10
[section {TLS Security Considerations}]

[para][emph Note] This section only applies if TLS support is provided
by the [package TLS] package.

It does not apply when [package autoproxy] was configured to use some
other package which can provide the same (i.e [package twapi]), via
the [option -tls_package] configuration option.

[include ../common-text/tls-security-text.inc]
<
<
<
<
<
<
<
<
<
<




















Changes to modules/http/autoproxy.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[vset VERSION 1.7]
[manpage_begin autoproxy n [vset VERSION]]
[see_also http(n)]
[keywords authentication]
[keywords http]
[keywords proxy]
[moddesc   {HTTP protocol helper modules}]
[titledesc {Automatic HTTP proxy usage and authentication}]
[category  Networking]
[require Tcl 8.5]
[require http [opt 2.0]]
[require autoproxy [opt [vset VERSION]]]
[description]
[para]

This package attempts to automate the use of HTTP proxy servers in Tcl
HTTP client code. It tries to initialize the web access settings from
system standard locations and can be configured to negotiate
authentication with the proxy if required.
<
|







|

|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

[manpage_begin autoproxy n 1.5.3]
[see_also http(n)]
[keywords authentication]
[keywords http]
[keywords proxy]
[moddesc   {HTTP protocol helper modules}]
[titledesc {Automatic HTTP proxy usage and authentication}]
[category  Networking]
[require Tcl 8.2]
[require http [opt 2.0]]
[require autoproxy [opt 1.5.3]]
[description]
[para]

This package attempts to automate the use of HTTP proxy servers in Tcl
HTTP client code. It tries to initialize the web access settings from
system standard locations and can be configured to negotiate
authentication with the proxy if required.
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
variable may be set up. Either a plain host:port or more commonly a
URL and sometimes the URL may contain authentication parameters or
these may be requested from the user or provided via http_proxy_user
and http_proxy_pass. This package attempts to deal with all these
schemes. It will do it's best to get the required parameters from the
environment or registry and if it fails can be reconfigured.

[include autoproxy-tls-security-notes.inc]

[section "COMMANDS"]

[list_begin definitions]

[call [cmd ::autoproxy::init]]








|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
variable may be set up. Either a plain host:port or more commonly a
URL and sometimes the URL may contain authentication parameters or
these may be requested from the user or provided via http_proxy_user
and http_proxy_pass. This package attempts to deal with all these
schemes. It will do it's best to get the required parameters from the
environment or registry and if it fails can be reconfigured.

[include ../common-text/tls-security-notes.inc]

[section "COMMANDS"]

[list_begin definitions]

[call [cmd ::autoproxy::init]]

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
89
90
91
[call [cmd ::autoproxy::tls_connect] [arg args]]

Connect to a secure socket through a proxy. HTTP proxy servers permit
the use of the CONNECT HTTP command to open a link through the proxy
to the target machine. This function hides the details. For use with
the http package see [cmd tls_socket].
[para]
The [arg args] list may contain any of the options
supported by the specific TLS package that is in use but
must end with the host and port as the last two items.

[call [cmd ::autoproxy::tunnel_connect] [arg args]]

Connect to a target host throught a proxy. This uses the same CONNECT
HTTP command as the [cmd tls_connect] but does not promote the link
security once the connection is established.
[para]
The [arg args] list may contain any of the options
supported by the specific TLS package that is in use but
must end with the host and port as the last two items.

[para]
Note that many proxy servers will permit CONNECT calls to a limited
set of ports - typically only port 443 (the secure HTTP port).

[call [cmd ::autoproxy::tls_socket] [arg args]]

This function is to be used to register a proxy-aware secure socket







|
<








|
<

<







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
[call [cmd ::autoproxy::tls_connect] [arg args]]

Connect to a secure socket through a proxy. HTTP proxy servers permit
the use of the CONNECT HTTP command to open a link through the proxy
to the target machine. This function hides the details. For use with
the http package see [cmd tls_socket].
[para]
The [arg args] list may contain any of the [package tls] package options but

must end with the host and port as the last two items.

[call [cmd ::autoproxy::tunnel_connect] [arg args]]

Connect to a target host throught a proxy. This uses the same CONNECT
HTTP command as the [cmd tls_connect] but does not promote the link
security once the connection is established.
[para]
The [arg args] list may contain any of the [package tls] package options but

must end with the host and port as the last two items.

[para]
Note that many proxy servers will permit CONNECT calls to a limited
set of ports - typically only port 443 (the secure HTTP port).

[call [cmd ::autoproxy::tls_socket] [arg args]]

This function is to be used to register a proxy-aware secure socket
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
called when [cmd configure] [option -basic] is called with either no or
insufficient authentication details. This can be used to present a
dialog to the user to request the additional information.

[opt_def -basic]
Following options are for configuring the Basic authentication
scheme parameters. See [sectref "Basic Authentication"].
To unset the proxy authentication information retained from a previous
call of this function either "--" or no additional parameters can be
supplied. This will remove the existing authentication information.

[opt_def -tls_package packagename]
This option may be used to configure the Tcl package to use for
TLS support. Valid package names are [const tls] (default)
and [const twapi].

[list_end]

[section "Basic Authentication"]

Basic is the simplest and most commonly use HTTP proxy authentication
scheme. It is described in (1 section 11) and also in (2). It offers







<
<
<
<
<
<
<
<







119
120
121
122
123
124
125








126
127
128
129
130
131
132
called when [cmd configure] [option -basic] is called with either no or
insufficient authentication details. This can be used to present a
dialog to the user to request the additional information.

[opt_def -basic]
Following options are for configuring the Basic authentication
scheme parameters. See [sectref "Basic Authentication"].









[list_end]

[section "Basic Authentication"]

Basic is the simplest and most commonly use HTTP proxy authentication
scheme. It is described in (1 section 11) and also in (2). It offers
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
The following options exists for this scheme:
[list_begin options]
[opt_def "-username" "name"]
The username required to authenticate with the configured proxy.
[opt_def "-password" "password"]
The password required for the username specified.
[opt_def "-realm" "realm"]
This option is not used by this package but may be used in requesting
authentication details from the user.
[opt_def "--"]
The end-of-options indicator may be used alone to unset any
authentication details currently enabled.

[list_end]

[section "EXAMPLES"]

[para]
[example {
package require autoproxy







|
<
<
<
<
<







141
142
143
144
145
146
147
148





149
150
151
152
153
154
155
The following options exists for this scheme:
[list_begin options]
[opt_def "-username" "name"]
The username required to authenticate with the configured proxy.
[opt_def "-password" "password"]
The password required for the username specified.
[opt_def "-realm" "realm"]
This option is not used.





[list_end]

[section "EXAMPLES"]

[para]
[example {
package require autoproxy
208
209
210
211
212
213
214
215
216
At this time only Basic authentication (1) (2) is supported. It is
planned to add support for Digest (2) and NTLM in the future.

[section AUTHORS]
Pat Thoyts

[vset CATEGORY {http :: autoproxy}]
[include ../common-text/feedback.inc]
[manpage_end]







|

191
192
193
194
195
196
197
198
199
At this time only Basic authentication (1) (2) is supported. It is
planned to add support for Digest (2) and NTLM in the future.

[section AUTHORS]
Pat Thoyts

[vset CATEGORY {http :: autoproxy}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/http/autoproxy.tcl.

1
2
3
4
5
6
7
8
# autoproxy.tcl - Copyright (C) 2002-2008, 2017 Pat Thoyts <patthoyts@users.sf.net>
#
# On Unix the standard for identifying the local HTTP proxy server
# seems to be to use the environment variable http_proxy or ftp_proxy and
# no_proxy to list those domains to be excluded from proxying.
#
# On Windows we can retrieve the Internet Settings values from the registry
# to obtain pretty much the same information.
|







1
2
3
4
5
6
7
8
# autoproxy.tcl - Copyright (C) 2002-2008 Pat Thoyts <patthoyts@users.sf.net>
#
# On Unix the standard for identifying the local HTTP proxy server
# seems to be to use the environment variable http_proxy or ftp_proxy and
# no_proxy to list those domains to be excluded from proxying.
#
# On Windows we can retrieve the Internet Settings values from the registry
# to obtain pretty much the same information.
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
#   set tok [http::geturl http://wiki.tcl.tk/]
#   http::data $tok
#
# To support https add:
#   package require tls
#   http::register https 443 ::autoproxy::tls_socket

package require Tcl 8.5 ;# ni/in operators
package require http;                   # tcl
package require uri;                    # tcllib
package require base64;                 # tcllib

namespace eval ::autoproxy {
    variable options

    if {! [info exists options]} {
        array set options {
            proxy_host ""
            proxy_port 80
            no_proxy   {}
            basic      {}
            authProc   {}
            tls_package tls
        }
    }

    variable uid
    if {![info exists uid]} { set uid 0 }

    variable winregkey







<














<







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
#   set tok [http::geturl http://wiki.tcl.tk/]
#   http::data $tok
#
# To support https add:
#   package require tls
#   http::register https 443 ::autoproxy::tls_socket


package require http;                   # tcl
package require uri;                    # tcllib
package require base64;                 # tcllib

namespace eval ::autoproxy {
    variable options

    if {! [info exists options]} {
        array set options {
            proxy_host ""
            proxy_port 80
            no_proxy   {}
            basic      {}
            authProc   {}

        }
    }

    variable uid
    if {![info exists uid]} { set uid 0 }

    variable winregkey
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
        -host -
        -proxy_h* { set options(proxy_host) }
        -port -
        -proxy_p* { set options(proxy_port) }
        -no*      { set options(no_proxy) }
        -basic    { set options(basic) }
        -authProc { set options(authProc) }
        -tls_package { set options(tls_package) }
        default {
            set err [join [lsort [array names options]] ", -"]
            return -code error "bad option \"$option\":\
                       must be one of -$err"
        }
    }
}







<







58
59
60
61
62
63
64

65
66
67
68
69
70
71
        -host -
        -proxy_h* { set options(proxy_host) }
        -port -
        -proxy_p* { set options(proxy_port) }
        -no*      { set options(no_proxy) }
        -basic    { set options(basic) }
        -authProc { set options(authProc) }

        default {
            set err [join [lsort [array names options]] ", -"]
            return -code error "bad option \"$option\":\
                       must be one of -$err"
        }
    }
}
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
            -host -
            -proxy_h* { set options(proxy_host) [Pop args 1]}
            -port -
            -proxy_p* { set options(proxy_port) [Pop args 1]}
            -no*      { set options(no_proxy) [Pop args 1] }
            -basic    { Pop args; configure:basic $args ; break }
            -authProc { set options(authProc) [Pop args 1] }
            -tls_package {
                set tls_package [Pop args 1]
                if {$tls_package ni {tls twapi}} {
                    error "Invalid TLS package option '$tls_package'. Must be 'tls' or 'twapi'"
                }
                set options(tls_package) $tls_package
            }
            --        { Pop args; break }
            default {
                set opts [join [lsort [array names options]] ", -"]
                return -code error "bad option \"$option\":\
                       must be one of -$opts"
            }
        }







<
<
<
<
<
<
<







96
97
98
99
100
101
102







103
104
105
106
107
108
109
            -host -
            -proxy_h* { set options(proxy_host) [Pop args 1]}
            -port -
            -proxy_p* { set options(proxy_port) [Pop args 1]}
            -no*      { set options(no_proxy) [Pop args 1] }
            -basic    { Pop args; configure:basic $args ; break }
            -authProc { set options(authProc) [Pop args 1] }







            --        { Pop args; break }
            default {
                set opts [join [lsort [array names options]] ", -"]
                return -code error "bad option \"$option\":\
                       must be one of -$opts"
            }
        }
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
    variable options
    array set opts {user {} passwd {} realm {}}
    foreach {opt value} $arglist {
        switch -glob -- $opt {
            -u* { set opts(user) $value}
            -p* { set opts(passwd) $value}
            -r* { set opts(realm) $value}
            --  { break }
            default {
                return -code error "invalid option \"$opt\": must be one of\
                     -username or -password or -realm"
            }
        }
    }

    # If nothing was provided, try calling the authProc
    if {$options(authProc) != {} \
            && ($opts(user) == {} || $opts(passwd) == {})} {
        set r [$options(authProc) $opts(user) $opts(passwd) $opts(realm)]
        set opts(user) [lindex $r 0]
        set opts(passwd) [lindex $r 1]
    }

    if {$opts(user) eq ""} {
        set options(basic) ""
    } else {
        # Store the encoded string to avoid re-encoding all the time.
        set options(basic) [list "Proxy-Authorization" \
                                [concat "Basic" \
                                     [base64::encode $opts(user):$opts(passwd)]]]
    }
    return
}

# -------------------------------------------------------------------------
# Description:
#  An http package proxy filter. This attempts to work out if a request
#  should go via the configured proxy using a glob comparison against the







<















<
<
<
|
|
|
|
<







307
308
309
310
311
312
313

314
315
316
317
318
319
320
321
322
323
324
325
326
327
328



329
330
331
332

333
334
335
336
337
338
339
    variable options
    array set opts {user {} passwd {} realm {}}
    foreach {opt value} $arglist {
        switch -glob -- $opt {
            -u* { set opts(user) $value}
            -p* { set opts(passwd) $value}
            -r* { set opts(realm) $value}

            default {
                return -code error "invalid option \"$opt\": must be one of\
                     -username or -password or -realm"
            }
        }
    }

    # If nothing was provided, try calling the authProc
    if {$options(authProc) != {} \
            && ($opts(user) == {} || $opts(passwd) == {})} {
        set r [$options(authProc) $opts(user) $opts(passwd) $opts(realm)]
        set opts(user) [lindex $r 0]
        set opts(passwd) [lindex $r 1]
    }




    # Store the encoded string to avoid re-encoding all the time.
    set options(basic) [list "Proxy-Authorization" \
                            [concat "Basic" \
                                 [base64::encode $opts(user):$opts(passwd)]]]

    return
}

# -------------------------------------------------------------------------
# Description:
#  An http package proxy filter. This attempts to work out if a request
#  should go via the configured proxy using a glob comparison against the
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
#	provided your proxy will permit CONNECT attempts to ports
#	other than port 443 (many will not).
#	This command defers to 'tunnel_connect' to link to the target
#	host and then upgrades the link to SSL/TLS
#
proc ::autoproxy::tls_connect {args} {
    variable options
    set peersubject [lindex $args end-1]
    if {[string length $options(proxy_host)] > 0} {
        set s [eval [linsert $args 0 tunnel_connect]]
        fconfigure $s -blocking 1 -buffering none -translation binary
        if {[string equal "-async" [lindex $args end-2]]} {
            if {$options(tls_package) eq "twapi"} {
                set s [eval [linsert [lrange $args 0 end-3] 0 ::twapi::starttls $s -peersubject $peersubject]]
            } else {
                eval [linsert [lrange $args 0 end-3] 0 ::tls::import $s]
            }
        } else {
            if {$options(tls_package) eq "twapi"} {
                set s [eval [linsert [lrange $args 0 end-2] 0 ::twapi::starttls $s -peersubject $peersubject]]
            } else {
                eval [linsert [lrange $args 0 end-2] 0 ::tls::import $s]
            }
        }
    } else {
        if {$options(tls_package) eq "twapi"} {
            set s [eval [linsert $args 0 ::twapi::tls_socket]]
        } else {
            set s [eval [linsert $args 0 ::tls::socket]]
        }
    }
    return $s
}

# autoproxy::tunnel_connect --
#
#	Create a connection to a remote machine through a proxy







<




<
<
<
|
<

<
<
<
|
|
<

<
<
<
|
<







375
376
377
378
379
380
381

382
383
384
385



386

387



388
389

390



391

392
393
394
395
396
397
398
#	provided your proxy will permit CONNECT attempts to ports
#	other than port 443 (many will not).
#	This command defers to 'tunnel_connect' to link to the target
#	host and then upgrades the link to SSL/TLS
#
proc ::autoproxy::tls_connect {args} {
    variable options

    if {[string length $options(proxy_host)] > 0} {
        set s [eval [linsert $args 0 tunnel_connect]]
        fconfigure $s -blocking 1 -buffering none -translation binary
        if {[string equal "-async" [lindex $args end-2]]} {



            eval [linsert [lrange $args 0 end-3] 0 ::tls::import $s]

        } else {



            eval [linsert [lrange $args 0 end-2] 0 ::tls::import $s]
        }

    } else {



        set s [eval [linsert $args 0 ::tls::socket]]

    }
    return $s
}

# autoproxy::tunnel_connect --
#
#	Create a connection to a remote machine through a proxy
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
    set args [lrange $args 0 end-2]
    lappend args $uhost $uport

    set s [eval [linsert $args 0 tls_connect]]

    # record the tls connection status in the http state array.
    upvar state state

    if {$options(tls_package) eq "twapi"} {
        # With twapi::tls_socket, state may not be available on
        # an async connect until negotiation is completed.
        set state(tls_status) ""
        set security_context [fconfigure $s -context]
        if {$security_context ne ""} {
            set cert [twapi::sspi_remote_cert $security_context]
            set cert_info [twapi::cert_info $cert]
            twapi::cert_release $cert
            dict set state(tls_status) issuer [dict get $cert_info -issuer]
            dict set state(tls_status) subject [dict get $cert_info -subject]
            dict set state(tls_status) notBefore [dict get $cert_info -start]
            dict set state(tls_status) notAfter [dict get $cert_info -end]
            # Note: binary encode hex was not available in older Tcl, use twapi::hex
            dict set state(tls_status) serial [twapi::hex [dict get $cert_info -serialnumber]]
            # TBD - dict set state(tls_status) cipher
            # TBD - dict set state(tls_status) sbits
        }
    } else {
        tls::handshake $s
        set state(tls_status) [tls::status $s]
    }

    return $s
}

# -------------------------------------------------------------------------

package provide autoproxy 1.7

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<






|







517
518
519
520
521
522
523




















524
525

526
527
528
529
530
531
532
533
534
535
536
537
538
539
    set args [lrange $args 0 end-2]
    lappend args $uhost $uport

    set s [eval [linsert $args 0 tls_connect]]

    # record the tls connection status in the http state array.
    upvar state state




















    tls::handshake $s
    set state(tls_status) [tls::status $s]


    return $s
}

# -------------------------------------------------------------------------

package provide autoproxy 1.5.3

# -------------------------------------------------------------------------
#
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Deleted modules/http/autoproxy.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
source [file join \
            [file dirname [file dirname [file join [pwd] [info script]]]] \
            devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0

# Constraints depending on package availability
tcltest::testConstraint have_tls   [expr {![catch {package require tls}]}]
tcltest::testConstraint have_twapi [expr {![catch {package require twapi}]}]

puts "- have_tls   = [expr {![catch {package require tls}]}]"
puts "- have_twapi = [expr {![catch {package require twapi}]}]"

# uri and base64

testing {
    useLocal autoproxy.tcl autoproxy
}

# May need to change these to your proxy
set proxy_host 147.135.210.114
set proxy_port 54566

# Clear the autoproxy package state for each test
proc packageReset {} {
    array set ::autoproxy::options {
        authProc "" basic "" no_proxy "" proxy_host "" proxy_port ""
        tls_package tls
    }
}

test autoproxy-1.0.0 "autoproxy::init standard" -setup {
    packageReset
} -body {
    autoproxy::init http://localhost:13128 "hosta,hostb"
    list [autoproxy::cget -host] \
        [autoproxy::cget -port] \
        [autoproxy::cget -no_proxy]
} -result {localhost 13128 {hosta hostb}}

test autoproxy-1.0.1 "autoproxy::init standard, auth" -setup {
    packageReset
} -body {
    autoproxy::init http://user:secret@localhost:13128 "hosta,hostb"
    list [autoproxy::cget -host] \
        [autoproxy::cget -port] \
        [autoproxy::cget -no_proxy] \
        [base64::decode [lindex [autoproxy::cget -basic] 1 1]]
} -result {localhost 13128 {hosta hostb} user:secret}

test autoproxy-1.0.2 "autoproxy::init standard, override" -setup {
    packageReset
} -body {
    autoproxy::init http://proxyone:13128 "hosta,hostb"
    autoproxy::init http://proxytwo:13129 "hostc,hostd"
    list [autoproxy::cget -host] \
        [autoproxy::cget -port] \
        [autoproxy::cget -no_proxy]
} -result {proxytwo 13129 {hostc hostd}}

test autoproxy-1.0.3 "autoproxy::init standard, auth, override" -setup {
    packageReset
} -body {
    autoproxy::init http://user:secret@localhost:13128 "hosta,hostb"
    autoproxy::init http://luser:passwd@proxy:13129 "hostc,hostd"
    list [autoproxy::cget -host] \
        [autoproxy::cget -port] \
        [autoproxy::cget -no_proxy] \
        [base64::decode [lindex [autoproxy::cget -basic] 1 1]]
} -result {proxy 13129 {hostc hostd} luser:passwd}

test autoproxy-1.0.4 "autoproxy::init standard, colons" -setup {
    packageReset
} -body {
    autoproxy::init http://localhost:13128 "hosta;hostb"
    list [autoproxy::cget -host] \
        [autoproxy::cget -port] \
        [autoproxy::cget -no_proxy]
} -result {localhost 13128 {hosta hostb}}

test autoproxy-1.1.0 "autoproxy::configure -host" -setup {
    packageReset
} -body {
    autoproxy::configure -host proxyhost
    autoproxy::cget -host
} -result {proxyhost}

test autoproxy-1.1.1 "autoproxy::configure -port" -setup {
    packageReset
} -body {
    autoproxy::configure -port 3128
    autoproxy::cget -port
} -result {3128}

test autoproxy-1.1.2 "autoproxy::configure -proxy_host" -setup {
    packageReset
} -body {
    autoproxy::configure -proxy_host proxyhost
    autoproxy::cget -proxy_host
} -result {proxyhost}

test autoproxy-1.1.3 "autoproxy::configure -proxy_port" -setup {
    packageReset
} -body {
    autoproxy::configure -proxy_port 3128
    autoproxy::cget -proxy_port
} -result {3128}

test autoproxy-1.1.4 "autoproxy::configure -no_proxy" -setup {
    packageReset
} -body {
    autoproxy::configure -no_proxy "localhost otherhost"
    autoproxy::cget -no_proxy
} -result {localhost otherhost}

test autoproxy-1.1.5 "autoproxy::configure -no_proxy override" -setup {
    packageReset
} -body {
    autoproxy::configure -no_proxy "localhost otherhost"
    autoproxy::configure -no_proxy "althost"
    autoproxy::cget -no_proxy
} -result {althost}

test autoproxy-1.1.6 "autoproxy::configure -authProc" -setup {
    packageReset
} -body {
    autoproxy::configure -authProc my_auth_proc
    autoproxy::cget -authProc
} -result {my_auth_proc}

test autoproxy-1.2.0 "autoproxy::configure -basic set details" -setup {
    packageReset
} -body {
    autoproxy::configure -basic -user test -password secret -realm tcllib
    autoproxy::cget -basic
} -result {Proxy-Authorization {Basic dGVzdDpzZWNyZXQ=}}

test autoproxy-1.2.1 "autoproxy::configure -basic confirm encoding" -setup {
    packageReset
} -body {
    autoproxy::configure -basic -user test -password secret -realm tcllib
    base64::decode [lindex [autoproxy::cget -basic] 1 1]
} -result {test:secret}

test autoproxy-1.2.2 "autoproxy::configure -basic reset" -setup {
    packageReset
    autoproxy::configure -basic -user test -password secret -realm tcllib
} -body {
    autoproxy::configure -basic --
    autoproxy::cget -basic
} -result {}

test autoproxy-1.2.3 "autoproxy::configure -basic reset (2)" -setup {
    packageReset
    autoproxy::configure -basic -user test -password secret -realm tcllib
} -body {
    autoproxy::configure -basic
    autoproxy::cget -basic
} -result {}

test autoproxy-1.2.4.0 "autoproxy::configure -tls_package tls" -setup {
    packageReset
} -body {
    autoproxy::configure -tls_package tls
    autoproxy::cget -tls_package
} -result tls

test autoproxy-1.2.4.1 "autoproxy::configure -tls_package twapi" -setup {
    packageReset
} -body {
    autoproxy::configure -tls_package twapi
    autoproxy::cget -tls_package
} -result twapi

test autoproxy-1.2.4.2 "autoproxy::configure -tls_package dummy" -setup {
    packageReset
} -body {
    autoproxy::configure -tls_package dummy
} -result "Invalid TLS package option 'dummy'. Must be 'tls' or 'twapi'" -returnCodes error

test autoproxy-2.0.0 "autoproxy::tls_socket (tls) with proxy" -constraints {
    have_tls
} -setup {
    packageReset
    package require http
    autoproxy::configure -proxy_host $proxy_host -proxy_port $proxy_port
} -body {
    http::register https 443 autoproxy::tls_socket
    set tok [http::geturl https://www.example.com]
    http::status $tok
} -cleanup {
    http::cleanup $tok
} -result ok

test autoproxy-2.0.1 "autoproxy::tls_socket (twapi) with proxy" -constraints {
    have_twapi
} -setup {
    packageReset
    package require http
    autoproxy::configure -proxy_host $proxy_host -proxy_port $proxy_port -tls_package twapi
} -body {
    http::register https 443 autoproxy::tls_socket
    set tok [http::geturl https://www.example.com]
    http::status $tok
} -cleanup {
    http::cleanup $tok
} -result ok

test autoproxy-2.1.0 "autoproxy::tls_socket (tls) without proxy" -constraints {
    have_tls
} -setup {
    packageReset
    package require http
    autoproxy::configure -proxy_host "" -proxy_port $proxy_port
} -body {
    http::register https 443 autoproxy::tls_socket
    set tok [http::geturl https://www.example.com]
    http::status $tok
} -cleanup {
    http::cleanup $tok
} -result ok

test autoproxy-2.1.1 "autoproxy::tls_socket (twapi) without proxy" -constraints {
    have_twapi
} -setup {
    packageReset
    package require http
    autoproxy::configure -proxy_host "" -proxy_port $proxy_port -tls_package twapi
} -body {
    http::register https 443 autoproxy::tls_socket
    set tok [http::geturl https://www.example.com]
    http::status $tok
} -cleanup {
    http::cleanup $tok
} -result ok

testsuiteCleanup

# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































Changes to modules/http/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded autoproxy 1.7 [list source [file join $dir autoproxy.tcl]]

|
1
2
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded autoproxy 1.5.3 [list source [file join $dir autoproxy.tcl]]

Deleted modules/httpd/assets/test_cgi.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/tclsh

puts stdout "Status: 200 OK"
if {$::env(CONTENT_LENGTH) > 0} {
  puts stdout "Content-Type: $::env(CONTENT_TYPE)"
  set dat [read stdin $::env(CONTENT_LENGTH)]
} else {
  puts stdout "Content-Type: text/plain"
  set dat "Hi!"
}
puts stdout "Content-Length: [string length $dat]"
puts stdout {}
puts stdout $dat
exit 0
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























Deleted modules/httpd/build/build.tcl.

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
89
90
91
92
set srcdir [file dirname [file normalize [file join [pwd] [info script]]]]
set moddir [file dirname $srcdir]

if {[file exists [file join $moddir .. .. scripts practcl.tcl]]} {
  source [file join $moddir .. .. scripts practcl.tcl]
} elseif {[file exists [file join $moddir .. practcl build doctool.tcl]]} {
  source [file join $moddir .. practcl build doctool.tcl]
} else {
  package require practcl 0.14
}

::practcl::doctool create AutoDoc
set version 4.3.5
set tclversion 8.6
set module [file tail $moddir]
set filename $module

set fout [open [file join $moddir ${filename}.tcl] w]
dict set modmap  %module% $module
dict set modmap  %version% $version
dict set modmap  %tclversion% $tclversion
dict set modmap  %filename% $filename

puts $fout [string map $modmap {###
# Amalgamated package for %module%
# Do not edit directly, tweak the source in src/ and rerun
# build.tcl
###
package require Tcl %tclversion%
package provide %module% %version%
namespace eval ::%module% {}
set ::%module%::version %version%}]

# Track what files we have included so far
set loaded {}
lappend loaded build.tcl cgi.tcl
# These files must be loaded in a particular order
foreach {file} {
  core.tcl
  reply.tcl
  server.tcl
  dispatch.tcl
  file.tcl
  proxy.tcl
  cgi.tcl
  scgi.tcl
  websocket.tcl
  plugin.tcl
} {
  lappend loaded $file
  puts $fout "###\n# START: [file tail $file]\n###"
  set content [::practcl::cat [file join $srcdir $file]]
  AutoDoc scan_text $content
  puts $fout [::practcl::docstrip $content]
  puts $fout "###\n# END: [file tail $file]\n###"
}
# These files can be loaded in any order
foreach file [glob [file join $srcdir *.tcl]] {
  if {[file tail $file] in $loaded} continue
  lappend loaded $file
  set fin [open [file join $srcdir $file] r]
  puts $fout "###\n# START: [file tail $file]\n###"
  set content [::practcl::cat [file join $srcdir $file]]
  AutoDoc scan_text $content
  puts $fout [::practcl::docstrip $content]
  puts $fout "###\n# END: [file tail $file]\n###"
}

# Provide some cleanup and our final package provide
puts $fout [string map $modmap {
    namespace eval ::%module% {
	namespace export *
    }
}]
close $fout

###
# Build our pkgIndex.tcl file
###
set fout [open [file join $moddir pkgIndex.tcl] w]
puts $fout [string map $modmap {
if {![package vsatisfies [package provide Tcl] %tclversion%]} {return}
package ifneeded %module% %version% [list source [file join $dir %module%.tcl]]
}]
close $fout

set manout [open [file join $moddir $filename.man] w]
puts $manout [AutoDoc manpage map $modmap \
  header [::practcl::cat [file join $srcdir manual.txt]] \
  footer [::practcl::cat [file join $srcdir footer.txt]] \
]
close $manout
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































Deleted modules/httpd/build/cgi.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
::clay::define ::httpd::content.cgi {
  superclass ::httpd::content.proxy

  method FileName {} {
    set uri [string trimleft [my request get REQUEST_PATH] /]
    set path [my clay get path]
    set prefix [my clay get prefix]

    set fname [string range $uri [string length $prefix] end]
    if {[file exists [file join $path $fname]]} {
      return [file join $path $fname]
    }
    if {[file exists [file join $path $fname.fossil]]} {
      return [file join $path $fname.fossil]
    }
    if {[file exists [file join $path $fname.fos]]} {
      return [file join $path $fname.fos]
    }
    if {[file extension $fname] in {.exe .cgi .tcl .pl .py .php}} {
      return $fname
    }
    return {}
  }

  method proxy_channel {} {
    ###
    # When delivering static content, allow web caches to save
    ###
    set local_file [my FileName]
    if {$local_file eq {} || ![file exist $local_file]} {
      my log httpNotFound [my request get REQUEST_PATH]
      my error 404 {Not Found}
      tailcall my DoOutput
    }
    if {[file isdirectory $local_file]} {
      ###
      # Produce an index page... or error
      ###
      tailcall my DirectoryListing $local_file
    }

    set verbatim {
      CONTENT_LENGTH CONTENT_TYPE QUERY_STRING REMOTE_USER AUTH_TYPE
      REQUEST_METHOD REMOTE_ADDR REMOTE_HOST REQUEST_URI REQUEST_PATH
      REQUEST_VERSION  DOCUMENT_ROOT QUERY_STRING REQUEST_RAW
      GATEWAY_INTERFACE SERVER_PORT SERVER_HTTPS_PORT
      SERVER_NAME  SERVER_SOFTWARE SERVER_PROTOCOL
    }
    foreach item $verbatim {
      set ::env($item) {}
    }
    foreach item [array names ::env HTTP_*] {
      set ::env($item) {}
    }
    set ::env(SCRIPT_NAME) [my request get REQUEST_PATH]
    set ::env(SERVER_PROTOCOL) HTTP/1.0
    set ::env(HOME) $::env(DOCUMENT_ROOT)
    foreach {f v} [my request dump] {
      set ::env($f) $v
    }
  	set arglist $::env(QUERY_STRING)
    set pwd [pwd]
    cd [file dirname $local_file]
    set script_file $local_file
    if {[file extension $local_file] in {.fossil .fos}} {
      if {![file exists $local_file.cgi]} {
        set fout [open $local_file.cgi w]
        chan puts $fout "#!/usr/bin/fossil"
        chan puts $fout "repository: $local_file"
        close $fout
      }
      set script_file $local_file.cgi
      set EXE [my Cgi_Executable fossil]
    } else {
      set EXE [my Cgi_Executable $local_file]
    }
    set ::env(PATH_TRANSLATED) $script_file
    set pipe [my CgiExec $EXE $script_file $arglist]
    cd $pwd
    return $pipe
  }

  method ProxyRequest {chana chanb} {
    chan event $chanb writable {}
    my log ProxyRequest {}
    set length [my request get CONTENT_LENGTH]
    if {$length} {
      chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
      chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
      ###
      # Send any POST/PUT/etc content
      ###
      my ChannelCopy $chana $chanb -size $length
    } else {
      chan flush $chanb
    }
    my clay refcount_incr
    chan event $chanb readable [info coroutine]
    yield
  }


  method ProxyReply {chana chanb args} {
    my log ProxyReply [list args $args]
    chan event $chana readable {}
    set replyhead [my HttpHeaders $chana]
    set replydat  [my MimeParse $replyhead]
    if {![dict exists $replydat Content-Length]} {
      set length 0
    } else {
      set length [dict get $replydat Content-Length]
    }
    ###
    # Convert the Status: header from the CGI process to
    # a standard service reply line from a web server, but
    # otherwise spit out the rest of the headers verbatim
    ###
    set replybuffer "HTTP/1.0 [dict get $replydat Status]\n"
    append replybuffer $replyhead
    chan configure $chanb -translation {auto crlf} -blocking 0 -buffering full -buffersize 4096
    chan puts $chanb $replybuffer
    ###
    # Output the body. With no -size flag, channel will copy until EOF
    ###
    chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
    my ChannelCopy $chana $chanb -chunk 4096
    my clay refcount_decr
  }

  ###
  # For most CGI applications a directory list is vorboten
  ###
  method DirectoryListing {local_file} {
    my error 403 {Not Allowed}
    tailcall my DoOutput
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































Deleted modules/httpd/build/content.man.

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
89
90
91
92
93
94
[section {Class ::httpd::content}]

The httpd module includes several ready to use implementations of content mixins
for common use cases. Options are passed in to the [cmd add_uri] method of the server.

[section {Class ::httpd::content.cgi}]

An implementation to relay requests to process which will accept post data
streamed in vie stdin, and sent a reply streamed to stdout.

[list_begin definitions]
[call method cgi_info]

Mandatory method to be replaced by the end user. If needed, activates the
process to proxy, and then returns a list of three values:

[arg exec] - The arguments to send to exec to fire off the responding process, minus the stdin/stdout redirection.

[list_end]

[section {Class ::httpd::content.file}]

An implementation to deliver files from the local file system.

[list_begin definitions]

[call option [cmd path]]

The root directory on the local file system to be exposed via http.

[call option [cmd prefix]]

The prefix of the URI portion to ignore when calculating relative file paths.
[list_end]

[section {Class ::httpd::content.proxy}]

An implementation to relay requests to another HTTP server, and relay
the results back across the request channel.

[list_begin definitions]
[call method proxy_info]

Mandatory method to be replaced by the end user. If needed, activates the
process to proxy, and then returns a list of three values:

[arg proxyhost] - The hostname where the proxy is located

[arg proxyport] - The port to connect to

[arg proxyscript] - A pre-amble block of text to send prior to the mirrored request

[list_end]

[section {Class ::httpd::content.scgi}]

An implementation to relay requests to a server listening on a socket
expecting SCGI encoded requests, and relay
the results back across the request channel.

[list_begin definitions]
[call method scgi_info]

Mandatory method to be replaced by the end user. If needed, activates the
process to proxy, and then returns a list of three values:

[arg scgihost] - The hostname where the scgi listener is located

[arg scgiport] - The port to connect to

[arg scgiscript] - The contents of the [arg SCRIPT_NAME] header to be sent

[list_end]

[section {Class ::httpd::content.websocket}]

A placeholder for a future implementation to manage requests that can expect to be
promoted to a Websocket. Currently it is an empty class.

[section {SCGI Server Functions}]

The HTTP module also provides an SCGI server implementation, as well as an HTTP
implementation. To use the SCGI functions, create an object of the [cmd http::server.scgi]
class instead of the [cmd http::server] class.

[section {Class ::httpd::reply.scgi}]

An modified [cmd http::reply] implementation that understands how to deal with
netstring encoded headers.

[section {Class ::httpd::server.scgi}]

A modified [cmd http::server] which is tailored to replying to request according to
the SCGI standard instead of the HTTP standard.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































Deleted modules/httpd/build/core.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
###
# Author: Sean Woods, yoda@etoyoc.com
##
# Adapted from the "minihttpd.tcl" file distributed with Tclhttpd
#
# The working elements have been updated to operate as a TclOO object
# running with Tcl 8.6+. Global variables and hard coded tables are
# now resident with the object, allowing this server to be more easily
# embedded another program, as well as be adapted and extended to
# support the SCGI module
###

package require uri
package require dns
package require cron
package require coroutine
package require mime
package require fileutil
package require websocket
package require Markdown
package require fileutil::magic::filetype
package require clay 0.7

namespace eval httpd::content {}

namespace eval ::url {}
namespace eval ::httpd {}
namespace eval ::scgi {}

if {
    [package vsatisfies [package require fileutil::magic::filetype] 2] ||
    [package vsatisfies [package require fileutil::magic::filetype] 1.2]
} {
    # v1.2+, v2+: filetype result structure was changed completely.
    proc ::httpd::mime-type {path} {
	join [lindex [::fileutil::magic::filetype $path] 1] /
    }
} else {
    # filetype result is mime type directly.
    proc ::httpd::mime-type {path} {
	::fileutil::magic::filetype $path
    }
}

###
# A metaclass for MIME handling behavior across a live socket
###
clay::define ::httpd::mime {

  method ChannelCopy {in out args} {
    try {
      my clay refcount_incr
      set chunk 4096
      set size -1
      foreach {f v} $args {
        set [string trim $f -] $v
      }
      dict set info coroutine [info coroutine]
      if {$size>0 && $chunk>$size} {
          set chunk $size
      }
      set bytes 0
      set sofar 0
      set method [self method]
      while 1 {
        set command {}
        set error {}
        if {$size>=0} {
          incr sofar $bytes
          set remaining [expr {$size-$sofar}]
          if {$remaining <= 0} {
            break
          } elseif {$chunk > $remaining} {
            set chunk $remaining
          }
        }
        lassign [yieldto chan copy $in $out -size $chunk \
          -command [list [info coroutine] $method]] \
          command bytes error
        if {$command ne $method} {
          error "Subroutine $method interrupted"
        }
        if {[string length $error]} {
          error $error
        }
        if {[chan eof $in]} {
          break
        }
      }
    } finally {
      my clay refcount_decr
    }
  }

  ###
  # Returns a block of HTML
  method html_header {{title {}} args} {
    set result {}
    append result "<!DOCTYPE html>\n<HTML><HEAD>"
    if {$title ne {}} {
      append result "<TITLE>$title</TITLE>"
    }
    if {[dict exists $args stylesheet]} {
      append result "<link rel=\"stylesheet\" href=\"[dict get $args stylesheet]\">"
    } else {
      append result "<link rel=\"stylesheet\" href=\"/style.css\">"
    }
    append result "</HEAD><BODY>"
    return $result
  }

  method html_footer {args} {
    return "</BODY></HTML>"
  }

  method http_code_string code {
    set codes {
      200 {Data follows}
      204 {No Content}
      301 {Moved Permanently}
      302 {Found}
      303 {Moved Temporarily}
      304 {Not Modified}
      307 {Moved Permanently}
      308 {Moved Temporarily}
      400 {Bad Request}
      401 {Authorization Required}
      403 {Permission denied}
      404 {Not Found}
      408 {Request Timeout}
      411 {Length Required}
      419 {Expectation Failed}
      500 {Server Internal Error}
      501 {Server Busy}
      503 {Service Unavailable}
      504 {Service Temporarily Unavailable}
      505 {HTTP Version Not Supported}
    }
    if {[dict exists $codes $code]} {
      return [dict get $codes $code]
    }
    return {Unknown Http Code}
  }

  method HttpHeaders {sock {debug {}}} {
    set result {}
    set LIMIT 8192
    ###
    # Set up a channel event to stream the data from the socket line by
    # line. When a blank line is read, the HttpHeaderLine method will send
    # a flag which will terminate the vwait.
    #
    # We do this rather than entering blocking mode to prevent the process
    # from locking up if it's starved for input. (Or in the case of the test
    # suite, when we are opening a blocking channel on the other side of the
    # socket back to ourselves.)
    ###
    chan configure $sock -translation {auto crlf} -blocking 0 -buffering line
    while 1 {
      set readCount [::coroutine::util::gets_safety $sock $LIMIT line]
      if {$readCount<=0} break
      append result $line \n
      if {[string length $result] > $LIMIT} {
        error {Headers too large}
      }
    }
    ###
    # Return our buffer
    ###
    return $result
  }

  method HttpHeaders_Default {} {
    return {Status {200 OK}
Content-Size 0
Content-Type {text/html; charset=UTF-8}
Cache-Control {no-cache}
Connection close}
  }

  method HttpServerHeaders {} {
    return {
      CONTENT_LENGTH CONTENT_TYPE QUERY_STRING REMOTE_USER AUTH_TYPE
      REQUEST_METHOD REMOTE_ADDR REMOTE_HOST REQUEST_URI REQUEST_PATH
      REQUEST_VERSION  DOCUMENT_ROOT QUERY_STRING REQUEST_RAW
      GATEWAY_INTERFACE SERVER_PORT SERVER_HTTPS_PORT
      SERVER_NAME  SERVER_SOFTWARE SERVER_PROTOCOL
    }
  }

  ###
  # Converts a block of mime encoded text to a key/value list. If an exception is encountered,
  # the method will generate its own call to the [cmd error] method, and immediately invoke
  # the [cmd output] method to produce an error code and close the connection.
  ###
  method MimeParse mimetext {
    set data(mimeorder) {}
    foreach line [split $mimetext \n] {
      # This regexp picks up
      # key: value
      # MIME headers.  MIME headers may be continue with a line
      # that starts with spaces or a tab
      if {[string length [string trim $line]]==0} break
      if {[regexp {^([^ :]+):[ 	]*(.*)} $line dummy key value]} {
        # The following allows something to
        # recreate the headers exactly
        lappend data(headerlist) $key $value
        # The rest of this makes it easier to pick out
        # headers from the data(mime,headername) array
        #set key [string tolower $key]
        if {[info exists data(mime,$key)]} {
          append data(mime,$key) ,$value
        } else {
          set data(mime,$key) $value
          lappend data(mimeorder) $key
        }
        set data(key) $key
      } elseif {[regexp {^[ 	]+(.*)}  $line dummy value]} {
        # Are there really continuation lines in the spec?
        if {[info exists data(key)]} {
          append data(mime,$data(key)) " " $value
        } else {
          error "INVALID HTTP HEADER FORMAT: $line"
        }
      } else {
        error "INVALID HTTP HEADER FORMAT: $line"
      }
    }
    ###
    # To make life easier for our SCGI implementation rig things
    # such that CONTENT_LENGTH is always first
    # Also map all headers specified in rfc2616 to their canonical case
    ###
    set result {}
    dict set result Content-Length 0
    foreach {key} $data(mimeorder) {
      set ckey $key
      switch [string tolower $key] {
        content-length {
          set ckey Content-Length
        }
        content-encoding {
          set ckey Content-Encoding
        }
        content-language {
          set ckey Content-Language
        }
        content-location {
          set ckey Content-Location
        }
        content-md5 {
          set ckey Content-MD5
        }
        content-range {
          set ckey Content-Range
        }
        content-type {
          set ckey Content-Type
        }
        expires {
          set ckey Expires
        }
        last-modified {
          set ckey Last-Modified
        }
        cookie {
          set ckey COOKIE
        }
        referer -
        referrer {
          # Standard misspelling in the RFC
          set ckey Referer
        }
      }
      dict set result $ckey $data(mime,$key)
    }
    return $result
  }

  # De-httpizes a string.
  method Url_Decode data {
    regsub -all {\+} $data " " data
    regsub -all {([][$\\])} $data {\\\1} data
    regsub -all {%([0-9a-fA-F][0-9a-fA-F])} $data  {[format %c 0x\1]} data
    return [subst $data]
  }

  method Url_PathCheck {urlsuffix} {
    set pathlist ""
    foreach part  [split $urlsuffix /] {
      if {[string length $part] == 0} {
        # It is important *not* to "continue" here and skip
        # an empty component because it could be the last thing,
        # /a/b/c/
        # which indicates a directory.  In this case you want
        # Auth_Check to recurse into the directory in the last step.
      }
      set part [Url_Decode $part]
    	# Disallow Mac and UNIX path separators in components
	    # Windows drive-letters are bad, too
 	    if {[regexp [/\\:] $part]} {
  	    error "URL components cannot include \ or :"
	    }
	    switch -- $part {
	      .  { }
    	  .. {
          set len [llength $pathlist]
          if {[incr len -1] < 0} {
            error "URL out of range"
          }
          set pathlist [lrange $pathlist 0 [incr len -1]]
        }
        default {
          lappend pathlist $part
        }
      }
    }
    return $pathlist
  }


  method wait {mode sock} {
    my clay refcount_incr
    if {[info coroutine] eq {}} {
      chan event $sock $mode [list set ::httpd::lock_$sock $mode]
      vwait ::httpd::lock_$sock
    } else {
      chan event $sock $mode [info coroutine]
      yield
    }
    chan event $sock $mode {}
    my clay refcount_decr
  }

}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































Deleted modules/httpd/build/cuneiform.tcl.

1

<


Deleted modules/httpd/build/dispatch.tcl.

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
::clay::define ::httpd::content.redirect {

  method reset {} {
    ###
    # Inject the location into the HTTP headers
    ###
    my variable reply_body
    set reply_body {}
    my reply replace    [my HttpHeaders_Default]
    my reply set Server [my <server> clay get server/ string]
    set msg [my clay get LOCATION]
    my reply set Location [my clay get LOCATION]
    set code  [my clay get REDIRECT_CODE]
    if {$code eq {}} {
      set code 301
    }
    my reply set Status [list $code [my http_code_string $code]]
  }

  method content {} {
    set template [my <server> template redirect]
    set msg [my clay get LOCATION]
    set HTTP_STATUS [my reply get Status]
    my puts [subst $msg]
  }
}

::clay::define ::httpd::content.cache {

  method Dispatch {} {
    my variable chan
    my wait writable $chan
    chan configure $chan  -translation {binary binary}
    chan puts -nonewline $chan [my clay get cache/ data]
  }
}

::clay::define ::httpd::content.template {

  method content {} {
    if {[my request get HTTP_STATUS] ne {}} {
      my reply set Status [my request get HTTP_STATUS]
    }
    set request [my request dump]
    dict with request {}
    my puts [subst [my <server> template [my clay get template]]]
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































Deleted modules/httpd/build/file.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
###
# Class to deliver Static content
# When utilized, this class is fed a local filename
# by the dispatcher
###
::clay::define ::httpd::content.file {

  method FileName {} {
    # Some dispatchers will inject a fully qualified name during discovery
    if {[my clay exists FILENAME] && [file exists [my clay get FILENAME]]} {
      my request set PREFIX_URI [file dirname [my clay get FILENAME]]
      return [my clay get FILENAME]
    }
    set uri [string trimleft [my request get REQUEST_PATH] /]
    set path [my clay get path]
    set prefix [my clay get prefix]
    set fname [string range $uri [string length $prefix] end]
    if {$fname in "{} index.html index.md index index.tml index.tcl"} {
      return $path
    }
    if {[file exists [file join $path $fname]]} {
      return [file join $path $fname]
    }
    if {[file exists [file join $path $fname.md]]} {
      return [file join $path $fname.md]
    }
    if {[file exists [file join $path $fname.html]]} {
      return [file join $path $fname.html]
    }
    if {[file exists [file join $path $fname.tml]]} {
      return [file join $path $fname.tml]
    }
    if {[file exists [file join $path $fname.tcl]]} {
      return [file join $path $fname.tcl]
    }
    return {}
  }

  method DirectoryListing {local_file} {
    set uri [string trimleft [my request get REQUEST_PATH] /]
    set path [my clay get path]
    set prefix [my clay get prefix]
    set fname [string range $uri [string length $prefix] end]
    my puts [my html_header "Listing of /$fname/"]
    my puts "Listing contents of /$fname/"
    my puts "<TABLE>"
    if {$prefix ni {/ {}}} {
      set updir [file dirname $prefix]
      if {$updir ne {}} {
        my puts "<TR><TD><a href=\"/$updir\">..</a></TD><TD></TD></TR>"
      }
    }
    foreach file [glob -nocomplain [file join $local_file *]] {
      if {[file isdirectory $file]} {
        my puts "<TR><TD><a href=\"[file join / $uri [file tail $file]]\">[file tail $file]/</a></TD><TD></TD></TR>"
      } else {
        my puts "<TR><TD><a href=\"[file join / $uri [file tail $file]]\">[file tail $file]</a></TD><TD>[file size $file]</TD></TR>"
      }
    }
    my puts "</TABLE>"
    my puts [my html_footer]
  }

  method content {} {
    my variable reply_file
    set local_file [my FileName]
    if {$local_file eq {} || ![file exist $local_file]} {
      my log httpNotFound [my request get REQUEST_PATH]
      my error 404 {File Not Found}
      tailcall my DoOutput
    }
    if {[file isdirectory $local_file] || [file tail $local_file] in {index index.html index.tml index.md}} {
      my request set PREFIX_URI [my request get REQUEST_PATH]
      my request set LOCAL_DIR $local_file
      ###
      # Produce an index page
      ###
      set idxfound 0
      foreach name {
        index.tcl
        index.html
        index.tml
        index.md
        index.info
        index.clay
        content.htm
      } {
        if {[file exists [file join $local_file $name]]} {
          set idxfound 1
          set local_file [file join $local_file $name]
          break
        }
      }
      if {!$idxfound} {
        tailcall my DirectoryListing $local_file
      }
    } else {
      my request set PREFIX_URI [file dirname [my request get REQUEST_PATH]]
      my request set LOCAL_DIR [file dirname $local_file]
    }
    my request set LOCAL_FILE $local_file

    switch [file extension $local_file] {
      .apng {
        my reply set Content-Type {image/apng}
        set reply_file $local_file
      }
      .bmp {
        my reply set Content-Type {image/bmp}
        set reply_file $local_file
      }
      .css {
        my reply set Content-Type {text/css}
        set reply_file $local_file
      }
      .gif {
        my reply set Content-Type {image/gif}
        set reply_file $local_file
      }
      .cur - .ico {
        my reply set Content-Type {image/x-icon}
        set reply_file $local_file
      }
      .jpg - .jpeg - .jfif - .pjpeg - .pjp {
        my reply set Content-Type {image/jpg}
        set reply_file $local_file
      }
      .js {
        my reply set Content-Type {text/javascript}
        set reply_file $local_file
      }
      .md {
        package require Markdown
        my reply set Content-Type {text/html; charset=UTF-8}
        set mdtxt  [::fileutil::cat $local_file]
        my puts [::Markdown::convert $mdtxt]
      }
      .png {
        my reply set Content-Type {image/png}
        set reply_file $local_file
      }
      .svgz -
      .svg {
        # FU magic screws it up
        my reply set Content-Type {image/svg+xml}
        set reply_file $local_file
      }
      .tcl {
        my reply set Content-Type {text/html; charset=UTF-8}
        try {
          source $local_file
        } on error {err errdat} {
          my error 500 {Internal Error} [dict get $errdat -errorinfo]
        }
      }
      .tiff {
        my reply set Content-Type {image/tiff}
        set reply_file $local_file
      }
      .tml {
        my reply set Content-Type {text/html; charset=UTF-8}
        set tmltxt  [::fileutil::cat $local_file]
        set headers [my request dump]
        dict with headers {}
        my puts [subst $tmltxt]
      }
      .txt {
        my reply set Content-Type {text/plain}
        set reply_file $local_file
      }
      .webp {
        my reply set Content-Type {image/webp}
        set reply_file $local_file
      }
      default {
        ###
        # Assume we are returning a binary file
        ###
        my reply set Content-Type [::httpd::mime-type $local_file]
        set reply_file $local_file
      }
    }
  }

  method Dispatch {} {
    my variable reply_body reply_file reply_chan chan
    try {
      my reset
      # Invoke the URL implementation.
      my content
    } on error {err errdat} {
      my error 500 $err [dict get $errdat -errorinfo]
      catch {
        tailcall my DoOutput
      }
    }
    if {$chan eq {}} return
    catch {
      # Causing random issues. Technically a socket is always open for read and write
      # anyway
      #my wait writable $chan
      if {![info exists reply_file]} {
        tailcall my DoOutput
      }
      chan configure $chan  -translation {binary binary}
      my log HttpAccess {}
      ###
      # Return a stream of data from a file
      ###
      set size [file size $reply_file]
      my reply set Content-Length $size
      append result [my reply output] \n
      chan puts -nonewline $chan $result
      set reply_chan [open $reply_file r]
      my ChannelRegister $reply_chan
      my log SendReply [list length $size]
      ###
      # Output the file contents. With no -size flag, channel will copy until EOF
      ###
      chan configure $reply_chan -translation {binary binary} -buffersize 4096 -buffering full -blocking 0
      if {$size < 40960} {
        # Raw copy small files
        chan copy $reply_chan $chan
      } else {
        my ChannelCopy $reply_chan $chan -chunk 4096
      }
    }
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































Deleted modules/httpd/build/footer.txt.

1
2
3
4
5
[section AUTHORS]
Sean Woods

[vset CATEGORY network]
[include ../common-text/feedback.inc]
<
<
<
<
<










Deleted modules/httpd/build/manual.txt.

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
[keywords WWW]
[copyright {2018 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Tcl Web Server}]
[titledesc {A TclOO and coroutine based web server}]
[category  Networking]
[keywords TclOO]
[keywords http]
[keywords httpd]
[keywords httpserver]
[keywords services]
[require Tcl 8.6]
[require uuid]
[require clay]
[require coroutine]
[require fileutil]
[require fileutil::magic::filetype]
[require websocket]
[require mime]
[require cron]
[require uri]
[require Markdown]
[description]
[para]

This module implements a web server, suitable for embedding in an
application. The server is object oriented, and contains all of the
fundamentals needed for a full service website.

[para]

[section {Minimal Example}]

Starting a web service requires starting a class of type
[cmd httpd::server], and providing that server with one or more URIs
to service, and [cmd httpd::reply] derived classes to generate them.

[example {
oo::class create ::reply.hello {
  method content {} {
    my puts "<HTML><HEAD><TITLE>IRM Dispatch Server</TITLE></HEAD><BODY>"
    my puts "<h1>Hello World!</h1>"
    my puts </BODY></HTML>
  }
}
::httpd::server create HTTPD port 8015 myaddr 127.0.0.1 doc_root ~/htdocs
HTTPD plugin dispatch httpd::server::dispatch
HTTPD uri add * /hello [list mixin reply.hello]
}]

The bare module does have facilities to hose a files from a file system. Files that end in a .tml will be substituted in the style of Tclhttpd:

[example {
<!-- hello.tml -->
[my html_header {Hello World!}]
Your Server is running.
<p>
The time is now [clock format [clock seconds]]
[my html_footer]
}]

A complete example of an httpd server is in the /examples directory of Tcllib. It also show how to dispatch URIs to other processes via SCGI and HTTP proxies.

[example {
cd ~/tcl/sandbox/tcllib
tclsh examples/httpd.tcl
}]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































Deleted modules/httpd/build/plugin.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
###
# httpd plugin template
###
::clay::define ::httpd::plugin {
  ###
  # Any options will be saved to the local config file
  # to allow threads to pull up a snapshot of the object' configuration
  ###

  ###
  # Define a code snippet to run on plugin load
  ###
  clay set plugin/ load {}

  ###
  # Define a code snippet to run within the object's Headers_Process method
  ###
  clay set plugin/ headers {}

  ###
  # Define a code snippet to run within the object's dispatch method
  ###
  clay set plugin/ dispatch {}

  ###
  # Define a code snippet to run within the object's writes a local config file
  ###
  clay set plugin/ local_config {}

  ###
  # When after all the plugins are loaded
  # allow specially configured ones to light off a thread
  ###
  clay set plugin/ thread {}

}

###
# A rudimentary plugin that dispatches URLs from a dict
# data structure
###
::clay::define ::httpd::plugin.dict_dispatch {
  clay set plugin/ dispatch {
    set reply [my Dispatch_Dict $data]
    if {[dict size $reply]} {
      return $reply
    }
  }

  ###
  # Implementation of the dispatcher
  ###
  method Dispatch_Dict {data} {
    my variable url_patterns
    set vhost [lindex [split [dict get $data http HTTP_HOST] :] 0]
    set uri   [dict get $data http REQUEST_PATH]
    foreach {host hostpat} $url_patterns {
      if {![string match $host $vhost]} continue
      foreach {pattern info} $hostpat {
        if {![string match $pattern $uri]} continue
        set buffer $data
        foreach {f v} $info {
          dict set buffer $f $v
        }
        return $buffer
      }
    }
    return {}
  }

  ###
  #
  Ensemble uri::add {vhosts patterns info} {
    my variable url_patterns
    foreach vhost $vhosts {
      foreach pattern $patterns {
        set data $info
        if {![dict exists $data prefix]} {
           dict set data prefix [my PrefixNormalize $pattern]
        }
        dict set url_patterns $vhost [string trimleft $pattern /] $data
      }
    }
  }

  Ensemble uri::direct {vhosts patterns info body} {
    my variable url_patterns url_stream
    set cbody {}
    if {[dict exists $info superclass]} {
      append cbody \n "superclass {*}[dict get $info superclass]"
      dict unset info superclass
    }
    append cbody \n [list method content {} $body]

    set class [namespace current]::${vhosts}/${patterns}
    set class [string map {* %} $class]
    ::clay::define $class $cbody
    dict set info mixin content $class
    my uri add $vhosts $patterns $info
  }
}

::clay::define ::httpd::reply.memchan {
  superclass ::httpd::reply

  method output {} {
    my variable reply_body
    return $reply_body
  }

  method DoOutput {} {}

  method close {} {
    # Neuter the channel closing mechanism we need the channel to stay alive
    # until the reader sucks out the info
  }
}


::clay::define ::httpd::plugin.local_memchan {

  clay set plugin/ load {
package require tcl::chan::events
package require tcl::chan::memchan
  }

  method local_memchan {command args} {
    my variable sock_to_coro
    switch $command {
      geturl {
        ###
        # Hook to allow a local process to ask for data without a socket
        ###
        set uuid [my Uuid_Generate]
        set ip 127.0.0.1
        set sock [::tcl::chan::memchan]
        set output [coroutine ::httpd::coro::$uuid {*}[namespace code [list my Connect_Local $uuid $sock GET {*}$args]]]
        return $output
      }
      default {
        error "Valid: connect geturl"
      }
    }
  }

  ###
  # A modified connection method that passes simple GET request to an object
  # and pulls data directly from the reply_body data variable in the object
  #
  # Needed because memchan is bidirectional, and we can't seem to communicate that
  # the server is one side of the link and the reply is another
  ###
  method Connect_Local {uuid sock args} {
    chan event $sock readable {}

    chan configure $sock \
      -blocking 0 \
      -translation {auto crlf} \
      -buffering line
    set ip 127.0.0.1
    dict set query UUID $uuid
    dict set query http UUID $uuid
    dict set query http HTTP_HOST       localhost
    dict set query http REMOTE_ADDR     127.0.0.1
    dict set query http REMOTE_HOST     localhost
    dict set query http LOCALHOST 1
    my counter url_hit

    dict set query http REQUEST_METHOD  [lindex $args 0]
    set uriinfo [::uri::split [lindex $args 1]]
    dict set query http REQUEST_URI     [lindex $args 1]
    dict set query http REQUEST_PATH    [dict get $uriinfo path]
    dict set query http REQUEST_VERSION [lindex [split [lindex $args end] /] end]
    dict set query http DOCUMENT_ROOT   [my clay get server/ doc_root]
    dict set query http QUERY_STRING    [dict get $uriinfo query]
    dict set query http REQUEST_RAW     $args
    dict set query http SERVER_PORT     [my port_listening]
    my Headers_Process query
    set reply [my dispatch $query]

    if {[llength $reply]==0} {
      my log BadLocation $uuid $query
      my log BadLocation $uuid $query
      dict set query http HTTP_STATUS 404
      dict set query template notfound
      dict set query mixin reply ::httpd::content.template
    }

    set class ::httpd::reply.memchan
    set pageobj [$class create ::httpd::object::$uuid [self]]
    if {[dict exists $reply mixin]} {
      set mixinmap [dict get $reply mixin]
    } else {
      set mixinmap {}
    }
    foreach item [dict keys $reply MIXIN_*] {
      set slot [string range $reply 6 end]
      dict set mixinmap [string tolower $slot] [dict get $reply $item]
    }
    $pageobj clay mixinmap {*}$mixinmap
    if {[dict exists $reply delegate]} {
      $pageobj clay delegate {*}[dict get $reply delegate]
    }
    $pageobj dispatch $sock $reply
    set output [$pageobj output]
    $pageobj clay refcount_decr
    return $output
  }
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































Deleted modules/httpd/build/proxy.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
::clay::define ::httpd::content.exec {
  variable exename [list tcl [info nameofexecutable] .tcl [info nameofexecutable]]

  method CgiExec {execname script arglist} {
    if { $::tcl_platform(platform) eq "windows"} {
      if {[file extension $script] eq ".exe"} {
        return [open "|[list $script] $arglist" r+]
      } else {
        if {$execname eq {}} {
          set execname [my Cgi_Executable $script]
        }
        return [open "|[list $execname $script] $arglist" r+]
      }
    } else {
      if {$execname eq {}} {
        return [open "|[list $script] $arglist 2>@1" r+]
      } else {
        return [open "|[list $execname $script] $arglist 2>@1" r+]
      }
    }
    error "CGI Not supported"
  }

  method Cgi_Executable {script} {
    if {[string tolower [file extension $script]] eq ".exe"} {
      return $script
    }
    my variable exename
    set ext [file extension $script]
    if {$ext eq {}} {
      set which [file tail $script]
    } else {
      if {[dict exists exename $ext]} {
        return [dict get $exename $ext]
      }
      switch $ext {
        .pl {
          set which perl
        }
        .py {
          set which python
        }
        .php {
          set which php
        }
        .fossil - .fos {
          set which fossil
        }
        default {
          set which tcl
        }
      }
      if {[dict exists exename $which]} {
        set result [dict get $exename $which]
        dict set exename $ext $result
        return $result
      }
    }
    if {[dict exists exename $which]} {
      return [dict get $exename $which]
    }
    if {$which eq "tcl"} {
      if {[my clay get tcl_exe] ne {}} {
        dict set exename $which [my clay get tcl_exe]
      } else {
        dict set exename $which [info nameofexecutable]
      }
    } else {
      if {[my clay get ${which}_exe] ne {}} {
        dict set exename $which [my clay get ${which}_exe]
      } elseif {"$::tcl_platform(platform)" == "windows"} {
        dict set exename $which $which.exe
      } else {
        dict set exename $which $which
      }
    }
    set result [dict get $exename $which]
    if {$ext ne {}} {
      dict set exename $ext $result
    }
    return $result
  }
}

###
# Return data from an proxy process
###
::clay::define ::httpd::content.proxy {
  superclass ::httpd::content.exec

  method proxy_channel {} {
    ###
    # This method returns a channel to the
    # proxied socket/stdout/etc
    ###
    error unimplemented
  }

  method proxy_path {} {
    set uri [string trimleft [my request get REQUEST_URI] /]
    set prefix [my clay get prefix]
    return /[string range $uri [string length $prefix] end]
  }

  method ProxyRequest {chana chanb} {
    chan event $chanb writable {}
    my log ProxyRequest {}
    chan puts $chanb "[my request get REQUEST_METHOD] [my proxy_path]"
    set mimetxt [my clay get mimetxt]
    chan puts $chanb [my clay get mimetxt]
    set length [my request get CONTENT_LENGTH]
    if {$length} {
      chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
      chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
      ###
      # Send any POST/PUT/etc content
      ###
      my ChannelCopy $chana $chanb -size $length
    } else {
      chan flush $chanb
    }
    chan event $chanb readable [info coroutine]
    yield
  }

  method ProxyReply {chana chanb args} {
    my log ProxyReply [list args $args]
    chan event $chana readable {}
    set readCount [::coroutine::util::gets_safety $chana 4096 reply_status]
    set replyhead [my HttpHeaders $chana]
    set replydat  [my MimeParse $replyhead]

    ###
    # Read the first incoming line as the HTTP reply status
    # Return the rest of the headers verbatim
    ###
    set replybuffer "$reply_status\n"
    append replybuffer $replyhead
    chan configure $chanb -translation {auto crlf} -blocking 0 -buffering full -buffersize 4096
    chan puts $chanb $replybuffer
    ###
    # Output the body. With no -size flag, channel will copy until EOF
    ###
    chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
    my ChannelCopy $chana $chanb -chunk 4096
  }

  method Dispatch {} {
    my variable sock chan
    if {[catch {my proxy_channel} sock errdat]} {
      my error 504 {Service Temporarily Unavailable} [dict get $errdat -errorinfo]
      tailcall my DoOutput
    }
    if {$sock eq {}} {
      my error 404 {Not Found}
      tailcall my DoOutput
    }
    my log HttpAccess {}
    chan event $sock writable [info coroutine]
    yield
    my ChannelRegister $sock
    my ProxyRequest $chan $sock
    my ProxyReply   $sock $chan
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































Deleted modules/httpd/build/reply.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
[section {Class ::httpd::reply}]

A class which shephards a request through the process of generating a
reply.

The socket associated with the reply is available at all times as the [arg chan]
variable.

The process of generating a reply begins with an [cmd httpd::server] generating a
[cmd http::class] object, mixing in a set of behaviors and then invoking the reply
object's [cmd dispatch] method.

In normal operations the [cmd dispatch] method:

[list_begin enumerated]

[enum]
Invokes the [cmd reset] method for the object to populate default headers.

[enum]
Invokes the [cmd HttpHeaders] method to stream the MIME headers out of the socket

[enum]
Invokes the [cmd {request parse}] method to convert the stream of MIME headers into a
dict that can be read via the [cmd request] method.

[enum]
Stores the raw stream of MIME headers in the [arg rawrequest] variable of the object.

[enum]
Invokes the [cmd content] method for the object, generating an call to the [cmd error]
method if an exception is raised.

[enum]
Invokes the [cmd output] method for the object
[list_end]

[para]

[section {Reply Method Ensembles}]

The [cmd http::reply] class and its derivatives maintain several variables as dictionaries
internally. Access to these dictionaries is managed through a dedicated ensemble. The
ensemble implements most of the same behaviors as the [cmd dict] command.

Each ensemble implements the following methods above, beyond, or modifying standard dicts:

[list_begin definitions]

[call method [cmd ENSEMBLE::add] [arg field] [arg element]]

Add [arg element] to a list stored in [arg field], but only if it is not already present om the list.

[call method [cmd ENSEMBLE::dump]]

Return the current contents of the data structure as a key/value list.

[call method [cmd ENSEMBLE::get] [arg field]]

Return the value of the field [arg field], or an empty string if it does not exist.

[call method [cmd ENSEMBLE::reset]]

Return a key/value list of the default contents for this data structure.

[call method [cmd ENSEMBLE::remove] [arg field] [arg element]]

Remove all instances of [arg element] from the list stored in [arg field].

[call method [cmd ENSEMBLE::replace] [arg keyvaluelist]]

Replace the internal dict with the contents of [arg keyvaluelist]

[call method [cmd ENSEMBLE::reset]]

Replace the internal dict with the default state.

[call method [cmd ENSEMBLE::set] [arg field] [arg value]]

Set the value of [arg field] to [arg value].

[list_end]

[section {Reply Method Ensemble: http_info}]

Manages HTTP headers passed in by the server.

Ensemble Methods:

[list_begin definitions]

[call method [cmd http_info::netstring]]

Return the contents of this data structure as a netstring encoded block.

[list_end]

[section {Reply Method Ensemble: request}]

Managed data from MIME headers of the request.

[list_begin definitions]

[call method  [cmd request::parse] [arg string]]

Replace the contents of the data structure with information encoded in a MIME
formatted block of text ([arg string]).

[list_end]

[section {Reply Method Ensemble: reply}]

Manage the headers sent in the reply.


[list_begin definitions]

[call method [cmd reply::output]]

Return the contents of this data structure as a MIME encoded block appropriate
for an HTTP response.

[list_end]

[section {Reply Methods}]

[list_begin definitions]
[call method [cmd close]]

Terminate the transaction, and close the socket.

[call method [cmd HttpHeaders] [arg sock] [arg ?debug?]]

Stream MIME headers from the socket [arg sock], stopping at an empty line. Returns
the stream as a block of text.

[call method [cmd ChannelRegister] [arg chan]]

Registers a channel that will need to be flushed and closed when the object's destructor
invokes the close method.

[call method [cmd dispatch] [arg newsock] [arg datastate]]

Take over control of the socket [arg newsock], and store that as the [arg chan] variable
for the object. This method runs through all of the steps of reading HTTP headers, generating
content, and closing the connection. (See class writetup).

[call method [cmd error] [arg code] [arg ?message?] [arg ?errorInfo?]]

Generate an error message of the specified [arg code], and display the [arg message] as the
reason for the exception. [arg errorInfo] is passed in from calls, but how or if it should be
displayed is a prerogative of the developer.

[call method [cmd content]]

Generate the content for the reply. This method is intended to be replaced by the mixin.

Developers have the option of streaming output to a buffer via the [cmd puts] method of the
reply, or simply populating the [arg reply_body] variable of the object.
The information returned by the [cmd content] method is not interpreted in any way.

If an exception is thrown (via the [cmd error] command in Tcl, for example) the caller will
auto-generate a 500 {Internal Error} message.

A typical implementation of [cmd content] look like:

[example {

tool::define ::test::content.file {
	superclass ::httpd::content.file
	# Return a file
	# Note: this is using the content.file mixin which looks for the reply_file variable
	# and will auto-compute the Content-Type
	method content {} {
	  my reset
    set doc_root [my http_info get doc_root]
    my variable reply_file
    set reply_file [file join $doc_root index.html]
	}
}
tool::define ::test::content.time {
  # return the current system time
	method content {} {
		my variable reply_body
    my reply set Content-Type text/plain
		set reply_body [clock seconds]
	}
}
tool::define ::test::content.echo {
	method content {} {
		my variable reply_body
    my reply set Content-Type [my request get CONTENT_TYPE]
		set reply_body [my PostData [my request get CONTENT_LENGTH]]
	}
}
tool::define ::test::content.form_handler {
	method content {} {
	  set form [my FormData]
	  my reply set Content-Type {text/html; charset=UTF-8}
    my puts [my html header {My Dynamic Page}]
    my puts "<BODY>"
    my puts "You Sent<p>"
    my puts "<TABLE>"
    foreach {f v} $form {
      my puts "<TR><TH>$f</TH><TD><verbatim>$v</verbatim></TD>"
    }
    my puts "</TABLE><p>"
    my puts "Send some info:<p>"
    my puts "<FORM action=/[my http_info get REQUEST_PATH] method POST>"
    my puts "<TABLE>"
    foreach field {name rank serial_number} {
      set line "<TR><TH>$field</TH><TD><input name=\"$field\" "
      if {[dict exists $form $field]} {
        append line " value=\"[dict get $form $field]\"""
      }
      append line " /></TD></TR>"
      my puts $line
    }
    my puts "</TABLE>"
    my puts [my html footer]
	}
}

}]

[call method [cmd EncodeStatus] [arg status]]

Formulate a standard HTTP status header from he string provided.

[call method FormData]

For GET requests, converts the QUERY_DATA header into a key/value list.

For POST requests, reads the Post data and converts that information to
a key/value list for application/x-www-form-urlencoded posts. For multipart
posts, it composites all of the MIME headers of the post to a singular key/value
list, and provides MIME_* information as computed by the [cmd mime] package, including
the MIME_TOKEN, which can be fed back into the mime package to read out the contents.

[call method MimeParse [arg mimetext]]

Converts a block of mime encoded text to a key/value list. If an exception is encountered,
the method will generate its own call to the [cmd error] method, and immediately invoke
the [cmd output] method to produce an error code and close the connection.

[call method [cmd DoOutput]]

Generates the the HTTP reply, and streams that reply back across [arg chan].

[call method PostData [arg length]]

Stream [arg length] bytes from the [arg chan] socket, but only of the request is a
POST or PUSH. Returns an empty string otherwise.

[call method [cmd puts] [arg string]]

Appends the value of [arg string] to the end of [arg reply_body], as well as a trailing newline
character.

[call method [cmd reset]]

Clear the contents of the [arg reply_body] variable, and reset all headers in the [cmd reply]
structure back to the defaults for this object.

[call method [cmd timeOutCheck]]

Called from the [cmd http::server] object which spawned this reply. Checks to see
if too much time has elapsed while waiting for data or generating a reply, and issues
a timeout error to the request if it has, as well as destroy the object and close the
[arg chan] socket.

[call method [cmd timestamp]]

Return the current system time in the format: [example {%a, %d %b %Y %T %Z}]

[call method [cmd Url_Decode] [arg string]]

De-httpizes a string.

[list_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































Deleted modules/httpd/build/reply.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
###
# A class which shephards a request through the process of generating a
# reply.
#
# The socket associated with the reply is available at all times as the [arg chan]
# variable.
#
# The process of generating a reply begins with an [cmd httpd::server] generating a
# [cmd http::class] object, mixing in a set of behaviors and then invoking the reply
# object's [cmd dispatch] method.
#
# In normal operations the [cmd dispatch] method:
#
# [list_begin enumerated]
# [enum]
# Invokes the [cmd reset] method for the object to populate default headers.
# [enum]
# Invokes the [cmd HttpHeaders] method to stream the MIME headers out of the socket
# [enum]
# Invokes the [cmd {request parse}] method to convert the stream of MIME headers into a
# dict that can be read via the [cmd request] method.
# [enum]
# Stores the raw stream of MIME headers in the [arg rawrequest] variable of the object.
# [enum]
# Invokes the [cmd content] method for the object, generating an call to the [cmd error]
# method if an exception is raised.
# [enum]
# Invokes the [cmd output] method for the object
# [list_end]
# [para]
#
# Developers have the option of streaming output to a buffer via the [cmd puts] method of the
# reply, or simply populating the [arg reply_body] variable of the object.
# The information returned by the [cmd content] method is not interpreted in any way.
#
# If an exception is thrown (via the [cmd error] command in Tcl, for example) the caller will
# auto-generate a 500 {Internal Error} message.
#
# A typical implementation of [cmd content] look like:
#
# [example {
#
# clay::define ::test::content.file {
# 	superclass ::httpd::content.file
# 	# Return a file
# 	# Note: this is using the content.file mixin which looks for the reply_file variable
# 	# and will auto-compute the Content-Type
# 	method content {} {
# 	  my reset
#     set doc_root [my request get DOCUMENT_ROOT]
#     my variable reply_file
#     set reply_file [file join $doc_root index.html]
# 	}
# }
# clay::define ::test::content.time {
#   # return the current system time
# 	method content {} {
# 		my variable reply_body
#     my reply set Content-Type text/plain
# 		set reply_body [clock seconds]
# 	}
# }
# clay::define ::test::content.echo {
# 	method content {} {
# 		my variable reply_body
#     my reply set Content-Type [my request get CONTENT_TYPE]
# 		set reply_body [my PostData [my request get CONTENT_LENGTH]]
# 	}
# }
# clay::define ::test::content.form_handler {
# 	method content {} {
# 	  set form [my FormData]
# 	  my reply set Content-Type {text/html; charset=UTF-8}
#     my puts [my html_header {My Dynamic Page}]
#     my puts "<BODY>"
#     my puts "You Sent<p>"
#     my puts "<TABLE>"
#     foreach {f v} $form {
#       my puts "<TR><TH>$f</TH><TD><verbatim>$v</verbatim></TD>"
#     }
#     my puts "</TABLE><p>"
#     my puts "Send some info:<p>"
#     my puts "<FORM action=/[my request get REQUEST_PATH] method POST>"
#     my puts "<TABLE>"
#     foreach field {name rank serial_number} {
#       set line "<TR><TH>$field</TH><TD><input name=\"$field\" "
#       if {[dict exists $form $field]} {
#         append line " value=\"[dict get $form $field]\"""
#       }
#       append line " /></TD></TR>"
#       my puts $line
#     }
#     my puts "</TABLE>"
#     my puts [my html footer]
# 	}
# }
#
# }]
###
::clay::define ::httpd::reply {
  superclass ::httpd::mime
  Variable ChannelRegister {}

  Delegate <server> {
    description {The server object which spawned this reply}
  }

  ###
  # A dictionary which will converted into the MIME headers of the reply
  ###
  Dict reply {}

  ###
  # A dictionary containing the SCGI transformed HTTP headers for the request
  ###
  Dict request {
    CONTENT_LENGTH 0
    COOKIE {}
    HTTP_HOST {}
    REFERER {}
    REQUEST_URI {}
    REMOTE_ADDR {}
    REMOTE_HOST {}
    USER_AGENT {}
    SESSION {}
  }

  constructor {ServerObj args} {
    my variable dispatched_time uuid
    set uuid [namespace tail [self]]
    set dispatched_time [clock milliseconds]
    my clay delegate <server> $ServerObj
    foreach {field value} [::clay::args_to_options {*}$args] {
      my clay set config $field: $value
    }
  }

  ###
  # clean up on exit
  ###
  destructor {
    my close
  }

  # Registers a channel to be closed by the close method
  method ChannelRegister args {
    my variable ChannelRegister
    if {![info exists ChannelRegister]} {
      set ChannelRegister {}
    }
    foreach c $args {
      if {$c ni $ChannelRegister} {
        lappend ChannelRegister $c
      }
    }
  }

  ###
  # Close channels opened by this object
  ###
  method close {} {
    my variable ChannelRegister
    if {![info exists ChannelRegister]} {
      return
    }
    foreach c $ChannelRegister {
      catch {chan event $c readable {}}
      catch {chan event $c writable {}}
      catch {chan flush $c}
      catch {chan close $c}
    }
    set ChannelRegister {}
  }

  ###
  # Record a dispatch event
  ###
  method Log_Dispatched {} {
    my log Dispatched [dict create \
     REMOTE_ADDR [my request get REMOTE_ADDR] \
     REMOTE_HOST [my request get REMOTE_HOST] \
     COOKIE [my request get HTTP_COOKIE] \
     REFERER [my request get HTTP_REFERER] \
     USER_AGENT [my request get HTTP_USER_AGENT] \
     REQUEST_URI [my request get REQUEST_URI] \
     HTTP_HOST [my request get HTTP_HOST] \
     SESSION [my request get SESSION] \
    ]
  }

  ###
  # Accept the handoff from the server object of the socket
  # [emph newsock] and feed it the state [emph datastate].
  # Fields the [emph datastate] are looking for in particular are:
  # [para]
  # * [const mixin] - A key/value list of slots and classes to be mixed into the
  # object prior to invoking [cmd Dispatch].
  # [para]
  # * [const http] - A key/value list of values to populate the object's [emph request]
  # ensemble
  # [para]
  # All other fields are passed along to the [method clay] structure of the object.
  ###
  method dispatch {newsock datastate} {
    my variable chan request
    try {
      my clay refcount_incr
      set chan $newsock
      my ChannelRegister $chan
      chan event $chan readable {}
      chan configure $chan -translation {auto crlf} -buffering line
      if {[dict exists $datastate mixin]} {
        set mixinmap [dict get $datastate mixin]
      } else {
        set mixinmap {}
      }
      foreach item [dict keys $datastate MIXIN_*] {
        set slot [string range $item 6 end]
        dict set mixinmap [string tolower $slot] [dict get $datastate $item]
      }
      my clay mixinmap {*}$mixinmap
      if {[dict exists $datastate delegate]} {
        my clay delegate {*}[dict get $datastate delegate]
      }
      my reset
      set request [my clay get dict/ request]
      foreach {f v} $datastate {
        if {[string index $f end] eq "/"} {
          catch {my clay merge $f $v}
        } else {
          my clay set $f $v
        }
        if {$f eq "http"} {
          foreach {ff vf} $v {
            dict set request $ff $vf
          }
        }
      }
      my Session_Load
      my Log_Dispatched
      my Dispatch
    } on error {err errdat} {
      my error 500 $err [dict get $errdat -errorinfo]
      my DoOutput
    } finally {
      my close
      my clay refcount_decr
    }
  }

  method Dispatch {} {
    # Invoke the URL implementation.
    my content
    my DoOutput
  }

  method html_header {title args} {
    set result {}
    append result "<HTML><HEAD>"
    if {$title ne {}} {
      append result "<TITLE>$title</TITLE>"
    }
    append result "</HEAD><BODY>"
    append result \n {<div id="top-menu">}
    if {[dict exists $args banner]} {
      append result "<img src=\"[dict get $args banner]\">"
    } else {
      append result {<img src="/images/etoyoc-banner.jpg">}
    }
    append result {</div>}
    if {[dict exists $args sideimg]} {
      append result "\n<div name=\"sideimg\"><img align=right src=\"[dict get $args sideimg]\"></div>"
    }
    append result {<div id="content">}
    return $result
  }

  method html_footer {args} {
    set result {</div><div id="footer">}
    append result {</div></BODY></HTML>}
  }

  method error {code {msg {}} {errorInfo {}}} {
    my clay set  HTTP_ERROR $code
    my reset
    set qheaders [my clay dump]
    set HTTP_STATUS "$code [my http_code_string $code]"
    dict with qheaders {}
    my reply replace {}
    my reply set Status $HTTP_STATUS
    my reply set Content-Type {text/html; charset=UTF-8}
    switch $code {
      301 - 302 - 303 - 307 - 308 {
        my reply set Location $msg
        set template [my <server> template redirect]
      }
      404 {
        set template [my <server> template notfound]
      }
      default {
        set template [my <server> template internal_error]
      }
    }
    my puts [subst $template]
  }


  ###
  # REPLACE ME:
  # This method is the "meat" of your application.
  # It writes to the result buffer via the "puts" method
  # and can tweak the headers via "clay put header_reply"
  ###
  method content {} {
    my puts [my html_header {Hello World!}]
    my puts "<H1>HELLO WORLD!</H1>"
    my puts [my html_footer]
  }

  ###
  # Formulate a standard HTTP status header from he string provided.
  ###
  method EncodeStatus {status} {
    return "HTTP/1.0 $status"
  }

  method log {type {info {}}} {
    my variable dispatched_time uuid
    my <server> log $type $uuid $info
  }

  method CoroName {} {
    if {[info coroutine] eq {}} {
      return ::httpd::object::[my clay get UUID]
    }
  }

  ###
  # Generates the the HTTP reply, streams that reply back across [arg chan],
  # and destroys the object.
  ###
  method DoOutput {} {
    my variable reply_body chan
    if {$chan eq {}} return
    catch {
      # Causing random issues. Technically a socket is always open for read and write
      # anyway
      #my wait writable $chan
      chan configure $chan  -translation {binary binary}
      ###
      # Return dynamic content
      ###
      set length [string length $reply_body]
      set result {}
      if {${length} > 0} {
        my reply set Content-Length [string length $reply_body]
        append result [my reply output] \n
        append result $reply_body
      } else {
        append result [my reply output]
      }
      chan puts -nonewline $chan $result
      my log HttpAccess {}
    }
  }

  ###
  # For GET requests, converts the QUERY_DATA header into a key/value list.
  #
  # For POST requests, reads the Post data and converts that information to
  # a key/value list for application/x-www-form-urlencoded posts. For multipart
  # posts, it composites all of the MIME headers of the post to a singular key/value
  # list, and provides MIME_* information as computed by the [cmd mime] package, including
  # the MIME_TOKEN, which can be fed back into the mime package to read out the contents.
  ###
  method FormData {} {
    my variable chan formdata
    # Run this only once
    if {[info exists formdata]} {
      return $formdata
    }
    set length [my request get CONTENT_LENGTH]
    set formdata {}
    if {[my request get REQUEST_METHOD] in {"POST" "PUSH"}} {
      set rawtype [my request get CONTENT_TYPE]
      if {[string toupper [string range $rawtype 0 8]] ne "MULTIPART"} {
        set type $rawtype
      } else {
        set type multipart
      }
      switch $type {
        multipart {
          ###
          # Ok, Multipart MIME is troublesome, farm out the parsing to a dedicated tool
          ###
          set body [my clay get mimetxt]
          append body \n [my PostData $length]
          set token [::mime::initialize -string $body]
          foreach item [::mime::getheader $token -names] {
            dict set formdata $item [::mime::getheader $token $item]
          }
          foreach item {content encoding params parts size} {
            dict set formdata MIME_[string toupper $item] [::mime::getproperty $token $item]
          }
          dict set formdata MIME_TOKEN $token
        }
        application/x-www-form-urlencoded {
          # These foreach loops are structured this way to ensure there are matched
          # name/value pairs.  Sometimes query data gets garbled.
          set body [my PostData $length]
          set result {}
          foreach pair [split $body "&"] {
            foreach {name value} [split $pair "="] {
              lappend formdata [my Url_Decode $name] [my Url_Decode $value]
            }
          }
        }
      }
    } else {
      foreach pair [split [my request get QUERY_STRING] "&"] {
        foreach {name value} [split $pair "="] {
          lappend formdata [my Url_Decode $name] [my Url_Decode $value]
        }
      }
    }
    return $formdata
  }

  # Stream [arg length] bytes from the [arg chan] socket, but only of the request is a
  # POST or PUSH. Returns an empty string otherwise.
  method PostData {length} {
    my variable postdata
    # Run this only once
    if {[info exists postdata]} {
      return $postdata
    }
    set postdata {}
    if {[my request get REQUEST_METHOD] in {"POST" "PUSH"}} {
      my variable chan
      chan configure $chan -translation binary -blocking 0 -buffering full -buffersize 4096
      set postdata [::coroutine::util::read $chan $length]
    }
    return $postdata
  }

  # Manage session data
  method Session_Load {} {}

  # Appends the value of [arg string] to the end of [arg reply_body], as well as a trailing newline
  # character.
  method puts line {
    my variable reply_body
    append reply_body $line \n
  }

  method RequestFind {field} {
    my variable request
    if {[dict exists $request $field]} {
      return $field
    }
    foreach item [dict keys $request] {
      if {[string tolower $item] eq [string tolower $field]} {
        return $item
      }
    }
    return $field
  }

  method request {subcommand args} {
    my variable request
    switch $subcommand {
      dump {
        return $request
      }
      field {
        tailcall my RequestFind [lindex $args 0]
      }
      get {
        set field [my RequestFind [lindex $args 0]]
        if {![dict exists $request $field]} {
          return {}
        }
        tailcall dict get $request $field
      }
      getnull {
        set field [my RequestFind [lindex $args 0]]
        if {![dict exists $request $field]} {
          return {}
        }
        tailcall dict get $request $field
      }
      exists {
        set field [my RequestFind [lindex $args 0]]
        tailcall dict exists $request $field
      }
      parse {
        if {[catch {my MimeParse [lindex $args 0]} result]} {
          my error 400 $result
          tailcall my DoOutput
        }
        set request $result
      }
      replace {
        set request [lindex $args 0]
      }
      set {
        dict set request {*}$args
      }
      default {
        error "Unknown command $subcommand. Valid: field, get, getnull, exists, parse, replace, set"
      }
    }
  }

  method reply {subcommand args} {
    my variable reply
    switch $subcommand {
      dump {
        return $reply
      }
      exists {
        return [dict exists $reply {*}$args]
      }
      get -
      getnull {
        return [dict getnull $reply {*}$args]
      }
      replace {
        set reply [my HttpHeaders_Default]
        if {[llength $args]==1} {
          foreach {f v} [lindex $args 0] {
            dict set reply $f $v
          }
        } else {
          foreach {f v} $args {
            dict set reply $f $v
          }
        }
      }
      output {
        set result {}
        if {![dict exists $reply Status]} {
          set status {200 OK}
        } else {
          set status [dict get $reply Status]
        }
        set result "[my EncodeStatus $status]\n"
        foreach {f v} $reply {
          if {$f in {Status}} continue
          append result "[string trimright $f :]: $v\n"
        }
        #append result \n
        return $result
      }
      set {
        dict set reply {*}$args
      }
      default {
        error "Unknown command $subcommand. Valid: exists, get, getnull, output, replace, set"
      }
    }
  }

  # Clear the contents of the [arg reply_body] variable, and reset all headers in the [cmd reply]
  # structure back to the defaults for this object.
  method reset {} {
    my variable reply_body
    my reply replace    [my HttpHeaders_Default]
    my reply set Server [my <server> clay get server/ string]
    my reply set Date [my timestamp]
    set reply_body {}
  }

  # Called from the [cmd http::server] object which spawned this reply. Checks to see
  # if too much time has elapsed while waiting for data or generating a reply, and issues
  # a timeout error to the request if it has, as well as destroy the object and close the
  # [arg chan] socket.
  method timeOutCheck {} {
    my variable dispatched_time
    if {([clock seconds]-$dispatched_time)>120} {
      ###
      # Something has lasted over 2 minutes. Kill this
      ###
      catch {
        my error 408 {Request Timed out}
        my DoOutput
      }
    }
  }

  ###
  # Return the current system time in the format: [example {%a, %d %b %Y %T %Z}]
  ###
  method timestamp {} {
    return [clock format [clock seconds] -format {%a, %d %b %Y %T %Z}]
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/httpd/build/scgi.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
###
# Return data from an SCGI process
###
::clay::define ::httpd::protocol.scgi {

  method EncodeStatus {status} {
    return "Status: $status"
  }
}

::clay::define ::httpd::content.scgi {
  superclass ::httpd::content.proxy


  method scgi_info {} {
    ###
    # This method should check if a process is launched
    # or launch it if needed, and return a list of
    # HOST PORT SCRIPT_NAME
    ###
    # return {localhost 8016 /some/path}
    error unimplemented
  }

  method proxy_channel {} {
    set sockinfo [my scgi_info]
    if {$sockinfo eq {}} {
      my error 404 {Not Found}
      tailcall my DoOutput
    }
    lassign $sockinfo scgihost scgiport scgiscript
    my clay set  SCRIPT_NAME $scgiscript
    if {![string is integer $scgiport]} {
      my error 404 {Not Found}
      tailcall my DoOutput
    }
    return [::socket $scgihost $scgiport]
  }

  method ProxyRequest {chana chanb} {
    chan event $chanb writable {}
    my log ProxyRequest {}
    chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
    set info [dict create CONTENT_LENGTH 0 SCGI 1.0 SCRIPT_NAME [my clay get SCRIPT_NAME]]
    foreach {f v} [my request dump] {
      dict set info $f $v
    }
    set length [dict get $info CONTENT_LENGTH]
    set block {}
    foreach {f v} $info {
      append block [string toupper $f] \x00 $v \x00
    }
    chan puts -nonewline $chanb "[string length $block]:$block,"
    # Light off another coroutine
    #set cmd [list coroutine [my CoroName] {*}[namespace code [list my ProxyReply $chanb $chana]]]
    if {$length} {
      chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
      chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
      ###
      # Send any POST/PUT/etc content
      ###
      my ChannelCopy $chana $chanb -size $length
      #chan copy $chana $chanb -size $length -command [info coroutine]
    } else {
      chan flush $chanb
    }
    chan event $chanb readable [info coroutine]
    yield
  }

  method ProxyReply {chana chanb args} {
    my log ProxyReply [list args $args]
    chan event $chana readable {}
    set replyhead [my HttpHeaders $chana]
    set replydat  [my MimeParse $replyhead]
    ###
    # Convert the Status: header from the CGI process to
    # a standard service reply line from a web server, but
    # otherwise spit out the rest of the headers verbatim
    ###
    set replybuffer "HTTP/1.0 [dict get $replydat Status]\n"
    append replybuffer $replyhead
    chan configure $chanb -translation {auto crlf} -blocking 0 -buffering full -buffersize 4096
    chan puts $chanb $replybuffer
    ###
    # Output the body. With no -size flag, channel will copy until EOF
    ###
    chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
    my ChannelCopy $chana $chanb -chunk 4096
  }
}

###
# Act as an  SCGI Server
###
::clay::define ::httpd::server.scgi {
  superclass ::httpd::server

  clay set socket/ buffersize   32768
  clay set socket/ blocking     0
  clay set socket/ translation  {binary binary}

  method debug args {
    puts $args
  }

  method Connect {uuid sock ip} {
    yield [info coroutine]
    chan event $sock readable {}
    chan configure $sock \
        -blocking 1 \
        -translation {binary binary} \
        -buffersize 4096 \
        -buffering none
    my counter url_hit
    try {
      # Read the SCGI request on byte at a time until we reach a ":"
      dict set query http HTTP_HOST {}
      dict set query http CONTENT_LENGTH 0
      dict set query http REQUEST_URI /
      dict set query http REMOTE_ADDR $ip
      dict set query http DOCUMENT_ROOT [my clay get server/ doc_root]
      set size {}
      while 1 {
        set char [::coroutine::util::read $sock 1]
        if {[chan eof $sock]} {
          catch {close $sock}
          return
        }
        if {$char eq ":"} break
        append size $char
      }
      # With length in hand, read the netstring encoded headers
      set inbuffer [::coroutine::util::read $sock [expr {$size+1}]]
      chan configure $sock -translation {auto crlf} -blocking 0 -buffersize 4096 -buffering full
      foreach {f v} [lrange [split [string range $inbuffer 0 end-1] \0] 0 end-1] {
        dict set query http $f $v
      }
      if {![dict exists $query http REQUEST_PATH]} {
        set uri [dict get $query http REQUEST_URI]
        set uriinfo [::uri::split $uri]
        dict set query http REQUEST_PATH    [dict get $uriinfo path]
      }
      set reply [my dispatch $query]
    } on error {err errdat} {
      my debug [list uri: [dict getnull $query http REQUEST_URI] ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      my log BadRequest $uuid [list ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      catch {chan puts $sock "HTTP/1.0 400 Bad Request (The data is invalid)"}
      catch {chan event readable $sock {}}
      catch {chan event writeable $sock {}}
      catch {chan close $sock}
      return
    }
    if {[dict size $reply]==0} {
      my log BadLocation $uuid $query
      dict set query http HTTP_STATUS 404
      dict set query template notfound
      dict set query mixin reply ::httpd::content.template
    }
    try {
      set pageobj [::httpd::reply create ::httpd::object::$uuid [self]]
      dict set reply mixin protocol ::httpd::protocol.scgi
      $pageobj dispatch $sock $reply
    } on error {err errdat} {
      my debug [list ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      my log BadRequest $uuid [list ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      $pageobj clay refcount_decr
      catch {chan event readable $sock {}}
      catch {chan event writeable $sock {}}
      catch {chan close $sock}
      return
    }
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































Deleted modules/httpd/build/server.man.

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
89
90
91
92
93
94
95
96
97
[section {Class ::httpd::server}]

This class is the root object of the webserver. It is responsible
for opening the socket and providing the initial connection negotiation.

[list_begin definitions]
[call constructor ?port [opt port]? ?myaddr [opt ipaddr]|all? ?server_string [opt string]? ?server_name [opt string]?]
Build a new server object. [opt port] is the port to listen on

[call method [cmd add_uri] [arg pattern] [arg dict]]
Set the hander for a URI pattern. Information given in the [arg dict] is stored
in the data structure the [cmd dispatch] method uses. If a field called
[arg mixin] is given, that class will be mixed into the reply object immediately
after construction.

[call method [cmd connect] [arg sock] [arg ip] [arg port]]

Reply to an open socket. This method builds a coroutine to manage the remainder
of the connection. The coroutine's operations are driven by the [cmd Connect] method.

[call method [cmd Connect] [arg uuid] [arg sock] [arg ip]]

This method reads HTTP headers, and then consults the [cmd dispatch] method to
determine if the request is valid, and/or what kind of reply to generate. Under
normal cases, an object of class [cmd ::http::reply] is created.

Fields the server are looking for in particular are:

class: A class to use instead of the server's own [arg reply_class]

mixin: A class to be mixed into the new object after construction.

All other fields are passed along to the [cmd http_info] structure of the
reply object.

After the class is created and the mixin is mixed in, the server invokes the
reply objects [cmd dispatch] method. This action passes control of the socket to
the reply object. The reply object manages the rest of the transaction, including
closing the socket.

[call method [cmd counter] [arg which]]

Increment an internal counter.

[call method [cmd CheckTimeout]]

Check open connections for a time out event.

[call method [cmd dispatch] [arg header_dict]]

Given a key/value list of information, return a data structure describing how
the server should reply.

[call method [cmd log] [arg args]]

Log an event. The input for args is free form. This method is intended
to be replaced by the user, and is a noop for a stock http::server object.

[call method [cmd port_listening]]

Return the actual port that httpd is listening on.

[call method [cmd PrefixNormalize] [arg prefix]]

For the stock version, trim trailing /'s and *'s from a prefix. This
method can be replaced by the end user to perform any other transformations
needed for the application.

[call method [cmd start]]

Open the socket listener.

[call method [cmd stop]]

Shut off the socket listener, and destroy any pending replies.

[call method [cmd template] [arg page]]

Return a template for the string [arg page]

[call method [cmd TemplateSearch] [arg page]]

Perform a search for the template that best matches [arg page]. This
can include local file searches, in-memory structures, or even
database lookups. The stock implementation simply looks for files
with a .tml or .html extension in the [opt doc_root] directory.

[call method [cmd Validate_Connection] [arg sock] [arg ip]]


Given a socket and an ip address, return true if this connection should
be terminated, or false if it should be allowed to continue. The stock
implementation always returns 0. This is intended for applications to
be able to implement black lists and/or provide security based on IP
address.

[list_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































Deleted modules/httpd/build/server.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
###
# An httpd server with a template engine and a shim to insert URL domains.
#
# This class is the root object of the webserver. It is responsible
# for opening the socket and providing the initial connection negotiation.
###
namespace eval ::httpd::object {}
namespace eval ::httpd::coro {}

::clay::define ::httpd::server {
  superclass ::httpd::mime

  clay set server/ port auto
  clay set server/ myaddr 127.0.0.1
  clay set server/ string [list TclHttpd $::httpd::version]
  clay set server/ name [info hostname]
  clay set server/ doc_root {}
  clay set server/ reverse_dns 0
  clay set server/ configuration_file {}
  clay set server/ protocol {HTTP/1.1}

  clay set socket/ buffersize   32768
  clay set socket/ translation  {auto crlf}
  clay set reply_class ::httpd::reply

  Array template
  Dict url_patterns {}

  constructor {
  {args {
    port        {default auto      comment {Port to listen on}}
    myaddr      {default 127.0.0.1 comment {IP address to listen on. "all" means all}}
    string      {default auto      comment {Value for SERVER_SOFTWARE in HTTP headers}}
    name        {default auto      comment {Value for SERVER_NAME in HTTP headers. Defaults to [info hostname]}}
    doc_root    {default {}        comment {File path to serve.}}
    reverse_dns {default 0         comment {Perform reverse DNS to convert IPs into hostnames}}
    configuration_file {default {} comment {Configuration file to load into server namespace}}
    protocol    {default {HTTP/1.1} comment {Value for SERVER_PROTOCOL in HTTP headers}}
  }}} {
    if {[llength $args]==1} {
      set arglist [lindex $args 0]
    } else {
      set arglist $args
    }
    foreach {var val} $arglist {
      my clay set server/ $var $val
    }
    my start
  }

  destructor {
    my stop
  }

  ###
  # Reply to an open socket. This method builds a coroutine to manage the remainder
  # of the connection. The coroutine's operations are driven by the [cmd Connect] method.
  ###
  method connect {sock ip port} {
    ###
    # If an IP address is blocked drop the
    # connection
    ###
    if {[my Validate_Connection $sock $ip]} {
      catch {close $sock}
      return
    }
    set uuid [my Uuid_Generate]
    set coro [coroutine ::httpd::coro::$uuid {*}[namespace code [list my Connect $uuid $sock $ip]]]
    chan event $sock readable $coro
  }

  method ServerHeaders {ip http_request mimetxt} {
    set result {}
    dict set result HTTP_HOST {}
    dict set result CONTENT_LENGTH 0
    foreach {f v} [my MimeParse $mimetxt] {
      set fld [string toupper [string map {- _} $f]]
      if {$fld in {CONTENT_LENGTH CONTENT_TYPE}} {
        set qfld $fld
      } else {
        set qfld HTTP_$fld
      }
      dict set result $qfld $v
    }
    dict set result REMOTE_ADDR     $ip
    dict set result REMOTE_HOST     [my HostName $ip]
    dict set result REQUEST_METHOD  [lindex $http_request 0]
    set uriinfo [::uri::split [lindex $http_request 1]]
    dict set result uriinfo $uriinfo
    dict set result REQUEST_URI     [lindex $http_request 1]
    dict set result REQUEST_PATH    [dict get $uriinfo path]
    dict set result REQUEST_VERSION [lindex [split [lindex $http_request end] /] end]
    dict set result DOCUMENT_ROOT   [my clay get server/ doc_root]
    dict set result QUERY_STRING    [dict get $uriinfo query]
    dict set result REQUEST_RAW     $http_request
    dict set result SERVER_PORT     [my port_listening]
    dict set result SERVER_NAME     [my clay get server/ name]
    dict set result SERVER_PROTOCOL [my clay get server/ protocol]
    dict set result SERVER_SOFTWARE [my clay get server/ string]
    if {[string match 127.* $ip]} {
      dict set result LOCALHOST [expr {[lindex [split [dict getnull $result HTTP_HOST] :] 0] eq "localhost"}]
    }
    return $result
  }

  ###
  # This method reads HTTP headers, and then consults the [cmd dispatch] method to
  # determine if the request is valid, and/or what kind of reply to generate. Under
  # normal cases, an object of class [cmd ::http::reply] is created, and that class's
  # [cmd dispatch] method.
  # This action passes control of the socket to
  # the reply object. The reply object manages the rest of the transaction, including
  # closing the socket.
  ###
  method Connect {uuid sock ip} {
    ::clay::cleanup
    yield [info coroutine]
    chan event $sock readable {}
    chan configure $sock \
      -blocking 0 \
      -translation {auto crlf} \
      -buffering line
    my counter url_hit
    try {
      set readCount [::coroutine::util::gets_safety $sock 4096 http_request]
      set mimetxt [my HttpHeaders $sock]
      dict set query UUID $uuid
      dict set query mimetxt $mimetxt
      dict set query mixin style [my clay get server/ style]
      dict set query http [my ServerHeaders $ip $http_request $mimetxt]
      my Headers_Process query
      set reply [my dispatch $query]
    } on error {err errdat} {
      my debug [list uri: [dict getnull $query REQUEST_URI] ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      my log BadRequest $uuid [list ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      catch {chan puts $sock "HTTP/1.0 400 Bad Request (The data is invalid)"}
      catch {chan close $sock}
      return
    }
    if {[dict size $reply]==0} {
      set reply $query
      my log BadLocation $uuid $query
      dict set reply http HTTP_STATUS {404 Not Found}
      dict set reply template notfound
      dict set reply mixin reply ::httpd::content.template
    }
    set pageobj [::httpd::reply create ::httpd::object::$uuid [self]]
    tailcall $pageobj dispatch $sock $reply
  }

  # Increment an internal counter.
  method counter which {
    my variable counters
    incr counters($which)
  }

  ###
  # Check open connections for a time out event.
  ###
  method CheckTimeout {} {
    foreach obj [info commands ::httpd::object::*] {
      try {
        $obj timeOutCheck
      } on error {} {
        $obj clay refcount_decr
      }
    }
    ::clay::cleanup
  }

  method debug args {}

  ###
  # Given a key/value list of information, return a data structure describing how
  # the server should reply.
  ###
  method dispatch {data} {
    set reply [my Dispatch_Local $data]
    if {[dict size $reply]} {
      return $reply
    }
    return [my Dispatch_Default $data]
  }

  ###
  # Method dispatch method of last resort before returning a 404 NOT FOUND error.
  # The default behavior is to look for a file in [emph DOCUMENT_ROOT] which
  # matches the query.
  ###
  method Dispatch_Default {reply} {
    ###
    # Fallback to docroot handling
    ###
    set doc_root [dict getnull $reply http DOCUMENT_ROOT]
    if {$doc_root ne {}} {
      ###
      # Fall back to doc_root handling
      ###
      dict set reply prefix {}
      dict set reply path $doc_root
      dict set reply mixin reply httpd::content.file
      return $reply
    }
    return {}
  }

  ###
  # Method dispatch method invoked prior to invoking methods implemented by plugins.
  # If this method returns a non-empty dictionary, that structure will be passed to
  # the reply. The default is an empty implementation.
  ###
  method Dispatch_Local data {}

  ###
  # Introspect and possibly modify a data structure destined for a reply. This
  # method is invoked before invoking Header methods implemented by plugins.
  # The default implementation is empty.
  ###
  method Headers_Local {varname} {}

  ###
  # Introspect and possibly modify a data structure destined for a reply. This
  # method is built dynamically by the [cmd plugin] method.
  ###
  method Headers_Process varname {}

  ###
  # Convert an ip address to a host name. If the server/ reverse_dns flag
  # is false, this method simply returns the IP address back.
  # Internally, this method uses the [emph dns] module from tcllib.
  ###
  method HostName ipaddr {
    if {![my clay get server/ reverse_dns]} {
      return $ipaddr
    }
    set t [::dns::resolve $ipaddr]
    set result [::dns::name $t]
    ::dns::cleanup $t
    return $result
  }

  ###
  # Log an event. The input for args is free form. This method is intended
  # to be replaced by the user, and is a noop for a stock http::server object.
  ###
  method log args {
    # Do nothing for now
  }

  ###
  # Incorporate behaviors from a plugin.
  # This method dynamically rebuilds the [cmd Dispatch] and [cmd Headers]
  # method. For every plugin, the server looks for the following entries in
  # [emph "clay plugin/"]:
  # [para]
  # [emph load] - A script to invoke in the server's namespace during the [cmd plugin] method invokation.
  # [para]
  # [emph dispatch] - A script to stitch into the server's [cmd Dispatch] method.
  # [para]
  # [emph headers] - A script to stitch into the server's [cmd Headers] method.
  # [para]
  # [emph thread] - A script to stitch into the server's [cmd Thread_start] method.
  ###
  method plugin {slot {class {}}} {
    if {$class eq {}} {
      set class ::httpd::plugin.$slot
    }
    if {[info command $class] eq {}} {
      error "Class $class for plugin $slot does not exist"
    }
    my clay mixinmap $slot $class
    set mixinmap [my clay mixinmap]

    ###
    # Perform action on load
    ###
    set script [$class clay search plugin/ load]
    eval $script

    ###
    # rebuild the dispatch method
    ###
    set body "\n try \{"
    append body \n {
  set reply [my Dispatch_Local $data]
  if {[dict size $reply]} {return $reply}
}

    foreach {slot class} $mixinmap {
      set script [$class clay search plugin/ dispatch]
      if {[string length $script]} {
        append body \n "# SLOT $slot"
        append body \n $script
      }
    }
    append body \n {  return [my Dispatch_Default $data]}
    append body \n "\} on error \{err errdat\} \{"
    append body \n {  puts [list DISPATCH ERROR [dict get $errdat -errorinfo]] ; return {}}
    append body \n "\}"
    oo::objdefine [self] method dispatch data $body
    ###
    # rebuild the Headers_Process method
    ###
    set body "\n try \{"
    append body \n "  upvar 1 \$varname query"
    append body \n {  my Headers_Local query}
    foreach {slot class} $mixinmap {
      set script [$class clay search plugin/ headers]
      if {[string length $script]} {
        append body \n "# SLOT $slot"
        append body \n $script
      }
    }
    append body \n "\} on error \{err errdat\} \{"
    append body \n {  puts [list HEADERS ERROR [dict get $errdat -errorinfo]] ; return {}}
    append body \n "\}"

    oo::objdefine [self] method Headers_Process varname $body

    ###
    # rebuild the Threads_Start method
    ###
    set body "\n try \{"
    foreach {slot class} $mixinmap {
      set script [$class clay search plugin/ thread]
      if {[string length $script]} {
        append body \n "# SLOT $slot"
        append body \n $script
      }
    }
    append body \n "\} on error \{err errdat\} \{"
    append body \n {  puts [list THREAD START ERROR [dict get $errdat -errorinfo]] ; return {}}
    append body \n "\}"
    oo::objdefine [self] method Thread_start {} $body
  }

  # Return the actual port that httpd is listening on.
  method port_listening {} {
    my variable port_listening
    return $port_listening
  }

  # For the stock version, trim trailing /'s and *'s from a prefix. This
  # method can be replaced by the end user to perform any other transformations
  # needed for the application.
  method PrefixNormalize prefix {
    set prefix [string trimright $prefix /]
    set prefix [string trimright $prefix *]
    set prefix [string trimright $prefix /]
    return $prefix
  }

  method source {filename} {
    source $filename
  }

  # Open the socket listener.
  method start {} {
    # Build a namespace to contain replies
    namespace eval [namespace current]::reply {}

    my variable socklist port_listening
    if {[my clay get server/ configuration_file] ne {}} {
      source [my clay get server/ configuration_file]
    }
    set port [my clay get server/ port]
    if { $port in {auto {}} } {
      package require nettool
      set port [::nettool::allocate_port 8015]
    }
    set port_listening $port
    set myaddr [my clay get server/ myaddr]
    my debug [list [self] listening on $port $myaddr]

    if {$myaddr ni {all any * {}}} {
      foreach ip $myaddr {
        lappend socklist [socket -server [namespace code [list my connect]] -myaddr $ip $port]
      }
    } else {
      lappend socklist [socket -server [namespace code [list my connect]] $port]
    }
    ::cron::every [self] 120 [namespace code {my CheckTimeout}]
    my Thread_start
  }

  # Shut off the socket listener, and destroy any pending replies.
  method stop {} {
    my variable socklist
    if {[info exists socklist]} {
      foreach sock $socklist {
        catch {close $sock}
      }
    }
    set socklist {}
    ::cron::cancel [self]
  }

  Ensemble SubObject::db {} {
    return [namespace current]::Sqlite_db
  }
  Ensemble SubObject::default {} {
    return [namespace current]::$method
  }

  # Return a template for the string [arg page]
  method template page {
    my variable template
    if {[info exists template($page)]} {
      return $template($page)
    }
    set template($page) [my TemplateSearch $page]
    return $template($page)
  }

  # Perform a search for the template that best matches [arg page]. This
  # can include local file searches, in-memory structures, or even
  # database lookups. The stock implementation simply looks for files
  # with a .tml or .html extension in the [opt doc_root] directory.
  method TemplateSearch page {
    set doc_root [my clay get server/ doc_root]
    if {$doc_root ne {} && [file exists [file join $doc_root $page.tml]]} {
      return [::fileutil::cat [file join $doc_root $page.tml]]
    }
    if {$doc_root ne {} && [file exists [file join $doc_root $page.html]]} {
      return [::fileutil::cat [file join $doc_root $page.html]]
    }
    switch $page {
      redirect {
return {
[my html_header "$HTTP_STATUS"]
The page you are looking for: <b>[my request get REQUEST_PATH]</b> has moved.
<p>
If your browser does not automatically load the new location, it is
<a href=\"$msg\">$msg</a>
[my html_footer]
}
      }
      internal_error {
        return {
[my html_header "$HTTP_STATUS"]
Error serving <b>[my request get REQUEST_PATH]</b>:
<p>
The server encountered an internal server error: <pre>$msg</pre>
<pre><code>
$errorInfo
</code></pre>
[my html_footer]
        }
      }
      notfound {
        return {
[my html_header "$HTTP_STATUS"]
The page you are looking for: <b>[my request get REQUEST_PATH]</b> does not exist.
[my html_footer]
        }
      }
    }
  }

  ###
  # Built by the [cmd plugin] method. Called by the [cmd start] method. Intended
  # to allow plugins to spawn worker threads.
  ###
  method Thread_start {} {}

  ###
  # Generate a GUUID. Used to ensure every request has a unique ID.
  # The default implementation is:
  # [example {
  #   return [::clay::uuid generate]
  # }]
  ###
  method Uuid_Generate {} {
    return [::clay::uuid::short]
  }

  ###
  # Given a socket and an ip address, return true if this connection should
  # be terminated, or false if it should be allowed to continue. The stock
  # implementation always returns 0. This is intended for applications to
  # be able to implement black lists and/or provide security based on IP
  # address.
  ###
  method Validate_Connection {sock ip} {
    return 0
  }
}

###
# Provide a backward compadible alias
###
::clay::define ::httpd::server::dispatch {
    superclass ::httpd::server
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/httpd/build/websocket.tcl.

1
2
3
4
5
6
###
# Upgrade a connection to a websocket
###
::clay::define ::httpd::content.websocket {

}
<
<
<
<
<
<












Added modules/httpd/content.tcl.

























































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
###
# Standard library of HTTP/SCGI content
# Each of these classes are intended to be mixed into
# either an HTTPD or SCGI reply
###
package require Markdown
package require fileutil::magic::filetype
package require tool 0.4
package require fileutil
namespace eval httpd::content {}

###
# Class to deliver Static content
# When utilized, this class is fed a local filename
# by the dispatcher
###
::tool::define ::httpd::content::file {
  
  method FileName {} {
    set uri [string trimleft [my query_headers get REQUEST_URI] /]
    set path [my query_headers get path]
    set prefix [my query_headers get prefix]
    set fname [string range $uri [string length $prefix] end]
    if {$fname in "{} index.html index.md index"} {
      return $path
    }
    if {[file exists [file join $path $fname]]} {
      return [file join $path $fname]
    }
    if {[file exists [file join $path $fname.md]]} {
      return [file join $path $fname.md]
    }
    if {[file exists [file join $path $fname.html]]} {
      return [file join $path $fname.html]
    }
    if {[file exists [file join $path $fname.tml]]} {
      return [file join $path $fname.tml]
    }
    return {}
  }
  
  
  method DirectoryListing {local_file} {
    my puts "<HTML><BODY><TABLE>"
    foreach file [glob -nocomplain [file join $local_file *]] {
      my puts "<TR><TD><a href=\"[file tail $file]\">[file tail $file]</a></TD><TD>[file size $file]</TD></TR>"
    }
    my puts "</TABLE></BODY></HTML>"
  }
  
  method dispatch {newsock datastate} {
    # No need to process the rest of the headers
    my variable chan dipatched_time
    set dispatched_time [clock seconds]
    my query_headers replace $datastate
    set chan $newsock
    my content
    my output
  }

  method content {} {
    my reset
    ###
    # When delivering static content, allow web caches to save
    ###
    my reply_headers set Cache-Control: {max-age=3600}
    my variable reply_file
    set local_file [my FileName]
    if {$local_file eq {} || ![file exist $local_file]} {
      my <server> log httpNotFound [my query_headers get REQUEST_URI]
       tailcall my error 404 {Not Found}
    }
    if {[file isdirectory $local_file]} {
      ###
      # Produce an index page
      ###
      set idxfound 0
      foreach name {
        index.html
        index.tml
        index.md
      } {
        if {[file exists [file join $local_file $name]]} {
          set idxfound 1
          set local_file [file join $local_file $name]
          break
        }
      }
      if {!$idxfound} {
        tailcall DirectoryListing $local_file
      }
    }
    switch [file extension $local_file] {
      .md {
        package require Markdown
        my reply_headers set Content-Type: {text/html; charset=ISO-8859-1}
        set mdtxt  [::fileutil::cat $local_file]
        my puts [::Markdown::convert $mdtxt]
      }
      .tml {
        my reply_headers set Content-Type: {text/html; charset=ISO-8859-1}
        set tmltxt  [::fileutil::cat $local_file]
        set headers [my query_headers dump]
        dict with headers {}
        my puts [subst $tmltxt]        
      }
      default {
        ###
        # Assume we are returning a binary file
        ###
        my reply_headers set Content-Type: [::fileutil::magic::filetype $local_file]
        set reply_file $local_file
      }
    }
  }

  ###
  # Output the result or error to the channel
  # and destroy this object
  ###
  method DoOutput {} {
    my variable chan
    chan event $chan writable {}
    my variable reply_body reply_file reply_chan chan
    chan configure $chan  -translation {binary binary}

    set headers [my reply_headers dump]
    if {[dict exists $headers Status:]} {
      set result "[my EncodeStatus [dict get $headers Status:]]\n"
    } else {
      set result "[my EncodeStatus {505 Internal Error}]\n"

    }
    foreach {key value} $headers {
      # Ignore Status and Content-length, if given
      if {$key in {Status: Content-length:}} continue
      append result "$key $value" \n
    }
    if {![info exists reply_file] || [string length $reply_body]} {
      ###
      # Return dynamic content
      ###
      set reply_body [string trim $reply_body]
      append result "Content-length: [string length $reply_body]" \n \n
      append result $reply_body
      chan puts -nonewline $chan $result
      chan flush $chan    
      my destroy
    } else {
      ###
      # Return a stream of data from a file
      ###
      set size [file size $reply_file]
      append result "Content-length: $size" \n \n
      chan puts -nonewline $chan $result
      set reply_chan [open $reply_file r]
      chan configure $reply_chan  -translation {binary binary}
      chan copy $reply_chan $chan -command [namespace code [list my TransferComplete $reply_chan]]
    }
  }
}


###
# Return data from an SCGI process
###
::tool::define ::httpd::content::scgi {

  method scgi_info {} {
    ###
    # This method should check if a process is launched
    # or launch it if needed, and return a list of
    # HOST PORT SCRIPT_NAME
    ###
    # return {localhost 8016 /some/path}
    error unimplemented
  }
  
  method content {} {
    my variable sock chan
    set sockinfo [my scgi_info]
    if {$sockinfo eq {}} {
      my error 404 {Not Found}
      return
    }
    lassign $sockinfo scgihost scgiport scgiscript
    set sock [::socket $scgihost $scgiport]
    # Add a few headers that SCGI needs
    #my query_headers set SERVER_NAME [my <server> cget server_name]
    my query_headers set SCRIPT_NAME $scgiscript
    my query_headers set SCGI 1.0    
    #my query_headers set SERVER_PORT [my <server> port_listening]
    #set ::env(SCRIPT_NAME) $scgiscript
      ::puts {HEADERS} 
      foreach {field element} [my query_headers dump] { 
        ::puts [list $field $element]
      }
    chan configure $chan -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $sock -translation binary -blocking 0 -buffering full -buffersize 4096
    ###
    # Convert our query headers into netstring format. Note that
    # MimeParse as already rigged it such that CONTENT_LENGTH is first
    # and always populated (even if zero), per SCGI requirements
    ###
    set block [my query_headers netstring]
    chan puts -nonewline $sock $block
    set length [my query_headers get CONTENT_LENGTH]
    if {$length} {
      ###
      # Send any POST/PUT/etc content
      ###
      chan copy $chan $sock -size $length
    }
    chan flush $sock
    ###
    # Wake this object up after the SCGI process starts to respond
    ###
    #chan configure $sock -translation {auto crlf} -blocking 0 -buffering line
    chan event $sock readable [namespace code {my output}]
  }
  
  method DoOutput {} {
    my variable chan sock
    chan event $chan writable {}
    if {![info exists sock] || [my query_headers getnull HTTP_ERROR] ne {}} {
      ###
      # If something croaked internally, handle this page as a normal reply
      ###
      next
      return
    }
    set replyhead [my HttpHeaders $sock]
    puts [list REPLY HEADERS $replyhead]
    set replydat  [my MimeParse $replyhead]
    ###
    # Convert the Status: header from the SCGI service to
    # a standard service reply line from a web server, but
    # otherwise spit out the rest of the headers verbatim
    ###
    if {![dict exists $replydat HTTP_STATUS]} {
      set status 200
    } else {
      set status [dict get $replydat HTTP_STATUS]
    }
    set replybuffer "HTTP/1.1 $status\n"
    append replybuffer $replyhead
    chan configure $chan -translation {auto crlf} -blocking 0 -buffering full -buffersize 4096
    chan puts $chan $replybuffer
    ###
    # Output the body
    ###
    chan configure $sock -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chan -translation binary -blocking 0 -buffering full -buffersize 4096
    set length [dict get $replydat CONTENT_LENGTH]
    if {$length} {
      ###
      # Send any POST/PUT/etc content
      ###
      chan copy $sock $chan -command [namespace code [list my TransferComplete $sock]]
    } else {
      catch {close $sock}
      chan flush $chan
      my destroy
    }
  }
}

# Act as a proxy server
::tool::define ::httpd::content::proxy {

  method proxy_info {} {
    ###
    # This method should check if a process is launched
    # or launch it if needed, and return a list of
    # HOST PORT PROXYURI
    ###
    # return {localhost 8016 /some/path}
    error unimplemented
  }
  
  method content {} {
    my variable chan sock rawrequest
    set sockinfo [my proxy_info]
    if {$sockinfo eq {}} {
      tailcall my error 404 {Not Found}
    }
    lassign $sockinfo proxyhost proxyport proxyscript
    set sock [::socket $proxyhost $proxyport]
    
    chan configure $chan -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $sock -translation {auto crlf} -blocking 1 -buffering line

    # Pass along our modified METHOD URI PROTO
    chan puts $sock "$proxyscript"
    # Pass along the headers as we saw them
    chan puts $sock $rawrequest
    set length [my query_headers get CONTENT_LENGTH]
    if {$length} {
      ###
      # Send any POST/PUT/etc content
      ###
      chan copy $chan $sock -size $length
    }
    chan flush $sock
    ###
    # Wake this object up after the proxied process starts to respond
    ###
    chan configure $sock -translation {auto crlf} -blocking 1 -buffering line
    chan event $sock readable [namespace code {my output}]
  }
  
  method DoOutput {} {
    my variable chan sock
    chan event $chan writable {}
    if {![info exists sock] || [my query_headers getnull HTTP_ERROR] ne {}} {
      ###
      # If something croaked internally, handle this page as a normal reply
      ###
      next
      return
    }
    set length 0
    chan configure $sock -translation {crlf crlf} -blocking 1
    set replystatus [gets $sock]
    set replyhead [my HttpHeaders $sock]
    set replydat  [my MimeParse $replyhead]
    
    ###
    # Pass along the status line and MIME headers
    ###
    set replybuffer "$replystatus\n"
    append replybuffer $replyhead
    chan configure $chan -translation {auto crlf} -blocking 0 -buffering full -buffersize 4096
    chan puts $chan $replybuffer
    ###
    # Output the body
    ###
    chan configure $sock -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chan -translation binary -blocking 0 -buffering full -buffersize 4096
    set length [dict get $replydat CONTENT_LENGTH]
    if {$length} {
      ###
      # Send any POST/PUT/etc content
      ###
      chan copy $sock $chan -command [namespace code [list my TransferComplete $sock]]
    } else {
      my destroy
    }
  }
}

###
# Modified httpd server with a template engine
# and a shim to insert URL domains
###
::tool::define ::httpd::server::dispatch {
  array template
  option doc_root {default {}}
  variable url_patterns {}
  
  method add_uri {pattern info} {
    my variable url_patterns
    dict set url_patterns $pattern $info
  }
  
  method PrefixNormalize prefix {
    set prefix [string trimright $prefix /]
    set prefix [string trimright $prefix *]
    set prefix [string trimright $prefix /]
    return $prefix
  }
  
  method dispatch {data} {
    set reply $data
    set uri [dict get $data REQUEST_PATH]
    # Search from longest pattern to shortest
    my variable url_patterns
    foreach {pattern info} $url_patterns {
      if {[string match ${pattern} /$uri]} {
        set reply [dict merge $data $info]
        if {![dict exists $reply prefix]} {
          dict set reply prefix [my PrefixNormalize $pattern]
        }
        return $reply
      }
    }
    set doc_root [my cget doc_root]
    if {$doc_root ne {}} {
      ###
      # Fall back to doc_root handling
      ###
      dict set reply prefix {}
      dict set reply path $doc_root
      dict set reply mixin httpd::content::file
      return $reply
    }
    return {}
  }
  
  method TemplateSearch page {
    set doc_root [my cget doc_root]
    if {$doc_root ne {} && [file exists [file join $doc_root $page.tml]]} {
      return [::fileutil::cat [file join $doc_root $page.tml]]
    }
    if {$doc_root ne {} && [file exists [file join $doc_root $page.html]]} {
      return [::fileutil::cat [file join $doc_root $page.html]]
    }
    return [next $page]
  }
}

package provide httpd::content 4.0.1

Deleted modules/httpd/httpd.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 4.3.5]
[manpage_begin httpd n [vset PACKAGE_VERSION]]
[keywords WWW]
[copyright {2018 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Tcl Web Server}]
[titledesc {A TclOO and coroutine based web server}]
[category  Networking]
[keywords TclOO]
[keywords http]
[keywords httpd]
[keywords httpserver]
[keywords services]
[require Tcl 8.6]
[require uuid]
[require clay]
[require coroutine]
[require fileutil]
[require fileutil::magic::filetype]
[require websocket]
[require mime]
[require cron]
[require uri]
[require Markdown]
[description]
[para]

This module implements a web server, suitable for embedding in an
application. The server is object oriented, and contains all of the
fundamentals needed for a full service website.

[para]

[section {Minimal Example}]

Starting a web service requires starting a class of type
[cmd httpd::server], and providing that server with one or more URIs
to service, and [cmd httpd::reply] derived classes to generate them.

[example {
oo::class create ::reply.hello {
  method content {} {
    my puts "<HTML><HEAD><TITLE>IRM Dispatch Server</TITLE></HEAD><BODY>"
    my puts "<h1>Hello World!</h1>"
    my puts </BODY></HTML>
  }
}
::httpd::server create HTTPD port 8015 myaddr 127.0.0.1 doc_root ~/htdocs
HTTPD plugin dispatch httpd::server::dispatch
HTTPD uri add * /hello [list mixin reply.hello]
}]

The bare module does have facilities to hose a files from a file system. Files that end in a .tml will be substituted in the style of Tclhttpd:

[example {
<!-- hello.tml -->
[my html_header {Hello World!}]
Your Server is running.
<p>
The time is now [clock format [clock seconds]]
[my html_footer]
}]

A complete example of an httpd server is in the /examples directory of Tcllib. It also show how to dispatch URIs to other processes via SCGI and HTTP proxies.

[example {
cd ~/tcl/sandbox/tcllib
tclsh examples/httpd.tcl
}]

[section Classes]
[subsection {Class  httpd::mime}]

 A metaclass for MIME handling behavior across a live socket



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "ChannelCopy"] [arg in] [arg out] [opt "[arg args]"]]


[call method [cmd "html_header"] [opt "[arg title] [const ""]"] [opt "[arg args]"]]

 Returns a block of HTML



[call method [cmd "html_footer"] [opt "[arg args]"]]


[call method [cmd "http_code_string"] [arg code]]


[call method [cmd "HttpHeaders"] [arg sock] [opt "[arg debug] [const ""]"]]


[call method [cmd "HttpHeaders_Default"]]


[call method [cmd "HttpServerHeaders"]]


[call method [cmd "MimeParse"] [arg mimetext]]

 Converts a block of mime encoded text to a key/value list. If an exception is encountered,
 the method will generate its own call to the [cmd error] method, and immediately invoke
 the [cmd output] method to produce an error code and close the connection.




[call method [cmd "Url_Decode"] [arg data]]
 De-httpizes a string.



[call method [cmd "Url_PathCheck"] [arg urlsuffix]]


[call method [cmd "wait"] [arg mode] [arg sock]]


[list_end]
[para]

[subsection {Class  httpd::reply}]
[emph "ancestors"]: [class httpd::mime]
[para]

 A class which shephards a request through the process of generating a
 reply.

 The socket associated with the reply is available at all times as the [arg chan]
 variable.

 The process of generating a reply begins with an [cmd httpd::server] generating a
 [cmd http::class] object, mixing in a set of behaviors and then invoking the reply
 object's [cmd dispatch] method.

 In normal operations the [cmd dispatch] method:

 [list_begin enumerated]
 [enum]
 Invokes the [cmd reset] method for the object to populate default headers.
 [enum]
 Invokes the [cmd HttpHeaders] method to stream the MIME headers out of the socket
 [enum]
 Invokes the [cmd {request parse}] method to convert the stream of MIME headers into a
 dict that can be read via the [cmd request] method.
 [enum]
 Stores the raw stream of MIME headers in the [arg rawrequest] variable of the object.
 [enum]
 Invokes the [cmd content] method for the object, generating an call to the [cmd error]
 method if an exception is raised.
 [enum]
 Invokes the [cmd output] method for the object
 [list_end]
 [para]

 Developers have the option of streaming output to a buffer via the [cmd puts] method of the
 reply, or simply populating the [arg reply_body] variable of the object.
 The information returned by the [cmd content] method is not interpreted in any way.

 If an exception is thrown (via the [cmd error] command in Tcl, for example) the caller will
 auto-generate a 500 {Internal Error} message.

 A typical implementation of [cmd content] look like:

 [example {

 clay::define ::test::content.file {
 	superclass ::httpd::content.file
 	# Return a file
 	# Note: this is using the content.file mixin which looks for the reply_file variable
 	# and will auto-compute the Content-Type
 	method content {} {
 	  my reset
     set doc_root [my request get DOCUMENT_ROOT]
     my variable reply_file
     set reply_file [file join $doc_root index.html]
 	}
 }
 clay::define ::test::content.time {
   # return the current system time
 	method content {} {
 		my variable reply_body
     my reply set Content-Type text/plain
 		set reply_body [clock seconds]
 	}
 }
 clay::define ::test::content.echo {
 	method content {} {
 		my variable reply_body
     my reply set Content-Type [my request get CONTENT_TYPE]
 		set reply_body [my PostData [my request get CONTENT_LENGTH]]
 	}
 }
 clay::define ::test::content.form_handler {
 	method content {} {
 	  set form [my FormData]
 	  my reply set Content-Type {text/html; charset=UTF-8}
     my puts [my html_header {My Dynamic Page}]
     my puts "<BODY>"
     my puts "You Sent<p>"
     my puts "<TABLE>"
     foreach {f v} $form {
       my puts "<TR><TH>$f</TH><TD><verbatim>$v</verbatim></TD>"
     }
     my puts "</TABLE><p>"
     my puts "Send some info:<p>"
     my puts "<FORM action=/[my request get REQUEST_PATH] method POST>"
     my puts "<TABLE>"
     foreach field {name rank serial_number} {
       set line "<TR><TH>$field</TH><TD><input name=\"$field\" "
       if {[dict exists $form $field]} {
         append line " value=\"[dict get $form $field]\"""
       }
       append line " /></TD></TR>"
       my puts $line
     }
     my puts "</TABLE>"
     my puts [my html footer]
 	}
 }

 }]



[para]
[class {Variable}]
[list_begin definitions]
[call variable [cmd ChannelRegister]]

[call variable [cmd reply]]
 A dictionary which will converted into the MIME headers of the reply




[call variable [cmd request]]
 A dictionary containing the SCGI transformed HTTP headers for the request




[list_end]
[para]
[class {Delegate}]
[list_begin definitions]
[call delegate [cmd <server>]]The server object which spawned this reply

[list_end]
[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "constructor"] [arg ServerObj] [opt "[arg args]"]]


[call method [cmd "destructor"] [opt "[arg dictargs]"]]

 clean up on exit




[call method [cmd "ChannelRegister"] [opt "[arg args]"]]
 Registers a channel to be closed by the close method



[call method [cmd "close"]]

 Close channels opened by this object




[call method [cmd "Log_Dispatched"]]

 Record a dispatch event




[call method [cmd "dispatch"] [arg newsock] [arg datastate]]

 Accept the handoff from the server object of the socket
 [emph newsock] and feed it the state [emph datastate].
 Fields the [emph datastate] are looking for in particular are:
 [para]
 * [const mixin] - A key/value list of slots and classes to be mixed into the
 object prior to invoking [cmd Dispatch].
 [para]
 * [const http] - A key/value list of values to populate the object's [emph request]
 ensemble
 [para]
 All other fields are passed along to the [method clay] structure of the object.




[call method [cmd "Dispatch"]]


[call method [cmd "html_header"] [arg title] [opt "[arg args]"]]


[call method [cmd "html_footer"] [opt "[arg args]"]]


[call method [cmd "error"] [arg code] [opt "[arg msg] [const ""]"] [opt "[arg errorInfo] [const ""]"]]


[call method [cmd "content"]]

 REPLACE ME:
 This method is the "meat" of your application.
 It writes to the result buffer via the "puts" method
 and can tweak the headers via "clay put header_reply"




[call method [cmd "EncodeStatus"] [arg status]]

 Formulate a standard HTTP status header from he string provided.




[call method [cmd "log"] [arg type] [opt "[arg info] [const ""]"]]


[call method [cmd "CoroName"]]


[call method [cmd "DoOutput"]]

 Generates the the HTTP reply, streams that reply back across [arg chan],
 and destroys the object.




[call method [cmd "FormData"]]

 For GET requests, converts the QUERY_DATA header into a key/value list.

 For POST requests, reads the Post data and converts that information to
 a key/value list for application/x-www-form-urlencoded posts. For multipart
 posts, it composites all of the MIME headers of the post to a singular key/value
 list, and provides MIME_* information as computed by the [cmd mime] package, including
 the MIME_TOKEN, which can be fed back into the mime package to read out the contents.




[call method [cmd "PostData"] [arg length]]
 Stream [arg length] bytes from the [arg chan] socket, but only of the request is a
 POST or PUSH. Returns an empty string otherwise.



[call method [cmd "Session_Load"]]
 Manage session data



[call method [cmd "puts"] [arg line]]
 Appends the value of [arg string] to the end of [arg reply_body], as well as a trailing newline
 character.



[call method [cmd "RequestFind"] [arg field]]


[call method [cmd "request"] [arg subcommand] [opt "[arg args]"]]


[call method [cmd "reply"] [arg subcommand] [opt "[arg args]"]]


[call method [cmd "reset"]]
 Clear the contents of the [arg reply_body] variable, and reset all headers in the [cmd reply]
 structure back to the defaults for this object.



[call method [cmd "timeOutCheck"]]
 Called from the [cmd http::server] object which spawned this reply. Checks to see
 if too much time has elapsed while waiting for data or generating a reply, and issues
 a timeout error to the request if it has, as well as destroy the object and close the
 [arg chan] socket.



[call method [cmd "timestamp"]]

 Return the current system time in the format: [example {%a, %d %b %Y %T %Z}]




[list_end]
[para]

[subsection {Class  httpd::server}]
[emph "ancestors"]: [class httpd::mime]
[para]

[para]
[class {Variable}]
[list_begin definitions]
[call variable [cmd template]]

[call variable [cmd url_patterns]]

[list_end]
[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "constructor"] [arg args] [opt "[arg port] [const "auto"]"] [opt "[arg myaddr] [const "127.0.0.1"]"] [opt "[arg string] [const "auto"]"] [opt "[arg name] [const "auto"]"] [opt "[arg doc_root] [const ""]"] [opt "[arg reverse_dns] [const "0"]"] [opt "[arg configuration_file] [const ""]"] [opt "[arg protocol] [const "HTTP/1.1"]"]]


[call method [cmd "destructor"] [opt "[arg dictargs]"]]


[call method [cmd "connect"] [arg sock] [arg ip] [arg port]]

 Reply to an open socket. This method builds a coroutine to manage the remainder
 of the connection. The coroutine's operations are driven by the [cmd Connect] method.




[call method [cmd "ServerHeaders"] [arg ip] [arg http_request] [arg mimetxt]]


[call method [cmd "Connect"] [arg uuid] [arg sock] [arg ip]]

 This method reads HTTP headers, and then consults the [cmd dispatch] method to
 determine if the request is valid, and/or what kind of reply to generate. Under
 normal cases, an object of class [cmd ::http::reply] is created, and that class's
 [cmd dispatch] method.
 This action passes control of the socket to
 the reply object. The reply object manages the rest of the transaction, including
 closing the socket.




[call method [cmd "counter"] [arg which]]
 Increment an internal counter.



[call method [cmd "CheckTimeout"]]

 Check open connections for a time out event.




[call method [cmd "debug"] [opt "[arg args]"]]


[call method [cmd "dispatch"] [arg data]]

 Given a key/value list of information, return a data structure describing how
 the server should reply.




[call method [cmd "Dispatch_Default"] [arg reply]]

 Method dispatch method of last resort before returning a 404 NOT FOUND error.
 The default behavior is to look for a file in [emph DOCUMENT_ROOT] which
 matches the query.




[call method [cmd "Dispatch_Local"] [arg data]]

 Method dispatch method invoked prior to invoking methods implemented by plugins.
 If this method returns a non-empty dictionary, that structure will be passed to
 the reply. The default is an empty implementation.




[call method [cmd "Headers_Local"] [arg varname]]

 Introspect and possibly modify a data structure destined for a reply. This
 method is invoked before invoking Header methods implemented by plugins.
 The default implementation is empty.




[call method [cmd "Headers_Process"] [arg varname]]

 Introspect and possibly modify a data structure destined for a reply. This
 method is built dynamically by the [cmd plugin] method.




[call method [cmd "HostName"] [arg ipaddr]]

 Convert an ip address to a host name. If the server/ reverse_dns flag
 is false, this method simply returns the IP address back.
 Internally, this method uses the [emph dns] module from tcllib.




[call method [cmd "log"] [opt "[arg args]"]]

 Log an event. The input for args is free form. This method is intended
 to be replaced by the user, and is a noop for a stock http::server object.




[call method [cmd "plugin"] [arg slot] [opt "[arg class] [const ""]"]]

 Incorporate behaviors from a plugin.
 This method dynamically rebuilds the [cmd Dispatch] and [cmd Headers]
 method. For every plugin, the server looks for the following entries in
 [emph "clay plugin/"]:
 [para]
 [emph load] - A script to invoke in the server's namespace during the [cmd plugin] method invokation.
 [para]
 [emph dispatch] - A script to stitch into the server's [cmd Dispatch] method.
 [para]
 [emph headers] - A script to stitch into the server's [cmd Headers] method.
 [para]
 [emph thread] - A script to stitch into the server's [cmd Thread_start] method.




[call method [cmd "port_listening"]]
 Return the actual port that httpd is listening on.



[call method [cmd "PrefixNormalize"] [arg prefix]]
 For the stock version, trim trailing /'s and *'s from a prefix. This
 method can be replaced by the end user to perform any other transformations
 needed for the application.



[call method [cmd "source"] [arg filename]]


[call method [cmd "start"]]
 Open the socket listener.



[call method [cmd "stop"]]
 Shut off the socket listener, and destroy any pending replies.



[call method [cmd "SubObject {} db"]]


[call method [cmd "SubObject {} default"]]


[call method [cmd "template"] [arg page]]
 Return a template for the string [arg page]



[call method [cmd "TemplateSearch"] [arg page]]
 Perform a search for the template that best matches [arg page]. This
 can include local file searches, in-memory structures, or even
 database lookups. The stock implementation simply looks for files
 with a .tml or .html extension in the [opt doc_root] directory.



[call method [cmd "Thread_start"]]

 Built by the [cmd plugin] method. Called by the [cmd start] method. Intended
 to allow plugins to spawn worker threads.




[call method [cmd "Uuid_Generate"]]

 Generate a GUUID. Used to ensure every request has a unique ID.
 The default implementation is:
 [example {
   return [::clay::uuid generate]
 }]




[call method [cmd "Validate_Connection"] [arg sock] [arg ip]]

 Given a socket and an ip address, return true if this connection should
 be terminated, or false if it should be allowed to continue. The stock
 implementation always returns 0. This is intended for applications to
 be able to implement black lists and/or provide security based on IP
 address.




[list_end]
[para]

[subsection {Class  httpd::server::dispatch}]
[emph "ancestors"]: [class httpd::server]
[para]

 Provide a backward compadible alias



[para]

[subsection {Class  httpd::content.redirect}]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "reset"]]


[call method [cmd "content"]]


[list_end]
[para]

[subsection {Class  httpd::content.cache}]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "Dispatch"]]


[list_end]
[para]

[subsection {Class  httpd::content.template}]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "content"]]


[list_end]
[para]

[subsection {Class  httpd::content.file}]

 Class to deliver Static content
 When utilized, this class is fed a local filename
 by the dispatcher



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "FileName"]]


[call method [cmd "DirectoryListing"] [arg local_file]]


[call method [cmd "content"]]


[call method [cmd "Dispatch"]]


[list_end]
[para]

[subsection {Class  httpd::content.exec}]

[para]
[class {Variable}]
[list_begin definitions]
[call variable [cmd exename]]

[list_end]
[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "CgiExec"] [arg execname] [arg script] [arg arglist]]


[call method [cmd "Cgi_Executable"] [arg script]]


[list_end]
[para]

[subsection {Class  httpd::content.proxy}]
[emph "ancestors"]: [class httpd::content.exec]
[para]

 Return data from an proxy process



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "proxy_channel"]]


[call method [cmd "proxy_path"]]


[call method [cmd "ProxyRequest"] [arg chana] [arg chanb]]


[call method [cmd "ProxyReply"] [arg chana] [arg chanb] [opt "[arg args]"]]


[call method [cmd "Dispatch"]]


[list_end]
[para]

[subsection {Class  httpd::content.cgi}]
[emph "ancestors"]: [class httpd::content.proxy]
[para]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "FileName"]]


[call method [cmd "proxy_channel"]]


[call method [cmd "ProxyRequest"] [arg chana] [arg chanb]]


[call method [cmd "ProxyReply"] [arg chana] [arg chanb] [opt "[arg args]"]]


[call method [cmd "DirectoryListing"] [arg local_file]]

 For most CGI applications a directory list is vorboten




[list_end]
[para]

[subsection {Class  httpd::protocol.scgi}]

 Return data from an SCGI process



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "EncodeStatus"] [arg status]]


[list_end]
[para]

[subsection {Class  httpd::content.scgi}]
[emph "ancestors"]: [class httpd::content.proxy]
[para]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "scgi_info"]]


[call method [cmd "proxy_channel"]]


[call method [cmd "ProxyRequest"] [arg chana] [arg chanb]]


[call method [cmd "ProxyReply"] [arg chana] [arg chanb] [opt "[arg args]"]]


[list_end]
[para]

[subsection {Class  httpd::server.scgi}]
[emph "ancestors"]: [class httpd::server]
[para]

 Act as an  SCGI Server



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "debug"] [opt "[arg args]"]]


[call method [cmd "Connect"] [arg uuid] [arg sock] [arg ip]]


[list_end]
[para]

[subsection {Class  httpd::content.websocket}]

 Upgrade a connection to a websocket



[para]

[subsection {Class  httpd::plugin}]

 httpd plugin template



[para]

[subsection {Class  httpd::plugin.dict_dispatch}]

 A rudimentary plugin that dispatches URLs from a dict
 data structure



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "Dispatch_Dict"] [arg data]]

 Implementation of the dispatcher




[call method [cmd "uri {} add"] [arg vhosts] [arg patterns] [arg info]]





[call method [cmd "uri {} direct"] [arg vhosts] [arg patterns] [arg info] [arg body]]


[list_end]
[para]

[subsection {Class  httpd::reply.memchan}]
[emph "ancestors"]: [class httpd::reply]
[para]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "output"]]


[call method [cmd "DoOutput"]]


[call method [cmd "close"]]


[list_end]
[para]

[subsection {Class  httpd::plugin.local_memchan}]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "local_memchan"] [arg command] [opt "[arg args]"]]


[call method [cmd "Connect_Local"] [arg uuid] [arg sock] [opt "[arg args]"]]

 A modified connection method that passes simple GET request to an object
 and pulls data directly from the reply_body data variable in the object

 Needed because memchan is bidirectional, and we can't seem to communicate that
 the server is one side of the link and the reply is another




[list_end]
[para]

[section AUTHORS]
Sean Woods

[vset CATEGORY network]
[include ../common-text/feedback.inc]

[manpage_end]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to modules/httpd/httpd.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130







131





132
133





134


135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161

162
163
164
165
166
167

168



169
170
171
172
173

174
175



176
177

178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205

206
207
208

209
210
211
212
213
214
215
216
217


218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254

255
256
257
258
259
260





















































































































































261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575

576
577
578
579
580
581
582
583
584
585

586
587
588
589
590










591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606



607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677

678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706




707
708
709
710
711
712
713
714
715
716
717
718



719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772

773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826










827

828
829
830
831
832

833



834



835

836
837
838

839
840
841
842
843
844
845
846
847
848

849
850
851



852















853




















854
855
856
857




858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880



881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018

1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042

1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064


1065
1066
1067
1068
1069
1070
1071


1072
1073
1074
1075
1076


1077
1078


1079
1080
1081
1082
1083
1084
1085
1086





1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
###
# Amalgamated package for httpd
# Do not edit directly, tweak the source in src/ and rerun
# build.tcl
###



package require Tcl 8.6
package provide httpd 4.3.5
namespace eval ::httpd {}
set ::httpd::version 4.3.5

###
# START: core.tcl
###
package require uri
package require dns
package require cron
package require coroutine
package require mime
package require fileutil
package require websocket
package require Markdown
package require fileutil::magic::filetype
package require clay 0.7
namespace eval httpd::content {
}
namespace eval ::url {
}
namespace eval ::httpd {
}
namespace eval ::scgi {
}
if {
    [package vsatisfies [package require fileutil::magic::filetype] 2] ||
    [package vsatisfies [package require fileutil::magic::filetype] 1.2]
} {
    # v1.2+, v2+: filetype result structure was changed completely.
    proc ::httpd::mime-type {path} {
	join [lindex [::fileutil::magic::filetype $path] 1] /
    }

} else {
    # filetype result is mime type directly.
    proc ::httpd::mime-type {path} {
	::fileutil::magic::filetype $path
    }
}

clay::define ::httpd::mime {
  method ChannelCopy {in out args} {
    try {
      my clay refcount_incr
      set chunk 4096
      set size -1
      foreach {f v} $args {
        set [string trim $f -] $v
      }
      dict set info coroutine [info coroutine]
      if {$size>0 && $chunk>$size} {
          set chunk $size
      }
      set bytes 0
      set sofar 0
      set method [self method]
      while 1 {
        set command {}
        set error {}
        if {$size>=0} {
          incr sofar $bytes
          set remaining [expr {$size-$sofar}]
          if {$remaining <= 0} {
            break
          } elseif {$chunk > $remaining} {
            set chunk $remaining
          }
        }
        lassign [yieldto chan copy $in $out -size $chunk \
          -command [list [info coroutine] $method]] \
          command bytes error
        if {$command ne $method} {
          error "Subroutine $method interrupted"
        }
        if {[string length $error]} {
          error $error
        }
        if {[chan eof $in]} {
          break
        }
      }
    } finally {
      my clay refcount_decr
    }
  }
  method html_header {{title {}} args} {
    set result {}
    append result "<!DOCTYPE html>\n<HTML><HEAD>"
    if {$title ne {}} {
      append result "<TITLE>$title</TITLE>"
    }
    if {[dict exists $args stylesheet]} {
      append result "<link rel=\"stylesheet\" href=\"[dict get $args stylesheet]\">"
    } else {
      append result "<link rel=\"stylesheet\" href=\"/style.css\">"
    }
    append result "</HEAD><BODY>"
    return $result
  }
  method html_footer {args} {
    return "</BODY></HTML>"
  }
  method http_code_string code {
    set codes {
      200 {Data follows}
      204 {No Content}
      301 {Moved Permanently}
      302 {Found}
      303 {Moved Temporarily}
      304 {Not Modified}
      307 {Moved Permanently}
      308 {Moved Temporarily}
      400 {Bad Request}
      401 {Authorization Required}
      403 {Permission denied}
      404 {Not Found}
      408 {Request Timeout}
      411 {Length Required}
      419 {Expectation Failed}
      500 {Server Internal Error}
      501 {Server Busy}
      503 {Service Unavailable}
      504 {Service Temporarily Unavailable}
      505 {HTTP Version Not Supported}
    }
    if {[dict exists $codes $code]} {







      return [dict get $codes $code]





    }
    return {Unknown Http Code}





  }


  method HttpHeaders {sock {debug {}}} {
    set result {}
    set LIMIT 8192
    ###
    # Set up a channel event to stream the data from the socket line by
    # line. When a blank line is read, the HttpHeaderLine method will send
    # a flag which will terminate the vwait.
    #
    # We do this rather than entering blocking mode to prevent the process
    # from locking up if it's starved for input. (Or in the case of the test
    # suite, when we are opening a blocking channel on the other side of the
    # socket back to ourselves.)
    ###
    chan configure $sock -translation {auto crlf} -blocking 0 -buffering line
    while 1 {
      set readCount [::coroutine::util::gets_safety $sock $LIMIT line]
      if {$readCount<=0} break
      append result $line \n
      if {[string length $result] > $LIMIT} {
        error {Headers too large}
      }
    }
    ###
    # Return our buffer
    ###
    return $result
  }

  method HttpHeaders_Default {} {
    return {Status {200 OK}
Content-Size 0
Content-Type {text/html; charset=UTF-8}
Cache-Control {no-cache}
Connection close}

  }



  method HttpServerHeaders {} {
    return {
      CONTENT_LENGTH CONTENT_TYPE QUERY_STRING REMOTE_USER AUTH_TYPE
      REQUEST_METHOD REMOTE_ADDR REMOTE_HOST REQUEST_URI REQUEST_PATH
      REQUEST_VERSION  DOCUMENT_ROOT QUERY_STRING REQUEST_RAW

      GATEWAY_INTERFACE SERVER_PORT SERVER_HTTPS_PORT
      SERVER_NAME  SERVER_SOFTWARE SERVER_PROTOCOL



    }
  }

  method MimeParse mimetext {
    set data(mimeorder) {}
    foreach line [split $mimetext \n] {
      # This regexp picks up
      # key: value
      # MIME headers.  MIME headers may be continue with a line
      # that starts with spaces or a tab
      if {[string length [string trim $line]]==0} break
      if {[regexp {^([^ :]+):[ 	]*(.*)} $line dummy key value]} {
        # The following allows something to
        # recreate the headers exactly
        lappend data(headerlist) $key $value
        # The rest of this makes it easier to pick out
        # headers from the data(mime,headername) array
        #set key [string tolower $key]
        if {[info exists data(mime,$key)]} {
          append data(mime,$key) ,$value
        } else {
          set data(mime,$key) $value
          lappend data(mimeorder) $key
        }
        set data(key) $key
      } elseif {[regexp {^[ 	]+(.*)}  $line dummy value]} {
        # Are there really continuation lines in the spec?
        if {[info exists data(key)]} {
          append data(mime,$data(key)) " " $value
        } else {
          error "INVALID HTTP HEADER FORMAT: $line"

        }
      } else {
        error "INVALID HTTP HEADER FORMAT: $line"

      }
    }
    ###
    # To make life easier for our SCGI implementation rig things
    # such that CONTENT_LENGTH is always first
    # Also map all headers specified in rfc2616 to their canonical case
    ###
    set result {}
    dict set result Content-Length 0


    foreach {key} $data(mimeorder) {
      set ckey $key
      switch [string tolower $key] {
        content-length {
          set ckey Content-Length
        }
        content-encoding {
          set ckey Content-Encoding
        }
        content-language {
          set ckey Content-Language
        }
        content-location {
          set ckey Content-Location
        }
        content-md5 {
          set ckey Content-MD5
        }
        content-range {
          set ckey Content-Range
        }
        content-type {
          set ckey Content-Type
        }
        expires {
          set ckey Expires
        }
        last-modified {
          set ckey Last-Modified
        }
        cookie {
          set ckey COOKIE
        }
        referer -
        referrer {
          # Standard misspelling in the RFC
          set ckey Referer

        }
      }
      dict set result $ckey $data(mime,$key)
    }
    return $result
  }





















































































































































  method Url_Decode data {
    regsub -all {\+} $data " " data
    regsub -all {([][$\\])} $data {\\\1} data
    regsub -all {%([0-9a-fA-F][0-9a-fA-F])} $data  {[format %c 0x\1]} data
    return [subst $data]
  }
  method Url_PathCheck {urlsuffix} {
    set pathlist ""
    foreach part  [split $urlsuffix /] {
      if {[string length $part] == 0} {
        # It is important *not* to "continue" here and skip
        # an empty component because it could be the last thing,
        # /a/b/c/
        # which indicates a directory.  In this case you want
        # Auth_Check to recurse into the directory in the last step.
      }
      set part [Url_Decode $part]
    	# Disallow Mac and UNIX path separators in components
	    # Windows drive-letters are bad, too
 	    if {[regexp [/\\:] $part]} {
  	    error "URL components cannot include \ or :"
	    }
	    switch -- $part {
	      .  { }
    	  .. {
          set len [llength $pathlist]
          if {[incr len -1] < 0} {
            error "URL out of range"
          }
          set pathlist [lrange $pathlist 0 [incr len -1]]
        }
        default {
          lappend pathlist $part
        }
      }
    }
    return $pathlist
  }
  method wait {mode sock} {
    my clay refcount_incr
    if {[info coroutine] eq {}} {
      chan event $sock $mode [list set ::httpd::lock_$sock $mode]
      vwait ::httpd::lock_$sock
    } else {
      chan event $sock $mode [info coroutine]
      yield
    }
    chan event $sock $mode {}
    my clay refcount_decr
  }
}

###
# END: core.tcl
###
###
# START: reply.tcl
###
::clay::define ::httpd::reply {
  superclass ::httpd::mime
  Variable ChannelRegister {}
  Delegate <server> {
    description {The server object which spawned this reply}
  }
  Dict reply {}
  Dict request {
    CONTENT_LENGTH 0
    COOKIE {}
    HTTP_HOST {}
    REFERER {}
    REQUEST_URI {}
    REMOTE_ADDR {}
    REMOTE_HOST {}
    USER_AGENT {}
    SESSION {}
  }
  constructor {ServerObj args} {
    my variable dispatched_time uuid
    set uuid [namespace tail [self]]
    set dispatched_time [clock milliseconds]
    my clay delegate <server> $ServerObj
    foreach {field value} [::clay::args_to_options {*}$args] {
      my clay set config $field: $value
    }
  }
  destructor {
    my close
  }
  method ChannelRegister args {
    my variable ChannelRegister
    if {![info exists ChannelRegister]} {
      set ChannelRegister {}
    }
    foreach c $args {
      if {$c ni $ChannelRegister} {
        lappend ChannelRegister $c
      }
    }
  }
  method close {} {
    my variable ChannelRegister
    if {![info exists ChannelRegister]} {
      return
    }
    foreach c $ChannelRegister {
      catch {chan event $c readable {}}
      catch {chan event $c writable {}}
      catch {chan flush $c}
      catch {chan close $c}
    }
    set ChannelRegister {}
  }
  method Log_Dispatched {} {
    my log Dispatched [dict create \
     REMOTE_ADDR [my request get REMOTE_ADDR] \
     REMOTE_HOST [my request get REMOTE_HOST] \
     COOKIE [my request get HTTP_COOKIE] \
     REFERER [my request get HTTP_REFERER] \
     USER_AGENT [my request get HTTP_USER_AGENT] \
     REQUEST_URI [my request get REQUEST_URI] \
     HTTP_HOST [my request get HTTP_HOST] \
     SESSION [my request get SESSION] \
    ]
  }
  method dispatch {newsock datastate} {
    my variable chan request
    try {
      my clay refcount_incr
      set chan $newsock
      my ChannelRegister $chan
      chan event $chan readable {}
      chan configure $chan -translation {auto crlf} -buffering line
      if {[dict exists $datastate mixin]} {
        set mixinmap [dict get $datastate mixin]
      } else {
        set mixinmap {}
      }
      foreach item [dict keys $datastate MIXIN_*] {
        set slot [string range $item 6 end]
        dict set mixinmap [string tolower $slot] [dict get $datastate $item]
      }
      my clay mixinmap {*}$mixinmap
      if {[dict exists $datastate delegate]} {
        my clay delegate {*}[dict get $datastate delegate]
      }
      my reset
      set request [my clay get dict/ request]
      foreach {f v} $datastate {
        if {[string index $f end] eq "/"} {
          catch {my clay merge $f $v}
        } else {
          my clay set $f $v
        }
        if {$f eq "http"} {
          foreach {ff vf} $v {
            dict set request $ff $vf
          }
        }
      }
      my Session_Load
      my Log_Dispatched
      my Dispatch
    } on error {err errdat} {
      my error 500 $err [dict get $errdat -errorinfo]
      my DoOutput
    } finally {
      my close
      my clay refcount_decr
    }
  }
  method Dispatch {} {
    # Invoke the URL implementation.
    my content
    my DoOutput
  }
  method html_header {title args} {
    set result {}
    append result "<HTML><HEAD>"
    if {$title ne {}} {
      append result "<TITLE>$title</TITLE>"
    }
    append result "</HEAD><BODY>"
    append result \n {<div id="top-menu">}
    if {[dict exists $args banner]} {
      append result "<img src=\"[dict get $args banner]\">"
    } else {
      append result {<img src="/images/etoyoc-banner.jpg">}
    }
    append result {</div>}
    if {[dict exists $args sideimg]} {
      append result "\n<div name=\"sideimg\"><img align=right src=\"[dict get $args sideimg]\"></div>"
    }
    append result {<div id="content">}
    return $result
  }
  method html_footer {args} {
    set result {</div><div id="footer">}
    append result {</div></BODY></HTML>}
  }
  method error {code {msg {}} {errorInfo {}}} {
    my clay set  HTTP_ERROR $code
    my reset
    set qheaders [my clay dump]
    set HTTP_STATUS "$code [my http_code_string $code]"
    dict with qheaders {}
    my reply replace {}
    my reply set Status $HTTP_STATUS
    my reply set Content-Type {text/html; charset=UTF-8}
    switch $code {
      301 - 302 - 303 - 307 - 308 {
        my reply set Location $msg
        set template [my <server> template redirect]
      }
      404 {
        set template [my <server> template notfound]
      }
      default {
        set template [my <server> template internal_error]
      }
    }
    my puts [subst $template]
  }
  method content {} {
    my puts [my html_header {Hello World!}]
    my puts "<H1>HELLO WORLD!</H1>"
    my puts [my html_footer]
  }
  method EncodeStatus {status} {
    return "HTTP/1.0 $status"
  }
  method log {type {info {}}} {
    my variable dispatched_time uuid
    my <server> log $type $uuid $info
  }
  method CoroName {} {
    if {[info coroutine] eq {}} {
      return ::httpd::object::[my clay get UUID]
    }
  }
  method DoOutput {} {
    my variable reply_body chan
    if {$chan eq {}} return
    catch {
      # Causing random issues. Technically a socket is always open for read and write
      # anyway
      #my wait writable $chan
      chan configure $chan  -translation {binary binary}
      ###
      # Return dynamic content
      ###
      set length [string length $reply_body]
      set result {}
      if {${length} > 0} {
        my reply set Content-Length [string length $reply_body]
        append result [my reply output] \n
        append result $reply_body
      } else {
        append result [my reply output]
      }
      chan puts -nonewline $chan $result
      my log HttpAccess {}
    }
  }
  method FormData {} {
    my variable chan formdata
    # Run this only once
    if {[info exists formdata]} {
      return $formdata
    }
    set length [my request get CONTENT_LENGTH]
    set formdata {}
    if {[my request get REQUEST_METHOD] in {"POST" "PUSH"}} {
      set rawtype [my request get CONTENT_TYPE]
      if {[string toupper [string range $rawtype 0 8]] ne "MULTIPART"} {
        set type $rawtype
      } else {
        set type multipart
      }
      switch $type {
        multipart {
          ###
          # Ok, Multipart MIME is troublesome, farm out the parsing to a dedicated tool
          ###
          set body [my clay get mimetxt]
          append body \n [my PostData $length]
          set token [::mime::initialize -string $body]
          foreach item [::mime::getheader $token -names] {
            dict set formdata $item [::mime::getheader $token $item]
          }
          foreach item {content encoding params parts size} {
            dict set formdata MIME_[string toupper $item] [::mime::getproperty $token $item]
          }
          dict set formdata MIME_TOKEN $token
        }
        application/x-www-form-urlencoded {
          # These foreach loops are structured this way to ensure there are matched
          # name/value pairs.  Sometimes query data gets garbled.
          set body [my PostData $length]
          set result {}
          foreach pair [split $body "&"] {
            foreach {name value} [split $pair "="] {
              lappend formdata [my Url_Decode $name] [my Url_Decode $value]
            }
          }
        }
      }
    } else {
      foreach pair [split [my request get QUERY_STRING] "&"] {
        foreach {name value} [split $pair "="] {
          lappend formdata [my Url_Decode $name] [my Url_Decode $value]
        }
      }
    }
    return $formdata
  }

  method PostData {length} {
    my variable postdata
    # Run this only once
    if {[info exists postdata]} {
      return $postdata
    }
    set postdata {}
    if {[my request get REQUEST_METHOD] in {"POST" "PUSH"}} {
      my variable chan
      chan configure $chan -translation binary -blocking 0 -buffering full -buffersize 4096

      set postdata [::coroutine::util::read $chan $length]
    }
    return $postdata
  }
  method Session_Load {} {}










  method puts line {
    my variable reply_body
    append reply_body $line \n
  }
  method RequestFind {field} {
    my variable request
    if {[dict exists $request $field]} {
      return $field
    }
    foreach item [dict keys $request] {
      if {[string tolower $item] eq [string tolower $field]} {
        return $item
      }
    }
    return $field
  }



  method request {subcommand args} {
    my variable request
    switch $subcommand {
      dump {
        return $request
      }
      field {
        tailcall my RequestFind [lindex $args 0]
      }
      get {
        set field [my RequestFind [lindex $args 0]]
        if {![dict exists $request $field]} {
          return {}
        }
        tailcall dict get $request $field
      }
      getnull {
        set field [my RequestFind [lindex $args 0]]
        if {![dict exists $request $field]} {
          return {}
        }
        tailcall dict get $request $field
      }
      exists {
        set field [my RequestFind [lindex $args 0]]
        tailcall dict exists $request $field
      }
      parse {
        if {[catch {my MimeParse [lindex $args 0]} result]} {
          my error 400 $result
          tailcall my DoOutput
        }
        set request $result
      }
      replace {
        set request [lindex $args 0]
      }
      set {
        dict set request {*}$args
      }
      default {
        error "Unknown command $subcommand. Valid: field, get, getnull, exists, parse, replace, set"
      }
    }
  }
  method reply {subcommand args} {
    my variable reply
    switch $subcommand {
      dump {
        return $reply
      }
      exists {
        return [dict exists $reply {*}$args]
      }
      get -
      getnull {
        return [dict getnull $reply {*}$args]
      }
      replace {
        set reply [my HttpHeaders_Default]
        if {[llength $args]==1} {
          foreach {f v} [lindex $args 0] {
            dict set reply $f $v
          }
        } else {
          foreach {f v} $args {
            dict set reply $f $v
          }
        }
      }
      output {

        set result {}
        if {![dict exists $reply Status]} {
          set status {200 OK}
        } else {
          set status [dict get $reply Status]
        }
        set result "[my EncodeStatus $status]\n"
        foreach {f v} $reply {
          if {$f in {Status}} continue
          append result "[string trimright $f :]: $v\n"
        }
        #append result \n
        return $result
      }
      set {
        dict set reply {*}$args
      }
      default {
        error "Unknown command $subcommand. Valid: exists, get, getnull, output, replace, set"
      }
    }
  }
  method reset {} {
    my variable reply_body
    my reply replace    [my HttpHeaders_Default]
    my reply set Server [my <server> clay get server/ string]
    my reply set Date [my timestamp]
    set reply_body {}
  }




  method timeOutCheck {} {
    my variable dispatched_time
    if {([clock seconds]-$dispatched_time)>120} {
      ###
      # Something has lasted over 2 minutes. Kill this
      ###
      catch {
        my error 408 {Request Timed out}
        my DoOutput
      }
    }
  }



  method timestamp {} {
    return [clock format [clock seconds] -format {%a, %d %b %Y %T %Z}]
  }
}

###
# END: reply.tcl
###
###
# START: server.tcl
###
namespace eval ::httpd::object {
}
namespace eval ::httpd::coro {
}
::clay::define ::httpd::server {
  superclass ::httpd::mime
  clay set server/ port auto
  clay set server/ myaddr 127.0.0.1
  clay set server/ string [list TclHttpd $::httpd::version]
  clay set server/ name [info hostname]
  clay set server/ doc_root {}
  clay set server/ reverse_dns 0
  clay set server/ configuration_file {}
  clay set server/ protocol {HTTP/1.1}
  clay set socket/ buffersize   32768
  clay set socket/ translation  {auto crlf}
  clay set reply_class ::httpd::reply
  Array template
  Dict url_patterns {}
  constructor {
  {args {
    port        {default auto      comment {Port to listen on}}
    myaddr      {default 127.0.0.1 comment {IP address to listen on. "all" means all}}
    string      {default auto      comment {Value for SERVER_SOFTWARE in HTTP headers}}
    name        {default auto      comment {Value for SERVER_NAME in HTTP headers. Defaults to [info hostname]}}
    doc_root    {default {}        comment {File path to serve.}}
    reverse_dns {default 0         comment {Perform reverse DNS to convert IPs into hostnames}}
    configuration_file {default {} comment {Configuration file to load into server namespace}}
    protocol    {default {HTTP/1.1} comment {Value for SERVER_PROTOCOL in HTTP headers}}
  }}} {
    if {[llength $args]==1} {
      set arglist [lindex $args 0]
    } else {
      set arglist $args
    }
    foreach {var val} $arglist {
      my clay set server/ $var $val
    }
    my start
  }
  destructor {
    my stop
  }

  method connect {sock ip port} {
    ###
    # If an IP address is blocked drop the
    # connection
    ###
    if {[my Validate_Connection $sock $ip]} {
      catch {close $sock}
      return
    }
    set uuid [my Uuid_Generate]
    set coro [coroutine ::httpd::coro::$uuid {*}[namespace code [list my Connect $uuid $sock $ip]]]
    chan event $sock readable $coro
  }
  method ServerHeaders {ip http_request mimetxt} {
    set result {}
    dict set result HTTP_HOST {}
    dict set result CONTENT_LENGTH 0
    foreach {f v} [my MimeParse $mimetxt] {
      set fld [string toupper [string map {- _} $f]]
      if {$fld in {CONTENT_LENGTH CONTENT_TYPE}} {
        set qfld $fld
      } else {
        set qfld HTTP_$fld
      }
      dict set result $qfld $v
    }
    dict set result REMOTE_ADDR     $ip
    dict set result REMOTE_HOST     [my HostName $ip]
    dict set result REQUEST_METHOD  [lindex $http_request 0]
    set uriinfo [::uri::split [lindex $http_request 1]]
    dict set result uriinfo $uriinfo
    dict set result REQUEST_URI     [lindex $http_request 1]
    dict set result REQUEST_PATH    [dict get $uriinfo path]
    dict set result REQUEST_VERSION [lindex [split [lindex $http_request end] /] end]
    dict set result DOCUMENT_ROOT   [my clay get server/ doc_root]
    dict set result QUERY_STRING    [dict get $uriinfo query]
    dict set result REQUEST_RAW     $http_request
    dict set result SERVER_PORT     [my port_listening]
    dict set result SERVER_NAME     [my clay get server/ name]
    dict set result SERVER_PROTOCOL [my clay get server/ protocol]
    dict set result SERVER_SOFTWARE [my clay get server/ string]
    if {[string match 127.* $ip]} {
      dict set result LOCALHOST [expr {[lindex [split [dict getnull $result HTTP_HOST] :] 0] eq "localhost"}]
    }
    return $result
  }
  method Connect {uuid sock ip} {
    ::clay::cleanup
    yield [info coroutine]
    chan event $sock readable {}
    chan configure $sock \
      -blocking 0 \
      -translation {auto crlf} \
      -buffering line










    my counter url_hit

    try {
      set readCount [::coroutine::util::gets_safety $sock 4096 http_request]
      set mimetxt [my HttpHeaders $sock]
      dict set query UUID $uuid
      dict set query mimetxt $mimetxt

      dict set query mixin style [my clay get server/ style]



      dict set query http [my ServerHeaders $ip $http_request $mimetxt]



      my Headers_Process query

      set reply [my dispatch $query]
    } on error {err errdat} {
      my debug [list uri: [dict getnull $query REQUEST_URI] ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]

      my log BadRequest $uuid [list ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      catch {chan puts $sock "HTTP/1.0 400 Bad Request (The data is invalid)"}
      catch {chan close $sock}
      return
    }
    if {[dict size $reply]==0} {
      set reply $query
      my log BadLocation $uuid $query
      dict set reply http HTTP_STATUS {404 Not Found}
      dict set reply template notfound

      dict set reply mixin reply ::httpd::content.template
    }
    set pageobj [::httpd::reply create ::httpd::object::$uuid [self]]



    tailcall $pageobj dispatch $sock $reply















  }




















  method counter which {
    my variable counters
    incr counters($which)
  }




  method CheckTimeout {} {
    foreach obj [info commands ::httpd::object::*] {
      try {
        $obj timeOutCheck
      } on error {} {
        $obj clay refcount_decr
      }
    }
    ::clay::cleanup
  }
  method debug args {}
  method dispatch {data} {
    set reply [my Dispatch_Local $data]
    if {[dict size $reply]} {
      return $reply
    }
    return [my Dispatch_Default $data]
  }
  method Dispatch_Default {reply} {
    ###
    # Fallback to docroot handling
    ###
    set doc_root [dict getnull $reply http DOCUMENT_ROOT]



    if {$doc_root ne {}} {
      ###
      # Fall back to doc_root handling
      ###
      dict set reply prefix {}
      dict set reply path $doc_root
      dict set reply mixin reply httpd::content.file
      return $reply
    }
    return {}
  }
  method Dispatch_Local data {}
  method Headers_Local {varname} {}
  method Headers_Process varname {}
  method HostName ipaddr {
    if {![my clay get server/ reverse_dns]} {
      return $ipaddr
    }
    set t [::dns::resolve $ipaddr]
    set result [::dns::name $t]
    ::dns::cleanup $t
    return $result
  }
  method log args {
    # Do nothing for now
  }
  method plugin {slot {class {}}} {
    if {$class eq {}} {
      set class ::httpd::plugin.$slot
    }
    if {[info command $class] eq {}} {
      error "Class $class for plugin $slot does not exist"
    }
    my clay mixinmap $slot $class
    set mixinmap [my clay mixinmap]

    ###
    # Perform action on load
    ###
    set script [$class clay search plugin/ load]
    eval $script

    ###
    # rebuild the dispatch method
    ###
    set body "\n try \{"
    append body \n {
  set reply [my Dispatch_Local $data]
  if {[dict size $reply]} {return $reply}
}

    foreach {slot class} $mixinmap {
      set script [$class clay search plugin/ dispatch]
      if {[string length $script]} {
        append body \n "# SLOT $slot"
        append body \n $script
      }
    }
    append body \n {  return [my Dispatch_Default $data]}
    append body \n "\} on error \{err errdat\} \{"
    append body \n {  puts [list DISPATCH ERROR [dict get $errdat -errorinfo]] ; return {}}
    append body \n "\}"
    oo::objdefine [self] method dispatch data $body
    ###
    # rebuild the Headers_Process method
    ###
    set body "\n try \{"
    append body \n "  upvar 1 \$varname query"
    append body \n {  my Headers_Local query}
    foreach {slot class} $mixinmap {
      set script [$class clay search plugin/ headers]
      if {[string length $script]} {
        append body \n "# SLOT $slot"
        append body \n $script
      }
    }
    append body \n "\} on error \{err errdat\} \{"
    append body \n {  puts [list HEADERS ERROR [dict get $errdat -errorinfo]] ; return {}}
    append body \n "\}"

    oo::objdefine [self] method Headers_Process varname $body

    ###
    # rebuild the Threads_Start method
    ###
    set body "\n try \{"
    foreach {slot class} $mixinmap {
      set script [$class clay search plugin/ thread]
      if {[string length $script]} {
        append body \n "# SLOT $slot"
        append body \n $script
      }
    }
    append body \n "\} on error \{err errdat\} \{"
    append body \n {  puts [list THREAD START ERROR [dict get $errdat -errorinfo]] ; return {}}
    append body \n "\}"
    oo::objdefine [self] method Thread_start {} $body
  }
  method port_listening {} {
    my variable port_listening
    return $port_listening
  }
  method PrefixNormalize prefix {
    set prefix [string trimright $prefix /]
    set prefix [string trimright $prefix *]
    set prefix [string trimright $prefix /]
    return $prefix
  }
  method source {filename} {
    source $filename
  }
  method start {} {
    # Build a namespace to contain replies
    namespace eval [namespace current]::reply {}

    my variable socklist port_listening
    if {[my clay get server/ configuration_file] ne {}} {
      source [my clay get server/ configuration_file]
    }
    set port [my clay get server/ port]
    if { $port in {auto {}} } {
      package require nettool
      set port [::nettool::allocate_port 8015]
    }
    set port_listening $port
    set myaddr [my clay get server/ myaddr]
    my debug [list [self] listening on $port $myaddr]

    if {$myaddr ni {all any * {}}} {
      foreach ip $myaddr {
        lappend socklist [socket -server [namespace code [list my connect]] -myaddr $ip $port]
      }
    } else {
      lappend socklist [socket -server [namespace code [list my connect]] $port]
    }
    ::cron::every [self] 120 [namespace code {my CheckTimeout}]
    my Thread_start
  }

  method stop {} {
    my variable socklist
    if {[info exists socklist]} {
      foreach sock $socklist {
        catch {close $sock}
      }
    }
    set socklist {}
    ::cron::cancel [self]
  }
  Ensemble SubObject::db {} {
    return [namespace current]::Sqlite_db
  }
  Ensemble SubObject::default {} {
    return [namespace current]::$method
  }
  method template page {
    my variable template
    if {[info exists template($page)]} {
      return $template($page)
    }
    set template($page) [my TemplateSearch $page]
    return $template($page)
  }

  method TemplateSearch page {
    set doc_root [my clay get server/ doc_root]
    if {$doc_root ne {} && [file exists [file join $doc_root $page.tml]]} {
      return [::fileutil::cat [file join $doc_root $page.tml]]
    }
    if {$doc_root ne {} && [file exists [file join $doc_root $page.html]]} {
      return [::fileutil::cat [file join $doc_root $page.html]]
    }
    switch $page {
      redirect {
return {
[my html_header "$HTTP_STATUS"]
The page you are looking for: <b>[my request get REQUEST_PATH]</b> has moved.
<p>
If your browser does not automatically load the new location, it is
<a href=\"$msg\">$msg</a>
[my html_footer]
}
      }
      internal_error {
        return {
[my html_header "$HTTP_STATUS"]


Error serving <b>[my request get REQUEST_PATH]</b>:
<p>
The server encountered an internal server error: <pre>$msg</pre>
<pre><code>
$errorInfo
</code></pre>
[my html_footer]


        }
      }
      notfound {
        return {
[my html_header "$HTTP_STATUS"]


The page you are looking for: <b>[my request get REQUEST_PATH]</b> does not exist.
[my html_footer]


        }
      }
    }
  }
  method Thread_start {} {}
  method Uuid_Generate {} {
    return [::clay::uuid::short]
  }





  method Validate_Connection {sock ip} {
    return 0
  }
}
::clay::define ::httpd::server::dispatch {
    superclass ::httpd::server
}

###
# END: server.tcl
###
###
# START: dispatch.tcl
###
::clay::define ::httpd::content.redirect {
  method reset {} {
    ###
    # Inject the location into the HTTP headers
    ###
    my variable reply_body
    set reply_body {}
    my reply replace    [my HttpHeaders_Default]
    my reply set Server [my <server> clay get server/ string]
    set msg [my clay get LOCATION]
    my reply set Location [my clay get LOCATION]
    set code  [my clay get REDIRECT_CODE]
    if {$code eq {}} {
      set code 301
    }
    my reply set Status [list $code [my http_code_string $code]]
  }
  method content {} {
    set template [my <server> template redirect]
    set msg [my clay get LOCATION]
    set HTTP_STATUS [my reply get Status]
    my puts [subst $msg]
  }
}
::clay::define ::httpd::content.cache {
  method Dispatch {} {
    my variable chan
    my wait writable $chan
    chan configure $chan  -translation {binary binary}
    chan puts -nonewline $chan [my clay get cache/ data]
  }
}
::clay::define ::httpd::content.template {
  method content {} {
    if {[my request get HTTP_STATUS] ne {}} {
      my reply set Status [my request get HTTP_STATUS]
    }
    set request [my request dump]
    dict with request {}
    my puts [subst [my <server> template [my clay get template]]]
  }
}

###
# END: dispatch.tcl
###
###
# START: file.tcl
###
::clay::define ::httpd::content.file {
  method FileName {} {
    # Some dispatchers will inject a fully qualified name during discovery
    if {[my clay exists FILENAME] && [file exists [my clay get FILENAME]]} {
      my request set PREFIX_URI [file dirname [my clay get FILENAME]]
      return [my clay get FILENAME]
    }
    set uri [string trimleft [my request get REQUEST_PATH] /]
    set path [my clay get path]
    set prefix [my clay get prefix]
    set fname [string range $uri [string length $prefix] end]
    if {$fname in "{} index.html index.md index index.tml index.tcl"} {
      return $path
    }
    if {[file exists [file join $path $fname]]} {
      return [file join $path $fname]
    }
    if {[file exists [file join $path $fname.md]]} {
      return [file join $path $fname.md]
    }
    if {[file exists [file join $path $fname.html]]} {
      return [file join $path $fname.html]
    }
    if {[file exists [file join $path $fname.tml]]} {
      return [file join $path $fname.tml]
    }
    if {[file exists [file join $path $fname.tcl]]} {
      return [file join $path $fname.tcl]
    }
    return {}
  }
  method DirectoryListing {local_file} {
    set uri [string trimleft [my request get REQUEST_PATH] /]
    set path [my clay get path]
    set prefix [my clay get prefix]
    set fname [string range $uri [string length $prefix] end]
    my puts [my html_header "Listing of /$fname/"]
    my puts "Listing contents of /$fname/"
    my puts "<TABLE>"
    if {$prefix ni {/ {}}} {
      set updir [file dirname $prefix]
      if {$updir ne {}} {
        my puts "<TR><TD><a href=\"/$updir\">..</a></TD><TD></TD></TR>"
      }
    }
    foreach file [glob -nocomplain [file join $local_file *]] {
      if {[file isdirectory $file]} {
        my puts "<TR><TD><a href=\"[file join / $uri [file tail $file]]\">[file tail $file]/</a></TD><TD></TD></TR>"
      } else {
        my puts "<TR><TD><a href=\"[file join / $uri [file tail $file]]\">[file tail $file]</a></TD><TD>[file size $file]</TD></TR>"
      }
    }
    my puts "</TABLE>"
    my puts [my html_footer]
  }
  method content {} {
    my variable reply_file
    set local_file [my FileName]
    if {$local_file eq {} || ![file exist $local_file]} {
      my log httpNotFound [my request get REQUEST_PATH]
      my error 404 {File Not Found}
      tailcall my DoOutput
    }
    if {[file isdirectory $local_file] || [file tail $local_file] in {index index.html index.tml index.md}} {
      my request set PREFIX_URI [my request get REQUEST_PATH]
      my request set LOCAL_DIR $local_file
      ###
      # Produce an index page
      ###
      set idxfound 0
      foreach name {
        index.tcl
        index.html
        index.tml
        index.md
        index.info
        index.clay
        content.htm
      } {
        if {[file exists [file join $local_file $name]]} {
          set idxfound 1
          set local_file [file join $local_file $name]
          break
        }
      }
      if {!$idxfound} {
        tailcall my DirectoryListing $local_file
      }
    } else {
      my request set PREFIX_URI [file dirname [my request get REQUEST_PATH]]
      my request set LOCAL_DIR [file dirname $local_file]
    }
    my request set LOCAL_FILE $local_file

    switch [file extension $local_file] {
      .apng {
        my reply set Content-Type {image/apng}
        set reply_file $local_file
      }
      .bmp {
        my reply set Content-Type {image/bmp}
        set reply_file $local_file
      }
      .css {
        my reply set Content-Type {text/css}
        set reply_file $local_file
      }
      .gif {
        my reply set Content-Type {image/gif}
        set reply_file $local_file
      }
      .cur - .ico {
        my reply set Content-Type {image/x-icon}
        set reply_file $local_file
      }
      .jpg - .jpeg - .jfif - .pjpeg - .pjp {
        my reply set Content-Type {image/jpg}
        set reply_file $local_file
      }
      .js {
        my reply set Content-Type {text/javascript}
        set reply_file $local_file
      }
      .md {
        package require Markdown
        my reply set Content-Type {text/html; charset=UTF-8}
        set mdtxt  [::fileutil::cat $local_file]
        my puts [::Markdown::convert $mdtxt]
      }
      .png {
        my reply set Content-Type {image/png}
        set reply_file $local_file
      }
      .svgz -
      .svg {
        # FU magic screws it up
        my reply set Content-Type {image/svg+xml}
        set reply_file $local_file
      }
      .tcl {
        my reply set Content-Type {text/html; charset=UTF-8}
        try {
          source $local_file
        } on error {err errdat} {
          my error 500 {Internal Error} [dict get $errdat -errorinfo]
        }
      }
      .tiff {
        my reply set Content-Type {image/tiff}
        set reply_file $local_file
      }
      .tml {
        my reply set Content-Type {text/html; charset=UTF-8}
        set tmltxt  [::fileutil::cat $local_file]
        set headers [my request dump]
        dict with headers {}
        my puts [subst $tmltxt]
      }
      .txt {
        my reply set Content-Type {text/plain}
        set reply_file $local_file
      }
      .webp {
        my reply set Content-Type {image/webp}
        set reply_file $local_file
      }
      default {
        ###
        # Assume we are returning a binary file
        ###
        my reply set Content-Type [::httpd::mime-type $local_file]
        set reply_file $local_file
      }
    }
  }
  method Dispatch {} {
    my variable reply_body reply_file reply_chan chan
    try {
      my reset
      # Invoke the URL implementation.
      my content
    } on error {err errdat} {
      my error 500 $err [dict get $errdat -errorinfo]
      catch {
        tailcall my DoOutput
      }
    }
    if {$chan eq {}} return
    catch {
      # Causing random issues. Technically a socket is always open for read and write
      # anyway
      #my wait writable $chan
      if {![info exists reply_file]} {
        tailcall my DoOutput
      }
      chan configure $chan  -translation {binary binary}
      my log HttpAccess {}
      ###
      # Return a stream of data from a file
      ###
      set size [file size $reply_file]
      my reply set Content-Length $size
      append result [my reply output] \n
      chan puts -nonewline $chan $result
      set reply_chan [open $reply_file r]
      my ChannelRegister $reply_chan
      my log SendReply [list length $size]
      ###
      # Output the file contents. With no -size flag, channel will copy until EOF
      ###
      chan configure $reply_chan -translation {binary binary} -buffersize 4096 -buffering full -blocking 0
      if {$size < 40960} {
        # Raw copy small files
        chan copy $reply_chan $chan
      } else {
        my ChannelCopy $reply_chan $chan -chunk 4096
      }
    }
  }
}

###
# END: file.tcl
###
###
# START: proxy.tcl
###
::clay::define ::httpd::content.exec {
  variable exename [list tcl [info nameofexecutable] .tcl [info nameofexecutable]]
  method CgiExec {execname script arglist} {
    if { $::tcl_platform(platform) eq "windows"} {
      if {[file extension $script] eq ".exe"} {
        return [open "|[list $script] $arglist" r+]
      } else {
        if {$execname eq {}} {
          set execname [my Cgi_Executable $script]
        }
        return [open "|[list $execname $script] $arglist" r+]
      }
    } else {
      if {$execname eq {}} {
        return [open "|[list $script] $arglist 2>@1" r+]
      } else {
        return [open "|[list $execname $script] $arglist 2>@1" r+]
      }
    }
    error "CGI Not supported"
  }
  method Cgi_Executable {script} {
    if {[string tolower [file extension $script]] eq ".exe"} {
      return $script
    }
    my variable exename
    set ext [file extension $script]
    if {$ext eq {}} {
      set which [file tail $script]
    } else {
      if {[dict exists exename $ext]} {
        return [dict get $exename $ext]
      }
      switch $ext {
        .pl {
          set which perl
        }
        .py {
          set which python
        }
        .php {
          set which php
        }
        .fossil - .fos {
          set which fossil
        }
        default {
          set which tcl
        }
      }
      if {[dict exists exename $which]} {
        set result [dict get $exename $which]
        dict set exename $ext $result
        return $result
      }
    }
    if {[dict exists exename $which]} {
      return [dict get $exename $which]
    }
    if {$which eq "tcl"} {
      if {[my clay get tcl_exe] ne {}} {
        dict set exename $which [my clay get tcl_exe]
      } else {
        dict set exename $which [info nameofexecutable]
      }
    } else {
      if {[my clay get ${which}_exe] ne {}} {
        dict set exename $which [my clay get ${which}_exe]
      } elseif {"$::tcl_platform(platform)" == "windows"} {
        dict set exename $which $which.exe
      } else {
        dict set exename $which $which
      }
    }
    set result [dict get $exename $which]
    if {$ext ne {}} {
      dict set exename $ext $result
    }
    return $result
  }
}
::clay::define ::httpd::content.proxy {
  superclass ::httpd::content.exec
  method proxy_channel {} {
    ###
    # This method returns a channel to the
    # proxied socket/stdout/etc
    ###
    error unimplemented
  }
  method proxy_path {} {
    set uri [string trimleft [my request get REQUEST_URI] /]
    set prefix [my clay get prefix]
    return /[string range $uri [string length $prefix] end]
  }
  method ProxyRequest {chana chanb} {
    chan event $chanb writable {}
    my log ProxyRequest {}
    chan puts $chanb "[my request get REQUEST_METHOD] [my proxy_path]"
    set mimetxt [my clay get mimetxt]
    chan puts $chanb [my clay get mimetxt]
    set length [my request get CONTENT_LENGTH]
    if {$length} {
      chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
      chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
      ###
      # Send any POST/PUT/etc content
      ###
      my ChannelCopy $chana $chanb -size $length
    } else {
      chan flush $chanb
    }
    chan event $chanb readable [info coroutine]
    yield
  }
  method ProxyReply {chana chanb args} {
    my log ProxyReply [list args $args]
    chan event $chana readable {}
    set readCount [::coroutine::util::gets_safety $chana 4096 reply_status]
    set replyhead [my HttpHeaders $chana]
    set replydat  [my MimeParse $replyhead]

    ###
    # Read the first incoming line as the HTTP reply status
    # Return the rest of the headers verbatim
    ###
    set replybuffer "$reply_status\n"
    append replybuffer $replyhead
    chan configure $chanb -translation {auto crlf} -blocking 0 -buffering full -buffersize 4096
    chan puts $chanb $replybuffer
    ###
    # Output the body. With no -size flag, channel will copy until EOF
    ###
    chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
    my ChannelCopy $chana $chanb -chunk 4096
  }
  method Dispatch {} {
    my variable sock chan
    if {[catch {my proxy_channel} sock errdat]} {
      my error 504 {Service Temporarily Unavailable} [dict get $errdat -errorinfo]
      tailcall my DoOutput
    }
    if {$sock eq {}} {
      my error 404 {Not Found}
      tailcall my DoOutput
    }
    my log HttpAccess {}
    chan event $sock writable [info coroutine]
    yield
    my ChannelRegister $sock
    my ProxyRequest $chan $sock
    my ProxyReply   $sock $chan
  }
}

###
# END: proxy.tcl
###
###
# START: cgi.tcl
###
::clay::define ::httpd::content.cgi {
  superclass ::httpd::content.proxy
  method FileName {} {
    set uri [string trimleft [my request get REQUEST_PATH] /]
    set path [my clay get path]
    set prefix [my clay get prefix]

    set fname [string range $uri [string length $prefix] end]
    if {[file exists [file join $path $fname]]} {
      return [file join $path $fname]
    }
    if {[file exists [file join $path $fname.fossil]]} {
      return [file join $path $fname.fossil]
    }
    if {[file exists [file join $path $fname.fos]]} {
      return [file join $path $fname.fos]
    }
    if {[file extension $fname] in {.exe .cgi .tcl .pl .py .php}} {
      return $fname
    }
    return {}
  }
  method proxy_channel {} {
    ###
    # When delivering static content, allow web caches to save
    ###
    set local_file [my FileName]
    if {$local_file eq {} || ![file exist $local_file]} {
      my log httpNotFound [my request get REQUEST_PATH]
      my error 404 {Not Found}
      tailcall my DoOutput
    }
    if {[file isdirectory $local_file]} {
      ###
      # Produce an index page... or error
      ###
      tailcall my DirectoryListing $local_file
    }

    set verbatim {
      CONTENT_LENGTH CONTENT_TYPE QUERY_STRING REMOTE_USER AUTH_TYPE
      REQUEST_METHOD REMOTE_ADDR REMOTE_HOST REQUEST_URI REQUEST_PATH
      REQUEST_VERSION  DOCUMENT_ROOT QUERY_STRING REQUEST_RAW
      GATEWAY_INTERFACE SERVER_PORT SERVER_HTTPS_PORT
      SERVER_NAME  SERVER_SOFTWARE SERVER_PROTOCOL
    }
    foreach item $verbatim {
      set ::env($item) {}
    }
    foreach item [array names ::env HTTP_*] {
      set ::env($item) {}
    }
    set ::env(SCRIPT_NAME) [my request get REQUEST_PATH]
    set ::env(SERVER_PROTOCOL) HTTP/1.0
    set ::env(HOME) $::env(DOCUMENT_ROOT)
    foreach {f v} [my request dump] {
      set ::env($f) $v
    }
  	set arglist $::env(QUERY_STRING)
    set pwd [pwd]
    cd [file dirname $local_file]
    set script_file $local_file
    if {[file extension $local_file] in {.fossil .fos}} {
      if {![file exists $local_file.cgi]} {
        set fout [open $local_file.cgi w]
        chan puts $fout "#!/usr/bin/fossil"
        chan puts $fout "repository: $local_file"
        close $fout
      }
      set script_file $local_file.cgi
      set EXE [my Cgi_Executable fossil]
    } else {
      set EXE [my Cgi_Executable $local_file]
    }
    set ::env(PATH_TRANSLATED) $script_file
    set pipe [my CgiExec $EXE $script_file $arglist]
    cd $pwd
    return $pipe
  }
  method ProxyRequest {chana chanb} {
    chan event $chanb writable {}
    my log ProxyRequest {}
    set length [my request get CONTENT_LENGTH]
    if {$length} {
      chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
      chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
      ###
      # Send any POST/PUT/etc content
      ###
      my ChannelCopy $chana $chanb -size $length
    } else {
      chan flush $chanb
    }
    my clay refcount_incr
    chan event $chanb readable [info coroutine]
    yield
  }
  method ProxyReply {chana chanb args} {
    my log ProxyReply [list args $args]
    chan event $chana readable {}
    set replyhead [my HttpHeaders $chana]
    set replydat  [my MimeParse $replyhead]
    if {![dict exists $replydat Content-Length]} {
      set length 0
    } else {
      set length [dict get $replydat Content-Length]
    }
    ###
    # Convert the Status: header from the CGI process to
    # a standard service reply line from a web server, but
    # otherwise spit out the rest of the headers verbatim
    ###
    set replybuffer "HTTP/1.0 [dict get $replydat Status]\n"
    append replybuffer $replyhead
    chan configure $chanb -translation {auto crlf} -blocking 0 -buffering full -buffersize 4096
    chan puts $chanb $replybuffer
    ###
    # Output the body. With no -size flag, channel will copy until EOF
    ###
    chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
    my ChannelCopy $chana $chanb -chunk 4096
    my clay refcount_decr
  }
  method DirectoryListing {local_file} {
    my error 403 {Not Allowed}
    tailcall my DoOutput
  }
}

###
# END: cgi.tcl
###
###
# START: scgi.tcl
###
::clay::define ::httpd::protocol.scgi {
  method EncodeStatus {status} {
    return "Status: $status"
  }
}
::clay::define ::httpd::content.scgi {
  superclass ::httpd::content.proxy
  method scgi_info {} {
    ###
    # This method should check if a process is launched
    # or launch it if needed, and return a list of
    # HOST PORT SCRIPT_NAME
    ###
    # return {localhost 8016 /some/path}
    error unimplemented
  }
  method proxy_channel {} {
    set sockinfo [my scgi_info]
    if {$sockinfo eq {}} {
      my error 404 {Not Found}
      tailcall my DoOutput
    }
    lassign $sockinfo scgihost scgiport scgiscript
    my clay set  SCRIPT_NAME $scgiscript
    if {![string is integer $scgiport]} {
      my error 404 {Not Found}
      tailcall my DoOutput
    }
    return [::socket $scgihost $scgiport]
  }
  method ProxyRequest {chana chanb} {
    chan event $chanb writable {}
    my log ProxyRequest {}
    chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
    set info [dict create CONTENT_LENGTH 0 SCGI 1.0 SCRIPT_NAME [my clay get SCRIPT_NAME]]
    foreach {f v} [my request dump] {
      dict set info $f $v
    }
    set length [dict get $info CONTENT_LENGTH]
    set block {}
    foreach {f v} $info {
      append block [string toupper $f] \x00 $v \x00
    }
    chan puts -nonewline $chanb "[string length $block]:$block,"
    # Light off another coroutine
    #set cmd [list coroutine [my CoroName] {*}[namespace code [list my ProxyReply $chanb $chana]]]
    if {$length} {
      chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
      chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
      ###
      # Send any POST/PUT/etc content
      ###
      my ChannelCopy $chana $chanb -size $length
      #chan copy $chana $chanb -size $length -command [info coroutine]
    } else {
      chan flush $chanb
    }
    chan event $chanb readable [info coroutine]
    yield
  }
  method ProxyReply {chana chanb args} {
    my log ProxyReply [list args $args]
    chan event $chana readable {}
    set replyhead [my HttpHeaders $chana]
    set replydat  [my MimeParse $replyhead]
    ###
    # Convert the Status: header from the CGI process to
    # a standard service reply line from a web server, but
    # otherwise spit out the rest of the headers verbatim
    ###
    set replybuffer "HTTP/1.0 [dict get $replydat Status]\n"
    append replybuffer $replyhead
    chan configure $chanb -translation {auto crlf} -blocking 0 -buffering full -buffersize 4096
    chan puts $chanb $replybuffer
    ###
    # Output the body. With no -size flag, channel will copy until EOF
    ###
    chan configure $chana -translation binary -blocking 0 -buffering full -buffersize 4096
    chan configure $chanb -translation binary -blocking 0 -buffering full -buffersize 4096
    my ChannelCopy $chana $chanb -chunk 4096
  }
}
::clay::define ::httpd::server.scgi {
  superclass ::httpd::server
  clay set socket/ buffersize   32768
  clay set socket/ blocking     0
  clay set socket/ translation  {binary binary}
  method debug args {
    puts $args
  }
  method Connect {uuid sock ip} {
    yield [info coroutine]
    chan event $sock readable {}
    chan configure $sock \
        -blocking 1 \
        -translation {binary binary} \
        -buffersize 4096 \
        -buffering none
    my counter url_hit
    try {
      # Read the SCGI request on byte at a time until we reach a ":"
      dict set query http HTTP_HOST {}
      dict set query http CONTENT_LENGTH 0
      dict set query http REQUEST_URI /
      dict set query http REMOTE_ADDR $ip
      dict set query http DOCUMENT_ROOT [my clay get server/ doc_root]
      set size {}
      while 1 {
        set char [::coroutine::util::read $sock 1]
        if {[chan eof $sock]} {
          catch {close $sock}
          return
        }
        if {$char eq ":"} break
        append size $char
      }
      # With length in hand, read the netstring encoded headers
      set inbuffer [::coroutine::util::read $sock [expr {$size+1}]]
      chan configure $sock -translation {auto crlf} -blocking 0 -buffersize 4096 -buffering full
      foreach {f v} [lrange [split [string range $inbuffer 0 end-1] \0] 0 end-1] {
        dict set query http $f $v
      }
      if {![dict exists $query http REQUEST_PATH]} {
        set uri [dict get $query http REQUEST_URI]
        set uriinfo [::uri::split $uri]
        dict set query http REQUEST_PATH    [dict get $uriinfo path]
      }
      set reply [my dispatch $query]
    } on error {err errdat} {
      my debug [list uri: [dict getnull $query http REQUEST_URI] ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      my log BadRequest $uuid [list ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      catch {chan puts $sock "HTTP/1.0 400 Bad Request (The data is invalid)"}
      catch {chan event readable $sock {}}
      catch {chan event writeable $sock {}}
      catch {chan close $sock}
      return
    }
    if {[dict size $reply]==0} {
      my log BadLocation $uuid $query
      dict set query http HTTP_STATUS 404
      dict set query template notfound
      dict set query mixin reply ::httpd::content.template
    }
    try {
      set pageobj [::httpd::reply create ::httpd::object::$uuid [self]]
      dict set reply mixin protocol ::httpd::protocol.scgi
      $pageobj dispatch $sock $reply
    } on error {err errdat} {
      my debug [list ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      my log BadRequest $uuid [list ip: $ip error: $err errorinfo: [dict get $errdat -errorinfo]]
      $pageobj clay refcount_decr
      catch {chan event readable $sock {}}
      catch {chan event writeable $sock {}}
      catch {chan close $sock}
      return
    }
  }
}

###
# END: scgi.tcl
###
###
# START: websocket.tcl
###
::clay::define ::httpd::content.websocket {
}

###
# END: websocket.tcl
###
###
# START: plugin.tcl
###
::clay::define ::httpd::plugin {
  clay set plugin/ load {}
  clay set plugin/ headers {}
  clay set plugin/ dispatch {}
  clay set plugin/ local_config {}
  clay set plugin/ thread {}
}
::clay::define ::httpd::plugin.dict_dispatch {
  clay set plugin/ dispatch {
    set reply [my Dispatch_Dict $data]
    if {[dict size $reply]} {
      return $reply
    }
  }
  method Dispatch_Dict {data} {
    my variable url_patterns
    set vhost [lindex [split [dict get $data http HTTP_HOST] :] 0]
    set uri   [dict get $data http REQUEST_PATH]
    foreach {host hostpat} $url_patterns {
      if {![string match $host $vhost]} continue
      foreach {pattern info} $hostpat {
        if {![string match $pattern $uri]} continue
        set buffer $data
        foreach {f v} $info {
          dict set buffer $f $v
        }
        return $buffer
      }
    }
    return {}
  }
  Ensemble uri::add {vhosts patterns info} {
    my variable url_patterns
    foreach vhost $vhosts {
      foreach pattern $patterns {
        set data $info
        if {![dict exists $data prefix]} {
           dict set data prefix [my PrefixNormalize $pattern]
        }
        dict set url_patterns $vhost [string trimleft $pattern /] $data
      }
    }
  }
  Ensemble uri::direct {vhosts patterns info body} {
    my variable url_patterns url_stream
    set cbody {}
    if {[dict exists $info superclass]} {
      append cbody \n "superclass {*}[dict get $info superclass]"
      dict unset info superclass
    }
    append cbody \n [list method content {} $body]

    set class [namespace current]::${vhosts}/${patterns}
    set class [string map {* %} $class]
    ::clay::define $class $cbody
    dict set info mixin content $class
    my uri add $vhosts $patterns $info
  }
}
::clay::define ::httpd::reply.memchan {
  superclass ::httpd::reply
  method output {} {
    my variable reply_body
    return $reply_body
  }
  method DoOutput {} {}
  method close {} {
    # Neuter the channel closing mechanism we need the channel to stay alive
    # until the reader sucks out the info
  }
}
::clay::define ::httpd::plugin.local_memchan {
  clay set plugin/ load {
package require tcl::chan::events
package require tcl::chan::memchan
  }
  method local_memchan {command args} {
    my variable sock_to_coro
    switch $command {
      geturl {
        ###
        # Hook to allow a local process to ask for data without a socket
        ###
        set uuid [my Uuid_Generate]
        set ip 127.0.0.1
        set sock [::tcl::chan::memchan]
        set output [coroutine ::httpd::coro::$uuid {*}[namespace code [list my Connect_Local $uuid $sock GET {*}$args]]]
        return $output
      }
      default {
        error "Valid: connect geturl"
      }
    }
  }
  method Connect_Local {uuid sock args} {
    chan event $sock readable {}

    chan configure $sock \
      -blocking 0 \
      -translation {auto crlf} \
      -buffering line
    set ip 127.0.0.1
    dict set query UUID $uuid
    dict set query http UUID $uuid
    dict set query http HTTP_HOST       localhost
    dict set query http REMOTE_ADDR     127.0.0.1
    dict set query http REMOTE_HOST     localhost
    dict set query http LOCALHOST 1
    my counter url_hit

    dict set query http REQUEST_METHOD  [lindex $args 0]
    set uriinfo [::uri::split [lindex $args 1]]
    dict set query http REQUEST_URI     [lindex $args 1]
    dict set query http REQUEST_PATH    [dict get $uriinfo path]
    dict set query http REQUEST_VERSION [lindex [split [lindex $args end] /] end]
    dict set query http DOCUMENT_ROOT   [my clay get server/ doc_root]
    dict set query http QUERY_STRING    [dict get $uriinfo query]
    dict set query http REQUEST_RAW     $args
    dict set query http SERVER_PORT     [my port_listening]
    my Headers_Process query
    set reply [my dispatch $query]

    if {[llength $reply]==0} {
      my log BadLocation $uuid $query
      my log BadLocation $uuid $query
      dict set query http HTTP_STATUS 404
      dict set query template notfound
      dict set query mixin reply ::httpd::content.template
    }

    set class ::httpd::reply.memchan
    set pageobj [$class create ::httpd::object::$uuid [self]]
    if {[dict exists $reply mixin]} {
      set mixinmap [dict get $reply mixin]
    } else {
      set mixinmap {}
    }
    foreach item [dict keys $reply MIXIN_*] {
      set slot [string range $reply 6 end]
      dict set mixinmap [string tolower $slot] [dict get $reply $item]
    }
    $pageobj clay mixinmap {*}$mixinmap
    if {[dict exists $reply delegate]} {
      $pageobj clay delegate {*}[dict get $reply delegate]
    }
    $pageobj dispatch $sock $reply
    set output [$pageobj output]
    $pageobj clay refcount_decr
    return $output
  }
}

###
# END: plugin.tcl
###
###
# START: cuneiform.tcl
###

###
# END: cuneiform.tcl
###

    namespace eval ::httpd {
	namespace export *
    }


|
<
<
|
>
>
>
|
<
|
|
>

|
<

<


<
|
|
<
<
<
<
|
|
<
|
<
|
|
<
<
<
<
<
|
<
|
>
|
<
<
<
<
<
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
|
<
<
|
<
<
<
|
|
<
|
<
|
<
<
<
<
|
<
<
<
<
<
<
<
|
|
|
<
|
<
|
<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
|
>
>
>
>
>
|
|
>
>
>
>
>
|
>
>


<










|
|
|
|
|
<
|
<
<



|

>
|
<
|
|
<
|
>
|
>
>
>
|
|
|
|
<
>
|
|
>
>
>


>

<






|


















|
>


|
>





<

|
<
>
>

<
|
<
|
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<
<
|
<
<
|

<
<
<
<
<
<
|
<
<
<
>


<



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>






<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|




<
<
|
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<



|









|







>
|






|


>
|


|
|
>
>
>
>
>
>
>
>
>
>




<
<
<
<
|
<
<
<
<
<
<
<
>
>
>
|
|
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
|
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<


|
|
|


>
>
>
>

|
|



<
|
|
|
|
|
>
>
>






|
|
|
|

<
<
|
|
<
<
|
|
|
|
|
<
<
<
|
|
|
|
<
|
|
<
<
<
<
<
<
<
<
|
<
<
<
<
|
<
<
|
<
<



>


|
|





|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




>
>
>
>
>
>
>
>
>
>

>

|
<
|
|
>
|
>
>
>
|
>
>
>
|
>
|

<
>
|
<
|


|
|
|
|
|
>
|
|
|
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




>
>
>
>

|



|


<

<
<
<
<
<
|
<
<
<
|
<
|
<
>
>
>
|
|
<
<
<
<
<
<
<
<
<
<
<
<
|
<
|
|
<
<
<
<
|



<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




<
<
<
<
<
|
<
<
<



|

<
<
<
|





|
|
|








<

>










<
<
|
<
<
|








>

|







<
<
<
<
<
<
<
<
<
<


|
>
>
|

|

|

<
>
>




|
>
>
|
<
>
>




<
<
<
|
>
>
>
>
>




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
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
89
90
91
92
93
94
95

96


97
98
99
100
101
102
103

104
105

106
107
108
109
110
111
112
113
114
115

116
117
118
119
120
121
122
123
124
125

126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161

162
163

164
165
166

167

168











169
170




171


172
173






174



175
176
177

178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335









336























































































































































































































































337
338
339
340
341
342


343











344
345









346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397




398







399
400
401
402
403










404
405




























406




























407
408










409










410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426

427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445


446
447


448
449
450
451
452



453
454
455
456

457
458








459




460


461


462
463
464
465
466
467
468
469
470
471
472
473
474
475








































476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493

494
495
496
497
498
499
500
501
502
503
504
505
506
507
508

509
510

511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578

579





580



581

582

583
584
585
586
587












588

589
590




591
592
593
594



595




































































596
597
598
599





600



601
602
603
604
605



606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622

623
624
625
626
627
628
629
630
631
632
633
634


635


636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654










655
656
657
658
659
660
661
662
663
664
665

666
667
668
669
670
671
672
673
674
675

676
677
678
679
680
681



682
683
684
685
686
687
688
689
690
691
















































































































































































































































































































































































































































































692





















693























































































































































































































































































































































































































































###
# Author: Sean Woods, yoda@etoyoc.com


##
# Adapted from the "minihttpd.tcl" file distributed with Tclhttpd
#
# The working elements have been updated to operate as a TclOO object
# running with Tcl 8.6+. Global variables and hard coded tables are

# now resident with the object, allowing this server to be more easily
# embedded another program, as well as be adapted and extended to
# support the SCGI module
###


package require uri

package require cron
package require coroutine

package require tool
package require oo::dialect





namespace eval ::url {}

namespace eval ::httpd {}

namespace eval ::scgi {}






set ::httpd::version 4.0.0


###
# Define the reply class





###
::tool::define ::httpd::reply {





































  property reply_headers_default {


    Status: {200 OK}



    Content-Type: {text/html; charset=ISO-8859-1}
    Cache-Control: {no-cache}

    Connection: close

  } 












  array error_codes {
    200 {Data follows}
    204 {No Content}

    302 {Found}

    304 {Not Modified}


    400 {Bad Request}
    401 {Authorization Required}
    403 {Permission denied}
    404 {Not Found}
    408 {Request Timeout}
    411 {Length Required}
    419 {Expectation Failed}
    500 {Server Internal Error}
    501 {Server Busy}
    503 {Service Unavailable}
    504 {Service Temporarily Unavailable}
    505 {Internal Server Error}
  }
  
  constructor {ServerObj args} {
    my variable chan
    oo::objdefine [self] forward <server> $ServerObj
    foreach {field value} [::oo::meta::args_to_options {*}$args] {
      my meta set config $field: $value
    }
  }
  
  ###
  # clean up on exit
  ###
  destructor {
    my close
  }
  
  method close {} {
    my variable chan
    if {[info exists chan] && $chan ne {}} {
      catch {flush $chan}
      catch {close $chan}
    }
  }
  
  method HttpHeaders {sock {debug {}}} {
    set result {}

    ###
    # Set up a channel event to stream the data from the socket line by
    # line. When a blank line is read, the HttpHeaderLine method will send
    # a flag which will terminate the vwait.
    #
    # We do this rather than entering blocking mode to prevent the process
    # from locking up if it's starved for input. (Or in the case of the test
    # suite, when we are opening a blocking channel on the other side of the
    # socket back to ourselves.)
    ###
    chan configure $sock -translation {crlf crlf} -blocking 0 -buffering line
    my variable MimeHeadersSock
    set MimeHeadersSock($sock) {}
    set MimeHeadersSock($sock.done) {}
    chan event $sock readable [namespace code [list my HttpHeaderLine $sock]]

    vwait [my varname MimeHeadersSock]_$sock.done


    ###
    # Return our buffer
    ###
    return $MimeHeadersSock($sock)
  }
  
  method HttpHeaderLine {sock} {

    my variable MimeHeadersSock
    if {[chan eof $sock]} {

      # Socket closed... die
      tailcall my destroy
    }
    try {
      gets $sock line
      if {$line eq {}} {
        set [my varname MimeHeadersSock]_$sock.done 1
        chan event $sock readable {}
      } else {
        append MimeHeadersSock($sock) $line \n

      }
    } trap {POSIX EBUSY} {err info} {
      # Happens...
    } on error {err info} {
      puts "ERROR $err"
      puts [dict print $info]
    }
  }
  
  method MimeParse mimetext {

    foreach line [split $mimetext \n] {
      # This regexp picks up
      # key: value
      # MIME headers.  MIME headers may be continue with a line
      # that starts with spaces or a tab
      if {[string length [string trim $line]]==0} break
      if {[regexp {^([^ :]+):[ 	]*(.*)} $line dummy key value]} {  
        # The following allows something to
        # recreate the headers exactly
        lappend data(headerlist) $key $value
        # The rest of this makes it easier to pick out
        # headers from the data(mime,headername) array
        #set key [string tolower $key]
        if {[info exists data(mime,$key)]} {
          append data(mime,$key) ,$value
        } else {
          set data(mime,$key) $value
          lappend data(mimeorder) $key
        }
        set data(key) $key
      } elseif {[regexp {^[ 	]+(.*)}  $line dummy value]} {
        # Are there really continuation lines in the spec?
        if {[info exists data(key)]} {
          append data(mime,$data(key)) " " $value
        } else {
          my error 400 "INVALID HTTP HEADER FORMAT: $line"
          tailcall my output
        }
      } else {
        my error 400 "INVALID HTTP HEADER FORMAT: $line"
        tailcall my output
      }
    }
    ###
    # To make life easier for our SCGI implementation rig things
    # such that CONTENT_LENGTH is always first

    ###
    set result {

      CONTENT_LENGTH 0
    }
    foreach {key} $data(mimeorder) {

      switch $key {

        Content-Length {











          dict set result CONTENT_LENGTH $data(mime,$key)
        }




        Content-Type {


          dict set result CONTENT_TYPE $data(mime,$key)
        }






        default {



          dict set result HTTP_[string map {"-" "_"} [string toupper $key]] $data(mime,$key)
        }
      }

    }
    return $result
  }
  
  method dispatch {newsock datastate} {
    my query_headers replace $datastate
    my variable chan rawrequest dipatched_time
    set chan $newsock
    chan event $chan readable {}
    chan configure $chan -translation {auto crlf} -buffering line
    set dispatched_time [clock seconds]
    try {
      if {[my query_headers get REQUEST_METHOD] in {"POST" "PUSH"}} {
        set rawrequest [my HttpHeaders $chan]
        foreach {field value} [my MimeParse $rawrequest] {
          my query_headers set $field $value
        }
      }
      # Dispatch to the URL implementation.
      my content
    } on error {err info} {
      dict print $info
      #puts stderr $::errorInfo
      my error 500 $err [dict get $info -errorinfo]
    } finally {
      my output
    }
  }
  
  dictobj query_headers query_headers {
    initialize {
      CONTENT_LENGTH 0
    }
    netstring {
      set result {}
      foreach {name value} $%VARNAME% {
        append result $name \x00 $value \x00
      }
      return "[string length $result]:$result,"
    }
  }
  dictobj reply_headers reply_headers {
    initialize {
      Content-Type: {text/html; charset=ISO-8859-1}
      Connection: close
    }
  }

  method error {code {msg {}} {errorInfo {}}} {
    puts [list [self] ERROR $code $msg]
    my query_headers set HTTP_ERROR $code
    my reset
    my variable error_codes
    set qheaders [my query_headers dump]
    if {![info exists error_codes($code)]} {
      set errorstring "Unknown Error Code"
    } else {
      set errorstring $error_codes($code)
    }
    dict with qheaders {}
    my reply_headers replace {}
    my reply_headers set Status: "$code $errorstring"
    my reply_headers set Content-Type: {text/html; charset=ISO-8859-1}
    my puts "
<HTML>
<HEAD>
<TITLE>$code $errorstring</TITLE>
</HEAD>
<BODY>"
    if {$msg eq {}} {
      my puts "
Got the error <b>$code $errorstring</b>
<p>
while trying to obtain $REQUEST_URI
      "
    } else {
      my puts "
Guru meditation #[clock seconds]
<p>
The server encountered an internal error:
<p>
<pre>$msg</pre>
<p>
For deeper understanding:
<p>
<pre>$errorInfo</pre>
"
    }
    my puts "</BODY>
</HTML>"
  }
  
  
  ###
  # REPLACE ME:
  # This method is the "meat" of your application.
  # It writes to the result buffer via the "puts" method
  # and can tweak the headers via "meta put header_reply"
  ###
  method content {} {
    my puts "<HTML>"
    my puts "<BODY>"
    my puts "<H1>HELLO WORLD!</H1>"
    my puts "</BODY>"
    my puts "</HTML>"
  }
  
  method EncodeStatus {status} {
    return "HTTP/1.0 $status"
  }

  method output {} {
    my variable chan
    chan event $chan writable [namespace code {my DoOutput}]
  }
  ###
  # Output the result or error to the channel
  # and destroy this object
  ###
  method DoOutput {} {
    my variable reply_body reply_chan chan
    chan event $chan writable {}

    catch {
      chan configure $chan  -translation {binary binary}
      set headers [my reply_headers dump]
      if {[dict exists $headers Status:]} {
        set result "[my EncodeStatus [dict get $headers Status:]]\n"
      } else {
        set result "[my EncodeStatus {505 Internal Error}]\n"
      }
      foreach {key value} $headers {
        # Ignore Status and Content-length, if given
        if {$key in {Status: Content-length:}} continue
        append result "$key $value" \n
      }
      ###
      # Return dynamic content
      ###
      #set reply_body [string trim $reply_body]
      set length [string length $reply_body]
      if {${length} > 0} {
        append result "Content-length: [string length $reply_body]" \n \n
        append result $reply_body
      } else {
        append result \n
      }
      chan puts -nonewline $chan $result
    }
    my destroy
  }
  
  method Url_Decode data {
    regsub -all {\+} $data " " data
    regsub -all {([][$\\])} $data {\\\1} data
    regsub -all {%([0-9a-fA-F][0-9a-fA-F])} $data  {[format %c 0x\1]} data
    return [subst $data]
  }









  























































































































































































































































  method FormData {} {
    my variable formdata
    # Run this only once
    if {[info exists formdata]} {
      return $formdata
    }


    if {[my query_headers get REQUEST_METHOD] in {"POST" "PUSH"}} {











      set body [my PostData]
      switch [my query_headers get CONTENT_TYPE] {









        application/x-www-form-urlencoded {
          # These foreach loops are structured this way to ensure there are matched
          # name/value pairs.  Sometimes query data gets garbled.
      
          set result {}
          foreach pair [split $body "&"] {
            foreach {name value} [split $pair "="] {
              lappend formdata [my Url_Decode $name] [my Url_Decode $value]
            }
          }
        }
      }
    } else {
      foreach pair [split [my query_headers getnull QUERY_STRING] "&"] {
        foreach {name value} [split $pair "="] {
          lappend formdata [my Url_Decode $name] [my Url_Decode $value]
        }
      }
    }
    return $formdata
  }
  
  method PostData {} {
    my variable postdata
    # Run this only once
    if {[info exists postdata]} {
      return $postdata
    }
    set postdata {}
    if {[my query_headers get REQUEST_METHOD] in {"POST" "PUSH"}} {
      my variable chan
      chan configure $chan -translation binary -blocking 0 -buffering full -buffersize 4096
      set length [my query_headers get CONTENT_LENGTH]
      set postdata [read $chan $length]
    }
    return $postdata
  }  

  method TransferComplete args {
    foreach c $args {
      catch {close $c}
    }
    my destroy
  }

  ###
  # Append to the result buffer
  ###
  method puts line {
    my variable reply_body
    append reply_body $line \n
  }












  ###
  # Read out the contents of the POST
  ###
  method query_body {} {
    my variable query_body










    return $query_body
  }

























































  ###
  # Reset the result










  ###










  method reset {} {
    my variable reply_body
    my reply_headers replace [my meta cget reply_headers_default]
    my reply_headers set Server: [my <server> cget server_string]
    my reply_headers set Date: [my timestamp]
    set reply_body {}
  }
  
  ###
  # Return true of this class as waited too long to respond
  ###
  method timeOutCheck {} {
    my variable dipatched_time
    if {([clock seconds]-$dipatched_time)>30} {
      ###
      # Something has lasted over 2 minutes. Kill this
      ###

      my error 505 {Operation Timed out}
      my output
    }
  }
  
  ###
  # Return a timestamp
  ###
  method timestamp {} {
    return [clock format [clock seconds] -format {%a, %d %b %Y %T %Z}]
  }
}

###
# A simplistic web server, with a few caveats:
# 1) It only really understands "GET" style queries.
# 2) It is not hardened in any way against malicious attacks
# 3) By default it will only listen on localhost
###


::tool::define ::httpd::server {
  


  option port  {default: auto}
  option myaddr {default: 127.0.0.1}
  option server_string [list default: [list TclHttpd $::httpd::version]]
  option server_name [list default: [list [info hostname]]]




  property socket buffersize   32768
  property socket translation  {auto crlf}
  property reply_class ::httpd::reply


  constructor {args} {
    my configure {*}$args








    my start




  }


  


  destructor {
    my stop
  }
  
  method connect {sock ip port} {
    ###
    # If an IP address is blocked
    # send a "go to hell" message
    ###
    if {[my Validate_Connection $sock $ip]} {
      catch {close $sock}
      return
    }
    set uuid [::tool::uuid_short] 








































    chan configure $sock \
      -blocking 0 \
      -translation {auto crlf} \
      -buffering line
    
    set coro [coroutine [namespace current]::CORO$uuid ::apply [list {uuid sock ip} {
      yield [info coroutine]
      tailcall my Connect $uuid $sock $ip
    } [namespace current]] $uuid $sock $ip]

    chan event $sock readable $coro
  }
  
  method Connect {uuid sock ip} {
    my counter url_hit
    set line {}
    try {
      set readCount [::coroutine::util::gets_safety $sock 4096 line]

      dict set query REMOTE_ADDR     $ip
      dict set query REQUEST_METHOD  [lindex $line 0]
      set uriinfo [::uri::split [lindex $line 1]]
      dict set query REQUEST_URI     [lindex $line 1]
      dict set query REQUEST_PATH    [dict get $uriinfo path]
      dict set query REQUEST_VERSION [lindex [split [lindex $line end] /] end]
      if {[dict get $uriinfo host] eq {}} {
        dict set query HTTP_HOST [info hostname]
      } else {
        dict set query HTTP_HOST [dict get $uriinfo host]
      }
      dict set query HTTP_CLIENT_IP  $ip
      dict set query QUERY_STRING    [dict get $uriinfo query]
      dict set query REQUEST_RAW     $line
    } on error {err errdat} {

      puts stderr $err
      my log HttpError $line

      catch {close $sock}
      return
    }
    try {
      set reply [my dispatch $query]
      if {[llength $reply]} {
        if {[dict exists $reply class]} {
          set class [dict get $reply class]          
        } else {
          set class [my cget reply_class]
        }  
        set pageobj [$class create [namespace current]::reply$uuid [self]]
        if {[dict exists $reply mixin]} {
          oo::objdefine $pageobj mixin [dict get $reply mixin]
        }
        $pageobj dispatch $sock $reply
        my log HttpAccess $line
      } else {
        try {
          my log HttpMissing $line
          chan puts $sock "HTTP/1.0 404 NOT FOUND"
          dict with query {}
          set body [subst [my template notfound]]
          chan puts $sock "Content-length: [string length $body]"
          chan puts $sock
          chan puts $sock $body
        } on error {err errdat} {
          puts stderr "FAILED ON 404: $err"
        } finally {
          catch {chan close $sock}
          catch {destroy $pageobj}
        }
      }
    } on error {err errdat} {
      try {
        puts stderr [dict print $errdat]
        chan puts $sock "HTTP/1.0 505 INTERNAL ERROR"
        dict with query {}
        set body [subst [my template internal_error]]
        chan puts $sock "Content-length: [string length $body]"
        chan puts $sock
        chan puts $sock $body
        my log HttpError $line
      } on error {err errdat} {
        puts stderr "FAILED ON 505: $::errorInfo"
      } finally {
        catch {chan close $sock}
        catch {destroy $pageobj}
      }
    }
  }

  method counter which {
    my variable counters
    incr counters($which)
  }
  
  ###
  # Clean up any process that has gone out for lunch
  ###
  method CheckTimeout {} {
    foreach obj [info commands [namespace current]::reply::*] {
      try {
        $obj timeOutCheck
      } on error {} {
        catch {$obj destroy}
      }
    }

  }





  



  ###

  # REPLACE ME:

  # This method should perform any transformations
  # or setup to the page object based on headers/state/etc
  # If all is well, return 200. Any other code will be interpreted
  # as an error
  ###












  method dispatch {data} {

    return $data
  }





  method log args {
    # Do nothing for now
  }



    




































































  method port_listening {} {
    my variable port_listening
    return $port_listening
  }





  



  method start {} {
    # Build a namespace to contain replies
    namespace eval [namespace current]::reply {}
    
    my variable socklist port_listening



    set port [my cget port]
    if { $port in {auto {}} } {
      package require nettool
      set port [::nettool::allocate_port 8015]
    }
    set port_listening $port
    set myaddr [my cget myaddr]
    puts [list [self] listening on $port $myaddr]
 
    if {$myaddr ni {all any * {}}} {
      foreach ip $myaddr {
        lappend socklist [socket -server [namespace code [list my connect]] -myaddr $ip $port]
      }
    } else {
      lappend socklist [socket -server [namespace code [list my connect]] $port]
    }
    ::cron::every [self] 120 [namespace code {my CheckTimeout}]

  }

  method stop {} {
    my variable socklist
    if {[info exists socklist]} {
      foreach sock $socklist {
        catch {close $sock}
      }
    }
    set socklist {}
    ::cron::cancel [self]
  }


  



  method template page {
    my variable template
    if {[info exists template($page)]} {
      return $template($page)
    }
    set template($page) [my TemplateSearch $page]
    return $template($page)
  }
  
  method TemplateSearch page {
    set doc_root [my cget doc_root]
    if {$doc_root ne {} && [file exists [file join $doc_root $page.tml]]} {
      return [::fileutil::cat [file join $doc_root $page.tml]]
    }
    if {$doc_root ne {} && [file exists [file join $doc_root $page.html]]} {
      return [::fileutil::cat [file join $doc_root $page.html]]
    }
    switch $page {










      internal_error {
        return {
<HTML>
<HEAD><TITLE>505: Internal Server Error</TITLE></HEAD>
<BODY>
Error serving <b>${REQUEST_URI}</b>:
<p>
The server encountered an internal server error
<pre><code>
$::errorInfo
</code></pre>

</BODY>
</HTML>
        }
      }
      notfound {
        return {
<HTML>
<HEAD><TITLE>404: Page Not Found</TITLE></HEAD>
<BODY>
The page you are looking for: <b>${REQUEST_URI}</b> does not exist.

</BODY>
</HTML>
        }
      }
    }
  }



  
  ###
  # Return true if this IP address is blocked
  # The socket will be closed immediately after returning
  # This handler is welcome to send a polite error message
  ###
  method Validate_Connection {sock ip} {
    return 0
  }
}






































































































































































































































































































































































































































































































package provide httpd 4.0.1























































































































































































































































































































































































































































Changes to modules/httpd/httpd.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168






169
170
171
172
173
174
175
176
177

178

179
180
181

182
183

184
185
186
187
188


189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225

226


227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245

246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280

281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367

368
369
370
371
372
373
374
375
376
377

378

379
380
381
382
383

384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484

485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552

553
554


555
556
557
558

559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577

578
579
580
581

582

583

584
585

586
587
588
589
590
591



592

593
594
595
596
597
598

599
600





601

602
603
604
605
606
607
608
609
610



611


612

613
614
615



616

617
618
619
620
621


622
623
624



625
626
627
628



629
630
631
632
633
634
635
636
637
638
# httpd.test - Copyright (c) 2015 Sean Woods

# -------------------------------------------------------------------------
set TESTDIR [file dirname [file normalize [info script]]]
set MODDIR [file dirname $TESTDIR]
if {[file exists [file join $MODDIR devtools testutilities.tcl]]} {
  # Running inside tcllib
  set TCLLIBMOD $MODDIR
} else {
  set TCLLIBMOD [file join $MODDIR .. .. tcllib modules]
}
source [file join $TCLLIBMOD devtools testutilities.tcl]



testsNeedTcl     8.6 ;# tool requires 8.6
testsNeedTcltest 2
set NOW [clock seconds]
testsNeed TclOO 1

support {
    use [file join ${TCLLIBMOD} fumagic rtcore.tcl]       fileutil::magic::rt
    use [file join ${TCLLIBMOD} fumagic filetypes.tcl]    fileutil::magic::filetype
    use [file join ${TCLLIBMOD} textutil string.tcl]      textutil::string
    use [file join ${TCLLIBMOD} textutil repeat.tcl]      textutil::repeat
    use [file join ${TCLLIBMOD} textutil tabify.tcl]      textutil::tabify
    use [file join ${TCLLIBMOD} markdown markdown.tcl]    Markdown
    use [file join ${TCLLIBMOD} ncgi ncgi.tcl]            ncgi
    use [file join ${TCLLIBMOD} log logger.tcl]           logger
    use [file join ${TCLLIBMOD} base64 base64.tcl]        base64
    use [file join ${TCLLIBMOD} md5 md5x.tcl]             md5
    use [file join ${TCLLIBMOD} mime mime.tcl]            mime
    use [file join ${TCLLIBMOD} uuid uuid.tcl]            uuid
    use [file join ${TCLLIBMOD} cmdline cmdline.tcl]      cmdline
    use [file join ${TCLLIBMOD} fileutil fileutil.tcl]    fileutil
    use [file join ${TCLLIBMOD} sha1 sha1.tcl]            sha1
    use [file join ${TCLLIBMOD} uri uri.tcl]              uri

    use [file join ${TCLLIBMOD} ncgi ncgi.tcl]            ncgi
    use [file join ${TCLLIBMOD} dns ip.tcl]               ip
    use [file join ${TCLLIBMOD} nettool nettool.tcl]      nettool
    use [file join ${TCLLIBMOD} coroutine coroutine.tcl]  coroutine
    use [file join ${TCLLIBMOD} dicttool dicttool.tcl]    dicttool
    use [file join ${TCLLIBMOD} cron cron.tcl]            cron
    use [file join ${TCLLIBMOD} virtchannel_core core.tcl] tcl::chan::core
    use [file join ${TCLLIBMOD} virtchannel_core events.tcl] tcl::chan::events
    use [file join ${TCLLIBMOD} virtchannel_base memchan.tcl] tcl::chan::memchan
    use [file join ${TCLLIBMOD} websocket websocket.tcl]  websocket


    use [file join ${MODDIR} clay clay.tcl]               clay
}

testing {
    useLocal httpd.tcl httpd
}

# Set to true for debugging and traces
set ::DEBUG 0
set ::clay::debug $::DEBUG

proc DEBUG args {
    if {!$::DEBUG} return
    uplevel 1 $args
}

# -------------------------------------------------------------------------
# Constructors for various expected replies.
proc IndexReply {{head {HTTP/1.0}}} {
   global TESTDIR
   set fin       [open [file join $TESTDIR pkgIndex.tcl] r]
   set replyfile [read $fin]
   close $fin

   append checkreply "$head 200 OK" \n
   append checkreply "Content-Type: text/plain" \n
   append checkreply "Connection: close" \n
   append checkreply "Content-Length: [string length $replyfile]" \n
   append checkreply \n
   append checkreply $replyfile

   return $checkreply
}

proc 404 {} {
    lappend map "        " ""
    lappend map "    "     ""
    # The map removes the indentation of the value
    return [string map $map {HTTP/1.0 404 Not Found
        Content-Type: text/plain
        Connection: close
        Content-Length: *

        404 Not Found
    }]
}

proc 200 {text {len *}} {
    lappend map "        " ""
    # The map removes the indentation of the value
    # and inserts the dynamic parts
    lappend map @C $text
    lappend map @L $len
    return [string map $map {HTTP/1.0 200 OK
        Content-Type: text/plain
        Connection: close
        Content-Length: @L

        @C}]
}

proc 200+status-head {text {len *}} {
    lappend map "        " ""
    # The map removes the indentation of the value
    # and inserts the dynamic parts
    lappend map @C $text
    lappend map @L $len
    return [string map $map {Status: 200 OK
        Content-Type: text/plain
        Connection: close
        Content-Length: @L

        @C}]
}

proc 200+status-conn {text {len *}} {
    lappend map "        " ""
    # The map removes the indentation of the value
    # and inserts the dynamic parts
    lappend map @C $text
    lappend map @L $len
    return [string map $map {HTTP/1.0 200 OK
        Status: 200 OK
        Content-Type: text/plain
        Content-Length: @L

        @C}]
}

proc 500 {} {
    lappend map "        " ""
    lappend map "    "     ""
    # The map removes the indentation of the value
    return [string map $map {HTTP/1.0 500 Server Internal Error
        Content-Type: text/plain
        Connection: close
        Content-Length: *

        500 Server Internal Error
    }]
}

proc 500+status-head {} {
    lappend map "        " ""
    lappend map "    "     ""
    # The map removes the indentation of the value
    return [string map $map {Status: 500 Server Internal Error
        Content-Type: text/plain
        Connection: close
        Content-Length: *

        500 Server Internal Error
    }]
}

# Likely a band aid, see AKU
proc norm-eol {x} { string map [list "\r\n" "\n"] $x }

# -------------------------------------------------------------------------

namespace eval ::httpd {}
namespace eval ::httpd::test {}







proc ::httpd::test::send {port http headers body} {
    set sock [socket localhost $port]
    variable reply
    set reply($sock) {}
    chan configure $sock -translation {crlf crlf} -blocking 0 -buffering full -buffersize 4096
    chan event $sock readable [list ::httpd::test::get_reply $sock]

    puts $sock $http
    if {![dict exists $headers Host]} {

        dict set headers Host localhost

    }
    if {[string length $body]} {
        if {![dict exists $headers Content-Type]} {

            dict set headers Content_Type text/plain
        }

        dict set headers Content-Length [string length $body]
    }
    foreach {f v} $headers {
        puts $sock "${f}: $v"
    }


    puts $sock {}
    if {[string length $body]} {
        chan configure $sock -translation binary -blocking 0 -buffering full -buffersize 4096
        puts -nonewline $sock $body
    }
    flush $sock
    while {$reply($sock) eq {}} {
        update
    }
    #vwait [namespace current]::reply($sock)

    #puts ZZ\t[join [split $reply($sock) \n] "|\nZZ\t"]|
    return $reply($sock)
}

proc ::httpd::test::get_reply {sock} {
    variable buffer
    set data [read $sock]
    append buffer($sock) $data
    if {[eof $sock]} {
        chan event $sock readable {}
        set [namespace current]::reply($sock) $buffer($sock)
        unset buffer($sock)
    }
}

clay::define ::httpd::server {
    method log args {}

    method TemplateSearch page {
        set doc_root [my clay get server/ doc_root]
        if {$doc_root ne {} && [file exists [file join $doc_root $page.tml]]} {
            return [::fileutil::cat [file join $doc_root $page.tml]]
        }
        if {$doc_root ne {} && [file exists [file join $doc_root $page.html]]} {
            return [::fileutil::cat [file join $doc_root $page.html]]
        }

        switch $page {


            redirect {
                return {300 Redirect}
            }
            notfound {
                return {404 Not Found}
            }
            internal_error {
                return {500 Server Internal Error}
            }
        }
    }


    ::DEBUG method debug args {
        puts stderr $args
    }

    ::DEBUG method log args {
        puts stdout $args

    }
}


###
# Modify the reply class to return plain text
###
clay::define ::httpd::reply {

    method HttpHeaders_Default {} {
        return {
            Status       {200 OK}
            Content-Type {text/plain}
            Connection   close
        }
    }

    method reset {} {
        my variable reply_body
        my reply replace [my HttpHeaders_Default]
        set reply_body {}
    }

    method error {code {msg {}} {errorInfo {}}} {
        my clay set HTTP_ERROR $code
        my reset
        set errorstring [my http_code_string $code]
        set qheaders [my clay dump]
        dict with qheaders {}
        my reply replace {}
        my reply set Status "$code $errorstring"
        my reply set Content-Type text/plain
        my puts "$code $errorstring"
    }
}


clay::define ::test::content.echo {
    method content {} {
        my variable reply_body
        set reply_body [my PostData [my request get CONTENT_LENGTH]]
        #puts [list REPLY BODY WAS $reply_body]
    }
}
clay::define ::test::content.file {
    superclass ::httpd::content.file
    method content {} {
        my reset
        set doc_root  [my clay get path]
        my variable reply_file
        set reply_file [file join $doc_root pkgIndex.tcl]
    }
}
clay::define ::test::content.time {
    method content {} {
        my variable reply_body
        set reply_body $::NOW
    }
}
clay::define ::test::content.error {
    method content {} {
        error {The programmer asked me to die this way}
    }
}
clay::define ::test::content.cgi {
    superclass ::httpd::content.cgi
}
clay::define ::test::content.string {
    method content {} {
        my variable reply_body
        set reply_body [my clay get hardcoded_string]
    }
}
clay::define ::httpd::test::reply {
    superclass ::httpd::reply ::test::content.echo
}

###
# Build the server
###

::httpd::server create TESTAPP port 10001 doc_root $::TESTDIR
TESTAPP plugin dict_dispatch
TESTAPP uri add * /      [list mixin {reply ::test::content.echo}]
TESTAPP uri add * /echo  [list mixin {reply ::test::content.echo}]
TESTAPP uri add * /file  [list mixin {reply ::test::content.file} path $::TESTDIR]
TESTAPP uri add * /time  [list mixin {reply ::test::content.time}]
TESTAPP uri add * /error [list mixin {reply ::test::content.error}]
TESTAPP uri add * /string  [list mixin {reply ::test::content.string} hardcoded_string apple]

# Catch all
#TESTAPP uri add * * [list mixin {reply httpd::content.echo}]

::DEBUG puts httpd-client-0001
test httpd-client-0001 {Do an echo request} -body {
    ::httpd::test::send 10001 {POST /echo HTTP/1.0} {} {THIS IS MY CODE}
} -match glob -result [200 {THIS IS MY CODE}]

::DEBUG puts httpd-client-0002
test httpd-client-0002 {Do another echo request} {
    ::httpd::test::send 10001 {POST /echo HTTP/1.0} {} {THOUGH THERE ARE MANY LIKE IT}
} [200 {THOUGH THERE ARE MANY LIKE IT} 29]

::DEBUG puts httpd-client-0003
test httpd-client-0003 {Do another echo request} -body {
    ::httpd::test::send 10001 {POST /echo HTTP/1.0} {} {THIS ONE ALONE IS MINE}
} -match glob -result [200 {THIS ONE ALONE IS MINE}]

::DEBUG puts httpd-client-0004
test httpd-client-0004 {URL Generates Error} -body {
    ::httpd::test::send 10001 {POST /error HTTP/1.0} {} {THIS ONE ALONE IS MINE}
} -match glob -result [500]

::DEBUG puts httpd-client-0005
test httpd-client-0005 {URL Different output with a different request} -body {
    ::httpd::test::send 10001 {POST /time HTTP/1.0} {} {THIS ONE ALONE IS MINE}
} -match glob -result [200 $::NOW]

::DEBUG puts httpd-client-0006
test httpd-client-0006 {Return a file} -body {
    ::httpd::test::send 10001 {GET /file HTTP/1.0} {} {}
} -result [IndexReply]


::DEBUG puts httpd-client-0007
test httpd-client-0007 {URL Generates Not Found} -body {
    ::httpd::test::send 10001 {POST /doesnotexist HTTP/1.0} {} {THIS ONE ALONE IS MINE}
} -match glob -result [404]

::DEBUG puts httpd-client-0008
test httpd-client-0008 {Pull a constant string} -body {
    ::httpd::test::send 10001 {GET /string HTTP/1.0} {} {}
} -match glob -result [200 apple]
# -------------------------------------------------------------------------

# Test proxies


clay::define ::test::content.proxy {
    superclass ::httpd::content.proxy

    method proxy_channel {} {

        return [::socket localhost [my clay get proxy_port]]
    }
}

::httpd::server create TESTPROXY port 10002 doc_root $::TESTDIR
TESTAPP   uri add * /proxy* [list mixin {reply ::test::content.proxy} proxy_port [TESTPROXY port_listening]]
TESTPROXY plugin dict_dispatch
TESTPROXY uri add * /       [list mixin {reply ::test::content.echo}]
TESTPROXY uri add * /echo   [list mixin {reply ::test::content.echo}]
TESTPROXY uri add * /file   [list mixin {reply ::test::content.file} path $::TESTDIR]
TESTPROXY uri add * /time   [list mixin {reply ::test::content.time}]
TESTPROXY uri add * /error  [list mixin {reply ::test::content.error}]
TESTPROXY uri add * /string   [list mixin {reply ::test::content.string} hardcoded_string banana]

## AKU ##
#
# Note: Proxy replies are not normalized to \n. They contain \r\n
# endings.  The old test::compare was ok with that due to running a
# trim on the lines it was comparing. Here we properly normalize
# before feeding into the comparison.
#
# Note 2: I suspect that this leakage / non-normalization of of \r\n
#         in the server is a bug which should be fixed. If so, norm-eol
#         becomes superfluous. Right now it feels like a band-aid

::DEBUG puts httpd-proxy-0001
test httpd-proxy-0001 {Do an echo request} -body {
    norm-eol [::httpd::test::send 10001 {POST /proxy/echo HTTP/1.0} {} {THIS IS MY CODE}]
} -match glob -result [200 {THIS IS MY CODE}]

::DEBUG puts httpd-proxy-0002
test httpd-proxy-0002 {Do another echo request} -body {
    norm-eol [::httpd::test::send 10001 {POST /proxy/echo HTTP/1.0} {} {THOUGH THERE ARE MANY LIKE IT}]
} -result [200 {THOUGH THERE ARE MANY LIKE IT} 29]

::DEBUG puts httpd-proxy-0003
test httpd-proxy-0003 {Do another echo request} -body {
    norm-eol [::httpd::test::send 10001 {POST /proxy/echo HTTP/1.0} {} {THIS ONE ALONE IS MINE}]
} -match glob -result [200 {THIS ONE ALONE IS MINE}]

::DEBUG puts httpd-proxy-0004
test httpd-proxy-0004 {URL Generates Error} -body {
    norm-eol [::httpd::test::send 10001 {POST /proxy/error HTTP/1.0} {} {THIS ONE ALONE IS MINE}]
} -match glob -result [500]

::DEBUG puts httpd-proxy-0005
test httpd-proxy-0005 {URL Different output with a different request} -body {
    norm-eol [::httpd::test::send 10001 {POST /proxy/time HTTP/1.0} {} {THIS ONE ALONE IS MINE}]
} -match glob -result [200 $::NOW]

::DEBUG puts httpd-proxy-0006
test httpd-proxy-0006 {Return a file} -body {
    norm-eol [::httpd::test::send 10001 {GET /proxy/file HTTP/1.0} {} {}]
} -result [IndexReply]

::DEBUG puts httpd-proxy-0008
test httpd-proxy-0008 {Pull a constant string} -body {
    norm-eol [::httpd::test::send 10001 {GET /proxy/string HTTP/1.0} {} {}]
} -result [200 banana 6]
# -------------------------------------------------------------------------
# cgi

TESTAPP plugin local_memchan
TESTAPP uri add * /cgi-bin* [list mixin {reply ::test::content.cgi} path $::TESTDIR/assets]

::DEBUG puts httpd-cgi-0001
test httpd-cgi-0001 {CGI Post} -body {
    norm-eol [::httpd::test::send 10001 {POST /cgi-bin/test_cgi.tcl HTTP/1.0} {} {THIS IS MY CODE}]
} -match glob -result [200+status-conn {THIS IS MY CODE
}]

::DEBUG puts httpd-cgi-0002
test httpd-cgi-0002 {CGI Get} -body {
    ::httpd::test::send 10001 {GET /cgi-bin/test_cgi.tcl HTTP/1.0} {} {}
} -match glob -result [200+status-conn {Hi!
}]

###
# Test the local geturl method
###
test httpd-memchan-0001 {Memchan GET} {
    TESTAPP local_memchan geturl /time
} $NOW

# -------------------------------------------------------------------------
namespace eval ::scgi {}
namespace eval ::scgi::test {}

###
# Minimal test harness for the .tests
# Not intended for public consumption
# (But if you find it handy, please steal!)

proc ::scgi::encode_request {headers body info} {
    variable server_block

    dict set outdict CONTENT_LENGTH [string length $body]
    set outdict [dict merge $outdict $server_block $info]
    dict set outdict PWD [pwd]

    foreach {key value} $headers {

        if {$key in {
            DOCUMENT_ROOT
            HTTPS
            PATH
            REQUEST_METHOD REQUEST_URI
            REMOTE_HOST REMOTE_ADDR REMOTE_PORT
            SCRIPT_NAME
        } || [string range $key 0 5] eq "HTTP_"} {
            dict set outdict $key $value
        } else {
            dict set outdict HTTP_[string map {"-" "_"} [string toupper $key]] $value
        }
    }
    set result {}
    foreach {name value} $outdict {
        append result $name \x00 $value \x00
    }
    return "[string length $result]:$result,"
}

proc ::scgi::test::send {port headers body} {
    set sock [socket localhost $port]
    variable reply
    set reply($sock) {}

    if {![dict exists $headers HOST]} {
        dict set headers HOST localhost
    }
    dict set headers REMOTE_IP   127.0.0.1
    dict set headers REMOTE_HOST localhost

    chan configure $sock -translation binary -blocking 0 -buffering full -buffersize 4096
    chan event     $sock readable [list ::scgi::test::get_reply $sock]

    set block [::scgi::encode_request $headers $body {}]

    puts -nonewline $sock $block
    flush $sock
    puts -nonewline $sock $body
    flush $sock

    while {$reply($sock) eq {}} {
        update
    }

    #vwait [namespace current]::reply($sock)

    #puts ZZ\t[join [split $reply($sock) \n] "|\nZZ\t"]|
    return $reply($sock)
}

proc ::scgi::test::get_reply {sock} {
    variable buffer
    set data [read $sock]
    append buffer($sock) $data
    if {[eof $sock]} {
        chan event $sock readable {}
        set [namespace current]::reply($sock) $buffer($sock)
        unset buffer($sock)
    }
}

namespace eval ::scgi {
  variable server_block {SCGI 1.0 SERVER_SOFTWARE {TclScgiServer/0.1}}
}

###
# Build the reply class

###



::clay::define ::scgi::test::reply {
    superclass ::httpd::reply

    method reset {} {

        my variable reply_body
        my reply replace [my HttpHeaders_Default]
        set reply_body {}
    }
}

###
# Build the server
###

::clay::define scgi::test::app {
    superclass ::httpd::server.scgi

    clay set reply_class ::scgi::test::reply
}

::DEBUG puts [list ::test::content.file [info commands ::test::content.file]]

scgi::test::app create TESTSCGI port 10003 doc_root $::TESTDIR


TESTSCGI plugin dict_dispatch
TESTSCGI uri add * /      [list mixin {reply ::test::content.echo}]
TESTSCGI uri add * /echo  [list mixin {reply ::test::content.echo}]

TESTSCGI uri add * /file  [list mixin {reply ::test::content.file} path $::TESTDIR]

TESTSCGI uri add * /time  [list mixin {reply ::test::content.time}]

TESTSCGI uri add * /error [list mixin {reply ::test::content.error}]
TESTSCGI uri add * /string  [list mixin {reply ::test::content.string} hardcoded_string cherry]


::DEBUG puts scgi-client-0001
test scgi-client-0001 {Do an echo request} -body {
    ::scgi::test::send 10003 {REQUEST_METHOD POST REQUEST_URI /echo} {THIS IS MY CODE}
} -match glob -result [200+status-head {THIS IS MY CODE}]




::DEBUG puts scgi-client-0002

test scgi-client-0002 {Do another echo request} -body {
    ::scgi::test::send 10003 {REQUEST_METHOD POST REQUEST_URI /echo} {THOUGH THERE ARE MANY LIKE IT}
} -match glob -result [200+status-head {THOUGH THERE ARE MANY LIKE IT}]

::DEBUG puts scgi-client-0003
test scgi-client-0003 {Do another echo request} -body {

    ::scgi::test::send 10003 {REQUEST_METHOD POST REQUEST_URI /echo} {THIS ONE ALONE IS MINE}
} -match glob -result [200+status-head {THIS ONE ALONE IS MINE}]







::DEBUG puts scgi-client-0004
test scgi-client-0004 {URL Generates Error} -body {
    ::scgi::test::send 10003 {REQUEST_METHOD POST REQUEST_URI /error} {THIS ONE ALONE IS MINE}
} -match glob -result [500+status-head]

::DEBUG puts scgi-client-0005
test scgi-client-0005 {URL Different output with a different request} -body {
    ::scgi::test::send 10003 {REQUEST_METHOD POST REQUEST_URI /time} {THIS ONE ALONE IS MINE}
} -match glob -result [200+status-head $::NOW]






::DEBUG puts scgi-client-0006

test scgi-client-0006 {Return a file} -body {
    ::scgi::test::send 10003 {REQUEST_METHOD GET REQUEST_URI /file} {}
} -result [IndexReply Status:]






::DEBUG puts scgi-client-0008
test scgi-client-0008 {Pull a constant string} -body {
    ::scgi::test::send 10003 {REQUEST_METHOD GET REQUEST_URI /string} {}
} -match glob -result [200+status-head cherry]


###
# Test the all object have been destroyed after ::clay::cleanup
###



test httpd-garbage-collection {Test that garbage collection leaves nothing behind} -body {
  ::clay::cleanup
  info commands ::httpd::object::*
} -result {}




::DEBUG puts all-tests-finished
# -------------------------------------------------------------------------

testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:



<
<
<
<
<
<
<
|
|
>
>



|



<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
>
|
|
|
|
|
|
<
<
<
<
>
>
|



|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






>
>
>
>
>
>
|
|
|
|
|
|
|
<
|
>
|
>
|
|
|
>
|
|
>
|

<
<
|
>
>
|
<
<
<
<
|
|
|
|
|
<
<
|



|
|
|
|
|
|
|
|


<
<

<
<
<
<
|
<
<
<
>
|
>
>
|
<
|
<
<
<
|
|
<
<
<
|
|
|
<

|
<
<
>
|
<
|
|
<
<
<
|
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
|
<
|
|
<
>
|
<
<
<
<
<
|
|
<
<
<
|
<
|
<
<
<
<
<
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
|
<
<
<
|
|
<
<
<
<
|
<
|
<
|
|
>
|
<
<
<
|
<
<
<
<
<
>
|
>
|
<
<
|
|
>
|
|
|
|
<
<
<
<
<
<
<
<
<

<
|
<
<
<
<
<
<
<
<
|
<
<
<
<
|
<
<
<
<
|
<
<
<
<
|
<
<
<
<
|
<
<
<
<
|
<
<
<
<

<
<
<
<
<
<
|
<
<
|
<
<
<
<
<
|
<
<
<
<
<
|
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<

<
<
|
<
<
<
<

>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
|
<
<
<
<
|
<
<
<
|
<
|
<
|
<
|
<
<
<
|
<
<
<
<
<
<
|
<
<
<
|
|
<
>
|
|
>
>
|
|
|
<
>
|
<
<
|





|
<
|
|
|


|

|
>

<
|
|
>
|
>
|
>
|
|
>

|
|
<
<

>
>
>
|
>
|
|
|

<
|
>
|
|
>
>
>
>
>

>
|
|
<
<

|
|
|
|
>
>
>

>
>
|
>
|
<
|
>
>
>

>

|
<
|
|
>
>
|
<
<
>
>
>
|
<
|
|
>
>
>

|








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


89




90



91
92
93
94
95

96



97
98



99
100
101

102
103


104
105

106
107



108
109



110












111




112

113
114

115
116





117
118



119

120





121
122
123












































124




125



126
127




128

129

130
131
132
133



134





135
136
137
138


139
140
141
142
143
144
145









146

147








148




149




150




151




152




153




154






155


156





157





158






159








160


161




162
163
164














165

















166

167




168



169

170

171

172



173






174



175
176

177
178
179
180
181
182
183
184

185
186


187
188
189
190
191
192
193

194
195
196
197
198
199
200
201
202
203

204
205
206
207
208
209
210
211
212
213
214
215
216


217
218
219
220
221
222
223
224
225
226

227
228
229
230
231
232
233
234
235
236
237
238
239


240
241
242
243
244
245
246
247
248
249
250
251
252
253

254
255
256
257
258
259
260
261

262
263
264
265
266


267
268
269
270

271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# httpd.test - Copyright (c) 2015 Sean Woods

# -------------------------------------------------------------------------








source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.6 ;# tool requires 8.6
testsNeedTcltest 2

testsNeed TclOO 1

support {












  use cmdline/cmdline.tcl cmdline
  use fileutil/fileutil.tcl fileutil
  use sha1/sha1.tcl sha1
  use uri/uri.tcl uri
  use ncgi/ncgi.tcl ncgi

  use dns/ip.tcl ip
  use nettool/nettool.tcl nettool

  use dicttool/dicttool.tcl dicttool
  use cron/cron.tcl cron




  use oodialect/oodialect.tcl oo::dialect
  use oometa/oometa.tcl oo::meta
  use tool/index.tcl tool
}

testing {
  useLocal httpd.tcl httpd
}
















































































































# -------------------------------------------------------------------------

namespace eval ::httpd {}
namespace eval ::httpd::test {}

###
# Minimal test harness for the .tests
# Not intended for public consumption
# (But if you find it handy, please steal!)
namespace eval ::httpd::test {}

proc ::httpd::test::send {port text} {
  set sock [socket localhost $port]
  variable reply
  set reply($sock) {}
  chan configure $sock -translation binary -blocking 0 -buffering full -buffersize 4096
  chan event $sock readable [list ::httpd::test::get_reply $sock]
  

  set headers {}
  set body {}
  set read_headers 1
  foreach line [split $text \n] {
    if {$read_headers} {
      if { $line eq {} } {
        set read_headers 0
      } else {
        append headers $line \n
      }
    } else {
      append body $line \n
    }


  }
  append headers "Content-Type: text/plain" \n
  append headers "Content-Length: [string length $body]" \n
  puts $sock "$headers\n$body"




  flush $sock
  while {$reply($sock) eq {}} {
    update
  }
  #vwait [namespace current]::reply($sock)


  return $reply($sock)
}

proc ::httpd::test::get_reply {sock} {
  variable buffer
  set data [read $sock]
  append buffer($sock) $data
  if {[eof $sock]} {
    chan event $sock readable {}
    set [namespace current]::reply($sock) $buffer($sock)
    unset buffer($sock)
  }
}












###
# Build the reply class
###
tool::class create ::httpd::test::reply {  
  superclass ::httpd::reply 

  



  method error {code {msg {}}} {
    my reset



    my variable data error_codes
    if {![info exists data(url)]} {
      set data(url) {}

    }
    if {![info exists error_codes($code)]} {


      set errorstring "Unknown Error Code"
    } else {

      set errorstring $error_codes($code)
    }



    my reply_headers replace {}
    my reply_headers set Status: "$code $errorstring"



    my reply_headers set Content-Type: {text/plain}












    my puts "




$code $errorstring

Got the error $code $errorstring


while trying to obtain $data(url)
"





  }




  method reset {} {

    my variable reply_body





    my reply_headers replace {Status: {200 OK} Content-Type: text/plain}
    set reply_body {}
  }












































  




  method content {} {



    my reset
    switch [my query_headers get REQUEST_URI] {




      /file {

        my variable reply_file

        set reply_file [file join $::here pkgIndex.tcl]
      }
      /time {
	my puts [clock seconds]



      }





      /error {
	error {
The programmer asked me to die this way
	}


      }
      /echo -
      default {
        my puts [my PostData]
      }
    }
  }











  ###








  # Output the result or error to the channel




  # and destroy this object




  ###




  method output {} {




    my variable reply_body reply_file reply_chan chan




    chan configure $chan  -translation {binary binary}











    set headers [my reply_headers dump]


    if {[dict exists $headers Status:]} {





      set result "[my EncodeStatus [dict get $headers Status:]]\n"





    } else {






      set result "[my EncodeStatus {505 Internal Error}]\n"











    }




    foreach {key value} $headers {
      # Ignore Status and Content-length, if given
      if {$key in {Status: Content-length:}} continue














      append result "$key $value" \n

















    }

    if {![info exists reply_file] || [string length $reply_body]} {




      ###



      # Return dynamic content

      ###

      set reply_body [string trim $reply_body]

      append result "Content-length: [string length $reply_body]" \n \n



      append result $reply_body






      puts -nonewline $chan $result



    } else {
      ###

      # Return a stream of data from a file
      ###
      append result "Content-length: [file size $reply_file]" \n \n
      puts -nonewline $chan $result
      set reply_chan [open $reply_file r]
      chan copy $reply_chan $chan
      catch {close $reply_chan}
    }

    chan flush $chan    
    my destroy


  }
}

###
# Build the server
###
tool::class create httpd::test::app {

  superclass ::httpd::server
  
  property reply_class ::httpd::test::reply
}

httpd::test::app create TESTAPP port 10001


test httpd-client-0001 {Do an echo request} {


set reply [::httpd::test::send 10001 {POST /echo HTTP/1.0

THIS IS MY CODE
}]
} {HTTP/1.0 200 OK
Content-Type: text/plain
Connection: close
Content-length: 15

THIS IS MY CODE}

test httpd-client-0002 {Do another echo request} {
set reply [::httpd::test::send 10001 {POST /echo HTTP/1.0



THOUGH THERE ARE MANY LIKE IT
}]
} {HTTP/1.0 200 OK
Content-Type: text/plain
Connection: close
Content-length: 29

THOUGH THERE ARE MANY LIKE IT}


test httpd-client-0003 {Do another echo request} {
set reply [::httpd::test::send 10001 {POST /echo HTTP/1.0

THIS ONE ALONE IS MINE
}]
} {HTTP/1.0 200 OK
Content-Type: text/plain
Connection: close
Content-length: 22

THIS ONE ALONE IS MINE}

test httpd-client-0004 {URL Generates Error} {



set reply [::httpd::test::send 10001 {POST /error HTTP/1.0

THIS ONE ALONE IS MINE
}] } {HTTP/1.0 500 Server Internal Error
Content-Type: text/plain
Connection: close
Content-length: 89

500 Server Internal Error
Got the error 500 Server Internal Error

while trying to obtain}


set checkreply [subst {HTTP/1.0 200 OK
Content-Type: text/plain
Connection: close
Content-length: 10

[clock seconds]}]

test httpd-client-0005 {URL Different output with a different request} {

set reply [::httpd::test::send 10001 {POST /time HTTP/1.0

THIS ONE ALONE IS MINE
}] } $checkreply



set fin [open [file join $here pkgIndex.tcl] r]
set checkreply [read $fin]
close $fin
test httpd-client-0006 {Return a file} {

set reply [::httpd::test::send 10001 {POST /file HTTP/1.0
}] } "HTTP/1.0 200 OK
Content-Type: text/plain
Connection: close
Content-length: [string length $checkreply]

$checkreply"
# -------------------------------------------------------------------------

testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:

Changes to modules/httpd/pkgIndex.tcl.










1
2
3
4










if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded httpd 4.3.5 [list source [file join $dir httpd.tcl]]

>
>
>
>
>
>
>
>
>
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.
  
package ifneeded scgi::app 0.1 [list source [file join $dir scgi-app.tcl]]
package ifneeded httpd 4.0.1 [list source [file join $dir httpd.tcl]]
package ifneeded httpd::content 4.0.1 [list source [file join $dir content.tcl]]

Added modules/httpd/scgi-app.tcl.















































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
###
# Author: Sean Woods, yoda@etoyoc.com
###
# This file provides the "application" side of the SCGI protocol
###

package require html
package require TclOO
package require httpd 4.0

namespace eval ::scgi {}

tool::class create ::scgi::reply {  
  superclass ::httpd::reply
  
  ###
  # A modified dispatch method from a standard HTTP reply
  # Unlike in HTTP, our headers were spoon fed to use from
  # the server
  ###
  method dispatch {newsock datastate} {
    my query_headers replace $datastate
    my variable chan rawrequest dipatched_time
    set chan $newsock
    chan event $chan readable {}
    chan configure $chan -translation {auto crlf} -buffering line
    set dispatched_time [clock seconds]
    try {
      # Dispatch to the URL implementation.
      my content
    } on error {err info} {
      puts stderr $::errorInfo
      my error 500 $err
    } finally {
      my output
    }
  }
  
  method EncodeStatus {status} {
    return "Status: $status"
  }
}

tool::class create scgi::app {
  superclass ::httpd::server

  property socket buffersize   32768
  property socket blocking     0
  property socket translation  {binary binary}
  
  property reply_class ::scgi::reply
  
  method connect {sock ip port} {
    ###
    # If an IP address is blocked
    # send a "go to hell" message
    ###
    if {[my validation Blocked_IP $sock $ip]} {
      catch {close $sock}
      return
    }
    set query {
      REQUEST_URI {NOT_POPULATED}
    }
    try {
      chan configure $sock \
        -blocking 1 \
        -translation {binary binary} \
        -buffersize 4096 \
        -buffering none
    
      # Read the SCGI request on byte at a time until we reach a ":"
      set size {}
      while 1 {
        set char [read $sock 1]
        if {[chan eof $sock]} {
          catch {close $sock}
          return
        }
        if {$char eq ":"} break
        append size $char
      }
      # With length in hand, read the netstring encoded headers
      set inbuffer [read $sock [expr $size+1]]
      chan configure $sock -blocking 0 -buffersize 4096 -buffering full
      set query [lrange [split [string range $inbuffer 0 end-1] \0] 0 end-1]
      set reply [my dispatch $query]
      dict with query {}
      if {[llength $reply]} {
        if {[dict exists $reply class]} {
          set class [dict get $reply class]          
        } else {
          set class [my cget reply_class]
        }  
        set pageobj [$class create [namespace current]::reply::[::tool::uuid_short] [self]]
        if {[dict exists $reply mixin]} {
          oo::objdefine $pageobj mixin [dict get $reply mixin]
        }
        $pageobj dispatch $sock $reply
        my log HttpAccess $REQUEST_URI
      } else {
        try {
          my log HttpMissing $REQUEST_URI
          puts $sock "Status: 404 NOT FOUND"
          dict with query {}
          set body [subst [my template notfound]]
          puts $sock "Content-length: [string length $body]"
          puts $sock
          puts $sock $body
        } on error {err errdat} {
          puts stderr "FAILED ON 404: $err"
        } finally {
          catch {close $sock}
        }
      }
    } on error {err errdat} {
      try {
        puts stderr $::errorInfo
        puts $sock "Status: 505 INTERNAL ERROR"
        dict with query {}
        set body [subst [my template internal_error]]
        puts $sock "Content-length: [string length $body]"
        puts $sock
        puts $sock $body
        my log HttpError $REQUEST_URI
      } on error {err errdat} {
        puts stderr "FAILED ON 505: $err $::errorInfo"
      } finally {
        catch {close $sock}
      }
    }
  }
}

package provide scgi::app 0.1

Added modules/httpd/scgi.test.





















































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
###
# scgi.test - Copyright (c) 2015 Sean Woods
#
# Author: Sean Woods, yoda@etoyoc.com
# Unit tests of the SCGI server
###

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.6
testsNeedTcltest 2

testsNeed TclOO 1

support {
  use cmdline/cmdline.tcl cmdline
  use fileutil/fileutil.tcl fileutil

  use md5/md5.tcl md5
  use base64/base64.tcl base64
  use mime/mime.tcl mime
  
  use uri/uri.tcl uri
  use ncgi/ncgi.tcl ncgi

  use dns/ip.tcl ip
  use nettool/nettool.tcl nettool
  use html/html.tcl html

  use dicttool/dicttool.tcl dicttool
  use cron/cron.tcl cron
  use oodialect/oodialect.tcl oo::dialect
  use oometa/oometa.tcl oo::meta
  use sha1/sha1.tcl sha1
  use tool/index.tcl tool
}

testing {
  useLocal httpd.tcl httpd
  useLocal scgi-app.tcl scgi::app
}

# -------------------------------------------------------------------------
namespace eval ::scgi {}
namespace eval ::scgi::test {}

###
# Minimal test harness for the .tests
# Not intended for public consumption
# (But if you find it handy, please steal!)
namespace eval ::scgi::test {}

proc ::scgi::encode_request {headers body info} {
  variable server_block

  dict set outdict CONTENT_LENGTH [string length $body]
  set outdict [dict merge $outdict $server_block $info]
  dict set outdict PWD [pwd]
  foreach {key value} $headers {
    switch $key {
      SCRIPT_NAME -
      REQUEST_METHOD -
      REQUEST_URI {
        dict set outdict $key $value
      }
      default {
        dict set outdict HTTP_[string map {"-" "_"} [string toupper $key]] $value
      }
    }
  }  
  set result {}
  foreach {name value} $outdict {
    append result $name \x00 $value \x00
  }
  return "[string length $result]:$result,"
}

proc ::scgi::test::send {port text} {
  set sock [socket localhost $port]
  variable reply
  set reply($sock) {}
  chan configure $sock -translation binary -blocking 0 -buffering full -buffersize 4096
  chan event $sock readable [list ::scgi::test::get_reply $sock]
  
  set headers {}
  set body {}
  set read_headers 1
  foreach line [split $text \n] {
    if {$read_headers} {
      if { $line eq {} } {
        set read_headers 0
      } else {
        append headers $line \n
      }
    } else {
      append body $line \n
    }
  }
  set block [::scgi::encode_request $headers $body {}]
  puts -nonewline $sock $block
  flush $sock
  puts -nonewline $sock $body
  flush $sock
  while {$reply($sock) eq {}} {
    update
  }
  #vwait [namespace current]::reply($sock)
  return $reply($sock)
}

proc ::scgi::test::get_reply {sock} {
  variable buffer
  set data [read $sock]
  append buffer($sock) $data
  if {[eof $sock]} {
    chan event $sock readable {}
    set [namespace current]::reply($sock) $buffer($sock)
    unset buffer($sock)
  }
}

namespace eval ::scgi {
  variable server_block {SCGI 1.0 SERVER_SOFTWARE {TclScgiServer/0.1}}
}

###
# Build the reply class
###
tool::class create ::scgi::test::reply {  
  superclass ::scgi::reply 
  
  method error {code {msg {}}} {
    my reset
    my variable data error_codes
    if {![info exists data(url)]} {
      set data(url) {}
    }
    if {![info exists error_codes($code)]} {
      set errorstring "Unknown Error Code"
    } else {
      set errorstring $error_codes($code)
    }
    my reply_headers replace {}
    my reply_headers set Status: "$code $errorstring"
    my reply_headers set Content-Type: {text/plain}
    my puts "
$code $errorstring
Got the error $code $errorstring

while trying to obtain $data(url)
"
  }

  method reset {} {
    my variable reply_body
    my reply_headers replace {Status: {200 OK} Content-Type: text/plain}
    set reply_body {}
  }
  
  method content {} {
    my reset
    switch [my query_headers get REQUEST_URI] {
      /file {
        my variable reply_file
        set reply_file [file join $::here pkgIndex.tcl]
      }
      /time {
	my puts [clock seconds]
      }
      /error {
	error {
The programmer asked me to die this way
	}
      }
      /echo -
      default {
        my puts [my PostData]
      }
    }
  }

  ###
  # Output the result or error to the channel
  # and destroy this object
  ###
  method output {} {
    my variable reply_body reply_file reply_chan chan
    chan configure $chan  -translation {binary binary}

    set headers [my reply_headers dump]
    if {[dict exists $headers Status:]} {
      set result "[my EncodeStatus [dict get $headers Status:]]\n"
    } else {
      set result "[my EncodeStatus {505 Internal Error}]\n"

    }
    foreach {key value} $headers {
      # Ignore Status and Content-length, if given
      if {$key in {Status: Content-length:}} continue
      append result "$key $value" \n
    }
    if {![info exists reply_file] || [string length $reply_body]} {
      ###
      # Return dynamic content
      ###
      set reply_body [string trim $reply_body]
      append result "Content-length: [string length $reply_body]" \n \n
      append result $reply_body
      puts -nonewline $chan $result
    } else {
      ###
      # Return a stream of data from a file
      ###
      append result "Content-length: [file size $reply_file]" \n \n
      puts -nonewline $chan $result
      set reply_chan [open $reply_file r]
      chan copy $reply_chan $chan
      catch {close $reply_chan}
    }
    chan flush $chan    
    my destroy
  }
}

###
# Build the server
###
tool::class create scgi::test::app {
  superclass ::scgi::app
  
  property reply_class ::scgi::test::reply
}

scgi::test::app create TESTAPP port 10001

test scgi-client-0001 {Do an echo request} {

set reply [::scgi::test::send 10001 {REQUEST_METHOD POST
REQUEST_URI /echo

THIS IS MY CODE
}]
} {Status: 200 OK
Content-Type: text/plain
Connection: close
Content-length: 15

THIS IS MY CODE}

test scgi-client-0002 {Do another echo request} {
set reply [::scgi::test::send 10001 {REQUEST_METHOD POST
REQUEST_URI /echo

THOUGH THERE ARE MANY LIKE IT
}]
} {Status: 200 OK
Content-Type: text/plain
Connection: close
Content-length: 29

THOUGH THERE ARE MANY LIKE IT}

test scgi-client-0003 {Do another echo request} {
set reply [::scgi::test::send 10001 {REQUEST_METHOD POST
REQUEST_URI /echo

THIS ONE ALONE IS MINE
}]
} {Status: 200 OK
Content-Type: text/plain
Connection: close
Content-length: 22

THIS ONE ALONE IS MINE}

test scgi-client-0004 {URL Generates Error} {

set reply [::scgi::test::send 10001 {REQUEST_METHOD POST
REQUEST_URI /error

THIS ONE ALONE IS MINE
}] } {Status: 500 Server Internal Error
Content-Type: text/plain
Connection: close
Content-length: 89

500 Server Internal Error
Got the error 500 Server Internal Error

while trying to obtain}

set checkreply [subst {Status: 200 OK
Content-Type: text/plain
Connection: close
Content-length: 10

[clock seconds]}]

test scgi-client-0005 {URL Different output with a different request} {
set reply [::scgi::test::send 10001 {REQUEST_METHOD POST
REQUEST_URI /time

THIS ONE ALONE IS MINE
}] } $checkreply

set fin [open [file join $here pkgIndex.tcl] r]
set checkreply [read $fin]
close $fin
test scgi-client-0006 {Return a file} {
set reply [::scgi::test::send 10001 {REQUEST_METHOD POST
REQUEST_URI /file
}] } "Status: 200 OK
Content-Type: text/plain
Connection: close
Content-length: [string length $checkreply]

$checkreply"

# -------------------------------------------------------------------------

testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:

Changes to modules/httpwget/wget.tcl.

Changes to modules/ident/ident.man.

46
47
48
49
50
51
52
53
54
to the RFC. A detailed error message is returned under the
[const error] key.

[list_end]
[list_end]

[vset CATEGORY ident]
[include ../common-text/feedback.inc]
[manpage_end]







|

46
47
48
49
50
51
52
53
54
to the RFC. A detailed error message is returned under the
[const error] key.

[list_end]
[list_end]

[vset CATEGORY ident]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/imap4/imap4.man.

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
[vset VERSION 0.5.3]
[manpage_begin imap4 n [vset VERSION]]
[see_also ftp]
[see_also http]
[see_also imap]
[see_also mime]
[see_also pop3]
[see_also tls]
[keywords email]
[keywords imap]
[keywords internet]
[keywords mail]
[keywords net]
[keywords rfc3501]
[keywords ssl]
[keywords tls]
[moddesc   {imap client}]
[titledesc {imap client-side tcl implementation of imap protocol}]
[category Networking]
[require Tcl 8.5]
[require imap4 [opt [vset VERSION]]]

[description]

The [package imap4] library package provides the client side of the
[emph "Internet Message Access Protocol"] (IMAP) using standard
sockets or secure connection via TLS/SSL.
The package is fully implemented in Tcl.
<
|
















|

|








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

[manpage_begin imap4 n 0.5.3]
[see_also ftp]
[see_also http]
[see_also imap]
[see_also mime]
[see_also pop3]
[see_also tls]
[keywords email]
[keywords imap]
[keywords internet]
[keywords mail]
[keywords net]
[keywords rfc3501]
[keywords ssl]
[keywords tls]
[moddesc   {imap client}]
[titledesc {imap client-side tcl implementation of imap protocol}]

[require Tcl 8.5]
[require imap4 [opt 0.5.2]]

[description]

The [package imap4] library package provides the client side of the
[emph "Internet Message Access Protocol"] (IMAP) using standard
sockets or secure connection via TLS/SSL.
The package is fully implemented in Tcl.
358
359
360
361
362
363
364
365
366
367
368
Mark R. Crispin, "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1",
RFC 3501, March 2003, [uri http://www.rfc-editor.org/rfc/rfc3501.txt]

[para]
OpenSSL, [uri http://www.openssl.org/]

[vset CATEGORY imap4]
[include ../common-text/feedback.inc]

Only a small part of rfc3501 implemented.
[manpage_end]







|



357
358
359
360
361
362
363
364
365
366
367
Mark R. Crispin, "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1",
RFC 3501, March 2003, [uri http://www.rfc-editor.org/rfc/rfc3501.txt]

[para]
OpenSSL, [uri http://www.openssl.org/]

[vset CATEGORY imap4]
[include ../doctools2base/include/feedback.inc]

Only a small part of rfc3501 implemented.
[manpage_end]

Changes to modules/inifile/ChangeLog.

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
2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	*

2012-01-05  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* ini.tcl: [Bug 3469006]: Followup to [Bug 3419727]. Fixed
	* ini.man: the unscoped 'close' command left in the code.
	* pkgIndex.tcl: Bumped version to 0.2.5

2011-12-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.14 ========================
	*

2011-12-02  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* ini.tcl: [Bug 3419727]: Fixed the creative writing issue
	* ini.man: with what should be local variables of _loadfile
	* pkgIndex.tcl: and _commit. Generally reworked to use the
	  'variable' command to bring object state into scope.
	  Bumped version to 0.2.4

2011-01-24  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.13 ========================
	*

2009-12-07  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.12 ========================
	*

2008-12-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11.1 ========================
	*

2008-10-16  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11 ========================
	*

2008-06-14  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* inifile.pcx: New file. Syntax definitions for the public
	  commands of the inifile package.

2008-05-10  Andreas Kupries  <andreas_kupries@users.sourceforge.net>




|











|













|





|





|





|







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
2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2012-01-05  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* ini.tcl: [Bug 3469006]: Followup to [Bug 3419727]. Fixed
	* ini.man: the unscoped 'close' command left in the code.
	* pkgIndex.tcl: Bumped version to 0.2.5

2011-12-13  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.14 ========================
	* 

2011-12-02  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* ini.tcl: [Bug 3419727]: Fixed the creative writing issue
	* ini.man: with what should be local variables of _loadfile
	* pkgIndex.tcl: and _commit. Generally reworked to use the
	  'variable' command to bring object state into scope.
	  Bumped version to 0.2.4

2011-01-24  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.13 ========================
	* 

2009-12-07  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.12 ========================
	* 

2008-12-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11.1 ========================
	* 

2008-10-16  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.11 ========================
	* 

2008-06-14  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* inifile.pcx: New file. Syntax definitions for the public
	  commands of the inifile package.

2008-05-10  Andreas Kupries  <andreas_kupries@users.sourceforge.net>
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
	* ini.man: 0.2.2.
	* pkgIndex.tcl:

2007-09-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.10 ========================
	*

2007-08-20  Andreas Kupries  <andreask@activestate.com>

	* ini.man: Bumped package version to 0.2.1, due to bugfix in last
	* ini.tcl: entry.
	* pkgIndex.tcl:








|







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
	* ini.man: 0.2.2.
	* pkgIndex.tcl:

2007-09-12  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.10 ========================
	* 

2007-08-20  Andreas Kupries  <andreask@activestate.com>

	* ini.man: Bumped package version to 0.2.1, due to bugfix in last
	* ini.tcl: entry.
	* pkgIndex.tcl:

89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
	* ini.man: Fixed all warnings due to use of now deprecated
	  commands. Added a section about how to give feedback.

2006-10-03  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.9 ========================
	*

2006-06-29 Aaron Faupell <afaupell@users.sourceforge.net>

	* ini.tcl: added default value option for value command, and added
	commentchar command. change in comment behavior
	* ini.man: clarifications for open, commit, and comment commands; added
	commentchar command







|







89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
	* ini.man: Fixed all warnings due to use of now deprecated
	  commands. Added a section about how to give feedback.

2006-10-03  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.9 ========================
	* 

2006-06-29 Aaron Faupell <afaupell@users.sourceforge.net>

	* ini.tcl: added default value option for value command, and added
	commentchar command. change in comment behavior
	* ini.man: clarifications for open, commit, and comment commands; added
	commentchar command
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
	* ini.tcl: fixed bug causing empty ini files when opening
	with w modes introduced on 2005-31-03

2005-10-06  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.8 ========================
	*

2005-09-05  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* ini.tcl:       Fix for bug #1280529 - collision with global
	* inifile.test:  variable names. Added tests for these.

2005-31-03 Aaron Faupell <afaupell@users.sourceforge.net>

	* ini.tcl: fixed bug where ini files were corrupted when
                   saving a shorter version. due to not closing
                   and truncating file before writing.

2004-10-05  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.7 ========================
	*

2004-05-23  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.6.1 ========================
	*

2004-03-06  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* inifile.test: Fixed [Tcllib SF Bug 899204] by (a) rewriting all
	  tests to be completely independent of each other and (b)
	  changing the mode when opening the test file to 'r'. It should
	  be noted that the write facilities of the module are not covered
	  by the testsuite. That is unfortunate.

2004-02-15  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.6 ========================
	*

2004-02-10  Andreas Kupries <andreas_kupries@users.sourceforge.net>

	* inifile.test: It was easier to make this package useable for Tcl
	* ini.tcl:      8.2 than excluding it from test for versions of Tcl
	* ini.man:      before 8.4. So that was done.








|
















|





|













|







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
	* ini.tcl: fixed bug causing empty ini files when opening
	with w modes introduced on 2005-31-03

2005-10-06  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.8 ========================
	* 

2005-09-05  Pat Thoyts  <patthoyts@users.sourceforge.net>

	* ini.tcl:       Fix for bug #1280529 - collision with global
	* inifile.test:  variable names. Added tests for these.

2005-31-03 Aaron Faupell <afaupell@users.sourceforge.net>

	* ini.tcl: fixed bug where ini files were corrupted when
                   saving a shorter version. due to not closing
                   and truncating file before writing.

2004-10-05  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.7 ========================
	* 

2004-05-23  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.6.1 ========================
	* 

2004-03-06  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	* inifile.test: Fixed [Tcllib SF Bug 899204] by (a) rewriting all
	  tests to be completely independent of each other and (b)
	  changing the mode when opening the test file to 'r'. It should
	  be noted that the write facilities of the module are not covered
	  by the testsuite. That is unfortunate.

2004-02-15  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.6 ========================
	* 

2004-02-10  Andreas Kupries <andreas_kupries@users.sourceforge.net>

	* inifile.test: It was easier to make this package useable for Tcl
	* ini.tcl:      8.2 than excluding it from test for versions of Tcl
	* ini.man:      before 8.4. So that was done.

Changes to modules/inifile/ini.man.

1
2
3
4
5
6
7
8
[vset VERSION 0.3.2]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin inifile n [vset VERSION]]
[moddesc   {Parsing of Windows INI files}]
[titledesc {Parsing of Windows INI files}]
[category  {Text processing}]
[require Tcl 8.2]
[require inifile [opt [vset VERSION]]]
|







1
2
3
4
5
6
7
8
[vset VERSION 0.3]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin inifile n [vset VERSION]]
[moddesc   {Parsing of Windows INI files}]
[titledesc {Parsing of Windows INI files}]
[category  {Text processing}]
[require Tcl 8.2]
[require inifile [opt [vset VERSION]]]
92
93
94
95
96
97
98
99
100
Reads and sets the comment character. Lines that begin with this character are treated as
comments. When comments are written out each line is preceded by this character. The default
is [const \;].

[list_end]

[vset CATEGORY inifile]
[include ../common-text/feedback.inc]
[manpage_end]







|

92
93
94
95
96
97
98
99
100
Reads and sets the comment character. Lines that begin with this character are treated as
comments. When comments are written out each line is preceded by this character. The default
is [const \;].

[list_end]

[vset CATEGORY inifile]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/inifile/ini.tcl.

1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16
17
18
# ini.tcl --
#
#       Querying and modifying old-style windows configuration files (.ini)
#
# Copyright (c) 2003-2007    Aaron Faupell <afaupell@users.sourceforge.net>
# Copyright (c) 2008-2012    Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package provide inifile 0.3.2

namespace eval ini {
    variable nexthandle  0
    variable commentchar \;
}

proc ::ini::open {ini args} {









|
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# ini.tcl --
#
#       Querying and modifying old-style windows configuration files (.ini)
#
# Copyright (c) 2003-2007    Aaron Faupell <afaupell@users.sourceforge.net>
# Copyright (c) 2008-2012    Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: ini.tcl,v 1.17 2012/01/05 21:04:55 andreas_kupries Exp $

package provide inifile 0.3

namespace eval ini {
    variable nexthandle  0
    variable commentchar \;
}

proc ::ini::open {ini args} {
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
        return -code error \
	    -errorcode {INIFILE MODE INVALID} \
	    "$mode is not a valid access mode"
    }

    ::set fh ini$nexthandle
    ::set tmp [::open $ini $mode]










    namespace eval ::ini::$fh {
        variable data;     array set data     {}
        variable comments; array set comments {}
        variable sections; array set sections {}
    }
    fconfigure $tmp -translation crlf
    if {[info exists enc]} {
	::ini::_setfileenc $tmp $enc
	::set ::ini::${fh}::enc     $enc
    }

    ::set ::ini::${fh}::channel $tmp
    ::set ::ini::${fh}::file    [_normalize $ini]
    ::set ::ini::${fh}::mode    $mode

    incr nexthandle
    if { [string match "r*" $mode] } {
        _loadfile $fh







>
>
>
>
>
>
>
>
>
>





<
<
<
<
<
<







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
        return -code error \
	    -errorcode {INIFILE MODE INVALID} \
	    "$mode is not a valid access mode"
    }

    ::set fh ini$nexthandle
    ::set tmp [::open $ini $mode]
    fconfigure $tmp -translation crlf
    if {[info exists enc]} {
	if {[catch {
	    fconfigure $tmp -encoding $enc
	} msg]} {
	    ::close $tmp
	    return -code error $msg
	}
    }

    namespace eval ::ini::$fh {
        variable data;     array set data     {}
        variable comments; array set comments {}
        variable sections; array set sections {}
    }






    ::set ::ini::${fh}::channel $tmp
    ::set ::ini::${fh}::file    [_normalize $ini]
    ::set ::ini::${fh}::mode    $mode

    incr nexthandle
    if { [string match "r*" $mode] } {
        _loadfile $fh
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146

    variable ::ini::${fh}::data
    variable ::ini::${fh}::comments
    variable ::ini::${fh}::sections
    variable ::ini::${fh}::channel
    variable ::ini::${fh}::file
    variable ::ini::${fh}::mode
    variable ::ini::${fh}::enc
    variable commentchar

    if { $mode == "r" } {
	return -code error \
	    -errorcode {INIFILE READ-ONLY} \
	    "cannot write to read-only file"
    }
    ::close $channel
    ::set channel [::open $file w]
    if {[info exists enc]} {
	::ini::_setfileenc $channel $enc
    }
    ::set char $commentchar
    #seek $channel 0 start
    foreach sec [array names sections] {
	variable ::ini::${fh}::enc
	if { [info exists comments($sec)] } {
	    puts $channel "$char [join $comments($sec) "\n$char "]\n"
	}
	puts $channel "\[$sec\]"
	foreach key [lsort -dictionary [array names data [_globescape $sec]\000*]] {
	    ::set key [lindex [split $key \000] 1]
	    if {[info exists comments($sec\000$key)]} {
		puts $channel "$char [join $comments($sec\000$key) "\n$char "]"
	    }
	    if {[info exists enc]} {
		::ini::_setfileenc $channel $enc
	    }
	    puts $channel "$key=$data($sec\000$key)"
	}
	puts $channel ""
    }
    ::close $channel
    ::set channel [::open $file r+]
    if {[info exists enc]} {
	::ini::_setfileenc $channel $enc
    }
    return
}

# internal command to read in a file
# see open and revert for public commands

proc ::ini::_loadfile {fh} {







<









<
<
<



<









<
<
<






<
<
<







101
102
103
104
105
106
107

108
109
110
111
112
113
114
115
116



117
118
119

120
121
122
123
124
125
126
127
128



129
130
131
132
133
134



135
136
137
138
139
140
141

    variable ::ini::${fh}::data
    variable ::ini::${fh}::comments
    variable ::ini::${fh}::sections
    variable ::ini::${fh}::channel
    variable ::ini::${fh}::file
    variable ::ini::${fh}::mode

    variable commentchar

    if { $mode == "r" } {
	return -code error \
	    -errorcode {INIFILE READ-ONLY} \
	    "cannot write to read-only file"
    }
    ::close $channel
    ::set channel [::open $file w]



    ::set char $commentchar
    #seek $channel 0 start
    foreach sec [array names sections] {

	if { [info exists comments($sec)] } {
	    puts $channel "$char [join $comments($sec) "\n$char "]\n"
	}
	puts $channel "\[$sec\]"
	foreach key [lsort -dictionary [array names data [_globescape $sec]\000*]] {
	    ::set key [lindex [split $key \000] 1]
	    if {[info exists comments($sec\000$key)]} {
		puts $channel "$char [join $comments($sec\000$key) "\n$char "]"
	    }



	    puts $channel "$key=$data($sec\000$key)"
	}
	puts $channel ""
    }
    ::close $channel
    ::set channel [::open $file r+]



    return
}

# internal command to read in a file
# see open and revert for public commands

proc ::ini::_loadfile {fh} {
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
		-errorcode {INIFILE KEY INVALID} \
		"can't read key \"$key\""
        }
    }
    return
}

proc ::ini::_setfileenc {fh enc} {
    if {[catch {
	fconfigure $fh -encoding $enc
    } msg]} {
	catch { ::close $fh }
	return -code error $msg
    }
}

# internal command to check validity of a handle

if { [package vcompare [package provide Tcl] 8.4] < 0 } {
    proc ::ini::_normalize {path} {
	return $path
    }
    proc ::ini::_valid_ns {name} {







<
<
<
<
<
<
<
<
<







210
211
212
213
214
215
216









217
218
219
220
221
222
223
		-errorcode {INIFILE KEY INVALID} \
		"can't read key \"$key\""
        }
    }
    return
}










# internal command to check validity of a handle

if { [package vcompare [package provide Tcl] 8.4] < 0 } {
    proc ::ini::_normalize {path} {
	return $path
    }
    proc ::ini::_valid_ns {name} {
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
proc ::ini::revert {fh} {
    _valid_ns $fh
    namespace eval ::ini::$fh {
        array set data     {}
        array set comments {}
        array set sections {}
    }
    variable ::ini::${fh}::enc
    if {[info exists enc]} {
	::ini::_setfileenc $fh $enc
    }
    variable ::ini::${fh}::mode
    if { ![string match "w*" $mode] } {
        _loadfile $fh
    }
}







<
<
<
<
<




393
394
395
396
397
398
399





400
401
402
403
proc ::ini::revert {fh} {
    _valid_ns $fh
    namespace eval ::ini::$fh {
        array set data     {}
        array set comments {}
        array set sections {}
    }





    if { ![string match "w*" $mode] } {
        _loadfile $fh
    }
}

Changes to modules/inifile/inifile.test.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
testing {
    useLocal ini.tcl inifile
}

#---------------------------------------------------------------------

set inifile [localPath ini.tcl]
set testini [asset test.ini]
set sampini [asset sample.ini]

#---------------------------------------------------------------------

test inifile-1.1 {ini::open} {
    set res [ini::open $testini r]
    ini::close $res
    set res







|
|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
testing {
    useLocal ini.tcl inifile
}

#---------------------------------------------------------------------

set inifile [localPath ini.tcl]
set testini [localPath test.ini]
set sampini [localPath sample.ini]

#---------------------------------------------------------------------

test inifile-1.1 {ini::open} {
    set res [ini::open $testini r]
    ini::close $res
    set res
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
    catch {
	set res [ini::open $testini w-]
    } res
    set res
} {w- is not a valid access mode}

#---------------------------------------------------------------------

test inifile-5.0 {ini::revert, wrong # args} {
    catch { ini::revert } res
    set res
} {wrong # args: should be "ini::revert fh"}

test inifile-5.1 {ini::revert, wrong # args} {
    catch { ini::revert FH X } res
    set res
} {wrong # args: should be "ini::revert fh"}

test inifile-5.2 {ini::revert, bad token} {
    catch { ini::revert FH } res
    set res
} {FH is not an open INI file}

test inifile-5.4 {ini::revert} {
    set res [ini::open $testini r]
    ini::revert $res
    ini::close $res
} {}

#---------------------------------------------------------------------
# Clean up
unset res
testsuiteCleanup
return







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<


209
210
211
212
213
214
215























216

217
218
    catch {
	set res [ini::open $testini w-]
    } res
    set res
} {w- is not a valid access mode}

#---------------------------------------------------------------------























# Clean up

testsuiteCleanup
return

Changes to modules/inifile/pkgIndex.tcl.

1
2
if { ![package vsatisfies [package provide Tcl] 8.2] } { return }
package ifneeded inifile 0.3.2 [list source [file join $dir ini.tcl]]

|
1
2
if { ![package vsatisfies [package provide Tcl] 8.2] } { return }
package ifneeded inifile 0.3 [list source [file join $dir ini.tcl]]

Added modules/inifile/sample.ini.











>
>
>
>
>
1
2
3
4
5
[General]   
 key=value
key2=value2 

  ; ....  

Deleted modules/inifile/test-assets/sample.ini.

1
2
3
4
5
[General]   
 key=value
key2=value2 

  ; ....  
<
<
<
<
<










Deleted modules/inifile/test-assets/test.ini.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[emptysection]

; a comment for section 1

[section1]
key=value
testkey=hi

[section2]
; key comment
key=othervalue


[{test]
}key   =    $blah
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























Added modules/inifile/test.ini.































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[emptysection]

; a comment for section 1

[section1]
key=value
testkey=hi

[section2]
; key comment
key=othervalue


[{test]
}key   =    $blah

Changes to modules/interp/deleg_method.man.

41
42
43
44
45
46
47
48
49
returns the result from the remote method as its own result. If
however the option [option -async] was specified then the generated
method will not wait for a result and return immediately.

[list_end]

[vset CATEGORY interp]
[include ../common-text/feedback.inc]
[manpage_end]







|

41
42
43
44
45
46
47
48
49
returns the result from the remote method as its own result. If
however the option [option -async] was specified then the generated
method will not wait for a result and return immediately.

[list_end]

[vset CATEGORY interp]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/interp/deleg_proc.man.

39
40
41
42
43
44
45
46
47
returns the result from the remote procedure as its own result. If
however the option [option -async] was specified then the generated
procedure will not wait for a result and return immediately.

[list_end]

[vset CATEGORY interp]
[include ../common-text/feedback.inc]
[manpage_end]







|

39
40
41
42
43
44
45
46
47
returns the result from the remote procedure as its own result. If
however the option [option -async] was specified then the generated
procedure will not wait for a result and return immediately.

[list_end]

[vset CATEGORY interp]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/interp/tcllib_interp.man.

66
67
68
69
70
71
72
73
74
[para]

The result of the command is the empty string.

[list_end]

[vset CATEGORY interp]
[include ../common-text/feedback.inc]
[manpage_end]







|

66
67
68
69
70
71
72
73
74
[para]

The result of the command is the empty string.

[list_end]

[vset CATEGORY interp]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/irc/irc.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[vset VERSION 0.7.0]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin irc n [vset VERSION]]
[see_also {rfc 1459}]
[keywords chat]
[keywords irc]
[moddesc   {Low Level Tcl IRC Interface}]
[titledesc {Create IRC connection and interface.}]
[category  Networking]
[require Tcl 8.6]
[require irc [opt [vset VERSION]]]
[description]

This package provides low-level commands to deal with the IRC protocol
(Internet Relay Chat) for immediate and interactive multi-cast
communication.

[para]
<

|






|
|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin irc n 0.6.1]
[see_also {rfc 1459}]
[keywords chat]
[keywords irc]
[moddesc   {Low Level Tcl IRC Interface}]
[titledesc {Create IRC connection and interface.}]
[category  Networking]
[require Tcl]
[require irc [opt 0.6.1]]
[description]

This package provides low-level commands to deal with the IRC protocol
(Internet Relay Chat) for immediate and interactive multi-cast
communication.

[para]
232
233
234
235
236
237
238
239
240
[call [cmd msg]]

Returns the message portion of the command (the part after the :).

[list_end]

[vset CATEGORY irc]
[include ../common-text/feedback.inc]
[manpage_end]







|

231
232
233
234
235
236
237
238
239
[call [cmd msg]]

Returns the message portion of the command (the part after the :).

[list_end]

[vset CATEGORY irc]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/irc/irc.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# irc.tcl --
#
#	irc implementation for Tcl.
#
# Copyright (c) 2001-2003 by David N. Welton <davidw@dedasys.com>.
# This code may be distributed under the same terms as Tcl.

# -------------------------------------------------------------------------

package require Tcl 8.6

# -------------------------------------------------------------------------

namespace eval ::irc {
    # counter used to differentiate connections
    variable conn 0
    variable config
    variable irctclfile [info script]
    array set config {







<
<
|
<
<







1
2
3
4
5
6
7


8


9
10
11
12
13
14
15
# irc.tcl --
#
#	irc implementation for Tcl.
#
# Copyright (c) 2001-2003 by David N. Welton <davidw@dedasys.com>.
# This code may be distributed under the same terms as Tcl.



package require Tcl 8.3



namespace eval ::irc {
    # counter used to differentiate connections
    variable conn 0
    variable config
    variable irctclfile [info script]
    array set config {
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
# value	value of the configuration option.

proc ::irc::config { args } {
    variable config
    if { [llength $args] == 0 } {
        return [array get config]
    } elseif { [llength $args] == 1 } {
	set key [lindex $args 0]
        return $config($key)
    } elseif { [llength $args] > 2 } {
        error "wrong # args: should be \"config key ?val?\""
    }
    # llength $args == 2
    set key [lindex $args 0]
    set value [lindex $args 1]
    foreach ns [namespace children] {
        if { [info exists config($key)] && [info exists ${ns}::config($key)] \
                && [set ${ns}::config($key)] == $config($key)} {
            ${ns}::cmd-config $key $value
        }
    }
    set config($key) $value
}


# ::irc::connections --
#
# Return a list of handles to all existing connections

proc ::irc::connections { } {
    set r {}







<




<










>







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
# value	value of the configuration option.

proc ::irc::config { args } {
    variable config
    if { [llength $args] == 0 } {
        return [array get config]
    } elseif { [llength $args] == 1 } {

        return $config($key)
    } elseif { [llength $args] > 2 } {
        error "wrong # args: should be \"config key ?val?\""
    }

    set key [lindex $args 0]
    set value [lindex $args 1]
    foreach ns [namespace children] {
        if { [info exists config($key)] && [info exists ${ns}::config($key)] \
                && [set ${ns}::config($key)] == $config($key)} {
            ${ns}::cmd-config $key $value
        }
    }
    set config($key) $value
}


# ::irc::connections --
#
# Return a list of handles to all existing connections

proc ::irc::connections { } {
    set r {}
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
	array set config [array get ::irc::config]
	if { $config(logger) || $config(debug)} {
	    package require logger
	    variable logger
            set logger [logger::init [namespace tail [namespace current]]]
            if { !$config(debug) } { ${logger}::disable debug }
        }


	# ircsend --
	# send text to the IRC server

	proc ircsend { msg } {
	    variable sock
	    variable dispatch
	    if { $sock eq "" } { return }
	    cmd-log debug "ircsend: '$msg'"
	    if { [catch {puts $sock $msg} err] } {
	        catch { close $sock }
	        set sock {}
		if { [info exists dispatch(EOF)] } {
		    eval $dispatch(EOF)
		}







|







|







114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
	array set config [array get ::irc::config]
	if { $config(logger) || $config(debug)} {
	    package require logger
	    variable logger
            set logger [logger::init [namespace tail [namespace current]]]
            if { !$config(debug) } { ${logger}::disable debug }
        }
	

	# ircsend --
	# send text to the IRC server

	proc ircsend { msg } {
	    variable sock
	    variable dispatch
	    if { $sock == "" } { return }
	    cmd-log debug "ircsend: '$msg'"
	    if { [catch {puts $sock $msg} err] } {
	        catch { close $sock }
	        set sock {}
		if { [info exists dispatch(EOF)] } {
		    eval $dispatch(EOF)
		}
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
        # key	name of the configuration option to change.
        #
        # value	value (optional) of the configuration option.

        proc cmd-config { args } {
            variable config
	    variable logger

	    if { [llength $args] == 0 } {
		return [array get config]
	    } elseif { [llength $args] == 1 } {
		set key [lindex $args 0]
		return $config($key)
	    } elseif { [llength $args] > 2 } {
		error "wrong # args: should be \"config key ?val?\""
	    }
	    # llength $args == 2
	    set key [lindex $args 0]
	    set value [lindex $args 1]
            if { $key eq "debug" } {
                if {$value} {
                    if { !$config(logger) } { cmd-config logger 1 }
                    ${logger}::enable debug
                } elseif { [info exists logger] } {
                    ${logger}::disable debug
	        }
            }
            if { $key eq "logger" } {
                if { $value && !$config(logger)} {
                    package require logger
                    set logger [logger::init [namespace tail [namespace current]]]
                } elseif { [info exists logger] } {
                    ${logger}::delete
                    unset logger
	        }
            }
            set config($key) $value
        }

        proc cmd-log {level text} {
	    variable logger
            if { ![info exists logger] } return
            ${logger}::$level $text
        }

        proc cmd-logname { } {
            variable logger
            if { ![info exists logger] } return
            return $logger
        }

        # cmd-destroy --
        #
        # destroys the current connection and its namespace

        proc cmd-destroy { } {
            variable logger
            variable sock
            if { [info exists logger] } { ${logger}::delete }
            catch {close $sock}
            namespace delete [namespace current]
        }

        proc cmd-connected { } {
            variable sock
            if { $sock eq "" } { return 0 }
            return 1
        }

	proc cmd-user { username hostname servername {userinfo ""} } {
	    if { $userinfo eq "" } {
		ircsend "USER $username $hostname server :$servername"
	    } else {
		ircsend "USER $username $hostname $servername :$userinfo"
	    }
	}

	proc cmd-nick { nk } {







|



<




<


|







|










|





|




















|




|







154
155
156
157
158
159
160
161
162
163
164

165
166
167
168

169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
        # key	name of the configuration option to change.
        #
        # value	value (optional) of the configuration option.

        proc cmd-config { args } {
            variable config
	    variable logger
	    
	    if { [llength $args] == 0 } {
		return [array get config]
	    } elseif { [llength $args] == 1 } {

		return $config($key)
	    } elseif { [llength $args] > 2 } {
		error "wrong # args: should be \"config key ?val?\""
	    }

	    set key [lindex $args 0]
	    set value [lindex $args 1]
            if { $key == "debug" } {
                if {$value} {
                    if { !$config(logger) } { cmd-config logger 1 }
                    ${logger}::enable debug
                } elseif { [info exists logger] } {
                    ${logger}::disable debug
	        }
            }
            if { $key == "logger" } {
                if { $value && !$config(logger)} {
                    package require logger
                    set logger [logger::init [namespace tail [namespace current]]]
                } elseif { [info exists logger] } {
                    ${logger}::delete
                    unset logger
	        }
            }
            set config($key) $value
        }
        
        proc cmd-log {level text} {
	    variable logger
            if { ![info exists logger] } return
            ${logger}::$level $text
        }
        
        proc cmd-logname { } {
            variable logger
            if { ![info exists logger] } return
            return $logger
        }

        # cmd-destroy --
        #
        # destroys the current connection and its namespace

        proc cmd-destroy { } {
            variable logger
            variable sock
            if { [info exists logger] } { ${logger}::delete }
            catch {close $sock}
            namespace delete [namespace current]
        }

        proc cmd-connected { } {
            variable sock
            if { $sock == "" } { return 0 }
            return 1
        }

	proc cmd-user { username hostname servername {userinfo ""} } {
	    if { $userinfo == "" } {
		ircsend "USER $username $hostname server :$servername"
	    } else {
		ircsend "USER $username $hostname $servername :$userinfo"
	    }
	}

	proc cmd-nick { nk } {
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
	}

	proc cmd-join { chan {key {}} } {
	    ircsend "JOIN $chan $key"
	}

	proc cmd-part { chan {msg ""} } {
	    if { $msg eq "" } {
		ircsend "PART $chan"
	    } else {
		ircsend "PART $chan :$msg"
	    }
	}

	proc cmd-quit { {msg {tcllib irc module - http://core.tcl.tk/tcllib/}} } {







|







243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
	}

	proc cmd-join { chan {key {}} } {
	    ircsend "JOIN $chan $key"
	}

	proc cmd-part { chan {msg ""} } {
	    if { $msg == "" } {
		ircsend "PART $chan"
	    } else {
		ircsend "PART $chan :$msg"
	    }
	}

	proc cmd-quit { {msg {tcllib irc module - http://core.tcl.tk/tcllib/}} } {
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339

	proc cmd-send { line } {
	    ircsend $line
	}

	proc cmd-peername { } {
	    variable sock
	    if { $sock eq "" } { return {} }
	    return [fconfigure $sock -peername]
	}

	proc cmd-sockname { } {
	    variable sock
	    if { $sock eq "" } { return {} }
	    return [fconfigure $sock -sockname]
	}

        proc cmd-socket { } {
            variable sock
            return $sock
        }

	proc cmd-disconnect { } {
	    variable sock
	    if { $sock eq "" } { return -1 }
	    catch { close $sock }
	    set sock {}
	    return 0
	}

	# Connect --
	# Create the actual tcp connection.

	proc cmd-connect { h {p 6667} } {
	    variable sock
	    variable host
	    variable port

	   set host $h
	   set port $p

	    if { $sock eq "" } {
		set sock [socket $host $port]
		fconfigure $sock -translation crlf -buffering line
		fileevent $sock readable [namespace current]::GetEvent
	    }
	    return 0
	}








|





|







|


|
















|







284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332

	proc cmd-send { line } {
	    ircsend $line
	}

	proc cmd-peername { } {
	    variable sock
	    if { $sock == "" } { return {} }
	    return [fconfigure $sock -peername]
	}

	proc cmd-sockname { } {
	    variable sock
	    if { $sock == "" } { return {} }
	    return [fconfigure $sock -sockname]
	}

        proc cmd-socket { } {
            variable sock
            return $sock
        }
        
	proc cmd-disconnect { } {
	    variable sock
	    if { $sock == "" } { return -1 }
	    catch { close $sock }
	    set sock {}
	    return 0
	}

	# Connect --
	# Create the actual tcp connection.

	proc cmd-connect { h {p 6667} } {
	    variable sock
	    variable host
	    variable port

	   set host $h
	   set port $p

	    if { $sock == "" } {
		set sock [socket $host $port]
		fconfigure $sock -translation crlf -buffering line
		fileevent $sock readable [namespace current]::GetEvent
	    }
	    return 0
	}

443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
	    set linedata(action) [lindex $header 1]
	    set linedata(target) [lindex $header 2]
	    set linedata(additional) [lrange $header 3 end]
	    if { [info exists dispatch($linedata(action))] } {
		eval $dispatch($linedata(action))
	    } elseif { [string match {[0-9]??} $linedata(action)] } {
		eval $dispatch(defaultnumeric)
	    } elseif { $linedata(who) eq "" } {
		eval $dispatch(defaultcmd)
	    } else {
		eval $dispatch(defaultevent)
	    }
	}

	# registerevent --

	# Register an event in the dispatch table.

	# Arguments:
	# evnt: name of event as sent by IRC server.
	# cmd: proc to register as the event handler

	proc cmd-registerevent { evnt cmd } {
	    variable dispatch
	    set dispatch($evnt) $cmd
	    if { $cmd eq "" } {
		unset dispatch($evnt)
	    }
	}

	# getevent --

	# Return the currently registered handler for the event.







|

















|







436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
	    set linedata(action) [lindex $header 1]
	    set linedata(target) [lindex $header 2]
	    set linedata(additional) [lrange $header 3 end]
	    if { [info exists dispatch($linedata(action))] } {
		eval $dispatch($linedata(action))
	    } elseif { [string match {[0-9]??} $linedata(action)] } {
		eval $dispatch(defaultnumeric)
	    } elseif { $linedata(who) == "" } {
		eval $dispatch(defaultcmd)
	    } else {
		eval $dispatch(defaultevent)
	    }
	}

	# registerevent --

	# Register an event in the dispatch table.

	# Arguments:
	# evnt: name of event as sent by IRC server.
	# cmd: proc to register as the event handler

	proc cmd-registerevent { evnt cmd } {
	    variable dispatch
	    set dispatch($evnt) $cmd
	    if { $cmd == "" } {
		unset dispatch($evnt)
	    }
	}

	# getevent --

	# Return the currently registered handler for the event.
521
522
523
524
525
526
527
528
529
530
531
    set returncommand [format "%s::irc%s::network" [namespace current] $conn]
    incr conn
    return $returncommand
}

# -------------------------------------------------------------------------

package provide irc 0.6.2

# -------------------------------------------------------------------------
return







|


<
514
515
516
517
518
519
520
521
522
523

    set returncommand [format "%s::irc%s::network" [namespace current] $conn]
    incr conn
    return $returncommand
}

# -------------------------------------------------------------------------

package provide irc 0.6.1

# -------------------------------------------------------------------------

Changes to modules/irc/picoirc.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 0.9.1]
[manpage_begin picoirc n [vset VERSION]]
[see_also {rfc 1459}]
[keywords chat]
[keywords irc]
[moddesc   {Simple embeddable IRC interface}]
[titledesc {Small and simple embeddable IRC client.}]
[category  Networking]
[require Tcl 8.6]
[require picoirc [opt [vset VERSION]]]
[description]

This package provides a general purpose minimal IRC client suitable for
embedding in other applications. All communication with the parent
application is done via an application provided callback procedure.
Each connection has its own state so you can hook up multiple servers

|







|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 0.5.2]
[manpage_begin picoirc n [vset VERSION]]
[see_also {rfc 1459}]
[keywords chat]
[keywords irc]
[moddesc   {Simple embeddable IRC interface}]
[titledesc {Small and simple embeddable IRC client.}]
[category  Networking]
[require Tcl]
[require picoirc [opt [vset VERSION]]]
[description]

This package provides a general purpose minimal IRC client suitable for
embedding in other applications. All communication with the parent
application is done via an application provided callback procedure.
Each connection has its own state so you can hook up multiple servers
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

[para]

[section COMMANDS]

[list_begin definitions]

[call [cmd ::picoirc::connect] [arg callback] [arg nick] [opt [arg password]] [arg url]]

Creates a new irc connection to the server specified by [arg url] and
login using the [arg nick] as the username and optionally [arg password].
If the [arg url] starts with [emph ircs://] then a TLS connection is
created. The [arg callback] must be as specified in [sectref CALLBACK].
Returns a package-specific variable that is used when calling other
commands in this package.

[para][emph Note:]

For connecting via TLS the Tcl module [emph tls] must be already
loaded, otherwise an error is raised.

[example {
# must be loaded for TLS
package require tls
# default arguments
tls::init -autoservername true -command workaround \\
    -require 1 -cadir /etc/ssl/certs -tls1 0 -tls1.1 0
# avoid annoying bgerror, errors are already catched internally
proc workaround {state args} {
    if {$state == "verify"} {
        return [lindex $args 3]
    }
}
}]

[call [cmd ::picoirc::post] [arg context] [arg channel] [arg message]]

This should be called to process user input and send it to the
server. A number of commands are recognised when prefixed with a
forward-slash (/). Such commands are converted to IRC command
sequences and then sent.

[call [cmd ::picoirc::splituri] [arg uri]]

Splits an IRC scheme uniform resource indicator into its component
parts. Returns a list of server, port, channel and secure where
secure is a boolean flag which is [const true] if a TLS connection was
requested via the [emph ircs://] schema. The default port is 6667 (or
6697 if secured) and there is no default channel.

[call [cmd ::picoirc::send] [arg context] [arg line]]

This command is where all raw output to the server is handled. The
default action is to write the [arg line] to the irc socket. However,
before this happens the callback is called with "debug write". This
permits the application author to inspect the raw IRC data and if







|

|
|
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











|
<
<
|







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

[para]

[section COMMANDS]

[list_begin definitions]

[call [cmd ::picoirc::connect] [arg callback] [arg nick] [arg url]]

Create a new irc connection to the server specified by [arg url] and
login using the [arg nick] as the username. The [arg callback] must be


as specified in [sectref CALLBACK]. Returns a package-specific variable
that is used when calling other commands in this package.




















[call [cmd ::picoirc::post] [arg context] [arg channel] [arg message]]

This should be called to process user input and send it to the
server. A number of commands are recognised when prefixed with a
forward-slash (/). Such commands are converted to IRC command
sequences and then sent.

[call [cmd ::picoirc::splituri] [arg uri]]

Splits an IRC scheme uniform resource indicator into its component
parts. Returns a list of server, port and channel. The default port is


6667 and there is no default channel.

[call [cmd ::picoirc::send] [arg context] [arg line]]

This command is where all raw output to the server is handled. The
default action is to write the [arg line] to the irc socket. However,
before this happens the callback is called with "debug write". This
permits the application author to inspect the raw IRC data and if
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

called to notify the application of an updated userlist. This is
generated when the output of the NAMES irc command is seen. The
package collects the entire output which can span a number of output
lines from the server and calls this callback when they have all been
received.

[opt_def userinfo "[arg nick] [arg info]"]

called as a response of WHOIS command. [arg nick] is the user
the command was targeted for. [arg info] is the dictionary containing
detailed information about that user: name, host, channels and userinfo.
userinfo typically contains name and version of user's IRC client.

[opt_def chat "[arg target] [arg nick] [arg message] [arg type]"]

called when a message arrives. [arg target] is the identity that the
message was targetted for. This can be the logged in nick or a channel
name. [arg nick] is the name of the sender of the message.
[arg message] is the message text. [arg type] is set to "ACTION" if the
message was sent as a CTCP ACTION. [arg type] is set to "NOTICE" if the
message was sent as a NOTICE command, in that case [arg target] is empty
if it matches current user nick or it's "*", in later case empty
[arg nick] means that notice comes from server.

[opt_def mode "[arg nick] [arg target] [arg flags]"]

called when mode of user or channel changes. [arg nick] is the name
of the user who requested a change, can be empty if it's the server.
[arg target] is the identity that has its mode changed. [arg flags]
are the changes in mode.

[opt_def system "[arg channel] [arg message]"]

called when a system message is received

[opt_def topic "[arg channel] [arg topic]"]








<
<
<
<
<
<
<






|
<
<
<
<
<
<
<
<
<
<







100
101
102
103
104
105
106







107
108
109
110
111
112
113










114
115
116
117
118
119
120

called to notify the application of an updated userlist. This is
generated when the output of the NAMES irc command is seen. The
package collects the entire output which can span a number of output
lines from the server and calls this callback when they have all been
received.








[opt_def chat "[arg target] [arg nick] [arg message] [arg type]"]

called when a message arrives. [arg target] is the identity that the
message was targetted for. This can be the logged in nick or a channel
name. [arg nick] is the name of the sender of the message.
[arg message] is the message text. [arg type] is set to "ACTION" if the
message was sent as a CTCP ACTION











[opt_def system "[arg channel] [arg message]"]

called when a system message is received

[opt_def topic "[arg channel] [arg topic]"]

Changes to modules/irc/picoirc.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Based upon the picoirc code by Salvatore Sanfillipo and Richard Suchenwirth
# See http://wiki.tcl.tk/13134 for the original standalone version.
#
#	This package provides a general purpose minimal IRC client suitable for
#	embedding in other applications. All communication with the parent
#	application is done via an application provided callback procedure.
#
# Copyright (c) 2004 Salvatore Sanfillipo
# Copyright (c) 2004 Richard Suchenwirth
# Copyright (c) 2007 Patrick Thoyts
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.6

# -------------------------------------------------------------------------

namespace eval ::picoirc {
    variable uid
    if {![info exists uid]} { set uid 0 }

    variable defaults {
        server   "irc.freenode.net"
        port     6667
        secure   0
        channel  ""
        callback ""
        motd     {}
        users    {}
    }
    namespace export connect send post splituri
}

proc ::picoirc::splituri {uri} {
    lassign {{} {} {} {}} secure server port channel
    if {![regexp {^irc(s)?://([^:/]+)(?::([^/]+))?(?:/([^,]+))?} $uri -> secure server port channel]} {
        regexp {^(?:([^@]+)@)?([^:]+)(?::(\d+))?} $uri -> channel server port
    }
    set secure [expr {$secure eq "s"}]
    if {$port eq {}} { set port [expr {$secure ? 6697: 6667}] }
    return [list $server $port $channel $secure]
}

proc ::picoirc::connect {callback nick args} {
    if {[llength $args] > 2} {
        return -code error "wrong # args: must be \"callback nick ?passwd? url\""
    } elseif {[llength $args] == 1} {
        set url [lindex $args 0]
    } else {
	lassign $args passwd url
    }
    variable defaults
    variable uid
    set context [namespace current]::irc[incr uid]
    upvar #0 $context irc
    array set irc $defaults
    lassign [splituri $url] server port channel secure
    if {[info exists channel] && $channel ne ""} {set irc(channel) $channel}
    if {[info exists server]  && $server  ne ""} {set irc(server)  $server}
    if {[info exists port]    && $port    ne ""} {set irc(port)    $port}
    if {[info exists secure]  && $secure}        {set irc(secure)  $secure}
    if {[info exists passwd]  && $passwd  ne ""} {set irc(passwd)  $passwd}
    set irc(callback) $callback
    set irc(nick) $nick
    Callback $context init
    if {$irc(secure)} {
        set irc(socket) [::tls::socket $irc(server) $irc(port)]
    } else {
        set irc(socket) [socket -async $irc(server) $irc(port)]
    }
    fileevent $irc(socket) readable [list [namespace origin Read] $context]
    fileevent $irc(socket) writable [list [namespace origin Write] $context]
    return $context
}

proc ::picoirc::Callback {context state args} {
    upvar #0 $context irc
    if {[llength $irc(callback)] > 0
        && [llength [info commands [lindex $irc(callback) 0]]] == 1} {
        if {[catch {eval $irc(callback) [list $context $state] $args} result]} {
            puts stderr "callback error: $result"
        } else {
            return $result
        }
    }
}

proc ::picoirc::Version {context} {
    if {[catch {Callback $context version} ver]} { set ver {} }
    if {$ver eq {}} {
        set ver "PicoIRC:[package provide picoirc]:Tcl [info patchlevel]"
    }
    return $ver
}

proc ::picoirc::Write {context} {
    upvar #0 $context irc
    fileevent $irc(socket) writable {}
    if {[set err [fconfigure $irc(socket) -error]] ne ""
        || $irc(secure) && [catch {while {![::tls::handshake $irc(socket)]} {}} err] != 0} {
        Callback $context close $err
        close $irc(socket)
        unset irc
        return
    }
    fconfigure $irc(socket) -blocking 0 -buffering line -translation crlf -encoding utf-8
    Callback $context connect
    if {[info exists irc(passwd)]} {
        send $context "PASS $irc(passwd)"
    }
    set ver [join [lrange [split [Version $context] :] 0 1] " "]
    send $context "NICK $irc(nick)"
    send $context "USER $::tcl_platform(user) 0 * :$ver user"
    if {$irc(channel) ne {}} {
        after idle [list [namespace origin send] $context "JOIN $irc(channel)"]
    }
    return
}

proc ::picoirc::Getnick {s} {
    set nick {}
    regexp {^([^!]*)!} $s -> nick
    return $nick
}

proc ::picoirc::Read {context} {
    upvar #0 $context irc
    if {[eof $irc(socket)]} {
        fileevent $irc(socket) readable {}
        Callback $context close


|













<
<
<
<







<









|
|


<
|
|








|






|

|
|
<
|



<
<
<
|
<









|
|
<
<















|
<



















|
|
|
|







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
89

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Based upon the picoirc code by Salvatore Sanfillipo and Richard Suchenwirth
# See http://wiki.tcl.tk/13134 for the original standalone version.
# 
#	This package provides a general purpose minimal IRC client suitable for
#	embedding in other applications. All communication with the parent
#	application is done via an application provided callback procedure.
#
# Copyright (c) 2004 Salvatore Sanfillipo
# Copyright (c) 2004 Richard Suchenwirth
# Copyright (c) 2007 Patrick Thoyts
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------





namespace eval ::picoirc {
    variable uid
    if {![info exists uid]} { set uid 0 }

    variable defaults {
        server   "irc.freenode.net"
        port     6667

        channel  ""
        callback ""
        motd     {}
        users    {}
    }
    namespace export connect send post splituri
}

proc ::picoirc::splituri {uri} {
    foreach {server port channel} {{} {} {}} break
    if {![regexp {^irc://([^:/]+)(?::([^/]+))?(?:/([^,]+))?} $uri -> server port channel]} {
        regexp {^(?:([^@]+)@)?([^:]+)(?::(\d+))?} $uri -> channel server port
    }

    if {$port eq {}} { set port 6667 }
    return [list $server $port $channel]
}

proc ::picoirc::connect {callback nick args} {
    if {[llength $args] > 2} {
        return -code error "wrong # args: must be \"callback nick ?passwd? url\""
    } elseif {[llength $args] == 1} {
        set url [lindex $args 0]
    } else {
        foreach {passwd url} $args break 
    }
    variable defaults
    variable uid
    set context [namespace current]::irc[incr uid]
    upvar #0 $context irc
    array set irc $defaults
    foreach {server port channel} [splituri $url] break
    if {[info exists channel] && $channel ne ""} {set irc(channel) $channel}
    if {[info exists server] && $server ne ""} {set irc(server) $server}
    if {[info exists port] && $port ne ""} {set irc(port) $port}

    if {[info exists passwd] && $passwd ne ""} {set irc(passwd) $passwd}
    set irc(callback) $callback
    set irc(nick) $nick
    Callback $context init



    set irc(socket) [socket -async $irc(server) $irc(port)]

    fileevent $irc(socket) readable [list [namespace origin Read] $context]
    fileevent $irc(socket) writable [list [namespace origin Write] $context]
    return $context
}

proc ::picoirc::Callback {context state args} {
    upvar #0 $context irc
    if {[llength $irc(callback)] > 0
        && [llength [info commands [lindex $irc(callback) 0]]] == 1} {
        if {[catch {eval $irc(callback) [list $context $state] $args} err]} {
            puts stderr "callback error: $err"


        }
    }
}

proc ::picoirc::Version {context} {
    if {[catch {Callback $context version} ver]} { set ver {} }
    if {$ver eq {}} {
        set ver "PicoIRC:[package provide picoirc]:Tcl [info patchlevel]"
    }
    return $ver
}

proc ::picoirc::Write {context} {
    upvar #0 $context irc
    fileevent $irc(socket) writable {}
    if {[set err [fconfigure $irc(socket) -error]] ne ""} {

        Callback $context close $err
        close $irc(socket)
        unset irc
        return
    }
    fconfigure $irc(socket) -blocking 0 -buffering line -translation crlf -encoding utf-8
    Callback $context connect
    if {[info exists irc(passwd)]} {
        send $context "PASS $irc(passwd)"
    }
    set ver [join [lrange [split [Version $context] :] 0 1] " "]
    send $context "NICK $irc(nick)"
    send $context "USER $::tcl_platform(user) 0 * :$ver user"
    if {$irc(channel) ne {}} {
        after idle [list [namespace origin send] $context "JOIN $irc(channel)"]
    }
    return
}

proc ::picoirc::Splitirc {s} {
    foreach v {nick flags user host} {set $v {}}
    regexp {^([^!]*)!([^=]*)=([^@]+)@(.*)} $s -> nick flags user host
    return [list $nick $flags $user $host]
}

proc ::picoirc::Read {context} {
    upvar #0 $context irc
    if {[eof $irc(socket)]} {
        fileevent $irc(socket) readable {}
        Callback $context close
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
        # the callback can return -code break to prevent processing the read
        if {[catch {Callback $context debug read $line}] == 3} {
            return
        }
        if {[regexp {:([^!]*)![^ ].* +PRIVMSG ([^ :]+) +:(.*)} $line -> \
                 nick target msg]} {
            set type ""
            if {[regexp {^\001(\S+)(?: (.*))?\001$} $msg -> ctcp data]} {
                switch -- $ctcp {
                    ACTION { set type ACTION ; set msg $data }
                    VERSION {
                        send $context "NOTICE $nick :\001VERSION [Version $context]\001"
                        return
                    }
                    PING {
                        send $context "NOTICE $nick :\001PING [lindex $data 0]\001"
                        return
                    }
                    TIME {
                        set time [clock format [clock seconds] \
                                      -format {%a %b %d %H:%M:%S %Y %Z}]
                        send $context "NOTICE $nick :\001TIME $time\001"
                        return
                    }
                    default {
                        set err [string map [list \001 ""] $msg]
                        send $context "NOTICE $nick :\001ERRMSG $err : unknown query\001"
                        return
                    }
                }
            }
            if {[lsearch -exact {ijchain wubchain} $nick] != -1} {
                if {$type eq "ACTION"} {
                    regexp {(\S+) (.+)} $msg -> nick msg
                } else {
                    regexp {<([^>]+)> (.+)} $msg -> nick msg
                }
            }
            if {$irc(nick) == $target} {set target $nick}
            Callback $context chat $target $nick $msg $type
        } elseif {[regexp {^:([^ ]+(?: +([^ :]+))*)(?: :(.*))?} $line -> parts junk rest]} {
	    lassign [split $parts] server code target fourth fifth
            switch -- $code {
                001 - 002 - 003 - 004 - 005 - 250 - 251 - 252 -
                254 - 255 - 265 - 266 { return }
                433 {
                    variable nickid ; if {![info exists nickid]} {set nickid 0}
                    set seqlen [string length [incr nickid]]
                    set irc(nick) [string range $irc(nick) 0 [expr 8-$seqlen]]$nickid
                    send $context "NICK $irc(nick)"
                }
                353 { set irc(users) [concat $irc(users) $rest]; return }
                366 {
                    Callback $context userlist $fourth $irc(users)
                    set irc(users) {}
                    return
                }
                332 { Callback $context topic $fourth $rest; return }
                333 { return }
                375 { set irc(motd) {} ; return }
                372 { append irc(motd) $rest ; return}
                376 { return }
                311 {
		    lassign [split $parts] server code target nick name host x
                    set irc(whois,$fourth) [list name $name host $host userinfo $rest]
                    return
                }
                301 - 312 - 317 - 320 { return }
                319 { lappend irc(whois,$fourth) channels $rest; return }
                318 {
                    if {[info exists irc(whois,$fourth)]} {
                        Callback $context userinfo $fourth $irc(whois,$fourth)
                        unset irc(whois,$fourth)
                    }
                    return
                }
                JOIN {
                    set nick [Getnick $server]
                    Callback $context traffic entered $target $nick
                    return
                }
                NICK {
                    set nick [Getnick $server]
                    if {$irc(nick) == $nick} {set irc(nick) $rest}
                    Callback $context traffic nickchange {} $nick $rest
                    return
                }
                QUIT - PART {
                    set nick [Getnick $server]
                    Callback $context traffic left $target $nick
                    return
                }
                MODE {
                    set nick [Getnick $server]
                    if {$fourth != ""} {
                        Callback $context mode $nick $target "$fourth $fifth"
                    } else {
                        Callback $context mode $nick $target $rest
                    }
                    return
                }
                NOTICE {
                    if {$target in [list $irc(nick) *]} {
                        set target {}
                    }
                    Callback $context chat $target [Getnick $server] $rest NOTICE
                    return
                }
            }
            Callback $context system "" "[lrange [split $parts] 1 end] $rest"
        } else {
            Callback $context system "" $line
        }
    }
}

proc ::picoirc::post {context channel msg} {
    upvar #0 $context irc
    set type ""
    if [regexp {^/([^ ]+) *(.*)} $msg -> cmd msg] {
        regexp {^([^ ]+)?(?: +(.*))?} $msg -> first rest
        switch -- $cmd {
            me {set msg "\001ACTION $msg\001";set type ACTION}
            nick {send $context "NICK $msg"; return}
            quit {send $context "QUIT"; return}
            part {send $context "PART $channel"; return}
            names {send $context "NAMES $channel"; return}
            whois {send $context "WHOIS $msg"; return}
            kick {send $context "KICK $channel $first :$rest"; return}
            mode {send $context "MODE $msg"; return}
            topic {send $context "TOPIC $channel :$msg"; return}
            quote {send $context $msg; return}
            join {send $context "JOIN $msg"; return}
            version {send $context "PRIVMSG $first :\001VERSION\001"}
            msg - notice {
                set type [expr {$cmd == "msg" ? ""        : "NOTICE"}]
                set cmd  [expr {$cmd == "msg" ? "PRIVMSG" : "NOTICE"}]
                if {[regexp {([^ ]+) +(.*)} $msg -> target querymsg]} {
                    send $context "$cmd $target :$querymsg"
                    Callback $context chat $target $irc(nick) $querymsg $type
                }
                return
            }
            default {Callback $context system $channel "unknown command /$cmd"; return}
        }
        if {$cmd ne {me} || $cmd eq {msg}} return
    }
    foreach line [split $msg \n] {send $context "PRIVMSG $channel :$line"}
    Callback $context chat $channel $irc(nick) $msg $type
}

proc ::picoirc::send {context line} {
    upvar #0 $context irc
    # the callback can return -code break to prevent writing to socket
    if {[catch {Callback $context debug write $line}] != 3} {
        puts $irc(socket) $line
    }
}

# -------------------------------------------------------------------------

package provide picoirc 0.9.1

# -------------------------------------------------------------------------
return







|




|




















|




<

|
|

|



















|













|
|



|
<
|



|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<















|
|
|
|
|
|
|
|
|
|
|
|

|
<
<
|
|
|
|
<
|
|
|
|















|


<
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166

167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210

211
212
213
214
215
216
















217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245


246
247
248
249

250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271

        # the callback can return -code break to prevent processing the read
        if {[catch {Callback $context debug read $line}] == 3} {
            return
        }
        if {[regexp {:([^!]*)![^ ].* +PRIVMSG ([^ :]+) +:(.*)} $line -> \
                 nick target msg]} {
            set type ""
            if {[regexp {\001(\S+)(.*)?\001} $msg -> ctcp data]} {
                switch -- $ctcp {
                    ACTION { set type ACTION ; set msg $data }
                    VERSION {
                        send $context "NOTICE $nick :\001VERSION [Version $context]\001"
                        return 
                    }
                    PING {
                        send $context "NOTICE $nick :\001PING [lindex $data 0]\001"
                        return
                    }
                    TIME {
                        set time [clock format [clock seconds] \
                                      -format {%a %b %d %H:%M:%S %Y %Z}]
                        send $context "NOTICE $nick :\001TIME $time\001"
                        return
                    }
                    default {
                        set err [string map [list \001 ""] $msg]
                        send $context "NOTICE $nick :\001ERRMSG $err : unknown query\001"
                        return
                    }
                }
            }
            if {[lsearch -exact {ijchain wubchain} $nick] != -1} {
                if {$type eq "ACTION"} {
                    regexp {(\S+) (.+)} $msg -> nick msg 
                } else {
                    regexp {<([^>]+)> (.+)} $msg -> nick msg
                }
            }

            Callback $context chat $target $nick $msg $type
        } elseif {[regexp {^:((?:([^ ]+) +){1,}?):(.*)$} $line -> parts junk rest]} {
            foreach {server code target fourth fifth} [split $parts] break
            switch -- $code {
                001 - 002 - 003 - 004 - 005 - 250 - 251 - 252 - 
                254 - 255 - 265 - 266 { return }
                433 {
                    variable nickid ; if {![info exists nickid]} {set nickid 0}
                    set seqlen [string length [incr nickid]]
                    set irc(nick) [string range $irc(nick) 0 [expr 8-$seqlen]]$nickid
                    send $context "NICK $irc(nick)"
                }
                353 { set irc(users) [concat $irc(users) $rest]; return }
                366 {
                    Callback $context userlist $fourth $irc(users)
                    set irc(users) {}
                    return
                }
                332 { Callback $context topic $fourth $rest; return }
                333 { return }
                375 { set irc(motd) {} ; return }
                372 { append irc(motd) $rest ; return}
                376 { return }
                311 {
                    foreach {server code target nick name host x} [split $parts] break
                    set irc(whois,$fourth) [list name $name host $host userinfo $rest]
                    return
                }
                301 - 312 - 317 - 320 { return }
                319 { lappend irc(whois,$fourth) channels $rest; return }
                318 {
                    if {[info exists irc(whois,$fourth)]} {
                        Callback $context userinfo $fourth $irc(whois,$fourth)
                        unset irc(whois,$fourth)
                    }
                    return
                }
                JOIN {
                    foreach {n f u h} [Splitirc $server] break
                    Callback $context traffic entered $rest $n
                    return
                }
                NICK {
                    foreach {n f u h} [Splitirc $server] break

                    Callback $context traffic nickchange {} $n $rest
                    return
                }
                QUIT - PART {
                    foreach {n f u h} [Splitirc $server] break
                    Callback $context traffic left $target $n
















                    return
                }
            }
            Callback $context system "" "[lrange [split $parts] 1 end] $rest"
        } else {
            Callback $context system "" $line
        }
    }
}

proc ::picoirc::post {context channel msg} {
    upvar #0 $context irc
    set type ""
    if [regexp {^/([^ ]+) *(.*)} $msg -> cmd msg] {
        regexp {^([^ ]+)?(?: +(.*))?} $msg -> first rest
 	switch -- $cmd {
 	    me {set msg "\001ACTION $msg\001";set type ACTION}
 	    nick {send $context "NICK $msg"; set $irc(nick) $msg}
 	    quit {send $context "QUIT" }
            part {send $context "PART $channel" }
 	    names {send $context "NAMES $channel"}
            whois {send $context "WHOIS $channel $msg"}
            kick {send $context "KICK $channel $first :$rest"}
            mode {send $context "MODE $msg"}
            topic {send $context "TOPIC $channel :$msg" }
 	    quote {send $context $msg}
 	    join {send $context "JOIN $msg" }
            version {send $context "PRIVMSG $first :\001VERSION\001"}
 	    msg {


 		if {[regexp {([^ ]+) +(.*)} $msg -> target querymsg]} {
 		    send $context "PRIVMSG $target :$querymsg"
 		    Callback $context chat $target $target $querymsg ""
 		}

 	    }
 	    default {Callback $context system $channel "unknown command /$cmd"}
 	}
 	if {$cmd ne {me} || $cmd eq {msg}} return
    }
    foreach line [split $msg \n] {send $context "PRIVMSG $channel :$line"}
    Callback $context chat $channel $irc(nick) $msg $type
}

proc ::picoirc::send {context line} {
    upvar #0 $context irc
    # the callback can return -code break to prevent writing to socket
    if {[catch {Callback $context debug write $line}] != 3} {
        puts $irc(socket) $line
    }
}

# -------------------------------------------------------------------------

package provide picoirc 0.5.2

# -------------------------------------------------------------------------

Deleted modules/irc/picoirc.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
source [file join \
        [file dirname [file dirname [file join [pwd] [info script]]]] \
        devtools testutilities.tcl]

testsNeedTcl     8.6
testsNeedTcltest 2.0

package require TclOO

support {
    use virtchannel_core/events.tcl tcl::chan::events
    use virtchannel_base/variable.tcl tcl::chan::variable
}

testing {
    useLocal picoirc.tcl picoirc
}

proc contextReset {{data {}}} {
    array set ::picoirc::irc $::picoirc::defaults
    set ::picoirc::irc(callback) callback
    set ::picoirc::irc(nick) anonymous
    set ::picoirc::irc(data) "$data\n"
    set ::picoirc::irc(socket) [tcl::chan::variable ::picoirc::irc(data)]
    chan configure $::picoirc::irc(socket) -buffering line
    foreach _ [split $data \n] {
        ::picoirc::Read ::picoirc::irc
    }
    return
}

proc send {channel msg} {
    ::picoirc::post ::picoirc::irc $channel $msg
    return
}

proc contextResult {} {
    close $::picoirc::irc(socket)
    return [lindex [split $::picoirc::irc(data) \n] end-1]
}

proc callback {_ args} {
    global data
    set data $args
    if {$args == "version"} {
        return "PicoIRC:1.0:Tcl 8.6 tls 1.7.22"
    }
    return
}

proc callbackResult {} {
    global data
    return $data
}

test picoirc-1.0 {irc:// schema} -body {
    ::picoirc::splituri irc://chat.freenode.net
} -result [list chat.freenode.net 6667 {} 0]

test picoirc-1.1 {irc:// schema with port} -body {
    ::picoirc::splituri irc://irc.choopa.net:6654
} -result [list irc.choopa.net 6654 {} 0]

test picoirc-1.2 {irc:// schema with channel} -body {
    ::picoirc::splituri irc://chat.freenode.net/#tcl
} -result [list chat.freenode.net 6667 #tcl 0]

test picoirc-1.3 {irc:// schema with channel and port} -body {
    ::picoirc::splituri irc://chat.freenode.net:5347/#go-nuts
} -result [list chat.freenode.net 5347 #go-nuts 0]

test picoirc-1.4 {ircs:// schema} -body {
    ::picoirc::splituri ircs://185.98.4.3
} -result [list 185.98.4.3 6697 {} 1]

test picoirc-1.5 {ircs:// schema with port} -body {
    ::picoirc::splituri ircs://chat.freenode.net:69654
} -result [list chat.freenode.net 69654 {} 1]

test picoirc-1.6 {ircs:// schema with channel} -body {
    ::picoirc::splituri ircs://chat.freenode.net/#tcl
} -result [list chat.freenode.net 6697 #tcl 1]

test picoirc-1.7 {ircs:// schema with channel and port} -body {
    ::picoirc::splituri ircs://chat.freenode.net:76556/#go-nuts
} -result [list chat.freenode.net 76556 #go-nuts 1]

test picoirc-1.8 {address} -body {
    ::picoirc::splituri irc.freenode.net
} -result [list irc.freenode.net 6667 {} 0]

test picoirc-1.9 {address with port} -body {
    ::picoirc::splituri 243.75.9.4:8697
} -result [list 243.75.9.4 8697 {} 0]

test picoirc-1.10 {address with channel} -body {
    ::picoirc::splituri #tcl@chat.freenode.net
} -result [list chat.freenode.net 6667 #tcl 0]

test picoirc-1.11 {address with channel and port} -body {
    ::picoirc::splituri #go-nuts@chat.freenode.net:765
} -result [list chat.freenode.net 765 #go-nuts 0]

test picoirc-2.0 {channel message} -body {
    contextReset ":tcler!~anon@127.0.0.1 PRIVMSG #tcl :hello #tcl"
    callbackResult
} -result [list chat #tcl tcler {hello #tcl} {}]

test picoirc-2.1 {channel message with action} -body {
    contextReset ":tcler!~anon@127.0.0.1 PRIVMSG #tcl :\001ACTION fixing scripts\001"
    callbackResult
} -result [list chat #tcl tcler {fixing scripts} ACTION]

test picoirc-2.2 {channel message with version} -body {
    contextReset ":tcler!~anon@127.0.0.1 PRIVMSG #tcl :\001VERSION\001"
    contextResult
} -result "NOTICE tcler :\001VERSION PicoIRC:1.0:Tcl 8.6 tls 1.7.22\001"

test picoirc-2.3 {private message} -body {
    contextReset ":tcler!~anon@127.0.0.1 PRIVMSG anonymous :hey there"
    callbackResult
} -result [list chat tcler tcler {hey there} {}]

test picoirc-2.4 {private message with action} -body {
    contextReset ":tcler!~anon@127.0.0.1 PRIVMSG anonymous :\001ACTION feels good\001"
    callbackResult
} -result [list chat tcler tcler {feels good} ACTION]

test picoirc-2.5 {private message with version} -body {
    contextReset ":tcler!~anon@127.0.0.1 PRIVMSG anonymous :\001VERSION\001"
    contextResult
} -result "NOTICE tcler :\001VERSION PicoIRC:1.0:Tcl 8.6 tls 1.7.22\001"

test picoirc-2.6 {user list} -body {
    contextReset [join [list \
        ":card.freenode.net 353 tcler @ #tcl :tcler +aku +curiousgay +kbk +rkeene +sebres" \
        ":card.freenode.net 366 tcler #tcl :End of /NAMES list." \
    ] "\n"]
    callbackResult
} -result [list userlist #tcl {tcler +aku +curiousgay +kbk +rkeene +sebres}]

test picoirc-2.7 {whois} -body {
    contextReset [join [list \
        ":kornbluth.freenode.net 311 tcler anonymous ~anon 192.168.1.1 * :PicoIRC 1.0 user" \
        ":kornbluth.freenode.net 319 tcler anonymous :+#go-nuts #haskell #tcl " \
        ":kornbluth.freenode.net 312 tcler anonymous beckett.freenode.net :DE" \
        ":kornbluth.freenode.net 671 tcler anonymous :is using a secure connection" \
        ":kornbluth.freenode.net 330 tcler anonymous anonymous :is logged in as" \
        ":kornbluth.freenode.net 318 tcler anonymous :End of /WHOIS list." \
    ] "\n"]
    callbackResult
} -result [list userinfo anonymous \
                [list name ~anon \
                      host 192.168.1.1 \
                      userinfo {PicoIRC 1.0 user} \
                      channels {+#go-nuts #haskell #tcl }]]

test picoirc-2.8 {join channel} -body {
    contextReset ":tcler!~anon@127.0.0.1 JOIN #tcl"
    callbackResult
} -result [list traffic entered #tcl tcler]

test picoirc-2.9 {change nick} -body {
    contextReset ":tcler!~anon@127.0.0.1 NICK :gopher"
    callbackResult
} -result [list traffic nickchange {} tcler gopher]

test picoirc-2.10 {quit channel} -body {
    contextReset ":tcler!~anon@127.0.0.1 PART #tcl"
    callbackResult
} -result [list traffic left #tcl tcler]

test picoirc-2.11 {quit server} -body {
    contextReset ":tcler!~anon@127.0.0.1 QUIT"
    callbackResult
} -result [list traffic left {} tcler]

test picoirc-2.12 {mode self} -body {
    contextReset ":anonymous MODE anonymous :+RZi"
    callbackResult
} -result [list mode {} anonymous +RZi]

test picoirc-2.13 {mode channel} -body {
    contextReset ":egan.freenode.net MODE #tcl-hacks :+ns"
    callbackResult
} -result [list mode {} #tcl-hacks +ns]

test picoirc-2.14 {mode channel with parameter} -body {
    contextReset ":ChanServ!ChanServ@services. MODE #tcl-hacks :+v newbie"
    callbackResult
} -result [list mode ChanServ #tcl-hacks "+v newbie"]

test picoirc-2.15 {mode channel with parameter without colon} -body {
    contextReset ":ChanServ!ChanServ@services. MODE #tcl-hacks +v newbie"
    callbackResult
} -result [list mode ChanServ #tcl-hacks "+v newbie"]

test picoirc-2.16 {mode channel with trailing space and without colon} -body {
    contextReset ":ChanServ!ChanServ@services. MODE #tcl-hacks -s "
    callbackResult
} -result [list mode ChanServ #tcl-hacks "-s "]

test picoirc-2.17 {channel notice} -body {
    contextReset ":ChanServ!ChanServ@services. NOTICE #tcl :Tcl is the productive programming language."
    callbackResult
} -result [list chat #tcl ChanServ {Tcl is the productive programming language.} NOTICE]

test picoirc-2.18 {private notice} -body {
    contextReset ":NickServ!NickServ@services. NOTICE anonymous :This nickname is registered."
    callbackResult
} -result [list chat {} NickServ {This nickname is registered.} NOTICE]

test picoirc-2.19 {global notice} -body {
    contextReset ":beckett.freenode.net NOTICE * :*** Checking Ident"
    callbackResult
} -result [list chat {} {} {*** Checking Ident} NOTICE]

test picoirc-3.0 {/me} -body {
    contextReset
    send #tcl "/me testing picoirc"
    contextResult
} -result "PRIVMSG #tcl :\001ACTION testing picoirc\001"

test picoirc-3.1 {/nick} -body {
    contextReset
    send #tcl "/nick anon"
    contextResult
} -result "NICK anon"

test picoirc-3.2 {/quit} -body {
    contextReset
    send #tcl "/quit"
    contextResult
} -result "QUIT"

test picoirc-3.3 {/part} -body {
    contextReset
    send #tcl "/part"
    contextResult
} -result "PART #tcl"

test picoirc-3.4 {/names} -body {
    contextReset
    send #tcl "/names"
    contextResult
} -result "NAMES #tcl"

test picoirc-3.5 {/whois inside channel} -body {
    contextReset
    send #tcl "/whois aku"
    contextResult
} -result "WHOIS aku"

test picoirc-3.6 {/whois} -body {
    contextReset
    send {} "/whois aku"
    contextResult
} -result "WHOIS aku"

test picoirc-3.7 {/kick} -body {
    contextReset
    send #tcl "/kick bastard too much spamming"
    contextResult
} -result "KICK #tcl bastard :too much spamming"

test picoirc-3.8 {/kick no reason} -body {
    contextReset
    send #tcl "/kick bastard"
    contextResult
} -result "KICK #tcl bastard :"

test picoirc-3.9 {/mode} -body {
    contextReset
    send #tcl "/mode #tcl-hacks +s"
    contextResult
} -result "MODE #tcl-hacks +s"

test picoirc-3.10 {/topic} -body {
    contextReset
    send #tcl "/topic Tcl is the best scripting language in the world!"
    contextResult
} -result "TOPIC #tcl :Tcl is the best scripting language in the world!"

test picoirc-3.11 {/quote} -body {
    contextReset
    send #tcl "/quote JOIN #go-nuts"
    contextResult
} -result "JOIN #go-nuts"

test picoirc-3.12 {/part} -body {
    contextReset
    send #tcl "/join #haskell"
    contextResult
} -result "JOIN #haskell"

test picoirc-3.13 {/version} -body {
    contextReset
    send #tcl "/version #haskell"
    contextResult
} -result "PRIVMSG #haskell :\001VERSION\001"

test picoirc-3.14 {/msg} -body {
    contextReset
    send #tcl "/msg NickServ help me please"
    list [contextResult] [callbackResult]
} -result [list "PRIVMSG NickServ :help me please" \
          [list chat NickServ anonymous "help me please" {}]]

test picoirc-3.15 {/notice} -body {
    contextReset
    send #tcl "/notice #haskell declarative programming is amazing"
    list [contextResult] [callbackResult]
} -result [list "NOTICE #haskell :declarative programming is amazing" \
          [list chat #haskell anonymous "declarative programming is amazing" "NOTICE"]]

test picoirc-3.16 {unknown command} -body {
    contextReset
    send #tcl "/compile chromium"
    callbackResult
} -result [list system #tcl {unknown command /compile}]

testsuiteCleanup
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































Changes to modules/irc/pkgIndex.tcl.

1

2
3
4
5
6
7
# pkgIndex.tcl -*- tcl -*-

if { ![package vsatisfies [package provide Tcl] 8.6] } {
    # PRAGMA: returnok
    return
}
package ifneeded irc     0.7.0 [list source [file join $dir irc.tcl]]
package ifneeded picoirc 0.9.1 [list source [file join $dir picoirc.tcl]]
|
>
|

|

|
|
1
2
3
4
5
6
7
8
# pkgIndex.tcl                                                    -*- tcl -*-
# $Id: pkgIndex.tcl,v 1.10 2008/08/05 20:40:04 andreas_kupries Exp $
if { ![package vsatisfies [package provide Tcl] 8.3] } {
    # PRAGMA: returnok
    return 
}
package ifneeded irc     0.6.1 [list source [file join $dir irc.tcl]]
package ifneeded picoirc 0.5.2 [list source [file join $dir picoirc.tcl]]

Changes to modules/javascript/javascript.man.

88
89
90
91
92
93
94
95
96
checked.  The [arg parentName] argument is the name of the child's
parent html checkbox object.  The [arg childName] argument is the name
of child html checkbox object to create.

[list_end]

[vset CATEGORY javascript]
[include ../common-text/feedback.inc]
[manpage_end]







|

88
89
90
91
92
93
94
95
96
checked.  The [arg parentName] argument is the name of the child's
parent html checkbox object.  The [arg childName] argument is the name
of child html checkbox object to create.

[list_end]

[vset CATEGORY javascript]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/jpeg/jpeg.man.

188
189
190
191
192
193
194
195
196

can only work with files
cant write exif data
gps exif data not parsed
makernote data not yet implemented

[vset CATEGORY jpeg]
[include ../common-text/feedback.inc]
[manpage_end]







|

188
189
190
191
192
193
194
195
196

can only work with files
cant write exif data
gps exif data not parsed
makernote data not yet implemented

[vset CATEGORY jpeg]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/jpeg/jpeg.test.

1
2
3
4
5


6
7
8
9
10
11
12
# -*- tcl -*-
# jpeg.test:  Tests for the JPEG utilities.
#
# Copyright (c) 2008-2013 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]






>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
# jpeg.test:  Tests for the JPEG utilities.
#
# Copyright (c) 2008-2013 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# JPEG: @(#) $Id: jpeg.test,v 1.2 2011/05/06 13:39:27 patthoyts Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
test jpeg-1.1 {isJPEG error, wrong#args, too many} -body {
    ::jpeg::isJPEG foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::isJPEG} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-2.$n "isJPEG, ok, [file tail $f]" -body {
	::jpeg::isJPEG $f
    } -result 1
    incr n
}

test jpeg-2.$n "isJPEG, fail, [file tail [info script]]" -body {







|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
test jpeg-1.1 {isJPEG error, wrong#args, too many} -body {
    ::jpeg::isJPEG foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::isJPEG} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-2.$n "isJPEG, ok, [file tail $f]" -body {
	::jpeg::isJPEG $f
    } -result 1
    incr n
}

test jpeg-2.$n "isJPEG, fail, [file tail [info script]]" -body {
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
test jpeg-2.1 {imageInfo error, wrong#args, too many} -body {
    ::jpeg::imageInfo foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::imageInfo} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    test jpeg-3.$n "imageInfo regular, [file tail $f]" -body {
	::jpeg::imageInfo $f
    } -result [string trim [fileutil::cat [file rootname $f].info.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-4.$n "imageInfo thumbnails, [file tail $f]" -body {
	::jpeg::imageInfo $f
    } -result {}
    incr n
}

test jpeg-5.0 "imageInfo, fail, [file tail [info script]]" -body {







|







|







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
test jpeg-2.1 {imageInfo error, wrong#args, too many} -body {
    ::jpeg::imageInfo foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::imageInfo} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    test jpeg-3.$n "imageInfo regular, [file tail $f]" -body {
	::jpeg::imageInfo $f
    } -result [string trim [fileutil::cat [file rootname $f].info.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-4.$n "imageInfo thumbnails, [file tail $f]" -body {
	::jpeg::imageInfo $f
    } -result {}
    incr n
}

test jpeg-5.0 "imageInfo, fail, [file tail [info script]]" -body {
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
test jpeg-6.1 {dimensions error, wrong#args, too many} -body {
    ::jpeg::dimensions foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::dimensions} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    test jpeg-7.$n "dimensions regular, [file tail $f]" -body {
	::jpeg::dimensions $f
    } -result [string trim [fileutil::cat [file rootname $f].WxH.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-8.$n "dimensions thumbnails, [file tail $f]" -body {
	::jpeg::dimensions $f
    } -result {160 120}
    incr n
}

test jpeg-9.0 "dimensions, fail, [file tail [info script]]" -body {







|







|







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
test jpeg-6.1 {dimensions error, wrong#args, too many} -body {
    ::jpeg::dimensions foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::dimensions} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    test jpeg-7.$n "dimensions regular, [file tail $f]" -body {
	::jpeg::dimensions $f
    } -result [string trim [fileutil::cat [file rootname $f].WxH.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-8.$n "dimensions thumbnails, [file tail $f]" -body {
	::jpeg::dimensions $f
    } -result {160 120}
    incr n
}

test jpeg-9.0 "dimensions, fail, [file tail [info script]]" -body {
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
test jpeg-10.1 {getThumbnail error, wrong#args, too many} -body {
    ::jpeg::getThumbnail foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getThumbnail} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    if {![file exists $f.thumb]} {
	test jpeg-11.$n "getThumbnail - no thumbnail, [file tail $f]" -body {
	    ::jpeg::getThumbnail $f
	} -result {}
    } else {
	test jpeg-11.$n "getThumbnail regular, [file tail $f]" -body {
	    #fileutil::writeFile -translation binary ${f}.x.jpg [::jpeg::getThumbnail $f]
	    # Note: The .thumb files were created from the .JPG files
	    # using 'jhead -st', version 2.6.
	    set expected [fileutil::cat -translation binary ${f}.thumb]
	    set have     [::jpeg::getThumbnail $f]
	    list [string equal $expected $have] [strdiff $expected $have]
	} -result {1 -}
    }

    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-12.$n "getThumbnail thumbnails, [file tail $f]" -body {
	::jpeg::getThumbnail $f
    } -result {}
    incr n
}

test jpeg-13.0 "getThumbnail, fail, [file tail [info script]]" -body {







|



















|







155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
test jpeg-10.1 {getThumbnail error, wrong#args, too many} -body {
    ::jpeg::getThumbnail foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getThumbnail} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    if {![file exists $f.thumb]} {
	test jpeg-11.$n "getThumbnail - no thumbnail, [file tail $f]" -body {
	    ::jpeg::getThumbnail $f
	} -result {}
    } else {
	test jpeg-11.$n "getThumbnail regular, [file tail $f]" -body {
	    #fileutil::writeFile -translation binary ${f}.x.jpg [::jpeg::getThumbnail $f]
	    # Note: The .thumb files were created from the .JPG files
	    # using 'jhead -st', version 2.6.
	    set expected [fileutil::cat -translation binary ${f}.thumb]
	    set have     [::jpeg::getThumbnail $f]
	    list [string equal $expected $have] [strdiff $expected $have]
	} -result {1 -}
    }

    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-12.$n "getThumbnail thumbnails, [file tail $f]" -body {
	::jpeg::getThumbnail $f
    } -result {}
    incr n
}

test jpeg-13.0 "getThumbnail, fail, [file tail [info script]]" -body {
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
test jpeg-16.1 {getComments error, wrong#args, too many} -body {
    ::jpeg::getComments foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getComments} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    test jpeg-17.$n "getComments regular, [file tail $f]" -body {
	::jpeg::getComments $f
    } -result {}
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-18.$n "getComments thumbnails, [file tail $f]" -body {
	::jpeg::getComments $f
    } -result {}
    incr n
}

test jpeg-19.0 "getComments, fail, [file tail [info script]]" -body {







|







|







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
test jpeg-16.1 {getComments error, wrong#args, too many} -body {
    ::jpeg::getComments foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getComments} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    test jpeg-17.$n "getComments regular, [file tail $f]" -body {
	::jpeg::getComments $f
    } -result {}
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-18.$n "getComments thumbnails, [file tail $f]" -body {
	::jpeg::getComments $f
    } -result {}
    incr n
}

test jpeg-19.0 "getComments, fail, [file tail [info script]]" -body {
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
test jpeg-20.1 {addComment error, wrong#args, not enough} -body {
    ::jpeg::addComment foo
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::addComment} {file comment args} 1]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-21.$n "addComment regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::getComments $fx
    } -cleanup {
	removeFile $fx







|







243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
test jpeg-20.1 {addComment error, wrong#args, not enough} -body {
    ::jpeg::addComment foo
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::addComment} {file comment args} 1]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-21.$n "addComment regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::getComments $fx
    } -cleanup {
	removeFile $fx
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
test jpeg-23.1 {removeComments error, wrong#args, too many} -body {
    ::jpeg::removeComments foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::removeComments} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-24.$n "removeComments regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment     $fx {a b} {c d}
    } -body {
	::jpeg::removeComments $fx
	::jpeg::getComments $fx
    } -cleanup {







|







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
test jpeg-23.1 {removeComments error, wrong#args, too many} -body {
    ::jpeg::removeComments foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::removeComments} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-24.$n "removeComments regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment     $fx {a b} {c d}
    } -body {
	::jpeg::removeComments $fx
	::jpeg::getComments $fx
    } -cleanup {
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
test jpeg-26.2 {replaceComment error, wrong#args, too many} -body {
    ::jpeg::replaceComment foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::replaceComment} {file comment}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-27.$n "replaceComment regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment      $fx {a b} {c d}
    } -body {
	::jpeg::replaceComment $fx new
	::jpeg::getComments $fx
    } -cleanup {







|







308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
test jpeg-26.2 {replaceComment error, wrong#args, too many} -body {
    ::jpeg::replaceComment foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::replaceComment} {file comment}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-27.$n "replaceComment regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment      $fx {a b} {c d}
    } -body {
	::jpeg::replaceComment $fx new
	::jpeg::getComments $fx
    } -cleanup {
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::getExif} {file ?type?} 0]

test jpeg-29.1 {getExif error, wrong#args, too many} -body {
    ::jpeg::getExif foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getExif} {file ?type?}]

test jpeg-29.2 {getExif error, bad section type} -body {
    ::jpeg::getExif [asset IMG_7950.JPG] fufara
} -returnCodes error -result {Bad type "fufara", expected one of "main", or "thumbnail"}

test jpeg-29.3 {getExifFromChannel error, wrong#args, not enough} -body {
    ::jpeg::getExifFromChannel
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::getExifFromChannel} {chan ?type?} 0]

test jpeg-29.4 {getExifFromChannel error, wrong#args, too many} -body {
    ::jpeg::getExifFromChannel foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getExifFromChannel} {chan ?type?}]

test jpeg-29.5 {getExifFromChannel error, bad section type} -setup {
    set fd [::jpeg::openJFIF [asset IMG_7950.JPG] r]
} -body {
    ::jpeg::getExifFromChannel $fd fufara
} -cleanup {
    close $fd
    unset fd
} -returnCodes error -result {Bad type "fufara", expected one of "main", or "thumbnail"}

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    test jpeg-30.$n "getExif, main section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f]]]
    } -result [string trimright [fileutil::cat [file rootname $f].exif.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-31.$n "getExif, main section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f]]]
    } -result {}
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    test jpeg-32.$n "getExif, thumbnail section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f thumbnail]]]
    } -result [string trimright [fileutil::cat [file rootname $f].thumbexif.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-33.$n "getExif, thumbnail section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f thumbnail]]]
    } -result {}
    incr n
}

test jpeg-34.0 "getExif, fail, [file tail [info script]]" -body {







|











|










|







|







|







|







337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::getExif} {file ?type?} 0]

test jpeg-29.1 {getExif error, wrong#args, too many} -body {
    ::jpeg::getExif foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getExif} {file ?type?}]

test jpeg-29.2 {getExif error, bad section type} -body {
    ::jpeg::getExif [localPath testimages/IMG_7950.JPG] fufara
} -returnCodes error -result {Bad type "fufara", expected one of "main", or "thumbnail"}

test jpeg-29.3 {getExifFromChannel error, wrong#args, not enough} -body {
    ::jpeg::getExifFromChannel
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::getExifFromChannel} {chan ?type?} 0]

test jpeg-29.4 {getExifFromChannel error, wrong#args, too many} -body {
    ::jpeg::getExifFromChannel foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getExifFromChannel} {chan ?type?}]

test jpeg-29.5 {getExifFromChannel error, bad section type} -setup {
    set fd [::jpeg::openJFIF [localPath testimages/IMG_7950.JPG] r]
} -body {
    ::jpeg::getExifFromChannel $fd fufara
} -cleanup {
    close $fd
    unset fd
} -returnCodes error -result {Bad type "fufara", expected one of "main", or "thumbnail"}

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    test jpeg-30.$n "getExif, main section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f]]]
    } -result [string trimright [fileutil::cat [file rootname $f].exif.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-31.$n "getExif, main section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f]]]
    } -result {}
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    test jpeg-32.$n "getExif, thumbnail section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f thumbnail]]]
    } -result [string trimright [fileutil::cat [file rootname $f].thumbexif.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-33.$n "getExif, thumbnail section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f thumbnail]]]
    } -result {}
    incr n
}

test jpeg-34.0 "getExif, fail, [file tail [info script]]" -body {
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
test jpeg-34.1 {removeExif error, wrong#args, too many} -body {
    ::jpeg::removeExif foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::removeExif} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-35.$n "removeExif ok, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::removeExif $fx
	set res [list [::jpeg::getComments $fx] [::jpeg::getExif $fx] [::jpeg::getExif $fx thumbnail]]
    } -cleanup {







|







419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
test jpeg-34.1 {removeExif error, wrong#args, too many} -body {
    ::jpeg::removeExif foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::removeExif} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-35.$n "removeExif ok, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::removeExif $fx
	set res [list [::jpeg::getComments $fx] [::jpeg::getExif $fx] [::jpeg::getExif $fx thumbnail]]
    } -cleanup {
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
test jpeg-37.1 {stripJPEG error, wrong#args, too many} -body {
    ::jpeg::stripJPEG foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::stripJPEG} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-38.$n "stripJPEG ok, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::stripJPEG $fx
	set res [list [::jpeg::getComments $fx] [::jpeg::getExif $fx] [::jpeg::getExif $fx thumbnail]]
    } -cleanup {







|







450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
test jpeg-37.1 {stripJPEG error, wrong#args, too many} -body {
    ::jpeg::stripJPEG foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::stripJPEG} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-38.$n "stripJPEG ok, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::stripJPEG $fx
	set res [list [::jpeg::getComments $fx] [::jpeg::getExif $fx] [::jpeg::getExif $fx thumbnail]]
    } -cleanup {
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::debug} {file}]

# -------------------------------------------------------------------------
# We do not try to actually run 'debug', because it prints its results
# to stdout. This may change when we can capture stdout as test result

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-41.$n "debug ok, [file tail $f]" -constraints donotrun -body {
	::jpeg::debug $f
    } -result {}
    incr n
}

test jpeg-42.0 "debug, fail, [file tail [info script]]" -body {
    ::jpeg::debug [info script]
} -returnCodes error -result {not a jpg file}

# -------------------------------------------------------------------------
rename strdiff {}
testsuiteCleanup







|













483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::debug} {file}]

# -------------------------------------------------------------------------
# We do not try to actually run 'debug', because it prints its results
# to stdout. This may change when we can capture stdout as test result

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-41.$n "debug ok, [file tail $f]" -constraints donotrun -body {
	::jpeg::debug $f
    } -result {}
    incr n
}

test jpeg-42.0 "debug, fail, [file tail [info script]]" -body {
    ::jpeg::debug [info script]
} -returnCodes error -result {not a jpg file}

# -------------------------------------------------------------------------
rename strdiff {}
testsuiteCleanup

Deleted modules/jpeg/test-assets/1000.JPG.

cannot compute difference between binary files

Deleted modules/jpeg/test-assets/1000.WxH.txt.

1
1000 1000
<


Deleted modules/jpeg/test-assets/1000.exif.txt.

1
ExifByteOrder little ExifOffset 30
<


Deleted modules/jpeg/test-assets/1000.info.txt.

1
version 1.1 units 1 xdensity 96 ydensity 96 xthumb 0 ythumb 0
<


Deleted modules/jpeg/test-assets/1000.thumbexif.txt.

Deleted modules/jpeg/test-assets/IMG_7898.JPG.

cannot compute difference between binary files

Deleted modules/jpeg/test-assets/IMG_7898.JPG.thumb.

cannot compute difference between binary files

Deleted modules/jpeg/test-assets/IMG_7898.WxH.txt.

1
320 240
<


Deleted modules/jpeg/test-assets/IMG_7898.exif.txt.

1
ApertureValue 4.0 ColorSpace sRGB ComponentsConfiguration 1,2,3,0 CompressedBitsPerPixel 5 CustomRendered normal DateTime {2008:03:14 15:40:06} DateTimeDigitized {2008:03:14 15:40:06} DateTimeOriginal {2008:03:14 15:40:06} DigitalZoomRatio 1 ExifByteOrder little ExifImageHeight 2448 ExifImageWidth 3264 ExifOffset 30 ExifVersion 2.2 ExposureBiasValue 0 ExposureMode auto ExposureTime 1/60 FNumber 4.0 FileSource {digital still camera} Flash {flash did not fire, compulsory flash mode} FlashpixVersion {Flashpix Format Version 1.0} FocalLength 6 FocalPlaneResolutionUnit inch FocalPlaneXResolution 14506.67 FocalPlaneYResolution 14485.21 ISOSpeedRatings 80 InteroperabilityIndex R98 InteroperabilityVersion 0100 Make Canon MaxApertureValue 3.0 MeteringMode multi-segment Model {Canon PowerShot S5 IS} Orientation normal RelatedImageLength 2448 RelatedImageWidth 3264 ResolutionUnit inch SceneCaptureType standard SensingMethod {one chip color area sensor} ShutterSpeedValue 1/60 UserComment {} WhiteBalance auto XResolution 180 YCbCrPositioning centered YResolution 180
<


Deleted modules/jpeg/test-assets/IMG_7898.info.txt.

1
version 1.1 units 1 xdensity 180 ydensity 180 xthumb 0 ythumb 0
<


Deleted modules/jpeg/test-assets/IMG_7898.thumbexif.txt.

1
Compression JPEG ExifByteOrder little ExifOffset 30 JPEGInterchangeFormat 5108 JPEGInterchangeFormatLength 6496 ResolutionUnit inch XResolution 180 YResolution 180
<


Deleted modules/jpeg/test-assets/IMG_7917.JPG.

cannot compute difference between binary files

Deleted modules/jpeg/test-assets/IMG_7917.JPG.thumb.

cannot compute difference between binary files

Deleted modules/jpeg/test-assets/IMG_7917.WxH.txt.

1
320 240
<


Deleted modules/jpeg/test-assets/IMG_7917.exif.txt.

1
ApertureValue 3.5 ColorSpace sRGB ComponentsConfiguration 1,2,3,0 CompressedBitsPerPixel 5 CustomRendered normal DateTime {2008:03:14 16:20:16} DateTimeDigitized {2008:03:14 16:20:16} DateTimeOriginal {2008:03:14 16:20:16} DigitalZoomRatio 1 ExifByteOrder little ExifImageHeight 2448 ExifImageWidth 3264 ExifOffset 30 ExifVersion 2.2 ExposureBiasValue 0 ExposureMode auto ExposureTime 1/60 FNumber 3.2 FileSource {digital still camera} Flash {flash did not fire, compulsory flash mode} FlashpixVersion {Flashpix Format Version 1.0} FocalLength 6 FocalPlaneResolutionUnit inch FocalPlaneXResolution 14506.67 FocalPlaneYResolution 14485.21 ISOSpeedRatings 80 InteroperabilityIndex R98 InteroperabilityVersion 0100 Make Canon MaxApertureValue 3.0 MeteringMode multi-segment Model {Canon PowerShot S5 IS} Orientation normal RelatedImageLength 2448 RelatedImageWidth 3264 ResolutionUnit inch SceneCaptureType standard SensingMethod {one chip color area sensor} ShutterSpeedValue 1/60 UserComment {} WhiteBalance auto XResolution 180 YCbCrPositioning centered YResolution 180
<


Deleted modules/jpeg/test-assets/IMG_7917.info.txt.

1
version 1.1 units 1 xdensity 180 ydensity 180 xthumb 0 ythumb 0
<


Deleted modules/jpeg/test-assets/IMG_7917.thumbexif.txt.

1
Compression JPEG ExifByteOrder little ExifOffset 30 JPEGInterchangeFormat 5108 JPEGInterchangeFormatLength 5219 ResolutionUnit inch XResolution 180 YResolution 180
<


Deleted modules/jpeg/test-assets/IMG_7950.JPG.

cannot compute difference between binary files

Deleted modules/jpeg/test-assets/IMG_7950.JPG.thumb.

cannot compute difference between binary files

Deleted modules/jpeg/test-assets/IMG_7950.WxH.txt.

1
320 240
<


Deleted modules/jpeg/test-assets/IMG_7950.exif.txt.

1
ApertureValue 3.7 ColorSpace sRGB ComponentsConfiguration 1,2,3,0 CompressedBitsPerPixel 5 CustomRendered normal DateTime {2008:03:14 16:54:36} DateTimeDigitized {2008:03:14 16:54:36} DateTimeOriginal {2008:03:14 16:54:36} DigitalZoomRatio 1 ExifByteOrder little ExifImageHeight 2448 ExifImageWidth 3264 ExifOffset 30 ExifVersion 2.2 ExposureBiasValue 0 ExposureMode auto ExposureTime 1/60 FNumber 3.5 FileSource {digital still camera} Flash {flash did not fire, compulsory flash mode} FlashpixVersion {Flashpix Format Version 1.0} FocalLength 6 FocalPlaneResolutionUnit inch FocalPlaneXResolution 14506.67 FocalPlaneYResolution 14485.21 ISOSpeedRatings 80 InteroperabilityIndex R98 InteroperabilityVersion 0100 Make Canon MaxApertureValue 3.0 MeteringMode multi-segment Model {Canon PowerShot S5 IS} Orientation normal RelatedImageLength 2448 RelatedImageWidth 3264 ResolutionUnit inch SceneCaptureType standard SensingMethod {one chip color area sensor} ShutterSpeedValue 1/60 UserComment {} WhiteBalance auto XResolution 180 YCbCrPositioning centered YResolution 180
<


Deleted modules/jpeg/test-assets/IMG_7950.info.txt.

1
version 1.1 units 1 xdensity 180 ydensity 180 xthumb 0 ythumb 0
<


Deleted modules/jpeg/test-assets/IMG_7950.thumbexif.txt.

1
Compression JPEG ExifByteOrder little ExifOffset 30 JPEGInterchangeFormat 5108 JPEGInterchangeFormatLength 4181 ResolutionUnit inch XResolution 180 YResolution 180
<


Deleted modules/jpeg/test-assets/IMG_7950_none.JPG.

cannot compute difference between binary files

Deleted modules/jpeg/test-assets/IMG_7950_none.WxH.txt.

1
320 240
<


Deleted modules/jpeg/test-assets/IMG_7950_none.exif.txt.

Deleted modules/jpeg/test-assets/IMG_7950_none.info.txt.

1
version 1.1 units 1 xdensity 300 ydensity 300 xthumb 0 ythumb 0
<


Deleted modules/jpeg/test-assets/IMG_7950_none.thumbexif.txt.

Added modules/jpeg/testimages/1000.JPG.

cannot compute difference between binary files

Added modules/jpeg/testimages/1000.WxH.txt.



>
1
1000 1000

Added modules/jpeg/testimages/1000.exif.txt.



>
1
ExifByteOrder little ExifOffset 30

Added modules/jpeg/testimages/1000.info.txt.



>
1
version 1.1 units 1 xdensity 96 ydensity 96 xthumb 0 ythumb 0

Added modules/jpeg/testimages/1000.thumbexif.txt.

Added modules/jpeg/testimages/IMG_7898.JPG.

cannot compute difference between binary files

Added modules/jpeg/testimages/IMG_7898.JPG.thumb.

cannot compute difference between binary files

Added modules/jpeg/testimages/IMG_7898.WxH.txt.



>
1
320 240

Added modules/jpeg/testimages/IMG_7898.exif.txt.



>
1
ApertureValue 4.0 ColorSpace sRGB ComponentsConfiguration 1,2,3,0 CompressedBitsPerPixel 5 CustomRendered normal DateTime {2008:03:14 15:40:06} DateTimeDigitized {2008:03:14 15:40:06} DateTimeOriginal {2008:03:14 15:40:06} DigitalZoomRatio 1 ExifByteOrder little ExifImageHeight 2448 ExifImageWidth 3264 ExifOffset 30 ExifVersion 2.2 ExposureBiasValue 0 ExposureMode auto ExposureTime 1/60 FNumber 4.0 FileSource {digital still camera} Flash {flash did not fire, compulsory flash mode} FlashpixVersion {Flashpix Format Version 1.0} FocalLength 6 FocalPlaneResolutionUnit inch FocalPlaneXResolution 14506.67 FocalPlaneYResolution 14485.21 ISOSpeedRatings 80 InteroperabilityIndex R98 InteroperabilityVersion 0100 Make Canon MaxApertureValue 3.0 MeteringMode multi-segment Model {Canon PowerShot S5 IS} Orientation normal RelatedImageLength 2448 RelatedImageWidth 3264 ResolutionUnit inch SceneCaptureType standard SensingMethod {one chip color area sensor} ShutterSpeedValue 1/60 UserComment {} WhiteBalance auto XResolution 180 YCbCrPositioning centered YResolution 180

Added modules/jpeg/testimages/IMG_7898.info.txt.



>
1
version 1.1 units 1 xdensity 180 ydensity 180 xthumb 0 ythumb 0

Added modules/jpeg/testimages/IMG_7898.thumbexif.txt.



>
1
Compression JPEG ExifByteOrder little ExifOffset 30 JPEGInterchangeFormat 5108 JPEGInterchangeFormatLength 6496 ResolutionUnit inch XResolution 180 YResolution 180

Added modules/jpeg/testimages/IMG_7917.JPG.

cannot compute difference between binary files

Added modules/jpeg/testimages/IMG_7917.JPG.thumb.

cannot compute difference between binary files

Added modules/jpeg/testimages/IMG_7917.WxH.txt.



>
1
320 240

Added modules/jpeg/testimages/IMG_7917.exif.txt.



>
1
ApertureValue 3.5 ColorSpace sRGB ComponentsConfiguration 1,2,3,0 CompressedBitsPerPixel 5 CustomRendered normal DateTime {2008:03:14 16:20:16} DateTimeDigitized {2008:03:14 16:20:16} DateTimeOriginal {2008:03:14 16:20:16} DigitalZoomRatio 1 ExifByteOrder little ExifImageHeight 2448 ExifImageWidth 3264 ExifOffset 30 ExifVersion 2.2 ExposureBiasValue 0 ExposureMode auto ExposureTime 1/60 FNumber 3.2 FileSource {digital still camera} Flash {flash did not fire, compulsory flash mode} FlashpixVersion {Flashpix Format Version 1.0} FocalLength 6 FocalPlaneResolutionUnit inch FocalPlaneXResolution 14506.67 FocalPlaneYResolution 14485.21 ISOSpeedRatings 80 InteroperabilityIndex R98 InteroperabilityVersion 0100 Make Canon MaxApertureValue 3.0 MeteringMode multi-segment Model {Canon PowerShot S5 IS} Orientation normal RelatedImageLength 2448 RelatedImageWidth 3264 ResolutionUnit inch SceneCaptureType standard SensingMethod {one chip color area sensor} ShutterSpeedValue 1/60 UserComment {} WhiteBalance auto XResolution 180 YCbCrPositioning centered YResolution 180

Added modules/jpeg/testimages/IMG_7917.info.txt.



>
1
version 1.1 units 1 xdensity 180 ydensity 180 xthumb 0 ythumb 0

Added modules/jpeg/testimages/IMG_7917.thumbexif.txt.



>
1
Compression JPEG ExifByteOrder little ExifOffset 30 JPEGInterchangeFormat 5108 JPEGInterchangeFormatLength 5219 ResolutionUnit inch XResolution 180 YResolution 180

Added modules/jpeg/testimages/IMG_7950.JPG.

cannot compute difference between binary files

Added modules/jpeg/testimages/IMG_7950.JPG.thumb.

cannot compute difference between binary files

Added modules/jpeg/testimages/IMG_7950.WxH.txt.



>
1
320 240

Added modules/jpeg/testimages/IMG_7950.exif.txt.



>
1
ApertureValue 3.7 ColorSpace sRGB ComponentsConfiguration 1,2,3,0 CompressedBitsPerPixel 5 CustomRendered normal DateTime {2008:03:14 16:54:36} DateTimeDigitized {2008:03:14 16:54:36} DateTimeOriginal {2008:03:14 16:54:36} DigitalZoomRatio 1 ExifByteOrder little ExifImageHeight 2448 ExifImageWidth 3264 ExifOffset 30 ExifVersion 2.2 ExposureBiasValue 0 ExposureMode auto ExposureTime 1/60 FNumber 3.5 FileSource {digital still camera} Flash {flash did not fire, compulsory flash mode} FlashpixVersion {Flashpix Format Version 1.0} FocalLength 6 FocalPlaneResolutionUnit inch FocalPlaneXResolution 14506.67 FocalPlaneYResolution 14485.21 ISOSpeedRatings 80 InteroperabilityIndex R98 InteroperabilityVersion 0100 Make Canon MaxApertureValue 3.0 MeteringMode multi-segment Model {Canon PowerShot S5 IS} Orientation normal RelatedImageLength 2448 RelatedImageWidth 3264 ResolutionUnit inch SceneCaptureType standard SensingMethod {one chip color area sensor} ShutterSpeedValue 1/60 UserComment {} WhiteBalance auto XResolution 180 YCbCrPositioning centered YResolution 180

Added modules/jpeg/testimages/IMG_7950.info.txt.



>
1
version 1.1 units 1 xdensity 180 ydensity 180 xthumb 0 ythumb 0

Added modules/jpeg/testimages/IMG_7950.thumbexif.txt.



>
1
Compression JPEG ExifByteOrder little ExifOffset 30 JPEGInterchangeFormat 5108 JPEGInterchangeFormatLength 4181 ResolutionUnit inch XResolution 180 YResolution 180

Added modules/jpeg/testimages/IMG_7950_none.JPG.

cannot compute difference between binary files

Added modules/jpeg/testimages/IMG_7950_none.WxH.txt.



>
1
320 240

Added modules/jpeg/testimages/IMG_7950_none.exif.txt.

Added modules/jpeg/testimages/IMG_7950_none.info.txt.



>
1
version 1.1 units 1 xdensity 300 ydensity 300 xthumb 0 ythumb 0

Added modules/jpeg/testimages/IMG_7950_none.thumbexif.txt.

Changes to modules/json/json.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.3.4]
[manpage_begin json n [vset VERSION]]
[keywords {data exchange}]
[keywords {exchange format}]
[keywords javascript]
[keywords json]
[copyright {2006 ActiveState Software Inc.}]
[copyright {2009 Thomas Maeder, Glue Software Engineering AG}]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.3.3]
[manpage_begin json n [vset VERSION]]
[keywords {data exchange}]
[keywords {exchange format}]
[keywords javascript]
[keywords json]
[copyright {2006 ActiveState Software Inc.}]
[copyright {2009 Thomas Maeder, Glue Software Engineering AG}]
101
102
103
104
105
106
107
108
109
110
111
112
113
114
        "IDs": [116, 943, 234, 38793]
    }
}
=>
Image {IDs {116 943 234 38793} Thumbnail {Width 100 Height 125 Url http://www.example.com/image/481989943} Width 800 Height 600 Title {View from 15th Floor}}
}]

[section RELATED]

To write json, instead of parsing it, see package [package json::write].

[vset CATEGORY json]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<

|

101
102
103
104
105
106
107




108
109
110
        "IDs": [116, 943, 234, 38793]
    }
}
=>
Image {IDs {116 943 234 38793} Thumbnail {Width 100 Height 125 Url http://www.example.com/image/481989943} Width 800 Height 600 Title {View from 15th Floor}}
}]





[vset CATEGORY json]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/json/json.tcl.

215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230

231
232
233
234
235
236
237
    # number tokens
    # negative lookahead (?!0)[[:digit:]]+ might be more elegant, but
    # would slow down tokenizing by a factor of up to 3!
    variable positiveRE {[1-9][[:digit:]]*}
    variable cardinalRE "-?(?:$positiveRE|0)"
    variable fractionRE {[.][[:digit:]]+}
    variable exponentialRE {[eE][+-]?[[:digit:]]+}
    variable numberREa "${cardinalRE}(?:$fractionRE)?(?:$exponentialRE)?"
    variable numberREb "${fractionRE}(?:$exponentialRE)?"
    variable numberREc "${cardinalRE}\[.\](?:$exponentialRE)?"
    variable numberRE  "$numberREa|$numberREb|$numberREc"
    variable numberRE  "$numberREa|$numberREb|$numberREc"

    # JSON token, and validation
    variable tokenRE "$singleCharTokenRE|$stringRE|$wordTokenRE|$numberRE"
    variable tokenREv "$singleCharTokenRE|$stringREv|$wordTokenRE|$numberRE"


    # 0..n white space characters
    set whiteSpaceRE {[[:space:]]*}

    # Regular expression for validating a JSON text
    variable validJsonRE "^(?:${whiteSpaceRE}(?:$tokenREv))*${whiteSpaceRE}$"
}







|
<
<
<
<




>







215
216
217
218
219
220
221
222




223
224
225
226
227
228
229
230
231
232
233
234
    # number tokens
    # negative lookahead (?!0)[[:digit:]]+ might be more elegant, but
    # would slow down tokenizing by a factor of up to 3!
    variable positiveRE {[1-9][[:digit:]]*}
    variable cardinalRE "-?(?:$positiveRE|0)"
    variable fractionRE {[.][[:digit:]]+}
    variable exponentialRE {[eE][+-]?[[:digit:]]+}
    variable numberRE "${cardinalRE}(?:$fractionRE)?(?:$exponentialRE)?"





    # JSON token, and validation
    variable tokenRE "$singleCharTokenRE|$stringRE|$wordTokenRE|$numberRE"
    variable tokenREv "$singleCharTokenRE|$stringREv|$wordTokenRE|$numberRE"


    # 0..n white space characters
    set whiteSpaceRE {[[:space:]]*}

    # Regular expression for validating a JSON text
    variable validJsonRE "^(?:${whiteSpaceRE}(?:$tokenREv))*${whiteSpaceRE}$"
}
278
279
280
281
282
283
284
285
proc ::json::string2json {str} {
    return "\"$str\""
}

# ### ### ### ######### ######### #########
## Ready

package provide json 1.3.4







|
275
276
277
278
279
280
281
282
proc ::json::string2json {str} {
    return "\"$str\""
}

# ### ### ### ######### ######### #########
## Ready

package provide json 1.3.3

Changes to modules/json/json_tcl.tcl.

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
proc ::json::json2dict_tcl {jsonText} {
    variable tokenRE

    set tokens [regexp -all -inline -- $tokenRE $jsonText]
    set nrTokens [llength $tokens]
    set tokenCursor 0

    #puts I:($jsonText)
    #puts T:\t[join $tokens \nT:\t]
    return [parseValue $tokens $nrTokens tokenCursor]
}

# Parse multiple JSON entities in a string into a list of dictionaries
# @param jsonText JSON text to parse
# @param max      Max number of entities to extract.
# @return list of (dict (or list) containing the objects) represented by $jsonText







<
|







19
20
21
22
23
24
25

26
27
28
29
30
31
32
33
proc ::json::json2dict_tcl {jsonText} {
    variable tokenRE

    set tokens [regexp -all -inline -- $tokenRE $jsonText]
    set nrTokens [llength $tokens]
    set tokenCursor 0


#puts T:\t[join $tokens \nT:\t]
    return [parseValue $tokens $nrTokens tokenCursor]
}

# Parse multiple JSON entities in a string into a list of dictionaries
# @param jsonText JSON text to parse
# @param max      Max number of entities to extract.
# @return list of (dict (or list) containing the objects) represented by $jsonText

Changes to modules/json/json_write.man.

79
80
81
82
83
84
85
86
87
88
89
90
91
92
This method takes a series of key/value arguments, the values already
formatted for JSON, and returns them as a properly formatted JSON
object as its result, with the keys formatted as JSON strings.

[list_end]
[para]

[section RELATED]

To parse json, instead of writing it, see package [package json].

[vset CATEGORY json]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<

|

79
80
81
82
83
84
85




86
87
88
This method takes a series of key/value arguments, the values already
formatted for JSON, and returns them as a properly formatted JSON
object as its result, with the keys formatted as JSON strings.

[list_end]
[para]





[vset CATEGORY json]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/json/json_write.pcx.

26
27
28
29
30
31
32
33
34
35
36
37
38

39
40
41
42
	}}}
	{string {checkSimpleArgs 1 1 {
	    checkWord
	}}}
	{array {checkSimpleArgs 0 -1 {
	    checkWord
	}}}
	{object {checkSimpleArgsModNk 0 -1 2 0 {
	    checkWord
	    checkWord
	}}}
    } {}}
}}


# Initialization via pcx::init.
# Use a ::json::write::init procedure for non-standard initialization.
pcx::complete







|




<
>




26
27
28
29
30
31
32
33
34
35
36
37

38
39
40
41
42
	}}}
	{string {checkSimpleArgs 1 1 {
	    checkWord
	}}}
	{array {checkSimpleArgs 0 -1 {
	    checkWord
	}}}
	{object {checkSimpleArgsModNk 0 2 {
	    checkWord
	    checkWord
	}}}
    } {}}

}

# Initialization via pcx::init.
# Use a ::json::write::init procedure for non-standard initialization.
pcx::complete

Changes to modules/json/pkgIndex.tcl.

1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded json 1.3.4 [list source [file join $dir json.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded json::write 1.0.3 [list source [file join $dir json_write.tcl]]



|



1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded json 1.3.3 [list source [file join $dir json.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded json::write 1.0.3 [list source [file join $dir json_write.tcl]]

Changes to modules/json/tests/support.tcl.

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

set JSON(emptyList4) {[[]]}
set  TCL(emptyList4) {{}}

set JSON(escapes) {"\t\r\n\f\b\/\\\""}
set  TCL(escapes) "\t\r\n\f\b/\\\""

foreach {label json tcl} {
    fp1.1  1.1  1.1
    fp1.   1.   1.
    fp.1   .1   .1
    fp0.1  0.1  0.1
    fp1    1    1
} {
    set JSON($label) $json
    set TCL($label) $tcl
}

foreach f [TestFilesGlob tests/*.fail] {
    set name [file rootname [file tail $f]]
    set FAIL($name) [tcltest::viewFile $f]
}

foreach f [TestFilesGlob tests/*.err] {







<
<
<
<
<
<
<
<
<
|







80
81
82
83
84
85
86









87
88
89
90
91
92
93
94

set JSON(emptyList4) {[[]]}
set  TCL(emptyList4) {{}}

set JSON(escapes) {"\t\r\n\f\b\/\\\""}
set  TCL(escapes) "\t\r\n\f\b/\\\""












foreach f [TestFilesGlob tests/*.fail] {
    set name [file rootname [file tail $f]]
    set FAIL($name) [tcltest::viewFile $f]
}

foreach f [TestFilesGlob tests/*.err] {

Changes to modules/lambda/lambda.man.

81
82
83
84
85
86
87
88
89

[list_end]

[section AUTHORS]
Andreas Kupries

[vset CATEGORY lambda]
[include ../common-text/feedback.inc]
[manpage_end]







|

81
82
83
84
85
86
87
88
89

[list_end]

[section AUTHORS]
Andreas Kupries

[vset CATEGORY lambda]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Deleted modules/lazyset/lazyset.man.

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
[vset VERSION 1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin lazyset n [vset VERSION]]
[copyright {2018 Roy Keene}]
[moddesc   {Lazy evaluation for variables and arrays}]
[category  Utility]
[titledesc {Lazy evaluation}]
[require Tcl 8.5]
[require lazyset [opt [vset VERSION]]]
[description]
[para]

The [package lazyset] package provides a mechanism for deferring execution
of code until a specific variable or any index of an array is referenced.

[section {COMMANDS}]

[list_begin definitions]
[call [cmd ::lazyset::variable] [opt [arg {-array boolean}]] [opt [arg {-appendArgs boolean}]] [arg variableName] [arg commandPrefix]]
Arrange for the code specified as [arg commandPrefix] to be executed when
the variable whose name is specified by [arg variableName] is read for
the first time.

If the optional argument [arg {-array boolean}] is specified as true,
then the variable specified as [arg variableName] is treated as an
array and attempting to read any index of the array causes that
index to be set by the [arg commandPrefix] as they are read.

If the optional argument [arg {-appendArgs boolean}] is specified as
false, then the variable name and subnames are not appended to the
[arg commandPrefix] before it is evaluated.  If the argument
[arg {-appendArgs boolean}] is not specified or is specified as true
then 1 or 2 additional arguments are appended to the [arg commandPrefix].
If [arg {-array boolean}] is specified as true, then 2 arguments are
appended corresponding to the name of the variable and the index,
otherwise 1 argument is appended containing the name of variable.

The [arg commandPrefix] code is run in the same scope as the variable
is read.

[list_end]

[section EXAMPLES]

[example {
	::lazyset::variable page {apply {{name} {
		package require http
		set token [http::geturl http://www.tcl.tk/]
		set data [http::data $token]
		return $data
	}}}

	puts $page
}]

[example {
	::lazyset::variable -array true page {apply {{name index} {
		package require http
		set token [http::geturl $index]
		set data [http::data $token]
		return $data
	}}}

	puts $page(http://www.tcl.tk/)
}]

[example {
	::lazyset::variable -appendArgs false simple {
		return -level 0 42
	}

	puts $simple
}]

[section AUTHORS]
Roy Keene

[vset CATEGORY utility]
[include ../common-text/feedback.inc]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































Deleted modules/lazyset/lazyset.tcl.

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
#! /usr/bin/env tclsh

package require Tcl 8.5

namespace eval ::lazyset {}

proc ::lazyset::variable {args} {
	lassign [lrange $args end-1 end] varName commandPrefix
	set args [lrange $args 0 end-2]

	set appendArgs true
	foreach {arg val} $args {
		switch -exact -- $arg {
			"-array" {
				set isArray [expr {!!$val}]
			}
			"-appendArgs" {
				set appendArgs [expr {!!$val}]
			}
			default {
				error "Valid options -array, -appendArgs: Invalid option \"$arg\""
			}
		}
	}

	set trace [uplevel 1 [list trace info variable $varName]]
	if {$trace ne ""} {
		uplevel 1 [list [list trace remove variable $varName $trace]]
	}

	if {![info exists isArray]} {
		set isArray false
		if {[uplevel 1 [list ::array exists $varName]]} {
			set isArray true
		}
	}

	set finalCode ""
	if {$isArray} {
		append finalCode {
			set varname "$name1\($name2\)"
			if {[uplevel 1 [list info exists $varname]]} {
				return
			}
		}
	} else {
		append finalCode {
			set varname $name1
		}
	}

	if {$appendArgs} {
		append finalCode {
			set args [lrange $args 1 end]
		}
		if {$isArray} {
			append finalCode {
				append code " " [list $name1 $name2 {*}$args]
			}
		} else {
			append finalCode {
				append code " " [list $name1 {*}$args]
			}
		}
	}

	append finalCode {
		set result [uplevel 1 $code]

		uplevel 1 [list unset -nocomplain $varname]
		uplevel 1 [list set $varname $result]
	}

	set code [list apply [list {code name1 name2 args} $finalCode] $commandPrefix]

	if {$isArray} {
		uplevel 1 [list unset -nocomplain $varName]
		uplevel 1 [list ::array set $varName [list]]
	} else {
		uplevel 1 [list set $varName ""]
	}

	uplevel 1 [list trace add variable $varName read $code]

	return
}

package provide lazyset 1
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































Deleted modules/lazyset/lazyset.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# lazyset.test - Copyright (c) 2018 Roy Keene
#
# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2

testing {
	useLocal lazyset.tcl lazyset
}

# -------------------------------------------------------------------------

test lazyset-basic-1.0 {} -body {
	::lazyset::variable -appendArgs false test {
		return -level 0 ok
	}
	set test
} -cleanup {
	unset test
} -result {ok}

test lazyset-withargs-1.0 {} -body {
	::lazyset::variable test [list apply {{name} {
		return ok
	}}]
	set test
} -cleanup {
	unset test
} -result {ok}

test lazyset-withargs-2.0 {} -body {
	::lazyset::variable test [list apply {{result name} {
		return $result
	}} ok]
	set test
} -cleanup {
	unset test
} -result {ok}

test lazyset-inscope-1.0 {} -body {
	::lazyset::variable -appendArgs false test {
		set x 0
		return -level 0 ok
	}
	set test
	set x
} -cleanup {
	unset test
	unset x
} -result {0}

test lazyset-onlyonce-1.0 {} -body {
	set x 0
	::lazyset::variable -appendArgs false test {
		incr x
		return -level 0 ok
	}
	set test
	set test
	set x
} -cleanup {
	unset test
	unset x
} -result {1}

test lazyset-onlyonce-2.0 {} -body {
	set x 0
	::lazyset::variable -appendArgs false -array true test {
		incr x
		return -level 0 ok
	}
	set test(a)
	set test(a)
	set x
} -cleanup {
	unset test
	unset x
} -result {1}

test lazyset-onlyonce-3.0 {} -body {
	set x 0
	::lazyset::variable -appendArgs false -array true test {
		incr x
		return -level 0 ok
	}
	set test(a)
	set test(a)
	set test(b)
	set test(b)
	set x
} -cleanup {
	unset test
	unset x
} -result {2}

test lazyset-array-1.0 {} -body {
	::lazyset::variable -appendArgs false -array true test {
		return -level 0 ok
	}
	set result $test(a)
	append result $test(b)
} -cleanup {
	unset test
	unset result
} -result {okok}

test lazyset-array-1.0 {} -body {
	::lazyset::variable -array true test [list apply {{_ index} {
		return $index
	}}]
	set result $test(a)
	append result $test(b)
} -cleanup {
	unset test
	unset result
} -result {ab}


# -------------------------------------------------------------------------
testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































Deleted modules/lazyset/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded lazyset 1 [list source [file join $dir lazyset.tcl]]
<
<




Changes to modules/ldap/ChangeLog.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

17
18
19
20
21
22
23
2017-05-28  Michael Schlenker  <mic42@users.sourceforge.net>
	
	* ldap.tcl: Bumped to version 1.9.
	* ldap.man: Fixed [Ticket 7cf9323d38af6cf4e074ec10f6f15ad4c4e1fdf1]
	* ldap.test: and improved the TLS connection options and
	             documentation.
    
        *** INCOMPATIBLE CHANGE *** 

	The defaults changed to do basic certificate validation. Old could
	might need to provide a list of trusted certificates or disable
	validation.

2016-01-02  Michael Schlenker <mic42@users.sourceforge.net>

	* ldapx.man: Fix wrong example [Ticket: 2886893fff]


2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

<
<
<
<
<
<
<
<
<
<
<
<
<



>




















1
2
3
4
5
6
7
8
9
10
11













2016-01-02  Michael Schlenker <mic42@users.sourceforge.net>

	* ldapx.man: Fix wrong example [Ticket: 2886893fff]


2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

Changes to modules/ldap/ldap.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.10]
[manpage_begin ldap n [vset VERSION]]
[keywords {directory access}]
[keywords internet]
[keywords ldap]
[keywords {ldap client}]
[keywords protocol]
[keywords {rfc 2251}]
[keywords {rfc 4511}]
[keywords x.500]
[copyright {2004 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[copyright {2004 Jochen Loewer <loewerj@web.de>}]
[copyright {2006 Michael Schlenker <mic42@users.sourceforge.net>}]
[moddesc   {LDAP client}]
[titledesc {LDAP client}]
[category  Networking]
[require Tcl 8.5]
[require ldap [opt [vset VERSION]]]
[description]
[para]

The [package ldap] package provides a Tcl-only client library
for the LDAPv3 protocol as specified in

RFC 4511 ([uri http://www.rfc-editor.org/rfc/rfc4511.txt]).

It works by opening the standard (or secure) LDAP socket on the
server, and then providing a Tcl API to access the LDAP protocol
commands.  All server errors are returned as Tcl errors (thrown) which
must be caught with the Tcl [cmd catch] command.

[section {TLS Security Considerations}]

[para] This package uses the [package TLS] package to handle the
security for [const LDAPS] connections.

[para] Policy decisions like the set of protocols to support and what
ciphers to use are not the responsibility of [package TLS], nor of
this package itself however.

Such decisions are the responsibility of whichever application is
using the package, and are likely influenced by the set of servers
the application will talk to as well.

[para] For example, in light of the recent
[uri http://googleonlinesecurity.blogspot.co.uk/2014/10/this-poodle-bites-exploiting-ssl-30.html \
{POODLE attack}] discovered by Google many servers will disable support
for the SSLv3 protocol.

To handle this change the applications using [package TLS] must be
patched, and not this package, nor [package TLS] itself.

Such a patch may be as simple as generally activating [const tls1]
support, as shown in the example below.

[example {
    ldap::tlsoptions -tls1 1 -ssl2 0 -ssl3 0 ;# forcibly activate support for the TLS1 protocol

    ... your own application code ...
}]


[section COMMANDS]

[list_begin definitions]

[call [cmd ::ldap::connect] [arg host] [opt [arg port]]]

Opens a LDAPv3 connection to the specified [arg host], at the given
[arg port], and returns a token for the connection. This token is the
[arg handle] argument for all other commands. If no [arg port] is
specified it will default to [const 389].

[para]

The command blocks until the connection has been established, or
establishment definitely failed.

[call [cmd ::ldap::tlsoptions] [cmd reset]]

This command resets TLS options to default values. It returns the
set of options.
Using this command is incompatible with the obsolete
form of [cmd ::ldap::secure_connect] and [cmd ::ldap_starttls].

[call [cmd ::ldap::tlsoptions] [opt "[arg opt1] [arg val1]"] [opt "[arg opt2] [arg val2]"] ...]

This commands adds one or more options to some value, and may be used
more than one time in order to add options in several steps.  A complete
description of options may be found in the [package tls] package
documentation. Valid options and values are:

[list_begin options]
[opt_def {-cadir} directory  ]

Provide the directory containing the CA certificates.
No default.

[opt_def {-cafile} file]

Provide the CA file.
No default.

[opt_def {-cipher} string]

Provide the cipher suites to use.
No default.

[opt_def {-dhparams} file]

Provide a Diffie-Hellman parameters file.
No default.

[opt_def {-request} boolean]

Request a certificate from peer during SSL handshake.
Default: true.

[opt_def {-require} boolean]

Require a valid certificate from peer during SSL handshake. If this is
set to true then -request must also be set to true.
Default: false

[opt_def {-servername} host]

Only available if the OpenSSL library the TLS package is linked against
supports the TLS hostname extension for 'Server Name Indication'
(SNI). Use to name the logical host we are talking to and expecting a
certificate for.
No default.

[opt_def {-ssl2} bool]

Enable use of SSL v2.
Default: false

[opt_def {-ssl3} bool]

Enable use of SSL v3.
Default: false

[opt_def {-tls1} bool]

Enable use of TLS v1
Default: true

[opt_def {-tls1.1} bool]

Enable use of TLS v1.1
Default: true

[opt_def {-tls1.2} bool]

Enable use of TLS v1.2
Default: true

[list_end]
[para]

This command returns the current set of TLS options and values.
In particular, one may use this command without any arguments to get
the current set of options.

[para]

Using this command is incompatible with the obsolete
form of [cmd ::ldap::secure_connect] and [cmd ::ldap_starttls]
(see below).

[call [cmd ::ldap::secure_connect] [arg host] [opt [arg port]]]

Like [cmd ::ldap::connect], except that the created connection is
secured by SSL. The port defaults to [const 636].  This command
depends on the availability of the package [package TLS], which is a
SSL binding for Tcl. If [package TLS] is not available, then this
command will fail.

[para]

TLS options are specified with [cmd ::ldap::tlsoptions].

[para]

The command blocks until the connection has been established, or
establishment definitely failed.


[call [cmd ::ldap::secure_connect] [arg host] [opt [arg port]] [opt [arg verify_cert]] [opt [arg sni_servername]]]

Note: this form of the command is deprecated, since TLS options had
to be specified with a combination of parameters to this command
([arg verify_cert] and [arg sni_servername]) and arguments to [cmd ::tls::init]
(from package [package tls]) for example to setup defaults for trusted
certificates. Prefer the above form (without the [arg verify_cert] and
[arg sni_servername] parameters) and set TLS options with
[cmd ::ldap::tlsoptions].

[para]

If [arg verify_cert] is set to 1, the default, this checks the server certificate against
the known hosts. If [arg sni_servername] is set, the given hostname is used as the 
hostname for Server Name Indication in the TLS handshake.

[para]

Use [cmd ::tls::init] to setup defaults for trusted certificates.

[para]

TLS supports different protocol levels. In common use are the versions 1.0, 1.1 and 1.2.
By default all those versions are offered. If you need to modify the acceptable
protocols, you can change the ::ldap::tlsProtocols list (deprecated).

[call [cmd ::ldap::disconnect] [arg handle]]

Closes the ldap connection refered to by the token
[arg handle]. Returns the empty string as its result.

[call [cmd ::ldap::starttls] [arg handle]]

Start TLS negotiation on the connection denoted by [arg handle],
with TLS parameters set with [cmd ::ldap::tlsoptions].

[call [cmd ::ldap::starttls] [arg handle] [opt [arg cafile]] [opt [arg certfile]] [opt [arg keyfile]] [opt [arg verify_cert]] [opt [arg sni_servername]]]

Note: this form of the command is deprecated, since TLS options had
to be specified with a combination of parameters to this command
([arg cafile], [arg certfile], [arg keyfile], [arg verify_cert]
and [arg sni_servername]) and arguments to [cmd ::tls::init]
(from package [package tls]).
Prefer the above form (without specific TLS arguments)
and set TLS options with [cmd ::ldap::tlsoptions].

[para]

Start TLS negotiation on the connection denoted by [arg handle].

You need to set at least the [arg cafile] argument to a file with trusted certificates, if [arg verify_cert] is 1, which is the default.
The [arg sni_servername] can be used to signal a different hostname during the TLS handshake.

The announced protocols are determined in the same way as [cmd ::ldap::secure_connect].

You can specify a TLS client certificate with the [arg certfile] and [arg keyfile] options.

[call [cmd ::ldap::bind] [arg handle] [opt [arg name]] [opt [arg password]]]

This command authenticates the ldap connection refered to by the token
in [arg handle], with a user name and associated password. It blocks
until a response from the ldap server arrives. Its result is the empty
string.

<
|














|
|













<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










<
<
<
<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<





|

|
<

<
|
<
<
<
<
<
<
<
|
<
|
<
<
<
<
<
<
<
<







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
[comment {-*- tcl -*- doctools manpage}]

[manpage_begin ldap n 1.6.9]
[keywords {directory access}]
[keywords internet]
[keywords ldap]
[keywords {ldap client}]
[keywords protocol]
[keywords {rfc 2251}]
[keywords {rfc 4511}]
[keywords x.500]
[copyright {2004 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[copyright {2004 Jochen Loewer <loewerj@web.de>}]
[copyright {2006 Michael Schlenker <mic42@users.sourceforge.net>}]
[moddesc   {LDAP client}]
[titledesc {LDAP client}]
[category  Networking]
[require Tcl 8.4]
[require ldap [opt 1.8]]
[description]
[para]

The [package ldap] package provides a Tcl-only client library
for the LDAPv3 protocol as specified in

RFC 4511 ([uri http://www.rfc-editor.org/rfc/rfc4511.txt]).

It works by opening the standard (or secure) LDAP socket on the
server, and then providing a Tcl API to access the LDAP protocol
commands.  All server errors are returned as Tcl errors (thrown) which
must be caught with the Tcl [cmd catch] command.


[include ../common-text/tls-security-notes.inc]





























[section COMMANDS]

[list_begin definitions]

[call [cmd ::ldap::connect] [arg host] [opt [arg port]]]

Opens a LDAPv3 connection to the specified [arg host], at the given
[arg port], and returns a token for the connection. This token is the
[arg handle] argument for all other commands. If no [arg port] is
specified it will default to [const 389].

[para]

The command blocks until the connection has been established, or
establishment definitely failed.





























































































[call [cmd ::ldap::secure_connect] [arg host] [opt [arg port]]]

Like [cmd ::ldap::connect], except that the created connection is
secured by SSL. The port defaults to [const 636].  This command
depends on the availability of the package [package TLS], which is a
SSL binding for Tcl. If [package TLS] is not available, then this
command will fail.

[para]





The command blocks until the connection has been established, or
establishment definitely failed.




























[call [cmd ::ldap::disconnect] [arg handle]]

Closes the ldap connection refered to by the token
[arg handle]. Returns the empty string as its result.

[call [cmd ::ldap::starttls] [arg handle] [opt [arg cafile]] [opt [arg certfile]] [opt [arg keyfile]]]

Start TLS negotiation on the connection denoted by [arg handle].



This is currently experimental and subject to change, more control over the TLS details







will probably be exposed later, to allow users to fine tune the negotiation according

to their security needs.









[call [cmd ::ldap::bind] [arg handle] [opt [arg name]] [opt [arg password]]]

This command authenticates the ldap connection refered to by the token
in [arg handle], with a user name and associated password. It blocks
until a response from the ldap server arrives. Its result is the empty
string.
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528

This command removes the object specified by [arg dn], and all its
attributes from the server.

The command blocks until the operation has completed. Its result
is the empty string.

[call [cmd ::ldap::modifyDN] [arg handle] [arg dn] [arg newrdn] [opt [arg deleteOld]] [opt [arg newSuperior]]]

This command moves or copies the object specified by [arg dn]
to a new location in the tree of object. This location is
specified by [arg newrdn], a [emph relative] designation,
or by [arg newrdn] and [arg newSuperior], a [emph absolute] designation.

The optional argument [arg deleteOld] defaults to [const true],







|







343
344
345
346
347
348
349
350
351
352
353
354
355
356
357

This command removes the object specified by [arg dn], and all its
attributes from the server.

The command blocks until the operation has completed. Its result
is the empty string.

[call [cmd ::ldap::modifyDN] [arg handle] [arg dn] [arg newrdn] [opt [arg deleteOld]] [opt [arg newSuperior]]]]

This command moves or copies the object specified by [arg dn]
to a new location in the tree of object. This location is
specified by [arg newrdn], a [emph relative] designation,
or by [arg newrdn] and [arg newSuperior], a [emph absolute] designation.

The optional argument [arg deleteOld] defaults to [const true],
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
This command returns all currently existing ldap connection handles.

[call [cmd ::ldap::info] [cmd tls] [arg handle] ]

This command returns 1 if the ldap connection [arg handle] used TLS/SSL for
connection via [cmd ldap::secure_connect] or completed [cmd ldap::starttls], 0 otherwise.

[call [cmd ::ldap::info] [cmd tlsstatus] [arg handle] ]

This command returns the current security status of an TLS secured
channel. The result is a list of key-value pairs describing the connected
peer (see the [package TLS] package documentation for the returned values).
If the connection is not secured with TLS, an empty list is returned.

[call [cmd ::ldap::info] [cmd saslmechanisms] [arg handle]]

Return the supported SASL mechanisms advertised by the server. Only valid in a
bound state (anonymous or other).

[call [cmd ::ldap::info] [cmd control] [arg handle] ]








<
<
<
<
<
<
<







385
386
387
388
389
390
391







392
393
394
395
396
397
398
This command returns all currently existing ldap connection handles.

[call [cmd ::ldap::info] [cmd tls] [arg handle] ]

This command returns 1 if the ldap connection [arg handle] used TLS/SSL for
connection via [cmd ldap::secure_connect] or completed [cmd ldap::starttls], 0 otherwise.








[call [cmd ::ldap::info] [cmd saslmechanisms] [arg handle]]

Return the supported SASL mechanisms advertised by the server. Only valid in a
bound state (anonymous or other).

[call [cmd ::ldap::info] [cmd control] [arg handle] ]

653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
    ldap::delete $handle $dn

    ldap::unbind     $handle
    ldap::disconnect $handle
}]
[para]

And another example, a simple query, and processing the
results.

[para]
[example {
    package require ldap
    set handle [ldap::connect ldap.acme.com 389]
    ldap::bind $handle







|







475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
    ldap::delete $handle $dn

    ldap::unbind     $handle
    ldap::disconnect $handle
}]
[para]

And a another example, a simple query, and processing the
results.

[para]
[example {
    package require ldap
    set handle [ldap::connect ldap.acme.com 389]
    ldap::bind $handle
695
696
697
698
699
700
701
702
703
	puts ""
    }
    ldap::unbind $handle
    ldap::disconnect $handle
}]

[vset CATEGORY ldap]
[include ../common-text/feedback.inc]
[manpage_end]







|

517
518
519
520
521
522
523
524
525
	puts ""
    }
    ldap::unbind $handle
    ldap::disconnect $handle
}]

[vset CATEGORY ldap]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/ldap/ldap.tcl.

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
#   $Id: ldap.tcl,v 1.26 2008/11/22 12:25:27 mic42 Exp $
#
#   written by Jochen Loewer
#   3 June, 1999
#
#-----------------------------------------------------------------------------

package require Tcl 8.5
package require asn 0.7
package provide ldap 1.10

namespace eval ldap {

    namespace export    connect secure_connect  \
			starttls                \
			tlsoptions              \
                        disconnect              \
                        bind unbind             \
                        bindSASL                \
                        search                  \
                        searchInit           	\
		        searchNext	        \
		        searchEnd		\
                        modify                  \
                        modifyMulti             \
                        add                     \
		        addMulti		\
                        delete                  \
                        modifyDN		\
		        info

    namespace import ::asn::*


    variable doDebug

    # Valid TLS procotol versions
    variable tlsProtocols [list -tls1 yes -tls1.1 yes -tls1.2 yes]

    set doDebug 0

    # LDAP result codes from the RFC
    variable resultCode2String
    array set resultCode2String {
         0  success
         1  operationsError







|

|




<
<

















>


<
<
<







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
#   $Id: ldap.tcl,v 1.26 2008/11/22 12:25:27 mic42 Exp $
#
#   written by Jochen Loewer
#   3 June, 1999
#
#-----------------------------------------------------------------------------

package require Tcl 8.4
package require asn 0.7
package provide ldap 1.8

namespace eval ldap {

    namespace export    connect secure_connect  \


                        disconnect              \
                        bind unbind             \
                        bindSASL                \
                        search                  \
                        searchInit           	\
		        searchNext	        \
		        searchEnd		\
                        modify                  \
                        modifyMulti             \
                        add                     \
		        addMulti		\
                        delete                  \
                        modifyDN		\
		        info

    namespace import ::asn::*

    variable SSLCertifiedAuthoritiesFile
    variable doDebug




    set doDebug 0

    # LDAP result codes from the RFC
    variable resultCode2String
    array set resultCode2String {
         0  success
         1  operationsError
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
        66  notAllowedOnNonLeaf
        67  notAllowedOnRDN
        68  entryAlreadyExists
        69  objectClassModsProhibited
        80  other
    }

    # TLS options for secure_connect and starttls
    # (see tcltls documentation, function tls::import)
    variable validTLSOptions
    set validTLSOptions {
	-cadir
	-cafile
	-certfile
	-cipher
	-command
	-dhparams
	-keyfile
	-model
	-password
	-request
	-require
	-server
	-servername
	-ssl2
	-ssl3
	-tls1
	-tls1.1
	-tls1.2
    }

    # Default TLS options for secure_connect and starttls
    variable defaultTLSOptions
    array set defaultTLSOptions {
	-request 1
	-require 1
	-ssl2    no
	-ssl3    no
	-tls1	 yes
	-tls1.1	 yes
	-tls1.2	 yes
    }

    variable curTLSOptions
    array set curTLSOptions [array get defaultTLSOptions]

    # are we using the old interface (TLSMode = "compatible") or the
    # new one (TLSMode = "integrated")
    variable TLSMode
    set TLSMode "compatible"
}


#-----------------------------------------------------------------------------
#    Lookup an numerical ldap result code and return a string version
#
#-----------------------------------------------------------------------------







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







111
112
113
114
115
116
117











































118
119
120
121
122
123
124
        66  notAllowedOnNonLeaf
        67  notAllowedOnRDN
        68  entryAlreadyExists
        69  objectClassModsProhibited
        80  other
    }












































}


#-----------------------------------------------------------------------------
#    Lookup an numerical ldap result code and return a string version
#
#-----------------------------------------------------------------------------
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
   if {![::info exists conn(tls)]} {
   	return -code error \
		"\"[lindex $args 0]\" is not a ldap connection handle"
   }
   return $conn(tls)
}

#-----------------------------------------------------------------------------
#   return the TLS connection status
#
#-----------------------------------------------------------------------------

proc ldap::info_tlsstatus {args} {
   if {[llength $args] != 1} {
   	return -code error \
	       "Wrong # of arguments. Usage: ldap::info tlsstatus handle"
   }
   CheckHandle [lindex $args 0]
   upvar #0 [lindex $args 0] conn
   if {![::info exists conn(tls)]} {
   	return -code error \
		"\"[lindex $args 0]\" is not a ldap connection handle"
   }
   if {$conn(tls)} then {
       set r [::tls::status $conn(sock)]
   } else {
       set r {}
   }
   return $r
}

proc ldap::info_saslmechanisms {args} {
   if {[llength $args] != 1} {
   	return -code error \
	       "Wrong # of arguments. Usage: ldap::info saslmechanisms handle"
   }
   return [Saslmechanisms [lindex $args 0]]
}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







245
246
247
248
249
250
251
























252
253
254
255
256
257
258
   if {![::info exists conn(tls)]} {
   	return -code error \
		"\"[lindex $args 0]\" is not a ldap connection handle"
   }
   return $conn(tls)
}

























proc ldap::info_saslmechanisms {args} {
   if {[llength $args] != 1} {
   	return -code error \
	       "Wrong # of arguments. Usage: ldap::info saslmechanisms handle"
   }
   return [Saslmechanisms [lindex $args 0]]
}
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561


























562
563
564
565
566
567
568
    set conn(referenceVar) [namespace current]::searchReferences
    set conn(returnReferences) 0

    fileevent $sock readable [list ::ldap::MessageReceiver ::ldap::ldap$sock]
    return ::ldap::ldap$sock
}

#-----------------------------------------------------------------------------
#    tlsoptions
#
#-----------------------------------------------------------------------------
proc ldap::tlsoptions {args} {
    variable curTLSOptions
    variable validTLSOptions
    variable defaultTLSOptions
    variable TLSMode

    if {$args eq "reset"} then {
	array set curTLSOptions [array get defaultTLSOptions]
    } else {
	foreach {opt val} $args {
	    if {$opt in $validTLSOptions} then {
		set curTLSOptions($opt) $val
	    } else {
		return -code error "invalid TLS option '$opt'"
	    }
	}
    }
    set TLSMode "integrated"
    return [array get curTLSOptions]
}

#-----------------------------------------------------------------------------
#    secure_connect
#
#-----------------------------------------------------------------------------
proc ldap::secure_connect { host {port 636} {verify_cert ""} {sni_servername ""}} {

    variable tlsProtocols
    variable curTLSOptions
    variable TLSMode

    package require tls

    #------------------------------------------------------------------
    #   set options
    #------------------------------------------------------------------

    if {$TLSMode eq "compatible"} then {
	#
	# Compatible with old mode. Build a TLS socket with appropriate
	# parameters, without changing any other parameter which may
	# have been set by a previous call to tls::init (as specified
	# in the ldap.tcl manpage).
	#
	if {$verify_cert eq ""} then {
	    set verify_cert 1
	}
	set cmd [list tls::socket -request 1 -require $verify_cert \
				  -ssl2 no -ssl3 no]
	if {$sni_servername ne ""} {
	    lappend cmd -servername $sni_servername
	}

	# The valid ones depend on the server and openssl version,
	# tls::ciphers all tells it in the error message, but offers no
	# nice introspection.
	foreach {proto active} $tlsProtocols {
	    lappend cmd $proto $active
	}

	lappend cmd $host $port
    } else {
	#
	# New, integrated mode. Use only parameters set with
	# ldap::tlsoptions to build the socket.
	#

	if {$verify_cert ne "" || $sni_servername ne ""} then {
	    return -code error "verify_cert/sni_servername: incompatible with the use of tlsoptions"
	}

	set cmd [list tls::socket {*}[array get curTLSOptions] $host $port]
    }

    #------------------------------------------------------------------
    #   connect via TCP/IP
    #------------------------------------------------------------------

    set sock [eval $cmd]

    #------------------------------------------------------------------
    #   Run the TLS handshake
    #
    #------------------------------------------------------------------
    
    # run the handshake in synchronous I/O mode
    fconfigure $sock -blocking yes -translation binary -buffering full

    if {[catch { tls::handshake $sock } err]} {
	close $sock
	return -code error $err
    }

    # from now on, run in asynchronous I/O mode
    fconfigure $sock -blocking no -translation binary -buffering full



























    #--------------------------------------
    #   initialize connection array
    #--------------------------------------
    upvar ::ldap::ldap$sock conn
    catch { unset conn }








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|

<
<
|




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







385
386
387
388
389
390
391

























392
393
394
395
396
397


398
399
400
401
402









































403
404

405















406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
    set conn(referenceVar) [namespace current]::searchReferences
    set conn(returnReferences) 0

    fileevent $sock readable [list ::ldap::MessageReceiver ::ldap::ldap$sock]
    return ::ldap::ldap$sock
}


























#-----------------------------------------------------------------------------
#    secure_connect
#
#-----------------------------------------------------------------------------
proc ldap::secure_connect { host {port 636} } {



    variable SSLCertifiedAuthoritiesFile

    package require tls

    #------------------------------------------------------------------









































    #   connect via TCP/IP
    #------------------------------------------------------------------

    set sock [socket $host $port]















    fconfigure $sock -blocking no -translation binary -buffering full

    #------------------------------------------------------------------
    #   make it a SSL connection
    #
    #------------------------------------------------------------------
    #tls::import $sock -cafile $SSLCertifiedAuthoritiesFile -ssl2 no -ssl3 yes -tls1 yes
    tls::import $sock -cafile "" -certfile "" -keyfile "" \
                      -request 1 -server 0 -require 0 -ssl2 no -ssl3 yes -tls1 yes
    set retry 0
    while {1} {
        if {$retry > 20} {
            close $sock
            return -code error "too long retry to setup SSL connection"
        }
        if {[catch { tls::handshake $sock } err]} {
            if {[string match "*resource temporarily unavailable*" $err]} {
                after 50
                incr retry
            } else {
                close $sock
                return -code error $err
            }
        } else {
            break
        }
    }

    #--------------------------------------
    #   initialize connection array
    #--------------------------------------
    upvar ::ldap::ldap$sock conn
    catch { unset conn }

583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
}


#------------------------------------------------------------------------------
#    starttls -  negotiate tls on an open ldap connection
#
#------------------------------------------------------------------------------
proc ldap::starttls {handle {cafile ""} {certfile ""} {keyfile ""} \
                     {verify_cert ""} {sni_servername ""}} {
    variable tlsProtocols
    variable curTLSOptions
    variable TLSMode

    CheckHandle $handle

    upvar #0 $handle conn

    #------------------------------------------------------------------
    #   set options
    #------------------------------------------------------------------

    if {$TLSMode eq "compatible"} then {
	#
	# Compatible with old mode. Build a TLS socket with appropriate
	# parameters, without changing any other parameter which may
	# have been set by a previous call to tls::init (as specified
	# in the ldap.tcl manpage).
	#
	if {$verify_cert eq ""} then {
	    set verify_cert 1
	}
	set cmd [list tls::import $conn(sock) \
		     -cafile $cafile -certfile $certfile -keyfile $keyfile \
		     -request 1 -server 0 -require $verify_cert \
		     -ssl2 no -ssl3 no ]
	if {$sni_servername ne ""} {
	    lappend cmd -servername $sni_servername
	}

	# The valid ones depend on the server and openssl version,
	# tls::ciphers all tells it in the error message, but offers no
	# nice introspection.
	foreach {proto active} $tlsProtocols {
	    lappend cmd $proto $active
	}
    } else {
	#
	# New, integrated mode. Use only parameters set with
	# ldap::tlsoptions to build the socket.
	#

	if {$cafile ne "" || $certfile ne "" || $keyfile ne "" ||
		$verify_cert ne "" || $sni_servername ne ""} then {
	    return -code error "cafile/certfile/keyfile/verify_cert/sni_servername: incompatible with the use of tlsoptions"
	}

	set cmd [list tls::import $conn(sock) {*}[array get curTLSOptions]]
    }

    #------------------------------------------------------------------
    #   check handle
    #------------------------------------------------------------------

    if {$conn(tls)} {
        return -code error \
            "Cannot StartTLS on connection, TLS already running"
    }

    if {[ldap::waitingForMessages $handle]} {
        return -code error \







|
<
<
<
<
<




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







454
455
456
457
458
459
460
461





462
463
464
465














































466
467
468
469
470
471
472
}


#------------------------------------------------------------------------------
#    starttls -  negotiate tls on an open ldap connection
#
#------------------------------------------------------------------------------
proc ldap::starttls {handle {cafile ""} {certfile ""} {keyfile ""}} {





    CheckHandle $handle

    upvar #0 $handle conn















































    if {$conn(tls)} {
        return -code error \
            "Cannot StartTLS on connection, TLS already running"
    }

    if {[ldap::waitingForMessages $handle]} {
        return -code error \
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
    }
    if {$oid ne "1.3.6.1.4.1.1466.20037"} {
        set conn(tlsHandshakeInProgress) 0
        return -code error \
            "Unexpected LDAP response"
    }

    # Initiate the TLS socket setup

    eval $cmd

    set retry 0
    while {1} {
        if {$retry > 20} {
            close $sock
            return -code error "too long retry to setup SSL connection"
        }
        if {[catch { tls::handshake $conn(sock) } err]} {







<
|
<
|







513
514
515
516
517
518
519

520

521
522
523
524
525
526
527
528
    }
    if {$oid ne "1.3.6.1.4.1.1466.20037"} {
        set conn(tlsHandshakeInProgress) 0
        return -code error \
            "Unexpected LDAP response"
    }


    tls::import $conn(sock) -cafile $cafile -certfile $certfile -keyfile $keyfile \

                      -request 1 -server 0 -require 0 -ssl2 no -ssl3 yes -tls1 yes
    set retry 0
    while {1} {
        if {$retry > 20} {
            close $sock
            return -code error "too long retry to setup SSL connection"
        }
        if {[catch { tls::handshake $conn(sock) } err]} {
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943

944
945
946
947
948
949
950
                    CleanupWaitingMessages $handle
                    set conn(lastError) [format "Expected SEQUENCE (0x30) but got %x" $type]
                    return
                } else {
                    set conn(pdu,partial) 1
                    append conn(pdu,received) $type
                }
	    }
	    partial {
		# See ticket https://core.tcl.tk/tcllib/tktview/c247ed5db42e373470bf8a6302717e76eb3c6106
		return
	    }
	    eof {
                CleanupWaitingMessages $handle
                set conn(lastError) "Server closed connection"
                catch {close $conn(sock)}
                return
            }
            default {
                CleanupWaitingMessages $handle
                set bytes $type[read $conn(sock)]
                binary scan $bytes h* values
                set conn(lastError) [format \
					 "Error reading SEQUENCE response for handle %s : %s : %s" $handle $code $values]
                return
	    }
        }
    }


    # fetch the length
    if {[::info exists conn(pdu,length)] && $conn(pdu,length) >= 0} {
        # we already have a decoded length
    } else {
        if {[::info exists conn(pdu,length)] && $conn(pdu,length) < 0} {
            # we already know the length, but have not received enough bytes to decode it







|
<
<
<
<
|










|

|


>







734
735
736
737
738
739
740
741




742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
                    CleanupWaitingMessages $handle
                    set conn(lastError) [format "Expected SEQUENCE (0x30) but got %x" $type]
                    return
                } else {
                    set conn(pdu,partial) 1
                    append conn(pdu,received) $type
                }
                }




            eof {
                CleanupWaitingMessages $handle
                set conn(lastError) "Server closed connection"
                catch {close $conn(sock)}
                return
            }
            default {
                CleanupWaitingMessages $handle
                set bytes $type[read $conn(sock)]
                binary scan $bytes h* values
                set conn(lastError) [format \
                    "Error reading SEQUENCE response for handle %s : %s : %s" $handle $code $values]
                return
                }
        }
    }


    # fetch the length
    if {[::info exists conn(pdu,length)] && $conn(pdu,length) >= 0} {
        # we already have a decoded length
    } else {
        if {[::info exists conn(pdu,length)] && $conn(pdu,length) < 0} {
            # we already know the length, but have not received enough bytes to decode it

Changes to modules/ldap/ldap.test.

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
# ldap.test - Copyright (C) 2006 Michael Schlenker <mic42@user.sourceforge.net>
#
# Tests for the Tcllib ldap package
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0

testing {
    useLocal ldap.tcl    ldap
    use      asn/asn.tcl asn
}


namespace import ::asn::*

# -------------------------------------------------------------------------
# Tests








>







|



|
|







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
# ldap.test - Copyright (C) 2006 Michael Schlenker <mic42@user.sourceforge.net>
#
# Tests for the Tcllib ldap package
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# RCS: @(#) $Id: ldap.test,v 1.5 2008/07/20 19:50:55 mic42 Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

testing {
    useLocal ldap.tcl ldap
    useLocal ../asn/asn.tcl asn
}


namespace import ::asn::*

# -------------------------------------------------------------------------
# Tests
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
	{ldap::connect} {host ?port?} 0]

test ldap-13.0 {check wrong num args for ldap::secure_connect
} -body {
   ldap::secure_connect
} -returnCodes {error} \
  -result [tcltest::wrongNumArgs \
	{ldap::secure_connect} {host ?port? ?verify_cert? ?sni_servername?} 0]

test ldap-14.0 {check wrong num args for ldap::starttls
} -body {
   ldap::starttls
} -returnCodes {error} \
  -result [tcltest::wrongNumArgs {ldap::starttls} \
	{handle ?cafile? ?certfile? ?keyfile? ?verify_cert? ?sni_servername?} 0]

test ldap-15.0 {check wrong num args for ldap::bindSASL
} -body {
   ldap::bindSASL
} -returnCodes {error} \
  -result  [tcltest::wrongNumArgs {ldap::bindSASL} {handle ?name? ?password?} 0]








|






|







151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
	{ldap::connect} {host ?port?} 0]

test ldap-13.0 {check wrong num args for ldap::secure_connect
} -body {
   ldap::secure_connect
} -returnCodes {error} \
  -result [tcltest::wrongNumArgs \
	{ldap::secure_connect} {host ?port?} 0]

test ldap-14.0 {check wrong num args for ldap::starttls
} -body {
   ldap::starttls
} -returnCodes {error} \
  -result [tcltest::wrongNumArgs {ldap::starttls} \
	{handle ?cafile? ?certfile? ?keyfile?} 0]

test ldap-15.0 {check wrong num args for ldap::bindSASL
} -body {
   ldap::bindSASL
} -returnCodes {error} \
  -result  [tcltest::wrongNumArgs {ldap::bindSASL} {handle ?name? ?password?} 0]

251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271

test ldap-28.0 {check wrong num args for ldap::disconnect
} -body {
   ldap::disconnect
} -returnCodes {error} \
  -result [tcltest::wrongNumArgs {ldap::disconnect} \
	{handle} 0 ]

test ldap-29.0 {check invalid TLS option
} -body {
    ldap::tlsoptions -foo bar
} -returnCodes {error} \
    -result {invalid TLS option '-foo'}

# -------------------------------------------------------------------------
# Handling of string representation of filters (RFC 4515):
# -------------------------------------------------------------------------

proc glue args {
    join $args ""
}







<
<
<
<
<
<
<







252
253
254
255
256
257
258







259
260
261
262
263
264
265

test ldap-28.0 {check wrong num args for ldap::disconnect
} -body {
   ldap::disconnect
} -returnCodes {error} \
  -result [tcltest::wrongNumArgs {ldap::disconnect} \
	{handle} 0 ]







# -------------------------------------------------------------------------
# Handling of string representation of filters (RFC 4515):
# -------------------------------------------------------------------------

proc glue args {
    join $args ""
}

Changes to modules/ldap/ldapx.man.

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
[vset VERSION 1.2]
[comment {-*- tcl -*- doctools manpage}]
[comment {$Id: ldapx.man,v 1.14 2009/01/29 06:16:19 andreas_kupries Exp $}]
[manpage_begin ldapx n [vset VERSION]]
[keywords {directory access}]
[keywords internet]
[keywords ldap]
[keywords {ldap client}]
[keywords ldif]
[keywords protocol]
[keywords {rfc 2251}]
[keywords {rfc 2849}]
[copyright {2006-2018 Pierre David <pdav@users.sourceforge.net>}]
[moddesc   {LDAP extended object interface}]
[titledesc {LDAP extended object interface}]
[category  Networking]
[require Tcl 8.5]
[require ldapx [opt [vset VERSION]]]
[description]
[para]

The [package ldapx] package provides an extended Tcl interface to
LDAP directores and LDIF files. The [package ldapx] package is built
upon the [package ldap] package in order to get low level LDAP access.

<


|








|



|
|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

[comment {-*- tcl -*- doctools manpage}]
[comment {$Id: ldapx.man,v 1.14 2009/01/29 06:16:19 andreas_kupries Exp $}]
[manpage_begin ldapx n 0.2.5]
[keywords {directory access}]
[keywords internet]
[keywords ldap]
[keywords {ldap client}]
[keywords ldif]
[keywords protocol]
[keywords {rfc 2251}]
[keywords {rfc 2849}]
[copyright {2006 Pierre David <pdav@users.sourceforge.net>}]
[moddesc   {LDAP extended object interface}]
[titledesc {LDAP extended object interface}]
[category  Networking]
[require Tcl 8.4]
[require ldapx [opt 1.0]]
[description]
[para]

The [package ldapx] package provides an extended Tcl interface to
LDAP directores and LDIF files. The [package ldapx] package is built
upon the [package ldap] package in order to get low level LDAP access.

404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
	modified in nearly all methods). The [method error] method
	may be used to fetch this message.

[list_end]

[subsection {Ldap Options}]

Options are configured on [class ldap] instances using the [cmd configure]
method.

[para]

The first option is used for TLS parameters:

[list_begin options]
    [opt_def -tlsoptions [arg list]]

	Specify the set of TLS options to use when connecting to the
	LDAP server (see the [cmd connect] method). For the list of
	valid options, see the [package LDAP] package documentation.
	[para]
	The default is [const {-request 1 -require 1 -ssl2 no -ssl3 no -tls1 yes -tls1.1 yes -tls1.2 yes}].
	[para]
	Example:
	[para]
[example {$l configure -tlsoptions {-request yes -require yes}}]
[list_end]

A set of options of the [class ldap] class is used during
search operations (methods [method traverse], [method search] and
[method read], see below).

[list_begin options]

    [opt_def -scope [const base]|[const one]|[const sub]]








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|







403
404
405
406
407
408
409





















410
411
412
413
414
415
416
417
	modified in nearly all methods). The [method error] method
	may be used to fetch this message.

[list_end]

[subsection {Ldap Options}]






















A first set of options of the [class ldap] class is used during
search operations (methods [method traverse], [method search] and
[method read], see below).

[list_begin options]

    [opt_def -scope [const base]|[const one]|[const sub]]

501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
	[para]

	Default is {{.*} {}}, meaning: all attributes are converted,
	without exception.

[list_end]


[subsection {Ldap Methods}]

[list_begin definitions]
    [call [arg la] [method error] [opt [arg newmsg]]]

	This method returns the error message that occurred in the
	last call to a [class ldap] class method. If the optional
	argument [arg newmsg] is supplied, it becomes the last
	error message.

    [call [arg la] [method connect] [arg url] [opt [arg binddn]] [opt [arg bindpw]] [opt [arg starttls]]]

	This method connects to the LDAP server using given URL
	(which can be of the form [uri ldap://host:port] or
	[uri ldaps://host:port]). If an optional [arg binddn]
	argument is given together with the [arg bindpw] argument,
	the [method connect] binds to the LDAP server using the
	specified DN and password.

	[para]

	If the [arg starttls] argument is given a true value ([const 1],
	[const yes], etc.) and the URL uses the [uri ldap://] scheme,
	a TLS negotiation is initiated with the newly created connection,
	before LDAP binding.

	Default value: [const no].

	[para]

	This method returns 1 if connection was successful, or 0 if an
	error occurred (use the [cmd error] method to get the message).

    [call [arg la] [method disconnect]]

	This method disconnects (and unbinds, if necessary) from
	the LDAP server.

    [call [arg la] [method traverse] [arg base] [arg filter] [arg attrs] [arg entry] [arg body]]








<










|








<
<
<
<
<
<
<
<
<
<
<
<
<
<







479
480
481
482
483
484
485

486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504














505
506
507
508
509
510
511
	[para]

	Default is {{.*} {}}, meaning: all attributes are converted,
	without exception.

[list_end]


[subsection {Ldap Methods}]

[list_begin definitions]
    [call [arg la] [method error] [opt [arg newmsg]]]

	This method returns the error message that occurred in the
	last call to a [class ldap] class method. If the optional
	argument [arg newmsg] is supplied, it becomes the last
	error message.

    [call [arg la] [method connect] [arg url] [opt [arg binddn]] [opt [arg bindpw]]]

	This method connects to the LDAP server using given URL
	(which can be of the form [uri ldap://host:port] or
	[uri ldaps://host:port]). If an optional [arg binddn]
	argument is given together with the [arg bindpw] argument,
	the [method connect] binds to the LDAP server using the
	specified DN and password.















    [call [arg la] [method disconnect]]

	This method disconnects (and unbinds, if necessary) from
	the LDAP server.

    [call [arg la] [method traverse] [arg base] [arg filter] [arg attrs] [arg entry] [arg body]]

594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614

[subsection {Ldap Example}]

[example {
    package require ldapx

    #
    # Connects to the LDAP directory using StartTLS
    #

    ::ldapx::ldap create l
    l configure -tlsoptions {-cadir /etc/ssl/certs -request yes -require yes}
    set url "ldap://server.mycomp.com"
    if {! [l connect $url "cn=admin,o=mycomp" "mypasswd" yes]} then {
	puts stderr "error: [l error]"
	exit 1
    }

    #
    # Search all entries matching some criterion
    #







|



<

|







557
558
559
560
561
562
563
564
565
566
567

568
569
570
571
572
573
574
575
576

[subsection {Ldap Example}]

[example {
    package require ldapx

    #
    # Connects to the LDAP directory
    #

    ::ldapx::ldap create l

    set url "ldap://server.mycomp.com"
    if {! [l connect $url "cn=admin,o=mycomp" "mypasswd"]} then {
	puts stderr "error: [l error]"
	exit 1
    }

    #
    # Search all entries matching some criterion
    #
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
	c diff $e
	if {! [l commit c]} then {
	    puts stderr "error: [l error]"
	    exit 1
	}
	$e destroy
    }
    c destroy
    
    l disconnect
    l destroy
}]

[section {LDIF CLASS}]

[subsection {Ldif Instance Data}]







<
|







600
601
602
603
604
605
606

607
608
609
610
611
612
613
614
	c diff $e
	if {! [l commit c]} then {
	    puts stderr "error: [l error]"
	    exit 1
	}
	$e destroy
    }


    l disconnect
    l destroy
}]

[section {LDIF CLASS}]

[subsection {Ldif Instance Data}]
803
804
805
806
807
808
809
810
811
    liout destroy
    liin destroy
}]

[section References]

[vset CATEGORY ldap]
[include ../common-text/feedback.inc]
[manpage_end]







|

764
765
766
767
768
769
770
771
772
    liout destroy
    liin destroy
}]

[section References]

[vset CATEGORY ldap]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/ldap/ldapx.tcl.

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
#
# Extended object interface to entries in LDAP directories or LDIF files.
#
# (c) 2006-2018 Pierre David (pdagog@gmail.com)
#
# $Id: ldapx.tcl,v 1.12 2008/02/07 21:19:39 pdav Exp $
#
# History:
#   2006/08/08 : pda : design
#

package require Tcl 8.5
package require snit		;# tcllib
package require uri 1.1.5	;# tcllib
package require base64		;# tcllib
package require ldap 1.10	;# tcllib, low level code for LDAP directories

package provide ldapx 1.2

##############################################################################
# LDAPENTRY object type
##############################################################################

snit::type ::ldapx::entry {
    #########################################################################



|







|



|

|







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
#
# Extended object interface to entries in LDAP directories or LDIF files.
#
# (c) 2006 Pierre David (pdav@users.sourceforge.net)
#
# $Id: ldapx.tcl,v 1.12 2008/02/07 21:19:39 pdav Exp $
#
# History:
#   2006/08/08 : pda : design
#

package require Tcl 8.4
package require snit		;# tcllib
package require uri 1.1.5	;# tcllib
package require base64		;# tcllib
package require ldap 1.6	;# tcllib, low level code for LDAP directories

package provide ldapx 1.0

##############################################################################
# LDAPENTRY object type
##############################################################################

snit::type ::ldapx::entry {
    #########################################################################
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
			$self dn [$chg dn]
		    }
		}
		mod {
		    foreach submod [lindex $mod 1] {
			set subop [lindex $submod 0]
			set attr [lindex $submod 1]
			set vals [lindex $submod 2]
			switch -- $subop {
			    modadd {
				$self add $attr $vals
			    }
			    moddel {
				$self del $attr $vals
			    }







|







464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
			$self dn [$chg dn]
		    }
		}
		mod {
		    foreach submod [lindex $mod 1] {
			set subop [lindex $submod 0]
			set attr [lindex $submod 1]
			set vals [lindex $submod 2]		    
			switch -- $subop {
			    modadd {
				$self add $attr $vals
			    }
			    moddel {
				$self del $attr $vals
			    }
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862

    option -scope        -default "sub"
    option -derefaliases -default "never"
    option -sizelimit	 -default 0
    option -timelimit	 -default 0
    option -attrsonly	 -default 0

    option -tlsoptions  -default {}

    component translator
    delegate option -utf8 to translator

    #
    # Channel descriptor
    #








<
<







847
848
849
850
851
852
853


854
855
856
857
858
859
860

    option -scope        -default "sub"
    option -derefaliases -default "never"
    option -sizelimit	 -default 0
    option -timelimit	 -default 0
    option -attrsonly	 -default 0



    component translator
    delegate option -utf8 to translator

    #
    # Channel descriptor
    #

904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
	    set lastError $le
	}
	return $lastError
    }

    # Connect to the LDAP directory, and binds to it if needed

    method connect {url {binddn {}} {bindpw {}} {starttls no}} {

	array set comp [::uri::split $url "ldap"]

	if {! [::info exists comp(host)]} then {
	    $self error "Invalid host in URL '$url'"
	    return 0
	}

	# use ::ldap with integrated TLS mode
	::ldap::tlsoptions reset
	::ldap::tlsoptions {*}$options(-tlsoptions)

	set scheme $comp(scheme)
	if {! [::info exists connect_defaults($scheme)]} then {
	    $self error "Unrecognized URL '$url'"
	    return 0
	}

	set defport [lindex $connect_defaults($scheme) 0]
	set fct     [lindex $connect_defaults($scheme) 1]

	if {[string equal $comp(port) ""]} then {
	    set comp(port) $defport
	}

	if {[Check $selfns {set channel [$fct $comp(host) $comp(port)]}]} then {
	    return 0
	}

	if {$starttls && [string equal $scheme "ldap"]} then {
	    if {[Check $selfns {::ldap::starttls $channel}]} then {
		return 0
	    }
	}

	if {$binddn eq ""} then {
	    set bind 0
	} else {
	    set bind 1
	    if {[Check $selfns {::ldap::bind $channel $binddn $bindpw}]} then {
		return 0
	    }







|








<
<
<
<

















<
<
<
<
<
<







902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917




918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934






935
936
937
938
939
940
941
	    set lastError $le
	}
	return $lastError
    }

    # Connect to the LDAP directory, and binds to it if needed

    method connect {url {binddn {}} {bindpw {}}} {

	array set comp [::uri::split $url "ldap"]

	if {! [::info exists comp(host)]} then {
	    $self error "Invalid host in URL '$url'"
	    return 0
	}





	set scheme $comp(scheme)
	if {! [::info exists connect_defaults($scheme)]} then {
	    $self error "Unrecognized URL '$url'"
	    return 0
	}

	set defport [lindex $connect_defaults($scheme) 0]
	set fct     [lindex $connect_defaults($scheme) 1]

	if {[string equal $comp(port) ""]} then {
	    set comp(port) $defport
	}

	if {[Check $selfns {set channel [$fct $comp(host) $comp(port)]}]} then {
	    return 0
	}







	if {$binddn eq ""} then {
	    set bind 0
	} else {
	    set bind 1
	    if {[Check $selfns {::ldap::bind $channel $binddn $bindpw}]} then {
		return 0
	    }
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574

		if {[llength $result]} then {
		    break
		}

	    } elseif {[regexp {^[ \t]} $line]} then {
		#
		# Continuation line. Remove the continuation character.
		#

		append prev [string range $line 1 end]

	    } elseif {[regexp {^-$} $line]} then {
		#
		# Separation between individual modifications
		#

		if {! [FlushLine $selfns "" result prev msg]} then {







|


|







1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562

		if {[llength $result]} then {
		    break
		}

	    } elseif {[regexp {^[ \t]} $line]} then {
		#
		# Continuation line
		#

		append prev [string trim $line]

	    } elseif {[regexp {^-$} $line]} then {
		#
		# Separation between individual modifications
		#

		if {! [FlushLine $selfns "" result prev msg]} then {

Changes to modules/ldap/ldapx.test.

1
2
3
4
5
6
7
8
9


10

11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- tcl -*-
# ldapx.test:  tests for the ldapx module.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2006 by Pierre David <pdav@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------


source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

testing {
    useLocal ldapx.tcl ldapx
}

# -------------------------------------------------------------------------








|
>
>

>





|







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
# -*- tcl -*-
# ldapx.test:  tests for the ldapx module.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2006 by Pierre David <pdav@users.sourceforge.net>
# All rights reserved.
#
# $Id: ldapx.test,v 1.6 2007/08/19 20:20:43 pdav Exp $

# -------------------------------------------------------------------------


source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 1.0

testing {
    useLocal ldapx.tcl ldapx
}

# -------------------------------------------------------------------------
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
test ldapx-4.1 {ldapx::entry - deletion} {
    t1 destroy
    t2 destroy
    t3 destroy
} {}


# -------------------------------------------------------------------------

test ldax-d6c9cfba {ldapx continuation line handling} {
    ::ldapx::ldif create ldin
    ldin channel [open [asset d6c9cfba.ldif] r]
    ::ldapx::entry create entr

    ldin read entr
    set r [entr get1 files]

    entr destroy
    ldin destroy

    set r
} {aaaaaaabbbbbbbbb ccccccccccc  dddddddddddd}

# -------------------------------------------------------------------------

testsuiteCleanup







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

368
369
370
371
372
373
374


















375
test ldapx-4.1 {ldapx::entry - deletion} {
    t1 destroy
    t2 destroy
    t3 destroy
} {}




















testsuiteCleanup

Changes to modules/ldap/pkgIndex.tcl.

1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded ldap 1.9.2 [list source [file join $dir ldap.tcl]]

# the OO level wrapper for ldap
package ifneeded ldapx 1.1 [list source [file join $dir ldapx.tcl]]


|
|


|
1
2
3
4
5
6
7
# Tcl package index file, version 1.1

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded ldap 1.8 [list source [file join $dir ldap.tcl]]

# the OO level wrapper for ldap
package ifneeded ldapx 1.0 [list source [file join $dir ldapx.tcl]]

Deleted modules/ldap/test-assets/d6c9cfba.ldif.

1
2
3
4
5
6

dn: group #0
FILES: aaaaaaa
 bbbbbbbbb
  ccccccccccc
   dddddddddddd
<
<
<
<
<
<












Changes to modules/log/ChangeLog.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2018-02-20 Harald Oehlmann <oehhar@sourceforge.net>

	* log.tcl: [RFE 19607f927b]: Add command log::logsubst
	* log.man: to optimize expensive log message construction.
	* log.test: Bumped package version to 1.4

2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	*

2012-07-09  Andreas Kupries  <aku@hephaistos>

	* logger.tcl: [Bug 3541628]: Fixed creative writing issue in
	* logger.man: logger::init. Bumped package to version 0.9.3
	* pkgIndex.tcl: Whitespace cleanup in places.

<
<
<
<
<
<




|













1
2
3
4
5
6
7
8
9
10
11
12






2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2012-07-09  Andreas Kupries  <aku@hephaistos>

	* logger.tcl: [Bug 3541628]: Fixed creative writing issue in
	* logger.man: logger::init. Bumped package to version 0.9.3
	* pkgIndex.tcl: Whitespace cleanup in places.

Changes to modules/log/log.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[vset VERSION 1.4]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin log n [vset VERSION]]
[keywords log]
[keywords {log level}]
[keywords message]
[keywords {message level}]
[copyright {2001-2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Logging facility}]
[titledesc {Procedures to log messages of libraries and applications.}]
[category  {Programming tools}]
[require Tcl 8]
[require log [opt [vset VERSION]]]
[description]

[para]

The [package log] package provides commands that allow libraries and
applications to selectively log information about their internal
operation and state.
<

|









|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin log n 1.3]
[keywords log]
[keywords {log level}]
[keywords message]
[keywords {message level}]
[copyright {2001-2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Logging facility}]
[titledesc {Procedures to log messages of libraries and applications.}]
[category  {Programming tools}]
[require Tcl 8]
[require log [opt 1.3]]
[description]

[para]

The [package log] package provides commands that allow libraries and
applications to selectively log information about their internal
operation and state.
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
Compares two levels (including unique abbreviations) with respect to
their priority. This command can be used by the -command option of
lsort. The result is one of -1, 0 or 1 or an error. A result of -1
signals that level1 is of less priority than level2. 0 signals that
both levels have the same priority. 1 signals that level1 has higher
priority than level2.

[call [cmd ::log::lvSuppress] [arg level] "{[arg suppress] 1}"]

(Un)suppresses the output of messages having the specified
level. Unique abbreviations for the level are allowed here too.

[call [cmd ::log::lvSuppressLE] [arg level] "{[arg suppress] 1}"]

(Un)suppresses the output of messages having the specified level or
one of lesser priority. Unique abbreviations for the level are allowed
here too.

[call [cmd ::log::lvIsSuppressed] [arg level]]








|




|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
Compares two levels (including unique abbreviations) with respect to
their priority. This command can be used by the -command option of
lsort. The result is one of -1, 0 or 1 or an error. A result of -1
signals that level1 is of less priority than level2. 0 signals that
both levels have the same priority. 1 signals that level1 has higher
priority than level2.

[call [cmd ::log::lvSuppress] [arg level] "{[arg suppress] 1}"]]

(Un)suppresses the output of messages having the specified
level. Unique abbreviations for the level are allowed here too.

[call [cmd ::log::lvSuppressLE] [arg level] "{[arg suppress] 1}"]]

(Un)suppresses the output of messages having the specified level or
one of lesser priority. Unique abbreviations for the level are allowed
here too.

[call [cmd ::log::lvIsSuppressed] [arg level]]

221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246

[call [cmd ::log::loghex] [arg level] [arg text] [arg data]]

Like [cmd ::log::log], but assumes that [arg data] contains binary
data. It converts this into a mixed hex/ascii representation before
writing them to the log.

[call [cmd ::log::logsubst] [arg level] [arg msg]]

Like [cmd ::log::log], but [arg msg] may contain substitutions and variable references, which are evaluated in the caller scope first.
The purpose of this command is to avoid overhead in the non-logging case, if the log message building is expensive.
Any substitution errors raise an error in the command execution.

The following example shows an xml text representation, which is only generated in debug mode:

[example {
    log::logsubst debug {XML of node $node is '[$node toXml]'}
}]

[call [cmd ::log::logMsg] [arg text]]

Convenience wrapper around [cmd ::log::log].
Equivalent to [cmd "::log::log info text"].

[call [cmd ::log::logError] [arg text]]








<
<
<
<
<
<
<
<
<
<
<
<







220
221
222
223
224
225
226












227
228
229
230
231
232
233

[call [cmd ::log::loghex] [arg level] [arg text] [arg data]]

Like [cmd ::log::log], but assumes that [arg data] contains binary
data. It converts this into a mixed hex/ascii representation before
writing them to the log.













[call [cmd ::log::logMsg] [arg text]]

Convenience wrapper around [cmd ::log::log].
Equivalent to [cmd "::log::log info text"].

[call [cmd ::log::logError] [arg text]]

282
283
284
285
286
287
288
289
290

[emph Note] that by default all messages with levels [const warning] down to
[const debug] are suppressed. This is done intentionally, because (we believe
that) in most situations debugging output is not wanted. Most people wish to
have such output only when actually debugging an application.

[vset CATEGORY log]
[include ../common-text/feedback.inc]
[manpage_end]







|

269
270
271
272
273
274
275
276
277

[emph Note] that by default all messages with levels [const warning] down to
[const debug] are suppressed. This is done intentionally, because (we believe
that) in most situations debugging output is not wanted. Most people wish to
have such output only when actually debugging an application.

[vset CATEGORY log]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/log/log.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# log.tcl --
#
#	Tcl implementation of a general logging facility
#	(Reaped from Pool_Base and modified to fit into tcllib)
#
# Copyright (c) 2001 by ActiveState Tool Corp.
# See the file license.terms.

package require Tcl 8
package provide log 1.4

# ### ### ### ######### ######### #########

namespace eval ::log {
    namespace export levels lv2longform lv2color lv2priority 
    namespace export lv2cmd lv2channel lvCompare
    namespace export lvSuppress lvSuppressLE lvIsSuppressed









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# log.tcl --
#
#	Tcl implementation of a general logging facility
#	(Reaped from Pool_Base and modified to fit into tcllib)
#
# Copyright (c) 2001 by ActiveState Tool Corp.
# See the file license.terms.

package require Tcl 8
package provide log 1.3

# ### ### ### ######### ######### #########

namespace eval ::log {
    namespace export levels lv2longform lv2color lv2priority 
    namespace export lv2cmd lv2channel lvCompare
    namespace export lvSuppress lvSuppressLE lvIsSuppressed
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
# Results:
#	None.

proc ::log::logError {text} {
    log error $text
}

# log::logsubst --
#
#	Log a message with command and variable substitution in the caller
#	scope. The substitutions are only executed in the log case for
#	performance reasons. Any substitution errors rise a command error.
#
# Arguments:
#	level	The level of the message.
#	text	The message to log.
#
# Side Effects:
#	See above.
#
# Results:
#	None.

proc ::log::logsubst {level text} {
    variable cmdMap

    if {[lvIsSuppressed $level]} {
	# Ignore messages for suppressed levels.
	return
    }

    set level [lv2longform $level]

    set cmd $cmdMap($level)
    if {$cmd == {}} {
	# Ignore messages for levels without a command
	return
    }
    
    set text [uplevel 1 [list subst $text]]

    # Delegate actual logging to the command.
    # Handle multi-line messages correctly.

    foreach line [split $text \n] {
	eval [linsert $cmd end $level $line]
    }
    return
}

# log::Puts --
#
#	Standard log command, writing messages and levels to
#	user-specified channels. Assumes that the supression checks
#	were done by the caller. Expects full level names,
#	abbreviations are *not allowed*.







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







810
811
812
813
814
815
816










































817
818
819
820
821
822
823
# Results:
#	None.

proc ::log::logError {text} {
    log error $text
}












































# log::Puts --
#
#	Standard log command, writing messages and levels to
#	user-specified channels. Assumes that the supression checks
#	were done by the caller. Expects full level names,
#	abbreviations are *not allowed*.

Changes to modules/log/log.test.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# -*- tcl -*-
# Tests for the log facility
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2001 by ActiveState Tool Corp.
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# Tests for the log facility
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2001 by ActiveState Tool Corp.
# All rights reserved.
#
# RCS: @(#) $Id: log.test,v 1.10 2008/09/25 21:52:57 eee Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
test log-13.3 {log error} {
    if {![catch {::log::log e foobar} msg]} {
	error "e is an unique abbreviation of a level name"
    }
    set msg
} {bad level "e": must be alert, critical, debug, emergency, error, info, notice, or warning.}

test log-13.4 {logsubst variable} {
    set _log_ [list]
    set logdata buz
    ::log::logsubst er {logging<$logdata>}
    set _log_
} {error logging<buz>}

test log-13.5 {logsubst command} {
    set _log_ [list]
    set logdata buz
    ::log::logsubst er {logging<[set logdata]>}
    set _log_
} {error logging<buz>}

test log-13.6 {logsubst escape} {
    set _log_ [list]
    set logdata buz
    ::log::logsubst er {1\n2}
    set _log_
} {error 1 error 2}

test log-13.7 {logsubst list} {
    set _log_ [list]
    ::log::logsubst er {1 \{2}
    set _log_
} {error 1\ \{2}

test log-13.8 {logeval evaluation error} {
    set level [catch {::log::logsubst er {[error q]} } msg]
    list $level $msg
} {1 q}

test log-13.9 {logeval no var subst on no log} {
    set _log_ [list]
    set testvar 1
    trace add variable testvar read {lappend _log_}
    # This fires
    ::log::logsubst er {$testvar}
    # This does not fire
    lappend _log_ T1
    ::log::logsubst crit {$testvar}
    trace remove variable testvar read {lappend _log_}
    unset testvar
    set _log_
} {testvar {} read error 1 T1}

test log-13.10 {logeval no command subst on no log} {
    set mylog [list]
    # This fires
    ::log::logsubst er {<[lappend mylog Test1]>}
    # This does not fire
    ::log::logsubst crit {<[lappend mylog Test2]>}
    set mylog
} {Test1}

set lastlevel warning
foreach level {alert critical debug error emergency info notice warning} {
    test log-14.0.$level {log::Puts} {
	makeFile {} test.log
	::log::lvCmdForall ::log::Puts
	::log::lvSuppressLE emergency 0







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







360
361
362
363
364
365
366






















































367
368
369
370
371
372
373
test log-13.3 {log error} {
    if {![catch {::log::log e foobar} msg]} {
	error "e is an unique abbreviation of a level name"
    }
    set msg
} {bad level "e": must be alert, critical, debug, emergency, error, info, notice, or warning.}
























































set lastlevel warning
foreach level {alert critical debug error emergency info notice warning} {
    test log-14.0.$level {log::Puts} {
	makeFile {} test.log
	::log::lvCmdForall ::log::Puts
	::log::lvSuppressLE emergency 0
437
438
439
440
441
442
443
444
445
446
447
	set log [join [split [viewFile test.log] \n]]
	removeFile test.log
	list [string match *__data__* $log] [string match *__NOT__* $log]
    } {1 0}
}
::log::lvChannelForall {}

# -------------------------------------------------------------------------

testsuiteCleanup
return







<
<


385
386
387
388
389
390
391


392
393
	set log [join [split [viewFile test.log] \n]]
	removeFile test.log
	list [string match *__data__* $log] [string match *__NOT__* $log]
    } {1 0}
}
::log::lvChannelForall {}



testsuiteCleanup
return

Changes to modules/log/logger.man.

1
2


3
4
5
6
7
8
9
[vset VERSION 0.9.4]
[comment {-*- tcl -*- doctools manpage}]


[manpage_begin logger n [vset VERSION]]
[keywords log]
[keywords {log level}]
[keywords logger]
[keywords service]
[moddesc {Object Oriented logging facility}]
[titledesc {System to control logging of events.}]
<

>
>








1
2
3
4
5
6
7
8
9
10

[comment {-*- tcl -*- doctools manpage}]
[comment {$Id: logger.man,v 1.26 2012/07/10 03:34:47 andreas_kupries Exp $}]
[vset VERSION 0.9.4]
[manpage_begin logger n [vset VERSION]]
[keywords log]
[keywords {log level}]
[keywords logger]
[keywords service]
[moddesc {Object Oriented logging facility}]
[titledesc {System to control logging of events.}]
388
389
390
391
392
393
394
395
396

     # install as logproc
     ${log}::logproc debug log_local_var
     }
]

[vset CATEGORY logger]
[include ../common-text/feedback.inc]
[manpage_end]







|

389
390
391
392
393
394
395
396
397

     # install as logproc
     ${log}::logproc debug log_local_var
     }
]

[vset CATEGORY logger]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/log/logger.test.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# -*- tcl -*-
# Tests for the logger facility.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2002 by David N. Welton <davidw@dedasys.com>.
# Copyright (c) 2004,2005 by Michael Schlenker <mic42@users.sourceforge.net>.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# Tests for the logger facility.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2002 by David N. Welton <davidw@dedasys.com>.
# Copyright (c) 2004,2005 by Michael Schlenker <mic42@users.sourceforge.net>.
#
# $Id: logger.test,v 1.33 2011/12/21 21:28:50 mic42 Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

Changes to modules/log/loggerAppender.man.

1
2

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[vset VERSION 1.2]
[comment {-*- tcl -*- doctools manpage}]

[manpage_begin logger::appender n [vset VERSION]]
[keywords appender]
[keywords logger]
[copyright {2005 Aamer Akhter <aakhter@cisco.com>}]
[moddesc {Object Oriented logging facility}]
[titledesc {Collection of predefined appenders for logger}]
[category  {Programming tools}]
[require Tcl 8.2]
[require logger::appender [opt [vset VERSION]]]
[description]

This package provides a predefined set of logger templates.

[list_begin definitions]

[call [cmd ::logger::appender::console] \
<

>
|







|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

[comment {-*- tcl -*- doctools manpage}]
[comment {$Id: loggerAppender.man,v 1.6 2009/01/29 06:16:19 andreas_kupries Exp $}]
[manpage_begin logger::appender n 1.2]
[keywords appender]
[keywords logger]
[copyright {2005 Aamer Akhter <aakhter@cisco.com>}]
[moddesc {Object Oriented logging facility}]
[titledesc {Collection of predefined appenders for logger}]
[category  {Programming tools}]
[require Tcl 8.2]
[require logger::appender [opt 1.2]]
[description]

This package provides a predefined set of logger templates.

[list_begin definitions]

[call [cmd ::logger::appender::console] \
57
58
59
60
61
62
63
64
65

See [cmd ::logger::appender::colorConsole] for a description of the
applicable options.

[list_end]

[vset CATEGORY logger]
[include ../common-text/feedback.inc]
[manpage_end]







|

57
58
59
60
61
62
63
64
65

See [cmd ::logger::appender::colorConsole] for a description of the
applicable options.

[list_end]

[vset CATEGORY logger]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/log/loggerAppender.tcl.

1
2

3
4
5
6
7
8
9
##Library Header
#

# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::appender
#
# Purpose:
#	collection of appenders for tcllib logger


>







1
2
3
4
5
6
7
8
9
10
##Library Header
#
# $Id: loggerAppender.tcl,v 1.4 2007/02/08 22:09:54 mic42 Exp $
# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::appender
#
# Purpose:
#	collection of appenders for tcllib logger
68
69
70
71
72
73
74

75
76
77
78
79
80
81
	emergency red-bold
    }
}



##Procedure Header

# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::appender::console
#
# Purpose:
#	 







>







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
	emergency red-bold
    }
}



##Procedure Header
# $Id: loggerAppender.tcl,v 1.4 2007/02/08 22:09:54 mic42 Exp $
# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::appender::console
#
# Purpose:
#	 
170
171
172
173
174
175
176

177
178
179
180
181
182
183
    set myProcNameVar $procName
    return $procText
}



##Procedure Header

# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::appender::colorConsole
#
# Purpose:
#	 







>







172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
    set myProcNameVar $procName
    return $procText
}



##Procedure Header
# $Id: loggerAppender.tcl,v 1.4 2007/02/08 22:09:54 mic42 Exp $
# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::appender::colorConsole
#
# Purpose:
#	 
276
277
278
279
280
281
282

283
284
285
286
287
288
289
	      -category $service \
	      -priority $level ]
    set myProcNameVar $procName
    return $procText
}

##Procedure Header

# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#       ::logger::appender::fileAppend
#
# Purpose:
#







>







279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
	      -category $service \
	      -priority $level ]
    set myProcNameVar $procName
    return $procText
}

##Procedure Header
# $Id: loggerAppender.tcl,v 1.4 2007/02/08 22:09:54 mic42 Exp $
# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#       ::logger::appender::fileAppend
#
# Purpose:
#
387
388
389
390
391
392
393

394
395
396
397
398
399
400
    return $procText
}
  	 



##Internal Procedure Header

# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#       ::logger::appender::genProcName
#
# Purpose:
#        







>







391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
    return $procText
}
  	 



##Internal Procedure Header
# $Id: loggerAppender.tcl,v 1.4 2007/02/08 22:09:54 mic42 Exp $
# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#       ::logger::appender::genProcName
#
# Purpose:
#        

Changes to modules/log/loggerUtils.man.

1
2

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[vset VERSION 1.3.1]
[comment {-*- tcl -*- doctools manpage}]

[manpage_begin logger::utils n [vset VERSION]]
[keywords appender]
[keywords logger]
[copyright {2005 Aamer Akhter <aakhter@cisco.com>}]
[moddesc {Object Oriented logging facility}]
[titledesc {Utilities for logger}]
[category  {Programming tools}]
[require Tcl 8.4]
[require logger::utils [opt [vset VERSION]]]
[description]

This package adds template based [term appenders].

[list_begin definitions]

[call [cmd ::logger::utils::createFormatCmd] [arg formatString]]
<

>
|







|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

[comment {-*- tcl -*- doctools manpage}]
[comment {$Id: loggerUtils.man,v 1.7 2009/01/29 06:16:19 andreas_kupries Exp $}]
[manpage_begin logger::utils n 1.3]
[keywords appender]
[keywords logger]
[copyright {2005 Aamer Akhter <aakhter@cisco.com>}]
[moddesc {Object Oriented logging facility}]
[titledesc {Utilities for logger}]
[category  {Programming tools}]
[require Tcl 8.4]
[require logger::utils [opt 1.3]]
[description]

This package adds template based [term appenders].

[list_begin definitions]

[call [cmd ::logger::utils::createFormatCmd] [arg formatString]]
141
142
143
144
145
146
147
148
149
  logger::utils::applyAppender -appender console
  set log [logger::init applyAppender-3]
  ${log}::error "this is an error"
}]
[list_end]

[vset CATEGORY logger]
[include ../common-text/feedback.inc]
[manpage_end]







|

141
142
143
144
145
146
147
148
149
  logger::utils::applyAppender -appender console
  set log [logger::init applyAppender-3]
  ${log}::error "this is an error"
}]
[list_end]

[vset CATEGORY logger]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/log/loggerUtils.tcl.

1
2

3
4
5
6
7
8
9
##Library Header
#

# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::utils::
#
# Purpose:
#	an extension to the tcllib logger module


>







1
2
3
4
5
6
7
8
9
10
##Library Header
#
# $Id: loggerUtils.tcl,v 1.6 2007/03/20 16:22:16 andreas_kupries Exp $
# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::utils::
#
# Purpose:
#	an extension to the tcllib logger module
54
55
56
57
58
59
60

61
62
63
64
65
66
67
    logger::import -force -namespace log logger::utils

    # @mdgen OWNER: msgs/*.msg
    ::msgcat::mcload [file join $packageDir msgs]
}

##Internal Procedure Header

# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::utils::createFormatCmd
#
# Purpose:
#







>







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
    logger::import -force -namespace log logger::utils

    # @mdgen OWNER: msgs/*.msg
    ::msgcat::mcload [file join $packageDir msgs]
}

##Internal Procedure Header
# $Id: loggerUtils.tcl,v 1.6 2007/03/20 16:22:16 andreas_kupries Exp $
# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::utils::createFormatCmd
#
# Purpose:
#
158
159
160
161
162
163
164

165
166
167
168
169
170
171

    return $text
}



##Procedure Header

# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::utils::createLogProc
#
# Purpose:
#







>







160
161
162
163
164
165
166
167
168
169
170
171
172
173
174

    return $text
}



##Procedure Header
# $Id: loggerUtils.tcl,v 1.6 2007/03/20 16:22:16 andreas_kupries Exp $
# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::utils::createLogProc
#
# Purpose:
#
263
264
265
266
267
268
269
270
271
272
273
274
275

276
277
278
279
280
281
282
	}


	if {[regexp {%M} $text]} {
	    set methodText {
		if {[info level] < 2} {
		    set method "global"
		} elseif {[uplevel 1 {namespace which self}] == "::oo::Helpers::self"} {
		    set    method    [uplevel 1 {self class}]
		    append method :: [uplevel 1 {self method}]
		} else {
		    set method [lindex [info level -1] 0]
		}

	    }

	    regsub -all -- \
		{%M} \
		$text \
		{$method} \
		text







<
<
<



>







266
267
268
269
270
271
272



273
274
275
276
277
278
279
280
281
282
283
	}


	if {[regexp {%M} $text]} {
	    set methodText {
		if {[info level] < 2} {
		    set method "global"



		} else {
		    set method [lindex [info level -1] 0]
		}

	    }

	    regsub -all -- \
		{%M} \
		$text \
		{$method} \
		text
314
315
316
317
318
319
320

321
322
323
324
325
326
327

    set procText [subst $procText]
    return $procText
}


##Procedure Header

# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::utils::applyAppender
#
# Purpose:
#







>







315
316
317
318
319
320
321
322
323
324
325
326
327
328
329

    set procText [subst $procText]
    return $procText
}


##Procedure Header
# $Id: loggerUtils.tcl,v 1.6 2007/03/20 16:22:16 andreas_kupries Exp $
# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::utils::applyAppender
#
# Purpose:
#
448
449
450
451
452
453
454

455
456
457
458
459
460
461
	    ${srvCmd}::logproc $lvl $procName
	}
    }
}


##Internal Procedure Header

# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::utils::autoApplyAppender
#
# Purpose:
#







>







450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
	    ${srvCmd}::logproc $lvl $procName
	}
    }
}


##Internal Procedure Header
# $Id: loggerUtils.tcl,v 1.6 2007/03/20 16:22:16 andreas_kupries Exp $
# Copyright (c) 2005 Cisco Systems, Inc.
#
# Name:
#	::logger::utils::autoApplyAppender
#
# Purpose:
#
527
528
529
530
531
532
533
534
535
536
537
538
    }
    logger::utils::applyAppender -appender $appender -serviceCmd $log \
	-levels $levels -appenderArgs $appenderArgs
    return $log
}


package provide logger::utils 1.3.1

# ;;; Local Variables: ***
# ;;; mode: tcl ***
# ;;; End: ***







|




530
531
532
533
534
535
536
537
538
539
540
541
    }
    logger::utils::applyAppender -appender $appender -serviceCmd $log \
	-levels $levels -appenderArgs $appenderArgs
    return $log
}


package provide logger::utils 1.3

# ;;; Local Variables: ***
# ;;; mode: tcl ***
# ;;; End: ***

Changes to modules/log/loggerUtils.test.

1
2
3
4
5
6
7


8
9
10
11
12
13
14
# -*- tcl -*-
# Tests for the utilities to the logger facility.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2005 by Aamer Aahkter



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]








>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- tcl -*-
# Tests for the utilities to the logger facility.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2005 by Aamer Aahkter
#
# $Id: loggerUtils.test,v 1.7 2006/10/09 21:41:41 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119

120
121




122
123
124
125
126
127
128
129
130

131

132
133




134
135
136
137
138
139
140
141
142
143
144
145




146
147
148
149
150

151
152


153
154
155
156
157
158

159

160
161
162

163
164


165
166
167
168
169
170

171

172
173
174
175
176


177
178
179
180
181
182
183




184
185
186
187
188
189
190
191
192
193
    useLocal loggerUtils.tcl logger::utils
}

# -------------------------------------------------------------------------

logger::setlevel debug

proc msg {name {suffix {}}} {
    lappend map @ $name ! $suffix
    return [string map $map {\[[\d:\/ ]+\] \[@\] \[namespace\] \[error\] this is error!}]
}








# -------------------------------------------------------------------------

::tcltest::test createFormatCmd-1 {check for %d} -cleanup {

    unset a b


} -body {
    set a [logger::utils::createFormatCmd %d]
    set b [subst $::a]
    regexp {\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d} $b
} -result {1}

::tcltest::test createFormatCmd-2 {check for %P} -cleanup {

    unset a b


} -body {
    set a [logger::utils::createFormatCmd %P]
    set b [subst $a]


} -result [pid]

::tcltest::test createFormatCmd-3 {check for %H} -cleanup {

    unset a b


} -body {
    set a [logger::utils::createFormatCmd %H]
    set b [subst $a]


} -result [info hostname]

::tcltest::test createFormatCmd-4 {check for %c} -cleanup {

    unset a b


} -body {
    set a [logger::utils::createFormatCmd %c -category test::cat ] 
    set b [subst $a]


} -result test::cat

::tcltest::test createFormatCmd-5 {check for %C} -cleanup {

    unset a b


} -body {
    set a [logger::utils::createFormatCmd %C -category test::cat ] 
    set b [subst $a]


} -result test

::tcltest::test createFormatCmd-6 {check for %p} -cleanup {

    unset a b


} -body {
    set a [logger::utils::createFormatCmd %p -category test::cat -priority error] 
    set b [subst $a]


} -result error


::tcltest::test createLogProc-1 {create a proc and test it} -cleanup {
    rename ::bobo {}
    namespace delete ::loggerExtension::test



} -body {
    eval [logger::utils::createLogProc \
	      -category catTest \
	      -priority critical \
	      -procName ::bobo \
	      -conversionPattern {\[%d\] \[%c\] \[%M\] \[%p\] %m}]
    namespace eval ::loggerExtension::test {
	::bobo test
    }
}  -match regexp -output {\[[\d:\/ ]+\] \[catTest\] \[namespace\] \[critical\] test}


::tcltest::test createLogProc-2 {tkt e4d5ef01e7, %M OO context} -constraints tcl8.5plus -setup {
    package require TclOO
    ::oo::class create Main {
	variable log
	constructor {} {
	    set this_inst [namespace current]
	    set this_klaz [info object class $this_inst]
	    set log [::logger::init $this_klaz]
	    ::logger::utils::applyAppender \
		-appender "console" \
		-appenderArgs {-conversionPattern {%d \[%p\] \[%M\] %m}} \
		-serviceCmd $log
	}
	method invoke {} {
	    ${log}::info "hello"
	}
    }
    set main [Main new]
} -cleanup {
    $main destroy
    unset main
    Main destroy
} -body {
    $main invoke
} -match regexp -output {[\d:\/ ]+ \[info\] \[::Main::invoke\] hello}


::tcltest::test applyAppender-1 {apply an appender} -cleanup {




    ${log}::delete
    unset log
    namespace delete ::loggerExtension::test
} -body {
    set log [logger::init testLog]
    logger::utils::applyAppender -appender console -serviceCmd $log
    namespace eval ::loggerExtension::test {
	${::log}::error "this is error"
    }

} -match regexp -output [msg testLog]


::tcltest::test applyAppender-2 {apply an appender, to 2 loggers} -cleanup {




    ${log1}::delete
    ${log2}::delete
    unset log1
    unset log2
    namespace delete ::loggerExtension::test
} -body {
    set log1 [logger::init testLog1]
    set log2 [logger::init testLog2]
    logger::utils::applyAppender -appender console -serviceCmd [list $log1 $log2]
    namespace eval ::loggerExtension::test {
	${::log1}::error "this is error1"
	${::log2}::error "this is error2"




    }
} -match regexp -output [msg testLog1 1]\n[msg testLog2 2]

::tcltest::test applyAppender-3 {auto apply} -cleanup {
    ${log}::delete

    unset log
    namespace delete ::loggerExtension::test


} -body {
    logger::utils::applyAppender -appender console
    set log [logger::init applyAppender-3]
    namespace eval ::loggerExtension::test {
	${::log}::error "this is error"
    }

} -match regexp -output [msg applyAppender-3]


::tcltest::test applyAppender-4 {auto apply} -cleanup {
    ${log}::delete

    unset log
    namespace delete ::loggerExtension::test


} -body {
    logger::utils::applyAppender -appender colorConsole
    set log [logger::init applyAppender-4]
    namespace eval ::loggerExtension::test {
	${::log}::error "this is error"
    }

} -match regexp -output [msg applyAppender-4]


::tcltest::test applyAppender-5 {auto apply fileAppend} -cleanup {
    ${log}::delete
    unset log
    namespace delete ::loggerExtension::test


} -body {
    logger::utils::applyAppender \
	-appender fileAppend \
	-appenderArgs {-outputChannel stderr}
    set log [logger::init applyAppender-5]
    namespace eval ::loggerExtension::test {
	${::log}::error "this is error"




    }
} -match regexp -errorOutput [msg applyAppender-5]

# -------------------------------------------------------------------------

testsuiteCleanup
return
# ;;; Local Variables: ***
# ;;; mode: tcl ***
# ;;; End: ***







|
|
|
|
>
>
>
>
>
>
>

<

|
>
|
>
>
|

|

|

|
>
|
>
>
|


>
>
|

|
>
|
>
>
|


>
>
|

|
>
|
>
>
|


>
>
|

|
>
|
>
>
|


>
>
|

|
>
|
>
>
|


>
>
|

>
|
|
<
>
>
>
|
|
|
|
|
|
|
|
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
|
|
>

|
>
>
>
>


<
|


<
|
|
>
|
>

|
>
>
>
>




<
|



<
|
|
>
>
>
>
|
<

|
<
>
|
<
>
>
|


<
|
|
>
|
>

|
<
>
|
<
>
>
|


<
|
|
>
|
>

|
|
|
<
>
>
|

<
|

<
|
>
>
>
>
|
|
|
|


|



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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

119
120
121
122
123
124
125
126
127
128
129


130













131










132
133
134
135
136
137
138
139
140
141
142

143
144
145

146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

161
162
163
164

165
166
167
168
169
170
171

172
173

174
175

176
177
178
179
180

181
182
183
184
185
186
187

188
189

190
191
192
193
194

195
196
197
198
199
200
201
202
203

204
205
206
207

208
209

210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
    useLocal loggerUtils.tcl logger::utils
}

# -------------------------------------------------------------------------

logger::setlevel debug

# -------------------------------------------------------------------------

namespace eval ::loggerExtension::test {

    ::tcltest::test load {} -setup {
    } -constraints {
    } -cleanup {
    } -body {
    } -returnCodes {
        ok
    } -result {}



    ::tcltest::test createFormatCmd-1 {
    check for %d
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
    set a [logger::utils::createFormatCmd %d]
    set b [subst $a]
    regexp {\d\d\d\d/\d\d/\d\d \d\d:\d\d:\d\d} $b
    } -result {1}

    ::tcltest::test createFormatCmd-2 {
    check for %P
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
    set a [logger::utils::createFormatCmd %P]
    set b [subst $a]
    } -returnCodes {
        ok
    } -result [pid]

    ::tcltest::test createFormatCmd-3 {
    check for %H
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
    set a [logger::utils::createFormatCmd %H]
    set b [subst $a]
    } -returnCodes {
        ok
    } -result [info hostname]

    ::tcltest::test createFormatCmd-4 {
    check for %c
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
    set a [logger::utils::createFormatCmd %c -category test::cat ] 
    set b [subst $a]
    } -returnCodes {
        ok
    } -result test::cat

    ::tcltest::test createFormatCmd-5 {
    check for %C
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
    set a [logger::utils::createFormatCmd %C -category test::cat ] 
    set b [subst $a]
    } -returnCodes {
        ok
    } -result test

    ::tcltest::test createFormatCmd-6 {
    check for %p
    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
    set a [logger::utils::createFormatCmd %p -category test::cat -priority error] 
    set b [subst $a]
    } -returnCodes {
        ok
    } -result error


    ::tcltest::test createLogProc-1 {
    create a proc and test it

    } -setup {
    } -constraints {
    } -cleanup {
    } -body {
    set a [logger::utils::createLogProc \
           -category catTest \
           -priority critical \
           -procName ::bobo \
           -conversionPattern {\[%d\] \[%c\] \[%M\] \[%p\] %m}]
    eval $a
    ::bobo test


    } -returnCodes {ls
























    ok
    }  -match regexp \
    -output {\[[\d:\/ ]+\] \[catTest\] \[namespace\] \[critical\] test}

    ::tcltest::test applyAppender-1 {
    apply an appender 
    } -setup {
    } -constraints {
    } -cleanup {
    ${log}::delete
    unset log

    } -body {
    set log [logger::init testLog]
    logger::utils::applyAppender -appender console -serviceCmd $log

    ${log}::error "this is error"
    } -returnCodes {
        ok
    }  -match regexp \
    -output {\[[\d:\/ ]+\] \[testLog\] \[namespace\] \[error\] this is error}

    ::tcltest::test applyAppender-2 {
    apply an appender, to 2 loggers
    } -setup {
    } -constraints {
    } -cleanup {
    ${log1}::delete
    ${log2}::delete
    unset log1
    unset log2

    } -body {
    set log1 [logger::init testLog1]
    set log2 [logger::init testLog2]
    logger::utils::applyAppender -appender console -serviceCmd [list $log1 $log2]

    ${log1}::error "this is error1"
    ${log2}::error "this is error2"
    } -returnCodes {
        ok
    }  -match regexp \
    -output {\[[\d:\/ ]+\] \[testLog1\] \[namespace\] \[error\] this is error1\n\[[\d:\/ ]+\] \[testLog2\] \[namespace\] \[error\] this is error2}



    ::tcltest::test applyAppender-3 {

    auto apply
    } -setup {

    } -constraints {
    } -cleanup {
    } -body {
    logger::utils::applyAppender -appender console
    set log [logger::init applyAppender-3]

    ${log}::error "this is error"
    } -returnCodes {
        ok
    } -match regexp \
    -output {\[[\d:\/ ]+\] \[applyAppender-3\] \[namespace\] \[error\] this is error}

    ::tcltest::test applyAppender-4 {

    auto apply
    } -setup {

    } -constraints {
    } -cleanup {
    } -body {
    logger::utils::applyAppender -appender colorConsole
    set log [logger::init applyAppender-4]

    ${log}::error "this is error"
    } -returnCodes {
        ok
    } -match regexp \
    -output {\[[\d:\/ ]+\] \[applyAppender-4\] \[namespace\] \[error\] this is error}

    ::tcltest::test applyAppender-5 {
    auto apply fileAppend
    } -setup {

    } -constraints {
    } -cleanup {
    } -body {
    logger::utils::applyAppender \

        -appender fileAppend -appenderArgs {-outputChannel stderr}
    set log [logger::init applyAppender-5]

    ${log}::error "this is error"
    } -returnCodes {
    ok
    } -match regexp \
    -errorOutput {\[[\d:\/ ]+\] \[applyAppender-5\] \[namespace\] \[error\] this is error}
    

}


testsuiteCleanup

# ;;; Local Variables: ***
# ;;; mode: tcl ***
# ;;; End: ***

Changes to modules/log/logger_trace.test.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# -*- tcl -*-
# Tests for the logger facility.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2002 by David N. Welton <davidw@dedasys.com>.
# Copyright (c) 2004,2005 by Michael Schlenker <mic42@users.sourceforge.net>.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# Tests for the logger facility.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2002 by David N. Welton <davidw@dedasys.com>.
# Copyright (c) 2004,2005 by Michael Schlenker <mic42@users.sourceforge.net>.
#
# $Id: logger_trace.test,v 1.2 2006/10/09 21:41:41 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

Changes to modules/log/loggerperformance.

1
2
3


4
5
6
7
8
9
10
# -*- tcl -*-
# loggerperformance.tcl
#


# This code is for benchmarking the performance of the log tools.

set auto_path "[file dirname [info script]] $auto_path"
package require logger
package require log

# Set up logger


|
>
>







1
2
3
4
5
6
7
8
9
10
11
12
# -*- tcl -*-
# loggerperformance.tcl

# $Id: loggerperformance,v 1.2 2004/01/15 06:36:13 andreas_kupries Exp $

# This code is for benchmarking the performance of the log tools.

set auto_path "[file dirname [info script]] $auto_path"
package require logger
package require log

# Set up logger

Changes to modules/log/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
if {![package vsatisfies [package provide Tcl] 8]} {return}
package ifneeded log 1.4 [list source [file join $dir log.tcl]]

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded logger           0.9.4 [list source [file join $dir logger.tcl]]
package ifneeded logger::appender 1.3   [list source [file join $dir loggerAppender.tcl]]

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded logger::utils    1.3.1 [list source [file join $dir loggerUtils.tcl]]

|






|
1
2
3
4
5
6
7
8
9
if {![package vsatisfies [package provide Tcl] 8]} {return}
package ifneeded log 1.3 [list source [file join $dir log.tcl]]

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded logger           0.9.4 [list source [file join $dir logger.tcl]]
package ifneeded logger::appender 1.3   [list source [file join $dir loggerAppender.tcl]]

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded logger::utils    1.3   [list source [file join $dir loggerUtils.tcl]]

Changes to modules/mapproj/mapproj.tcl.

216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
    set e3 [expr {$delx * $dely * $delz}]
    return [expr {(1.0 + ($e2 / 24.0 - 0.1 - 3.0 * $e3 / 44.0) * $e2
		   + $e3 / 14.) / sqrt($mean)}]
}

# ::mapproj::toPlateCarree --
#
#	Project a latitude and longitude onto the plate carrée.
#
# Parameters:
#	phi_0 -- Latitude of the center of the sheet in degrees
#	lambda_0 -- Longitude of the center of sheet in degrees
#	lambda -- Longitude of the point to be projected in degrees
#	phi -- Latitude of the point to be projected in degrees
#







|







216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
    set e3 [expr {$delx * $dely * $delz}]
    return [expr {(1.0 + ($e2 / 24.0 - 0.1 - 3.0 * $e3 / 44.0) * $e2
		   + $e3 / 14.) / sqrt($mean)}]
}

# ::mapproj::toPlateCarree --
#
#	Project a latitude and longitude onto the plate carrée.
#
# Parameters:
#	phi_0 -- Latitude of the center of the sheet in degrees
#	lambda_0 -- Longitude of the center of sheet in degrees
#	lambda -- Longitude of the point to be projected in degrees
#	phi -- Latitude of the point to be projected in degrees
#
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
    set x [expr {$lambda * $degree}]
    set y [expr {($phi - $phi_0) * $degree}]
    return [list $x $y]
}

# ::mapproj::fromPlateCarree --
#
#	Solve a plate carrée projection for the
#	latitude and longitude represented by a point on the map.
#
# Parameters:
#	phi_0 -- Latitude of the center of the sheet in degrees
#	lambda_0 -- Longitude of the center of projection
#	x,y -- normalized x and y co-ordinates of a point on the map
#







|







242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
    set x [expr {$lambda * $degree}]
    set y [expr {($phi - $phi_0) * $degree}]
    return [list $x $y]
}

# ::mapproj::fromPlateCarree --
#
#	Solve a plate carrée projection for the
#	latitude and longitude represented by a point on the map.
#
# Parameters:
#	phi_0 -- Latitude of the center of the sheet in degrees
#	lambda_0 -- Longitude of the center of projection
#	x,y -- normalized x and y co-ordinates of a point on the map
#

Changes to modules/markdown/markdown.man.

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
[vset VERSION 1.2]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin markdown n [vset VERSION]]
[moddesc   {Markdown to HTML Converter}]
[titledesc {Converts Markdown text to HTML}]
[category  {Text processing}]
[require Tcl 8.5]
[require Markdown [vset VERSION]]
[require textutil [opt 0.8]]
[description]

The package [package Markdown] provides a command to convert
Markdown annotated text into HMTL.

[list_begin definitions]
[call [cmd ::Markdown::convert] [arg "markdown"]]

This command takes in a block of Markdown text, and returns a block
of HTML.

[para] The converter supports two types of syntax highlighting for
fenced code blocks: highlighting via a registered converter
(see [cmd ::Markdown::register]), or pure JavaScript highlighting,
e.g. via "highlight.js", where the language specifier used in the
markup is set as CSS class of the "code" element in the returned markup.

[call [cmd ::Markdown::register] [arg "langspec"] [arg "converter"]]

Register a language specific converter for prettifying a code block
(e.g. syntax highlighting).  Markdown supports fenced code blocks with
an optional language specifier (e.g. "tcl"). When the markdown parser
processes such a code block and a converter for the specified langspec
is registered, the converter is called with the raw code block as
argument. The converter is supposed to return the markup of the code
block as result. The specified converter can be an arbitrary Tcl
command, the raw text block is added as last argument upon invocation.

[call [cmd ::Markdown::get_lang_counter]]

Return a dict of language specifier and number of occurrences in
fenced code blocks. This function can be used e.g. to detect, whether
some CSS or JavaScript headers should be included for rendering
without the need of postprocessing the rendered result.

[call [cmd ::Markdown::reset_lang_counter]]

Reset the language counters.

[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]
<

|




<




|






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



|


1
2
3
4
5
6

7
8
9
10
11
12
13
14
15
16
17





























18
19
20
21
22

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin markdown n 1.0]
[moddesc   {Markdown to HTML Converter}]
[titledesc {Converts Markdown text to HTML}]
[category  {Text processing}]
[require Tcl 8.5]

[require textutil [opt 0.8]]
[description]

The package [package Markdown] provides a command to convert
Markdown annotated text into HMTL. 

[list_begin definitions]
[call [cmd ::Markdown::convert] [arg "markdown"]]

This command takes in a block of Markdown text, and returns a block
of HTML.





























[list_end]

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/markdown/markdown.tcl.

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
89
90
91
92
93
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#

package require Tcl 8.5
package require textutil::tabify

## \file
# \brief Functions for converting markdown to HTML.

##
# \brief Functions for converting markdown to HTML.
#
namespace eval Markdown {

    namespace export convert

    ##
    #
    # Converts text written in markdown to HTML.
    #
    # @param markdown  the text in markdown
    # @param tabs      whether to preserve tabs in markdown
    #
    # The output of this function is only a fragment, not a complete HTML
    # document. The format of the output is generic XHTML.
    #
    proc convert {markdown {tabs 0}} {
        set markdown [regsub -all {\r\n?} $markdown \n]
        if {!$tabs} {
	    set markdown [::textutil::tabify::untabify2 $markdown 4]
	}
        set markdown [string trimright $markdown]

        # COLLECT REFERENCES
        array unset ::Markdown::_references
        array set ::Markdown::_references [collect_references markdown]

        # PROCESS
        return [apply_templates markdown]
    }

    #
    # Register a language specific converter. This converter can be
    # used for fenced code blocks to transform the code block into a
    # prettified HTML.
    #
    proc register {lang_specifier converter {extended 0}} {
	set ::Markdown::converter($lang_specifier) [list $extended $converter]
    }

    #
    # Return a dict (attribute value pairs) of language specifiers and
    # the number of occurrences as they were used in fenced code blocks.
    #
    proc get_lang_counter {} {
	return [array get ::Markdown::lang_counter]
    }

    #
    # Reset the language counters of fenced code blocks.
    #
    proc reset_lang_counter {} {
	array unset ::Markdown::lang_counter
    }

    ## \private
    proc collect_references {markdown_var} {
        upvar $markdown_var markdown

        set lines [split $markdown \n]
        set no_lines [llength $lines]
        set index 0







<
|















|
<




|
|
<
|
<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







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
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#


package require textutil

## \file
# \brief Functions for converting markdown to HTML.

##
# \brief Functions for converting markdown to HTML.
#
namespace eval Markdown {

    namespace export convert

    ##
    #
    # Converts text written in markdown to HTML.
    #
    # @param markdown  currently takes as a single argument the text in markdown

    #
    # The output of this function is only a fragment, not a complete HTML
    # document. The format of the output is generic XHTML.
    #
    proc convert {markdown} {
        set markdown [regsub {\r\n?} $markdown {\n}]

        set markdown [::textutil::untabify2 $markdown 4]

        set markdown [string trimright $markdown]

        # COLLECT REFERENCES
        array unset ::Markdown::_references
        array set ::Markdown::_references [collect_references markdown]

        # PROCESS
        return [apply_templates markdown]
    }

























    ## \private
    proc collect_references {markdown_var} {
        upvar $markdown_var markdown

        set lines [split $markdown \n]
        set no_lines [llength $lines]
        set index 0
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
        set ul_match {^[ ]{0,3}(?:\*(?!\s*\*\s*\*\s*$)|-(?!\s*-\s*-\s*$)|\+) }
        set ol_match {^[ ]{0,3}\d+\. }

        # PROCESS MARKDOWN
        while {$index < $no_lines} {
            set line [lindex $lines $index]

            switch -regexp -matchvar line_match -- $line {
                {^\s*$} {
                    # EMPTY LINES
                    if {![regexp {^\s*$} [lindex $lines [expr $index - 1]]]} {
                        append result "\n\n"
                    }
                    incr index
                }







|







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
        set ul_match {^[ ]{0,3}(?:\*(?!\s*\*\s*\*\s*$)|-(?!\s*-\s*-\s*$)|\+) }
        set ol_match {^[ ]{0,3}\d+\. }

        # PROCESS MARKDOWN
        while {$index < $no_lines} {
            set line [lindex $lines $index]

            switch -regexp $line {
                {^\s*$} {
                    # EMPTY LINES
                    if {![regexp {^\s*$} [lindex $lines [expr $index - 1]]]} {
                        append result "\n\n"
                    }
                    incr index
                }
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

                    incr index
                }
                {^[ ]{0,3}-[ ]*-[ ]*-[- ]*$} -
                {^[ ]{0,3}_[ ]*_[ ]*_[_ ]*$} -
                {^[ ]{0,3}\*[ ]*\*[ ]*\*[\* ]*$} {
                    # HORIZONTAL RULES
                    append result "<hr />"
                    incr index
                }
                {^[ ]{0,3}#{1,6}} {
                    # ATX STYLE HEADINGS
                    set h_level 0
                    set h_result {}








|







133
134
135
136
137
138
139
140
141
142
143
144
145
146
147

                    incr index
                }
                {^[ ]{0,3}-[ ]*-[ ]*-[- ]*$} -
                {^[ ]{0,3}_[ ]*_[ ]*_[_ ]*$} -
                {^[ ]{0,3}\*[ ]*\*[ ]*\*[\* ]*$} {
                    # HORIZONTAL RULES
                    append result "<hr/>"
                    incr index
                }
                {^[ ]{0,3}#{1,6}} {
                    # ATX STYLE HEADINGS
                    set h_level 0
                    set h_result {}

253
254
255
256
257
258
259
260
261
262
263
264
265
266

267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334

                        if {$eoc} { break }

                        set line [lindex $lines $index]
                    }
                    set code_result [join $code_result \n]

                    append result <pre><code> $code_result </code></pre>
                }
                {^(?:(?:`{3,})|(?:~{3,}))(\{?\S+\}?)?\s*.*$} {
		    # orig:  {^(?:(?:`{3,})|(?:~{3,}))\{?(\S+)?\}?\s*$}

                    # FENCED CODE BLOCKS
                    set code_result {}

                    if {[string index $line 0] eq {`}} {
                        set end_match {^`{3,}\s*$}
                    } else {
                        set end_match {^~{3,}\s*$}
                    }
		    #
		    # A language specifier might be provided
		    # immediately after the leading delimiters.
		    #
		    #     ```tcl
		    #
		    # The language specifier is used for two purposes:
		    # a) As a CSS class name
		    #    (useful e.g. for highlight.js)
		    # b) As a name for a source code to HTML converter.
		    #    When such a converter is registered,
		    #    the codeblock will be sent through this converter.
		    #
		    set lang_specifier [string tolower [lindex $line_match 1]]
		    if {$lang_specifier ne ""} {
			set code_CCS_class " class='[html_escape $lang_specifier]'"
			incr ::Markdown::lang_counter($lang_specifier)
		    } else {
			set code_CCS_class ""
		    }

                    while {$index < $no_lines} {
                        incr index

                        set line [lindex $lines $index]

                        if {[regexp $end_match $line]} {
                            incr index
                            break
                        }

                        lappend code_result [html_escape $line]
                    }
                    set code_result [join $code_result \n]

		    #
		    # If there is a converter registered, apply it on
		    # the resulting snippet.
		    #
		    if {[info exists ::Markdown::converter($lang_specifier)]} {
			lassign $::Markdown::converter($lang_specifier) extended converter

			set cmd $converter
			if {$extended} { lappend cmd [lrange [lindex $line_match 0] 1 end] }
			lappend cmd $code_result
			set code_result [uplevel #0 $cmd]
		    } else {
                        set code_result [html_escape $code_result]
		    }
                    append result \
			"<pre class='code'>" \
			<code$code_CCS_class> \
			$code_result \
			</code></pre>
                }

                {^[ ]{0,3}(?:\*|-|\+) |^[ ]{0,3}\d+\. } {
                    # LISTS
                    set list_result {}

                    # continue matching same list type
                    if {[regexp $ol_match $line]} {
                        set list_type ol







|

|
<
<


>





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<















<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<

<







225
226
227
228
229
230
231
232
233
234


235
236
237
238
239
240
241
242




















243
244
245
246
247
248
249
250
251
252
253
254
255
256
257














258




259

260
261
262
263
264
265
266

                        if {$eoc} { break }

                        set line [lindex $lines $index]
                    }
                    set code_result [join $code_result \n]

                    append result <pre><code> $code_result \n </code></pre>
                }
                {^(?:(?:`{3,})|(?:~{3,}))(?:\{?\S+\}?)?\s*$} {


                    # FENCED CODE BLOCKS
                    set code_result {}

                    if {[string index $line 0] eq {`}} {
                        set end_match {^`{3,}\s*$}
                    } else {
                        set end_match {^~{3,}\s*$}
                    }





















                    while {$index < $no_lines} {
                        incr index

                        set line [lindex $lines $index]

                        if {[regexp $end_match $line]} {
                            incr index
                            break
                        }

                        lappend code_result [html_escape $line]
                    }
                    set code_result [join $code_result \n]















                    append result <pre><code> $code_result </code></pre>




                }

                {^[ ]{0,3}(?:\*|-|\+) |^[ ]{0,3}\d+\. } {
                    # LISTS
                    set list_result {}

                    # continue matching same list type
                    if {[regexp $ol_match $line]} {
                        set list_type ol
412
413
414
415
416
417
418
419
420

421
422
423

424



425
426
427
428
429
430

431


432

433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462

                    append result <$list_type>\n \
                                    [join $list_result \n] \
                                </$list_type>\n\n
                }
                {^<(?:p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)} {
                    # HTML BLOCKS
                    set block_tag [string range $line_match 1 end]
                    set re_htmltag {<(/?)(\w+)(?:\s+\w+=(?:\"[^\"]+\"|'[^']+'))*\s*>}


                    set block_lines 0
                    set buffer {}

                    while {$index < $no_lines} {



                        append buffer $line \n

                        incr block_lines
                        incr index

                        set tags [regexp -inline -all $re_htmltag $buffer]




                        set stack_count 0

                        foreach {match type name} $tags {
                            if {$name eq $block_tag} {
                                if {$type eq {}} {
                                    incr stack_count +1
                                } else {
                                    incr stack_count -1
                                }
                            }
                        }

                        if {$stack_count == 0} break

                        set line [lindex $lines $index]
                    }

                    # Skip empty lines after the block.
                    while {$index < $no_lines
                           && [regexp {^\s*$} [lindex $lines $index]]} {
                        incr index
                    }

                    if {$index < $no_lines} {
                        append buffer \n
                    }

                    append result $buffer
                }
                {(?:^\s{0,3}|[^\\]+)\|} {
                    # SIMPLE TABLES
                    set cell_align {}







<

>

|
<
>
|
>
>
>
|

|
|
|
|
>
|
>
>

>

<
|
|
|
|
|
|
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<







344
345
346
347
348
349
350

351
352
353
354

355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372

373
374
375
376
377
378
379

380












381
382
383
384
385
386
387

                    append result <$list_type>\n \
                                    [join $list_result \n] \
                                </$list_type>\n\n
                }
                {^<(?:p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)} {
                    # HTML BLOCKS

                    set re_htmltag {<(/?)(\w+)(?:\s+\w+=(?:\"[^\"]+\"|'[^']+'))*\s*>}
                    set buffer {}

                    while {$index < $no_lines} \

                    {
                        while {$index < $no_lines} \
                        {
                            incr index

                            append buffer $line \n

                            if {[is_empty_line $line]} {
                                break
                            }

                            set line [lindex $lines $index]
                        }

                        set tags [regexp -inline -all $re_htmltag  $buffer]
                        set stack_count 0

                        foreach {match type name} $tags {

                            if {$type eq {}} {
                                incr stack_count +1
                            } else {
                                incr stack_count -1
                            }
                        }


                        if {$stack_count == 0} { break }












                    }

                    append result $buffer
                }
                {(?:^\s{0,3}|[^\\]+)\|} {
                    # SIMPLE TABLES
                    set cell_align {}
822
823
824
825
826
827
828
829
830

    ## \private
    proc html_escape {text} {
        return [string map {& &amp; < &lt; > &gt; \" &quot;} $text]
    }
}

package provide Markdown 1.2
return







|
|
747
748
749
750
751
752
753
754
755

    ## \private
    proc html_escape {text} {
        return [string map {& &amp; < &lt; > &gt; \" &quot;} $text]
    }
}

package provide Markdown 1.0

Changes to modules/markdown/markdown.test.

1
2
3
4
5
6
7
8
# -*- tcl -*-
# tool.test - Copyright (c) 2016 Sean Woods, Will DuQuette, Caius Project
# -------------------------------------------------------------------------
#-------------------------------------------------------------------------
# TITLE:
#    markdown.test
#
# PROJECT:
<








1
2
3
4
5
6
7

# tool.test - Copyright (c) 2016 Sean Woods, Will DuQuette, Caius Project
# -------------------------------------------------------------------------
#-------------------------------------------------------------------------
# TITLE:
#    markdown.test
#
# PROJECT:
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
89
90
91
92
93
94
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2

support {
    use textutil/string.tcl   textutil::string
    use textutil/repeat.tcl   textutil::repeat
    use textutil/tabify.tcl   textutil::tabify
}
testing {
    useLocal markdown.tcl Markdown
}

#-------------------------------------------------------------------------
# Setup

tcltest::testConstraint knownbug 0


# outdent text
#
# text   - A multi-line text string
#
# This command outdents a multi-line text string to the left margin.

proc outdent {text} {
    # FIRST, remove any leading blank lines
    regsub {\A(\s*\n)} $text "" text

    # NEXT, remove any trailing whitespace
    set text [string trimright $text]

    # NEXT, get the length of the leader on the first line.
    if {[regexp {\A(\s*)\S} $text dummy leader]} {

        # Remove the leader from the beginning of each indented
        # line, and update the string.
        regsub -all -line "^$leader" $text "" text
    }

    return $text
}

proc unindent text {
    set chars { }
    set max inf

    regsub ^\n $text {} text
    regsub \n\[$chars\]*?$ $text {} text

    set rLeading ^\[$chars\]*
    set rBlankLine $rLeading$

    foreach line [split $text \n] {
        if {$line eq {} || [regexp $rBlankLine $line]} continue

        regexp -indices $rLeading $line idc
        set count [expr {[lindex $idc 1] + 1}]

        set max [expr {$max > $count ? $count : $max}]
    }

    set start [expr { $max == inf ? {end+1} : $max }]

    # Removed lmap (8.6+)
    set r {}
    foreach line [split $text \n] {
	lappend r [string range $line $start end]
    }
    join $r \n
}

proc cmp {s1 s2} {
    set s1 [string trim $s1]
    set s2 [string trim $s2]

    return [expr {$s1 eq $s2}]
}







|
<
|









>














|










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







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
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2

support {


    use textutil/textutil.tcl textutil
}
testing {
    useLocal markdown.tcl Markdown
}

#-------------------------------------------------------------------------
# Setup

tcltest::testConstraint knownbug 0


# outdent text
#
# text   - A multi-line text string
#
# This command outdents a multi-line text string to the left margin.

proc outdent {text} {
    # FIRST, remove any leading blank lines
    regsub {\A(\s*\n)} $text "" text

    # NEXT, remove any trailing whitespace
    set text [string trimright $text]

    # NEXT, get the length of the leading on the first line.
    if {[regexp {\A(\s*)\S} $text dummy leader]} {

        # Remove the leader from the beginning of each indented
        # line, and update the string.
        regsub -all -line "^$leader" $text "" text
    }

    return $text
}






























proc cmp {s1 s2} {
    set s1 [string trim $s1]
    set s2 [string trim $s2]

    return [expr {$s1 eq $s2}]
}
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
}

# convert in
#
# in - markdown input, possibly indented.
#
# Outdents the input and converts it to HTML.  Indents it for inclusion
# in a result. Empty lines are kept empty.
proc convert {in} {
    set lines [split [string trim [Markdown::convert [outdent $in]]] \n]

    set out [string map [list "\n    \n" "\n\n"] [join $lines "\n    "]]
    return "\n    $out\n"
}

#=========================================================================
# Tcl-markdown tests

#-------------------------------------------------------------------------
# Conversion tests

test basic-1.1 {basic text} -body {
    convert {
        A line of text.

        Another line of text.
    }
} -result {
    <p>A line of text.</p>

    <p>Another line of text.</p>
}

test basic-1.2 {multi-line paragraphs} -body {
    convert {
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
        eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
        enim ad minim veniam, quis nostrud exercitation ullamco laboris
        nisi ut aliquip ex ea commodo consequat.

        Duis aute irure dolor in reprehenderit in voluptate velit esse
        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
        cupidatat non proident, sunt in culpa qui officia deserunt mollit
        anim id est laborum.
    }
} -result {
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
    enim ad minim veniam, quis nostrud exercitation ullamco laboris
    nisi ut aliquip ex ea commodo consequat.</p>

    <p>Duis aute irure dolor in reprehenderit in voluptate velit esse
    cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
    cupidatat non proident, sunt in culpa qui officia deserunt mollit
    anim id est laborum.</p>
}

test bquote-1.1 {simple blockquote} -body {
    convert {
        >
        > A line of text.







|



|

















|








|

|
|
|







|
|
|
|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
}

# convert in
#
# in - markdown input, possibly indented.
#
# Outdents the input and converts it to HTML.  Indents it for inclusion
# in a result.
proc convert {in} {
    set lines [split [string trim [Markdown::convert [outdent $in]]] \n]

    set out [join $lines "\n    "]
    return "\n    $out\n"
}

#=========================================================================
# Tcl-markdown tests

#-------------------------------------------------------------------------
# Conversion tests

test basic-1.1 {basic text} -body {
    convert {
        A line of text.

        Another line of text.
    }
} -result {
    <p>A line of text.</p>
    
    <p>Another line of text.</p>
}

test basic-1.2 {multi-line paragraphs} -body {
    convert {
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
        eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
        enim ad minim veniam, quis nostrud exercitation ullamco laboris
        nisi ut aliquip ex ea commodo consequat. 

        Duis aute irure dolor in reprehenderit in voluptate velit esse 
        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat 
        cupidatat non proident, sunt in culpa qui officia deserunt mollit 
        anim id est laborum.
    }
} -result {
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
    enim ad minim veniam, quis nostrud exercitation ullamco laboris
    nisi ut aliquip ex ea commodo consequat.</p>
    
    <p>Duis aute irure dolor in reprehenderit in voluptate velit esse 
    cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat 
    cupidatat non proident, sunt in culpa qui officia deserunt mollit 
    anim id est laborum.</p>
}

test bquote-1.1 {simple blockquote} -body {
    convert {
        >
        > A line of text.
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260






261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
    eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    </blockquote>
}

test bquote-1.3 {block quote with markup} -body {
    convert {
        > ### Heading 3
        >
        > Lorem ipsum dolor sit amet, consectetur adipiscing elit
    }
} -result {
    <blockquote>
    <h3>Heading 3</h3>

    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
    </blockquote>
}

test bquote-1.4 {nested block quotes} -body {
    convert {
        > First this.
        >
        > > And then this and this
        > > and this.
        >
        > And then this.
    }
} -result {
    <blockquote>
    <p>First this.</p>

    <blockquote>
    <p>And then this and this
    and this.</p>
    </blockquote>

    <p>And then this.</p>
    </blockquote>
}

test bquote-1.5 {complex case (from Caius test suite)} -body {
    convert {
        >
        > > This is what he said. This is what she said. This is what
        > > he said. This is what she said.
        > >
        > > ### Heading 3 #####
        > >
        > > This is what he said. This is what she said. This is what
        > > he said. This is what she said.
        > >
        > >     import os
        > >     os.path.listdir()
        > >
        > > This is what he said. This is what she said. This is what
        > > he said. This is what she said.
        >
        > ## Heading 2
        >
        > This is what he said. This is what she said. This is what
        > he said. This is what she said.

        This is a test.
    }
} -result {
    <blockquote>
    <blockquote>
    <p>This is what he said. This is what she said. This is what
    he said. This is what she said.</p>

    <h3>Heading 3</h3>

    <p>This is what he said. This is what she said. This is what
    he said. This is what she said.</p>

    <pre><code>import os
    os.path.listdir()</code></pre>







    <p>This is what he said. This is what she said. This is what
    he said. This is what she said.</p>
    </blockquote>

    <h2>Heading 2</h2>

    <p>This is what he said. This is what she said. This is what
    he said. This is what she said.</p>
    </blockquote>

    <p>This is a test.</p>
}

test convert-2.2 {refs} -body {
    convert {
        Find it [here][foo]!

        [foo]: http://example.com/  "Optional Title Here"
    }
} -result {
    <p>Find it <a href="http://example.com/" title="Optional Title Here">here</a>!</p>
}

test code-block-1.0 {basic code block render} -body {
    convert {
	pre code

	    in code

	post code
    }
} -result {
    <p>pre code</p>

    <pre><code>in code</code></pre>

    <p>post code</p>
}

#-------------------------------------------------------------------------
# External conversion of Fenced Code Blocks

test fcb-1.0 {register, wrong # args} -body {
    ::Markdown::register
} -returnCodes error -result {wrong # args: should be "::Markdown::register lang_specifier converter ?extended?"}

test fcb-1.1 {register, wrong # args} -body {
    ::Markdown::register LANG
} -returnCodes error -result {wrong # args: should be "::Markdown::register lang_specifier converter ?extended?"}

test fcb-1.2 {register, wrong # args} -body {
    ::Markdown::register LANG CONVERTER EXTENDED X
} -returnCodes error -result {wrong # args: should be "::Markdown::register lang_specifier converter ?extended?"}

test fcb-1.3 {get_lang_counter, wrong # args} -body {
    ::Markdown::get_lang_counter X
} -returnCodes error -result {wrong # args: should be "::Markdown::get_lang_counter"}

test fcb-1.4 {reset_lang_counter, wrong # args} -body {
    ::Markdown::reset_lang_counter X
} -returnCodes error -result {wrong # args: should be "::Markdown::reset_lang_counter"}

test fcb-2.0 {get_lang_counter, initial} -body {
    ::Markdown::get_lang_counter
} -result {}

test fcb-2.1 {get_lang_counter, initial} -setup {
    set ::Markdown::lang_counter(foo) 22
} -body {
    ::Markdown::get_lang_counter
} -cleanup {
    ::Markdown::reset_lang_counter
} -result {foo 22}

test fcb-2.2 {reset_lang_counter} -body {
    ::Markdown::reset_lang_counter
} -result {}

test fcb-2.3 {reset_lang_counter} -setup {
    set ::Markdown::lang_counter(foo) 22
} -body {
    ::Markdown::reset_lang_counter
    ::Markdown::get_lang_counter
} -result {}

test fcb-3.0 {register} -setup {
    proc foo {text} { string reverse $text }
} -body {
    ::Markdown::register foo foo
    convert {
	```foo
	bar
	```
    }
} -cleanup {
    unset ::Markdown::converter(foo)
    rename foo {}
} -result {
    <pre class='code'><code class='foo'>rab</code></pre>
}

test fcb-3.1 {register extended} -setup {
    proc foo {text config} { list $config $text }
} -body {
    ::Markdown::register foo foo 1
    convert {
	```foo bar
	snafu
	```
    }
} -cleanup {
    unset ::Markdown::converter(foo)
    rename foo {}
} -result {
    <pre class='code'><code class='foo'>snafu bar</code></pre>
}

#=========================================================================
# Tests related to other processors or test suites

#-------------------------------------------------------------------------
# Caius Markdown Tests
#
# These tests translate entire files.  I prefer tests for individual
# features; when a test fails, you don't need to go hunting for the
# specifics.  But I'm keeping these to show compatibility with the
# Caius processor.

# 1.* - Caius markdown tests
if 0 {
test caius-1.1 {bq test} -body {
    set md   [::tcltest::viewFile test/bq.md]
    set html [::tcltest::viewFile test/bq.html]

    cmp $html [Markdown::convert $md]
} -result {1}








|





|










|





|




|














|


















|

|


|


|
>
>
>
>
>
>



|
|
|
<
<
<

<
|











<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






|

|



|







154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243



244

245
246
247
248
249
250
251
252
253
254
255
256



257


























































































258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
    eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    </blockquote>
}

test bquote-1.3 {block quote with markup} -body {
    convert {
        > ### Heading 3
        > 
        > Lorem ipsum dolor sit amet, consectetur adipiscing elit
    }
} -result {
    <blockquote>
    <h3>Heading 3</h3>
    
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
    </blockquote>
}

test bquote-1.4 {nested block quotes} -body {
    convert {
        > First this.
        >
        > > And then this and this
        > > and this.
        > 
        > And then this.
    }
} -result {
    <blockquote>
    <p>First this.</p>
    
    <blockquote>
    <p>And then this and this
    and this.</p>
    </blockquote>
    
    <p>And then this.</p>
    </blockquote>
}

test bquote-1.5 {complex case (from Caius test suite)} -body {
    convert {
        >
        > > This is what he said. This is what she said. This is what
        > > he said. This is what she said.
        > >
        > > ### Heading 3 #####
        > >
        > > This is what he said. This is what she said. This is what
        > > he said. This is what she said.
        > >     
        > >     import os
        > >     os.path.listdir()
        > >
        > > This is what he said. This is what she said. This is what
        > > he said. This is what she said.
        >
        > ## Heading 2
        >
        > This is what he said. This is what she said. This is what
        > he said. This is what she said.

        This is a test.
    }
} -result {
    <blockquote>
    <blockquote>
    <p>This is what he said. This is what she said. This is what
    he said. This is what she said.</p>
    
    <h3>Heading 3</h3>
    
    <p>This is what he said. This is what she said. This is what
    he said. This is what she said.</p>
    
    <pre><code>import os
    os.path.listdir()</code></pre>
    
    <p>This is what he said. This is what she said. This is what
    he said. This is what she said.</p>
    </blockquote>
    
    <h2>Heading 2</h2>
    
    <p>This is what he said. This is what she said. This is what
    he said. This is what she said.</p>
    </blockquote>
    
    <p>This is a test.</p>
}







test convert-2.2 {refs} -body {
    convert {
        Find it [here][foo]!

        [foo]: http://example.com/  "Optional Title Here"
    }
} -result {
    <p>Find it <a href="http://example.com/" title="Optional Title Here">here</a>!</p>
}































































































#=========================================================================
# Tests related to other processors or test suites

#-------------------------------------------------------------------------
# Caius Markdown Tests
#
# These tests translate entire files.  I prefer tests for individual 
# features; when a test fails, you don't need to go hunting for the
# specifics.  But I'm keeping these to show compatibility with the 
# Caius processor.

# 1.* - Caius markdown tests

test caius-1.1 {bq test} -body {
    set md   [::tcltest::viewFile test/bq.md]
    set html [::tcltest::viewFile test/bq.html]

    cmp $html [Markdown::convert $md]
} -result {1}

427
428
429
430
431
432
433
434
435
436
437

438
439
440
441
442
443
444
} -result {1}

test caius-1.7 {indent test} -body {
    set md   [::tcltest::viewFile test/indent.md]
    set html [::tcltest::viewFile test/indent.html]
    cmp $html [Markdown::convert $md]
} -result {1}
}

#-------------------------------------------------------------------------
# mdtest: Bugs found while running michelf/mdtest


test mdtest-1.1 {AL: Auto links: & not escaped in URL} -body {
    convert {
        Auto-link with ampersand: <http://example.com/?foo=1&bar=2>
    }
} -result {
    <p>Auto-link with ampersand: <a href="http://example.com/?foo=1&amp;bar=2">http://example.com/?foo=1&amp;bar=2</a></p>







<



>







307
308
309
310
311
312
313

314
315
316
317
318
319
320
321
322
323
324
} -result {1}

test caius-1.7 {indent test} -body {
    set md   [::tcltest::viewFile test/indent.md]
    set html [::tcltest::viewFile test/indent.html]
    cmp $html [Markdown::convert $md]
} -result {1}


#-------------------------------------------------------------------------
# mdtest: Bugs found while running michelf/mdtest


test mdtest-1.1 {AL: Auto links: & not escaped in URL} -body {
    convert {
        Auto-link with ampersand: <http://example.com/?foo=1&bar=2>
    }
} -result {
    <p>Auto-link with ampersand: <a href="http://example.com/?foo=1&amp;bar=2">http://example.com/?foo=1&amp;bar=2</a></p>
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
} -result {
    <p>The <a href="/url/">link
    breaks</a> across lines.</p>
}

test mdtest-1.8 {LRS: link breaks across lines, 2} -constraints knownbug -body {
    convert {
        The [link
        breaks] across lines, but with a line-ending space.

        [link breaks]: /url/
    }
} -result {
    <p>The <a href="/url/">link
    breaks</a> across lines, but with a line-ending space.</p>
}

test mdtest-1.9 {OAUL: "* * *" line after unordered list} -body {
    # This causes the processor to hang.
    convert {
        * asterisk 1

        * * *
    }
} -result {
    <ul>
    <li>asterisk 1
    </li></ul>

    <hr />
}

test mdtest-1.10 {fenced code block without language specifier} -body {
    convert {
	Here comes a generic example:

	```
	set x 1
	```
    }
} -result {
    <p>Here comes a generic example:</p>

    <pre class='code'><code>set x 1</code></pre>
}

test mdtest-1.11 {fenced code block with language specifier} -body {
    convert {
	Here comes a Tcl example:

	```tcl
	set x 1
	```
    }
} -result {
    <p>Here comes a Tcl example:</p>

    <pre class='code'><code class='tcl'>set x 1</code></pre>
}

#=========================================================================
# Tclssg markdown tests - Copyright (c) 2015, 2017, 2018, 2020, 2021
#-
# D. Bohdan and contributors listed in Tclssg AUTHORS. This code is
# released under the terms of the MIT license. See the file LICENSE
# for details.

tcltest::test markdown-3.1 {Tabs in Markdown} -cleanup {
    unset md
} -body {
    set md "```\ntarget:\n\tcommand foo bar\n```"
    list [Markdown::convert $md 0] \
         [Markdown::convert $md 1]
} -result [list \
    "<pre class='code'><code>target:\n    command foo bar</code></pre>" \
    "<pre class='code'><code>target:\n\tcommand foo bar</code></pre>" \
]

tcltest::test markdown-4.1 {Fenced code block language 1} -cleanup {
    unset md
} -body {
    set md "```make\ntarget:\n\tcommand foo bar\n```"
    Markdown::convert $md 1
} -result "<pre class='code'><code class='make'>target:\n\tcommand\
         foo bar</code></pre>"

tcltest::test markdown-4.2 {Fenced code block language 2} -body {
    Markdown::convert "```!@#$%^&*()\nhi\n```"
} -result "<pre class='code'><code class='!@#$%^&amp;*()'>hi</code></pre>"

tcltest::test markdown-4.3 {Fenced code block language 3} -body {
    Markdown::convert "```foo bar baz\nhi\n```"
} -result "<pre class='code'><code class='foo'>hi</code></pre>"

tcltest::test markdown-5.1 {Newlines in HTML tag 1} -body {
    Markdown::convert <div>Hello</div>
} -result <div>Hello</div>\n

tcltest::test markdown-5.2 {Newlines in HTML tag 2} -body {
    Markdown::convert <div>\nHello\n</div>
} -result <div>\nHello\n</div>\n

# The tests markdown-5.{3,4,5} test for the behavior of John Gruber's
# original Markdown.pl.  An implementation of CommonMark would remove
# the repeated newlines and wrap the "Hello" in 5.4-5.5 in a <p>.
tcltest::test markdown-5.3 {Newlines in HTML tag 3} -body {
    Markdown::convert <div>\nHello\n\n\n</div>
} -result <div>\nHello\n\n\n</div>\n

tcltest::test markdown-5.4 {Newlines in HTML tag 4} -body {
    Markdown::convert <div>\n\nHello</div>
} -result <div>\n\nHello</div>\n

tcltest::test markdown-5.5 {Newlines in HTML tag 5} -body {
    Markdown::convert <div>\n\nHello\n\n\n</div>
} -result <div>\n\nHello\n\n\n</div>\n

tcltest::test markdown-6.1 {<hr>} -body {
    Markdown::convert hello\n\n---\n\nworld
} -result "<p>hello</p>\n\n<hr />\n\n<p>world</p>"

tcltest::test markdown-6.2 {<hr> and HTML} -body {
    Markdown::convert <table></table>\n\n---\n\n<table></table>
} -result "<table></table>\n\n<hr />\n\n<table></table>\n"

tcltest::test markdown-7.1 {Table} -body {
    Markdown::convert [unindent {
        | Foo | Bar | Baz |
        |-----|-----|-----|
        |   1 |   2 |   3 |
        | 4   |  5  | 6    |
    }]
} -result [unindent {
    <table class="table">
    <thead>
      <tr>
        <th>Foo</th>
        <th>Bar</th>
        <th>Baz</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
      </tr>
      <tr>
        <td>4</td>
        <td>5</td>
        <td>6</td>
      </tr>
    </tbody>
    </table>
}]\n

tcltest::test markdown-7.2 {Table with HTML} -body {
    Markdown::convert [unindent {
        | File name | Description |
        |-|-|
        | <a href="download/x.zip">x.zip</a> | Source code. |
    }]
} -result [unindent {
    <table class="table">
    <thead>
      <tr>
        <th>File name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a href="download/x.zip">x.zip</a></td>
        <td>Source code.</td>
      </tr>
    </tbody>
    </table>
}]\n

tcltest::test markdown-7.3 {Table with a single column} -body {
    Markdown::convert [unindent {
        | Monocolumn |
        |------------|
        | Yes.       |

        | <a name="foo">Hook</a> |
        |-|
        | <em>Line</em> |
    }]
} -result [unindent {
    <table class="table">
    <thead>
      <tr>
        <th>Monocolumn</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Yes.</td>
      </tr>
    </tbody>
    </table>


    <table class="table">
    <thead>
      <tr>
        <th><a name="foo">Hook</a></th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>Line</em></td>
      </tr>
    </tbody>
    </table>
}]\n

tcltest::test markdown-7.4 {Table with only a header} -body {
    # This works on GitHub.
    Markdown::convert "|Hello|\n|-----|"
} -result [unindent {
    <table class="table">
    <thead>
      <tr>
        <th>Hello</th>
      </tr>
    </thead>
    </table>
}]\n

tcltest::test markdown-7.5 {HTML before a table} -body {
    Markdown::convert [unindent {
        <script>
            var x = 5;
            var y = 7;
        </script>

        | Hello! |
        |---|
    }]
} -result [unindent {
    <script>
        var x = 5;
        var y = 7;
    </script>

    <table class="table">
    <thead>
      <tr>
        <th>Hello!</th>
      </tr>
    </thead>
    </table>
}]\n

tcltest::test markdown-8.1 {HTML blocks} -body {
    Markdown::convert "<div>\n</div>\n\n# Hello!"
} -result <div>\n</div>\n\n<h1>Hello!</h1>

tcltest::test markdown-8.2.1 {Newlines after a one-line HTML block} -body {
    Markdown::convert "<div></div>\n# Hello!"
} -result <div></div>\n\n<h1>Hello!</h1>

tcltest::test markdown-8.2.2 {Newlines after a one-line HTML block} -body {
    Markdown::convert "<div></div>\n\n# Hello!"
} -result <div></div>\n\n<h1>Hello!</h1>

tcltest::test markdown-8.2.3 {Newlines after a one-line HTML block} -body {
    Markdown::convert "<div></div>\n\n\n# Hello!"
} -result <div></div>\n\n<h1>Hello!</h1>

tcltest::test markdown-8.3.1 {Newlines after a multiline HTML block} -body {
    Markdown::convert "<div>\n</div>\n# Hello!"
} -result <div>\n</div>\n\n<h1>Hello!</h1>

tcltest::test markdown-8.3.2 {Newlines after a multiline HTML block} -body {
    Markdown::convert "<div>\n</div>\n\n# Hello!"
} -result <div>\n</div>\n\n<h1>Hello!</h1>

tcltest::test markdown-8.3.3 {Newlines after a multiline HTML block} -body {
    Markdown::convert "<div>\n</div>\n\n\n# Hello!"
} -result <div>\n</div>\n\n<h1>Hello!</h1>

tcltest::test markdown-8.4 {Text after the opening/closing tag} -body {
    Markdown::convert "<div>   <b>\n</b> </div> <!-- -->\n\n# Hello!"
} -result [unindent {
    <div>   <b>
    </b> </div> <!-- -->

    <h1>Hello!</h1>
}]

tcltest::test markdown-8.5 {} -body {
    Markdown::convert [unindent {
        <p><img src="https://example.com"></p>

        `broken` markup
    }]
} -result [unindent {
    <p><img src="https://example.com"></p>

    <p><code>broken</code> markup</p>
}]

#-------------------------------------------------------------------------
# Cleanup
rename unindent {}
rename convert {}
rename outdent {}
rename cmp {}
rename dumpcmp {}
testsuiteCleanup
return







|





|












|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



|
<
<
<
<

<
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409























































































































































410















411







412
413




































































































414
415
416
417




418

} -result {
    <p>The <a href="/url/">link
    breaks</a> across lines.</p>
}

test mdtest-1.8 {LRS: link breaks across lines, 2} -constraints knownbug -body {
    convert {
        The [link 
        breaks] across lines, but with a line-ending space.

        [link breaks]: /url/
    }
} -result {
    <p>The <a href="/url/">link 
    breaks</a> across lines, but with a line-ending space.</p>
}

test mdtest-1.9 {OAUL: "* * *" line after unordered list} -body {
    # This causes the processor to hang.
    convert {
        * asterisk 1

        * * *
    }
} -result {
    <ul>
    <li><p>asterisk 1</p>























































































































































    















    </li>







    <li><p>* *</p></li></ul>
}





































































































#-------------------------------------------------------------------------
# Cleanup





testsuiteCleanup

Changes to modules/markdown/pkgIndex.tcl.










1
2









if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded Markdown 1.2 [list source [file join $dir markdown.tcl]]
>
>
>
>
>
>
>
>
>
|
|
1
2
3
4
5
6
7
8
9
10
11
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

package ifneeded Markdown 1.0 [list source [file join $dir markdown.tcl]]

Changes to modules/math/ChangeLog.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
2021-03-07  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* various man files: Require Tcl 8.6 and TclOO

2021-01-31  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* combinatoricsExt.tcl: Extension of the collection of combinatorial procedures
	* combinatoricsExt.test: Tests for the new procedures
	* combinatorics.man: Description of the new procedures
	* pkgIndex.tcl: Added the package math::combinatorics

2021-01-03  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* changepoint.tcl: New package defining two change point detection algorithms
	* changepoint.test: Basic tests for the change point detection algorithms
	* changepoint.man: Description of the change point detection procedures
	* pkgIndex.tcl: Added the changepoint package

2021-01-01  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* probopt.tcl: New package defining a number of probabilistic optimisation algorithms
	* probopt_*.tcl: Individual source files for these algorithms
	* probopt.test: Tests for the probabilistic algorithms
	* probopt.man: Description of the algorithms (including references describing the backgrounds)
	* filtergen.tcl: Correct a small mistake (loop over data)
	* filtergen.test: Correct tests (several small mistakes)

2020-12-20  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* filtergen.tcl: New package for digital filtering
	* filtergen.man: Description of the filters package
	* filtergen.test: Simple tests for the filters package
	* pkgIndex.tcl: Added the filters package

2020-11-22  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* geometry.tcl: Source the file geometry_ext.tcl - additional procedures by Manfred Rosenberger
	* geometry_ext.tcl: File with the additional procedures
	* geometry.test: Added tests for these procedures
	* math_geometry.man: Description of these procedures
	* pkgIndex.tcl: Bumped version to 1.4.1

2020-09-20  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* geometry.tcl: The procedures [direction] and [octant] used an inconsistent definition of the direction (see https://core.tcl-lang.org/tcllib/tktview?name=fb4812f82b).
	                The changes make the results consistent with the standard mathematical definition.
	                Further change: return the common point for adjacent line segments.
	* geometry.test: Added several tests wrt the above changes
	* pkgIndex.tcl: Bumped the version of geometry to 1.4.0, as the changes above represent a minor incompatibility.
	* geometry.man: Document these changes

2020-04-17  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* primes.tcl: Correct the implementation of the totient function, as per https://core.tcl-lang.org/tcllib/tktview?name=7017dad214
	* primes.test: Added a test case for the numbers 1 to 12 for the totient function
	* pkgIndex.tcl: Bumped version of numtheory to 1.1.2

2020-02-13  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* special.tcl: Add procs for returning Euler and Bernoulli number, version to 0.5.0
	* special.test: Add tests for these new procs
	* special.man: Add documentation for these new procs
	* pkgIndex.tcl: Bumped version of special functions package to 0.5.0

2019-11-08  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* statistics.tcl: Add a new type of error message, version to 1.5.0
	* pdf_stat.tcl: Add procedures for Laplace, Kumaraswamy and negative binomial distributions, also tests for homoscedasticity
	* statistics.tcl: Corresponding tests
	* statistics.man: Documentation of the new procedures
	* pkgIndex.tcl: Bumped version of statistics package to 1.5.0

2019-11-04  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* interpolate.tcl: Correct the procedure interp-linear for another pair of corner cases (thanks to Alexandru)

2019-10-29  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* interpolate.tcl: Correct the procedure interp-linear for several corner cases (thanks to Alexandru)
	* pkgIndex.tcl: Bumped version of interpolation package to 1.1.2

2019-09-30  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* special.tcl: Add function incomplete Beta, regularized Beta and digamma
	* special.test: Add tests for the new functions
	* special.man: Describe the new functions
	* pkgIndex.tcl: Bumped version of special functions package to 0.4

2019-08-14  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* math_geometry.man: Describe several procedures that were not described yet
	* geometry.tcl: Export several procedures that were not exported yet
	* pkgIndex.tcl: Bumped version of geometry package to 1.3.1

2019-06-22  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* pdf_stat.tcl: Add procedures for triangular distribution
	* statistics.man: Describe procedures for triangular distribution
	* statistics.test: Add tests for triangular distribution
	* statistics.tcl: Bumped version to 1.3.1
	* pkgIndex.tcl: Bumped version to 1.3.1
2019-05-07  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* quasirandom.test: Add tests to deal with procedures in a different namespace
	* quasirandom.tcl: Deal with procedures in a different namespace

2019-04-24  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* quasirandom.test: Add support code
	* numtheory.tcl: Add estimation of the number of primes between two limits
	* numtheory.test: Add tests regarding the estimated number of primes

2019-04-23  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* quasirandom.tcl: New package - generate quasi-random numbers (for instance for estimating multidimensional integrals)
	* quasirandom.test: Tests for the new package
	* quasirandom.man: Documentation for the new package
	* pkgIndex.tcl: Add the new package

2019-04-18  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* misc.tcl: Add double() to calculation of mean and standard deviation in proc stats (ticket 0a030f850d4e3fc05da98aa954a6ec1b16e655d9)
	* math.test: Correct the outcome of the test for stats (consequence of ticket 0a030f850d4e3fc05da98aa954a6ec1b16e655d9)

2018-08-04  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* statistics.tcl: Source stat_wasserstein.tcl and stat_logit.tcl - for new commands
	* statistics.test: Add corresponding tests
	* statistics.man: Add description of these commands
	* pkgIndex.tcl: Bump the version to 1.3.0

2018-07-22  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* trig.tcl: Implementation of (additional) trigonometric functions - package math::trig
	* trig.test: Trst for the (additional) trigonometric functions
	* trig.man: Documentation for the (additional) trigonometric functions
	* pkgIndex.tcl: Add the new package

2018-07-19  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* math_geometry.man: Describe the new criterium

2018-06-23  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* geometry_circle.tcl: Use the mean radius as criterium for touching circles (suggestion Andreas Kupries)

2018-06-18  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* geometry_circle.tcl: New source file with circle procedures
	* geometry.tcl: Added [source] statement for the new file, bumped version to 1.3.0
	* math_geometry.man: Description of the new procedures
	* geometry.test: Tests for the new procefures
	* pkgIndex.tcl: Version of math::geometry

2018-01-26  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* pdf_stat.tcl: Add a new procedure, bootstrap
	* statistics.test: Add tests for the bootstrap procedure
	* statistics.man: Add description of the bootstrap procedure
	* statistics.tcl: Change the version number for the statistics package (1.2.0)
	* pkgIndex.tcl: Change the version number for the statistics package

2018-01-07  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* pca.tcl: New package PCA, principal components analysis
	* pca.man: DoOcumentation for the PCA package
	* pca.test: Tests for the PCA package
	* pkgIndex.tcl: Add the package require command for the PCA package
2017-10-06  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* mvlinreg.tcl: Special case for zero variation - then the correlation coefficient should be 1.0
	* statistics.test: Test that mv-ols is well behaved if the variation in the dependent variable is zero (ticket 51c03aac1a45161ab6cc59afb69d1768175e054c)
	* statistics.tcl: Bumped the version to 1.1.1
	* pkgIndex.tcl: Bumped the version of math::statistics to 1.1.1

2017-08-10  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* geometry.test: Add tests for areaPolygon
	* geometry.tcl: Correct implementation of areaPolygon (ticket cb043ecc70e0e90bff93535d1d371a78b94f5d44)
2017-05-29  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* geometry.test: Require at least Tcl 8.5
	* numtheory.man: Add description of Jacobi symbol
	* primes.tcl: Add Jacobi symbol
	* primes.test: Add tests for Jacobi symbol

2017-05-28  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* numtheory.tcl: Source primes.tcl at the end, version now 1.1
	* primes.tcl: Additonal procedures for the number theory package, includes estimates of number of primes
	              and factors (tickets 1be9ea99c9b76c8ffeff3edfb73671309bf657e8 and 734dd2ae5c89319a3b8579e48d581f9d0a3da4f4)
	* numtheory.man: Document additional procedures
	* primes.test: Tests for additional procedures
	* linalg.tcl: Correction of [conforming] procedure (ticket 776a75f14f53b5c9a06fe3f3892485a6efe1dc20)
	* linalg.test: Added tests for the [conforming] procedure
	* pkgIndex.tcl: Bumped version of numtheory to 1.1, linearalgebra to 1.1.6

2017-01-17  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* statistics.test: Add tests for test-Tukey-range and test-Dunnett
	* statistics.tcl: Add two procedures, test-Tukey-range and test-Dunnett, and auxiliary code
	* statistics.man: Describe the two new procedures
	* pkgIndex.tcl: Bumped version of the statistics module to 1.1.0

2017-01-10  Arjen Markus <arjenmarkus@users.sourceforge.net>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































1
2
3
4
5
6
7







































































































































































2017-01-17  Arjen Markus <arjenmarkus@users.sourceforge.net>
	* statistics.test: Add tests for test-Tukey-range and test-Dunnett
	* statistics.tcl: Add two procedures, test-Tukey-range and test-Dunnett, and auxiliary code
	* statistics.man: Describe the two new procedures
	* pkgIndex.tcl: Bumped version of the statistics module to 1.1.0

2017-01-10  Arjen Markus <arjenmarkus@users.sourceforge.net>

Changes to modules/math/TODO.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
This file records outstanding actions for the math module

dd. 4 march 2021
Paired t-test: https://mathworld.wolfram.com/Pairedt-Test.html


dd. 19 february 2021
Provide alternatives for pdf-gamma/cdf-gamma: using mean and standard deviation instead of alpha and beta

Support Kaplan-Meier for censored data

dd. 11 february 2021
Check:
- statistical procedures for testing " normality" - I saw some obviously not normal datasets that were still not flagged as such
  -- that seems to have been my mistake: comparing the wrong graphs
Implement:
- PPCC
- Plot positions
- QQ plots
- general support for censored data


dd. 19 january 2021
Solve a problem with determineSVD - reported by Nicolas Robert
https://groups.google.com/g/comp.lang.tcl/c/RKcM7OfVkXk
- the code turned out to be correct. Issue was closed.


dd. 4 january 2021
Check the man pages:
- [category] missing in several
- [strong] used (deprecated) - or some other keyword, no, [nl] in quasirandom.man
  math_geometry.man
  probopt.man
  quasirandom.man


dd. 27 november 2020
Stirling numbers - https://mathworld.wolfram.com/StirlingNumberoftheFirstKind.html
                   https://mathworld.wolfram.com/StirlingNumberoftheSecondKind.html

Most efficient via the recurrence relations and memoization?

First kind:   S1(n+1,k) = S1(n,k-1)   - n S1(n,k)    -- S1(n,1) = (-1)**(n-1) * (n-1)! , S1(n,0) = Kronecker(n,0)
Second kind:  S2(n,k)   = S2(n-1,k-1) + k S2(n-1,k)  -- S2(n,n) = 1, S2(n,1) = 1, S2(n,0) = Kronecker(n,0)

-- done

Note: [math::choose] does not take the bigints into account!

More numbers: Fibonacci and Lucas numbers:
F(0) = 1, F(1) = 1, F(n+2) = F(n+1) + F(n)
L(0) = 1, L(1) = 3, L(n+2) = L(n+1) + L(n)

dd. 23 november 2020
Add new procs by Manfred Rosenberger
Clean up some of the code (notably the synonyms)


dd. 2 november 2020
Generate the actual combinations - in math::combinatinatorics
    - take struct::list as an example!!


dd. 20 september 2020
Incorporate suggestions by Manfred Rosenberger for the geometry package - done

dd. 16 august 2020
Statistics:
Based on article by Dennis Helsel:
- Shapiro-Wilk or Anderson-Darling?
- mean according to Kaplan-Meier
- Box-Cox transformation


dd. 17 april 2020
Issue with the totient function:
https://core.tcl-lang.org/tcllib/tktview?name=7017dad214
Done

dd. 6 february 2020
- Implement accelerations for infinite sums:
  - Method described on Wolfram
  - Method for alternating series from the book

dd. 9 february
http://numbers.computation.free.fr/Constants/Miscellaneous/seriesacceleration.html
- provides an overview
https://arxiv.org/pdf/math/0202009.pdf
- also interesting
https://www.cis.twcu.ac.jp/~osada/thesis_osada.pdf
- thesis
https://kconrad.math.uconn.edu/blurbs/analysis/series_acceleration.pdf
- yet another article

dd. 4 november 2019
- Extend the set of test cases for linear interpolation with corner cases
  - these should fail with a clear error message.

dd. 4 september 2018
- Implement a "typical profile" for timeseries and determining residuals
  (Plus perhaps a notion of outliers)
- Implement detection of extreme values/periods with extreme values


dd. 17 june 2018
- Factor out the backward rotation in the intersection routines for circles
- Add a normalisation routine for vectors
- Add routines to construct a perpendicular vector and line
- Add a routine to return the perpendicular bisector of a line segment
- Add routines to deal with triangles (incircle, circumcircle)
- Add various other geometrical procs

- Add documentation of the new procs

dd. 12 june 2018
- Create a complex number based on modulus and argument

dd. 24 january 2018
- Implement plot positions for ranking in statistics package
- Implement a bootstrap method for selecting "new" samples
- Implement maximum likelihood methods for various distributions
  (exponential, normal and binomial are simple enough). Partly esthetical.

dd. 29 may 2017
- Implement Kronecker symbol (extension of Jacobi symbol)

dd. 8 january 2017
- Fix problem with test-anova-F (at least the test cases 1.1 and 1.2) - done


dd. 3 august 2016
- Fix problem in interpolation - integer arguments - done
- Fix problem in pdf-lognormal and cdf-lognormal: stdev is now used as variance - done


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2





























































































































3
4
5
6
7
8
9
This file records outstanding actions for the math module






























































































































dd. 8 january 2017
- Fix problem with test-anova-F (at least the test cases 1.1 and 1.2) - done


dd. 3 august 2016
- Fix problem in interpolation - integer arguments - done
- Fix problem in pdf-lognormal and cdf-lognormal: stdev is now used as variance - done

Changes to modules/math/bessel.test.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5;# statistics,linalg!
testsNeedTcltest 2.1

support {
    useLocal math.tcl       math
    useLocal constants.tcl  math::constants
    useLocal linalg.tcl     math::linearalgebra ;# for statistics
    useLocal statistics.tcl math::statistics







|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4;# statistics,linalg!
testsNeedTcltest 2.1

support {
    useLocal math.tcl       math
    useLocal constants.tcl  math::constants
    useLocal linalg.tcl     math::linearalgebra ;# for statistics
    useLocal statistics.tcl math::statistics

Changes to modules/math/bigfloat.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[vset VERSION 2.0.3]
[manpage_begin math::bigfloat n [vset VERSION]]
[keywords computations]
[keywords floating-point]
[keywords interval]
[keywords math]
[keywords multiprecision]
[keywords tcl]
[copyright {2004-2008, by Stephane Arnold <stephanearnold at yahoo dot fr>}]
[moddesc   {Tcl Math Library}]
[titledesc {Arbitrary precision floating-point numbers}]
[category  Mathematics]
[require Tcl 8.5]
[require math::bigfloat [opt [vset VERSION]]]

[description]

The bigfloat package provides arbitrary precision floating-point math
capabilities to the Tcl language. It is designed to work with Tcl 8.5,
but for Tcl 8.4 is provided an earlier version of this package.
See [sectref "WHAT ABOUT TCL 8.4 ?"] for more explanations.
<
|











|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

[manpage_begin math::bigfloat n 2.0.1]
[keywords computations]
[keywords floating-point]
[keywords interval]
[keywords math]
[keywords multiprecision]
[keywords tcl]
[copyright {2004-2008, by Stephane Arnold <stephanearnold at yahoo dot fr>}]
[moddesc   {Tcl Math Library}]
[titledesc {Arbitrary precision floating-point numbers}]
[category  Mathematics]
[require Tcl 8.5]
[require math::bigfloat [opt 2.0.1]]

[description]

The bigfloat package provides arbitrary precision floating-point math
capabilities to the Tcl language. It is designed to work with Tcl 8.5,
but for Tcl 8.4 is provided an earlier version of this package.
See [sectref "WHAT ABOUT TCL 8.4 ?"] for more explanations.
425
426
427
428
429
430
431
432
433
set sinProduct [lb]mul [lb]sin $angle1[rb] [lb]sin $angle2[rb][rb]
set cosProduct [lb]mul [lb]cos $angle1[rb] [lb]cos $angle2[rb][rb]
set angle3 [lb]asin [lb]add [lb]mul $sinProduct [lb]cos $opposite3[rb][rb] $cosProduct[rb][rb]
puts "angle3 : [lb]tostr [lb]rad2deg $angle3[rb][rb]"
[example_end]

[vset CATEGORY {math :: bignum :: float}]
[include ../common-text/feedback.inc]
[manpage_end]







|

424
425
426
427
428
429
430
431
432
set sinProduct [lb]mul [lb]sin $angle1[rb] [lb]sin $angle2[rb][rb]
set cosProduct [lb]mul [lb]cos $angle1[rb] [lb]cos $angle2[rb][rb]
set angle3 [lb]asin [lb]add [lb]mul $sinProduct [lb]cos $opposite3[rb][rb] $cosProduct[rb][rb]
puts "angle3 : [lb]tostr [lb]rad2deg $angle3[rb][rb]"
[example_end]

[vset CATEGORY {math :: bignum :: float}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/bigfloat.tcl.

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105




################################################################################
# procedures that handle floating-point numbers
# these procedures are sorted by name (after eventually removing the underscores)
#
# BigFloats are internally represented as a list :
# {"F" Mantissa Exponent Delta} where "F" is a character which determins
# the datatype, Mantissa and Delta are two Big integers and Exponent a raw integer.
#
# The BigFloat value equals to (Mantissa +/- Delta)*2^Exponent
# So the internal representation is binary, but trying to get as close as possible to
# the decimal one.
# When calling fromstr, the Delta parameter is set to the value of the last decimal digit.
# Example : 1.50 belongs to [1.49,1.51], but internally Delta is probably not equal to 1,
# because of the binary representation.
#
# So Mantissa and Delta are not limited in size, but in practice Delta is kept under
# 2^32 by the 'normalize' procedure, to avoid a never-ended growth of memory used.
# Indeed, when you perform some computations, the Delta parameter (which represent
# the uncertainty on the value of the Mantissa) may increase.
# Exponent, as a classic integer, is limited to the interval [-2147483648,2147483647]

# Retrieving the parameters of a BigFloat is often done with that command :







|










|







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105




################################################################################
# procedures that handle floating-point numbers
# these procedures are sorted by name (after eventually removing the underscores)
# 
# BigFloats are internally represented as a list :
# {"F" Mantissa Exponent Delta} where "F" is a character which determins
# the datatype, Mantissa and Delta are two Big integers and Exponent a raw integer.
#
# The BigFloat value equals to (Mantissa +/- Delta)*2^Exponent
# So the internal representation is binary, but trying to get as close as possible to
# the decimal one.
# When calling fromstr, the Delta parameter is set to the value of the last decimal digit.
# Example : 1.50 belongs to [1.49,1.51], but internally Delta is probably not equal to 1,
# because of the binary representation.
# 
# So Mantissa and Delta are not limited in size, but in practice Delta is kept under
# 2^32 by the 'normalize' procedure, to avoid a never-ended growth of memory used.
# Indeed, when you perform some computations, the Delta parameter (which represent
# the uncertainty on the value of the Mantissa) may increase.
# Exponent, as a classic integer, is limited to the interval [-2147483648,2147483647]

# Retrieving the parameters of a BigFloat is often done with that command :
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
        return [add $piOverTwo [asin [abs $x]]]
    }
    # we always use _asin to compute the result
    # but as it is a Taylor development, the value given to [_asin]
    # has to be a bit smaller than 1 ; by using that trick : acos(x)=asin(sqrt(1-x^2))
    # we can limit the entry of the Taylor development below 1/sqrt(2)
    if {[compare $x [fromstr 0.7071]]>0} {
        # x > sqrt(2)/2 : trying to make _asin converge quickly
        # creating 0 and 1 with the same precision as the entry
        variable one
        variable zero
        set fzero [list F $zero -$precision $one]
        set fone [list F [::math::bignum::lshift 1 $precision] \
                -$precision $one]
        # when $x is close to 1 (acos(1.0)=0.0)







|







151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
        return [add $piOverTwo [asin [abs $x]]]
    }
    # we always use _asin to compute the result
    # but as it is a Taylor development, the value given to [_asin]
    # has to be a bit smaller than 1 ; by using that trick : acos(x)=asin(sqrt(1-x^2))
    # we can limit the entry of the Taylor development below 1/sqrt(2)
    if {[compare $x [fromstr 0.7071]]>0} {
        # x > sqrt(2)/2 : trying to make _asin converge quickly 
        # creating 0 and 1 with the same precision as the entry
        variable one
        variable zero
        set fzero [list F $zero -$precision $one]
        set fone [list F [::math::bignum::lshift 1 $precision] \
                -$precision $one]
        # when $x is close to 1 (acos(1.0)=0.0)
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
    }
    # retrieving parameters from A and B
    foreach {dummy integerA expA deltaA} $a {break}
    foreach {dummy integerB expB deltaB} $b {break}
    # when we add two numbers which have different digit numbers (after the dot)
    # for example : 1.0 and 0.00001
    # We promote the one with the less number of digits (1.0) to the same level as
    # the other : so 1.00000.
    # that is why we shift left the number which has the greater exponent
    # But we do not forget the Delta parameter, which is lshift'ed too.
    if {$expA>$expB} {
        set diff [expr {$expA-$expB}]
        set integerA [::math::bignum::lshift $integerA $diff]
        set deltaA [::math::bignum::lshift $deltaA $diff]
        set integerA [::math::bignum::add $integerA $integerB]







|







203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
    }
    # retrieving parameters from A and B
    foreach {dummy integerA expA deltaA} $a {break}
    foreach {dummy integerB expB deltaB} $b {break}
    # when we add two numbers which have different digit numbers (after the dot)
    # for example : 1.0 and 0.00001
    # We promote the one with the less number of digits (1.0) to the same level as
    # the other : so 1.00000. 
    # that is why we shift left the number which has the greater exponent
    # But we do not forget the Delta parameter, which is lshift'ed too.
    if {$expA>$expB} {
        set diff [expr {$expA-$expB}]
        set integerA [::math::bignum::lshift $integerA $diff]
        set deltaA [::math::bignum::lshift $deltaA $diff]
        set integerA [::math::bignum::add $integerA $integerB]
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
################################################################################
proc ::math::bigfloat::_asin {x} {
    # Taylor development
    # asin(x)=x + 1/2 x^3/3 + 3/2.4 x^5/5 + 3.5/2.4.6 x^7/7 + ...
    # into this iterative form :
    # asin(x)=x * (1 + 1/2 * x^2 * (1/3 + 3/4 *x^2 * (...
    # ...* (1/(2n-1) + (2n-1)/2n * x^2 / (2n+1))...)))
    # we show how is really computed the development :
    # we don't need to set a var with x^n or a product of integers
    # all we need is : x^2, 2n-1, 2n, 2n+1 and a few variables
    foreach {dummy mantissa exp delta} $x {break}
    set precision [expr {-$exp}]
    if {$precision+1<[::math::bignum::bits $mantissa]} {
        error "sinus greater than 1"
    }







|







319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
################################################################################
proc ::math::bigfloat::_asin {x} {
    # Taylor development
    # asin(x)=x + 1/2 x^3/3 + 3/2.4 x^5/5 + 3.5/2.4.6 x^7/7 + ...
    # into this iterative form :
    # asin(x)=x * (1 + 1/2 * x^2 * (1/3 + 3/4 *x^2 * (...
    # ...* (1/(2n-1) + (2n-1)/2n * x^2 / (2n+1))...)))
    # we show how is really computed the development : 
    # we don't need to set a var with x^n or a product of integers
    # all we need is : x^2, 2n-1, 2n, 2n+1 and a few variables
    foreach {dummy mantissa exp delta} $x {break}
    set precision [expr {-$exp}]
    if {$precision+1<[::math::bignum::bits $mantissa]} {
        error "sinus greater than 1"
    }
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
        set t [opp [::math::bignum::div $t $square]]
        set u [::math::bignum::div $t $denom]
    }
    # go back to the initial precision
    return [::math::bignum::rshift $s $n]
}


################################################################################
# returns the integer part of a BigFloat, as a BigInt
# the result is the same one you would have
# if you had called [expr {ceil($x)}]
################################################################################
proc ::math::bigfloat::ceil {number} {
    checkFloat number







|







564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
        set t [opp [::math::bignum::div $t $square]]
        set u [::math::bignum::div $t $denom]
    }
    # go back to the initial precision
    return [::math::bignum::rshift $s $n]
}

    
################################################################################
# returns the integer part of a BigFloat, as a BigInt
# the result is the same one you would have
# if you had called [expr {ceil($x)}]
################################################################################
proc ::math::bigfloat::ceil {number} {
    checkFloat number
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
################################################################################
# divide A by B and returns the result
# throw error : divide by zero
################################################################################
proc ::math::bigfloat::div {a b} {
    variable one
    checkNumber a b
    # dispatch to an appropriate procedure
    if {[isInt $a]} {
        if {[isInt $b]} {
            return [::math::bignum::div $a $b]
        }
        error "trying to divide a BigInt by a BigFloat"
    }
    if {[isInt $b]} {return [divFloatByInt $a $b]}







|







796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
################################################################################
# divide A by B and returns the result
# throw error : divide by zero
################################################################################
proc ::math::bigfloat::div {a b} {
    variable one
    checkNumber a b
    # dispatch to an appropriate procedure 
    if {[isInt $a]} {
        if {[isInt $b]} {
            return [::math::bignum::div $a $b]
        }
        error "trying to divide a BigInt by a BigFloat"
    }
    if {[isInt $b]} {return [divFloatByInt $a $b]}
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
        set BMax $temp
    }
    # multiply by zero gives zero
    if {[::math::bignum::iszero $integerA]} {
        # why not return any number or the integer 0 ?
        # because there is an exponent that might be different between two BigFloats
        # 0.00 --> exp = -2, 0.000000 -> exp = -6
        return $a
    }
    # test of the division by zero
    if {[::math::bignum::sign $BMin]+[::math::bignum::sign $BMax]==1 || \
                [::math::bignum::iszero $BMin] || [::math::bignum::iszero $BMax]} {
        error "divide by zero"
    }
    # shift A because we need accuracy







|







820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
        set BMax $temp
    }
    # multiply by zero gives zero
    if {[::math::bignum::iszero $integerA]} {
        # why not return any number or the integer 0 ?
        # because there is an exponent that might be different between two BigFloats
        # 0.00 --> exp = -2, 0.000000 -> exp = -6
        return $a 
    }
    # test of the division by zero
    if {[::math::bignum::sign $BMin]+[::math::bignum::sign $BMax]==1 || \
                [::math::bignum::iszero $BMin] || [::math::bignum::iszero $BMax]} {
        error "divide by zero"
    }
    # shift A because we need accuracy
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
        incr exp -[string length [lindex $tab 1]]
    }
    # this is necessary to ensure we can call fromstr (recursively) with
    # the mantissa ($number)
    if {![string is digit $number]} {
        error "$number is not a number"
    }
    # take account of trailing zeros
    incr exp -$trailingZeros
    # multiply $number by 10^$trailingZeros
    set number [::math::bignum::mul [::math::bignum::fromstr $number]\
            [tenPow $trailingZeros]]
    ::math::bignum::setsign number $signe
    # the F tags a BigFloat
    # a BigInt in internal representation begins by the sign







|







1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
        incr exp -[string length [lindex $tab 1]]
    }
    # this is necessary to ensure we can call fromstr (recursively) with
    # the mantissa ($number)
    if {![string is digit $number]} {
        error "$number is not a number"
    }
    # take account of trailing zeros 
    incr exp -$trailingZeros
    # multiply $number by 10^$trailingZeros
    set number [::math::bignum::mul [::math::bignum::fromstr $number]\
            [tenPow $trailingZeros]]
    ::math::bignum::setsign number $signe
    # the F tags a BigFloat
    # a BigInt in internal representation begins by the sign
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
        error "non-positive decimals number"
    }
    # the lowest number of decimals is 1, because
    # [tostr [fromstr 10.0]] returns 10.
    # (we lose 1 digit when converting back to string)
    set int [::math::bignum::mul $int [tenPow $decimals]]
    return [_fromstr $int [expr {-$decimals}]]

}



################################################################################
# multiplies 'leftop' by 'rightop' and rshift the result by 'shift'
################################################################################







|







1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
        error "non-positive decimals number"
    }
    # the lowest number of decimals is 1, because
    # [tostr [fromstr 10.0]] returns 10.
    # (we lose 1 digit when converting back to string)
    set int [::math::bignum::mul $int [tenPow $decimals]]
    return [_fromstr $int [expr {-$decimals}]]
    
}



################################################################################
# multiplies 'leftop' by 'rightop' and rshift the result by 'shift'
################################################################################
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
    # we would lose accuracy because small uncertainties add to themselves.
    # Example : 0.0001 + 0.0010 = 0.0011 +/- 0.0002
    # This is quite the same reason that made tcl_precision defaults to 12 :
    # internally, doubles are computed with 17 digits, but to keep precision
    # we need to limit our results to 12.
    # The solution : given a precision target, increment precision with a
    # computed value so that all digits of he result are exacts.
    #
    # p is the precision
    # pk is the precision increment
    # 2 power pk is also the maximum number of iterations
    # for a number close to 1 but lower than 1,
    # (denom-num)/denum is (in our case) lower than 1/5
    # so the maximum nb of iterations is for:
    # 1/5*(1+1/5*(1/2+1/5*(1/3+1/5*(...))))







|







1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
    # we would lose accuracy because small uncertainties add to themselves.
    # Example : 0.0001 + 0.0010 = 0.0011 +/- 0.0002
    # This is quite the same reason that made tcl_precision defaults to 12 :
    # internally, doubles are computed with 17 digits, but to keep precision
    # we need to limit our results to 12.
    # The solution : given a precision target, increment precision with a
    # computed value so that all digits of he result are exacts.
    # 
    # p is the precision
    # pk is the precision increment
    # 2 power pk is also the maximum number of iterations
    # for a number close to 1 but lower than 1,
    # (denom-num)/denum is (in our case) lower than 1/5
    # so the maximum nb of iterations is for:
    # 1/5*(1+1/5*(1/2+1/5*(1/3+1/5*(...))))
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
        return $a
    }
    if {[isInt $a]} {
        ::math::bignum::setsign a [expr {![::math::bignum::sign $a]}]
        return $a
    }
    # recursive call
    lset a 1 [opp [lindex $a 1]]
    return $a
}

################################################################################
# gets Pi with precision bits
# after the dot (after you call [tostr] on the result)
################################################################################







|







1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
        return $a
    }
    if {[isInt $a]} {
        ::math::bignum::setsign a [expr {![::math::bignum::sign $a]}]
        return $a
    }
    # recursive call
    lset a 1 [opp [lindex $a 1]] 
    return $a
}

################################################################################
# gets Pi with precision bits
# after the dot (after you call [tostr] on the result)
################################################################################
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
    set pi [pi $xLen 1]
    # $rad/Pi=$deg/180
    # so result in deg = $radians*180/Pi
    return [div [mul $x [::math::bignum::fromstr 180]] $pi]
}

################################################################################
# retourne la partie entière (ou 0) du nombre "number"
################################################################################
proc ::math::bigfloat::round {number} {
    checkFloat number
    #set number [normalize $number]
    # fetching integers (or BigInts) from the internal representation
    foreach {dummy integer exp delta} $number {break}
    if {[::math::bignum::iszero $integer]} {







|







1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
    set pi [pi $xLen 1]
    # $rad/Pi=$deg/180
    # so result in deg = $radians*180/Pi
    return [div [mul $x [::math::bignum::fromstr 180]] $pi]
}

################################################################################
# retourne la partie entière (ou 0) du nombre "number"
################################################################################
proc ::math::bigfloat::round {number} {
    checkFloat number
    #set number [normalize $number]
    # fetching integers (or BigInts) from the internal representation
    foreach {dummy integer exp delta} $number {break}
    if {[::math::bignum::iszero $integer]} {
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
################################################################################
proc ::math::bigfloat::_sin {x precision delta} {
    # $s holds the result
    set s $x
    # sin(x) = x - x^3/3! + x^5/5! - ... + (-1)^n*x^(2n+1)/(2n+1)!
    #        = x * (1 - x^2/(2*3) * (1 - x^2/(4*5) * (...* (1 - x^2/(2n*(2n+1)) )...)))
    # The second expression allows us to compute the less we can

    # $double holds the uncertainty (Delta) of x^2 : 2*(Mantissa*Delta) + Delta^2
    # (Mantissa+Delta)^2=Mantissa^2 + 2*Mantissa*Delta + Delta^2
    set double [::math::bignum::rshift [::math::bignum::mul $x $delta] [expr {$precision-1}]]
    set double [::math::bignum::add [::math::bignum::add 1 $double] [::math::bignum::rshift \
            [::math::bignum::mul $delta $delta] $precision]]
    # $x holds the Mantissa of x^2
    set x [intMulShift $x $x $precision]







|







1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
################################################################################
proc ::math::bigfloat::_sin {x precision delta} {
    # $s holds the result
    set s $x
    # sin(x) = x - x^3/3! + x^5/5! - ... + (-1)^n*x^(2n+1)/(2n+1)!
    #        = x * (1 - x^2/(2*3) * (1 - x^2/(4*5) * (...* (1 - x^2/(2n*(2n+1)) )...)))
    # The second expression allows us to compute the less we can
    
    # $double holds the uncertainty (Delta) of x^2 : 2*(Mantissa*Delta) + Delta^2
    # (Mantissa+Delta)^2=Mantissa^2 + 2*Mantissa*Delta + Delta^2
    set double [::math::bignum::rshift [::math::bignum::mul $x $delta] [expr {$precision-1}]]
    set double [::math::bignum::add [::math::bignum::add 1 $double] [::math::bignum::rshift \
            [::math::bignum::mul $delta $delta] $precision]]
    # $x holds the Mantissa of x^2
    set x [intMulShift $x $x $precision]
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
    set result [::math::bignum::abs $integer]
    # rounded 'integer' +/- 'delta'
    set up [::math::bignum::add $result $delta]
    set down [::math::bignum::sub $result $delta]
    if {[sign $up]^[sign $down]} {
        # $up>0 and $down<0 and vice-versa : then the number is considered equal to zero
		# delta <= 2**n (n = bits(delta))
		# 2**n  <= 10**exp , then
		# exp >= n.log(2)/log(10)
		# delta <= 10**(n.log(2)/log(10))
        incr exp [expr {int(ceil([::math::bignum::bits $delta]*log(2)/log(10)))}]
        set result 0
        set isZero yes
    } else {
		# iterate until the convergence of the rounding







|







2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
    set result [::math::bignum::abs $integer]
    # rounded 'integer' +/- 'delta'
    set up [::math::bignum::add $result $delta]
    set down [::math::bignum::sub $result $delta]
    if {[sign $up]^[sign $down]} {
        # $up>0 and $down<0 and vice-versa : then the number is considered equal to zero
		# delta <= 2**n (n = bits(delta))
		# 2**n  <= 10**exp , then 
		# exp >= n.log(2)/log(10)
		# delta <= 10**(n.log(2)/log(10))
        incr exp [expr {int(ceil([::math::bignum::bits $delta]*log(2)/log(10)))}]
        set result 0
        set isZero yes
    } else {
		# iterate until the convergence of the rounding

Changes to modules/math/bigfloat.test.

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
########################################################################

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

support {
    useLocal math.tcl   math
    useLocal bignum.tcl math::bignum
}
testing {







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
########################################################################

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 1.0

support {
    useLocal math.tcl   math
    useLocal bignum.tcl math::bignum
}
testing {
115
116
117
118
119
120
121

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
######################################################
# Begin testsuite
######################################################

# adds 999..9 and 1 -> 1000..0
for {set i 1} {$i<15} {incr i} {
    assert add 1.0.$i {

	tostr [add [fromstr [string repeat 999 $i]] [fromstr 1]]
    } 1[string repeat 000 $i] ; # {}
}

# sub 1000..0 1 -> 999..9
for {set i 1} {$i<15} {incr i} {
    assert sub 1.1.$i {
	tostr [sub [fromstr 1[string repeat 000 $i]] [fromstr 1]]
    } [string repeat 999 $i] ; # {}
}

# mul 10001000..1000 with 1..9
for {set i 1} {$i<15} {incr i} {
    foreach j {1 2 3 4 5 6 7 8 9} {
	assert mul 1.2.$i.$j \
	    {tostr [mul [fromstr [string repeat 1000 $i]] [fromstr $j]]} \
	    [string repeat ${j}000 $i]
    }
}

# div 10^8 by 1 .. 9
for {set i 1} {$i<=9} {incr i} {
    assert div 1.3.$i {tostr [div [fromstr 100000000] [fromstr $i]]} [expr {wide(100000000)/$i}]
}







>
|













<
|
|







115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136

137
138
139
140
141
142
143
144
145
######################################################
# Begin testsuite
######################################################

# adds 999..9 and 1 -> 1000..0
for {set i 1} {$i<15} {incr i} {
    assert add 1.0.$i {
	tostr [add \
		[fromstr [string repeat 999 $i]] [fromstr 1]]
    } 1[string repeat 000 $i] ; # {}
}

# sub 1000..0 1 -> 999..9
for {set i 1} {$i<15} {incr i} {
    assert sub 1.1.$i {
	tostr [sub [fromstr 1[string repeat 000 $i]] [fromstr 1]]
    } [string repeat 999 $i] ; # {}
}

# mul 10001000..1000 with 1..9
for {set i 1} {$i<15} {incr i} {
    foreach j {1 2 3 4 5 6 7 8 9} {

	assert mul 1.2.$i.$j {tostr [mul [fromstr [string repeat 1000 $i]] [fromstr $j]]} \
		[string repeat ${j}000 $i]
    }
}

# div 10^8 by 1 .. 9
for {set i 1} {$i<=9} {incr i} {
    assert div 1.3.$i {tostr [div [fromstr 100000000] [fromstr $i]]} [expr {wide(100000000)/$i}]
}
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
################################################################################

fassert fromstr 2.0 {todouble [fromstr 1.0e+099]} 1.0e+099
fassert fromstr 2.0a {todouble [fromstr 1.0e99]} 1.0e99
fassert fromstr 2.0b {todouble [fromstr 1.0e-99]} 1.0e-99
fassert fromstr 2.0c {todouble [fromstr 1.0e-099]} 1.0e-99

foreach {x rx r} {
    0    0  {bignum 0 0}
    0.0  0. {F {bignum 0 0} -8 {bignum 0 26}}
    .0   0. {F {bignum 0 0} -8 {bignum 0 26}}
    +0   0  {bignum 0 0}
    +0.0 0. {F {bignum 0 0} -8 {bignum 0 26}}
    +.0  0. {F {bignum 0 0} -8 {bignum 0 26}}
    -0   0  {bignum 0 0}
    -0.0 0. {F {bignum 1 0} -8 {bignum 0 26}}
    -.0  0. {F {bignum 1 0} -8 {bignum 0 26}}
} {
    test bigfloat-fromstr-3.[incr k] {fromstr zeroes} {
	fromstr $x
    } $r

    test bigfloat-fromstr-4.${k} {fromstr zeroes as double} {
	tostr [fromstr $x]
    } $rx
}
unset k

################################################################################
# fromdouble with precision
################################################################################

assert fromdouble 2.1 {tostr [ceil [fromdouble 1.0e99 100]]} 1[zero 99]
assert fromdouble 2.1a {tostr [fromdouble 1.11 3]} 1.11
assert fromdouble 2.1b {tostr [fromdouble +1.11 3]} 1.11







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







154
155
156
157
158
159
160





















161
162
163
164
165
166
167
################################################################################

fassert fromstr 2.0 {todouble [fromstr 1.0e+099]} 1.0e+099
fassert fromstr 2.0a {todouble [fromstr 1.0e99]} 1.0e99
fassert fromstr 2.0b {todouble [fromstr 1.0e-99]} 1.0e-99
fassert fromstr 2.0c {todouble [fromstr 1.0e-099]} 1.0e-99






















################################################################################
# fromdouble with precision
################################################################################

assert fromdouble 2.1 {tostr [ceil [fromdouble 1.0e99 100]]} 1[zero 99]
assert fromdouble 2.1a {tostr [fromdouble 1.11 3]} 1.11
assert fromdouble 2.1b {tostr [fromdouble +1.11 3]} 1.11
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
	fassert abs $version {
	    tostr [abs [fromstr $x]]
	} [expr {abs($x)}] ; # {}
    } else {
	assert abs $version {
	    tostr [abs [fromstr $x]]
	} [expr {($x<0)?(-$x):$x}] ; # {}
    }
}

absTest 2.2a 1.000
absTest 2.2b -1.000
absTest 2.2c -0.10
absTest 2.2d 0 1
absTest 2.2e 1 1







|







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
	fassert abs $version {
	    tostr [abs [fromstr $x]]
	} [expr {abs($x)}] ; # {}
    } else {
	assert abs $version {
	    tostr [abs [fromstr $x]]
	} [expr {($x<0)?(-$x):$x}] ; # {}
    }	    
}

absTest 2.2a 1.000
absTest 2.2b -1.000
absTest 2.2c -0.10
absTest 2.2d 0 1
absTest 2.2e 1 1
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
rename powTest ""


################################################################################
# pi constant and angles conversion
################################################################################
fassert pi 3.8.0 {todouble [pi 16]} [expr {atan(1)*4}]
# converts Pi -> 180°
fassert rad2deg 3.8.1 {todouble [rad2deg [pi 20]]} 180.0
# converts 180° -> Pi
fassert deg2rad 3.8.2 {todouble [deg2rad [fromstr 180.0 20]]} [expr {atan(1.0)*4}]


################################################################################
# iszero : the precision is too small to determinate the number
################################################################################








|

|







501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
rename powTest ""


################################################################################
# pi constant and angles conversion
################################################################################
fassert pi 3.8.0 {todouble [pi 16]} [expr {atan(1)*4}]
# converts Pi -> 180°
fassert rad2deg 3.8.1 {todouble [rad2deg [pi 20]]} 180.0
# converts 180° -> Pi
fassert deg2rad 3.8.2 {todouble [deg2rad [fromstr 180.0 20]]} [expr {atan(1.0)*4}]


################################################################################
# iszero : the precision is too small to determinate the number
################################################################################

698
699
700
701
702
703
704
705
rename assert ""
rename fassert ""
rename Zero ""

testsuiteCleanup

set ::tcl_precision $old_precision
return







<
677
678
679
680
681
682
683

rename assert ""
rename fassert ""
rename Zero ""

testsuiteCleanup

set ::tcl_precision $old_precision

Changes to modules/math/bigfloat2.tcl.

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
    # cached constants
    # ln(2) with arbitrary precision
    variable Log2
    # Pi with arb. precision
    variable Pi
    variable _pi0
}




################################################################################
# procedures that handle floating-point numbers
# these procedures are sorted by name (after eventually removing the underscores)
#
# BigFloats are internally represented as a list :
# {"F" Mantissa Exponent Delta} where "F" is a character which
# determines the datatype, Mantissa and Delta are two big integers and
# Exponent another integer.
#
# The BigFloat value equals to (Mantissa +/- Delta)*2^Exponent
# So the internal representation is binary, but trying to get as close
# as possible to the decimal one when converted to a string.  When
# calling [fromstr], the Delta parameter is set to the value of 1 at
# the position of the last decimal digit.
#
# Example : 1.50 belongs to [1.49,1.51], but internally Delta may not equal to 1.
# Because of the binary representation, it is between 1 and 1+(2^-15).
#
# So Mantissa and Delta are not limited in size, but in practice Delta
# is kept under 2^32 by the 'normalize' procedure, to avoid a
# never-ended growth of memory used.  Indeed, when you perform some
# computations, the Delta parameter (which represent the uncertainty
# on the value of the Mantissa) may increase.  Exponent, as an
# integer, is limited to 32 bits, and this limit seems fair.  The
# exponent is indeed involved in logarithmic computations, so it may
# be a mistake to give it a too large value.

# Retrieving the parameters of a BigFloat is often done with that command :
# foreach {dummy int exp delta} $bigfloat {break}
# (dummy is not used, it is just used to get the "F" marker).
# The isInt, isFloat, checkNumber and checkFloat procedures are used
# to check data types
#







>
>
>






|
|
<


|
|
|
|
<



|
|
<
|
|
|
|
|







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
    # cached constants
    # ln(2) with arbitrary precision
    variable Log2
    # Pi with arb. precision
    variable Pi
    variable _pi0
}




################################################################################
# procedures that handle floating-point numbers
# these procedures are sorted by name (after eventually removing the underscores)
#
# BigFloats are internally represented as a list :
# {"F" Mantissa Exponent Delta} where "F" is a character which determins
# the datatype, Mantissa and Delta are two big integers and Exponent another integer.

#
# The BigFloat value equals to (Mantissa +/- Delta)*2^Exponent
# So the internal representation is binary, but trying to get as close as possible to
# the decimal one when converted to a string.
# When calling [fromstr], the Delta parameter is set to the value of 1 at the position
# of the last decimal digit.

# Example : 1.50 belongs to [1.49,1.51], but internally Delta may not equal to 1.
# Because of the binary representation, it is between 1 and 1+(2^-15).
#
# So Mantissa and Delta are not limited in size, but in practice Delta is kept under
# 2^32 by the 'normalize' procedure, to avoid a never-ended growth of memory used.

# Indeed, when you perform some computations, the Delta parameter (which represent
# the uncertainty on the value of the Mantissa) may increase.
# Exponent, as an integer, is limited to 32 bits, and this limit seems fair.
# The exponent is indeed involved in logarithmic computations, so it may be
# a mistake to give it a too large value.

# Retrieving the parameters of a BigFloat is often done with that command :
# foreach {dummy int exp delta} $bigfloat {break}
# (dummy is not used, it is just used to get the "F" marker).
# The isInt, isFloat, checkNumber and checkFloat procedures are used
# to check data types
#
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
    # take account of trailing zeros
    incr exp -$addzeros
    # multiply $number by 10^$trailingZeros
    append mantissa [string repeat 0 $addzeros]
    # add the sign
    # here we avoid octal numbers by trimming the leading zeros!
    # 2005-10-28 S.ARNOLD
    # note however, for a -0 we may be left with an empty mantissa
    # Ticket [ca6a2cfef5d6e742177add4954c748170b86a02d]
    if {$signe} {
	set mantissa -[string trimleft $mantissa 0]
	if {$mantissa eq "-"} { set mantissa -0 }
    }
    # the F tags a BigFloat
    # a BigInt is like any other integer since Tcl 8.5,
    # because expr now supports arbitrary length integers
    return [_fromstr $mantissa $exp]
}

################################################################################







<
<
<
|
<
<







1048
1049
1050
1051
1052
1053
1054



1055


1056
1057
1058
1059
1060
1061
1062
    # take account of trailing zeros
    incr exp -$addzeros
    # multiply $number by 10^$trailingZeros
    append mantissa [string repeat 0 $addzeros]
    # add the sign
    # here we avoid octal numbers by trimming the leading zeros!
    # 2005-10-28 S.ARNOLD



    if {$signe} {set mantissa [expr {-[string trimleft $mantissa 0]}]}


    # the F tags a BigFloat
    # a BigInt is like any other integer since Tcl 8.5,
    # because expr now supports arbitrary length integers
    return [_fromstr $mantissa $exp]
}

################################################################################
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
    }
    # $rad/Pi=$deg/180
    # so result in deg = $radians*180/Pi
    return [div [mul $x 180] [pi $xLen 1]]
}

################################################################################
# retourne la partie entière (ou 0) du nombre "number"
################################################################################
proc ::math::bigfloat::round {number} {
    checkFloat $number
    #set number [normalize $number]
    # fetching integers (or BigInts) from the internal representation
    foreach {dummy integer exp delta} $number {break}
    if {$integer==0} {







|







1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
    }
    # $rad/Pi=$deg/180
    # so result in deg = $radians*180/Pi
    return [div [mul $x 180] [pi $xLen 1]]
}

################################################################################
# retourne la partie entière (ou 0) du nombre "number"
################################################################################
proc ::math::bigfloat::round {number} {
    checkFloat $number
    #set number [normalize $number]
    # fetching integers (or BigInts) from the internal representation
    foreach {dummy integer exp delta} $number {break}
    if {$integer==0} {
2216
2217
2218
2219
2220
2221
2222
2223
        namespace export $function
    }
}

# (AM) No "namespace import" - this should be left to the user!
#namespace import ::math::bigfloat::*

package provide math::bigfloat 2.0.3







|
2211
2212
2213
2214
2215
2216
2217
2218
        namespace export $function
    }
}

# (AM) No "namespace import" - this should be left to the user!
#namespace import ::math::bigfloat::*

package provide math::bigfloat 2.0.2

Changes to modules/math/bigfloat2.test.

61
62
63
64
65
66
67


68
69
70
71
72
73
74


######################################################
# Begin testsuite
######################################################

proc testSuite {} {


    # adds 999..9 and 1 -> 1000..0
    for {set i 1} {$i<15} {incr i} {
        assert add 1.0 {tostr [add \
                    [fromstr [string repeat 999 $i]] [fromstr 1]]
        } 1[string repeat 000 $i]
    }
    # sub 1000..0 1 -> 999..9







>
>







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


######################################################
# Begin testsuite
######################################################

proc testSuite {} {


    # adds 999..9 and 1 -> 1000..0
    for {set i 1} {$i<15} {incr i} {
        assert add 1.0 {tostr [add \
                    [fromstr [string repeat 999 $i]] [fromstr 1]]
        } 1[string repeat 000 $i]
    }
    # sub 1000..0 1 -> 999..9
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    for {set i 1} {$i<=9} {incr i} {
        assert mod 1.4 {tostr [mod [fromstr 100000000] [fromstr $i]]} [expr {wide(100000000)%$i}]
    }

    ################################################################################
    # fromstr problem with octal exponents
    ################################################################################
    fassert fromstr 2.0  {todouble [fromstr 1.0e+099]} 1.0e+099
    fassert fromstr 2.0a {todouble [fromstr 1.0e99]} 1.0e99
    fassert fromstr 2.0b {todouble [fromstr 1.0e-99]} 1.0e-99
    fassert fromstr 2.0c {todouble [fromstr 1.0e-099]} 1.0e-99

    foreach {x rx r} {
	0    0  0
	0.0  0. {F 0 -18 32768}
	.0   0. {F 0 -18 32768}
	+0   0  0
	+0.0 0. {F 0 -18 32768}
	+.0  0. {F 0 -18 32768}
	-0   -0 -0
	-0.0 0. {F 0 -19 52430}
	-.0  0. {F 0 -19 52430}
    } {
	test bigfloat2-fromstr-3.[incr k] {fromstr zeroes} {
	    fromstr $x
	} $r

	test bigfloat2-fromstr-4.${k} {fromstr zeroes as double} {
	    tostr [fromstr $x]
	} $rx
    }
    unset k

    ################################################################################
    # fromdouble with precision
    ################################################################################
    assert fromdouble 2.1  {tostr [ceil [fromdouble 1.0e99 100]]} 1[zero 99]
    assert fromdouble 2.1a {tostr [fromdouble 1.11 3]} 1.11
    assert fromdouble 2.1b {tostr [fromdouble +1.11 3]} 1.11
    assert fromdouble 2.1c {tostr [fromdouble -1.11 3]} -1.11
    assert fromdouble 2.1d {tostr [fromdouble +01.11 3]} 1.11
    assert fromdouble 2.1e {tostr [fromdouble -01.11 3]} -1.11
    # more to come...
    fassert fromdouble 2.1f {compare [fromdouble [expr {atan(1.0)*4}]] [pi $::tcl_precision]} 0







|




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|







95
96
97
98
99
100
101
102
103
104
105
106




















107
108
109
110
111
112
113
114
115
116
117
118
    for {set i 1} {$i<=9} {incr i} {
        assert mod 1.4 {tostr [mod [fromstr 100000000] [fromstr $i]]} [expr {wide(100000000)%$i}]
    }

    ################################################################################
    # fromstr problem with octal exponents
    ################################################################################
    fassert fromstr 2.0 {todouble [fromstr 1.0e+099]} 1.0e+099
    fassert fromstr 2.0a {todouble [fromstr 1.0e99]} 1.0e99
    fassert fromstr 2.0b {todouble [fromstr 1.0e-99]} 1.0e-99
    fassert fromstr 2.0c {todouble [fromstr 1.0e-099]} 1.0e-99






















    ################################################################################
    # fromdouble with precision
    ################################################################################
    assert fromdouble 2.1 {tostr [ceil [fromdouble 1.0e99 100]]} 1[zero 99]
    assert fromdouble 2.1a {tostr [fromdouble 1.11 3]} 1.11
    assert fromdouble 2.1b {tostr [fromdouble +1.11 3]} 1.11
    assert fromdouble 2.1c {tostr [fromdouble -1.11 3]} -1.11
    assert fromdouble 2.1d {tostr [fromdouble +01.11 3]} 1.11
    assert fromdouble 2.1e {tostr [fromdouble -01.11 3]} -1.11
    # more to come...
    fassert fromdouble 2.1f {compare [fromdouble [expr {atan(1.0)*4}]] [pi $::tcl_precision]} 0
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
    rename powTest ""


    ################################################################################
    # pi constant and angles conversion
    ################################################################################
    fassert pi 3.8.0 {todouble [pi 16]} [expr {atan(1)*4}]
    # converts Pi -> 180°
    fassert rad2deg 3.8.1 {todouble [rad2deg [pi 20]]} 180.0
    # converts 180° -> Pi
    fassert deg2rad 3.8.2 {todouble [deg2rad [fromstr 180.0 20]]} [expr {atan(1.0)*4}]


    ################################################################################
    # iszero : the precision is too small to determinate the number
    ################################################################################








|

|







448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
    rename powTest ""


    ################################################################################
    # pi constant and angles conversion
    ################################################################################
    fassert pi 3.8.0 {todouble [pi 16]} [expr {atan(1)*4}]
    # converts Pi -> 180°
    fassert rad2deg 3.8.1 {todouble [rad2deg [pi 20]]} 180.0
    # converts 180° -> Pi
    fassert deg2rad 3.8.2 {todouble [deg2rad [fromstr 180.0 20]]} [expr {atan(1.0)*4}]


    ################################################################################
    # iszero : the precision is too small to determinate the number
    ################################################################################

651
652
653
654
655
656
657
658

rename assert ""
rename fassert ""
rename Zero ""

testsuiteCleanup

set ::tcl_precision $old_precision
return








|
>
633
634
635
636
637
638
639
640
641
rename assert ""
rename fassert ""
rename Zero ""

testsuiteCleanup

set ::tcl_precision $old_precision


Changes to modules/math/bignum.man.

220
221
222
223
224
225
226
227
228
[call [cmd ::math::bignum::bits] [arg bignum]]
Return the number of bits needed to represent bignum in radix 2.

[list_end]
[para]

[vset CATEGORY {math :: bignum}]
[include ../common-text/feedback.inc]
[manpage_end]







|

220
221
222
223
224
225
226
227
228
[call [cmd ::math::bignum::bits] [arg bignum]]
Return the number of bits needed to represent bignum in radix 2.

[list_end]
[para]

[vset CATEGORY {math :: bignum}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/bignum.test.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- tcl -*-
# bignum.test --
#    Test cases for the ::math::bignum package
#

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal bignum.tcl math::bignum











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- tcl -*-
# bignum.test --
#    Test cases for the ::math::bignum package
#

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal bignum.tcl math::bignum

Changes to modules/math/calculus.man.

1
2
3
4
5
6
7
8
[vset VERSION 0.8.2]
[manpage_begin math::calculus n [vset VERSION]]
[see_also romberg]
[keywords calculus]
[keywords {differential equations}]
[keywords integration]
[keywords math]
[keywords roots]
|







1
2
3
4
5
6
7
8
[vset VERSION 0.8.1]
[manpage_begin math::calculus n [vset VERSION]]
[see_also romberg]
[keywords calculus]
[keywords {differential equations}]
[keywords integration]
[keywords math]
[keywords roots]
443
444
445
446
447
448
449
450
451
   set length 100.0

   set y [lb]::math::calculus::boundaryValueSecondOrder \
      coeffs force {0.0 1.0} [lb]list $length 0.0[rb] 100[rb]
[example_end]

[vset CATEGORY {math :: calculus}]
[include ../common-text/feedback.inc]
[manpage_end]







|

443
444
445
446
447
448
449
450
451
   set length 100.0

   set y [lb]::math::calculus::boundaryValueSecondOrder \
      coeffs force {0.0 1.0} [lb]list $length 0.0[rb] 100[rb]
[example_end]

[vset CATEGORY {math :: calculus}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/calculus.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# calculus.tcl --
#    Package that implements several basic numerical methods, such
#    as the integration of a one-dimensional function and the
#    solution of a system of first-order differential equations.
#
# Copyright (c) 2002, 2003, 2004, 2006 by Arjen Markus.
# Copyright (c) 2004 by Kevin B. Kenny.  All rights reserved.
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: calculus.tcl,v 1.15 2008/10/08 03:30:48 andreas_kupries Exp $

package require Tcl 8.5;# lrepeat
package require math::interpolate
package provide math::calculus 0.8.2

# math::calculus --
#    Namespace for the commands

namespace eval ::math::calculus {

    namespace import ::math::interpolate::neville












|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# calculus.tcl --
#    Package that implements several basic numerical methods, such
#    as the integration of a one-dimensional function and the
#    solution of a system of first-order differential equations.
#
# Copyright (c) 2002, 2003, 2004, 2006 by Arjen Markus.
# Copyright (c) 2004 by Kevin B. Kenny.  All rights reserved.
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: calculus.tcl,v 1.15 2008/10/08 03:30:48 andreas_kupries Exp $

package require Tcl 8.4
package require math::interpolate
package provide math::calculus 0.8.1

# math::calculus --
#    Namespace for the commands

namespace eval ::math::calculus {

    namespace import ::math::interpolate::neville

Changes to modules/math/calculus.test.

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

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

support {
    useLocal math.tcl        math
    useLocal interpolate.tcl math::interpolate
}
testing {
    useLocal calculus.tcl math::calculus
}

# -------------------------------------------------------------------------

package require log
log::lvSuppress notice

# -------------------------------------------------------------------------

namespace eval ::math::calculus::test {
# From here on we are in a namespace.
    
namespace import ::tcltest::test
namespace import ::math::calculus::*

set prec $::tcl_precision
if {![package vsatisfies [package provide Tcl] 8.5]} {
    set ::tcl_precision 17
} else {







|


















<
|







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

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.1

support {
    useLocal math.tcl        math
    useLocal interpolate.tcl math::interpolate
}
testing {
    useLocal calculus.tcl math::calculus
}

# -------------------------------------------------------------------------

package require log
log::lvSuppress notice

# -------------------------------------------------------------------------

namespace eval ::math::calculus::test {


namespace import ::tcltest::test
namespace import ::math::calculus::*

set prec $::tcl_precision
if {![package vsatisfies [package provide Tcl] 8.5]} {
    set ::tcl_precision 17
} else {
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
            set match 0
            break
        }
    }
    return $match
}

# customMatch does not do namespaced command resolution, provide the FQN.
customMatch numbers ::math::calculus::test::matchNumbers

#
# Simple test functions - exact result predictable!
#
proc const_func { x } {
   return 1
}







<
|







54
55
56
57
58
59
60

61
62
63
64
65
66
67
68
            set match 0
            break
        }
    }
    return $match
}


customMatch numbers matchNumbers

#
# Simple test functions - exact result predictable!
#
proc const_func { x } {
   return 1
}
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
         set match 0
         break
      }
   }
   return $match
}

# customMatch does not do namespaced command resolution, provide the FQN.
customMatch numbers ::math::calculus::test::matchNumbers

proc ::f1 {x} {expr {1.0-$x}}
proc ::f2 {x} {expr {1.0-$x*$x}}
proc ::f3 {x} {expr {cos($x)}}

test "regula-1.0" "Zero of linear function" \
   -match numbers -body {







<
|







599
600
601
602
603
604
605

606
607
608
609
610
611
612
613
         set match 0
         break
      }
   }
   return $match
}


customMatch numbers matchNumbers

proc ::f1 {x} {expr {1.0-$x}}
proc ::f2 {x} {expr {1.0-$x*$x}}
proc ::f3 {x} {expr {cos($x)}}

test "regula-1.0" "Zero of linear function" \
   -match numbers -body {

Deleted modules/math/changepoint.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin math::changepoint n 0.1]
[keywords statistics]
[keywords control]
[copyright {2020 by Arjen Markus}]
[moddesc   {Tcl Math Library}]
[titledesc {Change point detection methods}]
[category  Mathematics]
[require Tcl 8.6]
[require TclOO]
[require math::statistics]
[require math::changepoint [opt 0.1]]

[description]
[para]
The [package math::changepoint] package implements a number of well-known methods
to determine if a series of data contains a shift in the mean or not. Note that
these methods only indicate if a shift in the mean is probably. Due to the stochastic
nature of the data that will be analysed, false positives are possible.

The CUSUM method is implemented in both an "offline" and an "online" version, so that
it can be used either for a complete data series or for detecting changes in data that
come in one by one. The implementation has been based on these websites mostly:

[list_begin itemized]
[item]
[uri https://www.itl.nist.gov/div898/handbook/pmc/section3/pmc323.htm]
[item]
[uri https://en.wikipedia.org/wiki/CUSUM]
[list_end]

Basically, the deviation of the data from a given target value is accumulated and when
the total deviation becomes too large, a change point is reported.

A second method, binary segmentation, is implemented only as an "offline" method, as it
needs to examine the data series as a whole. In the variant contained here the following
ideas have been used:
[list_begin itemized]
[item]
The segments in which the data series may be separated shold not be too short, otherwise
the ultimate result could be segments of only one data point long. So a minimum length is
used.
[item]
To make the segmentation worthwhile there should be a minimum gain in reducing the cost
function (the sum of the squared deviations from the mean for each segment).
[list_end]

This may not be in agreement with the descriptions of the method found in various
publications, but it is simple to understand and intuitive.

One publication that provides more information on the method in general is
"Selective review of offline change point detection methods" by Truong et al. [uri https://arxiv.org/abs/1801.00718].


[section "PROCEDURES"]

The package defines the following public procedures:

[list_begin definitions]

[call [cmd ::math::changepoint::cusum-detect] [arg data] [opt args]]

Examine a given data series and return the location of the first change (if any)

[list_begin arguments]
[arg_def double data] Series of data to be examined
[arg_def list args] Optional list of key-value pairs:
[list_begin definitions]
[def "[option -target] [arg value]"] The target (or mean) for the time series
[def "[option -tolerance] [arg value]"] The tolerated standard deviation
[def "[option -kfactor] [arg value]"] The factor by which to multiply the standard deviation (defaults to 0.5, typically between 0.5 and 1.0)
[def "[option -hfactor] [arg value]"] The factor determining the limits betweem which the "cusum" statistic is accepted (typicaly 3.0-5.0, default 4.0)
[list_end]
[list_end]


[call [cmd ::math::changepoint::cusum-online] [opt args]]

Class to examine data passed in against expected properties. At least the keywords [term -target] and [term -tolerance] must be given.

[list_begin arguments]
[arg_def list args] List of key-value pairs:
[list_begin definitions]
[def "[option -target] [arg value]"] The target (or mean) for the time series
[def "[option -tolerance] [arg value]"] The tolerated standard deviation
[def "[option -kfactor] [arg value]"] The factor by which to multiply the standard deviation (defaults to 0.5, typically between 0.5 and 1.0)
[def "[option -hfactor] [arg value]"] The factor determining the limits betweem which the "cusum" statistic is accepted (typicaly 3.0-5.0, default 4.0)
[list_end]
[list_end]


[call [cmd \$cusumObj] examine [arg value]]

Pass a value to the [term cusum-online] object and examine it. If, with this new value, the cumulative sum remains within the bounds,
zero (0) is returned, otherwise one (1) is returned.

[list_begin arguments]
[arg_def double value] The new value
[list_end]


[call [cmd \$cusumObj] reset]

Reset the cumulative sum, so that the examination can start afresh.


[call [cmd ::math::changepoint::binary-segmentation] [arg data] [opt args]]

Apply the binary segmentation method recursively to find change points. Returns a list of indices of potential change points

[list_begin arguments]
[arg_def list data] Data to be examined
[arg_def list args] Optional key-value pairs:
[list_begin definitions]
[def "[option -minlength] [arg number]"]  Minimum number of points in each segment (default: 5)
[def "[option -threshold] [arg value]"]   Factor applied to the standard deviation functioning as a threshold for accepting the change in cost function as an improvement (default: 1.0)
[list_end]
[list_end]


[list_end]

[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































Deleted modules/math/changepoint.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# changepoint.tcl --
#     Statistical procedures for change point detection:
#     - Implementation of the CUSUM procedure to detect changes in the
#       mean of a series of data
#
#       Partly based on: https://www.itl.nist.gov/div898/handbook/pmc/section3/pmc323.htm
#
#       Note:
#       Since there do not seem to be online resources for the finer details, the
#       implementation uses simple guidelines as found for instance at
#       https://en.wikipedia.org/wiki/CUSUM.
#
#       There are two commands:
#       - One to examine a complete time series
#       - One (OO style) to examine data from a time series online
#
#    - Implementation of the binary segmentation algorithm
#

package require Tcl 8.6
package require TclOO
package require math::statistics
package provide math::changepoint 0.1

namespace eval ::math::changepoint {
    namespace export cusum-detect cusum-online binary-segmentation
}

# cusum-detect --
#     Procedure to examine a given data series and return the location
#     of the first change (if any)
#
# Arguments:
#     data                    List of values to be examined
#     args                    (Optional) key-value pairs to define the parameters:
#                             -target value    -- the target (or mean) for the time series
#                             -tolerance value -- the tolerated standard deviation
#                             -kfactor         -- the factor by which to multiply the
#                                                 standard deviation (defaults to 0.5,
#                                                 typically between 0.5 and 1.0
#                             -hfactor         -- the factor determining the limits
#                                                 betweem which the "cusum" statistic
#                                                 is accepted (typicaly 3.0-5.0, default 4.0)
#
# Result:
#     Index of the location of the first change or an empty string
#
# Note:
#     The CUSUM procedure is rather sensitive and details regarding the limits differ
#     between descriptions. This is a straightforward implementation.
#
#     If no options are given, the given time series is used for the target and the
#     tolerance.
#
#     Because of the senstivity using the raw data may give spurious results.
#
proc ::math::changepoint::cusum-detect {data args} {

    set kfactor   0.5
    set hfactor   4.0

    set target    {}
    set tolerance {}

    foreach {key value} $args {
        if { [string match "-*" $key] } {
            set name [string range $key 1 end]
            set $name $value
        } else {
            return -code error "Unknown/invalid option: $key"
        }
    }

    if { $target eq {} } {
        set target [::math::statistics::mean $data]
    }

    if { $tolerance eq {} } {
        set tolerance [::math::statistics::stdev $data]
    }

    set k [expr {$kfactor * $tolerance}]
    set h [expr {$hfactor * $tolerance}]

    set Shi 0.0
    set Slo 0.0

    set location {}
    set index    0
    foreach value $data {
        set Shi [expr {max( 0.0, $Shi + $value - $target - $k )}]
        set Slo [expr {max( 0.0, $Slo + $target - $value - $k )}]

        if { $Shi > $h || $Slo > $h } {
            set location $index
            break
        }

        incr index
    }

    return $location
}

# cusum-online --
#     Class to examine data passed in against expected properties
#
# Arguments:
#     data                    List of values to be examined
#     args                    (Optional) key-value pairs to define the parameters:
#                             -target value    -- the target (or mean) for the time series
#                             -tolerance value -- the tolerated standard deviation
#                             -kfactor         -- the factor by which to multiply the
#                                                 standard deviation (defaults to 0.5,
#                                                 typically between 0.5 and 1.0
#                             -hfactor         -- the factor determining the limits
#                                                 betweem which the "cusum" statistic
#                                                 is accepted (typicaly 3.0-5.0, default 4.0)
#
# Result:
#     Index of the location of the first change or an empty string
#
# Note:
#     All parameters used in this algorithm are set to default values.
#     The threshold are based on 3 * stdev and a quick detection of
#     a change of 1 * stdev.
#
::oo::class create ::math::changepoint::cusum-online {
    variable target    {}
    variable tolerance {}
    variable Slo       0.0
    variable Shi       0.0
    variable k         0.0
    variable h         0.0

    #
    # Constructor:
    # - two key-value pairs required: -target and -tolerance
    #
    constructor {args} {
        variable target
        variable tolerance
        variable k
        variable h

        set kfactor 0.5
        set hfactor 4.0

        foreach {option value} $args {
            switch -- $option {
                "-target"    { set target    $value }
                "-tolerance" { set tolerance $value }
                "-kfactor"   { set kfactor   $value }
                "-hfactor"   { set hfactor   $value }
                default {
                    return -code error "Unknown/invalid option: $option"
                }
            }
        }

        if { $target eq {} || $tolerance eq {} } {
            return -code error "Values for target and tolerance are required"
        }

        set k [expr {$kfactor * $tolerance}]
        set h [expr {$hfactor * $tolerance}]

        set Shi 0.0
        set Slo 0.0

    }

    #
    # Restart the object
    #
    method reset {} {
        variable Slo
        variable Shi

        set Shi 0.0
        set Slo 0.0
    }

    #
    # Add a new value to the object and examine it. If the cusum exceeds
    # the range, 1 is returned, otherwise 0.
    #
    method examine {value} {
        variable Slo
        variable Shi
        variable k
        variable h

        set Shi [expr {max( 0.0, $Shi + $value - $target - $k )}]
        set Slo [expr {max( 0.0, $Slo + $target - $value - $k )}]

        return [expr { $Shi > $h || $Slo > $h }]
    }
}

# binary-segmentation --
#     Apply the binary segmentation method recursively to find change points
#
# Arguments:
#     series            The series in question
#     args              Key-value pairs defining the options:
#                       -minlength 5    Minimum number of points in each segment
#                       -threshold 1.0  Factor applied to the standard deviation
#                                       functioning as a threshold for accepting
#                                       the change in cost function as an improvement
# Result:
#     List of indices where change points have been detected
#
proc ::math::changepoint::binary-segmentation {series args} {
    set minlength 5
    set threshold 1.0

    foreach {key value} $args {
        switch -- $key {
            "-minlength" {
                set minlength $value
            }
            "-threshold" {
                set threshold $value
            }
            default {
                return -error "Unknown keyword: $key"
            }
        }
    }

    if { [llength $series] < $minlength } {
        return -error "Series too short - at least $minlength values expected"
    }

    #
    # The real work is done by this procedure
    #
    set indices [BinSegRecursive 0 $series $minlength $threshold]

    return $indices
}

# BinSegRecursive --
#     Procedure for doing the actual work
#
# Arguments:
#     first            Index of the first value in the segment wrt the original series
#     series           Series/segment to be examined
#     minlength        Minimum length
#     threshold        Factor for the standard deviation
#
proc ::math::changepoint::BinSegRecursive {first series minlength threshold} {

    set length [llength $series]

    if { $length < $minlength } {
        return {}
    }

    #
    # Overall parameters
    #
    set stdev [::math::statistics::stdev $series]
    set idxmin  -1
    set maxcost [expr {$length * $stdev ** 2}]
    set mincost $maxcost

    #
    # Calculate the cost function for each split of the series
    #
    for {set idx $minlength} {$idx < $length-$minlength} {incr idx} {
        set segment1 [lrange $series 0 $idx]
        set segment2 [lrange $series [expr {$idx+1}] end]

        set stdev1   [::math::statistics::stdev $segment1]
        set stdev2   [::math::statistics::stdev $segment2]

        set cost     [expr {($idx+1) * $stdev1**2 + ($length-$idx) * $stdev2**2}]
        if { $cost < $mincost } {
            set mincost $cost
            set idxmin  $idx
        }
    }

    #
    # Do we accept it?
    #
    set indices {}

    if { $maxcost > $mincost + $threshold * $stdev ** 2 } {
        set segment1 [lrange $series 0 $idxmin]
        set segment2 [lrange $series [expr {$idxmin+1}] end]

        set left  [BinSegRecursive [expr {$first+0}]       $segment1 $minlength $threshold]
        set right [BinSegRecursive [expr {$first+$idxmin}] $segment2 $minlength $threshold]

        set indices [list [expr {$first+$idxmin}]]

        if { [llength $left] > 0 } {
            set indices [concat $left $indices]
        }

        if { [llength $right] > 0 } {
            set indices [concat $indices $right]
        }
    }

    return $indices
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































Deleted modules/math/changepoint.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# -*- tcl -*-
# Tests for changepoint library.
#
# RCS: @(#) $Id: geometry.test,v 1.13 2010/04/06 17:02:25 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
        [file dirname [file dirname [file join [pwd] [info script]]]] \
        devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

support {
    useLocal math.tcl math
    useLocal linalg.tcl math::linearalgebra
    useLocal statistics.tcl math::statistics
}
testing {
    useLocal changepoint.tcl math::changepoint
}

# setRand --
#     Make sure we always get the same results:
#     Use srand() to ensure that the random numbers follow
#     the same sequence.
#
proc setRand {} {
    expr {srand(100000)}
}

# test data NIST --
#     From https://www.itl.nist.gov/div898/handbook/pmc/section3/pmc323.htm
#
set testdata {
    324.93
    324.68
    324.73
    324.35
    325.35
    325.23
    324.13
    324.53
    325.23
    324.60
    324.63
    325.15
    328.33
    327.25
    327.83
    328.50
    326.68
    327.78
    326.88
    328.35
}

# test data for binary sgmentation
#
setRand
set series       [concat [lrepeat 20 0.0] [lrepeat 20 1.0]]
set noise        [::math::statistics::random-normal 0.0 1.5 40]
set binsegSeries [lrepeat 40 0.0]

for {set n 0} {$n < 40} {incr n} {
    lset binsegSeries $n [expr {[lindex $series $n] + [lindex $noise $n]}]
}

# actual tests
#
test cusum-1.0 {examine entire data set} -body {
    global testdata

    set location [::math::changepoint::cusum-detect $testdata -target 325 -tolerance 0.635]
} -result 12

test cusum-1.1 {examine the data set one value at a time} -body {
    global testdata

    set cpd [::math::changepoint::cusum-online new -target 325 -tolerance 0.635]

    set loc 0
    foreach value $testdata {
        if { [$cpd examine $value] } {
            break
        }

        incr loc
    }
    set location $loc
} -result 12


test binseg-1.0 {binary segmentation for a series with clear shift} -body {
    global binsegSeries

    ::math::changepoint::binary-segmentation $series
} -result 19

test binseg-1.1 {binary segmentation for a series with clear shift - longer minimum length} -body {
    global binsegSeries

    ::math::changepoint::binary-segmentation $series -minlength 10
} -result 19
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































Changes to modules/math/combinatorics.man.

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
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin math::combinatorics n 2.0]
[moddesc   {Tcl Math Library}]
[titledesc {Combinatorial functions in the Tcl Math Library}]
[category  Mathematics]
[require Tcl 8.2]
[require math [opt 1.2.3]]
[require Tcl 8.6]
[require TclOO]
[require math::combinatorics [opt 2.0]]
[description]
[para]

The [package math] package contains implementations of several
functions useful in combinatorial problems. The [package math::combinatorics]
extends the collections based on features in Tcl 8.6.

Note: the meaning of the partitionP function, Catalan and Stirling numbers is explained on the
[uri http://mathworld.wolfram.com {MathWorld website}]


[section COMMANDS]
[list_begin definitions]

[call [cmd ::math::ln_Gamma] [arg z]]

Returns the natural logarithm of the Gamma function for the argument

|





<
<
<




|
<
<
<
<
<







1
2
3
4
5
6
7



8
9
10
11
12





13
14
15
16
17
18
19
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin math::combinatorics n 1.2.3]
[moddesc   {Tcl Math Library}]
[titledesc {Combinatorial functions in the Tcl Math Library}]
[category  Mathematics]
[require Tcl 8.2]
[require math [opt 1.2.3]]



[description]
[para]

The [package math] package contains implementations of several
functions useful in combinatorial problems.






[section COMMANDS]
[list_begin definitions]

[call [cmd ::math::ln_Gamma] [arg z]]

Returns the natural logarithm of the Gamma function for the argument
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
   Beta(z,w) = Beta(w,z) = Gamma(z) * Gamma(w) / Gamma(z+w)
}]

Results are returned as a floating point number precise to better than
nine significant digits provided that [arg w] and [arg z] are both at
least 1.


[call [cmd ::math::combinatorics::permutations] [arg n]]
Return the number of permutations of n items. The returned number
is always an integer, it is not limited by the range of 32-or 64-bits
integers using the arbitrary precision integers available in Tcl 8.5 and later.

[list_begin arguments]
[arg_def int n] The number of items to be permuted.
[list_end]

[call [cmd ::math::combinatorics::variations] [arg n] [arg k]]
Return the number of variations k items selected from the total of n items.
The order of the items is taken into account.

[list_begin arguments]
[arg_def int n] The number of items to be selected from.
[arg_def int k] The number of items to be selected in each variation.
[list_end]

[call [cmd ::math::combinatorics::combinations] [arg n] [arg k]]
Return the number of combinations of k items selected from the total of n items.
The order of the items is not important.

[list_begin arguments]
[arg_def int n] The number of items to be selected from.
[arg_def int k] The number of items to be selected in each combination.
[list_end]

[call [cmd ::math::combinatorics::derangements] [arg n]]
Return the number of derangements of n items. A derangement is a permutation
where each item is displaced from the original position.

[list_begin arguments]
[arg_def int n] The number of items to be rearranged.
[list_end]

[call [cmd ::math::combinatorics::catalan] [arg n]]
Return the n'th Catalan number. The number n is expected to be 1 or larger.
These numbers occur in various combinatorial problems.

[list_begin arguments]
[arg_def int n] The index of the Catalan number
[list_end]

[call [cmd ::math::combinatorics::firstStirling] [arg n] [arg m]]
Calculate a Stirling number of the first kind
(signed version, m cycles in a permutation of n items)

[list_begin arguments]
[arg_def int n] Number of items
[arg_def int m] Number of cycles
[list_end]

[call [cmd ::math::combinatorics::secondStirling] [arg n] [arg m]]
Calculate a Stirling number of the second kind
(m non-empty subsets from n items)

[list_begin arguments]
[arg_def int n] Number of items
[arg_def int m] Number of subsets
[list_end]

[call [cmd ::math::combinatorics::partitionP] [arg n]]
Calculate the number of ways an integer n can be written as the sum of positive integers.

[list_begin arguments]
[arg_def int n] Number in question
[list_end]


[call [cmd ::math::combinatorics::list-permutations] [arg n]]
Return the list of permutations of the numbers 0, ..., n-1.

[list_begin arguments]
[arg_def int n] The number of items to be permuted.
[list_end]

[call [cmd ::math::combinatorics::list-variations] [arg n] [arg k]]
Return the list of variations of k numbers selected from the numbers 0, ..., n-1.
The order of the items is taken into account.

[list_begin arguments]
[arg_def int n] The number of items to be selected from.
[arg_def int k] The number of items to be selected in each variation.
[list_end]

[call [cmd ::math::combinatorics::list-combinations] [arg n] [arg k]]
Return the list of combinations of k numbers selected from the numbers 0, ..., n-1.
The order of the items is ignored.

[list_begin arguments]
[arg_def int n] The number of items to be selected from.
[arg_def int k] The number of items to be selected in each combination.
[list_end]

[call [cmd ::math::combinatorics::list-derangements] [arg n]]
Return the list of derangements of the numbers 0, ..., n-1.

[list_begin arguments]
[arg_def int n] The number of items to be rearranged.
[list_end]

[call [cmd ::math::combinatorics::list-powerset] [arg n]]
Return the list of all subsets of the numbers 0, ..., n-1.

[list_begin arguments]
[arg_def int n] The number of items to be rearranged.
[list_end]


[call [cmd ::math::combinatorics::permutationObj] new/create NAME [arg n]]
Create a TclOO object for returning permutations one by one. If the last permutation
has been reached an empty list is returned.

[list_begin arguments]
[arg_def int n] The number of items to be rearranged.
[list_end]

[call [cmd \$perm] next]
Return the next permutation of n objects.

[call [cmd \$perm] reset]
Reset the object, so that the command [term next] returns the complete list again.

[call [cmd \$perm] setElements [arg elements]]
Register a list of items to be permuted, using the [term nextElements] command.

[list_begin arguments]
[arg_def list elements] The list of n items that will be permuted.
[list_end]

[call [cmd \$perm] setElements]
Return the next permulation of the registered items.

[call [cmd ::math::combinatorics::combinationObj] new/create NAME [arg n] [arg k]]
Create a TclOO object for returning combinations one by one. If the last combination
has been reached an empty list is returned.

[list_begin arguments]
[arg_def int n] The number of items to be rearranged.
[list_end]

[call [cmd \$combin] next]
Return the next combination of n objects.

[call [cmd \$combin] reset]
Reset the object, so that the command [term next] returns the complete list again.

[call [cmd \$combin] setElements [arg elements]]
Register a list of items to be permuted, using the [term nextElements] command.

[list_begin arguments]
[arg_def list elements] The list of n items that will be permuted.
[list_end]

[call [cmd \$combin] setElements]
Return the next combination of the registered items.


[list_end]

[vset CATEGORY math]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<
<
<
<
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|

97
98
99
100
101
102
103








104
105























































































































































106
107
108
   Beta(z,w) = Beta(w,z) = Gamma(z) * Gamma(w) / Gamma(z+w)
}]

Results are returned as a floating point number precise to better than
nine significant digits provided that [arg w] and [arg z] are both at
least 1.









[list_end]
























































































































































[vset CATEGORY math]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/combinatorics.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#----------------------------------------------------------------------
#
# math/combinatorics.tcl --
#
#	This file contains definitions of mathematical functions
#	useful in combinatorial problems.
#
#	Note: this is the original collection, an update is in combinatoricsExt.tcl
#
# Copyright (c) 2001, by Kevin B. Kenny.  All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: combinatorics.tcl,v 1.5 2004/02/09 19:31:54 hobbs Exp $
#
#----------------------------------------------------------------------

package require Tcl 8.0

namespace eval ::math {





|
<
<





|







1
2
3
4
5
6


7
8
9
10
11
12
13
14
15
16
17
18
19
#----------------------------------------------------------------------
#
# math/combinatorics.tcl --
#
#	This file contains definitions of mathematical functions
#	useful in combinatorial problems.  


#
# Copyright (c) 2001, by Kevin B. Kenny.  All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: combinatorics.tcl,v 1.5 2004/02/09 19:31:54 hobbs Exp $
#
#----------------------------------------------------------------------

package require Tcl 8.0

namespace eval ::math {
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Parameters:
#	None.
#
# Results:
#	None.
#
# Side effects:
#	::math::pascal is initialized to a flat list containing
#	the first 34 rows of Pascal's triangle.	 C(n,k) is to be found
#	at [lindex $pascal $i] where i = n * ( n + 1 ) + k.  No attempt
#	is made to exploit symmetry.
#
#----------------------------------------------------------------------

proc ::math::InitializePascal {} {







|







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Parameters:
#	None.
#
# Results:
#	None.
#
# Side effects:
#	::math::pascal is initialized to a flat list containing 
#	the first 34 rows of Pascal's triangle.	 C(n,k) is to be found
#	at [lindex $pascal $i] where i = n * ( n + 1 ) + k.  No attempt
#	is made to exploit symmetry.
#
#----------------------------------------------------------------------

proc ::math::InitializePascal {} {
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
	    76.18009173 -86.50532033 24.01409822
	    -1.231739516 .00120858003 -5.36382e-6
	} {
	    set x [expr { $x + 1.0 }]
	    set ser [expr { $ser + $cof / $x }]
	}
	return [expr { $tmp + log( 2.50662827465 * $ser ) }]
    }

    # Handle the error cases.

    if { ![string is double -strict $x] } {
	return -code error [expectDouble $x]
    }








|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
	    76.18009173 -86.50532033 24.01409822
	    -1.231739516 .00120858003 -5.36382e-6
	} {
	    set x [expr { $x + 1.0 }]
	    set ser [expr { $ser + $cof / $x }]
	}
	return [expr { $tmp + log( 2.50662827465 * $ser ) }]
    } 

    # Handle the error cases.

    if { ![string is double -strict $x] } {
	return -code error [expectDouble $x]
    }

268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
#	Returns the binomial coefficient C(n,k) = n!/k!(n-k)!
#
# Parameters:
#	n -- Number of objects in the sampling pool
#	k -- Number of objects to be chosen.
#
# Results:
#	Returns C(n,k).	
#
# Side effects:
#	None.
#
# Results are expected to be accurate to ten significant figures.
# If both parameters are integers and the result fits in 32 bits,
# the result is rounded to an integer.
#
# Integer results are exact up to at least n = 34.
# Floating point results are precise to better than nine significant
# figures.
#
#----------------------------------------------------------------------

proc ::math::choose { n k } {

    variable pascal







|





|



|







266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
#	Returns the binomial coefficient C(n,k) = n!/k!(n-k)!
#
# Parameters:
#	n -- Number of objects in the sampling pool
#	k -- Number of objects to be chosen.
#
# Results:
#	Returns C(n,k).	 
#
# Side effects:
#	None.
#
# Results are expected to be accurate to ten significant figures.
# If both parameters are integers and the result fits in 32 bits, 
# the result is rounded to an integer.
#
# Integer results are exact up to at least n = 34.
# Floating point results are precise to better than nine significant 
# figures.
#
#----------------------------------------------------------------------

proc ::math::choose { n k } {

    variable pascal
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361

    if { [catch { expr { exp( $r ) } } r] } {
	return -code error -errorcode $::errorCode $r
    }

    # Round to integer if both args are integers and the result fits

    if { $r <= 2147483647.5
	       && [string is integer -strict $n]
	       && [string is integer -strict $k] } {
	return [expr { round( $r ) }]
    }

    return $r








|







345
346
347
348
349
350
351
352
353
354
355
356
357
358
359

    if { [catch { expr { exp( $r ) } } r] } {
	return -code error -errorcode $::errorCode $r
    }

    # Round to integer if both args are integers and the result fits

    if { $r <= 2147483647.5 
	       && [string is integer -strict $n]
	       && [string is integer -strict $k] } {
	return [expr { round( $r ) }]
    }

    return $r

418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
    # Compute beta using gamma function, keeping stack trace clean.

    if { [catch { expr { exp( [ln_Gamma $z] + [ln_Gamma $w]
			      - [ln_Gamma [ expr { $z + $w }]] ) } } beta] } {

	return -code error -errorcode $::errorCode $beta

    }

    return $beta

}

#----------------------------------------------------------------------
#







|







416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
    # Compute beta using gamma function, keeping stack trace clean.

    if { [catch { expr { exp( [ln_Gamma $z] + [ln_Gamma $w]
			      - [ln_Gamma [ expr { $z + $w }]] ) } } beta] } {

	return -code error -errorcode $::errorCode $beta

    } 

    return $beta

}

#----------------------------------------------------------------------
#

Changes to modules/math/combinatorics.test.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

testing {
    useLocal math.tcl math
}

# -------------------------------------------------------------------------







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

testing {
    useLocal math.tcl math
}

# -------------------------------------------------------------------------

Deleted modules/math/combinatoricsExt.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
# combinatoricsExt.tcl --
#     Procedures for combinatorial functions and generating combinatorial collections
#
#     Note:
#     The older procedures factorial and choose assume Tcl 8.0, so no large integer support
#     The versions in this package, permutations and combinations, depend on Tcl 8.6 and later
#     for the large integer support and for TclOO.
#
#     Several parts based on: https://wiki.tcl-lang.org/page/Permutations and other Wiki pages
#
package require Tcl 8.6
package require TclOO
package provide math::combinatorics 2.0

# ::math::combinatorics --
#     Encompassing namespace and auxiliary variables
#
namespace eval ::math::combinatorics {
    variable factorial
    variable partition

    set factorial {1 1 2 6 24 120 720}

    set partition(0) 0
    set partition(1) 1

    namespace export permutations      variations      combinations      derangements      \
                     list-permutations list-variations list-combinations list-derangements \
                     catalan firstStirling secondStirling partitionP \
                     permutationObj combinationObj
}

# permutations --
#     Calculate the number of permutations
#
# Arguments:
#     n           Size of the set
#
# Returns:
#     Number of permutations of the set {0 ... n}
#
proc ::math::combinatorics::permutations {n} {
    variable factorial

    if { $n <= 1 } {
        return 1
    }

    if { $n < [llength $factorial] } {
        return [lindex $factorial $n]
    }

    set newfactorial [lindex $$factorial end]

    for {set k [llength $factorial]} { $k <= $n} {incr k} {
        set newfactorial [expr {$newfactorial * $k}]
        lappend factorial $newfactorial
    }

    return $newfactorial
}

# variations --
#     Calculate the number of variations
#
# Arguments:
#     n           Size of the set
#     k           Number of elements per subset
#
# Returns:
#     Number of variations of the set {0 ... n}
#
proc ::math::combinatorics::variations {n k} {
    if { $k < 0 || $k > $n } {
        return 0
    }

    if { $n <= 1 || $k == 0 } {
        return 1
    }

    set perms1 [permutations $n]
    set perms2 [permutations [expr {$n-$k}]]

    return [expr {$perms1 / $perms2}]
}

# combinations --
#     Calculate the number of combinations
#
# Arguments:
#     n           Size of the set
#     k           Number of elements per subset
#
# Returns:
#     Number of combinations of the set {0 ... n}
#
proc ::math::combinatorics::combinations {n k}  {
    if { $k < 0 || $k > $n } {
        return 0
    }

    if { $n <= 1 || $k == 0 || $k == $n } {
        return 1
    }

    set perms1 [permutations $n]
    set perms2 [permutations $k]
    set perms3 [permutations [expr {$n - $k}]]

    return [expr {$perms1 / $perms2 / $perms3}]
}

# derangements --
#     Calculate the number of derangements
#
# Arguments:
#     n           Size of the set
#
# Returns:
#     Number of permutations of the set {0 ... n} where every
#     element is displaced
#
proc ::math::combinatorics::derangements {n} {
    if { $n <= 1 } {
        return 0
    }

    if { $n == 2 } {
        return 1
    }

    set dim2 0
    set dim1 1

    for {set i 3} {$i <= $n} {incr i} {
        set di [expr {($i-1) * ($dim1 + $dim2)}]
        set dim2 $dim1
        set dim1 $di
    }

    return $di
}

# catalan --
#     Return the n-th Catalan number
#
# Arguments:
#     n           Index for the Catalan number (n >= 1)
#
# Result:
#     The n-th Catalan number
#
proc ::math::combinatorics::catalan {n} {
    if { $n < 0 || $n != int($n) } {
        return -code error "The argument must be a non-negative integer"
    }

    set combin [combinations [expr {2*$n}] $n]

    return [expr {$combin / ($n + 1)}]
}

# firstStirling --
#     Calculate a Stirling number of the first kind
#     (signed version, m cycles in a permutation of n items)
#
# Arguments:
#     n           Number of items
#     m           Number of cycles
#
# Note:
#     The Stirling number returned is a signed number.
#     For efficiency memoization is used.
#
proc ::math::combinatorics::firstStirling {n m} {
    variable stirling

    if { $n == $m } {
        return 1
    }

    if { $n <= 0 || $m < 0 || $n < $m } {
        return 0
    }

    if { [info exists stirling($n,$m)] } {
        return $stirling($n,$m)
    }

    set nm1 [expr {$n-1}]
    set mm1 [expr {$m-1}]

    set Snm1_m   [firstStirling $nm1 $m]
    set Snm1_mm1 [firstStirling $nm1 $mm1]

    set stirling($n,$m) [expr {$Snm1_mm1 - $nm1 * $Snm1_m}]

    return $stirling($n,$m)
}

# secondStirling --
#     Calculate a Stirling number of the second kind
#     (m non-empty subsets from n items)
#
# Arguments:
#     n           Number of items
#     m           Number of subsets
#
# Note:
#     For efficiency memoization is used.
#
proc ::math::combinatorics::secondStirling {n m} {
    variable stirlingSecond

    if { $n == $m || $m == 1 } {
        return 1
    }

    if { $n <= 0 || $m < 0 || $n < $m } {
        return 0
    }

    if { [info exists stirlingSecond($n,$m)] } {
        return $stirlingSecond($n,$m)
    }

    set nm1 [expr {$n-1}]
    set mm1 [expr {$m-1}]

    set Snm1_m   [secondStirling $nm1 $m]
    set Snm1_mm1 [secondStirling $nm1 $mm1]

    set stirlingSecond($n,$m) [expr {$Snm1_mm1 + $m * $Snm1_m}]

    return $stirlingSecond($n,$m)
}


# partitionP --
#     Calculate the partitionP function (wrapper)
#
# Arguments:
#     n             The integer number to be partitioned
#
# Result:
#     Number of partitions
#
proc ::math::combinatorics::partitionP {n} {
    incr n
    return [PartitionP $n]
}

# partitionQ --
#     Calculate the partitionQ function (wrapper) - the number of partitions with distinct values
#     (that is: an acceptable partition of 4 is (3,1) but not (2,2)
#
# Arguments:
#     n             The integer number to be partitioned
#
# Result:
#     Number of partitions
#
proc ::math::combinatorics::partitionQ {n} {
    incr n
    TODO - see https://mathworld.wolfram.com/PartitionFunctionQ.html

    The calculation is not entirely trivial
}

# PartitionP --
#     Calculate the partitionP function - see note
#
# Arguments:
#     n             The integer number to be partitioned
#
# Result:
#     Number of partitions
#
# Note:
#     This code computes partitionP(n-1) rather than partitionP(n),
#     so it should not be called directly.
#
proc ::math::combinatorics::PartitionP {n} {
    variable partition

    if { $n <= 0} {
        return 0
    }

    if { [info exists partition($n)] } {
        return $partition($n)
    }

    set part 0

    for {set k 1} {$k <= $n} {incr k} {
        set partm1 [PartitionP [expr {$n - $k*(3*$k-1)/2}]]
        set partp1 [PartitionP [expr {$n - $k*(3*$k+1)/2}]]
        set part [expr {$part + ($partm1 + $partp1) * (-1)**($k+1)}]
    }

    set partition($n) $part

    return $part
}


# list-permutations --
#     Generate a list of permutations
#
# Arguments:
#     n           Size of the set
#
# Returns:
#     List of all permutations of the set {0 ... n}
#
proc ::math::combinatorics::list-permutations {n} {
    if { $n < 1 } {
        return -error "Size n of the set must be positive"
    }

    if { $n == 1 } {
        return [list 0]
    }

    set listperms [list-permutations [expr {$n-1}]]

    set newlist {}

    set nm1 [expr {$n-1}]
    foreach perm $listperms {
        for {set i 0} {$i < $n} {incr i} {
            set newperm [linsert $perm $i $nm1]
            lappend newlist $newperm
        }
    }

    return $newlist
}


# list-variations --
#     Generate a list of variations (permuted subsets)
#
# Arguments:
#     n           Size of the set
#     k           Number of elements per subset
#
# Returns:
#     List of all permutations of the set {0 ... n}
#
proc ::math::combinatorics::list-variations {n k} {
     set combinations [list-combinations $n $k]

     set variations {}
     foreach c $combinations {
         lappend variations [List-permuted $c $k]
     }

     return [concat {*}$variations]
}


# List-permuted --
#     Generate a list of permutations of given elements
#
# Arguments:
#     list        List of elements
#     size        Number of elements
#
# Returns:
#     List of all permutations of the given set
#
# Note:
#     Intended for private use only
#
#
proc ::math::combinatorics::List-permuted {list size} {
    if { $size == 0 } {
        return [list [list]]
    }
    set retval {}

    for { set i 0 } { $i < [llength $list] } { incr i } {
        set firstElement [lindex $list $i]
        set remainingElements [lreplace $list $i $i]
        foreach subset [List-permuted $remainingElements [expr { $size - 1 }]] {
            lappend retval [linsert $subset 0 $firstElement]
       }
    }
    return $retval
}


# list-derangements --
#     Generate a list of derangements - permutations where
#     all elements are displaced
#
# Arguments:
#     n           Size of the set
#
# Returns:
#     List of all derangements of the set {0 ... n}
#
# Note:
#     A naive implementation did not ork properly, so use
#     brute force instead: filter out the permutations that are
#     also derangements
#
proc ::math::combinatorics::list-derangements {n} {
    set plist [::math::combinatorics::list-permutations $n]
    set dlist {}

    set numbers {}
    for {set i 0} {$i < $n} {incr i} {
        lappend numbers $i
    }

    foreach p $plist {
        set accept 1
        foreach n $numbers e $p {
            if { $n == $e } {
                set accept 0
                break
            }
        }
        if { $accept } {
            lappend dlist $p
        }
    }
    return $dlist
}

# list-combinations-deprecated --
#     Generate a list of combinations - deprecated
#
# Arguments:
#     n           Size of the set
#     k           Number of elements per subset
#
# Returns:
#     List of all combinations of the set {0 ... n}
#
# Note:
#    This implementation is deprecated in cfavour of the Wiki implementation
#
proc ::math::combinatorics::list-combinations-deprecated {n k} {
    if { $n < 1 } {
        return -error "Size n of the set must be positive"
    }
    if { $k < 0 || $k > $n } {
        return -error "Size k of the subsets must be positive and smaller/equal to n"
    }

    if { $n == 1 } {
        if { $k == 0 } {
            return [list]
        } else {
            return [list 0]
        }
    }

    if { $k > 1 } {
        set listperms [list-combinations-deprecated [expr {$n-1}] [expr {$k-1}]]

        set newlist {}

        set nm1 [expr {$n-1}]
        foreach perm $listperms {
           lappend newlist [concat $perm $nm1]
        }
        set newlist [concat $newlist [list-combinations-deprecated [expr {$n-1}] $k]]
    } else {
        set newlist {}
        for {set i 0} {$i < $n} {incr i} {
            lappend newlist [list $i]
        }
    }

    return $newlist
}

# list-combinations --
#     Generate a list of combinations
#
# Arguments:
#     n           Size of the set
#     k           Number of elements per subset
#
# Returns:
#     List of all combinations of the set {0 ... n}
#
# Note:
#      Copied from the WIki - the implementation is three times
#      faster than the deprecated version
#
proc ::math::combinatorics::list-combinations {n k} {
    set myList {}
    for {set i 0} {$i < $n} {incr i} {
        lappend myList $i
    }

    return [List-Combinations2 $myList $k]
}

# List-Combinations2 --
#     Generate a list of combinations of a given list of elements
#
# Arguments:
#     list        List of elements
#     k           Number of elements per subset
#
# Returns:
#     List of all combinations
#
proc ::math::combinatorics::List-Combinations2 {myList size {prefix {}}} {
    #
    # End recursion when size is 0 or equals our list size
    #
    if {$size == 0} {return [list $prefix]}
    if {$size == [llength $myList]} {return [list [concat $prefix $myList]]}

    set first [lindex $myList 0]
    set rest [lrange $myList 1 end]

    #
    # Combine solutions w/ first element and solutions w/o first element
    #
    set ans1 [List-Combinations2 $rest [expr {$size-1}] [concat $prefix $first]]
    set ans2 [List-Combinations2 $rest $size $prefix]
    return [concat $ans1 $ans2]
}

# list-powerset --
#     Generate a list representing the power set of {0 ... n}
#
# Arguments:
#     n           Size of the set
#
# Returns:
#     List of all subsets of the set {0 ... n}
#
proc ::math::combinatorics::list-powerset {n} {
    set ret {{{}}}
    for {set i 1} {$i <= $n} {incr i} {
        lappend ret [list-combinations $n $i]
    }
    return [concat {*}$ret]
}

# permutationObj --
#     Class for generating permutations one by one
#
::oo::class create ::math::combinatorics::permutationObj {
    variable n
    variable k
    variable current
    variable elements

    # constructor --
    #     Generate permutations of the set {0 .. n}
    # Arguments:
    #     n_in           Size of the set
    #
    constructor {n_in} {
        variable n
        variable k
        variable current
        variable start

        if { $n_in < 1 } {
            return -code error "Size of the set must be positive"
        }

        set n $n_in

        set elements {}
        for {set i 0} {$i < $n} {incr i} {
            lappend elements $i
        }

        my reset
    }

    # method: reset --
    #     Restart the object
    #
    # Arguments:
    #     None
    #
    method reset {} {
        variable current
        variable start

        set start   1
        set current {}
        for {set i 0} {$i < $n} {incr i} {
            lappend current $i
        }
    }

    # method: next
    #     Return the next permutation
    #
    method next {} {
        variable current
        variable start

        # Return the first permutation?
        if { $start } {
            set start 0
            return $current
        }

        # Find the smallest subscript j such that we have already visited
        # all permutations beginning with the first j elements.

        set j [expr { [llength $current] - 1 }]
        set ajp1 [lindex $current $j]
        while { $j > 0 } {
            incr j -1
            set aj [lindex $current $j]
            if { [string compare $ajp1 $aj] > 0 } {
                set foundj {}
                break
            }
            set ajp1 $aj
        }
        if { ![info exists foundj] } return

        # Find the smallest element greater than the j'th among the elements
        # following aj. Let its index be l, and interchange aj and al.

        set l [expr { [llength $current] - 1 }]
        while { $aj >= [set al [lindex $current $l]] } {
            incr l -1
        }
        lset current $j $al
        lset current $l $aj

        # Reverse a_j+1 ... an

        set k [expr {$j + 1}]
        set l [expr { [llength $current] - 1 }]
        while { $k < $l } {
            set al [lindex $current $l]
            lset current $l [lindex $current $k]
            lset current $k $al
            incr k
            incr l -1
        }

        return $current
    }

    # method: setElements --
    #     Register a list of elements to be permuted
    #
    # Arguments:
    #     list           List of elements
    #
    method setElements {list} {
        variable n
        variable elements

        if { [llength $list] != $n } {
            return -code error "The number of elements should be $n"
        }
        set elements $list

        # Implicit reset
        my reset
    }

    #
    # method: nextElements
    #     Returns the next permutation of the given elements
    #
    # Arguments:
    #    None
    #
    method nextElements {} {
        variable elements

        set permutation [my next]

        set list {}

        foreach idx $permutation {
            lappend list [lindex $elements $idx]
        }

        return $list
    }
}

# combinationObj --
#     Class for generating combinations (k-subsets) one by one
#
::oo::class create ::math::combinatorics::combinationObj {
    variable n
    variable k
    variable current
    variable elements

    # constructor --
    #     Generate combinations of k elements out of the set {0 .. n}
    # Arguments:
    #     n_in           Size of the set
    #     k_in           Size of the subsets
    #
    constructor {n_in k_in} {
        variable n
        variable k
        variable current

        if { $n_in < 1 || $k_in < 1 || $k_in > $n_in } {
            return -code error "Sizes of the set and subset must be positive, subset may not be larger than the set"
        }

        set n $n_in
        set k $k_in

        set current {}

        set elements {}
        for {set i 0} {$i < $n} {incr i} {
            lappend elements $i
        }
    }

    # method: reset --
    #     Restart the object
    #
    # Arguments:
    #     None
    #
    method reset {} {
        variable current

        set current {}
    }

    #
    # method: next --
    #     Return the next combination
    #
    # Arguments:
    #     None
    #
    method next {} {
        variable n
        variable k
        variable current

        if { [llength $current] == 0 } {
            for {set i 1} {$i <= $k} {incr i} {
                set c($i) $i
            }
        } else {
            for {set i 1; set j 0} {$i <= $k} {incr i; incr j} {
                set c($i) [lindex $current $j]
            }
            set ptr $k
            while {$ptr > 0 && $c($ptr) == $n - $k + $ptr} {
               incr ptr -1
            }
            if {$ptr == 0} {
              return {}
            }
            incr c($ptr)
            for {set i [expr {$ptr + 1}]} {$i <= $k} {incr i} {
               set c($i) [expr $c([expr {$i - 1}]) + 1]
            }
        }
        set cL      [list]
        set current [list]
        for {set i 1} {$i <= $k} {incr i} {
               lappend cL      [expr {$c($i)-1}]
               lappend current $c($i)
        }
        return $cL
    }

    # method: setElements --
    #     Register a list of elements to be permuted and selected
    #
    # Arguments:
    #     list           List of elements
    #
    method setElements {list} {
        variable n
        variable elements

        if { [llength $list] != $n } {
            return -code error "The number of elements should be $n"
        }
        set elements $list

        # Implicit reset
        my reset
    }

    #
    # method: nextElements
    #     Returns next k-subset of the given elements
    #
    # Arguments:
    #    None
    #
    method nextElements {} {
        variable elements

        set combination [my next]

        set list {}

        foreach idx $combination {
            lappend list [lindex $elements $idx]
        }

        return $list
    }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/math/combinatoricsExt.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
# combinatoricsExt.test --
#     Tests for the math::combinatorics package (the extended set of procedures)
#
source [file join \
        [file dirname [file dirname [file join [pwd] [info script]]]] \
        devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

support {
    useLocal math.tcl math
}
testing {
    useLocal combinatoricsExt.tcl math::combinatorics
}


test counts-1.0 {Calculation of the number of permutations} -body {
    set number {}
    foreach n {1 2 5 10 20 30} {
        lappend number [::math::combinatorics::permutations $n]
    }

    set number
} -result {1 2 120 3628800 2432902008176640000 265252859812191058636308480000000}

test counts-1.1 {Permutations for zero or negative count} -body {
    set number {}
    foreach n {-1 0} {
        lappend number [::math::combinatorics::permutations $n]
    }

    set number
} -result {1 1}

test counts-2.0 {Calculation of the number of variations} -body {
    set number {}
    foreach n {1 2 5 10} {
        foreach k {1 2 5 6 7 8 9} {
            if { $k <= $n } {
                lappend number [::math::combinatorics::variations $n $k]
            }
        }
    }

    set number
} -result {1 2 2 5 20 120 10 90 30240 151200 604800 1814400 3628800}

test counts-2.1 {Variations for zero or negative counts} -body {
    set number {}
    foreach n {-1 0 1 2 5} {
        foreach k {-1 0 1 2 6} {
            lappend number [::math::combinatorics::variations $n $k]
        }
    }

    set number
} -result {0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 2 2 0 0 1 5 20 0}

test counts-3.0 {Calculation of the number of combinations} -body {
    set number {}
    foreach n {1 2 5 10} {
        foreach k {1 2 5 6 7 8 9} {
            if { $k <= $n } {
                lappend number [::math::combinatorics::combinations $n $k]
            }
        }
    }

    set number
} -result {1 2 1 5 10 1 10 45 252 210 120 45 10}

test counts-3.1 {Combinations for zero or negative counts} -body {
    set number {}
    foreach n {-1 0 1 2 5} {
        foreach k {-1 0 1 2 6} {
            lappend number [::math::combinatorics::combinations $n $k]
        }
    }

    set number
} -result {0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 2 1 0 0 1 5 10 0}

test counts-4.0 {Calculation of the number of derangements} -body {
    set number {}
    foreach n {1 2 3 4 5 6 7} {
        lappend number [::math::combinatorics::derangements $n]
    }

    set number
} -result {0 1 2 9 44 265 1854}

test counts-4.1 {Derangements for zero or negative counts} -body {
    set number {}
    foreach n {-1 0} {
        lappend number [::math::combinatorics::derangements $n]
    }

    set number
} -result {0 0}

#
# The reference numbers come from https://mathworld.wolfram.com
#
test numbers-1.0 {First few Catalan numbers} -body {
    set number {}
    foreach n {1 2 3 4 5 6 7 8 9 10} {
        lappend number [::math::combinatorics::catalan $n]
    }

    set number
} -result {1 2 5 14 42 132 429 1430 4862 16796}

test numbers-2.0 {Stirling numbers of the first kind} -body {
    set number {}
    foreach n {1 2 3 4 5} {
        foreach k {1 2 3 4 5} {
            if { $k <= $n } {
                lappend number [::math::combinatorics::firstStirling $n $k]
            }
        }
    }

    set number
} -result {1 -1 1 2 -3 1 -6 11 -6 1 24 -50 35 -10 1}

test numbers-2.1 {Stirling numbers of the second kind} -body {
    set number {}
    foreach n {1 2 3 4 5 6} {
        foreach k {1 2 3 4 5 6} {
            if { $k <= $n } {
                lappend number [::math::combinatorics::secondStirling $n $k]
            }
        }
    }

    set number
} -result {1 1 1 1 3 1 1 7 6 1 1 15 25 10 1 1 31 90 65 15 1}

#
# Generate collection of permutations, etc.
#
test lists-1.0 {Small number of permutations} -body {
    set collection [::math::combinatorics::list-permutations 4]
} -result {{3 2 1 0} {2 3 1 0} {2 1 3 0} {2 1 0 3} {3 1 2 0} {1 3 2 0} {1 2 3 0} {1 2 0 3} {3 1 0 2} {1 3 0 2} {1 0 3 2} {1 0 2 3} {3 2 0 1} {2 3 0 1} {2 0 3 1} {2 0 1 3} {3 0 2 1} {0 3 2 1} {0 2 3 1} {0 2 1 3} {3 0 1 2} {0 3 1 2} {0 1 3 2} {0 1 2 3}}

test lists-1.1 {Check properties of the collection of permutations} -body {
    set collection [::math::combinatorics::list-permutations 5]

    # Number of elements should be 5! = 120
    set correct_number [expr {[llength $collection] == 120}]

    # All elements should have 5 entries
    set five_entries 1
    foreach c $collection {
        if { [llength $c] != 5 } {
            set five_entries 0
            break
        }
    }

    # All entries in the elements should be unique
    set unique_entries 1
    foreach c $collection {
        if { [llength [lsort -unique $c]] != 5 } {
            set unique_entries 0
            break
        }
    }

    # All elements of the collection should be unique
    set unique_elements [expr {[llength [lsort -unique $collection]] == 120}]

    # Report our findings
    set result [list $correct_number $five_entries $unique_entries $unique_elements]
} -result {1 1 1 1}

test lists-2.0 {Small number of variations} -body {
    set collection [::math::combinatorics::list-variations 4 2]
} -result {{0 1} {1 0} {0 2} {2 0} {0 3} {3 0} {1 2} {2 1} {1 3} {3 1} {2 3} {3 2}}

test lists-2.1 {Check properties of the collection of variations} -body {
    set collection [::math::combinatorics::list-variations 5 2]

    # Number of elements should be 20
    set correct_number [expr {[llength $collection] == 20}]

    # All elements should have 2 entries
    set two_entries 1
    foreach c $collection {
        if { [llength $c] != 2 } {
            set two_entries 0
            break
        }
    }

    # All entries in the elements should be unique
    set unique_entries 1
    foreach c $collection {
        if { [llength [lsort -unique $c]] != 2 } {
            set unique_entries 0
            break
        }
    }

    # All elements of the collection should be unique
    set unique_elements [expr {[llength [lsort -unique $collection]] == 20}]

    # Report our findings
    set result [list $correct_number $two_entries $unique_entries $unique_elements]
} -result {1 1 1 1}

test lists-3.0 {Small number of combinations} -body {
    set collection [::math::combinatorics::list-combinations 4 2]
} -result {{0 1} {0 2} {0 3} {1 2} {1 3} {2 3}}

test lists-3.1 {Check properties of the collection of combinations} -body {
    set collection [::math::combinatorics::list-combinations 5 2]

    set correct_number [expr {[llength $collection] == 10}]

    # All elements should have 2 entries
    set two_entries 1
    foreach c $collection {
        if { [llength $c] != 2 } {
            set two_entries 0
            break
        }
    }

    # All entries in the elements should be unique
    set unique_entries 1
    foreach c $collection {
        if { [llength [lsort -unique $c]] != 2 } {
            set unique_entries 0
            break
        }
    }

    # All elements of the collection should be unique
    set unique_elements [expr {[llength [lsort -unique $collection]] == 10}]

    # Report our findings
    set result [list $correct_number $two_entries $unique_entries $unique_elements]
} -result {1 1 1 1}

test lists-4.0 {Small number of derangements} -body {
    set collection [::math::combinatorics::list-derangements 4]
} -result {{3 2 1 0} {2 3 1 0} {1 2 3 0} {1 3 0 2} {1 0 3 2} {3 2 0 1} {2 3 0 1} {2 0 3 1} {3 0 1 2}}

test lists-4.1 {Check properties of the collection of derangements} -body {
    set collection [::math::combinatorics::list-derangements 5]

    # Number of elements should be 44
    set correct_number [expr {[llength $collection] == 44}]

    # All elements should have 5 entries
    set five_entries 1
    foreach c $collection {
        if { [llength $c] != 5 } {
            set five_entries 0
            break
        }
    }

    # All entries in the elements should be unique
    set unique_entries 1
    foreach c $collection {
        if { [llength [lsort -unique $c]] != 5 } {
            set unique_entries 0
            break
        }
    }

    # All elements of the collection should be unique
    set unique_elements [expr {[llength [lsort -unique $collection]] == 44}]

    # All entries should be in a different place than its numeric value - {0 2 1} is not a valid derangement
    set correct_derangement 1
    foreach c $collection {
        foreach i {0 1 2 3 4} v $c {
            if { $i == $v } {
                set correct_derangement 0
                break
            }
        }
    }

    # Report our findings
    set result [list $correct_number $five_entries $unique_entries $unique_elements $correct_derangement]
} -result {1 1 1 1 1}

test lists-5.0 {Return the power set of a small set} -body {
    set powerset [::math::combinatorics::list-powerset 4]
} -result {{} 0 1 2 3 {0 1} {0 2} {0 3} {1 2} {1 3} {2 3} {0 1 2} {0 1 3} {0 2 3} {1 2 3} {0 1 2 3}}

test lists-5.1 {Check properties of the power set} -body {
    set collection [::math::combinatorics::list-powerset 5]

    # Number of elements should be 32
    set correct_number [expr {[llength $collection] == 32}]

    # All elements should have 5 or less entries
    set max_five_entries 1
    foreach c $collection {
        if { [llength $c] > 5 } {
            set max_five_entries 0
            break
        }
    }

    # All entries in the elements should be unique
    set unique_entries 1
    foreach c $collection {
        if { [llength [lsort -unique $c]] != [llength $c] } {
            set unique_entries 0
            break
        }
    }

    # All elements of the collection should be unique
    set unique_elements [expr {[llength [lsort -unique $collection]] == 32}]

    # Report our findings
    set result [list $correct_number $max_five_entries $unique_entries $unique_elements]
} -result {1 1 1 1}

#
# Permutation and combination objects
#
test objects-1.0 {List the permutations one by one} -body {
    set n   0
    set obj [::math::combinatorics::permutationObj new 4]

    set permutations {}

    while {1} {
        set permutation [$obj next]

        if { $permutation eq {} } {
            break
        }

        # Extra check
        if { [llength $permutation] ne 4 } {
            break
        }
        lappend permutations $permutation
    }

    return [llength [lsort -unique $permutations]]
} -result 24

test objects-1.1 {Permute a given set of elements} -body {
    set n   0
    set obj [::math::combinatorics::permutationObj new 4]

    $obj setElements {A B C D}

    set permutations {}

    while {1} {
        set permutation [$obj nextElements]

        if { $permutation eq {} } {
            break
        }

        set okay 1
        foreach elem {A B C D} {
            if { $elem ni $permutation } {
                set okay 0
                break
            }
        }

        # Extra check
        if { [llength $permutation] != 4 } {
            break
        }

        if { $okay } {
            lappend permutations $permutation
        }
    }

    return [llength [lsort -unique $permutations]]
} -result 24

test objects-2.0 {List the combinations one by one} -body {
    set n   0
    set obj [::math::combinatorics::combinationObj new 5 2]

    set combinations {}

    while {1} {
        set combination [$obj next]

        if { $combination eq {} } {
            break
        }

        # Extra check
        if { [llength $combination] != 2 } {
            break
        }
        lappend combinations $combination
    }

    return [llength [lsort -unique $combinations]]
} -result 10

test objects-2.1 {List combinations of a given set of elements} -body {
    set n   0
    set obj [::math::combinatorics::combinationObj new 5 2]

    set combinations {}

    $obj setElements {A B C D E}

    while {1} {
        set combination [$obj nextElements]

        if { $combination eq {} } {
            break
        }

        set okay 1
        foreach elem $combination {
            if { $elem ni {A B C D E} } {
                set okay 0
                break
            }
        }

        if { $okay } {
            lappend combinations $combination
        }
    }

    return [llength [lsort -unique $combinations]]
} -result 10

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to modules/math/constants.man.

128
129
130
131
132
133
134
135
136
[def [const onesixth]] One sixth (0.1666....)
[def [const huge]]     (Approximately) largest number
[def [const tiny]]     (Approximately) smallest number not equal zero
[def [const eps]]      Smallest number such that 1+eps != 1
[list_end]

[vset CATEGORY {math :: constants}]
[include ../common-text/feedback.inc]
[manpage_end]







|

128
129
130
131
132
133
134
135
136
[def [const onesixth]] One sixth (0.1666....)
[def [const huge]]     (Approximately) largest number
[def [const tiny]]     (Approximately) smallest number not equal zero
[def [const eps]]      Smallest number such that 1+eps != 1
[list_end]

[vset CATEGORY {math :: constants}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/constants.test.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal constants.tcl math::constants







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal constants.tcl math::constants

Changes to modules/math/decimal.man.

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
is to perform decimal math operations, examples may be the simplest way
to learn how to work with it and to see the difference between using this
package and sticking with expr. Consult the API section of
this man page for information about individual procedures.

[para]
[example_begin]
    package require math::decimal

    # Various operations on two numbers.
    # We first convert them to decimal format.
    set a [lb]::math::decimal::fromstr 8.2[rb]
    set b [lb]::math::decimal::fromstr .2[rb]

    # Then we perform our operations. Here we add
    set c [lb]::math::decimal::+ $a $b[rb]

    # Finally we convert back to string format for presentation to the user.
    puts [lb]::math::decimal::tostr $c[rb] ; # => will output 8.4

    # Other examples
    #
    # Subtraction
    set c [lb]::math::decimal::- $a $b[rb]
    puts [lb]::math::decimal::tostr $c[rb] ; # => will output 8.0

    # Why bother using this instead of simply expr?
    puts [lb]expr {8.2 + .2}[rb] ; # => will output 8.399999999999999
    puts [lb]expr {8.2 - .2}[rb] ; # => will output 7.999999999999999
    # See http://speleotrove.com/decimal to learn more about why this happens.
[example_end]

[section "API"]
[list_begin definitions]

[call [cmd ::math::decimal::fromstr] [arg string]]







|






|
|











|
|







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
is to perform decimal math operations, examples may be the simplest way
to learn how to work with it and to see the difference between using this
package and sticking with expr. Consult the API section of
this man page for information about individual procedures.

[para]
[example_begin]
    package require decimal

    # Various operations on two numbers.
    # We first convert them to decimal format.
    set a [lb]::math::decimal::fromstr 8.2[rb]
    set b [lb]::math::decimal::fromstr .2[rb]

    # Then we perform our operations. Here we multiply
    set c [lb]::math::decimal::* $a $b[rb]

    # Finally we convert back to string format for presentation to the user.
    puts [lb]::math::decimal::tostr $c[rb] ; # => will output 8.4

    # Other examples
    #
    # Subtraction
    set c [lb]::math::decimal::- $a $b[rb]
    puts [lb]::math::decimal::tostr $c[rb] ; # => will output 8.0

    # Why bother using this instead of simply expr?
    puts [expr {8.2 + .2}] ; # => will output 8.399999999999999
    puts [expr {8.2 - .2}] ; # => will output 7.999999999999999
    # See http://speleotrove.com/decimal to learn more about why this happens.
[example_end]

[section "API"]
[list_begin definitions]

[call [cmd ::math::decimal::fromstr] [arg string]]
191
192
193
194
195
196
197
198
199
Rounds [emph decimal] to [emph digits] number of decimal points with the following rules: Round zero or five away from 0. The same as round-up, except that rounding up only occurs if the digit to be rounded up is 0 or 5, and after overflow
the result is the same as for round-down.

[list_end]
[para]

[vset CATEGORY decimal]
[include ../common-text/feedback.inc]
[manpage_end]







|

191
192
193
194
195
196
197
198
199
Rounds [emph decimal] to [emph digits] number of decimal points with the following rules: Round zero or five away from 0. The same as round-up, except that rounding up only occurs if the digit to be rounded up is 0 or 5, and after overflow
the result is the same as for round-down.

[list_end]
[para]

[vset CATEGORY decimal]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/decimal.test.

1
2
3
4
5
6


7
8
9
10
11
12
13
# -*- tcl -*-
# Tests for decimal arithmetic package in math library  -*- tcl -*-
#
# This file contains a collection of tests for one or more of the Tcllib
# procedures.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.


#
# Copyright (c) 2011 by Mark Alston
# All rights reserved.
#

# -------------------------------------------------------------------------







>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- tcl -*-
# Tests for decimal arithmetic package in math library  -*- tcl -*-
#
# This file contains a collection of tests for one or more of the Tcllib
# procedures.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# $Id: decimal.test,v 1.3 2011/11/09 18:33:22 andreas_kupries Exp $
#
# Copyright (c) 2011 by Mark Alston
# All rights reserved.
#

# -------------------------------------------------------------------------

Changes to modules/math/elliptic.test.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5;# statistics,linalg!
testsNeedTcltest 2.1

support {
    useLocal math.tcl        math
    useLocal constants.tcl   math::constants
    useLocal linalg.tcl      math::linearalgebra ;# for statistics
    useLocal statistics.tcl  math::statistics







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4;# statistics,linalg!
testsNeedTcltest 2.1

support {
    useLocal math.tcl        math
    useLocal constants.tcl   math::constants
    useLocal linalg.tcl      math::linearalgebra ;# for statistics
    useLocal statistics.tcl  math::statistics

Changes to modules/math/exact.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[vset VERSION 1.0.1]
[manpage_begin math::exact n [vset VERSION]]
[copyright "2015 Kevin B. Kenny <kennykb@acm.org>
Redistribution permitted under the terms of the Open\
Publication License <http://www.opencontent.org/openpub/>"]
[moddesc {Tcl Math Library}]
[titledesc {Exact Real Arithmetic}]
[category Mathematics]
[require Tcl 8.6]
[require grammar::aycock 1.0]
[require math::exact [vset VERSION]]
[description]
[para]
The [cmd exactexpr] command in the [cmd math::exact] package
allows for exact computations over the computable real numbers.
These are not arbitrary-precision calculations; rather they are
exact, with numbers represented by algorithms that produce successive
approximations. At the end of a calculation, the caller can
<
|








|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

[manpage_begin math::exact n 1.0]
[copyright "2015 Kevin B. Kenny <kennykb@acm.org>
Redistribution permitted under the terms of the Open\
Publication License <http://www.opencontent.org/openpub/>"]
[moddesc {Tcl Math Library}]
[titledesc {Exact Real Arithmetic}]
[category Mathematics]
[require Tcl 8.6]
[require grammar::aycock 1.0]
[require math::exact 1.0]
[description]
[para]
The [cmd exactexpr] command in the [cmd math::exact] package
allows for exact computations over the computable real numbers.
These are not arbitrary-precision calculations; rather they are
exact, with numbers represented by algorithms that produce successive
approximations. At the end of a calculation, the caller can

Changes to modules/math/exact.tcl.

126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#
# Results:
#	Returns a two element list. The first element is a list of the
#	lexical values of the tokens that were found in the expression;
#	the second is a list of the semantic values of the tokens. The
#	two sublists are the same length.

proc ::math::exact::Lexer {expression} {
    set start 0
    set tokens {}
    set values {}
    while {$expression ne {}} {
	if {[regexp {^\*\*(.*)} $expression -> rest]} {

	    # Exponentiation







|







126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#
# Results:
#	Returns a two element list. The first element is a list of the
#	lexical values of the tokens that were found in the expression;
#	the second is a list of the semantic values of the tokens. The
#	two sublists are the same length.

proc math::exact::Lexer {expression} {
    set start 0
    set tokens {}
    set values {}
    while {$expression ne {}} {
	if {[regexp {^\*\*(.*)} $expression -> rest]} {

	    # Exponentiation
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# Parameters:
#	a - Return value
#	b - Value to discard
#
# Results:
#	Returns the first argument

proc ::math::exact::K {a b} {return $a}

# math::exact::exactexpr --
#
#	Evaluates an exact real expression.
#
# Parameters:
#	expr - Expression to evaluate. Variables in the expression are
#	       assumed to be reals, which are represented as Tcl objects.
#
# Results:
#	Returns a Tcl object representing the expression's value.
#
# The returned object must have its refcount incremented with [ref] if
# the caller retains a reference, and in general it is expected that a
# user of a real will [ref] the object when storing it in a variable and
# [unref] it again when the variable goes out of scope or is overwritten.

proc ::math::exact::exactexpr {expr} {
    variable parser
    set result [$parser parse {*}[Lexer $expr] \
		    [dict create \
			 caller "#[expr {[info level] - 1}]" \
			 namespace [namespace current]]]
}








|

















|







187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# Parameters:
#	a - Return value
#	b - Value to discard
#
# Results:
#	Returns the first argument

proc math::exact::K {a b} {return $a}

# math::exact::exactexpr --
#
#	Evaluates an exact real expression.
#
# Parameters:
#	expr - Expression to evaluate. Variables in the expression are
#	       assumed to be reals, which are represented as Tcl objects.
#
# Results:
#	Returns a Tcl object representing the expression's value.
#
# The returned object must have its refcount incremented with [ref] if
# the caller retains a reference, and in general it is expected that a
# user of a real will [ref] the object when storing it in a variable and
# [unref] it again when the variable goes out of scope or is overwritten.

proc math::exact::exactexpr {expr} {
    variable parser
    set result [$parser parse {*}[Lexer $expr] \
		    [dict create \
			 caller "#[expr {[info level] - 1}]" \
			 namespace [namespace current]]]
}

253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#
# Parameters:
#	The integers whose gcd is to be found
#
# Results:
#	Returns the gcd

proc ::math::exact::gcd {a args} {
    foreach b $args {
	if {$a > $b} {
	    set t $b; set b $a; set a $t
	}
	while {$b > 0} {
	    set t $b
	    set b [expr {$a % $b}]







|







253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#
# Parameters:
#	The integers whose gcd is to be found
#
# Results:
#	Returns the gcd

proc math::exact::gcd {a args} {
    foreach b $args {
	if {$a > $b} {
	    set t $b; set b $a; set a $t
	}
	while {$b > 0} {
	    set t $b
	    set b [expr {$a % $b}]
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
#
# Parameters:
#	x - Object to transpose
#
# Results:
#	Returns the transpose

proc ::math::exact::trans {x} {
    lassign $x ab cd
    lassign $ab a b
    lassign $cd c d
    tailcall list [list $a $c] [list $b $d]
}

# math::exact::determinant --
#
#	Calculates the determinant of a 2x2 matrix
#
# Parameters:
#	x - Matrix
#
# Results:
#	Returns the determinant.

proc ::math::exact::determinant {x} {
    lassign $x ab cd
    lassign $ab a b
    lassign $cd c d
    return [expr {$a*$d - $b*$c}]
}

# math::exact::reverse --
#
#	Calculates the reverse of a 2x2 matrix, which is its inverse times
#	its determinant.
#
# Parameters:
#	x - Matrix
#
# Results:
#	Returns reverse[x].
#
# Notes:
#	The reverse is well defined even for singular matrices.

proc ::math::exact::reverse {x} {
    lassign $x ab cd
    lassign $ab a b
    lassign $cd c d
    tailcall list [list $d [expr {-$b}]] [list [expr {-$c}] $a]
}

# math::exact::veven --
#
#	Tests if both components of a 2-vector are even.
#
# Parameters:
#	x - Vector to test
#
# Results:
#	Returns 1 if both components are even, 0 otherwise.

proc ::math::exact::veven {x} {
    lassign $x a b
    return [expr {($a % 2 == 0) && ($b % 2 == 0)}]
}

# math::exact::meven --
#
#	Tests if all components of a 2x2 matrix are even.
#
# Parameters:
#	x - Matrix to test
#
# Results:
#	Returns 1 if all components are even, 0 otherwise.

proc ::math::exact::meven {x} {
    lassign $x a b
    return [expr {[veven $a] && [veven $b]}]
}

# math::exact::teven --
#
#	Tests if all components of a 2x2x2 tensor are even
#
# Parameters:
#	x - Tensor to test
#
# Results:
#	Returns 1 if all components are even, 0 otherwise

proc ::math::exact::teven {x} {
    lassign $x a b
    return [expr {[meven $a] && [meven $b]}]
}

# math::exact::vhalf --
#
#	Divides both components of a 2-vector by 2
#
# Parameters:
#	x - Vector to scale
#
# Results:
#	Returns the scaled vector

proc ::math::exact::vhalf {x} {
    lassign $x a b
    tailcall list [expr {$a / 2}] [expr {$b / 2}]
}

# math::exact::mhalf --
#
#	Divides all components of a 2x2 matrix by 2
#
# Parameters:
#	x - Matrix to scale
#
# Results:
#	Returns the scaled matrix

proc ::math::exact::mhalf {x} {
    lassign $x a b
    tailcall list [vhalf $a] [vhalf $b]
}

# math::exact::thalf --
#
#	Divides all components of a 2x2x2 tensor by 2
#
# Parameters:
#	x - Tensor to scale
#
# Results:
#	Returns the scaled tensor

proc ::math::exact::thalf {x} {
    lassign $x a b
    tailcall list [mhalf $a] [mhalf $b]
}

# math::exact::vscale --
#
#	Removes all common factors of 2 from the two components of a 2-vector
#
# Paramters:
#	x - Vector to scale
#
# Results:
#	Returns the scaled vector

proc ::math::exact::vscale {x} {
    while {[veven $x]} {
	set x [vhalf $x]
    }
    return $x
}

# math::exact::mscale --
#
#	Removes all common factors of 2 from the two components of a
#	2x2 matrix
#
# Paramters:
#	x - Matrix to scale
#
# Results:
#	Returns the scaled matrix

proc ::math::exact::mscale {x} {
    while {[meven $x]} {
	set x [mhalf $x]
    }
    return $x
}

# math::exact::tscale --
#
#	Removes all common factors of 2 from the two components of a
#	2x2x2 tensor
#
# Paramters:
#	x - Tensor to scale
#
# Results:
#	Returns the scaled tensor

proc ::math::exact::tscale {x} {
    while {[teven $x]} {
	set x [thalf $x]
    }
    return $x
}

# math::exact::vreduce --
#
#	Reduces a vector (i.e., a rational number) to lowest terms
#
# Parameters:
#	x - Vector to scale
#
# Results:
#	Returns the scaled vector

proc ::math::exact::vreduce {x} {
    lassign $x a b
    set g [gcd $a $b]
    tailcall list [expr {$a / $g}] [expr {$b / $g}]
}

# math::exact::mreduce --
#
#	Removes all common factors from the two components of a
#	2x2 matrix
#
# Paramters:
#	x - Matrix to scale
#
# Results:
#	Returns the scaled matrix
#
# This procedure suffices to reduce the matrix to lowest terms if the matrix
# was constructed by pre- or post-multiplying a series of sign and digit
# matrices.

proc ::math::exact::mreduce {x} {
    lassign $x ab cd
    lassign $ab a b
    lassign $cd c d
    set g [gcd $a $b $c $d]
    tailcall list \
	[list [expr {$a / $g}] [expr {$b / $g}]] \
	[list [expr {$c / $g}] [expr {$d / $g}]]







|
















|




















|
















|














|














|














|














|














|














|

















|

















|
















|




















|







277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
#
# Parameters:
#	x - Object to transpose
#
# Results:
#	Returns the transpose

proc math::exact::trans {x} {
    lassign $x ab cd
    lassign $ab a b
    lassign $cd c d
    tailcall list [list $a $c] [list $b $d]
}

# math::exact::determinant --
#
#	Calculates the determinant of a 2x2 matrix
#
# Parameters:
#	x - Matrix
#
# Results:
#	Returns the determinant.

proc math::exact::determinant {x} {
    lassign $x ab cd
    lassign $ab a b
    lassign $cd c d
    return [expr {$a*$d - $b*$c}]
}

# math::exact::reverse --
#
#	Calculates the reverse of a 2x2 matrix, which is its inverse times
#	its determinant.
#
# Parameters:
#	x - Matrix
#
# Results:
#	Returns reverse[x].
#
# Notes:
#	The reverse is well defined even for singular matrices.

proc math::exact::reverse {x} {
    lassign $x ab cd
    lassign $ab a b
    lassign $cd c d
    tailcall list [list $d [expr {-$b}]] [list [expr {-$c}] $a]
}

# math::exact::veven --
#
#	Tests if both components of a 2-vector are even.
#
# Parameters:
#	x - Vector to test
#
# Results:
#	Returns 1 if both components are even, 0 otherwise.

proc math::exact::veven {x} {
    lassign $x a b
    return [expr {($a % 2 == 0) && ($b % 2 == 0)}]
}

# math::exact::meven --
#
#	Tests if all components of a 2x2 matrix are even.
#
# Parameters:
#	x - Matrix to test
#
# Results:
#	Returns 1 if all components are even, 0 otherwise.

proc math::exact::meven {x} {
    lassign $x a b
    return [expr {[veven $a] && [veven $b]}]
}

# math::exact::teven --
#
#	Tests if all components of a 2x2x2 tensor are even
#
# Parameters:
#	x - Tensor to test
#
# Results:
#	Returns 1 if all components are even, 0 otherwise

proc math::exact::teven {x} {
    lassign $x a b
    return [expr {[meven $a] && [meven $b]}]
}

# math::exact::vhalf --
#
#	Divides both components of a 2-vector by 2
#
# Parameters:
#	x - Vector to scale
#
# Results:
#	Returns the scaled vector

proc math::exact::vhalf {x} {
    lassign $x a b
    tailcall list [expr {$a / 2}] [expr {$b / 2}]
}

# math::exact::mhalf --
#
#	Divides all components of a 2x2 matrix by 2
#
# Parameters:
#	x - Matrix to scale
#
# Results:
#	Returns the scaled matrix

proc math::exact::mhalf {x} {
    lassign $x a b
    tailcall list [vhalf $a] [vhalf $b]
}

# math::exact::thalf --
#
#	Divides all components of a 2x2x2 tensor by 2
#
# Parameters:
#	x - Tensor to scale
#
# Results:
#	Returns the scaled tensor

proc math::exact::thalf {x} {
    lassign $x a b
    tailcall list [mhalf $a] [mhalf $b]
}

# math::exact::vscale --
#
#	Removes all common factors of 2 from the two components of a 2-vector
#
# Paramters:
#	x - Vector to scale
#
# Results:
#	Returns the scaled vector

proc math::exact::vscale {x} {
    while {[veven $x]} {
	set x [vhalf $x]
    }
    return $x
}

# math::exact::mscale --
#
#	Removes all common factors of 2 from the two components of a
#	2x2 matrix
#
# Paramters:
#	x - Matrix to scale
#
# Results:
#	Returns the scaled matrix

proc math::exact::mscale {x} {
    while {[meven $x]} {
	set x [mhalf $x]
    }
    return $x
}

# math::exact::tscale --
#
#	Removes all common factors of 2 from the two components of a
#	2x2x2 tensor
#
# Paramters:
#	x - Tensor to scale
#
# Results:
#	Returns the scaled tensor

proc math::exact::tscale {x} {
    while {[teven $x]} {
	set x [thalf $x]
    }
    return $x
}

# math::exact::vreduce --
#
#	Reduces a vector (i.e., a rational number) to lowest terms
#
# Parameters:
#	x - Vector to scale
#
# Results:
#	Returns the scaled vector

proc math::exact::vreduce {x} {
    lassign $x a b
    set g [gcd $a $b]
    tailcall list [expr {$a / $g}] [expr {$b / $g}]
}

# math::exact::mreduce --
#
#	Removes all common factors from the two components of a
#	2x2 matrix
#
# Paramters:
#	x - Matrix to scale
#
# Results:
#	Returns the scaled matrix
#
# This procedure suffices to reduce the matrix to lowest terms if the matrix
# was constructed by pre- or post-multiplying a series of sign and digit
# matrices.

proc math::exact::mreduce {x} {
    lassign $x ab cd
    lassign $ab a b
    lassign $cd c d
    set g [gcd $a $b $c $d]
    tailcall list \
	[list [expr {$a / $g}] [expr {$b / $g}]] \
	[list [expr {$c / $g}] [expr {$d / $g}]]
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# Results:
#	Returns the scaled tensor
#
# This procedure suffices to reduce a tensor to lowest terms if it was 
# constructed by absorbing a digit matrix into a tensor that was already
# in lowest terms.

proc ::math::exact::treduce {x} {
    lassign $x abcd efgh
    lassign $abcd ab cd
    lassign $ab a b
    lassign $cd c d
    lassign $efgh ef gh
    lassign $ef e f
    lassign $gh g h







|







521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# Results:
#	Returns the scaled tensor
#
# This procedure suffices to reduce a tensor to lowest terms if it was 
# constructed by absorbing a digit matrix into a tensor that was already
# in lowest terms.

proc math::exact::treduce {x} {
    lassign $x abcd efgh
    lassign $abcd ab cd
    lassign $ab a b
    lassign $cd c d
    lassign $efgh ef gh
    lassign $ef e f
    lassign $gh g h
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
# Parameters:
#	x - First vector
#	y - Second vector
#
# Results:
#	Returns the vector sum

proc ::math::exact::vadd {x y} {
    lmap p $x q $y {expr {$p + $q}}
}

# math::exact::madd --
#
#	Adds two 2x2 matrices
#
# Parameters:
#	A - First matrix
#	B - Second matrix
#
# Results:
#	Returns the matrix sum

proc ::math::exact::madd {A B} {
    lmap x $A y $B {
	lmap p $x q $y {expr {$p + $q}}
    }
}

# math::exact::tadd --
#
#	Adds two 2x2x2 tensors
#
# Parameters:
#	U - First tensor
#	V - Second tensor
#
# Results:
#	Returns the tensor sum

proc ::math::exact::tadd {U V} {
    lmap A $U B $V {
	lmap x $A y $B {
	    lmap p $x q $y {expr {$p + $q}}
	}
    }
}

# math::exact::mdotv --
#
#	2x2 matrix times 2-vector
#
# Parameters;
#	A - Matrix
#	x - Vector
# 
# Results:
#	Returns the product vector

proc ::math::exact::mdotv {A x} {
    lassign $A ab cd
    lassign $ab a b
    lassign $cd c d
    lassign $x e f
    tailcall list [expr {$a*$e + $c*$f}] [expr {$b*$e + $d*$f}]
}

# math::exact::mdotm --
#
#	Product of two matrices
#
# Parameters:
#	A - Left matrix
#	B - Right matrix
#
# Results:
#	Returns the matrix product

proc ::math::exact::mdotm {A B} {
    lassign $B x y
    tailcall list [mdotv $A $x] [mdotv $A $y]
}

# math::exact::mdott --
#
#	Product of a matrix and a tensor
#
# Parameters:
#	A - Matrix
#	T - Tensor
#
# Results:
#	Returns the product tensor

proc ::math::exact::mdott {A T} {
    lassign $T B C
    tailcall list [mdotm $A $B] [mdotm $A $C]
}

# math::exact::trightv --
#
#	Right product of a tensor and a vector
#
# Parameters:
#	T - Tensor
#	v - Right-hand vector
#
# Results:
#	Returns the product matrix

proc ::math::exact::trightv {T v} {
    lassign $T m n
    tailcall list [mdotv $m $v] [mdotv $n $v]
}

# math::exact::trightm --
#
#	Right product of a tensor and a matrix
#
# Parameters:
#	T - Tensor
#	A - Right-hand matrix
#
# Results:
#	Returns the product tensor

proc ::math::exact::trightm {T A} {
    lassign $T m n
    tailcall list [mdotm $m $A] [mdotm $n $A]
}

# math::exact::tleftv --
#
#	Left product of a tensor and a vector
#
# Parameters:
#	T - Tensor
#	v - Left-hand vector
#
# Results:
#	Returns the product matrix

proc ::math::exact::tleftv {T v} {
    tailcall trightv [trans $T] $v
}

# math::exact::tleftm --
#
#	Left product of a tensor and a matrix
#
# Parameters:
#	T - Tensor
#	A - Left-hand matrix
#
# Results:
#	Returns the product tensor

proc ::math::exact::tleftm {T A} {
    tailcall trans [trightm [trans $T] $A]
}

# math::exact::vsign --
#
#	Computes the 'sign function' of a vector.
#







|














|
















|


















|


















|















|















|















|















|














|







550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
# Parameters:
#	x - First vector
#	y - Second vector
#
# Results:
#	Returns the vector sum

proc math::exact::vadd {x y} {
    lmap p $x q $y {expr {$p + $q}}
}

# math::exact::madd --
#
#	Adds two 2x2 matrices
#
# Parameters:
#	A - First matrix
#	B - Second matrix
#
# Results:
#	Returns the matrix sum

proc math::exact::madd {A B} {
    lmap x $A y $B {
	lmap p $x q $y {expr {$p + $q}}
    }
}

# math::exact::tadd --
#
#	Adds two 2x2x2 tensors
#
# Parameters:
#	U - First tensor
#	V - Second tensor
#
# Results:
#	Returns the tensor sum

proc math::exact::tadd {U V} {
    lmap A $U B $V {
	lmap x $A y $B {
	    lmap p $x q $y {expr {$p + $q}}
	}
    }
}

# math::exact::mdotv --
#
#	2x2 matrix times 2-vector
#
# Parameters;
#	A - Matrix
#	x - Vector
# 
# Results:
#	Returns the product vector

proc math::exact::mdotv {A x} {
    lassign $A ab cd
    lassign $ab a b
    lassign $cd c d
    lassign $x e f
    tailcall list [expr {$a*$e + $c*$f}] [expr {$b*$e + $d*$f}]
}

# math::exact::mdotm --
#
#	Product of two matrices
#
# Parameters:
#	A - Left matrix
#	B - Right matrix
#
# Results:
#	Returns the matrix product

proc math::exact::mdotm {A B} {
    lassign $B x y
    tailcall list [mdotv $A $x] [mdotv $A $y]
}

# math::exact::mdott --
#
#	Product of a matrix and a tensor
#
# Parameters:
#	A - Matrix
#	T - Tensor
#
# Results:
#	Returns the product tensor

proc math::exact::mdott {A T} {
    lassign $T B C
    tailcall list [mdotm $A $B] [mdotm $A $C]
}

# math::exact::trightv --
#
#	Right product of a tensor and a vector
#
# Parameters:
#	T - Tensor
#	v - Right-hand vector
#
# Results:
#	Returns the product matrix

proc math::exact::trightv {T v} {
    lassign $T m n
    tailcall list [mdotv $m $v] [mdotv $n $v]
}

# math::exact::trightm --
#
#	Right product of a tensor and a matrix
#
# Parameters:
#	T - Tensor
#	A - Right-hand matrix
#
# Results:
#	Returns the product tensor

proc math::exact::trightm {T A} {
    lassign $T m n
    tailcall list [mdotm $m $A] [mdotm $n $A]
}

# math::exact::tleftv --
#
#	Left product of a tensor and a vector
#
# Parameters:
#	T - Tensor
#	v - Left-hand vector
#
# Results:
#	Returns the product matrix

proc math::exact::tleftv {T v} {
    tailcall trightv [trans $T] $v
}

# math::exact::tleftm --
#
#	Left product of a tensor and a matrix
#
# Parameters:
#	T - Tensor
#	A - Left-hand matrix
#
# Results:
#	Returns the product tensor

proc math::exact::tleftm {T A} {
    tailcall trans [trightm [trans $T] $A]
}

# math::exact::vsign --
#
#	Computes the 'sign function' of a vector.
#
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
#
# If the quotient a/b is negative or indeterminate, the result is zero.
# If the quotient a/b is zero, the result is the sign of b.
# If the quotient a/b is positive, the result is the common sign of the
# operands, which are known to be of like sign
# If the quotient a/b is infinite, the result is the sign of a.

proc ::math::exact::sign {v} {
    lassign $v a b
    if {$a < 0} {
	if {$b <= 0} {
	    return -1
	} else {
	    return 0
	}







|







730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
#
# If the quotient a/b is negative or indeterminate, the result is zero.
# If the quotient a/b is zero, the result is the sign of b.
# If the quotient a/b is positive, the result is the common sign of the
# operands, which are known to be of like sign
# If the quotient a/b is infinite, the result is the sign of a.

proc math::exact::sign {v} {
    lassign $v a b
    if {$a < 0} {
	if {$b <= 0} {
	    return -1
	} else {
	    return 0
	}
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
#
# Parameters:
#	v - Vector to test
#
# Results:
#	1 if the vector refines, 0 otherwise.

proc ::math::exact::vrefines {v} {
    return [expr {[sign $v] != 0}]
}

# math::exact::mrefines --
#
#	Test whether a matrix refines
#
# Parameters:
#	A - Matrix to test
#
# Results:
#	1 if the matrix refines, 0 otherwise.

proc ::math::exact::mrefines {A} {
    lassign $A v w
    set a [sign $v]
    set b [sign $w]
    return [expr {$a == $b && $b != 0}]
}

# math::exact::trefines --
#
#	Tests whether a tensor refines
#
# Parameters:
#	T - Tensor to test.
#
# Results:
#	1 if the tensor refines, 0 otherwise.

proc ::math::exact::trefines {T} {
    lassign $T vw xy
    lassign $vw v w
    lassign $xy x y
    set a [sign $v]
    set b [sign $w]
    set c [sign $x]
    set d [sign $y]
    return [expr {$a == $b && $b == $c && $c == $d && $d != 0}]
}

# math::exact::vlessv -
#
#	Test whether one rational is less than another
#
# Parameters:
#	v, w - Two rational numbers
#
# Returns:
#	The result of the comparison.

proc ::math::exact::vlessv {v w} {
    expr {[determinant [list $v $w]] < 0}
}

# math::exact::mlessv -
#
#	Tests whether a rational interval is less than a vector
#
# Parameters:
#	m - Matrix representing the interval
#	x - Rational to compare against
#
# Results:
#	Returns 1 if m < x, 0 otherwise

proc ::math::exact::mlessv {m x} {
    lassign $m v w
    expr {[vlessv $v $x] && [vlessv $w $x]}
}

# math::exact::mlessm -
#
#	Tests whether one rational interval is strictly less than another
#
# Parameters:
#	m - First interval
#	n - Second interval
#
# Results:
#	Returns 1 if m < n, 0 otherwise

proc ::math::exact::mlessm {m n} {
    lassign $n v w
    expr {[mlessv $m $v] && [mlessv $m $w]}
}

# math::exact::mdisjointm -
#
#	Tests whether two rational intervals are disjoint
#
# Parameters:
#	m - First interval
#	n - Second interval
#
# Results:
#	Returns 1 if the intervals are disjoint, 0 otherwise

proc ::math::exact::mdisjointm {m n} {
    expr {[mlessm $m $n] || [mlessm $n $m]}
}

# math::exact::mAsFloat
#
#	Formats a matrix that represents a rational interval as a floating 
#	point number, stopping as soon as a digit is not determined.
#
# Parameters:
#	m - Matrix to format
#
# Results:
#	Returns the floating point number in scientific notation, with no
#	digits to the left of the decimal point.

proc ::math::exact::mAsFloat {m} {

    # Special case: If a number is exact, the determinant is zero.

    set d [determinant $m]
    lassign [lindex $m 0] p q
    if {$d == 0} {
	if {$q < 0} {







|













|
















|




















|














|















|















|















|







765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
#
# Parameters:
#	v - Vector to test
#
# Results:
#	1 if the vector refines, 0 otherwise.

proc math::exact::vrefines {v} {
    return [expr {[sign $v] != 0}]
}

# math::exact::mrefines --
#
#	Test whether a matrix refines
#
# Parameters:
#	A - Matrix to test
#
# Results:
#	1 if the matrix refines, 0 otherwise.

proc math::exact::mrefines {A} {
    lassign $A v w
    set a [sign $v]
    set b [sign $w]
    return [expr {$a == $b && $b != 0}]
}

# math::exact::trefines --
#
#	Tests whether a tensor refines
#
# Parameters:
#	T - Tensor to test.
#
# Results:
#	1 if the tensor refines, 0 otherwise.

proc math::exact::trefines {T} {
    lassign $T vw xy
    lassign $vw v w
    lassign $xy x y
    set a [sign $v]
    set b [sign $w]
    set c [sign $x]
    set d [sign $y]
    return [expr {$a == $b && $b == $c && $c == $d && $d != 0}]
}

# math::exact::vlessv -
#
#	Test whether one rational is less than another
#
# Parameters:
#	v, w - Two rational numbers
#
# Returns:
#	The result of the comparison.

proc math::exact::vlessv {v w} {
    expr {[determinant [list $v $w]] < 0}
}

# math::exact::mlessv -
#
#	Tests whether a rational interval is less than a vector
#
# Parameters:
#	m - Matrix representing the interval
#	x - Rational to compare against
#
# Results:
#	Returns 1 if m < x, 0 otherwise

proc math::exact::mlessv {m x} {
    lassign $m v w
    expr {[vlessv $v $x] && [vlessv $w $x]}
}

# math::exact::mlessm -
#
#	Tests whether one rational interval is strictly less than another
#
# Parameters:
#	m - First interval
#	n - Second interval
#
# Results:
#	Returns 1 if m < n, 0 otherwise

proc math::exact::mlessm {m n} {
    lassign $n v w
    expr {[mlessv $m $v] && [mlessv $m $w]}
}

# math::exact::mdisjointm -
#
#	Tests whether two rational intervals are disjoint
#
# Parameters:
#	m - First interval
#	n - Second interval
#
# Results:
#	Returns 1 if the intervals are disjoint, 0 otherwise

proc math::exact::mdisjointm {m n} {
    expr {[mlessm $m $n] || [mlessm $n $m]}
}

# math::exact::mAsFloat
#
#	Formats a matrix that represents a rational interval as a floating 
#	point number, stopping as soon as a digit is not determined.
#
# Parameters:
#	m - Matrix to format
#
# Results:
#	Returns the floating point number in scientific notation, with no
#	digits to the left of the decimal point.

proc math::exact::mAsFloat {m} {

    # Special case: If a number is exact, the determinant is zero.

    set d [determinant $m]
    lassign [lindex $m 0] p q
    if {$d == 0} {
	if {$q < 0} {
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
# Results:
#	Returns a list comprising the decimal exponent, followed by a series of
#	digits of the significand. The decimal point is to the left of the
#	leftmost digit of the significand.
#
#	Returns the empty string if a number is entirely undetermined.

proc ::math::exact::scientificNotation {m} {
    variable iszer
    set n 0
    while {1} {
	if {[vrefines [mdotv [reverse $m] {1 0}]]} {
	    return {}
	} elseif {[mrefines [mdotm $iszer $m]]} {
	    return [linsert [mantissa $m] 0 $n]
	} else {
	    set m [mdotm {{1 0} {0 10}} $m]
	    incr n
	}
    }
}

# math::exact::mantissa --
#
#	Given a matrix m that represents a rational interval whose
#	endpoints are in [0,1), formats as many digits of the represented
#	number as possible.
#
# Parameters:
#	m - Matrix to format
#
# Results:
#	Returns a list of digits

proc ::math::exact::mantissa {m} {
    set retval {}
    set done 0
    while {!$done} {
	set done 1

	# Brute force: try each digit in turn. This could no doubt be
	# improved on.







|
<




|




















|







925
926
927
928
929
930
931
932

933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
# Results:
#	Returns a list comprising the decimal exponent, followed by a series of
#	digits of the significand. The decimal point is to the left of the
#	leftmost digit of the significand.
#
#	Returns the empty string if a number is entirely undetermined.

proc math::exact::scientificNotation {m} {

    set n 0
    while {1} {
	if {[vrefines [mdotv [reverse $m] {1 0}]]} {
	    return {}
	} elseif {[mrefines [mdotm $math::exact::iszer $m]]} {
	    return [linsert [mantissa $m] 0 $n]
	} else {
	    set m [mdotm {{1 0} {0 10}} $m]
	    incr n
	}
    }
}

# math::exact::mantissa --
#
#	Given a matrix m that represents a rational interval whose
#	endpoints are in [0,1), formats as many digits of the represented
#	number as possible.
#
# Parameters:
#	m - Matrix to format
#
# Results:
#	Returns a list of digits

proc math::exact::mantissa {m} {
    set retval {}
    set done 0
    while {!$done} {
	set done 1

	# Brute force: try each digit in turn. This could no doubt be
	# improved on.
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
#	Formats a decimal exponent and significand in E format
#
# Parameters:
#	expAndDigits - List whose first element is the exponent and
#		       whose remaining elements are the digits of the
#		       significand.

proc ::math::exact::eFormat {expAndDigits} {

    # An empty sequence of digits is an indeterminate number

    if {[llength $expAndDigits] < 2} {
	return Undetermined
    }
    set significand [lassign $expAndDigits exponent]







|







984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
#	Formats a decimal exponent and significand in E format
#
# Parameters:
#	expAndDigits - List whose first element is the exponent and
#		       whose remaining elements are the digits of the
#		       significand.

proc math::exact::eFormat {expAndDigits} {

    # An empty sequence of digits is an indeterminate number

    if {[llength $expAndDigits] < 2} {
	return Undetermined
    }
    set significand [lassign $expAndDigits exponent]
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
# Parameters:
#	v - Two-element list of numerator and denominator.
#
# Results:
#	Returns the quotient in E format.  Nonzero/zero == Infinity,
#	0/0 == NaN.

proc ::math::exact::showRat {v} {
    lassign $v p q
    if {$p != 0 || $q != 0} {
	return [format %e [expr {double($p)/double($q)}]]
    } else {
	return NaN
    }
}

# math::exact::showInterval --
#
#	Formats a rational interval for printing
#
# Parameters:
#	m - Matrix representing the interval
#
# Results:
#	Returns a string representing the interval in E format.

proc ::math::exact::showInterval {m} {
    lassign $m v w
    return "\[[showRat $w] .. [showRat $v]\]"
}

# math::exact::showTensor --
#
#	Formats a tensor for printing
#
# Parameters:
#	t - Tensor to print
#
# Results:
#	Returns a string containing the left and right matrices of the
#	tensor, each represented as an interval.

proc ::math::exact::showTensor {t} {
    lassign $t m n
    return [list [showInterval $m] [showInterval $n]]
}

# math::exact::counted --
#
#	Reference counted object







|


















|















|







1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
# Parameters:
#	v - Two-element list of numerator and denominator.
#
# Results:
#	Returns the quotient in E format.  Nonzero/zero == Infinity,
#	0/0 == NaN.

proc math::exact::showRat {v} {
    lassign $v p q
    if {$p != 0 || $q != 0} {
	return [format %e [expr {double($p)/double($q)}]]
    } else {
	return NaN
    }
}

# math::exact::showInterval --
#
#	Formats a rational interval for printing
#
# Parameters:
#	m - Matrix representing the interval
#
# Results:
#	Returns a string representing the interval in E format.

proc math::exact::showInterval {m} {
    lassign $m v w
    return "\[[showRat $w] .. [showRat $v]\]"
}

# math::exact::showTensor --
#
#	Formats a tensor for printing
#
# Parameters:
#	t - Tensor to print
#
# Results:
#	Returns a string containing the left and right matrices of the
#	tensor, each represented as an interval.

proc math::exact::showTensor {t} {
    lassign $t m n
    return [list [showInterval $m] [showInterval $n]]
}

# math::exact::counted --
#
#	Reference counted object
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
#
# Notes:
#	Note that the four basic arithmetic operations are included here.
#	In addition, this procedure may be used to craft other useful
#	transformations. For example, (1 - u**2) / (1 + u**2)
#	could be constructed as [opreal {{{-1 1} {0 0}} {{0 0} {1 1}}} $u $u]

proc ::math::exact::opreal {op x y {kludge {}}} {
    # split x and y into sign and magnitude
    $x ref; $y ref
    lassign [$x getSignAndMagnitude] sx mx
    lassign [$y getSignAndMagnitude] sy my
    $mx ref; $my ref
    $x unref; $y unref
    set t [tleftm [trightm $op $sy] $sx]







|







2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
#
# Notes:
#	Note that the four basic arithmetic operations are included here.
#	In addition, this procedure may be used to craft other useful
#	transformations. For example, (1 - u**2) / (1 + u**2)
#	could be constructed as [opreal {{{-1 1} {0 0}} {{0 0} {1 1}}} $u $u]

proc math::exact::opreal {op x y {kludge {}}} {
    # split x and y into sign and magnitude
    $x ref; $y ref
    lassign [$x getSignAndMagnitude] sx mx
    lassign [$y getSignAndMagnitude] sy my
    $mx ref; $my ref
    $x unref; $y unref
    set t [tleftm [trightm $op $sy] $sx]
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
# Parameters:
#	x - First operand
#	y - Second operand
#
# Results:
#	Returns x+y, x-y, x*y or x/y as requested.

proc ::math::exact::+real {a b} { variable tadd; return [opreal $tadd $a $b] }
proc ::math::exact::-real {a b} { variable tsub; return [opreal $tsub $a $b] }
proc ::math::exact::*real {a b} { variable tmul; return [opreal $tmul $a $b] }
proc ::math::exact::/real {a b} { variable tdiv; return [opreal $tdiv $a $b] }

# real --
#
#	Coerce an argument to exact-real (possibly from rational)
#
# Parameters:
#	x - Argument to coerce.
#
# Results:
#	Returns the argument coerced to a real.
#
# This operation either does nothing and returns its argument, or is a
# Consumer with respect to its argument and a Constructor with respect to
# its result.

proc ::math::exact::function::real {x} {
    tailcall $x asReal
}

# SqrtWorker --
#
#	Class to calculate the square root of a real.








|
|
|
|















|







2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
# Parameters:
#	x - First operand
#	y - Second operand
#
# Results:
#	Returns x+y, x-y, x*y or x/y as requested.

proc math::exact::+real {a b} { variable tadd; return [opreal $tadd $a $b] }
proc math::exact::-real {a b} { variable tsub; return [opreal $tsub $a $b] }
proc math::exact::*real {a b} { variable tmul; return [opreal $tmul $a $b] }
proc math::exact::/real {a b} { variable tdiv; return [opreal $tdiv $a $b] }

# real --
#
#	Coerce an argument to exact-real (possibly from rational)
#
# Parameters:
#	x - Argument to coerce.
#
# Results:
#	Returns the argument coerced to a real.
#
# This operation either does nothing and returns its argument, or is a
# Consumer with respect to its argument and a Constructor with respect to
# its result.

proc math::exact::function::real {x} {
    tailcall $x asReal
}

# SqrtWorker --
#
#	Class to calculate the square root of a real.

2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
#
# Results:
#	Returns the square root as an exact real.
#
# The number may be rational or real. There is a special optimization used
# if the number is rational

proc ::math::exact::function::sqrt {x} {
    tailcall $x sqrt
}

# ExpWorker --
#
#	Class that evaluates the exponential function for small exact reals








|







2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
#
# Results:
#	Returns the square root as an exact real.
#
# The number may be rational or real. There is a special optimization used
# if the number is rational

proc math::exact::function::sqrt {x} {
    tailcall $x sqrt
}

# ExpWorker --
#
#	Class that evaluates the exponential function for small exact reals

2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
#
# Results:
#	Returns the exact real function value.
#
# This procedure is a Consumer with respect to its argument and a
# Constructor with respect to its result, returning a zero-ref object.

proc ::math::exact::function::exp {x} {
    variable ::math::exact::iszer
    variable ::math::exact::tmul

    # The continued fraction converges only for arguments between -1 and 1.
    # If $iszer refines the argument, then it is in the correct range and
    # we launch ExpWorker to evaluate the continued fraction. If the argument
    # is outside the range [-1/2..1/2], then we evaluate exp(x/2) and square







|







2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
#
# Results:
#	Returns the exact real function value.
#
# This procedure is a Consumer with respect to its argument and a
# Constructor with respect to its result, returning a zero-ref object.

proc math::exact::function::exp {x} {
    variable ::math::exact::iszer
    variable ::math::exact::tmul

    # The continued fraction converges only for arguments between -1 and 1.
    # If $iszer refines the argument, then it is in the correct range and
    # we launch ExpWorker to evaluate the continued fraction. If the argument
    # is outside the range [-1/2..1/2], then we evaluate exp(x/2) and square
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
#
# Results:
#	Returns the logarithm
#
# This procedure is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a zero-ref object.

proc ::math::exact::function::log {x} {
    variable ::math::exact::ispos
    variable ::math::exact::isneg
    variable ::math::exact::idpos
    variable ::math::exact::idneg
    variable ::math::exact::log2

    # If x is between 1/2 and 2, the continued fraction will converge. If







|







2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
#
# Results:
#	Returns the logarithm
#
# This procedure is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a zero-ref object.

proc math::exact::function::log {x} {
    variable ::math::exact::ispos
    variable ::math::exact::isneg
    variable ::math::exact::idpos
    variable ::math::exact::idneg
    variable ::math::exact::log2

    # If x is between 1/2 and 2, the continued fraction will converge. If
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
#
# Results:
#	Returns the tangent
#
# This procedure is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a zero-ref object.

proc ::math::exact::function::tan {x} {
    variable ::math::exact::iszer

    # If |x| < 1, then we use Potts's formula for the tangent.
    # If |x| > 1/2, then we compute y = tan(x/2) and then use the
    # trig identity tan(x) = 2*y/(1-y**2), recognizing that the latter
    # expression can be expressed as a bihomography applied to y and itself,
    # allowing opreal to do the job.







|







3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
#
# Results:
#	Returns the tangent
#
# This procedure is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a zero-ref object.

proc math::exact::function::tan {x} {
    variable ::math::exact::iszer

    # If |x| < 1, then we use Potts's formula for the tangent.
    # If |x| > 1/2, then we compute y = tan(x/2) and then use the
    # trig identity tan(x) = 2*y/(1-y**2), recognizing that the latter
    # expression can be expressed as a bihomography applied to y and itself,
    # allowing opreal to do the job.
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
#
# Results:
#	Returns the sine
#
# This procedure is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a zero-ref object.

proc ::math::exact::function::sin {x} {
    $x ref
    set tanxover2 [tan [$x applyM {{1 0} {0 2}}]]
    $x unref
    return [opreal {{{0 1} {1 0}} {{1 0} {0 1}}} $tanxover2 $tanxover2]
}

# cos --
#	Cosine of an exact real argument
#
# Parameters:
#	x - Quantity whose cosine is to be computed.
#
# Results:
#	Returns the cosine
#
# This procedure is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a zero-ref object.

proc ::math::exact::function::cos {x} {
    $x ref
    set tanxover2 [tan [$x applyM {{1 0} {0 2}}]]
    $x unref
    return [opreal {{{-1 1} {0 0}} {{0 0} {1 1}}} $tanxover2 $tanxover2]
}

# AtanWorker --







|


















|







3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
#
# Results:
#	Returns the sine
#
# This procedure is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a zero-ref object.

proc math::exact::function::sin {x} {
    $x ref
    set tanxover2 [tan [$x applyM {{1 0} {0 2}}]]
    $x unref
    return [opreal {{{0 1} {1 0}} {{1 0} {0 1}}} $tanxover2 $tanxover2]
}

# cos --
#	Cosine of an exact real argument
#
# Parameters:
#	x - Quantity whose cosine is to be computed.
#
# Results:
#	Returns the cosine
#
# This procedure is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a zero-ref object.

proc math::exact::function::cos {x} {
    $x ref
    set tanxover2 [tan [$x applyM {{1 0} {0 2}}]]
    $x unref
    return [opreal {{{-1 1} {0 0}} {{0 0} {1 1}}} $tanxover2 $tanxover2]
}

# AtanWorker --
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
#
# Results:
#	Returns atan((x-1)/(x+1))
#
# This function is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a 0-reference object.

proc ::math::exact::atanS0 {x} {
    return [opreal {{{1 2} {1 0}} {{-1 0} {-1 2}}} $x [AtanWorker new $x]]
}

# atan -
#
#	Arctangent of an exact real
#
# Parameters:
#	x - Exact real argument
#
# Results:
#	Returns atan(x)
#
# This function is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a 0-reference object.
#
# atan(1/0) is undefined and may cause an infinite loop.

proc ::math::exact::function::atan {x} {

    # TODO - find p/q close to the real number x - can be done by
    #        getting a few digits - and do
    # arctan(p/q + eps) = arctan(p/q) + arctan(q**2*eps/(p*q*eps+p**q+q**2))
    # using [$eps applyM] to compute the argument of the second arctan

    variable ::math::exact::szer 







|


















|







3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
#
# Results:
#	Returns atan((x-1)/(x+1))
#
# This function is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a 0-reference object.

proc math::exact::atanS0 {x} {
    return [opreal {{{1 2} {1 0}} {{-1 0} {-1 2}}} $x [AtanWorker new $x]]
}

# atan -
#
#	Arctangent of an exact real
#
# Parameters:
#	x - Exact real argument
#
# Results:
#	Returns atan(x)
#
# This function is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a 0-reference object.
#
# atan(1/0) is undefined and may cause an infinite loop.

proc math::exact::function::atan {x} {

    # TODO - find p/q close to the real number x - can be done by
    #        getting a few digits - and do
    # arctan(p/q + eps) = arctan(p/q) + arctan(q**2*eps/(p*q*eps+p**q+q**2))
    # using [$eps applyM] to compute the argument of the second arctan

    variable ::math::exact::szer 
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
# This function is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a 0-reference object.
#
# The function is defined only over the open interval (-1,1). Outside
# that range INCLUDING AT THE ENDPOINTS, it may fail and give an infinite
# loop or stack overflow.

proc ::math::exact::asinreal {x} {
    variable iszer
    variable pi

    # Potts's formula doesn't work here - it's singular at zero,
    # and undefined over negative numbers. But some messing with the
    # algebra gives us:
    #     asin(S0*x) = 2*atan(sqrt(x)) - pi/2







|







3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
# This function is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a 0-reference object.
#
# The function is defined only over the open interval (-1,1). Outside
# that range INCLUDING AT THE ENDPOINTS, it may fail and give an infinite
# loop or stack overflow.

proc math::exact::asinreal {x} {
    variable iszer
    variable pi

    # Potts's formula doesn't work here - it's singular at zero,
    # and undefined over negative numbers. But some messing with the
    # algebra gives us:
    #     asin(S0*x) = 2*atan(sqrt(x)) - pi/2
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
# This function is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a 0-reference object.
#
# The function is defined only over the open interval (-1,1). Outside
# that range INCLUDING AT THE ENDPOINTS, it may fail and give an infinite
# loop or stack overflow.

proc ::math::exact::acosreal {x} {
    variable iszer
    variable pi
    # Potts's formula doesn't work here - it's singular at zero,
    # and undefined over negative numbers. But some messing with the
    # algebra gives us:
    # acos(S0*x) = pi - 2*atan(sqrt(x))
    $x ref







|







3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
# This function is a Consumer with respect to its argument and a Constructor
# with respect to its result, returning a 0-reference object.
#
# The function is defined only over the open interval (-1,1). Outside
# that range INCLUDING AT THE ENDPOINTS, it may fail and give an infinite
# loop or stack overflow.

proc math::exact::acosreal {x} {
    variable iszer
    variable pi
    # Potts's formula doesn't work here - it's singular at zero,
    # and undefined over negative numbers. But some messing with the
    # algebra gives us:
    # acos(S0*x) = pi - 2*atan(sqrt(x))
    $x ref
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
#
# These functions are all Consumers with respect to their arguments and
# Constructors with respect to their results, returning zero-ref objects.
#
# The three functions are well defined over all the finite reals, but
# are ill-behaved at infinity.

proc ::math::exact::sinhreal {x} {
    set expx [function::exp $x]
    return [opreal {{{1 0} {0 1}} {{0 1} {-1 0}}} $expx $expx]
}

interp alias {} math::exact::function::sinh {} math::exact::sinhreal

proc ::math::exact::coshreal {x} {
    set expx [function::exp $x]
    return [opreal {{{1 0} {0 1}} {{0 1} {1 0}}} $expx $expx]
}

interp alias {} math::exact::function::cosh {} math::exact::coshreal

proc ::math::exact::tanhreal {x} {
    set expx [function::exp $x]
    return [opreal {{{1 1} {0 0}} {{0 0} {-1 1}}} $expx $expx]
}

interp alias {} math::exact::function::tanh {} math::exact::tanhreal

# asinhreal, acoshreal, atanhreal --







|






|






|







3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
#
# These functions are all Consumers with respect to their arguments and
# Constructors with respect to their results, returning zero-ref objects.
#
# The three functions are well defined over all the finite reals, but
# are ill-behaved at infinity.

proc math::exact::sinhreal {x} {
    set expx [function::exp $x]
    return [opreal {{{1 0} {0 1}} {{0 1} {-1 0}}} $expx $expx]
}

interp alias {} math::exact::function::sinh {} math::exact::sinhreal

proc math::exact::coshreal {x} {
    set expx [function::exp $x]
    return [opreal {{{1 0} {0 1}} {{0 1} {1 0}}} $expx $expx]
}

interp alias {} math::exact::function::cosh {} math::exact::coshreal

proc math::exact::tanhreal {x} {
    set expx [function::exp $x]
    return [opreal {{{1 1} {0 0}} {{0 0} {-1 1}}} $expx $expx]
}

interp alias {} math::exact::function::tanh {} math::exact::tanhreal

# asinhreal, acoshreal, atanhreal --
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
# Constructors with respect to their results, returning zero-ref objects.
#
# asinh is defined over the entire real number line, with the exception
# of the point at infinity.  acosh is defined over x > 1 (NOT x=1, which
# is singular). atanh is defined over (-1..1) (NOT the endpoints of the
# interval.)

proc ::math::exact::asinhreal {x} {
    # domain (-Inf .. Inf)
    # asinh(x) = log(x + sqrt(x**2 + 1))
    $x ref
    set retval [function::log \
		    [+real $x \
			 [function::sqrt \
			      [opreal {{{1 0} {0 0}} {{0 0} {1 1}}} $x $x]]]]
    $x unref
    return $retval
}

interp alias {} math::exact::function::asinh {} math::exact::asinhreal

proc ::math::exact::acoshreal {x} {
    # domain (1 .. Inf)
    # asinh(x) = log(x + sqrt(x**2 - 1))
    $x ref
    set retval [function::log \
		    [+real $x \
			 [function::sqrt \
			      [opreal {{{1 0} {0 0}} {{0 0} {-1 1}}} $x $x]]]]
    $x unref
    return $retval
}

interp alias {} math::exact::function::acosh {} math::exact::acoshreal

proc ::math::exact::atanhreal {x} {
    # domain (-1 .. 1)
    variable sinf
    #atanh(x) = log(Sinf[x])/2

    $x ref
    set y [$x applyM $sinf]
    $y ref







|













|













|







3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
# Constructors with respect to their results, returning zero-ref objects.
#
# asinh is defined over the entire real number line, with the exception
# of the point at infinity.  acosh is defined over x > 1 (NOT x=1, which
# is singular). atanh is defined over (-1..1) (NOT the endpoints of the
# interval.)

proc math::exact::asinhreal {x} {
    # domain (-Inf .. Inf)
    # asinh(x) = log(x + sqrt(x**2 + 1))
    $x ref
    set retval [function::log \
		    [+real $x \
			 [function::sqrt \
			      [opreal {{{1 0} {0 0}} {{0 0} {1 1}}} $x $x]]]]
    $x unref
    return $retval
}

interp alias {} math::exact::function::asinh {} math::exact::asinhreal

proc math::exact::acoshreal {x} {
    # domain (1 .. Inf)
    # asinh(x) = log(x + sqrt(x**2 - 1))
    $x ref
    set retval [function::log \
		    [+real $x \
			 [function::sqrt \
			      [opreal {{{1 0} {0 0}} {{0 0} {-1 1}}} $x $x]]]]
    $x unref
    return $retval
}

interp alias {} math::exact::function::acosh {} math::exact::acoshreal

proc math::exact::atanhreal {x} {
    # domain (-1 .. 1)
    variable sinf
    #atanh(x) = log(Sinf[x])/2

    $x ref
    set y [$x applyM $sinf]
    $y ref
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
    # is an intermediate result for the second and later continuants.
    constructor {a b {c {}}} {
	if {$c eq {}} {
	    set c [expr {$a - $b}]
	}
	set d [expr {2*($b-$a) + $c}]
	if {$d >= 0} {
	    next $::math::exact::dneg
	    set a_ [expr {4 * $a}]
	    set b_ $d
	    set c_ $c
	} else {
	    next $::math::exact::dpos
	    set a_ [expr {-$d}]
	    set b_ [expr {4 * $b}]
	    set c_ $c
	}
    }
    destructor {
	next







|




|







3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
    # is an intermediate result for the second and later continuants.
    constructor {a b {c {}}} {
	if {$c eq {}} {
	    set c [expr {$a - $b}]
	}
	set d [expr {2*($b-$a) + $c}]
	if {$d >= 0} {
	    next $math::exact::dneg
	    set a_ [expr {4 * $a}]
	    set b_ $d
	    set c_ $c
	} else {
	    next $math::exact::dpos
	    set a_ [expr {-$d}]
	    set b_ [expr {4 * $b}]
	    set c_ $c
	}
    }
    destructor {
	next
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
#
# Results:
#	Returns the power
#
# This procedure is a Consumer with respect to its arguments and a
# Constructor with respect to its result, returning a zero-ref object.

proc ::math::exact::rat**int {a b n} {
    if {$n < 0} {
	return [V new [list [expr {$b**(-$n)}] [expr {$a**(-$n)}]]]
    } elseif {$n > 0} {
	return [V new [list [expr {$a**($n)}] [expr {$b**($n)}]]]
    } else { ;# zero power shouldn't get here
	return [V new {1 1}]
    }







|







3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
#
# Results:
#	Returns the power
#
# This procedure is a Consumer with respect to its arguments and a
# Constructor with respect to its result, returning a zero-ref object.

proc math::exact::rat**int {a b n} {
    if {$n < 0} {
	return [V new [list [expr {$b**(-$n)}] [expr {$a**(-$n)}]]]
    } elseif {$n > 0} {
	return [V new [list [expr {$a**($n)}] [expr {$b**($n)}]]]
    } else { ;# zero power shouldn't get here
	return [V new {1 1}]
    }
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
#	Returns the power as an exact real
#
# Preconditions:
#	a != 0, b > 0, m != 0, n > 0
#
# This procedure is a Constructor with respect to its result

proc ::math::exact::rat**rat {a b m n} {

    # It would be attractive to special case this, but the real mechanism
    # works as well for the moment.

    tailcall real**rat [V new [list $a $b]] $m $n
}








|







3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
#	Returns the power as an exact real
#
# Preconditions:
#	a != 0, b > 0, m != 0, n > 0
#
# This procedure is a Constructor with respect to its result

proc math::exact::rat**rat {a b m n} {

    # It would be attractive to special case this, but the real mechanism
    # works as well for the moment.

    tailcall real**rat [V new [list $a $b]] $m $n
}

3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
#
# Results:
#	Returns the power.
#
# This procedure is a Consumer with respect to its arguments and a
# Constructor with respect to its result, returning a zero-ref object.

proc ::math::exact::real**int {b e} {

    # Handle a negative power by raising the reciprocal of the base to
    # a positive power
    if {$e < 0} {
	set e [expr {-$e}]
	set b [K [[$b ref] applyM {{0 1} {1 0}}] [$b unref]]
    }







|







3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
#
# Results:
#	Returns the power.
#
# This procedure is a Consumer with respect to its arguments and a
# Constructor with respect to its result, returning a zero-ref object.

proc math::exact::real**int {b e} {

    # Handle a negative power by raising the reciprocal of the base to
    # a positive power
    if {$e < 0} {
	set e [expr {-$e}]
	set b [K [[$b ref] applyM {{0 1} {1 0}}] [$b unref]]
    }
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
#
# Results:
#	Returns the power.
#
# This procedure is a Consumer with respect to its arguments and a
# Constructor with respect to its result, returning a zero-ref object.

proc ::math::exact::real**rat {b m n} {

    variable isneg
    variable ispos

    # At this point we need to know the sign of b. Try to determine it.
    # (This can be an infinite loop if b is zero or infinite)
    while {1} {







|







3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
#
# Results:
#	Returns the power.
#
# This procedure is a Consumer with respect to its arguments and a
# Constructor with respect to its result, returning a zero-ref object.

proc math::exact::real**rat {b m n} {

    variable isneg
    variable ispos

    # At this point we need to know the sign of b. Try to determine it.
    # (This can be an infinite loop if b is zero or infinite)
    while {1} {
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
    return $retval
}

# pi --
#
#	Returns pi as an exact real

proc ::math::exact::function::pi {} {
    variable ::math::exact::pi
    return $pi
}

# e --
#
#	Returns e as an exact real

proc ::math::exact::function::e {} {
    variable ::math::exact::e
    return $e
}

# math::exact::signum1 --
#
#	Tests an argument's sign.







|








|







3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
    return $retval
}

# pi --
#
#	Returns pi as an exact real

proc math::exact::function::pi {} {
    variable ::math::exact::pi
    return $pi
}

# e --
#
#	Returns e as an exact real

proc math::exact::function::e {} {
    variable ::math::exact::e
    return $e
}

# math::exact::signum1 --
#
#	Tests an argument's sign.
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
# looks like signum1((p-q) / epsilon) == -1. This test is decidable,
# and becomes a test that is true if p < q - epsilon, false if p > q+epsilon,
# and indeterminate if p lies within epsilon of q.  This test is enough for
# most checks for convergence or for selecting a branch of a function.
#
# This function is not decidable if it is not decidable whether x is finite.

proc ::math::exact::signum1 {x} {
    variable ispos
    variable isneg
    variable iszer
    while {1} {
	if {[$x refinesM $ispos]} {
	    return 1
	} elseif {[$x refinesM $isneg]} {







|







3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
# looks like signum1((p-q) / epsilon) == -1. This test is decidable,
# and becomes a test that is true if p < q - epsilon, false if p > q+epsilon,
# and indeterminate if p lies within epsilon of q.  This test is enough for
# most checks for convergence or for selecting a branch of a function.
#
# This function is not decidable if it is not decidable whether x is finite.

proc math::exact::signum1 {x} {
    variable ispos
    variable isneg
    variable iszer
    while {1} {
	if {[$x refinesM $ispos]} {
	    return 1
	} elseif {[$x refinesM $isneg]} {
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
#	|x| > 1 : 1
#	1/2 <= |x| <= 2 : May return -1, 0, 1
#
# This function is useful for convergence testing, where it is desired
# to know whether a given value has an absolute value less than a given
# tolerance.

proc ::math::exact::abs1 {x} {
    variable iszer
    while 1 {
	if {[$x refinesM $iszer]} {
	    return 0
	} elseif {[$x refinesM {{2 1} {-2 1}}]} {
	    return 1
	} else {
	    set x [$x absorb]
	}
    }
}

namespace eval ::math::exact {

    # Constant vectors, matrices and tensors

    ;				# the identity matrix
    variable identity		{{ 1  0} { 0  1}}
    ;				# sign matrices for exact floating point
    variable spos		$identity







|












|







3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
#	|x| > 1 : 1
#	1/2 <= |x| <= 2 : May return -1, 0, 1
#
# This function is useful for convergence testing, where it is desired
# to know whether a given value has an absolute value less than a given
# tolerance.

proc math::exact::abs1 {x} {
    variable iszer
    while 1 {
	if {[$x refinesM $iszer]} {
	    return 0
	} elseif {[$x refinesM {{2 1} {-2 1}}]} {
	    return 1
	} else {
	    set x [$x absorb]
	}
    }
}

namespace eval math::exact {

    # Constant vectors, matrices and tensors

    ;				# the identity matrix
    variable identity		{{ 1  0} { 0  1}}
    ;				# sign matrices for exact floating point
    variable spos		$identity
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
    }
    init
    rename init {}

    namespace export exactexpr abs1 signum1
}

package provide math::exact 1.0.1

#-----------------------------------------------------------------------







|


4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
    }
    init
    rename init {}

    namespace export exactexpr abs1 signum1
}

package provide math::exact 1.0

#-----------------------------------------------------------------------

Changes to modules/math/exact.test.

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
}
testing {
    useLocal exact.tcl             math::exact
}

package require Tcl             8.6
package require grammar::aycock 1.0
package require math::exact     1.0.1

#-----------------------------------------------------------------------------

namespace eval math::exact::test {

    namespace import ::math::exact::exactexpr








|







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
}
testing {
    useLocal exact.tcl             math::exact
}

package require Tcl             8.6
package require grammar::aycock 1.0
package require math::exact     1.0

#-----------------------------------------------------------------------------

namespace eval math::exact::test {

    namespace import ::math::exact::exactexpr

Deleted modules/math/filtergen.man.

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
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin math::filters n 0.1]
[keywords digital]
[keywords filtering]
[copyright {2020 by Arjen Markus}]
[moddesc   {Tcl Math Library}]
[titledesc {Digital filters}]
[category  Mathematics]
[require Tcl 8.6]
[require TclOO]
[require math::filters [opt 0.1]]

[description]
[para]
The [package math::filters] package implements digital filters,
notably Butterworth low-pass and high-pass filters. The procedures
allow to filter an entire data series as well as filter data one
by one.


[section "PROCEDURES"]

The package defines the following public procedures:

[list_begin definitions]

[call [cmd ::math::filters::filterButterworth] [arg lowpass] [arg order] [arg samplefreq] [arg cutofffreq]]

Determine the coefficients for a Butterworth filter of given order. The coefficients are returned as
a list of the x-coefficients, the y-coefficients and the scale. The formula is (n is the filter order):
[example {
                   n             n
    scale * y_k = sum x_(k-i) + sum y_(k-i)
                  i=0           i=1
}]

[list_begin arguments]
[arg_def bool lowpass] Generate a low-pass filter (1) or a high-pass filter (0)
[arg_def integer lowpass] The order of the filter to be generated
[arg_def double samplefreq] Sampling frequency of the data series
[arg_def double cutofffreq] Cut-off frequency for the filter
[list_end]


[call [cmd ::math::filters::filter] [arg coeffs] [arg data]]

Filter the entire data series based on the filter coefficients.

[list_begin arguments]
[arg_def list coeffs] List of coefficients as generated by [emph filterButterworth] (or in fact any similar list of coefficients)
[arg_def list data] Data to be filtered
[list_end]


[call [cmd ::math::filters::filterObj] new [arg coeffs] [arg yinit]]

Create a filter object. The initial x data are taken as zero. The initial y data can be prescribed. If they are not given,
they are taken as zero as well.

[list_begin arguments]
[arg_def list coeffs] List of coefficients as generated by [emph filterButterworth] (or in fact any similar list of coefficients)
[arg_def list yinit] (Optional) initial data for the filter result.
[list_end]


[call [cmd \$filterObj] filter [arg x]]

Filter a single value and return the result.

[list_begin arguments]
[arg_def double x] The value to be filtered
[list_end]


[call [cmd \$filterObj] reset]

Reset the filter object (start anew)

[list_end]

[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































Deleted modules/math/filtergen.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# filtergen.tcl --
#     Package for digital filters
#     filterButterworth:
#         Generate the coefficients for a low-pass or high-pass Butterworth filter
#     filter:
#         Filter an entire series of data
#     filterObject:
#         Class to create filters
#
#     Derived from: https://www.meme.net.au/butterworth.html
#
#     Here is the license notice from this webpage:
#
#       @licstart  The following is the entire license notice for the
#       JavaScript code in this page.
#
#       Copyright (C) 2013 Glenn McIntosh
#
#       The JavaScript code in this page is free software: you can
#       redistribute it and/or modify it under the terms of the GNU
#       General Public License (GNU GPL) as published by the Free Software
#       Foundation, either version 3 of the License, or (at your option)
#       any later version.  The code is distributed WITHOUT ANY WARRANTY;
#       without even the implied warranty of MERCHANTABILITY or FITNESS
#       FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.
#
#       As additional permission under GNU GPL version 3 section 7, you
#       may distribute non-source (e.g., minimized or compacted) forms of
#       that code without the copy of the GNU GPL normally required by
#       section 4, provided you include this license notice and a URL
#       through which recipients can access the Corresponding Source.
#
#       @licend  The above is the entire license notice
#       for the JavaScript code in this page.
#
package require Tcl 8.6
package require TclOO

namespace eval ::math::filters {}

# filterButterworth --
#     Generate the coefficients for a low-pass/high-pass Butterworth filter
#
# Arguments:
#     lowpass              Low-pass if 1, high-pass if 0
#     order                Order of the filter
#     samplefreq           Sample frequency
#     cutofffreq           Cut-off frequency (3 dB point)
#
# Returns:
#     List (nexted list) of coefficients for x and y and the scale factor
#
proc ::math::filters::filterButterworth {lowpass order samplefreq cutofffreq} {

    if { $order <= 0 || ! [string is integer $order] } {
        return -code error "The order must be a positive integer"
    }
    if { $samplefreq <= 0.0 || $cutofffreq <= 0.0 } {
        return -code error "The frequencies must be positive"
    }
    if { $samplefreq < $cutofffreq } {
        return -code error "The cutoff frequency must be lower than the sample frequency"
    }

    set pi     [expr {acos(-1.0)}]
    set cutoff [expr {-$cutofffreq / double($samplefreq) * 2.0 * $pi}]

    set yf0    [lrepeat [expr {$order+1}] 0.0]
    set yf1    $yf0
    set xf     $yf0

    lset yf0   0 -1.0
    lset yf1   0  0.0
    lset xf    0  1.0

    set scale  1.0
    set invert [expr {$lowpass == 1? 1.0 : -1.0}]

    for {set i 1} {$i <= $order} {incr i} {
        set angle  [expr {($i-0.5) / $order * $pi}]
        set sinsin [expr {1.0 - sin($cutoff) * sin($angle)}]
        set rcof0  [expr {-cos($cutoff) / $sinsin}]
        set rcof1  [expr { sin($cutoff) * cos($angle) / $sinsin}]

        lset yf0 $i 0.0
        lset yf1 $i 0.0

        for {set j $i} {$j > 0} {incr j -1} {
            set yf0jm1 [lindex $yf0 [expr {$j-1}]]
            set yf1jm1 [lindex $yf1 [expr {$j-1}]]
            set yf0j   [lindex $yf0 $j]
            set yf1j   [lindex $yf1 $j]

            lset yf0 $j [expr {$yf0j + $rcof0 * $yf0jm1 + $rcof1 * $yf1jm1}]
            lset yf1 $j [expr {$yf1j + $rcof0 * $yf1jm1 - $rcof1 * $yf0jm1}]
        }

        set  scale [expr {$scale * $sinsin * 2.0 / (1.0 - cos($cutoff) * $invert)}]
        set  xfim1 [lindex $xf [expr {$i-1}]]
        lset xf $i [expr {$xfim1 * $invert * ($order-$i+1)/double($i)}]
    }

    set scale [expr {sqrt($scale)}]

    for {set i 1} {$i <= $order} {incr i} {
        set  yf0i   [lindex $yf0 $i]
        lset yf0 $i [expr {$yf0i * $scale}]
    }

    return [list $xf [lrange $yf0 1 end] $scale]
}

# filter --
#     Filter the data series based on the given coefficients
#
# Arguments:
#     coeff           Filter coefficients, as generated by filtergen
#     data            Data to be filtered
#
# Returns:
#     The filtered data
#
# Note:
#     The initial part of the filtered data is a list of zeroes
#
proc ::math::filters::filter {coeff data} {
    lassign $coeff xcoeff ycoeff scale

    set filtered {}

    set yv [lrepeat [llength $ycoeff] [expr {0.0}]]

    set noxcoeff [llength $xcoeff]
    set xcoeff   [lreverse $xcoeff]
    set ycoeff   [lreverse $ycoeff]

    for {set i 0} {$i <= [llength $data]-$noxcoeff} {incr i} {
        set xv [lrange $data $i [expr {$i+$noxcoeff-1}]]

        set f  [expr {0.0}]

        foreach x $xv c $xcoeff {
            set f [expr {$f + $c * $x}]
        }

        foreach y $yv c $ycoeff {
            set f [expr {$f + $c * $y}]
        }

        set f [expr {$f / $scale}]

        lappend filtered $f

        set yv [concat [lrange $yv 1 end] $f]
    }

    return $filtered
}

# filterObject --
#     Create an object that can filter incoming data
#
# Arguments:
#     coeff           Filter coefficients, as generated by filtergen
#     yinit           (Optional) initial y-values
#
::oo::class create ::math::filters::filterObject {
    variable xcoeff
    variable ycoeff
    variable yv
    variable xv
    variable xv_org
    variable yv_org

    #
    # Constructor:
    # - the arguments coeff and, optionally, yinit
    # - prepare everything
    #
    constructor {coeff {yinit {}}} {
        variable xcoeff
        variable ycoeff
        variable scale
        variable yv
        variable xv
        variable yv_org
        variable xv_org

        lassign $coeff xcoeff ycoeff scale

        set xcoeff   [lreverse $xcoeff]
        set ycoeff   [lreverse $ycoeff]

        if { $yinit eq {} } {
            set yv [lrepeat [llength $ycoeff] [expr {0.0}]]
        } else {
            if { [llength $yinit] != [llength $ycoeff] } {
                return -code error "Length of initial y-values must be equal to the number of y coefficients"
            }
            set yv $yinit
        }
        set xv [lrepeat [llength $xcoeff] [expr {0.0}]]

        set xv_org $xv
        set yv_org $yv
    }

    method filter {x} {
        variable xcoeff
        variable ycoeff
        variable scale
        variable yv
        variable xv

        set xv [concat [lrange $xv 1 end] $x]
        set f  [expr {0.0}]

        foreach x $xv c $xcoeff {
            set f [expr {$f + $c * $x}]
        }

        foreach y $yv c $ycoeff {
            set f [expr {$f + $c * $y}]
        }

        set f  [expr {$f / $scale}]

        set yv [concat [lrange $yv 1 end] $f]

        return $f
    }

    method reset {} {
        variable yv
        variable xv
        variable xv_org
        variable yv_org

        set xv $xv_org
        set yv $yv_org
    }
}

# Publish the package

namespace eval ::math::filters {
    namespace export filterButterworth filter filterObject
}

package provide math::filters 0.1
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































Deleted modules/math/filtergen.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# -*- tcl -*-
# Tests for filters library.
#
# RCS: @(#) $Id: geometry.test,v 1.13 2010/04/06 17:02:25 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

support {
    useLocal math.tcl math
}
testing {
    useLocal filtergen.tcl math::filters
}

# -------------------------------------------------------------------------

proc withFourDecimals {args} {
    set res {}
    foreach arg $args {lappend res [expr (round(10000*$arg))/10000.0]}
    return $res
}

if { [info commands lmap] eq {} } {
    proc lmap {var list body} {
        upvar 1 $var _$var
        set __$var {}
        foreach _$var $list {
            lappend __$var [uplevel 1 $body]
        }
        set __$var
    }
}

#
# Custom matching procedure:
# Expect an accuracy of at least four decimals
#
proc matchNumbers {expected actual} {
    set match 1
    foreach a $actual e $expected {
        if { [llength $a] == 1 } {
            if {abs($a-$e) > 1.0e-4} {
                set match 0
                break
            }
        } else {
            set match [matchNumbers $a $e]
        }
    }
    return $match
}

customMatch numbers matchNumbers


# -------------------------------------------------------------------------

# Butterworth filter coefficients

test butterworth-1.1 {low-pass, second order} -match numbers -body {
    set coeffs [::math::filters::filterButterworth 1 2 100 20]
    set result [concat {*}$coeffs]
} -result {1.0 2.0 1.0 1.78885 -0.94793 4.84093}

test butterworth-1.2 {high-pass, second order} -match numbers -body {
    set coeffs [::math::filters::filterButterworth 0 2 100 20]
    set result [concat {*}$coeffs]
} -result {1.0 -2.0 1.0 0.94427 -0.50038 2.55535}


# Actually filter data

# 20 data, second-order filter, so 18 data returned
test filter-1.0 {low-pass, second order, uniform series} -match numbers -body {
    set coeffs   [::math::filters::filterButterworth 1 2 100 20]
    set data     [lrepeat 20 1.0]
    set filtered [::math::filters::filter $coeffs $data]
    set result   [list [llength $filtered] [lindex $filtered end]]
} -result {18 1.0}

test filter-1.1 {low-pass, second order, sine series} -match numbers -body {
    set coeffs   [::math::filters::filterButterworth 1 2 100 20]

    set twopi  [expr {2.0 * acos(-1.0)}]
    set period 100

    set data {}

    for {set i 0} {$i < $period} {incr i} {
        lappend data [expr {cos($twopi * ($i/1.0) / double($period))}]
    }

    set filtered [lrange [::math::filters::filter $coeffs $data] end-7 end]
} -result {0.845195 0.877086 0.905515 0.930371 0.951555 0.968984 0.982588 0.992315}

# The object interface

test filterobj-1.0 {low-pass, second order, sine series} -match numbers -body {
    set coeffs   [::math::filters::filterButterworth 1 2 100 20]
    set filter   [::math::filters::filterObject new $coeffs]

    set twopi  [expr {2.0 * acos(-1.0)}]
    set period 100

    set data {}

    for {set i 0} {$i < $period} {incr i} {
        lappend filtered [$filter filter [expr {cos($twopi * ($i/1.0) / double($period))}]]
    }

    set filtered [lrange $filtered end-9 end]
} -result {0.771545 0.809968 0.845195 0.877086 0.905515 0.930371 0.951555 0.968984 0.982588 0.992315}


#
# Cleanup
#
testsuiteCleanup
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































Changes to modules/math/fourier.man.

126
127
128
129
130
131
132
133
134
[arg_def list in_data] List of data (amplitudes)
[list_end]
[para]

[list_end]

[vset CATEGORY {math :: fourier}]
[include ../common-text/feedback.inc]
[manpage_end]







|

126
127
128
129
130
131
132
133
134
[arg_def list in_data] List of data (amplitudes)
[list_end]
[para]

[list_end]

[vset CATEGORY {math :: fourier}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/fourier.test.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- tcl -*-
# fourier.test --
#    Test cases for the Fourier transforms in the
#    ::math::fourier package
#

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal fourier.tcl math::fourier












|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- tcl -*-
# fourier.test --
#    Test cases for the Fourier transforms in the
#    ::math::fourier package
#

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal fourier.tcl math::fourier

Changes to modules/math/fuzzy.man.

125
126
127
128
129
130
131
132
133
APL QUOTE QUAD 8(3):16-23, March 1978.
[para]
D. Knuth, Art of Computer Programming,

Vol. 1, Problem 1.2.4-5.

[vset CATEGORY {math :: fuzzy}]
[include ../common-text/feedback.inc]
[manpage_end]







|

125
126
127
128
129
130
131
132
133
APL QUOTE QUAD 8(3):16-23, March 1978.
[para]
D. Knuth, Art of Computer Programming,

Vol. 1, Problem 1.2.4-5.

[vset CATEGORY {math :: fuzzy}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/fuzzy.test.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

support {
    useLocal math.tcl math
}
testing {
    useLocal fuzzy.tcl math::fuzzy







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    useLocal math.tcl math
}
testing {
    useLocal fuzzy.tcl math::fuzzy

Changes to modules/math/geometry.tcl.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: geometry.tcl,v 1.12 2010/05/24 21:44:16 andreas_kupries Exp $

namespace eval ::math::geometry {}

package require Tcl 8.5
package require math

###
#
# POINTS
#
#    A point P consists of an x-coordinate, Px, and a y-coordinate, Py,







<







10
11
12
13
14
15
16

17
18
19
20
21
22
23
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: geometry.tcl,v 1.12 2010/05/24 21:44:16 andreas_kupries Exp $

namespace eval ::math::geometry {}


package require math

###
#
# POINTS
#
#    A point P consists of an x-coordinate, Px, and a y-coordinate, Py,
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Point constructor
proc ::math::geometry::p {x y} {
    return [list $x $y]
}

# Vector addition
proc ::math::geometry::+ {pa pb} {
    lassign $pa ax ay; lassign $pb bx by

    return [list [expr {$ax + $bx}] [expr {$ay + $by}]]
}

# Vector difference
proc ::math::geometry::- {pa pb} {
    lassign $pa ax ay; lassign $pb bx by

    return [list [expr {$ax - $bx}] [expr {$ay - $by}]]
}

# Distance between 2 points
proc ::math::geometry::distance {pa pb} {
    lassign $pa ax ay; lassign $pb bx by

    return [expr {hypot($bx-$ax,$by-$ay)}]
}

# Length of a vector
proc ::math::geometry::length {v} {
    lassign $v x y
    return [expr {hypot($x,$y)}]
}

# Scaling a vector by a factor
proc ::math::geometry::s* {factor p} {
    lassign $p x y
    return [list [expr {$x * $factor}] [expr {$y * $factor}]]
}

# Unit vector into specific direction given by angle (degrees)
proc ::math::geometry::direction {angle} {
    variable torad
    set x [expr {cos($angle * $torad)}]
    set y [expr {sin($angle * $torad)}]
    return [list $x $y]
}

# Vertical vector of specified length.
proc ::math::geometry::v {h} {
    return [list 0 $h]
}







|
>





|
>





|
>





|





|






|
|







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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Point constructor
proc ::math::geometry::p {x y} {
    return [list $x $y]
}

# Vector addition
proc ::math::geometry::+ {pa pb} {
    foreach {ax ay} $pa break
    foreach {bx by} $pb break
    return [list [expr {$ax + $bx}] [expr {$ay + $by}]]
}

# Vector difference
proc ::math::geometry::- {pa pb} {
    foreach {ax ay} $pa break
    foreach {bx by} $pb break
    return [list [expr {$ax - $bx}] [expr {$ay - $by}]]
}

# Distance between 2 points
proc ::math::geometry::distance {pa pb} {
    foreach {ax ay} $pa break
    foreach {bx by} $pb break
    return [expr {hypot($bx-$ax,$by-$ay)}]
}

# Length of a vector
proc ::math::geometry::length {v} {
    foreach {x y} $v break
    return [expr {hypot($x,$y)}]
}

# Scaling a vector by a factor
proc ::math::geometry::s* {factor p} {
    foreach {x y} $p break
    return [list [expr {$x * $factor}] [expr {$y * $factor}]]
}

# Unit vector into specific direction given by angle (degrees)
proc ::math::geometry::direction {angle} {
    variable torad
    set x [expr {  cos($angle * $torad)}]
    set y [expr {- sin($angle * $torad)}]
    return [list $x $y]
}

# Vertical vector of specified length.
proc ::math::geometry::v {h} {
    return [list 0 $h]
}
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
proc ::math::geometry::between {pa pb s} {
    return [+ $pa [s* $s [- $pb $pa]]]
}

# Find direction octant the point (vector) lies in.
proc ::math::geometry::octant {p} {
    variable todeg
    lassign $p x y

    set a [expr {(atan2($y,$x)*$todeg)}]
    while {$a >  360} {set a [expr {$a - 360}]}
    while {$a < -360} {set a [expr {$a + 360}]}
    if {$a < 0} {set a [expr {360 + $a}]}

    #puts "p ($x, $y) @ angle $a | [expr {atan2($y,$x)}] | [expr {atan2($y,$x)*$todeg}]"
    # XXX : Add outer conditions to make a log2 tree of checks.








|

|







114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
proc ::math::geometry::between {pa pb s} {
    return [+ $pa [s* $s [- $pb $pa]]]
}

# Find direction octant the point (vector) lies in.
proc ::math::geometry::octant {p} {
    variable todeg
    foreach {x y} $p break

    set a [expr {(atan2(-$y,$x)*$todeg)}]
    while {$a >  360} {set a [expr {$a - 360}]}
    while {$a < -360} {set a [expr {$a + 360}]}
    if {$a < 0} {set a [expr {360 + $a}]}

    #puts "p ($x, $y) @ angle $a | [expr {atan2($y,$x)}] | [expr {atan2($y,$x)*$todeg}]"
    # XXX : Add outer conditions to make a log2 tree of checks.

144
145
146
147
148
149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165
166
167
168
169
170
171

172
173
174
175

176
177
178
179
180
181
182
183
	}
	return east ; # a <= 360.0
    }
}

# Return the NW and SE corners of the rectangle.
proc ::math::geometry::nwse {rect} {
    lassign $rect xnw ynw xse yse
    return [list [p $xnw $ynw] [p $xse $yse]]
}

# Construct rectangle from NW and SE corners.
proc ::math::geometry::rect {pa pb} {
    lassign $pa ax ay; lassign $pb bx by

    return [list $ax $ay $bx $by]
}

proc ::math::geometry::conjx {p} {
    lassign $p x y
    return [list [expr {- $x}] $y]
}

proc ::math::geometry::conjy {p} {
    lassign $p x y
    return [list $x [expr {- $y}]]
}

proc ::math::geometry::x {p} {

    return [lindex $p 0]
}

proc ::math::geometry::y {p} {

    return [lindex $p 1]
}

# ::math::geometry::calculateDistanceToLine
#
#       Calculate the distance between a point and a line.
#
# Arguments:







|





|
>




|




|




>
|



>
|







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
	}
	return east ; # a <= 360.0
    }
}

# Return the NW and SE corners of the rectangle.
proc ::math::geometry::nwse {rect} {
    foreach {xnw ynw xse yse} $rect break
    return [list [p $xnw $ynw] [p $xse $yse]]
}

# Construct rectangle from NW and SE corners.
proc ::math::geometry::rect {pa pb} {
    foreach {ax ay} $pa break
    foreach {bx by} $pb break
    return [list $ax $ay $bx $by]
}

proc ::math::geometry::conjx {p} {
    foreach {x y} $p break
    return [list [expr {- $x}] $y]
}

proc ::math::geometry::conjy {p} {
    foreach {x y} $p break
    return [list $x [expr {- $y}]]
}

proc ::math::geometry::x {p} {
    foreach {x y} $p break
    return $x
}

proc ::math::geometry::y {p} {
    foreach {x y} $p break
    return $y
}

# ::math::geometry::calculateDistanceToLine
#
#       Calculate the distance between a point and a line.
#
# Arguments:
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
#     - calculateDistanceToLine {5 10} {0 0 10 10}
#       Result: 3.53553390593
#     - calculateDistanceToLine {-10 0} {0 0 10 10}
#       Result: 7.07106781187
#
proc ::math::geometry::calculateDistanceToLine {P line} {
    # solution based on FAQ 1.02 on comp.graphics.algorithms
    # L = hypot( Bx-Ax, By-Ay )
    #     (Ay-Cy)(Bx-Ax)-(Ax-Cx)(By-Ay)
    # s = -----------------------------
    #                 L^2
    # dist = |s|*L
    #
    # =>
    #
    #        | (Ay-Cy)(Bx-Ax)-(Ax-Cx)(By-Ay) |
    # dist = ---------------------------------
    #                       L
    set Ax [lindex $line 0]
    set Ay [lindex $line 1]
    set Bx [lindex $line 2]
    set By [lindex $line 3]
    set Cx [lindex $P 0]
    set Cy [lindex $P 1]
    if {$Ax==$Bx && $Ay==$By} {
	return [lengthOfPolyline [concat $P [lrange $line 0 1]]]
    } else {
	set L [expr {hypot($Bx-$Ax,$By-$Ay)}]
	return [expr {abs(($Ay-$Cy)*($Bx-$Ax)-($Ax-$Cx)*($By-$Ay)) / $L}]
    }
}

# ::math::geometry::findClosestPointOnLine
#
#       Return the point on a line which is closest to a given point.







|



















|







196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#     - calculateDistanceToLine {5 10} {0 0 10 10}
#       Result: 3.53553390593
#     - calculateDistanceToLine {-10 0} {0 0 10 10}
#       Result: 7.07106781187
#
proc ::math::geometry::calculateDistanceToLine {P line} {
    # solution based on FAQ 1.02 on comp.graphics.algorithms
    # L = sqrt( (Bx-Ax)^2 + (By-Ay)^2 )
    #     (Ay-Cy)(Bx-Ax)-(Ax-Cx)(By-Ay)
    # s = -----------------------------
    #                 L^2
    # dist = |s|*L
    #
    # =>
    #
    #        | (Ay-Cy)(Bx-Ax)-(Ax-Cx)(By-Ay) |
    # dist = ---------------------------------
    #                       L
    set Ax [lindex $line 0]
    set Ay [lindex $line 1]
    set Bx [lindex $line 2]
    set By [lindex $line 3]
    set Cx [lindex $P 0]
    set Cy [lindex $P 1]
    if {$Ax==$Bx && $Ay==$By} {
	return [lengthOfPolyline [concat $P [lrange $line 0 1]]]
    } else {
	set L [expr {sqrt(pow($Bx-$Ax,2) + pow($By-$Ay,2))}]
	return [expr {abs(($Ay-$Cy)*($Bx-$Ax)-($Ax-$Cx)*($By-$Ay)) / $L}]
    }
}

# ::math::geometry::findClosestPointOnLine
#
#       Return the point on a line which is closest to a given point.
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
#                        r=0      P = A
#                        r=1      P = B
#                        r<0      P is on the backward extension of AB
#                        r>1      P is on the forward extension of AB
#                        0<r<1    P is interior to AB
#
proc ::math::geometry::findClosestPointOnLineImpl {P line} {
    # solution based on FAQ 1.02 on comp.graphics.algorithms - but avoid the
    # chain of pow( sqrt(...) ,2) for better precision (& performance).
    #   L^2 = (Bx-Ax)^2 + (By-Ay)^2
    #        (Cx-Ax)(Bx-Ax) + (Cy-Ay)(By-Ay)
    #   r = -------------------------------
    #                     L^2
    #   Px = Ax + r(Bx-Ax)
    #   Py = Ay + r(By-Ay)
    set Ax [lindex $line 0]
    set Ay [lindex $line 1]
    set Bx [lindex $line 2]
    set By [lindex $line 3]
    set Cx [lindex $P 0]
    set Cy [lindex $P 1]
    if {$Ax==$Bx && $Ay==$By} {
	return [list [list $Ax $Ay] 0]
    } else {
	set Lsquared [expr {pow($Bx-$Ax,2) + pow($By-$Ay,2)}]
	set r [expr {(($Cx-$Ax)*($Bx-$Ax) + ($Cy-$Ay)*($By-$Ay))/$Lsquared}]
	set Px [expr {$Ax + $r*($Bx-$Ax)}]
	set Py [expr {$Ay + $r*($By-$Ay)}]
	return [list [list $Px $Py] $r]
    }
}

# ::math::geometry::calculateDistanceToLineSegment







|
<
|














|
|







263
264
265
266
267
268
269
270

271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
#                        r=0      P = A
#                        r=1      P = B
#                        r<0      P is on the backward extension of AB
#                        r>1      P is on the forward extension of AB
#                        0<r<1    P is interior to AB
#
proc ::math::geometry::findClosestPointOnLineImpl {P line} {
    # solution based on FAQ 1.02 on comp.graphics.algorithms

    #   L = sqrt( (Bx-Ax)^2 + (By-Ay)^2 )
    #        (Cx-Ax)(Bx-Ax) + (Cy-Ay)(By-Ay)
    #   r = -------------------------------
    #                     L^2
    #   Px = Ax + r(Bx-Ax)
    #   Py = Ay + r(By-Ay)
    set Ax [lindex $line 0]
    set Ay [lindex $line 1]
    set Bx [lindex $line 2]
    set By [lindex $line 3]
    set Cx [lindex $P 0]
    set Cy [lindex $P 1]
    if {$Ax==$Bx && $Ay==$By} {
	return [list [list $Ax $Ay] 0]
    } else {
	set L [expr {sqrt(pow($Bx-$Ax,2) + pow($By-$Ay,2))}]
	set r [expr {(($Cx-$Ax)*($Bx-$Ax) + ($Cy-$Ay)*($By-$Ay))/pow($L,2)}]
	set Px [expr {$Ax + $r*($Bx-$Ax)}]
	set Py [expr {$Ay + $r*($By-$Ay)}]
	return [list [list $Px $Py] $r]
    }
}

# ::math::geometry::calculateDistanceToLineSegment
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
#                        r=1      P = B
#                        r<0      P is on the backward extension of AB
#                        r>1      P is on the forward extension of AB
#                        0<r<1    P is interior to AB
#
proc ::math::geometry::calculateDistanceToLineSegmentImpl {P linesegment} {
    # solution based on FAQ 1.02 on comp.graphics.algorithms
    # L = hypot( Bx-Ax , By-Ay )
    #     (Ay-Cy)(Bx-Ax)-(Ax-Cx)(By-Ay)
    # s = -----------------------------
    #                 L^2
    #      (Cx-Ax)(Bx-Ax) + (Cy-Ay)(By-Ay)
    # r = -------------------------------
    #                   L^2
    # dist = |s|*L







|







338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
#                        r=1      P = B
#                        r<0      P is on the backward extension of AB
#                        r>1      P is on the forward extension of AB
#                        0<r<1    P is interior to AB
#
proc ::math::geometry::calculateDistanceToLineSegmentImpl {P linesegment} {
    # solution based on FAQ 1.02 on comp.graphics.algorithms
    # L = sqrt( (Bx-Ax)^2 + (By-Ay)^2 )
    #     (Ay-Cy)(Bx-Ax)-(Ax-Cx)(By-Ay)
    # s = -----------------------------
    #                 L^2
    #      (Cx-Ax)(Bx-Ax) + (Cy-Ay)(By-Ay)
    # r = -------------------------------
    #                   L^2
    # dist = |s|*L
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
    set Bx [lindex $linesegment 2]
    set By [lindex $linesegment 3]
    set Cx [lindex $P 0]
    set Cy [lindex $P 1]
    if {$Ax==$Bx && $Ay==$By} {
	return [list [lengthOfPolyline [concat $P [lrange $linesegment 0 1]]] 0]
    } else {
	set L [expr {hypot($Bx-$Ax,$By-$Ay)}]
	set r [expr {(($Cx-$Ax)*($Bx-$Ax) + ($Cy-$Ay)*($By-$Ay))/pow($L,2)}]
	return [list [expr {abs(($Ay-$Cy)*($Bx-$Ax)-($Ax-$Cx)*($By-$Ay)) / $L}] $r]
    }
}

# ::math::geometry::findClosestPointOnLineSegment
#







|







361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
    set Bx [lindex $linesegment 2]
    set By [lindex $linesegment 3]
    set Cx [lindex $P 0]
    set Cy [lindex $P 1]
    if {$Ax==$Bx && $Ay==$By} {
	return [list [lengthOfPolyline [concat $P [lrange $linesegment 0 1]]] 0]
    } else {
	set L [expr {sqrt(pow($Bx-$Ax,2) + pow($By-$Ay,2))}]
	set r [expr {(($Cx-$Ax)*($Bx-$Ax) + ($Cy-$Ay)*($By-$Ay))/pow($L,2)}]
	return [list [expr {abs(($Ay-$Cy)*($Bx-$Ax)-($Ax-$Cx)*($By-$Ay)) / $L}] $r]
    }
}

# ::math::geometry::findClosestPointOnLineSegment
#
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
# Examples:
#     - calculateDistanceToPolyline {10 10} {0 0 10 5 20 0}
#       Result: 5.0
#     - calculateDistanceToPolyline {5 10} {0 0 10 5 20 0}
#       Result: 6.7082039325
#
proc ::math::geometry::calculateDistanceToPolyline {P polyline} {
    set minDist "Inf"
    foreach {Bx By} [lassign $polyline Ax Ay] {
	set dist [calculateDistanceToLineSegment $P [list $Ax $Ay $Bx $By]]
	if {$dist < $minDist} {
	    set minDist $dist
	}
	set Ax $Bx; set Ay $By
    }
    return $minDist
}

# ::math::geometry::calculateDistanceToPolygon
#
#       Calculate the distance between a point and a polygon.







|
|

|


<







418
419
420
421
422
423
424
425
426
427
428
429
430

431
432
433
434
435
436
437
# Examples:
#     - calculateDistanceToPolyline {10 10} {0 0 10 5 20 0}
#       Result: 5.0
#     - calculateDistanceToPolyline {5 10} {0 0 10 5 20 0}
#       Result: 6.7082039325
#
proc ::math::geometry::calculateDistanceToPolyline {P polyline} {
    set minDist "none"
    foreach {Ax Ay} [lrange $polyline 0 end-2] {Bx By} [lrange $polyline 2 end] {
	set dist [calculateDistanceToLineSegment $P [list $Ax $Ay $Bx $By]]
	if {$minDist=="none" || $dist < $minDist} {
	    set minDist $dist
	}

    }
    return $minDist
}

# ::math::geometry::calculateDistanceToPolygon
#
#       Calculate the distance between a point and a polygon.
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
# Examples:
#     - findClosestPointOnPolyline {10 10} {0 0 10 5 20 0}
#       Result: 10 5
#     - findClosestPointOnPolyline {5 10} {0 0 10 5 20 0}
#       Result: 8.0 4.0
#
proc ::math::geometry::findClosestPointOnPolyline {P polyline} {
    set closestPoint "none"; set closestDistance "Inf"
    foreach {Bx By} [lassign $polyline Ax Ay] {
	set Q [findClosestPointOnLineSegment $P [list $Ax $Ay $Bx $By]]
	set dist [distance $P $Q]
	if {$dist<$closestDistance} {
	    set closestPoint $Q
	    set closestDistance $dist
	}
	set Ax $Bx; set Ay $By
    }
    return $closestPoint
}











|
|

|
|



<







467
468
469
470
471
472
473
474
475
476
477
478
479
480
481

482
483
484
485
486
487
488
# Examples:
#     - findClosestPointOnPolyline {10 10} {0 0 10 5 20 0}
#       Result: 10 5
#     - findClosestPointOnPolyline {5 10} {0 0 10 5 20 0}
#       Result: 8.0 4.0
#
proc ::math::geometry::findClosestPointOnPolyline {P polyline} {
    set closestPoint "none"
    foreach {Ax Ay} [lrange $polyline 0 end-2] {Bx By} [lrange $polyline 2 end] {
	set Q [findClosestPointOnLineSegment $P [list $Ax $Ay $Bx $By]]
	set dist [lengthOfPolyline [concat $P $Q]]
	if {$closestPoint=="none" || $dist<$closestDistance} {
	    set closestPoint $Q
	    set closestDistance $dist
	}

    }
    return $closestPoint
}




499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
#
# Examples:
#     - lengthOfPolyline {0 0 5 0 5 10}
#       Result: 15.0
#
proc ::math::geometry::lengthOfPolyline {polyline} {
    set length 0
    foreach {x2 y2} [lassign $polyline x1 y1] {
	set length [expr {$length + hypot($x1-$x2,$y1-$y2)}]
	set x1 $x2; set y1 $y2
    }
    return $length
}











|
|
|







501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
#
# Examples:
#     - lengthOfPolyline {0 0 5 0 5 10}
#       Result: 15.0
#
proc ::math::geometry::lengthOfPolyline {polyline} {
    set length 0
    foreach {x1 y1} [lrange $polyline 0 end-2] {x2 y2} [lrange $polyline 2 end] {
	set length [expr {$length + sqrt(pow($x1-$x2,2) + pow($y1-$y2,2))}]
	#set length [expr {$length + sqrt(($x1-$x2)*($x1-$x2) + ($y1-$y2)*($y1-$y2))}]
    }
    return $length
}




666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
#       Result: 10.0 10.0
#     - findLineSegmentIntersection {0 0 10 10} {5 5 15 15}
#       Result: coincident
#
proc ::math::geometry::findLineSegmentIntersection {linesegment1 linesegment2} {
    if {[lineSegmentsIntersect $linesegment1 $linesegment2]} {
	set lineintersect [findLineIntersection $linesegment1 $linesegment2]
#puts ">>Intersect: $lineintersect"
	switch -- $lineintersect {

	    "coincident" {
		# lines are coincident
		set l1x1 [lindex $linesegment1 0]
		set l1y1 [lindex $linesegment1 1]
		set l1x2 [lindex $linesegment1 2]
		set l1y2 [lindex $linesegment1 3]
		set l2x1 [lindex $linesegment2 0]
		set l2y1 [lindex $linesegment2 1]
		set l2x2 [lindex $linesegment2 2]
		set l2y2 [lindex $linesegment2 3]
		# check if the line SEGMENTS overlap
		# (NOT enough to check if the x-intervals overlap (vertical lines!))
		set overlapx [intervalsOverlap $l1x1 $l1x2 $l2x1 $l2x2 1]
		set overlapy [intervalsOverlap $l1y1 $l1y2 $l2y1 $l2y2 1]
#puts ">>Overlap: $overlapx $overlapy"
		if {$overlapx || $overlapy} {
		    return "coincident"
		} else {
		    # If the line segments are adjacent, return the proper end point, otherwise "none"
		    if { ( $l1x1 == $l2x1 && $l1y1 == $l2y1 ) || ( $l1x1 == $l2x2 && $l1y1 == $l2y2 ) } {
		        return [list $l1x1 $l1y1]
		    }
		    if { ( $l1x2 == $l2x1 && $l1y2 == $l2y1 ) || ( $l1x2 == $l2x2 && $l1y2 == $l2y2 ) } {
		        return [list $l1x2 $l1y2]
		    }
		    return "none"
		}
	    }

	    "none" {
		# should never happen, because we call "lineSegmentsIntersect" first
		puts stderr "::math::geometry::findLineSegmentIntersection: suddenly no intersection?"







<














|
|
<
|


<
<
<
<
<
<
<







668
669
670
671
672
673
674

675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690

691
692
693







694
695
696
697
698
699
700
#       Result: 10.0 10.0
#     - findLineSegmentIntersection {0 0 10 10} {5 5 15 15}
#       Result: coincident
#
proc ::math::geometry::findLineSegmentIntersection {linesegment1 linesegment2} {
    if {[lineSegmentsIntersect $linesegment1 $linesegment2]} {
	set lineintersect [findLineIntersection $linesegment1 $linesegment2]

	switch -- $lineintersect {

	    "coincident" {
		# lines are coincident
		set l1x1 [lindex $linesegment1 0]
		set l1y1 [lindex $linesegment1 1]
		set l1x2 [lindex $linesegment1 2]
		set l1y2 [lindex $linesegment1 3]
		set l2x1 [lindex $linesegment2 0]
		set l2y1 [lindex $linesegment2 1]
		set l2x2 [lindex $linesegment2 2]
		set l2y2 [lindex $linesegment2 3]
		# check if the line SEGMENTS overlap
		# (NOT enough to check if the x-intervals overlap (vertical lines!))
		set overlapx [intervalsOverlap $l1x1 $l1x2 $l2x1 $l2x2 0]
		set overlapy [intervalsOverlap $l1y1 $l1y2 $l2y1 $l2y2 0]

		if {$overlapx && $overlapy} {
		    return "coincident"
		} else {







		    return "none"
		}
	    }

	    "none" {
		# should never happen, because we call "lineSegmentsIntersect" first
		puts stderr "::math::geometry::findLineSegmentIntersection: suddenly no intersection?"
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
	foreach part2 $polyline2parts {
	    set part1bbox [bbox $part1]
	    set part2bbox [bbox $part2]
	    if {[rectanglesOverlap [lrange $part1bbox 0 1] [lrange $part1bbox 2 3] \
		    [lrange $part2bbox 0 1] [lrange $part2bbox 2 3] 0]} {
		# the lines' bounding boxes intersect
		if {$perfectmatch} {
		    foreach {l1x2 l1y2} [lassign $part1 l1x1 l1y1] {
			foreach {l2x2 l2y2} [lassign $part2 l2x1 l2y1] {
			    if {[lineSegmentsIntersect [list $l1x1 $l1y1 $l1x2 $l1y2] \
				    [list $l2x1 $l2y1 $l2x2 $l2y2]]} {
				# two line segments overlap
				return 1
			    }
			    set l2x1 $l2x2; set l2y1 $l2y2
			}
			set l1x1 $l1x2; set l1y1 $l1y2
		    }
		    return 0
		} else {
		    return 1
		}
	    }
	}







|
|





<

<







849
850
851
852
853
854
855
856
857
858
859
860
861
862

863

864
865
866
867
868
869
870
	foreach part2 $polyline2parts {
	    set part1bbox [bbox $part1]
	    set part2bbox [bbox $part2]
	    if {[rectanglesOverlap [lrange $part1bbox 0 1] [lrange $part1bbox 2 3] \
		    [lrange $part2bbox 0 1] [lrange $part2bbox 2 3] 0]} {
		# the lines' bounding boxes intersect
		if {$perfectmatch} {
		    foreach {l1x1 l1y1} [lrange $part1 0 end-2] {l1x2 l1y2} [lrange $part1 2 end] {
			foreach {l2x1 l2y1} [lrange $part2 0 end-2] {l2x2 l2y2} [lrange $part2 2 end] {
			    if {[lineSegmentsIntersect [list $l1x1 $l1y1 $l1x2 $l1y2] \
				    [list $l2x1 $l2y1 $l2x2 $l2y2]]} {
				# two line segments overlap
				return 1
			    }

			}

		    }
		    return 0
		} else {
		    return 1
		}
	    }
	}
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080

1081
1082

1083
1084
1085
1086
1087
1088
1089
#
# Results:
#       closedpolygon a polygon whose first and last vertices
#                     coincide
#
proc ::math::geometry::ClosedPolygon {polygon} {

    lassign $polygon x y
    if { $x != [lindex $polygon end-1] ||
         $y != [lindex $polygon end]     } {

        lappend polygon $x $y


    }
    return $polygon

}


# ::math::geometry::pointInsidePolygon
#
#       Determine if a point is completely inside a polygon. If the point
#       touches the polygon, then the point is not complete inside the







<
|
|

|

>
|
|
>







1059
1060
1061
1062
1063
1064
1065

1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
#
# Results:
#       closedpolygon a polygon whose first and last vertices
#                     coincide
#
proc ::math::geometry::ClosedPolygon {polygon} {


    if { [lindex $polygon 0] != [lindex $polygon end-1] ||
         [lindex $polygon 1] != [lindex $polygon end]     } {

        return [concat $polygon [lrange $polygon 0 1]]

    } else {

        return $polygon
    }
}


# ::math::geometry::pointInsidePolygon
#
#       Determine if a point is completely inside a polygon. If the point
#       touches the polygon, then the point is not complete inside the
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
#       Result: 0
#
proc ::math::geometry::pointInsidePolygon {P polygon} {
    # check if P is on one of the polygon's sides (if so, P is not
    # inside the polygon)
    set closedPolygon [ClosedPolygon $polygon]

    foreach {x2 y2} [lassign $closedPolygon x1 y1] {
	if {[calculateDistanceToLineSegment $P [list $x1 $y1 $x2 $y2]]<0.0000001} {
	    return 0
	}
	set x1 $x2; set y1 $y2
    }

    # Algorithm
    #
    # Consider a straight line going from P to a point far away from both
    # P and the polygon (in particular outside the polygon).
    #   - If the line intersects with 0 of the polygon's sides, then







|



<







1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106

1107
1108
1109
1110
1111
1112
1113
#       Result: 0
#
proc ::math::geometry::pointInsidePolygon {P polygon} {
    # check if P is on one of the polygon's sides (if so, P is not
    # inside the polygon)
    set closedPolygon [ClosedPolygon $polygon]

    foreach {x1 y1} [lrange $closedPolygon 0 end-2] {x2 y2} [lrange $closedPolygon 2 end] {
	if {[calculateDistanceToLineSegment $P [list $x1 $y1 $x2 $y2]]<0.0000001} {
	    return 0
	}

    }

    # Algorithm
    #
    # Consider a straight line going from P to a point far away from both
    # P and the polygon (in particular outside the polygon).
    #   - If the line intersects with 0 of the polygon's sides, then
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
        [expr {[lindex $polygonBbox 1]-0.1*[lindex $polygonBbox 3]}]]

    set infinityLine [concat $pointFarAway $P]

    # calculate number of intersections
    set noOfIntersections 0
    #   1. count intersections between the line and the polygon's sides
    foreach {x2 y2} [lassign $closedPolygon x1 y1] {
	if {[lineSegmentsIntersect $infinityLine [list $x1 $y1 $x2 $y2]]} {
	    incr noOfIntersections
	}
	set x1 $x2; set y1 $y2
    }
    #   2. count intersections between the line and the polygon's points
    foreach {x1 y1} $closedPolygon {
	if {[calculateDistanceToLineSegment [list $x1 $y1] $infinityLine]<0.0000001} {
	    incr noOfIntersections
	}
    }







|



<







1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141

1142
1143
1144
1145
1146
1147
1148
        [expr {[lindex $polygonBbox 1]-0.1*[lindex $polygonBbox 3]}]]

    set infinityLine [concat $pointFarAway $P]

    # calculate number of intersections
    set noOfIntersections 0
    #   1. count intersections between the line and the polygon's sides
    foreach {x1 y1} [lrange $closedPolygon 0 end-2] {x2 y2} [lrange $closedPolygon 2 end] {
	if {[lineSegmentsIntersect $infinityLine [list $x1 $y1 $x2 $y2]]} {
	    incr noOfIntersections
	}

    }
    #   2. count intersections between the line and the polygon's points
    foreach {x1 y1} $closedPolygon {
	if {[calculateDistanceToLineSegment [list $x1 $y1] $infinityLine]<0.0000001} {
	    incr noOfIntersections
	}
    }
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
#
# Examples:
#     - areaPolygon {-10 -10 10 -10 10 10 -10 10}
#       Result: 400
#
proc ::math::geometry::areaPolygon {polygon} {

    # get last pair of the polygon for start:
    set b1 [lindex $polygon end-1]; set b2 [lindex $polygon end]

    set area 0.0
    foreach {c1 c2} $polygon {
        set area [expr {$area + ($b1*$c2 - $b2*$c1)}]
        set b1   $c1
        set b2   $c2
    }
    expr {0.5*abs($area)}
}

# ::math::geometry::inproduct







|
<


|
|







1317
1318
1319
1320
1321
1322
1323
1324

1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
#
# Examples:
#     - areaPolygon {-10 -10 10 -10 10 10 -10 10}
#       Result: 400
#
proc ::math::geometry::areaPolygon {polygon} {

    foreach {a1 a2 b1 b2} $polygon {break}


    set area 0.0
    foreach {c1 c2} [lrange $polygon 4 end] {
        set area [expr {$area + $b1*$c2 - $b2*$c1}]
        set b1   $c1
        set b2   $c2
    }
    expr {0.5*abs($area)}
}

# ::math::geometry::inproduct
1400
1401
1402
1403
1404
1405
1406
1407

1408
1409
1410
1411
1412
1413
1414
#       vector2       second vector
#
# Results:
#       area          the area of the parallellogram
#
proc ::math::geometry::areaParallellogram {vector1 vector2} {

    lassign $vector1 x1 y1; lassign $vector2 x2 y2


    set area [expr {abs($x2 * $y1 - $x1 * $y2}]

    return $area
}

# ::math::geometry::translate







|
>







1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
#       vector2       second vector
#
# Results:
#       area          the area of the parallellogram
#
proc ::math::geometry::areaParallellogram {vector1 vector2} {

    foreach {x1 y1} $vector1 {break}
    foreach {x2 y2} $vector2 {break}

    set area [expr {abs($x2 * $y1 - $x1 * $y2}]

    return $area
}

# ::math::geometry::translate
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
# Results:
#       newPolyline   Translated poyline
#
proc ::math::geometry::translate {vector polyline} {

    set newPolyline $polyline

    lassign $vector xt yt

    set idx 0
    foreach {x y} $polyline {
        lset newPolyline $idx [expr {$x + $xt}]
        incr idx
        lset newPolyline $idx [expr {$y + $yt}]
        incr idx







|







1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
# Results:
#       newPolyline   Translated poyline
#
proc ::math::geometry::translate {vector polyline} {

    set newPolyline $polyline

    foreach {xt yt} $vector {break}

    set idx 0
    foreach {x y} $polyline {
        lset newPolyline $idx [expr {$x + $xt}]
        incr idx
        lset newPolyline $idx [expr {$y + $yt}]
        incr idx
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
	nwse rect octant findLineSegmentIntersection \
	findLineIntersection bbox x y conjx conjy \
	calculateDistanceToLine findClosestPointOnLine \
	calculateDistanceToLineSegment findClosestPointOnLineSegment \
	calculateDistanceToPolylineSegment findClosestPointOnPolyline lengthOfPolyline \
	movePointInDirection lineSegmentsIntersect findLineSegmentIntersection findLineIntersection \
	polylinesIntersect polylinesBoundingIntersect intervalsOverlap rectanglesOverlap pointInsidePolygon pointInsidePolygonAlt \
	rectangleInsidePolygon areaPolygon translate rotate reflect degToRad radToDeg \
	calculateDistanceToPolyline calculateDistanceToPolygon areaParallellogram angle inproduct angleBetween

}

source [file join [file dirname [info script]] geometry_circle.tcl]
source [file join [file dirname [info script]] geometry_ext.tcl]

package provide math::geometry 1.4.1







|
<
|
|
<
<
<
<
|
1547
1548
1549
1550
1551
1552
1553
1554

1555
1556




1557
	nwse rect octant findLineSegmentIntersection \
	findLineIntersection bbox x y conjx conjy \
	calculateDistanceToLine findClosestPointOnLine \
	calculateDistanceToLineSegment findClosestPointOnLineSegment \
	calculateDistanceToPolylineSegment findClosestPointOnPolyline lengthOfPolyline \
	movePointInDirection lineSegmentsIntersect findLineSegmentIntersection findLineIntersection \
	polylinesIntersect polylinesBoundingIntersect intervalsOverlap rectanglesOverlap pointInsidePolygon pointInsidePolygonAlt \
	rectangleInsidePolygon areaPolygon translate rotate reflect degToRad radToDeg

}





package provide math::geometry 1.2.2

Changes to modules/math/geometry.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

support {
    useLocal math.tcl math
}
testing {
    useLocal geometry.tcl math::geometry







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    useLocal math.tcl math
}
testing {
    useLocal geometry.tcl math::geometry
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
        set __$var {}
        foreach _$var $list {
            lappend __$var [uplevel 1 $body]
        }
        set __$var
    }
}

#
# Custom matching procedure:
# Expect an accuracy of at least four decimals
#
proc matchNumbers {expected actual} {
    set match 1
    foreach a $actual e $expected {
        if { [llength $a] == 1 } {
            if {abs($a-$e) > 1.0e-4} {
                set match 0
                break
            }
        } else {
            set match [matchNumbers $a $e]
        }
    }
    return $match
}

customMatch numbers matchNumbers


# -------------------------------------------------------------------------

###
# calculateDistanceToLine
###
test geometry-1.1 {geometry::calculateDistanceToLine, simple} {







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







36
37
38
39
40
41
42






















43
44
45
46
47
48
49
        set __$var {}
        foreach _$var $list {
            lappend __$var [uplevel 1 $body]
        }
        set __$var
    }
}























# -------------------------------------------------------------------------

###
# calculateDistanceToLine
###
test geometry-1.1 {geometry::calculateDistanceToLine, simple} {
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
} {-5.0 -5.0}


###
# findClosestPointOnLineSegment
###

# TODO!


###
# findClosestPointOnPolyline
###
test geometry-5.1 {geometry::findClosestPointOnPolyline, one linesegment} {
    eval withFourDecimals [::math::geometry::findClosestPointOnPolyline {6 4} {1 1 7 1}]
} {6.0 1.0}







<
<







118
119
120
121
122
123
124


125
126
127
128
129
130
131
} {-5.0 -5.0}


###
# findClosestPointOnLineSegment
###




###
# findClosestPointOnPolyline
###
test geometry-5.1 {geometry::findClosestPointOnPolyline, one linesegment} {
    eval withFourDecimals [::math::geometry::findClosestPointOnPolyline {6 4} {1 1 7 1}]
} {6.0 1.0}
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233

###
# lineSegmentsIntersect
###
test geometry-7.1 {geometry::lineSegmentsIntersect, } {
    ::math::geometry::lineSegmentsIntersect {0 0 10 10} {0 10 10 0}
} 1
test geometry-7.2 {geometry::lineSegmentsIntersect, touching segments, in line with each other} {
    ::math::geometry::lineSegmentsIntersect {0 0 10 10} {10 10 15 15}
} 1
test geometry-7.3 {geometry::lineSegmentsIntersect, touching segments, perpendicular to each other} {
    ::math::geometry::lineSegmentsIntersect {0 0 10 10} {10 10 0 20}
} 1
test geometry-7.4 {geometry::lineSegmentsIntersect, slightly overlapping segments} {
    ::math::geometry::lineSegmentsIntersect {0 0 10.001 10.001} {10 10 15 15}
} 1
test geometry-7.5 {geometry::lineSegmentsIntersect, almost touching segments, perpendicular to each other} {
    ::math::geometry::lineSegmentsIntersect {0 0 10 10} {10.0001 10 0 20}
} 0


###
# polylinesIntersect
###
test geometry-8.1 {geometry::polylinesIntersect, } {
    ::math::geometry::polylinesIntersect {0 0 0 2 10 10} {0 10 2 10 10 0}
} 1


test intersectionPolylines-0.1 {} -body {
    eval withFourDecimals [::math::geometry::intersectionPolylines {0 0 10 10 10 20} {0 10 10 0}]
} -result {5.0 5.0}
test intersectionPolylines-0.2 {} -body {
    eval withFourDecimals [::math::geometry::intersectionPolylines {0 0 10 10 10 20} {5 4 10 4}]
} -result {}


###
# findLineIntersection
###
test geometry-9.1 {geometry::findLineIntersection, first line vertical} {
    eval withFourDecimals [::math::geometry::findLineIntersection {7 8 7 28} {3 14 17 21}]







|
<
<
<
<
<
<
<
<
<
<
<










<
<
<
<
<
<







168
169
170
171
172
173
174
175











176
177
178
179
180
181
182
183
184
185






186
187
188
189
190
191
192

###
# lineSegmentsIntersect
###
test geometry-7.1 {geometry::lineSegmentsIntersect, } {
    ::math::geometry::lineSegmentsIntersect {0 0 10 10} {0 10 10 0}
} 1














###
# polylinesIntersect
###
test geometry-8.1 {geometry::polylinesIntersect, } {
    ::math::geometry::polylinesIntersect {0 0 0 2 10 10} {0 10 2 10 10 0}
} 1










###
# findLineIntersection
###
test geometry-9.1 {geometry::findLineIntersection, first line vertical} {
    eval withFourDecimals [::math::geometry::findLineIntersection {7 8 7 28} {3 14 17 21}]
277
278
279
280
281
282
283

284
285
286
287
288
289
290
} {110.0 200.0}

test geometry-9.15 {geometry::findLineIntersection, vertical, flipped direction} {
    eval withFourDecimals [::math::geometry::findLineIntersection {110 130 110 230} {180 200 280 200}]
} {110.0 200.0}




###
# findLineSegmentIntersection
###
test geometry-10.1 {geometry::findLineSegmentIntersection, both lines vertical - no overlap} {
    ::math::geometry::findLineSegmentIntersection {1 1 1 2} {1 3 1 4}
} "none"







>







236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
} {110.0 200.0}

test geometry-9.15 {geometry::findLineIntersection, vertical, flipped direction} {
    eval withFourDecimals [::math::geometry::findLineIntersection {110 130 110 230} {180 200 280 200}]
} {110.0 200.0}




###
# findLineSegmentIntersection
###
test geometry-10.1 {geometry::findLineSegmentIntersection, both lines vertical - no overlap} {
    ::math::geometry::findLineSegmentIntersection {1 1 1 2} {1 3 1 4}
} "none"
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
test geometry-10.5 {geometry::findLineSegmentIntersection, both lines skaeve - parallel but not coincident} {
    ::math::geometry::findLineSegmentIntersection {3 2 6 3} {9 4 12 5}
} "none"
test geometry-10.6 {geometry::findLineSegmentIntersection, both lines skaeve - no intersection} {
    ::math::geometry::findLineSegmentIntersection {3 2 9 4} {4 5 5 4}
} "none"

test geometry-10.7 {geometry::findLineSegmentIntersection, touching segments, in line with each other} {
    list [::math::geometry::findLineSegmentIntersection {0 0 10 10} {10 10 15 15}] \
         [::math::geometry::findLineSegmentIntersection {10 10 0 0} {10 10 15 15}] \
         [::math::geometry::findLineSegmentIntersection {0 0 10 10} {15 15 10 10}] \
         [::math::geometry::findLineSegmentIntersection {10 10 0 0} {15 15 10 10}]
} {{10 10} {10 10} {10 10} {10 10}}


###
# movePointInDirection
###
test geometry-11.1 {geometry::movePointInDirection, going up} {
    eval withFourDecimals [::math::geometry::movePointInDirection {0 0} 90 1]
} {0.0 1.0}







<
<
<
<
<
<
<







260
261
262
263
264
265
266







267
268
269
270
271
272
273
test geometry-10.5 {geometry::findLineSegmentIntersection, both lines skaeve - parallel but not coincident} {
    ::math::geometry::findLineSegmentIntersection {3 2 6 3} {9 4 12 5}
} "none"
test geometry-10.6 {geometry::findLineSegmentIntersection, both lines skaeve - no intersection} {
    ::math::geometry::findLineSegmentIntersection {3 2 9 4} {4 5 5 4}
} "none"









###
# movePointInDirection
###
test geometry-11.1 {geometry::movePointInDirection, going up} {
    eval withFourDecimals [::math::geometry::movePointInDirection {0 0} 90 1]
} {0.0 1.0}
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
} 225.0
test geometry-12.8 {geometry::angle, going down and right} {
    withFourDecimals [::math::geometry::angle {0 0 10 -10}]
} 315.0
test geometry-12.9 {geometry::angle, going up and right from (3,6)} {
    withFourDecimals [::math::geometry::angle {3 6 10 9}]
} 23.1986

test geometry-12.10 {geometry::angle, point as argument} -body {
    withFourDecimals [::math::geometry::angle {10 10}]
} -result {45.0}

test geometry-12.11 {from direction to angle} -body {
    withFourDecimals [::math::geometry::angle [::math::geometry::direction 45]]
} -result {45.0}
test geometry-12.12 {from angle to direction} -body {
    withFourDecimals {*}[::math::geometry::direction [::math::geometry::angle {10 10}]]
} -result {0.7071 0.7071}



###
# intervalsOverlap
###
test geometry-13.1 {geometry::intervalsOverlap, strict, overlap} {
    math::geometry::intervalsOverlap 2 4 3 6 1







<
<
<
<
<
<
<
<
<
<
<
<







335
336
337
338
339
340
341












342
343
344
345
346
347
348
} 225.0
test geometry-12.8 {geometry::angle, going down and right} {
    withFourDecimals [::math::geometry::angle {0 0 10 -10}]
} 315.0
test geometry-12.9 {geometry::angle, going up and right from (3,6)} {
    withFourDecimals [::math::geometry::angle {3 6 10 9}]
} 23.1986














###
# intervalsOverlap
###
test geometry-13.1 {geometry::intervalsOverlap, strict, overlap} {
    math::geometry::intervalsOverlap 2 4 3 6 1
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
test geometry-14.3 {geometry::rectanglesOverlap, not strict, overlap} {
    math::geometry::rectanglesOverlap {0 10} {10 0} {5 10} {20 0} 0
} 1
test geometry-14.4 {geometry::rectanglesOverlap, not strict, no overlap} {
    math::geometry::rectanglesOverlap {0 10} {10 0} {12 10} {20 0} 0
} 0

###
# overlapBBox
###
test overlapBBox-0.1 {} -body {
    ::math::geometry::overlapBBox {0 0 20 20} {10 10 30 30} 0
} -result 1
test overlapBBox-0.2 {} -body {
    ::math::geometry::overlapBBox {0 0 20 20} {10 10 30 30} 1
} -result 1
test overlapBBox-0.3 {} -body {
    ::math::geometry::overlapBBox {0 0 20 20} {20 20 40 40} 0
} -result 1
test overlapBBox-0.4 {} -body {
    ::math::geometry::overlapBBox {0 0 20 20} {20 20 40 40} 1
} -result 0
test overlapBBox-0.5 {} -body {
    ::math::geometry::overlapBBox {0 0 20 20} {30 30 50 50} 1
} -result 0
test overlapBBox-0.6 {} -body {
    ::math::geometry::overlapBBox {0 0 40 40} {10 10 30 30} 1
} -result 1
test overlapBBox-0.7 {} -body {
    ::math::geometry::overlapBBox {10 10 30 30} {0 0 40 40} 1
} -result 1
test overlapBBox-1.0 {} -body {
::math::geometry::overlapBBox \
    {77.10546891284076 105.79193282874378 103.04804415195639 132.87051244459752 128.9906192099546 159.9490922327779 154.93319426795279 187.0276720209583} \
    {198.60216689249415 185.37236717607064 217.34733289655512 230.62720117200968}
} -result 0

###
# pointInsidePolygon
###
test geometry-15.1 {geometry::pointInsidePolygon, simple inside} {
    math::geometry::pointInsidePolygon {5 5} {4 4 4 6 6 6 6 4}
} 1







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







379
380
381
382
383
384
385





























386
387
388
389
390
391
392
test geometry-14.3 {geometry::rectanglesOverlap, not strict, overlap} {
    math::geometry::rectanglesOverlap {0 10} {10 0} {5 10} {20 0} 0
} 1
test geometry-14.4 {geometry::rectanglesOverlap, not strict, no overlap} {
    math::geometry::rectanglesOverlap {0 10} {10 0} {12 10} {20 0} 0
} 0































###
# pointInsidePolygon
###
test geometry-15.1 {geometry::pointInsidePolygon, simple inside} {
    math::geometry::pointInsidePolygon {5 5} {4 4 4 6 6 6 6 4}
} 1
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652

test geometry-17.6 {vector direction} {
    eval withFourDecimals [math::geometry::direction 0]
} {1.0 0.0}

test geometry-17.7 {vector direction} {
    eval withFourDecimals [math::geometry::direction 90]
} {0.0 1.0}

test geometry-17.8 {vector vertical} {
    math::geometry::v 90
} {0 90}

test geometry-17.9 {vector horizontal} {
    math::geometry::h 90







|







550
551
552
553
554
555
556
557
558
559
560
561
562
563
564

test geometry-17.6 {vector direction} {
    eval withFourDecimals [math::geometry::direction 0]
} {1.0 0.0}

test geometry-17.7 {vector direction} {
    eval withFourDecimals [math::geometry::direction 90]
} {0.0 -1.0}

test geometry-17.8 {vector vertical} {
    math::geometry::v 90
} {0 90}

test geometry-17.9 {vector horizontal} {
    math::geometry::h 90
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054

test geometry-17.12 {point between} {
    math::geometry::between {0 0} {4 4} 0.5
} {2.0 2.0}

test geometry-17.13 {octant} {
    math::geometry::octant {-10 -12}
} southwest

test octant-0.1 {} -body {
    ::math::geometry::octant   [list  1  0]
} -result "east"
test octant-0.2 {} -body {
    ::math::geometry::octant   [list  1  1]
} -result "northeast"
test octant-0.3 {} -body {
    ::math::geometry::octant   [list  0  1]
} -result "north"
test octant-0.4 {} -body {
    ::math::geometry::octant   [list -1  1]
} -result "northwest"
test octant-0.5 {} -body {
    ::math::geometry::octant   [list -1  0]
} -result "west"
test octant-0.6 {} -body {
    ::math::geometry::octant   [list -1 -1]
} -result "southwest"
test octant-0.7 {} -body {
    ::math::geometry::octant   [list  0 -1]
} -result "south"
test octant-0.8 {} -body {
    ::math::geometry::octant   [list  1 -1]
} -result "southeast"



###
# calculateDistanceToPolygon
###
test geometry-18.1 {geometry::calculateDistanceToPolygon, non-closed polygon, point on polygon} {
    withFourDecimals [::math::geometry::calculateDistanceToPolygon {2.0 0.5} {2.0 2.0 -2.0 2.0 -2.0 -2.0 2.0 -2.0}]
} 0.0


###
# transformations
###
test geometry-19.1 {geometry::translate over (1,-1)} {
    withFourDecimals {*}[::math::geometry::translate {1.0 -1.0} {0.0 0.0 1.0 1.0}]
} {1.0 -1.0 2.0 0.0}

test geometry-19.2 {geometry::rotate over 90 degrees} {
    withFourDecimals {*}[::math::geometry::rotate 90.0 {0.0 0.0 1.0 1.0 0.0 1.0}]
} {0.0 0.0 -1.0 1.0 -1.0 0.0}

test geometry-19.3 {geometry::reflect in x-axis} {
    withFourDecimals {*}[::math::geometry::reflect 180.0 {0.0 0.0 1.0 1.0 0.0 1.0}]
} {0.0 0.0 1.0 -1.0 0.0 -1.0}

test geometry-19.4 {geometry::reflect in y-axis} {
    withFourDecimals {*}[::math::geometry::reflect 90.0 {0.0 0.0 1.0 1.0 0.0 1.0}]
} {0.0 0.0 -1.0 1.0 0.0 1.0}

test geometry-19.5 {geometry::radToDeg} {
    ::math::geometry::radToDeg [expr {acos(-1.0)}]
} 180.0

test geometry-19.6 {geometry::degToRad} {
    ::math::geometry::degToRad 180.0
} [expr {acos(-1.0)}]


test rotateAbout-0.1 {rotate (poly)line about an arbitrary point, 90 degrees} -body {
    withFourDecimals {*}[::math::geometry::rotateAbout    {10 10}  90 {20 0  20 20}]
} -result {20.0 20.0 0.0 20.0}
test rotateAbout-0.2 {rotate (polyline) about an arbitrary point, 180 degrees} -body {
    withFourDecimals {*}[::math::geometry::rotateAbout    {10 10} 180 {20 0  20 20}]
} -result {0.0 20.0 0.0 0.0}


###
# areaPolygon
###
test geometry-20.1 {geometry::areaPolygon, closed polygon} {
    eval withFourDecimals [::math::geometry::areaPolygon {-10 -10 10 -10 10 10 -10 10 -10 -10}]
} 400.0

test geometry-20.2 {geometry::areaPolygon, non-closed polygon} {
    eval withFourDecimals [::math::geometry::areaPolygon {-10 -10 10 -10 10 10 -10 10}]
} 400.0

test geometry-20.3 {geometry::areaPolygon, closed triangle} {
    eval withFourDecimals [::math::geometry::areaPolygon {-10 -10 10 -10 10 10 -10 -10}]
} 200.0

test geometry-20.4 {geometry::areaPolygon, open triangle} {
    eval withFourDecimals [::math::geometry::areaPolygon {-10 -10 10 -10 10 10}]
} 200.0

test geometry-20.4 {geometry::areaPolygon, self-intersecting polygon} {
    eval withFourDecimals [::math::geometry::areaPolygon {-10 -10 10 -10 -10 10 10 10 -10 -10}]
} 0.0


##
# areaPolygon
##

test geometry-20.0 {geometry::areaPolygon} {
    math::geometry::areaPolygon {-10 -10 10 -10 10 10 -10 10}
} 400.0


##
# circle procedures
##

# circle construction
test circle-0.1 {construct circle} -body {
    set circle [::math::geometry::circle {1.0 2.0} 3.0]
} -result {1.0 2.0 3.0}

test circle-0.2 {construct circle from two points} -body {
    set circle [::math::geometry::circleTwoPoints {1.0 0.0} {-1.0 0.0}]
} -result {0.0 0.0 1.0}

test circle-0.3 {construct circle from two points (2)} -body {
    set circle [::math::geometry::circleTwoPoints {0.0 1.0} {0.0 -1.0}]
} -result {0.0 0.0 1.0}

# points inside/outside circles
test circle-1.0 {point in circle} -body {
    set circle [::math::geometry::circle {1.0 0.0} 3.0]
    set point  [::math::geometry::p 0.0 0.0]

    ::math::geometry::pointInsideCircle $point $circle
} -result 1

test circle-1.1 {point outside circle} -body {
    set circle [::math::geometry::circle {1.0 0.0} 3.0]
    set point  [::math::geometry::p 5.0 0.0]

    ::math::geometry::pointInsideCircle $point $circle
} -result 0

test circle-1.2 {point on circle edge} -body {
    set circle [::math::geometry::circle {1.0 0.0} 3.0]
    set point  [::math::geometry::p -2.0 0.0]

    ::math::geometry::pointInsideCircle $point $circle
} -result 1

# lines intersecting circles
test circle-2.0 {line through circle} -body {
    set circle [::math::geometry::circle {1.0 0.0} 3.0]
    set line   {0.0 -10.0 0.0 10.0}

    ::math::geometry::lineIntersectsCircle $line $circle
} -result 1

test circle-2.1 {line not through circle} -body {
    set circle [::math::geometry::circle {1.0 0.0} 3.0]
    set line   {10.0 -10.0 10.0 10.0}

    ::math::geometry::lineIntersectsCircle $line $circle
} -result 0

test circle-2.2 {line on edge of circle} -body {
    set circle [::math::geometry::circle {1.0 0.0} 3.0]
    set line   {-2.0 -10.0 -2.0 10.0}

    ::math::geometry::lineIntersectsCircle $line $circle
} -result 1

# line segment intersecting circle
test circle-3.0 {line segment intersecting circle} -body {
    set circle [::math::geometry::circle {1.0 0.0} 3.0]
    set line   {0.0 -10.0 0.0 10.0}

    ::math::geometry::lineSegmentIntersectsCircle $line $circle
} -result 1

test circle-3.1 {line segment outside circle} -body {
    set circle [::math::geometry::circle {1.0 0.0} 3.0]
    set line   {0.0 5.0 0.0 10.0}

    ::math::geometry::lineSegmentIntersectsCircle $line $circle
} -result 0

test circle-3.2 {line segment completely inside circle} -body {
    set circle [::math::geometry::circle {1.0 0.0} 3.0]
    set line   {1.0 0.0 1.0 1.0}

    ::math::geometry::lineSegmentIntersectsCircle $line $circle
} -result 0

test circle-3.3 {line segment touching circle} -body {
    set circle [::math::geometry::circle {1.0 0.0} 3.0]
    set line   {-2.0 0.0 -5.0 0.0}

    ::math::geometry::lineIntersectsCircle $line $circle
} -result 1

#
# Private procedures
#

test circlePrivate-1.1 {intersect vertical line with circle (two points)} -body {
    set circle [::math::geometry::circle {0.0 0.0} 5.0]
    set line   {3.0 4.0 3.0 -4.0}

    ::math::geometry::IntersectionVerticalLineCircle $line $circle
} -result {{3.0 4.0} {3.0 -4.0}}

test circlePrivate-1.2 {intersect vertical line with circle (two points, version 2)} -body {
    set circle [::math::geometry::circle {0.0 0.0} 5.0]
    set line   {3.0 40.0 3.0 -40.0}

    ::math::geometry::IntersectionVerticalLineCircle $line $circle
} -result {{3.0 4.0} {3.0 -4.0}}

test circlePrivate-1.2 {intersect vertical line with circle (one point)} -body {
    set circle [::math::geometry::circle {0.0 0.0} 5.0]
    set line   {5.0 40.0 5.0 -40.0}

    ::math::geometry::IntersectionVerticalLineCircle $line $circle
} -result {5.0 0.0}

test circlePrivate-1.2 {intersect vertical line with circle (no points)} -body {
    set circle [::math::geometry::circle {0.0 0.0} 5.0]
    set line   {15.0 40.0 15.0 -40.0}

    ::math::geometry::IntersectionVerticalLineCircle $line $circle
} -result {}

# Coordinates: sqrt(3)/2
test circlePrivate-2.1 {intersect two circles (two points)} -body {
    set circle1 [::math::geometry::circle {0.0 0.0} 1.0]
    set circle2 [::math::geometry::circle {1.0 0.0} 1.0]

    concat {*}[::math::geometry::IntersectionCircleCircle $circle1 $circle2]
} -result {0.5 0.8660254 0.5 -0.8660254} -match numbers

test circlePrivate-2.2 {intersect two circles (one point right)} -body {
    set circle1 [::math::geometry::circle {0.0 0.0} 5.0]
    set circle2 [::math::geometry::circle {10.0 0.0} 5.0]

    ::math::geometry::IntersectionCircleCircle $circle1 $circle2
} -result {5.0 0.0}

test circlePrivate-2.3 {intersect two circles (one point left)} -body {
    set circle1 [::math::geometry::circle {0.0 0.0} 5.0]
    set circle2 [::math::geometry::circle {5.0 0.0} 10.0]

    ::math::geometry::IntersectionCircleCircle $circle1 $circle2
} -result {-5.0 0.0}

test circlePrivate-2.4 {intersect two circles (no points)} -body {
    set circle1 [::math::geometry::circle {0.0 0.0} 5.0]
    set circle2 [::math::geometry::circle {15.0 0.0} 5.0]

    ::math::geometry::IntersectionCircleCircle $circle1 $circle2
} -result {}

test circlePrivate-2.4 {intersect two concentric circles} -body {
    set circle1 [::math::geometry::circle {0.0 0.0} 5.0]
    set circle2 [::math::geometry::circle {0.0 0.0} 7.0]

    ::math::geometry::IntersectionCircleCircle $circle1 $circle2
} -result {}

#
# Intersection procedures
#
test circleIntersect-1.1 {intersect a vertical line and a circle (two points)} -body {
    set line   {0.0 0.0 0.0 5.0}
    set circle [::math::geometry::circle {0.0 0.0} 7.0]

    concat {*}[::math::geometry::intersectionLineWithCircle $line $circle]
} -result {0.0 7.0  0.0 -7.0} -match numbers

# Coordinates in answer: 7*sqrt(2)/2
test circleIntersect-1.2 {intersect a diagonal line and a circle (two points)} -body {
    set line   {-5.0 -5.0 5.0 5.0}
    set circle [::math::geometry::circle {0.0 0.0} 7.0]

    concat {*}[::math::geometry::intersectionLineWithCircle $line $circle]
} -result {4.94975 4.94975  -4.94975 -4.94975} -match numbers

test circleIntersect-1.3 {intersect a horizontal line and a circle (one point)} -body {
    set line   {-5.0 5.0 5.0 5.0}
    set circle [::math::geometry::circle {0.0 0.0} 5.0]

    concat {*}[::math::geometry::intersectionLineWithCircle $line $circle]
} -result {0.0 5.0} -match numbers


test circleIntersect-2.1 {intersect two circles, arranged horizontally (two points)} -body {
    set circle1 [::math::geometry::circle {0.0 0.0} 1.0]
    set circle2 [::math::geometry::circle {1.0 0.0} 1.0]

    concat {*}[::math::geometry::intersectionCircleWithCircle $circle1 $circle2]
} -result {0.5 0.8660254 0.5 -0.8660254} -match numbers

test circleIntersect-2.2 {intersect two circles, arranged vertically (two points)} -body {
    set circle1 [::math::geometry::circle {0.0 0.0} 1.0]
    set circle2 [::math::geometry::circle {0.0 1.0} 1.0]

    concat {*}[::math::geometry::intersectionCircleWithCircle $circle1 $circle2]
} -result {-0.8660254 0.5 0.8660254 0.5} -match numbers


test circleTangent-1.1 {tangent lines to a circle} -body {
    set circle [::math::geometry::circle {0.0 0.0} 1.0]
    set point  [::math::geometry::p 1.0 1.0]

    concat {*}[::math::geometry::tangentLinesToCircle $point $circle]
} -result {1.0 1.0 0.0 1.0  1.0 1.0 1.0 0.0} -match numbers

test circleTangent-1.2 {tangent lines to a circle - point at circumference} -body {
    set circle [::math::geometry::circle {0.0 0.0} 1.0]
    set point  [::math::geometry::p 0.0 1.0]

    concat {*}[::math::geometry::tangentLinesToCircle $point $circle]
} -result {0.0 1.0 1.0 1.0} -match numbers

test circleTangent-1.3 {tangent lines to a circle - point inside the circle} -body {
    set circle [::math::geometry::circle {0.0 0.0} 1.0]
    set point  [::math::geometry::p 0.5 0.5]

    concat {*}[::math::geometry::tangentLinesToCircle $point $circle]
} -result {} -match numbers


test intersectionSegmentCircle-0.1 {} -body {
    ::math::geometry::intersectionSegmentCircle \
        {0 0 10 10} \
        {10 10 20}
} -result {}
test intersectionSegmentCircle-0.2 {} -body {
    ::math::geometry::intersectionSegmentCircle \
        {0 0 10 10} \
        {10 10 10}
} -result {{2.9289321881345254 2.9289321881345254}}
test intersectionSegmentCircle-1.1 {} -body {
    ::math::geometry::intersectionSegmentCircle \
        {332.42657091861946 335.1149986982706 129.2024714436513 114.43189293419738} \
        {94.14012946396178 76.3573401345067  64}
} -result {{137.49433961735286 123.43613007196794}}


test intersectionPolylineCircle-0.1 {} -body {
    ::math::geometry::intersectionPolylineCircle \
        {-0.7222568045061166 24.55619398118256 25.22031843460951 51.6347735970363 51.16289367372514 78.71335321289004 77.10546891284076 105.79193282874378 103.04804415195639 132.87051244459752 128.9906192099546 159.9490922327779 154.93319426795279 187.0276720209583 180.875769325951 214.1062518091387 206.8183443839492 241.1848315973191 232.76091962306484 268.26341121317284 258.7034948621805 295.3419908290266 284.6460701012961 322.4205704448803 310.58864534041174 349.49915006073405 319.11140055170637 358.6440572586041 327.634155763001 367.7889644564742 336.1569109742956 376.9338716543443 344.67966618559024 386.0787788522143 353.2024215780023 395.2236858777577 361.7251769704144 404.36859290330113 370.2479323628265 413.51349992884457 378.77068775523855 422.65840695438794 387.2934429665332 431.803314152258 395.8161981778278 440.94822135012805 404.3389533891225 450.09312854799816 412.8617086004171 459.2380357458682} \
        {153.34733289655512 185.37236717607064  64} all
} -result {{109.072261 139.158538} {197.622404 231.586197}} -match numbers
test intersectionPolylineCircle-0.2 {} -body {
    ::math::geometry::intersectionPolylineCircle \
        {435.55404176974764 444.05134367022987 401.17821790828214 407.7392289062232 366.80239478008497 371.42711346227725 332.42657091861946 335.1149986982706 230.81452154776954 224.77344547626427 129.2024714436513 114.43189293419738 27.590422072801346 4.090339712191053} \
        {94.14012946396178 76.3573401345067  64} all
} -result {{137.494347 123.436124} {50.785914 29.278555}} -match numbers


#
# cathetus point
#
test cathetusPoint-0.1 {cathetus point, point a} -body {
    withFourDecimals {*}[::math::geometry::cathetusPoint {1 1} {5 2} 3]
} -result {3.6168 -0.4671}
test cathetusPoint-02 {cathetus point, point b} -body {
    withFourDecimals {*}[::math::geometry::cathetusPoint {1 1} {5 2} 3 b]
} -result {3.3815 -0.5259}
test cathetusPoint-0.3 {no cathetus, outside range} -body {
    withFourDecimals {*}[::math::geometry::cathetusPoint {1 1} {5 2} 9 b]
} -result {}


#
# parallel line
#
test parallel-0.1 {parallel line, default side} -body {
    withFourDecimals {*}[::math::geometry::parallel  {1 1 5 2} 3]
} -result {1.7276 -1.9104 5.7276 -0.9104}
test parallel-0.2 {parallel line, lefthand side} -body {
    withFourDecimals {*}[::math::geometry::parallel  {1 1 5 2} 3 right]
} -result {1.7276 -1.9104 5.7276 -0.9104}
test parallel-0.3 {parallel line, righthand side} -body {
    withFourDecimals {*}[::math::geometry::parallel  {1 1 5 2} 3 left]
} -result {0.2724 3.9104 4.2724 4.9104}


###
testsuiteCleanup







<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<






|







|



|



|



|











<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

574
575
576
577
578
579
580













581













582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619








620























































































































































































































































































































621

test geometry-17.12 {point between} {
    math::geometry::between {0 0} {4 4} 0.5
} {2.0 2.0}

test geometry-17.13 {octant} {
    math::geometry::octant {-10 -12}













} northwest















###
# calculateDistanceToPolygon
###
test geometry-18.1 {geometry::calculateDistanceToPolygon, non-closed polygon, point on polygon} {
    eval withFourDecimals [::math::geometry::calculateDistanceToPolygon {2.0 0.5} {2.0 2.0 -2.0 2.0 -2.0 -2.0 2.0 -2.0}]
} 0.0


###
# transformations
###
test geometry-19.1 {geometry::translate over (1,-1)} {
    eval withFourDecimals [::math::geometry::translate {1.0 -1.0} {0.0 0.0 1.0 1.0}]
} {1.0 -1.0 2.0 0.0}

test geometry-19.2 {geometry::rotate over 90 degrees} {
    eval withFourDecimals [::math::geometry::rotate 90.0 {0.0 0.0 1.0 1.0 0.0 1.0}]
} {0.0 0.0 -1.0 1.0 -1.0 0.0}

test geometry-19.3 {geometry::reflect in x-axis} {
    eval withFourDecimals [::math::geometry::reflect 180.0 {0.0 0.0 1.0 1.0 0.0 1.0}]
} {0.0 0.0 1.0 -1.0 0.0 -1.0}

test geometry-19.4 {geometry::reflect in y-axis} {
    eval withFourDecimals [::math::geometry::reflect 90.0 {0.0 0.0 1.0 1.0 0.0 1.0}]
} {0.0 0.0 -1.0 1.0 0.0 1.0}

test geometry-19.5 {geometry::radToDeg} {
    ::math::geometry::radToDeg [expr {acos(-1.0)}]
} 180.0

test geometry-19.6 {geometry::degToRad} {
    ::math::geometry::degToRad 180.0
} [expr {acos(-1.0)}]










###























































































































































































































































































































testsuiteCleanup

Deleted modules/math/geometry_circle.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# geometry_circle.tcl --
#
#     Geometry functions with an emphasis on circles
#
# Copyright (c) 2018 Arjen Markus
#
#     Part of the math::geometry package
#

package require Tcl 8.5
package require math

namespace eval ::math::geometry {
    namespace export circle circleTwoPoints \
        pointInsideCircle lineIntersectsCircle lineSegmentIntersectsCircle \
        intersectionLineWithCircle intersectionCircleWithCircle tangentLinesToCircle \


    variable margin 1.0e-10
}

# circles:
#     List of three numbers, the first two are the x and y coordinates of the
#     centre, the third is the radius
#

# circle --
#     Return a list of numbers representing a circle
#
# Arguments:
#     point         Coordinates of the centre
#     radius        Radius of the circle
#
# Returns:
#     Three-element list
#
proc ::math::geometry::circle {point radius} {
    if { [llength $point] != 2 } {
        return -code error "The first argument must be a point"
    }
    if { [llength $radius] != 1 } {
        return -code error "The second argument must be a single value"
    }

    return [concat $point $radius]
}

# circleTwoPoints --
#     Construct a circle from two points - they appear on the circumference
#
# Arguments:
#     point1        Coordinates of one point
#     point2        Coordinates of the second point
#
# Returns:
#     Three-element list
#
proc ::math::geometry::circleTwoPoints {point1 point2} {
    set centre [s* 0.5 [+ $point1 $point2]]
    set radius [expr {[distance $point1 $point2] * 0.5}]


    return [concat $centre $radius]
}

# pointInsideCircle --
#     Return whether the given point lies in the circle or not
#
# Arguments:
#     point         Point to be checked
#     circle        Circle possibly containing the point
#
# Returns:
#     1 if the point lies in or on the circle
#     0 if not
#
proc ::math::geometry::pointInsideCircle {point circle} {
    set centre [lrange $circle 0 1]
    set radius [lindex $circle end]

    if { [distance $point $centre] <= $radius } {
        return 1
    } else {
        return 0
    }
}

# lineIntersectsCircle --
#     Return whether the given (infinite) line intersects the circle or not
#
# Arguments:
#     line          Infinite line to be checked
#     circle        Circle to be checked
#
# Returns:
#     1 if the line intersects the circle or is tangent to it
#     0 if not
#
proc ::math::geometry::lineIntersectsCircle {line circle} {
    set centre [lrange $circle 0 1]
    set radius [lindex $circle end]

    if { [calculateDistanceToLine $centre $line] <= $radius } {
        return 1
    } else {
        return 0
    }
}

# lineSegmentIntersectsCircle --
#     Return whether the given line segment intersects the circle or not
#
# Arguments:
#     line          Line segment to be checked
#     circle        Circle to be checked
#
# Returns:
#     1 if the line segment intersects the circle or is tangent to it
#     0 if not
#
proc ::math::geometry::lineSegmentIntersectsCircle {line circle} {
    set centre [lrange $circle 0 1]
    set radius [lindex $circle end]

    if { [calculateDistanceToLineSegment $centre $line] <= $radius } {
        #
        # Check that not both end points are inside the circle
        #
        set point1  [lrange $line 0 1]
        set point2  [lrange $line 2 3]

        set inside1 [pointInsideCircle $point1 $circle]
        set inside2 [pointInsideCircle $point2 $circle]

        return [expr {$inside1+$inside2 <= 1 ? 1 : 0}]
    } else {
        return 0
    }
}

# IntersectionVerticallineCircle --
#     Calculate the intersection points of a vertical line and a circle
#
# Arguments:
#     line          Vertical line right of y-axis
#     circle        Circle with centre at (0,0)
#
# Returns:
#     Zero, one or two points - the intersection points
#
# Note:
#     The procedure is easiest when using a horizontal or vertical
#     line and a circle with centre (0,0). To be used in combination
#     with suitable transformations.
#
proc ::math::geometry::IntersectionVerticalLineCircle {line circle} {
    set radius [lindex $circle end]
    set xval   [lindex $line 0]

    if { $xval > $radius } {
        return {}
    } elseif { $xval == $radius } {
        return [list $radius 0.0]
    }

    set yval   [expr {sqrt($radius**2 - $xval**2)}]

    return [list [list $xval $yval] [list $xval [expr {-$yval}]]]
}

# IntersectionCircleCircle --
#     Calculate the intersection points of two circles
#
# Arguments:
#     circle        Circle with centre at (0,0)
#     circle1       Circle with centre on positive x-axis
#
# Returns:
#     Zero, one or two points - the intersection points
#
# Note:
#     The procedure is easiest when using a circle with centre (0,0)
#     and the other with the centre on an axis. To be used in combination
#     with suitable transformations.
#
# Note:
#     The situation of two identical circles is not handled
#
proc ::math::geometry::IntersectionCircleCircle {circle1 circle2} {
    set radius1 [lindex $circle1 end]
    set xval    [lindex $circle2 0]
    set radius2 [lindex $circle2 end]

    if { $xval - $radius2 > $radius1 } {
        return {}
    } elseif { $xval - $radius2 == $radius1 } {
        return [list $radius1 0.0]
    } elseif { $xval - $radius2 == -$radius1 } {
        return [list -$radius1 0.0]
    } else {
        # One circle inside the other circle
        if { $radius2 > $radius1 } {
            if { $xval - $radius2 < -$radius1 } {
                return {}
            }
        } else {
            if { $xval + $radius2 < $radius1 } {
                return {}
            }
        }
    }

    set b [expr {0.5 * ($xval + ($radius1**2 - $radius2**2)/$xval) }]

    set yval [expr {sqrt($radius1**2 - $b**2)}]

    return [list [list $b $yval] [list $b [expr {-$yval}]]]
}

# intersectionLineWithCircle --
#     Determine the points of intersection between a line and a circle
#
# Arguments:
#     line          Line in question
#     circle        Circle in question
#
# Returns:
#     Zero, one or two points - the intersection points
#
# Note:
#     Shift and rotate the line and circle first, then determine the
#     intersection and transform back.
#
proc ::math::geometry::intersectionLineWithCircle {line circle} {
    variable margin

    set centre [lrange $circle 0 1]
    set radius [lindex $circle end]

    set midpoint [findClosestPointOnLine $centre $line]
    set distance [distance $midpoint $centre]

    if { $distance > $margin*$radius } { ;# Rather arbitrary margin
        set vector   [s* [expr {1.0/$distance}] [- $midpoint $centre]]
    } else {
        lassign $line x1 y1 x2 y2
        set vector    [list [expr {$y2-$y1}] [expr {$x1-$x2}]]
        set distance2 [length $vector]
        set vector    [s* [expr {1.0/$distance2}] $vector]
    }

    set newline      [list $distance [expr {1.0+$radius}] $distance [expr {-1.0-$radius}]]
    set intersection [IntersectionVerticalLineCircle $newline $circle]

    set newIntersection {}
    lassign $vector vx vy
    lassign $centre cx cy
    if { [llength [lindex $intersection 0]] == 1 } {
        set intersection [list $intersection]
    }
    foreach xy $intersection {
        lassign $xy x y

        set xn [expr {$vx * $x - $vy * $y + $cx}]
        set yn [expr {$vy * $x + $vx * $y + $cy}]

        lappend newIntersection [list $xn $yn]
    }

    return $newIntersection
}

# intersectionCircleWithCircle --
#     Determine the points of intersection between two circles
#
# Arguments:
#     circle1       First circle
#     circle2       Second circle
#
# Returns:
#     Zero, one or two points - the intersection points
#
# Note:
#     Shift and rotate the circles first, then determine the
#     intersection and transform back.
#
proc ::math::geometry::intersectionCircleWithCircle {circle1 circle2} {
    variable margin

    set centre1 [lrange $circle1 0 1]
    set radius1 [lindex $circle1 end]
    set centre2 [lrange $circle2 0 1]
    set radius2 [lindex $circle2 end]

    set distance [distance $centre1 $centre2]

    if { $distance > 0.5*$margin*($radius1+$radius2) } { ;# Rather arbitrary margin
        set vector   [s* [expr {1.0/$distance}] [- $centre2 $centre1]]
    } else {
        return {} ;# Bit of a hack: either the circles are concentric and have different
                   # radii - no intersection - or they are identical, then we should
                   # return the complete circle, but we don't do that ...
    }

    set newcircle    [list $distance 0.0 $radius2]
    set intersection [IntersectionCircleCircle $circle1 $newcircle]

    set newIntersection {}
    lassign $vector  vx vy
    lassign $centre1 cx cy
    if { [llength [lindex $intersection 0]] == 1 } {
        set intersection [list $intersection]
    }
    foreach xy $intersection {
        lassign $xy x y

        set xn [expr {$vx * $x - $vy * $y + $cx}]
        set yn [expr {$vy * $x + $vx * $y + $cy}]

        lappend newIntersection [list $xn $yn]
    }

    return $newIntersection
}

# tangentLinesToCircle --
#     Determine the tangents from a point to a circle
#
# Arguments:
#     point         Point in question
#     circle        Second circle
#
# Returns:
#     Zero, one or two points - the intersection points
#
# Note:
#     Shift and rotate the point and circle first, then determine the
#     intersection and transform back.
#
proc ::math::geometry::tangentLinesToCircle {point circle} {
    variable margin

    set centre [lrange $circle 0 1]
    set radius [lindex $circle end]

    set distance [distance $centre $point]

    if { $distance < $radius } {
        return {}
    } else {
        set vector [- $point $centre]
        set vector [s* [expr {1.0/$distance}] [- $point $centre]]

        if { abs($distance - $radius) < $margin*$radius } {
            lassign $vector vx vy
            return [list [concat $point [+ $point [list $vy [expr {-$vx}]]]]]
                # The two tangent lines coincide
        }
    }

    set halfdistance [expr {$distance / 2.0}]
    set newcircle    [list $halfdistance 0.0 $halfdistance]
    set intersection [IntersectionCircleCircle $circle $newcircle]

    set newIntersection {}
    lassign $vector vx vy
    lassign $centre cx cy
    if { [llength [lindex $intersection 0]] == 1 } {
        set intersection [list $intersection]
    }
    foreach xy $intersection {
        lassign $xy x y

        set xn [expr {$vx * $x - $vy * $y + $cx}]
        set yn [expr {$vy * $x + $vx * $y + $cy}]

        lappend newIntersection [list $xn $yn]
    }

    return [list [concat $point [lindex $newIntersection 0]] \
                 [concat $point [lindex $newIntersection 1]]]
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/math/geometry_ext.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
 # geometry_ext.tcl --
 #     Adapted from vectormath
 #
 ##+##########################################################################
 #
 # package: vectormath	->	vectormath.tcl
 #
 #   vectormath is software of Manfred ROSENBERGER
 #       based on tclTk, BWidgets and tdom on their
 #       own Licenses.
 #
 # Copyright (c) Manfred ROSENBERGER, 2010/10/24
 #
 # The author  hereby grant permission to use,  copy, modify, distribute,
 # and  license this  software  and its  documentation  for any  purpose,
 # provided that  existing copyright notices  are retained in  all copies
 # and that  this notice  is included verbatim  in any  distributions. No
 # written agreement, license, or royalty  fee is required for any of the
 # authorized uses.  Modifications to this software may be copyrighted by
 # their authors and need not  follow the licensing terms described here,
 # provided that the new terms are clearly indicated on the first page of
 # each file where they apply.
 #
 # IN NO  EVENT SHALL THE AUTHOR  OR DISTRIBUTORS BE LIABLE  TO ANY PARTY
 # FOR  DIRECT, INDIRECT, SPECIAL,  INCIDENTAL, OR  CONSEQUENTIAL DAMAGES
 # ARISING OUT  OF THE  USE OF THIS  SOFTWARE, ITS DOCUMENTATION,  OR ANY
 # DERIVATIVES  THEREOF, EVEN  IF THE  AUTHOR  HAVE BEEN  ADVISED OF  THE
 # POSSIBILITY OF SUCH DAMAGE.
 #
 # THE  AUTHOR  AND DISTRIBUTORS  SPECIFICALLY  DISCLAIM ANY  WARRANTIES,
 # INCLUDING,   BUT   NOT  LIMITED   TO,   THE   IMPLIED  WARRANTIES   OF
 # MERCHANTABILITY,    FITNESS   FOR    A    PARTICULAR   PURPOSE,    AND
 # NON-INFRINGEMENT.  THIS  SOFTWARE IS PROVIDED  ON AN "AS  IS" BASIS,
 # AND  THE  AUTHOR  AND  DISTRIBUTORS  HAVE  NO  OBLIGATION  TO  PROVIDE
 # MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
 # ---------------------------------------------------------------------------
 #	namespace:  vectormath
 # ---------------------------------------------------------------------------
 #
 #  0.7 ... proc tangent_2_circles ... exception on equal radius
 #      ... proc angleVector (use proc angle)
 #

        #
        #
namespace eval ::math::geometry {
        #
    variable pi     $::math::geometry::pi
    variable torad  $::math::geometry::torad
    variable todeg  $::math::geometry::todeg
        #
    variable margin 1.0e-10
        #

    variable  CONST_PI [expr {4*atan(1)}]

        #
}
    #
    #
    # ::math::geometry::cathetusPoint
    #
    #       Return point of rectangular triangle locating the rectangular angle.
    #
    # Arguments:
    #       pa       starting point on hypotenuse
    #       pb       ending point on hypotenuse
    #       cathetus a cathetus of the triangle
    #       location location of the given cathetus
    #                    a means given cathetus shares point pa (default)
    #                    b means given cathetus shares point pb
    #
    # Result:
    #       pc point locating the rectangular angle
    #
    # Examples:
    #     - cathetusPoint {1 1} {5 2} 3
    #       Result: {3.6168 -0.4671}
    #     - cathetusPoint {1 1} {5 2} 3 a
    #       Result: {3.6168 -0.4671}
    #     - cathetusPoint {1 1} {5 2} 3 b
    #       Result: {3.3815 -0.5259}
    #     - cathetusPoint {1 1} {5 2} 9 b
    #       Result: {}
    #
proc ::math::geometry::cathetusPoint {pa pb cathetus {location {a}}} {
    variable todeg
    if {$location eq {close}} {set location a}
    set length_c	[length [- $pa $pb]]
    set angle_c	    [angle [concat $pa $pb]]
    if {$length_c >= $cathetus} {
        set angle_cath	[expr {acos($cathetus/$length_c) * $todeg}]
    } else {
        return {}
    }
    if {$location == {a}} { # cathetus next to pa
      set angle_cath    [expr {$angle_c - $angle_cath}]
      set pc            [+ $pa [s* $cathetus [direction $angle_cath]]]
    } else {  # cathetus next to pb
      set angle_cath    [expr {180 + $angle_c + $angle_cath}]
      set vct_cath      [s* $cathetus [direction $angle_cath]]
      set pc            [+ $pb [s* $cathetus [direction $angle_cath]]]
    }		
    return $pc
}
    #
    #
    # ::math::geometry::parallel
    #
    #       Return line parallel to line by offset
    #           direction is defined by the first two coordinates of line, e.g. [lrange $line 0 3]
    # Arguments:
    #       line
    #       offset
    #       orient   right (default), left
    #
    # Result:
    #       pc point locating the rectangular angle
    #
    # Examples:
    #     - parallel {1 1} {5 2} 3
    #       Result: {1.7276 -1.9104 5.7276 -0.9104}
    #     - parallel {1 1} {5 2} 3 a
    #       Result: {1.7276 -1.9104 5.7276 -0.9104}
    #     - parallel {1 1} {5 2} 3 b
    #       Result: {0.2724 3.9104 4.2724 4.9104}
    #
proc ::math::geometry::parallel {line offset {orient {right}}} {
    set a   [angle [lrange $line 0 3]]
    if {$orient == {right}} { # cathetus next to p1
        set a_p [expr {$a - 90}]
    } else {  # cathetus next to p2
        set a_p [expr {$a + 90}]
    }
    set parallel    {}
    set v           [rotate $a_p [list $offset 0]]
    foreach {x y} $line {
        set p       [+ [list $x $y] $v]
        lappend     parallel $p
    }
    return [join $parallel]
}
    #
    #
    # rotateAbout --
    #
    #       rotate a polyline
    #           about a given position and angle
    #
    # Arguments:
    #       p
    #       angle
    #       polyline
    #
    # Result:
    #       rotated polyline
    #
    # Examples:
    #     - rotateAbout    {10 10}  90 {20 0  20 20}
    #       Result: {20.0 20.0 0.0 20.0}
    #     - rotateAbout    {10 10} 180 {20 0  20 20}
    #       Result: {0.0 20.0 0.0 0.0}
    #
proc ::math::geometry::rotateAbout {p angle polyline} {
    lassign $p px py
    set polyline    [translate [list [expr {- $px}] [expr {- $py}]] $polyline]
    set polyline    [rotate $angle $polyline]
    set polyline    [translate $p $polyline]
    return $polyline
}

    #
    #
    # ::math::geometry::unitVector
    #
    #       Calculates unit vector from line.
    #
    # Arguments:
    #       line/direction    a line defined by two points A and B
    #                         a point defined by x and y
    #
    # Results:
    #       x y         unit vector describing the angle between the line (0,0)->(1,0) and (Ax,Ay)->(Bx,By).
    #                     Angle is in 360-degrees going counter-clockwise
    #
    # Examples:
    #     - angle {10 10 15 15}
    #       Result: 0.7071067811865476 0.7071067811865476
    #     - angle {10 10}
    #       Result: 0.7071067811865476 0.7071067811865476
    #
proc ::math::geometry::unitVector {line} {
    return [::math::geometry::direction [::math::geometry::angle $line]]
}

    #
    #
    # tangentLinesToCircle --
    #     Determine the tangents from a point to a circle
    #
    # Arguments:
    #     point         Point in question
    #     circle        Circle in question
    #
    # Returns:
    #     The two tangent lines or an empty list if the point is inside the circle
    #
    # Note:
    #     Shift and rotate the point and circle first, then determine the
    #     intersection and transform back.
    #
proc ::math::geometry::tangentLinesToCircle {point circle} {
    variable margin

    set centre [lrange $circle 0 1]
    set radius [lindex $circle end]

    set distance [distance $centre $point]

    if { $distance < $radius } {
        return {}
    } else {
        set vector [- $point $centre]
        set vector [s* [expr {1.0/$distance}] [- $point $centre]]

        if { abs($distance - $radius) < $margin*$radius } {
            lassign $vector vx vy
            return [list [concat $point [+ $point [list $vy [expr {-$vx}]]]]]
                # The two tangent lines coincide
        }
    }

    set halfdistance [expr {$distance / 2.0}]
    set newcircle    [list $halfdistance 0.0 $halfdistance]
    set intersection [IntersectionCircleCircle $circle $newcircle]

    set newIntersection {}
    lassign $vector vx vy
    lassign $centre cx cy
    if { [llength [lindex $intersection 0]] == 1 } {
        set intersection [list $intersection]
    }
    foreach xy $intersection {
        lassign $xy x y

        set xn [expr {$vx * $x - $vy * $y + $cx}]
        set yn [expr {$vy * $x + $vx * $y + $cy}]

        lappend newIntersection [list $xn $yn]
    }

    return [list [concat $point [lindex $newIntersection 0]] \
                 [concat $point [lindex $newIntersection 1]]]
}
    #
    #
    # ::math::geometry::angle
    #
    #       Calculates angle from the horizon (0,0)->(1,0) to a line.
    #
    # Arguments:
    #       line/direction    a line defined by two points A and B
    #                         a direction defined by x and y
    #
    # Results:
    #       angle         the angle between the line (0,0)->(1,0) and (Ax,Ay)->(Bx,By).
    #                     Angle is in 360-degrees going counter-clockwise
    #
    # Examples:
    #     - angle {10 10 15 13}
    #       Result: 30.9637565321
    #     - angle {10 10}
    #       Result: 45.0
    #
proc ::math::geometry::angle {line} {
    if {[llength $line] == 2} {
        set x1 0
        set y1 0
        lassign $line x2 y2
    } else {
        lassign $line x1 y1 x2 y2
    }
        # set x1 [lindex $line 0]
        # set y1 [lindex $line 1]
        # set x2 [lindex $line 2]
        # set y2 [lindex $line 3]
    # - handle vertical lines
    if {$x1==$x2} {if {$y1<$y2} {return 90} else {return 270}}
    # - handle other lines
    set a [expr {atan(abs((1.0*$y1-$y2)/(1.0*$x1-$x2)))}] ; # a is between 0 and pi/2
    set pi [expr {4*atan(1)}]
    if {$y1<=$y2} {
	# line is going upwards
	if {$x1<$x2} {set b $a} else {set b [expr {$pi-$a}]}
    } else {
	# line is going downwards
	if {$x1<$x2} {set b [expr {2*$pi-$a}]} else {set b [expr {$pi+$a}]}
    }
    return [expr {$b/$pi*180}] ; # convert b to degrees
}
    #
    #
    # ::math::geometry::unitVector
    #
    #       Calculates unit vector from line.
    #
    # Arguments:
    #       line/direction    a line defined by two points A and B
    #                         a point defined by x and y
    #
    # Results:
    #       x y         unit vector describing the angle between the line (0,0)->(1,0) and (Ax,Ay)->(Bx,By).
    #                     Angle is in 360-degrees going counter-clockwise
    #
    # Examples:
    #     - angle {10 10 15 15}
    #       Result: 0.7071067811865476 0.7071067811865476
    #     - angle {10 10}
    #       Result: 0.7071067811865476 0.7071067811865476
    #
proc ::math::geometry::unitVector {line} {
    return [::math::geometry::direction [::math::geometry::angle $line]]
}
    #
    #
    # Unit vector into specific direction given by angle (degrees)
    #   ... opposite behaviour of ::math::geometry::direction
proc ::math::geometry::direction {angle} {
    variable torad
    set x [expr {cos($angle * $torad)}]
    set y [expr {sin($angle * $torad)}]
    return [list $x $y]
}
    #
    #
    # Find direction octant the point (vector) lies in.
    #   ... opposite behaviour of ::math::geometry::direction
    #
proc ::math::geometry::octant {p} {
    variable todeg
    lassign $p x y

    set a [expr {(atan2(-$y,$x)*$todeg)}]
    while {$a >  360} {set a [expr {$a - 360}]}
    while {$a < -360} {set a [expr {$a + 360}]}
    if {$a < 0} {set a [expr {360 + $a}]}

    # puts "p ($x, $y) @ angle $a | [expr {atan2($y,$x)}] | [expr {atan2($y,$x)*$todeg}]"
    # XXX : Add outer conditions to make a log2 tree of checks.

    if {$a <= 157.5} {
	if {$a <= 67.5} {
	    if {$a <= 22.5} { return east }
	    return southeast
	}
	if {$a <=  112.5} { return south }
	return southwest
    } else {
	if {$a <=  247.5} {
	    if {$a <=  202.5} { return west }
	    return northwest
	}
	if {$a <=  337.5} {
	    if {$a <=  292.5} { return north }
	    return northeast
	}
	return east ; # a <= 360.0
    }
}
    #
    #
    # ::math::geometry::intersectSegmentCircle
    #
proc ::math::geometry::intersectSegmentCircle {line circle} {
    return [::math::geometry::lineSegmentIntersectsCircle $line $circle]
}
    #
    #
    # ::math::geometryExt::intersectLineCircle
    #
proc ::math::geometry::intersectLineCircle {line circle} {
    return [::math::geometry::lineIntersectsCircle $line $circle]
}
    #
    #
    # ::math::geometry::intersectLineSegments
    #
proc ::math::geometry::intersectLineSegments {line1 line2} {
    return [::math::geometry::lineSegmentsIntersect $line1 $line2]
}
    #
    # ::math::geometry::intersectionLineCircle
    #               ... intersectionLineWithCircle
    #
proc ::math::geometry::intersectionLineCircle {line circle} {
    return [::math::geometry::intersectionLineWithCircle $line $circle]
}
    #
    # ::math::geometry::intersectionLineCircle
    #               ... findLineSegmentIntersection
    #
proc ::math::geometry::intersectionLineSegments {line1 line2} {
    return [::math::geometry::findLineSegmentIntersection $line1 $line2]
}
    #
    #
    # ::math::geometry::intersectionSegmentCircle
    #
proc ::math::geometry::intersectionSegmentCircle {line circle} {
    if [intersectLineCircle $line $circle] {
        set posList {}
        foreach pos [intersectionLineCircle $line $circle] {
            if { [pointInsideBBox $line $pos] } {
                lappend posList $pos
            }
        }
        return $posList
    } else {
        return {}
    }
}
    #
    #
    # ::math::geometry::intersectionPolylines
    #
    #       ... based on ::math::geometry::polylinesBoundingIntersect
    #
    #       Computes the first or all intersections of two polylines.
    #
    #       How it works:
    #          Each polyline is split into a number of smaller polylines,
    #          consisting of granularity points each. If a pair of those smaller
    #          lines' bounding boxes intersect, then this procedure computes the
    #          first {mode=first} or alls {mode=all} intersecting points.
    #
    # Arguments:
    #       polyline1     the first polyline
    #       polyline2     the second polyline
    #       mode          [first|all] results
    #
    # Results:
    #       posIntersect   ... pos of intersections or empty list in case of no intersection found
    #
    # Examples:
    #     - intersectionPolylines {0 0 10 10 10 20} {0 10 10 0}
    #       Result: {5 5}
    #     - intersectionPolylines {0 0 10 10 10 20} {5 4 10 4}
    #       Result: {}
    #
    #
    #                               *
    #                              /
    #       +─────+               /
    #              \       * - - *
    #               \     /
    #                +── o ───────── ─>
    #                   /
    #                  *
    #
proc ::math::geometry::___polylineIntersection {polyline1 polyline2 {mode first}} {
    return [intersectionPolylines $polyline1 $polyline2 $mode]
}
proc ::math::geometry::intersectionPolylines {polyline1 polyline2 {mode first} {granularity 1}} {
        #
    #set granularity 10  ;   # the number of points in each part-polyline
    #                        #   granularity<=1 means full correctness
    #                        #   10 ... optimal search granularity?
        #
        # split the lines into parts consisting of $granularity points
    if {$granularity > 1 } {
        set polyline1parts {}
        for {set i 0} {$i<[llength $polyline1]} {incr i [expr {2*$granularity-2}]} {
            lappend polyline1parts [lrange $polyline1 $i [expr {$i+2*$granularity-1}]]
        }
        set polyline2parts {}
        for {set i 0} {$i<[llength $polyline2]} {incr i [expr {2*$granularity-2}]} {
            lappend polyline2parts [lrange $polyline2 $i [expr {$i+2*$granularity-1}]]
        }
    } else {
        set polyline1parts [list $polyline1]
        set polyline2parts [list $polyline2]
    }
        #
    set posList    {}
        #
        # do any of the parts overlap?
        #
        #
    foreach part1 $polyline1parts {
            #
            # puts "    -> \$part1    $part1"
        set part1bbox [bbox $part1]
            #
        foreach part2 $polyline2parts {
                # puts "    -> \$part2    $part2"
            set part2bbox [bbox $part2]
                # puts "      -> \$part1bbox $part1bbox"
                # puts "      -> \$part2bbox $part2bbox"
                #
            if {[rectanglesOverlap  [lrange $part1bbox 0 1] [lrange $part1bbox 2 3]  [lrange $part2bbox 0 1] [lrange $part2bbox 2 3] 0]} {
                    # puts " the lines' bounding boxes intersect"
                foreach {l1x2 l1y2} [lassign $part1 l1x1 l1y1] {
                    foreach {l2x2 l2y2} [lassign $part2 l2x1 l2y1] {
                            #
                            # puts "  -> try   [list $l1x1 $l1y1 $l1x2 $l1y2] 	<-?->   [list $l2x1 $l2y1 $l2x2 $l2y2]"
                        if {[intersectLineSegments [list $l1x1 $l1y1 $l1x2 $l1y2] [list $l2x1 $l2y1 $l2x2 $l2y2]]} {
                                # puts " two line segments overlap"
                                # compute intersection
                                # return position
                                # puts "      -> intersect - A1: yes"
                            set posIntersect    [intersectionLineSegments [list $l1x1 $l1y1 $l1x2 $l1y2] [list $l2x1 $l2y1 $l2x2 $l2y2]]
                            if {$posIntersect eq "coincident" || $posIntersect eq "none"} {
                                set posIntersect ""
                            }
                                # puts "      -> \$k: $k -> [list $l1x1 $l1y1 $l1x2 $l1y2]"
                                # puts "      -> \$l: $l -> [list $l2x1 $l2y1 $l2x2 $l2y2]"
                                # puts "      -> intersection: $posIntersect"
                            if {$mode ne "first"} {
                                lappend posList $posIntersect
                            } else {
                                return $posIntersect
                            }
                                #
                        }
                        set l2x1 $l2x2; set l2y1 $l2y2
                            #
                    }
                    set l1x1 $l1x2; set l1y1 $l1y2
                }
            }
        }
    }
        #
        #
    return $posList
        #
}
    #
    #
    # ::math::geometry::intersectionPolylineCircle
    #
    #       ... based on ::math::geometry::polylinesBoundingIntersect
    #
    #       Computes the first or all intersections of polyline and circle.
    #
    #       How it works:
    #          The polyline is split into a number of smaller polylines,
    #          consisting of granularity points each. If a pair of those smaller
    #          lines' bounding boxes intersect, then this procedure returns 1,
    #          otherwise it returns 0.
    #
    # Arguments:
    #       polyline1     the first polyline
    #       polyline2     the second polyline
    #       mode          return [first|all] intersections
    #
    # Results:
    #       posIntersect   ... pos of intersections or empty list in case of no intersection found
    #
    # Examples:
    #     - intersectionPolylineCircle {0 0  10 10  20 10  30 0} {40 0 20}
    #       Result: {30.564404225837308 4.717797887081346}
    #     - intersectionPolylineCircle {0 0  10 10  20 10  30 0} {20 0 15}
    #       Result: {18.81966011250105 10.0}
    #     - intersectionPolylineCircle {0 0  10 10  20 10  40 0} {20 0 15}
    #       Result: {34.77032961426901 2.6148351928654963} {6.464466094067264 6.464466094067264}
    #     - intersectionPolylineCircle {0 0  10 10  20 10  40 0} {20 0 15}
    #       Result: {}
    #
    #
    # Results:
    #       posList ...... e.g: {34.77032961426901 2.6148351928654963} {6.464466094067264 6.464466094067264}
    #
    #
    #
    #                   \
    #       +─────+      \
    #              \     |
    #               \    |
    #                +── o ───────── ─>
    #                   /
    #                  /
    #
proc ::math::geometry::___polylineCircleIntersection {polyline circle {mode first}} {
    return [intersectionPolylineCircle $polyline $circle $mode]
}
proc ::math::geometry::intersectionPolylineCircle {polyline circle {mode first} {granularity 1}} {
        #
        # puts "\n   -> ::math::geometry::polylineCircleIntersection \n"
        #
    #set granularity 5   ;   # the number of points in each part-polyline
                             #   granularity<=1 means full correctness
                             #   5 ... optimal search granularity?
        #
        # split the lines into parts consisting of $granularity points
    set polylineAllParts {}
    if { $granularity > 1 } {
        for {set i 0} {$i<[llength $polyline]} {incr i [expr {2*$granularity-2}]} {
            lappend polylineAllParts [lrange $polyline $i [expr {$i+2*$granularity-1}]]
        }
    } else {
        set polylineAllParts [list $polyline]
    }
         #
    lassign $circle x y r
    set posCenter   [list $x $y]
    set bboxCircle  [list [expr {$x - $r}] [expr {$y - $r}] [expr {$x + $r}] [expr {$y + $r}]]
        #
    set polylineUseParts    {}
        #
        # -- get parts of $polylineAllParts that might intersect circle
    foreach part $polylineAllParts {
            #
        set part1bbox       [bbox $part]
            #
        if {[rectanglesOverlap  [lrange $part1bbox 0 1] [lrange $part1bbox 2 3]  [lrange $bboxCircle 0 1] [lrange $bboxCircle 2 3] 1]} {
            lappend polylineUseParts    $part
        }
    }
        #
    if 0 {
        puts "   -> llength \$polylineAllParts -> [llength $polylineAllParts]"
        puts "   -> llength \$polylineUseParts -> [llength $polylineUseParts]"
        foreach polylinePart $polylineUseParts {
            puts "        \$polylineUseParts -> $polylinePart"
        }
    }
        #
        #
        # -- iterate through $polylineUseParts
        #
    set posList {}
        #
    set m 0
    foreach polylinePart $polylineUseParts {
            #
        incr m
            #
            # puts "--------------------"
            # puts "    -> \$polylinePart    $polylinePart"
        set n 0
        foreach {seg_x2 seg_y2} [lassign $polylinePart seg_x1 seg_y1] {
            incr n
            set segment         [list $seg_x1 $seg_y1 $seg_x2 $seg_y2]
            set posIntersect    [intersectionSegmentCircle $segment $circle]
            if {$posIntersect != {}} {
                    # puts "\n"
                    # puts "         $m / $n -> \$segment:  $segment"
                    # puts "         $m / $n -> \n\[::math::geometry::intersectionSegmentCircle \\\n    [list $segment] \\\n    [list $circle]\]"
                    # puts "         $m / $n -> \$posIntersect: $posIntersect"
                foreach pos $posIntersect {
                    # puts "       -> $m / $n : $segment"
                    # puts "       -> $m / $n : $pos"
                    if {$mode ne "first"} {
                        #lassign $pos _x_ _y_
                        #lappend posList [list [format {%0.6f} $_x_] [format {%0.6f} $_y_]]
                        lappend posList $pos
                    } else {
                        return $pos
                    }
                }
            }
            set seg_x1 $seg_x2; set seg_y1 $seg_y2
        }
    }
        #
        # puts "   -> \$posList $posList"
        # set posList [lsort -unique $posList]
        # puts "   -> \$posList $posList"
        #
    return $posList
        #
        #
}
    #
    #
    # ::math::geometry::polylineCutOrigin
    #
    # Arguments:
    #       polyline1      the first polyline
    #       polyline2      the second polyline
    #       granularity    the coarseness for the procedure
    #
    # Return:
    #       polyline       polyline from cut position to end
    #
proc ::math::geometry::polylineCutOrigin {polyline1 polyline2 {granularity 1}} {
        #
    #set granularity 10  ;   # the number of points in each part-polyline
                             #   granularity<=1 means full correctness
                             #   10 ... optimal search granularity?
        #
        # split the lines into parts consisting of $granularity points
    set granularity [expr {min(2,$granularity+1)}];# We need the total number of points in the section

    set polyline1parts {}
    for {set i 0} {$i<[llength $polyline1]} {incr i [expr {2*$granularity-2}]} {
        lappend polyline1parts [lrange $polyline1 $i [expr {$i+2*$granularity-1}]]
    }
    set polyline2parts {}
    for {set i 0} {$i<[llength $polyline2]} {incr i [expr {2*$granularity-2}]} {
        lappend polyline2parts [lrange $polyline2 $i [expr {$i+2*$granularity-1}]]
    }
        #
    set posIntersect    {}
    set polyline        {}
        #
        # do any of the parts overlap?
        #
        #
    foreach part1 $polyline1parts {
            # puts "    -> \$part1    $part1"
        set part1bbox [bbox $part1]
            #
        foreach part2 $polyline2parts {
                # puts "    -> \$part2    $part2"
            set part2bbox [bbox $part2]
                # puts "      -> \$part1bbox $part1bbox"
                # puts "      -> \$part2bbox $part2bbox"
                #
            if {[rectanglesOverlap  [lrange $part1bbox 0 1] [lrange $part1bbox 2 3]  [lrange $part2bbox 0 1] [lrange $part2bbox 2 3] 0]} {
                    # puts " the lines' bounding boxes intersect"
                foreach {l1x2 l1y2} [lassign $part1 l1x1 l1y1] {
                    if {$polyline eq {}} {
                        foreach {l2x2 l2y2} [lassign $part2 l2x1 l2y1] {
                                #
                                # puts "  -> try   [list $l1x1 $l1y1 $l1x2 $l1y2] 	<-?->   [list $l2x1 $l2y1 $l2x2 $l2y2]"
                            if {[intersectLineSegments [list $l1x1 $l1y1 $l1x2 $l1y2] [list $l2x1 $l2y1 $l2x2 $l2y2]]} {
                                    # puts " two line segments overlap"
                                    # compute intersection
                                    # return position
                                    # puts "      -> intersect - A1: yes"
                                set posIntersect    [intersectionLineSegments [list $l1x1 $l1y1 $l1x2 $l1y2] [list $l2x1 $l2y1 $l2x2 $l2y2]]
                                if {$posIntersect eq "coincident" || $posIntersect eq "none"} {
                                    set posIntersect ""
                                }
                                    # puts "      -> \$k: $k -> [list $l1x1 $l1y1 $l1x2 $l1y2]"
                                    # puts "      -> \$l: $l -> [list $l2x1 $l2y1 $l2x2 $l2y2]"
                                    # puts "      -> intersection: $posIntersect"
                                set polyline        [join "$posIntersect $l1x2 $l1y2"]
                                    #
                            }
                            set l2x1 $l2x2; set l2y1 $l2y2
                                #
                        }
                    } else {
                        lappend polyline $l1x2 $l1y2
                    }
                        #
                    set l1x1 $l1x2; set l1y1 $l1y2
                        #
                }
            }
        }
    }
        #
        #
    return $polyline
        #
}
    #
    #
    # ::math::geometry::polylineCutEnd
    #
    # Arguments:
    #       polyline1      the first polyline
    #       polyline2      the second polyline
    #       granularity    the coarseness for the procedure
    #
    # Return:
    #       polyline       polyline from origin to cut position
    #
proc ::math::geometry::polylineCutEnd {polyline1 polyline2 {granularity 1}} {
        #
    #set granularity 10  ;   # the number of points in each part-polyline
                             #   granularity<=1 means full correctness
                             #   10 ... optimal search granularity?
    set granularity [expr {min(2,$granularity+1)}];# We need the total number of points in the section
        #
        # split the lines into parts consisting of $granularity points
    set polyline1parts {}
    for {set i 0} {$i<[llength $polyline1]} {incr i [expr {2*$granularity-2}]} {
        lappend polyline1parts [lrange $polyline1 $i [expr {$i+2*$granularity-1}]]
    }
    set polyline2parts {}
    for {set i 0} {$i<[llength $polyline2]} {incr i [expr {2*$granularity-2}]} {
        lappend polyline2parts [lrange $polyline2 $i [expr {$i+2*$granularity-1}]]
    }
        #
    set posIntersect    {}
    set polyline        [lrange $polyline1 0 1]
        #
        # do any of the parts overlap?
        #
        #
    foreach part1 $polyline1parts {
            # puts "    -> \$part1    $part1"
        set part1bbox [bbox $part1]
            #
        foreach part2 $polyline2parts {
                #puts "    -> \$part2    $part2"
            set part2bbox [bbox $part2]
                # puts "      -> \$part1bbox $part1bbox"
                # puts "      -> \$part2bbox $part2bbox"
                #
            if {[rectanglesOverlap  [lrange $part1bbox 0 1] [lrange $part1bbox 2 3]  [lrange $part2bbox 0 1] [lrange $part2bbox 2 3] 0]} {
                        # puts " the lines' bounding boxes intersect"
                foreach {l1x2 l1y2} [lassign $part1 l1x1 l1y1] {
                    foreach {l2x2 l2y2} [lassign $part2 l2x1 l2y1] {
                            #
                            # puts "  -> try   [list $l1x1 $l1y1 $l1x2 $l1y2] 	<-?->   [list $l2x1 $l2y1 $l2x2 $l2y2]"
                        if {[intersectLineSegments [list $l1x1 $l1y1 $l1x2 $l1y2] [list $l2x1 $l2y1 $l2x2 $l2y2]]} {
                                # puts " two line segments overlap"
                                # compute intersection
                                # return position
                                # puts "      -> intersect - A1: yes"
                            set posIntersect    [intersectionLineSegments [list $l1x1 $l1y1 $l1x2 $l1y2] [list $l2x1 $l2y1 $l2x2 $l2y2]]
                            if {$posIntersect eq "coincident" || $posIntersect eq "none"} {
                                continue
                            }
                                # puts "      -> \$k: $k -> [list $l1x1 $l1y1 $l1x2 $l1y2]"
                                # puts "      -> \$l: $l -> [list $l2x1 $l2y1 $l2x2 $l2y2]"
                                # puts "      ...    intersection found for part1 in part2 ->  $l1x1 $l1y1 $l1x2 $l1y2 -?- $l2x1 $l2y1 $l2x2 $l2y2"
                            lappend polyline    $posIntersect
                                #
                            return [join $polyline]
                                #
                        } else {
                            # puts "      ... no intersection found for part1 in part2 ->  $l1x1 $l1y1 $l1x2 $l1y2 -?- $l2x1 $l2y1 $l2x2 $l2y2"
                        }
                            #
                        set l2x1 $l2x2; set l2y1 $l2y2
                            #
                    }
                        #
                    lappend polyline $l1x2 $l1y2
                        #
                    set l1x1 $l1x2; set l1y1 $l1y2
                        #
                }
            } else {
                    # puts "      ... no overlap found for part1 in part2 -> [lrange $part1 2 end]"
                lappend polyline [lrange $part1 2 end]
                    #
            }
        }
            #
    }
        #
        #
    return [join $polyline]
        #
}
    #
    #
    # ::math::geometry::splitPolyline
    #
    # Arguments:
    #       polyline        the given polyline
    #
    # Return:
    #       list of segments
    #
proc ::math::geometry::splitPolyline {polyline numbVertex} {
        #
    set listSegments        {}
        #
        # puts "    -> splitPolyline"
        # puts "        -> \$numbVertex $numbVertex"
        #
    set myPolygon           [lassign $polyline x y]
        #
    set xy                  [list $x $y]
        #
    set i           0
        #
    set tmpPolyline         $xy
        #
        #
    foreach {x y} $myPolygon {
            #
        lappend tmpPolyline $x $y
            #
            # puts "   -> $i: $tmpPolyline"
            #
        if {$i < $numbVertex} {
                #
            incr i
                #
        } else {
                #
            lappend listSegments    [join $tmpPolyline]
                #
            set tmpPolyline         [list $x $y]
            set i 0
                #
        }
            #
    }
        #
    if {[lindex $listSegments end] != $tmpPolyline} {
        lappend listSegments    $tmpPolyline
    }
        #
    return $listSegments
        #
}
    #
    #
    # ::math::geometry::enrichPolyline
    #
    # Arguments:
    #       polyline      the given polyline
    #       accuracy      divide each segment into $accuracy number of segments
    #
    # Results:
    #       polyline      each segment divided in $accuracy number of segments
    #
    # Example:
    #     - enrichPolyline  {0 0  40 0  40 20  80 20} 4
    #       Result:         {0 0   10 0  20 0  30 0   40 0   40 5  40 10  40 15   40 20   50 20  60 20  70 20   80 20}
    #
proc ::math::geometry::enrichPolyline {polyline accuracy} {
        #
    set retValue    [lrange $polyline 0 1]
        #
    set accuracy    [expr {$accuracy + 0.0}] ;# Avoid division by an integer

    foreach {x2 y2} [lassign $polyline x1 y1] {
            # puts "       -> $x1 $y1  ->  $x2 $y2"
        set dx      [expr {($x2 - $x1) / $accuracy}]
        set dy      [expr {($y2 - $y1) / $accuracy}]
         for {set i 1} {$i <= $accuracy} {incr i} {
            lappend retValue [expr {$x1 + $i * $dx}] [expr {$y1 + $i * $dy}]
        }
        set x1 $x2
        set y1 $y2
    }
        #
    return $retValue
        #
}
    #
    #
    # ::math::geometry::cleanupPolyline
    #
    # remove coincidencies of neighbored points
    #
    # Arguments:
    #       polyline    the given polyline
    #
    # Results:
    #       polyline
    #
    # Example:
    #     - cleanupPolyline {0 0  40 0  40 20  40 20.0  80 20  80 20.0}
    #       Result:         {0 0  40 0  40 20  80 20}
    #
proc ::math::geometry::cleanupPolyline {polyline} {
        #
    set retValue    [lrange $polyline 0 1]
        #
    foreach {x2 y2} [lassign $polyline x1 y1] {
            # puts "       -> $x1 $y1  ->  $x2 $y2"
        if {$x2 != $x1 || $y2 != $y1} {
            # puts "     differ: $x2 -?- $x1  --- $y2  -?-  $y1"
            lappend retValue $x2 $y2
        }
        set x1 $x2
        set y1 $y2
    }
        #
    return $retValue
        #
}
    #
    #
    # ::math::geometry::pointInsideBBox
    #
    # check wether a point is inside or on BoundingBoy
    #
    # Arguments:
    #       bbox        the given polyline
    #       point       the point to be checked
    #
    # Results:
    #       0 ... totally outside bbox
    #       1 ... inside bbox
    #
    # Example:
    #     - pointInsideBBox {0 0  40 20} {20 10}
    #       Result:         1
    #     - pointInsideBBox {0 0  40 20} {30 20}
    #       Result:         1
    #     - pointInsideBBox {0 0  40 20} {50 10}
    #       Result:         0
    #
proc ::math::geometry::pointInsideBBox {bbox point} {
    lassign $bbox  bb_x0 bb_y0 bb_x1 bb_y1
    lassign $point x y
    if {$x == [lindex [lsort -real -increasing "$bb_x0 $bb_x1 $x"] 1]} {
        if {$y == [lindex [lsort -real -increasing "$bb_y0 $bb_y1 $y"] 1]} {
            return 1
        }
    }
    return 0
}
    #
    #
    # ::math::geometry::overlapBBox
    #
proc ::math::geometry::overlapBBox {polyline1 polyline2 {strict 0}} {
        # puts "   -> \$polyline1 $polyline1"
        # puts "   -> \$polyline2 $polyline2"
    set bbox1   [bbox $polyline1]
    set bbox2   [bbox $polyline2]
        # puts "         -> \$bbox1 $bbox1"
        # puts "         -> \$bbox2 $bbox2"
        # puts "         -> [::math::geometry::rectanglesOverlap  [lrange $bbox1 0 1] [lrange $bbox1 2 3]  [lrange $bbox2 0 1] [lrange $bbox2 2 3] $strict]"
    return [rectanglesOverlap  [lrange $bbox1 0 1] [lrange $bbox1 2 3]  [lrange $bbox2 0 1] [lrange $bbox2 2 3] $strict]
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to modules/math/interpolate.man.

291
292
293
294
295
296
297
298
299
0.8: 4.11
0.9: 3.95675857843
1.0: 4.12
}]
As you can see, the values at the abscissae are reproduced perfectly.

[vset CATEGORY {math :: interpolate}]
[include ../common-text/feedback.inc]
[manpage_end]







|

291
292
293
294
295
296
297
298
299
0.8: 4.11
0.9: 3.95675857843
1.0: 4.12
}]
As you can see, the values at the abscissae are reproduced perfectly.

[vset CATEGORY {math :: interpolate}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/interpolate.tcl.

249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# Note:
#    The list xyvalues must be sorted w.r.t. the x-value
#
proc ::math::interpolate::interp-linear { xyvalues xval } {
   #
   # Border cases first
   #
   if { [lindex $xyvalues 0]+0.0 > $xval } {
      return [lindex $xyvalues 1]
   }
   if { [lindex $xyvalues end-1]+0.0 < $xval } {
      return [lindex $xyvalues end]
   }

   #
   # The ordinary case
   #
   set idxx -2
   set idxy -1
   foreach { x y } $xyvalues {
      if { $xval < $x } {
         break
      }
      incr idxx 2
      incr idxy 2
   }

   set x2 [lindex $xyvalues $idxx]
   set y2 [lindex $xyvalues $idxy]

   if { $x2 != $x } {
      set yval [expr {$y+($y2-$y)*($xval-$x)/double($x2-$x)}]
   } else {
      set yval [expr {double($y)}]
   }
   return $yval
}

# interp-lagrange --
#    Use the Lagrange interpolation method
#







|


|




















|

|







249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# Note:
#    The list xyvalues must be sorted w.r.t. the x-value
#
proc ::math::interpolate::interp-linear { xyvalues xval } {
   #
   # Border cases first
   #
   if { [lindex $xyvalues 0] > $xval } {
      return [lindex $xyvalues 1]
   }
   if { [lindex $xyvalues end-1] < $xval } {
      return [lindex $xyvalues end]
   }

   #
   # The ordinary case
   #
   set idxx -2
   set idxy -1
   foreach { x y } $xyvalues {
      if { $xval < $x } {
         break
      }
      incr idxx 2
      incr idxy 2
   }

   set x2 [lindex $xyvalues $idxx]
   set y2 [lindex $xyvalues $idxy]

   if { $x2 != $x } {
      set yval [expr {$y+($y2-$y)*($xval-$x)/($x2-$x)}]
   } else {
      set yval $y
   }
   return $yval
}

# interp-lagrange --
#    Use the Lagrange interpolation method
#
660
661
662
663
664
665
666
667
}



#
# Announce our presence
#
package provide math::interpolate 1.1.2







|
660
661
662
663
664
665
666
667
}



#
# Announce our presence
#
package provide math::interpolate 1.1.1

Changes to modules/math/interpolate.test.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- tcl -*-
# interpolate.test --
#    Test cases for the ::math::interpolate package
#

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

support {
    use      struct/matrix.tcl struct::matrix
    useLocal math.tcl          math
}
testing {











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- tcl -*-
# interpolate.test --
#    Test cases for the ::math::interpolate package
#

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.1

support {
    use      struct/matrix.tcl struct::matrix
    useLocal math.tcl          math
}
testing {

Changes to modules/math/kruskal.tcl.

Changes to modules/math/linalg.man.

960
961
962
963
964
965
966
967
968
namespace eval compute {
    rename ::scale scaleTk
    scaleTk .scale ...
}
}]

[vset CATEGORY {math :: linearalgebra}]
[include ../common-text/feedback.inc]
[manpage_end]







|

960
961
962
963
964
965
966
967
968
namespace eval compute {
    rename ::scale scaleTk
    scaleTk .scale ...
}
}]

[vset CATEGORY {math :: linearalgebra}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/linalg.tcl.

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#      lists, where the rows are the innermost lists:
#
#      / a11 a12 a13 \
#      | a21 a22 a23 | == { {a11 a12 a13} {a21 a22 a23} {a31 a32 a33} }
#      \ a31 a32 a33 /
#

package require Tcl 8.5 ; # conforming uses 8.5+ features (`x ni list`).

namespace eval ::math::linearalgebra {
    # Define the namespace
    namespace export dim shape conforming symmetric
    namespace export norm norm_one norm_two norm_max normMatrix
    namespace export dotproduct unitLengthVector normalizeStat
    namespace export axpy axpy_vect axpy_mat crossproduct







|







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#      lists, where the rows are the innermost lists:
#
#      / a11 a12 a13 \
#      | a21 a22 a23 | == { {a11 a12 a13} {a21 a22 a23} {a31 a32 a33} }
#      \ a31 a32 a33 /
#

package require Tcl 8.4

namespace eval ::math::linearalgebra {
    # Define the namespace
    namespace export dim shape conforming symmetric
    namespace export norm norm_one norm_two norm_max normMatrix
    namespace export dotproduct unitLengthVector normalizeStat
    namespace export axpy axpy_vect axpy_mat crossproduct
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Result:
#     1 if they conform, 0 if not
#
proc ::math::linearalgebra::conforming { type obj1 obj2 } {
    set shape1 [shape $obj1]
    set shape2 [shape $obj2]
    set result 0

    if { $type ni {shape rows matmul} } {
        return -code error "Unknown type of conforming check - $type - should be one of: shape rows matmul"
    }

    if { $type == "shape" } {
        set result [expr {[lindex $shape1 0] == [lindex $shape2 0] &&
                          [lindex $shape1 1] == [lindex $shape2 1]}]
    }
    if { $type == "rows" } {
        set result [expr {[lindex $shape1 0] == [lindex $shape2 0]}]
    }
    if { $type == "matmul" } {
        if { [llength $shape1] == 2 } {
            set result [expr {[lindex $shape1 1] == [lindex $shape2 0]}]
        } elseif { [llength $shape2] == 2 } {
            set result [expr {[lindex $shape1 0] == [lindex $shape2 0]}]
        } else {
            set result [expr {[lindex $shape1 0] == [lindex $shape2 0]}]
        }
    }
    return $result
}

# crossproduct --
#     Return the "cross product" of two 3D vectors
# Arguments:







<
<
<
<
<








<
|
<
<
<
<
<







122
123
124
125
126
127
128





129
130
131
132
133
134
135
136

137





138
139
140
141
142
143
144
# Result:
#     1 if they conform, 0 if not
#
proc ::math::linearalgebra::conforming { type obj1 obj2 } {
    set shape1 [shape $obj1]
    set shape2 [shape $obj2]
    set result 0





    if { $type == "shape" } {
        set result [expr {[lindex $shape1 0] == [lindex $shape2 0] &&
                          [lindex $shape1 1] == [lindex $shape2 1]}]
    }
    if { $type == "rows" } {
        set result [expr {[lindex $shape1 0] == [lindex $shape2 0]}]
    }
    if { $type == "matmul" } {

        set result [expr {[lindex $shape1 1] == [lindex $shape2 0]}]





    }
    return $result
}

# crossproduct --
#     Return the "cross product" of two 3D vectors
# Arguments:
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231

    return $result
}

#
# Announce the package's presence
#
package provide math::linearalgebra 1.1.6

if { 0 } {
Te doen:
behoorlijke testen!
matmul
solveGauss_band
join_col, join_row







|







2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220

    return $result
}

#
# Announce the package's presence
#
package provide math::linearalgebra 1.1.5

if { 0 } {
Te doen:
behoorlijke testen!
matmul
solveGauss_band
join_col, join_row

Changes to modules/math/linalg.test.

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
set regular 1

if {$regular==1} then {
    source [file join \
                [file dirname [file dirname [file join [pwd] [info script]]]] \
                devtools testutilities.tcl]

    testsNeedTcl     8.5
    testsNeedTcltest 2.1

    support {
        useLocal math.tcl math
    }
    testing {
        useLocal linalg.tcl math::linearalgebra







|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
set regular 1

if {$regular==1} then {
    source [file join \
                [file dirname [file dirname [file join [pwd] [info script]]]] \
                devtools testutilities.tcl]

    testsNeedTcl     8.4
    testsNeedTcltest 2.1

    support {
        useLocal math.tcl math
    }
    testing {
        useLocal linalg.tcl math::linearalgebra
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
}
# -------------------------------------------------------------------------

namespace import -force ::math::linearalgebra::*

set prec $::tcl_precision
if {![package vsatisfies [package provide Tcl] 8.5]} {
    # 8.4 or less - Remove, 8.5+ required already
    set ::tcl_precision 17
} else {
    set ::tcl_precision 0
}

#
# Returns 1 if the expected value is close to the actual value,







<







43
44
45
46
47
48
49

50
51
52
53
54
55
56
}
# -------------------------------------------------------------------------

namespace import -force ::math::linearalgebra::*

set prec $::tcl_precision
if {![package vsatisfies [package provide Tcl] 8.5]} {

    set ::tcl_precision 17
} else {
    set ::tcl_precision 0
}

#
# Returns 1 if the expected value is close to the actual value,
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
      {0.0 0.0 0.0}
      {0.0 0.0 0.0}}
      catch {
        set pm [largesteigen $a]
      } errmsg
    set errmsg
} -result {Cannot continue power method : matrix is singular}

# Conforming - ticket 776a75f14f53b5c9a06fe3f3892485a6efe1dc20
test conforming-1 "Conforming shapes" -body {
    set m1 {{1 2}
            {3 4}}
    set m2 {{1 3}
            {3 4}}
    conforming shape $m1 $m2
} -result 1
test conforming-2 "Non-conforming shapes" -body {
    set m1 {{1 2}
            {3 4}}
    set m2 {{1 3 4}
            {3 4 5}}
    conforming shape $m1 $m2
} -result 0
test conforming-3 "Conforming matmul - two matrices" -body {
    set m1 {{1 2}
            {3 4}
            {5 6}}
    set m2 {{1 3 4}
            {3 4 5}}
    conforming matmul $m1 $m2
} -result 1
test conforming-4 "Conforming matmul - two matrices, reversed" -body {
    set m1 {{1 2}
            {3 4}
            {5 6}}
    set m2 {{1 3 4}
            {3 4 5}}
    conforming matmul $m2 $m1
} -result 1
test conforming-5 "Conforming matmul - vector-matrix" -body {
    set mat {{1 2}
             {3 4}
             {5 6}}
    set vec {1 3 4}
    conforming matmul $vec $mat
} -result 1
test conforming-6 "Conforming matmul - vector-matrix" -body {
    set mat {{1 2}
             {3 4}
             {5 6}}
    set vec {1 3}
    conforming matmul $mat $vec
} -result 1
test conforming-7 "Non-conforming matmul - vector-matrix" -body {
    set mat {{1 2}
             {3 4}
             {5 6}}
    set vec {1 3}
    conforming matmul $vec $mat
} -result 0
test conforming-7 "Non-conforming matmul - vector-matrix" -body {
    set mat {{1 2}
             {3 4}
             {5 6}}
    set vec {1 2 3}
    conforming matmul $mat $vec
} -result 0


# Additional tests: procedures by Federico Ferri
#source ferri/ferri.test

set ::tcl_precision $prec

if {$regular==1} then {
    testsuiteCleanup
} else {
    tcltest::cleanupTests
}








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












857
858
859
860
861
862
863





























































864
865
866
867
868
869
870
871
872
873
874
875
      {0.0 0.0 0.0}
      {0.0 0.0 0.0}}
      catch {
        set pm [largesteigen $a]
      } errmsg
    set errmsg
} -result {Cannot continue power method : matrix is singular}






























































# Additional tests: procedures by Federico Ferri
#source ferri/ferri.test

set ::tcl_precision $prec

if {$regular==1} then {
    testsuiteCleanup
} else {
    tcltest::cleanupTests
}

Changes to modules/math/machineparameters.man.

1
2
3
4
5
6
7
8
9
10
11
12
[comment {-*- tclrep -*- doctools manpage}]
[manpage_begin math::machineparameters n 1.0]
[copyright {2008 Michael Baudin <michael.baudin@sourceforge.net>}]
[moddesc tclrep]
[require Tcl 8.4]
[require snit]
[require math::machineparameters 0.1]

[titledesc {Compute double precision machine parameters.}]

[description]


|


<







1
2
3
4

5
6
7
8
9
10
11
[comment {-*- tclrep -*- doctools manpage}]
[manpage_begin tclrep/machineparameters n 1.0]
[copyright {2008 Michael Baudin <michael.baudin@sourceforge.net>}]
[moddesc tclrep]

[require snit]
[require math::machineparameters 0.1]

[titledesc {Compute double precision machine parameters.}]

[description]

183
184
185
186
187
188
189
190
191
[call [arg objectname] [method print]]

Print machine parameters on standard output.

[list_end]

[vset CATEGORY math]
[include ../common-text/feedback.inc]
[manpage_end]







|

182
183
184
185
186
187
188
189
190
[call [arg objectname] [method print]]

Print machine parameters on standard output.

[list_end]

[vset CATEGORY math]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/machineparameters.tcl.

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#     Underflow threshold          =   2.22507385850720138E-308
#     Largest exponent             =    1024.0000000000000
#     Overflow threshold           =   1.79769313486231571E+308
#     Reciprocal of safe minimum   =   4.49423283715578977E+307
#
# Copyright 2008 Michael Baudin
#
package require Tcl 8.4
package require snit
package provide math::machineparameters 0.1

snit::type machineparameters {
  # Epsilon is the smallest value so that 1+epsilon>1 is false
  variable epsilon 0
  # basis is the basis of the floating-point representation.







<







77
78
79
80
81
82
83

84
85
86
87
88
89
90
#     Underflow threshold          =   2.22507385850720138E-308
#     Largest exponent             =    1024.0000000000000
#     Overflow threshold           =   1.79769313486231571E+308
#     Reciprocal of safe minimum   =   4.49423283715578977E+307
#
# Copyright 2008 Michael Baudin
#

package require snit
package provide math::machineparameters 0.1

snit::type machineparameters {
  # Epsilon is the smallest value so that 1+epsilon>1 is false
  variable epsilon 0
  # basis is the basis of the floating-point representation.

Changes to modules/math/machineparameters.test.

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
# -*- tcl -*-
# machineparameters.test --
#   Unit tests for machineparameters.tcl
#

# Copyright 2008 Michael Baudin

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

testing {
    useLocal machineparameters.tcl math::machineparameters
}

# -------------------------------------------------------------------------

#
# Check all parameters are there
#
test checkall {check epsilon, rounding mode} -setup {
    set pp [machineparameters create %AUTO%]
    $pp configure -verbose 0
    $pp compute
} -body {
    set epsilon  [$pp get -epsilon]
    set rounding [$pp get -rounding]
    set basis    [$pp get -basis]
    set mantissa [$pp get -mantissa]
    set emax     [$pp get -exponentmax]
    #$pp print

    set res {}
    # The following property on epsilon must hold false (yes : epsilon is THAT small !)
    lappend res [expr {1.0+$epsilon>1.0}]
    lappend res [expr {$rounding!=""}]
    lappend res [expr {$basis> 1}]
    lappend res [expr {$mantissa> 1}]
} -cleanup {
    $pp destroy
    unset pp
} -result {0 1 1 1}

# -------------------------------------------------------------------------
#
# Shutdown tests
#
tcltest::cleanupTests

<



>

|
<
|
<
<
|
|
|
|
|
<
<
<
|
<
|



|
|
|
|
<
|
|
|
|
|
|
>
|
|
|
|
|
|
<
<
<
|
|
<
<





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

# machineparameters.test --
#   Unit tests for machineparameters.tcl
#
#
# Copyright 2008 Michael Baudin
#

#


# Startup unit tests
#
package require tcltest
tcltest::configure -verbose {start body error pass}
set basedir [file dirname [info script]]



lappend ::auto_path $basedir

package require math::machineparameters
#
# Check all parameters are there
#
tcltest::test checkall {check epsilon, rounding mode} {
  set pp [machineparameters create %AUTO%]
  $pp configure -verbose 0
  $pp compute

  set epsilon [$pp get -epsilon]
  set rounding [$pp get -rounding]
  set basis [$pp get -basis]
  set mantissa [$pp get -mantissa]
  set emax [$pp get -exponentmax]
  #$pp print
  $pp destroy
  set res {}
  # The following property on epsilon must hold false (yes : epsilon is THAT small !)
  lappend res [expr {1.0+$epsilon>1.0}]
  lappend res [expr {$rounding!=""}]
  lappend res [expr {$basis> 1}]
  lappend res [expr {$mantissa> 1}]



} {0 1 1 1}
#


# Shutdown tests
#
tcltest::cleanupTests

Changes to modules/math/math.man.

118
119
120
121
122
123
124
125
126
[call [cmd ::math::sum] [arg value] [opt [arg {value ...}]]]

Return the sum of one or more numeric values.

[list_end]

[vset CATEGORY math]
[include ../common-text/feedback.inc]
[manpage_end]







|

118
119
120
121
122
123
124
125
126
[call [cmd ::math::sum] [arg value] [opt [arg {value ...}]]]

Return the sum of one or more numeric values.

[list_end]

[vset CATEGORY math]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/math.test.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

testing {
    useLocal math.tcl math
}

# -------------------------------------------------------------------------







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

testing {
    useLocal math.tcl math
}

# -------------------------------------------------------------------------
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
} [tcltest::wrongNumArgs math::stats {val1 val2 args} 1]
test math-8.3 { simple math::stats } {
     foreach {a b c} [ math::stats 100 100 100 110 ] { break }
     set a [ expr round($a) ]
     set b [ expr round($b) ]
     set c [ expr round($c) ]
     list $a $b $c
} {103 5 5}

test math-9.1 { math::integrate, insufficient data points } {
     catch { math::integrate {1 10 2 20 3 30 4 40} } msg
     set msg
} "at least 5 x,y pairs must be given"
test math-9.2 { simple math::integrate } {
     math::integrate {1 10 2 20 3 30 4 40 5 50 6 60 7 70 8 80 9 90 10 100}







|







214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
} [tcltest::wrongNumArgs math::stats {val1 val2 args} 1]
test math-8.3 { simple math::stats } {
     foreach {a b c} [ math::stats 100 100 100 110 ] { break }
     set a [ expr round($a) ]
     set b [ expr round($b) ]
     set c [ expr round($c) ]
     list $a $b $c
} {102 5 5}

test math-9.1 { math::integrate, insufficient data points } {
     catch { math::integrate {1 10 2 20 3 30 4 40} } msg
     set msg
} "at least 5 x,y pairs must be given"
test math-9.2 { simple math::integrate } {
     math::integrate {1 10 2 20 3 30 4 40 5 50 6 60 7 70 8 80 9 90 10 100}

Changes to modules/math/math_geometry.man.

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
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin math::geometry n 1.4.1]
[keywords angle]
[keywords distance]
[keywords line]
[keywords math]
[keywords {plane geometry}]
[keywords point]
[copyright {2001 by Ideogramic ApS and other parties}]

[copyright {2010 by Andreas Kupries}]
[copyright {2010 by Kevin Kenny}]
[copyright {2018 by Arjen Markus}]
[copyright {2020 by Manfred Rosenberger}]
[moddesc   {Tcl Math Library}]
[titledesc {Geometrical computations}]
[category  Mathematics]
[require Tcl [opt 8.5]]
[require math::geometry [opt 1.4.1]]

[description]
[para]
The [package math::geometry] package is a collection of functions for
computations and manipulations on two-dimensional geometrical objects,
such as points, lines and polygons.

[para]
The geometrical objects are implemented as plain lists of coordinates.
For instance a line is defined by a list of four numbers, the x- and
y-coordinate of a first point and the x- and y-coordinates of a second
point on the line.

[para]
[emph Note:] In version 1.4.0 an inconsistency was repaired - see [uri https://core.tcl-lang.org/tcllib/tktview?name=fb4812f82b].
More in [sectref "COORDINATE SYSTEM"]

[para]
The various types of object are recognised by the number of coordinate
pairs and the context in which they are used: a list of four elements
can be regarded as an infinite line, a finite line segment but also
as a polyline of one segment and a point set of two points.

[para]

|







>


<
<




|













<
<
<
<







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
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin math::geometry n 1.2.2]
[keywords angle]
[keywords distance]
[keywords line]
[keywords math]
[keywords {plane geometry}]
[keywords point]
[copyright {2001 by Ideogramic ApS and other parties}]
[copyright {2004 by Arjen Markus}]
[copyright {2010 by Andreas Kupries}]
[copyright {2010 by Kevin Kenny}]


[moddesc   {Tcl Math Library}]
[titledesc {Geometrical computations}]
[category  Mathematics]
[require Tcl [opt 8.5]]
[require math::geometry [opt 1.2.2]]

[description]
[para]
The [package math::geometry] package is a collection of functions for
computations and manipulations on two-dimensional geometrical objects,
such as points, lines and polygons.

[para]
The geometrical objects are implemented as plain lists of coordinates.
For instance a line is defined by a list of four numbers, the x- and
y-coordinate of a first point and the x- and y-coordinates of a second
point on the line.





[para]
The various types of object are recognised by the number of coordinate
pairs and the context in which they are used: a list of four elements
can be regarded as an infinite line, a finite line segment but also
as a polyline of one segment and a point set of two points.

[para]
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235

236
237
238
239
240
241
242
243
244
245
246
247
248



249
250
251
252
253
254
255
256
257
258
259
260
261

262
263
264
265
266
267
268
269
270
271
272
273
274
275

276
277
278
279
280
281
282
283
284
285
286
287

288
289
290
291
292
293
294
295
296
297
298
299
300

301
302
303
304
305
306
307
308
309
310
311
312

313
314
315
316
317
318
319
320
321
322

323
324
325
326
327
328
329
330
331
332
333
334
335

336
337
338
339
340
341
342
343
344
345
346
347

348
349
350
351
352
353
354
355
356
357
358
359

360
361
362
363
364
365
366
367
368
369
370
371
372
373

374
375
376
377
378
379
380
381
382
383

384
385
386
387
388
389
390
the polyline is closed (if the first and last points do not coincide,
the missing segment is automatically added).

[item]
[emph "point set"] - again a list of an even number of coordinates, but
the points are regarded without any ordering.

[item]
[emph "circle"] - a list of three numbers, the first two are the coordinates of the
centre and the third is the radius.

[list_end]


[section "PROCEDURES"]

The package defines the following public procedures:

[list_begin definitions]

[call [cmd ::math::geometry::+] [arg point1] [arg point2]]

Compute the sum of the two vectors given as points and return it.
The result is a vector as well.


[call [cmd ::math::geometry::-] [arg point1] [arg point2]]

Compute the difference (point1 - point2) of the two vectors
given as points and return it. The result is a vector as well.


[call [cmd ::math::geometry::p] [arg x] [arg y]]

Construct a point from its coordinates and return it as the
result of the command.


[call [cmd ::math::geometry::distance] [arg point1] [arg point2]]

Compute the distance between the two points and return it as the
result of the command. This is in essence the same as

[example {
    math::geometry::length [math::geomtry::- point1 point2]
}]


[call [cmd ::math::geometry::length] [arg point]]

Compute the length of the vector and return it as the
result of the command.


[call [cmd ::math::geometry::s*] [arg factor] [arg point]]

Scale the vector by the factor and return it as the
result of the command. This is a vector as well.


[call [cmd ::math::geometry::direction] [arg angle]]

Given the angle in degrees this command computes and returns
the unit vector pointing into this direction. The vector for
angle == 0 points to the right (east), and for angle == 90 up (north).


[call [cmd ::math::geometry::h] [arg length]]

Returns a horizontal vector on the X-axis of the specified length.
Positive lengths point to the right (east).


[call [cmd ::math::geometry::v] [arg length]]

Returns a vertical vector on the Y-axis of the specified length.
Positive lengths point down (south).


[call [cmd ::math::geometry::between] [arg point1] [arg point2] [arg s]]

Compute the point which is at relative distance [arg s] between the two
points and return it as the result of the command. A relative distance of
[const 0] returns [arg point1], the distance [const 1] returns [arg point2].
Distances < 0 or > 1 extrapolate along the line between the two point.


[call [cmd ::math::geometry::octant] [arg point]]

Compute the octant of the circle the point is in and return it as the result
of the command. The possible results are

[list_begin enum]
[enum] east
[enum] northeast
[enum] north
[enum] northwest
[enum] west
[enum] southwest
[enum] south
[enum] southeast
[list_end]

Each octant is the arc of the circle +/- 22.5 degrees from the cardinal direction
the octant is named for.


[call [cmd ::math::geometry::rect] [arg nw] [arg se]]

Construct a rectangle from its northwest and southeast corners and return
it as the result of the command.


[call [cmd ::math::geometry::nwse] [arg rect]]

Extract the northwest and southeast corners of the rectangle and return
them as the result of the command (a 2-element list containing the
points, in the named order).


[call [cmd ::math::geometry::angle] [arg line]]

Calculate the angle from the positive x-axis to a given line
(in two dimensions only).

[list_begin arguments]
[arg_def list line] Coordinates of the line
[list_end]


[call [cmd ::math::geometry::angleBetween] [arg vector1] [arg vector2]]

Calculate the angle between two vectors (in degrees)

[list_begin arguments]
[arg_def list vector1] First vector
[arg_def list vector2] Second vector
[list_end]


[call [cmd ::math::geometry::inproduct] [arg vector1] [arg vector2]]

Calculate the inner product of two vectors

[list_begin arguments]
[arg_def list vector1] First vector
[arg_def list vector2] Second vector
[list_end]


[call [cmd ::math::geometry::areaParallellogram] [arg vector1] [arg vector2]]

Calculate the area of the parallellogram with the two vectors as its sides

[list_begin arguments]
[arg_def list vector1] First vector
[arg_def list vector2] Second vector
[list_end]


[call [cmd ::math::geometry::calculateDistanceToLine] [arg P] [arg line]]

Calculate the distance of point P to the (infinite) line and return the
result

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list line] List of four numbers, the coordinates of two points
on the line
[list_end]



[call [cmd ::math::geometry::calculateDistanceToLineSegment] [arg P] [arg linesegment]]

Calculate the distance of point P to the (finite) line segment and
return the result.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list linesegment] List of four numbers, the coordinates of the
first and last points of the line segment
[list_end]





[call [cmd ::math::geometry::calculateDistanceToPolyline] [arg P] [arg polyline]]

Calculate the distance of point P to the polyline and
return the result. Note that a polyline needs not to be closed.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list polyline] List of numbers, the coordinates of the
vertices of the polyline
[list_end]



[call [cmd ::math::geometry::calculateDistanceToPolygon] [arg P] [arg polygon]]

Calculate the distance of point P to the polygon and
return the result. If the list of coordinates is not closed (first and last
points differ), it is automatically closed.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list polygon] List of numbers, the coordinates of the
vertices of the polygon
[list_end]



[call [cmd ::math::geometry::findClosestPointOnLine] [arg P] [arg line]]

Return the point on a line which is closest to a given point.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list line] List of four numbers, the coordinates of two points
on the line
[list_end]



[call [cmd ::math::geometry::findClosestPointOnLineSegment] [arg P] [arg linesegment]]

Return the point on a [emph "line segment"] which is closest to a given
point.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list linesegment] List of four numbers, the first and last
points on the line segment
[list_end]



[call [cmd ::math::geometry::findClosestPointOnPolyline] [arg P] [arg polyline]]

Return the point on a [emph "polyline"] which is closest to a given
point.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list polyline] List of numbers, the vertices of the polyline
[list_end]



[call [cmd ::math::geometry::lengthOfPolyline] [arg polyline]]

Return the length of the [emph "polyline"] (note: it not regarded as a
polygon)

[list_begin arguments]
[arg_def list polyline] List of numbers, the vertices of the polyline
[list_end]



[call [cmd ::math::geometry::movePointInDirection] [arg P] [arg direction] [arg dist]]

Move a point over a given distance in a given direction and return the
new coordinates (in two dimensions only).

[list_begin arguments]
[arg_def list P] Coordinates of the point to be moved
[arg_def double direction] Direction (in degrees; 0 is to the right, 90
upwards)
[arg_def list dist] Distance over which to move the point
[list_end]



[call [cmd ::math::geometry::lineSegmentsIntersect] [arg linesegment1] [arg linesegment2]]

Check if two line segments intersect or coincide. Returns 1 if that is
the case, 0 otherwise (in two dimensions only). If an endpoint of one segment lies on
the other segment (or is very close to the segment), they are considered to intersect

[list_begin arguments]
[arg_def list linesegment1] First line segment
[arg_def list linesegment2] Second line segment
[list_end]



[call [cmd ::math::geometry::findLineSegmentIntersection] [arg linesegment1] [arg linesegment2]]

Find the intersection point of two line segments. Return the coordinates
or the keywords "coincident" or "none" if the line segments coincide or
have no points in common (in two dimensions only).

[list_begin arguments]
[arg_def list linesegment1] First line segment
[arg_def list linesegment2] Second line segment
[list_end]



[call [cmd ::math::geometry::findLineIntersection] [arg line1] [arg line2]]

Find the intersection point of two (infinite) lines. Return the coordinates
or the keywords "coincident" or "none" if the lines coincide or
have no points in common (in two dimensions only).

[list_begin arguments]
[arg_def list line1] First line
[arg_def list line2] Second line
[list_end]

See section [sectref References] for details on the algorithm and math behind it.



[call [cmd ::math::geometry::polylinesIntersect] [arg polyline1] [arg polyline2]]

Check if two polylines intersect or not (in two dimensions only).

[list_begin arguments]
[arg_def list polyline1] First polyline
[arg_def list polyline2] Second polyline
[list_end]



[call [cmd ::math::geometry::polylinesBoundingIntersect] [arg polyline1] [arg polyline2] [arg granularity]]

Check whether two polylines intersect, but reduce
the correctness of the result to the given granularity.
Use this for faster, but weaker, intersection checking.
[para]







<
<
<
<

<












<





<




<










<




<






<




|
<






<




<







<




















<




<






<










|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













>













>
>
>













>














>












>













>












>










>













>












>












>














>










>







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
89
90
91
92
93
94
95
96
97

98
99
100
101

102
103
104
105
106
107

108
109
110
111
112

113
114
115
116
117
118

119
120
121
122

123
124
125
126
127
128
129

130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149

150
151
152
153

154
155
156
157
158
159

160
161
162
163
164
165
166
167
168
169
170





























171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
the polyline is closed (if the first and last points do not coincide,
the missing segment is automatically added).

[item]
[emph "point set"] - again a list of an even number of coordinates, but
the points are regarded without any ordering.





[list_end]


[section "PROCEDURES"]

The package defines the following public procedures:

[list_begin definitions]

[call [cmd ::math::geometry::+] [arg point1] [arg point2]]

Compute the sum of the two vectors given as points and return it.
The result is a vector as well.


[call [cmd ::math::geometry::-] [arg point1] [arg point2]]

Compute the difference (point1 - point2) of the two vectors
given as points and return it. The result is a vector as well.


[call [cmd ::math::geometry::p] [arg x] [arg y]]

Construct a point from its coordinates and return it as the
result of the command.


[call [cmd ::math::geometry::distance] [arg point1] [arg point2]]

Compute the distance between the two points and return it as the
result of the command. This is in essence the same as

[example {
    math::geometry::length [math::geomtry::- point1 point2]
}]


[call [cmd ::math::geometry::length] [arg point]]

Compute the length of the vector and return it as the
result of the command.


[call [cmd ::math::geometry::s*] [arg factor] [arg point]]

Scale the vector by the factor and return it as the
result of the command. This is a vector as well.


[call [cmd ::math::geometry::direction] [arg angle]]

Given the angle in degrees this command computes and returns
the unit vector pointing into this direction. The vector for
angle == 0 points to the right (up), and for angle == 90 up (north).


[call [cmd ::math::geometry::h] [arg length]]

Returns a horizontal vector on the X-axis of the specified length.
Positive lengths point to the right (east).


[call [cmd ::math::geometry::v] [arg length]]

Returns a vertical vector on the Y-axis of the specified length.
Positive lengths point down (south).


[call [cmd ::math::geometry::between] [arg point1] [arg point2] [arg s]]

Compute the point which is at relative distance [arg s] between the two
points and return it as the result of the command. A relative distance of
[const 0] returns [arg point1], the distance [const 1] returns [arg point2].
Distances < 0 or > 1 extrapolate along the line between the two point.


[call [cmd ::math::geometry::octant] [arg point]]

Compute the octant of the circle the point is in and return it as the result
of the command. The possible results are

[list_begin enum]
[enum] east
[enum] northeast
[enum] north
[enum] northwest
[enum] west
[enum] southwest
[enum] south
[enum] southeast
[list_end]

Each octant is the arc of the circle +/- 22.5 degrees from the cardinal direction
the octant is named for.


[call [cmd ::math::geometry::rect] [arg nw] [arg se]]

Construct a rectangle from its northwest and southeast corners and return
it as the result of the command.


[call [cmd ::math::geometry::nwse] [arg rect]]

Extract the northwest and southeast corners of the rectangle and return
them as the result of the command (a 2-element list containing the
points, in the named order).


[call [cmd ::math::geometry::angle] [arg line]]

Calculate the angle from the positive x-axis to a given line
(in two dimensions only).

[list_begin arguments]
[arg_def list line] Coordinates of the line
[list_end]

[para]






























[call [cmd ::math::geometry::calculateDistanceToLine] [arg P] [arg line]]

Calculate the distance of point P to the (infinite) line and return the
result

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list line] List of four numbers, the coordinates of two points
on the line
[list_end]

[para]

[call [cmd ::math::geometry::calculateDistanceToLineSegment] [arg P] [arg linesegment]]

Calculate the distance of point P to the (finite) line segment and
return the result.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list linesegment] List of four numbers, the coordinates of the
first and last points of the line segment
[list_end]

[para]

[para]

[call [cmd ::math::geometry::calculateDistanceToPolyline] [arg P] [arg polyline]]

Calculate the distance of point P to the polyline and
return the result. Note that a polyline needs not to be closed.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list polyline] List of numbers, the coordinates of the
vertices of the polyline
[list_end]

[para]

[call [cmd ::math::geometry::calculateDistanceToPolygon] [arg P] [arg polygon]]

Calculate the distance of point P to the polygon and
return the result. If the list of coordinates is not closed (first and last
points differ), it is automatically closed.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list polygon] List of numbers, the coordinates of the
vertices of the polygon
[list_end]

[para]

[call [cmd ::math::geometry::findClosestPointOnLine] [arg P] [arg line]]

Return the point on a line which is closest to a given point.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list line] List of four numbers, the coordinates of two points
on the line
[list_end]

[para]

[call [cmd ::math::geometry::findClosestPointOnLineSegment] [arg P] [arg linesegment]]

Return the point on a [emph "line segment"] which is closest to a given
point.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list linesegment] List of four numbers, the first and last
points on the line segment
[list_end]

[para]

[call [cmd ::math::geometry::findClosestPointOnPolyline] [arg P] [arg polyline]]

Return the point on a [emph "polyline"] which is closest to a given
point.

[list_begin arguments]
[arg_def list P] List of two numbers, the coordinates of the point

[arg_def list polyline] List of numbers, the vertices of the polyline
[list_end]

[para]

[call [cmd ::math::geometry::lengthOfPolyline] [arg polyline]]

Return the length of the [emph "polyline"] (note: it not regarded as a
polygon)

[list_begin arguments]
[arg_def list polyline] List of numbers, the vertices of the polyline
[list_end]

[para]

[call [cmd ::math::geometry::movePointInDirection] [arg P] [arg direction] [arg dist]]

Move a point over a given distance in a given direction and return the
new coordinates (in two dimensions only).

[list_begin arguments]
[arg_def list P] Coordinates of the point to be moved
[arg_def double direction] Direction (in degrees; 0 is to the right, 90
upwards)
[arg_def list dist] Distance over which to move the point
[list_end]

[para]

[call [cmd ::math::geometry::lineSegmentsIntersect] [arg linesegment1] [arg linesegment2]]

Check if two line segments intersect or coincide. Returns 1 if that is
the case, 0 otherwise (in two dimensions only). If an endpoint of one segment lies on
the other segment (or is very close to the segment), they are considered to intersect

[list_begin arguments]
[arg_def list linesegment1] First line segment
[arg_def list linesegment2] Second line segment
[list_end]

[para]

[call [cmd ::math::geometry::findLineSegmentIntersection] [arg linesegment1] [arg linesegment2]]

Find the intersection point of two line segments. Return the coordinates
or the keywords "coincident" or "none" if the line segments coincide or
have no points in common (in two dimensions only).

[list_begin arguments]
[arg_def list linesegment1] First line segment
[arg_def list linesegment2] Second line segment
[list_end]

[para]

[call [cmd ::math::geometry::findLineIntersection] [arg line1] [arg line2]]

Find the intersection point of two (infinite) lines. Return the coordinates
or the keywords "coincident" or "none" if the lines coincide or
have no points in common (in two dimensions only).

[list_begin arguments]
[arg_def list line1] First line
[arg_def list line2] Second line
[list_end]

See section [sectref References] for details on the algorithm and math behind it.

[para]

[call [cmd ::math::geometry::polylinesIntersect] [arg polyline1] [arg polyline2]]

Check if two polylines intersect or not (in two dimensions only).

[list_begin arguments]
[arg_def list polyline1] First polyline
[arg_def list polyline2] Second polyline
[list_end]

[para]

[call [cmd ::math::geometry::polylinesBoundingIntersect] [arg polyline1] [arg polyline2] [arg granularity]]

Check whether two polylines intersect, but reduce
the correctness of the result to the given granularity.
Use this for faster, but weaker, intersection checking.
[para]
399
400
401
402
403
404
405

406
407
408
409
410
411
412
413
414
415
416

417
418
419
420
421
422
423
424
425
426
427
428
429

430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516

517
518
519
520
521
522
523
524
525
526
527
528
529
530

531
532
533
534
535
536
537
538
539
540
541
542
543
544

545
546
547
548
549
550
551
552
553

554
555
556
557
558
559
560
561
562
563

564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595

596
597
598
599
600
601
602
603
604

605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
[arg_def list polyline1] First polyline
[arg_def list polyline2] Second polyline
[arg_def int granularity] Number of points in each part (<=1 means check
every edge)

[list_end]



[call [cmd ::math::geometry::intervalsOverlap] [arg y1] [arg y2] [arg y3] [arg y4] [arg strict]]

Check if two intervals overlap.

[list_begin arguments]
[arg_def double y1,y2] Begin and end of first interval
[arg_def double y3,y4] Begin and end of second interval
[arg_def logical strict] Check for strict or non-strict overlap
[list_end]



[call [cmd ::math::geometry::rectanglesOverlap] [arg P1] [arg P2] [arg Q1] [arg Q2] [arg strict]]

Check if two rectangles overlap.

[list_begin arguments]
[arg_def list P1] upper-left corner of the first rectangle
[arg_def list P2] lower-right corner of the first rectangle
[arg_def list Q1] upper-left corner of the second rectangle
[arg_def list Q2] lower-right corner of the second rectangle
[arg_def list strict] choosing strict or non-strict interpretation
[list_end]



[call [cmd ::math::geometry::bbox] [arg polyline]]

Calculate the bounding box of a polyline. Returns a list of four
coordinates: the upper-left and the lower-right corner of the box.

[list_begin arguments]
[arg_def list polyline] The polyline to be examined
[list_end]


[call [cmd ::math::geometry::overlapBBox] [arg polyline1] [arg polyline2] [opt strict]]

Check if the bounding boxes of two polylines overlap or not.
[para]
Arguments:
[list_begin arguments]
[arg_def list polyline1] The first polyline
[arg_def list polyline1] The second polyline
[arg_def int strict] Whether strict overlap is to checked (1) or if the bounding boxes may touch (0, default)
[list_end]


[call [cmd ::math::geometry::pointInsideBBox] [arg bbox] [arg point]]
[para]
Check if the point is inside or on the bounding box or not.

Arguments:
[list_begin arguments]
[arg_def list bbox] The bounding box given as a list of x/y coordinates
[arg_def list point] The point to be checked
[list_end]


[call [cmd ::math::geometry::cathetusPoint] [arg pa] [arg pb] [arg cathetusLength] [opt location]]

Return the third point of the rectangular triangle defined by the two given end points of the hypothenusa.
The triangle's side from point A (or B, if the location is given as "b") to the third point is the cathetus length.

If the cathetus' length is lower than the length of the hypothenusa, an empty list is returned.
[para]
Arguments:
[list_begin arguments]
[arg_def list pa] The starting point on hypotenuse
[arg_def list pb] The ending point on hypotenuse
[arg_def float cathetusLength] The length of the cathetus of the triangle
[arg_def string location] The location of the given cathetus,
"a" means given cathetus shares point pa (default)
"b" means given cathetus shares point pb
[list_end]


[call [cmd ::math::geometry::parallel] [arg line] [arg offset] [opt orient]]

Return a line parallel to the given line, with a distance "offset". The orientation is determined by the
two points defining the line.
[para]
Arguments:
[list_begin arguments]
[arg_def list line] The given line
[arg_def float offset] The distance to the given line
[arg_def string orient] Orientation of the new line with respect to the given line (defaults to "right")
[list_end]
[para]

[call [cmd ::math::geometry::unitVector] [arg line]]

Return a unit vector from the given line or direction, if the [term line] argument is
a single point (then a line through the origin is assumed)

Arguments:
[list_begin arguments]
[arg_def list line] The line in question (or a single point, implying a line through the origin)
[list_end]


[call [cmd ::math::geometry::pointInsidePolygon] [arg P] [arg polyline]]

Determine if a point is completely inside a polygon. If the point
touches the polygon, then the point is not completely inside the
polygon.

[list_begin arguments]
[arg_def list P] Coordinates of the point
[arg_def list polyline] The polyline to be examined
[list_end]



[call [cmd ::math::geometry::pointInsidePolygonAlt] [arg P] [arg polyline]]

Determine if a point is completely inside a polygon. If the point
touches the polygon, then the point is not completely inside the
polygon. [emph Note:] this alternative procedure uses the so-called
winding number to determine this. It handles self-intersecting polygons
in a "natural" way.

[list_begin arguments]
[arg_def list P] Coordinates of the point
[arg_def list polyline] The polyline to be examined
[list_end]



[call [cmd ::math::geometry::rectangleInsidePolygon] [arg P1] [arg P2] [arg polyline]]

Determine if a rectangle is completely inside a polygon. If polygon
touches the rectangle, then the rectangle is not complete inside the
polygon.

[list_begin arguments]
[arg_def list P1] Upper-left corner of the rectangle
[arg_def list P2] Lower-right corner of the rectangle
[para]
[arg_def list polygon] The polygon in question
[list_end]



[call [cmd ::math::geometry::areaPolygon] [arg polygon]]

Calculate the area of a polygon.

[list_begin arguments]
[arg_def list polygon] The polygon in question
[list_end]



[call [cmd ::math::geometry::translate] [arg vector] [arg polyline]]

Translate a polyline over a given vector

[list_begin arguments]
[arg_def list vector]   Translation vector
[arg_def list polyline] The polyline to be translated
[list_end]



[call [cmd ::math::geometry::rotate] [arg angle] [arg polyline]]

Rotate a polyline over a given angle (degrees) around the origin

[list_begin arguments]
[arg_def list angle]    Angle over which to rotate the polyline (degrees)
[arg_def list polyline] The polyline to be rotated
[list_end]


[call [cmd ::math::geometry::rotateAbout] [arg p] [arg angle] [arg polyline]]

Rotate a polyline around a given point p and return the new polyline.
[para]
Arguments:
[list_begin arguments]
[arg_def list p] The point of rotation
[arg_def float angle] The angle over which to rotate the polyline (degrees)
[arg_def list polyline] The polyline to be rotated
[list_end]


[call [cmd ::math::geometry::reflect] [arg angle] [arg polyline]]

Reflect a polyline in a line through the origin at a given angle (degrees) to the x-axis

[list_begin arguments]
[arg_def list angle]    Angle of the line of reflection (degrees)
[arg_def list polyline] The polyline to be reflected
[list_end]



[call [cmd ::math::geometry::degToRad] [arg angle]]

Convert from degrees to radians

[list_begin arguments]
[arg_def list angle]    Angle in degrees
[list_end]



[call [cmd ::math::geometry::radToDeg] [arg angle]]

Convert from radians to degrees

[list_begin arguments]
[arg_def list angle]    Angle in radians
[list_end]


[call [cmd ::math::geometry::circle] [arg centre] [arg radius]]

Convenience procedure to create a circle from a point and a radius.

[list_begin arguments]
[arg_def list centre]    Coordinates of the circle centre
[arg_def list radius]    Radius of the circle
[list_end]


[call [cmd ::math::geometry::circleTwoPoints] [arg point1] [arg point2]]

Convenience procedure to create a circle from two points on its circumference
The centre is the point between the two given points, the radius is half the
distance between them.

[list_begin arguments]
[arg_def list point1]    First point
[arg_def list point2]    Second point
[list_end]


[call [cmd ::math::geometry::pointInsideCircle] [arg point] [arg circle]]

Determine if the given point is inside the circle or on the circumference (1)
or outside (0).

[list_begin arguments]
[arg_def list point]     Point to be checked
[arg_def list circle]    Circle that may or may not contain the point
[list_end]


[call [cmd ::math::geometry::lineIntersectsCircle] [arg line] [arg circle]]

Determine if the given line intersects the circle or touches it (1)
or does not (0).

[list_begin arguments]
[arg_def list line]      Line to be checked
[arg_def list circle]    Circle that may or may not be intersected
[list_end]


[call [cmd ::math::geometry::lineSegmentIntersectsCircle] [arg segment] [arg circle]]

Determine if the given line segment intersects the circle or touches it (1)
or does not (0).

[list_begin arguments]
[arg_def list segment]   Line segment to be checked
[arg_def list circle]    Circle that may or may not be intersected
[list_end]


[call [cmd ::math::geometry::intersectionLineWithCircle] [arg line] [arg circle]]

Determine the points at which the given line intersects the circle. There can
be zero, one or two points. (If the line touches the circle or is close to it,
then one point is returned. An arbitrary margin of 1.0e-10 times the radius
is used to determine this situation.)

[list_begin arguments]
[arg_def list line]      Line to be checked
[arg_def list circle]    Circle that may or may not be intersected
[list_end]


[call [cmd ::math::geometry::intersectionCircleWithCircle] [arg circle1] [arg circle2]]

Determine the points at which the given two circles intersect. There can
be zero, one or two points. (If the two circles touch the circle or are very close,
then one point is returned. An arbitrary margin of 1.0e-10 times the mean of the radii of
the two circles is used to determine this situation.)

[list_begin arguments]
[arg_def list circle1]    First circle
[arg_def list circle2]    Second circle
[list_end]


[call [cmd ::math::geometry::tangentLinesToCircle] [arg point] [arg circle]]

Determine the tangent lines from the given point to the circle. There can
be zero, one or two lines. (If the point is on the cirucmference or very close to
the circle, then one line is returned. An arbitrary margin of 1.0e-10 times the
radius of the circle is used to determine this situation.)

[list_begin arguments]
[arg_def list point]      Point in question
[arg_def list circle]     Circle to which the tangent lines are to be determined
[list_end]


[call [cmd ::math::geometry::intersectionPolylines] [arg polyline1] [arg polyline2] [opt mode] [opt granularity]]

Return the first point or all points where the two polylines intersect. If the number of points in the polylines is large,
you can use the granularity to get an approximate answer faster.
[para]
Arguments:
[list_begin arguments]
[arg_def list polyline1] The first polyline
[arg_def list polyline2] The second polyline
[arg_def string mode] Whether to return only the first (default) or to return all intersection points ("all")
[arg_def int granularity] The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
[list_end]


[call [cmd ::math::geometry::intersectionPolylineCircle] [arg polyline] [arg circle] [opt mode] [opt granularity]]

Return the first point or all points where the polyline intersects the circle. If the number of points in the polyline is large,
you can use the granularity to get an approximate answer faster.
[para]
Arguments:
[list_begin arguments]
[arg_def list polyline] The polyline that may intersect the circle
[arg_def list circle] The circle in question
[arg_def string mode] Whether to return only the first (default) or to return all intersection points ("all")
[arg_def int granularity] The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
[list_end]


[call [cmd ::math::geometry::polylineCutOrigin] [arg polyline1] [arg polyline2] [opt granularity]]

Return the part of the first polyline from the origin up to the first intersection with the second. If the number of points in the polyline is large,
you can use the granularity to get an approximate answer faster.
[para]
Arguments:
[list_begin arguments]
[arg_def list polyline1] The first polyline (from which a part is to be returned)
[arg_def list polyline2] The second polyline
[arg_def int granularity] The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
[list_end]


[call [cmd ::math::geometry::polylineCutEnd] [arg polyline1] [arg polyline2] [opt granularity]]

Return the part of the first polyline from the last intersection point with the second to the end. If the number of points in the polyline is large,
you can use the granularity to get an approximate answer faster.
[para]
Arguments:
[list_begin arguments]
[arg_def list polyline1] The first polyline (from which a part is to be returned)
[arg_def list polyline2] The second polyline
[arg_def int granularity] The number of points that will be skipped plus 1 in the search for intersection points (1 or smaller means an exact answer is returned)
[list_end]


[call [cmd ::math::geometry::splitPolyline] [arg polyline] [arg numberVertex]]

Split the poyline into a set of polylines where each separate polyline holds "numberVertex" vertices between the two end points.
[para]
Arguments:
[list_begin arguments]
[arg_def list polyline] The polyline to be split up
[arg_def int numberVertex] The number of "internal" vertices
[list_end]


[call [cmd ::math::geometry::enrichPolyline] [arg polyline] [arg accuracy]]

Split up each segment of a polyline into a number of smaller segments and return the result.
[para]
Arguments:
[list_begin arguments]
[arg_def list polyline] The polyline to be refined
[arg_def int accuracy] The number of subsegments to be created
[list_end]


[call [cmd ::math::geometry::cleanupPolyline] [arg polyline]]

Remove duplicate neighbouring vertices and return the result.
[para]
Arguments:
[list_begin arguments]
[arg_def list polyline] The polyline to be cleaned up
[list_end]

[list_end]


[section "COORDINATE SYSTEM"]
The coordinate system used by the package is the ordinary cartesian system, where the
positive x-axis is directed to the right and the positive y-axis is directed upwards.
Angles and directions are defined with respect to the positive x-axis in a counter-clockwise
direction, so that an angle of 90 degrees is the direction of the positive y-axis.

Note that the Tk canvas coordinates differ from this, as there the origin is located in the
upper left corner of the window. Up to and including version 1.3, the direction and octant
procedures of this package used this convention inconsistently.


[section References]

[list_begin enumerated]
[enum] [uri http:/wiki.tcl.tk/12070 {Polygon Intersection}]
[enum] [uri http://en.wikipedia.org/wiki/Line-line_intersection]
[enum] [uri http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/]
[list_end]

[vset CATEGORY {math :: geometry}]
[include ../common-text/feedback.inc]
[manpage_end]







>











>













>










<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












>














>














>









>







|


>







|


<
<
<
<

<
<
<
<
<
<
<










>









>









<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










|

362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405




406




























































407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480




481







482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511








512
























































































































































































513
514
515
516
517
518
519
520
521
522
523
524
[arg_def list polyline1] First polyline
[arg_def list polyline2] Second polyline
[arg_def int granularity] Number of points in each part (<=1 means check
every edge)

[list_end]

[para]

[call [cmd ::math::geometry::intervalsOverlap] [arg y1] [arg y2] [arg y3] [arg y4] [arg strict]]

Check if two intervals overlap.

[list_begin arguments]
[arg_def double y1,y2] Begin and end of first interval
[arg_def double y3,y4] Begin and end of second interval
[arg_def logical strict] Check for strict or non-strict overlap
[list_end]

[para]

[call [cmd ::math::geometry::rectanglesOverlap] [arg P1] [arg P2] [arg Q1] [arg Q2] [arg strict]]

Check if two rectangles overlap.

[list_begin arguments]
[arg_def list P1] upper-left corner of the first rectangle
[arg_def list P2] lower-right corner of the first rectangle
[arg_def list Q1] upper-left corner of the second rectangle
[arg_def list Q2] lower-right corner of the second rectangle
[arg_def list strict] choosing strict or non-strict interpretation
[list_end]

[para]

[call [cmd ::math::geometry::bbox] [arg polyline]]

Calculate the bounding box of a polyline. Returns a list of four
coordinates: the upper-left and the lower-right corner of the box.

[list_begin arguments]
[arg_def list polyline] The polyline to be examined
[list_end]





[para]





























































[call [cmd ::math::geometry::pointInsidePolygon] [arg P] [arg polyline]]

Determine if a point is completely inside a polygon. If the point
touches the polygon, then the point is not completely inside the
polygon.

[list_begin arguments]
[arg_def list P] Coordinates of the point
[arg_def list polyline] The polyline to be examined
[list_end]

[para]

[call [cmd ::math::geometry::pointInsidePolygonAlt] [arg P] [arg polyline]]

Determine if a point is completely inside a polygon. If the point
touches the polygon, then the point is not completely inside the
polygon. [emph Note:] this alternative procedure uses the so-called
winding number to determine this. It handles self-intersecting polygons
in a "natural" way.

[list_begin arguments]
[arg_def list P] Coordinates of the point
[arg_def list polyline] The polyline to be examined
[list_end]

[para]

[call [cmd ::math::geometry::rectangleInsidePolygon] [arg P1] [arg P2] [arg polyline]]

Determine if a rectangle is completely inside a polygon. If polygon
touches the rectangle, then the rectangle is not complete inside the
polygon.

[list_begin arguments]
[arg_def list P1] Upper-left corner of the rectangle
[arg_def list P2] Lower-right corner of the rectangle
[para]
[arg_def list polygon] The polygon in question
[list_end]

[para]

[call [cmd ::math::geometry::areaPolygon] [arg polygon]]

Calculate the area of a polygon.

[list_begin arguments]
[arg_def list polygon] The polygon in question
[list_end]

[para]

[call [cmd ::math::geometry::translate] [arg vector] [arg polyline]]

Translate a polyline over a given vector

[list_begin arguments]
[arg_def list vector]   Translation vector
[arg_def list polyline] The polyline to be rotated
[list_end]

[para]

[call [cmd ::math::geometry::rotate] [arg angle] [arg polyline]]

Rotate a polyline over a given angle (degrees) around the origin

[list_begin arguments]
[arg_def list angle]    Angle over which to rotate the polyline (degrees)
[arg_def list polyline] The polyline to be translated
[list_end]





[para]








[call [cmd ::math::geometry::reflect] [arg angle] [arg polyline]]

Reflect a polyline in a line through the origin at a given angle (degrees) to the x-axis

[list_begin arguments]
[arg_def list angle]    Angle of the line of reflection (degrees)
[arg_def list polyline] The polyline to be reflected
[list_end]

[para]

[call [cmd ::math::geometry::degToRad] [arg angle]]

Convert from degrees to radians

[list_begin arguments]
[arg_def list angle]    Angle in degrees
[list_end]

[para]

[call [cmd ::math::geometry::radToDeg] [arg angle]]

Convert from radians to degrees

[list_begin arguments]
[arg_def list angle]    Angle in radians
[list_end]









[list_end]

























































































































































































[section References]

[list_begin enumerated]
[enum] [uri http:/wiki.tcl.tk/12070 {Polygon Intersection}]
[enum] [uri http://en.wikipedia.org/wiki/Line-line_intersection]
[enum] [uri http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/]
[list_end]

[vset CATEGORY {math :: geometry}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/misc.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# math.tcl --
#
#	Collection of math functions.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: misc.tcl,v 1.6 2005/10/10 14:02:47 arjenmarkus Exp $

package require Tcl 8.2		;# uses [lindex $l end-$integer]
namespace eval ::math {
}

# ::math::cov --








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# math.tcl --
#
#	Collection of math functions.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: misc.tcl,v 1.6 2005/10/10 14:02:47 arjenmarkus Exp $

package require Tcl 8.2		;# uses [lindex $l end-$integer]
namespace eval ::math {
}

# ::math::cov --
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
        set sum [ expr { $sum+$val } ]
     }
     set mean [ expr { $sum/$N } ]
     set sigma_sq 0
     foreach val [ concat $val1 $val2 $args ] {
        set sigma_sq [ expr { $sigma_sq+pow(($val-$mean),2) } ]
     }
     set sigma_sq [ expr { $sigma_sq/($N-1) } ]
     set sigma [ expr { sqrt($sigma_sq) } ]
     if { $mean != 0.0 } {
        set cov [ expr { ($sigma/$mean)*100 } ]
     } else {
        return -code error -errorinfo "Cov undefined for data with zero mean" -errorcode {ARITH DOMAIN}
     }
     set cov
}








|

|







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
        set sum [ expr { $sum+$val } ]
     }
     set mean [ expr { $sum/$N } ]
     set sigma_sq 0
     foreach val [ concat $val1 $val2 $args ] {
        set sigma_sq [ expr { $sigma_sq+pow(($val-$mean),2) } ]
     }
     set sigma_sq [ expr { $sigma_sq/($N-1) } ] 
     set sigma [ expr { sqrt($sigma_sq) } ]
     if { $mean != 0.0 } { 
        set cov [ expr { ($sigma/$mean)*100 } ]
     } else {
        return -code error -errorinfo "Cov undefined for data with zero mean" -errorcode {ARITH DOMAIN}
     }
     set cov
}

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
	return $prev1
    }
}

# ::math::integrate --
#
#	calculate the area under a curve defined by a set of (x,y) data pairs.
#	the x data must increase monotonically throughout the data set for the
#	calculation to be meaningful, therefore the monotonic condition is
#	tested, and an error is thrown if the x value is found to be
#	decreasing.
#
# Arguments:
#	xy_pairs	list of x y pairs (eg, 0 0 10 10 20 20 ...); at least 5
#			data pairs are required, and if the number of data
#			pairs is even, a padding value of (x0, 0) will be
#			added.
#
# Results:
#	result		A two-element list consisting of the area and error
#			bound (calculation is "Simpson's rule")

proc ::math::integrate { xy_pairs } {

     set length [ llength $xy_pairs ]

     if { $length < 10 } {
        return -code error "at least 5 x,y pairs must be given"
     }

     ;## are we dealing with x,y pairs?
     if { [ expr {$length % 2} ] } {
        return -code error "unmatched xy pair in input"
     }

     ;## are there an even number of pairs?  Augment.
     if { ! [ expr {$length % 4} ] } {
        set xy_pairs [ concat [ lindex $xy_pairs 0 ] 0 $xy_pairs ]
     }
     set x0   [ lindex $xy_pairs 0     ]
     set x1   [ lindex $xy_pairs 2     ]
     set xn   [ lindex $xy_pairs end-1 ]
     set xnminus1 [ lindex $xy_pairs end-3 ]

     if { $x1 < $x0 } {
        return -code error "monotonicity broken by x1"
     }

     if { $xn < $xnminus1 } {
        return -code error "monotonicity broken by xn"
     }

     ;## handle the assymetrical elements 0, n, and n-1.
     set sum [ expr {[ lindex $xy_pairs 1 ] + [ lindex $xy_pairs end ]} ]
     set sum [ expr {$sum + (4*[ lindex $xy_pairs end-2 ])} ]

     set data [ lrange $xy_pairs 2 end-4 ]

     set xmax $x1
     set i 1
     foreach {x1 y1 x2 y2} $data {
        incr i
        if { $x1 < $xmax } {
           return -code error "monotonicity broken by x$i"
        }
        set xmax $x1
        incr i
        if { $x2 < $xmax } {
           return -code error "monotonicity broken by x$i"
        }
        set xmax $x2
        set sum [ expr {$sum + (4*$y1) + (2*$y2)} ]
     }

     if { $xmax > $xnminus1 } {
        return -code error "monotonicity broken by xn-1"
     }

     set h [ expr { ( $xn - $x0 ) / $i } ]
     set area [ expr { ( $h / 3.0 ) * $sum } ]
     set err_bound  [ expr { ( ( $xn - $x0 ) / 180.0 ) * pow($h,4) * $xn } ]
     return [ list $area $err_bound ]
}

# ::math::max --
#
#	Return the maximum of two or more values
#







|









|





|

|


|
|




|








|






|
|





|














|
|


|
|


|







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
	return $prev1
    }
}

# ::math::integrate --
#
#	calculate the area under a curve defined by a set of (x,y) data pairs.
#	the x data must increase monotonically throughout the data set for the 
#	calculation to be meaningful, therefore the monotonic condition is
#	tested, and an error is thrown if the x value is found to be
#	decreasing.
#
# Arguments:
#	xy_pairs	list of x y pairs (eg, 0 0 10 10 20 20 ...); at least 5
#			data pairs are required, and if the number of data
#			pairs is even, a padding value of (x0, 0) will be
#			added.
# 
# Results:
#	result		A two-element list consisting of the area and error
#			bound (calculation is "Simpson's rule")

proc ::math::integrate { xy_pairs } {
     
     set length [ llength $xy_pairs ]
     
     if { $length < 10 } {
        return -code error "at least 5 x,y pairs must be given"
     }   
     
     ;## are we dealing with x,y pairs?
     if { [ expr {$length % 2} ] } {
        return -code error "unmatched xy pair in input"
     }
     
     ;## are there an even number of pairs?  Augment.
     if { ! [ expr {$length % 4} ] } {
        set xy_pairs [ concat [ lindex $xy_pairs 0 ] 0 $xy_pairs ]
     }
     set x0   [ lindex $xy_pairs 0     ]
     set x1   [ lindex $xy_pairs 2     ]
     set xn   [ lindex $xy_pairs end-1 ]
     set xnminus1 [ lindex $xy_pairs end-3 ]
    
     if { $x1 < $x0 } {
        return -code error "monotonicity broken by x1"
     }

     if { $xn < $xnminus1 } {
        return -code error "monotonicity broken by xn"
     }   
     
     ;## handle the assymetrical elements 0, n, and n-1.
     set sum [ expr {[ lindex $xy_pairs 1 ] + [ lindex $xy_pairs end ]} ]
     set sum [ expr {$sum + (4*[ lindex $xy_pairs end-2 ])} ]

     set data [ lrange $xy_pairs 2 end-4 ]
     
     set xmax $x1
     set i 1
     foreach {x1 y1 x2 y2} $data {
        incr i
        if { $x1 < $xmax } {
           return -code error "monotonicity broken by x$i"
        }
        set xmax $x1
        incr i
        if { $x2 < $xmax } {
           return -code error "monotonicity broken by x$i"
        }
        set xmax $x2
        set sum [ expr {$sum + (4*$y1) + (2*$y2)} ]
     }   
     
     if { $xmax > $xnminus1 } {
        return -code error "monotonicity broken by xn-1"
     }   
    
     set h [ expr { ( $xn - $x0 ) / $i } ]
     set area [ expr { ( $h / 3.0 ) * $sum } ]
     set err_bound  [ expr { ( ( $xn - $x0 ) / 180.0 ) * pow($h,4) * $xn } ]  
     return [ list $area $err_bound ]
}

# ::math::max --
#
#	Return the maximum of two or more values
#
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
        set sum [ expr { $sum+$val } ]
     }
     set mean [ expr { $sum/$N } ]
     set sigma_sq 0
     foreach val [ concat $val1 $val2 $args ] {
        set sigma_sq [ expr { $sigma_sq+pow(($val-$mean),2) } ]
     }
     set sigma_sq [ expr { $sigma_sq/($N-1) } ]
     set sigma [ expr { sqrt($sigma_sq) } ]
     set sigma
}

# ::math::stats --
#
#	Return the mean, standard deviation, and coefficient of variation as
#	percent, as a list.
#
# Arguments:
#	val1	first value
#	val2	first value
#	args	all other values
#
# Results:
#	{mean stddev coefvar}

proc ::math::stats {val1 val2 args} {
     set sum [ expr { $val1+$val2 } ]
     set N [ expr { [ llength $args ] + 2 } ]
     foreach val $args {
        set sum [ expr { $sum+$val } ]
     }
     set mean [ expr { $sum/double($N) } ]
     set sigma_sq 0
     foreach val [ concat $val1 $val2 $args ] {
        set sigma_sq [ expr { $sigma_sq+pow(($val-$mean),2) } ]
     }
     set sigma_sq [ expr { $sigma_sq/double($N-1) } ]
     set sigma [ expr { sqrt($sigma_sq) } ]
     set cov [ expr { ($sigma/$mean)*100 } ]
     return [ list $mean $sigma $cov ]
}

# ::math::sum --
#







|


|




















|




|







281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
        set sum [ expr { $sum+$val } ]
     }
     set mean [ expr { $sum/$N } ]
     set sigma_sq 0
     foreach val [ concat $val1 $val2 $args ] {
        set sigma_sq [ expr { $sigma_sq+pow(($val-$mean),2) } ]
     }
     set sigma_sq [ expr { $sigma_sq/($N-1) } ] 
     set sigma [ expr { sqrt($sigma_sq) } ]
     set sigma
}     

# ::math::stats --
#
#	Return the mean, standard deviation, and coefficient of variation as
#	percent, as a list.
#
# Arguments:
#	val1	first value
#	val2	first value
#	args	all other values
#
# Results:
#	{mean stddev coefvar}

proc ::math::stats {val1 val2 args} {
     set sum [ expr { $val1+$val2 } ]
     set N [ expr { [ llength $args ] + 2 } ]
     foreach val $args {
        set sum [ expr { $sum+$val } ]
     }
     set mean [ expr { $sum/$N } ]
     set sigma_sq 0
     foreach val [ concat $val1 $val2 $args ] {
        set sigma_sq [ expr { $sigma_sq+pow(($val-$mean),2) } ]
     }
     set sigma_sq [ expr { $sigma_sq/($N-1) } ] 
     set sigma [ expr { sqrt($sigma_sq) } ]
     set cov [ expr { ($sigma/$mean)*100 } ]
     return [ list $mean $sigma $cov ]
}

# ::math::sum --
#

Changes to modules/math/mvlinreg.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# mvreglin.tcl --
#     Addition to the statistics package
#     Copyright 2007 Eric Kemp-Benedict
#     Released under the BSD license under any terms
#     that allow it to be compatible with tcllib

package require math::linearalgebra 1.1.1

# ::math::statistics --
#     This file adds:
#     mvlinreg = Multivariate Linear Regression
#
namespace eval ::math::statistics {
    variable epsilon 1.0e-7






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# mvreglin.tcl --
#     Addition to the statistics package
#     Copyright 2007 Eric Kemp-Benedict
#     Released under the BSD license under any terms
#     that allow it to be compatible with tcllib

package require math::linearalgebra 1.0

# ::math::statistics --
#     This file adds:
#     mvlinreg = Multivariate Linear Regression
#
namespace eval ::math::statistics {
    variable epsilon 1.0e-7
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
    set sstot 0.0
    set ssreg 0.0
    # Note: Relying on representation of Vector as a list for y, yhat
    foreach yval $y wt $w yhatval $yhat {
        set sstot [expr {$sstot + $wt * ($yval - $ymean) * ($yval - $ymean)}]
        set ssreg [expr {$ssreg + $wt * ($yhatval - $ymean) * ($yhatval - $ymean)}]
    }
    if { $sstot != 0.0 } {
        set r2 [expr {double($ssreg)/$sstot}]
    } else {
        set r2 1.0
    }
    set adjr2 [expr {1.0 - (1.0 - $r2) * ($n - 1)/($n - $k)}]
    set sumsqresid [dotproduct $R $R]
    set s2 [expr {double($sumsqresid) / double($n - $k)}]

    ### -- Confidence intervals for coefficients
    set tvalue [tstat [expr {$n - $k}]]
    for {set i 0} {$i < $k} {incr i} {







<
|
<
<
<







211
212
213
214
215
216
217

218



219
220
221
222
223
224
225
    set sstot 0.0
    set ssreg 0.0
    # Note: Relying on representation of Vector as a list for y, yhat
    foreach yval $y wt $w yhatval $yhat {
        set sstot [expr {$sstot + $wt * ($yval - $ymean) * ($yval - $ymean)}]
        set ssreg [expr {$ssreg + $wt * ($yhatval - $ymean) * ($yhatval - $ymean)}]
    }

    set r2 [expr {double($ssreg)/$sstot}]



    set adjr2 [expr {1.0 - (1.0 - $r2) * ($n - 1)/($n - $k)}]
    set sumsqresid [dotproduct $R $R]
    set s2 [expr {double($sumsqresid) / double($n - $k)}]

    ### -- Confidence intervals for coefficients
    set tvalue [tstat [expr {$n - $k}]]
    for {set i 0} {$i < $k} {incr i} {

Changes to modules/math/numtheory.dtx.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
% 
% \iffalse
% 
%<*pkg_common>
%% Copyright (c) 2010 by Lars Hellstrom.  All rights reserved.
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%</pkg_common>
%<*driver>
\documentclass{tclldoc}
\usepackage{amsmath,amsfonts}
\usepackage{url}
\newcommand{\Tcl}{\Tcllogo}
\begin{document}
\DocInput{numtheory.dtx}



|



|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
% 
% \iffalse
% 
%<*pkg>
%% Copyright (c) 2010 by Lars Hellstrom.  All rights reserved.
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%</pkg>
%<*driver>
\documentclass{tclldoc}
\usepackage{amsmath,amsfonts}
\usepackage{url}
\newcommand{\Tcl}{\Tcllogo}
\begin{document}
\DocInput{numtheory.dtx}
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
%<*pkg>
package require Tcl 8.5
% \end{tcl}
% \Tcl~8.4 is seriously broken with respect to arithmetic overflow, 
% so we require 8.5. There are (as yet) no explicit 8.5-isms in the 
% code, however.
% \begin{tcl}
package provide math::numtheory 1.1.1
namespace eval ::math::numtheory {
   namespace export isprime
}
%</pkg>
% \end{tcl}
% Additional procedures are placed into a separate file primes.tcl,
% sourced from the primary.
% \begin{tcl}
%<*pkg_primes>
# primes.tcl --
#     Provide additional procedures for the number theory package
#
namespace eval ::math::numtheory {
    variable primes {2 3 5 7 11 13 17}
    variable nextPrimeCandidate 19
    variable nextPrimeIncrement  1 ;# Examine numbers 6n+1 and 6n+5

    namespace export firstNprimes primesLowerThan primeFactors uniquePrimeFactors factors \
                     totient moebius legendre jacobi gcd lcm \
                     numberPrimesGauss numberPrimesLegendre numberPrimesLegendreModified
}

%</pkg_primes>
% \end{tcl}
% \setnamespace{math::numtheory}
% 
% \Tcl lib has its own test file boilerplate.
% We require tcltest 2.1 to allow the definition of a custom matcher
% comparing lists of integers
% \begin{tcl}
%<*test_primes>
# -*- tcl -*-
# primes.test --
#    Additional test cases for the ::math::numtheory package
#
# Note:
#    The tests assume tcltest 2.1, in order to compare
#    list of integer results

# -------------------------------------------------------------------------

%</test_primes>
%<*test_common>
source [file join\
  [file dirname [file dirname [file join [pwd] [info script]]]]\
  devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

%</test_common>
%<*test_primes>
support {
    useLocal math.tcl math
}

%</test_primes>
%<*test_common>
testing {
    useLocal numtheory.tcl math::numtheory
}

%</test_common>
% \end{tcl}
% and a bit more for the additional tests. This is where tcltest 2.1
% is required
% \begin{tcl}
%<*test_primes>
proc matchLists { expected actual } {
   set match 1
   foreach a $actual e $expected {
      if { $a != $e } {
         set match 0
         break
      }
   }
   return $match
}
customMatch equalLists matchLists

%</test_primes>
% \end{tcl}
% 
% And the same is true for the manpage.
% \begin{tcl}
%<*man>
[comment {
    __Attention__ This document is a generated file.
    It is not the true source.
    The true source is

        numtheory.dtx

    To make changes edit the true source, and then use
    
        sak.tcl docstrip/regen modules/math

    to update all generated files.
}]
[vset VERSION 1.1.1]
[manpage_begin math::numtheory n [vset VERSION]]
[keywords {number theory}]
[keywords prime]
[copyright "2010 Lars Hellstr\u00F6m\ 
  <Lars dot Hellstrom at residenset dot net>"]
[moddesc   {Tcl Math Library}]
[titledesc {Number Theory}]
[category  Mathematics]
[require Tcl [opt 8.5]]
[require math::numtheory [opt [vset VERSION]]]

[description]
[para]
This package is for collecting various number-theoretic operations, with

a slight bias to prime numbers.

[list_begin definitions]
%</man>
% \end{tcl}
% 
% 
% \section{Primes}
% 
% The first operation provided is |isprime|, which 
% tests if an integer is a prime.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::isprime] [arg N] [
   opt "[arg option] [arg value] ..."
]]
  The [cmd isprime] command tests whether the integer [arg N] is a 







|





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



<
<

|
<
<
<
<
<
<
<
<
<
<
<
<



<

|
<
<
<
<
<
<
<
<
<
<
|
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<



<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<






|



|
>
|








|







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
89
90
91
92
93
94
95
%<*pkg>
package require Tcl 8.5
% \end{tcl}
% \Tcl~8.4 is seriously broken with respect to arithmetic overflow, 
% so we require 8.5. There are (as yet) no explicit 8.5-isms in the 
% code, however.
% \begin{tcl}
package provide math::numtheory 1.0
namespace eval ::math::numtheory {
   namespace export isprime
}
%</pkg>
% \end{tcl}



















% \setnamespace{math::numtheory}
% 
% \Tcl lib has its own test file boilerplate.


% \begin{tcl}
%<*test>












source [file join\
  [file dirname [file dirname [file join [pwd] [info script]]]]\
  devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2










testing {useLocal numtheory.tcl math::numtheory}


%</test>
% \end{tcl}















% 



% And the same is true for the manpage.
% \begin{tcl}
%<*man>














[manpage_begin math::numtheory n 1.0]


[copyright "2010 Lars Hellstr\u00F6m\ 
  <Lars dot Hellstrom at residenset dot net>"]
[moddesc   {Tcl Math Library}]
[titledesc {Number Theory}]
[category  Mathematics]
[require Tcl [opt 8.5]]
[require math::numtheory [opt 1.0]]

[description]
[para]
This package is for collecting various number-theoretic operations, 
though at the moment it only provides that of testing whether an 
integer is a prime.

[list_begin definitions]
%</man>
% \end{tcl}
% 
% 
% \section{Primes}
% 
% The first (and so far only) operation provided is |isprime|, which 
% tests if an integer is a prime.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::isprime] [arg N] [
   opt "[arg option] [arg value] ..."
]]
  The [cmd isprime] command tests whether the integer [arg N] is a 
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
    which controls how many times the Miller-Rabin test should be 
    repeated with randomly chosen bases. Each repetition reduces the 
    probability of a false positive by a factor at least 4. The 
    default for [arg repetitions] is 4.
  [list_end]
  Unknown options are silently ignored.

%</man>
% \end{tcl}
% Then we have |firstNprimes|, which returns a list containing
% the first |n| primes.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::firstNprimes] [arg N]]
Return the first N primes

[list_begin arguments]
[arg_def integer N in]
Number of primes to return
[list_end]

[call [cmd math::numtheory::primesLowerThan] [arg N]]
Return the prime numbers lower/equal to N

[list_begin arguments]
[arg_def integer N in]
Maximum number to consider
[list_end]

[call [cmd math::numtheory::primeFactors] [arg N]]
Return a list of the prime numbers in the number N

[list_begin arguments]
[arg_def integer N in]
Number to be factorised
[list_end]

%</man>
% \end{tcl}
% Similarly |primesLowerThan| returns a list of the prime numbers
% which are less than |n|, or equal to it.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::primesLowerThan] [arg N]]
Return the prime numbers lower/equal to N

[list_begin arguments]
[arg_def integer N in]
Maximum number to consider
[list_end]

%</man>
% \end{tcl}
% Then |primeFactors| returns the list of the prime numbers in |n|.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::primeFactors] [arg N]]
Return a list of the prime numbers in the number N

[list_begin arguments]
[arg_def integer N in]
Number to be factorised
[list_end]

%</man>
% \end{tcl}
% And |uniquePrimeFactors| does the same, with duplicates removed.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::uniquePrimeFactors] [arg N]]
Return a list of the [emph unique] prime numbers in the number N

[list_begin arguments]
[arg_def integer N in]
Number to be factorised
[list_end]

%</man>
% \end{tcl}
% |factors| returns all factors of |n|, not just just primes.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::factors] [arg N]]
Return a list of all [emph unique] factors in the number N, including 1 and N itself
[list_begin arguments]
[arg_def integer N in]
Number to be factorised
[list_end]

%</man>
% \end{tcl}
% |totient| computes the Euler totient for |n|
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::totient] [arg N]]
Evaluate the Euler totient function for the number N (number of numbers
relatively prime to N)

[list_begin arguments]
[arg_def integer N in]
Number in question
[list_end]

%</man>
% \end{tcl}
% |moebius| computes the Moebious function on |n|.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::moebius] [arg N]]
Evaluate the Moebius function for the number N

[list_begin arguments]
[arg_def integer N in]
Number in question
[list_end]

%</man>
% \end{tcl}
% |legendre| computes the Legendre symbol (|a/p|).
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::legendre] [arg a] [arg p]]
Evaluate the Legendre symbol (a/p)

[list_begin arguments]
[arg_def integer a in]
Upper number in the symbol
[arg_def integer p in]
Lower number in the symbol (must be non-zero)
[list_end]

%</man>
% \end{tcl}
% |jacobi| compute the Jacobi symbol (|a/p|).
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::jacobi] [arg a] [arg b]]
Evaluate the Jacobi symbol (a/b)

[list_begin arguments]
[arg_def integer a in]
Upper number in the symbol
[arg_def integer b in]
Lower number in the symbol (must be odd)
[list_end]

%</man>
% \end{tcl}
% |gcd| computes the greatest common divisor of |n| and |m|.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::gcd] [arg m] [arg n]]
Return the greatest common divisor of [term m] and [term n]

[list_begin arguments]
[arg_def integer m in]
First number
[arg_def integer n in]
Second number
[list_end]

%</man>
% \end{tcl}
% |lcm| computes the least common multiple of |n| and |m|.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::lcm] [arg m] [arg n]]
Return the lowest common multiple of [term m] and [term n]

[list_begin arguments]
[arg_def integer m in]
First number
[arg_def integer n in]
Second number
[list_end]

%</man>
% \end{tcl}
% |numberPrimesGauss| estimates the number of primes below |n|
% using a formula by Gauss.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::numberPrimesGauss] [arg N]]
Estimate the number of primes according the formula by Gauss.

[list_begin arguments]
[arg_def integer N in]
Number in question
[list_end]

%</man>
% \end{tcl}
% |numberPrimesLegendre| estimates the number of primes below |n|
% using a formula by Legendre.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::numberPrimesLegendre] [arg N]]
Estimate the number of primes according the formula by Legendre.

[list_begin arguments]
[arg_def integer N in]
Number in question
[list_end]

%</man>
% \end{tcl}
% |numberPrimesLegendreModified| estimates the number of primes below
% |n| using Legendre's modified formula.
% \begin{tcl}
%<*man>
[call [cmd math::numtheory::numberPrimesLegendreModified] [arg N]]
Estimate the number of primes according the modified formula by Legendre.

[list_begin arguments]
[arg_def integer N in]
Number in question
[list_end]

%</man>
% \end{tcl}
% 
% 
% \subsection{Trial division}
% 
% As most books on primes will tell you, practical primality 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







118
119
120
121
122
123
124



















































































































































































































125
126
127
128
129
130
131
    which controls how many times the Miller-Rabin test should be 
    repeated with randomly chosen bases. Each repetition reduces the 
    probability of a false positive by a factor at least 4. The 
    default for [arg repetitions] is 4.
  [list_end]
  Unknown options are silently ignored.




















































































































































































































%</man>
% \end{tcl}
% 
% 
% \subsection{Trial division}
% 
% As most books on primes will tell you, practical primality 
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
%   That ends the |for| loop for |Miller--Rabin| with random bases.
%   At this point, since the number in question passed the requested 
%   number of Miller--Rabin rounds, it is proclaimed to be ``probably 
%   prime''.
%   \begin{tcl}
    return on
}

# Add the additional procedures
#
source [file join [file dirname [info script]] primes.tcl]
%</pkg>
%   \end{tcl}
%   
%   Tests of |isprime| would mostly be asking ``is $n$ a prime'' for 
%   various interesting $n$. Several values of $n$ should be the same 
%   as the previous tests:
%   \begin{tcl}







<
<
<
<







733
734
735
736
737
738
739




740
741
742
743
744
745
746
%   That ends the |for| loop for |Miller--Rabin| with random bases.
%   At this point, since the number in question passed the requested 
%   number of Miller--Rabin rounds, it is proclaimed to be ``probably 
%   prime''.
%   \begin{tcl}
    return on
}




%</pkg>
%   \end{tcl}
%   
%   Tests of |isprime| would mostly be asking ``is $n$ a prime'' for 
%   various interesting $n$. Several values of $n$ should be the same 
%   as the previous tests:
%   \begin{tcl}
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
      rename _orig_Miller--Rabin Miller--Rabin
   }
}
%</test>
%   \end{tcl}
% \end{proc}
% 
% \section {Add-ons}
%
% A number of additional functions around factoring numbers
%
% \begin{tcl}
%<*pkg_primes>
# ComputeNextPrime --
#     Determine the next prime
#
# Arguments:
#     None
#
# Result:
#     None
#
# Side effects:
#     One prime added to the list of primes
#
# Note:
#     Using a true sieve of Erathostenes might be faster, but
#     this does work. Even computing the first ten thousand
#     does not seem to be slow.
#
proc ::math::numtheory::ComputeNextPrime {} {
    variable primes
    variable nextPrimeCandidate
    variable nextPrimeIncrement

    while {1} {
        #
        # Test the current candidate
        #
        set sqrtCandidate [expr {sqrt($nextPrimeCandidate)}]

        set isprime 1
        foreach p $primes {
            if { $p > $sqrtCandidate } {
                break
            }
            if { $nextPrimeCandidate % $p == 0 } {
                set isprime 0
                break
            }
        }

        if { $isprime } {
            lappend primes $nextPrimeCandidate
        }

        #
        # In any case get the next candidate
        #
        if { $nextPrimeIncrement == 1 } {
            set nextPrimeIncrement 5
            set nextPrimeCandidate [expr {$nextPrimeCandidate + 4}]
        } else {
            set nextPrimeIncrement 1
            set nextPrimeCandidate [expr {$nextPrimeCandidate + 2}]
        }

        if { $isprime } {
            break
        }
    }
}

# firstNprimes --
#     Return the first N primes
#
# Arguments:
#     number           Number of primes to return
#
# Result:
#     List of the first $number primes
#
proc ::math::numtheory::firstNprimes {number} {
    variable primes

    while { [llength $primes] < $number } {
        ComputeNextPrime
    }

    return [lrange $primes 0 [expr {$number-1}]]
}

# primesLowerThan --
#     Return the primes lower than some threshold
#
# Arguments:
#     threshold        Threshold for the primes
#
# Result:
#     List of primes lower/equal to the threshold
#
proc ::math::numtheory::primesLowerThan {threshold} {
    variable primes

    while { [lindex $primes end] < $threshold } {
        ComputeNextPrime
    }

    set n 0
    foreach p $primes {
        if { $p > $threshold } {
            break
        } else {
            incr n
        }
    }
    return [lrange $primes 0 [expr {$n-1}]]
}

# primeFactors --
#     Determine the prime factors of a number
#
# Arguments:
#     number           Number to factorise
#
# Result:
#     List of prime factors
#
proc ::math::numtheory::primeFactors {number} {
    variable primes

    #
    # Make sure we have enough primes
    #
    primesLowerThan [expr {sqrt($number)}]

    set factors {}

    set idx 0

    while { $number > 1 } {
        set p [lindex $primes $idx]
        if {$p == {}} {
            lappend factors $number
            break
        }
        if { $number % $p == 0 } {
            lappend factors $p
            set number [expr {$number/$p}]
        } else {
            incr idx
        }
    }

    return $factors
}

# uniquePrimeFactors --
#     Determine the unique prime factors of a number
#
# Arguments:
#     number           Number to factorise
#
# Result:
#     List of unique prime factors
#
proc ::math::numtheory::uniquePrimeFactors {number} {
    return [lsort -unique -integer [primeFactors $number]]
}

# totient --
#     Evaluate the Euler totient function for a number
#
# Arguments:
#     number           Number in question
#
# Result:
#     Totient of the given number (number of numbers
#     relatively prime to the number)
#
proc ::math::numtheory::totient {number} {
    set factors [uniquePrimeFactors $number]

    set totient 1

    foreach f $factors {
        set totient [expr {$totient * ($f-1)}]
    }

    return $totient
}

# factors --
#     Return all (unique) factors of a number
#
# Arguments:
#     number           Number in question
#
# Result:
#     List of factors including 1 and the number itself
#
# Note:
#     The algorithm for constructing the power set was taken from
#     wiki.tcl.tk/2877 (algorithm subsets2b).
#
proc ::math::numtheory::factors {number} {
    set factors [primeFactors $number]

    #
    # Iterate over the power set of this list
    #
    set result [list 1 $number]
    for {set n 1} {$n < [llength $factors]} {incr n} {
        set subsets [list [list]]
        foreach f $factors {
            foreach subset $subsets {
                lappend subset $f
                if {[llength $subset] == $n} {
                    lappend result [Product $subset]
                } else {
                    lappend subsets $subset
                }
            }
        }
    }
    return [lsort -unique -integer $result]
}

# Product --
#     Auxiliary function: return the product of a list of numbers
#
# Arguments:
#     list           List of numbers
#
# Result:
#     The product of all the numbers
#
proc ::math::numtheory::Product {list} {
    set product 1
    foreach e $list {
        set product [expr {$product * $e}]
    }
    return $product
}

# moebius --
#     Return the value of the Moebius function for "number"
#
# Arguments:
#     number         Number in question
#
# Result:
#     The product of all the numbers
#
proc ::math::numtheory::moebius {number} {
    if { $number < 1 } {
        return -code error "The number must be positive"
    }
    if { $number == 1 } {
        return 1
    }

    set primefactors [primeFactors $number]
    if { [llength $primefactors] != [llength [lsort -unique -integer $primefactors]] } {
        return 0
    } else {
        return [expr {(-1)**([llength $primefactors]%2)}]
    }
}

# legendre --
#     Return the value of the Legendre symbol (a/p)
#
# Arguments:
#     a              Upper number in the symbol
#     p              Lower number in the symbol
#
# Result:
#     The Legendre symbol
#
proc ::math::numtheory::legendre {a p} {
    if { $p == 0 } {
        return -code error "The number p must be non-zero"
    }

    if { $a % $p == 0 } {
        return 0
    }

    #
    # Just take the brute force route
    # (Negative values of a present a small problem, but only a small one)
    #
    while { $a < 0 } {
        set a [expr {$p + $a}]
    }

    set legendre -1
    for {set n 1} {$n < $p} {incr n} {
        if { $n**2 % $p == $a } {
            set legendre 1
            break
        }
    }

    return $legendre
}

# jacobi --
#     Return the value of the Jacobi symbol (a/b)
#
# Arguments:
#     a              Upper number in the symbol
#     b              Lower number in the symbol
#
# Result:
#     The Jacobi symbol
#
# Note:
#     Implementation adopted from the Wiki - http://wiki.tcl.tk/36990
#     encoded by rmelton 9/25/12
#     Further references:
#     http://en.wikipedia.org/wiki/Jacobi_symbol
#     http://2000clicks.com/mathhelp/NumberTh27JacobiSymbolAlgorithm.aspx
#
proc ::math::numtheory::jacobi {a b} {
    if { $b<=0 || ($b&1)==0 } {
        return 0;
    }

    set j 1
    if {$a<0} {
        set a [expr {0-$a}]
        set j [expr {0-$j}]
    }
    while {$a != 0} {
        while {($a&1) == 0} {
            ##/* Process factors of 2: Jacobi(2,b)=-1 if b=3,5 (mod 8) */
            set a [expr {$a>>1}]
            if {(($b & 7)==3) || (($b & 7)==5)} {
                set j [expr {0-$j}]
            }
        }
        ##/* Quadratic reciprocity: Jacobi(a,b)=-Jacobi(b,a) if a=3,b=3 (mod 4) */
        lassign [list $a $b] b a
        if {(($a & 3)==3) && (($b & 3)==3)} {
            set j [expr {0-$j}]
        }
        set a [expr {$a % $b}]
    }
    if {$b==1} {
        return $j
    } else {
        return 0
    }
}

# gcd --
#     Return the greatest common divisor of two numbers n and m
#
# Arguments:
#     n              First number
#     m              Second number
#
# Result:
#     The greatest common divisor
#
proc ::math::numtheory::gcd {n m} {
    #
    # Apply Euclid's good old algorithm
    #
    if { $n > $m } {
        set t $n
        set n $m
        set m $t
    }

    while { $n > 0 } {
        set r [expr {$m % $n}]
        set m $n
        set n $r
    }

    return $m
}

# lcm --
#     Return the lowest common multiple of two numbers n and m
#
# Arguments:
#     n              First number
#     m              Second number
#
# Result:
#     The lowest common multiple
#
proc ::math::numtheory::lcm {n m} {
    set gcd [gcd $n $m]
    return [expr {$n*$m/$gcd}]
}

# numberPrimesGauss --
#     Return the approximate number of primes lower than the given value based on the formula by Gauss
#
# Arguments:
#     limit            The limit for the largest prime to be included in the estimate
#
# Returns:
#     Approximate number of primes
#
proc ::math::numtheory::numberPrimesGauss {limit} {
    if { $limit <= 1 } {
        return -code error "The limit must be larger than 1"
    }
    expr {$limit / log($limit)}
}

# numberPrimesLegendre --
#     Return the approximate number of primes lower than the given value based on the formula by Legendre
#
# Arguments:
#     limit            The limit for the largest prime to be included in the estimate
#
# Returns:
#     Approximate number of primes
#
proc ::math::numtheory::numberPrimesLegendre {limit} {
    if { $limit <= 1 } {
        return -code error "The limit must be larger than 1"
    }
    expr {$limit / (log($limit) - 1.0)}
}

# numberPrimesLegendreModified --
#     Return the approximate number of primes lower than the given value based on the
#     modified formula by Legendre
#
# Arguments:
#     limit            The limit for the largest prime to be included in the estimate
#
# Returns:
#     Approximate number of primes
#
proc ::math::numtheory::numberPrimesLegendreModified {limit} {
    if { $limit <= 1 } {
        return -code error "The limit must be larger than 1"
    }
    expr {$limit / (log($limit) - 1.08366)}
}
%</pkg_primes>
%\end{tcl}
% \begin{tcl}
%<*test_primes>
test first-few-primes-1 "First 10 primes" -match equalLists -body {
    ::math::numtheory::firstNprimes 10
} -result {2 3 5 7 11 13 17 19 23 29}

test first-few-primes-2 "First 12 primes" -match equalLists -body {
    ::math::numtheory::firstNprimes 12
} -result {2 3 5 7 11 13 17 19 23 29 31 37}

test first-few-primes-3 "First 20 primes" -match equalLists -body {
    ::math::numtheory::firstNprimes 20
} -result {2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71}

test primes-lower-than-1 "Primes lower/equal 101" -match equalLists -body {
    ::math::numtheory::primesLowerThan 101
} -result {2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101}

test primes-lower-than-2 "Primes lower/equal 2" -match equalLists -body {
    ::math::numtheory::primesLowerThan 2
} -result {2}

test primes-lower-than-3 "Primes lower/equal 4" -match equalLists -body {
    ::math::numtheory::primesLowerThan 4
} -result {2 3}

test primes-lower-than-4 "Primes lower/equal 102" -match equalLists -body {
    ::math::numtheory::primesLowerThan 102
} -result {2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101}

test prime-factors-1 "Prime factors 100" -match equalLists -body {
    ::math::numtheory::primeFactors 100
} -result {2 2 5 5}

test prime-factors-2 "Unique prime factors 100" -match equalLists -body {
    ::math::numtheory::uniquePrimeFactors 100
} -result {2 5}

test prime-factors-3 "Prime factors 2900" -match equalLists -body {
    ::math::numtheory::primeFactors 2900
} -result {2 2 5 5 29}

test prime-factors-4 "Unique prime factors 2900" -match equalLists -body {
    ::math::numtheory::uniquePrimeFactors 2900
} -result {2 5 29}

test prime-factors-5 "Prime factors 964" -match equalLists -body {
    ::math::numtheory::primeFactors 964
} -result {2 2 241}

test prime-factors-6 "Prime factors 960" -match equalLists -body {
    ::math::numtheory::primeFactors 960
} -result {2 2 2 2 2 2 3 5}

test prime-factors-7 "Prime factors 914" -match equalLists -body {
    ::math::numtheory::primeFactors 914
} -result {2 457}

test totient-1 "Totient 15" -body {
    ::math::numtheory::totient 15
} -result 8

test totient-2 "Totient 30" -body {
    ::math::numtheory::totient 30
} -result 8

test totient-3 "Totient 35" -body {
    ::math::numtheory::totient 35
} -result 24

test totient-4 "Totient 105" -body {
    ::math::numtheory::totient 105
} -result 48

test factors-1 "All factors 30" -match equalLists -body {
    ::math::numtheory::factors 30
} -result {1 2 3 5 6 10 15 30}

test factors-1 "All factors 128" -match equalLists -body {
    ::math::numtheory::factors 128
} -result {1 2 4 8 16 32 64 128}

test factors-1 "All factors 250" -match equalLists -body {
    ::math::numtheory::factors 250
} -result {1 2 5 10 25 50 125 250}

test moebius-1 "Moebius for first 19 numbers" -match equalLists -body {
    set result {}
    for {set n 1} {$n < 20} {incr n} {
        lappend result [::math::numtheory::moebius $n]
    }
    set result
} -result {1 -1 -1 0 -1 1 -1 0 0 1 -1 0 -1 1 1 0 -1 0 -1}

test legendre-1 "Legendre symbol (-1/3)" -body {
    ::math::numtheory::legendre -1 3
} -result -1
test legendre-2 "Legendre symbol (-3/7)" -body {
    ::math::numtheory::legendre -3 7
} -result 1

test jacobi-1 "Jacobi symbol (6/7)" -body {
    ::math::numtheory::jacobi 6 7
} -result -1

test jacobi-2 "Jacobi symbol (6/9)" -body {
    ::math::numtheory::jacobi 6 9
} -result 0

test jacobi-3 "Jacobi symbol (3/11)" -body {
    ::math::numtheory::jacobi 3 11
} -result 1

test gcd-1 "Greatest common divisor 2 and 3" -body {
    ::math::numtheory::gcd 2 3
} -result 1

test gcd-2 "Greatest common divisor 20 and 12" -body {
    ::math::numtheory::gcd 20 12
} -result 4

test gcd-3 "Greatest common divisor 600 and 125" -body {
    ::math::numtheory::gcd 600 125
} -result 25

test lcm-1 "Lowest common multiple 3 and 4" -body {
    ::math::numtheory::lcm 3 4
} -result 12

test lcm-2 "Lowest common multiple 12 and 20" -body {
    ::math::numtheory::lcm 12 20
} -result 60

test number-primes "Exercise prime estimators" -match equalLists -body {
    set estimate1 [::math::numtheory::numberPrimesGauss 1000]
    set estimate2 [::math::numtheory::numberPrimesLegendre 1000]
    set estimate3 [::math::numtheory::numberPrimesLegendreModified 1000]
    set result [list [expr {int($estimate1)}] [expr {int($estimate2)}] [expr {int($estimate3)}]]
} -result {144 169 171}
%</test_primes>
%\end{tcl}
% 
% \section*{Closings}
% 
% \begin{tcl}
%<*man>
[list_end]

[vset CATEGORY {math :: numtheory}]
[include ../common-text/feedback.inc]
[manpage_end]
%</man>
% \end{tcl}
% 
% \begin{tcl}
%<test_common>testsuiteCleanup
% \end{tcl}
% 
% 
% \begin{thebibliography}{9}
% 
% \bibitem{AKS04}
%   Manindra Agrawal, Neeraj Kayal, and Nitin Saxena:







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







|
<





|







874
875
876
877
878
879
880









































































































































































































































































































































































































































































































































































































881
882
883
884
885
886
887
888

889
890
891
892
893
894
895
896
897
898
899
900
901
      rename _orig_Miller--Rabin Miller--Rabin
   }
}
%</test>
%   \end{tcl}
% \end{proc}
% 









































































































































































































































































































































































































































































































































































































% 
% \section*{Closings}
% 
% \begin{tcl}
%<*man>
[list_end]

[keywords {number theory} prime]

[manpage_end]
%</man>
% \end{tcl}
% 
% \begin{tcl}
%<test>testsuiteCleanup
% \end{tcl}
% 
% 
% \begin{thebibliography}{9}
% 
% \bibitem{AKS04}
%   Manindra Agrawal, Neeraj Kayal, and Nitin Saxena:

Changes to modules/math/numtheory.man.

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
[comment {
    __Attention__ This document is a generated file.
    It is not the true source.
    The true source is

        numtheory.dtx

    To make changes edit the true source, and then use

        sak.tcl docstrip/regen modules/math

    to update all generated files.
}]
[vset VERSION 1.1.1]
[manpage_begin math::numtheory n [vset VERSION]]
[keywords {number theory}]
[keywords prime]
[copyright "2010 Lars Hellstr\u00F6m\
  <Lars dot Hellstrom at residenset dot net>"]
[moddesc   {Tcl Math Library}]
[titledesc {Number Theory}]
[category  Mathematics]
[require Tcl [opt 8.5]]
[require math::numtheory [opt [vset VERSION]]]

[description]
[para]
This package is for collecting various number-theoretic operations, with

a slight bias to prime numbers.

[list_begin definitions]
[call [cmd math::numtheory::isprime] [arg N] [
   opt "[arg option] [arg value] ..."
]]
  The [cmd isprime] command tests whether the integer [arg N] is a
  prime, returning a boolean true value for prime [arg N] and a
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|








|



|
>
|





















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23














[manpage_begin math::numtheory n 1.0]
[keywords {number theory}]
[keywords prime]
[copyright "2010 Lars Hellstr\u00F6m\
  <Lars dot Hellstrom at residenset dot net>"]
[moddesc   {Tcl Math Library}]
[titledesc {Number Theory}]
[category  Mathematics]
[require Tcl [opt 8.5]]
[require math::numtheory [opt 1.0]]

[description]
[para]
This package is for collecting various number-theoretic operations,
though at the moment it only provides that of testing whether an
integer is a prime.

[list_begin definitions]
[call [cmd math::numtheory::isprime] [arg N] [
   opt "[arg option] [arg value] ..."
]]
  The [cmd isprime] command tests whether the integer [arg N] is a
  prime, returning a boolean true value for prime [arg N] and a
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
    which controls how many times the Miller-Rabin test should be
    repeated with randomly chosen bases. Each repetition reduces the
    probability of a false positive by a factor at least 4. The
    default for [arg repetitions] is 4.
  [list_end]
  Unknown options are silently ignored.

[call [cmd math::numtheory::firstNprimes] [arg N]]
Return the first N primes

[list_begin arguments]
[arg_def integer N in]
Number of primes to return
[list_end]

[call [cmd math::numtheory::primesLowerThan] [arg N]]
Return the prime numbers lower/equal to N

[list_begin arguments]
[arg_def integer N in]
Maximum number to consider
[list_end]

[call [cmd math::numtheory::primeFactors] [arg N]]
Return a list of the prime numbers in the number N

[list_begin arguments]
[arg_def integer N in]
Number to be factorised
[list_end]

[call [cmd math::numtheory::primesLowerThan] [arg N]]
Return the prime numbers lower/equal to N

[list_begin arguments]
[arg_def integer N in]
Maximum number to consider
[list_end]

[call [cmd math::numtheory::primeFactors] [arg N]]
Return a list of the prime numbers in the number N

[list_begin arguments]
[arg_def integer N in]
Number to be factorised
[list_end]

[call [cmd math::numtheory::uniquePrimeFactors] [arg N]]
Return a list of the [emph unique] prime numbers in the number N

[list_begin arguments]
[arg_def integer N in]
Number to be factorised
[list_end]

[call [cmd math::numtheory::factors] [arg N]]
Return a list of all [emph unique] factors in the number N, including 1 and N itself
[list_begin arguments]
[arg_def integer N in]
Number to be factorised
[list_end]

[call [cmd math::numtheory::totient] [arg N]]
Evaluate the Euler totient function for the number N (number of numbers
relatively prime to N)

[list_begin arguments]
[arg_def integer N in]
Number in question
[list_end]

[call [cmd math::numtheory::moebius] [arg N]]
Evaluate the Moebius function for the number N

[list_begin arguments]
[arg_def integer N in]
Number in question
[list_end]

[call [cmd math::numtheory::legendre] [arg a] [arg p]]
Evaluate the Legendre symbol (a/p)

[list_begin arguments]
[arg_def integer a in]
Upper number in the symbol
[arg_def integer p in]
Lower number in the symbol (must be non-zero)
[list_end]

[call [cmd math::numtheory::jacobi] [arg a] [arg b]]
Evaluate the Jacobi symbol (a/b)

[list_begin arguments]
[arg_def integer a in]
Upper number in the symbol
[arg_def integer b in]
Lower number in the symbol (must be odd)
[list_end]

[call [cmd math::numtheory::gcd] [arg m] [arg n]]
Return the greatest common divisor of [term m] and [term n]

[list_begin arguments]
[arg_def integer m in]
First number
[arg_def integer n in]
Second number
[list_end]

[call [cmd math::numtheory::lcm] [arg m] [arg n]]
Return the lowest common multiple of [term m] and [term n]

[list_begin arguments]
[arg_def integer m in]
First number
[arg_def integer n in]
Second number
[list_end]

[call [cmd math::numtheory::numberPrimesGauss] [arg N]]
Estimate the number of primes according the formula by Gauss.

[list_begin arguments]
[arg_def integer N in]
Number in question, should be larger than 0
[list_end]

[call [cmd math::numtheory::numberPrimesLegendre] [arg N]]
Estimate the number of primes according the formula by Legendre.

[list_begin arguments]
[arg_def integer N in]
Number in question, should be larger than 0
[list_end]

[call [cmd math::numtheory::numberPrimesLegendreModified] [arg N]]
Estimate the number of primes according the modified formula by Legendre.

[list_begin arguments]
[arg_def integer N in]
Number in question, should be larger than 0
[list_end]

[call [cmd math::numtheory::differenceNumberPrimesLegendreModified] [arg lower] [arg upper]]
Estimate the number of primes between tow limits according the modified formula by Legendre.

[list_begin arguments]
[arg_def integer lower in] Lower limit for the primes, should be larger than 0
[arg_def integer upper in] Upper limit for the primes, should be larger than 0
[list_end]

[list_end]

[vset CATEGORY {math :: numtheory}]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<
<
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|

45
46
47
48
49
50
51






52
53










































































































































54
55
56
    which controls how many times the Miller-Rabin test should be
    repeated with randomly chosen bases. Each repetition reduces the
    probability of a false positive by a factor at least 4. The
    default for [arg repetitions] is 4.
  [list_end]
  Unknown options are silently ignored.







[list_end]











































































































































[vset CATEGORY {math :: numtheory}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/numtheory.stitch.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- tcl -*-
# Stitch definition for docstrip files, used by SAK.

input numtheory.dtx

options -metaprefix \# -preamble {In other words:
**************************************
* This Source is not the True Source *
**************************************
the true source is the file from which this one was generated.
}

stitch numtheory.tcl       {pkg pkg_common}
stitch numtheory.test      {test test_common}

stitch primes.tcl          {pkg_primes pkg_common}
stitch primes.test         {test_primes test_common}

options -nopostamble -nopreamble
stitch numtheory.man      man

# Unused guards:
#
# - driver	(TeX output prolog)












|
|

<
<
<
|

<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15



16
17




# -*- tcl -*-
# Stitch definition for docstrip files, used by SAK.

input numtheory.dtx

options -metaprefix \# -preamble {In other words:
**************************************
* This Source is not the True Source *
**************************************
the true source is the file from which this one was generated.
}

stitch numtheory.tcl       pkg
stitch numtheory.test      test




options -nopreamble -nopostamble
stitch numtheory.man      man




Changes to modules/math/numtheory.tcl.

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
##
## This is the file `numtheory.tcl',
## generated with the SAK utility
## (sak docstrip/regen).
##
## The original source files were:
##
## numtheory.dtx  (with options: `pkg pkg_common')
##
## In other words:
## **************************************
## * This Source is not the True Source *
## **************************************
## the true source is the file from which this one was generated.
##
# Copyright (c) 2010 by Lars Hellstrom.  All rights reserved.
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
package require Tcl 8.5
package provide math::numtheory 1.1.2
namespace eval ::math::numtheory {
   namespace export isprime
}
proc ::math::numtheory::prime_trialdivision {n} {
    if {$n<2}      then {return -code return 0}
    if {$n<4}      then {return -code return 1}
    if {$n%2 == 0} then {return -code return 0}
|



|

|
|
|










|







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
## 
## This is the file `numtheory.tcl',
## generated with the SAK utility
## (sak docstrip/regen).
## 
## The original source files were:
## 
## numtheory.dtx  (with options: `pkg')
## 
## In other words:
## **************************************
## * This Source is not the True Source *
## **************************************
## the true source is the file from which this one was generated.
##
# Copyright (c) 2010 by Lars Hellstrom.  All rights reserved.
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
package require Tcl 8.5
package provide math::numtheory 1.0
namespace eval ::math::numtheory {
   namespace export isprime
}
proc ::math::numtheory::prime_trialdivision {n} {
    if {$n<2}      then {return -code return 0}
    if {$n<4}      then {return -code return 1}
    if {$n%2 == 0} then {return -code return 0}
69
70
71
72
73
74
75
76
77
78
79
80
81
82
           (round(rand()*0x100000000)-1)
           *3 | 1)
           + 10
        }]]} then {return 0}
    }
    return on
}

# Add the additional procedures
#
source [file join [file dirname [info script]] primes.tcl]
##
##
## End of file `numtheory.tcl'.







<
<
<
<
|
|

69
70
71
72
73
74
75




76
77
78
           (round(rand()*0x100000000)-1)
           *3 | 1)
           + 10
        }]]} then {return 0}
    }
    return on
}




## 
## 
## End of file `numtheory.tcl'.

Changes to modules/math/numtheory.test.

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
##
## This is the file `numtheory.test',
## generated with the SAK utility
## (sak docstrip/regen).
##
## The original source files were:
##
## numtheory.dtx  (with options: `test test_common')
##
## In other words:
## **************************************
## * This Source is not the True Source *
## **************************************
## the true source is the file from which this one was generated.
##
source [file join\
  [file dirname [file dirname [file join [pwd] [info script]]]]\
  devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

testing {
    useLocal numtheory.tcl math::numtheory
}

proc compareRounded {expected actual} {
    return [expr {int($expected-$actual) == 0} ]
}

::tcltest::customMatch rounded compareRounded

test prime_trialdivision-1 "Trial division of 1" -body {
   ::math::numtheory::prime_trialdivision 1
} -returnCodes 2 -result 0
test prime_trialdivision-2 "Trial division of 2" -body {
   ::math::numtheory::prime_trialdivision 2
} -returnCodes 2 -result 1
test prime_trialdivision-3 "Trial division of 6" -body {
|



|

|
|
|









<

|
<
<
|
<
<
<
<
<
<
<
<







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
## 
## This is the file `numtheory.test',
## generated with the SAK utility
## (sak docstrip/regen).
## 
## The original source files were:
## 
## numtheory.dtx  (with options: `test')
## 
## In other words:
## **************************************
## * This Source is not the True Source *
## **************************************
## the true source is the file from which this one was generated.
##
source [file join\
  [file dirname [file dirname [file join [pwd] [info script]]]]\
  devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2


testing {useLocal numtheory.tcl math::numtheory}








test prime_trialdivision-1 "Trial division of 1" -body {
   ::math::numtheory::prime_trialdivision 1
} -returnCodes 2 -result 0
test prime_trialdivision-2 "Trial division of 2" -body {
   ::math::numtheory::prime_trialdivision 2
} -returnCodes 2 -result 1
test prime_trialdivision-3 "Trial division of 6" -body {
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
   ::math::numtheory::isprime 118670087467 -randommr 500
} -result on -cleanup {
   namespace eval ::math::numtheory {
      rename Miller--Rabin ""
      rename _orig_Miller--Rabin Miller--Rabin
   }
}

test numberPrimes-1.0 "Number of primes below 100" -match rounded -body {
   set result [::math::numtheory::numberPrimesLegendre 100]
} -result 28

test numberPrimes-1.1 "Number of primes below 100 (modified)" -match rounded -body {
   set result [::math::numtheory::numberPrimesLegendreModified 100]
} -result 28

test numberPrimes-1.2 "Number of primes below 0 (modified)" -body {
   set result [::math::numtheory::numberPrimesLegendreModified 0]
} -result "The limit must be larger than 1" -returnCodes 1

test numberPrimes-1.3 "Number of primes between 100 and 200" -match rounded -body {
   set result [::math::numtheory::differenceNumberPrimesLegendreModified 100 200]
} -result 19

test numberPrimes-1.4 "Number of primes between 100 and 0 - error expected" -body {
   set result [::math::numtheory::differenceNumberPrimesLegendreModified 100 0]
} -result "The upper limit must be larger than 1" -returnCodes 1

testsuiteCleanup
##
##
## End of file `numtheory.test'.







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
|

198
199
200
201
202
203
204





















205
206
207
208
   ::math::numtheory::isprime 118670087467 -randommr 500
} -result on -cleanup {
   namespace eval ::math::numtheory {
      rename Miller--Rabin ""
      rename _orig_Miller--Rabin Miller--Rabin
   }
}





















testsuiteCleanup
## 
## 
## End of file `numtheory.test'.

Changes to modules/math/optimize.man.

317
318
319
320
321
322
323
324
325

[para]
The theory of linear programming is the subject of many a text book and
the Simplex algorithm that is implemented here is the best-known
method to solve this type of problems, but it is not the only one.

[vset CATEGORY {math :: optimize}]
[include ../common-text/feedback.inc]
[manpage_end]







|

317
318
319
320
321
322
323
324
325

[para]
The theory of linear programming is the subject of many a text book and
the Simplex algorithm that is implemented here is the best-known
method to solve this type of problems, but it is not the only one.

[vset CATEGORY {math :: optimize}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/optimize.test.

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal optimize.tcl math::optimize







|







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal optimize.tcl math::optimize

Deleted modules/math/pca.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin math::PCA n 1.0]
[keywords PCA]
[keywords statistics]
[keywords math]
[keywords tcl]
[moddesc   {Principal Components Analysis}]
[titledesc {Package for Principal Component Analysis}]
[category  Mathematics]
[require Tcl [opt 8.6]]
[require math::linearalgebra 1.0]

[description]
[para]
The PCA package provides a means to perform principal components analysis
in Tcl, using an object-oriented technique as facilitated by TclOO. It
actually defines a single public method, [term ::math::PCA::createPCA],
which constructs an object based on the data that are passed to perform
the actual analysis.

[para]
The methods of the PCA objects that are created with this command allow one
to examine the principal components, to approximate (new) observations
using all or a selected number of components only and to examine the
properties of the components and the statistics of the approximations.

[para]
The package has been modelled after the PCA example provided by the
original linear algebra package by Ed Hume.

[section "Commands"]
The [term math::PCA] package provides one public command:
[list_begin definitions]

[call [cmd ::math::PCA::createPCA] [arg data] [opt args]]
Create a new object, based on the data that are passed via the [term data] argument.
The principal components may be based on either correlations or covariances.
All observations will be normalised according to the mean and standard deviation
of the original data.

[list_begin arguments]
[arg_def list data] - A list of observations (see the example below).
[arg_def list args] - A list of key-value pairs defining the options. Currently there is
only one key: [term -covariances]. This indicates if covariances are to be used
(if the value is 1) or instead correlations (value is 0). The default is to use
correlations.
[list_end]

[list_end]

The PCA object that is created has the following methods:
[list_begin definitions]

[call [cmd "\$pca using"] [opt number]|[opt "-minproportion value"]]
Set the number of components to be used in the analysis (the number of retained components).
Returns the number of components, also if no argument is given.

[list_begin arguments]
[arg_def int number] - The number of components to be retained
[arg_def double value] - Select the number of components based on the minimum proportion
of variation that is retained by them. Should be a value between 0 and 1.
[list_end]


[call [cmd "\$pca eigenvectors"] [opt option]]
Return the eigenvectors as a list of lists.

[list_begin arguments]
[arg_def string option] - By default only the [emph retained] components are returned.
If all eigenvectors are required, use the option [term -all].
[list_end]


[call [cmd "\$pca eigenvalues"] [opt option]]
Return the eigenvalues as a list of lists.

[list_begin arguments]
[arg_def string option] - By default only the eigenvalues of the [emph retained] components are returned.
If all eigenvalues are required, use the option [term -all].
[list_end]


[call [cmd "\$pca proportions"] [opt option]]
Return the proportions for all components, that is, the amount of variations that each
components can explain.


[call [cmd "\$pca approximate"] [arg observation]]
Return an approximation of the observation based on the retained components

[list_begin arguments]
[arg_def list observation] - The values for the observation.
[list_end]


[call [cmd "\$pca approximatOriginal"]]
Return an approximation of the original data, using the retained components. It is
a convenience method that works on the complete set of original data.


[call [cmd "\$pca scores"] [arg observation]]
Return the scores per retained component for the given observation.

[list_begin arguments]
[arg_def list observation] - The values for the observation.
[list_end]


[call [cmd "\$pca distance"] [arg observation]]
Return the distance between the given observation and its approximation. (Note:
this distance is based on the normalised vectors.)

[list_begin arguments]
[arg_def list observation] - The values for the observation.
[list_end]


[call [cmd "\$pca qstatistic"] [arg observation] [opt option]]
Return the Q statistic, basically the square of the distance, for the given observation.

[list_begin arguments]
[arg_def list observation] - The values for the observation.
[arg_def string option] - If the observation is part of the original data, you may want
to use the corrected Q statistic. This is achieved with the option "-original".
[list_end]

[list_end]

[section EXAMPLE]
TODO: NIST example



[vset CATEGORY PCA]
[include ../common-text/feedback.inc]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































Deleted modules/math/pca.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# pca.tcl --
#     Package for principal component analysis
#
package require Tcl 8.6
package require math::linearalgebra

namespace eval ::math::PCA {
    namespace export createPCA
}

# createPCA --
#     Create a PCA object. Based on the observations the principal
#     components are determined.
#
# Arguments:
#     data           List of observations to be analysed
#     args           Option-value pairs:
#                    -covariance 1/0 - use covariances instead of correlations
#
# Returns:
#     New object holding all information that is needed
#
proc ::math::PCA::createPCA {data args} {

    return [pcaClass new $data $args]
}

# pcaClass --
#     Class holding the variables and methods for PCA
#
::oo::class create ::math::PCA::pcaClass {
     variable eigenValues      {}
     variable eigenVectors     {}
     variable retainedValues   {}
     variable retainedVectors  {}
     variable numberComponents 0
     variable numberUsed       0
     variable numberData       0
     variable mean             {}
     variable scale            {}
     variable originalData     {}

     constructor {data options} {
         variable numberComponents
         variable numberUsed

         set originalData     $data
         set numberComponents [llength [lindex $data 0]]
         set numberUsed       $numberComponents
         set numberData       [llength $data]

         if { $numberComponents < 2 } {
             return -code error "The data should contain at least two components"
         }

         set correlation 1

         foreach {option value} $options {
             switch -- $option {
                 "" {
                     # Use default
                 }
                 "-covariance" {
                     set correlation [expr {$value? 0 : 1}]
                 }
                 default {
                     return -code error "Unknown option: $option"
                 }
             }
         }

         lassign [::math::PCA::Transform $data $correlation] observations mean scale

         #
         # Determine the singular value decomposition
         # Square and scale the singular values to get the proper eigenvalues
         #
         set usv          [::math::linearalgebra::determineSVD $observations]
         set eigenVectors [lindex $usv 2]
         set singular     [lindex $usv 1]

         set factor       [expr {1.0 / ([llength $data] - 1)}]
         set eigenValues  {}
         foreach c $singular {
             lappend eigenValues [expr {$c**2 * $factor}]
         }

         #
         # By default we use all principal components
         #
         set retainedVectors $eigenVectors
         set retainedValues  $eigenValues
     }

     #
     # Get the eigenvectors - either the ones to be used or all vectors
     #
     method eigenvectors {{option {}}} {
         variable eigenVectors
         variable retainedVectors

         if { $option eq "-all" } {
             return $eigenVectors
         } else {
             return $retainedVectors
         }
     }

     #
     # Get the eigenvalues - either the ones to be used or all values
     #
     method eigenvalues {{option {}}} {
         variable eigenValues
         variable retainedValues

         if { $option eq "-all" } {
             return $eigenValues
         } else {
             return $retainedValues
         }
     }

     #
     # Approximate an observation vector using the selected components
     #
     method approximate {observation} {
         variable retainedVectors
         variable mean
         variable scale

         set z      [::math::PCA::Normalise $observation $mean $scale]
         set t      [::math::linearalgebra::matmul $z $retainedVectors]
         set zhat   [::math::linearalgebra::matmul $t [::math::linearalgebra::transpose $retainedVectors]]
         set obshat [::math::PCA::Denormalise $zhat $mean $scale]

         return $obshat
     }

     #
     # Approximate the original data - convenience method
     #
     method approximateOriginal {} {
         variable originalData

         set approximation {}

         foreach observation $originalData {
             lappend approximation [my approximate $observation]
         }

         return $approximation
     }

     #
     # Return the scores
     #
     method scores {observation} {
         variable retainedVectors
         variable mean
         variable scale

         set z [::math::PCA::Normalise $observation $mean $scale]
         return [::math::linearalgebra::matmul $z $retainedVectors]
     }

     #
     # Return the distance
     #
     method distance {observation} {
         variable retainedVectors
         variable mean
         variable scale

         set z          [normalise $observation $mean $scale]
         set t          [::math::linearalgebra::matmul $z $retainedVectors]
         set zhat       [::math::linearalgebra::matmul $t [::math::linearalgebra::transpose $retainedVectors]]
         set difference [::math::linearalgebra::sub $z $zhat]
         return [::math::linearalgebra::norm [::math::PCA::Denormalise $difference $mean $scale]]
     }

     #
     # Return the Q statistic
     #
     method qstatistic {observation {option {}}} {
         variable mean
         variable scale

         set z          [::math::PCA::Normalise $observation $mean $scale]
         set t          [::math::linearalgebra::matmul $z $retainedVectors]
         set zhat       [::math::linearalgebra::matmul $t [::math::linearalgebra::transpose $retainedVectors]]
         set difference [::math::linearalgebra::sub $z $zhat]

         set qstat      [::math::linearalgebra::dotproduct $difference $difference]
         if { $option eq "" } {
             return $qstat
         } elseif { $option eq "-original" } {
             return [expr {$qstat * double($numberData) / double($numberData - $numberUsed - 1)}]
         } else {
             return -code error "Unknown option: $option - should be \"-original\""
         }
     }

     #
     # Get the proportions - the amount of variation explained by the components
     #
     method proportions {} {
         variable retainedValues

         set unscaledProportions {}
         foreach e $retainedValues {
             lappend unscaledProportions [expr {$e**2}]
         }

         set scale [lindex $unscaledProportions end]

         foreach p $unscaledProportions {
             lappend proportions [expr {$p / $scale}]
         }
         return $proportions
     }

     #
     # Set/get number of components to be used
     #
     method using {args} {
         variable numberComponents
         variable numberUsed
         variable eigenVectors
         variable retainedVectors

         if { [llength $args] == 0 } {

             return $numberUsed

         } elseif { [llength $args] == 1 } {

             set numberUsed [lindex $args 0]
             if { ![string is integer $numberUsed] || $numberUsed < 1 || $numberUsed > $numberComponents } {
                 return -code error "Number of components to be used must be between 1 and $numberComponents"
             }

         } elseif { [llength $args] == 2 } {

             if { [lindex $args 0] == "-minproportion" } {
                 set minimum [lindex $args 1]
                 if { [string is double $minimum] || $minimum <= 0.0 || $minimum > 1.0 } {
                     return -code error "Wrong arguments: the minimum proportion must be a number between 0 and 1 - it is \"$minimum\""
                 }

                 set sum    0.0
                 set number 0
                 foreach proportion [my proportions] {
                     set  sum    [expr {$sum + $proportion}]
                     incr number

                     if { $sum >= $minimum } {
                         break
                     }
                 }
             }
             if { $number == 0 } {
                 set number 1
             }
             set numberUsed $number

         } else {
             return -code error "Wrong arguments: use either the number of components or the minimal proportion"
         }

         if { $numberUsed < $numberComponents } {
             set retainedValues  [lrange $eigenValues 0 [expr {$numberUsed-1}]]
             set retainedVectors {}
             foreach row $eigenVectors {
                 lappend retainedVectors [lrange $row 0 [expr {$numberUsed-1}]]
             }
         } else {
             set retainedValues  $eigenValues
             set retainedVectors $eigenVectors
         }

         return $numberUsed
     }
}

# Normalise --
#     Normalise a vector, given mean and standard deviation
#
# Arguments:
#     observation       Observation vector to be normalised
#     mean              Mean value to be subtracted
#     scale             Scale factor for dividing the values by
#
proc ::math::PCA::Normalise {observation mean scale} {
    set result {}

    foreach o $observation m $mean s $scale {
        lappend result [expr {($o - $m) / $s}]
    }

    return $result
}

# Denormalise --
#     Denormalise a vector, given mean and standard deviation
#
# Arguments:
#     observation       Normalised observation vector
#     mean              Mean value to be added
#     scale             Scale factor for multiplying the values by
#
proc ::math::PCA::Denormalise {observation mean scale} {
    set result {}

    foreach o $observation m $mean s $scale {
        lappend result [expr {$o * $s + $m}]
    }

    return $result
}

# Transform
#     Transform the given observations and return the transformation parameters
#
# Arguments:
#     observations      List of observation vectors
#     correlation       Use correlation (1) or not
#
proc ::math::PCA::Transform {observations correlation} {
    set columns [llength [lindex $observations 0]]
    set number  [llength $observations]
    set mean    [lrepeat $columns [expr {0.0}]]
    set scale   [lrepeat $columns [expr {0.0}]]

    foreach observation $observations {
        set newMean  {}
        set newScale {}
        foreach o $observation m $mean s $scale {
            lappend newMean  [expr {$m + $o}]
            lappend newScale [expr {$s + $o**2}]
        }
        set mean  $newMean
        set scale $newScale
    }

    set mean  {}
    set scale {}

    foreach m $newMean s $newScale {
        lappend mean  [expr {$m / $number}]
        if { $correlation } {
            set sum [expr {($s - $m**2/$number)/($number-1)}]
            lappend scale [expr {$sum >= 0.0 ? sqrt($sum) : 0.0}]
        } else {
            lappend scale 1.0
        }
    }

    set result {}
    foreach observation $observations {
         lappend result [Normalise $observation $mean $scale]
    }
    return [list $result $mean $scale]
}

package provide math::PCA 1.0

# Test
if {0} {
set data {
    {7 4 3}
    {4 1 8}
    {6 3 5}
    {8 6 1}
    {8 5 7}
    {7 2 9}
    {5 3 3}
    {9 5 8}
    {7 4 5}
    {8 2 2}
}

set pca [::math::PCA::createPCA $data]

puts [$pca using]
puts [$pca using 2]

puts [::math::PCA::Transform $data 1]
puts [::math::PCA::Normalise {1.0 2.0 3.0} {0.0 1.0 2.0} {2.0 2.0 2.0}]
puts [::math::PCA::Denormalise {0.5 0.5 0.5} {0.0 1.0 2.0} {2.0 2.0 2.0}]

puts "Eigenvalues:  [$pca eigenvalues]"
puts "Eigenvectors: [::math::linearalgebra::show [$pca eigenvectors]]"
#puts [$pca proportions] -- check the definition!
$pca using 2
puts "Observation:   [lindex $data 0]"
puts "Approximation: [$pca approximate [lindex $data 0]]"
puts "Scores:        [$pca scores [lindex $data 0]]"
puts "Q-statistic:   [$pca qstatistic [lindex $data 0]]"
puts "(corrected)    [$pca qstatistic [lindex $data 0] -original]"

#puts [::math::PCA::createPCA $data -x 1]
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/math/pca.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# -*- tcl -*-

source [file join \
        [file dirname [file dirname [file join [pwd] [info script]]]] \
        devtools testutilities.tcl]

testsNeedTcl     8.6
testsNeedTcltest 1.0

support {
    useLocal math.tcl       math
    useLocal linalg.tcl     math::linearalgebra
    useLocal statistics.tcl math::statistics
}
testing {
    useLocal pca.tcl math::PCA
}

#package require math::statistics

#
# Matching procedure - flatten the lists
#
proc matchNumbers {expected actual} {
    if {$actual=="" && $expected!=""} then {
        return 0
    }
    if {$actual!="" && $expected==""} then {
        return 0
    }
    set match 1
    if { [llength [lindex $expected 0]] > 1 } {
        foreach a $actual e $expected {
            set match [matchNumbers $e $a]
            if { $match == 0 } {
                break
            }
        }
    } else {

        foreach a $actual e $expected {
            if {[string is double $a]==0  || [string is double $e]==0} then {
                return 0
            }
            if {abs($a-$e) > 0.1e-6} {
                set match 0
                break
            }
        }
    }
    return $match
}

customMatch numbers matchNumbers

# Test the normalise/denormalise procedures

test normalise-1.0 "Normalise a vector" -match numbers -body {
    ::math::PCA::Normalise {1.0 2.0 3.0} {0.0 1.0 2.0} {2.0 2.0 2.0}
} -result {0.5 0.5 0.5}

test normalise-1.1 "Denormalise a vector" -match numbers -body {
    ::math::PCA::Denormalise {0.5 0.5 0.5} {0.0 1.0 2.0} {2.0 2.0 2.0}
} -result {1.0 2.0 3.0}

set plusminus   {{ 3.0 -3.0 -3.0  3.0}
                 {-3.0  3.0  3.0 -3.0}
                 { 0.0  0.0  0.0  0.0}
                 {-3.0  3.0 -3.0  3.0}
                 { 3.0 -3.0  3.0 -3.0}}

set transformed {{ 1.0 -1.0 -1.0  1.0}
                 {-1.0  1.0  1.0 -1.0}
                 { 0.0  0.0  0.0  0.0}
                 {-1.0  1.0 -1.0  1.0}
                 { 1.0 -1.0  1.0 -1.0}}

set zeroes      {0.0 0.0 0.0 0.0}
set threes      {3.0 3.0 3.0 3.0}

set data        {{7 4 3}
                 {4 1 8}
                 {6 3 5}
                 {8 6 1}
                 {8 5 7}
                 {7 2 9}
                 {5 3 3}
                 {9 5 8}
                 {7 4 5}
                 {8 2 2}}
set ones        {1.0 1.0 1.0}

test normalise-1.2 "Check transformation - transformed matrix" -match numbers -body {
    lindex [::math::PCA::Transform $plusminus 1] 0
} -result $transformed

test normalise-1.3 "Check transformation - averages" -match numbers -body {
    lindex [::math::PCA::Transform $plusminus 1] 1
} -result $zeroes

test normalise-1.4 "Check transformation - scale values" -match numbers -body {
    lindex [::math::PCA::Transform $plusminus 1] 2
} -result $threes

test normalise-1.5 "Check transformation - unit standard deviations" -match numbers -body {
    set transformedData  [lindex [::math::PCA::Transform $data 1] 0]
    set transposedMatrix [::math::linearalgebra::transpose $transformedData]

    set stdevs {}
    foreach vector $transposedMatrix {
        lappend stdevs [::math::statistics::stdev $vector]
    }
    set stdevs
} -result $ones

test normalise-1.6 "Check transformation - retain lengths" -match numbers -body {
    lindex [::math::PCA::Transform $data 0] 2
} -result $ones

test create-1.1 "Create a PCA object correctly" -match glob -setup {
    set pca {}
} -body {
    set pca [::math::PCA::createPCA $data]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -returnCodes 0 -result *

test create-1.2 "Create a PCA object correctly - 2" -match glob -setup {
    set pca {}
} -body {
    set pca [::math::PCA::createPCA $data -covariance 0]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -returnCodes 0 -result *

test create-1.3 "Create a PCA object incorrectly" -match glob -setup {
    set pca {}
} -body {
    ::math::PCA::createPCA $zeroes
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -returnCodes 1 -result *

test eigenvectors-1.1 "Get the eigenvectors - all" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    set eigenvectors [$pca eigenvectors]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result {
    {0.6420045763498947 -0.38467229168844363 -0.6632174243435957}
    {0.6863616413605773 -0.0971303301343052 0.7207450285897333}
    {-0.3416691692479824 -0.9179286066874492 0.20166618906061484}}

test eigenvectors-1.2 "Get the eigenvalues - all" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    set eigenvalues [$pca eigenvalues]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result {1.768774136103425 0.9270759168988945 0.30414994699768233}

test eigenvectors-1.3 "Restrict to two components - eigenvectors" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    $pca using 2
    set eigenvectors [$pca eigenvectors]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result {
    {0.6420045763498947 -0.38467229168844363}
    {0.6863616413605773 -0.0971303301343052}
    {-0.3416691692479824 -0.9179286066874492}}

test eigenvectors-1.4 "Restrict to two components - eigenvalues" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    $pca using 2
    set eigenvalues [$pca eigenvalues]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result {1.768774136103425 0.9270759168988945}

test eigenvectors-1.5 "Restrict to two components - get all eigenvectors" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    global pca
    $pca using 2
    set eigenvectors [$pca eigenvectors -all]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result {
    {0.6420045763498947 -0.38467229168844363 -0.6632174243435957}
    {0.6863616413605773 -0.0971303301343052 0.7207450285897333}
    {-0.3416691692479824 -0.9179286066874492 0.20166618906061484}}

test eigenvectors-1.6 "Restrict to two components - get all eigenvalues" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    $pca using 2
    set eigenvalues [$pca eigenvalues -all]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result {1.768774136103425 0.9270759168988945 0.30414994699768233}

test eigenvectors-1.7 "Use all components again" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    $pca using 3
    set eigenvectors [$pca eigenvectors]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result {
    {0.6420045763498947 -0.38467229168844363 -0.6632174243435957}
    {0.6863616413605773 -0.0971303301343052 0.7207450285897333}
    {-0.3416691692479824 -0.9179286066874492 0.20166618906061484}}

test approximation-1.1 "Approximate an observation" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    $pca using 2
    set approximation [$pca approximate [lindex $::data 0]]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result {7.03386897006181 3.961810336299144 2.981031668611465}

test approximation-1.2 "Approximate an observation, get the scores" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    $pca using 2
    set scores [$pca scores [lindex $::data 0]]
} -result {0.5148128141212557 0.630835559461938}

test approximation-1.3 "Approximate an observation, get the Q statistic" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    $pca using 2
    set qstatistic [$pca qstatistic [lindex $::data 0]]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result 0.001123022217614874

test approximation-1.4 "Approximate an observation, get the corrected Q statistic" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    $pca using 2
    set qstatistic [$pca qstatistic [lindex $::data 0] -original]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result 0.0016043174537355342

test approximation-2.1 "Approximate all original data (actually reconstruct)" -match numbers -setup {
    set pca [::math::PCA::createPCA $data]
} -body {
    # Note: as we use all components, we reconstruct the original data "exactly"
    $pca using 3
    set approximation [$pca approximateOriginal]
} -cleanup {
    if { $pca ne "" } {
        $pca destroy
    }
} -result $data
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































Changes to modules/math/pdf_stat.tcl.

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

# ::math::statistics --
#   Namespace holding the procedures and variables
#
namespace eval ::math::statistics {

    namespace export pdf-normal pdf-uniform pdf-lognormal \
	    pdf-exponential pdf-triangular pdf-symmetric-triangular \
	    cdf-normal cdf-uniform cdf-lognormal \
	    cdf-exponential cdf-triangular cdf-symmetric-triangular \
	    cdf-students-t \
	    random-normal random-uniform random-lognormal \
	    random-exponential random-triangular \
	    histogram-uniform \
	    pdf-gamma pdf-poisson pdf-chisquare pdf-students-t pdf-beta \
	    pdf-weibull pdf-gumbel pdf-pareto pdf-cauchy \
	    pdf-laplace pdf-kumaraswamy pdf-negative-binomial \
	    cdf-gamma cdf-poisson cdf-chisquare cdf-beta cdf-F \
	    cdf-weibull cdf-gumbel cdf-pareto cdf-cauchy \
	    cdf-laplace cdf-kumaraswamy cdf-negative-binomial \
	    random-gamma random-poisson random-chisquare random-students-t random-beta \
	    random-weibull random-gumbel random-pareto random-cauchy \
	    random-laplace random-kumaraswamy random-negative-binomial \
	    incompleteGamma incompleteBeta \
	    estimate-pareto empirical-distribution bootstrap estimate-exponential \
	    estimate-laplace estimate-negative-binomial

    variable cdf_normal_prob     {}
    variable cdf_normal_x        {}
    variable cdf_toms322_cached  {}
    variable initialised_cdf     0
    variable twopi               [expr {2.0*acos(-1.0)}]
    variable pi                  [expr {acos(-1.0)}]







|

|


|



<


<


<

|
<







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

# ::math::statistics --
#   Namespace holding the procedures and variables
#
namespace eval ::math::statistics {

    namespace export pdf-normal pdf-uniform pdf-lognormal \
	    pdf-exponential \
	    cdf-normal cdf-uniform cdf-lognormal \
	    cdf-exponential \
	    cdf-students-t \
	    random-normal random-uniform random-lognormal \
	    random-exponential \
	    histogram-uniform \
	    pdf-gamma pdf-poisson pdf-chisquare pdf-students-t pdf-beta \
	    pdf-weibull pdf-gumbel pdf-pareto pdf-cauchy \

	    cdf-gamma cdf-poisson cdf-chisquare cdf-beta cdf-F \
	    cdf-weibull cdf-gumbel cdf-pareto cdf-cauchy \

	    random-gamma random-poisson random-chisquare random-students-t random-beta \
	    random-weibull random-gumbel random-pareto random-cauchy \

	    incompleteGamma incompleteBeta \
	    estimate-pareto empirical-distribution


    variable cdf_normal_prob     {}
    variable cdf_normal_x        {}
    variable cdf_toms322_cached  {}
    variable initialised_cdf     0
    variable twopi               [expr {2.0*acos(-1.0)}]
    variable pi                  [expr {acos(-1.0)}]
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
    set prob [expr {1.0/($pmax-$pmin)}]

    if { $x < $pmin || $x > $pmax } { return 0.0 }

    return $prob
}


# pdf-triangular --
#    Return the probabilities belonging to a triangular distribution
#    (parameters as minimum/maximum)
#
# Arguments:
#    pmin      Minimum of the distribution
#    pmax      Maximum of the distribution
#    x         Value for which the probability must be determined
#
# Result:
#    Probability of value x under the given distribution
#
# Note:
#    If pmin > pmax, the main weight will be at the larger
#    values.
#
proc ::math::statistics::pdf-triangular { pmin pmax x } {

    if { $pmin == $pmax } {
	return -code error -errorcode ARG \
		-errorinfo "Zero range" \
		"Zero range"
    }

    if { $pmin < $pmax } {
        if { $x < $pmin || $x > $pmax } { return 0.0 }
    } else {
        if { $x < $pmax || $x > $pmin } { return 0.0 }
    }

    set prob [expr {2.0*(1.0-($x-$pmin)/($pmax-$pmin))}]


    return $prob
}


# pdf-symmetric-triangular --
#    Return the probabilities belonging to a symmetric triangular distribution
#    (parameters as minimum/maximum)
#
# Arguments:
#    pmin      Minimum of the distribution
#    pmax      Maximum of the distribution
#    x         Value for which the probability must be determined
#
# Result:
#    Probability of value x under the given distribution
#
proc ::math::statistics::pdf-symmetric-triangular { pmin pmax x } {

    if { $pmin == $pmax } {
	return -code error -errorcode ARG \
		-errorinfo "Zero range" \
		"Zero range"
    }

    if { $pmin < $pmax } {
        if { $x < $pmin || $x > $pmax } { return 0.0 }
    } else {
        if { $x < $pmax || $x > $pmin } { return 0.0 }
    }

    set diff   [expr {abs($pmax-$pmin)}]
    set centre [expr {($pmax+$pmin)/2.0}]

    set prob [expr {2./$diff * (1.0 - 2.*abs($x-$centre)/$diff)}]

    return $prob
}


# pdf-exponential --
#    Return the probabilities belonging to an exponential
#    distribution
#
# Arguments:
#    mean     Mean of the distribution







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







119
120
121
122
123
124
125








































































126
127
128
129
130
131
132
    set prob [expr {1.0/($pmax-$pmin)}]

    if { $x < $pmin || $x > $pmax } { return 0.0 }

    return $prob
}










































































# pdf-exponential --
#    Return the probabilities belonging to an exponential
#    distribution
#
# Arguments:
#    mean     Mean of the distribution
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
    }

    if { $x < 0.0 } { return 0.0 }
    if { $x > 700.0*$mean } { return 0.0 }

    set prob [expr {exp(-$x/double($mean))/$mean}]

    return $prob
}


# pdf-laplace --
#    Return the probabilities belonging to a Laplace
#    distribution
#
# Arguments:
#    mean     Mean of the distribution
#    scale    Scale (the spreading) of the distribution
#    x        Value for which the probability must be determined
#
# Result:
#    Probability of value x under the given distribution
#
proc ::math::statistics::pdf-laplace { mean scale x } {
    variable NEGSTDEV
    variable OUTOFRANGE

    if { $scale <= 0.0 } {
	return -code error -errorcode ARG -errorinfo $OUTOFRANGE \
		"$OUTOFRANGE: scale must be positive"
    }

    set prob [expr {exp(-($x-$mean)/double($scale))/(2.0*$scale)}]

    return $prob
}


# pdf-kumaraswamy --
#    Return the probabilities belonging to a Kumaraswamy
#    distribution (akin to the Beta distribution, but tractable)
#
#    Arguments:
#    a         First parameter of the Kumaraswamy distribution
#    b         Second parameter of the Kumaraswamy distribution
#    x         Value of variate
#
# Result:
#    Probability of value x under the given distribution
#
proc ::math::statistics::pdf-kumaraswamy { a b x } {
    variable OUTOFRANGE

    if { $a <= 0.0 || $b <= 0.0 } {
	return -code error -errorcode ARG -errorinfo $OUTOFRANGE \
		"$OUTOFRANGE: parameters a and b must be positive"
    }

    set prob [expr {$a * $b * $x**($a-1) * (1.0 -$x**$a)**($b-1)}]

    return $prob
}


# pdf-negative-binomial --
#    Return the probability belonging to a negative binomial
#    distribution
#
#    Arguments:
#    r         Allowed number of failures for the distribution
#    p         Probability of success for the negative bionomial distribution
#    k         Value of variate (integer)
#
# Result:
#    Probability of k successes under the given distribution
#
proc ::math::statistics::pdf-negative-binomial { r p k } {
    variable OUTOFRANGE
    variable INVALID

    if { $p < 0.0 || $p >= 1.0 } {
	return -code error -errorcode ARG -errorinfo $OUTOFRANGE \
		"$OUTOFRANGE: parameter p must be non-negative and lower than 1"
    }

    if { int($r) != $r || $r < 1 } {
	return -code error -errorcode ARG -errorinfo $INVALIDE \
		"$INVALID: parameter r must be a positive integer"
    }

    set coeff [::math::choose [expr {$k+$r-1}] $k]
    set prob  [expr {$coeff * (1.0 - $p)**$r * $p ** $k}]

    return $prob
}


# cdf-normal --
#    Return the cumulative probability belonging to a normal distribution
#







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







145
146
147
148
149
150
151






















































































152
153
154
155
156
157
158
    }

    if { $x < 0.0 } { return 0.0 }
    if { $x > 700.0*$mean } { return 0.0 }

    set prob [expr {exp(-$x/double($mean))/$mean}]























































































    return $prob
}


# cdf-normal --
#    Return the cumulative probability belonging to a normal distribution
#
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527

    if { $x < $pmin } { return 0.0 }
    if { $x > $pmax } { return 1.0 }

    return $prob
}


# cdf-triangular --
#    Return the cumulative probabilities belonging to a triangular distribution
#    (parameters as minimum/maximum)
#
# Arguments:
#    pmin      Minimum of the distribution
#    pmax      Maximum of the distribution
#    x         Value for which the probability must be determined
#
# Result:
#    Probability of value x under the given distribution
#
# Note:
#    If pmin > pmax, the main weight will be at the larger
#    values.
#
proc ::math::statistics::cdf-triangular { pmin pmax x } {

    if { $pmin == $pmax } {
	return -code error -errorcode ARG \
		-errorinfo "Zero range" \
		"Zero range"
    }


    if { $pmin < $pmax } {
        if { $x < $pmin } { return 0.0 }
        if { $x > $pmax } { return 1.0 }
        set xm   [expr {($x - $pmin) / ($pmax - $pmin)}]
        set prob [expr {2.0*$xm - $xm**2}]
    } else {
        if { $x < $pmax } { return 0.0 }
        if { $x > $pmin } { return 1.0 }
        set xm   [expr {($x - $pmax) / ($pmin - $pmax)}]
        set prob [expr {$xm**2}]
    }

    return $prob
}


# cdf-symmetric-triangular --
#    Return the cumulative probabilities belonging to a symmetric triangular distribution
#    (parameters as minimum/maximum)
#
# Arguments:
#    pmin      Minimum of the distribution
#    pmax      Maximum of the distribution
#    x         Value for which the probability must be determined
#
# Result:
#    Probability of value x under the given distribution
#
proc ::math::statistics::cdf-symmetric-triangular { pmin pmax x } {

    if { $pmin == $pmax } {
	return -code error -errorcode ARG \
		-errorinfo "Zero range" \
		"Zero range"
    }


    set diff   [expr {abs($pmax-$pmin)/2.0}]
    set centre [expr {($pmax+$pmin)/2.0}]

    if { $pmin < $pmax } {
        if { $x < $pmin } { return 0.0 }
        if { $x > $pmax } { return 1.0 }
    } else {
        if { $x < $pmax } { return 0.0 }
        if { $x > $pmin } { return 1.0 }
    }

    if { $x < $centre } {
        set xm   [expr {($x - $centre + $diff) / $diff}]
        set prob [expr {0.5 * $xm**2}]
    } else {
        set xm   [expr {($x - $centre - $diff) / $diff}]
        set prob [expr {1.0 - 0.5 * $xm**2}]
    }

    return $prob
}


# cdf-exponential --
#    Return the cumulative probabilities belonging to an exponential
#    distribution
#
# Arguments:
#    mean     Mean of the distribution







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







267
268
269
270
271
272
273





















































































274
275
276
277
278
279
280

    if { $x < $pmin } { return 0.0 }
    if { $x > $pmax } { return 1.0 }

    return $prob
}























































































# cdf-exponential --
#    Return the cumulative probabilities belonging to an exponential
#    distribution
#
# Arguments:
#    mean     Mean of the distribution
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
    if { $x > 30.0*$mean } { return 1.0 }

    set prob [expr {1.0-exp(-$x/double($mean))}]

    return $prob
}


# cdf-laplace --
#    Return the cumulative probabilities belonging to a Laplace
#    distribution
#
# Arguments:
#    mean     Mean of the distribution
#    scale    Scale (the spreading) of the distribution
#    x        Value for which the probability must be determined
#
# Result:
#    Cumulative probability of value x under the given distribution
#
proc ::math::statistics::cdf-laplace { mean scale x } {
    variable NEGSTDEV
    variable OUTOFRANGE

    if { $scale <= 0.0 } {
	return -code error -errorcode ARG -errorinfo $OUTOFRANGE \
		"$OUTOFRANGE: scale must be positive"
    }

    if { $x < $mean } {
        set prob [expr {0.5 * exp(($x-$mean)/double($scale))}]
    } else {
        set prob [expr {1.0 - 0.5 * exp(($mean-$x)/double($scale))}]
    }

    return $prob
}


# cdf-kumaraswamy --
#    Return the cumulative probabilities belonging to a Kumaraswamy
#    distribution (akin to the Beta distribution, but tractable)
#
#    Arguments:
#    a         First parameter of the Kumaraswamy distribution
#    b         Second parameter of the Kumaraswamy distribution
#    x         Value of variate
#
# Result:
#    Cumulative probability of value x under the given distribution
#
proc ::math::statistics::cdf-kumaraswamy { a b x } {
    variable OUTOFRANGE

    if { $a <= 0.0 || $b <= 0.0 } {
	return -code error -errorcode ARG -errorinfo $OUTOFRANGE \
		"$OUTOFRANGE: parameters a and b must be positive"
    }

    set prob [expr {1.0 - (1.0-$x**$a) ** $b}]

    return $prob
}


# cdf-negative-binomial --
#    Return the cumulative probability for a negative binomial distribution
#
#    Arguments:
#    r         Allowed number of failures for the distribution
#    p         Probability of success for the negative bionomial distribution
#    k         Value of variate (integer)
#
# Result:
#    Cumulative probability for up to k successes under the given distribution
#
proc ::math::statistics::cdf-negative-binomial { r p k } {
    variable OUTOFRANGE
    variable INVALID

    if { $p < 0.0 || $p >= 1.0 } {
	return -code error -errorcode ARG -errorinfo $OUTOFRANGE \
		"$OUTOFRANGE: parameter p must be non-negative and lower than 1"
    }

    if { int($r) != $r || $r < 1 } {
	return -code error -errorcode ARG -errorinfo $INVALIDE \
		"$INVALID: parameter r must be a positive integer"
    }

    set sum 0.0

    for { set i 0 } { $i <= $k } { incr i } {
        set prob [pdf-negative-binomial $r $p $i]
        set sum  [expr {$sum + $prob}]
    }

    return $sum
}


# Inverse-cdf-uniform --
#    Return the argument belonging to the cumulative probability
#    for a uniform distribution (parameters as minimum/maximum)
#
# Arguments:
#    pmin      Minimum of the distribution







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







296
297
298
299
300
301
302





























































































303
304
305
306
307
308
309
    if { $x > 30.0*$mean } { return 1.0 }

    set prob [expr {1.0-exp(-$x/double($mean))}]

    return $prob
}































































































# Inverse-cdf-uniform --
#    Return the argument belonging to the cumulative probability
#    for a uniform distribution (parameters as minimum/maximum)
#
# Arguments:
#    pmin      Minimum of the distribution
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
    }

    set result {}
    for { set i 0 }  {$i < $number } { incr i } {
	lappend result [Inverse-cdf-uniform $pmin $pmax [expr {rand()}]]
    }

    return $result
}


# random-triangular --
#    Return a list of random numbers satisfying a triangular
#    distribution (parameters as minimum/maximum)
#
# Arguments:
#    pmin      Minimum of the distribution
#    pmax      Maximum of the distribution
#    number    Number of values to generate
#
# Result:
#    List of random numbers
#
proc ::math::statistics::random-triangular { pmin pmax number } {

    if { $pmin == $pmax } {
	return -code error -errorcode ARG \
		-errorinfo "Zero range" \
		"Zero range"
    }

    set diff [expr {$pmax - $pmin}]
    if { $pmin < $pmax } {
        set result {}
        for { set i 0 }  {$i < $number } { incr i } {
	    set r [expr {1.0 - sqrt(1.0 - rand())}]
	    lappend result [expr {$pmin + $r * $diff}]
        }
    } else {
        set result {}
        for { set i 0 }  {$i < $number } { incr i } {
	    lappend result [expr {$pmax - sqrt(rand()) * $diff}]
        }
    }

    return $result
}


# random-symmetric-triangular --
#    Return a list of random numbers satisfying a symmetric triangular
#    distribution (parameters as minimum/maximum)
#
# Arguments:
#    pmin      Minimum of the distribution
#    pmax      Maximum of the distribution
#    number    Number of values to generate
#
# Result:
#    List of random numbers
#
proc ::math::statistics::random-symmetric-triangular { pmin pmax number } {

    if { $pmin == $pmax } {
	return -code error -errorcode ARG \
		-errorinfo "Zero range" \
		"Zero range"
    }

    set diff2 [expr {0.5 * ($pmax - $pmin)}]

    set result {}
    for { set i 0 }  {$i < $number } { incr i } {
	lappend result [expr {$pmin + $diff2 * (rand() + rand())}]
    }

    return $result
}


# random-exponential --
#    Return a list of random numbers satisfying an exponential
#    distribution







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







480
481
482
483
484
485
486





































































487
488
489
490
491
492
493
    }

    set result {}
    for { set i 0 }  {$i < $number } { incr i } {
	lappend result [Inverse-cdf-uniform $pmin $pmax [expr {rand()}]]
    }






































































    return $result
}


# random-exponential --
#    Return a list of random numbers satisfying an exponential
#    distribution
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
    set retval {}
    for {set i 0} {$i < $number} {incr i} {
        lappend retval [expr {$location + $scale * tan( $pi * (rand() - 0.5))}]
    }
    return $retval
}


# random-laplace --
#    Generate a list of Laplace distributed deviates
#
# Arguments:
#    mean     Mean of the distribution
#    scale    Scale (the spreading) of the distribution
#    number   Number of values to return
#
# Result:
#    List of random numbers
#
proc ::math::statistics::random-laplace { mean scale number } {
    variable NEGSTDEV
    variable OUTOFRANGE

    if { $scale <= 0.0 } {
	return -code error -errorcode ARG -errorinfo $OUTOFRANGE \
		"$OUTOFRANGE: scale must be positive"
    }

    set retval {}
    for {set i 0} {$i < $number} {incr i} {
        set p [expr {rand()}]
        if { $p < 0.5 } {
            set x [expr {$mean + $scale * log(1.0 - 2.0*abs($p-0.5))}]
        } else {
            set x [expr {$mean - $scale * log(1.0 - 2.0*abs($p-0.5))}]
        }
        lappend retval $x
    }

    return $retval
}


# random-kumaraswamy --
#    Generate a list of Kumaraswamy distributed deviates
#
#    Arguments:
#    a         First parameter of the Kumaraswamy distribution
#    b         Second parameter of the Kumaraswamy distribution
#    number    Number of values to return
#
# Result:
#    List of random numbers
#
proc ::math::statistics::random-kumaraswamy { a b number } {
    variable OUTOFRANGE

    if { $a <= 0.0 || $b <= 0.0 } {
	return -code error -errorcode ARG -errorinfo $OUTOFRANGE \
		"$OUTOFRANGE: parameters a and b must be positive"
    }

    set ra [expr {1.0 / $a}]
    set rb [expr {1.0 / $b}]

    set retval {}
    for {set i 0} {$i < $number} {incr i} {
        set p [expr {rand()}]
        set x [expr {( 1.0 - (1.0-$p) ** $rb ) ** $ra}]

        lappend retval $x
    }

    return $retval
}


# random-negative-binomial --
#    Generate a list of deviates according to the negative binomial distribution
#
#    Arguments:
#    r         Allowed number of failures for the distribution
#    p         Probability of success for the negative bionomial distribution
#    number    Number of values to return
#
# Result:
#    List of random numbers
#
proc ::math::statistics::random-negative-binomial { r p number } {
    variable OUTOFRANGE
    variable INVALID

    if { $p < 0.0 || $p >= 1.0 } {
	return -code error -errorcode ARG -errorinfo $OUTOFRANGE \
		"$OUTOFRANGE: parameter p must be non-negative and lower than 1"
    }

    if { int($r) != $r || $r < 1} {
	return -code error -errorcode ARG -errorinfo $INVALIDE \
		"$INVALID: parameter r must be a positive integer"
    }

    set retval {}
    for {set i 0} {$i < $number} {incr i} {
        set success 0
        set failure 0

        while { $failure < $r } {
            if { rand() <= $p } {
                incr success
            } else {
                incr failure
            }
        }

        lappend retval $success
    }

    return $retval
}


# estimate-pareto --
#    Estimate the parameters of a Pareto distribution
#
# Arguments:
#    values    Values that are supposed to be distributed according to Pareto
#







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1895
1896
1897
1898
1899
1900
1901


















































































































1902
1903
1904
1905
1906
1907
1908
    set retval {}
    for {set i 0} {$i < $number} {incr i} {
        lappend retval [expr {$location + $scale * tan( $pi * (rand() - 0.5))}]
    }
    return $retval
}




















































































































# estimate-pareto --
#    Estimate the parameters of a Pareto distribution
#
# Arguments:
#    values    Values that are supposed to be distributed according to Pareto
#
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
        set sum [expr {$sum + log($v) - log($scale)}]
    }
    set shape [expr {$n / $sum}]

    return [list $scale $shape [expr {$shape/sqrt($n)}]]
}


# estimate-exponential --
#    Estimate the parameter of an exponential distribution
#
# Arguments:
#    values    Values that are supposed to be exponentially distributed
#
# Result:
#    Estimate of the one parameter of the exponential distribution
#    as well as the asymptotic standard deviation
#    (See https://www.statlect.com/fundamentals-of-statistics/exponential-distribution-maximum-likelihood)
#
proc ::math::statistics::estimate-exponential { values } {

    set sum   0.0
    set count 0

    foreach v $values {
        if { $v != "" } {
            set  sum [expr {$sum + $v}]
            incr count
        }
    }

    set parameter [expr {$sum/double($count)}]
    set stdev     [expr {$parameter / sqrt($count)}]

    return [list $parameter $stdev]
}


# estimate-laplace --
#    Estimate the parameter of a Laplace distribution
#
# Arguments:
#    values    Values that are supposed to be Laplace distributed
#
# Result:
#    Estimates of respectively the mean and the scale of the Laplace distribution
#    (See https://en.wikipedia.org/wiki/Laplace_distribution)
#
# Note:
#    According to Wikipedia the estimators are maximum-likelihood estimators
#
proc ::math::statistics::estimate-laplace { values } {

    set mean [median $values]

    set sum   0.0
    set count 0

    foreach v $values {
        if { $v != "" } {
            set  sum [expr {$sum + abs($v-$mean)}]
            incr count
        }
    }

    set scale [expr {$sum/double($count)}]

    return [list $mean $scale]
}


# estimate-negative-binomial --
#    Estimate the parameter p of a negative binomial distribution,
#    given the allowed number of failures
#
# Arguments:
#    r         Allowed number of failures
#    values    Values that are supposed to be distributed according to a negative binomial distribution
#
# Result:
#    Estimate of the probability of success for the distribution
#
# Note:
#    According to Wikipedia the estimators are maximum-likelihood estimators
#
proc ::math::statistics::estimate-negative-binomial { r values } {

    set sum   0.0
    set count 0

    foreach v $values {
        if { $v != "" } {
            set  sum [expr {$sum + $v}]
            incr count
        }
    }

    return [expr {$sum/double($count * $r + $sum)}]
}


# empirical-distribution --
#    Determine the empirical distribution
#
# Arguments:
#    values    Values that are to be examined
#







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1946
1947
1948
1949
1950
1951
1952





























































































1953
1954
1955
1956
1957
1958
1959
        set sum [expr {$sum + log($v) - log($scale)}]
    }
    set shape [expr {$n / $sum}]

    return [list $scale $shape [expr {$shape/sqrt($n)}]]
}































































































# empirical-distribution --
#    Determine the empirical distribution
#
# Arguments:
#    values    Values that are to be examined
#
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660

2661
2662
2663
2664
2665
2666
2667
            incr idx
        }
    }

    return $distribution
}


# bootstrap --
#     Return samples according to the "bootstrap" method
#
# Arguments:
#     data           List of data from which to construct the new sample or samples
#     sampleSize     Number of values to draw for each sample
#     numberSamples  Number of samples (defaults to 1)
#
# Result:
#     Either a list of "sampleSize" values (if only one sample is required) or
#     a list of "numberSamples" each of which is a list of "sampleSize" values.
#
proc ::math::statistics::bootstrap {data sampleSize {numberSamples 1}} {
    if { $numberSamples > 1 } {
        set samples {}
        for {set i 0} {$i < $numberSamples} {incr i} {
            lappend samples [bootstrap $data $sampleSize 1]
        }
        return $samples

    } else {
        set sample     {}
        set numberData [llength $data]
        for {set i 0} {$i < $sampleSize} {incr i} {
            set idx [expr {int(rand() * $numberData)}]
            lappend sample [lindex $data $idx]
        }
        return $sample
    }
}


#
# Simple numerical tests
#
if { [info exists ::argv0] && ([file tail [info script]] == [file tail $::argv0]) } {

    #
    # Apparent accuracy: at least one digit more than the ones in the
    # given numbers
    #
    puts "Normal distribution - two-tailed"
    foreach z    {4.417 3.891 3.291 2.576 2.241 1.960 1.645 1.150 0.674
    0.319 0.126 0.063 0.0125} \
	    pexp {1.e-5 1.e-4 1.e-3 1.e-2 0.025 0.050 0.100 0.250 0.500
    0.750 0.900 0.950 0.990 } {
	set prob [::math::statistics::Cdf-toms322 1 5000 [expr {$z*$z}]]
	puts "$z - $pexp - [expr {1.0-$prob}]"
    }

    puts "Normal distribution (inverted; one-tailed)"
    foreach p {0.001 0.01 0.1 0.25 0.5 0.75 0.9 0.99 0.999} {
	puts "$p - [::math::statistics::Inverse-cdf-normal 0.0 1.0 $p]"
    }
    puts "Normal random variables"
    set rndvars [::math::statistics::random-normal 1.0 2.0 20]
    puts $rndvars







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















>







1988
1989
1990
1991
1992
1993
1994
































1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
            incr idx
        }
    }

    return $distribution
}


































#
# Simple numerical tests
#
if { [info exists ::argv0] && ([file tail [info script]] == [file tail $::argv0]) } {

    #
    # Apparent accuracy: at least one digit more than the ones in the
    # given numbers
    #
    puts "Normal distribution - two-tailed"
    foreach z    {4.417 3.891 3.291 2.576 2.241 1.960 1.645 1.150 0.674
    0.319 0.126 0.063 0.0125} \
	    pexp {1.e-5 1.e-4 1.e-3 1.e-2 0.025 0.050 0.100 0.250 0.500
    0.750 0.900 0.950 0.990 } {
	set prob [::math::statistics::Cdf-toms322 1 5000 [expr {$z*$z}]]
	puts "$z - $pexp - [expr {1.0-$prob}]"
    }

    puts "Normal distribution (inverted; one-tailed)"
    foreach p {0.001 0.01 0.1 0.25 0.5 0.75 0.9 0.99 0.999} {
	puts "$p - [::math::statistics::Inverse-cdf-normal 0.0 1.0 $p]"
    }
    puts "Normal random variables"
    set rndvars [::math::statistics::random-normal 1.0 2.0 20]
    puts $rndvars

Changes to modules/math/pkgIndex.tcl.

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
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded math                    1.2.5 [list source [file join $dir math.tcl]]
package ifneeded math::fuzzy             0.2.1 [list source [file join $dir fuzzy.tcl]]
package ifneeded math::complexnumbers    1.0.2 [list source [file join $dir qcomplex.tcl]]

package ifneeded math::constants         1.0.2 [list source [file join $dir constants.tcl]]
package ifneeded math::polynomials       1.0.1 [list source [file join $dir polynomials.tcl]]
package ifneeded math::rationalfunctions 1.0.1 [list source [file join $dir rational_funcs.tcl]]
package ifneeded math::fourier           1.0.2 [list source [file join $dir fourier.tcl]]

if {![package vsatisfies [package provide Tcl] 8.3]} {return}
package ifneeded math::roman             1.0   [list source [file join $dir romannumerals.tcl]]

if {![package vsatisfies [package provide Tcl] 8.4]} {return}


package ifneeded math::optimize          1.0.1 [list source [file join $dir optimize.tcl]]

package ifneeded math::interpolate       1.1.2 [list source [file join $dir interpolate.tcl]]

package ifneeded math::bignum            3.1.1 [list source [file join $dir bignum.tcl]]
package ifneeded math::bigfloat          1.2.2 [list source [file join $dir bigfloat.tcl]]
package ifneeded math::machineparameters 0.1   [list source [file join $dir machineparameters.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded math::calculus          0.8.2 [list source [file join $dir calculus.tcl]]
# statistics depends on linearalgebra (for multi-variate linear regression).
# statistics depends on optimize (for logistic regression).
package ifneeded math::statistics        1.5.0 [list source [file join $dir statistics.tcl]]
package ifneeded math::linearalgebra     1.1.6 [list source [file join $dir linalg.tcl]]
package ifneeded math::calculus::symdiff 1.0.1 [list source [file join $dir symdiff.tcl]]
package ifneeded math::bigfloat          2.0.2 [list source [file join $dir bigfloat2.tcl]]
package ifneeded math::numtheory         1.1.2 [list source [file join $dir numtheory.tcl]]
package ifneeded math::decimal           1.0.3 [list source [file join $dir decimal.tcl]]
package ifneeded math::geometry          1.4.1 [list source [file join $dir geometry.tcl]]
package ifneeded math::trig              1.0   [list source [file join $dir trig.tcl]]
package ifneeded math::quasirandom       1.0   [list source [file join $dir quasirandom.tcl]]
package ifneeded math::special           0.5.0 [list source [file join $dir special.tcl]]

if {![package vsatisfies [package require Tcl] 8.6]} {return}
package ifneeded math::exact             1.0.1 [list source [file join $dir exact.tcl]]
package ifneeded math::PCA               1.0   [list source [file join $dir pca.tcl]]
package ifneeded math::filters           0.1   [list source [file join $dir filtergen.tcl]]
package ifneeded math::probopt           1.0   [list source [file join $dir probopt.tcl]]
package ifneeded math::changepoint       0.1   [list source [file join $dir changepoint.tcl]]
package ifneeded math::combinatorics     2.0   [list source [file join $dir combinatoricsExt.tcl]]




>









>
>

>
|
>





<
<
<
<
<


|

|
<
<
<
<

|
<
<
<
<
<
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





if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded math                    1.2.5 [list source [file join $dir math.tcl]]
package ifneeded math::fuzzy             0.2.1 [list source [file join $dir fuzzy.tcl]]
package ifneeded math::complexnumbers    1.0.2 [list source [file join $dir qcomplex.tcl]]
package ifneeded math::special           0.3.0 [list source [file join $dir special.tcl]]
package ifneeded math::constants         1.0.2 [list source [file join $dir constants.tcl]]
package ifneeded math::polynomials       1.0.1 [list source [file join $dir polynomials.tcl]]
package ifneeded math::rationalfunctions 1.0.1 [list source [file join $dir rational_funcs.tcl]]
package ifneeded math::fourier           1.0.2 [list source [file join $dir fourier.tcl]]

if {![package vsatisfies [package provide Tcl] 8.3]} {return}
package ifneeded math::roman             1.0   [list source [file join $dir romannumerals.tcl]]

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
# statistics depends on linearalgebra (for multi-variate linear regression).
package ifneeded math::statistics        1.1.0 [list source [file join $dir statistics.tcl]]
package ifneeded math::optimize          1.0.1 [list source [file join $dir optimize.tcl]]
package ifneeded math::calculus          0.8.1 [list source [file join $dir calculus.tcl]]
package ifneeded math::interpolate       1.1.1 [list source [file join $dir interpolate.tcl]]
package ifneeded math::linearalgebra     1.1.5 [list source [file join $dir linalg.tcl]]
package ifneeded math::bignum            3.1.1 [list source [file join $dir bignum.tcl]]
package ifneeded math::bigfloat          1.2.2 [list source [file join $dir bigfloat.tcl]]
package ifneeded math::machineparameters 0.1   [list source [file join $dir machineparameters.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}





package ifneeded math::calculus::symdiff 1.0.1 [list source [file join $dir symdiff.tcl]]
package ifneeded math::bigfloat          2.0.2 [list source [file join $dir bigfloat2.tcl]]
package ifneeded math::numtheory         1.0   [list source [file join $dir numtheory.tcl]]
package ifneeded math::decimal           1.0.3 [list source [file join $dir decimal.tcl]]
package ifneeded math::geometry          1.2.2 [list source [file join $dir geometry.tcl]]




if {![package vsatisfies [package require Tcl] 8.6]} {return}
package ifneeded math::exact             1.0   [list source [file join $dir exact.tcl]]





Changes to modules/math/polynomials.man.

211
212
213
214
215
216
217
218
219

To recognise that a polynomial definition is indeed a correct
definition, it consists of a list of two elements: the keyword
"POLYNOMIAL" and the list of coefficients in descending order. The
latter makes it easier to implement Horner's rule.

[vset CATEGORY {math :: polynomials}]
[include ../common-text/feedback.inc]
[manpage_end]







|

211
212
213
214
215
216
217
218
219

To recognise that a polynomial definition is indeed a correct
definition, it consists of a list of two elements: the keyword
"POLYNOMIAL" and the list of coefficients in descending order. The
latter makes it easier to implement Horner's rule.

[vset CATEGORY {math :: polynomials}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/polynomials.test.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- tcl -*-
# polynomials.test --
#    Test cases for the ::math::polynomials package
#

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal polynomials.tcl math::polynomials











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- tcl -*-
# polynomials.test --
#    Test cases for the ::math::polynomials package
#

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.3
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal polynomials.tcl math::polynomials

Deleted modules/math/primes.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
##
## This is the file `primes.tcl',
## generated with the SAK utility
## (sak docstrip/regen).
##
## The original source files were:
##
## numtheory.dtx  (with options: `pkg_primes pkg_common')
##
## In other words:
## **************************************
## * This Source is not the True Source *
## **************************************
## the true source is the file from which this one was generated.
##
# Copyright (c) 2010 by Lars Hellstrom.  All rights reserved.
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# primes.tcl --
#     Provide additional procedures for the number theory package
#
namespace eval ::math::numtheory {
    variable primes {2 3 5 7 11 13 17}
    variable nextPrimeCandidate 19
    variable nextPrimeIncrement  1 ;# Examine numbers 6n+1 and 6n+5

    namespace export firstNprimes primesLowerThan primeFactors uniquePrimeFactors factors \
                     totient moebius legendre jacobi gcd lcm \
                     numberPrimesGauss numberPrimesLegendre numberPrimesLegendreModified \
                     differenceNumberPrimesLegendreModified
}

# ComputeNextPrime --
#     Determine the next prime
#
# Arguments:
#     None
#
# Result:
#     None
#
# Side effects:
#     One prime added to the list of primes
#
# Note:
#     Using a true sieve of Erathostenes might be faster, but
#     this does work. Even computing the first ten thousand
#     does not seem to be slow.
#
proc ::math::numtheory::ComputeNextPrime {} {
    variable primes
    variable nextPrimeCandidate
    variable nextPrimeIncrement

    while {1} {
        #
        # Test the current candidate
        #
        set sqrtCandidate [expr {sqrt($nextPrimeCandidate)}]

        set isprime 1
        foreach p $primes {
            if { $p > $sqrtCandidate } {
                break
            }
            if { $nextPrimeCandidate % $p == 0 } {
                set isprime 0
                break
            }
        }

        if { $isprime } {
            lappend primes $nextPrimeCandidate
        }

        #
        # In any case get the next candidate
        #
        if { $nextPrimeIncrement == 1 } {
            set nextPrimeIncrement 5
            set nextPrimeCandidate [expr {$nextPrimeCandidate + 4}]
        } else {
            set nextPrimeIncrement 1
            set nextPrimeCandidate [expr {$nextPrimeCandidate + 2}]
        }

        if { $isprime } {
            break
        }
    }
}

# firstNprimes --
#     Return the first N primes
#
# Arguments:
#     number           Number of primes to return
#
# Result:
#     List of the first $number primes
#
proc ::math::numtheory::firstNprimes {number} {
    variable primes

    while { [llength $primes] < $number } {
        ComputeNextPrime
    }

    return [lrange $primes 0 [expr {$number-1}]]
}

# primesLowerThan --
#     Return the primes lower than some threshold
#
# Arguments:
#     threshold        Threshold for the primes
#
# Result:
#     List of primes lower/equal to the threshold
#
proc ::math::numtheory::primesLowerThan {threshold} {
    variable primes

    while { [lindex $primes end] < $threshold } {
        ComputeNextPrime
    }

    set n 0
    foreach p $primes {
        if { $p > $threshold } {
            break
        } else {
            incr n
        }
    }
    return [lrange $primes 0 [expr {$n-1}]]
}

# primeFactors --
#     Determine the prime factors of a number
#
# Arguments:
#     number           Number to factorise
#
# Result:
#     List of prime factors
#
proc ::math::numtheory::primeFactors {number} {
    variable primes

    #
    # Make sure we have enough primes
    #
    primesLowerThan [expr {sqrt($number)}]

    set factors {}

    set idx 0

    while { $number > 1 } {
        set p [lindex $primes $idx]
        if {$p == {}} {
            lappend factors $number
            break
        }
        if { $number % $p == 0 } {
            lappend factors $p
            set number [expr {$number/$p}]
        } else {
            incr idx
        }
    }

    return $factors
}

# uniquePrimeFactors --
#     Determine the unique prime factors of a number
#
# Arguments:
#     number           Number to factorise
#
# Result:
#     List of unique prime factors
#
proc ::math::numtheory::uniquePrimeFactors {number} {
    return [lsort -unique -integer [primeFactors $number]]
}

# totient --
#     Evaluate the Euler totient function for a number
#
# Arguments:
#     number           Number in question
#
# Result:
#     Totient of the given number (number of numbers
#     relatively prime to the number)
#
proc ::math::numtheory::totient {number} {
    set factors [uniquePrimeFactors $number]

    set totient $number

    foreach f $factors {
        set totient [expr {($totient * ($f-1)) / $f}]
    }

    return $totient
}

# factors --
#     Return all (unique) factors of a number
#
# Arguments:
#     number           Number in question
#
# Result:
#     List of factors including 1 and the number itself
#
# Note:
#     The algorithm for constructing the power set was taken from
#     wiki.tcl.tk/2877 (algorithm subsets2b).
#
proc ::math::numtheory::factors {number} {
    set factors [primeFactors $number]

    #
    # Iterate over the power set of this list
    #
    set result [list 1 $number]
    for {set n 1} {$n < [llength $factors]} {incr n} {
        set subsets [list [list]]
        foreach f $factors {
            foreach subset $subsets {
                lappend subset $f
                if {[llength $subset] == $n} {
                    lappend result [Product $subset]
                } else {
                    lappend subsets $subset
                }
            }
        }
    }
    return [lsort -unique -integer $result]
}

# Product --
#     Auxiliary function: return the product of a list of numbers
#
# Arguments:
#     list           List of numbers
#
# Result:
#     The product of all the numbers
#
proc ::math::numtheory::Product {list} {
    set product 1
    foreach e $list {
        set product [expr {$product * $e}]
    }
    return $product
}

# moebius --
#     Return the value of the Moebius function for "number"
#
# Arguments:
#     number         Number in question
#
# Result:
#     The product of all the numbers
#
proc ::math::numtheory::moebius {number} {
    if { $number < 1 } {
        return -code error "The number must be positive"
    }
    if { $number == 1 } {
        return 1
    }

    set primefactors [primeFactors $number]
    if { [llength $primefactors] != [llength [lsort -unique -integer $primefactors]] } {
        return 0
    } else {
        return [expr {(-1)**([llength $primefactors]%2)}]
    }
}

# legendre --
#     Return the value of the Legendre symbol (a/p)
#
# Arguments:
#     a              Upper number in the symbol
#     p              Lower number in the symbol
#
# Result:
#     The Legendre symbol
#
proc ::math::numtheory::legendre {a p} {
    if { $p == 0 } {
        return -code error "The number p must be non-zero"
    }

    if { $a % $p == 0 } {
        return 0
    }

    #
    # Just take the brute force route
    # (Negative values of a present a small problem, but only a small one)
    #
    while { $a < 0 } {
        set a [expr {$p + $a}]
    }

    set legendre -1
    for {set n 1} {$n < $p} {incr n} {
        if { $n**2 % $p == $a } {
            set legendre 1
            break
        }
    }

    return $legendre
}

# jacobi --
#     Return the value of the Jacobi symbol (a/b)
#
# Arguments:
#     a              Upper number in the symbol
#     b              Lower number in the symbol
#
# Result:
#     The Jacobi symbol
#
# Note:
#     Implementation adopted from the Wiki - http://wiki.tcl.tk/36990
#     encoded by rmelton 9/25/12
#     Further references:
#     http://en.wikipedia.org/wiki/Jacobi_symbol
#     http://2000clicks.com/mathhelp/NumberTh27JacobiSymbolAlgorithm.aspx
#
proc ::math::numtheory::jacobi {a b} {
    if { $b<=0 || ($b&1)==0 } {
        return 0;
    }

    set j 1
    if {$a<0} {
        set a [expr {0-$a}]
        set j [expr {0-$j}]
    }
    while {$a != 0} {
        while {($a&1) == 0} {
            ##/* Process factors of 2: Jacobi(2,b)=-1 if b=3,5 (mod 8) */
            set a [expr {$a>>1}]
            if {(($b & 7)==3) || (($b & 7)==5)} {
                set j [expr {0-$j}]
            }
        }
        ##/* Quadratic reciprocity: Jacobi(a,b)=-Jacobi(b,a) if a=3,b=3 (mod 4) */
        lassign [list $a $b] b a
        if {(($a & 3)==3) && (($b & 3)==3)} {
            set j [expr {0-$j}]
        }
        set a [expr {$a % $b}]
    }
    if {$b==1} {
        return $j
    } else {
        return 0
    }
}

# gcd --
#     Return the greatest common divisor of two numbers n and m
#
# Arguments:
#     n              First number
#     m              Second number
#
# Result:
#     The greatest common divisor
#
proc ::math::numtheory::gcd {n m} {
    #
    # Apply Euclid's good old algorithm
    #
    if { $n > $m } {
        set t $n
        set n $m
        set m $t
    }

    while { $n > 0 } {
        set r [expr {$m % $n}]
        set m $n
        set n $r
    }

    return $m
}

# lcm --
#     Return the lowest common multiple of two numbers n and m
#
# Arguments:
#     n              First number
#     m              Second number
#
# Result:
#     The lowest common multiple
#
proc ::math::numtheory::lcm {n m} {
    set gcd [gcd $n $m]
    return [expr {$n*$m/$gcd}]
}

# numberPrimesGauss --
#     Return the approximate number of primes lower than the given value based on the formula by Gauss
#
# Arguments:
#     limit            The limit for the largest prime to be included in the estimate
#
# Returns:
#     Approximate number of primes
#
proc ::math::numtheory::numberPrimesGauss {limit} {
    if { $limit <= 1 } {
        return -code error "The limit must be larger than 1"
    }
    expr {$limit / log($limit)}
}

# numberPrimesLegendre --
#     Return the approximate number of primes lower than the given value based on the formula by Legendre
#
# Arguments:
#     limit            The limit for the largest prime to be included in the estimate
#
# Returns:
#     Approximate number of primes
#
proc ::math::numtheory::numberPrimesLegendre {limit} {
    if { $limit <= 1 } {
        return -code error "The limit must be larger than 1"
    }
    expr {$limit / (log($limit) - 1.0)}
}

# numberPrimesLegendreModified --
#     Return the approximate number of primes lower than the given value based on the
#     modified formula by Legendre
#
# Arguments:
#     limit            The limit for the largest prime to be included in the estimate
#
# Returns:
#     Approximate number of primes
#
proc ::math::numtheory::numberPrimesLegendreModified {limit} {
    if { $limit <= 1 } {
        return -code error "The limit must be larger than 1"
    }
    expr {$limit / (log($limit) - 1.08366)}
}

# differenceNumberPrimesLegendreModified --
#     Return the approximate difference number of primes
#     between a lower and higher limit as given values
#     for approximate number of primes based on the
#     modified formula by Legendre
#
# Arguments:
#     limit1     The lower limit for the interval, largest prime to be included in the l.limit
#     limit2     The upper limit for the interval, largest prime to be included in the u.mlimit
#
# Returns:
#     Approximate difference number of primes
#
proc ::math::numtheory::differenceNumberPrimesLegendreModified {limit1 limit2} {
    if { $limit1 <= 1 } {
        return -code error "The lower limit must be larger than 1"
    }
    if { $limit2 <= 1 } {
        return -code error "The upper limit must be larger than 1"
    }

     set aa [::math::numtheory::numberPrimesLegendreModified [expr ($limit1)]]
     set bb [::math::numtheory::numberPrimesLegendreModified [expr ($limit2)]]
     expr {abs($bb-$aa)}
}

##
##
## End of file `primes.tcl'.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/math/primes.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
##
## This is the file `primes.test',
## generated with the SAK utility
## (sak docstrip/regen).
##
## The original source files were:
##
## numtheory.dtx  (with options: `test_primes test_common')
##
## In other words:
## **************************************
## * This Source is not the True Source *
## **************************************
## the true source is the file from which this one was generated.
##
# -*- tcl -*-
# primes.test --
#    Additional test cases for the ::math::numtheory package
#
# Note:
#    The tests assume tcltest 2.1, in order to compare
#    list of integer results

# -------------------------------------------------------------------------

source [file join\
  [file dirname [file dirname [file join [pwd] [info script]]]]\
  devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}

testing {
    useLocal numtheory.tcl math::numtheory
}

proc matchLists { expected actual } {
   set match 1
   foreach a $actual e $expected {
      if { $a != $e } {
         set match 0
         break
      }
   }
   return $match
}
customMatch equalLists matchLists

test first-few-primes-1 "First 10 primes" -match equalLists -body {
    ::math::numtheory::firstNprimes 10
} -result {2 3 5 7 11 13 17 19 23 29}

test first-few-primes-2 "First 12 primes" -match equalLists -body {
    ::math::numtheory::firstNprimes 12
} -result {2 3 5 7 11 13 17 19 23 29 31 37}

test first-few-primes-3 "First 20 primes" -match equalLists -body {
    ::math::numtheory::firstNprimes 20
} -result {2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71}

test primes-lower-than-1 "Primes lower/equal 101" -match equalLists -body {
    ::math::numtheory::primesLowerThan 101
} -result {2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101}

test primes-lower-than-2 "Primes lower/equal 2" -match equalLists -body {
    ::math::numtheory::primesLowerThan 2
} -result {2}

test primes-lower-than-3 "Primes lower/equal 4" -match equalLists -body {
    ::math::numtheory::primesLowerThan 4
} -result {2 3}

test primes-lower-than-4 "Primes lower/equal 102" -match equalLists -body {
    ::math::numtheory::primesLowerThan 102
} -result {2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101}

test prime-factors-1 "Prime factors 100" -match equalLists -body {
    ::math::numtheory::primeFactors 100
} -result {2 2 5 5}

test prime-factors-2 "Unique prime factors 100" -match equalLists -body {
    ::math::numtheory::uniquePrimeFactors 100
} -result {2 5}

test prime-factors-3 "Prime factors 2900" -match equalLists -body {
    ::math::numtheory::primeFactors 2900
} -result {2 2 5 5 29}

test prime-factors-4 "Unique prime factors 2900" -match equalLists -body {
    ::math::numtheory::uniquePrimeFactors 2900
} -result {2 5 29}

test prime-factors-5 "Prime factors 964" -match equalLists -body {
    ::math::numtheory::primeFactors 964
} -result {2 2 241}

test prime-factors-6 "Prime factors 960" -match equalLists -body {
    ::math::numtheory::primeFactors 960
} -result {2 2 2 2 2 2 3 5}

test prime-factors-7 "Prime factors 914" -match equalLists -body {
    ::math::numtheory::primeFactors 914
} -result {2 457}

test totient-1 "Totient 15" -body {
    ::math::numtheory::totient 15
} -result 8

test totient-2 "Totient 30" -body {
    ::math::numtheory::totient 30
} -result 8

test totient-3 "Totient 35" -body {
    ::math::numtheory::totient 35
} -result 24

test totient-4 "Totient 105" -body {
    ::math::numtheory::totient 105
} -result 48

test totient-5 "Totient 1-12" -match equalLists -body {
    set result {}
    for {set n 1} {$n <= 12} {incr n} {
        lappend result [::math::numtheory::totient $n]
    }
    set result
} -result {1 1 2 2 4 2 6 4 6 4 10 4}

test factors-1 "All factors 30" -match equalLists -body {
    ::math::numtheory::factors 30
} -result {1 2 3 5 6 10 15 30}

test factors-1 "All factors 128" -match equalLists -body {
    ::math::numtheory::factors 128
} -result {1 2 4 8 16 32 64 128}

test factors-1 "All factors 250" -match equalLists -body {
    ::math::numtheory::factors 250
} -result {1 2 5 10 25 50 125 250}

test moebius-1 "Moebius for first 19 numbers" -match equalLists -body {
    set result {}
    for {set n 1} {$n < 20} {incr n} {
        lappend result [::math::numtheory::moebius $n]
    }
    set result
} -result {1 -1 -1 0 -1 1 -1 0 0 1 -1 0 -1 1 1 0 -1 0 -1}

test legendre-1 "Legendre symbol (-1/3)" -body {
    ::math::numtheory::legendre -1 3
} -result -1
test legendre-2 "Legendre symbol (-3/7)" -body {
    ::math::numtheory::legendre -3 7
} -result 1

test jacobi-1 "Jacobi symbol (6/7)" -body {
    ::math::numtheory::jacobi 6 7
} -result -1

test jacobi-2 "Jacobi symbol (6/9)" -body {
    ::math::numtheory::jacobi 6 9
} -result 0

test jacobi-3 "Jacobi symbol (3/11)" -body {
    ::math::numtheory::jacobi 3 11
} -result 1

test gcd-1 "Greatest common divisor 2 and 3" -body {
    ::math::numtheory::gcd 2 3
} -result 1

test gcd-2 "Greatest common divisor 20 and 12" -body {
    ::math::numtheory::gcd 20 12
} -result 4

test gcd-3 "Greatest common divisor 600 and 125" -body {
    ::math::numtheory::gcd 600 125
} -result 25

test lcm-1 "Lowest common multiple 3 and 4" -body {
    ::math::numtheory::lcm 3 4
} -result 12

test lcm-2 "Lowest common multiple 12 and 20" -body {
    ::math::numtheory::lcm 12 20
} -result 60

test number-primes "Exercise prime estimators" -match equalLists -body {
    set estimate1 [::math::numtheory::numberPrimesGauss 1000]
    set estimate2 [::math::numtheory::numberPrimesLegendre 1000]
    set estimate3 [::math::numtheory::numberPrimesLegendreModified 1000]
    set result [list [expr {int($estimate1)}] [expr {int($estimate2)}] [expr {int($estimate3)}]]
} -result {144 169 171}
testsuiteCleanup
##
##
## End of file `primes.test'.
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































Deleted modules/math/probopt.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
[vset VERSION 1]
[manpage_begin math::probopt n [vset VERSION]]
[keywords {probabilistic calculations}]
[keywords optimisation]
[keywords mathematics]
[moddesc {Tcl Math Library}]
[titledesc {Probabilistic optimisation methods}]
[category  Mathematics]
[require Tcl 8.6]
[require TclOO]
[require math::probopt [vset VERSION]]
[description]
[para]

The purpose of the [package math::probopt] package is to provide various optimisation
algorithms that are based on probabilistic techniques. The results of these algorithms
may therefore vary from one run to the next. The algorithms are all well-known and
well described and proponents generally claim they are efficient and reliable.
[para]

As most of these algorithms have one or more tunable parameters or even variations,
the interface to each accepts options to set these parameters or the select
the variation. These take the form of key-value pairs, for instance, [term {-iterations 100}].
[para]

This manual does not offer any recommendations with regards to these algorithms, nor
does it provide much in the way of guidelines for the parameters. For this we refer to
online articles on the algorithms in question.
[para]

A few notes, however:
[list_begin itemized]
[item]
With the exception of LIPO, the algorithms are capable of dealing with irregular (non-smooth) and even discontinuous
functions.
[item]
The results depend on the random number seeding and are likely not to be very accurate, especially if the function
varies slowly in the vicinty of the optimum. They do give a good starting point for a deterministic algorithm.
[list_end]

[para]
The collection consists of the following algorithms:
[list_begin itemized]
[item]
PSO - particle swarm optimisation

[item]
SCE - shuffled complexes evolution

[item]
DE - differential evolution

[item]
LIPO - Lipschitz optimisation
[list_end]

The various procedures have a uniform interface:
[example {
   set result [::math::probopt::algorithm function bounds args]
}]

The arguments have the following meaning:
[list_begin itemized]
[item]
The argument [term function] is the name of the procedure that evaluates the function.
Its interface is:
[example {
    set value [function coords]
}]

where [term coords] is a list of coordinates at which to evaluate the function. It is
supposed to return the function value.

[item]
The argument [term bounds] is a list of pairs of minimum and maximum for each coordinate.
This list implicitly determines the dimension of the coordinate space in which the optimum
is to be sought, for instance for a function like [term {x**2 + (y-1)**4}], you may specify
the bounds as [term "{{-1 1} {-1 1}}"], that is, two pairs for the two coordinates.

[item]
The rest ([term args]) consists of zero or more key-value pairs to specify the options. Which
options are supported by which algorithm, is documented below.
[list_end]

The result of the various optimisation procedures is a dictionary containing at least the
following elements:
[list_begin itemized]
[item]
[term optimum-coordinates] is a list containing the coordinates of the optimum that was found.

[item]
[term optimum-value] is the function value at those coordinates.

[item]
[term evaluations] is the number of function evaluations.

[item]
[term best-values] is a list of successive best values, obtained as
part of the iterations.
[list_end]

[section "DETAILS ON THE ALGORITHMS"]
The algorithms in the package are the following:

[list_begin definitions]

[call [cmd ::math::probopt::pso] [arg function] [arg bounds] [arg args]]
The "particle swarm optimisation" algorithm uses the idea that the candidate
optimum points should swarm around the best point found so far, with
variations to allow for improvements.
[para]

It recognises the following options:
[list_begin itemized]
[item] [term {-swarmsize number}]: Number of particles to consider (default: 50)
[item] [term {-vweight    value}]: Weight for the current "velocity" (0-1, default: 0.5)
[item] [term {-pweight    value}]: Weight for the individual particle's best position (0-1, default: 0.3)
[item] [term {-gweight    value}]: Weight for the "best" overall position as per particle (0-1, default: 0.3)
[item] [term {-type       local/global}]: Type of optimisation
[item] [term {-neighbours number}]: Size of the neighbourhood (default: 5, used if "local")
[item] [term {-iterations number}]: Maximum number of iterations
[item] [term {-tolerance  value}]: Absolute minimal improvement for minimum value
[list_end]


[call [cmd ::math::probopt::sce] [arg function] [arg bounds] [arg args]]
The "shuffled complex evolution" algorithm is an extension of the Nelder-Mead algorithm that
uses multiple complexes and reorganises these complexes to find the "global" optimum.
[para]

It recognises the following options:
[list_begin itemized]
[item] [term {-complexes           number}]: Number of particles to consider (default: 2)
[item] [term {-mincomplexes        number}]: Minimum number of complexes (default: 2; not currently used)
[item] [term {-newpoints           number}]: Number of new points to be generated (default: 1)
[item] [term {-shuffle             number}]: Number of iterations after which to reshuffle the complexes (if set to 0, the default, a number will be calculated from the number of dimensions)
[item] [term {-pointspercomplex    number}]: Number of points per complex (if set to 0, the default, a number will be calculated from the number of dimensions)
[item] [term {-pointspersubcomplex number}]: Number of points per subcomplex (used to select the best points in each complex; if set to 0, the default, a number will be calculated from the number of dimensions)
[item] [term {-iterations          number}]: Maximum number of iterations (default: 100)
[item] [term {-maxevaluations      number}]: Maximum number of function evaluations (when this number is reached the iteration is broken off. Default: 1000 million)
[item] [term {-abstolerance        value}]: Absolute minimal improvement for minimum value (default: 0.0)
[item] [term {-reltolerance        value}]: Relative minimal improvement for minimum value (default: 0.001)
[list_end]


[call [cmd ::math::probopt::diffev] [arg function] [arg bounds] [arg args]]
The "differential evolution" algorithm uses a number of initial points that are then updated using randomly selected points. It is more or less akin
to genetic algorithms. It is controlled by two parameters, factor and lambda, where the first determines the update via random points and the second
the update with the best point found sofar.
[para]

It recognises the following options:
[list_begin itemized]
[item] [term {-iterations          number}]: Maximum number of iterations (default: 100)
[item] [term {-number              number}]: Number of point to work with (if set to 0, the default, it is calculated from the number of dimensions)
[item] [term {-factor              value}]: Weight of randomly selected points in the updating (0-1, default: 0.6)
[item] [term {-lambda              value}]: Weight of the best point found so far in the updating (0-1, default: 0.0)
[item] [term {-crossover           value}]: Fraction of new points to be considered for replacing the old ones (0-1, default: 0.5)
[item] [term {-maxevaluations      number}]: Maximum number of function evaluations (when this number is reached the iteration is broken off. Default: 1000 million)
[item] [term {-abstolerance        value}]: Absolute minimal improvement for minimum value (default: 0.0)
[item] [term {-reltolerance        value}]: Relative minimal improvement for minimum value (default: 0.001)
[list_end]


[call [cmd ::math::probopt::lipoMax] [arg function] [arg bounds] [arg args]]
The "Lipschitz optimisation" algorithm uses the "Lipschitz" property of the given function to find a [emph maximum] in the given bounding box. There are
two variants, [term lipoMax] assumes a fixed estimate for the Lipschitz parameter.
[para]

It recognises the following options:
[list_begin itemized]
[item] [term {-iterations          number}]: Number of iterations (equals the actual number of function evaluations, default: 100)
[item] [term {-lipschitz           value}]: Estimate of the Lipschitz parameter (default: 10.0)
[list_end]


[call [cmd ::math::probopt::adaLipoMax] [arg function] [arg bounds] [arg args]]
The "adaptive Lipschitz optimisation" algorithm uses the "Lipschitz" property of the given function to find a [emph maximum] in the given bounding box. The adaptive
variant actually uses two phases to find a suitable estimate for the Lipschitz parameter. This is controlled by the "Bernoulli" parameter.
[para]
When you specify a large number of iterations, the algorithm may take a very long time to complete as it is trying to improve on the Lipschitz parameter and
the chances of hitting a better estimate diminish fast.

[para]
It recognises the following options:
[list_begin itemized]
[item] [term {-iterations          number}]: Number of iterations (equals the actual number of function evaluations, default: 100)
[item] [term {-bernoulli           value}]: Parameter for random decisions (exploration versus exploitation, default: 0.1)
[list_end]


[list_end]


[section References]

The various algorithms have been described in on-line publications. Here are a few:

[list_begin itemized]
[item]
[term PSO]: Maurice Clerc, Standard Particle Swarm Optimisation (2012)
[uri https://hal.archives-ouvertes.fr/file/index/docid/764996/filename/SPSO_descriptions.pdf]
[para]
Alternatively: [uri https://en.wikipedia.org/wiki/Particle_swarm_optimization]

[item]
[term SCE]: Qingyuan Duan, Soroosh Sorooshian, Vijai K. Gupta, Optimal use offo the SCE-UA global optimization method for calibrating watershed models
(1994), Journal of Hydrology 158, pp 265-284
[para]
[uri https://www.researchgate.net/publication/223408756_Optimal_Use_of_the_SCE-UA_Global_Optimization_Method_for_Calibrating_Watershed_Models]

[item]
[term DE]: Rainer Storn and Kenneth Price, Differential Evolution - A simple and efficient adaptivescheme for globaloptimization over continuous spaces
(1996)
[para]
[uri http://www1.icsi.berkeley.edu/~storn/TR-95-012.pdf]

[item]
[term LIPO]: Cedric Malherbe and Nicolas Vayatis, Global optimization of Lipschitz functions,
(june 2017)
[para]
[uri https://arxiv.org/pdf/1703.02628.pdf]

[list_end]

[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































Deleted modules/math/probopt.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# probopt.tcl --
#     Define the right workspace and load the three source files
#     comprising the package for probabilistic optimisation:
#
#     1. Minimisation via Particle Swarm Optimisation
#     2. Minimisation via Shuffled Complex Evolution
#     3. Maximisation via Lipschitz Optimisation
#
package require Tcl 8.5
package provide math::probopt 1.0

namespace eval ::math::probopt {}

set dir [file dirname [info script]]

source [file join [file dirname [info script]] probopt_pso.tcl]
source [file join [file dirname [info script]] probopt_sce.tcl]
source [file join [file dirname [info script]] probopt_lipo.tcl]
source [file join [file dirname [info script]] probopt_diffev.tcl]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Deleted modules/math/probopt.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# -*- tcl -*-
# Tests for the math::probopt pacakge
#
# RCS: @(#) $Id: geometry.test,v 1.13 2010/04/06 17:02:25 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
        [file dirname [file dirname [file join [pwd] [info script]]]] \
        devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

support {
    useLocal math.tcl math
}
testing {
    useLocal probopt.tcl math::probopt
}

# setRand --
#     Make sure we always get the same results:
#     Use srand() to ensure that the random numbers follow
#     the same sequence.
#
proc setRand {} {
    expr {srand(100000)}
}

#
# Simple quadratic function
#
proc f {coords} {
    lassign $coords x y

    return [expr {($x-1.0)**2 + ($y-1.0)**2}]
}

#
# Rosenbrock function
#
proc rosenbrock {coords} {
    lassign $coords x y

    return [expr {100.0 * ($y - $x ** 2) ** 2 + (1.0 - $x) ** 2}]
}

#
# Slightly distorted sombrero - minimum at (1,0)
#
proc sombrero {coords} {
    lassign $coords x y

    set r [expr {hypot($x,$y)}]
    return [expr {(1.0 - $r ** 2) ** 2 + 0.01 * (1.0 - $x)**2}]
}

#
# Wavy function (3D) - absolute minimum at (x,y,z) = (0,0,0), but lots of local minima
#
proc wavy3d {coords} {
    lassign $coords x y z

    return [expr {1.0 - cos(10.0*$x) * cos(10.0*$y) * cos(10.0*$z) + 0.01 * ($x**2 + $y**2 + $z**2)}]
}

#
# Discontinuous function with a clear global minimum at (x,y) = (0,0)
#
proc halfparabola {coords} {
    lassign $coords x y

    if { $x > 0.0 } {
        set f [expr {$x**2 + $y**2}]
    } else {
        set f [expr {-$x + abs($y) + 1.0}]
    }

    return $f
}

#
# 3D function with maximum - bounds slightly beyond [-1,1]
#
proc sombrero3D {coords} {
    lassign $coords x y z

    set r2 [expr {$x**2 + $y**2 + $z**2}]
    return [expr {(10.0 - $r2)**2}]
}

#
# Procedure in a namespace
#
namespace eval testcase {
    proc ftest {coords} {
        lassign $coords x y

        return [expr {($x-1.0)**2 + ($y-1.0)**2}]
    }
}

#
# Create and register (in that order!) custom matching procedures
#
proc matchTolerant { expected actual } {
   set match 1
   foreach a $actual e $expected {
       if { $e != 0.0 } {
           if { abs($e-$a)>0.005*abs($e) &&
                abs($e-$a)>0.005*abs($a)     } {
               set match 0
               break
           }
       } else {
           if { abs($a) > 0.0001 } {
               set match 0
           }
       }
   }
   return $match
}

::tcltest::customMatch tolerant matchTolerant


# Test cases --
#

#
# PSO
#
test "PSO-0.1" "Check known options" -body {
    set coords_value [::math::probopt::pso f {{0.0 4.0} {0.0 4.0}} -swarmsize 10 -iterations 50 -vweight 0.2 -pweight 0.1 -gweight 03 -type local -neighbours 4 -tolerance 1e-3]
    set result "OK"
} -returnCodes {ok} -result "OK"

test "PSO-0.2" "Check unknown options" -body {
    set coords_value [::math::probopt::pso f {{0.0 4.0} {0.0 4.0}} -UNKNOWN 10]
    set result "OK"
} -returnCodes {error} -result "Unknown option: -UNKNOWN"

test "PSO-0.3" "Check content of dictionary" -body {
    set coords_value [::math::probopt::pso f {{0.0 4.0} {0.0 4.0}}]
    foreach key {optimum-coordinates optimum-value evaluations best-values} {
         set r [dict get $coords_value $key]
    }
    set result "OK"
} -returnCodes {ok} -result "OK"


test "PSO-1.1" "Two-dimensional paraboloid" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::pso f {{0.0 4.0} {0.0 4.0}} -iterations 50]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {1.0 1.0  0.0}

test "PSO-1.2" "Two-dimensional paraboloid - namespace" -match tolerant -setup setRand -body {
    global coords_value

    namespace eval testcase {
        global coords_value
        set coords_value [::math::probopt::pso ftest {{0.0 4.0} {0.0 4.0}} -iterations 50]
    }
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {1.0 1.0  0.0}


test "PSO-2.1" "Tilted sombrero - 2D" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::pso sombrero {{-4.0 4.0} {-4.0 4.0}} -iterations 50]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {0.9784 0.2080 0.0}

test "PSO-2.2" "Tilted sombrero - 2D, local method" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::pso sombrero {{-4.0 4.0} {-4.0 4.0}} -iterations 50 -type local]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {0.9605 0.2820 0.0}

test "PSO-2.3" "Tilted sombrero - 2D, more particles" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::pso sombrero {{-4.0 4.0} {-4.0 4.0}} -iterations 50 -swarmsize 200]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {0.970 -0.2419 0.0}

test "PSO-3.1" "Wavy function - 3D" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::pso wavy3d {{0.0 4.0} {0.0 4.0} {0.0 4.0}} -iterations 50]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {2.8405 1.9068 2.2180 0.2157}

test "PSO-3.2" "Wavy function - 3D" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::pso wavy3d {{0.0 4.0} {0.0 4.0} {0.0 4.0}} -iterations 50 -swarmsize 100 -neighbours 6]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {1.5703 0.9424 1.2564 0.0493}

test "PSO-4.1" "Discontinuous function - 2D" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::pso halfparabola {{-4.0 4.0} {-4.0 4.0}} -iterations 50]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {0.0 0.0  0.0}

#
# SCE
#
test "SCE-0.1" "Check known options" -body {
    set coords_value [::math::probopt::sce f {{0.0 4.0} {0.0 4.0}} -complexes 2 -mincomplexes 2 -newpoints 1 -shuffle 0 -pointspercomplex 0 -pointspersubcomplex 0 \
                                                                   -iterations 100 -maxevaluations 1.0e9 -abstolerance 0.0 -reltolerance 0.001]
    set result "OK"
} -returnCodes {ok} -result "OK"

test "SCE-0.2" "Check unknown options" -body {
    set coords_value [::math::probopt::sce f {{0.0 4.0} {0.0 4.0}} -UNKNOWN 10]
    set result "OK"
} -returnCodes {error} -result "Unknown option: -UNKNOWN"

test "SCE-0.3" "Check content of dictionary" -body {
    set coords_value [::math::probopt::sce f {{0.0 4.0} {0.0 4.0}}]
    foreach key {optimum-coordinates optimum-value evaluations best-values} {
         set r [dict get $coords_value $key]
    }
    set result "OK"
} -returnCodes {ok} -result "OK"


test "SCE-1.1" "Two-dimensional paraboloid" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::sce f {{0.0 4.0} {0.0 4.0}} -iterations 50]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {1.0064 1.0082 0.0001078}


#
# DE
#
test "DE-0.1" "Check known options" -body {
    set coords_value [::math::probopt::diffev f {{0.0 4.0} {0.0 4.0}} -number 0 -factor 0.6 -lambda 0.0 -crossover 0.5 \
                                                                      -iterations 100 -maxevaluations 1.0e9 -abstolerance 0.0 -reltolerance 0.001]
    set result "OK"
} -returnCodes {ok} -result "OK"

test "DE-0.2" "Check unknown options" -body {
    set coords_value [::math::probopt::diffev f {{0.0 4.0} {0.0 4.0}} -UNKNOWN 10]
    set result "OK"
} -returnCodes {error} -result "Unknown option: -UNKNOWN"

test "DE-0.3" "Check content of dictionary" -body {
    set coords_value [::math::probopt::diffev f {{0.0 4.0} {0.0 4.0}}]
    foreach key {optimum-coordinates optimum-value evaluations best-values} {
         set r [dict get $coords_value $key]
    }
    set result "OK"
} -returnCodes {ok} -result "OK"


test "DE-1.1" "Two-dimensional paraboloid" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::diffev f {{0.0 4.0} {0.0 4.0}} -iterations 50]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {1.0068 1.0096 0.0001387}

#
# LIPO
#
test "LIPO-0.1" "Check known options" -body {
    set coords_value [::math::probopt::lipoMax f {{0.0 4.0} {0.0 4.0}} -iterations 100 -lipschitz 10.0]
    set result "OK"
} -returnCodes {ok} -result "OK"

test "LIPO-0.2" "Check unknown options" -body {
    set coords_value [::math::probopt::lipoMax f {{0.0 4.0} {0.0 4.0}} -UNKNOWN 10]
    set result "OK"
} -returnCodes {error} -result "Unknown option: -UNKNOWN"

test "LIPO-0.3" "Check content of dictionary" -body {
    set coords_value [::math::probopt::lipoMax f {{0.0 4.0} {0.0 4.0}}]
    foreach key {optimum-coordinates optimum-value evaluations best-values} {
         set r [dict get $coords_value $key]
    }
    set result "OK"
} -returnCodes {ok} -result "OK"


test "LIPO-1.1" "Three-dimensional sombrero" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::lipoMax sombrero3D {{-1.2 1.2} {-1.2 1.2} {-1.2 1.2}} -iterations 5000]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {-0.0447 -0.0710 -0.0956 99.6769}

test "ADALIPO-0.1" "Check known options" -body {
    set coords_value [::math::probopt::adaLipoMax f {{0.0 4.0} {0.0 4.0}} -iterations 100 -bernoulli 0.1]
    set result "OK"
} -returnCodes {ok} -result "OK"

test "ADALIPO-0.2" "Check unknown options" -body {
    set coords_value [::math::probopt::adaLipoMax f {{0.0 4.0} {0.0 4.0}} -UNKNOWN 10]
    set result "OK"
} -returnCodes {error} -result "Unknown option: -UNKNOWN"

test "ADALIPO-0.3" "Check content of dictionary" -body {
    set coords_value [::math::probopt::adaLipoMax f {{0.0 4.0} {0.0 4.0}}]
    foreach key {optimum-coordinates optimum-value evaluations best-values} {
         set r [dict get $coords_value $key]
    }
    set result "OK"
} -returnCodes {ok} -result "OK"

# Odd behaviour: 5000 iterations and the thing hangs?
#test "ADALIPO-1.1" "Three-dimensional sombrero" -match tolerant -setup setRand -body {
#    set coords_value [::math::probopt::adaLipoMax sombrero3D {{-1.2 1.2} {-1.2 1.2} {-1.2 1.2}} -iterations 5000]
#    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
#} -result {0.0 0.0  1.0}

test "ADALIPO-1.1" "Three-dimensional sombrero" -match tolerant -setup setRand -body {
    set coords_value [::math::probopt::adaLipoMax sombrero3D {{-1.2 1.2} {-1.2 1.2} {-1.2 1.2}} -iterations 500]
    set result [concat [dict get $coords_value optimum-coordinates] [dict get $coords_value optimum-value]]
} -result {-0.0971 -0.0577 0.1905 99.0216}



#set coords_value [::math::probopt::pso halfparabola {{-4.0 4.0} {-4.0 4.0}} -iterations 50]
#puts $coords_value
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































Deleted modules/math/probopt_diffev.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# probopt_diffev.tcl --
#     Implementation of the differential probopt algorithm
#     for optimising functions
#
#     Note:
#     The algorithm does not confine the points to the given
#     hyper block - it is merely used to initialise it.
#
namespace eval ::math::probopt {}

# diffev --
#      Optimise a function using the differential probopt algorithm
#
# Arguments:
#     func            Function for which the global minimum is to be found
#     bounds          Boundaries for all independent variables of the function,
#                     as a list of pairs of minimum and maximum
#     args            Set of options - key-value pairs
#
# Result:
#     Estimate of the global minimum as found via the procedure
#
proc ::math::probopt::diffev {func bounds args} {
    #
    # Set the default options
    #
    set dims [llength $bounds]
    set options [dict create -number 0 -factor 0.6 -lambda 0.0 -crossover 0.5 \
         -iterations 100 -maxevaluations 1.0e9 -abstolerance 0.0 -reltolerance 0.001]

    #
    # Handle the options
    #

    foreach {key value} $args {
        if { [dict exists $options $key] } {
                dict set options $key $value
        } else {
            return -code error "Unknown option: $key"
        }
    }

    dict with options {}

    if { ${-number} == 0 } {
        set -number [expr {4 * $dims}]
        dict set options -number ${-number}
    }

    #
    # Set up the initial collections of points
    #
    set evals  0
    set points {}
    for {set i 0} {$i < ${-number}} {incr i} {
        set coords [GeneratePoint $bounds]
        lappend points [list $coords [$func $coords]]
        incr evals
    }
    #puts [join $points \n]

    #
    # Iteration over the generations:
    # - For each point, construct a new estimate and check if it is better
    # - If it is, replace the original point by the new point
    #
    set oldIndex [IndexBestPoint $points]
    set oldValue [lindex $points $oldIndex 1]
    set bestPerGeneration {}

    for {set generation 0} {$generation < ${-iterations}} {incr generation} {
        #puts "$generation"
        set newPoints {}
        set renewed   0   ;# Keep track of the replacement of points to avoid
                           # a premature ending

        for {set i 0} {$i < ${-number}} {incr i} {
            set point [lindex $points $i]

            set newCoords [ConstructNewCoords $points ${-factor} ${-lambda} ${-crossover} $i $oldIndex]

            set fvalue    [$func $newCoords]
            incr evals
            #puts "$newCoords -- $fvalue -- $evals"

            if { $fvalue < [lindex $point 1] } {
                set renewed  [expr {$i == $oldIndex? 1 : 0}] ;# Is the best estimate being replaced?
                set newPoint [list $newCoords $fvalue]
            } else {
                set newPoint $point
            }

            #puts "$newPoint -- $evals"
            lappend newPoints $newPoint
        }

        #
        # Check the number of evaluations ... not quite accurate, but it will do
        #
        # Hm, this will fail if this happens in the first generation
        #
        if { $evals >= ${-maxevaluations} } {
            #puts "Maximum evaluations reached"
            break
        }

        #
        # Get the best point in the current generation
        #
        set bestIndex [IndexBestPoint $newPoints]
        set bestValue [lindex $newPoints $bestIndex 1]

        #puts "$oldIndex -- $oldValue -- $bestIndex -- $bestValue"
        #if { $renewed } {}
        if { ( $oldValue != $bestValue || $oldIndex != $bestIndex ) &&
             ( ($oldValue - $bestValue) <= ${-abstolerance} ||
               ($oldValue - $bestValue) <= 0.5 * ${-reltolerance} * (abs($oldValue) + abs($bestValue)) ) } {
            #puts "Values: $oldValue -- $bestValue"
            break
        } else {
            set points   $newPoints
            set oldIndex $bestIndex
            set oldValue $bestValue
            lappend bestPerGeneration $bestValue
        }

        #puts "$oldIndex -- $oldValue -- $bestIndex -- $bestValue"
    }

    return [dict create optimum-coordinates [lindex $newPoints $bestIndex 0] \
                        optimum-value [lindex $newPoints $bestIndex 1] evaluations $evals best-values $bestPerGeneration]
}

# ConstructNewCoords --
#     Constructs the coordinates of a new point using the DE method
#
# Arguments:
#     points         Current set of points (each together with the function value)
#     factor         Weight for the difference vector
#     lambda         Weight for the best vector
#     crossover      Probability of cross-over
#     idx            Current index
#     bestIdx        Index of the current best vector
#
# Result:
#     List of coordinates
#
proc ::math::probopt::ConstructNewCoords {points factor lambda crossover idx bestIdx} {
    set number [llength $points]
    set dims   [llength [lindex $points 0 0]]
    set r1     [SelectIndex $idx $number]
    set r2     [SelectIndex $idx $number]
    set r3     [SelectIndex $idx $number]

    if { $lambda == 0.0 } {
        set vcoords {}
        foreach c1 [lindex $points $r1 0] \
                c2 [lindex $points $r2 0] \
                c3 [lindex $points $r3 0] {
            set vc [expr {$c1 + $factor * ($c2 - $c3)}]
            lappend vcoords $vc
        }
    } else {
        set vcoords {}
        foreach c1 [lindex $points $idx 0]       \
                cb [lindex $points $bestIndex 0] \
                c2 [lindex $points $r2 0]        \
                c3 [lindex $points $r3 0]        {
            set vc [expr {$c1 + $lambda * ($cb - $c1) + $factor * ($c2 - $c3)}]
            lappend vcoords $vc
        }
    }

    #
    # Now the cross-over per dimension
    #
    set start  [SelectIndex {} $number]
    set length [SelectLength $crossover $dims]

    set combined $vcoords
    for {set i $start} {$i < $start+$length} {incr i} {
        set j [expr {$i % $dims}]
        lset combined $j [lindex $vcoords $j]
    }

    return $combined
}

# SelectIndex --
#     Select a random index unequal to a given index
#
# Arguments:
#     avoidIdx       Index to be avoided
#     maximum        Maximum + 1 for the index
#
# Result:
#     Random index in [0,maximum-1], not equal avoidIdx
#
proc ::math::probopt::SelectIndex {avoidIdx maximum} {

    set idx $avoidIdx
    while { $idx == $avoidIdx } {
        set idx [expr {int($maximum * rand())}]
    }

    return $idx
}

# SelectLength --
#     Select a random length using a cross-over probability
#
# Arguments:
#     crossover      Cross-over probability
#     maximum        Maximum + 1 for the index
#
# Result:
#     Random index in [0,maximum-1]
#
proc ::math::probopt::SelectLength {crossover maximum} {

    set length 0
    while {1} {
        incr length
        if { rand() > $crossover || $length >= $maximum } {
            break
        }
    }

    return $length
}

# GeneratePoint --
#     Generate the coordinates of a random point within the given bounds
#
# Arguments:
#     bounds         Bounds on all coordinates
#
# Result:
#     List of coordinates
#
proc ::math::probopt::GeneratePoint {bounds} {

    set coords {}
    foreach bound $bounds {
        lassign $bound cmin cmax
        lappend coords [expr {$cmin + ($cmax - $cmin) * rand()}]
    }

    return $coords
}

# IndexBestPoint --
#     Find the index of the best point (lowest function value)
#
# Arguments:
#     points         List of points (each is a pair of coordinates and the function value)
#
# Result:
#     Index of the best point
#
proc ::math::probopt::IndexBestPoint {points} {

    set index     0
    set bestValue [lindex $points 0 1]

    for {set i 1} {$i < [llength $points]} {incr i} {
        set newValue [lindex $points $i 1]
        if { $newValue < $bestValue } {
            set index     $i
            set bestValue $newValue
        }
    }

    return $index
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































Deleted modules/math/probopt_lipo.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# probopt_lipo.tcl --
#     Implementation of the LIPO algorithm to find
#     the global maximum of a function in a given region
#
#     Based on:
#     Cedric Malherbe and Nicolas Vayatis, Global optimization of Lipschitz functions,
#          june 2017, https://arxiv.org/pdf/1703.02628.pdf
#

# namespace --
#
namespace eval ::math::probopt {}

# Dist --
#     Determine the Euclidean distance between two points in N-dimensional space
#
# Arguments:
#     x                List of coordinates for the first point
#     y                List of coordinates for the second point
#
# Returns:
#     Euclidean distance between the two points
#
proc ::math::probopt::Dist {x y} {
    set dist 0.0

    foreach xc $x yc $y {
        set dist [expr {$dist + ($xc-$yc) ** 2}]
    }
    return $dist
}

# lipoMax --
#     Find the global maximum of a function in a given region
#
# Arguments:
#     f           Name of the procedure implementing the function
#     bounds      List of pairs of minimum and maximum per dimension
#     args        Key-value pairs for the options:
#                 -iterations number     Number of iterations (function evaluations; default: 100)
#                 -lipschitz  value      Estimate of the Lipschitz parameter (default: 10.0)
#
# Returns:
#     The coordinates of the point where the function attains the maximum
#     value that was encountered
#
proc ::math::probopt::lipoMax {f bounds args} {
    set options [dict create -iterations 100 -lipschitz 10.0]

    foreach {key value} $args {
        if { [dict key $options $key] != "" } {
            dict set options $key $value
        } else {
            return -code error "Unknown option: $key"
        }
    }

    set k [dict get $options -lipschitz]
    set n [dict get $options -iterations]

    #
    # Convert the region
    #
    set region {}
    foreach b $bounds {
        lassign $b min max
        lappend region $min $max
    }

    #
    # Initial guess
    #
    set coords  {}
    set fvalues {}
    foreach {min max} $region {
        set c [expr {$min + ($max-$min) * rand()}]
        lappend coords $c
    }

    set fval   [$f $coords]
    set maxval $fval
    set maxcrd $coords
    set nevals 1

    lappend fvalues    $fval
    lappend samples    $coords
    set     bestValues {}

    set numberSamples 1
    while { $numberSamples < $n } {
        # New guess
        set coords  {}
        foreach {min max} $region {
            set c [expr {$min + ($max-$min) * rand()}]
            lappend coords $c
        }

        # Check via Lipschitz condition
        foreach csample $samples fval $fvalues {
            set estimate [expr {$fval + $k * [Dist $coords $csample]}]

            if { $estimate > $maxval } {
                incr numberSamples
                set fval [$f $coords]
                incr nevals

                lappend samples $coords
                lappend fvalues $fval

                if { $fval > $maxval } {
                    set maxval $fval
                    set maxcrd $coords
                    #puts "$maxval -- $maxcrd"
                    lappend bestValues $maxval
                }
                break
            }
        }
    }

    return [dict create optimum-coordinates $maxcrd optimum-value $maxval evaluations $nevals best-values $bestValues]
}

# adaLipoMax --
#     Find the global maximum of a function in a given region,
#     using a heuristic estimate of the Lipschitz constant
#
# Arguments:
#     f           Name of the procedure implementing the function
#     bounds      List of minimum and maximum per dimension
#     args        Key-value pairs for the options:
#                 -iterations number     Number of iterations (function evaluations; default: 100)
#                 -bernoulli  value      Parameter for random decisions (default: 0.1)
#
# Returns:
#     The coordinates of the point where the function attains the maximum
#     value that was encountered
#
proc ::math::probopt::adaLipoMax {f bounds args} {
    set options [dict create -iterations 100 -bernoulli 0.1]

    foreach {key value} $args {
        if { [dict key $options $key] != "" } {
            dict set options $key $value
        } else {
            return -code error "Unknown option: $key"
        }
    }

    set p [dict get $options -bernoulli]
    set n [dict get $options -iterations]

    set kparam [expr {1.0 + 0.01/([llength $bounds])}]

    #
    # Convert the region
    #
    set region {}
    foreach b $bounds {
        lassign $b min max
        lappend region $min $max
    }

    #
    # Initial guess
    #
    set k       0.0
    set kmax    0.0
    set coords  {}
    set fvalues {}
    foreach {min max} $region {
        set c [expr {$min + ($max-$min) * rand()}]
        lappend coords $c
    }

    set fval   [$f $coords]
    set maxval $fval
    set maxcrd $coords
    set nevals 1

    lappend fvalues    $fval
    lappend samples    $coords
    set     bestValues {}

    set numberSamples 1
    while { $numberSamples < $n } {
        # New guess
        set coords  {}
        foreach {min max} $region {
            set c [expr {$min + ($max-$min) * rand()}]
            lappend coords $c
        }

        set added 0
        if { rand() < $p } {
            # Exploration ...
            set     added 1
            incr    numberSamples
            set     fval [$f $coords]
            incr    nevals

            lappend samples $coords
            lappend fvalues $fval
        } else {
            # Exploitation - check via Lipschitz condition
            foreach csample $samples fval $fvalues {
                set estimate [expr {$fval + $k * [Dist $coords $csample]}]

                if { $estimate > $maxval } {
                    set     added 1
                    incr    numberSamples
                    set     fval [$f $coords]
                    incr    nevals
                    lappend samples $coords
                    lappend fvalues $fval

                    if { $fval > $maxval } {
                        set maxval $fval
                        set maxcrd $coords
                        #puts "$maxval -- $maxcrd"
                        lappend bestValues $maxval
                    }
                    break
                }
            }
        }

        # Update the estimate of the Lipschitz constant
        foreach csample [lrange $samples 0 end-$added] fsample [lrange $fvalues 0 end-$added] {
            set estimate [expr {abs($fval - $fsample) / [Dist $coords $csample]}]

            if { $estimate > $kmax } {
                set kmax $estimate
            }
        }

        set k [expr {$kparam ** int($estimate/log($kparam)+0.99)}]
    }

    return [dict create optimum-coordinates $maxcrd optimum-value $maxval evaluations $nevals best-values $bestValues]
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































Deleted modules/math/probopt_pso.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# probopt_pso.tcl --
#     Straightforward implementation of particle swarm optimisation
#
#     Options:
#     - The "best" is taken to be the globally best particle (global)
#     - The "best" is taken to be the best of the neighbourhood of
#       each particle
#
#     For more information see: https://en.wikipedia.org/wiki/Particle_swarm_optimization
#

# namespace --
#
namespace eval ::math::probopt {}



# pso --
#     Public interface to the PSO implementations
#
# Arguments:
#     func          Function to be minimized
#     bounds        List of pairs of minimum and maximum per dimension
#     args          Key-value pairs:
#                   -swarmsize  number        Number of particles to consider (default: 50)
#                   -vweight    value         Weight for the current "velocity" (0-1, default: 0.5)
#                   -pweight    value         Weight for the individual particle's best position (0-1, default: 0.3)
#                   -gweight    value         Weight for the "best" overall position as per particle (0-1, default: 0.3)
#                   -type       local/global  Type of optimisation
#                   -neighbours number        Size of the neighbourhood (default: 5, used if "local")
#                   -iterations number        Maximum number of iterations
#                   -tolerance  value         Absolute minimal improvement for minimum value
#
# Result:
#     Dictionary with the coordinates of the "best" position and the value as well as
#     list of best values per iteration and the number of function evaluations.
#
proc ::math::probopt::pso {func bounds args} {

    set func [uplevel 1 [list namespace which -command $func]]

    set options [dict create -swarmsize 50 -vweight 0.5 -pweight 0.3 -gweight 0.3 \
                     -type global -neighbours 5 -iterations 50 -tolerance 0.0]

    foreach {key value} $args {
        if { [dict key $options $key] != "" } {
            dict set options $key $value
        } else {
            return -code error "Unknown option: $key"
        }
    }

    set xmin {}
    set xmax {}

    foreach bound $bounds {
        lappend xmin [lindex $bound 0]
        lappend xmax [lindex $bound 1]
    }

    set type [dict get $options -type]

    if { $type == "global" } {
        return [Pso_global $func $xmin $xmax $options]
    }
    if { $type == "local" } {
        return [Pso_local $func $xmin $xmax $options]
    }

    return -code error "Unknown type: $type"
}

# Pso_global --
#     Use the "global" PSO algorithm
#
# Arguments:
#     func          Function to be minimized
#     xmin          Minimum values for the coordinates
#     xmax          Maximum values for the coordinates
#     options       Dictionary of options
#
proc ::math::probopt::Pso_global {func xmin xmax options} {
    #
    # Set up the initial positions
    #
    set swarmsize [dict get $options -swarmsize]
    set maxiters  [dict get $options -iterations]

    set particle_bests     {}
    set positions          {}
    set velocities         {}
    set global_best        -1
    set global_best_value  {}
    set evaluations         0
    set best_values        {}

    for {set i 0} {$i < $swarmsize} {incr i} {
        set coords [Pso_position $xmin $xmax]

        set fvalue [$func $coords]
        incr evaluations

        lappend positions      $coords
        lappend velocities     [lrepeat [llength $coords] 0.0]
        lappend particle_bests [list $fvalue $coords]

        if { $global_best == -1 || $global_best_value > $fvalue } {
            set global_best       $i
            set global_best_value $fvalue
        }
    }

    set vweight   [dict get $options -vweight]
    set pweight   [dict get $options -pweight]
    set gweight   [dict get $options -gweight]
    set tolerance [dict get $options -tolerance]

    for {set iteration 0} {$iteration < $maxiters} {incr iteration} {

        set new_positions      {}
        set new_velocities     {}
        set new_particle_bests {}

        #
        # Determine the new positions for all particles
        #
        for {set i 0} {$i < $swarmsize} {incr i} {
            set old_velocity  [lindex $velocities $i]
            set old_position  [lindex $positions  $i]
            set old_bestvalue [lindex $particle_bests $i 0]
            set old_bestpos   [lindex $particle_bests $i 1]

            set velocity      [Pso_update_vel $vweight $pweight $gweight $old_velocity $old_position $old_bestpos [lindex $positions $global_best]]

            set position      [Pso_new_position $old_position $velocity]
            set fvalue        [$func $position]
            incr evaluations

            lappend new_positions  $position
            lappend new_velocities $velocity

            if { $fvalue < $old_bestvalue } {
                lappend new_particle_bests [list $fvalue $position]
            } else {
                lappend new_particle_bests [list $old_bestvalue $old_position]
            }
        }

        set positions      $new_positions
        set velocities     $new_velocities
        set particle_bests $new_particle_bests

        #
        # Determine the globally best position
        #
        for {set i 0} {$i < $swarmsize} {incr i} {
            set fvalue [lindex $particle_bests $i 0]

            if { $fvalue < $global_best_value } {
                set global_best_value $fvalue
                set global_best       $i
                set global_best_pos   [lindex $particle_bests $i 1]
            }
        }

        #
        # Have we reached the tolerance yet?
        #
        if { $iteration > 0 } {
            if { abs($prev_best_value - $global_best_value) < $tolerance &&
                 $prev_best_value > $global_best_value } {
                break
            }
        }
        set prev_best_value $global_best_value
        lappend best_values $global_best_value
    }

    return [dict create optimum-coordinates $global_best_pos optimum-value $global_best_value evaluations $evaluations best-values $best_values]
}

# Pso_local --
#     Use the "local" PSO algorithm, i.e. look only at the "neighbours"
#
# Arguments:
#     func          Function to be minimized
#     xmin          Minimum values for the coordinates
#     xmax          Maximum values for the coordinates
#     options       Dictionary of options
#
proc ::math::probopt::Pso_local {func xmin xmax options} {
    #
    # Set up the initial positions
    #
    set swarmsize  [dict get $options -swarmsize]
    set maxiters   [dict get $options -iterations]
    set neighbours [dict get $options -neighbours]

    set particle_bests     {}
    set positions          {}
    set velocities         {}
    set global_best        -1
    set global_best_value  {}
    set evaluations         0
    set best_values        {}

    for {set i 0} {$i < $swarmsize+$neighbours} {incr i} {
        lappend neighbours_idx [expr {$i % $swarmsize}]
    }

    for {set i 0} {$i < $swarmsize} {incr i} {
        set coords [Pso_position $xmin $xmax]

        set fvalue [$func $coords]
        incr evaluations

        lappend positions        $coords
        lappend velocities       [lrepeat [llength $coords] 0.0]
        lappend particle_bests   [list $fvalue $coords]

        lappend local_best       $i
        lappend local_best_value $fvalue
        lappend local_best_pos   $coords
        lappend prev_best_value  $fvalue
    }

    #
    # Initial estimates:
    # Examine the neighbouring particles and determine which holds the best result
    #
    for {set i 0} {$i < $swarmsize} {incr i} {
        set current_best       [lindex $local_best $i]
        set current_best_value [lindex $particle_bests $current_best 0]
        set current_best_pos   [lindex $particle_bests $current_best 1]

        for {set n 0} {$n < $neighbours} {incr n} {
            set nth     [lindex $neighbours_idx [expr {$i+$n}]]
            set fvalue [lindex $particle_bests $nth 0]

            if { $current_best_value > $fvalue } {
                set current_best       $nth
                set current_best_value $fvalue
                set current_best_pos   [lindex $particle_bests $nth 1]
            }
        }

        lset local_best       $i $current_best
        lset local_best_value $i $current_best_value
        lset local_best_pos   $i $current_best_pos
    }

    #
    # Actual loop
    #
    set vweight   [dict get $options -vweight]
    set pweight   [dict get $options -pweight]
    set gweight   [dict get $options -gweight]
    set tolerance [dict get $options -tolerance]

    set stop      0

    for {set iteration 0} {$iteration < $maxiters && $stop == 0} {incr iteration} {

        set new_positions      {}
        set new_velocities     {}
        set new_particle_bests {}

        #
        # Determine the new positions for all particles
        #
        for {set i 0} {$i < $swarmsize} {incr i} {
            set old_velocity  [lindex $velocities $i]
            set old_position  [lindex $positions  $i]
            set old_bestvalue [lindex $particle_bests $i 0]
            set old_bestpos   [lindex $particle_bests $i 1]

            set idx [lindex $local_best $i]

            set velocity      [Pso_update_vel $vweight $pweight $gweight $old_velocity $old_position $old_bestpos [lindex $positions $idx]]

            set position      [Pso_new_position $old_position $velocity]
            set fvalue        [$func $position]
            incr evaluations

            lappend new_positions  $position
            lappend new_velocities $velocity

            if { $fvalue < $old_bestvalue } {
                lappend new_particle_bests [list $fvalue $position]
            } else {
                lappend new_particle_bests [list $old_bestvalue $old_position]
            }
        }

        set positions      $new_positions
        set velocities     $new_velocities
        set particle_bests $new_particle_bests

        #
        # Examine the neighbouring particles and determine which holds the best result
        #
        for {set i 0} {$i < $swarmsize} {incr i} {
            set current_best       [lindex $local_best $i]
            set current_best_value [lindex $local_best_value $i]
            set current_best_pos   [lindex $local_best_pos $i]

            for {set n 0} {$n < $neighbours} {incr n} {
                set nth     [lindex $neighbours_idx [expr {$i+$n}]]
                set fvalue [lindex $particle_bests $nth 0]

                if { $current_best_value > $fvalue } {
                    set current_best       $nth
                    set current_best_value $fvalue
                    set current_best_pos   [lindex $particle_bests $nth 1]
                }
            }

            lset local_best       $i $current_best
            lset local_best_value $i $current_best_value
            lset local_best_pos   $i $current_best_pos

            #
            # Have we reached the tolerance yet?
            # Note: local citerium - one group reaching a minimum? Then stop
            #
            if { $iteration > 0 } {
                if { abs([lindex $prev_best_value $i] - $current_best_value) < $tolerance &&
                     [lindex $prev_best_value $i] > $current_best_value } {
                    set stop 1
                    break
                }
            }
            lset prev_best_value $i $current_best_value
        }

        #
        # Now determine the overall best position - within this iteration
        # (to have a history)
        #
        set global_best_value [lindex $local_best_value 0]
        set global_best_pos   [lindex $local_best_pos   0]

        for {set i 1} {$i <$swarmsize} {incr i} {
            set particle_best_value [lindex $local_best_value $i]

            if { $global_best_value > $particle_best_value } {
                set global_best_value $particle_best_value
                set global_best_pos   [lindex $local_best_pos $i]
            }
        }

        lappend best_values $global_best_value
    }

    return [dict create optimum-coordinates $global_best_pos optimum-value $global_best_value evaluations $evaluations best-values $best_values]
}

# Pso_position --
#     Determine the initial position
#
# Arguments:
#     xmin              Minimum values for the coordinates
#     xmax              Maximum values for the coordinates
#
# Result:
#     Vector of coordinates
#
proc ::math::probopt::Pso_position {xmin xmax} {

    set new_position {}

    foreach min $xmin max $xmax {
        lappend new_position [expr {$min + ($max - $min) * rand()}]
    }

    return $new_position
}

# Pso_new_position --
#     Update the position
#
# Arguments:
#     position          Position vector
#     velocity          Velocity vector
#
# Result:
#     Vector of new coordinates
#
proc ::math::probopt::Pso_new_position {position velocity} {

    set new_position {}

    foreach p $position v $velocity {
        lappend new_position [expr {$p + $v}]
    }

    return $new_position
}

# Pso_update_vel --
#     Update the velocity
#
# Arguments:
#     vweight           Weight for the old vector
#     pweight           Weight for the particle's best position
#     gweight           Weight for the globally (locally) best position
#     old_velocity      Old velocity vector
#     old_position      Old position vector
#     old_particle_best Old best vector for the particle
#     old_global_best   Old globally (locally) best vector
#
# Result:
#     Vector of new coordinates
#
proc ::math::probopt::Pso_update_vel {vweight pweight gweight old_velocity old_position old_particle_best old_global_best} {

    set new_velocity {}

    set pw [expr {$pweight * rand()}]
    set gw [expr {$gweight * rand()}]

    foreach v $old_velocity p $old_position b $old_particle_best g $old_global_best {
        lappend new_velocity [expr {$vweight * $v + $pw * ($b - $p) + $gw * ($g - $p)}]
    }

    return $new_velocity
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/math/probopt_sce.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
# probopt_sce.tcl --
#     Implementation of the "shuffled complexes evolution" optimisation method in Tcl
#
#     Note:
#     This implementation is based on:
#     - Qingyuan Duan, Soroosh Sorooshian and Vijai Gupta:
#       Optimal use of the SCE-UA global optimisation method for calibrating
#       watershed models, Journal of Hydrology, volume 158, 1994, pp. 265-284
#
#     - Q.Y. Duan, V.K. Gupta and S. Sorooshian:
#       Shuffled Comples Evolution Approach for Effective and Efficient
#       Global Minimization, Journal of Optimization Theory and Applications,
#       volume 76, no. 3, 1993, pp. 501-521
#
#     TODO:
#     - Limit the number of iterations
#     - Provide a dictionary of calculation results
#

# namespace --
#
namespace eval ::math::probopt {
    variable sceNevals 0
}

# sce --
#     Front-end procedure for the SCE algorithm
#
# Arguments:
#     func            Function for which the global minimum is to be found
#     bounds          Boundaries for all independent variables of the function,
#                     as a list of pairs of minimum and maximum
#     args            Set of options - key-value pairs
#
# Result:
#     Estimate of the global minimum as found via the procedure
#
proc ::math::probopt::sce {func bounds args} {
    variable sceNevals
    #
    # Set the default options
    #
    set dims [llength $bounds]
    set options [dict create -complexes 2 -mincomplexes 2 -newpoints 1 -shuffle 0 -pointspercomplex 0 -pointspersubcomplex 0 \
                             -iterations 100 -maxevaluations 1.0e9 -abstolerance 0.0 -reltolerance 0.001]
    #
    # Handle the options
    #

    foreach {key value} $args {
        if { [dict exists $options $key] } {
                dict set options $key $value
        } else {
            return -code error "Unknown option: $key"
        }
    }

    dict with options {}

    #
    # Recalculate a few options
    #
    foreach v {-shuffle -pointspercomplex} {
        if { [set $v] == 0 } {
            set $v [expr {2*$dims + 1}]
            dict set options $v [set $v]
        }
    }
    set v "-pointspersubcomplex"
    if { [set $v] == 0 } {
        set $v [expr {$dims + 1}]
        dict set options $v [set $v]
    }

    #
    # Ready to call the actual procedure
    #
    set sceNEvals 0

    return [SceCompute $func $bounds $options]

    #SceCompute $func $bounds $options
}

# SceCompute --
#     Actually compute the global optimum using the SCE algorithm
#
# Arguments:
#     func            Function for which the global minimum is to be found
#     bounds          Boundaries for all independent variables of the function,
#                     as a list of pairs of minimum and maximum
#     options         Dictionary of options
#
# Result:
#     Dictionary containing among other things the estimate of the
#     global minimum as found via the procedure
#
proc ::math::probopt::SceCompute {func bounds options} {
    variable sceNEvals

    set dims         [llength $bounds]
    set npcomplex    [dict get $options -pointspercomplex]
    set p            [dict get $options -complexes]
    set pmin         [dict get $options -mincomplexes]
    set npsubcomplex [dict get $options -pointspersubcomplex]
    set nnewpoints   [dict get $options -newpoints]
    set nshuffle     [dict get $options -shuffle]
    set niterations  [dict get $options -iterations]
    set abstol       [dict get $options -abstolerance]
    set reltol       [dict get $options -reltolerance]

    set npoints [expr {$npcomplex * $p}]

    #
    # Generate the initial set of points
    #
    set points {}
    for {set i 0} {$i < $p} {incr i} {
        for {set k 0} {$k < $npcomplex} {incr k} {
            set coords [GeneratePoint $bounds]
            lappend points [list $coords [$func $coords]]
            incr sceNEvals
        }
    }

    for {set iteration 0} {$iteration < $niterations} {incr iteration} {
        #
        # Sort the points and create subcomplexes
        #
        set points [lsort -index 1 -increasing $points]

        array unset complex
        for {set i 0} {$i < $p} {incr i} {
            for {set k 0} {$k < $npcomplex} {incr k} {
                lappend complex($i) [lindex $points [expr {$k*$p + $i}]]
            }
        }

        #
        # Optimise the subcomplexes
        #
        for {set i 0} {$i < $p} {incr i} {
            for {set shuffle 0} {$shuffle < $nshuffle} {incr shuffle} {
                set complex($i) [OptimiseComplex $complex($i) $npsubcomplex $nnewpoints $func $bounds]
            }
        }

        #
        # Join the subcomplexes into a list of points and sort the points
        #
        set points {}

        for {set i 0} {$i < $p} {incr i} {
            set points [concat $points $complex($i)]
        }

        if { $iteration == 0 } {
            set oldminimum [lindex [lsort -index 1 -increasing $points] 0 1]
        } else {
            set newminimum [lindex [lsort -index 1 -increasing $points] 0 1]
            if { abs($oldminimum-$newminimum) != 0.0 &&
                 ( abs($oldminimum-$newminimum) < $abstol ||
                   abs($oldminimum-$newminimum) < 0.5 * $reltol * (abs($oldminimum)+abs($newminimum)) ) } {
                break
            } else {
                set oldminimum $newminimum
            }
        }
    }

    #
    # Sort the points and return the best one
    #
    set result [lsort -index 1 -increasing $points]
    set optimum_coords [lindex $result 0 0]
    set optimum_value  [lindex $result 0 1]
    set best_values    {}
    foreach r $result {
        set best_values [concat [lindex $r 1] $best_values]
    }
    return [dict create optimum-coordinates $optimum_coords optimum-value $optimum_value evaluations $sceNEvals best-values $best_values]
}

# OptimiseComplex --
#     Optimise the complex, using subcomplexes
#
# Arguments:
#     complex           The points (and the function values) making up the full complex
#     nsubcomplex       The number of points to be selected for the subcomplex
#     nnewpoints        The number of new points to be generated
#     bounds            The bounds on the coordinates defining the feasible region
#
# Result:
#     A new set of points
#
proc ::math::probopt::OptimiseComplex {complex nsubcomplex nnewpoints func bounds} {
    variable sceNEvals
    #
    # Construct the subcomplex
    #
    set subcomplex [lsort -index 1 -increasing [TriangularSelect $complex $nsubcomplex]]

    #
    # Construct new points:
    # - Determine the centroid, excluding the worst point
    # - Reflect the worst point
    # - Make sure the result is within the feasible region, otherwise
    #   select a new point
    # - Keep the new point if it has a lower function value
    # - Otherwise try a contraction step
    #
    for {set new 0} {$new < $nnewpoints} {incr new} {
        set centroid [Centroid [lrange $complex 0 end-1]]
        set newPoint [ReflectPointInPoint $centroid [lindex $complex end 0]]

        if { ! [WithinBounds $bounds $newPoint] } {
            set newPoint [GeneratePoint $bounds]
            set fvalue [$func $newPoint]
            incr sceNEvals
        } else {
            set fvalue [$func $newPoint]
            incr sceNEvals

            #
            # If the point is better, keep it, otherwise attempt a contraction step
            #
            if { $fvalue > [lindex $complex end 1] } {
                set newPoint [Centroid [list [list $centroid 0.0] [list $newPoint $fvalue]]]
                set fvalue [$func $newPoint]
                incr sceNEvals

                if { $fvalue > [lindex $complex end 1] } {
                    set newPoint [GeneratePoint $bounds]
                    set fvalue [$func $newPoint]
                    incr sceNEvals
                }
            }
        }

        lset complex end [list $newPoint $fvalue]

        set complex [lsort -index 1 -increasing $complex]
    }

    return $complex
}

# GeneratePoint --
#     Generate the coordinates of a random point within the given bounds
#
# Arguments:
#     bounds         Bounds on all coordinates
#
# Result:
#     List of coordinates
#
proc ::math::probopt::GeneratePoint {bounds} {

    set coords {}
    foreach bound $bounds {
        lassign $bound cmin cmax
        lappend coords [expr {$cmin + ($cmax - $cmin) * rand()}]
    }

    return $coords
}

# WithinBounds --
#     Determine if the coordinates of a point are within the given bounds
#
# Arguments:
#     bounds         Bounds on all coordinates
#     point          Coordinates of the point
#
# Result:
#     1 if the point is within the hyperrectangle, 0 otherwise
#
proc ::math::probopt::WithinBounds {bounds point} {

    set within 1

    foreach c $point bound $bounds {
        lassign $bound cmin cmax
        if { $c < $cmin || $c > $cmax } {
            set within 0
            break
        }
    }

    return $within
}

# Centroid --
#     Calculate the centroid of a set of points in N dimensions
#
# Arguments:
#     points         List of point coordinates
#
# Result:
#     Coordinates of the centroid
#
# Note:
#     As this is to be used in the SCE algorithm, the list of
#     point coordinates is slightly more complicated than
#     just the coordinates.
#
proc ::math::probopt::Centroid {points} {
    set dims   [llength [lindex $points 0 0]]
    set number [llength $points]

    set centroid [lrepeat $dims 0]

    foreach point $points {
        set coords [lindex $point 0]

        set idx 0
        foreach c $coords sum $centroid {
            set sum [expr {$sum + $c}]
            lset centroid $idx $sum
            incr idx
        }
    }

    set idx 0
    foreach c $centroid {
        lset centroid $idx [expr {$c / double($number)}]
        incr idx
    }

    return $centroid
}

# ReflectPointInPoint --
#     Reflect a point in another point and return the result
#
# Arguments:
#     centre         Point that serves as the reflection center
#     point          Point to be reflected (list of coordinates)
#
# Result:
#     Coordinates of the new point
#
proc ::math::probopt::ReflectPointInPoint {centre point} {

    set newPoint {}

    foreach c $centre p $point {
        lappend newPoint [expr {2.0 * $c - $p}]
    }

    return $newPoint
}

# TriangularSelect --
#     Select "number" values from a list of values
#     - the probability is triangular
#
# Arguments:
#     values       List of values to choose from
#     number       Number of values to choose (must be smaller than length of the list)
#
# Result:
#     Selected values
#
proc ::math::probopt::TriangularSelect {values number} {
    set selected {}

    for {set i 0} {$i < $number} {incr i} {
        set n [llength $values]

        set r   [expr {1.0 - sqrt(1.0 - rand())}]
        set idx [expr {int($r * $n)}]
        lappend selected [lindex $values $idx]
        set values [lreplace $values $idx $idx]
    }

    return $selected
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































Changes to modules/math/qcomplex.man.

294
295
296
297
298
299
300
301
302
The complex power to be used

[list_end]

[list_end]

[vset CATEGORY {math :: complexnumbers}]
[include ../common-text/feedback.inc]
[manpage_end]







|

294
295
296
297
298
299
300
301
302
The complex power to be used

[list_end]

[list_end]

[vset CATEGORY {math :: complexnumbers}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/qcomplex.test.

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal qcomplex.tcl math::complexnumbers







|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
}
testing {
    useLocal qcomplex.tcl math::complexnumbers

Deleted modules/math/quasirandom.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[vset VERSION 1]
[manpage_begin math::quasirandom n [vset VERSION]]
[keywords {quasi-random}]
[keywords mathematics]
[moddesc {Tcl Math Library}]
[titledesc {Quasi-random points for integration and Monte Carlo type methods}]
[category  Mathematics]
[require Tcl 8.6]
[require TclOO]
[require math::quasirandom [vset VERSION]]
[description]
[para]

In many applications pseudo-random numbers and pseudo-random points in a (limited)
sample space play an important role. For instance in any type of Monte Carlo simulation.
Pseudo-random numbers, however, may be too random and as a consequence a large
number of data points is required to reduce the error or fluctuation in the results
to the desired value.
[para]

Quasi-random numbers can be used as an alternative: instead of "completely" arbitrary
points, points are generated that are diverse enough to cover the entire sample space
in a more or less uniform way. As a consequence convergence to the limit can be
much faster, when such quasi-random numbers are well-chosen.
[para]

The package defines a [term class] "qrpoint" that creates a command to generate
quasi-random points in 1, 2 or more dimensions. The command can either generate
separate points, so that they can be used in a user-defined algorithm or use these
points to calculate integrals of functions defined over 1, 2 or more dimensions.
It also holds several other common algorithms. (NOTE: these are not implemented yet)
[para]
One particular characteristic of the generators is that there are no tuning parameters
involved, which makes the use particularly simple.


[section "COMMANDS"]
A quasi-random point generator is created using the [term qrpoint] class:

[list_begin definitions]

[call [cmd "::math::quasirandom::qrpoint create"] [arg NAME] [arg DIM] [opt ARGS]]
This command takes the following arguments:

[list_begin arguments]
[arg_def string NAME] The name of the command to be created (alternatively: the [term new] subcommand
will generate a unique name)
[arg_def integer/string DIM] The number of dimensions or one of: "circle", "disk", "sphere" or "ball"
[arg_def strings ARGS] Zero or more key-value pairs. The supported options are:

[list_begin itemized]
[item] [term {-start index}]: The index for the next point to be generated (default: 1)
[item] [term {-evaluations number}]: The number of evaluations to be used by default (default: 100)
[list_end]

[list_end]

[list_end]

The points that are returned lie in the hyperblock [lb]0,1[lb]^n (n the number of dimensions)
or on the unit circle, within the unit disk, on the unit sphere or within the unit ball.
[para]

Each generator supports the following subcommands:
[list_begin definitions]

[call [cmd "gen next"]]
Return the coordinates of the next quasi-random point
[para]

[call [cmd "gen set-start"] [arg index]]
Reset the index for the next quasi-random point. This is useful to control which list of points is returned.
Returns the new or the current value, if no value is given.
[para]

[call [cmd "gen set-evaluations"] [arg number]]
Reset the default number of evaluations in compound algorithms. Note that the actual number is the
smallest 4-fold larger or equal to the given number. (The 4-fold plays a role in the detailed integration
routine.)
[para]

[call [cmd "gen integral"] [arg func] [arg minmax] [arg args]]
Calculate the integral of the given function over the block (or the circle, sphere etc.)

[list_begin arguments]
[arg_def string func] The name of the function to be integrated

[arg_def list minmax] List of pairs of minimum and maximum coordinates. This can be used to
map the quasi-random coordinates to the desired hyper-block.
[para]
If the space is a circle, disk etc. then this argument should be a single value, the radius.
The circle, disk, etc. is centred at the origin. If this is not what is required, then a coordinate
transformation should be made within the function.

[arg_def strings args] Zero or more key-value pairs. The following options are supported:
[list_begin itemized]
[item] [term {-evaluations number}]: The number of evaluations to be used. If not specified use the
default of the generator object.
[list_end]

[list_end]

[list_end]

[section TODO]
Implement other algorithms and variants
[para]
Implement more unit tests.
[para]
Comparison to pseudo-random numbers for integration.


[section References]

Various algorithms exist for generating quasi-random numbers. The generators created in this package are based on:
[uri http://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/]

[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































Deleted modules/math/quasirandom.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
# quasirandom.tcl --
#     Generate quasi-random points in n dimensions and provide simple
#     methods to evaluate an integral
#
#     Note: provide a OO-style interface
#
#     TODO: integral-detailed, minimum, maximum
#
#     Based on the blog "The Unreasonable Effectiveness of Quasirandom Sequences" by Martin Roberts,
#     http://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/
#

package require Tcl 8.5
package require TclOO

package provide math::quasirandom 1.0

namespace eval ::math::quasirandom {

# qrpoints --
#     Create the class
#
::oo::class create qrpoints {

    # constructor --
    #     Construct a new instance of the qrpoints class
    #
    # Arguments:
    #     dim             Number of dimensions, or one of: circle, disk, sphere, ball
    #     args            Zero or more key-value pairs:
    #                     -start       - start the generation with the given multiplier (integer)
    #                     -evaluations - default number of evaluations for the integration
    #                     (possibly others as well)
    #
    constructor {dimin args} {
        my variable dim
        my variable coord_factors
        my variable step
        my variable evaluations
        my variable use_radius
        my variable effective_dim

        if { ( ![string is integer -strict $dimin] || $dimin <= 0 ) && $dimin ni {circle disk sphere ball} } {
            return -code error "The dimension argument should be a positive integer value or one of circle, disk, sphere or ball"
        }

        set use_radius 1
        switch -- $dimin {
            "circle" {
                set dim 1
                set effective_dim 2
                ::oo::objdefine [self] {
                    forward next   my CircleNext
                    forward Volume my CircleVolume
                }
            }
            "disk" {
                set dim 2
                set effective_dim 2
                ::oo::objdefine [self] {
                    forward next   my DiskNext
                    forward Volume my DiskVolume
                }
            }
            "sphere" {
                set dim 2
                set effective_dim 3
                ::oo::objdefine [self] {
                    forward next   my SphereNext
                    forward Volume my SphereVolume
                }
            }
            "ball" {
                set dim 3
                set effective_dim 3
                ::oo::objdefine [self] {
                    forward next   my BallNext
                    forward Volume my BallVolume
                }
            }
            default {
                set dim $dimin
                set use_radius 0
                ::oo::objdefine [self] {
                    forward next   my PlainNext
                    forward Volume my PlainVolume
                }
            }
        }

        set step        1
        set evaluations 100

        set coord_factors [::math::quasirandom::CoordFactors $dim]

        foreach {key value} $args {
            switch -- $key {
            "-start" {

                 my set-step $value
            }
            "-evaluations" {
                 if { ![string is -strict integer $value] || $value <= 0 } {
                     return -code error "The value for the option $key should be a positive integer value"
                 }

                 my set-evaluations $value
            }
            default {
                return -code error "Unknown option: $key -- value: $value"
            }
            }
        }
    }

    # PlainNext --
    #     Generate the next point - for a hyperblock
    #
    method PlainNext {} {
        my variable step
        my variable coord_factors

        set coords {}
        foreach f $coord_factors {
            lappend coords [expr {fmod( $f * $step, 1.0 )}]
        }

        incr step

        return $coords
    }

    # PlainVolume --
    #     Calculate the volume of a hyperblock
    #
    # Arguments:
    #     minmax              List of minimum and maximum per dimension
    #
    # Returns:
    #     The volume
    #
    method PlainVolume {minmax} {
        set volume 1.0
        foreach range $minmax {
            lassign $range xmin xmax
            set volume [expr {$volume * ($xmax-$xmin)}]
        }
        return $volume
    }

    # CircleNext --
    #     Generate the next point on a unit circle
    #
    method CircleNext {} {

        set f      [lindex [my PlainNext] 0]
        set rad    [expr {2.0 * acos(-1.0) * $f}]

        set coords [list [expr {cos($rad)}] [expr {sin($rad)}]]

        return $coords
    }

    # CircleVolume --
    #     Calculate the "volume" of the unit circle
    #
    # Arguments:
    #     radius        Radius of the circle
    #
    method CircleVolume {radius} {
         return [expr {$radius * 2.0*cos(-1.0)}]
    }

    # DiskNext --
    #     Generate the next point on a unit disk
    #
    method DiskNext {} {

        while {1} {
            set coords [my PlainNext]

            lassign $coords x y

            if { hypot($x-0.5,$y-0.5) <= 0.25 } {
                set coords [list [expr {2.0*$x-1.0}] [expr {2.0*$y-1.0}]]
                break
            }
        }
        return $coords
    }

    # DiskVolume --
    #     Calculate the "volume" of the unit disk
    #
    # Arguments:
    #     radius        Radius of the disk
    #
    method DiskVolume {radius} {
         return [expr {$radius**2 * cos(-1.0)}]
    }

    # BallNext --
    #     Generate the next point on a unit ball
    #
    method BallNext {} {

        while {1} {
            set coords [my PlainNext]

            lassign $coords x y z

            set r [expr {($x-0.5)**2 + ($y-0.5)**2 + ($z-0.5)**2}]
            if { $r <= 0.25 } {
                set coords [list [expr {2.0*$x-1.0}] [expr {2.0*$y-1.0}] [expr {2.0*$z-1.0}]]
                break
            }
        }

        return $coords
    }

    # BallVolume --
    #     Calculate the volume of the unit ball
    #
    # Arguments:
    #     radius        Radius of the ball
    #
    method BallVolume {radius} {
         return [expr {4.0/3.0 * $radius**3 * cos(-1.0)}]
    }

    # SphereNext --
    #     Generate the next point on a unit sphere
    #
    method SphereNext {} {

        set coords [my PlainNext]

        lassign $coords u v

        set phi    [expr {2.0 * acos(-1.0) * $v}]
        set lambda [expr {acos(2.0 * $u - 1.0) + 0.5 * acos(-1.0)}]

        set x      [expr {cos($lambda) * cos($phi)}]
        set y      [expr {cos($lambda) * sin($phi)}]
        set z      [expr {sin($lambda)}]

        return [list $x $y $z]
    }

    # SphereVolume --
    #     Calculate the "volume" of the unit sphere
    #
    # Arguments:
    #     radius        Radius of the sphere
    #
    method SphereVolume {radius} {
         return [expr {4.0 * $radius**2 * cos(-1.0)}]
    }

    # set-step --
    #     Set the first step to be used
    #
    method set-step {{value ""}} {
        my variable step

        if { $value eq "" } {
            return $step
        }

        if { ![string is integer -strict $value] } {
            return -code error "The value for the option $key should be an integer value"
        }

        set step [expr {int($value)}]
    }

    # set-evaluations --
    #     Set the number of evaluations for integration
    #
    method set-evaluations {{value ""}} {
        my variable evaluations

        if { $value eq "" } {
            return $evaluations
        }

        if { ![string is integer -strict $value] || $value <= 0 } {
            return -code error "The value for the option $key should be a positive integer value"
        }

        set evaluations [expr {4*int(($value+3)/4)}]  ;# Make sure it is a 4-fold
    }

    # integral --
    #     Evaluate the integral of a function over a given (rectangular) domain
    #
    # Arguments:
    #     func              Function to be integrated
    #     minmax            List of minimum and maximum bounds for each coordinate
    #     args              Key-value pair: number of evaluations
    #
    # Returns:
    #     Estimate of the integral based on "evaluations" evaluations
    #     Note: no error estimate
    #
    method integral {func minmax args} {
        my variable dim
        my variable step
        my variable coord_factors
        my variable evaluations
        my variable use_radius
        my variable effective_dim

        set evals $evaluations

        set func [uplevel 1 [list namespace which -command $func]]

        foreach {key value} $args {
            switch -- $key {
            "-evaluations" {
                 if { ![string is integer -strict $value] || $value <= 0 } {
                     return -code error "The value for the option $key should be a positive integer value"
                 }

                 set evals $value ;# Local only!
            }
            default {
                return -code error "Unknown option: $key -- value: $value"
            }
            }
        }

        if { ! $use_radius } {
            if { [llength $minmax] != $dim } {
                return -code error "The number of ranges (minmax) should be equal to the dimension ($dim)"
            } else {
                set volume [my Volume $minmax]
            }
        } else {
            if { ! [string is double $minmax] } {
                return -code error "For a circle, disk, sphere or ball only the radius should be given"
            } else {
                set radius $minmax
                set minmax [lrepeat $effective_dim [list 0.0 $radius]]
                set volume [my Volume $radius]
            }
        }

        set sum 0.0

        for {set i 0} {$i < $evals} {incr i} {
            set coords {}
            foreach c [my next] range $minmax {
                lassign $range xmin xmax
                lappend coords [expr {$xmin + ($xmax-$xmin) * $c}]
            }
            set sum [expr {$sum + [$func $coords]}]
        }

        return [expr {$sum * $volume / $evals}]
    }

    # integral-detailed --
    #     Evaluate the integral of a function over a given (rectangular) domain
    #     and provide detailed information
    #
    # Arguments:
    #     func              Function to be integrated
    #     minmax            List of minimum and maximum bounds for each coordinate
    #     args              Key-value pair: number of evaluations
    #
    # Returns:
    #     Dictionary of:
    #     -estimate value     - estimate of the integral
    #     -evaluations number - total number of evaluations
    #     -error value        - estimate of the error
    #     -rawvalues list     - list of raw values obtained for the integral
    #
    method integral-detailed {func minmax args} {
        my variable evaluations

        set evals $evaluations

        set func [uplevel 1 [list namespace which -command $func]]

        foreach {key value} $args {
            switch -- $key {
            "-evaluations" {
                 if { ![string is integer -strict $value] || $value <= 0 } {
                     return -code error "The value for the option $key should be a positive integer value"
                 }

                 set evals $value ;# Local only!
            }
            default {
                return -code error "Unknown option: $key -- value: $value"
            }
            }
        }

        lappend args -evaluations [expr {($evals+3)/4}]

        for {set i 0} {$i < 4} {incr i} {
            lappend rawvalues [my integral $func $minmax {*}$args]
        }

        set sum   0.0
        set sqsum 0.0

        foreach value $rawvalues {
            set sum   [expr {$sum + $value}]
            set sqsum [expr {$sqsum + $value**2}]
        }

        set stdev [expr {sqrt(($sqsum - $sum**2/4.0)/3.0)}]
        set sum   [expr {$sum / 4.0}]
                                            # Standard error of mean
        return [dict create -estimate $sum -error [expr {$stdev/2.0}] -rawvalues $rawvalues -evaluations [expr {4*(($evals+3)/4)}]]
    }

} ;# End of class

} ;# End of namespace eval

# CoordFactors --
#     Determine the factors for the coordinates
#
# Arguments:
#     dim         Number of dimensions
#
proc ::math::quasirandom::CoordFactors {dim} {
    set n [expr {$dim + 1}]

    set f 1.0
    for {set i 0} {$i < 10} {incr i} {
        set f [expr {$f - ($f**$n-$f-1.0) / ($n*$f**($n-1)-1.0)}]
    }

    set factors {}
    set af      1.0

    for {set i 0} {$i < $dim} {incr i} {
        set af [expr {$af/$f}]
        lappend factors $af
    }

    return $factors
}

# End of code for package

# --------------------------------------------
# test --
#

if {0} {

::math::quasirandom::qrpoints create square 2

puts [square next]
puts [square next]
puts [square next]


proc f {coords} {
    lassign $coords x y

    expr {$x**2+$y**2}
}

proc g {coords} {
    lassign $coords x y

    expr {(1.0-cos($x))**2 * (1.0-cos($y))**2}
}

# Print four estimates - should not deviate too much from 10.0
puts [square integral f {{0 1} {0 3}}]
puts [square integral f {{0 1} {0 3}}]
puts [square integral f {{0 1} {0 3}}]
puts [square integral f {{0 1} {0 3}}]

# Print a sequence of estimates - should converge to (3pi/2)**2
foreach n {20 40 100 300 1000} {
    square set-evaluations $n

    puts "$n: [square integral g [list [list 0.0 [expr {acos(-1)}]] [list 0.0 [expr {acos(-1)}]]]]"
}


::math::quasirandom::qrpoints create block 3
puts [block next]

puts "Circle ..."
::math::quasirandom::qrpoints create circle circle
puts [circle next]
puts [circle next]
puts [circle next]

# Test values for CoordFactors
# dim = 1: 1.6180339887498948482045...
# dim = 2: 1.3247179572447460259609...
# dim = 3: 1.2207440846057594753616...

set f [::math::quasirandom::CoordFactors 1]
puts 1.6180339887498948482045...
puts [expr {1.0/$f}]

set f [lindex [::math::quasirandom::CoordFactors 2] 0]
puts 1.3247179572447460259609...
puts [expr {1.0/$f}]

set f [lindex [::math::quasirandom::CoordFactors 3] 0]
puts 1.2207440846057594753616...
puts [expr {1.0/$f}]
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/math/quasirandom.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
# -*- tcl -*-
# quasirandom.test --
#     Tests for the quasi-random numbers package
#

source [file join \
	    [file dirname [file dirname [file join [pwd] [info script]]]] \
	    devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

testing {
    useLocal  quasirandom.tcl math::quasirandom
}

#
# Functions for integration tests
#
proc const {coords} {
    return 1.0
}

proc fx {coords} {
    set x [lindex $coords 0]
    return $x
}

proc fy {coords} {
    set y [lindex $coords 1]
    return $y
}

proc fz {coords} {
    set z [lindex $coords 2]
    return $z
}

proc fxyz4 {coords} {
    lassign $coords x y z
    return [expr {($x*$y*$z)**4}]
}

#
# Auxiliary proc
#
proc equalCoords {coords1 coords2} {
    set equal 1
    foreach c1 $coords1 c2 $coords2 {
        if { $c1 != $c2 } {
            set equal 0
            break
        }
    }
    return $equal
}

#
# Create and register (in that order!) custom matching procedures
#
proc matchTolerant { expected actual } {
    set match 1
    foreach a $actual e $expected {
	if { $e != 0.0 } {
	    if { abs($e-$a)>1.0e-7*abs($e) &&
		 abs($e-$a)>1.0e-7*abs($a)     } {
		set match 0
		break
	    }
	} else {
	    if { abs($a) > 1.0e-7 } {
		set match 0
	    }
	}
    }
    return $match
}
proc matchOnePercent { expected actual } {
    set match 1
    foreach a $actual e $expected {
	if { $e != 0.0 } {
	    if { abs($e-$a)>1.0e-2*abs($e) &&
		 abs($e-$a)>1.0e-2*abs($a)     } {
		set match 0
		break
	    }
	} else {
	    if { abs($a) > 1.0e-2 } {
		set match 0
	    }
	}
    }
    return $match
}

::tcltest::customMatch tolerant matchTolerant
::tcltest::customMatch error1percent matchOnePercent
::tcltest::customMatch equal equalCoords


#
# Testing CoordFactors: the basis of the algorithm
# Note: exact matching
#
test "Quasirandom-0.1" "Check basic factor for 1 dimension" -body {
    set f [::math::quasirandom::CoordFactors 1]
    return [expr {1.0/$f}]
} -result 1.618033988749895

test "Quasirandom-0.2" "Check basic factor for 2 dimensions" -body {
    set f [lindex [::math::quasirandom::CoordFactors 2] 0]
    return [expr {1.0/$f}]
} -result 1.324717957244746

test "Quasirandom-0.3" "Check basic factor for 3 dimensions" -body {
    set f [lindex [::math::quasirandom::CoordFactors 3] 0]
    return [expr {1.0/$f}]
} -result 1.2207440846057596

test "Quasirandom-0.4" "Check number of factors for 10 dimensions" -body {
    return [llength [::math::quasirandom::CoordFactors 10]]
} -result 10

#
# Basic interface to the qrpoints class
#
test "Quasirandom-1.0" "Simple QR generator for two dimensions" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple 2

    return [simple next]
} -result {0.7548776662466927 0.5698402909980532} -cleanup {simple destroy}

test "Quasirandom-1.1" "Simple QR generator - negative dimension" -body {
    ::math::quasirandom::qrpoints create simple -1
} -returnCodes {error} -result {The dimension argument should be a positive integer value or one of circle, disk, sphere or ball}

test "Quasirandom-1.2" "Simple QR generator - set start" -body {
    ::math::quasirandom::qrpoints create simple  2
    ::math::quasirandom::qrpoints create simple2 2 -start 2

    simple next
    set coords  [simple next]

    set coords2 [simple2 next]  ;# Should be equal to the second point for the [simple] generator

    equalCoords $coords $coords2
} -result 1 -cleanup {simple destroy; simple2 destroy}

#
# Test simple methods
#
test "Quasirandom-2.1" "set-step sets and returns the value" -match equal -body {
    ::math::quasirandom::qrpoints create simple 2

    simple set-step 100
} -result 100 -cleanup {simple destroy}

test "Quasirandom-2.2" "set-evaluations sets and returns the value" -match equal -body {
    ::math::quasirandom::qrpoints create simple 2

    simple set-evaluations 100
} -result 100 -cleanup {simple destroy}

test "Quasirandom-2.3" "set-step returns the value" -match equal -body {
    ::math::quasirandom::qrpoints create simple 2

    simple set-step 100
    simple set-step
} -result 100 -cleanup {simple destroy}

test "Quasirandom-2.4" "set-evaluations returns the value" -match equal -body {
    ::math::quasirandom::qrpoints create simple 2

    simple set-evaluations 100
    simple set-evaluations
} -result 100 -cleanup {simple destroy}

#
# Test of bounds on points
#
test "Quasirandom-3.1" "Points should fall within block" -body {
    ::math::quasirandom::qrpoints create simple 10

    set correct_bound 1

    for {set i 0} {$i < 100} {incr i} {
        set coords [simple next]

        foreach c $coords {
            if { $c < 0.0 || $c > 1.0 } {
                set correct_bound 0
                break
            }
        }
    }

    return $correct_bound
} -result 1 -cleanup {simple destroy}

test "Quasirandom-3.2" "Points should fall on a circle" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple circle

    set correct_bound 1
    set radii {}

    for {set i 0} {$i < 100} {incr i} {
        set coords [simple next]

        lassign $coords x y
        lappend radii [expr {hypot($x,$y)}]
    }

    return $radii
} -result [lrepeat 100 1.0] -cleanup {simple destroy}

test "Quasirandom-3.3" "Points should fall within a disk" -match equal -body {
    ::math::quasirandom::qrpoints create simple disk

    set correct_bounds {}
    for {set i 0} {$i < 100} {incr i} {
        set coords [simple next]

        lassign $coords x y
        lappend correct_bounds [expr {hypot($x,$y) <= 1.0}]
    }

    return $correct_bounds
} -result [lrepeat 100 1] -cleanup {simple destroy}

test "Quasirandom-3.4" "Points should fall on a sphere" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple sphere

    set correct_bound 1
    set radii {}

    for {set i 0} {$i < 100} {incr i} {
        set coords [simple next]

        lassign $coords x y z
        lappend radii [expr {sqrt($x**2 + $y**2 + $z**2)}]
    }

    return $radii
} -result [lrepeat 100 1.0] -cleanup {simple destroy}

test "Quasirandom-3.5" "Points should fall within a ball" -match equal -body {
    ::math::quasirandom::qrpoints create simple ball

    set correct_bounds {}
    for {set i 0} {$i < 100} {incr i} {
        set coords [simple next]

        lassign $coords x y
        lappend correct_bounds [expr {sqrt($x**2 + $y**2 + $z**2) <= 1.0}]
    }

    return $correct_bounds
} -result [lrepeat 100 1] -cleanup {simple destroy}




#
# Test of integral methods
#
# Integrating a constant function means the result is the volume
#
test "Quasirandom-4.1" "Integrate constant function - volume = 1" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple 3

    set result [simple integral const {{0.0 1.0} {0.0 1.0} {0.0 1.0}}]

} -result 1.0 -cleanup {simple destroy}

test "Quasirandom-4.2" "Integrate constant function - volume = 8" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple 3

    set result [simple integral const {{0.0 2.0} {0.0 2.0} {0.0 2.0}}]

} -result 8.0 -cleanup {simple destroy}

test "Quasirandom-4.3" "Integrate constant function - circle" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple circle

    set result [simple integral const 2.0]

} -result [expr {2.0 * 2.0 * cos(-1.0)}] -cleanup {simple destroy}

test "Quasirandom-4.3" "Integrate constant function - disk" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple disk

    set result [simple integral const 2.0]

} -result [expr {2.0**2 * cos(-1.0)}] -cleanup {simple destroy}

test "Quasirandom-4.4" "Integrate constant function - sphere" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple sphere

    set result [simple integral const 2.0]

} -result [expr {4.0 * 2.0**2 * cos(-1.0)}] -cleanup {simple destroy}

test "Quasirandom-4.5" "Integrate constant function - ball" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple ball

    set result [simple integral const 2.0]

} -result [expr {4.0/3.0 * 2.0**3 * cos(-1.0)}] -cleanup {simple destroy}

# We do not use too many evaluations ... error less than 1%
test "Quasirandom-4.6" "Integrate linear function (x, y, z)" -match error1percent -body {
    ::math::quasirandom::qrpoints create simple 3

    set result [list [simple integral fx {{0.0 1.0} {0.0 1.0} {0.0 1.0}}] \
		    [simple integral fy {{0.0 1.0} {0.0 1.0} {0.0 1.0}}] \
		    [simple integral fz {{0.0 1.0} {0.0 1.0} {0.0 1.0}}] ]

} -result {0.5 0.5 0.5} -cleanup {simple destroy}

#
# The function varies "sharply", so we need more evaluations
#
test "Quasirandom-4.7" "Integrate (xyz)**4" -match error1percent -body {
    ::math::quasirandom::qrpoints create simple 3

    # Exact answer is 1/125
    set result [simple integral fxyz4 {{0.0 1.0} {0.0 1.0} {0.0 1.0}} -evaluations 1000]

} -result 0.0080 -cleanup {simple destroy}


#
# Detailed integration: provides error estimates but also an indication that
# the values can differ quite a bit
#
test "Quasirandom-5.1" "Integrate constant function with details - volume = 1" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple 3

    set result [simple integral-detailed const {{0.0 1.0} {0.0 1.0} {0.0 1.0}}]

    set rawvalues [dict get $result -rawvalues]

} -result {1.0 1.0 1.0 1.0} -cleanup {simple destroy}


test "Quasirandom-5.2" "Integrate linear function with details - volume = 1" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple 3

    set result [simple integral-detailed fx {{0.0 1.0} {0.0 1.0} {0.0 1.0}}]

    set rawvalues [dict get $result -rawvalues]

} -result {0.48924267415013695 0.48855550905424594 0.5278683439583554 0.48718117886246404} -cleanup {simple destroy}


test "Quasirandom-5.3" "Integrate (xyz)**4 with details - volume = 1" -match tolerant -body {
    ::math::quasirandom::qrpoints create simple 3

    set result [simple integral-detailed fxyz4 {{0.0 1.0} {0.0 1.0} {0.0 1.0}}]

    set rawvalues [dict get $result -rawvalues]

} -result {0.0022115062627913935 0.009840104253511376 0.014937934937801888 0.007838969739655276} -cleanup {simple destroy}


#
# Test integration procedures in a different namespace
#
test "Quasirandom-6.1" "Integrate ::func::func" -match tolerant -body {
    namespace eval ::func {

        proc func {xy} {
            lassign $xy x y
            expr {$x**2+$y**2}
        }

        ::math::quasirandom::qrpoints create simple 2

        set ::result [simple integral func {{0.0 1.0} {0.0 1.0}}]
    }

    return $result

} -result {0.67353777} -cleanup {::func::simple destroy}


test "Quasirandom-6.2" "Integrate (details) ::func::func" -match tolerant -body {
    namespace eval ::func {

        proc func {xy} {
            lassign $xy x y
            expr {$x**2+$y**2}
        }

        ::math::quasirandom::qrpoints create simple 2

        set ::result [simple integral-detailed func {{0.0 1.0} {0.0 1.0}}]
    }

    return [dict get $result -estimate]

} -result {0.67353777} -cleanup {::func::simple destroy}


# TODO:
# - func in different namespace
# - implement detailed integration and test the details
# - implement minimization

#
# Hm, the less than 1% error in the above test is a coincidence. The error is more
# likely to be 10%.
#
if {0} {
    ::math::quasirandom::qrpoints create simple 3
    # Exact answer is 1/125
    set result [simple integral fxyz4 {{0.0 1.0} {0.0 1.0} {0.0 1.0}} -evaluations 100]
    puts "fxyz4: $result"
    simple set-step 0
    set result [simple integral fxyz4 {{0.0 1.0} {0.0 1.0} {0.0 1.0}} -evaluations 1000]
    puts "fxyz4: $result"
    set result [simple integral fxyz4 {{0.0 1.0} {0.0 1.0} {0.0 1.0}} -evaluations 1000]
    puts "fxyz4: $result"
    set result [simple integral fxyz4 {{0.0 1.0} {0.0 1.0} {0.0 1.0}} -evaluations 1000]
    puts "fxyz4: $result"

    package require math::statistics
    set samples {}
    for {set trial 0} {$trial < 10} {incr trial} {
	set sum 0.0

	for {set p 0} {$p < 100} {incr p} {
	    set x   [expr {rand()}]
	    set y   [expr {rand()}]
	    set z   [expr {rand()}]
	    set sum [expr {$sum + [fxyz4 [list $x $y $z]]}]
	}

	puts "Trial $trial: [expr {$sum/100.0}]"

	lappend samples [expr {$sum/100.0}]
    }

    puts "MonteCarlo (100):"
    puts [::math::statistics::mean $samples]
    puts [::math::statistics::stdev $samples]

    set samples {}
    for {set trial 0} {$trial < 10} {incr trial} {
	set sum 0.0

	for {set p 0} {$p < 1000} {incr p} {
	    set x   [expr {rand()}]
	    set y   [expr {rand()}]
	    set z   [expr {rand()}]
	    set sum [expr {$sum + [fxyz4 [list $x $y $z]]}]
	}

	puts "Trial $trial: [expr {$sum/1000.0}]"

	lappend samples [expr {$sum/1000.0}]
    }

    puts "MonteCarlo (1000):"
    puts [::math::statistics::mean $samples]
    puts [::math::statistics::stdev $samples]

    set samples {}
    for {set trial 0} {$trial < 10} {incr trial} {
	set result [simple integral fxyz4 {{0.0 1.0} {0.0 1.0} {0.0 1.0}} -evaluations 100]

	lappend samples $result
    }

    puts "Quasi-random (100):"
    puts [::math::statistics::mean $samples]
    puts [::math::statistics::stdev $samples]

    set samples {}
    for {set trial 0} {$trial < 10} {incr trial} {
	set result [simple integral fxyz4 {{0.0 1.0} {0.0 1.0} {0.0 1.0}} -evaluations 1000]

	lappend samples $result
    }

    puts "Quasi-random (1000):"
    puts [::math::statistics::mean $samples]
    puts [::math::statistics::stdev $samples]


    puts [simple integral-detailed fx {{0.0 1.0} {0.0 1.0} {0.0 1.0}}]
}


# -------------------------------------------------------------------------

# End of test cases
testsuiteCleanup
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to modules/math/rational_funcs.man.

178
179
180
181
182
183
184
185
186
[section "REMARKS ON THE IMPLEMENTATION"]

The implementation of the rational functions relies on the
math::polynomials package. For further remarks see the documentation on
that package.

[vset CATEGORY {math :: rationalfunctions}]
[include ../common-text/feedback.inc]
[manpage_end]







|

178
179
180
181
182
183
184
185
186
[section "REMARKS ON THE IMPLEMENTATION"]

The implementation of the rational functions relies on the
math::polynomials package. For further remarks see the documentation on
that package.

[vset CATEGORY {math :: rationalfunctions}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/roman.man.

43
44
45
46
47
48
49
50
51
  [list_end]

Of these commands both [emph toroman] and [emph tointeger] are exported
for easier use. The other two are not, as they could interfer or be
confused with existing Tcl commands.

[vset CATEGORY {math :: roman}]
[include ../common-text/feedback.inc]
[manpage_end]







|

43
44
45
46
47
48
49
50
51
  [list_end]

Of these commands both [emph toroman] and [emph tointeger] are exported
for easier use. The other two are not, as they could interfer or be
confused with existing Tcl commands.

[vset CATEGORY {math :: roman}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/roman.test.

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.2

support {
    useLocal math.tcl math
}
testing {
    useLocal romannumerals.tcl math::roman







|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.3
testsNeedTcltest 2.2

support {
    useLocal math.tcl math
}
testing {
    useLocal romannumerals.tcl math::roman

Changes to modules/math/romberg.man.

332
333
334
335
336
337
338
339
340
foreach { value error } [romberg_sine f -1.0 1.0] break
puts [format "integral is %.6g +/- %.6g" $value $error]

integral is 3.97746 +/- 2.3557e-010
}]

[vset CATEGORY {math :: calculus}]
[include ../common-text/feedback.inc]
[manpage_end]







|

332
333
334
335
336
337
338
339
340
foreach { value error } [romberg_sine f -1.0 1.0] break
puts [format "integral is %.6g +/- %.6g" $value $error]

integral is 3.97746 +/- 2.3557e-010
}]

[vset CATEGORY {math :: calculus}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/special.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin math::special n 0.4]
[keywords {Bessel functions}]
[keywords {error function}]
[keywords math]
[keywords {special functions}]
[copyright {2004 Arjen Markus <arjenmarkus@users.sourceforge.net>}]
[moddesc   {Tcl Math Library}]
[titledesc {Special mathematical functions}]
[category  Mathematics]
[require Tcl [opt 8.5]]
[require math::special [opt 0.5]]

[description]
[para]
This package implements several so-called special functions, like
the Gamma function, the Bessel functions and such.

[para]

|








|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin math::special n 0.3]
[keywords {Bessel functions}]
[keywords {error function}]
[keywords math]
[keywords {special functions}]
[copyright {2004 Arjen Markus <arjenmarkus@users.sourceforge.net>}]
[moddesc   {Tcl Math Library}]
[titledesc {Special mathematical functions}]
[category  Mathematics]
[require Tcl [opt 8.3]]
[require math::special [opt 0.3]]

[description]
[para]
This package implements several so-called special functions, like
the Gamma function, the Bessel functions and such.

[para]
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
             |             |             |             |
Fresnel      | C           |  all of R   |     --      |   < 2.0e-3
integrals    | S           |  all of R   |     --      |   < 2.0e-3
             |             |             |             |
general      | Beta        | (see Gamma) |     --      |   < 1.0e-9
             | Gamma       |  x != 0,-1, |     --      |   < 1.0e-9
             |             |  -2, ...    |             |
             | incBeta     |             |  a, b > 0   |   < 1.0e-9
             | regIncBeta  |             |  a, b > 0   |   < 1.0e-9
             | digamma     |  x != 0,-1  |             |   < 1.0e-9
             |             |  -2, ...    |             |
             |             |             |             |
             | sinc        |  all of R   |     --      |   exact
             |             |             |             |
orthogonal   | Legendre    |  all of R   | n = 0,1,... |   exact
polynomials  | Chebyshev   |  all of R   | n = 0,1,... |   exact
             | Laguerre    |  all of R   | n = 0,1,... |   exact
             |             |             | alpha el. R |
             | Hermite     |  all of R   | n = 0,1,... |   exact







<
<
<
<
<







95
96
97
98
99
100
101





102
103
104
105
106
107
108
             |             |             |             |
Fresnel      | C           |  all of R   |     --      |   < 2.0e-3
integrals    | S           |  all of R   |     --      |   < 2.0e-3
             |             |             |             |
general      | Beta        | (see Gamma) |     --      |   < 1.0e-9
             | Gamma       |  x != 0,-1, |     --      |   < 1.0e-9
             |             |  -2, ...    |             |





             | sinc        |  all of R   |     --      |   exact
             |             |             |             |
orthogonal   | Legendre    |  all of R   | n = 0,1,... |   exact
polynomials  | Chebyshev   |  all of R   | n = 0,1,... |   exact
             | Laguerre    |  all of R   | n = 0,1,... |   exact
             |             |             | alpha el. R |
             | Hermite     |  all of R   | n = 0,1,... |   exact
124
125
126
127
128
129
130


131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
[item]
Bessel functions of the second kind (Y_n, K_n)
[item]
Bessel functions of arbitrary order (and hence the Airy functions)
[item]
Chebyshev polynomials of the second kind (U_n)
[item]


The incomplete gamma function
[list_end]

[section "PROCEDURES"]

The package defines the following public procedures:

[list_begin definitions]

[call [cmd ::math::special::eulerNumber] [arg index]]

Return the index'th Euler number (note: these are integer values). As the
size of these numbers grows very fast, only a limited number are available.

[list_begin arguments]
[arg_def int index] Index of the number to be returned (should be between 0 and 54)
[list_end]

[para]

[call [cmd ::math::special::bernoulliNumber] [arg index]]

Return the index'th Bernoulli number. As the size of the numbers grows very fast,
only a limited number are available.

[list_begin arguments]
[arg_def int index] Index of the number to be returned (should be between 0 and 52)
[list_end]

[para]

[call [cmd ::math::special::Beta] [arg x] [arg y]]

Compute the Beta function for arguments "x" and "y"

[list_begin arguments]
[arg_def float x] First argument for the Beta function

[arg_def float y] Second argument for the Beta function
[list_end]

[para]

[call [cmd ::math::special::incBeta] [arg a] [arg b] [arg x]]

Compute the incomplete Beta function for argument "x" with parameters "a" and "b"

[list_begin arguments]
[arg_def float a] First parameter for the incomplete Beta function, a > 0
[arg_def float b] Second parameter for the incomplete Beta function, b > 0
[arg_def float x] Argument for the incomplete Beta function
[list_end]

[para]

[call [cmd ::math::special::regIncBeta] [arg a] [arg b] [arg x]]

Compute the regularized incomplete Beta function for argument "x" with parameters "a" and "b"

[list_begin arguments]
[arg_def float a] First parameter for the incomplete Beta function, a > 0
[arg_def float b] Second parameter for the incomplete Beta function, b > 0
[arg_def float x] Argument for the regularized incomplete Beta function
[list_end]

[para]

[call [cmd ::math::special::Gamma] [arg x]]

Compute the Gamma function for argument "x"

[list_begin arguments]
[arg_def float x] Argument for the Gamma function
[list_end]

[para]

[call [cmd ::math::special::digamma] [arg x]]

Compute the digamma function (psi) for argument "x"

[list_begin arguments]
[arg_def float x] Argument for the digamma function
[list_end]

[para]

[call [cmd ::math::special::erf] [arg x]]

Compute the error function for argument "x"

[list_begin arguments]







>
>
|








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<
<
<
<
<
<
<







119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136






















137
138
139
140
141
142
143
144
145
146
147
148
























149
150
151
152
153
154
155
156










157
158
159
160
161
162
163
[item]
Bessel functions of the second kind (Y_n, K_n)
[item]
Bessel functions of arbitrary order (and hence the Airy functions)
[item]
Chebyshev polynomials of the second kind (U_n)
[item]
The digamma function (psi)
[item]
The incomplete gamma and beta functions
[list_end]

[section "PROCEDURES"]

The package defines the following public procedures:

[list_begin definitions]























[call [cmd ::math::special::Beta] [arg x] [arg y]]

Compute the Beta function for arguments "x" and "y"

[list_begin arguments]
[arg_def float x] First argument for the Beta function

[arg_def float y] Second argument for the Beta function
[list_end]

[para]

























[call [cmd ::math::special::Gamma] [arg x]]

Compute the Gamma function for argument "x"

[list_begin arguments]
[arg_def float x] Argument for the Gamma function
[list_end]











[para]

[call [cmd ::math::special::erf] [arg x]]

Compute the error function for argument "x"

[list_begin arguments]
523
524
525
526
527
528
529
530
531
[para]
Much information about these functions can be found in:
[para]
Abramowitz and Stegun: [emph "Handbook of Mathematical Functions"]
(Dover, ISBN 486-61272-4)

[vset CATEGORY {math :: special}]
[include ../common-text/feedback.inc]
[manpage_end]







|

464
465
466
467
468
469
470
471
472
[para]
Much information about these functions can be found in:
[para]
Abramowitz and Stegun: [emph "Handbook of Mathematical Functions"]
(Dover, ISBN 486-61272-4)

[vset CATEGORY {math :: special}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/special.tcl.

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
#
namespace eval ::math::special {
    #
    # Define a number of common mathematical constants
    #
    ::math::constants::constants pi
    variable halfpi [expr {$pi/2.0}]
    variable tiny 1.0e-30

    #
    # Functions defined in other math submodules
    #
    if { [info commands Beta] == {} } {
       namespace import ::math::Beta
       namespace import ::math::ln_Gamma
    }

    #
    # Export the various functions
    #
    namespace export Beta ln_Gamma Gamma erf erfc fresnel_C fresnel_S sinc invnorm
    namespace export incBeta regIncBeta digamma eulerNumber bernoulliNumber
}

# Gamma --
#    The Gamma function - synonym for "factorial"
#
proc ::math::special::Gamma {x} {
    if { [catch { expr {exp( [ln_Gamma $x] )} } result] } {







<













<







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
#
namespace eval ::math::special {
    #
    # Define a number of common mathematical constants
    #
    ::math::constants::constants pi
    variable halfpi [expr {$pi/2.0}]


    #
    # Functions defined in other math submodules
    #
    if { [info commands Beta] == {} } {
       namespace import ::math::Beta
       namespace import ::math::ln_Gamma
    }

    #
    # Export the various functions
    #
    namespace export Beta ln_Gamma Gamma erf erfc fresnel_C fresnel_S sinc invnorm

}

# Gamma --
#    The Gamma function - synonym for "factorial"
#
proc ::math::special::Gamma {x} {
    if { [catch { expr {exp( [ln_Gamma $x] )} } result] } {
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463

    set q  [expr {sqrt(-2*log(1-$p))}]
    set x  [expr {-((((($c1*$q+$c2)*$q+$c3)*$q+$c4)*$q+$c5)*$q+$c6) /
    (((($d1*$q+$d2)*$q+$d3)*$q+$d4)*$q+1)}]
    return $x
}


# incBeta --
#     Incomplete Beta funtion (not regularized)
#
# Arguments:
#     a, b        Parameters a and b (both > 0)
#     x           Value of the x argument (between 0 and 1)
#
# Notes:
#     Implementation taken from http://codeplea.com/incomplete-beta-function-in-c
#     Accuracy: at least 1.0e-8
#     Test values: https://keisan.casio.com/exec/system/1180573396
#
proc ::math::special::incBeta {a b x} {
    variable tiny

    if { $x < 0.0 || $x > 1.0 } {
        return -code error "Incomplete Beta function: x out of bounds (must be between 0 and 1)"
    }
    if { $a <= 0.0 || $b <= 0.0 } {
        return -code error "Incomplete Beta function: parameter a or b out of bounds (both must be > 0)"
    }

    #
    # Make sure the continued fraction converges fast
    #
    if { $x > ($a+1.0) / ($a+$b+2.0) } {
        set beta1      [Beta $a $b]
        set complement [incBeta $b $a [expr {1.-$x}]]
        return [expr {$beta1 - $complement}]
    }

    set f 1.0
    set c 1.0
    set d 0.0

    for { set i 0 } { $i <= 200 } { incr i } {

        set m [expr {$i/2}]

        #
        # Coefficients of the continued fraction
        #
        if { $i == 0 } {
            set numerator 1.0
        } elseif { $i % 2 == 0 } {
            set numerator [expr {$m * ($b-$m) * $x / ( ($a+2.0*$m-1.0) * ($a+2.0*$m) )}]
        } else {
            set numerator [expr {-($a+$m) * ($a+$b+$m) * $x / ( ($a+2.0*$m) * ($a+2.0*$m+1.0) )}]
        }

        #
        # Iteration (Lentz's algorithm)
        #
        set d [expr {1.0 + $numerator * $d}]
        if { abs($d) < $tiny } {
            set d $tiny
        }

        set d [expr {1.0 / $d}]
        set c [expr {1.0 + $numerator / $c}]

        if { abs($c) < $tiny } {
            set c $tiny
        }

        set cd [expr {$c * $d}]

        set f  [expr {$cd * $f}]

        #
        # Stopping criterium
        #
        if { abs(1.0 - $cd) < 1.0e-8 } {
            set factor [expr {$x ** $a * (1.0-$x) ** $b / $a}]
            return [expr {$factor * ($f - 1.0)}]
        }
    }

    return -code error "Incomplete Beta function: convergence not reached"
}

# regIncBeta --
#     Regularized incomplete Beta funtion
#
# Arguments:
#     a, b        Parameters a and b (both > -1)
#     x           Value of the x argument (between 0 and 1)
#
proc ::math::special::regIncBeta {a b x} {

    set incbeta [incBeta $a $b $x]
    set factor  [Beta $a $b]

    return [expr {$incbeta / $factor}]
}


# digamma --
#     Evaluate the digamma function - approximate via a power series
#
# Arguments
#     x                   Argument of the function
#
# Result:
#     Value of digamma function at x
#
# Notes;
#     Test values: https://keisan.casio.com/exec/system/1180573446
#     Formula taken from: https://math.stackexchange.com/questions/1441753/approximating-the-digamma-function
#
proc ::math::special::digamma {x} {
    if { $x >= 10.0 } {
        set x [expr {$x - 1.0}]
        return [expr {log($x) + 1.0 / (2.0 * $x) - 1.0 / (12.0 * $x**2) + 1.0 / (120.0 * $x**4) - 1.0 / (252.0 * $x**6)
                              + 1.0 / (240.0 * $x**8) - 5.0 / (660.0 * $x**10) + 691.0 / (32760.0 * $x**12) - 1.0 / (12.0 * $x**14)}]
    } else {
        set n [expr {int(11.0 - $x)}]
        set correction 0.0
        for {set i 0} {$i < $n} {incr i} {
            set correction [expr {$correction + 1.0 / ($x + $i)}]
        }

        set newx [expr {$x + $n}]

        return [expr {[digamma $newx] - $correction}]
    }
}

# eulerNumber and bernoulliNumber --
#     Return the nth Euler number or Bernoulli number
#
# Arguments:
#     index           The index of the number to be returned
#
# Note:
#     If the index is outside the range, then an error is raised:
#     For Euler numbers: index should be between 0 and 54
#     For Bernoulli numbers: index should be between 0 and 52
#     - even though for odd indices the numbers are mostly zero
#     and could be returned as such
#
# Note:
#     The tables were found in Nelson H.F. Beebe - The Mathematical Function Computation Handbook
#
proc ::math::special::eulerNumber {index} {
    if { $index < 0 || $index > 54 } {
        return -code error "Index ($index) out of range - should be between 0 and 54"
    } else {
        return [lindex {1 0 -1 0 5 0 -61 0 1385 0 -50521 0 2702765 0 -199360981 0 19391512145 0 -2404879675441 0 370371188237525 0 -69348874393137901 0 15514534163557086905 0 -4087072509293123892361 0 1252259641403629865468285 0 -441543893249023104553682821 0 177519391579539289436664789665 0 -80723299235887898062168247453281 0 41222060339517702122347079671259045 0 -23489580527043108252017828576198947741 0 14851150718114980017877156781405826684425 0 -10364622733519612119397957304745185976310201 0 7947579422597592703608040510088070619519273805 0 -6667537516685544977435028474773748197524107684661 0 6096278645568542158691685742876843153976539044435185 0 -6053285248188621896314383785111649088103498225146815121 0 6506162486684608847715870634080822983483644236765385576565 0 -7546659939008739098061432565889736744212240024711699858645581} $index]
    }
}
proc ::math::special::bernoulliNumber {index} {
    if { $index < 0 || $index > 52 } {
        return -code error "Index ($index) out of range - should be between 0 and 52"
    } else {
        return [lindex {1.0 -0.5 0.16666666666666666 0.0 -0.03333333333333333 0.0 0.023809523809523808 0.0 -0.03333333333333333 0.0 0.07575757575757576 0.0 -0.2531135531135531 0.0 1.1666666666666667 0.0 -7.092156862745098 0.0 54.971177944862156 0.0 -529.1242424242424 0.0 6192.123188405797 0.0 -86580.25311355312 0.0 1425517.1666666667 0.0 -27298231.067816094 0.0 601580873.9006424 0.0 -15116315767.092157 0.0 429614643061.1667 0.0 -13711655205088.334 0.0 488332318973593.2 0.0 -19296579341940068.0 0.0 8.416930475736827e+17 0.0 -4.0338071854059454e+19 0.0 2.1150748638081993e+21 0.0 -1.2086626522296526e+23 0.0 7.500866746076964e+24 0.0 -5.038778101481068e+26} $index]
    }
}

# Bessel functions and elliptic integrals --
#
source [file join [file dirname [info script]] "bessel.tcl"]
source [file join [file dirname [info script]] "classic_polyns.tcl"]
source [file join [file dirname [info script]] "elliptic.tcl"]
source [file join [file dirname [info script]] "exponential.tcl"]

package provide math::special 0.5.0







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







|
287
288
289
290
291
292
293
































































































































































294
295
296
297
298
299
300
301

    set q  [expr {sqrt(-2*log(1-$p))}]
    set x  [expr {-((((($c1*$q+$c2)*$q+$c3)*$q+$c4)*$q+$c5)*$q+$c6) /
    (((($d1*$q+$d2)*$q+$d3)*$q+$d4)*$q+1)}]
    return $x
}

































































































































































# Bessel functions and elliptic integrals --
#
source [file join [file dirname [info script]] "bessel.tcl"]
source [file join [file dirname [info script]] "classic_polyns.tcl"]
source [file join [file dirname [info script]] "elliptic.tcl"]
source [file join [file dirname [info script]] "exponential.tcl"]

package provide math::special 0.3.0

Changes to modules/math/special.test.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5;# statistics,linalg!
testsNeedTcltest 2.1

support {
    useLocal math.tcl        math
    useLocal constants.tcl   math::constants
    useLocal linalg.tcl      math::linearalgebra
    useLocal statistics.tcl  math::statistics







|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4;# statistics,linalg!
testsNeedTcltest 2.1

support {
    useLocal math.tcl        math
    useLocal constants.tcl   math::constants
    useLocal linalg.tcl      math::linearalgebra
    useLocal statistics.tcl  math::statistics
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
            set match 0
            break
        }
    }
    return $match
}

#
# Expect an accuracy of eight decimals (incomplete Beta and digamma)
#
proc matchAccurate {expected actual} {
    set match 1
    foreach a $actual e $expected {
        if {abs($a-$e) > 1.0e-8} {
            set match 0
            break
        }
    }
    return $match
}


customMatch numbers          matchNumbers
customMatch numbers-fresnel  matchFresnel
customMatch numbers-accurate matchAccurate

test "Erf-1.0" "Values of the error function" \
    -match numbers -body {
    set result {}
    foreach x {0.0 0.1 0.2 0.5 1.0 2.0 -0.1 -0.2 -0.5 -1.0 -2.0} {
        lappend result [::math::special::erf $x]
    }







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<







57
58
59
60
61
62
63















64
65

66
67
68
69
70
71
72
            set match 0
            break
        }
    }
    return $match
}
















customMatch numbers         matchNumbers
customMatch numbers-fresnel matchFresnel


test "Erf-1.0" "Values of the error function" \
    -match numbers -body {
    set result {}
    foreach x {0.0 0.1 0.2 0.5 1.0 2.0 -0.1 -0.2 -0.5 -1.0 -2.0} {
        lappend result [::math::special::erf $x]
    }
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
   foreach x {0.0 0.1 0.2 0.5 1.0 1.5 2.0 3.0 4.0 5.0} {
      lappend result [::math::special::fresnel_C $x]
   }
   set result
} -result {0.0  0.09999 0.19992 0.49234 0.77989 0.44526
           0.48825 0.60572 0.49842 0.56363}


test "Fresnel-1.1" "Values of the Fresnel S intergral" \
   -match numbers-fresnel -body {
   set result {}
   foreach x {0.0 0.1 0.2 0.5 1.0 1.5 2.0 3.0 4.0 5.0} {
      lappend result [::math::special::fresnel_S $x]
   }
   set result
} -result {0.0  0.00052 0.00419 0.06473 0.43826 0.69750
           0.34342 0.49631 0.42052 0.49919}


test "invnorm-1.0" "Values of the inverse normal distribution" \
   -match numbers -body {
   set result {}
   foreach p {0.001 0.01 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.99 0.999} {
       lappend result [::math::special::invnorm $p]
   }
   set result
} -result {-3.090232304709404 -2.326347874388028 -1.2815515641401563 -0.8416212327266185 -0.5244005132792953 -0.2533471028599986
           0.0 0.2533471028599986 0.5244005132792952 0.8416212327266186 1.2815515641401563 2.326347874388028 3.090232304709404}


test "sinc-1.0" "Values of the sinc function" \
   -match numbers -body {
   set result [::math::special::sinc 0.0]
} -result 1.0


test "digamma-1.0" "Values of the digamma function"  \
   -match numbers-accurate -body {
   set result {}
   foreach x {-2.5 -1.5 -0.5 0.1 0.25 0.5 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 15.0 20 30.0} {
      lappend result [::math::special::digamma $x]
   }
   set result
} -result {1.103156640645243187226 0.7031566406452431872257 0.03648997397857652055902 -10.42375494041107679517 -4.22745353337626540809 -1.963510026021423479441
           -0.5772156649015328606065 0.4227843351 0.9227843351 1.256117668 1.506117668431800472727 1.706117668431800472727 1.872784335098467139394
           2.015641477955609996536 2.140641477955609996536 2.251752589066721107647 2.351752589066721107647 2.67434666166079370172 2.970523992242149050877
           3.384438132685524876562}


test "incBeta-1.0" "Values of the incomplete Beta function (a,b = 0.5,3)"  \
   -match numbers-accurate -body {
   set result {}
   set a 0.5
   set b 3.0
   foreach x {0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0} {
      lappend result [::math::special::incBeta $a $b $x]
   }
   set result
} -result {0 0.591556741 0.782325650 0.896074104 0.968078601 1.01351972 1.04105792 1.05642273 1.06377207 1.06632003 1.06666667}

test "incBeta-1.1" "Values of the incomplete Beta function (a,b = 2.0,1.3)"  \
   -match numbers-accurate -body {
   set result {}
   set a 2.0
   set b 1.3
   foreach x {0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0} {
      lappend result [::math::special::incBeta $a $b $x]
   }
   set result
} -result {0 0.00489724885 0.0191537005 0.0420524051 0.0727690680 0.110331697 0.153553061 0.200905566 0.250250898 0.298074371 0.334448161}

test "incBeta-2.0" "Values of the regularized incomplete Beta function (a,b = 0.5,3)"  \
   -match numbers-accurate -body {
   set result {}
   set a 0.5
   set b 3.0
   foreach x {0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0} {
      lappend result [::math::special::regIncBeta $a $b $x]
   }
   set result
} -result {0 0.554584445 0.733430297 0.840069473 0.907573688 0.950174737 0.975991803 0.990396306 0.997286318 0.999675025 1}

test "incBeta-2.1" "Values of the regularized incomplete Beta function (a,b = 2.0,1.3)"  \
   -match numbers-accurate -body {
   set result {}
   set a 2.0
   set b 1.3
   foreach x {0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0} {
      lappend result [::math::special::regIncBeta $a $b $x]
   }
   set result
} -result {0 0.0146427741 0.0572695646 0.125736691 0.217579513 0.329891773 0.459123651 0.600707642 0.748250184 0.891242370 1}


#
# Euler and Bernoulli numbers - as they come from tables, merely check that the procedures work
#
test "eulerBernoulli-1.0" "Euler number within range" -body {
   set result {}
   foreach index {0 1 2 3 4} {
      lappend result [::math::special::eulerNumber $index]
   }
   set result
} -result {1 0 -1 0 5}

test "eulerBernoulli-1.1" "Euler number out of range" -body {
   ::math::special::eulerNumber -10
   return {}
} -returnCodes {error} -result {Index (-10) out of range - should be between 0 and 54}

test "eulerBernoulli-2.0" "Bernoulli number within range" -match numbers-accurate -body {
   set result {}
   foreach index {0 1 2 3 4} {
      # Multiply by 30 to get integer values
      lappend result [expr { 30.0 * [::math::special::bernoulliNumber $index] }]
   }
   set result
} -result {30.0 -15.0 5.0 0.0 -1.0}

test "eulerBernoulli-1.0" "Bernoulli number out of range" -body {
   ::math::special::bernoulliNumber -10
} -returnCodes {error} -result {Index (-10) out of range - should be between 0 and 52}

# End of test cases
testsuiteCleanup







<









<











<





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


99
100
101
102
103
104
105

106
107
108
109
110
111
112
113
114

115
116
117
118
119
120
121
122
123
124
125

126
127
128
129
130
























































































131
132
   foreach x {0.0 0.1 0.2 0.5 1.0 1.5 2.0 3.0 4.0 5.0} {
      lappend result [::math::special::fresnel_C $x]
   }
   set result
} -result {0.0  0.09999 0.19992 0.49234 0.77989 0.44526
           0.48825 0.60572 0.49842 0.56363}


test "Fresnel-1.1" "Values of the Fresnel S intergral" \
   -match numbers-fresnel -body {
   set result {}
   foreach x {0.0 0.1 0.2 0.5 1.0 1.5 2.0 3.0 4.0 5.0} {
      lappend result [::math::special::fresnel_S $x]
   }
   set result
} -result {0.0  0.00052 0.00419 0.06473 0.43826 0.69750
           0.34342 0.49631 0.42052 0.49919}


test "invnorm-1.0" "Values of the inverse normal distribution" \
   -match numbers -body {
   set result {}
   foreach p {0.001 0.01 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.99 0.999} {
       lappend result [::math::special::invnorm $p]
   }
   set result
} -result {-3.090232304709404 -2.326347874388028 -1.2815515641401563 -0.8416212327266185 -0.5244005132792953 -0.2533471028599986
           0.0 0.2533471028599986 0.5244005132792952 0.8416212327266186 1.2815515641401563 2.326347874388028 3.090232304709404}


test "sinc-1.0" "Values of the sinc function" \
   -match numbers -body {
   set result [::math::special::sinc 0.0]
} -result 1.0

























































































# End of test cases
testsuiteCleanup

Deleted modules/math/stat_logit.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# stat_logit.tcl --
#     Logistic regression functions - part of the statistics package
#
#     Note:
#     The implementation was derived from the Wikipedia page on logistic regression,
#     (https://en.wikipedia.org/wiki/Logistic_regression) as is the test case.
#
#     TODO:
#     - Deviance to evaluate the goodness of fit
#     - Evaluate the probability
#

package require math::optimize

namespace eval ::math::statistics {
     variable xLogit {}
     variable yLogit {}
}

# logistic-model --
#     Fit 1/0 data to a logistic model
#
# Arguments:
#     xdata        Independent variables (list of lists if there are more than one)
#     ydata        Corresponding scores (0 or 1)
#
# Result:
#     Estimate of the parameters for a logistic model
#
# Note:
#     It is expected that the independent variables have roughly the same scale
#
proc ::math::statistics::logistic-model {xdata ydata} {
    variable xLogit
    variable yLogit

    set xLogit {}
    foreach coords $xdata {
        lappend xLogit [concat 1.0 $coords]
    }
    set yLogit $ydata

    #
    # Use a trivial starting point
    #
    set startx [lrepeat [llength [lindex $xLogit 0]] 0.0]

    set result [::math::optimize::nelderMead LogisticML_NM $startx]

    return [dict get $result x]
}


# LogisticML_NM --
#     Calculate the (log) maximum likelihood for the given logistic model
#     using Nelder-Mead
#
# Arguments:
#     args        Vector of the current regression coefficients
#
# Returns:
#     Log maximum likelihood
#
proc ::math::statistics::LogisticML_NM {args} {
    variable xLogit
    variable yLogit

    set loglike 0.0
    foreach coords $xLogit score $yLogit {
        set sum 0.0

        foreach c $coords v $args {
            set sum [expr {$sum + $v * $c}]
        }
        set exp [expr {exp(-$sum)}]

        if { $score == 1 } {
            set loglike [expr {$loglike - log(1.0 + $exp)}]
        } else {
            set loglike [expr {$loglike - $sum - log(1.0 + $exp)}]
        }
    }
    return [expr {-$loglike}]
}

# logistic-probability --
#     Calculate the probability of a positive score (1) given the model
#
# Arguments:
#     coeffs      Coefficients of the logistic model (for instance outcome of model fit)
#     values      Values of the independent variables
#
# Returns:
#     Probability
#
proc ::math::statistics::logistic-probability {coeffs values} {
    set sum 0.0

    foreach c $coeffs v [concat 1.0 $values] {
        set sum [expr {$sum + $c * $v}]
    }

    return [expr {1.0 / (1.0 + exp(-$sum))}]
}

# test case: from Wikipedia
if {0} {
set xdata {0.50 0.75 1.00 1.25 1.50 1.75 1.75 2.00 2.25 2.50 2.75 3.00 3.25 3.50 4.00 4.25 4.50 4.75 5.00 5.50}
set ydata {0    0    0    0    0    0    1    0    1    0    1    0    1    0    1    1    1    1    1    1   }

set coeffs [::math::statistics::logistic-model $xdata $ydata]

puts "Model fit: $coeffs"

puts "Probabilities:"

foreach x {1 2 3 4 5} {
    puts "$x - [::math::statistics::logistic-probability $coeffs $x]"
}
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































Deleted modules/math/stat_wasserstein.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# stat-wasserstein.tcl --
#     Determine the Wasserstein distance between two probability distributions
#
#     Note:
#     This is an implementation for one-dimensional distributions (or better:
#     non-negative patterns)
#
#     Note 2:
#     The lower bound of 1.0e-10 is probably not at all necessary
#

# LastNonZero --
#     Auxiliary procedure to find the last non-zero entry
#
# Arguments:
#     prob           Probability distribution
#
# Result:
#     Index in the list of the last non-zero entry
#
# Note:
#     To avoid numerical problems any value smaller than 1.0e-10 is considered to
#     be zero
#
proc ::math::statistics::LastNonZero {prob} {
    set maxidx [expr {[llength $prob] - 1}]

    for {set idx $maxidx} {$idx >= 0} {incr idx -1} {
        if { [lindex $prob $idx] > 1.0e-10 } {
            return $idx
        }
    }

    return -1 ;# No non-zero entry
}

# Normalise --
#     Auxiliary procedure to normalise the probability distribution
#
# Arguments:
#     prob           Probability distribution
#
# Result:
#     Normalised distribution (i.e. the entries sum to 1)
#
# Note:
#     To avoid numerical problems any value smaller than 1.0e-10 is set to zero
#
proc ::math::statistics::Normalise {prob} {

    set newprob {}
    set sum     0.0

    foreach p $prob {
        set sum [expr {$sum + $p}]
    }

    if { $sum == 0.0 } {
        return -code error "Probability distribution should not consist of only zeroes"
    }

    foreach p $prob {
        lappend newprob [expr {$p > 1.0e-10? ($p/$sum) : 0.0}]
    }

    return $newprob
}

# wasserstein-distance --
#     Determine the Wasserstein distance using a "greedy" algorithm.
#
# Arguments:
#     prob1          First probability distribution, interpreted as a histogram
#                    with uniform bin width
#     prob2          Second probability distribution
#
# Result:
#     Distance between the two distributions
#
proc ::math::statistics::wasserstein-distance {prob1 prob2} {
    #
    # First step: make sure the histograms have the same length and the
    # same cumulative weight.
    #
    if { [llength $prob1] != [llength $prob2] } {
        return -code error "Lengths of the probability histograms must be the same"
    }

    set prob1 [Normalise $prob1]
    set prob2 [Normalise $prob2]

    set distance 0.0

    #
    # Determine the last non-zero bin - this bin will be shifted to the second
    # distribution
    #
    while {1} {
        set idx1 [LastNonZero $prob1]
        set idx2 [LastNonZero $prob2]

        if { $idx1 < 0 } {
            break ;# We are done
        }

        set bin1 [lindex $prob1 $idx1]
        set bin2 [lindex $prob2 $idx2]

        if { $bin1 <= $bin2 } {
            lset prob1 $idx1 0.0
            lset prob2 $idx2 [expr {$bin2 - $bin1}]
            set distance [expr {$distance + abs($idx2-$idx1) * $bin1}]
        } else {
            lset prob1 $idx1 [expr {$bin1 - $bin2}]
            lset prob2 $idx2 0.0
            set distance [expr {$distance + abs($idx2-$idx1) * $bin2}]
        }
    }

    return $distance
}

# kl-divergence --
#     Calculate the Kullback-Leibler (KL) divergence for two discrete distributions
#
# Arguments:
#     prob1          First probability distribution - the divergence is calculated
#                    with this one as the basis
#     prob2          Second probability distribution - the divergence of this
#                    distribution wrt the first is calculated
#
# Notes:
#     - The KL divergence is an asymmetric measure
#     - It is actually only defined if prob2 is only zero when prob1 is too
#     - The number of elements in the two distributions must be the same and
#       bins must be the same
#
proc ::math::statistics::kl-divergence {prob1 prob2} {
    if { [llength $prob1] != [llength $prob2] } {
        return -code error "Lengths of the two probability histograms must be the same"
    }

    #
    # Normalise the probability histograms
    #
    set prob1 [Normalise $prob1]
    set prob2 [Normalise $prob2]

    #
    # Check for well-definedness while going along
    #
    set sum 0.0
    foreach p1 $prob1 p2 $prob2 {
        if { $p2 == 0.0 && $p1 != 0.0 } {
            return -code error "Second probability histogram contains unmatched zeroes"
        }

        if { $p1 != 0.0 } {
            set sum [expr {$sum - $p1 * log($p2/$p1)}]
        }
    }

    return $sum
}

if {0} {
# tests --
#

# Almost trivial
set prob1 {0.0 0.0 0.0 1.0}
set prob2 {0.0 0.0 1.0 0.0}

puts "Expected distance: 1"
puts "Calculated: [wasserstein-distance $prob1 $prob2]"
puts "Symmetric:  [wasserstein-distance $prob2 $prob1]"

# Less trivial
set prob1 {0.0 0.75 0.25 0.0}
set prob2 {0.0 0.0  1.0  0.0}

puts "Expected distance: 0.75"
puts "Calculated: [wasserstein-distance $prob1 $prob2]"
puts "Symmetric:  [wasserstein-distance $prob2 $prob1]"

# Shift trivial
set prob1 {0.0 0.1 0.2 0.4 0.2 0.1 0.0 0.0}
set prob2 {0.0 0.0 0.0 0.1 0.2 0.4 0.2 0.1}

puts "Expected distance: 2"
puts "Calculated: [wasserstein-distance $prob1 $prob2]"
puts "Symmetric:  [wasserstein-distance $prob2 $prob1]"


# KL-divergence
set prob1 {0.0 0.1 0.2 0.4 0.2 0.1 0.0 0.0}
set prob2 {0.0 0.1 0.2 0.4 0.2 0.1 0.0 0.0}

puts "KL-divergence for equal distributions: 0"
puts "KL-divergence: [kl-divergence $prob1 $prob2]"

set prob1 {0.1e-8 0.1    0.2 0.4 0.2 0.1 0.0 0.0    0.0}
set prob2 {0.1e-8 0.1e-8 0.1 0.2 0.4 0.2 0.1 0.1e-8 0.1e-8}

puts "KL-divergence for shifted distributions: ??"
puts "KL-divergence: [kl-divergence $prob1 $prob2]"

# Hm, the normalisation proc causes a slight problem with elements of 1.0e-10
set prob1 {0.1e-8 0.1  0.2  0.4 0.2  0.1  0.0     0.0}
set prob2 {0.1e-8 0.11 0.19 0.4 0.24 0.06 0.1e-8  0.1e-8}

puts "KL-divergence slightly dififerent distributions: ??"
puts "KL-divergence: [kl-divergence $prob1 $prob2]"
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































Changes to modules/math/statistics.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[vset VERSION 1]
[manpage_begin math::statistics n [vset VERSION]]
[keywords {data analysis}]
[keywords mathematics]
[keywords statistics]
[moddesc {Tcl Math Library}]
[titledesc {Basic statistical functions and procedures}]
[category  Mathematics]
[require Tcl 8.5]
[require math::statistics [vset VERSION]]
[description]
[para]

The [package math::statistics] package contains functions and procedures for
basic statistical data analysis, such as:









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[vset VERSION 1]
[manpage_begin math::statistics n [vset VERSION]]
[keywords {data analysis}]
[keywords mathematics]
[keywords statistics]
[moddesc {Tcl Math Library}]
[titledesc {Basic statistical functions and procedures}]
[category  Mathematics]
[require Tcl 8.4]
[require math::statistics [vset VERSION]]
[description]
[para]

The [package math::statistics] package contains functions and procedures for
basic statistical data analysis, such as:

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330

331
332
333
334
335
336
337
[call [cmd ::math::statistics::test-Dunnett] [arg alpha] [arg control] [arg args]]
Determine if one or more groups with normally distributed data have the same means as
the group of control data, using Dunnett's test. It is complementary to the ANOVA test.
The procedure returns a list of the comparison results for each group with the control group. Each
element of this list contains: whether the means are likely to be different (1) or not (0)
and the confidence interval the conclusion is based on. The groups may also be stored in a
nested list, just as with the ANOVA test.
[para]
Note: some care is required if there is only one group to compare the control with:
[example {
    test-Dunnett-F 0.05 $control [list $A]
}]
Otherwise the group A is split up into groups of one element - this is due to an ambiguity.

[list_begin arguments]
[arg_def float alpha] - Significance level - either 0.05 or 0.01
[arg_def list args] - One or more groups of data to be checked
[list_end]
[para]

[call [cmd ::math::statistics::quantiles] [arg data] [arg confidence]]
Return the quantiles for a given set of data
[list_begin arguments]

[arg_def list data] - List of raw data values
[para]
[arg_def float confidence] - Confidence level (0.95 or 0.99 for instance) or a list of confidence levels.
[para]
[list_end]
[para]








|















>







308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
[call [cmd ::math::statistics::test-Dunnett] [arg alpha] [arg control] [arg args]]
Determine if one or more groups with normally distributed data have the same means as
the group of control data, using Dunnett's test. It is complementary to the ANOVA test.
The procedure returns a list of the comparison results for each group with the control group. Each
element of this list contains: whether the means are likely to be different (1) or not (0)
and the confidence interval the conclusion is based on. The groups may also be stored in a
nested list, just as with the ANOVA test.
[nl]
Note: some care is required if there is only one group to compare the control with:
[example {
    test-Dunnett-F 0.05 $control [list $A]
}]
Otherwise the group A is split up into groups of one element - this is due to an ambiguity.

[list_begin arguments]
[arg_def float alpha] - Significance level - either 0.05 or 0.01
[arg_def list args] - One or more groups of data to be checked
[list_end]
[para]

[call [cmd ::math::statistics::quantiles] [arg data] [arg confidence]]
Return the quantiles for a given set of data
[list_begin arguments]
[para]
[arg_def list data] - List of raw data values
[para]
[arg_def float confidence] - Confidence level (0.95 or 0.99 for instance) or a list of confidence levels.
[para]
[list_end]
[para]

540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
equal.

[list_begin arguments]
[arg_def list args] - Two or more lists of data
[list_end]
[para]

[call [cmd ::math::statistics::test-Levene] [arg groups]]
Compute the Levene statistic to determine if groups of data have the
same variance (are homoscadastic) or not. The data are organised
in groups. This version uses the mean of the data as the measure
to determine the deviations. The statistic is equivalent to an
F statistic with degrees of freedom k-1 and N-k, k being the
number of groups and N the total number of data.

[list_begin arguments]
[arg_def list groups] - List of groups of data
[list_end]
[para]

[call [cmd ::math::statistics::test-Brown-Forsythe] [arg groups]]
Compute the Brown-Forsythe statistic to determine if groups of data have the
same variance (are homoscadastic) or not. Like the Levene test, but this
version uses the median of the data.

[list_begin arguments]
[arg_def list groups] - List of groups of data
[list_end]
[para]

[call [cmd ::math::statistics::group-rank] [arg args]]
Rank the groups of data with respect to the complete set.
Returns a list consisting of the group ID, the value and the rank
(possibly a rational number, in case of ties) for each data item.

[list_begin arguments]
[arg_def list args] - Two or more lists of data
[list_end]
[para]

[call [cmd ::math::statistics::test-Wilcoxon] [arg sample_a] [arg sample_b]]
Compute the Wilcoxon test statistic to determine if two samples have the
same median or not. (The statistic can be regarded as standard normal, if the
sample sizes are both larger than 10.) Returns the value of this statistic.

[list_begin arguments]
[arg_def list sample_a] - List of data comprising the first sample
[arg_def list sample_b] - List of data comprising the second sample
[list_end]
[para]








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













|







541
542
543
544
545
546
547























548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
equal.

[list_begin arguments]
[arg_def list args] - Two or more lists of data
[list_end]
[para]
























[call [cmd ::math::statistics::group-rank] [arg args]]
Rank the groups of data with respect to the complete set.
Returns a list consisting of the group ID, the value and the rank
(possibly a rational number, in case of ties) for each data item.

[list_begin arguments]
[arg_def list args] - Two or more lists of data
[list_end]
[para]

[call [cmd ::math::statistics::test-Wilcoxon] [arg sample_a] [arg sample_b]]
Compute the Wilcoxon test statistic to determine if two samples have the
same median or not. (The statistic can be regarded as standard normal, if the
sample sizes are both larger than 10. Returns the value of this statistic.

[list_begin arguments]
[arg_def list sample_a] - List of data comprising the first sample
[arg_def list sample_b] - List of data comprising the second sample
[list_end]
[para]

605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
z-score, an approximately standard normal statistic, indicating the significance of the correlation.

[list_begin arguments]
[arg_def list sample_a] - First list of data
[arg_def list sample_b] - Second list of data
[list_end]

[call [cmd ::math::statistics::kernel-density] [arg data] opt [arg "-option value"] ...]
Return the density function based on kernel density estimation. The procedure is controlled by
a small set of options, each of which is given a reasonable default.
[para]
The return value consists of three lists: the centres of the bins, the associated probability
density and a list of computational parameters (begin and end of the interval, mean and standard
deviation and the used bandwidth). The computational parameters can be used for further analysis.








|







583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
z-score, an approximately standard normal statistic, indicating the significance of the correlation.

[list_begin arguments]
[arg_def list sample_a] - First list of data
[arg_def list sample_b] - Second list of data
[list_end]

[call [cmd ::math::statistics::kernel-density] [arg data] opt [arg "-option value"] ...]]
Return the density function based on kernel density estimation. The procedure is controlled by
a small set of options, each of which is given a reasonable default.
[para]
The return value consists of three lists: the centres of the bins, the associated probability
density and a list of computational parameters (begin and end of the interval, mean and standard
deviation and the used bandwidth). The computational parameters can be used for further analysis.

627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
[def "[option -interval] [arg "{begin end}"]"]  Begin and end of the interval for
which the density is returned (default: mean +/- 3*standard deviation)
[def "[option -kernel] [arg function]"]  Kernel to be used (One of: gaussian, cosine,
epanechnikov, uniform, triangular, biweight, logistic; default: gaussian)
[list_end]
[list_end]

[call [cmd ::math::statistics::bootstrap] [arg data] [arg sampleSize] [opt numberSamples]]
Create a subsample or subsamples from a given list of data. The data in the samples are chosen
from this list - multiples may occur. If there is only one subsample, the sample itself
is returned (as a list of "sampleSize" values), otherwise a list of samples is returned.

[list_begin arguments]
[arg_def list data]           List of values to chose from
[arg_def int sampleSize]      Number of values per sample
[arg_def int numberSamples]   Number of samples (default: 1)
[list_end]

[call [cmd ::math::statistics::wasserstein-distance] [arg prob1] [arg prob2]]
Compute the Wasserstein distance or earth mover's distance for two equidstantly spaced histograms
or probability densities. The histograms need not to be normalised to sum to one,
but they must have the same number of entries.

[para] Note: the histograms are assumed to be based on the same equidistant intervals.
As the bounds are not passed, the value is expressed in the length of the intervals.

[list_begin arguments]
[arg_def list prob1]          List of values for the first histogram/probability density
[arg_def list prob2]          List of values for the second histogram/probability density
[list_end]

[call [cmd ::math::statistics::kl-divergence] [arg prob1] [arg prob2]]
Compute the Kullback-Leibler (KL) divergence for two equidstantly spaced histograms
or probability densities. The histograms need not to be normalised to sum to one,
but they must have the same number of entries.

[para] Note: the histograms are assumed to be based on the same equidistant intervals.
As the bounds are not passed, the value is expressed in the length of the intervals.

[para] Note also that the KL divergence is not symmetric and that the second histogram
should not contain zeroes in places where the first histogram has non-zero values.

[list_begin arguments]
[arg_def list prob1]          List of values for the first histogram/probability density
[arg_def list prob2]          List of values for the second histogram/probability density
[list_end]

[call [cmd ::math::statistics::logistic-model] [arg xdata] [arg ydata]]
Estimate the coefficients of the logistic model that fits the data best. The data consist
of independent x-values and the outcome 0 or 1 for each of the x-values. The result
can be used to estimate the probability that a certain x-value gives 1.

[list_begin arguments]
[arg_def list xdata]          List of values for which the success (1) or failure (0) is known
[arg_def list ydata]          List of successes or failures corresponding to each value in [term xdata].
[list_end]

[call [cmd ::math::statistics::logistic-probability] [arg coeffs] [arg x]]
Calculate the probability of success for the value [term x] given the coefficients of the
logistic model.

[list_begin arguments]
[arg_def list coeffs]         List of coefficients as determine by the [cmd logistic-model] command
[arg_def float x]             X-value for which the probability needs to be determined
[list_end]

[list_end]

[section "MULTIVARIATE LINEAR REGRESSION"]

Besides the linear regression with a single independent variable, the
statistics package provides two procedures for doing ordinary
least squares (OLS) and weighted least squares (WLS) linear regression







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







605
606
607
608
609
610
611



























































612
613
614
615
616
617
618
[def "[option -interval] [arg "{begin end}"]"]  Begin and end of the interval for
which the density is returned (default: mean +/- 3*standard deviation)
[def "[option -kernel] [arg function]"]  Kernel to be used (One of: gaussian, cosine,
epanechnikov, uniform, triangular, biweight, logistic; default: gaussian)
[list_end]
[list_end]




























































[list_end]

[section "MULTIVARIATE LINEAR REGRESSION"]

Besides the linear regression with a single independent variable, the
statistics package provides two procedures for doing ordinary
least squares (OLS) and weighted least squares (WLS) linear regression
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmin] - Maximum value of the distribution
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::pdf-triangular] [arg xmin] [arg xmax] [arg value]]
Return the probability of a given value for a triangular
distribution with given extremes. If the argument min is lower than the argument max, then smaller
values have higher probability and vice versa. In the first case the probability
density function is of the form [emph {f(x) = 2(1-x)}] and the other case it is of the form [emph {f(x) = 2x}].

[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmin] - Maximum value of the distribution
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::pdf-symmetric-triangular] [arg xmin] [arg xmax] [arg value]]
Return the probability of a given value for a symmetric triangular
distribution with given extremes.

[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmin] - Maximum value of the distribution
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::pdf-gamma] [arg alpha] [arg beta] [arg value]]
Return the probability of a given value for a Gamma
distribution with given shape and rate parameters

[list_begin arguments]
[arg_def float alpha] - Shape parameter
[arg_def float beta] - Rate parameter







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







839
840
841
842
843
844
845
























846
847
848
849
850
851
852
[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmin] - Maximum value of the distribution
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

























[call [cmd ::math::statistics::pdf-gamma] [arg alpha] [arg beta] [arg value]]
Return the probability of a given value for a Gamma
distribution with given shape and rate parameters

[list_begin arguments]
[arg_def float alpha] - Shape parameter
[arg_def float beta] - Rate parameter
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
[list_begin arguments]
[arg_def float location] - Location parameter
[arg_def float scale] - Shape parameter
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::pdf-laplace] [arg location] [arg scale] [arg value]]
Return the probability of a given value for a Laplace
distribution with given location and shape parameters. The Laplace distribution
consists of two exponential functions, is peaked and has heavier tails than the
normal distribution.

[list_begin arguments]
[arg_def float location] - Location parameter (mean)
[arg_def float scale] - Shape parameter
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::pdf-kumaraswamy] [arg a] [arg b] [arg value]]
Return the probability of a given value for a Kumaraswamy
distribution with given parameters a and b. The Kumaraswamy distribution
is related to the Beta distribution, but has a tractable cumulative distribution function.

[list_begin arguments]
[arg_def float a] - Parameter a
[arg_def float b] - Parameter b
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::pdf-negative-binomial] [arg r] [arg p] [arg value]]
Return the probability of a given value for a negative binomial
distribution with an allowed number of failures and the probability of success.

[list_begin arguments]
[arg_def int r] - Allowed number of failures (at least 1)
[arg_def float p] - Probability of success
[arg_def int value] - Number of successes for which the probability is to be returned
[list_end]
[para]

[call [cmd ::math::statistics::cdf-normal] [arg mean] [arg stdev] [arg value]]
Return the cumulative probability of a given value for a normal
distribution with given mean and standard deviation, that is the
probability for values up to the given one.

[list_begin arguments]
[arg_def float mean] - Mean value of the distribution







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







947
948
949
950
951
952
953




































954
955
956
957
958
959
960
[list_begin arguments]
[arg_def float location] - Location parameter
[arg_def float scale] - Shape parameter
[arg_def float value] - Value for which the probability is required
[list_end]
[para]





































[call [cmd ::math::statistics::cdf-normal] [arg mean] [arg stdev] [arg value]]
Return the cumulative probability of a given value for a normal
distribution with given mean and standard deviation, that is the
probability for values up to the given one.

[list_begin arguments]
[arg_def float mean] - Mean value of the distribution
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
[list_end]
[para]

[call [cmd ::math::statistics::cdf-uniform] [arg xmin] [arg xmax] [arg value]]
Return the cumulative probability of a given value for a uniform
distribution with given extremes.

[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmin] - Maximum value of the distribution
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::cdf-triangular] [arg xmin] [arg xmax] [arg value]]
Return the cumulative probability of a given value for a triangular
distribution with given extremes. If xmin < xmax, then lower values have
a higher probability and vice versa, see also [emph pdf-triangular]

[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmin] - Maximum value of the distribution
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::cdf-symmetric-triangular] [arg xmin] [arg xmax] [arg value]]
Return the cumulative probability of a given value for a symmetric triangular
distribution with given extremes.

[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmin] - Maximum value of the distribution
[arg_def float value] - Value for which the probability is required
[list_end]
[para]








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







985
986
987
988
989
990
991























992
993
994
995
996
997
998
[list_end]
[para]

[call [cmd ::math::statistics::cdf-uniform] [arg xmin] [arg xmax] [arg value]]
Return the cumulative probability of a given value for a uniform
distribution with given extremes.
























[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmin] - Maximum value of the distribution
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
[list_begin arguments]
[arg_def float nf1] - Degrees of freedom for the numerator
[arg_def float nf2] - Degrees of freedom for the denominator
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::cdf-laplace] [arg location] [arg scale] [arg value]]
Return the cumulative probability of a given value for a Laplace
distribution with given location and shape parameters. The Laplace distribution
consists of two exponential functions, is peaked and has heavier tails than the
normal distribution.

[list_begin arguments]
[arg_def float location] - Location parameter (mean)
[arg_def float scale] - Shape parameter
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::cdf-kumaraswamy] [arg a] [arg b] [arg value]]
Return the cumulative probability of a given value for a Kumaraswamy
distribution with given parameters a and b. The Kumaraswamy distribution
is related to the Beta distribution, but has a tractable cumulative distribution function.

[list_begin arguments]
[arg_def float a] - Parameter a
[arg_def float b] - Parameter b
[arg_def float value] - Value for which the probability is required
[list_end]
[para]

[call [cmd ::math::statistics::cdf-negative-binomial] [arg r] [arg p] [arg value]]
Return the cumulative probability of a given value for a negative binomial
distribution with an allowed number of failures and the probability of success.

[list_begin arguments]
[arg_def int r] - Allowed number of failures (at least 1)
[arg_def float p] - Probability of success
[arg_def int value] - Greatest number of successes
[list_end]
[para]

[call [cmd ::math::statistics::empirical-distribution] [arg values]]
Return a list of values and their empirical probability. The values are sorted in increasing order.
(The implementation follows the description at the corresponding Wikipedia page)

[list_begin arguments]
[arg_def list values] - List of data to be examined
[list_end]







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1088
1089
1090
1091
1092
1093
1094




































1095
1096
1097
1098
1099
1100
1101
[list_begin arguments]
[arg_def float nf1] - Degrees of freedom for the numerator
[arg_def float nf2] - Degrees of freedom for the denominator
[arg_def float value] - Value for which the probability is required
[list_end]
[para]





































[call [cmd ::math::statistics::empirical-distribution] [arg values]]
Return a list of values and their empirical probability. The values are sorted in increasing order.
(The implementation follows the description at the corresponding Wikipedia page)

[list_begin arguments]
[arg_def list values] - List of data to be examined
[list_end]
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
[list_end]
[para]

[call [cmd ::math::statistics::random-uniform] [arg xmin] [arg xmax] [arg number]]
Return a list of "number" random values satisfying a uniform
distribution with given extremes.

[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmax] - Maximum value of the distribution
[arg_def int number] - Number of values to be returned
[list_end]
[para]

[call [cmd ::math::statistics::random-triangular] [arg xmin] [arg xmax] [arg number]]
Return a list of "number" random values satisfying a triangular
distribution with given extremes. If xmin < xmax, then lower values have a higher probability
and vice versa (see also [emph pdf-triangular].

[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmax] - Maximum value of the distribution
[arg_def int number] - Number of values to be returned
[list_end]
[para]

[call [cmd ::math::statistics::random-symmetric-triangular] [arg xmin] [arg xmax] [arg number]]
Return a list of "number" random values satisfying a symmetric triangular
distribution with given extremes.

[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmax] - Maximum value of the distribution
[arg_def int number] - Number of values to be returned
[list_end]
[para]








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1130
1131
1132
1133
1134
1135
1136























1137
1138
1139
1140
1141
1142
1143
[list_end]
[para]

[call [cmd ::math::statistics::random-uniform] [arg xmin] [arg xmax] [arg number]]
Return a list of "number" random values satisfying a uniform
distribution with given extremes.
























[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmax] - Maximum value of the distribution
[arg_def int number] - Number of values to be returned
[list_end]
[para]

1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
[list_begin arguments]
[arg_def float location] - Location parameter
[arg_def float scale] - Scale parameter
[arg_def int number] - Number of values to be returned
[list_end]
[para]

[call [cmd ::math::statistics::random-laplace] [arg location] [arg scale] [arg number]]
Return a list of "number" random values satisfying a Laplace
distribution with given location and shape parameters. The Laplace distribution
consists of two exponential functions, is peaked and has heavier tails than the
normal distribution.

[list_begin arguments]
[arg_def float location] - Location parameter (mean)
[arg_def float scale] - Shape parameter
[arg_def int number] - Number of values to be returned
[list_end]
[para]

[call [cmd ::math::statistics::random-kumaraswamy] [arg a] [arg b] [arg number]]
Return a list of "number" random values satisying a Kumaraswamy
distribution with given parameters a and b. The Kumaraswamy distribution
is related to the Beta distribution, but has a tractable cumulative distribution function.

[list_begin arguments]
[arg_def float a] - Parameter a
[arg_def float b] - Parameter b
[arg_def int number] - Number of values to be returned
[list_end]
[para]

[call [cmd ::math::statistics::random-negative-binomial] [arg r] [arg p] [arg number]]
Return a list of "number" random values satisying a negative binomial distribution.

[list_begin arguments]
[arg_def int r] - Allowed number of failures (at least 1)
[arg_def float p] - Probability of success
[arg_def int number] - Number of values to be returned
[list_end]
[para]

[call [cmd ::math::statistics::histogram-uniform] [arg xmin] [arg xmax] [arg limits] [arg number]]
Return the expected histogram for a uniform distribution.

[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmax] - Maximum value of the distribution
[arg_def list limits] - Upper limits for the buckets in the histogram







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1233
1234
1235
1236
1237
1238
1239



































1240
1241
1242
1243
1244
1245
1246
[list_begin arguments]
[arg_def float location] - Location parameter
[arg_def float scale] - Scale parameter
[arg_def int number] - Number of values to be returned
[list_end]
[para]




































[call [cmd ::math::statistics::histogram-uniform] [arg xmin] [arg xmax] [arg limits] [arg number]]
Return the expected histogram for a uniform distribution.

[list_begin arguments]
[arg_def float xmin] - Minimum value of the distribution
[arg_def float xmax] - Maximum value of the distribution
[arg_def list limits] - Upper limits for the buckets in the histogram
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
Returns the estimated scale and shape parameters, as well as the standard error for the shape parameter.

[list_begin arguments]
[arg_def list values] - List of values, assumed to be distributed according to a Pareto distribution
[list_end]
[para]

[call [cmd ::math::statistics::estimate-exponential] [arg values]]
Estimate the parameter for the exponential distribution that comes closest to the given values.
Returns an estimate of the one parameter and of the standard error.

[list_begin arguments]
[arg_def list values] - List of values, assumed to be distributed according to an exponential distribution
[list_end]
[para]

[call [cmd ::math::statistics::estimate-laplace] [arg values]]
Estimate the parameters for the Laplace distribution that comes closest to the given values.
Returns an estimate of respectively the location and scale parameters, based on maximum likelihood.

[list_begin arguments]
[arg_def list values] - List of values, assumed to be distributed according to an exponential distribution
[list_end]
[para]

[call [cmd ::math::statistics::estimante-negative-binomial] [arg r] [arg values]]
Estimate the probability of success for the negative binomial distribution that comes closest to the given values.
The allowed number of failures must be given.

[list_begin arguments]
[arg_def int r] - Allowed number of failures (at least 1)
[arg_def int number] - List of values, assumed to be distributed according to a negative binomial distribution.
[list_end]
[para]

[list_end]
TO DO: more function descriptions to be added

[section "DATA MANIPULATION"]
The data manipulation procedures act on lists or lists of lists:

[list_begin definitions]







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1280
1281
1282
1283
1284
1285
1286




























1287
1288
1289
1290
1291
1292
1293
Returns the estimated scale and shape parameters, as well as the standard error for the shape parameter.

[list_begin arguments]
[arg_def list values] - List of values, assumed to be distributed according to a Pareto distribution
[list_end]
[para]





























[list_end]
TO DO: more function descriptions to be added

[section "DATA MANIPULATION"]
The data manipulation procedures act on lists or lists of lists:

[list_begin definitions]
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
::math::statistics::plot-scale .plot1  0 100  0 20
::math::statistics::plot-scale .plot2  0 20   0 20
::math::statistics::plot-tline .plot1 $data1
::math::statistics::plot-tline .plot1 $data2
::math::statistics::plot-xydata .plot2 $data1 $data2

puts "Correlation coefficient:"
puts [lb]::math::statistics::corr $data1 $data2[rb]

pause 2
puts "Plot histograms"
.plot2 delete all
::math::statistics::plot-scale .plot2  0 20 0 100
set limits         [lb]::math::statistics::minmax-histogram-limits 7 16[rb]
set histogram_data [lb]::math::statistics::histogram $limits $data1[rb]







|







1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
::math::statistics::plot-scale .plot1  0 100  0 20
::math::statistics::plot-scale .plot2  0 20   0 20
::math::statistics::plot-tline .plot1 $data1
::math::statistics::plot-tline .plot1 $data2
::math::statistics::plot-xydata .plot2 $data1 $data2

puts "Correlation coefficient:"
puts [lb]::math::statistics::corr $data1 $data2]

pause 2
puts "Plot histograms"
.plot2 delete all
::math::statistics::plot-scale .plot2  0 20 0 100
set limits         [lb]::math::statistics::minmax-histogram-limits 7 16[rb]
set histogram_data [lb]::math::statistics::histogram $limits $data1[rb]
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
.plot2 itemconfigure d2 -fill red

puts "Second series:"
print-histogram $histogram_data $limits

puts "Autocorrelation function:"
set  autoc [lb]::math::statistics::autocorr $data1[rb]
puts [lb]::math::statistics::map $autoc {[lb]format "%.2f" $x[rb]}[rb]
puts "Cross-correlation function:"
set  crossc [lb]::math::statistics::crosscorr $data1 $data2[rb]
puts [lb]::math::statistics::map $crossc {[lb]format "%.2f" $x[rb]}[rb]

::math::statistics::plot-scale .plot1  0 100 -1  4
::math::statistics::plot-tline .plot1  $autoc "autoc"
::math::statistics::plot-tline .plot1  $crossc "crossc"







|







1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
.plot2 itemconfigure d2 -fill red

puts "Second series:"
print-histogram $histogram_data $limits

puts "Autocorrelation function:"
set  autoc [lb]::math::statistics::autocorr $data1[rb]
puts [lb]::math::statistics::map $autoc {[lb]format "%.2f" $x]}[rb]
puts "Cross-correlation function:"
set  crossc [lb]::math::statistics::crosscorr $data1 $data2[rb]
puts [lb]::math::statistics::map $crossc {[lb]format "%.2f" $x[rb]}[rb]

::math::statistics::plot-scale .plot1  0 100 -1  4
::math::statistics::plot-tline .plot1  $autoc "autoc"
::math::statistics::plot-tline .plot1  $crossc "crossc"
1859
1860
1861
1862
1863
1864
1865
1866
1867
Both time series show a significant periodic component
[item]
The histograms are not very useful in identifying the nature of the time
series - they do not show the periodic nature.
[list_end]

[vset CATEGORY {math :: statistics}]
[include ../common-text/feedback.inc]
[manpage_end]







|

1573
1574
1575
1576
1577
1578
1579
1580
1581
Both time series show a significant periodic component
[item]
The histograms are not very useful in identifying the nature of the time
series - they do not show the periodic nature.
[list_end]

[vset CATEGORY {math :: statistics}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/math/statistics.tcl.

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# version 0.7:   added Kruskal-Wallis test (by Torsten Berg)
# version 0.8:   added Wilcoxon test and Spearman rank correlation
# version 0.9:   added kernel density estimation
# version 0.9.3: added histogram-alt, corrected test-normal
# version 1.0:   added test-anova-F
# version 1.0.1: correction in pdf-lognormal and cdf-lognormal
# version 1.1:   added test-Tukey-range and test-Dunnett
# version 1.3:   added wasserstein-distance, kl-divergence and logit regression

package require Tcl 8.5 ; # 8.5+ feature in test-anova-F and others: **-operator
package provide math::statistics 1.5.0
package require math

if {![llength [info commands ::lrepeat]]} {
    # Forward portability, emulate lrepeat
    proc ::lrepeat {n args} {
	if {$n < 1} {
	    return -code error "must have a count of at least 1"







<

|
|







17
18
19
20
21
22
23

24
25
26
27
28
29
30
31
32
33
# version 0.7:   added Kruskal-Wallis test (by Torsten Berg)
# version 0.8:   added Wilcoxon test and Spearman rank correlation
# version 0.9:   added kernel density estimation
# version 0.9.3: added histogram-alt, corrected test-normal
# version 1.0:   added test-anova-F
# version 1.0.1: correction in pdf-lognormal and cdf-lognormal
# version 1.1:   added test-Tukey-range and test-Dunnett


package require Tcl 8.4
package provide math::statistics 1.1.0
package require math

if {![llength [info commands ::lrepeat]]} {
    # Forward portability, emulate lrepeat
    proc ::lrepeat {n args} {
	if {$n < 1} {
	    return -code error "must have a count of at least 1"
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
	    test-Duckworth test-anova-F test-Tukey-range test-Dunnett
    #
    # Error messages
    #
    variable NEGSTDEV   {Zero or negative standard deviation}
    variable TOOFEWDATA {Too few or invalid data}
    variable OUTOFRANGE {Argument out of range}
    variable INVALID    {Argument invalid}

    #
    # Coefficients involved
    #
    variable factorNormalPdf
    set factorNormalPdf [expr {sqrt(8.0*atan(1.0))}]








<







60
61
62
63
64
65
66

67
68
69
70
71
72
73
	    test-Duckworth test-anova-F test-Tukey-range test-Dunnett
    #
    # Error messages
    #
    variable NEGSTDEV   {Zero or negative standard deviation}
    variable TOOFEWDATA {Too few or invalid data}
    variable OUTOFRANGE {Argument out of range}


    #
    # Coefficients involved
    #
    variable factorNormalPdf
    set factorNormalPdf [expr {sqrt(8.0*atan(1.0))}]

1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
source [file join [file dirname [info script]] pdf_stat.tcl]
source [file join [file dirname [info script]] plotstat.tcl]
source [file join [file dirname [info script]] liststat.tcl]
source [file join [file dirname [info script]] mvlinreg.tcl]
source [file join [file dirname [info script]] kruskal.tcl]
source [file join [file dirname [info script]] wilcoxon.tcl]
source [file join [file dirname [info script]] stat_kernel.tcl]
source [file join [file dirname [info script]] stat_wasserstein.tcl]
source [file join [file dirname [info script]] stat_logit.tcl]

#
# Define the tables
#
namespace eval ::math::statistics {
    variable tukey_table_05
    variable tukey_table_01







<
<







1790
1791
1792
1793
1794
1795
1796


1797
1798
1799
1800
1801
1802
1803
source [file join [file dirname [info script]] pdf_stat.tcl]
source [file join [file dirname [info script]] plotstat.tcl]
source [file join [file dirname [info script]] liststat.tcl]
source [file join [file dirname [info script]] mvlinreg.tcl]
source [file join [file dirname [info script]] kruskal.tcl]
source [file join [file dirname [info script]] wilcoxon.tcl]
source [file join [file dirname [info script]] stat_kernel.tcl]



#
# Define the tables
#
namespace eval ::math::statistics {
    variable tukey_table_05
    variable tukey_table_01

Changes to modules/math/statistics.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5;# statistics,linalg!
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
    useLocal linalg.tcl math::linearalgebra
    useLocal optimize.tcl math::optimize
}
testing {
    useLocal statistics.tcl math::statistics
}

# -------------------------------------------------------------------------








|





<







8
9
10
11
12
13
14
15
16
17
18
19
20

21
22
23
24
25
26
27

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4;# statistics,linalg!
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
    useLocal linalg.tcl math::linearalgebra

}
testing {
    useLocal statistics.tcl math::statistics
}

# -------------------------------------------------------------------------

510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
} -result {0.887239767929 0.830859651893
3.33854942057 -1.58346976987 0.0362328113288 32.571621244
1.03305463908 0.237943867401 0.234143883673 19.4700016828
0.810755783819 5.86634305732
-2.16569743834 -1.00124210139 -0.536696631937 0.609162254594
-15.0697565684 80.2129990564}


test "Testmultivar-1.1" "Ordinary multivariate regression - zero variation" -body {
    set results [::math::statistics::mv-ols {{0 25125 128} {0 23224 64} {0 37903 512} {0 21263 32}
                                             {0 22053 64} {0 25745 256} {0 25745 256} {0 21557 32}
                                             {0 24935 128} {0 22904 64} {0 21422 32} {0 21947 32}
                                             {0 33244 512} {0 33244 512} {0 30060 512} {0 29691 256}
                                             {0 30439 256} {0 23724 128} {0 22541 64} {0 23640 128}
                                             {0 21422 32} {0 23640 128} {0 22249 64} {0 28247 512}
                                             {0 23333 32} {0 29841 256} {0 23959 128} {0 30819 512}
                                             {0 26333 256} {0 22145 32} {0 23863 128} {0 20772 32}
                                             {0 28511 512} {0 22425 64} {0 21598 32} {0 26335 256}
                                             {0 23816 128} {0 21157 32} {0 20973 32} {0 20973 32}
                                             {0 35125 512} {0 20679 32} {0 21241 64} {0 25297 256}
                                             {0 22301 32} {0 22007 32} {0 33351 512} {0 24115 128}
                                             {0 24115 128} {0 22301 32} {0 22797 64} {0 22593 64}
                                             {0 26439 256} {0 21255 32} {0 22645 32} {0 23447 128}
                                             {0 24205 64} {0 25051 128} {0 21007 32} {0 28237 256}
                                             {0 25546 128} {0 25669 256} {0 25669 256} {0 25669 256}
                                             {0 21977 64} {0 21977 64} {0 26187 128} {0 38360 512}
                                             {0 31846 256} {0 28349 256} {0 26450 128}}]
    set r2 [lindex $results 0]
} -result 1.0

#
# pdf/cdf tests - transformed from the contributions by Eric K. Benedict
#                 Cf. the examples.
#
# Note: cases with integer numbers test if divisions are done in floating-point or not
#








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







509
510
511
512
513
514
515























516
517
518
519
520
521
522
} -result {0.887239767929 0.830859651893
3.33854942057 -1.58346976987 0.0362328113288 32.571621244
1.03305463908 0.237943867401 0.234143883673 19.4700016828
0.810755783819 5.86634305732
-2.16569743834 -1.00124210139 -0.536696631937 0.609162254594
-15.0697565684 80.2129990564}
























#
# pdf/cdf tests - transformed from the contributions by Eric K. Benedict
#                 Cf. the examples.
#
# Note: cases with integer numbers test if divisions are done in floating-point or not
#

556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
    set x [list \
        [::math::statistics::cdf-uniform   0   10  5] \
        [::math::statistics::cdf-uniform   0.0 1.0 0.5] \
        [::math::statistics::cdf-uniform -10.0 1.0 -4.5] \
        [::math::statistics::cdf-uniform  -2.0 2.0  1.0]]
} -result {0.5 0.5 0.5 0.75}

test "triangular-distribution-1.0" "Test pdf-triangular" -match tolerant -body {
    set x [list \
        [::math::statistics::pdf-triangular   0   1.0 0.5]  \
        [::math::statistics::pdf-triangular   1.0 0.0 0.5]  \
        [::math::statistics::pdf-triangular   0.0 1.0 0.25] \
        [::math::statistics::pdf-triangular   1.0 0.0 0.25] \
        [::math::statistics::pdf-triangular   0.0 2.0 0.0]  \
        [::math::statistics::pdf-triangular   0.0 2.0 1.0]  \
        [::math::statistics::pdf-triangular   0.0 2.0 2.0]]
} -result {1.0 1.0 1.5 0.5 2.0 1.0 0.0}
test "triangular-distribution-1.1" "Test cdf-triangular" -match tolerant -body {
    set x [list \
        [::math::statistics::cdf-triangular   0   1.0  0.5] \
        [::math::statistics::cdf-triangular   1.0 0.0  0.5] \
        [::math::statistics::cdf-triangular   0.0 1.0  0.25] \
        [::math::statistics::cdf-triangular   1.0 0.0  0.25] \
        [::math::statistics::cdf-triangular   0.0 2.0  0.0] \
        [::math::statistics::cdf-triangular   0.0 2.0  1.0] \
        [::math::statistics::cdf-triangular   0.0 2.0  2.0]]
} -result {0.75 0.25 0.4375 0.0625 0.0 0.75 1.0}

test "triangular-symmetric-distribution-1.0" "Test pdf-symmetric-triangular" -match tolerant -body {
    set x [list \
        [::math::statistics::pdf-symmetric-triangular 0.0 2.0 -0.5]  \
        [::math::statistics::pdf-symmetric-triangular 0.0 2.0  0.0]  \
        [::math::statistics::pdf-symmetric-triangular 0.0 2.0  0.5]  \
        [::math::statistics::pdf-symmetric-triangular 0.0 2.0  1.0]  \
        [::math::statistics::pdf-symmetric-triangular 0.0 2.0  1.5]  \
        [::math::statistics::pdf-symmetric-triangular 0.0 2.0  2.0]  \
        [::math::statistics::pdf-symmetric-triangular 0.0 2.0  2.5]]
} -result {0.0 0.0 0.5 1.0 0.5 0.0 0.0}

test "triangular-symmetric-distribution-1.1" "Test cdf-symmetric-triangular" -match tolerant -body {
    set x [list \
        [::math::statistics::cdf-symmetric-triangular 0.0 2.0 -0.5]  \
        [::math::statistics::cdf-symmetric-triangular 0.0 2.0  0.0]  \
        [::math::statistics::cdf-symmetric-triangular 0.0 2.0  0.5]  \
        [::math::statistics::cdf-symmetric-triangular 0.0 2.0  1.0]  \
        [::math::statistics::cdf-symmetric-triangular 0.0 2.0  1.5]  \
        [::math::statistics::cdf-symmetric-triangular 0.0 2.0  2.0]  \
        [::math::statistics::cdf-symmetric-triangular 0.0 2.0  2.5]]
} -result {0.0 0.0 0.125 0.5 0.875 1.0 1.0}

test "exponential-distribution-1.0" "Test pdf-exponential" -match tolerant -body {
    set x [list \
        [::math::statistics::pdf-exponential 2   1] \
        [::math::statistics::pdf-exponential 1.0 1.0] \
        [::math::statistics::pdf-exponential 2.0 2.0] \
        [::math::statistics::pdf-exponential 2.0 1.0]]
} -result {0.3032653298563167 0.36787944117144233 0.18393972058572117 0.3032653298563167}

test "exponential-distribution-1.1" "Test cdf-exponential" -match tolerant -body {
    set x [list \
        [::math::statistics::cdf-exponential 2   1] \
        [::math::statistics::cdf-exponential 1.0 1.0] \
        [::math::statistics::cdf-exponential 2.0 2.0] \
        [::math::statistics::cdf-exponential 2.0 1.0]]
} -result {0.3934693402873666 0.6321205588285577 0.6321205588285577 0.3934693402873666}

test "laplace-distribution-1.0" "Test pdf-laplace" -match tolerant -body {
    set x [list \
        [::math::statistics::pdf-laplace  1   1   1] \
        [::math::statistics::pdf-laplace  1.0 1.0 2] \
        [::math::statistics::pdf-laplace -1.0 2.0 0] \
        [::math::statistics::pdf-laplace  1.5 2.5 3]]
} -result {0.5 0.18393972058572117 0.15163266492815836 0.1097623272188053}

test "laplace-distribution-1.1" "Test cdf-laplace" -match tolerant -body {
    set x [list \
        [::math::statistics::cdf-laplace  1   1   1] \
        [::math::statistics::cdf-laplace  1.0 1.0 2] \
        [::math::statistics::cdf-laplace -1.0 2.0 0] \
        [::math::statistics::cdf-laplace  1.5 2.5 3]]
} -result {0.5 0.8160602794142788 0.6967346701436833 0.7255941819529867}

test "kumaraswamy-distribution-1.0" "Test pdf-kumaraswamy" -match tolerant -body {
    set x [list \
        [::math::statistics::pdf-kumaraswamy  1   1   0.5] \
        [::math::statistics::pdf-kumaraswamy  0.5 0.5 0.5] \
        [::math::statistics::pdf-kumaraswamy  1.0 2.0 0] \
        [::math::statistics::pdf-kumaraswamy  1.0 2.0 0.5]]
} -result {1.0 0.6532814824381884 2.0 1.0}

test "kumaraswamy-distribution-1.1" "Test cdf-kumaraswamy" -match tolerant -body {
    set x [list \
        [::math::statistics::cdf-kumaraswamy  1   1   0.5] \
        [::math::statistics::cdf-kumaraswamy  0.5 0.5 0.5] \
        [::math::statistics::cdf-kumaraswamy  1.0 2.0 0] \
        [::math::statistics::cdf-kumaraswamy  1.0 2.0 0.5]]
} -result {0.5 0.4588038998538031 0.0 0.75}

# Non-trivial examples from Wikipedia
test "negative-binomial-distribution-1.0" "Test pdf-negative-binomial" -match tolerant -body {
    set x [list \
        [::math::statistics::pdf-negative-binomial 1 0.3 0] \
        [::math::statistics::pdf-negative-binomial 1 0.9 0] \
        [::math::statistics::pdf-negative-binomial 5 0.4 0] \
        [::math::statistics::pdf-negative-binomial 5 0.4 1] \
        [::math::statistics::pdf-negative-binomial 5 0.4 2] \
        [::math::statistics::pdf-negative-binomial 5 0.4 3] \
        [::math::statistics::pdf-negative-binomial 5 0.4 5]]
} -result {0.7 0.1 0.07776 0.15552 0.186624 0.1741824 0.10032906}

test "negative-binomial-distribution-1.1" "Test cdf-negative-binomial" -match tolerant -body {
    set x [list \
        [::math::statistics::cdf-negative-binomial 5 0.4 3] \
        [::math::statistics::cdf-negative-binomial 1 0.9 0] \
        [::math::statistics::cdf-negative-binomial 1 0.9 1] \
        [::math::statistics::cdf-negative-binomial 1 0.9 2]]
} -result {0.59408 0.1 0.19 0.271}

test "normal-distribution-1.0" "Test pdf-normal" -match tolerant -body {
    set x [list \
        [::math::statistics::pdf-normal  0   1   1] \
        [::math::statistics::pdf-normal  0.0 1.0 1.0] \
        [::math::statistics::pdf-normal  2.0 2.0 4.0] \
        [::math::statistics::pdf-normal -2.0 2.0 0.0] \
        [::math::statistics::pdf-normal  2.0 2.0 3.0]]







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







532
533
534
535
536
537
538











































539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554




















































555
556
557
558
559
560
561
    set x [list \
        [::math::statistics::cdf-uniform   0   10  5] \
        [::math::statistics::cdf-uniform   0.0 1.0 0.5] \
        [::math::statistics::cdf-uniform -10.0 1.0 -4.5] \
        [::math::statistics::cdf-uniform  -2.0 2.0  1.0]]
} -result {0.5 0.5 0.5 0.75}












































test "exponential-distribution-1.0" "Test pdf-exponential" -match tolerant -body {
    set x [list \
        [::math::statistics::pdf-exponential 2   1] \
        [::math::statistics::pdf-exponential 1.0 1.0] \
        [::math::statistics::pdf-exponential 2.0 2.0] \
        [::math::statistics::pdf-exponential 2.0 1.0]]
} -result {0.3032653298563167 0.36787944117144233 0.18393972058572117 0.3032653298563167}

test "exponential-distribution-1.1" "Test cdf-exponential" -match tolerant -body {
    set x [list \
        [::math::statistics::cdf-exponential 2   1] \
        [::math::statistics::cdf-exponential 1.0 1.0] \
        [::math::statistics::cdf-exponential 2.0 2.0] \
        [::math::statistics::cdf-exponential 2.0 1.0]]
} -result {0.3934693402873666 0.6321205588285577 0.6321205588285577 0.3934693402873666}





















































test "normal-distribution-1.0" "Test pdf-normal" -match tolerant -body {
    set x [list \
        [::math::statistics::pdf-normal  0   1   1] \
        [::math::statistics::pdf-normal  0.0 1.0 1.0] \
        [::math::statistics::pdf-normal  2.0 2.0 4.0] \
        [::math::statistics::pdf-normal -2.0 2.0 0.0] \
        [::math::statistics::pdf-normal  2.0 2.0 3.0]]
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
} -result 100

test "random-numbers-1.11" "Test random-cauchy" -body {
    set rnumbers [::math::statistics::random-cauchy 0 1 100]
    set result [llength $rnumbers]
} -result 100

test "random-numbers-1.12" "Test random-triangular" -body {
    set result 1
    set rnumbers [::math::statistics::random-triangular -10 10 100]
    # Check the scaling
    foreach r $rnumbers {
        if { $r < -10.0 || $r > 10.0 } {
            set result 0
            break
        }
    }

    # Also the alternative triangle
    set rnumbers [::math::statistics::random-triangular 10 -10 100]
    # Check the scaling
    foreach r $rnumbers {
        if { $r < -10.0 || $r > 10.0 } {
            set result 0
            break
        }
    }

    # The symmetric triangle
    set rnumbers [::math::statistics::random-symmetric-triangular 10 -10 100]
    # Check the scaling
    foreach r $rnumbers {
        if { $r < -10.0 || $r > 10.0 } {
            set result 0
            break
        }
    }

    set result
} -result 1

test "random-numbers-2.1" "Test random/estimate-pareto" -match tolerant -body {
    expr {srand($::rseed)}
    set rnumbers [::math::statistics::random-pareto 1.0 3.0 100]
    set result   [::math::statistics::estimate-pareto $rnumbers]
} -result {1.000519 3.668162 0.3668162}

test "random-numbers-2.2" "Test random/estimate-exponential" -match tolerant -body {
    expr {srand($::rseed)}
    set rnumbers [::math::statistics::random-exponential 2.0 1000]
    set result   [::math::statistics::estimate-exponential $rnumbers]
} -result {1.9976327295438587 0.06317069353857727}

test "random-numbers-2.3" "Test random/estimate-laplace" -match tolerant -body {
    expr {srand($::rseed)}
    set rnumbers [::math::statistics::random-laplace 1.0 1.0 1000]
    set result   [::math::statistics::estimate-laplace $rnumbers]
} -result {1.0106101707362272 0.9319576942526239}

# Very simple test - just check that the numbers lie between 0 and 1
test "random-numbers-2.4" "Test random-kumaraswamy" -body {
    expr {srand($::rseed)}
    set result   1

    foreach {a b} {0.5 0.5  1.0 1.0  0.5 1.0  1.0 0.5  2.0 0.1  0.1 2.0} {
        set rnumbers [::math::statistics::random-kumaraswamy $a $b 1000]
        foreach r $rnumbers {
            if { $r < 0.0 || $r > 1.0 } {
                set result 0
                break
            }
        }
    }
    set result
} -result 1

# Simple test, exact matching
test "random-numbers-2.5" "Test random-negative-binomial" -body {
    expr {srand($::rseed)}
    set rnumbers [::math::statistics::random-negative-binomial 1 0.3 10]
} -result {0 0 3 0 0 0 1 0 1 1}

test "random-numbers-2.6" "Test random/estimate-negative-binomial" -match tolerant -body {
    expr {srand($::rseed)}
    set r        3
    set rnumbers [::math::statistics::random-negative-binomial $r 0.5 1000]
    set pvalue   [::math::statistics::estimate-negative-binomial $r $rnumbers]
} -result 0.50190935

test "kruskal-wallis-1.0" "Test analysis Kruskal-Wallis" -match tolerant -body {
    ::math::statistics::analyse-Kruskal-Wallis {6.4 6.8 7.2 8.3 8.4 9.1 9.4 9.7} {2.5 3.7 4.9 5.4 5.9 8.1 8.2} {1.3 4.1 4.9 5.2 5.5 8.2}
} -result {9.83627087199 0.00731275323967}
test "kruskal-wallis-1.1" "Test test Kruskal-Wallis" -match tolerant -body {
    ::math::statistics::test-Kruskal-Wallis 0.95 {6.4 6.8 7.2 8.3 8.4 9.1 9.4 9.7} {2.5 3.7 4.9 5.4 5.9 8.1 8.2} {1.3 4.1 4.9 5.2 5.5 8.2}
} -result 1

# Data from Statistical methods in Engineering and Quality Assurance by Peter W.M. John
test "wilcoxon-1.0" "Test test Wilcoxon" -match tolerant -body {
    ::math::statistics::test-Wilcoxon {71.1 68.3 74.8 72.1 71.2 70.4 73.6 66.3 72.7 74.1 70.1 68.5} \
                                      {73.3 70.9 74.6 72.1 72.8 74.2 74.7 69.2 75.5 75.8 70.0 72.1}
} -result -1.67431578065

# Very simple tests, merely to show that the procedure "works"
# (No numerical example available)
test "levene-brown-forsythe-1.0" "Test test Levene/Brown-Forsythe" -match tolerant -body {
    set values {{1 2 3} {2 3 4} {5 6 7}}
    ::math::statistics::test-Levene $values
} -result 0.0

test "levene-brown-forsythe-1.1" "Test test Levene/Brown-Forsythe" -match tolerant -body {
    set values {{1 2 3} {2 3 4} {5 6 7}}
    ::math::statistics::test-Brown-Forsythe $values
} -result 0.0

test "levene-brown-forsythe-1.2" "Test test Levene/Brown-Forsythe" -match tolerant -body {
    set values {{1 2 2} {2 3 4} {5 6 7.4}}
    ::math::statistics::test-Levene $values
} -result 0.47937131630648294

test "levene-brown-forsythe-1.3" "Test test Levene/Brown-Forsythe" -match tolerant -body {
    set values {{1 2 2} {2 3 4} {5 6 7.4}}
    ::math::statistics::test-Brown-Forsythe $values
} -result 0.4382022471910113

# Data taken from https://www.itl.nist.gov/div898/handbook/eda/section3/eda35a.htm
# Note: the webpage talks of the Levene test, but is actually the Brown-Forsythe
test "levene-brown-forsythe-1.4" "Test test Levene/Brown-Forsythe" -match tolerant -body {
    set values {{ 1.006 0.996 0.998 1.000 0.992 0.993 1.002 0.999 0.994 1.000 }
                { 0.998 1.006 1.000 1.002 0.997 0.998 0.996 1.000 1.006 0.988 }
                { 0.991 0.987 0.997 0.999 0.995 0.994 1.000 0.999 0.996 0.996 }
                { 1.005 1.002 0.994 1.000 0.995 0.994 0.998 0.996 1.002 0.996 }
                { 0.998 0.998 0.982 0.990 1.002 0.984 0.996 0.993 0.980 0.996 }
                { 1.009 1.013 1.009 0.997 0.988 1.002 0.995 0.998 0.981 0.996 }
                { 0.990 1.004 0.996 1.001 0.998 1.000 1.018 1.010 0.996 1.002 }
                { 0.998 1.000 1.006 1.000 1.002 0.996 0.998 0.996 1.002 1.006 }
                { 1.002 0.998 0.996 0.995 0.996 1.004 1.004 0.998 0.999 0.991 }
               { 0.991 0.995 0.984 0.994 0.997 0.997 0.991 0.998 1.004 0.997 } }
    ::math::statistics::test-Brown-Forsythe $values
} -result 1.705910

# Data from the Wikipedia page on Spearman's rank correlation coefficient
test "spearman-rank-1.0" "Test Spearman rank correlation" -match tolerant -body {
    ::math::statistics::spearman-rank {106  86 100 101  99 103  97 113 112 110} \
                                      {  7   0  27  50  28  29  20  12   6  17}
} -result -0.175757575758

test "spearman-rank-extended-1.0" "Test extended Spearman rank correlation procedure" -match tolerant -body {







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







940
941
942
943
944
945
946


































947
948
949
950
951
952










































953
954
955
956
957
958
959
960
961
962
963
964
965






































966
967
968
969
970
971
972
} -result 100

test "random-numbers-1.11" "Test random-cauchy" -body {
    set rnumbers [::math::statistics::random-cauchy 0 1 100]
    set result [llength $rnumbers]
} -result 100



































test "random-numbers-2.1" "Test estimate-pareto" -match tolerant -body {
    expr {srand($::rseed)}
    set rnumbers [::math::statistics::random-pareto 1.0 3.0 100]
    set result   [::math::statistics::estimate-pareto $rnumbers]
} -result {1.000519 3.668162 0.3668162}











































test "kruskal-wallis-1.0" "Test analysis Kruskal-Wallis" -match tolerant -body {
    ::math::statistics::analyse-Kruskal-Wallis {6.4 6.8 7.2 8.3 8.4 9.1 9.4 9.7} {2.5 3.7 4.9 5.4 5.9 8.1 8.2} {1.3 4.1 4.9 5.2 5.5 8.2}
} -result {9.83627087199 0.00731275323967}
test "kruskal-wallis-1.1" "Test test Kruskal-Wallis" -match tolerant -body {
    ::math::statistics::test-Kruskal-Wallis 0.95 {6.4 6.8 7.2 8.3 8.4 9.1 9.4 9.7} {2.5 3.7 4.9 5.4 5.9 8.1 8.2} {1.3 4.1 4.9 5.2 5.5 8.2}
} -result 1

# Data from Statistical methods in Engineering and Quality Assurance by Peter W.M. John
test "wilcoxon-1.0" "Test test Wilcoxon" -match tolerant -body {
    ::math::statistics::test-Wilcoxon {71.1 68.3 74.8 72.1 71.2 70.4 73.6 66.3 72.7 74.1 70.1 68.5} \
                                      {73.3 70.9 74.6 72.1 72.8 74.2 74.7 69.2 75.5 75.8 70.0 72.1}
} -result -1.67431578065







































# Data from the Wikipedia page on Spearman's rank correlation coefficient
test "spearman-rank-1.0" "Test Spearman rank correlation" -match tolerant -body {
    ::math::statistics::spearman-rank {106  86 100 101  99 103  97 113 112 110} \
                                      {  7   0  27  50  28  29  20  12   6  17}
} -result -0.175757575758

test "spearman-rank-extended-1.0" "Test extended Spearman rank correlation procedure" -match tolerant -body {
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560

    set indications {}
    foreach t $dunnett {
        lappend indications [lindex $t 0]
    }
    set indications
} -result {1 0 0}

#
# Bootstrap method to create new samples
#
test "Bootstrap-1.1" "Bootstrap - construct a single sample" -body {
    set data {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20}

    set sample [::math::statistics::bootstrap $data 10]
    #
    # Check the sample
    #
    set numberOkay 0
    foreach value $sample {
        incr numberOkay [expr {$value in $data}]
    }

    set result [list [llength $sample] $numberOkay]
} -result {10 10}

test "Bootstrap-1.2" "Bootstrap - variation in a single sample" -body {
    set data 0
    for {set i 0} {$i < 100} {incr i} {
        lappend data $i
    }

    set sample [::math::statistics::bootstrap $data 10]
    #
    # It is improbable that all values are the same
    #
    set numberInHalf1 0
    set numberInHalf2 0
    set halfData1 [lrange $data  0 49]
    set halfData2 [lrange $data 50 99]
    foreach value $sample {
        incr numberInHalf1 [expr {$value in $halfData1}]
        incr numberInHalf2 [expr {$value in $halfData2}]
    }

    set result [list [expr {$numberInHalf1 > 0}] [expr {$numberInHalf2 > 0}]]
} -result {1 1}

test "Bootstrap-1.3" "Bootstrap - list of samples" -body {
    set data 0
    for {set i 0} {$i < 100} {incr i} {
        lappend data $i
    }

    set sampleSize    10
    set numberSamples 20
    set samples [::math::statistics::bootstrap $data $sampleSize $numberSamples]

    set result 1

    if { [llength $samples] != $numberSamples } {
        set result 0
    }

    foreach sample $samples {
        if { [llength $sample] != $sampleSize } {
            set result 0
        }
    }

    set result
} -result 1


#
# Tests for Wasserstein distance and KL divergence
#
# Tests for error conditions
#
test "Wasserstein-1.1" "Error: lengths differ" -body {
    set distance [::math::statistics::wasserstein-distance {0 1} {1 0 0 0}]
} -returnCodes 1 -result {Lengths of the probability histograms must be the same}

#
# Check the symmetry for arbitrary histograms
#
test "Wasserstein-1.2" "Test symmetry" -body {
    set okay 1
    for {set i 0} {$i < 10} {incr i} {
        set histogram1 {}
        set histogram2 {}
        for {set j 0} {$j < 3*($i+1)} {incr j} {
            lappend histogram1 [expr {rand()}]
            lappend histogram2 [expr {rand()}]
        }

        set distance1 [::math::statistics::wasserstein-distance $histogram1 $histogram2]
        set distance2 [::math::statistics::wasserstein-distance $histogram2 $histogram1]

        if { abs($distance1-$distance2) > 1.0e-6 } {
            set okay 0
        }
    }

    return $okay

} -result 1

#
# Check the non-negativity for arbitrary histograms
#
test "Wasserstein-1.3" "Test non-negativity" -body {
    set okay 1
    for {set i 0} {$i < 10} {incr i} {
        set histogram1 {}
        set histogram2 {}
        for {set j 0} {$j < 3*($i+1)} {incr j} {
            lappend histogram1 [expr {rand()}]
            lappend histogram2 [expr {rand()}]
        }

        set distance1 [::math::statistics::wasserstein-distance $histogram1 $histogram2]

        if { $distance1 < 0.0 } {
            set okay 0
        }
    }

    return $okay

} -result 1

#
# Check the non-normalised histograms
#
test "Wasserstein-1.4" "Test non-normalised histograms" -match tolerant -body {
    return [list [::math::statistics::wasserstein-distance {2 0 0} {0 0 0.5}]  \
                 [::math::statistics::wasserstein-distance {1 0 0} {0 0 0.25}] ]
} -result {2.0 2.0}

#
# Check arbitrarily extended histograms
#
test "Wasserstein-1.5" "Test extended histograms" -match tolerant -body {
    return [list [::math::statistics::wasserstein-distance {1 0 0}     {0 0 1}]     \
                 [::math::statistics::wasserstein-distance {0 0 1 0 0} {0 0 0 0 1}] \
                 [::math::statistics::wasserstein-distance {1 0 0 0 0} {0 0 1 0 0}] ]
} -result {2.0 2.0 2.0}

#
# Check numerical results
#
test "Wasserstein-1.6" "Test numerical results" -match tolerant -body {
    return [list [::math::statistics::wasserstein-distance {1 0 0}     {0 0.5 0.5}]             \
                 [::math::statistics::wasserstein-distance {1 0 0 0 0} {0 0 0 0.5 0.5}]         \
                 [::math::statistics::wasserstein-distance {1 0 0 0 0} {0 0.25 0.25 0.25 0.25}] ]
} -result {1.5 3.5 2.5}

#
# Tests for error conditions
#
test "KL-divergence-1.1" "Error: lengths differ" -body {
    set distance [::math::statistics::kl-divergence {0 1} {1 0 0 0}]
} -returnCodes 1 -result {Lengths of the two probability histograms must be the same}

test "KL-divergence-1.2" "Error: unmatched zeroes" -body {
    set distance [::math::statistics::kl-divergence {0.3 0.3 0.4} {1 0 0}]
} -returnCodes 1 -result {Second probability histogram contains unmatched zeroes}


test "KL-divergence-1.3" "Matched zeroes should be accepted" -match tolerant -body {
    set distance [::math::statistics::kl-divergence {0.3 0.3 0.4 0} {0.7 0.2 0.1 0}]
} -returnCodes 0 -result 0.42196792

#
# Tests for equal histograms (not all normalised)
#
test "KL-divergence-1.4" "Equal histograms give zero divergence" -body {
    set distance [::math::statistics::kl-divergence {0.3 0.3 0.4} {0.3 0.3 0.4}]
} -result 0.0

test "KL-divergence-1.5" "Non-normalised but equal histograms give zero divergence" -body {
    set distance [::math::statistics::kl-divergence {0.3 0.3 0.4} {0.6 0.6 0.8}]
} -result 0.0

#
# Numerical tests - note: the expected values were taken from the implementation
#                         No independent source found
#
test "KL-divergence-1.6" "Shifted histograms" -match tolerant -body {
    set distance [::math::statistics::kl-divergence {1.0e-8 0.3 0.3 0.3 0.1} {0.3 0.3 0.3 0.1 1.0e-8}]
} -result 1.9413931

test "KL-divergence-1.7" "Arbitrary histograms" -match tolerant -body {
    set distance [::math::statistics::kl-divergence {0.4 0.2 0.3 0.1} {0.1 0.1 0.7 0.1}]
} -result 0.4389578


#
# Tests for logistic regression
#
set xdata {0.50 0.75 1.00 1.25 1.50 1.75 1.75 2.00 2.25 2.50 2.75 3.00 3.25 3.50 4.00 4.25 4.50 4.75 5.00 5.50}
set ydata {0    0    0    0    0    0    1    0    1    0    1    0    1    0    1    1    1    1    1    1   }

test "Logit-regression-1.0" "Logistic regression - coefficients" -match tolerant -body {
    set coeffs [::math::statistics::logistic-model $xdata $ydata]
} -result {-4.07679035286303 1.5045982920571572}

test "Logit-regression-1.1" "Logistic regression - probabilities" -match tolerant -body {
    set coeffs [::math::statistics::logistic-model $xdata $ydata]

    set probabilities {}
    foreach x {1 2 3 4 5} {
        lappend probabilities [::math::statistics::logistic-probability $coeffs $x]
    }

    return $probabilities

} -result {0.07094967663389527 0.2558609520815849 0.6075450376084848 0.8745281239093334 0.9691176473773739}


# End of test cases
testsuiteCleanup








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


1105
1106
1107
1108
1109
1110
1111
1112





















































































































































































































1113
1114

    set indications {}
    foreach t $dunnett {
        lappend indications [lindex $t 0]
    }
    set indications
} -result {1 0 0}






















































































































































































































# End of test cases
testsuiteCleanup

Changes to modules/math/symdiff.man.

64
65
66
67
68
69
70
71
72
==> (($c * (($a * $x) + $b)) + ($a * (($c * $x) + $d)))
math::calculus::symdiff::jacobian {x {$a * $x + $b * $y}
                         y {$c * $x + $d * $y}}
==> {{$a} {$b}} {{$c} {$d}}
}]

[vset CATEGORY {math :: calculus}]
[include ../common-text/feedback.inc]
[manpage_end]







|

64
65
66
67
68
69
70
71
72
==> (($c * (($a * $x) + $b)) + ($a * (($c * $x) + $d)))
math::calculus::symdiff::jacobian {x {$a * $x + $b * $y}
                         y {$c * $x + $d * $y}}
==> {{$a} {$b}} {{$c} {$d}}
}]

[vset CATEGORY {math :: calculus}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Deleted modules/math/trig.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
[vset VERSION 1.0.0]
[manpage_begin math::trig n [vset VERSION]]
[keywords math trigonometry]
[copyright {2018 Arjen Markus}]
[moddesc   {Tcl Math Library}]
[titledesc {Trigonometric anf hyperbolic functions}]
[category  Mathematics]
[require Tcl 8.5]
[require math::trig [vset VERSION]]
[description]
[para]
The [term math::trig] package defines a set of trigonomic and hyperbolic functions
and their inverses. In addition it defines versions of the trigonomic functions
that take arguments in degrees instead of radians.
[para]
For easy use these functions may be imported into the [term tcl::mathfunc] namespace,
so that they can be used directly in the [term expr] command.

[section "FUNCTIONS"]
The functions [term radian_reduced] and [term degree_reduced] return a reduced angle, in
respectively radians and degrees, in the intervals [lb]0, 2pi) and [lb]0, 360):

[list_begin definitions]

[call [cmd ::math::trig::radian_reduced] [arg angle]]
Return the equivalent angle in the interval [lb]0, 2pi).
[list_begin arguments]
[arg_def float angle] Angle (in radians)
[list_end]

[call [cmd ::math::trig::degree_reduced] [arg angle]]
Return the equivalent angle in the interval [lb]0, 360).
[list_begin arguments]
[arg_def float angle] Angle (in degrees)
[list_end]

[list_end]


The following trigonomic functions are defined in addition to the ones defined
in the [term expr] command:

[list_begin definitions]

[call [cmd ::math::trig::cosec] [arg angle]]
Calculate the cosecant of the angle (1/cos(angle))
[list_begin arguments]
[arg_def float angle] Angle (in radians)
[list_end]

[call [cmd ::math::trig::sec] [arg angle]]
Calculate the secant of the angle (1/sin(angle))
[list_begin arguments]
[arg_def float angle] Angle (in radians)
[list_end]

[call [cmd ::math::trig::cotan] [arg angle]]
Calculate the cotangent of the angle (1/tan(angle))
[list_begin arguments]
[arg_def float angle] Angle (in radians)
[list_end]

[list_end]


For these functions also the inverses are defined:

[list_begin definitions]

[call [cmd ::math::trig::acosec] [arg value]]
Calculate the arc cosecant of the value
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[call [cmd ::math::trig::asec] [arg value]]
Calculate the arc secant of the value
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[call [cmd ::math::trig::acotan] [arg value]]
Calculate the arc cotangent of the value
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[list_end]

The following hyperbolic and inverse hyperbolic functions are defined:

[list_begin definitions]

[call [cmd ::math::trig::cosech] [arg value]]
Calculate the hyperbolic cosecant of the value (1/sinh(value))
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[call [cmd ::math::trig::sech] [arg value]]
Calculate the hyperbolic secant of the value (1/cosh(value))
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[call [cmd ::math::trig::cotanh] [arg value]]
Calculate the hyperbolic cotangent of the value (1/tanh(value))
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[call [cmd ::math::trig::asinh] [arg value]]
Calculate the arc hyperbolic sine of the value
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[call [cmd ::math::trig::acosh] [arg value]]
Calculate the arc hyperbolic cosine of the value
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[call [cmd ::math::trig::atanh] [arg value]]
Calculate the arc hyperbolic tangent of the value
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[call [cmd ::math::trig::acosech] [arg value]]
Calculate the arc hyperbolic cosecant of the value
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[call [cmd ::math::trig::asech] [arg value]]
Calculate the arc hyperbolic secant of the value
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[call [cmd ::math::trig::acotanh] [arg value]]
Calculate the arc hyperbolic cotangent of the value
[list_begin arguments]
[arg_def float value] Value of the argument
[list_end]

[list_end]

The following versions of the common trigonometric functions and their
inverses are defined:

[list_begin definitions]

[call [cmd ::math::trig::sind] [arg angle]]
Calculate the sine of the angle (in degrees)
[list_begin arguments]
[arg_def float angle] Angle (in degrees)
[list_end]

[call [cmd ::math::trig::cosd] [arg angle]]
Calculate the cosine of the angle (in degrees)
[list_begin arguments]
[arg_def float angle] Angle (in radians)
[list_end]

[call [cmd ::math::trig::tand] [arg angle]]
Calculate the cotangent of the angle (in degrees)
[list_begin arguments]
[arg_def float angle] Angle (in degrees)
[list_end]

[call [cmd ::math::trig::cosecd] [arg angle]]
Calculate the cosecant of the angle (in degrees)
[list_begin arguments]
[arg_def float angle] Angle (in degrees)
[list_end]

[call [cmd ::math::trig::secd] [arg angle]]
Calculate the secant of the angle (in degrees)
[list_begin arguments]
[arg_def float angle] Angle (in degrees)
[list_end]

[call [cmd ::math::trig::cotand] [arg angle]]
Calculate the cotangent of the angle (in degrees)
[list_begin arguments]
[arg_def float angle] Angle (in degrees)
[list_end]

[list_end]

[vset CATEGORY {math :: trig}]
[include ../common-text/feedback.inc]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































Deleted modules/math/trig.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# trig.tcl --
#     Package for additional trigonometric and hyperbolic functions
#
#     Besides the ordinary functions that take/return angles in radians,
#     also versions that use angles in degrees.
#
#     See tickets https://core.tcl-lang.org/tcllib/tktview/df3676c9821ba917c5cfda68c2ea0ad7a6947ac9
#     and https://core.tcl-lang.org/tcllib/tktview/21fef042b91ca252fc2a20ead5cd05c2b51b1776
#
package provide math::trig 1.0

# ::math::trig --
#     Create the namespace
#
namespace eval ::math::trig {
    namespace export radian_reduced degree_reduced \
                     cosec sec cotan acosec asec acotan \
                     cosech sech cotanh asinh acosh atanh acosech asech acotanh \
                     sind cosd tand cosecd secd cotand acosecd asecd acotand

    variable pi     [expr {acos(-1.0)}]
    variable twopi  [expr {2.0 * acos(-1.0)}]
    variable halfpi [expr {0.5 * acos(-1.0)}]
    variable torad  [expr {acos(-1.0) / 180.0}]
    variable todeg  [expr {180.0 / acos(-1.0)}]
}

# radian_reduced --
#     Reduce the given value to a value in the interval [0,2pi]
#
# Arguments:
#     angle      Angle in radians that should be reduced
#
# Note:
#     If the angle is very large, then numerical accuracy will
#     diminish, up to a point where the answer is meaningless.
#     This is not (yet) taken care of.
#
proc ::math::trig::radian_reduced {angle} {
    variable twopi

    set n       [expr {int($angle/$twopi)}]
    set reduced [expr {$angle - $n * $twopi}]
    if { $reduced < 0.0 } {
        set reduced [expr {$reduced + $twopi}]
    }

    return $reduced
}

# degree_reduced --
#     Reduce the given value to a value in the interval [0,360]
#
# Arguments:
#     angle      Angle in degrees that should be reduced
#
# Note:
#     If the angle is very large, then numerical accuracy will
#     diminish, up to a point where the answer is meaningless.
#     This is not (yet) taken care of.
#
proc ::math::trig::degree_reduced {angle} {

    set n       [expr {int($angle/360.0)}]
    set reduced [expr {$angle - $n * 360.0}]
    if { $reduced < 0.0 } {
        set reduced [expr {$reduced + 360.0}]
    }

    return $reduced
}


# cosec, sec, cotan --
#     Calculate the cosecans, secans and cotangent
#
# Arguments:
#     angle      Angle in radians
#
proc ::math::trig::cosec {angle} {
    return [expr {1.0 / sin($angle)}]
}

proc ::math::trig::sec {angle} {
    return [expr {1.0 / cos($angle)}]
}

proc ::math::trig::cotan {angle} {
    variable halfpi
    return [expr {tan($halfpi - $angle)}]
}


# cosech, sech, cotanh --
#     Calculate the hyperbolic cosecans, secans and cotangent
#
# Arguments:
#     value      Argument value
#
proc ::math::trig::cosech {value} {
    return [expr {1.0 / sinh($value)}]
}

proc ::math::trig::sech {value} {
    return [expr {1.0 / cosh($value)}]
}

proc ::math::trig::cotanh {value} {
    return [expr {1.0/tanh($value)}]
}


# asinh, acosh, atanh --
#     Calculate the arc hyperbolic sine, cosine and tangent
#
# Arguments:
#     value      Argument value
#
proc ::math::trig::asinh {value} {
    return [expr {log($value + sqrt($value**2 + 1.0))}]
}

proc ::math::trig::acosh {value} {
    if { $value < 1.0 } {
        return -code error "acosh: argument should be larger/equal 1.0"
    }
    return [expr {log($value + sqrt($value**2 - 1.0))}]
}

proc ::math::trig::atanh {value} {
    if { $value <= -1.0 || $value >= 1.0} {
        return -code error "atanh: argument should be between -1.0 and 1.0"
    }
    return [expr {0.5 * log((1.0 + $value) / (1.0 - $value))}]
}


# acosec, asec, acotan --
#     Calculate the arc cosecans, secans and cotangent
#
# Arguments:
#     value      Value for which the angle is sought
#
proc ::math::trig::acosec {value} {
    return [expr {asin(1.0/$value)}]
}

proc ::math::trig::asec {value} {
    return [expr {1.0 / acos($value)}]
}

proc ::math::trig::acotan {value} {
    variable halfpi
    return [expr {atan($halfpi - $angle)}]
}


# acosech, asech, acotanh --
#     Calculate the arc hyperbolic cosecans, secans and cotangent
#
# Arguments:
#     value      Value for which the angle is sought
#
proc ::math::trig::acosech {value} {
    return [asinh [expr {1.0/$value}]]
}

proc ::math::trig::asech {value} {
    return [acosh [expr {1.0/$value}]]
}

proc ::math::trig::acotanh {value} {
    return [atanh [expr {1.0/$value}]]
}

# cossind --
#     Reduce the angle (in degrees) to ensure exact results
#     for multiples of 90 degrees.
#
# Arguments:
#     angle           Angle in degrees
#
# Result:
#     sine and cosine of the angle
#
proc ::math::trig::cossind {angle} {
    variable torad

    set angle [::math::trig::degree_reduced $angle]

    if { $angle <= 45.0 || $angle >= 315.0 } {
        set sind [expr {sin($angle*$torad)}]
        set cosd [expr {cos($angle*$torad)}]
    } elseif { $angle <= 135.0 } {
        set sind [expr {cos(($angle-90.0)*$torad)}]
        set cosd [expr {-sin(($angle-90.0)*$torad)}]
    } elseif { $angle <= 225.0 } {
        set sind [expr {-sin(($angle-180.0)*$torad)}]
        set cosd [expr {-cos(($angle-180.0)*$torad)}]
    } else { ;#elseif { $angle <= 315.0 }
        set sind [expr {-cos(($angle-270.0)*$torad)}]
        set cosd [expr {sin(($angle-270.0)*$torad)}]
    }

    return [list $sind $cosd]
}

# cosd, sind, tand, cosecd, secd, cotand --
#     Trigonometric functions taking the angle in degrees
#
# Arguments:
#     angle            Angle in degrees
#
# Result:
#     cosine, sine, etc. of the given angle
#
proc ::math::trig::cosd {angle} {
    return [lindex [cossind $angle] 1]
}

proc ::math::trig::sind {angle} {
    return [lindex [cossind $angle] 0]
}

proc ::math::trig::tand {angle} {
    lassign [cossind $angle] s c
    return [expr {$s / $c}]
}

proc ::math::trig::cosecd {angle} {
    lassign [cossind $angle] s c
    return [expr {1.0 / $s}]
}

proc ::math::trig::secd {angle} {
    lassign [cossind $angle] s c
    return [expr {1.0 / $c}]
}

proc ::math::trig::cotand {angle} {
    lassign [cossind $angle] s c
    return [expr {$c / $s}]
}

# inverse trigonometric functions
# Do not bother with exactitude in this case
#
proc ::math::trig::acosd {value} {
    variable todeg
    return [expr {$todeg * acos($value)}]
}

proc ::math::trig::asind {value} {
    variable todeg
    return [expr {$todeg * asin($value)}]
}

proc ::math::trig::atand {value} {
    variable todeg
    return [expr {$todeg * atan($value)}]
}

proc ::math::trig::acosecd {value} {
    variable todeg
    return [expr {$todeg * asin(1.0/$value)}]
}

proc ::math::trig::asecd {value} {
    variable todeg
    return [expr {$todeg * acos(1.0/$value)}]
}
proc ::math::trig::acotand {value} {
    variable todeg
    return [expr {$todeg * atan(1.0/$value)}]
}

# tests --
if {0} {
foreach angle {0 30 45 60 90 120 135 150 180 210 225 240 270 300 315 330 360} {
    puts "$angle -- [::math::trig::sind $angle] -- [::math::trig::cosd $angle] [::math::trig::tand $angle]"
}

# simple test
foreach angle {-10 -7 -4 -1 0 2 5 8 11} {
    puts "$angle -- [::math::trig::radian_reduced $angle]"
}
foreach angle {-10 -7 -4 -1 0 2 5 8 11} {
    puts "$angle -- [expr {101.0*$angle}] -- [::math::trig::degree_reduced [expr {101.0*$angle}]]"
}
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































Deleted modules/math/trig.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
# -*- tcl -*-
# trig.test --
#    Test cases for the ::math::trig package
#
# Note:
#    The tests assume tcltest 2.1, in order to compare
#    floating-point results

# -------------------------------------------------------------------------

source [file join \
        [file dirname [file dirname [file join [pwd] [info script]]]] \
        devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.1

support {
    useLocal math.tcl math
    useLocal linalg.tcl math::linearalgebra
}
testing {
    useLocal trig.tcl math::trig
}
#
# Create and register (in that order!) custom matching procedures
#
proc matchTolerant { expected actual } {
   set match 1
   foreach a $actual e $expected {
      if { abs($e-$a)>0.0001*abs($e) &&
           abs($e-$a)>0.0001*abs($a)     } {
         set match 0
         break
      }
   }
   return $match
}

proc matchExact { expected actual } {
   set match 1
   foreach a $actual e $expected {
      if { abs($e-$a) != 0.0 } {
         set match 0
         break
      }
   }
   return $match
}

customMatch tolerant   matchTolerant
customMatch exact      matchExact

#
# Test cases: reduction routines
#
set pi [expr {acos(-1.0)}]
test "Trig-1.1" "Reduction function - radians" -match tolerant -body {
    global pi
    set result {}
    foreach a {-4 -3 -2 -1 0 1 2 3 4} {
        set angle [expr {$a * $pi}]
        lappend result [::math::trig::radian_reduced $angle]
    }
    return $result
} -result [list 0.0 $pi 0.0 $pi 0.0 $pi 0.0 $pi 0.0]

test "Trig-1.2" "Reduction function - degrees" -match tolerant -body {
    set result {}
    foreach a {-4 -3 -2 -1 0 1 2 3 4} {
        set angle [expr {$a * 180.0}]
        lappend result [::math::trig::degree_reduced $angle]
    }
    return $result
} -result [list 0.0 180.0 0.0 180.0 0.0 180.0 0.0 180.0 0.0]

#
# Test cases: additional trigonometric functions and their inverses
#
test "Trig-2.1" "Additional trigonometric functions - cosecant" -match tolerant -body {
    set result {}
    for {set i 1} {$i <= 100} {incr i} {
        set angle [expr {0.1 * $i}]
        lappend result [expr { sin($angle) * [::math::trig::cosec $angle]}]
    }
    return $result
} -result [lrepeat 100 1.0]

test "Trig-2.2" "Additional trigonometric functions - secant" -match tolerant -body {
    set result {}
    for {set i 0} {$i < 100} {incr i} {
        set angle [expr {0.1 * $i}]
        lappend result [expr { cos($angle) * [::math::trig::sec $angle]}]
    }
    return $result
} -result [lrepeat 100 1.0]

test "Trig-2.3" "Additional trigonometric functions - cotangent" -match tolerant -body {
    set result {}
    for {set i 1} {$i <= 100} {incr i} {
        set angle [expr {0.1 * $i}]
        lappend result [expr { tan($angle) * [::math::trig::cotan $angle]}]
    }
    return $result
} -result [lrepeat 100 1.0]

# Make sure the values are in the interval (0,pi) for sec and cotan to avoid infinity
# and (-pi/2,pi/2) for cosec
set argvalues_pi {}
set argvalues_halfpi {}
for {set i 1} {$i <= 30} {incr i} {
    set angle_pi     [expr {0.1 * $i}]
    set angle_halfpi [expr {0.1 * ($i-15)}]
    lappend argvalues $angle
}

test "Trig-3.1" "Inverse trigonometric functions - arc-cosecant" -match tolerant -body {
    global argvalues_halfpi
    set result {}
    foreach angle $argvalues_halfpi {
        set value [::math::trig::cosec $angle]
        lappend result [::math::trig::acosec $value]
    }
    return $result
} -result $argvalues_halfpi

test "Trig-3.2" "Inverse trigonometric functions - arc-secant" -match tolerant -body {
    global argvalues_pi
    set result {}
    foreach angle $argvalues_pi {
        set value [::math::trig::sec $angle]
        lappend result [::math::trig::asec $value]
    }
    return $result
} -result $argvalues_pi

test "Trig-3.3" "Inverse trigonometric functions - arc-cotangent" -match tolerant -body {
    global argvalues_pi
    set result {}
    foreach angle $argvalues_pi {
        set value [::math::trig::cotan $angle]
        lappend result [::math::trig::acotan $value]
    }
    return $result
} -result $argvalues_pi

#
# Test cases: hyperbolic functions and their inverses
#
test "Trig-4.1" "Additional hyperbolic functions - hyperbolic cosecant" -match tolerant -body {
    set result {}
    for {set i -20} {$i <= 20} {incr i} {
        set arg   [expr {$i * 0.2 + 0.01}] ;# Avoid zero
        lappend result [expr {sinh($arg) * [::math::trig::cosech $arg]}]
    }
    return $result
} -result [lrepeat 41 1.0]

test "Trig-4.2" "Additional hyperbolic functions - hyperbolic secant" -match tolerant -body {
    set result {}
    for {set i -20} {$i <= 20} {incr i} {
        set arg   [expr {$i * 0.2 + 0.01}] ;# Avoid zero, for symmetry only
        lappend result [expr {cosh($arg) * [::math::trig::sech $arg]}]
    }
    return $result
} -result [lrepeat 41 1.0]

test "Trig-4.3" "Additional hyperbolic functions - hyperbolic contangent" -match tolerant -body {
    set result {}
    for {set i -20} {$i <= 20} {incr i} {
        set arg   [expr {$i * 0.2 + 0.01}] ;# Avoid zero
        lappend result [expr {tanh($arg) * [::math::trig::cotanh $arg]}]
    }
    return $result
} -result [lrepeat 41 1.0]


set argvalues {}
set argvalues_pos {}
for {set i -20} {$i <= 20} {incr i} {
    lappend argvalues     [expr {$i * 0.2 + 0.01}] ;# Avoid zero
    lappend argvalues_pos [expr {abs($i * 0.2 + 0.01)}] ;# Positive values
}

test "Trig-5.1" "Inverse hyperbolic functions - hyperbolic arc sine" -match tolerant -body {
    global argvalues
    set result {}
    foreach arg $argvalues {
        set value [expr {sinh($arg)}]
        lappend result [::math::trig::asinh $value]
    }
    return $result
} -result $argvalues

test "Trig-5.2" "Inverse hyperbolic functions - hyperbolic arc cosine" -match tolerant -body {
    global argvalues
    set result {}
    foreach arg $argvalues {
        set value [expr {cosh($arg)}]
        lappend result [::math::trig::acosh $value]
    }
    return $result
} -result $argvalues_pos

test "Trig-5.3" "Inverse hyperbolic functions - hyperbolic arc tangent" -match tolerant -body {
    global argvalues
    set result {}
    foreach arg $argvalues {
        set value [expr {tanh($arg)}]
        lappend result [::math::trig::atanh $value]
    }
    return $result
} -result $argvalues

test "Trig-5.4" "Inverse hyperbolic functions - hyperbolic arc cosecant" -match tolerant -body {
    global argvalues
    set result {}
    foreach arg $argvalues {
        set value [::math::trig::cosech $arg]
        lappend result [::math::trig::acosech $value]
    }
    return $result
} -result $argvalues

test "Trig-5.5" "Inverse hyperbolic functions - hyperbolic arc secant" -match tolerant -body {
    global argvalues
    set result {}
    foreach arg $argvalues {
        set value [::math::trig::sech $arg]
        lappend result [::math::trig::asech $value]
    }
    return $result
} -result $argvalues_pos

test "Trig-5.6" "Inverse hyperbolic functions - hyperbolic arc cotangent" -match tolerant -body {
    global argvalues
    set result {}
    foreach arg $argvalues {
        set value [::math::trig::cotanh $arg]
        lappend result [::math::trig::acotanh $value]
    }
    return $result
} -result $argvalues

#
# Test cases: trigonometric functions - degree variants
#
set hsqrt2      [expr {0.5 * sqrt(2.0)}]
set hsqrt3      [expr {0.5 * sqrt(3.0)}]
set minhsqrt2   [expr {-0.5 * sqrt(2.0)}]
set minhsqrt3   [expr {-0.5 * sqrt(3.0)}]
set invsqrt3    [expr {1.0 / sqrt(3.0)}]
set sqrt3       [expr {sqrt(3.0)}]
set minsqrt3    [expr {-sqrt(3.0)}]
set mininvsqrt3 [expr {-1.0 / sqrt(3.0)}]
set minhsqrt3   [expr {-0.5 * sqrt(3.0)}]
set minhsqrt2   [expr {-0.5 * sqrt(2.0)}]

test "Trig-6.1" "Trigonometric functions - multiples of 90 degrees" -match exact -body {
    set result {}
    foreach angle {0  90  180 270 360 -90 -180 -270 -360} {
        lappend result [::math::trig::sind $angle] [::math::trig::cosd $angle]
    }
    foreach angle {0 180 360 -180 -360} {
        lappend result [::math::trig::tand $angle]
    }
    return $result
} -result {0.0 1.0  1.0 0.0  0.0 -1.0  -1.0 0.0  0.0 1.0 -1.0 0.0  0.0 -1.0  1.0 0.0  0.0 1.0
           0.0 0.0 0.0 0.0  0.0}
#          0        90       180       270       360     -90       -180      -270     -360
#          0   180 360 -180 -360

test "Trig-6.2" "Trigonometric functions - sine (degrees)" -match tolerant -body {
    set result {}
    foreach angle {0  30  45  60  90 120 135 150 180 210 225 240 270 300 315 330 360} {
        lappend result [::math::trig::sind $angle]
    }
    return $result
} -result [list 0.0 0.5 $hsqrt2 $hsqrt3 1.0  $hsqrt3 $hsqrt2 0.5  0.0  -0.5  $minhsqrt2 $minhsqrt3 -1.0 $minhsqrt3 $minhsqrt2 -0.5  0.0]
#               0   30  45      60      90   120     135     150  180  210   225        240       270  300         315        330   360

test "Trig-6.3" "Trigonometric functions - cosine (degrees)" -match tolerant -body {
    set result {}
    foreach angle {0  30  45  60  90 120 135 150 180 210 225 240 270 300 315 330 360} {
        lappend result [::math::trig::cosd $angle]
    }
    return $result
} -result [list 1.0 $hsqrt3 $hsqrt2 0.5 0.0 -0.5 $minhsqrt2 $minhsqrt3 -1.0 $minhsqrt3 $minhsqrt2 -0.5  0.0  0.5 $hsqrt2 $hsqrt3 1.0]
#               0   30      45      60  90  120  135        150        180   210       225        240   270  300 315     330     360

test "Trig-6.4" "Trigonometric functions - tangent (degrees)" -match tolerant -body {
    set result {}
    foreach angle {0  30  45  60  120 135 150 180} {
        lappend result [::math::trig::tand $angle]
    }
    return $result
} -result [list 0.0 $invsqrt3 1.0 $sqrt3 $minsqrt3 -1.0 $mininvsqrt3 0.0]
#               0   30        45      60 120       135  150          180

# Inverse trigonometric functions with degrees
# Make sure the values are in the interval (0,180) for cos, sec and cotan to avoid infinity
# and (-pi/2,pi/2) for sin, cosec and tan
set argvalues_180 {}
set argvalues_90 {}
for {set i 1} {$i <= 30} {incr i} {
    set angle_180     [expr {0.1 * $i}]
    set angle_90      [expr {0.1 * ($i-15)}]
    lappend argvalues $angle
}

test "Trig-7.1" "Inverse trigonometric functions (degrees) - arc-sine" -match tolerant -body {
    global argvalues_90
    set result {}
    foreach angle $argvalues_90 {
        set value [::math::trig::sind $angle]
        lappend result [::math::trig::asind $value]
    }
    return $result
} -result $argvalues_90

test "Trig-7.2" "Inverse trigonometric functions (degrees) - arc-cosine" -match tolerant -body {
    global argvalues_180
    set result {}
    foreach angle $argvalues_180 {
        set value [::math::trig::cosd $angle]
        lappend result [::math::trig::acosd $value]
    }
    return $result
} -result $argvalues_180

test "Trig-7.3" "Inverse trigonometric functions (degrees) - arc-tangent" -match tolerant -body {
    global argvalues_90
    set result {}
    foreach angle $argvalues_90 {
        set value [::math::trig::tand $angle]
        lappend result [::math::trig::atand $value]
    }
    return $result
} -result $argvalues_90

test "Trig-7.4" "Inverse trigonometric functions (degrees) - arc-secant" -match tolerant -body {
    global argvalues_180
    set result {}
    foreach angle $argvalues_180 {
        set value [::math::trig::secd $angle]
        lappend result [::math::trig::asecd $value]
    }
    return $result
} -result $argvalues_180

test "Trig-7.5" "Inverse trigonometric functions (degrees) - arc-cosecant" -match tolerant -body {
    global argvalues_90
    set result {}
    foreach angle $argvalues_90 {
        set value [::math::trig::cosecd $angle]
        lappend result [::math::trig::acosecd $value]
    }
    return $result
} -result $argvalues_90

test "Trig-7.6" "Inverse trigonometric functions (degrees) - arc-cotangent" -match tolerant -body {
    global argvalues_180
    set result {}
    foreach angle $argvalues_180 {
        set value [::math::trig::cotand $angle]
        lappend result [::math::trig::acotand $value]
    }
    return $result
} -result $argvalues_180
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































































































































































































































































































































































































































































































































































































































































































Changes to modules/math/wilcoxon.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
# wilcoxon.tcl --
#     Implementation of the Wilcoxon test: test if the medians
#     of two samples are the same
#
#     Also: Levene's and Brown-Forsythe's test
#

# test-Wilcoxon
#     Compute the statistic that indicates if the medians of two
#     samples are the same
#
# Arguments:
#     sample_a       List of values in the first sample
|



<
<







1
2
3
4


5
6
7
8
9
10
11
# statistics_new.tcl --
#     Implementation of the Wilcoxon test: test if the medians
#     of two samples are the same
#



# test-Wilcoxon
#     Compute the statistic that indicates if the medians of two
#     samples are the same
#
# Arguments:
#     sample_a       List of values in the first sample
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
#
# Result:
#     Rank correlation coefficient
#
proc ::math::statistics::spearman-rank {sample_a sample_b} {
    return [lindex [spearman-rank-extended $sample_a $sample_b] 0]
}

# test-Levene --
#     Compute the Levene statistic that indicates if the variances of
#     groups of data are the same
#
# Arguments:
#     groups         List of groups of values to be examined
#
# Result:
#     Statistic for the test (an F statistic with k-1, N-k degrees
#     of freedom - k the number of groups and N the total number
#     of values)
#     The test uses the mean of the values in the groups.
#
proc ::math::statistics::test-Levene {groups} {

    return [Test-Levene-Brown-Forsythe 0 $groups]
}

# test-Brown-Forsythe --
#     Compute the Brown-Forsythe statistic that indicates if the variances of
#     groups of data are the same
#
# Arguments:
#     groups         List of groups of values to be examined
#
# Result:
#     Statistic for the test (an F statistic with k-1, N-k degrees
#     of freedom - k the number of groups and N the total number
#     of values)
#     The test uses the median of the values in the groups.
#
proc ::math::statistics::test-Brown-Forsythe {groups} {

    return [Test-Levene-Brown-Forsythe 1 $groups]
}

# Test-Levene-Brown-Forsythe --
#     Compute either the Levene or the Brown-Forsythe statistic that indicates
#     if the variances of groups of data are the same
#
# Arguments:
#     choice         Which of the two versions
#     groups         List of groups of values to be examined
#
# Result:
#     Statistic for the test
#     The test uses either the mean or the median of the values in the groups.
#
proc ::math::statistics::Test-Levene-Brown-Forsythe {choice groups} {

    #
    # Compute the deviations from the mean/median within each group
    #
    set alldevs {}
    set zscores {}
    set zmeans  {}
    foreach group $groups {
        if { $choice } {
            set zm [median $group]
        } else {
            set zm [mean $group]
        }
        set zgroup {}
        foreach element $group {
            lappend zgroup [expr {abs($element-$zm)}]
        }

        set alldevs [concat $alldevs $zgroup]
        lappend zscores $zgroup
        lappend zmeans  [mean $zgroup]
    }

    set zoverall [mean $alldevs]

    set ndata   [llength $alldevs]
    set ngroups [llength $groups]

    #
    # Compute the numerator of the statistic
    #
    set sumsqmeans 0.0

    foreach zm $zmeans group $groups {
        set n          [llength $group]
        set sumsqmeans [expr { $sumsqmeans + $n * ($zm - $zoverall)**2 }]
    }

    #
    # Compute the denominator
    #
    set sumsqpergroup 0.0

    foreach zm $zmeans zs $zscores {
        set sumsq 0.0
        foreach z $zs {
            set sumsq [expr {$sumsq + ($z-$zm)**2}]
        }

        set sumsqpergroup [expr { $sumsqpergroup + $sumsq }]
    }

    #
    # Finally, the statistic
    #

    return [expr { ($ndata-$ngroups) * $sumsqmeans / double( ($ngroups-1) * $sumsqpergroup ) }]
}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
222
223
224
225
226
227
228












































































































#
# Result:
#     Rank correlation coefficient
#
proc ::math::statistics::spearman-rank {sample_a sample_b} {
    return [lindex [spearman-rank-extended $sample_a $sample_b] 0]
}












































































































Changes to modules/md4/md4.man.

1
2
3
4
5
6
7
8
[vset VERSION 1.0.7]
[manpage_begin md4 n [vset VERSION]]
[see_also md5]
[see_also sha1]
[keywords hashing]
[keywords md4]
[keywords message-digest]
[keywords {rfc 1320}]
|







1
2
3
4
5
6
7
8
[vset VERSION 1.0.6]
[manpage_begin md4 n [vset VERSION]]
[see_also md5]
[see_also sha1]
[keywords hashing]
[keywords md4]
[keywords message-digest]
[keywords {rfc 1320}]
160
161
162
163
164
165
166
167
168
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY md4]
[include ../common-text/feedback.inc]
[manpage_end]







|

160
161
162
163
164
165
166
167
168
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY md4]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/md4/md4.tcl.

1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
# md4.tcl - Copyright (C) 2003 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# This is a Tcl-only implementation of the MD4 hash algorithm as described in 
# RFC 1320 ( http://www.ietf.org/rfc/rfc1320.txt )
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.2;                # tcl minimum version


# @mdgen EXCLUDE: md4c.tcl

namespace eval ::md4 {
    variable  accel
    array set accel {critcl 0 cryptkit 0}












>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# md4.tcl - Copyright (C) 2003 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# This is a Tcl-only implementation of the MD4 hash algorithm as described in 
# RFC 1320 ( http://www.ietf.org/rfc/rfc1320.txt )
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.2;                # tcl minimum version
catch {package require md4c 1.0};       # tcllib critcl alternative

# @mdgen EXCLUDE: md4c.tcl

namespace eval ::md4 {
    variable  accel
    array set accel {critcl 0 cryptkit 0}

547
548
549
550
551
552
553

554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
    if {$opts(-hex)} {
        set r [Hex $r]
    }
    return $r
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::md4 {
    variable e {}
    foreach e {critcl cryptkit} { if {[LoadAccelerator $e]} { break } }
    unset e
}

package provide md4 1.0.7

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:









>







|








548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
    if {$opts(-hex)} {
        set r [Hex $r]
    }
    return $r
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::md4 {
    variable e {}
    foreach e {critcl cryptkit} { if {[LoadAccelerator $e]} { break } }
    unset e
}

package provide md4 1.0.6

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:


Changes to modules/md4/pkgIndex.tcl.

1
2
3
# This package has been tested with tcl 8.2.3 and above.
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded md4 1.0.7 [list source [file join $dir md4.tcl]]


|
1
2
3
# This package has been tested with tcl 8.2.3 and above.
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded md4 1.0.6 [list source [file join $dir md4.tcl]]

Changes to modules/md5/md5.man.

1
2
3
4
5
6
7
8
[manpage_begin md5 n 2.0.8]
[see_also md4]
[see_also sha1]
[keywords hashing]
[keywords md5]
[keywords message-digest]
[keywords {rfc 1320}]
[keywords {rfc 1321}]
|







1
2
3
4
5
6
7
8
[manpage_begin md5 n 2.0.7]
[see_also md4]
[see_also sha1]
[keywords hashing]
[keywords md5]
[keywords message-digest]
[keywords {rfc 1320}]
[keywords {rfc 1321}]
166
167
168
169
170
171
172
173
174
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY md5]
[include ../common-text/feedback.inc]
[manpage_end]







|

166
167
168
169
170
171
172
173
174
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY md5]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/md5/md5.tcl.

351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
		expr { ($x << $i) | (($x >> [set R$i]) & [set S$i])}
	    }
	}
	# inline <<<
	regsub -all -- {\[ *<<< +\[ *expr +({[^\}]*})\] +([0-9]+) *\]} $md5body {(([set x [expr \1]] << \2) |  (($x >> R\2) \& S\2))} md5body

	# now replace the R and S
	variable map {}
	variable i
	foreach i { 
	    7 12 17 22
	    5  9 14 20
	    4 11 16 23
	    6 10 15 21 
	} {
	    lappend map R$i [expr {32 - $i}] S$i [expr {0x7fffffff >> (31-$i)}]
	}
	
	# inline the values of T
	variable tVal
	variable tName
	foreach \
		tName {
	    T01 T02 T03 T04 T05 T06 T07 T08 T09 T10 
	    T11 T12 T13 T14 T15 T16 T17 T18 T19 T20 
	    T21 T22 T23 T24 T25 T26 T27 T28 T29 T30 
	    T31 T32 T33 T34 T35 T36 T37 T38 T39 T40 
	    T41 T42 T43 T44 T45 T46 T47 T48 T49 T50 







|
<










<
<







351
352
353
354
355
356
357
358

359
360
361
362
363
364
365
366
367
368


369
370
371
372
373
374
375
		expr { ($x << $i) | (($x >> [set R$i]) & [set S$i])}
	    }
	}
	# inline <<<
	regsub -all -- {\[ *<<< +\[ *expr +({[^\}]*})\] +([0-9]+) *\]} $md5body {(([set x [expr \1]] << \2) |  (($x >> R\2) \& S\2))} md5body

	# now replace the R and S
	set map {}

	foreach i { 
	    7 12 17 22
	    5  9 14 20
	    4 11 16 23
	    6 10 15 21 
	} {
	    lappend map R$i [expr {32 - $i}] S$i [expr {0x7fffffff >> (31-$i)}]
	}
	
	# inline the values of T


	foreach \
		tName {
	    T01 T02 T03 T04 T05 T06 T07 T08 T09 T10 
	    T11 T12 T13 T14 T15 T16 T17 T18 T19 T20 
	    T21 T22 T23 T24 T25 T26 T27 T28 T29 T30 
	    T31 T32 T33 T34 T35 T36 T37 T38 T39 T40 
	    T41 T42 T43 T44 T45 T46 T47 T48 T49 T50 
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
	set md5body [string map $map $md5body]
	

	# Finally, define the proc
	proc md5 {msg} $md5body

	# unset auxiliary variables
	unset md5body tName tVal map i
    }

    proc ::md5::byte0 {i} {expr {0xff & $i}}
    proc ::md5::byte1 {i} {expr {(0xff00 & $i) >> 8}}
    proc ::md5::byte2 {i} {expr {(0xff0000 & $i) >> 16}}
    proc ::md5::byte3 {i} {expr {((0xff000000 & $i) >> 24) & 0xff}}








|







401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
	set md5body [string map $map $md5body]
	

	# Finally, define the proc
	proc md5 {msg} $md5body

	# unset auxiliary variables
	unset md5body tName tVal map
    }

    proc ::md5::byte0 {i} {expr {0xff & $i}}
    proc ::md5::byte1 {i} {expr {(0xff00 & $i) >> 8}}
    proc ::md5::byte2 {i} {expr {(0xff0000 & $i) >> 16}}
    proc ::md5::byte3 {i} {expr {((0xff000000 & $i) >> 24) & 0xff}}

450
451
452
453
454
455
456
457
	append k_opad [binary format H* [md5 $k_ipad]]

	# Perform outer md5
	md5 $k_opad
    }
}

package provide md5 1.4.5







|
447
448
449
450
451
452
453
454
	append k_opad [binary format H* [md5 $k_ipad]]

	# Perform outer md5
	md5 $k_opad
    }
}

package provide md5 1.4.4

Added modules/md5/md5tcc.tcl.









































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
# md5tcc.tcl - 
#
# Wrapper for RSA's Message Digest in C
#
# Written by Jean-Claude Wippler <jcw@equi4.com>
# Adapted for tcc by Mark Janssen
#

package require tcc4tcl;                 # needs tcc4tcl
package provide md5tcc 0.0.1;              # 

namespace eval ::md5 {
  set handle [tcc4tcl::new]
 
  set source_dir [file dirname [info script]] 
  $handle add_include_path $source_dir
  $handle ccode {#include "md5.c"}

  $handle ccommand md5tcc_final {dummy ip objc objv} {
      MD5_CTX *mp;
      unsigned char *data;
      unsigned char buf[16];
      int size;
      Tcl_Obj *obj;
      if (objc != 2) {
        Tcl_WrongNumArgs(ip, 1, objv, "context");
        return TCL_ERROR;
      }
      obj = objv[1];
      mp = (MD5_CTX *) Tcl_GetByteArrayFromObj(obj,NULL);
      MD5Final(buf, mp);
      size = sizeof buf;
      Tcl_SetObjResult(ip, Tcl_NewByteArrayObj(buf,size));
      return TCL_OK;

  }
  $handle ccommand md5tcc {dummy ip objc objv} {
      MD5_CTX *mp;
      unsigned char *data;
      int size;
      Tcl_Obj *obj;

      if (objc < 2 || objc > 3) {
        Tcl_WrongNumArgs(ip, 1, objv, "data ?context?");
        return TCL_ERROR;
      }

      if (objc == 3) {
        obj = objv[2];
        if (Tcl_IsShared(obj)) {
          obj = Tcl_DuplicateObj(obj);
        }
      } else {
        obj = Tcl_NewByteArrayObj(NULL, sizeof *mp);
        mp = (MD5_CTX *) Tcl_GetByteArrayFromObj(obj,NULL);
        MD5Init(mp);
      }

      mp = (MD5_CTX *) Tcl_GetByteArrayFromObj(obj,NULL);
      data = Tcl_GetByteArrayFromObj(objv[1], &size);
      Tcl_InvalidateStringRep(obj);
      MD5Update(mp, data, size);
      Tcl_SetObjResult(ip, obj);
      return TCL_OK;
    }

  $handle go
}

Changes to modules/md5/md5x.tcl.

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.2;                # tcl minimum version

namespace eval ::md5 {
    variable  accel
    array set accel {critcl 0 cryptkit 0 trf 0}

    namespace export md5 hmac MD5Init MD5Update MD5Final

    variable uid
    if {![info exists uid]} {
        set uid 0
    }







|







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------

package require Tcl 8.2;                # tcl minimum version

namespace eval ::md5 {
    variable  accel
    array set accel {tcc 0 critcl 0 cryptkit 0 trf 0}

    namespace export md5 hmac MD5Init MD5Update MD5Final

    variable uid
    if {![info exists uid]} {
        set uid 0
    }
81
82
83
84
85
86
87





88

89
90
91
92
93
94
95
96
#
#   If we have a C-based implementation available, then we will use
#   it here in preference to the pure-Tcl implementation.
#
proc ::md5::MD5Update {token data} {
    variable accel
    upvar #0 $token state







    if {$accel(critcl)} {
        if {[info exists state(md5c)]} {
            set state(md5c) [md5c $data $state(md5c)]
        } else {
            set state(md5c) [md5c $data]
        }
        return
    } elseif {[info exists state(ckctx)]} {







>
>
>
>
>
|
>
|







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#
#   If we have a C-based implementation available, then we will use
#   it here in preference to the pure-Tcl implementation.
#
proc ::md5::MD5Update {token data} {
    variable accel
    upvar #0 $token state
    if {$accel(tcc)} {
        if {[info exists state(md5tcc)]} {
            set state(md5tcc) [md5tcc $data $state(md5tcc)]
        } else {
            set state(md5tcc) [md5tcc $data]
        }
        return
    } elseif {$accel(critcl)} {
        if {[info exists state(md5c)]} {
            set state(md5c) [md5c $data $state(md5c)]
        } else {
            set state(md5c) [md5c $data]
        }
        return
    } elseif {[info exists state(ckctx)]} {
126
127
128
129
130
131
132
133




134
135
136
137
138
139
140
#
#    Note that the output is 128 bits represented as binary data.
#
proc ::md5::MD5Final {token} {
    upvar #0 $token state

    # Check for either of the C-compiled versions.
    if {[info exists state(md5c)]} {




        set r $state(md5c)
        unset state
        return $r
    } elseif {[info exists state(ckctx)]} {
        cryptkit::cryptEncrypt $state(ckctx) ""
        cryptkit::cryptGetAttributeString $state(ckctx) \
            CRYPT_CTXINFO_HASHVALUE r 16







|
>
>
>
>







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#
#    Note that the output is 128 bits represented as binary data.
#
proc ::md5::MD5Final {token} {
    upvar #0 $token state

    # Check for either of the C-compiled versions.
    if {[info exists state(md5tcc)]} {
      set r [md5::md5tcc_final $state(md5tcc)]
      unset state
      return $r
    } elseif {[info exists state(md5c)]} {
        set r $state(md5c)
        unset state
        return $r
    } elseif {[info exists state(ckctx)]} {
        cryptkit::cryptEncrypt $state(ckctx) ""
        cryptkit::cryptGetAttributeString $state(ckctx) \
            CRYPT_CTXINFO_HASHVALUE r 16
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
    set pad [expr {56 - ($len % 64)}]
    if {$len % 64 > 56} {
        incr pad 64
    }
    if {$pad == 0} {
        incr pad 64
    }

    #puts "P $pad|bits=[expr {8 * $state(n)}]"

    append state(i) [binary format a$pad \x80]

    # RFC1321:3.2 - Append length in bits as little-endian wide int.
    append state(i) [binary format ii [expr {8 * $state(n)}] 0]

    #puts DATA=[Hex $state(i)]([string length $state(i)])

    # Calculate the hash for the remaining block.
    set len [string length $state(i)]
    for {set n 0} {($n + 64) <= $len} {} {
        MD5Hash $token [string range $state(i) $n [incr n 64]]
    }

    #puts md5-post__________________________________________
    #parray ::${token}

    # RFC1321:3.5 - Output
    set r [bytes $state(A)][bytes $state(B)][bytes $state(C)][bytes $state(D)]
    unset state

    #puts HASH=[Hex $r]
    return $r
}

# -------------------------------------------------------------------------
# HMAC Hashed Message Authentication (RFC 2104)
#
# hmac = H(K xor opad, H(K xor ipad, text))







<
<
<





<
<






<
<
<



<
<







167
168
169
170
171
172
173



174
175
176
177
178


179
180
181
182
183
184



185
186
187


188
189
190
191
192
193
194
    set pad [expr {56 - ($len % 64)}]
    if {$len % 64 > 56} {
        incr pad 64
    }
    if {$pad == 0} {
        incr pad 64
    }



    append state(i) [binary format a$pad \x80]

    # RFC1321:3.2 - Append length in bits as little-endian wide int.
    append state(i) [binary format ii [expr {8 * $state(n)}] 0]



    # Calculate the hash for the remaining block.
    set len [string length $state(i)]
    for {set n 0} {($n + 64) <= $len} {} {
        MD5Hash $token [string range $state(i) $n [incr n 64]]
    }




    # RFC1321:3.5 - Output
    set r [bytes $state(A)][bytes $state(B)][bytes $state(C)][bytes $state(D)]
    unset state


    return $r
}

# -------------------------------------------------------------------------
# HMAC Hashed Message Authentication (RFC 2104)
#
# hmac = H(K xor opad, H(K xor ipad, text))
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
#  This function body is substituted later on to inline some of the 
#  procedures and to make is a bit more comprehensible.
#
set ::md5::MD5Hash_body {
    variable $token
    upvar 0 $token state

    #puts TR__=[Hex $msg]([string length $msg])

    # RFC1321:3.4 - Process Message in 16-Word Blocks
    binary scan $msg i* blocks
    foreach {X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15} $blocks {
        #puts BL

        set A $state(A)
        set B $state(B)
        set C $state(C)
        set D $state(D)

        # Round 1
        # Let [abcd k s i] denote the operation







<
<



<
<







264
265
266
267
268
269
270


271
272
273


274
275
276
277
278
279
280
#  This function body is substituted later on to inline some of the 
#  procedures and to make is a bit more comprehensible.
#
set ::md5::MD5Hash_body {
    variable $token
    upvar 0 $token state



    # RFC1321:3.4 - Process Message in 16-Word Blocks
    binary scan $msg i* blocks
    foreach {X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15} $blocks {


        set A $state(A)
        set B $state(B)
        set C $state(C)
        set D $state(D)

        # Round 1
        # Let [abcd k s i] denote the operation
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
    $::md5::MD5Hash_body \
    {(\2 ^ (\1 | (~\3)))} \
    ::md5::MD5Hash_body


# RFC 1321:3.4 step 4: inline the set of constant modifiers.
namespace eval md5 {
    variable tName
    variable tVal
    variable map
    foreach tName {
        T01 T02 T03 T04 T05 T06 T07 T08 T09 T10 
        T11 T12 T13 T14 T15 T16 T17 T18 T19 T20 
        T21 T22 T23 T24 T25 T26 T27 T28 T29 T30 
        T31 T32 T33 T34 T35 T36 T37 T38 T39 T40 
        T41 T42 T43 T44 T45 T46 T47 T48 T49 T50 
        T51 T52 T53 T54 T55 T56 T57 T58 T59 T60 







<
<
<







460
461
462
463
464
465
466



467
468
469
470
471
472
473
    $::md5::MD5Hash_body \
    {(\2 ^ (\1 | (~\3)))} \
    ::md5::MD5Hash_body


# RFC 1321:3.4 step 4: inline the set of constant modifiers.
namespace eval md5 {



    foreach tName {
        T01 T02 T03 T04 T05 T06 T07 T08 T09 T10 
        T11 T12 T13 T14 T15 T16 T17 T18 T19 T20 
        T21 T22 T23 T24 T25 T26 T27 T28 T29 T30 
        T31 T32 T33 T34 T35 T36 T37 T38 T39 T40 
        T41 T42 T43 T44 T45 T46 T47 T48 T49 T50 
        T51 T52 T53 T54 T55 T56 T57 T58 T59 T60 
531
532
533
534
535
536
537






538
539
540
541
542
543
544
#	this should not be called, but the test package manipulates the
#	list of enabled accelerators.
#
proc ::md5::LoadAccelerator {name} {
    variable accel
    set r 0
    switch -exact -- $name {






        critcl {
            if {![catch {package require tcllibc}]
                || ![catch {package require md5c}]} {
                set r [expr {[info commands ::md5::md5c] != {}}]
            }
        }
        cryptkit {







>
>
>
>
>
>







524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
#	this should not be called, but the test package manipulates the
#	list of enabled accelerators.
#
proc ::md5::LoadAccelerator {name} {
    variable accel
    set r 0
    switch -exact -- $name {
        tcc {
            if {![catch {package require tcc4tcl}] &&
                ! [catch {package require md5tcc}]} {
                set r [expr {[info commands ::md5::md5tcc] != {}}]
            }
        }
        critcl {
            if {![catch {package require tcllibc}]
                || ![catch {package require md5c}]} {
                set r [expr {[info commands ::md5::md5c] != {}}]
            }
        }
        cryptkit {
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
    if {$opts(-channel) == {}} {

        if {[llength $args] != 1} {
            return -code error "wrong # args:\
                should be \"md5 ?-hex? -filename file | string\""
        }
        set tok [MD5Init]

        #puts md5_______________________________________________
        #parray ::${tok}

        #puts IN=(([lindex $args 0]))
        MD5Update $tok [lindex $args 0]

        #puts md5-final_________________________________________
        #parray ::${tok}

        set r [MD5Final $tok]

    } else {

        set tok [MD5Init]
        # FRINK: nocheck
        set [subst $tok](reading) 1







<
<
<
<
<

<
<
<
<







614
615
616
617
618
619
620





621




622
623
624
625
626
627
628
    if {$opts(-channel) == {}} {

        if {[llength $args] != 1} {
            return -code error "wrong # args:\
                should be \"md5 ?-hex? -filename file | string\""
        }
        set tok [MD5Init]





        MD5Update $tok [lindex $args 0]




        set r [MD5Final $tok]

    } else {

        set tok [MD5Init]
        # FRINK: nocheck
        set [subst $tok](reading) 1
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::md5 {
    variable e
    foreach  e {critcl cryptkit trf} { if {[LoadAccelerator $e]} { break } }
    unset    e
}

package provide md5 2.0.8

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:









|



|








710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
}

# -------------------------------------------------------------------------

# Try and load a compiled extension to help.
namespace eval ::md5 {
    variable e
    foreach  e {tcc critcl cryptkit trf} { if {[LoadAccelerator $e]} { break } }
    unset    e
}

package provide md5 2.0.7

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:


Changes to modules/md5/md5x.test.

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
    "F96B697D7CB7938D525A2F31AAF161D0"
    5    "abcdefghijklmnopqrstuvwxyz"
    "C3FCD3D76192E4007DFB496CCA67E13B"
    6    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
    "D174AB98D277D9F5A5611C2C9F419D9F"
    7    "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
    "57EDF4A22BE3C955AC49DA2E2107B67A"
    8    "a\$apr1\$a"
    "020C3DD6931F7E94ECC99A1F4E4C53E2"
}
foreach impl [implementations] {
    select_implementation $impl
    foreach {n msg expected} $tests {
        test md5-v2-$impl-2.$n "md5 ($impl impl)" {
            list [catch {::md5::md5 -hex -- $msg} msg] $msg
        } [list 0 $expected]







<
|







93
94
95
96
97
98
99

100
101
102
103
104
105
106
107
    "F96B697D7CB7938D525A2F31AAF161D0"
    5    "abcdefghijklmnopqrstuvwxyz"
    "C3FCD3D76192E4007DFB496CCA67E13B"
    6    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
    "D174AB98D277D9F5A5611C2C9F419D9F"
    7    "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
    "57EDF4A22BE3C955AC49DA2E2107B67A"

    8    "a\$apr1\$a" "020C3DD6931F7E94ECC99A1F4E4C53E2"
}
foreach impl [implementations] {
    select_implementation $impl
    foreach {n msg expected} $tests {
        test md5-v2-$impl-2.$n "md5 ($impl impl)" {
            list [catch {::md5::md5 -hex -- $msg} msg] $msg
        } [list 0 $expected]

Changes to modules/md5/pkgIndex.tcl.

1
2
3

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded md5 2.0.8 [list source [file join $dir md5x.tcl]]
package ifneeded md5 1.4.5 [list source [file join $dir md5.tcl]]


|
|
>
1
2
3
4
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded md5 2.0.7 [list source [file join $dir md5x.tcl]]
package ifneeded md5 1.4.4 [list source [file join $dir md5.tcl]]
package ifneeded md5tcc 0.0.1 [list source [file join $dir md5tcc.tcl]]

Changes to modules/md5crypt/md5crypt.man.

77
78
79
80
81
82
83
84
85

[example {
% md5crypt::md5crypt password [md5crypt::salt]
$1$dFmvyRmO$T.V3OmzqeEf3hqJp2WFcb.
}]

[vset CATEGORY md5crypt]
[include ../common-text/feedback.inc]
[manpage_end]







|

77
78
79
80
81
82
83
84
85

[example {
% md5crypt::md5crypt password [md5crypt::salt]
$1$dFmvyRmO$T.V3OmzqeEf3hqJp2WFcb.
}]

[vset CATEGORY md5crypt]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Added modules/mime/badmail1.txt.





















>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
Date: Tue, 10 Jun 2003 10:32:05 +0200
Message-Id: <200306100832.h5A8W5S16670@hmif.hellmann.pol.pl>
From: Magnus Fisch <magnus.fisch@giant-polska.com.pl>
Subject:  Meeting tomorrow
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------CSFNU9QKPGZL79"
Bcc:

------------CSFNU9QKPGZL79--

Added modules/mime/badmail2.txt.































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
From: "Kelsey " <irnmh5828ooem@yahoo.com>
To: "gdylgzCsurvd1lw" <davidw@dedasys.com>
Date: Fri, 28 Feb 2003 03:12:35 -0500
Subject: no subject   gdylgzCsurvd1lw
MIME-Version: 1.0
Content-Type: multipart/related;
  boundary="----=_NextPart_000_0000_2CBA2CBA.150C56D2"
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-Spam-Rating: icarus.apache.org 1.6.2 0/1000/N
Lines: 19
Xref: localhost private-mail:14167

------=_NextPart_000_0000_2CBA2CBA.150C56D2
Content-Type: text/html;
Content-Transfer-Encoding: base64

PCEtLTE1MTQ3LS0+PGJvZHk+DQpJdCdzIG1lIEplPCEtLTI5MDY0LS0+bm5pZmVyLDxicj4g
SSBqdXN0IHdhbjwhLS0xOTE0OS0tPnRlZCB0byBzZW5kIHlvdSB0aGF0IHBpYyB5b3UgYXNr
ZTwhLS0xNTAxMC0tPmQgZm9yIHRoZSBvdDwhLS0yNjUxMi0tPmhlcg0KZGF5LiA8YnI+IDxh
IGhyZWY9Imh0dHA6Ly93d3cuaG90aG9zdC5iei9hYmMvamVubmlmZXIvP1JJRD1jaW5nd2Yi
PkNsaTwhLS0yNzE1My0tPmNrDQpIPCEtLTI2NjcwLS0+ZXJlIHRvIGNhdDwhLS03NDg5LS0+
Y2ggbWUgb24gbXkgd2ViPCEtLTI0ODExLS0+Y2FtICYgc2VlIG1vcmUgcGljcyBvZiBtZS48
L2E+IDxicj48YnI+DQo8YSBocmVmPSJodHRwOi8vd3d3LmhvdGhvc3QuYnovYWJjL2plbm5p
ZmVyLz9SSUQ9Y2luZ3dmIj48aW1nIHNyYz0iaHR0cDovLzIwNy40NC4xODMuMjU0L2FiYy9q
ZW5uaWZlci93b29ob28uanBnIiBib3JkZXI9IjAiPjwvYT4NCjxicj48YnI+PGk+LSB4bzwh
LS0yMzQwMi0tPnhvIEplbm5pZmVyPC9pPjwvcD48YnI+PGJyPjxicj48YnI+PGJyPjxicj48
YnI+PGJyPjxicj48YnI+PGJyPjxicj48YnI+PGJyPjxicj48YnI+PGJyPjxicj48YnI+PGJy
Pjxicj48YnI+PGJyPjxicj48YnI+PGJyPjxicj48YnI+PGJyPjxicj48YnI+DQo8L2JvZHk+



Changes to modules/mime/mime.man.

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
[vset VERSION 1.6.3]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin mime n [vset VERSION]]
[see_also ftp]
[see_also http]
[see_also pop3]
[see_also smtp]
[keywords email]
[keywords internet]
[keywords mail]
[keywords mime]
[keywords net]
[keywords {rfc 821}]
[keywords {rfc 822}]
[keywords {rfc 2045}]
[keywords {rfc 2046}]
[keywords {rfc 2049}]
[keywords smtp]
[copyright {1999-2000 Marshall T. Rose}]
[moddesc   {Mime}]
[titledesc {Manipulation of MIME body parts}]
[category  {Text processing}]
[require Tcl 8.5]
[require mime [opt [vset VERSION]]]
[description]
[para]

The [package mime] library package provides the commands to create and
manipulate MIME body parts.

[list_begin definitions]
<

|




















|








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

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin mime n 1.6]
[see_also ftp]
[see_also http]
[see_also pop3]
[see_also smtp]
[keywords email]
[keywords internet]
[keywords mail]
[keywords mime]
[keywords net]
[keywords {rfc 821}]
[keywords {rfc 822}]
[keywords {rfc 2045}]
[keywords {rfc 2046}]
[keywords {rfc 2049}]
[keywords smtp]
[copyright {1999-2000 Marshall T. Rose}]
[moddesc   {Mime}]
[titledesc {Manipulation of MIME body parts}]
[category  {Text processing}]
[require Tcl 8.5]
[require mime [opt 1.6]]
[description]
[para]

The [package mime] library package provides the commands to create and
manipulate MIME body parts.

[list_begin definitions]
398
399
400
401
402
403
404
405
406
[para]

See [uri {/tktview?name=447037} {Ticket 447037}] for additional information.

[list_end]

[vset CATEGORY mime]
[include ../common-text/feedback.inc]
[manpage_end]







|

397
398
399
400
401
402
403
404
405
[para]

See [uri {/tktview?name=447037} {Ticket 447037}] for additional information.

[list_end]

[vset CATEGORY mime]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/mime/mime.tcl.

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
# Influenced by Borenstein's/Rose's safe-tcl (circa 1993) and Darren New's
# unpublished package of 1999.
#

# new string features and inline scan are used, requiring 8.3.
package require Tcl 8.5

package provide mime 1.6.3

if {[catch {package require Trf 2.0}]} {

    # Fall-back to tcl-based procedures of base64 and quoted-printable
    # encoders
    ##
    # Warning!
    ##
    # These are a fragile emulations of the more general calling
    # sequence that appears to work with this code here.
    ##
    # The `__ignored__` arguments are expected to be `--` options on
    # the caller's side. (See the uses in `copymessageaux`,
    # `buildmessageaux`, `parsepart`, and `getbody`).

    package require base64 2.0
    set ::major [lindex [split [package require md5] .] 0]

    # Create these commands in the mime namespace so that they
    # won't collide with things at the global namespace level

    namespace eval ::mime {
        proc base64 {-mode what __ignored__ chunk} {
            return [base64::$what $chunk]
        }
        proc quoted-printable {-mode what __ignored__ chunk} {
            return [mime::qp_$what $chunk]
        }

        if {$::major < 2} {
            # md5 v1, result is hex string ready for use.
            proc md5 {__ignored__ string} {
                return [md5::md5 $string]
            }
        } else {
            # md5 v2, need option to get hex string
            proc md5 {__ignored__ string} {
                return [md5::md5 -hex $string]
            }
        }
    }

    unset ::major
}







|



|
<
<

<
|
|
<
<
<
<








|


|





|




|







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
# Influenced by Borenstein's/Rose's safe-tcl (circa 1993) and Darren New's
# unpublished package of 1999.
#

# new string features and inline scan are used, requiring 8.3.
package require Tcl 8.5

package provide mime 1.6

if {[catch {package require Trf 2.0}]} {

    # Fall-back to tcl-based procedures of base64 and quoted-printable encoders


    # Warning!

    # These are a fragile emulations of the more general calling sequence
    # that appears to work with this code here.





    package require base64 2.0
    set ::major [lindex [split [package require md5] .] 0]

    # Create these commands in the mime namespace so that they
    # won't collide with things at the global namespace level

    namespace eval ::mime {
        proc base64 {-mode what -- chunk} {
            return [base64::$what $chunk]
        }
        proc quoted-printable {-mode what -- chunk} {
            return [mime::qp_$what $chunk]
        }

        if {$::major < 2} {
            # md5 v1, result is hex string ready for use.
            proc md5 {-- string} {
                return [md5::md5 $string]
            }
        } else {
            # md5 v2, need option to get hex string
            proc md5 {-- string} {
                return [md5::md5 -hex $string]
            }
        }
    }

    unset ::major
}
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
        shiftjis MS_Kanji
        utf-8 UTF8
    }

    namespace export initialize finalize getproperty \
                     getheader setheader \
                     getbody \
                     buildmessage copymessage \
                     mapencoding \
                     reversemapencoding \
                     parseaddress \
                     parsedatetime \
                     uniqueID
}








|







326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
        shiftjis MS_Kanji
        utf-8 UTF8
    }

    namespace export initialize finalize getproperty \
                     getheader setheader \
                     getbody \
                     copymessage \
                     mapencoding \
                     reversemapencoding \
                     parseaddress \
                     parsedatetime \
                     uniqueID
}

382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
    variable mime

    set token [namespace current]::[incr mime(uid)]
    # FRINK: nocheck
    variable $token
    upvar 0 $token state

    if {[catch {
	mime::initializeaux $token {*}$args
    } result eopts]} {
        catch {mime::finalize $token -subordinates dynamic}
        return -options $eopts $result
    }
    return $token
}

# ::mime::initializeaux --







<
|
<







375
376
377
378
379
380
381

382

383
384
385
386
387
388
389
    variable mime

    set token [namespace current]::[incr mime(uid)]
    # FRINK: nocheck
    variable $token
    upvar 0 $token state


    if {[catch {{*}[list mime::initializeaux $token {*}$args]} result eopts]} {

        catch {mime::finalize $token -subordinates dynamic}
        return -options $eopts $result
    }
    return $token
}

# ::mime::initializeaux --
663
664
665
666
667
668
669

670
671
672
673
674
675
676
677
678
679
680

681
682
683
684
685
686
687
688
689
690
691
692
693
        if {$fileP} {
            if {($pos > $last) || ([set x [gets $state(fd) line]] <= 0)} {
                set blankP 1
            } else {
                incr pos [expr {$x + 1}]
            }
        } else {

	    if {$state(lines.current) >= $state(lines.count)} {
		set blankP 1
		set line {}
	    } else {
		set line [lindex $state(lines) $state(lines.current)]
		incr state(lines.current)
		set x [string length $line]
		if {$x == 0} {set blankP 1}
	    }
        }


	if {(!$blankP) && ([string last \r $line] == ($x - 1))} {
	    set line [string range $line 0 [expr {$x - 2}]]
	    if {$x == 1} {
		set blankP 1
	    }
	}

        if {(!$blankP) && (([
            string first { } $line] == 0) || ([
            string first \t $line] == 0))} {
            append vline \n $line
            continue
        }







>
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|







654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
        if {$fileP} {
            if {($pos > $last) || ([set x [gets $state(fd) line]] <= 0)} {
                set blankP 1
            } else {
                incr pos [expr {$x + 1}]
            }
        } else {

        if {$state(lines.current) >= $state(lines.count)} {
            set blankP 1
            set line {}
        } else {
            set line [lindex $state(lines) $state(lines.current)]
            incr state(lines.current)
            set x [string length $line]
            if {$x == 0} {set blankP 1}
        }

        }

         if {(!$blankP) && ([string last \r $line] == {$x - 1})} {
             set line [string range $line 0 [expr {$x - 2}]]
             if {$x == 1} {
                 set blankP 1
             }
         }

        if {(!$blankP) && (([
            string first { } $line] == 0) || ([
            string first \t $line] == 0))} {
            append vline \n $line
            continue
        }
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
                    # the boundary delimiter line rather than part of
                    # the preceding part.
                    #
                    # - The above means that the CRLF before $boundary
                    #   is needed per the RFC, and the parts must not
                    #   have a closing CRLF of their own. See Tcllib bug
                    #   1213527, and patch 1254934 for the problems when
                    #   both file/string branches added CRLF after the
                    #   body parts.

                    foreach part $state(parts) {
                        append result "\r\n--$boundary\r\n"
                        append result [buildmessage $part]
                    }
                    append result "\r\n--$boundary--\r\n"







|







2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
                    # the boundary delimiter line rather than part of
                    # the preceding part.
                    #
                    # - The above means that the CRLF before $boundary
                    #   is needed per the RFC, and the parts must not
                    #   have a closing CRLF of their own. See Tcllib bug
                    #   1213527, and patch 1254934 for the problems when
                    #   both file/string brnaches added CRLF after the
                    #   body parts.

                    foreach part $state(parts) {
                        append result "\r\n--$boundary\r\n"
                        append result [buildmessage $part]
                    }
                    append result "\r\n--$boundary--\r\n"
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
}

# ::mime::qp_decode --
#
#    Tcl version of quote-printable decode
#
# Arguments:
#    string        The quoted-printable string to decode.
#       encoded_word  Boolean value to determine whether or not encoded words
#                     (RFC 2047) should be handled or not. (optional)
#
# Results:
#    The decoded string is returned.

proc ::mime::qp_decode {string {encoded_word 0}} {







|







2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
}

# ::mime::qp_decode --
#
#    Tcl version of quote-printable decode
#
# Arguments:
#    string        The quoted-prinatble string to decode.
#       encoded_word  Boolean value to determine whether or not encoded words
#                     (RFC 2047) should be handled or not. (optional)
#
# Results:
#    The decoded string is returned.

proc ::mime::qp_decode {string {encoded_word 0}} {

Changes to modules/mime/mime.test.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# mime.test - Test suite for TclMIME                     -*- tcl -*-
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2000 by Ajuba Solutions
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# mime.test - Test suite for TclMIME                     -*- tcl -*-
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2000 by Ajuba Solutions
# All rights reserved.
#
# RCS: @(#) $Id: mime.test,v 1.31 2012/02/23 17:35:17 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

163
164
165
166
167
168
169
170


171
172
173
174
175
176
177
178
179
180

181
182
183
184
185
186
187
    list $err3 $err3a
} "foo {MIME-Version: 1.0\r
Content-Type: text/plain\r
\r
foo}"

test mime-3.7 {Test mime with a bad email [SF Bug 631314 ]} {
    set tok [mime::initialize -file [asset badmail1.txt]]


    set res {}
    set ctok [lindex [mime::getproperty $tok parts] 0]
    lappend res [dictsort [mime::getproperty $tok]]
    lappend res [dictsort [mime::getproperty $ctok]]
    mime::finalize $tok
    string map [list $ctok CHILD] $res
} {{content multipart/mixed encoding {} params {boundary ----------CSFNU9QKPGZL79} parts CHILD size 0} {content application/octet-stream encoding {} params {charset us-ascii} size 0}}

test mime-3.8 {Test mime with another bad email [SF Bug 631314 ]} {
    set tok [mime::initialize -file [asset badmail2.txt]]

    set res {}
    set ctok [lindex [mime::getproperty $tok parts] 0]
    lappend res [dictsort [mime::getproperty $tok]]
    lappend res [dictsort [mime::getproperty $ctok]]
    mime::finalize $tok
    string map [list $ctok CHILD] $res
} {{content multipart/related encoding {} params {boundary ----=_NextPart_000_0000_2CBA2CBA.150C56D2} parts CHILD size 659} {content application/octet-stream encoding base64 params {} size 659}}







|
>
>









|
>







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
    list $err3 $err3a
} "foo {MIME-Version: 1.0\r
Content-Type: text/plain\r
\r
foo}"

test mime-3.7 {Test mime with a bad email [SF Bug 631314 ]} {
    set tok [mime::initialize -file \
		 [file join $tcltest::testsDirectory badmail1.txt]]

    set res {}
    set ctok [lindex [mime::getproperty $tok parts] 0]
    lappend res [dictsort [mime::getproperty $tok]]
    lappend res [dictsort [mime::getproperty $ctok]]
    mime::finalize $tok
    string map [list $ctok CHILD] $res
} {{content multipart/mixed encoding {} params {boundary ----------CSFNU9QKPGZL79} parts CHILD size 0} {content application/octet-stream encoding {} params {charset us-ascii} size 0}}

test mime-3.8 {Test mime with another bad email [SF Bug 631314 ]} {
    set tok [mime::initialize -file \
		 [file join $tcltest::testsDirectory badmail2.txt]]
    set res {}
    set ctok [lindex [mime::getproperty $tok parts] 0]
    lappend res [dictsort [mime::getproperty $tok]]
    lappend res [dictsort [mime::getproperty $ctok]]
    mime::finalize $tok
    string map [list $ctok CHILD] $res
} {{content multipart/related encoding {} params {boundary ----=_NextPart_000_0000_2CBA2CBA.150C56D2} parts CHILD size 659} {content application/octet-stream encoding base64 params {} size 659}}
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
ZApEaWFnbm9zdGljLUNvZGU6IHNtdHA7IDU1MCAjNS4xLjAgQWRkcmVzcyByZWplY3RlZC4KUmVt
b3RlLU1UQTogNTMuMjQuMjgyLjE1MA==
}]
    set parts [mime::getproperty $token parts]
    mime::getheader [lindex $parts end] Remote-MTA
} 53.24.282.150

# -------------------------------------------------------------------------

test mime-12.1 {Fossil ticket 57909d2e1c} -cleanup {
    mime::finalize $token
    unset -nocomplain token
} -body {
    set token [::mime::initialize -file [asset mail-57909d2e1c.txt]]
} -result {::mime::*} -match glob

# -------------------------------------------------------------------------

testsuiteCleanup
return







<
<
<
<
<
<
<
<
<




599
600
601
602
603
604
605









606
607
608
609
ZApEaWFnbm9zdGljLUNvZGU6IHNtdHA7IDU1MCAjNS4xLjAgQWRkcmVzcyByZWplY3RlZC4KUmVt
b3RlLU1UQTogNTMuMjQuMjgyLjE1MA==
}]
    set parts [mime::getproperty $token parts]
    mime::getheader [lindex $parts end] Remote-MTA
} 53.24.282.150










# -------------------------------------------------------------------------

testsuiteCleanup
return

Changes to modules/mime/pkgIndex.tcl.

1
2
3
4
if {![package vsatisfies [package provide Tcl] 8.3]} {return}
package ifneeded smtp 1.5 [list source [file join $dir smtp.tcl]]
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded mime 1.6.3 [list source [file join $dir mime.tcl]]

|

|
1
2
3
4
if {![package vsatisfies [package provide Tcl] 8.3]} {return}
package ifneeded smtp 1.4.5 [list source [file join $dir smtp.tcl]]
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded mime 1.6 [list source [file join $dir mime.tcl]]

Changes to modules/mime/smtp.man.

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
[vset VERSION 1.5]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin smtp n [vset VERSION]]
[see_also ftp]
[see_also http]
[see_also mime]
[see_also pop3]
[copyright {1999-2000 Marshall T. Rose and others}]
[moddesc   {smtp client}]
[titledesc {Client-side tcl implementation of the smtp protocol}]
[category  Networking]
[require Tcl]
[require mime [opt 1.5.4]]
[require smtp [opt [vset VERSION]]]
[description]
[para]

The [package smtp] library package provides the client side of the
Simple Mail Transfer Protocol (SMTP) (1) (2).

[list_begin definitions]

[call [cmd ::smtp::sendmessage] [arg token] [arg option]...]

This command sends the MIME part (see package [package mime])
represented by [arg token] to an SMTP server. [arg options] is a list
of options and their associated values.  The recognized options are:

[list_begin definitions]

[def [option -servers]]

A list of SMTP servers. The default is [const localhost].

[para] If multiple servers are specified they are tried in sequence.

Note that the [option -ports] are iterated over in tandem with the
servers. If there are not enough ports for the number of servers the
default port (see below) is used. If there are more ports than servers
the superfluous ports are ignored.

[def [option -ports]]

A list of SMTP ports. The default is [const 25].

[para] See option [option -servers] above regardig the behaviour for
then multiple servers and ports are specified.

[def [option -client]]

The name to use as our hostname when connecting to the server. By
default this is either localhost if one of the servers is localhost,
or is set to the string returned by [cmd "info hostname"].

[def [option -queue]]
<

|










|




















<
<
<
<
<
<
<




<
<
<








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

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin smtp n 1.4.5]
[see_also ftp]
[see_also http]
[see_also mime]
[see_also pop3]
[copyright {1999-2000 Marshall T. Rose and others}]
[moddesc   {smtp client}]
[titledesc {Client-side tcl implementation of the smtp protocol}]
[category  Networking]
[require Tcl]
[require mime [opt 1.5.4]]
[require smtp [opt 1.4.5]]
[description]
[para]

The [package smtp] library package provides the client side of the
Simple Mail Transfer Protocol (SMTP) (1) (2).

[list_begin definitions]

[call [cmd ::smtp::sendmessage] [arg token] [arg option]...]

This command sends the MIME part (see package [package mime])
represented by [arg token] to an SMTP server. [arg options] is a list
of options and their associated values.  The recognized options are:

[list_begin definitions]

[def [option -servers]]

A list of SMTP servers. The default is [const localhost].








[def [option -ports]]

A list of SMTP ports. The default is [const 25].




[def [option -client]]

The name to use as our hostname when connecting to the server. By
default this is either localhost if one of the servers is localhost,
or is set to the string returned by [cmd "info hostname"].

[def [option -queue]]
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
value (the -header option may occur zero or more times).

[def [option -usetls]]

This package supports the RFC 3207 TLS extension (3) by default provided the
tls package is available. You can turn this off with this boolean option.

[def [option -tlsimport]]

This boolean flag is [const false] by default.

When this flag is set the package will import TLS on a sucessfully
opened channel. This is needed for connections using native TLS
negotiation instead of [const STARTTLS]. The [package tls] package
is automatically required when needed.

[def [option -tlspolicy]]

This option lets you specify a command to be called if an error occurs
during TLS setup. The command is called with the SMTP code and diagnostic
message appended. The command should return 'secure' or 'insecure' where
insecure will cause the package to continue on the unencrypted channel.
Returning 'secure' will cause the socket to be closed and the next server







<
<
<
<
<
<
<
<
<







69
70
71
72
73
74
75









76
77
78
79
80
81
82
value (the -header option may occur zero or more times).

[def [option -usetls]]

This package supports the RFC 3207 TLS extension (3) by default provided the
tls package is available. You can turn this off with this boolean option.










[def [option -tlspolicy]]

This option lets you specify a command to be called if an error occurs
during TLS setup. The command is called with the SMTP code and diagnostic
message appended. The command should return 'secure' or 'insecure' where
insecure will cause the package to continue on the unencrypted channel.
Returning 'secure' will cause the socket to be closed and the next server
199
200
201
202
203
204
205
206
207
208
209
210
    J. Myers, "SMTP Service Extension for Authentication",
    RFC 2554, March 1999.
    ([uri http://www.rfc-editor.org/rfc/rfc2554.txt])

[list_end]

[vset CATEGORY smtp]
[include ../common-text/feedback.inc]

[keywords mail mail email smtp mime tls \
     {rfc 821} {rfc 822} {rfc 2821} {rfc 3207} {rfc 2554} internet net]
[manpage_end]







|




179
180
181
182
183
184
185
186
187
188
189
190
    J. Myers, "SMTP Service Extension for Authentication",
    RFC 2554, March 1999.
    ([uri http://www.rfc-editor.org/rfc/rfc2554.txt])

[list_end]

[vset CATEGORY smtp]
[include ../doctools2base/include/feedback.inc]

[keywords mail mail email smtp mime tls \
     {rfc 821} {rfc 822} {rfc 2821} {rfc 3207} {rfc 2554} internet net]
[manpage_end]

Changes to modules/mime/smtp.tcl.

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#                          is 120 seconds.
#             -usetls      A boolean flag. If the server supports it and we
#                          have the package, use TLS to secure the connection.
#             -tlspolicy   A command to call if the TLS negotiation fails for
#                          some reason. Return 'insecure' to continue with
#                          normal SMTP or 'secure' to close the connection and
#                          try another server.
#             -tlsimport   after a succesfull socket command, import tls on
#                          channel - used for native smtps negotiation
#             -username    These are needed if your SMTP server requires
#             -password    authentication.
#
# Results:
#	Message is sent.  On success, return "".  On failure, throw an
#       exception with an error code and error message.








<
<







97
98
99
100
101
102
103


104
105
106
107
108
109
110
#                          is 120 seconds.
#             -usetls      A boolean flag. If the server supports it and we
#                          have the package, use TLS to secure the connection.
#             -tlspolicy   A command to call if the TLS negotiation fails for
#                          some reason. Return 'insecure' to continue with
#                          normal SMTP or 'secure' to close the connection and
#                          try another server.


#             -username    These are needed if your SMTP server requires
#             -password    authentication.
#
# Results:
#	Message is sent.  On success, return "".  On failure, throw an
#       exception with an error code and error message.

127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
    set originator ""
    set recipients ""
    set servers [list localhost]
    set client "" ;# default is set after options processing
    set ports [list 25]
    set tlsP 1
    set tlspolicy {}
    set tlsimport 0
    set username {}
    set password {}

    array set header ""

    # lowerL will contain the list of header keys (converted to lower case) 
    # specified with various -header options.  mixedL is the mixed-case version







<







125
126
127
128
129
130
131

132
133
134
135
136
137
138
    set originator ""
    set recipients ""
    set servers [list localhost]
    set client "" ;# default is set after options processing
    set ports [list 25]
    set tlsP 1
    set tlspolicy {}

    set username {}
    set password {}

    array set header ""

    # lowerL will contain the list of header keys (converted to lower case) 
    # specified with various -header options.  mixedL is the mixed-case version
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
    foreach {option value} $args {
        switch -- $option {
            -atleastone {set aloP   [boolean $value]}
            -debug      {set debugP [boolean $value]}
            -queue      {set queueP [boolean $value]}
            -usetls     {set tlsP   [boolean $value]}
            -tlspolicy  {set tlspolicy $value}
            -tlsimport  {set tlsimport [boolean $value]}
	    -maxsecs    {set maxsecs [expr {$value < 0 ? 0 : $value}]}
            -header {
                if {[llength $value] != 2} {
                    error "-header expects a key and a value, not $value"
                }
                set mixed [lindex $value 0]
                set lower [string tolower $mixed]







<







150
151
152
153
154
155
156

157
158
159
160
161
162
163
    foreach {option value} $args {
        switch -- $option {
            -atleastone {set aloP   [boolean $value]}
            -debug      {set debugP [boolean $value]}
            -queue      {set queueP [boolean $value]}
            -usetls     {set tlsP   [boolean $value]}
            -tlspolicy  {set tlspolicy $value}

	    -maxsecs    {set maxsecs [expr {$value < 0 ? 0 : $value}]}
            -header {
                if {[llength $value] != 2} {
                    error "-header expects a key and a value, not $value"
                }
                set mixed [lindex $value 0]
                set lower [string tolower $mixed]
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435

    # Create smtp token, which essentially means begin talking to the SMTP
    # server.
    set token [initialize -debug $debugP -client $client \
		                -maxsecs $maxsecs -usetls $tlsP \
                                -multiple $bccP -queue $queueP \
                                -servers $servers -ports $ports \
                                -tlspolicy $tlspolicy -tlsimport $tlsimport \
                                -username $username -password $password]

    if {![string match "::smtp::*" $token]} {
	# An error occurred and $token contains the error info
	array set respArr $token
	return -code error $respArr(diagnostic)
    }







|







417
418
419
420
421
422
423
424
425
426
427
428
429
430
431

    # Create smtp token, which essentially means begin talking to the SMTP
    # server.
    set token [initialize -debug $debugP -client $client \
		                -maxsecs $maxsecs -usetls $tlsP \
                                -multiple $bccP -queue $queueP \
                                -servers $servers -ports $ports \
                                -tlspolicy $tlspolicy \
                                -username $username -password $password]

    if {![string match "::smtp::*" $token]} {
	# An error occurred and $token contains the error info
	array set respArr $token
	return -code error $respArr(diagnostic)
    }
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
#                          being sent should be queued for later delivery.
#             -servers     A list of mail servers that could process the
#                          request.
#             -ports       A list of ports on mail servers that could process
#                          the request (one port per server-- defaults to 25).
#             -usetls      A boolean to indicate we will use TLS if possible.
#             -tlspolicy   Command called if TLS setup fails.
#             -tlsimport   after a succesfull socket command, import tls on
#                          channel - used for native smtps negotiation
#             -username    These provide the authentication information 
#             -password    to be used if needed by the SMTP server.
#
# Results:
#	On success, return an smtp token.  On failure, throw
#       an exception with an error code and error message.








<
<







591
592
593
594
595
596
597


598
599
600
601
602
603
604
#                          being sent should be queued for later delivery.
#             -servers     A list of mail servers that could process the
#                          request.
#             -ports       A list of ports on mail servers that could process
#                          the request (one port per server-- defaults to 25).
#             -usetls      A boolean to indicate we will use TLS if possible.
#             -tlspolicy   Command called if TLS setup fails.


#             -username    These provide the authentication information 
#             -password    to be used if needed by the SMTP server.
#
# Results:
#	On success, return an smtp token.  On failure, throw
#       an exception with an error code and error message.

618
619
620
621
622
623
624
625
626
627
628
629
630
631
632

633
634
635
636



637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
    variable $token
    upvar 0 $token state

    array set state [list afterID "" options "" readable 0]
    array set options [list -debug 0 -client localhost -multiple 1 \
                            -maxsecs 120 -queue 0 -servers localhost \
                            -ports 25 -usetls 1 -tlspolicy {} \
                            -tlsimport 0 \
                            -username {} -password {}]
    array set options $args
    set state(options) [array get options]

    # Iterate through servers until one accepts a connection (and responds
    # nicely).
   

    foreach server $options(-servers) port $options(-ports) {
        if {$server == ""} continue

	set state(readable) 0



        if {$port == ""} { set port 25 }
        
        if {$options(-debug)} {
            puts stderr "Trying $server..."
            flush stderr
        }

        if {[info exists state(sd)]} {
            unset state(sd)
        }

        if {[set code [catch {
            set state(sd) [socket -async $server $port]
            if { $options(-tlsimport) } {
                package require tls
                tls::import $state(sd)
            }
            fconfigure $state(sd) -blocking off -translation binary
            fileevent $state(sd) readable [list ::smtp::readable $token]
        } result]]} {
            set ecode $errorCode
            set einfo $errorInfo

            catch { close $state(sd) }







<







>
|
<
<

>
>
>
|
|











<
<
<
<







612
613
614
615
616
617
618

619
620
621
622
623
624
625
626
627


628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644




645
646
647
648
649
650
651
    variable $token
    upvar 0 $token state

    array set state [list afterID "" options "" readable 0]
    array set options [list -debug 0 -client localhost -multiple 1 \
                            -maxsecs 120 -queue 0 -servers localhost \
                            -ports 25 -usetls 1 -tlspolicy {} \

                            -username {} -password {}]
    array set options $args
    set state(options) [array get options]

    # Iterate through servers until one accepts a connection (and responds
    # nicely).
   
    set index 0 
    foreach server $options(-servers) {


	set state(readable) 0
        if {[llength $options(-ports)] >= $index} {
            set port [lindex $options(-ports) $index]
        } else {
            set port 25
        }
        if {$options(-debug)} {
            puts stderr "Trying $server..."
            flush stderr
        }

        if {[info exists state(sd)]} {
            unset state(sd)
        }

        if {[set code [catch {
            set state(sd) [socket -async $server $port]




            fconfigure $state(sd) -blocking off -translation binary
            fileevent $state(sd) readable [list ::smtp::readable $token]
        } result]]} {
            set ecode $errorCode
            set einfo $errorInfo

            catch { close $state(sd) }
679
680
681
682
683
684
685

686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
            }
        }

        set r [initialize_ehlo $token]
        if {$r != {}} {
            return $r
        }

    }

    # None of the servers accepted our connection, so close everything up and
    # return an error.
    finalize $token -close drop

    return -code $code -errorinfo $einfo -errorcode $ecode $result
}

# If we cannot load the tls package, ignore the error
# Result value is a Tcl return code, not a bool.
# 0 == OK
proc ::smtp::load_tls {} {
    set r [catch {package require tls}]
    if {$r} {set ::errorInfo ""}
    return $r
}

proc ::smtp::initialize_ehlo {token} {







>










<
<







670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687


688
689
690
691
692
693
694
            }
        }

        set r [initialize_ehlo $token]
        if {$r != {}} {
            return $r
        }
        incr index
    }

    # None of the servers accepted our connection, so close everything up and
    # return an error.
    finalize $token -close drop

    return -code $code -errorinfo $einfo -errorcode $ecode $result
}

# If we cannot load the tls package, ignore the error


proc ::smtp::load_tls {} {
    set r [catch {package require tls}]
    if {$r} {set ::errorInfo ""}
    return $r
}

proc ::smtp::initialize_ehlo {token} {
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
        }
        
        # Support STARTTLS extension.
        # The state(tls) item is used to see if we have already tried this.
        if {($options(-usetls)) && ![info exists state(tls)] \
                && (([lsearch $response(args) STARTTLS] >= 0)
                    || ([lsearch $response(args) TLS] >= 0))} {
            if {[load_tls] == 0} {
                set state(tls) 0
                if {![catch {smtp::talk $token 300 STARTTLS} resp]} {
                    array set starttls $resp
                    if {$starttls(code) == 220} {
                        fileevent $state(sd) readable {}
                        catch {
                            ::tls::import $state(sd)
                            catch {::tls::handshake $state(sd)} msg
                            set state(tls) 1
                        } 
                        fileevent $state(sd) readable \
                            [list ::smtp::readable $token]
                        return [initialize_ehlo $token]
                    } else {
                        # Call a TLS client policy proc here
                        #  returns secure   - close and try another server.
                        #  returns insecure - continue on current socket
                        set policy insecure
                        if {$options(-tlspolicy) != {}} {
                            catch {
                                eval $options(-tlspolicy) \
                                    [list $starttls(code)] \
                                    [list $starttls(diagnostic)]
                            } policy







|















|
|







740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
        }
        
        # Support STARTTLS extension.
        # The state(tls) item is used to see if we have already tried this.
        if {($options(-usetls)) && ![info exists state(tls)] \
                && (([lsearch $response(args) STARTTLS] >= 0)
                    || ([lsearch $response(args) TLS] >= 0))} {
            if {![load_tls]} {
                set state(tls) 0
                if {![catch {smtp::talk $token 300 STARTTLS} resp]} {
                    array set starttls $resp
                    if {$starttls(code) == 220} {
                        fileevent $state(sd) readable {}
                        catch {
                            ::tls::import $state(sd)
                            catch {::tls::handshake $state(sd)} msg
                            set state(tls) 1
                        } 
                        fileevent $state(sd) readable \
                            [list ::smtp::readable $token]
                        return [initialize_ehlo $token]
                    } else {
                        # Call a TLS client policy proc here
                        #  returns secure close and try another server.
                        #  returns insecure continue on current socket
                        set policy insecure
                        if {$options(-tlspolicy) != {}} {
                            catch {
                                eval $options(-tlspolicy) \
                                    [list $starttls(code)] \
                                    [list $starttls(diagnostic)]
                            } policy
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
            error "unknown boolean value: $value"
        }
    }
}

# -------------------------------------------------------------------------

package provide smtp 1.5

# -------------------------------------------------------------------------
# Local variables:
# indent-tabs-mode: nil
# End:







|





1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
            error "unknown boolean value: $value"
        }
    }
}

# -------------------------------------------------------------------------

package provide smtp 1.4.5

# -------------------------------------------------------------------------
# Local variables:
# indent-tabs-mode: nil
# End:

Deleted modules/mime/test-assets/badmail1.txt.

1
2
3
4
5
6
7
8
9
10
Date: Tue, 10 Jun 2003 10:32:05 +0200
Message-Id: <200306100832.h5A8W5S16670@hmif.hellmann.pol.pl>
From: Magnus Fisch <magnus.fisch@giant-polska.com.pl>
Subject:  Meeting tomorrow
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------CSFNU9QKPGZL79"
Bcc:

------------CSFNU9QKPGZL79--

<
<
<
<
<
<
<
<
<
<




















Deleted modules/mime/test-assets/badmail2.txt.

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
From: "Kelsey " <irnmh5828ooem@yahoo.com>
To: "gdylgzCsurvd1lw" <davidw@dedasys.com>
Date: Fri, 28 Feb 2003 03:12:35 -0500
Subject: no subject   gdylgzCsurvd1lw
MIME-Version: 1.0
Content-Type: multipart/related;
  boundary="----=_NextPart_000_0000_2CBA2CBA.150C56D2"
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-Spam-Rating: icarus.apache.org 1.6.2 0/1000/N
Lines: 19
Xref: localhost private-mail:14167

------=_NextPart_000_0000_2CBA2CBA.150C56D2
Content-Type: text/html;
Content-Transfer-Encoding: base64

PCEtLTE1MTQ3LS0+PGJvZHk+DQpJdCdzIG1lIEplPCEtLTI5MDY0LS0+bm5pZmVyLDxicj4g
SSBqdXN0IHdhbjwhLS0xOTE0OS0tPnRlZCB0byBzZW5kIHlvdSB0aGF0IHBpYyB5b3UgYXNr
ZTwhLS0xNTAxMC0tPmQgZm9yIHRoZSBvdDwhLS0yNjUxMi0tPmhlcg0KZGF5LiA8YnI+IDxh
IGhyZWY9Imh0dHA6Ly93d3cuaG90aG9zdC5iei9hYmMvamVubmlmZXIvP1JJRD1jaW5nd2Yi
PkNsaTwhLS0yNzE1My0tPmNrDQpIPCEtLTI2NjcwLS0+ZXJlIHRvIGNhdDwhLS03NDg5LS0+
Y2ggbWUgb24gbXkgd2ViPCEtLTI0ODExLS0+Y2FtICYgc2VlIG1vcmUgcGljcyBvZiBtZS48
L2E+IDxicj48YnI+DQo8YSBocmVmPSJodHRwOi8vd3d3LmhvdGhvc3QuYnovYWJjL2plbm5p
ZmVyLz9SSUQ9Y2luZ3dmIj48aW1nIHNyYz0iaHR0cDovLzIwNy40NC4xODMuMjU0L2FiYy9q
ZW5uaWZlci93b29ob28uanBnIiBib3JkZXI9IjAiPjwvYT4NCjxicj48YnI+PGk+LSB4bzwh
LS0yMzQwMi0tPnhvIEplbm5pZmVyPC9pPjwvcD48YnI+PGJyPjxicj48YnI+PGJyPjxicj48
YnI+PGJyPjxicj48YnI+PGJyPjxicj48YnI+PGJyPjxicj48YnI+PGJyPjxicj48YnI+PGJy
Pjxicj48YnI+PGJyPjxicj48YnI+PGJyPjxicj48YnI+PGJyPjxicj48YnI+DQo8L2JvZHk+



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































Deleted modules/mime/test-assets/mail-57909d2e1c.txt.

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
MIME-Version: 1.0
Content-ID: <10177.1554980513.8@mousetrap.lan>
Content-Type: multipart/mixed;
              boundary="----- =_U9Pw/kikzJT5t8pT5pl5Pw=="

------- =_U9Pw/kikzJT5t8pT5pl5Pw==
MIME-Version: 1.0
Content-ID: <10177.1554980513.4@mousetrap.lan>
Content-Disposition: inline; filename="/model.pl"
Content-Description: Simile model
Date-Modified: 2019-04-11 11:01:36 GMT
Authentication-Code: c0c651af192d709b2757cb9ef0d8c19d
Content-Type: application/x-simile
Content-Transfer-Encoding: base64

c291cmNlKHByb2dyYW09J0FNRScsdmVyc2lvbj0gMTAuOSxlZGl0aW9uPWVudGVycHJpc2UsZGF0
KG5vbmUsaW5faGllcmFyY2h5LGRlc3QsMSldXSxbY3VydmU9Wy05LDFdXSkuCg==

------- =_U9Pw/kikzJT5t8pT5pl5Pw==
MIME-Version: 1.0
Content-ID: <10177.1554980513.5@mousetrap.lan>
Content-Disposition: attachment; filename="/model.cnv"
Content-Description: Simile canvas description
Date-Modified: 2019-04-11 11:01:36 GMT
Content-Type: application/x-simile
Content-Transfer-Encoding: base64

IyB3cml0dGVuIG9uIFRodSBBcHIgMTEgMTE6MDE6MzYgR01UIDIwMTkKTG9hZE1vZGVsTG9va3Mg
bl90aGlzIHJlYWx3aWR0aCgxMDguMCkgY3VycmVudGx5X2VkaXRhYmxlfSAtdGV4dCBmbG93MwoK


------- =_U9Pw/kikzJT5t8pT5pl5Pw==
MIME-Version: 1.0
Content-ID: <10177.1554980513.6@mousetrap.lan>
Content-Disposition: attachment; filename="/model.spj"
Content-Description: Simile package description
Date-Modified: 2019-04-11 11:01:53 GMT
Content-Type: application/x-simile
Content-Transfer-Encoding: base64

Cg==

------- =_U9Pw/kikzJT5t8pT5pl5Pw==
MIME-Version: 1.0
Content-Description: Run Status
Content-ID: <10177.1554980513.7@mousetrap.lan>
Content-Type: application/x-simile
Content-Transfer-Encoding: base64

ZXhlY1RpbWUgMTAwLjAgdGltZVVuaXQgdW5pdCBkaXNwbGF5SW50IDEgaW50TWV0aG9kIEV1bGVy
IHBoYXNlTGlzdCAwLjE=

------- =_U9Pw/kikzJT5t8pT5pl5Pw==--
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































Changes to modules/multiplexer/multiplexer.man.

122
123
124
125
126
127
128
129
130
EOF: The channel connecting us to the client, its ip-address, and its
ip-port.

[list_end]
[list_end]

[vset CATEGORY multiplexer]
[include ../common-text/feedback.inc]
[manpage_end]







|

122
123
124
125
126
127
128
129
130
EOF: The channel connecting us to the client, its ip-address, and its
ip-port.

[list_end]
[list_end]

[vset CATEGORY multiplexer]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/namespacex/namespacex.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144

145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
[vset VERSION 0.2]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin namespacex n [vset VERSION]]
[keywords {extended namespace}]
[keywords info]
[keywords {namespace unknown}]
[keywords {namespace utilities}]
[keywords {state (de)serialization}]
[keywords {unknown hooking}]
[keywords utilities]
[copyright {200? Neil Madden (http://wiki.tcl.tk/12790)}]
[copyright {200? Various (http://wiki.tcl.tk/1489)}]
[copyright {2010 Documentation, Andreas Kupries}]
[moddesc   {Namespace utility commands}]
[titledesc {Namespace utility commands}]
[require Tcl 8.5]
[require namespacex [opt [vset VERSION]]]
[description]

This package provides a number of utility commands for working with
namespaces.

The commands fall into four categories:

[list_begin enumerated]

[enum] Hook commands provide and manipulate a chain of commands which
replaces the single regular [cmd "namespace unknown"] handler.

[enum] An import command provides the ability to import any command
from another namespace.

[enum] Information commands allow querying of variables and child
namespaces.

[enum] State commands provide a means to serialize variable values in
a namespace.

[list_end]

[section Commands]

[list_begin definitions]

[call [cmd {::namespacex hook add}]  [opt [arg namespace]] [arg cmdprefix]]

Adds the [arg cmdprefix] to the chain of unknown command handlers that
are invoked when the [arg namespace] would otherwise invoke its
unknown handler.

If [arg namespace] is not specified, then [arg cmdprefix] is added to
the chain of handlers for the namespace of the caller.

[para]
The chain of [arg cmdprefix] are executed in reverse order of
addition, [emph i.e.] the most recently added [arg cmdprefix] is
executed first.

When executed, [arg cmdprefix] has additional arguments appended to it
as would any namespace unknown handler.

[call [cmd {::namespacex hook proc}] [opt [arg namespace]] \
     [arg arguments] [arg body]]

Adds an anonymous procedure to the chain of namespace unknown handlers
for the [arg namespace].

[para] If [arg namespace] is not specified, then the handler is added
to the chain of handlers for the namespace of the caller.

[para] The [arg arguments] and [arg body] are specified as for the
core [cmd proc] command.

[call [cmd {::namespacex hook on}] [opt [arg namespace]] \
     [arg guardcmdprefix] [arg actioncmdprefix]]

Adds a guarded action to the chain of namespace unknown handlers for
the [arg namespace].

[para] If [arg namespace] is not specified, then the handler is added
to the chain of handlers for the namespace of the caller.

[para] The [arg guardcmdprefix] is executed first. If it returns a
value that can be interpreted as false, then the next unknown hander
in the chain is executed. Otherwise, [arg actioncmdprefix] is executed
and the return value of the handler is the value returned by
[arg actioncmdprefix].

[para] When executed, both [arg guardcmdprefix] and
[arg actioncmdprefix] have the same additional arguments appended as
for any namespace unknown handler.

[call [cmd {::namespacex hook next}] [arg arg]...]

This command is available to namespace hooks to execute the next hook
in the chain of handlers for the namespace.

[call [cmd {::namespacex import fromns}] [arg "cmdname [opt "[arg newname] ..."]"]]

Imports the command [arg cmdname] from the [arg fromns] namespace into
the namespace of the caller.

The [arg cmdname] command is imported even if the [arg fromns] did not
originally export the command.

[para] If [arg newname] is specified, then the imported command will
be known by that name. Otherwise, the command retains is original name
as given by [arg cmdname].

[para] Additional pairs of [arg cmdname] / [arg newname] arguments may
also be specified.

[call [cmd {::namespacex info allchildren}] [arg namespace]]

Returns a list containing the names of all child namespaces in the
specified [arg namespace] and its children. The names are all fully
qualified.

[call [cmd {::namespacex info allvars}] [arg namespace]]

Returns a list containing the names of all variables in the specified
[arg namespace] and its children. The names are all given relative to
[arg namespace], and [emph not] fully qualified.

[call [cmd {::namespacex normalize}] [arg namespace]]

Returns the absolute name of [arg namespace], which is resolved
relative to the namespace of the caller, with all unneeded colon
characters removed.

[call [cmd {::namespacex info vars}] [arg namespace] [opt [arg pattern]]]

Returns a list containing the names of all variables in
the specified [arg namespace].

If the [arg pattern] argument is specified, then only variables
matching [arg pattern] are returned. Matching is determined using the
same rules as for [cmd {string match}].

[call [cmd {::namespacex state get}] [arg namespace]]

Returns a dictionary holding the names and values of all variables in
the specified [arg namespace] and its child namespaces.


[para] Note that the names are all relative to [arg namespace], and
[emph not] fully qualified.

[call [cmd {::namespacex state set}] [arg namespace] [arg dict]]

Takes a dictionary holding the names and values for a set of variables
and replaces the current state of the specified [arg namespace] and
its child namespaces with this state.

The result of the command is the empty string.

[call [cmd {::namespacex state drop}] [arg namespace]]

Unsets all variables in the specified [arg namespace] and its child
namespaces.

The result of the command is the empty string.

[call [cmd {::namespacex strip}] [arg prefix] [arg namespaces]]

Each item in [arg namespaces] must be the absolute normalized name of
a child namespace of namespace [arg prefix].

Returns the corresponding list of relative names of child namespaces.

[list_end]

[vset CATEGORY namespacex]
[include ../common-text/feedback.inc]
[manpage_end]
<

|













|





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|




<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|
|
|



|
|
|
<
<
<
<
<
<



|


<
<
<
<


|
|

>
|
|



|
|
|





|
|



<
<
<
<
<
<
<

<
<
<


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

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin namespacex n 0.1]
[keywords {extended namespace}]
[keywords info]
[keywords {namespace unknown}]
[keywords {namespace utilities}]
[keywords {state (de)serialization}]
[keywords {unknown hooking}]
[keywords utilities]
[copyright {200? Neil Madden (http://wiki.tcl.tk/12790)}]
[copyright {200? Various (http://wiki.tcl.tk/1489)}]
[copyright {2010 Documentation, Andreas Kupries}]
[moddesc   {Namespace utility commands}]
[titledesc {Namespace utility commands}]
[require Tcl 8.5]
[require namespacex [opt 0.1]]
[description]

This package provides a number of utility commands for working with
namespaces.



















[section API]

[list_begin definitions]

[call [cmd {::namespacex hook add}]  [opt [arg namespace]] [arg cmdprefix]]
















[call [cmd {::namespacex hook proc}] [opt [arg namespace]] [arg arguments] [arg body]]











[call [cmd {::namespacex hook on}]   [opt [arg namespace]] [arg guardcmdprefix] [arg actioncmdprefix]]


















[call [cmd {::namespacex hook next}] [arg arg]...]



















[call [cmd {::namespacex info allchildren}] [arg namespace]]

This command returns a list containing the names of all child
namespaces in the specified [arg namespace] and its children. The
names are all fully qualified.

[call [cmd {::namespacex info allvars}] [arg namespace]]

This command returns a list containing the names of all variables in
the specified [arg namespace] and its children. The names are all
relative to [arg namespace], and [emph not] fully qualified.







[call [cmd {::namespacex info vars}] [arg namespace] [opt [arg pattern]]]

This command returns a list containing the names of all variables in
the specified [arg namespace].





[call [cmd {::namespacex state get}] [arg namespace]]

This command returns a dictionary holding the names and values of all
variables in the specified [arg namespace] and its child namespaces.

[para]
Note that the names are all relative to [arg namespace],
and [emph not] fully qualified.

[call [cmd {::namespacex state set}] [arg namespace] [arg dict]]

This command takes a dictionary holding the names and values for a set
of variables and replaces the current state of the specified
[arg namespace] and its child namespaces with this state.

The result of the command is the empty string.

[call [cmd {::namespacex state drop}] [arg namespace]]

This command unsets all variables in the specified [arg namespace] and
its child namespaces.

The result of the command is the empty string.








[list_end]



[manpage_end]

Changes to modules/namespacex/namespacex.tcl.

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
# namespacex state - Save/restore the variable-based state of namespaces.

# # ## ### ##### ######## ############# ######################
## Requisites

package require Tcl 8.5  ; # namespace ensembles, {*}

# The try command is used in the namespacex::import command. For
# backward compatibility we will use the try package from tcllib if
# running on a platform that does not have it as a core command,
# i.e. before 8.6.

if {![llength [info commands try]]} {
    package require try ; # tcllib
}

namespace eval ::namespacex {
    namespace export add hook info import normalize strip state
    namespace ensemble create

    namespace eval hook {
	namespace export add proc on next
	namespace ensemble create

	# add - hook a command prefix into the chain of unknown handlers for a







<
<
<
<
<
<
<
<
<

|







10
11
12
13
14
15
16









17
18
19
20
21
22
23
24
25
# namespacex state - Save/restore the variable-based state of namespaces.

# # ## ### ##### ######## ############# ######################
## Requisites

package require Tcl 8.5  ; # namespace ensembles, {*}










namespace eval ::namespacex {
    namespace export add hook info state
    namespace ensemble create

    namespace eval hook {
	namespace export add proc on next
	namespace ensemble create

	# add - hook a command prefix into the chain of unknown handlers for a
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257

258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
        return -code $rc $result
    }
}

# # ## ### ##### ######## ############# ######################
## Implementation :: Info - Visible API

proc ::namespacex::import {from args} {
    set upns [uplevel 1 {::namespace current}]
    if {![string match ::* $from]} {
	set from ${upns}::$from[set from {}]
    }
    set orig [namespace eval $from {::namespace export}]
    try {
	namespace eval $from {::namespace export *}
	set tmp [::namespace current]::[::info cmdcount]
	namespace eval $tmp [list ::namespace import ${from}::*]
	if {[llength $args] == 1} {
	    lappend args [lindex $args 0]
	}
	dict size $args
	foreach {old new} $args {
	    rename ${tmp}::$old ${upns}::$new
	}
	namespace delete $tmp
    } finally {
	namespace eval $from [list ::namespace export -clear {*}$orig]
    }
    return
}

proc ::namespacex::info::allvars {ns} {
    set ns [uplevel 1 [list [namespace parent] normalize $ns]]
    ::set result [::info vars ${ns}::*]
    foreach cns [allchildren $ns] {
	lappend result {*}[::info vars ${cns}::*]
    }
    return [::namespacex::Strip $ns $result]
}

proc ::namespacex::info::allchildren {ns} {
    set ns [uplevel 1 [list [namespace parent] normalize $ns]]
    ::set result [list]
    foreach cns [::namespace children $ns] {
	lappend result {*}[allchildren $cns]
	lappend result $cns
    }
    return $result
}

proc ::namespacex::info::vars {ns {pattern *}} {
    set ns [uplevel 1 [list [namespace parent] normalize $ns]]
    return [::namespacex::Strip $ns [::info vars ${ns}::$pattern]]
}

# this implementation avoids string operations
proc ::namespacex::normalize {ns} {
    if {[uplevel 1 [list ::namespace exists $ns]]} {
	return [uplevel 1 [list namespace eval $ns {::namespace current}]]
    }
    if {![string match ::* $ns]} {
	set ns [uplevel 1 {::namespace current}]::$ns
    }
    regsub {::+} $ns :: ns
    return $ns
}

proc ::namespacex::strip {ns itemlist} {
    set ns [uplevel 1 [list [namespace current] normalize $ns]]
    set n [string length $ns]

    incr n -1
    foreach i $itemlist {
	if {[string range $i 0 $n] eq "$ns"} continue
	return -code error "Expected $ns as prefix for $i, not found"
    }
    return [Strip $ns $itemlist]
}

proc ::namespacex::Strip {ns itemlist} {
    # Assert: is-fqn (ns)
    if {![string match {::*} $ns]} { error "Expected fqn for ns" }
    
    set n [string length $ns]
    incr n 2

    set result {}
    foreach i $itemlist {
	lappend result [string range $i $n end]
    }
    return $result
}

# # ## ### ##### ######## ############# ######################
## Implementation :: State - Visible API

proc ::namespacex::state::drop {ns} {
    ::set ns [uplevel 1 [list [namespace parent] normalize $ns]]
    namespace eval $ns [list ::unset {*}[::namespacex info allvars $ns]]
    return
}

proc ::namespacex::state::get {ns} {
    ::set ns [uplevel 1 [list [namespace parent] normalize $ns]]
    ::set result {}
    foreach v [::namespacex info allvars $ns] {
	namespace upvar $ns $v value
	lappend result $v $value
    }
    return $result
}

proc ::namespacex::state::set {ns state} {
    ::set ns [uplevel 1 [list [namespace parent] normalize $ns]]
    # Inlined 'state drop'.
    namespace eval $ns [list ::unset  {*}[::namespacex info allvars $ns]]
    namespace eval $ns [list variable {*}$state]
    return
}

# # ## ### ##### ######## ############# ######################
## Ready

package provide namespacex 0.2







|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




|



|









<
|


<
|
<
<
<
<
<
<
<
<
<
<
<
<

>
|
<
<
<
|
<
<
|
<
<
<
|
<
<












|





|









|









|
179
180
181
182
183
184
185
186

187























188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205

206
207
208

209












210
211
212



213


214



215


216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
        return -code $rc $result
    }
}

# # ## ### ##### ######## ############# ######################
## Implementation :: Info - Visible API

proc ::namespacex::info::allvars {ns} {

    if {![string match {::*} $ns]} { set ns ::$ns }























    ::set result [::info vars ${ns}::*]
    foreach cns [allchildren $ns] {
	lappend result {*}[::info vars ${cns}::*]
    }
    return [Strip $ns $result]
}

proc ::namespacex::info::allchildren {ns} {
    if {![string match {::*} $ns]} { set ns ::$ns }
    ::set result [list]
    foreach cns [::namespace children $ns] {
	lappend result {*}[allchildren $cns]
	lappend result $cns
    }
    return $result
}

proc ::namespacex::info::vars {ns {pattern *}} {

    return [Strip $ns [::info vars ${ns}::$pattern]]
}


proc ::namespacex::info::Strip {ns itemlist} {












    set n [string length $ns]
    if {![string match {::*} $ns]} {
	incr n 4



    } else {


	incr n 2



    }



    set result {}
    foreach i $itemlist {
	lappend result [string range $i $n end]
    }
    return $result
}

# # ## ### ##### ######## ############# ######################
## Implementation :: State - Visible API

proc ::namespacex::state::drop {ns} {
    if {![string match {::*} $ns]} { ::set ns ::$ns }
    namespace eval $ns [list ::unset {*}[::namespacex info allvars $ns]]
    return
}

proc ::namespacex::state::get {ns} {
    if {![string match {::*} $ns]} { ::set ns ::$ns }
    ::set result {}
    foreach v [::namespacex info allvars $ns] {
	namespace upvar $ns $v value
	lappend result $v $value
    }
    return $result
}

proc ::namespacex::state::set {ns state} {
    if {![string match {::*} $ns]} { ::set ns ::$ns }
    # Inlined 'state drop'.
    namespace eval $ns [list ::unset  {*}[::namespacex info allvars $ns]]
    namespace eval $ns [list variable {*}$state]
    return
}

# # ## ### ##### ######## ############# ######################
## Ready

package provide namespacex 0.1

Changes to modules/namespacex/namespacex.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
testsNeedTcltest 2.0

testing {
    useLocal namespacex.tcl namespacex
}

# -------------------------------------------------------------------------
## helpers

proc ns_setup {{parent {}}} {
    namespace eval ${parent}::X {
        namespace eval A {}
        namespace eval B {
            namespace eval D {}
        }
        namespace eval C {}
    }
}

proc ns2_setup {{parent {}}} {
    namespace eval ${parent}::X {
        variable vXa 1
        variable vXb aleph
        namespace eval B {
            variable vB 3
        }
    }
}

proc ns3_setup {{parent {}}} {
    namespace eval ${parent}::X {
        namespace eval B {
            variable vB mjolnir
        }
    }
}

if {[package vsatisfies [package present Tcl] 8.6]} {
    # 8.6+ args => ?arg ...?
    proc E {text} { string map [list "..." "?arg ...?"] $text }
} else {
    # 8.5- args => ...
    proc E {text} { set text }
}

# -------------------------------------------------------------------------
## hook add

test namespacex-hook-add-1.0 {
    namespacex hook add: add a single hook
} -setup {
    variable hadd1 20

    proc h {args} {
        variable hadd1
        set hadd1 40
        return
    }
    namespace eval ::testHook {
        proc testProc {} {
            foo a b c
        }
    }
} -cleanup {
    namespace delete ::testHook
    rename h {}
} -body {
    namespacex hook add ::testHook [namespace code h]
    ::testHook::testProc
    return $hadd1
} -result {40}

# -------------------------------------------------------------------------
## normalize

test namespacex-normalize-1.0 {namespacex normalize, wrong\#args, not enough} -body {
    namespacex normalize
} -returnCodes error -result {wrong # args: should be "namespacex normalize ns"}

test namespacex-normalize-1.1 {namespacex normalize, wrong\#args, too many} -body {
    namespacex normalize N X
} -returnCodes error -result {wrong # args: should be "namespacex normalize ns"}

test namespacex-normalize-2.0.0 {namespacex normalize, fqn} -body {
    namespacex normalize ::X
} -result {::X}

test namespacex-normalize-2.0.1 {namespacex normalize, relative to global} -body {
    namespacex normalize X
} -result {::X}

test namespacex-normalize-2.0.2 {namespacex normalize, relative to non-global} -body {
    namespace eval ::Q {
        namespacex normalize X
    }
} -cleanup {
    namespace delete ::Q
} -result {::Q::X}

# -------------------------------------------------------------------------
## strip

test namespacex-strip-1.0 {namespacex strip, wrong\#args, not enough} -body {
    namespacex strip
} -returnCodes error -result {wrong # args: should be "namespacex strip ns itemlist"}

test namespacex-strip-1.1 {namespacex strip, wrong\#args, not enough} -body {
    namespacex strip N
} -returnCodes error -result {wrong # args: should be "namespacex strip ns itemlist"}

test namespacex-strip-1.2 {namespacex strip, wrong\#args, too many} -body {
    namespacex strip N I X
} -returnCodes error -result {wrong # args: should be "namespacex strip ns itemlist"}

test namespacex-strip-2.0 {namespacex strip, bad child, relative} -body {
    namespacex strip ::X {Q}
} -returnCodes error -result {Expected ::X as prefix for Q, not found}

test namespacex-strip-2.1 {namespacex strip, bad child, absolute} -body {
    namespacex strip ::X {::Q}
} -returnCodes error -result {Expected ::X as prefix for ::Q, not found}

test namespacex-strip-2.1 {namespacex strip, proper children} -body {
    namespacex strip ::X {::X ::X::Q}
} -result {{} Q}

# -------------------------------------------------------------------------
## import

test namespacex-import-1.0 {namespacex import, wrong\#args, not enough} -body {
    namespacex import
} -returnCodes error -result [E {wrong # args: should be "namespacex import from ..."}]

test namespacex-import-2.0 {
    namespacex import from a child namespace
} -setup {
    namespace eval importTest {
        proc t {} {
            return [namespace current]
        }
    }
} -cleanup {
    namespace delete importTest
} -body {
    namespacex import importTest t
    t
} -result ::importTest

test namespacex-import-2.1 {
    namespacex import from fully qualified namespace
} -setup {
    namespace eval ::importTest {
        proc t {} {
            return [namespace current]
        }
    }
} -cleanup {
    namespace delete ::importTest
} -body {
    namespacex import ::importTest t
    t
} -result {::importTest}

test namespacex-import-2.2 {
    namespacex import multiple commands
} -setup {
    namespace eval ::importTest {
        proc a {} {
            return "a: [namespace current]"
        }
        proc b {} {
            return "b: [namespace current]"
        }
    }
} -cleanup {
    namespace delete ::importTest
} -body {
    namespacex import ::importTest a myA b myB
    append result [myA] " " [myB]
    return $result
} -result {a: ::importTest b: ::importTest}

# -------------------------------------------------------------------------
## info allchildren

test namespacex-info-allchildren-1.0 {namespacex info allchildren, wrong\#args, not enough} -body {
    namespacex info allchildren
} -returnCodes error -result {wrong # args: should be "namespacex info allchildren ns"}

test namespacex-info-allchildren-1.1 {namespacex info allchildren, wrong\#args, too many} -body {
    namespacex info allchildren N X
} -returnCodes error -result {wrong # args: should be "namespacex info allchildren ns"}

test namespacex-info-allchildren-2.0.0 {namespacex info allchildren, fqn} -setup {
    ns_setup
} -body {
    lsort -dict [namespacex info allchildren ::X]
} -cleanup {
    namespace delete ::X
} -result {::X::A ::X::B ::X::B::D ::X::C}

test namespacex-info-allchildren-2.0.1 {namespacex info allchildren, relative to global} -setup {
    ns_setup
} -body {
    lsort -dict [namespacex info allchildren X]
} -cleanup {
    namespace delete ::X
} -result {::X::A ::X::B ::X::B::D ::X::C}

test namespacex-info-allchildren-2.0.2 {namespacex info allchildren, relative to non-global} -setup {
    ns_setup ::Q
} -body {
    namespace eval ::Q {
        lsort -dict [namespacex info allchildren X]
    }
} -cleanup {
    namespace delete ::Q
} -result {::Q::X::A ::Q::X::B ::Q::X::B::D ::Q::X::C}

# -------------------------------------------------------------------------
## info vars

test namespacex-info-vars-1.0 {namespacex info vars, wrong\#args, not enough} -body {
    namespacex info vars
} -returnCodes error -result {wrong # args: should be "namespacex info vars ns ?pattern?"}

test namespacex-info-vars-1.1 {namespacex info vars, wrong\#args, too many} -body {
    namespacex info vars N P X
} -returnCodes error -result {wrong # args: should be "namespacex info vars ns ?pattern?"}

test namespacex-info-vars-2.0.0 {namespacex info vars, fqn} -setup {
    ns2_setup
} -body {
    lsort -dict [namespacex info vars ::X]
} -cleanup {
    namespace delete ::X
} -result {vXa vXb}

test namespacex-info-vars-2.0.1 {namespacex info vars, relative to global} -setup {
    ns2_setup
} -body {
    lsort -dict [namespacex info vars X]
} -cleanup {
    namespace delete ::X
} -result {vXa vXb}

test namespacex-info-vars-2.0.2 {namespacex info vars, relative to non-global} -setup {
    ns2_setup ::Q
} -body {
    namespace eval ::Q {
        lsort -dict [namespacex info vars X]
    }
} -cleanup {
    namespace delete ::Q
} -result {vXa vXb}

test namespacex-info-vars-2.1 {namespacex info vars} -setup {
    namespace eval ::X {}
} -body {
    lsort -dict [namespacex info vars ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-info-vars-2.2.0 {namespacex info vars, fqn} -setup {
    ns3_setup
} -body {
    lsort -dict [namespacex info vars ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-info-vars-2.2.1 {namespacex info vars, relative to global} -setup {
    ns3_setup
} -body {
    lsort -dict [namespacex info vars X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-info-vars-2.2.2 {namespacex info vars, relative to non-global} -setup {
    ns3_setup ::Q
} -body {
    namespace eval ::Q {
        lsort -dict [namespacex info vars X]
    }
} -cleanup {
    namespace delete ::Q
} -result {}

# -------------------------------------------------------------------------
## info allvars

test namespacex-info-allvars-1.0 {namespacex info allvars, wrong\#args, not enough} -body {
    namespacex info allvars
} -returnCodes error -result {wrong # args: should be "namespacex info allvars ns"}

test namespacex-info-allvars-1.1 {namespacex info allvars, wrong\#args, too many} -body {
    namespacex info allvars N X
} -returnCodes error -result {wrong # args: should be "namespacex info allvars ns"}

test namespacex-info-allvars-2.0.0 {namespacex info allvars, fqn} -setup {
    ns2_setup
} -body {
    lsort -dict [namespacex info allvars ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB vXa vXb}

test namespacex-info-allvars-2.0.1 {namespacex info allvars, relative to global} -setup {
    ns2_setup
} -body {
    lsort -dict [namespacex info allvars X]
} -cleanup {
    namespace delete ::X
} -result {B::vB vXa vXb}

test namespacex-info-allvars-2.0.2 {namespacex info allvars, relative to non-global} -setup {
    ns2_setup ::Q
} -body {
    namespace eval ::Q {
        lsort -dict [namespacex info allvars X]
    }
} -cleanup {
    namespace delete ::Q
} -result {B::vB vXa vXb}

test namespacex-info-allvars-2.1.0 {namespacex info allvars, fqn} -setup {
    namespace eval ::X {}
} -body {
    lsort -dict [namespacex info allvars ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-info-allvars-2.1.1 {namespacex info allvars, relative to global} -setup {
    namespace eval ::X {}
} -body {
    lsort -dict [namespacex info allvars X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-info-allvars-2.1.2 {namespacex info allvars, relative to non-global} -setup {
    namespace eval ::Q::X {}
} -body {
    namespace eval ::Q {
        lsort -dict [namespacex info allvars X]
    }
} -cleanup {
    namespace delete ::Q
} -result {}

test namespacex-info-allvars-2.2.0 {namespacex info allvars, fqn} -setup {
    ns3_setup
} -body {
    lsort -dict [namespacex info allvars ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB}

test namespacex-info-allvars-2.2.1 {namespacex info allvars, relative to global} -setup {
    ns3_setup
} -body {
    lsort -dict [namespacex info allvars X]
} -cleanup {
    namespace delete ::X
} -result {B::vB}

test namespacex-info-allvars-2.2.2 {namespacex info allvars, relative to non-global} -setup {
    ns3_setup ::Q
} -body {
    namespace eval ::Q {
        lsort -dict [namespacex info allvars X]
    }
} -cleanup {
    namespace delete ::Q
} -result {B::vB}

# -------------------------------------------------------------------------
## state get

test namespacex-state-get-1.0 {namespacex state get, wrong\#args, not enough} -body {
    namespacex state get
} -returnCodes error -result {wrong # args: should be "namespacex state get ns"}

test namespacex-state-get-1.1 {namespacex state get, wrong\#args, too many} -body {
    namespacex state get N X
} -returnCodes error -result {wrong # args: should be "namespacex state get ns"}

test namespacex-state-get-2.0.0 {namespacex state get, fqn} -setup {
    ns2_setup
} -body {
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB 3 vXa 1 vXb aleph}

test namespacex-state-get-2.0.1 {namespacex state get, relative to global} -setup {
    ns2_setup
} -body {
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {B::vB 3 vXa 1 vXb aleph}

test namespacex-state-get-2.0.2 {namespacex state get, relative to non-global} -setup {
    ns2_setup ::Q
} -body {
    namespace eval ::Q {
        dictsort [namespacex state get X]
    }
} -cleanup {
    namespace delete ::Q
} -result {B::vB 3 vXa 1 vXb aleph}

test namespacex-state-get-2.1.0 {namespacex state get, fqn} -setup {
    namespace eval ::X {}
} -body {
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-get-2.1.1 {namespacex state get, relative to global} -setup {
    namespace eval ::X {}
} -body {
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-get-2.1.2 {namespacex state get, relative to non-global} -setup {
    namespace eval ::Q::X {}
} -body {
    namespace eval ::Q {
        dictsort [namespacex state get X]
    }
} -cleanup {
    namespace delete ::Q
} -result {}

test namespacex-state-get-2.2.0 {namespacex state get, fqn} -setup {
    ns3_setup
} -body {
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB mjolnir}

test namespacex-state-get-2.2.1 {namespacex state get, relative to global} -setup {
    ns3_setup
} -body {
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {B::vB mjolnir}

test namespacex-state-get-2.2.2 {namespacex state get, relative to non-global} -setup {
    ns3_setup ::Q
} -body {
    namespace eval ::Q {
        dictsort [namespacex state get X]
    }
} -cleanup {
    namespace delete ::Q
} -result {B::vB mjolnir}

# -------------------------------------------------------------------------
## state drop

test namespacex-state-drop-1.0 {namespacex state drop, wrong\#args, not enough} -body {
    namespacex state drop
} -returnCodes error -result {wrong # args: should be "namespacex state drop ns"}

test namespacex-state-drop-1.1 {namespacex state drop, wrong\#args, too many} -body {
    namespacex state drop N X
} -returnCodes error -result {wrong # args: should be "namespacex state drop ns"}

test namespacex-state-drop-2.0.0 {namespacex state drop, fqn} -setup {
    ns2_setup
} -body {
    namespacex state drop ::X
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-drop-2.0.1 {namespacex state drop, relative to global} -setup {
    ns2_setup
} -body {
    namespacex state drop X
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-drop-2.0.2 {namespacex state drop, relative to non-global} -setup {
    ns2_setup ::Q
} -body {
    namespace eval ::Q {
        namespacex state drop X
        dictsort [namespacex state get X]
    }
} -cleanup {
    namespace delete ::Q
} -result {}

test namespacex-state-drop-2.1.0 {namespacex state drop, fqn} -setup {
    namespace eval ::X {}
} -body {
    namespacex state drop X
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-drop-2.1.1 {namespacex state drop, relative to global} -setup {
    namespace eval ::X {}
} -body {
    namespacex state drop X
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-drop-2.1.2 {namespacex state drop, relative to non-global} -setup {
    namespace eval ::Q::X {}
} -body {
    namespace eval ::Q {
        namespacex state drop X
        dictsort [namespacex state get X]
    }
} -cleanup {
    namespace delete ::Q
} -result {}

test namespacex-state-drop-2.2.0 {namespacex state drop, fqn} -setup {
    ns3_setup
} -body {
    namespacex state drop X
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-drop-2.2.1 {namespacex state drop, relative to global} -setup {
    ns3_setup
} -body {
    namespacex state drop X
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-drop-2.2.2 {namespacex state drop, relative to non-global} -setup {
    ns3_setup ::Q
} -body {
    namespace eval ::Q {
        namespacex state drop X
        dictsort [namespacex state get X]
    }
} -cleanup {
    namespace delete ::Q
} -result {}

# -------------------------------------------------------------------------
## state set

test namespacex-state-set-1.0 {namespacex state set, wrong\#args, not enough} -body {
    namespacex state set
} -returnCodes error -result {wrong # args: should be "namespacex state set ns state"}

test namespacex-state-set-1.1 {namespacex state set, wrong\#args, not enough} -body {
    namespacex state set N
} -returnCodes error -result {wrong # args: should be "namespacex state set ns state"}

test namespacex-state-set-1.2 {namespacex state set, wrong\#args, too many} -body {
    namespacex state set N S X
} -returnCodes error -result {wrong # args: should be "namespacex state set ns state"}

test namespacex-state-set-2.0.0 {namespacex state set, fqn} -setup {
    ns2_setup
    set ST [namespacex state get ::X]
    ns3_setup
} -body {
    namespacex state set ::X $ST
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB 3 vXa 1 vXb aleph}

test namespacex-state-set-2.0.1 {namespacex state set, relative to global} -setup {
    ns2_setup
    set ST [namespacex state get ::X]
    ns3_setup
} -body {
    namespacex state set X $ST
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {B::vB 3 vXa 1 vXb aleph}

test namespacex-state-set-2.0.1 {namespacex state set, relative to non-global} -setup {
    ns2_setup
    set ST [namespacex state get ::X]
    namespace delete ::X
    ns3_setup ::Q
} -body {
    namespace eval ::Q {
        namespacex state set X $ST
        dictsort [namespacex state get X]
    }
} -cleanup {
    namespace delete ::Q
} -result {B::vB 3 vXa 1 vXb aleph}

test namespacex-state-set-2.1.0 {namespacex state set, fqn} -setup {
    ns3_setup
    set ST [namespacex state get ::X]
    ns2_setup
} -body {
    namespacex state set ::X $ST
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB mjolnir}

test namespacex-state-set-2.1.1 {namespacex state set, relative to global} -setup {
    ns3_setup
    set ST [namespacex state get ::X]
    ns2_setup
} -body {
    namespacex state set X $ST
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {B::vB mjolnir}

test namespacex-state-set-2.1.2 {namespacex state set, relative to non-global} -setup {
    ns3_setup
    set ST [namespacex state get ::X]
    namespace delete ::X
    ns2_setup ::Q
} -body {
    namespace eval ::Q {
        namespacex state set X $ST
        dictsort [namespacex state get X]
    }
} -cleanup {
    namespace delete ::Q
} -result {B::vB mjolnir}

## done
# -------------------------------------------------------------------------
testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:







<

|
|








|
|








|
|






<
<
<
<
<
<
<
<

<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|



|



|







|







<
<
<
<
<
<
<
<
<
<

<

|



|



|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<

|



|



|







|







<
<
<
<
<
<
<
<
<
<
|







|







<
<
<
<
<
<
<
<
<
<
|







|







<
<
<
<
<
<
<
<
<
<

<

|



|



|







|







<
<
<
<
<
<
<
<
<
<
|







|







<
<
<
<
<
<
<
<
<
<
|







|







<
<
<
<
<
<
<
<
<
<

<

|



|



|








|








<
<
<
<
<
<
<
<
<
<
<
|








|








<
<
<
<
<
<
<
<
<
<
<
|








|








<
<
<
<
<
<
<
<
<
<
<

<

|



|



|



|










|










<
<
<
<
<
<
<
<
<
<
<
<
<
<
|










|










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







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
89
90


















91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106


















107

108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132










133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148










149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164










165

166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190










191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206










207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222










223

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250











251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268











269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286











287

288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322














323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344















345
346
347
348
349
350
351
testsNeedTcltest 2.0

testing {
    useLocal namespacex.tcl namespacex
}

# -------------------------------------------------------------------------


proc ns_setup {} {
    namespace eval ::X {
        namespace eval A {}
        namespace eval B {
            namespace eval D {}
        }
        namespace eval C {}
    }
}

proc ns2_setup {} {
    namespace eval ::X {
        variable vXa 1
        variable vXb aleph
        namespace eval B {
            variable vB 3
        }
    }
}

proc ns3_setup {} {
    namespace eval ::X {
        namespace eval B {
            variable vB mjolnir
        }
    }
}









# -------------------------------------------------------------------------











































































































































test namespacex-info-allchildren-1.0 {namespacex info allchildren, wrong\#args} -body {
    namespacex info allchildren
} -returnCodes error -result {wrong # args: should be "namespacex info allchildren ns"}

test namespacex-info-allchildren-1.1 {namespacex info allchildren, wrong\#args} -body {
    namespacex info allchildren N X
} -returnCodes error -result {wrong # args: should be "namespacex info allchildren ns"}

test namespacex-info-allchildren-2.0.0 {namespacex info allchildren} -setup {
    ns_setup
} -body {
    lsort -dict [namespacex info allchildren ::X]
} -cleanup {
    namespace delete ::X
} -result {::X::A ::X::B ::X::B::D ::X::C}

test namespacex-info-allchildren-2.0.1 {namespacex info allchildren} -setup {
    ns_setup
} -body {
    lsort -dict [namespacex info allchildren X]
} -cleanup {
    namespace delete ::X
} -result {::X::A ::X::B ::X::B::D ::X::C}











# -------------------------------------------------------------------------


test namespacex-info-vars-1.0 {namespacex info vars, wrong\#args} -body {
    namespacex info vars
} -returnCodes error -result {wrong # args: should be "namespacex info vars ns ?pattern?"}

test namespacex-info-vars-1.1 {namespacex info vars, wrong\#args} -body {
    namespacex info vars N P X
} -returnCodes error -result {wrong # args: should be "namespacex info vars ns ?pattern?"}

test namespacex-info-vars-2.0 {namespacex info vars} -setup {
    ns2_setup
} -body {
    lsort -dict [namespacex info vars ::X]
} -cleanup {
    namespace delete ::X
} -result {vXa vXb}



















test namespacex-info-vars-2.1 {namespacex info vars} -setup {
    namespace eval ::X {}
} -body {
    lsort -dict [namespacex info vars ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-info-vars-2.2 {namespacex info vars} -setup {
    ns3_setup
} -body {
    lsort -dict [namespacex info vars ::X]
} -cleanup {
    namespace delete ::X
} -result {}



















# -------------------------------------------------------------------------


test namespacex-info-allvars-1.0 {namespacex info allvars, wrong\#args} -body {
    namespacex info allvars
} -returnCodes error -result {wrong # args: should be "namespacex info allvars ns"}

test namespacex-info-allvars-1.1 {namespacex info allvars, wrong\#args} -body {
    namespacex info allvars N X
} -returnCodes error -result {wrong # args: should be "namespacex info allvars ns"}

test namespacex-info-allvars-2.0.0 {namespacex info allvars} -setup {
    ns2_setup
} -body {
    lsort -dict [namespacex info allvars ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB vXa vXb}

test namespacex-info-allvars-2.0.1 {namespacex info allvars} -setup {
    ns2_setup
} -body {
    lsort -dict [namespacex info allvars X]
} -cleanup {
    namespace delete ::X
} -result {B::vB vXa vXb}











test namespacex-info-allvars-2.1.0 {namespacex info allvars} -setup {
    namespace eval ::X {}
} -body {
    lsort -dict [namespacex info allvars ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-info-allvars-2.1.1 {namespacex info allvars} -setup {
    namespace eval ::X {}
} -body {
    lsort -dict [namespacex info allvars X]
} -cleanup {
    namespace delete ::X
} -result {}











test namespacex-info-allvars-2.2.0 {namespacex info allvars} -setup {
    ns3_setup
} -body {
    lsort -dict [namespacex info allvars ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB}

test namespacex-info-allvars-2.2.1 {namespacex info allvars} -setup {
    ns3_setup
} -body {
    lsort -dict [namespacex info allvars X]
} -cleanup {
    namespace delete ::X
} -result {B::vB}











# -------------------------------------------------------------------------


test namespacex-state-get-1.0 {namespacex state get, wrong\#args} -body {
    namespacex state get
} -returnCodes error -result {wrong # args: should be "namespacex state get ns"}

test namespacex-state-get-1.1 {namespacex state get, wrong\#args} -body {
    namespacex state get N X
} -returnCodes error -result {wrong # args: should be "namespacex state get ns"}

test namespacex-state-get-2.0.0 {namespacex state get} -setup {
    ns2_setup
} -body {
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB 3 vXa 1 vXb aleph}

test namespacex-state-get-2.0.1 {namespacex state get} -setup {
    ns2_setup
} -body {
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {B::vB 3 vXa 1 vXb aleph}











test namespacex-state-get-2.1.0 {namespacex state get} -setup {
    namespace eval ::X {}
} -body {
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-get-2.1.1 {namespacex state get} -setup {
    namespace eval ::X {}
} -body {
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {}











test namespacex-state-get-2.2.0 {namespacex state get} -setup {
    ns3_setup
} -body {
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB mjolnir}

test namespacex-state-get-2.2.1 {namespacex state get} -setup {
    ns3_setup
} -body {
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {B::vB mjolnir}











# -------------------------------------------------------------------------


test namespacex-state-drop-1.0 {namespacex state drop, wrong\#args} -body {
    namespacex state drop
} -returnCodes error -result {wrong # args: should be "namespacex state drop ns"}

test namespacex-state-drop-1.1 {namespacex state drop, wrong\#args} -body {
    namespacex state drop N X
} -returnCodes error -result {wrong # args: should be "namespacex state drop ns"}

test namespacex-state-drop-2.0.0 {namespacex state drop} -setup {
    ns2_setup
} -body {
    namespacex state drop ::X
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-drop-2.0.1 {namespacex state drop} -setup {
    ns2_setup
} -body {
    namespacex state drop X
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {}












test namespacex-state-drop-2.1.0 {namespacex state drop} -setup {
    namespace eval ::X {}
} -body {
    namespacex state drop X
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-drop-2.1.1 {namespacex state drop} -setup {
    namespace eval ::X {}
} -body {
    namespacex state drop X
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {}












test namespacex-state-drop-2.2.0 {namespacex state drop} -setup {
    ns3_setup
} -body {
    namespacex state drop X
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {}

test namespacex-state-drop-2.2.1 {namespacex state drop} -setup {
    ns3_setup
} -body {
    namespacex state drop X
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {}












# -------------------------------------------------------------------------


test namespacex-state-set-1.0 {namespacex state set, wrong\#args} -body {
    namespacex state set
} -returnCodes error -result {wrong # args: should be "namespacex state set ns state"}

test namespacex-state-set-1.1 {namespacex state set, wrong\#args} -body {
    namespacex state set N
} -returnCodes error -result {wrong # args: should be "namespacex state set ns state"}

test namespacex-state-set-1.2 {namespacex state set, wrong\#args} -body {
    namespacex state set N S X
} -returnCodes error -result {wrong # args: should be "namespacex state set ns state"}

test namespacex-state-set-2.0.0 {namespacex state set} -setup {
    ns2_setup
    set ST [namespacex state get ::X]
    ns3_setup
} -body {
    namespacex state set ::X $ST
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB 3 vXa 1 vXb aleph}

test namespacex-state-set-2.0.1 {namespacex state set} -setup {
    ns2_setup
    set ST [namespacex state get ::X]
    ns3_setup
} -body {
    namespacex state set X $ST
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {B::vB 3 vXa 1 vXb aleph}















test namespacex-state-set-2.1.0 {namespacex state set} -setup {
    ns3_setup
    set ST [namespacex state get ::X]
    ns2_setup
} -body {
    namespacex state set ::X $ST
    dictsort [namespacex state get ::X]
} -cleanup {
    namespace delete ::X
} -result {B::vB mjolnir}

test namespacex-state-set-2.1.1 {namespacex state set} -setup {
    ns3_setup
    set ST [namespacex state get ::X]
    ns2_setup
} -body {
    namespacex state set X $ST
    dictsort [namespacex state get X]
} -cleanup {
    namespace delete ::X
} -result {B::vB mjolnir}
















# -------------------------------------------------------------------------
testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:

Changes to modules/namespacex/pkgIndex.tcl.

1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.5]} {
    # PRAGMA: returnok
    return
}
package ifneeded namespacex 0.2 [list source [file join $dir namespacex.tcl]]




|
1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.5]} {
    # PRAGMA: returnok
    return
}
package ifneeded namespacex 0.1 [list source [file join $dir namespacex.tcl]]

Added modules/ncgi/formdata.txt.

















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Content-Type: multipart/form-data; boundary="---------------------------17661509020136"

-----------------------------17661509020136
Content-Disposition: form-data; name="field1"

value
-----------------------------17661509020136
Content-Disposition: form-data; name="field2"

another value
-----------------------------17661509020136
Content-Disposition: form-data; name="the_file_name"; filename="C:\Program Files\Netscape\Communicator\Program\nareadme.htm"
Content-Type: text/html


<center><h1>
                  Netscape Address Book Sync for Palm Pilot
                                         User Guide
</h1></center>



-----------------------------17661509020136--

Changes to modules/ncgi/ncgi.man.

1
2
3
4
5
6
7
8
[vset VERSION 1.4.4]
[manpage_begin ncgi n [vset VERSION]]
[see_also html]
[keywords CGI]
[keywords cookie]
[keywords form]
[keywords html]
[comment {-*- tcl -*- doctools manpage}]
|







1
2
3
4
5
6
7
8
[vset VERSION 1.4.3]
[manpage_begin ncgi n [vset VERSION]]
[see_also html]
[keywords CGI]
[keywords cookie]
[keywords form]
[keywords html]
[comment {-*- tcl -*- doctools manpage}]
305
306
307
308
309
310
311
312
313
puts -nonewline $fh $filedata
close $fh
}]

[para]

[vset CATEGORY ncgi]
[include ../common-text/feedback.inc]
[manpage_end]







|

305
306
307
308
309
310
311
312
313
puts -nonewline $fh $filedata
close $fh
}]

[para]

[vset CATEGORY ncgi]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/ncgi/ncgi.tcl.

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# of decoding them.

# We use newer string routines
package require Tcl 8.4
package require fileutil ; # Required by importFile.
package require uri

package provide ncgi 1.4.4

namespace eval ::ncgi {

    # "query" holds the raw query (i.e., form) data
    # This is treated as a cache, too, so you can call ncgi::query more than
    # once








|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# of decoding them.

# We use newer string routines
package require Tcl 8.4
package require fileutil ; # Required by importFile.
package require uri

package provide ncgi 1.4.3

namespace eval ::ncgi {

    # "query" holds the raw query (i.e., form) data
    # This is treated as a cache, too, so you can call ncgi::query more than
    # once

267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285

proc ::ncgi::decode {str} {
    # rewrite "+" back to space
    # protect \ from quoting another '\'
    set str [string map [list + { } "\\" "\\\\" \[ \\\[ \] \\\]] $str]

    # prepare to process all %-escapes
    regsub -all -nocase -- {%([E][A-F0-9])%([89AB][A-F0-9])%([89AB][A-F0-9])} \
	$str {[encoding convertfrom utf-8 [DecodeHex \1\2\3]]} str
    regsub -all -nocase -- {%([CDcd][A-F0-9])%([89AB][A-F0-9])} \
	$str {[encoding convertfrom utf-8 [DecodeHex \1\2]]} str
    regsub -all -nocase -- {%([A-F0-9][A-F0-9])} $str {\\u00\1} str

    # process \u unicode mapped chars
    return [subst -novar $str]
}

# ::ncgi::encode
#







|

|

|







267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285

proc ::ncgi::decode {str} {
    # rewrite "+" back to space
    # protect \ from quoting another '\'
    set str [string map [list + { } "\\" "\\\\" \[ \\\[ \] \\\]] $str]

    # prepare to process all %-escapes
    regsub -all -- {%([Ee][A-Fa-f0-9])%([89ABab][A-Fa-f0-9])%([89ABab][A-Fa-f0-9])} \
	$str {[encoding convertfrom utf-8 [DecodeHex \1\2\3]]} str
    regsub -all -- {%([CDcd][A-Fa-f0-9])%([89ABab][A-Fa-f0-9])}                     \
	$str {[encoding convertfrom utf-8 [DecodeHex \1\2]]} str
    regsub -all -- {%([0-7][A-Fa-f0-9])} $str {\\u00\1} str

    # process \u unicode mapped chars
    return [subst -novar $str]
}

# ::ncgi::encode
#

Changes to modules/ncgi/ncgi.test.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# -*- tcl -*-
# Tests for the cgi module.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# Tests for the cgi module.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions
#
# RCS: @(#) $Id: ncgi.test,v 1.28 2012/05/03 17:56:07 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
    ncgi::decode {%E2%80%A0}
} "\u2020" ; # dagger

test ncgi-3.9 {ncgi::decode, bug 3601995} {
    ncgi::decode {%E2%A0%90}
} "\u2810" ; # a braille pattern

test ncgi-3.10 {ncgi::decode, bug 3601995, tkt [1f900bdf6b]} {
    ncgi::decode {%E2%B1}
} "\u00e2\u00b1" ;# Changed with branch `ncgi-1f900bdf6b`, tkt [1f900bdf6b]

test ncgi-4.1 {ncgi::encode} {
    ncgi::encode abcdef0123
} abcdef0123

test ncgi-4.2 {ncgi::encode} {
    ncgi::encode "\[abc\]def\$0123\\x"







|

|







136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
    ncgi::decode {%E2%80%A0}
} "\u2020" ; # dagger

test ncgi-3.9 {ncgi::decode, bug 3601995} {
    ncgi::decode {%E2%A0%90}
} "\u2810" ; # a braille pattern

test ncgi-3.10 {ncgi::decode, bug 3601995} {
    ncgi::decode {%E2%B1}
} "%E2%B1" ; # missing byte trailing %A0, do not accept/decode, pass through.

test ncgi-4.1 {ncgi::encode} {
    ncgi::encode abcdef0123
} abcdef0123

test ncgi-4.2 {ncgi::encode} {
    ncgi::encode "\[abc\]def\$0123\\x"
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598

test ncgi-14.2 {ncgi::multipart} {
    catch {ncgi::multipart "multipart/form-data" {}} err
    set err
} {No boundary given for multipart document}

test ncgi-14.3 {ncgi::multipart} {
    set in [open [asset formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}







|







586
587
588
589
590
591
592
593
594
595
596
597
598
599
600

test ncgi-14.2 {ncgi::multipart} {
    catch {ncgi::multipart "multipart/form-data" {}} err
    set err
} {No boundary given for multipart document}

test ncgi-14.3 {ncgi::multipart} {
    set in [open [file join [file dirname [info script]] formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
                                         User Guide
</h1></center>


}}}

test ncgi-14.4 {ncgi::multipart} {
    set in [open [asset formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}







|







612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
                                         User Guide
</h1></center>


}}}

test ncgi-14.4 {ncgi::multipart} {
    set in [open [file join [file dirname [info script]] formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
</h1></center>


}}


test ncgi-14.6 {ncgi::multipart setValue} {
    set in [open [asset formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}







|







640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
</h1></center>


}}


test ncgi-14.6 {ncgi::multipart setValue} {
    set in [open [file join [file dirname [info script]] formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}

Changes to modules/ncgi/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded ncgi 1.4.4 [list source [file join $dir ncgi.tcl]]

|
1
2
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded ncgi 1.4.3 [list source [file join $dir ncgi.tcl]]

Deleted modules/ncgi/test-assets/formdata.txt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Content-Type: multipart/form-data; boundary="---------------------------17661509020136"

-----------------------------17661509020136
Content-Disposition: form-data; name="field1"

value
-----------------------------17661509020136
Content-Disposition: form-data; name="field2"

another value
-----------------------------17661509020136
Content-Disposition: form-data; name="the_file_name"; filename="C:\Program Files\Netscape\Communicator\Program\nareadme.htm"
Content-Type: text/html


<center><h1>
                  Netscape Address Book Sync for Palm Pilot
                                         User Guide
</h1></center>



-----------------------------17661509020136--

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































Added modules/nettool/available_ports.tcl.















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
###
# topic: 868a79cedf28924191fd86aa85f6dd1d
###
namespace eval ::nettool {
  set blocks {}
}

lappend ::nettool::blocks 1028 1028
lappend ::nettool::blocks 1067 1068
lappend ::nettool::blocks 1109 1109
lappend ::nettool::blocks 1138 1138
lappend ::nettool::blocks 1313 1313
lappend ::nettool::blocks 1382 1382
lappend ::nettool::blocks 1385 1385
lappend ::nettool::blocks 1416 1416
lappend ::nettool::blocks 1454 1454
lappend ::nettool::blocks 1461 1461
lappend ::nettool::blocks 1464 1464
lappend ::nettool::blocks 1486 1486
lappend ::nettool::blocks 1491 1491
lappend ::nettool::blocks 1493 1493
lappend ::nettool::blocks 1528 1528
lappend ::nettool::blocks 1556 1556
lappend ::nettool::blocks 1587 1587
lappend ::nettool::blocks 1651 1651
lappend ::nettool::blocks 1783 1783
lappend ::nettool::blocks 1895 1895
lappend ::nettool::blocks 2083 2083
lappend ::nettool::blocks 2194 2196
lappend ::nettool::blocks 2222 2222
lappend ::nettool::blocks 2259 2259
lappend ::nettool::blocks 2340 2340
lappend ::nettool::blocks 2346 2349
lappend ::nettool::blocks 2369 2369
lappend ::nettool::blocks 2377 2378
lappend ::nettool::blocks 2395 2395
lappend ::nettool::blocks 2426 2426
lappend ::nettool::blocks 2446 2446
lappend ::nettool::blocks 2528 2528
lappend ::nettool::blocks 2640 2640
lappend ::nettool::blocks 2654 2654
lappend ::nettool::blocks 2682 2682
lappend ::nettool::blocks 2693 2693
lappend ::nettool::blocks 2794 2794
lappend ::nettool::blocks 2825 2825
lappend ::nettool::blocks 2873 2873
lappend ::nettool::blocks 2916 2917
lappend ::nettool::blocks 2925 2925
lappend ::nettool::blocks 3014 3014
lappend ::nettool::blocks 3016 3019
lappend ::nettool::blocks 3024 3024
lappend ::nettool::blocks 3027 3029
lappend ::nettool::blocks 3050 3050
lappend ::nettool::blocks 3080 3080
lappend ::nettool::blocks 3092 3092
lappend ::nettool::blocks 3126 3126
lappend ::nettool::blocks 3300 3301
lappend ::nettool::blocks 3396 3396
lappend ::nettool::blocks 3403 3404
lappend ::nettool::blocks 3546 3546
lappend ::nettool::blocks 3693 3694
lappend ::nettool::blocks 3876 3876
lappend ::nettool::blocks 3900 3900
lappend ::nettool::blocks 3938 3938
lappend ::nettool::blocks 3970 3970
lappend ::nettool::blocks 3986 3986
lappend ::nettool::blocks 3994 3994
lappend ::nettool::blocks 4000 4000
lappend ::nettool::blocks 4048 4048
lappend ::nettool::blocks 4060 4060
lappend ::nettool::blocks 4065 4065
lappend ::nettool::blocks 4120 4120
lappend ::nettool::blocks 4132 4133
lappend ::nettool::blocks 4140 4140
lappend ::nettool::blocks 4144 4144
lappend ::nettool::blocks 4151 4152
lappend ::nettool::blocks 4184 4184
lappend ::nettool::blocks 4194 4198
lappend ::nettool::blocks 4315 4315
lappend ::nettool::blocks 4317 4319
lappend ::nettool::blocks 4332 4332
lappend ::nettool::blocks 4334 4339
lappend ::nettool::blocks 4363 4367
lappend ::nettool::blocks 4370 4370
lappend ::nettool::blocks 4380 4388
lappend ::nettool::blocks 4397 4399
lappend ::nettool::blocks 4412 4424
lappend ::nettool::blocks 4434 4440
lappend ::nettool::blocks 4459 4483
lappend ::nettool::blocks 4489 4499
lappend ::nettool::blocks 4501 4501
lappend ::nettool::blocks 4503 4533
lappend ::nettool::blocks 4539 4544
lappend ::nettool::blocks 4560 4562
lappend ::nettool::blocks 4564 4565
lappend ::nettool::blocks 4569 4569
lappend ::nettool::blocks 4571 4589
lappend ::nettool::blocks 4606 4657
lappend ::nettool::blocks 4693 4699
lappend ::nettool::blocks 4705 4724
lappend ::nettool::blocks 4734 4736
lappend ::nettool::blocks 4746 4746
lappend ::nettool::blocks 4748 4748
lappend ::nettool::blocks 4754 4783
lappend ::nettool::blocks 4792 4799
lappend ::nettool::blocks 4805 4826
lappend ::nettool::blocks 4828 4836
lappend ::nettool::blocks 4846 4846
lappend ::nettool::blocks 4852 4866
lappend ::nettool::blocks 4872 4875
lappend ::nettool::blocks 4886 4893
lappend ::nettool::blocks 4895 4898
lappend ::nettool::blocks 4903 4911
lappend ::nettool::blocks 4916 4935
lappend ::nettool::blocks 4938 4939
lappend ::nettool::blocks 4943 4948
lappend ::nettool::blocks 4954 4968
lappend ::nettool::blocks 4971 4983
lappend ::nettool::blocks 4992 4998
lappend ::nettool::blocks 5016 5019
lappend ::nettool::blocks 5033 5041
lappend ::nettool::blocks 5076 5077
lappend ::nettool::blocks 5088 5089
lappend ::nettool::blocks 5095 5098
lappend ::nettool::blocks 5107 5110
lappend ::nettool::blocks 5113 5113
lappend ::nettool::blocks 5118 5119
lappend ::nettool::blocks 5121 5132
lappend ::nettool::blocks 5138 5145
lappend ::nettool::blocks 5147 5149
lappend ::nettool::blocks 5151 5151
lappend ::nettool::blocks 5158 5160
lappend ::nettool::blocks 5165 5165
lappend ::nettool::blocks 5169 5171
lappend ::nettool::blocks 5173 5189
lappend ::nettool::blocks 5197 5199
lappend ::nettool::blocks 5204 5208
lappend ::nettool::blocks 5210 5214
lappend ::nettool::blocks 5216 5220
lappend ::nettool::blocks 5238 5244
lappend ::nettool::blocks 5254 5263
lappend ::nettool::blocks 5266 5268
lappend ::nettool::blocks 5273 5279
lappend ::nettool::blocks 5283 5297
lappend ::nettool::blocks 5311 5311
lappend ::nettool::blocks 5316 5316
lappend ::nettool::blocks 5319 5319
lappend ::nettool::blocks 5322 5342
lappend ::nettool::blocks 5345 5348
lappend ::nettool::blocks 5365 5396
lappend ::nettool::blocks 5438 5442
lappend ::nettool::blocks 5444 5444
lappend ::nettool::blocks 5446 5452
lappend ::nettool::blocks 5457 5460
lappend ::nettool::blocks 5466 5499
lappend ::nettool::blocks 5507 5552
lappend ::nettool::blocks 5558 5565
lappend ::nettool::blocks 5570 5572
lappend ::nettool::blocks 5576 5578
lappend ::nettool::blocks 5587 5596
lappend ::nettool::blocks 5606 5617
lappend ::nettool::blocks 5619 5626
lappend ::nettool::blocks 5640 5645
lappend ::nettool::blocks 5647 5669
lappend ::nettool::blocks 5685 5686
lappend ::nettool::blocks 5690 5692
lappend ::nettool::blocks 5694 5695
lappend ::nettool::blocks 5697 5712
lappend ::nettool::blocks 5731 5740
lappend ::nettool::blocks 5749 5749
lappend ::nettool::blocks 5751 5754
lappend ::nettool::blocks 5756 5756
lappend ::nettool::blocks 5758 5765
lappend ::nettool::blocks 5772 5776
lappend ::nettool::blocks 5778 5779
lappend ::nettool::blocks 5788 5792
lappend ::nettool::blocks 5795 5812
lappend ::nettool::blocks 5815 5840
lappend ::nettool::blocks 5843 5858
lappend ::nettool::blocks 5860 5862
lappend ::nettool::blocks 5864 5867
lappend ::nettool::blocks 5869 5882
lappend ::nettool::blocks 5884 5899
lappend ::nettool::blocks 5901 5909
lappend ::nettool::blocks 5914 5962
lappend ::nettool::blocks 5964 5967
lappend ::nettool::blocks 5970 5983
lappend ::nettool::blocks 5993 5998
lappend ::nettool::blocks 6067 6067
lappend ::nettool::blocks 6078 6080
lappend ::nettool::blocks 6089 6098
lappend ::nettool::blocks 6119 6120
lappend ::nettool::blocks 6125 6129
lappend ::nettool::blocks 6131 6132
lappend ::nettool::blocks 6134 6139
lappend ::nettool::blocks 6150 6158
lappend ::nettool::blocks 6164 6199
lappend ::nettool::blocks 6202 6221
lappend ::nettool::blocks 6223 6240
lappend ::nettool::blocks 6245 6250
lappend ::nettool::blocks 6254 6266
lappend ::nettool::blocks 6270 6299
lappend ::nettool::blocks 6301 6305
lappend ::nettool::blocks 6307 6314
lappend ::nettool::blocks 6318 6319
lappend ::nettool::blocks 6323 6323
lappend ::nettool::blocks 6327 6342
lappend ::nettool::blocks 6345 6345
lappend ::nettool::blocks 6348 6349
lappend ::nettool::blocks 6351 6354
lappend ::nettool::blocks 6356 6359
lappend ::nettool::blocks 6361 6362
lappend ::nettool::blocks 6364 6369
lappend ::nettool::blocks 6371 6381
lappend ::nettool::blocks 6383 6388
lappend ::nettool::blocks 6391 6399
lappend ::nettool::blocks 6411 6416
lappend ::nettool::blocks 6422 6431
lappend ::nettool::blocks 6433 6441
lappend ::nettool::blocks 6444 6445
lappend ::nettool::blocks 6447 6454
lappend ::nettool::blocks 6457 6470
lappend ::nettool::blocks 6472 6479
lappend ::nettool::blocks 6490 6499
lappend ::nettool::blocks 6501 6508
lappend ::nettool::blocks 6512 6512
lappend ::nettool::blocks 6516 6542
lappend ::nettool::blocks 6545 6546
lappend ::nettool::blocks 6552 6557
lappend ::nettool::blocks 6559 6565
lappend ::nettool::blocks 6569 6578
lappend ::nettool::blocks 6584 6599
lappend ::nettool::blocks 6603 6618
lappend ::nettool::blocks 6629 6631
lappend ::nettool::blocks 6635 6639
lappend ::nettool::blocks 6641 6652
lappend ::nettool::blocks 6654 6654
lappend ::nettool::blocks 6658 6664
lappend ::nettool::blocks 6672 6677
lappend ::nettool::blocks 6680 6686
lappend ::nettool::blocks 6690 6695
lappend ::nettool::blocks 6698 6700
lappend ::nettool::blocks 6707 6713
lappend ::nettool::blocks 6717 6766
lappend ::nettool::blocks 6772 6776
lappend ::nettool::blocks 6779 6783
lappend ::nettool::blocks 6792 6800
lappend ::nettool::blocks 6802 6816
lappend ::nettool::blocks 6818 6830
lappend ::nettool::blocks 6832 6840
lappend ::nettool::blocks 6843 6849
lappend ::nettool::blocks 6851 6867
lappend ::nettool::blocks 6869 6887
lappend ::nettool::blocks 6889 6900
lappend ::nettool::blocks 6902 6934
lappend ::nettool::blocks 6937 6945
lappend ::nettool::blocks 6947 6950
lappend ::nettool::blocks 6952 6960
lappend ::nettool::blocks 6967 6968
lappend ::nettool::blocks 6971 6996
lappend ::nettool::blocks 7016 7017
lappend ::nettool::blocks 7026 7029
lappend ::nettool::blocks 7032 7039
lappend ::nettool::blocks 7041 7069
lappend ::nettool::blocks 7072 7072
lappend ::nettool::blocks 7074 7079
lappend ::nettool::blocks 7081 7094
lappend ::nettool::blocks 7096 7098
lappend ::nettool::blocks 7102 7106
lappend ::nettool::blocks 7108 7120
lappend ::nettool::blocks 7122 7127
lappend ::nettool::blocks 7130 7160
lappend ::nettool::blocks 7175 7180
lappend ::nettool::blocks 7182 7199
lappend ::nettool::blocks 7202 7226
lappend ::nettool::blocks 7230 7234
lappend ::nettool::blocks 7238 7261
lappend ::nettool::blocks 7263 7271
lappend ::nettool::blocks 7284 7299
lappend ::nettool::blocks 7360 7364
lappend ::nettool::blocks 7366 7390
lappend ::nettool::blocks 7396 7396
lappend ::nettool::blocks 7398 7399
lappend ::nettool::blocks 7403 7409
lappend ::nettool::blocks 7412 7420
lappend ::nettool::blocks 7422 7425
lappend ::nettool::blocks 7432 7436
lappend ::nettool::blocks 7438 7442
lappend ::nettool::blocks 7444 7470
lappend ::nettool::blocks 7472 7472
lappend ::nettool::blocks 7475 7490
lappend ::nettool::blocks 7492 7499
lappend ::nettool::blocks 7502 7507
lappend ::nettool::blocks 7512 7541
lappend ::nettool::blocks 7551 7559
lappend ::nettool::blocks 7561 7562
lappend ::nettool::blocks 7564 7565
lappend ::nettool::blocks 7567 7568
lappend ::nettool::blocks 7571 7573
lappend ::nettool::blocks 7575 7587
lappend ::nettool::blocks 7589 7623
lappend ::nettool::blocks 7625 7625
lappend ::nettool::blocks 7632 7632
lappend ::nettool::blocks 7634 7647
lappend ::nettool::blocks 7649 7671
lappend ::nettool::blocks 7678 7679
lappend ::nettool::blocks 7681 7688
lappend ::nettool::blocks 7690 7696
lappend ::nettool::blocks 7698 7699
lappend ::nettool::blocks 7701 7706
lappend ::nettool::blocks 7709 7719
lappend ::nettool::blocks 7721 7723
lappend ::nettool::blocks 7728 7733
lappend ::nettool::blocks 7735 7737
lappend ::nettool::blocks 7739 7740
lappend ::nettool::blocks 7745 7746
lappend ::nettool::blocks 7748 7776
lappend ::nettool::blocks 7780 7780
lappend ::nettool::blocks 7782 7785
lappend ::nettool::blocks 7788 7788
lappend ::nettool::blocks 7790 7793
lappend ::nettool::blocks 7795 7796
lappend ::nettool::blocks 7803 7809
lappend ::nettool::blocks 7811 7844
lappend ::nettool::blocks 7848 7868
lappend ::nettool::blocks 7873 7877
lappend ::nettool::blocks 7879 7879
lappend ::nettool::blocks 7881 7886
lappend ::nettool::blocks 7888 7899
lappend ::nettool::blocks 7904 7912
lappend ::nettool::blocks 7914 7931
lappend ::nettool::blocks 7934 7961
lappend ::nettool::blocks 7963 7966
lappend ::nettool::blocks 7968 7978
lappend ::nettool::blocks 7983 7996
lappend ::nettool::blocks 8004 8004
lappend ::nettool::blocks 8006 8007
lappend ::nettool::blocks 8009 8018
lappend ::nettool::blocks 8023 8024
lappend ::nettool::blocks 8027 8031
lappend ::nettool::blocks 8035 8039
lappend ::nettool::blocks 8041 8041
lappend ::nettool::blocks 8045 8050
lappend ::nettool::blocks 8061 8065
lappend ::nettool::blocks 8067 8073
lappend ::nettool::blocks 8075 8079
lappend ::nettool::blocks 8084 8085
lappend ::nettool::blocks 8089 8090
lappend ::nettool::blocks 8092 8096
lappend ::nettool::blocks 8098 8099
lappend ::nettool::blocks 8103 8114
lappend ::nettool::blocks 8119 8120
lappend ::nettool::blocks 8123 8127
lappend ::nettool::blocks 8133 8139
lappend ::nettool::blocks 8141 8147
lappend ::nettool::blocks 8150 8152
lappend ::nettool::blocks 8154 8159
lappend ::nettool::blocks 8163 8180
lappend ::nettool::blocks 8185 8190
lappend ::nettool::blocks 8193 8193
lappend ::nettool::blocks 8196 8198
lappend ::nettool::blocks 8203 8203
lappend ::nettool::blocks 8209 8229
lappend ::nettool::blocks 8231 8242
lappend ::nettool::blocks 8244 8275
lappend ::nettool::blocks 8277 8279
lappend ::nettool::blocks 8281 8291
lappend ::nettool::blocks 8295 8299
lappend ::nettool::blocks 8302 8312
lappend ::nettool::blocks 8314 8319
lappend ::nettool::blocks 8322 8350
lappend ::nettool::blocks 8352 8375
lappend ::nettool::blocks 8381 8382
lappend ::nettool::blocks 8384 8399
lappend ::nettool::blocks 8406 8414
lappend ::nettool::blocks 8418 8441
lappend ::nettool::blocks 8446 8449
lappend ::nettool::blocks 8451 8456
lappend ::nettool::blocks 8458 8469
lappend ::nettool::blocks 8475 8499
lappend ::nettool::blocks 8503 8553
lappend ::nettool::blocks 8556 8566
lappend ::nettool::blocks 8568 8599
lappend ::nettool::blocks 8601 8608
lappend ::nettool::blocks 8616 8664
lappend ::nettool::blocks 8667 8674
lappend ::nettool::blocks 8676 8685
lappend ::nettool::blocks 8687 8687
lappend ::nettool::blocks 8689 8698
lappend ::nettool::blocks 8700 8710
lappend ::nettool::blocks 8712 8731
lappend ::nettool::blocks 8734 8749
lappend ::nettool::blocks 8751 8762
lappend ::nettool::blocks 8767 8769
lappend ::nettool::blocks 8771 8777
lappend ::nettool::blocks 8779 8785
lappend ::nettool::blocks 8788 8792
lappend ::nettool::blocks 8794 8799
lappend ::nettool::blocks 8801 8803
lappend ::nettool::blocks 8805 8872
lappend ::nettool::blocks 8874 8879
lappend ::nettool::blocks 8882 8882
lappend ::nettool::blocks 8884 8887
lappend ::nettool::blocks 8895 8898
lappend ::nettool::blocks 8902 8909
lappend ::nettool::blocks 8914 8936
lappend ::nettool::blocks 8938 8952
lappend ::nettool::blocks 8955 8988
lappend ::nettool::blocks 8992 8997
lappend ::nettool::blocks 9003 9006
lappend ::nettool::blocks 9011 9019
lappend ::nettool::blocks 9027 9049
lappend ::nettool::blocks 9052 9079
lappend ::nettool::blocks 9081 9081
lappend ::nettool::blocks 9094 9099
lappend ::nettool::blocks 9108 9118
lappend ::nettool::blocks 9120 9121
lappend ::nettool::blocks 9124 9130
lappend ::nettool::blocks 9132 9159
lappend ::nettool::blocks 9165 9190
lappend ::nettool::blocks 9192 9199
lappend ::nettool::blocks 9218 9221
lappend ::nettool::blocks 9223 9254
lappend ::nettool::blocks 9256 9276
lappend ::nettool::blocks 9288 9291
lappend ::nettool::blocks 9296 9299
lappend ::nettool::blocks 9301 9305
lappend ::nettool::blocks 9307 9311
lappend ::nettool::blocks 9313 9317
lappend ::nettool::blocks 9319 9320
lappend ::nettool::blocks 9322 9342
lappend ::nettool::blocks 9345 9345
lappend ::nettool::blocks 9347 9373
lappend ::nettool::blocks 9375 9379
lappend ::nettool::blocks 9381 9386
lappend ::nettool::blocks 9391 9395
lappend ::nettool::blocks 9398 9399
lappend ::nettool::blocks 9403 9417
lappend ::nettool::blocks 9419 9442
lappend ::nettool::blocks 9446 9449
lappend ::nettool::blocks 9451 9499
lappend ::nettool::blocks 9501 9521
lappend ::nettool::blocks 9523 9534
lappend ::nettool::blocks 9537 9554
lappend ::nettool::blocks 9556 9591
lappend ::nettool::blocks 9601 9611
lappend ::nettool::blocks 9613 9613
lappend ::nettool::blocks 9615 9615
lappend ::nettool::blocks 9619 9627
lappend ::nettool::blocks 9633 9639
lappend ::nettool::blocks 9641 9665
lappend ::nettool::blocks 9669 9693
lappend ::nettool::blocks 9696 9699
lappend ::nettool::blocks 9701 9746
lappend ::nettool::blocks 9748 9749
lappend ::nettool::blocks 9751 9752
lappend ::nettool::blocks 9754 9761
lappend ::nettool::blocks 9763 9799
lappend ::nettool::blocks 9803 9874
lappend ::nettool::blocks 9877 9877
lappend ::nettool::blocks 9879 9887
lappend ::nettool::blocks 9890 9897
lappend ::nettool::blocks 9904 9908
lappend ::nettool::blocks 9910 9910
lappend ::nettool::blocks 9912 9924
lappend ::nettool::blocks 9926 9949
lappend ::nettool::blocks 9957 9965
lappend ::nettool::blocks 9967 9977
lappend ::nettool::blocks 9979 9986
lappend ::nettool::blocks 9989 9989
lappend ::nettool::blocks 10003 10003
lappend ::nettool::blocks 10011 10022
lappend ::nettool::blocks 10024 10049
lappend ::nettool::blocks 10052 10054
lappend ::nettool::blocks 10056 10079
lappend ::nettool::blocks 10082 10099
lappend ::nettool::blocks 10105 10106
lappend ::nettool::blocks 10108 10109
lappend ::nettool::blocks 10112 10112
lappend ::nettool::blocks 10118 10127
lappend ::nettool::blocks 10130 10159
lappend ::nettool::blocks 10163 10199
lappend ::nettool::blocks 10202 10251
lappend ::nettool::blocks 10253 10259
lappend ::nettool::blocks 10261 10287
lappend ::nettool::blocks 10289 10320
lappend ::nettool::blocks 10322 10438
lappend ::nettool::blocks 10440 10499
lappend ::nettool::blocks 10501 10539
lappend ::nettool::blocks 10545 10630
lappend ::nettool::blocks 10632 10799
lappend ::nettool::blocks 10801 10804
lappend ::nettool::blocks 10806 10808
lappend ::nettool::blocks 10811 10859
lappend ::nettool::blocks 10861 10879
lappend ::nettool::blocks 10881 10989
lappend ::nettool::blocks 10991 10999
lappend ::nettool::blocks 11002 11094
lappend ::nettool::blocks 11096 11102
lappend ::nettool::blocks 11107 11107
lappend ::nettool::blocks 11113 11160
lappend ::nettool::blocks 11166 11170
lappend ::nettool::blocks 11176 11200
lappend ::nettool::blocks 11203 11207
lappend ::nettool::blocks 11209 11210
lappend ::nettool::blocks 11212 11318
lappend ::nettool::blocks 11322 11366
lappend ::nettool::blocks 11368 11370
lappend ::nettool::blocks 11372 11429
lappend ::nettool::blocks 11431 11488
lappend ::nettool::blocks 11490 11599
lappend ::nettool::blocks 11601 11622
lappend ::nettool::blocks 11624 11719
lappend ::nettool::blocks 11721 11722
lappend ::nettool::blocks 11724 11750
lappend ::nettool::blocks 11752 11795
lappend ::nettool::blocks 11797 11875
lappend ::nettool::blocks 11878 11966
lappend ::nettool::blocks 11968 11996
lappend ::nettool::blocks 12011 12011
lappend ::nettool::blocks 12014 12108
lappend ::nettool::blocks 12110 12120
lappend ::nettool::blocks 12122 12167
lappend ::nettool::blocks 12169 12171
lappend ::nettool::blocks 12173 12299
lappend ::nettool::blocks 12301 12301
lappend ::nettool::blocks 12303 12320
lappend ::nettool::blocks 12323 12344
lappend ::nettool::blocks 12346 12752
lappend ::nettool::blocks 12754 12864
lappend ::nettool::blocks 12866 13159
lappend ::nettool::blocks 13161 13215
lappend ::nettool::blocks 13219 13222
lappend ::nettool::blocks 13225 13399
lappend ::nettool::blocks 13401 13719
lappend ::nettool::blocks 13723 13723
lappend ::nettool::blocks 13725 13781
lappend ::nettool::blocks 13784 13784
lappend ::nettool::blocks 13787 13817
lappend ::nettool::blocks 13824 13893
lappend ::nettool::blocks 13895 13928
lappend ::nettool::blocks 13931 13999
lappend ::nettool::blocks 14003 14032
lappend ::nettool::blocks 14035 14140
lappend ::nettool::blocks 14143 14144
lappend ::nettool::blocks 14146 14148
lappend ::nettool::blocks 14151 14153
lappend ::nettool::blocks 14155 14249
lappend ::nettool::blocks 14251 14413
lappend ::nettool::blocks 14415 14935
lappend ::nettool::blocks 14938 14999
lappend ::nettool::blocks 15001 15001
lappend ::nettool::blocks 15003 15117
lappend ::nettool::blocks 15119 15344
lappend ::nettool::blocks 15346 15362
lappend ::nettool::blocks 15364 15554
lappend ::nettool::blocks 15556 15659
lappend ::nettool::blocks 15661 15739
lappend ::nettool::blocks 15741 15997
lappend ::nettool::blocks 16004 16019
lappend ::nettool::blocks 16022 16160
lappend ::nettool::blocks 16163 16308
lappend ::nettool::blocks 16312 16359
lappend ::nettool::blocks 16362 16366
lappend ::nettool::blocks 16369 16383
lappend ::nettool::blocks 16385 16618
lappend ::nettool::blocks 16620 16664
lappend ::nettool::blocks 16667 16899
lappend ::nettool::blocks 16901 16949
lappend ::nettool::blocks 16951 16990
lappend ::nettool::blocks 16996 17006
lappend ::nettool::blocks 17008 17183
lappend ::nettool::blocks 17186 17218
lappend ::nettool::blocks 17223 17233
lappend ::nettool::blocks 17236 17499
lappend ::nettool::blocks 17501 17554
lappend ::nettool::blocks 17556 17728
lappend ::nettool::blocks 17730 17753
lappend ::nettool::blocks 17757 17776
lappend ::nettool::blocks 17778 17999
lappend ::nettool::blocks 18001 18103
lappend ::nettool::blocks 18105 18135
lappend ::nettool::blocks 18137 18180
lappend ::nettool::blocks 18188 18240
lappend ::nettool::blocks 18244 18261
lappend ::nettool::blocks 18263 18462
lappend ::nettool::blocks 18464 18633
lappend ::nettool::blocks 18636 18768
lappend ::nettool::blocks 18770 18880
lappend ::nettool::blocks 18882 18887
lappend ::nettool::blocks 18889 18999
lappend ::nettool::blocks 19001 19006
lappend ::nettool::blocks 19008 19019
lappend ::nettool::blocks 19021 19190
lappend ::nettool::blocks 19192 19193
lappend ::nettool::blocks 19195 19282
lappend ::nettool::blocks 19284 19314
lappend ::nettool::blocks 19316 19397
lappend ::nettool::blocks 19399 19409
lappend ::nettool::blocks 19413 19538
lappend ::nettool::blocks 19542 19787
lappend ::nettool::blocks 19789 19997
lappend ::nettool::blocks 20004 20004
lappend ::nettool::blocks 20006 20011
lappend ::nettool::blocks 20015 20045
lappend ::nettool::blocks 20047 20047
lappend ::nettool::blocks 20050 20166
lappend ::nettool::blocks 20168 20201
lappend ::nettool::blocks 20203 20221
lappend ::nettool::blocks 20223 20479
lappend ::nettool::blocks 20481 20669
lappend ::nettool::blocks 20671 20998
lappend ::nettool::blocks 21001 21009
lappend ::nettool::blocks 21011 21552
lappend ::nettool::blocks 21555 21589
lappend ::nettool::blocks 21591 21799
lappend ::nettool::blocks 21801 21844
lappend ::nettool::blocks 21850 21999
lappend ::nettool::blocks 22006 22124
lappend ::nettool::blocks 22126 22127
lappend ::nettool::blocks 22129 22221
lappend ::nettool::blocks 22223 22272
lappend ::nettool::blocks 22274 22304
lappend ::nettool::blocks 22306 22342
lappend ::nettool::blocks 22344 22346
lappend ::nettool::blocks 22348 22349
lappend ::nettool::blocks 22352 22536
lappend ::nettool::blocks 22538 22554
lappend ::nettool::blocks 22556 22762
lappend ::nettool::blocks 22764 22799
lappend ::nettool::blocks 22801 22950
lappend ::nettool::blocks 22952 22999
lappend ::nettool::blocks 23006 23052
lappend ::nettool::blocks 23054 23271
lappend ::nettool::blocks 23273 23332
lappend ::nettool::blocks 23334 23399
lappend ::nettool::blocks 23403 23455
lappend ::nettool::blocks 23458 23545
lappend ::nettool::blocks 23547 23999
lappend ::nettool::blocks 24007 24241
lappend ::nettool::blocks 24243 24248
lappend ::nettool::blocks 24250 24320
lappend ::nettool::blocks 24323 24464
lappend ::nettool::blocks 24466 24553
lappend ::nettool::blocks 24555 24576
lappend ::nettool::blocks 24578 24675
lappend ::nettool::blocks 24679 24679
lappend ::nettool::blocks 24681 24753
lappend ::nettool::blocks 24755 24849
lappend ::nettool::blocks 24851 24921
lappend ::nettool::blocks 24923 24999
lappend ::nettool::blocks 25010 25470
lappend ::nettool::blocks 25472 25575
lappend ::nettool::blocks 25577 25603
lappend ::nettool::blocks 25605 25792
lappend ::nettool::blocks 25794 25899
lappend ::nettool::blocks 25904 25953
lappend ::nettool::blocks 25956 25999
lappend ::nettool::blocks 26001 26132
lappend ::nettool::blocks 26134 26207
lappend ::nettool::blocks 26209 26259
lappend ::nettool::blocks 26264 26485
lappend ::nettool::blocks 26488 26488
lappend ::nettool::blocks 26490 26999
lappend ::nettool::blocks 27010 27344
lappend ::nettool::blocks 27346 27441
lappend ::nettool::blocks 27443 27503
lappend ::nettool::blocks 27505 27781
lappend ::nettool::blocks 27783 27875
lappend ::nettool::blocks 27877 27998
lappend ::nettool::blocks 28002 28118
lappend ::nettool::blocks 28120 28199
lappend ::nettool::blocks 28201 28239
lappend ::nettool::blocks 28241 29117
lappend ::nettool::blocks 29119 29166
lappend ::nettool::blocks 29170 29998
lappend ::nettool::blocks 30005 30259
lappend ::nettool::blocks 30261 30831
lappend ::nettool::blocks 30833 30998
lappend ::nettool::blocks 31000 31019
lappend ::nettool::blocks 31021 31028
lappend ::nettool::blocks 31030 31399
lappend ::nettool::blocks 31401 31415
lappend ::nettool::blocks 31417 31456
lappend ::nettool::blocks 31458 31619
lappend ::nettool::blocks 31621 31684
lappend ::nettool::blocks 31686 31764
lappend ::nettool::blocks 31766 32033
lappend ::nettool::blocks 32035 32248
lappend ::nettool::blocks 32250 32482
lappend ::nettool::blocks 32484 32634
lappend ::nettool::blocks 32637 32766
lappend ::nettool::blocks 32778 32800
lappend ::nettool::blocks 32802 32810
lappend ::nettool::blocks 32812 32895
lappend ::nettool::blocks 32897 33122
lappend ::nettool::blocks 33124 33330
lappend ::nettool::blocks 33332 33332
lappend ::nettool::blocks 33335 33433
lappend ::nettool::blocks 33435 33655
lappend ::nettool::blocks 33657 34248
lappend ::nettool::blocks 34250 34377
lappend ::nettool::blocks 34380 34566
lappend ::nettool::blocks 34568 34961
lappend ::nettool::blocks 34965 34979
lappend ::nettool::blocks 34981 34999
lappend ::nettool::blocks 35007 35353
lappend ::nettool::blocks 35358 36000
lappend ::nettool::blocks 36002 36411
lappend ::nettool::blocks 36413 36421
lappend ::nettool::blocks 36423 36442
lappend ::nettool::blocks 36445 36523
lappend ::nettool::blocks 36525 36601
lappend ::nettool::blocks 36603 36699
lappend ::nettool::blocks 36701 36864
lappend ::nettool::blocks 36866 37474
lappend ::nettool::blocks 37476 37482
lappend ::nettool::blocks 37484 37653
lappend ::nettool::blocks 37655 37999
lappend ::nettool::blocks 38002 38200
lappend ::nettool::blocks 38204 38799
lappend ::nettool::blocks 38801 38864
lappend ::nettool::blocks 38866 39680
lappend ::nettool::blocks 39682 39999
lappend ::nettool::blocks 40001 40403
lappend ::nettool::blocks 40405 40840
lappend ::nettool::blocks 40844 40852
lappend ::nettool::blocks 40854 41110
lappend ::nettool::blocks 41112 41120
lappend ::nettool::blocks 41122 41793
lappend ::nettool::blocks 41798 42507
lappend ::nettool::blocks 42511 42999
lappend ::nettool::blocks 43001 44320
lappend ::nettool::blocks 44323 44443
lappend ::nettool::blocks 44445 44543
lappend ::nettool::blocks 44545 44552
lappend ::nettool::blocks 44554 44599
lappend ::nettool::blocks 44601 44899
lappend ::nettool::blocks 44901 44999
lappend ::nettool::blocks 45002 45044
lappend ::nettool::blocks 45046 45053
lappend ::nettool::blocks 45055 45677
lappend ::nettool::blocks 45679 45823
lappend ::nettool::blocks 45826 45965
lappend ::nettool::blocks 45967 46997
lappend ::nettool::blocks 47002 47099
lappend ::nettool::blocks 47101 47556
lappend ::nettool::blocks 47558 47623
lappend ::nettool::blocks 47625 47805
lappend ::nettool::blocks 47807 47807
lappend ::nettool::blocks 47810 47999
lappend ::nettool::blocks 48006 48048
lappend ::nettool::blocks 48051 48127
lappend ::nettool::blocks 48130 48555
lappend ::nettool::blocks 48557 48618
lappend ::nettool::blocks 48620 48652
lappend ::nettool::blocks 48654 48999
lappend ::nettool::blocks 49001 65535

Deleted modules/nettool/build/available_ports.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
###
# topic: 868a79cedf28924191fd86aa85f6dd1d
###
namespace eval ::nettool {
  set blocks {}
}

lappend ::nettool::blocks 1028 1028
lappend ::nettool::blocks 1067 1068
lappend ::nettool::blocks 1109 1109
lappend ::nettool::blocks 1138 1138
lappend ::nettool::blocks 1313 1313
lappend ::nettool::blocks 1382 1382
lappend ::nettool::blocks 1385 1385
lappend ::nettool::blocks 1416 1416
lappend ::nettool::blocks 1454 1454
lappend ::nettool::blocks 1461 1461
lappend ::nettool::blocks 1464 1464
lappend ::nettool::blocks 1486 1486
lappend ::nettool::blocks 1491 1491
lappend ::nettool::blocks 1493 1493
lappend ::nettool::blocks 1528 1528
lappend ::nettool::blocks 1556 1556
lappend ::nettool::blocks 1587 1587
lappend ::nettool::blocks 1651 1651
lappend ::nettool::blocks 1783 1783
lappend ::nettool::blocks 1895 1895
lappend ::nettool::blocks 2083 2083
lappend ::nettool::blocks 2194 2196
lappend ::nettool::blocks 2222 2222
lappend ::nettool::blocks 2259 2259
lappend ::nettool::blocks 2340 2340
lappend ::nettool::blocks 2346 2349
lappend ::nettool::blocks 2369 2369
lappend ::nettool::blocks 2377 2378
lappend ::nettool::blocks 2395 2395
lappend ::nettool::blocks 2426 2426
lappend ::nettool::blocks 2446 2446
lappend ::nettool::blocks 2528 2528
lappend ::nettool::blocks 2640 2640
lappend ::nettool::blocks 2654 2654
lappend ::nettool::blocks 2682 2682
lappend ::nettool::blocks 2693 2693
lappend ::nettool::blocks 2794 2794
lappend ::nettool::blocks 2825 2825
lappend ::nettool::blocks 2873 2873
lappend ::nettool::blocks 2916 2917
lappend ::nettool::blocks 2925 2925
lappend ::nettool::blocks 3014 3014
lappend ::nettool::blocks 3016 3019
lappend ::nettool::blocks 3024 3024
lappend ::nettool::blocks 3027 3029
lappend ::nettool::blocks 3050 3050
lappend ::nettool::blocks 3080 3080
lappend ::nettool::blocks 3092 3092
lappend ::nettool::blocks 3126 3126
lappend ::nettool::blocks 3300 3301
lappend ::nettool::blocks 3396 3396
lappend ::nettool::blocks 3403 3404
lappend ::nettool::blocks 3546 3546
lappend ::nettool::blocks 3693 3694
lappend ::nettool::blocks 3876 3876
lappend ::nettool::blocks 3900 3900
lappend ::nettool::blocks 3938 3938
lappend ::nettool::blocks 3970 3970
lappend ::nettool::blocks 3986 3986
lappend ::nettool::blocks 3994 3994
lappend ::nettool::blocks 4000 4000
lappend ::nettool::blocks 4048 4048
lappend ::nettool::blocks 4060 4060
lappend ::nettool::blocks 4065 4065
lappend ::nettool::blocks 4120 4120
lappend ::nettool::blocks 4132 4133
lappend ::nettool::blocks 4140 4140
lappend ::nettool::blocks 4144 4144
lappend ::nettool::blocks 4151 4152
lappend ::nettool::blocks 4184 4184
lappend ::nettool::blocks 4194 4198
lappend ::nettool::blocks 4315 4315
lappend ::nettool::blocks 4317 4319
lappend ::nettool::blocks 4332 4332
lappend ::nettool::blocks 4334 4339
lappend ::nettool::blocks 4363 4367
lappend ::nettool::blocks 4370 4370
lappend ::nettool::blocks 4380 4388
lappend ::nettool::blocks 4397 4399
lappend ::nettool::blocks 4412 4424
lappend ::nettool::blocks 4434 4440
lappend ::nettool::blocks 4459 4483
lappend ::nettool::blocks 4489 4499
lappend ::nettool::blocks 4501 4501
lappend ::nettool::blocks 4503 4533
lappend ::nettool::blocks 4539 4544
lappend ::nettool::blocks 4560 4562
lappend ::nettool::blocks 4564 4565
lappend ::nettool::blocks 4569 4569
lappend ::nettool::blocks 4571 4589
lappend ::nettool::blocks 4606 4657
lappend ::nettool::blocks 4693 4699
lappend ::nettool::blocks 4705 4724
lappend ::nettool::blocks 4734 4736
lappend ::nettool::blocks 4746 4746
lappend ::nettool::blocks 4748 4748
lappend ::nettool::blocks 4754 4783
lappend ::nettool::blocks 4792 4799
lappend ::nettool::blocks 4805 4826
lappend ::nettool::blocks 4828 4836
lappend ::nettool::blocks 4846 4846
lappend ::nettool::blocks 4852 4866
lappend ::nettool::blocks 4872 4875
lappend ::nettool::blocks 4886 4893
lappend ::nettool::blocks 4895 4898
lappend ::nettool::blocks 4903 4911
lappend ::nettool::blocks 4916 4935
lappend ::nettool::blocks 4938 4939
lappend ::nettool::blocks 4943 4948
lappend ::nettool::blocks 4954 4968
lappend ::nettool::blocks 4971 4983
lappend ::nettool::blocks 4992 4998
lappend ::nettool::blocks 5016 5019
lappend ::nettool::blocks 5033 5041
lappend ::nettool::blocks 5076 5077
lappend ::nettool::blocks 5088 5089
lappend ::nettool::blocks 5095 5098
lappend ::nettool::blocks 5107 5110
lappend ::nettool::blocks 5113 5113
lappend ::nettool::blocks 5118 5119
lappend ::nettool::blocks 5121 5132
lappend ::nettool::blocks 5138 5145
lappend ::nettool::blocks 5147 5149
lappend ::nettool::blocks 5151 5151
lappend ::nettool::blocks 5158 5160
lappend ::nettool::blocks 5165 5165
lappend ::nettool::blocks 5169 5171
lappend ::nettool::blocks 5173 5189
lappend ::nettool::blocks 5197 5199
lappend ::nettool::blocks 5204 5208
lappend ::nettool::blocks 5210 5214
lappend ::nettool::blocks 5216 5220
lappend ::nettool::blocks 5238 5244
lappend ::nettool::blocks 5254 5263
lappend ::nettool::blocks 5266 5268
lappend ::nettool::blocks 5273 5279
lappend ::nettool::blocks 5283 5297
lappend ::nettool::blocks 5311 5311
lappend ::nettool::blocks 5316 5316
lappend ::nettool::blocks 5319 5319
lappend ::nettool::blocks 5322 5342
lappend ::nettool::blocks 5345 5348
lappend ::nettool::blocks 5365 5396
lappend ::nettool::blocks 5438 5442
lappend ::nettool::blocks 5444 5444
lappend ::nettool::blocks 5446 5452
lappend ::nettool::blocks 5457 5460
lappend ::nettool::blocks 5466 5499
lappend ::nettool::blocks 5507 5552
lappend ::nettool::blocks 5558 5565
lappend ::nettool::blocks 5570 5572
lappend ::nettool::blocks 5576 5578
lappend ::nettool::blocks 5587 5596
lappend ::nettool::blocks 5606 5617
lappend ::nettool::blocks 5619 5626
lappend ::nettool::blocks 5640 5645
lappend ::nettool::blocks 5647 5669
lappend ::nettool::blocks 5685 5686
lappend ::nettool::blocks 5690 5692
lappend ::nettool::blocks 5694 5695
lappend ::nettool::blocks 5697 5712
lappend ::nettool::blocks 5731 5740
lappend ::nettool::blocks 5749 5749
lappend ::nettool::blocks 5751 5754
lappend ::nettool::blocks 5756 5756
lappend ::nettool::blocks 5758 5765
lappend ::nettool::blocks 5772 5776
lappend ::nettool::blocks 5778 5779
lappend ::nettool::blocks 5788 5792
lappend ::nettool::blocks 5795 5812
lappend ::nettool::blocks 5815 5840
lappend ::nettool::blocks 5843 5858
lappend ::nettool::blocks 5860 5862
lappend ::nettool::blocks 5864 5867
lappend ::nettool::blocks 5869 5882
lappend ::nettool::blocks 5884 5899
lappend ::nettool::blocks 5901 5909
lappend ::nettool::blocks 5914 5962
lappend ::nettool::blocks 5964 5967
lappend ::nettool::blocks 5970 5983
lappend ::nettool::blocks 5993 5998
lappend ::nettool::blocks 6067 6067
lappend ::nettool::blocks 6078 6080
lappend ::nettool::blocks 6089 6098
lappend ::nettool::blocks 6119 6120
lappend ::nettool::blocks 6125 6129
lappend ::nettool::blocks 6131 6132
lappend ::nettool::blocks 6134 6139
lappend ::nettool::blocks 6150 6158
lappend ::nettool::blocks 6164 6199
lappend ::nettool::blocks 6202 6221
lappend ::nettool::blocks 6223 6240
lappend ::nettool::blocks 6245 6250
lappend ::nettool::blocks 6254 6266
lappend ::nettool::blocks 6270 6299
lappend ::nettool::blocks 6301 6305
lappend ::nettool::blocks 6307 6314
lappend ::nettool::blocks 6318 6319
lappend ::nettool::blocks 6323 6323
lappend ::nettool::blocks 6327 6342
lappend ::nettool::blocks 6345 6345
lappend ::nettool::blocks 6348 6349
lappend ::nettool::blocks 6351 6354
lappend ::nettool::blocks 6356 6359
lappend ::nettool::blocks 6361 6362
lappend ::nettool::blocks 6364 6369
lappend ::nettool::blocks 6371 6381
lappend ::nettool::blocks 6383 6388
lappend ::nettool::blocks 6391 6399
lappend ::nettool::blocks 6411 6416
lappend ::nettool::blocks 6422 6431
lappend ::nettool::blocks 6433 6441
lappend ::nettool::blocks 6444 6445
lappend ::nettool::blocks 6447 6454
lappend ::nettool::blocks 6457 6470
lappend ::nettool::blocks 6472 6479
lappend ::nettool::blocks 6490 6499
lappend ::nettool::blocks 6501 6508
lappend ::nettool::blocks 6512 6512
lappend ::nettool::blocks 6516 6542
lappend ::nettool::blocks 6545 6546
lappend ::nettool::blocks 6552 6557
lappend ::nettool::blocks 6559 6565
lappend ::nettool::blocks 6569 6578
lappend ::nettool::blocks 6584 6599
lappend ::nettool::blocks 6603 6618
lappend ::nettool::blocks 6629 6631
lappend ::nettool::blocks 6635 6639
lappend ::nettool::blocks 6641 6652
lappend ::nettool::blocks 6654 6654
lappend ::nettool::blocks 6658 6664
lappend ::nettool::blocks 6672 6677
lappend ::nettool::blocks 6680 6686
lappend ::nettool::blocks 6690 6695
lappend ::nettool::blocks 6698 6700
lappend ::nettool::blocks 6707 6713
lappend ::nettool::blocks 6717 6766
lappend ::nettool::blocks 6772 6776
lappend ::nettool::blocks 6779 6783
lappend ::nettool::blocks 6792 6800
lappend ::nettool::blocks 6802 6816
lappend ::nettool::blocks 6818 6830
lappend ::nettool::blocks 6832 6840
lappend ::nettool::blocks 6843 6849
lappend ::nettool::blocks 6851 6867
lappend ::nettool::blocks 6869 6887
lappend ::nettool::blocks 6889 6900
lappend ::nettool::blocks 6902 6934
lappend ::nettool::blocks 6937 6945
lappend ::nettool::blocks 6947 6950
lappend ::nettool::blocks 6952 6960
lappend ::nettool::blocks 6967 6968
lappend ::nettool::blocks 6971 6996
lappend ::nettool::blocks 7016 7017
lappend ::nettool::blocks 7026 7029
lappend ::nettool::blocks 7032 7039
lappend ::nettool::blocks 7041 7069
lappend ::nettool::blocks 7072 7072
lappend ::nettool::blocks 7074 7079
lappend ::nettool::blocks 7081 7094
lappend ::nettool::blocks 7096 7098
lappend ::nettool::blocks 7102 7106
lappend ::nettool::blocks 7108 7120
lappend ::nettool::blocks 7122 7127
lappend ::nettool::blocks 7130 7160
lappend ::nettool::blocks 7175 7180
lappend ::nettool::blocks 7182 7199
lappend ::nettool::blocks 7202 7226
lappend ::nettool::blocks 7230 7234
lappend ::nettool::blocks 7238 7261
lappend ::nettool::blocks 7263 7271
lappend ::nettool::blocks 7284 7299
lappend ::nettool::blocks 7360 7364
lappend ::nettool::blocks 7366 7390
lappend ::nettool::blocks 7396 7396
lappend ::nettool::blocks 7398 7399
lappend ::nettool::blocks 7403 7409
lappend ::nettool::blocks 7412 7420
lappend ::nettool::blocks 7422 7425
lappend ::nettool::blocks 7432 7436
lappend ::nettool::blocks 7438 7442
lappend ::nettool::blocks 7444 7470
lappend ::nettool::blocks 7472 7472
lappend ::nettool::blocks 7475 7490
lappend ::nettool::blocks 7492 7499
lappend ::nettool::blocks 7502 7507
lappend ::nettool::blocks 7512 7541
lappend ::nettool::blocks 7551 7559
lappend ::nettool::blocks 7561 7562
lappend ::nettool::blocks 7564 7565
lappend ::nettool::blocks 7567 7568
lappend ::nettool::blocks 7571 7573
lappend ::nettool::blocks 7575 7587
lappend ::nettool::blocks 7589 7623
lappend ::nettool::blocks 7625 7625
lappend ::nettool::blocks 7632 7632
lappend ::nettool::blocks 7634 7647
lappend ::nettool::blocks 7649 7671
lappend ::nettool::blocks 7678 7679
lappend ::nettool::blocks 7681 7688
lappend ::nettool::blocks 7690 7696
lappend ::nettool::blocks 7698 7699
lappend ::nettool::blocks 7701 7706
lappend ::nettool::blocks 7709 7719
lappend ::nettool::blocks 7721 7723
lappend ::nettool::blocks 7728 7733
lappend ::nettool::blocks 7735 7737
lappend ::nettool::blocks 7739 7740
lappend ::nettool::blocks 7745 7746
lappend ::nettool::blocks 7748 7776
lappend ::nettool::blocks 7780 7780
lappend ::nettool::blocks 7782 7785
lappend ::nettool::blocks 7788 7788
lappend ::nettool::blocks 7790 7793
lappend ::nettool::blocks 7795 7796
lappend ::nettool::blocks 7803 7809
lappend ::nettool::blocks 7811 7844
lappend ::nettool::blocks 7848 7868
lappend ::nettool::blocks 7873 7877
lappend ::nettool::blocks 7879 7879
lappend ::nettool::blocks 7881 7886
lappend ::nettool::blocks 7888 7899
lappend ::nettool::blocks 7904 7912
lappend ::nettool::blocks 7914 7931
lappend ::nettool::blocks 7934 7961
lappend ::nettool::blocks 7963 7966
lappend ::nettool::blocks 7968 7978
lappend ::nettool::blocks 7983 7996
lappend ::nettool::blocks 8004 8004
lappend ::nettool::blocks 8006 8007
lappend ::nettool::blocks 8009 8018
lappend ::nettool::blocks 8023 8024
lappend ::nettool::blocks 8027 8031
lappend ::nettool::blocks 8035 8039
lappend ::nettool::blocks 8041 8041
lappend ::nettool::blocks 8045 8050
lappend ::nettool::blocks 8061 8065
lappend ::nettool::blocks 8067 8073
lappend ::nettool::blocks 8075 8079
lappend ::nettool::blocks 8084 8085
lappend ::nettool::blocks 8089 8090
lappend ::nettool::blocks 8092 8096
lappend ::nettool::blocks 8098 8099
lappend ::nettool::blocks 8103 8114
lappend ::nettool::blocks 8119 8120
lappend ::nettool::blocks 8123 8127
lappend ::nettool::blocks 8133 8139
lappend ::nettool::blocks 8141 8147
lappend ::nettool::blocks 8150 8152
lappend ::nettool::blocks 8154 8159
lappend ::nettool::blocks 8163 8180
lappend ::nettool::blocks 8185 8190
lappend ::nettool::blocks 8193 8193
lappend ::nettool::blocks 8196 8198
lappend ::nettool::blocks 8203 8203
lappend ::nettool::blocks 8209 8229
lappend ::nettool::blocks 8231 8242
lappend ::nettool::blocks 8244 8275
lappend ::nettool::blocks 8277 8279
lappend ::nettool::blocks 8281 8291
lappend ::nettool::blocks 8295 8299
lappend ::nettool::blocks 8302 8312
lappend ::nettool::blocks 8314 8319
lappend ::nettool::blocks 8322 8350
lappend ::nettool::blocks 8352 8375
lappend ::nettool::blocks 8381 8382
lappend ::nettool::blocks 8384 8399
lappend ::nettool::blocks 8406 8414
lappend ::nettool::blocks 8418 8441
lappend ::nettool::blocks 8446 8449
lappend ::nettool::blocks 8451 8456
lappend ::nettool::blocks 8458 8469
lappend ::nettool::blocks 8475 8499
lappend ::nettool::blocks 8503 8553
lappend ::nettool::blocks 8556 8566
lappend ::nettool::blocks 8568 8599
lappend ::nettool::blocks 8601 8608
lappend ::nettool::blocks 8616 8664
lappend ::nettool::blocks 8667 8674
lappend ::nettool::blocks 8676 8685
lappend ::nettool::blocks 8687 8687
lappend ::nettool::blocks 8689 8698
lappend ::nettool::blocks 8700 8710
lappend ::nettool::blocks 8712 8731
lappend ::nettool::blocks 8734 8749
lappend ::nettool::blocks 8751 8762
lappend ::nettool::blocks 8767 8769
lappend ::nettool::blocks 8771 8777
lappend ::nettool::blocks 8779 8785
lappend ::nettool::blocks 8788 8792
lappend ::nettool::blocks 8794 8799
lappend ::nettool::blocks 8801 8803
lappend ::nettool::blocks 8805 8872
lappend ::nettool::blocks 8874 8879
lappend ::nettool::blocks 8882 8882
lappend ::nettool::blocks 8884 8887
lappend ::nettool::blocks 8895 8898
lappend ::nettool::blocks 8902 8909
lappend ::nettool::blocks 8914 8936
lappend ::nettool::blocks 8938 8952
lappend ::nettool::blocks 8955 8988
lappend ::nettool::blocks 8992 8997
lappend ::nettool::blocks 9003 9006
lappend ::nettool::blocks 9011 9019
lappend ::nettool::blocks 9027 9049
lappend ::nettool::blocks 9052 9079
lappend ::nettool::blocks 9081 9081
lappend ::nettool::blocks 9094 9099
lappend ::nettool::blocks 9108 9118
lappend ::nettool::blocks 9120 9121
lappend ::nettool::blocks 9124 9130
lappend ::nettool::blocks 9132 9159
lappend ::nettool::blocks 9165 9190
lappend ::nettool::blocks 9192 9199
lappend ::nettool::blocks 9218 9221
lappend ::nettool::blocks 9223 9254
lappend ::nettool::blocks 9256 9276
lappend ::nettool::blocks 9288 9291
lappend ::nettool::blocks 9296 9299
lappend ::nettool::blocks 9301 9305
lappend ::nettool::blocks 9307 9311
lappend ::nettool::blocks 9313 9317
lappend ::nettool::blocks 9319 9320
lappend ::nettool::blocks 9322 9342
lappend ::nettool::blocks 9345 9345
lappend ::nettool::blocks 9347 9373
lappend ::nettool::blocks 9375 9379
lappend ::nettool::blocks 9381 9386
lappend ::nettool::blocks 9391 9395
lappend ::nettool::blocks 9398 9399
lappend ::nettool::blocks 9403 9417
lappend ::nettool::blocks 9419 9442
lappend ::nettool::blocks 9446 9449
lappend ::nettool::blocks 9451 9499
lappend ::nettool::blocks 9501 9521
lappend ::nettool::blocks 9523 9534
lappend ::nettool::blocks 9537 9554
lappend ::nettool::blocks 9556 9591
lappend ::nettool::blocks 9601 9611
lappend ::nettool::blocks 9613 9613
lappend ::nettool::blocks 9615 9615
lappend ::nettool::blocks 9619 9627
lappend ::nettool::blocks 9633 9639
lappend ::nettool::blocks 9641 9665
lappend ::nettool::blocks 9669 9693
lappend ::nettool::blocks 9696 9699
lappend ::nettool::blocks 9701 9746
lappend ::nettool::blocks 9748 9749
lappend ::nettool::blocks 9751 9752
lappend ::nettool::blocks 9754 9761
lappend ::nettool::blocks 9763 9799
lappend ::nettool::blocks 9803 9874
lappend ::nettool::blocks 9877 9877
lappend ::nettool::blocks 9879 9887
lappend ::nettool::blocks 9890 9897
lappend ::nettool::blocks 9904 9908
lappend ::nettool::blocks 9910 9910
lappend ::nettool::blocks 9912 9924
lappend ::nettool::blocks 9926 9949
lappend ::nettool::blocks 9957 9965
lappend ::nettool::blocks 9967 9977
lappend ::nettool::blocks 9979 9986
lappend ::nettool::blocks 9989 9989
lappend ::nettool::blocks 10003 10003
lappend ::nettool::blocks 10011 10022
lappend ::nettool::blocks 10024 10049
lappend ::nettool::blocks 10052 10054
lappend ::nettool::blocks 10056 10079
lappend ::nettool::blocks 10082 10099
lappend ::nettool::blocks 10105 10106
lappend ::nettool::blocks 10108 10109
lappend ::nettool::blocks 10112 10112
lappend ::nettool::blocks 10118 10127
lappend ::nettool::blocks 10130 10159
lappend ::nettool::blocks 10163 10199
lappend ::nettool::blocks 10202 10251
lappend ::nettool::blocks 10253 10259
lappend ::nettool::blocks 10261 10287
lappend ::nettool::blocks 10289 10320
lappend ::nettool::blocks 10322 10438
lappend ::nettool::blocks 10440 10499
lappend ::nettool::blocks 10501 10539
lappend ::nettool::blocks 10545 10630
lappend ::nettool::blocks 10632 10799
lappend ::nettool::blocks 10801 10804
lappend ::nettool::blocks 10806 10808
lappend ::nettool::blocks 10811 10859
lappend ::nettool::blocks 10861 10879
lappend ::nettool::blocks 10881 10989
lappend ::nettool::blocks 10991 10999
lappend ::nettool::blocks 11002 11094
lappend ::nettool::blocks 11096 11102
lappend ::nettool::blocks 11107 11107
lappend ::nettool::blocks 11113 11160
lappend ::nettool::blocks 11166 11170
lappend ::nettool::blocks 11176 11200
lappend ::nettool::blocks 11203 11207
lappend ::nettool::blocks 11209 11210
lappend ::nettool::blocks 11212 11318
lappend ::nettool::blocks 11322 11366
lappend ::nettool::blocks 11368 11370
lappend ::nettool::blocks 11372 11429
lappend ::nettool::blocks 11431 11488
lappend ::nettool::blocks 11490 11599
lappend ::nettool::blocks 11601 11622
lappend ::nettool::blocks 11624 11719
lappend ::nettool::blocks 11721 11722
lappend ::nettool::blocks 11724 11750
lappend ::nettool::blocks 11752 11795
lappend ::nettool::blocks 11797 11875
lappend ::nettool::blocks 11878 11966
lappend ::nettool::blocks 11968 11996
lappend ::nettool::blocks 12011 12011
lappend ::nettool::blocks 12014 12108
lappend ::nettool::blocks 12110 12120
lappend ::nettool::blocks 12122 12167
lappend ::nettool::blocks 12169 12171
lappend ::nettool::blocks 12173 12299
lappend ::nettool::blocks 12301 12301
lappend ::nettool::blocks 12303 12320
lappend ::nettool::blocks 12323 12344
lappend ::nettool::blocks 12346 12752
lappend ::nettool::blocks 12754 12864
lappend ::nettool::blocks 12866 13159
lappend ::nettool::blocks 13161 13215
lappend ::nettool::blocks 13219 13222
lappend ::nettool::blocks 13225 13399
lappend ::nettool::blocks 13401 13719
lappend ::nettool::blocks 13723 13723
lappend ::nettool::blocks 13725 13781
lappend ::nettool::blocks 13784 13784
lappend ::nettool::blocks 13787 13817
lappend ::nettool::blocks 13824 13893
lappend ::nettool::blocks 13895 13928
lappend ::nettool::blocks 13931 13999
lappend ::nettool::blocks 14003 14032
lappend ::nettool::blocks 14035 14140
lappend ::nettool::blocks 14143 14144
lappend ::nettool::blocks 14146 14148
lappend ::nettool::blocks 14151 14153
lappend ::nettool::blocks 14155 14249
lappend ::nettool::blocks 14251 14413
lappend ::nettool::blocks 14415 14935
lappend ::nettool::blocks 14938 14999
lappend ::nettool::blocks 15001 15001
lappend ::nettool::blocks 15003 15117
lappend ::nettool::blocks 15119 15344
lappend ::nettool::blocks 15346 15362
lappend ::nettool::blocks 15364 15554
lappend ::nettool::blocks 15556 15659
lappend ::nettool::blocks 15661 15739
lappend ::nettool::blocks 15741 15997
lappend ::nettool::blocks 16004 16019
lappend ::nettool::blocks 16022 16160
lappend ::nettool::blocks 16163 16308
lappend ::nettool::blocks 16312 16359
lappend ::nettool::blocks 16362 16366
lappend ::nettool::blocks 16369 16383
lappend ::nettool::blocks 16385 16618
lappend ::nettool::blocks 16620 16664
lappend ::nettool::blocks 16667 16899
lappend ::nettool::blocks 16901 16949
lappend ::nettool::blocks 16951 16990
lappend ::nettool::blocks 16996 17006
lappend ::nettool::blocks 17008 17183
lappend ::nettool::blocks 17186 17218
lappend ::nettool::blocks 17223 17233
lappend ::nettool::blocks 17236 17499
lappend ::nettool::blocks 17501 17554
lappend ::nettool::blocks 17556 17728
lappend ::nettool::blocks 17730 17753
lappend ::nettool::blocks 17757 17776
lappend ::nettool::blocks 17778 17999
lappend ::nettool::blocks 18001 18103
lappend ::nettool::blocks 18105 18135
lappend ::nettool::blocks 18137 18180
lappend ::nettool::blocks 18188 18240
lappend ::nettool::blocks 18244 18261
lappend ::nettool::blocks 18263 18462
lappend ::nettool::blocks 18464 18633
lappend ::nettool::blocks 18636 18768
lappend ::nettool::blocks 18770 18880
lappend ::nettool::blocks 18882 18887
lappend ::nettool::blocks 18889 18999
lappend ::nettool::blocks 19001 19006
lappend ::nettool::blocks 19008 19019
lappend ::nettool::blocks 19021 19190
lappend ::nettool::blocks 19192 19193
lappend ::nettool::blocks 19195 19282
lappend ::nettool::blocks 19284 19314
lappend ::nettool::blocks 19316 19397
lappend ::nettool::blocks 19399 19409
lappend ::nettool::blocks 19413 19538
lappend ::nettool::blocks 19542 19787
lappend ::nettool::blocks 19789 19997
lappend ::nettool::blocks 20004 20004
lappend ::nettool::blocks 20006 20011
lappend ::nettool::blocks 20015 20045
lappend ::nettool::blocks 20047 20047
lappend ::nettool::blocks 20050 20166
lappend ::nettool::blocks 20168 20201
lappend ::nettool::blocks 20203 20221
lappend ::nettool::blocks 20223 20479
lappend ::nettool::blocks 20481 20669
lappend ::nettool::blocks 20671 20998
lappend ::nettool::blocks 21001 21009
lappend ::nettool::blocks 21011 21552
lappend ::nettool::blocks 21555 21589
lappend ::nettool::blocks 21591 21799
lappend ::nettool::blocks 21801 21844
lappend ::nettool::blocks 21850 21999
lappend ::nettool::blocks 22006 22124
lappend ::nettool::blocks 22126 22127
lappend ::nettool::blocks 22129 22221
lappend ::nettool::blocks 22223 22272
lappend ::nettool::blocks 22274 22304
lappend ::nettool::blocks 22306 22342
lappend ::nettool::blocks 22344 22346
lappend ::nettool::blocks 22348 22349
lappend ::nettool::blocks 22352 22536
lappend ::nettool::blocks 22538 22554
lappend ::nettool::blocks 22556 22762
lappend ::nettool::blocks 22764 22799
lappend ::nettool::blocks 22801 22950
lappend ::nettool::blocks 22952 22999
lappend ::nettool::blocks 23006 23052
lappend ::nettool::blocks 23054 23271
lappend ::nettool::blocks 23273 23332
lappend ::nettool::blocks 23334 23399
lappend ::nettool::blocks 23403 23455
lappend ::nettool::blocks 23458 23545
lappend ::nettool::blocks 23547 23999
lappend ::nettool::blocks 24007 24241
lappend ::nettool::blocks 24243 24248
lappend ::nettool::blocks 24250 24320
lappend ::nettool::blocks 24323 24464
lappend ::nettool::blocks 24466 24553
lappend ::nettool::blocks 24555 24576
lappend ::nettool::blocks 24578 24675
lappend ::nettool::blocks 24679 24679
lappend ::nettool::blocks 24681 24753
lappend ::nettool::blocks 24755 24849
lappend ::nettool::blocks 24851 24921
lappend ::nettool::blocks 24923 24999
lappend ::nettool::blocks 25010 25470
lappend ::nettool::blocks 25472 25575
lappend ::nettool::blocks 25577 25603
lappend ::nettool::blocks 25605 25792
lappend ::nettool::blocks 25794 25899
lappend ::nettool::blocks 25904 25953
lappend ::nettool::blocks 25956 25999
lappend ::nettool::blocks 26001 26132
lappend ::nettool::blocks 26134 26207
lappend ::nettool::blocks 26209 26259
lappend ::nettool::blocks 26264 26485
lappend ::nettool::blocks 26488 26488
lappend ::nettool::blocks 26490 26999
lappend ::nettool::blocks 27010 27344
lappend ::nettool::blocks 27346 27441
lappend ::nettool::blocks 27443 27503
lappend ::nettool::blocks 27505 27781
lappend ::nettool::blocks 27783 27875
lappend ::nettool::blocks 27877 27998
lappend ::nettool::blocks 28002 28118
lappend ::nettool::blocks 28120 28199
lappend ::nettool::blocks 28201 28239
lappend ::nettool::blocks 28241 29117
lappend ::nettool::blocks 29119 29166
lappend ::nettool::blocks 29170 29998
lappend ::nettool::blocks 30005 30259
lappend ::nettool::blocks 30261 30831
lappend ::nettool::blocks 30833 30998
lappend ::nettool::blocks 31000 31019
lappend ::nettool::blocks 31021 31028
lappend ::nettool::blocks 31030 31399
lappend ::nettool::blocks 31401 31415
lappend ::nettool::blocks 31417 31456
lappend ::nettool::blocks 31458 31619
lappend ::nettool::blocks 31621 31684
lappend ::nettool::blocks 31686 31764
lappend ::nettool::blocks 31766 32033
lappend ::nettool::blocks 32035 32248
lappend ::nettool::blocks 32250 32482
lappend ::nettool::blocks 32484 32634
lappend ::nettool::blocks 32637 32766
lappend ::nettool::blocks 32778 32800
lappend ::nettool::blocks 32802 32810
lappend ::nettool::blocks 32812 32895
lappend ::nettool::blocks 32897 33122
lappend ::nettool::blocks 33124 33330
lappend ::nettool::blocks 33332 33332
lappend ::nettool::blocks 33335 33433
lappend ::nettool::blocks 33435 33655
lappend ::nettool::blocks 33657 34248
lappend ::nettool::blocks 34250 34377
lappend ::nettool::blocks 34380 34566
lappend ::nettool::blocks 34568 34961
lappend ::nettool::blocks 34965 34979
lappend ::nettool::blocks 34981 34999
lappend ::nettool::blocks 35007 35353
lappend ::nettool::blocks 35358 36000
lappend ::nettool::blocks 36002 36411
lappend ::nettool::blocks 36413 36421
lappend ::nettool::blocks 36423 36442
lappend ::nettool::blocks 36445 36523
lappend ::nettool::blocks 36525 36601
lappend ::nettool::blocks 36603 36699
lappend ::nettool::blocks 36701 36864
lappend ::nettool::blocks 36866 37474
lappend ::nettool::blocks 37476 37482
lappend ::nettool::blocks 37484 37653
lappend ::nettool::blocks 37655 37999
lappend ::nettool::blocks 38002 38200
lappend ::nettool::blocks 38204 38799
lappend ::nettool::blocks 38801 38864
lappend ::nettool::blocks 38866 39680
lappend ::nettool::blocks 39682 39999
lappend ::nettool::blocks 40001 40403
lappend ::nettool::blocks 40405 40840
lappend ::nettool::blocks 40844 40852
lappend ::nettool::blocks 40854 41110
lappend ::nettool::blocks 41112 41120
lappend ::nettool::blocks 41122 41793
lappend ::nettool::blocks 41798 42507
lappend ::nettool::blocks 42511 42999
lappend ::nettool::blocks 43001 44320
lappend ::nettool::blocks 44323 44443
lappend ::nettool::blocks 44445 44543
lappend ::nettool::blocks 44545 44552
lappend ::nettool::blocks 44554 44599
lappend ::nettool::blocks 44601 44899
lappend ::nettool::blocks 44901 44999
lappend ::nettool::blocks 45002 45044
lappend ::nettool::blocks 45046 45053
lappend ::nettool::blocks 45055 45677
lappend ::nettool::blocks 45679 45823
lappend ::nettool::blocks 45826 45965
lappend ::nettool::blocks 45967 46997
lappend ::nettool::blocks 47002 47099
lappend ::nettool::blocks 47101 47556
lappend ::nettool::blocks 47558 47623
lappend ::nettool::blocks 47625 47805
lappend ::nettool::blocks 47807 47807
lappend ::nettool::blocks 47810 47999
lappend ::nettool::blocks 48006 48048
lappend ::nettool::blocks 48051 48127
lappend ::nettool::blocks 48130 48555
lappend ::nettool::blocks 48557 48618
lappend ::nettool::blocks 48620 48652
lappend ::nettool::blocks 48654 48999
lappend ::nettool::blocks 49001 65535

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/nettool/build/build.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
set srcdir [file dirname [file normalize [file join [pwd] [info script]]]]
set moddir [file dirname $srcdir]

set version 0.5.2
set tclversion 8.5
set module [file tail $moddir]

proc ::ladd {varname args} {
  upvar 1 $varname var
  if ![info exists var] {
      set var {}
  }
  foreach item $args {
    if {$item in $var} continue
    lappend var $item
  }
  return $var
}

dict set map %module% $module
dict set map %version% $version
dict set map %tclversion% $tclversion
dict set map {    } {}
dict set map "\t" {    }

###
# Rebuild the available ports file
###
###
# topic: 65dfea29d424543cdfc0e1cbf9f90295ef6214cb
# description:
#    This script digests the raw data from
#    http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv
#    And produces a summary
###
proc ::record {service port type usage} {
  if { $port eq {} } return
  if {$service eq {} && $type in {tcp udp {}} && $usage != "Reserved"} {
    ladd ::available_port($port) {*}$type
    return
  }
  unset -nocomplain ::available_port($port)
  lappend ::busy_port($port) $type $usage
  #puts [list busy $service $port $type $usage]
}

for {set x 0} {$x < 65536} {incr x} {
  set ::available_port($x) {}
}
package require dicttool
package require csv
set fin [open [file join $srcdir service-names-port-numbers.csv] r]
set headers [gets $fin]
set thisline {}
while {[gets $fin line]>=0} {
  append thisline \n$line
  if {![csv::iscomplete $line]} continue
  set lline [csv::split $line]
  if [catch {
  set service [lindex $lline 0]
  set port [lindex $lline 1]
  set type [lindex $lline 2]
  set usage [lindex $lline 3]

  }] continue
  if {![string is integer -strict $port]} {
    set startport [lindex [split $port -] 0]
    set endport [lindex [split $port -] 1]
    if {[string is integer -strict $startport] && [string is integer -strict $endport]} {
      for {set i $startport} {$i<=$endport}  {incr i}  {
        record $service $i $type $usage
      }
      continue
    }
  }
  record $service $port $type $usage
}
close $fin

set fout [open [file join $moddir available_ports.tcl] w]
puts $fout {
namespace eval ::nettool {
  set blocks {}
}
}
set startport 0
set endport 0

foreach port [lsort -integer [array names  available_port]] {
  set avail $available_port($port)
  # Don't bother with ports below 1024
  # Most operating systems won't let us access them anyway
  if {$port < 1024 } continue
  if { $endport == ($port-1) } {
    set endport $port
    continue
  }
  if {$startport} {
    puts $fout [list lappend ::nettool::blocks $startport $endport]
  }
  set startport $port
  set endport $port
}
if { $startport } {
  puts $fout [list lappend ::nettool::blocks $startport $endport]
}
close $fout

set fout [open [file join $moddir [file tail $module].tcl] w]
puts $fout [string map $map {###
    # Amalgamated package for %module%
    # Do not edit directly, tweak the source in src/ and rerun
    # build.tcl
    ###
    package require Tcl %tclversion%
    package provide %module% %version%
    namespace eval ::%module% {}
    set ::%module%::version %version%
}]

# Track what files we have included so far
set loaded {}
lappend loaded build.tcl
# These files must be loaded in a particular order
foreach file {
  core.tcl
  generic.tcl
  available_ports.tcl
  locateport.tcl
  platform_unix.tcl
  platform_unix_linux.tcl
  platform_unix_macosx.tcl
  platform_windows.tcl
  platform_windows_twapi.tcl
} {
  lappend loaded $file
  set fin [open [file join $srcdir $file] r]
  puts $fout "###\n# START: [file tail $file]\n###"
  puts $fout [read $fin]
  close $fin
  puts $fout "###\n# END: [file tail $file]\n###"
}

# These files can be loaded in any order
foreach file [glob [file join $srcdir *.tcl]] {
  if {[file tail $file] in $loaded} continue
  lappend loaded $file
  set fin [open [file join $srcdir $file] r]
  puts $fout "###\n# START: [file tail $file]\n###"
  puts $fout [read $fin]
  close $fin
  puts $fout "###\n# END: [file tail $file]\n###"
}

# Provide some cleanup and our final package provide
puts $fout [string map $map {
    namespace eval ::%module% {
	namespace export *
    }
    ###
    # Perform any one-time discovery we might need
    ###
    ::nettool::discover
    ::nettool::init
}]
close $fout

###
# Build our pkgIndex.tcl file
###
set fout [open [file join $moddir pkgIndex.tcl] w]
puts $fout [string map $map {
    if {![package vsatisfies [package provide Tcl] %tclversion%]} {return}
    # Backward compatible alias
    package ifneeded nettool::available_ports 0.1 {package require %module% ; package provide nettool::available_ports 0.1}
    package ifneeded %module% %version% [list source [file join $dir %module%.tcl]]
}]
close $fout
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































Deleted modules/nettool/build/core.tcl.

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
# @mdgen OWNER: generic.tcl
# @mdgen OWNER: available_ports.tcl
# @mdgen OWNER: locateport.tcl
# @mdgen OWNER: platform_unix_linux.tcl
# @mdgen OWNER: platform_unix_macosx.tcl
# @mdgen OWNER: platform_unix.tcl
# @mdgen OWNER: platform_windows.tcl


package require platform
# Uses the "ip" package from tcllib
package require ip

if {[info commands ::ladd] eq {}} {
  proc ::ladd {varname args} {
    upvar 1 $varname var
    if ![info exists var] {
        set var {}
    }
    foreach item $args {
      if {$item in $var} continue
      lappend var $item
    }
    return $var
  }
}
if {[info commands ::get] eq {}} {
  proc ::get varname {
    upvar 1 $varname var
    if {[info exists var]} {
      return [set var]
    }
    return {}
  }
}
if {[info commands ::cat] eq {}} {
  proc ::cat filename {
    set fin [open $filename r]
    set dat [read $fin]
    close $fin
    return $dat
  }
}


set here [file dirname [file normalize [info script]]]

::namespace eval ::nettool {}

set genus [lindex [split [::platform::generic] -] 0]
dict set ::nettool::platform tcl_os  $::tcl_platform(os)
dict set ::nettool::platform odie_class   $::tcl_platform(platform)
dict set ::nettool::platform odie_genus   $genus
dict set ::nettool::platform odie_target  [::platform::generic]
dict set ::nettool::platform odie_species [::platform::identify]


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































Deleted modules/nettool/build/generic.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
::namespace eval ::nettool {}

###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
###
proc ::nettool::arp_table {} {}

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  return 127.0.0.1
}

###
# topic: 15d9bc96ec6ce31d4c8f99a425a9c02c
# description: Return Processor utilization
###
proc ::nettool::busy {} {}

###
# topic: 187cfa1827097c5cdf1c40c656cedfcc
# description: Return time since booted
###
proc ::nettool::cpuinfo {} {}

###
# Clear discovered info
###
proc ::nettool::discover {} {
  unset -nocomplain ::nettool::ipinfo ::nettool::macinfo
}

###
# topic: 58295f2544f43827e855d09dc3ee625a
###
proc ::nettool::diskless_client {} {
  return 0
}

###
# topic: 57fdc331bc60c7bf2bd3f3214e9a906f
###
proc ::nettool::hwaddr_to_ipaddr {hwaddr args} {}

###
# topic: dd2e2c0810cea69909399808f2a68949
# title: Return a list of unique hardware ids
###
proc ::nettool::hwid_list {} {
  set result {}
  foreach mac [::nettool::mac_list] {
    lappend result 0x[string map {: {}} $mac]
  }
  if {[llength $result]} {
    return $result
  }
  return 0x010203040506
}

###
# topic: 4b87d977492bd10802bfc0327cd07ac2
# title: Return list of network interfaces
###
proc ::nettool::if_list {} {}

###
# topic: d2932eb0ea8cc9f6a865c1ab7cdd4572
# description:
#    Called on package load to build any static
#    structures to cache data that would be time
#    consuming to call on the fly
###
proc ::nettool::init {} {}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
proc ::nettool::ip_list {} {}

###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {}

###
# topic: c42343f20e3afd2884a5dd1c219e4415
###
proc ::nettool::platform {} {
  variable platform
  return $platform
}

proc ::nettool::user_data_root {appname} {
  return [file join $::env(HOME) .$appname]
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































Deleted modules/nettool/build/locateport.tcl.

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
::namespace eval ::nettool {}

###
# topic: fc6f8b9587dd5524f143f9df4be4755b63eb6cd5
###
proc ::nettool::allocate_port startingport {
  foreach {start end} $::nettool::blocks {
    if { $end <= $startingport } continue
    if { $start > $startingport } {
      set i $start
    } else {
      set i $startingport
    }
    for {} {$i <= $end} {incr i} {
      if {[string is true -strict [get ::nettool::used_ports($i)]]} continue
      if {[catch {socket -server NOOP $i} chan]} continue
      close $chan
      set ::nettool::used_ports($i) 1
      return $i
    }
  }
  error "Could not locate a port"
}

###
# topic: 3286fdbd0a3fdebbb26414475754bcf3dea67b0f
###
proc ::nettool::claim_port {port {protocol tcp}} {
  set ::nettool::used_ports($port) 1
}

###
# topic: 1d1f8a65a9aef8765c9b4f2b0ee0ebaf42e99d46
###
proc ::nettool::find_port startingport {
  foreach {start end} $::nettool::blocks {
    if { $end <= $startingport } continue
    if { $start > $startingport } {
      set i $start
    } else {
      set i $startingport
    }
    for {} {$i <= $end} {incr i} {
      if {[string is true -strict [get ::nettool::used_ports($i)]]} continue
      return $i
    }
  }
  error "Could not locate a port"
}

###
# topic: ded1c51260e009effb1f77044f8d0dec3d030b91
###
proc ::nettool::port_busy port {
  ###
  # Check our private list of used ports
  ###
  if {[string is true -strict [get ::nettool::used_ports($port)]]} {
    return 1
  }
  foreach {start end} $::nettool::blocks {
    if { $port >= $start && $port <= $end } {
      return 0
    }
  }
  return 1
}

###
# topic: b5407b084aa09f9efa4f58a337af6186418fddf2
###
proc ::nettool::release_port {port {protocol tcp}} {
  set ::nettool::used_ports($port) 0
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Deleted modules/nettool/build/platform_unix.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
###
# Generic answers that can be answered on most if not all unix platforms
###

if {$::tcl_platform(platform) eq "unix"} {
###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
# description: Under unix, we call the arp command for arp table resolution
###
proc ::nettool::arp_table {} {
  set result {}
  set dat [exec arp -a]
  foreach line [split $dat \n] {
    set host [lindex $line 0]
    set ip [lindex $line 1]
    set macid [lindex $line 3]
    lappend result $macid [string range $ip 1 end-1]
  }
  return $result
}
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































Deleted modules/nettool/build/platform_unix_linux.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
if {$::tcl_platform(platform) eq "unix" && $genus eq "linux"} {

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  set result {}
  lappend result 127.0.0.1
  foreach {iface info} [dump] {
    if {[dict exists $info ipv4 Bcast:]} {
      lappend result [dict get $info ipv4 Bcast:]
    }
  }
  return [lsort -unique -dictionary $result]
}

###
# topic: 187cfa1827097c5cdf1c40c656cedfcc
# description: Return time since booted
###
proc ::nettool::cpuinfo args {
  variable cpuinfo
  if {![info exists cpuinfo]} {
    set cpuinfo {}
    set dat [cat /proc/meminfo]
    foreach line [split $dat \n] {
      switch [lindex $line 0] {
        MemTotal: {
          # Normalize to MB
          dict set cpuinfo memory [lindex $line 1]/1024
        }
      }
    }
    set cpus 0
    set dat [cat /proc/cpuinfo]
    foreach line [split $dat \n] {
      set idx [string first : $line]
      set field [string trim [string range $line 0 $idx-1]]
      set value [string trim [string range $line $idx+1 end]]
      switch $field {
        processor {
          incr cpus
        }
        {cpu family} {
          dict set cpuinfo family $value
        }
        model {
          dict set cpuinfo model $value
        }
        stepping {
          dict set cpuinfo stepping $value
        }
        vendor_id {
          dict set cpuinfo vendor $value
        }
        {model name} {
          dict set cpuinfo brand $value
        }
        {cpu MHz} {
          dict set cpuinfo speed $value
        }
        flags {
          dict set cpuinfo features $value
        }
      }
    }
    dict set cpuinfo cpus $cpus
  }
  if {$args eq "<list>"} {
    return [dict keys $cpuinfo]
  }
  if {[llength $args]==0} {
    return $cpuinfo
  }
  if {[llength $args]==1} {
    return [dict get $cpuinfo [lindex $args 0]]
  }
  set result {}
  foreach item $args {
    if {[dict exists $cpuinfo $item]} {
      dict set result $item [dict get $cpuinfo $item]
    } else {
      dict set result $item {}
    }
  }
  return $result
}

###
# topic: aa8eda4fb59296a1a34d8d600ca54e28
# description: Dump interfaces
###
proc ::nettool::dump {} {
  set data [exec ifconfig]
  set iface {}
  set result {}
  foreach line [split $data \n] {
    if {[string index $line 0] in {" " "\t"} } {
      # Indented line appends the prior iface
      switch [lindex $line 0] {
        inet {
          foreach tuple [lrange $line 1 end] {
	    set idx [string first : $tuple]
            set field [string trim [string range $tuple 0 $idx]]
            set value [string trim [string range $tuple $idx+1 end]]
            dict set result $iface ipv4 [string trim $field] [string trim $value]
          }
        }
        inet6 {
          dict set result $iface ipv6 addr: [lindex $line 2]
          foreach tuple [lrange $line 3 end] {
	    set idx [string first : $tuple]
            set field [string trim [string range $tuple 0 $idx]]
            set value [string trim [string range $tuple $idx+1 end]]
            dict set result $iface ipv6 [string trim $field] [string trim $value]
          }
	}
      }
    } else {
      # Non-intended line - new iface
      set iface [lindex $line 0]
      set idx [lsearch $line HWaddr]
      if {$idx >= 0 } {
        dict set result $iface ether: [lindex $line $idx+1]
      }
    }
  }
  return $result
}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
proc ::nettool::ip_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info ipv4 addr:]} {
      lappend result [dict get $info ipv4 addr:]
    }
  }
  ldelete result 127.0.0.1
  return $result
}

###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info ether:]} {
      lappend result [dict get $info ether:]
    }
  }
  return $result
}

###
# topic: a43b6f42141820e0ba1094840d0f6fc0
###
proc ::nettool::network_list {} {
  foreach {iface info} [dump] {
    if {![dict exists $info ipv4 addr:]} continue
    if {![dict exists $info ipv4 Mask:]} continue
    #set mask [::ip::maskToInt $netmask]
    set addr [dict get $info ipv4 addr:]
    set mask [dict get $info ipv4 Mask:]
    set addri [::ip::toInteger $addr]
    lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $mask] -ipv4]
  }
  return $result
}

###
# topic: e7db1ae1b5b98a1bb4384f0a4fe81f42
###
proc ::nettool::status {} {
  set result {}
  set dat [cat /proc/loadavg]
  dict set result load_average    [lrange $dat 0 2]
  set cpus [cpuinfo cpus].0
  dict set result load [expr {[lindex $dat 0]/$cpus}]

  set processes [split [lindex $dat 3] /]
  dict set result processes_running [lindex $processes 0]
  dict set result processes_total [lindex $processes 1]

  set dat [cat /proc/meminfo]
  foreach line [split $dat \n] {
    switch [lindex $line 0] {
      MemTotal: {
        # Normalize to MB
        dict set result memory_total [expr {[lindex $line 1]/1024}]
      }
      MemFree: {
        # Normalize to MB
        dict set result memory_free [expr {[lindex $line 1]/1024}]
      }
    }
  }
  return $result
}

###
# topic: 59bf977ad7287b4d90346fad639aed34
###
proc ::nettool::uptime_report {} {
  set result {}
  set dat [split [exec uptime] ,]
  puts $dat
  dict set result time   [lindex [lindex $dat 0] 0]
  dict set result uptime [lrange [lindex $dat 0] 1 end]
  dict set result users  [lindex [lindex $dat 2] 0]
  dict set result load_1_minute  [lindex [lindex $dat 3] end]
  dict set result load_5_minute  [lindex [lindex $dat 4] end]
  dict set result load_15_minute  [lindex [lindex $dat 5] end]
  return $result
}

unset -nocomplain ::nettool::cpuinfo
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































Deleted modules/nettool/build/platform_unix_macosx.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
if {$::tcl_platform(platform) eq "unix" && $genus eq "macosx"} {

###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
# description: Under macosx, we call the arp command for arp table resolution
###
proc ::nettool::arp_table {} {
  set result {}
  set dat [exec arp -a]
  foreach line [split $dat \n] {
    set host [lindex $line 0]
    set ip [lindex $line 1]
    set macid [lindex $line 3]
    lappend result $macid [string range $ip 1 end-1]
  }
  return $result
}

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  set result {}
  lappend result 127.0.0.1
  foreach {iface info} [dump] {
    if {[dict exists $info broadcast:]} {
      lappend result [dict get $info broadcast:]
    }
  }
  return [lsort -unique -dictionary $result]
}

###
# topic: 187cfa1827097c5cdf1c40c656cedfcc
# description: Return time since booted
###
proc ::nettool::cpuinfo args {
  variable cpuinfo
  if {![info exists cpuinfo]} {
    set cpuinfo {}
    dict set cpuinfo machine  [exec sysctl -n hw.machine]
    dict set cpuinfo cpus     [exec sysctl -n hw.ncpu]
    # Normalize to MB
    dict set cpuinfo memory   [expr {[exec sysctl -n hw.memsize] / 1048576}]

    dict set cpuinfo vendor   [exec sysctl -n machdep.cpu.vendor]
    dict set cpuinfo brand    [exec sysctl -n machdep.cpu.brand_string]

    dict set cpuinfo model    [exec sysctl -n machdep.cpu.model]
    dict set cpuinfo speed    [expr {[exec sysctl -n hw.cpufrequency]/1000000}]

    dict set cpuinfo family   [exec sysctl -n machdep.cpu.family]
    dict set cpuinfo stepping [exec sysctl -n machdep.cpu.stepping]
    dict set cpuinfo features [exec sysctl -n machdep.cpu.features]
    dict set cpuinfo diskless []
  }
  if {$args eq "<list>"} {
    return [dict keys $cpuinfo]
  }
  if {[llength $args]==0} {
    return $cpuinfo
  }
  if {[llength $args]==1} {
    return [dict get $cpuinfo [lindex $args 0]]
  }
  set result {}
  foreach item $args {
    if {[dict exists $cpuinfo $item]} {
      dict set result $item [dict get $cpuinfo $item]
    } else {
      dict set result $item {}
    }
  }
  return $result
}

###
# topic: aa8eda4fb59296a1a34d8d600ca54e28
# description: Dump interfaces
###
proc ::nettool::dump {} {
  set data [exec ifconfig]
  set iface {}
  set result {}
  foreach line [split $data \n] {
    if {[string index $line 0] in {" " "\t"} } {
      # Indented line appends the prior iface
      foreach {field value} $line {
        dict set result $iface [string trimright $field :]: $value
      }
    } else {
      # Non-intended line - new iface
      set iface [lindex $line 0]
    }
  }
  return $result
}

###
# topic: dd2e2c0810cea69909399808f2a68949
# title: Return a list of unique hardware addresses
###
proc ::nettool::hwid_list {} {
  variable cached_data
  set result {}
  if {![info exists cached_data]} {
    if {[catch {exec system_profiler SPHardwareDataType} hwlist]} {
      set cached_data {}
    } else {
      set cached_data $hwlist

    }
  }
  set serial {}
  set hwuuid {}
  set result {}
  catch {
  foreach line [split $cached_data \n] {
    if { [lindex $line 0] == "Serial" && [lindex $line 1] == "Number" } {
      set serial [lindex $line end]
    }
    if { [lindex $line 0] == "Hardware" && [lindex $line 1] == "UUID:" } {
      set hwuuid [lindex $line end]
    }
  }
  }
  if { $hwuuid != {} } {
    lappend result 0x[string map {- {}} $hwuuid]
  }
  # Blank serial number?
  if { $serial != {} } {
    set sn [binary scan $serial H* hash]
    lappend result 0x$hash
  }
  if {[llength $result]} {
    return $result
  }
  foreach mac [::nettool::mac_list] {
    lappend result 0x[string map {: {}} $mac]
  }
  if {[llength $result]} {
    return $result
  }
  return 0x010203040506
}

###
# topic: d2932eb0ea8cc9f6a865c1ab7cdd4572
# description:
#    Called on package load to build any static
#    structures to cache data that would be time
#    consuming to call on the fly
###
proc ::nettool::init {} {
  unset -nocomplain [namespace current]::cpuinfo

}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
proc ::nettool::ip_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info inet:]} {
      lappend result [dict get $info inet:]
    }
  }
  ldelete result 127.0.0.1
  return $result
}

###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info ether:]} {
      lappend result [dict get $info ether:]
    }
  }
  return $result
}

###
# topic: a43b6f42141820e0ba1094840d0f6fc0
###
proc ::nettool::network_list {} {
  foreach {iface info} [dump] {
    if {![dict exists $info inet:]} continue
    if {![dict exists $info netmask:]} continue
    #set mask [::ip::maskToInt $netmask]
    set addr [dict get $info inet:]
    set mask [dict get $info netmask:]
    set addri [::ip::toInteger $addr]
    lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $mask] -ipv4]
  }
  return $result
}

###
# topic: e7db1ae1b5b98a1bb4384f0a4fe81f42
###
proc ::nettool::status {} {
  set result {}
  set loaddat [lindex [exec sysctl -n vm.loadavg] 0]
  set cpus [cpuinfo cpus]
  dict set result cpus $cpus
  dict set result load [expr {[lindex $loaddat 0]*100.0/$cpus}]
  dict set result load_average_1 [lindex $loaddat 0]
  dict set result load_average_5 [lindex $loaddat 1]
  dict set result load_average_15 [lindex $loaddat 2]

  set total [exec sysctl -n hw.memsize]
  dict set result memory_total [expr {$total / 1048576}]
  set used 0
  foreach {amt} [exec sysctl -n machdep.memmap] {
    incr used $amt
  }
  dict set result memory_free [expr {($total - $used) / 1048576}]

  return $result
}

proc ::nettool::user_data_root {appname} {
  return [file join $::env(HOME) Library {Application Support} $appname]
}
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































Deleted modules/nettool/build/platform_windows.tcl.

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
89
90
91
92
93
if {$::tcl_platform(platform) eq "windows"} {

###
# topic: dd2e2c0810cea69909399808f2a68949
# title: Return a list of unique hardware ids
###
proc ::nettool::hwid_list {} {
  # Use the serial number on the hard drive
  catch {exec {*}[auto_execok vol] c:} voldat
  set num [lindex [lindex [split $voldat \n] end] end]
  return 0x[string map {- {}} $num]
}

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  set result {}
  lappend result 127.0.0.1
  foreach net [network_list] {
    if {$net in {224.0.0.0/4 127.0.0.0/8}} continue
    lappend result [::ip::broadcastAddress $net]
  }
  return [lsort -unique -dictionary $result]
}

###
# Provide a limited subset using data gleaned from exec
# These calls work in Windows NT 4 and above
###


proc ::nettool::IPINFO {} {
  if {![info exists ::nettool::ipinfo]} {
    set ::nettool::ipinfo [exec ipconfig /all]
  }
  return $::nettool::ipinfo
}

proc ::nettool::if_list {} {
  return [mac_list]
}

proc ::nettool::ip_list {} {
  set result {}
  foreach line [split [IPINFO] \n] {
    if {![regexp {IPv4 Address} $line]} continue
    set line [string range $line [string first ":" $line]+2 end]
    if {[scan $line %d.%d.%d.%d A B C D]!=4} continue
    lappend result $A.$B.$C.$D
  }
  return $result
}

proc ::nettool::mac_list {} {
  set result {}
  foreach line [split [IPINFO] \n] {
    if {![regexp {Physical Address} $line]} continue
    set line [string range $line [string first ":" $line]+2 end]
    if {[scan $line %02x-%02x-%02x-%02x-%02x-%02x A B C D E F] != 6} continue
    if {$A==0 && $B==0 && $C==0 && $D==0 && $E==0 && $F==0} continue
    lappend result [format %02x:%02x:%02x:%02x:%02x:%02x $A $B $C $D $E $F]
  }
  return $result
}

proc ::nettool::network_list {} {
  set masks {}
  foreach line [split [IPINFO] \n] {
    if {![regexp {Subnet Mask} $line]} continue
    set line [string range $line [string first ":" $line]+2 end]
    if {[scan $line %d.%d.%d.%d A B C D]!=4} continue
    lappend masks $A.$B.$C.$D
  }
  set result {}
  set idx -1
  foreach addr [ip_list] {
    set netmask [lindex $masks [incr idx]]
    set mask   [::ip::maskToInt $netmask]
    set addri [::ip::toInteger $addr]
    lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $netmask] -ipv4]
  }
  return $result
}

proc ::nettool::status {} {
}

proc ::nettool::user_data_root {appname} {
  return [file join $::env(APPDATA) $appname]
}
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































Deleted modules/nettool/build/platform_windows_twapi.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
if {$::tcl_platform(platform) eq "windows" && ![catch {package require twapi}]} {
# TWAPI Based implementation

::namespace eval ::nettool {}

###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
# description: Under macosx, we call the arp command for arp table resolution
###
proc ::nettool::arp_table {} {
  set result {}
  catch {
  foreach element [::twapi::get_arp_table] {
    foreach {ifidx macid ipaddr type} {
      lappend result [string map {- :} $macid] $ipaddr
    }
  }
  }
  return $result
}


###
# topic: 57fdc331bc60c7bf2bd3f3214e9a906f
###
proc ::nettool::hwaddr_to_ipaddr args {
  return [::twapi::hwaddr_to_ipaddr {*}$args]
}



if {[info command ::twapi::get_netif_indices] ne {}} {
###
# topic: 4b87d977492bd10802bfc0327cd07ac2
# title: Return list of network interfaces
###
proc ::nettool::if_list {} {
  return [::twapi::get_netif_indices]
}


###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {
  set result {}
  foreach iface [::twapi::get_netif_indices] {
    foreach {field value} [::twapi::get_netif_info $iface -physicaladdress] {
      if { $value eq {} } continue
      lappend result [string map {- :} $value]
    }
  }
  return $result
}

###
# topic: a43b6f42141820e0ba1094840d0f6fc0
###
proc ::nettool::network_list {} {
  set result {}
  foreach iface [::twapi::get_netif_indices] {
    set dat [::twapi::GetIpAddrTable $iface]
    foreach element $dat {
      foreach {addr ifindx netmask broadcast reamsize} $element break;
      set mask [::ip::maskToInt $netmask]
      set addri [::ip::toInteger $addr]
      lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $netmask] -ipv4]
    }
  }
  return [lsort -unique $result]
}
} else {

if {[info commands ::twapi::get_network_adapters] ne {}} {
proc ::nettool::if_list {} {
  return [::twapi::get_network_adapters]
}
}

if {[info commands ::twapi::get_network_adapter_info] ne {}} {
proc ::nettool::mac_list {} {

  set result {}
  foreach iface [if_list] {
    set dat [::twapi::get_network_adapter_info $iface -physicaladdress]
    set addr [string map {- :} [lindex $dat 1]]
    if {[string length $addr] eq 0} continue
    if {[string range $addr 0 5] eq "00:00:"} continue
    lappend result $addr
  }
  return $result
}

proc ::nettool::network_list {} {
  set result {}
  foreach iface [if_list] {
    set dat [::twapi::get_network_adapter_info $iface -prefixes]
    foreach kvlist [lindex $dat 1] {
      if {![dict exists $kvlist -address]} continue
      if {![dict exists $kvlist -prefixlength]} continue
      set length [dict get $kvlist -prefixlength]
      if {$length>31} continue
      set address [dict get $kvlist -address]
      if {[string range $address 0 1] eq "ff"} continue
      lappend result $address/$length
    }
  }
  return [lsort -unique $result]
}

}
}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
set body {}
if {[info commands ::twapi::get_ip_addresses] ne {}} {
proc ::nettool::ip_list {} {
  set result [::twapi::get_ip_addresses]
  ldelete result 127.0.0.1
  return $result
}
} elseif {[info commands ::twapi::get_system_ipaddrs] ne {}} {
# They changed commands names on me...
if {[catch {::twapi::get_system_ipaddrs -version 4}]} {
# THEY CHANGED THE API ON ME!
proc ::nettool::ip_list {} {
  set result [::twapi::get_system_ipaddrs -ipversion 4]
  ldelete result 127.0.0.1
  return $result
}
} else {
proc ::nettool::ip_list {} {
  set result [::twapi::get_system_ipaddrs -version 4]
  ldelete result 127.0.0.1
  return $result
}
}
}


proc ::nettool::status {} {
  set result {}
  #dict set result load [::twapi::]
  set cpus [::twapi::get_processor_count]
  set usage 0
  for {set p 0} {$p < $cpus} {incr p} {
    if [catch {
    set pu  [lindex [::twapi::get_processor_info $p  -processorutilization] 1]
    while {$pu eq {}} {
      after 100 {set pause 0}
      vwait pause
      set pu  [lindex [::twapi::get_processor_info $p  -processorutilization] 1]
    }
    set usage [expr {$usage+$pu}]
    } err] {
      set usage -1
    }
  }
  dict set result cpus $cpus
  dict set result load [expr {$usage/$cpus}]
  dict set result uptime [::twapi::get_system_uptime]
}
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































Deleted modules/nettool/build/service-names-port-numbers.csv.

more than 10,000 changes

Added modules/nettool/generic.tcl.





































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
::namespace eval ::nettool {}

###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
###
proc ::nettool::arp_table {} {}

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  return 127.0.0.1
}

###
# topic: 15d9bc96ec6ce31d4c8f99a425a9c02c
# description: Return Processor utilization
###
proc ::nettool::busy {} {}

###
# topic: 187cfa1827097c5cdf1c40c656cedfcc
# description: Return time since booted
###
proc ::nettool::cpuinfo {} {}

###
# topic: 58295f2544f43827e855d09dc3ee625a
###
proc ::nettool::diskless_client {} {
  return 0
}

###
# topic: 57fdc331bc60c7bf2bd3f3214e9a906f
###
proc ::nettool::hwaddr_to_ipaddr {hwaddr args} {}

###
# topic: dd2e2c0810cea69909399808f2a68949
# title: Return a list of unique hardware ids
###
proc ::nettool::hwid_list {} {
  set result {}
  foreach mac [::nettool::mac_list] {
    lappend result 0x[string map {: {}} $mac]
  }
  if {[llength $result]} {
    return $result
  }
  return 0x010203040506
}

###
# topic: 4b87d977492bd10802bfc0327cd07ac2
# title: Return list of network interfaces
###
proc ::nettool::if_list {} {}

###
# topic: d2932eb0ea8cc9f6a865c1ab7cdd4572
# description:
#    Called on package load to build any static
#    structures to cache data that would be time
#    consuming to call on the fly
###
proc ::nettool::init {} {}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
proc ::nettool::ip_list {} {}

###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {}

###
# topic: c42343f20e3afd2884a5dd1c219e4415
###
proc ::nettool::platform {} {
  variable platform
  return $platform
}

proc ::nettool::user_data_root {appname} {
  return [file join $::env(HOME) .$appname]
}

###
# Provide empty implementations
###

Added modules/nettool/locateport.tcl.























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
::namespace eval ::nettool {}

###
# topic: fc6f8b9587dd5524f143f9df4be4755b63eb6cd5
###
proc ::nettool::allocate_port startingport {
  foreach {start end} $::nettool::blocks {
    if { $end <= $startingport } continue
    if { $start > $startingport } {
      set i $start
    } else {
      set i $startingport
    }
    for {} {$i <= $end} {incr i} {
      if {[string is true -strict [get ::nettool::used_ports($i)]]} continue
      if {[catch {socket -server NOOP $i} chan]} continue
      close $chan
      set ::nettool::used_ports($i) 1
      return $i
    }
  }
  error "Could not locate a port"
}

###
# topic: 3286fdbd0a3fdebbb26414475754bcf3dea67b0f
###
proc ::nettool::claim_port {port {protocol tcp}} {
  set ::nettool::used_ports($port) 1
}

###
# topic: 1d1f8a65a9aef8765c9b4f2b0ee0ebaf42e99d46
###
proc ::nettool::find_port startingport {
  foreach {start end} $::nettool::blocks {
    if { $end <= $startingport } continue
    if { $start > $startingport } {
      set i $start
    } else {
      set i $startingport
    }
    for {} {$i <= $end} {incr i} {
      if {[string is true -strict [get ::nettool::used_ports($i)]]} continue
      return $i
    }
  }
  error "Could not locate a port"
}

###
# topic: ded1c51260e009effb1f77044f8d0dec3d030b91
###
proc ::nettool::port_busy port {
  ###
  # Check our private list of used ports
  ###
  if {[string is true -strict [get ::nettool::used_ports($port)]]} {
    return 1
  }
  foreach {start end} $::nettool::blocks {
    if { $port >= $start && $port <= $end } {
      return 0
    }
  }
  return 1
}

###
# topic: b5407b084aa09f9efa4f58a337af6186418fddf2
###
proc ::nettool::release_port {port {protocol tcp}} {
  set ::nettool::used_ports($port) 0
}

Changes to modules/nettool/nettool.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 0.5.2]
[manpage_begin nettool n [vset PACKAGE_VERSION]]
[keywords {nettool}]
[keywords {odie}]
[copyright {2015-2018 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {nettool}]
[titledesc {Tools for networked applications}]
[category  System]
[require Tcl 8.5]
[require nettool [opt [vset PACKAGE_VERSION]]]
[require twapi 3.1]
[require ip 0.1]

|



|







1
2
3
4
5
6
7
8
9
10
11
12
13
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 0.5.1]
[manpage_begin nettool n [vset PACKAGE_VERSION]]
[keywords {nettool}]
[keywords {odie}]
[copyright {2015 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {nettool}]
[titledesc {Tools for networked applications}]
[category  System]
[require Tcl 8.5]
[require nettool [opt [vset PACKAGE_VERSION]]]
[require twapi 3.1]
[require ip 0.1]
135
136
137
138
139
140
141
142
143

Return a fully qualified path to a folder where [arg appname] should store it's data.
The path is not created, only computed, by this command.

[list_end]
[para]
[vset CATEGORY odie]
[include ../common-text/feedback.inc]
[manpage_end]







|

135
136
137
138
139
140
141
142
143

Return a fully qualified path to a folder where [arg appname] should store it's data.
The path is not created, only computed, by this command.

[list_end]
[para]
[vset CATEGORY odie]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/nettool/nettool.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
###
# Amalgamated package for nettool
# Do not edit directly, tweak the source in src/ and rerun
# build.tcl
###
package require Tcl 8.5
package provide nettool 0.5.2
namespace eval ::nettool {}
set ::nettool::version 0.5.2

###
# START: core.tcl
###
# @mdgen OWNER: generic.tcl
# @mdgen OWNER: available_ports.tcl
# @mdgen OWNER: locateport.tcl
# @mdgen OWNER: platform_unix_linux.tcl
# @mdgen OWNER: platform_unix_macosx.tcl
# @mdgen OWNER: platform_unix.tcl
# @mdgen OWNER: platform_windows.tcl
<
<
<
<
<
<
<
<
<
<
<
<
<




















1
2
3
4
5
6
7













# @mdgen OWNER: generic.tcl
# @mdgen OWNER: available_ports.tcl
# @mdgen OWNER: locateport.tcl
# @mdgen OWNER: platform_unix_linux.tcl
# @mdgen OWNER: platform_unix_macosx.tcl
# @mdgen OWNER: platform_unix.tcl
# @mdgen OWNER: platform_windows.tcl
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619

620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723

724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
set genus [lindex [split [::platform::generic] -] 0]
dict set ::nettool::platform tcl_os  $::tcl_platform(os)
dict set ::nettool::platform odie_class   $::tcl_platform(platform)
dict set ::nettool::platform odie_genus   $genus
dict set ::nettool::platform odie_target  [::platform::generic]
dict set ::nettool::platform odie_species [::platform::identify]



###
# END: core.tcl
###
###
# START: generic.tcl
###
::namespace eval ::nettool {}

###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
###
proc ::nettool::arp_table {} {}

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  return 127.0.0.1
}

###
# topic: 15d9bc96ec6ce31d4c8f99a425a9c02c
# description: Return Processor utilization
###
proc ::nettool::busy {} {}

###
# topic: 187cfa1827097c5cdf1c40c656cedfcc
# description: Return time since booted
###
proc ::nettool::cpuinfo {} {}

###
# Clear discovered info
###
proc ::nettool::discover {} {
  unset -nocomplain ::nettool::ipinfo ::nettool::macinfo
}

###
# topic: 58295f2544f43827e855d09dc3ee625a
###
proc ::nettool::diskless_client {} {
  return 0
}

###
# topic: 57fdc331bc60c7bf2bd3f3214e9a906f
###
proc ::nettool::hwaddr_to_ipaddr {hwaddr args} {}

###
# topic: dd2e2c0810cea69909399808f2a68949
# title: Return a list of unique hardware ids
###
proc ::nettool::hwid_list {} {
  set result {}
  foreach mac [::nettool::mac_list] {
    lappend result 0x[string map {: {}} $mac]
  }
  if {[llength $result]} {
    return $result
  }
  return 0x010203040506
}

###
# topic: 4b87d977492bd10802bfc0327cd07ac2
# title: Return list of network interfaces
###
proc ::nettool::if_list {} {}

###
# topic: d2932eb0ea8cc9f6a865c1ab7cdd4572
# description:
#    Called on package load to build any static
#    structures to cache data that would be time
#    consuming to call on the fly
###
proc ::nettool::init {} {}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
proc ::nettool::ip_list {} {}

###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {}

###
# topic: c42343f20e3afd2884a5dd1c219e4415
###
proc ::nettool::platform {} {
  variable platform
  return $platform
}

proc ::nettool::user_data_root {appname} {
  return [file join $::env(HOME) .$appname]
}

###
# END: generic.tcl
###
###
# START: available_ports.tcl
###
###
# topic: 868a79cedf28924191fd86aa85f6dd1d
###
namespace eval ::nettool {
  set blocks {}
}

lappend ::nettool::blocks 1028 1028
lappend ::nettool::blocks 1067 1068
lappend ::nettool::blocks 1109 1109
lappend ::nettool::blocks 1138 1138
lappend ::nettool::blocks 1313 1313
lappend ::nettool::blocks 1382 1382
lappend ::nettool::blocks 1385 1385
lappend ::nettool::blocks 1416 1416
lappend ::nettool::blocks 1454 1454
lappend ::nettool::blocks 1461 1461
lappend ::nettool::blocks 1464 1464
lappend ::nettool::blocks 1486 1486
lappend ::nettool::blocks 1491 1491
lappend ::nettool::blocks 1493 1493
lappend ::nettool::blocks 1528 1528
lappend ::nettool::blocks 1556 1556
lappend ::nettool::blocks 1587 1587
lappend ::nettool::blocks 1651 1651
lappend ::nettool::blocks 1783 1783
lappend ::nettool::blocks 1895 1895
lappend ::nettool::blocks 2083 2083
lappend ::nettool::blocks 2194 2196
lappend ::nettool::blocks 2222 2222
lappend ::nettool::blocks 2259 2259
lappend ::nettool::blocks 2340 2340
lappend ::nettool::blocks 2346 2349
lappend ::nettool::blocks 2369 2369
lappend ::nettool::blocks 2377 2378
lappend ::nettool::blocks 2395 2395
lappend ::nettool::blocks 2426 2426
lappend ::nettool::blocks 2446 2446
lappend ::nettool::blocks 2528 2528
lappend ::nettool::blocks 2640 2640
lappend ::nettool::blocks 2654 2654
lappend ::nettool::blocks 2682 2682
lappend ::nettool::blocks 2693 2693
lappend ::nettool::blocks 2794 2794
lappend ::nettool::blocks 2825 2825
lappend ::nettool::blocks 2873 2873
lappend ::nettool::blocks 2916 2917
lappend ::nettool::blocks 2925 2925
lappend ::nettool::blocks 3014 3014
lappend ::nettool::blocks 3016 3019
lappend ::nettool::blocks 3024 3024
lappend ::nettool::blocks 3027 3029
lappend ::nettool::blocks 3050 3050
lappend ::nettool::blocks 3080 3080
lappend ::nettool::blocks 3092 3092
lappend ::nettool::blocks 3126 3126
lappend ::nettool::blocks 3300 3301
lappend ::nettool::blocks 3396 3396
lappend ::nettool::blocks 3403 3404
lappend ::nettool::blocks 3546 3546
lappend ::nettool::blocks 3693 3694
lappend ::nettool::blocks 3876 3876
lappend ::nettool::blocks 3900 3900
lappend ::nettool::blocks 3938 3938
lappend ::nettool::blocks 3970 3970
lappend ::nettool::blocks 3986 3986
lappend ::nettool::blocks 3994 3994
lappend ::nettool::blocks 4000 4000
lappend ::nettool::blocks 4048 4048
lappend ::nettool::blocks 4060 4060
lappend ::nettool::blocks 4065 4065
lappend ::nettool::blocks 4120 4120
lappend ::nettool::blocks 4132 4133
lappend ::nettool::blocks 4140 4140
lappend ::nettool::blocks 4144 4144
lappend ::nettool::blocks 4151 4152
lappend ::nettool::blocks 4184 4184
lappend ::nettool::blocks 4194 4198
lappend ::nettool::blocks 4315 4315
lappend ::nettool::blocks 4317 4319
lappend ::nettool::blocks 4332 4332
lappend ::nettool::blocks 4334 4339
lappend ::nettool::blocks 4363 4367
lappend ::nettool::blocks 4370 4370
lappend ::nettool::blocks 4380 4388
lappend ::nettool::blocks 4397 4399
lappend ::nettool::blocks 4412 4424
lappend ::nettool::blocks 4434 4440
lappend ::nettool::blocks 4459 4483
lappend ::nettool::blocks 4489 4499
lappend ::nettool::blocks 4501 4501
lappend ::nettool::blocks 4503 4533
lappend ::nettool::blocks 4539 4544
lappend ::nettool::blocks 4560 4562
lappend ::nettool::blocks 4564 4565
lappend ::nettool::blocks 4569 4569
lappend ::nettool::blocks 4571 4589
lappend ::nettool::blocks 4606 4657
lappend ::nettool::blocks 4693 4699
lappend ::nettool::blocks 4705 4724
lappend ::nettool::blocks 4734 4736
lappend ::nettool::blocks 4746 4746
lappend ::nettool::blocks 4748 4748
lappend ::nettool::blocks 4754 4783
lappend ::nettool::blocks 4792 4799
lappend ::nettool::blocks 4805 4826
lappend ::nettool::blocks 4828 4836
lappend ::nettool::blocks 4846 4846
lappend ::nettool::blocks 4852 4866
lappend ::nettool::blocks 4872 4875
lappend ::nettool::blocks 4886 4893
lappend ::nettool::blocks 4895 4898
lappend ::nettool::blocks 4903 4911
lappend ::nettool::blocks 4916 4935
lappend ::nettool::blocks 4938 4939
lappend ::nettool::blocks 4943 4948
lappend ::nettool::blocks 4954 4968
lappend ::nettool::blocks 4971 4983
lappend ::nettool::blocks 4992 4998
lappend ::nettool::blocks 5016 5019
lappend ::nettool::blocks 5033 5041
lappend ::nettool::blocks 5076 5077
lappend ::nettool::blocks 5088 5089
lappend ::nettool::blocks 5095 5098
lappend ::nettool::blocks 5107 5110
lappend ::nettool::blocks 5113 5113
lappend ::nettool::blocks 5118 5119
lappend ::nettool::blocks 5121 5132
lappend ::nettool::blocks 5138 5145
lappend ::nettool::blocks 5147 5149
lappend ::nettool::blocks 5151 5151
lappend ::nettool::blocks 5158 5160
lappend ::nettool::blocks 5165 5165
lappend ::nettool::blocks 5169 5171
lappend ::nettool::blocks 5173 5189
lappend ::nettool::blocks 5197 5199
lappend ::nettool::blocks 5204 5208
lappend ::nettool::blocks 5210 5214
lappend ::nettool::blocks 5216 5220
lappend ::nettool::blocks 5238 5244
lappend ::nettool::blocks 5254 5263
lappend ::nettool::blocks 5266 5268
lappend ::nettool::blocks 5273 5279
lappend ::nettool::blocks 5283 5297
lappend ::nettool::blocks 5311 5311
lappend ::nettool::blocks 5316 5316
lappend ::nettool::blocks 5319 5319
lappend ::nettool::blocks 5322 5342
lappend ::nettool::blocks 5345 5348
lappend ::nettool::blocks 5365 5396
lappend ::nettool::blocks 5438 5442
lappend ::nettool::blocks 5444 5444
lappend ::nettool::blocks 5446 5452
lappend ::nettool::blocks 5457 5460
lappend ::nettool::blocks 5466 5499
lappend ::nettool::blocks 5507 5552
lappend ::nettool::blocks 5558 5565
lappend ::nettool::blocks 5570 5572
lappend ::nettool::blocks 5576 5578
lappend ::nettool::blocks 5587 5596
lappend ::nettool::blocks 5606 5617
lappend ::nettool::blocks 5619 5626
lappend ::nettool::blocks 5640 5645
lappend ::nettool::blocks 5647 5669
lappend ::nettool::blocks 5685 5686
lappend ::nettool::blocks 5690 5692
lappend ::nettool::blocks 5694 5695
lappend ::nettool::blocks 5697 5712
lappend ::nettool::blocks 5731 5740
lappend ::nettool::blocks 5749 5749
lappend ::nettool::blocks 5751 5754
lappend ::nettool::blocks 5756 5756
lappend ::nettool::blocks 5758 5765
lappend ::nettool::blocks 5772 5776
lappend ::nettool::blocks 5778 5779
lappend ::nettool::blocks 5788 5792
lappend ::nettool::blocks 5795 5812
lappend ::nettool::blocks 5815 5840
lappend ::nettool::blocks 5843 5858
lappend ::nettool::blocks 5860 5862
lappend ::nettool::blocks 5864 5867
lappend ::nettool::blocks 5869 5882
lappend ::nettool::blocks 5884 5899
lappend ::nettool::blocks 5901 5909
lappend ::nettool::blocks 5914 5962
lappend ::nettool::blocks 5964 5967
lappend ::nettool::blocks 5970 5983
lappend ::nettool::blocks 5993 5998
lappend ::nettool::blocks 6067 6067
lappend ::nettool::blocks 6078 6080
lappend ::nettool::blocks 6089 6098
lappend ::nettool::blocks 6119 6120
lappend ::nettool::blocks 6125 6129
lappend ::nettool::blocks 6131 6132
lappend ::nettool::blocks 6134 6139
lappend ::nettool::blocks 6150 6158
lappend ::nettool::blocks 6164 6199
lappend ::nettool::blocks 6202 6221
lappend ::nettool::blocks 6223 6240
lappend ::nettool::blocks 6245 6250
lappend ::nettool::blocks 6254 6266
lappend ::nettool::blocks 6270 6299
lappend ::nettool::blocks 6301 6305
lappend ::nettool::blocks 6307 6314
lappend ::nettool::blocks 6318 6319
lappend ::nettool::blocks 6323 6323
lappend ::nettool::blocks 6327 6342
lappend ::nettool::blocks 6345 6345
lappend ::nettool::blocks 6348 6349
lappend ::nettool::blocks 6351 6354
lappend ::nettool::blocks 6356 6359
lappend ::nettool::blocks 6361 6362
lappend ::nettool::blocks 6364 6369
lappend ::nettool::blocks 6371 6381
lappend ::nettool::blocks 6383 6388
lappend ::nettool::blocks 6391 6399
lappend ::nettool::blocks 6411 6416
lappend ::nettool::blocks 6422 6431
lappend ::nettool::blocks 6433 6441
lappend ::nettool::blocks 6444 6445
lappend ::nettool::blocks 6447 6454
lappend ::nettool::blocks 6457 6470
lappend ::nettool::blocks 6472 6479
lappend ::nettool::blocks 6490 6499
lappend ::nettool::blocks 6501 6508
lappend ::nettool::blocks 6512 6512
lappend ::nettool::blocks 6516 6542
lappend ::nettool::blocks 6545 6546
lappend ::nettool::blocks 6552 6557
lappend ::nettool::blocks 6559 6565
lappend ::nettool::blocks 6569 6578
lappend ::nettool::blocks 6584 6599
lappend ::nettool::blocks 6603 6618
lappend ::nettool::blocks 6629 6631
lappend ::nettool::blocks 6635 6639
lappend ::nettool::blocks 6641 6652
lappend ::nettool::blocks 6654 6654
lappend ::nettool::blocks 6658 6664
lappend ::nettool::blocks 6672 6677
lappend ::nettool::blocks 6680 6686
lappend ::nettool::blocks 6690 6695
lappend ::nettool::blocks 6698 6700
lappend ::nettool::blocks 6707 6713
lappend ::nettool::blocks 6717 6766
lappend ::nettool::blocks 6772 6776
lappend ::nettool::blocks 6779 6783
lappend ::nettool::blocks 6792 6800
lappend ::nettool::blocks 6802 6816
lappend ::nettool::blocks 6818 6830
lappend ::nettool::blocks 6832 6840
lappend ::nettool::blocks 6843 6849
lappend ::nettool::blocks 6851 6867
lappend ::nettool::blocks 6869 6887
lappend ::nettool::blocks 6889 6900
lappend ::nettool::blocks 6902 6934
lappend ::nettool::blocks 6937 6945
lappend ::nettool::blocks 6947 6950
lappend ::nettool::blocks 6952 6960
lappend ::nettool::blocks 6967 6968
lappend ::nettool::blocks 6971 6996
lappend ::nettool::blocks 7016 7017
lappend ::nettool::blocks 7026 7029
lappend ::nettool::blocks 7032 7039
lappend ::nettool::blocks 7041 7069
lappend ::nettool::blocks 7072 7072
lappend ::nettool::blocks 7074 7079
lappend ::nettool::blocks 7081 7094
lappend ::nettool::blocks 7096 7098
lappend ::nettool::blocks 7102 7106
lappend ::nettool::blocks 7108 7120
lappend ::nettool::blocks 7122 7127
lappend ::nettool::blocks 7130 7160
lappend ::nettool::blocks 7175 7180
lappend ::nettool::blocks 7182 7199
lappend ::nettool::blocks 7202 7226
lappend ::nettool::blocks 7230 7234
lappend ::nettool::blocks 7238 7261
lappend ::nettool::blocks 7263 7271
lappend ::nettool::blocks 7284 7299
lappend ::nettool::blocks 7360 7364
lappend ::nettool::blocks 7366 7390
lappend ::nettool::blocks 7396 7396
lappend ::nettool::blocks 7398 7399
lappend ::nettool::blocks 7403 7409
lappend ::nettool::blocks 7412 7420
lappend ::nettool::blocks 7422 7425
lappend ::nettool::blocks 7432 7436
lappend ::nettool::blocks 7438 7442
lappend ::nettool::blocks 7444 7470
lappend ::nettool::blocks 7472 7472
lappend ::nettool::blocks 7475 7490
lappend ::nettool::blocks 7492 7499
lappend ::nettool::blocks 7502 7507
lappend ::nettool::blocks 7512 7541
lappend ::nettool::blocks 7551 7559
lappend ::nettool::blocks 7561 7562
lappend ::nettool::blocks 7564 7565
lappend ::nettool::blocks 7567 7568
lappend ::nettool::blocks 7571 7573
lappend ::nettool::blocks 7575 7587
lappend ::nettool::blocks 7589 7623
lappend ::nettool::blocks 7625 7625
lappend ::nettool::blocks 7632 7632
lappend ::nettool::blocks 7634 7647
lappend ::nettool::blocks 7649 7671
lappend ::nettool::blocks 7678 7679
lappend ::nettool::blocks 7681 7688
lappend ::nettool::blocks 7690 7696
lappend ::nettool::blocks 7698 7699
lappend ::nettool::blocks 7701 7706
lappend ::nettool::blocks 7709 7719
lappend ::nettool::blocks 7721 7723
lappend ::nettool::blocks 7728 7733
lappend ::nettool::blocks 7735 7737
lappend ::nettool::blocks 7739 7740
lappend ::nettool::blocks 7745 7746
lappend ::nettool::blocks 7748 7776
lappend ::nettool::blocks 7780 7780
lappend ::nettool::blocks 7782 7785
lappend ::nettool::blocks 7788 7788
lappend ::nettool::blocks 7790 7793
lappend ::nettool::blocks 7795 7796
lappend ::nettool::blocks 7803 7809
lappend ::nettool::blocks 7811 7844
lappend ::nettool::blocks 7848 7868
lappend ::nettool::blocks 7873 7877
lappend ::nettool::blocks 7879 7879
lappend ::nettool::blocks 7881 7886
lappend ::nettool::blocks 7888 7899
lappend ::nettool::blocks 7904 7912
lappend ::nettool::blocks 7914 7931
lappend ::nettool::blocks 7934 7961
lappend ::nettool::blocks 7963 7966
lappend ::nettool::blocks 7968 7978
lappend ::nettool::blocks 7983 7996
lappend ::nettool::blocks 8004 8004
lappend ::nettool::blocks 8006 8007
lappend ::nettool::blocks 8009 8018
lappend ::nettool::blocks 8023 8024
lappend ::nettool::blocks 8027 8031
lappend ::nettool::blocks 8035 8039
lappend ::nettool::blocks 8041 8041
lappend ::nettool::blocks 8045 8050
lappend ::nettool::blocks 8061 8065
lappend ::nettool::blocks 8067 8073
lappend ::nettool::blocks 8075 8079
lappend ::nettool::blocks 8084 8085
lappend ::nettool::blocks 8089 8090
lappend ::nettool::blocks 8092 8096
lappend ::nettool::blocks 8098 8099
lappend ::nettool::blocks 8103 8114
lappend ::nettool::blocks 8119 8120
lappend ::nettool::blocks 8123 8127
lappend ::nettool::blocks 8133 8139
lappend ::nettool::blocks 8141 8147
lappend ::nettool::blocks 8150 8152
lappend ::nettool::blocks 8154 8159
lappend ::nettool::blocks 8163 8180
lappend ::nettool::blocks 8185 8190
lappend ::nettool::blocks 8193 8193
lappend ::nettool::blocks 8196 8198
lappend ::nettool::blocks 8203 8203
lappend ::nettool::blocks 8209 8229
lappend ::nettool::blocks 8231 8242
lappend ::nettool::blocks 8244 8275
lappend ::nettool::blocks 8277 8279
lappend ::nettool::blocks 8281 8291
lappend ::nettool::blocks 8295 8299
lappend ::nettool::blocks 8302 8312
lappend ::nettool::blocks 8314 8319
lappend ::nettool::blocks 8322 8350
lappend ::nettool::blocks 8352 8375
lappend ::nettool::blocks 8381 8382
lappend ::nettool::blocks 8384 8399
lappend ::nettool::blocks 8406 8414
lappend ::nettool::blocks 8418 8441
lappend ::nettool::blocks 8446 8449
lappend ::nettool::blocks 8451 8456
lappend ::nettool::blocks 8458 8469
lappend ::nettool::blocks 8475 8499
lappend ::nettool::blocks 8503 8553
lappend ::nettool::blocks 8556 8566
lappend ::nettool::blocks 8568 8599
lappend ::nettool::blocks 8601 8608
lappend ::nettool::blocks 8616 8664
lappend ::nettool::blocks 8667 8674
lappend ::nettool::blocks 8676 8685
lappend ::nettool::blocks 8687 8687
lappend ::nettool::blocks 8689 8698
lappend ::nettool::blocks 8700 8710
lappend ::nettool::blocks 8712 8731
lappend ::nettool::blocks 8734 8749
lappend ::nettool::blocks 8751 8762
lappend ::nettool::blocks 8767 8769
lappend ::nettool::blocks 8771 8777
lappend ::nettool::blocks 8779 8785
lappend ::nettool::blocks 8788 8792
lappend ::nettool::blocks 8794 8799
lappend ::nettool::blocks 8801 8803
lappend ::nettool::blocks 8805 8872
lappend ::nettool::blocks 8874 8879
lappend ::nettool::blocks 8882 8882
lappend ::nettool::blocks 8884 8887
lappend ::nettool::blocks 8895 8898
lappend ::nettool::blocks 8902 8909
lappend ::nettool::blocks 8914 8936
lappend ::nettool::blocks 8938 8952
lappend ::nettool::blocks 8955 8988
lappend ::nettool::blocks 8992 8997
lappend ::nettool::blocks 9003 9006
lappend ::nettool::blocks 9011 9019
lappend ::nettool::blocks 9027 9049
lappend ::nettool::blocks 9052 9079
lappend ::nettool::blocks 9081 9081
lappend ::nettool::blocks 9094 9099
lappend ::nettool::blocks 9108 9118
lappend ::nettool::blocks 9120 9121
lappend ::nettool::blocks 9124 9130
lappend ::nettool::blocks 9132 9159
lappend ::nettool::blocks 9165 9190
lappend ::nettool::blocks 9192 9199
lappend ::nettool::blocks 9218 9221
lappend ::nettool::blocks 9223 9254
lappend ::nettool::blocks 9256 9276
lappend ::nettool::blocks 9288 9291
lappend ::nettool::blocks 9296 9299
lappend ::nettool::blocks 9301 9305
lappend ::nettool::blocks 9307 9311
lappend ::nettool::blocks 9313 9317
lappend ::nettool::blocks 9319 9320
lappend ::nettool::blocks 9322 9342
lappend ::nettool::blocks 9345 9345
lappend ::nettool::blocks 9347 9373
lappend ::nettool::blocks 9375 9379
lappend ::nettool::blocks 9381 9386

lappend ::nettool::blocks 9391 9395
lappend ::nettool::blocks 9398 9399
lappend ::nettool::blocks 9403 9417
lappend ::nettool::blocks 9419 9442
lappend ::nettool::blocks 9446 9449
lappend ::nettool::blocks 9451 9499
lappend ::nettool::blocks 9501 9521
lappend ::nettool::blocks 9523 9534
lappend ::nettool::blocks 9537 9554
lappend ::nettool::blocks 9556 9591
lappend ::nettool::blocks 9601 9611
lappend ::nettool::blocks 9613 9613
lappend ::nettool::blocks 9615 9615
lappend ::nettool::blocks 9619 9627
lappend ::nettool::blocks 9633 9639
lappend ::nettool::blocks 9641 9665
lappend ::nettool::blocks 9669 9693
lappend ::nettool::blocks 9696 9699
lappend ::nettool::blocks 9701 9746
lappend ::nettool::blocks 9748 9749
lappend ::nettool::blocks 9751 9752
lappend ::nettool::blocks 9754 9761
lappend ::nettool::blocks 9763 9799
lappend ::nettool::blocks 9803 9874
lappend ::nettool::blocks 9877 9877
lappend ::nettool::blocks 9879 9887
lappend ::nettool::blocks 9890 9897
lappend ::nettool::blocks 9904 9908
lappend ::nettool::blocks 9910 9910
lappend ::nettool::blocks 9912 9924
lappend ::nettool::blocks 9926 9949
lappend ::nettool::blocks 9957 9965
lappend ::nettool::blocks 9967 9977
lappend ::nettool::blocks 9979 9986
lappend ::nettool::blocks 9989 9989
lappend ::nettool::blocks 10003 10003
lappend ::nettool::blocks 10011 10022
lappend ::nettool::blocks 10024 10049
lappend ::nettool::blocks 10052 10054
lappend ::nettool::blocks 10056 10079
lappend ::nettool::blocks 10082 10099
lappend ::nettool::blocks 10105 10106
lappend ::nettool::blocks 10108 10109
lappend ::nettool::blocks 10112 10112
lappend ::nettool::blocks 10118 10127
lappend ::nettool::blocks 10130 10159
lappend ::nettool::blocks 10163 10199
lappend ::nettool::blocks 10202 10251
lappend ::nettool::blocks 10253 10259
lappend ::nettool::blocks 10261 10287
lappend ::nettool::blocks 10289 10320
lappend ::nettool::blocks 10322 10438
lappend ::nettool::blocks 10440 10499
lappend ::nettool::blocks 10501 10539
lappend ::nettool::blocks 10545 10630
lappend ::nettool::blocks 10632 10799
lappend ::nettool::blocks 10801 10804
lappend ::nettool::blocks 10806 10808
lappend ::nettool::blocks 10811 10859
lappend ::nettool::blocks 10861 10879
lappend ::nettool::blocks 10881 10989
lappend ::nettool::blocks 10991 10999
lappend ::nettool::blocks 11002 11094
lappend ::nettool::blocks 11096 11102
lappend ::nettool::blocks 11107 11107
lappend ::nettool::blocks 11113 11160
lappend ::nettool::blocks 11166 11170
lappend ::nettool::blocks 11176 11200
lappend ::nettool::blocks 11203 11207
lappend ::nettool::blocks 11209 11210
lappend ::nettool::blocks 11212 11318
lappend ::nettool::blocks 11322 11366
lappend ::nettool::blocks 11368 11370
lappend ::nettool::blocks 11372 11429
lappend ::nettool::blocks 11431 11488
lappend ::nettool::blocks 11490 11599
lappend ::nettool::blocks 11601 11622
lappend ::nettool::blocks 11624 11719
lappend ::nettool::blocks 11721 11722
lappend ::nettool::blocks 11724 11750
lappend ::nettool::blocks 11752 11795
lappend ::nettool::blocks 11797 11875
lappend ::nettool::blocks 11878 11966
lappend ::nettool::blocks 11968 11996
lappend ::nettool::blocks 12011 12011
lappend ::nettool::blocks 12014 12108
lappend ::nettool::blocks 12110 12120
lappend ::nettool::blocks 12122 12167
lappend ::nettool::blocks 12169 12171
lappend ::nettool::blocks 12173 12299
lappend ::nettool::blocks 12301 12301
lappend ::nettool::blocks 12303 12320
lappend ::nettool::blocks 12323 12344
lappend ::nettool::blocks 12346 12752
lappend ::nettool::blocks 12754 12864
lappend ::nettool::blocks 12866 13159
lappend ::nettool::blocks 13161 13215
lappend ::nettool::blocks 13219 13222
lappend ::nettool::blocks 13225 13399
lappend ::nettool::blocks 13401 13719
lappend ::nettool::blocks 13723 13723
lappend ::nettool::blocks 13725 13781
lappend ::nettool::blocks 13784 13784
lappend ::nettool::blocks 13787 13817

lappend ::nettool::blocks 13824 13893
lappend ::nettool::blocks 13895 13928
lappend ::nettool::blocks 13931 13999
lappend ::nettool::blocks 14003 14032
lappend ::nettool::blocks 14035 14140
lappend ::nettool::blocks 14143 14144
lappend ::nettool::blocks 14146 14148
lappend ::nettool::blocks 14151 14153
lappend ::nettool::blocks 14155 14249
lappend ::nettool::blocks 14251 14413
lappend ::nettool::blocks 14415 14935
lappend ::nettool::blocks 14938 14999
lappend ::nettool::blocks 15001 15001
lappend ::nettool::blocks 15003 15117
lappend ::nettool::blocks 15119 15344
lappend ::nettool::blocks 15346 15362
lappend ::nettool::blocks 15364 15554
lappend ::nettool::blocks 15556 15659
lappend ::nettool::blocks 15661 15739
lappend ::nettool::blocks 15741 15997
lappend ::nettool::blocks 16004 16019
lappend ::nettool::blocks 16022 16160
lappend ::nettool::blocks 16163 16308
lappend ::nettool::blocks 16312 16359
lappend ::nettool::blocks 16362 16366
lappend ::nettool::blocks 16369 16383
lappend ::nettool::blocks 16385 16618
lappend ::nettool::blocks 16620 16664
lappend ::nettool::blocks 16667 16899
lappend ::nettool::blocks 16901 16949
lappend ::nettool::blocks 16951 16990
lappend ::nettool::blocks 16996 17006
lappend ::nettool::blocks 17008 17183
lappend ::nettool::blocks 17186 17218
lappend ::nettool::blocks 17223 17233
lappend ::nettool::blocks 17236 17499
lappend ::nettool::blocks 17501 17554
lappend ::nettool::blocks 17556 17728
lappend ::nettool::blocks 17730 17753
lappend ::nettool::blocks 17757 17776
lappend ::nettool::blocks 17778 17999
lappend ::nettool::blocks 18001 18103
lappend ::nettool::blocks 18105 18135
lappend ::nettool::blocks 18137 18180
lappend ::nettool::blocks 18188 18240
lappend ::nettool::blocks 18244 18261
lappend ::nettool::blocks 18263 18462
lappend ::nettool::blocks 18464 18633
lappend ::nettool::blocks 18636 18768
lappend ::nettool::blocks 18770 18880
lappend ::nettool::blocks 18882 18887
lappend ::nettool::blocks 18889 18999
lappend ::nettool::blocks 19001 19006
lappend ::nettool::blocks 19008 19019
lappend ::nettool::blocks 19021 19190
lappend ::nettool::blocks 19192 19193
lappend ::nettool::blocks 19195 19282
lappend ::nettool::blocks 19284 19314
lappend ::nettool::blocks 19316 19397
lappend ::nettool::blocks 19399 19409
lappend ::nettool::blocks 19413 19538
lappend ::nettool::blocks 19542 19787
lappend ::nettool::blocks 19789 19997
lappend ::nettool::blocks 20004 20004
lappend ::nettool::blocks 20006 20011
lappend ::nettool::blocks 20015 20045
lappend ::nettool::blocks 20047 20047
lappend ::nettool::blocks 20050 20166
lappend ::nettool::blocks 20168 20201
lappend ::nettool::blocks 20203 20221
lappend ::nettool::blocks 20223 20479
lappend ::nettool::blocks 20481 20669
lappend ::nettool::blocks 20671 20998
lappend ::nettool::blocks 21001 21009
lappend ::nettool::blocks 21011 21552
lappend ::nettool::blocks 21555 21589
lappend ::nettool::blocks 21591 21799
lappend ::nettool::blocks 21801 21844
lappend ::nettool::blocks 21850 21999
lappend ::nettool::blocks 22006 22124
lappend ::nettool::blocks 22126 22127
lappend ::nettool::blocks 22129 22221
lappend ::nettool::blocks 22223 22272
lappend ::nettool::blocks 22274 22304
lappend ::nettool::blocks 22306 22342
lappend ::nettool::blocks 22344 22346
lappend ::nettool::blocks 22348 22349
lappend ::nettool::blocks 22352 22536
lappend ::nettool::blocks 22538 22554
lappend ::nettool::blocks 22556 22762
lappend ::nettool::blocks 22764 22799
lappend ::nettool::blocks 22801 22950
lappend ::nettool::blocks 22952 22999
lappend ::nettool::blocks 23006 23052
lappend ::nettool::blocks 23054 23271
lappend ::nettool::blocks 23273 23332
lappend ::nettool::blocks 23334 23399
lappend ::nettool::blocks 23403 23455
lappend ::nettool::blocks 23458 23545
lappend ::nettool::blocks 23547 23999
lappend ::nettool::blocks 24007 24241
lappend ::nettool::blocks 24243 24248
lappend ::nettool::blocks 24250 24320
lappend ::nettool::blocks 24323 24464
lappend ::nettool::blocks 24466 24553
lappend ::nettool::blocks 24555 24576
lappend ::nettool::blocks 24578 24675
lappend ::nettool::blocks 24679 24679
lappend ::nettool::blocks 24681 24753
lappend ::nettool::blocks 24755 24849
lappend ::nettool::blocks 24851 24921
lappend ::nettool::blocks 24923 24999
lappend ::nettool::blocks 25010 25470
lappend ::nettool::blocks 25472 25575
lappend ::nettool::blocks 25577 25603
lappend ::nettool::blocks 25605 25792
lappend ::nettool::blocks 25794 25899
lappend ::nettool::blocks 25904 25953
lappend ::nettool::blocks 25956 25999
lappend ::nettool::blocks 26001 26132
lappend ::nettool::blocks 26134 26207
lappend ::nettool::blocks 26209 26259
lappend ::nettool::blocks 26264 26485
lappend ::nettool::blocks 26488 26488
lappend ::nettool::blocks 26490 26999
lappend ::nettool::blocks 27010 27344
lappend ::nettool::blocks 27346 27441
lappend ::nettool::blocks 27443 27503
lappend ::nettool::blocks 27505 27781
lappend ::nettool::blocks 27783 27875
lappend ::nettool::blocks 27877 27998
lappend ::nettool::blocks 28002 28118
lappend ::nettool::blocks 28120 28199
lappend ::nettool::blocks 28201 28239
lappend ::nettool::blocks 28241 29117
lappend ::nettool::blocks 29119 29166
lappend ::nettool::blocks 29170 29998
lappend ::nettool::blocks 30005 30259
lappend ::nettool::blocks 30261 30831
lappend ::nettool::blocks 30833 30998
lappend ::nettool::blocks 31000 31019
lappend ::nettool::blocks 31021 31028
lappend ::nettool::blocks 31030 31399
lappend ::nettool::blocks 31401 31415
lappend ::nettool::blocks 31417 31456
lappend ::nettool::blocks 31458 31619
lappend ::nettool::blocks 31621 31684
lappend ::nettool::blocks 31686 31764
lappend ::nettool::blocks 31766 32033
lappend ::nettool::blocks 32035 32248
lappend ::nettool::blocks 32250 32482
lappend ::nettool::blocks 32484 32634
lappend ::nettool::blocks 32637 32766
lappend ::nettool::blocks 32778 32800
lappend ::nettool::blocks 32802 32810
lappend ::nettool::blocks 32812 32895
lappend ::nettool::blocks 32897 33122
lappend ::nettool::blocks 33124 33330
lappend ::nettool::blocks 33332 33332
lappend ::nettool::blocks 33335 33433
lappend ::nettool::blocks 33435 33655
lappend ::nettool::blocks 33657 34248
lappend ::nettool::blocks 34250 34377
lappend ::nettool::blocks 34380 34566
lappend ::nettool::blocks 34568 34961
lappend ::nettool::blocks 34965 34979
lappend ::nettool::blocks 34981 34999
lappend ::nettool::blocks 35007 35353
lappend ::nettool::blocks 35358 36000
lappend ::nettool::blocks 36002 36411
lappend ::nettool::blocks 36413 36421
lappend ::nettool::blocks 36423 36442
lappend ::nettool::blocks 36445 36523
lappend ::nettool::blocks 36525 36601
lappend ::nettool::blocks 36603 36699
lappend ::nettool::blocks 36701 36864
lappend ::nettool::blocks 36866 37474
lappend ::nettool::blocks 37476 37482
lappend ::nettool::blocks 37484 37653
lappend ::nettool::blocks 37655 37999
lappend ::nettool::blocks 38002 38200
lappend ::nettool::blocks 38204 38799
lappend ::nettool::blocks 38801 38864
lappend ::nettool::blocks 38866 39680
lappend ::nettool::blocks 39682 39999
lappend ::nettool::blocks 40001 40403
lappend ::nettool::blocks 40405 40840
lappend ::nettool::blocks 40844 40852
lappend ::nettool::blocks 40854 41110
lappend ::nettool::blocks 41112 41120
lappend ::nettool::blocks 41122 41793
lappend ::nettool::blocks 41798 42507
lappend ::nettool::blocks 42511 42999
lappend ::nettool::blocks 43001 44320
lappend ::nettool::blocks 44323 44443
lappend ::nettool::blocks 44445 44543
lappend ::nettool::blocks 44545 44552
lappend ::nettool::blocks 44554 44599
lappend ::nettool::blocks 44601 44899
lappend ::nettool::blocks 44901 44999
lappend ::nettool::blocks 45002 45044
lappend ::nettool::blocks 45046 45053
lappend ::nettool::blocks 45055 45677
lappend ::nettool::blocks 45679 45823
lappend ::nettool::blocks 45826 45965
lappend ::nettool::blocks 45967 46997
lappend ::nettool::blocks 47002 47099
lappend ::nettool::blocks 47101 47556
lappend ::nettool::blocks 47558 47623
lappend ::nettool::blocks 47625 47805
lappend ::nettool::blocks 47807 47807
lappend ::nettool::blocks 47810 47999
lappend ::nettool::blocks 48006 48048
lappend ::nettool::blocks 48051 48127
lappend ::nettool::blocks 48130 48555
lappend ::nettool::blocks 48557 48618
lappend ::nettool::blocks 48620 48652
lappend ::nettool::blocks 48654 48999
lappend ::nettool::blocks 49001 65535


###
# END: available_ports.tcl
###
###
# START: locateport.tcl
###
::namespace eval ::nettool {}

###
# topic: fc6f8b9587dd5524f143f9df4be4755b63eb6cd5
###
proc ::nettool::allocate_port startingport {
  foreach {start end} $::nettool::blocks {
    if { $end <= $startingport } continue
    if { $start > $startingport } {
      set i $start
    } else {
      set i $startingport
    }
    for {} {$i <= $end} {incr i} {
      if {[string is true -strict [get ::nettool::used_ports($i)]]} continue
      if {[catch {socket -server NOOP $i} chan]} continue
      close $chan
      set ::nettool::used_ports($i) 1
      return $i
    }
  }
  error "Could not locate a port"
}

###
# topic: 3286fdbd0a3fdebbb26414475754bcf3dea67b0f
###
proc ::nettool::claim_port {port {protocol tcp}} {
  set ::nettool::used_ports($port) 1
}

###
# topic: 1d1f8a65a9aef8765c9b4f2b0ee0ebaf42e99d46
###
proc ::nettool::find_port startingport {
  foreach {start end} $::nettool::blocks {
    if { $end <= $startingport } continue
    if { $start > $startingport } {
      set i $start
    } else {
      set i $startingport
    }
    for {} {$i <= $end} {incr i} {
      if {[string is true -strict [get ::nettool::used_ports($i)]]} continue
      return $i
    }
  }
  error "Could not locate a port"
}

###
# topic: ded1c51260e009effb1f77044f8d0dec3d030b91
###
proc ::nettool::port_busy port {
  ###
  # Check our private list of used ports
  ###
  if {[string is true -strict [get ::nettool::used_ports($port)]]} {
    return 1
  }
  foreach {start end} $::nettool::blocks {
    if { $port >= $start && $port <= $end } {
      return 0
    }
  }
  return 1
}

###
# topic: b5407b084aa09f9efa4f58a337af6186418fddf2
###
proc ::nettool::release_port {port {protocol tcp}} {
  set ::nettool::used_ports($port) 0
}


###
# END: locateport.tcl
###
###
# START: platform_unix.tcl
###
###
# Generic answers that can be answered on most if not all unix platforms
###

if {$::tcl_platform(platform) eq "unix"} {
###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
# description: Under unix, we call the arp command for arp table resolution
###
proc ::nettool::arp_table {} {
  set result {}
  set dat [exec arp -a]
  foreach line [split $dat \n] {
    set host [lindex $line 0]
    set ip [lindex $line 1]
    set macid [lindex $line 3]
    lappend result $macid [string range $ip 1 end-1]
  }
  return $result
}
}

###
# END: platform_unix.tcl
###
###
# START: platform_unix_linux.tcl
###
if {$::tcl_platform(platform) eq "unix" && $genus eq "linux"} {

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  set result {}
  lappend result 127.0.0.1
  foreach {iface info} [dump] {
    if {[dict exists $info ipv4 Bcast:]} {
      lappend result [dict get $info ipv4 Bcast:]
    }
  }
  return [lsort -unique -dictionary $result]
}

###
# topic: 187cfa1827097c5cdf1c40c656cedfcc
# description: Return time since booted
###
proc ::nettool::cpuinfo args {
  variable cpuinfo
  if {![info exists cpuinfo]} {
    set cpuinfo {}
    set dat [cat /proc/meminfo]
    foreach line [split $dat \n] {
      switch [lindex $line 0] {
        MemTotal: {
          # Normalize to MB
          dict set cpuinfo memory [lindex $line 1]/1024
        }
      }
    }
    set cpus 0
    set dat [cat /proc/cpuinfo]
    foreach line [split $dat \n] {
      set idx [string first : $line]
      set field [string trim [string range $line 0 $idx-1]]
      set value [string trim [string range $line $idx+1 end]]
      switch $field {
        processor {
          incr cpus
        }
        {cpu family} {
          dict set cpuinfo family $value
        }
        model {
          dict set cpuinfo model $value
        }
        stepping {
          dict set cpuinfo stepping $value
        }
        vendor_id {
          dict set cpuinfo vendor $value
        }
        {model name} {
          dict set cpuinfo brand $value
        }
        {cpu MHz} {
          dict set cpuinfo speed $value
        }
        flags {
          dict set cpuinfo features $value
        }
      }
    }
    dict set cpuinfo cpus $cpus
  }
  if {$args eq "<list>"} {
    return [dict keys $cpuinfo]
  }
  if {[llength $args]==0} {
    return $cpuinfo
  }
  if {[llength $args]==1} {
    return [dict get $cpuinfo [lindex $args 0]]
  }
  set result {}
  foreach item $args {
    if {[dict exists $cpuinfo $item]} {
      dict set result $item [dict get $cpuinfo $item]
    } else {
      dict set result $item {}
    }
  }
  return $result
}

###
# topic: aa8eda4fb59296a1a34d8d600ca54e28
# description: Dump interfaces
###
proc ::nettool::dump {} {
  set data [exec ifconfig]
  set iface {}
  set result {}
  foreach line [split $data \n] {
    if {[string index $line 0] in {" " "\t"} } {
      # Indented line appends the prior iface
      switch [lindex $line 0] {
        inet {
          foreach tuple [lrange $line 1 end] {
	    set idx [string first : $tuple]
            set field [string trim [string range $tuple 0 $idx]]
            set value [string trim [string range $tuple $idx+1 end]]
            dict set result $iface ipv4 [string trim $field] [string trim $value]
          }
        }
        inet6 {
          dict set result $iface ipv6 addr: [lindex $line 2]
          foreach tuple [lrange $line 3 end] {
	    set idx [string first : $tuple]
            set field [string trim [string range $tuple 0 $idx]]
            set value [string trim [string range $tuple $idx+1 end]]
            dict set result $iface ipv6 [string trim $field] [string trim $value]
          }
	}
      }
    } else {
      # Non-intended line - new iface
      set iface [lindex $line 0]
      set idx [lsearch $line HWaddr]
      if {$idx >= 0 } {
        dict set result $iface ether: [lindex $line $idx+1]
      }
    }
  }
  return $result
}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
proc ::nettool::ip_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info ipv4 addr:]} {
      lappend result [dict get $info ipv4 addr:]
    }
  }
  ldelete result 127.0.0.1
  return $result
}

###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info ether:]} {
      lappend result [dict get $info ether:]
    }
  }
  return $result
}

###
# topic: a43b6f42141820e0ba1094840d0f6fc0
###
proc ::nettool::network_list {} {
  foreach {iface info} [dump] {
    if {![dict exists $info ipv4 addr:]} continue
    if {![dict exists $info ipv4 Mask:]} continue
    #set mask [::ip::maskToInt $netmask]
    set addr [dict get $info ipv4 addr:]
    set mask [dict get $info ipv4 Mask:]
    set addri [::ip::toInteger $addr]
    lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $mask] -ipv4]
  }
  return $result
}

###
# topic: e7db1ae1b5b98a1bb4384f0a4fe81f42
###
proc ::nettool::status {} {
  set result {}
  set dat [cat /proc/loadavg]
  dict set result load_average    [lrange $dat 0 2]
  set cpus [cpuinfo cpus].0
  dict set result load [expr {[lindex $dat 0]/$cpus}]

  set processes [split [lindex $dat 3] /]
  dict set result processes_running [lindex $processes 0]
  dict set result processes_total [lindex $processes 1]

  set dat [cat /proc/meminfo]
  foreach line [split $dat \n] {
    switch [lindex $line 0] {
      MemTotal: {
        # Normalize to MB
        dict set result memory_total [expr {[lindex $line 1]/1024}]
      }
      MemFree: {
        # Normalize to MB
        dict set result memory_free [expr {[lindex $line 1]/1024}]
      }
    }
  }
  return $result
}

###
# topic: 59bf977ad7287b4d90346fad639aed34
###
proc ::nettool::uptime_report {} {
  set result {}
  set dat [split [exec uptime] ,]
  puts $dat
  dict set result time   [lindex [lindex $dat 0] 0]
  dict set result uptime [lrange [lindex $dat 0] 1 end]
  dict set result users  [lindex [lindex $dat 2] 0]
  dict set result load_1_minute  [lindex [lindex $dat 3] end]
  dict set result load_5_minute  [lindex [lindex $dat 4] end]
  dict set result load_15_minute  [lindex [lindex $dat 5] end]
  return $result
}

unset -nocomplain ::nettool::cpuinfo
}

###
# END: platform_unix_linux.tcl
###
###
# START: platform_unix_macosx.tcl
###
if {$::tcl_platform(platform) eq "unix" && $genus eq "macosx"} {

###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
# description: Under macosx, we call the arp command for arp table resolution
###
proc ::nettool::arp_table {} {
  set result {}
  set dat [exec arp -a]
  foreach line [split $dat \n] {
    set host [lindex $line 0]
    set ip [lindex $line 1]
    set macid [lindex $line 3]
    lappend result $macid [string range $ip 1 end-1]
  }
  return $result
}

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  set result {}
  lappend result 127.0.0.1
  foreach {iface info} [dump] {
    if {[dict exists $info broadcast:]} {
      lappend result [dict get $info broadcast:]
    }
  }
  return [lsort -unique -dictionary $result]
}

###
# topic: 187cfa1827097c5cdf1c40c656cedfcc
# description: Return time since booted
###
proc ::nettool::cpuinfo args {
  variable cpuinfo
  if {![info exists cpuinfo]} {
    set cpuinfo {}
    dict set cpuinfo machine  [exec sysctl -n hw.machine]
    dict set cpuinfo cpus     [exec sysctl -n hw.ncpu]
    # Normalize to MB
    dict set cpuinfo memory   [expr {[exec sysctl -n hw.memsize] / 1048576}]

    dict set cpuinfo vendor   [exec sysctl -n machdep.cpu.vendor]
    dict set cpuinfo brand    [exec sysctl -n machdep.cpu.brand_string]

    dict set cpuinfo model    [exec sysctl -n machdep.cpu.model]
    dict set cpuinfo speed    [expr {[exec sysctl -n hw.cpufrequency]/1000000}]

    dict set cpuinfo family   [exec sysctl -n machdep.cpu.family]
    dict set cpuinfo stepping [exec sysctl -n machdep.cpu.stepping]
    dict set cpuinfo features [exec sysctl -n machdep.cpu.features]
    dict set cpuinfo diskless []
  }
  if {$args eq "<list>"} {
    return [dict keys $cpuinfo]
  }
  if {[llength $args]==0} {
    return $cpuinfo
  }
  if {[llength $args]==1} {
    return [dict get $cpuinfo [lindex $args 0]]
  }
  set result {}
  foreach item $args {
    if {[dict exists $cpuinfo $item]} {
      dict set result $item [dict get $cpuinfo $item]
    } else {
      dict set result $item {}
    }
  }
  return $result
}

###
# topic: aa8eda4fb59296a1a34d8d600ca54e28
# description: Dump interfaces
###
proc ::nettool::dump {} {
  set data [exec ifconfig]
  set iface {}
  set result {}
  foreach line [split $data \n] {
    if {[string index $line 0] in {" " "\t"} } {
      # Indented line appends the prior iface
      foreach {field value} $line {
        dict set result $iface [string trimright $field :]: $value
      }
    } else {
      # Non-intended line - new iface
      set iface [lindex $line 0]
    }
  }
  return $result
}

###
# topic: dd2e2c0810cea69909399808f2a68949
# title: Return a list of unique hardware addresses
###
proc ::nettool::hwid_list {} {
  variable cached_data
  set result {}
  if {![info exists cached_data]} {
    if {[catch {exec system_profiler SPHardwareDataType} hwlist]} {
      set cached_data {}
    } else {
      set cached_data $hwlist

    }
  }
  set serial {}
  set hwuuid {}
  set result {}
  catch {
  foreach line [split $cached_data \n] {
    if { [lindex $line 0] == "Serial" && [lindex $line 1] == "Number" } {
      set serial [lindex $line end]
    }
    if { [lindex $line 0] == "Hardware" && [lindex $line 1] == "UUID:" } {
      set hwuuid [lindex $line end]
    }
  }
  }
  if { $hwuuid != {} } {
    lappend result 0x[string map {- {}} $hwuuid]
  }
  # Blank serial number?
  if { $serial != {} } {
    set sn [binary scan $serial H* hash]
    lappend result 0x$hash
  }
  if {[llength $result]} {
    return $result
  }
  foreach mac [::nettool::mac_list] {
    lappend result 0x[string map {: {}} $mac]
  }
  if {[llength $result]} {
    return $result
  }
  return 0x010203040506
}

###
# topic: d2932eb0ea8cc9f6a865c1ab7cdd4572
# description:
#    Called on package load to build any static
#    structures to cache data that would be time
#    consuming to call on the fly
###
proc ::nettool::init {} {
  unset -nocomplain [namespace current]::cpuinfo

}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
proc ::nettool::ip_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info inet:]} {
      lappend result [dict get $info inet:]
    }
  }
  ldelete result 127.0.0.1
  return $result
}

###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info ether:]} {
      lappend result [dict get $info ether:]
    }
  }
  return $result
}

###
# topic: a43b6f42141820e0ba1094840d0f6fc0
###
proc ::nettool::network_list {} {
  foreach {iface info} [dump] {
    if {![dict exists $info inet:]} continue
    if {![dict exists $info netmask:]} continue
    #set mask [::ip::maskToInt $netmask]
    set addr [dict get $info inet:]
    set mask [dict get $info netmask:]
    set addri [::ip::toInteger $addr]
    lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $mask] -ipv4]
  }
  return $result
}

###
# topic: e7db1ae1b5b98a1bb4384f0a4fe81f42
###
proc ::nettool::status {} {
  set result {}
  set loaddat [lindex [exec sysctl -n vm.loadavg] 0]
  set cpus [cpuinfo cpus]
  dict set result cpus $cpus
  dict set result load [expr {[lindex $loaddat 0]*100.0/$cpus}]
  dict set result load_average_1 [lindex $loaddat 0]
  dict set result load_average_5 [lindex $loaddat 1]
  dict set result load_average_15 [lindex $loaddat 2]

  set total [exec sysctl -n hw.memsize]
  dict set result memory_total [expr {$total / 1048576}]
  set used 0
  foreach {amt} [exec sysctl -n machdep.memmap] {
    incr used $amt
  }
  dict set result memory_free [expr {($total - $used) / 1048576}]

  return $result
}

proc ::nettool::user_data_root {appname} {
  return [file join $::env(HOME) Library {Application Support} $appname]
}
}

###
# END: platform_unix_macosx.tcl
###
###
# START: platform_windows.tcl
###
if {$::tcl_platform(platform) eq "windows"} {

###
# topic: dd2e2c0810cea69909399808f2a68949
# title: Return a list of unique hardware ids
###
proc ::nettool::hwid_list {} {
  # Use the serial number on the hard drive
  catch {exec {*}[auto_execok vol] c:} voldat
  set num [lindex [lindex [split $voldat \n] end] end]
  return 0x[string map {- {}} $num]
}

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  set result {}
  lappend result 127.0.0.1
  foreach net [network_list] {
    if {$net in {224.0.0.0/4 127.0.0.0/8}} continue
    lappend result [::ip::broadcastAddress $net]
  }
  return [lsort -unique -dictionary $result]
}

###
# Provide a limited subset using data gleaned from exec
# These calls work in Windows NT 4 and above
###


proc ::nettool::IPINFO {} {
  if {![info exists ::nettool::ipinfo]} {
    set ::nettool::ipinfo [exec ipconfig /all]
  }
  return $::nettool::ipinfo
}

proc ::nettool::if_list {} {
  return [mac_list]
}

proc ::nettool::ip_list {} {
  set result {}
  foreach line [split [IPINFO] \n] {
    if {![regexp {IPv4 Address} $line]} continue
    set line [string range $line [string first ":" $line]+2 end]
    if {[scan $line %d.%d.%d.%d A B C D]!=4} continue
    lappend result $A.$B.$C.$D
  }
  return $result
}

proc ::nettool::mac_list {} {
  set result {}
  foreach line [split [IPINFO] \n] {
    if {![regexp {Physical Address} $line]} continue
    set line [string range $line [string first ":" $line]+2 end]
    if {[scan $line %02x-%02x-%02x-%02x-%02x-%02x A B C D E F] != 6} continue
    if {$A==0 && $B==0 && $C==0 && $D==0 && $E==0 && $F==0} continue
    lappend result [format %02x:%02x:%02x:%02x:%02x:%02x $A $B $C $D $E $F]
  }
  return $result
}

proc ::nettool::network_list {} {
  set masks {}
  foreach line [split [IPINFO] \n] {
    if {![regexp {Subnet Mask} $line]} continue
    set line [string range $line [string first ":" $line]+2 end]
    if {[scan $line %d.%d.%d.%d A B C D]!=4} continue
    lappend masks $A.$B.$C.$D
  }
  set result {}
  set idx -1
  foreach addr [ip_list] {
    set netmask [lindex $masks [incr idx]]
    set mask   [::ip::maskToInt $netmask]
    set addri [::ip::toInteger $addr]
    lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $netmask] -ipv4]
  }
  return $result
}

proc ::nettool::status {} {
}

proc ::nettool::user_data_root {appname} {
  return [file join $::env(APPDATA) $appname]
}
}

###
# END: platform_windows.tcl
###
###
# START: platform_windows_twapi.tcl
###
if {$::tcl_platform(platform) eq "windows" && ![catch {package require twapi}]} {
# TWAPI Based implementation

::namespace eval ::nettool {}

###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
# description: Under macosx, we call the arp command for arp table resolution
###
proc ::nettool::arp_table {} {
  set result {}
  catch {
  foreach element [::twapi::get_arp_table] {
    foreach {ifidx macid ipaddr type} {
      lappend result [string map {- :} $macid] $ipaddr
    }
  }
  }
  return $result
}


###
# topic: 57fdc331bc60c7bf2bd3f3214e9a906f
###
proc ::nettool::hwaddr_to_ipaddr args {
  return [::twapi::hwaddr_to_ipaddr {*}$args]
}



if {[info command ::twapi::get_netif_indices] ne {}} {
###
# topic: 4b87d977492bd10802bfc0327cd07ac2
# title: Return list of network interfaces
###
proc ::nettool::if_list {} {
  return [::twapi::get_netif_indices]
}


###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {
  set result {}
  foreach iface [::twapi::get_netif_indices] {
    foreach {field value} [::twapi::get_netif_info $iface -physicaladdress] {
      if { $value eq {} } continue
      lappend result [string map {- :} $value]
    }
  }
  return $result
}

###
# topic: a43b6f42141820e0ba1094840d0f6fc0
###
proc ::nettool::network_list {} {
  set result {}
  foreach iface [::twapi::get_netif_indices] {
    set dat [::twapi::GetIpAddrTable $iface]
    foreach element $dat {
      foreach {addr ifindx netmask broadcast reamsize} $element break;
      set mask [::ip::maskToInt $netmask]
      set addri [::ip::toInteger $addr]
      lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $netmask] -ipv4]
    }
  }
  return [lsort -unique $result]
}
} else {

if {[info commands ::twapi::get_network_adapters] ne {}} {
proc ::nettool::if_list {} {
  return [::twapi::get_network_adapters]
}
}

if {[info commands ::twapi::get_network_adapter_info] ne {}} {
proc ::nettool::mac_list {} {

  set result {}
  foreach iface [if_list] {
    set dat [::twapi::get_network_adapter_info $iface -physicaladdress]
    set addr [string map {- :} [lindex $dat 1]]
    if {[string length $addr] eq 0} continue
    if {[string range $addr 0 5] eq "00:00:"} continue
    lappend result $addr
  }
  return $result
}

proc ::nettool::network_list {} {
  set result {}
  foreach iface [if_list] {
    set dat [::twapi::get_network_adapter_info $iface -prefixes]
    foreach kvlist [lindex $dat 1] {
      if {![dict exists $kvlist -address]} continue
      if {![dict exists $kvlist -prefixlength]} continue
      set length [dict get $kvlist -prefixlength]
      if {$length>31} continue
      set address [dict get $kvlist -address]
      if {[string range $address 0 1] eq "ff"} continue
      lappend result $address/$length
    }
  }
  return [lsort -unique $result]
}

}
}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
set body {}
if {[info commands ::twapi::get_ip_addresses] ne {}} {
proc ::nettool::ip_list {} {
  set result [::twapi::get_ip_addresses]
  ldelete result 127.0.0.1
  return $result
}
} elseif {[info commands ::twapi::get_system_ipaddrs] ne {}} {
# They changed commands names on me...
if {[catch {::twapi::get_system_ipaddrs -version 4}]} {
# THEY CHANGED THE API ON ME!
proc ::nettool::ip_list {} {
  set result [::twapi::get_system_ipaddrs -ipversion 4]
  ldelete result 127.0.0.1
  return $result
}
} else {
proc ::nettool::ip_list {} {
  set result [::twapi::get_system_ipaddrs -version 4]
  ldelete result 127.0.0.1
  return $result
}
}
}


proc ::nettool::status {} {
  set result {}
  #dict set result load [::twapi::]
  set cpus [::twapi::get_processor_count]
  set usage 0
  for {set p 0} {$p < $cpus} {incr p} {
    if [catch {
    set pu  [lindex [::twapi::get_processor_info $p  -processorutilization] 1]
    while {$pu eq {}} {
      after 100 {set pause 0}
      vwait pause
      set pu  [lindex [::twapi::get_processor_info $p  -processorutilization] 1]
    }
    set usage [expr {$usage+$pu}]
    } err] {
      set usage -1
    }
  }
  dict set result cpus $cpus
  dict set result load [expr {$usage/$cpus}]
  dict set result uptime [::twapi::get_system_uptime]
}
}

###
# END: platform_windows_twapi.tcl
###

namespace eval ::nettool {
    namespace export *
}
###
# Perform any one-time discovery we might need
###
::nettool::discover
::nettool::init








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
<
>
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|

50
51
52
53
54
55
56














































































































57


58








































































































59






































































































































































































































































































































60
61
62
63

64
65
66
67





































































































68
69































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































70
71
72
set genus [lindex [split [::platform::generic] -] 0]
dict set ::nettool::platform tcl_os  $::tcl_platform(os)
dict set ::nettool::platform odie_class   $::tcl_platform(platform)
dict set ::nettool::platform odie_genus   $genus
dict set ::nettool::platform odie_target  [::platform::generic]
dict set ::nettool::platform odie_species [::platform::identify]















































































































source [file join $here generic.tcl]


source [file join $here available_ports.tcl]








































































































source [file join $here locateport.tcl]







































































































































































































































































































































set platfile [file join $here platform_$::tcl_platform(platform).tcl]
if {[file exists $platfile]} {
  source $platfile

}
set genfile [file join $here platform_$::tcl_platform(platform)_$genus.tcl]
if {[file exists $genfile]} {
  source $genfile





































































































}
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































::nettool::init
package provide nettool 0.5.1

Changes to modules/nettool/pkgIndex.tcl.

1


2
3
4

5


6




if {![package vsatisfies [package provide Tcl] 8.5]} {return}
# Backward compatible alias
package ifneeded nettool::available_ports 0.1 {package require nettool ; package provide nettool::available_ports 0.1}

package ifneeded nettool 0.5.2 [list source [file join $dir nettool.tcl]]




|
>
>
|
<
|
>
|
>
>

>
1
2
3
4

5
6
7
8
9
10
11
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the

# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

package ifneeded nettool 0.5.1 [list source [file join $dir nettool.tcl]]

Added modules/nettool/platform_unix.tcl.















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
###
# Generic answers that can be answered on most if not all unix platforms
###

::namespace eval ::nettool {}

###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
# description: Under unix, we call the arp command for arp table resolution
###
proc ::nettool::arp_table {} {
  set result {}
  set dat [exec arp -a]
  foreach line [split $dat \n] {
    set host [lindex $line 0]
    set ip [lindex $line 1]
    set macid [lindex $line 3]
    lappend result $macid [string range $ip 1 end-1]
  }
  return $result
}

Added modules/nettool/platform_unix_linux.tcl.

































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
::namespace eval ::nettool {}

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  set result {}
  lappend result 127.0.0.1
  foreach {iface info} [dump] {
    if {[dict exists $info ipv4 Bcast:]} {
      lappend result [dict get $info ipv4 Bcast:]
    }
  }
  return [lsort -unique -dictionary $result]
}

###
# topic: 187cfa1827097c5cdf1c40c656cedfcc
# description: Return time since booted
###
proc ::nettool::cpuinfo args {
  variable cpuinfo
  if {![info exists cpuinfo]} {
    set cpuinfo {}
    set dat [cat /proc/meminfo]
    foreach line [split $dat \n] {
      switch [lindex $line 0] {
        MemTotal: {
          # Normalize to MB
          dict set cpuinfo memory [lindex $line 1]/1024
        }
      }
    }
    set cpus 0
    set dat [cat /proc/cpuinfo]
    foreach line [split $dat \n] {
      set idx [string first : $line]
      set field [string trim [string range $line 0 $idx-1]]
      set value [string trim [string range $line $idx+1 end]]
      switch $field {
        processor {
          incr cpus
        }
        {cpu family} {
          dict set cpuinfo family $value
        }
        model {
          dict set cpuinfo model $value
        }
        stepping {
          dict set cpuinfo stepping $value
        }
        vendor_id {
          dict set cpuinfo vendor $value          
        }
        {model name} {
          dict set cpuinfo brand $value                    
        }
        {cpu MHz} {
          dict set cpuinfo speed $value          
        }
        flags {
          dict set cpuinfo features $value
        }
      }
    }
    dict set cpuinfo cpus $cpus
  }
  if {$args eq "<list>"} {
    return [dict keys $cpuinfo]
  }
  if {[llength $args]==0} {
    return $cpuinfo
  }
  if {[llength $args]==1} {
    return [dict get $cpuinfo [lindex $args 0]]
  }
  set result {}
  foreach item $args {
    if {[dict exists $cpuinfo $item]} {
      dict set result $item [dict get $cpuinfo $item]
    } else {
      dict set result $item {}
    }
  }
  return $result
}

###
# topic: aa8eda4fb59296a1a34d8d600ca54e28
# description: Dump interfaces
###
proc ::nettool::dump {} {
  set data [exec ifconfig]
  set iface {}
  set result {}
  foreach line [split $data \n] {
    if {[string index $line 0] in {" " "\t"} } {
      # Indented line appends the prior iface
      switch [lindex $line 0] {
        inet {
          foreach tuple [lrange $line 1 end] {
	    set idx [string first : $tuple]
            set field [string trim [string range $tuple 0 $idx]]
            set value [string trim [string range $tuple $idx+1 end]]
            dict set result $iface ipv4 [string trim $field] [string trim $value]
          }
        }
        inet6 {
          dict set result $iface ipv6 addr: [lindex $line 2]
          foreach tuple [lrange $line 3 end] {
	    set idx [string first : $tuple]
            set field [string trim [string range $tuple 0 $idx]]
            set value [string trim [string range $tuple $idx+1 end]]
            dict set result $iface ipv6 [string trim $field] [string trim $value]
          }
	}
      }
    } else {
      # Non-intended line - new iface
      set iface [lindex $line 0]
      set idx [lsearch $line HWaddr]
      if {$idx >= 0 } {
        dict set result $iface ether: [lindex $line $idx+1]
      }
    }
  }
  return $result
}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
proc ::nettool::ip_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info ipv4 addr:]} {
      lappend result [dict get $info ipv4 addr:]
    }
  }
  ldelete result 127.0.0.1
  return $result
}

###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info ether:]} {
      lappend result [dict get $info ether:]
    }
  }
  return $result
}

###
# topic: a43b6f42141820e0ba1094840d0f6fc0
###
proc ::nettool::network_list {} {
  foreach {iface info} [dump] {
    if {![dict exists $info ipv4 addr:]} continue
    if {![dict exists $info ipv4 Mask:]} continue
    #set mask [::ip::maskToInt $netmask]
    set addr [dict get $info ipv4 addr:]
    set mask [dict get $info ipv4 Mask:]
    set addri [::ip::toInteger $addr]
    lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $mask] -ipv4]    
  }
  return $result
}

###
# topic: e7db1ae1b5b98a1bb4384f0a4fe81f42
###
proc ::nettool::status {} {
  set result {}
  set dat [cat /proc/loadavg]
  dict set result load_average    [lrange $dat 0 2]
  set cpus [cpuinfo cpus].0
  dict set result load [expr {[lindex $dat 0]/$cpus}]
  
  set processes [split [lindex $dat 3] /]
  dict set result processes_running [lindex $processes 0]
  dict set result processes_total [lindex $processes 1]

  set dat [cat /proc/meminfo]
  foreach line [split $dat \n] {
    switch [lindex $line 0] {
      MemTotal: {
        # Normalize to MB
        dict set result memory_total [expr {[lindex $line 1]/1024}]
      }
      MemFree: {
        # Normalize to MB
        dict set result memory_free [expr {[lindex $line 1]/1024}]
      }
    }
  }
  return $result
}

###
# topic: 59bf977ad7287b4d90346fad639aed34
###
proc ::nettool::uptime_report {} {
  set result {}
  set dat [split [exec uptime] ,]
  puts $dat
  dict set result time   [lindex [lindex $dat 0] 0]
  dict set result uptime [lrange [lindex $dat 0] 1 end]
  dict set result users  [lindex [lindex $dat 2] 0]
  dict set result load_1_minute  [lindex [lindex $dat 3] end]
  dict set result load_5_minute  [lindex [lindex $dat 4] end]
  dict set result load_15_minute  [lindex [lindex $dat 5] end]
  return $result
}

unset -nocomplain ::nettool::cpuinfo

Added modules/nettool/platform_unix_macosx.tcl.

















































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
::namespace eval ::nettool {}

###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
# description: Under macosx, we call the arp command for arp table resolution
###
proc ::nettool::arp_table {} {
  set result {}
  set dat [exec arp -a]
  foreach line [split $dat \n] {
    set host [lindex $line 0]
    set ip [lindex $line 1]
    set macid [lindex $line 3]
    lappend result $macid [string range $ip 1 end-1]
  }
  return $result
}

###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  set result {}
  lappend result 127.0.0.1
  foreach {iface info} [dump] {
    if {[dict exists $info broadcast:]} {
      lappend result [dict get $info broadcast:]
    }
  }
  return [lsort -unique -dictionary $result]
}

###
# topic: 187cfa1827097c5cdf1c40c656cedfcc
# description: Return time since booted
###
proc ::nettool::cpuinfo args {
  variable cpuinfo
  if {![info exists cpuinfo]} {
    set cpuinfo {}
    dict set cpuinfo machine  [exec sysctl -n hw.machine]
    dict set cpuinfo cpus     [exec sysctl -n hw.ncpu]
    # Normalize to MB
    dict set cpuinfo memory   [expr {[exec sysctl -n hw.memsize] / 1048576}]
    
    dict set cpuinfo vendor   [exec sysctl -n machdep.cpu.vendor]
    dict set cpuinfo brand    [exec sysctl -n machdep.cpu.brand_string]
    
    dict set cpuinfo model    [exec sysctl -n machdep.cpu.model]
    dict set cpuinfo speed    [expr {[exec sysctl -n hw.cpufrequency]/1000000}]
    
    dict set cpuinfo family   [exec sysctl -n machdep.cpu.family]
    dict set cpuinfo stepping [exec sysctl -n machdep.cpu.stepping]
    dict set cpuinfo features [exec sysctl -n machdep.cpu.features]
    dict set cpuinfo diskless []
  }
  if {$args eq "<list>"} {
    return [dict keys $cpuinfo]
  }
  if {[llength $args]==0} {
    return $cpuinfo
  }
  if {[llength $args]==1} {
    return [dict get $cpuinfo [lindex $args 0]]
  }
  set result {}
  foreach item $args {
    if {[dict exists $cpuinfo $item]} {
      dict set result $item [dict get $cpuinfo $item]
    } else {
      dict set result $item {}
    }
  }
  return $result
}

###
# topic: aa8eda4fb59296a1a34d8d600ca54e28
# description: Dump interfaces
###
proc ::nettool::dump {} {
  set data [exec ifconfig]
  set iface {}
  set result {}
  foreach line [split $data \n] {
    if {[string index $line 0] in {" " "\t"} } {
      # Indented line appends the prior iface
      foreach {field value} $line {
        dict set result $iface [string trimright $field :]: $value
      }
    } else {
      # Non-intended line - new iface
      set iface [lindex $line 0]
    }
  }
  return $result
}

###
# topic: dd2e2c0810cea69909399808f2a68949
# title: Return a list of unique hardware addresses
###
proc ::nettool::hwid_list {} {
  variable cached_data
  set result {}
  if {![info exists cached_data]} {
    if {[catch {exec system_profiler SPHardwareDataType} hwlist]} {
      set cached_data {}
    } else {
      set cached_data $hwlist
      
    }
  }
  set serial {}
  set hwuuid {}
  set result {}
  catch {
  foreach line [split $cached_data \n] {
    if { [lindex $line 0] == "Serial" && [lindex $line 1] == "Number" } {
      set serial [lindex $line end]
    }
    if { [lindex $line 0] == "Hardware" && [lindex $line 1] == "UUID:" } {
      set hwuuid [lindex $line end]
    }
  }
  }
  if { $hwuuid != {} } {
    lappend result 0x[string map {- {}} $hwuuid]
  }
  # Blank serial number?
  if { $serial != {} } {
    set sn [binary scan $serial H* hash]
    lappend result 0x$hash
  }
  if {[llength $result]} {
    return $result
  }
  foreach mac [::nettool::mac_list] {
    lappend result 0x[string map {: {}} $mac]
  }
  if {[llength $result]} {
    return $result
  }
  return 0x010203040506
}

###
# topic: d2932eb0ea8cc9f6a865c1ab7cdd4572
# description:
#    Called on package load to build any static
#    structures to cache data that would be time
#    consuming to call on the fly
###
proc ::nettool::init {} {
  unset -nocomplain [namespace current]::cpuinfo
  
}

###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
proc ::nettool::ip_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info inet:]} {
      lappend result [dict get $info inet:]
    }
  }
  ldelete result 127.0.0.1
  return $result
}

###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {
  set result {}
  foreach {iface info} [dump] {
    if {[dict exists $info ether:]} {
      lappend result [dict get $info ether:]
    }
  }
  return $result
}

###
# topic: a43b6f42141820e0ba1094840d0f6fc0
###
proc ::nettool::network_list {} {
  foreach {iface info} [dump] {
    if {![dict exists $info inet:]} continue
    if {![dict exists $info netmask:]} continue
    #set mask [::ip::maskToInt $netmask]
    set addr [dict get $info inet:]
    set mask [dict get $info netmask:]
    set addri [::ip::toInteger $addr]
    lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $mask] -ipv4]    
  }
  return $result
}

###
# topic: e7db1ae1b5b98a1bb4384f0a4fe81f42
###
proc ::nettool::status {} {
  set result {}
  set loaddat [lindex [exec sysctl -n vm.loadavg] 0]
  set cpus [cpuinfo cpus]
  dict set result cpus $cpus
  dict set result load [expr {[lindex $loaddat 0]*100.0/$cpus}]
  dict set result load_average_1 [lindex $loaddat 0]
  dict set result load_average_5 [lindex $loaddat 1]
  dict set result load_average_15 [lindex $loaddat 2]

  set total [exec sysctl -n hw.memsize]
  dict set result memory_total [expr {$total / 1048576}]
  set used 0
  foreach {amt} [exec sysctl -n machdep.memmap] {
    incr used $amt
  }
  dict set result memory_free [expr {($total - $used) / 1048576}]

  return $result
}

proc ::nettool::user_data_root {appname} {
  return [file join $::env(HOME) Library {Application Support} $appname]
}

Added modules/nettool/platform_windows.tcl.























































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
package require twapi

::namespace eval ::nettool {}

###
# topic: 825cd25953c2cc896a96006b7f454e00
# title: Return pairings of MAC numbers to IP addresses on the local network
# description: Under macosx, we call the arp command for arp table resolution
###
proc ::nettool::arp_table {} {
  set result {}
  catch {
  foreach element [::twapi::get_arp_table] {
    foreach {ifidx macid ipaddr type} {
      lappend result [string map {- :} $macid] $ipaddr
    }
  }
  }
  return $result
}


###
# topic: 57fdc331bc60c7bf2bd3f3214e9a906f
###
proc ::nettool::hwaddr_to_ipaddr args {
  return [::twapi::hwaddr_to_ipaddr {*}$args]
}

###
# topic: dd2e2c0810cea69909399808f2a68949
# title: Return a list of unique hardware ids
###
proc ::nettool::hwid_list {} {
  # Use the serial number on the hard drive
  catch {exec {*}[auto_execok vol] c:} voldat
  set num [lindex [lindex [split $voldat \n] end] end]
  return 0x[string map {- {}} $num]
}

if {[info command ::twapi::get_netif_indices] ne {}} {
###
# topic: 4b87d977492bd10802bfc0327cd07ac2
# title: Return list of network interfaces
###
proc ::nettool::if_list {} {
  return [::twapi::get_netif_indices]
}


###
# topic: ac9d6815d47f60d45930f0c8c8ae8f16
# title: Return list of mac numbers for this computer (primary first)
###
proc ::nettool::mac_list {} {
  
  set result {}
  foreach iface [::twapi::get_netif_indices] {
    foreach {field value} [::twapi::get_netif_info $iface -physicaladdress] {
      if { $value eq {} } continue
      lappend result [string map {- :} $value] 
    }
  }
  return $result
}

###
# topic: a43b6f42141820e0ba1094840d0f6fc0
###
proc ::nettool::network_list {} {
  set result {}
  foreach iface [::twapi::get_netif_indices] {
    set dat [::twapi::GetIpAddrTable $iface]
    foreach element $dat {
      foreach {addr ifindx netmask broadcast reamsize} $element break;
      set mask [::ip::maskToInt $netmask]
      set addri [::ip::toInteger $addr]
      lappend result [ip::nativeToPrefix [list [expr {$addri & $mask}] $netmask] -ipv4]    
    }
  }
  return [lsort -unique $result]
}
} else {

if {[info commands ::twapi::get_network_adapters] ne {}} {
proc ::nettool::if_list {} {
  return [::twapi::get_network_adapters]
}
}

if {[info commands ::twapi::get_network_adapter_info] ne {}} {
proc ::nettool::mac_list {} {
  
  set result {}
  foreach iface [if_list] {
    set dat [::twapi::get_network_adapter_info $iface -physicaladdress]
    set addr [string map {- :} [lindex $dat 1]]
    if {[string length $addr] eq 0} continue
    if {[string range $addr 0 5] eq "00:00:"} continue
    lappend result $addr
  }
  return $result
}
  
proc ::nettool::network_list {} {
  set result {}
  foreach iface [if_list] {
    set dat [::twapi::get_network_adapter_info $iface -prefixes]
    foreach kvlist [lindex $dat 1] {
      if {![dict exists $kvlist -address]} continue
      if {![dict exists $kvlist -prefixlength]} continue
      set length [dict get $kvlist -prefixlength]
      if {$length>31} continue
      set address [dict get $kvlist -address]
      if {[string range $address 0 1] eq "ff"} continue
      lappend result $address/$length
    }
  }
  return [lsort -unique $result]
}

}
}


###
# topic: 92ebbfa155883ad41c37d3f843392be4
# title: Return list of broadcast addresses for local networks
###
proc ::nettool::broadcast_list {} {
  set result {}
  lappend result 127.0.0.1
  foreach net [network_list] {
    if {$net in {224.0.0.0/4 127.0.0.0/8}} continue
    lappend result [::ip::broadcastAddress $net]
  }
  return [lsort -unique -dictionary $result]
}
###
# topic: 417672d3f31b80d749588365af88baf6
# title: Return list of ip addresses for this computer (primary first)
###
set body {}
if {[info commands ::twapi::get_ip_addresses] ne {}} {
proc ::nettool::ip_list {} {
  set result [::twapi::get_ip_addresses]
  ldelete result 127.0.0.1
  return $result
}
} elseif {[info commands ::twapi::get_system_ipaddrs] ne {}} {
# They changed commands names on me...
proc ::nettool::ip_list {} {
  set result [::twapi::get_system_ipaddrs -version 4]
  ldelete result 127.0.0.1
  return $result
}
}



proc ::nettool::status {} {
  set result {}
  #dict set result load [::twapi::]
  set cpus [::twapi::get_processor_count]
  set usage 0
  for {set p 0} {$p < $cpus} {incr p} {
    if [catch {
    set pu  [lindex [::twapi::get_processor_info $p  -processorutilization] 1]
    while {$pu eq {}} {
      after 100 {set pause 0}
      vwait pause
      set pu  [lindex [::twapi::get_processor_info $p  -processorutilization] 1]
    }
    set usage [expr {$usage+$pu}]
    } err] {
      set usage -1
    }
  }
  dict set result cpus $cpus
  dict set result load [expr {$usage/$cpus}]
  dict set result uptime [::twapi::get_system_uptime]
}

proc ::nettool::user_data_root {appname} {
  return [file join $::env(APPDATA) $appname]
}
package provide nettool::platform::windows 0.2

Added modules/nettool/scripts/build_services.tcl.







































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
###
# topic: 65dfea29d424543cdfc0e1cbf9f90295ef6214cb
# description:
#    This script digests the raw data from
#    http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv
#    And produces a summary
###
proc ::record {service port type usage} {
  if { $port eq {} } return
  if {$service eq {} && $type in {tcp udp {}} && $usage != "Reserved"} {
    ladd ::available_port($port) {*}$type
    return
  }
  unset -nocomplain ::available_port($port)
  lappend ::busy_port($port) $type $usage
  #puts [list busy $service $port $type $usage]
}

for {set x 0} {$x < 65536} {incr x} {
  set ::available_port($x) {}
}
package require dicttool
package require csv
set fin [open [lindex $argv 0] r]
set headers [gets $fin]
set thisline {}
while {[gets $fin line]>=0} {
  append thisline \n$line
  if {![csv::iscomplete $line]} continue
  set lline [csv::split $line]
  if [catch {
  set service [lindex $lline 0]
  set port [lindex $lline 1]
  set type [lindex $lline 2]
  set usage [lindex $lline 3]

  }] continue
  if {![string is integer -strict $port]} {
    set startport [lindex [split $port -] 0]
    set endport [lindex [split $port -] 1]
    if {[string is integer -strict $startport] && [string is integer -strict $endport]} {
      for {set i $startport} {$i<=$endport}  {incr i}  {
        record $service $i $type $usage
      }
      continue
    }
    
  }
  
  record $service $port $type $usage
}
close $fin

set fout [open available_ports.tcl w]
puts $fout {
package provide nettool::available_ports 0.1
namespace eval ::nettool {
  set blocks {}
}
}
set startport 0
set endport 0
foreach {port avail} [lsort -integer -stride 2 [array get available_port]] {
  # Don't bother with ports below 1024
  # Most operating systems won't let us access them anyway
  if {$port < 1024 } continue
  if { $endport == ($port-1) } {
    set endport $port
    continue
  }
  if {$startport} {
    puts $fout [list lappend ::nettool::blocks $startport $endport]
  }
  set startport $port
  set endport $port
}
if { $startport } {
  puts $fout [list lappend ::nettool::blocks $startport $endport]
}
close $fout

exit

Added modules/nettool/service-names-port-numbers.csv.

more than 10,000 changes

Changes to modules/nmea/nmea.man.

94
95
96
97
98
99
100
101
102
    puts "unknown data type $name"
}
}]

[list_end]

[vset CATEGORY nmea]
[include ../common-text/feedback.inc]
[manpage_end]







|

94
95
96
97
98
99
100
101
102
    puts "unknown data type $name"
}
}]

[list_end]

[vset CATEGORY nmea]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/nns/nns_auto.man.

111
112
113
114
115
116
117
118
119
[para]

Another loss of the connection, be it during or after re-entering the
remembered information simply restarts the timer and subsequent
reconnection attempts.

[vset CATEGORY nameserv]
[include ../common-text/feedback.inc]
[manpage_end]







|

111
112
113
114
115
116
117
118
119
[para]

Another loss of the connection, be it during or after re-entering the
remembered information simply restarts the timer and subsequent
reconnection attempts.

[vset CATEGORY nameserv]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/nns/nns_client.man.

132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
In this form the command returns a dictionary of all supported
options, and their current values. The list of supported options and
their meaning can be found in section [sectref OPTIONS].

[call [cmd ::nameserv::configure] [option -option]]

In this form the command is an alias for
"[cmd ::nameserv::cget] [option -option]".

The list of supported options and their meaning can be found in
section [sectref OPTIONS].

[call [cmd ::nameserv::configure] "[option -option] [arg value]..."]

In this form the command is used to configure one or more of the







|







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
In this form the command returns a dictionary of all supported
options, and their current values. The list of supported options and
their meaning can be found in section [sectref OPTIONS].

[call [cmd ::nameserv::configure] [option -option]]

In this form the command is an alias for
"[cmd ::nameserv::cget] [option -option]]".

The list of supported options and their meaning can be found in
section [sectref OPTIONS].

[call [cmd ::nameserv::configure] "[option -option] [arg value]..."]

In this form the command is used to configure one or more of the
330
331
332
333
334
335
336
337
338
its connection to the name service. Based on package [package uevent].

[def 0.1]
Initial implementation of the client.
[list_end]

[vset CATEGORY nameserv]
[include ../common-text/feedback.inc]
[manpage_end]







|

330
331
332
333
334
335
336
337
338
its connection to the name service. Based on package [package uevent].

[def 0.1]
Initial implementation of the client.
[list_end]

[vset CATEGORY nameserv]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/nns/nns_common.man.

39
40
41
42
43
44
45
46
47
The result returned by the command is the id of the default TCP/IP
port a nameservice server will listen on, and a name service client
will try to connect to.

[list_end]

[vset CATEGORY nameserv]
[include ../common-text/feedback.inc]
[manpage_end]







|

39
40
41
42
43
44
45
46
47
The result returned by the command is the id of the default TCP/IP
port a nameservice server will listen on, and a name service client
will try to connect to.

[list_end]

[vset CATEGORY nameserv]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/nns/nns_intro.man.

120
121
122
123
124
125
126
127
128
[para]

Developers wishing to modify and/or extend or to just understand the
internals of the nameservice facility however are strongly advised to
read it.

[vset CATEGORY nameserv]
[include ../common-text/feedback.inc]
[manpage_end]







|

120
121
122
123
124
125
126
127
128
[para]

Developers wishing to modify and/or extend or to just understand the
internals of the nameservice facility however are strongly advised to
read it.

[vset CATEGORY nameserv]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/nns/nns_protocol.man.

174
175
176
177
178
179
180
181
182

The argument coming before the response tells the client whether the
names in the response were added or removed from the service.

[list_end]

[vset CATEGORY nameserv]
[include ../common-text/feedback.inc]
[manpage_end]







|

174
175
176
177
178
179
180
181
182

The argument coming before the response tells the client whether the
names in the response were added or removed from the service.

[list_end]

[vset CATEGORY nameserv]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/nns/nns_server.man.

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
In this form the command returns a dictionary of all supported
options, and their current values. The list of supported options and
their meaning can be found in section [sectref OPTIONS].

[call [cmd ::nameserv::server::configure] [option -option]]

In this form the command is an alias for
"[cmd ::nameserv::server::cget] [option -option]".

The list of supported options and their meaning can be found in
section [sectref OPTIONS].

[call [cmd ::nameserv::server::configure] "[option -option] [arg value]..."]

In this form the command is used to configure one or more of the







|







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
In this form the command returns a dictionary of all supported
options, and their current values. The list of supported options and
their meaning can be found in section [sectref OPTIONS].

[call [cmd ::nameserv::server::configure] [option -option]]

In this form the command is an alias for
"[cmd ::nameserv::server::cget] [option -option]]".

The list of supported options and their meaning can be found in
section [sectref OPTIONS].

[call [cmd ::nameserv::server::configure] "[option -option] [arg value]..."]

In this form the command is used to configure one or more of the
137
138
139
140
141
142
143
144
145
Changed name of -local switch to -localonly.

[def 0.1]
Initial implementation of the server.
[list_end]

[vset CATEGORY nameserv]
[include ../common-text/feedback.inc]
[manpage_end]







|

137
138
139
140
141
142
143
144
145
Changed name of -local switch to -localonly.

[def 0.1]
Initial implementation of the server.
[list_end]

[vset CATEGORY nameserv]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/nntp/nntp.man.

330
331
332
333
334
335
336
337
338
    Date: [clock format [clock seconds] -format "%a, %d %
    b %y %H:%M:%S GMT" -gmt true]

    Test message body"
}]

[vset CATEGORY nntp]
[include ../common-text/feedback.inc]
[manpage_end]







|

330
331
332
333
334
335
336
337
338
    Date: [clock format [clock seconds] -format "%a, %d %
    b %y %H:%M:%S GMT" -gmt true]

    Test message body"
}]

[vset CATEGORY nntp]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/ntp/ntp_time.man.

123
124
125
126
127
128
129
130
131
time::getsntp -command on_time pool.ntp.org
}]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY ntp]
[include ../common-text/feedback.inc]
[manpage_end]







|

123
124
125
126
127
128
129
130
131
time::getsntp -command on_time pool.ntp.org
}]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY ntp]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/oauth/oauth.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 1.0.3]
[manpage_begin oauth n [vset PACKAGE_VERSION]]
[keywords {oauth}]
[keywords {RFC 5849}]
[keywords {RFC 2718}]
[keywords twitter]
[copyright {2014 Javi P. <hxm@eggdrop.es>}]
[moddesc   {oauth}]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 1.0]
[manpage_begin oauth n [vset PACKAGE_VERSION]]
[keywords {oauth}]
[keywords {RFC 5849}]
[keywords {RFC 2718}]
[keywords twitter]
[copyright {2014 Javi P. <hxm@eggdrop.es>}]
[moddesc   {oauth}]
183
184
185
186
187
188
189
190
191
follow_request_sent => false
notifications => false}]

[list_end]
[para]

[vset CATEGORY oauth]
[include ../common-text/feedback.inc]
[manpage_end]







|

183
184
185
186
187
188
189
190
191
follow_request_sent => false
notifications => false}]

[list_end]
[para]

[vset CATEGORY oauth]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/oauth/oauth.tcl.

1
2
3
4
5
6
7
8
#!/bin/sh
# the next line will restart with tclsh wherever it is \
exec tclsh "$0" "$@"

# oauth.tcl -*- tcl -*-
# 		This module pretend give full support to API version 1.1 of Twitter
#		according to API v1.1’s Authentication Model
#
|







1
2
3
4
5
6
7
8
# !/bin/sh
# the next line will restart with tclsh wherever it is \
exec tclsh "$0" "$@"

# oauth.tcl -*- tcl -*-
# 		This module pretend give full support to API version 1.1 of Twitter
#		according to API v1.1’s Authentication Model
#
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#       1.5 Timestamp (oauth_timestamp) time in unix format of the request
#       1.6 Token (oauth_token) a parameter you can obtain in your account settings
#       1.7 Version (oauth_version) the OAuth version, actually 1.0

#  TODO: create online documentation

package require Tcl 8.5
package provide oauth 1.0.3

package require http
package require tls
package require base64
package require sha1

http::register https 443 ::tls::socket







|







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#       1.5 Timestamp (oauth_timestamp) time in unix format of the request
#       1.6 Token (oauth_token) a parameter you can obtain in your account settings
#       1.7 Version (oauth_version) the OAuth version, actually 1.0

#  TODO: create online documentation

package require Tcl 8.5
package provide oauth 1

package require http
package require tls
package require base64
package require sha1

http::register https 443 ::tls::socket
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#       OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog", 
#             oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg", 
#             oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D", 
#             oauth_signature_method="HMAC-SHA1", 
#             oauth_timestamp="1318622958", 
#             oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb", 
#             oauth_version="1.0"
proc ::oauth::header {baseURL {postQuery {}}} {
    variable oauth

    if {$oauth(-signmethod) eq ""} {
	Error "ERROR: invalid argument for -signmethod." BAD SIGN-METHOD
    }
    if {[package vcompare $oauth(-oauthversion) 1.0] != 0} {
	Error "ERROR: this script only supports oauth_version 1.0" \







|







121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#       OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog", 
#             oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg", 
#             oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D", 
#             oauth_signature_method="HMAC-SHA1", 
#             oauth_timestamp="1318622958", 
#             oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb", 
#             oauth_version="1.0"
proc ::oauth::header {baseURL {postQuery ""}} {
    variable oauth

    if {$oauth(-signmethod) eq ""} {
	Error "ERROR: invalid argument for -signmethod." BAD SIGN-METHOD
    }
    if {[package vcompare $oauth(-oauthversion) 1.0] != 0} {
	Error "ERROR: this script only supports oauth_version 1.0" \
151
152
153
154
155
156
157
158
159
160
161
162




163
164
165
166
167
168
169




170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212

    lappend paramList "oauth_consumer_key=$oauth(-consumerkey)"
    lappend paramList "oauth_nonce=$randomKey"
    lappend paramList "oauth_signature_method=$oauth(-signmethod)"
    lappend paramList "oauth_timestamp=$timestamp"
    lappend paramList "oauth_token=$oauth(-accesstoken)"
    lappend paramList "oauth_version=$oauth(-oauthversion)"

    set header $paramList

    if {$postQuery eq {}} {
	lassign [Split $baseURL ?] url queryString




	set httpMethod GET
    } else {
	set url         $baseURL
	set queryString $postQuery
	set httpMethod POST
    }
    lappend paramList {*}[split $queryString &]





    set headerQ [QuoteValues $header]
    set paramString [join [lsort -dictionary $paramList] &]
    
    lappend baseList $httpMethod
    lappend baseList [PercentEncode $url]
    lappend baseList [PercentEncode $paramString]
    set signString [join $baseList &]
    
    set signKey "[PercentEncode $oauth(-consumersecret)]&[PercentEncode $oauth(-accesstokensecret)]"
    set signature [base64::encode [sha1::hmac -bin -key $signKey $signString]]

    lappend headerQ "oauth_signature=\"[PercentEncode $signature]\""
    if {$oauth(-debug) == 1} {
	puts {oauth::header: Authorization Oauth}
	foreach line $header {
	    puts "\t$line"
	}
	puts "\nBaseString: $signString"
    }
    return "Authorization [list [concat OAuth [join [lsort -dictionary $headerQ] {, }]]]"
}

# query --
#       Sends to oauth API url the proper oauth header and querybody
#       returning the raw data from Twitter for your parse.
# Arguments:
#       baseURL     api host URL with ?arguments if it's a GET request
#       postQuery   POST query if it's a POST query
# Result:
#       The result will be list with 2 arguments.
#       The first argument is an array with the http's header
#       and the second one is JSON data received from the server. The header is
#       very important because it reports your rest API limit and will
#       inform you if you can get your account suspended.
proc ::oauth::query {baseURL {postQuery {}}} {
    variable oauth
    if {$oauth(-consumerkey) eq ""} {
	Error "ERROR: please define your consumer key.\
            [namespace current]::config -consumerkey <...>" \
	    BAD CONSUMER-KEY
    }
    if {$oauth(-consumersecret) eq ""} {







|
<
<

|
>
>
>
>
|

|
<
|

|
>
>
>
>
|
<
|




|




|







|








|





|







151
152
153
154
155
156
157
158


159
160
161
162
163
164
165
166
167

168
169
170
171
172
173
174
175

176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216

    lappend paramList "oauth_consumer_key=$oauth(-consumerkey)"
    lappend paramList "oauth_nonce=$randomKey"
    lappend paramList "oauth_signature_method=$oauth(-signmethod)"
    lappend paramList "oauth_timestamp=$timestamp"
    lappend paramList "oauth_token=$oauth(-accesstoken)"
    lappend paramList "oauth_version=$oauth(-oauthversion)"
    


    if {$postQuery eq {}} {
	set url [lindex [split $baseURL {?}] 0]
	set queryString [lindex [split $baseURL {?}] 1]
	foreach argument [split $queryString {&}] {
	    lappend paramList $argument
	}
	set httpMethod {GET}
    } else {
	set url $baseURL

	set httpMethod {POST}
    }

    foreach parameter $paramList {
	set key [lindex [split $parameter {=}] 0]
	set value [join [lrange [split $parameter {=}] 1 end] {=}]
	lappend header "${key}=\"${value}\""
    }

    set paramString [join [lsort -dictionary $paramList] {&}]
    
    lappend baseList $httpMethod
    lappend baseList [PercentEncode $url]
    lappend baseList [PercentEncode $paramString]
    set signString [join $baseList {&}]
    
    set signKey "[PercentEncode $oauth(-consumersecret)]&[PercentEncode $oauth(-accesstokensecret)]"
    set signature [base64::encode [sha1::hmac -bin -key $signKey $signString]]

    lappend header "oauth_signature=\"[PercentEncode $signature]\""
    if {$oauth(-debug) == 1} {
	puts {oauth::header: Authorization Oauth}
	foreach line $header {
	    puts "\t$line"
	}
	puts "\nBaseString: $signString"
    }
    return "Authorization [list [concat OAuth [join [lsort -dictionary $header] {, }]]]"
}

# query --
#       Sends to oauth API url the proper oauth header and querybody
#       returning the raw data from Twitter for your parse.
# Arguments:
#       baseURL     api host URL with ?arguments if it's a GET request
#       postQuery   POST query if it's a POST query
# Result:
#       The result will be list with 2 arguments.
#       The first argument is an array with the http's header
#       and the second one is JSON data received from the server. The header is
#       very important because it reports your rest API limit and will
#       inform you if you can get your account suspended.
proc ::oauth::query {baseURL {postQuery ""}} {
    variable oauth
    if {$oauth(-consumerkey) eq ""} {
	Error "ERROR: please define your consumer key.\
            [namespace current]::config -consumerkey <...>" \
	    BAD CONSUMER-KEY
    }
    if {$oauth(-consumersecret) eq ""} {
221
222
223
224
225
226
227
228

229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248


249
250
251
252
253
254
255
    }
    if {$oauth(-accesstokensecret) eq ""} {
	Error "ERROR: please define your app's access token secret.\
            [namespace current]::config -accesstokensecret <...>" \
	    BAD ACCESS-TOKEN-SECRET
    }
    if {$postQuery eq ""} {
	lassign [Split $baseURL ?] url queryString

	set httpMethod GET
    } else {
	set url $baseURL
	set queryString $postQuery
	set httpMethod POST
    }
    
    if {$httpMethod eq "GET"} {
	if {$queryString ne {}} {
	    append url ? $queryString
	}
	set requestBody {}
    } else {
	set requestBody $queryString
    }
    if {$queryString ne {}} {
	set header [header $url $queryString]
    } else {
	set header [header $url]
    }



    http::config \
	-proxyhost $oauth(-proxyhost) \
	-proxyport $oauth(-proxyport) \
	-useragent $oauth(-useragent)

    set token [http::geturl $baseURL \







|
>
|


<
|


|








|

|

>
>







225
226
227
228
229
230
231
232
233
234
235
236

237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
    }
    if {$oauth(-accesstokensecret) eq ""} {
	Error "ERROR: please define your app's access token secret.\
            [namespace current]::config -accesstokensecret <...>" \
	    BAD ACCESS-TOKEN-SECRET
    }
    if {$postQuery eq ""} {
	set url [lindex [split $baseURL {?}] 0]
	set queryString [join [lrange [split $baseURL {?}] 1 end] {?}]
	set httpMethod {GET}
    } else {
	set url $baseURL

	set httpMethod {POST}
    }
    
    if {$httpMethod eq {GET}} {
	if {$queryString ne {}} {
	    append url ? $queryString
	}
	set requestBody {}
    } else {
	set requestBody $queryString
    }
    if {$queryString ne {}} {
	set headerURL ${url}?${queryString}
    } else {
	set headerURL $url
    }

    set header [header $headerURL]

    http::config \
	-proxyhost $oauth(-proxyhost) \
	-proxyport $oauth(-proxyport) \
	-useragent $oauth(-useragent)

    set token [http::geturl $baseURL \
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
    lappend result [array names state]
    lappend result $data
    http::cleanup $token

    return $result
}

# QuoteValues --
#    Add double-quotes around all values in the parameter string
#    and return a list of modified parameter assignments.
proc ::oauth::QuoteValues {params} {
    set tmp {}
    foreach parameter $params {
	lassign [Split $parameter =] key value
	lappend tmp "${key}=\"${value}\""
    }
    return $tmp
}

# Split -
#	Split the string on the first separator
#       and return both parts as a list.
proc ::oauth::Split {string sep} {
    regexp "^(\[^${sep}\]+)${sep}(.*)\$" $string -> key value
    list $key $value
}

# PercentEncode --
#       Encoding process in http://tools.ietf.org/html/rfc3986#section-2.1
#       for Twitter authentication. (http::formatQuery is lowcase)
proc ::oauth::PercentEncode {string} {
    set utf8String [encoding convertto utf-8 $string]
    return [string map {"\n" "%0A"} \







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







269
270
271
272
273
274
275



















276
277
278
279
280
281
282
    lappend result [array names state]
    lappend result $data
    http::cleanup $token

    return $result
}





















# PercentEncode --
#       Encoding process in http://tools.ietf.org/html/rfc3986#section-2.1
#       for Twitter authentication. (http::formatQuery is lowcase)
proc ::oauth::PercentEncode {string} {
    set utf8String [encoding convertto utf-8 $string]
    return [string map {"\n" "%0A"} \

Deleted modules/oauth/oauth.test.

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
# oauth.test
# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2
testsNeed tls

support {
    use sha1/sha1.tcl     sha1
    use base64/base64.tcl base64
}
testing {
    useLocal oauth.tcl oauth
}

# -------------------------------------------------------------------------
# A no-op test, just to have one running.
# As is this file tests that the package code loads at least

test oauth-placeholder {oauth, placeholder, no-op} -setup {
} -body {
} -cleanup {
} -result {}

# -------------------------------------------------------------------------
testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































Changes to modules/oauth/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded oauth 1.0.3 [list source [file join $dir oauth.tcl]]

|
1
2
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded oauth 1 [list source [file join $dir oauth.tcl]]

Changes to modules/oodialect/oodialect.demo.

Changes to modules/oodialect/oodialect.md.

Changes to modules/oodialect/oodialect.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
###
# oodialect.tcl
#
# Copyright (c) 2015-2018 Sean Woods
# Copyright (c) 2015 Donald K Fellows
#
# BSD License
###
# @@ Meta Begin
# Package oo::dialect 0.3.3
# Meta platform     tcl
# Meta summary      A utility for defining a domain specific language for TclOO systems
# Meta description  This package allows developers to generate
# Meta description  domain specific languages to describe TclOO
# Meta description  classes and objects.
# Meta category     TclOO
# Meta subject      oodialect



<
|




|







1
2
3

4
5
6
7
8
9
10
11
12
13
14
15
16
###
# oodialect.tcl
#

# Copyright (c) 2015 Sean Woods, Donald K Fellows
#
# BSD License
###
# @@ Meta Begin
# Package oo::dialect 0.3.1
# Meta platform     tcl
# Meta summary      A utility for defining a domain specific language for TclOO systems
# Meta description  This package allows developers to generate
# Meta description  domain specific languages to describe TclOO
# Meta description  classes and objects.
# Meta category     TclOO
# Meta subject      oodialect
153
154
155
156
157
158
159
160
161
162

163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180

proc ::oo::dialect::DefineThunk {target args} {
  tailcall ::oo::define [Peek] $target {*}$args
}

proc ::oo::dialect::Canonical {namespace NSpace class} {
  namespace upvar $namespace cname cname
  #if {[string match ::* $class]} {
  #  return $class
  #}

  if {[info exists cname($class)]} {
    return $cname($class)
  }
  if {[info exists ::oo::dialect::cname($class)]} {
    return $::oo::dialect::cname($class)
  }
  if {[info exists ::oo::dialect::cname(${NSpace}::${class})]} {
    return $::oo::dialect::cname(${NSpace}::${class})
  }
  foreach item [list "${NSpace}::$class" "::$class"] {
    if {[info commands $item] ne {}} {
      return $item
    }
  }
  return ${NSpace}::$class
}

###







|
|
<
>






<
<
<

|







152
153
154
155
156
157
158
159
160

161
162
163
164
165
166
167



168
169
170
171
172
173
174
175
176

proc ::oo::dialect::DefineThunk {target args} {
  tailcall ::oo::define [Peek] $target {*}$args
}

proc ::oo::dialect::Canonical {namespace NSpace class} {
  namespace upvar $namespace cname cname
  if {[string match ::* $class]} {
    return $class

  }
  if {[info exists cname($class)]} {
    return $cname($class)
  }
  if {[info exists ::oo::dialect::cname($class)]} {
    return $::oo::dialect::cname($class)
  }



  foreach item [list "${NSpace}::$class" "::$class"] {
    if {[info command $item] ne {}} {
      return $item
    }
  }
  return ${NSpace}::$class
}

###
201
202
203
204
205
206
207
208
209
210
211

212
213
214
215
216
217
218
219
220

proc ::oo::dialect::Aliases {namespace args} {
  set class [Peek]
  namespace upvar $namespace cname cname
  set NSpace [join [lrange [split $class ::] 1 end-2] ::]
  set cname($class) $class
  foreach name $args {
    set cname($name) $class
    #set alias $name
    set alias [NSNormalize $NSpace $name]
    # Add a local metaclass reference

    if {![info exists ::oo::dialect::cname($alias)]} {
      lappend ::oo::dialect::aliases($class) $alias
      ##
      # Add a global reference, first come, first served
      ##
      set ::oo::dialect::cname($alias) $class
    }
  }
}







<
|
|

>

<







197
198
199
200
201
202
203

204
205
206
207
208

209
210
211
212
213
214
215

proc ::oo::dialect::Aliases {namespace args} {
  set class [Peek]
  namespace upvar $namespace cname cname
  set NSpace [join [lrange [split $class ::] 1 end-2] ::]
  set cname($class) $class
  foreach name $args {

    set alias $name
    #set alias [NSNormalize $NSpace $name]
    # Add a local metaclass reference
    set cname($alias) $class
    if {![info exists ::oo::dialect::cname($alias)]} {

      ##
      # Add a global reference, first come, first served
      ##
      set ::oo::dialect::cname($alias) $class
    }
  }
}
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
  superclass ::oo::class
  constructor {define definitionScript} {
    $define [self] {
      superclass
    }
    $define [self] $definitionScript
  }
  method aliases {} {
    if {[info exists ::oo::dialect::aliases([self])]} {
      return $::oo::dialect::aliases([self])
    }
  }
}

package provide oo::dialect 0.3.3







<
<
<
|
|
<
<
|
246
247
248
249
250
251
252



253
254


255
  superclass ::oo::class
  constructor {define definitionScript} {
    $define [self] {
      superclass
    }
    $define [self] $definitionScript
  }



}



package provide oo::dialect 0.3.1

Changes to modules/oodialect/oodialect.test.

136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
namespace eval ::test1 {
    ::bravo::define f {
       superclass A
    }
}
} ::test1::f


test oodialect-aliasing-003 {Testing aliase method on class} {
  ::test1::a aliases
} {::test1::A}


test oodialect-ancestry-003 {Testing heritage} {
  ::oo::meta::ancestors ::test1::f
} {::oo::object ::alpha::object ::bravo::object ::test1::a ::test1::f}

test oodialect-ancestry-004 {Testing heritage} {
  ::oo::meta::ancestors ::alpha::object
} {::oo::object ::alpha::object}

test oodialect-ancestry-005 {Testing heritage} {
  ::oo::meta::ancestors ::delta::object
} {::oo::object ::alpha::object ::bravo::object ::charlie::object ::delta::object}

# -------------------------------------------------------------------------


testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:







<
<
<
<
<
<
|



|



|


<









136
137
138
139
140
141
142






143
144
145
146
147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
namespace eval ::test1 {
    ::bravo::define f {
       superclass A
    }
}
} ::test1::f







test oodialect-ancestry-001 {Testing heritage} {
  ::oo::meta::ancestors ::test1::f
} {::oo::object ::alpha::object ::bravo::object ::test1::a ::test1::f}

test oodialect-ancestry-001 {Testing heritage} {
  ::oo::meta::ancestors ::alpha::object
} {::oo::object ::alpha::object}

test oodialect-ancestry-001 {Testing heritage} {
  ::oo::meta::ancestors ::delta::object
} {::oo::object ::alpha::object ::bravo::object ::charlie::object ::delta::object}

# -------------------------------------------------------------------------


testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:

Changes to modules/oodialect/pkgIndex.tcl.











1










package ifneeded oo::dialect 0.3.3 [list source [file join $dir oodialect.tcl]]
>
>
>
>
>
>
>
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.
  
package ifneeded oo::dialect 0.3.1 [list source [file join $dir oodialect.tcl]]

Deleted modules/oometa/oometa.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin oometa n 0.7.1]
[keywords TOOL]
[copyright {2015 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Data registry for TclOO frameworks}]
[titledesc {oo::meta A data registry for classess}]
[category TclOO]
[keywords TclOO]
[description]

The [cmd oo::meta] package provides a data registry service for TclOO classes.

[section Usage]

[example {
oo::class create animal {
  meta set biodata animal: 1
}
oo::class create mammal {
  superclass animal
  meta set biodata mammal: 1
}
oo::class create cat {
  superclass mammal
  meta set biodata diet: carnivore
}

cat create felix
puts [felix meta dump biodata]
> animal: 1 mammal: 1 diet: carnivore

felix meta set biodata likes: {birds mice}
puts [felix meta get biodata]
> animal: 1 mammal: 1 diet: carnivore likes: {bird mice}

# Modify a class
mammal meta set biodata metabolism: warm-blooded
puts [felix meta get biodata]
> animal: 1 mammal: 1 metabolism: warm-blooded diet: carnivore likes: {birds mice}

# Overwrite class info
felix meta set biodata mammal: yes
puts [felix meta get biodata]
> animal: 1 mammal: yes metabolism: warm-blooded diet: carnivore likes: {birds mice}
}]
[section Concept]
The concept behind [cmd oo::meta] is that each class contributes a snippet of [emph local] data.
When [cmd oo::meta::metadata] is called, the system walks through the linear ancestry produced by
[cmd oo::meta::ancestors], and recursively combines all of that local data for all of a class'
ancestors into a single dict.

Instances of oo::object can also combine class data with a local dict stored in the [emph meta] variable.

[section COMMANDS]

[list_begin definitions]

[call [cmd oo::meta::info]]

[cmd oo::meta::info] is intended to work on the metadata of a class in a manner similar to if the aggregate
pieces where assembled into a single dict. The system mimics all of the standard dict commands, and addes
the following:

[call [cmd {oo::meta::info branchget}] [opt [arg key]] [opt ...]]

Returns a dict representation of the element at [emph args], but with any trailing : removed from field names.

[example {
::oo::meta::info $myclass set option color {default: green widget: colorselect}
puts [::oo::meta::info $myclass get option color]
> {default: green widget: color}
puts [::oo::meta::info $myclass branchget option color]
> {default green widget color}
}]

[call [cmd {oo::meta::info branchset}] [opt [arg key...]] [arg key] [arg value]]

Merges [emph dict] with any other information contaned at node [opt [arg key...]], and adding a trailing :
to all field names.

[example {
::oo::meta::info $myclass branchset option color {default green widget colorselect}
puts [::oo::meta::info $myclass get option color]
> {default: green widget: color}
}]

[call [cmd {oo::meta::info dump}] [arg class]]

Returns the complete snapshot of a class metadata, as producted by [cmd oo::meta::metadata]

[call [cmd oo::meta::info] [arg class] [cmd is] [arg type] [opt [arg args]]]

Returns a boolean true or false if the element [opt [arg args]] would match [cmd {string is}] [arg type] [arg value]

[example {
::oo::meta::info $myclass set constant mammal 1
puts [::oo::meta::info $myclass is true constant mammal]
> 1
}]

[call [cmd oo::meta::info] [arg class] [cmd merge] [opt [arg dict]] [opt [arg dict]] [opt [arg ...]]]

Combines all of the arguments into a single dict, which is then stored as the new
local representation for this class.

[call [cmd oo::meta::info] [arg class] [cmd rebuild]]

Forces the meta system to destroy any cached representation of a class' metadata before
the next access to [cmd oo::meta::metadata]

[call [cmd oo::meta::metadata] [arg class]]

Returns an aggregate picture of the metadata for [arg class], combining its [emph local] data
with the [emph local] data from its ancestors.

[call [cmd {oo::define meta}]]

The package injects a command [cmd oo::define::meta] which works to provide a class in the
process of definition access to [cmd oo::meta::info], but without having to look the name up.

[example {
oo::define myclass {
  meta set foo bar: baz
}
}]

[call [cmd {oo::class method meta}]]

The package injects a new method [cmd meta] into [cmd oo::class] which works to provide a class
instance access to [cmd oo::meta::info].

[call [cmd {oo::object method meta}]]

The package injects a new method [cmd meta] into [cmd oo::object]. [cmd oo::object] combines the data
for its class (as provided by [cmd oo::meta::metadata]), with a local variable [emph meta] to
produce a local picture of metadata.

This method provides the following additional commands:

[call [cmd {oo::object method meta cget}] [opt [arg field]] [opt [arg ...]] [arg field]]

Attempts to locate a singlar leaf, and return its value. For single option lookups, this
is faster than [cmd {my meta getnull}] [opt [arg field]] [opt [arg ...]] [arg field]], because
it performs a search instead directly instead of producing the recursive merge product
between the class metadata, the local [emph meta] variable, and THEN performing the search.

[list_end]

[vset CATEGORY tcloo]
[include ../common-text/feedback.inc]
[manpage_end]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































Changes to modules/oometa/oometa.md.

Changes to modules/oometa/oometa.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
###
# Author: Sean Woods, yoda@etoyoc.com
##
# TclOO routines to implement property tracking by class and object
###
package require Tcl 8.6 ;# tailcall
package require dicttool
package provide oo::meta 0.7.1

namespace eval ::oo::meta {
  variable dirty_classes {}
  variable core_classes {::oo::class ::oo::object}
}





<







1
2
3
4
5

6
7
8
9
10
11
12
###
# Author: Sean Woods, yoda@etoyoc.com
##
# TclOO routines to implement property tracking by class and object
###

package require dicttool
package provide oo::meta 0.7.1

namespace eval ::oo::meta {
  variable dirty_classes {}
  variable core_classes {::oo::class ::oo::object}
}

Changes to modules/oometa/oometa.test.

1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18
19
20
21
# oometa.test - Copyright (c) 2016 Sean Woods

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.6 ;# tailcall in oo::meta
testsNeedTcltest 2

testsNeed        TclOO

testing {
  useLocal oometa.tcl   oo::meta
  useLocal oooption.tcl oo::option
}

# -------------------------------------------------------------------------
# Test properties

oo::class create foo {








|

>
|


|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# oometa.test - Copyright (c) 2016 Sean Woods

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2

testsNeed TclOO 1

testing {
  useLocal oometa.tcl oo::meta
  useLocal oooption.tcl oo::option
}

# -------------------------------------------------------------------------
# Test properties

oo::class create foo {

Changes to modules/oometa/oooption.tcl.

1
2
3
4
5
6
7
8
9
10
11
###
# Option handling for TclOO
###
package require Tcl 8.6 ;# due oo::meta
package require oo::meta 0.4

proc ::oo::define::option {field argdict} {
  set class [lindex [::info level -1] 1]
  foreach {prop value} $argdict {
    ::oo::meta::info $class set option $field [string trim $prop :]: $value
  }



<







1
2
3

4
5
6
7
8
9
10
###
# Option handling for TclOO
###

package require oo::meta 0.4

proc ::oo::define::option {field argdict} {
  set class [lindex [::info level -1] 1]
  foreach {prop value} $argdict {
    ::oo::meta::info $class set option $field [string trim $prop :]: $value
  }
162
163
164
165
166
167
168
169
      set script [dict getnull $dat $field set-command:]
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
  }
}
package provide oo::option 0.3.1







|
161
162
163
164
165
166
167
168
      set script [dict getnull $dat $field set-command:]
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
  }
}
package provide oo::option 0.3

Changes to modules/oometa/pkgIndex.tcl.

1
2
3
4
5
6
7
8
#checker -scope global exclude warnUndefinedVar
# var in question is 'dir'.
if {![package vsatisfies [package provide Tcl] 8.6]} {
    # PRAGMA: returnok
    return
}
package ifneeded oo::meta   0.7.1 [list source [file join $dir oometa.tcl]]
package ifneeded oo::option 0.3.1 [list source [file join $dir oooption.tcl]]


|



|
|
1
2
3
4
5
6
7
8
#checker -scope global exclude warnUndefinedVar
# var in question is 'dir'.
if {![package vsatisfies [package provide Tcl] 8.5]} {
    # PRAGMA: returnok
    return
}
package ifneeded oo::meta 0.7.1 [list source [file join $dir oometa.tcl]]
package ifneeded oo::option 0.3 [list source [file join $dir oooption.tcl]]

Changes to modules/ooutil/ooutil.man.

157
158
159
160
161
162
163
164
165

[list_end]

[section AUTHORS]
Donal Fellows, Andreas Kupries

[vset CATEGORY oo::util]
[include ../common-text/feedback.inc]
[manpage_end]







|

157
158
159
160
161
162
163
164
165

[list_end]

[section AUTHORS]
Donal Fellows, Andreas Kupries

[vset CATEGORY oo::util]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/otp/otp.man.

87
88
89
90
91
92
93
94
95
        "Secure Hash Standard", National Institute of Standards
        and Technology, U.S. Department Of Commerce, April 1995.
	([uri http://www.itl.nist.gov/fipspubs/fip180-1.htm])

[list_end]

[vset CATEGORY otp]
[include ../common-text/feedback.inc]
[manpage_end]







|

87
88
89
90
91
92
93
94
95
        "Secure Hash Standard", National Institute of Standards
        and Technology, U.S. Department Of Commerce, April 1995.
	([uri http://www.itl.nist.gov/fipspubs/fip180-1.htm])

[list_end]

[vset CATEGORY otp]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/page/page_intro.man.

27
28
29
30
31
32
33
34
35

The packages implementing the plugins are not documented as regular
packages, as they cannot be loaded into a general interpreter, like
tclsh, without extensive preparation of the interpreter. Preparation
which is done for them by the plugin manager.

[vset CATEGORY page]
[include ../common-text/feedback.inc]
[manpage_end]







|

27
28
29
30
31
32
33
34
35

The packages implementing the plugins are not documented as regular
packages, as they cannot be loaded into a general interpreter, like
tclsh, without extensive preparation of the interpreter. Preparation
which is done for them by the plugin manager.

[vset CATEGORY page]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/page/page_pluginmgr.man.

792
793
794
795
796
797
798
799
800
[section FEATURES]

The plugin manager currently checks the plugins for only one feature,
[const timeable]. A plugin supporting this feature is assumed to be
able to collect timing statistics on request.

[vset CATEGORY page]
[include ../common-text/feedback.inc]
[manpage_end]







|

792
793
794
795
796
797
798
799
800
[section FEATURES]

The plugin manager currently checks the plugins for only one feature,
[const timeable]. A plugin supporting this feature is assumed to be
able to collect timing statistics on request.

[vset CATEGORY page]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/page/page_util_flow.man.

88
89
90
91
92
93
94
95
96

This is the variadic arguments form of the method [method visitl], see
above.

[list_end]

[vset CATEGORY page]
[include ../common-text/feedback.inc]
[manpage_end]







|

88
89
90
91
92
93
94
95
96

This is the variadic arguments form of the method [method visitl], see
above.

[list_end]

[vset CATEGORY page]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/page/page_util_norm_lemon.man.

43
44
45
46
47
48
49
50
51
[para]

The exact operations performed are left undocumented for the moment.

[list_end]

[vset CATEGORY page]
[include ../common-text/feedback.inc]
[manpage_end]







|

43
44
45
46
47
48
49
50
51
[para]

The exact operations performed are left undocumented for the moment.

[list_end]

[vset CATEGORY page]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/page/page_util_norm_peg.man.

97
98
99
100
101
102
103
104
105
The order matters, to shed as much nodes as possible early, and
to avoid unnecessary work later.

[list_end]
[list_end]

[vset CATEGORY page]
[include ../common-text/feedback.inc]
[manpage_end]







|

97
98
99
100
101
102
103
104
105
The order matters, to shed as much nodes as possible early, and
to avoid unnecessary work later.

[list_end]
[list_end]

[vset CATEGORY page]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/page/page_util_peg.man.

100
101
102
103
104
105
106
107
108

See the package [package grammar::peg] for the exact syntax of
[arg pe].

[list_end]

[vset CATEGORY page]
[include ../common-text/feedback.inc]
[manpage_end]







|

100
101
102
103
104
105
106
107
108

See the package [package grammar::peg] for the exact syntax of
[arg pe].

[list_end]

[vset CATEGORY page]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/page/page_util_quote.man.

54
55
56
57
58
59
60
61
62
converts it into a string which is accepted by the Tcl parser when
used within a Tcl comment. The string is returned as the result of
this command.

[list_end]

[vset CATEGORY page]
[include ../common-text/feedback.inc]
[manpage_end]







|

54
55
56
57
58
59
60
61
62
converts it into a string which is accepted by the Tcl parser when
used within a Tcl comment. The string is returned as the result of
this command.

[list_end]

[vset CATEGORY page]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Added modules/pki/CA.crt.

















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-----BEGIN CERTIFICATE-----
MIIEBjCCAu6gAwIBAgIJAJsptsQf3TXPMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNV
BAYTAlVTMRAwDgYDVQQIEwdGbG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UE
ChMGVGNsbGliMQwwCgYDVQQLEwNSU0ExDzANBgNVBAMTBlRlc3RDQTAeFw0xMDA4
MDkwNzM3MzhaFw0zNTA4MTAwNzM3MzhaMF8xCzAJBgNVBAYTAlVTMRAwDgYDVQQI
EwdGbG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UEChMGVGNsbGliMQwwCgYD
VQQLEwNSU0ExDzANBgNVBAMTBlRlc3RDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAL9llE7rpNUW+YI8rdQgoG40E/FMMu2h9/6pVzCtILqOLFlSMSIQ
4CxKhIzPuiP+BSufNXmeMXSueifuT2mlb5ap6T2tmd5Vi09um5xw3Spu2Juz7Zfj
LDFnsMxuF3U4Qwl/9qEydmhtDnYATC8iRicXsPGvNVeTZgX3iZzzA3uFkD6NVEki
X1X3MgmE8eCGTw4U/k3MIK7wPQtZMSO4Aey9I/ub5ieZrAK0yZLjiubP27gb8ZIJ
wK2EXI2lZZH6g8JML7RwW5Yr0VoczEf79wKAUi15xQKfh+gxVzTnuKgdJ/ZMyzcW
+Pdap1YlHfewQfxeHBt60Rkr2x2UFU4hLIECAwEAAaOBxDCBwTAdBgNVHQ4EFgQU
hSwdCbdrD6EONdeqS8tIst6yVNUwgZEGA1UdIwSBiTCBhoAUhSwdCbdrD6EONdeq
S8tIst6yVNWhY6RhMF8xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdGbG9yaWRhMQ4w
DAYDVQQHEwVUYW1wYTEPMA0GA1UEChMGVGNsbGliMQwwCgYDVQQLEwNSU0ExDzAN
BgNVBAMTBlRlc3RDQYIJAJsptsQf3TXPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcN
AQEFBQADggEBAL7Uhodh2ATX4IvsGqryZdLVnG9TkMn9o8ge9EUupYtt9/9/K+My
dqXCHVuKwMYr5V5S5HAQxwTTQ4ByPaLYz+V8dumyBOdSp5l5x5NWJ+2oCn/DpL7U
9ezqL9gzEf5AVLxigSo/V5c4uUpE4K3tbGHDVpF1z7OT6LOpkvWui1FpLQoDc9HK
BmT1J+fQSHfsScV65T6qsQAGPUyRXqh79LIrY0ZWvDun5xy13KmCk37Gc2+fCx2m
QEJFyaCMojsCfJz2XRtBtwn8bpBnFUP187f4snkU5Ga/5TjQGq6YBP2BWR8W3tM0
zGk5KboIltjQSbW9KYVratpF+gp3e6ni9B0=
-----END CERTIFICATE-----

Added modules/pki/CA.key.





























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,8C1A2E69ACFC3E90

GVnzdBMa+GX2u4jOpSYU6P1JBQYbB9FRrfB/0QGdhKHU2OPEZzYZo2LwgpEBVMWT
dVsbBECil4h0UnUsC/+DmJPv/SF++VJK8JvtO2opNCmeYrH5VAwqN2tqIXX2sWng
9Fk7HVjsLfTUvw6nc5TI07qK2okGcT9yMTjEGXKPLkMs5K16gKoMHf5yQPQmOpfR
HrE8odoPib1JKDV9j4FYjfBEja7Y4GLFbNobvaQIvA/pbKE4mGkGczn6vjdkGTbv
wAI0fIWqfOnfE+VlSz9lT4mOVHt6x4WQbfUgJKf29pL9DH+I22K2cgzGwMLzLot3
IhPiO6coFfLOKKNbRv4gtxTjXvnlwm217GDoEPgDKG1qwWzjSwI8DBsLjMhKHDfz
0ScyItR3wkTVaTE0sQYFS5VmKzgH2rQ8ichk4AUzM5+myxg1ALKi9GRtIKKbY+0H
EseYxzbRhTSVo0GPGiu8j6BVK40uynF4ydrjlETQsJhZZTeJPjPGNh6m3eP5zW0Q
Im8UgW6ZZumzINJPrEKrwRF7qEGSLRv3lkMOj08sYFsSqFnBex90cov1pJOUCCAL
mBgLFFb6P9kEAqZOnNcwrohcf8gmW1pATTgT1+y0OTC1rEJ+asvCn6yN2QkhyNqq
vabFqxyWxVi9MsodP4+eY9Hjhl5WwkuVCnBG69HugOFvVKHIpGxfQjSnQNaYfI6a
UKLixw0ZdfWN8sNG4gcisj/O/VHKbEWwp+N452lTzzFE7+QvCtg6rn+LPLEyTZRb
b7QQc6CcqELL4qksm/FNP8pIyGfsUKYVE79FDK+mxDxZpWEMJ6J6dwj1jwzGbMnP
5sgmAeaSinkqUQf/4AoiU1eIj1fiXHcsub7mFzzBP9NKQZ4YrkBeu7zfsP8Ex5Ol
W3WmKIkw2MBG9Q0dP3HQBDw5k35X5ydJvrtaRJLDZZDwA24WcyKffYUHGV4KhsxC
Vjzkth+MkBaPAtB35tRlr1Fr0wC6MNTeZOuPNgGM+t1ejg1NPN722J+ihne05KW/
wzBgz3veeJeUlxRPZl0Sklct029fV+pZGwxlx72hMiyBwDh9pBhmIjWJFzuQ35CG
DNZm1spGcDU9sd1y1txS+QVd3CDP7a5CrUuI7S8FYJEREGzWGn/dF9hxrbeLLXRf
qvcUwCAobFfV14Z1cwoxZ9MWTXBYynxUYO7TYajb/6vIvYOAQ3DGSPelvNRsrilT
GV0CJ1Mx6JEaTzGQQeB2JxO09T0qxKMT6h4BbLhZRledmrI/Pvp/roUmnvdE3kBn
MkRUxzGBD9EBPA02F2paDRxXPZRHvpGomvP32JL7AJ8tln8z4TsHclpls0E7dmk9
KKQSLk1DOUjarJhPHmGyDOn9tVdgzbfyQjdmZ1wxBvYbBuqS82FcoWohF2GnyYAm
X7tdS9AVNDErVXOmqh2hcYFY3NFBLy0altpMaTVqTx1SwkpHh6YGt9ioltzP7kxz
wxHz/w4DPrxaUOFYZX9dffGceFf5/h2DfhqobnwZuCgDo7SDUKJI0f88bR+1d1q6
qr2T9ZuzIPIllMzGVfNwq5WsPy+klq/lK0QRl6RZdLEM0Q5h6WOYeoxpOGjW6E1h
-----END RSA PRIVATE KEY-----

Changes to modules/pki/pki.man.

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[list_begin enumerated]
[enum]	"openssl rsautl -decrypt" == "::pki::decrypt -binary -priv"
[enum]	"openssl rsautl -verify"  == "::pki::decrypt -binary -pub"
[list_end]

[call [cmd ::pki::sign] [arg input] [arg key] [opt [arg algo]]]

Digitally sign message [arg input] using the private [arg key].

[para] If [arg algo] is ommited "sha1" is assumed. Possible values for
[arg algo] include "[const md5]", "[const sha1]", "[const sha256]",
and "[const raw]".

[para] Specifying "[const raw]" for [arg algo] will inhibit the
building of an ASN.1 structure to encode which hashing algorithm was
chosen.

[strong Attention]: In this case the corresponding [cmd pkgi::verify]
must be called [const with] algorithm information.

Conversely, specifying a non-"[const raw]" algorithm here means that
the corresponding [cmd pkgi::verify] invokation has to be made
[strong without] algorithm information.

[para] The [arg input] should be the plain text, hashing will be
performed on it.

[para] The [arg key] should include the private key.

[comment {
	What is the default for algo?
          -- sha1
	What choices for algo has the user ?
          -- md5, sha1, sha256, and "raw" currently
}]

[call [cmd ::pki::verify] [arg signedmessage] [arg plaintext] [arg key] [opt [arg algo]]]

Verify a digital signature using a public [arg key].  Returns true or false.

[para][strong Attention]: The algorithm information [arg algo] has to
be specified if and only if the [cmd pki::sign] which generated the
[arg signedmessage] was called with algorithm "[const raw]". This
inhibited the building of the ASN.1 structure encoding the chosen
hashing algorithm. Conversely, if a proper algorithm was specified
during signing then you [strong {must not}] specify an algorithm here.

[comment {
	What is the default for algo?
          -- The default is to look at the data for the OID of the algorithm, but if it was signed "raw" it will need to be specified.  It's actually ignored right now.
	What choices for algo has the user ?
          -- md5, sha1, sha256

    NOTE: Why is the result OK and ?







|
<
|
<
<
|
<
|
|

<
<
<
<
<
<
<
|
<

|












<
<
<
<
<
<
<







98
99
100
101
102
103
104
105

106


107

108
109
110







111

112
113
114
115
116
117
118
119
120
121
122
123
124
125







126
127
128
129
130
131
132
[list_begin enumerated]
[enum]	"openssl rsautl -decrypt" == "::pki::decrypt -binary -priv"
[enum]	"openssl rsautl -verify"  == "::pki::decrypt -binary -pub"
[list_end]

[call [cmd ::pki::sign] [arg input] [arg key] [opt [arg algo]]]

Digitally sign message [arg input] using the private [arg key].  If [arg algo]

is ommited "sha1" is assumed.  Possible values for [arg algo] include


"md5", "sha1", "sha256", and "raw".  Specifyin "raw" for [arg algo] will

inhibit the building of an ASN.1 structure to encode which hashing
algorithm was chosen.








The [arg input] should be the plain text, hashing will be performed on it.


The [arg key] should include the private key.

[comment {
	What is the default for algo?
          -- sha1
	What choices for algo has the user ?
          -- md5, sha1, sha256, and "raw" currently
}]

[call [cmd ::pki::verify] [arg signedmessage] [arg plaintext] [arg key] [opt [arg algo]]]

Verify a digital signature using a public [arg key].  Returns true or false.








[comment {
	What is the default for algo?
          -- The default is to look at the data for the OID of the algorithm, but if it was signed "raw" it will need to be specified.  It's actually ignored right now.
	What choices for algo has the user ?
          -- md5, sha1, sha256

    NOTE: Why is the result OK and ?
313
314
315
316
317
318
319
320
321
[enum]
[list_end]

[section AUTHORS]
Roy Keene

[vset CATEGORY rsa]
[include ../common-text/feedback.inc]
[manpage_end]







|

294
295
296
297
298
299
300
301
302
[enum]
[list_end]

[section AUTHORS]
Roy Keene

[vset CATEGORY rsa]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/pki/pki.tcl.

323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
	}

	switch -- $blocktype {
		"00" {
			# Padding Scheme 1, the first non-zero byte is the start of data
			for {set idx 2} {$idx < $datalen} {incr idx} {
				set char [string index $data $idx]
				if {$char ne "\x00"} {
					set ret [string range $data $idx end]
					break
				}
			}
		}
		"01" {
			# Padding Scheme 2, pad bytes are 0xFF followed by 0x00
			for {set idx 2} {$idx < $datalen} {incr idx} {
				set char [string index $data $idx]
				if {$char ne "\xff"} {
					if {$char eq "\x00"} {
						set ret [string range $data [expr {$idx + 1}] end]

						break
					} else {
						return -code error "Invalid padding, seperator byte is not 0x00"
					}
				}
			}
		}
		"02" {
			# Padding Scheme 3, pad bytes are random, followed by 0x00
			for {set idx 2} {$idx < $datalen} {incr idx} {
				set char [string index $data $idx]
				if {$char eq "\x00"} {
					set ret [string range $data [expr {$idx + 1}] end]

					break
				}
			}
		}
		default {
			return $data
		}
	}

	if {![info exists ret]} {
		return -code error "Invalid padding, no seperator byte found"
	}

	return $ret
}

proc ::pki::rsa::encrypt {mode input keylist {overhead 0}} {
	switch -- $mode {
		"pub" {
			set exponent_ent e
		}
		"priv" {
			set exponent_ent d
		}
	}

	array set key $keylist

	set exponent $key($exponent_ent)
	set mod $key(n)

	## RSA requires that the input be no larger than the key
	set input_len_bits [expr {
		([string length $input] - $overhead) * 8
	}]
	if {$key(l) < $input_len_bits} {
		return -code error "Message length exceeds key length"
	}

	binary scan $input H* input_num

	set input_num "0x${input_num}"







|

<







|
|













|


















|















|
<
<







323
324
325
326
327
328
329
330
331

332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389


390
391
392
393
394
395
396
	}

	switch -- $blocktype {
		"00" {
			# Padding Scheme 1, the first non-zero byte is the start of data
			for {set idx 2} {$idx < $datalen} {incr idx} {
				set char [string index $data $idx]
				if {$char != "\x00"} {
					set ret [string range $data $idx end]

				}
			}
		}
		"01" {
			# Padding Scheme 2, pad bytes are 0xFF followed by 0x00
			for {set idx 2} {$idx < $datalen} {incr idx} {
				set char [string index $data $idx]
				if {$char != "\xff"} {
					if {$char == "\x00"} {
						set ret [string range $data [expr {$idx + 1}] end]

						break
					} else {
						return -code error "Invalid padding, seperator byte is not 0x00"
					}
				}
			}
		}
		"02" {
			# Padding Scheme 3, pad bytes are random, followed by 0x00
			for {set idx 2} {$idx < $datalen} {incr idx} {
				set char [string index $data $idx]
				if {$char == "\x00"} {
					set ret [string range $data [expr {$idx + 1}] end]

					break
				}
			}
		}
		default {
			return $data
		}
	}

	if {![info exists ret]} {
		return -code error "Invalid padding, no seperator byte found"
	}

	return $ret
}

proc ::pki::rsa::encrypt {mode input keylist} {
	switch -- $mode {
		"pub" {
			set exponent_ent e
		}
		"priv" {
			set exponent_ent d
		}
	}

	array set key $keylist

	set exponent $key($exponent_ent)
	set mod $key(n)

	## RSA requires that the input be no larger than the key
	set input_len_bits [expr {[string length $input] * 8}]


	if {$key(l) < $input_len_bits} {
		return -code error "Message length exceeds key length"
	}

	binary scan $input H* input_num

	set input_num "0x${input_num}"
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
	set input [lindex $args 0]
	set keylist [lindex $args 1]
	array set key $keylist

	if {$enablepad} {
		set input [::pki::_pad_pkcs $input $key(l) $padmode]
	}
	set overhead 3

	set encrypt [::pki::_lookup_command encrypt $keylist]

	set retval [$encrypt $mode $input $keylist $overhead]

	switch -- $outmode {
		"hex" {
			binary scan $retval H* retval
		}
	}








<



|







576
577
578
579
580
581
582

583
584
585
586
587
588
589
590
591
592
593
	set input [lindex $args 0]
	set keylist [lindex $args 1]
	array set key $keylist

	if {$enablepad} {
		set input [::pki::_pad_pkcs $input $key(l) $padmode]
	}


	set encrypt [::pki::_lookup_command encrypt $keylist]

	set retval [$encrypt $mode $input $keylist]

	switch -- $outmode {
		"hex" {
			binary scan $retval H* retval
		}
	}

1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
		return true
	}

	if {$n % 2 == 0} {
		return false
	}
	
	# write n - 1 as 2^s·d with d odd by factoring powers of 2 from n \u2212 1
	set d [expr {$n - 1}]
	set s 0
	while {$d % 2 == 0} {
		set d [expr {$d / 2}]
		incr s
	}
	







|







1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
		return true
	}

	if {$n % 2 == 0} {
		return false
	}
	
	# write n - 1 as 2^s·d with d odd by factoring powers of 2 from n \u2212 1
	set d [expr {$n - 1}]
	set s 0
	while {$d % 2 == 0} {
		set d [expr {$d / 2}]
		incr s
	}
	

Changes to modules/pki/pki.test.

1
2
3
4


5
6
7
8
9
10
11
# pki.test - Copyright (c) 2010 Roy Keene, Andreas Kupries
#
# the test-values are taken from:
#    ??



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

|



>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
# rsa.test - Copyright (c) 2010 Roy Keene, Andreas Kupries
#
# the test-values are taken from:
#    ??
#
# $Id$

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104


105
106
107
108
109
110
111
112
113
114
115





116
117
118
119
120
121
122
123
124
125
126

127



128


129
130
131
132
133
134
135
136
137

138



139


140
141
142
143
144
145
146
147
148

149



150


151
152
153
154
155
156
157
158
159

160



161


162
163
164
165
166
167
168
169
170

171



172


173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188


189



190

191
192
193
194
195
196
197
198
199
200
201
202
203
204
205


206



207

208
209
210
211
212
213
214
215
216
217
218
219
220
221

222
223
224
225
226
227
228
testing {
    useLocal pki.tcl pki
}

# -------------------------------------------------------------------------

test rsa-parse-aeskey-1.0 {parse_key} -setup {

    set privkey [asset-get test.key.aes]


    set password "ARoseIsARoseIsARose"
} -body {
    dictsort [::pki::pkcs::parse_key $privkey $password]
} -cleanup {
    unset privkey password
} -result [asset-get result/aes-key]


test rsa-parse-deskey-1.0 {parse_key} -setup {

    set privkey [asset-get test.key.des]


    set password "ARoseIsARoseIsARose"
} -body {
    dictsort [::pki::pkcs::parse_key $privkey $password]
} -cleanup {
    unset privkey password
} -result [asset-get result/des-key]

test rsa-generate-csr-1.0 {csr} -setup {

    set privkey [asset-get test.key.des]


    set password "ARoseIsARoseIsARose"

    set privkey [::pki::pkcs::parse_key $privkey $password]
} -body {
    ::pki::pkcs::create_csr $privkey \
        [list C US ST Florida L Tampa O Tcllib OU RSA CN TestCert] 1
} -cleanup {
    unset privkey password
} -result [asset-get result/des-csr]


















test rsa-parse-certv1-1.0 {parse_cert} -setup {

    set pubkey [asset-get test-v1.crt]

} -body {
    dictsort [::pki::x509::parse_cert $pubkey]
} -cleanup {
    unset pubkey

} -result [asset-get result/cert1]
























test rsa-parse-certv3-1.0 {parse_cert} -setup {



    set pubkey [asset-get test-v3.crt]













} -body {
    dictsort [::pki::x509::parse_cert $pubkey]
} -cleanup {
    unset pubkey
} -result [asset-get result/cert3]




















test rsa-parse-cacert-1.0 {parse_cert} -setup {
    set pubkey [asset-get CA.crt]
} -body {
    dictsort [::pki::x509::parse_cert $pubkey]
} -cleanup {
    unset pubkey
} -result [asset-get result/certCA]

test rsa-generate-cert-1.0 {cert} -setup {

    set privkey [asset-get test.key.des]



    set cacert  [asset-get CA.crt]



    set cakey   [asset-get CA.key]


    set password "ARoseIsARoseIsARose"

    set privkey [::pki::pkcs::parse_key $privkey $password]

    array set ca_arr [::pki::pkcs::parse_key $cakey $password]
    array set ca_arr [::pki::x509::parse_cert $cacert]
    set ca [array get ca_arr]

    set csr [::pki::pkcs::parse_csr \
                 [::pki::pkcs::create_csr $privkey \
                      [list C US ST Florida L Tampa O Tcllib OU RSA CN TestCert]]]
} -body {
    ::pki::x509::create_cert $csr $ca 20100809075203 1281340325 1596959525 0 "" 1
} -cleanup {
    unset privkey cakey cacert ca_arr ca password csr
} -result [asset-get result/cert]



test rsa-generate-cacert-1.0 {cert} -setup {
    set privkey [asset-get test.key.des]
    set cacert  [asset-get CA.crt]
    set cakey   [asset-get CA.key]
    set password "ARoseIsARoseIsARose"

    set privkey [::pki::pkcs::parse_key $privkey $password]

    array set ca_arr [::pki::pkcs::parse_key $cakey $password]
    array set ca_arr [::pki::x509::parse_cert $cacert]
    set ca [array get ca_arr]






    set csr [::pki::pkcs::parse_csr \
                 [::pki::pkcs::create_csr $privkey \
                      [list C US ST Florida L Tampa O Tcllib OU RSA CN TestCert]]]
} -body {
    ::pki::x509::create_cert $csr $ca 20100809075203 1281340325 1596959525 1 "" 1
} -cleanup {
    unset privkey cakey cacert ca_arr ca password csr
} -result [asset-get result/cert-b]

test rsa-verify-certv1-1.0 {verify_cert} -setup {

    set pubcert [asset-get test-v1.crt]



    set cacert [asset-get CA.crt]


    set pubcert [::pki::x509::parse_cert $pubcert]
    set cacert [::pki::x509::parse_cert $cacert]
} -body {
    ::pki::x509::verify_cert $pubcert [list $cacert]
} -cleanup {
    unset pubcert cacert
} -result {true}

test rsa-verify-certv3-1.0 {verify_cert} -setup {

    set pubcert [asset-get test-v3.crt]



    set cacert [asset-get CA.crt]


    set pubcert [::pki::x509::parse_cert $pubcert]
    set cacert [::pki::x509::parse_cert $cacert]
} -body {
    ::pki::x509::verify_cert $pubcert [list $cacert]
} -cleanup {
    unset pubcert cacert
} -result {true}

test rsa-verify-badcertv1-1.0 {verify_cert} -setup {

    set pubcert [asset-get test-v1.crt]



    set cacert [asset-get test-v1.crt]


    set pubcert [::pki::x509::parse_cert $pubcert]
    set cacert [::pki::x509::parse_cert $cacert]
} -body {
    ::pki::x509::verify_cert $pubcert [list $cacert]
} -cleanup {
    unset pubcert cacert
} -result {false}

test rsa-verify-badcertv3-1.0 {verify_cert} -setup {

    set pubcert [asset-get test-v3.crt]



    set cacert [asset-get test-v3.crt]


    set pubcert [::pki::x509::parse_cert $pubcert]
    set cacert [::pki::x509::parse_cert $cacert]
} -body {
    ::pki::x509::verify_cert $pubcert [list $cacert]
} -cleanup {
    unset pubcert cacert
} -result {false}

test rsa-verify-badcertv3-2.0 {verify_cert} -setup {

    set pubcert [asset-get test-v3.crt]



    set cacert [asset-get CA.crt]


    set pubcert [::pki::x509::parse_cert $pubcert]
    set cacert [::pki::x509::parse_cert $cacert]

    # Remove all extensions from CA cert
    array set cacert_arr $cacert
    set cacert_arr(extensions) ""
    set cacert [array get cacert_arr]
} -body {
    ::pki::x509::verify_cert $pubcert [list $cacert]
} -cleanup {
    unset pubcert cacert
} -result {false}

test rsa-crypt-roundtrip-1.0 {encrypt, decrypt} -setup {
    set data      "This is a test"
    set password  "ARoseIsARoseIsARose"


    set privkey [asset-get test.key.des]



    set pubkey [asset-get test-v1.crt]


    array set key [::pki::pkcs::parse_key $privkey $password]
    array set key [::pki::x509::parse_cert $pubkey]
    set keylist   [array get key]
    unset password privkey pubkey key
} -body {
    set ciphertext [::pki::encrypt -binary -pub  -- $data       $keylist]
    set plaintext  [::pki::decrypt -binary -priv -- $ciphertext $keylist]
} -cleanup {
    unset -nocomplain data ciphertext plaintext
} -result {This is a test}

test rsa-sign-verify-1.0 {sign, verify} -setup {
    set data      "This is a test"
    set password  "ARoseIsARoseIsARose"


    set privkey [asset-get test.key.des]



    set pubkey [asset-get test-v1.crt]


    array set key [::pki::pkcs::parse_key $privkey $password]
    array set key [::pki::x509::parse_cert $pubkey]
    set keylist   [array get key]
    unset password privkey pubkey key
} -body {
    set ciphertext [::pki::encrypt -binary -priv -- $data       $keylist]
    set plaintext  [::pki::decrypt -binary -pub  -- $ciphertext $keylist]
} -cleanup {
    unset -nocomplain data ciphertext plaintext
} -result {This is a test}


foreach keylen {256 512 1024 2048} {

    # Just one key for the whole round and its tests. Its possible to
    # generate one for each test, but then we will really spend way to
    # much effort on the setup of each test.
    set key [::pki::rsa::generate $keylen]

    test rsa-crypt-roundtrip-2.0.$keylen "encrypt, decrypt pub/priv for keylen $keylen" -body {
        set plain    "Pub/priv test"







>
|
>
>





<
>


>
|
>
>





|


>
|
>
>

>


<
|


|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>

>
|
>




>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
>
>
>
|
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>

|

|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
<
<
<
<
<
<
<

|
>
|
>
>
>
|
>
>
>
|
>
>








<
<
|

|


|
|
>
>
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
|
<
<
<
<
<
<
<
<


>
|
>
>
>
|
>
>









>
|
>
>
>
|
>
>









>
|
>
>
>
|
>
>









>
|
>
>
>
|
>
>









>
|
>
>
>
|
>
>
















>
>
|
>
>
>
|
>















>
>
|
>
>
>
|
>














>







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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186


187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212








213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
testing {
    useLocal pki.tcl pki
}

# -------------------------------------------------------------------------

test rsa-parse-aeskey-1.0 {parse_key} -setup {
    set fd [open [file join $::tcltest::testsDirectory test.key.aes] r]
    set privkey [read $fd]
    close $fd ; unset fd

    set password "ARoseIsARoseIsARose"
} -body {
    dictsort [::pki::pkcs::parse_key $privkey $password]
} -cleanup {
    unset privkey password

} -result {d 4821708078078814272825737770757352316921506482526873519719051463644222257651923197825994018656421190278177720014932984365118366602027256382375921341192781177112398174373076887129954817822368157304055327895506098881228521168940083073283595671416028753301552269895847121119899618677892849270785450525228277087545852904246091363590456069440574806479467479724488815982259021323617233373449030738298588184972148901173121148634892058648703349014218791530847767762515588159636682267580355756974401553230588009724381821442787415368995149629493809933380894522643851913309510865914033228986295772184835354265231482340110365953 e 65537 l 2048 n 20606474229739240365059039861892702888430699076971875439310562489263214483191006887246310401088091004060054335612563612411917991000786455919906798626524375611634511845705141177165689526939976649836053082770641226108840795034158866930145876068965913035873741839723777813944236146677082729876717709231945588228947001753667862858297850461440476551869914895980840772354759428144421149613554402682425181850295101375623815063198594704730226304723548382258248785251384891817576645955371924194287071569929361029204431671633821160423187871463713776212876252047207985933876036458343140423787003660018607222053134170461225878347 p 151903506703070744388477144011062627922344490485619606525415439019240332914406492743669447033002173681213181316912563402042948038453846038272948559137687751740338183189809253891948725876860938554446847405802064303332011747457634488959045893106143553864597546566768167692662722957924358908573096347694362541259 q 135655026516400219835182288872064651548166413404981613626584975073279765274581289299963783472100901444904090497633607380440126562041149560121122191822729803838692049608052805597752016733559257401832457990520641184379220785155858496800358974243933025297673311305372951490297748845447521569920828454777048335233 type rsa}

test rsa-parse-deskey-1.0 {parse_key} -setup {
    set fd [open [file join $::tcltest::testsDirectory test.key.des] r]
    set privkey [read $fd]
    close $fd ; unset fd

    set password "ARoseIsARoseIsARose"
} -body {
    dictsort [::pki::pkcs::parse_key $privkey $password]
} -cleanup {
    unset privkey password
} -result {d 4821708078078814272825737770757352316921506482526873519719051463644222257651923197825994018656421190278177720014932984365118366602027256382375921341192781177112398174373076887129954817822368157304055327895506098881228521168940083073283595671416028753301552269895847121119899618677892849270785450525228277087545852904246091363590456069440574806479467479724488815982259021323617233373449030738298588184972148901173121148634892058648703349014218791530847767762515588159636682267580355756974401553230588009724381821442787415368995149629493809933380894522643851913309510865914033228986295772184835354265231482340110365953 e 65537 l 2048 n 20606474229739240365059039861892702888430699076971875439310562489263214483191006887246310401088091004060054335612563612411917991000786455919906798626524375611634511845705141177165689526939976649836053082770641226108840795034158866930145876068965913035873741839723777813944236146677082729876717709231945588228947001753667862858297850461440476551869914895980840772354759428144421149613554402682425181850295101375623815063198594704730226304723548382258248785251384891817576645955371924194287071569929361029204431671633821160423187871463713776212876252047207985933876036458343140423787003660018607222053134170461225878347 p 151903506703070744388477144011062627922344490485619606525415439019240332914406492743669447033002173681213181316912563402042948038453846038272948559137687751740338183189809253891948725876860938554446847405802064303332011747457634488959045893106143553864597546566768167692662722957924358908573096347694362541259 q 135655026516400219835182288872064651548166413404981613626584975073279765274581289299963783472100901444904090497633607380440126562041149560121122191822729803838692049608052805597752016733559257401832457990520641184379220785155858496800358974243933025297673311305372951490297748845447521569920828454777048335233 type rsa}

test rsa-generate-csr-1.0 {csr} -setup {
    set fd [open [file join $::tcltest::testsDirectory test.key.des] r]
    set privkey [read $fd]
    close $fd ; unset fd

    set password "ARoseIsARoseIsARose"

    set privkey [::pki::pkcs::parse_key $privkey $password]
} -body {

    ::pki::pkcs::create_csr $privkey [list C US ST Florida L Tampa O Tcllib OU RSA CN TestCert] 1
} -cleanup {
    unset privkey password
} -result {-----BEGIN CERTIFICATE REQUEST-----
MIICpjCCAY4CAQAwYTELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0Zsb3JpZGExDjAM
BgNVBAcTBVRhbXBhMQ8wDQYDVQQKEwZUY2xsaWIxDDAKBgNVBAsTA1JTQTERMA8G
A1UEAxMIVGVzdENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCj
PBaKPeHx1oQb0nfMPeglBgyIpsv8CuIH7CAT8SGxoK1zIBQUhnNOZvel1/Kore68
mY0ftiqmVbLO7aZy9X0Vy97hcEnhIekuPCauVg3kWjOspPbxmd3Bf7vfw7RGsvUt
GGc3FZnU/X3GhzlKCq1osQCSZdLwirDm8ny4tbkTEDnGIB+4IJbSvifGQDqQNwtx
cDigwRwAgDDdaKYBiW4bp+ZowJxorqc60w6xcl8DKhpPPaqRFN2kBcAxU/vztan1
5NjNmmOPIkDcvIDEEkxKDoefTWaaF/MEGNtZZgIfIbVMos9+1soBzBb2ZH5NVtuK
3RGA+4DxUk5kiI+eLANLAgMBAAGgADANBgkqhkiG9w0BAQUFAAOCAQEAff0WNTPX
M6rdFGOXBxTsC7NUGcoquuM6QsceadMbBVRtRUUbaUsusXdxDWhdylqHM3xPNx0L
4Ex0FeL9icD/8xvJmCXzBeNt3uvThTvIwHYqnOCSlhx9InUUx2l6U0rAwZ+CIuMi
7lG2+Z5qVD035bAZ7LT/4s4fjKSL4cTZQOdCcoFtoptj9+L8EItwwYDzffJWdG8s
OUtMBn+Zh45k2UtLKu38jBNtVpNFAEJLlr/Arj6Jj3yTmEFrocxkwK6IPbOHQTu3
tyJ5CkDpUqkxYZ0D4wfr8tFEru0jQNl5bSDt9QQvg1Kj6+OC9aaRvxwnmc6REfky
8sCv80Pn5dNCGg==
-----END CERTIFICATE REQUEST-----
}

test rsa-parse-certv1-1.0 {parse_cert} -setup {
    set fd [open [file join $::tcltest::testsDirectory test-v1.crt] r]
    set pubkey [read $fd]
    close $fd ; unset fd
} -body {
    dictsort [::pki::x509::parse_cert $pubkey]
} -cleanup {
    unset pubkey
} -result {cert 30820221020612481595aa03300d06092a864886f70d0101050500305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d06035504031306546573744341301e170d3130303830393037353230355a170d3230303830393037353230355a3061310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b13035253413111300f06035504031308546573744365727430820122300d06092a864886f70d01010105000382010f003082010a0282010100a33c168a3de1f1d6841bd277cc3de825060c88a6cbfc0ae207ec2013f121b1a0ad7320141486734e66f7a5d7f2a8adeebc998d1fb62aa655b2ceeda672f57d15cbdee17049e121e92e3c26ae560de45a33aca4f6f199ddc17fbbdfc3b446b2f52d1867371599d4fd7dc687394a0aad68b1009265d2f08ab0e6f27cb8b5b9131039c6201fb82096d2be27c6403a90370b717038a0c11c008030dd68a601896e1ba7e668c09c68aea73ad30eb1725f032a1a4f3daa9114dda405c03153fbf3b5a9f5e4d8cd9a638f2240dcbc80c4124c4a0e879f4d669a17f30418db5966021f21b54ca2cf7ed6ca01cc16f6647e4d56db8add1180fb80f1524e64888f9e2c034b0203010001 data_signature_algo sha1WithRSAEncryption e 65537 extensions {} issuer {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCA} l 2048 n 20606474229739240365059039861892702888430699076971875439310562489263214483191006887246310401088091004060054335612563612411917991000786455919906798626524375611634511845705141177165689526939976649836053082770641226108840795034158866930145876068965913035873741839723777813944236146677082729876717709231945588228947001753667862858297850461440476551869914895980840772354759428144421149613554402682425181850295101375623815063198594704730226304723548382258248785251384891817576645955371924194287071569929361029204431671633821160423187871463713776212876252047207985933876036458343140423787003660018607222053134170461225878347 notAfter 1596959525 notBefore 1281340325 pubkey 3082010a0282010100a33c168a3de1f1d6841bd277cc3de825060c88a6cbfc0ae207ec2013f121b1a0ad7320141486734e66f7a5d7f2a8adeebc998d1fb62aa655b2ceeda672f57d15cbdee17049e121e92e3c26ae560de45a33aca4f6f199ddc17fbbdfc3b446b2f52d1867371599d4fd7dc687394a0aad68b1009265d2f08ab0e6f27cb8b5b9131039c6201fb82096d2be27c6403a90370b717038a0c11c008030dd68a601896e1ba7e668c09c68aea73ad30eb1725f032a1a4f3daa9114dda405c03153fbf3b5a9f5e4d8cd9a638f2240dcbc80c4124c4a0e879f4d669a17f30418db5966021f21b54ca2cf7ed6ca01cc16f6647e4d56db8add1180fb80f1524e64888f9e2c034b0203010001 pubkey_algo rsaEncryption raw 2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949444f5443434169454342684a49465a5771417a414e42676b71686b69473977304241515546414442664d517377435159445651514745774a56557a45510a4d4134474131554543424d48526d7876636d6c6b5954454f4d4177474131554542784d465647467463474578447a414e42674e5642416f54426c526a624778700a596a454d4d416f474131554543784d44556c4e424d513877445159445651514445775a555a584e30513045774868634e4d5441774f4441354d4463314d6a41310a5768634e4d6a41774f4441354d4463314d6a4131576a42684d517377435159445651514745774a56557a45514d4134474131554543424d48526d7876636d6c6b0a5954454f4d4177474131554542784d465647467463474578447a414e42674e5642416f54426c526a62477870596a454d4d416f474131554543784d44556c4e420a4d5245774477594456515144457768555a584e305132567964444343415349774451594a4b6f5a496876634e4151454242514144676745504144434341516f430a67674542414b4d38466f6f39346648576842765364387739364355474449696d792f774b34676673494250784962476772584d67464253476330356d393658580a387169743772795a6a522b324b715a5673733774706e4c316652584c3375467753654568365334384a713557446552614d36796b3976475a3363462f75392f440a74456179395330595a7a63566d645439666361484f556f4b72576978414a4a6c3076434b734f6279664c693175524d514f635967483767676c744b2b4a385a410a4f704133433346774f4b4442484143414d4e316f7067474a6268756e356d6a416e476975707a72544472467958774d71476b38397170455533615146774446540a2b2f4f317166586b324d326159343869514e7938674d515354456f4f6835394e5a706f583877515932316c6d41683868745579697a3337577967484d46765a6b0a666b3157323472644559443767504653546d53496a35347341307343417745414154414e42676b71686b6947397730424151554641414f4341514541657376510a705966785a6a364b49625a666b57487768444830564e693569505576614e6256765a725a5a315231675a416b38527963514e38676e3742614b582f3663696b730a67654b6276477779354a765a614b53656436353734515654562b6d47417141784f572b4c6d5552562b54616f57534b4143393344656264734c324e6c504473720a7575784d676237666e35326e69327141736c506f2b597a65636f6b49574465794b7652554344374774334c44644c5150472f6a547836586e65626237757369460a706671515768465564636650696b30593372664a47356256354875684b52394c7877493348787274344c6c535a49706f6c4d586b776b6c71656f4930654970790a6b4e4a57356332706d336376512f415a33624858574e4271483941345a66334f64697a794b4644356c71714d334832455152586a3063557a516f3257716635330a533657364234463242325a4c612f4f2f45673d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a serial_number 20100809075203 signature 7acbd0a587f1663e8a21b65f9161f08431f454d8b988f52f68d6d5bd9ad9675475819024f11c9c40df209fb05a297ffa72292c81e29bbc6c32e49bd968a49e77ae7be1055357e98602a031396f8b994455f936a85922800bddc379b76c2f63653c3b2bbaec4c81bedf9f9da78b6a80b253e8f98cde7289085837b22af454083ec6b772c374b40f1bf8d3c7a5e779b6fbbac885a5fa905a115475c7cf8a4d18deb7c91b96d5e47ba1291f4bc702371f1aede0b952648a6894c5e4c2496a7a8234788a7290d256e5cda99b772f43f019ddb1d758d06a1fd03865fdce762cf22850f996aa8cdc7d844115e3d1c533428d96a9fe774ba5ba07817607664b6bf3bf12 signature_algo sha1WithRSAEncryption subject {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCert} type rsa version 1}

test rsa-parse-certv3-1.0 {parse_cert} -setup {
    set fd [open [file join $::tcltest::testsDirectory test-v3.crt] r]
    set pubkey [read $fd]
    close $fd ; unset fd
} -body {
    dictsort [::pki::x509::parse_cert $pubkey]
} -cleanup {
    unset pubkey
} -result {cert 30820226a003020102020612481595a9c0300d06092a864886f70d0101050500305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d06035504031306546573744341301e170d3130303830393037353133365a170d3230303830393037353133365a3061310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b13035253413111300f06035504031308546573744365727430820122300d06092a864886f70d01010105000382010f003082010a0282010100a33c168a3de1f1d6841bd277cc3de825060c88a6cbfc0ae207ec2013f121b1a0ad7320141486734e66f7a5d7f2a8adeebc998d1fb62aa655b2ceeda672f57d15cbdee17049e121e92e3c26ae560de45a33aca4f6f199ddc17fbbdfc3b446b2f52d1867371599d4fd7dc687394a0aad68b1009265d2f08ab0e6f27cb8b5b9131039c6201fb82096d2be27c6403a90370b717038a0c11c008030dd68a601896e1ba7e668c09c68aea73ad30eb1725f032a1a4f3daa9114dda405c03153fbf3b5a9f5e4d8cd9a638f2240dcbc80c4124c4a0e879f4d669a17f30418db5966021f21b54ca2cf7ed6ca01cc16f6647e4d56db8add1180fb80f1524e64888f9e2c034b0203010001 data_signature_algo sha1WithRSAEncryption e 65537 extensions {} issuer {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCA} l 2048 n 20606474229739240365059039861892702888430699076971875439310562489263214483191006887246310401088091004060054335612563612411917991000786455919906798626524375611634511845705141177165689526939976649836053082770641226108840795034158866930145876068965913035873741839723777813944236146677082729876717709231945588228947001753667862858297850461440476551869914895980840772354759428144421149613554402682425181850295101375623815063198594704730226304723548382258248785251384891817576645955371924194287071569929361029204431671633821160423187871463713776212876252047207985933876036458343140423787003660018607222053134170461225878347 notAfter 1596959496 notBefore 1281340296 pubkey 3082010a0282010100a33c168a3de1f1d6841bd277cc3de825060c88a6cbfc0ae207ec2013f121b1a0ad7320141486734e66f7a5d7f2a8adeebc998d1fb62aa655b2ceeda672f57d15cbdee17049e121e92e3c26ae560de45a33aca4f6f199ddc17fbbdfc3b446b2f52d1867371599d4fd7dc687394a0aad68b1009265d2f08ab0e6f27cb8b5b9131039c6201fb82096d2be27c6403a90370b717038a0c11c008030dd68a601896e1ba7e668c09c68aea73ad30eb1725f032a1a4f3daa9114dda405c03153fbf3b5a9f5e4d8cd9a638f2240dcbc80c4124c4a0e879f4d669a17f30418db5966021f21b54ca2cf7ed6ca01cc16f6647e4d56db8add1180fb80f1524e64888f9e2c034b0203010001 pubkey_algo rsaEncryption raw 2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d494944506a4343416961674177494241674947456b67566c616e414d413047435371475349623344514542425155414d463878437a414a42674e56424159540a416c56544d52417744675944565151494577644762473979615752684d51347744415944565151484577565559573177595445504d4130474131554543684d470a56474e7362476c694d517777436759445651514c45774e5355304578447a414e42674e5642414d54426c526c6333524451544165467730784d4441344d446b770a4e7a55784d7a5a61467730794d4441344d446b774e7a55784d7a5a614d474578437a414a42674e5642415954416c56544d5241774467594456515149457764470a62473979615752684d51347744415944565151484577565559573177595445504d4130474131554543684d4756474e7362476c694d517777436759445651514c0a45774e53553045784554415042674e5642414d544346526c633352445a584a304d494942496a414e42676b71686b6947397730424151454641414f43415138410a4d49494243674b43415145416f7a7757696a33683864614547394a337a44336f4a51594d694b624c2f417269422b7767452f4568736143746379415546495a7a0a546d623370646679714b3375764a6d4e48375971706c57797a75326d63765639466376653458424a345348704c6a776d726c594e35466f7a724b5432385a6e640a77582b3733384f3052724c314c52686e4e78575a31503139786f633553677174614c45416b6d58533849717735764a38754c57354578413578694166754343570a3072346e786b41366b44634c635841346f4d4563414941773357696d41596c754736666d614d4363614b366e4f744d4f73584a6641796f61547a32716b5254640a704158414d56503738375770396554597a5a706a6a794a41334c794178424a4d536736486e30316d6d68667a42426a625757594348794731544b4c506674624b0a41637757396d522b54566262697430526750754138564a4f5a4969506e69774453774944415141424d41304743537147534962334451454242515541413449420a41514177454673454441306d70346d516d4f596263345248515645474e3732334374676345484637756e75343345654f35732f31597130462b5364575231344c0a714673366c52586e506a6b457049466c6d573549304470385131795931387152507438487836796d7874793851576d396c54774d427a7259556839344a71562b0a593351484a625672674c706f4b527073564f7073644d3571513465667651774f30734f77493541616a766b795531644338547378417a794a4d51664b2b5751730a41306c5370714d304874726c31785268445a774543384245332b374976394d53572f52764b364661614f466b796a766657664f4c67526652744d51382b6864560a385261534571716b5373676c477a6d7a53627554486f70426b6c65314b6567713248642f316c706939466f58487247786a7747575677354b4f77574f4361304f0a7946344b5757696a4d4f57624d7249714c71357034614f6b0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a serial_number 20100809075136 signature 30105b040c0d26a7899098e61b73844741510637bdb70ad81c10717bba7bb8dc478ee6cff562ad05f92756475e0ba85b3a9515e73e3904a48165996e48d03a7c435c98d7ca913edf07c7aca6c6dcbc4169bd953c0c073ad8521f7826a57e63740725b56b80ba68291a6c54ea6c74ce6a43879fbd0c0ed2c3b023901a8ef932535742f13b31033c893107caf9642c034952a6a3341edae5d714610d9c040bc044dfeec8bfd3125bf46f2ba15a68e164ca3bdf59f38b8117d1b4c43cfa1755f1169212aaa44ac8251b39b349bb931e8a419257b529e82ad8777fd65a62f45a171eb1b18f0196570e4a3b058e09ad0ec85e0a5968a330e59b32b22a2eae69e1a3a4 signature_algo sha1WithRSAEncryption subject {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCert} type rsa version 3}

test rsa-parse-cacert-1.0 {parse_cert} -setup {
    set fd [open [file join $::tcltest::testsDirectory CA.crt] r]
    set pubkey [read $fd]
    close $fd ; unset fd
} -body {
    dictsort [::pki::x509::parse_cert $pubkey]
} -cleanup {
    unset pubkey
} -result {cert 308202eea0030201020209009b29b6c41fdd35cf300d06092a864886f70d0101050500305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d06035504031306546573744341301e170d3130303830393037333733385a170d3335303831303037333733385a305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d0603550403130654657374434130820122300d06092a864886f70d01010105000382010f003082010a0282010100bf65944eeba4d516f9823cadd420a06e3413f14c32eda1f7fea95730ad20ba8e2c5952312210e02c4a848ccfba23fe052b9f35799e3174ae7a27ee4f69a56f96a9e93dad99de558b4f6e9b9c70dd2a6ed89bb3ed97e32c3167b0cc6e17753843097ff6a13276686d0e76004c2f22462717b0f1af3557936605f7899cf3037b85903e8d5449225f55f7320984f1e0864f0e14fe4dcc20aef03d0b593123b801ecbd23fb9be62799ac02b4c992e38ae6cfdbb81bf19209c0ad845c8da56591fa83c24c2fb4705b962bd15a1ccc47fbf70280522d79c5029f87e8315734e7b8a81d27f64ccb3716f8f75aa756251df7b041fc5e1c1b7ad1192bdb1d94154e212c810203010001a381c43081c1301d0603551d0e04160414852c1d09b76b0fa10e35d7aa4bcb48b2deb254d53081910603551d230481893081868014852c1d09b76b0fa10e35d7aa4bcb48b2deb254d5a163a461305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d060355040313065465737443418209009b29b6c41fdd35cf300c0603551d13040530030101ff data_signature_algo sha1WithRSAEncryption e 65537 extensions {id-ce-subjectKeyIdentifier {false 0414852c1d09b76b0fa10e35d7aa4bcb48b2deb254d5} id-ce-authorityKeyIdentifier {false 3081868014852c1d09b76b0fa10e35d7aa4bcb48b2deb254d5a163a461305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d060355040313065465737443418209009b29b6c41fdd35cf} id-ce-basicConstraints {false 1 -1}} issuer {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCA} l 2048 n 24161606882664512184359265185750837725108535101957340182512690512950889280510175836653980019439405807509520118166835198926328713901946216313990307823213762851130122553610411084164096778558222486569750697608231998818342043083553499928765840766586577148563804434733745484416582976688503343857730022194918419820043366167270205314454789050632414594372175021330643138454461788318306110532766986666994575469007919602783172146356611527403971910037954057021421611608595373199910520988014831498419657809400692831589285260267441816651113464389720766612297754777522129247659432535168409289483999817599902067306541004223550663809 notAfter 2070344258 notBefore 1281339458 pubkey 3082010a0282010100bf65944eeba4d516f9823cadd420a06e3413f14c32eda1f7fea95730ad20ba8e2c5952312210e02c4a848ccfba23fe052b9f35799e3174ae7a27ee4f69a56f96a9e93dad99de558b4f6e9b9c70dd2a6ed89bb3ed97e32c3167b0cc6e17753843097ff6a13276686d0e76004c2f22462717b0f1af3557936605f7899cf3037b85903e8d5449225f55f7320984f1e0864f0e14fe4dcc20aef03d0b593123b801ecbd23fb9be62799ac02b4c992e38ae6cfdbb81bf19209c0ad845c8da56591fa83c24c2fb4705b962bd15a1ccc47fbf70280522d79c5029f87e8315734e7b8a81d27f64ccb3716f8f75aa756251df7b041fc5e1c1b7ad1192bdb1d94154e212c810203010001 pubkey_algo rsaEncryption raw 2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d494945426a434341753667417749424167494a414a737074735166335458504d413047435371475349623344514542425155414d463878437a414a42674e560a42415954416c56544d52417744675944565151494577644762473979615752684d51347744415944565151484577565559573177595445504d413047413155450a43684d4756474e7362476c694d517777436759445651514c45774e5355304578447a414e42674e5642414d54426c526c6333524451544165467730784d4441340a4d446b774e7a4d334d7a68614677307a4e5441344d5441774e7a4d334d7a68614d463878437a414a42674e5642415954416c56544d52417744675944565151490a4577644762473979615752684d51347744415944565151484577565559573177595445504d4130474131554543684d4756474e7362476c694d517777436759440a5651514c45774e5355304578447a414e42674e5642414d54426c526c6333524451544343415349774451594a4b6f5a496876634e4151454242514144676745500a4144434341516f4367674542414c396c6c453772704e55572b594938726451676f473430452f464d4d753268392f3670567a4374494c714f4c466c534d5349510a3443784b68497a507569502b425375664e586d654d5853756569667554326d6c62356170365432746d643556693039756d35787733537075324a757a375a666a0a4c44466e734d78754633553451776c2f39714579646d6874446e59415443386952696358735047764e5665545a675833695a7a7a413375466b44364e56456b690a583158334d676d4538654347547734552f6b334d494b37775051745a4d534f3441657939492f75623569655a72414b30795a4c6a6975625032376762385a494a0a774b32455849326c5a5a483667384a4d4c3752775735597230566f637a45663739774b415569313578514b66682b6778567a546e754b67644a2f5a4d797a63570a2b5064617031596c48666577516678654842743630526b7232783255465534684c4945434177454141614f42784443427754416442674e5648513445466751550a68537764436264724436454f4e6465715338744973743679564e5577675a4547413155644977534269544342686f415568537764436264724436454f4e6465710a5338744973743679564e5768593652684d463878437a414a42674e5642415954416c56544d52417744675944565151494577644762473979615752684d5134770a44415944565151484577565559573177595445504d4130474131554543684d4756474e7362476c694d517777436759445651514c45774e5355304578447a414e0a42674e5642414d54426c526c633352445159494a414a737074735166335458504d41774741315564457751464d414d42416638774451594a4b6f5a496876634e0a415145464251414467674542414c3755686f64683241545834497673477172795a644c566e4739546b4d6e396f3867653945557570597474392f392f4b2b4d790a647158434856754b774d59723556355335484151787754545134427950614c597a2b563864756d79424f645370356c3578354e574a2b326f436e2f44704c37550a39657a714c39677a45663541564c786967536f2f5635633475557045344b337462474844567046317a374f54364c4f706b765775693146704c516f446339484b0a426d54314a2b6651534866735363563635543671735141475055795258716837394c497259305a577644756e35787931334b6d436b33374763322b664378326d0a51454a467961434d6f6a7343664a7a325852744274776e386270426e4655503138376634736e6b553547612f35546a5147713659425032425752385733744d300a7a476b354b626f496c746a51536257394b595672617470462b67703365366e693942303d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a serial_number 11180668503388403151 signature bed4868761d804d7e08bec1aaaf265d2d59c6f5390c9fda3c81ef4452ea58b6df7ff7f2be33276a5c21d5b8ac0c62be55e52e47010c704d34380723da2d8cfe57c76e9b204e752a79979c7935627eda80a7fc3a4bed4f5ecea2fd83311fe4054bc62812a3f579738b94a44e0aded6c61c3569175cfb393e8b3a992f5ae8b51692d0a0373d1ca0664f527e7d04877ec49c57ae53eaab100063d4c915ea87bf4b22b634656bc3ba7e71cb5dca982937ec6736f9f0b1da6404245c9a08ca23b027c9cf65d1b41b709fc6e90671543f5f3b7f8b27914e466bfe538d01aae9804fd81591f16ded334cc693929ba0896d8d049b5bd29856b6ada45fa0a777ba9e2f41d signature_algo sha1WithRSAEncryption subject {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCA} type rsa version 3}

test rsa-generate-cert-1.0 {cert} -setup {
    set fd [open [file join $::tcltest::testsDirectory test.key.des] r]
    set privkey [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory CA.crt] r]
    set cacert [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory CA.key] r]
    set cakey [read $fd]
    close $fd ; unset fd

    set password "ARoseIsARoseIsARose"

    set privkey [::pki::pkcs::parse_key $privkey $password]

    array set ca_arr [::pki::pkcs::parse_key $cakey $password]
    array set ca_arr [::pki::x509::parse_cert $cacert]
    set ca [array get ca_arr]

    set csr [::pki::pkcs::parse_csr [::pki::pkcs::create_csr $privkey [list C US ST Florida L Tampa O Tcllib OU RSA CN TestCert]]]
} -body {
    ::pki::x509::create_cert $csr $ca 20100809075203 1281340325 1596959525 0 "" 1
} -cleanup {
    unset privkey cakey cacert ca_arr ca password csr
} -result {-----BEGIN CERTIFICATE-----
MIIDOTCCAiECBhJIFZWqAzANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJVUzEQ
MA4GA1UECBMHRmxvcmlkYTEOMAwGA1UEBxMFVGFtcGExDzANBgNVBAoTBlRjbGxp
YjEMMAoGA1UECxMDUlNBMQ8wDQYDVQQDEwZUZXN0Q0EwHhcNMTAwODA5MDc1MjA1
WhcNMjAwODA5MDc1MjA1WjBhMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHRmxvcmlk
YTEOMAwGA1UEBxMFVGFtcGExDzANBgNVBAoTBlRjbGxpYjEMMAoGA1UECxMDUlNB
MREwDwYDVQQDEwhUZXN0Q2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAKM8Foo94fHWhBvSd8w96CUGDIimy/wK4gfsIBPxIbGgrXMgFBSGc05m96XX
8qit7ryZjR+2KqZVss7tpnL1fRXL3uFwSeEh6S48Jq5WDeRaM6yk9vGZ3cF/u9/D
tEay9S0YZzcVmdT9fcaHOUoKrWixAJJl0vCKsObyfLi1uRMQOcYgH7ggltK+J8ZA
OpA3C3FwOKDBHACAMN1opgGJbhun5mjAnGiupzrTDrFyXwMqGk89qpEU3aQFwDFT
+/O1qfXk2M2aY48iQNy8gMQSTEoOh59NZpoX8wQY21lmAh8htUyiz37WygHMFvZk
fk1W24rdEYD7gPFSTmSIj54sA0sCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAesvQ
pYfxZj6KIbZfkWHwhDH0VNi5iPUvaNbVvZrZZ1R1gZAk8RycQN8gn7BaKX/6ciks
geKbvGwy5JvZaKSed6574QVTV+mGAqAxOW+LmURV+TaoWSKAC93DebdsL2NlPDsr
uuxMgb7fn52ni2qAslPo+YzecokIWDeyKvRUCD7Gt3LDdLQPG/jTx6Xnebb7usiF
pfqQWhFUdcfPik0Y3rfJG5bV5HuhKR9LxwI3Hxrt4LlSZIpolMXkwklqeoI0eIpy
kNJW5c2pm3cvQ/AZ3bHXWNBqH9A4Zf3OdizyKFD5lqqM3H2EQRXj0cUzQo2Wqf53
S6W6B4F2B2ZLa/O/Eg==
-----END CERTIFICATE-----
}








test rsa-generate-cacert-1.0 {cert} -setup {
    set fd [open [file join $::tcltest::testsDirectory test.key.des] r]
    set privkey [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory CA.crt] r]
    set cacert [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory CA.key] r]
    set cakey [read $fd]
    close $fd ; unset fd

    set password "ARoseIsARoseIsARose"

    set privkey [::pki::pkcs::parse_key $privkey $password]

    array set ca_arr [::pki::pkcs::parse_key $cakey $password]
    array set ca_arr [::pki::x509::parse_cert $cacert]
    set ca [array get ca_arr]



    set csr [::pki::pkcs::parse_csr [::pki::pkcs::create_csr $privkey [list C US ST Florida L Tampa O Tcllib OU RSA CN TestCert]]]
} -body {
    ::pki::x509::create_cert $csr $ca 20100809075203 1281340325 1596959525 1 "" 1
} -cleanup {
    unset privkey cakey cacert ca_arr ca password csr
} -result {-----BEGIN CERTIFICATE-----
MIIDUzCCAjugAwIBAgIGEkgVlaoDMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNVBAYT
AlVTMRAwDgYDVQQIEwdGbG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UEChMG
VGNsbGliMQwwCgYDVQQLEwNSU0ExDzANBgNVBAMTBlRlc3RDQTAeFw0xMDA4MDkw
NzUyMDVaFw0yMDA4MDkwNzUyMDVaMGExCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdG
bG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UEChMGVGNsbGliMQwwCgYDVQQL
EwNSU0ExETAPBgNVBAMTCFRlc3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAozwWij3h8daEG9J3zD3oJQYMiKbL/AriB+wgE/EhsaCtcyAUFIZz
Tmb3pdfyqK3uvJmNH7YqplWyzu2mcvV9Fcve4XBJ4SHpLjwmrlYN5FozrKT28Znd
wX+738O0RrL1LRhnNxWZ1P19xoc5SgqtaLEAkmXS8Iqw5vJ8uLW5ExA5xiAfuCCW
0r4nxkA6kDcLcXA4oMEcAIAw3WimAYluG6fmaMCcaK6nOtMOsXJfAyoaTz2qkRTd
pAXAMVP787Wp9eTYzZpjjyJA3LyAxBJMSg6Hn01mmhfzBBjbWWYCHyG1TKLPftbK
AcwW9mR+TVbbit0RgPuA8VJOZIiPniwDSwIDAQABoxMwETAPBgNVHRMBAf8EBTAD
AQH/MA0GCSqGSIb3DQEBBQUAA4IBAQA5nJ5k5HpGnBmDTB/cWd6LP7ygQ/jg9SEc
dVhSb6xy7h7O2txsndfH5fTyJilKRAfl/NGs5ZyV9q97OIP1aAhIRQiKUwSHu2+l
kHHVNn8DFGHRKhA5YSreZKR++tjAmowk0XQbEU33MZVPGPFlrL37V84Xf04MmFdD
kFtZO/soAzO8cPVizz3DNk7SNDCsWjmaTVH1yKmzBLJhrU86o4BEqbYbjbwdtelZ
cgeGPntr9c/ngnUlPU90HNp2e65zHUyf/3hWps72tSx5dNKcaE9NX8xxK5WZde8i
mn/PueMPCKdX1v9Nou51yReEa8D9h7D7klWwacrRoYh9Y4++g1by
-----END CERTIFICATE-----
}









test rsa-verify-certv1-1.0 {verify_cert} -setup {
    set fd [open [file join $::tcltest::testsDirectory test-v1.crt] r]
    set pubcert [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory CA.crt] r]
    set cacert [read $fd]
    close $fd ; unset fd

    set pubcert [::pki::x509::parse_cert $pubcert]
    set cacert [::pki::x509::parse_cert $cacert]
} -body {
    ::pki::x509::verify_cert $pubcert [list $cacert]
} -cleanup {
    unset pubcert cacert
} -result {true}

test rsa-verify-certv3-1.0 {verify_cert} -setup {
    set fd [open [file join $::tcltest::testsDirectory test-v3.crt] r]
    set pubcert [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory CA.crt] r]
    set cacert [read $fd]
    close $fd ; unset fd

    set pubcert [::pki::x509::parse_cert $pubcert]
    set cacert [::pki::x509::parse_cert $cacert]
} -body {
    ::pki::x509::verify_cert $pubcert [list $cacert]
} -cleanup {
    unset pubcert cacert
} -result {true}

test rsa-verify-badcertv1-1.0 {verify_cert} -setup {
    set fd [open [file join $::tcltest::testsDirectory test-v1.crt] r]
    set pubcert [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory test-v1.crt] r]
    set cacert [read $fd]
    close $fd ; unset fd

    set pubcert [::pki::x509::parse_cert $pubcert]
    set cacert [::pki::x509::parse_cert $cacert]
} -body {
    ::pki::x509::verify_cert $pubcert [list $cacert]
} -cleanup {
    unset pubcert cacert
} -result {false}

test rsa-verify-badcertv3-1.0 {verify_cert} -setup {
    set fd [open [file join $::tcltest::testsDirectory test-v3.crt] r]
    set pubcert [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory test-v3.crt] r]
    set cacert [read $fd]
    close $fd ; unset fd

    set pubcert [::pki::x509::parse_cert $pubcert]
    set cacert [::pki::x509::parse_cert $cacert]
} -body {
    ::pki::x509::verify_cert $pubcert [list $cacert]
} -cleanup {
    unset pubcert cacert
} -result {false}

test rsa-verify-badcertv3-2.0 {verify_cert} -setup {
    set fd [open [file join $::tcltest::testsDirectory test-v3.crt] r]
    set pubcert [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory CA.crt] r]
    set cacert [read $fd]
    close $fd ; unset fd

    set pubcert [::pki::x509::parse_cert $pubcert]
    set cacert [::pki::x509::parse_cert $cacert]

    # Remove all extensions from CA cert
    array set cacert_arr $cacert
    set cacert_arr(extensions) ""
    set cacert [array get cacert_arr]
} -body {
    ::pki::x509::verify_cert $pubcert [list $cacert]
} -cleanup {
    unset pubcert cacert
} -result {false}

test rsa-crypt-roundtrip-1.0 {encrypt, decrypt} -setup {
    set data      "This is a test"
    set password  "ARoseIsARoseIsARose"

    set fd [open [file join $::tcltest::testsDirectory test.key.des] r]
    set privkey [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory test-v1.crt] r]
    set pubkey [read $fd]
    close $fd ; unset fd

    array set key [::pki::pkcs::parse_key $privkey $password]
    array set key [::pki::x509::parse_cert $pubkey]
    set keylist   [array get key]
    unset password privkey pubkey key
} -body {
    set ciphertext [::pki::encrypt -binary -pub  -- $data       $keylist]
    set plaintext  [::pki::decrypt -binary -priv -- $ciphertext $keylist]
} -cleanup {
    unset -nocomplain data ciphertext plaintext
} -result {This is a test}

test rsa-sign-verify-1.0 {sign, verify} -setup {
    set data      "This is a test"
    set password  "ARoseIsARoseIsARose"

    set fd [open [file join $::tcltest::testsDirectory test.key.des] r]
    set privkey [read $fd]
    close $fd ; unset fd

    set fd [open [file join $::tcltest::testsDirectory test-v1.crt] r]
    set pubkey [read $fd]
    close $fd ; unset fd

    array set key [::pki::pkcs::parse_key $privkey $password]
    array set key [::pki::x509::parse_cert $pubkey]
    set keylist   [array get key]
    unset password privkey pubkey key
} -body {
    set ciphertext [::pki::encrypt -binary -priv -- $data       $keylist]
    set plaintext  [::pki::decrypt -binary -pub  -- $ciphertext $keylist]
} -cleanup {
    unset -nocomplain data ciphertext plaintext
} -result {This is a test}


foreach keylen {256 512 1024 2048} {

    # Just one key for the whole round and its tests. Its possible to
    # generate one for each test, but then we will really spend way to
    # much effort on the setup of each test.
    set key [::pki::rsa::generate $keylen]

    test rsa-crypt-roundtrip-2.0.$keylen "encrypt, decrypt pub/priv for keylen $keylen" -body {
        set plain    "Pub/priv test"
261
262
263
264
265
266
267
268
269
270
271
272
    }

    unset key
}

# -------------------------------------------------------------------------
testsuiteCleanup
return
# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:







|




392
393
394
395
396
397
398
399
400
401
402
403
    }

    unset key
}

# -------------------------------------------------------------------------
testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:

Deleted modules/pki/test-assets/CA.crt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-----BEGIN CERTIFICATE-----
MIIEBjCCAu6gAwIBAgIJAJsptsQf3TXPMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNV
BAYTAlVTMRAwDgYDVQQIEwdGbG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UE
ChMGVGNsbGliMQwwCgYDVQQLEwNSU0ExDzANBgNVBAMTBlRlc3RDQTAeFw0xMDA4
MDkwNzM3MzhaFw0zNTA4MTAwNzM3MzhaMF8xCzAJBgNVBAYTAlVTMRAwDgYDVQQI
EwdGbG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UEChMGVGNsbGliMQwwCgYD
VQQLEwNSU0ExDzANBgNVBAMTBlRlc3RDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAL9llE7rpNUW+YI8rdQgoG40E/FMMu2h9/6pVzCtILqOLFlSMSIQ
4CxKhIzPuiP+BSufNXmeMXSueifuT2mlb5ap6T2tmd5Vi09um5xw3Spu2Juz7Zfj
LDFnsMxuF3U4Qwl/9qEydmhtDnYATC8iRicXsPGvNVeTZgX3iZzzA3uFkD6NVEki
X1X3MgmE8eCGTw4U/k3MIK7wPQtZMSO4Aey9I/ub5ieZrAK0yZLjiubP27gb8ZIJ
wK2EXI2lZZH6g8JML7RwW5Yr0VoczEf79wKAUi15xQKfh+gxVzTnuKgdJ/ZMyzcW
+Pdap1YlHfewQfxeHBt60Rkr2x2UFU4hLIECAwEAAaOBxDCBwTAdBgNVHQ4EFgQU
hSwdCbdrD6EONdeqS8tIst6yVNUwgZEGA1UdIwSBiTCBhoAUhSwdCbdrD6EONdeq
S8tIst6yVNWhY6RhMF8xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdGbG9yaWRhMQ4w
DAYDVQQHEwVUYW1wYTEPMA0GA1UEChMGVGNsbGliMQwwCgYDVQQLEwNSU0ExDzAN
BgNVBAMTBlRlc3RDQYIJAJsptsQf3TXPMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcN
AQEFBQADggEBAL7Uhodh2ATX4IvsGqryZdLVnG9TkMn9o8ge9EUupYtt9/9/K+My
dqXCHVuKwMYr5V5S5HAQxwTTQ4ByPaLYz+V8dumyBOdSp5l5x5NWJ+2oCn/DpL7U
9ezqL9gzEf5AVLxigSo/V5c4uUpE4K3tbGHDVpF1z7OT6LOpkvWui1FpLQoDc9HK
BmT1J+fQSHfsScV65T6qsQAGPUyRXqh79LIrY0ZWvDun5xy13KmCk37Gc2+fCx2m
QEJFyaCMojsCfJz2XRtBtwn8bpBnFUP187f4snkU5Ga/5TjQGq6YBP2BWR8W3tM0
zGk5KboIltjQSbW9KYVratpF+gp3e6ni9B0=
-----END CERTIFICATE-----
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































Deleted modules/pki/test-assets/CA.key.

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
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,8C1A2E69ACFC3E90

GVnzdBMa+GX2u4jOpSYU6P1JBQYbB9FRrfB/0QGdhKHU2OPEZzYZo2LwgpEBVMWT
dVsbBECil4h0UnUsC/+DmJPv/SF++VJK8JvtO2opNCmeYrH5VAwqN2tqIXX2sWng
9Fk7HVjsLfTUvw6nc5TI07qK2okGcT9yMTjEGXKPLkMs5K16gKoMHf5yQPQmOpfR
HrE8odoPib1JKDV9j4FYjfBEja7Y4GLFbNobvaQIvA/pbKE4mGkGczn6vjdkGTbv
wAI0fIWqfOnfE+VlSz9lT4mOVHt6x4WQbfUgJKf29pL9DH+I22K2cgzGwMLzLot3
IhPiO6coFfLOKKNbRv4gtxTjXvnlwm217GDoEPgDKG1qwWzjSwI8DBsLjMhKHDfz
0ScyItR3wkTVaTE0sQYFS5VmKzgH2rQ8ichk4AUzM5+myxg1ALKi9GRtIKKbY+0H
EseYxzbRhTSVo0GPGiu8j6BVK40uynF4ydrjlETQsJhZZTeJPjPGNh6m3eP5zW0Q
Im8UgW6ZZumzINJPrEKrwRF7qEGSLRv3lkMOj08sYFsSqFnBex90cov1pJOUCCAL
mBgLFFb6P9kEAqZOnNcwrohcf8gmW1pATTgT1+y0OTC1rEJ+asvCn6yN2QkhyNqq
vabFqxyWxVi9MsodP4+eY9Hjhl5WwkuVCnBG69HugOFvVKHIpGxfQjSnQNaYfI6a
UKLixw0ZdfWN8sNG4gcisj/O/VHKbEWwp+N452lTzzFE7+QvCtg6rn+LPLEyTZRb
b7QQc6CcqELL4qksm/FNP8pIyGfsUKYVE79FDK+mxDxZpWEMJ6J6dwj1jwzGbMnP
5sgmAeaSinkqUQf/4AoiU1eIj1fiXHcsub7mFzzBP9NKQZ4YrkBeu7zfsP8Ex5Ol
W3WmKIkw2MBG9Q0dP3HQBDw5k35X5ydJvrtaRJLDZZDwA24WcyKffYUHGV4KhsxC
Vjzkth+MkBaPAtB35tRlr1Fr0wC6MNTeZOuPNgGM+t1ejg1NPN722J+ihne05KW/
wzBgz3veeJeUlxRPZl0Sklct029fV+pZGwxlx72hMiyBwDh9pBhmIjWJFzuQ35CG
DNZm1spGcDU9sd1y1txS+QVd3CDP7a5CrUuI7S8FYJEREGzWGn/dF9hxrbeLLXRf
qvcUwCAobFfV14Z1cwoxZ9MWTXBYynxUYO7TYajb/6vIvYOAQ3DGSPelvNRsrilT
GV0CJ1Mx6JEaTzGQQeB2JxO09T0qxKMT6h4BbLhZRledmrI/Pvp/roUmnvdE3kBn
MkRUxzGBD9EBPA02F2paDRxXPZRHvpGomvP32JL7AJ8tln8z4TsHclpls0E7dmk9
KKQSLk1DOUjarJhPHmGyDOn9tVdgzbfyQjdmZ1wxBvYbBuqS82FcoWohF2GnyYAm
X7tdS9AVNDErVXOmqh2hcYFY3NFBLy0altpMaTVqTx1SwkpHh6YGt9ioltzP7kxz
wxHz/w4DPrxaUOFYZX9dffGceFf5/h2DfhqobnwZuCgDo7SDUKJI0f88bR+1d1q6
qr2T9ZuzIPIllMzGVfNwq5WsPy+klq/lK0QRl6RZdLEM0Q5h6WOYeoxpOGjW6E1h
-----END RSA PRIVATE KEY-----
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































Deleted modules/pki/test-assets/result/aes-key.

1
d 4821708078078814272825737770757352316921506482526873519719051463644222257651923197825994018656421190278177720014932984365118366602027256382375921341192781177112398174373076887129954817822368157304055327895506098881228521168940083073283595671416028753301552269895847121119899618677892849270785450525228277087545852904246091363590456069440574806479467479724488815982259021323617233373449030738298588184972148901173121148634892058648703349014218791530847767762515588159636682267580355756974401553230588009724381821442787415368995149629493809933380894522643851913309510865914033228986295772184835354265231482340110365953 e 65537 l 2048 n 20606474229739240365059039861892702888430699076971875439310562489263214483191006887246310401088091004060054335612563612411917991000786455919906798626524375611634511845705141177165689526939976649836053082770641226108840795034158866930145876068965913035873741839723777813944236146677082729876717709231945588228947001753667862858297850461440476551869914895980840772354759428144421149613554402682425181850295101375623815063198594704730226304723548382258248785251384891817576645955371924194287071569929361029204431671633821160423187871463713776212876252047207985933876036458343140423787003660018607222053134170461225878347 p 151903506703070744388477144011062627922344490485619606525415439019240332914406492743669447033002173681213181316912563402042948038453846038272948559137687751740338183189809253891948725876860938554446847405802064303332011747457634488959045893106143553864597546566768167692662722957924358908573096347694362541259 q 135655026516400219835182288872064651548166413404981613626584975073279765274581289299963783472100901444904090497633607380440126562041149560121122191822729803838692049608052805597752016733559257401832457990520641184379220785155858496800358974243933025297673311305372951490297748845447521569920828454777048335233 type rsa
<


Deleted modules/pki/test-assets/result/cert.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-----BEGIN CERTIFICATE-----
MIIDOTCCAiECBhJIFZWqAzANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJVUzEQ
MA4GA1UECBMHRmxvcmlkYTEOMAwGA1UEBxMFVGFtcGExDzANBgNVBAoTBlRjbGxp
YjEMMAoGA1UECxMDUlNBMQ8wDQYDVQQDEwZUZXN0Q0EwHhcNMTAwODA5MDc1MjA1
WhcNMjAwODA5MDc1MjA1WjBhMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHRmxvcmlk
YTEOMAwGA1UEBxMFVGFtcGExDzANBgNVBAoTBlRjbGxpYjEMMAoGA1UECxMDUlNB
MREwDwYDVQQDEwhUZXN0Q2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAKM8Foo94fHWhBvSd8w96CUGDIimy/wK4gfsIBPxIbGgrXMgFBSGc05m96XX
8qit7ryZjR+2KqZVss7tpnL1fRXL3uFwSeEh6S48Jq5WDeRaM6yk9vGZ3cF/u9/D
tEay9S0YZzcVmdT9fcaHOUoKrWixAJJl0vCKsObyfLi1uRMQOcYgH7ggltK+J8ZA
OpA3C3FwOKDBHACAMN1opgGJbhun5mjAnGiupzrTDrFyXwMqGk89qpEU3aQFwDFT
+/O1qfXk2M2aY48iQNy8gMQSTEoOh59NZpoX8wQY21lmAh8htUyiz37WygHMFvZk
fk1W24rdEYD7gPFSTmSIj54sA0sCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAesvQ
pYfxZj6KIbZfkWHwhDH0VNi5iPUvaNbVvZrZZ1R1gZAk8RycQN8gn7BaKX/6ciks
geKbvGwy5JvZaKSed6574QVTV+mGAqAxOW+LmURV+TaoWSKAC93DebdsL2NlPDsr
uuxMgb7fn52ni2qAslPo+YzecokIWDeyKvRUCD7Gt3LDdLQPG/jTx6Xnebb7usiF
pfqQWhFUdcfPik0Y3rfJG5bV5HuhKR9LxwI3Hxrt4LlSZIpolMXkwklqeoI0eIpy
kNJW5c2pm3cvQ/AZ3bHXWNBqH9A4Zf3OdizyKFD5lqqM3H2EQRXj0cUzQo2Wqf53
S6W6B4F2B2ZLa/O/Eg==
-----END CERTIFICATE-----
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































Deleted modules/pki/test-assets/result/cert-b.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-----BEGIN CERTIFICATE-----
MIIDUzCCAjugAwIBAgIGEkgVlaoDMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNVBAYT
AlVTMRAwDgYDVQQIEwdGbG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UEChMG
VGNsbGliMQwwCgYDVQQLEwNSU0ExDzANBgNVBAMTBlRlc3RDQTAeFw0xMDA4MDkw
NzUyMDVaFw0yMDA4MDkwNzUyMDVaMGExCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdG
bG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UEChMGVGNsbGliMQwwCgYDVQQL
EwNSU0ExETAPBgNVBAMTCFRlc3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAozwWij3h8daEG9J3zD3oJQYMiKbL/AriB+wgE/EhsaCtcyAUFIZz
Tmb3pdfyqK3uvJmNH7YqplWyzu2mcvV9Fcve4XBJ4SHpLjwmrlYN5FozrKT28Znd
wX+738O0RrL1LRhnNxWZ1P19xoc5SgqtaLEAkmXS8Iqw5vJ8uLW5ExA5xiAfuCCW
0r4nxkA6kDcLcXA4oMEcAIAw3WimAYluG6fmaMCcaK6nOtMOsXJfAyoaTz2qkRTd
pAXAMVP787Wp9eTYzZpjjyJA3LyAxBJMSg6Hn01mmhfzBBjbWWYCHyG1TKLPftbK
AcwW9mR+TVbbit0RgPuA8VJOZIiPniwDSwIDAQABoxMwETAPBgNVHRMBAf8EBTAD
AQH/MA0GCSqGSIb3DQEBBQUAA4IBAQA5nJ5k5HpGnBmDTB/cWd6LP7ygQ/jg9SEc
dVhSb6xy7h7O2txsndfH5fTyJilKRAfl/NGs5ZyV9q97OIP1aAhIRQiKUwSHu2+l
kHHVNn8DFGHRKhA5YSreZKR++tjAmowk0XQbEU33MZVPGPFlrL37V84Xf04MmFdD
kFtZO/soAzO8cPVizz3DNk7SNDCsWjmaTVH1yKmzBLJhrU86o4BEqbYbjbwdtelZ
cgeGPntr9c/ngnUlPU90HNp2e65zHUyf/3hWps72tSx5dNKcaE9NX8xxK5WZde8i
mn/PueMPCKdX1v9Nou51yReEa8D9h7D7klWwacrRoYh9Y4++g1by
-----END CERTIFICATE-----
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































Deleted modules/pki/test-assets/result/cert1.

1
cert 30820221020612481595aa03300d06092a864886f70d0101050500305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d06035504031306546573744341301e170d3130303830393037353230355a170d3230303830393037353230355a3061310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b13035253413111300f06035504031308546573744365727430820122300d06092a864886f70d01010105000382010f003082010a0282010100a33c168a3de1f1d6841bd277cc3de825060c88a6cbfc0ae207ec2013f121b1a0ad7320141486734e66f7a5d7f2a8adeebc998d1fb62aa655b2ceeda672f57d15cbdee17049e121e92e3c26ae560de45a33aca4f6f199ddc17fbbdfc3b446b2f52d1867371599d4fd7dc687394a0aad68b1009265d2f08ab0e6f27cb8b5b9131039c6201fb82096d2be27c6403a90370b717038a0c11c008030dd68a601896e1ba7e668c09c68aea73ad30eb1725f032a1a4f3daa9114dda405c03153fbf3b5a9f5e4d8cd9a638f2240dcbc80c4124c4a0e879f4d669a17f30418db5966021f21b54ca2cf7ed6ca01cc16f6647e4d56db8add1180fb80f1524e64888f9e2c034b0203010001 data_signature_algo sha1WithRSAEncryption e 65537 extensions {} issuer {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCA} l 2048 n 20606474229739240365059039861892702888430699076971875439310562489263214483191006887246310401088091004060054335612563612411917991000786455919906798626524375611634511845705141177165689526939976649836053082770641226108840795034158866930145876068965913035873741839723777813944236146677082729876717709231945588228947001753667862858297850461440476551869914895980840772354759428144421149613554402682425181850295101375623815063198594704730226304723548382258248785251384891817576645955371924194287071569929361029204431671633821160423187871463713776212876252047207985933876036458343140423787003660018607222053134170461225878347 notAfter 1596959525 notBefore 1281340325 pubkey 3082010a0282010100a33c168a3de1f1d6841bd277cc3de825060c88a6cbfc0ae207ec2013f121b1a0ad7320141486734e66f7a5d7f2a8adeebc998d1fb62aa655b2ceeda672f57d15cbdee17049e121e92e3c26ae560de45a33aca4f6f199ddc17fbbdfc3b446b2f52d1867371599d4fd7dc687394a0aad68b1009265d2f08ab0e6f27cb8b5b9131039c6201fb82096d2be27c6403a90370b717038a0c11c008030dd68a601896e1ba7e668c09c68aea73ad30eb1725f032a1a4f3daa9114dda405c03153fbf3b5a9f5e4d8cd9a638f2240dcbc80c4124c4a0e879f4d669a17f30418db5966021f21b54ca2cf7ed6ca01cc16f6647e4d56db8add1180fb80f1524e64888f9e2c034b0203010001 pubkey_algo rsaEncryption raw 2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949444f5443434169454342684a49465a5771417a414e42676b71686b69473977304241515546414442664d517377435159445651514745774a56557a45510a4d4134474131554543424d48526d7876636d6c6b5954454f4d4177474131554542784d465647467463474578447a414e42674e5642416f54426c526a624778700a596a454d4d416f474131554543784d44556c4e424d513877445159445651514445775a555a584e30513045774868634e4d5441774f4441354d4463314d6a41310a5768634e4d6a41774f4441354d4463314d6a4131576a42684d517377435159445651514745774a56557a45514d4134474131554543424d48526d7876636d6c6b0a5954454f4d4177474131554542784d465647467463474578447a414e42674e5642416f54426c526a62477870596a454d4d416f474131554543784d44556c4e420a4d5245774477594456515144457768555a584e305132567964444343415349774451594a4b6f5a496876634e4151454242514144676745504144434341516f430a67674542414b4d38466f6f39346648576842765364387739364355474449696d792f774b34676673494250784962476772584d67464253476330356d393658580a387169743772795a6a522b324b715a5673733774706e4c316652584c3375467753654568365334384a713557446552614d36796b3976475a3363462f75392f440a74456179395330595a7a63566d645439666361484f556f4b72576978414a4a6c3076434b734f6279664c693175524d514f635967483767676c744b2b4a385a410a4f704133433346774f4b4442484143414d4e316f7067474a6268756e356d6a416e476975707a72544472467958774d71476b38397170455533615146774446540a2b2f4f317166586b324d326159343869514e7938674d515354456f4f6835394e5a706f583877515932316c6d41683868745579697a3337577967484d46765a6b0a666b3157323472644559443767504653546d53496a35347341307343417745414154414e42676b71686b6947397730424151554641414f4341514541657376510a705966785a6a364b49625a666b57487768444830564e693569505576614e6256765a725a5a315231675a416b38527963514e38676e3742614b582f3663696b730a67654b6276477779354a765a614b53656436353734515654562b6d47417141784f572b4c6d5552562b54616f57534b4143393344656264734c324e6c504473720a7575784d676237666e35326e69327141736c506f2b597a65636f6b49574465794b7652554344374774334c44644c5150472f6a547836586e65626237757369460a706671515768465564636650696b30593372664a47356256354875684b52394c7877493348787274344c6c535a49706f6c4d586b776b6c71656f4930654970790a6b4e4a57356332706d336376512f415a33624858574e4271483941345a66334f64697a794b4644356c71714d334832455152586a3063557a516f3257716635330a533657364234463242325a4c612f4f2f45673d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a serial_number 20100809075203 signature 7acbd0a587f1663e8a21b65f9161f08431f454d8b988f52f68d6d5bd9ad9675475819024f11c9c40df209fb05a297ffa72292c81e29bbc6c32e49bd968a49e77ae7be1055357e98602a031396f8b994455f936a85922800bddc379b76c2f63653c3b2bbaec4c81bedf9f9da78b6a80b253e8f98cde7289085837b22af454083ec6b772c374b40f1bf8d3c7a5e779b6fbbac885a5fa905a115475c7cf8a4d18deb7c91b96d5e47ba1291f4bc702371f1aede0b952648a6894c5e4c2496a7a8234788a7290d256e5cda99b772f43f019ddb1d758d06a1fd03865fdce762cf22850f996aa8cdc7d844115e3d1c533428d96a9fe774ba5ba07817607664b6bf3bf12 signature_algo sha1WithRSAEncryption subject {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCert} type rsa version 1
<


Deleted modules/pki/test-assets/result/cert3.

1
cert 30820226a003020102020612481595a9c0300d06092a864886f70d0101050500305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d06035504031306546573744341301e170d3130303830393037353133365a170d3230303830393037353133365a3061310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b13035253413111300f06035504031308546573744365727430820122300d06092a864886f70d01010105000382010f003082010a0282010100a33c168a3de1f1d6841bd277cc3de825060c88a6cbfc0ae207ec2013f121b1a0ad7320141486734e66f7a5d7f2a8adeebc998d1fb62aa655b2ceeda672f57d15cbdee17049e121e92e3c26ae560de45a33aca4f6f199ddc17fbbdfc3b446b2f52d1867371599d4fd7dc687394a0aad68b1009265d2f08ab0e6f27cb8b5b9131039c6201fb82096d2be27c6403a90370b717038a0c11c008030dd68a601896e1ba7e668c09c68aea73ad30eb1725f032a1a4f3daa9114dda405c03153fbf3b5a9f5e4d8cd9a638f2240dcbc80c4124c4a0e879f4d669a17f30418db5966021f21b54ca2cf7ed6ca01cc16f6647e4d56db8add1180fb80f1524e64888f9e2c034b0203010001 data_signature_algo sha1WithRSAEncryption e 65537 extensions {} issuer {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCA} l 2048 n 20606474229739240365059039861892702888430699076971875439310562489263214483191006887246310401088091004060054335612563612411917991000786455919906798626524375611634511845705141177165689526939976649836053082770641226108840795034158866930145876068965913035873741839723777813944236146677082729876717709231945588228947001753667862858297850461440476551869914895980840772354759428144421149613554402682425181850295101375623815063198594704730226304723548382258248785251384891817576645955371924194287071569929361029204431671633821160423187871463713776212876252047207985933876036458343140423787003660018607222053134170461225878347 notAfter 1596959496 notBefore 1281340296 pubkey 3082010a0282010100a33c168a3de1f1d6841bd277cc3de825060c88a6cbfc0ae207ec2013f121b1a0ad7320141486734e66f7a5d7f2a8adeebc998d1fb62aa655b2ceeda672f57d15cbdee17049e121e92e3c26ae560de45a33aca4f6f199ddc17fbbdfc3b446b2f52d1867371599d4fd7dc687394a0aad68b1009265d2f08ab0e6f27cb8b5b9131039c6201fb82096d2be27c6403a90370b717038a0c11c008030dd68a601896e1ba7e668c09c68aea73ad30eb1725f032a1a4f3daa9114dda405c03153fbf3b5a9f5e4d8cd9a638f2240dcbc80c4124c4a0e879f4d669a17f30418db5966021f21b54ca2cf7ed6ca01cc16f6647e4d56db8add1180fb80f1524e64888f9e2c034b0203010001 pubkey_algo rsaEncryption raw 2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d494944506a4343416961674177494241674947456b67566c616e414d413047435371475349623344514542425155414d463878437a414a42674e56424159540a416c56544d52417744675944565151494577644762473979615752684d51347744415944565151484577565559573177595445504d4130474131554543684d470a56474e7362476c694d517777436759445651514c45774e5355304578447a414e42674e5642414d54426c526c6333524451544165467730784d4441344d446b770a4e7a55784d7a5a61467730794d4441344d446b774e7a55784d7a5a614d474578437a414a42674e5642415954416c56544d5241774467594456515149457764470a62473979615752684d51347744415944565151484577565559573177595445504d4130474131554543684d4756474e7362476c694d517777436759445651514c0a45774e53553045784554415042674e5642414d544346526c633352445a584a304d494942496a414e42676b71686b6947397730424151454641414f43415138410a4d49494243674b43415145416f7a7757696a33683864614547394a337a44336f4a51594d694b624c2f417269422b7767452f4568736143746379415546495a7a0a546d623370646679714b3375764a6d4e48375971706c57797a75326d63765639466376653458424a345348704c6a776d726c594e35466f7a724b5432385a6e640a77582b3733384f3052724c314c52686e4e78575a31503139786f633553677174614c45416b6d58533849717735764a38754c57354578413578694166754343570a3072346e786b41366b44634c635841346f4d4563414941773357696d41596c754736666d614d4363614b366e4f744d4f73584a6641796f61547a32716b5254640a704158414d56503738375770396554597a5a706a6a794a41334c794178424a4d536736486e30316d6d68667a42426a625757594348794731544b4c506674624b0a41637757396d522b54566262697430526750754138564a4f5a4969506e69774453774944415141424d41304743537147534962334451454242515541413449420a41514177454673454441306d70346d516d4f596263345248515645474e3732334374676345484637756e75343345654f35732f31597130462b5364575231344c0a714673366c52586e506a6b457049466c6d573549304470385131795931387152507438487836796d7874793851576d396c54774d427a7259556839344a71562b0a593351484a625672674c706f4b527073564f7073644d3571513465667651774f30734f77493541616a766b795531644338547378417a794a4d51664b2b5751730a41306c5370714d304874726c31785268445a774543384245332b374976394d53572f52764b364661614f466b796a766657664f4c67526652744d51382b6864560a385261534571716b5373676c477a6d7a53627554486f70426b6c65314b6567713248642f316c706939466f58487247786a7747575677354b4f77574f4361304f0a7946344b5757696a4d4f57624d7249714c71357034614f6b0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a serial_number 20100809075136 signature 30105b040c0d26a7899098e61b73844741510637bdb70ad81c10717bba7bb8dc478ee6cff562ad05f92756475e0ba85b3a9515e73e3904a48165996e48d03a7c435c98d7ca913edf07c7aca6c6dcbc4169bd953c0c073ad8521f7826a57e63740725b56b80ba68291a6c54ea6c74ce6a43879fbd0c0ed2c3b023901a8ef932535742f13b31033c893107caf9642c034952a6a3341edae5d714610d9c040bc044dfeec8bfd3125bf46f2ba15a68e164ca3bdf59f38b8117d1b4c43cfa1755f1169212aaa44ac8251b39b349bb931e8a419257b529e82ad8777fd65a62f45a171eb1b18f0196570e4a3b058e09ad0ec85e0a5968a330e59b32b22a2eae69e1a3a4 signature_algo sha1WithRSAEncryption subject {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCert} type rsa version 3
<


Deleted modules/pki/test-assets/result/certCA.

1
cert 308202eea0030201020209009b29b6c41fdd35cf300d06092a864886f70d0101050500305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d06035504031306546573744341301e170d3130303830393037333733385a170d3335303831303037333733385a305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d0603550403130654657374434130820122300d06092a864886f70d01010105000382010f003082010a0282010100bf65944eeba4d516f9823cadd420a06e3413f14c32eda1f7fea95730ad20ba8e2c5952312210e02c4a848ccfba23fe052b9f35799e3174ae7a27ee4f69a56f96a9e93dad99de558b4f6e9b9c70dd2a6ed89bb3ed97e32c3167b0cc6e17753843097ff6a13276686d0e76004c2f22462717b0f1af3557936605f7899cf3037b85903e8d5449225f55f7320984f1e0864f0e14fe4dcc20aef03d0b593123b801ecbd23fb9be62799ac02b4c992e38ae6cfdbb81bf19209c0ad845c8da56591fa83c24c2fb4705b962bd15a1ccc47fbf70280522d79c5029f87e8315734e7b8a81d27f64ccb3716f8f75aa756251df7b041fc5e1c1b7ad1192bdb1d94154e212c810203010001a381c43081c1301d0603551d0e04160414852c1d09b76b0fa10e35d7aa4bcb48b2deb254d53081910603551d230481893081868014852c1d09b76b0fa10e35d7aa4bcb48b2deb254d5a163a461305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d060355040313065465737443418209009b29b6c41fdd35cf300c0603551d13040530030101ff data_signature_algo sha1WithRSAEncryption e 65537 extensions {id-ce-subjectKeyIdentifier {false 0414852c1d09b76b0fa10e35d7aa4bcb48b2deb254d5} id-ce-authorityKeyIdentifier {false 3081868014852c1d09b76b0fa10e35d7aa4bcb48b2deb254d5a163a461305f310b30090603550406130255533110300e06035504081307466c6f72696461310e300c0603550407130554616d7061310f300d060355040a130654636c6c6962310c300a060355040b1303525341310f300d060355040313065465737443418209009b29b6c41fdd35cf} id-ce-basicConstraints {false 1 -1}} issuer {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCA} l 2048 n 24161606882664512184359265185750837725108535101957340182512690512950889280510175836653980019439405807509520118166835198926328713901946216313990307823213762851130122553610411084164096778558222486569750697608231998818342043083553499928765840766586577148563804434733745484416582976688503343857730022194918419820043366167270205314454789050632414594372175021330643138454461788318306110532766986666994575469007919602783172146356611527403971910037954057021421611608595373199910520988014831498419657809400692831589285260267441816651113464389720766612297754777522129247659432535168409289483999817599902067306541004223550663809 notAfter 2070344258 notBefore 1281339458 pubkey 3082010a0282010100bf65944eeba4d516f9823cadd420a06e3413f14c32eda1f7fea95730ad20ba8e2c5952312210e02c4a848ccfba23fe052b9f35799e3174ae7a27ee4f69a56f96a9e93dad99de558b4f6e9b9c70dd2a6ed89bb3ed97e32c3167b0cc6e17753843097ff6a13276686d0e76004c2f22462717b0f1af3557936605f7899cf3037b85903e8d5449225f55f7320984f1e0864f0e14fe4dcc20aef03d0b593123b801ecbd23fb9be62799ac02b4c992e38ae6cfdbb81bf19209c0ad845c8da56591fa83c24c2fb4705b962bd15a1ccc47fbf70280522d79c5029f87e8315734e7b8a81d27f64ccb3716f8f75aa756251df7b041fc5e1c1b7ad1192bdb1d94154e212c810203010001 pubkey_algo rsaEncryption raw 2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d494945426a434341753667417749424167494a414a737074735166335458504d413047435371475349623344514542425155414d463878437a414a42674e560a42415954416c56544d52417744675944565151494577644762473979615752684d51347744415944565151484577565559573177595445504d413047413155450a43684d4756474e7362476c694d517777436759445651514c45774e5355304578447a414e42674e5642414d54426c526c6333524451544165467730784d4441340a4d446b774e7a4d334d7a68614677307a4e5441344d5441774e7a4d334d7a68614d463878437a414a42674e5642415954416c56544d52417744675944565151490a4577644762473979615752684d51347744415944565151484577565559573177595445504d4130474131554543684d4756474e7362476c694d517777436759440a5651514c45774e5355304578447a414e42674e5642414d54426c526c6333524451544343415349774451594a4b6f5a496876634e4151454242514144676745500a4144434341516f4367674542414c396c6c453772704e55572b594938726451676f473430452f464d4d753268392f3670567a4374494c714f4c466c534d5349510a3443784b68497a507569502b425375664e586d654d5853756569667554326d6c62356170365432746d643556693039756d35787733537075324a757a375a666a0a4c44466e734d78754633553451776c2f39714579646d6874446e59415443386952696358735047764e5665545a675833695a7a7a413375466b44364e56456b690a583158334d676d4538654347547734552f6b334d494b37775051745a4d534f3441657939492f75623569655a72414b30795a4c6a6975625032376762385a494a0a774b32455849326c5a5a483667384a4d4c3752775735597230566f637a45663739774b415569313578514b66682b6778567a546e754b67644a2f5a4d797a63570a2b5064617031596c48666577516678654842743630526b7232783255465534684c4945434177454141614f42784443427754416442674e5648513445466751550a68537764436264724436454f4e6465715338744973743679564e5577675a4547413155644977534269544342686f415568537764436264724436454f4e6465710a5338744973743679564e5768593652684d463878437a414a42674e5642415954416c56544d52417744675944565151494577644762473979615752684d5134770a44415944565151484577565559573177595445504d4130474131554543684d4756474e7362476c694d517777436759445651514c45774e5355304578447a414e0a42674e5642414d54426c526c633352445159494a414a737074735166335458504d41774741315564457751464d414d42416638774451594a4b6f5a496876634e0a415145464251414467674542414c3755686f64683241545834497673477172795a644c566e4739546b4d6e396f3867653945557570597474392f392f4b2b4d790a647158434856754b774d59723556355335484151787754545134427950614c597a2b563864756d79424f645370356c3578354e574a2b326f436e2f44704c37550a39657a714c39677a45663541564c786967536f2f5635633475557045344b337462474844567046317a374f54364c4f706b765775693146704c516f446339484b0a426d54314a2b6651534866735363563635543671735141475055795258716837394c497259305a577644756e35787931334b6d436b33374763322b664378326d0a51454a467961434d6f6a7343664a7a325852744274776e386270426e4655503138376634736e6b553547612f35546a5147713659425032425752385733744d300a7a476b354b626f496c746a51536257394b595672617470462b67703365366e693942303d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a serial_number 11180668503388403151 signature bed4868761d804d7e08bec1aaaf265d2d59c6f5390c9fda3c81ef4452ea58b6df7ff7f2be33276a5c21d5b8ac0c62be55e52e47010c704d34380723da2d8cfe57c76e9b204e752a79979c7935627eda80a7fc3a4bed4f5ecea2fd83311fe4054bc62812a3f579738b94a44e0aded6c61c3569175cfb393e8b3a992f5ae8b51692d0a0373d1ca0664f527e7d04877ec49c57ae53eaab100063d4c915ea87bf4b22b634656bc3ba7e71cb5dca982937ec6736f9f0b1da6404245c9a08ca23b027c9cf65d1b41b709fc6e90671543f5f3b7f8b27914e466bfe538d01aae9804fd81591f16ded334cc693929ba0896d8d049b5bd29856b6ada45fa0a777ba9e2f41d signature_algo sha1WithRSAEncryption subject {C=US, ST=Florida, L=Tampa, O=Tcllib, OU=RSA, CN=TestCA} type rsa version 3
<


Deleted modules/pki/test-assets/result/des-csr.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-----BEGIN CERTIFICATE REQUEST-----
MIICpjCCAY4CAQAwYTELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0Zsb3JpZGExDjAM
BgNVBAcTBVRhbXBhMQ8wDQYDVQQKEwZUY2xsaWIxDDAKBgNVBAsTA1JTQTERMA8G
A1UEAxMIVGVzdENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCj
PBaKPeHx1oQb0nfMPeglBgyIpsv8CuIH7CAT8SGxoK1zIBQUhnNOZvel1/Kore68
mY0ftiqmVbLO7aZy9X0Vy97hcEnhIekuPCauVg3kWjOspPbxmd3Bf7vfw7RGsvUt
GGc3FZnU/X3GhzlKCq1osQCSZdLwirDm8ny4tbkTEDnGIB+4IJbSvifGQDqQNwtx
cDigwRwAgDDdaKYBiW4bp+ZowJxorqc60w6xcl8DKhpPPaqRFN2kBcAxU/vztan1
5NjNmmOPIkDcvIDEEkxKDoefTWaaF/MEGNtZZgIfIbVMos9+1soBzBb2ZH5NVtuK
3RGA+4DxUk5kiI+eLANLAgMBAAGgADANBgkqhkiG9w0BAQUFAAOCAQEAff0WNTPX
M6rdFGOXBxTsC7NUGcoquuM6QsceadMbBVRtRUUbaUsusXdxDWhdylqHM3xPNx0L
4Ex0FeL9icD/8xvJmCXzBeNt3uvThTvIwHYqnOCSlhx9InUUx2l6U0rAwZ+CIuMi
7lG2+Z5qVD035bAZ7LT/4s4fjKSL4cTZQOdCcoFtoptj9+L8EItwwYDzffJWdG8s
OUtMBn+Zh45k2UtLKu38jBNtVpNFAEJLlr/Arj6Jj3yTmEFrocxkwK6IPbOHQTu3
tyJ5CkDpUqkxYZ0D4wfr8tFEru0jQNl5bSDt9QQvg1Kj6+OC9aaRvxwnmc6REfky
8sCv80Pn5dNCGg==
-----END CERTIFICATE REQUEST-----
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































Deleted modules/pki/test-assets/result/des-key.

1
d 4821708078078814272825737770757352316921506482526873519719051463644222257651923197825994018656421190278177720014932984365118366602027256382375921341192781177112398174373076887129954817822368157304055327895506098881228521168940083073283595671416028753301552269895847121119899618677892849270785450525228277087545852904246091363590456069440574806479467479724488815982259021323617233373449030738298588184972148901173121148634892058648703349014218791530847767762515588159636682267580355756974401553230588009724381821442787415368995149629493809933380894522643851913309510865914033228986295772184835354265231482340110365953 e 65537 l 2048 n 20606474229739240365059039861892702888430699076971875439310562489263214483191006887246310401088091004060054335612563612411917991000786455919906798626524375611634511845705141177165689526939976649836053082770641226108840795034158866930145876068965913035873741839723777813944236146677082729876717709231945588228947001753667862858297850461440476551869914895980840772354759428144421149613554402682425181850295101375623815063198594704730226304723548382258248785251384891817576645955371924194287071569929361029204431671633821160423187871463713776212876252047207985933876036458343140423787003660018607222053134170461225878347 p 151903506703070744388477144011062627922344490485619606525415439019240332914406492743669447033002173681213181316912563402042948038453846038272948559137687751740338183189809253891948725876860938554446847405802064303332011747457634488959045893106143553864597546566768167692662722957924358908573096347694362541259 q 135655026516400219835182288872064651548166413404981613626584975073279765274581289299963783472100901444904090497633607380440126562041149560121122191822729803838692049608052805597752016733559257401832457990520641184379220785155858496800358974243933025297673311305372951490297748845447521569920828454777048335233 type rsa
<


Deleted modules/pki/test-assets/test-v1.crt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-----BEGIN CERTIFICATE-----
MIIDOTCCAiECBhJIFZWqAzANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJVUzEQ
MA4GA1UECBMHRmxvcmlkYTEOMAwGA1UEBxMFVGFtcGExDzANBgNVBAoTBlRjbGxp
YjEMMAoGA1UECxMDUlNBMQ8wDQYDVQQDEwZUZXN0Q0EwHhcNMTAwODA5MDc1MjA1
WhcNMjAwODA5MDc1MjA1WjBhMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHRmxvcmlk
YTEOMAwGA1UEBxMFVGFtcGExDzANBgNVBAoTBlRjbGxpYjEMMAoGA1UECxMDUlNB
MREwDwYDVQQDEwhUZXN0Q2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAKM8Foo94fHWhBvSd8w96CUGDIimy/wK4gfsIBPxIbGgrXMgFBSGc05m96XX
8qit7ryZjR+2KqZVss7tpnL1fRXL3uFwSeEh6S48Jq5WDeRaM6yk9vGZ3cF/u9/D
tEay9S0YZzcVmdT9fcaHOUoKrWixAJJl0vCKsObyfLi1uRMQOcYgH7ggltK+J8ZA
OpA3C3FwOKDBHACAMN1opgGJbhun5mjAnGiupzrTDrFyXwMqGk89qpEU3aQFwDFT
+/O1qfXk2M2aY48iQNy8gMQSTEoOh59NZpoX8wQY21lmAh8htUyiz37WygHMFvZk
fk1W24rdEYD7gPFSTmSIj54sA0sCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAesvQ
pYfxZj6KIbZfkWHwhDH0VNi5iPUvaNbVvZrZZ1R1gZAk8RycQN8gn7BaKX/6ciks
geKbvGwy5JvZaKSed6574QVTV+mGAqAxOW+LmURV+TaoWSKAC93DebdsL2NlPDsr
uuxMgb7fn52ni2qAslPo+YzecokIWDeyKvRUCD7Gt3LDdLQPG/jTx6Xnebb7usiF
pfqQWhFUdcfPik0Y3rfJG5bV5HuhKR9LxwI3Hxrt4LlSZIpolMXkwklqeoI0eIpy
kNJW5c2pm3cvQ/AZ3bHXWNBqH9A4Zf3OdizyKFD5lqqM3H2EQRXj0cUzQo2Wqf53
S6W6B4F2B2ZLa/O/Eg==
-----END CERTIFICATE-----
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































Deleted modules/pki/test-assets/test-v3.crt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-----BEGIN CERTIFICATE-----
MIIDPjCCAiagAwIBAgIGEkgVlanAMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNVBAYT
AlVTMRAwDgYDVQQIEwdGbG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UEChMG
VGNsbGliMQwwCgYDVQQLEwNSU0ExDzANBgNVBAMTBlRlc3RDQTAeFw0xMDA4MDkw
NzUxMzZaFw0yMDA4MDkwNzUxMzZaMGExCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdG
bG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UEChMGVGNsbGliMQwwCgYDVQQL
EwNSU0ExETAPBgNVBAMTCFRlc3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAozwWij3h8daEG9J3zD3oJQYMiKbL/AriB+wgE/EhsaCtcyAUFIZz
Tmb3pdfyqK3uvJmNH7YqplWyzu2mcvV9Fcve4XBJ4SHpLjwmrlYN5FozrKT28Znd
wX+738O0RrL1LRhnNxWZ1P19xoc5SgqtaLEAkmXS8Iqw5vJ8uLW5ExA5xiAfuCCW
0r4nxkA6kDcLcXA4oMEcAIAw3WimAYluG6fmaMCcaK6nOtMOsXJfAyoaTz2qkRTd
pAXAMVP787Wp9eTYzZpjjyJA3LyAxBJMSg6Hn01mmhfzBBjbWWYCHyG1TKLPftbK
AcwW9mR+TVbbit0RgPuA8VJOZIiPniwDSwIDAQABMA0GCSqGSIb3DQEBBQUAA4IB
AQAwEFsEDA0mp4mQmOYbc4RHQVEGN723CtgcEHF7unu43EeO5s/1Yq0F+SdWR14L
qFs6lRXnPjkEpIFlmW5I0Dp8Q1yY18qRPt8Hx6ymxty8QWm9lTwMBzrYUh94JqV+
Y3QHJbVrgLpoKRpsVOpsdM5qQ4efvQwO0sOwI5AajvkyU1dC8TsxAzyJMQfK+WQs
A0lSpqM0Htrl1xRhDZwEC8BE3+7Iv9MSW/RvK6FaaOFkyjvfWfOLgRfRtMQ8+hdV
8RaSEqqkSsglGzmzSbuTHopBkle1Kegq2Hd/1lpi9FoXHrGxjwGWVw5KOwWOCa0O
yF4KWWijMOWbMrIqLq5p4aOk
-----END CERTIFICATE-----
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































Deleted modules/pki/test-assets/test.csr.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-----BEGIN CERTIFICATE REQUEST-----
MIICpjCCAY4CAQAwYTELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0Zsb3JpZGExDjAM
BgNVBAcTBVRhbXBhMQ8wDQYDVQQKEwZUY2xsaWIxDDAKBgNVBAsTA1JTQTERMA8G
A1UEAxMIVGVzdENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCj
PBaKPeHx1oQb0nfMPeglBgyIpsv8CuIH7CAT8SGxoK1zIBQUhnNOZvel1/Kore68
mY0ftiqmVbLO7aZy9X0Vy97hcEnhIekuPCauVg3kWjOspPbxmd3Bf7vfw7RGsvUt
GGc3FZnU/X3GhzlKCq1osQCSZdLwirDm8ny4tbkTEDnGIB+4IJbSvifGQDqQNwtx
cDigwRwAgDDdaKYBiW4bp+ZowJxorqc60w6xcl8DKhpPPaqRFN2kBcAxU/vztan1
5NjNmmOPIkDcvIDEEkxKDoefTWaaF/MEGNtZZgIfIbVMos9+1soBzBb2ZH5NVtuK
3RGA+4DxUk5kiI+eLANLAgMBAAGgADANBgkqhkiG9w0BAQUFAAOCAQEAff0WNTPX
M6rdFGOXBxTsC7NUGcoquuM6QsceadMbBVRtRUUbaUsusXdxDWhdylqHM3xPNx0L
4Ex0FeL9icD/8xvJmCXzBeNt3uvThTvIwHYqnOCSlhx9InUUx2l6U0rAwZ+CIuMi
7lG2+Z5qVD035bAZ7LT/4s4fjKSL4cTZQOdCcoFtoptj9+L8EItwwYDzffJWdG8s
OUtMBn+Zh45k2UtLKu38jBNtVpNFAEJLlr/Arj6Jj3yTmEFrocxkwK6IPbOHQTu3
tyJ5CkDpUqkxYZ0D4wfr8tFEru0jQNl5bSDt9QQvg1Kj6+OC9aaRvxwnmc6REfky
8sCv80Pn5dNCGg==
-----END CERTIFICATE REQUEST-----
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































Deleted modules/pki/test-assets/test.key.aes.

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
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,A63D2250AEC17BBA948C0711A7477A88

DcIqtKV3RzcfzOk0K4WwRU4dK4373bsoek/trIvHYbs6sQlU0Ydk8ddDYyWlt0vR
MdEhEi4kTbtWhczSa9kgjQo59fZ8br8iHaSkUDPqKZUCy5qAlLsfRnCiA4JnZaDy
BD8ROFNTdb1MTnGPqrY2+9nv/BAPNlqr+95zcAim7vBJxO0idmUKCzVFAEHn+akD
UPX/Rkku7tIprsA5ePsQ9Z7B8qJ3LqhxKauZE+qV3hcX8/E7fndpYxQ5I3/6W3Wj
hkfH4cTwNC9H0jcaoDDlh0O1xMfq2YQxyq20Cfse8NO11Is8UMbXWBZ90uhk6lnk
xsVzOB2A7WbiiNEfbLBYgsUqy9ffGKhJWXoUUzl6Ze9lolD0mJjinKwAMEszwWNg
qSwJQi+omgv0+0yP2gnMkqwsBzPFrEt/Iw0/nMKNNn8RXK2C3itD61tX/T/4p5Gj
VvISFp+KjlgASBMaSNCE/FsfAsz7OxrkvrOJcEAZ1sWjfBUXSq20ESFGk74S5AUj
xjrSeurl7pyLjfEgx2YR6ybF3SSnVst3wQ9BPLnG8439VKONixSukDvk/XJuY4UO
dLuSm7aTcLy43jLosxLKHJ6jfwJEOhKMFGXkyb1h7UZnU3rydvgJF7Hw+HGsnuH6
0cd4gKyMoTclxRn8oULlQafuOYwTO0xOV5cOjtKdnaTfasd4xrYuWGuW93INvyTh
6lYhVgcjo+F7TDm1bqgAH354Cb3FqERx4VmeJm20YfpPilDuM1ygkh5tObM2ffqr
vJ9T66RsjhqpMv8trjj4F8oZK614D1MVKv7/2A02GEx8eoKiv1IsIoLe4Ihe5Ido
oswOXxdtkJj4kd/feKPOFnCajOdWGR88IMUldMIsTetxAlaNrZkTz0OAKZ0pTRgj
BsiXVwT6OX3GF7cL41Q6FXbLZGrLnGGnOjRFpBK+0JeQ8hQFortqiLBXUaNK//gH
pzMwApPRBfX5VxU4bVxai5WoBz63MAdOJaHKTBfNF8ebMsUC6Z+ue3H/rQmTjscz
zxelmeKHGbFCUyW/bmGh3MDkriXUNVgqFQTqDQIbsOVzwHAQ3m6N7zREcep+/uCk
2VlJY2HRuAsf8U+sATGveYkCcq+1nr1ZPcbeLHom9NL8cDXvWRwj84Y3Fv0BPuod
PRBLZWMe8bOICV7cxsyRPfNf9ov+QyLc7LeMdmy9gYZABnRUZRKAOcNGHDIVULeT
L9+QiyzeW6AK5BgkNrTpHC6fWo6jqfDjZJrhJvQbzvykJwiMJvahuRYlejLVx1HA
uFANAhgM9APAjnzpyvbS5EcB+Q+9TrF8d+MufR3ijvMT2evIsUthwprS7CkJLCXl
WeGw/YI58xWwk1l3LZ8bT04Jy1cS+8CVnmZXtCq0yRVsIVbsMlN4WW1b6AxMTGlC
VB8ne9lw3zSqraDu/8he0TQi0JzYs86CwjDkMTIaIrXn+6W7tlcSUpnrQeAfgx+d
w8qklOraCLAcXWhFw2kbc7pzvKvVzRr2R0GtZaGYInEFUP9e7fJT4R9K1cBi9DGm
gmtJUWHnxI9QMHDslST9NGkrulBisoJ0kuVNUmIX0x2zii7w+Kk5a87lUB06pAmV
-----END RSA PRIVATE KEY-----
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































Deleted modules/pki/test-assets/test.key.des.

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
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,2AD65AF586C2E7FF

0pAOYQCqE9NPUJSrK4gu5P9H1yydKcLvuhIIsh5S1RtlEqzz1eythmGRTD/S6QnS
c2zmmkaHndGKB3S55BTw0UnGP3XROdl1VtCqlf2mvp7MY3E9xF+ZKgw6L2yUeFW5
ZlKEyglWIB5J4yKgX8yAe6nqdhNEXG6JolCQH45x5uRiMTtxuGgivmvFfTV3TjaO
GXUMcbNeslJ4PZwxmUFR5YD4QSxwHe4Ur3dz2CMW6ea+TGbWNyqoEEEz81BKeAFF
cAxAtnyWpo9NmRc2TmGRstXrfzBW/lgNrkLgqoNHkfXT5p+kkG4mIInIKWpeKsJB
wByDFIB5+Sr3VkZJYOMJQcYkVWc2Y+o1l8/cqk9cuLYMO81OQw3QEwy0WSkXpVfP
CIbIQOyp3Hi02drlcIjv+d6OYWDYwMB1DiPQSYGO16jFORtC0Mrmt5XiUE4kWTap
3K4MVphvkJaSjUCzbLVzChhXWICwwGPG/x8F1Fkre/xevwdFq6qZB2HfZVqjtWrn
E6nVWjWcaavIxJEJPuCfhU+gKsV/nyxMFqBpck8YRxUE1yYdG9sSHaiL/z8vom1r
09VorVpa1v0AI+05XgJPZHPmjbadNn7oA3knqbICv6Jh0URXlW+TtEWGde+YDz9x
HC6TexiZU2tQcZMtcR999yI9UYXekDS6jXLjfpEZuM971IbUefjEGnBhBpoxW4Zw
MDzmWDJxyT3bz4ZURANm1nE3i/9R6sDwv7egu62wY6wo8KmEA126eX4CE1TAeRyF
7DZCsmMWHQJej8N5kmTpREtBKZhCrmRYOE6vTELZWfsLN00yTpUFzzrM5gfgYDt5
Ry8t9OQrr7T3TZDu20DMrNRL/3/t3Ap133zgM6c/jD955PyfFA3ph/m4wBiVP1cf
LZDh/Qa+z4xvgSML8NHGhLXJgmvdPGcbKGYRj+LNVanSr3yrVJynIcr/3ckiMgEl
lS5hr3VJVNbX/DgNsqkVoQPudl5p/aiMx/qPY3brxsxyLCk6oF0Z7L4ksdSGIaMt
cMH0eNTuqthWK2D2JWrhPWeY0EcSOx4NtNEqUsCQFZhg+mO1xUKJdnc9x1eaHoZe
XR9lRCjBVXD6iBNy2bscJONoz5MhuHjBqYjSF5jQL/Xfe9qgmLrqdiqqIw4R04c3
g09JlDWRS78a68FXhc5Yo6AmqJD4UNMKH3npFUk2Vk+SD6HwUmpM+hFDM+L2tFi+
7QNyKmWwTfFgyLQOG45Kqhl0i6Ia857UedZX7ezrJ2AoiCUn8oT2NmfJif8/jtL4
wVLdkav7L2H64Xd9ZcWtDIWuLT9L1Fuy9LFFByscRSy1jvSj0ILrNB2Og1YWfWEE
t/OzTlm9jpzkiKQxFGCizzt1ZnnQfrB3BN28vPThw9Dh0DRCexYXWpwY2KhHTQFo
ghSBFh0mAZfCpHdiHM27XGvPUAo6WNP8LaA8tvvWArcU3wqaEjpbsaPw2kY0qMY6
Kds/t/Hi3fC75IN7XWfwxr1c6hxeiBgrR48i+nVPXqlWFoT5svsqquwhxukxifoF
fBuX6STP+RwCa5sDqfICPeLTj1jg0zBjUVB7f0w6FiOLfxQIxnNJ+g==
-----END RSA PRIVATE KEY-----
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































Added modules/pki/test-v1.crt.









































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-----BEGIN CERTIFICATE-----
MIIDOTCCAiECBhJIFZWqAzANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJVUzEQ
MA4GA1UECBMHRmxvcmlkYTEOMAwGA1UEBxMFVGFtcGExDzANBgNVBAoTBlRjbGxp
YjEMMAoGA1UECxMDUlNBMQ8wDQYDVQQDEwZUZXN0Q0EwHhcNMTAwODA5MDc1MjA1
WhcNMjAwODA5MDc1MjA1WjBhMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHRmxvcmlk
YTEOMAwGA1UEBxMFVGFtcGExDzANBgNVBAoTBlRjbGxpYjEMMAoGA1UECxMDUlNB
MREwDwYDVQQDEwhUZXN0Q2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAKM8Foo94fHWhBvSd8w96CUGDIimy/wK4gfsIBPxIbGgrXMgFBSGc05m96XX
8qit7ryZjR+2KqZVss7tpnL1fRXL3uFwSeEh6S48Jq5WDeRaM6yk9vGZ3cF/u9/D
tEay9S0YZzcVmdT9fcaHOUoKrWixAJJl0vCKsObyfLi1uRMQOcYgH7ggltK+J8ZA
OpA3C3FwOKDBHACAMN1opgGJbhun5mjAnGiupzrTDrFyXwMqGk89qpEU3aQFwDFT
+/O1qfXk2M2aY48iQNy8gMQSTEoOh59NZpoX8wQY21lmAh8htUyiz37WygHMFvZk
fk1W24rdEYD7gPFSTmSIj54sA0sCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAesvQ
pYfxZj6KIbZfkWHwhDH0VNi5iPUvaNbVvZrZZ1R1gZAk8RycQN8gn7BaKX/6ciks
geKbvGwy5JvZaKSed6574QVTV+mGAqAxOW+LmURV+TaoWSKAC93DebdsL2NlPDsr
uuxMgb7fn52ni2qAslPo+YzecokIWDeyKvRUCD7Gt3LDdLQPG/jTx6Xnebb7usiF
pfqQWhFUdcfPik0Y3rfJG5bV5HuhKR9LxwI3Hxrt4LlSZIpolMXkwklqeoI0eIpy
kNJW5c2pm3cvQ/AZ3bHXWNBqH9A4Zf3OdizyKFD5lqqM3H2EQRXj0cUzQo2Wqf53
S6W6B4F2B2ZLa/O/Eg==
-----END CERTIFICATE-----

Added modules/pki/test-v3.crt.









































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-----BEGIN CERTIFICATE-----
MIIDPjCCAiagAwIBAgIGEkgVlanAMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNVBAYT
AlVTMRAwDgYDVQQIEwdGbG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UEChMG
VGNsbGliMQwwCgYDVQQLEwNSU0ExDzANBgNVBAMTBlRlc3RDQTAeFw0xMDA4MDkw
NzUxMzZaFw0yMDA4MDkwNzUxMzZaMGExCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdG
bG9yaWRhMQ4wDAYDVQQHEwVUYW1wYTEPMA0GA1UEChMGVGNsbGliMQwwCgYDVQQL
EwNSU0ExETAPBgNVBAMTCFRlc3RDZXJ0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAozwWij3h8daEG9J3zD3oJQYMiKbL/AriB+wgE/EhsaCtcyAUFIZz
Tmb3pdfyqK3uvJmNH7YqplWyzu2mcvV9Fcve4XBJ4SHpLjwmrlYN5FozrKT28Znd
wX+738O0RrL1LRhnNxWZ1P19xoc5SgqtaLEAkmXS8Iqw5vJ8uLW5ExA5xiAfuCCW
0r4nxkA6kDcLcXA4oMEcAIAw3WimAYluG6fmaMCcaK6nOtMOsXJfAyoaTz2qkRTd
pAXAMVP787Wp9eTYzZpjjyJA3LyAxBJMSg6Hn01mmhfzBBjbWWYCHyG1TKLPftbK
AcwW9mR+TVbbit0RgPuA8VJOZIiPniwDSwIDAQABMA0GCSqGSIb3DQEBBQUAA4IB
AQAwEFsEDA0mp4mQmOYbc4RHQVEGN723CtgcEHF7unu43EeO5s/1Yq0F+SdWR14L
qFs6lRXnPjkEpIFlmW5I0Dp8Q1yY18qRPt8Hx6ymxty8QWm9lTwMBzrYUh94JqV+
Y3QHJbVrgLpoKRpsVOpsdM5qQ4efvQwO0sOwI5AajvkyU1dC8TsxAzyJMQfK+WQs
A0lSpqM0Htrl1xRhDZwEC8BE3+7Iv9MSW/RvK6FaaOFkyjvfWfOLgRfRtMQ8+hdV
8RaSEqqkSsglGzmzSbuTHopBkle1Kegq2Hd/1lpi9FoXHrGxjwGWVw5KOwWOCa0O
yF4KWWijMOWbMrIqLq5p4aOk
-----END CERTIFICATE-----

Added modules/pki/test.csr.



































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-----BEGIN CERTIFICATE REQUEST-----
MIICpjCCAY4CAQAwYTELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0Zsb3JpZGExDjAM
BgNVBAcTBVRhbXBhMQ8wDQYDVQQKEwZUY2xsaWIxDDAKBgNVBAsTA1JTQTERMA8G
A1UEAxMIVGVzdENlcnQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCj
PBaKPeHx1oQb0nfMPeglBgyIpsv8CuIH7CAT8SGxoK1zIBQUhnNOZvel1/Kore68
mY0ftiqmVbLO7aZy9X0Vy97hcEnhIekuPCauVg3kWjOspPbxmd3Bf7vfw7RGsvUt
GGc3FZnU/X3GhzlKCq1osQCSZdLwirDm8ny4tbkTEDnGIB+4IJbSvifGQDqQNwtx
cDigwRwAgDDdaKYBiW4bp+ZowJxorqc60w6xcl8DKhpPPaqRFN2kBcAxU/vztan1
5NjNmmOPIkDcvIDEEkxKDoefTWaaF/MEGNtZZgIfIbVMos9+1soBzBb2ZH5NVtuK
3RGA+4DxUk5kiI+eLANLAgMBAAGgADANBgkqhkiG9w0BAQUFAAOCAQEAff0WNTPX
M6rdFGOXBxTsC7NUGcoquuM6QsceadMbBVRtRUUbaUsusXdxDWhdylqHM3xPNx0L
4Ex0FeL9icD/8xvJmCXzBeNt3uvThTvIwHYqnOCSlhx9InUUx2l6U0rAwZ+CIuMi
7lG2+Z5qVD035bAZ7LT/4s4fjKSL4cTZQOdCcoFtoptj9+L8EItwwYDzffJWdG8s
OUtMBn+Zh45k2UtLKu38jBNtVpNFAEJLlr/Arj6Jj3yTmEFrocxkwK6IPbOHQTu3
tyJ5CkDpUqkxYZ0D4wfr8tFEru0jQNl5bSDt9QQvg1Kj6+OC9aaRvxwnmc6REfky
8sCv80Pn5dNCGg==
-----END CERTIFICATE REQUEST-----

Added modules/pki/test.key.aes.





























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,A63D2250AEC17BBA948C0711A7477A88

DcIqtKV3RzcfzOk0K4WwRU4dK4373bsoek/trIvHYbs6sQlU0Ydk8ddDYyWlt0vR
MdEhEi4kTbtWhczSa9kgjQo59fZ8br8iHaSkUDPqKZUCy5qAlLsfRnCiA4JnZaDy
BD8ROFNTdb1MTnGPqrY2+9nv/BAPNlqr+95zcAim7vBJxO0idmUKCzVFAEHn+akD
UPX/Rkku7tIprsA5ePsQ9Z7B8qJ3LqhxKauZE+qV3hcX8/E7fndpYxQ5I3/6W3Wj
hkfH4cTwNC9H0jcaoDDlh0O1xMfq2YQxyq20Cfse8NO11Is8UMbXWBZ90uhk6lnk
xsVzOB2A7WbiiNEfbLBYgsUqy9ffGKhJWXoUUzl6Ze9lolD0mJjinKwAMEszwWNg
qSwJQi+omgv0+0yP2gnMkqwsBzPFrEt/Iw0/nMKNNn8RXK2C3itD61tX/T/4p5Gj
VvISFp+KjlgASBMaSNCE/FsfAsz7OxrkvrOJcEAZ1sWjfBUXSq20ESFGk74S5AUj
xjrSeurl7pyLjfEgx2YR6ybF3SSnVst3wQ9BPLnG8439VKONixSukDvk/XJuY4UO
dLuSm7aTcLy43jLosxLKHJ6jfwJEOhKMFGXkyb1h7UZnU3rydvgJF7Hw+HGsnuH6
0cd4gKyMoTclxRn8oULlQafuOYwTO0xOV5cOjtKdnaTfasd4xrYuWGuW93INvyTh
6lYhVgcjo+F7TDm1bqgAH354Cb3FqERx4VmeJm20YfpPilDuM1ygkh5tObM2ffqr
vJ9T66RsjhqpMv8trjj4F8oZK614D1MVKv7/2A02GEx8eoKiv1IsIoLe4Ihe5Ido
oswOXxdtkJj4kd/feKPOFnCajOdWGR88IMUldMIsTetxAlaNrZkTz0OAKZ0pTRgj
BsiXVwT6OX3GF7cL41Q6FXbLZGrLnGGnOjRFpBK+0JeQ8hQFortqiLBXUaNK//gH
pzMwApPRBfX5VxU4bVxai5WoBz63MAdOJaHKTBfNF8ebMsUC6Z+ue3H/rQmTjscz
zxelmeKHGbFCUyW/bmGh3MDkriXUNVgqFQTqDQIbsOVzwHAQ3m6N7zREcep+/uCk
2VlJY2HRuAsf8U+sATGveYkCcq+1nr1ZPcbeLHom9NL8cDXvWRwj84Y3Fv0BPuod
PRBLZWMe8bOICV7cxsyRPfNf9ov+QyLc7LeMdmy9gYZABnRUZRKAOcNGHDIVULeT
L9+QiyzeW6AK5BgkNrTpHC6fWo6jqfDjZJrhJvQbzvykJwiMJvahuRYlejLVx1HA
uFANAhgM9APAjnzpyvbS5EcB+Q+9TrF8d+MufR3ijvMT2evIsUthwprS7CkJLCXl
WeGw/YI58xWwk1l3LZ8bT04Jy1cS+8CVnmZXtCq0yRVsIVbsMlN4WW1b6AxMTGlC
VB8ne9lw3zSqraDu/8he0TQi0JzYs86CwjDkMTIaIrXn+6W7tlcSUpnrQeAfgx+d
w8qklOraCLAcXWhFw2kbc7pzvKvVzRr2R0GtZaGYInEFUP9e7fJT4R9K1cBi9DGm
gmtJUWHnxI9QMHDslST9NGkrulBisoJ0kuVNUmIX0x2zii7w+Kk5a87lUB06pAmV
-----END RSA PRIVATE KEY-----

Added modules/pki/test.key.des.





























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,2AD65AF586C2E7FF

0pAOYQCqE9NPUJSrK4gu5P9H1yydKcLvuhIIsh5S1RtlEqzz1eythmGRTD/S6QnS
c2zmmkaHndGKB3S55BTw0UnGP3XROdl1VtCqlf2mvp7MY3E9xF+ZKgw6L2yUeFW5
ZlKEyglWIB5J4yKgX8yAe6nqdhNEXG6JolCQH45x5uRiMTtxuGgivmvFfTV3TjaO
GXUMcbNeslJ4PZwxmUFR5YD4QSxwHe4Ur3dz2CMW6ea+TGbWNyqoEEEz81BKeAFF
cAxAtnyWpo9NmRc2TmGRstXrfzBW/lgNrkLgqoNHkfXT5p+kkG4mIInIKWpeKsJB
wByDFIB5+Sr3VkZJYOMJQcYkVWc2Y+o1l8/cqk9cuLYMO81OQw3QEwy0WSkXpVfP
CIbIQOyp3Hi02drlcIjv+d6OYWDYwMB1DiPQSYGO16jFORtC0Mrmt5XiUE4kWTap
3K4MVphvkJaSjUCzbLVzChhXWICwwGPG/x8F1Fkre/xevwdFq6qZB2HfZVqjtWrn
E6nVWjWcaavIxJEJPuCfhU+gKsV/nyxMFqBpck8YRxUE1yYdG9sSHaiL/z8vom1r
09VorVpa1v0AI+05XgJPZHPmjbadNn7oA3knqbICv6Jh0URXlW+TtEWGde+YDz9x
HC6TexiZU2tQcZMtcR999yI9UYXekDS6jXLjfpEZuM971IbUefjEGnBhBpoxW4Zw
MDzmWDJxyT3bz4ZURANm1nE3i/9R6sDwv7egu62wY6wo8KmEA126eX4CE1TAeRyF
7DZCsmMWHQJej8N5kmTpREtBKZhCrmRYOE6vTELZWfsLN00yTpUFzzrM5gfgYDt5
Ry8t9OQrr7T3TZDu20DMrNRL/3/t3Ap133zgM6c/jD955PyfFA3ph/m4wBiVP1cf
LZDh/Qa+z4xvgSML8NHGhLXJgmvdPGcbKGYRj+LNVanSr3yrVJynIcr/3ckiMgEl
lS5hr3VJVNbX/DgNsqkVoQPudl5p/aiMx/qPY3brxsxyLCk6oF0Z7L4ksdSGIaMt
cMH0eNTuqthWK2D2JWrhPWeY0EcSOx4NtNEqUsCQFZhg+mO1xUKJdnc9x1eaHoZe
XR9lRCjBVXD6iBNy2bscJONoz5MhuHjBqYjSF5jQL/Xfe9qgmLrqdiqqIw4R04c3
g09JlDWRS78a68FXhc5Yo6AmqJD4UNMKH3npFUk2Vk+SD6HwUmpM+hFDM+L2tFi+
7QNyKmWwTfFgyLQOG45Kqhl0i6Ia857UedZX7ezrJ2AoiCUn8oT2NmfJif8/jtL4
wVLdkav7L2H64Xd9ZcWtDIWuLT9L1Fuy9LFFByscRSy1jvSj0ILrNB2Og1YWfWEE
t/OzTlm9jpzkiKQxFGCizzt1ZnnQfrB3BN28vPThw9Dh0DRCexYXWpwY2KhHTQFo
ghSBFh0mAZfCpHdiHM27XGvPUAo6WNP8LaA8tvvWArcU3wqaEjpbsaPw2kY0qMY6
Kds/t/Hi3fC75IN7XWfwxr1c6hxeiBgrR48i+nVPXqlWFoT5svsqquwhxukxifoF
fBuX6STP+RwCa5sDqfICPeLTj1jg0zBjUVB7f0w6FiOLfxQIxnNJ+g==
-----END RSA PRIVATE KEY-----

Changes to modules/pluginmgr/pluginmgr.man.

419
420
421
422
423
424
425
426
427
Its purpose is give a user of the plugin management the ability to
define commands, packages, etc. a chosen plugin may need while being
loaded.

[list_end]

[vset CATEGORY pluginmgr]
[include ../common-text/feedback.inc]
[manpage_end]







|

419
420
421
422
423
424
425
426
427
Its purpose is give a user of the plugin management the ability to
define commands, packages, etc. a chosen plugin may need while being
loaded.

[list_end]

[vset CATEGORY pluginmgr]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/png/ChangeLog.

1
2
3
4
5
6
7
8
9
10
11
2018-12-12  Harald Oehlmann <oehhar@users.sourceforge.net>

	* png.tcl: add function getPixelDimension to   get physical pixel size

2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2012-07-09  Aaron Faupell <afaupell@users.sourceforge.net>
<
<
<
<











1
2
3
4
5
6
7




2013-02-01  Andreas Kupries  <andreas_kupries@users.sourceforge.net>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2012-07-09  Aaron Faupell <afaupell@users.sourceforge.net>

Changes to modules/png/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded png 0.3 [list source [file join $dir png.tcl]]

|
1
2
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded png 0.2 [list source [file join $dir png.tcl]]

Changes to modules/png/png.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[vset VERSION 0.3]
[manpage_begin png n [vset VERSION]]
[keywords comment]
[keywords image]
[keywords png]
[keywords timestamp]
[copyright {2004, Code: Aaron Faupell <afaupell@users.sourceforge.net>}]
[copyright {2004, Doc:  Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Image manipulation}]
[titledesc {PNG querying and manipulation of meta data}]
[category  {File formats}]
[require Tcl 8.2]
[require crc32]
[require png [opt [vset VERSION]]]
[description]
[para]

This package provides commands to query and modify PNG images. PNG
stands for [term {Portable Network Graphics}] and is specified at
[uri http://www.libpng.org/pub/png/spec/1.2].

<
|











|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

[manpage_begin png n 0.1.2]
[keywords comment]
[keywords image]
[keywords png]
[keywords timestamp]
[copyright {2004, Code: Aaron Faupell <afaupell@users.sourceforge.net>}]
[copyright {2004, Doc:  Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Image manipulation}]
[titledesc {PNG querying and manipulation of meta data}]
[category  {File formats}]
[require Tcl 8.2]
[require crc32]
[require png [opt 0.1.2]]
[description]
[para]

This package provides commands to query and modify PNG images. PNG
stands for [term {Portable Network Graphics}] and is specified at
[uri http://www.libpng.org/pub/png/spec/1.2].

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
Adds a unicode (international) comment to the PNG image in [arg file],
just before the first data chunk. Will throw an error if no data chunk
is found. [arg keyword] has to be less than 80 characters long to
conform to the PNG specification. [arg keyword2] is the translated
[arg keyword], in the language specified by the language identifier
[arg lang].

[call [cmd ::png::getPixelDimension] [arg file]]

Returns a dictionary with keys [const ppux], [const ppuy] and
[const unit] if the information is present.  Otherwise, it returns the empty
string.

[para] The values of [const ppux] and [const ppuy] return the pixel
per unit value in X or Y direction.

[para] The allowed values for key [const unit] are [const meter] and
[const unknown]. In the case of meter, the dpi value can be calculated
by multiplying with the conversion factor [const 0.0254].

[call [cmd ::png::image] [arg file]]

Given a PNG file returns the image in the list of scanlines format used by Tk_GetColor.

[call [cmd ::png::write] [arg file] [arg data]]

Takes a list of scanlines in the Tk_GetColor format and writes the represented image
to [arg file].

[list_end]

[vset CATEGORY png]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<
<
<
<
<
<
<
<
<
<












|

121
122
123
124
125
126
127













128
129
130
131
132
133
134
135
136
137
138
139
140
141
Adds a unicode (international) comment to the PNG image in [arg file],
just before the first data chunk. Will throw an error if no data chunk
is found. [arg keyword] has to be less than 80 characters long to
conform to the PNG specification. [arg keyword2] is the translated
[arg keyword], in the language specified by the language identifier
[arg lang].














[call [cmd ::png::image] [arg file]]

Given a PNG file returns the image in the list of scanlines format used by Tk_GetColor.

[call [cmd ::png::write] [arg file] [arg data]]

Takes a list of scanlines in the Tk_GetColor format and writes the represented image
to [arg file].

[list_end]

[vset CATEGORY png]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/png/png.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# png.tcl --
#
#       Querying and modifying PNG image files.
#
# Copyright (c) 2004-2012 Aaron Faupell <afaupell@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: png.tcl,v 1.11 2012/07/09 16:35:04 afaupell Exp $

package provide png 0.3

namespace eval ::png {}

proc ::png::_openPNG {file {mode r}} {
    set fh [open $file $mode]
    fconfigure $fh -encoding binary -translation binary -eofchar {}
    if {[read $fh 8] != "\x89PNG\r\n\x1a\n"} { close $fh; return -code error "not a png file" }











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# png.tcl --
#
#       Querying and modifying PNG image files.
#
# Copyright (c) 2004-2012 Aaron Faupell <afaupell@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: png.tcl,v 1.11 2012/07/09 16:35:04 afaupell Exp $

package provide png 0.2

namespace eval ::png {}

proc ::png::_openPNG {file {mode r}} {
    set fh [open $file $mode]
    fconfigure $fh -encoding binary -translation binary -eofchar {}
    if {[read $fh 8] != "\x89PNG\r\n\x1a\n"} { close $fh; return -code error "not a png file" }
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
        }
        seek $fh [expr {$len + 4}] current
    }
    close $fh
    return -code error "no data chunk found"
}

proc ::png::getPixelDimension {file} {
    set fh [_openPNG $file]

    while {[set r [read $fh 8]] != ""} {
        binary scan $r Ia4 len type
        if {$type == "pHYs"} {
            set r [read $fh [expr {$len + 4}]]
            binary scan $r IIc ppux ppuy unit
            close $fh
            # mask out sign bit, from tcl 8.5, one may use u specifier
            set res [list ppux [expr {$ppux & 0xFFFFFFFF}]\
                     ppuy [expr {$ppuy & 0xFFFFFFFF}]\
                    unit]
            if {$unit == 1} {lappend res meter} else {lappend res unknown}
            return $res
        }
        seek $fh [expr {$len + 4}] current
    }
    close $fh
    return
}

proc ::png::image {file} {
    set fh [_openPNG $file]
    set chunks [_chunks $fh]
    set cdata {}

    set h [lsearch -exact -index 0 -inline $chunks IHDR]
    seek $fh [lindex $h 1] start







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







206
207
208
209
210
211
212






















213
214
215
216
217
218
219
        }
        seek $fh [expr {$len + 4}] current
    }
    close $fh
    return -code error "no data chunk found"
}























proc ::png::image {file} {
    set fh [_openPNG $file]
    set chunks [_chunks $fh]
    set cdata {}

    set h [lsearch -exact -index 0 -inline $chunks IHDR]
    seek $fh [lindex $h 1] start

Changes to modules/png/png.test.

1
2
3
4


5
6
7
8
9
10
11
# -*- tcl -*-
# png.test:  tests for png decoding and manipulation.
#
# Copyright (c) 2004 by Andreas Kupries <andreas_kupries@users.sourceforge.net>



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]





>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
# png.test:  tests for png decoding and manipulation.
#
# Copyright (c) 2004 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# RCS: @(#) $Id: png.test,v 1.10 2007/04/30 22:47:14 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
testing {
    useLocal png.tcl png
}

# -------------------------------------------------------------------------
# Validation

foreach f [TestFilesGlob test-assets/*.png] {
    set root [file rootname [file tail $f]]

    # All files have a valid signature, except for two.

    test png-ispng-$root {is png} {
	::png::isPNG $f
    } [expr {







|







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
testing {
    useLocal png.tcl png
}

# -------------------------------------------------------------------------
# Validation

foreach f [TestFilesGlob testimages/*.png] {
    set root [file rootname [file tail $f]]

    # All files have a valid signature, except for two.

    test png-ispng-$root {is png} {
	::png::isPNG $f
    } [expr {
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
    test png-validate-$root {full validation} {
	::png::validate $f
    } OK ;# {}
}

# Validation II, the bad files ...

foreach f [TestFilesGlob test-assets/x*.png] {
    set root [file rootname [file tail $f]]

    test png-validate-$root {full validation} {
	::png::validate $f
    } [expr {[string match x00n0g01 $root] ? "NODATA" : "SIG"}] ;# {}
}








|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    test png-validate-$root {full validation} {
	::png::validate $f
    } OK ;# {}
}

# Validation II, the bad files ...

foreach f [TestFilesGlob testimages/x*.png] {
    set root [file rootname [file tail $f]]

    test png-validate-$root {full validation} {
	::png::validate $f
    } [expr {[string match x00n0g01 $root] ? "NODATA" : "SIG"}] ;# {}
}

211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
    tp1n3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z00n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z03n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z06n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z09n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
}

foreach f [TestFilesGlob test-assets/*.png] {
    set root [file rootname [file tail $f]]

    # Files beginning with x are invalid, and thus not usable in these
    # tests.

    if {[string match x* $root]} continue








|







213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
    tp1n3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z00n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z03n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z06n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z09n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
}

foreach f [TestFilesGlob testimages/*.png] {
    set root [file rootname [file tail $f]]

    # Files beginning with x are invalid, and thus not usable in these
    # tests.

    if {[string match x* $root]} continue

233
234
235
236
237
238
239
240
241
242
243
244
245
246
247

array set exptime {
    cm0n0g04 946730096
    cm7n0g04 0
    cm9n0g04 946684799
}

foreach f [TestFilesGlob test-assets/cm*.png] {
    set root [file rootname [file tail $f]]

    #puts [clock format $exptime($root) -gmt 1]

    test png-gettimestamp-$root {retrieve timestamp} {
	::png::getTimestamp $f
    } $exptime($root) ; # {}







|







235
236
237
238
239
240
241
242
243
244
245
246
247
248
249

array set exptime {
    cm0n0g04 946730096
    cm7n0g04 0
    cm9n0g04 946684799
}

foreach f [TestFilesGlob testimages/cm*.png] {
    set root [file rootname [file tail $f]]

    #puts [clock format $exptime($root) -gmt 1]

    test png-gettimestamp-$root {retrieve timestamp} {
	::png::getTimestamp $f
    } $exptime($root) ; # {}
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
to the spec are present.}} {Software {Created on a NeXTstation color using "pnmtopng".}} {Disclaimer Freeware.}}   
    ctzn0g04 {{Title PngSuite} {Author {Willem A.J. van Schaik
(willem@schaik.com)}}}
}

# - Retrieval

foreach f [TestFilesGlob test-assets/*.png] {
    set root [file rootname [file tail $f]]

    # All files have a valid signature, except for two. These we ignore.
    if {[string equal $root xcrn0g04]} continue
    if {[string equal $root xlfn0g04]} continue
    # All files are fully valid, except for all beginning with an
    # 'x'. We ignore them as well.







|







261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
to the spec are present.}} {Software {Created on a NeXTstation color using "pnmtopng".}} {Disclaimer Freeware.}}   
    ctzn0g04 {{Title PngSuite} {Author {Willem A.J. van Schaik
(willem@schaik.com)}}}
}

# - Retrieval

foreach f [TestFilesGlob testimages/*.png] {
    set root [file rootname [file tail $f]]

    # All files have a valid signature, except for two. These we ignore.
    if {[string equal $root xcrn0g04]} continue
    if {[string equal $root xlfn0g04]} continue
    # All files are fully valid, except for all beginning with an
    # 'x'. We ignore them as well.
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# - Removal

# Note: For a bad removeComments tests fail only on platforms where
# the system encoding is not ASCII like, or the EOL is not a plain
# LF. Windows for example, or asian systems.

foreach root [array names comex] {
    set f [asset ${root}.png]

    test png-removecomment-$root {remove comments} {
	set copy [makeFile {} pngrc.$root]
	file copy -force $f $copy

	::png::removeComments $copy
	set res [list [::png::validate $copy] [::png::getComments $copy]]
	removeFile pngrc.$root
	set res
    } {OK {}}
}

# -------------------------------------------------------------------------
# PhysicalDimensions

test png-physical-dimensions-missing {Test for empty list if no physical dimensions present} {
    ::png::getPixelDimension [asset physicaldimensions/basi0g01.png]
} {}

test png-physical-dimensions-present {Test to extract physical dimensions} {
    ::png::getPixelDimension [asset physicaldimensions/basi0g01_300dpi.png]
} {ppux 11811 ppuy 11811 unit meter}

# -------------------------------------------------------------------------
testsuiteCleanup







|













<
<
<
<
<
<
<
<
<
<
<

285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305











306
# - Removal

# Note: For a bad removeComments tests fail only on platforms where
# the system encoding is not ASCII like, or the EOL is not a plain
# LF. Windows for example, or asian systems.

foreach root [array names comex] {
    set f [localPath testimages/${root}.png]

    test png-removecomment-$root {remove comments} {
	set copy [makeFile {} pngrc.$root]
	file copy -force $f $copy

	::png::removeComments $copy
	set res [list [::png::validate $copy] [::png::getComments $copy]]
	removeFile pngrc.$root
	set res
    } {OK {}}
}

# -------------------------------------------------------------------------











testsuiteCleanup

Deleted modules/png/test-assets/basi0g01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi0g02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi0g04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi0g08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi3p01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi4a08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi4a16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi6a08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basi6a16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn0g01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn0g02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn0g04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn0g08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn3p01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn4a08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn4a16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn6a08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/basn6a16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/bgai4a08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/bgai4a16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/bgan6a08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/bgan6a16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/bgbn4a08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/bggn4a16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/bgwn6a08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/bgyn6a16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ccwn2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ccwn3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cdfn2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cdhn2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cdsn2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cdun2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ch1n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ch2n3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cm0n0g04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cm7n0g04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cm9n0g04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cs3n2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cs3n3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cs5n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cs5n3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cs8n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/cs8n3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ct0n0g04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ct1n0g04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ctzn0g04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/f00n0g08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/f00n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/f01n0g08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/f01n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/f02n0g08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/f02n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/f03n0g08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/f03n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/f04n0g08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/f04n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g03n0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g03n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g03n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g04n0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g04n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g04n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g05n0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g05n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g05n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g07n0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g07n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g07n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g10n0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g10n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g10n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g25n0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g25n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/g25n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/oi1n0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/oi1n2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/oi2n0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/oi2n2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/oi4n0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/oi4n2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/oi9n0g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/oi9n2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/physicaldimensions/basi0g01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/physicaldimensions/basi0g01_300dpi.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/pngsuite.doc.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
        PNGSUITE
----------------

        testset for PNG-(de)coders
        created by Willem van Schaik
------------------------------------

This is a collection of graphics images created to test the png applications
like viewers, converters and editors. All (as far as that is possible)
formats supported by the PNG standard are represented.


1.      INTRODUCTION
--------------------

1.1     PNG capabilities
------------------------

Supported color-types are:

        -   grayscale
        -   grayscale + alpha-channel
        -   color palettes
        -   rgb
        -   rgb + alpha-channel

Allowed bitdepths are depending on the color-type, but are in the range
of 1-bit (grayscale, which is b&w) upto 16-bits.

Special features are:

        -   interlacing (Adam-7)
        -   gamma-support
        -   transparency (a poor-man's alpha solution)


1.2     File naming
-------------------

Where possible, the testfiles are 32x32 bits icons. This results in a still
reasonable size of the suite even with a large number of tests. The name
of each test-file reflects thetype in the following way:

        g04i2c08.png
        || |||+---- bit-depth
        || ||+----- color-type (descriptive)
        || |+------ color-type (numerical)
        || +------- interlaced or non-interlaced
        |+--------- parameter of test (in this case gamma-value)
        +---------- test feature (in this case gamma)


1.3     PNG formats
-------------------

color-type:
        0g          -   grayscale
        2c          -   rgb color
        3p          -   paletted
        4a          -   grayscale + alpha channel
        6a          -   rgb color + alpha channel

bit-depth:
        01          -   with color-type 0, 3
        02          -   with color-type 0, 3
        04          -   with color-type 0, 3
        08          -   with color-type 0, 2, 3, 4, 6
        16          -   with color-type 0, 2, 4, 6

interlacing:
        n           -   non-interlaced
        i           -   interlaced


2.      THE TESTS
-----------------

2.1     Sizes
-------------

These tests are there to check if your software handles pictures well, with
picture sizes that are not a multiple of 8. This is particularly important
with Adam-7 type interlacing. In the same way these tests check if pictures
size 1x1 and similar are ok.

        s01         -   1x1 pixel picture
        s02         -   2x2 pixel picture
        s03         -   3x3 pixel picture
        s04         -   4x4 pixel picture
        s05         -   5x5 pixel picture
        s06         -   6x6 pixel picture
        s07         -   7x7 pixel picture
        s08         -   8x8 pixel picture
        s09         -   9x9 pixel picture
        s32         -   32x32 pixel picture
        s33         -   33x33 pixel picture
        s34         -   34x34 pixel picture
        s35         -   35x35 pixel picture
        s36         -   36x36 pixel picture
        s37         -   37x37 pixel picture
        s38         -   38x38 pixel picture
        s39         -   39x39 pixel picture
        s40         -   40x40 pixel picture


2.2     Background
------------------

When the PNG file contains a background chunck, this should be used for
pictures with alpha-channel or pictures with a transparency chunck. For
pictures without this background-chunk, but with alpha, this testset
assumes a black background.

For the images in this test, the left-side should be 100% the background
color, where moving to the right the color should gradually become the
image pattern.

        bga         -   alpha + no background
        bgw         -   alpha + white background
        bgg         -   alpha + gray background
        bgb         -   alpha + black background
        bgy         -   alpha + yellow background


2.3     Transparency
--------------------

Transparency should be used together with a background chunk. To test the
combination of the two the latter 4 tests are there. How to handle pictures
with transparancy, but without a background, opinions can differ. Here we
use black, but especially in the case of paletted images, the normal color
would maybe even be better.

        tp0         -   not transparent for reference
        tp1         -   transparent, but no background chunk
        tbw         -   transparent + white background
        tbg         -   transparent + gray background
        tbb         -   transparent + black background
        tby         -   transparent + yellow background


2.4     Gamma
-------------

To test if your viewer handles gamma-correction, 6 testfiles are available.
They contain corrected color-ramps and a corresponding gamma-chunk with the
file-gamma value. These are created in such a way that when the viewer does
the gamma correction right, all 6 should be displayed identical.

If they are different, probably the gamma correction is omitted. In that
case, have a look at the two right coloumns in the 6 pictures. The image
where those two look the same (when looked from far) reflects the gamma of
your system. However, because of the limited size of the image, you should
do more elaborate tests to determine your display gamma.

        g03         -   file-gamma = 0.35, for display with gamma = 2.8
        g04         -   file-gamma = 0.45, for display with gamma = 2.2 (PC)
        g05         -   file-gamma = 0.55, for display with gamma = 1.8 (Mac)
        g07         -   file-gamma = 0.70, for display with gamma = 1.4
        g10         -   file-gamma = 1.00, for display with gamma = 1.0 (NeXT)
        g25         -   file-gamma = 2.50, for display with gamma = 0.4


2.5     Filtering
-----------------

PNG uses file-filtering, for optimal compression. Normally the type is of
filtering is adjusted to the contents of the picture, but here each file
has the same picture, with a different filtering.

        f0          -   no filtering
        f1          -   sub filtering
        f2          -   up filtering
        f3          -   average filtering
        f4          -   paeth filtering


2.6     Additional palettes
---------------------------

Besides the normal use of paletted images, palette chunks can in combination
with true-color (and other) images also be used to select color lookup-tables
when the video system is of limited capabilities. The suggested palette chunk
is specially created for this purpose.

        pp          -   normal palette chunk
        ps          -   suggested palette chunk


2.7     Ancillary chunks (under construction)
------------------------

To test the correct decoding of ancillary chunks, these test-files contain
one or more examples of these chunkcs. Depending on the type of chunk, a
number of typical values are selected to test. Unluckily, the testset can
not contain all combinations, because that would be an endless set.

The significant bits are used in files with the next higher bit-depth. They
indicate howmany bits are valid.

        cs3         -   3 significant bits
        cs5         -   5 significant bits
        cs8         -   8 significant bits (reference)
        cs3         -   13 significant bits

For the physical pixel dimensions, the result of each decoding should be
a sqare picture. The first (cdf) image is an example of flat (horizontal)
pixels, where the pHYS chunk (x is 1 per unit, y = 4 per unit) must take
care of the correction. The second is just the other way round. The last
example uses the unit specifier, for 1000 pixels per meter. This should
result in a picture of 3.2 cm square.

        cdf         -   physical pixel dimensions, 8x32 flat pixels
        cdh         -   physical pixel dimensions, 32x8 high pixels
        cds         -   physical pixel dimensions, 8x8 square pixels
        cdu         -   physical pixel dimensions, with unit-specifier

        ccw         -   primary chromaticities and white point

        ch1         -   histogram 15 colors
        ch2         -   histogram 256 colors

        cm7         -   modification time, 01-jan-1970
        cm9         -   modification time, 31-dec-1999
        cm0         -   modification time, 01-jan-2000

In the textual chunk, a number of the standard, and some non-standard
text items are included.

        ct0         -   no textual data
        ct1         -   with textual data
        ctz         -   with compressed textual data


2.8     Chunk ordering (still under construction)
----------------------

These testfiles will test the obligatory ordering relations between various
chunk types (not yet) as well as the number of data chunks used for the image.

        oi1         -   mother image with 1 idat-chunk
        oi2         -   image with 2 idat-chunks
        oi4         -   image with 4 unequal sized idat-chunks
        oi9         -   all idat-chunks of length one


2.9     Compression level
-------------------------

Here you will find a set of images compressed by zlib, ranging from level 0 
for no compression at maximum speed upto level 9 for maximum compression.

        z00         -   zlib compression level 0 - none
        z03         -   zlib compression level 3
        z06         -   zlib compression level 6 - default
        z09         -   zlib compression level 9 - maximum


2.10     Corrupted files (under construction)
-----------------------

All these files are illegal. When decoding they should generate appropriate
error-messages.

        x00         -   empty IDAT chunk
        xcr         -   added cr bytes
        xlf         -   added lf bytes
        xc0         -   color type 0
        xc9         -   color type 9
        xd0         -   bit-depth 0
        xd3         -   bit-depth 3
        xd9         -   bit-depth 99
        xcs         -   incorrect IDAT checksum


3.      TEST FILES
------------------

For each of the tests listed above, one or more test-files are created. A
selection is made (for each test) for the color-type and bitdepth to be used
for the tests. Further for a number of tests, both a non-interlaced as well
as an interlaced version is available.


3.1     Basic format test files (non-interlaced)
------------------------------------------------

        basn0g01    -   black & white
        basn0g02    -   2 bit (4 level) grayscale
        basn0g04    -   4 bit (16 level) grayscale
        basn0g08    -   8 bit (256 level) grayscale
        basn0g16    -   16 bit (64k level) grayscale
        basn2c08    -   3x8 bits rgb color
        basn2c16    -   3x16 bits rgb color
        basn3p01    -   1 bit (2 color) paletted
        basn3p02    -   2 bit (4 color) paletted
        basn3p04    -   4 bit (16 color) paletted
        basn3p08    -   8 bit (256 color) paletted
        basn4a08    -   8 bit grayscale + 8 bit alpha-channel
        basn4a16    -   16 bit grayscale + 16 bit alpha-channel
        basn6a08    -   3x8 bits rgb color + 8 bit alpha-channel
        basn6a16    -   3x16 bits rgb color + 16 bit alpha-channel


3.2     Basic format test files (Adam-7 interlaced)
---------------------------------------------------

        basi0g01    -   black & white
        basi0g02    -   2 bit (4 level) grayscale
        basi0g04    -   4 bit (16 level) grayscale
        basi0g08    -   8 bit (256 level) grayscale
        basi0g16    -   16 bit (64k level) grayscale
        basi2c08    -   3x8 bits rgb color
        basi2c16    -   3x16 bits rgb color
        basi3p01    -   1 bit (2 color) paletted
        basi3p02    -   2 bit (4 color) paletted
        basi3p04    -   4 bit (16 color) paletted
        basi3p08    -   8 bit (256 color) paletted
        basi4a08    -   8 bit grayscale + 8 bit alpha-channel
        basi4a16    -   16 bit grayscale + 16 bit alpha-channel
        basi6a08    -   3x8 bits rgb color + 8 bit alpha-channel
        basi6a16    -   3x16 bits rgb color + 16 bit alpha-channel


3.3     Sizes test files
-----------------------

        s01n3p01    -   1x1 paletted file, no interlacing
        s02n3p01    -   2x2 paletted file, no interlacing
        s03n3p01    -   3x3 paletted file, no interlacing
        s04n3p01    -   4x4 paletted file, no interlacing
        s05n3p02    -   5x5 paletted file, no interlacing
        s06n3p02    -   6x6 paletted file, no interlacing
        s07n3p02    -   7x7 paletted file, no interlacing
        s08n3p02    -   8x8 paletted file, no interlacing
        s09n3p02    -   9x9 paletted file, no interlacing
        s32n3p04    -   32x32 paletted file, no interlacing
        s33n3p04    -   33x33 paletted file, no interlacing
        s34n3p04    -   34x34 paletted file, no interlacing
        s35n3p04    -   35x35 paletted file, no interlacing
        s36n3p04    -   36x36 paletted file, no interlacing
        s37n3p04    -   37x37 paletted file, no interlacing
        s38n3p04    -   38x38 paletted file, no interlacing
        s39n3p04    -   39x39 paletted file, no interlacing
        s40n3p04    -   40x40 paletted file, no interlacing

        s01i3p01    -   1x1 paletted file, interlaced
        s02i3p01    -   2x2 paletted file, interlaced
        s03i3p01    -   3x3 paletted file, interlaced
        s04i3p01    -   4x4 paletted file, interlaced
        s05i3p02    -   5x5 paletted file, interlaced
        s06i3p02    -   6x6 paletted file, interlaced
        s07i3p02    -   7x7 paletted file, interlaced
        s08i3p02    -   8x8 paletted file, interlaced
        s09i3p02    -   9x9 paletted file, interlaced
        s32i3p04    -   32x32 paletted file, interlaced
        s33i3p04    -   33x33 paletted file, interlaced
        s34i3p04    -   34x34 paletted file, interlaced
        s35i3p04    -   35x35 paletted file, interlaced
        s36i3p04    -   36x36 paletted file, interlaced
        s37i3p04    -   37x37 paletted file, interlaced
        s38i3p04    -   38x38 paletted file, interlaced
        s39i3p04    -   39x39 paletted file, interlaced
        s40i3p04    -   40x40 paletted file, interlaced


3.4     Background test files (with alpha)
------------------------------------------

        bgai4a08    -   8 bit grayscale, alpha, no background chunk, interlaced
        bgai4a16    -   16 bit grayscale, alpha, no background chunk, interlaced
        bgan6a08    -   3x8 bits rgb color, alpha, no background chunk
        bgan6a16    -   3x16 bits rgb color, alpha, no background chunk

        bgbn4a08    -   8 bit grayscale, alpha, black background chunk
        bggn4a16    -   16 bit grayscale, alpha, gray background chunk
        bgwn6a08    -   3x8 bits rgb color, alpha, white background chunk
        bgyn6a16    -   3x16 bits rgb color, alpha, yellow background chunk


3.5     Transparency (and background) test files
------------------------------------------------

        tp0n1g08    -   not transparent for reference (logo on gray)
        tbbn1g04    -   transparent, black background chunk
        tbwn1g16    -   transparent, white background chunk
        tp0n2c08    -   not transparent for reference (logo on gray)
        tbrn2c08    -   transparent, red background chunk
        tbgn2c16    -   transparent, green background chunk
        tbbn2c16    -   transparent, blue background chunk
        tp0n3p08    -   not transparent for reference (logo on gray)
        tp1n3p08    -   transparent, but no background chunk
        tbbn3p08    -   transparent, black background chunk
        tbgn3p08    -   transparent, light-gray background chunk
        tbwn3p08    -   transparent, white background chunk
        tbyn3p08    -   transparent, yellow background chunk


3.6     Gamma test files
------------------------

        g03n0g16    -   grayscale, file-gamma = 0.35
        g04n0g16    -   grayscale, file-gamma = 0.45
        g05n0g16    -   grayscale, file-gamma = 0.55
        g07n0g16    -   grayscale, file-gamma = 0.70
        g10n0g16    -   grayscale, file-gamma = 1.00
        g25n0g16    -   grayscale, file-gamma = 2.50
        g03n2c08    -   color, file-gamma = 0.35
        g04n2c08    -   color, file-gamma = 0.45
        g05n2c08    -   color, file-gamma = 0.55
        g07n2c08    -   color, file-gamma = 0.70
        g10n2c08    -   color, file-gamma = 1.00
        g25n2c08    -   color, file-gamma = 2.50
        g03n3p04    -   paletted, file-gamma = 0.35
        g04n3p04    -   paletted, file-gamma = 0.45
        g05n3p04    -   paletted, file-gamma = 0.55
        g07n3p04    -   paletted, file-gamma = 0.70
        g10n3p04    -   paletted, file-gamma = 1.00
        g25n3p04    -   paletted, file-gamma = 2.50


3.7     Filtering test files
----------------------------

        f00n0g08    -   grayscale, no interlacing, filter-type 0
        f01n0g08    -   grayscale, no interlacing, filter-type 1
        f02n0g08    -   grayscale, no interlacing, filter-type 2
        f03n0g08    -   grayscale, no interlacing, filter-type 3
        f04n0g08    -   grayscale, no interlacing, filter-type 4
        f00n2c08    -   color, no interlacing, filter-type 0
        f01n2c08    -   color, no interlacing, filter-type 1
        f02n2c08    -   color, no interlacing, filter-type 2
        f03n2c08    -   color, no interlacing, filter-type 3
        f04n2c08    -   color, no interlacing, filter-type 4


3.8     Additional palette chunk test files
-------------------------------------------

        pp0n2c16    -   six-cube palette-chunk in true-color image
        pp0n6a08    -   six-cube palette-chunk in true-color+alpha image
        ps1n0g08    -   six-cube suggested palette (1 byte) in grayscale image
        ps1n2c16    -   six-cube suggested palette (1 byte) in true-color image
        ps2n0g08    -   six-cube suggested palette (2 bytes) in grayscale image
        ps2n2c16    -   six-cube suggested palette (2 bytes) in true-color image


3.9     Ancillary chunks test files
-----------------------------------

        cs5n2c08    -   color, 5 significant bits
        cs8n2c08    -   color, 8 significant bits (reference)
        cs3n2c16    -   color, 13 significant bits
        cs3n3p08    -   paletted, 3 significant bits
        cs5n3p08    -   paletted, 5 significant bits
        cs8n3p08    -   paletted, 8 significant bits (reference)

        cdfn2c08    -   physical pixel dimensions, 8x32 flat pixels
        cdhn2c08    -   physical pixel dimensions, 32x8 high pixels
        cdsn2c08    -   physical pixel dimensions, 8x8 square pixels
        cdun2c08    -   physical pixel dimensions, 1000 pixels per 1 meter

        ccwn2c08    -   chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06
        ccwn3p08    -   chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06

        ch1n3p04    -   histogram 15 colors
        ch2n3p08    -   histogram 256 colors

        cm7n0g04    -   modification time, 01-jan-1970 00:00:00
        cm9n0g04    -   modification time, 31-dec-1999 23:59:59
        cm0n0g04    -   modification time, 01-jan-2000 12:34:56

        ct0n0g04    -   no textual data
        ct1n0g04    -   with textual data
        ctzn0g04    -   with compressed textual data



3.10    Chunk ordering
----------------------

        oi1n0g16    -   grayscale mother image with 1 idat-chunk
        oi2n0g16    -   grayscale image with 2 idat-chunks
        oi4n0g16    -   grayscale image with 4 unequal sized idat-chunks
        oi9n0g16    -   grayscale image with all idat-chunks length one
        oi1n2c16    -   color mother image with 1 idat-chunk
        oi2n2c16    -   color image with 2 idat-chunks
        oi4n2c16    -   color image with 4 unequal sized idat-chunks
        oi9n2c16    -   color image with all idat-chunks length one



3.11    Compression level
-------------------------

        z00n2c08    -   color, no interlacing, compression level 0 (none)
        z03n2c08    -   color, no interlacing, compression level 3
        z06n2c08    -   color, no interlacing, compression level 6 (default)
        z09n2c08    -   color, no interlacing, compression level 9 (maximum)



3.12     Currupted files
-----------------------

        x00n0g01    -   empty 0x0 grayscale file
        xcrn0g04    -   added cr bytes
        xlfn0g04    -   added lf bytes
        xc0n0c08    -   color type 0
        xc9n0c08    -   color type 9
        xd0n2c00    -   bit-depth 0
        xd3n2c03    -   bit-depth 3
        xd9n2c99    -   bit-depth 99
        xcsn2c08    -   incorrect IDAT checksum


--------
    (c) Willem van Schaik
        willem@schaik.com
        Singapore, October 1996
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/png/test-assets/pngsuite_logo.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/pp0n2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/pp0n6a08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ps1n0g08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ps1n2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ps2n0g08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/ps2n2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s01i3p01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s01n3p01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s02i3p01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s02n3p01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s03i3p01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s03n3p01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s04i3p01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s04n3p01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s05i3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s05n3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s06i3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s06n3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s07i3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s07n3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s08i3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s08n3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s09i3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s09n3p02.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s32i3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s32n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s33i3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s33n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s34i3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s34n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s35i3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s35n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s36i3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s36n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s37i3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s37n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s38i3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s38n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s39i3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s39n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s40i3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/s40n3p04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tbbn1g04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tbbn2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tbbn3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tbgn2c16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tbgn3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tbrn2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tbwn1g16.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tbwn3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tbyn3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tp0n1g08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tp0n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tp0n3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/tp1n3p08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/x00n0g01.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/xcrn0g04.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/xlfn0g04.png.

1
2
3
4
5
6
7
8
9
10
11
12
13
‰PNG





IHDR  “áÈ)ÈIDATxœ]ÑÁ
Â0P*@ð¡#°

#TâÈ10lPF`Ø F=•ŸÄIQâ*çÅuí”`%qk
Hžñšˆ©ñ´€m÷Íüµàߟ	Ñ=,¸fìOK

ç ÐtŽÀ(Èïä’צíF;èPº€¯¾{xpç]9‡/p*$(ì*éyìÕƒ ×þÚéçè@÷C¼ 	cÔqž‹NÛU#„)11·.räðfä0°ägh(¥týÙÂEøÿ‰kIEND®B`‚
<
<
<
<
<
<
<
<
<
<
<
<
<


























Deleted modules/png/test-assets/z00n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/z03n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/z06n2c08.png.

cannot compute difference between binary files

Deleted modules/png/test-assets/z09n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/basi0g01.png.

cannot compute difference between binary files

Added modules/png/testimages/basi0g02.png.

cannot compute difference between binary files

Added modules/png/testimages/basi0g04.png.

cannot compute difference between binary files

Added modules/png/testimages/basi0g08.png.

cannot compute difference between binary files

Added modules/png/testimages/basi0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/basi2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/basi2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/basi3p01.png.

cannot compute difference between binary files

Added modules/png/testimages/basi3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/basi3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/basi3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/basi4a08.png.

cannot compute difference between binary files

Added modules/png/testimages/basi4a16.png.

cannot compute difference between binary files

Added modules/png/testimages/basi6a08.png.

cannot compute difference between binary files

Added modules/png/testimages/basi6a16.png.

cannot compute difference between binary files

Added modules/png/testimages/basn0g01.png.

cannot compute difference between binary files

Added modules/png/testimages/basn0g02.png.

cannot compute difference between binary files

Added modules/png/testimages/basn0g04.png.

cannot compute difference between binary files

Added modules/png/testimages/basn0g08.png.

cannot compute difference between binary files

Added modules/png/testimages/basn0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/basn2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/basn2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/basn3p01.png.

cannot compute difference between binary files

Added modules/png/testimages/basn3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/basn3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/basn3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/basn4a08.png.

cannot compute difference between binary files

Added modules/png/testimages/basn4a16.png.

cannot compute difference between binary files

Added modules/png/testimages/basn6a08.png.

cannot compute difference between binary files

Added modules/png/testimages/basn6a16.png.

cannot compute difference between binary files

Added modules/png/testimages/bgai4a08.png.

cannot compute difference between binary files

Added modules/png/testimages/bgai4a16.png.

cannot compute difference between binary files

Added modules/png/testimages/bgan6a08.png.

cannot compute difference between binary files

Added modules/png/testimages/bgan6a16.png.

cannot compute difference between binary files

Added modules/png/testimages/bgbn4a08.png.

cannot compute difference between binary files

Added modules/png/testimages/bggn4a16.png.

cannot compute difference between binary files

Added modules/png/testimages/bgwn6a08.png.

cannot compute difference between binary files

Added modules/png/testimages/bgyn6a16.png.

cannot compute difference between binary files

Added modules/png/testimages/ccwn2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/ccwn3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/cdfn2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/cdhn2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/cdsn2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/cdun2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/ch1n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/ch2n3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/cm0n0g04.png.

cannot compute difference between binary files

Added modules/png/testimages/cm7n0g04.png.

cannot compute difference between binary files

Added modules/png/testimages/cm9n0g04.png.

cannot compute difference between binary files

Added modules/png/testimages/cs3n2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/cs3n3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/cs5n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/cs5n3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/cs8n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/cs8n3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/ct0n0g04.png.

cannot compute difference between binary files

Added modules/png/testimages/ct1n0g04.png.

cannot compute difference between binary files

Added modules/png/testimages/ctzn0g04.png.

cannot compute difference between binary files

Added modules/png/testimages/f00n0g08.png.

cannot compute difference between binary files

Added modules/png/testimages/f00n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/f01n0g08.png.

cannot compute difference between binary files

Added modules/png/testimages/f01n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/f02n0g08.png.

cannot compute difference between binary files

Added modules/png/testimages/f02n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/f03n0g08.png.

cannot compute difference between binary files

Added modules/png/testimages/f03n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/f04n0g08.png.

cannot compute difference between binary files

Added modules/png/testimages/f04n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/g03n0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/g03n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/g03n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/g04n0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/g04n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/g04n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/g05n0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/g05n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/g05n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/g07n0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/g07n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/g07n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/g10n0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/g10n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/g10n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/g25n0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/g25n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/g25n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/oi1n0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/oi1n2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/oi2n0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/oi2n2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/oi4n0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/oi4n2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/oi9n0g16.png.

cannot compute difference between binary files

Added modules/png/testimages/oi9n2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/pngsuite.doc.

















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
        PNGSUITE
----------------

        testset for PNG-(de)coders
        created by Willem van Schaik
------------------------------------

This is a collection of graphics images created to test the png applications
like viewers, converters and editors. All (as far as that is possible)
formats supported by the PNG standard are represented.


1.      INTRODUCTION
--------------------

1.1     PNG capabilities
------------------------

Supported color-types are:

        -   grayscale
        -   grayscale + alpha-channel
        -   color palettes
        -   rgb
        -   rgb + alpha-channel

Allowed bitdepths are depending on the color-type, but are in the range
of 1-bit (grayscale, which is b&w) upto 16-bits.

Special features are:

        -   interlacing (Adam-7)
        -   gamma-support
        -   transparency (a poor-man's alpha solution)


1.2     File naming
-------------------

Where possible, the testfiles are 32x32 bits icons. This results in a still
reasonable size of the suite even with a large number of tests. The name
of each test-file reflects thetype in the following way:

        g04i2c08.png
        || |||+---- bit-depth
        || ||+----- color-type (descriptive)
        || |+------ color-type (numerical)
        || +------- interlaced or non-interlaced
        |+--------- parameter of test (in this case gamma-value)
        +---------- test feature (in this case gamma)


1.3     PNG formats
-------------------

color-type:
        0g          -   grayscale
        2c          -   rgb color
        3p          -   paletted
        4a          -   grayscale + alpha channel
        6a          -   rgb color + alpha channel

bit-depth:
        01          -   with color-type 0, 3
        02          -   with color-type 0, 3
        04          -   with color-type 0, 3
        08          -   with color-type 0, 2, 3, 4, 6
        16          -   with color-type 0, 2, 4, 6

interlacing:
        n           -   non-interlaced
        i           -   interlaced


2.      THE TESTS
-----------------

2.1     Sizes
-------------

These tests are there to check if your software handles pictures well, with
picture sizes that are not a multiple of 8. This is particularly important
with Adam-7 type interlacing. In the same way these tests check if pictures
size 1x1 and similar are ok.

        s01         -   1x1 pixel picture
        s02         -   2x2 pixel picture
        s03         -   3x3 pixel picture
        s04         -   4x4 pixel picture
        s05         -   5x5 pixel picture
        s06         -   6x6 pixel picture
        s07         -   7x7 pixel picture
        s08         -   8x8 pixel picture
        s09         -   9x9 pixel picture
        s32         -   32x32 pixel picture
        s33         -   33x33 pixel picture
        s34         -   34x34 pixel picture
        s35         -   35x35 pixel picture
        s36         -   36x36 pixel picture
        s37         -   37x37 pixel picture
        s38         -   38x38 pixel picture
        s39         -   39x39 pixel picture
        s40         -   40x40 pixel picture


2.2     Background
------------------

When the PNG file contains a background chunck, this should be used for
pictures with alpha-channel or pictures with a transparency chunck. For
pictures without this background-chunk, but with alpha, this testset
assumes a black background.

For the images in this test, the left-side should be 100% the background
color, where moving to the right the color should gradually become the
image pattern.

        bga         -   alpha + no background
        bgw         -   alpha + white background
        bgg         -   alpha + gray background
        bgb         -   alpha + black background
        bgy         -   alpha + yellow background


2.3     Transparency
--------------------

Transparency should be used together with a background chunk. To test the
combination of the two the latter 4 tests are there. How to handle pictures
with transparancy, but without a background, opinions can differ. Here we
use black, but especially in the case of paletted images, the normal color
would maybe even be better.

        tp0         -   not transparent for reference
        tp1         -   transparent, but no background chunk
        tbw         -   transparent + white background
        tbg         -   transparent + gray background
        tbb         -   transparent + black background
        tby         -   transparent + yellow background


2.4     Gamma
-------------

To test if your viewer handles gamma-correction, 6 testfiles are available.
They contain corrected color-ramps and a corresponding gamma-chunk with the
file-gamma value. These are created in such a way that when the viewer does
the gamma correction right, all 6 should be displayed identical.

If they are different, probably the gamma correction is omitted. In that
case, have a look at the two right coloumns in the 6 pictures. The image
where those two look the same (when looked from far) reflects the gamma of
your system. However, because of the limited size of the image, you should
do more elaborate tests to determine your display gamma.

        g03         -   file-gamma = 0.35, for display with gamma = 2.8
        g04         -   file-gamma = 0.45, for display with gamma = 2.2 (PC)
        g05         -   file-gamma = 0.55, for display with gamma = 1.8 (Mac)
        g07         -   file-gamma = 0.70, for display with gamma = 1.4
        g10         -   file-gamma = 1.00, for display with gamma = 1.0 (NeXT)
        g25         -   file-gamma = 2.50, for display with gamma = 0.4


2.5     Filtering
-----------------

PNG uses file-filtering, for optimal compression. Normally the type is of
filtering is adjusted to the contents of the picture, but here each file
has the same picture, with a different filtering.

        f0          -   no filtering
        f1          -   sub filtering
        f2          -   up filtering
        f3          -   average filtering
        f4          -   paeth filtering


2.6     Additional palettes
---------------------------

Besides the normal use of paletted images, palette chunks can in combination
with true-color (and other) images also be used to select color lookup-tables
when the video system is of limited capabilities. The suggested palette chunk
is specially created for this purpose.

        pp          -   normal palette chunk
        ps          -   suggested palette chunk


2.7     Ancillary chunks (under construction)
------------------------

To test the correct decoding of ancillary chunks, these test-files contain
one or more examples of these chunkcs. Depending on the type of chunk, a
number of typical values are selected to test. Unluckily, the testset can
not contain all combinations, because that would be an endless set.

The significant bits are used in files with the next higher bit-depth. They
indicate howmany bits are valid.

        cs3         -   3 significant bits
        cs5         -   5 significant bits
        cs8         -   8 significant bits (reference)
        cs3         -   13 significant bits

For the physical pixel dimensions, the result of each decoding should be
a sqare picture. The first (cdf) image is an example of flat (horizontal)
pixels, where the pHYS chunk (x is 1 per unit, y = 4 per unit) must take
care of the correction. The second is just the other way round. The last
example uses the unit specifier, for 1000 pixels per meter. This should
result in a picture of 3.2 cm square.

        cdf         -   physical pixel dimensions, 8x32 flat pixels
        cdh         -   physical pixel dimensions, 32x8 high pixels
        cds         -   physical pixel dimensions, 8x8 square pixels
        cdu         -   physical pixel dimensions, with unit-specifier

        ccw         -   primary chromaticities and white point

        ch1         -   histogram 15 colors
        ch2         -   histogram 256 colors

        cm7         -   modification time, 01-jan-1970
        cm9         -   modification time, 31-dec-1999
        cm0         -   modification time, 01-jan-2000

In the textual chunk, a number of the standard, and some non-standard
text items are included.

        ct0         -   no textual data
        ct1         -   with textual data
        ctz         -   with compressed textual data


2.8     Chunk ordering (still under construction)
----------------------

These testfiles will test the obligatory ordering relations between various
chunk types (not yet) as well as the number of data chunks used for the image.

        oi1         -   mother image with 1 idat-chunk
        oi2         -   image with 2 idat-chunks
        oi4         -   image with 4 unequal sized idat-chunks
        oi9         -   all idat-chunks of length one


2.9     Compression level
-------------------------

Here you will find a set of images compressed by zlib, ranging from level 0 
for no compression at maximum speed upto level 9 for maximum compression.

        z00         -   zlib compression level 0 - none
        z03         -   zlib compression level 3
        z06         -   zlib compression level 6 - default
        z09         -   zlib compression level 9 - maximum


2.10     Corrupted files (under construction)
-----------------------

All these files are illegal. When decoding they should generate appropriate
error-messages.

        x00         -   empty IDAT chunk
        xcr         -   added cr bytes
        xlf         -   added lf bytes
        xc0         -   color type 0
        xc9         -   color type 9
        xd0         -   bit-depth 0
        xd3         -   bit-depth 3
        xd9         -   bit-depth 99
        xcs         -   incorrect IDAT checksum


3.      TEST FILES
------------------

For each of the tests listed above, one or more test-files are created. A
selection is made (for each test) for the color-type and bitdepth to be used
for the tests. Further for a number of tests, both a non-interlaced as well
as an interlaced version is available.


3.1     Basic format test files (non-interlaced)
------------------------------------------------

        basn0g01    -   black & white
        basn0g02    -   2 bit (4 level) grayscale
        basn0g04    -   4 bit (16 level) grayscale
        basn0g08    -   8 bit (256 level) grayscale
        basn0g16    -   16 bit (64k level) grayscale
        basn2c08    -   3x8 bits rgb color
        basn2c16    -   3x16 bits rgb color
        basn3p01    -   1 bit (2 color) paletted
        basn3p02    -   2 bit (4 color) paletted
        basn3p04    -   4 bit (16 color) paletted
        basn3p08    -   8 bit (256 color) paletted
        basn4a08    -   8 bit grayscale + 8 bit alpha-channel
        basn4a16    -   16 bit grayscale + 16 bit alpha-channel
        basn6a08    -   3x8 bits rgb color + 8 bit alpha-channel
        basn6a16    -   3x16 bits rgb color + 16 bit alpha-channel


3.2     Basic format test files (Adam-7 interlaced)
---------------------------------------------------

        basi0g01    -   black & white
        basi0g02    -   2 bit (4 level) grayscale
        basi0g04    -   4 bit (16 level) grayscale
        basi0g08    -   8 bit (256 level) grayscale
        basi0g16    -   16 bit (64k level) grayscale
        basi2c08    -   3x8 bits rgb color
        basi2c16    -   3x16 bits rgb color
        basi3p01    -   1 bit (2 color) paletted
        basi3p02    -   2 bit (4 color) paletted
        basi3p04    -   4 bit (16 color) paletted
        basi3p08    -   8 bit (256 color) paletted
        basi4a08    -   8 bit grayscale + 8 bit alpha-channel
        basi4a16    -   16 bit grayscale + 16 bit alpha-channel
        basi6a08    -   3x8 bits rgb color + 8 bit alpha-channel
        basi6a16    -   3x16 bits rgb color + 16 bit alpha-channel


3.3     Sizes test files
-----------------------

        s01n3p01    -   1x1 paletted file, no interlacing
        s02n3p01    -   2x2 paletted file, no interlacing
        s03n3p01    -   3x3 paletted file, no interlacing
        s04n3p01    -   4x4 paletted file, no interlacing
        s05n3p02    -   5x5 paletted file, no interlacing
        s06n3p02    -   6x6 paletted file, no interlacing
        s07n3p02    -   7x7 paletted file, no interlacing
        s08n3p02    -   8x8 paletted file, no interlacing
        s09n3p02    -   9x9 paletted file, no interlacing
        s32n3p04    -   32x32 paletted file, no interlacing
        s33n3p04    -   33x33 paletted file, no interlacing
        s34n3p04    -   34x34 paletted file, no interlacing
        s35n3p04    -   35x35 paletted file, no interlacing
        s36n3p04    -   36x36 paletted file, no interlacing
        s37n3p04    -   37x37 paletted file, no interlacing
        s38n3p04    -   38x38 paletted file, no interlacing
        s39n3p04    -   39x39 paletted file, no interlacing
        s40n3p04    -   40x40 paletted file, no interlacing

        s01i3p01    -   1x1 paletted file, interlaced
        s02i3p01    -   2x2 paletted file, interlaced
        s03i3p01    -   3x3 paletted file, interlaced
        s04i3p01    -   4x4 paletted file, interlaced
        s05i3p02    -   5x5 paletted file, interlaced
        s06i3p02    -   6x6 paletted file, interlaced
        s07i3p02    -   7x7 paletted file, interlaced
        s08i3p02    -   8x8 paletted file, interlaced
        s09i3p02    -   9x9 paletted file, interlaced
        s32i3p04    -   32x32 paletted file, interlaced
        s33i3p04    -   33x33 paletted file, interlaced
        s34i3p04    -   34x34 paletted file, interlaced
        s35i3p04    -   35x35 paletted file, interlaced
        s36i3p04    -   36x36 paletted file, interlaced
        s37i3p04    -   37x37 paletted file, interlaced
        s38i3p04    -   38x38 paletted file, interlaced
        s39i3p04    -   39x39 paletted file, interlaced
        s40i3p04    -   40x40 paletted file, interlaced


3.4     Background test files (with alpha)
------------------------------------------

        bgai4a08    -   8 bit grayscale, alpha, no background chunk, interlaced
        bgai4a16    -   16 bit grayscale, alpha, no background chunk, interlaced
        bgan6a08    -   3x8 bits rgb color, alpha, no background chunk
        bgan6a16    -   3x16 bits rgb color, alpha, no background chunk

        bgbn4a08    -   8 bit grayscale, alpha, black background chunk
        bggn4a16    -   16 bit grayscale, alpha, gray background chunk
        bgwn6a08    -   3x8 bits rgb color, alpha, white background chunk
        bgyn6a16    -   3x16 bits rgb color, alpha, yellow background chunk


3.5     Transparency (and background) test files
------------------------------------------------

        tp0n1g08    -   not transparent for reference (logo on gray)
        tbbn1g04    -   transparent, black background chunk
        tbwn1g16    -   transparent, white background chunk
        tp0n2c08    -   not transparent for reference (logo on gray)
        tbrn2c08    -   transparent, red background chunk
        tbgn2c16    -   transparent, green background chunk
        tbbn2c16    -   transparent, blue background chunk
        tp0n3p08    -   not transparent for reference (logo on gray)
        tp1n3p08    -   transparent, but no background chunk
        tbbn3p08    -   transparent, black background chunk
        tbgn3p08    -   transparent, light-gray background chunk
        tbwn3p08    -   transparent, white background chunk
        tbyn3p08    -   transparent, yellow background chunk


3.6     Gamma test files
------------------------

        g03n0g16    -   grayscale, file-gamma = 0.35
        g04n0g16    -   grayscale, file-gamma = 0.45
        g05n0g16    -   grayscale, file-gamma = 0.55
        g07n0g16    -   grayscale, file-gamma = 0.70
        g10n0g16    -   grayscale, file-gamma = 1.00
        g25n0g16    -   grayscale, file-gamma = 2.50
        g03n2c08    -   color, file-gamma = 0.35
        g04n2c08    -   color, file-gamma = 0.45
        g05n2c08    -   color, file-gamma = 0.55
        g07n2c08    -   color, file-gamma = 0.70
        g10n2c08    -   color, file-gamma = 1.00
        g25n2c08    -   color, file-gamma = 2.50
        g03n3p04    -   paletted, file-gamma = 0.35
        g04n3p04    -   paletted, file-gamma = 0.45
        g05n3p04    -   paletted, file-gamma = 0.55
        g07n3p04    -   paletted, file-gamma = 0.70
        g10n3p04    -   paletted, file-gamma = 1.00
        g25n3p04    -   paletted, file-gamma = 2.50


3.7     Filtering test files
----------------------------

        f00n0g08    -   grayscale, no interlacing, filter-type 0
        f01n0g08    -   grayscale, no interlacing, filter-type 1
        f02n0g08    -   grayscale, no interlacing, filter-type 2
        f03n0g08    -   grayscale, no interlacing, filter-type 3
        f04n0g08    -   grayscale, no interlacing, filter-type 4
        f00n2c08    -   color, no interlacing, filter-type 0
        f01n2c08    -   color, no interlacing, filter-type 1
        f02n2c08    -   color, no interlacing, filter-type 2
        f03n2c08    -   color, no interlacing, filter-type 3
        f04n2c08    -   color, no interlacing, filter-type 4


3.8     Additional palette chunk test files
-------------------------------------------

        pp0n2c16    -   six-cube palette-chunk in true-color image
        pp0n6a08    -   six-cube palette-chunk in true-color+alpha image
        ps1n0g08    -   six-cube suggested palette (1 byte) in grayscale image
        ps1n2c16    -   six-cube suggested palette (1 byte) in true-color image
        ps2n0g08    -   six-cube suggested palette (2 bytes) in grayscale image
        ps2n2c16    -   six-cube suggested palette (2 bytes) in true-color image


3.9     Ancillary chunks test files
-----------------------------------

        cs5n2c08    -   color, 5 significant bits
        cs8n2c08    -   color, 8 significant bits (reference)
        cs3n2c16    -   color, 13 significant bits
        cs3n3p08    -   paletted, 3 significant bits
        cs5n3p08    -   paletted, 5 significant bits
        cs8n3p08    -   paletted, 8 significant bits (reference)

        cdfn2c08    -   physical pixel dimensions, 8x32 flat pixels
        cdhn2c08    -   physical pixel dimensions, 32x8 high pixels
        cdsn2c08    -   physical pixel dimensions, 8x8 square pixels
        cdun2c08    -   physical pixel dimensions, 1000 pixels per 1 meter

        ccwn2c08    -   chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06
        ccwn3p08    -   chroma chunk w:0.3127,0.3290 r:0.64,0.33 g:0.30,0.60 b:0.15,0.06

        ch1n3p04    -   histogram 15 colors
        ch2n3p08    -   histogram 256 colors

        cm7n0g04    -   modification time, 01-jan-1970 00:00:00
        cm9n0g04    -   modification time, 31-dec-1999 23:59:59
        cm0n0g04    -   modification time, 01-jan-2000 12:34:56

        ct0n0g04    -   no textual data
        ct1n0g04    -   with textual data
        ctzn0g04    -   with compressed textual data



3.10    Chunk ordering
----------------------

        oi1n0g16    -   grayscale mother image with 1 idat-chunk
        oi2n0g16    -   grayscale image with 2 idat-chunks
        oi4n0g16    -   grayscale image with 4 unequal sized idat-chunks
        oi9n0g16    -   grayscale image with all idat-chunks length one
        oi1n2c16    -   color mother image with 1 idat-chunk
        oi2n2c16    -   color image with 2 idat-chunks
        oi4n2c16    -   color image with 4 unequal sized idat-chunks
        oi9n2c16    -   color image with all idat-chunks length one



3.11    Compression level
-------------------------

        z00n2c08    -   color, no interlacing, compression level 0 (none)
        z03n2c08    -   color, no interlacing, compression level 3
        z06n2c08    -   color, no interlacing, compression level 6 (default)
        z09n2c08    -   color, no interlacing, compression level 9 (maximum)



3.12     Currupted files
-----------------------

        x00n0g01    -   empty 0x0 grayscale file
        xcrn0g04    -   added cr bytes
        xlfn0g04    -   added lf bytes
        xc0n0c08    -   color type 0
        xc9n0c08    -   color type 9
        xd0n2c00    -   bit-depth 0
        xd3n2c03    -   bit-depth 3
        xd9n2c99    -   bit-depth 99
        xcsn2c08    -   incorrect IDAT checksum


--------
    (c) Willem van Schaik
        willem@schaik.com
        Singapore, October 1996

Added modules/png/testimages/pngsuite_logo.png.

cannot compute difference between binary files

Added modules/png/testimages/pp0n2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/pp0n6a08.png.

cannot compute difference between binary files

Added modules/png/testimages/ps1n0g08.png.

cannot compute difference between binary files

Added modules/png/testimages/ps1n2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/ps2n0g08.png.

cannot compute difference between binary files

Added modules/png/testimages/ps2n2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/s01i3p01.png.

cannot compute difference between binary files

Added modules/png/testimages/s01n3p01.png.

cannot compute difference between binary files

Added modules/png/testimages/s02i3p01.png.

cannot compute difference between binary files

Added modules/png/testimages/s02n3p01.png.

cannot compute difference between binary files

Added modules/png/testimages/s03i3p01.png.

cannot compute difference between binary files

Added modules/png/testimages/s03n3p01.png.

cannot compute difference between binary files

Added modules/png/testimages/s04i3p01.png.

cannot compute difference between binary files

Added modules/png/testimages/s04n3p01.png.

cannot compute difference between binary files

Added modules/png/testimages/s05i3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/s05n3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/s06i3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/s06n3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/s07i3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/s07n3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/s08i3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/s08n3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/s09i3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/s09n3p02.png.

cannot compute difference between binary files

Added modules/png/testimages/s32i3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s32n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s33i3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s33n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s34i3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s34n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s35i3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s35n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s36i3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s36n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s37i3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s37n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s38i3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s38n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s39i3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s39n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s40i3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/s40n3p04.png.

cannot compute difference between binary files

Added modules/png/testimages/tbbn1g04.png.

cannot compute difference between binary files

Added modules/png/testimages/tbbn2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/tbbn3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/tbgn2c16.png.

cannot compute difference between binary files

Added modules/png/testimages/tbgn3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/tbrn2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/tbwn1g16.png.

cannot compute difference between binary files

Added modules/png/testimages/tbwn3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/tbyn3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/tp0n1g08.png.

cannot compute difference between binary files

Added modules/png/testimages/tp0n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/tp0n3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/tp1n3p08.png.

cannot compute difference between binary files

Added modules/png/testimages/x00n0g01.png.

cannot compute difference between binary files

Added modules/png/testimages/xcrn0g04.png.

cannot compute difference between binary files

Added modules/png/testimages/xlfn0g04.png.



























>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
‰PNG





IHDR  “áÈ)ÈIDATxœ]ÑÁ
Â0P*@ð¡#°

#TâÈ10lPF`Ø F=•ŸÄIQâ*çÅuí”`%qk
Hžñšˆ©ñ´€m÷Íüµàߟ	Ñ=,¸fìOK

ç ÐtŽÀ(Èïä’צíF;èPº€¯¾{xpç]9‡/p*$(ì*éyìÕƒ ×þÚéçè@÷C¼ 	cÔqž‹NÛU#„)11·.räðfä0°ägh(¥týÙÂEøÿ‰kIEND®B`‚

Added modules/png/testimages/z00n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/z03n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/z06n2c08.png.

cannot compute difference between binary files

Added modules/png/testimages/z09n2c08.png.

cannot compute difference between binary files

Changes to modules/pop3/pop3.man.

266
267
268
269
270
271
272
273
274
	pop3::open -stls 1 \\
		$thehost $theuser $thepassword

	...
}]

[vset CATEGORY pop3]
[include ../common-text/feedback.inc]
[manpage_end]







|

266
267
268
269
270
271
272
273
274
	pop3::open -stls 1 \\
		$thehost $theuser $thepassword

	...
}]

[vset CATEGORY pop3]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/pop3/pop3.test.

585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
    dialog::shutdown
    dialog::setup server {Pop3 Fake Server} 1

    tls::init \
	-keyfile  [tcllibPath devtools/receiver.key] \
	-certfile [tcllibPath devtools/receiver.crt] \
	-cafile   [tcllibPath devtools/ca.crt] \
	-ssl2 0    \
	-ssl3 0    \
	-tls1 1    \
	-require 1

    dialog::dialog_set loginStatusOk
    set psock [pop3::open -socketcmd tls::socket localhost ak smash [dialog::listener]]
    close $psock
    dialog::waitdone
    set msg [string match sock* $psock]







|
|
|







585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
    dialog::shutdown
    dialog::setup server {Pop3 Fake Server} 1

    tls::init \
	-keyfile  [tcllibPath devtools/receiver.key] \
	-certfile [tcllibPath devtools/receiver.crt] \
	-cafile   [tcllibPath devtools/ca.crt] \
	-ssl2 1    \
	-ssl3 1    \
	-tls1 0    \
	-require 1

    dialog::dialog_set loginStatusOk
    set psock [pop3::open -socketcmd tls::socket localhost ak smash [dialog::listener]]
    close $psock
    dialog::waitdone
    set msg [string match sock* $psock]

Changes to modules/pop3d/pop3d.man.

201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
callback so that pop3 servers following the interface of this module
are able to use it. The [arg mbox] argument is the storage reference
as returned by the [method lookup] method of the authentication
command, see section [sectref Authentication].

[list_begin definitions]

[call [arg storageCmd] [method dele] [arg mbox] [arg msgList]]

Deletes the messages whose numeric ids are contained in the
[arg msgList] from the mailbox specified via [arg mbox].

[call [arg storageCmd] [method lock] [arg mbox]]

This method locks the specified mailbox for use by a single connection







|







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
callback so that pop3 servers following the interface of this module
are able to use it. The [arg mbox] argument is the storage reference
as returned by the [method lookup] method of the authentication
command, see section [sectref Authentication].

[list_begin definitions]

[call [arg storageCmd] [method dele] [arg mbox] [arg msgList]]]

Deletes the messages whose numeric ids are contained in the
[arg msgList] from the mailbox specified via [arg mbox].

[call [arg storageCmd] [method lock] [arg mbox]]

This method locks the specified mailbox for use by a single connection
265
266
267
268
269
270
271
272
273

[list_begin enumerated]
[enum] [uri http://www.rfc-editor.org/rfc/rfc1939.txt {RFC 1939}]
[enum] [uri http://www.rfc-editor.org/rfc/rfc2449.txt {RFC 2449}]
[list_end]

[vset CATEGORY pop3d]
[include ../common-text/feedback.inc]
[manpage_end]







|

265
266
267
268
269
270
271
272
273

[list_begin enumerated]
[enum] [uri http://www.rfc-editor.org/rfc/rfc1939.txt {RFC 1939}]
[enum] [uri http://www.rfc-editor.org/rfc/rfc2449.txt {RFC 2449}]
[list_end]

[vset CATEGORY pop3d]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/pop3d/pop3d_dbox.man.

156
157
158
159
160
161
162
163
164
call will fail. If [method stat] was not called
before this call, [method get] will assume
that there are zero messages in the mailbox.

[list_end]

[vset CATEGORY pop3d]
[include ../common-text/feedback.inc]
[manpage_end]







|

156
157
158
159
160
161
162
163
164
call will fail. If [method stat] was not called
before this call, [method get] will assume
that there are zero messages in the mailbox.

[list_end]

[vset CATEGORY pop3d]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/pop3d/pop3d_udb.man.

104
105
106
107
108
109
110
111
112
remembered internally so that it can be used in the next call of

[arg dbName] [method save] without an argument.

[list_end]

[vset CATEGORY pop3d]
[include ../common-text/feedback.inc]
[manpage_end]







|

104
105
106
107
108
109
110
111
112
remembered internally so that it can be used in the next call of

[arg dbName] [method save] without an argument.

[list_end]

[vset CATEGORY pop3d]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Deleted modules/practcl/build/build.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
set srcdir [file dirname [file normalize [file join [pwd] [info script]]]]
set moddir [file dirname $srcdir]
source [file join $srcdir doctool.tcl]

::practcl::doctool create AutoDoc

set version 0.16.4
set tclversion 8.6
set module [file tail $moddir]
set filename $module

set fout [open [file join $moddir $filename.tcl] w]
fconfigure $fout -translation lf
dict set modmap %module% $module
dict set modmap %version% $version
dict set modmap %tclversion% $tclversion
#dict set modmap {    } {}
#dict set modmap "\t" {    }

puts $fout [string map $modmap {###
# Amalgamated package for %module%
# Do not edit directly, tweak the source in src/ and rerun
# build.tcl
###
package require Tcl %tclversion%
package provide %module% %version%
namespace eval ::%module% {}
}]

# Track what files we have included so far
set loaded {}
# These files must be loaded in a particular order

###
# Load other module code that this module will need
###
foreach {omod files} {
  httpwget wget.tcl
  clay {clay.tcl}
} {
  foreach fname $files {
    set file [file join $moddir .. $omod $fname]
    puts $fout "###\n# START: [file join $omod $fname]\n###"
    set content [::practcl::cat [file join $moddir .. $omod $fname]]
    #AutoDoc scan_text $content
    puts $fout [::practcl::docstrip $content]
    puts $fout "###\n# END: [file join $omod $fname]\n###"
  }
}

foreach {file} {
  setup.tcl
  doctool.tcl
  buildutil.tcl
  fileutil.tcl
  installutil.tcl
  makeutil.tcl
  {class metaclass.tcl}

  {class toolset baseclass.tcl}
  {class toolset gcc.tcl}
  {class toolset msvc.tcl}

  {class target.tcl}
  {class object.tcl}
  {class dynamic.tcl}
  {class product.tcl}
  {class module.tcl}

  {class project baseclass.tcl}
  {class project library.tcl}
  {class project tclkit.tcl}

  {class distro baseclass.tcl}
  {class distro snapshot.tcl}
  {class distro fossil.tcl}
  {class distro git.tcl}

  {class subproject baseclass.tcl}
  {class subproject binary.tcl}
  {class subproject core.tcl}

  {class tool.tcl}

} {
  lappend loaded $file
  puts $fout "###\n# START: [file join $file]\n###"
  set content [::practcl::cat [file join $srcdir {*}$file]]
  AutoDoc scan_text $content
  puts $fout [::practcl::docstrip $content]
  puts $fout "###\n# END: [file join $file]\n###"
}

# Provide some cleanup and our final package provide
puts $fout [string map $modmap {
namespace eval ::%module% {
  namespace export *
}
}]
close $fout

###
# Build our pkgIndex.tcl file
###
set fout [open [file join $moddir pkgIndex.tcl] w]
fconfigure $fout -translation lf
puts $fout [string map $modmap {###
if {![package vsatisfies [package provide Tcl] %tclversion%]} {return}
package ifneeded %module% %version% [list source [file join $dir %module%.tcl]]
}]
close $fout

set manout [open [file join $moddir $filename.man] w]
puts $manout [AutoDoc manpage map $modmap \
  header [::practcl::cat [file join $srcdir manual.txt]] \
  footer [::practcl::cat [file join $srcdir footer.txt]] \
]
close $manout

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































































































































Deleted modules/practcl/build/buildutil.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
###
# Build utility functions
###

###
# Generate a proc if no command already exists by that name
###
proc Proc {name arglist body} {
  if {[info command $name] ne {}} return
  proc $name $arglist $body
}

###
# A command to do nothing. A handy way of
# negating an instruction without
# having to comment it completely out.
# It's also a handy attachment point for
# an object to be named later
###
Proc ::noop args {}

proc ::practcl::debug args {
  #puts $args
  ::practcl::cputs ::DEBUG_INFO $args
}

###
# Drop in a static copy of Tcl
###
proc ::practcl::doexec args {
  puts [list {*}$args]
  exec {*}$args >&@ stdout
}

proc ::practcl::doexec_in {path args} {
  set PWD [pwd]
  cd $path
  puts [list {*}$args]
  exec {*}$args >&@ stdout
  cd $PWD
}

proc ::practcl::dotclexec args {
  puts [list [info nameofexecutable] {*}$args]
  exec [info nameofexecutable] {*}$args >&@ stdout
}

proc ::practcl::domake {path args} {
  set PWD [pwd]
  cd $path
  puts [list *** $path ***]
  puts [list make {*}$args]
  exec make {*}$args >&@ stdout
  cd $PWD
}

proc ::practcl::domake.tcl {path args} {
  set PWD [pwd]
  cd $path
  puts [list *** $path ***]
  puts [list make.tcl {*}$args]
  exec [info nameofexecutable] make.tcl {*}$args >&@ stdout
  cd $PWD
}

proc ::practcl::fossil {path args} {
  set PWD [pwd]
  cd $path
  puts [list {*}$args]
  exec fossil {*}$args >&@ stdout
  cd $PWD
}


proc ::practcl::fossil_status {dir} {
  if {[info exists ::fosdat($dir)]} {
    return $::fosdat($dir)
  }
  set result {
tags experimental
version {}
  }
  set pwd [pwd]
  cd $dir
  set info [exec fossil status]
  cd $pwd
  foreach line [split $info \n] {
    if {[lindex $line 0] eq "checkout:"} {
      set hash [lindex $line end-3]
      set maxdate [lrange $line end-2 end-1]
      dict set result hash $hash
      dict set result maxdate $maxdate
      regsub -all {[^0-9]} $maxdate {} isodate
      dict set result isodate $isodate
    }
    if {[lindex $line 0] eq "tags:"} {
      set tags [lrange $line 1 end]
      dict set result tags $tags
      break
    }
  }
  set ::fosdat($dir) $result
  return $result
}

proc ::practcl::os {} {
  return [${::practcl::MAIN} define get TEACUP_OS]
}

###
# Build a zipfile. On tcl8.6 this invokes the native Zip implementation
# on older interpreters this invokes zip via exec
###
proc ::practcl::mkzip {exename barekit vfspath} {
  ::practcl::tcllib_require zipfile::mkzip
  ::zipfile::mkzip::mkzip $exename -runtime $barekit -directory $vfspath
}
###
# Dictionary sort a key/value list. Needed because pre tcl8.6
# does not have [emph {lsort -stride 2}]
###
proc ::practcl::sort_dict list {
  return [::lsort -stride 2 -dictionary $list]
}
if {[::package vcompare $::tcl_version 8.6] < 0} {
  # Approximate ::zipfile::mkzip with exec calls
  proc ::practcl::mkzip {exename barekit vfspath} {
    set path [file dirname [file normalize $exename]]
    set zipfile [file join $path [file rootname $exename].zip]
    file copy -force $barekit $exename
    set pwd [pwd]
    cd $vfspath
    exec zip -r $zipfile .
    cd $pwd
    set fout [open $exename a]
    set fin [open $zipfile r]
    chan configure $fout -translation binary
    chan configure $fin -translation binary
    chan copy $fin $fout
    chan close $fin
    chan close $fout
    exec zip -A $exename
  }
  proc ::practcl::sort_dict list {
    set result {}
    foreach key [lsort -dictionary [dict keys $list]] {
      dict set result $key [dict get $list $key]
    }
    return $result
  }
}


###
# Returns a dictionary describing the local operating system.
# Fields return include:
# [list_begin itemized]
# [item] download - Filesystem path where fossil repositories and source tarballs are downloaded for the current user
# [item] EXEEXT - The extension to give to executables. (i.e. .exe on windows)
# [item] fossil_mirror - A URI for a local network web server who acts as a fossil repository mirror
# [item] local_install - Filesystem path where packages for local consumption by the current user are installed
# [item] prefix - The prefix as given to the Tcl core/TEA for installation to local_install in ./configure
# [item] sandbox - The file location where this project unpacks external projects
# [item] TEACUP_PROFILE - The ActiveState/Teacup canonical name for this platform (i.e. win32-ix86 macosx10.5-i386-x86_84)
# [item] TEACUP_OS - The local operating system (windows, macosx, openbsd, etc). Gives the same answer as tcl.m4, except that macosx is given as macosx instead of Darwin.
# [item] TEA_PLATFORM - The platform returned by uname -s-uname -r (on Unix), or "windows" on Windows
# [item] TEACUP_ARCH - The processor architecture for the local os (i.e. ix86, x86_64)
# [item] TEACUP_ARCH - The processor architecture for the local os (i.e. ix86, x86_64)
# [item] teapot - Filesystem path where teapot package files are downloaded for the current user
# [item] userhome - File path to store localized preferences, cache download files, etc for the current user
# [list_end]
# This command uses a combination of local checks with Exec, any tclConfig.sh file that is
# resident, autoconf data where already computed, and data gleaned from a file named
# practcl.rc in userhome. The location for userhome varies by platform and operating system:
# [list_begin itemized]
# [item] Windows: ::env(LOCALAPPDATA)/Tcl
# [item] Macos: ~/Library/Application Support/Tcl
# [item] Other: ~/tcl
# [list_end]
###
proc ::practcl::local_os {} {
  # If we have already run this command, return
  # a cached copy of the data
  if {[info exists ::practcl::LOCAL_INFO]} {
    return $::practcl::LOCAL_INFO
  }
  set result [array get ::practcl::CONFIG]
  dict set result TEACUP_PROFILE unknown
  dict set result TEACUP_OS unknown
  dict set result EXEEXT {}
  set windows 0
  if {$::tcl_platform(platform) eq "windows"} {
    set windows 1
  }
  if {$windows} {
    set system "windows"
    set arch ix86
    dict set result TEACUP_PROFILE win32-ix86
    dict set result TEACUP_OS windows
    dict set result EXEEXT .exe
  } else {
    set system [exec uname -s]-[exec uname -r]
    set arch unknown
    dict set result TEACUP_OS generic
  }
  dict set result TEA_PLATFORM $system
  dict set result TEA_SYSTEM $system
  if {[info exists ::SANDBOX]} {
    dict set result sandbox $::SANDBOX
  }
  switch -glob $system {
    Linux* {
      dict set result TEACUP_OS linux
      set arch [exec uname -m]
      dict set result TEACUP_PROFILE "linux-glibc2.3-$arch"
    }
    GNU* {
      set arch [exec uname -m]
      dict set result TEACUP_OS "gnu"
    }
    NetBSD-Debian {
      set arch [exec uname -m]
      dict set result TEACUP_OS "netbsd-debian"
    }
    OpenBSD-* {
      set arch [exec arch -s]
      dict set result TEACUP_OS "openbsd"
    }
    Darwin* {
      set arch [exec uname -m]
      dict set result TEACUP_OS "macosx"
      if {$arch eq "x86_64"} {
        dict set result TEACUP_PROFILE "macosx10.5-i386-x86_84"
      } else {
        dict set result TEACUP_PROFILE "macosx-universal"
      }
    }
    OpenBSD* {
      set arch [exec arch -s]
      dict set result TEACUP_OS "openbsd"
    }
  }
  if {$arch eq "unknown"} {
    catch {set arch [exec uname -m]}
  }
  switch -glob $arch {
    i*86 {
      set arch "ix86"
    }
    amd64 {
      set arch "x86_64"
    }
  }
  dict set result TEACUP_ARCH $arch
  if {[dict get $result TEACUP_PROFILE] eq "unknown"} {
    dict set result TEACUP_PROFILE [dict get $result TEACUP_OS]-$arch
  }
  set OS [dict get $result TEACUP_OS]
  dict set result os $OS

  # Look for a local preference file
  set pathlist {}
  set userhome [file normalize ~/tcl]
  set local_install [file join $userhome lib]
  switch $OS {
    windows {
      set userhome [file join [file normalize $::env(LOCALAPPDATA)] Tcl]
      if {[file exists c:/Tcl/Teapot]} {
        dict set result teapot c:/Tcl/Teapot
      }
    }
    macosx {
      set userhome [file join [file normalize {~/Library/Application Support/}] Tcl]
      if {[file exists {~/Library/Application Support/ActiveState/Teapot/repository/}]} {
        dict set result teapot [file normalize {~/Library/Application Support/ActiveState/Teapot/repository/}]
      }
      dict set result local_install [file normalize ~/Library/Tcl]
      if {![dict exists $result sandbox]} {
        dict set result sandbox       [file normalize ~/Library/Tcl/sandbox]
      }
    }
    default {
    }
  }
  dict set result userhome $userhome
  # Load user preferences
  if {[file exists [file join $userhome practcl.rc]]} {
    set dat [::practcl::read_rc_file [file join $userhome practcl.rc]]
    foreach {f v} $dat {
      dict set result $f $v
    }
  }
  if {![dict exists $result prefix]} {
    dict set result prefix   $userhome
  }

  # Create a default path for the teapot
  if {![dict exists $result teapot]} {
    dict set result teapot [file join $userhome teapot]
  }
  # Create a default path for the local sandbox
  if {![dict exists $result sandbox]} {
    dict set result sandbox [file join $userhome sandbox]
  }
  # Create a default path for download folder
  if {![dict exists $result download]} {
    dict set result download [file join $userhome download]
  }
  # Path to install local packages
  if {![dict exists $result local_install]} {
    dict set result local_install [file join $userhome lib]
  }
  if {![dict exists result fossil_mirror] && [::info exists ::env(FOSSIL_MIRROR)]} {
    dict set result fossil_mirror $::env(FOSSIL_MIRROR)
  }

  set ::practcl::LOCAL_INFO $result
  return $result
}


###
# A transparent call to ::practcl::read_configuration to preserve backward compadibility
# with older copies of Practcl
###
proc ::practcl::config.tcl {path} {
   return [read_configuration $path]
}

###
# Detect local platform. This command looks for data gleaned by autoconf or autosetup
# in the path specified, or perform its own logic tests if neither has been run.
# A file named config.site present in the location indicates that this project is
# cross compiling, and the data stored in that file is used for the compiler and linker.
# [para]
# This command looks for information from the following files, in the following order:
# [list_begin itemized]
# [item] config.tcl - A file generated by autoconf/configure in newer editions of TEA, encoded as a Tcl script.
# [item] config.site - A file containing cross compiler information, encoded as a SH script
# [item] ::env(VisualStudioVersion) - On Windows, and environmental value that indicates MS Visual Studio is installed
# [list_end]
# [para]
# This command returns a dictionary containing all of the data cleaned from the sources above.
# In the absence of any guidance this command returns the same output as ::practcl::local_os.
# In this mode, if the environmental variable VisualStudioVersion exists, this command
# will provide a template of fields that are appropriate for compiling on Windows under
# Microsoft Visual Studio. The USEMSVC flag in the dictionary is a boolean flag to indicate
# if this is indeed the case.
###
proc ::practcl::read_configuration {path} {
  dict set result buildpath $path
  set result [local_os]
  set OS [dict get $result TEACUP_OS]
  set windows 0
  dict set result USEMSVC 0
  if {[file exists [file join $path config.tcl]]} {
    # We have a definitive configuration file. Read its content
    # and take it as gospel
    set cresult [read_rc_file [file join $path config.tcl]]
    set cresult [::practcl::de_shell $cresult]
    if {[dict exists $cresult srcdir] && ![dict exists $cresult sandbox]} {
      dict set cresult sandbox  [file dirname [dict get $cresult srcdir]]
    }
    set result [dict merge $result [::practcl::de_shell $cresult]]
  }
  if {[file exists [file join $path config.site]]} {
    # No config.tcl file is present but we do seed
    dict set result USEMSVC 0
    foreach {f v} [::practcl::de_shell [::practcl::read_sh_file [file join $path config.site]]] {
      dict set result $f $v
      dict set result XCOMPILE_${f} $v
    }
    dict set result CONFIG_SITE [file join $path config.site]
    if {[dict exist $result XCOMPILE_CC] && [regexp mingw [dict get $result XCOMPILE_CC]]} {
      set windows 1
    }
  } elseif {[info exists ::env(VisualStudioVersion)]} {
    set windows 1
    dict set result USEMSVC 1
  }
  if {$windows && [dict get $result TEACUP_OS] ne "windows"} {
    if {![dict exists exists $result TEACUP_ARCH]} {
      dict set result TEACUP_ARCH ix86
    }
    dict set result TEACUP_PROFILE win32-[dict get $result TEACUP_ARCH]
    dict set result TEACUP_OS windows
    dict set result EXEEXT .exe
  }
  return $result
}


###
# Convert an MSYS path to a windows native path
###
if {$::tcl_platform(platform) eq "windows"} {
proc ::practcl::msys_to_tclpath msyspath {
  return [exec sh -c "cd $msyspath ; pwd -W"]
}
proc ::practcl::tcl_to_myspath tclpath {
  set path [file normalize $tclpath]
  return "/[string index $path 0][string range $path 2 end]"
  #return [exec sh -c "cd $tclpath ; pwd"]
}
} else {
proc ::practcl::msys_to_tclpath msyspath {
  return [file normalize $msyspath]
}
proc ::practcl::tcl_to_myspath msyspath {
  return [file normalize $msyspath]
}
}


# Try to load  a package, and failing that
# retrieve tcllib
proc ::practcl::tcllib_require {pkg args} {
  # Try to load the package from the local environment
  if {[catch [list ::package require $pkg {*}$args] err]==0} {
    return $err
  }
  ::practcl::LOCAL tool tcllib env-load
  uplevel #0 [list ::package require $pkg {*}$args]
}

namespace eval ::practcl::platform {}

###
# Return the string to pass to ./configure to compile the Tcl core for the given OS.
# [list_begin itemized]
# [item] windows: --with-tzdata --with-encoding utf-8
# [item] macosx: --enable-corefoundation=yes  --enable-framework=no --with-tzdata --with-encoding utf-8
# [item] other: --with-tzdata --with-encoding utf-8
# [list_end]
###
proc ::practcl::platform::tcl_core_options {os} {
  ###
  # Download our required packages
  ###
  set tcl_config_opts {}
  # Auto-guess options for the local operating system
  switch $os {
    windows {
      #lappend tcl_config_opts --disable-stubs
    }
    linux {
    }
    macosx {
      lappend tcl_config_opts --enable-corefoundation=yes  --enable-framework=no
    }
  }
  lappend tcl_config_opts --with-tzdata --with-encoding utf-8
  return $tcl_config_opts
}

proc ::practcl::platform::tk_core_options {os} {
  ###
  # Download our required packages
  ###
  set tk_config_opts {}

  # Auto-guess options for the local operating system
  switch $os {
    windows {
    }
    linux {
      lappend tk_config_opts --enable-xft=no --enable-xss=no
    }
    macosx {
      lappend tk_config_opts --enable-aqua=yes
    }
  }
  return $tk_config_opts
}

###
# Read a stylized key/value list stored in a file
###
proc ::practcl::read_rc_file {filename {localdat {}}} {
  set result $localdat
  set fin [open $filename r]
  set bufline {}
  set rawcount 0
  set linecount 0
  while {[gets $fin thisline]>=0} {
    incr rawcount
    append bufline \n $thisline
    if {![info complete $bufline]} continue
    set line [string trimleft $bufline]
    set bufline {}
    if {[string index [string trimleft $line] 0] eq "#"} continue
    append result \n $line
    #incr linecount
    #set key [lindex $line 0]
    #set value [lindex $line 1]
    #dict set result $key $value
  }
  close $fin
  return $result
}

###
# topic: e71f3f61c348d56292011eec83e95f0aacc1c618
# description: Converts a XXX.sh file into a series of Tcl variables
###
proc ::practcl::read_sh_subst {line info} {
  regsub -all {\x28} $line \x7B line
  regsub -all {\x29} $line \x7D line

  #set line [string map $key [string trim $line]]
  foreach {field value} $info {
    catch {set $field $value}
  }
  if [catch {subst $line} result] {
    return {}
  }
  set result [string trim $result]
  return [string trim $result ']
}

###
# topic: 03567140cca33c814664c7439570f669b9ab88e6
###
proc ::practcl::read_sh_file {filename {localdat {}}} {
  set fin [open $filename r]
  set result {}
  if {$localdat eq {}} {
    set top 1
    set local [array get ::env]
    dict set local EXE {}
  } else {
    set top 0
    set local $localdat
  }
  while {[gets $fin line] >= 0} {
    set line [string trim $line]
    if {[string index $line 0] eq "#"} continue
    if {$line eq {}} continue
    catch {
    if {[string range $line 0 6] eq "export "} {
      set eq [string first "=" $line]
      set field [string trim [string range $line 6 [expr {$eq - 1}]]]
      set value [read_sh_subst [string range $line [expr {$eq+1}] end] $local]
      dict set result $field [read_sh_subst $value $local]
      dict set local $field $value
    } elseif {[string range $line 0 7] eq "include "} {
      set subfile [read_sh_subst [string range $line 7 end] $local]
      foreach {field value} [read_sh_file $subfile $local] {
        dict set result $field $value
      }
    } else {
      set eq [string first "=" $line]
      if {$eq > 0} {
        set field [read_sh_subst [string range $line 0 [expr {$eq - 1}]] $local]
        set value [string trim [string range $line [expr {$eq+1}] end] ']
        #set value [read_sh_subst [string range $line [expr {$eq+1}] end] $local]
        dict set local $field $value
        dict set result $field $value
      }
    }
    } err opts
    if {[dict get $opts -code] != 0} {
      #puts $opts
      puts "Error reading line:\n$line\nerr: $err\n***"
      return $err {*}$opts
    }
  }
  return $result
}

###
# A simpler form of read_sh_file tailored
# to pulling data from (tcl|tk)Config.sh
###
proc ::practcl::read_Config.sh filename {
  set fin [open $filename r]
  set result {}
  set linecount 0
  while {[gets $fin line] >= 0} {
    set line [string trim $line]
    if {[string index $line 0] eq "#"} continue
    if {$line eq {}} continue
    catch {
      set eq [string first "=" $line]
      if {$eq > 0} {
        set field [string range $line 0 [expr {$eq - 1}]]
        set value [string trim [string range $line [expr {$eq+1}] end] ']
        #set value [read_sh_subst [string range $line [expr {$eq+1}] end] $local]
        dict set result $field $value
        incr $linecount
      }
    } err opts
    if {[dict get $opts -code] != 0} {
      #puts $opts
      puts "Error reading line:\n$line\nerr: $err\n***"
      return $err {*}$opts
    }
  }
  return $result
}

###
# A simpler form of read_sh_file tailored
# to pulling data from a Makefile
###
proc ::practcl::read_Makefile filename {
  set fin [open $filename r]
  set result {}
  while {[gets $fin line] >= 0} {
    set line [string trim $line]
    if {[string index $line 0] eq "#"} continue
    if {$line eq {}} continue
    catch {
      set eq [string first "=" $line]
      if {$eq > 0} {
        set field [string trim [string range $line 0 [expr {$eq - 1}]]]
        set value [string trim [string trim [string range $line [expr {$eq+1}] end] ']]
        switch $field {
          PKG_LIB_FILE {
            dict set result libfile $value
          }
          srcdir {
            if {$value eq "."} {
              dict set result srcdir [file dirname $filename]
            } else {
              dict set result srcdir $value
            }
          }
          PACKAGE_NAME {
            dict set result name $value
          }
          PACKAGE_VERSION {
            dict set result version $value
          }
          LIBS {
            dict set result PRACTCL_LIBS $value
          }
          PKG_LIB_FILE {
            dict set result libfile $value
          }
        }
      }
    } err opts
    if {[dict get $opts -code] != 0} {
      #puts $opts
      puts "Error reading line:\n$line\nerr: $err\n***"
      return $err {*}$opts
    }
    # the Compile field is about where most TEA files start getting silly
    if {$field eq "compile"} {
      break
    }
  }
  return $result
}

## Append arguments to a buffer
# The command works like puts in that each call will also insert
# a line feed. Unlike puts, blank links in the interstitial are
# suppressed
proc ::practcl::cputs {varname args} {
  upvar 1 $varname buffer
  if {[llength $args]==1 && [string length [string trim [lindex $args 0]]] == 0} {

  }
  if {[info exist buffer]} {
    if {[string index $buffer end] ne "\n"} {
      append buffer \n
    }
  } else {
    set buffer \n
  }
  # Trim leading \n's
  append buffer [string trimleft [lindex $args 0] \n] {*}[lrange $args 1 end]
}

proc ::practcl::tcl_to_c {body} {
  set result {}
  foreach rawline [split $body \n] {
    set line [string map [list \" \\\" \\ \\\\] $rawline]
    cputs result "\n        \"$line\\n\" \\"
  }
  return [string trimright $result \\]
}


proc ::practcl::_tagblock {text {style tcl} {note {}}} {
  if {[string length [string trim $text]]==0} {
    return {}
  }
  set output {}
  switch $style {
    tcl {
      ::practcl::cputs output "# BEGIN $note"
    }
    c {
      ::practcl::cputs output "/* BEGIN $note */"
    }
    default {
      ::practcl::cputs output "# BEGIN $note"
    }
  }
  ::practcl::cputs output $text
  switch $style {
    tcl {
      ::practcl::cputs output "# END $note"
    }
    c {
      ::practcl::cputs output "/* END $note */"
    }
    default {
      ::practcl::cputs output "# END $note"
    }
  }
  return $output
}

proc ::practcl::de_shell {data} {
  set values {}
  foreach flag {DEFS TCL_DEFS TK_DEFS} {
    if {[dict exists $data $flag]} {
      #set value {}
      #foreach item [dict get $data $flag] {
      #  append value " " [string map {{ } {\ }} $item]
      #}
      dict set values $flag [dict get $data $flag]
    }
  }
  set map {}
  lappend map {${PKG_OBJECTS}} %LIBRARY_OBJECTS%
  lappend map {$(PKG_OBJECTS)} %LIBRARY_OBJECTS%
  lappend map {${PKG_STUB_OBJECTS}} %LIBRARY_STUB_OBJECTS%
  lappend map {$(PKG_STUB_OBJECTS)} %LIBRARY_STUB_OBJECTS%

  if {[dict exists $data name]} {
    lappend map %LIBRARY_NAME% [dict get $data name]
    lappend map %LIBRARY_VERSION% [dict get $data version]
    lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} [dict get $data version]]
    if {[dict exists $data libprefix]} {
      lappend map %LIBRARY_PREFIX% [dict get $data libprefix]
    } else {
      lappend map %LIBRARY_PREFIX% [dict get $data prefix]
    }
  }
  foreach flag [dict keys $data] {
    if {$flag in {TCL_DEFS TK_DEFS DEFS}} continue
    set value [string trim [dict get $data $flag] \"]
    dict set map "\$\{${flag}\}" $value
    dict set map "\$\(${flag}\)" $value
    #dict set map "\$${flag}" $value
    dict set map "%${flag}%" $value
    dict set values $flag [dict get $data $flag]
    #dict set map "\$\{${flag}\}" $proj($flag)
  }
  set changed 1
  while {$changed} {
    set changed 0
    foreach {field value} $values {
      if {$field in {TCL_DEFS TK_DEFS DEFS}} continue
      dict with values {}
      set newval [string map $map $value]
      if {$newval eq $value} continue
      set changed 1
      dict set values $field $newval
    }
  }
  return $values
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/practcl/build/class/distro/baseclass.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144

###
# Standalone class to manage code distribution
# This class is intended to be mixed into another class
# (Thus the lack of ancestors)
###
::clay::define ::practcl::distribution {

  method scm_info {} {
    return {
      scm  None
      hash {}
      maxdate {}
      tags {}
      isodate {}
    }
  }

  method DistroMixIn {} {
    my define set scm none
  }

  method Sandbox {} {
    if {[my define exists sandbox]} {
      return [my define get sandbox]
    }
    if {[my clay delegate project] ni {::noop {}}} {
      set sandbox [my <project> define get sandbox]
      if {$sandbox ne {}} {
        my define set sandbox $sandbox
        return $sandbox
      }
    }
    set sandbox [file normalize [file join $::CWD ..]]
    my define set sandbox $sandbox
    return $sandbox
  }

  method SrcDir {} {
    set pkg [my define get name]
    if {[my define exists srcdir]} {
      return [my define get srcdir]
    }
    set sandbox [my Sandbox]
    set srcdir [file join [my Sandbox] $pkg]
    my define set srcdir $srcdir
    return $srcdir
  }

  method ScmTag    {} {}
  method ScmClone  {} {}
  method ScmUnpack {} {}
  method ScmUpdate {} {}

  method Unpack {} {
    set srcdir [my SrcDir]
    if {[file exists $srcdir]} {
      return
    }
    set pkg [my define get name]
    if {[my define exists download]} {
      # Utilize a staged download
      set download [my define get download]
      if {[file exists [file join $download $pkg.zip]]} {
        ::practcl::tcllib_require zipfile::decode
        ::zipfile::decode::unzipfile [file join $download $pkg.zip] $srcdir
        return
      }
    }
    my ScmUnpack
  }
}
oo::objdefine ::practcl::distribution {
  method Sandbox {object} {
    if {[$object define exists sandbox]} {
      return [$object define get sandbox]
    }
    if {[$object clay delegate project] ni {::noop {}}} {
      set sandbox [$object <project> define get sandbox]
      if {$sandbox ne {}} {
        $object define set sandbox $sandbox
        return $sandbox
      }
    }
    set pkg [$object define get name]
    set sandbox [file normalize [file join $::CWD ..]]
    $object define set sandbox $sandbox
    return $sandbox
  }

  method select object {
    if {[$object define exists scm]} {
      return [$object define get scm]
    }

    set pkg [$object define get name]
    if {[$object define get srcdir] ne {}} {
      set srcdir [$object define get srcdir]
    } else {
      set srcdir [file join [my Sandbox $object] $pkg]
      $object define set srcdir $srcdir
    }

    set classprefix ::practcl::distribution.
    if {[file exists $srcdir]} {
      foreach class [::info commands ${classprefix}*] {
        if {[$class claim_path $srcdir]} {
          $object clay mixinmap distribution $class
          set name [$class claim_option]
          $object define set scm $name
          return $name
        }
      }
    }
    foreach class [::info commands ${classprefix}*] {
      if {[$class claim_object $object]} {
        $object clay mixinmap distribution $class
        set name [$class claim_option]
        $object define set scm $name
        return $name
      }
    }
    if {[$object define get scm] eq {} && [$object define exists file_url]} {
      set class ::practcl::distribution.snapshot
      set name [$class claim_option]
      $object define set scm $name
      $object clay mixinmap distribution $class
      return $name
    }
    error "Cannot determine source distribution method"
  }

  method claim_option {} {
    return Unknown
  }

  method claim_object object {
    return false
  }

  method claim_path path {
    return false
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































Deleted modules/practcl/build/class/distro/fossil.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
###
# A file distribution based on fossil
###
::clay::define ::practcl::distribution.fossil {
  superclass ::practcl::distribution

  method scm_info {} {
    set info [next]
    dict set info scm fossil
    foreach {field value} [::practcl::fossil_status [my define get srcdir]] {
      dict set info $field $value
    }
    return $info
  }

  # Clone the source
  method ScmClone  {} {
    set srcdir [my SrcDir]
    if {[file exists [file join $srcdir .fslckout]]} {
      return
    }
    if {[file exists [file join $srcdir _FOSSIL_]]} {
      return
    }
    if {![::info exists ::practcl::fossil_dbs]} {
      # Get a list of local fossil databases
      set ::practcl::fossil_dbs [exec fossil all list]
    }
    set pkg [my define get name]
    # Return an already downloaded fossil repo
    foreach line [split $::practcl::fossil_dbs \n] {
      set line [string trim $line]
      if {[file rootname [file tail $line]] eq $pkg} {
        return $line
      }
    }
    set download [::practcl::LOCAL define get download]
    set fosdb [file join $download $pkg.fos]
    if {[file exists $fosdb]} {
      return $fosdb
    }

    file mkdir [file join $download fossil]
    set fosdb [file join $download fossil $pkg.fos]
    if {[file exists $fosdb]} {
      return $fosdb
    }

    set cloned 0
    # Attempt to clone from a local network mirror
    if {[::practcl::LOCAL define exists fossil_mirror]} {
      set localmirror [::practcl::LOCAL define get fossil_mirror]
      catch {
        ::practcl::doexec fossil clone $localmirror/$pkg $fosdb
        set cloned 1
      }
      if {$cloned} {
        return $fosdb
      }
    }
    # Attempt to clone from the canonical source
    if {[my define get fossil_url] ne {}} {
      catch {
        ::practcl::doexec fossil clone [my define get fossil_url] $fosdb
        set cloned 1
      }
      if {$cloned} {
        return $fosdb
      }
    }
    # Fall back to the fossil mirror on the island of misfit toys
    ::practcl::doexec fossil clone http://fossil.etoyoc.com/fossil/$pkg $fosdb
    return $fosdb
  }

  method ScmTag {} {
    if {[my define exists scm_tag]} {
      return [my define get scm_tag]
    }
    if {[my define exists tag]} {
      set tag [my define get tag]
    } else {
      set tag trunk
    }
    my define set scm_tag $tag
    return $tag
  }

  method ScmUnpack {} {
    set srcdir [my SrcDir]
    if {[file exists [file join $srcdir .fslckout]]} {
      return 0
    }
    if {[file exists [file join $srcdir _FOSSIL_]]} {
      return 0
    }
    set CWD [pwd]
    set fosdb [my ScmClone]
    set tag [my ScmTag]
    file mkdir $srcdir
    ::practcl::fossil $srcdir open $fosdb $tag
    return 1
  }

  method ScmUpdate {} {
    if {[my ScmUnpack]} {
      return
    }
    set srcdir [my SrcDir]
    set tag [my ScmTag]
    ::practcl::fossil $srcdir update $tag
  }
}

oo::objdefine ::practcl::distribution.fossil {

  # Check for markers in the metadata
  method claim_object obj {
    set path [$obj define get srcdir]
    if {[my claim_path $path]} {
      return true
    }
    if {[$obj define get fossil_url] ne {}} {
      return true
    }
    return false
  }

  method claim_option {} {
    return fossil
  }

  # Check for markers in the source root
  method claim_path path {
    if {[file exists [file join $path .fslckout]]} {
      return true
    }
    if {[file exists [file join $path _FOSSIL_]]} {
      return true
    }
    return false
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Deleted modules/practcl/build/class/distro/git.tcl.

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
###
# A file distribution based on git
###
::clay::define ::practcl::distribution.git {
  superclass ::practcl::distribution

  method ScmTag {} {
    if {[my define exists scm_tag]} {
      return [my define get scm_tag]
    }
    if {[my define exists tag]} {
      set tag [my define get tag]
    } else {
      set tag master
    }
    my define set scm_tag $tag
    return $tag
  }

  method ScmUnpack {} {
    set srcdir [my SrcDir]
    if {[file exists [file join $srcdir .git]]} {
      return 0
    }
    set CWD [pwd]
    set tag [my ScmTag]
    set pkg [my define get name]
    if {[my define exists git_url]} {
      ::practcl::doexec git clone --branch $tag [my define get git_url] $srcdir
    } else {
      ::practcl::doexec git clone --branch $tag https://github.com/eviltwinskippy/$pkg $srcdir
    }
    return 1
  }

  method ScmUpdate {} {
    if {[my ScmUnpack]} {
      return
    }
    set CWD [pwd]
    set srcdir [my SrcDir]
    set tag [my ScmTag]
    ::practcl::doexec_in $srcdir git pull
    cd $CWD
  }
}

oo::objdefine ::practcl::distribution.git {

  method claim_object obj {
    set path [$obj define get srcdir]
    if {[my claim_path $path]} {
      return true
    }
    if {[$obj define get git_url] ne {}} {
      return true
    }
    return false
  }

  method claim_option {} {
    return git
  }

  method claim_path path {
   if {[file exists [file join $path .git]]} {
      return true
    }
    return false
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































































Deleted modules/practcl/build/class/distro/snapshot.tcl.

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
###
# A file distribution from zip, tarball, or other non-scm archive format
###
::clay::define ::practcl::distribution.snapshot {
  superclass ::practcl::distribution

  method ScmUnpack {} {
    set srcdir [my SrcDir]
    if {[file exists [file join $srcdir .download]]} {
      return 0
    }
    set dpath [::practcl::LOCAL define get download]
    set url [my define get file_url]
    set fname [file tail $url]
    set archive [file join $dpath $fname]
    if {![file exists $archive]} {
      ::http::wget $url $archive
    }
    set CWD [pwd]
    switch [file extension $fname] {
      .zip {
        # Zipfile

      }
      .tar {
        ::practcl::tcllib_require tar
      }
      .tgz -
      .gz {
        # Tarball
        ::practcl::tcllib_require tcl::transform::zlib
        ::practcl::tcllib_require tar
        set fh [::open $archive]
        fconfigure $fh -encoding binary -translation lf -eofchar {}
        ::tcl::transform::zlib $fh
      }
    }
    set fosdb [my ScmClone]
    set tag [my ScmTag]
    file mkdir $srcdir
    ::practcl::fossil $srcdir open $fosdb $tag
    return 1
  }
}
oo::objdefine ::practcl::distribution.snapshot {

  method claim_object object {
    return false
  }

  method claim_option {} {
    return snapshot
  }

  method claim_path path {
    if {[file exists [file join $path .download]]} {
      return true
    }
    return false
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































Deleted modules/practcl/build/class/dynamic.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592

###
# Dynamic blocks do not generate their own .c files,
# instead the contribute to the amalgamation
# of the main library file
###
::clay::define ::practcl::dynamic {

  ###
  # Parser functions
  ###

  method cstructure {name definition {argdat {}}} {
    my variable cstruct
    dict set cstruct $name body $definition
    foreach {f v} $argdat {
      dict set cstruct $name $f $v
    }
    if {![dict exists $cstruct $name public]} {
      dict set cstruct $name public 1
    }
  }

  method include header {
    my define add include $header
  }

  method include_dir args {
    my define add include_dir {*}$args
  }

  method include_directory args {
    my define add include_dir {*}$args
  }

  method c_header body {
    my variable code
    ::practcl::cputs code(header) $body
  }

  method c_code body {
    my variable code
    ::practcl::cputs code(funct) $body
  }

  method c_function {header body {info {}}} {
    set header [string map "\t \  \n \ \ \  \ " $header]
    my variable code cfunct
    foreach regexp {
         {(.*) ([a-zA-Z_][a-zA-Z0-9_]*) *\((.*)\)}
         {(.*) (\x2a[a-zA-Z_][a-zA-Z0-9_]*) *\((.*)\)}
    } {
      if {[regexp $regexp $header all keywords funcname arglist]} {
        set dat [dict merge {export 0 extern 0 public 1 inline 0} $info]
        dict set dat header $header
        dict set dat body $body
        dict set dat keywords $keywords
        dict set dat arglist $arglist
        if {"IRM_INLINE" in $keywords || "CTHULHU_INLINE" in $keywords} {
          dict set dat public 1
          dict set dat extern 0
          dict set dat inline 1
        } else {
          if {"inline" in $keywords} {
            dict set dat inline 1
          }
          if {"STUB_EXPORT" in $keywords} {
            dict set dat extern 1
            dict set dat public 1
            dict set dat export 1
            dict set dat inline 0
          } elseif {"extern" in $keywords} {
            dict set dat extern 1
            dict set dat public 1
          } elseif {"static" in $keywords} {
            dict set dat public 0
          }
        }
        if {[dict get $dat inline] && [dict get $dat public]} {
          set header [string map {IRM_INLINE {} CTHULHU_INLINE {} static {} inline {} extern {}} [dict get $dat header]]
          dict set dat header "extern $header"
        }
        dict set cfunct $funcname $dat
        return
      }
    }
    puts "WARNING: NON CONFORMING FUNCTION DEFINITION: $headers $body"
    ::practcl::cputs code(header) "$header\;"
    # Could not parse that block as a function
    # append it verbatim to our c_implementation
    ::practcl::cputs code(funct) "$header [list $body]"
  }

  method c_tcloomethod {name body {arginfo {}}} {
    my variable methods code
    foreach {f v} $arginfo {
      dict set methods $name $f $v
    }
    dict set methods $name body "Tcl_Object thisObject = Tcl_ObjectContextObject(objectContext); /* The current connection object */
$body"
  }

  # Alias to classic name
  method cmethod {name body {arginfo {}}} {
    my variable methods code
    foreach {f v} $arginfo {
      dict set methods $name $f $v
    }
    dict set methods $name body "Tcl_Object thisObject = Tcl_ObjectContextObject(objectContext); /* The current connection object */
$body"
  }

  method c_tclproc_nspace nspace {
    my variable code
    if {![info exists code(nspace)]} {
      set code(nspace) {}
    }
    if {$nspace ni $code(nspace)} {
      lappend code(nspace) $nspace
    }
  }

  method c_tclcmd {name body {arginfo {}}} {
    my variable tclprocs code

    foreach {f v} $arginfo {
      dict set tclprocs $name $f $v
    }
    dict set tclprocs $name body $body
  }

  # Alias to classic name
  method c_tclproc_raw {name body {arginfo {}}} {
    my variable tclprocs code

    foreach {f v} $arginfo {
      dict set tclprocs $name $f $v
    }
    dict set tclprocs $name body $body
  }

  method tcltype {name argdat} {
    my variable tcltype
    foreach {f v} $argdat {
      dict set tcltype $name $f $v
    }
    if {![dict exists tcltype $name cname]} {
      dict set tcltype $name cname [string tolower $name]_tclobjtype
    }
    lappend map @NAME@ $name
    set info [dict get $tcltype $name]
    foreach {f v} $info {
      lappend map @[string toupper $f]@ $v
    }
    foreach {func fpat template} {
      freeproc         {@Name@Obj_freeIntRepProc}       {void @FNAME@(Tcl_Obj *objPtr)}
      dupproc          {@Name@Obj_dupIntRepProc}        {void @FNAME@(Tcl_Obj *srcPtr,Tcl_Obj *dupPtr)}
      updatestringproc {@Name@Obj_updateStringRepProc} {void @FNAME@(Tcl_Obj *objPtr)}
      setfromanyproc   {@Name@Obj_setFromAnyProc}       {int @FNAME@(Tcl_Interp *interp,Tcl_Obj *objPtr)}
    } {
      if {![dict exists $info $func]} {
        error "$name does not define $func"
      }
      set body [dict get $info $func]
      # We were given a function name to call
      if {[llength $body] eq 1} continue
      set fname [string map [list @Name@ [string totitle $name]] $fpat]
      my c_function [string map [list @FNAME@ $fname] $template] [string map $map $body]
      dict set tcltype $name $func $fname
    }
  }

  ###
  # Module interactions
  ###
  method project-compile-products {} {
    set filename [my define get output_c]
    set result {}
    if {$filename ne {}} {
      ::practcl::debug [self] [self class] [self method] project-compile-products $filename

      if {[my define exists ofile]} {
        set ofile [my define get ofile]
      } else {
        set ofile [my Ofile $filename]
        my define set ofile $ofile
      }
      lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]]]
    } else {
      set filename [my define get cfile]
      if {$filename ne {}} {
        ::practcl::debug [self] [self class] [self method] project-compile-products $filename
        if {[my define exists ofile]} {
          set ofile [my define get ofile]
        } else {
          set ofile [my Ofile $filename]
          my define set ofile $ofile
        }
        lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]]]
      }
    }
    foreach item [my link list subordinate] {
      lappend result {*}[$item project-compile-products]
    }
    return $result
  }

  method implement path {
    my go
    my Collate_Source $path
    if {[my define get output_c] eq {}} return
    set filename [file join $path [my define get output_c]]
    ::practcl::debug [self] [my define get filename] WANTS TO GENERATE $filename
    my define set cfile $filename
    set fout [open $filename w]
    puts $fout [my generate-c]
    if {[my define get initfunc] ne {}} {
      puts $fout "extern int DLLEXPORT [my define get initfunc]( Tcl_Interp *interp ) \x7B"
      puts $fout [my generate-loader-module]
      if {[my define get pkg_name] ne {}} {
        puts $fout "   Tcl_PkgProvide(interp, \"[my define get pkg_name]\", \"[my define get pkg_vers]\");"
      }
      puts $fout "  return TCL_OK\;"
      puts $fout "\x7D"
    }
    close $fout
  }

  ###
  # Practcl internals
  ###
  method initialize {} {
    set filename [my define get filename]
    if {$filename eq {}} {
      return
    }
    if {[my define get name] eq {}} {
      my define set name [file tail [file rootname $filename]]
    }
    if {[my define get localpath] eq {}} {
      my define set localpath [my <module> define get localpath]_[my define get name]
    }
    ::source $filename
  }

  method linktype {} {
    return {subordinate product dynamic}
  }

  method generate-cfile-constant {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code cstruct methods tcltype
    if {[info exists code(constant)]} {
      ::practcl::cputs result "/* [my define get filename] CONSTANT */"
      ::practcl::cputs result $code(constant)
    }
    if {[info exists cstruct]} {
      foreach {name info} $cstruct {
        set map {}
        lappend map @NAME@ $name
        lappend map @MACRO@ GET[string toupper $name]

        if {[dict exists $info deleteproc]} {
          lappend map @DELETEPROC@ [dict get $info deleteproc]
        } else {
          lappend map @DELETEPROC@ NULL
        }
        if {[dict exists $info cloneproc]} {
          lappend map @CLONEPROC@ [dict get $info cloneproc]
        } else {
          lappend map @CLONEPROC@ NULL
        }
        ::practcl::cputs result [string map $map {
const static Tcl_ObjectMetadataType @NAME@DataType = {
  TCL_OO_METADATA_VERSION_CURRENT,
  "@NAME@",
  @DELETEPROC@,
  @CLONEPROC@
};
#define @MACRO@(OBJCONTEXT) (@NAME@ *) Tcl_ObjectGetMetadata(OBJCONTEXT,&@NAME@DataType)
}]
      }
    }
    if {[info exists tcltype]} {
      foreach {type info} $tcltype {
        dict with info {}
        ::practcl::cputs result "const Tcl_ObjType $cname = \{\n .name=\"$type\",\n .freeIntRepProc = &${freeproc},\n  .dupIntRepProc = &${dupproc},\n  .updateStringProc = &${updatestringproc},\n  .setFromAnyProc = &${setfromanyproc}\n\}\;"
      }
    }

    if {[info exists methods]} {
      set mtypes {}
      foreach {name info} $methods {
        set callproc   [dict get $info callproc]
        set methodtype [dict get $info methodtype]
        if {$methodtype in $mtypes} continue
        lappend mtypes $methodtype
        ###
        # Build the data struct for this method
        ###
        ::practcl::cputs result "const static Tcl_MethodType $methodtype = \{"
        ::practcl::cputs result "  .version = TCL_OO_METADATA_VERSION_CURRENT,\n  .name = \"$name\",\n  .callProc = $callproc,"
        if {[dict exists $info deleteproc]} {
          set deleteproc [dict get $info deleteproc]
        } else {
          set deleteproc NULL
        }
        if {$deleteproc ni { {} NULL }} {
          ::practcl::cputs result "  .deleteProc = $deleteproc,"
        } else {
          ::practcl::cputs result "  .deleteProc = NULL,"
        }
        if {[dict exists $info cloneproc]} {
          set cloneproc [dict get $info cloneproc]
        } else {
          set cloneproc NULL
        }
        if {$cloneproc ni { {} NULL }} {
          ::practcl::cputs result "  .cloneProc = $cloneproc\n\}\;"
        } else {
          ::practcl::cputs result "  .cloneProc = NULL\n\}\;"
        }
        dict set methods $name methodtype $methodtype
      }
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-cfile-constant]
    }
    return $result
  }

  method generate-cfile-header {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct cstruct methods tcltype tclprocs
    set result {}
    if {[info exists code(header)]} {
      ::practcl::cputs result $code(header)
    }
    ::practcl::debug [list cfunct [info exists cfunct]]
    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {
        if {[dict get $info public]} continue
        ::practcl::cputs result "[dict get $info header]\;"
      }
    }
    ::practcl::debug [list tclprocs [info exists tclprocs]]
    if {[info exists tclprocs]} {
      foreach {name info} $tclprocs {
        if {[dict exists $info header]} {
          ::practcl::cputs result "[dict get $info header]\;"
        }
      }
    }
    ::practcl::debug [list methods [info exists methods] [my define get cclass]]
    if {[info exists methods]} {
      set thisclass [my define get cclass]
      foreach {name info} $methods {
        if {[dict exists $info header]} {
          ::practcl::cputs result "[dict get $info header]\;"
        }
      }
      # Add the initializer wrapper for the class
      ::practcl::cputs result "static int ${thisclass}_OO_Init(Tcl_Interp *interp)\;"
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      set dat [$obj generate-cfile-header]
      if {[string length [string trim $dat]]} {
        ::practcl::cputs result "/* BEGIN [$obj define get filename] generate-cfile-header */"
        ::practcl::cputs result $dat
        ::practcl::cputs result "/* END [$obj define get filename] generate-cfile-header */"
      }
    }
    return $result
  }

  ###
  # Generate code that provides implements Tcl API
  # calls
  ###
  method generate-cfile-tclapi {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code methods tclprocs
    set result {}
    if {[info exists code(method)]} {
      ::practcl::cputs result $code(method)
    }

    if {[info exists tclprocs]} {
      foreach {name info} $tclprocs {
        if {![dict exists $info body]} continue
        set callproc [dict get $info callproc]
        set header [dict get $info header]
        set body [dict get $info body]
        ::practcl::cputs result "/* Tcl Proc $name */"
        ::practcl::cputs result "${header} \{${body}\}"
      }
    }


    if {[info exists methods]} {
      set thisclass [my define get cclass]
      foreach {name info} $methods {
        if {![dict exists $info body]} continue
        set callproc [dict get $info callproc]
        set header [dict get $info header]
        set body [dict get $info body]
        ::practcl::cputs result "/* OO Method $thisclass $name */"
        ::practcl::cputs result "${header} \{${body}\}"
      }
      # Build the OO_Init function
      ::practcl::cputs result "/* Loader for $thisclass */"
      ::practcl::cputs result "static int ${thisclass}_OO_Init(Tcl_Interp *interp) \{"
      ::practcl::cputs result [string map [list @CCLASS@ $thisclass @TCLCLASS@ [my define get class]] {
  /*
  ** Build the "@TCLCLASS@" class
  */
  Tcl_Obj* nameObj;		/* Name of a class or method being looked up */
  Tcl_Object curClassObject;  /* Tcl_Object representing the current class */
  Tcl_Class curClass;		/* Tcl_Class representing the current class */

  /*
   * Find the "@TCLCLASS@" class, and attach an 'init' method to it.
   */

  nameObj = Tcl_NewStringObj("@TCLCLASS@", -1);
  Tcl_IncrRefCount(nameObj);
  if ((curClassObject = Tcl_GetObjectFromObj(interp, nameObj)) == NULL) {
      Tcl_DecrRefCount(nameObj);
      return TCL_ERROR;
  }
  Tcl_DecrRefCount(nameObj);
  curClass = Tcl_GetObjectAsClass(curClassObject);
}]
      if {[dict exists $methods constructor]} {
        set mtype [dict get $methods constructor methodtype]
        ::practcl::cputs result [string map [list @MTYPE@ $mtype] {
  /* Attach the constructor to the class */
  Tcl_ClassSetConstructor(interp, curClass, Tcl_NewMethod(interp, curClass, NULL, 1, &@MTYPE@, NULL));
    }]
      }
      foreach {name info} $methods {
        dict with info {}
        if {$name in {constructor destructor}} continue
        ::practcl::cputs result [string map [list @NAME@ $name @MTYPE@ $methodtype] {
  nameObj=Tcl_NewStringObj("@NAME@",-1);
  Tcl_NewMethod(interp, curClass, nameObj, 1, &@MTYPE@, (ClientData) NULL);
  Tcl_DecrRefCount(nameObj);
}]
        if {[dict exists $info aliases]} {
          foreach alias [dict get $info aliases] {
            if {[dict exists $methods $alias]} continue
            ::practcl::cputs result [string map [list @NAME@ $alias @MTYPE@ $methodtype] {
  nameObj=Tcl_NewStringObj("@NAME@",-1);
  Tcl_NewMethod(interp, curClass, nameObj, 1, &@MTYPE@, (ClientData) NULL);
  Tcl_DecrRefCount(nameObj);
}]
          }
        }
      }
      ::practcl::cputs result "  return TCL_OK\;\n\}\n"
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-cfile-tclapi]
    }
    return $result
  }

  ###
  # Generate code that runs when the package/module is
  # initialized into the interpreter
  ###
  method generate-loader-module {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code methods tclprocs
    if {[info exists code(nspace)]} {
      ::practcl::cputs result "  \{\n    Tcl_Namespace *modPtr;"
      foreach nspace $code(nspace) {
        ::practcl::cputs result [string map [list @NSPACE@ $nspace] {
    modPtr=Tcl_FindNamespace(interp,"@NSPACE@",NULL,TCL_NAMESPACE_ONLY);
    if(!modPtr) {
      modPtr = Tcl_CreateNamespace(interp, "@NSPACE@", NULL, NULL);
    }
}]
      }
      ::practcl::cputs result "  \}"
    }
    if {[info exists code(tclinit)]} {
      ::practcl::cputs result $code(tclinit)
    }
    if {[info exists code(cinit)]} {
      ::practcl::cputs result $code(cinit)
    }
    if {[info exists code(initfuncts)]} {
      foreach func $code(initfuncts) {
        ::practcl::cputs result "  if (${func}(interp) != TCL_OK) return TCL_ERROR\;"
      }
    }
    if {[info exists tclprocs]} {
      foreach {name info} $tclprocs {
        set map [list @NAME@ $name @CALLPROC@ [dict get $info callproc]]
        ::practcl::cputs result [string map $map {  Tcl_CreateObjCommand(interp,"@NAME@",(Tcl_ObjCmdProc *)@CALLPROC@,NULL,NULL);}]
        if {[dict exists $info aliases]} {
          foreach alias [dict get $info aliases] {
            set map [list @NAME@ $alias @CALLPROC@ [dict get $info callproc]]
            ::practcl::cputs result [string map $map {  Tcl_CreateObjCommand(interp,"@NAME@",(Tcl_ObjCmdProc *)@CALLPROC@,NULL,NULL);}]
          }
        }
      }
    }

    if {[info exists code(nspace)]} {
      ::practcl::cputs result "  \{\n    Tcl_Namespace *modPtr;"
      foreach nspace $code(nspace) {
        ::practcl::cputs result [string map [list @NSPACE@ $nspace] {
    modPtr=Tcl_FindNamespace(interp,"@NSPACE@",NULL,TCL_NAMESPACE_ONLY);
    Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
    Tcl_Export(interp, modPtr, "[a-z]*", 1);
}]
      }
      ::practcl::cputs result "  \}"
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} {
        ::practcl::cputs result [$obj generate-loader-external]
      } else {
        ::practcl::cputs result [$obj generate-loader-module]
      }
    }
    return $result
  }

  method Collate_Source CWD {
    my variable methods code cstruct tclprocs
    if {[info exists methods]} {
      ::practcl::debug [self] methods [my define get cclass]
      set thisclass [my define get cclass]
      foreach {name info} $methods {
        # Provide a callproc
        if {![dict exists $info callproc]} {
          set callproc [string map {____ _ ___ _ __ _} [string map {{ } _ : _} OOMethod_${thisclass}_${name}]]
          dict set methods $name callproc $callproc
        } else {
          set callproc [dict get $info callproc]
        }
        if {[dict exists $info body] && ![dict exists $info header]} {
          dict set methods $name header "static int ${callproc}(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext objectContext ,int objc ,Tcl_Obj *const *objv)"
        }
        if {![dict exists $info methodtype]} {
          set methodtype [string map {{ } _ : _} OOMethodType_${thisclass}_${name}]
          dict set methods $name methodtype $methodtype
        }
      }
      if {![info exists code(initfuncts)] || "${thisclass}_OO_Init" ni $code(initfuncts)} {
        lappend code(initfuncts) "${thisclass}_OO_Init"
      }
    }
    set thisnspace [my define get nspace]

    if {[info exists tclprocs]} {
      ::practcl::debug [self] tclprocs [dict keys $tclprocs]
      foreach {name info} $tclprocs {
        if {![dict exists $info callproc]} {
          set callproc [string map {____ _ ___ _ __ _} [string map {{ } _ : _} TclCmd_${thisnspace}_${name}]]
          dict set tclprocs $name callproc $callproc
        } else {
          set callproc [dict get $info callproc]
        }
        if {[dict exists $info body] && ![dict exists $info header]} {
          dict set tclprocs $name header "static int ${callproc}(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv\[\])"
        }
      }
    }
  }

  # Once an object marks itself as some
  # flavor of dynamic, stop trying to morph
  # it into something else
  method select {} {}

}


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/practcl/build/class/metaclass.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
###
# The metaclass for all practcl objects
###
::clay::define ::practcl::metaclass {

  method _MorphPatterns {} {
    return {{@name@} {::practcl::@name@} {::practcl::*@name@} {::practcl::*@name@*}}
  }

  method define {submethod args} {
    my variable define
    switch $submethod {
      dump {
        return [array get define]
      }
      add {
        set field [lindex $args 0]
        if {![info exists define($field)]} {
          set define($field) {}
        }
        foreach arg [lrange $args 1 end] {
          if {$arg ni $define($field)} {
            lappend define($field) $arg
          }
        }
        return $define($field)
      }
      remove {
        set field [lindex $args 0]
        if {![info exists define($field)]} {
          return
        }
        set rlist [lrange $args 1 end]
        set olist $define($field)
        set nlist {}
        foreach arg $olist {
          if {$arg in $rlist} continue
          lappend nlist $arg
        }
        set define($field) $nlist
        return $nlist
      }
      exists {
        set field [lindex $args 0]
        return [info exists define($field)]
      }
      getnull -
      get -
      cget {
        set field [lindex $args 0]
        if {[info exists define($field)]} {
          return $define($field)
        }
        return [lindex $args 1]
      }
      set {
        if {[llength $args]==1} {
          set arglist [lindex $args 0]
        } else {
          set arglist $args
        }
        array set define $arglist
        if {[dict exists $arglist class]} {
          my select
        }
      }
      default {
        array $submethod define {*}$args
      }
    }
  }

  method graft args {
    return [my clay delegate {*}$args]
  }

  method initialize {} {}


  method link {command args} {
    my variable links
    switch $command {
      object {
        foreach obj $args {
          foreach linktype [$obj linktype] {
            my link add $linktype $obj
          }
        }
      }
      add {
        ###
        # Add a link to an object that was externally created
        ###
        if {[llength $args] ne 2} { error "Usage: link add LINKTYPE OBJECT"}
        lassign $args linktype object
        if {[info exists links($linktype)] && $object in $links($linktype)} {
          return
        }
        lappend links($linktype) $object
      }
      remove {
        set object [lindex $args 0]
        if {[llength $args]==1} {
          set ltype *
        } else {
          set ltype [lindex $args 1]
        }
        foreach {linktype elements} [array get links $ltype] {
          if {$object in $elements} {
            set nlist {}
            foreach e $elements {
              if { $object ne $e } { lappend nlist $e }
            }
            set links($linktype) $nlist
          }
        }
      }
      list {
        if {[llength $args]==0} {
          return [array get links]
        }
        if {[llength $args] != 1} { error "Usage: link list LINKTYPE"}
        set linktype [lindex $args 0]
        if {![info exists links($linktype)]} {
          return {}
        }
        return $links($linktype)
      }
      dump {
        return [array get links]
      }
    }
  }

  method morph classname {
    my variable define
    if {$classname ne {}} {
      set map [list @name@ $classname]
      foreach pattern [string map $map [my _MorphPatterns]] {
        set pattern [string trim $pattern]
        set matches [info commands $pattern]
        if {![llength $matches]} continue
        set class [lindex $matches 0]
        break
      }
      set mixinslot {}
      foreach {slot pattern} {
        distribution ::practcl::distribution*
        product      ::practcl::product*
        toolset      ::practcl::toolset*
      } {
        if {[string match $pattern $class]} {
           set mixinslot $slot
           break
        }
      }
      if {$mixinslot ne {}} {
        my clay mixinmap $mixinslot $class
      } elseif {[info command $class] ne {}} {
        if {[info object class [self]] ne $class} {
          ::oo::objdefine [self] class $class
          ::practcl::debug [self] morph $class
           my define set class $class
        }
      } else {
        error "[self] Could not detect class for $classname"
      }
    }
    if {[::info exists define(oodefine)]} {
      ::oo::objdefine [self] $define(oodefine)
      #unset define(oodefine)
    }
  }

  method script script {
    eval $script
  }

  method select {} {
    my variable define
    if {[info exists define(class)]} {
      my morph $define(class)
    } else {
      if {[::info exists define(oodefine)]} {
        ::oo::objdefine [self] $define(oodefine)
        #unset define(oodefine)
      }
    }
  }

  method source filename {
    source $filename
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































Deleted modules/practcl/build/class/module.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390

###
# In the end, all C code must be loaded into a module
# This will either be a dynamically loaded library implementing
# a tcl extension, or a compiled in segment of a custom shell/app
###
::clay::define ::practcl::module {
  superclass ::practcl::object ::practcl::product.dynamic

  Dict make_object {}

  method _MorphPatterns {} {
    return {{@name@} {::practcl::module.@name@} ::practcl::module}
  }

  method add args {
    my variable links
    set object [::practcl::object new [self] {*}$args]
    foreach linktype [$object linktype] {
      lappend links($linktype) $object
    }
    return $object
  }

  method install-headers args {}

  Ensemble make::_preamble {} {
    my variable make_object
    if {![info exists make_object]} {
      set make_object {}
    }
  }
  Ensemble make::pkginfo {} {
    ###
    # Build local variables needed for install
    ###
    package require platform
    set result {}
    set dat [my define dump]
    set PKG_DIR [dict get $dat name][dict get $dat version]
    dict set result PKG_DIR $PKG_DIR
    dict with dat {}
    if {![info exists DESTDIR]} {
      set DESTDIR {}
    }
    dict set result profile [::platform::identify]
    dict set result os $::tcl_platform(os)
    dict set result platform $::tcl_platform(platform)
    foreach {field value} $dat {
      switch $field {
        includedir -
        mandir -
        datadir -
        libdir -
        libfile -
        name -
        output_tcl -
        version -
        authors -
        license -
        requires {
          dict set result $field $value
        }
        TEA_PLATFORM {
          dict set result platform $value
        }
        TEACUP_OS {
          dict set result os $value
        }
        TEACUP_PROFILE {
          dict set result profile $value
        }
        TEACUP_ZIPFILE {
          dict set result zipfile $value
        }
      }
    }
    if {![dict exists $result zipfile]} {
      dict set result zipfile "[dict get $result name]-[dict get $result version]-[dict get $result profile].zip"
    }
    return $result
  }

  # Return a dictionary of all handles and associated objects
  Ensemble make::objects {} {
    return $make_object
  }

  # Return the object associated with handle [emph name]
  Ensemble make::object name {
    if {[dict exists $make_object $name]} {
      return [dict get $make_object $name]
    }
    return {}
  }

  # Reset all deputy objects
  Ensemble make::reset {} {
    foreach {name obj} $make_object {
      $obj reset
    }
  }

  # Exercise the triggers method for all handles listed
  Ensemble make::trigger args {
    foreach {name obj} $make_object {
      if {$name in $args} {
        $obj triggers
      }
    }
  }

  # Exercise the check method for all handles listed
  Ensemble make::depends args {
    foreach {name obj} $make_object {
      if {$name in $args} {
        $obj check
      }
    }
  }

  # Return the file name of the build product for the listed
  # handle
  Ensemble make::filename name {
    if {[dict exists $make_object $name]} {
      return [[dict get $make_object $name] define get filename]
    }
  }

  Ensemble make::target {name Info body} {
    set info [uplevel #0 [list subst $Info]]
    set nspace [namespace current]
    if {[dict exist $make_object $name]} {
      set obj [dict get $$make_object $name]
    } else {
      set obj [::practcl::make_obj new [self] $name $info $body]
      dict set make_object $name $obj
      dict set target_make $name 0
      dict set target_trigger $name 0
    }
    if {[dict exists $info aliases]} {
      foreach item [dict get $info aliases] {
        if {![dict exists $make_object $item]} {
          dict set make_object $item $obj
        }
      }
    }
    return $obj
  }
  clay set method_ensemble make target aliases {target add}

  # Return a list of handles for object which return true for the
  # do method
  Ensemble make::todo {} {
    foreach {name obj} $make_object {
      if {[$obj do]} {
        lappend result $name
      }
    }
    return $result
  }

  # For each target exercise the action specified in the [emph action]
  # definition if the [emph do] method returns true
  Ensemble make::do {} {
    global CWD SRCDIR project SANDBOX
    foreach {name obj} $make_object {
      if {[$obj do]} {
        eval [$obj define get action]
      }
    }
  }

  method child which {
    switch $which {
      delegate -
      organs {
        return [list project [my define get project] module [self]]
      }
    }
  }

 ###
  # This methods generates the contents of an amalgamated .c file
  # which implements the loader for a batch of tools
  ###
  method generate-c {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {
/* This file was generated by practcl */
    }
    set includes {}

    foreach mod [my link list product] {
      # Signal modules to formulate final implementation
      $mod go
    }
    set headers {}

    my IncludeAdd headers <tcl.h> <tclOO.h>
    if {[my define get tk 0]} {
      my IncludeAdd headers <tk.h>
    }
    if {[my define get output_h] ne {}} {
      my IncludeAdd headers [my define get output_h]
    }
    my IncludeAdd headers {*}[my define get include]

    foreach mod [my link list dynamic] {
      my IncludeAdd headers {*}[$mod define get include]
    }
    foreach inc $headers {
      ::practcl::cputs result "#include $inc"
    }
    foreach {method} {
      generate-cfile-header
      generate-cfile-private-typedef
      generate-cfile-private-structure
      generate-cfile-public-structure
      generate-cfile-constant
      generate-cfile-global
      generate-cfile-functions
      generate-cfile-tclapi
    } {
      set dat [my $method]
      if {[string length [string trim $dat]]} {
        ::practcl::cputs result "/* BEGIN $method [my define get filename] */"
        ::practcl::cputs result $dat
        ::practcl::cputs result "/* END $method [my define get filename] */"
      }
    }
    ::practcl::debug [list /[self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    return $result
  }


  ###
  # This methods generates the contents of an amalgamated .h file
  # which describes the public API of this module
  ###
  method generate-h {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    foreach method {
      generate-hfile-public-define
      generate-hfile-public-macro
    } {
      ::practcl::cputs result "/* BEGIN SECTION $method */"
      ::practcl::cputs result [my $method]
      ::practcl::cputs result "/* END SECTION $method */"
    }
    set includes [my generate-hfile-public-includes]
    foreach inc $includes {
      if {[string index $inc 0] ni {< \"}} {
        ::practcl::cputs result "#include \"$inc\""
      } else {
        ::practcl::cputs result "#include $inc"
      }
    }
    foreach method {
      generate-hfile-public-typedef
      generate-hfile-public-structure
    } {
      ::practcl::cputs result "/* BEGIN SECTION $method */"
      ::practcl::cputs result [my $method]
      ::practcl::cputs result "/* END SECTION $method */"
    }

    foreach file [my generate-hfile-public-verbatim] {
      ::practcl::cputs result "/* BEGIN $file */"
      ::practcl::cputs result [::practcl::cat $file]
      ::practcl::cputs result "/* END $file */"
    }

    foreach method {
      generate-hfile-public-headers
      generate-hfile-public-function
    } {
      ::practcl::cputs result "/* BEGIN SECTION $method */"
      ::practcl::cputs result [my $method]
      ::practcl::cputs result "/* END SECTION $method */"
    }
    return $result
  }

  method generate-loader {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    if {[my define get initfunc] eq {}} return
    ::practcl::cputs result  "
extern int DLLEXPORT [my define get initfunc]( Tcl_Interp *interp ) \{"
    ::practcl::cputs result  {
  /* Initialise the stubs tables. */
  #ifdef USE_TCL_STUBS
    if (Tcl_InitStubs(interp, "8.6", 0)==NULL) return TCL_ERROR;
    if (TclOOInitializeStubs(interp, "1.0") == NULL) return TCL_ERROR;
}
    if {[my define get tk 0]} {
      ::practcl::cputs result  {    if (Tk_InitStubs(interp, "8.6", 0)==NULL) return TCL_ERROR;}
    }
    ::practcl::cputs result {  #endif}
    set TCLINIT [my generate-tcl-pre]
    if {[string length [string trim $TCLINIT]]} {
      ::practcl::cputs result "  if(interp) {\nif(Tcl_Eval(interp,[::practcl::tcl_to_c $TCLINIT])) return TCL_ERROR;\n  }"
    }
    ::practcl::cputs result [my generate-loader-module]

    set TCLINIT [my generate-tcl-post]
    if {[string length [string trim $TCLINIT]]} {
      ::practcl::cputs result "  if(interp) {\nif(Tcl_Eval(interp,[::practcl::tcl_to_c $TCLINIT])) return TCL_ERROR;\n }"
    }
    if {[my define exists pkg_name]} {
      ::practcl::cputs result  "    if (Tcl_PkgProvide(interp, \"[my define get pkg_name [my define get name]]\" , \"[my define get pkg_vers [my define get version]]\" )) return TCL_ERROR\;"
    }
    ::practcl::cputs result  "  return TCL_OK\;\n\}\n"
    return $result
  }
  method initialize {} {
    set filename [my define get filename]
    if {$filename eq {}} {
      return
    }
    if {[my define get name] eq {}} {
      my define set name [file tail [file dirname $filename]]
    }
    if {[my define get localpath] eq {}} {
      my define set localpath [my <project> define get name]_[my define get name]
    }
    my graft module [self]
    ::practcl::debug [self] SOURCE $filename
    my source $filename
  }

  method implement path {
    my go
    my Collate_Source $path
    set errs {}
    foreach item [my link list dynamic] {
      if {[catch {$item implement $path} err errdat]} {
        lappend errs "Skipped $item: [$item define get filename] $err"
        if {[dict exists $errdat -errorinfo]} {
          lappend errs [dict get $errdat -errorinfo]
        } else {
          lappend errs $errdat
        }
      }
    }
    foreach item [my link list module] {
      if {[catch {$item implement $path} err errdat]} {
        lappend errs "Skipped $item: [$item define get filename] $err"
        if {[dict exists $errdat -errorinfo]} {
          lappend errs [dict get $errdat -errorinfo]
        } else {
          lappend errs $errdat
        }
      }
    }
    if {[llength $errs]} {
      set logfile [file join $::CWD practcl.log]
      ::practcl::log $logfile "*** ERRORS ***"
      foreach {item trace} $errs {
        ::practcl::log $logfile "###\n# ERROR\n###\n$item"
       ::practcl::log $logfile "###\n# TRACE\n###\n$trace"
      }
      ::practcl::log $logfile "*** DEBUG INFO ***"
      ::practcl::log $logfile $::DEBUG_INFO
      puts stderr "Errors saved to $logfile"
      exit 1
    }
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set filename [my define get output_c]
    if {$filename eq {}} {
      ::practcl::debug [list /[self] [self method] [self class]]
      return
    }
    set cout [open [file join $path [file rootname $filename].c] w]
    puts $cout [subst {/*
** This file is generated by the [info script] script
** any changes will be overwritten the next time it is run
*/}]
    puts $cout [my generate-c]
    puts $cout [my generate-loader]
    close $cout
    ::practcl::debug [list /[self] [self method] [self class]]
  }

  method linktype {} {
    return {subordinate product dynamic module}
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/practcl/build/class/object.tcl.

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
###
# A generic Practcl object
###
::clay::define ::practcl::object {
  superclass ::practcl::metaclass

  constructor {parent args} {
    my variable links define
    set organs [$parent child organs]
    my clay delegate {*}$organs
    array set define $organs
    array set define [$parent child define]
    array set links {}
    if {[llength $args]==1 && [file exists [lindex $args 0]]} {
      my define set filename [lindex $args 0]
      ::practcl::product select [self]
    } elseif {[llength $args] == 1} {
      set data  [uplevel 1 [list subst [lindex $args 0]]]
      array set define $data
      my select
    } else {
      array set define [uplevel 1 [list subst $args]]
      my select
    }
    my initialize

  }

  method child {method} {
    return {}
  }

  method go {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable links
    foreach {linktype objs} [array get links] {
      foreach obj $objs {
        $obj go
      }
    }
    ::practcl::debug [list /[self] [self method] [self class]]
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































Deleted modules/practcl/build/class/product.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
###
# A deliverable for the build system
###
::clay::define ::practcl::product {

  method code {section body} {
    my variable code
    ::practcl::cputs code($section) $body
  }

  method Collate_Source CWD {}

  method project-compile-products {} {
    set result {}
    noop {
    set filename [my define get filename]
    if {$filename ne {}} {
      ::practcl::debug [self] [self class] [self method] project-compile-products $filename
      if {[my define exists ofile]} {
        set ofile [my define get ofile]
      } else {
        set ofile [my Ofile $filename]
        my define set ofile $ofile
      }
      lappend result $ofile [list cfile $filename include [my define get include]  extra [my define get extra] external [string is true -strict [my define get external]] object [self]]
    }
    }
    foreach item [my link list subordinate] {
      lappend result {*}[$item project-compile-products]
    }
    return $result
  }

  method generate-debug {{spaces {}}} {
    set result {}
    ::practcl::cputs result "$spaces[list [self] [list class [info object class [self]] filename [my define get filename]] links [my link list]]"
    foreach item [my link list subordinate] {
      practcl::cputs result [$item generate-debug "$spaces  "]
    }
    return $result
  }

  method generate-cfile-constant {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code cstruct methods tcltype
    if {[info exists code(constant)]} {
      ::practcl::cputs result "/* [my define get filename] CONSTANT */"
      ::practcl::cputs result $code(constant)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-cfile-constant]
    }
    return $result
  }

  ###
  # Populate const static data structures
  ###
  method generate-cfile-public-structure {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct methods tcltype
    set result {}
    if {[info exists code(struct)]} {
      ::practcl::cputs result $code(struct)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-cfile-public-structure]
    }
    return $result
  }

  method generate-cfile-header {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct cstruct methods tcltype tclprocs
    set result {}
    if {[info exists code(header)]} {
      ::practcl::cputs result $code(header)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      set dat [$obj generate-cfile-header]
      if {[string length [string trim $dat]]} {
        ::practcl::cputs result "/* BEGIN [$obj define get filename] generate-cfile-header */"
        ::practcl::cputs result $dat
        ::practcl::cputs result "/* END [$obj define get filename] generate-cfile-header */"
      }
    }
    return $result
  }

  method generate-cfile-global {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct cstruct methods tcltype tclprocs
    set result {}
    if {[info exists code(global)]} {
      ::practcl::cputs result $code(global)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      set dat [$obj generate-cfile-global]
      if {[string length [string trim $dat]]} {
        ::practcl::cputs result "/* BEGIN [$obj define get filename] generate-cfile-global */"
        ::practcl::cputs result $dat
        ::practcl::cputs result "/* END [$obj define get filename] generate-cfile-global */"
      }
    }
    return $result
  }

  method generate-cfile-private-typedef {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct
    set result {}
    if {[info exists code(private-typedef)]} {
      ::practcl::cputs result $code(private-typedef)
    }
    if {[info exists cstruct]} {
      # Add defintion for native c data structures
      foreach {name info} $cstruct {
        if {[dict get $info public]==1} continue
        ::practcl::cputs result "typedef struct $name ${name}\;"
        if {[dict exists $info aliases]} {
          foreach n [dict get $info aliases] {
            ::practcl::cputs result "typedef struct $name ${n}\;"
          }
        }
      }
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-cfile-private-typedef]
    }
    return $result
  }

  method generate-cfile-private-structure {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct
    set result {}
    if {[info exists code(private-structure)]} {
      ::practcl::cputs result $code(private-structure)
    }
    if {[info exists cstruct]} {
      foreach {name info} $cstruct {
        if {[dict get $info public]==1} continue
        if {[dict exists $info comment]} {
          ::practcl::cputs result [dict get $info comment]
        }
        ::practcl::cputs result "struct $name \{[dict get $info body]\}\;"
      }
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-cfile-private-structure]
    }
    return $result
  }


  ###
  # Generate code that provides subroutines called by
  # Tcl API methods
  ###
  method generate-cfile-functions {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct
    set result {}
    if {[info exists code(funct)]} {
      ::practcl::cputs result $code(funct)
    }
    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {
        ::practcl::cputs result "/* $funcname */"
        if {[dict get $info inline] && [dict get $info public]} {
          ::practcl::cputs result "\ninline [dict get $info header]\{[dict get $info body]\}"
        } else {
          ::practcl::cputs result "\n[dict get $info header]\{[dict get $info body]\}"
        }
      }
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} {
        continue
      }
      ::practcl::cputs result [$obj generate-cfile-functions]
    }
    return $result
  }

  ###
  # Generate code that provides implements Tcl API
  # calls
  ###
  method generate-cfile-tclapi {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code methods tclprocs
    set result {}
    if {[info exists code(method)]} {
      ::practcl::cputs result $code(method)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-cfile-tclapi]
    }
    return $result
  }


  method generate-hfile-public-define {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code
    set result {}
    if {[info exists code(public-define)]} {
      ::practcl::cputs result $code(public-define)
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-define]
    }
    return $result
  }

  method generate-hfile-public-macro {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code
    set result {}
    if {[info exists code(public-macro)]} {
      ::practcl::cputs result $code(public-macro)
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-macro]
    }
    return $result
  }

  method generate-hfile-public-typedef {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct
    set result {}
    if {[info exists code(public-typedef)]} {
      ::practcl::cputs result $code(public-typedef)
    }
    if {[info exists cstruct]} {
      # Add defintion for native c data structures
      foreach {name info} $cstruct {
        if {[dict get $info public]==0} continue
        ::practcl::cputs result "typedef struct $name ${name}\;"
        if {[dict exists $info aliases]} {
          foreach n [dict get $info aliases] {
            ::practcl::cputs result "typedef struct $name ${n}\;"
          }
        }
      }
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-typedef]
    }
    return $result
  }

  method generate-hfile-public-structure {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct
    set result {}
    if {[info exists code(public-structure)]} {
      ::practcl::cputs result $code(public-structure)
    }
    if {[info exists cstruct]} {
      foreach {name info} $cstruct {
        if {[dict get $info public]==0} continue
        if {[dict exists $info comment]} {
          ::practcl::cputs result [dict get $info comment]
        }
        ::practcl::cputs result "struct $name \{[dict get $info body]\}\;"
      }
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-structure]
    }
    return $result
  }

  method generate-hfile-public-headers {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code tcltype
    set result {}
    if {[info exists code(public-header)]} {
      ::practcl::cputs result $code(public-header)
    }
    if {[info exists tcltype]} {
      foreach {type info} $tcltype {
        if {![dict exists $info cname]} {
          set cname [string tolower ${type}]_tclobjtype
          dict set tcltype $type cname $cname
        } else {
          set cname [dict get $info cname]
        }
        ::practcl::cputs result "extern const Tcl_ObjType $cname\;"
      }
    }
    if {[info exists code(public)]} {
      ::practcl::cputs result $code(public)
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-headers]
    }
    return $result
  }

  method generate-hfile-public-function {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct tcltype
    set result {}

    if {[my define get initfunc] ne {}} {
      ::practcl::cputs result "int [my define get initfunc](Tcl_Interp *interp);"
    }
    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {
        if {![dict get $info public]} continue
        ::practcl::cputs result "[dict get $info header]\;"
      }
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-function]
    }
    return $result
  }

  method generate-hfile-public-includes {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set includes {}
    foreach item [my define get public-include] {
      if {$item ni $includes} {
        lappend includes $item
      }
    }
    foreach mod [my link list product] {
      foreach item [$mod generate-hfile-public-includes] {
        if {$item ni $includes} {
          lappend includes $item
        }
      }
    }
    return $includes
  }

  method generate-hfile-public-verbatim {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set includes {}
    foreach item [my define get public-verbatim] {
      if {$item ni $includes} {
        lappend includes $item
      }
    }
    foreach mod [my link list subordinate] {
      foreach item [$mod generate-hfile-public-verbatim] {
        if {$item ni $includes} {
          lappend includes $item
        }
      }
    }
    return $includes
  }

  method generate-loader-external {} {
    if {[my define get initfunc] eq {}} {
      return "/*  [my define get filename] declared not initfunc */"
    }
    return "  if([my define get initfunc](interp)) return TCL_ERROR\;"
  }

  method generate-loader-module {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code
    set result {}
    if {[info exists code(cinit)]} {
      ::practcl::cputs result $code(cinit)
    }
    if {[my define get initfunc] ne {}} {
      ::practcl::cputs result "  if([my define get initfunc](interp)!=TCL_OK) return TCL_ERROR\;"
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach item [my link list product] {
      if {[$item define get output_c] ne {}} {
        ::practcl::cputs result [$item generate-loader-external]
      } else {
        ::practcl::cputs result [$item generate-loader-module]
      }
    }
    return $result
  }

  method generate-stub-function {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct tcltype
    set result {}
    foreach mod [my link list product] {
      foreach {funct def} [$mod generate-stub-function] {
        dict set result $funct $def
      }
    }
    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {
        if {![dict get $info export]} continue
        dict set result $funcname [dict get $info header]
      }
    }
    return $result
  }


  method IncludeAdd {headervar args} {
    upvar 1 $headervar headers
    foreach inc $args {
      if {[string index $inc 0] ni {< \"}} {
        set inc "\"$inc\""
      }
      if {$inc ni $headers} {
        lappend headers $inc
      }
    }
  }

  method generate-tcl-loader {} {
    set result {}
    set PKGINIT [my define get pkginit]
    set PKG_NAME [my define get name [my define get pkg_name]]
    set PKG_VERSION [my define get pkg_vers [my define get version]]
    if {[string is true [my define get SHARED_BUILD 0]]} {
      set LIBFILE [my define get libfile]
      ::practcl::cputs result [string map \
        [list @LIBFILE@ $LIBFILE @PKGINIT@ $PKGINIT @PKG_NAME@ $PKG_NAME @PKG_VERSION@ $PKG_VERSION] {
# Shared Library Style
load [file join [file dirname [file join [pwd] [info script]]] @LIBFILE@] @PKGINIT@
package provide @PKG_NAME@ @PKG_VERSION@
}]
    } else {
      ::practcl::cputs result [string map \
      [list @PKGINIT@ $PKGINIT @PKG_NAME@ $PKG_NAME @PKG_VERSION@ $PKG_VERSION] {
# Tclkit Style
load {} @PKGINIT@
package provide @PKG_NAME@ @PKG_VERSION@
}]
    }
    return $result
  }

  ###
  # This methods generates any Tcl script file
  # which is required to pre-initialize the C library
  ###
  method generate-tcl-pre {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code
    if {[info exists code(tcl)]} {
      set result [::practcl::_tagblock $code(tcl) tcl [my define get filename]]
    }
    if {[info exists code(tcl-pre)]} {
      set result [::practcl::_tagblock $code(tcl) tcl [my define get filename]]
    }
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-tcl-pre]
    }
    return $result
  }

  method generate-tcl-post {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code
    if {[info exists code(tcl-post)]} {
      set result [::practcl::_tagblock $code(tcl-post) tcl [my define get filename]]
    }
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-tcl-post]
    }
    return $result
  }


  method linktype {} {
    return {subordinate product}
  }

  method Ofile filename {
    set lpath [my <module> define get localpath]
    if {$lpath eq {}} {
      set lpath [my <module> define get name]
    }
    return ${lpath}_[file rootname [file tail $filename]]
  }

  ###
  # Methods called by the master project
  ###

  method project-static-packages {} {
    set result [my define get static_packages]
    set initfunc [my define get initfunc]
    if {$initfunc ne {}} {
      set pkg_name [my define get pkg_name]
      if {$pkg_name ne {}} {
        dict set result $pkg_name initfunc $initfunc
        dict set result $pkg_name version [my define get version [my define get pkg_vers]]
        dict set result $pkg_name autoload [my define get autoload 0]
      }
    }
    foreach item [my link list subordinate] {
      foreach {pkg info} [$item project-static-packages] {
        dict set result $pkg $info
      }
    }
    return $result
  }

  ###
  # Methods called by the toolset
  ###

  method toolset-include-directory {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result [my define get include_dir]
    foreach obj [my link list product] {
      foreach path [$obj toolset-include-directory] {
        lappend result $path
      }
    }
    return $result
  }

  method target {method args} {
    switch $method {
      is_unix { return [expr {$::tcl_platform(platform) eq "unix"}] }
    }
  }
}
oo::objdefine ::practcl::product {

  method select {object} {
    set class [$object define get class]
    set mixin [$object define get product]
    if {$class eq {} && $mixin eq {}} {
      set filename [$object define get filename]
      if {$filename ne {} && [file exists $filename]} {
        switch [file extension $filename] {
          .tcl {
            set mixin ::practcl::product.dynamic
          }
          .h {
            set mixin ::practcl::product.cheader
          }
          .c {
            set mixin ::practcl::product.csource
          }
          .ini {
            switch [file tail $filename] {
              module.ini {
                set class ::practcl::module
              }
              library.ini {
                set class ::practcl::subproject
              }
            }
          }
          .so -
          .dll -
          .dylib -
          .a {
            set mixin ::practcl::product.clibrary
          }
        }
      }
    }
    if {$class ne {}} {
      $object clay mixinmap core $class
    }
    if {$mixin ne {}} {
      $object clay mixinmap product $mixin
    }
  }
}

###
# A product which generated from a C header file. Which is to say, nothing.
###
::clay::define ::practcl::product.cheader {
  superclass ::practcl::product

  method project-compile-products {} {}
  method generate-loader-module {} {}
}

###
# A product which generated from a C source file. Normally an object (.o) file.
###
::clay::define ::practcl::product.csource {
  superclass ::practcl::product

  method project-compile-products {} {
    set result {}
    set filename [my define get filename]
    if {$filename ne {}} {
      ::practcl::debug [self] [self class] [self method] project-compile-products $filename
      if {[my define exists ofile]} {
        set ofile [my define get ofile]
      } else {
        set ofile [my Ofile $filename]
        my define set ofile $ofile
      }
      lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]] object [self]]
    }
    foreach item [my link list subordinate] {
      lappend result {*}[$item project-compile-products]
    }
    return $result
  }
}

###
# A product which is generated from a compiled C library.
# Usually a .a or a .dylib file, but in complex cases may
# actually just be a conduit for one project to integrate the
# source code of another
###
::clay::define ::practcl::product.clibrary {
  superclass ::practcl::product

  method linker-products {configdict} {
    return [my define get filename]
  }

}

###
# A product which is generated from C code that itself is generated
# by practcl or some other means. This C file may or may not produce
# its own .o file, depending on whether it is eligible to become part
# of an amalgamation
###
::clay::define ::practcl::product.dynamic {
  superclass ::practcl::dynamic ::practcl::product

  method initialize {} {
    set filename [my define get filename]
    if {$filename eq {}} {
      return
    }
    if {[my define get name] eq {}} {
      my define set name [file tail [file rootname $filename]]
    }
    if {[my define get localpath] eq {}} {
      my define set localpath [my <module> define get localpath]_[my define get name]
    }
    # Future Development:
    # Scan source file to see if it is encoded in criticl or practcl notation
    #set thisline {}
    #foreach line [split [::practcl::cat $filename] \n] {
    #
    #}
    ::source $filename
    if {[my define get output_c] ne {}} {
      # Turn into a module if we have an output_c file
      my morph ::practcl::module
    }
  }
}

###
# A binary product produced by critcl. Note: The implementation is not
# written yet, this class does nothing.
::clay::define ::practcl::product.critcl {
  superclass ::practcl::dynamic ::practcl::product
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/practcl/build/class/project/baseclass.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
###
# A toplevel project that is a collection of other projects
###
::clay::define ::practcl::project {
  superclass ::practcl::module

  method _MorphPatterns {} {
    return {{@name@} {::practcl::@name@} {::practcl::project.@name@} {::practcl::project}}
  }

  constructor args {
    my variable define
    if {[llength $args] == 1} {
      set rawcontents [lindex $args 0]
    } else {
      set rawcontents $args
    }
    if {[catch {uplevel 1 [list subst $rawcontents]} contents]} {
      set contents $rawcontents
    }
    ###
    # The first instance of ::practcl::project (or its descendents)
    # registers itself as the ::practcl::MAIN. If a project other
    # than ::practcl::LOCAL is created, odds are that was the one
    # the developer intended to be the main project
    ###
    if {$::practcl::MAIN eq "::practcl::LOCAL"} {
      set ::practcl::MAIN [self]
    }
    # DEFS fields need to be passed unchanged and unsubstituted
    # as we need to preserve their escape characters
    foreach field {TCL_DEFS DEFS TK_DEFS} {
      if {[dict exists $rawcontents $field]} {
        dict set contents $field [dict get $rawcontents $field]
      }
    }
    my graft module [self]
    array set define $contents
    ::practcl::toolset select [self]
    my initialize
  }

  method add_object object {
    my link object $object
  }

  method add_project {pkg info {oodefine {}}} {
    ::practcl::debug [self] add_project $pkg $info
    set os [my define get TEACUP_OS]
    if {$os eq {}} {
      set os [::practcl::os]
      my define set os $os
    }
    set fossilinfo [list download [my define get download] tag trunk sandbox [my define get sandbox]]
    if {[dict exists $info os] && ($os ni [dict get $info os])} return
    # Select which tag to use here.
    # For production builds: tag-release
    set profile [my define get profile release]:
    if {[dict exists $info profile $profile]} {
      dict set info tag [dict get $info profile $profile]
    }
    dict set info USEMSVC [my define get USEMSVC 0]
    dict set info debug [my define get debug 0]
    set obj [namespace current]::PROJECT.$pkg
    if {[info command $obj] eq {}} {
      set obj [::practcl::subproject create $obj [self] [dict merge $fossilinfo [list name $pkg pkg_name $pkg static 0 class subproject.binary] $info]]
    }
    my link object $obj
    oo::objdefine $obj $oodefine
    $obj define set masterpath $::CWD
    $obj go
    return $obj
  }

  method add_tool {pkg info {oodefine {}}} {
    ::practcl::debug [self] add_tool $pkg $info
    set info [dict merge [::practcl::local_os] $info]

    set os [dict get $info TEACUP_OS]
    set fossilinfo [list download [my define get download] tag trunk sandbox [my define get sandbox]]
    if {[dict exists $info os] && ($os ni [dict get $info os])} return
    # Select which tag to use here.
    # For production builds: tag-release
    set profile [my define get profile release]:
    if {[dict exists $info profile $profile]} {
      dict set info tag [dict get $info profile $profile]
    }
    set obj ::practcl::OBJECT::TOOL.$pkg
    if {[info command $obj] eq {}} {
      set obj [::practcl::subproject create $obj [self] [dict merge $fossilinfo [list name $pkg pkg_name $pkg static 0] $info]]
    }
    my link add tool $obj
    oo::objdefine $obj $oodefine
    $obj define set masterpath $::CWD
    $obj go
    return $obj
  }

  ###
  # Compile the Tcl core. If the define [emph tk] is true, compile the
  # Tk core as well
  ###
  method build-tclcore {} {
    set os [my define get TEACUP_OS]
    set tcl_config_opts [::practcl::platform::tcl_core_options $os]
    set tk_config_opts  [::practcl::platform::tk_core_options $os]

    lappend tcl_config_opts --prefix [my define get prefix] --exec-prefix [my define get prefix]
    set tclobj [my tclcore]
    if {[my define get debug 0]} {
      $tclobj define set debug 1
      lappend tcl_config_opts --enable-symbols=true
    }
    $tclobj define set config_opts $tcl_config_opts
    $tclobj go
    $tclobj compile

    set _TclSrcDir [$tclobj define get localsrcdir]
    my define set tclsrcdir $_TclSrcDir
    if {[my define get tk 0]} {
      set tkobj [my tkcore]
      lappend tk_config_opts --with-tcl=[::practcl::file_relative [$tkobj define get builddir]  [$tclobj define get builddir]]
      if {[my define get debug 0]} {
        $tkobj define set debug 1
        lappend tk_config_opts --enable-symbols=true
      }
      $tkobj define set config_opts $tk_config_opts
      $tkobj compile
    }
  }

  method child which {
    switch $which {
      delegate -
      organs {
	# A library can be a project, it can be a module. Any
	# subordinate modules will indicate their existance
        return [list project [self] module [self]]
      }
    }
  }

  method linktype {} {
    return project
  }


  # Exercise the methods of a sub-object
  method project {pkg args} {
    set obj [namespace current]::PROJECT.$pkg
    if {[llength $args]==0} {
      return $obj
    }
    ${obj} {*}$args
  }


  method tclcore {} {
    if {[info commands [set obj [my clay delegate tclcore]]] ne {}} {
      return $obj
    }
    if {[info commands [set obj [my project TCLCORE]]] ne {}} {
      my graft tclcore $obj
      return $obj
    }
    if {[info commands [set obj [my project tcl]]] ne {}} {
      my graft tclcore $obj
      return $obj
    }
    if {[info commands [set obj [my tool tcl]]] ne {}} {
      my graft tclcore $obj
      return $obj
    }
    # Provide a fallback
    set obj [my add_tool tcl {
      tag release class subproject.core
      fossil_url http://core.tcl.tk/tcl
    }]
    my graft tclcore $obj
    return $obj
  }

  method tkcore {} {
    if {[set obj [my clay delegate tkcore]] ne {}} {
      return $obj
    }
    if {[set obj [my project tk]] ne {}} {
      my graft tkcore $obj
      return $obj
    }
    if {[set obj [my tool tk]] ne {}} {
      my graft tkcore $obj
      return $obj
    }
    # Provide a fallback
    set obj [my add_tool tk {
      tag release class tool.core
      fossil_url http://core.tcl.tk/tk
    }]
    my graft tkcore $obj
    return $obj
  }

  method tool {pkg args} {
    set obj ::practcl::OBJECT::TOOL.$pkg
    if {[llength $args]==0} {
      return $obj
    }
    ${obj} {*}$args
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































Deleted modules/practcl/build/class/project/library.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
###
# A toplevel project that produces a library
###
::clay::define ::practcl::library {
  superclass ::practcl::project


  method clean {PATH} {
    set objext [my define get OBJEXT o]
    foreach {ofile info} [my project-compile-products] {
      if {[file exists [file join $PATH objs $ofile].${objext}]} {
        file delete [file join $PATH objs $ofile].${objext}
      }
    }
    foreach ofile [glob -nocomplain [file join $PATH *.${objext}]] {
      file delete $ofile
    }
    foreach ofile [glob -nocomplain [file join $PATH objs *]] {
      file delete $ofile
    }
    set libfile [my define get libfile]
    if {[file exists [file join $PATH $libfile]]} {
      file delete [file join $PATH $libfile]
    }
    my implement $PATH
  }

  method project-compile-products {} {
    set result {}
    foreach item [my link list subordinate] {
      lappend result {*}[$item project-compile-products]
    }
    set filename [my define get output_c]
    if {$filename ne {}} {
      ::practcl::debug [self] [self class] [self method] project-compile-products $filename
      set ofile [file rootname [file tail $filename]]_main
      lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]]]
    }
    return $result
  }


  method go {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set name [my define getnull name]
    if {$name eq {}} {
      set name generic
      my define name generic
    }
    if {[my define get tk] eq {@TEA_TK_EXTENSION@}} {
      my define set tk 0
    }
    set output_c [my define getnull output_c]
    if {$output_c eq {}} {
      set output_c [file rootname $name].c
      my define set output_c $output_c
    }
    set output_h [my define getnull output_h]
    if {$output_h eq {}} {
      set output_h [file rootname $output_c].h
      my define set output_h $output_h
    }
    set output_tcl [my define getnull output_tcl]
    #if {$output_tcl eq {}} {
    #  set output_tcl [file rootname $output_c].tcl
    #  my define set output_tcl $output_tcl
    #}
    #set output_mk [my define getnull output_mk]
    #if {$output_mk eq {}} {
    #  set output_mk [file rootname $output_c].mk
    #  my define set output_mk $output_mk
    #}
    set initfunc [my define getnull initfunc]
    if {$initfunc eq {}} {
      set initfunc [string totitle $name]_Init
      my define set initfunc $initfunc
    }
    set output_decls [my define getnull output_decls]
    if {$output_decls eq {}} {
      set output_decls [file rootname $output_c].decls
      my define set output_decls $output_decls
    }
    my variable links
    foreach {linktype objs} [array get links] {
      foreach obj $objs {
        $obj go
      }
    }
    ::practcl::debug [list /[self] [self method] [self class] -- [my define get filename] [info object class [self]]]
  }


  method generate-decls {pkgname path} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set outfile [file join $path/$pkgname.decls]

    ###
    # Build the decls file
    ## #
    set fout [open $outfile w]
    puts $fout [subst {###
  # $outfile
  #
  # This file was generated by [info script]
  ###

library $pkgname
interface $pkgname
}]

    ###
    # Generate list of functions
    ###
    set stubfuncts [my generate-stub-function]
    set thisline {}
    set functcount 0
    foreach {func header} $stubfuncts {
      puts $fout [list declare [incr functcount] $header]
    }
    puts $fout [list export "int [my define get initfunc](Tcl_Inter *interp)"]
    puts $fout [list export "char *[string totitle [my define get name]]_InitStubs(Tcl_Inter *interp, char *version, int exact)"]

    close $fout

    ###
    # Build [package]Decls.h
    ###
    set hout [open [file join $path ${pkgname}Decls.h] w]
    close $hout

    set cout [open [file join $path ${pkgname}StubInit.c] w]
    puts $cout [string map [list %pkgname% $pkgname %PkgName% [string totitle $pkgname]] {
#ifndef USE_TCL_STUBS
#define USE_TCL_STUBS
#endif
#undef USE_TCL_STUB_PROCS

#include "tcl.h"
#include "%pkgname%.h"

/*
** Ensure that Tdom_InitStubs is built as an exported symbol.  The other stub
** functions should be built as non-exported symbols.
*/

#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT

%PkgName%Stubs *%pkgname%StubsPtr;

 /*
 **----------------------------------------------------------------------
 **
 **  %PkgName%_InitStubs --
 **
 **        Checks that the correct version of %PkgName% is loaded and that it
 **        supports stubs. It then initialises the stub table pointers.
 **
 **  Results:
 **        The actual version of %PkgName% that satisfies the request, or
 **        NULL to indicate that an error occurred.
 **
 **  Side effects:
 **        Sets the stub table pointers.
 **
 **----------------------------------------------------------------------
 */

char *
%PkgName%_InitStubs (Tcl_Interp *interp, char *version, int exact)
{
  char *actualVersion;
  actualVersion = Tcl_PkgRequireEx(interp, "%pkgname%", version, exact,(ClientData *) &%pkgname%StubsPtr);
  if (!actualVersion) {
    return NULL;
  }
  if (!%pkgname%StubsPtr) {
    Tcl_SetResult(interp,"This implementation of %PkgName% does not support stubs",TCL_STATIC);
    return NULL;
  }
  return actualVersion;
}
}]
    close $cout
  }

  method implement path {
    my go
    my Collate_Source $path
    set errs {}
    foreach item [my link list dynamic] {
      if {[catch {$item implement $path} err errdat]} {
        lappend errs "Skipped $item: [$item define get filename] $err"
        if {[dict exists $errdat -errorinfo]} {
          lappend errs [dict get $errdat -errorinfo]
        } else {
          lappend errs $errdat
        }
      }
    }
    foreach item [my link list module] {
      if {[catch {$item implement $path} err errdat]} {
        lappend errs "Skipped $item: [$item define get filename] $err"
        if {[dict exists $errdat -errorinfo]} {
          lappend errs [dict get $errdat -errorinfo]
        } else {
          lappend errs $errdat
        }
      }
    }
    if {[llength $errs]} {
      set logfile [file join $::CWD practcl.log]
      ::practcl::log $logfile "*** ERRORS ***"
      foreach {item trace} $errs {
        ::practcl::log $logfile "###\n# ERROR\n###$item"
        ::practcl::log $logfile "###\n# TRACE\n###$trace"
      }
      ::practcl::log $logfile "*** DEBUG INFO ***"
      ::practcl::log $logfile $::DEBUG_INFO
      puts stderr "Errors saved to $logfile"
      exit 1
    }
    set cout [open [file join $path [my define get output_c]] w]
    puts $cout [subst {/*
** This file is generated by the [info script] script
** any changes will be overwritten the next time it is run
*/}]
    puts $cout [my generate-c]
    puts $cout [my generate-loader]
    close $cout

    set macro HAVE_[string toupper [file rootname [my define get output_h]]]_H
    set hout [open [file join $path [my define get output_h]] w]
    puts $hout [subst {/*
** This file is generated by the [info script] script
** any changes will be overwritten the next time it is run
*/}]
    puts $hout "#ifndef ${macro}"
    puts $hout "#define ${macro} 1"
    puts $hout [my generate-h]
    puts $hout "#endif"
    close $hout

    set output_tcl [my define get output_tcl]
    if {$output_tcl ne {}} {
      set tclout [open [file join $path [my define get output_tcl]] w]
      puts $tclout "###
# This file is generated by the [info script] script
# any changes will be overwritten the next time it is run
###"
      puts $tclout [my generate-tcl-pre]
      puts $tclout [my generate-tcl-loader]
      puts $tclout [my generate-tcl-post]
      close $tclout
    }
  }

  # Backward compadible call
  method generate-make path {
    my build-Makefile $path [self]
  }

  method linktype {} {
    return library
  }

  # Create a "package ifneeded"
  # Args are a list of aliases for which this package will answer to
  method package-ifneeded {args} {
    set result {}
    set name [my define get pkg_name [my define get name]]
    set version [my define get pkg_vers [my define get version]]
    if {$version eq {}} {
      set version 0.1a
    }
    set output_tcl [my define get output_tcl]
    if {$output_tcl ne {}} {
      set script "\[list source \[file join \$dir $output_tcl\]\]"
    } elseif {[my define get SHARED_BUILD 0]} {
      set script "\[list load \[file join \$dir [my define get libfile]\] $name\]"
    } else {
      # Provide a null passthrough
      set script "\[list package provide $name $version\]"
    }
    set result "package ifneeded [list $name] [list $version] $script"
    foreach alias $args {
      set script "package require $name $version \; package provide $alias $version"
      append result \n\n [list package ifneeded $alias $version $script]
    }
    return $result
  }


  method shared_library {{filename {}}} {
    set name [string tolower [my define get name [my define get pkg_name]]]
    set NAME [string toupper $name]
    set version [my define get version [my define get pkg_vers]]
    set map {}
    lappend map %LIBRARY_NAME% $name
    lappend map %LIBRARY_VERSION% $version
    lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $version]
    lappend map %LIBRARY_PREFIX% [my define getnull libprefix]
    set outfile [string map $map [my define get PRACTCL_NAME_LIBRARY]][my define get SHLIB_SUFFIX]
    return $outfile
  }

  method static_library {{filename {}}} {
    set name [string tolower [my define get name [my define get pkg_name]]]
    set NAME [string toupper $name]
    set version [my define get version [my define get pkg_vers]]
    set map {}
    lappend map %LIBRARY_NAME% $name
    lappend map %LIBRARY_VERSION% $version
    lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $version]
    lappend map %LIBRARY_PREFIX% [my define getnull libprefix]
    set outfile [string map $map [my define get PRACTCL_NAME_LIBRARY]].a
    return $outfile
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































































































































































































































































































































Deleted modules/practcl/build/class/project/tclkit.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
###
# A toplevel project that produces a self-contained executable
###
::clay::define ::practcl::tclkit {
  superclass ::practcl::library

  method build-tclkit_main {PROJECT PKG_OBJS} {
    ###
    # Build static package list
    ###
    set statpkglist {}
    foreach cobj [list {*}${PKG_OBJS} $PROJECT] {
      foreach {pkg info} [$cobj project-static-packages] {
        dict set statpkglist $pkg $info
      }
    }
    foreach {ofile info} [${PROJECT} project-compile-products] {
      if {![dict exists $info object]} continue
      set cobj [dict get $info object]
      foreach {pkg info} [$cobj project-static-packages] {
        dict set statpkglist $pkg $info
      }
    }

    set result {}
    $PROJECT include {<tcl.h>}
    $PROJECT include {"tclInt.h"}
    $PROJECT include {"tclFileSystem.h"}
    $PROJECT include {<assert.h>}
    $PROJECT include {<stdio.h>}
    $PROJECT include {<stdlib.h>}
    $PROJECT include {<string.h>}
    $PROJECT include {<math.h>}

    $PROJECT code header {
#ifndef MODULE_SCOPE
#   define MODULE_SCOPE extern
#endif

/*
** Provide a dummy Tcl_InitStubs if we are using this as a static
** library.
*/
#ifndef USE_TCL_STUBS
# undef  Tcl_InitStubs
# define Tcl_InitStubs(a,b,c) TCL_VERSION
#endif
#define STATIC_BUILD 1
#undef USE_TCL_STUBS

/* Make sure the stubbed variants of those are never used. */
#undef Tcl_ObjSetVar2
#undef Tcl_NewStringObj
#undef Tk_Init
#undef Tk_MainEx
#undef Tk_SafeInit
}

    # Build an area of the file for #define directives and
    # function declarations
    set define {}
    set mainhook   [$PROJECT define get TCL_LOCAL_MAIN_HOOK Tclkit_MainHook]
    set mainfunc   [$PROJECT define get TCL_LOCAL_APPINIT Tclkit_AppInit]
    set mainscript [$PROJECT define get main.tcl main.tcl]
    set vfsroot    [$PROJECT define get vfsroot "[$PROJECT define get ZIPFS_VOLUME]app"]
    set vfs_main "${vfsroot}/${mainscript}"

    set map {}
    foreach var {
      vfsroot mainhook mainfunc vfs_main
    } {
      dict set map %${var}% [set $var]
    }
    set thread_init_script {namespace eval ::starkit {}}
    append thread_init_script \n [list set ::starkit::topdir $vfsroot]
    set preinitscript {
set ::odie(boot_vfs) %vfsroot%
set ::SRCDIR $::odie(boot_vfs)
namespace eval ::starkit {}
set ::starkit::topdir %vfsroot%
if {[file exists [file join %vfsroot% tcl_library init.tcl]]} {
  set ::tcl_library [file join %vfsroot% tcl_library]
  set ::auto_path {}
}
if {[file exists [file join %vfsroot% tk_library tk.tcl]]} {
  set ::tk_library [file join %vfsroot% tk_library]
}
} ; # Preinitscript

    set zvfsboot {
/*
 * %mainhook% --
 * Performs the argument munging for the shell
 */
  }
    ::practcl::cputs zvfsboot {
  CONST char *archive;
  Tcl_FindExecutable(*argv[0]);
  archive=Tcl_GetNameOfExecutable();
}
    # We have to initialize the virtual filesystem before calling
    # Tcl_Init().  Otherwise, Tcl_Init() will not be able to find
    # its startup script files.
    if {![$PROJECT define get tip_430 0]} {
      # Add declarations of functions that tip430 puts in the stub files
      $PROJECT code public-header {
int TclZipfs_Init(Tcl_Interp *interp);
int TclZipfs_Mount(
    Tcl_Interp *interp,
    const char *mntpt,
    const char *zipname,
    const char *passwd
);
int TclZipfs_Mount_Buffer(
    Tcl_Interp *interp,
    const char *mntpt,
    unsigned char *data,
    size_t datalen,
    int copy
);
}
      ::practcl::cputs zvfsboot {  TclZipfs_Init(NULL);}
    }
    ::practcl::cputs zvfsboot "  if(!TclZipfs_Mount(NULL, \"app\", archive, NULL)) \x7B "
    ::practcl::cputs zvfsboot {
      Tcl_Obj *vfsinitscript;
      vfsinitscript=Tcl_NewStringObj("%vfs_main%",-1);
      Tcl_IncrRefCount(vfsinitscript);
      if(Tcl_FSAccess(vfsinitscript,F_OK)==0) {
        /* Startup script should be set before calling Tcl_AppInit */
        Tcl_SetStartupScript(vfsinitscript,NULL);
      }
    }
    ::practcl::cputs zvfsboot "    TclSetPreInitScript([::practcl::tcl_to_c $preinitscript])\;"
    ::practcl::cputs zvfsboot "  \x7D else \x7B"
    ::practcl::cputs zvfsboot "    TclSetPreInitScript([::practcl::tcl_to_c {
foreach path {../tcl} {
  set p  [file join $path library init.tcl]
  if {[file exists [file join $path library init.tcl]]} {
    set ::tcl_library [file normalize [file join $path library]]
    break
  }
}
foreach path {
  ../tk
} {
  if {[file exists [file join $path library tk.tcl]]} {
    set ::tk_library [file normalize [file join $path library]]
    break
  }
}
}])\;"
    ::practcl::cputs zvfsboot "  \x7D"
    ::practcl::cputs zvfsboot "  return TCL_OK;"

    if {[$PROJECT define get TEACUP_OS] eq "windows"} {
      set header {int %mainhook%(int *argc, TCHAR ***argv)}
    } else {
      set header {int %mainhook%(int *argc, char ***argv)}
    }
    $PROJECT c_function  [string map $map $header] [string map $map $zvfsboot]

    practcl::cputs appinit "int %mainfunc%(Tcl_Interp *interp) \x7B"

  # Build AppInit()
  set appinit {}
  practcl::cputs appinit {
  if ((Tcl_Init)(interp) == TCL_ERROR) {
      return TCL_ERROR;
  }

}
    if {![$PROJECT define get tip_430 0]} {
      ::practcl::cputs appinit {  TclZipfs_Init(interp);}
    }
    set main_init_script {}

    foreach {statpkg info} $statpkglist {
      set initfunc {}
      if {[dict exists $info initfunc]} {
        set initfunc [dict get $info initfunc]
      }
      if {$initfunc eq {}} {
        set initfunc [string totitle ${statpkg}]_Init
      }
      if {![dict exists $info version]} {
        error "$statpkg HAS NO VERSION"
      }
      # We employ a NULL to prevent the package system from thinking the
      # package is actually loaded into the interpreter
      $PROJECT code header "extern Tcl_PackageInitProc $initfunc\;\n"
      set script [list package ifneeded $statpkg [dict get $info version] [list ::load {} $statpkg]]
      append main_init_script \n [list set ::starkit::static_packages(${statpkg}) $script]

      if {[dict get $info autoload]} {
        ::practcl::cputs appinit "  if(${initfunc}(interp)) return TCL_ERROR\;"
        ::practcl::cputs appinit "  Tcl_StaticPackage(interp,\"$statpkg\",$initfunc,NULL)\;"
      } else {
        ::practcl::cputs appinit "\n  Tcl_StaticPackage(NULL,\"$statpkg\",$initfunc,NULL)\;"
        append main_init_script \n $script
      }
    }
    append main_init_script \n {
if {[file exists [file join $::starkit::topdir pkgIndex.tcl]]} {
  #In a wrapped exe, we don't go out to the environment
  set dir $::starkit::topdir
  source [file join $::starkit::topdir pkgIndex.tcl]
}}
    append thread_init_script $main_init_script
    append main_init_script \n {
# Specify a user-specific startup file to invoke if the application
# is run interactively.  Typically the startup file is "~/.apprc"
# where "app" is the name of the application.  If this line is deleted
# then no user-specific startup file will be run under any conditions.
}
    append thread_init_script \n [list set ::starkit::thread_init $thread_init_script]
    append main_init_script \n [list set ::starkit::thread_init $thread_init_script]
    append main_init_script \n [list set tcl_rcFileName [$PROJECT define get tcl_rcFileName ~/.tclshrc]]


    practcl::cputs appinit "  Tcl_Eval(interp,[::practcl::tcl_to_c  $thread_init_script]);"
    practcl::cputs appinit {  return TCL_OK;}
    $PROJECT c_function [string map $map "int %mainfunc%(Tcl_Interp *interp)"] [string map $map $appinit]
  }

  method Collate_Source CWD {
    next $CWD
    set name [my define get name]
    # Assume a static shell
    if {[my define exists SHARED_BUILD]} {
      my define set SHARED_BUILD 0
    }
    if {![my define exists TCL_LOCAL_APPINIT]} {
      my define set TCL_LOCAL_APPINIT Tclkit_AppInit
    }
    if {![my define exists TCL_LOCAL_MAIN_HOOK]} {
      my define set TCL_LOCAL_MAIN_HOOK Tclkit_MainHook
    }
    set PROJECT [self]
    set os [$PROJECT define get TEACUP_OS]
    if {[my define get SHARED_BUILD 0]} {
      puts [list BUILDING TCLSH FOR OS $os]
    } else {
      puts [list BUILDING KIT FOR OS $os]
    }
    set TCLOBJ [$PROJECT tclcore]
    ::practcl::toolset select $TCLOBJ

    set TCLSRCDIR [$TCLOBJ define get srcdir]
    set PKG_OBJS {}
    foreach item [$PROJECT link list core.library] {
      if {[string is true [$item define get static]]} {
        lappend PKG_OBJS $item
      }
    }
    foreach item [$PROJECT link list package] {
      if {[string is true [$item define get static]]} {
        lappend PKG_OBJS $item
      }
    }
    # Arrange to build an main.c that utilizes TCL_LOCAL_APPINIT and TCL_LOCAL_MAIN_HOOK
    if {$os eq "windows"} {
      set PLATFORM_SRC_DIR win
      if {![my define get SHARED_BUILD 0]} {
        my add class csource filename [file join $TCLSRCDIR win tclWinReg.c] initfunc Registry_Init pkg_name registry pkg_vers 1.3.1 autoload 1
        my add class csource filename [file join $TCLSRCDIR win tclWinDde.c] initfunc Dde_Init pkg_name dde pkg_vers 1.4.0 autoload 1
      }
      my add class csource ofile [my define get name]_appinit.o filename [file join $TCLSRCDIR win tclAppInit.c] extra [list -DTCL_LOCAL_MAIN_HOOK=[my define get TCL_LOCAL_MAIN_HOOK Tclkit_MainHook] -DTCL_LOCAL_APPINIT=[my define get TCL_LOCAL_APPINIT Tclkit_AppInit]]
    } else {
      set PLATFORM_SRC_DIR unix
      my add class csource ofile [my define get name]_appinit.o filename [file join $TCLSRCDIR unix tclAppInit.c] extra [list -DTCL_LOCAL_MAIN_HOOK=[my define get TCL_LOCAL_MAIN_HOOK Tclkit_MainHook] -DTCL_LOCAL_APPINIT=[my define get TCL_LOCAL_APPINIT Tclkit_AppInit]]
    }

    if {![my define get SHARED_BUILD 0]} {
      ###
      # Add local static Zlib implementation
      ###
      set cdir [file join $TCLSRCDIR compat zlib]
      foreach file {
        adler32.c compress.c crc32.c
        deflate.c infback.c inffast.c
        inflate.c inftrees.c trees.c
        uncompr.c zutil.c
      } {
        my add [file join $cdir $file]
      }
    }
    ###
    # Pre 8.7, Tcl doesn't include a Zipfs implementation
    # in the core. Grab the one from odielib
    ###
    set zipfs [file join $TCLSRCDIR generic tclZipfs.c]
    if {![$PROJECT define exists ZIPFS_VOLUME]} {
      $PROJECT define set ZIPFS_VOLUME "zipfs:/"
    }
    $PROJECT code header "#define ZIPFS_VOLUME \"[$PROJECT define get ZIPFS_VOLUME]\""
    if {[file exists $zipfs]} {
      $TCLOBJ define set tip_430 1
      my define set tip_430 1
    } else {
      # The Tclconfig project maintains a mirror of the version
      # released with the Tcl core
      my define set tip_430 0
      set tclzipfs_c [my define get tclzipfs_c]
      if {![file exists $tclzipfs_c]} {
        ::practcl::LOCAL tool tclconfig unpack
        set COMPATSRCROOT [::practcl::LOCAL tool tclconfig define get srcdir]
        set tclzipfs_c [file join $COMPATSRCROOT compat tclZipfs.c]
      }
      my add class csource ofile tclZipfs.o filename $tclzipfs_c \
        extra -I[::practcl::file_relative $CWD [file join $TCLSRCDIR compat zlib contrib minizip]]
    }

    my define add include_dir [file join $TCLSRCDIR generic]
    my define add include_dir [file join $TCLSRCDIR $PLATFORM_SRC_DIR]
    # This file will implement TCL_LOCAL_APPINIT and TCL_LOCAL_MAIN_HOOK
    my build-tclkit_main $PROJECT $PKG_OBJS
  }

  ## Wrap an executable
  #
  method wrap {PWD exename vfspath args} {
    cd $PWD
    if {![file exists $vfspath]} {
      file mkdir $vfspath
    }
    foreach item [my link list core.library] {
      set name  [$item define get name]
      set libsrcdir [$item define get srcdir]
      if {[file exists [file join $libsrcdir library]]} {
        ::practcl::copyDir [file join $libsrcdir library] [file join $vfspath ${name}_library]
      }
    }
    # Assume the user will populate the VFS path
    #if {[my define get installdir] ne {}} {
    #  ::practcl::copyDir [file join [my define get installdir] [string trimleft [my define get prefix] /] lib] [file join $vfspath lib]
    #}
    foreach arg $args {
       ::practcl::copyDir $arg $vfspath
    }

    set fout [open [file join $vfspath pkgIndex.tcl] w]
    puts $fout [string map [list %platform% [my define get TEACUP_PROFILE]] {set ::tcl_teapot_profile {%platform%}}]
    puts $fout {
namespace eval ::starkit {}
set ::PKGIDXFILE [info script]
set dir [file dirname $::PKGIDXFILE]
if {$::tcl_platform(platform) eq "windows"} {
  set ::starkit::localHome [file join [file normalize $::env(LOCALAPPDATA)] tcl]
} else {
  set ::starkit::localHome [file normalize ~/tcl]
}
set ::tcl_teapot [file join $::starkit::localHome teapot $::tcl_teapot_profile]
lappend ::auto_path $::tcl_teapot
}
    puts $fout [list proc installDir [info args ::practcl::installDir] [info body ::practcl::installDir]]
    set buffer [::practcl::pkgindex_path $vfspath]
    puts $fout $buffer
    puts $fout {
# Advertise statically linked packages
foreach {pkg script} [array get ::starkit::static_packages] {
  eval $script
}
}
    puts $fout {
###
# Cache binary packages distributed as dynamic libraries in a known location
###
foreach teapath [glob -nocomplain [file join $dir teapot $::tcl_teapot_profile *]] {
  set pkg [file tail $teapath]
  set pkginstall [file join $::tcl_teapot $pkg]
  if {![file exists $pkginstall]} {
    installDir $teapath $pkginstall
  }
}
}
    close $fout

    set EXEEXT [my define get EXEEXT]
    set tclkit_bare [my define get tclkit_bare]
    ::practcl::mkzip ${exename}${EXEEXT} $tclkit_bare $vfspath
    if { [my define get TEACUP_OS] ne "windows" } {
      file attributes ${exename}${EXEEXT} -permissions a+x
    }
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/practcl/build/class/subproject/baseclass.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
###
# A subordinate project
###
::clay::define ::practcl::subproject {
  superclass ::practcl::module

  method _MorphPatterns {} {
    return {{::practcl::subproject.@name@} {::practcl::@name@} {@name@} {::practcl::subproject}}
  }


  method BuildDir {PWD} {
    return [my define get srcdir]
  }

  method child which {
    switch $which {
      delegate -
      organs {
	# A library can be a project, it can be a module. Any
	# subordinate modules will indicate their existance
        return [list project [self] module [self]]
      }
    }
  }

  method compile {} {}


  method go {} {
    ::practcl::distribution select [self]
    set name [my define get name]
    my define set builddir [my BuildDir [my define get masterpath]]
    my define set builddir [my BuildDir [my define get masterpath]]
    my sources
  }

  # Install project into the local build system
  method install args {}

  method linktype {} {
    return {subordinate package}
  }

  method linker-products {configdict} {}

  method linker-external {configdict} {
    if {[dict exists $configdict PRACTCL_PKG_LIBS]} {
      return [dict get $configdict PRACTCL_PKG_LIBS]
    }
    if {[dict exists $configdict LIBS]} {
      return [dict get $configdict LIBS]
    }
  }

  method linker-extra {configdict} {
    if {[dict exists $configdict PRACTCL_LINKER_EXTRA]} {
      return [dict get $configdict PRACTCL_LINKER_EXTRA]
    }
    return {}
  }

  ###
  # Methods for packages/tools that can be downloaded
  # possibly built and used internally by this Practcl
  # process
  ###

  ###
  # Load the facility into the interpreter
  ###
  method env-bootstrap {} {
    set pkg [my define get pkg_name [my define get name]]
    package require $pkg
  }

  ###
  # Return a file path that exec can call
  ###
  method env-exec {} {}

  ###
  # Install the tool into the local environment
  ###
  method env-install {} {
    my unpack
  }

  ###
  # Do whatever is necessary to get the tool
  # into the local environment
  ###
  method env-load {} {
    my variable loaded
    if {[info exists loaded]} {
      return 0
    }
    if {![my env-present]} {
      my env-install
    }
    my env-bootstrap
    set loaded 1
  }

  ###
  # Check if tool is available for load/already loaded
  ###
  method env-present {} {
    set pkg [my define get pkg_name [my define get name]]
    if {[catch [list package require $pkg]]} {
      return 0
    }
    return 1
  }

  method sources {} {}

  method update {} {
    my ScmUpdate
  }

  method unpack {} {
    cd $::CWD
    ::practcl::distribution select [self]
    my Unpack
    ::practcl::toolset select [self]
    cd $::CWD
  }
}

###
# Trivial implementations
###


###
# A project which the kit compiles and integrates
# the source for itself
###
::clay::define ::practcl::subproject.source {
  superclass ::practcl::subproject ::practcl::library

  method env-bootstrap {} {
    set LibraryRoot [file join [my define get srcdir] [my define get module_root modules]]
    if {[file exists $LibraryRoot] && $LibraryRoot ni $::auto_path} {
      set ::auto_path [linsert $::auto_path 0 $LibraryRoot]
    }
  }

  method env-present {} {
    set path [my define get srcdir]
    return [file exists $path]
  }

  method linktype {} {
    return {subordinate package source}
  }

}

# a copy from the teapot
::clay::define ::practcl::subproject.teapot {
  superclass ::practcl::subproject

  method env-bootstrap {} {
    set pkg [my define get pkg_name [my define get name]]
    package require $pkg
  }

  method env-install {} {
    set pkg [my define get pkg_name [my define get name]]
    set download [my <project> define get download]
    my unpack
    set prefix [string trimleft [my <project> define get prefix] /]
    ::practcl::tcllib_require zipfile::decode
    ::zipfile::decode::unzipfile [file join $download $pkg.zip] [file join $prefix lib $pkg]
  }

  method env-present {} {
    set pkg [my define get pkg_name [my define get name]]
    if {[catch [list package require $pkg]]} {
      return 0
    }
    return 1
  }

  method install DEST {
    set pkg [my define get pkg_name [my define get name]]
    set download [my <project> define get download]
    my unpack
    set prefix [string trimleft [my <project> define get prefix] /]
    ::practcl::tcllib_require zipfile::decode
    ::zipfile::decode::unzipfile [file join $download $pkg.zip] [file join $DEST $prefix lib $pkg]
  }
}

::clay::define ::practcl::subproject.kettle {
  superclass ::practcl::subproject

  method kettle {path args} {
    my variable kettle
    if {![info exists kettle]} {
      ::practcl::LOCAL tool kettle env-load
      set kettle [file join [::practcl::LOCAL tool kettle define get srcdir] kettle]
    }
    set srcdir [my SourceRoot]
    ::practcl::dotclexec $kettle -f [file join $srcdir build.tcl] {*}$args
  }

  method install DEST {
    my kettle reinstall --prefix $DEST
  }
}

::clay::define ::practcl::subproject.critcl {
  superclass ::practcl::subproject

  method install DEST {
    my critcl -pkg [my define get name]
    set srcdir [my SourceRoot]
    ::practcl::copyDir [file join $srcdir [my define get name]] [file join $DEST lib [my define get name]]
  }
}

::clay::define ::practcl::subproject.sak {
  superclass ::practcl::subproject

  method env-bootstrap {} {
    set LibraryRoot [file join [my define get srcdir] [my define get module_root modules]]
    if {[file exists $LibraryRoot] && $LibraryRoot ni $::auto_path} {
      set ::auto_path [linsert $::auto_path 0 $LibraryRoot]
    }
  }

  method env-install {} {
    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    my unpack
    set prefix [my <project> define get prefix [file normalize [file join ~ tcl]]]
    set srcdir [my define get srcdir]
    ::practcl::dotclexec [file join $srcdir installer.tcl] \
      -apps -app-path [file join $prefix apps] \
      -html -html-path [file join $prefix doc html $pkg] \
      -pkg-path [file join $prefix lib $pkg]  \
      -no-nroff -no-wait -no-gui
  }

  method env-present {} {
    set path [my define get srcdir]
    return [file exists $path]
  }

  method install DEST {
    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    my unpack
    set prefix [string trimleft [my <project> define get prefix] /]
    set srcdir [my define get srcdir]
    ::practcl::dotclexec [file join $srcdir installer.tcl] \
      -pkg-path [file join $DEST $prefix lib $pkg]  \
      -no-examples -no-html -no-nroff \
      -no-wait -no-gui -no-apps
  }

  method install-module {DEST args} {
    set srcdir [my define get srcdir]
    if {[llength $args]==1 && [lindex $args 0] in {* all}} {
      set pkg [my define get pkg_name [my define get name]]
      ::practcl::dotclexec [file join $srcdir installer.tcl] \
        -pkg-path [file join $DEST $pkg]  \
        -no-examples -no-html -no-nroff \
        -no-wait -no-gui -no-apps
    } else {
      foreach module $args {
        ::practcl::installModule [file join $srcdir modules $module] [file join $DEST $module]
      }
    }
  }
}


::clay::define ::practcl::subproject.practcl {
  superclass ::practcl::subproject

  method env-bootstrap {} {
    set LibraryRoot [file join [my define get srcdir] [my define get module_root modules]]
    if {[file exists $LibraryRoot] && $LibraryRoot ni $::auto_path} {
      set ::auto_path [linsert $::auto_path 0 $LibraryRoot]
    }
  }

  method env-install {} {
    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    my unpack
    set prefix [my <project> define get prefix [file normalize [file join ~ tcl]]]
    set srcdir [my define get srcdir]
    ::practcl::dotclexec [file join $srcdir make.tcl] install [file join $prefix lib $pkg]
  }

  method install DEST {
    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    my unpack
    set prefix [string trimleft [my <project> define get prefix] /]
    set srcdir [my define get srcdir]
    puts [list INSTALLING  [my define get name] to [file join $DEST $prefix lib $pkg]]
    ::practcl::dotclexec [file join $srcdir make.tcl] install [file join $DEST $prefix lib $pkg]
  }

  method install-module {DEST args} {
    set pkg [my define get pkg_name [my define get name]]
    set srcdir [my define get srcdir]
    ::practcl::dotclexec [file join $srcdir make.tcl] install-module $DEST {*}$args
  }
}


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































































































































































































































































































































































































































































































Deleted modules/practcl/build/class/subproject/binary.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
###
# A subordinate binary package
###
::clay::define ::practcl::subproject.binary {
  superclass ::practcl::subproject

  method clean {} {
    set builddir [file normalize [my define get builddir]]
    if {![file exists $builddir]} return
    if {[file exists [file join $builddir make.tcl]]} {
      ::practcl::domake.tcl $builddir clean
    } else {
      catch {::practcl::domake $builddir clean}
    }
  }

 method env-install {} {
    ###
    # Handle tea installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    set os [::practcl::local_os]
    my define set os $os
    my unpack
    set prefix [my <project> define get prefix [file normalize [file join ~ tcl]]]
    set srcdir [my define get srcdir]
    lappend options --prefix $prefix --exec-prefix $prefix
    my define set config_opts $options
    my go
    my clean
    my compile
    my make install {}
  }

  method project-compile-products {} {}

  method ComputeInstall {} {
    if {[my define exists install]} {
      switch [my define get install] {
        static {
          my define set static 1
          my define set autoload 0
        }
        static-autoload {
          my define set static 1
          my define set autoload 1
        }
        vfs {
          my define set static 0
          my define set autoload 0
          my define set vfsinstall 1
        }
        null {
          my define set static 0
          my define set autoload 0
          my define set vfsinstall 0
        }
        default {

        }
      }
    }
  }

  method go {} {
    next
    ::practcl::distribution select [self]
    my ComputeInstall
    my define set builddir [my BuildDir [my define get masterpath]]
  }

  method linker-products {configdict} {
    if {![my define get static 0]} {
      return {}
    }
    set srcdir [my define get builddir]
    if {[dict exists $configdict libfile]} {
      return " [file join $srcdir [dict get $configdict libfile]]"
    }
  }

  method project-static-packages {} {
    if {![my define get static 0]} {
      return {}
    }
    set result [my define get static_packages]
    set statpkg  [my define get static_pkg]
    set initfunc [my define get initfunc]
    if {$initfunc ne {}} {
      set pkg_name [my define get pkg_name]
      if {$pkg_name ne {}} {
        dict set result $pkg_name initfunc $initfunc
        set version [my define get version]
        if {$version eq {}} {
          my unpack
          set info [my read_configuration]
          set version [dict get $info version]
          set pl {}
          if {[dict exists $info patch_level]} {
            set pl [dict get $info patch_level]
            append version $pl
          }
          my define set version $version
        }
        dict set result $pkg_name version $version
        dict set result $pkg_name autoload [my define get autoload 0]
      }
    }
    foreach item [my link list subordinate] {
      foreach {pkg info} [$item project-static-packages] {
        dict set result $pkg $info
      }
    }
    return $result
  }

  method BuildDir {PWD} {
    set name [my define get name]
    set debug [my define get debug 0]
    if {[my <project> define get LOCAL 0]} {
      return [my define get builddir [file join $PWD local $name]]
    }
    if {$debug} {
      return [my define get builddir [file join $PWD debug $name]]
    } else {
      return [my define get builddir [file join $PWD pkg $name]]
    }
  }

  method compile {} {
    set name [my define get name]
    set PWD $::CWD
    cd $PWD
    my unpack
    set srcdir [file normalize [my SrcDir]]
    set localsrcdir [my MakeDir $srcdir]
    my define set localsrcdir $localsrcdir
    my Collate_Source $PWD
    ###
    # Build a starter VFS for both Tcl and wish
    ###
    set srcdir [my define get srcdir]
    if {[my define get static 1]} {
      puts "BUILDING Static $name $srcdir"
    } else {
      puts "BUILDING Dynamic $name $srcdir"
    }
    my make compile
    cd $PWD
  }

  method Configure {} {
    cd $::CWD
    my unpack
    ::practcl::toolset select [self]
    set srcdir [file normalize [my define get srcdir]]
    set builddir [file normalize [my define get builddir]]
    file mkdir $builddir
    my make autodetect
  }

  method install DEST {
    set PWD [pwd]
    set PREFIX  [my <project> define get prefix]
    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    if {[my <project> define get teapot] ne {}} {
      set TEAPOT [my <project> define get teapot]
      set found 0
      foreach ver [my define get pkg_vers [my define get version]] {
        set teapath [file join $TEAPOT $pkg$ver]
        if {[file exists $teapath]} {
          set dest  [file join $DEST [string trimleft $PREFIX /] lib [file tail $teapath]]
          ::practcl::copyDir $teapath $dest
          return
        }
      }
    }
    my compile
    my make install $DEST
    cd $PWD
  }
}

###
# A subordinate TEA based binary package
###
::clay::define ::practcl::subproject.tea {
  superclass ::practcl::subproject.binary

}

###
# A subordinate C library built by this project
###
::clay::define ::practcl::subproject.library {
  superclass ::practcl::subproject.binary ::practcl::library
  method install DEST {
    my compile
  }
}

###
# A subordinate external C library
###
::clay::define ::practcl::subproject.external {
  superclass ::practcl::subproject.binary
  method install DEST {
    my compile
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































Deleted modules/practcl/build/class/subproject/core.tcl.

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

::clay::define ::practcl::subproject.core {
  superclass ::practcl::subproject.binary

  method env-bootstrap {} {}

  method env-present {} {
    set PREFIX [my <project> define get prefix]
    set name [my define get name]
    set fname [file join $PREFIX lib ${name}Config.sh]
    return [file exists $fname]
  }

  method env-install {} {
    my unpack
    set os [::practcl::local_os]

    set prefix [my <project> define get prefix [file normalize [file join ~ tcl]]]
    lappend options --prefix $prefix --exec-prefix $prefix
    my define set config_opts $options
    puts [list [self] OS [dict get $os TEACUP_OS] options $options]
    my go
    my compile
    my make install {}
  }

  method go {} {
    my define set core_binary 1
    next
  }

  method linktype {} {
    return {subordinate core.library}
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































Deleted modules/practcl/build/class/target.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
###
# A build deliverable object. Normally an object file, header, or tcl script
# which must be compiled or generated in some way
###
::clay::define ::practcl::make_obj {
  superclass ::practcl::metaclass

  constructor {module_object name info {action_body {}}} {
    my variable define triggered domake
    set triggered 0
    set domake 0
    set define(name) $name
    set define(action) {}
    array set define $info
    my select
    my initialize
    foreach {stub obj} [$module_object child organs] {
      my graft $stub $obj
    }
    if {$action_body ne {}} {
      set define(action) $action_body
    }
  }

  method do {} {
    my variable domake
    return $domake
  }

  method check {} {
    my variable needs_make domake
    if {$domake} {
      return 1
    }
    if {[info exists needs_make]} {
      return $needs_make
    }
    set make_objects [my <module> make objects]
    set needs_make 0
    foreach item [my define get depends] {
      if {![dict exists $make_objects $item]} continue
      set depobj [dict get $make_objects $item]
      if {$depobj eq [self]} {
        puts "WARNING [self] depends on itself"
        continue
      }
      if {[$depobj check]} {
        set needs_make 1
      }
    }
    if {!$needs_make} {
      foreach filename [my output] {
        if {$filename ne {} && ![file exists $filename]} {
          set needs_make 1
        }
      }
    }
    return $needs_make
  }

  method output {} {
    set result {}
    set filename [my define get filename]
    if {$filename ne {}} {
      lappend result $filename
    }
    foreach filename [my define get files] {
      if {$filename ne {}} {
        lappend result $filename
      }
    }
    return $result
  }

  method reset {} {
    my variable triggered domake needs_make
    set triggerd 0
    set domake 0
    set needs_make 0
  }

  method triggers {} {
    my variable triggered domake define
    if {$triggered} {
      return $domake
    }
    set triggered 1
    set make_objects [my <module> make objects]

    foreach item [my define get depends] {
      if {![dict exists $make_objects $item]} continue
      set depobj [dict get $make_objects $item]
      if {$depobj eq [self]} {
        puts "WARNING [self] triggers itself"
        continue
      } else {
        set r [$depobj check]
        if {$r} {
          $depobj triggers
        }
      }
    }
    set domake 1
    my <module> make trigger {*}[my define get triggers]
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































Deleted modules/practcl/build/class/tool.tcl.

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
###
# Create an object to represent the local environment
###
set ::practcl::MAIN ::practcl::LOCAL
# Defer the creation of the ::practcl::LOCAL object until it is called
# in order to allow packages to
set ::auto_index(::practcl::LOCAL) {
  ::practcl::project create ::practcl::LOCAL
  ::practcl::LOCAL define set [::practcl::local_os]
  ::practcl::LOCAL define set LOCAL 1

  # Until something better comes along, use ::practcl::LOCAL
  # as our main project
  # Add tclconfig as a project of record
  ::practcl::LOCAL add_tool tclconfig {
    name tclconfig tag practcl class subproject.source fossil_url http://core.tcl.tk/tclconfig
  }
  # Add tcllib as a project of record
  ::practcl::LOCAL add_tool tcllib {
    tag trunk class sak fossil_url http://core.tcl.tk/tcllib
  }
  ::practcl::LOCAL add_tool kettle {
    tag trunk class sak fossil_url http://fossil.etoyoc.com/fossil/kettle
  }
  ::practcl::LOCAL add_tool tclvfs {
    tag trunk class tea
    fossil_url http://fossil.etoyoc.com/fossil/tclvfs
  }
  ::practcl::LOCAL add_tool critcl {
    tag master class subproject.binary
    git_url http://github.com/andreas-kupries/critcl
    modules lib
  } {
    method env-bootstrap {} {
      package require critcl::app
    }
    method env-install {} {
      my unpack
      set prefix [my <project> define get prefix [file join [file normalize ~] tcl]]
      set srcdir [my define get srcdir]
      ::practcl::dotclexec [file join $srcdir build.tcl] install [file join $prefix lib]
    }
  }
  ::practcl::LOCAL add_tool odie {
    tag trunk class subproject.source
    fossil_url http://fossil.etoyoc.com/fossil/odie
  }
  ::practcl::LOCAL add_tool tcl {
    tag release class subproject.core
    fossil_url http://core.tcl.tk/tcl
  }
  ::practcl::LOCAL add_tool tk {
    tag release class subproject.core
    fossil_url http://core.tcl.tk/tcl
  }
  ::practcl::LOCAL add_tool sqlite {
    tag practcl
    class subproject.tea
    pkg_name sqlite3
    fossil_url http://fossil.etoyoc.com/fossil/sqlite
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































Deleted modules/practcl/build/class/toolset/baseclass.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
###
# Ancestor-less class intended to be a mixin
# which defines a family of build related behaviors
# that are modified when targetting either gcc or msvc
###
::clay::define ::practcl::toolset {
  ###
  # find or fake a key/value list describing this project
  ###
  method config.sh {} {
    return [my read_configuration]
  }

  # Compute the location where the product will be built
  method BuildDir {PWD} {
    set name [my define get name]
    set debug [my define get debug 0]
    if {[my <project> define get LOCAL 0]} {
      return [my define get builddir [file join $PWD local $name]]
    }
    if {$debug} {
      return [my define get builddir [file join $PWD debug $name]]
    } else {
      return [my define get builddir [file join $PWD pkg $name]]
    }
  }

  # Return where the Makefile is located relative to [emph srcdir].
  # For this implementation the MakeDir is always srcdir.
  method MakeDir {srcdir} {
    return $srcdir
  }

  # Read information about the build process for this package.
  # For this implementation, data is sought in the following locations
  # in the following order:
  # config.tcl (generated by practcl.) PKGConfig.sh. The Makefile
  # [para]
  # If the Makefile needs to be consulted, but does not exist, the
  # Configure method is invoked
  method read_configuration {} {
    my variable conf_result
    if {[info exists conf_result]} {
      return $conf_result
    }
    set result {}
    set name [my define get name]
    set PWD $::CWD
    set builddir [my define get builddir]
    my unpack
    set srcdir [my define get srcdir]
    if {![file exists $builddir]} {
      my Configure
    }
    set filename [file join $builddir config.tcl]
    # Project uses the practcl template. Use the leavings from autoconf
    if {[file exists $filename]} {
      set dat [::practcl::read_configuration $builddir]
      foreach {item value} [::practcl::sort_dict $dat] {
        dict set result $item $value
      }
      set conf_result $result
      return $result
    }
    set filename [file join $builddir ${name}Config.sh]
    if {[file exists $filename]} {
      set l [expr {[string length $name]+1}]
      foreach {field dat} [::practcl::read_Config.sh $filename] {
        set field [string tolower $field]
        if {[string match ${name}_* $field]} {
          set field [string range $field $l end]
        }
        switch $field {
          version {
            dict set result pkg_vers $dat
          }
          lib_file {
            set field libfile
          }
        }
        dict set result $field $dat
      }
      set conf_result $result
      return $result
    }
    ###
    # Oh man... we have to guess
    ###
    if {![file exists [file join $builddir Makefile]]} {
      my Configure
    }
    set filename [file join $builddir Makefile]
    if {![file exists $filename]} {
      error "Could not locate any configuration data in $srcdir"
    }
    foreach {field dat} [::practcl::read_Makefile $filename] {
      dict set result $field $dat
    }
    if {![dict exists $result PRACTCL_PKG_LIBS] && [dict exists $result LIBS]} {
      dict set result PRACTCL_PKG_LIBS [dict get $result LIBS]
    }
    set conf_result $result
    cd $PWD
    return $result
  }

  ## method DEFS
  # This method populates 4 variables:
  # name - The name of the package
  # version - The version of the package
  # defs - C flags passed to the compiler
  # includedir - A list of paths to feed to the compiler for finding headers
  #
  method build-cflags {PROJECT DEFS namevar versionvar defsvar} {
    upvar 1 $namevar name $versionvar version NAME NAME $defsvar defs
    set name [string tolower [${PROJECT} define get name [${PROJECT} define get pkg_name]]]
    set NAME [string toupper $name]
    set version [${PROJECT} define get version [${PROJECT} define get pkg_vers]]
    if {$version eq {}} {
      set version 0.1a
    }
    set defs $DEFS
    foreach flag {
      -DPACKAGE_NAME
      -DPACKAGE_VERSION
      -DPACKAGE_TARNAME
      -DPACKAGE_STRING
    } {
      if {[set i [string first $flag $defs]] >= 0} {
        set j [string first -D $flag [expr {$i+[string length $flag]}]]
        set predef [string range $defs 0 [expr {$i-1}]]
        set postdef [string range $defs $j end]
        set defs "$predef $postdef"
      }
    }
    append defs " -DPACKAGE_NAME=\"${name}\" -DPACKAGE_VERSION=\"${version}\""
    append defs " -DPACKAGE_TARNAME=\"${name}\" -DPACKAGE_STRING=\"${name}\x5c\x20${version}\""
    return $defs
  }

  # Invoke critcl in an external process
  method critcl args {
    if {![info exists critcl]} {
      ::practcl::LOCAL tool critcl env-load
      set critcl [file join [::practcl::LOCAL tool critcl define get srcdir] main.tcl
    }
    set srcdir [my SourceRoot]
    set PWD [pwd]
    cd $srcdir
    ::practcl::dotclexec $critcl {*}$args
    cd $PWD
  }
}

oo::objdefine ::practcl::toolset {
  # Perform the selection for the toolset mixin
  method select object {
    ###
    # Select the toolset to use for this project
    ###
    if {[$object define exists toolset]} {
      return [$object define get toolset]
    }
    set class [$object define get toolset]
    if {$class ne {}} {
      $object clay mixinmap toolset $class
    } else {
      if {[info exists ::env(VisualStudioVersion)]} {
        $object clay mixinmap toolset ::practcl::toolset.msvc
      } else {
        $object clay mixinmap toolset ::practcl::toolset.gcc
      }
    }
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































































































Deleted modules/practcl/build/class/toolset/gcc.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794

::clay::define ::practcl::toolset.gcc {
  superclass ::practcl::toolset

  method Autoconf {} {
    ###
    # Re-run autoconf for this project
    # Not a good idea in practice... but in the right hands it can be useful
    ###
    set pwd [pwd]
    set srcdir [file normalize [my define get srcdir]]
    set localsrcdir [my MakeDir $srcdir]
    cd $localsrcdir
    foreach template {configure.ac configure.in} {
      set input [file join $srcdir $template]
      if {[file exists $input]} {
        puts "autoconf -f $input > [file join $srcdir configure]"
        exec autoconf -f $input > [file join $srcdir configure]
      }
    }
    cd $pwd
  }

  method BuildDir {PWD} {
    set name [my define get name]
    set debug [my define get debug 0]
    if {[my <project> define get LOCAL 0]} {
      return [my define get builddir [file join $PWD local $name]]
    }
    if {$debug} {
      return [my define get builddir [file join $PWD debug $name]]
    } else {
      return [my define get builddir [file join $PWD pkg $name]]
    }
  }

  method ConfigureOpts {} {
    set opts {}
    set builddir [my define get builddir]

    if {[my define get broken_destroot 0]} {
      set PREFIX [my <project> define get prefix_broken_destdir]
    } else {
      set PREFIX [my <project> define get prefix]
    }
    switch [my define get name] {
      tcl {
        set opts [::practcl::platform::tcl_core_options [my <project> define get TEACUP_OS]]
      }
      tk {
        set opts [::practcl::platform::tk_core_options  [my <project> define get TEACUP_OS]]
      }
    }
    if {[my <project> define get CONFIG_SITE] != {}} {
      lappend opts --host=[my <project> define get HOST]
    }
    set inside_msys [string is true -strict [my <project> define get MSYS_ENV 0]]
    lappend opts --with-tclsh=[info nameofexecutable]

    if {[my define get tk 0]} {
      if {![my <project> define get LOCAL 0]} {
        set obj [my <project> tclcore]
        if {$obj ne {}} {
          if {$inside_msys} {
            lappend opts --with-tcl=[::practcl::file_relative [file normalize $builddir] [$obj define get builddir]]
          } else {
            lappend opts --with-tcl=[file normalize [$obj define get builddir]]
          }
        }
        set obj [my <project> tkcore]
        if {$obj ne {}} {
          if {$inside_msys} {
            lappend opts --with-tk=[::practcl::file_relative [file normalize $builddir] [$obj define get builddir]]
          } else {
            lappend opts --with-tk=[file normalize [$obj define get builddir]]
          }
        }
      } else {
        lappend opts --with-tcl=[file join $PREFIX lib]
        lappend opts --with-tk=[file join $PREFIX lib]
      }
    } else {
      if {![my <project> define get LOCAL 0]} {
        set obj [my <project> tclcore]
        if {$obj ne {}} {
          if {$inside_msys} {
            lappend opts --with-tcl=[::practcl::file_relative [file normalize $builddir] [$obj define get builddir]]
          } else {
            lappend opts --with-tcl=[file normalize [$obj define get builddir]]
          }
        }
      } else {
        lappend opts --with-tcl=[file join $PREFIX lib]
      }
    }

    lappend opts {*}[my define get config_opts]
    if {![regexp -- "--prefix" $opts]} {
      lappend opts --prefix=$PREFIX --exec-prefix=$PREFIX
    }
    if {[my define get debug 0]} {
      lappend opts --enable-symbols=true
    }
    #--exec_prefix=$PREFIX
    #if {$::tcl_platform(platform) eq "windows"} {
    #  lappend opts --disable-64bit
    #}
    if {[my define get static 1]} {
      lappend opts --disable-shared
      #--disable-stubs
      #
    } else {
      lappend opts --enable-shared
    }
    return $opts
  }

  # Detect what directory contains the Makefile template
  method MakeDir {srcdir} {
    set localsrcdir $srcdir
    if {[file exists [file join $srcdir generic]]} {
      my define add include_dir [file join $srcdir generic]
    }
    set os [my <project> define get TEACUP_OS]
    switch $os {
      windows {
        if {[file exists [file join $srcdir win]]} {
          my define add include_dir [file join $srcdir win]
        }
        if {[file exists [file join $srcdir win Makefile.in]]} {
          set localsrcdir [file join $srcdir win]
        }
      }
      macosx {
        if {[file exists [file join $srcdir unix Makefile.in]]} {
          set localsrcdir [file join $srcdir unix]
        }
      }
      default {
        if {[file exists [file join $srcdir $os]]} {
          my define add include_dir [file join $srcdir $os]
        }
        if {[file exists [file join $srcdir unix]]} {
          my define add include_dir [file join $srcdir unix]
        }
        if {[file exists [file join $srcdir $os Makefile.in]]} {
          set localsrcdir [file join $srcdir $os]
        } elseif {[file exists [file join $srcdir unix Makefile.in]]} {
          set localsrcdir [file join $srcdir unix]
        }
      }
    }
    return $localsrcdir
  }

  Ensemble make::autodetect {} {
    set srcdir [my define get srcdir]
    set localsrcdir [my MakeDir $srcdir]
    if {$localsrcdir eq {}} {
      set localsrcdir $srcdir
    }
    if {$srcdir eq $localsrcdir} {
      if {![file exists [file join $srcdir tclconfig install-sh]]} {
        # ensure we have tclconfig with all of the trimmings
        set teapath {}
        if {[file exists [file join $srcdir .. tclconfig install-sh]]} {
          set teapath [file join $srcdir .. tclconfig]
        } else {
          set tclConfigObj [::practcl::LOCAL tool tclconfig]
          $tclConfigObj load
          set teapath [$tclConfigObj define get srcdir]
        }
        set teapath [file normalize $teapath]
        #file mkdir [file join $srcdir tclconfig]
        if {[catch {file link -symbolic [file join $srcdir tclconfig] $teapath}]} {
          ::practcl::copyDir [file join $teapath] [file join $srcdir tclconfig]
        }
      }
    }
    set builddir [my define get builddir]
    file mkdir $builddir
    if {![file exists [file join $localsrcdir configure]]} {
      if {[file exists [file join $localsrcdir autogen.sh]]} {
        cd $localsrcdir
        catch {exec sh autogen.sh >>& [file join $builddir autoconf.log]}
        cd $::CWD
      }
    }
    set opts [my ConfigureOpts]
    if {[file exists [file join $builddir autoconf.log]]} {
      file delete [file join $builddir autoconf.log]
    }
    ::practcl::debug [list PKG [my define get name] CONFIGURE {*}$opts]
    ::practcl::log   [file join $builddir autoconf.log] [list  CONFIGURE {*}$opts]
    cd $builddir
    if {[my <project> define get CONFIG_SITE] ne {}} {
      set ::env(CONFIG_SITE) [my <project> define get CONFIG_SITE]
    }
    catch {exec sh [file join $localsrcdir configure] {*}$opts >>& [file join $builddir autoconf.log]}
    cd $::CWD
  }

  Ensemble make::clean {} {
    set builddir [file normalize [my define get builddir]]
    catch {::practcl::domake $builddir clean}
  }

  Ensemble make::compile {} {
    set name [my define get name]
    set srcdir [my define get srcdir]
    if {[my define get static 1]} {
      puts "BUILDING Static $name $srcdir"
    } else {
      puts "BUILDING Dynamic $name $srcdir"
    }
    cd $::CWD
    set builddir [file normalize [my define get builddir]]
    file mkdir $builddir
    if {![file exists [file join $builddir Makefile]]} {
      my Configure
    }
    if {[file exists [file join $builddir make.tcl]]} {
      if {[my define get debug 0]} {
        ::practcl::domake.tcl $builddir debug all
      } else {
        ::practcl::domake.tcl $builddir all
      }
    } else {
      ::practcl::domake $builddir all
    }
  }

  Ensemble make::install DEST {
    set PWD [pwd]
    set builddir [my define get builddir]
    if {[my <project> define get LOCAL 0] || $DEST eq {}} {
      if {[file exists [file join $builddir make.tcl]]} {
        puts "[self] Local INSTALL (Practcl)"
        ::practcl::domake.tcl $builddir install
      } elseif {[my define get broken_destroot 0] == 0} {
        puts "[self] Local INSTALL (TEA)"
        ::practcl::domake $builddir install
      }
    } else {
      if {[file exists [file join $builddir make.tcl]]} {
        # Practcl builds can inject right to where we need them
        puts "[self] VFS INSTALL $DEST (Practcl)"
        ::practcl::domake.tcl $builddir install-package $DEST
      } elseif {[my define get broken_destroot 0] == 0} {
        # Most modern TEA projects understand DESTROOT in the makefile
        puts "[self] VFS INSTALL $DEST (TEA)"
        ::practcl::domake $builddir install DESTDIR=[::practcl::file_relative $builddir $DEST]
      } else {
        # But some require us to do an install into a fictitious filesystem
        # and then extract the gooey parts within.
        # (*cough*) TkImg
        set PREFIX [my <project> define get prefix]
        set BROKENROOT [::practcl::msys_to_tclpath [my <project> define get prefix_broken_destdir]]
        file delete -force $BROKENROOT
        file mkdir $BROKENROOT
        ::practcl::domake $builddir $install
        ::practcl::copyDir $BROKENROOT  [file join $DEST [string trimleft $PREFIX /]]
        file delete -force $BROKENROOT
      }
    }
    cd $PWD
  }

  method build-compile-sources {PROJECT COMPILE CPPCOMPILE INCLUDES} {
    set objext [my define get OBJEXT o]
    set EXTERN_OBJS {}
    set OBJECTS {}
    set result {}
    set builddir [$PROJECT define get builddir]
    file mkdir [file join $builddir objs]
    set debug [$PROJECT define get debug 0]

    set task {}
    ###
    # Compile the C sources
    ###
    ::practcl::debug ### COMPILE PRODUCTS
    foreach {ofile info} [${PROJECT} project-compile-products] {
      ::practcl::debug $ofile $info
      if {[dict exists $info library]} {
        #dict set task $ofile done 1
        continue
      }
      # Products with no cfile aren't compiled
      if {![dict exists $info cfile] || [set cfile [dict get $info cfile]] eq {}} {
        #dict set task $ofile done 1
        continue
      }
      set ofile [file rootname $ofile]
      dict set task $ofile done 0
      if {[dict exists $info external] && [dict get $info external]==1} {
        dict set task $ofile external 1
      } else {
        dict set task $ofile external 0
      }
      set cfile [dict get $info cfile]
      if {$debug} {
        set ofilename [file join $builddir objs [file rootname [file tail $ofile]].debug.${objext}]
      } else {
        set ofilename [file join $builddir objs [file tail $ofile]].${objext}
      }
      dict set task $ofile source $cfile
      dict set task $ofile objfile $ofilename
      if {![dict exist $info command]} {
        if {[file extension $cfile] in {.c++ .cpp}} {
          set cmd $CPPCOMPILE
        } else {
          set cmd $COMPILE
        }
        if {[dict exists $info extra]} {
          append cmd " [dict get $info extra]"
        }
        append cmd " $INCLUDES"
        append cmd " -c $cfile"
        append cmd " -o $ofilename"
        dict set task $ofile command $cmd
      }
    }
    set completed 0
    while {$completed==0} {
      set completed 1
      foreach {ofile info} $task {
        set waiting {}
        if {[dict exists $info done] && [dict get $info done]} continue
        ::practcl::debug COMPILING $ofile $info
        set filename [dict get $info objfile]
        if {[file exists $filename] && [file mtime $filename]>[file mtime [dict get $info source]]} {
          lappend result $filename
          dict set task $ofile done 1
          continue
        }
        if {[dict exists $info depend]} {
          foreach file [dict get $info depend] {
            if {[dict exists $task $file command] && [dict exists $task $file done] && [dict get $task $file done] != 1} {
              set waiting $file
              break
            }
          }
        }
        if {$waiting ne {}} {
          set completed 0
          puts "$ofile waiting for $waiting"
          continue
        }
        if {[dict exists $info command]} {
          set cmd [dict get $info command]
          puts "$cmd"
          exec {*}$cmd >&@ stdout
        }
        if {[file exists $filename]} {
          lappend result $filename
          dict set task $ofile done 1
          continue
        }
        error "Failed to produce $filename"
      }
    }
    return $result
  }

method build-Makefile {path PROJECT} {
  array set proj [$PROJECT define dump]
  set path $proj(builddir)
  cd $path
  set includedir .
  set objext [my define get OBJEXT o]

  #lappend includedir [::practcl::file_relative $path $proj(TCL_INCLUDES)]
  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TCL_SRC_DIR) generic]]]
  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(srcdir) generic]]]
  foreach include [$PROJECT toolset-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }
  set INCLUDES  "-I[join $includedir " -I"]"
  set NAME [string toupper $proj(name)]
  set result {}
  set products {}
  set libraries {}
  set thisline {}
  ::practcl::cputs result "${NAME}_DEFS = $proj(DEFS)\n"
  ::practcl::cputs result "${NAME}_INCLUDES = -I\"[join $includedir "\" -I\""]\"\n"
  ::practcl::cputs result "${NAME}_COMPILE = \$(CC) \$(CFLAGS) \$(PKG_CFLAGS) \$(${NAME}_DEFS) \$(${NAME}_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(AM_CFLAGS)"
  ::practcl::cputs result "${NAME}_CPPCOMPILE = \$(CXX) \$(CFLAGS) \$(PKG_CFLAGS) \$(${NAME}_DEFS) \$(${NAME}_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(AM_CFLAGS)"

  foreach {ofile info} [$PROJECT project-compile-products] {
    dict set products $ofile $info
    set fname [file rootname ${ofile}].${objext}
    if {[dict exists $info library]} {
lappend libraries $ofile
continue
    }
    if {[dict exists $info depend]} {
      ::practcl::cputs result "\n${fname}: [dict get $info depend]"
    } else {
      ::practcl::cputs result "\n${fname}:"
    }
    set cfile [dict get $info cfile]
    if {[file extension $cfile] in {.c++ .cpp}} {
      set cmd "\t\$\(${NAME}_CPPCOMPILE\)"
    } else {
      set cmd "\t\$\(${NAME}_COMPILE\)"
    }
    if {[dict exists $info extra]} {
      append cmd " [dict get $info extra]"
    }
    append cmd " -c [dict get $info cfile] -o \$@\n\t"
    ::practcl::cputs result  $cmd
  }

  set map {}
  lappend map %LIBRARY_NAME% $proj(name)
  lappend map %LIBRARY_VERSION% $proj(version)
  lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $proj(version)]
  lappend map %LIBRARY_PREFIX% [$PROJECT define getnull libprefix]

  if {[string is true [$PROJECT define get SHARED_BUILD]]} {
    set outfile [$PROJECT define get libfile]
  } else {
    set outfile [$PROJECT shared_library]
  }
  $PROJECT define set shared_library $outfile
  ::practcl::cputs result "
${NAME}_SHLIB = $outfile
${NAME}_OBJS = [dict keys $products]
"

  #lappend map %OUTFILE% {\[$]@}
  lappend map %OUTFILE% $outfile
  lappend map %LIBRARY_OBJECTS% "\$(${NAME}_OBJS)"
  ::practcl::cputs result "$outfile: \$(${NAME}_OBJS)"
  ::practcl::cputs result "\t[string map $map [$PROJECT define get PRACTCL_SHARED_LIB]]"
  if {[$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL] ni {: {}}} {
    ::practcl::cputs result "\t[string map $map [$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL]]"
  }
  ::practcl::cputs result {}
  if {[string is true [$PROJECT define get SHARED_BUILD]]} {
    #set outfile [$PROJECT static_library]
    set outfile $proj(name).a
  } else {
    set outfile [$PROJECT define get libfile]
  }
  $PROJECT define set static_library $outfile
  dict set map %OUTFILE% $outfile
  ::practcl::cputs result "$outfile: \$(${NAME}_OBJS)"
  ::practcl::cputs result "\t[string map $map [$PROJECT define get PRACTCL_STATIC_LIB]]"
  ::practcl::cputs result {}
  return $result
}

###
# Produce a static or dynamic library
###
method build-library {outfile PROJECT} {
  array set proj [$PROJECT define dump]
  set path $proj(builddir)
  cd $path
  set includedir .
  #lappend includedir [::practcl::file_relative $path $proj(TCL_INCLUDES)]
  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TCL_SRC_DIR) generic]]]
  if {[$PROJECT define get TEA_PRIVATE_TCL_HEADERS 0]} {
    if {[$PROJECT define get TEA_PLATFORM] eq "windows"} {
      lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TCL_SRC_DIR) win]]]
    } else {
      lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TCL_SRC_DIR) unix]]]
    }
  }

  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(srcdir) generic]]]

  if {[$PROJECT define get tk 0]} {
    lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) generic]]]
    lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) ttk]]]
    lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) xlib]]]
    if {[$PROJECT define get TEA_PRIVATE_TK_HEADERS 0]} {
      if {[$PROJECT define get TEA_PLATFORM] eq "windows"} {
        lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) win]]]
      } else {
        lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) unix]]]
      }
    }
    lappend includedir [::practcl::file_relative $path [file normalize $proj(TK_BIN_DIR)]]
  }
  foreach include [$PROJECT toolset-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }
  my build-cflags $PROJECT $proj(DEFS) name version defs
  set NAME [string toupper $name]
  set debug [$PROJECT define get debug 0]
  set os [$PROJECT define get TEACUP_OS]

  set INCLUDES  "-I[join $includedir " -I"]"
  if {$debug} {
    set COMPILE "$proj(CC) $proj(CFLAGS_DEBUG) -ggdb \
$proj(CFLAGS_WARNING) $INCLUDES $defs"

    if {[info exists proc(CXX)]} {
      set COMPILECPP "$proj(CXX) $defs $INCLUDES $proj(CFLAGS_DEBUG) -ggdb \
  $defs $proj(CFLAGS_WARNING)"
    } else {
      set COMPILECPP $COMPILE
    }
  } else {
    set COMPILE "$proj(CC) $proj(CFLAGS) $defs"

    if {[info exists proc(CXX)]} {
      set COMPILECPP "$proj(CXX) $defs $proj(CFLAGS)"
    } else {
      set COMPILECPP $COMPILE
    }
  }

  set products [my build-compile-sources $PROJECT $COMPILE $COMPILECPP $INCLUDES]

  set map {}
  lappend map %LIBRARY_NAME% $proj(name)
  lappend map %LIBRARY_VERSION% $proj(version)
  lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $proj(version)]
  lappend map %OUTFILE% $outfile
  lappend map %LIBRARY_OBJECTS% $products
  lappend map {${CFLAGS}} "$proj(CFLAGS_DEFAULT) $proj(CFLAGS_WARNING)"

  if {[string is true [$PROJECT define get SHARED_BUILD 1]]} {
    set cmd [$PROJECT define get PRACTCL_SHARED_LIB]
    append cmd " [$PROJECT define get PRACTCL_LIBS]"
    set cmd [string map $map $cmd]
    puts $cmd
    exec {*}$cmd >&@ stdout
    if {[$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL] ni {: {}}} {
      set cmd [string map $map [$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL]]
      puts $cmd
      exec {*}$cmd >&@ stdout
    }
  } else {
    set cmd [string map $map [$PROJECT define get PRACTCL_STATIC_LIB]]
    puts $cmd
    exec {*}$cmd >&@ stdout
  }
  set ranlib [$PROJECT define get RANLIB]
  if {$ranlib ni {{} :}} {
    catch {exec $ranlib $outfile}
  }
}

###
# Produce a static executable
###
method build-tclsh {outfile PROJECT {path {auto}}} {
  if {[my define get tk 0] && [my define get static_tk 0]} {
    puts " BUILDING STATIC TCL/TK EXE $PROJECT"
    set TKOBJ  [$PROJECT tkcore]
    if {[info command $TKOBJ] eq {}} {
      set TKOBJ ::noop
      $PROJECT define set static_tk 0
    } else {
      ::practcl::toolset select $TKOBJ
      array set TK  [$TKOBJ read_configuration]
      set do_tk [$TKOBJ define get static]
      $PROJECT define set static_tk $do_tk
      $PROJECT define set tk $do_tk
      set TKSRCDIR [$TKOBJ define get srcdir]
    }
  } else {
    puts " BUILDING STATIC TCL EXE $PROJECT"
    set TKOBJ ::noop
    my define set static_tk 0
  }
  set TCLOBJ [$PROJECT tclcore]
  ::practcl::toolset select $TCLOBJ
  set PKG_OBJS {}
  foreach item [$PROJECT link list core.library] {
    if {[string is true [$item define get static]]} {
      lappend PKG_OBJS $item
    }
  }
  foreach item [$PROJECT link list package] {
    if {[string is true [$item define get static]]} {
      lappend PKG_OBJS $item
    }
  }
  array set TCL [$TCLOBJ read_configuration]
  if {$path in {{} auto}} {
    set path [file dirname [file normalize $outfile]]
  }
  if {$path eq "."} {
    set path [pwd]
  }
  cd $path
  ###
  # For a static Tcl shell, we need to build all local sources
  # with the same DEFS flags as the tcl core was compiled with.
  # The DEFS produced by a TEA extension aren't intended to operate
  # with the internals of a staticly linked Tcl
  ###
  my build-cflags $PROJECT $TCL(defs) name version defs
  set debug [$PROJECT define get debug 0]
  set NAME [string toupper $name]
  set result {}
  set libraries {}
  set thisline {}
  set OBJECTS {}
  set EXTERN_OBJS {}
  foreach obj $PKG_OBJS {
    $obj compile
    set config($obj) [$obj read_configuration]
  }
  set os [$PROJECT define get TEACUP_OS]
  set TCLSRCDIR [$TCLOBJ define get srcdir]

  set includedir .
  foreach include [$TCLOBJ toolset-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }
  lappend includedir [::practcl::file_relative $path [file normalize ../tcl/compat/zlib]]
  if {[$PROJECT define get static_tk]} {
    lappend includedir [::practcl::file_relative $path [file normalize [file join $TKSRCDIR generic]]]
    lappend includedir [::practcl::file_relative $path [file normalize [file join $TKSRCDIR ttk]]]
    lappend includedir [::practcl::file_relative $path [file normalize [file join $TKSRCDIR xlib]]]
    lappend includedir [::practcl::file_relative $path [file normalize $TKSRCDIR]]
  }

  foreach include [$PROJECT toolset-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }

  set INCLUDES  "-I[join $includedir " -I"]"
  if {$debug} {
      set COMPILE "$TCL(cc) $TCL(shlib_cflags) $TCL(cflags_debug) -ggdb \
$TCL(cflags_warning) $TCL(extra_cflags)"
  } else {
      set COMPILE "$TCL(cc) $TCL(shlib_cflags) $TCL(cflags_optimize) \
$TCL(cflags_warning) $TCL(extra_cflags)"
  }
  append COMPILE " " $defs
  lappend OBJECTS {*}[my build-compile-sources $PROJECT $COMPILE $COMPILE $INCLUDES]

  set TCLSRC [file normalize $TCLSRCDIR]

  if {[${PROJECT} define get TEACUP_OS] eq "windows"} {
    set windres [$PROJECT define get RC windres]
    set RSOBJ [file join $path objs tclkit.res.o]
    set RCSRC [${PROJECT} define get kit_resource_file]
    set RCMAN [${PROJECT} define get kit_manifest_file]
    set RCICO [${PROJECT} define get kit_icon_file]

    set cmd [list $windres -o $RSOBJ -DSTATIC_BUILD --include [::practcl::file_relative $path [file join $TCLSRC generic]]]
    if {[$PROJECT define get static_tk]} {
      if {$RCSRC eq {} || ![file exists $RCSRC]} {
        set RCSRC [file join $TKSRCDIR win rc wish.rc]
      }
      if {$RCMAN eq {} || ![file exists $RCMAN]} {
        set RCMAN [file join [$TKOBJ define get builddir] wish.exe.manifest]
      }
      if {$RCICO eq {} || ![file exists $RCICO]} {
        set RCICO [file join $TKSRCDIR win rc wish.ico]
      }
      set TKSRC [file normalize $TKSRCDIR]
      lappend cmd --include [::practcl::file_relative $path [file join $TKSRC generic]] \
        --include [::practcl::file_relative $path [file join $TKSRC win]] \
        --include [::practcl::file_relative $path [file join $TKSRC win rc]]
    } else {
      if {$RCSRC eq {} || ![file exists $RCSRC]} {
        set RCSRC [file join $TCLSRCDIR win tclsh.rc]
      }
      if {$RCMAN eq {} || ![file exists $RCMAN]} {
        set RCMAN [file join [$TCLOBJ define get builddir] tclsh.exe.manifest]
      }
      if {$RCICO eq {} || ![file exists $RCICO]} {
        set RCICO [file join $TCLSRCDIR win tclsh.ico]
      }
    }
    foreach item [${PROJECT} define get resource_include] {
      lappend cmd --include [::practcl::file_relative $path [file normalize $item]]
    }
    lappend cmd [file tail $RCSRC]
    if {![file exists [file join $path [file tail $RCSRC]]]} {
      file copy -force $RCSRC [file join $path [file tail $RCSRC]]
    }
    if {![file exists [file join $path [file tail $RCMAN]]]} {
      file copy -force $RCMAN [file join $path [file tail $RCMAN]]
    }
    if {![file exists [file join $path [file tail $RCICO]]]} {
      file copy -force $RCICO [file join $path [file tail $RCICO]]
    }
    ::practcl::doexec {*}$cmd
    lappend OBJECTS $RSOBJ
  }
  puts "***"
  set cmd "$TCL(cc)"
  if {$debug} {
   append cmd " $TCL(cflags_debug)"
  } else {
   append cmd " $TCL(cflags_optimize)"
  }
  append cmd " $TCL(ld_flags)"
  if {$debug} {
   append cmd " $TCL(ldflags_debug)"
  } else {
   append cmd " $TCL(ldflags_optimize)"
  }

  append cmd " $OBJECTS"
  append cmd " $EXTERN_OBJS"
  if {$debug && $os eq "windows"} {
    ###
    # There is bug in the core's autoconf and the value for
    # tcl_build_lib_spec does not have the 'g' suffix
    ###
    append cmd " -L[file dirname $TCL(build_stub_lib_path)] -ltcl86g"
    if {[$PROJECT define get static_tk]} {
      append cmd " -L[file dirname $TK(build_stub_lib_path)] -ltk86g"
    }
  } else {
    append cmd " $TCL(build_lib_spec)"
    if {[$PROJECT define get static_tk]} {
      append cmd  " $TK(build_lib_spec)"
    }
  }
  foreach obj $PKG_OBJS {
    append cmd " [$obj linker-products $config($obj)]"
  }
  set LIBS {}
  foreach item $TCL(libs) {
    if {[string range $item 0 1] eq "-l" && $item in $LIBS } continue
    lappend LIBS $item
  }
  if {[$PROJECT define get static_tk]} {
    foreach item $TK(libs) {
      if {[string range $item 0 1] eq "-l" && $item in $LIBS } continue
      lappend LIBS $item
    }
  }
  if {[info exists TCL(extra_libs)]} {
    foreach item $TCL(extra_libs) {
      if {[string range $item 0 1] eq "-l" && $item in $LIBS } continue
      lappend LIBS $item
    }
  }
  foreach obj $PKG_OBJS {
    puts [list Checking $obj for external dependencies]
    foreach item [$obj linker-external $config($obj)] {
      puts [list $obj adds $item]
      if {[string range $item 0 1] eq "-l" && $item in $LIBS } continue
      lappend LIBS $item
    }
  }
  append cmd " ${LIBS}"
  foreach obj $PKG_OBJS {
    puts [list Checking $obj for additional link items]
    foreach item [$obj linker-extra $config($obj)] {
      append cmd $item
    }
  }
  if {$debug && $os eq "windows"} {
    append cmd " -L[file dirname $TCL(build_stub_lib_path)] ${TCL(stub_lib_flag)}"
    if {[$PROJECT define get static_tk]} {
      append cmd " -L[file dirname $TK(build_stub_lib_path)] ${TK(stub_lib_flag)}"
    }
  } else {
    append cmd " $TCL(build_stub_lib_spec)"
    if {[$PROJECT define get static_tk]} {
      append cmd " $TK(build_stub_lib_spec)"
    }
  }
  if {[info exists TCL(cc_search_flags)]} {
    append cmd " $TCL(cc_search_flags)"
  }
  append cmd " -o $outfile "
  if {$os eq "windows"} {
    set LDFLAGS_CONSOLE {-mconsole -pipe -static-libgcc}
    set LDFLAGS_WINDOW  {-mwindows -pipe -static-libgcc}
    append cmd " $LDFLAGS_CONSOLE"
  }
  puts "LINK: $cmd"
  exec {*}[string map [list "\n" " " "  " " "] $cmd] >&@ stdout
}

}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/practcl/build/class/toolset/msvc.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
::clay::define ::practcl::toolset.msvc {
  superclass ::practcl::toolset

  # MSVC always builds in the source directory
  method BuildDir {PWD} {
    set srcdir [my define get srcdir]
    return $srcdir
  }


  # Do nothing
  Ensemble make::autodetect {} {
  }

  Ensemble make::clean {} {
    set PWD [pwd]
    set srcdir [my define get srcdir]
    cd $srcdir
    catch {::practcl::doexec nmake -f makefile.vc clean}
    cd $PWD
  }

  Ensemble make::compile {} {
    set srcdir [my define get srcdir]
    if {[my define get static 1]} {
      puts "BUILDING Static $name $srcdir"
    } else {
      puts "BUILDING Dynamic $name $srcdir"
    }
    cd $srcdir
    if {[file exists [file join $srcdir make.tcl]]} {
      if {[my define get debug 0]} {
        ::practcl::domake.tcl $srcdir debug all
      } else {
        ::practcl::domake.tcl $srcdir all
      }
    } else {
      if {[file exists [file join $srcdir makefile.vc]]} {
        ::practcl::doexec nmake -f makefile.vc INSTALLDIR=[my <project> define get installdir]  {*}[my NmakeOpts] release
      } elseif {[file exists [file join $srcdir win makefile.vc]]} {
        cd [file join $srcdir win]
        ::practcl::doexec nmake -f makefile.vc INSTALLDIR=[my <project> define get installdir]  {*}[my NmakeOpts] release
      } else {
        error "No make.tcl or makefile.vc found for project $name"
      }
    }
  }

  Ensemble make::install DEST {
    set PWD [pwd]
    set srcdir [my define get srcdir]
    cd $srcdir
    if {$DEST eq {}} {
      error "No destination given"
    }
    if {[my <project> define get LOCAL 0] || $DEST eq {}} {
      if {[file exists [file join $srcdir make.tcl]]} {
        # Practcl builds can inject right to where we need them
        puts "[self] Local Install (Practcl)"
        ::practcl::domake.tcl $srcdir install
      } else {
        puts "[self] Local Install (Nmake)"
        ::practcl::doexec nmake -f makefile.vc {*}[my NmakeOpts] install
      }
    } else {
      if {[file exists [file join $srcdir make.tcl]]} {
        # Practcl builds can inject right to where we need them
        puts "[self] VFS INSTALL $DEST (Practcl)"
        ::practcl::domake.tcl $srcdir install-package $DEST
      } else {
        puts "[self] VFS INSTALL $DEST"
        ::practcl::doexec nmake -f makefile.vc INSTALLDIR=$DEST {*}[my NmakeOpts] install
      }
    }
    cd $PWD
  }

  # Detect what directory contains the Makefile template
  method MakeDir {srcdir} {
    set localsrcdir $srcdir
    if {[file exists [file join $srcdir generic]]} {
      my define add include_dir [file join $srcdir generic]
    }
    if {[file exists [file join $srcdir win]]} {
       my define add include_dir [file join $srcdir win]
    }
    if {[file exists [file join $srcdir makefile.vc]]} {
      set localsrcdir [file join $srcdir win]
    }
    return $localsrcdir
  }

  method NmakeOpts {} {
    set opts {}
    set builddir [file normalize [my define get builddir]]

    if {[my <project> define exists tclsrcdir]} {
      ###
      # On Windows we are probably running under MSYS, which doesn't deal with
      # spaces in filename well
      ###
      set TCLSRCDIR  [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tclsrcdir] ..]]]
      set TCLGENERIC [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tclsrcdir] .. generic]]]
      lappend opts TCLDIR=[file normalize $TCLSRCDIR]
      #--with-tclinclude=$TCLGENERIC
    }
    if {[my <project> define exists tksrcdir]} {
      set TKSRCDIR  [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tksrcdir] ..]]]
      set TKGENERIC [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tksrcdir] .. generic]]]
      #lappend opts --with-tk=$TKSRCDIR --with-tkinclude=$TKGENERIC
      lappend opts TKDIR=[file normalize $TKSRCDIR]
    }
    return $opts
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































Deleted modules/practcl/build/doctool.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
namespace eval ::practcl {}

###
# Concatenate a file
###
proc ::practcl::cat fname {
    if {![file exists $fname]} {
       return
    }
    set fin [open $fname r]
    set data [read $fin]
    close $fin
    return $data
}

###
# Strip the global comments from tcl code. Used to
# prevent the documentation markup comments from clogging
# up files intended for distribution in machine readable format.
###
proc ::practcl::docstrip text {
  set result {}
  foreach line [split $text \n] {
    append thisline $line \n
    if {![info complete $thisline]} continue
    set outline $thisline
    set thisline {}
    if {[string trim $outline] eq {}} {
      continue
    }
    if {[string index [string trim $outline] 0] eq "#"} continue
    set cmd [string trim [lindex $outline 0] :]
    if {$cmd eq "namespace" && [lindex $outline 1] eq "eval"} {
      append result [list {*}[lrange $outline 0 end-1]] " " \{ \n [docstrip [lindex $outline end]]\} \n
      continue
    }
    if {[string match "*::define" $cmd] && [llength $outline]==3} {
      append result [list {*}[lrange $outline 0 end-1]] " " \{ \n [docstrip [lindex $outline end]]\} \n
      continue
    }
    if {$cmd eq "oo::class" && [lindex $outline 1] eq "create"} {
      append result [list {*}[lrange $outline 0 end-1]] " " \{ \n [docstrip [lindex $outline end]]\} \n
      continue
    }
    append result $outline
  }
  return $result
}

###
# Append a line of text to a variable. Optionally apply a string mapping.
# argspec:
#   map {mandatory 0 positional 1}
#   text {mandatory 1 positional 1}
###
proc ::putb {buffername args} {
  upvar 1 $buffername buffer
  switch [llength $args] {
    1 {
      append buffer [lindex $args 0] \n
    }
    2 {
      append buffer [string map {*}$args] \n
    }
    default {
      error "usage: putb buffername ?map? string"
    }
  }
}

###
# Tool for build scripts to dynamically generate manual files from comments
# in source code files
# example:
# set authors {
#   {John Doe} {jdoe@illustrious.edu}
#   {Tom RichardHarry} {tomdickharry@illustrius.edu}
# }
# # Create the object
# ::practcl::doctool create AutoDoc
# set fout [open [file join $moddir module.tcl] w]
# foreach file [glob [file join $srcdir *.tcl]] {
#   set content [::practcl::cat [file join $srcdir $file]]
#    # Scan the file
#    AutoDoc scan_text $content
#    # Strip the comments from the distribution
#    puts $fout [::practcl::docstrip $content]
# }
# # Write out the manual page
# set manout [open [file join $moddir module.man] w]
# dict set args header [string map $modmap [::practcl::cat [file join $srcdir manual.txt]]]
# dict set args footer [string map $modmap [::practcl::cat [file join $srcdir footer.txt]]]
# dict set args authors $authors
# puts $manout [AutoDoc manpage {*}$args]
# close $manout
###
::oo::class create ::practcl::doctool {
  constructor {} {
    my reset
  }

  ###
  # Process an argument list into an informational dict.
  # This method also understands non-positional
  # arguments expressed in the notation of Tip 471
  # [uri https://core.tcl-lang.org/tips/doc/trunk/tip/479.md].
  # [para]
  # The output will be a dictionary of all of the fields and whether the fields
  # are [const positional], [const mandatory], and whether they have a
  # [const default] value.
  # [para]
  # example:
  #   my argspec {a b {c 10}}
  #
  #   > a {positional 1 mandatory 1} b {positional 1 mandatory 1} c {positional 1 mandatory 0 default 10}
  ###
  method argspec {argspec} {
    set result [dict create]
    foreach arg $argspec {
      set name [lindex $arg 0]
      dict set result $name positional 1
      dict set result $name mandatory  1
      if {$name in {args dictargs}} {
        switch [llength $arg] {
          1 {
            dict set result $name mandatory 0
          }
          2 {
            dict for {optname optinfo} [lindex $arg 1] {
              set optname [string trim $optname -:]
              dict set result $optname {positional 1 mandatory 0}
              dict for {f v} $optinfo {
                dict set result $optname [string trim $f -:] $v
              }
            }
          }
          default {
            error "Bad argument"
          }
        }
      } else {
        switch [llength $arg] {
          1 {
            dict set result $name mandatory 1
          }
          2 {
            dict set result $name mandatory 0
            dict set result $name default   [lindex $arg 1]
          }
          default {
            error "Bad argument"
          }
        }
      }
    }
    return $result
  }

  ###
  # Convert a block of comments into an informational dictionary.
  # If lines in the comment start with a single word ending in a colon,
  # all subsequent lines are appended to a dictionary field of that name.
  # If no fields are given, all of the text is appended to the [const description]
  # field.
  # example:
  # my comment {Does something cool}
  # > description {Does something cool}
  #
  # my comment {
  # title : Something really cool
  # author : Sean Woods
  # author : John Doe
  # description :
  # This does something really cool!
  # }
  # > description {This does something really cool!}
  #   title {Something really cool}
  #   author {Sean Woods
  #   John Doe}
  ###
  method comment block {
    set count 0
    set field description
    set result [dict create description {}]
    foreach line [split $block \n] {
      set sline [string trim $line]
      set fwidx [string first " " $sline]
      if {$fwidx < 0} {
        set firstword [string range $sline 0 end]
        set restline {}
      } else {
        set firstword [string range $sline 0 [expr {$fwidx-1}]]
        set restline [string range $sline [expr {$fwidx+1}] end]
      }
      if {[string index $firstword end] eq ":"} {
        set field [string tolower [string trim $firstword -:]]
        switch $field {
          dictargs -
          arglist {
            set field argspec
          }
          desc {
            set field description
          }
        }
        if {[string length $restline]} {
          dict append result $field "$restline\n"
        }
      } else {
        dict append result $field "$line\n"
      }
    }
    return $result
  }

  method keyword.Annotation {resultvar commentblock type name body} {
    upvar 1 $resultvar result
    set name [string trim $name :]
    if {[dict exists $result $type $name]} {
      set info [dict get $result $type $name]
    } else {
      set info [my comment $commentblock]
    }
    foreach {f v} $body {
      dict set info $f $v
    }
    dict set result $type $name $info
  }

  ###
  # Process an oo::objdefine call that modifies the class object
  # itself
  ####
  method keyword.Class {resultvar commentblock name body} {
    upvar 1 $resultvar result
    set name [string trim $name :]
    if {[dict exists $result class $name]} {
      set info [dict get $result class $name]
    } else {
      set info [my comment $commentblock]
    }
    set commentblock {}
    foreach line [split $body \n] {
      append thisline $line \n
      if {![info complete $thisline]} continue
      set thisline [string trim $thisline]
      if {[string index $thisline 0] eq "#"} {
        append commentblock [string trimleft $thisline #] \n
        set thisline {}
        continue
      }
      set cmd [string trim [lindex $thisline 0] ":"]
      switch $cmd {
        Option -
        option {
          my keyword.Annotation info $commentblock option [lindex $thisline 1] [lindex $thisline 2]
          set commentblock {}
        }
        variable -
        Variable {
          my keyword.Annotation info $commentblock variable [lindex $thisline 1] [list type scaler default [lindex $thisline 2]]
          set commentblock {}
        }
        Dict -
        Array {
          set iinfo [lindex $thisline 2]
          dict set iinfo type [string tolower $cmd]
          my keyword.Annotation info $commentblock variable [lindex $thisline 1] $iinfo
          set commentblock {}
        }
        Componant -
        Delegate {
          my keyword.Annotation info $commentblock delegate [lindex $thisline 1] [lindex $thisline 2]
          set commentblock {}
        }
        method -
        Ensemble {
          my keyword.Class_Method info $commentblock  {*}[lrange $thisline 1 end-1]
          set commentblock {}
        }
      }
      set thisline {}
    }
    dict set result class $name $info
  }

  ###
  # Process an oo::define, clay::define, etc statement.
  ###
  method keyword.class {resultvar commentblock name body} {
    upvar 1 $resultvar result
    set name [string trim $name :]
    if {[dict exists $result class $name]} {
      set info [dict get $result class $name]
    } else {
      set info [my comment $commentblock]
    }
    set commentblock {}
    foreach line [split $body \n] {
      append thisline $line \n
      if {![info complete $thisline]} continue
      set thisline [string trim $thisline]
      if {[string index $thisline 0] eq "#"} {
        append commentblock [string trimleft $thisline #] \n
        set thisline {}
        continue
      }
      set cmd [string trim [lindex $thisline 0] ":"]
      switch $cmd {
        Option -
        option {
          puts [list keyword.Annotation $cmd $thisline]
          my keyword.Annotation info $commentblock option [lindex $thisline 1] [lindex $thisline 2]
          set commentblock {}
        }
        variable -
        Variable {
          my keyword.Annotation info $commentblock variable [lindex $thisline 1] [list default [lindex $thisline 2]]
          set commentblock {}
        }
        Dict -
        Array {
          set iinfo [lindex $thisline 2]
          dict set iinfo type [string tolower $cmd]
          my keyword.Annotation info $commentblock variable [lindex $thisline 1] $iinfo
          set commentblock {}
        }
        Componant -
        Delegate {
          my keyword.Annotation info $commentblock delegate [lindex $thisline 1] [lindex $thisline 2]
          set commentblock {}
        }
        superclass {
          dict set info ancestors [lrange $thisline 1 end]
          set commentblock {}
        }
        classmethod -
        class_method -
        Class_Method {
          my keyword.Class_Method info $commentblock  {*}[lrange $thisline 1 end-1]
          set commentblock {}
        }
        destructor -
        constructor {
          my keyword.method info $commentblock {*}[lrange $thisline 0 end-1]
          set commentblock {}
        }
        method -
        Ensemble {
          my keyword.method info $commentblock  {*}[lrange $thisline 1 end-1]
          set commentblock {}
        }
      }
      set thisline {}
    }
    dict set result class $name $info
  }

  ###
  # Process a statement for a clay style class method
  ###
  method keyword.Class_Method {resultvar commentblock name args} {
    upvar 1 $resultvar result
    set info [my comment $commentblock]
    if {[dict exists $info show_body] && [dict get $info show_body]} {
      dict set info internals [lindex $args end]
    }
    if {[dict exists $info ensemble]} {
      dict for {method minfo} [dict get $info ensemble] {
        dict set result Class_Method "${name} $method" $minfo
      }
    } else {
      switch [llength $args] {
        1 {
          set argspec [lindex $args 0]
        }
        0 {
          set argspec dictargs
          #set body [lindex $args 0]
        }
        default {error "could not interpret method $name {*}$args"}
      }
      if {![dict exists $info argspec]} {
        dict set info argspec [my argspec $argspec]
      }
      dict set result Class_Method [string trim $name :] $info
    }
  }

  ###
  # Process a statement for a tcloo style object method
  ###
  method keyword.method {resultvar commentblock name args} {
    upvar 1 $resultvar result
    set info [my comment $commentblock]
    if {[dict exists $info show_body] && [dict get $info show_body]} {
      dict set info internals [lindex $args end]
    }
    if {[dict exists $info ensemble]} {
      dict for {method minfo} [dict get $info ensemble] {
        dict set result method "\"${name} $method\"" $minfo
      }
    } else {
      switch [llength $args] {
        1 {
          set argspec [lindex $args 0]
        }
        0 {
          set argspec dictargs
          #set body [lindex $args 0]
        }
        default {error "could not interpret method $name {*}$args"}
      }
      if {![dict exists $info argspec]} {
        dict set info argspec [my argspec $argspec]
      }
      dict set result method "\"[split [string trim $name :] ::]\"" $info
    }
  }

  ###
  # Process a proc statement
  ###
  method keyword.proc {commentblock name argspec} {
    set info [my comment $commentblock]
    if {![dict exists $info argspec]} {
      dict set info argspec [my argspec $argspec]
    }
    return $info
  }

  ###
  # Reset the state of the object and its embedded coroutine
  ###
  method reset {} {
    my variable coro
    set coro [info object namespace [self]]::coro
    oo::objdefine [self] forward coro $coro
    if {[info command $coro] ne {}} {
      rename $coro {}
    }
    coroutine $coro {*}[namespace code {my Main}]
  }

  ###
  # Main body of the embedded coroutine for the object
  ###
  method Main {} {

    my variable info
    set info [dict create]
    yield [info coroutine]
    set thisline {}
    set commentblock {}
    set linec 0
    while 1 {
      set line [yield]
      append thisline $line \n
      if {![info complete $thisline]} continue
      set thisline [string trim $thisline]
      if {[string index $thisline 0] eq "#"} {
        append commentblock [string trimleft $thisline #] \n
        set thisline {}
        continue
      }
      set cmd [string trim [lindex $thisline 0] ":"]
      switch $cmd {
        dictargs::proc {
          set procinfo [my keyword.proc $commentblock [lindex $thisline 1] [list args [list dictargs [lindex $thisline 2]]]]
          if {[dict exists $procinfo show_body] && [dict get $procinfo show_body]} {
            dict set procinfo internals [lindex $thisline end]
          }
          dict set info proc [string trim [lindex $thisline 1] :] $procinfo
          set commentblock {}
        }
        tcllib::PROC -
        PROC -
        Proc -
        proc {
          set procinfo [my keyword.proc $commentblock {*}[lrange $thisline 1 2]]
          if {[dict exists $procinfo show_body] && [dict get $procinfo show_body]} {
            dict set procinfo internals [lindex $thisline end]
          }
          dict set info proc [string trim [lindex $thisline 1] :] $procinfo
          set commentblock {}
        }
        oo::objdefine {
          if {[llength $thisline]==3} {
            lassign $thisline tcmd name body
            my keyword.Class info $commentblock $name $body
          } else {
            puts "Warning: bare oo::define in library"
          }
        }
        oo::define {
          if {[llength $thisline]==3} {
            lassign $thisline tcmd name body
            my keyword.class info $commentblock $name $body
          } else {
            puts "Warning: bare oo::define in library"
          }
        }
        tao::define -
        clay::define -
        tool::define {
          lassign $thisline tcmd name body
          my keyword.class info $commentblock $name $body
          set commentblock {}
        }
        oo::class {
          lassign $thisline tcmd mthd name body
          my keyword.class info $commentblock $name $body
          set commentblock {}
        }
        default {
          if {[lindex [split $cmd ::] end] eq "define"} {
            lassign $thisline tcmd name body
            my keyword.class info $commentblock $name $body
            set commentblock {}
          }
          set commentblock {}
        }
      }
      set thisline {}
    }
  }

  ###
  # Generate the manual page text for a method or proc
  ###
  method section.method {keyword method minfo} {
    set result {}
    set line "\[call $keyword \[cmd $method\]"
    if {[dict exists $minfo argspec]} {
      dict for {argname arginfo} [dict get $minfo argspec] {
        set positional 1
        set mandatory  1
        set repeating 0
        dict with arginfo {}
        if {$mandatory==0} {
          append line " \[opt \""
        } else {
          append line " "
        }
        if {$positional} {
          append line "\[arg $argname"
        } else {
          append line "\[option \"$argname"
          if {[dict exists $arginfo type]} {
            append line " \[emph [dict get $arginfo type]\]"
          } else {
            append line " \[emph value\]"
          }
          append line "\""
        }
        append line "\]"
        if {$mandatory==0} {
          if {[dict exists $arginfo default]} {
            append line " \[const \"[dict get $arginfo default]\"\]"
          }
          append line "\"\]"
        }
        if {$repeating} {
          append line " \[opt \[option \"$argname...\"\]\]"
        }
      }
    }
    append line \]
    putb result $line
    if {[dict exists $minfo description]} {
      putb result [dict get $minfo description]
    }
    if {[dict exists $minfo example]} {
      putb result "\[para\]Example: \[example [list [dict get $minfo example]]\]"
    }
    if {[dict exists $minfo internals]} {
      putb result "\[para\]Internals: \[example [list [dict get $minfo internals]]\]"
    }
    return $result
  }

  method section.annotation {type name iinfo} {
    set result "\[call $type \[cmd $name\]\]"
    if {[dict exists $iinfo description]} {
      putb result [dict get $iinfo description]
    }
    if {[dict exists $iinfo example]} {
      putb result "\[para\]Example: \[example [list [dict get $minfo example]]\]"
    }
    return $result
  }

  ###
  # Generate the manual page text for a class
  ###
  method section.class {class_name class_info} {
    set result {}
    putb result "\[subsection \{Class  $class_name\}\]"
    if {[dict exists $class_info ancestors]} {
      set line "\[emph \"ancestors\"\]:"
      foreach {c} [dict get $class_info ancestors] {
        append line " \[class [string trim $c :]\]"
      }
      putb result $line
      putb result {[para]}
    }
    dict for {f v} $class_info {
      if {$f in {Class_Method method description ancestors example option variable delegate}} continue
      putb result "\[emph \"$f\"\]: $v"
      putb result {[para]}
    }
    if {[dict exists $class_info example]} {
      putb result "\[example \{[list [dict get $class_info example]]\}\]"
      putb result {[para]}
    }
    if {[dict exists $class_info description]} {
      putb result [dict get $class_info description]
      putb result {[para]}
    }
    dict for {f v} $class_info {
      if {$f ni {option variable delegate}} continue
      putb result "\[class \{[string totitle $f]\}\]"
      #putb result "Methods on the class object itself."
      putb result {[list_begin definitions]}
      dict for {item iinfo} [dict get $class_info $f] {
        putb result [my section.annotation $f $item $iinfo]
      }
      putb result {[list_end]}
      putb result {[para]}
    }
    if {[dict exists $class_info Class_Method]} {
      putb result "\[class \{Class Methods\}\]"
      #putb result "Methods on the class object itself."
      putb result {[list_begin definitions]}
      dict for {method minfo} [dict get $class_info Class_Method] {
        putb result [my section.method classmethod $method $minfo]
      }
      putb result {[list_end]}
      putb result {[para]}
    }
    if {[dict exists $class_info method]} {
      putb result "\[class {Methods}\]"
      putb result {[list_begin definitions]}
      dict for {method minfo} [dict get $class_info method] {
        putb result [my section.method method $method $minfo]
      }
      putb result {[list_end]}
      putb result {[para]}
    }
    return $result
  }

  ###
  # Generate the manual page text for the commands section
  ###
  method section.command {procinfo} {
    set result {}
    putb result "\[section \{Commands\}\]"
    putb result {[list_begin definitions]}
    dict for {method minfo} $procinfo {
      putb result [my section.method proc $method $minfo]
    }
    putb result {[list_end]}
    return $result
  }

  ###
  # Generate the manual page. Returns the completed text suitable for saving in .man file.
  # The header argument is a block of doctools text to go in before the machine generated
  # section. footer is a block of doctools text to go in after the machine generated
  # section. authors is a list of individual authors and emails in the form of AUTHOR EMAIL ?AUTHOR EMAIL?...
  #
  # argspec:
  #   header {mandatory 0 positional 0}
  #   footer {mandatory 0 positional 0}
  #   authors {mandatory 0 positional 0 type list}
  ###
  method manpage args {
    my variable info
    set map {%version% 0.0 %module% {Your_Module_Here}}
    set result {}
    set header {}
    set footer {}
    set authors {}
    dict with args {}
    dict set map %keyword% comment
    putb result $map {[%keyword% {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION %version%]
[manpage_begin %module% n [vset PACKAGE_VERSION]]}
    putb result $map $header

    dict for {sec_type sec_info} $info {
      switch $sec_type {
        proc {
          putb result [my section.command $sec_info]
        }
        class {
          putb result "\[section Classes\]"
          dict for {class_name class_info} $sec_info {
            putb result [my section.class $class_name $class_info]
          }
        }
        default {
          putb result "\[section [list $sec_type $sec_name]\]"
          if {[dict exists $sec_info description]} {
            putb result [dict get $sec_info description]
          }
        }
      }
    }
    if {[llength $authors]} {
      putb result {[section AUTHORS]}
      foreach {name email} $authors {
        putb result "$name \[uri mailto:$email\]\[para\]"
      }
    }
    putb result $footer
    putb result {[manpage_end]}
    return $result
  }

  # Scan a block of text
  method scan_text {text} {
    my variable linecount coro
    set linecount 0
    foreach line [split $text \n] {
      incr linecount
      $coro $line
    }
  }

  # Scan a file of text
  method scan_file {filename} {
    my variable linecount coro
    set fin [open $filename r]
    set linecount 0
    while {[gets $fin line]>=0} {
      incr linecount
      $coro $line
    }
    close $fin
  }
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/practcl/build/fileutil.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
###
# Bits stolen from fileutil
###


###
# Search for the pattern [emph pattern] amongst $files
###
proc ::practcl::grep {pattern {files {}}} {
    set result [list]
    if {[llength $files] == 0} {
            # read from stdin
            set lnum 0
            while {[gets stdin line] >= 0} {
                incr lnum
                if {[regexp -- $pattern $line]} {
                        lappend result "${lnum}:${line}"
                }
            }
    } else {
            foreach filename $files {
            set file [open $filename r]
            set lnum 0
            while {[gets $file line] >= 0} {
                incr lnum
                if {[regexp -- $pattern $line]} {
                    lappend result "${filename}:${lnum}:${line}"
                }
            }
            close $file
            }
    }
    return $result
}

proc ::practcl::file_lexnormalize {sp} {
    set spx [file split $sp]

    # Resolution of embedded relative modifiers (., and ..).

    if {
      ([lsearch -exact $spx . ] < 0) &&
      ([lsearch -exact $spx ..] < 0)
    } {
      # Quick path out if there are no relative modifiers
      return $sp
    }

    set absolute [expr {![string equal [file pathtype $sp] relative]}]
    # A volumerelative path counts as absolute for our purposes.

    set sp $spx
    set np {}
    set noskip 1

    while {[llength $sp]} {
      set ele    [lindex $sp 0]
      set sp     [lrange $sp 1 end]
      set islast [expr {[llength $sp] == 0}]

      if {[string equal $ele ".."]} {
          if {
            ($absolute  && ([llength $np] >  1)) ||
            (!$absolute && ([llength $np] >= 1))
          } {
            # .. : Remove the previous element added to the
            # new path, if there actually is enough to remove.
            set np [lrange $np 0 end-1]
          }
      } elseif {[string equal $ele "."]} {
          # Ignore .'s, they stay at the current location
          continue
      } else {
          # A regular element.
          lappend np $ele
      }
    }
    if {[llength $np] > 0} {
      return [eval [linsert $np 0 file join]]
      # 8.5: return [file join {*}$np]
    }
    return {}
}

###
# Calculate a relative path between base and dst
#
# example:
#  ::practcl::file_relative ~/build/tcl/unix ~/build/tcl/library
#  > ../library
###
proc ::practcl::file_relative {base dst} {
    # Ensure that the link to directory 'dst' is properly done relative to
    # the directory 'base'.

    if {![string equal [file pathtype $base] [file pathtype $dst]]} {
      return -code error "Unable to compute relation for paths of different pathtypes: [file pathtype $base] vs. [file pathtype $dst], ($base vs. $dst)"
    }

    set base [file_lexnormalize [file join [pwd] $base]]
    set dst  [file_lexnormalize [file join [pwd] $dst]]

    set save $dst
    set base [file split $base]
    set dst  [file split $dst]

    while {[string equal [lindex $dst 0] [lindex $base 0]]} {
      set dst  [lrange $dst  1 end]
      set base [lrange $base 1 end]
      if {![llength $dst]} {break}
    }

    set dstlen  [llength $dst]
    set baselen [llength $base]

    if {($dstlen == 0) && ($baselen == 0)} {
      # Cases:
      # (a) base == dst

      set dst .
    } else {
      # Cases:
      # (b) base is: base/sub = sub
      #     dst  is: base     = {}

      # (c) base is: base     = {}
      #     dst  is: base/sub = sub

      while {$baselen > 0} {
          set dst [linsert $dst 0 ..]
          incr baselen -1
      }
      # 8.5: set dst [file join {*}$dst]
      set dst [eval [linsert $dst 0 file join]]
    }

    return $dst
}

# ::fileutil::findByPattern --
#
#      Specialization of find. Finds files based on their names,
#      which have to match the specified patterns. Options are used
#      to specify which type of patterns (regexp-, glob-style) is
#      used.
#
# Arguments:
#      basedir            Directory to start searching from.
#      args            Options (-glob, -regexp, --) followed by a
#                  list of patterns to search for.
#
# Results:
#      files            a list of interesting files.

proc ::practcl::findByPattern {basedir patterns} {
    set queue $basedir
    set result {}
    while {[llength $queue]} {
      set item [lindex $queue 0]
      set queue [lrange $queue 1 end]
      if {[file isdirectory $item]} {
        foreach path [glob -nocomplain [file join $item *]] {
          lappend queue $path
        }
        continue
      }
      foreach pattern $patterns {
        set fname [file tail $item]
        if {[string match $pattern $fname]} {
          lappend result $item
          break
        }
      }
    }
    return $result
}

###
# Record an event in the practcl log
###
proc ::practcl::log {fname comment} {
  set fname [file normalize $fname]
  if {[info exists ::practcl::logchan($fname)]} {
    set fout $::practcl::logchan($fname)
    after cancel $::practcl::logevent($fname)
  } else {
    set fout [open $fname a]
  }
  puts $fout $comment
  # Defer close until idle
  set ::practcl::logevent($fname) [after idle "close $fout ; unset ::practcl::logchan($fname)"]
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































Deleted modules/practcl/build/footer.txt.

1
2
[vset CATEGORY practcl]
[include ../common-text/feedback.inc]
<
<




Deleted modules/practcl/build/installutil.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
proc ::practcl::_pkgindex_simpleIndex {path} {
set buffer {}
  set pkgidxfile    [file join $path pkgIndex.tcl]
  set modfile       [file join $path [file tail $path].tcl]
  set use_pkgindex  [file exists $pkgidxfile]
  set tclfiles      {}
  set found 0
  set mlist [list pkgIndex.tcl index.tcl [file tail $modfile] version_info.tcl]
  foreach file [glob -nocomplain [file join $path *.tcl]] {
    if {[file tail $file] ni $mlist} {
      #puts [list NONMODFILE $file]
      return {}
    }
  }
  foreach file [glob -nocomplain [file join $path *.tcl]] {
    if { [file tail $file] == "version_info.tcl" } continue
    set fin [open $file r]
    set dat [read $fin]
    close $fin
    if {![regexp "package provide" $dat]} continue
    set fname [file rootname [file tail $file]]
    # Look for a package provide statement
    foreach line [split $dat \n] {
      set line [string trim $line]
      if { [string range $line 0 14] != "package provide" } continue
      set package [lindex $line 2]
      set version [lindex $line 3]
      if {[string index $package 0] in "\$ \[ @"} continue
      if {[string index $version 0] in "\$ \[ @"} continue
      #puts "PKGLINE $line"
      append buffer "package ifneeded $package $version \[list source \[file join %DIR% [file tail $file]\]\]" \n
      break
    }
  }
  return $buffer
}


###
# Return true if the pkgindex file contains
# any statement other than "package ifneeded"
# and/or if any package ifneeded loads a DLL
###
proc ::practcl::_pkgindex_directory {path} {
  set buffer {}
  set pkgidxfile    [file join $path pkgIndex.tcl]
  set modfile       [file join $path [file tail $path].tcl]
  set use_pkgindex  [file exists $pkgidxfile]
  set tclfiles      {}
  if {$use_pkgindex && [file exists $modfile]} {
    set use_pkgindex 0
    set mlist [list pkgIndex.tcl [file tail $modfile]]
    foreach file [glob -nocomplain [file join $path *.tcl]] {
      lappend tclfiles [file tail $file]
      if {[file tail $file] in $mlist} continue
      incr use_pkgindex
    }
  }
  if {!$use_pkgindex} {
    # No pkgIndex file, read the source
    foreach file [glob -nocomplain $path/*.tm] {
      set file [file normalize $file]
      set fname [file rootname [file tail $file]]
      ###
      # We used to be able to ... Assume the package is correct in the filename
      # No hunt for a "package provides"
      ###
      set package [lindex [split $fname -] 0]
      set version [lindex [split $fname -] 1]
      ###
      # Read the file, and override assumptions as needed
      ###
      set fin [open $file r]
      set dat [read $fin]
      close $fin
      # Look for a teapot style Package statement
      foreach line [split $dat \n] {
        set line [string trim $line]
        if { [string range $line 0 9] != "# Package " } continue
        set package [lindex $line 2]
        set version [lindex $line 3]
        break
      }
      # Look for a package provide statement
      foreach line [split $dat \n] {
        set line [string trim $line]
        if { [string range $line 0 14] != "package provide" } continue
        set package [lindex $line 2]
        set version [lindex $line 3]
        break
      }
      if {[string trim $version] ne {}} {
        append buffer "package ifneeded $package $version \[list source \[file join \$dir [file tail $file]\]\]" \n
      }
    }
    foreach file [glob -nocomplain $path/*.tcl] {
      if { [file tail $file] == "version_info.tcl" } continue
      set fin [open $file r]
      set dat [read $fin]
      close $fin
      if {![regexp "package provide" $dat]} continue
      set fname [file rootname [file tail $file]]
      # Look for a package provide statement
      foreach line [split $dat \n] {
        set line [string trim $line]
        if { [string range $line 0 14] != "package provide" } continue
        set package [lindex $line 2]
        set version [lindex $line 3]
        if {[string index $package 0] in "\$ \[ @"} continue
        if {[string index $version 0] in "\$ \[ @"} continue
        append buffer "package ifneeded $package $version \[list source \[file join \$dir [file tail $file]\]\]" \n
        break
      }
    }
    return $buffer
  }
  set fin [open $pkgidxfile r]
  set dat [read $fin]
  close $fin
  set trace 0
  #if {[file tail $path] eq "tool"} {
  #  set trace 1
  #}
  set thisline {}
  foreach line [split $dat \n] {
    append thisline $line \n
    if {![info complete $thisline]} continue
    set line [string trim $line]
    if {[string length $line]==0} {
      set thisline {} ; continue
    }
    if {[string index $line 0] eq "#"} {
      set thisline {} ; continue
    }
    if {[regexp "if.*catch.*package.*Tcl.*return" $thisline]} {
      if {$trace} {puts "[file dirname $pkgidxfile] Ignoring $thisline"}
      set thisline {} ; continue
    }
    if {[regexp "if.*package.*vsatisfies.*package.*provide.*return" $thisline]} {
      if {$trace} { puts "[file dirname $pkgidxfile] Ignoring $thisline" }
      set thisline {} ; continue
    }
    if {![regexp "package.*ifneeded" $thisline]} {
      # This package index contains arbitrary code
      # source instead of trying to add it to the master
      # package index
      if {$trace} { puts "[file dirname $pkgidxfile] Arbitrary code $thisline" }
      return {source [file join $dir pkgIndex.tcl]}
    }
    append buffer $thisline \n
    set thisline {}
  }
  if {$trace} {puts [list [file dirname $pkgidxfile] $buffer]}
  return $buffer
}

###
# Helper function for ::practcl::pkgindex_path
###
proc ::practcl::_pkgindex_path_subdir {path} {
  set result {}
  if {[file exists [file join $path src build.tcl]]} {
    # Tool style module, don't dive into subdirectories
    return $path
  }
  foreach subpath [glob -nocomplain [file join $path *]] {
    if {[file isdirectory $subpath]} {
      if {[file tail $subpath] eq "build" && [file exists [file join $subpath build.tcl]]} continue
      lappend result $subpath {*}[_pkgindex_path_subdir $subpath]
    }
  }
  return $result
}
###
# Index all paths given as though they will end up in the same
# virtual file system
###
proc ::practcl::pkgindex_path {args} {
  set stack {}
  set buffer {
lappend ::PATHSTACK $dir
set IDXPATH [lindex $::PATHSTACK end]
  }
  set preindexed {}
  foreach base $args {
    set base [file normalize $base]
    set paths {}
    foreach dir [glob -nocomplain [file join $base *]] {
      set thisdir [file tail $dir]
      if {$thisdir eq "teapot"} continue
      if {$thisdir eq "pkgs"} {
        foreach subdir [glob -nocomplain [file join $dir *]] {
          set thissubdir [file tail $subdir]
          set skip 0
          foreach file {pkgIndex.tcl tclIndex} {
            if {[file exists [file join $subdir $file]]} {
              set skip 1
              append buffer "set dir \[file join \$::IDXPATH [list $thisdir] [list $thissubdir]\] \; "
              append buffer "source \[file join \$dir ${file}\]" \n
            }
          }
          if {$skip} continue
          lappend paths {*}[::practcl::_pkgindex_path_subdir $subdir]
        }
        continue
      }
      lappend paths $dir {*}[::practcl::_pkgindex_path_subdir $dir]
    }
    append buffer ""
    set i    [string length  $base]
    # Build a list of all of the paths
    if {[llength $paths]} {
      foreach path $paths {
        if {$path eq $base} continue
        set path_indexed($path) 0
      }
    } else {
      puts [list WARNING: NO PATHS FOUND IN $base]
    }
    set path_indexed($base) 1
    set path_indexed([file join $base boot tcl]) 1
    append buffer \n {# SINGLE FILE MODULES BEGIN} \n {set dir [lindex $::PATHSTACK end]} \n
    foreach path $paths {
      if {$path_indexed($path)} continue
      set thisdir [file_relative $base $path]
      set simpleIdx [_pkgindex_simpleIndex $path]
      if {[string length $simpleIdx]==0} continue
      incr path_indexed($path)
      if {[string length $simpleIdx]} {
        incr path_indexed($path)
        append buffer [string map [list %DIR% "\$dir \{$thisdir\}"] [string trimright $simpleIdx]] \n
      }
    }
    append buffer {# SINGLE FILE MODULES END} \n
    foreach path $paths {
      if {$path_indexed($path)} continue
      set thisdir [file_relative $base $path]
      set idxbuf [::practcl::_pkgindex_directory $path]
      if {[string length $idxbuf]} {
        incr path_indexed($path)
        append buffer "set dir \[set PKGDIR \[file join \[lindex \$::PATHSTACK end\] $thisdir\]\]" \n
        append buffer [string map {$dir $PKGDIR} [string trimright $idxbuf]] \n
      }
    }
  }
  append buffer {
set dir [lindex $::PATHSTACK end]
set ::PATHSTACK [lrange $::PATHSTACK 0 end-1]
}
  return $buffer
}

# Delete the contents of [emph d2], and then
# recusively Ccopy the contents of [emph d1] to [emph d2].
proc ::practcl::installDir {d1 d2} {
  puts [format {%*sCreating %s} [expr {4 * [info level]}] {} [file tail $d2]]
  file delete -force -- $d2
  file mkdir $d2

  foreach ftail [glob -directory $d1 -nocomplain -tails *] {
    set f [file join $d1 $ftail]
    if {[file isdirectory $f] && [string compare CVS $ftail]} {
      installDir $f [file join $d2 $ftail]
    } elseif {[file isfile $f]} {
	    file copy -force $f [file join $d2 $ftail]
	    if {$::tcl_platform(platform) eq {unix}} {
        file attributes [file join $d2 $ftail] -permissions 0644
	    } else {
        file attributes [file join $d2 $ftail] -readonly 1
	    }
    }
  }

  if {$::tcl_platform(platform) eq {unix}} {
    file attributes $d2 -permissions 0755
  } else {
    file attributes $d2 -readonly 1
  }
}

# Recursively copy the contents of [emph d1] to [emph d2]
proc ::practcl::copyDir {d1 d2 {toplevel 1}} {
  #if {$toplevel} {
  #  puts [list ::practcl::copyDir $d1 -> $d2]
  #}
  #file delete -force -- $d2
  file mkdir $d2
  if {[file isfile $d1]} {
    file copy -force $d1 $d2
    set ftail [file tail $d1]
    if {$::tcl_platform(platform) eq {unix}} {
      file attributes [file join $d2 $ftail] -permissions 0644
    } else {
      file attributes [file join $d2 $ftail] -readonly 1
    }
  } else {
    foreach ftail [glob -directory $d1 -nocomplain -tails *] {
      set f [file join $d1 $ftail]
      if {[file isdirectory $f] && [string compare CVS $ftail]} {
        copyDir $f [file join $d2 $ftail] 0
      } elseif {[file isfile $f]} {
        file copy -force $f [file join $d2 $ftail]
        if {$::tcl_platform(platform) eq {unix}} {
          file attributes [file join $d2 $ftail] -permissions 0644
        } else {
          file attributes [file join $d2 $ftail] -readonly 1
        }
      }
    }
  }
}

proc ::practcl::buildModule {modpath} {
  set buildscript [file join $modpath build build.tcl]
  if {![file exists $buildscript]} return
  set pkgIndexFile [file join $modpath pkgIndex.tcl]
  if {[file exists $pkgIndexFile]} {
    set latest 0
    foreach file [::practcl::findByPattern [file dirname $buildscript] *.tcl] {
      set mtime [file mtime $file]
      if {$mtime>$latest} {
        set latest $mtime
      }
    }
    set IdxTime [file mtime $pkgIndexFile]
    if {$latest<$IdxTime} return
  }
  ::practcl::dotclexec $buildscript
}

###
# Install a module from MODPATH to the directory specified.
# [emph dpath] is assumed to be the fully qualified path where module is to be placed.
# Any existing files will be deleted at that path.
# If the path is symlink the process will return with no error and no action.
# If the module has contents in the build/ directory that are newer than the
# .tcl files in the module source directory, and a build/build.tcl file exists,
# the build/build.tcl file is run.
# If the source directory includes a file named index.tcl, the directory is assumed
# to be in the tao style of modules, and the entire directory (and all subdirectories)
# are copied verbatim.
# If no index.tcl file is present, all .tcl files are copied from the module source
# directory, and a pkgIndex.tcl file is generated if non yet exists.
# I a folder named htdocs exists in the source directory, that directory is copied
# verbatim to the destination.
###
proc ::practcl::installModule {modpath DEST} {
  if {[file exists [file join $DEST modules]]} {
    set dpath [file join $DEST modules [file tail $modpath]]
  } else {
    set dpath $DEST
  }
  if {[file exists $dpath] && [file type $dpath] eq "link"} return
  if {[file exists [file join $modpath index.tcl]]} {
    # IRM/Tao style modules non-amalgamated
    ::practcl::installDir $modpath $dpath
    return
  }
  buildModule $modpath
  set files [glob -nocomplain [file join $modpath *.tcl]]
  if {[llength $files]} {
    if {[llength $files]>1} {
      if {![file exists [file join $modpath pkgIndex.tcl]]} {
        pkg_mkIndex $modpath
      }
    }
    file delete -force $dpath
    file mkdir $dpath
    foreach file $files {
      file copy $file $dpath
    }
  }
  if {[file exists [file join $modpath htdocs]]} {
    ::practcl::copyDir [file join $modpath htdocs] [file join $dpath htdocs]
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/practcl/build/makeutil.tcl.

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
###
# show_body: 1
# description:
# Trigger build targets, and recompute dependencies
###
proc ::practcl::trigger {args} {
  ::practcl::LOCAL make trigger {*}$args
  foreach {name obj} [::practcl::LOCAL make objects] {
    set ::make($name) [$obj do]
  }
}

###
# show_body: 1
# description:
# Calculate if a dependency for any of the arguments needs to
# be fulfilled or rebuilt.
proc ::practcl::depends {args} {
  ::practcl::LOCAL make depends {*}$args
}

###
# show_body: 1
# description:
# Declare a build product. This proc is just a shorthand for
# [emph {::practcl::LOCAL make task $name $info $action}]
# [para]
# Registering a build product with this command will create
# an entry in the global [variable make] array, and populate
# a value in the global [variable target] array.
###
proc ::practcl::target {name info {action {}}} {
  set obj [::practcl::LOCAL make task $name $info $action]
  set ::make($name) 0
  set filename [$obj define get filename]
  if {$filename ne {}} {
    set ::target($name) $filename
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































Deleted modules/practcl/build/manual.txt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[keywords practcl]
[copyright {2016-2018 Sean Woods <yoda@etoyoc.com>}]
[moddesc {The The Proper Rational API for C to Tool Command Language Module}]
[titledesc {The Practcl Module}]
[category {TclOO}]
[require TclOO 1.0]
[description]
The Practcl module is a tool for integrating large modules for C API
Tcl code that requires custom Tcl types and TclOO objects.
[para]
The concept with Practcl is that is a single file package that can
assist any tcl based project with distribution, compilation, linking,
VFS preparation, executable assembly, and installation. Practcl also
allows one project to invoke the build system from another project,
allowing complex projects such as a statically linked basekit to be
assembled with relative ease.
[para]
Practcl ships as a single file, and aside from a Tcl 8.6 interpreter,
has no external dependencies.
[para]
Making a practcl project
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































Deleted modules/practcl/build/setup.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
###
# Practcl
# An object oriented templating system for stamping out Tcl API calls to C
###

package require TclOO
###
# Seek out Tcllib if it's available
###
set tcllib_path {}
foreach path {.. ../.. ../../..} {
  foreach path [glob -nocomplain [file join [file normalize $path] tcllib* modules]] {
    set tclib_path $path
    lappend ::auto_path $path
    break
  }
  if {$tcllib_path ne {}} break
}
namespace eval ::practcl {}
namespace eval ::practcl::OBJECT {}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































Changes to modules/practcl/pkgIndex.tcl.










1
2
3
4









###
if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded practcl 0.16.4 [list source [file join $dir practcl.tcl]]

>
>
>
>
>
>
>
>
>
|

|
<
1
2
3
4
5
6
7
8
9
10
11
12

# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded practcl 0.5 [list source [file join $dir practcl.tcl]]

Changes to modules/practcl/practcl.man.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
[comment {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION 0.16.4]
[manpage_begin practcl n [vset PACKAGE_VERSION]]
[keywords practcl]
[copyright {2016-2018 Sean Woods <yoda@etoyoc.com>}]
[moddesc {The The Proper Rational API for C to Tool Command Language Module}]
[titledesc {The Practcl Module}]
[category {TclOO}]
[require TclOO 1.0]

[description]
The Practcl module is a tool for integrating large modules for C API
Tcl code that requires custom Tcl types and TclOO objects.
[para]
The concept with Practcl is that is a single file package that can
assist any tcl based project with distribution, compilation, linking,
VFS preparation, executable assembly, and installation. Practcl also
allows one project to invoke the build system from another project,
allowing complex projects such as a statically linked basekit to be
assembled with relative ease.
[para]
Practcl ships as a single file, and aside from a Tcl 8.6 interpreter,
has no external dependencies.
[para]
Making a practcl project

[section {Commands}]
[list_begin definitions]
[call proc [cmd practcl::cat] [arg fname]]

 Concatenate a file




[call proc [cmd practcl::docstrip] [arg text]]

 Strip the global comments from tcl code. Used to
 prevent the documentation markup comments from clogging
 up files intended for distribution in machine readable format.




[call proc [cmd putb] [opt "[arg map]"] [arg text]]

 Append a line of text to a variable. Optionally apply a string mapping.


[call proc [cmd Proc] [arg name] [arg arglist] [arg body]]

 Generate a proc if no command already exists by that name




[call proc [cmd noop] [opt "[arg args]"]]

 A command to do nothing. A handy way of
 negating an instruction without
 having to comment it completely out.
 It's also a handy attachment point for
 an object to be named later




[call proc [cmd practcl::debug] [opt "[arg args]"]]


[call proc [cmd practcl::doexec] [opt "[arg args]"]]

 Drop in a static copy of Tcl




[call proc [cmd practcl::doexec_in] [arg path] [opt "[arg args]"]]


[call proc [cmd practcl::dotclexec] [opt "[arg args]"]]


[call proc [cmd practcl::domake] [arg path] [opt "[arg args]"]]


[call proc [cmd practcl::domake.tcl] [arg path] [opt "[arg args]"]]


[call proc [cmd practcl::fossil] [arg path] [opt "[arg args]"]]


[call proc [cmd practcl::fossil_status] [arg dir]]


[call proc [cmd practcl::os]]


[call proc [cmd practcl::mkzip] [arg exename] [arg barekit] [arg vfspath]]

 Build a zipfile. On tcl8.6 this invokes the native Zip implementation
 on older interpreters this invokes zip via exec




[call proc [cmd practcl::sort_dict] [arg list]]

 Dictionary sort a key/value list. Needed because pre tcl8.6
 does not have [emph {lsort -stride 2}]




[call proc [cmd practcl::local_os]]

 Returns a dictionary describing the local operating system.
 Fields return include:
 [list_begin itemized]
 [item] download - Filesystem path where fossil repositories and source tarballs are downloaded for the current user
 [item] EXEEXT - The extension to give to executables. (i.e. .exe on windows)
 [item] fossil_mirror - A URI for a local network web server who acts as a fossil repository mirror
 [item] local_install - Filesystem path where packages for local consumption by the current user are installed
 [item] prefix - The prefix as given to the Tcl core/TEA for installation to local_install in ./configure
 [item] sandbox - The file location where this project unpacks external projects
 [item] TEACUP_PROFILE - The ActiveState/Teacup canonical name for this platform (i.e. win32-ix86 macosx10.5-i386-x86_84)
 [item] TEACUP_OS - The local operating system (windows, macosx, openbsd, etc). Gives the same answer as tcl.m4, except that macosx is given as macosx instead of Darwin.
 [item] TEA_PLATFORM - The platform returned by uname -s-uname -r (on Unix), or "windows" on Windows
 [item] TEACUP_ARCH - The processor architecture for the local os (i.e. ix86, x86_64)
 [item] TEACUP_ARCH - The processor architecture for the local os (i.e. ix86, x86_64)
 [item] teapot - Filesystem path where teapot package files are downloaded for the current user
 [item] userhome - File path to store localized preferences, cache download files, etc for the current user
 [list_end]
 This command uses a combination of local checks with Exec, any tclConfig.sh file that is
 resident, autoconf data where already computed, and data gleaned from a file named
 practcl.rc in userhome. The location for userhome varies by platform and operating system:
 [list_begin itemized]
 [item] Windows: ::env(LOCALAPPDATA)/Tcl
 [item] Macos: ~/Library/Application Support/Tcl
 [item] Other: ~/tcl
 [list_end]




[call proc [cmd practcl::config.tcl] [arg path]]

 A transparent call to ::practcl::read_configuration to preserve backward compadibility
 with older copies of Practcl




[call proc [cmd practcl::read_configuration] [arg path]]

 Detect local platform. This command looks for data gleaned by autoconf or autosetup
 in the path specified, or perform its own logic tests if neither has been run.
 A file named config.site present in the location indicates that this project is
 cross compiling, and the data stored in that file is used for the compiler and linker.
 [para]
 This command looks for information from the following files, in the following order:
 [list_begin itemized]
 [item] config.tcl - A file generated by autoconf/configure in newer editions of TEA, encoded as a Tcl script.
 [item] config.site - A file containing cross compiler information, encoded as a SH script
 [item] ::env(VisualStudioVersion) - On Windows, and environmental value that indicates MS Visual Studio is installed
 [list_end]
 [para]
 This command returns a dictionary containing all of the data cleaned from the sources above.
 In the absence of any guidance this command returns the same output as ::practcl::local_os.
 In this mode, if the environmental variable VisualStudioVersion exists, this command
 will provide a template of fields that are appropriate for compiling on Windows under
 Microsoft Visual Studio. The USEMSVC flag in the dictionary is a boolean flag to indicate
 if this is indeed the case.




[call proc [cmd practcl::tcllib_require] [arg pkg] [opt "[arg args]"]]
 Try to load  a package, and failing that
 retrieve tcllib



[call proc [cmd practcl::platform::tcl_core_options] [arg os]]

 Return the string to pass to ./configure to compile the Tcl core for the given OS.
 [list_begin itemized]
 [item] windows: --with-tzdata --with-encoding utf-8
 [item] macosx: --enable-corefoundation=yes  --enable-framework=no --with-tzdata --with-encoding utf-8
 [item] other: --with-tzdata --with-encoding utf-8
 [list_end]




[call proc [cmd practcl::platform::tk_core_options] [arg os]]


[call proc [cmd practcl::read_rc_file] [arg filename] [opt "[arg localdat] [const ""]"]]

 Read a stylized key/value list stored in a file




[call proc [cmd practcl::read_sh_subst] [arg line] [arg info]]

Converts a XXX.sh file into a series of Tcl variables




[call proc [cmd practcl::read_sh_file] [arg filename] [opt "[arg localdat] [const ""]"]]



[call proc [cmd practcl::read_Config.sh] [arg filename]]

 A simpler form of read_sh_file tailored
 to pulling data from (tcl|tk)Config.sh




[call proc [cmd practcl::read_Makefile] [arg filename]]

 A simpler form of read_sh_file tailored
 to pulling data from a Makefile




[call proc [cmd practcl::cputs] [arg varname] [opt "[arg args]"]]
 Append arguments to a buffer
 The command works like puts in that each call will also insert
 a line feed. Unlike puts, blank links in the interstitial are
 suppressed



[call proc [cmd practcl::tcl_to_c] [arg body]]


[call proc [cmd practcl::_tagblock] [arg text] [opt "[arg style] [const "tcl"]"] [opt "[arg note] [const ""]"]]


[call proc [cmd practcl::de_shell] [arg data]]


[call proc [cmd practcl::grep] [arg pattern] [opt "[arg files] [const ""]"]]

 Search for the pattern [emph pattern] amongst $files




[call proc [cmd practcl::file_lexnormalize] [arg sp]]


[call proc [cmd practcl::file_relative] [arg base] [arg dst]]

 Calculate a relative path between base and dst


[para]Example: [example {  ::practcl::file_relative ~/build/tcl/unix ~/build/tcl/library
  > ../library


}]

[call proc [cmd practcl::findByPattern] [arg basedir] [arg patterns]]


[call proc [cmd practcl::log] [arg fname] [arg comment]]

 Record an event in the practcl log




[call proc [cmd practcl::_pkgindex_simpleIndex] [arg path]]


[call proc [cmd practcl::_pkgindex_directory] [arg path]]

 Return true if the pkgindex file contains
 any statement other than "package ifneeded"
 and/or if any package ifneeded loads a DLL




[call proc [cmd practcl::_pkgindex_path_subdir] [arg path]]

 Helper function for ::practcl::pkgindex_path




[call proc [cmd practcl::pkgindex_path] [opt "[arg args]"]]

 Index all paths given as though they will end up in the same
 virtual file system




[call proc [cmd practcl::installDir] [arg d1] [arg d2]]
 Delete the contents of [emph d2], and then
 recusively Ccopy the contents of [emph d1] to [emph d2].



[call proc [cmd practcl::copyDir] [arg d1] [arg d2] [opt "[arg toplevel] [const "1"]"]]
 Recursively copy the contents of [emph d1] to [emph d2]



[call proc [cmd practcl::buildModule] [arg modpath]]


[call proc [cmd practcl::installModule] [arg modpath] [arg DEST]]

 Install a module from MODPATH to the directory specified.
 [emph dpath] is assumed to be the fully qualified path where module is to be placed.
 Any existing files will be deleted at that path.
 If the path is symlink the process will return with no error and no action.
 If the module has contents in the build/ directory that are newer than the
 .tcl files in the module source directory, and a build/build.tcl file exists,
 the build/build.tcl file is run.
 If the source directory includes a file named index.tcl, the directory is assumed
 to be in the tao style of modules, and the entire directory (and all subdirectories)
 are copied verbatim.
 If no index.tcl file is present, all .tcl files are copied from the module source
 directory, and a pkgIndex.tcl file is generated if non yet exists.
 I a folder named htdocs exists in the source directory, that directory is copied
 verbatim to the destination.




[call proc [cmd practcl::trigger] [opt "[arg args]"]]

 Trigger build targets, and recompute dependencies



[para]Internals: [example {
  ::practcl::LOCAL make trigger {*}$args
  foreach {name obj} [::practcl::LOCAL make objects] {
    set ::make($name) [$obj do]
  }
}]

[call proc [cmd practcl::depends] [opt "[arg args]"]]

 Calculate if a dependency for any of the arguments needs to
 be fulfilled or rebuilt.


[para]Internals: [example {
  ::practcl::LOCAL make depends {*}$args
}]

[call proc [cmd practcl::target] [arg name] [arg info] [opt "[arg action] [const ""]"]]

 Declare a build product. This proc is just a shorthand for
 [emph {::practcl::LOCAL make task $name $info $action}]
 [para]
 Registering a build product with this command will create
 an entry in the global [variable make] array, and populate
 a value in the global [variable target] array.



[para]Internals: [example {
  set obj [::practcl::LOCAL make task $name $info $action]
  set ::make($name) 0
  set filename [$obj define get filename]
  if {$filename ne {}} {
    set ::target($name) $filename
  }
}]

[list_end]

[section Classes]
[subsection {Class  practcl::doctool}]
[example {{ set authors {
   {John Doe} {jdoe@illustrious.edu}
   {Tom RichardHarry} {tomdickharry@illustrius.edu}
 }
 # Create the object
 ::practcl::doctool create AutoDoc
 set fout [open [file join $moddir module.tcl] w]
 foreach file [glob [file join $srcdir *.tcl]] {
   set content [::practcl::cat [file join $srcdir $file]]
    # Scan the file
    AutoDoc scan_text $content
    # Strip the comments from the distribution
    puts $fout [::practcl::docstrip $content]
 }
 # Write out the manual page
 set manout [open [file join $moddir module.man] w]
 dict set args header [string map $modmap [::practcl::cat [file join $srcdir manual.txt]]]
 dict set args footer [string map $modmap [::practcl::cat [file join $srcdir footer.txt]]]
 dict set args authors $authors
 puts $manout [AutoDoc manpage {*}$args]
 close $manout


}}]
[para]

 Tool for build scripts to dynamically generate manual files from comments
 in source code files

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "constructor"]]


[call method [cmd "argspec"] [arg argspec]]

 Process an argument list into an informational dict.
 This method also understands non-positional
 arguments expressed in the notation of Tip 471
 [uri https://core.tcl-lang.org/tips/doc/trunk/tip/479.md].
 [para]
 The output will be a dictionary of all of the fields and whether the fields
 are [const positional], [const mandatory], and whether they have a
 [const default] value.
 [para]

[para]Example: [example {   my argspec {a b {c 10}}

   > a {positional 1 mandatory 1} b {positional 1 mandatory 1} c {positional 1 mandatory 0 default 10}


}]

[call method [cmd "comment"] [arg block]]

 Convert a block of comments into an informational dictionary.
 If lines in the comment start with a single word ending in a colon,
 all subsequent lines are appended to a dictionary field of that name.
 If no fields are given, all of the text is appended to the [const description]
 field.

[para]Example: [example { my comment {Does something cool}
 > description {Does something cool}

 my comment {
 title : Something really cool
 author : Sean Woods
 author : John Doe
 description :
 This does something really cool!
 }
 > description {This does something really cool!}
   title {Something really cool}
   author {Sean Woods
   John Doe}


}]

[call method [cmd "keyword.Annotation"] [arg resultvar] [arg commentblock] [arg type] [arg name] [arg body]]


[call method [cmd "keyword.Class"] [arg resultvar] [arg commentblock] [arg name] [arg body]]

 Process an oo::objdefine call that modifies the class object
 itself




[call method [cmd "keyword.class"] [arg resultvar] [arg commentblock] [arg name] [arg body]]

 Process an oo::define, clay::define, etc statement.




[call method [cmd "keyword.Class_Method"] [arg resultvar] [arg commentblock] [arg name] [opt "[arg args]"]]

 Process a statement for a clay style class method




[call method [cmd "keyword.method"] [arg resultvar] [arg commentblock] [arg name] [opt "[arg args]"]]

 Process a statement for a tcloo style object method




[call method [cmd "keyword.proc"] [arg commentblock] [arg name] [arg argspec]]

 Process a proc statement




[call method [cmd "reset"]]

 Reset the state of the object and its embedded coroutine




[call method [cmd "Main"]]

 Main body of the embedded coroutine for the object




[call method [cmd "section.method"] [arg keyword] [arg method] [arg minfo]]

 Generate the manual page text for a method or proc




[call method [cmd "section.annotation"] [arg type] [arg name] [arg iinfo]]


[call method [cmd "section.class"] [arg class_name] [arg class_info]]

 Generate the manual page text for a class




[call method [cmd "section.command"] [arg procinfo]]

 Generate the manual page text for the commands section




[call method [cmd "manpage"] [opt "[option "header [emph value]"]"] [opt "[option "footer [emph value]"]"] [opt "[option "authors [emph list]"]"]]

 Generate the manual page. Returns the completed text suitable for saving in .man file.
 The header argument is a block of doctools text to go in before the machine generated
 section. footer is a block of doctools text to go in after the machine generated
 section. authors is a list of individual authors and emails in the form of AUTHOR EMAIL ?AUTHOR EMAIL?...



[call method [cmd "scan_text"] [arg text]]
 Scan a block of text



[call method [cmd "scan_file"] [arg filename]]
 Scan a file of text



[list_end]
[para]

[subsection {Class  practcl::metaclass}]

 The metaclass for all practcl objects



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "_MorphPatterns"]]


[call method [cmd "define"] [arg submethod] [opt "[arg args]"]]


[call method [cmd "graft"] [opt "[arg args]"]]


[call method [cmd "initialize"]]


[call method [cmd "link"] [arg command] [opt "[arg args]"]]


[call method [cmd "morph"] [arg classname]]


[call method [cmd "script"] [arg script]]


[call method [cmd "select"]]


[call method [cmd "source"] [arg filename]]


[list_end]
[para]

[subsection {Class  practcl::toolset}]

 Ancestor-less class intended to be a mixin
 which defines a family of build related behaviors
 that are modified when targetting either gcc or msvc



[para]
[class {Class Methods}]
[list_begin definitions]
[call classmethod [cmd select] [arg object]]
 Perform the selection for the toolset mixin



[list_end]
[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "config.sh"]]

 find or fake a key/value list describing this project




[call method [cmd "BuildDir"] [arg PWD]]
 Compute the location where the product will be built



[call method [cmd "MakeDir"] [arg srcdir]]
 Return where the Makefile is located relative to [emph srcdir].
 For this implementation the MakeDir is always srcdir.



[call method [cmd "read_configuration"]]
 Read information about the build process for this package.
 For this implementation, data is sought in the following locations
 in the following order:
 config.tcl (generated by practcl.) PKGConfig.sh. The Makefile
 [para]
 If the Makefile needs to be consulted, but does not exist, the
 Configure method is invoked



[call method [cmd "build-cflags"] [arg PROJECT] [arg DEFS] [arg namevar] [arg versionvar] [arg defsvar]]
 method DEFS
 This method populates 4 variables:
 name - The name of the package
 version - The version of the package
 defs - C flags passed to the compiler
 includedir - A list of paths to feed to the compiler for finding headers




[call method [cmd "critcl"] [opt "[arg args]"]]
 Invoke critcl in an external process



[list_end]
[para]

[subsection {Class  practcl::toolset.gcc}]
[emph "ancestors"]: [class practcl::toolset]
[para]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "Autoconf"]]


[call method [cmd "BuildDir"] [arg PWD]]


[call method [cmd "ConfigureOpts"]]


[call method [cmd "MakeDir"] [arg srcdir]]
 Detect what directory contains the Makefile template



[call method [cmd "make {} autodetect"]]


[call method [cmd "make {} clean"]]


[call method [cmd "make {} compile"]]


[call method [cmd "make {} install"] [arg DEST]]


[call method [cmd "build-compile-sources"] [arg PROJECT] [arg COMPILE] [arg CPPCOMPILE] [arg INCLUDES]]


[call method [cmd "build-Makefile"] [arg path] [arg PROJECT]]


[call method [cmd "build-library"] [arg outfile] [arg PROJECT]]

 Produce a static or dynamic library




[call method [cmd "build-tclsh"] [arg outfile] [arg PROJECT] [opt "[arg path] [const "auto"]"]]

 Produce a static executable




[list_end]
[para]

[subsection {Class  practcl::toolset.msvc}]
[emph "ancestors"]: [class practcl::toolset]
[para]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "BuildDir"] [arg PWD]]
 MSVC always builds in the source directory



[call method [cmd "make {} autodetect"]]
 Do nothing



[call method [cmd "make {} clean"]]


[call method [cmd "make {} compile"]]


[call method [cmd "make {} install"] [arg DEST]]


[call method [cmd "MakeDir"] [arg srcdir]]
 Detect what directory contains the Makefile template



[call method [cmd "NmakeOpts"]]


[list_end]
[para]

[subsection {Class  practcl::make_obj}]
[emph "ancestors"]: [class practcl::metaclass]
[para]

 A build deliverable object. Normally an object file, header, or tcl script
 which must be compiled or generated in some way



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "constructor"] [arg module_object] [arg name] [arg info] [opt "[arg action_body] [const ""]"]]


[call method [cmd "do"]]


[call method [cmd "check"]]


[call method [cmd "output"]]


[call method [cmd "reset"]]


[call method [cmd "triggers"]]


[list_end]
[para]

[subsection {Class  practcl::object}]
[emph "ancestors"]: [class practcl::metaclass]
[para]

 A generic Practcl object



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "constructor"] [arg parent] [opt "[arg args]"]]


[call method [cmd "child"] [arg method]]


[call method [cmd "go"]]


[list_end]
[para]

[subsection {Class  practcl::dynamic}]

 Dynamic blocks do not generate their own .c files,
 instead the contribute to the amalgamation
 of the main library file



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "cstructure"] [arg name] [arg definition] [opt "[arg argdat] [const ""]"]]

 Parser functions




[call method [cmd "include"] [arg header]]


[call method [cmd "include_dir"] [opt "[arg args]"]]


[call method [cmd "include_directory"] [opt "[arg args]"]]


[call method [cmd "c_header"] [arg body]]


[call method [cmd "c_code"] [arg body]]


[call method [cmd "c_function"] [arg header] [arg body] [opt "[arg info] [const ""]"]]


[call method [cmd "c_tcloomethod"] [arg name] [arg body] [opt "[arg arginfo] [const ""]"]]


[call method [cmd "cmethod"] [arg name] [arg body] [opt "[arg arginfo] [const ""]"]]
 Alias to classic name



[call method [cmd "c_tclproc_nspace"] [arg nspace]]


[call method [cmd "c_tclcmd"] [arg name] [arg body] [opt "[arg arginfo] [const ""]"]]


[call method [cmd "c_tclproc_raw"] [arg name] [arg body] [opt "[arg arginfo] [const ""]"]]
 Alias to classic name



[call method [cmd "tcltype"] [arg name] [arg argdat]]


[call method [cmd "project-compile-products"]]

 Module interactions




[call method [cmd "implement"] [arg path]]


[call method [cmd "initialize"]]

 Practcl internals




[call method [cmd "linktype"]]


[call method [cmd "generate-cfile-constant"]]


[call method [cmd "generate-cfile-header"]]


[call method [cmd "generate-cfile-tclapi"]]

 Generate code that provides implements Tcl API
 calls




[call method [cmd "generate-loader-module"]]

 Generate code that runs when the package/module is
 initialized into the interpreter




[call method [cmd "Collate_Source"] [arg CWD]]


[call method [cmd "select"]]
 Once an object marks itself as some
 flavor of dynamic, stop trying to morph
 it into something else



[list_end]
[para]

[subsection {Class  practcl::product}]

 A deliverable for the build system



[para]
[class {Class Methods}]
[list_begin definitions]
[call classmethod [cmd select] [arg object]]


[list_end]
[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "code"] [arg section] [arg body]]


[call method [cmd "Collate_Source"] [arg CWD]]


[call method [cmd "project-compile-products"]]


[call method [cmd "generate-debug"] [opt "[arg spaces] [const ""]"]]


[call method [cmd "generate-cfile-constant"]]


[call method [cmd "generate-cfile-public-structure"]]

 Populate const static data structures




[call method [cmd "generate-cfile-header"]]


[call method [cmd "generate-cfile-global"]]


[call method [cmd "generate-cfile-private-typedef"]]


[call method [cmd "generate-cfile-private-structure"]]


[call method [cmd "generate-cfile-functions"]]

 Generate code that provides subroutines called by
 Tcl API methods




[call method [cmd "generate-cfile-tclapi"]]

 Generate code that provides implements Tcl API
 calls




[call method [cmd "generate-hfile-public-define"]]


[call method [cmd "generate-hfile-public-macro"]]


[call method [cmd "generate-hfile-public-typedef"]]


[call method [cmd "generate-hfile-public-structure"]]


[call method [cmd "generate-hfile-public-headers"]]


[call method [cmd "generate-hfile-public-function"]]


[call method [cmd "generate-hfile-public-includes"]]


[call method [cmd "generate-hfile-public-verbatim"]]


[call method [cmd "generate-loader-external"]]


[call method [cmd "generate-loader-module"]]


[call method [cmd "generate-stub-function"]]


[call method [cmd "IncludeAdd"] [arg headervar] [opt "[arg args]"]]


[call method [cmd "generate-tcl-loader"]]


[call method [cmd "generate-tcl-pre"]]

 This methods generates any Tcl script file
 which is required to pre-initialize the C library




[call method [cmd "generate-tcl-post"]]


[call method [cmd "linktype"]]


[call method [cmd "Ofile"] [arg filename]]


[call method [cmd "project-static-packages"]]

 Methods called by the master project




[call method [cmd "toolset-include-directory"]]

 Methods called by the toolset




[call method [cmd "target"] [arg method] [opt "[arg args]"]]


[list_end]
[para]

[subsection {Class  practcl::product.cheader}]
[emph "ancestors"]: [class practcl::product]
[para]

 A product which generated from a C header file. Which is to say, nothing.



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "project-compile-products"]]


[call method [cmd "generate-loader-module"]]


[list_end]
[para]

[subsection {Class  practcl::product.csource}]
[emph "ancestors"]: [class practcl::product]
[para]

 A product which generated from a C source file. Normally an object (.o) file.



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "project-compile-products"]]


[list_end]
[para]

[subsection {Class  practcl::product.clibrary}]
[emph "ancestors"]: [class practcl::product]
[para]

 A product which is generated from a compiled C library.
 Usually a .a or a .dylib file, but in complex cases may
 actually just be a conduit for one project to integrate the
 source code of another



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "linker-products"] [arg configdict]]


[list_end]
[para]

[subsection {Class  practcl::product.dynamic}]
[emph "ancestors"]: [class practcl::dynamic] [class practcl::product]
[para]

 A product which is generated from C code that itself is generated
 by practcl or some other means. This C file may or may not produce
 its own .o file, depending on whether it is eligible to become part
 of an amalgamation



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "initialize"]]


[list_end]
[para]

[subsection {Class  practcl::product.critcl}]
[emph "ancestors"]: [class practcl::dynamic] [class practcl::product]
[para]

 A binary product produced by critcl. Note: The implementation is not
 written yet, this class does nothing.


[para]

[subsection {Class  practcl::module}]
[emph "ancestors"]: [class practcl::object] [class practcl::product.dynamic]
[para]

 In the end, all C code must be loaded into a module
 This will either be a dynamically loaded library implementing
 a tcl extension, or a compiled in segment of a custom shell/app



[para]
[class {Variable}]
[list_begin definitions]
[call variable [cmd make_object]]

[list_end]
[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "_MorphPatterns"]]


[call method [cmd "add"] [opt "[arg args]"]]


[call method [cmd "install-headers"] [opt "[arg args]"]]


[call method [cmd "make {} _preamble"]]


[call method [cmd "make {} pkginfo"]]


[call method [cmd "make {} objects"]]
 Return a dictionary of all handles and associated objects



[call method [cmd "make {} object"] [arg name]]
 Return the object associated with handle [emph name]



[call method [cmd "make {} reset"]]
 Reset all deputy objects



[call method [cmd "make {} trigger"] [opt "[arg args]"]]
 Exercise the triggers method for all handles listed



[call method [cmd "make {} depends"] [opt "[arg args]"]]
 Exercise the check method for all handles listed



[call method [cmd "make {} filename"] [arg name]]
 Return the file name of the build product for the listed
 handle



[call method [cmd "make {} target"] [arg name] [arg Info] [arg body]]


[call method [cmd "make {} todo"]]
 Return a list of handles for object which return true for the
 do method



[call method [cmd "make {} do"]]
 For each target exercise the action specified in the [emph action]
 definition if the [emph do] method returns true



[call method [cmd "child"] [arg which]]


[call method [cmd "generate-c"]]

 This methods generates the contents of an amalgamated .c file
 which implements the loader for a batch of tools




[call method [cmd "generate-h"]]

 This methods generates the contents of an amalgamated .h file
 which describes the public API of this module




[call method [cmd "generate-loader"]]


[call method [cmd "initialize"]]


[call method [cmd "implement"] [arg path]]


[call method [cmd "linktype"]]


[list_end]
[para]

[subsection {Class  practcl::project}]
[emph "ancestors"]: [class practcl::module]
[para]

 A toplevel project that is a collection of other projects



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "_MorphPatterns"]]


[call method [cmd "constructor"] [opt "[arg args]"]]


[call method [cmd "add_object"] [arg object]]


[call method [cmd "add_project"] [arg pkg] [arg info] [opt "[arg oodefine] [const ""]"]]


[call method [cmd "add_tool"] [arg pkg] [arg info] [opt "[arg oodefine] [const ""]"]]


[call method [cmd "build-tclcore"]]

 Compile the Tcl core. If the define [emph tk] is true, compile the
 Tk core as well




[call method [cmd "child"] [arg which]]


[call method [cmd "linktype"]]


[call method [cmd "project"] [arg pkg] [opt "[arg args]"]]
 Exercise the methods of a sub-object



[call method [cmd "tclcore"]]


[call method [cmd "tkcore"]]


[call method [cmd "tool"] [arg pkg] [opt "[arg args]"]]


[list_end]
[para]

[subsection {Class  practcl::library}]
[emph "ancestors"]: [class practcl::project]
[para]

 A toplevel project that produces a library



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "clean"] [arg PATH]]


[call method [cmd "project-compile-products"]]


[call method [cmd "go"]]


[call method [cmd "generate-decls"] [arg pkgname] [arg path]]


[call method [cmd "implement"] [arg path]]


[call method [cmd "generate-make"] [arg path]]
 Backward compadible call



[call method [cmd "linktype"]]


[call method [cmd "package-ifneeded"] [opt "[arg args]"]]
 Create a "package ifneeded"
 Args are a list of aliases for which this package will answer to



[call method [cmd "shared_library"] [opt "[arg filename] [const ""]"]]


[call method [cmd "static_library"] [opt "[arg filename] [const ""]"]]


[list_end]
[para]

[subsection {Class  practcl::tclkit}]
[emph "ancestors"]: [class practcl::library]
[para]

 A toplevel project that produces a self-contained executable



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "build-tclkit_main"] [arg PROJECT] [arg PKG_OBJS]]


[call method [cmd "Collate_Source"] [arg CWD]]


[call method [cmd "wrap"] [arg PWD] [arg exename] [arg vfspath] [opt "[arg args]"]]
 Wrap an executable




[list_end]
[para]

[subsection {Class  practcl::distribution}]

 Standalone class to manage code distribution
 This class is intended to be mixed into another class
 (Thus the lack of ancestors)



[para]
[class {Class Methods}]
[list_begin definitions]
[call classmethod [cmd Sandbox] [arg object]]


[call classmethod [cmd select] [arg object]]


[call classmethod [cmd claim_option]]


[call classmethod [cmd claim_object] [arg object]]


[call classmethod [cmd claim_path] [arg path]]


[list_end]
[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "scm_info"]]


[call method [cmd "DistroMixIn"]]


[call method [cmd "Sandbox"]]


[call method [cmd "SrcDir"]]


[call method [cmd "ScmTag"]]


[call method [cmd "ScmClone"]]


[call method [cmd "ScmUnpack"]]


[call method [cmd "ScmUpdate"]]


[call method [cmd "Unpack"]]


[list_end]
[para]

[subsection {Class  practcl::distribution.snapshot}]
[emph "ancestors"]: [class practcl::distribution]
[para]

 A file distribution from zip, tarball, or other non-scm archive format



[para]
[class {Class Methods}]
[list_begin definitions]
[call classmethod [cmd claim_object] [arg object]]


[call classmethod [cmd claim_option]]


[call classmethod [cmd claim_path] [arg path]]


[list_end]
[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "ScmUnpack"]]


[list_end]
[para]

[subsection {Class  practcl::distribution.fossil}]
[emph "ancestors"]: [class practcl::distribution]
[para]

 A file distribution based on fossil



[para]
[class {Class Methods}]
[list_begin definitions]
[call classmethod [cmd claim_object] [arg obj]]
 Check for markers in the metadata



[call classmethod [cmd claim_option]]


[call classmethod [cmd claim_path] [arg path]]
 Check for markers in the source root



[list_end]
[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "scm_info"]]


[call method [cmd "ScmClone"]]
 Clone the source



[call method [cmd "ScmTag"]]


[call method [cmd "ScmUnpack"]]


[call method [cmd "ScmUpdate"]]


[list_end]
[para]

[subsection {Class  practcl::distribution.git}]
[emph "ancestors"]: [class practcl::distribution]
[para]

 A file distribution based on git



[para]
[class {Class Methods}]
[list_begin definitions]
[call classmethod [cmd claim_object] [arg obj]]


[call classmethod [cmd claim_option]]


[call classmethod [cmd claim_path] [arg path]]


[list_end]
[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "ScmTag"]]


[call method [cmd "ScmUnpack"]]


[call method [cmd "ScmUpdate"]]


[list_end]
[para]

[subsection {Class  practcl::subproject}]
[emph "ancestors"]: [class practcl::module]
[para]

 A subordinate project



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "_MorphPatterns"]]


[call method [cmd "BuildDir"] [arg PWD]]


[call method [cmd "child"] [arg which]]


[call method [cmd "compile"]]


[call method [cmd "go"]]


[call method [cmd "install"] [opt "[arg args]"]]
 Install project into the local build system



[call method [cmd "linktype"]]


[call method [cmd "linker-products"] [arg configdict]]


[call method [cmd "linker-external"] [arg configdict]]


[call method [cmd "linker-extra"] [arg configdict]]


[call method [cmd "env-bootstrap"]]

 Methods for packages/tools that can be downloaded
 possibly built and used internally by this Practcl
 process


 Load the facility into the interpreter




[call method [cmd "env-exec"]]

 Return a file path that exec can call




[call method [cmd "env-install"]]

 Install the tool into the local environment




[call method [cmd "env-load"]]

 Do whatever is necessary to get the tool
 into the local environment




[call method [cmd "env-present"]]

 Check if tool is available for load/already loaded




[call method [cmd "sources"]]


[call method [cmd "update"]]


[call method [cmd "unpack"]]


[list_end]
[para]

[subsection {Class  practcl::subproject.source}]
[emph "ancestors"]: [class practcl::subproject] [class practcl::library]
[para]

 A project which the kit compiles and integrates
 the source for itself



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "env-bootstrap"]]


[call method [cmd "env-present"]]


[call method [cmd "linktype"]]


[list_end]
[para]

[subsection {Class  practcl::subproject.teapot}]
[emph "ancestors"]: [class practcl::subproject]
[para]
 a copy from the teapot


[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "env-bootstrap"]]


[call method [cmd "env-install"]]


[call method [cmd "env-present"]]


[call method [cmd "install"] [arg DEST]]


[list_end]
[para]

[subsection {Class  practcl::subproject.kettle}]
[emph "ancestors"]: [class practcl::subproject]
[para]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "kettle"] [arg path] [opt "[arg args]"]]


[call method [cmd "install"] [arg DEST]]


[list_end]
[para]

[subsection {Class  practcl::subproject.critcl}]
[emph "ancestors"]: [class practcl::subproject]
[para]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "install"] [arg DEST]]


[list_end]
[para]

[subsection {Class  practcl::subproject.sak}]
[emph "ancestors"]: [class practcl::subproject]
[para]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "env-bootstrap"]]


[call method [cmd "env-install"]]


[call method [cmd "env-present"]]


[call method [cmd "install"] [arg DEST]]


[call method [cmd "install-module"] [arg DEST] [opt "[arg args]"]]


[list_end]
[para]

[subsection {Class  practcl::subproject.practcl}]
[emph "ancestors"]: [class practcl::subproject]
[para]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "env-bootstrap"]]


[call method [cmd "env-install"]]


[call method [cmd "install"] [arg DEST]]


[call method [cmd "install-module"] [arg DEST] [opt "[arg args]"]]


[list_end]
[para]

[subsection {Class  practcl::subproject.binary}]
[emph "ancestors"]: [class practcl::subproject]
[para]

 A subordinate binary package



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "clean"]]


[call method [cmd "env-install"]]


[call method [cmd "project-compile-products"]]


[call method [cmd "ComputeInstall"]]


[call method [cmd "go"]]


[call method [cmd "linker-products"] [arg configdict]]


[call method [cmd "project-static-packages"]]


[call method [cmd "BuildDir"] [arg PWD]]


[call method [cmd "compile"]]


[call method [cmd "Configure"]]


[call method [cmd "install"] [arg DEST]]


[list_end]
[para]

[subsection {Class  practcl::subproject.tea}]
[emph "ancestors"]: [class practcl::subproject.binary]
[para]

 A subordinate TEA based binary package



[para]

[subsection {Class  practcl::subproject.library}]
[emph "ancestors"]: [class practcl::subproject.binary] [class practcl::library]
[para]

 A subordinate C library built by this project



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "install"] [arg DEST]]


[list_end]
[para]

[subsection {Class  practcl::subproject.external}]
[emph "ancestors"]: [class practcl::subproject.binary]
[para]

 A subordinate external C library



[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "install"] [arg DEST]]


[list_end]
[para]

[subsection {Class  practcl::subproject.core}]
[emph "ancestors"]: [class practcl::subproject.binary]
[para]

[para]
[class {Methods}]
[list_begin definitions]
[call method [cmd "env-bootstrap"]]


[call method [cmd "env-present"]]


[call method [cmd "env-install"]]


[call method [cmd "go"]]


[call method [cmd "linktype"]]


[list_end]
[para]

[vset CATEGORY practcl]
[include ../common-text/feedback.inc]

[manpage_end]

|
|
|

|




>



<
<
<
<
<
<
<
<
<
<
<
<

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<

|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
|

<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
|

<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
<

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
<

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
<
<
<
<
<

|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
|

<
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

[comment {-*- practlc -*-}]
[vset VERSION 0.1]
[manpage_begin practcl n [vset VERSION]]
[keywords practcl]
[copyright {2016 Sean Woods <yoda@etoyoc.com>}]
[moddesc {The The Proper Rational API for C to Tool Command Language Module}]
[titledesc {The Practcl Module}]
[category {TclOO}]
[require TclOO 1.0]
[require practcl [vset VERSION]]
[description]
The Practcl module is a tool for integrating large modules for C API
Tcl code that requires custom Tcl types and TclOO objects.













[section COMMANDS]













































































































[list_begin definitions]





[call [cmd CPUTS] [arg varname] [arg body] [opt [arg body]...]]
Appends blocks of text to a buffer. This command tries to reduce the number
of line breaks between bodies.










































































































































[call [cmd practcl::_isdirectory] [arg path]]
Returns true if [arg path] is a directory, using the test 



































































































[list_end]






























































































































































































[list_begin definitions]

[call [cmd practcl::object] [arg "parent"] [opt [arg "keyvaluelist"]]]


A generic Practcl object






























































































































































[call [cmd practcl::library] [opt [arg "keyvaluelist"]]]
































































A Practcl object representing a library container














































[call [cmd practcl::exe] [opt [arg "keyvaluelist"]]]


A Practcl object representing a wrapped executable




















































































































[call [cmd practcl::product] [arg "parent"] [opt [arg "keyvaluelist"]]]























































































































A Practcl object representing a compiled product


[call [cmd practcl::cheader] [arg "parent"] [opt [arg "keyvaluelist"]]]




















































































































A Practcl object representing an externally generated c header





















































































































[call [cmd practcl::csource] [arg "parent"] [opt [arg "keyvaluelist"]]]


A Practcl object representing an externally generated c source file




















































































































[call [cmd practcl::module] [arg "parent"] [opt [arg "keyvaluelist"]]]






















































































































A Practcl object representing a dynamically generated C/H/Tcl suite






[call [cmd practcl::submodule] [arg "parent"] [opt [arg "keyvaluelist"]]]
















































































































A Practcl object representing a dynamically generated C/H/Tcl suite, subordinate to a module













[list_end]


























































































































































































































[vset CATEGORY practcl]

[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/practcl/practcl.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582




2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597

2598
2599
2600
2601
2602
2603
2604
2605

2606
2607
2608
2609
2610
2611
2612
2613

2614
2615
2616
2617
2618
2619
2620


2621
2622
2623
2624
2625
2626
2627
2628
###
# Amalgamated package for practcl
# Do not edit directly, tweak the source in src/ and rerun
# build.tcl
###
package require Tcl 8.6
package provide practcl 0.16.4
namespace eval ::practcl {}

###
# START: httpwget/wget.tcl
###

###
# END: httpwget/wget.tcl
###
###
# START: clay/clay.tcl
###
package provide clay 0.8.6
namespace eval ::clay {
}
namespace eval ::clay {
}
set ::clay::trace 0
if {[info commands ::cron::object_destroy] eq {}} {
  # Provide a noop if we aren't running with the cron scheduler
  namespace eval ::cron {}
  proc ::cron::object_destroy args {}
}
proc ::clay::PROC {name arglist body {ninja {}}} {
  if {[info commands $name] ne {}} return
  proc $name $arglist $body
  eval $ninja
}
if {[info commands ::PROC] eq {}} {
  namespace eval ::clay { namespace export PROC }
  namespace eval :: { namespace import ::clay::PROC }
}
proc ::clay::_ancestors {resultvar class} {
  upvar 1 $resultvar result
  if {$class in $result} {
    return
  }
  lappend result $class
  foreach aclass [::info class superclasses $class] {
    _ancestors result $aclass
  }
}
proc ::clay::ancestors {args} {
  set result {}
  set queue  {}
  set metaclasses {}

  foreach class $args {
    set ancestors($class) {}
    _ancestors ancestors($class) $class
  }
  foreach class [lreverse $args] {
    foreach aclass $ancestors($class) {
      if {$aclass in $result} continue
      set skip 0
      foreach bclass $args {
        if {$class eq $bclass} continue
        if {$aclass in $ancestors($bclass)} {
          set skip 1
          break
        }
      }
      if {$skip} continue
      lappend result $aclass
    }
  }
  foreach class [lreverse $args] {
    foreach aclass $ancestors($class) {
      if {$aclass in $result} continue
      lappend result $aclass
    }
  }
  ###
  # Screen out classes that do not participate in clay
  # interactions
  ###
  set output {}
  foreach {item} $result {
    if {[catch {$item clay noop} err]} {
      continue
    }
    lappend output $item
  }
  return $output
}
proc ::clay::args_to_dict args {
  if {[llength $args]==1} {
    return [lindex $args 0]
  }
  return $args
}
proc ::clay::args_to_options args {
  set result {}
  foreach {var val} [args_to_dict {*}$args] {
    lappend result [string trim $var -:] $val
  }
  return $result
}
proc ::clay::dynamic_arguments {ensemble method arglist args} {
  set idx 0
  set len [llength $args]
  if {$len > [llength $arglist]} {
    ###
    # Catch if the user supplies too many arguments
    ###
    set dargs 0
    if {[lindex $arglist end] ni {args dictargs}} {
      return -code error -level 2 "Usage: $ensemble $method [string trim [dynamic_wrongargs_message $arglist]]"
    }
  }
  foreach argdef $arglist {
    if {$argdef eq "args"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      break
    }
    if {$argdef eq "dictargs"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      ###
      # Perform args processing in the style of clay
      ###
      set dictargs [::clay::args_to_options {*}[lrange $args $idx end]]
      uplevel 1 [list set dictargs $dictargs]
      break
    }
    if {$idx > $len} {
      ###
      # Catch if the user supplies too few arguments
      ###
      if {[llength $argdef]==1} {
        return -code error -level 2 "Usage: $ensemble $method [string trim [dynamic_wrongargs_message $arglist]]"
      } else {
        uplevel 1 [list set [lindex $argdef 0] [lindex $argdef 1]]
      }
    } else {
      uplevel 1 [list set [lindex $argdef 0] [lindex $args $idx]]
    }
    incr idx
  }
}
proc ::clay::dynamic_wrongargs_message {arglist} {
  set result ""
  set dargs 0
  foreach argdef $arglist {
    if {$argdef in {args dictargs}} {
      set dargs 1
      break
    }
    if {[llength $argdef]==1} {
      append result " $argdef"
    } else {
      append result " ?[lindex $argdef 0]?"
    }
  }
  if { $dargs } {
    append result " ?option value?..."
  }
  return $result
}
proc ::clay::is_dict { d } {
  # is it a dict, or can it be treated like one?
  if {[catch {::dict size $d} err]} {
    #::set ::errorInfo {}
    return 0
  }
  return 1
}
proc ::clay::is_null value {
  return [expr {$value in {{} NULL}}]
}
proc ::clay::leaf args {
  set marker [string index [lindex $args end] end]
  set result [path {*}${args}]
  if {$marker eq "/"} {
    return $result
  }
  return [list {*}[lrange $result 0 end-1] [string trim [string trim [lindex $result end]] /]]
}
proc ::clay::K {a b} {set a}
if {[info commands ::K] eq {}} {
  namespace eval ::clay { namespace export K }
  namespace eval :: { namespace import ::clay::K }
}
proc ::clay::noop args {}
if {[info commands ::noop] eq {}} {
  namespace eval ::clay { namespace export noop }
  namespace eval :: { namespace import ::clay::noop }
}
proc ::clay::cleanup {} {
  set count 0
  if {![info exists ::clay::idle_destroy]} return
  set objlist $::clay::idle_destroy
  set ::clay::idle_destroy {}
  foreach obj $objlist {
    if {![catch {$obj destroy}]} {
      incr count
    }
  }
  return $count
}
proc ::clay::object_create {objname {class {}}} {
  #if {$::clay::trace>0} {
  #  puts [list $objname CREATE]
  #}
}
proc ::clay::object_rename {object newname} {
  if {$::clay::trace>0} {
    puts [list $object RENAME -> $newname]
  }
}
proc ::clay::object_destroy args {
  if {![info exists ::clay::idle_destroy]} {
    set ::clay::idle_destroy {}
  }
  foreach objname $args {
    if {$::clay::trace>0} {
      puts [list $objname DESTROY]
    }
    ::cron::object_destroy $objname
    if {$objname in $::clay::idle_destroy} continue
    lappend ::clay::idle_destroy $objname
  }
}
proc ::clay::path args {
  set result {}
  foreach item $args {
    set item [string trim $item :./]
    foreach subitem [split $item /] {
      lappend result [string trim ${subitem}]/
    }
  }
  return $result
}
proc ::clay::putb {buffername args} {
  upvar 1 $buffername buffer
  switch [llength $args] {
    1 {
      append buffer [lindex $args 0] \n
    }
    2 {
      append buffer [string map {*}$args] \n
    }
    default {
      error "usage: putb buffername ?map? string"
    }
  }
}
if {[info command ::putb] eq {}} {
  namespace eval ::clay { namespace export putb }
  namespace eval :: { namespace import ::clay::putb }
}
proc ::clay::script_path {} {
  set path [file dirname [file join [pwd] [info script]]]
  return $path
}
proc ::clay::NSNormalize qualname {
  if {![string match ::* $qualname]} {
    set qualname ::clay::classes::$qualname
  }
  regsub -all {::+} $qualname "::"
}
proc ::clay::uuid_generate args {
  return [uuid generate]
}
namespace eval ::clay {
  variable option_class {}
  variable core_classes {::oo::class ::oo::object}
}
package require Tcl 8.6 ;# try in pipeline.tcl. Possibly other things.
if {[info commands irmmd5] eq {}} {
  if {[catch {package require odielibc}]} {
    package require md5 2
  }
}
::namespace eval ::clay {
}
::namespace eval ::clay::classes {
}
::namespace eval ::clay::define {
}
::namespace eval ::clay::tree {
}
::namespace eval ::clay::dict {
}
::namespace eval ::clay::list {
}
::namespace eval ::clay::uuid {
}
if {![info exists ::clay::idle_destroy]} {
  set ::clay::idle_destroy {}
}
namespace eval ::clay::uuid {
    namespace export uuid
}
proc ::clay::uuid::generate_tcl_machinfo {} {
  variable machinfo
  if {[info exists machinfo]} {
    return $machinfo
  }
  lappend machinfo [clock seconds]; # timestamp
  lappend machinfo [clock clicks];  # system incrementing counter
  lappend machinfo [info hostname]; # spatial unique id (poor)
  lappend machinfo [pid];           # additional entropy
  lappend machinfo [array get ::tcl_platform]

  ###
  # If we have /dev/urandom just stream 128 bits from that
  ###
  if {[file exists /dev/urandom]} {
    set fin [open /dev/urandom r]
    binary scan [read $fin 128] H* machinfo
    close $fin
  } elseif {[catch {package require nettool}]} {
    # More spatial information -- better than hostname.
    # bug 1150714: opening a server socket may raise a warning messagebox
    #   with WinXP firewall, using ipconfig will return all IP addresses
    #   including ipv6 ones if available. ipconfig is OK on win98+
    if {[string equal $::tcl_platform(platform) "windows"]} {
      catch {exec ipconfig} config
      lappend machinfo $config
    } else {
      catch {
          set s [socket -server void -myaddr [info hostname] 0]
          ::clay::K [fconfigure $s -sockname] [close $s]
      } r
      lappend machinfo $r
    }

    if {[package provide Tk] != {}} {
      lappend machinfo [winfo pointerxy .]
      lappend machinfo [winfo id .]
    }
  } else {
    ###
    # If the nettool package works on this platform
    # use the stream of hardware ids from it
    ###
    lappend machinfo {*}[::nettool::hwid_list]
  }
  return $machinfo
}
if {[info commands irmmd5] ne {}} {
proc ::clay::uuid::generate {{type {}}} {
    variable nextuuid
    set s [irmmd5 "$type [incr nextuuid(type)] [generate_tcl_machinfo]"]
    foreach {a b} {0 7 8 11 12 15 16 19 20 31} {
         append r [string range $s $a $b] -
     }
     return [string tolower [string trimright $r -]]
}
proc ::clay::uuid::short {{type {}}} {
  variable nextuuid
  set r [irmmd5 "$type [incr nextuuid(type)] [generate_tcl_machinfo]"]
  return [string range $r 0 16]
}

} else {
package require md5 2
proc ::clay::uuid::raw {{type {}}} {
    variable nextuuid
    set tok [md5::MD5Init]
    md5::MD5Update $tok "$type [incr nextuuid($type)] [generate_tcl_machinfo]"
    set r [md5::MD5Final $tok]
    return $r
    #return [::clay::uuid::tostring $r]
}
proc ::clay::uuid::generate {{type {}}} {
    return [::clay::uuid::tostring [::clay::uuid::raw  $type]]
}
proc ::clay::uuid::short {{type {}}} {
  set r [::clay::uuid::raw $type]
  binary scan $r H* s
  return [string range $s 0 16]
}
}
proc ::clay::uuid::tostring {uuid} {
    binary scan $uuid H* s
    foreach {a b} {0 7 8 11 12 15 16 19 20 31} {
        append r [string range $s $a $b] -
    }
    return [string tolower [string trimright $r -]]
}
proc ::clay::uuid::fromstring {uuid} {
    return [binary format H* [string map {- {}} $uuid]]
}
proc ::clay::uuid::equal {left right} {
    set l [fromstring $left]
    set r [fromstring $right]
    return [string equal $l $r]
}
proc ::clay::uuid {cmd args} {
    switch -exact -- $cmd {
        generate {
           return [::clay::uuid::generate {*}$args]
        }
        short {
          set uuid [::clay::uuid::short {*}$args]
        }
        equal {
            tailcall ::clay::uuid::equal {*}$args
        }
        default {
            return -code error "bad option \"$cmd\":\
                must be generate or equal"
        }
    }
}
::clay::PROC ::tcl::dict::getnull {dictionary args} {
  if {[exists $dictionary {*}$args]} {
    get $dictionary {*}$args
  }
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] getnull ::tcl::dict::getnull]
}
::clay::PROC ::tcl::dict::is_dict { d } {
  # is it a dict, or can it be treated like one?
  if {[catch {dict size $d} err]} {
    #::set ::errorInfo {}
    return 0
  }
  return 1
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] is_dict ::tcl::dict::is_dict]
}
::clay::PROC ::tcl::dict::rmerge {args} {
  ::set result [dict create . {}]
  # Merge b into a, and handle nested dicts appropriately
  ::foreach b $args {
    for { k v } $b {
      ::set field [string trim $k :/]
      if {![::clay::tree::is_branch $b $k]} {
        # Element names that end in ":" are assumed to be literals
        set result $k $v
      } elseif { [exists $result $k] } {
        # key exists in a and b?  let's see if both values are dicts
        # both are dicts, so merge the dicts
        if { [is_dict [get $result $k]] && [is_dict $v] } {
          set result $k [rmerge [get $result $k] $v]
        } else {
          set result $k $v
        }
      } else {
        set result $k $v
      }
    }
  }
  return $result
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] rmerge ::tcl::dict::rmerge]
}
::clay::PROC ::clay::tree::is_branch { dict path } {
  set field [lindex $path end]
  if {[string index $field end] eq ":"} {
    return 0
  }
  if {[string index $field 0] eq "."} {
    return 0
  }
  if {[string index $field end] eq "/"} {
    return 1
  }
  return [dict exists $dict {*}$path .]
}
::clay::PROC ::clay::tree::print {dict} {
  ::set result {}
  ::set level -1
  ::clay::tree::_dictputb $level result $dict
  return $result
}
::clay::PROC ::clay::tree::_dictputb {level varname dict} {
  upvar 1 $varname result
  incr level
  dict for {field value} $dict {
    if {$field eq "."} continue
    if {[clay::tree::is_branch $dict $field]} {
      putb result "[string repeat "  " $level]$field \{"
      _dictputb $level result $value
      putb result "[string repeat "  " $level]\}"
    } else {
      putb result "[string repeat "  " $level][list $field $value]"
    }
  }
}
proc ::clay::tree::sanitize {dict} {
  ::set result {}
  ::set level -1
  ::clay::tree::_sanitizeb {} result $dict
  return $result
}
proc ::clay::tree::_sanitizeb {path varname dict} {
  upvar 1 $varname result
  dict for {field value} $dict {
    if {$field eq "."} continue
    if {[clay::tree::is_branch $dict $field]} {
      _sanitizeb [list {*}$path $field] result $value
    } else {
      dict set result {*}$path $field $value
    }
  }
}
proc ::clay::tree::storage {rawpath} {
  set isleafvar 0
  set path {}
  set tail [string index $rawpath end]
  foreach element $rawpath {
    set items [split [string trim $element /] /]
    foreach item $items {
      if {$item eq {}} continue
      lappend path $item
    }
  }
  return $path
}
proc ::clay::tree::dictset {varname args} {
  upvar 1 $varname result
  if {[llength $args] < 2} {
    error "Usage: ?path...? path value"
  } elseif {[llength $args]==2} {
    set rawpath [lindex $args 0]
  } else {
    set rawpath  [lrange $args 0 end-1]
  }
  set value [lindex $args end]
  set path [storage $rawpath]
  set dot .
  set one {}
  dict set result $dot $one
  set dpath {}
  foreach item [lrange $path 0 end-1] {
    set field $item
    lappend dpath [string trim $item /]
    dict set result {*}$dpath $dot $one
  }
  set field [lindex $rawpath end]
  set ext   [string index $field end]
  if {$ext eq {:} || ![dict is_dict $value]} {
    dict set result {*}$path $value
    return
  }
  if {$ext eq {/} && ![dict exists $result {*}$path $dot]} {
    dict set result {*}$path $dot $one
  }
  if {[dict exists $result {*}$path $dot]} {
    dict set result {*}$path [::clay::tree::merge [dict get $result {*}$path] $value]
    return
  }
  dict set result {*}$path $value
}
proc ::clay::tree::dictmerge {varname args} {
  upvar 1 $varname result
  set dot .
  set one {}
  dict set result $dot $one
  foreach dict $args {
    dict for {f v} $dict {
      set field [string trim $f /]
      set bbranch [clay::tree::is_branch $dict $f]
      if {![dict exists $result $field]} {
        dict set result $field $v
        if {$bbranch} {
          dict set result $field [clay::tree::merge $v]
        } else {
          dict set result $field $v
        }
      } elseif {[dict exists $result $field $dot]} {
        if {$bbranch} {
          dict set result $field [clay::tree::merge [dict get $result $field] $v]
        } else {
          dict set result $field $v
        }
      }
    }
  }
  return $result
}
proc ::clay::tree::merge {args} {
  ###
  # The result of a merge is always a dict with branches
  ###
  set dot .
  set one {}
  dict set result $dot $one
  set argument 0
  foreach b $args {
    # Merge b into a, and handle nested dicts appropriately
    if {![dict is_dict $b]} {
      error "Element $b is not a dictionary"
    }
    dict for { k v } $b {
      if {$k eq $dot} {
        dict set result $dot $one
        continue
      }
      set bbranch [is_branch $b $k]
      set field [string trim $k /]
      if { ![dict exists $result $field] } {
        if {$bbranch} {
          dict set result $field [merge $v]
        } else {
          dict set result $field $v
        }
      } else {
        set abranch [dict exists $result $field $dot]
        if {$abranch && $bbranch} {
          dict set result $field [merge [dict get $result $field] $v]
        } else {
          dict set result $field $v
          if {$bbranch} {
            dict set result $field $dot $one
          }
        }
      }
    }
  }
  return $result
}
::clay::PROC ::tcl::dict::isnull {dictionary args} {
  if {![exists $dictionary {*}$args]} {return 1}
  return [expr {[get $dictionary {*}$args] in {{} NULL null}}]
} {
  namespace ensemble configure dict -map [dict replace\
      [namespace ensemble configure dict -map] isnull ::tcl::dict::isnull]
}
::clay::PROC ::clay::ladd {varname args} {
  upvar 1 $varname var
  if ![info exists var] {
      set var {}
  }
  foreach item $args {
    if {$item in $var} continue
    lappend var $item
  }
  return $var
}
::clay::PROC ::clay::ldelete {varname args} {
  upvar 1 $varname var
  if ![info exists var] {
      return
  }
  foreach item [lsort -unique $args] {
    while {[set i [lsearch $var $item]]>=0} {
      set var [lreplace $var $i $i]
    }
  }
  return $var
}
::clay::PROC ::clay::lrandom list {
  set len [llength $list]
  set idx [expr int(rand()*$len)]
  return [lindex $list $idx]
}
namespace eval ::dictargs {
}
if {[info commands ::dictargs::parse] eq {}} {
  proc ::dictargs::parse {argdef argdict} {
    set result {}
    dict for {field info} $argdef {
      if {![string is alnum [string index $field 0]]} {
        error "$field is not a simple variable name"
      }
      upvar 1 $field _var
      set aliases {}
      if {[dict exists $argdict $field]} {
        set _var [dict get $argdict $field]
        continue
      }
      if {[dict exists $info aliases:]} {
        set found 0
        foreach {name} [dict get $info aliases:] {
          if {[dict exists $argdict $name]} {
            set _var [dict get $argdict $name]
            set found 1
            break
          }
        }
        if {$found} continue
      }
      if {[dict exists $info default:]} {
        set _var [dict get $info default:]
        continue
      }
      set mandatory 1
      if {[dict exists $info mandatory:]} {
        set mandatory [dict get $info mandatory:]
      }
      if {$mandatory} {
        error "$field is required"
      }
    }
  }
}
proc ::dictargs::proc {name argspec body} {
  set result {}
  append result "::dictargs::parse \{$argspec\} \$args" \;
  append result $body
  uplevel 1 [list ::proc $name [list [list args [list dictargs $argspec]]] $result]
}
proc ::dictargs::method {name argspec body} {
  set class [lindex [::info level -1] 1]
  set result {}
  append result "::dictargs::parse \{$argspec\} \$args" \;
  append result $body
  oo::define $class method $name [list [list args [list dictargs $argspec]]] $result
}
namespace eval ::clay::dialect {
  namespace export create
  foreach {flag test} {
    tip470 {package vsatisfies [package provide Tcl] 8.7}
  } {
    if {![info exists ::clay::dialect::has($flag)]} {
      set ::clay::dialect::has($flag) [eval $test]
    }
  }
}
proc ::clay::dialect::Push {class} {
  ::variable class_stack
  lappend class_stack $class
}
proc ::clay::dialect::Peek {} {
  ::variable class_stack
  return [lindex $class_stack end]
}
proc ::clay::dialect::Pop {} {
  ::variable class_stack
  set class_stack [lrange $class_stack 0 end-1]
}
if {$::clay::dialect::has(tip470)} {
proc ::clay::dialect::current_class {} {
  return [uplevel 1 self]
}
} else {
proc ::clay::dialect::current_class {} {
  tailcall Peek
}
}
proc ::clay::dialect::create {name {parent ""}} {
  variable has
  set NSPACE [NSNormalize [uplevel 1 {namespace current}] $name]
  ::namespace eval $NSPACE {::namespace eval define {}}
  ###
  # Build the "define" namespace
  ###

  if {$parent eq ""} {
    ###
    # With no "parent" language, begin with all of the keywords in
    # oo::define
    ###
    foreach command [info commands ::oo::define::*] {
      set procname [namespace tail $command]
      interp alias {} ${NSPACE}::define::$procname {} \
        ::clay::dialect::DefineThunk $procname
    }
    # Create an empty dynamic_methods proc
    proc ${NSPACE}::dynamic_methods {class} {}
    namespace eval $NSPACE {
      ::namespace export dynamic_methods
      ::namespace eval define {::namespace export *}
    }
    set ANCESTORS {}
  } else {
    ###
    # If we have a parent language, that language already has the
    # [oo::define] keywords as well as additional keywords and behaviors.
    # We should begin with that
    ###
    set pnspace [NSNormalize [uplevel 1 {namespace current}] $parent]
    apply [list parent {
      ::namespace export dynamic_methods
      ::namespace import -force ${parent}::dynamic_methods
    } $NSPACE] $pnspace

    apply [list parent {
      ::namespace import -force ${parent}::define::*
      ::namespace export *
    } ${NSPACE}::define] $pnspace
      set ANCESTORS [list ${pnspace}::object]
  }
  ###
  # Build our dialect template functions
  ###
  proc ${NSPACE}::define {oclass args} [string map [list %NSPACE% $NSPACE] {
  ###
  # To facilitate library reloading, allow
  # a dialect to create a class from DEFINE
  ###
  set class [::clay::dialect::NSNormalize [uplevel 1 {namespace current}] $oclass]
    if {[info commands $class] eq {}} {
      %NSPACE%::class create $class {*}${args}
    } else {
      ::clay::dialect::Define %NSPACE% $class {*}${args}
    }
}]
  interp alias {} ${NSPACE}::define::current_class {} \
    ::clay::dialect::current_class
  interp alias {} ${NSPACE}::define::aliases {} \
    ::clay::dialect::Aliases $NSPACE
  interp alias {} ${NSPACE}::define::superclass {} \
    ::clay::dialect::SuperClass $NSPACE

  if {[info command ${NSPACE}::class] ne {}} {
    ::rename ${NSPACE}::class {}
  }
  ###
  # Build the metaclass for our language
  ###
  ::oo::class create ${NSPACE}::class {
    superclass ::clay::dialect::MotherOfAllMetaClasses
  }
  # Wire up the create method to add in the extra argument we need; the
  # MotherOfAllMetaClasses will know what to do with it.
  ::oo::objdefine ${NSPACE}::class \
    method create {name {definitionScript ""}} \
      "next \$name [list ${NSPACE}::define] \$definitionScript"

  ###
  # Build the mother of all classes. Note that $ANCESTORS is already
  # guaranteed to be a list in canonical form.
  ###
  uplevel #0 [string map [list %NSPACE% [list $NSPACE] %name% [list $name] %ANCESTORS% $ANCESTORS] {
    %NSPACE%::class create %NSPACE%::object {
     superclass %ANCESTORS%
      # Put MOACish stuff in here
    }
  }]
  if { "${NSPACE}::class" ni $::clay::dialect::core_classes } {
    lappend ::clay::dialect::core_classes "${NSPACE}::class"
  }
  if { "${NSPACE}::object" ni $::clay::dialect::core_classes } {
    lappend ::clay::dialect::core_classes "${NSPACE}::object"
  }
}
proc ::clay::dialect::NSNormalize {namespace qualname} {
  if {![string match ::* $qualname]} {
    set qualname ${namespace}::$qualname
  }
  regsub -all {::+} $qualname "::"
}
proc ::clay::dialect::DefineThunk {target args} {
  tailcall ::oo::define [Peek] $target {*}$args
}
proc ::clay::dialect::Canonical {namespace NSpace class} {
  namespace upvar $namespace cname cname
  #if {[string match ::* $class]} {
  #  return $class
  #}
  if {[info exists cname($class)]} {
    return $cname($class)
  }
  if {[info exists ::clay::dialect::cname($class)]} {
    return $::clay::dialect::cname($class)
  }
  if {[info exists ::clay::dialect::cname(${NSpace}::${class})]} {
    return $::clay::dialect::cname(${NSpace}::${class})
  }
  foreach item [list "${NSpace}::$class" "::$class"] {
    if {[info commands $item] ne {}} {
      return $item
    }
  }
  return ${NSpace}::$class
}
proc ::clay::dialect::Define {namespace class args} {
  Push $class
  try {
  	if {[llength $args]==1} {
      namespace eval ${namespace}::define [lindex $args 0]
    } else {
      ${namespace}::define::[lindex $args 0] {*}[lrange $args 1 end]
    }
  	${namespace}::dynamic_methods $class
  } finally {
    Pop
  }
}
proc ::clay::dialect::Aliases {namespace args} {
  set class [Peek]
  namespace upvar $namespace cname cname
  set NSpace [join [lrange [split $class ::] 1 end-2] ::]
  set cname($class) $class
  foreach name $args {
    set cname($name) $class
    #set alias $name
    set alias [NSNormalize $NSpace $name]
    # Add a local metaclass reference
    if {![info exists ::clay::dialect::cname($alias)]} {
      lappend ::clay::dialect::aliases($class) $alias
      ##
      # Add a global reference, first come, first served
      ##
      set ::clay::dialect::cname($alias) $class
    }
  }
}
proc ::clay::dialect::SuperClass {namespace args} {
  set class [Peek]
  namespace upvar $namespace class_info class_info
  dict set class_info($class) superclass 1
  set ::clay::dialect::cname($class) $class
  set NSpace [join [lrange [split $class ::] 1 end-2] ::]
  set unique {}
  foreach item $args {
    set Item [Canonical $namespace $NSpace $item]
    dict set unique $Item $item
  }
  set root ${namespace}::object
  if {$class ne $root} {
    dict set unique $root $root
  }
  tailcall ::oo::define $class superclass {*}[dict keys $unique]
}
if {[info command ::clay::dialect::MotherOfAllMetaClasses] eq {}} {
::oo::class create ::clay::dialect::MotherOfAllMetaClasses {
  superclass ::oo::class
  constructor {define definitionScript} {
    $define [self] {
      superclass
    }
    $define [self] $definitionScript
  }
  method aliases {} {
    if {[info exists ::clay::dialect::aliases([self])]} {
      return $::clay::dialect::aliases([self])
    }
  }
}
}
namespace eval ::clay::dialect {
  variable core_classes {::oo::class ::oo::object}
}
::clay::dialect::create ::clay
proc ::clay::dynamic_methods class {
  foreach command [info commands [namespace current]::dynamic_methods_*] {
    $command $class
  }
}
proc ::clay::dynamic_methods_class {thisclass} {
  set methods {}
  set mdata [$thisclass clay find class_typemethod]
  foreach {method info} $mdata {
    if {$method eq {.}} continue
    set method [string trimright $method :/-]
    if {$method in $methods} continue
    lappend methods $method
    set arglist [dict getnull $info arglist]
    set body    [dict getnull $info body]
    ::oo::objdefine $thisclass method $method $arglist $body
  }
}
proc ::clay::define::Array {name {values {}}} {
  set class [current_class]
  set name [string trim $name :/]
  $class clay branch array $name
  dict for {var val} $values {
    $class clay set array/ $name $var $val
  }
}
proc ::clay::define::Delegate {name info} {
  set class [current_class]
  foreach {field value} $info {
    $class clay set component/ [string trim $name :/]/ $field $value
  }
}
proc ::clay::define::constructor {arglist rawbody} {
  set body {
my variable DestroyEvent
set DestroyEvent 0
::clay::object_create [self] [info object class [self]]
# Initialize public variables and options
my InitializePublic
  }
  append body $rawbody
  set class [current_class]
  ::oo::define $class constructor $arglist $body
}
proc ::clay::define::Class_Method {name arglist body} {
  set class [current_class]
  $class clay set class_typemethod/ [string trim $name :/] [dict create arglist $arglist body $body]
}
proc ::clay::define::class_method {name arglist body} {
  set class [current_class]
  $class clay set class_typemethod/ [string trim $name :/] [dict create arglist $arglist body $body]
}
proc ::clay::define::clay {args} {
  set class [current_class]
  if {[lindex $args 0] in "cget set branch"} {
    $class clay {*}$args
  } else {
    $class clay set {*}$args
  }
}
proc ::clay::define::destructor rawbody {
  set body {
# Run the destructor once and only once
set self [self]
my variable DestroyEvent
if {$DestroyEvent} return
set DestroyEvent 1
}
  append body $rawbody
  ::oo::define [current_class] destructor $body
}
proc ::clay::define::Dict {name {values {}}} {
  set class [current_class]
  set name [string trim $name :/]
  $class clay branch dict $name
  foreach {var val} $values {
    $class clay set dict/ $name/ $var $val
  }
}
proc ::clay::define::Option {name args} {
  set class [current_class]
  set dictargs {default {}}
  foreach {var val} [::clay::args_to_dict {*}$args] {
    dict set dictargs [string trim $var -:/] $val
  }
  set name [string trimleft $name -]

  ###
  # Option Class handling
  ###
  set optclass [dict getnull $dictargs class]
  if {$optclass ne {}} {
    foreach {f v} [$class clay find option_class $optclass] {
      if {![dict exists $dictargs $f]} {
        dict set dictargs $f $v
      }
    }
    if {$optclass eq "variable"} {
      variable $name [dict getnull $dictargs default]
    }
  }
  foreach {f v} $dictargs {
    $class clay set option $name $f $v
  }
}
proc ::clay::define::Method {name argstyle argspec body} {
  set class [current_class]
  set result {}
  switch $argstyle {
    dictargs {
      append result "::dictargs::parse \{$argspec\} \$args" \;
    }
  }
  append result $body
  oo::define $class method $name [list [list args [list dictargs $argspec]]] $result
}
proc ::clay::define::Option_Class {name args} {
  set class [current_class]
  set dictargs {default {}}
  set name [string trimleft $name -:]
  foreach {f v} [::clay::args_to_dict {*}$args] {
    $class clay set option_class $name [string trim $f -/:] $v
  }
}
proc ::clay::define::Variable {name {default {}}} {
  set class [current_class]
  set name [string trimright $name :/]
  $class clay set variable/ $name $default
}
::namespace eval ::clay::define {
}
proc ::clay::ensemble_methodbody {ensemble einfo} {
  set default standard
  set preamble {}
  set eswitch {}
  set Ensemble [string totitle $ensemble]
  if {$Ensemble eq "."} continue
  foreach {msubmethod minfo} [lsort -dictionary -stride 2 $einfo] {
    if {$msubmethod eq "."} continue
    if {![dict exists $minfo body:]} {
      continue
    }
    set submethod [string trim $msubmethod :/-]
    if {$submethod eq "default"} {
      set default [dict get $minfo body:]
    } else {
      dict set eswitch $submethod [dict get $minfo body:]
    }
    if {[dict exists $submethod aliases:]} {
      foreach alias [dict get $minfo aliases:] {
        if {![dict exists $eswitch $alias]} {
          dict set eswitch $alias [dict get $minfo body:]
        }
      }
    }
  }
  set methodlist [lsort -dictionary [dict keys $eswitch]]
  if {![dict exists $eswitch <list>]} {
    dict set eswitch <list> {return $methodlist}
  }
  if {$default eq "standard"} {
    set default "error \"unknown method $ensemble \$method. Valid: \$methodlist\""
  }
  dict set eswitch default $default
  set mbody {}
  append mbody \n [list set methodlist $methodlist]
  append mbody \n "switch -- \$method \{$eswitch\}" \n
  return $mbody
}
::proc ::clay::define::Ensemble {rawmethod args} {
  if {[llength $args]==2} {
    lassign $args argspec body
    set argstyle tcl
  } elseif {[llength $args]==3} {
    lassign $args argstyle argspec body
  } else {
    error "Usage: Ensemble name ?argstyle? argspec body"
  }
  set class [current_class]
  #if {$::clay::trace>2} {
  #  puts [list $class Ensemble $rawmethod $argspec $body]
  #}
  set mlist [split $rawmethod "::"]
  set ensemble [string trim [lindex $mlist 0] :/]
  set method   [string trim [lindex $mlist 2] :/]
  if {[string index $method 0] eq "_"} {
    $class clay set method_ensemble $ensemble $method $body
    return
  }
  set realmethod  [string totitle $ensemble]_${method}
  set realbody {}
  if {$argstyle eq "dictargs"} {
    append realbody "::dictargs::parse \{$argspec\} \$args" \n
  }
  if {[$class clay exists method_ensemble $ensemble _preamble]} {
    append realbody [$class clay get method_ensemble $ensemble _preamble] \n
  }
  append realbody $body
  if {$method eq "default"} {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod \$method {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::define $class method $realmethod [list method [list args $argspec]] $realbody
    } else {
      oo::define $class method $realmethod [list method {*}$argspec] $realbody
    }
  } else {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::define $class method $realmethod [list [list args $argspec]] $realbody
    } else {
      oo::define $class method $realmethod $argspec $realbody
    }
  }
  if {$::clay::trace>2} {
    puts [list $class clay set method_ensemble/ $ensemble [string trim $method :/]  ...]
  }
}
::oo::define ::clay::class {
  method clay {submethod args} {
    my variable clay
    if {![info exists clay]} {
      set clay {}
    }
    switch $submethod {
      ancestors {
        tailcall ::clay::ancestors [self]
      }
      branch {
        set path [::clay::tree::storage $args]
        if {![dict exists $clay {*}$path .]} {
          dict set clay {*}$path . {}
        }
      }
      exists {
        if {![info exists clay]} {
          return 0
        }
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return 1
        }
        if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
          return 1
        }
        return 0
      }
      dump {
        return $clay
      }
      dget {
         if {![info exists clay]} {
          return {}
        }
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
          return [dict get $clay {*}[lrange $path 0 end-1] [lindex $path end]:]
        }
        return {}
      }
      is_branch {
        set path [::clay::tree::storage $args]
        return [dict exists $clay {*}$path .]
      }
      getnull -
      get {
        if {![info exists clay]} {
          return {}
        }
        set path [::clay::tree::storage $args]
        if {[llength $path]==0} {
          return $clay
        }
        if {[dict exists $clay {*}$path .]} {
          return [::clay::tree::sanitize [dict get $clay {*}$path]]
        }
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
          return [dict get $clay {*}[lrange $path 0 end-1] [lindex $path end]:]
        }
        return {}
      }
      find {
        set path [::clay::tree::storage $args]
        if {![info exists clay]} {
          set clay {}
        }
        set clayorder [::clay::ancestors [self]]
        set found 0
        if {[llength $path]==0} {
          set result [dict create . {}]
          foreach class $clayorder {
            ::clay::tree::dictmerge result [$class clay dump]
          }
          return [::clay::tree::sanitize $result]
        }
        foreach class $clayorder {
          if {[$class clay exists {*}$path .]} {
            # Found a branch break
            set found 1
            break
          }
          if {[$class clay exists {*}$path]} {
            # Found a leaf. Return that value immediately
            return [$class clay get {*}$path]
          }
          if {[dict exists $clay {*}[lrange $path 0 end-1] [lindex $path end]:]} {
            return [dict get $clay {*}[lrange $path 0 end-1] [lindex $path end]:]
          }
        }
        if {!$found} {
          return {}
        }
        set result {}
        # Leaf searches return one data field at a time
        # Search in our local dict
        # Search in the in our list of classes for an answer
        foreach class [lreverse $clayorder] {
          ::clay::tree::dictmerge result [$class clay dget {*}$path]
        }
        return [::clay::tree::sanitize $result]
      }
      merge {
        foreach arg $args {
          ::clay::tree::dictmerge clay {*}$arg
        }
      }
      noop {
        # Do nothing. Used as a sign of clay savviness
      }
      search {
        foreach aclass [::clay::ancestors [self]] {
          if {[$aclass clay exists {*}$args]} {
            return [$aclass clay get {*}$args]
          }
        }
      }
      set {
        ::clay::tree::dictset clay {*}$args
      }
      unset {
        dict unset clay {*}$args
      }
      default {
        dict $submethod clay {*}$args
      }
    }
  }
}
::oo::define ::clay::object {
  method clay {submethod args} {
    my variable clay claycache clayorder config option_canonical
    if {![info exists clay]} {set clay {}}
    if {![info exists claycache]} {set claycache {}}
    if {![info exists config]} {set config {}}
    if {![info exists clayorder] || [llength $clayorder]==0} {
      set clayorder {}
      if {[dict exists $clay cascade]} {
        dict for {f v} [dict get $clay cascade] {
          if {$f eq "."} continue
          if {[info commands $v] ne {}} {
            lappend clayorder $v
          }
        }
      }
      lappend clayorder {*}[::clay::ancestors [info object class [self]] {*}[lreverse [info object mixins [self]]]]
    }
    switch $submethod {
      ancestors {
        return $clayorder
      }
      branch {
        set path [::clay::tree::storage $args]
        if {![dict exists $clay {*}$path .]} {
          dict set clay {*}$path . {}
        }
      }
      busy {
        my variable clay_busy
        if {[llength $args]} {
          set clay_busy [string is true [lindex $args 0]]
          set claycache {}
        }
        if {![info exists clay_busy]} {
          set clay_busy 0
        }
        return $clay_busy
      }
      cache {
        set path [lindex $args 0]
        set value [lindex $args 1]
        dict set claycache $path $value
      }
      cget {
        # Leaf searches return one data field at a time
        # Search in our local dict
        if {[llength $args]==1} {
          set field [string trim [lindex $args 0] -:/]
          if {[info exists option_canonical($field)]} {
            set field $option_canonical($field)
          }
          if {[dict exists $config $field]} {
            return [dict get $config $field]
          }
        }
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[dict exists $claycache {*}$path]} {
          if {[dict exists $claycache {*}$path .]} {
            return [dict remove [dict get $claycache {*}$path] .]
          } else {
            return [dict get $claycache {*}$path]
          }
        }
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          if {[$class clay exists {*}$path]} {
            set value [$class clay get {*}$path]
            dict set claycache {*}$path $value
            return $value
          }
          if {[$class clay exists const {*}$path]} {
            set value [$class clay get const {*}$path]
            dict set claycache {*}$path $value
            return $value
          }
          if {[$class clay exists option {*}$path default]} {
            set value [$class clay get option {*}$path default]
            dict set claycache {*}$path $value
            return $value
          }
        }
        return {}
      }
      delegate {
        if {![dict exists $clay .delegate <class>]} {
          dict set clay .delegate <class> [info object class [self]]
        }
        if {[llength $args]==0} {
          return [dict get $clay .delegate]
        }
        if {[llength $args]==1} {
          set stub <[string trim [lindex $args 0] <>]>
          if {![dict exists $clay .delegate $stub]} {
            return {}
          }
          return [dict get $clay .delegate $stub]
        }
        if {([llength $args] % 2)} {
          error "Usage: delegate
    OR
    delegate stub
    OR
    delegate stub OBJECT ?stub OBJECT? ..."
        }
        foreach {stub object} $args {
          set stub <[string trim $stub <>]>
          dict set clay .delegate $stub $object
          oo::objdefine [self] forward ${stub} $object
          oo::objdefine [self] export ${stub}
        }
      }
      dump {
        # Do a full dump of clay data
        set result {}
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          ::clay::tree::dictmerge result [$class clay dump]
        }
        ::clay::tree::dictmerge result $clay
        return $result
      }
      ensemble_map {
        set path [::clay::tree::storage method_ensemble]
        if {[dict exists $claycache {*}$path]} {
          return [dict get $claycache {*}$path]
        }
        set emap {}
        foreach class $clayorder {
          if {![$class clay exists {*}$path .]} continue
          dict for {ensemble einfo} [$class clay dget {*}$path] {
            if {$ensemble eq "."} continue
            dict for {method body} $einfo {
              if {$method eq "."} continue
              dict set emap $ensemble $method class: $class
              dict set emap $ensemble $method body: $body
            }
          }
        }
        if {[dict exists $clay {*}$path]} {
          dict for {ensemble einfo} [dict get $clay {*}$path] {
            dict for {method body} $einfo {
              if {$method eq "."} continue
              dict set emap $ensemble $method class: $class
              dict set emap $ensemble $method body: $body
            }
          }
        }
        dict set claycache {*}$path $emap
        return $emap
      }
      eval {
        set script [lindex $args 0]
        set buffer {}
        set thisline {}
        foreach line [split $script \n] {
          append thisline $line
          if {![info complete $thisline]} {
            append thisline \n
            continue
          }
          set thisline [string trim $thisline]
          if {[string index $thisline 0] eq "#"} continue
          if {[string length $thisline]==0} continue
          if {[lindex $thisline 0] eq "my"} {
            # Line already calls out "my", accept verbatim
            append buffer $thisline \n
          } elseif {[string range $thisline 0 2] eq "::"} {
            # Fully qualified commands accepted verbatim
            append buffer $thisline \n
          } elseif {
            append buffer "my $thisline" \n
          }
          set thisline {}
        }
        eval $buffer
      }
      evolve -
      initialize {
        my InitializePublic
      }
      exists {
        # Leaf searches return one data field at a time
        # Search in our local dict
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path]} {
          return 1
        }
        # Search in our local cache
        if {[dict exists $claycache {*}$path]} {
          return 2
        }
        set count 2
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          incr count
          if {[$class clay exists {*}$path]} {
            return $count
          }
        }
        return 0
      }
      flush {
        set claycache {}
        set clayorder [::clay::ancestors [info object class [self]] {*}[lreverse [info object mixins [self]]]]
      }
      forward {
        oo::objdefine [self] forward {*}$args
      }
      dget {
        set path [::clay::tree::storage $args]
        if {[llength $path]==0} {
          # Do a full dump of clay data
          set result {}
          # Search in the in our list of classes for an answer
          foreach class $clayorder {
            ::clay::tree::dictmerge result [$class clay dump]
          }
          ::clay::tree::dictmerge result $clay
          return $result
        }
        if {[dict exists $clay {*}$path] && ![dict exists $clay {*}$path .]} {
          # Path is a leaf
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[my clay search $path value isleaf]} {
          return $value
        }

        set found 0
        set branch [dict exists $clay {*}$path .]
        foreach class $clayorder {
          if {[$class clay exists {*}$path .]} {
            set found 1
            break
          }
          if {!$branch && [$class clay exists {*}$path]} {
            set result [$class clay dget {*}$path]
            my clay cache $path $result
            return $result
          }
        }
        # Path is a branch
        set result [dict getnull $clay {*}$path]
        foreach class $clayorder {
          if {![$class clay exists {*}$path .]} continue
          ::clay::tree::dictmerge result [$class clay dget {*}$path]
        }
        #if {[dict exists $clay {*}$path .]} {
        #  ::clay::tree::dictmerge result
        #}
        my clay cache $path $result
        return $result
      }
      getnull -
      get {
        set path [::clay::tree::storage $args]
        if {[llength $path]==0} {
          # Do a full dump of clay data
          set result {}
          # Search in the in our list of classes for an answer
          foreach class $clayorder {
            ::clay::tree::dictmerge result [$class clay dump]
          }
          ::clay::tree::dictmerge result $clay
          return [::clay::tree::sanitize $result]
        }
        if {[dict exists $clay {*}$path] && ![dict exists $clay {*}$path .]} {
          # Path is a leaf
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[my clay search $path value isleaf]} {
          if {!$isleaf} {
            return [clay::tree::sanitize $value]
          } else {
            return $value
          }
        }
        set found 0
        set branch [dict exists $clay {*}$path .]
        foreach class $clayorder {
          if {[$class clay exists {*}$path .]} {
            set found 1
            break
          }
          if {!$branch && [$class clay exists {*}$path]} {
            set result [$class clay dget {*}$path]
            my clay cache $path $result
            return $result
          }
        }
        # Path is a branch
        set result [dict getnull $clay {*}$path]
        #foreach class [lreverse $clayorder] {
        #  if {![$class clay exists {*}$path .]} continue
        #  ::clay::tree::dictmerge result [$class clay dget {*}$path]
        #}
        foreach class $clayorder {
          if {![$class clay exists {*}$path .]} continue
          ::clay::tree::dictmerge result [$class clay dget {*}$path]
        }
        #if {[dict exists $clay {*}$path .]} {
        #  ::clay::tree::dictmerge result [dict get $clay {*}$path]
        #}
        my clay cache $path $result
        return [clay::tree::sanitize $result]
      }
      leaf {
        # Leaf searches return one data field at a time
        # Search in our local dict
        set path [::clay::tree::storage $args]
        if {[dict exists $clay {*}$path .]} {
          return [clay::tree::sanitize [dict get $clay {*}$path]]
        }
        if {[dict exists $clay {*}$path]} {
          return [dict get $clay {*}$path]
        }
        # Search in our local cache
        if {[my clay search $path value isleaf]} {
          if {!$isleaf} {
            return [clay::tree::sanitize $value]
          } else {
            return $value
          }
        }
        # Search in the in our list of classes for an answer
        foreach class $clayorder {
          if {[$class clay exists {*}$path]} {
            set value [$class clay get {*}$path]
            my clay cache $path $value
            return $value
          }
        }
      }
      merge {
        foreach arg $args {
          ::clay::tree::dictmerge clay {*}$arg
        }
      }
      mixin {
        ###
        # Mix in the class
        ###
        my clay flush
        set prior  [info object mixins [self]]
        set newmixin {}
        foreach item $args {
          lappend newmixin ::[string trimleft $item :]
        }
        set newmap $args
        foreach class $prior {
          if {$class ni $newmixin} {
            set script [$class clay search mixin/ unmap-script]
            if {[string length $script]} {
              if {[catch $script err errdat]} {
                puts stderr "[self] MIXIN ERROR POPPING $class:\n[dict get $errdat -errorinfo]"
              }
            }
          }
        }
        ::oo::objdefine [self] mixin {*}$args
        ###
        # Build a compsite map of all ensembles defined by the object's current
        # class as well as all of the classes being mixed in
        ###
        my InitializePublic
        foreach class $newmixin {
          if {$class ni $prior} {
            set script [$class clay search mixin/ map-script]
            if {[string length $script]} {
              if {[catch $script err errdat]} {
                puts stderr "[self] MIXIN ERROR PUSHING $class:\n[dict get $errdat -errorinfo]"
              }
            }
          }
        }
        foreach class $newmixin {
          set script [$class clay search mixin/ react-script]
          if {[string length $script]} {
            if {[catch $script err errdat]} {
              puts stderr "[self] MIXIN ERROR PEEKING $class:\n[dict get $errdat -errorinfo]"
            }
            break
          }
        }
      }
      mixinmap {
        if {![dict exists $clay .mixin]} {
          dict set clay .mixin {}
        }
        if {[llength $args]==0} {
          return [dict get $clay .mixin]
        } elseif {[llength $args]==1} {
          return [dict getnull $clay .mixin [lindex $args 0]]
        } else {
          dict for {slot classes} $args {
            dict set clay .mixin $slot $classes
          }
          set classlist {}
          dict for {item class} [dict get $clay .mixin] {
            if {$class ne {}} {
              lappend classlist $class
            }
          }
          my clay mixin {*}[lreverse $classlist]
        }
      }
      provenance {
        if {[dict exists $clay {*}$args]} {
          return self
        }
        foreach class $clayorder {
          if {[$class clay exists {*}$args]} {
            return $class
          }
        }
        return {}
      }
      refcount {
        my variable refcount
        if {![info exists refcount]} {
          return 0
        }
        return $refcount
      }
      refcount_incr {
        my variable refcount
        incr refcount
      }
      refcount_decr {
        my variable refcount
        incr refcount -1
        if {$refcount <= 0} {
          ::clay::object_destroy [self]
        }
      }
      replace {
        set clay [lindex $args 0]
      }
      search {
        set path [lindex $args 0]
        upvar 1 [lindex $args 1] value [lindex $args 2] isleaf
        set isleaf [expr {![dict exists $claycache $path .]}]
        if {[dict exists $claycache $path]} {
          set value [dict get $claycache $path]
          return 1
        }
        return 0
      }
      source {
        source [lindex $args 0]
      }
      set {
        #puts [list [self] clay SET {*}$args]
        ::clay::tree::dictset clay {*}$args
      }
      default {
        dict $submethod clay {*}$args
      }
    }
  }
  method InitializePublic {} {
    my variable clayorder clay claycache config option_canonical clay_busy
    if {[info exists clay_busy] && $clay_busy} {
      # Avoid repeated calls to InitializePublic if we know that someone is
      # going to invoke it at the end of whatever process is going on
      return
    }
    set claycache {}
    set clayorder [::clay::ancestors [info object class [self]] {*}[lreverse [info object mixins [self]]]]
    if {![info exists clay]} {
      set clay {}
    }
    if {![info exists config]} {
      set config {}
    }
    dict for {var value} [my clay get variable] {
      if { $var in {. clay} } continue
      set var [string trim $var :/]
      my variable $var
      if {![info exists $var]} {
        if {$::clay::trace>2} {puts [list initialize variable $var $value]}
        set $var $value
      }
    }
    dict for {var value} [my clay get dict/] {
      if { $var in {. clay} } continue
      set var [string trim $var :/]
      my variable $var
      if {![info exists $var]} {
        set $var {}
      }
      foreach {f v} $value {
        if {$f eq "."} continue
        if {![dict exists ${var} $f]} {
          if {$::clay::trace>2} {puts [list initialize dict $var $f $v]}
          dict set ${var} $f $v
        }
      }
    }
    foreach {var value} [my clay get array/] {
      if { $var in {. clay} } continue
      set var [string trim $var :/]
      if { $var eq {clay} } continue
      my variable $var
      if {![info exists $var]} { array set $var {} }
      foreach {f v} $value {
        if {![array exists ${var}($f)]} {
          if {$f eq "."} continue
          if {$::clay::trace>2} {puts [list initialize array $var\($f\) $v]}
          set ${var}($f) $v
        }
      }
    }
    foreach {field info} [my clay get option/] {
      if { $field in {. clay} } continue
      set field [string trim $field -/:]
      foreach alias [dict getnull $info aliases] {
        set option_canonical($alias) $field
      }
      if {[dict exists $config $field]} continue
      set getcmd [dict getnull $info default-command]
      if {$getcmd ne {}} {
        set value [{*}[string map [list %field% $field %self% [namespace which my]] $getcmd]]
      } else {
        set value [dict getnull $info default]
      }
      dict set config $field $value
      set setcmd [dict getnull $info set-command]
      if {$setcmd ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $value] %self% [namespace which my]] $setcmd]
      }
    }

    foreach {ensemble einfo} [my clay ensemble_map] {
      #if {[dict exists $einfo _body]} continue
      if {$ensemble eq "."} continue
      set body [::clay::ensemble_methodbody $ensemble $einfo]
      if {$::clay::trace>2} {
        set rawbody $body
        set body {puts [list [self] <object> [self method]]}
        append body \n $rawbody
      }
      oo::objdefine [self] method $ensemble {{method default} args} $body
    }
  }
}
::clay::object clay branch array
::clay::object clay branch mixin
::clay::object clay branch option
::clay::object clay branch dict clay
::clay::object clay set variable DestroyEvent 0
proc ::clay::singleton {name script} {
  if {[info commands $name] eq {}} {
    ::clay::object create $name
  }
  oo::objdefine $name {
method SingletonProcs {} {
proc class class {
  uplevel 1 "oo::objdefine \[self\] class $class"
  my clay delegate class $class
}
proc clay args {
  my clay {*}$args
}
proc Ensemble {rawmethod args} {
  if {[llength $args]==2} {
    lassign $args argspec body
    set argstyle tcl
  } elseif {[llength $args]==3} {
    lassign $args argstyle argspec body
  } else {
    error "Usage: Ensemble name ?argstyle? argspec body"
  }
  set class [uplevel 1 self]
  #if {$::clay::trace>2} {
  #  puts [list $class Ensemble $rawmethod $argspec $body]
  #}
  set mlist [split $rawmethod "::"]
  set ensemble [string trim [lindex $mlist 0] :/]
  set method   [string trim [lindex $mlist 2] :/]
  if {[string index $method 0] eq "_"} {
    $class clay set method_ensemble $ensemble $method $body
    return
  }
  set realmethod  [string totitle $ensemble]_${method}
  set realbody {}
  if {$argstyle eq "dictargs"} {
    append realbody "::dictargs::parse \{$argspec\} \$args" \n
  }
  if {[$class clay exists method_ensemble $ensemble _preamble]} {
    append realbody [$class clay get method_ensemble $ensemble _preamble] \n
  }
  append realbody $body
  if {$method eq "default"} {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod \$method {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::objdefine $class method $realmethod [list method [list args $argspec]] $realbody
    } else {
      oo::objdefine $class method $realmethod [list method {*}$argspec] $realbody
    }
  } else {
    $class clay set method_ensemble $ensemble $method: "tailcall my $realmethod {*}\$args"
    if {$argstyle eq "dictargs"} {
      oo::objdefine $class method $realmethod [list [list args $argspec]] $realbody
    } else {
      oo::objdefine $class method $realmethod $argspec $realbody
    }
  }
  if {$::clay::trace>2} {
    puts [list $class clay set method_ensemble/ $ensemble [string trim $method :/]  ...]
  }
}
proc method args {
  uplevel 1 "oo::objdefine \[self\] method {*}$args"
}
}
method script script {
  my clay busy 1
  my SingletonProcs
  eval $script
  my clay busy 0
  my InitializePublic
}
}
  $name script $script
  return $name
}
namespace eval ::clay {
  namespace export *
}

###
# END: clay/clay.tcl
###
###
# START: setup.tcl
###
package require TclOO
set tcllib_path {}
foreach path {.. ../.. ../../..} {
  foreach path [glob -nocomplain [file join [file normalize $path] tcllib* modules]] {
    set tclib_path $path
    lappend ::auto_path $path
    break
  }
  if {$tcllib_path ne {}} break
}
namespace eval ::practcl {
}
namespace eval ::practcl::OBJECT {
}

###
# END: setup.tcl
###
###
# START: doctool.tcl
###
namespace eval ::practcl {
}
proc ::practcl::cat fname {
    if {![file exists $fname]} {
       return
    }
    set fin [open $fname r]
    set data [read $fin]
    close $fin
    return $data
}
proc ::practcl::docstrip text {
  set result {}
  foreach line [split $text \n] {
    append thisline $line \n
    if {![info complete $thisline]} continue
    set outline $thisline
    set thisline {}
    if {[string trim $outline] eq {}} {
      continue
    }
    if {[string index [string trim $outline] 0] eq "#"} continue
    set cmd [string trim [lindex $outline 0] :]
    if {$cmd eq "namespace" && [lindex $outline 1] eq "eval"} {
      append result [list {*}[lrange $outline 0 end-1]] " " \{ \n [docstrip [lindex $outline end]]\} \n
      continue
    }
    if {[string match "*::define" $cmd] && [llength $outline]==3} {
      append result [list {*}[lrange $outline 0 end-1]] " " \{ \n [docstrip [lindex $outline end]]\} \n
      continue
    }
    if {$cmd eq "oo::class" && [lindex $outline 1] eq "create"} {
      append result [list {*}[lrange $outline 0 end-1]] " " \{ \n [docstrip [lindex $outline end]]\} \n
      continue
    }
    append result $outline
  }
  return $result
}
proc ::putb {buffername args} {
  upvar 1 $buffername buffer
  switch [llength $args] {
    1 {
      append buffer [lindex $args 0] \n
    }
    2 {
      append buffer [string map {*}$args] \n
    }
    default {
      error "usage: putb buffername ?map? string"
    }
  }
}
::oo::class create ::practcl::doctool {
  constructor {} {
    my reset
  }
  method argspec {argspec} {
    set result [dict create]
    foreach arg $argspec {
      set name [lindex $arg 0]
      dict set result $name positional 1
      dict set result $name mandatory  1
      if {$name in {args dictargs}} {
        switch [llength $arg] {
          1 {
            dict set result $name mandatory 0
          }
          2 {
            dict for {optname optinfo} [lindex $arg 1] {
              set optname [string trim $optname -:]
              dict set result $optname {positional 1 mandatory 0}
              dict for {f v} $optinfo {
                dict set result $optname [string trim $f -:] $v
              }
            }
          }
          default {
            error "Bad argument"
          }
        }
      } else {
        switch [llength $arg] {
          1 {
            dict set result $name mandatory 1
          }
          2 {
            dict set result $name mandatory 0
            dict set result $name default   [lindex $arg 1]
          }
          default {
            error "Bad argument"
          }
        }
      }
    }
    return $result
  }
  method comment block {
    set count 0
    set field description
    set result [dict create description {}]
    foreach line [split $block \n] {
      set sline [string trim $line]
      set fwidx [string first " " $sline]
      if {$fwidx < 0} {
        set firstword [string range $sline 0 end]
        set restline {}
      } else {
        set firstword [string range $sline 0 [expr {$fwidx-1}]]
        set restline [string range $sline [expr {$fwidx+1}] end]
      }
      if {[string index $firstword end] eq ":"} {
        set field [string tolower [string trim $firstword -:]]
        switch $field {
          dictargs -
          arglist {
            set field argspec
          }
          desc {
            set field description
          }
        }
        if {[string length $restline]} {
          dict append result $field "$restline\n"
        }
      } else {
        dict append result $field "$line\n"
      }
    }
    return $result
  }
  method keyword.Annotation {resultvar commentblock type name body} {
    upvar 1 $resultvar result
    set name [string trim $name :]
    if {[dict exists $result $type $name]} {
      set info [dict get $result $type $name]
    } else {
      set info [my comment $commentblock]
    }
    foreach {f v} $body {
      dict set info $f $v
    }
    dict set result $type $name $info
  }
  method keyword.Class {resultvar commentblock name body} {
    upvar 1 $resultvar result
    set name [string trim $name :]
    if {[dict exists $result class $name]} {
      set info [dict get $result class $name]
    } else {
      set info [my comment $commentblock]
    }
    set commentblock {}
    foreach line [split $body \n] {
      append thisline $line \n
      if {![info complete $thisline]} continue
      set thisline [string trim $thisline]
      if {[string index $thisline 0] eq "#"} {
        append commentblock [string trimleft $thisline #] \n
        set thisline {}
        continue
      }
      set cmd [string trim [lindex $thisline 0] ":"]
      switch $cmd {
        Option -
        option {
          my keyword.Annotation info $commentblock option [lindex $thisline 1] [lindex $thisline 2]
          set commentblock {}
        }
        variable -
        Variable {
          my keyword.Annotation info $commentblock variable [lindex $thisline 1] [list type scaler default [lindex $thisline 2]]
          set commentblock {}
        }
        Dict -
        Array {
          set iinfo [lindex $thisline 2]
          dict set iinfo type [string tolower $cmd]
          my keyword.Annotation info $commentblock variable [lindex $thisline 1] $iinfo
          set commentblock {}
        }
        Componant -
        Delegate {
          my keyword.Annotation info $commentblock delegate [lindex $thisline 1] [lindex $thisline 2]
          set commentblock {}
        }
        method -
        Ensemble {
          my keyword.Class_Method info $commentblock  {*}[lrange $thisline 1 end-1]
          set commentblock {}
        }
      }
      set thisline {}
    }
    dict set result class $name $info
  }
  method keyword.class {resultvar commentblock name body} {
    upvar 1 $resultvar result
    set name [string trim $name :]
    if {[dict exists $result class $name]} {
      set info [dict get $result class $name]
    } else {
      set info [my comment $commentblock]
    }
    set commentblock {}
    foreach line [split $body \n] {
      append thisline $line \n
      if {![info complete $thisline]} continue
      set thisline [string trim $thisline]
      if {[string index $thisline 0] eq "#"} {
        append commentblock [string trimleft $thisline #] \n
        set thisline {}
        continue
      }
      set cmd [string trim [lindex $thisline 0] ":"]
      switch $cmd {
        Option -
        option {
          puts [list keyword.Annotation $cmd $thisline]
          my keyword.Annotation info $commentblock option [lindex $thisline 1] [lindex $thisline 2]
          set commentblock {}
        }
        variable -
        Variable {
          my keyword.Annotation info $commentblock variable [lindex $thisline 1] [list default [lindex $thisline 2]]
          set commentblock {}
        }
        Dict -
        Array {
          set iinfo [lindex $thisline 2]
          dict set iinfo type [string tolower $cmd]
          my keyword.Annotation info $commentblock variable [lindex $thisline 1] $iinfo
          set commentblock {}
        }
        Componant -
        Delegate {
          my keyword.Annotation info $commentblock delegate [lindex $thisline 1] [lindex $thisline 2]
          set commentblock {}
        }
        superclass {
          dict set info ancestors [lrange $thisline 1 end]
          set commentblock {}
        }
        classmethod -
        class_method -
        Class_Method {
          my keyword.Class_Method info $commentblock  {*}[lrange $thisline 1 end-1]
          set commentblock {}
        }
        destructor -
        constructor {
          my keyword.method info $commentblock {*}[lrange $thisline 0 end-1]
          set commentblock {}
        }
        method -
        Ensemble {
          my keyword.method info $commentblock  {*}[lrange $thisline 1 end-1]
          set commentblock {}
        }
      }
      set thisline {}
    }
    dict set result class $name $info
  }
  method keyword.Class_Method {resultvar commentblock name args} {
    upvar 1 $resultvar result
    set info [my comment $commentblock]
    if {[dict exists $info show_body] && [dict get $info show_body]} {
      dict set info internals [lindex $args end]
    }
    if {[dict exists $info ensemble]} {
      dict for {method minfo} [dict get $info ensemble] {
        dict set result Class_Method "${name} $method" $minfo
      }
    } else {
      switch [llength $args] {
        1 {
          set argspec [lindex $args 0]
        }
        0 {
          set argspec dictargs
          #set body [lindex $args 0]
        }
        default {error "could not interpret method $name {*}$args"}
      }
      if {![dict exists $info argspec]} {
        dict set info argspec [my argspec $argspec]
      }
      dict set result Class_Method [string trim $name :] $info
    }
  }
  method keyword.method {resultvar commentblock name args} {
    upvar 1 $resultvar result
    set info [my comment $commentblock]
    if {[dict exists $info show_body] && [dict get $info show_body]} {
      dict set info internals [lindex $args end]
    }
    if {[dict exists $info ensemble]} {
      dict for {method minfo} [dict get $info ensemble] {
        dict set result method "\"${name} $method\"" $minfo
      }
    } else {
      switch [llength $args] {
        1 {
          set argspec [lindex $args 0]
        }
        0 {
          set argspec dictargs
          #set body [lindex $args 0]
        }
        default {error "could not interpret method $name {*}$args"}
      }
      if {![dict exists $info argspec]} {
        dict set info argspec [my argspec $argspec]
      }
      dict set result method "\"[split [string trim $name :] ::]\"" $info
    }
  }
  method keyword.proc {commentblock name argspec} {
    set info [my comment $commentblock]
    if {![dict exists $info argspec]} {
      dict set info argspec [my argspec $argspec]
    }
    return $info
  }
  method reset {} {
    my variable coro
    set coro [info object namespace [self]]::coro
    oo::objdefine [self] forward coro $coro
    if {[info command $coro] ne {}} {
      rename $coro {}
    }
    coroutine $coro {*}[namespace code {my Main}]
  }
  method Main {} {

    my variable info
    set info [dict create]
    yield [info coroutine]
    set thisline {}
    set commentblock {}
    set linec 0
    while 1 {
      set line [yield]
      append thisline $line \n
      if {![info complete $thisline]} continue
      set thisline [string trim $thisline]
      if {[string index $thisline 0] eq "#"} {
        append commentblock [string trimleft $thisline #] \n
        set thisline {}
        continue
      }
      set cmd [string trim [lindex $thisline 0] ":"]
      switch $cmd {
        dictargs::proc {
          set procinfo [my keyword.proc $commentblock [lindex $thisline 1] [list args [list dictargs [lindex $thisline 2]]]]
          if {[dict exists $procinfo show_body] && [dict get $procinfo show_body]} {
            dict set procinfo internals [lindex $thisline end]
          }
          dict set info proc [string trim [lindex $thisline 1] :] $procinfo
          set commentblock {}
        }
        tcllib::PROC -
        PROC -
        Proc -
        proc {
          set procinfo [my keyword.proc $commentblock {*}[lrange $thisline 1 2]]
          if {[dict exists $procinfo show_body] && [dict get $procinfo show_body]} {
            dict set procinfo internals [lindex $thisline end]
          }
          dict set info proc [string trim [lindex $thisline 1] :] $procinfo
          set commentblock {}
        }
        oo::objdefine {
          if {[llength $thisline]==3} {
            lassign $thisline tcmd name body
            my keyword.Class info $commentblock $name $body
          } else {
            puts "Warning: bare oo::define in library"
          }
        }
        oo::define {
          if {[llength $thisline]==3} {
            lassign $thisline tcmd name body
            my keyword.class info $commentblock $name $body
          } else {
            puts "Warning: bare oo::define in library"
          }
        }
        tao::define -
        clay::define -
        tool::define {
          lassign $thisline tcmd name body
          my keyword.class info $commentblock $name $body
          set commentblock {}
        }
        oo::class {
          lassign $thisline tcmd mthd name body
          my keyword.class info $commentblock $name $body
          set commentblock {}
        }
        default {
          if {[lindex [split $cmd ::] end] eq "define"} {
            lassign $thisline tcmd name body
            my keyword.class info $commentblock $name $body
            set commentblock {}
          }
          set commentblock {}
        }
      }
      set thisline {}
    }
  }
  method section.method {keyword method minfo} {
    set result {}
    set line "\[call $keyword \[cmd $method\]"
    if {[dict exists $minfo argspec]} {
      dict for {argname arginfo} [dict get $minfo argspec] {
        set positional 1
        set mandatory  1
        set repeating 0
        dict with arginfo {}
        if {$mandatory==0} {
          append line " \[opt \""
        } else {
          append line " "
        }
        if {$positional} {
          append line "\[arg $argname"
        } else {
          append line "\[option \"$argname"
          if {[dict exists $arginfo type]} {
            append line " \[emph [dict get $arginfo type]\]"
          } else {
            append line " \[emph value\]"
          }
          append line "\""
        }
        append line "\]"
        if {$mandatory==0} {
          if {[dict exists $arginfo default]} {
            append line " \[const \"[dict get $arginfo default]\"\]"
          }
          append line "\"\]"
        }
        if {$repeating} {
          append line " \[opt \[option \"$argname...\"\]\]"
        }
      }
    }
    append line \]
    putb result $line
    if {[dict exists $minfo description]} {
      putb result [dict get $minfo description]
    }
    if {[dict exists $minfo example]} {
      putb result "\[para\]Example: \[example [list [dict get $minfo example]]\]"
    }
    if {[dict exists $minfo internals]} {
      putb result "\[para\]Internals: \[example [list [dict get $minfo internals]]\]"
    }
    return $result
  }
  method section.annotation {type name iinfo} {
    set result "\[call $type \[cmd $name\]\]"
    if {[dict exists $iinfo description]} {
      putb result [dict get $iinfo description]
    }
    if {[dict exists $iinfo example]} {
      putb result "\[para\]Example: \[example [list [dict get $minfo example]]\]"
    }
    return $result
  }
  method section.class {class_name class_info} {
    set result {}
    putb result "\[subsection \{Class  $class_name\}\]"
    if {[dict exists $class_info ancestors]} {
      set line "\[emph \"ancestors\"\]:"
      foreach {c} [dict get $class_info ancestors] {
        append line " \[class [string trim $c :]\]"
      }
      putb result $line
      putb result {[para]}
    }
    dict for {f v} $class_info {
      if {$f in {Class_Method method description ancestors example option variable delegate}} continue
      putb result "\[emph \"$f\"\]: $v"
      putb result {[para]}
    }
    if {[dict exists $class_info example]} {
      putb result "\[example \{[list [dict get $class_info example]]\}\]"
      putb result {[para]}
    }
    if {[dict exists $class_info description]} {
      putb result [dict get $class_info description]
      putb result {[para]}
    }
    dict for {f v} $class_info {
      if {$f ni {option variable delegate}} continue
      putb result "\[class \{[string totitle $f]\}\]"
      #putb result "Methods on the class object itself."
      putb result {[list_begin definitions]}
      dict for {item iinfo} [dict get $class_info $f] {
        putb result [my section.annotation $f $item $iinfo]
      }
      putb result {[list_end]}
      putb result {[para]}
    }
    if {[dict exists $class_info Class_Method]} {
      putb result "\[class \{Class Methods\}\]"
      #putb result "Methods on the class object itself."
      putb result {[list_begin definitions]}
      dict for {method minfo} [dict get $class_info Class_Method] {
        putb result [my section.method classmethod $method $minfo]
      }
      putb result {[list_end]}
      putb result {[para]}
    }
    if {[dict exists $class_info method]} {
      putb result "\[class {Methods}\]"
      putb result {[list_begin definitions]}
      dict for {method minfo} [dict get $class_info method] {
        putb result [my section.method method $method $minfo]
      }
      putb result {[list_end]}
      putb result {[para]}
    }
    return $result
  }
  method section.command {procinfo} {
    set result {}
    putb result "\[section \{Commands\}\]"
    putb result {[list_begin definitions]}
    dict for {method minfo} $procinfo {
      putb result [my section.method proc $method $minfo]
    }
    putb result {[list_end]}
    return $result
  }
  method manpage args {
    my variable info
    set map {%version% 0.0 %module% {Your_Module_Here}}
    set result {}
    set header {}
    set footer {}
    set authors {}
    dict with args {}
    dict set map %keyword% comment
    putb result $map {[%keyword% {-*- tcl -*- doctools manpage}]
[vset PACKAGE_VERSION %version%]
[manpage_begin %module% n [vset PACKAGE_VERSION]]}
    putb result $map $header

    dict for {sec_type sec_info} $info {
      switch $sec_type {
        proc {
          putb result [my section.command $sec_info]
        }
        class {
          putb result "\[section Classes\]"
          dict for {class_name class_info} $sec_info {
            putb result [my section.class $class_name $class_info]
          }
        }
        default {
          putb result "\[section [list $sec_type $sec_name]\]"
          if {[dict exists $sec_info description]} {
            putb result [dict get $sec_info description]
          }
        }
      }
    }
    if {[llength $authors]} {
      putb result {[section AUTHORS]}
      foreach {name email} $authors {
        putb result "$name \[uri mailto:$email\]\[para\]"
      }
    }
    putb result $footer
    putb result {[manpage_end]}
    return $result
  }
  method scan_text {text} {
    my variable linecount coro
    set linecount 0
    foreach line [split $text \n] {
      incr linecount
      $coro $line
    }
  }
  method scan_file {filename} {
    my variable linecount coro
    set fin [open $filename r]
    set linecount 0
    while {[gets $fin line]>=0} {
      incr linecount
      $coro $line
    }
    close $fin
  }
}

###
# END: doctool.tcl
###
###
# START: buildutil.tcl
###
proc Proc {name arglist body} {
  if {[info command $name] ne {}} return
  proc $name $arglist $body
}
Proc ::noop args {}
proc ::practcl::debug args {
  #puts $args
  ::practcl::cputs ::DEBUG_INFO $args
}




proc ::practcl::doexec args {
  puts [list {*}$args]
  exec {*}$args >&@ stdout
}
proc ::practcl::doexec_in {path args} {
  set PWD [pwd]
  cd $path
  puts [list {*}$args]
  exec {*}$args >&@ stdout
  cd $PWD
}
proc ::practcl::dotclexec args {
  puts [list [info nameofexecutable] {*}$args]
  exec [info nameofexecutable] {*}$args >&@ stdout
}

proc ::practcl::domake {path args} {
  set PWD [pwd]
  cd $path
  puts [list *** $path ***]
  puts [list make {*}$args]
  exec make {*}$args >&@ stdout
  cd $PWD
}

proc ::practcl::domake.tcl {path args} {
  set PWD [pwd]
  cd $path
  puts [list *** $path ***]
  puts [list make.tcl {*}$args]
  exec [info nameofexecutable] make.tcl {*}$args >&@ stdout
  cd $PWD
}

proc ::practcl::fossil {path args} {
  set PWD [pwd]
  cd $path
  puts [list {*}$args]
  exec fossil {*}$args >&@ stdout
  cd $PWD
}


proc ::practcl::fossil_status {dir} {
  if {[info exists ::fosdat($dir)]} {
    return $::fosdat($dir)
  }
  set result {
tags experimental
version {}
  }

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|



>
>
>
>
|



<
<
<
<
<
<
|
|



>
|







>
|







>
|






>
>
|







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
###




















































































































































































































































































































































































































































































































































































































































































































































































# Practcl




























# An object oriented templating system for stamping out Tcl API calls to C






###





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































package require TclOO


























































































































































































































































































































































































































































































































































































































































proc ::debug args {
  #puts $args
  ::practcl::cputs ::DEBUG_INFO $args
}

###
# Drop in a static copy of Tcl
###
proc ::doexec args {
  puts [list {*}$args]
  exec {*}$args >&@ stdout
}







proc ::dotclexec args {
  puts [list [info nameofexecutable] {*}$args]
  exec [info nameofexecutable] {*}$args >&@ stdout
}

proc ::domake {path args} {
  set PWD [pwd]
  cd $path
  puts [list *** $path ***]
  puts [list make {*}$args]
  exec make {*}$args >&@ stdout
  cd $PWD
}

proc ::domake.tcl {path args} {
  set PWD [pwd]
  cd $path
  puts [list *** $path ***]
  puts [list make.tcl {*}$args]
  exec [info nameofexecutable] make.tcl {*}$args >&@ stdout
  cd $PWD
}

proc ::fossil {path args} {
  set PWD [pwd]
  cd $path
  puts [list {*}$args]
  exec fossil {*}$args >&@ stdout
  cd $PWD
}


proc ::fossil_status {dir} {
  if {[info exists ::fosdat($dir)]} {
    return $::fosdat($dir)
  }
  set result {
tags experimental
version {}
  }
2644
2645
2646
2647
2648
2649
2650



















2651

2652
2653
2654
2655
2656

2657
2658
2659
2660
2661
2662


2663

2664
2665
2666
2667
2668
2669
2670
2671

2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682

2683
2684



2685
2686
2687
2688
2689
2690
2691
2692
2693
2694


2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
      dict set result tags $tags
      break
    }
  }
  set ::fosdat($dir) $result
  return $result
}



















proc ::practcl::os {} {

  return [${::practcl::MAIN} define get TEACUP_OS]
}
proc ::practcl::mkzip {exename barekit vfspath} {
  ::practcl::tcllib_require zipfile::mkzip
  ::zipfile::mkzip::mkzip $exename -runtime $barekit -directory $vfspath

}
proc ::practcl::sort_dict list {
  return [::lsort -stride 2 -dictionary $list]
}
if {[::package vcompare $::tcl_version 8.6] < 0} {
  # Approximate ::zipfile::mkzip with exec calls


  proc ::practcl::mkzip {exename barekit vfspath} {

    set path [file dirname [file normalize $exename]]
    set zipfile [file join $path [file rootname $exename].zip]
    file copy -force $barekit $exename
    set pwd [pwd]
    cd $vfspath
    exec zip -r $zipfile .
    cd $pwd
    set fout [open $exename a]

    set fin [open $zipfile r]
    chan configure $fout -translation binary
    chan configure $fin -translation binary
    chan copy $fin $fout
    chan close $fin
    chan close $fout
    exec zip -A $exename
  }
  proc ::practcl::sort_dict list {
    set result {}
    foreach key [lsort -dictionary [dict keys $list]] {

      dict set result $key [dict get $list $key]
    }



    return $result
  }
}
proc ::practcl::local_os {} {
  # If we have already run this command, return
  # a cached copy of the data
  if {[info exists ::practcl::LOCAL_INFO]} {
    return $::practcl::LOCAL_INFO
  }
  set result [array get ::practcl::CONFIG]


  dict set result TEACUP_PROFILE unknown
  dict set result TEACUP_OS unknown
  dict set result EXEEXT {}
  set windows 0
  if {$::tcl_platform(platform) eq "windows"} {
    set windows 1
  }
  if {$windows} {
    set system "windows"
    set arch ix86
    dict set result TEACUP_PROFILE win32-ix86
    dict set result TEACUP_OS windows
    dict set result EXEEXT .exe
  } else {
    set system [exec uname -s]-[exec uname -r]
    set arch unknown
    dict set result TEACUP_OS generic
  }
  dict set result TEA_PLATFORM $system
  dict set result TEA_SYSTEM $system
  if {[info exists ::SANDBOX]} {
    dict set result sandbox $::SANDBOX
  }
  switch -glob $system {
    Linux* {
      dict set result TEACUP_OS linux
      set arch [exec uname -m]
      dict set result TEACUP_PROFILE "linux-glibc2.3-$arch"
    }
    GNU* {







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>
|
|
<
|
|
>
|
<
|

|
|
>
>
|
>
|
|
|
|
<
<
|
|
>
|
|
|
|
|
|
<
<
|
|
<
>
|

>
>
>
|

<
<
|
<
|
|

<
>
>



<

<
<
<












<
<
<







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104

105
106
107
108

109
110
111
112
113
114
115
116
117
118
119
120


121
122
123
124
125
126
127
128
129


130
131

132
133
134
135
136
137
138
139


140

141
142
143

144
145
146
147
148

149



150
151
152
153
154
155
156
157
158
159
160
161



162
163
164
165
166
167
168
      dict set result tags $tags
      break
    }
  }
  set ::fosdat($dir) $result
  return $result
}
###
# Seek out Tcllib if it's available
###
set tcllib_path {}
foreach path {.. ../.. ../../..} {
  foreach path [glob -nocomplain [file join [file normalize $path] tcllib* modules]] {
    set tclib_path $path
    lappend ::auto_path $path
    break
  }
  if {$tcllib_path ne {}} break
}


###
# Build utility functions
###
namespace eval ::practcl {}

proc ::practcl::os {} {
  if {[info exists ::project(TEACUP_OS)] && $::project(TEACUP_OS) ni {"@TEACUP_OS@" {}}} {
    return $::project(TEACUP_OS)
  }

  set info [::practcl::config.tcl $::project(builddir)]
  if {[dict exists $info TEACUP_OS]} {
    return [dict get $info TEACUP_OS]
  }

  return unknown
}

###
# Detect local platform
###
proc ::practcl::config.tcl {path} {
  dict set result buildpath $path
  set result {}
  if {[file exists [file join $path config.tcl]]} {
    set fin [open [file join $path config.tcl] r]
    set bufline {}


    set rawcount 0
    set linecount 0
    while {[gets $fin thisline]>=0} {
      incr rawcount
      append bufline \n $thisline
      if {![info complete $bufline]} continue
      set line [string trimleft $bufline]
      set bufline {}
      if {[string index [string trimleft $line] 0] eq "#"} continue


      incr linecount
      set key [lindex $line 0]

      set value [lindex $line 1]
      dict set result $key $value
    }
    dict set result sandbox  [file dirname [dict get $result srcdir]]
    dict set result download [file join [dict get $result sandbox] download]
    dict set result teapot   [file join [dict get $result sandbox] teapot]
    set result [::practcl::de_shell $result]    
  }


  # If data is available from autoconf, defer to that 

  if {[dict exists $result TEACUP_OS] && [dict get $result TEACUP_OS] ni {"@TEACUP_OS@" {}}} {
    return $result  
  }

  # If autoconf hasn't run yet, assume we are not cross compiling
  # and defer to local checks
  dict set result TEACUP_PROFILE unknown
  dict set result TEACUP_OS unknown
  dict set result EXEEXT {}

  if {$::tcl_platform(platform) eq "windows"} {



    set system "windows"
    set arch ix86
    dict set result TEACUP_PROFILE win32-ix86
    dict set result TEACUP_OS windows
    dict set result EXEEXT .exe
  } else {
    set system [exec uname -s]-[exec uname -r]
    set arch unknown
    dict set result TEACUP_OS generic
  }
  dict set result TEA_PLATFORM $system
  dict set result TEA_SYSTEM $system



  switch -glob $system {
    Linux* {
      dict set result TEACUP_OS linux
      set arch [exec uname -m]
      dict set result TEACUP_PROFILE "linux-glibc2.3-$arch"
    }
    GNU* {
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854

2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870

2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883





2884



2885
2886
2887
2888

2889

2890





2891
2892
2893


2894



2895




2896








2897
2898
2899
2900
2901


2902
2903
2904
2905

2906

2907




2908
2909
2910



2911


2912
2913


2914



2915




2916
2917


2918



2919





2920


2921









2922
2923




2924


2925
2926
2927
2928






2929


2930
2931








2932

2933






2934




2935
2936
2937
2938






2939










2940

2941
2942
2943
2944
2945
2946

2947



2948
2949

2950




2951



2952


2953
2954













2955


2956
2957





2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971




2972
2973
2974
2975
2976
2977
2978
    }
  }
  if {$arch eq "unknown"} {
    catch {set arch [exec uname -m]}
  }
  switch -glob $arch {
    i*86 {
      set arch "ix86"
    }
    amd64 {
      set arch "x86_64"
    }
  }
  dict set result TEACUP_ARCH $arch
  if {[dict get $result TEACUP_PROFILE] eq "unknown"} {
    dict set result TEACUP_PROFILE [dict get $result TEACUP_OS]-$arch
  }
  set OS [dict get $result TEACUP_OS]
  dict set result os $OS

  # Look for a local preference file
  set pathlist {}
  set userhome [file normalize ~/tcl]
  set local_install [file join $userhome lib]
  switch $OS {
    windows {
      set userhome [file join [file normalize $::env(LOCALAPPDATA)] Tcl]
      if {[file exists c:/Tcl/Teapot]} {
        dict set result teapot c:/Tcl/Teapot
      }
    }
    macosx {
      set userhome [file join [file normalize {~/Library/Application Support/}] Tcl]
      if {[file exists {~/Library/Application Support/ActiveState/Teapot/repository/}]} {
        dict set result teapot [file normalize {~/Library/Application Support/ActiveState/Teapot/repository/}]
      }
      dict set result local_install [file normalize ~/Library/Tcl]
      if {![dict exists $result sandbox]} {
        dict set result sandbox       [file normalize ~/Library/Tcl/sandbox]
      }
    }
    default {
    }
  }
  dict set result userhome $userhome
  # Load user preferences
  if {[file exists [file join $userhome practcl.rc]]} {
    set dat [::practcl::read_rc_file [file join $userhome practcl.rc]]
    foreach {f v} $dat {
      dict set result $f $v
    }
  }
  if {![dict exists $result prefix]} {
    dict set result prefix   $userhome
  }

  # Create a default path for the teapot
  if {![dict exists $result teapot]} {
    dict set result teapot [file join $userhome teapot]
  }
  # Create a default path for the local sandbox
  if {![dict exists $result sandbox]} {
    dict set result sandbox [file join $userhome sandbox]
  }
  # Create a default path for download folder
  if {![dict exists $result download]} {
    dict set result download [file join $userhome download]
  }
  # Path to install local packages
  if {![dict exists $result local_install]} {
    dict set result local_install [file join $userhome lib]
  }
  if {![dict exists result fossil_mirror] && [::info exists ::env(FOSSIL_MIRROR)]} {
    dict set result fossil_mirror $::env(FOSSIL_MIRROR)
  }

  set ::practcl::LOCAL_INFO $result
  return $result
}
proc ::practcl::config.tcl {path} {
   return [read_configuration $path]
}
proc ::practcl::read_configuration {path} {
  dict set result buildpath $path
  set result [local_os]
  set OS [dict get $result TEACUP_OS]
  set windows 0
  dict set result USEMSVC 0
  if {[file exists [file join $path config.tcl]]} {
    # We have a definitive configuration file. Read its content
    # and take it as gospel
    set cresult [read_rc_file [file join $path config.tcl]]
    set cresult [::practcl::de_shell $cresult]
    if {[dict exists $cresult srcdir] && ![dict exists $cresult sandbox]} {
      dict set cresult sandbox  [file dirname [dict get $cresult srcdir]]
    }
    set result [dict merge $result [::practcl::de_shell $cresult]]
  }
  if {[file exists [file join $path config.site]]} {
    # No config.tcl file is present but we do seed
    dict set result USEMSVC 0
    foreach {f v} [::practcl::de_shell [::practcl::read_sh_file [file join $path config.site]]] {
      dict set result $f $v
      dict set result XCOMPILE_${f} $v
    }
    dict set result CONFIG_SITE [file join $path config.site]
    if {[dict exist $result XCOMPILE_CC] && [regexp mingw [dict get $result XCOMPILE_CC]]} {

      set windows 1
    }
  } elseif {[info exists ::env(VisualStudioVersion)]} {
    set windows 1
    dict set result USEMSVC 1
  }
  if {$windows && [dict get $result TEACUP_OS] ne "windows"} {
    if {![dict exists exists $result TEACUP_ARCH]} {
      dict set result TEACUP_ARCH ix86
    }
    dict set result TEACUP_PROFILE win32-[dict get $result TEACUP_ARCH]
    dict set result TEACUP_OS windows
    dict set result EXEEXT .exe
  }
  return $result
}

if {$::tcl_platform(platform) eq "windows"} {
proc ::practcl::msys_to_tclpath msyspath {
  return [exec sh -c "cd $msyspath ; pwd -W"]
}
proc ::practcl::tcl_to_myspath tclpath {
  set path [file normalize $tclpath]
  return "/[string index $path 0][string range $path 2 end]"
  #return [exec sh -c "cd $tclpath ; pwd"]
}
} else {
proc ::practcl::msys_to_tclpath msyspath {
  return [file normalize $msyspath]
}





proc ::practcl::tcl_to_myspath msyspath {



  return [file normalize $msyspath]
}
}
proc ::practcl::tcllib_require {pkg args} {

  # Try to load the package from the local environment

  if {[catch [list ::package require $pkg {*}$args] err]==0} {





    return $err
  }
  ::practcl::LOCAL tool tcllib env-load


  uplevel #0 [list ::package require $pkg {*}$args]



}




namespace eval ::practcl::platform {








}
proc ::practcl::platform::tcl_core_options {os} {
  ###
  # Download our required packages
  ###


  set tcl_config_opts {}
  # Auto-guess options for the local operating system
  switch $os {
    windows {

      #lappend tcl_config_opts --disable-stubs

    }




    linux {
    }
    macosx {



      lappend tcl_config_opts --enable-corefoundation=yes  --enable-framework=no


    }
  }


  lappend tcl_config_opts --with-tzdata --with-encoding utf-8



  return $tcl_config_opts




}
proc ::practcl::platform::tk_core_options {os} {


  ###



  # Download our required packages





  ###


  set tk_config_opts {}










  # Auto-guess options for the local operating system




  switch $os {


    windows {
    }
    linux {
      lappend tk_config_opts --enable-xft=no --enable-xss=no






    }


    macosx {
      lappend tk_config_opts --enable-aqua=yes








    }

  }






  return $tk_config_opts




}
proc ::practcl::read_rc_file {filename {localdat {}}} {
  set result $localdat
  set fin [open $filename r]






  set bufline {}










  set rawcount 0

  set linecount 0
  while {[gets $fin thisline]>=0} {
    incr rawcount
    append bufline \n $thisline
    if {![info complete $bufline]} continue
    set line [string trimleft $bufline]

    set bufline {}



    if {[string index [string trimleft $line] 0] eq "#"} continue
    append result \n $line

    #incr linecount




    #set key [lindex $line 0]



    #set value [lindex $line 1]


    #dict set result $key $value
  }













  close $fin


  return $result
}





proc ::practcl::read_sh_subst {line info} {
  regsub -all {\x28} $line \x7B line
  regsub -all {\x29} $line \x7D line

  #set line [string map $key [string trim $line]]
  foreach {field value} $info {
    catch {set $field $value}
  }
  if [catch {subst $line} result] {
    return {}
  }
  set result [string trim $result]
  return [string trim $result ']
}




proc ::practcl::read_sh_file {filename {localdat {}}} {
  set fin [open $filename r]
  set result {}
  if {$localdat eq {}} {
    set top 1
    set local [array get ::env]
    dict set local EXE {}







|









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>




<
<
<
<
<




>
>
>
>
>
|
>
>
>
|

|
|
>
|
>
|
>
>
>
>
>
|
|
|
>
>
|
>
>
>
|
>
>
>
>
|
>
>
>
>
>
>
>
>
|
<
<
<
<
>
>
|
<
<
|
>
|
>

>
>
>
>
|
|
|
>
>
>
|
>
>

|
>
>
|
>
>
>
|
>
>
>
>
|
|
>
>
|
>
>
>
|
>
>
>
>
>
|
>
>
|
>
>
>
>
>
>
>
>
>
|
|
>
>
>
>
|
>
>
|
|
|
<
>
>
>
>
>
>
|
>
>
|
<
>
>
>
>
>
>
>
>
|
>
|
>
>
>
>
>
>
|
>
>
>
>
|
<
|
|
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
|
>
|
<
<
|
<
|
>
|
>
>
>
|
|
>
|
>
>
>
>
|
>
>
>
|
>
>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>


>
>
>
>
>














>
>
>
>







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208




























































209
210


211













212











213
214















215
216
217
218
219





220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269




270
271
272


273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342

343
344
345
346
347
348
349
350
351
352

353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375

376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397


398

399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
    }
  }
  if {$arch eq "unknown"} {
    catch {set arch [exec uname -m]}
  }
  switch -glob $arch {
    i*86 {
      set arch "ix86" 
    }
    amd64 {
      set arch "x86_64"
    }
  }
  dict set result TEACUP_ARCH $arch
  if {[dict get $result TEACUP_PROFILE] eq "unknown"} {
    dict set result TEACUP_PROFILE [dict get $result TEACUP_OS]-$arch
  }




























































  return $result
}




























###
# Convert an MSYS path to a windows native path















###
if {$::tcl_platform(platform) eq "windows"} {
proc ::practcl::msys_to_tclpath msyspath {
  return [exec sh -c "cd $msyspath ; pwd -W"]
}





} else {
proc ::practcl::msys_to_tclpath msyspath {
  return [file normalize $msyspath]
}
}

###
# Bits stolen from fileutil
###
proc ::practcl::cat fname {
    set fname [open $fname r]
    set data [read $fname]
    close $fname
    return $data
}

proc ::practcl::file_lexnormalize {sp} {
    set spx [file split $sp]

    # Resolution of embedded relative modifiers (., and ..).

    if {
	([lsearch -exact $spx . ] < 0) &&
	([lsearch -exact $spx ..] < 0)
    } {
	# Quick path out if there are no relative modifiers
	return $sp
    }

    set absolute [expr {![string equal [file pathtype $sp] relative]}]
    # A volumerelative path counts as absolute for our purposes.

    set sp $spx
    set np {}
    set noskip 1

    while {[llength $sp]} {
	set ele    [lindex $sp 0]
	set sp     [lrange $sp 1 end]
	set islast [expr {[llength $sp] == 0}]

	if {[string equal $ele ".."]} {
	    if {
		($absolute  && ([llength $np] >  1)) ||
		(!$absolute && ([llength $np] >= 1))
	    } {
		# .. : Remove the previous element added to the
		# new path, if there actually is enough to remove.
		set np [lrange $np 0 end-1]
	    }




	} elseif {[string equal $ele "."]} {
	    # Ignore .'s, they stay at the current location
	    continue


	} else {
	    # A regular element.
	    lappend np $ele
	}
    }
    if {[llength $np] > 0} {
	return [eval [linsert $np 0 file join]]
	# 8.5: return [file join {*}$np]
    }
    return {}
}

proc ::practcl::file_relative {base dst} {
    # Ensure that the link to directory 'dst' is properly done relative to
    # the directory 'base'.

    if {![string equal [file pathtype $base] [file pathtype $dst]]} {
	return -code error "Unable to compute relation for paths of different pathtypes: [file pathtype $base] vs. [file pathtype $dst], ($base vs. $dst)"
    }

    set base [file_lexnormalize [file join [pwd] $base]]
    set dst  [file_lexnormalize [file join [pwd] $dst]]

    set save $dst
    set base [file split $base]
    set dst  [file split $dst]

    while {[string equal [lindex $dst 0] [lindex $base 0]]} {
	set dst  [lrange $dst  1 end]
	set base [lrange $base 1 end]
	if {![llength $dst]} {break}
    }

    set dstlen  [llength $dst]
    set baselen [llength $base]

    if {($dstlen == 0) && ($baselen == 0)} {
	# Cases:
	# (a) base == dst

	set dst .
    } else {
	# Cases:
	# (b) base is: base/sub = sub
	#     dst  is: base     = {}

	# (c) base is: base     = {}
	#     dst  is: base/sub = sub

	while {$baselen > 0} {
	    set dst [linsert $dst 0 ..]
	    incr baselen -1
	}
	# 8.5: set dst [file join {*}$dst]
	set dst [eval [linsert $dst 0 file join]]
    }

    return $dst
}

###
# Unpack the source of a fossil project into a designated location
###
proc ::practcl::fossil_sandbox {pkg args} {
  if {[llength $args]==1} {
    set info [lindex $args 0]
  } else {
    set info $args
  }
  set result $info

  if {[dict exists $info srcroot]} {
    set srcroot [dict get $info srcroot]
  } elseif {[dict exists $info sandbox]} {
    set srcroot [file join [dict get $info sandbox] $pkg]
  } else {
    set srcroot [file join $::CWD .. $pkg]
  }
  dict set result srcroot $srcroot
  puts [list fossil_sandbox $pkg $srcroot]
  if {[dict exists $info download]} {

    ###
    # Source is actually a zip archive
    ###
    set download [dict get $info download]
    if {[file exists [file join $download $pkg.zip]]} {
      if {![info exists $srcroot]} {
        package require zipfile::decode
        ::zipfile::decode::unzipfile [file join $download $pkg.zip] $srcroot
      }
      return
    }
  }
  variable fossil_dbs
  if {![::info exists fossil_dbs]} {
    # Get a list of local fossil databases
    set fossil_dbs [exec fossil all list]
  }
  set CWD [pwd]
  if {![dict exists $info tag]} {
    set tag trunk
  } else {
    set tag [dict get $info tag]
  }

  dict set result tag $tag

  try {
    if {[file exists [file join $srcroot .fslckout]]} {
      if {[dict exists $info update] && [dict get $info update]==1} {
        catch {
        puts "FOSSIL UPDATE"
        cd $srcroot
        doexec fossil update $tag
        }
      }
    } elseif {[file exists [file join $srcroot _FOSSIL_]]} {
      if {[dict exists $info update] && [dict get $info update]==1} {
        catch {
        puts "FOSSIL UPDATE"
        cd $srcroot
        doexec fossil update $tag
        }
      }
    } else {
      puts "OPEN AND UNPACK"
      set fosdb {}


      foreach line [split $fossil_dbs \n] {

        set line [string trim $line]
        if {[file rootname [file tail $line]] eq $pkg} {
          set fosdb $line
          break
        }
      }
      if {$fosdb eq {}} {
        file mkdir [file join $download fossil]
        set fosdb [file join $download fossil $pkg.fos]
        set cloned 0
        if {[dict exists $info localmirror]} {
          set localmirror [dict get $info localmirror]
          catch {
            doexec fossil clone $localmirror/$pkg $fosdb
            set cloned 1
          }
        }
        if {!$cloned && [dict exists $info fossil_url]} {
          set localmirror [dict get $info fossil_url]
          catch {
            doexec fossil clone $localmirror/$pkg $fosdb
            set cloned 1
          }
        }
        if {!$cloned} {
          doexec fossil clone http://fossil.etoyoc.com/fossil/$pkg $fosdb
        }
      }
      file mkdir $srcroot
      cd $srcroot
      puts "FOSSIL OPEN [pwd]"
      doexec fossil open $fosdb $tag
    }
  } on error {result opts} {
    puts [list ERR [dict get $opts -errorinfo]]
    return {*}$opts
  } finally {
    cd $CWD
  }
  return $result
}

###
# topic: e71f3f61c348d56292011eec83e95f0aacc1c618
# description: Converts a XXX.sh file into a series of Tcl variables
###
proc ::practcl::read_sh_subst {line info} {
  regsub -all {\x28} $line \x7B line
  regsub -all {\x29} $line \x7D line

  #set line [string map $key [string trim $line]]
  foreach {field value} $info {
    catch {set $field $value}
  }
  if [catch {subst $line} result] {
    return {}
  }
  set result [string trim $result]
  return [string trim $result ']
}

###
# topic: 03567140cca33c814664c7439570f669b9ab88e6
###
proc ::practcl::read_sh_file {filename {localdat {}}} {
  set fin [open $filename r]
  set result {}
  if {$localdat eq {}} {
    set top 1
    set local [array get ::env]
    dict set local EXE {}
3011
3012
3013
3014
3015
3016
3017





3018
3019
3020
3021
3022
3023
3024
      #puts $opts
      puts "Error reading line:\n$line\nerr: $err\n***"
      return $err {*}$opts
    }
  }
  return $result
}





proc ::practcl::read_Config.sh filename {
  set fin [open $filename r]
  set result {}
  set linecount 0
  while {[gets $fin line] >= 0} {
    set line [string trim $line]
    if {[string index $line 0] eq "#"} continue







>
>
>
>
>







502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
      #puts $opts
      puts "Error reading line:\n$line\nerr: $err\n***"
      return $err {*}$opts
    }
  }
  return $result
}

###
# A simpler form of read_sh_file tailored
# to pulling data from (tcl|tk)Config.sh
###
proc ::practcl::read_Config.sh filename {
  set fin [open $filename r]
  set result {}
  set linecount 0
  while {[gets $fin line] >= 0} {
    set line [string trim $line]
    if {[string index $line 0] eq "#"} continue
3037
3038
3039
3040
3041
3042
3043





3044
3045
3046
3047
3048
3049
3050
      #puts $opts
      puts "Error reading line:\n$line\nerr: $err\n***"
      return $err {*}$opts
    }
  }
  return $result
}





proc ::practcl::read_Makefile filename {
  set fin [open $filename r]
  set result {}
  while {[gets $fin line] >= 0} {
    set line [string trim $line]
    if {[string index $line 0] eq "#"} continue
    if {$line eq {}} continue







>
>
>
>
>







533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
      #puts $opts
      puts "Error reading line:\n$line\nerr: $err\n***"
      return $err {*}$opts
    }
  }
  return $result
}

###
# A simpler form of read_sh_file tailored
# to pulling data from a Makefile
###
proc ::practcl::read_Makefile filename {
  set fin [open $filename r]
  set result {}
  while {[gets $fin line] >= 0} {
    set line [string trim $line]
    if {[string index $line 0] eq "#"} continue
    if {$line eq {}} continue
3087
3088
3089
3090
3091
3092
3093





3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108


3109
3110
3111
3112
3113
3114
3115
3116


3117
3118
3119
3120
3121
3122
3123
    # the Compile field is about where most TEA files start getting silly
    if {$field eq "compile"} {
      break
    }
  }
  return $result
}





proc ::practcl::cputs {varname args} {
  upvar 1 $varname buffer
  if {[llength $args]==1 && [string length [string trim [lindex $args 0]]] == 0} {

  }
  if {[info exist buffer]} {
    if {[string index $buffer end] ne "\n"} {
      append buffer \n
    }
  } else {
    set buffer \n
  }
  # Trim leading \n's
  append buffer [string trimleft [lindex $args 0] \n] {*}[lrange $args 1 end]
}


proc ::practcl::tcl_to_c {body} {
  set result {}
  foreach rawline [split $body \n] {
    set line [string map [list \" \\\" \\ \\\\] $rawline]
    cputs result "\n        \"$line\\n\" \\"
  }
  return [string trimright $result \\]
}


proc ::practcl::_tagblock {text {style tcl} {note {}}} {
  if {[string length [string trim $text]]==0} {
    return {}
  }
  set output {}
  switch $style {
    tcl {







>
>
>
>
>



|











>
>








>
>







588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
    # the Compile field is about where most TEA files start getting silly
    if {$field eq "compile"} {
      break
    }
  }
  return $result
}

## Append arguments to a buffer
# The command works like puts in that each call will also insert
# a line feed. Unlike puts, blank links in the interstitial are
# suppressed
proc ::practcl::cputs {varname args} {
  upvar 1 $varname buffer
  if {[llength $args]==1 && [string length [string trim [lindex $args 0]]] == 0} {
    
  }
  if {[info exist buffer]} {
    if {[string index $buffer end] ne "\n"} {
      append buffer \n
    }
  } else {
    set buffer \n
  }
  # Trim leading \n's
  append buffer [string trimleft [lindex $args 0] \n] {*}[lrange $args 1 end]
}


proc ::practcl::tcl_to_c {body} {
  set result {}
  foreach rawline [split $body \n] {
    set line [string map [list \" \\\" \\ \\\\] $rawline]
    cputs result "\n        \"$line\\n\" \\"
  }
  return [string trimright $result \\]
}


proc ::practcl::_tagblock {text {style tcl} {note {}}} {
  if {[string length [string trim $text]]==0} {
    return {}
  }
  set output {}
  switch $style {
    tcl {
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
    }
    default {
      ::practcl::cputs output "# END $note"
    }
  }
  return $output
}
proc ::practcl::de_shell {data} {
  set values {}
  foreach flag {DEFS TCL_DEFS TK_DEFS} {
    if {[dict exists $data $flag]} {
      #set value {}
      #foreach item [dict get $data $flag] {
      #  append value " " [string map {{ } {\ }} $item]
      #}
      dict set values $flag [dict get $data $flag]
    }
  }
  set map {}
  lappend map {${PKG_OBJECTS}} %LIBRARY_OBJECTS%
  lappend map {$(PKG_OBJECTS)} %LIBRARY_OBJECTS%
  lappend map {${PKG_STUB_OBJECTS}} %LIBRARY_STUB_OBJECTS%
  lappend map {$(PKG_STUB_OBJECTS)} %LIBRARY_STUB_OBJECTS%

  if {[dict exists $data name]} {
    lappend map %LIBRARY_NAME% [dict get $data name]
    lappend map %LIBRARY_VERSION% [dict get $data version]
    lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} [dict get $data version]]
    if {[dict exists $data libprefix]} {
      lappend map %LIBRARY_PREFIX% [dict get $data libprefix]
    } else {
      lappend map %LIBRARY_PREFIX% [dict get $data prefix]
    }
  }
  foreach flag [dict keys $data] {
    if {$flag in {TCL_DEFS TK_DEFS DEFS}} continue
    set value [string trim [dict get $data $flag] \"]
    dict set map "\$\{${flag}\}" $value
    dict set map "\$\(${flag}\)" $value
    #dict set map "\$${flag}" $value
    dict set map "%${flag}%" $value
    dict set values $flag [dict get $data $flag]
    #dict set map "\$\{${flag}\}" $proj($flag)
  }
  set changed 1
  while {$changed} {
    set changed 0
    foreach {field value} $values {
      if {$field in {TCL_DEFS TK_DEFS DEFS}} continue
      dict with values {}
      set newval [string map $map $value]
      if {$newval eq $value} continue
      set changed 1
      dict set values $field $newval
    }
  }
  return $values
}

###
# END: buildutil.tcl
###
###
# START: fileutil.tcl
###
proc ::practcl::grep {pattern {files {}}} {
    set result [list]
    if {[llength $files] == 0} {
            # read from stdin
            set lnum 0
            while {[gets stdin line] >= 0} {
                incr lnum
                if {[regexp -- $pattern $line]} {
                        lappend result "${lnum}:${line}"
                }
            }
    } else {
            foreach filename $files {
            set file [open $filename r]
            set lnum 0
            while {[gets $file line] >= 0} {
                incr lnum
                if {[regexp -- $pattern $line]} {
                    lappend result "${filename}:${lnum}:${line}"
                }
            }
            close $file
            }
    }
    return $result
}
proc ::practcl::file_lexnormalize {sp} {
    set spx [file split $sp]

    # Resolution of embedded relative modifiers (., and ..).

    if {
      ([lsearch -exact $spx . ] < 0) &&
      ([lsearch -exact $spx ..] < 0)
    } {
      # Quick path out if there are no relative modifiers
      return $sp
    }

    set absolute [expr {![string equal [file pathtype $sp] relative]}]
    # A volumerelative path counts as absolute for our purposes.

    set sp $spx
    set np {}
    set noskip 1

    while {[llength $sp]} {
      set ele    [lindex $sp 0]
      set sp     [lrange $sp 1 end]
      set islast [expr {[llength $sp] == 0}]

      if {[string equal $ele ".."]} {
          if {
            ($absolute  && ([llength $np] >  1)) ||
            (!$absolute && ([llength $np] >= 1))
          } {
            # .. : Remove the previous element added to the
            # new path, if there actually is enough to remove.
            set np [lrange $np 0 end-1]
          }
      } elseif {[string equal $ele "."]} {
          # Ignore .'s, they stay at the current location
          continue
      } else {
          # A regular element.
          lappend np $ele
      }
    }
    if {[llength $np] > 0} {
      return [eval [linsert $np 0 file join]]
      # 8.5: return [file join {*}$np]
    }
    return {}
}
proc ::practcl::file_relative {base dst} {
    # Ensure that the link to directory 'dst' is properly done relative to
    # the directory 'base'.

    if {![string equal [file pathtype $base] [file pathtype $dst]]} {
      return -code error "Unable to compute relation for paths of different pathtypes: [file pathtype $base] vs. [file pathtype $dst], ($base vs. $dst)"
    }

    set base [file_lexnormalize [file join [pwd] $base]]
    set dst  [file_lexnormalize [file join [pwd] $dst]]

    set save $dst
    set base [file split $base]
    set dst  [file split $dst]

    while {[string equal [lindex $dst 0] [lindex $base 0]]} {
      set dst  [lrange $dst  1 end]
      set base [lrange $base 1 end]
      if {![llength $dst]} {break}
    }

    set dstlen  [llength $dst]
    set baselen [llength $base]

    if {($dstlen == 0) && ($baselen == 0)} {
      # Cases:
      # (a) base == dst

      set dst .
    } else {
      # Cases:
      # (b) base is: base/sub = sub
      #     dst  is: base     = {}

      # (c) base is: base     = {}
      #     dst  is: base/sub = sub

      while {$baselen > 0} {
          set dst [linsert $dst 0 ..]
          incr baselen -1
      }
      # 8.5: set dst [file join {*}$dst]
      set dst [eval [linsert $dst 0 file join]]
    }

    return $dst
}
proc ::practcl::findByPattern {basedir patterns} {
    set queue $basedir
    set result {}
    while {[llength $queue]} {
      set item [lindex $queue 0]
      set queue [lrange $queue 1 end]
      if {[file isdirectory $item]} {
        foreach path [glob -nocomplain [file join $item *]] {
          lappend queue $path
        }
        continue
      }
      foreach pattern $patterns {
        set fname [file tail $item]
        if {[string match $pattern $fname]} {
          lappend result $item
          break
        }
      }
    }
    return $result
}
proc ::practcl::log {fname comment} {
  set fname [file normalize $fname]
  if {[info exists ::practcl::logchan($fname)]} {
    set fout $::practcl::logchan($fname)
    after cancel $::practcl::logevent($fname)
  } else {
    set fout [open $fname a]
  }
  puts $fout $comment
  # Defer close until idle
  set ::practcl::logevent($fname) [after idle "close $fout ; unset ::practcl::logchan($fname)"]
}

###
# END: fileutil.tcl
###
###
# START: installutil.tcl
###
proc ::practcl::_pkgindex_simpleIndex {path} {
set buffer {}
  set pkgidxfile    [file join $path pkgIndex.tcl]
  set modfile       [file join $path [file tail $path].tcl]
  set use_pkgindex  [file exists $pkgidxfile]
  set tclfiles      {}
  set found 0
  set mlist [list pkgIndex.tcl index.tcl [file tail $modfile] version_info.tcl]
  foreach file [glob -nocomplain [file join $path *.tcl]] {
    if {[file tail $file] ni $mlist} {
      #puts [list NONMODFILE $file]
      return {}
    }
  }
  foreach file [glob -nocomplain [file join $path *.tcl]] {
    if { [file tail $file] == "version_info.tcl" } continue
    set fin [open $file r]
    set dat [read $fin]
    close $fin
    if {![regexp "package provide" $dat]} continue
    set fname [file rootname [file tail $file]]
    # Look for a package provide statement
    foreach line [split $dat \n] {
      set line [string trim $line]
      if { [string range $line 0 14] != "package provide" } continue
      set package [lindex $line 2]
      set version [lindex $line 3]
      if {[string index $package 0] in "\$ \[ @"} continue
      if {[string index $version 0] in "\$ \[ @"} continue
      #puts "PKGLINE $line"
      append buffer "package ifneeded $package $version \[list source \[file join %DIR% [file tail $file]\]\]" \n
      break
    }
  }
  return $buffer
}
proc ::practcl::_pkgindex_directory {path} {
  set buffer {}
  set pkgidxfile    [file join $path pkgIndex.tcl]
  set modfile       [file join $path [file tail $path].tcl]
  set use_pkgindex  [file exists $pkgidxfile]
  set tclfiles      {}
  if {$use_pkgindex && [file exists $modfile]} {
    set use_pkgindex 0
    set mlist [list pkgIndex.tcl [file tail $modfile]]
    foreach file [glob -nocomplain [file join $path *.tcl]] {
      lappend tclfiles [file tail $file]
      if {[file tail $file] in $mlist} continue
      incr use_pkgindex
    }
  }
  if {!$use_pkgindex} {
    # No pkgIndex file, read the source
    foreach file [glob -nocomplain $path/*.tm] {
      set file [file normalize $file]
      set fname [file rootname [file tail $file]]
      ###
      # We used to be able to ... Assume the package is correct in the filename
      # No hunt for a "package provides"







<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

<
<
<

<
<
<
|
<
<
|
<
<
<
|
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|
<
|
<
<
<
<
<
<
<
<
<
<
<







650
651
652
653
654
655
656









657










































































658













































659
660



661



662


663



664





665





























































666









































667
668
669

670











671
672
673
674
675
676
677
    }
    default {
      ::practcl::cputs output "# END $note"
    }
  }
  return $output
}




















































































proc ::practcl::_isdirectory name {













































  return [file isdirectory $name]
}







###


# Return true if the pkgindex file contains



# any statement other than "package ifneeded"





# and/or if any package ifneeded loads a DLL





























































###









































proc ::practcl::_pkgindex_directory {path} {
  set buffer {}
  set pkgidxfile [file join $path pkgIndex.tcl]

  if {![file exists $pkgidxfile]} {











    # No pkgIndex file, read the source
    foreach file [glob -nocomplain $path/*.tm] {
      set file [file normalize $file]
      set fname [file rootname [file tail $file]]
      ###
      # We used to be able to ... Assume the package is correct in the filename
      # No hunt for a "package provides"
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493


3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509








3510
3511
3512

3513
3514


3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528




3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572

3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602





3603

3604
3605
3606
3607
3608
3609
3610
        if { [string range $line 0 9] != "# Package " } continue
        set package [lindex $line 2]
        set version [lindex $line 3]
        break
      }
      # Look for a package provide statement
      foreach line [split $dat \n] {
        set line [string trim $line]
        if { [string range $line 0 14] != "package provide" } continue
        set package [lindex $line 2]
        set version [lindex $line 3]
        break
      }
      if {[string trim $version] ne {}} {
        append buffer "package ifneeded $package $version \[list source \[file join \$dir [file tail $file]\]\]" \n
      }
    }
    foreach file [glob -nocomplain $path/*.tcl] {
      if { [file tail $file] == "version_info.tcl" } continue
      set fin [open $file r]
      set dat [read $fin]
      close $fin
      if {![regexp "package provide" $dat]} continue
      set fname [file rootname [file tail $file]]
      # Look for a package provide statement
      foreach line [split $dat \n] {
        set line [string trim $line]
        if { [string range $line 0 14] != "package provide" } continue
        set package [lindex $line 2]
        set version [lindex $line 3]
        if {[string index $package 0] in "\$ \[ @"} continue
        if {[string index $version 0] in "\$ \[ @"} continue
        append buffer "package ifneeded $package $version \[list source \[file join \$dir [file tail $file]\]\]" \n
        break
      }
    }
    return $buffer
  }
  set fin [open $pkgidxfile r]
  set dat [read $fin]
  close $fin
  set trace 0
  #if {[file tail $path] eq "tool"} {
  #  set trace 1
  #}
  set thisline {}
  foreach line [split $dat \n] {
    append thisline $line \n
    if {![info complete $thisline]} continue
    set line [string trim $line]
    if {[string length $line]==0} {
      set thisline {} ; continue
    }
    if {[string index $line 0] eq "#"} {
      set thisline {} ; continue
    }


    if {[regexp "if.*catch.*package.*Tcl.*return" $thisline]} {
      if {$trace} {puts "[file dirname $pkgidxfile] Ignoring $thisline"}
      set thisline {} ; continue
    }
    if {[regexp "if.*package.*vsatisfies.*package.*provide.*return" $thisline]} {
      if {$trace} { puts "[file dirname $pkgidxfile] Ignoring $thisline" }
      set thisline {} ; continue
    }
    if {![regexp "package.*ifneeded" $thisline]} {
      # This package index contains arbitrary code
      # source instead of trying to add it to the master
      # package index
      if {$trace} { puts "[file dirname $pkgidxfile] Arbitrary code $thisline" }
      return {source [file join $dir pkgIndex.tcl]}
    }
    append buffer $thisline \n








    set thisline {}
  }
  if {$trace} {puts [list [file dirname $pkgidxfile] $buffer]}

  return $buffer
}


proc ::practcl::_pkgindex_path_subdir {path} {
  set result {}
  if {[file exists [file join $path src build.tcl]]} {
    # Tool style module, don't dive into subdirectories
    return $path
  }
  foreach subpath [glob -nocomplain [file join $path *]] {
    if {[file isdirectory $subpath]} {
      if {[file tail $subpath] eq "build" && [file exists [file join $subpath build.tcl]]} continue
      lappend result $subpath {*}[_pkgindex_path_subdir $subpath]
    }
  }
  return $result
}




proc ::practcl::pkgindex_path {args} {
  set stack {}
  set buffer {
lappend ::PATHSTACK $dir
set IDXPATH [lindex $::PATHSTACK end]
  }
  set preindexed {}
  foreach base $args {
    set base [file normalize $base]
    set paths {}
    foreach dir [glob -nocomplain [file join $base *]] {
      set thisdir [file tail $dir]
      if {$thisdir eq "teapot"} continue
      if {$thisdir eq "pkgs"} {
        foreach subdir [glob -nocomplain [file join $dir *]] {
          set thissubdir [file tail $subdir]
          set skip 0
          foreach file {pkgIndex.tcl tclIndex} {
            if {[file exists [file join $subdir $file]]} {
              set skip 1
              append buffer "set dir \[file join \$::IDXPATH [list $thisdir] [list $thissubdir]\] \; "
              append buffer "source \[file join \$dir ${file}\]" \n
            }
          }
          if {$skip} continue
          lappend paths {*}[::practcl::_pkgindex_path_subdir $subdir]
        }
        continue
      }
      lappend paths $dir {*}[::practcl::_pkgindex_path_subdir $dir]
    }
    append buffer ""
    set i    [string length  $base]
    # Build a list of all of the paths
    if {[llength $paths]} {
      foreach path $paths {
        if {$path eq $base} continue
        set path_indexed($path) 0
      }
    } else {
      puts [list WARNING: NO PATHS FOUND IN $base]
    }
    set path_indexed($base) 1
    set path_indexed([file join $base boot tcl]) 1

    append buffer \n {# SINGLE FILE MODULES BEGIN} \n {set dir [lindex $::PATHSTACK end]} \n
    foreach path $paths {
      if {$path_indexed($path)} continue
      set thisdir [file_relative $base $path]
      set simpleIdx [_pkgindex_simpleIndex $path]
      if {[string length $simpleIdx]==0} continue
      incr path_indexed($path)
      if {[string length $simpleIdx]} {
        incr path_indexed($path)
        append buffer [string map [list %DIR% "\$dir \{$thisdir\}"] [string trimright $simpleIdx]] \n
      }
    }
    append buffer {# SINGLE FILE MODULES END} \n
    foreach path $paths {
      if {$path_indexed($path)} continue
      set thisdir [file_relative $base $path]
      set idxbuf [::practcl::_pkgindex_directory $path]
      if {[string length $idxbuf]} {
        incr path_indexed($path)
        append buffer "set dir \[set PKGDIR \[file join \[lindex \$::PATHSTACK end\] $thisdir\]\]" \n
        append buffer [string map {$dir $PKGDIR} [string trimright $idxbuf]] \n
      }
    }
  }
  append buffer {
set dir [lindex $::PATHSTACK end]
set ::PATHSTACK [lrange $::PATHSTACK 0 end-1]
}
  return $buffer
}





proc ::practcl::installDir {d1 d2} {

  puts [format {%*sCreating %s} [expr {4 * [info level]}] {} [file tail $d2]]
  file delete -force -- $d2
  file mkdir $d2

  foreach ftail [glob -directory $d1 -nocomplain -tails *] {
    set f [file join $d1 $ftail]
    if {[file isdirectory $f] && [string compare CVS $ftail]} {







|





<
|
<










|



|
|









<
<
<
<











>
>
|
<
<
<
|
<
<
<
|
|
|
|
<
|
|
|
>
>
>
>
>
>
>
>
|
|
<
>


>
>


<
<
<
<


<





>
>
>
>
|



<

<


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<


<
|
|
|
<
<
<



>
|



<
<
<
<
<
<
<
<
<
<
<
|





|



|




>
>
>
>
>

>







690
691
692
693
694
695
696
697
698
699
700
701
702

703

704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728




729
730
731
732
733
734
735
736
737
738
739
740
741
742



743



744
745
746
747

748
749
750
751
752
753
754
755
756
757
758
759
760

761
762
763
764
765
766
767




768
769

770
771
772
773
774
775
776
777
778
779
780
781
782

783

784
785
















786






787
788

789
790
791



792
793
794
795
796
797
798
799











800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
        if { [string range $line 0 9] != "# Package " } continue
        set package [lindex $line 2]
        set version [lindex $line 3]
        break
      }
      # Look for a package provide statement
      foreach line [split $dat \n] {
        set line [string trim $line]              
        if { [string range $line 0 14] != "package provide" } continue
        set package [lindex $line 2]
        set version [lindex $line 3]
        break
      }

      append buffer "package ifneeded $package $version \[list source \[file join \$dir [file tail $file]\]\]" \n

    }
    foreach file [glob -nocomplain $path/*.tcl] {
      if { [file tail $file] == "version_info.tcl" } continue
      set fin [open $file r]
      set dat [read $fin]
      close $fin
      if {![regexp "package provide" $dat]} continue
      set fname [file rootname [file tail $file]]
      # Look for a package provide statement
      foreach line [split $dat \n] {
        set line [string trim $line]              
        if { [string range $line 0 14] != "package provide" } continue
        set package [lindex $line 2]
        set version [lindex $line 3]
        if {[string index $package 0] in "\$ \["} continue
        if {[string index $version 0] in "\$ \["} continue
        append buffer "package ifneeded $package $version \[list source \[file join \$dir [file tail $file]\]\]" \n
        break
      }
    }
    return $buffer
  }
  set fin [open $pkgidxfile r]
  set dat [read $fin]
  close $fin




  set thisline {}
  foreach line [split $dat \n] {
    append thisline $line \n
    if {![info complete $thisline]} continue
    set line [string trim $line]
    if {[string length $line]==0} {
      set thisline {} ; continue
    }
    if {[string index $line 0] eq "#"} {
      set thisline {} ; continue
    }
    try {
      # Ignore contditionals
      if {[regexp "if.*catch.*package.*Tcl.*return" $thisline]} continue



      if {[regexp "if.*package.*vsatisfies.*package.*provide.*return" $thisline]} continue



      if {![regexp "package.*ifneeded" $thisline]} {
        # This package index contains arbitrary code
        # source instead of trying to add it to the master
        # package index

        return {source [file join $dir pkgIndex.tcl]} 
      }
      append buffer $thisline \n
    } on error {err opts} {
      puts ***
      puts "GOOF: $pkgidxfile"
      puts $line
      puts $err
      puts [dict get $opts -errorinfo]
      puts ***
    } finally {
      set thisline {}
    }

  }
  return $buffer
}


proc ::practcl::_pkgindex_path_subdir {path} {
  set result {}




  foreach subpath [glob -nocomplain [file join $path *]] {
    if {[file isdirectory $subpath]} {

      lappend result $subpath {*}[_pkgindex_path_subdir $subpath]
    }
  }
  return $result
}
###
# Index all paths given as though they will end up in the same
# virtual file system
###
proc ::practcl::pkgindex_path args {
  set stack {}
  set buffer {
lappend ::PATHSTACK $dir

  }

  foreach base $args {
    set base [file normalize $base]
















    set paths [::practcl::_pkgindex_path_subdir $base]






    set i    [string length  $base]
    # Build a list of all of the paths

    foreach path $paths {
      if {$path eq $base} continue
      set path_indexed($path) 0



    }
    set path_indexed($base) 1
    set path_indexed([file join $base boot tcl]) 1
    #set path_index([file join $base boot tk]) 1
  
    foreach path $paths {
      if {$path_indexed($path)} continue
      set thisdir [file_relative $base $path]











      #set thisdir [string range $path $i+1 end]
      set idxbuf [::practcl::_pkgindex_directory $path]
      if {[string length $idxbuf]} {
        incr path_indexed($path)
        append buffer "set dir \[set PKGDIR \[file join \[lindex \$::PATHSTACK end\] $thisdir\]\]" \n
        append buffer [string map {$dir $PKGDIR} [string trimright $idxbuf]] \n
      } 
    }
  }
  append buffer {
set dir [lindex $::PATHSTACK end]  
set ::PATHSTACK [lrange $::PATHSTACK 0 end-1]
}
  return $buffer
}

###
# topic: 64319f4600fb63c82b2258d908f9d066
# description: Script to build the VFS file system
###
proc ::practcl::installDir {d1 d2} {

  puts [format {%*sCreating %s} [expr {4 * [info level]}] {} [file tail $d2]]
  file delete -force -- $d2
  file mkdir $d2

  foreach ftail [glob -directory $d1 -nocomplain -tails *] {
    set f [file join $d1 $ftail]
    if {[file isdirectory $f] && [string compare CVS $ftail]} {
3621
3622
3623
3624
3625
3626
3627

3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751

  if {$::tcl_platform(platform) eq {unix}} {
    file attributes $d2 -permissions 0755
  } else {
    file attributes $d2 -readonly 1
  }
}

proc ::practcl::copyDir {d1 d2 {toplevel 1}} {
  #if {$toplevel} {
  #  puts [list ::practcl::copyDir $d1 -> $d2]
  #}
  #file delete -force -- $d2
  file mkdir $d2
  if {[file isfile $d1]} {
    file copy -force $d1 $d2
    set ftail [file tail $d1]
    if {$::tcl_platform(platform) eq {unix}} {
      file attributes [file join $d2 $ftail] -permissions 0644
    } else {
      file attributes [file join $d2 $ftail] -readonly 1
    }
  } else {
    foreach ftail [glob -directory $d1 -nocomplain -tails *] {
      set f [file join $d1 $ftail]
      if {[file isdirectory $f] && [string compare CVS $ftail]} {
        copyDir $f [file join $d2 $ftail] 0
      } elseif {[file isfile $f]} {
        file copy -force $f [file join $d2 $ftail]
        if {$::tcl_platform(platform) eq {unix}} {
          file attributes [file join $d2 $ftail] -permissions 0644
        } else {
          file attributes [file join $d2 $ftail] -readonly 1
        }
      }
    }
  }
}
proc ::practcl::buildModule {modpath} {
  set buildscript [file join $modpath build build.tcl]
  if {![file exists $buildscript]} return
  set pkgIndexFile [file join $modpath pkgIndex.tcl]
  if {[file exists $pkgIndexFile]} {
    set latest 0
    foreach file [::practcl::findByPattern [file dirname $buildscript] *.tcl] {
      set mtime [file mtime $file]
      if {$mtime>$latest} {
        set latest $mtime
      }
    }
    set IdxTime [file mtime $pkgIndexFile]
    if {$latest<$IdxTime} return
  }
  ::practcl::dotclexec $buildscript
}
proc ::practcl::installModule {modpath DEST} {
  if {[file exists [file join $DEST modules]]} {
    set dpath [file join $DEST modules [file tail $modpath]]
  } else {
    set dpath $DEST
  }
  if {[file exists $dpath] && [file type $dpath] eq "link"} return
  if {[file exists [file join $modpath index.tcl]]} {
    # IRM/Tao style modules non-amalgamated
    ::practcl::installDir $modpath $dpath
    return
  }
  buildModule $modpath
  set files [glob -nocomplain [file join $modpath *.tcl]]
  if {[llength $files]} {
    if {[llength $files]>1} {
      if {![file exists [file join $modpath pkgIndex.tcl]]} {
        pkg_mkIndex $modpath
      }
    }
    file delete -force $dpath
    file mkdir $dpath
    foreach file $files {
      file copy $file $dpath
    }
  }
  if {[file exists [file join $modpath htdocs]]} {
    ::practcl::copyDir [file join $modpath htdocs] [file join $dpath htdocs]
  }
}

###
# END: installutil.tcl
###
###
# START: makeutil.tcl
###
proc ::practcl::trigger {args} {
  ::practcl::LOCAL make trigger {*}$args
  foreach {name obj} [::practcl::LOCAL make objects] {
    set ::make($name) [$obj do]
  }
}
proc ::practcl::depends {args} {
  ::practcl::LOCAL make depends {*}$args
}
proc ::practcl::target {name info {action {}}} {
  set obj [::practcl::LOCAL make task $name $info $action]
  set ::make($name) 0
  set filename [$obj define get filename]
  if {$filename ne {}} {
    set ::target($name) $filename
  }
}

###
# END: makeutil.tcl
###
###
# START: class metaclass.tcl
###
::clay::define ::practcl::metaclass {
  method _MorphPatterns {} {
    return {{@name@} {::practcl::@name@} {::practcl::*@name@} {::practcl::*@name@*}}
  }
  method define {submethod args} {
    my variable define
    switch $submethod {
      dump {
        return [array get define]
      }
      add {
        set field [lindex $args 0]
        if {![info exists define($field)]} {
          set define($field) {}
        }
        foreach arg [lrange $args 1 end] {







>
|
<
|
<


<
<
<
<
<
<
<
|
<
|
|
|
|
|
|
<
<
<
<
|
|
|
|
<
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
|
<
|
<
<
<
<
<
<
<
<

|
<
<
<
<
<
<
<
|
|

|
|
<
<
<
<
<
<
<
<
<
|




|







839
840
841
842
843
844
845
846
847

848

849
850







851

852
853
854
855
856
857




858
859
860
861

862




863





























864











865

866








867
868







869
870
871
872
873









874
875
876
877
878
879
880
881
882
883
884
885
886

  if {$::tcl_platform(platform) eq {unix}} {
    file attributes $d2 -permissions 0755
  } else {
    file attributes $d2 -readonly 1
  }
}

proc ::practcl::copyDir {d1 d2} {

  #puts [list $d1 -> $d2]

  #file delete -force -- $d2
  file mkdir $d2









  foreach ftail [glob -directory $d1 -nocomplain -tails *] {
    set f [file join $d1 $ftail]
    if {[file isdirectory $f] && [string compare CVS $ftail]} {
      copyDir $f [file join $d2 $ftail]
    } elseif {[file isfile $f]} {
      file copy -force $f [file join $d2 $ftail]




    }
  }
}


::oo::class create ::practcl::metaclass {




  superclass ::oo::object





























  











  method script script {

    eval $script








  }
  







  method source filename {
    source $filename
  }
  
  method initialize {} {}









    
  method define {submethod args} {
    my variable define
    switch $submethod {
      dump {
	return [array get define]
      }
      add {
        set field [lindex $args 0]
        if {![info exists define($field)]} {
          set define($field) {}
        }
        foreach arg [lrange $args 1 end] {
3795
3796
3797
3798
3799
3800
3801

3802
















3803
3804







3805
3806
3807
3808
3809
3810
3811
3812
        }
      }
      default {
        array $submethod define {*}$args
      }
    }
  }

  method graft args {
















    return [my clay delegate {*}$args]
  }







  method initialize {} {}
  method link {command args} {
    my variable links
    switch $command {
      object {
        foreach obj $args {
          foreach linktype [$obj linktype] {
            my link add $linktype $obj







>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
>
>
>
>
>
>
>
|







930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
        }
      }
      default {
        array $submethod define {*}$args
      }
    }
  }

  method graft args {
    my variable organs
    if {[llength $args] == 1} {
      error "Need two arguments"
    }
    set object {}
    foreach {stub object} $args {
      dict set organs $stub $object
      oo::objdefine [self] forward <${stub}> $object
      oo::objdefine [self] export <${stub}>
    }
    return $object
  }
  
  method organ {{stub all}} {
    my variable organs
    if {![info exists organs]} {
      return {}
    }
    if { $stub eq "all" } {
      return $organs
    }
    if {[dict exists $organs $stub]} {
      return [dict get $organs $stub]
    }
  }
  
  method link {command args} {
    my variable links
    switch $command {
      object {
        foreach obj $args {
          foreach linktype [$obj linktype] {
            my link add $linktype $obj
3853
3854
3855
3856
3857
3858
3859
3860

3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915




3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937

3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952

3953
3954
3955

3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966


3967
3968
3969
3970


3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007





4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039

4040


4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053

4054
4055
4056
4057
4058

4059
4060

4061
4062
4063
4064

4065

4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089



4090
4091


4092
4093
4094

4095
4096
4097
4098
4099
4100




4101
4102
4103

4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114




4115
4116
4117
4118
4119
4120
4121
4122

4123
4124
4125


4126
4127



4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139


4140
4141


4142
4143
4144



4145



4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181

4182


4183
4184



4185
4186
4187
4188
4189
4190
4191


4192

4193
4194
4195
4196



4197
4198



4199
4200



4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220

4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243

4244

4245
4246
4247
4248
4249
4250
4251
4252

4253




4254
4255
4256
4257

4258
4259
4260
4261
4262
4263
4264
4265
4266




4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280

4281
4282
4283
4284

4285
4286
4287
4288
4289
4290

4291





4292
4293




4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305

4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326

4327




4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338


4339
4340
4341
4342
4343
4344
4345
4346





4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369


4370


4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419




4420







4421








4422







4423


4424


















4425
4426

4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517




4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610



4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645

4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671

4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719

4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760

4761
4762


4763
4764
4765

4766
4767
4768

4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781





4782
4783
4784
4785
4786


4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815

4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986

4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056

5057


5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069

5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083

5084
5085
5086

5087

5088
5089


5090








5091
5092
5093














































5094
5095
5096
5097
5098
5099
5100
5101
5102
5103



















































































































































































































































































































































































































































5104
5105
5106

5107
5108
5109

5110

5111



5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162


5163
5164
5165
5166
5167
5168
5169
5170

5171


5172
5173
5174
5175



5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191


5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288

5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308

5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321

5322
5323
5324




5325
5326















5327
5328
5329
5330
5331
5332
5333
        return $links($linktype)
      }
      dump {
        return [array get links]
      }
    }
  }
  method morph classname {

    my variable define
    if {$classname ne {}} {
      set map [list @name@ $classname]
      foreach pattern [string map $map [my _MorphPatterns]] {
        set pattern [string trim $pattern]
        set matches [info commands $pattern]
        if {![llength $matches]} continue
        set class [lindex $matches 0]
        break
      }
      set mixinslot {}
      foreach {slot pattern} {
        distribution ::practcl::distribution*
        product      ::practcl::product*
        toolset      ::practcl::toolset*
      } {
        if {[string match $pattern $class]} {
           set mixinslot $slot
           break
        }
      }
      if {$mixinslot ne {}} {
        my clay mixinmap $mixinslot $class
      } elseif {[info command $class] ne {}} {
        if {[info object class [self]] ne $class} {
          ::oo::objdefine [self] class $class
          ::practcl::debug [self] morph $class
           my define set class $class
        }
      } else {
        error "[self] Could not detect class for $classname"
      }
    }
    if {[::info exists define(oodefine)]} {
      ::oo::objdefine [self] $define(oodefine)
      #unset define(oodefine)
    }
  }
  method script script {
    eval $script
  }
  method select {} {
    my variable define
    if {[info exists define(class)]} {
      my morph $define(class)
    } else {
      if {[::info exists define(oodefine)]} {
        ::oo::objdefine [self] $define(oodefine)
        #unset define(oodefine)
      }
    }
  }
  method source filename {
    source $filename
  }




}

###
# END: class metaclass.tcl
###
###
# START: class toolset baseclass.tcl
###
::clay::define ::practcl::toolset {
  method config.sh {} {
    return [my read_configuration]
  }
  method BuildDir {PWD} {
    set name [my define get name]
    set debug [my define get debug 0]
    if {[my <project> define get LOCAL 0]} {
      return [my define get builddir [file join $PWD local $name]]
    }
    if {$debug} {
      return [my define get builddir [file join $PWD debug $name]]
    } else {
      return [my define get builddir [file join $PWD pkg $name]]

    }
  }
  method MakeDir {srcdir} {
    return $srcdir
  }
  method read_configuration {} {
    my variable conf_result
    if {[info exists conf_result]} {
      return $conf_result
    }
    set result {}
    set name [my define get name]
    set PWD $::CWD
    set builddir [my define get builddir]
    my unpack

    set srcdir [my define get srcdir]
    if {![file exists $builddir]} {
      my Configure

    }
    set filename [file join $builddir config.tcl]
    # Project uses the practcl template. Use the leavings from autoconf
    if {[file exists $filename]} {
      set dat [::practcl::read_configuration $builddir]
      foreach {item value} [::practcl::sort_dict $dat] {
        dict set result $item $value
      }
      set conf_result $result
      return $result
    }


    set filename [file join $builddir ${name}Config.sh]
    if {[file exists $filename]} {
      set l [expr {[string length $name]+1}]
      foreach {field dat} [::practcl::read_Config.sh $filename] {


        set field [string tolower $field]
        if {[string match ${name}_* $field]} {
          set field [string range $field $l end]
        }
        switch $field {
          version {
            dict set result pkg_vers $dat
          }
          lib_file {
            set field libfile
          }
        }
        dict set result $field $dat
      }
      set conf_result $result
      return $result
    }
    ###
    # Oh man... we have to guess
    ###
    if {![file exists [file join $builddir Makefile]]} {
      my Configure
    }
    set filename [file join $builddir Makefile]
    if {![file exists $filename]} {
      error "Could not locate any configuration data in $srcdir"
    }
    foreach {field dat} [::practcl::read_Makefile $filename] {
      dict set result $field $dat
    }
    if {![dict exists $result PRACTCL_PKG_LIBS] && [dict exists $result LIBS]} {
      dict set result PRACTCL_PKG_LIBS [dict get $result LIBS]
    }
    set conf_result $result
    cd $PWD
    return $result
  }





  method build-cflags {PROJECT DEFS namevar versionvar defsvar} {
    upvar 1 $namevar name $versionvar version NAME NAME $defsvar defs
    set name [string tolower [${PROJECT} define get name [${PROJECT} define get pkg_name]]]
    set NAME [string toupper $name]
    set version [${PROJECT} define get version [${PROJECT} define get pkg_vers]]
    if {$version eq {}} {
      set version 0.1a
    }
    set defs $DEFS
    foreach flag {
      -DPACKAGE_NAME
      -DPACKAGE_VERSION
      -DPACKAGE_TARNAME
      -DPACKAGE_STRING
    } {
      if {[set i [string first $flag $defs]] >= 0} {
        set j [string first -D $flag [expr {$i+[string length $flag]}]]
        set predef [string range $defs 0 [expr {$i-1}]]
        set postdef [string range $defs $j end]
        set defs "$predef $postdef"
      }
    }
    append defs " -DPACKAGE_NAME=\"${name}\" -DPACKAGE_VERSION=\"${version}\""
    append defs " -DPACKAGE_TARNAME=\"${name}\" -DPACKAGE_STRING=\"${name}\x5c\x20${version}\""
    return $defs
  }
  method critcl args {
    if {![info exists critcl]} {
      ::practcl::LOCAL tool critcl env-load
      set critcl [file join [::practcl::LOCAL tool critcl define get srcdir] main.tcl
    }
    set srcdir [my SourceRoot]

    set PWD [pwd]


    cd $srcdir
    ::practcl::dotclexec $critcl {*}$args
    cd $PWD
  }
}
oo::objdefine ::practcl::toolset {
  # Perform the selection for the toolset mixin
  method select object {
    ###
    # Select the toolset to use for this project
    ###
    if {[$object define exists toolset]} {
      return [$object define get toolset]

    }
    set class [$object define get toolset]
    if {$class ne {}} {
      $object clay mixinmap toolset $class
    } else {

      if {[info exists ::env(VisualStudioVersion)]} {
        $object clay mixinmap toolset ::practcl::toolset.msvc

      } else {
        $object clay mixinmap toolset ::practcl::toolset.gcc
      }
    }

  }

}

###
# END: class toolset baseclass.tcl
###
###
# START: class toolset gcc.tcl
###
::clay::define ::practcl::toolset.gcc {
  superclass ::practcl::toolset
  method Autoconf {} {
    ###
    # Re-run autoconf for this project
    # Not a good idea in practice... but in the right hands it can be useful
    ###
    set pwd [pwd]
    set srcdir [file normalize [my define get srcdir]]
    set localsrcdir [my MakeDir $srcdir]
    cd $localsrcdir
    foreach template {configure.ac configure.in} {
      set input [file join $srcdir $template]
      if {[file exists $input]} {
        puts "autoconf -f $input > [file join $srcdir configure]"
        exec autoconf -f $input > [file join $srcdir configure]



      }
    }


    cd $pwd
  }
  method BuildDir {PWD} {

    set name [my define get name]
    set debug [my define get debug 0]
    if {[my <project> define get LOCAL 0]} {
      return [my define get builddir [file join $PWD local $name]]
    }
    if {$debug} {




      return [my define get builddir [file join $PWD debug $name]]
    } else {
      return [my define get builddir [file join $PWD pkg $name]]

    }
  }
  method ConfigureOpts {} {
    set opts {}
    set builddir [my define get builddir]

    if {[my define get broken_destroot 0]} {
      set PREFIX [my <project> define get prefix_broken_destdir]
    } else {
      set PREFIX [my <project> define get prefix]
    }




    switch [my define get name] {
      tcl {
        set opts [::practcl::platform::tcl_core_options [my <project> define get TEACUP_OS]]
      }
      tk {
        set opts [::practcl::platform::tk_core_options  [my <project> define get TEACUP_OS]]
      }
    }

    if {[my <project> define get CONFIG_SITE] != {}} {
      lappend opts --host=[my <project> define get HOST]
    }


    set inside_msys [string is true -strict [my <project> define get MSYS_ENV 0]]
    lappend opts --with-tclsh=[info nameofexecutable]




    if {[my define get tk 0]} {
      if {![my <project> define get LOCAL 0]} {
        set obj [my <project> tclcore]
        if {$obj ne {}} {
          if {$inside_msys} {
            lappend opts --with-tcl=[::practcl::file_relative [file normalize $builddir] [$obj define get builddir]]
          } else {
            lappend opts --with-tcl=[file normalize [$obj define get builddir]]
          }
        }
        set obj [my <project> tkcore]


        if {$obj ne {}} {
          if {$inside_msys} {


            lappend opts --with-tk=[::practcl::file_relative [file normalize $builddir] [$obj define get builddir]]
          } else {
            lappend opts --with-tk=[file normalize [$obj define get builddir]]



          }



        }
      } else {
        lappend opts --with-tcl=[file join $PREFIX lib]
        lappend opts --with-tk=[file join $PREFIX lib]
      }
    } else {
      if {![my <project> define get LOCAL 0]} {
        set obj [my <project> tclcore]
        if {$obj ne {}} {
          if {$inside_msys} {
            lappend opts --with-tcl=[::practcl::file_relative [file normalize $builddir] [$obj define get builddir]]
          } else {
            lappend opts --with-tcl=[file normalize [$obj define get builddir]]
          }
        }
      } else {
        lappend opts --with-tcl=[file join $PREFIX lib]
      }
    }

    lappend opts {*}[my define get config_opts]
    if {![regexp -- "--prefix" $opts]} {
      lappend opts --prefix=$PREFIX --exec-prefix=$PREFIX
    }
    if {[my define get debug 0]} {
      lappend opts --enable-symbols=true
    }
    #--exec_prefix=$PREFIX
    #if {$::tcl_platform(platform) eq "windows"} {
    #  lappend opts --disable-64bit
    #}
    if {[my define get static 1]} {
      lappend opts --disable-shared
      #--disable-stubs
      #
    } else {

      lappend opts --enable-shared


    }
    return $opts



  }
  method MakeDir {srcdir} {
    set localsrcdir $srcdir
    if {[file exists [file join $srcdir generic]]} {
      my define add include_dir [file join $srcdir generic]
    }
    set os [my <project> define get TEACUP_OS]


    switch $os {

      windows {
        if {[file exists [file join $srcdir win]]} {
          my define add include_dir [file join $srcdir win]
        }



        if {[file exists [file join $srcdir win Makefile.in]]} {
          set localsrcdir [file join $srcdir win]



        }
      }



      macosx {
        if {[file exists [file join $srcdir unix Makefile.in]]} {
          set localsrcdir [file join $srcdir unix]
        }
      }
      default {
        if {[file exists [file join $srcdir $os]]} {
          my define add include_dir [file join $srcdir $os]
        }
        if {[file exists [file join $srcdir unix]]} {
          my define add include_dir [file join $srcdir unix]
        }
        if {[file exists [file join $srcdir $os Makefile.in]]} {
          set localsrcdir [file join $srcdir $os]
        } elseif {[file exists [file join $srcdir unix Makefile.in]]} {
          set localsrcdir [file join $srcdir unix]
        }
      }
    }
    return $localsrcdir

  }
  Ensemble make::autodetect {} {
    set srcdir [my define get srcdir]
    set localsrcdir [my MakeDir $srcdir]
    if {$localsrcdir eq {}} {
      set localsrcdir $srcdir
    }
    if {$srcdir eq $localsrcdir} {
      if {![file exists [file join $srcdir tclconfig install-sh]]} {
        # ensure we have tclconfig with all of the trimmings
        set teapath {}
        if {[file exists [file join $srcdir .. tclconfig install-sh]]} {
          set teapath [file join $srcdir .. tclconfig]
        } else {
          set tclConfigObj [::practcl::LOCAL tool tclconfig]
          $tclConfigObj load
          set teapath [$tclConfigObj define get srcdir]
        }
        set teapath [file normalize $teapath]
        #file mkdir [file join $srcdir tclconfig]
        if {[catch {file link -symbolic [file join $srcdir tclconfig] $teapath}]} {
          ::practcl::copyDir [file join $teapath] [file join $srcdir tclconfig]
        }

      }

    }
    set builddir [my define get builddir]
    file mkdir $builddir
    if {![file exists [file join $localsrcdir configure]]} {
      if {[file exists [file join $localsrcdir autogen.sh]]} {
        cd $localsrcdir
        catch {exec sh autogen.sh >>& [file join $builddir autoconf.log]}
        cd $::CWD

      }




    }
    set opts [my ConfigureOpts]
    if {[file exists [file join $builddir autoconf.log]]} {
      file delete [file join $builddir autoconf.log]

    }
    ::practcl::debug [list PKG [my define get name] CONFIGURE {*}$opts]
    ::practcl::log   [file join $builddir autoconf.log] [list  CONFIGURE {*}$opts]
    cd $builddir
    if {[my <project> define get CONFIG_SITE] ne {}} {
      set ::env(CONFIG_SITE) [my <project> define get CONFIG_SITE]
    }
    catch {exec sh [file join $localsrcdir configure] {*}$opts >>& [file join $builddir autoconf.log]}
    cd $::CWD




  }
  Ensemble make::clean {} {
    set builddir [file normalize [my define get builddir]]
    catch {::practcl::domake $builddir clean}
  }
  Ensemble make::compile {} {
    set name [my define get name]
    set srcdir [my define get srcdir]
    if {[my define get static 1]} {
      puts "BUILDING Static $name $srcdir"
    } else {
      puts "BUILDING Dynamic $name $srcdir"
    }
    cd $::CWD

    set builddir [file normalize [my define get builddir]]
    file mkdir $builddir
    if {![file exists [file join $builddir Makefile]]} {
      my Configure

    }
    if {[file exists [file join $builddir make.tcl]]} {
      if {[my define get debug 0]} {
        ::practcl::domake.tcl $builddir debug all
      } else {
        ::practcl::domake.tcl $builddir all

      }





    } else {
      ::practcl::domake $builddir all




    }
  }
  Ensemble make::install DEST {
    set PWD [pwd]
    set builddir [my define get builddir]
    if {[my <project> define get LOCAL 0] || $DEST eq {}} {
      if {[file exists [file join $builddir make.tcl]]} {
        puts "[self] Local INSTALL (Practcl)"
        ::practcl::domake.tcl $builddir install
      } elseif {[my define get broken_destroot 0] == 0} {
        puts "[self] Local INSTALL (TEA)"
        ::practcl::domake $builddir install

      }
    } else {
      if {[file exists [file join $builddir make.tcl]]} {
        # Practcl builds can inject right to where we need them
        puts "[self] VFS INSTALL $DEST (Practcl)"
        ::practcl::domake.tcl $builddir install-package $DEST
      } elseif {[my define get broken_destroot 0] == 0} {
        # Most modern TEA projects understand DESTROOT in the makefile
        puts "[self] VFS INSTALL $DEST (TEA)"
        ::practcl::domake $builddir install DESTDIR=[::practcl::file_relative $builddir $DEST]
      } else {
        # But some require us to do an install into a fictitious filesystem
        # and then extract the gooey parts within.
        # (*cough*) TkImg
        set PREFIX [my <project> define get prefix]
        set BROKENROOT [::practcl::msys_to_tclpath [my <project> define get prefix_broken_destdir]]
        file delete -force $BROKENROOT
        file mkdir $BROKENROOT
        ::practcl::domake $builddir $install
        ::practcl::copyDir $BROKENROOT  [file join $DEST [string trimleft $PREFIX /]]
        file delete -force $BROKENROOT

      }




    }
    cd $PWD
  }
  method build-compile-sources {PROJECT COMPILE CPPCOMPILE INCLUDES} {
    set objext [my define get OBJEXT o]
    set EXTERN_OBJS {}
    set OBJECTS {}
    set result {}
    set builddir [$PROJECT define get builddir]
    file mkdir [file join $builddir objs]
    set debug [$PROJECT define get debug 0]



    set task {}
    ###
    # Compile the C sources
    ###
    ::practcl::debug ### COMPILE PRODUCTS
    foreach {ofile info} [${PROJECT} project-compile-products] {
      ::practcl::debug $ofile $info





      if {[dict exists $info library]} {
        #dict set task $ofile done 1
        continue
      }
      # Products with no cfile aren't compiled
      if {![dict exists $info cfile] || [set cfile [dict get $info cfile]] eq {}} {
        #dict set task $ofile done 1
        continue
      }
      set ofile [file rootname $ofile]
      dict set task $ofile done 0
      if {[dict exists $info external] && [dict get $info external]==1} {
        dict set task $ofile external 1
      } else {
        dict set task $ofile external 0
      }
      set cfile [dict get $info cfile]
      if {$debug} {
        set ofilename [file join $builddir objs [file rootname [file tail $ofile]].debug.${objext}]
      } else {
        set ofilename [file join $builddir objs [file tail $ofile]].${objext}
      }
      dict set task $ofile source $cfile


      dict set task $ofile objfile $ofilename


      if {![dict exist $info command]} {
        if {[file extension $cfile] in {.c++ .cpp}} {
          set cmd $CPPCOMPILE
        } else {
          set cmd $COMPILE
        }
        if {[dict exists $info extra]} {
          append cmd " [dict get $info extra]"
        }
        append cmd " $INCLUDES"
        append cmd " -c $cfile"
        append cmd " -o $ofilename"
        dict set task $ofile command $cmd
      }
    }
    set completed 0
    while {$completed==0} {
      set completed 1
      foreach {ofile info} $task {
        set waiting {}
        if {[dict exists $info done] && [dict get $info done]} continue
        ::practcl::debug COMPILING $ofile $info
        set filename [dict get $info objfile]
        if {[file exists $filename] && [file mtime $filename]>[file mtime [dict get $info source]]} {
          lappend result $filename
          dict set task $ofile done 1
          continue
        }
        if {[dict exists $info depend]} {
          foreach file [dict get $info depend] {
            if {[dict exists $task $file command] && [dict exists $task $file done] && [dict get $task $file done] != 1} {
              set waiting $file
              break
            }
          }
        }
        if {$waiting ne {}} {
          set completed 0
          puts "$ofile waiting for $waiting"
          continue
        }
        if {[dict exists $info command]} {
          set cmd [dict get $info command]
          puts "$cmd"
          exec {*}$cmd >&@ stdout
        }
        if {[file exists $filename]} {
          lappend result $filename
          dict set task $ofile done 1




          continue







        }








        error "Failed to produce $filename"







      }


    }


















    return $result
  }

method build-Makefile {path PROJECT} {
  array set proj [$PROJECT define dump]
  set path $proj(builddir)
  cd $path
  set includedir .
  set objext [my define get OBJEXT o]

  #lappend includedir [::practcl::file_relative $path $proj(TCL_INCLUDES)]
  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TCL_SRC_DIR) generic]]]
  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(srcdir) generic]]]
  foreach include [$PROJECT toolset-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }
  set INCLUDES  "-I[join $includedir " -I"]"
  set NAME [string toupper $proj(name)]
  set result {}
  set products {}
  set libraries {}
  set thisline {}
  ::practcl::cputs result "${NAME}_DEFS = $proj(DEFS)\n"
  ::practcl::cputs result "${NAME}_INCLUDES = -I\"[join $includedir "\" -I\""]\"\n"
  ::practcl::cputs result "${NAME}_COMPILE = \$(CC) \$(CFLAGS) \$(PKG_CFLAGS) \$(${NAME}_DEFS) \$(${NAME}_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(AM_CFLAGS)"
  ::practcl::cputs result "${NAME}_CPPCOMPILE = \$(CXX) \$(CFLAGS) \$(PKG_CFLAGS) \$(${NAME}_DEFS) \$(${NAME}_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(AM_CFLAGS)"

  foreach {ofile info} [$PROJECT project-compile-products] {
    dict set products $ofile $info
    set fname [file rootname ${ofile}].${objext}
    if {[dict exists $info library]} {
lappend libraries $ofile
continue
    }
    if {[dict exists $info depend]} {
      ::practcl::cputs result "\n${fname}: [dict get $info depend]"
    } else {
      ::practcl::cputs result "\n${fname}:"
    }
    set cfile [dict get $info cfile]
    if {[file extension $cfile] in {.c++ .cpp}} {
      set cmd "\t\$\(${NAME}_CPPCOMPILE\)"
    } else {
      set cmd "\t\$\(${NAME}_COMPILE\)"
    }
    if {[dict exists $info extra]} {
      append cmd " [dict get $info extra]"
    }
    append cmd " -c [dict get $info cfile] -o \$@\n\t"
    ::practcl::cputs result  $cmd
  }

  set map {}
  lappend map %LIBRARY_NAME% $proj(name)
  lappend map %LIBRARY_VERSION% $proj(version)
  lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $proj(version)]
  lappend map %LIBRARY_PREFIX% [$PROJECT define getnull libprefix]

  if {[string is true [$PROJECT define get SHARED_BUILD]]} {
    set outfile [$PROJECT define get libfile]
  } else {
    set outfile [$PROJECT shared_library]
  }
  $PROJECT define set shared_library $outfile
  ::practcl::cputs result "
${NAME}_SHLIB = $outfile
${NAME}_OBJS = [dict keys $products]
"

  #lappend map %OUTFILE% {\[$]@}
  lappend map %OUTFILE% $outfile
  lappend map %LIBRARY_OBJECTS% "\$(${NAME}_OBJS)"
  ::practcl::cputs result "$outfile: \$(${NAME}_OBJS)"
  ::practcl::cputs result "\t[string map $map [$PROJECT define get PRACTCL_SHARED_LIB]]"
  if {[$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL] ni {: {}}} {
    ::practcl::cputs result "\t[string map $map [$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL]]"
  }
  ::practcl::cputs result {}
  if {[string is true [$PROJECT define get SHARED_BUILD]]} {
    #set outfile [$PROJECT static_library]
    set outfile $proj(name).a
  } else {
    set outfile [$PROJECT define get libfile]
  }
  $PROJECT define set static_library $outfile
  dict set map %OUTFILE% $outfile
  ::practcl::cputs result "$outfile: \$(${NAME}_OBJS)"
  ::practcl::cputs result "\t[string map $map [$PROJECT define get PRACTCL_STATIC_LIB]]"
  ::practcl::cputs result {}
  return $result
}




method build-library {outfile PROJECT} {
  array set proj [$PROJECT define dump]
  set path $proj(builddir)
  cd $path
  set includedir .
  #lappend includedir [::practcl::file_relative $path $proj(TCL_INCLUDES)]
  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TCL_SRC_DIR) generic]]]
  if {[$PROJECT define get TEA_PRIVATE_TCL_HEADERS 0]} {
    if {[$PROJECT define get TEA_PLATFORM] eq "windows"} {
      lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TCL_SRC_DIR) win]]]
    } else {
      lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TCL_SRC_DIR) unix]]]
    }
  }

  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(srcdir) generic]]]

  if {[$PROJECT define get tk 0]} {
    lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) generic]]]
    lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) ttk]]]
    lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) xlib]]]
    if {[$PROJECT define get TEA_PRIVATE_TK_HEADERS 0]} {
      if {[$PROJECT define get TEA_PLATFORM] eq "windows"} {
        lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) win]]]
      } else {
        lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) unix]]]
      }
    }
    lappend includedir [::practcl::file_relative $path [file normalize $proj(TK_BIN_DIR)]]
  }
  foreach include [$PROJECT toolset-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }
  my build-cflags $PROJECT $proj(DEFS) name version defs
  set NAME [string toupper $name]
  set debug [$PROJECT define get debug 0]
  set os [$PROJECT define get TEACUP_OS]

  set INCLUDES  "-I[join $includedir " -I"]"
  if {$debug} {
    set COMPILE "$proj(CC) $proj(CFLAGS_DEBUG) -ggdb \
$proj(CFLAGS_WARNING) $INCLUDES $defs"

    if {[info exists proc(CXX)]} {
      set COMPILECPP "$proj(CXX) $defs $INCLUDES $proj(CFLAGS_DEBUG) -ggdb \
  $defs $proj(CFLAGS_WARNING)"
    } else {
      set COMPILECPP $COMPILE
    }
  } else {
    set COMPILE "$proj(CC) $proj(CFLAGS) $defs"

    if {[info exists proc(CXX)]} {
      set COMPILECPP "$proj(CXX) $defs $proj(CFLAGS)"
    } else {
      set COMPILECPP $COMPILE
    }
  }

  set products [my build-compile-sources $PROJECT $COMPILE $COMPILECPP $INCLUDES]

  set map {}
  lappend map %LIBRARY_NAME% $proj(name)
  lappend map %LIBRARY_VERSION% $proj(version)
  lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $proj(version)]
  lappend map %OUTFILE% $outfile
  lappend map %LIBRARY_OBJECTS% $products
  lappend map {${CFLAGS}} "$proj(CFLAGS_DEFAULT) $proj(CFLAGS_WARNING)"

  if {[string is true [$PROJECT define get SHARED_BUILD 1]]} {
    set cmd [$PROJECT define get PRACTCL_SHARED_LIB]
    append cmd " [$PROJECT define get PRACTCL_LIBS]"
    set cmd [string map $map $cmd]
    puts $cmd
    exec {*}$cmd >&@ stdout
    if {[$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL] ni {: {}}} {
      set cmd [string map $map [$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL]]
      puts $cmd
      exec {*}$cmd >&@ stdout
    }
  } else {
    set cmd [string map $map [$PROJECT define get PRACTCL_STATIC_LIB]]
    puts $cmd
    exec {*}$cmd >&@ stdout
  }
  set ranlib [$PROJECT define get RANLIB]
  if {$ranlib ni {{} :}} {
    catch {exec $ranlib $outfile}
  }
}



method build-tclsh {outfile PROJECT {path {auto}}} {
  if {[my define get tk 0] && [my define get static_tk 0]} {
    puts " BUILDING STATIC TCL/TK EXE $PROJECT"
    set TKOBJ  [$PROJECT tkcore]
    if {[info command $TKOBJ] eq {}} {
      set TKOBJ ::noop
      $PROJECT define set static_tk 0
    } else {
      ::practcl::toolset select $TKOBJ
      array set TK  [$TKOBJ read_configuration]
      set do_tk [$TKOBJ define get static]
      $PROJECT define set static_tk $do_tk
      $PROJECT define set tk $do_tk
      set TKSRCDIR [$TKOBJ define get srcdir]
    }
  } else {
    puts " BUILDING STATIC TCL EXE $PROJECT"
    set TKOBJ ::noop
    my define set static_tk 0
  }
  set TCLOBJ [$PROJECT tclcore]
  ::practcl::toolset select $TCLOBJ
  set PKG_OBJS {}
  foreach item [$PROJECT link list core.library] {
    if {[string is true [$item define get static]]} {
      lappend PKG_OBJS $item
    }
  }
  foreach item [$PROJECT link list package] {
    if {[string is true [$item define get static]]} {
      lappend PKG_OBJS $item
    }
  }
  array set TCL [$TCLOBJ read_configuration]
  if {$path in {{} auto}} {

    set path [file dirname [file normalize $outfile]]
  }
  if {$path eq "."} {
    set path [pwd]
  }
  cd $path
  ###
  # For a static Tcl shell, we need to build all local sources
  # with the same DEFS flags as the tcl core was compiled with.
  # The DEFS produced by a TEA extension aren't intended to operate
  # with the internals of a staticly linked Tcl
  ###
  my build-cflags $PROJECT $TCL(defs) name version defs
  set debug [$PROJECT define get debug 0]
  set NAME [string toupper $name]
  set result {}
  set libraries {}
  set thisline {}
  set OBJECTS {}
  set EXTERN_OBJS {}
  foreach obj $PKG_OBJS {
    $obj compile
    set config($obj) [$obj read_configuration]
  }
  set os [$PROJECT define get TEACUP_OS]
  set TCLSRCDIR [$TCLOBJ define get srcdir]


  set includedir .
  foreach include [$TCLOBJ toolset-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }
  lappend includedir [::practcl::file_relative $path [file normalize ../tcl/compat/zlib]]
  if {[$PROJECT define get static_tk]} {
    lappend includedir [::practcl::file_relative $path [file normalize [file join $TKSRCDIR generic]]]
    lappend includedir [::practcl::file_relative $path [file normalize [file join $TKSRCDIR ttk]]]
    lappend includedir [::practcl::file_relative $path [file normalize [file join $TKSRCDIR xlib]]]
    lappend includedir [::practcl::file_relative $path [file normalize $TKSRCDIR]]
  }

  foreach include [$PROJECT toolset-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }

  set INCLUDES  "-I[join $includedir " -I"]"
  if {$debug} {
      set COMPILE "$TCL(cc) $TCL(shlib_cflags) $TCL(cflags_debug) -ggdb \
$TCL(cflags_warning) $TCL(extra_cflags)"
  } else {
      set COMPILE "$TCL(cc) $TCL(shlib_cflags) $TCL(cflags_optimize) \
$TCL(cflags_warning) $TCL(extra_cflags)"
  }
  append COMPILE " " $defs
  lappend OBJECTS {*}[my build-compile-sources $PROJECT $COMPILE $COMPILE $INCLUDES]

  set TCLSRC [file normalize $TCLSRCDIR]

  if {[${PROJECT} define get TEACUP_OS] eq "windows"} {
    set windres [$PROJECT define get RC windres]
    set RSOBJ [file join $path objs tclkit.res.o]
    set RCSRC [${PROJECT} define get kit_resource_file]
    set RCMAN [${PROJECT} define get kit_manifest_file]
    set RCICO [${PROJECT} define get kit_icon_file]

    set cmd [list $windres -o $RSOBJ -DSTATIC_BUILD --include [::practcl::file_relative $path [file join $TCLSRC generic]]]
    if {[$PROJECT define get static_tk]} {
      if {$RCSRC eq {} || ![file exists $RCSRC]} {
        set RCSRC [file join $TKSRCDIR win rc wish.rc]
      }

      if {$RCMAN eq {} || ![file exists $RCMAN]} {
        set RCMAN [file join [$TKOBJ define get builddir] wish.exe.manifest]
      }
      if {$RCICO eq {} || ![file exists $RCICO]} {
        set RCICO [file join $TKSRCDIR win rc wish.ico]
      }
      set TKSRC [file normalize $TKSRCDIR]
      lappend cmd --include [::practcl::file_relative $path [file join $TKSRC generic]] \
        --include [::practcl::file_relative $path [file join $TKSRC win]] \
        --include [::practcl::file_relative $path [file join $TKSRC win rc]]
    } else {
      if {$RCSRC eq {} || ![file exists $RCSRC]} {
        set RCSRC [file join $TCLSRCDIR win tclsh.rc]
      }
      if {$RCMAN eq {} || ![file exists $RCMAN]} {
        set RCMAN [file join [$TCLOBJ define get builddir] tclsh.exe.manifest]
      }
      if {$RCICO eq {} || ![file exists $RCICO]} {
        set RCICO [file join $TCLSRCDIR win tclsh.ico]
      }
    }
    foreach item [${PROJECT} define get resource_include] {
      lappend cmd --include [::practcl::file_relative $path [file normalize $item]]
    }
    lappend cmd [file tail $RCSRC]
    if {![file exists [file join $path [file tail $RCSRC]]]} {
      file copy -force $RCSRC [file join $path [file tail $RCSRC]]
    }
    if {![file exists [file join $path [file tail $RCMAN]]]} {
      file copy -force $RCMAN [file join $path [file tail $RCMAN]]
    }
    if {![file exists [file join $path [file tail $RCICO]]]} {
      file copy -force $RCICO [file join $path [file tail $RCICO]]
    }
    ::practcl::doexec {*}$cmd
    lappend OBJECTS $RSOBJ
  }
  puts "***"
  set cmd "$TCL(cc)"
  if {$debug} {
   append cmd " $TCL(cflags_debug)"

  } else {
   append cmd " $TCL(cflags_optimize)"


  }
  append cmd " $TCL(ld_flags)"
  if {$debug} {

   append cmd " $TCL(ldflags_debug)"
  } else {
   append cmd " $TCL(ldflags_optimize)"

  }

  append cmd " $OBJECTS"
  append cmd " $EXTERN_OBJS"
  if {$debug && $os eq "windows"} {
    ###
    # There is bug in the core's autoconf and the value for
    # tcl_build_lib_spec does not have the 'g' suffix
    ###
    append cmd " -L[file dirname $TCL(build_stub_lib_path)] -ltcl86g"
    if {[$PROJECT define get static_tk]} {
      append cmd " -L[file dirname $TK(build_stub_lib_path)] -ltk86g"
    }





  } else {
    append cmd " $TCL(build_lib_spec)"
    if {[$PROJECT define get static_tk]} {
      append cmd  " $TK(build_lib_spec)"
    }


  }
  foreach obj $PKG_OBJS {
    append cmd " [$obj linker-products $config($obj)]"
  }
  set LIBS {}
  foreach item $TCL(libs) {
    if {[string range $item 0 1] eq "-l" && $item in $LIBS } continue
    lappend LIBS $item
  }
  if {[$PROJECT define get static_tk]} {
    foreach item $TK(libs) {
      if {[string range $item 0 1] eq "-l" && $item in $LIBS } continue
      lappend LIBS $item
    }
  }
  if {[info exists TCL(extra_libs)]} {
    foreach item $TCL(extra_libs) {
      if {[string range $item 0 1] eq "-l" && $item in $LIBS } continue
      lappend LIBS $item
    }
  }
  foreach obj $PKG_OBJS {
    puts [list Checking $obj for external dependencies]
    foreach item [$obj linker-external $config($obj)] {
      puts [list $obj adds $item]
      if {[string range $item 0 1] eq "-l" && $item in $LIBS } continue
      lappend LIBS $item
    }
  }

  append cmd " ${LIBS}"
  foreach obj $PKG_OBJS {
    puts [list Checking $obj for additional link items]
    foreach item [$obj linker-extra $config($obj)] {
      append cmd $item
    }
  }
  if {$debug && $os eq "windows"} {
    append cmd " -L[file dirname $TCL(build_stub_lib_path)] ${TCL(stub_lib_flag)}"
    if {[$PROJECT define get static_tk]} {
      append cmd " -L[file dirname $TK(build_stub_lib_path)] ${TK(stub_lib_flag)}"
    }
  } else {
    append cmd " $TCL(build_stub_lib_spec)"
    if {[$PROJECT define get static_tk]} {
      append cmd " $TK(build_stub_lib_spec)"
    }
  }
  if {[info exists TCL(cc_search_flags)]} {
    append cmd " $TCL(cc_search_flags)"
  }
  append cmd " -o $outfile "
  if {$os eq "windows"} {
    set LDFLAGS_CONSOLE {-mconsole -pipe -static-libgcc}
    set LDFLAGS_WINDOW  {-mwindows -pipe -static-libgcc}
    append cmd " $LDFLAGS_CONSOLE"
  }
  puts "LINK: $cmd"
  exec {*}[string map [list "\n" " " "  " " "] $cmd] >&@ stdout
}
}

###
# END: class toolset gcc.tcl
###
###
# START: class toolset msvc.tcl
###
::clay::define ::practcl::toolset.msvc {
  superclass ::practcl::toolset
  method BuildDir {PWD} {
    set srcdir [my define get srcdir]
    return $srcdir
  }
  Ensemble make::autodetect {} {
  }
  Ensemble make::clean {} {
    set PWD [pwd]
    set srcdir [my define get srcdir]
    cd $srcdir
    catch {::practcl::doexec nmake -f makefile.vc clean}
    cd $PWD
  }
  Ensemble make::compile {} {
    set srcdir [my define get srcdir]
    if {[my define get static 1]} {
      puts "BUILDING Static $name $srcdir"
    } else {
      puts "BUILDING Dynamic $name $srcdir"
    }
    cd $srcdir
    if {[file exists [file join $srcdir make.tcl]]} {
      if {[my define get debug 0]} {
        ::practcl::domake.tcl $srcdir debug all
      } else {
        ::practcl::domake.tcl $srcdir all
      }
    } else {
      if {[file exists [file join $srcdir makefile.vc]]} {
        ::practcl::doexec nmake -f makefile.vc INSTALLDIR=[my <project> define get installdir]  {*}[my NmakeOpts] release
      } elseif {[file exists [file join $srcdir win makefile.vc]]} {
        cd [file join $srcdir win]
        ::practcl::doexec nmake -f makefile.vc INSTALLDIR=[my <project> define get installdir]  {*}[my NmakeOpts] release
      } else {
        error "No make.tcl or makefile.vc found for project $name"
      }
    }
  }
  Ensemble make::install DEST {
    set PWD [pwd]
    set srcdir [my define get srcdir]
    cd $srcdir
    if {$DEST eq {}} {
      error "No destination given"
    }
    if {[my <project> define get LOCAL 0] || $DEST eq {}} {
      if {[file exists [file join $srcdir make.tcl]]} {
        # Practcl builds can inject right to where we need them
        puts "[self] Local Install (Practcl)"
        ::practcl::domake.tcl $srcdir install
      } else {
        puts "[self] Local Install (Nmake)"
        ::practcl::doexec nmake -f makefile.vc {*}[my NmakeOpts] install
      }
    } else {
      if {[file exists [file join $srcdir make.tcl]]} {
        # Practcl builds can inject right to where we need them
        puts "[self] VFS INSTALL $DEST (Practcl)"
        ::practcl::domake.tcl $srcdir install-package $DEST
      } else {
        puts "[self] VFS INSTALL $DEST"
        ::practcl::doexec nmake -f makefile.vc INSTALLDIR=$DEST {*}[my NmakeOpts] install
      }
    }
    cd $PWD
  }
  method MakeDir {srcdir} {
    set localsrcdir $srcdir
    if {[file exists [file join $srcdir generic]]} {
      my define add include_dir [file join $srcdir generic]
    }
    if {[file exists [file join $srcdir win]]} {
       my define add include_dir [file join $srcdir win]
    }
    if {[file exists [file join $srcdir makefile.vc]]} {
      set localsrcdir [file join $srcdir win]
    }
    return $localsrcdir
  }
  method NmakeOpts {} {
    set opts {}
    set builddir [file normalize [my define get builddir]]

    if {[my <project> define exists tclsrcdir]} {
      ###
      # On Windows we are probably running under MSYS, which doesn't deal with
      # spaces in filename well
      ###
      set TCLSRCDIR  [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tclsrcdir] ..]]]
      set TCLGENERIC [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tclsrcdir] .. generic]]]
      lappend opts TCLDIR=[file normalize $TCLSRCDIR]
      #--with-tclinclude=$TCLGENERIC
    }
    if {[my <project> define exists tksrcdir]} {
      set TKSRCDIR  [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tksrcdir] ..]]]
      set TKGENERIC [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tksrcdir] .. generic]]]
      #lappend opts --with-tk=$TKSRCDIR --with-tkinclude=$TKGENERIC
      lappend opts TKDIR=[file normalize $TKSRCDIR]
    }
    return $opts
  }
}

###
# END: class toolset msvc.tcl
###
###
# START: class target.tcl
###
::clay::define ::practcl::make_obj {
  superclass ::practcl::metaclass
  constructor {module_object name info {action_body {}}} {
    my variable define triggered domake
    set triggered 0
    set domake 0
    set define(name) $name
    set define(action) {}
    array set define $info
    my select
    my initialize
    foreach {stub obj} [$module_object child organs] {
      my graft $stub $obj
    }
    if {$action_body ne {}} {
      set define(action) $action_body
    }
  }
  method do {} {
    my variable domake
    return $domake
  }

  method check {} {
    my variable needs_make domake
    if {$domake} {
      return 1
    }
    if {[info exists needs_make]} {
      return $needs_make
    }
    set make_objects [my <module> make objects]
    set needs_make 0
    foreach item [my define get depends] {
      if {![dict exists $make_objects $item]} continue
      set depobj [dict get $make_objects $item]
      if {$depobj eq [self]} {
        puts "WARNING [self] depends on itself"
        continue
      }
      if {[$depobj check]} {
        set needs_make 1
      }
    }
    if {!$needs_make} {
      foreach filename [my output] {
        if {$filename ne {} && ![file exists $filename]} {
          set needs_make 1
        }
      }
    }
    return $needs_make
  }
  method output {} {
    set result {}
    set filename [my define get filename]
    if {$filename ne {}} {
      lappend result $filename
    }
    foreach filename [my define get files] {
      if {$filename ne {}} {
        lappend result $filename
      }
    }
    return $result
  }
  method reset {} {
    my variable triggered domake needs_make
    set triggerd 0
    set domake 0
    set needs_make 0
  }
  method triggers {} {
    my variable triggered domake define
    if {$triggered} {
      return $domake
    }
    set triggered 1
    set make_objects [my <module> make objects]

    foreach item [my define get depends] {
      if {![dict exists $make_objects $item]} continue
      set depobj [dict get $make_objects $item]
      if {$depobj eq [self]} {
        puts "WARNING [self] triggers itself"
        continue
      } else {
        set r [$depobj check]
        if {$r} {
          $depobj triggers
        }
      }
    }

    set domake 1


    my <module> make trigger {*}[my define get triggers]
  }
}

###
# END: class target.tcl
###
###
# START: class object.tcl
###
::clay::define ::practcl::object {
  superclass ::practcl::metaclass

  constructor {parent args} {
    my variable links define
    set organs [$parent child organs]
    my clay delegate {*}$organs
    array set define $organs
    array set define [$parent child define]
    array set links {}
    if {[llength $args]==1 && [file exists [lindex $args 0]]} {
      my define set filename [lindex $args 0]
      ::practcl::product select [self]
    } elseif {[llength $args] == 1} {
      set data  [uplevel 1 [list subst [lindex $args 0]]]
      array set define $data
      my select

    } else {
      array set define [uplevel 1 [list subst $args]]
      my select

    }

    my initialize



  }








  method child {method} {
    return {}
  }














































  method go {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable links
    foreach {linktype objs} [array get links] {
      foreach obj $objs {
        $obj go
      }
    }
    ::practcl::debug [list /[self] [self method] [self class]]
  }



















































































































































































































































































































































































































































}

###

# END: class object.tcl
###
###

# START: class dynamic.tcl

###



::clay::define ::practcl::dynamic {
  method cstructure {name definition {argdat {}}} {
    my variable cstruct
    dict set cstruct $name body $definition
    foreach {f v} $argdat {
      dict set cstruct $name $f $v
    }
    if {![dict exists $cstruct $name public]} {
      dict set cstruct $name public 1
    }
  }
  method include header {
    my define add include $header
  }
  method include_dir args {
    my define add include_dir {*}$args
  }
  method include_directory args {
    my define add include_dir {*}$args
  }
  method c_header body {
    my variable code
    ::practcl::cputs code(header) $body
  }
  method c_code body {
    my variable code
    ::practcl::cputs code(funct) $body
  }
  method c_function {header body {info {}}} {
    set header [string map "\t \  \n \ \ \  \ " $header]
    my variable code cfunct
    foreach regexp {
         {(.*) ([a-zA-Z_][a-zA-Z0-9_]*) *\((.*)\)}
         {(.*) (\x2a[a-zA-Z_][a-zA-Z0-9_]*) *\((.*)\)}
    } {
      if {[regexp $regexp $header all keywords funcname arglist]} {
        set dat [dict merge {export 0 extern 0 public 1 inline 0} $info]
        dict set dat header $header
        dict set dat body $body
        dict set dat keywords $keywords
        dict set dat arglist $arglist
        if {"IRM_INLINE" in $keywords || "CTHULHU_INLINE" in $keywords} {
          dict set dat public 1
          dict set dat extern 0
          dict set dat inline 1
        } else {
          if {"inline" in $keywords} {
            dict set dat inline 1
          }
          if {"STUB_EXPORT" in $keywords} {
            dict set dat extern 1


            dict set dat public 1
            dict set dat export 1
            dict set dat inline 0
          } elseif {"extern" in $keywords} {
            dict set dat extern 1
            dict set dat public 1
          } elseif {"static" in $keywords} {
            dict set dat public 0

          }


        }
        if {[dict get $dat inline] && [dict get $dat public]} {
          set header [string map {IRM_INLINE {} CTHULHU_INLINE {} static {} inline {} extern {}} [dict get $dat header]]
          dict set dat header "extern $header"



        }
        dict set cfunct $funcname $dat
        return
      }
    }
    puts "WARNING: NON CONFORMING FUNCTION DEFINITION: $headers $body"
    ::practcl::cputs code(header) "$header\;"
    # Could not parse that block as a function
    # append it verbatim to our c_implementation
    ::practcl::cputs code(funct) "$header [list $body]"
  }
  method c_tcloomethod {name body {arginfo {}}} {
    my variable methods code
    foreach {f v} $arginfo {
      dict set methods $name $f $v
    }


    dict set methods $name body "Tcl_Object thisObject = Tcl_ObjectContextObject(objectContext); /* The current connection object */
$body"
  }
  method cmethod {name body {arginfo {}}} {
    my variable methods code
    foreach {f v} $arginfo {
      dict set methods $name $f $v
    }
    dict set methods $name body "Tcl_Object thisObject = Tcl_ObjectContextObject(objectContext); /* The current connection object */
$body"
  }
  method c_tclproc_nspace nspace {
    my variable code
    if {![info exists code(nspace)]} {
      set code(nspace) {}
    }
    if {$nspace ni $code(nspace)} {
      lappend code(nspace) $nspace
    }
  }
  method c_tclcmd {name body {arginfo {}}} {
    my variable tclprocs code

    foreach {f v} $arginfo {
      dict set tclprocs $name $f $v
    }
    dict set tclprocs $name body $body
  }
  method c_tclproc_raw {name body {arginfo {}}} {
    my variable tclprocs code

    foreach {f v} $arginfo {
      dict set tclprocs $name $f $v
    }
    dict set tclprocs $name body $body
  }
  method tcltype {name argdat} {
    my variable tcltype
    foreach {f v} $argdat {
      dict set tcltype $name $f $v
    }
    if {![dict exists tcltype $name cname]} {
      dict set tcltype $name cname [string tolower $name]_tclobjtype
    }
    lappend map @NAME@ $name
    set info [dict get $tcltype $name]
    foreach {f v} $info {
      lappend map @[string toupper $f]@ $v
    }
    foreach {func fpat template} {
      freeproc         {@Name@Obj_freeIntRepProc}       {void @FNAME@(Tcl_Obj *objPtr)}
      dupproc          {@Name@Obj_dupIntRepProc}        {void @FNAME@(Tcl_Obj *srcPtr,Tcl_Obj *dupPtr)}
      updatestringproc {@Name@Obj_updateStringRepProc} {void @FNAME@(Tcl_Obj *objPtr)}
      setfromanyproc   {@Name@Obj_setFromAnyProc}       {int @FNAME@(Tcl_Interp *interp,Tcl_Obj *objPtr)}
    } {
      if {![dict exists $info $func]} {
        error "$name does not define $func"
      }
      set body [dict get $info $func]
      # We were given a function name to call
      if {[llength $body] eq 1} continue
      set fname [string map [list @Name@ [string totitle $name]] $fpat]
      my c_function [string map [list @FNAME@ $fname] $template] [string map $map $body]
      dict set tcltype $name $func $fname
    }
  }
  method project-compile-products {} {
    set filename [my define get output_c]
    set result {}
    if {$filename ne {}} {
      ::practcl::debug [self] [self class] [self method] project-compile-products $filename

      if {[my define exists ofile]} {
        set ofile [my define get ofile]
      } else {
        set ofile [my Ofile $filename]
        my define set ofile $ofile
      }
      lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]]]
    } else {
      set filename [my define get cfile]
      if {$filename ne {}} {
        ::practcl::debug [self] [self class] [self method] project-compile-products $filename
        if {[my define exists ofile]} {
          set ofile [my define get ofile]
        } else {
          set ofile [my Ofile $filename]
          my define set ofile $ofile
        }
        lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]]]
      }
    }
    foreach item [my link list subordinate] {
      lappend result {*}[$item project-compile-products]
    }
    return $result
  }

  method implement path {
    my go
    my Collate_Source $path
    if {[my define get output_c] eq {}} return
    set filename [file join $path [my define get output_c]]
    ::practcl::debug [self] [my define get filename] WANTS TO GENERATE $filename
    my define set cfile $filename
    set fout [open $filename w]
    puts $fout [my generate-c]
    if {[my define get initfunc] ne {}} {
      puts $fout "extern int DLLEXPORT [my define get initfunc]( Tcl_Interp *interp ) \x7B"
      puts $fout [my generate-loader-module]
      if {[my define get pkg_name] ne {}} {
        puts $fout "   Tcl_PkgProvide(interp, \"[my define get pkg_name]\", \"[my define get pkg_vers]\");"
      }
      puts $fout "  return TCL_OK\;"
      puts $fout "\x7D"
    }
    close $fout
  }

  method initialize {} {
    set filename [my define get filename]
    if {$filename eq {}} {
      return
    }
    if {[my define get name] eq {}} {
      my define set name [file tail [file rootname $filename]]
    }
    if {[my define get localpath] eq {}} {
      my define set localpath [my <module> define get localpath]_[my define get name]
    }
    ::source $filename
  }

  method linktype {} {
    return {subordinate product dynamic}
  }




  method generate-cfile-constant {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]















    set result {}
    my variable code cstruct methods tcltype
    if {[info exists code(constant)]} {
      ::practcl::cputs result "/* [my define get filename] CONSTANT */"
      ::practcl::cputs result $code(constant)
    }
    if {[info exists cstruct]} {







|
>

|
|
<
<
|
<
|
<
<
<
<
|
|
<
|
|
|
<
<
<
<
<
<
<
<
<
|
|
<
<
|
|
<
<
<

|
|
<
|
<
<
<
<
<
|
|
|
|
|
|
<
<
|
>
>
>
>
|
|
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
|
|
|
|
>


<
<
|
<
<
<
<
|
<
|
|
|
<
>
|
|
<
>
|
<
<
<
<
<
<
|
<
<
|
>
>
|
|
<
|
>
>
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
|
<
<
<
<
|
<
|
<
<
<
|
|
<
<
>
>
>
>
>
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
<
|
<
<
|
|
|
>
|
>
>
|
<
|
|
<
|
<
|
<
<
<
|
|
>

|
|
|
|
>
|
<
>
|
<
|

>

>

<
<
<
<
<
<
<
<
|
|
|
|
<
|
|
|
<
<
|
<
|
<
<
>
>
>
|
|
>
>
|
|
<
>
<
<
<
<
|
|
>
>
>
>
|
|
|
>
|
<
|
<
<
|
|
<
|
<
|
>
>
>
>
|
|
|
<
<
<
<
<
>
|
|
|
>
>
|
<
>
>
>
|
<
<
<
<
<
<
<
<
|
<
<
>
>
|
<
>
>
|
<
|
>
>
>
|
>
>
>
|
|
<
<
|
|
<
|
|
|
|
|
<
|
<
<
|
<
<
|
<
<
<
|
<
<
|
<
<
<
<
<
<
<
|
|
>
|
>
>
|
|
>
>
>
|
|
<
<
<
|
<
>
>
|
>
<
<
<
|
>
>
>
|
|
>
>
>
|
|
>
>
>
|
<
<
<
<
|
<
<
|
|
<
<
|
|
|
<
|
|
<
|
>
|
<
<
<
<
<
<
<
<
<
<
|
|
|
<
<
<
|
<
<
<
<
|
>
|
>
|
<
<
<
<
<
<
<
>
|
>
>
>
>
|
<
<
<
>
|
|
<
<
<
<
|
<
|
>
>
>
>

<
<
<
|
|
<
<
<
<
<
<
|
<
>
|
<
|
<
>

<
|
<
<
<
>
|
>
>
>
>
>
|
|
>
>
>
>


|
<
<
<
|
<
|
<
<
|
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
|
>
|
>
>
>
>
|
<
|
|
<
|
|
|
|
|
|
>
>
|
|
|
|
|
<
|
|
>
>
>
>
>
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
|
<
|
|
|
|
|
>
>
|
>
>
|
|
|
|
|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
|
|
|
|
|
|
|
|
|
|
<
|
|
|
|
|
|
|
<
|
|
>
>
>
>
|
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
|
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
>
|




<
<



|
















|

<





|

|















|


















|


















>
>
>
>
|






<
<
<
<
<
<
<
<

<




<
<
<
<
<
<
<


|





|


|








|


|

|


|




|
|
|

|




















|

<
<
<
|
|
>
>
>
|
<
|
|
<
<
<
<
<
<
<
<
|
<
|
<
<
<
<
<
<
<

<
<
<
<
<





|
<
>
|
<
<
<
<







|









|

|
|
>


|






<
<
<
<
<
<
<
|





|



|


|


|
|
<
<
|
<
|

<
<
<
<
<
|
|
|
>
|
|
|
<
|
<
<
|
|
|
<
<
<
<
<
<
<
<
<
<
<



|
<
<
|
<
<
|
<
<
<
<

<
<
|
<
<
>

<
>
>

<

>
|

|
>

<
|
|
<
|
<
<
|
<
|
|
|
>
>
>
>
>
|
|
<
|

>
>




<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
|
<
<
<
|
|
>
|
<
<
<
|
|
<
<
|
<
|



<
|
|
<
<
<
<
|
<
<
<
<
<

|

|
|
<
<
<
<
<
<
<
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|




|
|


<
<
|
<
<
|
<




>








<


|
|









|
|
|
<




<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<






<
<

|
|










>
|
>
>
|



|
<

<
|

|

>



|




|
<




>



>

>
|

>
>

>
>
>
>
>
>
>
>



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|






|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


<
>
|
|
<
>
|
>
|
>
>
>
|






<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
>
>
|
|
<
|
<
<
<
<
>
|
>
>
|
<
<
<
>
>
>
|
<
|
|
|
<
<
<
<
<
<
<
<
<
<
|
>
>
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
<
<
<
<
|
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|



<
<










<










|



>





<



<
|
|
|
|
|
|
|
<


>













>



>
>
>
>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023


1024

1025




1026
1027

1028
1029
1030









1031
1032


1033
1034



1035
1036
1037

1038





1039
1040
1041
1042
1043
1044


1045
1046
1047
1048
1049
1050
1051









1052






1053
1054
1055
1056
1057
1058
1059


1060




1061

1062
1063
1064

1065
1066
1067

1068
1069






1070


1071
1072
1073
1074
1075

1076
1077
1078



1079













1080




1081




1082

1083



1084
1085


1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099













1100
1101
1102

1103


1104
1105
1106
1107
1108
1109
1110
1111

1112
1113

1114

1115



1116
1117
1118
1119
1120
1121
1122
1123
1124
1125

1126
1127

1128
1129
1130
1131
1132
1133








1134
1135
1136
1137

1138
1139
1140


1141

1142


1143
1144
1145
1146
1147
1148
1149
1150
1151

1152




1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163

1164


1165
1166

1167

1168
1169
1170
1171
1172
1173
1174
1175





1176
1177
1178
1179
1180
1181
1182

1183
1184
1185
1186








1187


1188
1189
1190

1191
1192
1193

1194
1195
1196
1197
1198
1199
1200
1201
1202
1203


1204
1205

1206
1207
1208
1209
1210

1211


1212


1213



1214


1215







1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228



1229

1230
1231
1232
1233



1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248




1249


1250
1251


1252
1253
1254

1255
1256

1257
1258
1259










1260
1261
1262



1263




1264
1265
1266
1267
1268







1269
1270
1271
1272
1273
1274
1275



1276
1277
1278




1279

1280
1281
1282
1283
1284
1285



1286
1287






1288

1289
1290

1291

1292
1293

1294



1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310



1311

1312


1313
1314
1315















1316
1317


1318
1319
1320
1321
1322
1323
1324
1325

1326
1327

1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340

1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356







1357

1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376

1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387







1388
1389
1390
1391
1392
1393
1394
1395
1396
1397

1398
1399
1400
1401
1402
1403
1404

1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465


1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487

1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559








1560

1561
1562
1563
1564







1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624



1625
1626
1627
1628
1629
1630

1631
1632








1633

1634







1635





1636
1637
1638
1639
1640
1641

1642
1643




1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674







1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692


1693

1694
1695





1696
1697
1698
1699
1700
1701
1702

1703


1704
1705
1706











1707
1708
1709
1710


1711


1712




1713


1714


1715
1716

1717
1718
1719

1720
1721
1722
1723
1724
1725
1726

1727
1728

1729


1730

1731
1732
1733
1734
1735
1736
1737
1738
1739
1740

1741
1742
1743
1744
1745
1746
1747
1748

1749















1750

1751



1752
1753
1754
1755



1756
1757


1758

1759
1760
1761
1762

1763
1764




1765





1766
1767
1768
1769
1770







1771



1772











































































































1773
1774
1775
1776
1777
1778
1779
1780
1781


1782


1783

1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796

1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812

1813
1814
1815
1816





1817













1818
1819
1820
1821
1822
1823


1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845

1846

1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860

1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380

2381
2382
2383

2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397


2398






































2399


2400
2401
2402
2403

2404




2405
2406
2407
2408
2409



2410
2411
2412
2413

2414
2415
2416










2417
2418
2419
2420



2421

















2422
2423
2424
2425




2426


2427
































2428
2429
2430
2431


2432
2433
2434
2435
2436
2437
2438
2439
2440
2441

2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461

2462
2463
2464

2465
2466
2467
2468
2469
2470
2471

2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
        return $links($linktype)
      }
      dump {
        return [array get links]
      }
    }
  }
  
  method select {} {
    my variable define
    set class {}
    if {[info exists define(class)]} {


      if {[info command $define(class)] ne {}} {

        set class $define(class)




      } elseif {[info command ::practcl::$define(class)] ne {}} {
        set class ::practcl::$define(class)

      } else {
        switch $define(class) {
          default {









            set class ::practcl::object
          }


        }
      }



    }
    if {$class ne {}} {
      ::oo::objdefine [self] class $class

    }





    if {[::info exists define(oodefine)]} {
      ::oo::objdefine [self] $define(oodefine)
      unset define(oodefine)
    }
  }
}



proc ::practcl::trigger {args} {
  foreach name $args {
    if {[dict exists $::make_objects $name]} {
      [dict get $::make_objects $name] triggers
    }
  }









}







proc ::practcl::depends {args} {
  foreach name $args {
    if {[dict exists $::make_objects $name]} {
      [dict get $::make_objects $name] check
    }
  }


}






proc ::practcl::target {name info} {
  set obj [::practcl::target_obj new $name $info]
  dict set ::make_objects $name $obj

  if {[dict exists $info aliases]} {
    foreach item [dict get $info aliases] {
      if {![dict exists $::make_objects $item]} {

        dict set ::make_objects $item $obj
      }






    }


  }
  set ::make($name) 0
  set ::trigger($name) 0
  set filename [$obj define get filename]
  if {$filename ne {}} {

    set ::target($name) $filename
  }
}

















### Batch Tasks









namespace eval ::practcl::build {}





## method DEFS
# This method populates 4 variables:


# name - The name of the package
# version - The version of the package
# defs - C flags passed to the compiler
# includedir - A list of paths to feed to the compiler for finding headers
#
proc ::practcl::build::DEFS {PROJECT DEFS namevar versionvar defsvar} {
  upvar 1 $namevar name $versionvar version NAME NAME $defsvar defs
  set name [string tolower [${PROJECT} define get name [${PROJECT} define get pkg_name]]]
  set NAME [string toupper $name]
  set version [${PROJECT} define get version [${PROJECT} define get pkg_vers]]
  if {$version eq {}} {
    set version 0.1a
  }
  set defs {}













  append defs " -DPACKAGE_NAME=\"${name}\" -DPACKAGE_VERSION=\"${version}\""
  append defs " -DPACKAGE_TARNAME=\"${name}\" -DPACKAGE_STRING=\"${name}\x5c\x20${version}\""
  set NAME [string toupper $name]

  set idx 0


  set count 0
  while {$idx>=0} {
    set ndx [string first " -D" $DEFS $idx+1]
    set item [string range $DEFS $idx $ndx]
    set item [string trim $item]
    set item [string trimleft $item -D]
    if {[string range $item 0 7] eq "PACKAGE_"} {
      set idx $ndx

      continue
    }

    set eqidx [string first = $item ]

    if {$eqidx < 0} {



      append defs { } $item
      set idx $ndx
      continue
    }

    set field [string range $item 0 [expr {$eqidx-1}]]
    set value [string range $item [expr {$eqidx+1}] end]
    set emap {}
    lappend emap \x5c \x5c\x5c \x20 \x5c\x20 \x22 \x5c\x22 \x28 \x5c\x28 \x29 \x5c\x29
    if {[string is integer -strict $value]} {

      append defs " -D${field}=$value"
    } else {

      append defs " -D${field}=[string map $emap $value]"
    }
    set idx $ndx
  }
  return $defs
}








  
proc ::practcl::build::tclkit_main {PROJECT PKG_OBJS} {
  ###
  # Build static package list

  ###
  set statpkglist {}
  dict set statpkglist Tk {autoload 0}  


  foreach {ofile info} [${PROJECT} compile-products] {

    if {![dict exists $info object]} continue


    set cobj [dict get $info object]
    foreach {pkg info} [$cobj static-packages] {
      dict set statpkglist $pkg $info
    }
  }
  foreach cobj [list {*}${PKG_OBJS} $PROJECT] {
    foreach {pkg info} [$cobj static-packages] {
      dict set statpkglist $pkg $info
    }

  }




  
  set result {}
  $PROJECT include {<tcl.h>}
  $PROJECT include {"tclInt.h"}
  $PROJECT include {"tclFileSystem.h"}
  $PROJECT include {<assert.h>}
  $PROJECT include {<stdio.h>}
  $PROJECT include {<stdlib.h>}
  $PROJECT include {<string.h>}
  $PROJECT include {<math.h>}
  

  $PROJECT code header {


#ifndef MODULE_SCOPE
#   define MODULE_SCOPE extern

#endif


/*
** Provide a dummy Tcl_InitStubs if we are using this as a static
** library.
*/
#ifndef USE_TCL_STUBS
# undef  Tcl_InitStubs
# define Tcl_InitStubs(a,b,c) TCL_VERSION





#endif
#define STATIC_BUILD 1
#undef USE_TCL_STUBS

/* Make sure the stubbed variants of those are never used. */
#undef Tcl_ObjSetVar2
#undef Tcl_NewStringObj

#undef Tk_Init
#undef Tk_MainEx
#undef Tk_SafeInit
}








  


  # Build an area of the file for #define directives and
  # function declarations
  set define {}

  set mainhook   [$PROJECT define get TCL_LOCAL_MAIN_HOOK Tclkit_MainHook]
  set mainfunc   [$PROJECT define get TCL_LOCAL_APPINIT Tclkit_AppInit]
  set mainscript [$PROJECT define get main.tcl main.tcl]

  set vfsroot    [$PROJECT define get vfsroot  zipfs:/app]
  set vfs_main "${vfsroot}/${mainscript}"
  set vfs_tcl_library "${vfsroot}/boot/tcl"
  set vfs_tk_library "${vfsroot}/boot/tk"
  
  set map {}
  foreach var {
    vfsroot mainhook mainfunc vfs_main vfs_tcl_library vfs_tk_library
  } {
    dict set map %${var}% [set $var]


  }
  set preinitscript {

set ::odie(boot_vfs) {%vfsroot%}
set ::SRCDIR {%vfsroot%}
if {[file exists {%vfs_tcl_library%}]} {
  set ::tcl_library {%vfs_tcl_library%}
  set ::auto_path {}

}


if {[file exists {%vfs_tk_library%}]} {


  set ::tk_library {%vfs_tk_library%}



}


} ; # Preinitscript








  set zvfsboot {
/*
 * %mainhook% --
 * Performs the argument munging for the shell
 */
  }
  ::practcl::cputs zvfsboot {
  CONST char *archive;
  Tcl_FindExecutable(*argv[0]);
  archive=Tcl_GetNameOfExecutable();

  Tclzipfs_Init(NULL);



  }

  # We have to initialize the virtual filesystem before calling
  # Tcl_Init().  Otherwise, Tcl_Init() will not be able to find
  # its startup script files.
  $PROJECT include {"tclZipfs.h"}



  
  ::practcl::cputs zvfsboot "  if(!Tclzipfs_Mount(NULL, archive, \"%vfsroot%\", NULL)) \x7B "
  ::practcl::cputs zvfsboot {
    Tcl_Obj *vfsinitscript;
    vfsinitscript=Tcl_NewStringObj("%vfs_main%",-1);
    Tcl_IncrRefCount(vfsinitscript);
    if(Tcl_FSAccess(vfsinitscript,F_OK)==0) {
      /* Startup script should be set before calling Tcl_AppInit */
      Tcl_SetStartupScript(vfsinitscript,NULL);
    }
  }
  ::practcl::cputs zvfsboot "    TclSetPreInitScript([::practcl::tcl_to_c $preinitscript])\;"
  ::practcl::cputs zvfsboot "  \x7D else \x7B"
  ::practcl::cputs zvfsboot "    TclSetPreInitScript([::practcl::tcl_to_c {
foreach path {




  ../tcl


} {
  set p  [file join $path library init.tcl]


  if {[file exists [file join $path library init.tcl]]} {
    set ::tcl_library [file normalize [file join $path library]]
    break

  }
}

foreach path {
  ../tk
} {










  if {[file exists [file join $path library tk.tcl]]} {
    set ::tk_library [file normalize [file join $path library]]
    break



  }




}
}])\;"

  ::practcl::cputs zvfsboot "  \x7D"








  ::practcl::cputs zvfsboot "  return TCL_OK;"
  
  if {[$PROJECT define get os] eq "windows"} {
    set header {int %mainhook%(int *argc, TCHAR ***argv)}
  } else {
    set header {int %mainhook%(int *argc, char ***argv)}
  }



  $PROJECT c_function  [string map $map $header] [string map $map $zvfsboot]
  
  practcl::cputs appinit "int %mainfunc%(Tcl_Interp *interp) \x7B"




  

  # Build AppInit()
  set appinit {}
  practcl::cputs appinit {  
  if ((Tcl_Init)(interp) == TCL_ERROR) {
      return TCL_ERROR;
  }



}
  set main_init_script {}






  

  foreach {statpkg info} $statpkglist {
    set initfunc {}

    if {[dict exists $info initfunc]} {

      set initfunc [dict get $info initfunc]
    }

    if {$initfunc eq {}} {



      set initfunc [string totitle ${statpkg}]_Init
    }
    # We employ a NULL to prevent the package system from thinking the
    # package is actually loaded into the interpreter
    $PROJECT code header "extern Tcl_PackageInitProc $initfunc\;\n"
    set script [list package ifneeded $statpkg [dict get $info version] [list ::load {} $statpkg]]
    append main_init_script \n [list set ::kitpkg(${statpkg}) $script]
    if {[dict get $info autoload]} {
      ::practcl::cputs appinit "  if(${initfunc}(interp)) return TCL_ERROR\;"      
      ::practcl::cputs appinit "  Tcl_StaticPackage(interp,\"$statpkg\",$initfunc,NULL)\;"
    } else {
      ::practcl::cputs appinit "\n  Tcl_StaticPackage(NULL,\"$statpkg\",$initfunc,NULL)\;"
      append main_init_script \n $script
    }
  }
  append main_init_script \n {



if {[file exists [file join $::SRCDIR packages.tcl]]} {

  #In a wrapped exe, we don't go out to the environment


  set dir $::SRCDIR
  source [file join $::SRCDIR packages.tcl]
}















# Specify a user-specific startup file to invoke if the application
# is run interactively.  Typically the startup file is "~/.apprc"


# where "app" is the name of the application.  If this line is deleted
# then no user-specific startup file will be run under any conditions.
  }
  append main_init_script \n [list set tcl_rcFileName [$PROJECT define get tcl_rcFileName ~/.tclshrc]]
  practcl::cputs appinit "  Tcl_Eval(interp,[::practcl::tcl_to_c  $main_init_script]);"
  practcl::cputs appinit {  return TCL_OK;}
  $PROJECT c_function [string map $map "int %mainfunc%(Tcl_Interp *interp)"] [string map $map $appinit]
}


proc ::practcl::build::compile-sources {PROJECT COMPILE {CPPCOMPILE {}}} {

  set EXTERN_OBJS {}
  set OBJECTS {}
  set result {}
  set builddir [$PROJECT define get builddir]
  file mkdir [file join $builddir objs]
  set debug [$PROJECT define get debug 0]
  if {$CPPCOMPILE eq {}} {
    set CPPCOMPILE $COMPILE
  }
  set task [${PROJECT} compile-products]
  ###
  # Compile the C sources
  ###

  foreach {ofile info} $task {
    dict set task $ofile done 0
    if {[dict exists $info external] && [dict get $info external]==1} {
      dict set task $ofile external 1
    } else {
      dict set task $ofile external 0
    }
    if {[dict exists $info library]} {
      dict set task $ofile done 1
      continue
    }
    # Products with no cfile aren't compiled
    if {![dict exists $info cfile] || [set cfile [dict get $info cfile]] eq {}} {
      dict set task $ofile done 1
      continue
    }







    set cfile [dict get $info cfile]

    set ofilename [file join $builddir objs [file tail $ofile]]
    if {$debug} {
      set ofilename [file join $builddir objs [file rootname [file tail $ofile]].debug.o]
    }
    dict set task $ofile filename $ofilename
    if {[file exists $ofilename] && [file mtime $ofilename]>[file mtime $cfile]} {
      lappend result $ofilename
      dict set task $ofile done 1
      continue
    }
    if {![dict exist $info command]} {
      if {[file extension $cfile] in {.c++ .cpp}} {
        set cmd $CPPCOMPILE
      } else {
        set cmd $COMPILE
      }
      if {[dict exists $info extra]} {
        append cmd " [dict get $info extra]"
      }

      append cmd " -c $cfile"
      append cmd " -o $ofilename"
      dict set task $ofile command $cmd
    }
  }
  set completed 0
  while {$completed==0} {
    set completed 1
    foreach {ofile info} $task {
      set waiting {}
      if {[dict exists $info done] && [dict get $info done]} continue







      if {[dict exists $info depend]} {
        foreach file [dict get $info depend] {
          if {[dict exists $task $file command] && [dict exists $task $file done] && [dict get $task $file done] != 1} {
            set waiting $file
            break
          }
        }
      }
      if {$waiting ne {}} {
        set completed 0

        continue
      }
      if {[dict exists $info command]} {
        set cmd [dict get $info command]
        puts "$cmd"
        exec {*}$cmd >&@ stdout
      }

      lappend result [dict get $info filename]
      dict set task $ofile done 1
    }
  }
  return $result
}

proc ::practcl::de_shell {data} {
  set values {}
  foreach flag {DEFS TCL_DEFS TK_DEFS} {
    if {[dict exists $data $flag]} {
      set value {}
      foreach item [dict get $data $flag] {
        append value " " [string map {{ } {\ }} $item]
      }
      dict set values $flag $value
    }
  }
  set map {}
  lappend map {${PKG_OBJECTS}} %LIBRARY_OBJECTS%
  lappend map {$(PKG_OBJECTS)} %LIBRARY_OBJECTS%
  lappend map {${PKG_STUB_OBJECTS}} %LIBRARY_STUB_OBJECTS%
  lappend map {$(PKG_STUB_OBJECTS)} %LIBRARY_STUB_OBJECTS%
  
  lappend map %LIBRARY_NAME% [dict get $data name]   
  lappend map %LIBRARY_VERSION% [dict get $data version]
  lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} [dict get $data version]]
  if {[dict exists $data libprefix]} {
    lappend map %LIBRARY_PREFIX% [dict get $data libprefix]
  } else {
    lappend map %LIBRARY_PREFIX% [dict get $data prefix]
  }
  foreach flag [dict keys $data] {
    if {$flag in {TCL_DEFS TK_DEFS DEFS}} continue

    dict set map "%${flag}%" [dict get $data $flag]
    dict set map "\$\{${flag}\}" [dict get $data $flag]
    dict set map "\$\(${flag}\)" [dict get $data $flag]
    dict set values $flag [dict get $data $flag]
    #dict set map "\$\{${flag}\}" $proj($flag)
  }
  set changed 1
  while {$changed} {
    set changed 0
    foreach {field value} $values {
      if {$field in {TCL_DEFS TK_DEFS DEFS}} continue
      dict with values {}
      set newval [string map $map $value]
      if {$newval eq $value} continue
      set changed 1
      dict set values $field $newval
    }
  }
  return $values
}

proc ::practcl::build::Makefile {path PROJECT} {
  array set proj [$PROJECT define dump]
  set path $proj(builddir)
  cd $path
  set includedir .


  #lappend includedir [::practcl::file_relative $path $proj(TCL_INCLUDES)]
  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TCL_SRC_DIR) generic]]]
  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(srcdir) generic]]]
  foreach include [$PROJECT generate-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }
  set INCLUDES  "-I[join $includedir " -I"]"
  set NAME [string toupper $proj(name)]
  set result {}
  set products {}
  set libraries {}
  set thisline {}
  ::practcl::cputs result "${NAME}_DEFS = $proj(DEFS)\n"
  ::practcl::cputs result "${NAME}_INCLUDES = -I\"[join $includedir "\" -I\""]\"\n"
  ::practcl::cputs result "${NAME}_COMPILE = \$(CC) \$(CFLAGS) \$(PKG_CFLAGS) \$(${NAME}_DEFS) \$(${NAME}_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(AM_CFLAGS)"
  ::practcl::cputs result "${NAME}_CPPCOMPILE = \$(CXX) \$(CFLAGS) \$(PKG_CFLAGS) \$(${NAME}_DEFS) \$(${NAME}_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(AM_CFLAGS)"

  foreach {ofile info} [$PROJECT compile-products] {
    dict set products $ofile $info

    if {[dict exists $info library]} {
lappend libraries $ofile
continue
    }
    if {[dict exists $info depend]} {
      ::practcl::cputs result "\n${ofile}: [dict get $info depend]"
    } else {
      ::practcl::cputs result "\n${ofile}:"
    }
    set cfile [dict get $info cfile]
    if {[file extension $cfile] in {.c++ .cpp}} {
      set cmd "\t\$\(${NAME}_CPPCOMPILE\)"
    } else {
      set cmd "\t\$\(${NAME}_COMPILE\)"
    }
    if {[dict exists $info extra]} {
      append cmd " [dict get $info extra]"
    }
    append cmd " -c [dict get $info cfile] -o \$@\n\t"
    ::practcl::cputs result  $cmd
  }

  set map {}
  lappend map %LIBRARY_NAME% $proj(name)    
  lappend map %LIBRARY_VERSION% $proj(version)
  lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $proj(version)]
  lappend map %LIBRARY_PREFIX% [$PROJECT define getnull libprefix]

  if {[string is true [$PROJECT define get SHARED_BUILD]]} {
    set outfile [$PROJECT define get libfile]
  } else {
    set outfile [$PROJECT shared_library]
  }
  $PROJECT define set shared_library $outfile
  ::practcl::cputs result "
${NAME}_SHLIB = $outfile
${NAME}_OBJS = [dict keys $products]
"

  #lappend map %OUTFILE% {\[$]@}
  lappend map %OUTFILE% $outfile
  lappend map %LIBRARY_OBJECTS% "\$(${NAME}_OBJS)"
  ::practcl::cputs result "$outfile: \$(${NAME}_OBJS)" 
  ::practcl::cputs result "\t[string map $map [$PROJECT define get PRACTCL_SHARED_LIB]]"
  if {[$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL] ni {: {}}} {
    ::practcl::cputs result "\t[string map $map [$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL]]"
  }
  ::practcl::cputs result {}
  if {[string is true [$PROJECT define get SHARED_BUILD]]} {
    #set outfile [$PROJECT static_library]
    set outfile $proj(name).a
  } else {
    set outfile [$PROJECT define get libfile]
  }
  $PROJECT define set static_library $outfile
  dict set map %OUTFILE% $outfile
  ::practcl::cputs result "$outfile: \$(${NAME}_OBJS)"
  ::practcl::cputs result "\t[string map $map [$PROJECT define get PRACTCL_STATIC_LIB]]"
  ::practcl::cputs result {}
  return $result
}

###
# Produce a dynamic library
###
proc ::practcl::build::library {outfile PROJECT} {
  array set proj [$PROJECT define dump]
  set path $proj(builddir)
  cd $path
  set includedir .
  #lappend includedir [::practcl::file_relative $path $proj(TCL_INCLUDES)]
  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TCL_SRC_DIR) generic]]]








  lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(srcdir) generic]]]

  if {[$PROJECT define get tk 0]} {
    lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) generic]]]
    lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) ttk]]]
    lappend includedir [::practcl::file_relative $path [file normalize [file join $proj(TK_SRC_DIR) xlib]]]







    lappend includedir [::practcl::file_relative $path [file normalize $proj(TK_BIN_DIR)]]
  }
  foreach include [$PROJECT generate-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }
  ::practcl::build::DEFS $PROJECT $proj(DEFS) name version defs
  set NAME [string toupper $name]
  set debug [$PROJECT define get debug 0]
  set os [$PROJECT define get os]

  set INCLUDES  "-I[join $includedir " -I"]"
  if {$debug} {
    set COMPILE "$proj(CC) $proj(CFLAGS_DEBUG) -ggdb \
$proj(CFLAGS_WARNING) $INCLUDES $defs"

    if {[info exists proc(CXX)]} {
      set COMPILECPP "$proj(CXX) $defs $INCLUDES $proj(CFLAGS_DEBUG) -ggdb \
  $proj(DEFS) $proj(CFLAGS_WARNING)"
    } else {
      set COMPILECPP $COMPILE
    }    
  } else {
    set COMPILE "$proj(CC) $proj(CFLAGS) $defs $INCLUDES "

    if {[info exists proc(CXX)]} {
      set COMPILECPP "$proj(CXX) $defs $INCLUDES $proj(CFLAGS) $proj(DEFS)"
    } else {
      set COMPILECPP $COMPILE
    }
  }
  
  set products [compile-sources $PROJECT $COMPILE $COMPILECPP]
  
  set map {}
  lappend map %LIBRARY_NAME% $proj(name)    
  lappend map %LIBRARY_VERSION% $proj(version)
  lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $proj(version)]
  lappend map %OUTFILE% $outfile
  lappend map %LIBRARY_OBJECTS% $products
  lappend map {${CFLAGS}} "$proj(CFLAGS_DEFAULT) $proj(CFLAGS_WARNING)"

  if {[string is true [$PROJECT define get SHARED_BUILD 1]]} {
    set cmd [$PROJECT define get PRACTCL_SHARED_LIB]
    append cmd " [$PROJECT define get PRACTCL_LIBS]"
    set cmd [string map $map $cmd]
    puts $cmd
    exec {*}$cmd >&@ stdout
    if {[$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL] ni {: {}}} {
      set cmd [string map $map [$PROJECT define get PRACTCL_VC_MANIFEST_EMBED_DLL]]
      puts $cmd
      exec {*}$cmd >&@ stdout
    }
  } else {
    set cmd [string map $map [$PROJECT define get PRACTCL_STATIC_LIB]]
    puts $cmd
    exec {*}$cmd >&@ stdout    
  }



}

###
# Produce a static executable
###
proc ::practcl::build::static-tclsh {outfile PROJECT} {

  set TCLOBJ [$PROJECT project TCLCORE]
  set TKOBJ  [$PROJECT project TKCORE]








  set ODIEOBJ  [$PROJECT project odie]









  set PKG_OBJS {}





  foreach item [$PROJECT link list package] {
    if {[string is true [$item define get static]]} {
      lappend PKG_OBJS $item
    }
  }
  array set TCL [$TCLOBJ config.sh]

  array set TK  [$TKOBJ config.sh]
  set path [file dirname $outfile]




  cd $path
  ###
  # For a static Tcl shell, we need to build all local sources
  # with the same DEFS flags as the tcl core was compiled with.
  # The DEFS produced by a TEA extension aren't intended to operate
  # with the internals of a staticly linked Tcl
  ###
  ::practcl::build::DEFS $PROJECT $TCL(defs) name version defs
  set debug [$PROJECT define get debug 0]
  set NAME [string toupper $name]
  set result {}
  set libraries {}
  set thisline {}
  set OBJECTS {}
  set EXTERN_OBJS {}
  foreach obj $PKG_OBJS {
    $obj compile
    set config($obj) [$obj config.sh]
  }
  set os [$PROJECT define get os]
  set TCLSRCDIR [$TCLOBJ define get srcroot]
  set TKSRCDIR [$TKOBJ define get srcroot]

  set includedir .
  foreach include [$TCLOBJ generate-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }
  lappend includedir [::practcl::file_relative $path [file normalize ../tcl/compat/zlib]]







  foreach include [$PROJECT generate-include-directory] {
    set cpath [::practcl::file_relative $path [file normalize $include]]
    if {$cpath ni $includedir} {
      lappend includedir $cpath
    }
  }
  
  set INCLUDES  "-I[join $includedir " -I"]"
  if {$debug} {
      set COMPILE "$TCL(cc) $TCL(shlib_cflags) $TCL(cflags_debug) -ggdb \
$TCL(cflags_warning) $TCL(extra_cflags) $INCLUDES"
  } else {
      set COMPILE "$TCL(cc) $TCL(shlib_cflags) $TCL(cflags_optimize) \
$TCL(cflags_warning) $TCL(extra_cflags) $INCLUDES"    
  }
  append COMPILE " " $defs
  lappend OBJECTS {*}[compile-sources $PROJECT $COMPILE $COMPILE]
  


  if {[${PROJECT} define get platform] eq "windows"} {

    set RSOBJ [file join $path build tclkit.res.o]
    set RCSRC [${PROJECT} define get kit_resource_file]





    if {$RCSRC eq {} || ![file exists $RCSRC]} {
      set RCSRC [file join $TKSRCDIR win rc wish.rc]        
    }
    set cmd [list  windres -o $RSOBJ -DSTATIC_BUILD]
    set TCLSRC [file normalize $TCLSRCDIR]
    set TKSRC [file normalize $TKSRCDIR]


    lappend cmd         --include [::practcl::file_relative $path [file join $TCLSRC generic]] \


      --include [::practcl::file_relative $path [file join $TKSRC generic]] \
      --include [::practcl::file_relative $path [file join $TKSRC win]] \
      --include [::practcl::file_relative $path [file join $TKSRC win rc]]











    foreach item [${PROJECT} define get resource_include] {
      lappend cmd --include [::practcl::file_relative $path [file normalize $item]]
    }
    lappend cmd $RCSRC


    doexec {*}$cmd







    lappend OBJECTS $RSOBJ


    set LDFLAGS_CONSOLE {-mconsole -pipe -static-libgcc}


    set LDFLAGS_WINDOW  {-mwindows -pipe -static-libgcc}
  } else {

    set LDFLAGS_CONSOLE {}
    set LDFLAGS_WINDOW  {}
  }

  if {$debug} {
    set cmd "$TCL(cc) $TCL(shlib_cflags) $TCL(cflags_debug) \
$TCL(cflags_warning) $TCL(extra_cflags) $INCLUDES"
  } else {
    set cmd "$TCL(cc) $TCL(shlib_cflags) $TCL(cflags_optimize) \
$TCL(cflags_warning) $TCL(extra_cflags) $INCLUDES"
  }

  append cmd " $OBJECTS"  
  append cmd " $EXTERN_OBJS "

  # On OSX it is impossibly to generate a completely static


  # executable

  if {[$PROJECT define get TEACUP_OS] ne "macosx"} {
    append cmd " -static "
  }
  parray TCL
  if {$debug} {
    if {$os eq "windows"} {
      append cmd " -L${TCL(src_dir)}/win -ltcl86g"
      append cmd " -L${TK(src_dir)}/win -ltk86g"      
    } else {
      append cmd " -L${TCL(src_dir)}/unix -ltcl86g"

      append cmd " -L${TK(src_dir)}/unix -ltk86g"    
    }
  } else {
    append cmd " $TCL(build_lib_spec) $TK(build_lib_spec)"
  }
  foreach obj $PKG_OBJS {
    append cmd " [$obj linker-products $config($obj)]"
  }

  append cmd " $TCL(libs) $TK(libs)"















  foreach obj $PKG_OBJS {

    append cmd " [$obj linker-external $config($obj)]"



  }
  if {$debug} {
    if {$os eq "windows"} {
      append cmd " -L${TCL(src_dir)}/win ${TCL(stub_lib_flag)}"



      append cmd " -L${TK(src_dir)}/win ${TK(stub_lib_flag)}"      
    } else {


      append cmd " -L${TCL(src_dir)}/unix ${TCL(stub_lib_flag)}"

      append cmd " -L${TK(src_dir)}/unix ${TK(stub_lib_flag)}"    
    }
  } else {
    append cmd " $TCL(build_stub_lib_spec)"

    append cmd " $TK(build_stub_lib_spec)"
  }




  append cmd " -o $outfile $LDFLAGS_CONSOLE"





  puts "LINK: $cmd"
  exec {*}$cmd >&@ stdout
}

::oo::class create ::practcl::target_obj {







  superclass ::practcl::metaclass















































































































  constructor {name info} {
    my variable define triggered domake
    set triggered 0
    set domake 0
    set define(name) $name
    set data  [uplevel 2 [list subst $info]]
    array set define $data
    my select
    my initialize


  }


  

  method do {} {
    my variable domake
    return $domake
  }
  
  method check {} {
    my variable needs_make domake
    if {$domake} {
      return 1
    }
    if {[info exists needs_make]} {
      return $needs_make
    }

    set needs_make 0
    foreach item [my define get depends] {
      if {![dict exists $::make_objects $item]} continue
      set depobj [dict get $::make_objects $item]
      if {$depobj eq [self]} {
        puts "WARNING [self] depends on itself"
        continue
      }
      if {[$depobj check]} {
        set needs_make 1
      }
    }
    if {!$needs_make} {
      set filename [my define get filename]
      if {$filename ne {} && ![file exists $filename]} {
        set needs_make 1

      }
    }
    return $needs_make
  }





  













  method triggers {} {
    my variable triggered domake define
    if {$triggered} {
      return $domake
    }
    set triggered 1


    foreach item [my define get depends] {
      if {![dict exists $::make_objects $item]} continue
      set depobj [dict get $::make_objects $item]
      if {$depobj eq [self]} {
        puts "WARNING [self] triggers itself"
        continue
      } else {
        set r [$depobj check]
        if {$r} {
          $depobj triggers
        }
      }
    }
    if {[info exists ::make($define(name))] && $::make($define(name))} {
      return
    }
    set ::make($define(name)) 1
    ::practcl::trigger {*}[my define get triggers]
  }
}



###

# Define the metaclass
###
::oo::class create ::practcl::object {
  superclass ::practcl::metaclass

  constructor {parent args} {
    my variable links define
    set organs [$parent child organs]
    my graft {*}$organs
    array set define $organs
    array set define [$parent child define]
    array set links {}
    if {[llength $args]==1 && [file exists [lindex $args 0]]} {
      my InitializeSourceFile [lindex $args 0]

    } elseif {[llength $args] == 1} {
      set data  [uplevel 1 [list subst [lindex $args 0]]]
      array set define $data
      my select
      my initialize
    } else {
      array set define [uplevel 1 [list subst $args]]
      my select
      my initialize
    }
  }


  method include_dir args {
    my define add include_dir {*}$args
  }
  
  method include_directory args {
    my define add include_dir {*}$args
  }

  method Collate_Source CWD {}

  
  method child {method} {
    return {}
  }
  
  method InitializeSourceFile filename {
    my define set filename $filename
    set class {}
    switch [file extension $filename] {
      .tcl {
        set class ::practcl::dynamic
      }
      .h {
        set class ::practcl::cheader
      }
      .c {
        set class ::practcl::csource
      }
      .ini {
        switch [file tail $filename] {
          module.ini {
            set class ::practcl::module
          }
          library.ini {
            set class ::practcl::subproject
          }
        }
      }
      .so -
      .dll -
      .dylib -
      .a {
        set class ::practcl::clibrary
      }
    }
    if {$class ne {}} {
      oo::objdefine [self] class $class
      my initialize
    }
  }
  
  method add args {
    my variable links
    set object [::practcl::object new [self] {*}$args]
    foreach linktype [$object linktype] {
      lappend links($linktype) $object
    }
    return $object
  }
  
  method go {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable links
    foreach {linktype objs} [array get links] {
      foreach obj $objs {
        $obj go
      }
    }
    debug [list /[self] [self method] [self class]]
  }
    
  method code {section body} {
    my variable code
    ::practcl::cputs code($section) $body
  }
  
  method Ofile filename {
    set lpath [my <module> define get localpath]
    if {$lpath eq {}} {
      set lpath [my <module> define get name]
    }
    return ${lpath}_[file rootname [file tail $filename]].o
  }
  
  method compile-products {} {
    set filename [my define get filename]
    set result {}
    if {$filename ne {}} {
      if {[my define exists ofile]} {
        set ofile [my define get ofile]
      } else {
        set ofile [my Ofile $filename]
        my define set ofile $ofile
      }
      lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]] object [self]]
    }
    foreach item [my link list subordinate] {
      lappend result {*}[$item compile-products]
    }
    return $result
  }
  
  method generate-include-directory {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result [my define get include_dir]
    foreach obj [my link list product] {
      foreach path [$obj generate-include-directory] {
        lappend result $path
      }
    }
    return $result
  }
  
  method generate-debug {{spaces {}}} {
    set result {}
    ::practcl::cputs result "$spaces[list [self] [list class [info object class [self]] filename [my define get filename]] links [my link list]]"
    foreach item [my link list subordinate] {
      practcl::cputs result [$item generate-debug "$spaces  "]
    }
    return $result
  }

  # Empty template methods
  method generate-cheader {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct cstruct methods tcltype tclprocs
    set result {}
    if {[info exists code(header)]} {
      ::practcl::cputs result $code(header)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result "/* BEGIN [$obj define get filename] generate-cheader */"
      ::practcl::cputs result [$obj generate-cheader]
      ::practcl::cputs result "/* END [$obj define get filename] generate-cheader */"
    }
    debug [list cfunct [info exists cfunct]]
    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {
        if {[dict get $info public]} continue
        ::practcl::cputs result "[dict get $info header]\;"
      }
    }
    debug [list tclprocs [info exists tclprocs]]
    if {[info exists tclprocs]} {
      foreach {name info} $tclprocs {
        if {[dict exists $info header]} {
          ::practcl::cputs result "[dict get $info header]\;"
        }
      }
    }
    debug [list methods [info exists methods] [my define get cclass]]

    if {[info exists methods]} {
      set thisclass [my define get cclass]
      foreach {name info} $methods {
        if {[dict exists $info header]} {
          ::practcl::cputs result "[dict get $info header]\;"
        }
      }
      # Add the initializer wrapper for the class
      ::practcl::cputs result "static int ${thisclass}_OO_Init(Tcl_Interp *interp)\;"
    }
    return $result
  }
  
  method generate-public-define {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code
    set result {}
    if {[info exists code(public-define)]} {
      ::practcl::cputs result $code(public-define)
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-public-define]
    }
    return $result
  }
  
  method generate-public-macro {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code
    set result {}
    if {[info exists code(public-macro)]} {
      ::practcl::cputs result $code(public-macro)
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-public-macro]
    }
    return $result
  }
  
  method generate-public-typedef {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct
    set result {}
    if {[info exists code(public-typedef)]} {
      ::practcl::cputs result $code(public-typedef)
    }
    if {[info exists cstruct]} {
      # Add defintion for native c data structures
      foreach {name info} $cstruct {
        ::practcl::cputs result "typedef struct $name ${name}\;"
        if {[dict exists $info aliases]} {
          foreach n [dict get $info aliases] {
            ::practcl::cputs result "typedef struct $name ${n}\;"
          }
        }
      }
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-public-typedef]
    }
    return $result
  }
  
  method generate-public-structure {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct
    set result {}
    if {[info exists code(public-structure)]} {
      ::practcl::cputs result $code(public-structure)
    }
    if {[info exists cstruct]} {
      foreach {name info} $cstruct {
        if {[dict exists $info comment]} {
          ::practcl::cputs result [dict get $info comment]
        }
        ::practcl::cputs result "struct $name \{[dict get $info body]\}\;"
      }
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-public-structure]
    }
    return $result
  }
  method generate-public-headers {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code tcltype
    set result {}
    if {[info exists code(public-header)]} {
      ::practcl::cputs result $code(public-header)
    }
    if {[info exists tcltype]} {
      foreach {type info} $tcltype {
        if {![dict exists $info cname]} {
          set cname [string tolower ${type}]_tclobjtype
          dict set tcltype $type cname $cname
        } else {
          set cname [dict get $info cname]
        }
        ::practcl::cputs result "extern const Tcl_ObjType $cname\;"
      }
    }
    if {[info exists code(public)]} {
      ::practcl::cputs result $code(public)
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-public-headers]
    }
    return $result
  }
  
  method generate-stub-function {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct tcltype
    set result {}
    foreach mod [my link list product] {
      foreach {funct def} [$mod generate-stub-function] {
        dict set result $funct $def
      }
    }
    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {
        if {![dict get $info export]} continue
        dict set result $funcname [dict get $info header]
      }
    } 
    return $result
  }
  
  method generate-public-function {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]    
    my variable code cfunct tcltype
    set result {}
    
    if {[my define get initfunc] ne {}} {
      ::practcl::cputs result "int [my define get initfunc](Tcl_Interp *interp);"
    }
    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {
        if {![dict get $info public]} continue
        ::practcl::cputs result "[dict get $info header]\;"
      }
    } 
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-public-function]
    }
    return $result
  }
  
  method generate-public-includes {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]    
    set includes {}
    foreach item [my define get public-include] {
      if {$item ni $includes} {
        lappend includes $item
      }
    }
    foreach mod [my link list product] {
      foreach item [$mod generate-public-includes] {
        if {$item ni $includes} {
          lappend includes $item
        }
      }
    }
    return $includes
  }
  method generate-public-verbatim {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set includes {}
    foreach item [my define get public-verbatim] {
      if {$item ni $includes} {
        lappend includes $item
      }
    }
    foreach mod [my link list subordinate] {
      foreach item [$mod generate-public-verbatim] {
        if {$item ni $includes} {
          lappend includes $item
        }
      }
    }
    return $includes
  }
  ###
  # This methods generates the contents of an amalgamated .h file
  # which describes the public API of this module
  ###
  method generate-h {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    set includes [my generate-public-includes]
    foreach inc $includes {
      if {[string index $inc 0] ni {< \"}} {
        ::practcl::cputs result "#include \"$inc\""
      } else {
        ::practcl::cputs result "#include $inc"        
      }
    }
    foreach file [my generate-public-verbatim] {
      ::practcl::cputs result "/* BEGIN $file */"
      ::practcl::cputs result [::practcl::cat $file]
      ::practcl::cputs result "/* END $file */"
    }
    foreach method {
      generate-public-define
      generate-public-macro
      generate-public-typedef
      generate-public-structure
      generate-public-headers
      generate-public-function
    } {
      ::practcl::cputs result "/* BEGIN SECTION $method */"
      ::practcl::cputs result [my $method]
      ::practcl::cputs result "/* END SECTION $method */"
    }
    return $result
  }
  
  ###
  # This methods generates the contents of an amalgamated .c file
  # which implements the loader for a batch of tools
  ###
  method generate-c {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {
/* This file was generated by practcl */
    }
    set includes {}
    lappend headers <tcl.h> <tclOO.h>
    if {[my define get tk 0]} {
      lappend headers <tk.h>
    }
    lappend headers {*}[my define get include]
    if {[my define get output_h] ne {}} {
      lappend headers "\"[my define get output_h]\""
    }
    foreach mod [my link list product] {
      # Signal modules to formulate final implementation
      $mod go
    }
    foreach mod [my link list dynamic] {
      foreach inc [$mod define get include] {
        if {$inc ni $headers} {
          lappend headers $inc
        }
      }
    }
    foreach inc $headers {
      if {[string index $inc 0] ni {< \"}} {
        ::practcl::cputs result "#include \"$inc\""
      } else {
        ::practcl::cputs result "#include $inc"        
      }
    }
    foreach {method} {
      generate-cheader
      generate-cstruct
      generate-constant
      generate-cfunct
      generate-cmethod      
    } {
      ::practcl::cputs result "/* BEGIN $method [my define get filename] */"
      ::practcl::cputs result [my $method]
      ::practcl::cputs result "/* END $method [my define get filename] */"
    }
    debug [list /[self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    return $result
  }


  method generate-loader {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    if {[my define get initfunc] eq {}} return
    ::practcl::cputs result  "
extern int DLLEXPORT [my define get initfunc]( Tcl_Interp *interp ) \{"
    ::practcl::cputs result  {
  /* Initialise the stubs tables. */
  #ifdef USE_TCL_STUBS
    if (Tcl_InitStubs(interp, "8.6", 0)==NULL) return TCL_ERROR;
    if (TclOOInitializeStubs(interp, "1.0") == NULL) return TCL_ERROR;
}
    if {[my define get tk 0]} {
      ::practcl::cputs result  {    if (Tk_InitStubs(interp, "8.6", 0)==NULL) return TCL_ERROR;}
    }
    ::practcl::cputs result {  #endif}
    set TCLINIT [my generate-tcl]
    ::practcl::cputs result "  if(Tcl_Eval(interp,[::practcl::tcl_to_c $TCLINIT])) return TCL_ERROR ;"
    foreach item [my link list product] {
      if {[$item define get output_c] ne {}} {
        ::practcl::cputs result [$item generate-cinit-external]
      } else {
        ::practcl::cputs result [$item generate-cinit]
      }
    }
    if {[my define exists pkg_name]} {
      ::practcl::cputs result  "    if (Tcl_PkgProvide(interp, \"[my define get pkg_name [my define get name]]\" , \"[my define get pkg_vers [my define get version]]\" )) return TCL_ERROR\;"
    }
    ::practcl::cputs result  "  return TCL_OK\;\n\}\n"
    return $result
  }
  
  ###
  # This methods generates any Tcl script file
  # which is required to pre-initialize the C library
  ###
  method generate-tcl {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code
    if {[info exists code(tcl)]} {
      ::practcl::cputs result $code(tcl)
    }
    set result [::practcl::_tagblock $result tcl [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-tcl]
    }
    return $result
  }
  
  method static-packages {} {
    set result [my define get static_packages]
    set statpkg  [my define get static_pkg]
    set initfunc [my define get initfunc]
    if {$initfunc ne {}} {
      set pkg_name [my define get pkg_name]
      if {$pkg_name ne {}} {
        dict set result $pkg_name initfunc $initfunc
        dict set result $pkg_name version [my define get version [my define get pkg_vers]]
        dict set result $pkg_name autoload [my define get autoload 0]
      }
    }
    foreach item [my link list subordinate] {
      foreach {pkg info} [$item static-packages] {
        dict set result $pkg $info
      }
    }
    return $result
  }
  
  method target {method args} {
    switch $method {
      is_unix { return [expr {$::tcl_platform(platform) eq "unix"}] }
    }
  }
  
}


::oo::class create ::practcl::product {
  superclass ::practcl::object
  

  method linktype {} {
    return {subordinate product}
  }
  
  method include header {
    my define add include $header
  }
  
  method cstructure {name definition {argdat {}}} {
    my variable cstruct
    dict set cstruct $name body $definition
    foreach {f v} $argdat {
      dict set cstruct $name $f $v
    }


  }






































  


  method generate-cinit {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code
    set result {}

    if {[info exists code(cinit)]} {




      ::practcl::cputs result $code(cinit)
    }
    if {[my define get initfunc] ne {}} {
      ::practcl::cputs result "  if([my define get initfunc](interp)!=TCL_OK) return TCL_ERROR\;"
    }



    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach obj [my link list product] {
      ::practcl::cputs result [$obj generate-cinit]
    }

    return $result
  }
}











###
# Dynamic blocks do not generate their own .c files,
# instead the contribute to the amalgamation



# of the main library file

















###
::oo::class create ::practcl::dynamic {
  superclass ::practcl::product
  




  # Retrieve any additional source files required


  
































  method compile-products {} {
    set filename [my define get output_c]
    set result {}
    if {$filename ne {}} {


      if {[my define exists ofile]} {
        set ofile [my define get ofile]
      } else {
        set ofile [my Ofile $filename]
        my define set ofile $ofile
      }
      lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]]]
    } else {
      set filename [my define get cfile]
      if {$filename ne {}} {

        if {[my define exists ofile]} {
          set ofile [my define get ofile]
        } else {
          set ofile [my Ofile $filename]
          my define set ofile $ofile
        }
        lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]]]
      }
    }
    foreach item [my link list subordinate] {
      lappend result {*}[$item compile-products]
    }
    return $result
  }
  
  method implement path {
    my go
    my Collate_Source $path
    if {[my define get output_c] eq {}} return
    set filename [file join $path [my define get output_c]]

    my define set cfile $filename
    set fout [open $filename w]
    puts $fout [my generate-c]

    puts $fout "extern int DLLEXPORT [my define get initfunc]( Tcl_Interp *interp ) \x7B"
    puts $fout [my generate-cinit]
    if {[my define get pkg_name] ne {}} {
      puts $fout "   Tcl_PkgProvide(interp, \"[my define get pkg_name]\", \"[my define get pkg_vers]\");"
    }
    puts $fout "  return TCL_OK\;"
    puts $fout "\x7D"

    close $fout
  }
  
  method initialize {} {
    set filename [my define get filename]
    if {$filename eq {}} {
      return
    }
    if {[my define get name] eq {}} {
      my define set name [file tail [file rootname $filename]]
    }
    if {[my define get localpath] eq {}} {
      my define set localpath [my <module> define get localpath]_[my define get name]
    }
    ::source $filename
  }
  
  method linktype {} {
    return {subordinate product dynamic}
  }
  
  ###
  # Populate const static data structures
  ###
  method generate-cstruct {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct methods tcltype
    set result {}
    if {[info exists code(struct)]} {
      ::practcl::cputs result $code(struct)
    }
    foreach obj [my link list dynamic] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-cstruct]
    }
    return $result
  }
  
  method generate-constant {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code cstruct methods tcltype
    if {[info exists code(constant)]} {
      ::practcl::cputs result "/* [my define get filename] CONSTANT */"
      ::practcl::cputs result $code(constant)
    }
    if {[info exists cstruct]} {
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
        ::practcl::cputs result [string map $map {
const static Tcl_ObjectMetadataType @NAME@DataType = {
  TCL_OO_METADATA_VERSION_CURRENT,
  "@NAME@",
  @DELETEPROC@,
  @CLONEPROC@
};
#define @MACRO@(OBJCONTEXT) (@NAME@ *) Tcl_ObjectGetMetadata(OBJCONTEXT,&@NAME@DataType)
}]
      }
    }
    if {[info exists tcltype]} {
      foreach {type info} $tcltype {
        dict with info {}
        ::practcl::cputs result "const Tcl_ObjType $cname = \{\n .name=\"$type\",\n .freeIntRepProc = &${freeproc},\n  .dupIntRepProc = &${dupproc},\n  .updateStringProc = &${updatestringproc},\n  .setFromAnyProc = &${setfromanyproc}\n\}\;"
      }
    }

    if {[info exists methods]} {
      set mtypes {}
      foreach {name info} $methods {
        set callproc   [dict get $info callproc]
        set methodtype [dict get $info methodtype]
        if {$methodtype in $mtypes} continue
        lappend mtypes $methodtype
        ###
        # Build the data struct for this method
        ###







|






|

|



|







2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
        ::practcl::cputs result [string map $map {
const static Tcl_ObjectMetadataType @NAME@DataType = {
  TCL_OO_METADATA_VERSION_CURRENT,
  "@NAME@",
  @DELETEPROC@,
  @CLONEPROC@
};
#define @MACRO@(OBJCONTEXT) (@NAME@ *) Tcl_ObjectGetMetadata(Tcl_ObjectContextObject(objectContext),&@NAME@DataType)
}]
      }
    }
    if {[info exists tcltype]} {
      foreach {type info} $tcltype {
        dict with info {}
        ::practcl::cputs result "const Tcl_ObjType $cname = \{\n  .freeIntRepProc = &${freeproc},\n  .dupIntRepProc = &${dupproc},\n  .updateStringProc = &${updatestringproc},\n  .setFromAnyProc = &${setfromanyproc}\n\}\;"
      }
    }    

    if {[info exists methods]} {
      set mtypes {}
      foreach {name info} $methods {   
        set callproc   [dict get $info callproc]
        set methodtype [dict get $info methodtype]
        if {$methodtype in $mtypes} continue
        lappend mtypes $methodtype
        ###
        # Build the data struct for this method
        ###
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408





5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449

5450

5451
5452
5453





5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
          ::practcl::cputs result "  .cloneProc = $cloneproc\n\}\;"
        } else {
          ::practcl::cputs result "  .cloneProc = NULL\n\}\;"
        }
        dict set methods $name methodtype $methodtype
      }
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-cfile-constant]
    }
    return $result
  }





  method generate-cfile-header {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct cstruct methods tcltype tclprocs
    set result {}
    if {[info exists code(header)]} {
      ::practcl::cputs result $code(header)
    }
    ::practcl::debug [list cfunct [info exists cfunct]]
    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {
        if {[dict get $info public]} continue
        ::practcl::cputs result "[dict get $info header]\;"
      }
    }
    ::practcl::debug [list tclprocs [info exists tclprocs]]
    if {[info exists tclprocs]} {
      foreach {name info} $tclprocs {
        if {[dict exists $info header]} {
          ::practcl::cputs result "[dict get $info header]\;"
        }
      }
    }
    ::practcl::debug [list methods [info exists methods] [my define get cclass]]
    if {[info exists methods]} {
      set thisclass [my define get cclass]
      foreach {name info} $methods {
        if {[dict exists $info header]} {
          ::practcl::cputs result "[dict get $info header]\;"
        }
      }
      # Add the initializer wrapper for the class
      ::practcl::cputs result "static int ${thisclass}_OO_Init(Tcl_Interp *interp)\;"
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      set dat [$obj generate-cfile-header]
      if {[string length [string trim $dat]]} {
        ::practcl::cputs result "/* BEGIN [$obj define get filename] generate-cfile-header */"
        ::practcl::cputs result $dat
        ::practcl::cputs result "/* END [$obj define get filename] generate-cfile-header */"

      }

    }
    return $result
  }





  method generate-cfile-tclapi {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code methods tclprocs
    set result {}
    if {[info exists code(method)]} {
      ::practcl::cputs result $code(method)
    }

    if {[info exists tclprocs]} {
      foreach {name info} $tclprocs {
        if {![dict exists $info body]} continue
        set callproc [dict get $info callproc]
        set header [dict get $info header]
        set body [dict get $info body]
        ::practcl::cputs result "/* Tcl Proc $name */"
        ::practcl::cputs result "${header} \{${body}\}"
      }
    }


    if {[info exists methods]} {
      set thisclass [my define get cclass]
      foreach {name info} $methods {
        if {![dict exists $info body]} continue
        set callproc [dict get $info callproc]
        set header [dict get $info header]
        set body [dict get $info body]
        ::practcl::cputs result "/* OO Method $thisclass $name */"
        ::practcl::cputs result "${header} \{${body}\}"
      }
      # Build the OO_Init function
      ::practcl::cputs result "/* Loader for $thisclass */"
      ::practcl::cputs result "static int ${thisclass}_OO_Init(Tcl_Interp *interp) \{"
      ::practcl::cputs result [string map [list @CCLASS@ $thisclass @TCLCLASS@ [my define get class]] {
  /*
  ** Build the "@TCLCLASS@" class
  */
  Tcl_Obj* nameObj;		/* Name of a class or method being looked up */
  Tcl_Object curClassObject;  /* Tcl_Object representing the current class */
  Tcl_Class curClass;		/* Tcl_Class representing the current class */

  /*
   * Find the "@TCLCLASS@" class, and attach an 'init' method to it.
   */

  nameObj = Tcl_NewStringObj("@TCLCLASS@", -1);
  Tcl_IncrRefCount(nameObj);
  if ((curClassObject = Tcl_GetObjectFromObj(interp, nameObj)) == NULL) {
      Tcl_DecrRefCount(nameObj);







|


|



>
>
>
>
>
|
|
|

|
|

<


<
|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|
<
<
<
<
<
>

>



>
>
>
>
>
|
|





|






<




|







<



<









|







2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606

2607
2608

2609
2610
2611



















2612
2613
2614





2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639

2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651

2652
2653
2654

2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
          ::practcl::cputs result "  .cloneProc = $cloneproc\n\}\;"
        } else {
          ::practcl::cputs result "  .cloneProc = NULL\n\}\;"
        }
        dict set methods $name methodtype $methodtype
      }
    }
    foreach obj [my link list dynamic] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-constant]
    }
    return $result
  }
  
  ###
  # Generate code that provides subroutines called by
  # Tcl API methods
  ###
  method generate-cfunct {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct
    set result {}
    if {[info exists code(funct)]} {
      ::practcl::cputs result $code(funct)
    }

    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {

        ::practcl::cputs result "[dict get $info header]\{[dict get $info body]\}\;"
      }
    }



















    foreach obj [my link list dynamic] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} {





        continue
      }
      ::practcl::cputs result [$obj generate-cfunct]
    }
    return $result
  }

  ###
  # Generate code that provides implements Tcl API
  # calls
  ###
  method generate-cmethod {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code methods tclprocs
    set result {}
    if {[info exists code(method)]} {
      ::practcl::cputs result $code(method)
    }
    
    if {[info exists tclprocs]} {
      foreach {name info} $tclprocs {
        if {![dict exists $info body]} continue
        set callproc [dict get $info callproc]
        set header [dict get $info header]
        set body [dict get $info body]

        ::practcl::cputs result "${header} \{${body}\}"
      }
    }

    
    if {[info exists methods]} {
      set thisclass [my define get cclass]
      foreach {name info} $methods {
        if {![dict exists $info body]} continue
        set callproc [dict get $info callproc]
        set header [dict get $info header]
        set body [dict get $info body]

        ::practcl::cputs result "${header} \{${body}\}"
      }
      # Build the OO_Init function

      ::practcl::cputs result "static int ${thisclass}_OO_Init(Tcl_Interp *interp) \{"
      ::practcl::cputs result [string map [list @CCLASS@ $thisclass @TCLCLASS@ [my define get class]] {
  /*
  ** Build the "@TCLCLASS@" class
  */
  Tcl_Obj* nameObj;		/* Name of a class or method being looked up */
  Tcl_Object curClassObject;  /* Tcl_Object representing the current class */
  Tcl_Class curClass;		/* Tcl_Class representing the current class */

  /* 
   * Find the "@TCLCLASS@" class, and attach an 'init' method to it.
   */

  nameObj = Tcl_NewStringObj("@TCLCLASS@", -1);
  Tcl_IncrRefCount(nameObj);
  if ((curClassObject = Tcl_GetObjectFromObj(interp, nameObj)) == NULL) {
      Tcl_DecrRefCount(nameObj);
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542












5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
  nameObj=Tcl_NewStringObj("@NAME@",-1);
  Tcl_NewMethod(interp, curClass, nameObj, 1, &@MTYPE@, (ClientData) NULL);
  Tcl_DecrRefCount(nameObj);
}]
          }
        }
      }
      ::practcl::cputs result "  return TCL_OK\;\n\}\n"
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-cfile-tclapi]
    }
    return $result
  }












  method generate-loader-module {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code methods tclprocs
    if {[info exists code(nspace)]} {
      ::practcl::cputs result "  \{\n    Tcl_Namespace *modPtr;"
      foreach nspace $code(nspace) {
        ::practcl::cputs result [string map [list @NSPACE@ $nspace] {
    modPtr=Tcl_FindNamespace(interp,"@NSPACE@",NULL,TCL_NAMESPACE_ONLY);
    if(!modPtr) {
      modPtr = Tcl_CreateNamespace(interp, "@NSPACE@", NULL, NULL);
    }
}]
      }
      ::practcl::cputs result "  \}"
    }
    if {[info exists code(tclinit)]} {
      ::practcl::cputs result $code(tclinit)
    }
    if {[info exists code(cinit)]} {
      ::practcl::cputs result $code(cinit)
    }







|

|


|



>
>
>
>
>
>
>
>
>
>
>
>
|
|












|







2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
  nameObj=Tcl_NewStringObj("@NAME@",-1);
  Tcl_NewMethod(interp, curClass, nameObj, 1, &@MTYPE@, (ClientData) NULL);
  Tcl_DecrRefCount(nameObj);
}]
          }
        }
      }
      ::practcl::cputs result "  return TCL_OK\;\n\}\n"  
    }
    foreach obj [my link list dynamic] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-cmethod]
    }
    return $result
  }

  method generate-cinit-external {} {
    if {[my define get initfunc] eq {}} {
      return "/*  [my define get filename] declared not initfunc */"
    }
    return "  if([my define get initfunc](interp)) return TCL_ERROR\;"
  }
  
  ###
  # Generate code that runs when the package/module is
  # initialized into the interpreter
  ###
  method generate-cinit {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code methods tclprocs
    if {[info exists code(nspace)]} {
      ::practcl::cputs result "  \{\n    Tcl_Namespace *modPtr;"
      foreach nspace $code(nspace) {
        ::practcl::cputs result [string map [list @NSPACE@ $nspace] {
    modPtr=Tcl_FindNamespace(interp,"@NSPACE@",NULL,TCL_NAMESPACE_ONLY);
    if(!modPtr) {
      modPtr = Tcl_CreateNamespace(interp, "@NSPACE@", NULL, NULL);
    }
}]
      }
      ::practcl::cputs result "  \}"      
    }
    if {[info exists code(tclinit)]} {
      ::practcl::cputs result $code(tclinit)
    }
    if {[info exists code(cinit)]} {
      ::practcl::cputs result $code(cinit)
    }
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604





























































5605


5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645

5646




5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659


5660
5661
5662

5663

5664
5665
5666
5667
5668
5669
5670
5671
5672
5673

5674
5675


5676
5677
5678


5679
5680






5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700

5701
5702
5703

5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714

5715
5716
5717
5718
5719

5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746







5747
5748
5749
5750
5751
5752
5753
5754





5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785


5786
5787
5788
5789
5790
5791
5792
5793
5794


5795
5796
5797

5798

5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809

5810
5811
5812
5813
5814
5815
5816
5817

5818
5819
5820
5821
5822
5823
5824

5825
5826
5827
5828

5829



5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862

5863



5864
5865
5866
5867

5868
5869
5870
5871
5872
5873
5874

5875
5876
5877
5878
5879
5880
5881
5882
5883
5884

5885
5886
5887
5888
5889
5890
5891
5892

5893
5894
5895



5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908


5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932




5933
5934
5935
5936
5937
5938
5939
5940
5941
5942


5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953

5954
5955

5956






5957
5958
5959
5960


5961
5962



5963
5964
5965
5966
5967
5968

5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982

5983
5984
5985
5986
5987
5988

5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011

6012
6013
6014

6015

6016
6017
6018
6019
6020

6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031


6032

6033
6034
6035
6036
6037




6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
          foreach alias [dict get $info aliases] {
            set map [list @NAME@ $alias @CALLPROC@ [dict get $info callproc]]
            ::practcl::cputs result [string map $map {  Tcl_CreateObjCommand(interp,"@NAME@",(Tcl_ObjCmdProc *)@CALLPROC@,NULL,NULL);}]
          }
        }
      }
    }

    if {[info exists code(nspace)]} {
      ::practcl::cputs result "  \{\n    Tcl_Namespace *modPtr;"
      foreach nspace $code(nspace) {
        ::practcl::cputs result [string map [list @NSPACE@ $nspace] {
    modPtr=Tcl_FindNamespace(interp,"@NSPACE@",NULL,TCL_NAMESPACE_ONLY);
    Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
    Tcl_Export(interp, modPtr, "[a-z]*", 1);
}]
      }
      ::practcl::cputs result "  \}"
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} {
        ::practcl::cputs result [$obj generate-loader-external]
      } else {
        ::practcl::cputs result [$obj generate-loader-module]
      }
    }
    return $result
  }





























































  method Collate_Source CWD {


    my variable methods code cstruct tclprocs
    if {[info exists methods]} {
      ::practcl::debug [self] methods [my define get cclass]
      set thisclass [my define get cclass]
      foreach {name info} $methods {
        # Provide a callproc
        if {![dict exists $info callproc]} {
          set callproc [string map {____ _ ___ _ __ _} [string map {{ } _ : _} OOMethod_${thisclass}_${name}]]
          dict set methods $name callproc $callproc
        } else {
          set callproc [dict get $info callproc]
        }
        if {[dict exists $info body] && ![dict exists $info header]} {
          dict set methods $name header "static int ${callproc}(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext objectContext ,int objc ,Tcl_Obj *const *objv)"
        }
        if {![dict exists $info methodtype]} {
          set methodtype [string map {{ } _ : _} OOMethodType_${thisclass}_${name}]
          dict set methods $name methodtype $methodtype
        }
      }
      if {![info exists code(initfuncts)] || "${thisclass}_OO_Init" ni $code(initfuncts)} {
        lappend code(initfuncts) "${thisclass}_OO_Init"
      }
    }
    set thisnspace [my define get nspace]

    if {[info exists tclprocs]} {
      ::practcl::debug [self] tclprocs [dict keys $tclprocs]
      foreach {name info} $tclprocs {
        if {![dict exists $info callproc]} {
          set callproc [string map {____ _ ___ _ __ _} [string map {{ } _ : _} TclCmd_${thisnspace}_${name}]]
          dict set tclprocs $name callproc $callproc
        } else {
          set callproc [dict get $info callproc]
        }
        if {[dict exists $info body] && ![dict exists $info header]} {
          dict set tclprocs $name header "static int ${callproc}(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv\[\])"
        }
      }
    }

  }




  method select {} {}
}

###
# END: class dynamic.tcl
###
###
# START: class product.tcl
###
::clay::define ::practcl::product {
  method code {section body} {
    my variable code
    ::practcl::cputs code($section) $body


  }
  method Collate_Source CWD {}
  method project-compile-products {} {

    set result {}

    noop {
    set filename [my define get filename]
    if {$filename ne {}} {
      ::practcl::debug [self] [self class] [self method] project-compile-products $filename
      if {[my define exists ofile]} {
        set ofile [my define get ofile]
      } else {
        set ofile [my Ofile $filename]
        my define set ofile $ofile
      }

      lappend result $ofile [list cfile $filename include [my define get include]  extra [my define get extra] external [string is true -strict [my define get external]] object [self]]
    }


    }
    foreach item [my link list subordinate] {
      lappend result {*}[$item project-compile-products]


    }
    return $result






  }
  method generate-debug {{spaces {}}} {
    set result {}
    ::practcl::cputs result "$spaces[list [self] [list class [info object class [self]] filename [my define get filename]] links [my link list]]"
    foreach item [my link list subordinate] {
      practcl::cputs result [$item generate-debug "$spaces  "]
    }
    return $result
  }
  method generate-cfile-constant {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code cstruct methods tcltype
    if {[info exists code(constant)]} {
      ::practcl::cputs result "/* [my define get filename] CONSTANT */"
      ::practcl::cputs result $code(constant)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue

      ::practcl::cputs result [$obj generate-cfile-constant]
    }
    return $result

  }
  method generate-cfile-public-structure {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct methods tcltype
    set result {}
    if {[info exists code(struct)]} {
      ::practcl::cputs result $code(struct)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue

      ::practcl::cputs result [$obj generate-cfile-public-structure]
    }
    return $result
  }
  method generate-cfile-header {} {

    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct cstruct methods tcltype tclprocs
    set result {}
    if {[info exists code(header)]} {
      ::practcl::cputs result $code(header)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      set dat [$obj generate-cfile-header]
      if {[string length [string trim $dat]]} {
        ::practcl::cputs result "/* BEGIN [$obj define get filename] generate-cfile-header */"
        ::practcl::cputs result $dat
        ::practcl::cputs result "/* END [$obj define get filename] generate-cfile-header */"
      }
    }
    return $result
  }
  method generate-cfile-global {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct cstruct methods tcltype tclprocs
    set result {}
    if {[info exists code(global)]} {
      ::practcl::cputs result $code(global)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files







      if {[$obj define get output_c] ne {}} continue
      set dat [$obj generate-cfile-global]
      if {[string length [string trim $dat]]} {
        ::practcl::cputs result "/* BEGIN [$obj define get filename] generate-cfile-global */"
        ::practcl::cputs result $dat
        ::practcl::cputs result "/* END [$obj define get filename] generate-cfile-global */"
      }
    }





    return $result
  }
  method generate-cfile-private-typedef {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct
    set result {}
    if {[info exists code(private-typedef)]} {
      ::practcl::cputs result $code(private-typedef)
    }
    if {[info exists cstruct]} {
      # Add defintion for native c data structures
      foreach {name info} $cstruct {
        if {[dict get $info public]==1} continue
        ::practcl::cputs result "typedef struct $name ${name}\;"
        if {[dict exists $info aliases]} {
          foreach n [dict get $info aliases] {
            ::practcl::cputs result "typedef struct $name ${n}\;"
          }
        }
      }
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-cfile-private-typedef]
    }
    return $result
  }
  method generate-cfile-private-structure {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct
    set result {}


    if {[info exists code(private-structure)]} {
      ::practcl::cputs result $code(private-structure)
    }
    if {[info exists cstruct]} {
      foreach {name info} $cstruct {
        if {[dict get $info public]==1} continue
        if {[dict exists $info comment]} {
          ::practcl::cputs result [dict get $info comment]
        }


        ::practcl::cputs result "struct $name \{[dict get $info body]\}\;"
      }
    }

    set result [::practcl::_tagblock $result c [my define get filename]]

    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-cfile-private-structure]
    }
    return $result
  }
  method generate-cfile-functions {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct
    set result {}
    if {[info exists code(funct)]} {
      ::practcl::cputs result $code(funct)

    }
    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {
        ::practcl::cputs result "/* $funcname */"
        if {[dict get $info inline] && [dict get $info public]} {
          ::practcl::cputs result "\ninline [dict get $info header]\{[dict get $info body]\}"
        } else {
          ::practcl::cputs result "\n[dict get $info header]\{[dict get $info body]\}"

        }
      }
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} {
        continue

      }
      ::practcl::cputs result [$obj generate-cfile-functions]
    }
    return $result

  }



  method generate-cfile-tclapi {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code methods tclprocs
    set result {}
    if {[info exists code(method)]} {
      ::practcl::cputs result $code(method)
    }
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} continue
      ::practcl::cputs result [$obj generate-cfile-tclapi]
    }
    return $result
  }
  method generate-hfile-public-define {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code
    set result {}
    if {[info exists code(public-define)]} {
      ::practcl::cputs result $code(public-define)
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-define]
    }
    return $result
  }
  method generate-hfile-public-macro {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code
    set result {}
    if {[info exists code(public-macro)]} {
      ::practcl::cputs result $code(public-macro)

    }



    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-macro]
    }

    return $result
  }
  method generate-hfile-public-typedef {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct
    set result {}
    if {[info exists code(public-typedef)]} {

      ::practcl::cputs result $code(public-typedef)
    }
    if {[info exists cstruct]} {
      # Add defintion for native c data structures
      foreach {name info} $cstruct {
        if {[dict get $info public]==0} continue
        ::practcl::cputs result "typedef struct $name ${name}\;"
        if {[dict exists $info aliases]} {
          foreach n [dict get $info aliases] {
            ::practcl::cputs result "typedef struct $name ${n}\;"

          }
        }
      }
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-typedef]
    }

    return $result
  }
  method generate-hfile-public-structure {} {



    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cstruct
    set result {}
    if {[info exists code(public-structure)]} {
      ::practcl::cputs result $code(public-structure)
    }
    if {[info exists cstruct]} {
      foreach {name info} $cstruct {
        if {[dict get $info public]==0} continue
        if {[dict exists $info comment]} {
          ::practcl::cputs result [dict get $info comment]
        }
        ::practcl::cputs result "struct $name \{[dict get $info body]\}\;"


      }
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-structure]
    }
    return $result
  }
  method generate-hfile-public-headers {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code tcltype
    set result {}
    if {[info exists code(public-header)]} {
      ::practcl::cputs result $code(public-header)
    }
    if {[info exists tcltype]} {
      foreach {type info} $tcltype {
        if {![dict exists $info cname]} {
          set cname [string tolower ${type}]_tclobjtype
          dict set tcltype $type cname $cname
        } else {
          set cname [dict get $info cname]
        }
        ::practcl::cputs result "extern const Tcl_ObjType $cname\;"




      }
    }
    if {[info exists code(public)]} {
      ::practcl::cputs result $code(public)
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-headers]
    }
    return $result


  }
  method generate-hfile-public-function {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct tcltype
    set result {}

    if {[my define get initfunc] ne {}} {
      ::practcl::cputs result "int [my define get initfunc](Tcl_Interp *interp);"
    }
    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {

        if {![dict get $info public]} continue
        ::practcl::cputs result "[dict get $info header]\;"

      }






    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-hfile-public-function]


    }
    return $result



  }
  method generate-hfile-public-includes {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set includes {}
    foreach item [my define get public-include] {
      if {$item ni $includes} {

        lappend includes $item
      }
    }
    foreach mod [my link list product] {
      foreach item [$mod generate-hfile-public-includes] {
        if {$item ni $includes} {
          lappend includes $item
        }
      }
    }
    return $includes
  }
  method generate-hfile-public-verbatim {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]

    set includes {}
    foreach item [my define get public-verbatim] {
      if {$item ni $includes} {
        lappend includes $item
      }
    }

    foreach mod [my link list subordinate] {
      foreach item [$mod generate-hfile-public-verbatim] {
        if {$item ni $includes} {
          lappend includes $item
        }
      }
    }
    return $includes
  }
  method generate-loader-external {} {
    if {[my define get initfunc] eq {}} {
      return "/*  [my define get filename] declared not initfunc */"
    }
    return "  if([my define get initfunc](interp)) return TCL_ERROR\;"
  }
  method generate-loader-module {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code
    set result {}
    if {[info exists code(cinit)]} {
      ::practcl::cputs result $code(cinit)
    }
    if {[my define get initfunc] ne {}} {

      ::practcl::cputs result "  if([my define get initfunc](interp)!=TCL_OK) return TCL_ERROR\;"
    }
    set result [::practcl::_tagblock $result c [my define get filename]]

    foreach item [my link list product] {

      if {[$item define get output_c] ne {}} {
        ::practcl::cputs result [$item generate-loader-external]
      } else {
        ::practcl::cputs result [$item generate-loader-module]
      }

    }
    return $result
  }
  method generate-stub-function {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    my variable code cfunct tcltype
    set result {}
    foreach mod [my link list product] {
      foreach {funct def} [$mod generate-stub-function] {
        dict set result $funct $def
      }


    }

    if {[info exists cfunct]} {
      foreach {funcname info} $cfunct {
        if {![dict get $info export]} continue
        dict set result $funcname [dict get $info header]
      }




    }
    return $result
  }
  method IncludeAdd {headervar args} {
    upvar 1 $headervar headers
    foreach inc $args {
      if {[string index $inc 0] ni {< \"}} {
        set inc "\"$inc\""
      }
      if {$inc ni $headers} {
        lappend headers $inc
      }
    }
  }
  method generate-tcl-loader {} {
    set result {}
    set PKGINIT [my define get pkginit]
    set PKG_NAME [my define get name [my define get pkg_name]]
    set PKG_VERSION [my define get pkg_vers [my define get version]]
    if {[string is true [my define get SHARED_BUILD 0]]} {
      set LIBFILE [my define get libfile]







|















|

|




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>


|

|











|










|


|



|





>

>
>
>
>

|
|
<
<
<
<
<
<
<
|
|
<
>
>
|
<
<
>
|
>
|
<
|
<
<
<
|
|
<
|
>
|
|
>
>
|
<
<
>
>
|
<
>
>
>
>
>
>
|
<
<
<
<
<
|
<
|
<
<
<
<
<
<
<
|
<
<
<
>
|
|
|
>
|
<
<
<
<
<
<
|
<
<
<
>
|
|
<
|
<
>
|
<
<
<
<
|
|
<
<
<
<
<
<
|
|
|
<
|
<
<
<
<
<
<
|
<
<
>
>
>
>
>
>
>
|
|
|
<
|
|


>
>
>
>
>
|
|
<
|
<
|
<
<

|
|
<
<
<
<
<
<
|
<
<
<
|
|
<
|
<
|
|
<
|
<
>
>
|
|
|
<
<
<
<
<
|
>
>
|


>
|
>
|
<
<
|
|
<
|
<
|
|
<
>
|
|
<
|
<
<
|
<
>
|
<
<
<
<
|
|
>
|
<
|
|
>
|
>
>
>
|
<
|
<
|
<
<
<
<
<
<
<
|
|
<
<
<
<
<
|
<
|
<
<
<
|
<
<
|
|
|
|
<
>

>
>
>
|
|
|
|
>
|
|
<
|
<
<
|
>
|
<
|
<
<
<
|
<
<
<
>
|
<
<
<
|
<
<
|
>
|
|
<
>
>
>
|
<
<
|
|

<
|
<
<
|
|
|
>
>
|
|
<
<
<
|
<
|
<
|
<
<
<
|
<
<
<
<
<
<
<
<
|
|
>
>
>
>

|
|
|
|
<
<
<

|
>
>

<
<
<
<
|
<
<
|
|
<
>
|
|
>
|
>
>
>
>
>
>

|
<
<
>
>

<
>
>
>
|
<
|
|
|
<
>
|
|
<
<
<
<
<
|
<
<
<
<
|
<
>
|
<
<
<
<
<
>
|
<
<
<
<
<
<
|
<
<
<
<
|
<
|
<
<
<
<
<
<
|
|
>
|
|
|
>
|
>
|
<
|
<
|
>
|
<
|
<
<
<
<
<
<
<
|
>
>
|
>
|
|
<
|
|
>
>
>
>



<
<
<
<
<
|
<
<
<
<
<







2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898







2899
2900

2901
2902
2903


2904
2905
2906
2907

2908



2909
2910

2911
2912
2913
2914
2915
2916
2917


2918
2919
2920

2921
2922
2923
2924
2925
2926
2927





2928

2929







2930



2931
2932
2933
2934
2935
2936






2937



2938
2939
2940

2941

2942
2943




2944
2945






2946
2947
2948

2949






2950


2951
2952
2953
2954
2955
2956
2957
2958
2959
2960

2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971

2972

2973


2974
2975
2976






2977



2978
2979

2980

2981
2982

2983

2984
2985
2986
2987
2988





2989
2990
2991
2992
2993
2994
2995
2996
2997
2998


2999
3000

3001

3002
3003

3004
3005
3006

3007


3008

3009
3010




3011
3012
3013
3014

3015
3016
3017
3018
3019
3020
3021
3022

3023

3024







3025
3026





3027

3028



3029


3030
3031
3032
3033

3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045

3046


3047
3048
3049

3050



3051



3052
3053



3054


3055
3056
3057
3058

3059
3060
3061
3062


3063
3064
3065

3066


3067
3068
3069
3070
3071
3072
3073



3074

3075

3076



3077








3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088



3089
3090
3091
3092
3093




3094


3095
3096

3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109


3110
3111
3112

3113
3114
3115
3116

3117
3118
3119

3120
3121
3122





3123




3124

3125
3126





3127
3128






3129




3130

3131






3132
3133
3134
3135
3136
3137
3138
3139
3140
3141

3142

3143
3144
3145

3146







3147
3148
3149
3150
3151
3152
3153

3154
3155
3156
3157
3158
3159
3160
3161
3162





3163





3164
3165
3166
3167
3168
3169
3170
          foreach alias [dict get $info aliases] {
            set map [list @NAME@ $alias @CALLPROC@ [dict get $info callproc]]
            ::practcl::cputs result [string map $map {  Tcl_CreateObjCommand(interp,"@NAME@",(Tcl_ObjCmdProc *)@CALLPROC@,NULL,NULL);}]
          }
        }
      }
    }
    
    if {[info exists code(nspace)]} {
      ::practcl::cputs result "  \{\n    Tcl_Namespace *modPtr;"
      foreach nspace $code(nspace) {
        ::practcl::cputs result [string map [list @NSPACE@ $nspace] {
    modPtr=Tcl_FindNamespace(interp,"@NSPACE@",NULL,TCL_NAMESPACE_ONLY);
    Tcl_CreateEnsemble(interp, modPtr->fullName, modPtr, TCL_ENSEMBLE_PREFIX);
    Tcl_Export(interp, modPtr, "[a-z]*", 1);
}]
      }
      ::practcl::cputs result "  \}"
    }
    set result [::practcl::_tagblock $result c [my define get filename]]
    foreach obj [my link list product] {
      # Exclude products that will generate their own C files
      if {[$obj define get output_c] ne {}} {
        ::practcl::cputs result [$obj generate-cinit-external]
      } else {
        ::practcl::cputs result [$obj generate-cinit]
      }
    }
    return $result
  }

  method c_header body {
    my variable code
    ::practcl::cputs code(header) $body
  }

  method c_code body {
    my variable code
    ::practcl::cputs code(funct) $body
  }
  method c_function {header body} {
    my variable code cfunct
    foreach regexp {
         {(.*) ([a-zA-Z_][a-zA-Z0-9_]*) *\((.*)\)}
         {(.*) (\x2a[a-zA-Z_][a-zA-Z0-9_]*) *\((.*)\)}
    } {
      if {[regexp $regexp $header all keywords funcname arglist]} {
        dict set cfunct $funcname header $header
        dict set cfunct $funcname body $body
        dict set cfunct $funcname keywords $keywords
        dict set cfunct $funcname arglist $arglist
        dict set cfunct $funcname public [expr {"static" ni $keywords}]
        dict set cfunct $funcname export [expr {"STUB_EXPORT" in $keywords}]

        return
      }
    }
    ::practcl::cputs code(header) "$header\;"
    # Could not parse that block as a function
    # append it verbatim to our c_implementation
    ::practcl::cputs code(funct) "$header [list $body]"
  }

  
  method cmethod {name body {arginfo {}}} {
    my variable methods code
    foreach {f v} $arginfo {
      dict set methods $name $f $v
    }
    dict set methods $name body $body
  }
  
  method c_tclproc_nspace nspace {
    my variable code
    if {![info exists code(nspace)]} {
      set code(nspace) {}
    }
    if {$nspace ni $code(nspace)} {
      lappend code(nspace) $nspace
    }
  }
  
  method c_tclproc_raw {name body {arginfo {}}} {
    my variable tclprocs code

    foreach {f v} $arginfo {
      dict set tclprocs $name $f $v
    }
    dict set tclprocs $name body $body
  }

  method go {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    next
    my variable methods code cstruct tclprocs
    if {[info exists methods]} {
      debug [self] methods [my define get cclass]
      set thisclass [my define get cclass]
      foreach {name info} $methods {   
        # Provide a callproc
        if {![dict exists $info callproc]} {
          set callproc [string map {____ _ ___ _ __ _} [string map {{ } _ : _} OOMethod_${thisclass}_${name}]]
          dict set methods $name callproc $callproc
        } else {
          set callproc [dict get $info callproc]
        }
        if {[dict exists $info body] && ![dict exists $info header]} {
          dict set methods $name header "static int ${callproc}(ClientData clientData, Tcl_Interp *interp, Tcl_ObjectContext objectContext ,int objc ,Tcl_Obj *const *objv)"
        }
        if {![dict exists $info methodtype]} {
          set methodtype [string map {{ } _ : _} MethodType_${thisclass}_${name}]
          dict set methods $name methodtype $methodtype
        }
      }
      if {![info exists code(initfuncts)] || "${thisclass}_OO_Init" ni $code(initfuncts)} {
        lappend code(initfuncts) "${thisclass}_OO_Init"
      }
    }
    set thisnspace [my define get nspace]

    if {[info exists tclprocs]} {
      debug [self] tclprocs [dict keys $tclprocs]
      foreach {name info} $tclprocs {
        if {![dict exists $info callproc]} {
          set callproc [string map {____ _ ___ _ __ _} [string map {{ } _ : _} Tclcmd_${thisnspace}_${name}]]
          dict set tclprocs $name callproc $callproc
        } else {
          set callproc [dict get $info callproc]
        }    
        if {[dict exists $info body] && ![dict exists $info header]} {
          dict set tclprocs $name header "static int ${callproc}(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv\[\])"
        }
      }
    }
    debug [list /[self] [self method] [self class]]
  }

  # Once an object marks itself as some
  # flavor of dynamic, stop trying to morph
  # it into something else
  method select {} {}

  







  method tcltype {name argdat} {
    my variable tcltype

    foreach {f v} $argdat {
      dict set tcltype $name $f $v
    }


    if {![dict exists tcltype $name cname]} {
      dict set tcltype $name cname [string tolower $name]_tclobjtype
    }
    lappend map @NAME@ $name

    set info [dict get $tcltype $name]



    foreach {f v} $info {
      lappend map @[string toupper $f]@ $v

    }
    foreach {func fpat template} {
      freeproc         {@Name@Obj_freeIntRepProc}       {void @FNAME@(Tcl_Obj *objPtr)}
      dupproc          {@Name@Obj_dupIntRepProc}        {void @FNAME@(Tcl_Obj *srcPtr,Tcl_Obj *dupPtr)}
      updatestringproc {@Name@Obj_updateStringRepProc} {void @FNAME@(Tcl_Obj *objPtr)}
      setfromanyproc   {@Name@Obj_setFromAnyProc}       {int @FNAME@(Tcl_Interp *interp,Tcl_Obj *objPtr)}
    } {


      if {![dict exists $info $func]} {
        error "$name does not define $func"
      }

      set body [dict get $info $func]
      # We were given a function name to call
      if {[llength $body] eq 1} continue
      set fname [string map [list @Name@ [string totitle $name]] $fpat]
      my c_function [string map [list @FNAME@ $fname] $template] [string map $map $body]
      dict set tcltype $name $func $fname
    }





  }

}











::oo::class create ::practcl::cheader {
  superclass ::practcl::product

  method compile-products {} {}
  method generate-cinit {} {}
}










::oo::class create ::practcl::csource {
  superclass ::practcl::product
}



::oo::class create ::practcl::clibrary {
  superclass ::practcl::product




  
  method linker-products {configdict} {






    return [my define get filename]
  }
  

}









###
# In the end, all C code must be loaded into a module
# This will either be a dynamically loaded library implementing
# a tcl extension, or a compiled in segment of a custom shell/app
###
::oo::class create ::practcl::module {
  superclass ::practcl::dynamic
  
  method child which {
    switch $which {

      organs {
        return [list project [my define get project] module [self]]
      }
    }
  }
  
  method initialize {} {
    set filename [my define get filename]
    if {$filename eq {}} {
      return
    }

    if {[my define get name] eq {}} {

      my define set name [file tail [file dirname $filename]]


    }
    if {[my define get localpath] eq {}} {
      my define set localpath [my <project> define get name]_[my define get name]






    }



    debug [self] SOURCE $filename
    my source $filename

  }

  
  method implement path {

    my go

    my Collate_Source $path
    foreach item [my link list dynamic] {
      if {[catch {$item implement $path} err]} {
        puts "Skipped $item: $err"
      }





    }
    foreach item [my link list module] {
      if {[catch {$item implement $path} err]} {
        puts "Skipped $item: $err"
      }
    }
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set filename [my define get output_c]
    if {$filename eq {}} {
      debug [list /[self] [self method] [self class]]


      return
    }

    set cout [open [file join $path [file rootname $filename].c] w]

    puts $cout [subst {/*
** This file is generated by the [info script] script

** any changes will be overwritten the next time it is run
*/}]
    puts $cout [my generate-c]

    puts $cout [my generate-loader]


    close $cout

    debug [list /[self] [self method] [self class]]
  }





  method linktype {} {
    return {subordinate product dynamic module}
  }  

}

::oo::class create ::practcl::autoconf {

  ###
  # find or fake a key/value list describing this project
  ###
  method config.sh {} {

    my variable conf_result

    if {[info exists conf_result]} {







      return $conf_result
    }





    set result {}

    set name [my define get name]



    set PWD $::CWD


    set builddir [my define get builddir]
    my unpack
    set srcroot [my define get srcroot]
    if {![file exists $builddir]} {

      my Configure
    }
    set filename [file join $builddir config.tcl]
    # Project uses the practcl template. Use the leavings from autoconf
    if {[file exists $filename]} {
      set dat [::practcl::config.tcl $builddir]
      foreach {item value} [lsort -stride 2 -dictionary $dat] {
        dict set result $item $value
      }
      set conf_result $result
      return $result
    }

    set filename [file join $builddir ${name}Config.sh]


    if {[file exists $filename]} {
      set l [expr {[string length $name]+1}]
      foreach {field dat} [::practcl::read_Config.sh $filename] {

        set field [string tolower $field]



        if {[string match ${name}_* $field]} {



          set field [string range $field $l end]
        }



        dict set result $field $dat


      }
      set conf_result $result
      return $result
    }

    ###
    # Oh man... we have to guess
    ###
    set filename [file join $builddir Makefile]


    if {![file exists $filename]} {
      error "Could not locate any configuration data in $srcroot"
    }

    foreach {field dat} [::practcl::read_Makefile $filename] {


      dict set result $field $dat
    }
    set conf_result $result
    cd $PWD
    return $result
  }
}







::oo::class create ::practcl::project {



  superclass ::practcl::module ::practcl::autoconf









  constructor args {
    my variable define
    if {[llength $args] == 1} {
      if {[catch {uplevel 1 [list subst [lindex $args 0]]} contents]} {
        set contents [lindex $args 0]
      }
    } else {
      if {[catch {uplevel 1 [list subst $args]} contents]} {
        set contents $args
      }



    }
    array set define $contents
    my select
    my initialize
  }




  



  method add_project {pkg info {oodefine {}}} {

    set os [my define get os]
    if {$os eq {}} {
      set os [::practcl::os]
      my define set os $os
    }
    set fossilinfo [list download [my define get download] tag trunk sandbox [my define get sandbox]]
    if {[dict exists $info os] && ($os ni [dict get $info os])} return
    # Select which tag to use here.
    # For production builds: tag-release
    if {[::info exists ::env(FOSSIL_MIRROR)]} {
      dict set info localmirror $::env(FOSSIL_MIRROR)
    }
    set profile [my define get profile release]:


    if {[dict exists $info profile $profile]} {
      dict set info tag [dict get $info profile $profile]
    }

    set obj [namespace current]::PROJECT.$pkg
    if {[info command $obj] eq {}} {
      set obj [::practcl::subproject create $obj [self] [dict merge $fossilinfo [list name $pkg pkg_name $pkg static 0] $info]]
    }

    my link object $obj
    oo::objdefine $obj $oodefine
    $obj define set masterpath $::CWD

    $obj go
    return $obj
  }





  




  method child which {

    switch $which {
      organs {





	# A library can be a project, it can be a module. Any
	# subordinate modules will indicate their existance






        return [list project [self] module [self]]




      }

    }






  }
  
  method linktype {} {
    return project
  }
  
  # Exercise the methods of a sub-object
  method project {pkg args} {
    set obj [namespace current]::PROJECT.$pkg
    if {[llength $args]==0} {

      return $obj

    }
    tailcall ${obj} {*}$args
  }

}








::oo::class create ::practcl::library {
  superclass ::practcl::project
  
  method compile-products {} {
    set result {}
    foreach item [my link list subordinate] {

      lappend result {*}[$item compile-products]
    }
    set filename [my define get output_c]
    if {$filename ne {}} {
      set ofile [file rootname [file tail $filename]]_main.o
      lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]]]
    }
    return $result
  }





  





  method generate-tcl-loader {} {
    set result {}
    set PKGINIT [my define get pkginit]
    set PKG_NAME [my define get name [my define get pkg_name]]
    set PKG_VERSION [my define get pkg_vers [my define get version]]
    if {[string is true [my define get SHARED_BUILD 0]]} {
      set LIBFILE [my define get libfile]
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
# Tclkit Style
load {} @PKGINIT@
package provide @PKG_NAME@ @PKG_VERSION@
}]
    }
    return $result
  }
  method generate-tcl-pre {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code
    if {[info exists code(tcl)]} {
      set result [::practcl::_tagblock $code(tcl) tcl [my define get filename]]
    }
    if {[info exists code(tcl-pre)]} {
      set result [::practcl::_tagblock $code(tcl) tcl [my define get filename]]
    }
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-tcl-pre]
    }
    return $result
  }
  method generate-tcl-post {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    my variable code
    if {[info exists code(tcl-post)]} {
      set result [::practcl::_tagblock $code(tcl-post) tcl [my define get filename]]
    }
    foreach mod [my link list product] {
      ::practcl::cputs result [$mod generate-tcl-post]
    }
    return $result
  }
  method linktype {} {
    return {subordinate product}
  }
  method Ofile filename {
    set lpath [my <module> define get localpath]
    if {$lpath eq {}} {
      set lpath [my <module> define get name]
    }
    return ${lpath}_[file rootname [file tail $filename]]
  }
  method project-static-packages {} {
    set result [my define get static_packages]
    set initfunc [my define get initfunc]
    if {$initfunc ne {}} {
      set pkg_name [my define get pkg_name]
      if {$pkg_name ne {}} {
        dict set result $pkg_name initfunc $initfunc
        dict set result $pkg_name version [my define get version [my define get pkg_vers]]
        dict set result $pkg_name autoload [my define get autoload 0]
      }
    }
    foreach item [my link list subordinate] {
      foreach {pkg info} [$item project-static-packages] {
        dict set result $pkg $info
      }
    }
    return $result
  }
  method toolset-include-directory {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result [my define get include_dir]
    foreach obj [my link list product] {
      foreach path [$obj toolset-include-directory] {
        lappend result $path
      }
    }
    return $result
  }
  method target {method args} {
    switch $method {
      is_unix { return [expr {$::tcl_platform(platform) eq "unix"}] }
    }
  }
}
oo::objdefine ::practcl::product {

  method select {object} {
    set class [$object define get class]
    set mixin [$object define get product]
    if {$class eq {} && $mixin eq {}} {
      set filename [$object define get filename]
      if {$filename ne {} && [file exists $filename]} {
        switch [file extension $filename] {
          .tcl {
            set mixin ::practcl::product.dynamic
          }
          .h {
            set mixin ::practcl::product.cheader
          }
          .c {
            set mixin ::practcl::product.csource
          }
          .ini {
            switch [file tail $filename] {
              module.ini {
                set class ::practcl::module
              }
              library.ini {
                set class ::practcl::subproject
              }
            }
          }
          .so -
          .dll -
          .dylib -
          .a {
            set mixin ::practcl::product.clibrary
          }
        }
      }
    }
    if {$class ne {}} {
      $object clay mixinmap core $class
    }
    if {$mixin ne {}} {
      $object clay mixinmap product $mixin
    }
  }
}
::clay::define ::practcl::product.cheader {
  superclass ::practcl::product
  method project-compile-products {} {}
  method generate-loader-module {} {}
}
::clay::define ::practcl::product.csource {
  superclass ::practcl::product
  method project-compile-products {} {
    set result {}
    set filename [my define get filename]
    if {$filename ne {}} {
      ::practcl::debug [self] [self class] [self method] project-compile-products $filename
      if {[my define exists ofile]} {
        set ofile [my define get ofile]
      } else {
        set ofile [my Ofile $filename]
        my define set ofile $ofile
      }
      lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]] object [self]]
    }
    foreach item [my link list subordinate] {
      lappend result {*}[$item project-compile-products]
    }
    return $result
  }
}
::clay::define ::practcl::product.clibrary {
  superclass ::practcl::product
  method linker-products {configdict} {
    return [my define get filename]
  }
}
::clay::define ::practcl::product.dynamic {
  superclass ::practcl::dynamic ::practcl::product
  method initialize {} {
    set filename [my define get filename]
    if {$filename eq {}} {
      return
    }
    if {[my define get name] eq {}} {
      my define set name [file tail [file rootname $filename]]
    }
    if {[my define get localpath] eq {}} {
      my define set localpath [my <module> define get localpath]_[my define get name]
    }
    # Future Development:
    # Scan source file to see if it is encoded in criticl or practcl notation
    #set thisline {}
    #foreach line [split [::practcl::cat $filename] \n] {
    #
    #}
    ::source $filename
    if {[my define get output_c] ne {}} {
      # Turn into a module if we have an output_c file
      my morph ::practcl::module
    }
  }
}
::clay::define ::practcl::product.critcl {
  superclass ::practcl::dynamic ::practcl::product
}

###
# END: class product.tcl
###
###
# START: class module.tcl
###
::clay::define ::practcl::module {
  superclass ::practcl::object ::practcl::product.dynamic
  Dict make_object {}
  method _MorphPatterns {} {
    return {{@name@} {::practcl::module.@name@} ::practcl::module}
  }
  method add args {
    my variable links
    set object [::practcl::object new [self] {*}$args]
    foreach linktype [$object linktype] {
      lappend links($linktype) $object
    }
    return $object
  }
  method install-headers args {}
  Ensemble make::_preamble {} {
    my variable make_object
    if {![info exists make_object]} {
      set make_object {}
    }
  }
  Ensemble make::pkginfo {} {
    ###
    # Build local variables needed for install
    ###
    package require platform
    set result {}
    set dat [my define dump]
    set PKG_DIR [dict get $dat name][dict get $dat version]
    dict set result PKG_DIR $PKG_DIR
    dict with dat {}
    if {![info exists DESTDIR]} {
      set DESTDIR {}
    }
    dict set result profile [::platform::identify]
    dict set result os $::tcl_platform(os)
    dict set result platform $::tcl_platform(platform)
    foreach {field value} $dat {
      switch $field {
        includedir -
        mandir -
        datadir -
        libdir -
        libfile -
        name -
        output_tcl -
        version -
        authors -
        license -
        requires {
          dict set result $field $value
        }
        TEA_PLATFORM {
          dict set result platform $value
        }
        TEACUP_OS {
          dict set result os $value
        }
        TEACUP_PROFILE {
          dict set result profile $value
        }
        TEACUP_ZIPFILE {
          dict set result zipfile $value
        }
      }
    }
    if {![dict exists $result zipfile]} {
      dict set result zipfile "[dict get $result name]-[dict get $result version]-[dict get $result profile].zip"
    }
    return $result
  }
  Ensemble make::objects {} {
    return $make_object
  }
  Ensemble make::object name {
    if {[dict exists $make_object $name]} {
      return [dict get $make_object $name]
    }
    return {}
  }
  Ensemble make::reset {} {
    foreach {name obj} $make_object {
      $obj reset
    }
  }
  Ensemble make::trigger args {
    foreach {name obj} $make_object {
      if {$name in $args} {
        $obj triggers
      }
    }
  }
  Ensemble make::depends args {
    foreach {name obj} $make_object {
      if {$name in $args} {
        $obj check
      }
    }
  }
  Ensemble make::filename name {
    if {[dict exists $make_object $name]} {
      return [[dict get $make_object $name] define get filename]
    }
  }
  Ensemble make::target {name Info body} {
    set info [uplevel #0 [list subst $Info]]
    set nspace [namespace current]
    if {[dict exist $make_object $name]} {
      set obj [dict get $$make_object $name]
    } else {
      set obj [::practcl::make_obj new [self] $name $info $body]
      dict set make_object $name $obj
      dict set target_make $name 0
      dict set target_trigger $name 0
    }
    if {[dict exists $info aliases]} {
      foreach item [dict get $info aliases] {
        if {![dict exists $make_object $item]} {
          dict set make_object $item $obj
        }
      }
    }
    return $obj
  }
  clay set method_ensemble make target aliases {target add}
  Ensemble make::todo {} {
    foreach {name obj} $make_object {
      if {[$obj do]} {
        lappend result $name
      }
    }
    return $result
  }
  Ensemble make::do {} {
    global CWD SRCDIR project SANDBOX
    foreach {name obj} $make_object {
      if {[$obj do]} {
        eval [$obj define get action]
      }
    }
  }
  method child which {
    switch $which {
      delegate -
      organs {
        return [list project [my define get project] module [self]]
      }
    }
  }
  method generate-c {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {
/* This file was generated by practcl */
    }
    set includes {}

    foreach mod [my link list product] {
      # Signal modules to formulate final implementation
      $mod go
    }
    set headers {}

    my IncludeAdd headers <tcl.h> <tclOO.h>
    if {[my define get tk 0]} {
      my IncludeAdd headers <tk.h>
    }
    if {[my define get output_h] ne {}} {
      my IncludeAdd headers [my define get output_h]
    }
    my IncludeAdd headers {*}[my define get include]

    foreach mod [my link list dynamic] {
      my IncludeAdd headers {*}[$mod define get include]
    }
    foreach inc $headers {
      ::practcl::cputs result "#include $inc"
    }
    foreach {method} {
      generate-cfile-header
      generate-cfile-private-typedef
      generate-cfile-private-structure
      generate-cfile-public-structure
      generate-cfile-constant
      generate-cfile-global
      generate-cfile-functions
      generate-cfile-tclapi
    } {
      set dat [my $method]
      if {[string length [string trim $dat]]} {
        ::practcl::cputs result "/* BEGIN $method [my define get filename] */"
        ::practcl::cputs result $dat
        ::practcl::cputs result "/* END $method [my define get filename] */"
      }
    }
    ::practcl::debug [list /[self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    return $result
  }
  method generate-h {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    foreach method {
      generate-hfile-public-define
      generate-hfile-public-macro
    } {
      ::practcl::cputs result "/* BEGIN SECTION $method */"
      ::practcl::cputs result [my $method]
      ::practcl::cputs result "/* END SECTION $method */"
    }
    set includes [my generate-hfile-public-includes]
    foreach inc $includes {
      if {[string index $inc 0] ni {< \"}} {
        ::practcl::cputs result "#include \"$inc\""
      } else {
        ::practcl::cputs result "#include $inc"
      }
    }
    foreach method {
      generate-hfile-public-typedef
      generate-hfile-public-structure
    } {
      ::practcl::cputs result "/* BEGIN SECTION $method */"
      ::practcl::cputs result [my $method]
      ::practcl::cputs result "/* END SECTION $method */"
    }

    foreach file [my generate-hfile-public-verbatim] {
      ::practcl::cputs result "/* BEGIN $file */"
      ::practcl::cputs result [::practcl::cat $file]
      ::practcl::cputs result "/* END $file */"
    }

    foreach method {
      generate-hfile-public-headers
      generate-hfile-public-function
    } {
      ::practcl::cputs result "/* BEGIN SECTION $method */"
      ::practcl::cputs result [my $method]
      ::practcl::cputs result "/* END SECTION $method */"
    }
    return $result
  }
  method generate-loader {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set result {}
    if {[my define get initfunc] eq {}} return
    ::practcl::cputs result  "
extern int DLLEXPORT [my define get initfunc]( Tcl_Interp *interp ) \{"
    ::practcl::cputs result  {
  /* Initialise the stubs tables. */
  #ifdef USE_TCL_STUBS
    if (Tcl_InitStubs(interp, "8.6", 0)==NULL) return TCL_ERROR;
    if (TclOOInitializeStubs(interp, "1.0") == NULL) return TCL_ERROR;
}
    if {[my define get tk 0]} {
      ::practcl::cputs result  {    if (Tk_InitStubs(interp, "8.6", 0)==NULL) return TCL_ERROR;}
    }
    ::practcl::cputs result {  #endif}
    set TCLINIT [my generate-tcl-pre]
    if {[string length [string trim $TCLINIT]]} {
      ::practcl::cputs result "  if(interp) {\nif(Tcl_Eval(interp,[::practcl::tcl_to_c $TCLINIT])) return TCL_ERROR;\n  }"
    }
    ::practcl::cputs result [my generate-loader-module]

    set TCLINIT [my generate-tcl-post]
    if {[string length [string trim $TCLINIT]]} {
      ::practcl::cputs result "  if(interp) {\nif(Tcl_Eval(interp,[::practcl::tcl_to_c $TCLINIT])) return TCL_ERROR;\n }"
    }
    if {[my define exists pkg_name]} {
      ::practcl::cputs result  "    if (Tcl_PkgProvide(interp, \"[my define get pkg_name [my define get name]]\" , \"[my define get pkg_vers [my define get version]]\" )) return TCL_ERROR\;"
    }
    ::practcl::cputs result  "  return TCL_OK\;\n\}\n"
    return $result
  }
  method initialize {} {
    set filename [my define get filename]
    if {$filename eq {}} {
      return
    }
    if {[my define get name] eq {}} {
      my define set name [file tail [file dirname $filename]]
    }
    if {[my define get localpath] eq {}} {
      my define set localpath [my <project> define get name]_[my define get name]
    }
    my graft module [self]
    ::practcl::debug [self] SOURCE $filename
    my source $filename
  }
  method implement path {
    my go
    my Collate_Source $path
    set errs {}
    foreach item [my link list dynamic] {
      if {[catch {$item implement $path} err errdat]} {
        lappend errs "Skipped $item: [$item define get filename] $err"
        if {[dict exists $errdat -errorinfo]} {
          lappend errs [dict get $errdat -errorinfo]
        } else {
          lappend errs $errdat
        }
      }
    }
    foreach item [my link list module] {
      if {[catch {$item implement $path} err errdat]} {
        lappend errs "Skipped $item: [$item define get filename] $err"
        if {[dict exists $errdat -errorinfo]} {
          lappend errs [dict get $errdat -errorinfo]
        } else {
          lappend errs $errdat
        }
      }
    }
    if {[llength $errs]} {
      set logfile [file join $::CWD practcl.log]
      ::practcl::log $logfile "*** ERRORS ***"
      foreach {item trace} $errs {
        ::practcl::log $logfile "###\n# ERROR\n###\n$item"
       ::practcl::log $logfile "###\n# TRACE\n###\n$trace"
      }
      ::practcl::log $logfile "*** DEBUG INFO ***"
      ::practcl::log $logfile $::DEBUG_INFO
      puts stderr "Errors saved to $logfile"
      exit 1
    }
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set filename [my define get output_c]
    if {$filename eq {}} {
      ::practcl::debug [list /[self] [self method] [self class]]
      return
    }
    set cout [open [file join $path [file rootname $filename].c] w]
    puts $cout [subst {/*
** This file is generated by the [info script] script
** any changes will be overwritten the next time it is run
*/}]
    puts $cout [my generate-c]
    puts $cout [my generate-loader]
    close $cout
    ::practcl::debug [list /[self] [self method] [self class]]
  }
  method linktype {} {
    return {subordinate product dynamic module}
  }
}

###
# END: class module.tcl
###
###
# START: class project baseclass.tcl
###
::clay::define ::practcl::project {
  superclass ::practcl::module
  method _MorphPatterns {} {
    return {{@name@} {::practcl::@name@} {::practcl::project.@name@} {::practcl::project}}
  }
  constructor args {
    my variable define
    if {[llength $args] == 1} {
      set rawcontents [lindex $args 0]
    } else {
      set rawcontents $args
    }
    if {[catch {uplevel 1 [list subst $rawcontents]} contents]} {
      set contents $rawcontents
    }
    ###
    # The first instance of ::practcl::project (or its descendents)
    # registers itself as the ::practcl::MAIN. If a project other
    # than ::practcl::LOCAL is created, odds are that was the one
    # the developer intended to be the main project
    ###
    if {$::practcl::MAIN eq "::practcl::LOCAL"} {
      set ::practcl::MAIN [self]
    }
    # DEFS fields need to be passed unchanged and unsubstituted
    # as we need to preserve their escape characters
    foreach field {TCL_DEFS DEFS TK_DEFS} {
      if {[dict exists $rawcontents $field]} {
        dict set contents $field [dict get $rawcontents $field]
      }
    }
    my graft module [self]
    array set define $contents
    ::practcl::toolset select [self]
    my initialize
  }
  method add_object object {
    my link object $object
  }
  method add_project {pkg info {oodefine {}}} {
    ::practcl::debug [self] add_project $pkg $info
    set os [my define get TEACUP_OS]
    if {$os eq {}} {
      set os [::practcl::os]
      my define set os $os
    }
    set fossilinfo [list download [my define get download] tag trunk sandbox [my define get sandbox]]
    if {[dict exists $info os] && ($os ni [dict get $info os])} return
    # Select which tag to use here.
    # For production builds: tag-release
    set profile [my define get profile release]:
    if {[dict exists $info profile $profile]} {
      dict set info tag [dict get $info profile $profile]
    }
    dict set info USEMSVC [my define get USEMSVC 0]
    dict set info debug [my define get debug 0]
    set obj [namespace current]::PROJECT.$pkg
    if {[info command $obj] eq {}} {
      set obj [::practcl::subproject create $obj [self] [dict merge $fossilinfo [list name $pkg pkg_name $pkg static 0 class subproject.binary] $info]]
    }
    my link object $obj
    oo::objdefine $obj $oodefine
    $obj define set masterpath $::CWD
    $obj go
    return $obj
  }
  method add_tool {pkg info {oodefine {}}} {
    ::practcl::debug [self] add_tool $pkg $info
    set info [dict merge [::practcl::local_os] $info]

    set os [dict get $info TEACUP_OS]
    set fossilinfo [list download [my define get download] tag trunk sandbox [my define get sandbox]]
    if {[dict exists $info os] && ($os ni [dict get $info os])} return
    # Select which tag to use here.
    # For production builds: tag-release
    set profile [my define get profile release]:
    if {[dict exists $info profile $profile]} {
      dict set info tag [dict get $info profile $profile]
    }
    set obj ::practcl::OBJECT::TOOL.$pkg
    if {[info command $obj] eq {}} {
      set obj [::practcl::subproject create $obj [self] [dict merge $fossilinfo [list name $pkg pkg_name $pkg static 0] $info]]
    }
    my link add tool $obj
    oo::objdefine $obj $oodefine
    $obj define set masterpath $::CWD
    $obj go
    return $obj
  }
  method build-tclcore {} {
    set os [my define get TEACUP_OS]
    set tcl_config_opts [::practcl::platform::tcl_core_options $os]
    set tk_config_opts  [::practcl::platform::tk_core_options $os]

    lappend tcl_config_opts --prefix [my define get prefix] --exec-prefix [my define get prefix]
    set tclobj [my tclcore]
    if {[my define get debug 0]} {
      $tclobj define set debug 1
      lappend tcl_config_opts --enable-symbols=true
    }
    $tclobj define set config_opts $tcl_config_opts
    $tclobj go
    $tclobj compile

    set _TclSrcDir [$tclobj define get localsrcdir]
    my define set tclsrcdir $_TclSrcDir
    if {[my define get tk 0]} {
      set tkobj [my tkcore]
      lappend tk_config_opts --with-tcl=[::practcl::file_relative [$tkobj define get builddir]  [$tclobj define get builddir]]
      if {[my define get debug 0]} {
        $tkobj define set debug 1
        lappend tk_config_opts --enable-symbols=true
      }
      $tkobj define set config_opts $tk_config_opts
      $tkobj compile
    }
  }
  method child which {
    switch $which {
      delegate -
      organs {
	# A library can be a project, it can be a module. Any
	# subordinate modules will indicate their existance
        return [list project [self] module [self]]
      }
    }
  }
  method linktype {} {
    return project
  }
  method project {pkg args} {
    set obj [namespace current]::PROJECT.$pkg
    if {[llength $args]==0} {
      return $obj
    }
    ${obj} {*}$args
  }
  method tclcore {} {
    if {[info commands [set obj [my clay delegate tclcore]]] ne {}} {
      return $obj
    }
    if {[info commands [set obj [my project TCLCORE]]] ne {}} {
      my graft tclcore $obj
      return $obj
    }
    if {[info commands [set obj [my project tcl]]] ne {}} {
      my graft tclcore $obj
      return $obj
    }
    if {[info commands [set obj [my tool tcl]]] ne {}} {
      my graft tclcore $obj
      return $obj
    }
    # Provide a fallback
    set obj [my add_tool tcl {
      tag release class subproject.core
      fossil_url http://core.tcl.tk/tcl
    }]
    my graft tclcore $obj
    return $obj
  }
  method tkcore {} {
    if {[set obj [my clay delegate tkcore]] ne {}} {
      return $obj
    }
    if {[set obj [my project tk]] ne {}} {
      my graft tkcore $obj
      return $obj
    }
    if {[set obj [my tool tk]] ne {}} {
      my graft tkcore $obj
      return $obj
    }
    # Provide a fallback
    set obj [my add_tool tk {
      tag release class tool.core
      fossil_url http://core.tcl.tk/tk
    }]
    my graft tkcore $obj
    return $obj
  }
  method tool {pkg args} {
    set obj ::practcl::OBJECT::TOOL.$pkg
    if {[llength $args]==0} {
      return $obj
    }
    ${obj} {*}$args
  }
}

###
# END: class project baseclass.tcl
###
###
# START: class project library.tcl
###
::clay::define ::practcl::library {
  superclass ::practcl::project
  method clean {PATH} {
    set objext [my define get OBJEXT o]
    foreach {ofile info} [my project-compile-products] {
      if {[file exists [file join $PATH objs $ofile].${objext}]} {
        file delete [file join $PATH objs $ofile].${objext}
      }
    }
    foreach ofile [glob -nocomplain [file join $PATH *.${objext}]] {
      file delete $ofile
    }
    foreach ofile [glob -nocomplain [file join $PATH objs *]] {
      file delete $ofile
    }
    set libfile [my define get libfile]
    if {[file exists [file join $PATH $libfile]]} {
      file delete [file join $PATH $libfile]
    }
    my implement $PATH
  }
  method project-compile-products {} {
    set result {}
    foreach item [my link list subordinate] {
      lappend result {*}[$item project-compile-products]
    }
    set filename [my define get output_c]
    if {$filename ne {}} {
      ::practcl::debug [self] [self class] [self method] project-compile-products $filename
      set ofile [file rootname [file tail $filename]]_main
      lappend result $ofile [list cfile $filename extra [my define get extra] external [string is true -strict [my define get external]]]
    }
    return $result
  }
  method go {} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set name [my define getnull name]
    if {$name eq {}} {
      set name generic
      my define name generic
    }
    if {[my define get tk] eq {@TEA_TK_EXTENSION@}} {
      my define set tk 0







<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|







3180
3181
3182
3183
3184
3185
3186






3187






















































































































































































































































































































































































































































































































































































































































































































































































3188
3189
3190
3191
3192
3193
3194
3195
3196
# Tclkit Style
load {} @PKGINIT@
package provide @PKG_NAME@ @PKG_VERSION@
}]
    }
    return $result
  }






  






















































































































































































































































































































































































































































































































































































































































































































































































  method go {} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set name [my define getnull name]
    if {$name eq {}} {
      set name generic
      my define name generic
    }
    if {[my define get tk] eq {@TEA_TK_EXTENSION@}} {
      my define set tk 0
6879
6880
6881
6882
6883
6884
6885
6886
6887
















































6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923

6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
    }
    my variable links
    foreach {linktype objs} [array get links] {
      foreach obj $objs {
        $obj go
      }
    }
    ::practcl::debug [list /[self] [self method] [self class] -- [my define get filename] [info object class [self]]]
  }
















































  method generate-decls {pkgname path} {
    ::practcl::debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set outfile [file join $path/$pkgname.decls]

    ###
    # Build the decls file
    ## #
    set fout [open $outfile w]
    puts $fout [subst {###
  # $outfile
  #
  # This file was generated by [info script]
  ###

library $pkgname
interface $pkgname
}]

    ###
    # Generate list of functions
    ###
    set stubfuncts [my generate-stub-function]
    set thisline {}
    set functcount 0
    foreach {func header} $stubfuncts {
      puts $fout [list declare [incr functcount] $header]
    }
    puts $fout [list export "int [my define get initfunc](Tcl_Inter *interp)"]
    puts $fout [list export "char *[string totitle [my define get name]]_InitStubs(Tcl_Inter *interp, char *version, int exact)"]

    close $fout

    ###
    # Build [package]Decls.h
    ###
    set hout [open [file join $path ${pkgname}Decls.h] w]

    close $hout

    set cout [open [file join $path ${pkgname}StubInit.c] w]
    puts $cout [string map [list %pkgname% $pkgname %PkgName% [string totitle $pkgname]] {
#ifndef USE_TCL_STUBS
#define USE_TCL_STUBS
#endif
#undef USE_TCL_STUB_PROCS

#include "tcl.h"
#include "%pkgname%.h"

/*
** Ensure that Tdom_InitStubs is built as an exported symbol.  The other stub
** functions should be built as non-exported symbols.
*/

#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT

%PkgName%Stubs *%pkgname%StubsPtr;

 /*







|

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|

|
|
|
|
|
|




|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
>
|

|
|








|
|
|
|







3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
    }
    my variable links
    foreach {linktype objs} [array get links] {
      foreach obj $objs {
        $obj go
      }
    }
    debug [list /[self] [self method] [self class] -- [my define get filename] [info object class [self]]]
  }

  method implement path {
    my go
    my Collate_Source $path
    foreach item [my link list dynamic] {
      if {[catch {$item implement $path} err]} {
        puts "Skipped $item: $err"
      }
    }
    foreach item [my link list module] {
      if {[catch {$item implement $path} err]} {
        puts "Skipped $item: $err"
      }
    }
    set cout [open [file join $path [my define get output_c]] w]
    puts $cout [subst {/*
** This file is generated by the [info script] script
** any changes will be overwritten the next time it is run
*/}]
    puts $cout [my generate-c]
    puts $cout [my generate-loader]
    close $cout
    
    set macro HAVE_[string toupper [file rootname [my define get output_h]]]_H
    set hout [open [file join $path [my define get output_h]] w]
    puts $hout [subst {/*
** This file is generated by the [info script] script
** any changes will be overwritten the next time it is run
*/}]
    puts $hout "#ifndef ${macro}"
    puts $hout "#define ${macro}"
    puts $hout [my generate-h]
    puts $hout "#endif"
    close $hout
    
    set output_tcl [my define get output_tcl]
    if {$output_tcl ne {}} {
      set tclout [open [file join $path [my define get output_tcl]] w]
      puts $tclout "###
# This file is generated by the [info script] script
# any changes will be overwritten the next time it is run
###"
      puts $tclout [my generate-tcl]
      puts $tclout [my generate-tcl-loader]
      close $tclout
    }
  }

  method generate-decls {pkgname path} {
    debug [list [self] [self method] [self class] -- [my define get filename] [info object class [self]]]
    set outfile [file join $path/$pkgname.decls]
  
  ###
  # Build the decls file
  ###
  set fout [open $outfile w]
  puts $fout [subst {###
  # $outfile
  #
  # This file was generated by [info script]
  ###
  
  library $pkgname
  interface $pkgname
  }]
  
  ###
  # Generate list of functions
  ###
  set stubfuncts [my generate-stub-function]
  set thisline {}
  set functcount 0
  foreach {func header} $stubfuncts {
    puts $fout [list declare [incr functcount] $header]
  }
  puts $fout [list export "int [my define get initfunc](Tcl_Inter *interp)"]
  puts $fout [list export "char *[string totitle [my define get name]]_InitStubs(Tcl_Inter *interp, char *version, int exact)"]

  close $fout
  
  ###
  # Build [package]Decls.h
  ###
  set hout [open [file join $path ${pkgname}Decls.h] w]
  
  close $hout

  set cout [open [file join $path ${pkgname}StubInit.c] w]
puts $cout [string map [list %pkgname% $pkgname %PkgName% [string totitle $pkgname]] {
#ifndef USE_TCL_STUBS
#define USE_TCL_STUBS
#endif
#undef USE_TCL_STUB_PROCS

#include "tcl.h"
#include "%pkgname%.h"

 /*
 ** Ensure that Tdom_InitStubs is built as an exported symbol.  The other stub
 ** functions should be built as non-exported symbols.
 */

#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT

%PkgName%Stubs *%pkgname%StubsPtr;

 /*
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056



7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079


7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344

7345
7346
7347
7348
7349
7350
7351
7352
7353

7354
7355

7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411


7412
7413
7414


7415
7416
7417
7418

7419




7420
7421

7422
7423
7424



7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440

7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455


7456
7457

7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642

7643

7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709

7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749

7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835


7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961

7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981

7982
7983
7984
7985
7986
7987
7988
7989
7990
7991

7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112

8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165

8166
8167

8168


8169
8170
8171
8172
8173
8174
8175



8176
8177
8178
8179

8180
8181
8182
8183
8184

8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198

8199

8200
8201
8202
8203
8204
8205
8206
8207
8208
8209

8210
8211

8212

8213
8214
8215
8216
8217
8218
8219
8220

8221
8222
8223
8224
8225
8226
8227
8228
8229

8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263

8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284

8285
8286
8287
8288
8289
8290
8291
8292
8293













8294


8295
8296


8297
8298
8299
8300
8301
8302
8303


8304
8305











8306
8307

8308

8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326

8327




















8328
8329
8330
8331

8332
8333
8334
8335

8336





8337
8338


8339
8340

8341






8342

8343
8344

8345



8346
8347
8348
8349
8350
8351
8352
8353
8354





8355





















8356

8357

8358

8359
8360

8361
8362
8363


8364
8365
8366



8367
8368


8369
8370
8371

8372
8373

8374
8375
8376

8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
  if (!%pkgname%StubsPtr) {
    Tcl_SetResult(interp,"This implementation of %PkgName% does not support stubs",TCL_STATIC);
    return NULL;
  }
  return actualVersion;
}
}]
    close $cout
  }
  method implement path {
    my go
    my Collate_Source $path
    set errs {}
    foreach item [my link list dynamic] {
      if {[catch {$item implement $path} err errdat]} {
        lappend errs "Skipped $item: [$item define get filename] $err"
        if {[dict exists $errdat -errorinfo]} {
          lappend errs [dict get $errdat -errorinfo]
        } else {
          lappend errs $errdat
        }
      }
    }
    foreach item [my link list module] {
      if {[catch {$item implement $path} err errdat]} {
        lappend errs "Skipped $item: [$item define get filename] $err"
        if {[dict exists $errdat -errorinfo]} {
          lappend errs [dict get $errdat -errorinfo]
        } else {
          lappend errs $errdat
        }
      }
    }
    if {[llength $errs]} {
      set logfile [file join $::CWD practcl.log]
      ::practcl::log $logfile "*** ERRORS ***"
      foreach {item trace} $errs {
        ::practcl::log $logfile "###\n# ERROR\n###$item"
        ::practcl::log $logfile "###\n# TRACE\n###$trace"
      }
      ::practcl::log $logfile "*** DEBUG INFO ***"
      ::practcl::log $logfile $::DEBUG_INFO
      puts stderr "Errors saved to $logfile"
      exit 1
    }
    set cout [open [file join $path [my define get output_c]] w]
    puts $cout [subst {/*
** This file is generated by the [info script] script
** any changes will be overwritten the next time it is run
*/}]
    puts $cout [my generate-c]
    puts $cout [my generate-loader]
    close $cout

    set macro HAVE_[string toupper [file rootname [my define get output_h]]]_H
    set hout [open [file join $path [my define get output_h]] w]
    puts $hout [subst {/*
** This file is generated by the [info script] script
** any changes will be overwritten the next time it is run
*/}]
    puts $hout "#ifndef ${macro}"
    puts $hout "#define ${macro} 1"
    puts $hout [my generate-h]
    puts $hout "#endif"
    close $hout

    set output_tcl [my define get output_tcl]
    if {$output_tcl ne {}} {
      set tclout [open [file join $path [my define get output_tcl]] w]
      puts $tclout "###
# This file is generated by the [info script] script
# any changes will be overwritten the next time it is run
###"
      puts $tclout [my generate-tcl-pre]
      puts $tclout [my generate-tcl-loader]
      puts $tclout [my generate-tcl-post]
      close $tclout
    }
  }
  method generate-make path {
    my build-Makefile $path [self]
  }
  method linktype {} {
    return library
  }



  method package-ifneeded {args} {
    set result {}
    set name [my define get pkg_name [my define get name]]
    set version [my define get pkg_vers [my define get version]]
    if {$version eq {}} {
      set version 0.1a
    }
    set output_tcl [my define get output_tcl]
    if {$output_tcl ne {}} {
      set script "\[list source \[file join \$dir $output_tcl\]\]"
    } elseif {[my define get SHARED_BUILD 0]} {
      set script "\[list load \[file join \$dir [my define get libfile]\] $name\]"
    } else {
      # Provide a null passthrough
      set script "\[list package provide $name $version\]"
    }
    set result "package ifneeded [list $name] [list $version] $script"
    foreach alias $args {
      set script "package require $name $version \; package provide $alias $version"
      append result \n\n [list package ifneeded $alias $version $script]
    }
    return $result
  }


  method shared_library {{filename {}}} {
    set name [string tolower [my define get name [my define get pkg_name]]]
    set NAME [string toupper $name]
    set version [my define get version [my define get pkg_vers]]
    set map {}
    lappend map %LIBRARY_NAME% $name
    lappend map %LIBRARY_VERSION% $version
    lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $version]
    lappend map %LIBRARY_PREFIX% [my define getnull libprefix]
    set outfile [string map $map [my define get PRACTCL_NAME_LIBRARY]][my define get SHLIB_SUFFIX]
    return $outfile
  }
  method static_library {{filename {}}} {
    set name [string tolower [my define get name [my define get pkg_name]]]
    set NAME [string toupper $name]
    set version [my define get version [my define get pkg_vers]]
    set map {}
    lappend map %LIBRARY_NAME% $name
    lappend map %LIBRARY_VERSION% $version
    lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $version]
    lappend map %LIBRARY_PREFIX% [my define getnull libprefix]
    set outfile [string map $map [my define get PRACTCL_NAME_LIBRARY]].a
    return $outfile
  }
}

###
# END: class project library.tcl
###
###
# START: class project tclkit.tcl
###
::clay::define ::practcl::tclkit {
  superclass ::practcl::library
  method build-tclkit_main {PROJECT PKG_OBJS} {
    ###
    # Build static package list
    ###
    set statpkglist {}
    foreach cobj [list {*}${PKG_OBJS} $PROJECT] {
      foreach {pkg info} [$cobj project-static-packages] {
        dict set statpkglist $pkg $info
      }
    }
    foreach {ofile info} [${PROJECT} project-compile-products] {
      if {![dict exists $info object]} continue
      set cobj [dict get $info object]
      foreach {pkg info} [$cobj project-static-packages] {
        dict set statpkglist $pkg $info
      }
    }

    set result {}
    $PROJECT include {<tcl.h>}
    $PROJECT include {"tclInt.h"}
    $PROJECT include {"tclFileSystem.h"}
    $PROJECT include {<assert.h>}
    $PROJECT include {<stdio.h>}
    $PROJECT include {<stdlib.h>}
    $PROJECT include {<string.h>}
    $PROJECT include {<math.h>}

    $PROJECT code header {
#ifndef MODULE_SCOPE
#   define MODULE_SCOPE extern
#endif

/*
** Provide a dummy Tcl_InitStubs if we are using this as a static
** library.
*/
#ifndef USE_TCL_STUBS
# undef  Tcl_InitStubs
# define Tcl_InitStubs(a,b,c) TCL_VERSION
#endif
#define STATIC_BUILD 1
#undef USE_TCL_STUBS

/* Make sure the stubbed variants of those are never used. */
#undef Tcl_ObjSetVar2
#undef Tcl_NewStringObj
#undef Tk_Init
#undef Tk_MainEx
#undef Tk_SafeInit
}

    # Build an area of the file for #define directives and
    # function declarations
    set define {}
    set mainhook   [$PROJECT define get TCL_LOCAL_MAIN_HOOK Tclkit_MainHook]
    set mainfunc   [$PROJECT define get TCL_LOCAL_APPINIT Tclkit_AppInit]
    set mainscript [$PROJECT define get main.tcl main.tcl]
    set vfsroot    [$PROJECT define get vfsroot "[$PROJECT define get ZIPFS_VOLUME]app"]
    set vfs_main "${vfsroot}/${mainscript}"

    set map {}
    foreach var {
      vfsroot mainhook mainfunc vfs_main
    } {
      dict set map %${var}% [set $var]
    }
    set thread_init_script {namespace eval ::starkit {}}
    append thread_init_script \n [list set ::starkit::topdir $vfsroot]
    set preinitscript {
set ::odie(boot_vfs) %vfsroot%
set ::SRCDIR $::odie(boot_vfs)
namespace eval ::starkit {}
set ::starkit::topdir %vfsroot%
if {[file exists [file join %vfsroot% tcl_library init.tcl]]} {
  set ::tcl_library [file join %vfsroot% tcl_library]
  set ::auto_path {}
}
if {[file exists [file join %vfsroot% tk_library tk.tcl]]} {
  set ::tk_library [file join %vfsroot% tk_library]
}
} ; # Preinitscript

    set zvfsboot {
/*
 * %mainhook% --
 * Performs the argument munging for the shell
 */
  }
    ::practcl::cputs zvfsboot {
  CONST char *archive;
  Tcl_FindExecutable(*argv[0]);
  archive=Tcl_GetNameOfExecutable();
}
    # We have to initialize the virtual filesystem before calling
    # Tcl_Init().  Otherwise, Tcl_Init() will not be able to find
    # its startup script files.
    if {![$PROJECT define get tip_430 0]} {
      # Add declarations of functions that tip430 puts in the stub files
      $PROJECT code public-header {
int TclZipfs_Init(Tcl_Interp *interp);
int TclZipfs_Mount(
    Tcl_Interp *interp,
    const char *mntpt,
    const char *zipname,
    const char *passwd
);
int TclZipfs_Mount_Buffer(
    Tcl_Interp *interp,
    const char *mntpt,
    unsigned char *data,
    size_t datalen,
    int copy
);
}
      ::practcl::cputs zvfsboot {  TclZipfs_Init(NULL);}
    }
    ::practcl::cputs zvfsboot "  if(!TclZipfs_Mount(NULL, \"app\", archive, NULL)) \x7B "
    ::practcl::cputs zvfsboot {
      Tcl_Obj *vfsinitscript;
      vfsinitscript=Tcl_NewStringObj("%vfs_main%",-1);
      Tcl_IncrRefCount(vfsinitscript);
      if(Tcl_FSAccess(vfsinitscript,F_OK)==0) {
        /* Startup script should be set before calling Tcl_AppInit */
        Tcl_SetStartupScript(vfsinitscript,NULL);
      }
    }
    ::practcl::cputs zvfsboot "    TclSetPreInitScript([::practcl::tcl_to_c $preinitscript])\;"
    ::practcl::cputs zvfsboot "  \x7D else \x7B"
    ::practcl::cputs zvfsboot "    TclSetPreInitScript([::practcl::tcl_to_c {
foreach path {../tcl} {
  set p  [file join $path library init.tcl]
  if {[file exists [file join $path library init.tcl]]} {
    set ::tcl_library [file normalize [file join $path library]]
    break
  }
}
foreach path {
  ../tk
} {
  if {[file exists [file join $path library tk.tcl]]} {
    set ::tk_library [file normalize [file join $path library]]
    break
  }
}
}])\;"
    ::practcl::cputs zvfsboot "  \x7D"
    ::practcl::cputs zvfsboot "  return TCL_OK;"

    if {[$PROJECT define get TEACUP_OS] eq "windows"} {
      set header {int %mainhook%(int *argc, TCHAR ***argv)}
    } else {
      set header {int %mainhook%(int *argc, char ***argv)}
    }
    $PROJECT c_function  [string map $map $header] [string map $map $zvfsboot]

    practcl::cputs appinit "int %mainfunc%(Tcl_Interp *interp) \x7B"

  # Build AppInit()
  set appinit {}
  practcl::cputs appinit {
  if ((Tcl_Init)(interp) == TCL_ERROR) {
      return TCL_ERROR;
  }

}
    if {![$PROJECT define get tip_430 0]} {
      ::practcl::cputs appinit {  TclZipfs_Init(interp);}
    }
    set main_init_script {}

    foreach {statpkg info} $statpkglist {
      set initfunc {}
      if {[dict exists $info initfunc]} {
        set initfunc [dict get $info initfunc]
      }
      if {$initfunc eq {}} {
        set initfunc [string totitle ${statpkg}]_Init
      }
      if {![dict exists $info version]} {
        error "$statpkg HAS NO VERSION"
      }
      # We employ a NULL to prevent the package system from thinking the
      # package is actually loaded into the interpreter
      $PROJECT code header "extern Tcl_PackageInitProc $initfunc\;\n"
      set script [list package ifneeded $statpkg [dict get $info version] [list ::load {} $statpkg]]
      append main_init_script \n [list set ::starkit::static_packages(${statpkg}) $script]

      if {[dict get $info autoload]} {
        ::practcl::cputs appinit "  if(${initfunc}(interp)) return TCL_ERROR\;"
        ::practcl::cputs appinit "  Tcl_StaticPackage(interp,\"$statpkg\",$initfunc,NULL)\;"
      } else {
        ::practcl::cputs appinit "\n  Tcl_StaticPackage(NULL,\"$statpkg\",$initfunc,NULL)\;"
        append main_init_script \n $script
      }
    }
    append main_init_script \n {
if {[file exists [file join $::starkit::topdir pkgIndex.tcl]]} {
  #In a wrapped exe, we don't go out to the environment
  set dir $::starkit::topdir
  source [file join $::starkit::topdir pkgIndex.tcl]
}}
    append thread_init_script $main_init_script
    append main_init_script \n {
# Specify a user-specific startup file to invoke if the application
# is run interactively.  Typically the startup file is "~/.apprc"
# where "app" is the name of the application.  If this line is deleted
# then no user-specific startup file will be run under any conditions.
}
    append thread_init_script \n [list set ::starkit::thread_init $thread_init_script]
    append main_init_script \n [list set ::starkit::thread_init $thread_init_script]
    append main_init_script \n [list set tcl_rcFileName [$PROJECT define get tcl_rcFileName ~/.tclshrc]]


    practcl::cputs appinit "  Tcl_Eval(interp,[::practcl::tcl_to_c  $thread_init_script]);"
    practcl::cputs appinit {  return TCL_OK;}
    $PROJECT c_function [string map $map "int %mainfunc%(Tcl_Interp *interp)"] [string map $map $appinit]
  }
  method Collate_Source CWD {
    next $CWD
    set name [my define get name]
    # Assume a static shell
    if {[my define exists SHARED_BUILD]} {
      my define set SHARED_BUILD 0
    }
    if {![my define exists TCL_LOCAL_APPINIT]} {
      my define set TCL_LOCAL_APPINIT Tclkit_AppInit
    }
    if {![my define exists TCL_LOCAL_MAIN_HOOK]} {
      my define set TCL_LOCAL_MAIN_HOOK Tclkit_MainHook
    }

    set PROJECT [self]
    set os [$PROJECT define get TEACUP_OS]
    if {[my define get SHARED_BUILD 0]} {
      puts [list BUILDING TCLSH FOR OS $os]
    } else {
      puts [list BUILDING KIT FOR OS $os]
    }
    set TCLOBJ [$PROJECT tclcore]
    ::practcl::toolset select $TCLOBJ


    set TCLSRCDIR [$TCLOBJ define get srcdir]

    set PKG_OBJS {}
    foreach item [$PROJECT link list core.library] {
      if {[string is true [$item define get static]]} {
        lappend PKG_OBJS $item
      }
    }
    foreach item [$PROJECT link list package] {
      if {[string is true [$item define get static]]} {
        lappend PKG_OBJS $item
      }
    }
    # Arrange to build an main.c that utilizes TCL_LOCAL_APPINIT and TCL_LOCAL_MAIN_HOOK
    if {$os eq "windows"} {
      set PLATFORM_SRC_DIR win
      if {![my define get SHARED_BUILD 0]} {
        my add class csource filename [file join $TCLSRCDIR win tclWinReg.c] initfunc Registry_Init pkg_name registry pkg_vers 1.3.1 autoload 1
        my add class csource filename [file join $TCLSRCDIR win tclWinDde.c] initfunc Dde_Init pkg_name dde pkg_vers 1.4.0 autoload 1
      }
      my add class csource ofile [my define get name]_appinit.o filename [file join $TCLSRCDIR win tclAppInit.c] extra [list -DTCL_LOCAL_MAIN_HOOK=[my define get TCL_LOCAL_MAIN_HOOK Tclkit_MainHook] -DTCL_LOCAL_APPINIT=[my define get TCL_LOCAL_APPINIT Tclkit_AppInit]]
    } else {
      set PLATFORM_SRC_DIR unix
      my add class csource ofile [my define get name]_appinit.o filename [file join $TCLSRCDIR unix tclAppInit.c] extra [list -DTCL_LOCAL_MAIN_HOOK=[my define get TCL_LOCAL_MAIN_HOOK Tclkit_MainHook] -DTCL_LOCAL_APPINIT=[my define get TCL_LOCAL_APPINIT Tclkit_AppInit]]
    }

    if {![my define get SHARED_BUILD 0]} {
      ###
      # Add local static Zlib implementation
      ###
      set cdir [file join $TCLSRCDIR compat zlib]
      foreach file {
        adler32.c compress.c crc32.c
        deflate.c infback.c inffast.c
        inflate.c inftrees.c trees.c
        uncompr.c zutil.c
      } {
        my add [file join $cdir $file]
      }
    }
    ###
    # Pre 8.7, Tcl doesn't include a Zipfs implementation
    # in the core. Grab the one from odielib
    ###
    set zipfs [file join $TCLSRCDIR generic tclZipfs.c]
    if {![$PROJECT define exists ZIPFS_VOLUME]} {
      $PROJECT define set ZIPFS_VOLUME "zipfs:/"
    }
    $PROJECT code header "#define ZIPFS_VOLUME \"[$PROJECT define get ZIPFS_VOLUME]\""
    if {[file exists $zipfs]} {
      $TCLOBJ define set tip_430 1
      my define set tip_430 1
    } else {
      # The Tclconfig project maintains a mirror of the version
      # released with the Tcl core
      my define set tip_430 0
      set tclzipfs_c [my define get tclzipfs_c]
      if {![file exists $tclzipfs_c]} {


        ::practcl::LOCAL tool tclconfig unpack
        set COMPATSRCROOT [::practcl::LOCAL tool tclconfig define get srcdir]
        set tclzipfs_c [file join $COMPATSRCROOT compat tclZipfs.c]


      }
      my add class csource ofile tclZipfs.o filename $tclzipfs_c \
        extra -I[::practcl::file_relative $CWD [file join $TCLSRCDIR compat zlib contrib minizip]]
    }






    my define add include_dir [file join $TCLSRCDIR generic]
    my define add include_dir [file join $TCLSRCDIR $PLATFORM_SRC_DIR]

    # This file will implement TCL_LOCAL_APPINIT and TCL_LOCAL_MAIN_HOOK
    my build-tclkit_main $PROJECT $PKG_OBJS
  }



  method wrap {PWD exename vfspath args} {
    cd $PWD
    if {![file exists $vfspath]} {
      file mkdir $vfspath
    }
    foreach item [my link list core.library] {
      set name  [$item define get name]
      set libsrcdir [$item define get srcdir]
      if {[file exists [file join $libsrcdir library]]} {
        ::practcl::copyDir [file join $libsrcdir library] [file join $vfspath ${name}_library]
      }
    }
    # Assume the user will populate the VFS path
    #if {[my define get installdir] ne {}} {
    #  ::practcl::copyDir [file join [my define get installdir] [string trimleft [my define get prefix] /] lib] [file join $vfspath lib]
    #}

    foreach arg $args {
       ::practcl::copyDir $arg $vfspath
    }

    set fout [open [file join $vfspath pkgIndex.tcl] w]
    puts $fout [string map [list %platform% [my define get TEACUP_PROFILE]] {set ::tcl_teapot_profile {%platform%}}]
    puts $fout {
namespace eval ::starkit {}
set ::PKGIDXFILE [info script]
set dir [file dirname $::PKGIDXFILE]
if {$::tcl_platform(platform) eq "windows"} {
  set ::starkit::localHome [file join [file normalize $::env(LOCALAPPDATA)] tcl]
} else {
  set ::starkit::localHome [file normalize ~/tcl]
}


set ::tcl_teapot [file join $::starkit::localHome teapot $::tcl_teapot_profile]
lappend ::auto_path $::tcl_teapot

}
    puts $fout [list proc installDir [info args ::practcl::installDir] [info body ::practcl::installDir]]
    set buffer [::practcl::pkgindex_path $vfspath]
    puts $fout $buffer
    puts $fout {
# Advertise statically linked packages
foreach {pkg script} [array get ::starkit::static_packages] {
  eval $script
}
}
    puts $fout {
###
# Cache binary packages distributed as dynamic libraries in a known location
###
foreach teapath [glob -nocomplain [file join $dir teapot $::tcl_teapot_profile *]] {
  set pkg [file tail $teapath]
  set pkginstall [file join $::tcl_teapot $pkg]
  if {![file exists $pkginstall]} {
    installDir $teapath $pkginstall
  }
}
}
    close $fout

    set EXEEXT [my define get EXEEXT]
    set tclkit_bare [my define get tclkit_bare]
    ::practcl::mkzip ${exename}${EXEEXT} $tclkit_bare $vfspath
    if { [my define get TEACUP_OS] ne "windows" } {
      file attributes ${exename}${EXEEXT} -permissions a+x
    }
  }
}

###
# END: class project tclkit.tcl
###
###
# START: class distro baseclass.tcl
###
::clay::define ::practcl::distribution {
  method scm_info {} {
    return {
      scm  None
      hash {}
      maxdate {}
      tags {}
      isodate {}
    }
  }
  method DistroMixIn {} {
    my define set scm none
  }
  method Sandbox {} {
    if {[my define exists sandbox]} {
      return [my define get sandbox]
    }
    if {[my clay delegate project] ni {::noop {}}} {
      set sandbox [my <project> define get sandbox]
      if {$sandbox ne {}} {
        my define set sandbox $sandbox
        return $sandbox
      }
    }
    set sandbox [file normalize [file join $::CWD ..]]
    my define set sandbox $sandbox
    return $sandbox
  }
  method SrcDir {} {
    set pkg [my define get name]
    if {[my define exists srcdir]} {
      return [my define get srcdir]
    }
    set sandbox [my Sandbox]
    set srcdir [file join [my Sandbox] $pkg]
    my define set srcdir $srcdir
    return $srcdir
  }
  method ScmTag    {} {}
  method ScmClone  {} {}
  method ScmUnpack {} {}
  method ScmUpdate {} {}
  method Unpack {} {
    set srcdir [my SrcDir]
    if {[file exists $srcdir]} {
      return
    }
    set pkg [my define get name]
    if {[my define exists download]} {
      # Utilize a staged download
      set download [my define get download]
      if {[file exists [file join $download $pkg.zip]]} {
        ::practcl::tcllib_require zipfile::decode
        ::zipfile::decode::unzipfile [file join $download $pkg.zip] $srcdir
        return
      }
    }
    my ScmUnpack
  }
}
oo::objdefine ::practcl::distribution {
  method Sandbox {object} {
    if {[$object define exists sandbox]} {
      return [$object define get sandbox]
    }
    if {[$object clay delegate project] ni {::noop {}}} {
      set sandbox [$object <project> define get sandbox]
      if {$sandbox ne {}} {
        $object define set sandbox $sandbox
        return $sandbox
      }
    }
    set pkg [$object define get name]
    set sandbox [file normalize [file join $::CWD ..]]
    $object define set sandbox $sandbox
    return $sandbox
  }

  method select object {
    if {[$object define exists scm]} {
      return [$object define get scm]
    }

    set pkg [$object define get name]
    if {[$object define get srcdir] ne {}} {
      set srcdir [$object define get srcdir]
    } else {
      set srcdir [file join [my Sandbox $object] $pkg]
      $object define set srcdir $srcdir
    }

    set classprefix ::practcl::distribution.
    if {[file exists $srcdir]} {
      foreach class [::info commands ${classprefix}*] {
        if {[$class claim_path $srcdir]} {
          $object clay mixinmap distribution $class
          set name [$class claim_option]
          $object define set scm $name
          return $name
        }
      }
    }
    foreach class [::info commands ${classprefix}*] {
      if {[$class claim_object $object]} {
        $object clay mixinmap distribution $class
        set name [$class claim_option]
        $object define set scm $name
        return $name
      }
    }
    if {[$object define get scm] eq {} && [$object define exists file_url]} {
      set class ::practcl::distribution.snapshot
      set name [$class claim_option]
      $object define set scm $name
      $object clay mixinmap distribution $class
      return $name
    }
    error "Cannot determine source distribution method"
  }

  method claim_option {} {
    return Unknown
  }

  method claim_object object {
    return false
  }

  method claim_path path {
    return false
  }
}

###
# END: class distro baseclass.tcl
###
###
# START: class distro snapshot.tcl
###
::clay::define ::practcl::distribution.snapshot {
  superclass ::practcl::distribution
  method ScmUnpack {} {
    set srcdir [my SrcDir]
    if {[file exists [file join $srcdir .download]]} {
      return 0
    }

    set dpath [::practcl::LOCAL define get download]

    set url [my define get file_url]
    set fname [file tail $url]
    set archive [file join $dpath $fname]
    if {![file exists $archive]} {
      ::http::wget $url $archive
    }
    set CWD [pwd]
    switch [file extension $fname] {
      .zip {
        # Zipfile

      }
      .tar {
        ::practcl::tcllib_require tar
      }
      .tgz -
      .gz {
        # Tarball
        ::practcl::tcllib_require tcl::transform::zlib
        ::practcl::tcllib_require tar
        set fh [::open $archive]
        fconfigure $fh -encoding binary -translation lf -eofchar {}
        ::tcl::transform::zlib $fh
      }
    }
    set fosdb [my ScmClone]
    set tag [my ScmTag]
    file mkdir $srcdir
    ::practcl::fossil $srcdir open $fosdb $tag
    return 1
  }
}
oo::objdefine ::practcl::distribution.snapshot {

  method claim_object object {
    return false
  }

  method claim_option {} {
    return snapshot
  }

  method claim_path path {
    if {[file exists [file join $path .download]]} {
      return true
    }
    return false
  }
}

###
# END: class distro snapshot.tcl
###
###
# START: class distro fossil.tcl
###
::clay::define ::practcl::distribution.fossil {
  superclass ::practcl::distribution
  method scm_info {} {
    set info [next]
    dict set info scm fossil
    foreach {field value} [::practcl::fossil_status [my define get srcdir]] {
      dict set info $field $value
    }
    return $info
  }

  method ScmClone  {} {
    set srcdir [my SrcDir]
    if {[file exists [file join $srcdir .fslckout]]} {
      return
    }
    if {[file exists [file join $srcdir _FOSSIL_]]} {
      return
    }
    if {![::info exists ::practcl::fossil_dbs]} {
      # Get a list of local fossil databases
      set ::practcl::fossil_dbs [exec fossil all list]
    }
    set pkg [my define get name]
    # Return an already downloaded fossil repo
    foreach line [split $::practcl::fossil_dbs \n] {
      set line [string trim $line]
      if {[file rootname [file tail $line]] eq $pkg} {
        return $line
      }
    }
    set download [::practcl::LOCAL define get download]
    set fosdb [file join $download $pkg.fos]
    if {[file exists $fosdb]} {
      return $fosdb
    }

    file mkdir [file join $download fossil]
    set fosdb [file join $download fossil $pkg.fos]
    if {[file exists $fosdb]} {
      return $fosdb
    }

    set cloned 0
    # Attempt to clone from a local network mirror
    if {[::practcl::LOCAL define exists fossil_mirror]} {
      set localmirror [::practcl::LOCAL define get fossil_mirror]
      catch {
        ::practcl::doexec fossil clone $localmirror/$pkg $fosdb
        set cloned 1
      }

      if {$cloned} {
        return $fosdb
      }
    }
    # Attempt to clone from the canonical source
    if {[my define get fossil_url] ne {}} {
      catch {
        ::practcl::doexec fossil clone [my define get fossil_url] $fosdb
        set cloned 1
      }
      if {$cloned} {
        return $fosdb
      }
    }
    # Fall back to the fossil mirror on the island of misfit toys
    ::practcl::doexec fossil clone http://fossil.etoyoc.com/fossil/$pkg $fosdb
    return $fosdb
  }
  method ScmTag {} {
    if {[my define exists scm_tag]} {
      return [my define get scm_tag]
    }
    if {[my define exists tag]} {
      set tag [my define get tag]
    } else {
      set tag trunk
    }
    my define set scm_tag $tag
    return $tag
  }
  method ScmUnpack {} {
    set srcdir [my SrcDir]
    if {[file exists [file join $srcdir .fslckout]]} {
      return 0
    }
    if {[file exists [file join $srcdir _FOSSIL_]]} {
      return 0
    }
    set CWD [pwd]
    set fosdb [my ScmClone]
    set tag [my ScmTag]
    file mkdir $srcdir
    ::practcl::fossil $srcdir open $fosdb $tag
    return 1
  }
  method ScmUpdate {} {
    if {[my ScmUnpack]} {
      return
    }
    set srcdir [my SrcDir]
    set tag [my ScmTag]
    ::practcl::fossil $srcdir update $tag
  }
}
oo::objdefine ::practcl::distribution.fossil {

  # Check for markers in the metadata
  method claim_object obj {
    set path [$obj define get srcdir]
    if {[my claim_path $path]} {
      return true
    }
    if {[$obj define get fossil_url] ne {}} {
      return true
    }
    return false
  }

  method claim_option {} {
    return fossil
  }

  # Check for markers in the source root
  method claim_path path {
    if {[file exists [file join $path .fslckout]]} {
      return true
    }
    if {[file exists [file join $path _FOSSIL_]]} {
      return true
    }
    return false
  }
}

###
# END: class distro fossil.tcl


###
###
# START: class distro git.tcl
###
::clay::define ::practcl::distribution.git {
  superclass ::practcl::distribution
  method ScmTag {} {
    if {[my define exists scm_tag]} {
      return [my define get scm_tag]
    }
    if {[my define exists tag]} {
      set tag [my define get tag]
    } else {
      set tag master
    }
    my define set scm_tag $tag
    return $tag
  }
  method ScmUnpack {} {
    set srcdir [my SrcDir]
    if {[file exists [file join $srcdir .git]]} {
      return 0
    }
    set CWD [pwd]
    set tag [my ScmTag]
    set pkg [my define get name]
    if {[my define exists git_url]} {
      ::practcl::doexec git clone --branch $tag [my define get git_url] $srcdir
    } else {
      ::practcl::doexec git clone --branch $tag https://github.com/eviltwinskippy/$pkg $srcdir
    }
    return 1
  }
  method ScmUpdate {} {
    if {[my ScmUnpack]} {
      return
    }
    set CWD [pwd]
    set srcdir [my SrcDir]
    set tag [my ScmTag]
    ::practcl::doexec_in $srcdir git pull
    cd $CWD
  }
}
oo::objdefine ::practcl::distribution.git {

  method claim_object obj {
    set path [$obj define get srcdir]
    if {[my claim_path $path]} {
      return true
    }
    if {[$obj define get git_url] ne {}} {
      return true
    }
    return false
  }

  method claim_option {} {
    return git
  }

  method claim_path path {
   if {[file exists [file join $path .git]]} {
      return true
    }
    return false
  }
}

###
# END: class distro git.tcl
###
###
# START: class subproject baseclass.tcl
###
::clay::define ::practcl::subproject {
  superclass ::practcl::module
  method _MorphPatterns {} {
    return {{::practcl::subproject.@name@} {::practcl::@name@} {@name@} {::practcl::subproject}}
  }
  method BuildDir {PWD} {
    return [my define get srcdir]
  }
  method child which {
    switch $which {
      delegate -
      organs {
	# A library can be a project, it can be a module. Any
	# subordinate modules will indicate their existance
        return [list project [self] module [self]]
      }
    }
  }
  method compile {} {}
  method go {} {
    ::practcl::distribution select [self]
    set name [my define get name]
    my define set builddir [my BuildDir [my define get masterpath]]
    my define set builddir [my BuildDir [my define get masterpath]]
    my sources
  }
  method install args {}
  method linktype {} {
    return {subordinate package}
  }
  method linker-products {configdict} {}
  method linker-external {configdict} {
    if {[dict exists $configdict PRACTCL_PKG_LIBS]} {
      return [dict get $configdict PRACTCL_PKG_LIBS]
    }
    if {[dict exists $configdict LIBS]} {
      return [dict get $configdict LIBS]
    }
  }
  method linker-extra {configdict} {
    if {[dict exists $configdict PRACTCL_LINKER_EXTRA]} {
      return [dict get $configdict PRACTCL_LINKER_EXTRA]
    }
    return {}
  }
  method env-bootstrap {} {
    set pkg [my define get pkg_name [my define get name]]
    package require $pkg
  }
  method env-exec {} {}
  method env-install {} {

    my unpack
  }
  method env-load {} {
    my variable loaded
    if {[info exists loaded]} {
      return 0
    }
    if {![my env-present]} {
      my env-install
    }
    my env-bootstrap
    set loaded 1
  }
  method env-present {} {
    set pkg [my define get pkg_name [my define get name]]
    if {[catch [list package require $pkg]]} {
      return 0
    }
    return 1
  }

  method sources {} {}
  method update {} {
    my ScmUpdate
  }
  method unpack {} {
    cd $::CWD
    ::practcl::distribution select [self]
    my Unpack
    ::practcl::toolset select [self]
    cd $::CWD

  }
}
::clay::define ::practcl::subproject.source {
  superclass ::practcl::subproject ::practcl::library
  method env-bootstrap {} {
    set LibraryRoot [file join [my define get srcdir] [my define get module_root modules]]
    if {[file exists $LibraryRoot] && $LibraryRoot ni $::auto_path} {
      set ::auto_path [linsert $::auto_path 0 $LibraryRoot]
    }
  }
  method env-present {} {
    set path [my define get srcdir]
    return [file exists $path]
  }
  method linktype {} {
    return {subordinate package source}
  }
}
::clay::define ::practcl::subproject.teapot {
  superclass ::practcl::subproject
  method env-bootstrap {} {
    set pkg [my define get pkg_name [my define get name]]
    package require $pkg
  }
  method env-install {} {
    set pkg [my define get pkg_name [my define get name]]
    set download [my <project> define get download]
    my unpack
    set prefix [string trimleft [my <project> define get prefix] /]
    ::practcl::tcllib_require zipfile::decode
    ::zipfile::decode::unzipfile [file join $download $pkg.zip] [file join $prefix lib $pkg]
  }
  method env-present {} {
    set pkg [my define get pkg_name [my define get name]]
    if {[catch [list package require $pkg]]} {
      return 0
    }
    return 1
  }
  method install DEST {
    set pkg [my define get pkg_name [my define get name]]
    set download [my <project> define get download]
    my unpack
    set prefix [string trimleft [my <project> define get prefix] /]
    ::practcl::tcllib_require zipfile::decode
    ::zipfile::decode::unzipfile [file join $download $pkg.zip] [file join $DEST $prefix lib $pkg]
  }
}
::clay::define ::practcl::subproject.kettle {
  superclass ::practcl::subproject
  method kettle {path args} {
    my variable kettle
    if {![info exists kettle]} {
      ::practcl::LOCAL tool kettle env-load
      set kettle [file join [::practcl::LOCAL tool kettle define get srcdir] kettle]
    }
    set srcdir [my SourceRoot]
    ::practcl::dotclexec $kettle -f [file join $srcdir build.tcl] {*}$args
  }
  method install DEST {
    my kettle reinstall --prefix $DEST
  }
}
::clay::define ::practcl::subproject.critcl {
  superclass ::practcl::subproject
  method install DEST {
    my critcl -pkg [my define get name]
    set srcdir [my SourceRoot]
    ::practcl::copyDir [file join $srcdir [my define get name]] [file join $DEST lib [my define get name]]
  }
}
::clay::define ::practcl::subproject.sak {
  superclass ::practcl::subproject
  method env-bootstrap {} {
    set LibraryRoot [file join [my define get srcdir] [my define get module_root modules]]
    if {[file exists $LibraryRoot] && $LibraryRoot ni $::auto_path} {
      set ::auto_path [linsert $::auto_path 0 $LibraryRoot]
    }
  }
  method env-install {} {
    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    my unpack
    set prefix [my <project> define get prefix [file normalize [file join ~ tcl]]]
    set srcdir [my define get srcdir]
    ::practcl::dotclexec [file join $srcdir installer.tcl] \
      -apps -app-path [file join $prefix apps] \
      -html -html-path [file join $prefix doc html $pkg] \
      -pkg-path [file join $prefix lib $pkg]  \
      -no-nroff -no-wait -no-gui
  }
  method env-present {} {
    set path [my define get srcdir]
    return [file exists $path]
  }
  method install DEST {
    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    my unpack
    set prefix [string trimleft [my <project> define get prefix] /]
    set srcdir [my define get srcdir]
    ::practcl::dotclexec [file join $srcdir installer.tcl] \
      -pkg-path [file join $DEST $prefix lib $pkg]  \
      -no-examples -no-html -no-nroff \
      -no-wait -no-gui -no-apps
  }
  method install-module {DEST args} {
    set srcdir [my define get srcdir]
    if {[llength $args]==1 && [lindex $args 0] in {* all}} {
      set pkg [my define get pkg_name [my define get name]]
      ::practcl::dotclexec [file join $srcdir installer.tcl] \
        -pkg-path [file join $DEST $pkg]  \
        -no-examples -no-html -no-nroff \
        -no-wait -no-gui -no-apps
    } else {
      foreach module $args {
        ::practcl::installModule [file join $srcdir modules $module] [file join $DEST $module]

      }
    }
  }
}
::clay::define ::practcl::subproject.practcl {
  superclass ::practcl::subproject
  method env-bootstrap {} {
    set LibraryRoot [file join [my define get srcdir] [my define get module_root modules]]
    if {[file exists $LibraryRoot] && $LibraryRoot ni $::auto_path} {
      set ::auto_path [linsert $::auto_path 0 $LibraryRoot]
    }
  }
  method env-install {} {
    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    my unpack
    set prefix [my <project> define get prefix [file normalize [file join ~ tcl]]]
    set srcdir [my define get srcdir]
    ::practcl::dotclexec [file join $srcdir make.tcl] install [file join $prefix lib $pkg]
  }
  method install DEST {
    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    my unpack
    set prefix [string trimleft [my <project> define get prefix] /]
    set srcdir [my define get srcdir]
    puts [list INSTALLING  [my define get name] to [file join $DEST $prefix lib $pkg]]
    ::practcl::dotclexec [file join $srcdir make.tcl] install [file join $DEST $prefix lib $pkg]
  }
  method install-module {DEST args} {
    set pkg [my define get pkg_name [my define get name]]
    set srcdir [my define get srcdir]
    ::practcl::dotclexec [file join $srcdir make.tcl] install-module $DEST {*}$args
  }
}

###
# END: class subproject baseclass.tcl
###
###
# START: class subproject binary.tcl
###
::clay::define ::practcl::subproject.binary {
  superclass ::practcl::subproject
  method clean {} {
    set builddir [file normalize [my define get builddir]]
    if {![file exists $builddir]} return
    if {[file exists [file join $builddir make.tcl]]} {
      ::practcl::domake.tcl $builddir clean

    } else {
      catch {::practcl::domake $builddir clean}

    }


  }
 method env-install {} {
    ###
    # Handle tea installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    set os [::practcl::local_os]



    my define set os $os
    my unpack
    set prefix [my <project> define get prefix [file normalize [file join ~ tcl]]]
    set srcdir [my define get srcdir]

    lappend options --prefix $prefix --exec-prefix $prefix
    my define set config_opts $options
    my go
    my clean
    my compile

    my make install {}
  }
  method project-compile-products {} {}
  method ComputeInstall {} {
    if {[my define exists install]} {
      switch [my define get install] {
        static {
          my define set static 1
          my define set autoload 0
        }
        static-autoload {
          my define set static 1
          my define set autoload 1
        }

        vfs {

          my define set static 0
          my define set autoload 0
          my define set vfsinstall 1
        }
        null {
          my define set static 0
          my define set autoload 0
          my define set vfsinstall 0
        }
        default {


        }

      }

    }
  }
  method go {} {
    next
    ::practcl::distribution select [self]
    my ComputeInstall
    my define set builddir [my BuildDir [my define get masterpath]]
  }

  method linker-products {configdict} {
    if {![my define get static 0]} {
      return {}
    }
    set srcdir [my define get builddir]
    if {[dict exists $configdict libfile]} {
      return " [file join $srcdir [dict get $configdict libfile]]"
    }
  }

  method project-static-packages {} {
    if {![my define get static 0]} {
      return {}
    }
    set result [my define get static_packages]
    set statpkg  [my define get static_pkg]
    set initfunc [my define get initfunc]
    if {$initfunc ne {}} {
      set pkg_name [my define get pkg_name]
      if {$pkg_name ne {}} {
        dict set result $pkg_name initfunc $initfunc
        set version [my define get version]
        if {$version eq {}} {
          my unpack
          set info [my read_configuration]
          set version [dict get $info version]
          set pl {}
          if {[dict exists $info patch_level]} {
            set pl [dict get $info patch_level]
            append version $pl
          }
          my define set version $version
        }
        dict set result $pkg_name version $version
        dict set result $pkg_name autoload [my define get autoload 0]
      }
    }
    foreach item [my link list subordinate] {
      foreach {pkg info} [$item project-static-packages] {
        dict set result $pkg $info
      }
    }
    return $result
  }

  method BuildDir {PWD} {
    set name [my define get name]
    set debug [my define get debug 0]
    if {[my <project> define get LOCAL 0]} {
      return [my define get builddir [file join $PWD local $name]]
    }
    if {$debug} {
      return [my define get builddir [file join $PWD debug $name]]
    } else {
      return [my define get builddir [file join $PWD pkg $name]]
    }
  }
  method compile {} {
    set name [my define get name]
    set PWD $::CWD
    cd $PWD
    my unpack
    set srcdir [file normalize [my SrcDir]]
    set localsrcdir [my MakeDir $srcdir]
    my define set localsrcdir $localsrcdir
    my Collate_Source $PWD

    ###
    # Build a starter VFS for both Tcl and wish
    ###
    set srcdir [my define get srcdir]
    if {[my define get static 1]} {
      puts "BUILDING Static $name $srcdir"
    } else {
      puts "BUILDING Dynamic $name $srcdir"
    }













    my make compile


    cd $PWD
  }


  method Configure {} {
    cd $::CWD
    my unpack
    ::practcl::toolset select [self]
    set srcdir [file normalize [my define get srcdir]]
    set builddir [file normalize [my define get builddir]]
    file mkdir $builddir


    my make autodetect
  }











  method install DEST {
    set PWD [pwd]

    set PREFIX  [my <project> define get prefix]

    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    if {[my <project> define get teapot] ne {}} {
      set TEAPOT [my <project> define get teapot]
      set found 0
      foreach ver [my define get pkg_vers [my define get version]] {
        set teapath [file join $TEAPOT $pkg$ver]
        if {[file exists $teapath]} {
          set dest  [file join $DEST [string trimleft $PREFIX /] lib [file tail $teapath]]
          ::practcl::copyDir $teapath $dest
          return
        }
      }
    }
    my compile
    my make install $DEST

    cd $PWD




















  }
}
::clay::define ::practcl::subproject.tea {
  superclass ::practcl::subproject.binary

}
::clay::define ::practcl::subproject.library {
  superclass ::practcl::subproject.binary ::practcl::library
  method install DEST {

    my compile





  }
}


::clay::define ::practcl::subproject.external {
  superclass ::practcl::subproject.binary

  method install DEST {






    my compile

  }
}





###
# END: class subproject binary.tcl
###
###
# START: class subproject core.tcl
###
::clay::define ::practcl::subproject.core {
  superclass ::practcl::subproject.binary
  method env-bootstrap {} {}





  method env-present {} {





















    set PREFIX [my <project> define get prefix]

    set name [my define get name]

    set fname [file join $PREFIX lib ${name}Config.sh]

    return [file exists $fname]
  }

  method env-install {} {
    my unpack
    set os [::practcl::local_os]



    set prefix [my <project> define get prefix [file normalize [file join ~ tcl]]]
    lappend options --prefix $prefix --exec-prefix $prefix



    my define set config_opts $options
    puts [list [self] OS [dict get $os TEACUP_OS] options $options]


    my go
    my compile
    my make install {}

  }
  method go {} {

    my define set core_binary 1
    next
  }

  method linktype {} {
    return {subordinate core.library}
  }
}

###
# END: class subproject core.tcl
###
###
# START: class tool.tcl
###
set ::practcl::MAIN ::practcl::LOCAL
set ::auto_index(::practcl::LOCAL) {
  ::practcl::project create ::practcl::LOCAL
  ::practcl::LOCAL define set [::practcl::local_os]
  ::practcl::LOCAL define set LOCAL 1

  # Until something better comes along, use ::practcl::LOCAL
  # as our main project
  # Add tclconfig as a project of record
  ::practcl::LOCAL add_tool tclconfig {
    name tclconfig tag practcl class subproject.source fossil_url http://core.tcl.tk/tclconfig
  }
  # Add tcllib as a project of record
  ::practcl::LOCAL add_tool tcllib {
    tag trunk class sak fossil_url http://core.tcl.tk/tcllib
  }
  ::practcl::LOCAL add_tool kettle {
    tag trunk class sak fossil_url http://fossil.etoyoc.com/fossil/kettle
  }
  ::practcl::LOCAL add_tool tclvfs {
    tag trunk class tea
    fossil_url http://fossil.etoyoc.com/fossil/tclvfs
  }
  ::practcl::LOCAL add_tool critcl {
    tag master class subproject.binary
    git_url http://github.com/andreas-kupries/critcl
    modules lib
  } {
    method env-bootstrap {} {
      package require critcl::app
    }
    method env-install {} {
      my unpack
      set prefix [my <project> define get prefix [file join [file normalize ~] tcl]]
      set srcdir [my define get srcdir]
      ::practcl::dotclexec [file join $srcdir build.tcl] install [file join $prefix lib]
    }
  }
  ::practcl::LOCAL add_tool odie {
    tag trunk class subproject.source
    fossil_url http://fossil.etoyoc.com/fossil/odie
  }
  ::practcl::LOCAL add_tool tcl {
    tag release class subproject.core
    fossil_url http://core.tcl.tk/tcl
  }
  ::practcl::LOCAL add_tool tk {
    tag release class subproject.core
    fossil_url http://core.tcl.tk/tcl
  }
  ::practcl::LOCAL add_tool sqlite {
    tag practcl
    class subproject.tea
    pkg_name sqlite3
    fossil_url http://fossil.etoyoc.com/fossil/sqlite
  }
}

###
# END: class tool.tcl
###

namespace eval ::practcl {
  namespace export *
}








|

<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
|
|
<
|
<
<
<
<
|
<
<
<
<
<
<
<
<
|
<
<
|
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<



>
>
>










|



|








>
>
|




|






<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|

<
<
<
|






>

|
<
<
<
<
<
|
|
>
|
|
>

<
<
<
<
<








<
|
|
<





<
<
|
|
|
|
|
|
|
|
|
|
|
|
|




|
<
<
<
<
|
<
<
<
|

|
|
|
>
>
|
|
|
>
>
|
<
<
|
>

>
>
>
>


>

|

>
>
>







|
|
|


<
|
|
<
>




|
<

<
|
|
<
<
<
<
|
>
>
|
<
>
|
<



|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<

|
<
<
|
|






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
<
|
|
|
<
<
|
|
>
|
>
|
|
|
<
<

|
<
<
|
|
<
<
<
<
<
|
<
<
<
<
<
<
|
<
<
<
<
<
<
|
<
<
|
<
<
<
|
<
<
<
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
>
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
|
|
|
<
<
<
<
<
|
<
<
<
<
<
<
<
|
>
|
|
|
|
<
<
<
<
<
|
|
<
|
<
<
<
<
<
|
<
<
<
<
|
<
<
<
|
<

<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
|
<
<

|
<
<
<
<
|
<
<
<
<
<
<
<

<
>
>

<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|

|
<
<
<
|
<
|
<
|
<
<
<
<
<
<
|
|
<
<
|
<
<
<
|
<
<
|
<
<
<
<
|
|
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
<
<
>

<
<
<
<
<
<
<
<
<
<
|
<
<
|
<
|
<
<
<
>
|
<
<
<
<
<
<
|
<
<
>


<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
|

<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<

|
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<





|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

|
|




<
<
<
<
<
<
<
<
<
<
<
>
|
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
<
<
|
<
|
|
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
|
<
|
<
<
<
<
<
<
<
<
|
|
<
|
<
>

<
>

>
>
|
<
<
<
<
|
|
>
>
>
|
<
|
<
>
|
<
<
<
<
>
<
<
<
<
<
|
<
|
|
<
<
<
<
<
>
|
>
|
<
<
<
<
<
<
<
<
<
>
|
|
>
|
>
|
|


<
<


>









>
|












<
|













|





>


<
<
|
|
<
<
<
<
|
<




|
|
<
<

>



|

|

|

>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>


>
>



<
|


>
>
|
|
>
>
>
>
>
>
>
>
>
>
>
|

>

>










|






|
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
<
<
>
|
|
<
|
>
|
>
>
>
>
>
|
|
>
>
|
|
>
|
>
>
>
>
>
>
|
>
|
|
>
|
>
>
>
|
<
<
<
<
<
|

|
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
|
>
|
>
|

>
|
|
|
>
>
|
|
<
>
>
>
|
<
>
>
|
|
<
>
|
<
>
|
<

>





<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
3369
3370
3371
3372
3373
3374
3375
3376
3377











3378







3379







3380
3381

3382




3383








3384


3385








3386











3387
3388



3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431











3432
3433







3434
3435








3436

















































































































































































































3437
3438
3439



3440
3441
3442
3443
3444
3445
3446
3447
3448
3449





3450
3451
3452
3453
3454
3455
3456





3457
3458
3459
3460
3461
3462
3463
3464

3465
3466

3467
3468
3469
3470
3471


3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489




3490



3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503


3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531

3532
3533

3534
3535
3536
3537
3538
3539

3540

3541
3542




3543
3544
3545
3546

3547
3548

3549
3550
3551
3552
3553
3554
3555
3556












3557
3558


3559
3560
3561
3562
3563
3564
3565
3566


















































































3567




3568


















































3569





3570
3571
3572


3573
3574
3575
3576
3577
3578
3579
3580


3581
3582


3583
3584





3585






3586






3587


3588



3589



3590



3591



















3592
3593
3594



3595












3596





3597
3598
3599





3600







3601
3602
3603
3604
3605
3606





3607
3608

3609





3610




3611



3612

3613




3614










3615












3616








3617


3618
3619




3620







3621

3622
3623
3624



3625
3626
















3627










3628
























3629
3630
3631



3632

3633

3634






3635
3636


3637



3638


3639




3640
3641








3642



















3643




3644
3645










3646


3647

3648



3649
3650






3651


3652
3653
3654






3655









3656
3657



3658















3659



















3660

3661
3662


3663














3664
3665
3666
3667
3668
3669

















3670
3671
3672
3673
3674
3675
3676











3677
3678












3679
3680
3681


3682

3683
3684










3685
3686



3687

3688








3689
3690

3691

3692
3693

3694
3695
3696
3697
3698




3699
3700
3701
3702
3703
3704

3705

3706
3707




3708





3709

3710
3711





3712
3713
3714
3715









3716
3717
3718
3719
3720
3721
3722
3723
3724
3725


3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751

3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774


3775
3776




3777

3778
3779
3780
3781
3782
3783


3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817

3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882


3883
3884
3885

3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917





3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963

3964
3965
3966
3967

3968
3969
3970
3971

3972
3973

3974
3975

3976
3977
3978
3979
3980
3981
3982

























































3983














  if (!%pkgname%StubsPtr) {
    Tcl_SetResult(interp,"This implementation of %PkgName% does not support stubs",TCL_STATIC);
    return NULL;
  }
  return actualVersion;
}
}]
  close $cout
  }



















  # Backward compadible call







  method generate-make path {    
    ::practcl::build::Makefile $path [self]

  }




  








  method install-headers {} {


    set result {}








    return $result











  }




  method linktype {} {
    return library
  }
  
  # Create a "package ifneeded"
  # Args are a list of aliases for which this package will answer to
  method package-ifneeded {args} {
    set result {}
    set name [my define get pkg_name [my define get name]]
    set version [my define get pkg_vers [my define get version]]
    if {$version eq {}} {
      set version 0.1a
    }
    set output_tcl [my define get output_tcl]
    if {$output_tcl ne {}} {
      set script "\[list source \[file join \$dir $output_tcl\]\]"
    } elseif {[string is true -strict [my define get SHARED_BUILD]]} {
      set script "\[list load \[file join \$dir [my define get libfile]\] $name\]"
    } else {
      # Provide a null passthrough
      set script [list package provide $name $version]
    }
    set result "package ifneeded [list $name] [list $version] $script"
    foreach alias $args {
      set script "package require $name $version \; package provide $alias $version"
      append result \n\n [list package ifneeded $alias $version $script]
    }
    return $result
  }
  
    
  method shared_library {} {
    set name [string tolower [my define get name [my define get pkg_name]]]
    set NAME [string toupper $name]
    set version [my define get version [my define get pkg_vers]]
    set map {}
    lappend map %LIBRARY_NAME% $name    
    lappend map %LIBRARY_VERSION% $version
    lappend map %LIBRARY_VERSION_NODOTS% [string map {. {}} $version]
    lappend map %LIBRARY_PREFIX% [my define getnull libprefix]
    set outfile [string map $map [my define get PRACTCL_NAME_LIBRARY]][my define get SHLIB_SUFFIX]
    return $outfile
  }











}








::oo::class create ::practcl::tclkit {
  superclass ::practcl::library








  

















































































































































































































  method Collate_Source CWD {
    my define set SHARED_BUILD 0
    set name [my define get name]




    if {![my define exists TCL_LOCAL_APPINIT]} {
      my define set TCL_LOCAL_APPINIT Tclkit_AppInit
    }
    if {![my define exists TCL_LOCAL_MAIN_HOOK]} {
      my define set TCL_LOCAL_MAIN_HOOK Tclkit_MainHook
    }
    
    set PROJECT [self]
    set os [$PROJECT define get os]





    set TCLOBJ [$PROJECT project TCLCORE]
    set TKOBJ  [$PROJECT project TKCORE]
    set ODIEOBJ  [$PROJECT project odie]
  
    set TCLSRCDIR [$TCLOBJ define get srcroot]
    set TKSRCDIR [$TKOBJ define get srcroot]
    set PKG_OBJS {}





    foreach item [$PROJECT link list package] {
      if {[string is true [$item define get static]]} {
        lappend PKG_OBJS $item
      }
    }
    # Arrange to build an main.c that utilizes TCL_LOCAL_APPINIT and TCL_LOCAL_MAIN_HOOK
    if {$os eq "windows"} {
      set PLATFORM_SRC_DIR win

      my add class csource filename [file join $TCLSRCDIR win tclWinReg.c] initfunc Registry_Init pkg_name registry pkg_vers 1.3.1 autoload 1
      my add class csource filename [file join $TCLSRCDIR win tclWinDde.c] initfunc Dde_Init pkg_name dde pkg_vers 1.4.0 autoload 1

      my add class csource ofile [my define get name]_appinit.o filename [file join $TCLSRCDIR win tclAppInit.c] extra [list -DTCL_LOCAL_MAIN_HOOK=[my define get TCL_LOCAL_MAIN_HOOK Tclkit_MainHook] -DTCL_LOCAL_APPINIT=[my define get TCL_LOCAL_APPINIT Tclkit_AppInit]]
    } else {
      set PLATFORM_SRC_DIR unix
      my add class csource ofile [my define get name]_appinit.o filename [file join $TCLSRCDIR unix tclAppInit.c] extra [list -DTCL_LOCAL_MAIN_HOOK=[my define get TCL_LOCAL_MAIN_HOOK Tclkit_MainHook] -DTCL_LOCAL_APPINIT=[my define get TCL_LOCAL_APPINIT Tclkit_AppInit]]
    }


    ###
    # Add local static Zlib implementation
    ###
    set cdir [file join $TCLSRCDIR compat zlib]
    foreach file {
      adler32.c compress.c crc32.c
      deflate.c infback.c inffast.c
      inflate.c inftrees.c trees.c
      uncompr.c zutil.c
    } {
      my add [file join $cdir $file]
    }

    ###
    # Pre 8.7, Tcl doesn't include a Zipfs implementation
    # in the core. Grab the one from odielib
    ###
    set zipfs [file join $TCLSRCDIR generic zvfs.c]




    if {![file exists $zipfs]} {



      # The Odie project maintains a mirror of the version
      # released with the Tcl core
      my add_project odie {
        tag trunk
        class subproject
        vfsinstall 0
      }
      my project odie unpack
      set ODIESRCROOT [my project odie define get srcroot]
      set cdir [file join $ODIESRCROOT compat zipfs]
      my define add include_dir $cdir
      set zipfs [file join $cdir zvfs.c]
    }


    
    my add class csource filename $zipfs initfunc Tclzipfs_Init pkg_name zipfs pkg_vers 1.0 autoload 1

    my define add include_dir [file join $TKSRCDIR generic]
    my define add include_dir [file join $TKSRCDIR $PLATFORM_SRC_DIR]
    my define add include_dir [file join $TKSRCDIR bitmaps]
    my define add include_dir [file join $TKSRCDIR xlib]
    my define add include_dir [file join $TCLSRCDIR generic]
    my define add include_dir [file join $TCLSRCDIR $PLATFORM_SRC_DIR]
    my define add include_dir [file join $TCLSRCDIR compat zlib]
    # This file will implement TCL_LOCAL_APPINIT and TCL_LOCAL_MAIN_HOOK
    ::practcl::build::tclkit_main $PROJECT $PKG_OBJS
  }
  
  ## Wrap an executable
  #
  method wrap {PWD exename vfspath args} {
    cd $PWD
    if {![file exists $vfspath]} {
      file mkdir $vfspath
    }
    foreach item [my link list core.library] {
      set name  [$item define get name]
      set libsrcroot [$item define get srcroot]
      if {[file exists [file join $libsrcroot library]]} {
        ::practcl::copyDir [file join $libsrcroot library] [file join $vfspath boot $name]
      }
    }

    if {[my define get installdir] ne {}} {
      ::practcl::copyDir [file join [my define get installdir] [string trimleft [my define get prefix] /] lib] [file join $vfspath lib]

    }
    foreach arg $args {
       ::practcl::copyDir $arg $vfspath
    }

    set fout [open [file join $vfspath packages.tcl] w]

    puts $fout {

  set ::PKGIDXFILE [info script]
  set dir [file dirname $::PKGIDXFILE]




  }
    #set BASEVFS [my define get BASEVFS]
    set EXEEXT [my define get EXEEXT]


    set tclkit_bare [my define get tclkit_bare]
    

    set buffer [::practcl::pkgindex_path $vfspath]
    puts $fout $buffer
    puts $fout {
  # Advertise statically linked packages
  foreach {pkg script} [array get ::kitpkg] {
    eval $script
  }
    }












    close $fout
    package require zipfile::mkzip


    ::zipfile::mkzip::mkzip ${exename}${EXEEXT} -runtime $tclkit_bare -directory $vfspath
    if { [my define get platform] ne "windows" } {
      file attributes ${exename}${EXEEXT} -permissions a+x
    }
  }
}

###


















































































# Meta repository




# The default is an inert source code block


















































###





oo::class create ::practcl::subproject {
  superclass ::practcl::object
  


  method compile {} {}
    
  method go {} {
    set platform [my <project> define get platform]
    my define get USEMSVC [my <project> define get USEMSVC]
    set name [my define get name]
    if {![my define exists srcroot]} {
      my define set srcroot [file join [my <project> define get sandbox] $name]


    }
    set srcroot [my define get srcroot]


    my define set localsrcdir $srcroot
    my define add include_dir [file join $srcroot generic]





    my sources






  }






    


  # Install project into the local build system



  method install-local {} {



    my unpack



  }




















  # Install project into the virtual file system
  method install-vfs {} {}  



  












  method linktype {} {





    return {subordinate package}
  }
  





  method linker-products {configdict} {}








  method linker-external {configdict} {
    if {[dict exists $configdict PRACTCL_LIBS]} {
      return [dict get $configdict PRACTCL_LIBS]
    }
  }






  method sources {} {}

  





  method unpack {} {




    set name [my define get name]



    my define set [::practcl::fossil_sandbox $name [my define dump]]

  }




  










  method update {} {












    set name [my define get name]








    my define set [::practcl::fossil_sandbox $name [dict merge [my define dump] {update 1}]]


  }
}












###

# A project which the kit compiles and integrates
# the source for itself
###



oo::class create ::practcl::subproject.source {
  superclass ::practcl::subproject ::practcl::library



























  method linktype {} {
























    return {subordinate package source}
  }
  



}



# a copy from the teapot






oo::class create ::practcl::subproject.teapot {
  superclass ::practcl::subproject






  method install-local {} {


    my install-vfs




  }









  method install-vfs {} {



















    set pkg [my define get pkg_name [my define get name]]




    set download [my <project> define get download]
    my unpack










    set DEST [my <project> define get installdir]


    set prefix [string trimleft [my <project> define get prefix] /]

    # Get tcllib from our destination



    set dir [file join $DEST $prefix lib tcllib]
    source [file join $DEST $prefix lib tcllib pkgIndex.tcl]






    package require zipfile::decode


    ::zipfile::decode::unzipfile [file join $download $pkg.zip] [file join $DEST $prefix lib $pkg]
  }
}
















oo::class create ::practcl::subproject.sak {
  superclass ::practcl::subproject



















  method install-local {} {



















    my install-vfs

  }



  method install-vfs {} {














    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    my unpack
    set DEST [my <project> define get installdir]

















    set prefix [string trimleft [my <project> define get prefix] /]
    set srcroot [my define get srcroot]
    ::dotclexec [file join $srcroot installer.tcl] \
      -pkg-path [file join $DEST $prefix lib $pkg]  \
      -no-examples -no-html -no-nroff \
      -no-wait -no-gui -no-apps
  }











}













###
# A binary package
###


oo::class create ::practcl::subproject.binary {

  superclass ::practcl::subproject ::practcl::autoconf












  method compile-products {} {}





  method ConfigureOpts {} {








    set opts {}
    set builddir [my define get builddir]

    if {[my define get broken_destroot 0]} {

      set PREFIX [my <project> define get prefix_broken_destdir]
    } else {

      set PREFIX [my <project> define get prefix]
    }
    if {[my <project> define get HOST] != [my <project> define get TARGET]} {
      lappend opts --host=[my <project> define get TARGET]
    }




    if {[my <project> define exists tclsrcdir]} {
      set TCLSRCDIR  [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tclsrcdir]]]]
      set TCLGENERIC [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tclsrcdir] .. generic]]]
      lappend opts --with-tcl=$TCLSRCDIR --with-tclinclude=$TCLGENERIC 
    }
    if {[my <project> define exists tksrcdir]} {

      set TKSRCDIR  [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tksrcdir]]]]

      set TKGENERIC [::practcl::file_relative [file normalize $builddir] [file normalize [file join $::CWD [my <project> define get tksrcdir] .. generic]]]
      lappend opts --with-tk=$TKSRCDIR --with-tkinclude=$TKGENERIC




    }





    lappend opts {*}[my define get config_opts]

    lappend opts --prefix=$PREFIX
    #--exec_prefix=$PREFIX





    #if {$::tcl_platform(platform) eq "windows"} {
    #  lappend opts --disable-64bit
    #}
    if {[my define get static 1]} {









      lappend opts --disable-shared --disable-stubs
      #
    } else {
      lappend opts --enable-shared
    }
    return $opts
  }
  
  method go {} {
    next


    my define set builddir [my BuildDir [my define get masterpath]]
  }
  
  method linker-products {configdict} {
    if {![my define get static 0]} {
      return {}
    }
    set srcdir [my define get builddir]
    if {[dict exists $configdict libfile]} {
      return " [file join $srcdir [dict get $configdict libfile]]"
    }
  }
  
  method static-packages {} {
    if {![my define get static 0]} {
      return {}
    }
    set result [my define get static_packages]
    set statpkg  [my define get static_pkg]
    set initfunc [my define get initfunc]
    if {$initfunc ne {}} {
      set pkg_name [my define get pkg_name]
      if {$pkg_name ne {}} {
        dict set result $pkg_name initfunc $initfunc
        set version [my define get version]
        if {$version eq {}} {

          set info [my config.sh]
          set version [dict get $info version]
          set pl {}
          if {[dict exists $info patch_level]} {
            set pl [dict get $info patch_level]
            append version $pl
          }
          my define set version $version
        }
        dict set result $pkg_name version $version
        dict set result $pkg_name autoload [my define get autoload 0]
      }
    }
    foreach item [my link list subordinate] {
      foreach {pkg info} [$item static-packages] {
        dict set result $pkg $info
      }
    }
    return $result
  }

  method BuildDir {PWD} {
    set name [my define get name]


    return [my define get builddir [file join $PWD pkg.$name]]
  }




  

  method compile {} {
    set name [my define get name]
    set PWD $::CWD
    cd $PWD
    my go
    set srcroot [file normalize [my define get srcroot]]


    my Collate_Source $PWD

    ###
    # Build a starter VFS for both Tcl and wish
    ###
    set srcroot [my define get srcroot]
    if {[my define get static 1]} {
      puts "BUILDING Static $name $srcroot"
    } else {
      puts "BUILDING Dynamic $name $srcroot"
    }
    if {[my define get USEMSVC 0]} {
      cd $srcroot
      doexec nmake -f makefile.vc INSTALLDIR=[my <project> define get installdir] release
    } else {
      cd $::CWD
      set builddir [file normalize [my define get builddir]]
      file mkdir $builddir
      if {![file exists [file join $builddir Makefile]]} {
        my Configure
      }
      if {[file exists [file join $builddir make.tcl]]} {
        domake.tcl $builddir library
      } else {
        domake $builddir all
      }
    }
    cd $PWD
  }

  
  method Configure {} {
    cd $::CWD
    my unpack

    my TeaConfig
    set builddir [file normalize [my define get builddir]]
    file mkdir $builddir
    set srcroot [file normalize [my define get srcroot]]
    if {[my define get USEMSVC 0]} {
      return
    }
    set opts [my ConfigureOpts]
    puts [list [self] CONFIGURE]
    puts [list PWD [pwd]]
    puts [list LOCALSRC $srcroot]
    puts [list BUILDDIR $builddir]
    puts [list CONFIGURE {*}$opts]
    cd $builddir
    exec sh [file join $srcroot configure] {*}$opts >& [file join $builddir practcl.log]
    cd $::CWD
  }
  
  method install-vfs {} {
    set PWD [pwd]
    set PKGROOT [my <project> define get installdir]
    set PREFIX  [my <project> define get prefix]

    ###
    # Handle teapot installs
    ###
    set pkg [my define get pkg_name [my define get name]]
    if {[my <project> define get teapot] ne {}} {
      set TEAPOT [my <project> define get teapot]
      set found 0
      foreach ver [my define get pkg_vers [my define get version]] {
        set teapath [file join $TEAPOT $pkg$ver]
        if {[file exists $teapath]} {
          set dest  [file join $PKGROOT [string trimleft $PREFIX /] lib [file tail $teapath]]
          ::practcl::copyDir $teapath $dest
          return
        }
      }
    }
    my compile
    if {[my define get USEMSVC 0]} {
      set srcroot [my define get srcroot]
      cd $srcroot
      doexec nmake -f makefile.vc INSTALLDIR=$PKGROOT install
    } else {
      set builddir [my define get builddir]
      if {[file exists [file join $builddir make.tcl]]} {
        # Practcl builds can inject right to where we need them
        domake.tcl $builddir install-package $PKGROOT
      } elseif {[my define get broken_destroot 0] == 0} {
        # Most modern TEA projects understand DESTROOT in the makefile
        domake $builddir install DESTDIR=$PKGROOT
      } else {
        # But some require us to do an install into a fictitious filesystem
        # and then extract the gooey parts within.
        # (*cough*) TkImg
        set PREFIX [my <project> define get prefix]
        set BROKENROOT [::practcl::msys_to_tclpath [my <project> define get prefix_broken_destdir]]
        file delete -force $BROKENROOT
        file mkdir $BROKENROOT
        domake $builddir $install
        ::practcl::copyDir $BROKENROOT  [file join $PKGROOT [string trimleft $PREFIX /]]
        file delete -force $BROKENROOT
      }
    }


    cd $PWD
  }
  

  method TeaConfig {} {
    set srcroot [file normalize [my define get srcroot]]
    set copytea 0
    if {![file exists [file join $srcroot tclconfig]]} {
      set copytea 1
    } else {
      if {![file exists [file join $srcroot tclconfig practcl.tcl]] || ![file exists [file join $srcroot tclconfig config.tcl.in]]} {
        set copytea 1
      }
    }
    # ensure we have tclconfig with all of the trimming
    if {$copytea} {
      set tclconfiginfo [::practcl::fossil_sandbox tclconfig [list sandbox [my <project> define get sandbox]]]
      ::practcl::copyDir [dict get $tclconfiginfo srcroot] [file join $srcroot tclconfig]
      if {$::tcl_platform(platform) ne "windows"} {
        set pwd [pwd]
        cd $srcroot
        # On windows there's no practical way to execute
        # autoconf. We'll have to trust that configure
        # us up to date
        foreach template {configure.ac configure.in} {
          set input [file join $srcroot $template]
          if {[file exists $input]} {
            exec autoconf -f $input > [file join $srcroot configure]
          }
        }
        cd $pwd
      }
    }
  }
}






oo::class create ::practcl::subproject.core {
  superclass ::practcl::subproject.binary

  # On the windows platform MinGW must build
  # from the platform directory in the source repo
  method BuildDir {PWD} {
    return [my define get localsrcdir]
  }
  
  method Configure {} {
    if {[my define get USEMSVC 0]} {
      return
    }
    set opts [my ConfigureOpts]
    puts [list PWD [pwd]]
    puts [list [self] CONFIGURE]
    set builddir [file normalize [my define get builddir]]
    set localsrcdir [file normalize [my define get localsrcdir]]
    puts [list LOCALSRC $localsrcdir]
    puts [list BUILDDIR $builddir]
    puts [list CONFIGURE {*}$opts]
    cd $localsrcdir
    exec sh [file join $localsrcdir configure] {*}$opts >& [file join $builddir practcl.log]
  }

  method ConfigureOpts {} {
    set opts {}
    set builddir [file normalize [my define get builddir]]
    set PREFIX [my <project> define get prefix]
    if {[my <project> define get HOST] != [my <project> define get TARGET]} {
      lappend opts --host=[my <project> define get TARGET]
    }
    lappend opts {*}[my define get config_opts]
    lappend opts --prefix=$PREFIX
    #--exec_prefix=$PREFIX
    lappend opts --disable-shared
    return $opts
  }
  
  method go {} {
    set name [my define get name]
    set platform [my <project> define get platform]
    if {![my define exists srcroot]} {
      my define set srcroot [file join [my <project> define get sandbox] $name]
    }
    set srcroot [my define get srcroot]

    my define add include_dir [file join $srcroot generic]
    switch $platform {
      windows {
        my define set localsrcdir [file join $srcroot win]

        my define add include_dir [file join $srcroot win]
      }
      default {
        my define set localsrcdir [file join $srcroot unix]

        my define add include_dir [file join $srcroot $name unix]
      }

    }
    my define set builddir [my BuildDir [my define get masterpath]]

  }
  
  method linktype {} {
    return {subordinate core.library}
  }
}


























































package provide practcl 0.5














Deleted modules/practcl/practcl.test.

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
# practcl.test - Copyright (c) 2018 Sean Woods
# -------------------------------------------------------------------------

#source [file join  #	[file dirname [file dirname [file dirname [file join [pwd] [info script]]]]]  #	compat devtools testutilities.tcl]
set TestPwd [file dirname [file join [pwd] [info script]]]
source [file join  [file dirname [file dirname [file join [pwd] [info script]]]]  devtools testutilities.tcl]


testsNeedTcl     8.6
testsNeedTcltest 2
testsNeed        TclOO 1

support {
   use clay/clay.tcl           clay
}
testing {
    useLocal practcl.tcl practcl
}

proc makeFile path {
  file mkdir [file dirname $path]
  set fout [open $path w]
  puts $fout [list FILE $path]
  close $fout
}
file mkdir test

cd $TestPwd
makeFile test/one.tcl
makeFile test/sub/two.tcl
makeFile test/sub/sub/three.tcl

test dict-compare-001 {Test our testing method} {
  ::practcl::findByPattern test *.tcl
} {test/one.tcl test/sub/two.tcl test/sub/sub/three.tcl}

file delete -force test

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































Changes to modules/processman/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

package ifneeded odie::processman 0.5 [list source [file join $dir processman.tcl]]
package ifneeded processman 0.5 [list source [file join $dir processman.tcl]]










|
|
1
2
3
4
5
6
7
8
9
10
11
12
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

package ifneeded odie::processman 0.4 [list source [file join $dir processman.tcl]]
package ifneeded processman 0.4 [list source [file join $dir processman.tcl]]

Changes to modules/processman/processman.man.

66
67
68
69
70
71
72
73
74

Start a child process, identified by [arg id]. [arg cmd] is the name
of the command to execute. [arg args] are arguments to pass to that command.

[list_end]
[para]
[vset CATEGORY odie]
[include ../common-text/feedback.inc]
[manpage_end]







|

66
67
68
69
70
71
72
73
74

Start a child process, identified by [arg id]. [arg cmd] is the name
of the command to execute. [arg args] are arguments to pass to that command.

[list_end]
[para]
[vset CATEGORY odie]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/processman/processman.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165


166
167
168
169
170
171
172
173
174
###
# IRM External Process Manager
###

package require cron 2.0

::namespace eval ::processman {}

###

# Attempt to locate some C - API helpers

###
set ::processman::api tcl
foreach {command package api} {
  {::twapi::process_exists} twapi    twapi
  umask                     tclx     tclx
  subprocess_exists         tclextra tclextra
  {}                        odielibc tclextra
} {
  if {[info commands $command] ne {}} {
    set ::processman::api $api
    break
  }
  if {![catch {package require $package}]} {
    set ::processman::api $api
    break
  }
}

switch $api {
tclx {
proc ::processman::kill_subprocess pid {
  catch {::kill $pid}
}
}
tclextra {
proc ::processman::kill_subprocess pid {
  catch {::kill_subprocess $pid}
}

}
twapi {
  
proc ::processman::priority {id level} {
  foreach pid [PIDLIST $id] {
    switch $level {
      background {
        if  {[catch {twapi::set_priority_class $pid 0x00104000} err]} {
          puts "BG Mode failed - $err"
          twapi::set_priority_class $pid 0x00004000
        }
      }
      low {
        twapi::set_priority_class $pid 0x00004000
      }
      high {
        twapi::set_priority_class $pid 0x00000020
      }
      default {
        twapi::set_priority_class $pid 0x00008000
      }
    }
  }
}
proc ::processman::killexe name {
  set pids [twapi::get_process_ids -name $name.exe]
  foreach pid $pids {
    # Catch the error in case process does not exist any more
    if {[catch {twapi::end_process $pid} err]} {
      puts $err
    }
  }
  #catch {exec taskkill /F /IM $name.exe} err
  #puts $err
}
proc ::processman::kill_subprocess pid {
  if {[catch {::twapi::end_process $pid} err]} {
    puts $err
  }
}
proc ::processman::subprocess_exists pid {
  return [::twapi::process_exists $pid]
}
proc ::processman::keep_machine_awake {truefalse} {
  if {[string is true -strict $truefalse]} {
    twapi::SetThreadExecutionState 0x80000040
  } else {
    twapi::SetThreadExecutionState 0x00000000
  }
}
}
default {}
}

###
# Create fallback implementations for functions we don't have a
# C API call for
###

proc ::processman::fallback {name arglist body} {
  if {[info commands ::${name}] eq {} && [info commands ::processman::${name}] eq {} } {
    ::proc ::processman::${name} $arglist $body
  }

}

# title: Keep the machine from going to sleep
::processman::fallback keep_machine_awake {truefalse} {
}

::processman::fallback killexe name {
  if {[catch {exec killall -9 $name} err]} {
    puts $err
  }
  harvest_zombies
}

###
# title: Detect a running process
# usage: subprocess_exists PID
# description:
#  Returns true if PID is running. If PID is an integer
#  it is interpreted as Process Id from the operating system.
#  Otherwise it is assumed to be a handle previously registered
#  with the processman package
###
::processman::fallback subprocess_exists pid {
  set dat [exec ps]
  foreach line [split $dat \n] {
    if {![scan $line "%d %s" thispid rest]} continue
    if { $thispid eq $pid} {
      return $thispid
    }
  }
  return 0
}

# title: Changes priority of task
::processman::fallback priority {id level} {
  if {$::tcl_platform(platform) eq "windows"} {
    return
  }
  foreach pid [PIDLIST $id] {
    switch $level {
      background {
        exec renice -n 20 -p $pid
      }
      low {
        exec renice -n 10 -p $pid
      }
      high {
        exec renice -n -5 -p $pid
      }
      default {
        exec renice -n 0 -p $pid
      }
    }
  }
}

::processman::fallback kill_subprocess pid {
  catch {exec kill $pid}
}

::processman::fallback harvest_zombies args {
}





###
# topic: a0cdb7503872cd302756c732956cd5c3
# title: Periodic scan of the state of processes
###
proc ::processman::events {} {
  variable process_binding








<
>
|
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
|
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
|
<
|
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|
<

>
>
|
|







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
###
# IRM External Process Manager
###

package require cron 2.0

::namespace eval ::processman {}


if { $::tcl_platform(platform) eq "windows" } {
  package require twapi
} else {
  ###
















  # Try to utilize C level utilities that are bundled










  # with either TclX or Odielib


  ###

























  if [catch {package require odielibc}] {



    catch {package require Tclx}

  }
  if {[info commands subprocess_exists] eq {}} {




    proc ::processman::subprocess_exists pid {














































      set dat [exec ps]
      foreach line [split $dat \n] {
        if {![scan $line "%d %s" thispid rest]} continue
        if { $thispid eq $pid} {
          return $thispid
        }
      }
      return 0
    }
  }






















  if {[info commands kill_subprocess] eq {}} {
    proc ::processman::kill_subprocess pid {
      catch {exec kill $pid}
    }
  }

}
if {[info commands harvest_zombies] eq {}} {
  proc ::processman::harvest_zombies args {
  }
}

###
# topic: a0cdb7503872cd302756c732956cd5c3
# title: Periodic scan of the state of processes
###
proc ::processman::events {} {
  variable process_binding
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220




221

222


223
224

225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244




















245
246
247
248
249
250
251
252
253
254
255
256
257



















































258
259
260
261
262
263
264
  if {![file executable $f]} {
     error "Cannot find the $name executable"
     return {}
  }
  return $f
}

proc ::processman::PIDLIST id {
  variable process_list
  if {[string is integer -strict $id]} {
    return $id
  }
  if {[dict exists $process_list $id]} {
    return [dict get $process_list $id]
  }
  return {}
}

###
# topic: ac021b1116f0c1d5e3319d9f333f0c89
# title: Kill a process
###
proc ::processman::kill id {
  variable process_list
  variable process_binding
  global tcl_platform




  foreach pid [PIDLIST $id] {

    kill_subprocess $pid


  }
  if {![string is integer $id]} {

    dict set process_list $id {}
    dict unset process_binding $id
  }
  harvest_zombies
}

###
# topic: 8987329d60cd1adc766e09a0227f87b6
# title: Kill all processes spawned by this program
###
proc ::processman::kill_all {} {
  variable process_list
  if {![info exists process_list]} {
    return {}
  }
  foreach {name pidlist} $process_list {
    kill $name
  }
  harvest_zombies
}





















###
# topic: 02406b2a7edd05c887554384ad2db41f
# title: Issue a command when process {$id} exits
###
proc ::processman::onexit {id cmd} {
  variable process_binding
  if {![running $id]} {
    catch {eval $cmd}
    return
  }
  dict set process_binding $id $cmd
}




















































###
# topic: 8bccf62b4fa11949dba4c85e05d116e9
# title: Return a list of processes and their current state
###
proc ::processman::process_list {} {
  variable process_list







<
<
<
<
<
<
<
<
<
<
<








>
>
>
>
|
>
|
>
>
|
<
>
|
|
<

















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>













>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







68
69
70
71
72
73
74











75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

93
94
95

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
  if {![file executable $f]} {
     error "Cannot find the $name executable"
     return {}
  }
  return $f
}












###
# topic: ac021b1116f0c1d5e3319d9f333f0c89
# title: Kill a process
###
proc ::processman::kill id {
  variable process_list
  variable process_binding
  global tcl_platform

  if {![dict exists $process_list $id]} {
    return
  }
  foreach pid [dict get $process_list $id] {
    if { $tcl_platform(platform) eq "unix" } {
      catch {kill_subprocess $pid}
    } elseif { $tcl_platform(platform) eq "windows" } {
      catch {::twapi::end_process $pid}
    }

  }
  dict set process_list $id {}
  dict unset process_binding $id

  harvest_zombies
}

###
# topic: 8987329d60cd1adc766e09a0227f87b6
# title: Kill all processes spawned by this program
###
proc ::processman::kill_all {} {
  variable process_list
  if {![info exists process_list]} {
    return {}
  }
  foreach {name pidlist} $process_list {
    kill $name
  }
  harvest_zombies
}

###
# topic: 17a9014236425560140ba62bbb2745a8
# title: Kill a process
###
proc ::processman::killexe name {
  if {$::tcl_platform(platform) eq "windows" } {
    set pids [twapi::get_process_ids -name $name.exe]
    foreach pid $pids {
        # Catch the error in case process does not exist any more
        catch {twapi::end_process $pid}
    }
    #catch {exec taskkill /F /IM $name.exe} err
    puts $err
  } else {
    catch {exec killall -9 $name} err
    ##puts $err
  }
  harvest_zombies
}

###
# topic: 02406b2a7edd05c887554384ad2db41f
# title: Issue a command when process {$id} exits
###
proc ::processman::onexit {id cmd} {
  variable process_binding
  if {![running $id]} {
    catch {eval $cmd}
    return
  }
  dict set process_binding $id $cmd
}

###
# topic: ee784ae29e5b66867a30428b3095dc65
# title: Changes priority of task
###
proc ::processman::priority {id level} {
  variable process_list

  set pid [running $id]
  if {![string is integer $pid]} {
    set pid 0
  }
  if {!$pid} {
    return
  }
  if { $::tcl_platform(platform) eq "windows" } {
    package require twapi
    switch $level {
      background {
        if  {[catch {twapi::set_priority_class $pid 0x00104000} err]} {
          puts "BG Mode failed - $err"
          twapi::set_priority_class $pid 0x00004000
        }
      }
      low {
        twapi::set_priority_class $pid 0x00004000
      }
      high {
        twapi::set_priority_class $pid 0x00000020
      }
      default {
        twapi::set_priority_class $pid 0x00008000
      }
    }
  } else {
    switch $level {
      background {
        exec renice -n 20 -p $pid
      }
      low {
        exec renice -n 10 -p $pid
      }
      high {
        exec renice -n -5 -p $pid
      }
      default {
        exec renice -n 0 -p $pid
      }
    }
  }
}

###
# topic: 8bccf62b4fa11949dba4c85e05d116e9
# title: Return a list of processes and their current state
###
proc ::processman::process_list {} {
  variable process_list
290
291
292
293
294
295
296





297
298

299
300
301
302
303
304
305
      return 0
    }
    set pidlist [dict get $process_list $id]
  } else {
    set pidlist $id
  }
  foreach pid $pidlist {





    if {[subprocess_exists $pid]} {
      return $pid

    }
  }
  return 0
}

###
# topic: 61694ad97dbac52351431ad0d8c448e3







>
>
>
>
>
|
|
>







229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
      return 0
    }
    set pidlist [dict get $process_list $id]
  } else {
    set pidlist $id
  }
  foreach pid $pidlist {
    if { $::tcl_platform(platform) eq "windows" } {
      if {[::twapi::process_exists $pid]} {
        return $pid
      }
    } else {
      if {[subprocess_exists $pid]} {
        return $pid
      }
    }
  }
  return 0
}

###
# topic: 61694ad97dbac52351431ad0d8c448e3
336
337
338
339
340
341
342
343
344
if {![info exists process_binding]} {
  set process_binding {}
}
}

::cron::every processman 60 ::processman::events

package provide odie::processman 0.5
package provide processman 0.5







|
|
281
282
283
284
285
286
287
288
289
if {![info exists process_binding]} {
  set process_binding {}
}
}

::cron::every processman 60 ::processman::events

package provide odie::processman 0.4
package provide processman 0.4

Changes to modules/profiler/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.3]} {return}
package ifneeded profiler 0.5 [list source [file join $dir profiler.tcl]]

|
1
2
if {![package vsatisfies [package provide Tcl] 8.3]} {return}
package ifneeded profiler 0.3 [list source [file join $dir profiler.tcl]]

Changes to modules/profiler/profiler.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[vset VERSION 0.5]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin profiler n [vset VERSION]]
[keywords performance]
[keywords profile]
[keywords speed]
[moddesc   {Tcl Profiler}]
[titledesc {Tcl source code profiler}]
[category  {Programming tools}]
[require Tcl 8.3]
[require profiler [opt [vset VERSION]]]
[description]
[para]

The [package profiler] package provides a simple Tcl source code
profiler.  It is a function-level profiler; that is, it collects only
function-level information, not the more detailed line-level
information.  It operates by redefining the Tcl [cmd proc] command.
<

|







|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin profiler n 0.3]
[keywords performance]
[keywords profile]
[keywords speed]
[moddesc   {Tcl Profiler}]
[titledesc {Tcl source code profiler}]
[category  {Programming tools}]
[require Tcl 8.3]
[require profiler [opt 0.3]]
[description]
[para]

The [package profiler] package provides a simple Tcl source code
profiler.  It is a function-level profiler; that is, it collects only
function-level information, not the more detailed line-level
information.  It operates by redefining the Tcl [cmd proc] command.
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[call [cmd ::profiler::resume] [opt [arg pattern]]]

Resume profiling for all functions matching [arg pattern].  If no
pattern is specified, profiling will be resumed for all functions.
This command should be invoked after suspending the profiler in the
code.

[call [cmd ::profiler::new-disabled]]

Change the initial profiling state for new procedures. Invoking this
command disables profiling for all procedures created after this
command until [cmd new-enabled] is invoked. Activate profiling of
specific procedures via [cmd resume].

[call [cmd ::profiler::new-enabled]]

Change the initial profiling state for new procedures. Invoking this
command enables profiling for all procedures created after this
command until [cmd new-disabled] is invoked. Prevent profiling of
specific procedures via [cmd suspend].

[call [cmd ::profiler::sortFunctions] [arg key]]

Return a list of functions sorted by a particular profiling statistic.
Supported values for [arg key] are: [const calls],

[const exclusiveTime], [const compileTime], [const nonCompileTime],
[const totalRuntime], [const avgExclusiveTime], and

[const avgRuntime].  The return result is a list of lists, where each
sublist consists of a function name and the value of [arg key] for
that function.

[list_end]

[vset CATEGORY profiler]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<
<
<
<
<
<
<
<
<
<
<















|

98
99
100
101
102
103
104














105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[call [cmd ::profiler::resume] [opt [arg pattern]]]

Resume profiling for all functions matching [arg pattern].  If no
pattern is specified, profiling will be resumed for all functions.
This command should be invoked after suspending the profiler in the
code.















[call [cmd ::profiler::sortFunctions] [arg key]]

Return a list of functions sorted by a particular profiling statistic.
Supported values for [arg key] are: [const calls],

[const exclusiveTime], [const compileTime], [const nonCompileTime],
[const totalRuntime], [const avgExclusiveTime], and

[const avgRuntime].  The return result is a list of lists, where each
sublist consists of a function name and the value of [arg key] for
that function.

[list_end]

[vset CATEGORY profiler]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/profiler/profiler.tcl.

1
2
3
4
5
6
7
8
9


10
11
12
13

14
15
16
17
18
19
20
# profiler.tcl --
#
#	Tcl code profiler.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require Tcl 8.3		;# uses [clock clicks -milliseconds]
package provide profiler 0.5

namespace eval ::profiler {}


# ::profiler::tZero --
#
#	Start a named timer instance
#
# Arguments:
#	tag	name for the timer instance; if none is given, defaults to ""








|
>
>

|

|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# profiler.tcl --
#
#	Tcl code profiler.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: profiler.tcl,v 1.29 2006/09/19 23:36:17 andreas_kupries Exp $

package require Tcl 8.3		;# uses [clock clicks -milliseconds]
package provide profiler 0.3

namespace eval ::profiler {
}

# ::profiler::tZero --
#
#	Start a named timer instance
#
# Arguments:
#	tag	name for the timer instance; if none is given, defaults to ""
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
#
# Results:
#	None

proc ::profiler::leaveHandler {name caller} {
    variable enabled

    # Tkt [0dd4b31bb8] Note that the result is pulled from the
    # caller's context as it is not passed into leaveHandler
    
    if { !$enabled($name) } {
	return [uplevel 1 {lindex $args 1}] ;# RETURN RESULT!
    }

    set t [::profiler::tMark $name.$caller]
    lappend ::profiler::statTime($name) $t

    if { [incr ::profiler::callCount($name)] == 1 } {
        set ::profiler::compileTime($name) $t
    }
    incr ::profiler::totalRuntime($name) $t
    if { [catch {incr ::profiler::descendantTime($caller) $t}] } {
        set ::profiler::descendantTime($caller) $t
    }
    if { [catch {incr ::profiler::descendants($caller,$name)}] } {
        set ::profiler::descendants($caller,$name) 1
    }

    return [uplevel 1 {lindex $args 1}] ;# RETURN RESULT!
}

# ::profiler::profProc --
#
#	Replacement for the proc command that adds rudimentary profiling
#	capabilities to Tcl.
#







<
<
<

|















<
<







226
227
228
229
230
231
232



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249


250
251
252
253
254
255
256
#
# Results:
#	None

proc ::profiler::leaveHandler {name caller} {
    variable enabled




    if { !$enabled($name) } {
        return
    }

    set t [::profiler::tMark $name.$caller]
    lappend ::profiler::statTime($name) $t

    if { [incr ::profiler::callCount($name)] == 1 } {
        set ::profiler::compileTime($name) $t
    }
    incr ::profiler::totalRuntime($name) $t
    if { [catch {incr ::profiler::descendantTime($caller) $t}] } {
        set ::profiler::descendantTime($caller) $t
    }
    if { [catch {incr ::profiler::descendants($caller,$name)}] } {
        set ::profiler::descendants($caller,$name) 1
    }


}

# ::profiler::profProc --
#
#	Replacement for the proc command that adds rudimentary profiling
#	capabilities to Tcl.
#
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
#	pattern	pattern of the proc's to get info for; default is *.
#
# Results:
#	A human readable printout of info.

proc ::profiler::print {{pattern *}} {
    variable callCount
    #parray callCount
    
    set result ""
    foreach name [lsort [array names callCount $pattern]] {
	append result [printname $name]
    }
    return $result
}








<
|







394
395
396
397
398
399
400

401
402
403
404
405
406
407
408
#	pattern	pattern of the proc's to get info for; default is *.
#
# Results:
#	A human readable printout of info.

proc ::profiler::print {{pattern *}} {
    variable callCount


    set result ""
    foreach name [lsort [array names callCount $pattern]] {
	append result [printname $name]
    }
    return $result
}

601
602
603
604
605
606
607

608

609
610
611
612
613
614
615
# Results:
#	None.  Resets the `enabled($name)' variable to 0
#	       to suspend profiling

proc ::profiler::suspend {{pattern *}} {
    variable callCount
    variable enabled



    foreach name [array names callCount $pattern] {
        set enabled($name) 0
    }

    return
}








>

>







598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
# Results:
#	None.  Resets the `enabled($name)' variable to 0
#	       to suspend profiling

proc ::profiler::suspend {{pattern *}} {
    variable callCount
    variable enabled
    variable paused

    set paused 1
    foreach name [array names callCount $pattern] {
        set enabled($name) 0
    }

    return
}

623
624
625
626
627
628
629

630

631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
# Results:
#	None.  Sets the `enabled($name)' variable to 1
#	       so as to enable the profiler.

proc ::profiler::resume {{pattern *}} {
    variable callCount
    variable enabled



    foreach name [array names callCount $pattern] {
        set enabled($name) 1
    }

    return
}

# ::profiler::new-disabled --
#
#	Start new procedures with profiling disabled
#
# Arguments:
#	None.
#
# Results:
#	None.

proc ::profiler::new-disabled {} {
    variable paused 1
    return
}

# ::profiler::new-enabled --
#
#	Start new procedures with profiling enabled
#
# Arguments:
#	None.
#
# Results:
#	None.

proc ::profiler::new-enabled {} {
    variable paused 0
    return
}







>

>







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638





























# Results:
#	None.  Sets the `enabled($name)' variable to 1
#	       so as to enable the profiler.

proc ::profiler::resume {{pattern *}} {
    variable callCount
    variable enabled
    variable paused

    set paused 0
    foreach name [array names callCount $pattern] {
        set enabled($name) 1
    }

    return
}






























Changes to modules/profiler/profiler.test.

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
89

90


91
92
93
94





95
96
97
98
99
100
101
102
103


104
105
106
107
108
109
110
111
112
113
114
115
116


117




118
119
120
121
122
123
124
125
126
127

128
129
130
131
132
133
134
135
136
137

138




139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154


155
156
157


158



159
160
161
162
163
164
165
166
167

168
169
170





171
172


173



174
175
176
177
178
179
180
181
182
183
184
185
186
187

188
189
190
191




192
193


194
195
196
197
198

199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226


227
228
229
230
231
232
233

234




235
236
237


238
239
240
241

242




243
244
245
246
247
248
249
250
251


252
253
254

255




256
257
258
259
260
261
262
263
264


265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290


291
292
293

294




295
296
297
298
299
300
301
302
303


304
305
306

307




308
309
310
311
312
313
314
315
316


317
318
319
320





321
322
323
324
325
326
327
328
329
330


331
332
333
334
335
336
337
338





339
340
341
342
343
344
345
346
347
348




349
350
351
352
353
354
355
356
357
358
359
360
361





362
363
364
365
366
367
368
369
370




371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# Profiler tests.                                              -*- tcl -*-
#
# Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.3
testsNeedTcltest 1.0

testing {
    useLocal profiler.tcl profiler
}

proc do {script} {
    set c [interp create]
    interp alias $c parentSet {} set
    $c eval [list source [localPath profiler.tcl]]
    $c eval profiler::init
    set result [$c eval $script]
    interp delete $c
    set result
}

# -------------------------------------------------------------------------

test profiler-1.0 {profiler::init redirects the proc command} {

    do {




	list [interp alias {} proc] [info commands ::_oldProc]
    }


} [list ::profiler::profProc ::_oldProc]

test profiler-2.0 {profiler creates two wrapper proc and real proc} tcl8.3only {

    do {




	proc foo {} {
	    puts "foo!"
	}
	list [info commands foo] [info commands fooORIG]
    }


} [list foo fooORIG]

test profiler-2.1 {profiler creates procs in correct scope} tcl8.3only {

    do {




	namespace eval foo {}
	proc ::foo::foo {} {
	    puts "foo!"
	}
	list [info commands ::foo::foo] [info commands ::foo::fooORIG]
    }


} [list ::foo::foo ::foo::fooORIG]

test profiler-2.2 {profiler creates procs in correct scope} {tcl8.3only} {

    do {




	namespace eval foo {
	    proc foo {} {
		puts "foo!"
	    }
	}
	list [info commands ::foo::foo] [info commands ::foo::fooORIG]
    }


} [list ::foo::foo ::foo::fooORIG]

test profiler-2.3 {profiler creates procs in correct scope} {tcl8.3only} {

    do {




	namespace eval foo {
	    namespace eval bar {}
	    proc bar::foo {} {
		puts "foo!"
	    }
	}
	list [info commands ::foo::bar::foo] [info commands ::foo::bar::fooORIG]

    }


} [list ::foo::bar::foo ::foo::bar::fooORIG]

test profiler-2.4 {profiler creates procs in correct scope} {tcl8.3only} {

    do {




	namespace eval foo {
	    proc ::foo {} {
		puts "foo!"
	    }
	}
	list [info commands ::foo] [info commands ::fooORIG]

    }


} [list ::foo ::fooORIG]

test profiler-3.1 {profiler wrappers do profiling} {
    array set bar [do {





	proc ::foo {} {
	    set foobar 0
	}
	foo
	foo
	foo
	foo
	profiler::dump ::foo
    }]


    array set foo $bar(::foo)
    set result [list callCount $foo(callCount) callerDist $foo(callerDist)]
    unset foo bar
    set result
} [list callCount 4 callerDist [list GLOBAL 4]]

test profiler::leaveHandler::initialize_descendent_time {} {
    # Verify that the profiler tracks descendent time correctly.  We'll make
    # a simple call tree, foo -> bar, then invoke foo, then check the profiler
    # stats to see that _some_ descendent time has been logged for the call 
    # to bar.  We won't be able to predict exactly how much time will get 
    # billed there, but it should be non-zero.



    array set stats [lindex [do {




	proc ::foo {} {
	    ::bar
	}
        proc ::bar {} {
            after 300
        }
	foo

	profiler::dump ::foo
    }] 1]

    list descendantTime [expr {$stats(descendantTime) > 0}]
} {descendantTime 1}

test profiler::leaveHandler::increment_descendent_time {} {
    # Verify that the profiler increments descendent time each time a
    # a descendent is invoked.  We'll make a simple call tree, foo -> bar, then
    # invoke foo, check the descendent time for foo, then invoke foo again and
    # check the descendent time again.  It should have been incremented after
    # the second call.


    do {




	proc ::foo {} {
	    ::bar
	}
        proc ::bar {} {
            after 300
        }
	foo
        array set stats [lindex [profiler::dump ::foo] 1]
        set before $stats(descendantTime)
        foo
        array set stats [lindex [profiler::dump ::foo] 1]
        set after $stats(descendantTime)
        list \
	    before [expr {$before - $before}] \
            after  [expr {($after - $before) > 0}]
    }


} {before 0 after 1}

test profiler-4.1 {profiler::print produces nicer output than dump} {


    set result [do {



	proc ::foo {} {
	    set foobar 0
	}
	foo
	foo
	foo
	foo
	profiler::print ::foo
    }]

    regsub {Compile time:.*} $result {} result
    string trim $result
} [tcltest::viewFile [asset 4.1]]






test profiler-5.1 {profiler respects suspend/resume} {


    set result [do {



	proc ::foo {} {
	    set foobar 0
	}
	foo
	foo
	foo
	foo
	profiler::suspend ::foo ; # note the qualification, has to match proc!
	foo
	foo
	set res [profiler::print ::foo]
	profiler::resume
	set res
    }]

    regsub {Compile time:.*} $result {} result
    string trim $result
} [tcltest::viewFile [asset 5.1]]






test profiler-5.2 {profiler respects new-disabled/enabled} {


    set result [do {
	profiler::new-disabled
	proc ::bar {} {
	    set foobar 0
	}

	profiler::new-enabled
	proc ::foo {} {
	    set foobar 0
	}
	#---	
	foo
	bar
	profiler::resume
	bar
	#---
	set res [profiler::print ::foo]
	regsub {Compile time:.*} $res {} res
	set res [string trim $res]
	append res \n\n [profiler::print ::bar]
	regsub {Compile time:.*} $res {} res
	set res
    }]
    string trim $result
} [tcltest::viewFile [asset 5.2]]

test profiler-6.1 {profiler handles functions with funny names} {
    array set bar [do {
	proc ::foo(bar) {} {
	    set foobar 0
	}
	foo(bar); foo(bar); foo(bar)
	profiler::dump ::foo(bar)
    }]


    array set foo ${bar(::foo(bar))}
    set result [list callCount $foo(callCount) callerDist $foo(callerDist)]
    unset foo bar
    set result
} [list callCount 3 callerDist [list GLOBAL 3]]

test profiler-7.1 {sortFunctions} {

    do {




	catch {profiler::sortFunctions} res
	set res
    }


} "unknown statistic \"\": should be calls, compileTime, exclusiveRuntime,\
nonCompileTime, totalRuntime, avgExclusiveRuntime, or avgRuntime"

test profiler-7.2 {sortFunctions} tcl8.4only {

    do {




	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::sortFunctions calls
    }


} [list [list ::bar 1] [list ::foo 2]]

test profiler-7.2-85 {sortFunctions} tcl8.5only {

    do {




	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::sortFunctions calls
    }


} [list [list ::tcl::clock::scan 0] [list ::tcl::clock::format 0] [list ::tcl::clock::add 0] [list ::bar 1] [list ::foo 2]]

test profiler-7.2-86 {sortFunctions} tcl8.6plus {
    do {
	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::sortFunctions calls
    }
} [list [list ::bar 1] [list ::foo 2]]

test profiler-7.3 {sortFunctions} {
    do {
	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	catch {profiler::sortFunctions compileTime}
    }


} 0

test profiler-7.4 {sortFunctions} {

    do {




	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	catch {profiler::sortFunctions totalRuntime}
    }


} 0

test profiler-7.5 {sortFunctions} {

    do {




	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	catch {profiler::sortFunctions avgRuntime}
    }


} 0

test profiler-8.1 {reset} {
    array set bar [do {





	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::reset
	profiler::dump ::foo
    }]


    array set foo $bar(::foo)
    set result [list callCount $foo(callCount) callerDist $foo(callerDist)]
    unset foo bar
    set result
} [list callCount 0 callerDist [list ]]

test profiler-8.2 {reset with a pattern} {
    array set data [do {





	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::reset ::foo
	profiler::dump *
    }]




    array set foo $data(::foo)
    array set bar $data(::bar)
    set result [list \
		    [list callCount $foo(callCount) callerDist $foo(callerDist)] \
		    [list callCount $bar(callCount) callerDist $bar(callerDist)]]
    unset foo bar data
    set result
} [list \
       [list callCount 0 callerDist [list ]] \
       [list callCount 1 callerDist [list GLOBAL 1]]]

test profiler-9.1 {dump for multiple functions} {
    array set data [do {





	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::dump *
    }]




    array set foo $data(::foo)
    array set bar $data(::bar)
    set result [list \
		    [list callCount $foo(callCount) callerDist $foo(callerDist)] \
		    [list callCount $bar(callCount) callerDist $bar(callerDist)]]
    unset foo bar data
    set result
} [list \
       [list callCount 2 callerDist [list GLOBAL 2]] \
       [list callCount 1 callerDist [list GLOBAL 1]]]

test profiler-10.0-tkt-0dd4b31bb8 {result of leave handler} {
    join [do {
	set trace {}
	#
	proc echo   args { global trace; lappend trace $args; return $args }
	proc tracer args { global trace; lappend trace $args; return $args }
	#
	trace add execution echo leave tracer
	echo hi
	#
	set trace
    }] \n
} [viewFile [asset tkt-0dd4b31bb8]]

# -------------------------------------------------------------------------
rename do {}
testsuiteCleanup
return







>
>














<
|
<
<
|
<
<
<
<




>
|
>
>
>
>

|
>
>


|
>
|
>
>
>
>




|
>
>

<
|
>
|
>
>
>
>





|
>
>

<

>
|
>
>
>
>






|
>
>

<

>
|
>
>
>
>






|
>
|
>
>

<

>
|
>
>
>
>





|
>
|
>
>



|
>
>
>
>
>









>
>

|
<
<









>
>
|
>
>
>
>










>


<







>
|
>
>
>
>












<
|
|
|
>
>



>
>
|
>
>
>









>


<
>
>
>
>
>


>
>
|
>
>
>














>


<
|
>
>
>
>

|
>
>
|
<
<
|
<
>
|
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<






>
>

|
<
<



>
|
>
>
>
>


|
>
>


<

>
|
>
>
>
>








|
>
>

<
|
>
|
>
>
>
>








|
>
>

<
|
<
<
|
<
|
|
<
<
<
<
<
|
|
|








|
>
>

<

>
|
>
>
>
>








|
>
>

<

>
|
>
>
>
>








|
>
>



|
>
>
>
>
>










>
>

|
<
<

<

|
>
>
>
>
>










>
>
>
>


<
|
|
<
<
<
|
|


|
>
>
>
>
>









>
>
>
>


<
|
|
<
<
<
|
|

<
<
|
<
<
<
<
<
<
<
|
<
<

<
<

<
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
89

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147


148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201

202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257

258
259
260
261
262
263
264
265
266
267


268

269
270






271














272
273
274
275
276
277
278
279
280
281


282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297

298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316

317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335

336


337

338
339





340
341
342
343
344
345
346
347
348
349
350
351
352
353
354

355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414


415

416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438

439
440



441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465

466
467



468
469
470


471







472


473


474

# Profiler tests.                                              -*- tcl -*-
#
# Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# All rights reserved.
#
# RCS: @(#) $Id: profiler.test,v 1.20 2006/10/09 21:41:41 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.3
testsNeedTcltest 1.0

testing {
    useLocal profiler.tcl profiler
}


::tcltest::testConstraint tcl8.4only \


	[expr {![package vsatisfies [package provide Tcl] 8.5]}]





# -------------------------------------------------------------------------

test profiler-1.0 {profiler::init redirects the proc command} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	list [interp alias {} proc] [info commands ::_oldProc]
    }]
    interp delete $c
    set result
} [list ::profiler::profProc ::_oldProc]

test profiler-2.0 {profiler creates two wrapper proc and real proc} {tcl8.3only} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc foo {} {
	    puts "foo!"
	}
	list [info commands foo] [info commands fooORIG]
    }]
    interp delete $c
    set result
} [list foo fooORIG]

test profiler-2.1 {profiler creates procs in correct scope} {tcl8.3only} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	namespace eval foo {}
	proc ::foo::foo {} {
	    puts "foo!"
	}
	list [info commands ::foo::foo] [info commands ::foo::fooORIG]
    }]
    interp delete $c
    set result
} [list ::foo::foo ::foo::fooORIG]

test profiler-2.2 {profiler creates procs in correct scope} {tcl8.3only} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	namespace eval foo {
	    proc foo {} {
		puts "foo!"
	    }
	}
	list [info commands ::foo::foo] [info commands ::foo::fooORIG]
    }]
    interp delete $c
    set result
} [list ::foo::foo ::foo::fooORIG]

test profiler-2.3 {profiler creates procs in correct scope} {tcl8.3only} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	namespace eval foo {
	    namespace eval bar {}
	    proc bar::foo {} {
		puts "foo!"
	    }
	}
	list [info commands ::foo::bar::foo] \
		[info commands ::foo::bar::fooORIG]
    }]
    interp delete $c
    set result
} [list ::foo::bar::foo ::foo::bar::fooORIG]

test profiler-2.4 {profiler creates procs in correct scope} {tcl8.3only} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	namespace eval foo {
	    proc ::foo {} {
		puts "foo!"
	    }
	}
	list [info commands ::foo] \
		[info commands ::fooORIG]
    }]
    interp delete $c
    set result
} [list ::foo ::fooORIG]

test profiler-3.1 {profiler wrappers do profiling} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	foo
	foo
	foo
	foo
	profiler::dump ::foo
    }]
    interp delete $c
    array set bar $result
    array set foo $bar(::foo)
    list callCount $foo(callCount) callerDist $foo(callerDist)


} [list callCount 4 callerDist [list GLOBAL 4]]

test profiler::leaveHandler::initialize_descendent_time {} {
    # Verify that the profiler tracks descendent time correctly.  We'll make
    # a simple call tree, foo -> bar, then invoke foo, then check the profiler
    # stats to see that _some_ descendent time has been logged for the call 
    # to bar.  We won't be able to predict exactly how much time will get 
    # billed there, but it should be non-zero.

    set c [interp create]
    interp alias $c parentSet {} set
    array set stats [lindex [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler

	profiler::init
	proc ::foo {} {
	    ::bar
	}
        proc ::bar {} {
            after 300
        }
	foo

	profiler::dump ::foo
    }] 1]
    interp delete $c
    list descendantTime [expr {$stats(descendantTime) > 0}]
} {descendantTime 1}

test profiler::leaveHandler::increment_descendent_time {} {
    # Verify that the profiler increments descendent time each time a
    # a descendent is invoked.  We'll make a simple call tree, foo -> bar, then
    # invoke foo, check the descendent time for foo, then invoke foo again and
    # check the descendent time again.  It should have been incremented after
    # the second call.

    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    ::bar
	}
        proc ::bar {} {
            after 300
        }
	foo
        array set stats [lindex [profiler::dump ::foo] 1]
        set before $stats(descendantTime)
        foo
        array set stats [lindex [profiler::dump ::foo] 1]
        set after $stats(descendantTime)

        list before [expr {$before - $before}] \
            after [expr {($after - $before) > 0}]
    }]
    interp delete $c
    set result
} {before 0 after 1}

test profiler-4.1 {profiler::print produces nicer output than dump} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	foo
	foo
	foo
	foo
	profiler::print ::foo
    }]
    interp delete $c
    regsub {Compile time:.*} $result {} result
    string trim $result

} "Profiling information for ::foo
============================================================
            Total calls:  4
    Caller distribution:
  GLOBAL:  4"

test profiler-5.1 {profiler respects suspend/resume} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	foo
	foo
	foo
	foo
	profiler::suspend ::foo ; # note the qualification, has to match proc!
	foo
	foo
	set res [profiler::print ::foo]
	profiler::resume
	set res
    }]
    interp delete $c
    regsub {Compile time:.*} $result {} result
    string trim $result

} "Profiling information for ::foo
============================================================
            Total calls:  4
    Caller distribution:
  GLOBAL:  4"

test profiler-6.1 {profiler handles functions with funny names} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {


	set     auto_path [parentSet auto_path]

	lappend auto_path [file dirname [file dirname [info script]]]
	package require profiler






	profiler::init














	proc ::foo(bar) {} {
	    set foobar 0
	}
	foo(bar); foo(bar); foo(bar)
	profiler::dump ::foo(bar)
    }]
    interp delete $c
    array set bar $result
    array set foo ${bar(::foo(bar))}
    list callCount $foo(callCount) callerDist $foo(callerDist)


} [list callCount 3 callerDist [list GLOBAL 3]]

test profiler-7.1 {sortFunctions} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	catch {profiler::sortFunctions} res
	set res
    }]
    interp delete $c
    set result
} "unknown statistic \"\": should be calls, compileTime, exclusiveRuntime,\
nonCompileTime, totalRuntime, avgExclusiveRuntime, or avgRuntime"

test profiler-7.2 {sortFunctions} tcl8.4only {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::sortFunctions calls
    }]
    interp delete $c
    set result
} [list [list ::bar 1] [list ::foo 2]]

test profiler-7.2-85 {sortFunctions} tcl8.5plus {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::sortFunctions calls
    }]
    interp delete $c
    set result
} [list [list ::tcl::clock::scan 0] [list ::tcl::clock::format 0] [list ::tcl::clock::add 0] [list ::bar 1] [list ::foo 2]]

test profiler-7.3 {sortFunctions} {


    set c [interp create]

    interp alias $c parentSet {} set
    set result [$c eval {





	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	catch {profiler::sortFunctions compileTime}
    }]
    interp delete $c
    set result
} 0

test profiler-7.4 {sortFunctions} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	catch {profiler::sortFunctions totalRuntime}
    }]
    interp delete $c
    set result
} 0

test profiler-7.5 {sortFunctions} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	catch {profiler::sortFunctions avgRuntime}
    }]
    interp delete $c
    set result
} 0

test profiler-8.1 {reset} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::reset
	profiler::dump ::foo
    }]
    interp delete $c
    array set bar $result
    array set foo $bar(::foo)
    list callCount $foo(callCount) callerDist $foo(callerDist)


} [list callCount 0 callerDist [list ]]

test profiler-8.2 {reset with a pattern} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::reset ::foo
	profiler::dump *
    }]
    interp delete $c
    array set data $result
    catch {unset foo}
    catch {unset bar}
    array set foo $data(::foo)
    array set bar $data(::bar)

    list [list callCount $foo(callCount) callerDist $foo(callerDist)] \
	    [list callCount $bar(callCount) callerDist $bar(callerDist)]



} [list [list callCount 0 callerDist [list ]] \
	[list callCount 1 callerDist [list GLOBAL 1]]]

test profiler-9.1 {dump for multiple functions} {
    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
	set auto_path [parentSet auto_path]
	package require profiler
	profiler::init
	proc ::foo {} {
	    set foobar 0
	}
	proc ::bar {} {
	    set foobar 1
	}
	foo; foo; bar;
	profiler::dump *
    }]
    interp delete $c
    array set data $result
    catch {unset foo}
    catch {unset bar}
    array set foo $data(::foo)
    array set bar $data(::bar)

    list [list callCount $foo(callCount) callerDist $foo(callerDist)] \
	    [list callCount $bar(callCount) callerDist $bar(callerDist)]



} [list [list callCount 2 callerDist [list GLOBAL 2]] \
	[list callCount 1 callerDist [list GLOBAL 1]]]



catch {unset foo}







catch {unset bar}





testsuiteCleanup

Deleted modules/profiler/test-assets/4.1.

1
2
3
4
5
Profiling information for ::foo
============================================================
            Total calls:  4
    Caller distribution:
  GLOBAL:  4
<
<
<
<
<










Deleted modules/profiler/test-assets/5.1.

1
2
3
4
5
Profiling information for ::foo
============================================================
            Total calls:  4
    Caller distribution:
  GLOBAL:  4
<
<
<
<
<










Deleted modules/profiler/test-assets/5.2.

1
2
3
4
5
6
7
8
9
10
11
Profiling information for ::foo
============================================================
            Total calls:  1
    Caller distribution:
  GLOBAL:  1

Profiling information for ::bar
============================================================
            Total calls:  1
    Caller distribution:
  GLOBAL:  1
<
<
<
<
<
<
<
<
<
<
<






















Deleted modules/profiler/test-assets/tkt-0dd4b31bb8.

1
2
hi
{echo hi} 0 hi leave
<
<




Added modules/pt/configuration.tcl.



































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
# configuration.tcl --
#
#	Generic configuration management, for use by import and export
#	managers.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: configuration.tcl,v 1.1 2010/03/26 05:07:24 andreas_kupries Exp $

# Each object manages a set of configuration variables.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.5
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::configuration {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creating, destruction

    # Default constructor.
    # Default destructor.

    # ### ### ### ######### ######### #########
    ## Public methods. Reading and writing the configuration.

    method names {} {
	return [array names myconfiguration]
    }

    method get {} {
	return [array get myconfiguration]
    }

    method set {name {value {}}} {
	# 7 instead of 3 in the condition below, because of the 4
	# implicit arguments snit is providing to each method.
	if {[llength [info level 0]] == 7} {
	    set myconfiguration($name) $value
	} elseif {![info exists myconfiguration($name)]} {
	    return -code error "can't read \"$name\": no such variable"
	}
	return $myconfiguration($name)
    }

    method unset {args} {
	if {![llength $args]} { lappend args * }
	foreach pattern $args {
	    array unset myconfiguration $pattern
	}
	return
    }

    # ### ### ### ######### ######### #########
    ## Internal methods :: None.

    # ### ### ### ######### ######### #########
    ## State :: Configuration data, Tcl array

    variable myconfiguration -array {}

    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide configuration 1
return

Changes to modules/pt/include/feedback.inc.

1
2
3
[comment {--- Standard trailer for all manpages in this module --}]
[vset CATEGORY pt]
[include ../../common-text/feedback.inc]


|
1
2
3
[comment {--- Standard trailer for all manpages in this module --}]
[vset CATEGORY pt]
[include ../../doctools2base/include/feedback.inc]

Added modules/pt/paths.tcl.























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
# paths.tcl --
#
#	Generic path list management, for use by import management.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: paths.tcl,v 1.1 2010/03/26 05:07:24 andreas_kupries Exp $

# Each object manages a list of paths.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.5
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::paths {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction

    # Default constructor.
    # Default destructor.

    # ### ### ### ######### ######### #########
    ## Methods :: Querying and manipulating the list of paths.

    method paths {} {
	return $mypaths
    }

    method add {path} {
	if {$path in $mypaths} return
	lappend mypaths $path
	return
    }

    method remove {path} {
	set pos [lsearch $mypaths $path]
	if {$pos < 0} return
	set  mypaths [lreplace $mypaths $pos $pos]
	return
    }

    method clear {} {
	set mypaths {}
	return
    }

    # ### ### ### ######### ######### #########
    ## Internal methods :: None

    # ### ### ### ######### ######### #########
    ## State :: List of paths.

    variable mypaths {}

    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide paths 1
return

Changes to modules/pt/pkgIndex.tcl.

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
if {![package vsatisfies [package provide Tcl] 8.5]} return

# General utilities.
package ifneeded char          1.0.1 [list source [file join $dir char.tcl]]


package ifneeded text::write   1 [list source [file join $dir text_write.tcl]]

# AST support
package ifneeded pt::ast     1.1 [list source [file join $dir pt_astree.tcl]]

# General parser support. Currently only conversion of structured
# syntax errors (or parts thereof) into a human-readable form.
package ifneeded pt::util    1.1 [list source [file join $dir pt_util.tcl]]

# Parsing Expression support
package ifneeded pt::pe        1.0.2 [list source [file join $dir pt_pexpression.tcl]]
package ifneeded pt::pe::op    1.0.1 [list source [file join $dir pt_pexpr_op.tcl]]

# Parsing Expression Grammar support.
package ifneeded pt::peg                1 [list source [file join $dir pt_pegrammar.tcl]]
package ifneeded pt::peg::container     1 [list source [file join $dir pt_peg_container.tcl]]
package ifneeded pt::peg::interp    1.0.1 [list source [file join $dir pt_peg_interp.tcl]]
package ifneeded pt::peg::op        1.1.0 [list source [file join $dir pt_peg_op.tcl]]
package ifneeded pt::parse::peg     1.0.1 [list source [file join $dir pt_parse_peg.tcl]]


# Export/import managers. Assumes an untrusted environment.
package ifneeded pt::peg::export            1.0.1 [list source [file join $dir pt_peg_export.tcl]]
package ifneeded pt::peg::import            1.0.1 [list source [file join $dir pt_peg_import.tcl]]

# Export plugins, connecting manager to the core conversion packages.
package ifneeded pt::peg::export::container 1 [list source [file join $dir pt_peg_export_container.tcl]]
package ifneeded pt::peg::export::json      1 [list source [file join $dir pt_peg_export_json.tcl]]
package ifneeded pt::peg::export::peg       1 [list source [file join $dir pt_peg_export_peg.tcl]]

# Import plugins, connecting manager to the core conversion packages.




>
>

















|




|
|







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
if {![package vsatisfies [package provide Tcl] 8.5]} return

# General utilities.
package ifneeded char          1.0.1 [list source [file join $dir char.tcl]]
package ifneeded configuration 1 [list source [file join $dir configuration.tcl]]
package ifneeded paths         1 [list source [file join $dir paths.tcl]]
package ifneeded text::write   1 [list source [file join $dir text_write.tcl]]

# AST support
package ifneeded pt::ast     1.1 [list source [file join $dir pt_astree.tcl]]

# General parser support. Currently only conversion of structured
# syntax errors (or parts thereof) into a human-readable form.
package ifneeded pt::util    1.1 [list source [file join $dir pt_util.tcl]]

# Parsing Expression support
package ifneeded pt::pe        1.0.2 [list source [file join $dir pt_pexpression.tcl]]
package ifneeded pt::pe::op    1.0.1 [list source [file join $dir pt_pexpr_op.tcl]]

# Parsing Expression Grammar support.
package ifneeded pt::peg                1 [list source [file join $dir pt_pegrammar.tcl]]
package ifneeded pt::peg::container     1 [list source [file join $dir pt_peg_container.tcl]]
package ifneeded pt::peg::interp    1.0.1 [list source [file join $dir pt_peg_interp.tcl]]
package ifneeded pt::peg::op        1.0.1 [list source [file join $dir pt_peg_op.tcl]]
package ifneeded pt::parse::peg     1.0.1 [list source [file join $dir pt_parse_peg.tcl]]


# Export/import managers. Assumes an untrusted environment.
package ifneeded pt::peg::export            1 [list source [file join $dir pt_peg_export.tcl]]
package ifneeded pt::peg::import            1 [list source [file join $dir pt_peg_import.tcl]]

# Export plugins, connecting manager to the core conversion packages.
package ifneeded pt::peg::export::container 1 [list source [file join $dir pt_peg_export_container.tcl]]
package ifneeded pt::peg::export::json      1 [list source [file join $dir pt_peg_export_json.tcl]]
package ifneeded pt::peg::export::peg       1 [list source [file join $dir pt_peg_export_peg.tcl]]

# Import plugins, connecting manager to the core conversion packages.
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
# Import core functionality: Conversion from a specific format to PEG.
package ifneeded pt::peg::from::json      1 [list source [file join $dir pt_peg_from_json.tcl]]
package ifneeded pt::peg::from::peg   1.0.3 [list source [file join $dir pt_peg_from_peg.tcl]]

# PARAM runtime.
package ifneeded pt::rde      1.1 [list source [file join $dir pt_rdengine.tcl]]
package ifneeded pt::rde::oo  1.1 [list source [file join $dir pt_rdengine_oo.tcl]]

# Note: The last two numbers are the rde::nx version itself. The
# preceding version information is the rde::oo version it is based on.
package ifneeded pt::rde::nx  1.1.1.1 [list source [file join $dir pt_rdengine_nx.tcl]]


# PEG grammar specification, as CONTAINER
package ifneeded pt::peg::container::peg 1 [list source [file join $dir pt_peg_container_peg.tcl]]

# */PARAM support (canned configurations).
package ifneeded pt::cparam::configuration::critcl  1.0.2 [list source [file join $dir pt_cparam_config_critcl.tcl]]
package ifneeded pt::cparam::configuration::tea     0.1   [list source [file join $dir pt_cparam_config_tea.tcl]]
package ifneeded pt::tclparam::configuration::snit  1.0.2 [list source [file join $dir pt_tclparam_config_snit.tcl]]
package ifneeded pt::tclparam::configuration::tcloo 1.0.4 [list source [file join $dir pt_tclparam_config_tcloo.tcl]]
package ifneeded pt::tclparam::configuration::nx    1.0.1 [list source [file join $dir pt_tclparam_config_nx.tcl]]

# Parser generator core.
package ifneeded pt::pgen 1.1 [list source [file join $dir pt_pgen.tcl]]







<
<
<
|










|


|
49
50
51
52
53
54
55



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Import core functionality: Conversion from a specific format to PEG.
package ifneeded pt::peg::from::json      1 [list source [file join $dir pt_peg_from_json.tcl]]
package ifneeded pt::peg::from::peg   1.0.3 [list source [file join $dir pt_peg_from_peg.tcl]]

# PARAM runtime.
package ifneeded pt::rde      1.1 [list source [file join $dir pt_rdengine.tcl]]
package ifneeded pt::rde::oo  1.1 [list source [file join $dir pt_rdengine_oo.tcl]]



package ifneeded pt::rde::nx  1.1 [list source [file join $dir pt_rdengine_nx.tcl]]


# PEG grammar specification, as CONTAINER
package ifneeded pt::peg::container::peg 1 [list source [file join $dir pt_peg_container_peg.tcl]]

# */PARAM support (canned configurations).
package ifneeded pt::cparam::configuration::critcl  1.0.2 [list source [file join $dir pt_cparam_config_critcl.tcl]]
package ifneeded pt::cparam::configuration::tea     0.1   [list source [file join $dir pt_cparam_config_tea.tcl]]
package ifneeded pt::tclparam::configuration::snit  1.0.2 [list source [file join $dir pt_tclparam_config_snit.tcl]]
package ifneeded pt::tclparam::configuration::tcloo 1.0.4 [list source [file join $dir pt_tclparam_config_tcloo.tcl]]
package ifneeded pt::tclparam::configuration::nx    1.0.0 [list source [file join $dir pt_tclparam_config_nx.tcl]]

# Parser generator core.
package ifneeded pt::pgen 1.0.3 [list source [file join $dir pt_pgen.tcl]]

Changes to modules/pt/pt_cparam_config_critcl.tcl.

111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
	    # Tcl interface layer is ignored.  This generated parser
	    # provides its own layer for that.

	    critcl::ccode {
		/* -*- c -*- */

		#include <string.h>
		#include <ctype.h>  /* is... */
		#include <stdlib.h> /* qsort */
		#define SCOPE static

@@RUNTIME@@
	    }

	    # # ## ### ###### ######## #############
	    ## BEGIN of GENERATED CODE. DO NOT EDIT.







<
<







111
112
113
114
115
116
117


118
119
120
121
122
123
124
	    # Tcl interface layer is ignored.  This generated parser
	    # provides its own layer for that.

	    critcl::ccode {
		/* -*- c -*- */

		#include <string.h>


		#define SCOPE static

@@RUNTIME@@
	    }

	    # # ## ### ###### ######## #############
	    ## BEGIN of GENERATED CODE. DO NOT EDIT.

Changes to modules/pt/pt_parse_peg_c.tcl.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
		ch  += clen;
	    }
	    return tc->str + base;
	}
	SCOPE void
	rde_tc_get (RDE_TC tc, int at, char** ch, long int* len)
	{
	    long int  oc, off, end;
	    void** ov;
	    rde_stack_get (tc->off, &oc, &ov);
	    ASSERT_BOUNDS(at,oc);
	    off = (long int) ov [at];
	    if ((at+1) == oc) {
		end = tc->num;
	    } else {
		end = (long int) ov [at+1];
	    }
	    TRACE (("rde_tc_get (RDE_TC %p, @ %d) => %d.[%d ... %d]/%d",tc,at,end-off,off,end-1,tc->num));
	    ASSERT_BOUNDS(off,tc->num);
	    ASSERT_BOUNDS(end-1,tc->num);
	    *ch = tc->str + off;
	    *len = end - off;
	}
	SCOPE void
	rde_tc_get_s (RDE_TC tc, int at, int last, char** ch, long int* len)
	{
	    long int  oc, off, end;
	    void** ov;
	    rde_stack_get (tc->off, &oc, &ov);
	    ASSERT_BOUNDS(at,oc);
	    ASSERT_BOUNDS(last,oc);
	    off = (long int) ov [at];
	    if ((last+1) == oc) {
		end = tc->num;







|


















|







414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
		ch  += clen;
	    }
	    return tc->str + base;
	}
	SCOPE void
	rde_tc_get (RDE_TC tc, int at, char** ch, long int* len)
	{
	    long int  oc, off, top, end;
	    void** ov;
	    rde_stack_get (tc->off, &oc, &ov);
	    ASSERT_BOUNDS(at,oc);
	    off = (long int) ov [at];
	    if ((at+1) == oc) {
		end = tc->num;
	    } else {
		end = (long int) ov [at+1];
	    }
	    TRACE (("rde_tc_get (RDE_TC %p, @ %d) => %d.[%d ... %d]/%d",tc,at,end-off,off,end-1,tc->num));
	    ASSERT_BOUNDS(off,tc->num);
	    ASSERT_BOUNDS(end-1,tc->num);
	    *ch = tc->str + off;
	    *len = end - off;
	}
	SCOPE void
	rde_tc_get_s (RDE_TC tc, int at, int last, char** ch, long int* len)
	{
	    long int  oc, off, top, end;
	    void** ov;
	    rde_stack_get (tc->off, &oc, &ov);
	    ASSERT_BOUNDS(at,oc);
	    ASSERT_BOUNDS(last,oc);
	    off = (long int) ov [at];
	    if ((last+1) == oc) {
		end = tc->num;
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
	    ER_CLEAR (p);
	}
	SCOPE void
	rde_param_i_error_nonterminal (RDE_PARAM p, long int s)
	{
	    
	    return;
	#if 0
	    long int pos;
	    if (!p->ER) return;
	    pos = 1 + (long int) rde_stack_top (p->LS);
	    if (p->ER->loc != pos) return;
	    error_set (p, s);
	    p->ER->loc = pos;
	#endif
	}
	SCOPE void
	rde_param_i_error_pop_merge (RDE_PARAM p)
	{
	    ERROR_STATE* top = (ERROR_STATE*) rde_stack_top (p->ES);
	    
	    if (top == p->ER) {







|






|







830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
	    ER_CLEAR (p);
	}
	SCOPE void
	rde_param_i_error_nonterminal (RDE_PARAM p, long int s)
	{
	    
	    return;
#if 0
	    long int pos;
	    if (!p->ER) return;
	    pos = 1 + (long int) rde_stack_top (p->LS);
	    if (p->ER->loc != pos) return;
	    error_set (p, s);
	    p->ER->loc = pos;
#endif
	}
	SCOPE void
	rde_param_i_error_pop_merge (RDE_PARAM p)
	{
	    ERROR_STATE* top = (ERROR_STATE*) rde_stack_top (p->ES);
	    
	    if (top == p->ER) {
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
	    TRACE (("rde_param_i_value_leaf => '%s'",Tcl_GetString (newsv)));
	    SV_SET (p, newsv);
	}
	SCOPE void
	rde_param_i_value_reduce (RDE_PARAM p, long int s)
	{
	    Tcl_Obj*  newsv;
	    int       i, j;
	    Tcl_Obj** ov;
	    long int  ac;
	    Tcl_Obj** av;
	    long int pos   = 1 + (long int) rde_stack_top (p->LS);
	    long int mark  = (long int) rde_stack_top (p->mark);
	    long int asize = rde_stack_size (p->ast);
	    long int new   = asize - mark;







|







1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
	    TRACE (("rde_param_i_value_leaf => '%s'",Tcl_GetString (newsv)));
	    SV_SET (p, newsv);
	}
	SCOPE void
	rde_param_i_value_reduce (RDE_PARAM p, long int s)
	{
	    Tcl_Obj*  newsv;
	    int       oc, i, j;
	    Tcl_Obj** ov;
	    long int  ac;
	    Tcl_Obj** av;
	    long int pos   = 1 + (long int) rde_stack_top (p->LS);
	    long int mark  = (long int) rde_stack_top (p->mark);
	    long int asize = rde_stack_size (p->ast);
	    long int new   = asize - mark;

Changes to modules/pt/pt_peg_export.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.0.1]
[manpage_begin pt::peg::export n [vset VERSION]]
[include include/module.inc]
[titledesc {PEG Export}]
[require snit]
[require struct::map]
[require pt::peg]
[require pluginmgr]
[require pt::peg::export [opt [vset VERSION]]]
[description]
[include include/ref_intro.inc]

This package provides a manager for parsing expression grammars, with
each instance handling a set of plugins for the export of them to
other formats, i.e. their conversion to, for example [term nroff],
[term HTML], etc.

<
|



|


|







1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[comment {-*- tcl -*- doctools manpage}]

[manpage_begin pt::peg::export n 1]
[include include/module.inc]
[titledesc {PEG Export}]
[require snit]
[require configuration]
[require pt::peg]
[require pluginmgr]
[require pt::peg::export [opt 1]]
[description]
[include include/ref_intro.inc]

This package provides a manager for parsing expression grammars, with
each instance handling a set of plugins for the export of them to
other formats, i.e. their conversion to, for example [term nroff],
[term HTML], etc.

Changes to modules/pt/pt_peg_export.tcl.

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
# pt_peg_export.tcl --
#
#	Exporting parsing expression grammars into other formats.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



# Each object manages a set of plugins for the conversion of parsing
# expression grammars into some textual representation. I.e. this
# object manages the conversion to specialized serializations of
# parsing expression grammars.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.5
package require snit
package require pt::peg
package require pluginmgr
package require struct::map

# ### ### ### ######### ######### #########
## API

snit::type ::pt::peg::export {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myconfig using ::struct::map ${selfns}::CONFIG
	return
    }

    destructor {
	$myconfig destroy
	# Clear the cache of loaded export plugins.
	foreach k [array names myplugin] {








>
>










|


|













|







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
# pt_peg_export.tcl --
#
#	Exporting parsing expression grammars into other formats.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: pt_peg_export.tcl,v 1.1 2010/03/26 05:07:24 andreas_kupries Exp $

# Each object manages a set of plugins for the conversion of parsing
# expression grammars into some textual representation. I.e. this
# object manages the conversion to specialized serializations of
# parsing expression grammars.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.5
package require configuration
package require pt::peg
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::pt::peg::export {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myconfig using ::configuration ${selfns}::CONFIG
	return
    }

    destructor {
	$myconfig destroy
	# Clear the cache of loaded export plugins.
	foreach k [array names myplugin] {
109
110
111
112
113
114
115
116
117
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide pt::peg::export 1.0.1
return







|

111
112
113
114
115
116
117
118
119
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide pt::peg::export 1
return

Changes to modules/pt/pt_peg_export.test.

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
# -*- tcl -*-
# peg_export.test:  tests for the pt::peg::export package.
#
# Copyright (c) 2009-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2

support {
    useAccel [useTcllibC] struct/sets.tcl  struct::set
    TestAccelInit                          struct::set

    use fileutil/fileutil.tcl      fileutil      ;# tests/common
    use snit/snit.tcl              snit
    use pluginmgr/pluginmgr.tcl    pluginmgr
    use struct/map.tcl             struct::map


    useLocal pt_pexpression.tcl    pt::pe
    useLocal pt_pegrammar.tcl      pt::peg

    source [localPath tests/common]
}
testing {
    useLocalKeep pt_peg_export.tcl pt::peg::export



|

>
>

















<

>







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
# -*- tcl -*-
# peg_export.test:  tests for the pt::peg::export package.
#
# Copyright (c) 2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: pt_peg_export.test,v 1.1 2010/03/26 05:07:24 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2

support {
    useAccel [useTcllibC] struct/sets.tcl  struct::set
    TestAccelInit                          struct::set

    use fileutil/fileutil.tcl      fileutil      ;# tests/common
    use snit/snit.tcl              snit
    use pluginmgr/pluginmgr.tcl    pluginmgr


    useLocal configuration.tcl     configuration
    useLocal pt_pexpression.tcl    pt::pe
    useLocal pt_pegrammar.tcl      pt::peg

    source [localPath tests/common]
}
testing {
    useLocalKeep pt_peg_export.tcl pt::peg::export

Changes to modules/pt/pt_peg_import.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.0.1]
[manpage_begin pt::peg::import n [vset VERSION]]
[include include/module.inc]
[titledesc {PEG Import}]
[require Tcl 8.5]
[require snit]
[require fileutil::paths]
[require pt::peg]
[require pluginmgr]
[require pt::peg::import [opt [vset VERSION]]]
[description]
[include include/ref_intro.inc]

This package provides a manager for parsing expression grammars, with
each instance handling a set of plugins for the import of them from
other formats, i.e. their conversion from, for example [term peg],
[term container], [term json], etc.

<
|


|
|
<


|







1

2
3
4
5
6

7
8
9
10
11
12
13
14
15
16
[comment {-*- tcl -*- doctools manpage}]

[manpage_begin pt::peg::import n 1]
[include include/module.inc]
[titledesc {PEG Import}]
[require snit]
[require configuration]

[require pt::peg]
[require pluginmgr]
[require pt::peg::import [opt 1]]
[description]
[include include/ref_intro.inc]

This package provides a manager for parsing expression grammars, with
each instance handling a set of plugins for the import of them from
other formats, i.e. their conversion from, for example [term peg],
[term container], [term json], etc.

Changes to modules/pt/pt_peg_import.tcl.

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
# import.tcl --
#
#	Importing parsing expression grammars from other formats.
#
# Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



# Each object manages a set of plugins for the creation of parsing
# expression grammars from some textual representation. I.e. this
# object manages the conversion from specialized serializations of
# parsing expression grammars into their standard form.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require fileutil::paths
package require pt::peg
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::pt::peg::import {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myinclude using ::fileutil::paths ${selfns}::INCLUDE
	return
    }

    destructor {
	$myinclude destroy
	# Clear the cache of loaded import plugins.
	foreach k [array names myplugin] {




|



>
>









|
|
















|







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
# import.tcl --
#
#	Importing parsing expression grammars from other formats.
#
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: pt_peg_import.tcl,v 1.1 2010/03/26 05:07:24 andreas_kupries Exp $

# Each object manages a set of plugins for the creation of parsing
# expression grammars from some textual representation. I.e. this
# object manages the conversion from specialized serializations of
# parsing expression grammars into their standard form.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.5
package require paths
package require pt::peg
package require pluginmgr
package require snit

# ### ### ### ######### ######### #########
## API

snit::type ::pt::peg::import {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creation, destruction.

    constructor {} {
	install myinclude using ::paths         ${selfns}::INCLUDE
	return
    }

    destructor {
	$myinclude destroy
	# Clear the cache of loaded import plugins.
	foreach k [array names myplugin] {
180
181
182
183
184
185
186
187
188
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide pt::peg::import 1.0.1
return







|

182
183
184
185
186
187
188
189
190
    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide pt::peg::import 1
return

Changes to modules/pt/pt_peg_import.test.

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
# -*- tcl -*-
# peg_import.test:  tests for the pt::peg::import package.
#
# Copyright (c) 2009-2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2

support {
    use fileutil/fileutil.tcl      fileutil      ;# tests/common
    use snit/snit.tcl              snit
    use fileutil/paths.tcl         fileutil::paths
    use pluginmgr/pluginmgr.tcl    pluginmgr


    useLocal pt_pexpression.tcl    pt::pe
    useLocal pt_pegrammar.tcl      pt::peg

    source [localPath tests/common]
}
testing {
    useLocalKeep pt_peg_import.tcl pt::peg::import



|

>
>













<


>







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
# -*- tcl -*-
# peg_import.test:  tests for the pt::peg::import package.
#
# Copyright (c) 2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: pt_peg_import.test,v 1.1 2010/03/26 05:07:24 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2

support {
    use fileutil/fileutil.tcl      fileutil      ;# tests/common
    use snit/snit.tcl              snit

    use pluginmgr/pluginmgr.tcl    pluginmgr

    useLocal paths.tcl             paths
    useLocal pt_pexpression.tcl    pt::pe
    useLocal pt_pegrammar.tcl      pt::peg

    source [localPath tests/common]
}
testing {
    useLocalKeep pt_peg_import.tcl pt::peg::import

Changes to modules/pt/pt_peg_op.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
[comment {-*- text -*- doctools manpage}]
[vset VERSION 1.1.0]
[manpage_begin pt_peg_op i [vset VERSION]]
[include include/module.inc]
[titledesc {Parser Tools PE Grammar Utility Operations}]
[require pt::peg::op [opt [vset VERSION]]]
[description]
[include include/ref_intro.inc]

This package provides a number of utility commands manipulating a PE
grammar (container) in various ways.

[section API]

<
|


|







1

2
3
4
5
6
7
8
9
10
11
12
[comment {-*- text -*- doctools manpage}]

[manpage_begin pt_peg_op i 1.0.1]
[include include/module.inc]
[titledesc {Parser Tools PE Grammar Utility Operations}]
[require pt::peg::op 1.0.1]
[description]
[include include/ref_intro.inc]

This package provides a number of utility commands manipulating a PE
grammar (container) in various ways.

[section API]

Changes to modules/pt/pt_peg_op.tcl.

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
# -*- tcl -*-
# Copyright (c) 2009-2018 Andreas Kupries <andreas_kupries@sourceforge.net>
# Copyright (c) 2018 Stefan Sobernig <stefan.sobernig@wu.ac.at>

# Utility commands operating on parsing expressions.

# # ## ### ##### ######## ############# #####################
## Requirements

package require Tcl 8.5        ; # Required runtime.
package require pt::pe         ; # PE basics
package require pt::pe::op     ; # PE transforms
package require struct::set    ; # Set operations (symbol sets)

# # ## ### ##### ######## ############# #####################
##

namespace eval ::pt::peg::op {
    namespace export \
	flatten called reachable realizable \
	drop modeopt minimize dechain

    namespace ensemble create

    namespace eval ::pt::peg::op::drop {
	namespace export \
	    unreachable unrealizable


|
<

















|







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
# -*- tcl -*-
# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net>


# Utility commands operating on parsing expressions.

# # ## ### ##### ######## ############# #####################
## Requirements

package require Tcl 8.5        ; # Required runtime.
package require pt::pe         ; # PE basics
package require pt::pe::op     ; # PE transforms
package require struct::set    ; # Set operations (symbol sets)

# # ## ### ##### ######## ############# #####################
##

namespace eval ::pt::peg::op {
    namespace export \
	flatten called reachable realizable \
	dechain drop modeopt minimize

    namespace ensemble create

    namespace eval ::pt::peg::op::drop {
	namespace export \
	    unreachable unrealizable

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
89
90
91
92
93
94
95
96
97
98
99

100
101
102
103
104

105
106
107
108
109
110
111
112
113
114
115
116
    }

    return $dict
}

proc ::pt::peg::op::dechain {container} {

    set changed 1
    while {$changed} {

	










	set chainPairs [dict create]
	set rules [$container rules]

	array set modes [$container modes]




	set changed 0
	foreach {caller rule} $rules {
	    lassign $rule op called
	    if {$op ne "n"} continue
	    dict set chainPairs $called $caller
	}

	set ends [struct::set difference \
			[dict keys $chainPairs] \
			[dict values $chainPairs]]

	if {[struct::set empty $ends]} {

	    # stop, given a cycle
	    break
	}

	set chainPairs [dict remove $chainPairs {*}$ends]
	set changed [dict size $chainPairs]
	
	if {$changed} {
	    
	    dict for {called caller} $chainPairs {

		if {$called in [$container nonterminals]
		    && !(($modes($caller) ne "value") &&
		    (($modes($caller) ne "void") ||
		     ![info exists modes($called)] ||
		     ($modes($called) ne "void")))} {

		    
       		    $container rule $caller [$container rule $called]
		    
		} else {
		    incr changed -1

		}
	    }
	}
    }
    
    return
}

# # ## ### ##### ######## #############

proc ::pt::peg::op::modeopt {container} {








|
|
>
|
>
>
>
>
>
>
>
>
>
>
|
|
>
|
>
>
>
>

|
|
|
|
|
|
|
<
|
|
<
>
|
<
|
|
<
<
|
<
|
<
|
|
<
<
|
<
>
|
<
|
<
|
>
|
|
|
<
<







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
89
90
91
92
93
94

95
96

97
98

99
100


101

102

103
104


105

106
107

108

109
110
111
112
113


114
115
116
117
118
119
120
    }

    return $dict
}

proc ::pt::peg::op::dechain {container} {

    # Simplify all symbols which just chain to a different symbol by
    # inlining the called symbol in its callers. This works if and
    # only the modes match properly.

    # X     Z      dechain notes
    # value value| yes    | value is passed
    # value leaf | yes    | value is passed
    # value void | yes    | X is implied void
    # leaf  value| no     | generated value was discarded, inlined doesn't. Z may be implied void
    # leaf  leaf | no     | s.a.
    # leaf  void | no     | s.a.
    # void  value| no     | X drops value, inline doesn't
    # void  leaf | no     | s.a.
    # void  void | yes    |

    array set caller [Invert [called $container]]
    # caller = array (x -> list(caller-of-x))
    array set mode [$container modes]
    # mode = array (x -> mode-of-x)

    set changed 1
    while {$changed} {
	set changed 0
	foreach {symbol rule} [$container rules] {
	    # Ignore regular operators and terminals
	    if {[lindex $rule 0] ne "n"} continue
	    set called [lindex $rule 1]

	    # Ignore chains where mode changes form a barrier.
	    if {

		($mode($symbol) ne "value") &&
		(($mode($symbol) ne "void") ||

		 ($mode($called) ne "void"))
	    } continue


	    # We have the chain symbol -> called.


	    # Replace all users of 'symbol' with 'called'



	    foreach user $caller($symbol) {
		$container rule $user \


		    [pt::pe::op rename $symbol $called \

			 [$container rule $user]]
	    }



	    set changed 1
	    array set caller [Invert [called $container]]
	}
    }



    return
}

# # ## ### ##### ######## #############

proc ::pt::peg::op::modeopt {container} {

131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
    set mode() value

    # calls  = array (x -> called-by-x)
    # caller = array (x -> users-of-x)

    set changed [$container nonterminals]
    while {[llength $changed]} {
	#puts <$changed>
	set scan $changed
	set changed {}

	foreach sym $scan {
	    # Rule 1
	    if {![llength $calls($sym)] &&
		($mode($sym) eq "value")} {
		#puts (1)$sym
		set mode($sym) leaf
	    }

	    # Rule 2
	    set callmode [CallMode $caller($sym) mode]
	    if {($callmode eq "void") &&
		($mode($sym) ne "void")} {

		#puts (2)$sym
		set mode($sym) void

		# This change may change calling context and this call
		# mode of the symbols we call, so put them back up for
		# consideration.
		struct::set add changed $calls($sym)
	    }







|







|








|







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
    set mode() value

    # calls  = array (x -> called-by-x)
    # caller = array (x -> users-of-x)

    set changed [$container nonterminals]
    while {[llength $changed]} {
puts <$changed>
	set scan $changed
	set changed {}

	foreach sym $scan {
	    # Rule 1
	    if {![llength $calls($sym)] &&
		($mode($sym) eq "value")} {
puts (1)$sym
		set mode($sym) leaf
	    }

	    # Rule 2
	    set callmode [CallMode $caller($sym) mode]
	    if {($callmode eq "void") &&
		($mode($sym) ne "void")} {

puts (2)$sym
		set mode($sym) void

		# This change may change calling context and this call
		# mode of the symbols we call, so put them back up for
		# consideration.
		struct::set add changed $calls($sym)
	    }
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
    }
}

# # ## ### ##### ######## #############

proc ::pt::peg::op::minimize {container} {
    flatten           $container
    modeopt           $container; # for dechaining
    dechain           $container
    drop unrealizable $container
    drop unreachable  $container
    modeopt           $container;
    flatten           $container
    return
}

# # ## ### ##### ######## #############

proc ::pt::peg::op::reachable {container} {








<
|

|
|
|







186
187
188
189
190
191
192

193
194
195
196
197
198
199
200
201
202
203
204
    }
}

# # ## ### ##### ######## #############

proc ::pt::peg::op::minimize {container} {
    flatten           $container

    drop unreachable  $container
    drop unrealizable $container
    flatten           $container
    optmodes          $container
    dechain           $container
    return
}

# # ## ### ##### ######## #############

proc ::pt::peg::op::reachable {container} {

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
	    # Choice is realizable if we have at least one realizable
	    # branch. This is also the place where we have to remove
	    # unrealizable children when we drop unrealizable symbols
	    # from a grammar.

	    return [tcl::mathfunc::max {*}$arguments]
	}
	x - + - & - ! {
	    # All other operators are realizable if and only if all
	    # its children are realizable.

	    return [tcl::mathfunc::min {*}$arguments]
	}
	default {
	    # Terminals, special forms, Kleene closure (*), and
	    # optionals (?) are realizable by definition.
	    return 1
	}
    }
}

proc ::pt::peg::op::drop::unrealizable {container} {

    #set     all [$container nonterminals]
    set     all [::pt::peg::op reachable $container]
    lappend all {} ; # marker for start expression.

    set unrealizable \
	[struct::set difference \
	     $all [pt::peg::op realizable $container]]

    if {![llength $unrealizable]} return







|






|
|







|
<







300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323

324
325
326
327
328
329
330
	    # Choice is realizable if we have at least one realizable
	    # branch. This is also the place where we have to remove
	    # unrealizable children when we drop unrealizable symbols
	    # from a grammar.

	    return [tcl::mathfunc::max {*}$arguments]
	}
	x - * - + - ? - & - ! {
	    # All other operators are realizable if and only if all
	    # its children are realizable.

	    return [tcl::mathfunc::min {*}$arguments]
	}
	default {
	    # The terminals and special forms are realizable by
	    # definition.
	    return 1
	}
    }
}

proc ::pt::peg::op::drop::unrealizable {container} {

    set     all [$container nonterminals]

    lappend all {} ; # marker for start expression.

    set unrealizable \
	[struct::set difference \
	     $all [pt::peg::op realizable $container]]

    if {![llength $unrealizable]} return
367
368
369
370
371
372
373
374
375
## State / Configuration :: n/a

namespace eval ::pt::peg::op {}

# # ## ### ##### ######## ############# #####################
## Ready

package provide pt::peg::op 1.1.0
return







|

369
370
371
372
373
374
375
376
377
## State / Configuration :: n/a

namespace eval ::pt::peg::op {}

# # ## ### ##### ######## ############# #####################
## Ready

package provide pt::peg::op 1.0.1
return

Deleted modules/pt/pt_peg_op.test.

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
# -*- tcl -*-
# pe_peg_op.test:  tests for the pt::peg::op package.
#
# Copyright (c) 2018 by Stefan Sobernig <stefan.sobernig@wu.ac.at>
# All rights reserved.
#

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0

support {
    useAccel [useTcllibC] struct/sets.tcl struct::set
    TestAccelInit                         struct::set

    use fileutil/fileutil.tcl  fileutil ; # For tests/common
    use snit/snit.tcl          snit

    use pt/pt_pegrammar.tcl     pt::peg
    use pt/pt_peg_container.tcl pt::peg::container
    use pt/pt_pexpr_op.tcl      pt::pe::op

    source [localPath tests/common]
}
testing {
    useLocal pt_peg_op.tcl pt::peg::op
}

# -------------------------------------------------------------------------

set mytestdir tests/data

# -------------------------------------------------------------------------

TestAccelDo struct::set setimpl {
    source [localPath tests/pt_peg_op.tests]
}

#----------------------------------------------------------------------

unset mytestdir
TestAccelExit struct::set
testsuiteCleanup
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































































































Changes to modules/pt/pt_pexpr_op.tcl.

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
89
90
91
92
93
94
# # ## ### ##### ######## #############
## Internals

proc ::pt::pe::op::Drop {dropset pe op arguments} {
    if {$op eq "n"} {
	lassign $arguments symbol
	if {[struct::set contains $dropset $symbol]} {

	    set pe @@

	}

    } elseif {$op in {/ x * + ? & !}} {


	set newarg {}
	foreach a $arguments {
	    if {$a eq "@@"} continue
	    lappend newarg $a
	}

	if {![llength $newarg]} {
	    # Nothing remained, drop the whole expression
	    set pe [pt::pe epsilon]
	} elseif {[llength $newarg] < [llength $arguments]} {
	    # Some removed, construct a new expression
	    if {$op eq "/"} {
		set pe [list $op {*}$newarg]
	    } else {
		set pe @@
	    }
	} ; # None removed, no change.
    }

    return $pe
}

proc ::pt::pe::op::Rename {nt ntnew pe op arguments} {
    #puts R($op)/$arguments/
    if {($op eq "n") && ([lindex $arguments 0] eq $nt)} {
	return [pt::pe nonterminal $ntnew]







>
|
>

>
|
>
>
|
|
|
|
|
>
|
|
|
|
|
<

|
<
|
<

>







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

89

90
91
92
93
94
95
96
97
98
# # ## ### ##### ######## #############
## Internals

proc ::pt::pe::op::Drop {dropset pe op arguments} {
    if {$op eq "n"} {
	lassign $arguments symbol
	if {[struct::set contains $dropset $symbol]} {
	    return @@
	} else {
	    return $pe
	}
    }

    switch -exact -- $op {
	/ - x - * - + - ? - & - ! {
	    set newarg {}
	    foreach a $arguments {
		if {$a eq "@@"} continue
		lappend newarg $a
	    }

	    if {![llength $newarg]} {
		# Nothing remained, drop the whole expression
		return [pt::pe epsilon]
	    } elseif {[llength $newarg] < [llength $argument]} {
		# Some removed, construct a new expression

		set pe [list $op {*}$newarg]
	    } ; # None removed, no change.

	}

    }

    return $pe
}

proc ::pt::pe::op::Rename {nt ntnew pe op arguments} {
    #puts R($op)/$arguments/
    if {($op eq "n") && ([lindex $arguments 0] eq $nt)} {
	return [pt::pe nonterminal $ntnew]

Changes to modules/pt/pt_pgen.man.

1
2
3
4
5
6
7
8
9
[comment {-*- text -*- doctools manpage}]
[vset PGEN_VERSION 1.1]
[manpage_begin pt::pgen n [vset PGEN_VERSION]]
[include include/module.inc]
[titledesc {Parser Generator}]
[require pt::pgen [opt [vset PGEN_VERSION]]]
[description]
[include include/ref_intro.inc]


|







1
2
3
4
5
6
7
8
9
[comment {-*- text -*- doctools manpage}]
[vset PGEN_VERSION 1.0.2]
[manpage_begin pt::pgen n [vset PGEN_VERSION]]
[include include/module.inc]
[titledesc {Parser Generator}]
[require pt::pgen [opt [vset PGEN_VERSION]]]
[description]
[include include/ref_intro.inc]

Changes to modules/pt/pt_pgen.tcl.

227
228
229
230
231
232
233
234
    }
    return $res
}

# ### ### ### ######### ######### #########
## Package Management

package provide pt::pgen 1.1







|
227
228
229
230
231
232
233
234
    }
    return $res
}

# ### ### ### ######### ######### #########
## Package Management

package provide pt::pgen 1.0.3

Changes to modules/pt/pt_rdengine_nx.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# -*- tcl -*-
#
# Copyright (c) 2016-2018 by Stefan Sobernig <stefan.sobernig@wu.ac.at>

# # ## ### ##### ######## ############# #####################
## Package description

## An NX implementation of the PackRat Machine (PARAM), a virtual
## machine on top of which parsers for Parsing Expression Grammars
## (PEGs) can be realized. This implementation is tied to the PARAM's
## TclOO implementation and it is automatically derived from the
## corresponding TclOO class (pt::rde::oo) upon loading the package.

# # ## ### ##### ######## ############# #####################
## Requisites

package require pt::rde::oo
package req nx

namespace eval ::pt::rde {

  ##
  ## Helper: An NX metaclass and class generator, which allows for
  ## deriving an NX class from the ::pt::rde::oo class.
  ##
  
  nx::Class create ClassFactory -superclass nx::Class {
    :property prototype:required

    :method mkMethod {name vars params body tmpl} {
      set objVars [list]
      set debugObjVars [list]
      foreach v $vars {
        if {[string first $v $body] > -1} {
          lappend objVars :$v $v
        } else {
          lappend debugObjVars :$v $v
        }
      }
      
      if {[llength $objVars]} {
        set objVars [list upvar 0 {*}$objVars]
      }

      if {[llength $debugObjVars]} {
        set debugObjVars [list debug.pt/rdengine \
                              "\[[list upvar 0 {*}$debugObjVars]\]"]
      }

      set mappings [list @body@ $body @objVars@ $objVars \
                        @debugObjVars@ $debugObjVars @params@ $params]
      
      set finalBody [string map $mappings $tmpl]

      :method $name $params $finalBody
      
    }; # mkMethod
    
    :method init {args} {

      namespace eval [namespace qualifier [self]] {
        namespace import ::nsf::my
      }



      :method debugPrep {cls} {
        :object method TraceInitialization [list [list cls $cls]] {
          set mh [$cls info methods -callprotection all TraceInitialization]
          if {$mh ne ""} {

            set script [$cls info method body $mh]
            apply [list {} $script [self]]
          }
        }
        return
      }

      :method debugOn {} {
        interp alias {} [namespace current]::Instruction {} [self]::Instruction
        interp alias {} [namespace current]::InstReturn {} [self]::InstReturn
        interp alias {} [namespace current]::State {} [self]::State
        interp alias {} [namespace current]::TraceSetupStacks {} [self]::TraceSetupStacks
        return
      }

      :method debugOff {} {
        interp alias {} [namespace current]::Instruction {} 
        interp alias {} [namespace current]::InstReturn {} 
        interp alias {} [namespace current]::State {} 
        interp alias {} [namespace current]::TraceSetupStacks {}
        return
      }

      set vars [info class variables ${:prototype}]
      
      ## clone constructor
      lassign [info class constructor ${:prototype}] ctorParams ctorBody

      :mkMethod init $vars $ctorParams $ctorBody {
        debug.pt/rdengine {[:debugPrep [current class]][self] TraceInitialization indirection}
        :require namespace;
        apply [list {} {
          namespace import ::nsf::my
          @objVars@
          @body@
        } [self]]
        
        debug.pt/rdengine {[:debugOn][self] DebugCmd indirection on}
      }

      :public method destroy {args} {
        debug.pt/rdengine {[:debugOff][self] DebugCmd indirection off}
        next
      }

      ## clone all methods
      foreach m [info class methods ${:prototype} -private] {
        lassign [info class definition ${:prototype} $m] params body

        :mkMethod $m $vars $params $body {
          @objVars@
          @debugObjVars@
          @body@
        }
      }
      
      return
    }; # init
  }; # ClassFactory

  ##
  ## ::pt::rde::nx:
  ##
  ## The NX derivative of ::pt::rde::oo, to be inherited
  ## by the generated grammar class.
  ##
  
  ClassFactory create nx -prototype ::pt::rde::oo

  namespace export nx
}

package provide pt::rde::nx [package req pt::rde::oo].1.1

# Local variables:
#    mode: tcl
#    tcl-indent-level: 2
#    indent-tabs-mode: nil
# End:



|




|
|
<
<
<









|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
|
|

>
>
|
|
|
<
>
|
<
<
<
<
<
|
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
|
|
|
<
<
|
<
<
<
<
<
<
<
<
|
<
<
|
<
<
<
<
|
<
<
<
<
<
<
<
|
|
|
|
<
<
<

|
|
|
|
|
|
|
|
|
<


|
<
<
<
<
<
<
<
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







# -*- tcl -*-
#
# Copyright (c) 2016 by Stefan Sobernig <stefan.sobernig@wu.ac.at>

# # ## ### ##### ######## ############# #####################
## Package description

## ...





# # ## ### ##### ######## ############# #####################
## Requisites

package require pt::rde::oo
package req nx

namespace eval ::pt::rde {

    ##
    ## Helper: An NX metaclass, which allows for deriving an NX class from
    ## a given TclOO class.
    ##
    
    nx::Class create ClassFactory -superclass nx::Class {
	:property prototype:required






























	:method init {args} {
	    :alias instvar ::nsf::methods::object::instvar
	    namespace eval [namespace qualifier [self]] {
		namespace import ::nsf::my
	    }

	    ## clone constructor
	    lassign [info class constructor ${:prototype}] ctorParams ctorBody
	    :method init $ctorParams [:injectVars $ctorBody]
	    ## clone all methods
	    foreach m [info class methods ${:prototype} -private] {

		lassign [info class definition ${:prototype} $m] params body
		:method $m $params [:injectVars $body]





	    }






	}
	:method injectVars {body} {







	    if {![info exists :vars]} {
		set :vars [info class variables ${:prototype}]
	    }


	    if {[llength ${:vars}]} {








		append tmp [list :instvar {*}${:vars}] "\n" $body;


		return $tmp




	    } else {







		return $body;
	    }
	}
    }




    ##
    ## ::pt::rde::nx:
    ##
    ## The NX derivative of ::pt::rde::oo, to be inherited
    ## by the generated grammar class.
    ##
    
    ClassFactory create nx -prototype ::pt::rde::oo
    

}

package provide pt::rde::nx [package req pt::rde::oo]







Changes to modules/pt/pt_rdengine_oo.tcl.

546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
	if {$myok} {
	    $mystackloc pop
	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackmark push [$mystackast size]
	set myloc [$mystackloc peek]
	$mystackerr push $myerror

	debug.pt/rdengine {[InstReturn]}
	return
    }

    method si:valuevoid_branch {} {
	debug.pt/rdengine {[Instruction si:valuevoid_branch]}







|







546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
	if {$myok} {
	    $mystackloc pop
	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackmark push [$mystackast size]
	set myloc [$mystackloc peek]
	$mystackerr push {}

	debug.pt/rdengine {[InstReturn]}
	return
    }

    method si:valuevoid_branch {} {
	debug.pt/rdengine {[Instruction si:valuevoid_branch]}
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
	if {$myok} {
	    $mystackloc pop
	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackast trim* $mark
	set myloc [$mystackloc peek]
	$mystackerr push $myerror

	debug.pt/rdengine {[InstReturn]}
	return
    }

    method si:valuevalue_branch {} {
	debug.pt/rdengine {[Instruction si:valuevalue_branch]}







|







587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
	if {$myok} {
	    $mystackloc pop
	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackast trim* $mark
	set myloc [$mystackloc peek]
	$mystackerr push {}

	debug.pt/rdengine {[InstReturn]}
	return
    }

    method si:valuevalue_branch {} {
	debug.pt/rdengine {[Instruction si:valuevalue_branch]}
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
	    $mystackloc pop

	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackast trim* [$mystackmark peek]
	set myloc [$mystackloc peek]
	$mystackerr push $myerror

	debug.pt/rdengine {[InstReturn]}
	return
    }

    # - -- --- ----- -------- ------------- ---------------------








|







630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
	    $mystackloc pop

	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackast trim* [$mystackmark peek]
	set myloc [$mystackloc peek]
	$mystackerr push {}

	debug.pt/rdengine {[InstReturn]}
	return
    }

    # - -- --- ----- -------- ------------- ---------------------

781
782
783
784
785
786
787
788

789
790
791
792
793
794
795
796
797
798
799
800
	# from a regular sequence of si:next_char instructions. The
	# error location will be the start of the string token we
	# wanted to match, and the message will contain the entire
	# string token. In the regular sequence we would see the exact
	# point of the mismatch instead, with the message containing
	# the expected character.

	if {$tok eq $lex} {

	    set myok 1
	    set myloc $last
	    set myerror {}
	} else {
	    set myok 0
	    set myerror [list $myloc [list [list str $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }








|
>
|



<







781
782
783
784
785
786
787
788
789
790
791
792
793

794
795
796
797
798
799
800
	# from a regular sequence of si:next_char instructions. The
	# error location will be the start of the string token we
	# wanted to match, and the message will contain the entire
	# string token. In the regular sequence we would see the exact
	# point of the mismatch instead, with the message containing
	# the expected character.

	set myok [expr {$tok eq $lex}]

	if {$myok} {
	    set myloc $last
	    set myerror {}
	} else {

	    set myerror [list $myloc [list [list str $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }

815
816
817
818
819
820
821

822
823
824
825
826
827
828
829
830
831
832
833
834
	    return
	}
	set mycurrent [string index $mytoken $myloc]

	# Note what is needle versus hay. The token, i.e. the string
	# of allowed characters is the hay in which the current
	# character is looked, making it the needle.


	if {[string first $mycurrent $tok] >= 0} {
	    set myok 1
	    set myerror {}
	} else {
	    set myok 0
	    set myerror [list $myloc [list [list cl $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }








>

<
|


<







815
816
817
818
819
820
821
822
823

824
825
826

827
828
829
830
831
832
833
	    return
	}
	set mycurrent [string index $mytoken $myloc]

	# Note what is needle versus hay. The token, i.e. the string
	# of allowed characters is the hay in which the current
	# character is looked, making it the needle.
	set myok [expr {[string first $mycurrent $tok] >= 0}]


	if {$myok} {
	    set myerror {}
	} else {

	    set myerror [list $myloc [list [list cl $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }

844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
	    set myerror [list $myloc [list [list t $tok]]]
	    # i:fail_return
	    debug.pt/rdengine {[InstReturn]}
	    return
	}
	set mycurrent [string index $mytoken $myloc]

	if {$tok eq $mycurrent} {
	    set myok 1
	    set myerror {}
	} else {
	    set myok 0
	    set myerror [list $myloc [list [list t $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }








|
|


<







843
844
845
846
847
848
849
850
851
852
853

854
855
856
857
858
859
860
	    set myerror [list $myloc [list [list t $tok]]]
	    # i:fail_return
	    debug.pt/rdengine {[InstReturn]}
	    return
	}
	set mycurrent [string index $mytoken $myloc]

	set myok [expr {$tok eq $mycurrent}]
	if {$myok} {
	    set myerror {}
	} else {

	    set myerror [list $myloc [list [list t $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }

872
873
874
875
876
877
878

879
880

881
882
883
884
885
886
887
888
889
890
891
	    set myerror [list $myloc [list [list .. $toks $toke]]]
	    # i:fail_return
	    debug.pt/rdengine {[InstReturn]}
	    return
	}
	set mycurrent [string index $mytoken $myloc]


	if {([string compare $toks $mycurrent] <= 0) &&
	    ([string compare $mycurrent $toke] <= 0)} {

	    set myok 1
	    set myerror {}
	} else {
	    set myok 0
	    set myerror [list $myloc [list [pt::pe range $toks $toke]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }








>
|
|
>
|


<







870
871
872
873
874
875
876
877
878
879
880
881
882
883

884
885
886
887
888
889
890
	    set myerror [list $myloc [list [list .. $toks $toke]]]
	    # i:fail_return
	    debug.pt/rdengine {[InstReturn]}
	    return
	}
	set mycurrent [string index $mytoken $myloc]

	set myok [expr {
			([string compare $toks $mycurrent] <= 0) &&
			([string compare $mycurrent $toke] <= 0)
		    }] ; # {}
	if {$myok} {
	    set myerror {}
	} else {

	    set myerror [list $myloc [list [pt::pe range $toks $toke]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }

Changes to modules/pt/pt_rdengine_tcl.tcl.

534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
	if {$myok} {
	    $mystackloc pop
	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackmark push [$mystackast size]
	set myloc [$mystackloc peek]
	$mystackerr push $myerror

	debug.pt/rdengine {[InstReturn]}
	return
    }

    method si:valuevoid_branch {} {
	debug.pt/rdengine {[Instruction si:valuevoid_branch]}







|







534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
	if {$myok} {
	    $mystackloc pop
	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackmark push [$mystackast size]
	set myloc [$mystackloc peek]
	$mystackerr push {}

	debug.pt/rdengine {[InstReturn]}
	return
    }

    method si:valuevoid_branch {} {
	debug.pt/rdengine {[Instruction si:valuevoid_branch]}
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
	if {$myok} {
	    $mystackloc pop
	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackast trim* $mark
	set myloc [$mystackloc peek]
	$mystackerr push $myerror

	debug.pt/rdengine {[InstReturn]}
	return
    }

    method si:valuevalue_branch {} {
	debug.pt/rdengine {[Instruction si:valuevalue_branch]}







|







575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
	if {$myok} {
	    $mystackloc pop
	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackast trim* $mark
	set myloc [$mystackloc peek]
	$mystackerr push {}

	debug.pt/rdengine {[InstReturn]}
	return
    }

    method si:valuevalue_branch {} {
	debug.pt/rdengine {[Instruction si:valuevalue_branch]}
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
	    $mystackloc pop

	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackast trim* [$mystackmark peek]
	set myloc [$mystackloc peek]
	$mystackerr push $myerror

	debug.pt/rdengine {[InstReturn]}
	return
    }

    # - -- --- ----- -------- ------------- ---------------------








|







618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
	    $mystackloc pop

	    debug.pt/rdengine {[InstReturn]}
	    return -code return
	}
	$mystackast trim* [$mystackmark peek]
	set myloc [$mystackloc peek]
	$mystackerr push {}

	debug.pt/rdengine {[InstReturn]}
	return
    }

    # - -- --- ----- -------- ------------- ---------------------

769
770
771
772
773
774
775
776

777
778
779
780
781
782
783
784
785
786
787
788
	# from a regular sequence of si:next_char instructions. The
	# error location will be the start of the string token we
	# wanted to match, and the message will contain the entire
	# string token. In the regular sequence we would see the exact
	# point of the mismatch instead, with the message containing
	# the expected character.

	if {$tok eq $lex} {

	    set myok 1
	    set myloc $last
	    set myerror {}
	} else {
	    set myok 0
	    set myerror [list $myloc [list [pt::pe str $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }








|
>
|



<







769
770
771
772
773
774
775
776
777
778
779
780
781

782
783
784
785
786
787
788
	# from a regular sequence of si:next_char instructions. The
	# error location will be the start of the string token we
	# wanted to match, and the message will contain the entire
	# string token. In the regular sequence we would see the exact
	# point of the mismatch instead, with the message containing
	# the expected character.

	set myok [expr {$tok eq $lex}]

	if {$myok} {
	    set myloc $last
	    set myerror {}
	} else {

	    set myerror [list $myloc [list [pt::pe str $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }

803
804
805
806
807
808
809

810
811
812
813
814
815
816
817
818
819
820
821
822
	    return
	}
	set mycurrent [string index $mytoken $myloc]

	# Note what is needle versus hay. The token, i.e. the string
	# of allowed characters is the hay in which the current
	# character is looked, making it the needle.


	if {[string first $mycurrent $tok] >= 0} {
	    set myok 1
	    set myerror {}
	} else {
	    set myok 0
	    set myerror [list $myloc [list [pt::pe class $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }








>

<
|


<







803
804
805
806
807
808
809
810
811

812
813
814

815
816
817
818
819
820
821
	    return
	}
	set mycurrent [string index $mytoken $myloc]

	# Note what is needle versus hay. The token, i.e. the string
	# of allowed characters is the hay in which the current
	# character is looked, making it the needle.
	set myok [expr {[string first $mycurrent $tok] >= 0}]


	if {$myok} {
	    set myerror {}
	} else {

	    set myerror [list $myloc [list [pt::pe class $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }

832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
	    set myerror [list $myloc [list [pt::pe terminal $tok]]]
	    # i:fail_return
	    debug.pt/rdengine {[InstReturn]}
	    return
	}
	set mycurrent [string index $mytoken $myloc]

	if {$tok eq $mycurrent} {
	    set myok 1
	    set myerror {}
	} else {
	    set myok 0
	    set myerror [list $myloc [list [pt::pe terminal $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }








|
|


<







831
832
833
834
835
836
837
838
839
840
841

842
843
844
845
846
847
848
	    set myerror [list $myloc [list [pt::pe terminal $tok]]]
	    # i:fail_return
	    debug.pt/rdengine {[InstReturn]}
	    return
	}
	set mycurrent [string index $mytoken $myloc]

	set myok [expr {$tok eq $mycurrent}]
	if {$myok} {
	    set myerror {}
	} else {

	    set myerror [list $myloc [list [pt::pe terminal $tok]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }

860
861
862
863
864
865
866

867
868

869
870
871
872
873
874
875
876
877
878
879
	    set myerror [list $myloc [list [pt::pe range $toks $toke]]]
	    # i:fail_return
	    debug.pt/rdengine {[InstReturn]}
	    return
	}
	set mycurrent [string index $mytoken $myloc]


	if {([string compare $toks $mycurrent] <= 0) &&
	    ([string compare $mycurrent $toke] <= 0)} {

	    set myok 1
	    set myerror {}
	} else {
	    set myok 0
	    set myerror [list $myloc [list [pt::pe range $toks $toke]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }








>
|
|
>
|


<







858
859
860
861
862
863
864
865
866
867
868
869
870
871

872
873
874
875
876
877
878
	    set myerror [list $myloc [list [pt::pe range $toks $toke]]]
	    # i:fail_return
	    debug.pt/rdengine {[InstReturn]}
	    return
	}
	set mycurrent [string index $mytoken $myloc]

	set myok [expr {
			([string compare $toks $mycurrent] <= 0) &&
			([string compare $mycurrent $toke] <= 0)
		    }] ; # {}
	if {$myok} {
	    set myerror {}
	} else {

	    set myerror [list $myloc [list [pt::pe range $toks $toke]]]
	    incr myloc -1
	}
	debug.pt/rdengine {[InstReturn]}
	return
    }

Changes to modules/pt/pt_tclparam_config_nx.man.

1
2
3
4
5
6
7
8
[vset VERSION 1.0.1]
[comment {-*- text -*- doctools manpage}]
[manpage_begin pt::tclparam::configuration::nx n [vset VERSION]]
[include include/module.inc]
[titledesc {Tcl/PARAM, Canned configuration, NX}]
[require pt::tclparam::configuration::nx [opt [vset VERSION]]]
[description]
[include include/ref_intro.inc]
|







1
2
3
4
5
6
7
8
[vset VERSION 1.0.0]
[comment {-*- text -*- doctools manpage}]
[manpage_begin pt::tclparam::configuration::nx n [vset VERSION]]
[include include/module.inc]
[titledesc {Tcl/PARAM, Canned configuration, NX}]
[require pt::tclparam::configuration::nx [opt [vset VERSION]]]
[description]
[include include/ref_intro.inc]

Changes to modules/pt/pt_tclparam_config_nx.tcl.

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
	    # # ## ### ###### ######## #############
	}

	# # ## ### ##### ######## ############# #####################
	## Ready

	package provide @@PKG@@ @@VERSION@@
	return
    }]]

    return
}

# # ## ### ##### ######## #############

namespace eval ::pt::tclparam::configuration::nx {}

# # ## ### ##### ######## ############# #####################
## Ready

package provide pt::tclparam::configuration::nx 1.0.1
return







|












|

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
	    # # ## ### ###### ######## #############
	}

	# # ## ### ##### ######## ############# #####################
	## Ready

	package provide @@PKG@@ @@VERSION@@
	# return
    }]]

    return
}

# # ## ### ##### ######## #############

namespace eval ::pt::tclparam::configuration::nx {}

# # ## ### ##### ######## ############# #####################
## Ready

package provide pt::tclparam::configuration::nx 1.0.0
return

Changes to modules/pt/rde_critcl/param.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
 * = = == === ===== ======== ============= =====================
 * == pt::rde (critcl) - Data Structures - PARAM architectural state.
 */

#include <param.h> /* Public and private APIs */
#include <stack.h> /* Stack handling */
#include <tc.h>    /* Token cache handling */
#include <util.h>  /* Allocation utilities */
#include <string.h>
#include <ctype.h>  /* is... */
#include <stdlib.h> /* qsort */

/*
 * = = == === ===== ======== ============= =====================
 */

typedef struct RDE_PARAM_ {











<
<







1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16
17
/*
 * = = == === ===== ======== ============= =====================
 * == pt::rde (critcl) - Data Structures - PARAM architectural state.
 */

#include <param.h> /* Public and private APIs */
#include <stack.h> /* Stack handling */
#include <tc.h>    /* Token cache handling */
#include <util.h>  /* Allocation utilities */
#include <string.h>



/*
 * = = == === ===== ======== ============= =====================
 */

typedef struct RDE_PARAM_ {

Deleted modules/pt/tests/data/gr/def/49_ticket-3ed39a451f.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
PEG Tiny (Proc)
        Proc            <- CmdSeq !. ;
 	CmdSeq 		<- Cmd SEMICOLON (Cmd SEMICOLON)*;
	Cmd 		<- Skip ((IfCmd / RepeatCmd / AssignCmd / ReadCmd / WriteCmd)) Skip;
	IfCmd 		<- 'if' Exp 'then' CmdSeq ('else' CmdSeq)? 'end';
	RepeatCmd 	<- 'repeat' CmdSeq 'until' Exp;
	AssignCmd 	<- Name ASSIGNMENT Exp;
	ReadCmd 	<- 'read' Skip Name;
	WriteCmd 	<- 'write' Skip Exp;
void:   SEMICOLON       <- Skip ';' Skip;
leaf:   ASSIGNMENT      <- Skip ':=' Skip;
	Name 		<- 'n' / 'f';
	Exp 		<- Operand Skip (('*' / '-' / '+' / '>' / '<') Operand)?;
	Operand 	<- Skip (Name / <digit>) Skip;
void:   Skip 	        <- <space>*;
END;
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































Deleted modules/pt/tests/data/gr/fail-ticket-3ed39a451f-container-res/0_tinyProg.

1
1 {pt::rde 50 {space {t {;}}}}
<


Deleted modules/pt/tests/data/gr/fail-ticket-3ed39a451f-critcl-res/0_tinyProg.

1
1 {pt::rde 50 {space {t {;}}}}
<


Deleted modules/pt/tests/data/gr/fail-ticket-3ed39a451f-oo-res/0_tinyProg.

1
1 {pt::rde 50 {space {t {;}}}}
<


Deleted modules/pt/tests/data/gr/fail-ticket-3ed39a451f-snit-res/0_tinyProg.

1
1 {pt::rde 50 {space {t {;}}}}
<


Deleted modules/pt/tests/data/gr/fail-ticket-3ed39a451f/0_tinyProg.

1
2
3
4
5
6
7
n := 5;
f := 1;
repeat
  f := f * n;
  n := n - 1
until n < 1;
write f;
<
<
<
<
<
<
<














Deleted modules/pt/tests/data/gr/ok-ticket-3ed39a451f-res/0_tinyProg.

1
Proc 0 71 {CmdSeq 0 71 {Cmd 0 5 {AssignCmd 0 5 {Name 0 0} {ASSIGNMENT 1 4} {Exp 5 5 {Operand 5 5}}}} {Cmd 8 13 {AssignCmd 8 13 {Name 8 8} {ASSIGNMENT 9 12} {Exp 13 13 {Operand 13 13}}}} {Cmd 16 61 {RepeatCmd 16 61 {CmdSeq 22 50 {Cmd 22 34 {AssignCmd 25 34 {Name 25 25} {ASSIGNMENT 26 29} {Exp 30 34 {Operand 30 31 {Name 30 30}} {Operand 33 34 {Name 34 34}}}}} {Cmd 39 48 {AssignCmd 39 48 {Name 39 39} {ASSIGNMENT 40 43} {Exp 44 48 {Operand 44 45 {Name 44 44}} {Operand 47 48}}}}} {Exp 56 61 {Operand 56 58 {Name 57 57}} {Operand 60 61}}}} {Cmd 64 70 {WriteCmd 64 70 {Exp 70 70 {Operand 70 70 {Name 70 70}}}}}}
<


Deleted modules/pt/tests/data/gr/ok-ticket-3ed39a451f/0_tinyProg.

1
2
3
4
5
6
7
n := 5;
f := 1;
repeat
  f := f * n;
  n := n - 1;
until n < 1;
write f;
<
<
<
<
<
<
<














Changes to modules/pt/tests/data/ok/peg_cparam-critcl/0_basic_arithmetic.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/10_notahead.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/11_epsilon.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/1_functions.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/27_ticket_4a4e443ce9.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/2_fun_arithmetic.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/3_peg_itself.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/4_choice.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/5_sequence.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/6_optional.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/7_kleene.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/8_pkleene.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_cparam-critcl/9_ahead.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>
	#include <ctype.h>  /* is... */
	#include <stdlib.h> /* qsort */
	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE







<
<







42
43
44
45
46
47
48


49
50
51
52
53
54
55
    # Tcl interface layer is ignored.  This generated parser
    # provides its own layer for that.

    critcl::ccode {
	/* -*- c -*- */

	#include <string.h>


	#define SCOPE static

#line 1 "rde_critcl/util.h"

	#ifndef _RDE_UTIL_H
	#define _RDE_UTIL_H 1
	#ifndef SCOPE

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/0_basic_arithmetic.

340
341
342
343
344
345
346
347
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
340
341
342
343
344
345
346
347
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/10_notahead.

94
95
96
97
98
99
100
101
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
94
95
96
97
98
99
100
101
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/11_epsilon.

67
68
69
70
71
72
73
74
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
67
68
69
70
71
72
73
74
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/1_functions.

112
113
114
115
116
117
118
119
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
112
113
114
115
116
117
118
119
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/27_ticket_4a4e443ce9.

237
238
239
240
241
242
243
244
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
237
238
239
240
241
242
243
244
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/2_fun_arithmetic.

389
390
391
392
393
394
395
396
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
389
390
391
392
393
394
395
396
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/3_peg_itself.

2406
2407
2408
2409
2410
2411
2412
2413
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
2406
2407
2408
2409
2410
2411
2412
2413
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/4_choice.

54
55
56
57
58
59
60
61
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
54
55
56
57
58
59
60
61
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/5_sequence.

54
55
56
57
58
59
60
61
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
54
55
56
57
58
59
60
61
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/6_optional.

64
65
66
67
68
69
70
71
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
64
65
66
67
68
69
70
71
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/7_kleene.

66
67
68
69
70
71
72
73
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
66
67
68
69
70
71
72
73
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/8_pkleene.

69
70
71
72
73
74
75
76
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
69
70
71
72
73
74
75
76
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/9_ahead.

94
95
96
97
98
99
100
101
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
return







|
94
95
96
97
98
99
100
101
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return

Changes to modules/pt/tests/pt_peg_export.tests.

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

test pt-peg-export-set:${setimpl}-5.0 {configuration names, wrong#args} -setup {
    pt::peg::export E
} -body {
    E configuration names X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodnames type selfns win self"}

test pt-peg-export-set:${setimpl}-6.0 {configuration get, wrong#args} -setup {
    pt::peg::export E
} -body {
    E configuration get X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodget type selfns win self"}

test pt-peg-export-set:${setimpl}-7.0 {configuration set, wrong#args} -setup {
    pt::peg::export E
} -body {
    E configuration set
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test pt-peg-export-set:${setimpl}-7.1 {configuration set, wrong#args} -setup {
    pt::peg::export E
} -body {
    E configuration set N V X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

# -------------------------------------------------------------------------

test pt-peg-export-set:${setimpl}-12.0 {configuration set, define single var} -setup {
    pt::peg::export E
} -body {
    E configuration set N V







|







|







|







|







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

test pt-peg-export-set:${setimpl}-5.0 {configuration names, wrong#args} -setup {
    pt::peg::export E
} -body {
    E configuration names X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::configuration::Snit_methodnames type selfns win self"}

test pt-peg-export-set:${setimpl}-6.0 {configuration get, wrong#args} -setup {
    pt::peg::export E
} -body {
    E configuration get X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::configuration::Snit_methodget type selfns win self"}

test pt-peg-export-set:${setimpl}-7.0 {configuration set, wrong#args} -setup {
    pt::peg::export E
} -body {
    E configuration set
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::configuration::Snit_methodset type selfns win self name ?value?"}

test pt-peg-export-set:${setimpl}-7.1 {configuration set, wrong#args} -setup {
    pt::peg::export E
} -body {
    E configuration set N V X
} -cleanup {
    E destroy
} -returnCodes error -result {wrong # args: should be "::configuration::Snit_methodset type selfns win self name ?value?"}

# -------------------------------------------------------------------------

test pt-peg-export-set:${setimpl}-12.0 {configuration set, define single var} -setup {
    pt::peg::export E
} -body {
    E configuration set N V

Changes to modules/pt/tests/pt_peg_import.tests.

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
    I import object file O P F XXX
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::pt::peg::import::Snit_hmethodimport_object_file type selfns win self obj path ?format?"}

# config unset - accepts any number of arguments.

# -------------------------------------------------------------------------
## `include` component, provided via fileutil::paths, search path for includes

test pt-peg-import-5.0 {include paths, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include paths X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodpaths type selfns win self"}

test pt-peg-import-6.0 {include clear, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include clear X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodclear type selfns win self"}

test pt-peg-import-7.0 {include add, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include add
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test pt-peg-import-7.1 {include add, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include add P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodadd type selfns win self path"}

test pt-peg-import-8.0 {include remove, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include remove
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

test pt-peg-import-8.1 {include remove, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include remove P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::fileutil::paths::Snit_methodremove type selfns win self path"}

# -------------------------------------------------------------------------

test pt-peg-import9.0 {include paths, empty} -setup {
    pt::peg::import I
} -body {
    I include paths







<
<
<






|







|







|







|







|







|







78
79
80
81
82
83
84



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
    I import object file O P F XXX
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::pt::peg::import::Snit_hmethodimport_object_file type selfns win self obj path ?format?"}

# config unset - accepts any number of arguments.




test pt-peg-import-5.0 {include paths, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include paths X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::paths::Snit_methodpaths type selfns win self"}

test pt-peg-import-6.0 {include clear, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include clear X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::paths::Snit_methodclear type selfns win self"}

test pt-peg-import-7.0 {include add, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include add
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::paths::Snit_methodadd type selfns win self path"}

test pt-peg-import-7.1 {include add, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include add P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::paths::Snit_methodadd type selfns win self path"}

test pt-peg-import-8.0 {include remove, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include remove
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::paths::Snit_methodremove type selfns win self path"}

test pt-peg-import-8.1 {include remove, wrong#args} -setup {
    pt::peg::import I
} -body {
    I include remove P X
} -cleanup {
    I destroy
} -returnCodes error -result {wrong # args: should be "::paths::Snit_methodremove type selfns win self path"}

# -------------------------------------------------------------------------

test pt-peg-import9.0 {include paths, empty} -setup {
    pt::peg::import I
} -body {
    I include paths

Deleted modules/pt/tests/pt_peg_op.tests.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
# -*- tcl -*-
# Testsuite for pt::peg::op.
# Copyright (c) 2018 Stefan Sobernig <stefan.sobernig@wu.ac.at>

# [ok] drop unreachable
# [ok] drop unrealizable
# [ok] flatten
# [ok] minimize
# [ok] called
# [ok] realizable
# [ok] reachable
# [ok] dechain
# [ok] modeopt

# -------------------------------------------------------------------------
# Basic syntax

foreach op {
    called
    dechain
    flatten
    minimize
    modeopt
    reachable
    realizable
    {drop unreachable}
    {drop unrealizable}
} {
    test pt-peg-op-set:${setimpl}-${op}-0.0 "$op, wrong#args, not enough" -body {
	pt::peg::op {*}$op
    } -returnCodes error -result "wrong # args: should be \"pt::peg::op $op container\""

    test pt-peg-op-set:${setimpl}-${op}-0.1 "$op, wrong#args, too many" -body {
	pt::peg::op {*}$op Container X
    } -returnCodes error -result "wrong # args: should be \"pt::peg::op $op container\""
}

# -------------------------------------------------------------------------
# General support for testing transforms

proc sl {v} {
    # Remove comment lines
    regsub -all -line {^\s*#.*$} $v {}
}

proc g {s r} {
    # quick constructor of a grammar value
    return [list pt::grammar::peg [list rules $r start $s]]
}

proc TestTransformation {op data setImpl} {
    # Convert operation and data table into series of test cases
    set debug 0
    # Note, the `op` changes the container (here ::In) in-place.
    append bodyScript [list {*}::pt::peg::op::$op ::In] \;
    if {$debug} {
	append bodyScript "puts stderr \"ASIS \[::In       serialize\]\"" \;
	append bodyScript "puts stderr \"TOBE \[::Expected serialize\]\"" \;
    }
    # After the op, when all is well, the content of ::In should be
    # the same as ::Expected.
    append bodyScript "pt::peg equal \[::In serialize\] \[::Expected serialize\]" \;
    set n 1
    foreach {inStart inRulesSet outStart outRulesSet} [sl $data] {
	set testLabel "pt-peg-op-set:${setImpl}-[join $op -]-$n"
	if {$debug} {
	    puts stderr >>>>$testLabel<<<<
	}
	test $testLabel "OP '$op' vs. expected" -setup {
	    pt::peg::container ::In       deserialize [g $inStart  $inRulesSet]
	    pt::peg::container ::Expected deserialize [g $outStart $outRulesSet]
	} -body $bodyScript -result 1 -cleanup {
	    ::In       destroy
	    ::Expected destroy
	}
	incr n
    }
}

# -------------------------------------------------------------------------
# op: called

set n 0
foreach {inStart inRulesSet expectedSym} [sl {
    # --- 
    epsilon {}
    {{} {}}
    # ---
    {n S} {
	S {is {x {t A} {* {n SYM}} {t B} {n OTHER} {n SYM}} mode value}
	A {is {n A} mode value}
    }
    {{} S A A S {SYM OTHER}}
    # --- 
    {n S} {
	S {is {x {t A} {t B}} mode value}
	A {is {t a} mode value}
	B {is {t b} mode value}
    }
    {{} S A {} B {} S {}}
    # --- 
    {n S} {
	S {is {epsilon} mode value}
    }
    {{} S S {}}
}] {
    test pt-peg-op-set:${setimpl}-called.$n {op called} -setup {
	pt::peg::container ::In       deserialize [g $inStart  $inRulesSet]
    } -body {
	set r [pt::peg::op called ::In]
	dict filter $r script {key val} {
	    ::tcl::mathop::in $key [lsort [dict keys $r]]
	}
    } -cleanup {
	::In destroy
    } -result $expectedSym
    incr n
}
unset n

# -------------------------------------------------------------------------
# op: flatten

TestTransformation flatten {
    # --- stays as-is #1
    epsilon {}
    epsilon {}
    # --- stays as-is #2
    {n S} {
	S {is {n A} mode value}
	A {is {t a} mode value}
    }
    {n S} {
	S {is {n A} mode value}
	A {is {t a} mode value}
    }
    # --- flatten start expr and rules: single-element sequences
    {x {n S}} {
	S {is {x {n A}} mode value}
	A {is {n A} mode value}
    }
    {n S} {
	S {is {n A} mode value}
	A {is {n A} mode value}
    }
    # --- flatten start expr and rules: single-element choices
    {/ {n S}} {
	S {is {/ {n A}} mode value}
	A {is {n A} mode value}
    }
    {n S} {
	S {is {n A} mode value}
	A {is {n A} mode value}
    }
    # --- flatten start expr and rules: nested sequences
    {x {n S}} {
	S {is {x {n A} {x {n A} {n A}}} mode value}
	A {is {n A} mode value}
    }
    {n S} {
	S {is {x {n A} {n A} {n A}} mode value}
	A {is {n A} mode value}
    }
    # --- flatten start expr and rules: nested choices
    {x {n S}} {
	S {is {/ {n A} {/ {n A} {n A}}} mode value}
	A {is {n A} mode value}
    }
    {n S} {
	S {is {/ {n A} {n A} {n A}} mode value}
	A {is {n A} mode value}
    }
} $setimpl


# -------------------------------------------------------------------------
# op: realizable

set n 0
foreach {inStart inRulesSet expectedSym} [sl {
    # --- just start expression
    epsilon {}
    {{}}
    # -- all realizable, incl. start expression
    {n S} {
	S {is {n X} mode value}
	X {is {t x} mode leaf}
    }
    {{} S X}
    # -- not even start expression
    {n S} {
	S {is {n X} mode value}
	X {is {n X} mode value}
    }
    {}
    # -- not even start expression
    {n S} {
	S {is {n X} mode value}
	X {is {n X} mode value}
    }
    {}
    # -- X is unrealizable
    {n S} {
	S {is {? {n X}} mode value}
	X {is {n X} mode value}
    }
    {{} S}
    # -- X is unrealizable
    {n S} {
	S {is {/ {n X} {t y}} mode value}
	X {is {n X} mode value}
    }
    {{} S}
    # --  X <- 'A' 'B' X / 'C' X 'A'; X is unrealizable
    {n S} {
	S {is {/ {n X} {t y}} mode value}
	X {is {/ {x {t A} {t B} {n X}} {x {t C} {n X} {t A}}} mode value}
    }
    {{} S}
    # --  X <- 'A' 'B' X / 'C' X 'A' / 'x'; X *is* realizable
    {n S} {
	S {is {/ {n X} {t y}} mode value}
	X {is {/ {x {t A} {t B} {n X}} {x {t C} {n X} {t A}} {t x}} mode value}
    }
    {{} S X}
    # -- E is unrealizable
    {n S} {
	S {is {/ {x {n B} {t b}} {x {n C} {t c}} {x {n E} {t e}}} mode value}
	B {is {/ {x {n B} {t b}} {t b}} mode value}
	C {is {/ {x {n C} {t c}} {t c}} mode value}
	E {is {x {n E} {t e}} mode value}
    }
    {{} B C S}
    # -- S remains realizable (*)
    {n S} {
	S {is {* {n X}} mode value}
	X {is {n X} mode value}
    }
    {{} S}
}] {
    test pt-peg-op-set:${setimpl}-realizable.$n {op realizable} -setup {
	pt::peg::container ::In deserialize [g $inStart  $inRulesSet]
    } -body {
	lsort [pt::peg::op realizable ::In]
    } -cleanup {
	::In destroy
    } -result $expectedSym
    incr n
}
unset n


# -------------------------------------------------------------------------
# op: drop unrealizable

TestTransformation "drop unrealizable" {
    # (1) stays as-is
    epsilon {}
    epsilon {}
    # (2) S <-- X; X <-- X; => epsilon
    {n S} {
	S {is {n X} mode value}
	X {is {n X} mode value}
    }
    epsilon {}
    # (3) S <-- X?; X <-- X; => S <-- epsilon
    {n S} {
	S {is {? {n X}} mode value}
	X {is {n X} mode value}
    }
    {n S} {
	S {is epsilon mode value}
    }
    # (4) S <-- X*; X <-- X; => S <-- epsilon
    {n S} {
	S {is {* {n X}} mode value}
	X {is {n X} mode value}
    }
    {n S} {
	S {is epsilon mode value}
    }
    # (5) S <-- X 'y'; X <-- X; => epsilon
    {n S} {
	S {is {x {n X} {t y}} mode value}
	X {is {n X} mode value}
    }
    epsilon {}
    # (6) S <-- X / 'y'; X <-- X; => S <-- 'y' (unflattened!)
    {n S} {
	S {is {/ {n X} {t y}} mode value}
	X {is {n X} mode value}
    }
    {n S} {
	S {is {/ {t y}} mode value}
    }
} $setimpl


# -------------------------------------------------------------------------
# op: reachable

set n 0
foreach {inStart inRulesSet expectedSym} [sl {
    # --- none
    epsilon {}
    {}
    # -- D is not reachable
    {n S} {
	S {is {/ {x {n B} {t b}} {x {n C} {t c}} {x {n E} {t e}}} mode value}
	B {is {/ {x {n B} {t b}} {t b}} mode value}
	C {is {/ {x {n C} {t c}} {t c}} mode value}
	D {is {/ {x {n B} {t d}} {x {n C} {t d}} {t d}} mode value}
	E {is {x {n E} {t e}} mode value}
    }
    {B C E S}
    # -- all reachable
    {n S} {
     	S {is {/ {x {n A} {n B}} {t a}} mode value}
     	A {is {x {t a} {n A}} mode value}
	B {is {t a} mode leaf}
    }
    {A B S}
}] {
    test pt-peg-op-set:${setimpl}-reachable.$n {op reachable} -setup {
	pt::peg::container ::In deserialize [g $inStart  $inRulesSet]
    } -body {
	lsort [pt::peg::op reachable ::In]
    } -cleanup {
	::In destroy
    } -result $expectedSym
    incr n
}
unset n

# -------------------------------------------------------------------------
# op: drop unreachable

TestTransformation "drop unreachable" {
    # (1) stays as-is
    epsilon {}
    epsilon {}
    # S <-- a; A <-- a ==> S <-- a (A not reachable, dropped)
    {n S} {
     	S {is {t a} mode leaf}
     	A {is {t a} mode void}
    }
    {n S} {
     	S {is {t a} mode leaf}
    }
    # S <-- a; A <-- B; B <-- a ==> A, B unreachable, dropped
    {n S} {
     	S {is {t a} mode leaf}
     	A {is {n B} mode void}
     	B {is {t a} mode void}
    }
    {n S} {
     	S {is {t a} mode leaf}
    }
} $setimpl

# -------------------------------------------------------------------------
# op: dechain

TestTransformation dechain {
    # --- stays as-is
    epsilon {}
    epsilon {}
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {t b} mode value}
    }
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {t b} mode value}
    }
    # --- basic chain:  A <- B <- C (leaf) <- c |> A <- C (leaf) <- c
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {n C} mode value}
	C {is {t c} mode value}
    }
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n C} mode value}
	B {is {n C} mode value}
	C {is {t c} mode value}
    }
    # --- longer chain
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	E {is {t e} mode leaf}
	A {is {n B} mode value}
	D {is {n E} mode value}
	B {is {n C} mode value}
	C {is {n D} mode value}
    }
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n E} mode value}
	B {is {n D} mode value}
	C {is {n E} mode value}
	D {is {n E} mode value}
	E {is {t e} mode leaf}
    }
    # --- basic cycle:  A <- B <- A
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {n A} mode value}
    }
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {n A} mode value}
    }
    # --- basic (indirect) cycle:  A <- B <- C <- A
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {n C} mode value}
	C {is {n A} mode value}
    }
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {n C} mode value}
	C {is {n A} mode value}
    }
    # --- basic chain plus renaming for self-recursive leaves
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {n C} mode value}
	C {is {x {n C} {t c}} mode value}
    }
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n C} mode value}
	B {is {n C} mode value}
	C {is {x {n C} {t c}} mode value}
    }
    # {n S} {
    # 	S {is {x {n A} {t s}} mode value}
    # 	A {is {x {n A} {t c}} mode value}
    # 	B {is {x {n B} {t c}} mode value}
    # 	C {is {x {n C} {t c}} mode value}
    # }
    # --- start expression: {} <- Z <- S <- s |> {} <- Z <- s
    {n Z} {
	Z {is {n S} mode value}
    	S {is {t s} mode value}
    }
    {n Z} {
	Z {is {n S} mode value}
    	S {is {t s} mode value}
    }
    # --- TODO: start expression: {} <- Z <- S (leaf) <- s |> {} <- S <- s
    # {n Z} {
    # 	Z {is {n S} mode value}
    # 	S {is {t s} mode value}
    # }
    # {n S} {
    # 	S {is {t s} mode value}
    # }
    # --- broken chain #1 (undefined leaves?)
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
    }
    {n S} {
	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
    }
    # --- broken chain #2 (undefined leaves?)
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {n C} mode value}
    }
    {n S} {
	S {is {x {n A} {t s}} mode value}
	A {is {n C} mode value}
	B {is {n C} mode value}
    }
    # --- intermittents
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {n C} mode value}
	C {is {x {n X} {t c}} mode value}
	X {is {n Y} mode value}
	Y {is {n Z} mode value}
	Z {is {x {n Z} {t z}} mode value}
    }
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n C} mode value}
	B {is {n C} mode value}
	C {is {x {n X} {t c}} mode value}
	X {is {n Z} mode value}
	Y {is {n Z} mode value}
	Z {is {x {n Z} {t z}} mode value}
    }
    # {n S} {
    # 	S {is {x {n A} {t s}} mode value}
    # 	A {is {x {n X} {t c}} mode value}
    # 	B {is {x {n X} {t c}} mode value}
    # 	C {is {x {n X} {t c}} mode value}
    # 	X {is {x {n X} {t z}} mode value}
    # 	Y {is {x {n Y} {t z}} mode value}
    # 	Z {is {x {n Z} {t z}} mode value}
    # }
    # --- incompat modes #1a
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode void}
	B {is {n C} mode void}
	C {is {t c} mode value}
    }
    {n S} {
	S {is {x {n A} {t s}} mode value}
	A {is {n C} mode void}
	B {is {n C} mode void}
	C {is {t c} mode value}
    }
    # --- incompat modes #1b
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode void}
	B {is {n C} mode value}
	C {is {t c} mode value}
    }
    {n S} {
	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode void}
	B {is {n C} mode value}
	C {is {t c} mode value}
    }
    # X <- Z
    #
    # X     Z      dechain notes
    # value value| yes    | value is passed
    {n S} {
	S {is {n X} mode value}
	X {is {n Z} mode value}
	Z {is {t z} mode value}
    }
    {n S} {
	S {is {n Z} mode value}
	X {is {n Z} mode value}
	Z {is {t z} mode value}
    }
    # X     Z      dechain notes
    # leaf  value| no     | generated value was discarded, inlined doesn't. Z may be implied void
    {n S} {
	S {is {n X} mode leaf}
	X {is {n Z} mode value}
	Z {is {t z} mode value}
    }
    {n S} {
	S {is {n X} mode leaf}
	X {is {n Z} mode value}
	Z {is {t z} mode value}
    }
    # value leaf | yes    | value is passed
    {n S} {
	S {is {n X} mode value}
	X {is {n Z} mode leaf}
	Z {is {t z} mode value}
    }
    {n S} {
	S {is {n Z} mode value}
	X {is {n Z} mode leaf}
	Z {is {t z} mode value}
    }
    # value void | yes    | X is implied void
    {n S} {
	S {is {n X} mode value}
	X {is {n Z} mode void}
	Z {is {t z} mode value}
    }
    {n S} {
	S {is {n Z} mode value}
	X {is {n Z} mode void}
	Z {is {t z} mode value}
    }
    # leaf  leaf | no     | s.a.
    {n S} {
	S {is {n X} mode leaf}
	X {is {n Z} mode leaf}
	Z {is {t z} mode value}
    }
    {n S} {
	S {is {n X} mode leaf}
	X {is {n Z} mode leaf}
	Z {is {t z} mode value}
    }
    # leaf  void | no     | s.a.
    {n S} {
	S {is {n X} mode leaf}
	X {is {n Z} mode void}
	Z {is {t z} mode value}
    }
    {n S} {
	S {is {n X} mode leaf}
	X {is {n Z} mode void}
	Z {is {t z} mode value}
    }
    # void  value| no     | X drops value, inline doesn't
    {n S} {
	S {is {n X} mode void}
	X {is {n Z} mode value}
	Z {is {t z} mode value}
    }
    {n S} {
	S {is {n X} mode void}
	X {is {n Z} mode value}
	Z {is {t z} mode value}
    }
    # void  leaf | no     | s.a.
    {n S} {
	S {is {n X} mode void}
	X {is {n Z} mode leaf}
	Z {is {t z} mode value}
    }
    {n S} {
	S {is {n X} mode void}
	X {is {n Z} mode leaf}
	Z {is {t z} mode value}
    }
    # void  void | yes    |
    {n S} {
	S {is {n X} mode void}
	X {is {n Z} mode void}
	Z {is {t z} mode value}
    }
    {n S} {
	S {is {n Z} mode void}
	X {is {n Z} mode void}
	Z {is {t z} mode value}
    }
    {n S} {
	S {is {n S} mode value}
    }
    {n S} {
	S {is {n S} mode value}
    }
} $setimpl

# -------------------------------------------------------------------------
# op: modeopt

TestTransformation modeopt {
    # --- stays as-is
    epsilon {}
    epsilon {}
    # --- cycle
    # S <-- A; A <-- A
    {n S} {
	S {is {n A} mode value}
	A {is {n A} mode value}
    }
    {n S} {
	S {is {n A} mode value}
	A {is {n A} mode value}
    }
    # -- undefined (deferred) symbol: B
    {n S} {
	S {is {n A} mode value}
	A {is {n B} mode value}
    }
    {n S} {
	S {is {n A} mode value}
	A {is {n B} mode value}
    }
    # --- rule 1
    {n S} {
	S {is {n A} mode value}
	A {is {t A} mode value}
    }
    {n S} {
	S {is {n A} mode value}
	A {is {t A} mode leaf}
    }
    # --- rule 1
    {n S} {
	S {is {n A} mode value}
	A {is {x {t A} {n B}} mode value}
	B {is {t b} mode value}
    }
    {n S} {
	S {is {n A} mode value}
	A {is {x {t A} {n B}} mode value}
	B {is {t b} mode leaf}
    }
    # --- rule 2 (no opt)
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode value}
	B {is {n C} mode value}
	C {is {t c} mode leaf}
    }
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode value}
	B {is {n C} mode value}
	C {is {t c} mode leaf}
    }
    # --- rule 2 (void)
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode void}
	B {is {n C} mode void}
	C {is {t c} mode leaf}
    }
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode void}
	B {is {n C} mode void}
	C {is {t c} mode void}
    }
    # --- rule 2 (leaf)
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode leaf}
	B {is {n C} mode leaf}
	C {is {t c} mode leaf}
    }
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode leaf}
	B {is {n C} mode leaf}
	C {is {t c} mode void}
    }
    # --- rule 2 (mixed)
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode leaf}
	B {is {n C} mode void}
	C {is {t c} mode leaf}
    }
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode leaf}
	B {is {n C} mode void}
	C {is {t c} mode void}
    }
    # --- rule 2 (mixed, no opt)
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode leaf}
	B {is {n C} mode value}
	C {is {t c} mode leaf}
    }
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode leaf}
	B {is {n C} mode value}
	C {is {t c} mode leaf}
    }
    # --- rule 1: applies, rule 2: n/a
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode leaf}
	B {is {n C} mode value}
	C {is {t c} mode value}
    }
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode leaf}
	B {is {n C} mode value}
	C {is {t c} mode leaf}
    }
    # --- rule 1: applies, rule 2: applies
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode leaf}
	B {is {n C} mode leaf}
	C {is {t c} mode value}
    }
    {n S} {
	S {is {x {n A} {n B}} mode value}
	A {is {n C} mode leaf}
	B {is {n C} mode leaf}
	C {is {t c} mode void}
    }
} $setimpl



# -------------------------------------------------------------------------
# op: minimize

TestTransformation minimize {
    # --- stays as-is
    epsilon {}
    epsilon {}
    # --- minimize away (unrealizable)
    # S <-- A; A <-- A
    {n S} {
	S {is {n A} mode value}
	A {is {n A} mode value}
    }
    epsilon {}
    # --- already minimal
    {n S} {
     	S {is {n A} mode leaf}
     	A {is {t a} mode void}
    }
    {n S} {
	S {is {n A} mode leaf}
     	A {is {t a} mode void}
    }
    # --- drop unrealizable *before* unreachable
    # S <-- AB / a; A <-- aA; B <-- a
    {n S} {
     	S {is {/ {x {n A} {n B}} {t a}} mode value}
     	A {is {x {t a} {n A}} mode value}
	B {is {t a} mode leaf}
    }
    {n S} {
	S {is {t a} mode leaf}
    }
    # --- direct cycle
    {n A} {
	A {is {n A} mode value}
    }
    epsilon {}
    # --- indirect cycle
    {n A} {
	A {is {n B} mode value}
	B {is {n C} mode value}
	C {is {n A} mode value}
    }
    epsilon {}
    # --- dechaining creates unreachable and unrealisable rules; here: B, Y
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n B} mode value}
	B {is {n C} mode value}
	C {is {x {n X} {t c}} mode value}
	X {is {n Y} mode value}
	Y {is {n Z} mode value}
	Z {is {x {t z}} mode leaf}
    }
    {n S} {
    	S {is {x {n A} {t s}} mode value}
	A {is {n C} mode value}
	C {is {x {n X} {t c}} mode value}
	X {is {n Z} mode value}
	Z {is {t z} mode leaf}
    }
    # {n S} {
    # 	S {is {x {n A} {t s}} mode value}
    # 	A {is {x {n X} {t c}} mode value}
    # 	X {is {t z} mode leaf}
    # }
} $setimpl

# -------------------------------------------------------------------------
rename sl {}
rename g {}
rename TestTransformation {}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to modules/rc4/rc4.man.

112
113
114
115
116
117
118
119
120
 rc4::rc4 -in $socket -command [list ::Finish $ApplicationState]
}]

[section "AUTHORS"]
Pat Thoyts

[vset CATEGORY rc4]
[include ../common-text/feedback.inc]
[manpage_end]







|

112
113
114
115
116
117
118
119
120
 rc4::rc4 -in $socket -command [list ::Finish $ApplicationState]
}]

[section "AUTHORS"]
Pat Thoyts

[vset CATEGORY rc4]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/rcs/rcs.man.

322
323
324
325
326
327
328
329
330
[example {{{d 1 2} {d 4 1} {a 4 {The named is the mother of all things.

}} {a 11 {They both may be called deep and profound.
Deeper and more profound,
The door of all subtleties!}}}}]

[vset CATEGORY rcs]
[include ../common-text/feedback.inc]
[manpage_end]







|

322
323
324
325
326
327
328
329
330
[example {{{d 1 2} {d 4 1} {a 4 {The named is the mother of all things.

}} {a 11 {They both may be called deep and profound.
Deeper and more profound,
The door of all subtleties!}}}}]

[vset CATEGORY rcs]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/report/report.man.

468
469
470
471
472
473
474
475
476
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % m format 2string r
}]

[vset CATEGORY report]
[include ../common-text/feedback.inc]
[manpage_end]







|

468
469
470
471
472
473
474
475
476
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % m format 2string r
}]

[vset CATEGORY report]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/rest/pkgIndex.tcl.

1
2
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded rest 1.3.1 [list source [file join $dir rest.tcl]]

|
1
2
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded rest 1.2 [list source [file join $dir rest.tcl]]

Changes to modules/rest/rest.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.3.1]
[manpage_begin rest n [vset VERSION]]
[moddesc   {A framework for RESTful web services}]
[titledesc {define REST web APIs and call them inline or asychronously}]
[require Tcl 8.5]
[require rest [opt [vset VERSION]]]
[description]


|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset VERSION 1.2]
[manpage_begin rest n [vset VERSION]]
[moddesc   {A framework for RESTful web services}]
[titledesc {define REST web APIs and call them inline or asychronously}]
[require Tcl 8.5]
[require rest [opt [vset VERSION]]]
[description]

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

[comment {= = == === ===== ======== ============= =====================}]
[comment {= = == === ===== ======== ============= =====================}]
[list_begin definitions]
[call [cmd ::rest::simple] [arg url] [arg query] [opt [arg config]] [opt [arg body]]]
[call [cmd ::rest::get]    [arg url] [arg query] [opt [arg config]] [opt [arg body]]]
[call [cmd ::rest::post]   [arg url] [arg query] [opt [arg config]] [opt [arg body]]]
[call [cmd ::rest::patch]  [arg url] [arg query] [opt [arg config]] [opt [arg body]]]
[call [cmd ::rest::head]   [arg url] [arg query] [opt [arg config]] [opt [arg body]]]
[call [cmd ::rest::put]    [arg url] [arg query] [opt [arg config]] [opt [arg body]]]
[call [cmd ::rest::delete] [arg url] [arg query] [opt [arg config]] [opt [arg body]]]

[para] These commands are all equivalent except for the http method
used.








<







28
29
30
31
32
33
34

35
36
37
38
39
40
41

[comment {= = == === ===== ======== ============= =====================}]
[comment {= = == === ===== ======== ============= =====================}]
[list_begin definitions]
[call [cmd ::rest::simple] [arg url] [arg query] [opt [arg config]] [opt [arg body]]]
[call [cmd ::rest::get]    [arg url] [arg query] [opt [arg config]] [opt [arg body]]]
[call [cmd ::rest::post]   [arg url] [arg query] [opt [arg config]] [opt [arg body]]]

[call [cmd ::rest::head]   [arg url] [arg query] [opt [arg config]] [opt [arg body]]]
[call [cmd ::rest::put]    [arg url] [arg query] [opt [arg config]] [opt [arg body]]]
[call [cmd ::rest::delete] [arg url] [arg query] [opt [arg config]] [opt [arg body]]]

[para] These commands are all equivalent except for the http method
used.

545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
    package require tls
    http::register https 443 ::tls::socket
}]

[include ../common-text/tls-security-notes.inc]

[vset CATEGORY rest]
[include ../common-text/feedback.inc]
[comment {
TOKENS
     the value is substituted into the url at call time.
     tokens in the form of %name:default_value% will be
     an optional argument with a default value.
}]
[manpage_end]







|







544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
    package require tls
    http::register https 443 ::tls::socket
}]

[include ../common-text/tls-security-notes.inc]

[vset CATEGORY rest]
[include ../doctools2base/include/feedback.inc]
[comment {
TOKENS
     the value is substituted into the url at call time.
     tokens in the form of %name:default_value% will be
     an optional argument with a default value.
}]
[manpage_end]

Changes to modules/rest/rest.tcl.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

package require Tcl 8.5
package require http 2.7
package require json
package require tdom
package require base64

package provide rest 1.3.1

namespace eval ::rest {
    namespace export create_interface parameters parse_opts save \
    describe substitute
}

# simple --







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

package require Tcl 8.5
package require http 2.7
package require json
package require tdom
package require base64

package provide rest 1.2

namespace eval ::rest {
    namespace export create_interface parameters parse_opts save \
    describe substitute
}

# simple --
81
82
83
84
85
86
87
88
89
90
91
92
93

94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116


117
118
119
120
121
122
123
    if {[dict exists $config result]} {
        set result [::rest::format_[dict get $config result] $result]
    }

    return $result
}

interp alias {} ::rest::delete {} ::rest::simple
interp alias {} ::rest::get    {} ::rest::simple
interp alias {} ::rest::head   {} ::rest::simple
interp alias {} ::rest::patch  {} ::rest::simple
interp alias {} ::rest::post   {} ::rest::simple
interp alias {} ::rest::put    {} ::rest::simple


proc ::rest::DetermineMethod {cv} {
    upvar 1 $cv config
    if {[dict exists $config method]} return

    set loc [info frame -2]
    if {![dict exists $loc cmd]} {
	return -code error "Unable to determine rest::simple method in the current context ([dict get $loc type]). Please specify it explicitly."
    }
    set cmd [dict get $loc cmd]
    if {[catch {
	set cmd [lindex $cmd 0]
    }]} {
	# Not a proper list. String processing.
	# Simple: Assume name without spaces.
	# TODO: Quoted literal.
	regexp {^([^ ]+).*$} $cmd -> cmd
    }
    set cmd [namespace tail $cmd]    
    if {$cmd eq "simple"} { set cmd get }
    if {$cmd ni {get delete head post put patch}} {
	return -code error "Unable to determine rest::simple method, found \"$cmd\". Please specify it explicitly."
    }


    #puts >>>|$cmd|
    dict set config method $cmd
    return
}

# create_interface --
#







<

<
|
|

>


















<
<
|


>
>







81
82
83
84
85
86
87

88

89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110


111
112
113
114
115
116
117
118
119
120
121
122
    if {[dict exists $config result]} {
        set result [::rest::format_[dict get $config result] $result]
    }

    return $result
}


interp alias {} ::rest::get    {} ::rest::simple

interp alias {} ::rest::post   {} ::rest::simple
interp alias {} ::rest::head   {} ::rest::simple
interp alias {} ::rest::put    {} ::rest::simple
interp alias {} ::rest::delete {} ::rest::simple

proc ::rest::DetermineMethod {cv} {
    upvar 1 $cv config
    if {[dict exists $config method]} return

    set loc [info frame -2]
    if {![dict exists $loc cmd]} {
	return -code error "Unable to determine rest::simple method in the current context ([dict get $loc type]). Please specify it explicitly."
    }
    set cmd [dict get $loc cmd]
    if {[catch {
	set cmd [lindex $cmd 0]
    }]} {
	# Not a proper list. String processing.
	# Simple: Assume name without spaces.
	# TODO: Quoted literal.
	regexp {^([^ ]+).*$} $cmd -> cmd
    }


    if {$cmd ni {get delete head post put}} {
	return -code error "Unable to determine rest::simple method, found \"$cmd\". Please specify it explicitly."
    }
    set cmd [namespace tail $cmd]    
    if {$cmd eq "simple"} { set cmd get }
    #puts >>>|$cmd|
    dict set config method $cmd
    return
}

# create_interface --
#

Changes to modules/ripemd/ripemd128.man.

183
184
185
186
187
188
189
190
191
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY ripemd]
[include ../common-text/feedback.inc]
[manpage_end]







|

183
184
185
186
187
188
189
190
191
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY ripemd]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/ripemd/ripemd160.man.

167
168
169
170
171
172
173
174
175
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY ripemd]
[include ../common-text/feedback.inc]
[manpage_end]







|

167
168
169
170
171
172
173
174
175
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY ripemd]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/sasl/gtoken.man.

19
20
21
22
23
24
25
26
27

[include ../common-text/tls-security-notes.inc]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY sasl]
[include ../common-text/feedback.inc]
[manpage_end]







|

19
20
21
22
23
24
25
26
27

[include ../common-text/tls-security-notes.inc]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY sasl]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/sasl/ntlm.man.

28
29
30
31
32
33
34
35
36

[list_end]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY sasl]
[include ../common-text/feedback.inc]
[manpage_end]







|

28
29
30
31
32
33
34
35
36

[list_end]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY sasl]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/sasl/sasl.man.

332
333
334
335
336
337
338
339
340

[list_end]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY sasl]
[include ../common-text/feedback.inc]
[manpage_end]







|

332
333
334
335
336
337
338
339
340

[list_end]

[section AUTHORS]
Pat Thoyts

[vset CATEGORY sasl]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/sasl/scram.man.

28
29
30
31
32
33
34
35
36

[list_end]

[section AUTHORS]
Sergei Golovan

[vset CATEGORY sasl]
[include ../common-text/feedback.inc]
[manpage_end]







|

28
29
30
31
32
33
34
35
36

[list_end]

[section AUTHORS]
Sergei Golovan

[vset CATEGORY sasl]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/sha1/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded sha256 1.0.4 [list source [file join $dir sha256.tcl]]
package ifneeded sha256c 1.0.4 [list source [file join $dir sha256c.tcl]]
package ifneeded sha1   2.0.4 [list source [file join $dir sha1.tcl]]
package ifneeded sha1   1.1.1 [list source [file join $dir sha1v1.tcl]]











|
<
|

1
2
3
4
5
6
7
8
9
10
11
12

13
14
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded sha256 1.0.3 [list source [file join $dir sha256.tcl]]

package ifneeded sha1   2.0.3 [list source [file join $dir sha1.tcl]]
package ifneeded sha1   1.1.1 [list source [file join $dir sha1v1.tcl]]

Changes to modules/sha1/sha1.man.

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
[vset VERSION 2.0.4]
[manpage_begin sha1 n [vset VERSION]]
[see_also md4]
[see_also md5]
[see_also ripemd128]
[see_also ripemd160]
[keywords {FIPS 180-1}]
[keywords hashing]
[keywords message-digest]
[keywords {rfc 2104}]
[keywords security]
[keywords sha1]
[moddesc   {SHA-x Message-Digest Algorithm}]
[copyright {2005, Pat Thoyts <patthoyts@users.sourceforge.net>}]
[titledesc {SHA1 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require sha1 [opt [vset VERSION]]]
[description]
[para]

This package provides an implementation in Tcl of the SHA1
message-digest algorithm as specified by FIPS PUB 180-1 (1). This
algorithm takes a message and generates a 160-bit digest from the
input. The SHA1 algorithm is related to the MD4 algorithm (2) but has
<
|















|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

[manpage_begin sha1 n 2.0.3]
[see_also md4]
[see_also md5]
[see_also ripemd128]
[see_also ripemd160]
[keywords {FIPS 180-1}]
[keywords hashing]
[keywords message-digest]
[keywords {rfc 2104}]
[keywords security]
[keywords sha1]
[moddesc   {SHA-x Message-Digest Algorithm}]
[copyright {2005, Pat Thoyts <patthoyts@users.sourceforge.net>}]
[titledesc {SHA1 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require sha1 [opt 2.0.3]]
[description]
[para]

This package provides an implementation in Tcl of the SHA1
message-digest algorithm as specified by FIPS PUB 180-1 (1). This
algorithm takes a message and generates a 160-bit digest from the
input. The SHA1 algorithm is related to the MD4 algorithm (2) but has
175
176
177
178
179
180
181
182
183
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY sha1]
[include ../common-text/feedback.inc]
[manpage_end]







|

174
175
176
177
178
179
180
181
182
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY sha1]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/sha1/sha1.tcl.

640
641
642
643
644
645
646
647
648
649
650
651
652
653

654
655
656
657
658
659
660
# -------------------------------------------------------------------------

# fileevent handler for chunked file hashing.
#
proc ::sha1::Chunk {token channel {chunksize 4096}} {
    upvar #0 $token state
    
    SHA1Update $token [read $channel $chunksize]

    if {[eof $channel]} {
        fileevent $channel readable {}
        set state(reading) 0
    }
    return

}

# -------------------------------------------------------------------------

proc ::sha1::sha1 {args} {
    array set opts {-hex 0 -filename {} -channel {} -chunksize 4096}
    if {[llength $args] == 1} {







<
<




|
>







640
641
642
643
644
645
646


647
648
649
650
651
652
653
654
655
656
657
658
659
# -------------------------------------------------------------------------

# fileevent handler for chunked file hashing.
#
proc ::sha1::Chunk {token channel {chunksize 4096}} {
    upvar #0 $token state
    


    if {[eof $channel]} {
        fileevent $channel readable {}
        set state(reading) 0
    }
        
    SHA1Update $token [read $channel $chunksize]
}

# -------------------------------------------------------------------------

proc ::sha1::sha1 {args} {
    array set opts {-hex 0 -filename {} -channel {} -chunksize 4096}
    if {[llength $args] == 1} {
801
802
803
804
805
806
807
808
809
810
811
812
813
814
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha1 2.0.4

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






800
801
802
803
804
805
806
807
808
809
810
811
812
813
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha1 2.0.3

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/sha1/sha256.h.

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
 *
 *	$Id: sha256.h,v 1.4 2011/04/21 17:51:55 andreas_kupries Exp $
 */

#ifndef _SHA256_H
#define _SHA256_H

/*
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif
*/
# include <stdint.h>

#define SHA256_HASH_SIZE 32

/* Hash size in 32-bit words */
#define SHA256_HASH_WORDS 8

/*
#ifdef _MSC_VER
typedef unsigned __int64    uint64_t;
#elif !(defined(__hpux) || defined(_AIX))
typedef unsigned long long  uint64_t;
#endif
*/

#if !(defined(__hpux))
typedef unsigned int        uint32_t;
typedef unsigned char       uint8_t;
#endif

struct _SHA256Context {







<







<
<






<





<







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
 *
 *	$Id: sha256.h,v 1.4 2011/04/21 17:51:55 andreas_kupries Exp $
 */

#ifndef _SHA256_H
#define _SHA256_H


#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif



#define SHA256_HASH_SIZE 32

/* Hash size in 32-bit words */
#define SHA256_HASH_WORDS 8


#ifdef _MSC_VER
typedef unsigned __int64    uint64_t;
#elif !(defined(__hpux) || defined(_AIX))
typedef unsigned long long  uint64_t;
#endif


#if !(defined(__hpux))
typedef unsigned int        uint32_t;
typedef unsigned char       uint8_t;
#endif

struct _SHA256Context {

Changes to modules/sha1/sha256.man.

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
[vset VERSION 1.0.4]
[manpage_begin sha256 n [vset VERSION]]
[see_also md4]
[see_also md5]
[see_also ripemd128]
[see_also ripemd160]
[see_also sha1]
[keywords {FIPS 180-1}]
[keywords hashing]
[keywords message-digest]
[keywords {rfc 2104}]
[keywords security]
[keywords sha256]
[moddesc   {SHA-x Message-Digest Algorithm}]
[copyright {2008, Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[titledesc {SHA256 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require sha256 [opt [vset VERSION]]]
[description]
[para]

This package provides an implementation in Tcl of the SHA256 and
SHA224 message-digest algorithms as specified by FIPS PUB 180-1
(1). These algorithms take a message and generates a 256-bit (224-bit)
digest from the input. The SHA2 algorithms are related to the SHA1
<
|
















|








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

[manpage_begin sha256 n 1.0.3]
[see_also md4]
[see_also md5]
[see_also ripemd128]
[see_also ripemd160]
[see_also sha1]
[keywords {FIPS 180-1}]
[keywords hashing]
[keywords message-digest]
[keywords {rfc 2104}]
[keywords security]
[keywords sha256]
[moddesc   {SHA-x Message-Digest Algorithm}]
[copyright {2008, Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[titledesc {SHA256 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require sha256 [opt 1.0.3]]
[description]
[para]

This package provides an implementation in Tcl of the SHA256 and
SHA224 message-digest algorithms as specified by FIPS PUB 180-1
(1). These algorithms take a message and generates a 256-bit (224-bit)
digest from the input. The SHA2 algorithms are related to the SHA1
187
188
189
190
191
192
193
194
195
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY sha1]
[include ../common-text/feedback.inc]
[manpage_end]







|

186
187
188
189
190
191
192
193
194
      Krawczyk, H., Bellare, M. and Canetti, R. "HMAC: Keyed-Hashing for
      Message Authentication", RFC 2104, February 1997.
	([uri http://www.rfc-editor.org/rfc/rfc2104.txt])

[list_end]

[vset CATEGORY sha1]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/sha1/sha256.tcl.

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
    variable  accel
    array set accel {tcl 0 critcl 0}
    variable  loaded {}

    namespace export sha256 hmac \
            SHA256Init SHA256Update SHA256Final


    variable uid
    if {![info exists uid]} {
        set uid 0
    }

    variable K
    if {![info exists K]} {







<







28
29
30
31
32
33
34

35
36
37
38
39
40
41
    variable  accel
    array set accel {tcl 0 critcl 0}
    variable  loaded {}

    namespace export sha256 hmac \
            SHA256Init SHA256Update SHA256Final


    variable uid
    if {![info exists uid]} {
        set uid 0
    }

    variable K
    if {![info exists K]} {
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198

    if {![string equal $loaded ""]} {
        foreach c {
            SHA256Init   SHA224Init
            SHA256Final  SHA224Final
            SHA256Update
        } {
            interp alias {} ::sha2::$c {}
        }
    }

    # Activate the new implementation, if there is any.

    if {![string equal $key ""]} {
        foreach c {
            SHA256Init   SHA224Init
            SHA256Final  SHA224Final
            SHA256Update
        } {
	    interp alias {} ::sha2::$c {} ::sha2::${c}-${key}
        }
    }

    # Remember the active implementation, for deactivation by future
    # switches.

    set loaded $key







|











|







171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197

    if {![string equal $loaded ""]} {
        foreach c {
            SHA256Init   SHA224Init
            SHA256Final  SHA224Final
            SHA256Update
        } {
            rename ::sha2::$c ::sha2::${c}-${loaded}
        }
    }

    # Activate the new implementation, if there is any.

    if {![string equal $key ""]} {
        foreach c {
            SHA256Init   SHA224Init
            SHA256Final  SHA224Final
            SHA256Update
        } {
            rename ::sha2::${c}-${key} ::sha2::$c
        }
    }

    # Remember the active implementation, for deactivation by future
    # switches.

    set loaded $key
656
657
658
659
660
661
662
663
664
665
666
667
668
669

670
671
672
673
674
675
676
# -------------------------------------------------------------------------

# fileevent handler for chunked file hashing.
#
proc ::sha2::Chunk {token channel {chunksize 4096}} {
    upvar #0 $token state
    
    SHA256Update $token [read $channel $chunksize]

    if {[eof $channel]} {
        fileevent $channel readable {}
        set state(reading) 0
    }
    return

}

# -------------------------------------------------------------------------

proc ::sha2::_sha256 {ver args} {
    array set opts {-hex 0 -filename {} -channel {} -chunksize 4096}
    if {[llength $args] == 1} {







<
<




|
>







655
656
657
658
659
660
661


662
663
664
665
666
667
668
669
670
671
672
673
674
# -------------------------------------------------------------------------

# fileevent handler for chunked file hashing.
#
proc ::sha2::Chunk {token channel {chunksize 4096}} {
    upvar #0 $token state
    


    if {[eof $channel]} {
        fileevent $channel readable {}
        set state(reading) 0
    }
        
    SHA256Update $token [read $channel $chunksize]
}

# -------------------------------------------------------------------------

proc ::sha2::_sha256 {ver args} {
    array set opts {-hex 0 -filename {} -channel {} -chunksize 4096}
    if {[llength $args] == 1} {
697
698
699
700
701
702
703

704
705
706
707
708
709
710

    if {$opts(-filename) != {}} {
        set opts(-channel) [open $opts(-filename) r]
        fconfigure $opts(-channel) -translation binary
    }

    if {$opts(-channel) == {}} {

        if {[llength $args] != 1} {
            return -code error "wrong # args: should be\
                \"[namespace current]::sha$ver ?-hex|-bin? -filename file\
                | -channel channel | string\""
        }
        set tok [SHA${ver}Init]
        SHA${ver}Update $tok [lindex $args 0]







>







695
696
697
698
699
700
701
702
703
704
705
706
707
708
709

    if {$opts(-filename) != {}} {
        set opts(-channel) [open $opts(-filename) r]
        fconfigure $opts(-channel) -translation binary
    }

    if {$opts(-channel) == {}} {

        if {[llength $args] != 1} {
            return -code error "wrong # args: should be\
                \"[namespace current]::sha$ver ?-hex|-bin? -filename file\
                | -channel channel | string\""
        }
        set tok [SHA${ver}Init]
        SHA${ver}Update $tok [lindex $args 0]
820
821
822
823
824
825
826
827
828
829
830
831
832
833
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha256 1.0.4

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






819
820
821
822
823
824
825
826
827
828
829
830
831
832
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha256 1.0.3

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/sha1/sha256c.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# sha256c.tcl
# - Copyright (C) 2005 Pat Thoyts <patthoyts@users.sourceforge.net>
# - Copyright (C) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
#   (Rewriting the sha1c wrapper to 256).
#
# Wrapper for the Secure Hashing Algorithm (SHA256)
#
# $Id: sha256c.tcl,v 1.5 2009/05/07 00:35:10 patthoyts Exp $

package require critcl;        # needs critcl
# @sak notprovided sha256c
package provide sha256c 1.0.4
			       
critcl::cheaders sha256.h;     # FreeBSD SHA256 implementation
critcl::csources sha256.c;     # FreeBSD SHA256 implementation

if {$tcl_platform(byteOrder) eq "littleEndian"} {
    set byteOrder 1234
} else {











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# sha256c.tcl
# - Copyright (C) 2005 Pat Thoyts <patthoyts@users.sourceforge.net>
# - Copyright (C) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
#   (Rewriting the sha1c wrapper to 256).
#
# Wrapper for the Secure Hashing Algorithm (SHA256)
#
# $Id: sha256c.tcl,v 1.5 2009/05/07 00:35:10 patthoyts Exp $

package require critcl;        # needs critcl
# @sak notprovided sha256c
package provide sha256c 1.0.2
			       
critcl::cheaders sha256.h;     # FreeBSD SHA256 implementation
critcl::csources sha256.c;     # FreeBSD SHA256 implementation

if {$tcl_platform(byteOrder) eq "littleEndian"} {
    set byteOrder 1234
} else {
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
        data = Tcl_GetByteArrayFromObj(objv[1], &size);
        SHA256Update(mp, data, size);
        
        Tcl_SetObjResult(ip, obj);
        return TCL_OK;
    }
}


critcl::api header sha256.h
::critcl::api function void SHA256Init {
	SHA256Context *sc
}

::critcl::api function void SHA256Update {
	SHA256Context *sc
	{const void} *data
	uint32_t len
}
::critcl::api function void SHA256Final {
	SHA256Context *sc
	uint8_t *hash
}

#::critcl::debug symbols
::critcl::load







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
168
169
170
171
172
173
174



















        data = Tcl_GetByteArrayFromObj(objv[1], &size);
        SHA256Update(mp, data, size);
        
        Tcl_SetObjResult(ip, obj);
        return TCL_OK;
    }
}



















Changes to modules/simulation/pkgIndex.tcl.

1
2
3
package ifneeded simulation::random 0.4.0 [list source [file join $dir random.tcl]]
package ifneeded simulation::montecarlo 0.1 [list source [file join $dir montecarlo.tcl]]
package ifneeded simulation::annealing 0.2 [list source [file join $dir annealing.tcl]]
|


1
2
3
package ifneeded simulation::random 0.3.1 [list source [file join $dir random.tcl]]
package ifneeded simulation::montecarlo 0.1 [list source [file join $dir montecarlo.tcl]]
package ifneeded simulation::annealing 0.2 [list source [file join $dir annealing.tcl]]

Changes to modules/simulation/random.tcl.

428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
         set z [expr {DEPTH*rand()}]
         return [list $x $y $z]
    }]

    return $name
}


# prng_Triangle --
#     Create a PRNG with a triangular distribution of points on an interval.
#     If the argument min is lower than the argument max, then smaller
#     values have higher probability and vice versa.
#
# Arguments:
#     min       Minimum value
#     max       Maximum value
#
# Result:
#     Name of a procedure that returns the random point
#
proc ::simulation::random::prng_Triangle {min max} {
    variable count

    incr count

    set name ::simulation::random::PRNG_$count

    set diff [expr {$max-$min}]

    if { $diff > 0.0 } {
        proc $name {} [string map [list MIN $min DIFF $diff] \
         {
            set r [expr {1.0 - sqrt(1.0 - rand())}]
            set x [expr {MIN + DIFF*$r}]
            return $x
        }]
    } else {
        proc $name {} [string map [list MAX $max DIFF $diff] \
         {
            set x [expr {MAX - DIFF*sqrt(rand())}]
            return $x
        }]
    }

    return $name
}


# prng_SymmetricTriangle --
#     Create a PRNG with a symmetric triangular distribution of points on an interval.
#
# Arguments:
#     min       Minimum value
#     max       Maximum value
#
# Result:
#     Name of a procedure that returns the random point
#
proc ::simulation::random::prng_SymmetricTriangle {min max} {
    variable count

    incr count

    set name ::simulation::random::PRNG_$count

    set diff2 [expr {0.5 *($max-$min)}]

    proc $name {} [string map [list MIN $min DIFF2 $diff2] \
     {
        return [expr {MIN + DIFF2 * (rand() + rand())}]
    }]

    return $name
}

# Announce the package
#
package provide simulation::random 0.4.0


# main --
#     Test code
#
if { 0 } {
set bin [::simulation::random::prng_Bernoulli 0.2]







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|







428
429
430
431
432
433
434




































































435
436
437
438
439
440
441
442
443
444
         set z [expr {DEPTH*rand()}]
         return [list $x $y $z]
    }]

    return $name
}





































































# Announce the package
#
package provide simulation::random 0.3.1


# main --
#     Test code
#
if { 0 } {
set bin [::simulation::random::prng_Bernoulli 0.2]

Changes to modules/simulation/random.test.

231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
test "Block-1.0" "block generator with sides 10, 0.1 and 2.5" \
    -body {
    set p [::simulation::random::prng_Block 10 0.1 2.5]
    set rnd [$p]
    set result [llength $rnd]
} -result 3

test "Triangle-1.0" "triangularly distributed numbers between -1.0 and 1.0" \
    -body {
    set p [::simulation::random::prng_Triangle -1.0 1.0]

    set okay 1
    for {set i 0} {$i < 1000} {incr i} {
        set rnd [$p]

        if { $rnd < -1.0 || $rnd > 1.0 } {
            set okay 0
            break
        }
    }

    set okay
} -result 1

test "Triangle-1.1" "triangularly distributed numbers between -1.0 and 1.0 (alternative)" \
    -body {
    set p [::simulation::random::prng_Triangle 1.0 -1.0]

    set okay 1
    for {set i 0} {$i < 1000} {incr i} {
        set rnd [$p]

        if { $rnd < -1.0 || $rnd > 1.0 } {
            set okay 0
            break
        }
    }

    set okay
} -result 1

# End of test cases
testsuiteCleanup







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


231
232
233
234
235
236
237


































238
239
test "Block-1.0" "block generator with sides 10, 0.1 and 2.5" \
    -body {
    set p [::simulation::random::prng_Block 10 0.1 2.5]
    set rnd [$p]
    set result [llength $rnd]
} -result 3



































# End of test cases
testsuiteCleanup

Changes to modules/simulation/simulation_random.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin simulation::random n 0.4]
[keywords math]
[keywords {random numbers}]
[keywords simulation]
[keywords {statistical distribution}]
[copyright {2004 Arjen Markus <arjenmarkus@users.sourceforge.net>}]
[moddesc   {Tcl Simulation Tools}]
[titledesc {Pseudo-random number generators}]
[category  Mathematics]
[require Tcl [opt 8.4]]
[require simulation::random 0.4]

[description]
[para]
This package consists of commands to generate pseudo-random number
generators. These new commands deliver

[list_begin itemized]

|









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin simulation::random n 0.1]
[keywords math]
[keywords {random numbers}]
[keywords simulation]
[keywords {statistical distribution}]
[copyright {2004 Arjen Markus <arjenmarkus@users.sourceforge.net>}]
[moddesc   {Tcl Simulation Tools}]
[titledesc {Pseudo-random number generators}]
[category  Mathematics]
[require Tcl [opt 8.4]]
[require simulation::random 0.1]

[description]
[para]
This package consists of commands to generate pseudo-random number
generators. These new commands deliver

[list_begin itemized]
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[list_begin definitions]

[call [cmd ::simulation::random::prng_Uniform] [arg min ] [arg max]]

Create a command (PRNG) that generates uniformly distributed numbers
between "min" and "max".

[list_begin arguments]
[arg_def float min] Minimum number that will be generated
[arg_def float max] Maximum number that will be generated
[list_end]

[para]

[call [cmd ::simulation::random::prng_Triangular] [arg min ] [arg max]]

Create a command (PRNG) that generates triangularly distributed numbers
between "min" and "max". If the argument min is lower than the argument max, then smaller
values have higher probability and vice versa. In the first case the probability
density function is of the form [emph {f(x) = 2(1-x)}] and the other case it is of the form [emph {f(x) = 2x}].

[list_begin arguments]
[arg_def float min] Minimum number that will be generated
[arg_def float max] Maximum number that will be generated
[list_end]

[para]

[call [cmd ::simulation::random::prng_SymmTriangular] [arg min ] [arg max]]

Create a command (PRNG) that generates numbers distributed according to a symmetric triangle
around the mean of "min" and "max".

[list_begin arguments]
[arg_def float min] Minimum number that will be generated
[arg_def float max] Maximum number that will be generated
[list_end]

[para]








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







77
78
79
80
81
82
83


























84
85
86
87
88
89
90
[list_begin definitions]

[call [cmd ::simulation::random::prng_Uniform] [arg min ] [arg max]]

Create a command (PRNG) that generates uniformly distributed numbers
between "min" and "max".



























[list_begin arguments]
[arg_def float min] Minimum number that will be generated
[arg_def float max] Maximum number that will be generated
[list_end]

[para]

Changes to modules/smtpd/smtpd.man.

218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
[def "[cmd validate_recipient] callback"]

The validate_recipient callback is similar to the validate_sender
callback and permits you to verify a local mailbox and accept mail for
a local user address during RCPT command handling. To reject mail,
throw an error as above. The error message is ignored.

[def "[cmd deliverMIME] callback"]

The deliverMIME callback is called once a mail message has been
successfully passed to the server. A mime token is constructed from
the sender, recipients and data and the users procedure it called with
this single argument. When the call returns, the mime token is cleaned
up so if the user wishes to preserve the data she must make a copy.








|







218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
[def "[cmd validate_recipient] callback"]

The validate_recipient callback is similar to the validate_sender
callback and permits you to verify a local mailbox and accept mail for
a local user address during RCPT command handling. To reject mail,
throw an error as above. The error message is ignored.

[def "[cmd deliverMIME] callback"]]

The deliverMIME callback is called once a mail message has been
successfully passed to the server. A mime token is constructed from
the sender, recipients and data and the users procedure it called with
this single argument. When the call returns, the mime token is cleaned
up so if the user wishes to preserve the data she must make a copy.

286
287
288
289
290
291
292
293
294

This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file
[file license.terms] for more details.

[vset CATEGORY smtpd]
[include ../common-text/feedback.inc]
[manpage_end]







|

286
287
288
289
290
291
292
293
294

This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file
[file license.terms] for more details.

[vset CATEGORY smtpd]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/snit/snit.man.

2831
2832
2833
2834
2835
2836
2837
2838
2839
Andreas Kupries, Marty Backe, Andy Goth, Jeff Hobbs, Brian
Griffin, Donal Fellows, Miguel Sofer, Kenneth Green,
and Anton Kovalenko.
If I've forgotten anyone, my apologies; let me know and I'll add
your name to the list.

[vset CATEGORY snit]
[include ../common-text/feedback.inc]
[manpage_end]







|

2831
2832
2833
2834
2835
2836
2837
2838
2839
Andreas Kupries, Marty Backe, Andy Goth, Jeff Hobbs, Brian
Griffin, Donal Fellows, Miguel Sofer, Kenneth Green,
and Anton Kovalenko.
If I've forgotten anyone, my apologies; let me know and I'll add
your name to the list.

[vset CATEGORY snit]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/snit/snitfaq.man.

4106
4107
4108
4109
4110
4111
4112
4113
4114

    mylib::propagate -background to {comp1 comp2 comp3}
    mylib::propagate -foreground to {comp1 comp2 comp3}
}
}]

[vset CATEGORY snit]
[include ../common-text/feedback.inc]
[manpage_end]







|

4106
4107
4108
4109
4110
4111
4112
4113
4114

    mylib::propagate -background to {comp1 comp2 comp3}
    mylib::propagate -foreground to {comp1 comp2 comp3}
}
}]

[vset CATEGORY snit]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/soundex/soundex.man.

37
38
39
40
41
42
43
44
45

[example {
    % ::soundex::knuth Knuth
    K530
}]

[vset CATEGORY soundex]
[include ../common-text/feedback.inc]
[manpage_end]







|

37
38
39
40
41
42
43
44
45

[example {
    % ::soundex::knuth Knuth
    K530
}]

[vset CATEGORY soundex]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/stooop/stooop.man.

215
216
217
218
219
220
221
222
223
[list_end]

[section EXAMPLES]

Please see the full HTML documentation in [uri stooop_man.html].

[vset CATEGORY stooop]
[include ../common-text/feedback.inc]
[manpage_end]







|

215
216
217
218
219
220
221
222
223
[list_end]

[section EXAMPLES]

Please see the full HTML documentation in [uri stooop_man.html].

[vset CATEGORY stooop]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/stooop/switched.man.

261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
the validity of the value passed to the [method set-[option option]]
procedure, which should throw an error (for example by using the Tcl
error command) if the value is invalid.

[para] The switched layer also keeps track of the options current
values, so that a [method set-[option option]] procedure is called
only when the corresponding option value passed as parameter is
different from the current value (see [var -option] data members
description).

[def [var -option]]

[para] The [var -option] data member is an options current value.

There is one for each option listed in the options procedure. It is a
read-only value which the switched layer checks against when an option
is changed.

It is rarely used at the layer derived from switched, except in the
few cases, such as in the following example:







|


|

|







261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
the validity of the value passed to the [method set-[option option]]
procedure, which should throw an error (for example by using the Tcl
error command) if the value is invalid.

[para] The switched layer also keeps track of the options current
values, so that a [method set-[option option]] procedure is called
only when the corresponding option value passed as parameter is
different from the current value (see [variable -option] data members
description).

[def [variable -option]]

[para] The [variable -option] data member is an options current value.

There is one for each option listed in the options procedure. It is a
read-only value which the switched layer checks against when an option
is changed.

It is rarely used at the layer derived from switched, except in the
few cases, such as in the following example:
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
}
}]

[para] In this case, the manufacturer's name is stored at the switched
layer level (this is why the set-manufacturer procedure has nothing to
do) and later retrieved in the printData procedure.

[def [var complete]]

[para] The [var complete] data member (not to be confused with the
[method complete] procedure) is a boolean.

Its initial value is [const false] and it is set to [const true] at
the very end of the switched [method complete] procedure.

It becomes useful when some options should be set at construction time
only and not dynamically, as the following example shows:

[para][example {
proc car::set-width {this value} {
    if {$switched::($this,complete)} {
        error {option -width cannot be set dynamically}
    }
    ...
}
}]

[list_end]

[vset CATEGORY stooop]
[include ../common-text/feedback.inc]
[manpage_end]







|

|
|



















|

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
}
}]

[para] In this case, the manufacturer's name is stored at the switched
layer level (this is why the set-manufacturer procedure has nothing to
do) and later retrieved in the printData procedure.

[def [variable complete]]

[para] The [variable complete] data member (not to be confused with
the [method complete] procedure) is a boolean.

Its initial value is [const false] and it is set to [const true] at
the very end of the switched [method complete] procedure.

It becomes useful when some options should be set at construction time
only and not dynamically, as the following example shows:

[para][example {
proc car::set-width {this value} {
    if {$switched::($this,complete)} {
        error {option -width cannot be set dynamically}
    }
    ...
}
}]

[list_end]

[vset CATEGORY stooop]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/string/token.man.

89
90
91
92
93
94
95
96
97
[para] Further note that all regex patterns are implicitly prefixed
with the constraint escape [const \A] to ensure that a match starts
exactly at the character index found in [arg startvar].

[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

89
90
91
92
93
94
95
96
97
[para] Further note that all regex patterns are implicitly prefixed
with the constraint escape [const \A] to ensure that a match starts
exactly at the character index found in [arg startvar].

[list_end]

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/string/token_shell.man.

133
134
135
136
137
138
139
140
141

[para] Whitespace may occur before the first word, or after the last word. Whitespace must occur between adjacent words.

[list_end]
[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

133
134
135
136
137
138
139
140
141

[para] Whitespace may occur before the first word, or after the last word. Whitespace must occur between adjacent words.

[list_end]
[list_end]

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/string/token_shell.test.

1
2
3
4
5
6
7
8
9
10
11
# -*- tcl -*-
# Testsuite string::token::shell
#
# Copyright (c) 2013,2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]



|







1
2
3
4
5
6
7
8
9
10
11
# -*- tcl -*-
# Testsuite string::token::shell
#
# Copyright (c) 2013 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]
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
    useLocal token_shell.tcl string::token::shell
}

# -------------------------------------------------------------------------

test string-token-shell-1.0 "string token shell, wrong#args, not enough" -body {
    string token shell
} -returnCodes error -result [tcltest::byConstraint {
    tcl8.6.10plus {wrong # args: should be "::string::token::shell ?-indices? ?-partial? ?--? text"}
    tcl8.6not10   {wrong # args: should be "shell ?-indices? ?-partial? ?--? text"}
    tcl8.5minus   {wrong # args: should be "::string::token::shell ?-indices? ?-partial? ?--? text"}
}]

test string-token-shell-1.1 "string token shell, wrong#args, too many" -body {
    string token shell T X
} -returnCodes error -result [tcltest::byConstraint {
    tcl8.6.10plus {wrong # args: should be "::string::token::shell ?-indices? ?-partial? ?--? text"}
    tcl8.6not10   {wrong # args: should be "shell ?-indices? ?-partial? ?--? text"}
    tcl8.5minus   {wrong # args: should be "::string::token::shell ?-indices? ?-partial? ?--? text"}
}]

test string-token-shell-1.2 "string token shell, bad option" -body {
    string token shell -foo T
} -returnCodes error -result {Bad option -foo, expected one of -indices, or -partial}

test string-token-shell-1.3 "string token shell, wrong#args, too many" -body {
    string token shell -- T X
} -returnCodes error -result [tcltest::byConstraint {
    tcl8.6.10plus {wrong # args: should be "::string::token::shell ?-indices? ?-partial? ?--? text"}
    tcl8.6not10   {wrong # args: should be "shell ?-indices? ?-partial? ?--? text"}
    tcl8.5minus   {wrong # args: should be "::string::token::shell ?-indices? ?-partial? ?--? text"}
}]

# -------------------------------------------------------------------------

foreach {n label line tokens} {
    0  empty               {}          {}
    1  leading-whitespace  {  }        {}
    2  plain-words         {a}         {a}







<
|
<
<
<



<
|
<
<
<







<
|
<
<
<







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
    useLocal token_shell.tcl string::token::shell
}

# -------------------------------------------------------------------------

test string-token-shell-1.0 "string token shell, wrong#args, not enough" -body {
    string token shell

} -returnCodes error -result {wrong # args: should be "::string::token::shell ?-indices? ?-partial? ?--? text"}




test string-token-shell-1.1 "string token shell, wrong#args, too many" -body {
    string token shell T X

} -returnCodes error -result {wrong # args: should be "::string::token::shell ?-indices? ?-partial? ?--? text"}




test string-token-shell-1.2 "string token shell, bad option" -body {
    string token shell -foo T
} -returnCodes error -result {Bad option -foo, expected one of -indices, or -partial}

test string-token-shell-1.3 "string token shell, wrong#args, too many" -body {
    string token shell -- T X

} -returnCodes error -result {wrong # args: should be "::string::token::shell ?-indices? ?-partial? ?--? text"}




# -------------------------------------------------------------------------

foreach {n label line tokens} {
    0  empty               {}          {}
    1  leading-whitespace  {  }        {}
    2  plain-words         {a}         {a}

Changes to modules/stringprep/stringprep.man.

143
144
145
146
147
148
149
150
151

[list_end]

[section "AUTHORS"]
Sergei Golovan

[vset CATEGORY stringprep]
[include ../common-text/feedback.inc]
[manpage_end]







|

143
144
145
146
147
148
149
150
151

[list_end]

[section "AUTHORS"]
Sergei Golovan

[vset CATEGORY stringprep]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/stringprep/stringprep_data.man.

13
14
15
16
17
18
19
20
21
The [package stringprep::data] package is a helper for
[package stringprep], providing it with the data tables needed to
perform its functions. It is an [emph internal] package which should
not be accessed on its own. Because of that it has no publicly
documented API either. Its implementation is generated by a script.

[vset CATEGORY stringprep]
[include ../common-text/feedback.inc]
[manpage_end]







|

13
14
15
16
17
18
19
20
21
The [package stringprep::data] package is a helper for
[package stringprep], providing it with the data tables needed to
perform its functions. It is an [emph internal] package which should
not be accessed on its own. Because of that it has no publicly
documented API either. Its implementation is generated by a script.

[vset CATEGORY stringprep]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/stringprep/unicode.man.

75
76
77
78
79
80
81
82
83

[list_end]

[section "AUTHORS"]
Sergei Golovan

[vset CATEGORY stringprep]
[include ../common-text/feedback.inc]
[manpage_end]







|

75
76
77
78
79
80
81
82
83

[list_end]

[section "AUTHORS"]
Sergei Golovan

[vset CATEGORY stringprep]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/stringprep/unicode_data.man.

13
14
15
16
17
18
19
20
21
The [package unicode::data] package is a helper for
[package unicode], providing it with the data tables needed to
perform its functions. It is an [emph internal] package which should
not be accessed on its own. Because of that it has no publicly
documented API either. Its implementation is generated by a script.

[vset CATEGORY stringprep]
[include ../common-text/feedback.inc]
[manpage_end]







|

13
14
15
16
17
18
19
20
21
The [package unicode::data] package is a helper for
[package unicode], providing it with the data tables needed to
perform its functions. It is an [emph internal] package which should
not be accessed on its own. Because of that it has no publicly
documented API either. Its implementation is generated by a script.

[vset CATEGORY stringprep]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/disjointset.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[vset VERSION 1.1]
[manpage_begin struct::disjointset n [vset VERSION]]
[keywords {disjoint set}]
[keywords {equivalence class}]
[keywords find]
[keywords {merge find}]
[keywords partition]
[keywords {partitioned set}]
[keywords union]
[moddesc   {Tcl Data Structures}]
[titledesc {Disjoint set data structure}]
[category  {Data structures}]
[require Tcl 8.6]
[require struct::disjointset [opt [vset VERSION]]]
[description]
[para]

This package provides [term {disjoint sets}]. An alternative name for
this kind of structure is [term {merge-find}].

[para]
<
|










|
|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

[manpage_begin struct::disjointset n 1.0]
[keywords {disjoint set}]
[keywords {equivalence class}]
[keywords find]
[keywords {merge find}]
[keywords partition]
[keywords {partitioned set}]
[keywords union]
[moddesc   {Tcl Data Structures}]
[titledesc {Disjoint set data structure}]
[category  {Data structures}]
[require Tcl 8.4]
[require struct::disjointset [opt 1.0]]
[description]
[para]

This package provides [term {disjoint sets}]. An alternative name for
this kind of structure is [term {merge-find}].

[para]
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236

The [cmd option] and the [arg arg]s determine the exact behavior of
the command. The following commands are possible for disjointset
objects:

[list_end]

[call [arg disjointsetName] [method add-element] [arg item]]

Creates a new partition in the specified disjoint set, and fills it
with the single item [arg item].  The command maintains
the integrity of the disjoint set, i.e. it verifies that none of the
[arg elements] are already part of the disjoint set and throws an
error otherwise.

[para]

The result of this method is the empty string.

[para]

This method runs in constant time.

[call [arg disjointsetName] [method add-partition] [arg elements]]

Creates a new partition in specified disjoint set, and fills it with
the values found in the set of [arg elements]. The command maintains
the integrity of the disjoint set, i.e. it verifies that none of the
[arg elements] are already part of the disjoint set and throws an
error otherwise.

[para]

The result of the command is the empty string.

[para]

This method runs in time proportional to the size of [arg elements]].


[call [arg disjointsetName] [method partitions]]

Returns the set of partitions the named disjoint set currently
consists of. The form of the result is a list of lists; the inner
lists contain the elements of the partitions.

[para]

This method runs in time O(N*alpha(N)),
where N is the number of elements in the disjoint set and alpha
is the inverse Ackermann function.

[call [arg disjointsetName] [method num-partitions]]

Returns the number of partitions the named disjoint set currently
consists of.

[para]

This method runs in constant time.

[call [arg disjointsetName] [method equal] [arg a] [arg b]]

Determines if the two elements [arg a] and [arg b] of the disjoint set
belong to the same partition. The result of the method is a boolean
value, [const True] if the two elements are contained in the same
partition, and [const False] otherwise.

[para]

An error will be thrown if either [arg a] or [arg b] are not elements
of the disjoint set.

[para]

This method runs in amortized time O(alpha(N)), where N is the number of
elements in the larger partition and alpha is the inverse Ackermann function.

[call [arg disjointsetName] [method merge] [arg a] [arg b]]

Determines the partitions the elements [arg a] and [arg b] are
contained in and merges them into a single partition.  If the two
elements were already contained in the same partition nothing will
change.

[para]

The result of the method is the empty string.

[para]

This method runs in amortized time O(alpha(N)), where N is the number of
items in the larger of the partitions being merged. The worst case time
is O(N).

[call [arg disjointsetName] [method find] [arg e]]

Returns a list of the members of the partition of the disjoint set
which contains the element
[arg e].

[para]

This method runs in O(N*alpha(N)) time, where N is the total number of
items in the disjoint set and alpha is the inverse Ackermann function,
See [method find-exemplar] for a faster method, if all that is needed
is a unique identifier for the partition, rather than an enumeration
of all its elements.

[call [arg disjointsetName] [method exemplars]]

Returns a list containing an exemplar of each partition in the disjoint
set. The exemplar is a member of the partition, chosen arbitrarily.

[para]

This method runs in O(N*alpha(N)) time, where N is the total number of items
in the disjoint set and alpha is the inverse Ackermann function.

[call [arg disjointsetName] [method find-exemplar] [arg e]]

Returns the exemplar of the partition of the disjoint set containing
the element [arg e].  Throws an error if [arg e] is not found in the
disjoint set.  The exemplar is an arbitrarily chosen member of the partition.
The only operation that will change the exemplar of any partition is
[method merge].

[para]

This method runs in O(alpha(N)) time, where N is the number of items in
the partition containing E, and alpha is the inverse Ackermann function.

[call [arg disjointsetName] [method destroy]]

Destroys the disjoint set object and all associated memory.

[list_end]

[vset CATEGORY {struct :: disjointset}]
[include ../common-text/feedback.inc]
[manpage_end]







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











<
<
<
<
<




|
<
<
<
<
<
<
<






<
<
<
<












<
<
<
<
<











<
<
<
<
<
<


<
|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







|

95
96
97
98
99
100
101
















102
103
104
105
106
107
108
109
110
111
112





113
114
115
116
117







118
119
120
121
122
123




124
125
126
127
128
129
130
131
132
133
134
135





136
137
138
139
140
141
142
143
144
145
146






147
148

149
150
151































152
153
154
155
156
157
158
159
160

The [cmd option] and the [arg arg]s determine the exact behavior of
the command. The following commands are possible for disjointset
objects:

[list_end]

















[call [arg disjointsetName] [method add-partition] [arg elements]]

Creates a new partition in specified disjoint set, and fills it with
the values found in the set of [arg elements]. The command maintains
the integrity of the disjoint set, i.e. it verifies that none of the
[arg elements] are already part of the disjoint set and throws an
error otherwise.

[para]

The result of the command is the empty string.






[call [arg disjointsetName] [method partitions]]

Returns the set of partitions the named disjoint set currently
consists of.








[call [arg disjointsetName] [method num-partitions]]

Returns the number of partitions the named disjoint set currently
consists of.





[call [arg disjointsetName] [method equal] [arg a] [arg b]]

Determines if the two elements [arg a] and [arg b] of the disjoint set
belong to the same partition. The result of the method is a boolean
value, [const True] if the two elements are contained in the same
partition, and [const False] otherwise.

[para]

An error will be thrown if either [arg a] or [arg b] are not elements
of the disjoint set.






[call [arg disjointsetName] [method merge] [arg a] [arg b]]

Determines the partitions the elements [arg a] and [arg b] are
contained in and merges them into a single partition.  If the two
elements were already contained in the same partition nothing will
change.

[para]

The result of the method is the empty string.







[call [arg disjointsetName] [method find] [arg e]]


Returns the partition of the disjoint set which contains the element
[arg e].
































[call [arg disjointsetName] [method destroy]]

Destroys the disjoint set object and all associated memory.

[list_end]

[vset CATEGORY {struct :: disjointset}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/disjointset.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359

360


361
362


363
364
365
366
367
368
369
370





371













372


373


































374






















































































































































































375

376

377
378











































379
380
381
382
383
384
385
# disjointset.tcl --
#
#  Implementation of a Disjoint Set for Tcl.
#
# Copyright (c) Google Summer of Code 2008 Alejandro Eduardo Cruz Paz
# Copyright (c) 2008 Andreas Kupries (API redesign and simplification)
# Copyright (c) 2018 by Kevin B. Kenny - reworked to a proper disjoint-sets
# data structure, added 'add-element', 'exemplars' and 'find-exemplar'.

# References
#
# - General overview
#   - https://en.wikipedia.org/wiki/Disjoint-set_data_structure
#
# - Time/Complexity proofs
#   - https://dl.acm.org/citation.cfm?doid=62.2160
#   - https://dl.acm.org/citation.cfm?doid=364099.364331
#

package require Tcl 8.6

# Initialize the disjointset structure namespace. Note that any
# missing parent namespace (::struct) will be automatically created as
# well.
namespace eval ::struct::disjointset {



    # Only export one command, the one used to instantiate a new
    # disjoint set
    namespace export disjointset
}

# class struct::disjointset::_disjointset --
#
#	Implementation of a disjoint-sets data structure

oo::class create struct::disjointset::_disjointset {

    # elements - Dictionary whose keys are all the elements in the structure,
    #            and whose values are element numbers. 
    # tree     - List indexed by element number whose members are
    #            ordered triples consisting of the element's name,
    #            the element number of the element's parent (or the element's
    #            own index if the element is a root), and the rank of
    #		 the element.
    # nParts   - Number of partitions in the structure. Maintained only
    #            so that num_partitions will work.

    variable elements tree nParts

    constructor {} {
	set elements {}
	set tree {}
	set nParts 0
    }

    # add-element --
    #
    #	Adds an element to the structure
    #
    # Parameters:
    #	item - Name of the element to add
    #
    # Results:
    #	None.
    #
    # Side effects:
    #	Element is added

    method add-element {item} {
	if {[dict exists $elements $item]} {
	    return -code error \
		-errorcode [list STRUCT DISJOINTSET DUPLICATE $item [self]] \
		"The element \"$item\" is already known to the disjoint\
            	 set [self]"
	}
	set n [llength $tree]
	dict set elements $item $n
	lappend tree [list $item $n 0]
	incr nParts
	return
    }

    # add-partition --
    #
    #	Adds a collection of new elements to a disjoint-sets structure and
    #	makes them all one partition.
    #
    # Parameters:
    #	items - List of elements to add.
    #
    # Results:
    #	None.
    #
    # Side effects:
    #	Adds all the elements, and groups them into a single partition.

    method add-partition {items} {

	# Integrity check - make sure that none of the elements have yet
	# been added

	foreach name $items {
	    if {[dict exists $elements $name]} {
		return -code error \
		    -errorcode [list STRUCT DISJOINTSET DUPLICATE \
				    $name [self]] \
		    "The element \"$name\" is already known to the disjoint\
            	     set [self]"	      	 
	    }
	}

	# Add all the elements in one go, and establish parent links for all
	# but the first
	
	set first -1
	foreach n $items {
	    set idx [llength $tree]
	    dict set elements $n $idx
	    if {$first < 0} {
		set first $idx
		set rank 1
	    } else {
		set rank 0
	    }
	    lappend tree [list $n $first $rank]
	}
	incr nParts
	return
    }

    # equal --
    #
    #	Test if two elements belong to the same partition in a disjoint-sets
    #	data structure.
    #
    # Parameters:
    #	a - Name of the first element
    #	b - Name of the second element
    #
    # Results:
    #	Returns 1 if the elements are in the same partition, and 0 otherwise.

    method equal {a b} {
	expr {[my FindNum $a] == [my FindNum $b]}
    }

    # exemplars --
    #
    #	Find one representative element for each partition in a disjoint-sets
    #	data structure.
    #
    # Results:
    #	Returns a list of element names

    method exemplars {} {
	set result {}
	set n -1
	foreach row $tree {
	    if {[lindex $row 1] == [incr n]} {
		lappend result [lindex $row 0]
	    }
	}
	return $result
    }

    # find --
    #
    #	Find the partition to which a given element belongs.
    #
    # Parameters:
    #	item - Item to find
    #
    # Results:
    #	Returns a list of the partition's members
    #
    # Notes:
    #	This operation takes time proportional to the total number of elements
    #	in the disjoint-sets structure. If a simple name of the partition
    #	is all that is required, use "find-exemplar" instead, which runs
    #	in amortized time proportional to the inverse Ackermann function of
    #	the size of the partition.

    method find {item} {
	set result {}
	# No error on a nonexistent item
	if {![dict exists $elements $item]} {
	    return {}
	}
	set pnum [my FindNum $item]
	set n -1
	foreach row $tree {
	    if {[my FindByNum [incr n]] eq $pnum} {
		lappend result [lindex $row 0]
	    }
	}
	return $result
    }

    # find-exemplar --
    #
    #	Find a representative element of the partition that contains a given
    #	element.
    #
    # parameters:
    #	item - Item to examine
    #
    # Results:
    #	Returns the exemplar
    #
    # Notes:
    #	Takes O(alpha(|P|)) amortized time, where |P| is the size of the
    #	partition, and alpha is the inverse Ackermann function

    method find-exemplar {item} {
	return [lindex $tree [my FindNum $item] 0]
    }
    
    # merge --
    #
    #	Merges the partitions that two elements are in.
    #
    # Results:
    #	None.

    method merge {a b} {
	my MergeByNum [my FindNum $a] [my FindNum $b]
    }

    # num-partitions --
    #
    #	Counts the partitions of a disjoint-sets data structure
    #
    # Results:
    #	Returns the partition count.

    method num-partitions {} {
	return $nParts
    }
    
    # partitions --
    #
    #	Enumerates the partitions of a disjoint-sets data structure
    #
    # Results:
    #	Returns a list of lists. Each list is one of the partitions
    #	in the disjoint set, and each member of the sublist is one
    #	of the elements added to the structure.

    method partitions {} {

	# Find the partition number for each element, and accumulate a
	# list per partition
	set parts {}
	dict for {element eltNo} $elements {
	    set partNo [my FindByNum $eltNo]
	    dict lappend parts $partNo $element
	}
	return [dict values $parts]
    }

    # FindNum --
    #
    #	Finds the partition number for an element.
    #
    # Parameters:
    #	item - Item to look up
    #
    # Results:
    #	Returns the partition number

    method FindNum {item} {
	if {![dict exists $elements $item]} {
	    return -code error \
		-errorcode [list STRUCT DISJOINTSET NOTFOUND $item [self]] \
		"The element \"$item\" is not known to the disjoint\
                 set [self]"	  
	}
	return [my FindByNum [dict get $elements $item]]
    }

    # FindByNum --
    #
    #	Finds the partition number for an element, given the element's
    #	index
    #
    # Parameters:
    #	idx - Index of the item to look up
    #
    # Results:
    #	Returns the partition number
    #
    # Side effects:
    #	Performs path splitting

    method FindByNum {idx} {
	while {1} {
	    set parent [lindex $tree $idx 1]
	    if {$parent == $idx} {
		return $idx
	    }
	    set prev $idx
	    set idx $parent
	    lset tree $prev 1 [lindex $tree $idx 1]
	}
    }

    # MergeByNum --
    #
    #	Merges two partitions in a disjoint-sets data structure
    #
    # Parameters:
    #	x - Index of an element in the first partition
    #	y - Index of an element in the second partition
    #
    # Results:
    #	None
    #
    # Side effects:
    #	Merges the partition of the lower rank into the one of the
    #	higher rank.

    method MergeByNum {x y} {
	set xroot [my FindByNum $x]
	set yroot [my FindByNum $y]

	if {$xroot == $yroot} {
	    # The elements are already in the same partition
	    return
	}

	incr nParts -1

	# Make xroot the taller tree
	if {[lindex $tree $xroot 2] < [lindex $tree $yroot 2]} {
	    set t $xroot; set xroot $yroot; set yroot $t
	}

	# Merge yroot into xroot
	set xrank [lindex $tree $xroot 2]
	set yrank [lindex $tree $yroot 2]
	lset tree $yroot 1 $xroot
	if {$xrank == $yrank} {
	    lset tree $xroot 2 [expr {$xrank + 1}]
	}
    }
}

# ::struct::disjointset::disjointset --
#
#	Create a new disjoint set with a given name; if no name is
#	given, use disjointsetX, where X is a number.
#
# Arguments:
#	name	Optional name of the disjoint set; if not specified, generate one.
#
# Results:
#	name	Name of the disjoint set created

proc ::struct::disjointset::disjointset {args} {




    switch -exact -- [llength $args] {
	0 {


	    return [_disjointset new]
	}
	1 {
	    # Name supplied by user
	    return [uplevel 1 [list [namespace which _disjointset] \
				   create [lindex $args 0]]]
	}
	default {





	    # Too many args













	    return -code error \


		-errorcode {TCL WRONGARGS} \


































		"wrong # args: should be \"[lindex [info level 0] 0] ?name?\""






















































































































































































	}

    }

}












































namespace eval ::struct {
    namespace import disjointset::disjointset
    namespace export disjointset
}

package provide struct::disjointset 1.1
return






<
<

<
<
<
<
<
<
<
<
<
|
|





>
>






<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












>

>
>
|
|
>
>
|

|
<
|
|


>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

>

>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

|



|
<
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344

# disjointset.tcl --
#
#  Implementation of a Disjoint Set for Tcl.
#
# Copyright (c) Google Summer of Code 2008 Alejandro Eduardo Cruz Paz
# Copyright (c) 2008 Andreas Kupries (API redesign and simplification)












package require Tcl 8.2
package require struct::set

# Initialize the disjointset structure namespace. Note that any
# missing parent namespace (::struct) will be automatically created as
# well.
namespace eval ::struct::disjointset {
    # Counter for naming disjoint sets without a given name
    variable counter 0

    # Only export one command, the one used to instantiate a new
    # disjoint set
    namespace export disjointset
}





























































































































































































































































































































# ::struct::disjointset::disjointset --
#
#	Create a new disjoint set with a given name; if no name is
#	given, use disjointsetX, where X is a number.
#
# Arguments:
#	name	Optional name of the disjoint set; if not specified, generate one.
#
# Results:
#	name	Name of the disjoint set created

proc ::struct::disjointset::disjointset {args} {
    variable counter

    # Derived from the constructor of struct::queue, see file
    # "queue_tcl.tcl". Create name of not specified.
    switch -exact -- [llength [info level 0]] {
	1 {
	    # Missing name, generate one.
	    incr counter
	    set name "disjointset${counter}"
	}
	2 {

	    # Standard call. New empty disjoint set.
	    set name [lindex $args 0]
	}
	default {
	    # Error.
	    return -code error \
		"wrong # args: should be \"::struct::disjointset ?name?\""
	}
    }

    # FIRST, qualify the name.
    if {![string match "::*" $name]} {
        # Get caller's namespace; append :: if not global namespace.
        set ns [uplevel 1 [list namespace current]]
        if {"::" != $ns} {
            append ns "::"
        }
        set name "$ns$name"
    }

    # Done after qualification so that we have a canonical name and
    # know exactly what we are looking for.
    if {[llength [info commands $name]]} {
	return -code error \
	    "command \"$name\" already exists, unable to create disjointset"
    }


    # This is the structure where each disjoint set will be kept. A
    # namespace containing a list/set of the partitions, and a set of
    # all elements (for quick testing of validity when adding
    # partitions.).

    namespace eval $name {
	variable partitions {} ; # Set of partitions.
	variable all        {} ; # Set of all elements.
    }

    # Create the command to manipulate the DisjointSet
    interp alias {} ::$name {} ::struct::disjointset::DisjointSetProc $name
    return $name
}

##########################
# Private functions follow

# ::struct::disjointset::DisjointSetProc --
#
#	Command that processes all disjointset object commands.
#
# Arguments:
#	name	Name of the disjointset object to manipulate.
#	cmd	Subcommand to invoke.
#	args	Arguments for subcommand.
#
# Results:
#	Varies based on command to perform

proc ::struct::disjointset::DisjointSetProc {name {cmd ""} args} {
    # Do minimal args checks here
    if { [llength [info level 0]] == 2 } {
	error "wrong # args: should be \"$name option ?arg arg ...?\""
    }

    # Derived from the struct::queue dispatcher (see queue_tcl.tcl).
    # Gets rid of the explicit list of commands. Slower in case of an
    # error, considered acceptable, as errors should not happen, or
    # only seldomly.

    set sub _$cmd
    if { ![llength [info commands ::struct::disjointset::$sub]]} {
	set optlist [lsort [info commands ::struct::disjointset::_*]]
	set xlist {}
	foreach p $optlist {
	    set p [namespace tail $p]
	    lappend xlist [string range $p 1 end]
	}
	set optlist [linsert [join $xlist ", "] "end-1" "or"]
	return -code error \
		"bad option \"$cmd\": must be $optlist"
    }

    # Run the method in the same context as the dispatcher.
    return [uplevel 1 [linsert $args 0 ::struct::disjointset::_$cmd $name]]
}

# ::struct::disjointset::_add-partition
#
#	Creates a new partition in the disjoint set structure,
#	verifying the integrity of each new insertion for previous
#	existence in the structure.
#
# Arguments:
#	name	The name of the actual disjoint set structure
#	items	A set of elements to add to the set as a new partition.
#
# Results:
#	A new partition is added to the disjoint set.  If the disjoint
#	set already included any of the elements in any of its
#	partitions an error will be thrown.

proc ::struct::disjointset::_add-partition {name items} {
    variable ${name}::partitions
    variable ${name}::all

    # Validate that one of the elements to be added are already known.
    foreach element $items {
	if {[struct::set contains $all $element]} {
	    return -code error \
		"The element \"$element\" is already known to the disjoint set $name"
	}
    }

    struct::set add all $items
    lappend partitions  $items
    return
}

# ::struct::disjointset::_partitions
#
#	Retrieves the set of partitions the disjoint set consists of.
#
# Arguments:
#	name	The name of the disjoint set.
#
# Results:
#	A set of the partitions contained in the disjoint set.
#	If the disjoint set has no partitions the returned set
#       will be empty.

proc ::struct::disjointset::_partitions {name} {
    variable ${name}::partitions
    return $partitions
}

# ::struct::disjointset::_num-partitions
#
#	Retrieves the number of partitions the disjoint set consists of.
#
# Arguments:
#	name	The name of the disjoint set.
#
# Results:
#	The number of partitions contained in the disjoint set.

proc ::struct::disjointset::_num-partitions {name} {
    variable ${name}::partitions
    return [llength $partitions]
}

# ::struct::disjointset::_equal
#
#	Determines if the two elements belong to the same partition
#	of the disjoint set. Throws an error if either element does
#	not belong to the disjoint set at all.
#
# Arguments:
#	name	The name of the disjoint set.
#	a	The first element to be compared
#	b	The second element set to be compared
#
# Results:
#	The result of the comparison, a boolean flag.
#	True if the element are in the same partition, and False otherwise.

proc ::struct::disjointset::_equal {name a b} {
    CheckValidity $name $a
    CheckValidity $name $b
    return [expr {[FindIndex $name $a] == [FindIndex $name $b]}]
}

# ::struct::disjointset::_merge
#
#	Determines the partitions the two elements belong to and
#	merges them, if they are not the same. An error is thrown
#	if either element does not belong to the disjoint set.
#
# Arguments:
#	name	The name of the actual disjoint set structure
#	a	1st item whose partition will be merged.
#	b	2nd item whose partition will be merged.
#
# Results:
#	An empty string.

proc ::struct::disjointset::_merge {name a b} {
    CheckValidity $name $a
    CheckValidity $name $b

    set a [FindIndex $name $a]
    set b [FindIndex $name $b]

    if {$a == $b} return

    variable ${name}::partitions

    set apart [lindex $partitions $a]
    set bpart [lindex $partitions $b]

    # Remove the higher partition first, otherwise the 2nd replace
    # will access the wrong element.
    if {$b > $a} { set t $a ; set a $b ; set b $t }

    set partitions [linsert \
			[lreplace [lreplace [K $partitions [unset partitions]] \
				       $a $a] $b $b] \
			end [struct::set union $apart $bpart]]
    return
}

# ::struct::disjointset::_find
#
#	Determines and returns the partition the element belongs to.
#	Returns an empty partition if the element does not belong to
#	the disjoint set.
#
# Arguments:
#	name	The name of the disjoint set.
#	item	The element to be searched.
#
# Results:
#	Returns the partition containing the element, or an empty
#	partition if the item is not present.

proc ::struct::disjointset::_find {name item} {
    variable ${name}::all
    if {![struct::set contains $all $item]} {
	return {}
    } else {
	variable ${name}::partitions
	return [lindex $partitions [FindIndex $name $item]]
    }
}

proc ::struct::disjointset::FindIndex {name item} {
    variable ${name}::partitions
    # Check each partition directly.
    # AK XXX Future Use a nested-tree structure to make the search
    # faster

    set i 0
    foreach p $partitions {
	if {[struct::set contains $p $item]} {
	    return $i
	}
	incr i
    }
    return -1
}

# ::struct::disjointset::_destroy
#
#	Destroy the disjoint set structure and releases all memory
#	associated with it.
#
# Arguments:
#	name	The name of the actual disjoint set structure

proc ::struct::disjointset::_destroy {name} {
    namespace delete $name
    interp alias {} ::$name {}
    return
}

# ### ### ### ######### ######### #########
## Internal helper

# ::struct::disjointset::CheckValidity
#
#	Verifies if the argument element is a member of the disjoint
#	set or not. Throws an error if not.
#
# Arguments:
#	name	The name of the disjoint set
#	element	The element to look for.
#
# Results:
#	1 if element is a unary list, 0 otherwise

proc ::struct::disjointset::CheckValidity {name element} {
    variable ${name}::all
    if {![struct::set contains $all $element]} {
	return -code error \
	    "The element \"$element\" is not known to the disjoint set $name"
    }
    return
}

proc ::struct::disjointset::K { x y } { set x }

# ### ### ### ######### ######### #########
## Ready

namespace eval ::struct {
    namespace import -force disjointset::disjointset
    namespace export disjointset
}

package provide struct::disjointset 1.0

Changes to modules/struct/disjointset.test.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16


17
18
19
20
21
22
23
# -*- tcl -*-
# Test procedures for the disjoint set structure implementation
# Author: Alejandro Eduardo Cruz Paz
# 5 August 2008
# Copyright (c) 2018 by Kevin B. Kenny - reworked to a proper disjoint-sets
# data structure, added 'add-element', 'exemplars' and 'find-exemplar'.

package require tcltest
source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.6
testsNeedTcltest 1.0

support {


}
testing {
    useLocal disjointset.tcl struct::disjointset
}

############################################################
# Helper functions




<
<






|



>
>







1
2
3
4


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- tcl -*-
# Test procedures for the disjoint set structure implementation
# Author: Alejandro Eduardo Cruz Paz
# 5 August 2008



package require tcltest
source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 1.0

support {
    useAccel [useTcllibC] struct/sets.tcl struct::set
    TestAccelInit                         struct::set
}
testing {
    useLocal disjointset.tcl struct::disjointset
}

############################################################
# Helper functions
42
43
44
45
46
47
48





























































49
50




51
    return [lsort -dict $res]
}

proc djstate {ds} {
    list [canonset [$ds partitions]] [$ds num-partitions]
}






























































source [localPath disjointset.testsuite]





testsuiteCleanup







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
>
>
>
>

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
    return [lsort -dict $res]
}

proc djstate {ds} {
    list [canonset [$ds partitions]] [$ds num-partitions]
}

############################################################
## Iterate over all loaded implementations, activate
## them in turn, and run the tests for the active
## implementation.

TestAccelDo struct::set impl {
    # The global variable 'impl' is part of the public
    # API the testsuite (in set.testsuite) can expect
    # from the environment.

    switch -exact -- $impl {
	critcl {
	    if {[package vsatisfies [package present Tcl] 8.5]} {
		proc tmWrong {m loarg n} {
		    return [tcltest::wrongNumArgs "struct::disjointset $m" $loarg $n]
		}

		proc tmTooMany {m loarg} {
		    return [tcltest::tooManyArgs "struct::disjointset $m" $loarg]
		}

		proc Nothing {} {
		    return [tcltest::wrongNumArgs {struct::disjointset} {cmd ?arg ...?} 0]
		}
	    } else {
		proc tmWrong {m loarg n} {
		    return [tcltest::wrongNumArgs "::struct::disjointset $m" $loarg $n]
		}

		proc tmTooMany {m loarg} {
		    return [tcltest::tooManyArgs "::struct::disjointset $m" $loarg]
		}

		proc Nothing {} {
		    return [tcltest::wrongNumArgs {::struct::disjointset} {cmd ?arg ...?} 0]
		}
	    }
	}
	tcl {
	    if {[package vsatisfies [package present Tcl] 8.5]} {
		# In 8.5 head the alias itself is reported, not what it
		# resolved to.
		proc Nothing {} {
		    return [tcltest::wrongNumArgs struct::disjointset {cmd args} 0]
		}
	    } else {
		proc Nothing {} {
		    return [tcltest::wrongNumArgs {::struct::disjointset} {cmd args} 0]
		}
	    }

	    proc tmWrong {m loarg n} {
		return [tcltest::wrongNumArgs "::struct::disjointset::S_$m" $loarg $n]
	    }

	    proc tmTooMany {m loarg} {
		return [tcltest::tooManyArgs "::struct::disjointset::S_$m" $loarg]
	    }
	}
    }

    source [localPath disjointset.testsuite]
}

############################################################
TestAccelExit struct::set

testsuiteCleanup

Changes to modules/struct/disjointset.testsuite.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# -*- tcl -*-
# Tests for the 'disjointset' module in the 'struct' library. -*- tcl -*-
#
# This file contains a collection of tests for one or more of the Tcllib
# procedures.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2008 by Alejandro Eduardo Cruz Paz
# Copyright (c) 2008 by Andreas Kupries (extended for API changes and
# error conditions)
# Copyright (c) 2018 by Kevin B. Kenny - reworked to a proper disjoint-sets
# data structure, added 'add-element', 'exemplars' and 'find-exemplar'.
#
# RCS: @(#) $Id: disjointset.testsuite,v 1.1 2008/09/10 16:23:14 andreas_kupries Exp $

#----------------------------------------------------------------------

test disjointset-1.0 {disjointset creation} {
    ::struct::disjointset DS
    set result [djstate DS]
    DS destroy
    set result
} {{} 0}

test disjointset-1.1 {disjointset creation error} {
    catch {::struct::disjointset DS other} msg
    set result $msg
} {wrong # args: should be "::struct::disjointset ?name?"}

#----------------------------------------------------------------------

test disjointset-2.0 {disjointset add-partition error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS add-partition} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs "DS add-partition" {items} 1]

test disjointset-2.1 {disjointset add-partition error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS add-partition x y} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs "DS add-partition" {items}]

test disjointset-2.2 {disjointset add-partition error, elements already known} {
    testset
    catch {DS add-partition {1}} msg
    DS destroy
    set msg
} {The element "1" is already known to the disjoint set ::DS}

test disjointset-2.3 {disjointset add-partition, ok} {
    testset
    set result [list [DS add-partition {11 14}] [djstate DS]]
    DS destroy
    set result
} {{} {{0 {1 2 3 4} {5 6} {7 10} {8 9} {11 14}} 6}}

#----------------------------------------------------------------------

test disjointset-3.0 {disjointset partitions error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS partitions x} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs "DS partitions" {}]

test disjointset-3.1 {disjointset partitions, ok} {
    testset
    set result [djstate DS]
    DS destroy
    set result
} {{0 {1 2 3 4} {5 6} {7 10} {8 9}} 5}

test disjointset-3.2 {disjointset partitions, empty} {
    ::struct::disjointset DS
    set result [DS partitions]
    DS destroy
    set result
} {}

#----------------------------------------------------------------------

test disjointset-4.0 {disjointset equal error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS equal} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs "DS equal" {a b} 1]

test disjointset-4.1 {disjointset equal error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS equal x} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs "DS equal" {a b} 2]

test disjointset-4.2 {disjointset equal error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS equal x y z} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs "DS equal" {a b}]

test disjointset-4.3 {disjointset equal error, unknown elements} {
    testset
    catch {DS equal x 1} msg
    DS destroy
    set msg
} {The element "x" is not known to the disjoint set ::DS}

test disjointset-4.4 {disjointset equal error, unknown elements} {
    testset
    catch {DS equal 1 x} msg
    DS destroy
    set msg
} {The element "x" is not known to the disjoint set ::DS}

test disjointset-4.5 {disjointset equal ok, unequal elements} {
    testset
    set res [DS equal 1 5]
    DS destroy
    set res
} 0

test disjointset-4.6 {disjointset equal ok, equal elements} {
    testset
    set res [DS equal 4 1]
    DS destroy
    set res
} 1

#----------------------------------------------------------------------

test disjointset-5.0 {disjointset merge error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS merge} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs "DS merge" {a b} 1]

test disjointset-5.1 {disjointset merge error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS merge x} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs "DS merge" {a b} 2]

test disjointset-5.2 {disjointset merge error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS merge x y z} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs "DS merge" {a b}]

test disjointset-5.3 {disjointset merge error, unknown elements} {
    testset
    catch {DS merge x 1} msg
    DS destroy
    set msg
} {The element "x" is not known to the disjoint set ::DS}

test disjointset-5.4 {disjointset merge error, unknown elements} {
    testset
    catch {DS merge 1 x} msg
    DS destroy
    set msg
} {The element "x" is not known to the disjoint set ::DS}

test disjointset-5.5 {disjointset merge ok, different partitions} {
    testset
    DS merge 1 5
    set result [djstate DS]
    DS destroy
    set result
} {{0 {1 2 3 4 5 6} {7 10} {8 9}} 4}

test disjointset-5.6 {disjointset merge ok, same partition, no change} {
    testset
    DS merge 4 3
    set result [djstate DS]
    DS destroy
    set result
} {{0 {1 2 3 4} {5 6} {7 10} {8 9}} 5}

#----------------------------------------------------------------------

test disjointset-6.0 {disjointset find error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS find} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs "DS find" {item} 1]

test disjointset-6.1 {disjointset find error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS find x y} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs "DS find" {item}]

test disjointset-6.2 {disjointset find, unknown element} {
    testset
    set result [DS find 11]
    DS destroy
    set result
} {}

test disjointset-6.3 {disjointset find, known element} {
    testset
    set result [lsort -dict [DS find 3]]
    DS destroy
    set result
} {1 2 3 4}

#----------------------------------------------------------------------

test disjointset-7.0 {disjointset num-partitions error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS num-partitions x} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs "DS num-partitions" {}]

test disjointset-7.1 {disjointset num-partitions, ok} {
    testset
    set result [DS num-partitions]
    DS destroy
    set result
} 5

#----------------------------------------------------------------------

test disjointset-8.0 {disjointset add-element error, wrongArgs, none} {
    ::struct::disjointset DS
    catch {DS add-element} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs "DS add-element" {item} 1]

test disjointset-8.1 {disjointset add-element error, wrongArgs, too many} {
    ::struct::disjointset DS
    catch {DS add-element p q} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs "DS add-element" {item}]

test disjointset-8.2 {disjointset add-element error, duplicate element} {
    testset
    catch {DS add-element 0} message
    DS destroy
    set message
} {The element "0" is already known to the disjoint set ::DS}

test disjointset-8.3 {disjointset add-element ok} {
    testset
    DS add-element 11
    set result [djstate DS]
    DS destroy
    set result
} {{0 {1 2 3 4} {5 6} {7 10} {8 9} 11} 6}

#----------------------------------------------------------------------

test disjointset-9.0 {disjointset find-exemplar error, wrongArgs, none} {
    ::struct::disjointset DS
    catch {DS find-exemplar} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs "DS find-exemplar" {item} 1]

test disjointset-9.1 {disjointset find-exemplar error, wrongArgs, too many} {
    ::struct::disjointset DS
    catch {DS find-exemplar p q} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs "DS find-exemplar" {item}]

test disjointset-9.2 {disjointset find-exemplar error, not found} {
    testset
    catch {DS find-exemplar x} message
    DS destroy
    set message
} {The element "x" is not known to the disjoint set ::DS}    

test disjointset-9.3 {disjointset find-exemplar ok} {
    testset
    set result [DS find-exemplar 3]
    DS destroy
    expr {$result in {1 2 3 4}}
} {1}

#----------------------------------------------------------------------

test disjointset-10.0 {disjointset exemplars error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS exemplars x} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs "DS exemplars" {}]

test disjointset-10.1 {disjointset exemplars, ok} {
    ::struct::disjointset DS
    DS add-element 0
    set result [DS exemplars]
    DS destroy
    set result
} 0

test disjointset-10.2 {disjointset exemplars, empty} {
    ::struct::disjointset DS
    set result [DS exemplars]
    DS destroy
    set result
} {}

#----------------------------------------------------------------------

test disjointset-11.0 {disjointset merge - larger randomized set of merges} {
    struct::disjointset DS
    foreach item {a b c d e f g h i j k l m n o p q r s t u v w x y z} {
	DS add-partition [list $item]
    }
    DS merge g a
    DS merge o n
    DS merge v o
    DS merge c w
    DS merge r h
    DS merge s y
    DS merge g i
    DS merge d f
    DS merge m q
    DS merge a z
    DS merge k e
    DS merge x k
    DS merge r s
    DS merge h m
    DS merge d l
    DS merge e a
    DS merge o t
    DS merge q p
    DS merge u c
    DS merge o a
    DS merge p j
    DS merge b l
    DS merge p c
    DS merge f e
    set result [lsort [lmap x [DS partitions] {lsort $x}]]
    DS destroy
    set result
} {{a b d e f g i k l n o t v x z} {c h j m p q r s u w y}}

test disjointset-11.1 {disjointset merge - larger randomized set of merges} {
    struct::disjointset DS
    foreach item {a b c d e f g h i j k l m n o p q r s t u v w x y z} {
	DS add-partition [list $item]
    }
    DS merge g a
    DS merge o n
    DS merge v o
    DS merge c w
    DS merge r h
    DS merge s y
    DS merge g i
    DS merge d f
    DS merge m q
    DS merge a z
    DS merge k e
    DS merge x k
    DS merge r s
    DS merge h m
    DS merge d l
    DS merge e a
    DS merge o t
    DS merge q p
    DS merge u c
    DS merge o a
    DS merge p j
    DS merge b l
    DS merge p c
    DS merge f e
    set result [DS exemplars]
    DS destroy
    set trouble {}
    if {[llength $result] ne 2} {
	append trouble "\nShould be two exemplars, found $result"
    }
    lassign $result e1 e2
    set l1 {a b d e f g i k l n o t v x z}
    set l2 {c h j m p q r s u w y}
    if {!(($e1 in $l1) ^ ($e2 in $l1))} {
	append trouble "\nExactly one of $e1 and $e2\
                          should be in the first set"
    }
    if {!(($e1 in $l2) ^ ($e2 in $l2))} {
	append trouble "\nExactly one of $e1 and $e2\
                          should be in the second set"
    }
    set trouble
} {}








|
<
<
<





|






|






|




|

|




|

|






|








|




|

|






<
<
<
<
<
<
<


|




|

|




|

|




|

|






|






|






|








|




|

|




|

|




|

|






|






|







|









|




|

|




|

|






|








|




|

|







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223








































































































































































# -*- tcl -*-
# Tests for the 'disjointset' module in the 'struct' library. -*- tcl -*-
#
# This file contains a collection of tests for one or more of the Tcllib
# procedures.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2008 by Alejandro Eduardo Cruz Paz
# Copyright (c) 2008 by Andreas Kupries (extended for API changes and error conditions)



#
# RCS: @(#) $Id: disjointset.testsuite,v 1.1 2008/09/10 16:23:14 andreas_kupries Exp $

#----------------------------------------------------------------------

test disjointset-${impl}-1.0 {disjointset creation} {
    ::struct::disjointset DS
    set result [djstate DS]
    DS destroy
    set result
} {{} 0}

test disjointset-${impl}-1.1 {disjointset creation error} {
    catch {::struct::disjointset DS other} msg
    set result $msg
} {wrong # args: should be "::struct::disjointset ?name?"}

#----------------------------------------------------------------------

test disjointset-${impl}-2.0 {disjointset add-partition error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS add-partition} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs ::struct::disjointset::_add-partition {name items} 1]

test disjointset-${impl}-2.1 {disjointset add-partition error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS add-partition x y} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs ::struct::disjointset::_add-partition {name items}]

test disjointset-${impl}-2.2 {disjointset add-partition error, elements already known} {
    testset
    catch {DS add-partition {1}} msg
    DS destroy
    set msg
} {The element "1" is already known to the disjoint set ::DS}

test disjointset-${impl}-2.3 {disjointset add-partition, ok} {
    testset
    set result [list [DS add-partition {11 14}] [djstate DS]]
    DS destroy
    set result
} {{} {{0 {1 2 3 4} {5 6} {7 10} {8 9} {11 14}} 6}}

#----------------------------------------------------------------------

test disjointset-${impl}-3.0 {disjointset partitions error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS partitions x} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs ::struct::disjointset::_partitions {name}]

test disjointset-${impl}-3.1 {disjointset partitions, ok} {
    testset
    set result [djstate DS]
    DS destroy
    set result
} {{0 {1 2 3 4} {5 6} {7 10} {8 9}} 5}








#----------------------------------------------------------------------

test disjointset-${impl}-4.0 {disjointset equal error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS equal} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs ::struct::disjointset::_equal {name a b} 1]

test disjointset-${impl}-4.1 {disjointset equal error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS equal x} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs ::struct::disjointset::_equal {name a b} 2]

test disjointset-${impl}-4.2 {disjointset equal error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS equal x y z} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs ::struct::disjointset::_equal {name a b}]

test disjointset-${impl}-4.3 {disjointset equal error, unknown elements} {
    testset
    catch {DS equal x 1} msg
    DS destroy
    set msg
} {The element "x" is not known to the disjoint set ::DS}

test disjointset-${impl}-4.4 {disjointset equal error, unknown elements} {
    testset
    catch {DS equal 1 x} msg
    DS destroy
    set msg
} {The element "x" is not known to the disjoint set ::DS}

test disjointset-${impl}-4.5 {disjointset equal ok, unequal elements} {
    testset
    set res [DS equal 1 5]
    DS destroy
    set res
} 0

test disjointset-${impl}-4.6 {disjointset equal ok, equal elements} {
    testset
    set res [DS equal 4 1]
    DS destroy
    set res
} 1

#----------------------------------------------------------------------

test disjointset-${impl}-5.0 {disjointset merge error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS merge} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs ::struct::disjointset::_merge {name a b} 1]

test disjointset-${impl}-5.1 {disjointset merge error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS merge x} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs ::struct::disjointset::_merge {name a b} 2]

test disjointset-${impl}-5.2 {disjointset merge error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS merge x y z} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs ::struct::disjointset::_merge {name a b}]

test disjointset-${impl}-5.3 {disjointset merge error, unknown elements} {
    testset
    catch {DS merge x 1} msg
    DS destroy
    set msg
} {The element "x" is not known to the disjoint set ::DS}

test disjointset-${impl}-5.4 {disjointset merge error, unknown elements} {
    testset
    catch {DS merge 1 x} msg
    DS destroy
    set msg
} {The element "x" is not known to the disjoint set ::DS}

test disjointset-${impl}-5.5 {disjointset merge ok, different partitions} {
    testset
    DS merge 1 5
    set result [djstate DS]
    DS destroy
    set result
} {{0 {1 2 3 4 5 6} {7 10} {8 9}} 4}

test disjointset-${impl}-5.6 {disjointset merge ok, same partition, no change} {
    testset
    DS merge 4 3
    set result [djstate DS]
    DS destroy
    set result
} {{0 {1 2 3 4} {5 6} {7 10} {8 9}} 5}

#----------------------------------------------------------------------

test disjointset-${impl}-6.0 {disjointset find error, wrong#args, missing} {
    ::struct::disjointset DS
    catch {DS find} msg
    DS destroy
    set msg
} [tcltest::wrongNumArgs ::struct::disjointset::_find {name item} 1]

test disjointset-${impl}-6.1 {disjointset find error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS find x y} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs ::struct::disjointset::_find {name item}]

test disjointset-${impl}-6.2 {disjointset find, unknown element} {
    testset
    set result [DS find 11]
    DS destroy
    set result
} {}

test disjointset-${impl}-6.3 {disjointset find, known element} {
    testset
    set result [lsort -dict [DS find 3]]
    DS destroy
    set result
} {1 2 3 4}

#----------------------------------------------------------------------

test disjointset-${impl}-7.0 {disjointset num-partitions error, wrong#args, too many} {
    ::struct::disjointset DS
    catch {DS num-partitions x} msg
    DS destroy
    set msg
} [tcltest::tooManyArgs ::struct::disjointset::_num-partitions {name}]

test disjointset-${impl}-7.1 {disjointset num-partitions, ok} {
    testset
    set result [DS num-partitions]
    DS destroy
    set result
} 5

#----------------------------------------------------------------------








































































































































































Changes to modules/struct/graph.man.

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
[comment {-*- tcl -*-}][vset VERSION 2.4.3]
[manpage_begin struct::graph n [vset VERSION]]
[keywords adjacent]
[keywords arc]
[keywords cgraph]
[keywords degree]
[keywords edge]
[keywords graph]
[keywords loop]
[keywords neighbour]
[keywords node]
[keywords serialization]
[keywords subgraph]
[keywords vertex]
[copyright {2002-2009,2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Tcl Data Structures}]
[titledesc {Create and manipulate directed graph objects}]
[category  {Data structures}]
[require Tcl 8.4]
[require struct::graph [opt  [vset VERSION]]]
[require struct::list  [opt 1.5]]
[require struct::set   [opt 2.2.3]]
[description]
[para]

A directed graph is a structure containing two collections of
elements, called [term nodes] and [term arcs] respectively, together
|
|












|




|







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
[comment {-*- tcl -*-}]
[manpage_begin struct::graph n 2.4]
[keywords adjacent]
[keywords arc]
[keywords cgraph]
[keywords degree]
[keywords edge]
[keywords graph]
[keywords loop]
[keywords neighbour]
[keywords node]
[keywords serialization]
[keywords subgraph]
[keywords vertex]
[copyright {2002-2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Tcl Data Structures}]
[titledesc {Create and manipulate directed graph objects}]
[category  {Data structures}]
[require Tcl 8.4]
[require struct::graph [opt 2.4]]
[require struct::list  [opt 1.5]]
[require struct::set   [opt 2.2.3]]
[description]
[para]

A directed graph is a structure containing two collections of
elements, called [term nodes] and [term arcs] respectively, together
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
command can be used as well. The restrictions that involve connected
nodes take a variable number of nodes as argument, specified after the
name of the restriction itself.

[para]

The restrictions imposed by either [option -in], [option -out],
[option -adj], [option -inner], or [option -embedding] are applied
first. Specifying more than one of them is illegal.

[para]

After that the restrictions set via [option -key] (and
[option -value]) are applied. Specifying more than one [option -key]
(and [option -value]) is illegal. Specifying [option -value] alone,







|







393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
command can be used as well. The restrictions that involve connected
nodes take a variable number of nodes as argument, specified after the
name of the restriction itself.

[para]

The restrictions imposed by either [option -in], [option -out],
[option -adj], [option -inner], or [option -embedded] are applied
first. Specifying more than one of them is illegal.

[para]

After that the restrictions set via [option -key] (and
[option -value]) are applied. Specifying more than one [option -key]
(and [option -value]) is illegal. Specifying [option -value] alone,
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473

[def [option -embedding]]

Return a list of all arcs adjacent to exactly one of the nodes in the
set. This is the set of arcs connecting the subgraph spawned by the
specified nodes to the rest of the graph.

[list_end]

[emph Attention]: After the above options any word with a leading dash
which is not a valid option is treated as a node name instead of an
invalid option to error out on. This condition holds until either a
valid option terminates the list of nodes, or the end of the command
is reached, whichever comes first.

[para]

The remaining filter options are:

[para]

[list_begin definitions]

[def "[option -key] [arg key]"]

Limit the list of arcs that are returned to those arcs that have an
associated key [arg key].

[def "[option -value] [arg value]"]








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







444
445
446
447
448
449
450
















451
452
453
454
455
456
457

[def [option -embedding]]

Return a list of all arcs adjacent to exactly one of the nodes in the
set. This is the set of arcs connecting the subgraph spawned by the
specified nodes to the rest of the graph.

















[def "[option -key] [arg key]"]

Limit the list of arcs that are returned to those arcs that have an
associated key [arg key].

[def "[option -value] [arg value]"]

621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
of returned nodes based on neighboring nodes, or based on the keyed
values associated with the node. The restrictions that involve
neighboring nodes have a list of nodes as argument, specified after
the name of the restriction itself.

[para]

The possible restrictions are the same as for method [method arcs].

Note that while the exact meanings change slightly, as they operate on
nodes instead of arcs, the general behaviour is the same, especially
when it comes to the handling of words with a leading dash in node
lists.

[para]
The command recognizes:

[list_begin definitions]
[def [option -in]]

Return a list of all nodes with at least one outgoing arc ending in a
node found in the specified set of nodes. Alternatively specified as
the set of source nodes for the [option -in] arcs of the node set. The







|
<
|
<
<
<
<
<
|







605
606
607
608
609
610
611
612

613





614
615
616
617
618
619
620
621
of returned nodes based on neighboring nodes, or based on the keyed
values associated with the node. The restrictions that involve
neighboring nodes have a list of nodes as argument, specified after
the name of the restriction itself.

[para]

The possible restrictions are the same as for method

[method arcs]. The exact meanings change slightly, as they operate on





nodes instead of arcs. The command recognizes:

[list_begin definitions]
[def [option -in]]

Return a list of all nodes with at least one outgoing arc ending in a
node found in the specified set of nodes. Alternatively specified as
the set of source nodes for the [option -in] arcs of the node set. The
956
957
958
959
960
961
962
963
964
Both methods [method arcs] and [method nodes] have been extended with
the ability to select arcs and nodes based on an arbitrary filtering
criterium.

[list_end]

[vset CATEGORY {struct :: graph}]
[include ../common-text/feedback.inc]
[manpage_end]







|

934
935
936
937
938
939
940
941
942
Both methods [method arcs] and [method nodes] have been extended with
the ability to select arcs and nodes based on an arbitrary filtering
criterium.

[list_end]

[vset CATEGORY {struct :: graph}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/graph.tcl.

1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# graph.tcl --
#
#	Implementation of a graph data structure for Tcl.
#
# Copyright (c) 2000-2005,2019 by Andreas Kupries
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



# @mdgen EXCLUDE: graph_c.tcl

package require Tcl 8.4

namespace eval ::struct::graph {}





|



>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# graph.tcl --
#
#	Implementation of a graph data structure for Tcl.
#
# Copyright (c) 2000-2005 by Andreas Kupries
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: graph.tcl,v 1.33 2009/09/24 16:23:47 andreas_kupries Exp $

# @mdgen EXCLUDE: graph_c.tcl

package require Tcl 8.4

namespace eval ::struct::graph {}

171
172
173
174
175
176
177
178
## Ready

namespace eval ::struct {
    # Export the constructor command.
    namespace export graph
}

package provide struct::graph 2.4.3







|
173
174
175
176
177
178
179
180
## Ready

namespace eval ::struct {
    # Export the constructor command.
    namespace export graph
}

package provide struct::graph 2.4

Changes to modules/struct/graph.test.

1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16
17
# -*- tcl -*-
# graph.test:  tests for the graph structure.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2017,2019 Andreas Kupries
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









<

>
>







1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
16
17
18
# -*- tcl -*-
# graph.test:  tests for the graph structure.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.

# All rights reserved.
#
# RCS: @(#) $Id: graph.test,v 1.27 2007/04/12 03:01:54 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

Changes to modules/struct/graph/arc.c.

1
2
3
4
5
6
7
8
9
10
11
12
/* struct::tree - critcl - layer 1 declarations
 * (b) Arc operations.
 */

#include <nacommon.h>
#include <arc.h>
#include <attr.h>
#include <graph.h>
#include <util.h>

/* .................................................. */





<







1
2
3
4

5
6
7
8
9
10
11
/* struct::tree - critcl - layer 1 declarations
 * (b) Arc operations.
 */


#include <arc.h>
#include <attr.h>
#include <graph.h>
#include <util.h>

/* .................................................. */

Changes to modules/struct/graph/attr.c.

1
2
3
4
5
6
7
8
9
10
11
12
/* struct::graph - critcl - layer 1 definitions
 * (c) Graph functions
 */

#include <string.h>
#include <attr.h>
#include <util.h>

/* .................................................. */

Tcl_Obj*
g_attr_serial (Tcl_HashTable* attr, Tcl_Obj* empty)




<







1
2
3
4

5
6
7
8
9
10
11
/* struct::graph - critcl - layer 1 definitions
 * (c) Graph functions
 */


#include <attr.h>
#include <util.h>

/* .................................................. */

Tcl_Obj*
g_attr_serial (Tcl_HashTable* attr, Tcl_Obj* empty)

Changes to modules/struct/graph/filter.c.

1
2
3
4
5
6
7
8
9
10
11
12
/* struct::graph - critcl - layer 1 definitions
 * (c) Graph functions
 */

#include <string.h>
#include <nacommon.h>
#include <util.h>
#include <node.h>

/* .................................................. */

typedef enum NA_MODE {




<







1
2
3
4

5
6
7
8
9
10
11
/* struct::graph - critcl - layer 1 definitions
 * (c) Graph functions
 */


#include <nacommon.h>
#include <util.h>
#include <node.h>

/* .................................................. */

typedef enum NA_MODE {
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
    static const int mode [] = {
	NA_ADJ,   NA_EMBEDDING, -1,     NA_IN,
	NA_INNER, -1,           NA_OUT, -1
    };

    int             ac = oc;
    Tcl_Obj* const* av = ov;
    int             r, seenodes;

    na->mode   = NA_NONE;
    na->nc     = 0;
    na->nv     = NALLOC (oc, Tcl_Obj*);
    na->key    = NULL;
    na->value  = NULL;
    na->filter = NULL;

    oc -= 2; /* Skip 'graph arcs' */
    ov += 2;

    seenodes = 0;
    while (oc) {
	if ('-' == Tcl_GetString (ov[0])[0]) {
	    if (Tcl_GetIndexFromObj (interp, ov [0], restr,
				     "restriction", 0, &r) != TCL_OK) {
		if (seenodes) goto addnode;
		goto abort;
	    }
	    switch (r) {
	    case R_ADJ:
	    case R_EMB:
	    case R_IN:
	    case R_INNER:
	    case R_OUT:
		if (na->mode != NA_NONE) {
		    Tcl_SetObjResult (interp,
		      Tcl_NewStringObj ("invalid restriction: illegal multiple use of \"-in\"|\"-out\"|\"-adj\"|\"-inner\"|\"-embedding\"", -1));
		    goto abort;
		}
		na->mode = mode [r];
		seenodes = 1;
		break;
	    case R_CMD:
		if (oc < 2) goto wrongargs;
		if (na->filter) {
		    Tcl_SetObjResult (interp,
		      Tcl_NewStringObj ("invalid restriction: illegal multiple use of \"-filter\"", -1));
		    goto abort;
		}
		na->filter = ov [1];
		oc --;
		ov ++;
		seenodes = 0;
		break;
	    case R_KEY:
		if (oc < 2) goto wrongargs;
		if (na->key) {
		    Tcl_SetObjResult (interp,
		      Tcl_NewStringObj ("invalid restriction: illegal multiple use of \"-key\"", -1));
		    goto abort;
		}
		na->key = ov [1];
		oc --;
		ov ++;
		seenodes = 0;
		break;
	    case R_VAL:
		if (oc < 2) goto wrongargs;
		if (na->value) {
		    Tcl_SetObjResult (interp,
		      Tcl_NewStringObj ("invalid restriction: illegal multiple use of \"-value\"", -1));
		    goto abort;
		}
		na->value = ov [1];
		oc --;
		ov ++;
		seenodes = 0;
		break;
	    }
	    oc --;
	    ov ++;
	} else {
	addnode:
	    /* Save non-options for the list of nodes */
	    ASSERT_BOUNDS (na->nc, ac);
	    na->nv [na->nc] = ov[0];
	    na->nc ++;
	    oc --;
	    ov ++;
	}







|











<




<














<











<











<











<





<







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

117
118
119
120

121
122
123
124
125
126
127
128
129
130
131
132
133
134

135
136
137
138
139
140
141
142
143
144
145

146
147
148
149
150
151
152
153
154
155
156

157
158
159
160
161
162
163
164
165
166
167

168
169
170
171
172

173
174
175
176
177
178
179
    static const int mode [] = {
	NA_ADJ,   NA_EMBEDDING, -1,     NA_IN,
	NA_INNER, -1,           NA_OUT, -1
    };

    int             ac = oc;
    Tcl_Obj* const* av = ov;
    int             r;

    na->mode   = NA_NONE;
    na->nc     = 0;
    na->nv     = NALLOC (oc, Tcl_Obj*);
    na->key    = NULL;
    na->value  = NULL;
    na->filter = NULL;

    oc -= 2; /* Skip 'graph arcs' */
    ov += 2;


    while (oc) {
	if ('-' == Tcl_GetString (ov[0])[0]) {
	    if (Tcl_GetIndexFromObj (interp, ov [0], restr,
				     "restriction", 0, &r) != TCL_OK) {

		goto abort;
	    }
	    switch (r) {
	    case R_ADJ:
	    case R_EMB:
	    case R_IN:
	    case R_INNER:
	    case R_OUT:
		if (na->mode != NA_NONE) {
		    Tcl_SetObjResult (interp,
		      Tcl_NewStringObj ("invalid restriction: illegal multiple use of \"-in\"|\"-out\"|\"-adj\"|\"-inner\"|\"-embedding\"", -1));
		    goto abort;
		}
		na->mode = mode [r];

		break;
	    case R_CMD:
		if (oc < 2) goto wrongargs;
		if (na->filter) {
		    Tcl_SetObjResult (interp,
		      Tcl_NewStringObj ("invalid restriction: illegal multiple use of \"-filter\"", -1));
		    goto abort;
		}
		na->filter = ov [1];
		oc --;
		ov ++;

		break;
	    case R_KEY:
		if (oc < 2) goto wrongargs;
		if (na->key) {
		    Tcl_SetObjResult (interp,
		      Tcl_NewStringObj ("invalid restriction: illegal multiple use of \"-key\"", -1));
		    goto abort;
		}
		na->key = ov [1];
		oc --;
		ov ++;

		break;
	    case R_VAL:
		if (oc < 2) goto wrongargs;
		if (na->value) {
		    Tcl_SetObjResult (interp,
		      Tcl_NewStringObj ("invalid restriction: illegal multiple use of \"-value\"", -1));
		    goto abort;
		}
		na->value = ov [1];
		oc --;
		ov ++;

		break;
	    }
	    oc --;
	    ov ++;
	} else {

	    /* Save non-options for the list of nodes */
	    ASSERT_BOUNDS (na->nc, ac);
	    na->nv [na->nc] = ov[0];
	    na->nc ++;
	    oc --;
	    ov ++;
	}

Changes to modules/struct/graph/global.c.

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
    gg = ALLOC (GG);
    gg->counter = 0;

    Tcl_SetAssocData (interp, KEY, proc, (ClientData) gg);
  }
	    
  gg->counter ++;
  sprintf (gg->buf, "graph%ld", gg->counter);
  return gg->buf;
}

/* .................................................. */

static void
release (ClientData cd, Tcl_Interp* interp)







|







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
    gg = ALLOC (GG);
    gg->counter = 0;

    Tcl_SetAssocData (interp, KEY, proc, (ClientData) gg);
  }
	    
  gg->counter ++;
  sprintf (gg->buf, "graph%d", gg->counter);
  return gg->buf;
}

/* .................................................. */

static void
release (ClientData cd, Tcl_Interp* interp)

Changes to modules/struct/graph/graph.c.

159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
	    if (!n) {
		goto abort;
	    }
	    if (Tcl_FindHashEntry (&cn, (char*) n)) continue;
	    ASSERT_BOUNDS(j, lc-1);
	    he = Tcl_CreateHashEntry (&cn, (char*) n, &new);
	    lv [j] = n->base.name;
	    Tcl_SetHashValue (he, (ClientData) (long int) j);
	    j += 3;
	}
	lc = j + 1;
    } else {
	/* Enumerate all nodes */
	Tcl_HashEntry* he;
	int j, new;

	j = 0;
	for (n = (GN*) g->nodes.first;
	     n != NULL;
	     n = (GN*) n->base.next) {

	    ASSERT_BOUNDS(j, lc-1);
	    he = Tcl_CreateHashEntry (&cn, (char*) n, &new);
	    lv [j] = n->base.name;
	    Tcl_SetHashValue (he, (ClientData) (long int) j);
	    j += 3;
	}
	lc = j + 1;
    }

    empty = Tcl_NewObj ();
    Tcl_IncrRefCount (empty);







|
















|







159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
	    if (!n) {
		goto abort;
	    }
	    if (Tcl_FindHashEntry (&cn, (char*) n)) continue;
	    ASSERT_BOUNDS(j, lc-1);
	    he = Tcl_CreateHashEntry (&cn, (char*) n, &new);
	    lv [j] = n->base.name;
	    Tcl_SetHashValue (he, (ClientData) j);
	    j += 3;
	}
	lc = j + 1;
    } else {
	/* Enumerate all nodes */
	Tcl_HashEntry* he;
	int j, new;

	j = 0;
	for (n = (GN*) g->nodes.first;
	     n != NULL;
	     n = (GN*) n->base.next) {

	    ASSERT_BOUNDS(j, lc-1);
	    he = Tcl_CreateHashEntry (&cn, (char*) n, &new);
	    lv [j] = n->base.name;
	    Tcl_SetHashValue (he, (ClientData) j);
	    j += 3;
	}
	lc = j + 1;
    }

    empty = Tcl_NewObj ();
    Tcl_IncrRefCount (empty);

Changes to modules/struct/graph/methods.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* struct::tree - critcl - layer 3 definitions.
 *
 * -> Method functions.
 *    Implementations for all tree methods.
 */

#include <ctype.h>  /* is... */
#include <string.h>
#include <arc.h>
#include <graph.h>
#include <methods.h>
#include <nacommon.h>
#include <node.h>
#include <attr.h>
#include <util.h>
#include <walk.h>

/* ..................................................
 * Handling of all indices, numeric and 'end-x' forms.  Copied straight out of
 * the Tcl core as this is not exported through the public API.
 */






<






<







1
2
3
4
5
6

7
8
9
10
11
12

13
14
15
16
17
18
19
/* struct::tree - critcl - layer 3 definitions.
 *
 * -> Method functions.
 *    Implementations for all tree methods.
 */


#include <string.h>
#include <arc.h>
#include <graph.h>
#include <methods.h>
#include <nacommon.h>
#include <node.h>

#include <util.h>
#include <walk.h>

/* ..................................................
 * Handling of all indices, numeric and 'end-x' forms.  Copied straight out of
 * the Tcl core as this is not exported through the public API.
 */
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
gm_arc_DELETE (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv)
{
    /* Syntax: graph arc  delete ARC ARC...
     *	       [0]   [1]  [2]    [3] [4+]
     */

    GA* a;
    int i, new;
    Tcl_HashTable seen;

    if (objc < 4) {
	Tcl_WrongNumArgs (interp, 3, objv, "arc arc...");
	return TCL_ERROR;
    }

    Tcl_InitHashTable (&seen, TCL_STRING_KEYS);
    for (i=3; i<objc; i++) {
	a = ga_get_arc (g, objv[i], interp, objv[0]);
	if (a && (Tcl_FindHashEntry (&seen, Tcl_GetString (objv[i])) != NULL)) {
	    ga_err_missing (interp, objv[i], objv[0]);
	    a = NULL;
	}
	if (a == NULL) {
	    Tcl_DeleteHashTable (&seen);
	}
	FAIL (a);
	Tcl_CreateHashEntry (&seen, Tcl_GetString (objv[i]), &new);
    }
    Tcl_DeleteHashTable (&seen);

    for (i=3; i<objc; i++) {
	a = ga_get_arc (g, objv[i], interp, objv[0]);
	ga_delete (a);
    }
    return TCL_OK;
}







|
<






<


<
<
<
<
<
<
<

<

<







606
607
608
609
610
611
612
613

614
615
616
617
618
619

620
621







622

623

624
625
626
627
628
629
630
gm_arc_DELETE (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv)
{
    /* Syntax: graph arc  delete ARC ARC...
     *	       [0]   [1]  [2]    [3] [4+]
     */

    GA* a;
    int i;


    if (objc < 4) {
	Tcl_WrongNumArgs (interp, 3, objv, "arc arc...");
	return TCL_ERROR;
    }


    for (i=3; i<objc; i++) {
	a = ga_get_arc (g, objv[i], interp, objv[0]);







	FAIL (a);

    }


    for (i=3; i<objc; i++) {
	a = ga_get_arc (g, objv[i], interp, objv[0]);
	ga_delete (a);
    }
    return TCL_OK;
}
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
int
gm_node_DELETE (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv)
{
    /* Syntax: graph node delete NODE NODE...
     *	       [0]   [1]  [2]    [3]  [4+]
     */

    int i, new;
    GN* n;
    Tcl_HashTable seen;

    if (objc < 4) {
	Tcl_WrongNumArgs (interp, 3, objv, "node node...");
	return TCL_ERROR;
    }

    Tcl_InitHashTable (&seen, TCL_STRING_KEYS);
    for (i=3; i< objc; i++) {
	n = gn_get_node (g, objv [i], interp, objv [0]);
	if (n && (Tcl_FindHashEntry (&seen, Tcl_GetString (objv[i])) != NULL)) {
	    gn_err_missing (interp, objv[i], objv[0]);
	    n = NULL;
	}
	if (n == NULL) {
	    Tcl_DeleteHashTable (&seen);
	}
	FAIL (n);
	Tcl_CreateHashEntry (&seen, Tcl_GetString (objv[i]), &new);
    }
    Tcl_DeleteHashTable (&seen);

    for (i=3; i< objc; i++) {
	n = gn_get_node (g, objv [i], interp, objv [0]);
	gn_delete (n);
    }
    return TCL_OK;
}







|

<






<


<
<
<
<
<
<
<

<

<







1812
1813
1814
1815
1816
1817
1818
1819
1820

1821
1822
1823
1824
1825
1826

1827
1828







1829

1830

1831
1832
1833
1834
1835
1836
1837
int
gm_node_DELETE (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv)
{
    /* Syntax: graph node delete NODE NODE...
     *	       [0]   [1]  [2]    [3]  [4+]
     */

    int i;
    GN* n;


    if (objc < 4) {
	Tcl_WrongNumArgs (interp, 3, objv, "node node...");
	return TCL_ERROR;
    }


    for (i=3; i< objc; i++) {
	n = gn_get_node (g, objv [i], interp, objv [0]);







	FAIL (n);

    }


    for (i=3; i< objc; i++) {
	n = gn_get_node (g, objv [i], interp, objv [0]);
	gn_delete (n);
    }
    return TCL_OK;
}
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030

    if (objc < 3) {
	Tcl_WrongNumArgs (interp, 3, objv, "?node...?");
	return TCL_ERROR;
    }

    if (objc >= 4) {
	int       lc, i, new;
	Tcl_Obj** lv;
	Tcl_HashTable seen;

	/* Explicit node names, must not exist */
	Tcl_InitHashTable (&seen, TCL_STRING_KEYS);
	for (i=3; i<objc; i++) {
	    if ((Tcl_FindHashEntry (&seen, Tcl_GetString (objv[i])) != NULL) ||
		gn_get_node (g, objv [i], NULL, NULL)) {
		gn_err_duplicate (interp, objv[i], objv[0]);
		Tcl_DeleteHashTable (&seen);
		return TCL_ERROR;
	    }
	    Tcl_CreateHashEntry (&seen, Tcl_GetString (objv[i]), &new);
	}
	Tcl_DeleteHashTable (&seen);

	/* No matching nodes found. Create nodes with specified name, then
	 * insert them
	 */

	lc = objc-3;
	lv = NALLOC (lc, Tcl_Obj*);







|

<


|

<
|

<


<

<







1977
1978
1979
1980
1981
1982
1983
1984
1985

1986
1987
1988
1989

1990
1991

1992
1993

1994

1995
1996
1997
1998
1999
2000
2001

    if (objc < 3) {
	Tcl_WrongNumArgs (interp, 3, objv, "?node...?");
	return TCL_ERROR;
    }

    if (objc >= 4) {
	int       lc, i;
	Tcl_Obj** lv;


	/* Explicit node names, must not exist */

	for (i=3; i<objc; i++) {

	    if (gn_get_node (g, objv [i], NULL, NULL)) {
		gn_err_duplicate (interp, objv[i], objv[0]);

		return TCL_ERROR;
	    }

	}


	/* No matching nodes found. Create nodes with specified name, then
	 * insert them
	 */

	lc = objc-3;
	lv = NALLOC (lc, Tcl_Obj*);

Changes to modules/struct/graph/methods.h.

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
int gm_UNSET	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_WALK	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);

int gm_arc_APPEND     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_ATTR	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_DELETE     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_EXISTS     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_FLIP	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_GET	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_GETALL     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_GETUNWEIGH (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_GETWEIGHT  (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_HASWEIGHT  (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_INSERT     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_KEYEXISTS  (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_KEYS	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_LAPPEND    (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_MOVE	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_MOVE_SRC   (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_MOVE_TARG  (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_NODES      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_RENAME     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_SET	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_SETUNWEIGH (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_SETWEIGHT  (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_SOURCE     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_TARGET     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_UNSET      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);







<









<
<
<
<







26
27
28
29
30
31
32

33
34
35
36
37
38
39
40
41




42
43
44
45
46
47
48
int gm_UNSET	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_WALK	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);

int gm_arc_APPEND     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_ATTR	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_DELETE     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_EXISTS     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);

int gm_arc_GET	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_GETALL     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_GETUNWEIGH (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_GETWEIGHT  (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_HASWEIGHT  (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_INSERT     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_KEYEXISTS  (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_KEYS	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_LAPPEND    (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);




int gm_arc_RENAME     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_SET	      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_SETUNWEIGH (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_SETWEIGHT  (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_SOURCE     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_TARGET     (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);
int gm_arc_UNSET      (G* g, Tcl_Interp* interp, int objc, Tcl_Obj* const* objv);

Changes to modules/struct/graph/nacommon.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* struct::graph - critcl - layer 1 definitions
 * (c) Graph functions
 */

#include <nacommon.h>
#include <util.h>
#include <attr.h>
#include <node.h>

/* .................................................. */

void
gc_add (GC* c, GCC* gx)
{






<







1
2
3
4
5
6

7
8
9
10
11
12
13
/* struct::graph - critcl - layer 1 definitions
 * (c) Graph functions
 */

#include <nacommon.h>
#include <util.h>

#include <node.h>

/* .................................................. */

void
gc_add (GC* c, GCC* gx)
{

Changes to modules/struct/graph/node.c.

1
2
3
4
5
6
7
8
9
10
11
12
/* struct::graph - critcl - layer 1 declarations
 * (b) Node operations.
 */

#include <nacommon.h>
#include <arc.h>
#include <node.h>
#include <util.h>

/* .................................................. */

GN*




<







1
2
3
4

5
6
7
8
9
10
11
/* struct::graph - critcl - layer 1 declarations
 * (b) Node operations.
 */


#include <arc.h>
#include <node.h>
#include <util.h>

/* .................................................. */

GN*
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125

	/* Ignore arcs which lead out of the subgraph spanned up by the nodes
	 * in 'cn'.
	 */

	if (!he) continue;
	ASSERT_BOUNDS(i, lc);
	id = (long int) Tcl_GetHashValue (he);
	lv [i] = ga_serial (a, empty, id);
	i++;
    }
    lc = i;

    arcs = Tcl_NewListObj (lc, lv);
    ckfree ((char*) lv);







|







110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

	/* Ignore arcs which lead out of the subgraph spanned up by the nodes
	 * in 'cn'.
	 */

	if (!he) continue;
	ASSERT_BOUNDS(i, lc);
	id = (int) Tcl_GetHashValue (he);
	lv [i] = ga_serial (a, empty, id);
	i++;
    }
    lc = i;

    arcs = Tcl_NewListObj (lc, lv);
    ckfree ((char*) lv);

Changes to modules/struct/graph/tests/arc/delete.test.

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Logical arguments checks and failures

test graph-${impl}-${setimpl}-arc-delete-2.0 {arc delete, missing arc} {
    SETUP
    catch {mygraph arc delete arc0} msg
    mygraph destroy
    set msg
} [MissingArc $MY arc0]

test graph-${impl}-${setimpl}-arc-delete-2.1 {arc delete, missing arc} {
    SETUP
    mygraph node insert node0 node1
    mygraph arc  insert node0 node1 arc0

    catch {mygraph arc delete arc0 arc0} msg
    mygraph destroy
    set msg
} [MissingArc $MY arc0]

# -------------------------------------------------------------------------
# Ok arguments, single, multiple deletion.

test graph-${impl}-${setimpl}-arc-delete-3.0 {arc delete} {
    SETUP







<
<
<
<
<
<
<
<
<
<







28
29
30
31
32
33
34










35
36
37
38
39
40
41
# Logical arguments checks and failures

test graph-${impl}-${setimpl}-arc-delete-2.0 {arc delete, missing arc} {
    SETUP
    catch {mygraph arc delete arc0} msg
    mygraph destroy
    set msg










} [MissingArc $MY arc0]

# -------------------------------------------------------------------------
# Ok arguments, single, multiple deletion.

test graph-${impl}-${setimpl}-arc-delete-3.0 {arc delete} {
    SETUP

Changes to modules/struct/graph/tests/arcs.test.

229
230
231
232
233
234
235
236
237
238
239
240
241
242

243
244
245
246
247
248
249
	catch {mygraph arcs $switch} msg
	mygraph destroy
	set msg
    } "wrong # args: should be \"$MY arcs ?-key key? ?-value value? ?-filter cmd? ?-in|-out|-adj|-inner|-embedding node node...?\"" ; # {}

    incr n
}
unset n

# -------------------------------------------------------------------------
# Logical arguments checks and failures

set n 0
foreach switch {-in -out -adj -inner -embedding} {

    test graph-${impl}-${setimpl}-arcs-ioaie-2.$n "arcs, $switch, missing node" {
	SETUP
	catch {mygraph arcs $switch x} msg
	mygraph destroy
	set msg
    } [MissingNode $MY x] ; # {}








<






>







229
230
231
232
233
234
235

236
237
238
239
240
241
242
243
244
245
246
247
248
249
	catch {mygraph arcs $switch} msg
	mygraph destroy
	set msg
    } "wrong # args: should be \"$MY arcs ?-key key? ?-value value? ?-filter cmd? ?-in|-out|-adj|-inner|-embedding node node...?\"" ; # {}

    incr n
}


# -------------------------------------------------------------------------
# Logical arguments checks and failures

set n 0
foreach switch {-in -out -adj -inner -embedding} {

    test graph-${impl}-${setimpl}-arcs-ioaie-2.$n "arcs, $switch, missing node" {
	SETUP
	catch {mygraph arcs $switch x} msg
	mygraph destroy
	set msg
    } [MissingNode $MY x] ; # {}

257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
	    mygraph destroy
	    set msg
	} {invalid restriction: illegal multiple use of "-in"|"-out"|"-adj"|"-inner"|"-embedding"} ; # {}

	incr n
    }
}
unset n

# -------------------------------------------------------------------------
# Ok arguments.

set n 0
foreach {switch nodes expected} {
    -in        {1 2 3} {A B C D E F}    -in        {4 5 6} {}







<







257
258
259
260
261
262
263

264
265
266
267
268
269
270
	    mygraph destroy
	    set msg
	} {invalid restriction: illegal multiple use of "-in"|"-out"|"-adj"|"-inner"|"-embedding"} ; # {}

	incr n
    }
}


# -------------------------------------------------------------------------
# Ok arguments.

set n 0
foreach {switch nodes expected} {
    -in        {1 2 3} {A B C D E F}    -in        {4 5 6} {}
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
	set result [lsort [eval [linsert $nodes 0 mygraph arcs $switch]]]
	mygraph destroy
	set result
    } $expected ; # {}

    incr n
}
unset n

test graph-${impl}-${setimpl}-arcs-adj-1.0 {arcs -adj, border case C code failure} -setup {
    struct::graph mygraph
    mygraph node insert E
    mygraph node insert F
    mygraph arc  insert E F E_F
} -body {
    mygraph arcs -adj E
} -cleanup {
    mygraph destroy
} -result {E_F}

# ---------------------------------------------------







<













307
308
309
310
311
312
313

314
315
316
317
318
319
320
321
322
323
324
325
326
	set result [lsort [eval [linsert $nodes 0 mygraph arcs $switch]]]
	mygraph destroy
	set result
    } $expected ; # {}

    incr n
}


test graph-${impl}-${setimpl}-arcs-adj-1.0 {arcs -adj, border case C code failure} -setup {
    struct::graph mygraph
    mygraph node insert E
    mygraph node insert F
    mygraph arc  insert E F E_F
} -body {
    mygraph arcs -adj E
} -cleanup {
    mygraph destroy
} -result {E_F}

# ---------------------------------------------------

Changes to modules/struct/graph/tests/node/delete.test.

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Logical arguments checks and failures

test graph-${impl}-${setimpl}-node-delete-2.0 {node delete, missing node} {
    SETUP
    catch {mygraph node delete node0} msg
    mygraph destroy
    set msg
} [MissingNode $MY node0]

test graph-${impl}-${setimpl}-node-delete-2.1 {node delete, missing node} {
    SETUP
    mygraph node insert node0
    catch {mygraph node delete node0 node0} msg
    mygraph destroy
    set msg
} [MissingNode $MY node0]

# -------------------------------------------------------------------------
# Ok arguments, single, multiple deletion.

test graph-${impl}-${setimpl}-node-delete-3.0 {node delete, single} {
    SETUP







<
<
<
<
<
<
<
<







28
29
30
31
32
33
34








35
36
37
38
39
40
41
# Logical arguments checks and failures

test graph-${impl}-${setimpl}-node-delete-2.0 {node delete, missing node} {
    SETUP
    catch {mygraph node delete node0} msg
    mygraph destroy
    set msg








} [MissingNode $MY node0]

# -------------------------------------------------------------------------
# Ok arguments, single, multiple deletion.

test graph-${impl}-${setimpl}-node-delete-3.0 {node delete, single} {
    SETUP

Changes to modules/struct/graph/tests/node/insert.test.

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

test graph-${impl}-${setimpl}-node-insert-2.0 {node insert, duplicate node} {
    SETUP
    mygraph node insert node0
    catch {mygraph node insert node0} msg
    mygraph destroy
    set msg
} [ExistingNode $MY node0]

test graph-${impl}-${setimpl}-node-insert-2.1 {node insert, duplicate nodes} {
    SETUP
    catch {mygraph node insert node0 node0} msg
    mygraph destroy
    set msg
} [ExistingNode $MY node0]

# -------------------------------------------------------------------------
# Ok arguments. None, single, multiple, defaults

test graph-${impl}-${setimpl}-node-insert-3.0 {node insert, defaults} {
    SETUP







<
<
<
<
<
<
<







17
18
19
20
21
22
23







24
25
26
27
28
29
30

test graph-${impl}-${setimpl}-node-insert-2.0 {node insert, duplicate node} {
    SETUP
    mygraph node insert node0
    catch {mygraph node insert node0} msg
    mygraph destroy
    set msg







} [ExistingNode $MY node0]

# -------------------------------------------------------------------------
# Ok arguments. None, single, multiple, defaults

test graph-${impl}-${setimpl}-node-insert-3.0 {node insert, defaults} {
    SETUP

Changes to modules/struct/graph/tests/nodes.test.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#         graph nodes -out      NODE...
#         graph nodes -adj      NODE...
#         graph nodes -inner    NODE...
#         graph nodes -embedded NODE...

# We can use one in each group (1,2,3)

# Note: node names may have a leading dash ('-').

# Heuristics: Unknown options after (3) are considered node names
# until we reach a valid option.

# -------------------------------------------------------------------------
# Wrong # args: Missing, Too many

# Cannot have missing arguments (zero is fine),
# except when switches are in use. That however
# is tested with the switches. Ditto for too many
# arguments.







<
<
<
<
<







12
13
14
15
16
17
18





19
20
21
22
23
24
25
#         graph nodes -out      NODE...
#         graph nodes -adj      NODE...
#         graph nodes -inner    NODE...
#         graph nodes -embedded NODE...

# We can use one in each group (1,2,3)






# -------------------------------------------------------------------------
# Wrong # args: Missing, Too many

# Cannot have missing arguments (zero is fine),
# except when switches are in use. That however
# is tested with the switches. Ditto for too many
# arguments.
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
}

# -------------------------------------------------------------------------
# Ok arguments.

set n 0
foreach {switch nodes expected} {
    -in        {1 2 3} {-1 1 2 3 4 5 6} -in        {4 5 6} {}
    -out       {1 2 3} {1 2 3}          -out       {4 5 6} {1 2 3}
    -adj       {1 2 3} {-1 1 2 3 4 5 6} -adj       {4 5 6} {1 2 3}
    -inner     {1 2 3} {1 2 3}          -inner     {4 5 6} {}
    -embedding {1 2 3} {-1 4 5 6}       -embedding {4 5 6} {1 2 3}
    -in        {1 2}   {-1 1 3 4 5}     -in        {4 5}   {}
    -out       {1 2}   {2 3}            -out       {4 5}   {1 2}
    -adj       {1 2}   {-1 1 2 3 4 5}   -adj       {4 5}   {1 2}
    -inner     {1 2}   {1 2}            -inner     {4 5}   {}
    -embedding {1 2}   {-1 3 4 5}       -embedding {4 5}   {1 2}
    -in        {1}     {3 4}            -in        {4}     {}
    -out       {1}     {2}              -out       {4}     {1}
    -adj       {1}     {2 3 4}          -adj       {4}     {1}
    -inner     {1}     {}               -inner     {4}     {}
    -embedding {1}     {2 3 4}          -embedding {4}     {1}
    -in        {1 4}   {3 4}            -in        {4 2}   {-1 1 5}
    -out       {1 4}   {1 2}            -out       {4 2}   {1 3}
    -adj       {1 4}   {1 2 3 4}        -adj       {4 2}   {-1 1 3 5}
    -inner     {1 4}   {1 4}            -inner     {4 2}   {}
    -embedding {1 4}   {2 3}            -embedding {4 2}   {-1 1 3 5}
    -in        {1 -1}  {3 4}
    -out       {1 -1}  2
    -adj       {1 -1}  {2 3 4}
    -inner     {1 -1}  {}
    -embedding {1 -1}  {2 3 4}
} {
    lappend expected $switch $nodes

    test graph-${impl}-${setimpl}-nodes-ioaie-3.$n "nodes, $switch ($nodes)" {
	SETUP
	# Nodes (digits -1,1-6) and arcs (letters A-G), no direction
	#        4
	#        |A
	#        1     -1
	#      D/ \   /G
	#      /   \E/
	#     3 --- 2
	#   C/  F    \B
	#   6         5
	
	mygraph node insert 1 2 3 4 5 6 -1
	mygraph arc  insert 4 1 A
	mygraph arc  insert 5 2 B
	mygraph arc  insert 6 3 C
	mygraph arc  insert 3 1 D
	mygraph arc  insert 1 2 E
	mygraph arc  insert 2 3 F
	mygraph arc  insert -1 2 G

	set result [lsort [eval [linsert $nodes 0 mygraph nodes $switch]]]
	mygraph destroy
	lappend result $switch $nodes
	set result
    } $expected ; # {}

    incr n
}
unset n

# ---------------------------------------------------
# Test with many parallel arcs, beyond the number of nodes, i.e. lots
# of duplicated sources and destinations, to check that the dup
# removal works correctly. See bug [SF 1923685].

set n 0
foreach {switch nodes expected} {
    -in        2       1
    -out       2       3
    -adj       2       {1 3}
    -inner     {1 2 3} {1 2 3}
    -embedding 2       {1 3}
} {
    lappend expected $switch $nodes

    test graph-${impl}-${setimpl}-nodes-parallel-ioaie-bug1923685-4.$n "nodes, $switch, parallel arcs, bug 1923685" {
	SETUP

	mygraph node insert 1 2 3 4
	mygraph arc  insert 1 2 A ; mygraph arc  insert 2 3 A.
	mygraph arc  insert 1 2 B ; mygraph arc  insert 2 3 B.
	mygraph arc  insert 1 2 C ; mygraph arc  insert 2 3 C.
	mygraph arc  insert 1 2 D ; mygraph arc  insert 2 3 D.
	mygraph arc  insert 1 2 E ; mygraph arc  insert 2 3 E.
	mygraph arc  insert 1 2 F ; mygraph arc  insert 2 3 F.
	mygraph arc  insert 1 2 G ; mygraph arc  insert 2 3 G.
	mygraph arc  insert 1 2 H ; mygraph arc  insert 2 3 H.

	set result [lsort [eval [linsert $nodes 0 mygraph nodes $switch]]]
	mygraph destroy
	lappend result $switch $nodes
	set result
    } $expected ; # {}

    incr n
}
unset n

# ---------------------------------------------------







|

|

|
|

|

|





|

|

|
<
<
<
<
<

<
<
|

<
<
<
<
<
<
<
<
<
|
|






<



<





<



|










<
<















<





<


232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258





259


260
261









262
263
264
265
266
267
268
269

270
271
272

273
274
275
276
277

278
279
280
281
282
283
284
285
286
287
288
289
290
291


292
293
294
295
296
297
298
299
300
301
302
303
304
305
306

307
308
309
310
311

312
313
}

# -------------------------------------------------------------------------
# Ok arguments.

set n 0
foreach {switch nodes expected} {
    -in        {1 2 3} {1 2 3 4 5 6}    -in        {4 5 6} {}
    -out       {1 2 3} {1 2 3}          -out       {4 5 6} {1 2 3}
    -adj       {1 2 3} {1 2 3 4 5 6}    -adj       {4 5 6} {1 2 3}
    -inner     {1 2 3} {1 2 3}          -inner     {4 5 6} {}
    -embedding {1 2 3} {4 5 6}          -embedding {4 5 6} {1 2 3}
    -in        {1 2}   {1 3 4 5}        -in        {4 5}   {}
    -out       {1 2}   {2 3}            -out       {4 5}   {1 2}
    -adj       {1 2}   {1 2 3 4 5}      -adj       {4 5}   {1 2}
    -inner     {1 2}   {1 2}            -inner     {4 5}   {}
    -embedding {1 2}   {3 4 5}          -embedding {4 5}   {1 2}
    -in        {1}     {3 4}            -in        {4}     {}
    -out       {1}     {2}              -out       {4}     {1}
    -adj       {1}     {2 3 4}          -adj       {4}     {1}
    -inner     {1}     {}               -inner     {4}     {}
    -embedding {1}     {2 3 4}          -embedding {4}     {1}
    -in        {1 4}   {3 4}            -in        {4 2}   {1 5}
    -out       {1 4}   {1 2}            -out       {4 2}   {1 3}
    -adj       {1 4}   {1 2 3 4}        -adj       {4 2}   {1 3 5}
    -inner     {1 4}   {1 4}            -inner     {4 2}   {}
    -embedding {1 4}   {2 3}            -embedding {4 2}   {1 3 5}





} {


    test graph-${impl}-${setimpl}-nodes-ioaie-3.$n "nodes, $switch" {
	SETUP










	mygraph node insert 1 2 3 4 5 6
	mygraph arc  insert 4 1 A
	mygraph arc  insert 5 2 B
	mygraph arc  insert 6 3 C
	mygraph arc  insert 3 1 D
	mygraph arc  insert 1 2 E
	mygraph arc  insert 2 3 F


	set result [lsort [eval [linsert $nodes 0 mygraph nodes $switch]]]
	mygraph destroy

	set result
    } $expected ; # {}

    incr n
}


# ---------------------------------------------------
# Test with many parallel arcs, beyond the number of nodes, i.e. lots
# of duplicates sources and destinations, to check that the dup
# removal works correctly. See bug [SF 1923685].

set n 0
foreach {switch nodes expected} {
    -in        2       1
    -out       2       3
    -adj       2       {1 3}
    -inner     {1 2 3} {1 2 3}
    -embedding 2       {1 3}
} {


    test graph-${impl}-${setimpl}-nodes-parallel-ioaie-bug1923685-4.$n "nodes, $switch, parallel arcs, bug 1923685" {
	SETUP

	mygraph node insert 1 2 3 4
	mygraph arc  insert 1 2 A ; mygraph arc  insert 2 3 A.
	mygraph arc  insert 1 2 B ; mygraph arc  insert 2 3 B.
	mygraph arc  insert 1 2 C ; mygraph arc  insert 2 3 C.
	mygraph arc  insert 1 2 D ; mygraph arc  insert 2 3 D.
	mygraph arc  insert 1 2 E ; mygraph arc  insert 2 3 E.
	mygraph arc  insert 1 2 F ; mygraph arc  insert 2 3 F.
	mygraph arc  insert 1 2 G ; mygraph arc  insert 2 3 G.
	mygraph arc  insert 1 2 H ; mygraph arc  insert 2 3 H.

	set result [lsort [eval [linsert $nodes 0 mygraph nodes $switch]]]
	mygraph destroy

	set result
    } $expected ; # {}

    incr n
}


# ---------------------------------------------------

Changes to modules/struct/graph/tests/walk.test.

1
2
3
4

5
6
7
8
9
10
11
# -*- tcl -*-
# Graph tests - walk
# Copyright (c) 2006-2017 Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.


# Syntax: graph walk NODE ?-dir forward|backward? ?-order pre|post|both? ?-type bfs|dfs? -command cmd

# -------------------------------------------------------------------------
# Wrong # args: Missing, Too many

test graph-${impl}-${setimpl}-walk-1.0 {walk, wrong#args, missing} {} {


|

>







1
2
3
4
5
6
7
8
9
10
11
12
# -*- tcl -*-
# Graph tests - walk
# Copyright (c) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
# RCS: @(#) $Id: walk.test,v 1.3 2008/12/13 03:57:33 andreas_kupries Exp $

# Syntax: graph walk NODE ?-dir forward|backward? ?-order pre|post|both? ?-type bfs|dfs? -command cmd

# -------------------------------------------------------------------------
# Wrong # args: Missing, Too many

test graph-${impl}-${setimpl}-walk-1.0 {walk, wrong#args, missing} {} {
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
    set t [list ]
    mygraph walk ix -dir backward -order both -command record
    mygraph destroy
    set t
} [tmE  {enter ix enter i enter viii enter vi enter v enter iv enter iii enter ii leave ii leave iii leave iv leave v enter vii leave vii leave vi leave viii leave i leave ix} \
	{enter ix enter i enter viii enter vi enter vii leave vii enter v enter iv enter iii enter ii leave ii leave iii leave iv leave v leave vi leave viii leave i leave ix}]

# -------------------------------------------------------------------------

test graph-${impl}-${setimpl}-tkt.39ab616d8f-walk-4.0 {Ticket 39ab616d8f, dfs pre-order} -setup {
    SETUP
    mygraph node insert a
    mygraph node insert b
    mygraph node insert c
    mygraph arc insert a b ab
    mygraph arc insert b c bc
    mygraph arc insert a c ac
    #  /-> b -\
    # a -----> c
    set t {}    
} -body {
    mygraph walk a -command record -dir forward -order pre -type dfs
    set t
} -cleanup {
    mygraph destroy
    unset t
} -result [tmE {enter a enter b enter c} {enter a enter c enter b}]

test graph-${impl}-${setimpl}-tkt.39ab616d8f-walk-4.1 {Ticket 39ab616d8f, dfs pre-order} -setup {
    # This is like 4.0, with arcs ab, ac inserted in reverse
    # order. This forces the Critcl implementation into the same
    # situation as 4.0 does for Tcl, having c in the work stack as
    # neighbour of a and then getting visited from b before reahed
    # again. Passes.
    SETUP
    mygraph node insert a
    mygraph node insert b
    mygraph node insert c
    mygraph arc insert a c ac
    mygraph arc insert a b ab
    mygraph arc insert b c bc
    #  /-> b -\
    # a -----> c
    set t {}    
} -body {
    mygraph walk a -command record -dir forward -order pre -type dfs
    set t
} -cleanup {
    mygraph destroy
    unset t
} -result [tmE {enter a enter c enter b} {enter a enter b enter c}]

# -------------------------------------------------------------------------

rename record {}

# -------------------------------------------------------------------------









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



196
197
198
199
200
201
202
203
204













































205
206
207
    set t [list ]
    mygraph walk ix -dir backward -order both -command record
    mygraph destroy
    set t
} [tmE  {enter ix enter i enter viii enter vi enter v enter iv enter iii enter ii leave ii leave iii leave iv leave v enter vii leave vii leave vi leave viii leave i leave ix} \
	{enter ix enter i enter viii enter vi enter vii leave vii enter v enter iv enter iii enter ii leave ii leave iii leave iv leave v leave vi leave viii leave i leave ix}]

# -------------------------------------------------------------------------














































rename record {}

# -------------------------------------------------------------------------

Changes to modules/struct/graph/walk.c.

1
2
3
4
5
6
7
8
9
10

#include "tcl.h"
#include <string.h>
#include <graph.h>
#include <util.h>
#include <walk.h>

/* .................................................. */

static int walkdfspre  (Tcl_Interp* interp, GN* n, int dir,


<







1
2

3
4
5
6
7
8
9

#include "tcl.h"

#include <graph.h>
#include <util.h>
#include <walk.h>

/* .................................................. */

static int walkdfspre  (Tcl_Interp* interp, GN* n, int dir,

Changes to modules/struct/graph1.man.

367
368
369
370
371
372
373
374
375
node appended. For a pre-order walk, all nodes are [const enter]ed, for a
post-order all nodes are left. In a both-order walk the first visit of
a node [const enter]s it, the second visit [const leave]s it.

[list_end]

[vset CATEGORY {struct :: graph}]
[include ../common-text/feedback.inc]
[manpage_end]







|

367
368
369
370
371
372
373
374
375
node appended. For a pre-order walk, all nodes are [const enter]ed, for a
post-order all nodes are left. In a both-order walk the first visit of
a node [const enter]s it, the second visit [const leave]s it.

[list_end]

[vset CATEGORY {struct :: graph}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/graph_c.tcl.

1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16
17
18
19
20
21
# graphc.tcl --
#
#       Implementation of a graph data structure for Tcl.
#       This code based on critcl, API compatible to the PTI [x].
#       [x] Pure Tcl Implementation.
#
# Copyright (c) 2006,2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require critcl
# @sak notprovided struct_graphc
package provide struct_graphc 2.4.3
package require Tcl 8.2

namespace eval ::struct {
    # Supporting code for the main command.

    catch {
	#critcl::cheaders -g






|



>
>



|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# graphc.tcl --
#
#       Implementation of a graph data structure for Tcl.
#       This code based on critcl, API compatible to the PTI [x].
#       [x] Pure Tcl Implementation.
#
# Copyright (c) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: graph_c.tcl,v 1.3 2008/03/25 07:15:34 andreas_kupries Exp $

package require critcl
# @sak notprovided struct_graphc
package provide struct_graphc 2.1
package require Tcl 8.2

namespace eval ::struct {
    # Supporting code for the main command.

    catch {
	#critcl::cheaders -g

Changes to modules/struct/graph_tcl.tcl.

1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16
# graph_tcl.tcl --
#
#	Implementation of a graph data structure for Tcl.
#
# Copyright (c) 2000-2009,2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# Copyright (c) 2008           by Alejandro Paz <vidriloco@gmail.com>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require Tcl 8.4
package require struct::list
package require struct::set

namespace eval ::struct::graph {
    # Data storage in the graph module




|
|



>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# graph_tcl.tcl --
#
#	Implementation of a graph data structure for Tcl.
#
# Copyright (c) 2000-2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# Copyright (c) 2008      by Alejandro Paz <vidriloco@gmail.com>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: graph_tcl.tcl,v 1.5 2009/11/26 04:42:16 andreas_kupries Exp $

package require Tcl 8.4
package require struct::list
package require struct::set

namespace eval ::struct::graph {
    # Data storage in the graph module
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
#	None.

proc ::struct::graph::__arc_delete {name args} {
    if {![llength $args]} {
	return {wrong # args: should be "::struct::graph::__arc_delete name arc arc..."}
    }

    # seen is used to catch duplicate arcs in the args
    array set seen {}
    foreach arc $args {
	if {[info exists seen($arc)]} {
	    return -code error "arc \"$arc\" does not exist in graph \"$name\""
	}
	CheckMissingArc $name $arc
	set seen($arc) .
    }

    variable ${name}::inArcs
    variable ${name}::outArcs
    variable ${name}::arcNodes
    variable ${name}::arcAttr
    variable ${name}::arcWeight








<
<
|
<
<
<
<
<
<







316
317
318
319
320
321
322


323






324
325
326
327
328
329
330
#	None.

proc ::struct::graph::__arc_delete {name args} {
    if {![llength $args]} {
	return {wrong # args: should be "::struct::graph::__arc_delete name arc arc..."}
    }



    foreach arc $args {CheckMissingArc $name $arc}







    variable ${name}::inArcs
    variable ${name}::outArcs
    variable ${name}::arcNodes
    variable ${name}::arcAttr
    variable ${name}::arcWeight

1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
# Results:
#	None.

proc ::struct::graph::__node_delete {name args} {
    if {![llength $args]} {
	return {wrong # args: should be "::struct::graph::__node_delete name node node..."}
    }
    # seen is used to catch duplicate nodes in the args
    array set seen {}
    foreach node $args {
	if {[info exists seen($node)]} {
	    return -code error "node \"$node\" does not exist in graph \"$name\""
	}
	CheckMissingNode $name $node
	set seen($node) .
    }

    variable ${name}::inArcs
    variable ${name}::outArcs
    variable ${name}::nodeAttr

    foreach node $args {
	# Remove all the arcs connected to this node







<
<
|
<
<
<
<
<
<







1676
1677
1678
1679
1680
1681
1682


1683






1684
1685
1686
1687
1688
1689
1690
# Results:
#	None.

proc ::struct::graph::__node_delete {name args} {
    if {![llength $args]} {
	return {wrong # args: should be "::struct::graph::__node_delete name node node..."}
    }


    foreach node $args {CheckMissingNode $name $node}







    variable ${name}::inArcs
    variable ${name}::outArcs
    variable ${name}::nodeAttr

    foreach node $args {
	# Remove all the arcs connected to this node
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
#	node		The name of the new node.

proc ::struct::graph::__node_insert {name args} {
    if {[llength $args] == 0} {
	# No node name was given; generate a unique one
	set args [list [__generateUniqueNodeName $name]]
    } else {
	# seen is used to catch duplicate nodes in the args
	array set seen {}
	foreach node $args {
	    if {[info exists seen($node)]} {
		return -code error "node \"$node\" already exists in graph \"$name\""
	    }
	    CheckDuplicateNode $name $node
	    set seen($node) .
	}
    }
    
    variable ${name}::inArcs
    variable ${name}::outArcs

    foreach node $args {
	# Set up the new node







<
<
|
<
<
<
<
<
<







1843
1844
1845
1846
1847
1848
1849


1850






1851
1852
1853
1854
1855
1856
1857
#	node		The name of the new node.

proc ::struct::graph::__node_insert {name args} {
    if {[llength $args] == 0} {
	# No node name was given; generate a unique one
	set args [list [__generateUniqueNodeName $name]]
    } else {


	foreach node $args {CheckDuplicateNode $name $node}






    }
    
    variable ${name}::inArcs
    variable ${name}::outArcs

    foreach node $args {
	# Set up the new node
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
	if { [string equal $order "pre"] } {
	    # Pre-order Depth-first search

	    while { [llength $st] > 0 } {
		set node [lindex   $st end]
		ldelete st end

		# Skip all nodes already visited via some other path
		# through the graph.
		if {[info exists visited($node)]} continue
		
		# Evaluate the command at this node
		set cmdcpy $cmd
		lappend cmdcpy enter $name $node
		uplevel 1 $cmdcpy

		set visited($node) .








<
<
<
<







2763
2764
2765
2766
2767
2768
2769




2770
2771
2772
2773
2774
2775
2776
	if { [string equal $order "pre"] } {
	    # Pre-order Depth-first search

	    while { [llength $st] > 0 } {
		set node [lindex   $st end]
		ldelete st end





		# Evaluate the command at this node
		set cmdcpy $cmd
		lappend cmdcpy enter $name $node
		uplevel 1 $cmdcpy

		set visited($node) .

3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
    upvar 1 value      value      ; set value      {}
    upvar 1 haveFilter haveFilter ; set haveFilter 0
    upvar 1 fcmd       fcmd       ; set fcmd       {}
    upvar 1 cond       cond       ; set cond       "none"
    upvar 1 condNodes  condNodes  ; set condNodes  {}

    set wa_usage "wrong # args: should be \"$name $what ?-key key? ?-value value? ?-filter cmd? ?-in|-out|-adj|-inner|-embedding node node...?\""
    set seenodes 0
    
    for {set i 0} {$i < [llength $arguments]} {incr i} {
	set arg [lindex $arguments $i]
	switch -glob -- $arg {
	    -in -
	    -out -
	    -adj -
	    -inner -
	    -embedding {
		if {$haveCond} {
		    return -code error "invalid restriction:\
			    illegal multiple use of\
			    \"-in\"|\"-out\"|\"-adj\"|\"-inner\"|\"-embedding\""
		}

		set haveCond 1
		set cond [string range $arg 1 end]
		set seenodes 1
	    }
	    -key {
		if {($i + 1) == [llength $arguments]} {
		    return -code error $wa_usage
		}
		if {$haveKey} {
		    return -code error {invalid restriction: illegal multiple use of "-key"}
		}

		incr i
		set key [lindex $arguments $i]
		set haveKey 1
		set seenodes 0
	    }
	    -value {
		if {($i + 1) == [llength $arguments]} {
		    return -code error $wa_usage
		}
		if {$haveValue} {
		    return -code error {invalid restriction: illegal multiple use of "-value"}
		}

		incr i
		set value [lindex $arguments $i]
		set haveValue 1
		set seenodes 0
	    }
	    -filter {
		if {($i + 1) == [llength $arguments]} {
		    return -code error $wa_usage
		}
		if {$haveFilter} {
		    return -code error {invalid restriction: illegal multiple use of "-filter"}
		}

		incr i
		set fcmd [lindex $arguments $i]
		set haveFilter 1
		set seenodes 0
	    }
	    -* {
		if {$seenodes} {
		    lappend condNodes $arg
		} else {
		    return -code error "bad restriction \"$arg\": must be -adj, -embedding,\
			-filter, -in, -inner, -key, -out, or -value"
		}
	    }
	    default {
		lappend condNodes $arg
	    }
	}
    }








<
|
















<












<












<












<


<
<
<
|

<







2993
2994
2995
2996
2997
2998
2999

3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016

3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028

3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040

3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052

3053
3054



3055
3056

3057
3058
3059
3060
3061
3062
3063
    upvar 1 value      value      ; set value      {}
    upvar 1 haveFilter haveFilter ; set haveFilter 0
    upvar 1 fcmd       fcmd       ; set fcmd       {}
    upvar 1 cond       cond       ; set cond       "none"
    upvar 1 condNodes  condNodes  ; set condNodes  {}

    set wa_usage "wrong # args: should be \"$name $what ?-key key? ?-value value? ?-filter cmd? ?-in|-out|-adj|-inner|-embedding node node...?\""


    for {set i 0} {$i < [llength $arguments]} {incr i} {
	set arg [lindex $arguments $i]
	switch -glob -- $arg {
	    -in -
	    -out -
	    -adj -
	    -inner -
	    -embedding {
		if {$haveCond} {
		    return -code error "invalid restriction:\
			    illegal multiple use of\
			    \"-in\"|\"-out\"|\"-adj\"|\"-inner\"|\"-embedding\""
		}

		set haveCond 1
		set cond [string range $arg 1 end]

	    }
	    -key {
		if {($i + 1) == [llength $arguments]} {
		    return -code error $wa_usage
		}
		if {$haveKey} {
		    return -code error {invalid restriction: illegal multiple use of "-key"}
		}

		incr i
		set key [lindex $arguments $i]
		set haveKey 1

	    }
	    -value {
		if {($i + 1) == [llength $arguments]} {
		    return -code error $wa_usage
		}
		if {$haveValue} {
		    return -code error {invalid restriction: illegal multiple use of "-value"}
		}

		incr i
		set value [lindex $arguments $i]
		set haveValue 1

	    }
	    -filter {
		if {($i + 1) == [llength $arguments]} {
		    return -code error $wa_usage
		}
		if {$haveFilter} {
		    return -code error {invalid restriction: illegal multiple use of "-filter"}
		}

		incr i
		set fcmd [lindex $arguments $i]
		set haveFilter 1

	    }
	    -* {



		return -code error "bad restriction \"$arg\": must be -adj, -embedding,\
			-filter, -in, -inner, -key, -out, or -value"

	    }
	    default {
		lappend condNodes $arg
	    }
	}
    }

Changes to modules/struct/graphops.man.

1
2
3
4
5
6
7
8
9
10
[comment {-*- tcl -*-}]
[vset VERSION 0.11.3]
[manpage_begin struct::graph::op n [vset VERSION]]
[keywords {adjacency list}]
[keywords {adjacency matrix}]
[keywords adjacent]
[keywords {approximation algorithm}]
[keywords arc]
[keywords {articulation point}]
[keywords {augmenting network}]

<
|







1

2
3
4
5
6
7
8
9
[comment {-*- tcl -*-}]

[manpage_begin struct::graph::op n 0.11.3]
[keywords {adjacency list}]
[keywords {adjacency matrix}]
[keywords adjacent]
[keywords {approximation algorithm}]
[keywords arc]
[keywords {articulation point}]
[keywords {augmenting network}]
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
[keywords {vertex cover}]
[copyright {2008 Alejandro Paz <vidriloco@gmail.com>}]
[copyright {2008 (docs) Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[copyright {2009 Michal Antoniewski <antoniewski.m@gmail.com>}]
[moddesc   {Tcl Data Structures}]
[titledesc {Operation for (un)directed graph objects}]
[category  {Data structures}]
[require Tcl 8.6]
[require struct::graph::op [opt [vset VERSION]]]
[comment {[require struct::graph [opt 2.3]]   }]
[comment {[require struct::list  [opt 1.5]]   }]
[comment {[require struct::set   [opt 2.2.3]] }]
[description]
[para]

The package described by this document, [package struct::graph::op],







|
|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[keywords {vertex cover}]
[copyright {2008 Alejandro Paz <vidriloco@gmail.com>}]
[copyright {2008 (docs) Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[copyright {2009 Michal Antoniewski <antoniewski.m@gmail.com>}]
[moddesc   {Tcl Data Structures}]
[titledesc {Operation for (un)directed graph objects}]
[category  {Data structures}]
[require Tcl 8.4]
[require struct::graph::op [opt 0.11.3]]
[comment {[require struct::graph [opt 2.3]]   }]
[comment {[require struct::list  [opt 1.5]]   }]
[comment {[require struct::set   [opt 2.2.3]] }]
[description]
[para]

The package described by this document, [package struct::graph::op],
1311
1312
1313
1314
1315
1316
1317
1318
1319
[enum] [uri http://www.csc.kth.se/~viggo/wwwcompendium/node128.html {K-Center problem}]
[enum] [uri http://en.wikipedia.org/wiki/Breadth-first_search {BFS}]
[enum] [uri http://en.wikipedia.org/wiki/Degree-constrained_spanning_tree {Minimum Degree Spanning Tree}]
[enum] [uri http://en.wikipedia.org/wiki/Approximation_algorithm {Approximation algorithm}]
[list_end]

[vset CATEGORY {struct :: graph}]
[include ../common-text/feedback.inc]
[manpage_end]







|

1310
1311
1312
1313
1314
1315
1316
1317
1318
[enum] [uri http://www.csc.kth.se/~viggo/wwwcompendium/node128.html {K-Center problem}]
[enum] [uri http://en.wikipedia.org/wiki/Breadth-first_search {BFS}]
[enum] [uri http://en.wikipedia.org/wiki/Degree-constrained_spanning_tree {Minimum Degree Spanning Tree}]
[enum] [uri http://en.wikipedia.org/wiki/Approximation_algorithm {Approximation algorithm}]
[list_end]

[vset CATEGORY {struct :: graph}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/graphops.tcl.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: graphops.tcl,v 1.19 2009/09/24 19:30:10 andreas_kupries Exp $

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.6

package require struct::disjointset ; # Used by kruskal -- 8.6 required
package require struct::prioqueue   ; # Used by kruskal, prim
package require struct::queue       ; # Used by isBipartite?, connectedComponent(Of)
package require struct::stack       ; # Used by tarjan
package require struct::graph       ; # isBridge, isCutVertex
package require struct::tree        ; # Used by BFS

# ### ### ### ######### ######### #########







|

|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: graphops.tcl,v 1.19 2009/09/24 19:30:10 andreas_kupries Exp $

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.5

package require struct::disjointset ; # Used by kruskal
package require struct::prioqueue   ; # Used by kruskal, prim
package require struct::queue       ; # Used by isBipartite?, connectedComponent(Of)
package require struct::stack       ; # Used by tarjan
package require struct::graph       ; # isBridge, isCutVertex
package require struct::tree        ; # Used by BFS

# ### ### ### ######### ######### #########

Changes to modules/struct/graphops.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.6
testsNeedTcltest 2.0

support {
    useLocal list.tcl struct::list

    useAccel [useTcllibC] struct/tree.tcl  struct::tree
    TestAccelInit                          struct::tree







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0

support {
    useLocal list.tcl struct::list

    useAccel [useTcllibC] struct/tree.tcl  struct::tree
    TestAccelInit                          struct::tree

Changes to modules/struct/list.tcl.

643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
		"wrong#args: should be \"::struct::list::Lflatten ?-full? ?--? sequence\""
    }

    set full 0
    while {[string match -* [set opt [::lindex $args 0]]]} {
	switch -glob -- $opt {
	    -full   {set full 1}
	    --      {
                set args [::lrange $args 1 end]
                break ; # fix ticket 6e778502b8 -- break exits while loop
            }
	    default {
		return -code error "Unknown option \"$opt\", should be either -full, or --"
	    }
	}
	set args [::lrange $args 1 end]
    }








|
<
<
<







643
644
645
646
647
648
649
650



651
652
653
654
655
656
657
		"wrong#args: should be \"::struct::list::Lflatten ?-full? ?--? sequence\""
    }

    set full 0
    while {[string match -* [set opt [::lindex $args 0]]]} {
	switch -glob -- $opt {
	    -full   {set full 1}
	    --      {break}



	    default {
		return -code error "Unknown option \"$opt\", should be either -full, or --"
	    }
	}
	set args [::lrange $args 1 end]
    }

1824
1825
1826
1827
1828
1829
1830
1831
## Ready

namespace eval ::struct {
    # Get 'list::list' into the general structure namespace.
    namespace import -force list::list
    namespace export list
}
package provide struct::list 1.8.4







|
1821
1822
1823
1824
1825
1826
1827
1828
## Ready

namespace eval ::struct {
    # Get 'list::list' into the general structure namespace.
    namespace import -force list::list
    namespace export list
}
package provide struct::list 1.8.3

Changes to modules/struct/list.test.

387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
    flatten [list "'" "\""]
} {' {"}} ; # " help emacs highlighting

test flatten-1.6 {flatten command} {
    flatten [list "{" "}"]
} "\\\{ \\\}"

test flatten-1.7 {check -- argument termination} {
    flatten -full -- {1 2 3 {4 5} {6 7} {{8 9}} 10}
} {1 2 3 4 5 6 7 8 9 10}

test flatten-2.1 {flatten errors} {
    list [catch {flatten} msg] $msg
} {1 {wrong#args: should be "::struct::list::Lflatten ?-full? ?--? sequence"}}

test flatten-2.2 {flatten errors} {
    list [catch {flatten -all {a {b c d} {e {f g}}}} msg] $msg
} {1 {Unknown option "-all", should be either -full, or --}}







<
<
<
<







387
388
389
390
391
392
393




394
395
396
397
398
399
400
    flatten [list "'" "\""]
} {' {"}} ; # " help emacs highlighting

test flatten-1.6 {flatten command} {
    flatten [list "{" "}"]
} "\\\{ \\\}"





test flatten-2.1 {flatten errors} {
    list [catch {flatten} msg] $msg
} {1 {wrong#args: should be "::struct::list::Lflatten ?-full? ?--? sequence"}}

test flatten-2.2 {flatten errors} {
    list [catch {flatten -all {a {b c d} {e {f g}}}} msg] $msg
} {1 {Unknown option "-all", should be either -full, or --}}

Deleted modules/struct/map.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# map.tcl --
# Copyright (c) 2009-2019 Andreas Kupries <andreas_kupries@sourceforge.net>
#
# Object wrapper around array/dict. Useful as key/value store in
# larger systems.
#
# Examples:
# - configuration mgmt in doctools v2 import/export managers
# - pt import/export managers
#
# Each object manages a key/value map.

# ### ### ### ######### ######### #########
## Requisites

package require Tcl 8.4
package require snit

# ### ### ### ######### ######### #########
## API

# ATTENTION:
##
# From an API point of view the code below is equivalent to the much
# shorter `snit::type struct::map { ... }`.
#
# Then why the more complex form ?
#
# When snit compiles the class to Tcl code, and later on when methods
# are executed it will happen in the `struct` namespace. The moment
# this package is used together with `struct::set` all unqualified
# `set` statements will go bonkers, eiter in snit, or, here, in method
# `set`, because they get resolved to the `struct::set` dispatcher
# instead of `::set`. Moving the implementation a level deeper makes
# the `struct::map` namespace the context, with no conflict.

# Future / TODO: Convert all the OO stuff here over to TclOO, as much
# as possible (snit configure/cget support is currently still better,
# ditto hierarchical methods).

namespace eval ::struct {}

proc ::struct::map {args} {
    uplevel 1 [linsert $args 0 struct::map::I]
}

snit::type ::struct::map::I {

    # ### ### ### ######### ######### #########
    ## Options :: None

    # ### ### ### ######### ######### #########
    ## Creating, destruction

    # Default constructor.
    # Default destructor.

    # ### ### ### ######### ######### #########
    ## Public methods. Reading and writing the map.

    method names {} {
	return [array names mymap]
    }

    method get {} {
	return [array get mymap]
    }

    method set {name {value {}}} {
	# 7 instead of 3 in the condition below, because of the 4
	# implicit arguments snit is providing to each method.
	if {[llength [info level 0]] == 7} {
	    ::set mymap($name) $value
	} elseif {![info exists mymap($name)]} {
	    return -code error "can't read \"$name\": no such variable"
	}
	return $mymap($name)
    }

    method unset {args} {
	if {![llength $args]} { lappend args * }
	foreach pattern $args {
	    array unset mymap $pattern
	}
	return
    }

    # ### ### ### ######### ######### #########
    ## Internal methods :: None.

    # ### ### ### ######### ######### #########
    ## State :: Map data, Tcl array

    variable mymap -array {}

    ##
    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide struct::map 1
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































































































































































Deleted modules/struct/map.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# -*- tcl -*-
# map.test:  Testsuite for package struct::map
#
# Copyright (c) 2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

support {
    use       snit/snit.tcl   snit
}
testing {
    useLocal map.tcl struct::map
}

# ---------------------------------------------------------------------
# [] constructor
# [] destructor
# [] get
# [] names
# [] set
# [] unset

#----------------------------------------------------------------------
## Constructor, destructor

test struct-map-1.0 {constructor, wrong args, too many} -body {
    struct::map M X
} -returnCodes error -result {Error in constructor: wrong # args: should be "::struct::map::I::Snit_constructor type selfns win self"}

test struct-map-1.1 {instance, bogus method} -setup {
    struct::map M
} -cleanup {
    M destroy
} -body {
    M bogus
} -returnCodes error -result {"::M bogus" is not defined}

#----------------------------------------------------------------------
## get

test struct-map-2.0 {get, wrong args, too many} -setup {
    struct::map M
} -cleanup {
    M destroy
} -body {
    M get X
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodget type selfns win self"}

test struct-map-2.1 {get, base state, none} -setup {
    struct::map M
} -cleanup {
    M destroy
} -body {
    M get
} -result {}

#----------------------------------------------------------------------
## names

test struct-map-3.0 {names, wrong args, too many} -setup {
    struct::map M
} -cleanup {
    M destroy
} -body {
    M names X
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodnames type selfns win self"}

test struct-map-3.1 {names, base state, none} -setup {
    struct::map M
} -cleanup {
    M destroy
} -body {
    M names
} -result {}

#----------------------------------------------------------------------
## set

test struct-map-4.0 {set, wrong args, not enough} -setup {
    struct::map M
} -cleanup {
    M destroy
} -body {
    M set
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test struct-map-4.1 {set, wrong args, too many} -setup {
    struct::map M
} -cleanup {
    M destroy
} -body {
    M set K V X
} -returnCodes error -result {wrong # args: should be "::struct::map::I::Snit_methodset type selfns win self name ?value?"}

test struct-map-4.2 {set, state change, result} -setup {
    struct::map M
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M set K V] [M names] [M get]
} -result {{} {} V K {K V}}

#----------------------------------------------------------------------
## unset

test struct-map-5.2 {unset, known key, state change, result} -setup {
    struct::map M
    M set K V
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M unset K] [M names] [M get]
} -result {K {K V} {} {} {}}

test struct-map-5.3 {unset, missing key, no state change, result} -setup {
    struct::map M
    M set K V
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M unset K'] [M names] [M get]
} -result {K {K V} {} K {K V}}

test struct-map-5.4 {unset, no pattern, clear, result} -setup {
    struct::map M
    M set K V
} -cleanup {
    M destroy
} -body {
    list [M names] [M get] [M unset] [M names] [M get]
} -result {K {K V} {} {} {}}

#----------------------------------------------------------------------
testsuiteCleanup
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































































































Changes to modules/struct/matrix.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[vset VERSION 2.0.4]
[comment {-*- tcl -*-}]
[manpage_begin struct::matrix n [vset VERSION]]
[keywords matrix]
[copyright {2002-2013,2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Tcl Data Structures}]
[titledesc {Create and manipulate matrix objects}]
[category  {Data structures}]
[require Tcl 8.2]
[require struct::matrix [opt [vset VERSION]]]
[description]
[para]

A matrix is a rectangular collection of cells, i.e. organized in rows
and columns. Each cell contains exactly one value of arbitrary
form. The cells in the matrix are addressed by pairs of integer
numbers, with the first (left) number in the pair specifying the
<

|

|




|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

[comment {-*- tcl -*-}]
[manpage_begin struct::matrix n 2.0.3]
[keywords matrix]
[copyright {2002-2013 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Tcl Data Structures}]
[titledesc {Create and manipulate matrix objects}]
[category  {Data structures}]
[require Tcl 8.2]
[require struct::matrix [opt 2.0.3]]
[description]
[para]

A matrix is a rectangular collection of cells, i.e. organized in rows
and columns. Each cell contains exactly one value of arbitrary
form. The cells in the matrix are addressed by pairs of integer
numbers, with the first (left) number in the pair specifying the
532
533
534
535
536
537
538
539
540
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % r printmatrix m
}]

[vset CATEGORY {struct :: matrix}]
[include ../common-text/feedback.inc]
[manpage_end]







|

531
532
533
534
535
536
537
538
539
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % r printmatrix m
}]

[vset CATEGORY {struct :: matrix}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/matrix.tcl.

1
2
3
4
5
6
7
8
9
10
11


12
13
14
15
16
17
18
# matrix.tcl --
#
#	Implementation of a matrix data structure for Tcl.
#
# Copyright (c) 2001-2013,2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# Heapsort code Copyright (c) 2003 by Edwin A. Suominen <ed@eepatents.com>,
# based on concepts in "Introduction to Algorithms" by Thomas H. Cormen et al.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require Tcl 8.2

namespace eval ::struct {}

namespace eval ::struct::matrix {
    # Data storage in the matrix module




|






>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# matrix.tcl --
#
#	Implementation of a matrix data structure for Tcl.
#
# Copyright (c) 2001-2013 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# Heapsort code Copyright (c) 2003 by Edwin A. Suominen <ed@eepatents.com>,
# based on concepts in "Introduction to Algorithms" by Thomas H. Cormen et al.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: matrix.tcl,v 1.23 2008/02/20 00:39:39 andreas_kupries Exp $

package require Tcl 8.2

namespace eval ::struct {}

namespace eval ::struct::matrix {
    # Data storage in the matrix module
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
# Results:
#	None.

proc ::struct::matrix::__format_2chan {name {report {}} {chan stdout}} {
    if {$report == {}} {
	# Use an internal hardwired simple report to format the matrix.
	# We delegate this to the string formatter and print its result.
	puts -nonewline $chan [__format_2string $name]
    } else {
	$report printmatrix2channel $name $chan
    }
    return
}

# ::struct::matrix::__get_cell --







|







1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
# Results:
#	None.

proc ::struct::matrix::__format_2chan {name {report {}} {chan stdout}} {
    if {$report == {}} {
	# Use an internal hardwired simple report to format the matrix.
	# We delegate this to the string formatter and print its result.
	puts -nonewline [__format_2string $name]
    } else {
	$report printmatrix2channel $name $chan
    }
    return
}

# ::struct::matrix::__get_cell --
2783
2784
2785
2786
2787
2788
2789
2790
## Ready

namespace eval ::struct {
    # Get 'matrix::matrix' into the general structure namespace.
    namespace import -force matrix::matrix
    namespace export matrix
}
package provide struct::matrix 2.0.4







|
2785
2786
2787
2788
2789
2790
2791
2792
## Ready

namespace eval ::struct {
    # Get 'matrix::matrix' into the general structure namespace.
    namespace import -force matrix::matrix
    namespace export matrix
}
package provide struct::matrix 2.0.3

Changes to modules/struct/matrix.test.

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
# -*- tcl -*-
# matrix.test:  tests for the matrix structure.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2001, 2019 by Andreas Kupries <a.kupries@westend.com>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0
testsNeed        TclOO 1

support {
    # memchan allows proper testing of `format 2chan` method.
    # Note, somebody may have imported these already.
    if {![llength [info commands ::tcl::chan::core]]} {
	use virtchannel_core/core.tcl tcl::chan::core
    }
    if {![llength [info commands ::tcl::chan::events]]} {
	use virtchannel_core/events.tcl  tcl::chan::events
    }
    if {![llength [info commands ::tcl::chan::memchan]]} {
	use virtchannel_base/memchan.tcl tcl::chan::memchan
    }

    useLocalFile matrix.testsupport
}
testing {
    useLocal matrix.tcl struct::matrix
}

# -------------------------------------------------------------------------







|

>
>







|
|
<


<
<
<
<
<
<
<
<
<
<
<
<







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
# -*- tcl -*-
# matrix.test:  tests for the matrix structure.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2001 by Andreas Kupries <a.kupries@westend.com>
# All rights reserved.
#
# RCS: @(#) $Id: matrix.test,v 1.21 2006/10/09 21:41:42 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0


support {












    useLocalFile matrix.testsupport
}
testing {
    useLocal matrix.tcl struct::matrix
}

# -------------------------------------------------------------------------
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
test matrix-5.0 {format error} {
    matrix mymatrix
    catch {mymatrix format} msg
    mymatrix destroy
    set msg
} {wrong # args: should be "::mymatrix format option ?arg arg ...?"}

test matrix-5.1 {formatting, 2 string, by report} {
    matrix mymatrix
    mymatrix add column
    mymatrix add row {1}
    mymatrix add column {2}
    mymatrix add row {3 4}
    mymatrix add column {5 6}
    mymatrix add row {7 8 9}







|







608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
test matrix-5.0 {format error} {
    matrix mymatrix
    catch {mymatrix format} msg
    mymatrix destroy
    set msg
} {wrong # args: should be "::mymatrix format option ?arg arg ...?"}

test matrix-5.1 {formatting} {
    matrix mymatrix
    mymatrix add column
    mymatrix add row {1}
    mymatrix add column {2}
    mymatrix add row {3 4}
    mymatrix add column {5 6}
    mymatrix add row {7 8 9}
662
663
664
665
666
667
668




669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
    mymatrix add column {5 6}
    mymatrix add row [list 7 8 "9\nb"]
    set result [mymatrix format 2string]
    mymatrix destroy
    set result
} "1  2 5\n3a 4 6\n7  8 9\n     b"





test matrix-5.4 {formatting 2 channel, by report} {
    matrix mymatrix
    mymatrix add column
    mymatrix add row {1}
    mymatrix add column {2}
    mymatrix add row {3 4}
    mymatrix add column {5 6}
    mymatrix add row {7 8 9}

    set chan [tcl::chan::memchan]
    mymatrix format 2chan tclformat $chan
    mymatrix destroy

    seek $chan 0
    set result [read $chan]
    close $chan
    set result
} "# ::mymatrix 3 x 3
matrix ::mymatrix
::mymatrix add rows    3
::mymatrix add columns 3
::mymatrix set rect 0 0 {{1 2 5} {3 4 6} {7 8 9}}
"

test matrix-5.5 {formatting, 2 string, no report} {
    matrix mymatrix
    mymatrix add column
    mymatrix add row {1}
    mymatrix add column {2}
    mymatrix add row {3 4}
    mymatrix add column {5 6}
    mymatrix add row {7 8 9}
    set result [mymatrix format 2string]
    mymatrix destroy
    set result
} "1 2 5
3 4 6
7 8 9"

test matrix-5.6 {formatting 2 channel, no report} {
    matrix mymatrix
    mymatrix add column
    mymatrix add row {1}
    mymatrix add column {2}
    mymatrix add row {3 4}
    mymatrix add column {5 6}
    mymatrix add row {7 8 9}

    set chan [tcl::chan::memchan]
    mymatrix format 2chan {} $chan
    mymatrix destroy

    seek $chan 0
    set result [read $chan]
    close $chan
    set result
} "1 2 5
3 4 6
7 8 9"

test matrix-6.0 {set/get error} {
    matrix mymatrix
    catch {mymatrix set} msga
    catch {mymatrix get} msgb
    mymatrix destroy
    list $msga $msgb







>
>
>
>
|
|
|
|
|
|
|
|

|
|
|

|
|
|
|
|
|
|
|
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683

684



































685
686
687
688
689
690
691
    mymatrix add column {5 6}
    mymatrix add row [list 7 8 "9\nb"]
    set result [mymatrix format 2string]
    mymatrix destroy
    set result
} "1  2 5\n3a 4 6\n7  8 9\n     b"

if {![catch {package require memchan}]} {
    # We have memory channels and can therefore test
    # 'format2channel-via' too.

    test matrix-5.4 {formatting} {
	matrix mymatrix
	mymatrix add column
	mymatrix add row {1}
	mymatrix add column {2}
	mymatrix add row {3 4}
	mymatrix add column {5 6}
	mymatrix add row {7 8 9}

	set chan [memchan]
	mymatrix format 2chan tclformat $chan
	mymatrix destroy

	seek $chan 0
	set result [read $chan]
	close $chan
	set result
    } "# mymatrix 3 x 3
matrix mymatrix
mymatrix add rows    3
mymatrix add columns 3
mymatrix set rect 0 0 {{1 2 5} {3 4 6} {7 8 9}}"

}




































test matrix-6.0 {set/get error} {
    matrix mymatrix
    catch {mymatrix set} msga
    catch {mymatrix get} msgb
    mymatrix destroy
    list $msga $msgb

Changes to modules/struct/matrix1.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[vset VERSION 1.2.2]
[comment {-*- tcl -*-}]
[manpage_begin {struct::matrix_v1} n [vset VERSION]]
[keywords matrix]
[copyright {2002,2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Tcl Data Structures}]
[titledesc {Create and manipulate matrix objects}]
[category  {Data structures}]
[require Tcl 8.2]
[require struct::matrix [opt [vset VERSION]]]
[description]
[para]

The [cmd ::struct::matrix] command creates a new matrix object with an
associated global Tcl command whose name is [arg matrixName].  This
command may be used to invoke various operations on the matrix.  It has
the following general form:
<

|

|




|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

[comment {-*- tcl -*-}]
[manpage_begin {struct::matrix_v1} n 1.2.1]
[keywords matrix]
[copyright {2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Tcl Data Structures}]
[titledesc {Create and manipulate matrix objects}]
[category  {Data structures}]
[require Tcl 8.2]
[require struct::matrix [opt 1.2.1]]
[description]
[para]

The [cmd ::struct::matrix] command creates a new matrix object with an
associated global Tcl command whose name is [arg matrixName].  This
command may be used to invoke various operations on the matrix.  It has
the following general form:
374
375
376
377
378
379
380
381
382
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % r printmatrix m
}]

[vset CATEGORY {struct :: matrix}]
[include ../common-text/feedback.inc]
[manpage_end]







|

373
374
375
376
377
378
379
380
381
    +---+-------------------+-------+-------+--------+
    %
    % # alternate way of doing the above
    % r printmatrix m
}]

[vset CATEGORY {struct :: matrix}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/matrix1.tcl.

1
2
3
4
5
6
7
8
9
10
11


12
13
14
15
16
17
18
# matrix.tcl --
#
#	Implementation of a matrix data structure for Tcl.
#
# Copyright (c) 2001,2019 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# Heapsort code Copyright (c) 2003 by Edwin A. Suominen <ed@eepatents.com>,
# based on concepts in "Introduction to Algorithms" by Thomas H. Cormen et al.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.



package require Tcl 8.2

namespace eval ::struct {}

namespace eval ::struct::matrix {
    # Data storage in the matrix module




|






>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# matrix.tcl --
#
#	Implementation of a matrix data structure for Tcl.
#
# Copyright (c) 2001 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# Heapsort code Copyright (c) 2003 by Edwin A. Suominen <ed@eepatents.com>,
# based on concepts in "Introduction to Algorithms" by Thomas H. Cormen et al.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: matrix1.tcl,v 1.3 2005/09/28 04:51:24 andreas_kupries Exp $

package require Tcl 8.2

namespace eval ::struct {}

namespace eval ::struct::matrix {
    # Data storage in the matrix module
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
# Results:
#	None.

proc ::struct::matrix::__format_2chan {name {report {}} {chan stdout}} {
    if {$report == {}} {
	# Use an internal hardwired simple report to format the matrix.
	# We delegate this to the string formatter and print its result.
	puts -nonewline $chan [__format_2string $name]
    } else {
	$report printmatrix2channel $name $chan
    }
    return
}

# ::struct::matrix::__get_cell --







|







1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
# Results:
#	None.

proc ::struct::matrix::__format_2chan {name {report {}} {chan stdout}} {
    if {$report == {}} {
	# Use an internal hardwired simple report to format the matrix.
	# We delegate this to the string formatter and print its result.
	puts -nonewline [__format_2string $name]
    } else {
	$report printmatrix2channel $name $chan
    }
    return
}

# ::struct::matrix::__get_cell --
2278
2279
2280
2281
2282
2283
2284
2285
## Ready

namespace eval ::struct {
    # Get 'matrix::matrix' into the general structure namespace.
    namespace import -force matrix::matrix
    namespace export matrix
}
package provide struct::matrix 1.2.2







|
2280
2281
2282
2283
2284
2285
2286
2287
## Ready

namespace eval ::struct {
    # Get 'matrix::matrix' into the general structure namespace.
    namespace import -force matrix::matrix
    namespace export matrix
}
package provide struct::matrix 1.2.1

Changes to modules/struct/matrix1.test.

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
# -*- tcl -*-
# matrix.test:  tests for the matrix structure.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2001 by Andreas Kupries <a.kupries@westend.com>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0
testsNeed        TclOO 1

support {
    # memchan allows proper testing of `format 2chan` method.
    # Note, matrix.test may have imported these already.
    if {![llength [info commands ::tcl::chan::core]]} {
	use virtchannel_core/core.tcl tcl::chan::core
    }
    if {![llength [info commands ::tcl::chan::events]]} {
	use virtchannel_core/events.tcl  tcl::chan::events
    }
    if {![llength [info commands ::tcl::chan::memchan]]} {
	use virtchannel_base/memchan.tcl tcl::chan::memchan
    }

    useLocalFile matrix.testsupport
}
testing {
    useLocal matrix1.tcl struct::matrix
}

# -------------------------------------------------------------------------









>
>







|
|
<


<
<
<
<
<
<
<
<
<
<
<
<







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
# -*- tcl -*-
# matrix.test:  tests for the matrix structure.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2001 by Andreas Kupries <a.kupries@westend.com>
# All rights reserved.
#
# RCS: @(#) $Id: matrix1.test,v 1.8 2006/10/09 21:41:42 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0


support {












    useLocalFile matrix.testsupport
}
testing {
    useLocal matrix1.tcl struct::matrix
}

# -------------------------------------------------------------------------
559
560
561
562
563
564
565




566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
    mymatrix add column {5 6}
    mymatrix add row [list 7 8 "9\nb"]
    set result [mymatrix format 2string]
    mymatrix destroy
    set result
} "1  2 5\n3a 4 6\n7  8 9\n     b"





test matrix1-5.4 {formatting} {
    matrix mymatrix
    mymatrix add column
    mymatrix add row {1}
    mymatrix add column {2}
    mymatrix add row {3 4}
    mymatrix add column {5 6}
    mymatrix add row {7 8 9}

    set chan [tcl::chan::memchan]
    mymatrix format 2chan tclformat $chan
    mymatrix destroy

    seek $chan 0
    set result [read $chan]
    close $chan
    set result
} "# ::mymatrix 3 x 3
matrix ::mymatrix
::mymatrix add rows    3
::mymatrix add columns 3
::mymatrix set rect 0 0 {{1 2 5} {3 4 6} {7 8 9}}
"

test matrix-5.5 {formatting, 2 string, no report} {
    matrix mymatrix
    mymatrix add column
    mymatrix add row {1}
    mymatrix add column {2}
    mymatrix add row {3 4}
    mymatrix add column {5 6}
    mymatrix add row {7 8 9}
    set result [mymatrix format 2string]
    mymatrix destroy
    set result
} "1 2 5
3 4 6
7 8 9"

test matrix-5.6 {formatting 2 channel, no report} {
    matrix mymatrix
    mymatrix add column
    mymatrix add row {1}
    mymatrix add column {2}
    mymatrix add row {3 4}
    mymatrix add column {5 6}
    mymatrix add row {7 8 9}

    set chan [tcl::chan::memchan]
    mymatrix format 2chan {} $chan
    mymatrix destroy

    seek $chan 0
    set result [read $chan]
    close $chan
    set result
} "1 2 5
3 4 6
7 8 9"

test matrix1-6.0 {set/get error} {
    matrix mymatrix
    catch {mymatrix set} msga
    catch {mymatrix get} msgb
    mymatrix destroy
    list $msga $msgb







>
>
>
>
|
|
|
|
|
|
|
|

|
|
|

|
|
|
|
|
|
|
|
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580

581



































582
583
584
585
586
587
588
    mymatrix add column {5 6}
    mymatrix add row [list 7 8 "9\nb"]
    set result [mymatrix format 2string]
    mymatrix destroy
    set result
} "1  2 5\n3a 4 6\n7  8 9\n     b"

if {![catch {package require memchan}]} {
    # We have memory channels and can therefore test
    # 'format2channel-via' too.

    test matrix1-5.4 {formatting} {
	matrix mymatrix
	mymatrix add column
	mymatrix add row {1}
	mymatrix add column {2}
	mymatrix add row {3 4}
	mymatrix add column {5 6}
	mymatrix add row {7 8 9}

	set chan [memchan]
	mymatrix format 2chan tclformat $chan
	mymatrix destroy

	seek $chan 0
	set result [read $chan]
	close $chan
	set result
    } "# mymatrix 3 x 3
matrix mymatrix
mymatrix add rows    3
mymatrix add columns 3
mymatrix set rect 0 0 {{1 2 5} {3 4 6} {7 8 9}}"

}




































test matrix1-6.0 {set/get error} {
    matrix mymatrix
    catch {mymatrix set} msga
    catch {mymatrix get} msgb
    mymatrix destroy
    list $msga $msgb

Changes to modules/struct/pkgIndex.tcl.

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
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded struct            2.1   [list source [file join $dir struct.tcl]]
package ifneeded struct            1.4   [list source [file join $dir struct1.tcl]]

package ifneeded struct::queue     1.4.5 [list source [file join $dir queue.tcl]]
package ifneeded struct::stack     1.5.3 [list source [file join $dir stack.tcl]]
package ifneeded struct::tree      2.1.2 [list source [file join $dir tree.tcl]]
package ifneeded struct::matrix    2.0.4 [list source [file join $dir matrix.tcl]]
package ifneeded struct::pool      1.2.3 [list source [file join $dir pool.tcl]]
package ifneeded struct::record    1.2.2 [list source [file join $dir record.tcl]]
package ifneeded struct::set       2.2.3 [list source [file join $dir sets.tcl]]

package ifneeded struct::prioqueue 1.4   [list source [file join $dir prioqueue.tcl]]
package ifneeded struct::skiplist  1.3   [list source [file join $dir skiplist.tcl]]

package ifneeded struct::graph     1.2.1 [list source [file join $dir graph1.tcl]]
package ifneeded struct::tree      1.2.2 [list source [file join $dir tree1.tcl]]
package ifneeded struct::matrix    1.2.2 [list source [file join $dir matrix1.tcl]]

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded struct::list      1.8.4  [list source [file join $dir list.tcl]]
package ifneeded struct::graph     2.4.3  [list source [file join $dir graph.tcl]]
package ifneeded struct::map       1      [list source [file join $dir map.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} {return}

if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded struct::disjointset 1.1 [list source [file join $dir disjointset.tcl]]
package ifneeded struct::graph::op 0.11.3 [list source [file join $dir graphops.tcl]]







|

|

>





|


|
|
<
<
<
<
<
<

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22






23
if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded struct            2.1   [list source [file join $dir struct.tcl]]
package ifneeded struct            1.4   [list source [file join $dir struct1.tcl]]

package ifneeded struct::queue     1.4.5 [list source [file join $dir queue.tcl]]
package ifneeded struct::stack     1.5.3 [list source [file join $dir stack.tcl]]
package ifneeded struct::tree      2.1.2 [list source [file join $dir tree.tcl]]
package ifneeded struct::matrix    2.0.3 [list source [file join $dir matrix.tcl]]
package ifneeded struct::pool      1.2.3 [list source [file join $dir pool.tcl]]
package ifneeded struct::record    1.2.1 [list source [file join $dir record.tcl]]
package ifneeded struct::set       2.2.3 [list source [file join $dir sets.tcl]]
package ifneeded struct::disjointset 1.0 [list source [file join $dir disjointset.tcl]]
package ifneeded struct::prioqueue 1.4   [list source [file join $dir prioqueue.tcl]]
package ifneeded struct::skiplist  1.3   [list source [file join $dir skiplist.tcl]]

package ifneeded struct::graph     1.2.1 [list source [file join $dir graph1.tcl]]
package ifneeded struct::tree      1.2.2 [list source [file join $dir tree1.tcl]]
package ifneeded struct::matrix    1.2.1 [list source [file join $dir matrix1.tcl]]

if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded struct::list      1.8.3  [list source [file join $dir list.tcl]]
package ifneeded struct::graph     2.4    [list source [file join $dir graph.tcl]]






package ifneeded struct::graph::op 0.11.3 [list source [file join $dir graphops.tcl]]

Changes to modules/struct/pool.html.

135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
mso-ansi-language:EN-GB'>NAME<o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>pool
- Managing a pool of discrete items.<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='mso-outline-level:1'><b><span lang=EN-GB
style='font-size:12.0pt;mso-bidi-font-size:14.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>SYNOPSIS<o:p></o:p></span></b></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><span style='mso-tab-count:1'></span><b>pool
</b><i>?poolName? ?maxsize?</i><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>







|















|







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
mso-ansi-language:EN-GB'>NAME<o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>pool
 Managing a pool of discrete items.<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='mso-outline-level:1'><b><span lang=EN-GB
style='font-size:12.0pt;mso-bidi-font-size:14.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>SYNOPSIS<o:p></o:p></span></b></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><span style='mso-tab-count:1'>              </span><b>pool
</b><i>?poolName? ?maxsize?</i><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232

<p class=MsoPlainText style='margin-left:53.4pt;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 53.4pt'><![if !supportLists]><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>-<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'>the seats in a cinema, theatre,
train etc.. for which visitors/travellers can<span style="mso-spacerun: yes">
</span>make a reservation;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:53.4pt;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 53.4pt'><![if !supportLists]><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>-<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'>the dynamic IP-addresses that an ISP
can dole out<span style="mso-spacerun: yes"></span>to subscribers;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:53.4pt;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 53.4pt'><![if !supportLists]><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>-<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'>a car rental's collection of cars,







|








|







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232

<p class=MsoPlainText style='margin-left:53.4pt;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 53.4pt'><![if !supportLists]><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>-<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'>the seats in a cinema, theatre,
train etc.. for which visitors/travellers can<span style="mso-spacerun: yes"> 
</span>make a reservation;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:53.4pt;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 53.4pt'><![if !supportLists]><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>-<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'>the dynamic IP-addresses that an ISP
can dole out<span style="mso-spacerun: yes">  </span>to subscribers;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:53.4pt;text-indent:-.25in;mso-list:
l0 level1 lfo2;tab-stops:list 53.4pt'><![if !supportLists]><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>-<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'>a car rental's collection of cars,
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'>A pool cannot manage duplicate item names. Therefore, items in a pool
must have unique names.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><b><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes"></span><o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><b><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'>Item equivalence<o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>From







|







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'>A pool cannot manage duplicate item names. Therefore, items in a pool
must have unique names.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><b><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes"> </span><o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><b><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'>Item equivalence<o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>From
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><b><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'>Preferences<o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>A
future owner may have a preference for a particular item. Preference based
allocation is supported (see the <b>-prefer</b> option to the <i>request</i>
subcommand). A preference for a particular item is most likely to result from
variability among features associated with the items. Note that the pool
commands themselves are not designed to manage such item properties. If item
properties play a role in an application, they should be<span
style="mso-spacerun: yes"></span>managed separately. <o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>








|




|







353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><b><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'>Preferences<o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>A
future owner may have a preference for a particular item. Preference based
allocation is supported (see the <b>prefer</b> option to the <i>request</i>
subcommand). A preference for a particular item is most likely to result from
variability among features associated with the items. Note that the pool
commands themselves are not designed to manage such item properties. If item
properties play a role in an application, they should be<span
style="mso-spacerun: yes">  </span>managed separately. <o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:11.0pt;font-family:
"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
general syntax of a pool object command is:<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><span
style='mso-tab-count:1'></span><i>poolName</i> <b>subcommand</b> <i>?arg
arg ...?</i><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>The
following subcommands and corresponding arguments are available:<o:p></o:p></span></p>







|
|







384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
general syntax of a pool object command is:<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><span
style='mso-tab-count:1'>              </span><i>poolName</i> <b>subcommand</b> <i>?arg
arg ?</i><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>The
following subcommands and corresponding arguments are available:<o:p></o:p></span></p>
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>This
command adds the items on the command line to the pool. If duplicate item names
occur on the command line, an error is raised. If one or more of the items
already exist in the pool, this also is considered an error.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><span
style='mso-tab-count:1'></span><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><i><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>poolName</span></i><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'> <b>clear</b> <i>?-force?</i><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB







|







410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>This
command adds the items on the command line to the pool. If duplicate item names
occur on the command line, an error is raised. If one or more of the items
already exist in the pool, this also is considered an error.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><span
style='mso-tab-count:1'>              </span><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><i><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>poolName</span></i><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'> <b>clear</b> <i>?-force?</i><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
0in;margin-left:71.4pt;margin-bottom:.0001pt'><b><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>allitems<o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-top:0in;margin-right:1.0in;margin-bottom:
0in;margin-left:71.4pt;margin-bottom:.0001pt'><b><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'><span style='mso-tab-count:1'></span></span></b><span
lang=EN-GB style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>returns a list of all items in the pool.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-top:0in;margin-right:1.0in;margin-bottom:
0in;margin-left:71.4pt;margin-bottom:.0001pt'><b><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></b></p>







|







492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
0in;margin-left:71.4pt;margin-bottom:.0001pt'><b><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>allitems<o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-top:0in;margin-right:1.0in;margin-bottom:
0in;margin-left:71.4pt;margin-bottom:.0001pt'><b><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'><span style='mso-tab-count:1'>             </span></span></b><span
lang=EN-GB style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>returns a list of all items in the pool.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-top:0in;margin-right:1.0in;margin-bottom:
0in;margin-left:71.4pt;margin-bottom:.0001pt'><b><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></b></p>
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
EN-GB'> <b>maxsize</b> <i>?maxsize?<o:p></o:p></i></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>Sets or queries the maximum size of the pool,
depending on whether the <i>maxsize</i> argument is supplied. If the optional
argument <i>maxsize</i> is supplied, the maximum size of the pool will<span
style="mso-spacerun: yes"></span>be set to that value. If no argument <i>maxsize</i>
is supplied, the current maximum size of the pool is returned. In this variant,
the command is an alias for: </span><span lang=EN-GB style='font-size:10.5pt;
mso-bidi-font-size:10.0pt;mso-ansi-language:EN-GB'>poolName info maxsize</span><span
lang=EN-GB style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>The <i>maxsize</i> argument needs to be a positive
integer.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'><span style="mso-spacerun: yes"></span><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><i><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>poolName</span></i><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'> <b>release</b> <i>itemName<o:p></o:p></i></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>Releases the item whose name is <i>itemName</i> that
was allocated previously. An error is raised if the item was not allocated at
the time when the command was issued.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'><span style="mso-spacerun: yes"></span><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><i><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>poolName</span></i><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'> <b>remove</b> <i>itemName ?-force?</i><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>Removes
the item whose name is <i>itemName</i><span style="mso-spacerun: yes">
</span>from the pool. If the item was allocated at the time when the command
was invoked, an error is raised. This behaviour may be modified through the
optional argument <i>-force</i>. If it is supplied on the command line, the
item will be removed regardless its allocation state.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>







|

















|














|








|







578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
EN-GB'> <b>maxsize</b> <i>?maxsize?<o:p></o:p></i></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>Sets or queries the maximum size of the pool,
depending on whether the <i>maxsize</i> argument is supplied. If the optional
argument <i>maxsize</i> is supplied, the maximum size of the pool will<span
style="mso-spacerun: yes">  </span>be set to that value. If no argument <i>maxsize</i>
is supplied, the current maximum size of the pool is returned. In this variant,
the command is an alias for: </span><span lang=EN-GB style='font-size:10.5pt;
mso-bidi-font-size:10.0pt;mso-ansi-language:EN-GB'>poolName info maxsize</span><span
lang=EN-GB style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>The <i>maxsize</i> argument needs to be a positive
integer.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'><span style="mso-spacerun: yes"> </span><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><i><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>poolName</span></i><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'> <b>release</b> <i>itemName<o:p></o:p></i></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'>Releases the item whose name is <i>itemName</i> that
was allocated previously. An error is raised if the item was not allocated at
the time when the command was issued.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;mso-bidi-font-size:10.0pt;font-family:"Times New Roman";
mso-ansi-language:EN-GB'><span style="mso-spacerun: yes"> </span><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><i><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>poolName</span></i><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'> <b>remove</b> <i>itemName ?-force?</i><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>Removes
the item whose name is <i>itemName</i><span style="mso-spacerun: yes"> 
</span>from the pool. If the item was allocated at the time when the command
was invoked, an error is raised. This behaviour may be modified through the
optional argument <i>-force</i>. If it is supplied on the command line, the
item will be removed regardless its allocation state.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695

<p class=MsoPlainText style='margin-left:1.25in;text-indent:-19.2pt;mso-list:
l1 level1 lfo4'><![if !supportLists]><span lang=EN-GB style='font-size:11.0pt;
font-family:"Times New Roman";mso-ansi-language:EN-GB'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'>The request is denied. No item is allocated. The variable whose name is <i>itemVar</i>
is not set. Attempts to read <i>itemVar</i><span style="mso-spacerun: yes">
</span>may raise an error if the variable was not defined before issuing the
request. The command returns 0.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>The
return values from this command are meant to be inspected. The examples below
show how to do this. Failure to check the return value may result in erroneous
behaviour.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>If
no preference for a particular item is supplied through the option <b>-prefer</b>
(see below), then all requests are honoured as long as items are available.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>The







|














|







666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695

<p class=MsoPlainText style='margin-left:1.25in;text-indent:-19.2pt;mso-list:
l1 level1 lfo4'><![if !supportLists]><span lang=EN-GB style='font-size:11.0pt;
font-family:"Times New Roman";mso-ansi-language:EN-GB'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'>The request is denied. No item is allocated. The variable whose name is <i>itemVar</i>
is not set. Attempts to read <i>itemVar</i><span style="mso-spacerun: yes"> 
</span>may raise an error if the variable was not defined before issuing the
request. The command returns 0.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>The
return values from this command are meant to be inspected. The examples below
show how to do this. Failure to check the return value may result in erroneous
behaviour.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>If
no preference for a particular item is supplied through the option <b>prefer</b>
(see below), then all requests are honoured as long as items are available.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>The
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'> <i>allocID</i><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:106.2pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>If
the request is honoured, an item will be allocated to the entity identified by <i>allocID</i>.
If the allocation state of an item is queried, it is this allocation ID that
will be returned. If the option <b>-allocID</b> is not supplied, the item will
be allocated to<span style="mso-spacerun: yes"></span><i>dummyID</i>.
Allocation ID's may be anything except the value -1, which is reserved for free
items.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><b><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>-prefer







|
|
|







703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'> <i>allocID</i><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:106.2pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>If
the request is honoured, an item will be allocated to the entity identified by <i>allocID</i>.
If the allocation state of an item is queried, it is this allocation ID that
will be returned. If the option <b>allocID</b> is not supplied, the item will
be allocated to<span style="mso-spacerun: yes">  </span><i>dummyID</i>.
Allocation IDs may be anything except the value -1, which is reserved for free
items.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:70.8pt'><b><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>-prefer
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>%
CarPool add Toyota Trabant Chrysler1 Chrysler2 Volkswagen<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><span
style='mso-tab-count:1'></span><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>5.
Somebody crashed the Toyota? Remove it from the pool as follows:<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>%







|







828
829
830
831
832
833
834
835
836
837
838
839
840
841
842

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>%
CarPool add Toyota Trabant Chrysler1 Chrysler2 Volkswagen<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><span
style='mso-tab-count:1'>              </span><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>5.
Somebody crashed the Toyota? Remove it from the pool as follows:<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>%
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>#
particular car. We'll issue a request on her behalf as follows:<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>if {
[CarPool request car -allocID &quot;Mrs. Swift&quot;] }<span
style="mso-spacerun: yes"></span>{<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt;mso-outline-level:
1'><span lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;
mso-ansi-language:EN-GB'># request was honoured, process the variable `car'<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'>puts &quot;$car has been allocated to [CarPool info allocID $car].&quot;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'>} else {<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'># request was denied<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style='mso-tab-count:1'></span>puts &quot;No car available.&quot;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>}<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>








|



|















|







892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>#
particular car. We'll issue a request on her behalf as follows:<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>if {
[CarPool request car -allocID &quot;Mrs. Swift&quot;] }<span
style="mso-spacerun: yes">  </span>{<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt;mso-outline-level:
1'><span lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;
mso-ansi-language:EN-GB'># request was honoured, process the variable `car<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'>puts &quot;$car has been allocated to [CarPool info allocID $car].&quot;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'>} else {<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'># request was denied<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style='mso-tab-count:1'>     </span>puts &quot;No car available.&quot;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>}<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>#
Suppose mr. Wiggly has a preference for the Trabant:<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>if {
[CarPool request car -allocID &quot;Mr. Wiggly&quot; -prefer Trabant] }<span
style="mso-spacerun: yes"></span>{<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt;mso-outline-level:
1'><span lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;
mso-ansi-language:EN-GB'># request was honoured, process the variable `car'<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'>puts &quot;$car has been allocated to [CarPool info allocID $car].&quot;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'>} else {<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'># request was denied<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style='mso-tab-count:1'></span>puts &quot;The Trabant was not
available.&quot;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>}<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>







|
|



|















|







934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>#
Suppose mr. Wiggly has a preference for the Trabant:<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>if {
[CarPool request car -allocID &quot;Mr. Wiggly&quot; prefer Trabant] }<span
style="mso-spacerun: yes">  </span>{<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt;mso-outline-level:
1'><span lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;
mso-ansi-language:EN-GB'># request was honoured, process the variable `car<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'>puts &quot;$car has been allocated to [CarPool info allocID $car].&quot;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'>} else {<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;text-indent:35.4pt'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'># request was denied<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style='mso-tab-count:1'>     </span>puts &quot;The Trabant was not
available.&quot;<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>}<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
EN-GB'>Couldn't destroy `CarPool' because some items are still allocated.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>Oops,
... forgot that Mrs. Swift still occupies a car.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>10.
We force the destruction of the pool as follows: <o:p></o:p></span></p>







|







1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
EN-GB'>Couldn't destroy `CarPool' because some items are still allocated.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>Oops,
 forgot that Mrs. Swift still occupies a car.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>10.
We force the destruction of the pool as follows: <o:p></o:p></span></p>
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><b><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'>Example 2<o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>This
example describes the case from which the author's need for pool management
originated. It is an example of a server application that receives requests
from client applications. The client requests are dispatched onto a back-end
application before being returned to the client application. In many cases
there are a few equivalent instances of back-end applications to which a client
request may be passed along. The file descriptors that identify the channels to
these back-end instances make up a pool of connections. A particular connection
may be allocated to just one client request at a time.<o:p></o:p></span></p>







|







1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><b><span
lang=EN-GB style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:
EN-GB'>Example 2<o:p></o:p></span></b></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'>This
example describes the case from which the authors need for pool management
originated. It is an example of a server application that receives requests
from client applications. The client requests are dispatched onto a back-end
application before being returned to the client application. In many cases
there are a few equivalent instances of back-end applications to which a client
request may be passed along. The file descriptors that identify the channels to
these back-end instances make up a pool of connections. A particular connection
may be allocated to just one client request at a time.<o:p></o:p></span></p>
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093





1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
Pipes $maxpipes<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>for
{set i 0} {$i &lt; $maxpipes} {incr i} {<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:
11.0pt;mso-ansi-language:EN-GB'><span style='mso-tab-count:1'></span><span
style="mso-spacerun: yes"></span>set fd {open "|backendApplication" w+}<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:
11.0pt;mso-ansi-language:EN-GB'><span style='mso-tab-count:1'></span><span
style="mso-spacerun: yes"></span>Pipes add $fd<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:
11.0pt;mso-ansi-language:EN-GB'><span style='mso-tab-count:1'></span>}<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'># A
client request comes in. The request is identified as `clientX'.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'># Dispatch it onto an instance of a back-end application<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>if {
[Pipes request fd -allocID clientX] } {<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'><span style="mso-spacerun: yes"></span># a connection was allocated<o:p></o:p></span></p>






<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes"></span># communicate to the back-end application
via the variable `fd'<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes"></span>puts $fd "someInstruction"<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes"></span># ...... etc.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>}
else {<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'><span style="mso-spacerun: yes"></span># all connections are
currently occupied<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes"></span># store the client request in a queue for
later processing,<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes"></span># or return a "Server busy" message to the
client.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>}<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>







|
|


|
|


|






|







|



|
>
>
>
>
>



|
<



<
<
<
<
|







|




|




|







1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102

1103
1104
1105




1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
Pipes $maxpipes<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>for
{set i 0} {$i &lt; $maxpipes} {incr i} {<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:
11.0pt;mso-ansi-language:EN-GB'><span style='mso-tab-count:1'>     </span><span
style="mso-spacerun: yes">    </span>set fd {open|backendApplication” w+}<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:
11.0pt;mso-ansi-language:EN-GB'><span style='mso-tab-count:1'>     </span><span
style="mso-spacerun: yes">    </span>Pipes add $fd<o:p></o:p></span></p>

<p class=MsoPlainText><span lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:
11.0pt;mso-ansi-language:EN-GB'><span style='mso-tab-count:1'>     </span>}<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'># A
client request comes in. The request is identified as `clientX.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'># Dispatch it onto an instance of a back-end application<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>if {
[Pipes request fd allocID clientX] } {<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'><span style="mso-spacerun: yes">    </span># a connection was allocated<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes">    </span># communicate to the back-end application
via the variable `fd’<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes">    </span>puts $fd “someInstruction”<o:p></o:p></span></p>


<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span




style="mso-spacerun: yes">    </span># ...... etc.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>}
else {<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt;mso-outline-level:1'><span
lang=EN-GB style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:
EN-GB'><span style="mso-spacerun: yes">    </span># all connections are
currently occupied<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes">    </span># store the client request in a queue for
later processing,<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'><span
style="mso-spacerun: yes">    </span># or return aServer busy” message to the
client.<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:10.5pt;mso-bidi-font-size:11.0pt;mso-ansi-language:EN-GB'>}<o:p></o:p></span></p>

<p class=MsoPlainText style='margin-left:35.4pt'><span lang=EN-GB
style='font-size:11.0pt;font-family:"Times New Roman";mso-ansi-language:EN-GB'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>

Changes to modules/struct/pool.man.

435
436
437
438
439
440
441
442
443
         # all connections are currently occupied
         # store the client request in a queue for later processing,
         # or return a 'Server busy' message to the client.
     }
}]

[vset CATEGORY {struct :: pool}]
[include ../common-text/feedback.inc]
[manpage_end]







|

435
436
437
438
439
440
441
442
443
         # all connections are currently occupied
         # store the client request in a queue for later processing,
         # or return a 'Server busy' message to the client.
     }
}]

[vset CATEGORY {struct :: pool}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/prioqueue.man.

103
104
105
106
107
108
109
110
111
[call [arg prioqueueName] [cmd size]]

Return the number of items in the prioqueue.

[list_end]

[vset CATEGORY {struct :: prioqueue}]
[include ../common-text/feedback.inc]
[manpage_end]







|

103
104
105
106
107
108
109
110
111
[call [arg prioqueueName] [cmd size]]

Return the number of items in the prioqueue.

[list_end]

[vset CATEGORY {struct :: prioqueue}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/queue.man.

88
89
90
91
92
93
94
95
96
[call [arg queueName] [cmd size]]

Return the number of items in the queue.

[list_end]

[vset CATEGORY {struct :: queue}]
[include ../common-text/feedback.inc]
[manpage_end]







|

88
89
90
91
92
93
94
95
96
[call [arg queueName] [cmd size]]

Return the number of items in the queue.

[list_end]

[vset CATEGORY {struct :: queue}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/queue_c.tcl.

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
		qdg->counter = 0;

		Tcl_SetAssocData (interp, KEY, proc,
				  (ClientData) qdg);
	    }
	    
	    qdg->counter ++;
	    sprintf (qdg->buf, "queue%ld", qdg->counter);
	    return qdg->buf;

#undef  KEY
	}

	static void
	QDdeleteCmd (ClientData clientData)







|







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
		qdg->counter = 0;

		Tcl_SetAssocData (interp, KEY, proc,
				  (ClientData) qdg);
	    }
	    
	    qdg->counter ++;
	    sprintf (qdg->buf, "queue%d", qdg->counter);
	    return qdg->buf;

#undef  KEY
	}

	static void
	QDdeleteCmd (ClientData clientData)

Changes to modules/struct/record.man.

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
89
90
91
92
93
94
95
96

97
98
99
100
101
102
103
104
105
106
107
108
109

110
111
112
113
114
115
116

117
118
119
120

121
122
123
124
125
126

127

128
129
130
131
132



133
134
135
136
137

138
139
140
141
142
143
144
145
146
147
148
149

150

151
152
153

154
155

156
157
158

159

160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177

178


179



180
181
182
183
184

185

186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232

233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302

303

304
305
306
307
308
309
310
311

312
313
314
315
316
317
318
319
320
321
322
[comment {-*- tcl -*-}]
[vset VERSION 1.2.2]
[manpage_begin struct::record n [vset VERSION]]
[keywords {data structures}]
[keywords record]
[keywords struct]
[copyright {2002, Brett Schwarz <brett_schwarz@yahoo.com>}]
[moddesc   {Tcl Data Structures}]
[titledesc {Define and create records (similar to 'C' structures)}]
[category  {Data structures}]
[require Tcl 8.2]
[require struct::record [opt [vset VERSION]]]
[description]

The [cmd ::struct::record] package provides a mechanism to group
variables together as one data structure, similar to a [term C]
structure. The members of a record can be variables or other
records. However, a record can not contain circular records,
i.e. records that contain the same record as a member.



[para] This package was structured so that it is very similar to how
Tk objects work. Each record definition creates a record object that
encompasses that definition. Subsequently, that record object can
create instances of that record. These instances can then be
manipulated with the [method cget] and [method configure] methods.

[para] The package only contains one top level command, but several
sub commands (see below). It also obeys the namespace in which the
record was defined, hence the objects returned are fully qualified.

[list_begin definitions]

[call [cmd {record define}] [arg recordName] [arg recordMembers] \
     [opt [arg "instanceName1 instanceName2 ..."]]]

Defines a record. [arg recordName] is the name of the record, and is
also used as an object command. This object command is used to create
instances of the record definition. The [arg recordMembers] are the
members of the record that make up the record definition. These are
variables and other records. If optional [arg instanceName] args are
specified, then an instance is generated after the definition is
created for each [arg instanceName].

[call [cmd {record show}] [arg record]]

Returns a list of records that have been defined.

[call [cmd {record show}] [arg instances] [arg recordName]]

Returns the instances that have been instantiated by
[arg recordName].

[call [cmd {record show}] [arg members] [arg recordName]]

Returns the members that are defined for record [arg recordName].
It returns the same format as how the records were defined.


[call [cmd {record show}] [arg values] [arg instanceName]]

Returns a list of values that are set for the instance
[arg instanceName]. The output is a list of key/value pairs. If there
are nested records, then the values of the nested records will
itself be a list.

[call [cmd {record exists}] [arg record] [arg recordName]]

Tests for the existence of a [arg record] with the
name [arg recordName].

[call [cmd {record exists}] [arg instance] [arg instanceName]]

Tests for the existence of a [arg instance] with the
name [arg instanceName].

[call [cmd {record delete}] [arg record] [arg recordName]]

Deletes [arg recordName], and all instances of [arg recordName].
It will return an error if the record does not exist.

[call [cmd {record delete}] [arg instance] [arg instanceName]]

Deletes [arg instance] with the name of [arg instanceName]. It will
return an error if the instance does not exist. Note that this
recursively deletes any nested instances as well.

[list_end]


[section {RECORD MEMBERS}]

Record members can either be variables, or other records, However, the
same record can not be nested witin itself (circular). To define a
nested record, you need to specify the [const record] keyword, along
the with name of the record, and the name of the instance of that
nested record (within the container). For example, it would look like
this:


[para][example_begin]
# this is the nested record
record define mynestedrecord {
    nest1
    nest2
}

# This is the main record
record define myrecord {
    mem1
    mem2
    {record mynestedrecord mem3}
}

[example_end]

You can also assign default or initial values to the members of a
record, by enclosing the member entry in braces:

[para]
[example_begin]

record define myrecord {
    mem1
    {mem2 5}
}

[example_end]

All instances created from this record definition will initially have
[const 5] as the value for member [arg mem2]. If no default is given,
then the value will be the empty string.


[subsection {Getting Values}]


To get a value of a member, there are several ways to do this.

[list_begin definitions]




[call [arg instanceName] [method cget] -[arg member]]

In this form the built-in [method cget] instance method returns the
value of the specified [arg member]. Note the leading dash.


[para] To reach a nested member use [term {dot notation}]:
[example_begin]
[arg instanceName] [method cget] -mem3.nest1
[example_end]


[call [arg instanceName] [method cget] -[arg member1] -[arg member2]]

In this form the built-in [method cget] instance method returns a list
containing the values of both specified members, in the order of specification.

[call [arg instanceName] [method cget]]

[call [arg instanceName] [method configure]]

[call [arg instanceName]]

These forms are all equivalent. They return a dictionary of all

members and the associated values.



[list_end]


[subsection {Setting Values}]


To set a value of a member, there are several ways to do this.

[list_begin definitions]

[call [arg instanceName] [method configure] -[arg member] [arg value]]

In this form the built-in [method configure] instance method sets the
specified [arg member] to the given [arg value]. Note the leading
dash.

[para] To reach a nested member use [term {dot notation}]:
[example_begin]
[arg instanceName] [method configure] -mem3.nest1 value
[example_end]

[call [arg instanceName] [method configure] \
     -[arg member1] [arg value1] \

     -[arg member2] [arg value2]]






In this form the built-in [method configure] instance method sets all
specified members to the associated values.

[list_end]


[subsection {Alias access}]


In the original implementation, access was done by using dot notation
similar to how [term C] structures are accessed. However, there was a
concensus to make the interface more Tcl like, which made sense.

However, the original alias access still exists. It might prove to be
helpful to some.

[para] Basically, for every member of every instance, an alias is
created. This alias is used to get and set values for that member.

An example will illustrate the point, using the above defined records:

[para]
[example_begin]
% # Create an instance first
% myrecord inst1
::inst1

% # To get a member of an instance, just use the alias. It behaves
% # like a Tcl command:
% inst1.mem1

% # To set a member via the alias, just include a value. And optionally
% # the equal sign - syntactic sugar.
% inst1.mem1 = 5
5

% inst1.mem1
5

% # For nested records, just continue with the dot notation.
% # note, no equal sign.
% inst1.mem3.nest1 10
10

% inst1.mem3.nest1
10

% # just the instance by itself gives all member/values pairs for that
% # instance
% inst1
-mem1 5 -mem2 {} -mem3 {-nest1 10 -nest2 {}}

% # and to get all members within the nested record
% inst1.mem3
-nest1 10 -nest2 {}


[example_end]

[section {RECORD COMMAND}]

The following subcommands and corresponding arguments are available to
any record command:

[list_begin definitions]

[call [arg recordName] [arg instanceName]|[const #auto] \
     [opt [arg "-member1 value1 -member2 value2 ..."]]]

Using the [arg recordName] object command that was created from the
record definition, instances of the record definition can be
created.

Once an instance is created, it inherits the members of the record
definition, very similar to how objects work.

During instance generation, an object command for the instance is
created as well, using [arg instanceName].

[para] This object command is used to access the data members of the
instance.

During the instantiation, while values for that instance may be given,
when done, [strong all] values must be given, and be given as
key/value pairs, like for method [method configure]. Nested records
have to be in list format.

[para] Optionally, [const #auto] can be used in place of
[arg instanceName]. When [const #auto] is used, the instance name will
be automatically generated, and of the form

[const recordName[var N]], where [var N] is a unique integer (starting
at 0) that is generated.

[list_end]
[para]

[section {INSTANCE COMMAND}]

The following subcommands and corresponding arguments are available to
any record instance command:

[list_begin definitions]

[call [arg instanceName] [method cget] [opt [arg "-member1 -member2 ..."]]]

Each instance has the method [method cget]. This is very similar to
how Tk widget's [method cget] command works. It queries the values of
the members for that particular instance. If no arguments are given,
then a dictionary is returned.

[call [arg instanceName] [method configure] \
     [opt [arg "-member1 value1 -member2 value2 ..."]]]

Each instance has the method [method configure]. This is very similar
to how Tk widget's [method configure] command works. It sets the
values of the particular members for that particular instance. If no
arguments are given, then a dictionary list is returned.

[list_end]

[section EXAMPLES]

Two examples are provided to give a good illustration on how to use
this package.


[subsection {Example 1 - Contact Information}]


Probably the most obvious example would be to hold contact
information, such as addresses, phone numbers, comments, etc. Since a
person can have multiple phone numbers, multiple email addresses, etc,
we will use nested records to define these. So, the first thing we do
is define the nested records:

[para][example {


##
##  This is an interactive example, to see what is returned by
##  each command as well.
##

% namespace import ::struct::record::*

% # define a nested record. Notice that country has default 'USA'.
% record define locations {
    street

<
|








|


|
|
<
|
|
>

>
|
<
|
|
|

|
|
<



|
<

|
|
|
|
|
<
|












|
|
>




















|
|



|
|
<


>







|
<

>
|












>


|
|



>




>


|
|
<

>
|
>



|

>
>
>
|

<
<
|
>
|
<
|
<

|
<
|
<
<
|
|
>
|
>
|

<
>
|
|
>



>
|
>



|

<
|
|
<
<
|
<
<
|
<
<
<
|
>
|
>
>

>
>
>
|
<



>
|
>

|
<
|
<
<
|

|
|
<
|



|


<
|
|

|
|
|


<


<
|
|


<


<
|
|


<



>





|
|



<
|

|
|
<
<
|
<
<
|
|
<
|
<
|
<
<
<
|

|
|
<
|
<
|













|
|
|
|

|
<

|
|
|
|





|


>
|
>

|
|
|
|
|

|
>


|
|







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
89
90
91

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

125
126
127
128
129
130
131
132
133
134
135
136
137
138


139
140
141

142

143
144

145


146
147
148
149
150
151
152

153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

168
169


170


171



172
173
174
175
176
177
178
179
180
181

182
183
184
185
186
187
188
189

190


191
192
193
194

195
196
197
198
199
200
201

202
203
204
205
206
207
208
209

210
211

212
213
214
215

216
217

218
219
220
221

222
223
224
225
226
227
228
229
230
231
232
233
234
235

236
237
238
239


240


241
242

243

244



245
246
247
248

249

250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269

270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
[comment {-*- tcl -*-}]

[manpage_begin struct::record n 1.2.1]
[keywords {data structures}]
[keywords record]
[keywords struct]
[copyright {2002, Brett Schwarz <brett_schwarz@yahoo.com>}]
[moddesc   {Tcl Data Structures}]
[titledesc {Define and create records (similar to 'C' structures)}]
[category  {Data structures}]
[require Tcl 8.2]
[require struct::record [opt 1.2.1]]
[description]

The [cmd ::struct::record] package provides a mechanism to group variables together
as one data structure, similar to a 'C' structure. The members of a

record can be variables or other records. However, a record can not contain circular
record, i.e. records that contain the same record as a
member.

[para]
This package was structured so that it is very similar to how Tk objects work. Each record

definition creates a record object that encompasses that definition. Subsequently, that
record object can create instances of that record. These instances can then
be manipulated with the [method cget] and [method configure] methods.

[para]
The package only contains one top level command, but several sub commands (see below). It also obeys the namespace in which the record was define, hence the objects returned are fully qualified.


[list_begin definitions]

[call [cmd {record define}] [arg recordName] [arg recordMembers] [opt [arg "instanceName1 instanceName2 ..."]]]


Defines a record. [arg recordName] is the name of the record, and is also
used as an object command. This object command is used to create instances of the
record definition. [arg recordMembers] are the members of
the record that make up the record definition. These are variables
and other record. If optional [arg instanceName] args are given, then an instance

is generated after the definition is created for each [arg instanceName].

[call [cmd {record show}] [arg record]]

Returns a list of records that have been defined.

[call [cmd {record show}] [arg instances] [arg recordName]]

Returns the instances that have been instantiated by
[arg recordName].

[call [cmd {record show}] [arg members] [arg recordName]]

Returns the members that are defined for
record [arg recordName]. It returns the same format as how the
records were defined.

[call [cmd {record show}] [arg values] [arg instanceName]]

Returns a list of values that are set for the instance
[arg instanceName]. The output is a list of key/value pairs. If there
are nested records, then the values of the nested records will
itself be a list.

[call [cmd {record exists}] [arg record] [arg recordName]]

Tests for the existence of a [arg record] with the
name [arg recordName].

[call [cmd {record exists}] [arg instance] [arg instanceName]]

Tests for the existence of a [arg instance] with the
name [arg instanceName].

[call [cmd {record delete}] [arg record] [arg recordName]]

Deletes [arg recordName], and all instances of [arg recordName]. It will return
an error if the record does not exist.

[call [cmd {record delete}] [arg instance] [arg instanceName]]

Deletes [arg instance] with the name of [arg instanceName]. It
will return an error if the instance does not exist.


[list_end]
[para]

[section {RECORD MEMBERS}]

Record members can either be variables, or other records, However, the
same record can not be nested witin itself (circular). To define a
nested record, you need to specify the [const record] keyword, along
the with name of the record, and the name of the instance of that
nested record. For example, it would look like this:


[para]
[example_begin]
# this is the nested record
record define mynestedrecord {
    nest1
    nest2
}

# This is the main record
record define myrecord {
    mem1
    mem2
    {record mynestedrecord mem3}
}

[example_end]

You can also assign default or initial values to the members of a record,
by enclosing the member entry in braces:

[para]
[example_begin]

record define myrecord {
    mem1
    {mem2 5}
}

[example_end]

All instances created from this record definition, will initially have 5 as
the value for [arg mem2]. If no default is given, then the value will be the empty string.


[para]
[emph {Getting Values}]
[para]

To get a value of a member, there are several ways to do this.

[list_begin enumerated]

[enum]
To get a member value, then use the instance built-in [method cget] method:
[para]
    [arg instanceName] [method cget] -mem1



[enum]
To get multiple member values, you can specify them all in one command:
[para]

    [arg instanceName] [method cget] -mem1 -mem2


[enum]

To get a list of the key/value of all of the members, there are 3 ways:


[para]
    - [arg instanceName] [method cget]
[para]
	- [arg instanceName] [method configure]
[para]
	- [arg instanceName]


[enum]
To get a value of a nested member, then use the dot notation:
[para]
    [arg instanceName] [method cget] -mem3.nest1

[list_end]

[para]
[emph {Setting Values}]
[para]

To set a value of a member, there are several ways to do this.

[list_begin enumerated]


[enum]
To set a member value, then use the instance built-in [method configure] method:


[para]


    [arg instanceName] [method configure] -mem1 val1




[enum]
To set multiple member values, you can specify them all in one command:
[para]
    [arg instanceName] [method configure] -mem1 va1 -mem2 val2

[enum]
To set a value of a nested member, then use the dot notation:
[para]
    [arg instanceName] [method configure] -mem3.nest1 value


[list_end]

[para]
[emph {Alias access}]
[para]

In the original implementation, access was done by using dot notation similar to how 'C' structures are accessed. However,

there was a concensus to make the interface more Tcl like, which made sense. However, the original alias access still


exists. It might prove to be helpful to some.

[para]
Basically, for every member of every instance, an alias is created. This alias is used to get and set values for that

member. An example will illustrate the point, using the above defined records:

[para]
[example_begin]
# Create an instance first
% myrecord inst1
::inst1

% # To get a member of an instance, just use the
% # alias (it behaves like a Tcl command):
% inst1.mem1
%
% # To set a member via the alias, just include
% # a value (optionally the equal sign - syntactic sugar)
% inst1.mem1 = 5
5

% inst1.mem1
5

% # For nested records, just continue with the
% # dot notation (note no equal sign)
% inst1.mem3.nest1 10
10

% inst1.mem3.nest1
10

% # just the instance by itself gives all
% # member/values pairs for that instance
% inst1
-mem1 5 -mem2 {} -mem3 {-nest1 10 -nest2 {}}

% # and to get all members within the nested record
% inst1.mem3
-nest1 10 -nest2 {}
%

[example_end]

[section {RECORD COMMAND}]

The following subcommands and corresponding arguments are available to any
record command:

[list_begin definitions]


[call [arg recordName] [method [arg instanceName|#auto]] [opt [arg "-member1 value1 -member2 value2 ..."]]]

Using the [arg recordName] object command that was created from the record definition,
instances of the record definition can be created. Once a instance is


created, then it inherits the members of the record definition, very


similar to how objects work. During instance generation, an object command for the instance
is created as well, using [arg instanceName]. This object command is used

to access the data members of the instance. During the instantiation, values for

that instance can be given, [emph but] all values must be given, and be given



in key/value pairs. Nested records, need to be in list format.

[para]
Optionally, [arg #auto] can be used in place of [arg instanceName]. When #auto is used,

then a instance name will automatically be generated, of the form recordName<integer>, where

<integer> is a unique integer (starting at 0) that is generated.

[list_end]
[para]

[section {INSTANCE COMMAND}]

The following subcommands and corresponding arguments are available to
any record instance command:

[list_begin definitions]

[call [arg instanceName] [method cget] [opt [arg "-member1 -member2 ..."]]]

Each instance has the sub command [method cget] associated with it. This
is very similar to how Tk widget's cget command works. It queries
the values of the member for that particular instance. If
no arguments are given, then a key/value list is returned.

[call [arg instanceName] [method configure] [opt [arg "-member1 value1 -member2 value2 ..."]]]


Each instance has the sub command [method configure] associated with it. This
is very similar to how Tk widget's configure command works. It sets
the values of the particular member for that particular instance. If
no arguments are given, then a key/value list is returned.

[list_end]

[section EXAMPLES]

Two examples are provided to give an good illustration on how to use
this package.

[para]
[emph {Example 1}]
[para]

Probably the most obvious example would be to hold contact information,
such as addresses, phone numbers, comments, etc. Since a person can have
multiple phone numbers, multiple email addresses, etc, we will use nested
records to define these. So, the first thing we do is define the nested
records:

[para]
[example {

##
##  This is an interactive example, to see what is
##  returned by each command as well.
##

% namespace import ::struct::record::*

% # define a nested record. Notice that country has default 'USA'.
% record define locations {
    street
361
362
363
364
365
366
367

368

369
370
371
372

373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399

400
401


402
403
404
% record show members contacts2
first middle last {record locations home} {record locations work}
% record show members contacts
first middle last {record locations home} {record locations work}
%
}]


[subsection {Example 2 - Linked List}]


This next example just illustrates a simple linked list

[para][example {

% # define a very simple record for linked list
% record define linkedlist {
    value
    next
}
::linkedlist
% linkedlist lstart
::lstart
% lstart config -value 1 -next [linkedlist #auto]
% [lstart cget -next] config -value 2 -next [linkedlist #auto]
% [[lstart cget -next] cget -next] config -value 3 -next "end"
% set next lstart
lstart
% while 1 {
    lappend values [$next cget -value]
    set next [$next cget -next]
    if {[string match "end" $next]} break
}
% puts "$values"
1 2 3
% # cleanup linked list
% # We could just use delete record linkedlist also
% foreach I [record show instances linkedlist] {
    record delete instance $I
}
% record show instances linkedlist
%

}]



[vset CATEGORY {struct :: record}]
[include ../common-text/feedback.inc]
[manpage_end]







>
|
>


|
|
>

|



|
|

|
|




|
|
|




|
|
|

|

>


>
>

|

344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
% record show members contacts2
first middle last {record locations home} {record locations work}
% record show members contacts
first middle last {record locations home} {record locations work}
%
}]

[para]
[emph {Example 1}]
[para]

This next example just illustrates a simple linked list
[para]
[example {

% # define a very simple record for linked list
% record define llist {
    value
    next
}
::llist
% llist lstart
::lstart
% lstart config -value 1 -next [llist #auto]
% [lstart cget -next] config -value 2 -next [llist #auto]
% [[lstart cget -next] cget -next] config -value 3 -next "end"
% set next lstart
lstart
% while 1 {
lappend values [$next cget -value]
set next [$next cget -next]
if {[string match "end" $next]} {break}
}
% puts "$values"
1 2 3
% # cleanup linked list
% # We could just use delete record llist also
% foreach I [record show instances llist] {
record delete instance $I
}
% record show instances llist
%

}]

[para]

[vset CATEGORY {struct :: record}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/record.tcl.

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
#============================================================
# ::struct::record --
#
#    Implements a container data structure similar to a 'C'
#    structure. It hides the ugly details about keeping the
#    data organized by using a combination of arrays, lists
#    and namespaces.
#
#    Each record definition is kept in a master array
#    (_recorddefn) under the ::struct::record namespace. Each
#    instance of a record is kept within a separate namespace
#    for each record definition. Hence, instances of
#    the same record definition are managed under the
#    same namespace. This avoids possible collisions, and
#    also limits one big global array mechanism.
#
# Copyright (c) 2002 by Brett Schwarz
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# This code may be distributed under the same terms as Tcl.
#


#============================================================
#
####  FIX ERROR MESSAGES SO THEY MAKE SENSE (Wrong args)

namespace eval ::struct {}

namespace eval ::struct::record {

    ##
    ##  array of lists that holds the definition (variables) for each

    ##  record
    ##
    ##  _recorddefn(some_record) var1 var2 var3 ...
    ##
    variable _recorddefn

    ##
    ##  holds the count for each record in cases where the instance is

    ##  automatically generated
    ##
    ##  _count(some_record) 0
    ##

    ## This is not a count, but an id generator. Its value has to
    ## increase monotonicaly.

    variable _count

    ##
    ##  array that holds the defining record's name for each instances

    ##
    ##  _defn(some_instances) name_of_defining_record
    ##
    variable  _defn
    array set _defn {}

    ##
    ##  This holds the defaults for a record definition.  If no
    ##  default is given for a member of a record, then the value is
    ##  assigned to the empty string
    ##
    variable _defaults

    ##
    ##  These are the possible sub commands
    ##
    variable commands
    set commands [list define delete exists show]

    ##
    ##  This keeps track of the level that we are in when handling
    ##  nested records. This is kind of a hack, and probably can be
    ##  handled better
    ##
    set _level 0

    namespace export record
}

#------------------------------------------------------------



|



|
|














>
>









|
>







|
>











|
>







|
|
|










|
|
|







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
#============================================================
# ::struct::record --
#
#    Implements a container data structure similar to a 'C' 
#    structure. It hides the ugly details about keeping the
#    data organized by using a combination of arrays, lists
#    and namespaces.
#   
#    Each record definition is kept in a master array 
#    (_recorddefn) under the ::struct::record namespace. Each
#    instance of a record is kept within a separate namespace
#    for each record definition. Hence, instances of
#    the same record definition are managed under the
#    same namespace. This avoids possible collisions, and
#    also limits one big global array mechanism.
#
# Copyright (c) 2002 by Brett Schwarz
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# This code may be distributed under the same terms as Tcl.
#
# $Id: record.tcl,v 1.10 2004/09/29 20:56:18 andreas_kupries Exp $
#
#============================================================
#
####  FIX ERROR MESSAGES SO THEY MAKE SENSE (Wrong args)

namespace eval ::struct {}

namespace eval ::struct::record {

    ##
    ##  array of lists that holds the 
    ##  definition (variables) for each 
    ##  record
    ##
    ##  _recorddefn(some_record) var1 var2 var3 ...
    ##
    variable _recorddefn

    ##
    ##  holds the count for each record
    ##  in cases where the instance is
    ##  automatically generated
    ##
    ##  _count(some_record) 0
    ##

    ## This is not a count, but an id generator. Its value has to
    ## increase monotonicaly.

    variable _count

    ##
    ##  array that holds the defining record's
    ##  name for each instances
    ##
    ##  _defn(some_instances) name_of_defining_record
    ##
    variable  _defn
    array set _defn {}

    ##
    ##  This holds the defaults for a record definition.
    ##  If no default is given for a member of a record,
    ##  then the value is assigned to the empty string
    ##
    variable _defaults

    ##
    ##  These are the possible sub commands
    ##
    variable commands
    set commands [list define delete exists show]

    ##
    ##  This keeps track of the level that we are in
    ##  when handling nested records. This is kind of
    ##  a hack, and probably can be handled better
    ##
    set _level 0

    namespace export record
}

#------------------------------------------------------------
118
119
120
121
122
123
124

125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142

143
144
145
146
147
148

149
150
151
152

153
154





155
156
157
158
159
160
161
162
163
164

165
166

167
168
169

170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219

220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243

244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260

261
262
263
264
265
266
267
#
# Results:
#   Returns the name of the definition during successful
#   creation.
#------------------------------------------------------------
#
proc ::struct::record::Define {defn_ vars_ args} {

    variable _recorddefn
    variable _count
    variable _defaults

    # puts .([info level 0])...

    set defn_ [Qualify $defn_]

    if {[info exists _recorddefn($defn_)]} {
        error "Record definition $defn_ already exists"
    }

    if {[lsearch [info commands] $defn_] >= 0} {
        error "Structure definition name can not be a Tcl command name"
    }

    set _defaults($defn_)   [list]
    set _recorddefn($defn_) [list]


    ##
    ##  Loop through the members of the record
    ##  definition
    ##
    foreach V $vars_ {

        set len [llength $V]
        set D ""

        if {$len == 2} {

	    ##  2 --> there is a default value
	    ##        assigned to the member






            set D [lindex $V 1]
            set V [lindex $V 0]

        } elseif {$len == 3} {
	    ##  3 --> there is a nested record
	    ##        definition given as a member
	    ##  V = ('record' record-name field-name)

            if {![string match "record" "[lindex $V 0]"]} {

                Delete record $defn_
                error "$V is a Bad member for record definition. Definition creation aborted."

            }

            set new [lindex $V 1]

            set new [Qualify $new]
	    # puts .\tchild=$new
            ##
            ##  Right now, there can not be circular records
            ##  so, we abort the creation
            ##
            if {[string match "$defn_" "$new"]} {
		# puts .\tabort
                Delete record $defn_
                error "Can not have circular records. Structure was not created."
            }

            ##
            ##  Will take care of the nested record later
            ##  We just join by :: because this is how it
            ##  use to be declared, so the parsing code
            ##  is already there.
            ##
            set V [join [lrange $V 1 2] "::"]
        }

	# puts .\tfield($V)=default($D)

        lappend _recorddefn($defn_) $V
        lappend _defaults($defn_)   $D
    }

    # Create class command as alias to instance creator.
    uplevel #0 [list interp alias \
		    {} $defn_ \
		    {} ::struct::record::Create $defn_]

    set _count($defn_) 0

    # Create class namespace. This will hold all the instance information.
    namespace eval ::struct::record${defn_} {
        variable values
        variable instances
	variable record

        set instances [list]
    }

    set ::struct::record${defn_}::record $defn_

    ##
    ##    If there were args given (instances), then
    ##    create them now
    ##
    foreach A $args {

        uplevel 1 [list ::struct::record::Create $defn_ $A]
    }

    # puts .=>${defn_}
    return $defn_

}; # end proc ::struct::record::Define


#------------------------------------------------------------
# ::struct::record::Create --
#
#    Creates an instance of a record definition
#
# Arguments:
#    defn_    the name of the record definition
#    inst_    the name of the instances to create
#    args     values to set to the record's members
#
# Results:
#   Returns the name of the instance for a successful creation
#------------------------------------------------------------
#
proc ::struct::record::Create {defn_ inst_ args} {

    variable _recorddefn
    variable _count
    variable _defn
    variable _defaults
    variable _level

    # puts .([info level 0])...

    set inst_ [Qualify "$inst_"]

    ##
    ##    test to see if the record
    ##    definition has been defined yet
    ##
    if {![info exists _recorddefn($defn_)]} {
        error "Structure $defn_ does not exist"
    }


    ##
    ##    if there was no argument given,
    ##    then assume that the record
    ##    variable is automatically
    ##    generated
    ##







>




<
<












>






>



<
>
|
|
>
>
>
>
>





<
<
<


>

|
>



>

|





<













<
<



|
|
|
<
<



<



<




<
<





>



<




















>






<
<









>







123
124
125
126
127
128
129
130
131
132
133
134


135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

158
159
160
161
162
163
164
165
166
167
168
169
170



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187

188
189
190
191
192
193
194
195
196
197
198
199
200


201
202
203
204
205
206


207
208
209

210
211
212

213
214
215
216


217
218
219
220
221
222
223
224
225

226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252


253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
#
# Results:
#   Returns the name of the definition during successful
#   creation.
#------------------------------------------------------------
#
proc ::struct::record::Define {defn_ vars_ args} {

    variable _recorddefn
    variable _count
    variable _defaults



    set defn_ [Qualify $defn_]

    if {[info exists _recorddefn($defn_)]} {
        error "Record definition $defn_ already exists"
    }

    if {[lsearch [info commands] $defn_] >= 0} {
        error "Structure definition name can not be a Tcl command name"
    }

    set _defaults($defn_)   [list]
    set _recorddefn($defn_) [list]


    ##
    ##  Loop through the members of the record
    ##  definition
    ##
    foreach V $vars_ {

        set len [llength $V]
        set D ""


        ##
        ##  2 --> there is a default value
        ##        assigned to the member
        ##
        ##  3 --> there is a nested record
        ##        definition given as a member
        ##
        if {$len == 2} {

            set D [lindex $V 1]
            set V [lindex $V 0]

        } elseif {$len == 3} {




            if {![string match "record" "[lindex $V 0]"]} {

                Delete record $defn_
                error "$V is a Bad member for record definition
                definition creation aborted."
            }

            set new [lindex $V 1]

            set new [Qualify $new]

            ##
            ##  Right now, there can not be circular records
            ##  so, we abort the creation
            ##
            if {[string match "$defn_" "$new"]} {

                Delete record $defn_
                error "Can not have circular records. Structure was not created."
            }

            ##
            ##  Will take care of the nested record later
            ##  We just join by :: because this is how it
            ##  use to be declared, so the parsing code
            ##  is already there.
            ##
            set V [join [lrange $V 1 2] "::"]
        }



        lappend _recorddefn($defn_) $V
        lappend _defaults($defn_)   $D
    }
    

    uplevel #0 [list interp alias {} $defn_ {} ::struct::record::Create $defn_]



    set _count($defn_) 0


    namespace eval ::struct::record${defn_} {
        variable values
        variable instances


        set instances [list]
    }



    ##
    ##    If there were args given (instances), then
    ##    create them now
    ##
    foreach A $args {

        uplevel 1 [list ::struct::record::Create $defn_ $A]
    }


    return $defn_

}; # end proc ::struct::record::Define


#------------------------------------------------------------
# ::struct::record::Create --
#
#    Creates an instance of a record definition
#
# Arguments:
#    defn_    the name of the record definition
#    inst_    the name of the instances to create
#    args     values to set to the record's members
#
# Results:
#   Returns the name of the instance for a successful creation
#------------------------------------------------------------
#
proc ::struct::record::Create {defn_ inst_ args} {

    variable _recorddefn
    variable _count
    variable _defn
    variable _defaults
    variable _level



    set inst_ [Qualify "$inst_"]

    ##
    ##    test to see if the record
    ##    definition has been defined yet
    ##
    if {![info exists _recorddefn($defn_)]} {
        error "Structure $defn_ does not exist"
    }


    ##
    ##    if there was no argument given,
    ##    then assume that the record
    ##    variable is automatically
    ##    generated
    ##
280
281
282
283
284
285
286
287

288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318

319
320
321
322
323

324

325
326
327
328
329

330
331

332
333
334

335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360

361
362
363
364
365
366
367

368

369
370
371
372
373
374
375
376
377
378
379
380
381
382
        incr _count($defn_) -1
        error "Instances $inst_ already exists"
    }

    set _defn($inst_) $defn_

    ##
    ##    Initialize record variables to defaults

    ##

    # Create instance command as alias of instance dispatcher.
    uplevel #0 [list interp alias {} ${inst_} {} ::struct::record::Cmd $inst_]

    # Locate manager namespace, i.e. class namespace for new instance
    set nsi [Ns $inst_]
    # puts .\tnsi=$nsi

    # Import the state of the manager namespace
    upvar 0 ${nsi}values    __values
    upvar 0 ${nsi}instances __instances

    set cnt 0
    foreach V $_recorddefn($defn_) D $_defaults($defn_) {

	# puts .\tfield($V)=default($D)

	set __values($inst_,$V) $D

        ##
        ##  Test to see if there is a nested record
        ##
        if {[regexp -- {([\w]*)::([\w]*)} $V -> def inst]} {

            if {$_level == 0} {
                set _level 2
            }

            ##
            ##  This is to guard against if the creation had failed,

            ##  that there isn't any lingering variables/alias around
            ##
            set def [Qualify $def $_level]

            if {![info exists _recorddefn($def)]} {

                Delete inst "$inst_"

                return
            }

            ##
            ##    evaluate the nested record. If there were values for

            ##    the variables passed in, then we assume that the
            ##    value for this nested record is a list corresponding

            ##    the the nested list's variables, and so we pass that
            ##    to the nested record's instantiation.  We then get
            ##    rid of those args for later processing.

            ##
            set cnt_plus [expr {$cnt + 1}]
            set mem [lindex $args $cnt]
            if {![string match "" "$mem"]} {
		if {![string match "-$inst" "$mem"]} {
                    Delete inst "$inst_"
                    error "$inst is not a member of $defn_"
                }
            }
            incr _level
            set narg [lindex $args $cnt_plus]

	    # Create instance of the nested record.
            eval [linsert $narg 0 Create $def ${inst_}.${inst}]

            set args [lreplace $args $cnt $cnt_plus]

            incr _level -1
        } else {
	    # Regular field, not a nested record. Create alias for
	    # field access.
            uplevel #0 [list interp alias \
			    {} ${inst_}.$V \
			    {} ::struct::record::Access $defn_ $inst_ $V]
            incr cnt 2
        }

    }; # end foreach variable

    # Remember new instance.
    lappend __instances $inst_

    # Apply field values handed to the instance constructor.
    foreach {k v} $args {

        Access $defn_ $inst_ [string trimleft "$k" -] $v

    }; # end foreach arg {}

    if {$_level == 2} {
	set _level 0
    }

    # puts .=>${inst_}
    return $inst_

}; # end proc ::struct::record::Create


#------------------------------------------------------------
# ::struct::record::Access --







|
>


<


<
<
<
<
<
<
<
<



<
<
|




|






|
>
|




>

>




|
>
|
|
>
|
|
|
>




|






<
<

<




|
<
|
<
<


>


<
|

<

>

>






<







282
283
284
285
286
287
288
289
290
291
292

293
294








295
296
297


298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343


344

345
346
347
348
349

350


351
352
353
354
355

356
357

358
359
360
361
362
363
364
365
366
367

368
369
370
371
372
373
374
        incr _count($defn_) -1
        error "Instances $inst_ already exists"
    }

    set _defn($inst_) $defn_

    ##
    ##    Initialize record variables to
    ##    defaults
    ##


    uplevel #0 [list interp alias {} ${inst_} {} ::struct::record::Cmd $inst_]









    set cnt 0
    foreach V $_recorddefn($defn_) D $_defaults($defn_) {



        set [Ns $inst_]values($inst_,$V) $D

        ##
        ##  Test to see if there is a nested record
        ##
        if {[regexp -- {([\w]*)::([\w]*)} $V m def inst]} {

            if {$_level == 0} {
                set _level 2
            }

            ##
            ##  This is to guard against if the creation
            ##  had failed, that there isn't any
            ##  lingering variables/alias around
            ##
            set def [Qualify $def $_level]

            if {![info exists _recorddefn($def)]} {

                Delete inst "$inst_"

                return
            }

            ##
            ##    evaluate the nested record. If there
            ##    were values for the variables passed
            ##    in, then we assume that the value for
            ##    this nested record is a list 
            ##    corresponding the the nested list's
            ##    variables, and so we pass that to
            ##    the nested record's instantiation.
            ##    We then get rid of those args for later
            ##    processing.
            ##
            set cnt_plus [expr {$cnt + 1}]
            set mem [lindex $args $cnt]
            if {![string match "" "$mem"]} {
                 if {![string match "-$inst" "$mem"]} {
                    Delete inst "$inst_"
                    error "$inst is not a member of $defn_"
                }
            }
            incr _level
            set narg [lindex $args $cnt_plus]


            eval [linsert $narg 0 Create $def ${inst_}.${inst}]

            set args [lreplace $args $cnt $cnt_plus]

            incr _level -1
        } else {


            uplevel #0 [list interp alias {} ${inst_}.$V {} ::struct::record::Access $defn_ $inst_ $V]


            incr cnt 2
        }

    }; # end foreach variable


    lappend [Ns $inst_]instances $inst_


    foreach {k v} $args {

        Access $defn_ $inst_ [string trimleft "$k" -] $v

    }; # end foreach arg {}

    if {$_level == 2} {
	set _level 0
    }


    return $inst_

}; # end proc ::struct::record::Create


#------------------------------------------------------------
# ::struct::record::Access --
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441

    variable _recorddefn
    variable _defn

    set i [lsearch $_recorddefn($defn_) $var_]

    if {$i < 0} {
	error "$var_ does not exist in record $defn_"
    }

    if {![info exists _defn($inst_)]} {

	error "$inst_ does not exist"
    }

    if {[set idx [lsearch $args "="]] >= 0} {
        set args [lreplace $args $idx $idx]
    }

    set nsi [Ns $inst_]
    # puts .\tnsi=$nsi

    # Import the state of the manager namespace
    upvar 0 ${nsi}values    __values

    ##
    ##    If a value was given, then set it
    ##
    if {[llength $args] != 0} {

        set val_ [lindex $args 0]

        set __values($inst_,$var_) $val_
    }

    return $__values($inst_,$var_)

}; # end proc ::struct::record::Access


#------------------------------------------------------------
# ::struct::record::Cmd --
#
#    Used to process the set/get requests.







|




|




|
<
<
<
<
<
<








|


|
|







390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407






408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427

    variable _recorddefn
    variable _defn

    set i [lsearch $_recorddefn($defn_) $var_]

    if {$i < 0} {
         error "$var_ does not exist in record $defn_"
    }

    if {![info exists _defn($inst_)]} {

         error "$inst_ does not exist"
    }

    if {[set idx [lsearch $args "="]] >= 0} {
        set args [lreplace $args $idx $idx]
    } 







    ##
    ##    If a value was given, then set it
    ##
    if {[llength $args] != 0} {

        set val_ [lindex $args 0]

        set [Ns $inst_]values($inst_,$var_) $val_
    }

    return [set [Ns $inst_]values($inst_,$var_)]
     
}; # end proc ::struct::record::Access


#------------------------------------------------------------
# ::struct::record::Cmd --
#
#    Used to process the set/get requests.
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
    set len [llength $args]
    if {$len <= 1} {return [Show values "$inst_"]}

    set cmd [lindex $args 0]

    if {[string match "cget" "$cmd"]} {

	set cnt 0
	foreach k [lrange $args 1 end] {
	    if {[catch {set r [${inst_}.[string trimleft ${k} -]]} err]} {
		error "Bad option \"$k\""
	    }

	    lappend result $r
	    incr cnt
	}
	if {$cnt == 1} {set result [lindex $result 0]}
	return $result

    } elseif {[string match "config*" "$cmd"]} {

	set L [lrange $args 1 end]
	foreach {k v} $L {
	    ${inst_}.[string trimleft ${k} -] $v
	}

    } else {
	error "Wrong argument.
            must be \"object cget|configure args\""
    }

    return [list]

}; # end proc ::struct::record::Cmd








|
|
|
|
|

|
|
|
|
|



|
|
|
|


|







446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
    set len [llength $args]
    if {$len <= 1} {return [Show values "$inst_"]}

    set cmd [lindex $args 0]

    if {[string match "cget" "$cmd"]} {

            set cnt 0
            foreach k [lrange $args 1 end] {
                if {[catch {set r [${inst_}.[string trimleft ${k} -]]} err]} {
                    error "Bad option \"$k\""
                }

                lappend result $r
                incr cnt
            }
            if {$cnt == 1} {set result [lindex $result 0]}
            return $result

    } elseif {[string match "config*" "$cmd"]} {

            set L [lrange $args 1 end]
            foreach {k v} $L {
                 ${inst_}.[string trimleft ${k} -] $v
            }

    } else {
            error "Wrong argument.
            must be \"object cget|configure args\""
    }

    return [list]

}; # end proc ::struct::record::Cmd

536
537
538
539
540
541
542

543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617

618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
#    if what_ = instance, then return a list of instances
#               with record definition of record_
#    if what_ = values, then it will return the values
#               for a particular instance
#------------------------------------------------------------
#
proc ::struct::record::Show {what_ {record_ ""}} {

    variable _recorddefn
    variable _defn
    variable _defaults

    set record_ [Qualify $record_]

    ##
    ## We just prepend :: to the record_ argument
    ##
    #if {![string match "::*" "$record_"]} {set record_ "::$record_"}

    if {[string match "record*" "$what_"]} {
	# Show record

        return [lsort [array names _recorddefn]]
    }

    if {[string match "mem*" "$what_"]} {
	# Show members

	if {[string match "" "$record_"] || ![info exists _recorddefn($record_)]} {
	    error "Bad arguments while accessing members. Bad record name"
	}

	set res [list]
	set cnt 0
	foreach m $_recorddefn($record_) {
	    set def [lindex $_defaults($record_) $cnt]
	    if {[regexp -- {([\w]+)::([\w]+)} $m m d i]} {
		lappend res [list record $d $i]
	    } elseif {![string match "" "$def"]} {
		lappend res [list $m $def]
	    } else {
		lappend res $m
	    }

	    incr cnt
	}

	return $res
    }

    if {[string match "inst*" "$what_"]} {
	# Show instances

	if {![namespace exists ::struct::record${record_}]} {
	    return [list]
	}

	# Import the state of the manager namespace
	upvar 0 ::struct::record${record_}::instances __instances

        if {![info exists __instances]} {
            return [list]
        }
        return [lsort $__instances]

    }

    if {[string match "val*" "$what_"]} {
	# Show values

	set nsi [Ns $record_]
	upvar 0 ${nsi}::instances __instances
	upvar 0 ${nsi}::values    __values
	upvar 0 ${nsi}::record    __record

	if {[string match "" "$record_"] ||
	    ([lsearch $__instances $record_] < 0)} {

	    error "Wrong arguments to values. Bad instance name"
	}

	set ret [list]
	foreach k $_recorddefn($__record) {

	    set v $__values($record_,$k)

	    if {[regexp -- {([\w]*)::([\w]*)} $k m def inst]} {
		set v [::struct::record::Show values ${record_}.${inst}]
	    }

	    lappend ret -[namespace tail $k] $v
	}
	return $ret

    }

    # Bogus submethod
    return [list]

}; # end proc ::struct::record::Show


#------------------------------------------------------------
# ::struct::record::Delete --







>




<
<



|


<
<

<
<
|
<

|
|
|

|
|
|
|
|
|
|
|
|
|
|

|
|

|
|
<
|
<

|
|
|
<
<
|

<
<
<
<
<
<
<
|
<

|
<
<
<

|
<

|
|

|
|
>
|

|
|
|

|
|
|



<







522
523
524
525
526
527
528
529
530
531
532
533


534
535
536
537
538
539


540


541

542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563

564

565
566
567
568


569
570







571

572
573



574
575

576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594

595
596
597
598
599
600
601
#    if what_ = instance, then return a list of instances
#               with record definition of record_
#    if what_ = values, then it will return the values
#               for a particular instance
#------------------------------------------------------------
#
proc ::struct::record::Show {what_ {record_ ""}} {

    variable _recorddefn
    variable _defn
    variable _defaults



    ##
    ## We just prepend :: to the record_ argument
    ##
    if {![string match "::*" "$record_"]} {set record_ "::$record_"}

    if {[string match "record*" "$what_"]} {


        return [lsort [array names _recorddefn]]


    } elseif {[string match "mem*" "$what_"]} {


       if {[string match "" "$record_"] || ![info exists _recorddefn($record_)]} {
           error "Bad arguments while accessing members. Bad record name"
       }

       set res [list]
       set cnt 0
       foreach m $_recorddefn($record_) {
           set def [lindex $_defaults($record_) $cnt]
           if {[regexp -- {([\w]+)::([\w]+)} $m m d i]} {
               lappend res [list record $d $i]
           } elseif {![string match "" "$def"]} {
               lappend res [list $m $def]
           } else {
               lappend res $m
           }

           incr cnt
       }

       return $res


    } elseif {[string match "inst*" "$what_"]} {


        if {![info exists ::struct::record${record_}::instances]} {
            return [list]
        }


        return [lsort [set ::struct::record${record_}::instances]]








    } elseif {[string match "val*" "$what_"]} {


           set ns $_defn($record_)




           if {[string match "" "$record_"] || ([lsearch [set [Ns $record_]instances] $record_] < 0)} {


               error "Wrong arguments to values. Bad instance name"
           }

           set ret [list]
           foreach k $_recorddefn($ns) {

              set v [set [Ns $record_]values($record_,$k)]

              if {[regexp -- {([\w]*)::([\w]*)} $k m def inst]} {
                  set v [::struct::record::Show values ${record_}.${inst}]
              }

              lappend ret -[namespace tail $k] $v
           }
           return $ret

    }


    return [list]

}; # end proc ::struct::record::Show


#------------------------------------------------------------
# ::struct::record::Delete --
645
646
647
648
649
650
651

652
653
654
655
656
657
658

659
660
661

662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700

701
702
703
704
705
706
707
708
709
710
711
712
713
714
715

716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733


734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774

775


776

777
778

779




780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805

806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
#
# Returns:
#    none
#
#------------------------------------------------------------
#
proc ::struct::record::Delete {sub_ item_} {

    variable _recorddefn
    variable _defn
    variable _count
    variable _defaults

    # puts .([info level 0])...


    set item_ [Qualify $item_]

    switch -- $sub_ {

        instance -
        instances -
        inst    {
	    # puts .instance
	    # puts .is-instance=[Exists instance $item_]

            if {[Exists instance $item_]} {

		# Locate manager namespace, i.e. class namespace for
		# instance to remove
		set nsi [Ns $item_]
		# puts .\tnsi=$nsi

		# Import the state of the manager namespace
		upvar 0 ${nsi}values    __values
		upvar 0 ${nsi}instances __instances
		upvar 0 ${nsi}record    __record
		# puts .\trecord=$__record

		# Remove instance from state
		set i [lsearch $__instances $item_]
		set __instances [lreplace $__instances $i $i]
		unset _defn($item_)

		# Process instance fields.

		foreach V $_recorddefn($__record) {
		    # puts .\tfield($V)=/clear

		    if {[regexp -- {([\w]*)::([\w]*)} $V m def inst]} {
			# Nested record detected.
			# Determine associated instance and delete recursively.
			Delete inst ${item_}.${inst}
		    } else {
			# Delete field accessor alias
			# puts .de-alias\t($item_.$V)
			uplevel #0 [list interp alias {} ${item_}.$V {}]
		    }


		    unset __values($item_,$V)
		}

		# Auto-generated id numbers increase monotonically.
		# Reverting here causes the next auto to fail, claiming
		# that the instance exists.
                # incr _count($ns) -1

            } else {
                #error "$item_ is not a instance"
            }
        }
        record  -
        records   {
	    # puts .record

            ##
            ##  Delete the instances for this
            ##  record
            ##
	    # puts .get-instances
            foreach I [Show instance "$item_"] {
                catch {
		    # puts .di/$I
		    Delete instance "$I"
		}
            }

            catch {
                unset _recorddefn($item_)
                unset _defaults($item_)
                unset _count($item_)
                namespace delete ::struct::record${item_}
            }


        }
        default   {
            error "Wrong arguments to delete"
        }

    }; # end switch

    # Remove alias associated with instance or record (class)
    # puts .de-alias\t($item_)
    catch { uplevel #0 [list interp alias {} $item_ {}]}

    # puts ./
    return

}; # end proc ::struct::record::Delete


#------------------------------------------------------------
# ::struct::record::Exists --
#
#    Tests whether a record definition or record
#    instance exists.
#
# Arguments:
#    sub_    what to test. Either 'instance' or 'record'
#    item_   the specific record instance or definition
#            that needs to be tested.
#
# Tests to see if a particular instance exists
#
#------------------------------------------------------------
#
proc ::struct::record::Exists {sub_ item_} {

    # puts .([info level 0])...

    set item_ [Qualify $item_]

    switch -glob -- $sub_ {
        inst* {
	    variable _defn

            return [info exists _defn($item_)]


        }

        record {
	    variable _recorddefn

            return [info exists _recorddefn($item_)]




        }
        default  {
            error "Wrong arguments. Must be exists record|instance target"
        }
    }; # end switch

}; # end proc ::struct::record::Exists


#------------------------------------------------------------
# ::struct::record::Qualify --
#
#    Contructs the qualified name of the calling scope. This
#    defaults to 2 levels since there is an extra proc call in
#    between.
#
# Arguments:
#    item_   the command that needs to be qualified
#    level_  how many levels to go up (default = 2)
#
# Results:
#    the item_ passed in fully qualified
#
#------------------------------------------------------------
#
proc ::struct::record::Qualify {item_ {level_ 2}} {

    if {![string match "::*" "$item_"]} {
        set ns [uplevel $level_ [list namespace current]]

        if {![string match "::" "$ns"]} {
            append ns "::"
        }

        set item_ "$ns${item_}"
    }

    return "$item_"

}; # end proc ::struct::record::Qualify

# ### ### ### ######### ######### #########
## Ready

namespace eval ::struct {
    # Get 'record::record' into the general structure namespace.
    namespace import -force record::record
    namespace export record
}

package provide struct::record 1.2.2
return







>





|
|
>
|


>



|
<


|
<
<
|
<
|
<
<
|
<
<
|
<
<
<
<
|
<
|
|
<
|
<
<
<
<
<
<
|
<
|
|
>
|
|





|






|
>




<

<
<
|
<








>
>







<
<


<















|






<

<
<

|
|
>
|
>
>
|
>
|
|
>
|
>
>
>
>



















|






>






|















<
|
<
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632

633
634
635


636

637


638


639




640

641
642

643






644

645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667

668


669

670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686


687
688

689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710

711


712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777

778

#
# Returns:
#    none
#
#------------------------------------------------------------
#
proc ::struct::record::Delete {sub_ item_} {

    variable _recorddefn
    variable _defn
    variable _count
    variable _defaults

    ##
    ## We just semi-blindly prepend :: to the record_ argument
    ##
    if {![string match "::*" "$item_"]} {set item_ "::$item_"}

    switch -- $sub_ {

        instance -
        instances -
        inst    {



            if {[Exists instance $item_]} {
        


		set ns $_defn($item_)

                foreach A [info commands ${item_}.*] {


		    Delete inst $A


                }




        

                catch {
                    foreach {k v} [array get [Ns $item_]values $item_,*] {

                        






                        unset [Ns $item_]values($k)

                    }
                    set i [lsearch [set [Ns $item_]instances] $item_]
                    set [Ns $item_]instances [lreplace [set [Ns $item_]instances] $i $i]
                    unset _defn($item_)
                }

		# Auto-generated id numbers increase monotonically.
		# Reverting here causes the next auto to fail, claiming
		# that the instance exists.
                # incr _count($ns) -1
        
            } else {
                #error "$item_ is not a instance"
            }
        }
        record  -
        records   {


            ##
            ##  Delete the instances for this
            ##  record
            ##

            foreach I [Show instance "$item_"] {


                catch {Delete instance "$I"}

            }

            catch {
                unset _recorddefn($item_)
                unset _defaults($item_)
                unset _count($item_)
                namespace delete ::struct::record${item_}
            }

            
        }
        default   {
            error "Wrong arguments to delete"
        }

    }; # end switch



    catch { uplevel #0 [list interp alias {} $item_ {}]}


    return

}; # end proc ::struct::record::Delete


#------------------------------------------------------------
# ::struct::record::Exists --
#
#    Tests whether a record definition or record
#    instance exists.
#
# Arguments:
#    sub_    what to test. Either 'instance' or 'record'
#    item_   the specific record instance or definition
#            that needs to be tested.
#    
# Tests to see if a particular instance exists
#
#------------------------------------------------------------
#
proc ::struct::record::Exists {sub_ item_} {





    switch -glob -- $sub_ {
        inst*    {
    
            if {([lsearch ::[Ns $item_]instances $item_] >=0) || [llength [info commands ::${item_}.*]]} {
                return 1
            } else {
                return 0
            }
        }
        record  {
    
            set item_ "::$item_"
            if {[info exists _recorddefn($item_)] || [llength [info commands ${item_}]]} {
                return 1
            } else {
                return 0
            }
        }
        default  {
            error "Wrong arguments. Must be exists record|instance target"
        }
    }; # end switch

}; # end proc ::struct::record::Exists


#------------------------------------------------------------
# ::struct::record::Qualify --
#
#    Contructs the qualified name of the calling scope. This
#    defaults to 2 levels since there is an extra proc call in
#    between.
#
# Arguments:
#    item_   the command that needs to be qualified
#    level_  how many levels to go up (default = 2)
#    
# Results:
#    the item_ passed in fully qualified
#
#------------------------------------------------------------
#
proc ::struct::record::Qualify {item_ {level_ 2}} {

    if {![string match "::*" "$item_"]} {
        set ns [uplevel $level_ [list namespace current]]

        if {![string match "::" "$ns"]} {
            append ns "::"
        }
     
        set item_ "$ns${item_}"
    }

    return "$item_"

}; # end proc ::struct::record::Qualify

# ### ### ### ######### ######### #########
## Ready

namespace eval ::struct {
    # Get 'record::record' into the general structure namespace.
    namespace import -force record::record
    namespace export record
}

package provide struct::record 1.2.1

Changes to modules/struct/record.test.

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
}

# -------------------------------------------------------------------------

namespace import struct::record

#----------------------------------------------------------------------
## __Attention__, currently the later tests depend on actions
## performed here in the early tests (new records, instances, etc.).

test record-0.1 {record define} {
    record define phones {home work cell}
} ::phones

test record-0.2 {record define - multi line} {
    record define contact {







<
<







23
24
25
26
27
28
29


30
31
32
33
34
35
36
}

# -------------------------------------------------------------------------

namespace import struct::record

#----------------------------------------------------------------------



test record-0.1 {record define} {
    record define phones {home work cell}
} ::phones

test record-0.2 {record define - multi line} {
    record define contact {
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
	    one
	    {record circular cir}
	} cir(1)
    } err
    set err
} "Can not have circular records. Structure was not created."


test record-0.6 {single instance} {
    contact cont(1)
} ::cont(1)

test record-0.7 {auto instance} {
    contact #auto
} ::contact0

test record-0.8 {instance of double nested record} {
    set res [mycontact #auto]
    lappend res [record show values $res]
    set res
} {::mycontact0 {-age {} -sex {} -cont {-first {} -middle {} -last {} -phlist {-home {} -work {} -cell {}}}}}

test record-0.9 {setting a instance var via alias} {
    cont(1).first Brett
} Brett

#----------------------------------------------------------------------

test record-1.0 {setting a nested instance var via alias} {
    cont(1).phlist.cell 425-555-1212
} 425-555-1212

test record-1.1 {setting a double nested instance var via alias} {
    mycontact0.cont.phlist.cell 206-555-1212
} 206-555-1212







<


















<
<







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


89
90
91
92
93
94
95
	    one
	    {record circular cir}
	} cir(1)
    } err
    set err
} "Can not have circular records. Structure was not created."


test record-0.6 {single instance} {
    contact cont(1)
} ::cont(1)

test record-0.7 {auto instance} {
    contact #auto
} ::contact0

test record-0.8 {instance of double nested record} {
    set res [mycontact #auto]
    lappend res [record show values $res]
    set res
} {::mycontact0 {-age {} -sex {} -cont {-first {} -middle {} -last {} -phlist {-home {} -work {} -cell {}}}}}

test record-0.9 {setting a instance var via alias} {
    cont(1).first Brett
} Brett



test record-1.0 {setting a nested instance var via alias} {
    cont(1).phlist.cell 425-555-1212
} 425-555-1212

test record-1.1 {setting a double nested instance var via alias} {
    mycontact0.cont.phlist.cell 206-555-1212
} 206-555-1212
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
    loc(1) config -street somestreet -city somecity -state somestate -country somecountry
} ""

test record-1.9 {setting nested vars via config} {
    cont(1) config -phlist.home 425-555-1212
} ""

#----------------------------------------------------------------------

test record-2.0 {test value of nested member} {
    cont(1) cget -phlist.home
} 425-555-1212

test record-2.1 {config with no values} {
    loc(1) config
} [list -street somestreet -city somecity -state somestate -country somecountry]







<
<







122
123
124
125
126
127
128


129
130
131
132
133
134
135
    loc(1) config -street somestreet -city somecity -state somestate -country somecountry
} ""

test record-1.9 {setting nested vars via config} {
    cont(1) config -phlist.home 425-555-1212
} ""



test record-2.0 {test value of nested member} {
    cont(1) cget -phlist.home
} 425-555-1212

test record-2.1 {config with no values} {
    loc(1) config
} [list -street somestreet -city somecity -state somestate -country somecountry]
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
    eval contact cont(3) [cont(1)]
} ::cont(3)

test record-2.9 {get the above values via alias} {
    cont(2).phlist.home
} 425-555-1212

#----------------------------------------------------------------------

test record-3.0 {copy one definition to another definition} {
    record define new_contact [record show members contact]
} ::new_contact

test record-3.1 {show defined records} {
    record show records
} [lsort [list ::phones ::contact ::location ::new_contact ::mycontact]]







<
<







162
163
164
165
166
167
168


169
170
171
172
173
174
175
    eval contact cont(3) [cont(1)]
} ::cont(3)

test record-2.9 {get the above values via alias} {
    cont(2).phlist.home
} 425-555-1212



test record-3.0 {copy one definition to another definition} {
    record define new_contact [record show members contact]
} ::new_contact

test record-3.1 {show defined records} {
    record show records
} [lsort [list ::phones ::contact ::location ::new_contact ::mycontact]]
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
    record delete instance loc(2)
} ""

test record-3.9 {delete a nested instance} {
    record delete instance cont(2)
} ""

#----------------------------------------------------------------------

test record-4.0 {delete a record} {
    record delete record location
} ""

test record-4.1 {test existence of an instance that was deleted} {
    record exists instance loc(1)
} 0

test record-4.2 {show existence of an instance} {
    record exists instance cont(1)
} 1

test record-4.3 {show non-existent instance} {
    record exists instance junk
} 0

test record-4.4 {show existence of record} {
    record exists record contact
} 1

test record-4.5-tkt-baa334cfef {deletion of nested record through container} {
    record define details {date place}
    record define person {fullname {record details birth}}
    person js
    js.fullname "John Smith"
    js.birth.date "31 Jul 1935"
    js.birth.place London

    record delete instance js
    set r [list [record show instances person] \
	       [record show instances details]]

    record delete record details
    record delete record person

    set r
} {{} {}}
unset r

#----------------------------------------------------------------------

##
##    NAMESPACE TESTS
##

test record-5.0 {record define} {
    namespace eval myns {







<
<




















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







203
204
205
206
207
208
209


210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229




















230
231
232
233
234
235
236
    record delete instance loc(2)
} ""

test record-3.9 {delete a nested instance} {
    record delete instance cont(2)
} ""



test record-4.0 {delete a record} {
    record delete record location
} ""

test record-4.1 {test existence of an instance that was deleted} {
    record exists instance loc(1)
} 0

test record-4.2 {show existence of an instance} {
    record exists instance cont(1)
} 1

test record-4.3 {show non-existent instance} {
    record exists instance junk
} 0

test record-4.4 {show existence of record} {
    record exists record contact
} 1






















##
##    NAMESPACE TESTS
##

test record-5.0 {record define} {
    namespace eval myns {
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
    myns::cont(1) config -middle Allen -last Schwarz
} ""

test record-5.9 {get a value via cget} {
    myns::cont(1) cget -first -middle -last
} [list Brett Allen Schwarz]

#----------------------------------------------------------------------

test record-6.0 {record default value} {
    myns::loc(1) cget -country
} USA

test record-6.1 {setting values via config} {
    myns::loc(1) config -street somestreet -city somecity -state somestate -country somecountry
} ""







<
<







294
295
296
297
298
299
300


301
302
303
304
305
306
307
    myns::cont(1) config -middle Allen -last Schwarz
} ""

test record-5.9 {get a value via cget} {
    myns::cont(1) cget -first -middle -last
} [list Brett Allen Schwarz]



test record-6.0 {record default value} {
    myns::loc(1) cget -country
} USA

test record-6.1 {setting values via config} {
    myns::loc(1) config -street somestreet -city somecity -state somestate -country somecountry
} ""
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
    }
} ::myns::loc(2)

test record-6.9 {get the above value via alias} {
    myns::loc(2).street
} street2

#----------------------------------------------------------------------

test record-7.0 {set values during instantiation - nested record} {
    namespace eval myns {
	contact cont(2) -first John -middle Q -last Doe -phlist [list home 425-555-1212 work 425-555-1222 cell 425-555-1111]
    }
} ::myns::cont(2)

test record-7.1 {get the above values via alias} {







<
<







336
337
338
339
340
341
342


343
344
345
346
347
348
349
    }
} ::myns::loc(2)

test record-6.9 {get the above value via alias} {
    myns::loc(2).street
} street2



test record-7.0 {set values during instantiation - nested record} {
    namespace eval myns {
	contact cont(2) -first John -middle Q -last Doe -phlist [list home 425-555-1212 work 425-555-1222 cell 425-555-1111]
    }
} ::myns::cont(2)

test record-7.1 {get the above values via alias} {
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
} [list ::myns::loc(1) ::myns::loc(2) ::myns::loc(5)]


test record-7.9 {delete an instance} {
    record delete instance myns::loc(2)
} ""

#----------------------------------------------------------------------

test record-8.0 {delete a nested instance} {
    record delete instance myns::cont(2)
} ""

test record-8.1 {delete a record} {
    record delete record myns::location
} ""







<
<







380
381
382
383
384
385
386


387
388
389
390
391
392
393
} [list ::myns::loc(1) ::myns::loc(2) ::myns::loc(5)]


test record-7.9 {delete an instance} {
    record delete instance myns::loc(2)
} ""



test record-8.0 {delete a nested instance} {
    record delete instance myns::cont(2)
} ""

test record-8.1 {delete a record} {
    record delete record myns::location
} ""
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
    record exists instance myns::junk
} 0

test record-8.5 {show existence of record} {
    record exists record myns::contact
} 1

#----------------------------------------------------------------------
# Auto instances and deletion.

test record-9.0 {auto instance & deletion} {
    set res {}
    lappend res [contact #auto]
    lappend res [contact #auto]

    record delete instance [lindex $res end]

    lappend res [contact #auto]

} {::contact1 ::contact2 ::contact3}

#----------------------------------------------------------------------

test record-10.0 {nesting records more than one level} {
    set jmod aMacro

    record define fitParams {
	amp
	unmod
	jcoup







|













<
<







404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424


425
426
427
428
429
430
431
    record exists instance myns::junk
} 0

test record-8.5 {show existence of record} {
    record exists record myns::contact
} 1


# Auto instances and deletion.

test record-9.0 {auto instance & deletion} {
    set res {}
    lappend res [contact #auto]
    lappend res [contact #auto]

    record delete instance [lindex $res end]

    lappend res [contact #auto]

} {::contact1 ::contact2 ::contact3}



test record-10.0 {nesting records more than one level} {
    set jmod aMacro

    record define fitParams {
	amp
	unmod
	jcoup
500
501
502
503
504
505
506
507
508
509
510
    $fitXYInputData.confidence 0.9

    set res [record show values $fitXYInputData]

    record delete instance $fitXYInputData
    set res
} {-silent true -verbose true -macro aMacro -confidence 0.9 -input {-reps 30 -sdev 0.1 -seed 12345 -params {-amp {} -unmod {} -jcoup {} -t2star {}} -data {-delays {} -values {}}}}

#----------------------------------------------------------------------
testsuiteCleanup
return







<
<
<
<
461
462
463
464
465
466
467




    $fitXYInputData.confidence 0.9

    set res [record show values $fitXYInputData]

    record delete instance $fitXYInputData
    set res
} {-silent true -verbose true -macro aMacro -confidence 0.9 -input {-reps 30 -sdev 0.1 -seed 12345 -params {-amp {} -unmod {} -jcoup {} -t2star {}} -data {-delays {} -values {}}}}




Changes to modules/struct/skiplist.man.

78
79
80
81
82
83
84
85
86
Walk the skiplist from the first node to the last. At each node, the
command [arg cmd] will be evaluated with the key and value of the
current node appended.

[list_end]

[vset CATEGORY {struct :: skiplist}]
[include ../common-text/feedback.inc]
[manpage_end]







|

78
79
80
81
82
83
84
85
86
Walk the skiplist from the first node to the last. At each node, the
command [arg cmd] will be evaluated with the key and value of the
current node appended.

[list_end]

[vset CATEGORY {struct :: skiplist}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/stack.man.

100
101
102
103
104
105
106
107
108
[call [arg stackName] [method size]]

Return the number of items on the stack.

[list_end]

[vset CATEGORY {struct :: stack}]
[include ../common-text/feedback.inc]
[manpage_end]







|

100
101
102
103
104
105
106
107
108
[call [arg stackName] [method size]]

Return the number of items on the stack.

[list_end]

[vset CATEGORY {struct :: stack}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/stack_c.tcl.

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
		sdg->counter = 0;

		Tcl_SetAssocData (interp, KEY, proc,
				  (ClientData) sdg);
	    }
	    
	    sdg->counter ++;
	    sprintf (sdg->buf, "stack%ld", sdg->counter);
	    return sdg->buf;

#undef  KEY
	}

	static void
	SDdeleteCmd (ClientData clientData)







|







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
		sdg->counter = 0;

		Tcl_SetAssocData (interp, KEY, proc,
				  (ClientData) sdg);
	    }
	    
	    sdg->counter ++;
	    sprintf (sdg->buf, "stack%d", sdg->counter);
	    return sdg->buf;

#undef  KEY
	}

	static void
	SDdeleteCmd (ClientData clientData)

Changes to modules/struct/struct_list.man.

1
2
3
4
5
6
7
8
9
10
[comment {-*- tcl -*- doctools manpage}]
[comment {$Id: struct_list.man,v 1.24 2010/10/05 21:47:25 andreas_kupries Exp $}]
[vset LIST_VERSION 1.8.4]
[manpage_begin struct::list n [vset LIST_VERSION]]
[keywords assign]
[keywords common]
[keywords comparison]
[keywords diff]
[keywords differential]
[keywords equal]


|







1
2
3
4
5
6
7
8
9
10
[comment {-*- tcl -*- doctools manpage}]
[comment {$Id: struct_list.man,v 1.24 2010/10/05 21:47:25 andreas_kupries Exp $}]
[vset LIST_VERSION 1.8.3]
[manpage_begin struct::list n [vset LIST_VERSION]]
[keywords assign]
[keywords common]
[keywords comparison]
[keywords diff]
[keywords differential]
[keywords equal]
822
823
824
825
826
827
828
829
830
Donald E. Knuth, "Fascicle 2b of 'The Art of Computer Programming'
volume 4". Available on the Web at the author's personal site:
[uri http://www-cs-faculty.stanford.edu/~knuth/fasc2b.ps.gz].

[list_end]

[vset CATEGORY {struct :: list}]
[include ../common-text/feedback.inc]
[manpage_end]







|

822
823
824
825
826
827
828
829
830
Donald E. Knuth, "Fascicle 2b of 'The Art of Computer Programming'
volume 4". Available on the Web at the author's personal site:
[uri http://www-cs-faculty.stanford.edu/~knuth/fasc2b.ps.gz].

[list_end]

[vset CATEGORY {struct :: list}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Deleted modules/struct/struct_map.man.

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
[comment {-*- text -*- doctools manpage}]
[vset VERSION 1]
[manpage_begin struct::map n [vset VERSION]]
[titledesc {Manage key/value maps}]
[require struct::map [opt [vset VERSION]]]
[description]

Provides a snit class whose instances manage a key/value map.
In other words, an object wrapper around Tcl arrays.

[section API]

The main command provides construction of maps:

[list_begin definitions]

[call [cmd ::struct::map] [arg mapName]]

Creates a new, empty map with an associated global Tcl command whose
name is [arg mapName].

It may be used to invoke various operations on the map.

It has the following general form:

[list_begin definitions]
[call [cmd mapName] [method method] [opt [arg "arg arg ..."]]]
[method method] and [arg arg]uments determine the exact behavior of
the command.
[list_end][comment --instance-command--]

If [arg mapName] is specified as [const %AUTO%] a unique name will be
generated by the package itself.

The result of the command is the fully-qualified name of the instance
command. 

[list_end][comment --class-command--]

[para]

The following commands are possible for map objects:

[list_begin definitions]

[call [arg mapName] [method get]]

Returns the entire map as a Tcl dictionary.

[call [arg mapName] [method names]]

Returns the list of all keys known to the map, in arbitrary order.

[call [arg mapName] [method set] [arg name] [opt [arg value]]]

Sets key [arg name] to the specified [arg value], if the value specified.

Returns the value for the key.

Throws an error if the key is not known.

[call [arg mapName] [method unset] [opt [arg pattern]...]]

Removes all keys matching at least one of the glob [arg pattern]s from
the map.

If no pattern is specified all keys are removed.
In other words, the default pattern is [const *].

The result of the command is the empty string.

[list_end]

[include ../common-text/feedback.inc]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Changes to modules/struct/struct_set.man.

128
129
130
131
132
133
134
135
136
([const false]).

[list_end]

[section REFERENCES]

[vset CATEGORY {struct :: set}]
[include ../common-text/feedback.inc]
[manpage_end]







|

128
129
130
131
132
133
134
135
136
([const false]).

[list_end]

[section REFERENCES]

[vset CATEGORY {struct :: set}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/struct_tree.man.

784
785
786
787
788
789
790
791
792
    mytree insert 0    end 3   ; # Now create node 3 as child of node 0
    mytree insert 0    end     ; # Create another child of 0, with a
    #                              generated name. The name is returned
    #                              as the result of the command.
}]

[vset CATEGORY {struct :: tree}]
[include ../common-text/feedback.inc]
[manpage_end]







|

784
785
786
787
788
789
790
791
792
    mytree insert 0    end 3   ; # Now create node 3 as child of node 0
    mytree insert 0    end     ; # Create another child of 0, with a
    #                              generated name. The name is returned
    #                              as the result of the command.
}]

[vset CATEGORY {struct :: tree}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/struct_tree1.man.

284
285
286
287
288
289
290
291
292
[const enter] for the first evaluation, and [const leave] for the
second.

[list_end]
[list_end]

[vset CATEGORY {struct :: tree}]
[include ../common-text/feedback.inc]
[manpage_end]







|

284
285
286
287
288
289
290
291
292
[const enter] for the first evaluation, and [const leave] for the
second.

[list_end]
[list_end]

[vset CATEGORY {struct :: tree}]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/struct/tree/m.c.

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
/* struct::tree - critcl - layer 3 definitions.
 *
 * -> Method functions.
 *    Implementations for all tree methods.
 */

#include <ctype.h>  /* is... */
#include <string.h>
#include "util.h"
#include "m.h"
#include "t.h"
#include "tn.h"
#include "ms.h"

/* ..................................................
 * Handling of all indices, numeric and 'end-x' forms.  Copied straight out of
 * the Tcl core as this is not exported through the public API.
 */

static int TclGetIntForIndex (Tcl_Interp* interp, Tcl_Obj* objPtr,
			      int endValue, int* indexPtr);
static int TclFormatInt      (char *buffer, long n);
static int TclCheckBadOctal  (Tcl_Interp* interp, CONST char* value);

/* .................................................. */

/*
 *---------------------------------------------------------------------------
 *
 * tm_TASSIGN --






<














<
<







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
/* struct::tree - critcl - layer 3 definitions.
 *
 * -> Method functions.
 *    Implementations for all tree methods.
 */


#include <string.h>
#include "util.h"
#include "m.h"
#include "t.h"
#include "tn.h"
#include "ms.h"

/* ..................................................
 * Handling of all indices, numeric and 'end-x' forms.  Copied straight out of
 * the Tcl core as this is not exported through the public API.
 */

static int TclGetIntForIndex (Tcl_Interp* interp, Tcl_Obj* objPtr,
			      int endValue, int* indexPtr);



/* .................................................. */

/*
 *---------------------------------------------------------------------------
 *
 * tm_TASSIGN --
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
    for (i = 0; i < cc; i++) {
	ev [i] = cv [i];
	Tcl_IncrRefCount (ev [i]);
    }

    res = t_walk (interp, tn, type, order,
		  t_walk_invokecmd,
		  (Tcl_Obj*) (long int) cc, (Tcl_Obj*) ev, objv [0]);

    ckfree ((char*) ev);
    return res;
}

/* .................................................. */
/* .................................................. */







|







2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
    for (i = 0; i < cc; i++) {
	ev [i] = cv [i];
	Tcl_IncrRefCount (ev [i]);
    }

    res = t_walk (interp, tn, type, order,
		  t_walk_invokecmd,
		  (Tcl_Obj*) cc, (Tcl_Obj*) ev, objv [0]);

    ckfree ((char*) ev);
    return res;
}

/* .................................................. */
/* .................................................. */
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
 *
 * Side effects:
 *	The interpreter's result is modified.
 *
 *----------------------------------------------------------------------
 */

static int
TclCheckBadOctal(interp, value)
     Tcl_Interp *interp;		/* Interpreter to use for error reporting.
				 * If NULL, then no error message is left
				 * after errors. */
     CONST char *value;		/* String to check. */
{
    register CONST char *p = value;







|







2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
 *
 * Side effects:
 *	The interpreter's result is modified.
 *
 *----------------------------------------------------------------------
 */

int
TclCheckBadOctal(interp, value)
     Tcl_Interp *interp;		/* Interpreter to use for error reporting.
				 * If NULL, then no error message is left
				 * after errors. */
     CONST char *value;		/* String to check. */
{
    register CONST char *p = value;
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
 * Side effects:
 *	The formatted characters are written into the storage pointer to
 *	by the "buffer" argument.
 *
 *----------------------------------------------------------------------
 */

static int
TclFormatInt(buffer, n)
     char *buffer;		/* Points to the storage into which the
				 * formatted characters are written. */
     long n;			/* The integer to format. */
{
    long intVal;
    int i;







|







2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
 * Side effects:
 *	The formatted characters are written into the storage pointer to
 *	by the "buffer" argument.
 *
 *----------------------------------------------------------------------
 */

int
TclFormatInt(buffer, n)
     char *buffer;		/* Points to the storage into which the
				 * formatted characters are written. */
     long n;			/* The integer to format. */
{
    long intVal;
    int i;

Changes to modules/struct/tree/t.c.

1
2
3
4
5
6
7
8
9
10
11
12
/* struct::tree - critcl - layer 1 definitions
 * (c) Tree functions
 */

#include <string.h>
#include <t.h>
#include <tn.h>
#include <util.h>

/* .................................................. */

T*




<







1
2
3
4

5
6
7
8
9
10
11
/* struct::tree - critcl - layer 1 definitions
 * (c) Tree functions
 */


#include <t.h>
#include <tn.h>
#include <util.h>

/* .................................................. */

T*

Changes to modules/struct/tree/tn.c.

1
2
3
4
5
6
7
8
9
10
11
12
/* struct::tree - critcl - layer 1 declarations
 * (b) Node operations.
 */

#include <t.h>
#include <tn.h>
#include <util.h>

/* .................................................. */

static void extend_children  (TNPtr n);
static int  fill_descendants (TNPtr n, int lc, Tcl_Obj** lv, int at);




<







1
2
3
4

5
6
7
8
9
10
11
/* struct::tree - critcl - layer 1 declarations
 * (b) Node operations.
 */


#include <tn.h>
#include <util.h>

/* .................................................. */

static void extend_children  (TNPtr n);
static int  fill_descendants (TNPtr n, int lc, Tcl_Obj** lv, int at);

Changes to modules/struct/tree/walk.c.

233
234
235
236
237
238
239
240
241
242
243
244
245
246
247

int
t_walk_invokecmd (Tcl_Interp* interp, TN* n, Tcl_Obj* dummy0,
		  Tcl_Obj* dummy1, Tcl_Obj* dummy2,
		  Tcl_Obj* action)
{
    int	      res;
    int	      cc = (long int)  dummy0;
    Tcl_Obj** ev = (Tcl_Obj**) dummy1; /* cc+3 elements */

    ev [cc]   = dummy2;	   /* Tree */
    ev [cc+1] = n->name;   /* Node */
    ev [cc+2] = action;	   /* Action */

    Tcl_IncrRefCount (ev [cc]);







|







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247

int
t_walk_invokecmd (Tcl_Interp* interp, TN* n, Tcl_Obj* dummy0,
		  Tcl_Obj* dummy1, Tcl_Obj* dummy2,
		  Tcl_Obj* action)
{
    int	      res;
    int	      cc = (int)       dummy0;
    Tcl_Obj** ev = (Tcl_Obj**) dummy1; /* cc+3 elements */

    ev [cc]   = dummy2;	   /* Tree */
    ev [cc+1] = n->name;   /* Node */
    ev [cc+2] = action;	   /* Action */

    Tcl_IncrRefCount (ev [cc]);

Changes to modules/struct/tree_c.tcl.

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
		tdg->counter = 0;

		Tcl_SetAssocData (interp, KEY, proc,
				  (ClientData) tdg);
	    }
	    
	    tdg->counter ++;
	    sprintf (tdg->buf, "tree%ld", tdg->counter);
	    return tdg->buf;

#undef  KEY
	}

	static void
	TDdeleteCmd (ClientData clientData)







|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
		tdg->counter = 0;

		Tcl_SetAssocData (interp, KEY, proc,
				  (ClientData) tdg);
	    }
	    
	    tdg->counter ++;
	    sprintf (tdg->buf, "tree%d", tdg->counter);
	    return tdg->buf;

#undef  KEY
	}

	static void
	TDdeleteCmd (ClientData clientData)

Changes to modules/tar/pkgIndex.tcl.

1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.4]} {
    # PRAGMA: returnok
    return
}
package ifneeded tar 0.11 [list source [file join $dir tar.tcl]]




|
1
2
3
4
5
if {![package vsatisfies [package provide Tcl] 8.4]} {
    # PRAGMA: returnok
    return
}
package ifneeded tar 0.10 [list source [file join $dir tar.tcl]]

Changes to modules/tar/tar.man.

1
2
3
4
5
6
7
8
[vset PACKAGE_VERSION 0.11]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tar n [vset PACKAGE_VERSION]]
[keywords archive]
[keywords {tape archive}]
[keywords tar]
[moddesc   {Tar file handling}]
[titledesc {Tar file creation, extraction & manipulation}]
|







1
2
3
4
5
6
7
8
[vset PACKAGE_VERSION 0.10]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tar n [vset PACKAGE_VERSION]]
[keywords archive]
[keywords {tape archive}]
[keywords tar]
[moddesc   {Tar file handling}]
[titledesc {Tar file creation, extraction & manipulation}]
82
83
84
85
86
87
88
89

90
91
92
93
94
95
96

97
98
99
100
101
102
103
104
105
106
107
108
109
110
% foreach {file size} [::tar::untar tarball.tar -glob *.jpg] {
puts "Extracted $file ($size bytes)"
}
}]

[call [cmd ::tar::get] [arg tarball] [arg fileName] [opt [option -chan]]]

Returns the contents of [arg fileName] from the [arg tarball].


[para][example {
% set readme [::tar::get tarball.tar doc/README] {
% puts $readme
}
}]


[para] If the option [option -chan] is present [arg tarball] is
interpreted as an open channel.  It is assumed that the channel was
opened for reading, and configured for binary input.  The command will
[emph not] close the channel.

[para] An error is thrown when [arg fileName] is not found in the tar
archive.

[call [cmd ::tar::create] [arg tarball] [arg files] [arg args]]

Creates a new tar file containing the [arg files]. [arg files] must be specified
as a single argument which is a proper list of filenames.

[list_begin options]







|
>

|





>
|
<
|
|
<
<
<







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

100
101



102
103
104
105
106
107
108
% foreach {file size} [::tar::untar tarball.tar -glob *.jpg] {
puts "Extracted $file ($size bytes)"
}
}]

[call [cmd ::tar::get] [arg tarball] [arg fileName] [opt [option -chan]]]

Returns the contents of [arg fileName] from the [arg tarball]
[para]

[example {
% set readme [::tar::get tarball.tar doc/README] {
% puts $readme
}
}]

[para]
If the option [option -chan] is present [arg tarball] is interpreted as an open channel.

It is assumed that the channel was opened for reading, and configured for binary input.
The command will [emph not] close the channel.




[call [cmd ::tar::create] [arg tarball] [arg files] [arg args]]

Creates a new tar file containing the [arg files]. [arg files] must be specified
as a single argument which is a proper list of filenames.

[list_begin options]
161
162
163
164
165
166
167
168
169
% ::tar::contents new.tar
file3
}]

[list_end]

[vset CATEGORY tar]
[include ../common-text/feedback.inc]
[manpage_end]







|

159
160
161
162
163
164
165
166
167
% ::tar::contents new.tar
file3
}]

[list_end]

[vset CATEGORY tar]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/tar/tar.tcl.

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
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: tar.tcl,v 1.17 2012/09/11 17:22:24 andreas_kupries Exp $

package require Tcl 8.4
package provide tar 0.11

namespace eval ::tar {}

proc ::tar::parseOpts {acc opts} {
    array set flags $acc
    foreach {x y} $acc {upvar $x $x}
    
    set len [llength $opts]
    set i 0
    while {$i < $len} {
        set name [string trimleft [lindex $opts $i] -]
        if {![info exists flags($name)]} {
	    return -errorcode {TAR INVALID OPTION} \
		-code error "unknown option \"$name\""
	}
        if {$flags($name) == 1} {
            set $name [lindex $opts [expr {$i + 1}]]
            incr i $flags($name)
        } elseif {$flags($name) > 1} {
            set $name [lrange $opts [expr {$i + 1}] [expr {$i + $flags($name)}]]
            incr i $flags($name)
        } else {







|











|
<
<
<







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
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: tar.tcl,v 1.17 2012/09/11 17:22:24 andreas_kupries Exp $

package require Tcl 8.4
package provide tar 0.10

namespace eval ::tar {}

proc ::tar::parseOpts {acc opts} {
    array set flags $acc
    foreach {x y} $acc {upvar $x $x}
    
    set len [llength $opts]
    set i 0
    while {$i < $len} {
        set name [string trimleft [lindex $opts $i] -]
        if {![info exists flags($name)]} {return -code error "unknown option \"$name\""}



        if {$flags($name) == 1} {
            set $name [lindex $opts [expr {$i + 1}]]
            incr i $flags($name)
        } elseif {$flags($name) > 1} {
            set $name [lrange $opts [expr {$i + 1}] [expr {$i + $flags($name)}]]
            incr i $flags($name)
        } else {
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
    if {$pad == 512} {return 0}
    return $pad
}

proc ::tar::seekorskip {ch off wh} {
    if {[tell $ch] < 0} {
	if {$wh!="current"} {
	    return -code error -errorcode [list TAR INVALID WHENCE $wh] \
		"WHENCE=$wh not supported on non-seekable channel $ch"
	}
	skip $ch $off
	return
    }
    seek $ch $off $wh
    return
}







<
|







43
44
45
46
47
48
49

50
51
52
53
54
55
56
57
    if {$pad == 512} {return 0}
    return $pad
}

proc ::tar::seekorskip {ch off wh} {
    if {[tell $ch] < 0} {
	if {$wh!="current"} {

	    error "WHENCE=$wh not supported on non-seekable channel $ch"
	}
	skip $ch $off
	return
    }
    seek $ch $off $wh
    return
}
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
	set fh [::open $tar]
	fconfigure $fh -encoding binary -translation lf -eofchar {}
    }
    while {![eof $fh]} {
	set data [read $fh 512]
        array set header [readHeader $data]
	HandleLongLink $fh header
        if {$header(name) eq ""} break
	if {$header(prefix) ne ""} {append header(prefix) /}
        set name [string trimleft $header(prefix)$header(name) /]
        if {$name eq $file} {
            set file [read $fh $header(size)]
            if {!$chan} {
		close $fh
	    }
            return $file
        }
        seekorskip $fh [expr {$header(size) + [pad $header(size)]}] current
    }
    if {!$chan} {
	close $fh
    }
    return -code error -errorcode {TAR MISSING FILE} \
	"Tar \"$tar\": File \"$file\" not found"
}

proc ::tar::untar {tar args} {
    set nooverwrite 0
    set data 0
    set nomtime 0
    set noperms 0







|
|

|











|
<







193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215

216
217
218
219
220
221
222
	set fh [::open $tar]
	fconfigure $fh -encoding binary -translation lf -eofchar {}
    }
    while {![eof $fh]} {
	set data [read $fh 512]
        array set header [readHeader $data]
	HandleLongLink $fh header
        if {$header(name) == ""} break
	if {$header(prefix) != ""} {append header(prefix) /}
        set name [string trimleft $header(prefix)$header(name) /]
        if {$name == $file} {
            set file [read $fh $header(size)]
            if {!$chan} {
		close $fh
	    }
            return $file
        }
        seekorskip $fh [expr {$header(size) + [pad $header(size)]}] current
    }
    if {!$chan} {
	close $fh
    }
    return {}

}

proc ::tar::untar {tar args} {
    set nooverwrite 0
    set data 0
    set nomtime 0
    set noperms 0
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
    set osize  [format %o $A(size)]
    set ogid   [format %o $A(gid)]
    set ouid   [format %o $A(uid)]
    set omtime [format %o $A(mtime)]
    
    set name [string trimleft $name /]
    if {[string length $name] > 255} {
        return -code error -errorcode {TAR BAD PATH LENGTH} \
	    "path name over 255 chars"
    } elseif {[string length $name] > 100} {
	set common [string range $name end-99 154]
	if {[set splitpoint [string first / $common]] == -1} {
	    return -code error -errorcode {TAR BAD PATH UNSPLITTABLE} \
		"path name cannot be split into prefix and name"
	}
	set prefix [string range $name 0 end-100][string range $common 0 $splitpoint-1]
	set name   [string range $common $splitpoint+1 end][string range $name 155 end]
    } else {
        set prefix ""
    }








<
|



<
|







375
376
377
378
379
380
381

382
383
384
385

386
387
388
389
390
391
392
393
    set osize  [format %o $A(size)]
    set ogid   [format %o $A(gid)]
    set ouid   [format %o $A(uid)]
    set omtime [format %o $A(mtime)]
    
    set name [string trimleft $name /]
    if {[string length $name] > 255} {

        return -code error "path name over 255 chars"
    } elseif {[string length $name] > 100} {
	set common [string range $name end-99 154]
	if {[set splitpoint [string first / $common]] == -1} {

	    return -code error "path name cannot be split into prefix and name"
	}
	set prefix [string range $name 0 end-100][string range $common 0 $splitpoint-1]
	set name   [string range $common $splitpoint+1 end][string range $name 155 end]
    } else {
        set prefix ""
    }

Changes to modules/tar/tar.test.

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
    seek $chan1 0
    lappend res [string trim [tar::get $chan1 $tmpdir/one/two/a -chan]]
} -cleanup {
    cleanup1
} -result {tartest/one/a tartest/one/two/a tartest/one/three/a hello2}


test tar-bug-2840180 {Ticket 2840180} -setup {
    setup2
} -body {
    tar::create $chan1 [list $tmpdir/[large-path]/a] -chan
    seek $chan1 0

    # What the package sees.
    lappend res {*}[tar::contents $chan1 -chan]
    close $chan1

    # What a regular tar package sees.
    lappend res [exec 2> $tmpfile.err tar tvf $tmpfile]
    join $res \n
} -cleanup {
    cleanup2
} -match glob -result [join [list \
				 tartest/[large-path]/a \
				 "* tartest/[large-path]/a" \
				] \n]

# -------------------------------------------------------------------------

test tar-tkt-9f4c0e3e95-1.0 {Ticket 9f4c0e3e95, A} -setup {
    set tarfile [setup-tkt-9f4c0e3e95]
} -body {
    string trim [tar::get $tarfile 02]
} -cleanup {
    cleanup-tkt-9f4c0e3e95
    unset tarfile
} -result {zero-two}

test tar-tkt-9f4c0e3e95-1.1 {Ticket 9f4c0e3e95, B, } -setup {
    set tarfile [setup-tkt-9f4c0e3e95]
} -body {
    tar::get $tarfile 0b10
} -cleanup {
    cleanup-tkt-9f4c0e3e95
    unset tarfile
} -returnCodes error -result {Tar "tartest/t.tar": File "0b10" not found}

# -------------------------------------------------------------------------
testsuiteCleanup







|




















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118




















119
    seek $chan1 0
    lappend res [string trim [tar::get $chan1 $tmpdir/one/two/a -chan]]
} -cleanup {
    cleanup1
} -result {tartest/one/a tartest/one/two/a tartest/one/three/a hello2}


test tar-bug-2840180 {} -setup {
    setup2
} -body {
    tar::create $chan1 [list $tmpdir/[large-path]/a] -chan
    seek $chan1 0

    # What the package sees.
    lappend res {*}[tar::contents $chan1 -chan]
    close $chan1

    # What a regular tar package sees.
    lappend res [exec 2> $tmpfile.err tar tvf $tmpfile]
    join $res \n
} -cleanup {
    cleanup2
} -match glob -result [join [list \
				 tartest/[large-path]/a \
				 "* tartest/[large-path]/a" \
				] \n]

# -------------------------------------------------------------------------




















testsuiteCleanup

Changes to modules/tar/tests/support.tcl.

120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
	    uid 15103
	    gid 19103
	    size 100
	    mtime 5706776103
	}
    }
}

proc setup-tkt-9f4c0e3e95 {} {
    variable tmpdir tartest

    tcltest::makeDirectory $tmpdir
    tcltest::makeFile {zero-two}   $tmpdir/02
    tcltest::makeFile {number two} $tmpdir/2

    set here [pwd]
    cd $tmpdir
    tar::create t.tar {2 02}
    cd $here

    return $tmpdir/t.tar
}

proc cleanup-tkt-9f4c0e3e95 {} {
    variable tmpdir
    tcltest::removeFile      $tmpdir/2
    tcltest::removeFile      $tmpdir/02
    tcltest::removeDirectory $tmpdir
    return
}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
120
121
122
123
124
125
126























	    uid 15103
	    gid 19103
	    size 100
	    mtime 5706776103
	}
    }
}























Changes to modules/tepam/tepam_doc_gen.man.

223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
   Generates the part of the command line or the synopsis that is specific to an argument. The generated string has to indicate if an argument is optional, named and if it is a flag.
   [para]
   The following parameters are provided to this procedure:
   [list_begin definitions]
   [def [arg "Name"]]
      Name of the argument
   [def [arg "IsOptional"]]
      If true (=[const 1]) the argument is optional which should be indicated by the generated string (for example by putting the argument into brackets {[lb][rb]} or into question marks '?'):
      [example_begin]gen(TXT,ArgumentString) mtype 1 0 string -> [emph {"[mtype]"}][example_end]
   [def [arg "IsNamed"]]
      If true (=[const 1]) an argument is a named argument (option). The generated string should in this case contain the argument/option name, followed by the argument itself:
      [example_begin]gen(TXT,ArgumentString) mtype 0 1 string -> [emph {"-mtype <mtype>"}][example_end]
      Named arguments can also be optional:
      [example_begin]gen(TXT,ArgumentString) mtype 1 1 string -> [emph {"[-mtype <mtype>]"}][example_end]
   [def [arg "Type"]]







|







223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
   Generates the part of the command line or the synopsis that is specific to an argument. The generated string has to indicate if an argument is optional, named and if it is a flag.
   [para]
   The following parameters are provided to this procedure:
   [list_begin definitions]
   [def [arg "Name"]]
      Name of the argument
   [def [arg "IsOptional"]]
      If true (=[const 1]) the argument is optional which should be indicated by the generated string (for example by putting the argument into brackets {[]} or into question marks '?'):
      [example_begin]gen(TXT,ArgumentString) mtype 1 0 string -> [emph {"[mtype]"}][example_end]
   [def [arg "IsNamed"]]
      If true (=[const 1]) an argument is a named argument (option). The generated string should in this case contain the argument/option name, followed by the argument itself:
      [example_begin]gen(TXT,ArgumentString) mtype 0 1 string -> [emph {"-mtype <mtype>"}][example_end]
      Named arguments can also be optional:
      [example_begin]gen(TXT,ArgumentString) mtype 1 1 string -> [emph {"[-mtype <mtype>]"}][example_end]
   [def [arg "Type"]]

Changes to modules/tepam/tepam_procedure.man.

772
773
774
775
776
777
778
779
780
781
782
783
784
785
786

The name of the first unnamed argument has therefore not to start with the '-' character. The unnamed argument is otherwise considered as name of another named argument. This is especially important if the first unnamed argument is given by a variable that can contain any character strings:

[example_begin]my_proc [cmd {-n1 N1 -n2 N2 "->" "<-"}]
[emph {-> my_proc: Argument '->' not known}]

set U1 "->"
my_proc [cmd {-n1 N1 -n2 N2 $U1 U2}]
my_proc: Argument '->' not known[example_end]

The '--' flag allows separating unambiguously the unnamed arguments from the named arguments. All data after the '--' flag will be considered as unnamed argument:

[example_begin]my_proc [cmd {-n1 N1 -n2 N2 -- "->" "<-"}]
[emph {-> n1:'N1', n2:'N2', u1:'->', u2:'<-'}]








|







772
773
774
775
776
777
778
779
780
781
782
783
784
785
786

The name of the first unnamed argument has therefore not to start with the '-' character. The unnamed argument is otherwise considered as name of another named argument. This is especially important if the first unnamed argument is given by a variable that can contain any character strings:

[example_begin]my_proc [cmd {-n1 N1 -n2 N2 "->" "<-"}]
[emph {-> my_proc: Argument '->' not known}]

set U1 "->"
my_proc -n1 N1 -n2 N2 $U1 U2}]
my_proc: Argument '->' not known[example_end]

The '--' flag allows separating unambiguously the unnamed arguments from the named arguments. All data after the '--' flag will be considered as unnamed argument:

[example_begin]my_proc [cmd {-n1 N1 -n2 N2 -- "->" "<-"}]
[emph {-> n1:'N1', n2:'N2', u1:'->', u2:'<-'}]

Changes to modules/term/ansi_cattr.man.

75
76
77
78
79
80
81
82
83
[call [cmd ::term::ansi::code::attr::norevers]]    Reverse off.
[call [cmd ::term::ansi::code::attr::nohidden]]    Hidden off.
[call [cmd ::term::ansi::code::attr::nostrike]]    Strike-through off.
[call [cmd ::term::ansi::code::attr::reset]]       Reset all attributes to their default values.
[list_end]

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

75
76
77
78
79
80
81
82
83
[call [cmd ::term::ansi::code::attr::norevers]]    Reverse off.
[call [cmd ::term::ansi::code::attr::nohidden]]    Hidden off.
[call [cmd ::term::ansi::code::attr::nostrike]]    Strike-through off.
[call [cmd ::term::ansi::code::attr::reset]]       Reset all attributes to their default values.
[list_end]

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/ansi_cctrl.man.

191
192
193
194
195
196
197
198
199
[call [cmd ::term::ansi::code::ctrl::showat] [arg row] [arg col] [arg text]]

Format the block of text for display at the specified location.

[list_end]

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

191
192
193
194
195
196
197
198
199
[call [cmd ::term::ansi::code::ctrl::showat] [arg row] [arg col] [arg text]]

Format the block of text for display at the specified location.

[list_end]

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/ansi_cmacros.man.

58
59
60
61
62
63
64
65
66
the right margin, after normalizing internal tabs, and then put into a
frame made of box-graphics. The result is returned as the result of
the command.

[list_end]

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

58
59
60
61
62
63
64
65
66
the right margin, after normalizing internal tabs, and then put into a
frame made of box-graphics. The result is returned as the result of
the command.

[list_end]

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/ansi_code.man.

38
39
40
41
42
43
44
45
46

This command defines a procedure [arg name] which returns the control
sequence [arg code].

[list_end]

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

38
39
40
41
42
43
44
45
46

This command defines a procedure [arg name] which returns the control
sequence [arg code].

[list_end]

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/ansi_ctrlu.man.

71
72
73
74
75
76
77
78
79

This command queries the terminal connected to the standard input for
the number of rows (aka lines) available for display.

[list_end]

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

71
72
73
74
75
76
77
78
79

This command queries the terminal connected to the standard input for
the number of rows (aka lines) available for display.

[list_end]

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/ansi_send.man.

258
259
260
261
262
263
264
265
266
[call [cmd ::term::ansi::send::showat] [arg row] [arg col] [arg text]]

Show the block of text at the specified location.

[list_end]

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

258
259
260
261
262
263
264
265
266
[call [cmd ::term::ansi::send::showat] [arg row] [arg col] [arg text]]

Show the block of text at the specified location.

[list_end]

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/imenu.man.

147
148
149
150
151
152
153
154
155
[def Enter/Return]

The interaction with the object is terminated.

[list_end]

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

147
148
149
150
151
152
153
154
155
[def Enter/Return]

The interaction with the object is terminated.

[list_end]

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/ipager.man.

146
147
148
149
150
151
152
153
154
[def Enter/Return]

The interaction with the object is terminated.

[list_end]

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

146
147
148
149
150
151
152
153
154
[def Enter/Return]

The interaction with the object is terminated.

[list_end]

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/receive.man.

69
70
71
72
73
74
75
76
77
[para]

If not specified [arg chan] defaults to [const stdin].

[list_end]

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

69
70
71
72
73
74
75
76
77
[para]

If not specified [arg chan] defaults to [const stdin].

[list_end]

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/term.man.

12
13
14
15
16
17
18
19
20

It is planned to have this package provide highlevel general terminal control
commands, in the vein of ncurses or similar packages. Currently nothing has
been implemented however. I.e. this package is empty. It can be loaded, yet
provides nothing.

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

12
13
14
15
16
17
18
19
20

It is planned to have this package provide highlevel general terminal control
commands, in the vein of ncurses or similar packages. Currently nothing has
been implemented however. I.e. this package is empty. It can be loaded, yet
provides nothing.

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/term_bind.man.

116
117
118
119
120
121
122
123
124

[para]

In other words, the set of recognized strings has to form a
[term {prefix code}].

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

116
117
118
119
120
121
122
123
124

[para]

In other words, the set of recognized strings has to form a
[term {prefix code}].

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/term/term_send.man.

28
29
30
31
32
33
34
35
36

This convenience command is like [cmd ::term::send::wrch], except that the
destination channel is fixed to [emph stdout].

[list_end]

[vset CATEGORY term]
[include ../common-text/feedback.inc]
[manpage_end]







|

28
29
30
31
32
33
34
35
36

This convenience command is like [cmd ::term::send::wrch], except that the
destination channel is fixed to [emph stdout].

[list_end]

[vset CATEGORY term]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/textutil/adjust.man.

125
126
127
128
129
130
131
132
133
134
135
136
137
138
139

[opt_def  -length [arg integer]]

Set the length of the [emph logical] line in the string to
[arg integer].  [arg integer] must be a positive integer
value. Defaults to [const 72].

[opt_def -strictlength [arg boolean]]

If set to [const false] (default), a line can exceed the specified
[option -length] if a single word is longer than [option -length]. If
set to [const true], words that are longer than [option -length] are
split so that no line exceeds the specified [option -length].

[list_end]







|







125
126
127
128
129
130
131
132
133
134
135
136
137
138
139

[opt_def  -length [arg integer]]

Set the length of the [emph logical] line in the string to
[arg integer].  [arg integer] must be a positive integer
value. Defaults to [const 72].

[opt_def -strictlength] [arg boolean]]

If set to [const false] (default), a line can exceed the specified
[option -length] if a single word is longer than [option -length]. If
set to [const true], words that are longer than [option -length] are
split so that no line exceeds the specified [option -length].

[list_end]
200
201
202
203
204
205
206
207
208

Together with [cmd ::textutil::adjust::adjust] it is possible to
create properly wrapped paragraphs with arbitrary indentations.

[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

200
201
202
203
204
205
206
207
208

Together with [cmd ::textutil::adjust::adjust] it is possible to
create properly wrapped paragraphs with arbitrary indentations.

[list_end]

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/textutil/adjust.test.

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

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

support {
    useLocal     repeat.tcl   textutil::repeat
    useLocal     string.tcl   textutil::string
}
testing {
    useLocal     adjust.tcl   textutil::adjust
}

# -------------------------------------------------------------------------

set string "        hello,        world        "

set text "Hello, world!        
    This is the end,    my    friend.

You're just    another   brick   in   the   wall.
   Michele, ma belle, sont des mots qui vont trés bien ensembles,
trés bien ensembles.

   Smoke on the water, and fire in the sky.		
   Oh Lord, don't let me be misunderstood.

Cause tramp like us, baby we were born to run."

set text2 "Hello, world!        
    This is the end,    my    friend.

You're just    another   brick   in   the   wall.
   Michele, ma belle, sont des mots qui vont trés bien ensembles,
trés bien ensembles.

ThisIsSimilarToTextOnlyThisStringHasOneReallyLongWordInIt

   Smoke on the water, and fire in the sky.		
   Oh Lord, don't let me be misunderstood.

Cause tramp like us, baby we were born to run."







|


















|
|










|
|







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

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    useLocal     repeat.tcl   textutil::repeat
    useLocal     string.tcl   textutil::string
}
testing {
    useLocal     adjust.tcl   textutil::adjust
}

# -------------------------------------------------------------------------

set string "        hello,        world        "

set text "Hello, world!        
    This is the end,    my    friend.

You're just    another   brick   in   the   wall.
   Michele, ma belle, sont des mots qui vont trés bien ensembles,
trés bien ensembles.

   Smoke on the water, and fire in the sky.		
   Oh Lord, don't let me be misunderstood.

Cause tramp like us, baby we were born to run."

set text2 "Hello, world!        
    This is the end,    my    friend.

You're just    another   brick   in   the   wall.
   Michele, ma belle, sont des mots qui vont trés bien ensembles,
trés bien ensembles.

ThisIsSimilarToTextOnlyThisStringHasOneReallyLongWordInIt

   Smoke on the water, and fire in the sky.		
   Oh Lord, don't let me be misunderstood.

Cause tramp like us, baby we were born to run."
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242

##############################

test adjust-1.1 {adjust multi lines on left} {
    ::textutil::adjust::adjust $text -full no
} \
"Hello, world! This is the end, my friend. You're just another brick in
the wall. Michele, ma belle, sont des mots qui vont trés bien ensembles,
trés bien ensembles. Smoke on the water, and fire in the sky. Oh Lord,
don't let me be misunderstood. Cause tramp like us, baby we were born to
run."

test adjust-1.2 {adjust multi lines on right} {
    ::textutil::adjust::adjust $text -justify right
} \
"  Hello, world! This is the end, my friend. You're just another brick in
the wall. Michele, ma belle, sont des mots qui vont trés bien ensembles,
  trés bien ensembles. Smoke on the water, and fire in the sky. Oh Lord,
don't let me be misunderstood. Cause tramp like us, baby we were born to
                                                                    run."

test adjust-1.3 {adjust multi lines on center} {
    ::textutil::adjust::adjust $text -justify center -full yes
} \
"Hello, world!             This is the end,    my    friend.  You're just
 another   brick   in   the   wall.    Michele, ma belle, sont des mots 
   qui vont trés bien ensembles, trés bien ensembles.     Smoke on the  
water, and fire in the sky.      Oh Lord, don't let me be misunderstood.
             Cause tramp like us, baby we were born to run.             "

test adjust-1.4 {adjust multi lines with plain justification} {
    ::textutil::adjust::adjust $text -justify plain -full yes
} \
"Hello, world!             This is the end,    my    friend.  You're just
another     brick   in   the   wall.    Michele, ma belle, sont des mots
qui vont trés bien ensembles, trés bien ensembles.          Smoke on the
water, and fire in the sky.      Oh Lord, don't let me be misunderstood.
Cause tramp like us, baby we were born to run.                          "

test adjust-1.5 {adjust multi lines with plain justification} {
    ::textutil::adjust::adjust $text -justify plain
} \
"Hello, world! This  is the end,  my friend. You're just another brick in
the wall. Michele, ma belle, sont des mots qui vont trés bien ensembles,
trés bien ensembles. Smoke  on the water, and fire  in the sky. Oh Lord,
don't let me be misunderstood. Cause tramp like us, baby we were born to
run."

##############################

test adjust-2.1 {adjust multi lines on left with specified length} {
    ::textutil::adjust::adjust $text -justify left -length 62
} \
"Hello, world! This is the end, my friend. You're just another
brick in the wall. Michele, ma belle, sont des mots qui vont
trés bien ensembles, trés bien ensembles. Smoke on the water,
and fire in the sky. Oh Lord, don't let me be misunderstood.
Cause tramp like us, baby we were born to run."

test adjust-2.2 {adjust multi lines on right with specified length} {
    ::textutil::adjust::adjust $text -justify right -length 62
} \
" Hello, world! This is the end, my friend. You're just another
  brick in the wall. Michele, ma belle, sont des mots qui vont
 trés bien ensembles, trés bien ensembles. Smoke on the water,
  and fire in the sky. Oh Lord, don't let me be misunderstood.
                Cause tramp like us, baby we were born to run."

test adjust-2.3 {adjust multi lines on center with specified length} {
    ::textutil::adjust::adjust $text -justify center -length 62 -full yes
} \
" Hello, world!             This is the end,    my    friend.  
 You're just    another   brick   in   the   wall.    Michele,
  ma belle, sont des mots qui vont trés bien ensembles, trés  
bien ensembles.     Smoke on the water, and fire in the sky.  
 Oh Lord, don't let me be misunderstood.  Cause tramp like us,
                   baby we were born to run.                  "

test adjust-2.4 {adjust multi lines with plain justification} {
    ::textutil::adjust::adjust $text -justify plain -length 62 -full yes
} \
"Hello, world!               This is the end,    my    friend. 
You're just     another   brick   in   the   wall.    Michele,
ma belle,  sont   des mots  qui vont trés bien ensembles, trés
bien ensembles.     Smoke on the water, and fire in the sky.  
Oh Lord, don't let me be misunderstood.   Cause tramp like us,
baby we were born to run.                                     "

test adjust-2.5 {adjust multi lines with plain justification} {
    ::textutil::adjust::adjust $text -justify plain -length 62
} \
"Hello, world! This  is the end, my friend. You're just another
brick  in the wall. Michele,  ma belle, sont des mots qui vont
trés bien ensembles, trés bien ensembles. Smoke  on the water,
and fire  in the sky.  Oh Lord, don't let me be misunderstood.
Cause tramp like us, baby we were born to run."

test adjust-2.6 {adjust multi lines with plain justification and long word} {
    ::textutil::adjust::adjust $text2 -justify plain -length 31 -strictlength 1
} \
"Hello, world! This  is the end,
my friend. You're  just another
brick  in the wall. Michele, ma
belle, sont  des mots  qui vont
trés  bien ensembles, trés bien
ensembles.
ThisIsSimilarToTextOnlyThisStri
ngHasOneReallyLongWordInIt
Smoke on the water, and fire in
the sky.  Oh Lord, don't let me
be misunderstood.  Cause  tramp
like us, baby  we were born  to
run."

test adjust-2.7 {adjust multi lines with plain justification and strictlength} {
    ::textutil::adjust::adjust $text2 -justify plain -length 31 -strictlength 1
} \
"Hello, world! This  is the end,
my friend. You're  just another
brick  in the wall. Michele, ma
belle, sont  des mots  qui vont
trés  bien ensembles, trés bien
ensembles.
ThisIsSimilarToTextOnlyThisStri
ngHasOneReallyLongWordInIt
Smoke on the water, and fire in
the sky.  Oh Lord, don't let me
be misunderstood.  Cause  tramp
like us, baby  we were born  to
run."

test adjust-2.8 {adjust multi lines with left justification and strictlength} {
    ::textutil::adjust::adjust $text2 -justify left -length 31 -strictlength 1
} \
"Hello, world! This is the end,
my friend. You're just another
brick in the wall. Michele, ma
belle, sont des mots qui vont
trés bien ensembles, trés bien
ensembles.
ThisIsSimilarToTextOnlyThisStri
ngHasOneReallyLongWordInIt
Smoke on the water, and fire in
the sky. Oh Lord, don't let me
be misunderstood. Cause tramp
like us, baby we were born to







|
|







|
|








|








|







|
|










|








|








|









|









|










|
















|
















|







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242

##############################

test adjust-1.1 {adjust multi lines on left} {
    ::textutil::adjust::adjust $text -full no
} \
"Hello, world! This is the end, my friend. You're just another brick in
the wall. Michele, ma belle, sont des mots qui vont trés bien ensembles,
trés bien ensembles. Smoke on the water, and fire in the sky. Oh Lord,
don't let me be misunderstood. Cause tramp like us, baby we were born to
run."

test adjust-1.2 {adjust multi lines on right} {
    ::textutil::adjust::adjust $text -justify right
} \
"  Hello, world! This is the end, my friend. You're just another brick in
the wall. Michele, ma belle, sont des mots qui vont trés bien ensembles,
  trés bien ensembles. Smoke on the water, and fire in the sky. Oh Lord,
don't let me be misunderstood. Cause tramp like us, baby we were born to
                                                                    run."

test adjust-1.3 {adjust multi lines on center} {
    ::textutil::adjust::adjust $text -justify center -full yes
} \
"Hello, world!             This is the end,    my    friend.  You're just
 another   brick   in   the   wall.    Michele, ma belle, sont des mots 
   qui vont trés bien ensembles, trés bien ensembles.     Smoke on the  
water, and fire in the sky.      Oh Lord, don't let me be misunderstood.
             Cause tramp like us, baby we were born to run.             "

test adjust-1.4 {adjust multi lines with plain justification} {
    ::textutil::adjust::adjust $text -justify plain -full yes
} \
"Hello, world!             This is the end,    my    friend.  You're just
another     brick   in   the   wall.    Michele, ma belle, sont des mots
qui vont trés bien ensembles, trés bien ensembles.          Smoke on the
water, and fire in the sky.      Oh Lord, don't let me be misunderstood.
Cause tramp like us, baby we were born to run.                          "

test adjust-1.5 {adjust multi lines with plain justification} {
    ::textutil::adjust::adjust $text -justify plain
} \
"Hello, world! This  is the end,  my friend. You're just another brick in
the wall. Michele, ma belle, sont des mots qui vont trés bien ensembles,
trés bien ensembles. Smoke  on the water, and fire  in the sky. Oh Lord,
don't let me be misunderstood. Cause tramp like us, baby we were born to
run."

##############################

test adjust-2.1 {adjust multi lines on left with specified length} {
    ::textutil::adjust::adjust $text -justify left -length 62
} \
"Hello, world! This is the end, my friend. You're just another
brick in the wall. Michele, ma belle, sont des mots qui vont
trés bien ensembles, trés bien ensembles. Smoke on the water,
and fire in the sky. Oh Lord, don't let me be misunderstood.
Cause tramp like us, baby we were born to run."

test adjust-2.2 {adjust multi lines on right with specified length} {
    ::textutil::adjust::adjust $text -justify right -length 62
} \
" Hello, world! This is the end, my friend. You're just another
  brick in the wall. Michele, ma belle, sont des mots qui vont
 trés bien ensembles, trés bien ensembles. Smoke on the water,
  and fire in the sky. Oh Lord, don't let me be misunderstood.
                Cause tramp like us, baby we were born to run."

test adjust-2.3 {adjust multi lines on center with specified length} {
    ::textutil::adjust::adjust $text -justify center -length 62 -full yes
} \
" Hello, world!             This is the end,    my    friend.  
 You're just    another   brick   in   the   wall.    Michele,
  ma belle, sont des mots qui vont trés bien ensembles, trés  
bien ensembles.     Smoke on the water, and fire in the sky.  
 Oh Lord, don't let me be misunderstood.  Cause tramp like us,
                   baby we were born to run.                  "

test adjust-2.4 {adjust multi lines with plain justification} {
    ::textutil::adjust::adjust $text -justify plain -length 62 -full yes
} \
"Hello, world!               This is the end,    my    friend. 
You're just     another   brick   in   the   wall.    Michele,
ma belle,  sont   des mots  qui vont trés bien ensembles, trés
bien ensembles.     Smoke on the water, and fire in the sky.  
Oh Lord, don't let me be misunderstood.   Cause tramp like us,
baby we were born to run.                                     "

test adjust-2.5 {adjust multi lines with plain justification} {
    ::textutil::adjust::adjust $text -justify plain -length 62
} \
"Hello, world! This  is the end, my friend. You're just another
brick  in the wall. Michele,  ma belle, sont des mots qui vont
trés bien ensembles, trés bien ensembles. Smoke  on the water,
and fire  in the sky.  Oh Lord, don't let me be misunderstood.
Cause tramp like us, baby we were born to run."

test adjust-2.6 {adjust multi lines with plain justification and long word} {
    ::textutil::adjust::adjust $text2 -justify plain -length 31 -strictlength 1
} \
"Hello, world! This  is the end,
my friend. You're  just another
brick  in the wall. Michele, ma
belle, sont  des mots  qui vont
trés  bien ensembles, trés bien
ensembles.
ThisIsSimilarToTextOnlyThisStri
ngHasOneReallyLongWordInIt
Smoke on the water, and fire in
the sky.  Oh Lord, don't let me
be misunderstood.  Cause  tramp
like us, baby  we were born  to
run."

test adjust-2.7 {adjust multi lines with plain justification and strictlength} {
    ::textutil::adjust::adjust $text2 -justify plain -length 31 -strictlength 1
} \
"Hello, world! This  is the end,
my friend. You're  just another
brick  in the wall. Michele, ma
belle, sont  des mots  qui vont
trés  bien ensembles, trés bien
ensembles.
ThisIsSimilarToTextOnlyThisStri
ngHasOneReallyLongWordInIt
Smoke on the water, and fire in
the sky.  Oh Lord, don't let me
be misunderstood.  Cause  tramp
like us, baby  we were born  to
run."

test adjust-2.8 {adjust multi lines with left justification and strictlength} {
    ::textutil::adjust::adjust $text2 -justify left -length 31 -strictlength 1
} \
"Hello, world! This is the end,
my friend. You're just another
brick in the wall. Michele, ma
belle, sont des mots qui vont
trés bien ensembles, trés bien
ensembles.
ThisIsSimilarToTextOnlyThisStri
ngHasOneReallyLongWordInIt
Smoke on the water, and fire in
the sky. Oh Lord, don't let me
be misunderstood. Cause tramp
like us, baby we were born to

Changes to modules/textutil/adjust_hyph.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# reside in the same directory as adjust_hyph.tcl               #
##################################################################

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

support {
    useLocal     string.tcl   textutil::string
    useLocal     repeat.tcl   textutil::repeat
}
testing {
    useLocal     adjust.tcl   textutil::adjust
}

# -------------------------------------------------------------------------

##########
# German #
##########

test adjust-tex-1.0 {German hyphenation} {
    #puts "\nTest german hyphenation ...\n";

    set str "Kurz berichtet: Theodor Holzkopf (Name frei erfunden) promovierte \
zum Doktor der Rechte über das Thema 'Die Böllerschüsse im Völkerrecht'"
    set wid 16

    # Setup hyphenation patterns, then perform adjustment
    textutil::adjust::readPatterns [file join $::tcltest::testsDirectory "dehypht.tex"]
    textutil::adjust::adjust $str -hyphenate 1 -length $wid
} {Kurz berichtet:
Theodor Holzkopf
(Name frei er-
funden) promo-
vierte zum Dok-
tor der Rechte
über das Thema
'Die Böller-
schüsse im Völ-
kerrecht'}

###########
# italian #
###########

test adjust-tex-1.1 {Italian hyphenation} {
    #puts "\nTest italian hyphenation ...\n"

    set str "Non sappiamo con precisione quando a Roma furono \
        institutite le prime scuole regolari, cioè 'statali'. \
        Plutarcho dice che nacquero verso il 250 avanti Cristo, \
        cioè circa cinquecent'anni dopo la fondazione della città. \
        (Indro Montanelli)"
    set wid 20;
    textutil::adjust::readPatterns [file join $::tcltest::testsDirectory "ithyph.tex"]
    textutil::adjust::adjust $str -hyphenate 1 -length $wid
} {Non sappiamo con
precisione quando a
Roma furono institu-
tite le prime scuole
regolari, cioè 'sta-
tali'. Plutarcho di-
ce che nacquero ver-
so il 250 avanti
Cristo, cioè circa
cinquecent'anni dopo
la fondazione della
città. (Indro Monta-
nelli)}

###########
# spanish #
###########

test adjust-tex-1.2 {Spanish hyphenation} {
    #puts "\nTest spanish hyphenation ...\n";

    set str "El panorama politico estará convulsionado porque los emeneristas, \
        además de no contar con el apoyo del NFR para gobernar en el periodo \
        2002-2007, se proponen junto con los ucesistas a aprobar los \
        cambios a la carta magna (Periodico La Razon, Bolivia)"
    set wid 20;
    textutil::adjust::readPatterns [file join $::tcltest::testsDirectory "eshyph_vo.tex"]
    textutil::adjust::adjust $str -hyphenate 1 -length $wid
} {El panorama politico
estará convulsionado
porque los
emeneristas, además
de no contar con el
apoyo del NFR para
gobernar en el peri-
odo 2002-2007, se
proponen junto con
los ucesistas a a-
probar los cambios a







|




















|











|
|
|










|

|








|



|


|









|
|






|

|







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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# reside in the same directory as adjust_hyph.tcl               #
##################################################################

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    useLocal     string.tcl   textutil::string
    useLocal     repeat.tcl   textutil::repeat
}
testing {
    useLocal     adjust.tcl   textutil::adjust
}

# -------------------------------------------------------------------------

##########
# German #
##########

test adjust-tex-1.0 {German hyphenation} {
    #puts "\nTest german hyphenation ...\n";

    set str "Kurz berichtet: Theodor Holzkopf (Name frei erfunden) promovierte \
zum Doktor der Rechte über das Thema 'Die Böllerschüsse im Völkerrecht'"
    set wid 16

    # Setup hyphenation patterns, then perform adjustment
    textutil::adjust::readPatterns [file join $::tcltest::testsDirectory "dehypht.tex"]
    textutil::adjust::adjust $str -hyphenate 1 -length $wid
} {Kurz berichtet:
Theodor Holzkopf
(Name frei er-
funden) promo-
vierte zum Dok-
tor der Rechte
über das Thema
'Die Böller-
schüsse im Völ-
kerrecht'}

###########
# italian #
###########

test adjust-tex-1.1 {Italian hyphenation} {
    #puts "\nTest italian hyphenation ...\n"

    set str "Non sappiamo con precisione quando a Roma furono \
        institutite le prime scuole regolari, cioè 'statali'. \
        Plutarcho dice che nacquero verso il 250 avanti Cristo, \
        cioè circa cinquecent'anni dopo la fondazione della città. \
        (Indro Montanelli)"
    set wid 20;
    textutil::adjust::readPatterns [file join $::tcltest::testsDirectory "ithyph.tex"]
    textutil::adjust::adjust $str -hyphenate 1 -length $wid
} {Non sappiamo con
precisione quando a
Roma furono institu-
tite le prime scuole
regolari, cioè 'sta-
tali'. Plutarcho di-
ce che nacquero ver-
so il 250 avanti
Cristo, cioè circa
cinquecent'anni dopo
la fondazione della
città. (Indro Monta-
nelli)}

###########
# spanish #
###########

test adjust-tex-1.2 {Spanish hyphenation} {
    #puts "\nTest spanish hyphenation ...\n";

    set str "El panorama politico estará convulsionado porque los emeneristas, \
        además de no contar con el apoyo del NFR para gobernar en el periodo \
        2002-2007, se proponen junto con los ucesistas a aprobar los \
        cambios a la carta magna (Periodico La Razon, Bolivia)"
    set wid 20;
    textutil::adjust::readPatterns [file join $::tcltest::testsDirectory "eshyph_vo.tex"]
    textutil::adjust::adjust $str -hyphenate 1 -length $wid
} {El panorama politico
estará convulsionado
porque los
emeneristas, además
de no contar con el
apoyo del NFR para
gobernar en el peri-
odo 2002-2007, se
proponen junto con
los ucesistas a a-
probar los cambios a

Deleted modules/textutil/build/EastAsianWidth.txt.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
# EastAsianWidth-11.0.0.txt
# Date: 2018-05-14, 09:41:59 GMT [KW, LI]
# © 2018 Unicode®, Inc.
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
# For terms of use, see http://www.unicode.org/terms_of_use.html
#
# Unicode Character Database
# For documentation, see http://www.unicode.org/reports/tr44/
#
# East_Asian_Width Property
#
# This file is an informative contributory data file in the
# Unicode Character Database.
#
# The format is two fields separated by a semicolon.
# Field 0: Unicode code point value or range of code point values
# Field 1: East_Asian_Width property, consisting of one of the following values:
#         "A", "F", "H", "N", "Na", "W"
#  - All code points, assigned or unassigned, that are not listed
#      explicitly are given the value "N".
#  - The unassigned code points in the following blocks default to "W":
#         CJK Unified Ideographs Extension A: U+3400..U+4DBF
#         CJK Unified Ideographs:             U+4E00..U+9FFF
#         CJK Compatibility Ideographs:       U+F900..U+FAFF
#  - All undesignated code points in Planes 2 and 3, whether inside or
#      outside of allocated blocks, default to "W":
#         Plane 2:                            U+20000..U+2FFFD
#         Plane 3:                            U+30000..U+3FFFD
#
# Character ranges are specified as for other property files in the
# Unicode Character Database.
#
# For legacy reasons, there are no spaces before or after the semicolon
# which separates the two fields. The comments following the number sign
# "#" list the General_Category property value or the L& alias of the
# derived value LC, the Unicode character name or names, and, in lines
# with ranges of code points, the code point count in square brackets.
#
# For more information, see UAX #11: East Asian Width,
# at http://www.unicode.org/reports/tr11/
#
# @missing: 0000..10FFFF; N
0000..001F;N     # Cc    [32] <control-0000>..<control-001F>
0020;Na          # Zs         SPACE
0021..0023;Na    # Po     [3] EXCLAMATION MARK..NUMBER SIGN
0024;Na          # Sc         DOLLAR SIGN
0025..0027;Na    # Po     [3] PERCENT SIGN..APOSTROPHE
0028;Na          # Ps         LEFT PARENTHESIS
0029;Na          # Pe         RIGHT PARENTHESIS
002A;Na          # Po         ASTERISK
002B;Na          # Sm         PLUS SIGN
002C;Na          # Po         COMMA
002D;Na          # Pd         HYPHEN-MINUS
002E..002F;Na    # Po     [2] FULL STOP..SOLIDUS
0030..0039;Na    # Nd    [10] DIGIT ZERO..DIGIT NINE
003A..003B;Na    # Po     [2] COLON..SEMICOLON
003C..003E;Na    # Sm     [3] LESS-THAN SIGN..GREATER-THAN SIGN
003F..0040;Na    # Po     [2] QUESTION MARK..COMMERCIAL AT
0041..005A;Na    # Lu    [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z
005B;Na          # Ps         LEFT SQUARE BRACKET
005C;Na          # Po         REVERSE SOLIDUS
005D;Na          # Pe         RIGHT SQUARE BRACKET
005E;Na          # Sk         CIRCUMFLEX ACCENT
005F;Na          # Pc         LOW LINE
0060;Na          # Sk         GRAVE ACCENT
0061..007A;Na    # Ll    [26] LATIN SMALL LETTER A..LATIN SMALL LETTER Z
007B;Na          # Ps         LEFT CURLY BRACKET
007C;Na          # Sm         VERTICAL LINE
007D;Na          # Pe         RIGHT CURLY BRACKET
007E;Na          # Sm         TILDE
007F;N           # Cc         <control-007F>
0080..009F;N     # Cc    [32] <control-0080>..<control-009F>
00A0;N           # Zs         NO-BREAK SPACE
00A1;A           # Po         INVERTED EXCLAMATION MARK
00A2..00A3;Na    # Sc     [2] CENT SIGN..POUND SIGN
00A4;A           # Sc         CURRENCY SIGN
00A5;Na          # Sc         YEN SIGN
00A6;Na          # So         BROKEN BAR
00A7;A           # Po         SECTION SIGN
00A8;A           # Sk         DIAERESIS
00A9;N           # So         COPYRIGHT SIGN
00AA;A           # Lo         FEMININE ORDINAL INDICATOR
00AB;N           # Pi         LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
00AC;Na          # Sm         NOT SIGN
00AD;A           # Cf         SOFT HYPHEN
00AE;A           # So         REGISTERED SIGN
00AF;Na          # Sk         MACRON
00B0;A           # So         DEGREE SIGN
00B1;A           # Sm         PLUS-MINUS SIGN
00B2..00B3;A     # No     [2] SUPERSCRIPT TWO..SUPERSCRIPT THREE
00B4;A           # Sk         ACUTE ACCENT
00B5;N           # Ll         MICRO SIGN
00B6..00B7;A     # Po     [2] PILCROW SIGN..MIDDLE DOT
00B8;A           # Sk         CEDILLA
00B9;A           # No         SUPERSCRIPT ONE
00BA;A           # Lo         MASCULINE ORDINAL INDICATOR
00BB;N           # Pf         RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
00BC..00BE;A     # No     [3] VULGAR FRACTION ONE QUARTER..VULGAR FRACTION THREE QUARTERS
00BF;A           # Po         INVERTED QUESTION MARK
00C0..00C5;N     # Lu     [6] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER A WITH RING ABOVE
00C6;A           # Lu         LATIN CAPITAL LETTER AE
00C7..00CF;N     # Lu     [9] LATIN CAPITAL LETTER C WITH CEDILLA..LATIN CAPITAL LETTER I WITH DIAERESIS
00D0;A           # Lu         LATIN CAPITAL LETTER ETH
00D1..00D6;N     # Lu     [6] LATIN CAPITAL LETTER N WITH TILDE..LATIN CAPITAL LETTER O WITH DIAERESIS
00D7;A           # Sm         MULTIPLICATION SIGN
00D8;A           # Lu         LATIN CAPITAL LETTER O WITH STROKE
00D9..00DD;N     # Lu     [5] LATIN CAPITAL LETTER U WITH GRAVE..LATIN CAPITAL LETTER Y WITH ACUTE
00DE..00E1;A     # L&     [4] LATIN CAPITAL LETTER THORN..LATIN SMALL LETTER A WITH ACUTE
00E2..00E5;N     # Ll     [4] LATIN SMALL LETTER A WITH CIRCUMFLEX..LATIN SMALL LETTER A WITH RING ABOVE
00E6;A           # Ll         LATIN SMALL LETTER AE
00E7;N           # Ll         LATIN SMALL LETTER C WITH CEDILLA
00E8..00EA;A     # Ll     [3] LATIN SMALL LETTER E WITH GRAVE..LATIN SMALL LETTER E WITH CIRCUMFLEX
00EB;N           # Ll         LATIN SMALL LETTER E WITH DIAERESIS
00EC..00ED;A     # Ll     [2] LATIN SMALL LETTER I WITH GRAVE..LATIN SMALL LETTER I WITH ACUTE
00EE..00EF;N     # Ll     [2] LATIN SMALL LETTER I WITH CIRCUMFLEX..LATIN SMALL LETTER I WITH DIAERESIS
00F0;A           # Ll         LATIN SMALL LETTER ETH
00F1;N           # Ll         LATIN SMALL LETTER N WITH TILDE
00F2..00F3;A     # Ll     [2] LATIN SMALL LETTER O WITH GRAVE..LATIN SMALL LETTER O WITH ACUTE
00F4..00F6;N     # Ll     [3] LATIN SMALL LETTER O WITH CIRCUMFLEX..LATIN SMALL LETTER O WITH DIAERESIS
00F7;A           # Sm         DIVISION SIGN
00F8..00FA;A     # Ll     [3] LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER U WITH ACUTE
00FB;N           # Ll         LATIN SMALL LETTER U WITH CIRCUMFLEX
00FC;A           # Ll         LATIN SMALL LETTER U WITH DIAERESIS
00FD;N           # Ll         LATIN SMALL LETTER Y WITH ACUTE
00FE;A           # Ll         LATIN SMALL LETTER THORN
00FF;N           # Ll         LATIN SMALL LETTER Y WITH DIAERESIS
0100;N           # Lu         LATIN CAPITAL LETTER A WITH MACRON
0101;A           # Ll         LATIN SMALL LETTER A WITH MACRON
0102..0110;N     # L&    [15] LATIN CAPITAL LETTER A WITH BREVE..LATIN CAPITAL LETTER D WITH STROKE
0111;A           # Ll         LATIN SMALL LETTER D WITH STROKE
0112;N           # Lu         LATIN CAPITAL LETTER E WITH MACRON
0113;A           # Ll         LATIN SMALL LETTER E WITH MACRON
0114..011A;N     # L&     [7] LATIN CAPITAL LETTER E WITH BREVE..LATIN CAPITAL LETTER E WITH CARON
011B;A           # Ll         LATIN SMALL LETTER E WITH CARON
011C..0125;N     # L&    [10] LATIN CAPITAL LETTER G WITH CIRCUMFLEX..LATIN SMALL LETTER H WITH CIRCUMFLEX
0126..0127;A     # L&     [2] LATIN CAPITAL LETTER H WITH STROKE..LATIN SMALL LETTER H WITH STROKE
0128..012A;N     # L&     [3] LATIN CAPITAL LETTER I WITH TILDE..LATIN CAPITAL LETTER I WITH MACRON
012B;A           # Ll         LATIN SMALL LETTER I WITH MACRON
012C..0130;N     # L&     [5] LATIN CAPITAL LETTER I WITH BREVE..LATIN CAPITAL LETTER I WITH DOT ABOVE
0131..0133;A     # L&     [3] LATIN SMALL LETTER DOTLESS I..LATIN SMALL LIGATURE IJ
0134..0137;N     # L&     [4] LATIN CAPITAL LETTER J WITH CIRCUMFLEX..LATIN SMALL LETTER K WITH CEDILLA
0138;A           # Ll         LATIN SMALL LETTER KRA
0139..013E;N     # L&     [6] LATIN CAPITAL LETTER L WITH ACUTE..LATIN SMALL LETTER L WITH CARON
013F..0142;A     # L&     [4] LATIN CAPITAL LETTER L WITH MIDDLE DOT..LATIN SMALL LETTER L WITH STROKE
0143;N           # Lu         LATIN CAPITAL LETTER N WITH ACUTE
0144;A           # Ll         LATIN SMALL LETTER N WITH ACUTE
0145..0147;N     # L&     [3] LATIN CAPITAL LETTER N WITH CEDILLA..LATIN CAPITAL LETTER N WITH CARON
0148..014B;A     # L&     [4] LATIN SMALL LETTER N WITH CARON..LATIN SMALL LETTER ENG
014C;N           # Lu         LATIN CAPITAL LETTER O WITH MACRON
014D;A           # Ll         LATIN SMALL LETTER O WITH MACRON
014E..0151;N     # L&     [4] LATIN CAPITAL LETTER O WITH BREVE..LATIN SMALL LETTER O WITH DOUBLE ACUTE
0152..0153;A     # L&     [2] LATIN CAPITAL LIGATURE OE..LATIN SMALL LIGATURE OE
0154..0165;N     # L&    [18] LATIN CAPITAL LETTER R WITH ACUTE..LATIN SMALL LETTER T WITH CARON
0166..0167;A     # L&     [2] LATIN CAPITAL LETTER T WITH STROKE..LATIN SMALL LETTER T WITH STROKE
0168..016A;N     # L&     [3] LATIN CAPITAL LETTER U WITH TILDE..LATIN CAPITAL LETTER U WITH MACRON
016B;A           # Ll         LATIN SMALL LETTER U WITH MACRON
016C..017F;N     # L&    [20] LATIN CAPITAL LETTER U WITH BREVE..LATIN SMALL LETTER LONG S
0180..01BA;N     # L&    [59] LATIN SMALL LETTER B WITH STROKE..LATIN SMALL LETTER EZH WITH TAIL
01BB;N           # Lo         LATIN LETTER TWO WITH STROKE
01BC..01BF;N     # L&     [4] LATIN CAPITAL LETTER TONE FIVE..LATIN LETTER WYNN
01C0..01C3;N     # Lo     [4] LATIN LETTER DENTAL CLICK..LATIN LETTER RETROFLEX CLICK
01C4..01CD;N     # L&    [10] LATIN CAPITAL LETTER DZ WITH CARON..LATIN CAPITAL LETTER A WITH CARON
01CE;A           # Ll         LATIN SMALL LETTER A WITH CARON
01CF;N           # Lu         LATIN CAPITAL LETTER I WITH CARON
01D0;A           # Ll         LATIN SMALL LETTER I WITH CARON
01D1;N           # Lu         LATIN CAPITAL LETTER O WITH CARON
01D2;A           # Ll         LATIN SMALL LETTER O WITH CARON
01D3;N           # Lu         LATIN CAPITAL LETTER U WITH CARON
01D4;A           # Ll         LATIN SMALL LETTER U WITH CARON
01D5;N           # Lu         LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON
01D6;A           # Ll         LATIN SMALL LETTER U WITH DIAERESIS AND MACRON
01D7;N           # Lu         LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE
01D8;A           # Ll         LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE
01D9;N           # Lu         LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON
01DA;A           # Ll         LATIN SMALL LETTER U WITH DIAERESIS AND CARON
01DB;N           # Lu         LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE
01DC;A           # Ll         LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE
01DD..024F;N     # L&   [115] LATIN SMALL LETTER TURNED E..LATIN SMALL LETTER Y WITH STROKE
0250;N           # Ll         LATIN SMALL LETTER TURNED A
0251;A           # Ll         LATIN SMALL LETTER ALPHA
0252..0260;N     # Ll    [15] LATIN SMALL LETTER TURNED ALPHA..LATIN SMALL LETTER G WITH HOOK
0261;A           # Ll         LATIN SMALL LETTER SCRIPT G
0262..0293;N     # Ll    [50] LATIN LETTER SMALL CAPITAL G..LATIN SMALL LETTER EZH WITH CURL
0294;N           # Lo         LATIN LETTER GLOTTAL STOP
0295..02AF;N     # Ll    [27] LATIN LETTER PHARYNGEAL VOICED FRICATIVE..LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL
02B0..02C1;N     # Lm    [18] MODIFIER LETTER SMALL H..MODIFIER LETTER REVERSED GLOTTAL STOP
02C2..02C3;N     # Sk     [2] MODIFIER LETTER LEFT ARROWHEAD..MODIFIER LETTER RIGHT ARROWHEAD
02C4;A           # Sk         MODIFIER LETTER UP ARROWHEAD
02C5;N           # Sk         MODIFIER LETTER DOWN ARROWHEAD
02C6;N           # Lm         MODIFIER LETTER CIRCUMFLEX ACCENT
02C7;A           # Lm         CARON
02C8;N           # Lm         MODIFIER LETTER VERTICAL LINE
02C9..02CB;A     # Lm     [3] MODIFIER LETTER MACRON..MODIFIER LETTER GRAVE ACCENT
02CC;N           # Lm         MODIFIER LETTER LOW VERTICAL LINE
02CD;A           # Lm         MODIFIER LETTER LOW MACRON
02CE..02CF;N     # Lm     [2] MODIFIER LETTER LOW GRAVE ACCENT..MODIFIER LETTER LOW ACUTE ACCENT
02D0;A           # Lm         MODIFIER LETTER TRIANGULAR COLON
02D1;N           # Lm         MODIFIER LETTER HALF TRIANGULAR COLON
02D2..02D7;N     # Sk     [6] MODIFIER LETTER CENTRED RIGHT HALF RING..MODIFIER LETTER MINUS SIGN
02D8..02DB;A     # Sk     [4] BREVE..OGONEK
02DC;N           # Sk         SMALL TILDE
02DD;A           # Sk         DOUBLE ACUTE ACCENT
02DE;N           # Sk         MODIFIER LETTER RHOTIC HOOK
02DF;A           # Sk         MODIFIER LETTER CROSS ACCENT
02E0..02E4;N     # Lm     [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
02E5..02EB;N     # Sk     [7] MODIFIER LETTER EXTRA-HIGH TONE BAR..MODIFIER LETTER YANG DEPARTING TONE MARK
02EC;N           # Lm         MODIFIER LETTER VOICING
02ED;N           # Sk         MODIFIER LETTER UNASPIRATED
02EE;N           # Lm         MODIFIER LETTER DOUBLE APOSTROPHE
02EF..02FF;N     # Sk    [17] MODIFIER LETTER LOW DOWN ARROWHEAD..MODIFIER LETTER LOW LEFT ARROW
0300..036F;A     # Mn   [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X
0370..0373;N     # L&     [4] GREEK CAPITAL LETTER HETA..GREEK SMALL LETTER ARCHAIC SAMPI
0374;N           # Lm         GREEK NUMERAL SIGN
0375;N           # Sk         GREEK LOWER NUMERAL SIGN
0376..0377;N     # L&     [2] GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA..GREEK SMALL LETTER PAMPHYLIAN DIGAMMA
037A;N           # Lm         GREEK YPOGEGRAMMENI
037B..037D;N     # Ll     [3] GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL
037E;N           # Po         GREEK QUESTION MARK
037F;N           # Lu         GREEK CAPITAL LETTER YOT
0384..0385;N     # Sk     [2] GREEK TONOS..GREEK DIALYTIKA TONOS
0386;N           # Lu         GREEK CAPITAL LETTER ALPHA WITH TONOS
0387;N           # Po         GREEK ANO TELEIA
0388..038A;N     # Lu     [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS
038C;N           # Lu         GREEK CAPITAL LETTER OMICRON WITH TONOS
038E..0390;N     # L&     [3] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
0391..03A1;A     # Lu    [17] GREEK CAPITAL LETTER ALPHA..GREEK CAPITAL LETTER RHO
03A3..03A9;A     # Lu     [7] GREEK CAPITAL LETTER SIGMA..GREEK CAPITAL LETTER OMEGA
03AA..03B0;N     # L&     [7] GREEK CAPITAL LETTER IOTA WITH DIALYTIKA..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
03B1..03C1;A     # Ll    [17] GREEK SMALL LETTER ALPHA..GREEK SMALL LETTER RHO
03C2;N           # Ll         GREEK SMALL LETTER FINAL SIGMA
03C3..03C9;A     # Ll     [7] GREEK SMALL LETTER SIGMA..GREEK SMALL LETTER OMEGA
03CA..03F5;N     # L&    [44] GREEK SMALL LETTER IOTA WITH DIALYTIKA..GREEK LUNATE EPSILON SYMBOL
03F6;N           # Sm         GREEK REVERSED LUNATE EPSILON SYMBOL
03F7..03FF;N     # L&     [9] GREEK CAPITAL LETTER SHO..GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL
0400;N           # Lu         CYRILLIC CAPITAL LETTER IE WITH GRAVE
0401;A           # Lu         CYRILLIC CAPITAL LETTER IO
0402..040F;N     # Lu    [14] CYRILLIC CAPITAL LETTER DJE..CYRILLIC CAPITAL LETTER DZHE
0410..044F;A     # L&    [64] CYRILLIC CAPITAL LETTER A..CYRILLIC SMALL LETTER YA
0450;N           # Ll         CYRILLIC SMALL LETTER IE WITH GRAVE
0451;A           # Ll         CYRILLIC SMALL LETTER IO
0452..0481;N     # L&    [48] CYRILLIC SMALL LETTER DJE..CYRILLIC SMALL LETTER KOPPA
0482;N           # So         CYRILLIC THOUSANDS SIGN
0483..0487;N     # Mn     [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE
0488..0489;N     # Me     [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN
048A..04FF;N     # L&   [118] CYRILLIC CAPITAL LETTER SHORT I WITH TAIL..CYRILLIC SMALL LETTER HA WITH STROKE
0500..052F;N     # L&    [48] CYRILLIC CAPITAL LETTER KOMI DE..CYRILLIC SMALL LETTER EL WITH DESCENDER
0531..0556;N     # Lu    [38] ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITAL LETTER FEH
0559;N           # Lm         ARMENIAN MODIFIER LETTER LEFT HALF RING
055A..055F;N     # Po     [6] ARMENIAN APOSTROPHE..ARMENIAN ABBREVIATION MARK
0560..0588;N     # Ll    [41] ARMENIAN SMALL LETTER TURNED AYB..ARMENIAN SMALL LETTER YI WITH STROKE
0589;N           # Po         ARMENIAN FULL STOP
058A;N           # Pd         ARMENIAN HYPHEN
058D..058E;N     # So     [2] RIGHT-FACING ARMENIAN ETERNITY SIGN..LEFT-FACING ARMENIAN ETERNITY SIGN
058F;N           # Sc         ARMENIAN DRAM SIGN
0591..05BD;N     # Mn    [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG
05BE;N           # Pd         HEBREW PUNCTUATION MAQAF
05BF;N           # Mn         HEBREW POINT RAFE
05C0;N           # Po         HEBREW PUNCTUATION PASEQ
05C1..05C2;N     # Mn     [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT
05C3;N           # Po         HEBREW PUNCTUATION SOF PASUQ
05C4..05C5;N     # Mn     [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT
05C6;N           # Po         HEBREW PUNCTUATION NUN HAFUKHA
05C7;N           # Mn         HEBREW POINT QAMATS QATAN
05D0..05EA;N     # Lo    [27] HEBREW LETTER ALEF..HEBREW LETTER TAV
05EF..05F2;N     # Lo     [4] HEBREW YOD TRIANGLE..HEBREW LIGATURE YIDDISH DOUBLE YOD
05F3..05F4;N     # Po     [2] HEBREW PUNCTUATION GERESH..HEBREW PUNCTUATION GERSHAYIM
0600..0605;N     # Cf     [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE
0606..0608;N     # Sm     [3] ARABIC-INDIC CUBE ROOT..ARABIC RAY
0609..060A;N     # Po     [2] ARABIC-INDIC PER MILLE SIGN..ARABIC-INDIC PER TEN THOUSAND SIGN
060B;N           # Sc         AFGHANI SIGN
060C..060D;N     # Po     [2] ARABIC COMMA..ARABIC DATE SEPARATOR
060E..060F;N     # So     [2] ARABIC POETIC VERSE SIGN..ARABIC SIGN MISRA
0610..061A;N     # Mn    [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA
061B;N           # Po         ARABIC SEMICOLON
061C;N           # Cf         ARABIC LETTER MARK
061E..061F;N     # Po     [2] ARABIC TRIPLE DOT PUNCTUATION MARK..ARABIC QUESTION MARK
0620..063F;N     # Lo    [32] ARABIC LETTER KASHMIRI YEH..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE
0640;N           # Lm         ARABIC TATWEEL
0641..064A;N     # Lo    [10] ARABIC LETTER FEH..ARABIC LETTER YEH
064B..065F;N     # Mn    [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW
0660..0669;N     # Nd    [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE
066A..066D;N     # Po     [4] ARABIC PERCENT SIGN..ARABIC FIVE POINTED STAR
066E..066F;N     # Lo     [2] ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF
0670;N           # Mn         ARABIC LETTER SUPERSCRIPT ALEF
0671..06D3;N     # Lo    [99] ARABIC LETTER ALEF WASLA..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
06D4;N           # Po         ARABIC FULL STOP
06D5;N           # Lo         ARABIC LETTER AE
06D6..06DC;N     # Mn     [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN
06DD;N           # Cf         ARABIC END OF AYAH
06DE;N           # So         ARABIC START OF RUB EL HIZB
06DF..06E4;N     # Mn     [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA
06E5..06E6;N     # Lm     [2] ARABIC SMALL WAW..ARABIC SMALL YEH
06E7..06E8;N     # Mn     [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON
06E9;N           # So         ARABIC PLACE OF SAJDAH
06EA..06ED;N     # Mn     [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM
06EE..06EF;N     # Lo     [2] ARABIC LETTER DAL WITH INVERTED V..ARABIC LETTER REH WITH INVERTED V
06F0..06F9;N     # Nd    [10] EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED ARABIC-INDIC DIGIT NINE
06FA..06FC;N     # Lo     [3] ARABIC LETTER SHEEN WITH DOT BELOW..ARABIC LETTER GHAIN WITH DOT BELOW
06FD..06FE;N     # So     [2] ARABIC SIGN SINDHI AMPERSAND..ARABIC SIGN SINDHI POSTPOSITION MEN
06FF;N           # Lo         ARABIC LETTER HEH WITH INVERTED V
0700..070D;N     # Po    [14] SYRIAC END OF PARAGRAPH..SYRIAC HARKLEAN ASTERISCUS
070F;N           # Cf         SYRIAC ABBREVIATION MARK
0710;N           # Lo         SYRIAC LETTER ALAPH
0711;N           # Mn         SYRIAC LETTER SUPERSCRIPT ALAPH
0712..072F;N     # Lo    [30] SYRIAC LETTER BETH..SYRIAC LETTER PERSIAN DHALATH
0730..074A;N     # Mn    [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH
074D..074F;N     # Lo     [3] SYRIAC LETTER SOGDIAN ZHAIN..SYRIAC LETTER SOGDIAN FE
0750..077F;N     # Lo    [48] ARABIC LETTER BEH WITH THREE DOTS HORIZONTALLY BELOW..ARABIC LETTER KAF WITH TWO DOTS ABOVE
0780..07A5;N     # Lo    [38] THAANA LETTER HAA..THAANA LETTER WAAVU
07A6..07B0;N     # Mn    [11] THAANA ABAFILI..THAANA SUKUN
07B1;N           # Lo         THAANA LETTER NAA
07C0..07C9;N     # Nd    [10] NKO DIGIT ZERO..NKO DIGIT NINE
07CA..07EA;N     # Lo    [33] NKO LETTER A..NKO LETTER JONA RA
07EB..07F3;N     # Mn     [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE
07F4..07F5;N     # Lm     [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE
07F6;N           # So         NKO SYMBOL OO DENNEN
07F7..07F9;N     # Po     [3] NKO SYMBOL GBAKURUNEN..NKO EXCLAMATION MARK
07FA;N           # Lm         NKO LAJANYALAN
07FD;N           # Mn         NKO DANTAYALAN
07FE..07FF;N     # Sc     [2] NKO DOROME SIGN..NKO TAMAN SIGN
0800..0815;N     # Lo    [22] SAMARITAN LETTER ALAF..SAMARITAN LETTER TAAF
0816..0819;N     # Mn     [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH
081A;N           # Lm         SAMARITAN MODIFIER LETTER EPENTHETIC YUT
081B..0823;N     # Mn     [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A
0824;N           # Lm         SAMARITAN MODIFIER LETTER SHORT A
0825..0827;N     # Mn     [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U
0828;N           # Lm         SAMARITAN MODIFIER LETTER I
0829..082D;N     # Mn     [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA
0830..083E;N     # Po    [15] SAMARITAN PUNCTUATION NEQUDAA..SAMARITAN PUNCTUATION ANNAAU
0840..0858;N     # Lo    [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN
0859..085B;N     # Mn     [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK
085E;N           # Po         MANDAIC PUNCTUATION
0860..086A;N     # Lo    [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA
08A0..08B4;N     # Lo    [21] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER KAF WITH DOT BELOW
08B6..08BD;N     # Lo     [8] ARABIC LETTER BEH WITH SMALL MEEM ABOVE..ARABIC LETTER AFRICAN NOON
08D3..08E1;N     # Mn    [15] ARABIC SMALL LOW WAW..ARABIC SMALL HIGH SIGN SAFHA
08E2;N           # Cf         ARABIC DISPUTED END OF AYAH
08E3..08FF;N     # Mn    [29] ARABIC TURNED DAMMA BELOW..ARABIC MARK SIDEWAYS NOON GHUNNA
0900..0902;N     # Mn     [3] DEVANAGARI SIGN INVERTED CANDRABINDU..DEVANAGARI SIGN ANUSVARA
0903;N           # Mc         DEVANAGARI SIGN VISARGA
0904..0939;N     # Lo    [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA
093A;N           # Mn         DEVANAGARI VOWEL SIGN OE
093B;N           # Mc         DEVANAGARI VOWEL SIGN OOE
093C;N           # Mn         DEVANAGARI SIGN NUKTA
093D;N           # Lo         DEVANAGARI SIGN AVAGRAHA
093E..0940;N     # Mc     [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II
0941..0948;N     # Mn     [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI
0949..094C;N     # Mc     [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU
094D;N           # Mn         DEVANAGARI SIGN VIRAMA
094E..094F;N     # Mc     [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW
0950;N           # Lo         DEVANAGARI OM
0951..0957;N     # Mn     [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE
0958..0961;N     # Lo    [10] DEVANAGARI LETTER QA..DEVANAGARI LETTER VOCALIC LL
0962..0963;N     # Mn     [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL
0964..0965;N     # Po     [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA
0966..096F;N     # Nd    [10] DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE
0970;N           # Po         DEVANAGARI ABBREVIATION SIGN
0971;N           # Lm         DEVANAGARI SIGN HIGH SPACING DOT
0972..097F;N     # Lo    [14] DEVANAGARI LETTER CANDRA A..DEVANAGARI LETTER BBA
0980;N           # Lo         BENGALI ANJI
0981;N           # Mn         BENGALI SIGN CANDRABINDU
0982..0983;N     # Mc     [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA
0985..098C;N     # Lo     [8] BENGALI LETTER A..BENGALI LETTER VOCALIC L
098F..0990;N     # Lo     [2] BENGALI LETTER E..BENGALI LETTER AI
0993..09A8;N     # Lo    [22] BENGALI LETTER O..BENGALI LETTER NA
09AA..09B0;N     # Lo     [7] BENGALI LETTER PA..BENGALI LETTER RA
09B2;N           # Lo         BENGALI LETTER LA
09B6..09B9;N     # Lo     [4] BENGALI LETTER SHA..BENGALI LETTER HA
09BC;N           # Mn         BENGALI SIGN NUKTA
09BD;N           # Lo         BENGALI SIGN AVAGRAHA
09BE..09C0;N     # Mc     [3] BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN II
09C1..09C4;N     # Mn     [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR
09C7..09C8;N     # Mc     [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI
09CB..09CC;N     # Mc     [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU
09CD;N           # Mn         BENGALI SIGN VIRAMA
09CE;N           # Lo         BENGALI LETTER KHANDA TA
09D7;N           # Mc         BENGALI AU LENGTH MARK
09DC..09DD;N     # Lo     [2] BENGALI LETTER RRA..BENGALI LETTER RHA
09DF..09E1;N     # Lo     [3] BENGALI LETTER YYA..BENGALI LETTER VOCALIC LL
09E2..09E3;N     # Mn     [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL
09E6..09EF;N     # Nd    [10] BENGALI DIGIT ZERO..BENGALI DIGIT NINE
09F0..09F1;N     # Lo     [2] BENGALI LETTER RA WITH MIDDLE DIAGONAL..BENGALI LETTER RA WITH LOWER DIAGONAL
09F2..09F3;N     # Sc     [2] BENGALI RUPEE MARK..BENGALI RUPEE SIGN
09F4..09F9;N     # No     [6] BENGALI CURRENCY NUMERATOR ONE..BENGALI CURRENCY DENOMINATOR SIXTEEN
09FA;N           # So         BENGALI ISSHAR
09FB;N           # Sc         BENGALI GANDA MARK
09FC;N           # Lo         BENGALI LETTER VEDIC ANUSVARA
09FD;N           # Po         BENGALI ABBREVIATION SIGN
09FE;N           # Mn         BENGALI SANDHI MARK
0A01..0A02;N     # Mn     [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI
0A03;N           # Mc         GURMUKHI SIGN VISARGA
0A05..0A0A;N     # Lo     [6] GURMUKHI LETTER A..GURMUKHI LETTER UU
0A0F..0A10;N     # Lo     [2] GURMUKHI LETTER EE..GURMUKHI LETTER AI
0A13..0A28;N     # Lo    [22] GURMUKHI LETTER OO..GURMUKHI LETTER NA
0A2A..0A30;N     # Lo     [7] GURMUKHI LETTER PA..GURMUKHI LETTER RA
0A32..0A33;N     # Lo     [2] GURMUKHI LETTER LA..GURMUKHI LETTER LLA
0A35..0A36;N     # Lo     [2] GURMUKHI LETTER VA..GURMUKHI LETTER SHA
0A38..0A39;N     # Lo     [2] GURMUKHI LETTER SA..GURMUKHI LETTER HA
0A3C;N           # Mn         GURMUKHI SIGN NUKTA
0A3E..0A40;N     # Mc     [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II
0A41..0A42;N     # Mn     [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU
0A47..0A48;N     # Mn     [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI
0A4B..0A4D;N     # Mn     [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA
0A51;N           # Mn         GURMUKHI SIGN UDAAT
0A59..0A5C;N     # Lo     [4] GURMUKHI LETTER KHHA..GURMUKHI LETTER RRA
0A5E;N           # Lo         GURMUKHI LETTER FA
0A66..0A6F;N     # Nd    [10] GURMUKHI DIGIT ZERO..GURMUKHI DIGIT NINE
0A70..0A71;N     # Mn     [2] GURMUKHI TIPPI..GURMUKHI ADDAK
0A72..0A74;N     # Lo     [3] GURMUKHI IRI..GURMUKHI EK ONKAR
0A75;N           # Mn         GURMUKHI SIGN YAKASH
0A76;N           # Po         GURMUKHI ABBREVIATION SIGN
0A81..0A82;N     # Mn     [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA
0A83;N           # Mc         GUJARATI SIGN VISARGA
0A85..0A8D;N     # Lo     [9] GUJARATI LETTER A..GUJARATI VOWEL CANDRA E
0A8F..0A91;N     # Lo     [3] GUJARATI LETTER E..GUJARATI VOWEL CANDRA O
0A93..0AA8;N     # Lo    [22] GUJARATI LETTER O..GUJARATI LETTER NA
0AAA..0AB0;N     # Lo     [7] GUJARATI LETTER PA..GUJARATI LETTER RA
0AB2..0AB3;N     # Lo     [2] GUJARATI LETTER LA..GUJARATI LETTER LLA
0AB5..0AB9;N     # Lo     [5] GUJARATI LETTER VA..GUJARATI LETTER HA
0ABC;N           # Mn         GUJARATI SIGN NUKTA
0ABD;N           # Lo         GUJARATI SIGN AVAGRAHA
0ABE..0AC0;N     # Mc     [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II
0AC1..0AC5;N     # Mn     [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E
0AC7..0AC8;N     # Mn     [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI
0AC9;N           # Mc         GUJARATI VOWEL SIGN CANDRA O
0ACB..0ACC;N     # Mc     [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU
0ACD;N           # Mn         GUJARATI SIGN VIRAMA
0AD0;N           # Lo         GUJARATI OM
0AE0..0AE1;N     # Lo     [2] GUJARATI LETTER VOCALIC RR..GUJARATI LETTER VOCALIC LL
0AE2..0AE3;N     # Mn     [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL
0AE6..0AEF;N     # Nd    [10] GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE
0AF0;N           # Po         GUJARATI ABBREVIATION SIGN
0AF1;N           # Sc         GUJARATI RUPEE SIGN
0AF9;N           # Lo         GUJARATI LETTER ZHA
0AFA..0AFF;N     # Mn     [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE
0B01;N           # Mn         ORIYA SIGN CANDRABINDU
0B02..0B03;N     # Mc     [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA
0B05..0B0C;N     # Lo     [8] ORIYA LETTER A..ORIYA LETTER VOCALIC L
0B0F..0B10;N     # Lo     [2] ORIYA LETTER E..ORIYA LETTER AI
0B13..0B28;N     # Lo    [22] ORIYA LETTER O..ORIYA LETTER NA
0B2A..0B30;N     # Lo     [7] ORIYA LETTER PA..ORIYA LETTER RA
0B32..0B33;N     # Lo     [2] ORIYA LETTER LA..ORIYA LETTER LLA
0B35..0B39;N     # Lo     [5] ORIYA LETTER VA..ORIYA LETTER HA
0B3C;N           # Mn         ORIYA SIGN NUKTA
0B3D;N           # Lo         ORIYA SIGN AVAGRAHA
0B3E;N           # Mc         ORIYA VOWEL SIGN AA
0B3F;N           # Mn         ORIYA VOWEL SIGN I
0B40;N           # Mc         ORIYA VOWEL SIGN II
0B41..0B44;N     # Mn     [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR
0B47..0B48;N     # Mc     [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI
0B4B..0B4C;N     # Mc     [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU
0B4D;N           # Mn         ORIYA SIGN VIRAMA
0B56;N           # Mn         ORIYA AI LENGTH MARK
0B57;N           # Mc         ORIYA AU LENGTH MARK
0B5C..0B5D;N     # Lo     [2] ORIYA LETTER RRA..ORIYA LETTER RHA
0B5F..0B61;N     # Lo     [3] ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL
0B62..0B63;N     # Mn     [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL
0B66..0B6F;N     # Nd    [10] ORIYA DIGIT ZERO..ORIYA DIGIT NINE
0B70;N           # So         ORIYA ISSHAR
0B71;N           # Lo         ORIYA LETTER WA
0B72..0B77;N     # No     [6] ORIYA FRACTION ONE QUARTER..ORIYA FRACTION THREE SIXTEENTHS
0B82;N           # Mn         TAMIL SIGN ANUSVARA
0B83;N           # Lo         TAMIL SIGN VISARGA
0B85..0B8A;N     # Lo     [6] TAMIL LETTER A..TAMIL LETTER UU
0B8E..0B90;N     # Lo     [3] TAMIL LETTER E..TAMIL LETTER AI
0B92..0B95;N     # Lo     [4] TAMIL LETTER O..TAMIL LETTER KA
0B99..0B9A;N     # Lo     [2] TAMIL LETTER NGA..TAMIL LETTER CA
0B9C;N           # Lo         TAMIL LETTER JA
0B9E..0B9F;N     # Lo     [2] TAMIL LETTER NYA..TAMIL LETTER TTA
0BA3..0BA4;N     # Lo     [2] TAMIL LETTER NNA..TAMIL LETTER TA
0BA8..0BAA;N     # Lo     [3] TAMIL LETTER NA..TAMIL LETTER PA
0BAE..0BB9;N     # Lo    [12] TAMIL LETTER MA..TAMIL LETTER HA
0BBE..0BBF;N     # Mc     [2] TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN I
0BC0;N           # Mn         TAMIL VOWEL SIGN II
0BC1..0BC2;N     # Mc     [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU
0BC6..0BC8;N     # Mc     [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI
0BCA..0BCC;N     # Mc     [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU
0BCD;N           # Mn         TAMIL SIGN VIRAMA
0BD0;N           # Lo         TAMIL OM
0BD7;N           # Mc         TAMIL AU LENGTH MARK
0BE6..0BEF;N     # Nd    [10] TAMIL DIGIT ZERO..TAMIL DIGIT NINE
0BF0..0BF2;N     # No     [3] TAMIL NUMBER TEN..TAMIL NUMBER ONE THOUSAND
0BF3..0BF8;N     # So     [6] TAMIL DAY SIGN..TAMIL AS ABOVE SIGN
0BF9;N           # Sc         TAMIL RUPEE SIGN
0BFA;N           # So         TAMIL NUMBER SIGN
0C00;N           # Mn         TELUGU SIGN COMBINING CANDRABINDU ABOVE
0C01..0C03;N     # Mc     [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA
0C04;N           # Mn         TELUGU SIGN COMBINING ANUSVARA ABOVE
0C05..0C0C;N     # Lo     [8] TELUGU LETTER A..TELUGU LETTER VOCALIC L
0C0E..0C10;N     # Lo     [3] TELUGU LETTER E..TELUGU LETTER AI
0C12..0C28;N     # Lo    [23] TELUGU LETTER O..TELUGU LETTER NA
0C2A..0C39;N     # Lo    [16] TELUGU LETTER PA..TELUGU LETTER HA
0C3D;N           # Lo         TELUGU SIGN AVAGRAHA
0C3E..0C40;N     # Mn     [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II
0C41..0C44;N     # Mc     [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR
0C46..0C48;N     # Mn     [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI
0C4A..0C4D;N     # Mn     [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA
0C55..0C56;N     # Mn     [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK
0C58..0C5A;N     # Lo     [3] TELUGU LETTER TSA..TELUGU LETTER RRRA
0C60..0C61;N     # Lo     [2] TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL
0C62..0C63;N     # Mn     [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL
0C66..0C6F;N     # Nd    [10] TELUGU DIGIT ZERO..TELUGU DIGIT NINE
0C78..0C7E;N     # No     [7] TELUGU FRACTION DIGIT ZERO FOR ODD POWERS OF FOUR..TELUGU FRACTION DIGIT THREE FOR EVEN POWERS OF FOUR
0C7F;N           # So         TELUGU SIGN TUUMU
0C80;N           # Lo         KANNADA SIGN SPACING CANDRABINDU
0C81;N           # Mn         KANNADA SIGN CANDRABINDU
0C82..0C83;N     # Mc     [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA
0C84;N           # Po         KANNADA SIGN SIDDHAM
0C85..0C8C;N     # Lo     [8] KANNADA LETTER A..KANNADA LETTER VOCALIC L
0C8E..0C90;N     # Lo     [3] KANNADA LETTER E..KANNADA LETTER AI
0C92..0CA8;N     # Lo    [23] KANNADA LETTER O..KANNADA LETTER NA
0CAA..0CB3;N     # Lo    [10] KANNADA LETTER PA..KANNADA LETTER LLA
0CB5..0CB9;N     # Lo     [5] KANNADA LETTER VA..KANNADA LETTER HA
0CBC;N           # Mn         KANNADA SIGN NUKTA
0CBD;N           # Lo         KANNADA SIGN AVAGRAHA
0CBE;N           # Mc         KANNADA VOWEL SIGN AA
0CBF;N           # Mn         KANNADA VOWEL SIGN I
0CC0..0CC4;N     # Mc     [5] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN VOCALIC RR
0CC6;N           # Mn         KANNADA VOWEL SIGN E
0CC7..0CC8;N     # Mc     [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI
0CCA..0CCB;N     # Mc     [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO
0CCC..0CCD;N     # Mn     [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA
0CD5..0CD6;N     # Mc     [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
0CDE;N           # Lo         KANNADA LETTER FA
0CE0..0CE1;N     # Lo     [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL
0CE2..0CE3;N     # Mn     [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL
0CE6..0CEF;N     # Nd    [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE
0CF1..0CF2;N     # Lo     [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA
0D00..0D01;N     # Mn     [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU
0D02..0D03;N     # Mc     [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA
0D05..0D0C;N     # Lo     [8] MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC L
0D0E..0D10;N     # Lo     [3] MALAYALAM LETTER E..MALAYALAM LETTER AI
0D12..0D3A;N     # Lo    [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA
0D3B..0D3C;N     # Mn     [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA
0D3D;N           # Lo         MALAYALAM SIGN AVAGRAHA
0D3E..0D40;N     # Mc     [3] MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN II
0D41..0D44;N     # Mn     [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR
0D46..0D48;N     # Mc     [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI
0D4A..0D4C;N     # Mc     [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU
0D4D;N           # Mn         MALAYALAM SIGN VIRAMA
0D4E;N           # Lo         MALAYALAM LETTER DOT REPH
0D4F;N           # So         MALAYALAM SIGN PARA
0D54..0D56;N     # Lo     [3] MALAYALAM LETTER CHILLU M..MALAYALAM LETTER CHILLU LLL
0D57;N           # Mc         MALAYALAM AU LENGTH MARK
0D58..0D5E;N     # No     [7] MALAYALAM FRACTION ONE ONE-HUNDRED-AND-SIXTIETH..MALAYALAM FRACTION ONE FIFTH
0D5F..0D61;N     # Lo     [3] MALAYALAM LETTER ARCHAIC II..MALAYALAM LETTER VOCALIC LL
0D62..0D63;N     # Mn     [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL
0D66..0D6F;N     # Nd    [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE
0D70..0D78;N     # No     [9] MALAYALAM NUMBER TEN..MALAYALAM FRACTION THREE SIXTEENTHS
0D79;N           # So         MALAYALAM DATE MARK
0D7A..0D7F;N     # Lo     [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K
0D82..0D83;N     # Mc     [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA
0D85..0D96;N     # Lo    [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA
0D9A..0DB1;N     # Lo    [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA
0DB3..0DBB;N     # Lo     [9] SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA
0DBD;N           # Lo         SINHALA LETTER DANTAJA LAYANNA
0DC0..0DC6;N     # Lo     [7] SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA
0DCA;N           # Mn         SINHALA SIGN AL-LAKUNA
0DCF..0DD1;N     # Mc     [3] SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA
0DD2..0DD4;N     # Mn     [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA
0DD6;N           # Mn         SINHALA VOWEL SIGN DIGA PAA-PILLA
0DD8..0DDF;N     # Mc     [8] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA
0DE6..0DEF;N     # Nd    [10] SINHALA LITH DIGIT ZERO..SINHALA LITH DIGIT NINE
0DF2..0DF3;N     # Mc     [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA
0DF4;N           # Po         SINHALA PUNCTUATION KUNDDALIYA
0E01..0E30;N     # Lo    [48] THAI CHARACTER KO KAI..THAI CHARACTER SARA A
0E31;N           # Mn         THAI CHARACTER MAI HAN-AKAT
0E32..0E33;N     # Lo     [2] THAI CHARACTER SARA AA..THAI CHARACTER SARA AM
0E34..0E3A;N     # Mn     [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU
0E3F;N           # Sc         THAI CURRENCY SYMBOL BAHT
0E40..0E45;N     # Lo     [6] THAI CHARACTER SARA E..THAI CHARACTER LAKKHANGYAO
0E46;N           # Lm         THAI CHARACTER MAIYAMOK
0E47..0E4E;N     # Mn     [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN
0E4F;N           # Po         THAI CHARACTER FONGMAN
0E50..0E59;N     # Nd    [10] THAI DIGIT ZERO..THAI DIGIT NINE
0E5A..0E5B;N     # Po     [2] THAI CHARACTER ANGKHANKHU..THAI CHARACTER KHOMUT
0E81..0E82;N     # Lo     [2] LAO LETTER KO..LAO LETTER KHO SUNG
0E84;N           # Lo         LAO LETTER KHO TAM
0E87..0E88;N     # Lo     [2] LAO LETTER NGO..LAO LETTER CO
0E8A;N           # Lo         LAO LETTER SO TAM
0E8D;N           # Lo         LAO LETTER NYO
0E94..0E97;N     # Lo     [4] LAO LETTER DO..LAO LETTER THO TAM
0E99..0E9F;N     # Lo     [7] LAO LETTER NO..LAO LETTER FO SUNG
0EA1..0EA3;N     # Lo     [3] LAO LETTER MO..LAO LETTER LO LING
0EA5;N           # Lo         LAO LETTER LO LOOT
0EA7;N           # Lo         LAO LETTER WO
0EAA..0EAB;N     # Lo     [2] LAO LETTER SO SUNG..LAO LETTER HO SUNG
0EAD..0EB0;N     # Lo     [4] LAO LETTER O..LAO VOWEL SIGN A
0EB1;N           # Mn         LAO VOWEL SIGN MAI KAN
0EB2..0EB3;N     # Lo     [2] LAO VOWEL SIGN AA..LAO VOWEL SIGN AM
0EB4..0EB9;N     # Mn     [6] LAO VOWEL SIGN I..LAO VOWEL SIGN UU
0EBB..0EBC;N     # Mn     [2] LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN LO
0EBD;N           # Lo         LAO SEMIVOWEL SIGN NYO
0EC0..0EC4;N     # Lo     [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI
0EC6;N           # Lm         LAO KO LA
0EC8..0ECD;N     # Mn     [6] LAO TONE MAI EK..LAO NIGGAHITA
0ED0..0ED9;N     # Nd    [10] LAO DIGIT ZERO..LAO DIGIT NINE
0EDC..0EDF;N     # Lo     [4] LAO HO NO..LAO LETTER KHMU NYO
0F00;N           # Lo         TIBETAN SYLLABLE OM
0F01..0F03;N     # So     [3] TIBETAN MARK GTER YIG MGO TRUNCATED A..TIBETAN MARK GTER YIG MGO -UM GTER TSHEG MA
0F04..0F12;N     # Po    [15] TIBETAN MARK INITIAL YIG MGO MDUN MA..TIBETAN MARK RGYA GRAM SHAD
0F13;N           # So         TIBETAN MARK CARET -DZUD RTAGS ME LONG CAN
0F14;N           # Po         TIBETAN MARK GTER TSHEG
0F15..0F17;N     # So     [3] TIBETAN LOGOTYPE SIGN CHAD RTAGS..TIBETAN ASTROLOGICAL SIGN SGRA GCAN -CHAR RTAGS
0F18..0F19;N     # Mn     [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS
0F1A..0F1F;N     # So     [6] TIBETAN SIGN RDEL DKAR GCIG..TIBETAN SIGN RDEL DKAR RDEL NAG
0F20..0F29;N     # Nd    [10] TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE
0F2A..0F33;N     # No    [10] TIBETAN DIGIT HALF ONE..TIBETAN DIGIT HALF ZERO
0F34;N           # So         TIBETAN MARK BSDUS RTAGS
0F35;N           # Mn         TIBETAN MARK NGAS BZUNG NYI ZLA
0F36;N           # So         TIBETAN MARK CARET -DZUD RTAGS BZHI MIG CAN
0F37;N           # Mn         TIBETAN MARK NGAS BZUNG SGOR RTAGS
0F38;N           # So         TIBETAN MARK CHE MGO
0F39;N           # Mn         TIBETAN MARK TSA -PHRU
0F3A;N           # Ps         TIBETAN MARK GUG RTAGS GYON
0F3B;N           # Pe         TIBETAN MARK GUG RTAGS GYAS
0F3C;N           # Ps         TIBETAN MARK ANG KHANG GYON
0F3D;N           # Pe         TIBETAN MARK ANG KHANG GYAS
0F3E..0F3F;N     # Mc     [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES
0F40..0F47;N     # Lo     [8] TIBETAN LETTER KA..TIBETAN LETTER JA
0F49..0F6C;N     # Lo    [36] TIBETAN LETTER NYA..TIBETAN LETTER RRA
0F71..0F7E;N     # Mn    [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO
0F7F;N           # Mc         TIBETAN SIGN RNAM BCAD
0F80..0F84;N     # Mn     [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA
0F85;N           # Po         TIBETAN MARK PALUTA
0F86..0F87;N     # Mn     [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS
0F88..0F8C;N     # Lo     [5] TIBETAN SIGN LCE TSA CAN..TIBETAN SIGN INVERTED MCHU CAN
0F8D..0F97;N     # Mn    [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA
0F99..0FBC;N     # Mn    [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA
0FBE..0FC5;N     # So     [8] TIBETAN KU RU KHA..TIBETAN SYMBOL RDO RJE
0FC6;N           # Mn         TIBETAN SYMBOL PADMA GDAN
0FC7..0FCC;N     # So     [6] TIBETAN SYMBOL RDO RJE RGYA GRAM..TIBETAN SYMBOL NOR BU BZHI -KHYIL
0FCE..0FCF;N     # So     [2] TIBETAN SIGN RDEL NAG RDEL DKAR..TIBETAN SIGN RDEL NAG GSUM
0FD0..0FD4;N     # Po     [5] TIBETAN MARK BSKA- SHOG GI MGO RGYAN..TIBETAN MARK CLOSING BRDA RNYING YIG MGO SGAB MA
0FD5..0FD8;N     # So     [4] RIGHT-FACING SVASTI SIGN..LEFT-FACING SVASTI SIGN WITH DOTS
0FD9..0FDA;N     # Po     [2] TIBETAN MARK LEADING MCHAN RTAGS..TIBETAN MARK TRAILING MCHAN RTAGS
1000..102A;N     # Lo    [43] MYANMAR LETTER KA..MYANMAR LETTER AU
102B..102C;N     # Mc     [2] MYANMAR VOWEL SIGN TALL AA..MYANMAR VOWEL SIGN AA
102D..1030;N     # Mn     [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU
1031;N           # Mc         MYANMAR VOWEL SIGN E
1032..1037;N     # Mn     [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW
1038;N           # Mc         MYANMAR SIGN VISARGA
1039..103A;N     # Mn     [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT
103B..103C;N     # Mc     [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA
103D..103E;N     # Mn     [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA
103F;N           # Lo         MYANMAR LETTER GREAT SA
1040..1049;N     # Nd    [10] MYANMAR DIGIT ZERO..MYANMAR DIGIT NINE
104A..104F;N     # Po     [6] MYANMAR SIGN LITTLE SECTION..MYANMAR SYMBOL GENITIVE
1050..1055;N     # Lo     [6] MYANMAR LETTER SHA..MYANMAR LETTER VOCALIC LL
1056..1057;N     # Mc     [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR
1058..1059;N     # Mn     [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL
105A..105D;N     # Lo     [4] MYANMAR LETTER MON NGA..MYANMAR LETTER MON BBE
105E..1060;N     # Mn     [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA
1061;N           # Lo         MYANMAR LETTER SGAW KAREN SHA
1062..1064;N     # Mc     [3] MYANMAR VOWEL SIGN SGAW KAREN EU..MYANMAR TONE MARK SGAW KAREN KE PHO
1065..1066;N     # Lo     [2] MYANMAR LETTER WESTERN PWO KAREN THA..MYANMAR LETTER WESTERN PWO KAREN PWA
1067..106D;N     # Mc     [7] MYANMAR VOWEL SIGN WESTERN PWO KAREN EU..MYANMAR SIGN WESTERN PWO KAREN TONE-5
106E..1070;N     # Lo     [3] MYANMAR LETTER EASTERN PWO KAREN NNA..MYANMAR LETTER EASTERN PWO KAREN GHWA
1071..1074;N     # Mn     [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE
1075..1081;N     # Lo    [13] MYANMAR LETTER SHAN KA..MYANMAR LETTER SHAN HA
1082;N           # Mn         MYANMAR CONSONANT SIGN SHAN MEDIAL WA
1083..1084;N     # Mc     [2] MYANMAR VOWEL SIGN SHAN AA..MYANMAR VOWEL SIGN SHAN E
1085..1086;N     # Mn     [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y
1087..108C;N     # Mc     [6] MYANMAR SIGN SHAN TONE-2..MYANMAR SIGN SHAN COUNCIL TONE-3
108D;N           # Mn         MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE
108E;N           # Lo         MYANMAR LETTER RUMAI PALAUNG FA
108F;N           # Mc         MYANMAR SIGN RUMAI PALAUNG TONE-5
1090..1099;N     # Nd    [10] MYANMAR SHAN DIGIT ZERO..MYANMAR SHAN DIGIT NINE
109A..109C;N     # Mc     [3] MYANMAR SIGN KHAMTI TONE-1..MYANMAR VOWEL SIGN AITON A
109D;N           # Mn         MYANMAR VOWEL SIGN AITON AI
109E..109F;N     # So     [2] MYANMAR SYMBOL SHAN ONE..MYANMAR SYMBOL SHAN EXCLAMATION
10A0..10C5;N     # Lu    [38] GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE
10C7;N           # Lu         GEORGIAN CAPITAL LETTER YN
10CD;N           # Lu         GEORGIAN CAPITAL LETTER AEN
10D0..10FA;N     # Ll    [43] GEORGIAN LETTER AN..GEORGIAN LETTER AIN
10FB;N           # Po         GEORGIAN PARAGRAPH SEPARATOR
10FC;N           # Lm         MODIFIER LETTER GEORGIAN NAR
10FD..10FF;N     # Ll     [3] GEORGIAN LETTER AEN..GEORGIAN LETTER LABIAL SIGN
1100..115F;W     # Lo    [96] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG FILLER
1160..11FF;N     # Lo   [160] HANGUL JUNGSEONG FILLER..HANGUL JONGSEONG SSANGNIEUN
1200..1248;N     # Lo    [73] ETHIOPIC SYLLABLE HA..ETHIOPIC SYLLABLE QWA
124A..124D;N     # Lo     [4] ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE
1250..1256;N     # Lo     [7] ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO
1258;N           # Lo         ETHIOPIC SYLLABLE QHWA
125A..125D;N     # Lo     [4] ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QHWE
1260..1288;N     # Lo    [41] ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XWA
128A..128D;N     # Lo     [4] ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE
1290..12B0;N     # Lo    [33] ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KWA
12B2..12B5;N     # Lo     [4] ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE
12B8..12BE;N     # Lo     [7] ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO
12C0;N           # Lo         ETHIOPIC SYLLABLE KXWA
12C2..12C5;N     # Lo     [4] ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KXWE
12C8..12D6;N     # Lo    [15] ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE PHARYNGEAL O
12D8..1310;N     # Lo    [57] ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE GWA
1312..1315;N     # Lo     [4] ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE
1318..135A;N     # Lo    [67] ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE FYA
135D..135F;N     # Mn     [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK
1360..1368;N     # Po     [9] ETHIOPIC SECTION MARK..ETHIOPIC PARAGRAPH SEPARATOR
1369..137C;N     # No    [20] ETHIOPIC DIGIT ONE..ETHIOPIC NUMBER TEN THOUSAND
1380..138F;N     # Lo    [16] ETHIOPIC SYLLABLE SEBATBEIT MWA..ETHIOPIC SYLLABLE PWE
1390..1399;N     # So    [10] ETHIOPIC TONAL MARK YIZET..ETHIOPIC TONAL MARK KURT
13A0..13F5;N     # Lu    [86] CHEROKEE LETTER A..CHEROKEE LETTER MV
13F8..13FD;N     # Ll     [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV
1400;N           # Pd         CANADIAN SYLLABICS HYPHEN
1401..166C;N     # Lo   [620] CANADIAN SYLLABICS E..CANADIAN SYLLABICS CARRIER TTSA
166D..166E;N     # Po     [2] CANADIAN SYLLABICS CHI SIGN..CANADIAN SYLLABICS FULL STOP
166F..167F;N     # Lo    [17] CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS BLACKFOOT W
1680;N           # Zs         OGHAM SPACE MARK
1681..169A;N     # Lo    [26] OGHAM LETTER BEITH..OGHAM LETTER PEITH
169B;N           # Ps         OGHAM FEATHER MARK
169C;N           # Pe         OGHAM REVERSED FEATHER MARK
16A0..16EA;N     # Lo    [75] RUNIC LETTER FEHU FEOH FE F..RUNIC LETTER X
16EB..16ED;N     # Po     [3] RUNIC SINGLE PUNCTUATION..RUNIC CROSS PUNCTUATION
16EE..16F0;N     # Nl     [3] RUNIC ARLAUG SYMBOL..RUNIC BELGTHOR SYMBOL
16F1..16F8;N     # Lo     [8] RUNIC LETTER K..RUNIC LETTER FRANKS CASKET AESC
1700..170C;N     # Lo    [13] TAGALOG LETTER A..TAGALOG LETTER YA
170E..1711;N     # Lo     [4] TAGALOG LETTER LA..TAGALOG LETTER HA
1712..1714;N     # Mn     [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA
1720..1731;N     # Lo    [18] HANUNOO LETTER A..HANUNOO LETTER HA
1732..1734;N     # Mn     [3] HANUNOO VOWEL SIGN I..HANUNOO SIGN PAMUDPOD
1735..1736;N     # Po     [2] PHILIPPINE SINGLE PUNCTUATION..PHILIPPINE DOUBLE PUNCTUATION
1740..1751;N     # Lo    [18] BUHID LETTER A..BUHID LETTER HA
1752..1753;N     # Mn     [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U
1760..176C;N     # Lo    [13] TAGBANWA LETTER A..TAGBANWA LETTER YA
176E..1770;N     # Lo     [3] TAGBANWA LETTER LA..TAGBANWA LETTER SA
1772..1773;N     # Mn     [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U
1780..17B3;N     # Lo    [52] KHMER LETTER KA..KHMER INDEPENDENT VOWEL QAU
17B4..17B5;N     # Mn     [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA
17B6;N           # Mc         KHMER VOWEL SIGN AA
17B7..17BD;N     # Mn     [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA
17BE..17C5;N     # Mc     [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU
17C6;N           # Mn         KHMER SIGN NIKAHIT
17C7..17C8;N     # Mc     [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU
17C9..17D3;N     # Mn    [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT
17D4..17D6;N     # Po     [3] KHMER SIGN KHAN..KHMER SIGN CAMNUC PII KUUH
17D7;N           # Lm         KHMER SIGN LEK TOO
17D8..17DA;N     # Po     [3] KHMER SIGN BEYYAL..KHMER SIGN KOOMUUT
17DB;N           # Sc         KHMER CURRENCY SYMBOL RIEL
17DC;N           # Lo         KHMER SIGN AVAKRAHASANYA
17DD;N           # Mn         KHMER SIGN ATTHACAN
17E0..17E9;N     # Nd    [10] KHMER DIGIT ZERO..KHMER DIGIT NINE
17F0..17F9;N     # No    [10] KHMER SYMBOL LEK ATTAK SON..KHMER SYMBOL LEK ATTAK PRAM-BUON
1800..1805;N     # Po     [6] MONGOLIAN BIRGA..MONGOLIAN FOUR DOTS
1806;N           # Pd         MONGOLIAN TODO SOFT HYPHEN
1807..180A;N     # Po     [4] MONGOLIAN SIBE SYLLABLE BOUNDARY MARKER..MONGOLIAN NIRUGU
180B..180D;N     # Mn     [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE
180E;N           # Cf         MONGOLIAN VOWEL SEPARATOR
1810..1819;N     # Nd    [10] MONGOLIAN DIGIT ZERO..MONGOLIAN DIGIT NINE
1820..1842;N     # Lo    [35] MONGOLIAN LETTER A..MONGOLIAN LETTER CHI
1843;N           # Lm         MONGOLIAN LETTER TODO LONG VOWEL SIGN
1844..1878;N     # Lo    [53] MONGOLIAN LETTER TODO E..MONGOLIAN LETTER CHA WITH TWO DOTS
1880..1884;N     # Lo     [5] MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONGOLIAN LETTER ALI GALI INVERTED UBADAMA
1885..1886;N     # Mn     [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA
1887..18A8;N     # Lo    [34] MONGOLIAN LETTER ALI GALI A..MONGOLIAN LETTER MANCHU ALI GALI BHA
18A9;N           # Mn         MONGOLIAN LETTER ALI GALI DAGALGA
18AA;N           # Lo         MONGOLIAN LETTER MANCHU ALI GALI LHA
18B0..18F5;N     # Lo    [70] CANADIAN SYLLABICS OY..CANADIAN SYLLABICS CARRIER DENTAL S
1900..191E;N     # Lo    [31] LIMBU VOWEL-CARRIER LETTER..LIMBU LETTER TRA
1920..1922;N     # Mn     [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U
1923..1926;N     # Mc     [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU
1927..1928;N     # Mn     [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O
1929..192B;N     # Mc     [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA
1930..1931;N     # Mc     [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA
1932;N           # Mn         LIMBU SMALL LETTER ANUSVARA
1933..1938;N     # Mc     [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA
1939..193B;N     # Mn     [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I
1940;N           # So         LIMBU SIGN LOO
1944..1945;N     # Po     [2] LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK
1946..194F;N     # Nd    [10] LIMBU DIGIT ZERO..LIMBU DIGIT NINE
1950..196D;N     # Lo    [30] TAI LE LETTER KA..TAI LE LETTER AI
1970..1974;N     # Lo     [5] TAI LE LETTER TONE-2..TAI LE LETTER TONE-6
1980..19AB;N     # Lo    [44] NEW TAI LUE LETTER HIGH QA..NEW TAI LUE LETTER LOW SUA
19B0..19C9;N     # Lo    [26] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE TONE MARK-2
19D0..19D9;N     # Nd    [10] NEW TAI LUE DIGIT ZERO..NEW TAI LUE DIGIT NINE
19DA;N           # No         NEW TAI LUE THAM DIGIT ONE
19DE..19DF;N     # So     [2] NEW TAI LUE SIGN LAE..NEW TAI LUE SIGN LAEV
19E0..19FF;N     # So    [32] KHMER SYMBOL PATHAMASAT..KHMER SYMBOL DAP-PRAM ROC
1A00..1A16;N     # Lo    [23] BUGINESE LETTER KA..BUGINESE LETTER HA
1A17..1A18;N     # Mn     [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U
1A19..1A1A;N     # Mc     [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O
1A1B;N           # Mn         BUGINESE VOWEL SIGN AE
1A1E..1A1F;N     # Po     [2] BUGINESE PALLAWA..BUGINESE END OF SECTION
1A20..1A54;N     # Lo    [53] TAI THAM LETTER HIGH KA..TAI THAM LETTER GREAT SA
1A55;N           # Mc         TAI THAM CONSONANT SIGN MEDIAL RA
1A56;N           # Mn         TAI THAM CONSONANT SIGN MEDIAL LA
1A57;N           # Mc         TAI THAM CONSONANT SIGN LA TANG LAI
1A58..1A5E;N     # Mn     [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA
1A60;N           # Mn         TAI THAM SIGN SAKOT
1A61;N           # Mc         TAI THAM VOWEL SIGN A
1A62;N           # Mn         TAI THAM VOWEL SIGN MAI SAT
1A63..1A64;N     # Mc     [2] TAI THAM VOWEL SIGN AA..TAI THAM VOWEL SIGN TALL AA
1A65..1A6C;N     # Mn     [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW
1A6D..1A72;N     # Mc     [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI
1A73..1A7C;N     # Mn    [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN
1A7F;N           # Mn         TAI THAM COMBINING CRYPTOGRAMMIC DOT
1A80..1A89;N     # Nd    [10] TAI THAM HORA DIGIT ZERO..TAI THAM HORA DIGIT NINE
1A90..1A99;N     # Nd    [10] TAI THAM THAM DIGIT ZERO..TAI THAM THAM DIGIT NINE
1AA0..1AA6;N     # Po     [7] TAI THAM SIGN WIANG..TAI THAM SIGN REVERSED ROTATED RANA
1AA7;N           # Lm         TAI THAM SIGN MAI YAMOK
1AA8..1AAD;N     # Po     [6] TAI THAM SIGN KAAN..TAI THAM SIGN CAANG
1AB0..1ABD;N     # Mn    [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW
1ABE;N           # Me         COMBINING PARENTHESES OVERLAY
1B00..1B03;N     # Mn     [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG
1B04;N           # Mc         BALINESE SIGN BISAH
1B05..1B33;N     # Lo    [47] BALINESE LETTER AKARA..BALINESE LETTER HA
1B34;N           # Mn         BALINESE SIGN REREKAN
1B35;N           # Mc         BALINESE VOWEL SIGN TEDUNG
1B36..1B3A;N     # Mn     [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA
1B3B;N           # Mc         BALINESE VOWEL SIGN RA REPA TEDUNG
1B3C;N           # Mn         BALINESE VOWEL SIGN LA LENGA
1B3D..1B41;N     # Mc     [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG
1B42;N           # Mn         BALINESE VOWEL SIGN PEPET
1B43..1B44;N     # Mc     [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG
1B45..1B4B;N     # Lo     [7] BALINESE LETTER KAF SASAK..BALINESE LETTER ASYURA SASAK
1B50..1B59;N     # Nd    [10] BALINESE DIGIT ZERO..BALINESE DIGIT NINE
1B5A..1B60;N     # Po     [7] BALINESE PANTI..BALINESE PAMENENG
1B61..1B6A;N     # So    [10] BALINESE MUSICAL SYMBOL DONG..BALINESE MUSICAL SYMBOL DANG GEDE
1B6B..1B73;N     # Mn     [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG
1B74..1B7C;N     # So     [9] BALINESE MUSICAL SYMBOL RIGHT-HAND OPEN DUG..BALINESE MUSICAL SYMBOL LEFT-HAND OPEN PING
1B80..1B81;N     # Mn     [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR
1B82;N           # Mc         SUNDANESE SIGN PANGWISAD
1B83..1BA0;N     # Lo    [30] SUNDANESE LETTER A..SUNDANESE LETTER HA
1BA1;N           # Mc         SUNDANESE CONSONANT SIGN PAMINGKAL
1BA2..1BA5;N     # Mn     [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU
1BA6..1BA7;N     # Mc     [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG
1BA8..1BA9;N     # Mn     [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG
1BAA;N           # Mc         SUNDANESE SIGN PAMAAEH
1BAB..1BAD;N     # Mn     [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA
1BAE..1BAF;N     # Lo     [2] SUNDANESE LETTER KHA..SUNDANESE LETTER SYA
1BB0..1BB9;N     # Nd    [10] SUNDANESE DIGIT ZERO..SUNDANESE DIGIT NINE
1BBA..1BBF;N     # Lo     [6] SUNDANESE AVAGRAHA..SUNDANESE LETTER FINAL M
1BC0..1BE5;N     # Lo    [38] BATAK LETTER A..BATAK LETTER U
1BE6;N           # Mn         BATAK SIGN TOMPI
1BE7;N           # Mc         BATAK VOWEL SIGN E
1BE8..1BE9;N     # Mn     [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE
1BEA..1BEC;N     # Mc     [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O
1BED;N           # Mn         BATAK VOWEL SIGN KARO O
1BEE;N           # Mc         BATAK VOWEL SIGN U
1BEF..1BF1;N     # Mn     [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H
1BF2..1BF3;N     # Mc     [2] BATAK PANGOLAT..BATAK PANONGONAN
1BFC..1BFF;N     # Po     [4] BATAK SYMBOL BINDU NA METEK..BATAK SYMBOL BINDU PANGOLAT
1C00..1C23;N     # Lo    [36] LEPCHA LETTER KA..LEPCHA LETTER A
1C24..1C2B;N     # Mc     [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU
1C2C..1C33;N     # Mn     [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T
1C34..1C35;N     # Mc     [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG
1C36..1C37;N     # Mn     [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA
1C3B..1C3F;N     # Po     [5] LEPCHA PUNCTUATION TA-ROL..LEPCHA PUNCTUATION TSHOOK
1C40..1C49;N     # Nd    [10] LEPCHA DIGIT ZERO..LEPCHA DIGIT NINE
1C4D..1C4F;N     # Lo     [3] LEPCHA LETTER TTA..LEPCHA LETTER DDA
1C50..1C59;N     # Nd    [10] OL CHIKI DIGIT ZERO..OL CHIKI DIGIT NINE
1C5A..1C77;N     # Lo    [30] OL CHIKI LETTER LA..OL CHIKI LETTER OH
1C78..1C7D;N     # Lm     [6] OL CHIKI MU TTUDDAG..OL CHIKI AHAD
1C7E..1C7F;N     # Po     [2] OL CHIKI PUNCTUATION MUCAAD..OL CHIKI PUNCTUATION DOUBLE MUCAAD
1C80..1C88;N     # Ll     [9] CYRILLIC SMALL LETTER ROUNDED VE..CYRILLIC SMALL LETTER UNBLENDED UK
1C90..1CBA;N     # Lu    [43] GEORGIAN MTAVRULI CAPITAL LETTER AN..GEORGIAN MTAVRULI CAPITAL LETTER AIN
1CBD..1CBF;N     # Lu     [3] GEORGIAN MTAVRULI CAPITAL LETTER AEN..GEORGIAN MTAVRULI CAPITAL LETTER LABIAL SIGN
1CC0..1CC7;N     # Po     [8] SUNDANESE PUNCTUATION BINDU SURYA..SUNDANESE PUNCTUATION BINDU BA SATANGA
1CD0..1CD2;N     # Mn     [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA
1CD3;N           # Po         VEDIC SIGN NIHSHVASA
1CD4..1CE0;N     # Mn    [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA
1CE1;N           # Mc         VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA
1CE2..1CE8;N     # Mn     [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL
1CE9..1CEC;N     # Lo     [4] VEDIC SIGN ANUSVARA ANTARGOMUKHA..VEDIC SIGN ANUSVARA VAMAGOMUKHA WITH TAIL
1CED;N           # Mn         VEDIC SIGN TIRYAK
1CEE..1CF1;N     # Lo     [4] VEDIC SIGN HEXIFORM LONG ANUSVARA..VEDIC SIGN ANUSVARA UBHAYATO MUKHA
1CF2..1CF3;N     # Mc     [2] VEDIC SIGN ARDHAVISARGA..VEDIC SIGN ROTATED ARDHAVISARGA
1CF4;N           # Mn         VEDIC TONE CANDRA ABOVE
1CF5..1CF6;N     # Lo     [2] VEDIC SIGN JIHVAMULIYA..VEDIC SIGN UPADHMANIYA
1CF7;N           # Mc         VEDIC SIGN ATIKRAMA
1CF8..1CF9;N     # Mn     [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE
1D00..1D2B;N     # Ll    [44] LATIN LETTER SMALL CAPITAL A..CYRILLIC LETTER SMALL CAPITAL EL
1D2C..1D6A;N     # Lm    [63] MODIFIER LETTER CAPITAL A..GREEK SUBSCRIPT SMALL LETTER CHI
1D6B..1D77;N     # Ll    [13] LATIN SMALL LETTER UE..LATIN SMALL LETTER TURNED G
1D78;N           # Lm         MODIFIER LETTER CYRILLIC EN
1D79..1D7F;N     # Ll     [7] LATIN SMALL LETTER INSULAR G..LATIN SMALL LETTER UPSILON WITH STROKE
1D80..1D9A;N     # Ll    [27] LATIN SMALL LETTER B WITH PALATAL HOOK..LATIN SMALL LETTER EZH WITH RETROFLEX HOOK
1D9B..1DBF;N     # Lm    [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA
1DC0..1DF9;N     # Mn    [58] COMBINING DOTTED GRAVE ACCENT..COMBINING WIDE INVERTED BRIDGE BELOW
1DFB..1DFF;N     # Mn     [5] COMBINING DELETION MARK..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW
1E00..1EFF;N     # L&   [256] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER Y WITH LOOP
1F00..1F15;N     # L&    [22] GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA
1F18..1F1D;N     # Lu     [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA
1F20..1F45;N     # L&    [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA
1F48..1F4D;N     # Lu     [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA
1F50..1F57;N     # Ll     [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI
1F59;N           # Lu         GREEK CAPITAL LETTER UPSILON WITH DASIA
1F5B;N           # Lu         GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA
1F5D;N           # Lu         GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA
1F5F..1F7D;N     # L&    [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA
1F80..1FB4;N     # L&    [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
1FB6..1FBC;N     # L&     [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
1FBD;N           # Sk         GREEK KORONIS
1FBE;N           # Ll         GREEK PROSGEGRAMMENI
1FBF..1FC1;N     # Sk     [3] GREEK PSILI..GREEK DIALYTIKA AND PERISPOMENI
1FC2..1FC4;N     # Ll     [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
1FC6..1FCC;N     # L&     [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
1FCD..1FCF;N     # Sk     [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI
1FD0..1FD3;N     # Ll     [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
1FD6..1FDB;N     # L&     [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA
1FDD..1FDF;N     # Sk     [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI
1FE0..1FEC;N     # L&    [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA
1FED..1FEF;N     # Sk     [3] GREEK DIALYTIKA AND VARIA..GREEK VARIA
1FF2..1FF4;N     # Ll     [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
1FF6..1FFC;N     # L&     [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
1FFD..1FFE;N     # Sk     [2] GREEK OXIA..GREEK DASIA
2000..200A;N     # Zs    [11] EN QUAD..HAIR SPACE
200B..200F;N     # Cf     [5] ZERO WIDTH SPACE..RIGHT-TO-LEFT MARK
2010;A           # Pd         HYPHEN
2011..2012;N     # Pd     [2] NON-BREAKING HYPHEN..FIGURE DASH
2013..2015;A     # Pd     [3] EN DASH..HORIZONTAL BAR
2016;A           # Po         DOUBLE VERTICAL LINE
2017;N           # Po         DOUBLE LOW LINE
2018;A           # Pi         LEFT SINGLE QUOTATION MARK
2019;A           # Pf         RIGHT SINGLE QUOTATION MARK
201A;N           # Ps         SINGLE LOW-9 QUOTATION MARK
201B;N           # Pi         SINGLE HIGH-REVERSED-9 QUOTATION MARK
201C;A           # Pi         LEFT DOUBLE QUOTATION MARK
201D;A           # Pf         RIGHT DOUBLE QUOTATION MARK
201E;N           # Ps         DOUBLE LOW-9 QUOTATION MARK
201F;N           # Pi         DOUBLE HIGH-REVERSED-9 QUOTATION MARK
2020..2022;A     # Po     [3] DAGGER..BULLET
2023;N           # Po         TRIANGULAR BULLET
2024..2027;A     # Po     [4] ONE DOT LEADER..HYPHENATION POINT
2028;N           # Zl         LINE SEPARATOR
2029;N           # Zp         PARAGRAPH SEPARATOR
202A..202E;N     # Cf     [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE
202F;N           # Zs         NARROW NO-BREAK SPACE
2030;A           # Po         PER MILLE SIGN
2031;N           # Po         PER TEN THOUSAND SIGN
2032..2033;A     # Po     [2] PRIME..DOUBLE PRIME
2034;N           # Po         TRIPLE PRIME
2035;A           # Po         REVERSED PRIME
2036..2038;N     # Po     [3] REVERSED DOUBLE PRIME..CARET
2039;N           # Pi         SINGLE LEFT-POINTING ANGLE QUOTATION MARK
203A;N           # Pf         SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
203B;A           # Po         REFERENCE MARK
203C..203D;N     # Po     [2] DOUBLE EXCLAMATION MARK..INTERROBANG
203E;A           # Po         OVERLINE
203F..2040;N     # Pc     [2] UNDERTIE..CHARACTER TIE
2041..2043;N     # Po     [3] CARET INSERTION POINT..HYPHEN BULLET
2044;N           # Sm         FRACTION SLASH
2045;N           # Ps         LEFT SQUARE BRACKET WITH QUILL
2046;N           # Pe         RIGHT SQUARE BRACKET WITH QUILL
2047..2051;N     # Po    [11] DOUBLE QUESTION MARK..TWO ASTERISKS ALIGNED VERTICALLY
2052;N           # Sm         COMMERCIAL MINUS SIGN
2053;N           # Po         SWUNG DASH
2054;N           # Pc         INVERTED UNDERTIE
2055..205E;N     # Po    [10] FLOWER PUNCTUATION MARK..VERTICAL FOUR DOTS
205F;N           # Zs         MEDIUM MATHEMATICAL SPACE
2060..2064;N     # Cf     [5] WORD JOINER..INVISIBLE PLUS
2066..206F;N     # Cf    [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES
2070;N           # No         SUPERSCRIPT ZERO
2071;N           # Lm         SUPERSCRIPT LATIN SMALL LETTER I
2074;A           # No         SUPERSCRIPT FOUR
2075..2079;N     # No     [5] SUPERSCRIPT FIVE..SUPERSCRIPT NINE
207A..207C;N     # Sm     [3] SUPERSCRIPT PLUS SIGN..SUPERSCRIPT EQUALS SIGN
207D;N           # Ps         SUPERSCRIPT LEFT PARENTHESIS
207E;N           # Pe         SUPERSCRIPT RIGHT PARENTHESIS
207F;A           # Lm         SUPERSCRIPT LATIN SMALL LETTER N
2080;N           # No         SUBSCRIPT ZERO
2081..2084;A     # No     [4] SUBSCRIPT ONE..SUBSCRIPT FOUR
2085..2089;N     # No     [5] SUBSCRIPT FIVE..SUBSCRIPT NINE
208A..208C;N     # Sm     [3] SUBSCRIPT PLUS SIGN..SUBSCRIPT EQUALS SIGN
208D;N           # Ps         SUBSCRIPT LEFT PARENTHESIS
208E;N           # Pe         SUBSCRIPT RIGHT PARENTHESIS
2090..209C;N     # Lm    [13] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER T
20A0..20A8;N     # Sc     [9] EURO-CURRENCY SIGN..RUPEE SIGN
20A9;H           # Sc         WON SIGN
20AA..20AB;N     # Sc     [2] NEW SHEQEL SIGN..DONG SIGN
20AC;A           # Sc         EURO SIGN
20AD..20BF;N     # Sc    [19] KIP SIGN..BITCOIN SIGN
20D0..20DC;N     # Mn    [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE
20DD..20E0;N     # Me     [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH
20E1;N           # Mn         COMBINING LEFT RIGHT ARROW ABOVE
20E2..20E4;N     # Me     [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE
20E5..20F0;N     # Mn    [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE
2100..2101;N     # So     [2] ACCOUNT OF..ADDRESSED TO THE SUBJECT
2102;N           # Lu         DOUBLE-STRUCK CAPITAL C
2103;A           # So         DEGREE CELSIUS
2104;N           # So         CENTRE LINE SYMBOL
2105;A           # So         CARE OF
2106;N           # So         CADA UNA
2107;N           # Lu         EULER CONSTANT
2108;N           # So         SCRUPLE
2109;A           # So         DEGREE FAHRENHEIT
210A..2112;N     # L&     [9] SCRIPT SMALL G..SCRIPT CAPITAL L
2113;A           # Ll         SCRIPT SMALL L
2114;N           # So         L B BAR SYMBOL
2115;N           # Lu         DOUBLE-STRUCK CAPITAL N
2116;A           # So         NUMERO SIGN
2117;N           # So         SOUND RECORDING COPYRIGHT
2118;N           # Sm         SCRIPT CAPITAL P
2119..211D;N     # Lu     [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R
211E..2120;N     # So     [3] PRESCRIPTION TAKE..SERVICE MARK
2121..2122;A     # So     [2] TELEPHONE SIGN..TRADE MARK SIGN
2123;N           # So         VERSICLE
2124;N           # Lu         DOUBLE-STRUCK CAPITAL Z
2125;N           # So         OUNCE SIGN
2126;A           # Lu         OHM SIGN
2127;N           # So         INVERTED OHM SIGN
2128;N           # Lu         BLACK-LETTER CAPITAL Z
2129;N           # So         TURNED GREEK SMALL LETTER IOTA
212A;N           # Lu         KELVIN SIGN
212B;A           # Lu         ANGSTROM SIGN
212C..212D;N     # Lu     [2] SCRIPT CAPITAL B..BLACK-LETTER CAPITAL C
212E;N           # So         ESTIMATED SYMBOL
212F..2134;N     # L&     [6] SCRIPT SMALL E..SCRIPT SMALL O
2135..2138;N     # Lo     [4] ALEF SYMBOL..DALET SYMBOL
2139;N           # Ll         INFORMATION SOURCE
213A..213B;N     # So     [2] ROTATED CAPITAL Q..FACSIMILE SIGN
213C..213F;N     # L&     [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI
2140..2144;N     # Sm     [5] DOUBLE-STRUCK N-ARY SUMMATION..TURNED SANS-SERIF CAPITAL Y
2145..2149;N     # L&     [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J
214A;N           # So         PROPERTY LINE
214B;N           # Sm         TURNED AMPERSAND
214C..214D;N     # So     [2] PER SIGN..AKTIESELSKAB
214E;N           # Ll         TURNED SMALL F
214F;N           # So         SYMBOL FOR SAMARITAN SOURCE
2150..2152;N     # No     [3] VULGAR FRACTION ONE SEVENTH..VULGAR FRACTION ONE TENTH
2153..2154;A     # No     [2] VULGAR FRACTION ONE THIRD..VULGAR FRACTION TWO THIRDS
2155..215A;N     # No     [6] VULGAR FRACTION ONE FIFTH..VULGAR FRACTION FIVE SIXTHS
215B..215E;A     # No     [4] VULGAR FRACTION ONE EIGHTH..VULGAR FRACTION SEVEN EIGHTHS
215F;N           # No         FRACTION NUMERATOR ONE
2160..216B;A     # Nl    [12] ROMAN NUMERAL ONE..ROMAN NUMERAL TWELVE
216C..216F;N     # Nl     [4] ROMAN NUMERAL FIFTY..ROMAN NUMERAL ONE THOUSAND
2170..2179;A     # Nl    [10] SMALL ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL TEN
217A..2182;N     # Nl     [9] SMALL ROMAN NUMERAL ELEVEN..ROMAN NUMERAL TEN THOUSAND
2183..2184;N     # L&     [2] ROMAN NUMERAL REVERSED ONE HUNDRED..LATIN SMALL LETTER REVERSED C
2185..2188;N     # Nl     [4] ROMAN NUMERAL SIX LATE FORM..ROMAN NUMERAL ONE HUNDRED THOUSAND
2189;A           # No         VULGAR FRACTION ZERO THIRDS
218A..218B;N     # So     [2] TURNED DIGIT TWO..TURNED DIGIT THREE
2190..2194;A     # Sm     [5] LEFTWARDS ARROW..LEFT RIGHT ARROW
2195..2199;A     # So     [5] UP DOWN ARROW..SOUTH WEST ARROW
219A..219B;N     # Sm     [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE
219C..219F;N     # So     [4] LEFTWARDS WAVE ARROW..UPWARDS TWO HEADED ARROW
21A0;N           # Sm         RIGHTWARDS TWO HEADED ARROW
21A1..21A2;N     # So     [2] DOWNWARDS TWO HEADED ARROW..LEFTWARDS ARROW WITH TAIL
21A3;N           # Sm         RIGHTWARDS ARROW WITH TAIL
21A4..21A5;N     # So     [2] LEFTWARDS ARROW FROM BAR..UPWARDS ARROW FROM BAR
21A6;N           # Sm         RIGHTWARDS ARROW FROM BAR
21A7..21AD;N     # So     [7] DOWNWARDS ARROW FROM BAR..LEFT RIGHT WAVE ARROW
21AE;N           # Sm         LEFT RIGHT ARROW WITH STROKE
21AF..21B7;N     # So     [9] DOWNWARDS ZIGZAG ARROW..CLOCKWISE TOP SEMICIRCLE ARROW
21B8..21B9;A     # So     [2] NORTH WEST ARROW TO LONG BAR..LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR
21BA..21CD;N     # So    [20] ANTICLOCKWISE OPEN CIRCLE ARROW..LEFTWARDS DOUBLE ARROW WITH STROKE
21CE..21CF;N     # Sm     [2] LEFT RIGHT DOUBLE ARROW WITH STROKE..RIGHTWARDS DOUBLE ARROW WITH STROKE
21D0..21D1;N     # So     [2] LEFTWARDS DOUBLE ARROW..UPWARDS DOUBLE ARROW
21D2;A           # Sm         RIGHTWARDS DOUBLE ARROW
21D3;N           # So         DOWNWARDS DOUBLE ARROW
21D4;A           # Sm         LEFT RIGHT DOUBLE ARROW
21D5..21E6;N     # So    [18] UP DOWN DOUBLE ARROW..LEFTWARDS WHITE ARROW
21E7;A           # So         UPWARDS WHITE ARROW
21E8..21F3;N     # So    [12] RIGHTWARDS WHITE ARROW..UP DOWN WHITE ARROW
21F4..21FF;N     # Sm    [12] RIGHT ARROW WITH SMALL CIRCLE..LEFT RIGHT OPEN-HEADED ARROW
2200;A           # Sm         FOR ALL
2201;N           # Sm         COMPLEMENT
2202..2203;A     # Sm     [2] PARTIAL DIFFERENTIAL..THERE EXISTS
2204..2206;N     # Sm     [3] THERE DOES NOT EXIST..INCREMENT
2207..2208;A     # Sm     [2] NABLA..ELEMENT OF
2209..220A;N     # Sm     [2] NOT AN ELEMENT OF..SMALL ELEMENT OF
220B;A           # Sm         CONTAINS AS MEMBER
220C..220E;N     # Sm     [3] DOES NOT CONTAIN AS MEMBER..END OF PROOF
220F;A           # Sm         N-ARY PRODUCT
2210;N           # Sm         N-ARY COPRODUCT
2211;A           # Sm         N-ARY SUMMATION
2212..2214;N     # Sm     [3] MINUS SIGN..DOT PLUS
2215;A           # Sm         DIVISION SLASH
2216..2219;N     # Sm     [4] SET MINUS..BULLET OPERATOR
221A;A           # Sm         SQUARE ROOT
221B..221C;N     # Sm     [2] CUBE ROOT..FOURTH ROOT
221D..2220;A     # Sm     [4] PROPORTIONAL TO..ANGLE
2221..2222;N     # Sm     [2] MEASURED ANGLE..SPHERICAL ANGLE
2223;A           # Sm         DIVIDES
2224;N           # Sm         DOES NOT DIVIDE
2225;A           # Sm         PARALLEL TO
2226;N           # Sm         NOT PARALLEL TO
2227..222C;A     # Sm     [6] LOGICAL AND..DOUBLE INTEGRAL
222D;N           # Sm         TRIPLE INTEGRAL
222E;A           # Sm         CONTOUR INTEGRAL
222F..2233;N     # Sm     [5] SURFACE INTEGRAL..ANTICLOCKWISE CONTOUR INTEGRAL
2234..2237;A     # Sm     [4] THEREFORE..PROPORTION
2238..223B;N     # Sm     [4] DOT MINUS..HOMOTHETIC
223C..223D;A     # Sm     [2] TILDE OPERATOR..REVERSED TILDE
223E..2247;N     # Sm    [10] INVERTED LAZY S..NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO
2248;A           # Sm         ALMOST EQUAL TO
2249..224B;N     # Sm     [3] NOT ALMOST EQUAL TO..TRIPLE TILDE
224C;A           # Sm         ALL EQUAL TO
224D..2251;N     # Sm     [5] EQUIVALENT TO..GEOMETRICALLY EQUAL TO
2252;A           # Sm         APPROXIMATELY EQUAL TO OR THE IMAGE OF
2253..225F;N     # Sm    [13] IMAGE OF OR APPROXIMATELY EQUAL TO..QUESTIONED EQUAL TO
2260..2261;A     # Sm     [2] NOT EQUAL TO..IDENTICAL TO
2262..2263;N     # Sm     [2] NOT IDENTICAL TO..STRICTLY EQUIVALENT TO
2264..2267;A     # Sm     [4] LESS-THAN OR EQUAL TO..GREATER-THAN OVER EQUAL TO
2268..2269;N     # Sm     [2] LESS-THAN BUT NOT EQUAL TO..GREATER-THAN BUT NOT EQUAL TO
226A..226B;A     # Sm     [2] MUCH LESS-THAN..MUCH GREATER-THAN
226C..226D;N     # Sm     [2] BETWEEN..NOT EQUIVALENT TO
226E..226F;A     # Sm     [2] NOT LESS-THAN..NOT GREATER-THAN
2270..2281;N     # Sm    [18] NEITHER LESS-THAN NOR EQUAL TO..DOES NOT SUCCEED
2282..2283;A     # Sm     [2] SUBSET OF..SUPERSET OF
2284..2285;N     # Sm     [2] NOT A SUBSET OF..NOT A SUPERSET OF
2286..2287;A     # Sm     [2] SUBSET OF OR EQUAL TO..SUPERSET OF OR EQUAL TO
2288..2294;N     # Sm    [13] NEITHER A SUBSET OF NOR EQUAL TO..SQUARE CUP
2295;A           # Sm         CIRCLED PLUS
2296..2298;N     # Sm     [3] CIRCLED MINUS..CIRCLED DIVISION SLASH
2299;A           # Sm         CIRCLED DOT OPERATOR
229A..22A4;N     # Sm    [11] CIRCLED RING OPERATOR..DOWN TACK
22A5;A           # Sm         UP TACK
22A6..22BE;N     # Sm    [25] ASSERTION..RIGHT ANGLE WITH ARC
22BF;A           # Sm         RIGHT TRIANGLE
22C0..22FF;N     # Sm    [64] N-ARY LOGICAL AND..Z NOTATION BAG MEMBERSHIP
2300..2307;N     # So     [8] DIAMETER SIGN..WAVY LINE
2308;N           # Ps         LEFT CEILING
2309;N           # Pe         RIGHT CEILING
230A;N           # Ps         LEFT FLOOR
230B;N           # Pe         RIGHT FLOOR
230C..2311;N     # So     [6] BOTTOM RIGHT CROP..SQUARE LOZENGE
2312;A           # So         ARC
2313..2319;N     # So     [7] SEGMENT..TURNED NOT SIGN
231A..231B;W     # So     [2] WATCH..HOURGLASS
231C..231F;N     # So     [4] TOP LEFT CORNER..BOTTOM RIGHT CORNER
2320..2321;N     # Sm     [2] TOP HALF INTEGRAL..BOTTOM HALF INTEGRAL
2322..2328;N     # So     [7] FROWN..KEYBOARD
2329;W           # Ps         LEFT-POINTING ANGLE BRACKET
232A;W           # Pe         RIGHT-POINTING ANGLE BRACKET
232B..237B;N     # So    [81] ERASE TO THE LEFT..NOT CHECK MARK
237C;N           # Sm         RIGHT ANGLE WITH DOWNWARDS ZIGZAG ARROW
237D..239A;N     # So    [30] SHOULDERED OPEN BOX..CLEAR SCREEN SYMBOL
239B..23B3;N     # Sm    [25] LEFT PARENTHESIS UPPER HOOK..SUMMATION BOTTOM
23B4..23DB;N     # So    [40] TOP SQUARE BRACKET..FUSE
23DC..23E1;N     # Sm     [6] TOP PARENTHESIS..BOTTOM TORTOISE SHELL BRACKET
23E2..23E8;N     # So     [7] WHITE TRAPEZIUM..DECIMAL EXPONENT SYMBOL
23E9..23EC;W     # So     [4] BLACK RIGHT-POINTING DOUBLE TRIANGLE..BLACK DOWN-POINTING DOUBLE TRIANGLE
23ED..23EF;N     # So     [3] BLACK RIGHT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR..BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR
23F0;W           # So         ALARM CLOCK
23F1..23F2;N     # So     [2] STOPWATCH..TIMER CLOCK
23F3;W           # So         HOURGLASS WITH FLOWING SAND
23F4..23FF;N     # So    [12] BLACK MEDIUM LEFT-POINTING TRIANGLE..OBSERVER EYE SYMBOL
2400..2426;N     # So    [39] SYMBOL FOR NULL..SYMBOL FOR SUBSTITUTE FORM TWO
2440..244A;N     # So    [11] OCR HOOK..OCR DOUBLE BACKSLASH
2460..249B;A     # No    [60] CIRCLED DIGIT ONE..NUMBER TWENTY FULL STOP
249C..24E9;A     # So    [78] PARENTHESIZED LATIN SMALL LETTER A..CIRCLED LATIN SMALL LETTER Z
24EA;N           # No         CIRCLED DIGIT ZERO
24EB..24FF;A     # No    [21] NEGATIVE CIRCLED NUMBER ELEVEN..NEGATIVE CIRCLED DIGIT ZERO
2500..254B;A     # So    [76] BOX DRAWINGS LIGHT HORIZONTAL..BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
254C..254F;N     # So     [4] BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL..BOX DRAWINGS HEAVY DOUBLE DASH VERTICAL
2550..2573;A     # So    [36] BOX DRAWINGS DOUBLE HORIZONTAL..BOX DRAWINGS LIGHT DIAGONAL CROSS
2574..257F;N     # So    [12] BOX DRAWINGS LIGHT LEFT..BOX DRAWINGS HEAVY UP AND LIGHT DOWN
2580..258F;A     # So    [16] UPPER HALF BLOCK..LEFT ONE EIGHTH BLOCK
2590..2591;N     # So     [2] RIGHT HALF BLOCK..LIGHT SHADE
2592..2595;A     # So     [4] MEDIUM SHADE..RIGHT ONE EIGHTH BLOCK
2596..259F;N     # So    [10] QUADRANT LOWER LEFT..QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT
25A0..25A1;A     # So     [2] BLACK SQUARE..WHITE SQUARE
25A2;N           # So         WHITE SQUARE WITH ROUNDED CORNERS
25A3..25A9;A     # So     [7] WHITE SQUARE CONTAINING BLACK SMALL SQUARE..SQUARE WITH DIAGONAL CROSSHATCH FILL
25AA..25B1;N     # So     [8] BLACK SMALL SQUARE..WHITE PARALLELOGRAM
25B2..25B3;A     # So     [2] BLACK UP-POINTING TRIANGLE..WHITE UP-POINTING TRIANGLE
25B4..25B5;N     # So     [2] BLACK UP-POINTING SMALL TRIANGLE..WHITE UP-POINTING SMALL TRIANGLE
25B6;A           # So         BLACK RIGHT-POINTING TRIANGLE
25B7;A           # Sm         WHITE RIGHT-POINTING TRIANGLE
25B8..25BB;N     # So     [4] BLACK RIGHT-POINTING SMALL TRIANGLE..WHITE RIGHT-POINTING POINTER
25BC..25BD;A     # So     [2] BLACK DOWN-POINTING TRIANGLE..WHITE DOWN-POINTING TRIANGLE
25BE..25BF;N     # So     [2] BLACK DOWN-POINTING SMALL TRIANGLE..WHITE DOWN-POINTING SMALL TRIANGLE
25C0;A           # So         BLACK LEFT-POINTING TRIANGLE
25C1;A           # Sm         WHITE LEFT-POINTING TRIANGLE
25C2..25C5;N     # So     [4] BLACK LEFT-POINTING SMALL TRIANGLE..WHITE LEFT-POINTING POINTER
25C6..25C8;A     # So     [3] BLACK DIAMOND..WHITE DIAMOND CONTAINING BLACK SMALL DIAMOND
25C9..25CA;N     # So     [2] FISHEYE..LOZENGE
25CB;A           # So         WHITE CIRCLE
25CC..25CD;N     # So     [2] DOTTED CIRCLE..CIRCLE WITH VERTICAL FILL
25CE..25D1;A     # So     [4] BULLSEYE..CIRCLE WITH RIGHT HALF BLACK
25D2..25E1;N     # So    [16] CIRCLE WITH LOWER HALF BLACK..LOWER HALF CIRCLE
25E2..25E5;A     # So     [4] BLACK LOWER RIGHT TRIANGLE..BLACK UPPER RIGHT TRIANGLE
25E6..25EE;N     # So     [9] WHITE BULLET..UP-POINTING TRIANGLE WITH RIGHT HALF BLACK
25EF;A           # So         LARGE CIRCLE
25F0..25F7;N     # So     [8] WHITE SQUARE WITH UPPER LEFT QUADRANT..WHITE CIRCLE WITH UPPER RIGHT QUADRANT
25F8..25FC;N     # Sm     [5] UPPER LEFT TRIANGLE..BLACK MEDIUM SQUARE
25FD..25FE;W     # Sm     [2] WHITE MEDIUM SMALL SQUARE..BLACK MEDIUM SMALL SQUARE
25FF;N           # Sm         LOWER RIGHT TRIANGLE
2600..2604;N     # So     [5] BLACK SUN WITH RAYS..COMET
2605..2606;A     # So     [2] BLACK STAR..WHITE STAR
2607..2608;N     # So     [2] LIGHTNING..THUNDERSTORM
2609;A           # So         SUN
260A..260D;N     # So     [4] ASCENDING NODE..OPPOSITION
260E..260F;A     # So     [2] BLACK TELEPHONE..WHITE TELEPHONE
2610..2613;N     # So     [4] BALLOT BOX..SALTIRE
2614..2615;W     # So     [2] UMBRELLA WITH RAIN DROPS..HOT BEVERAGE
2616..261B;N     # So     [6] WHITE SHOGI PIECE..BLACK RIGHT POINTING INDEX
261C;A           # So         WHITE LEFT POINTING INDEX
261D;N           # So         WHITE UP POINTING INDEX
261E;A           # So         WHITE RIGHT POINTING INDEX
261F..263F;N     # So    [33] WHITE DOWN POINTING INDEX..MERCURY
2640;A           # So         FEMALE SIGN
2641;N           # So         EARTH
2642;A           # So         MALE SIGN
2643..2647;N     # So     [5] JUPITER..PLUTO
2648..2653;W     # So    [12] ARIES..PISCES
2654..265F;N     # So    [12] WHITE CHESS KING..BLACK CHESS PAWN
2660..2661;A     # So     [2] BLACK SPADE SUIT..WHITE HEART SUIT
2662;N           # So         WHITE DIAMOND SUIT
2663..2665;A     # So     [3] BLACK CLUB SUIT..BLACK HEART SUIT
2666;N           # So         BLACK DIAMOND SUIT
2667..266A;A     # So     [4] WHITE CLUB SUIT..EIGHTH NOTE
266B;N           # So         BEAMED EIGHTH NOTES
266C..266D;A     # So     [2] BEAMED SIXTEENTH NOTES..MUSIC FLAT SIGN
266E;N           # So         MUSIC NATURAL SIGN
266F;A           # Sm         MUSIC SHARP SIGN
2670..267E;N     # So    [15] WEST SYRIAC CROSS..PERMANENT PAPER SIGN
267F;W           # So         WHEELCHAIR SYMBOL
2680..2692;N     # So    [19] DIE FACE-1..HAMMER AND PICK
2693;W           # So         ANCHOR
2694..269D;N     # So    [10] CROSSED SWORDS..OUTLINED WHITE STAR
269E..269F;A     # So     [2] THREE LINES CONVERGING RIGHT..THREE LINES CONVERGING LEFT
26A0;N           # So         WARNING SIGN
26A1;W           # So         HIGH VOLTAGE SIGN
26A2..26A9;N     # So     [8] DOUBLED FEMALE SIGN..HORIZONTAL MALE WITH STROKE SIGN
26AA..26AB;W     # So     [2] MEDIUM WHITE CIRCLE..MEDIUM BLACK CIRCLE
26AC..26BC;N     # So    [17] MEDIUM SMALL WHITE CIRCLE..SESQUIQUADRATE
26BD..26BE;W     # So     [2] SOCCER BALL..BASEBALL
26BF;A           # So         SQUARED KEY
26C0..26C3;N     # So     [4] WHITE DRAUGHTS MAN..BLACK DRAUGHTS KING
26C4..26C5;W     # So     [2] SNOWMAN WITHOUT SNOW..SUN BEHIND CLOUD
26C6..26CD;A     # So     [8] RAIN..DISABLED CAR
26CE;W           # So         OPHIUCHUS
26CF..26D3;A     # So     [5] PICK..CHAINS
26D4;W           # So         NO ENTRY
26D5..26E1;A     # So    [13] ALTERNATE ONE-WAY LEFT WAY TRAFFIC..RESTRICTED LEFT ENTRY-2
26E2;N           # So         ASTRONOMICAL SYMBOL FOR URANUS
26E3;A           # So         HEAVY CIRCLE WITH STROKE AND TWO DOTS ABOVE
26E4..26E7;N     # So     [4] PENTAGRAM..INVERTED PENTAGRAM
26E8..26E9;A     # So     [2] BLACK CROSS ON SHIELD..SHINTO SHRINE
26EA;W           # So         CHURCH
26EB..26F1;A     # So     [7] CASTLE..UMBRELLA ON GROUND
26F2..26F3;W     # So     [2] FOUNTAIN..FLAG IN HOLE
26F4;A           # So         FERRY
26F5;W           # So         SAILBOAT
26F6..26F9;A     # So     [4] SQUARE FOUR CORNERS..PERSON WITH BALL
26FA;W           # So         TENT
26FB..26FC;A     # So     [2] JAPANESE BANK SYMBOL..HEADSTONE GRAVEYARD SYMBOL
26FD;W           # So         FUEL PUMP
26FE..26FF;A     # So     [2] CUP ON BLACK SQUARE..WHITE FLAG WITH HORIZONTAL MIDDLE BLACK STRIPE
2700..2704;N     # So     [5] BLACK SAFETY SCISSORS..WHITE SCISSORS
2705;W           # So         WHITE HEAVY CHECK MARK
2706..2709;N     # So     [4] TELEPHONE LOCATION SIGN..ENVELOPE
270A..270B;W     # So     [2] RAISED FIST..RAISED HAND
270C..2727;N     # So    [28] VICTORY HAND..WHITE FOUR POINTED STAR
2728;W           # So         SPARKLES
2729..273C;N     # So    [20] STRESS OUTLINED WHITE STAR..OPEN CENTRE TEARDROP-SPOKED ASTERISK
273D;A           # So         HEAVY TEARDROP-SPOKED ASTERISK
273E..274B;N     # So    [14] SIX PETALLED BLACK AND WHITE FLORETTE..HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK
274C;W           # So         CROSS MARK
274D;N           # So         SHADOWED WHITE CIRCLE
274E;W           # So         NEGATIVE SQUARED CROSS MARK
274F..2752;N     # So     [4] LOWER RIGHT DROP-SHADOWED WHITE SQUARE..UPPER RIGHT SHADOWED WHITE SQUARE
2753..2755;W     # So     [3] BLACK QUESTION MARK ORNAMENT..WHITE EXCLAMATION MARK ORNAMENT
2756;N           # So         BLACK DIAMOND MINUS WHITE X
2757;W           # So         HEAVY EXCLAMATION MARK SYMBOL
2758..2767;N     # So    [16] LIGHT VERTICAL BAR..ROTATED FLORAL HEART BULLET
2768;N           # Ps         MEDIUM LEFT PARENTHESIS ORNAMENT
2769;N           # Pe         MEDIUM RIGHT PARENTHESIS ORNAMENT
276A;N           # Ps         MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT
276B;N           # Pe         MEDIUM FLATTENED RIGHT PARENTHESIS ORNAMENT
276C;N           # Ps         MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT
276D;N           # Pe         MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT
276E;N           # Ps         HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT
276F;N           # Pe         HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT
2770;N           # Ps         HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT
2771;N           # Pe         HEAVY RIGHT-POINTING ANGLE BRACKET ORNAMENT
2772;N           # Ps         LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT
2773;N           # Pe         LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT
2774;N           # Ps         MEDIUM LEFT CURLY BRACKET ORNAMENT
2775;N           # Pe         MEDIUM RIGHT CURLY BRACKET ORNAMENT
2776..277F;A     # No    [10] DINGBAT NEGATIVE CIRCLED DIGIT ONE..DINGBAT NEGATIVE CIRCLED NUMBER TEN
2780..2793;N     # No    [20] DINGBAT CIRCLED SANS-SERIF DIGIT ONE..DINGBAT NEGATIVE CIRCLED SANS-SERIF NUMBER TEN
2794;N           # So         HEAVY WIDE-HEADED RIGHTWARDS ARROW
2795..2797;W     # So     [3] HEAVY PLUS SIGN..HEAVY DIVISION SIGN
2798..27AF;N     # So    [24] HEAVY SOUTH EAST ARROW..NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW
27B0;W           # So         CURLY LOOP
27B1..27BE;N     # So    [14] NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW..OPEN-OUTLINED RIGHTWARDS ARROW
27BF;W           # So         DOUBLE CURLY LOOP
27C0..27C4;N     # Sm     [5] THREE DIMENSIONAL ANGLE..OPEN SUPERSET
27C5;N           # Ps         LEFT S-SHAPED BAG DELIMITER
27C6;N           # Pe         RIGHT S-SHAPED BAG DELIMITER
27C7..27E5;N     # Sm    [31] OR WITH DOT INSIDE..WHITE SQUARE WITH RIGHTWARDS TICK
27E6;Na          # Ps         MATHEMATICAL LEFT WHITE SQUARE BRACKET
27E7;Na          # Pe         MATHEMATICAL RIGHT WHITE SQUARE BRACKET
27E8;Na          # Ps         MATHEMATICAL LEFT ANGLE BRACKET
27E9;Na          # Pe         MATHEMATICAL RIGHT ANGLE BRACKET
27EA;Na          # Ps         MATHEMATICAL LEFT DOUBLE ANGLE BRACKET
27EB;Na          # Pe         MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET
27EC;Na          # Ps         MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET
27ED;Na          # Pe         MATHEMATICAL RIGHT WHITE TORTOISE SHELL BRACKET
27EE;N           # Ps         MATHEMATICAL LEFT FLATTENED PARENTHESIS
27EF;N           # Pe         MATHEMATICAL RIGHT FLATTENED PARENTHESIS
27F0..27FF;N     # Sm    [16] UPWARDS QUADRUPLE ARROW..LONG RIGHTWARDS SQUIGGLE ARROW
2800..28FF;N     # So   [256] BRAILLE PATTERN BLANK..BRAILLE PATTERN DOTS-12345678
2900..297F;N     # Sm   [128] RIGHTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE..DOWN FISH TAIL
2980..2982;N     # Sm     [3] TRIPLE VERTICAL BAR DELIMITER..Z NOTATION TYPE COLON
2983;N           # Ps         LEFT WHITE CURLY BRACKET
2984;N           # Pe         RIGHT WHITE CURLY BRACKET
2985;Na          # Ps         LEFT WHITE PARENTHESIS
2986;Na          # Pe         RIGHT WHITE PARENTHESIS
2987;N           # Ps         Z NOTATION LEFT IMAGE BRACKET
2988;N           # Pe         Z NOTATION RIGHT IMAGE BRACKET
2989;N           # Ps         Z NOTATION LEFT BINDING BRACKET
298A;N           # Pe         Z NOTATION RIGHT BINDING BRACKET
298B;N           # Ps         LEFT SQUARE BRACKET WITH UNDERBAR
298C;N           # Pe         RIGHT SQUARE BRACKET WITH UNDERBAR
298D;N           # Ps         LEFT SQUARE BRACKET WITH TICK IN TOP CORNER
298E;N           # Pe         RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
298F;N           # Ps         LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER
2990;N           # Pe         RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER
2991;N           # Ps         LEFT ANGLE BRACKET WITH DOT
2992;N           # Pe         RIGHT ANGLE BRACKET WITH DOT
2993;N           # Ps         LEFT ARC LESS-THAN BRACKET
2994;N           # Pe         RIGHT ARC GREATER-THAN BRACKET
2995;N           # Ps         DOUBLE LEFT ARC GREATER-THAN BRACKET
2996;N           # Pe         DOUBLE RIGHT ARC LESS-THAN BRACKET
2997;N           # Ps         LEFT BLACK TORTOISE SHELL BRACKET
2998;N           # Pe         RIGHT BLACK TORTOISE SHELL BRACKET
2999..29D7;N     # Sm    [63] DOTTED FENCE..BLACK HOURGLASS
29D8;N           # Ps         LEFT WIGGLY FENCE
29D9;N           # Pe         RIGHT WIGGLY FENCE
29DA;N           # Ps         LEFT DOUBLE WIGGLY FENCE
29DB;N           # Pe         RIGHT DOUBLE WIGGLY FENCE
29DC..29FB;N     # Sm    [32] INCOMPLETE INFINITY..TRIPLE PLUS
29FC;N           # Ps         LEFT-POINTING CURVED ANGLE BRACKET
29FD;N           # Pe         RIGHT-POINTING CURVED ANGLE BRACKET
29FE..29FF;N     # Sm     [2] TINY..MINY
2A00..2AFF;N     # Sm   [256] N-ARY CIRCLED DOT OPERATOR..N-ARY WHITE VERTICAL BAR
2B00..2B1A;N     # So    [27] NORTH EAST WHITE ARROW..DOTTED SQUARE
2B1B..2B1C;W     # So     [2] BLACK LARGE SQUARE..WHITE LARGE SQUARE
2B1D..2B2F;N     # So    [19] BLACK VERY SMALL SQUARE..WHITE VERTICAL ELLIPSE
2B30..2B44;N     # Sm    [21] LEFT ARROW WITH SMALL CIRCLE..RIGHTWARDS ARROW THROUGH SUPERSET
2B45..2B46;N     # So     [2] LEFTWARDS QUADRUPLE ARROW..RIGHTWARDS QUADRUPLE ARROW
2B47..2B4C;N     # Sm     [6] REVERSE TILDE OPERATOR ABOVE RIGHTWARDS ARROW..RIGHTWARDS ARROW ABOVE REVERSE TILDE OPERATOR
2B4D..2B4F;N     # So     [3] DOWNWARDS TRIANGLE-HEADED ZIGZAG ARROW..SHORT BACKSLANTED SOUTH ARROW
2B50;W           # So         WHITE MEDIUM STAR
2B51..2B54;N     # So     [4] BLACK SMALL STAR..WHITE RIGHT-POINTING PENTAGON
2B55;W           # So         HEAVY LARGE CIRCLE
2B56..2B59;A     # So     [4] HEAVY OVAL WITH OVAL INSIDE..HEAVY CIRCLED SALTIRE
2B5A..2B73;N     # So    [26] SLANTED NORTH ARROW WITH HOOKED HEAD..DOWNWARDS TRIANGLE-HEADED ARROW TO BAR
2B76..2B95;N     # So    [32] NORTH WEST TRIANGLE-HEADED ARROW TO BAR..RIGHTWARDS BLACK ARROW
2B98..2BC8;N     # So    [49] THREE-D TOP-LIGHTED LEFTWARDS EQUILATERAL ARROWHEAD..BLACK MEDIUM RIGHT-POINTING TRIANGLE CENTRED
2BCA..2BFE;N     # So    [53] TOP HALF BLACK CIRCLE..REVERSED RIGHT ANGLE
2C00..2C2E;N     # Lu    [47] GLAGOLITIC CAPITAL LETTER AZU..GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE
2C30..2C5E;N     # Ll    [47] GLAGOLITIC SMALL LETTER AZU..GLAGOLITIC SMALL LETTER LATINATE MYSLITE
2C60..2C7B;N     # L&    [28] LATIN CAPITAL LETTER L WITH DOUBLE BAR..LATIN LETTER SMALL CAPITAL TURNED E
2C7C..2C7D;N     # Lm     [2] LATIN SUBSCRIPT SMALL LETTER J..MODIFIER LETTER CAPITAL V
2C7E..2C7F;N     # Lu     [2] LATIN CAPITAL LETTER S WITH SWASH TAIL..LATIN CAPITAL LETTER Z WITH SWASH TAIL
2C80..2CE4;N     # L&   [101] COPTIC CAPITAL LETTER ALFA..COPTIC SYMBOL KAI
2CE5..2CEA;N     # So     [6] COPTIC SYMBOL MI RO..COPTIC SYMBOL SHIMA SIMA
2CEB..2CEE;N     # L&     [4] COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI..COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA
2CEF..2CF1;N     # Mn     [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS
2CF2..2CF3;N     # L&     [2] COPTIC CAPITAL LETTER BOHAIRIC KHEI..COPTIC SMALL LETTER BOHAIRIC KHEI
2CF9..2CFC;N     # Po     [4] COPTIC OLD NUBIAN FULL STOP..COPTIC OLD NUBIAN VERSE DIVIDER
2CFD;N           # No         COPTIC FRACTION ONE HALF
2CFE..2CFF;N     # Po     [2] COPTIC FULL STOP..COPTIC MORPHOLOGICAL DIVIDER
2D00..2D25;N     # Ll    [38] GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LETTER HOE
2D27;N           # Ll         GEORGIAN SMALL LETTER YN
2D2D;N           # Ll         GEORGIAN SMALL LETTER AEN
2D30..2D67;N     # Lo    [56] TIFINAGH LETTER YA..TIFINAGH LETTER YO
2D6F;N           # Lm         TIFINAGH MODIFIER LETTER LABIALIZATION MARK
2D70;N           # Po         TIFINAGH SEPARATOR MARK
2D7F;N           # Mn         TIFINAGH CONSONANT JOINER
2D80..2D96;N     # Lo    [23] ETHIOPIC SYLLABLE LOA..ETHIOPIC SYLLABLE GGWE
2DA0..2DA6;N     # Lo     [7] ETHIOPIC SYLLABLE SSA..ETHIOPIC SYLLABLE SSO
2DA8..2DAE;N     # Lo     [7] ETHIOPIC SYLLABLE CCA..ETHIOPIC SYLLABLE CCO
2DB0..2DB6;N     # Lo     [7] ETHIOPIC SYLLABLE ZZA..ETHIOPIC SYLLABLE ZZO
2DB8..2DBE;N     # Lo     [7] ETHIOPIC SYLLABLE CCHA..ETHIOPIC SYLLABLE CCHO
2DC0..2DC6;N     # Lo     [7] ETHIOPIC SYLLABLE QYA..ETHIOPIC SYLLABLE QYO
2DC8..2DCE;N     # Lo     [7] ETHIOPIC SYLLABLE KYA..ETHIOPIC SYLLABLE KYO
2DD0..2DD6;N     # Lo     [7] ETHIOPIC SYLLABLE XYA..ETHIOPIC SYLLABLE XYO
2DD8..2DDE;N     # Lo     [7] ETHIOPIC SYLLABLE GYA..ETHIOPIC SYLLABLE GYO
2DE0..2DFF;N     # Mn    [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS
2E00..2E01;N     # Po     [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER
2E02;N           # Pi         LEFT SUBSTITUTION BRACKET
2E03;N           # Pf         RIGHT SUBSTITUTION BRACKET
2E04;N           # Pi         LEFT DOTTED SUBSTITUTION BRACKET
2E05;N           # Pf         RIGHT DOTTED SUBSTITUTION BRACKET
2E06..2E08;N     # Po     [3] RAISED INTERPOLATION MARKER..DOTTED TRANSPOSITION MARKER
2E09;N           # Pi         LEFT TRANSPOSITION BRACKET
2E0A;N           # Pf         RIGHT TRANSPOSITION BRACKET
2E0B;N           # Po         RAISED SQUARE
2E0C;N           # Pi         LEFT RAISED OMISSION BRACKET
2E0D;N           # Pf         RIGHT RAISED OMISSION BRACKET
2E0E..2E16;N     # Po     [9] EDITORIAL CORONIS..DOTTED RIGHT-POINTING ANGLE
2E17;N           # Pd         DOUBLE OBLIQUE HYPHEN
2E18..2E19;N     # Po     [2] INVERTED INTERROBANG..PALM BRANCH
2E1A;N           # Pd         HYPHEN WITH DIAERESIS
2E1B;N           # Po         TILDE WITH RING ABOVE
2E1C;N           # Pi         LEFT LOW PARAPHRASE BRACKET
2E1D;N           # Pf         RIGHT LOW PARAPHRASE BRACKET
2E1E..2E1F;N     # Po     [2] TILDE WITH DOT ABOVE..TILDE WITH DOT BELOW
2E20;N           # Pi         LEFT VERTICAL BAR WITH QUILL
2E21;N           # Pf         RIGHT VERTICAL BAR WITH QUILL
2E22;N           # Ps         TOP LEFT HALF BRACKET
2E23;N           # Pe         TOP RIGHT HALF BRACKET
2E24;N           # Ps         BOTTOM LEFT HALF BRACKET
2E25;N           # Pe         BOTTOM RIGHT HALF BRACKET
2E26;N           # Ps         LEFT SIDEWAYS U BRACKET
2E27;N           # Pe         RIGHT SIDEWAYS U BRACKET
2E28;N           # Ps         LEFT DOUBLE PARENTHESIS
2E29;N           # Pe         RIGHT DOUBLE PARENTHESIS
2E2A..2E2E;N     # Po     [5] TWO DOTS OVER ONE DOT PUNCTUATION..REVERSED QUESTION MARK
2E2F;N           # Lm         VERTICAL TILDE
2E30..2E39;N     # Po    [10] RING POINT..TOP HALF SECTION SIGN
2E3A..2E3B;N     # Pd     [2] TWO-EM DASH..THREE-EM DASH
2E3C..2E3F;N     # Po     [4] STENOGRAPHIC FULL STOP..CAPITULUM
2E40;N           # Pd         DOUBLE HYPHEN
2E41;N           # Po         REVERSED COMMA
2E42;N           # Ps         DOUBLE LOW-REVERSED-9 QUOTATION MARK
2E43..2E4E;N     # Po    [12] DASH WITH LEFT UPTURN..PUNCTUS ELEVATUS MARK
2E80..2E99;W     # So    [26] CJK RADICAL REPEAT..CJK RADICAL RAP
2E9B..2EF3;W     # So    [89] CJK RADICAL CHOKE..CJK RADICAL C-SIMPLIFIED TURTLE
2F00..2FD5;W     # So   [214] KANGXI RADICAL ONE..KANGXI RADICAL FLUTE
2FF0..2FFB;W     # So    [12] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID
3000;F           # Zs         IDEOGRAPHIC SPACE
3001..3003;W     # Po     [3] IDEOGRAPHIC COMMA..DITTO MARK
3004;W           # So         JAPANESE INDUSTRIAL STANDARD SYMBOL
3005;W           # Lm         IDEOGRAPHIC ITERATION MARK
3006;W           # Lo         IDEOGRAPHIC CLOSING MARK
3007;W           # Nl         IDEOGRAPHIC NUMBER ZERO
3008;W           # Ps         LEFT ANGLE BRACKET
3009;W           # Pe         RIGHT ANGLE BRACKET
300A;W           # Ps         LEFT DOUBLE ANGLE BRACKET
300B;W           # Pe         RIGHT DOUBLE ANGLE BRACKET
300C;W           # Ps         LEFT CORNER BRACKET
300D;W           # Pe         RIGHT CORNER BRACKET
300E;W           # Ps         LEFT WHITE CORNER BRACKET
300F;W           # Pe         RIGHT WHITE CORNER BRACKET
3010;W           # Ps         LEFT BLACK LENTICULAR BRACKET
3011;W           # Pe         RIGHT BLACK LENTICULAR BRACKET
3012..3013;W     # So     [2] POSTAL MARK..GETA MARK
3014;W           # Ps         LEFT TORTOISE SHELL BRACKET
3015;W           # Pe         RIGHT TORTOISE SHELL BRACKET
3016;W           # Ps         LEFT WHITE LENTICULAR BRACKET
3017;W           # Pe         RIGHT WHITE LENTICULAR BRACKET
3018;W           # Ps         LEFT WHITE TORTOISE SHELL BRACKET
3019;W           # Pe         RIGHT WHITE TORTOISE SHELL BRACKET
301A;W           # Ps         LEFT WHITE SQUARE BRACKET
301B;W           # Pe         RIGHT WHITE SQUARE BRACKET
301C;W           # Pd         WAVE DASH
301D;W           # Ps         REVERSED DOUBLE PRIME QUOTATION MARK
301E..301F;W     # Pe     [2] DOUBLE PRIME QUOTATION MARK..LOW DOUBLE PRIME QUOTATION MARK
3020;W           # So         POSTAL MARK FACE
3021..3029;W     # Nl     [9] HANGZHOU NUMERAL ONE..HANGZHOU NUMERAL NINE
302A..302D;W     # Mn     [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK
302E..302F;W     # Mc     [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK
3030;W           # Pd         WAVY DASH
3031..3035;W     # Lm     [5] VERTICAL KANA REPEAT MARK..VERTICAL KANA REPEAT MARK LOWER HALF
3036..3037;W     # So     [2] CIRCLED POSTAL MARK..IDEOGRAPHIC TELEGRAPH LINE FEED SEPARATOR SYMBOL
3038..303A;W     # Nl     [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY
303B;W           # Lm         VERTICAL IDEOGRAPHIC ITERATION MARK
303C;W           # Lo         MASU MARK
303D;W           # Po         PART ALTERNATION MARK
303E;W           # So         IDEOGRAPHIC VARIATION INDICATOR
303F;N           # So         IDEOGRAPHIC HALF FILL SPACE
3041..3096;W     # Lo    [86] HIRAGANA LETTER SMALL A..HIRAGANA LETTER SMALL KE
3099..309A;W     # Mn     [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
309B..309C;W     # Sk     [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
309D..309E;W     # Lm     [2] HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK
309F;W           # Lo         HIRAGANA DIGRAPH YORI
30A0;W           # Pd         KATAKANA-HIRAGANA DOUBLE HYPHEN
30A1..30FA;W     # Lo    [90] KATAKANA LETTER SMALL A..KATAKANA LETTER VO
30FB;W           # Po         KATAKANA MIDDLE DOT
30FC..30FE;W     # Lm     [3] KATAKANA-HIRAGANA PROLONGED SOUND MARK..KATAKANA VOICED ITERATION MARK
30FF;W           # Lo         KATAKANA DIGRAPH KOTO
3105..312F;W     # Lo    [43] BOPOMOFO LETTER B..BOPOMOFO LETTER NN
3131..318E;W     # Lo    [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE
3190..3191;W     # So     [2] IDEOGRAPHIC ANNOTATION LINKING MARK..IDEOGRAPHIC ANNOTATION REVERSE MARK
3192..3195;W     # No     [4] IDEOGRAPHIC ANNOTATION ONE MARK..IDEOGRAPHIC ANNOTATION FOUR MARK
3196..319F;W     # So    [10] IDEOGRAPHIC ANNOTATION TOP MARK..IDEOGRAPHIC ANNOTATION MAN MARK
31A0..31BA;W     # Lo    [27] BOPOMOFO LETTER BU..BOPOMOFO LETTER ZY
31C0..31E3;W     # So    [36] CJK STROKE T..CJK STROKE Q
31F0..31FF;W     # Lo    [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO
3200..321E;W     # So    [31] PARENTHESIZED HANGUL KIYEOK..PARENTHESIZED KOREAN CHARACTER O HU
3220..3229;W     # No    [10] PARENTHESIZED IDEOGRAPH ONE..PARENTHESIZED IDEOGRAPH TEN
322A..3247;W     # So    [30] PARENTHESIZED IDEOGRAPH MOON..CIRCLED IDEOGRAPH KOTO
3248..324F;A     # No     [8] CIRCLED NUMBER TEN ON BLACK SQUARE..CIRCLED NUMBER EIGHTY ON BLACK SQUARE
3250;W           # So         PARTNERSHIP SIGN
3251..325F;W     # No    [15] CIRCLED NUMBER TWENTY ONE..CIRCLED NUMBER THIRTY FIVE
3260..327F;W     # So    [32] CIRCLED HANGUL KIYEOK..KOREAN STANDARD SYMBOL
3280..3289;W     # No    [10] CIRCLED IDEOGRAPH ONE..CIRCLED IDEOGRAPH TEN
328A..32B0;W     # So    [39] CIRCLED IDEOGRAPH MOON..CIRCLED IDEOGRAPH NIGHT
32B1..32BF;W     # No    [15] CIRCLED NUMBER THIRTY SIX..CIRCLED NUMBER FIFTY
32C0..32FE;W     # So    [63] IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY..CIRCLED KATAKANA WO
3300..33FF;W     # So   [256] SQUARE APAATO..SQUARE GAL
3400..4DB5;W     # Lo  [6582] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DB5
4DB6..4DBF;W     # Cn    [10] <reserved-4DB6>..<reserved-4DBF>
4DC0..4DFF;N     # So    [64] HEXAGRAM FOR THE CREATIVE HEAVEN..HEXAGRAM FOR BEFORE COMPLETION
4E00..9FEF;W     # Lo [20976] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FEF
9FF0..9FFF;W     # Cn    [16] <reserved-9FF0>..<reserved-9FFF>
A000..A014;W     # Lo    [21] YI SYLLABLE IT..YI SYLLABLE E
A015;W           # Lm         YI SYLLABLE WU
A016..A48C;W     # Lo  [1143] YI SYLLABLE BIT..YI SYLLABLE YYR
A490..A4C6;W     # So    [55] YI RADICAL QOT..YI RADICAL KE
A4D0..A4F7;N     # Lo    [40] LISU LETTER BA..LISU LETTER OE
A4F8..A4FD;N     # Lm     [6] LISU LETTER TONE MYA TI..LISU LETTER TONE MYA JEU
A4FE..A4FF;N     # Po     [2] LISU PUNCTUATION COMMA..LISU PUNCTUATION FULL STOP
A500..A60B;N     # Lo   [268] VAI SYLLABLE EE..VAI SYLLABLE NG
A60C;N           # Lm         VAI SYLLABLE LENGTHENER
A60D..A60F;N     # Po     [3] VAI COMMA..VAI QUESTION MARK
A610..A61F;N     # Lo    [16] VAI SYLLABLE NDOLE FA..VAI SYMBOL JONG
A620..A629;N     # Nd    [10] VAI DIGIT ZERO..VAI DIGIT NINE
A62A..A62B;N     # Lo     [2] VAI SYLLABLE NDOLE MA..VAI SYLLABLE NDOLE DO
A640..A66D;N     # L&    [46] CYRILLIC CAPITAL LETTER ZEMLYA..CYRILLIC SMALL LETTER DOUBLE MONOCULAR O
A66E;N           # Lo         CYRILLIC LETTER MULTIOCULAR O
A66F;N           # Mn         COMBINING CYRILLIC VZMET
A670..A672;N     # Me     [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN
A673;N           # Po         SLAVONIC ASTERISK
A674..A67D;N     # Mn    [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK
A67E;N           # Po         CYRILLIC KAVYKA
A67F;N           # Lm         CYRILLIC PAYEROK
A680..A69B;N     # L&    [28] CYRILLIC CAPITAL LETTER DWE..CYRILLIC SMALL LETTER CROSSED O
A69C..A69D;N     # Lm     [2] MODIFIER LETTER CYRILLIC HARD SIGN..MODIFIER LETTER CYRILLIC SOFT SIGN
A69E..A69F;N     # Mn     [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E
A6A0..A6E5;N     # Lo    [70] BAMUM LETTER A..BAMUM LETTER KI
A6E6..A6EF;N     # Nl    [10] BAMUM LETTER MO..BAMUM LETTER KOGHOM
A6F0..A6F1;N     # Mn     [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS
A6F2..A6F7;N     # Po     [6] BAMUM NJAEMLI..BAMUM QUESTION MARK
A700..A716;N     # Sk    [23] MODIFIER LETTER CHINESE TONE YIN PING..MODIFIER LETTER EXTRA-LOW LEFT-STEM TONE BAR
A717..A71F;N     # Lm     [9] MODIFIER LETTER DOT VERTICAL BAR..MODIFIER LETTER LOW INVERTED EXCLAMATION MARK
A720..A721;N     # Sk     [2] MODIFIER LETTER STRESS AND HIGH TONE..MODIFIER LETTER STRESS AND LOW TONE
A722..A76F;N     # L&    [78] LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF..LATIN SMALL LETTER CON
A770;N           # Lm         MODIFIER LETTER US
A771..A787;N     # L&    [23] LATIN SMALL LETTER DUM..LATIN SMALL LETTER INSULAR T
A788;N           # Lm         MODIFIER LETTER LOW CIRCUMFLEX ACCENT
A789..A78A;N     # Sk     [2] MODIFIER LETTER COLON..MODIFIER LETTER SHORT EQUALS SIGN
A78B..A78E;N     # L&     [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT
A78F;N           # Lo         LATIN LETTER SINOLOGICAL DOT
A790..A7B9;N     # L&    [42] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER U WITH STROKE
A7F7;N           # Lo         LATIN EPIGRAPHIC LETTER SIDEWAYS I
A7F8..A7F9;N     # Lm     [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE
A7FA;N           # Ll         LATIN LETTER SMALL CAPITAL TURNED M
A7FB..A7FF;N     # Lo     [5] LATIN EPIGRAPHIC LETTER REVERSED F..LATIN EPIGRAPHIC LETTER ARCHAIC M
A800..A801;N     # Lo     [2] SYLOTI NAGRI LETTER A..SYLOTI NAGRI LETTER I
A802;N           # Mn         SYLOTI NAGRI SIGN DVISVARA
A803..A805;N     # Lo     [3] SYLOTI NAGRI LETTER U..SYLOTI NAGRI LETTER O
A806;N           # Mn         SYLOTI NAGRI SIGN HASANTA
A807..A80A;N     # Lo     [4] SYLOTI NAGRI LETTER KO..SYLOTI NAGRI LETTER GHO
A80B;N           # Mn         SYLOTI NAGRI SIGN ANUSVARA
A80C..A822;N     # Lo    [23] SYLOTI NAGRI LETTER CO..SYLOTI NAGRI LETTER HO
A823..A824;N     # Mc     [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I
A825..A826;N     # Mn     [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E
A827;N           # Mc         SYLOTI NAGRI VOWEL SIGN OO
A828..A82B;N     # So     [4] SYLOTI NAGRI POETRY MARK-1..SYLOTI NAGRI POETRY MARK-4
A830..A835;N     # No     [6] NORTH INDIC FRACTION ONE QUARTER..NORTH INDIC FRACTION THREE SIXTEENTHS
A836..A837;N     # So     [2] NORTH INDIC QUARTER MARK..NORTH INDIC PLACEHOLDER MARK
A838;N           # Sc         NORTH INDIC RUPEE MARK
A839;N           # So         NORTH INDIC QUANTITY MARK
A840..A873;N     # Lo    [52] PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABINDU
A874..A877;N     # Po     [4] PHAGS-PA SINGLE HEAD MARK..PHAGS-PA MARK DOUBLE SHAD
A880..A881;N     # Mc     [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA
A882..A8B3;N     # Lo    [50] SAURASHTRA LETTER A..SAURASHTRA LETTER LLA
A8B4..A8C3;N     # Mc    [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU
A8C4..A8C5;N     # Mn     [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU
A8CE..A8CF;N     # Po     [2] SAURASHTRA DANDA..SAURASHTRA DOUBLE DANDA
A8D0..A8D9;N     # Nd    [10] SAURASHTRA DIGIT ZERO..SAURASHTRA DIGIT NINE
A8E0..A8F1;N     # Mn    [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA
A8F2..A8F7;N     # Lo     [6] DEVANAGARI SIGN SPACING CANDRABINDU..DEVANAGARI SIGN CANDRABINDU AVAGRAHA
A8F8..A8FA;N     # Po     [3] DEVANAGARI SIGN PUSHPIKA..DEVANAGARI CARET
A8FB;N           # Lo         DEVANAGARI HEADSTROKE
A8FC;N           # Po         DEVANAGARI SIGN SIDDHAM
A8FD..A8FE;N     # Lo     [2] DEVANAGARI JAIN OM..DEVANAGARI LETTER AY
A8FF;N           # Mn         DEVANAGARI VOWEL SIGN AY
A900..A909;N     # Nd    [10] KAYAH LI DIGIT ZERO..KAYAH LI DIGIT NINE
A90A..A925;N     # Lo    [28] KAYAH LI LETTER KA..KAYAH LI LETTER OO
A926..A92D;N     # Mn     [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU
A92E..A92F;N     # Po     [2] KAYAH LI SIGN CWI..KAYAH LI SIGN SHYA
A930..A946;N     # Lo    [23] REJANG LETTER KA..REJANG LETTER A
A947..A951;N     # Mn    [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R
A952..A953;N     # Mc     [2] REJANG CONSONANT SIGN H..REJANG VIRAMA
A95F;N           # Po         REJANG SECTION MARK
A960..A97C;W     # Lo    [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH
A980..A982;N     # Mn     [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR
A983;N           # Mc         JAVANESE SIGN WIGNYAN
A984..A9B2;N     # Lo    [47] JAVANESE LETTER A..JAVANESE LETTER HA
A9B3;N           # Mn         JAVANESE SIGN CECAK TELU
A9B4..A9B5;N     # Mc     [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG
A9B6..A9B9;N     # Mn     [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT
A9BA..A9BB;N     # Mc     [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE
A9BC;N           # Mn         JAVANESE VOWEL SIGN PEPET
A9BD..A9C0;N     # Mc     [4] JAVANESE CONSONANT SIGN KERET..JAVANESE PANGKON
A9C1..A9CD;N     # Po    [13] JAVANESE LEFT RERENGGAN..JAVANESE TURNED PADA PISELEH
A9CF;N           # Lm         JAVANESE PANGRANGKEP
A9D0..A9D9;N     # Nd    [10] JAVANESE DIGIT ZERO..JAVANESE DIGIT NINE
A9DE..A9DF;N     # Po     [2] JAVANESE PADA TIRTA TUMETES..JAVANESE PADA ISEN-ISEN
A9E0..A9E4;N     # Lo     [5] MYANMAR LETTER SHAN GHA..MYANMAR LETTER SHAN BHA
A9E5;N           # Mn         MYANMAR SIGN SHAN SAW
A9E6;N           # Lm         MYANMAR MODIFIER LETTER SHAN REDUPLICATION
A9E7..A9EF;N     # Lo     [9] MYANMAR LETTER TAI LAING NYA..MYANMAR LETTER TAI LAING NNA
A9F0..A9F9;N     # Nd    [10] MYANMAR TAI LAING DIGIT ZERO..MYANMAR TAI LAING DIGIT NINE
A9FA..A9FE;N     # Lo     [5] MYANMAR LETTER TAI LAING LLA..MYANMAR LETTER TAI LAING BHA
AA00..AA28;N     # Lo    [41] CHAM LETTER A..CHAM LETTER HA
AA29..AA2E;N     # Mn     [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE
AA2F..AA30;N     # Mc     [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI
AA31..AA32;N     # Mn     [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE
AA33..AA34;N     # Mc     [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA
AA35..AA36;N     # Mn     [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA
AA40..AA42;N     # Lo     [3] CHAM LETTER FINAL K..CHAM LETTER FINAL NG
AA43;N           # Mn         CHAM CONSONANT SIGN FINAL NG
AA44..AA4B;N     # Lo     [8] CHAM LETTER FINAL CH..CHAM LETTER FINAL SS
AA4C;N           # Mn         CHAM CONSONANT SIGN FINAL M
AA4D;N           # Mc         CHAM CONSONANT SIGN FINAL H
AA50..AA59;N     # Nd    [10] CHAM DIGIT ZERO..CHAM DIGIT NINE
AA5C..AA5F;N     # Po     [4] CHAM PUNCTUATION SPIRAL..CHAM PUNCTUATION TRIPLE DANDA
AA60..AA6F;N     # Lo    [16] MYANMAR LETTER KHAMTI GA..MYANMAR LETTER KHAMTI FA
AA70;N           # Lm         MYANMAR MODIFIER LETTER KHAMTI REDUPLICATION
AA71..AA76;N     # Lo     [6] MYANMAR LETTER KHAMTI XA..MYANMAR LOGOGRAM KHAMTI HM
AA77..AA79;N     # So     [3] MYANMAR SYMBOL AITON EXCLAMATION..MYANMAR SYMBOL AITON TWO
AA7A;N           # Lo         MYANMAR LETTER AITON RA
AA7B;N           # Mc         MYANMAR SIGN PAO KAREN TONE
AA7C;N           # Mn         MYANMAR SIGN TAI LAING TONE-2
AA7D;N           # Mc         MYANMAR SIGN TAI LAING TONE-5
AA7E..AA7F;N     # Lo     [2] MYANMAR LETTER SHWE PALAUNG CHA..MYANMAR LETTER SHWE PALAUNG SHA
AA80..AAAF;N     # Lo    [48] TAI VIET LETTER LOW KO..TAI VIET LETTER HIGH O
AAB0;N           # Mn         TAI VIET MAI KANG
AAB1;N           # Lo         TAI VIET VOWEL AA
AAB2..AAB4;N     # Mn     [3] TAI VIET VOWEL I..TAI VIET VOWEL U
AAB5..AAB6;N     # Lo     [2] TAI VIET VOWEL E..TAI VIET VOWEL O
AAB7..AAB8;N     # Mn     [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA
AAB9..AABD;N     # Lo     [5] TAI VIET VOWEL UEA..TAI VIET VOWEL AN
AABE..AABF;N     # Mn     [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK
AAC0;N           # Lo         TAI VIET TONE MAI NUENG
AAC1;N           # Mn         TAI VIET TONE MAI THO
AAC2;N           # Lo         TAI VIET TONE MAI SONG
AADB..AADC;N     # Lo     [2] TAI VIET SYMBOL KON..TAI VIET SYMBOL NUENG
AADD;N           # Lm         TAI VIET SYMBOL SAM
AADE..AADF;N     # Po     [2] TAI VIET SYMBOL HO HOI..TAI VIET SYMBOL KOI KOI
AAE0..AAEA;N     # Lo    [11] MEETEI MAYEK LETTER E..MEETEI MAYEK LETTER SSA
AAEB;N           # Mc         MEETEI MAYEK VOWEL SIGN II
AAEC..AAED;N     # Mn     [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI
AAEE..AAEF;N     # Mc     [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU
AAF0..AAF1;N     # Po     [2] MEETEI MAYEK CHEIKHAN..MEETEI MAYEK AHANG KHUDAM
AAF2;N           # Lo         MEETEI MAYEK ANJI
AAF3..AAF4;N     # Lm     [2] MEETEI MAYEK SYLLABLE REPETITION MARK..MEETEI MAYEK WORD REPETITION MARK
AAF5;N           # Mc         MEETEI MAYEK VOWEL SIGN VISARGA
AAF6;N           # Mn         MEETEI MAYEK VIRAMA
AB01..AB06;N     # Lo     [6] ETHIOPIC SYLLABLE TTHU..ETHIOPIC SYLLABLE TTHO
AB09..AB0E;N     # Lo     [6] ETHIOPIC SYLLABLE DDHU..ETHIOPIC SYLLABLE DDHO
AB11..AB16;N     # Lo     [6] ETHIOPIC SYLLABLE DZU..ETHIOPIC SYLLABLE DZO
AB20..AB26;N     # Lo     [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE CCHHO
AB28..AB2E;N     # Lo     [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO
AB30..AB5A;N     # Ll    [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG
AB5B;N           # Sk         MODIFIER BREVE WITH INVERTED BREVE
AB5C..AB5F;N     # Lm     [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK
AB60..AB65;N     # Ll     [6] LATIN SMALL LETTER SAKHA YAT..GREEK LETTER SMALL CAPITAL OMEGA
AB70..ABBF;N     # Ll    [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA
ABC0..ABE2;N     # Lo    [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM
ABE3..ABE4;N     # Mc     [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP
ABE5;N           # Mn         MEETEI MAYEK VOWEL SIGN ANAP
ABE6..ABE7;N     # Mc     [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP
ABE8;N           # Mn         MEETEI MAYEK VOWEL SIGN UNAP
ABE9..ABEA;N     # Mc     [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG
ABEB;N           # Po         MEETEI MAYEK CHEIKHEI
ABEC;N           # Mc         MEETEI MAYEK LUM IYEK
ABED;N           # Mn         MEETEI MAYEK APUN IYEK
ABF0..ABF9;N     # Nd    [10] MEETEI MAYEK DIGIT ZERO..MEETEI MAYEK DIGIT NINE
AC00..D7A3;W     # Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH
D7B0..D7C6;N     # Lo    [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E
D7CB..D7FB;N     # Lo    [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH
D800..DB7F;N     # Cs   [896] <surrogate-D800>..<surrogate-DB7F>
DB80..DBFF;N     # Cs   [128] <surrogate-DB80>..<surrogate-DBFF>
DC00..DFFF;N     # Cs  [1024] <surrogate-DC00>..<surrogate-DFFF>
E000..F8FF;A     # Co  [6400] <private-use-E000>..<private-use-F8FF>
F900..FA6D;W     # Lo   [366] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA6D
FA6E..FA6F;W     # Cn     [2] <reserved-FA6E>..<reserved-FA6F>
FA70..FAD9;W     # Lo   [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9
FADA..FAFF;W     # Cn    [38] <reserved-FADA>..<reserved-FAFF>
FB00..FB06;N     # Ll     [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST
FB13..FB17;N     # Ll     [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH
FB1D;N           # Lo         HEBREW LETTER YOD WITH HIRIQ
FB1E;N           # Mn         HEBREW POINT JUDEO-SPANISH VARIKA
FB1F..FB28;N     # Lo    [10] HEBREW LIGATURE YIDDISH YOD YOD PATAH..HEBREW LETTER WIDE TAV
FB29;N           # Sm         HEBREW LETTER ALTERNATIVE PLUS SIGN
FB2A..FB36;N     # Lo    [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH
FB38..FB3C;N     # Lo     [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH
FB3E;N           # Lo         HEBREW LETTER MEM WITH DAGESH
FB40..FB41;N     # Lo     [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH
FB43..FB44;N     # Lo     [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH
FB46..FB4F;N     # Lo    [10] HEBREW LETTER TSADI WITH DAGESH..HEBREW LIGATURE ALEF LAMED
FB50..FBB1;N     # Lo    [98] ARABIC LETTER ALEF WASLA ISOLATED FORM..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM
FBB2..FBC1;N     # Sk    [16] ARABIC SYMBOL DOT ABOVE..ARABIC SYMBOL SMALL TAH BELOW
FBD3..FD3D;N     # Lo   [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM
FD3E;N           # Pe         ORNATE LEFT PARENTHESIS
FD3F;N           # Ps         ORNATE RIGHT PARENTHESIS
FD50..FD8F;N     # Lo    [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM
FD92..FDC7;N     # Lo    [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM
FDF0..FDFB;N     # Lo    [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU
FDFC;N           # Sc         RIAL SIGN
FDFD;N           # So         ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM
FE00..FE0F;A     # Mn    [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16
FE10..FE16;W     # Po     [7] PRESENTATION FORM FOR VERTICAL COMMA..PRESENTATION FORM FOR VERTICAL QUESTION MARK
FE17;W           # Ps         PRESENTATION FORM FOR VERTICAL LEFT WHITE LENTICULAR BRACKET
FE18;W           # Pe         PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET
FE19;W           # Po         PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS
FE20..FE2F;N     # Mn    [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF
FE30;W           # Po         PRESENTATION FORM FOR VERTICAL TWO DOT LEADER
FE31..FE32;W     # Pd     [2] PRESENTATION FORM FOR VERTICAL EM DASH..PRESENTATION FORM FOR VERTICAL EN DASH
FE33..FE34;W     # Pc     [2] PRESENTATION FORM FOR VERTICAL LOW LINE..PRESENTATION FORM FOR VERTICAL WAVY LOW LINE
FE35;W           # Ps         PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS
FE36;W           # Pe         PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS
FE37;W           # Ps         PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET
FE38;W           # Pe         PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET
FE39;W           # Ps         PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET
FE3A;W           # Pe         PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET
FE3B;W           # Ps         PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET
FE3C;W           # Pe         PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET
FE3D;W           # Ps         PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET
FE3E;W           # Pe         PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET
FE3F;W           # Ps         PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET
FE40;W           # Pe         PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET
FE41;W           # Ps         PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET
FE42;W           # Pe         PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET
FE43;W           # Ps         PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET
FE44;W           # Pe         PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET
FE45..FE46;W     # Po     [2] SESAME DOT..WHITE SESAME DOT
FE47;W           # Ps         PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET
FE48;W           # Pe         PRESENTATION FORM FOR VERTICAL RIGHT SQUARE BRACKET
FE49..FE4C;W     # Po     [4] DASHED OVERLINE..DOUBLE WAVY OVERLINE
FE4D..FE4F;W     # Pc     [3] DASHED LOW LINE..WAVY LOW LINE
FE50..FE52;W     # Po     [3] SMALL COMMA..SMALL FULL STOP
FE54..FE57;W     # Po     [4] SMALL SEMICOLON..SMALL EXCLAMATION MARK
FE58;W           # Pd         SMALL EM DASH
FE59;W           # Ps         SMALL LEFT PARENTHESIS
FE5A;W           # Pe         SMALL RIGHT PARENTHESIS
FE5B;W           # Ps         SMALL LEFT CURLY BRACKET
FE5C;W           # Pe         SMALL RIGHT CURLY BRACKET
FE5D;W           # Ps         SMALL LEFT TORTOISE SHELL BRACKET
FE5E;W           # Pe         SMALL RIGHT TORTOISE SHELL BRACKET
FE5F..FE61;W     # Po     [3] SMALL NUMBER SIGN..SMALL ASTERISK
FE62;W           # Sm         SMALL PLUS SIGN
FE63;W           # Pd         SMALL HYPHEN-MINUS
FE64..FE66;W     # Sm     [3] SMALL LESS-THAN SIGN..SMALL EQUALS SIGN
FE68;W           # Po         SMALL REVERSE SOLIDUS
FE69;W           # Sc         SMALL DOLLAR SIGN
FE6A..FE6B;W     # Po     [2] SMALL PERCENT SIGN..SMALL COMMERCIAL AT
FE70..FE74;N     # Lo     [5] ARABIC FATHATAN ISOLATED FORM..ARABIC KASRATAN ISOLATED FORM
FE76..FEFC;N     # Lo   [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM
FEFF;N           # Cf         ZERO WIDTH NO-BREAK SPACE
FF01..FF03;F     # Po     [3] FULLWIDTH EXCLAMATION MARK..FULLWIDTH NUMBER SIGN
FF04;F           # Sc         FULLWIDTH DOLLAR SIGN
FF05..FF07;F     # Po     [3] FULLWIDTH PERCENT SIGN..FULLWIDTH APOSTROPHE
FF08;F           # Ps         FULLWIDTH LEFT PARENTHESIS
FF09;F           # Pe         FULLWIDTH RIGHT PARENTHESIS
FF0A;F           # Po         FULLWIDTH ASTERISK
FF0B;F           # Sm         FULLWIDTH PLUS SIGN
FF0C;F           # Po         FULLWIDTH COMMA
FF0D;F           # Pd         FULLWIDTH HYPHEN-MINUS
FF0E..FF0F;F     # Po     [2] FULLWIDTH FULL STOP..FULLWIDTH SOLIDUS
FF10..FF19;F     # Nd    [10] FULLWIDTH DIGIT ZERO..FULLWIDTH DIGIT NINE
FF1A..FF1B;F     # Po     [2] FULLWIDTH COLON..FULLWIDTH SEMICOLON
FF1C..FF1E;F     # Sm     [3] FULLWIDTH LESS-THAN SIGN..FULLWIDTH GREATER-THAN SIGN
FF1F..FF20;F     # Po     [2] FULLWIDTH QUESTION MARK..FULLWIDTH COMMERCIAL AT
FF21..FF3A;F     # Lu    [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z
FF3B;F           # Ps         FULLWIDTH LEFT SQUARE BRACKET
FF3C;F           # Po         FULLWIDTH REVERSE SOLIDUS
FF3D;F           # Pe         FULLWIDTH RIGHT SQUARE BRACKET
FF3E;F           # Sk         FULLWIDTH CIRCUMFLEX ACCENT
FF3F;F           # Pc         FULLWIDTH LOW LINE
FF40;F           # Sk         FULLWIDTH GRAVE ACCENT
FF41..FF5A;F     # Ll    [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z
FF5B;F           # Ps         FULLWIDTH LEFT CURLY BRACKET
FF5C;F           # Sm         FULLWIDTH VERTICAL LINE
FF5D;F           # Pe         FULLWIDTH RIGHT CURLY BRACKET
FF5E;F           # Sm         FULLWIDTH TILDE
FF5F;F           # Ps         FULLWIDTH LEFT WHITE PARENTHESIS
FF60;F           # Pe         FULLWIDTH RIGHT WHITE PARENTHESIS
FF61;H           # Po         HALFWIDTH IDEOGRAPHIC FULL STOP
FF62;H           # Ps         HALFWIDTH LEFT CORNER BRACKET
FF63;H           # Pe         HALFWIDTH RIGHT CORNER BRACKET
FF64..FF65;H     # Po     [2] HALFWIDTH IDEOGRAPHIC COMMA..HALFWIDTH KATAKANA MIDDLE DOT
FF66..FF6F;H     # Lo    [10] HALFWIDTH KATAKANA LETTER WO..HALFWIDTH KATAKANA LETTER SMALL TU
FF70;H           # Lm         HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
FF71..FF9D;H     # Lo    [45] HALFWIDTH KATAKANA LETTER A..HALFWIDTH KATAKANA LETTER N
FF9E..FF9F;H     # Lm     [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
FFA0..FFBE;H     # Lo    [31] HALFWIDTH HANGUL FILLER..HALFWIDTH HANGUL LETTER HIEUH
FFC2..FFC7;H     # Lo     [6] HALFWIDTH HANGUL LETTER A..HALFWIDTH HANGUL LETTER E
FFCA..FFCF;H     # Lo     [6] HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGUL LETTER OE
FFD2..FFD7;H     # Lo     [6] HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL LETTER YU
FFDA..FFDC;H     # Lo     [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL LETTER I
FFE0..FFE1;F     # Sc     [2] FULLWIDTH CENT SIGN..FULLWIDTH POUND SIGN
FFE2;F           # Sm         FULLWIDTH NOT SIGN
FFE3;F           # Sk         FULLWIDTH MACRON
FFE4;F           # So         FULLWIDTH BROKEN BAR
FFE5..FFE6;F     # Sc     [2] FULLWIDTH YEN SIGN..FULLWIDTH WON SIGN
FFE8;H           # So         HALFWIDTH FORMS LIGHT VERTICAL
FFE9..FFEC;H     # Sm     [4] HALFWIDTH LEFTWARDS ARROW..HALFWIDTH DOWNWARDS ARROW
FFED..FFEE;H     # So     [2] HALFWIDTH BLACK SQUARE..HALFWIDTH WHITE CIRCLE
FFF9..FFFB;N     # Cf     [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR
FFFC;N           # So         OBJECT REPLACEMENT CHARACTER
FFFD;A           # So         REPLACEMENT CHARACTER
10000..1000B;N   # Lo    [12] LINEAR B SYLLABLE B008 A..LINEAR B SYLLABLE B046 JE
1000D..10026;N   # Lo    [26] LINEAR B SYLLABLE B036 JO..LINEAR B SYLLABLE B032 QO
10028..1003A;N   # Lo    [19] LINEAR B SYLLABLE B060 RA..LINEAR B SYLLABLE B042 WO
1003C..1003D;N   # Lo     [2] LINEAR B SYLLABLE B017 ZA..LINEAR B SYLLABLE B074 ZE
1003F..1004D;N   # Lo    [15] LINEAR B SYLLABLE B020 ZO..LINEAR B SYLLABLE B091 TWO
10050..1005D;N   # Lo    [14] LINEAR B SYMBOL B018..LINEAR B SYMBOL B089
10080..100FA;N   # Lo   [123] LINEAR B IDEOGRAM B100 MAN..LINEAR B IDEOGRAM VESSEL B305
10100..10102;N   # Po     [3] AEGEAN WORD SEPARATOR LINE..AEGEAN CHECK MARK
10107..10133;N   # No    [45] AEGEAN NUMBER ONE..AEGEAN NUMBER NINETY THOUSAND
10137..1013F;N   # So     [9] AEGEAN WEIGHT BASE UNIT..AEGEAN MEASURE THIRD SUBUNIT
10140..10174;N   # Nl    [53] GREEK ACROPHONIC ATTIC ONE QUARTER..GREEK ACROPHONIC STRATIAN FIFTY MNAS
10175..10178;N   # No     [4] GREEK ONE HALF SIGN..GREEK THREE QUARTERS SIGN
10179..10189;N   # So    [17] GREEK YEAR SIGN..GREEK TRYBLION BASE SIGN
1018A..1018B;N   # No     [2] GREEK ZERO SIGN..GREEK ONE QUARTER SIGN
1018C..1018E;N   # So     [3] GREEK SINUSOID SIGN..NOMISMA SIGN
10190..1019B;N   # So    [12] ROMAN SEXTANS SIGN..ROMAN CENTURIAL SIGN
101A0;N          # So         GREEK SYMBOL TAU RHO
101D0..101FC;N   # So    [45] PHAISTOS DISC SIGN PEDESTRIAN..PHAISTOS DISC SIGN WAVY BAND
101FD;N          # Mn         PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE
10280..1029C;N   # Lo    [29] LYCIAN LETTER A..LYCIAN LETTER X
102A0..102D0;N   # Lo    [49] CARIAN LETTER A..CARIAN LETTER UUU3
102E0;N          # Mn         COPTIC EPACT THOUSANDS MARK
102E1..102FB;N   # No    [27] COPTIC EPACT DIGIT ONE..COPTIC EPACT NUMBER NINE HUNDRED
10300..1031F;N   # Lo    [32] OLD ITALIC LETTER A..OLD ITALIC LETTER ESS
10320..10323;N   # No     [4] OLD ITALIC NUMERAL ONE..OLD ITALIC NUMERAL FIFTY
1032D..1032F;N   # Lo     [3] OLD ITALIC LETTER YE..OLD ITALIC LETTER SOUTHERN TSE
10330..10340;N   # Lo    [17] GOTHIC LETTER AHSA..GOTHIC LETTER PAIRTHRA
10341;N          # Nl         GOTHIC LETTER NINETY
10342..10349;N   # Lo     [8] GOTHIC LETTER RAIDA..GOTHIC LETTER OTHAL
1034A;N          # Nl         GOTHIC LETTER NINE HUNDRED
10350..10375;N   # Lo    [38] OLD PERMIC LETTER AN..OLD PERMIC LETTER IA
10376..1037A;N   # Mn     [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII
10380..1039D;N   # Lo    [30] UGARITIC LETTER ALPA..UGARITIC LETTER SSU
1039F;N          # Po         UGARITIC WORD DIVIDER
103A0..103C3;N   # Lo    [36] OLD PERSIAN SIGN A..OLD PERSIAN SIGN HA
103C8..103CF;N   # Lo     [8] OLD PERSIAN SIGN AURAMAZDAA..OLD PERSIAN SIGN BUUMISH
103D0;N          # Po         OLD PERSIAN WORD DIVIDER
103D1..103D5;N   # Nl     [5] OLD PERSIAN NUMBER ONE..OLD PERSIAN NUMBER HUNDRED
10400..1044F;N   # L&    [80] DESERET CAPITAL LETTER LONG I..DESERET SMALL LETTER EW
10450..1047F;N   # Lo    [48] SHAVIAN LETTER PEEP..SHAVIAN LETTER YEW
10480..1049D;N   # Lo    [30] OSMANYA LETTER ALEF..OSMANYA LETTER OO
104A0..104A9;N   # Nd    [10] OSMANYA DIGIT ZERO..OSMANYA DIGIT NINE
104B0..104D3;N   # Lu    [36] OSAGE CAPITAL LETTER A..OSAGE CAPITAL LETTER ZHA
104D8..104FB;N   # Ll    [36] OSAGE SMALL LETTER A..OSAGE SMALL LETTER ZHA
10500..10527;N   # Lo    [40] ELBASAN LETTER A..ELBASAN LETTER KHE
10530..10563;N   # Lo    [52] CAUCASIAN ALBANIAN LETTER ALT..CAUCASIAN ALBANIAN LETTER KIW
1056F;N          # Po         CAUCASIAN ALBANIAN CITATION MARK
10600..10736;N   # Lo   [311] LINEAR A SIGN AB001..LINEAR A SIGN A664
10740..10755;N   # Lo    [22] LINEAR A SIGN A701 A..LINEAR A SIGN A732 JE
10760..10767;N   # Lo     [8] LINEAR A SIGN A800..LINEAR A SIGN A807
10800..10805;N   # Lo     [6] CYPRIOT SYLLABLE A..CYPRIOT SYLLABLE JA
10808;N          # Lo         CYPRIOT SYLLABLE JO
1080A..10835;N   # Lo    [44] CYPRIOT SYLLABLE KA..CYPRIOT SYLLABLE WO
10837..10838;N   # Lo     [2] CYPRIOT SYLLABLE XA..CYPRIOT SYLLABLE XE
1083C;N          # Lo         CYPRIOT SYLLABLE ZA
1083F;N          # Lo         CYPRIOT SYLLABLE ZO
10840..10855;N   # Lo    [22] IMPERIAL ARAMAIC LETTER ALEPH..IMPERIAL ARAMAIC LETTER TAW
10857;N          # Po         IMPERIAL ARAMAIC SECTION SIGN
10858..1085F;N   # No     [8] IMPERIAL ARAMAIC NUMBER ONE..IMPERIAL ARAMAIC NUMBER TEN THOUSAND
10860..10876;N   # Lo    [23] PALMYRENE LETTER ALEPH..PALMYRENE LETTER TAW
10877..10878;N   # So     [2] PALMYRENE LEFT-POINTING FLEURON..PALMYRENE RIGHT-POINTING FLEURON
10879..1087F;N   # No     [7] PALMYRENE NUMBER ONE..PALMYRENE NUMBER TWENTY
10880..1089E;N   # Lo    [31] NABATAEAN LETTER FINAL ALEPH..NABATAEAN LETTER TAW
108A7..108AF;N   # No     [9] NABATAEAN NUMBER ONE..NABATAEAN NUMBER ONE HUNDRED
108E0..108F2;N   # Lo    [19] HATRAN LETTER ALEPH..HATRAN LETTER QOPH
108F4..108F5;N   # Lo     [2] HATRAN LETTER SHIN..HATRAN LETTER TAW
108FB..108FF;N   # No     [5] HATRAN NUMBER ONE..HATRAN NUMBER ONE HUNDRED
10900..10915;N   # Lo    [22] PHOENICIAN LETTER ALF..PHOENICIAN LETTER TAU
10916..1091B;N   # No     [6] PHOENICIAN NUMBER ONE..PHOENICIAN NUMBER THREE
1091F;N          # Po         PHOENICIAN WORD SEPARATOR
10920..10939;N   # Lo    [26] LYDIAN LETTER A..LYDIAN LETTER C
1093F;N          # Po         LYDIAN TRIANGULAR MARK
10980..1099F;N   # Lo    [32] MEROITIC HIEROGLYPHIC LETTER A..MEROITIC HIEROGLYPHIC SYMBOL VIDJ-2
109A0..109B7;N   # Lo    [24] MEROITIC CURSIVE LETTER A..MEROITIC CURSIVE LETTER DA
109BC..109BD;N   # No     [2] MEROITIC CURSIVE FRACTION ELEVEN TWELFTHS..MEROITIC CURSIVE FRACTION ONE HALF
109BE..109BF;N   # Lo     [2] MEROITIC CURSIVE LOGOGRAM RMT..MEROITIC CURSIVE LOGOGRAM IMN
109C0..109CF;N   # No    [16] MEROITIC CURSIVE NUMBER ONE..MEROITIC CURSIVE NUMBER SEVENTY
109D2..109FF;N   # No    [46] MEROITIC CURSIVE NUMBER ONE HUNDRED..MEROITIC CURSIVE FRACTION TEN TWELFTHS
10A00;N          # Lo         KHAROSHTHI LETTER A
10A01..10A03;N   # Mn     [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R
10A05..10A06;N   # Mn     [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O
10A0C..10A0F;N   # Mn     [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA
10A10..10A13;N   # Lo     [4] KHAROSHTHI LETTER KA..KHAROSHTHI LETTER GHA
10A15..10A17;N   # Lo     [3] KHAROSHTHI LETTER CA..KHAROSHTHI LETTER JA
10A19..10A35;N   # Lo    [29] KHAROSHTHI LETTER NYA..KHAROSHTHI LETTER VHA
10A38..10A3A;N   # Mn     [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW
10A3F;N          # Mn         KHAROSHTHI VIRAMA
10A40..10A48;N   # No     [9] KHAROSHTHI DIGIT ONE..KHAROSHTHI FRACTION ONE HALF
10A50..10A58;N   # Po     [9] KHAROSHTHI PUNCTUATION DOT..KHAROSHTHI PUNCTUATION LINES
10A60..10A7C;N   # Lo    [29] OLD SOUTH ARABIAN LETTER HE..OLD SOUTH ARABIAN LETTER THETH
10A7D..10A7E;N   # No     [2] OLD SOUTH ARABIAN NUMBER ONE..OLD SOUTH ARABIAN NUMBER FIFTY
10A7F;N          # Po         OLD SOUTH ARABIAN NUMERIC INDICATOR
10A80..10A9C;N   # Lo    [29] OLD NORTH ARABIAN LETTER HEH..OLD NORTH ARABIAN LETTER ZAH
10A9D..10A9F;N   # No     [3] OLD NORTH ARABIAN NUMBER ONE..OLD NORTH ARABIAN NUMBER TWENTY
10AC0..10AC7;N   # Lo     [8] MANICHAEAN LETTER ALEPH..MANICHAEAN LETTER WAW
10AC8;N          # So         MANICHAEAN SIGN UD
10AC9..10AE4;N   # Lo    [28] MANICHAEAN LETTER ZAYIN..MANICHAEAN LETTER TAW
10AE5..10AE6;N   # Mn     [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW
10AEB..10AEF;N   # No     [5] MANICHAEAN NUMBER ONE..MANICHAEAN NUMBER ONE HUNDRED
10AF0..10AF6;N   # Po     [7] MANICHAEAN PUNCTUATION STAR..MANICHAEAN PUNCTUATION LINE FILLER
10B00..10B35;N   # Lo    [54] AVESTAN LETTER A..AVESTAN LETTER HE
10B39..10B3F;N   # Po     [7] AVESTAN ABBREVIATION MARK..LARGE ONE RING OVER TWO RINGS PUNCTUATION
10B40..10B55;N   # Lo    [22] INSCRIPTIONAL PARTHIAN LETTER ALEPH..INSCRIPTIONAL PARTHIAN LETTER TAW
10B58..10B5F;N   # No     [8] INSCRIPTIONAL PARTHIAN NUMBER ONE..INSCRIPTIONAL PARTHIAN NUMBER ONE THOUSAND
10B60..10B72;N   # Lo    [19] INSCRIPTIONAL PAHLAVI LETTER ALEPH..INSCRIPTIONAL PAHLAVI LETTER TAW
10B78..10B7F;N   # No     [8] INSCRIPTIONAL PAHLAVI NUMBER ONE..INSCRIPTIONAL PAHLAVI NUMBER ONE THOUSAND
10B80..10B91;N   # Lo    [18] PSALTER PAHLAVI LETTER ALEPH..PSALTER PAHLAVI LETTER TAW
10B99..10B9C;N   # Po     [4] PSALTER PAHLAVI SECTION MARK..PSALTER PAHLAVI FOUR DOTS WITH DOT
10BA9..10BAF;N   # No     [7] PSALTER PAHLAVI NUMBER ONE..PSALTER PAHLAVI NUMBER ONE HUNDRED
10C00..10C48;N   # Lo    [73] OLD TURKIC LETTER ORKHON A..OLD TURKIC LETTER ORKHON BASH
10C80..10CB2;N   # Lu    [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US
10CC0..10CF2;N   # Ll    [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US
10CFA..10CFF;N   # No     [6] OLD HUNGARIAN NUMBER ONE..OLD HUNGARIAN NUMBER ONE THOUSAND
10D00..10D23;N   # Lo    [36] HANIFI ROHINGYA LETTER A..HANIFI ROHINGYA MARK NA KHONNA
10D24..10D27;N   # Mn     [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI
10D30..10D39;N   # Nd    [10] HANIFI ROHINGYA DIGIT ZERO..HANIFI ROHINGYA DIGIT NINE
10E60..10E7E;N   # No    [31] RUMI DIGIT ONE..RUMI FRACTION TWO THIRDS
10F00..10F1C;N   # Lo    [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL
10F1D..10F26;N   # No    [10] OLD SOGDIAN NUMBER ONE..OLD SOGDIAN FRACTION ONE HALF
10F27;N          # Lo         OLD SOGDIAN LIGATURE AYIN-DALETH
10F30..10F45;N   # Lo    [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN
10F46..10F50;N   # Mn    [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW
10F51..10F54;N   # No     [4] SOGDIAN NUMBER ONE..SOGDIAN NUMBER ONE HUNDRED
10F55..10F59;N   # Po     [5] SOGDIAN PUNCTUATION TWO VERTICAL BARS..SOGDIAN PUNCTUATION HALF CIRCLE WITH DOT
11000;N          # Mc         BRAHMI SIGN CANDRABINDU
11001;N          # Mn         BRAHMI SIGN ANUSVARA
11002;N          # Mc         BRAHMI SIGN VISARGA
11003..11037;N   # Lo    [53] BRAHMI SIGN JIHVAMULIYA..BRAHMI LETTER OLD TAMIL NNNA
11038..11046;N   # Mn    [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA
11047..1104D;N   # Po     [7] BRAHMI DANDA..BRAHMI PUNCTUATION LOTUS
11052..11065;N   # No    [20] BRAHMI NUMBER ONE..BRAHMI NUMBER ONE THOUSAND
11066..1106F;N   # Nd    [10] BRAHMI DIGIT ZERO..BRAHMI DIGIT NINE
1107F;N          # Mn         BRAHMI NUMBER JOINER
11080..11081;N   # Mn     [2] KAITHI SIGN CANDRABINDU..KAITHI SIGN ANUSVARA
11082;N          # Mc         KAITHI SIGN VISARGA
11083..110AF;N   # Lo    [45] KAITHI LETTER A..KAITHI LETTER HA
110B0..110B2;N   # Mc     [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II
110B3..110B6;N   # Mn     [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI
110B7..110B8;N   # Mc     [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU
110B9..110BA;N   # Mn     [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA
110BB..110BC;N   # Po     [2] KAITHI ABBREVIATION SIGN..KAITHI ENUMERATION SIGN
110BD;N          # Cf         KAITHI NUMBER SIGN
110BE..110C1;N   # Po     [4] KAITHI SECTION MARK..KAITHI DOUBLE DANDA
110CD;N          # Cf         KAITHI NUMBER SIGN ABOVE
110D0..110E8;N   # Lo    [25] SORA SOMPENG LETTER SAH..SORA SOMPENG LETTER MAE
110F0..110F9;N   # Nd    [10] SORA SOMPENG DIGIT ZERO..SORA SOMPENG DIGIT NINE
11100..11102;N   # Mn     [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA
11103..11126;N   # Lo    [36] CHAKMA LETTER AA..CHAKMA LETTER HAA
11127..1112B;N   # Mn     [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU
1112C;N          # Mc         CHAKMA VOWEL SIGN E
1112D..11134;N   # Mn     [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA
11136..1113F;N   # Nd    [10] CHAKMA DIGIT ZERO..CHAKMA DIGIT NINE
11140..11143;N   # Po     [4] CHAKMA SECTION MARK..CHAKMA QUESTION MARK
11144;N          # Lo         CHAKMA LETTER LHAA
11145..11146;N   # Mc     [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI
11150..11172;N   # Lo    [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA
11173;N          # Mn         MAHAJANI SIGN NUKTA
11174..11175;N   # Po     [2] MAHAJANI ABBREVIATION SIGN..MAHAJANI SECTION MARK
11176;N          # Lo         MAHAJANI LIGATURE SHRI
11180..11181;N   # Mn     [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA
11182;N          # Mc         SHARADA SIGN VISARGA
11183..111B2;N   # Lo    [48] SHARADA LETTER A..SHARADA LETTER HA
111B3..111B5;N   # Mc     [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II
111B6..111BE;N   # Mn     [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O
111BF..111C0;N   # Mc     [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA
111C1..111C4;N   # Lo     [4] SHARADA SIGN AVAGRAHA..SHARADA OM
111C5..111C8;N   # Po     [4] SHARADA DANDA..SHARADA SEPARATOR
111C9..111CC;N   # Mn     [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK
111CD;N          # Po         SHARADA SUTRA MARK
111D0..111D9;N   # Nd    [10] SHARADA DIGIT ZERO..SHARADA DIGIT NINE
111DA;N          # Lo         SHARADA EKAM
111DB;N          # Po         SHARADA SIGN SIDDHAM
111DC;N          # Lo         SHARADA HEADSTROKE
111DD..111DF;N   # Po     [3] SHARADA CONTINUATION SIGN..SHARADA SECTION MARK-2
111E1..111F4;N   # No    [20] SINHALA ARCHAIC DIGIT ONE..SINHALA ARCHAIC NUMBER ONE THOUSAND
11200..11211;N   # Lo    [18] KHOJKI LETTER A..KHOJKI LETTER JJA
11213..1122B;N   # Lo    [25] KHOJKI LETTER NYA..KHOJKI LETTER LLA
1122C..1122E;N   # Mc     [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II
1122F..11231;N   # Mn     [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI
11232..11233;N   # Mc     [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU
11234;N          # Mn         KHOJKI SIGN ANUSVARA
11235;N          # Mc         KHOJKI SIGN VIRAMA
11236..11237;N   # Mn     [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA
11238..1123D;N   # Po     [6] KHOJKI DANDA..KHOJKI ABBREVIATION SIGN
1123E;N          # Mn         KHOJKI SIGN SUKUN
11280..11286;N   # Lo     [7] MULTANI LETTER A..MULTANI LETTER GA
11288;N          # Lo         MULTANI LETTER GHA
1128A..1128D;N   # Lo     [4] MULTANI LETTER CA..MULTANI LETTER JJA
1128F..1129D;N   # Lo    [15] MULTANI LETTER NYA..MULTANI LETTER BA
1129F..112A8;N   # Lo    [10] MULTANI LETTER BHA..MULTANI LETTER RHA
112A9;N          # Po         MULTANI SECTION MARK
112B0..112DE;N   # Lo    [47] KHUDAWADI LETTER A..KHUDAWADI LETTER HA
112DF;N          # Mn         KHUDAWADI SIGN ANUSVARA
112E0..112E2;N   # Mc     [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II
112E3..112EA;N   # Mn     [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA
112F0..112F9;N   # Nd    [10] KHUDAWADI DIGIT ZERO..KHUDAWADI DIGIT NINE
11300..11301;N   # Mn     [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU
11302..11303;N   # Mc     [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA
11305..1130C;N   # Lo     [8] GRANTHA LETTER A..GRANTHA LETTER VOCALIC L
1130F..11310;N   # Lo     [2] GRANTHA LETTER EE..GRANTHA LETTER AI
11313..11328;N   # Lo    [22] GRANTHA LETTER OO..GRANTHA LETTER NA
1132A..11330;N   # Lo     [7] GRANTHA LETTER PA..GRANTHA LETTER RA
11332..11333;N   # Lo     [2] GRANTHA LETTER LA..GRANTHA LETTER LLA
11335..11339;N   # Lo     [5] GRANTHA LETTER VA..GRANTHA LETTER HA
1133B..1133C;N   # Mn     [2] COMBINING BINDU BELOW..GRANTHA SIGN NUKTA
1133D;N          # Lo         GRANTHA SIGN AVAGRAHA
1133E..1133F;N   # Mc     [2] GRANTHA VOWEL SIGN AA..GRANTHA VOWEL SIGN I
11340;N          # Mn         GRANTHA VOWEL SIGN II
11341..11344;N   # Mc     [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR
11347..11348;N   # Mc     [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI
1134B..1134D;N   # Mc     [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA
11350;N          # Lo         GRANTHA OM
11357;N          # Mc         GRANTHA AU LENGTH MARK
1135D..11361;N   # Lo     [5] GRANTHA SIGN PLUTA..GRANTHA LETTER VOCALIC LL
11362..11363;N   # Mc     [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL
11366..1136C;N   # Mn     [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX
11370..11374;N   # Mn     [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA
11400..11434;N   # Lo    [53] NEWA LETTER A..NEWA LETTER HA
11435..11437;N   # Mc     [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II
11438..1143F;N   # Mn     [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI
11440..11441;N   # Mc     [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU
11442..11444;N   # Mn     [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA
11445;N          # Mc         NEWA SIGN VISARGA
11446;N          # Mn         NEWA SIGN NUKTA
11447..1144A;N   # Lo     [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI
1144B..1144F;N   # Po     [5] NEWA DANDA..NEWA ABBREVIATION SIGN
11450..11459;N   # Nd    [10] NEWA DIGIT ZERO..NEWA DIGIT NINE
1145B;N          # Po         NEWA PLACEHOLDER MARK
1145D;N          # Po         NEWA INSERTION SIGN
1145E;N          # Mn         NEWA SANDHI MARK
11480..114AF;N   # Lo    [48] TIRHUTA ANJI..TIRHUTA LETTER HA
114B0..114B2;N   # Mc     [3] TIRHUTA VOWEL SIGN AA..TIRHUTA VOWEL SIGN II
114B3..114B8;N   # Mn     [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL
114B9;N          # Mc         TIRHUTA VOWEL SIGN E
114BA;N          # Mn         TIRHUTA VOWEL SIGN SHORT E
114BB..114BE;N   # Mc     [4] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN AU
114BF..114C0;N   # Mn     [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA
114C1;N          # Mc         TIRHUTA SIGN VISARGA
114C2..114C3;N   # Mn     [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA
114C4..114C5;N   # Lo     [2] TIRHUTA SIGN AVAGRAHA..TIRHUTA GVANG
114C6;N          # Po         TIRHUTA ABBREVIATION SIGN
114C7;N          # Lo         TIRHUTA OM
114D0..114D9;N   # Nd    [10] TIRHUTA DIGIT ZERO..TIRHUTA DIGIT NINE
11580..115AE;N   # Lo    [47] SIDDHAM LETTER A..SIDDHAM LETTER HA
115AF..115B1;N   # Mc     [3] SIDDHAM VOWEL SIGN AA..SIDDHAM VOWEL SIGN II
115B2..115B5;N   # Mn     [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR
115B8..115BB;N   # Mc     [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU
115BC..115BD;N   # Mn     [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA
115BE;N          # Mc         SIDDHAM SIGN VISARGA
115BF..115C0;N   # Mn     [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA
115C1..115D7;N   # Po    [23] SIDDHAM SIGN SIDDHAM..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES
115D8..115DB;N   # Lo     [4] SIDDHAM LETTER THREE-CIRCLE ALTERNATE I..SIDDHAM LETTER ALTERNATE U
115DC..115DD;N   # Mn     [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU
11600..1162F;N   # Lo    [48] MODI LETTER A..MODI LETTER LLA
11630..11632;N   # Mc     [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II
11633..1163A;N   # Mn     [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI
1163B..1163C;N   # Mc     [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU
1163D;N          # Mn         MODI SIGN ANUSVARA
1163E;N          # Mc         MODI SIGN VISARGA
1163F..11640;N   # Mn     [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA
11641..11643;N   # Po     [3] MODI DANDA..MODI ABBREVIATION SIGN
11644;N          # Lo         MODI SIGN HUVA
11650..11659;N   # Nd    [10] MODI DIGIT ZERO..MODI DIGIT NINE
11660..1166C;N   # Po    [13] MONGOLIAN BIRGA WITH ORNAMENT..MONGOLIAN TURNED SWIRL BIRGA WITH DOUBLE ORNAMENT
11680..116AA;N   # Lo    [43] TAKRI LETTER A..TAKRI LETTER RRA
116AB;N          # Mn         TAKRI SIGN ANUSVARA
116AC;N          # Mc         TAKRI SIGN VISARGA
116AD;N          # Mn         TAKRI VOWEL SIGN AA
116AE..116AF;N   # Mc     [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II
116B0..116B5;N   # Mn     [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU
116B6;N          # Mc         TAKRI SIGN VIRAMA
116B7;N          # Mn         TAKRI SIGN NUKTA
116C0..116C9;N   # Nd    [10] TAKRI DIGIT ZERO..TAKRI DIGIT NINE
11700..1171A;N   # Lo    [27] AHOM LETTER KA..AHOM LETTER ALTERNATE BA
1171D..1171F;N   # Mn     [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA
11720..11721;N   # Mc     [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA
11722..11725;N   # Mn     [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU
11726;N          # Mc         AHOM VOWEL SIGN E
11727..1172B;N   # Mn     [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER
11730..11739;N   # Nd    [10] AHOM DIGIT ZERO..AHOM DIGIT NINE
1173A..1173B;N   # No     [2] AHOM NUMBER TEN..AHOM NUMBER TWENTY
1173C..1173E;N   # Po     [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI
1173F;N          # So         AHOM SYMBOL VI
11800..1182B;N   # Lo    [44] DOGRA LETTER A..DOGRA LETTER RRA
1182C..1182E;N   # Mc     [3] DOGRA VOWEL SIGN AA..DOGRA VOWEL SIGN II
1182F..11837;N   # Mn     [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA
11838;N          # Mc         DOGRA SIGN VISARGA
11839..1183A;N   # Mn     [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA
1183B;N          # Po         DOGRA ABBREVIATION SIGN
118A0..118DF;N   # L&    [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO
118E0..118E9;N   # Nd    [10] WARANG CITI DIGIT ZERO..WARANG CITI DIGIT NINE
118EA..118F2;N   # No     [9] WARANG CITI NUMBER TEN..WARANG CITI NUMBER NINETY
118FF;N          # Lo         WARANG CITI OM
11A00;N          # Lo         ZANABAZAR SQUARE LETTER A
11A01..11A0A;N   # Mn    [10] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL LENGTH MARK
11A0B..11A32;N   # Lo    [40] ZANABAZAR SQUARE LETTER KA..ZANABAZAR SQUARE LETTER KSSA
11A33..11A38;N   # Mn     [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA
11A39;N          # Mc         ZANABAZAR SQUARE SIGN VISARGA
11A3A;N          # Lo         ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA
11A3B..11A3E;N   # Mn     [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA
11A3F..11A46;N   # Po     [8] ZANABAZAR SQUARE INITIAL HEAD MARK..ZANABAZAR SQUARE CLOSING DOUBLE-LINED HEAD MARK
11A47;N          # Mn         ZANABAZAR SQUARE SUBJOINER
11A50;N          # Lo         SOYOMBO LETTER A
11A51..11A56;N   # Mn     [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE
11A57..11A58;N   # Mc     [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU
11A59..11A5B;N   # Mn     [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK
11A5C..11A83;N   # Lo    [40] SOYOMBO LETTER KA..SOYOMBO LETTER KSSA
11A86..11A89;N   # Lo     [4] SOYOMBO CLUSTER-INITIAL LETTER RA..SOYOMBO CLUSTER-INITIAL LETTER SA
11A8A..11A96;N   # Mn    [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA
11A97;N          # Mc         SOYOMBO SIGN VISARGA
11A98..11A99;N   # Mn     [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER
11A9A..11A9C;N   # Po     [3] SOYOMBO MARK TSHEG..SOYOMBO MARK DOUBLE SHAD
11A9D;N          # Lo         SOYOMBO MARK PLUTA
11A9E..11AA2;N   # Po     [5] SOYOMBO HEAD MARK WITH MOON AND SUN AND TRIPLE FLAME..SOYOMBO TERMINAL MARK-2
11AC0..11AF8;N   # Lo    [57] PAU CIN HAU LETTER PA..PAU CIN HAU GLOTTAL STOP FINAL
11C00..11C08;N   # Lo     [9] BHAIKSUKI LETTER A..BHAIKSUKI LETTER VOCALIC L
11C0A..11C2E;N   # Lo    [37] BHAIKSUKI LETTER E..BHAIKSUKI LETTER HA
11C2F;N          # Mc         BHAIKSUKI VOWEL SIGN AA
11C30..11C36;N   # Mn     [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L
11C38..11C3D;N   # Mn     [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA
11C3E;N          # Mc         BHAIKSUKI SIGN VISARGA
11C3F;N          # Mn         BHAIKSUKI SIGN VIRAMA
11C40;N          # Lo         BHAIKSUKI SIGN AVAGRAHA
11C41..11C45;N   # Po     [5] BHAIKSUKI DANDA..BHAIKSUKI GAP FILLER-2
11C50..11C59;N   # Nd    [10] BHAIKSUKI DIGIT ZERO..BHAIKSUKI DIGIT NINE
11C5A..11C6C;N   # No    [19] BHAIKSUKI NUMBER ONE..BHAIKSUKI HUNDREDS UNIT MARK
11C70..11C71;N   # Po     [2] MARCHEN HEAD MARK..MARCHEN MARK SHAD
11C72..11C8F;N   # Lo    [30] MARCHEN LETTER KA..MARCHEN LETTER A
11C92..11CA7;N   # Mn    [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA
11CA9;N          # Mc         MARCHEN SUBJOINED LETTER YA
11CAA..11CB0;N   # Mn     [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA
11CB1;N          # Mc         MARCHEN VOWEL SIGN I
11CB2..11CB3;N   # Mn     [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E
11CB4;N          # Mc         MARCHEN VOWEL SIGN O
11CB5..11CB6;N   # Mn     [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU
11D00..11D06;N   # Lo     [7] MASARAM GONDI LETTER A..MASARAM GONDI LETTER E
11D08..11D09;N   # Lo     [2] MASARAM GONDI LETTER AI..MASARAM GONDI LETTER O
11D0B..11D30;N   # Lo    [38] MASARAM GONDI LETTER AU..MASARAM GONDI LETTER TRA
11D31..11D36;N   # Mn     [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R
11D3A;N          # Mn         MASARAM GONDI VOWEL SIGN E
11D3C..11D3D;N   # Mn     [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O
11D3F..11D45;N   # Mn     [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA
11D46;N          # Lo         MASARAM GONDI REPHA
11D47;N          # Mn         MASARAM GONDI RA-KARA
11D50..11D59;N   # Nd    [10] MASARAM GONDI DIGIT ZERO..MASARAM GONDI DIGIT NINE
11D60..11D65;N   # Lo     [6] GUNJALA GONDI LETTER A..GUNJALA GONDI LETTER UU
11D67..11D68;N   # Lo     [2] GUNJALA GONDI LETTER EE..GUNJALA GONDI LETTER AI
11D6A..11D89;N   # Lo    [32] GUNJALA GONDI LETTER OO..GUNJALA GONDI LETTER SA
11D8A..11D8E;N   # Mc     [5] GUNJALA GONDI VOWEL SIGN AA..GUNJALA GONDI VOWEL SIGN UU
11D90..11D91;N   # Mn     [2] GUNJALA GONDI VOWEL SIGN EE..GUNJALA GONDI VOWEL SIGN AI
11D93..11D94;N   # Mc     [2] GUNJALA GONDI VOWEL SIGN OO..GUNJALA GONDI VOWEL SIGN AU
11D95;N          # Mn         GUNJALA GONDI SIGN ANUSVARA
11D96;N          # Mc         GUNJALA GONDI SIGN VISARGA
11D97;N          # Mn         GUNJALA GONDI VIRAMA
11D98;N          # Lo         GUNJALA GONDI OM
11DA0..11DA9;N   # Nd    [10] GUNJALA GONDI DIGIT ZERO..GUNJALA GONDI DIGIT NINE
11EE0..11EF2;N   # Lo    [19] MAKASAR LETTER KA..MAKASAR ANGKA
11EF3..11EF4;N   # Mn     [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U
11EF5..11EF6;N   # Mc     [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O
11EF7..11EF8;N   # Po     [2] MAKASAR PASSIMBANG..MAKASAR END OF SECTION
12000..12399;N   # Lo   [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U
12400..1246E;N   # Nl   [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM
12470..12474;N   # Po     [5] CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER..CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON
12480..12543;N   # Lo   [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU
13000..1342E;N   # Lo  [1071] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH AA032
14400..14646;N   # Lo   [583] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530
16800..16A38;N   # Lo   [569] BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ
16A40..16A5E;N   # Lo    [31] MRO LETTER TA..MRO LETTER TEK
16A60..16A69;N   # Nd    [10] MRO DIGIT ZERO..MRO DIGIT NINE
16A6E..16A6F;N   # Po     [2] MRO DANDA..MRO DOUBLE DANDA
16AD0..16AED;N   # Lo    [30] BASSA VAH LETTER ENNI..BASSA VAH LETTER I
16AF0..16AF4;N   # Mn     [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE
16AF5;N          # Po         BASSA VAH FULL STOP
16B00..16B2F;N   # Lo    [48] PAHAWH HMONG VOWEL KEEB..PAHAWH HMONG CONSONANT CAU
16B30..16B36;N   # Mn     [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM
16B37..16B3B;N   # Po     [5] PAHAWH HMONG SIGN VOS THOM..PAHAWH HMONG SIGN VOS FEEM
16B3C..16B3F;N   # So     [4] PAHAWH HMONG SIGN XYEEM NTXIV..PAHAWH HMONG SIGN XYEEM FAIB
16B40..16B43;N   # Lm     [4] PAHAWH HMONG SIGN VOS SEEV..PAHAWH HMONG SIGN IB YAM
16B44;N          # Po         PAHAWH HMONG SIGN XAUS
16B45;N          # So         PAHAWH HMONG SIGN CIM TSOV ROG
16B50..16B59;N   # Nd    [10] PAHAWH HMONG DIGIT ZERO..PAHAWH HMONG DIGIT NINE
16B5B..16B61;N   # No     [7] PAHAWH HMONG NUMBER TENS..PAHAWH HMONG NUMBER TRILLIONS
16B63..16B77;N   # Lo    [21] PAHAWH HMONG SIGN VOS LUB..PAHAWH HMONG SIGN CIM NRES TOS
16B7D..16B8F;N   # Lo    [19] PAHAWH HMONG CLAN SIGN TSHEEJ..PAHAWH HMONG CLAN SIGN VWJ
16E40..16E7F;N   # L&    [64] MEDEFAIDRIN CAPITAL LETTER M..MEDEFAIDRIN SMALL LETTER Y
16E80..16E96;N   # No    [23] MEDEFAIDRIN DIGIT ZERO..MEDEFAIDRIN DIGIT THREE ALTERNATE FORM
16E97..16E9A;N   # Po     [4] MEDEFAIDRIN COMMA..MEDEFAIDRIN EXCLAMATION OH
16F00..16F44;N   # Lo    [69] MIAO LETTER PA..MIAO LETTER HHA
16F50;N          # Lo         MIAO LETTER NASALIZATION
16F51..16F7E;N   # Mc    [46] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN NG
16F8F..16F92;N   # Mn     [4] MIAO TONE RIGHT..MIAO TONE BELOW
16F93..16F9F;N   # Lm    [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8
16FE0..16FE1;W   # Lm     [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK
17000..187F1;W   # Lo  [6130] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F1
18800..18AF2;W   # Lo   [755] TANGUT COMPONENT-001..TANGUT COMPONENT-755
1B000..1B0FF;W   # Lo   [256] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER RE-2
1B100..1B11E;W   # Lo    [31] HENTAIGANA LETTER RE-3..HENTAIGANA LETTER N-MU-MO-2
1B170..1B2FB;W   # Lo   [396] NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB
1BC00..1BC6A;N   # Lo   [107] DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M
1BC70..1BC7C;N   # Lo    [13] DUPLOYAN AFFIX LEFT HORIZONTAL SECANT..DUPLOYAN AFFIX ATTACHED TANGENT HOOK
1BC80..1BC88;N   # Lo     [9] DUPLOYAN AFFIX HIGH ACUTE..DUPLOYAN AFFIX HIGH VERTICAL
1BC90..1BC99;N   # Lo    [10] DUPLOYAN AFFIX LOW ACUTE..DUPLOYAN AFFIX LOW ARROW
1BC9C;N          # So         DUPLOYAN SIGN O WITH CROSS
1BC9D..1BC9E;N   # Mn     [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK
1BC9F;N          # Po         DUPLOYAN PUNCTUATION CHINOOK FULL STOP
1BCA0..1BCA3;N   # Cf     [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP
1D000..1D0F5;N   # So   [246] BYZANTINE MUSICAL SYMBOL PSILI..BYZANTINE MUSICAL SYMBOL GORGON NEO KATO
1D100..1D126;N   # So    [39] MUSICAL SYMBOL SINGLE BARLINE..MUSICAL SYMBOL DRUM CLEF-2
1D129..1D164;N   # So    [60] MUSICAL SYMBOL MULTIPLE MEASURE REST..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE
1D165..1D166;N   # Mc     [2] MUSICAL SYMBOL COMBINING STEM..MUSICAL SYMBOL COMBINING SPRECHGESANG STEM
1D167..1D169;N   # Mn     [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3
1D16A..1D16C;N   # So     [3] MUSICAL SYMBOL FINGERED TREMOLO-1..MUSICAL SYMBOL FINGERED TREMOLO-3
1D16D..1D172;N   # Mc     [6] MUSICAL SYMBOL COMBINING AUGMENTATION DOT..MUSICAL SYMBOL COMBINING FLAG-5
1D173..1D17A;N   # Cf     [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE
1D17B..1D182;N   # Mn     [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE
1D183..1D184;N   # So     [2] MUSICAL SYMBOL ARPEGGIATO UP..MUSICAL SYMBOL ARPEGGIATO DOWN
1D185..1D18B;N   # Mn     [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE
1D18C..1D1A9;N   # So    [30] MUSICAL SYMBOL RINFORZANDO..MUSICAL SYMBOL DEGREE SLASH
1D1AA..1D1AD;N   # Mn     [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO
1D1AE..1D1E8;N   # So    [59] MUSICAL SYMBOL PEDAL MARK..MUSICAL SYMBOL KIEVAN FLAT SIGN
1D200..1D241;N   # So    [66] GREEK VOCAL NOTATION SYMBOL-1..GREEK INSTRUMENTAL NOTATION SYMBOL-54
1D242..1D244;N   # Mn     [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME
1D245;N          # So         GREEK MUSICAL LEIMMA
1D2E0..1D2F3;N   # No    [20] MAYAN NUMERAL ZERO..MAYAN NUMERAL NINETEEN
1D300..1D356;N   # So    [87] MONOGRAM FOR EARTH..TETRAGRAM FOR FOSTERING
1D360..1D378;N   # No    [25] COUNTING ROD UNIT DIGIT ONE..TALLY MARK FIVE
1D400..1D454;N   # L&    [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G
1D456..1D49C;N   # L&    [71] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SCRIPT CAPITAL A
1D49E..1D49F;N   # Lu     [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D
1D4A2;N          # Lu         MATHEMATICAL SCRIPT CAPITAL G
1D4A5..1D4A6;N   # Lu     [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K
1D4A9..1D4AC;N   # Lu     [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q
1D4AE..1D4B9;N   # L&    [12] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT SMALL D
1D4BB;N          # Ll         MATHEMATICAL SCRIPT SMALL F
1D4BD..1D4C3;N   # Ll     [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N
1D4C5..1D505;N   # L&    [65] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FRAKTUR CAPITAL B
1D507..1D50A;N   # Lu     [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G
1D50D..1D514;N   # Lu     [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q
1D516..1D51C;N   # Lu     [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y
1D51E..1D539;N   # L&    [28] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B
1D53B..1D53E;N   # Lu     [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G
1D540..1D544;N   # Lu     [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M
1D546;N          # Lu         MATHEMATICAL DOUBLE-STRUCK CAPITAL O
1D54A..1D550;N   # Lu     [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y
1D552..1D6A5;N   # L&   [340] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J
1D6A8..1D6C0;N   # Lu    [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA
1D6C1;N          # Sm         MATHEMATICAL BOLD NABLA
1D6C2..1D6DA;N   # Ll    [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA
1D6DB;N          # Sm         MATHEMATICAL BOLD PARTIAL DIFFERENTIAL
1D6DC..1D6FA;N   # L&    [31] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL ITALIC CAPITAL OMEGA
1D6FB;N          # Sm         MATHEMATICAL ITALIC NABLA
1D6FC..1D714;N   # Ll    [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA
1D715;N          # Sm         MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL
1D716..1D734;N   # L&    [31] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA
1D735;N          # Sm         MATHEMATICAL BOLD ITALIC NABLA
1D736..1D74E;N   # Ll    [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA
1D74F;N          # Sm         MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL
1D750..1D76E;N   # L&    [31] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA
1D76F;N          # Sm         MATHEMATICAL SANS-SERIF BOLD NABLA
1D770..1D788;N   # Ll    [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA
1D789;N          # Sm         MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL
1D78A..1D7A8;N   # L&    [31] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA
1D7A9;N          # Sm         MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA
1D7AA..1D7C2;N   # Ll    [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA
1D7C3;N          # Sm         MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL
1D7C4..1D7CB;N   # L&     [8] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD SMALL DIGAMMA
1D7CE..1D7FF;N   # Nd    [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE
1D800..1D9FF;N   # So   [512] SIGNWRITING HAND-FIST INDEX..SIGNWRITING HEAD
1DA00..1DA36;N   # Mn    [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN
1DA37..1DA3A;N   # So     [4] SIGNWRITING AIR BLOW SMALL ROTATIONS..SIGNWRITING BREATH EXHALE
1DA3B..1DA6C;N   # Mn    [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT
1DA6D..1DA74;N   # So     [8] SIGNWRITING SHOULDER HIP SPINE..SIGNWRITING TORSO-FLOORPLANE TWISTING
1DA75;N          # Mn         SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS
1DA76..1DA83;N   # So    [14] SIGNWRITING LIMB COMBINATION..SIGNWRITING LOCATION DEPTH
1DA84;N          # Mn         SIGNWRITING LOCATION HEAD NECK
1DA85..1DA86;N   # So     [2] SIGNWRITING LOCATION TORSO..SIGNWRITING LOCATION LIMBS DIGITS
1DA87..1DA8B;N   # Po     [5] SIGNWRITING COMMA..SIGNWRITING PARENTHESIS
1DA9B..1DA9F;N   # Mn     [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6
1DAA1..1DAAF;N   # Mn    [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16
1E000..1E006;N   # Mn     [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE
1E008..1E018;N   # Mn    [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU
1E01B..1E021;N   # Mn     [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI
1E023..1E024;N   # Mn     [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS
1E026..1E02A;N   # Mn     [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA
1E800..1E8C4;N   # Lo   [197] MENDE KIKAKUI SYLLABLE M001 KI..MENDE KIKAKUI SYLLABLE M060 NYON
1E8C7..1E8CF;N   # No     [9] MENDE KIKAKUI DIGIT ONE..MENDE KIKAKUI DIGIT NINE
1E8D0..1E8D6;N   # Mn     [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS
1E900..1E943;N   # L&    [68] ADLAM CAPITAL LETTER ALIF..ADLAM SMALL LETTER SHA
1E944..1E94A;N   # Mn     [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA
1E950..1E959;N   # Nd    [10] ADLAM DIGIT ZERO..ADLAM DIGIT NINE
1E95E..1E95F;N   # Po     [2] ADLAM INITIAL EXCLAMATION MARK..ADLAM INITIAL QUESTION MARK
1EC71..1ECAB;N   # No    [59] INDIC SIYAQ NUMBER ONE..INDIC SIYAQ NUMBER PREFIXED NINE
1ECAC;N          # So         INDIC SIYAQ PLACEHOLDER
1ECAD..1ECAF;N   # No     [3] INDIC SIYAQ FRACTION ONE QUARTER..INDIC SIYAQ FRACTION THREE QUARTERS
1ECB0;N          # Sc         INDIC SIYAQ RUPEE MARK
1ECB1..1ECB4;N   # No     [4] INDIC SIYAQ NUMBER ALTERNATE ONE..INDIC SIYAQ ALTERNATE LAKH MARK
1EE00..1EE03;N   # Lo     [4] ARABIC MATHEMATICAL ALEF..ARABIC MATHEMATICAL DAL
1EE05..1EE1F;N   # Lo    [27] ARABIC MATHEMATICAL WAW..ARABIC MATHEMATICAL DOTLESS QAF
1EE21..1EE22;N   # Lo     [2] ARABIC MATHEMATICAL INITIAL BEH..ARABIC MATHEMATICAL INITIAL JEEM
1EE24;N          # Lo         ARABIC MATHEMATICAL INITIAL HEH
1EE27;N          # Lo         ARABIC MATHEMATICAL INITIAL HAH
1EE29..1EE32;N   # Lo    [10] ARABIC MATHEMATICAL INITIAL YEH..ARABIC MATHEMATICAL INITIAL QAF
1EE34..1EE37;N   # Lo     [4] ARABIC MATHEMATICAL INITIAL SHEEN..ARABIC MATHEMATICAL INITIAL KHAH
1EE39;N          # Lo         ARABIC MATHEMATICAL INITIAL DAD
1EE3B;N          # Lo         ARABIC MATHEMATICAL INITIAL GHAIN
1EE42;N          # Lo         ARABIC MATHEMATICAL TAILED JEEM
1EE47;N          # Lo         ARABIC MATHEMATICAL TAILED HAH
1EE49;N          # Lo         ARABIC MATHEMATICAL TAILED YEH
1EE4B;N          # Lo         ARABIC MATHEMATICAL TAILED LAM
1EE4D..1EE4F;N   # Lo     [3] ARABIC MATHEMATICAL TAILED NOON..ARABIC MATHEMATICAL TAILED AIN
1EE51..1EE52;N   # Lo     [2] ARABIC MATHEMATICAL TAILED SAD..ARABIC MATHEMATICAL TAILED QAF
1EE54;N          # Lo         ARABIC MATHEMATICAL TAILED SHEEN
1EE57;N          # Lo         ARABIC MATHEMATICAL TAILED KHAH
1EE59;N          # Lo         ARABIC MATHEMATICAL TAILED DAD
1EE5B;N          # Lo         ARABIC MATHEMATICAL TAILED GHAIN
1EE5D;N          # Lo         ARABIC MATHEMATICAL TAILED DOTLESS NOON
1EE5F;N          # Lo         ARABIC MATHEMATICAL TAILED DOTLESS QAF
1EE61..1EE62;N   # Lo     [2] ARABIC MATHEMATICAL STRETCHED BEH..ARABIC MATHEMATICAL STRETCHED JEEM
1EE64;N          # Lo         ARABIC MATHEMATICAL STRETCHED HEH
1EE67..1EE6A;N   # Lo     [4] ARABIC MATHEMATICAL STRETCHED HAH..ARABIC MATHEMATICAL STRETCHED KAF
1EE6C..1EE72;N   # Lo     [7] ARABIC MATHEMATICAL STRETCHED MEEM..ARABIC MATHEMATICAL STRETCHED QAF
1EE74..1EE77;N   # Lo     [4] ARABIC MATHEMATICAL STRETCHED SHEEN..ARABIC MATHEMATICAL STRETCHED KHAH
1EE79..1EE7C;N   # Lo     [4] ARABIC MATHEMATICAL STRETCHED DAD..ARABIC MATHEMATICAL STRETCHED DOTLESS BEH
1EE7E;N          # Lo         ARABIC MATHEMATICAL STRETCHED DOTLESS FEH
1EE80..1EE89;N   # Lo    [10] ARABIC MATHEMATICAL LOOPED ALEF..ARABIC MATHEMATICAL LOOPED YEH
1EE8B..1EE9B;N   # Lo    [17] ARABIC MATHEMATICAL LOOPED LAM..ARABIC MATHEMATICAL LOOPED GHAIN
1EEA1..1EEA3;N   # Lo     [3] ARABIC MATHEMATICAL DOUBLE-STRUCK BEH..ARABIC MATHEMATICAL DOUBLE-STRUCK DAL
1EEA5..1EEA9;N   # Lo     [5] ARABIC MATHEMATICAL DOUBLE-STRUCK WAW..ARABIC MATHEMATICAL DOUBLE-STRUCK YEH
1EEAB..1EEBB;N   # Lo    [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN
1EEF0..1EEF1;N   # Sm     [2] ARABIC MATHEMATICAL OPERATOR MEEM WITH HAH WITH TATWEEL..ARABIC MATHEMATICAL OPERATOR HAH WITH DAL
1F000..1F003;N   # So     [4] MAHJONG TILE EAST WIND..MAHJONG TILE NORTH WIND
1F004;W          # So         MAHJONG TILE RED DRAGON
1F005..1F02B;N   # So    [39] MAHJONG TILE GREEN DRAGON..MAHJONG TILE BACK
1F030..1F093;N   # So   [100] DOMINO TILE HORIZONTAL BACK..DOMINO TILE VERTICAL-06-06
1F0A0..1F0AE;N   # So    [15] PLAYING CARD BACK..PLAYING CARD KING OF SPADES
1F0B1..1F0BF;N   # So    [15] PLAYING CARD ACE OF HEARTS..PLAYING CARD RED JOKER
1F0C1..1F0CE;N   # So    [14] PLAYING CARD ACE OF DIAMONDS..PLAYING CARD KING OF DIAMONDS
1F0CF;W          # So         PLAYING CARD BLACK JOKER
1F0D1..1F0F5;N   # So    [37] PLAYING CARD ACE OF CLUBS..PLAYING CARD TRUMP-21
1F100..1F10A;A   # No    [11] DIGIT ZERO FULL STOP..DIGIT NINE COMMA
1F10B..1F10C;N   # No     [2] DINGBAT CIRCLED SANS-SERIF DIGIT ZERO..DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ZERO
1F110..1F12D;A   # So    [30] PARENTHESIZED LATIN CAPITAL LETTER A..CIRCLED CD
1F12E..1F12F;N   # So     [2] CIRCLED WZ..COPYLEFT SYMBOL
1F130..1F169;A   # So    [58] SQUARED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z
1F16A..1F16B;N   # So     [2] RAISED MC SIGN..RAISED MD SIGN
1F170..1F18D;A   # So    [30] NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED SA
1F18E;W          # So         NEGATIVE SQUARED AB
1F18F..1F190;A   # So     [2] NEGATIVE SQUARED WC..SQUARE DJ
1F191..1F19A;W   # So    [10] SQUARED CL..SQUARED VS
1F19B..1F1AC;A   # So    [18] SQUARED THREE D..SQUARED VOD
1F1E6..1F1FF;N   # So    [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z
1F200..1F202;W   # So     [3] SQUARE HIRAGANA HOKA..SQUARED KATAKANA SA
1F210..1F23B;W   # So    [44] SQUARED CJK UNIFIED IDEOGRAPH-624B..SQUARED CJK UNIFIED IDEOGRAPH-914D
1F240..1F248;W   # So     [9] TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-672C..TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557
1F250..1F251;W   # So     [2] CIRCLED IDEOGRAPH ADVANTAGE..CIRCLED IDEOGRAPH ACCEPT
1F260..1F265;W   # So     [6] ROUNDED SYMBOL FOR FU..ROUNDED SYMBOL FOR CAI
1F300..1F320;W   # So    [33] CYCLONE..SHOOTING STAR
1F321..1F32C;N   # So    [12] THERMOMETER..WIND BLOWING FACE
1F32D..1F335;W   # So     [9] HOT DOG..CACTUS
1F336;N          # So         HOT PEPPER
1F337..1F37C;W   # So    [70] TULIP..BABY BOTTLE
1F37D;N          # So         FORK AND KNIFE WITH PLATE
1F37E..1F393;W   # So    [22] BOTTLE WITH POPPING CORK..GRADUATION CAP
1F394..1F39F;N   # So    [12] HEART WITH TIP ON THE LEFT..ADMISSION TICKETS
1F3A0..1F3CA;W   # So    [43] CAROUSEL HORSE..SWIMMER
1F3CB..1F3CE;N   # So     [4] WEIGHT LIFTER..RACING CAR
1F3CF..1F3D3;W   # So     [5] CRICKET BAT AND BALL..TABLE TENNIS PADDLE AND BALL
1F3D4..1F3DF;N   # So    [12] SNOW CAPPED MOUNTAIN..STADIUM
1F3E0..1F3F0;W   # So    [17] HOUSE BUILDING..EUROPEAN CASTLE
1F3F1..1F3F3;N   # So     [3] WHITE PENNANT..WAVING WHITE FLAG
1F3F4;W          # So         WAVING BLACK FLAG
1F3F5..1F3F7;N   # So     [3] ROSETTE..LABEL
1F3F8..1F3FA;W   # So     [3] BADMINTON RACQUET AND SHUTTLECOCK..AMPHORA
1F3FB..1F3FF;W   # Sk     [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6
1F400..1F43E;W   # So    [63] RAT..PAW PRINTS
1F43F;N          # So         CHIPMUNK
1F440;W          # So         EYES
1F441;N          # So         EYE
1F442..1F4FC;W   # So   [187] EAR..VIDEOCASSETTE
1F4FD..1F4FE;N   # So     [2] FILM PROJECTOR..PORTABLE STEREO
1F4FF..1F53D;W   # So    [63] PRAYER BEADS..DOWN-POINTING SMALL RED TRIANGLE
1F53E..1F54A;N   # So    [13] LOWER RIGHT SHADOWED WHITE CIRCLE..DOVE OF PEACE
1F54B..1F54E;W   # So     [4] KAABA..MENORAH WITH NINE BRANCHES
1F54F;N          # So         BOWL OF HYGIEIA
1F550..1F567;W   # So    [24] CLOCK FACE ONE OCLOCK..CLOCK FACE TWELVE-THIRTY
1F568..1F579;N   # So    [18] RIGHT SPEAKER..JOYSTICK
1F57A;W          # So         MAN DANCING
1F57B..1F594;N   # So    [26] LEFT HAND TELEPHONE RECEIVER..REVERSED VICTORY HAND
1F595..1F596;W   # So     [2] REVERSED HAND WITH MIDDLE FINGER EXTENDED..RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS
1F597..1F5A3;N   # So    [13] WHITE DOWN POINTING LEFT HAND INDEX..BLACK DOWN POINTING BACKHAND INDEX
1F5A4;W          # So         BLACK HEART
1F5A5..1F5FA;N   # So    [86] DESKTOP COMPUTER..WORLD MAP
1F5FB..1F5FF;W   # So     [5] MOUNT FUJI..MOYAI
1F600..1F64F;W   # So    [80] GRINNING FACE..PERSON WITH FOLDED HANDS
1F650..1F67F;N   # So    [48] NORTH WEST POINTING LEAF..REVERSE CHECKER BOARD
1F680..1F6C5;W   # So    [70] ROCKET..LEFT LUGGAGE
1F6C6..1F6CB;N   # So     [6] TRIANGLE WITH ROUNDED CORNERS..COUCH AND LAMP
1F6CC;W          # So         SLEEPING ACCOMMODATION
1F6CD..1F6CF;N   # So     [3] SHOPPING BAGS..BED
1F6D0..1F6D2;W   # So     [3] PLACE OF WORSHIP..SHOPPING TROLLEY
1F6D3..1F6D4;N   # So     [2] STUPA..PAGODA
1F6E0..1F6EA;N   # So    [11] HAMMER AND WRENCH..NORTHEAST-POINTING AIRPLANE
1F6EB..1F6EC;W   # So     [2] AIRPLANE DEPARTURE..AIRPLANE ARRIVING
1F6F0..1F6F3;N   # So     [4] SATELLITE..PASSENGER SHIP
1F6F4..1F6F9;W   # So     [6] SCOOTER..SKATEBOARD
1F700..1F773;N   # So   [116] ALCHEMICAL SYMBOL FOR QUINTESSENCE..ALCHEMICAL SYMBOL FOR HALF OUNCE
1F780..1F7D8;N   # So    [89] BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE..NEGATIVE CIRCLED SQUARE
1F800..1F80B;N   # So    [12] LEFTWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD..DOWNWARDS ARROW WITH LARGE TRIANGLE ARROWHEAD
1F810..1F847;N   # So    [56] LEFTWARDS ARROW WITH SMALL EQUILATERAL ARROWHEAD..DOWNWARDS HEAVY ARROW
1F850..1F859;N   # So    [10] LEFTWARDS SANS-SERIF ARROW..UP DOWN SANS-SERIF ARROW
1F860..1F887;N   # So    [40] WIDE-HEADED LEFTWARDS LIGHT BARB ARROW..WIDE-HEADED SOUTH WEST VERY HEAVY BARB ARROW
1F890..1F8AD;N   # So    [30] LEFTWARDS TRIANGLE ARROWHEAD..WHITE ARROW SHAFT WIDTH TWO THIRDS
1F900..1F90B;N   # So    [12] CIRCLED CROSS FORMEE WITH FOUR DOTS..DOWNWARD FACING NOTCHED HOOK WITH DOT
1F910..1F93E;W   # So    [47] ZIPPER-MOUTH FACE..HANDBALL
1F940..1F970;W   # So    [49] WILTED FLOWER..SMILING FACE WITH SMILING EYES AND THREE HEARTS
1F973..1F976;W   # So     [4] FACE WITH PARTY HORN AND PARTY HAT..FREEZING FACE
1F97A;W          # So         FACE WITH PLEADING EYES
1F97C..1F9A2;W   # So    [39] LAB COAT..SWAN
1F9B0..1F9B9;W   # So    [10] EMOJI COMPONENT RED HAIR..SUPERVILLAIN
1F9C0..1F9C2;W   # So     [3] CHEESE WEDGE..SALT SHAKER
1F9D0..1F9FF;W   # So    [48] FACE WITH MONOCLE..NAZAR AMULET
1FA60..1FA6D;N   # So    [14] XIANGQI RED GENERAL..XIANGQI BLACK SOLDIER
20000..2A6D6;W   # Lo [42711] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6D6
2A6D7..2A6FF;W   # Cn    [41] <reserved-2A6D7>..<reserved-2A6FF>
2A700..2B734;W   # Lo  [4149] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734
2B735..2B73F;W   # Cn    [11] <reserved-2B735>..<reserved-2B73F>
2B740..2B81D;W   # Lo   [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D
2B81E..2B81F;W   # Cn     [2] <reserved-2B81E>..<reserved-2B81F>
2B820..2CEA1;W   # Lo  [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1
2CEA2..2CEAF;W   # Cn    [14] <reserved-2CEA2>..<reserved-2CEAF>
2CEB0..2EBE0;W   # Lo  [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0
2EBE1..2F7FF;W   # Cn  [3103] <reserved-2EBE1>..<reserved-2F7FF>
2F800..2FA1D;W   # Lo   [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D
2FA1E..2FA1F;W   # Cn     [2] <reserved-2FA1E>..<reserved-2FA1F>
2FA20..2FFFD;W   # Cn  [1502] <reserved-2FA20>..<reserved-2FFFD>
30000..3FFFD;W   # Cn [65534] <reserved-30000>..<reserved-3FFFD>
E0001;N          # Cf         LANGUAGE TAG
E0020..E007F;N   # Cf    [96] TAG SPACE..CANCEL TAG
E0100..E01EF;A   # Mn   [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256
F0000..FFFFD;A   # Co [65534] <private-use-F0000>..<private-use-FFFFD>
100000..10FFFD;A # Co [65534] <private-use-100000>..<private-use-10FFFD>

# EOF
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/textutil/build/build.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
set srcdir [file dirname [file normalize [file join [pwd] [info script]]]]
set moddir [file dirname $srcdir]

set fout [open [file join $moddir wcswidth.tcl] w]
puts $fout {###
# This file is automatically generated by the build/build.tcl file
# based on information in the following database:
# http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
#
# (This is the 35th edition, thus version 35 for our package)
#
# Author: Sean Woods <yoda@etoyoc.com>
###
package provide textutil::wcswidth 35.1}

set fin [open [file join $srcdir EastAsianWidth.txt] r]
puts $fout "proc ::textutil::wcswidth_type char \{"
set hash #
while {[gets $fin line]>=0} {
  set commentidx [string first $hash $line]
  if {$commentidx==0} continue
  set data [string trim [string range $line 0 [expr $commentidx-1]]]
  set comment [string range $line [expr {$commentidx+1}] end]
  if {[scan $line {%6x..%6x;%1s} start end code]==3} {
  } elseif {[scan $line {%5x..%5x;%1s} start end code]==3} {
  } elseif {[scan $line {%4x..%4x;%1s} start end code]==3} {
  } elseif {[scan $line  {%5x;%1s} start code]==2} {
    set end $start
  } elseif {[scan $line  {%4x;%1s} start code]==2} {
    set end $start
  } else {
    puts "Ignored line: '$line'"
    continue
  }
  if {$code eq "N"} continue
  dict set map %start% $start
  dict set map %end% $end
  dict set map %code% $code
  dict set map %comment% [string trim $comment]
  #puts $fout "  $hash $comment"
  if {$start eq $end} {
    puts $fout [string map $map {  if {$char == %start%} { return %code% }}]
  } else {
    puts $fout [string map $map {  if {$char >= %start% && $char <= %end% } { return %code% }}]
  }
}
puts $fout {  return N}
puts $fout "\}"

seek $fin 0
puts $fout "proc ::textutil::wcswidth_char char \{"
while {[gets $fin line]>=0} {
  set commentidx [string first $hash $line]
  if {$commentidx==0} continue
  set data [string trim [string range $line 0 [expr $commentidx-1]]]
  set comment [string range $line [expr {$commentidx+1}] end]
  if {[scan $line {%6x..%6x;%1s} start end code]==3} {
  } elseif {[scan $line {%5x..%5x;%1s} start end code]==3} {
  } elseif {[scan $line {%4x..%4x;%1s} start end code]==3} {
  } elseif {[scan $line  {%5x;%1s} start code]==2} {
    set end $start
  } elseif {[scan $line  {%4x;%1s} start code]==2} {
    set end $start
  } else {
    puts "Ignored line: '$line'"
    continue
  }
  dict set map %start% $start
  dict set map %end% $end
  dict set map %width% 1

  ###
  # Per the unicode recommendations:
  # http://www.unicode.org/reports/tr11/
  #
  #When processing or displaying data:
  #
  # * Wide characters behave like ideographs in important ways, such as layout. Except for
  #   certain punctuation characters, they are not rotated when appearing in vertical text
  #   runs. In fixed-pitch fonts, they take up one Em of space.
  # * Halfwidth characters behave like ideographs in some ways, however, they are rotated
  #   like narrow characters when appearing in vertical text runs. In fixed-pitch fonts,
  #   they take up 1/2 Em of space.
  # * Narrow characters behave like Western characters, for example, in line breaking.
  #   They are rotated sideways, when appearing in vertical text. In fixed-pitch East
  #   Asian fonts, they take up 1/2 Em of space, but in rendering, a non-East Asian,
  #   proportional font is often substituted.
  # * Ambiguous characters behave like wide or narrow characters depending on the context
  #   (language tag, script identification, associated font, source of data, or explicit
  #   markup; all can provide the context). If the context cannot be established reliably,
  #   they should be treated as narrow characters by default.
  # * [UTS51] emoji presentation sequences behave as though they were East Asian Wide,
  #   regardless of their assigned East_Asian_Width property value. (Not implemented here)
  ###
  switch $code {
    W -
    F {
      dict set map %width% 2
    }
    A -
    N -
    Na -
    H {
      continue
    }
  }
  dict set map %code% $code
  dict set map %comment% [string trim $comment]
  #puts $fout "  # $comment"
  if {$start eq $end} {
    puts $fout [string map $map {  if {$char == %start%} { return %width% }}]
  } else {
    puts $fout [string map $map {  if {$char >= %start% && $char <= %end% } { return %width% }}]
  }
}
puts $fout {  return 1}
puts $fout "\}"
puts $fout {
proc ::textutil::wcswidth {string} {
  set width 0
  set len [string length $string]
  foreach c [split $string {}] {
    scan $c %c char
    set n [::textutil::wcswidth_char $char]
    if {$n < 0} {
      return -1
    }
    incr width $n
  }
  return $width
}
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































Changes to modules/textutil/expander.man.

503
504
505
506
507
508
509
510
511

[section HISTORY]

[cmd expander] was written by William H. Duquette; it is a repackaging
of the central algorithm of the expand macro processing tool.

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

503
504
505
506
507
508
509
510
511

[section HISTORY]

[cmd expander] was written by William H. Duquette; it is a repackaging
of the central algorithm of the expand macro processing tool.

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/textutil/expander.test.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

testing {
    useLocal expander.tcl textutil::expander
}

#---------------------------------------------------------------------







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

testing {
    useLocal expander.tcl textutil::expander
}

#---------------------------------------------------------------------

Deleted modules/textutil/patch.man.

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
[vset VERSION 0.1]
[manpage_begin textutil::patch n [vset VERSION]]
[keywords {diff, unified format} {unified format diff} patch {diff -ruN} git fossil]
[moddesc   {Text and string utilities}]
[titledesc {Application of uni-diff patches to directory trees}]
[category  {Text processing}]
[require Tcl 8.2]
[require textutil::patch [opt [vset VERSION]]]
[description]

This package provides a single command which applies a patch in
[uri \
	https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html \
	{unified format}]
to a directory tree.

[list_begin definitions]

[call [cmd ::textutil::patch::apply] [arg basedirectory] \
	[arg striplevel] [arg patch] [arg reportcmd]]

Applies the [arg patch] (text of the path, not file) to the files in
the [arg basedirectory] using the specified [arg striplevel].

The result of the command is the empty string.

[para] The [arg striplevel] argument is equivalent to option
[option -p] of the [syscmd patch] command.

[para] Errors are thrown when the [arg patch] does not parse, and
nothing is done to the files in [arg basedirectory].

[para] All activities during the application of the patch, including
the inability to apply a hunk are reported through the command prefix
[arg reportcmd] instead. Files with problems are left unchanged.  Note
however that this does [strong {not prevent}] changes to files with no
problems, before and after the problematic file(s).

[para] The command prefix is called in 3 possible forms:

[list_begin definitions]

[call [cmd {{*}reportcmd}] [method apply] [arg filename]]

The caller begins operation on file [arg fname], applying all hunks
collected for said file.

[call [cmd {{*}reportcmd}] [method fail] [arg filename] [arg hunk] [arg expected] [arg seen]]

Application of hunk number [arg hunk] of file [arg filename] has failed.
The command expected to find the text [arg expected], and saw [arg seen] instead.

[call [cmd {{*}reportcmd}] [method fail-already] [arg filename] [arg hunk]]

Application of hunk number [arg hunk] of file [arg filename] has failed.
The command believes that this hunk has already been applied to the file.

[list_end]
[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































Deleted modules/textutil/patch.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# patch.tcl --
#
#	Application of a diff -ruN patch to a directory tree.
#
# Copyright (c) 2019 Christian Gollwitzer <auriocus@gmx.de>
# with tweaks by Andreas Kupries
# - Factored patch parsing into a helper
# - Replaced `puts` with report callback.

package require Tcl 8.5
package provide textutil::patch 0.1

# # ## ### ##### ######## ############# #####################

namespace eval ::textutil::patch {
    namespace export apply
    namespace ensemble create
}

# # ## ### ##### ######## ############# #####################

proc ::textutil::patch::apply {dir striplevel patch reportcmd} {
    set patchdict [Parse $dir $striplevel $patch]

    # Apply, now that we have parsed the patch.
    dict for {fn hunks} $patchdict {
	Report apply $fn
	if {[catch {open $fn} fd]} {
	    set orig {}
	} else {
	    set orig [split [read $fd] \n]
	}
	close $fd

	set patched $orig

	set fail false
	set already_applied false
	set hunknr 1
	foreach hunk $hunks {
	    dict with hunk {
		set oldend [expr {$oldstart+[llength $oldcode]-1}]
		set newend [expr {$newstart+[llength $newcode]-1}]
		# check if the hunk matches
		set origcode [lrange $orig $oldstart $oldend]
		if {$origcode ne $oldcode} {
		    set fail true
		    # check if the patch is already applied
		    set origcode_applied [lrange $orig $newstart $newend]
		    if {$origcode_applied eq $newcode} {
			set already_applied true
			Report fail-already $fn $hunknr
		    } else {
			Report fail $fn $hunknr $oldcode $origcode
		    }
		    break
		}
		# apply patch
		set patched [list \
				 {*}[lrange $patched 0 $newstart-1] \
				 {*}$newcode \
				 {*}[lrange $orig $oldend+1 end]]
	    }
	    incr hunknr
	}

	if {!$fail} {
	    # success - write the result back
	    set fd [open $fn w]
	    puts -nonewline $fd [join $patched \n]
	    close $fd
	}
    }

    return
}

# # ## ### ##### ######## ############# #####################

proc ::textutil::patch::Report {args} {
    upvar 1 reportcmd reportcmd
    uplevel #0 [list {*}$reportcmd {*}$args]
    ##
    # apply        $fname
    # fail-already $fname $hunkno
    # fail         $fname $hunkno $expected $seen
    ##
}

proc ::textutil::patch::Parse {dir striplevel patch} {
    set patchlines [split $patch \n]
    set inhunk false
    set oldcode {}
    set newcode {}
    set n [llength $patchlines]

    set patchdict {}
    for {set lineidx 0} {$lineidx < $n} {incr lineidx} {
	set line [lindex $patchlines $lineidx]
	if {[string match ---* $line]} {
	    # a diff block starts. Current line should be
	    # --- oldfile date time TZ
	    # Next line should be
	    # +++ newfile date time TZ
	    set in $line
	    incr lineidx
	    set out [lindex $patchlines $lineidx]

	    if {![string match ---* $in] || ![string match +++* $out]} {
		#puts $in
		#puts $out
		return -code error "Patch not in unified diff format, line $lineidx $in $out"
	    }

	    # the quoting is compatible with list
	    lassign $in  -> oldfile
	    lassign $out -> newfile

	    set fntopatch [file join $dir {*}[lrange [file split $oldfile] $striplevel end]]
	    set inhunk false
	    #puts "Found diffline for $fntopatch"
	    continue
	}

	# state machine for parsing the hunks
	set typechar [string index $line 0]
	set codeline [string range $line 1 end]
	switch $typechar {
	    @ {
		if {![regexp {@@\s+\-(\d+),(\d+)\s+\+(\d+),(\d+)\s+@@} $line \
			  -> oldstart oldlen newstart newlen]} {
		    return code -error "Erroneous hunk in line $lindeidx, $line"
		}
		# adjust line numbers for 0-based indexing
		incr oldstart -1
		incr newstart -1
		#puts "New hunk"
		set newcode {}
		set oldcode {}
		set inhunk true
	    }
	    - { # line only in old code
		if {$inhunk} {
		    lappend oldcode $codeline
		}
	    }
	    + { # line only in new code
		if {$inhunk} {
		    lappend newcode $codeline
		}
	    }
	    " " { # common line
		if {$inhunk} {
		    lappend oldcode $codeline
		    lappend newcode $codeline
		}
	    }
	    default {
		# puts "Junk: $codeline";
		continue
	    }
	}
	# test if the hunk is complete
	if {[llength $oldcode]==$oldlen && [llength $newcode]==$newlen} {
	    set hunk [dict create \
			  oldcode $oldcode \
			  newcode $newcode \
			  oldstart $oldstart \
			  newstart $newstart]
	    #puts "hunk complete: $hunk"
	    set inhunk false
	    dict lappend patchdict $fntopatch $hunk
	}
    }

    return $patchdict
}

# # ## ### ##### ######## ############# #####################
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































Deleted modules/textutil/patch.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# -*- tcl -*-
# patch.test:  tests for application of `diff -ruN` patches.

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2

testing {
    useLocal patch.tcl textutil::patch
}

# -------------------------------------------------------------------------
set m {wrong # args: should be "textutil::patch apply dir striplevel patch reportcmd"}

test textutil-patch-1.0 {wrong args, not enough} -body {
    textutil::patch apply
} -returnCodes error -result $m

test textutil-patch-1.1 {wrong args, not enough} -body {
    textutil::patch apply D
} -returnCodes error -result $m

test textutil-patch-1.2 {wrong args, not enough} -body {
    textutil::patch apply D S
} -returnCodes error -result $m

test textutil-patch-1.3 {wrong args, not enough} -body {
    textutil::patch apply D S P
} -returnCodes error -result $m

test textutil-patch-1.4 {wrong args, too many} -body {
    textutil::patch apply D S P R X
} -returnCodes error -result $m

unset m

# -------------------------------------------------------------------------
## Patch application. All ok.

proc setup-scratch {} {
    # Create a temp directory hierarchy where we can perform patch application.
    # scratch
    # \- pkgIndex.tcl

    file mkdir [asset scratch]
    file copy  [asset pkgIndex.tcl] [asset scratch/pkgIndex.tcl]
    set ::trace {}
    return    
}

proc cleanup-scratch {} {
    # Drop scratch area again.
    unset ::trace
    file delete -force [asset scratch]
    return
}

proc record {args} { lappend ::trace $args }

proc recorded {} {
    lappend ::trace === [tcltest::viewFile [asset scratch/pkgIndex.tcl]]
    join $::trace \n
}

foreach {tool striplevel} {
    diff-ruN    1
    git-diff    2
    fossil-diff 2
} {
    incr k
    test textutil-patch-2.$k "apply $tool" -setup {
	setup-scratch
    } -cleanup {
	cleanup-scratch
    } -body {
	# Apply patch `pkgIndex.tcl.<tool>` to `scratch/pkgIndex.tcl`.
	# The result should match `pkgIndex.tcl.patched`.
	textutil::patch apply \
	    [asset scratch] $striplevel \
	    [asset-get pkgIndex.tcl.$tool] \
	    record
	recorded
    } -result [join \
		   [list \
			[list apply [asset scratch/pkgIndex.tcl]] \
			=== \
			[tcltest::viewFile [asset pkgIndex.tcl.patched]]] \
		   \n]
}
unset k

catch { unset trace }
rename setup-scratch {}
rename cleanup-scratch {}

# -------------------------------------------------------------------------
## Patch application. Trigger the various failures. TODO

# -------------------------------------------------------------------------

testsuiteCleanup
return
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































Changes to modules/textutil/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if {![package vsatisfies [package provide Tcl] 8.2]} {
    # FRINK: nocheck
    return
}
package ifneeded textutil           0.9   [list source [file join $dir textutil.tcl]]
package ifneeded textutil::adjust   0.7.3 [list source [file join $dir adjust.tcl]]
package ifneeded textutil::split    0.8   [list source [file join $dir split.tcl]]
package ifneeded textutil::trim     0.7   [list source [file join $dir trim.tcl]]
package ifneeded textutil::tabify   0.7   [list source [file join $dir tabify.tcl]]
package ifneeded textutil::repeat   0.7   [list source [file join $dir repeat.tcl]]
package ifneeded textutil::string   0.8   [list source [file join $dir string.tcl]]
package ifneeded textutil::expander 1.3.1 [list source [file join $dir expander.tcl]]
package ifneeded textutil::wcswidth 35.1  [list source [file join $dir wcswidth.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} { return }

package ifneeded textutil::patch 0.1 [list source [file join $dir patch.tcl]]




|

|





<
<
<
<
<
1
2
3
4
5
6
7
8
9
10
11
12





if {![package vsatisfies [package provide Tcl] 8.2]} {
    # FRINK: nocheck
    return
}
package ifneeded textutil           0.8   [list source [file join $dir textutil.tcl]]
package ifneeded textutil::adjust   0.7.3 [list source [file join $dir adjust.tcl]]
package ifneeded textutil::split    0.7   [list source [file join $dir split.tcl]]
package ifneeded textutil::trim     0.7   [list source [file join $dir trim.tcl]]
package ifneeded textutil::tabify   0.7   [list source [file join $dir tabify.tcl]]
package ifneeded textutil::repeat   0.7   [list source [file join $dir repeat.tcl]]
package ifneeded textutil::string   0.8   [list source [file join $dir string.tcl]]
package ifneeded textutil::expander 1.3.1 [list source [file join $dir expander.tcl]]





Changes to modules/textutil/repeat.man.

38
39
40
41
42
43
44
45
46
[call [cmd ::textutil::repeat::blank] [arg num]]

A convenience command. Returns a string of [arg num] spaces.

[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

38
39
40
41
42
43
44
45
46
[call [cmd ::textutil::repeat::blank] [arg num]]

A convenience command. Returns a string of [arg num] spaces.

[list_end]

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/textutil/repeat.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

testing {
    useLocal     repeat.tcl   textutil::repeat
}

# -------------------------------------------------------------------------







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

testing {
    useLocal     repeat.tcl   textutil::repeat
}

# -------------------------------------------------------------------------

Changes to modules/textutil/split.tcl.

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
        # Bugfix 476988
        if {[string length $str] == 0} {
            return {}
        }
        if {[string length $regexp] == 0} {
            return [::split $str ""]
        }
	if {[regexp $regexp {}]} {
	    return -code error \
		"splitting on regexp \"$regexp\" would cause infinite loop"
	}

        set list  {}
        set start 0
        while {[regexp -start $start -indices -- $regexp $str match submatch]} {
            foreach {subStart subEnd} $submatch break
            foreach {matchStart matchEnd} $match break
            incr matchStart -1
            incr matchEnd







<
<
<
<
<







58
59
60
61
62
63
64





65
66
67
68
69
70
71
        # Bugfix 476988
        if {[string length $str] == 0} {
            return {}
        }
        if {[string length $regexp] == 0} {
            return [::split $str ""]
        }





        set list  {}
        set start 0
        while {[regexp -start $start -indices -- $regexp $str match submatch]} {
            foreach {subStart subEnd} $submatch break
            foreach {matchStart matchEnd} $match break
            incr matchStart -1
            incr matchEnd
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

        if {[string length $str] == 0} {
            return {}
        }
        if {[string length $regexp] == 0} {
            return [::split $str {}]
        }
	if {[regexp $regexp {}]} {
	    return -code error \
		"splitting on regexp \"$regexp\" would cause infinite loop"
	}

        set list  {}
        while {[regexp -indices -- $regexp $str match submatch]} {
            lappend list [string range $str 0 [expr {[lindex $match 0] -1}]]
            if {[lindex $submatch 0] >= 0} {
                lappend list [string range $str [lindex $submatch 0] \
                                  [lindex $submatch 1]]







<
<
<
<







85
86
87
88
89
90
91




92
93
94
95
96
97
98

        if {[string length $str] == 0} {
            return {}
        }
        if {[string length $regexp] == 0} {
            return [::split $str {}]
        }





        set list  {}
        while {[regexp -indices -- $regexp $str match submatch]} {
            lappend list [string range $str 0 [expr {[lindex $match 0] -1}]]
            if {[lindex $submatch 0] >= 0} {
                lappend list [string range $str [lindex $submatch 0] \
                                  [lindex $submatch 1]]
169
170
171
172
173
174
175
176
namespace eval ::textutil::split {
    namespace export splitx splitn
}

# ### ### ### ######### ######### #########
## Ready

package provide textutil::split 0.8







|
160
161
162
163
164
165
166
167
namespace eval ::textutil::split {
    namespace export splitx splitn
}

# ### ### ### ######### ######### #########
## Ready

package provide textutil::split 0.7

Changes to modules/textutil/split.test.

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

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

testing {
    useLocal     split.tcl    textutil::split
}

# -------------------------------------------------------------------------

test splitn-0.1 {split empty string} {
    ::textutil::split::splitn ""
} [list]

test splitn-0.2 {split empty string with explicit length 1} {
    ::textutil::split::splitn "" 1
} [list]

test splitn-0.3 {split empty string with explicit length 2} {
    ::textutil::split::splitn "" 2
} [list]

test splitn-1.1 {split simple string} {
    ::textutil::split::splitn "abc"
} [list a b c]

test splitn-1.2 {split simple string with explicit length 1} {
    ::textutil::split::splitn "abc" 1
} [list a b c]

test splitn-1.3 {split simple string with explicit length 2} {
    ::textutil::split::splitn "abc" 2
} [list ab c]

test splitn-2.1 {split with nonpositive length ->error!} {
    catch {::textutil::split::splitn "abc" 0} msg
    set msg
} {len must be > 0}

###################################################

test splitx-0.1 {split simple string} {







|












|



|















|







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

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

testing {
    useLocal     split.tcl    textutil::split
}

# -------------------------------------------------------------------------

test splitn-0.1 {split empty string} {
    ::textutil::split::splitn ""
} [list]

test splitn-0.2 {split empty string with explicit lenght 1} {
    ::textutil::split::splitn "" 1
} [list]

test splitn-0.3 {split empty string with explicit lenght 2} {
    ::textutil::split::splitn "" 2
} [list]

test splitn-1.1 {split simple string} {
    ::textutil::split::splitn "abc"
} [list a b c]

test splitn-1.2 {split simple string with explicit length 1} {
    ::textutil::split::splitn "abc" 1
} [list a b c]

test splitn-1.3 {split simple string with explicit length 2} {
    ::textutil::split::splitn "abc" 2
} [list ab c]

test splitn-2.1 {split with nonpositive lenght ->error!} {
    catch {::textutil::split::splitn "abc" 0} msg
    set msg
} {len must be > 0}

###################################################

test splitx-0.1 {split simple string} {
152
153
154
155
156
157
158
159
160
161
162
163
164
165
test splitx-4.2 {splitting of empty strings} {
    ::textutil::split::splitx "" ""
} {}

test splitx-5.0 {splitting using an empty regexp} {
    ::textutil::split::splitx "fooo bar bas" ""
} {f o o o { } b a r { } b a s}


test splitx-6.0 {split with regexp matching "" causes infinite loop eating RAM} {
    list [catch {
	::textutil::split::splitx "Hello, Word" "|"
    } msg] $msg
} {1 {splitting on regexp "|" would cause infinite loop}}







<
<
<
<
<
<
<
152
153
154
155
156
157
158







test splitx-4.2 {splitting of empty strings} {
    ::textutil::split::splitx "" ""
} {}

test splitx-5.0 {splitting using an empty regexp} {
    ::textutil::split::splitx "fooo bar bas" ""
} {f o o o { } b a r { } b a s}







Changes to modules/textutil/tabify.man.

64
65
66
67
68
69
70
71
72

There is one asymmetry though: A tab can be replaced with a single
space, but not the other way around.

[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

64
65
66
67
68
69
70
71
72

There is one asymmetry though: A tab can be replaced with a single
space, but not the other way around.

[list_end]

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/textutil/tabify.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

support {
    useLocal     repeat.tcl   textutil::repeat
}
testing {
    useLocal     tabify.tcl   textutil::tabify







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

support {
    useLocal     repeat.tcl   textutil::repeat
}
testing {
    useLocal     tabify.tcl   textutil::tabify

Deleted modules/textutil/test-assets/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
if {![package vsatisfies [package provide Tcl] 8.2]} {
    # FRINK: nocheck
    return
}
package ifneeded textutil           0.9   [list source [file join $dir textutil.tcl]]
package ifneeded textutil::adjust   0.7.3 [list source [file join $dir adjust.tcl]]
package ifneeded textutil::split    0.8   [list source [file join $dir split.tcl]]
package ifneeded textutil::trim     0.7   [list source [file join $dir trim.tcl]]
package ifneeded textutil::tabify   0.7   [list source [file join $dir tabify.tcl]]
package ifneeded textutil::repeat   0.7   [list source [file join $dir repeat.tcl]]
package ifneeded textutil::string   0.8   [list source [file join $dir string.tcl]]
package ifneeded textutil::expander 1.3.1 [list source [file join $dir expander.tcl]]
package ifneeded textutil::wcswidth 35.0  [list source [file join $dir wcswidth.tcl]]
<
<
<
<
<
<
<
<
<
<
<
<
<


























Deleted modules/textutil/test-assets/pkgIndex.tcl.diff-ruN.

1
2
3
4
5
6
7
8
9
10
11
diff -ruN old/pkgIndex.tcl new/pkgIndex.tcl
--- old/pkgIndex.tcl	2019-06-26 11:42:01.194722156 -0700
+++ new/pkgIndex.tcl	2019-06-26 11:42:43.690791588 -0700
@@ -11,3 +11,7 @@
 package ifneeded textutil::string   0.8   [list source [file join $dir string.tcl]]
 package ifneeded textutil::expander 1.3.1 [list source [file join $dir expander.tcl]]
 package ifneeded textutil::wcswidth 35.0  [list source [file join $dir wcswidth.tcl]]
+
+if {![package vsatisfies [package provide Tcl] 8.5]} { return }
+
+package ifneeded textutil::patch 0.1 [list source [file join $dir patch.tcl]]
<
<
<
<
<
<
<
<
<
<
<






















Deleted modules/textutil/test-assets/pkgIndex.tcl.fossil-diff.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ADDED    modules/textutil/patch.tcl
ADDED    modules/textutil/patch.test
Index: modules/textutil/pkgIndex.tcl
==================================================================
--- modules/textutil/pkgIndex.tcl
+++ modules/textutil/pkgIndex.tcl
@@ -9,5 +9,9 @@
 package ifneeded textutil::tabify   0.7   [list source [file join $dir tabify.tcl]]
 package ifneeded textutil::repeat   0.7   [list source [file join $dir repeat.tcl]]
 package ifneeded textutil::string   0.8   [list source [file join $dir string.tcl]]
 package ifneeded textutil::expander 1.3.1 [list source [file join $dir expander.tcl]]
 package ifneeded textutil::wcswidth 35.0  [list source [file join $dir wcswidth.tcl]]
+
+if {![package vsatisfies [package provide Tcl] 8.5]} { return }
+
+package ifneeded textutil::patch 0.1 [list source [file join $dir patch.tcl]]

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































Deleted modules/textutil/test-assets/pkgIndex.tcl.git-diff.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/old/pkgIndex.tcl b/new/pkgIndex.tcl
index 280f627..88ca6b7 100644
--- a/old/pkgIndex.tcl
+++ b/new/pkgIndex.tcl
@@ -11,3 +11,7 @@ package ifneeded textutil::repeat   0.7   [list source [file join $dir repeat.tc
 package ifneeded textutil::string   0.8   [list source [file join $dir string.tcl]]
 package ifneeded textutil::expander 1.3.1 [list source [file join $dir expander.tcl]]
 package ifneeded textutil::wcswidth 35.0  [list source [file join $dir wcswidth.tcl]]
+
+if {![package vsatisfies [package provide Tcl] 8.5]} { return }
+
+package ifneeded textutil::patch 0.1 [list source [file join $dir patch.tcl]]
<
<
<
<
<
<
<
<
<
<
<
<
























Deleted modules/textutil/test-assets/pkgIndex.tcl.patched.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if {![package vsatisfies [package provide Tcl] 8.2]} {
    # FRINK: nocheck
    return
}
package ifneeded textutil           0.9   [list source [file join $dir textutil.tcl]]
package ifneeded textutil::adjust   0.7.3 [list source [file join $dir adjust.tcl]]
package ifneeded textutil::split    0.8   [list source [file join $dir split.tcl]]
package ifneeded textutil::trim     0.7   [list source [file join $dir trim.tcl]]
package ifneeded textutil::tabify   0.7   [list source [file join $dir tabify.tcl]]
package ifneeded textutil::repeat   0.7   [list source [file join $dir repeat.tcl]]
package ifneeded textutil::string   0.8   [list source [file join $dir string.tcl]]
package ifneeded textutil::expander 1.3.1 [list source [file join $dir expander.tcl]]
package ifneeded textutil::wcswidth 35.0  [list source [file join $dir wcswidth.tcl]]

if {![package vsatisfies [package provide Tcl] 8.5]} { return }

package ifneeded textutil::patch 0.1 [list source [file join $dir patch.tcl]]
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


































Changes to modules/textutil/textutil.man.

380
381
382
383
384
385
386
387
388
If no strings were specified the result is the empty string.  If only
one string was specified, the string itself is returned, as it is its
own longest common prefix.

[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

380
381
382
383
384
385
386
387
388
If no strings were specified the result is the empty string.  If only
one string was specified, the string itself is returned, as it is its
own longest common prefix.

[list_end]

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/textutil/textutil.tcl.

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
# textutil.tcl --
#
#	Utilities for manipulating strings, words, single lines,
#	paragraphs, ...
#
# Copyright (c) 2000      by Ajuba Solutions.
# Copyright (c) 2000      by Eric Melski <ericm@ajubasolutions.com>
# Copyright (c) 2002      by Joe English <jenglish@users.sourceforge.net>
# Copyright (c) 2001-2006 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: textutil.tcl,v 1.17 2006/09/21 06:46:24 andreas_kupries Exp $

# ### ### ### ######### ######### #########
## Requirements

package require Tcl 8.2

namespace eval ::textutil {}

# ### ### ### ######### ######### #########
## API implementation
## All through sub-packages imported here.

package require textutil::string
package require textutil::repeat
package require textutil::adjust
package require textutil::split
package require textutil::tabify
package require textutil::trim
package require textutil::wcswidth

namespace eval ::textutil {
    # Import the miscellaneous string command for public export

    namespace import -force string::chop string::tail
    namespace import -force string::cap string::uncap string::capEachWord
    namespace import -force string::longestCommonPrefix












|



















<







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
# textutil.tcl --
#
#	Utilities for manipulating strings, words, single lines,
#	paragraphs, ...
#
# Copyright (c) 2000      by Ajuba Solutions.
# Copyright (c) 2000      by Eric Melski <ericm@ajubasolutions.com>
# Copyright (c) 2002      by Joe English <jenglish@users.sourceforge.net>
# Copyright (c) 2001-2006 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: textutil.tcl,v 1.17 2006/09/21 06:46:24 andreas_kupries Exp $

# ### ### ### ######### ######### #########
## Requirements

package require Tcl 8.2

namespace eval ::textutil {}

# ### ### ### ######### ######### #########
## API implementation
## All through sub-packages imported here.

package require textutil::string
package require textutil::repeat
package require textutil::adjust
package require textutil::split
package require textutil::tabify
package require textutil::trim


namespace eval ::textutil {
    # Import the miscellaneous string command for public export

    namespace import -force string::chop string::tail
    namespace import -force string::cap string::uncap string::capEachWord
    namespace import -force string::longestCommonPrefix
73
74
75
76
77
78
79
80
    namespace export tabify untabify tabify2 untabify2
}


# ### ### ### ######### ######### #########
## Ready

package provide textutil 0.9







|
72
73
74
75
76
77
78
79
    namespace export tabify untabify tabify2 untabify2
}


# ### ### ### ######### ######### #########
## Ready

package provide textutil 0.8

Changes to modules/textutil/textutil.test.

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

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0

support {
    useLocal     string.tcl   textutil::string
    useLocal     repeat.tcl   textutil::repeat
    useLocal     adjust.tcl   textutil::adjust
    useLocal     split.tcl    textutil::split
    useLocal     tabify.tcl   textutil::tabify
    useLocal     trim.tcl     textutil::trim
    useLocal     trim.tcl     textutil::trim
    useLocal     wcswidth.tcl textutil::wcswidth
}
testing {
    useLocalKeep textutil.tcl textutil
}

# -------------------------------------------------------------------------








|









<
<







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24


25
26
27
28
29
30
31

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

support {
    useLocal     string.tcl   textutil::string
    useLocal     repeat.tcl   textutil::repeat
    useLocal     adjust.tcl   textutil::adjust
    useLocal     split.tcl    textutil::split
    useLocal     tabify.tcl   textutil::tabify
    useLocal     trim.tcl     textutil::trim


}
testing {
    useLocalKeep textutil.tcl textutil
}

# -------------------------------------------------------------------------

159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
    textutil::capEachWord {here comes the sun}
} -result {Here Comes The Sun}

test textutil-7.5 {capEachWord, blocks} -body {
    textutil::capEachWord {here \comes the $sun}
} -result {Here \comes The $sun}

# -------------------------------------------------------------------------

test textutil-8.0 {wcswidth} -body {
   textutil::wcswidth {The Quick Brown Fox}
} -result 19

test textutil-8.1 {wcswidth} -body {
   textutil::wcswidth {é“德經}
} -result 6

test textutil-8.2 {wcswidth} -body {
   textutil::wcswidth {é“德經 of the fox}
} -result 17
# -------------------------------------------------------------------------
testsuiteCleanup
return







<
<
<
<
<
<
<
<
<
<
<
<
<



157
158
159
160
161
162
163













164
165
166
    textutil::capEachWord {here comes the sun}
} -result {Here Comes The Sun}

test textutil-7.5 {capEachWord, blocks} -body {
    textutil::capEachWord {here \comes the $sun}
} -result {Here \comes The $sun}














# -------------------------------------------------------------------------
testsuiteCleanup
return

Changes to modules/textutil/textutil_split.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[vset VERSION 0.8]
[manpage_begin textutil::split n [vset VERSION]]
[see_also regexp(n)]
[see_also split(n)]
[see_also string(n)]
[keywords {regular expression}]
[keywords split]
[keywords string]
[moddesc   {Text and string utilities, macro processing}]
[titledesc {Procedures to split texts}]
[category  {Text processing}]
[require Tcl 8.2]
[require textutil::split [opt [vset VERSION]]]
[description]

The package [package textutil::split] provides commands that split
strings by size and arbitrary regular expressions.

[para]

<
|










|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

[manpage_begin textutil::split n 0.7]
[see_also regexp(n)]
[see_also split(n)]
[see_also string(n)]
[keywords {regular expression}]
[keywords split]
[keywords string]
[moddesc   {Text and string utilities, macro processing}]
[titledesc {Procedures to split texts}]
[category  {Text processing}]
[require Tcl 8.2]
[require textutil::split [opt 0.7]]
[description]

The package [package textutil::split] provides commands that split
strings by size and arbitrary regular expressions.

[para]

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

[call [cmd ::textutil::split::splitx] [arg string] [opt [arg regexp]]]

This command splits the [arg string] and return a list. The string is
split according to the regular expression [arg regexp] instead of a
simple list of chars.

[emph Note]: When parentheses are used in the [arg regexp], i.e. regex
capture groups, then these groups will be added into the result list
as additional elements. If the [arg string] is empty the result is the
empty list, like for [cmd split].

If [arg regexp] is empty the [arg string] is split at every character,
like [cmd split] does.

The regular expression [arg regexp] defaults to "[lb]\\t \\r\\n[rb]+".

[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]







|
|
|
|
<
|
<






|

34
35
36
37
38
39
40
41
42
43
44

45

46
47
48
49
50
51
52
53

[call [cmd ::textutil::split::splitx] [arg string] [opt [arg regexp]]]

This command splits the [arg string] and return a list. The string is
split according to the regular expression [arg regexp] instead of a
simple list of chars.

Note that if you parentheses are added into the [arg regexp], the
parentheses part of separator will be added into the result list as
additional element. If the [arg string] is empty the result is the
empty list, like for [cmd split]. If [arg regexp] is empty the

[arg string] is split at every character, like [cmd split] does.


The regular expression [arg regexp] defaults to "[lb]\\t \\r\\n[rb]+".

[list_end]

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/textutil/textutil_string.man.

65
66
67
68
69
70
71
72
73
If no strings were specified the result is the empty string.  If only
one string was specified, the string itself is returned, as it is its
own longest common prefix.

[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

65
66
67
68
69
70
71
72
73
If no strings were specified the result is the empty string.  If only
one string was specified, the string itself is returned, as it is its
own longest common prefix.

[list_end]

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/textutil/trim.man.

67
68
69
70
71
72
73
74
75
Looks for empty lines (including lines consisting of only whitespace)
at the beginning of the [arg string] and removes it. The modified
string is returned as the result of the command.

[list_end]

[vset CATEGORY textutil]
[include ../common-text/feedback.inc]
[manpage_end]







|

67
68
69
70
71
72
73
74
75
Looks for empty lines (including lines consisting of only whitespace)
at the beginning of the [arg string] and removes it. The modified
string is returned as the result of the command.

[list_end]

[vset CATEGORY textutil]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/textutil/trim.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

testing {
    useLocal     trim.tcl     textutil::trim
}

# -------------------------------------------------------------------------







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.2
testsNeedTcltest 1.0

testing {
    useLocal     trim.tcl     textutil::trim
}

# -------------------------------------------------------------------------

Deleted modules/textutil/wcswidth.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
###
# This file is automatically generated by the build/build.tcl file
# based on information in the following database:
# http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
#
# (This is the 35th edition, thus version 35 for our package)
#
# Author: Sean Woods <yoda@etoyoc.com>
###
package provide textutil::wcswidth 35.1
proc ::textutil::wcswidth_type char {
  if {$char == 161} { return A }
  if {$char == 164} { return A }
  if {$char == 167} { return A }
  if {$char == 168} { return A }
  if {$char == 170} { return A }
  if {$char == 173} { return A }
  if {$char == 174} { return A }
  if {$char == 176} { return A }
  if {$char == 177} { return A }
  if {$char >= 178 && $char <= 179 } { return A }
  if {$char == 180} { return A }
  if {$char >= 182 && $char <= 183 } { return A }
  if {$char == 184} { return A }
  if {$char == 185} { return A }
  if {$char == 186} { return A }
  if {$char >= 188 && $char <= 190 } { return A }
  if {$char == 191} { return A }
  if {$char == 198} { return A }
  if {$char == 208} { return A }
  if {$char == 215} { return A }
  if {$char == 216} { return A }
  if {$char >= 222 && $char <= 225 } { return A }
  if {$char == 230} { return A }
  if {$char >= 232 && $char <= 234 } { return A }
  if {$char >= 236 && $char <= 237 } { return A }
  if {$char == 240} { return A }
  if {$char >= 242 && $char <= 243 } { return A }
  if {$char == 247} { return A }
  if {$char >= 248 && $char <= 250 } { return A }
  if {$char == 252} { return A }
  if {$char == 254} { return A }
  if {$char == 257} { return A }
  if {$char == 273} { return A }
  if {$char == 275} { return A }
  if {$char == 283} { return A }
  if {$char >= 294 && $char <= 295 } { return A }
  if {$char == 299} { return A }
  if {$char >= 305 && $char <= 307 } { return A }
  if {$char == 312} { return A }
  if {$char >= 319 && $char <= 322 } { return A }
  if {$char == 324} { return A }
  if {$char >= 328 && $char <= 331 } { return A }
  if {$char == 333} { return A }
  if {$char >= 338 && $char <= 339 } { return A }
  if {$char >= 358 && $char <= 359 } { return A }
  if {$char == 363} { return A }
  if {$char == 462} { return A }
  if {$char == 464} { return A }
  if {$char == 466} { return A }
  if {$char == 468} { return A }
  if {$char == 470} { return A }
  if {$char == 472} { return A }
  if {$char == 474} { return A }
  if {$char == 476} { return A }
  if {$char == 593} { return A }
  if {$char == 609} { return A }
  if {$char == 708} { return A }
  if {$char == 711} { return A }
  if {$char >= 713 && $char <= 715 } { return A }
  if {$char == 717} { return A }
  if {$char == 720} { return A }
  if {$char >= 728 && $char <= 731 } { return A }
  if {$char == 733} { return A }
  if {$char == 735} { return A }
  if {$char >= 768 && $char <= 879 } { return A }
  if {$char >= 913 && $char <= 929 } { return A }
  if {$char >= 931 && $char <= 937 } { return A }
  if {$char >= 945 && $char <= 961 } { return A }
  if {$char >= 963 && $char <= 969 } { return A }
  if {$char == 1025} { return A }
  if {$char >= 1040 && $char <= 1103 } { return A }
  if {$char == 1105} { return A }
  if {$char >= 4352 && $char <= 4447 } { return W }
  if {$char == 8208} { return A }
  if {$char >= 8211 && $char <= 8213 } { return A }
  if {$char == 8214} { return A }
  if {$char == 8216} { return A }
  if {$char == 8217} { return A }
  if {$char == 8220} { return A }
  if {$char == 8221} { return A }
  if {$char >= 8224 && $char <= 8226 } { return A }
  if {$char >= 8228 && $char <= 8231 } { return A }
  if {$char == 8240} { return A }
  if {$char >= 8242 && $char <= 8243 } { return A }
  if {$char == 8245} { return A }
  if {$char == 8251} { return A }
  if {$char == 8254} { return A }
  if {$char == 8308} { return A }
  if {$char == 8319} { return A }
  if {$char >= 8321 && $char <= 8324 } { return A }
  if {$char == 8361} { return H }
  if {$char == 8364} { return A }
  if {$char == 8451} { return A }
  if {$char == 8453} { return A }
  if {$char == 8457} { return A }
  if {$char == 8467} { return A }
  if {$char == 8470} { return A }
  if {$char >= 8481 && $char <= 8482 } { return A }
  if {$char == 8486} { return A }
  if {$char == 8491} { return A }
  if {$char >= 8531 && $char <= 8532 } { return A }
  if {$char >= 8539 && $char <= 8542 } { return A }
  if {$char >= 8544 && $char <= 8555 } { return A }
  if {$char >= 8560 && $char <= 8569 } { return A }
  if {$char == 8585} { return A }
  if {$char >= 8592 && $char <= 8596 } { return A }
  if {$char >= 8597 && $char <= 8601 } { return A }
  if {$char >= 8632 && $char <= 8633 } { return A }
  if {$char == 8658} { return A }
  if {$char == 8660} { return A }
  if {$char == 8679} { return A }
  if {$char == 8704} { return A }
  if {$char >= 8706 && $char <= 8707 } { return A }
  if {$char >= 8711 && $char <= 8712 } { return A }
  if {$char == 8715} { return A }
  if {$char == 8719} { return A }
  if {$char == 8721} { return A }
  if {$char == 8725} { return A }
  if {$char == 8730} { return A }
  if {$char >= 8733 && $char <= 8736 } { return A }
  if {$char == 8739} { return A }
  if {$char == 8741} { return A }
  if {$char >= 8743 && $char <= 8748 } { return A }
  if {$char == 8750} { return A }
  if {$char >= 8756 && $char <= 8759 } { return A }
  if {$char >= 8764 && $char <= 8765 } { return A }
  if {$char == 8776} { return A }
  if {$char == 8780} { return A }
  if {$char == 8786} { return A }
  if {$char >= 8800 && $char <= 8801 } { return A }
  if {$char >= 8804 && $char <= 8807 } { return A }
  if {$char >= 8810 && $char <= 8811 } { return A }
  if {$char >= 8814 && $char <= 8815 } { return A }
  if {$char >= 8834 && $char <= 8835 } { return A }
  if {$char >= 8838 && $char <= 8839 } { return A }
  if {$char == 8853} { return A }
  if {$char == 8857} { return A }
  if {$char == 8869} { return A }
  if {$char == 8895} { return A }
  if {$char == 8978} { return A }
  if {$char >= 8986 && $char <= 8987 } { return W }
  if {$char == 9001} { return W }
  if {$char == 9002} { return W }
  if {$char >= 9193 && $char <= 9196 } { return W }
  if {$char == 9200} { return W }
  if {$char == 9203} { return W }
  if {$char >= 9312 && $char <= 9371 } { return A }
  if {$char >= 9372 && $char <= 9449 } { return A }
  if {$char >= 9451 && $char <= 9471 } { return A }
  if {$char >= 9472 && $char <= 9547 } { return A }
  if {$char >= 9552 && $char <= 9587 } { return A }
  if {$char >= 9600 && $char <= 9615 } { return A }
  if {$char >= 9618 && $char <= 9621 } { return A }
  if {$char >= 9632 && $char <= 9633 } { return A }
  if {$char >= 9635 && $char <= 9641 } { return A }
  if {$char >= 9650 && $char <= 9651 } { return A }
  if {$char == 9654} { return A }
  if {$char == 9655} { return A }
  if {$char >= 9660 && $char <= 9661 } { return A }
  if {$char == 9664} { return A }
  if {$char == 9665} { return A }
  if {$char >= 9670 && $char <= 9672 } { return A }
  if {$char == 9675} { return A }
  if {$char >= 9678 && $char <= 9681 } { return A }
  if {$char >= 9698 && $char <= 9701 } { return A }
  if {$char == 9711} { return A }
  if {$char >= 9725 && $char <= 9726 } { return W }
  if {$char >= 9733 && $char <= 9734 } { return A }
  if {$char == 9737} { return A }
  if {$char >= 9742 && $char <= 9743 } { return A }
  if {$char >= 9748 && $char <= 9749 } { return W }
  if {$char == 9756} { return A }
  if {$char == 9758} { return A }
  if {$char == 9792} { return A }
  if {$char == 9794} { return A }
  if {$char >= 9800 && $char <= 9811 } { return W }
  if {$char >= 9824 && $char <= 9825 } { return A }
  if {$char >= 9827 && $char <= 9829 } { return A }
  if {$char >= 9831 && $char <= 9834 } { return A }
  if {$char >= 9836 && $char <= 9837 } { return A }
  if {$char == 9839} { return A }
  if {$char == 9855} { return W }
  if {$char == 9875} { return W }
  if {$char >= 9886 && $char <= 9887 } { return A }
  if {$char == 9889} { return W }
  if {$char >= 9898 && $char <= 9899 } { return W }
  if {$char >= 9917 && $char <= 9918 } { return W }
  if {$char == 9919} { return A }
  if {$char >= 9924 && $char <= 9925 } { return W }
  if {$char >= 9926 && $char <= 9933 } { return A }
  if {$char == 9934} { return W }
  if {$char >= 9935 && $char <= 9939 } { return A }
  if {$char == 9940} { return W }
  if {$char >= 9941 && $char <= 9953 } { return A }
  if {$char == 9955} { return A }
  if {$char >= 9960 && $char <= 9961 } { return A }
  if {$char == 9962} { return W }
  if {$char >= 9963 && $char <= 9969 } { return A }
  if {$char >= 9970 && $char <= 9971 } { return W }
  if {$char == 9972} { return A }
  if {$char == 9973} { return W }
  if {$char >= 9974 && $char <= 9977 } { return A }
  if {$char == 9978} { return W }
  if {$char >= 9979 && $char <= 9980 } { return A }
  if {$char == 9981} { return W }
  if {$char >= 9982 && $char <= 9983 } { return A }
  if {$char == 9989} { return W }
  if {$char >= 9994 && $char <= 9995 } { return W }
  if {$char == 10024} { return W }
  if {$char == 10045} { return A }
  if {$char == 10060} { return W }
  if {$char == 10062} { return W }
  if {$char >= 10067 && $char <= 10069 } { return W }
  if {$char == 10071} { return W }
  if {$char >= 10102 && $char <= 10111 } { return A }
  if {$char >= 10133 && $char <= 10135 } { return W }
  if {$char == 10160} { return W }
  if {$char == 10175} { return W }
  if {$char >= 11035 && $char <= 11036 } { return W }
  if {$char == 11088} { return W }
  if {$char == 11093} { return W }
  if {$char >= 11094 && $char <= 11097 } { return A }
  if {$char >= 11904 && $char <= 11929 } { return W }
  if {$char >= 11931 && $char <= 12019 } { return W }
  if {$char >= 12032 && $char <= 12245 } { return W }
  if {$char >= 12272 && $char <= 12283 } { return W }
  if {$char == 12288} { return F }
  if {$char >= 12289 && $char <= 12291 } { return W }
  if {$char == 12292} { return W }
  if {$char == 12293} { return W }
  if {$char == 12294} { return W }
  if {$char == 12295} { return W }
  if {$char == 12296} { return W }
  if {$char == 12297} { return W }
  if {$char == 12298} { return W }
  if {$char == 12299} { return W }
  if {$char == 12300} { return W }
  if {$char == 12301} { return W }
  if {$char == 12302} { return W }
  if {$char == 12303} { return W }
  if {$char == 12304} { return W }
  if {$char == 12305} { return W }
  if {$char >= 12306 && $char <= 12307 } { return W }
  if {$char == 12308} { return W }
  if {$char == 12309} { return W }
  if {$char == 12310} { return W }
  if {$char == 12311} { return W }
  if {$char == 12312} { return W }
  if {$char == 12313} { return W }
  if {$char == 12314} { return W }
  if {$char == 12315} { return W }
  if {$char == 12316} { return W }
  if {$char == 12317} { return W }
  if {$char >= 12318 && $char <= 12319 } { return W }
  if {$char == 12320} { return W }
  if {$char >= 12321 && $char <= 12329 } { return W }
  if {$char >= 12330 && $char <= 12333 } { return W }
  if {$char >= 12334 && $char <= 12335 } { return W }
  if {$char == 12336} { return W }
  if {$char >= 12337 && $char <= 12341 } { return W }
  if {$char >= 12342 && $char <= 12343 } { return W }
  if {$char >= 12344 && $char <= 12346 } { return W }
  if {$char == 12347} { return W }
  if {$char == 12348} { return W }
  if {$char == 12349} { return W }
  if {$char == 12350} { return W }
  if {$char >= 12353 && $char <= 12438 } { return W }
  if {$char >= 12441 && $char <= 12442 } { return W }
  if {$char >= 12443 && $char <= 12444 } { return W }
  if {$char >= 12445 && $char <= 12446 } { return W }
  if {$char == 12447} { return W }
  if {$char == 12448} { return W }
  if {$char >= 12449 && $char <= 12538 } { return W }
  if {$char == 12539} { return W }
  if {$char >= 12540 && $char <= 12542 } { return W }
  if {$char == 12543} { return W }
  if {$char >= 12549 && $char <= 12591 } { return W }
  if {$char >= 12593 && $char <= 12686 } { return W }
  if {$char >= 12688 && $char <= 12689 } { return W }
  if {$char >= 12690 && $char <= 12693 } { return W }
  if {$char >= 12694 && $char <= 12703 } { return W }
  if {$char >= 12704 && $char <= 12730 } { return W }
  if {$char >= 12736 && $char <= 12771 } { return W }
  if {$char >= 12784 && $char <= 12799 } { return W }
  if {$char >= 12800 && $char <= 12830 } { return W }
  if {$char >= 12832 && $char <= 12841 } { return W }
  if {$char >= 12842 && $char <= 12871 } { return W }
  if {$char >= 12872 && $char <= 12879 } { return A }
  if {$char == 12880} { return W }
  if {$char >= 12881 && $char <= 12895 } { return W }
  if {$char >= 12896 && $char <= 12927 } { return W }
  if {$char >= 12928 && $char <= 12937 } { return W }
  if {$char >= 12938 && $char <= 12976 } { return W }
  if {$char >= 12977 && $char <= 12991 } { return W }
  if {$char >= 12992 && $char <= 13054 } { return W }
  if {$char >= 13056 && $char <= 13311 } { return W }
  if {$char >= 13312 && $char <= 19893 } { return W }
  if {$char >= 19894 && $char <= 19903 } { return W }
  if {$char >= 19968 && $char <= 40943 } { return W }
  if {$char >= 40944 && $char <= 40959 } { return W }
  if {$char >= 40960 && $char <= 40980 } { return W }
  if {$char == 40981} { return W }
  if {$char >= 40982 && $char <= 42124 } { return W }
  if {$char >= 42128 && $char <= 42182 } { return W }
  if {$char >= 43360 && $char <= 43388 } { return W }
  if {$char >= 44032 && $char <= 55203 } { return W }
  if {$char >= 57344 && $char <= 63743 } { return A }
  if {$char >= 63744 && $char <= 64109 } { return W }
  if {$char >= 64110 && $char <= 64111 } { return W }
  if {$char >= 64112 && $char <= 64217 } { return W }
  if {$char >= 64218 && $char <= 64255 } { return W }
  if {$char >= 65024 && $char <= 65039 } { return A }
  if {$char >= 65040 && $char <= 65046 } { return W }
  if {$char == 65047} { return W }
  if {$char == 65048} { return W }
  if {$char == 65049} { return W }
  if {$char == 65072} { return W }
  if {$char >= 65073 && $char <= 65074 } { return W }
  if {$char >= 65075 && $char <= 65076 } { return W }
  if {$char == 65077} { return W }
  if {$char == 65078} { return W }
  if {$char == 65079} { return W }
  if {$char == 65080} { return W }
  if {$char == 65081} { return W }
  if {$char == 65082} { return W }
  if {$char == 65083} { return W }
  if {$char == 65084} { return W }
  if {$char == 65085} { return W }
  if {$char == 65086} { return W }
  if {$char == 65087} { return W }
  if {$char == 65088} { return W }
  if {$char == 65089} { return W }
  if {$char == 65090} { return W }
  if {$char == 65091} { return W }
  if {$char == 65092} { return W }
  if {$char >= 65093 && $char <= 65094 } { return W }
  if {$char == 65095} { return W }
  if {$char == 65096} { return W }
  if {$char >= 65097 && $char <= 65100 } { return W }
  if {$char >= 65101 && $char <= 65103 } { return W }
  if {$char >= 65104 && $char <= 65106 } { return W }
  if {$char >= 65108 && $char <= 65111 } { return W }
  if {$char == 65112} { return W }
  if {$char == 65113} { return W }
  if {$char == 65114} { return W }
  if {$char == 65115} { return W }
  if {$char == 65116} { return W }
  if {$char == 65117} { return W }
  if {$char == 65118} { return W }
  if {$char >= 65119 && $char <= 65121 } { return W }
  if {$char == 65122} { return W }
  if {$char == 65123} { return W }
  if {$char >= 65124 && $char <= 65126 } { return W }
  if {$char == 65128} { return W }
  if {$char == 65129} { return W }
  if {$char >= 65130 && $char <= 65131 } { return W }
  if {$char >= 65281 && $char <= 65283 } { return F }
  if {$char == 65284} { return F }
  if {$char >= 65285 && $char <= 65287 } { return F }
  if {$char == 65288} { return F }
  if {$char == 65289} { return F }
  if {$char == 65290} { return F }
  if {$char == 65291} { return F }
  if {$char == 65292} { return F }
  if {$char == 65293} { return F }
  if {$char >= 65294 && $char <= 65295 } { return F }
  if {$char >= 65296 && $char <= 65305 } { return F }
  if {$char >= 65306 && $char <= 65307 } { return F }
  if {$char >= 65308 && $char <= 65310 } { return F }
  if {$char >= 65311 && $char <= 65312 } { return F }
  if {$char >= 65313 && $char <= 65338 } { return F }
  if {$char == 65339} { return F }
  if {$char == 65340} { return F }
  if {$char == 65341} { return F }
  if {$char == 65342} { return F }
  if {$char == 65343} { return F }
  if {$char == 65344} { return F }
  if {$char >= 65345 && $char <= 65370 } { return F }
  if {$char == 65371} { return F }
  if {$char == 65372} { return F }
  if {$char == 65373} { return F }
  if {$char == 65374} { return F }
  if {$char == 65375} { return F }
  if {$char == 65376} { return F }
  if {$char == 65377} { return H }
  if {$char == 65378} { return H }
  if {$char == 65379} { return H }
  if {$char >= 65380 && $char <= 65381 } { return H }
  if {$char >= 65382 && $char <= 65391 } { return H }
  if {$char == 65392} { return H }
  if {$char >= 65393 && $char <= 65437 } { return H }
  if {$char >= 65438 && $char <= 65439 } { return H }
  if {$char >= 65440 && $char <= 65470 } { return H }
  if {$char >= 65474 && $char <= 65479 } { return H }
  if {$char >= 65482 && $char <= 65487 } { return H }
  if {$char >= 65490 && $char <= 65495 } { return H }
  if {$char >= 65498 && $char <= 65500 } { return H }
  if {$char >= 65504 && $char <= 65505 } { return F }
  if {$char == 65506} { return F }
  if {$char == 65507} { return F }
  if {$char == 65508} { return F }
  if {$char >= 65509 && $char <= 65510 } { return F }
  if {$char == 65512} { return H }
  if {$char >= 65513 && $char <= 65516 } { return H }
  if {$char >= 65517 && $char <= 65518 } { return H }
  if {$char == 65533} { return A }
  if {$char >= 94176 && $char <= 94177 } { return W }
  if {$char >= 94208 && $char <= 100337 } { return W }
  if {$char >= 100352 && $char <= 101106 } { return W }
  if {$char >= 110592 && $char <= 110847 } { return W }
  if {$char >= 110848 && $char <= 110878 } { return W }
  if {$char >= 110960 && $char <= 111355 } { return W }
  if {$char == 126980} { return W }
  if {$char == 127183} { return W }
  if {$char >= 127232 && $char <= 127242 } { return A }
  if {$char >= 127248 && $char <= 127277 } { return A }
  if {$char >= 127280 && $char <= 127337 } { return A }
  if {$char >= 127344 && $char <= 127373 } { return A }
  if {$char == 127374} { return W }
  if {$char >= 127375 && $char <= 127376 } { return A }
  if {$char >= 127377 && $char <= 127386 } { return W }
  if {$char >= 127387 && $char <= 127404 } { return A }
  if {$char >= 127488 && $char <= 127490 } { return W }
  if {$char >= 127504 && $char <= 127547 } { return W }
  if {$char >= 127552 && $char <= 127560 } { return W }
  if {$char >= 127568 && $char <= 127569 } { return W }
  if {$char >= 127584 && $char <= 127589 } { return W }
  if {$char >= 127744 && $char <= 127776 } { return W }
  if {$char >= 127789 && $char <= 127797 } { return W }
  if {$char >= 127799 && $char <= 127868 } { return W }
  if {$char >= 127870 && $char <= 127891 } { return W }
  if {$char >= 127904 && $char <= 127946 } { return W }
  if {$char >= 127951 && $char <= 127955 } { return W }
  if {$char >= 127968 && $char <= 127984 } { return W }
  if {$char == 127988} { return W }
  if {$char >= 127992 && $char <= 127994 } { return W }
  if {$char >= 127995 && $char <= 127999 } { return W }
  if {$char >= 128000 && $char <= 128062 } { return W }
  if {$char == 128064} { return W }
  if {$char >= 128066 && $char <= 128252 } { return W }
  if {$char >= 128255 && $char <= 128317 } { return W }
  if {$char >= 128331 && $char <= 128334 } { return W }
  if {$char >= 128336 && $char <= 128359 } { return W }
  if {$char == 128378} { return W }
  if {$char >= 128405 && $char <= 128406 } { return W }
  if {$char == 128420} { return W }
  if {$char >= 128507 && $char <= 128511 } { return W }
  if {$char >= 128512 && $char <= 128591 } { return W }
  if {$char >= 128640 && $char <= 128709 } { return W }
  if {$char == 128716} { return W }
  if {$char >= 128720 && $char <= 128722 } { return W }
  if {$char >= 128747 && $char <= 128748 } { return W }
  if {$char >= 128756 && $char <= 128761 } { return W }
  if {$char >= 129296 && $char <= 129342 } { return W }
  if {$char >= 129344 && $char <= 129392 } { return W }
  if {$char >= 129395 && $char <= 129398 } { return W }
  if {$char == 129402} { return W }
  if {$char >= 129404 && $char <= 129442 } { return W }
  if {$char >= 129456 && $char <= 129465 } { return W }
  if {$char >= 129472 && $char <= 129474 } { return W }
  if {$char >= 129488 && $char <= 129535 } { return W }
  if {$char >= 131072 && $char <= 173782 } { return W }
  if {$char >= 173783 && $char <= 173823 } { return W }
  if {$char >= 173824 && $char <= 177972 } { return W }
  if {$char >= 177973 && $char <= 177983 } { return W }
  if {$char >= 177984 && $char <= 178205 } { return W }
  if {$char >= 178206 && $char <= 178207 } { return W }
  if {$char >= 178208 && $char <= 183969 } { return W }
  if {$char >= 183970 && $char <= 183983 } { return W }
  if {$char >= 183984 && $char <= 191456 } { return W }
  if {$char >= 191457 && $char <= 194559 } { return W }
  if {$char >= 194560 && $char <= 195101 } { return W }
  if {$char >= 195102 && $char <= 195103 } { return W }
  if {$char >= 195104 && $char <= 196605 } { return W }
  if {$char >= 196608 && $char <= 262141 } { return W }
  if {$char >= 917760 && $char <= 917999 } { return A }
  if {$char >= 983040 && $char <= 1048573 } { return A }
  if {$char >= 1048576 && $char <= 1114109 } { return A }
  return N
}
proc ::textutil::wcswidth_char char {
  if {$char >= 4352 && $char <= 4447 } { return 2 }
  if {$char >= 8986 && $char <= 8987 } { return 2 }
  if {$char == 9001} { return 2 }
  if {$char == 9002} { return 2 }
  if {$char >= 9193 && $char <= 9196 } { return 2 }
  if {$char == 9200} { return 2 }
  if {$char == 9203} { return 2 }
  if {$char >= 9725 && $char <= 9726 } { return 2 }
  if {$char >= 9748 && $char <= 9749 } { return 2 }
  if {$char >= 9800 && $char <= 9811 } { return 2 }
  if {$char == 9855} { return 2 }
  if {$char == 9875} { return 2 }
  if {$char == 9889} { return 2 }
  if {$char >= 9898 && $char <= 9899 } { return 2 }
  if {$char >= 9917 && $char <= 9918 } { return 2 }
  if {$char >= 9924 && $char <= 9925 } { return 2 }
  if {$char == 9934} { return 2 }
  if {$char == 9940} { return 2 }
  if {$char == 9962} { return 2 }
  if {$char >= 9970 && $char <= 9971 } { return 2 }
  if {$char == 9973} { return 2 }
  if {$char == 9978} { return 2 }
  if {$char == 9981} { return 2 }
  if {$char == 9989} { return 2 }
  if {$char >= 9994 && $char <= 9995 } { return 2 }
  if {$char == 10024} { return 2 }
  if {$char == 10060} { return 2 }
  if {$char == 10062} { return 2 }
  if {$char >= 10067 && $char <= 10069 } { return 2 }
  if {$char == 10071} { return 2 }
  if {$char >= 10133 && $char <= 10135 } { return 2 }
  if {$char == 10160} { return 2 }
  if {$char == 10175} { return 2 }
  if {$char >= 11035 && $char <= 11036 } { return 2 }
  if {$char == 11088} { return 2 }
  if {$char == 11093} { return 2 }
  if {$char >= 11904 && $char <= 11929 } { return 2 }
  if {$char >= 11931 && $char <= 12019 } { return 2 }
  if {$char >= 12032 && $char <= 12245 } { return 2 }
  if {$char >= 12272 && $char <= 12283 } { return 2 }
  if {$char == 12288} { return 2 }
  if {$char >= 12289 && $char <= 12291 } { return 2 }
  if {$char == 12292} { return 2 }
  if {$char == 12293} { return 2 }
  if {$char == 12294} { return 2 }
  if {$char == 12295} { return 2 }
  if {$char == 12296} { return 2 }
  if {$char == 12297} { return 2 }
  if {$char == 12298} { return 2 }
  if {$char == 12299} { return 2 }
  if {$char == 12300} { return 2 }
  if {$char == 12301} { return 2 }
  if {$char == 12302} { return 2 }
  if {$char == 12303} { return 2 }
  if {$char == 12304} { return 2 }
  if {$char == 12305} { return 2 }
  if {$char >= 12306 && $char <= 12307 } { return 2 }
  if {$char == 12308} { return 2 }
  if {$char == 12309} { return 2 }
  if {$char == 12310} { return 2 }
  if {$char == 12311} { return 2 }
  if {$char == 12312} { return 2 }
  if {$char == 12313} { return 2 }
  if {$char == 12314} { return 2 }
  if {$char == 12315} { return 2 }
  if {$char == 12316} { return 2 }
  if {$char == 12317} { return 2 }
  if {$char >= 12318 && $char <= 12319 } { return 2 }
  if {$char == 12320} { return 2 }
  if {$char >= 12321 && $char <= 12329 } { return 2 }
  if {$char >= 12330 && $char <= 12333 } { return 2 }
  if {$char >= 12334 && $char <= 12335 } { return 2 }
  if {$char == 12336} { return 2 }
  if {$char >= 12337 && $char <= 12341 } { return 2 }
  if {$char >= 12342 && $char <= 12343 } { return 2 }
  if {$char >= 12344 && $char <= 12346 } { return 2 }
  if {$char == 12347} { return 2 }
  if {$char == 12348} { return 2 }
  if {$char == 12349} { return 2 }
  if {$char == 12350} { return 2 }
  if {$char >= 12353 && $char <= 12438 } { return 2 }
  if {$char >= 12441 && $char <= 12442 } { return 2 }
  if {$char >= 12443 && $char <= 12444 } { return 2 }
  if {$char >= 12445 && $char <= 12446 } { return 2 }
  if {$char == 12447} { return 2 }
  if {$char == 12448} { return 2 }
  if {$char >= 12449 && $char <= 12538 } { return 2 }
  if {$char == 12539} { return 2 }
  if {$char >= 12540 && $char <= 12542 } { return 2 }
  if {$char == 12543} { return 2 }
  if {$char >= 12549 && $char <= 12591 } { return 2 }
  if {$char >= 12593 && $char <= 12686 } { return 2 }
  if {$char >= 12688 && $char <= 12689 } { return 2 }
  if {$char >= 12690 && $char <= 12693 } { return 2 }
  if {$char >= 12694 && $char <= 12703 } { return 2 }
  if {$char >= 12704 && $char <= 12730 } { return 2 }
  if {$char >= 12736 && $char <= 12771 } { return 2 }
  if {$char >= 12784 && $char <= 12799 } { return 2 }
  if {$char >= 12800 && $char <= 12830 } { return 2 }
  if {$char >= 12832 && $char <= 12841 } { return 2 }
  if {$char >= 12842 && $char <= 12871 } { return 2 }
  if {$char == 12880} { return 2 }
  if {$char >= 12881 && $char <= 12895 } { return 2 }
  if {$char >= 12896 && $char <= 12927 } { return 2 }
  if {$char >= 12928 && $char <= 12937 } { return 2 }
  if {$char >= 12938 && $char <= 12976 } { return 2 }
  if {$char >= 12977 && $char <= 12991 } { return 2 }
  if {$char >= 12992 && $char <= 13054 } { return 2 }
  if {$char >= 13056 && $char <= 13311 } { return 2 }
  if {$char >= 13312 && $char <= 19893 } { return 2 }
  if {$char >= 19894 && $char <= 19903 } { return 2 }
  if {$char >= 19968 && $char <= 40943 } { return 2 }
  if {$char >= 40944 && $char <= 40959 } { return 2 }
  if {$char >= 40960 && $char <= 40980 } { return 2 }
  if {$char == 40981} { return 2 }
  if {$char >= 40982 && $char <= 42124 } { return 2 }
  if {$char >= 42128 && $char <= 42182 } { return 2 }
  if {$char >= 43360 && $char <= 43388 } { return 2 }
  if {$char >= 44032 && $char <= 55203 } { return 2 }
  if {$char >= 63744 && $char <= 64109 } { return 2 }
  if {$char >= 64110 && $char <= 64111 } { return 2 }
  if {$char >= 64112 && $char <= 64217 } { return 2 }
  if {$char >= 64218 && $char <= 64255 } { return 2 }
  if {$char >= 65040 && $char <= 65046 } { return 2 }
  if {$char == 65047} { return 2 }
  if {$char == 65048} { return 2 }
  if {$char == 65049} { return 2 }
  if {$char == 65072} { return 2 }
  if {$char >= 65073 && $char <= 65074 } { return 2 }
  if {$char >= 65075 && $char <= 65076 } { return 2 }
  if {$char == 65077} { return 2 }
  if {$char == 65078} { return 2 }
  if {$char == 65079} { return 2 }
  if {$char == 65080} { return 2 }
  if {$char == 65081} { return 2 }
  if {$char == 65082} { return 2 }
  if {$char == 65083} { return 2 }
  if {$char == 65084} { return 2 }
  if {$char == 65085} { return 2 }
  if {$char == 65086} { return 2 }
  if {$char == 65087} { return 2 }
  if {$char == 65088} { return 2 }
  if {$char == 65089} { return 2 }
  if {$char == 65090} { return 2 }
  if {$char == 65091} { return 2 }
  if {$char == 65092} { return 2 }
  if {$char >= 65093 && $char <= 65094 } { return 2 }
  if {$char == 65095} { return 2 }
  if {$char == 65096} { return 2 }
  if {$char >= 65097 && $char <= 65100 } { return 2 }
  if {$char >= 65101 && $char <= 65103 } { return 2 }
  if {$char >= 65104 && $char <= 65106 } { return 2 }
  if {$char >= 65108 && $char <= 65111 } { return 2 }
  if {$char == 65112} { return 2 }
  if {$char == 65113} { return 2 }
  if {$char == 65114} { return 2 }
  if {$char == 65115} { return 2 }
  if {$char == 65116} { return 2 }
  if {$char == 65117} { return 2 }
  if {$char == 65118} { return 2 }
  if {$char >= 65119 && $char <= 65121 } { return 2 }
  if {$char == 65122} { return 2 }
  if {$char == 65123} { return 2 }
  if {$char >= 65124 && $char <= 65126 } { return 2 }
  if {$char == 65128} { return 2 }
  if {$char == 65129} { return 2 }
  if {$char >= 65130 && $char <= 65131 } { return 2 }
  if {$char >= 65281 && $char <= 65283 } { return 2 }
  if {$char == 65284} { return 2 }
  if {$char >= 65285 && $char <= 65287 } { return 2 }
  if {$char == 65288} { return 2 }
  if {$char == 65289} { return 2 }
  if {$char == 65290} { return 2 }
  if {$char == 65291} { return 2 }
  if {$char == 65292} { return 2 }
  if {$char == 65293} { return 2 }
  if {$char >= 65294 && $char <= 65295 } { return 2 }
  if {$char >= 65296 && $char <= 65305 } { return 2 }
  if {$char >= 65306 && $char <= 65307 } { return 2 }
  if {$char >= 65308 && $char <= 65310 } { return 2 }
  if {$char >= 65311 && $char <= 65312 } { return 2 }
  if {$char >= 65313 && $char <= 65338 } { return 2 }
  if {$char == 65339} { return 2 }
  if {$char == 65340} { return 2 }
  if {$char == 65341} { return 2 }
  if {$char == 65342} { return 2 }
  if {$char == 65343} { return 2 }
  if {$char == 65344} { return 2 }
  if {$char >= 65345 && $char <= 65370 } { return 2 }
  if {$char == 65371} { return 2 }
  if {$char == 65372} { return 2 }
  if {$char == 65373} { return 2 }
  if {$char == 65374} { return 2 }
  if {$char == 65375} { return 2 }
  if {$char == 65376} { return 2 }
  if {$char >= 65504 && $char <= 65505 } { return 2 }
  if {$char == 65506} { return 2 }
  if {$char == 65507} { return 2 }
  if {$char == 65508} { return 2 }
  if {$char >= 65509 && $char <= 65510 } { return 2 }
  if {$char >= 94176 && $char <= 94177 } { return 2 }
  if {$char >= 94208 && $char <= 100337 } { return 2 }
  if {$char >= 100352 && $char <= 101106 } { return 2 }
  if {$char >= 110592 && $char <= 110847 } { return 2 }
  if {$char >= 110848 && $char <= 110878 } { return 2 }
  if {$char >= 110960 && $char <= 111355 } { return 2 }
  if {$char == 126980} { return 2 }
  if {$char == 127183} { return 2 }
  if {$char == 127374} { return 2 }
  if {$char >= 127377 && $char <= 127386 } { return 2 }
  if {$char >= 127488 && $char <= 127490 } { return 2 }
  if {$char >= 127504 && $char <= 127547 } { return 2 }
  if {$char >= 127552 && $char <= 127560 } { return 2 }
  if {$char >= 127568 && $char <= 127569 } { return 2 }
  if {$char >= 127584 && $char <= 127589 } { return 2 }
  if {$char >= 127744 && $char <= 127776 } { return 2 }
  if {$char >= 127789 && $char <= 127797 } { return 2 }
  if {$char >= 127799 && $char <= 127868 } { return 2 }
  if {$char >= 127870 && $char <= 127891 } { return 2 }
  if {$char >= 127904 && $char <= 127946 } { return 2 }
  if {$char >= 127951 && $char <= 127955 } { return 2 }
  if {$char >= 127968 && $char <= 127984 } { return 2 }
  if {$char == 127988} { return 2 }
  if {$char >= 127992 && $char <= 127994 } { return 2 }
  if {$char >= 127995 && $char <= 127999 } { return 2 }
  if {$char >= 128000 && $char <= 128062 } { return 2 }
  if {$char == 128064} { return 2 }
  if {$char >= 128066 && $char <= 128252 } { return 2 }
  if {$char >= 128255 && $char <= 128317 } { return 2 }
  if {$char >= 128331 && $char <= 128334 } { return 2 }
  if {$char >= 128336 && $char <= 128359 } { return 2 }
  if {$char == 128378} { return 2 }
  if {$char >= 128405 && $char <= 128406 } { return 2 }
  if {$char == 128420} { return 2 }
  if {$char >= 128507 && $char <= 128511 } { return 2 }
  if {$char >= 128512 && $char <= 128591 } { return 2 }
  if {$char >= 128640 && $char <= 128709 } { return 2 }
  if {$char == 128716} { return 2 }
  if {$char >= 128720 && $char <= 128722 } { return 2 }
  if {$char >= 128747 && $char <= 128748 } { return 2 }
  if {$char >= 128756 && $char <= 128761 } { return 2 }
  if {$char >= 129296 && $char <= 129342 } { return 2 }
  if {$char >= 129344 && $char <= 129392 } { return 2 }
  if {$char >= 129395 && $char <= 129398 } { return 2 }
  if {$char == 129402} { return 2 }
  if {$char >= 129404 && $char <= 129442 } { return 2 }
  if {$char >= 129456 && $char <= 129465 } { return 2 }
  if {$char >= 129472 && $char <= 129474 } { return 2 }
  if {$char >= 129488 && $char <= 129535 } { return 2 }
  if {$char >= 131072 && $char <= 173782 } { return 2 }
  if {$char >= 173783 && $char <= 173823 } { return 2 }
  if {$char >= 173824 && $char <= 177972 } { return 2 }
  if {$char >= 177973 && $char <= 177983 } { return 2 }
  if {$char >= 177984 && $char <= 178205 } { return 2 }
  if {$char >= 178206 && $char <= 178207 } { return 2 }
  if {$char >= 178208 && $char <= 183969 } { return 2 }
  if {$char >= 183970 && $char <= 183983 } { return 2 }
  if {$char >= 183984 && $char <= 191456 } { return 2 }
  if {$char >= 191457 && $char <= 194559 } { return 2 }
  if {$char >= 194560 && $char <= 195101 } { return 2 }
  if {$char >= 195102 && $char <= 195103 } { return 2 }
  if {$char >= 195104 && $char <= 196605 } { return 2 }
  if {$char >= 196608 && $char <= 262141 } { return 2 }
  return 1
}

proc ::textutil::wcswidth {string} {
  set width 0
  set len [string length $string]
  foreach c [split $string {}] {
    scan $c %c char
    set n [::textutil::wcswidth_char $char]
    if {$n < 0} {
      return -1
    }
    incr width $n
  }
  return $width
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to modules/tie/tie.man.

527
528
529
530
531
532
533
534
535
        set a($idx) $val        ds setv   idx val
        unset a($idx)           ds unsetv idx
        $a($idx)                ds getv   idx
        -----------             -----------
}]

[vset CATEGORY tie]
[include ../common-text/feedback.inc]
[manpage_end]







|

527
528
529
530
531
532
533
534
535
        set a($idx) $val        ds setv   idx val
        unset a($idx)           ds unsetv idx
        $a($idx)                ds getv   idx
        -----------             -----------
}]

[vset CATEGORY tie]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/tie/tie_std.man.

27
28
29
30
31
32
33
34
35
[para]

They are automatically loaded and registered by [package tie] when it
itself is requested, and as such there is no need to request them on
their own, although it is possible to do so.

[vset CATEGORY tie]
[include ../common-text/feedback.inc]
[manpage_end]







|

27
28
29
30
31
32
33
34
35
[para]

They are automatically loaded and registered by [package tie] when it
itself is requested, and as such there is no need to request them on
their own, although it is possible to do so.

[vset CATEGORY tie]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Deleted modules/tiff/test-assets/IMG_7898.tiff.

cannot compute difference between binary files

Deleted modules/tiff/test-assets/IMG_7917.tiff.

cannot compute difference between binary files

Deleted modules/tiff/test-assets/IMG_7950.tiff.

cannot compute difference between binary files

Added modules/tiff/testimages/IMG_7898.tiff.

cannot compute difference between binary files

Added modules/tiff/testimages/IMG_7917.tiff.

cannot compute difference between binary files

Added modules/tiff/testimages/IMG_7950.tiff.

cannot compute difference between binary files

Changes to modules/tiff/tiff.man.

166
167
168
169
170
171
172
173
174
[list_begin enumerated]
[enum] Cannot write exif ifd
[enum] Reading limited to uncompressed 8 bit rgb and 8 bit palletized images
[enum] Writing limited to uncompressed 8 bit rgb
[list_end]

[vset CATEGORY tiff]
[include ../common-text/feedback.inc]
[manpage_end]







|

166
167
168
169
170
171
172
173
174
[list_begin enumerated]
[enum] Cannot write exif ifd
[enum] Reading limited to uncompressed 8 bit rgb and 8 bit palletized images
[enum] Writing limited to uncompressed 8 bit rgb
[list_end]

[vset CATEGORY tiff]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/tiff/tiff.test.

1
2
3
4
5


6
7
8
9
10
11
12
# -*- tcl -*-
# tiff.test:  Tests for the TIFF utilities.
#
# Copyright (c) 2008 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]






>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
# tiff.test:  Tests for the TIFF utilities.
#
# Copyright (c) 2008 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# TIFF: @(#) $Id: tiff.test,v 1.1 2008/03/24 03:48:59 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
    catch {::tiff::isTIFF foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::isTIFF} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-2.$n "isTIFF, ok, [file tail $f]" {
	::tiff::isTIFF $f
    } 1
    incr n
}

test tiff-2.$n "isTIFF, fail, [file tail [info script]]" {







|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    catch {::tiff::isTIFF foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::isTIFF} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-2.$n "isTIFF, ok, [file tail $f]" {
	::tiff::isTIFF $f
    } 1
    incr n
}

test tiff-2.$n "isTIFF, fail, [file tail [info script]]" {
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    catch {::tiff::byteOrder foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::byteOrder} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-4.$n "byteOrder regular, [file tail $f]" {
	::tiff::byteOrder $f
    } little
    incr n
}

test tiff-5.0 "byteOrder, fail, [file tail [info script]]" {







|







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    catch {::tiff::byteOrder foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::byteOrder} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-4.$n "byteOrder regular, [file tail $f]" {
	::tiff::byteOrder $f
    } little
    incr n
}

test tiff-5.0 "byteOrder, fail, [file tail [info script]]" {
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
    catch {::tiff::numImages foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::numImages} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-7.$n "numImages regular, [file tail $f]" {
	::tiff::numImages $f
    } 1
    incr n
}

test tiff-8.0 "numImages, fail, [file tail [info script]]" {







|







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
    catch {::tiff::numImages foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::numImages} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-7.$n "numImages regular, [file tail $f]" {
	::tiff::numImages $f
    } 1
    incr n
}

test tiff-8.0 "numImages, fail, [file tail [info script]]" {
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    catch {::tiff::dimensions foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::dimensions} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-10.$n "dimensions regular, [file tail $f]" {
	::tiff::dimensions $f
    } {320 240}
    incr n
}

test tiff-11.0 "dimensions, fail, [file tail [info script]]" {







|







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    catch {::tiff::dimensions foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::dimensions} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-10.$n "dimensions regular, [file tail $f]" {
	::tiff::dimensions $f
    } {320 240}
    incr n
}

test tiff-11.0 "dimensions, fail, [file tail [info script]]" {
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
    catch {::tiff::imageInfo foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::imageInfo} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-13.$n "imageInfo regular, [file tail $f]" {
	dictsort [::tiff::imageInfo $f]
    } {Artist {} BitsPerSample {8 8 8} Compression 7 DateTime {} HostComputer {} ImageDescription {} ImageLength 240 ImageWidth 320 Orientation 1 PhotometricInterpretation 2 ResolutionUnit 2 XResolution 180 YResolution 180}
    incr n
}

test tiff-14.0 "imageInfo, fail, [file tail [info script]]" {







|







148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
    catch {::tiff::imageInfo foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::imageInfo} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-13.$n "imageInfo regular, [file tail $f]" {
	dictsort [::tiff::imageInfo $f]
    } {Artist {} BitsPerSample {8 8 8} Compression 7 DateTime {} HostComputer {} ImageDescription {} ImageLength 240 ImageWidth 320 Orientation 1 PhotometricInterpretation 2 ResolutionUnit 2 XResolution 180 YResolution 180}
    incr n
}

test tiff-14.0 "imageInfo, fail, [file tail [info script]]" {
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
    catch {::tiff::entries foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::entries} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-16.$n "entries regular, [file tail $f]" {
	lsort [::tiff::entries $f]
    } {BitsPerSample Compression DocumentName FillOrder ImageLength ImageWidth JPEGTables Orientation PhotometricInterpretation PlanarConfiguration ResolutionUnit RowsPerStrip SamplesPerPixel Software StripByteCounts StripOffsets XResolution YCbCrSubSampling YResolution}
    incr n
}

test tiff-17.0 "entries, fail, [file tail [info script]]" {







|







174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
    catch {::tiff::entries foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::entries} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-16.$n "entries regular, [file tail $f]" {
	lsort [::tiff::entries $f]
    } {BitsPerSample Compression DocumentName FillOrder ImageLength ImageWidth JPEGTables Orientation PhotometricInterpretation PlanarConfiguration ResolutionUnit RowsPerStrip SamplesPerPixel Software StripByteCounts StripOffsets XResolution YCbCrSubSampling YResolution}
    incr n
}

test tiff-17.0 "entries, fail, [file tail [info script]]" {
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
    catch {::tiff::getEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::getEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-19.$n "getEntry regular, [file tail $f]" {
	::tiff::getEntry $f {Artist Compression}
    } {Artist {} Compression 7}
    incr n
}

test tiff-20.0 "getEntry, fail, [file tail [info script]]" {







|







205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
    catch {::tiff::getEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::getEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-19.$n "getEntry regular, [file tail $f]" {
	::tiff::getEntry $f {Artist Compression}
    } {Artist {} Compression 7}
    incr n
}

test tiff-20.0 "getEntry, fail, [file tail [info script]]" {
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
    catch {::tiff::addEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::addEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-22.$n "addEntry, new tag, [file tail $f]" {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	removeFile ttmp
	set res
    } {{Artist {}} {Artist Andreas}}
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-23.$n "addEntry, overwrite tag, [file tail $f]" knownBug {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 AK}}
	lappend res [tiff::getEntry $fx Artist]







|













|







236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
    catch {::tiff::addEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::addEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-22.$n "addEntry, new tag, [file tail $f]" {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	removeFile ttmp
	set res
    } {{Artist {}} {Artist Andreas}}
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-23.$n "addEntry, overwrite tag, [file tail $f]" knownBug {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 AK}}
	lappend res [tiff::getEntry $fx Artist]
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
    catch {::tiff::deleteEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::deleteEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-26.$n "deleteEntry, [file tail $f]" {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::deleteEntry $fx Artist







|







291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
    catch {::tiff::deleteEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::deleteEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-26.$n "deleteEntry, [file tail $f]" {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::deleteEntry $fx Artist
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
    catch {::tiff::getImage foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::getImage} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-29.$n "getImage, [file tail $f]" {tk unkownFormat} {
	set image [tiff::getImage $f]
	lappend res [image width  $image]
	lappend res [image height $image]
	image delete $image
	set res
    } {320 240}







|







325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
    catch {::tiff::getImage foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::getImage} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-29.$n "getImage, [file tail $f]" {tk unkownFormat} {
	set image [tiff::getImage $f]
	lappend res [image width  $image]
	lappend res [image height $image]
	image delete $image
	set res
    } {320 240}
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
    catch {::tiff::writeImage foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::writeImage} {image file ?entry?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-32.$n "writeImage, [file tail $f]" {tk unkownFormat} {
	set image [tiff::getImage $f]
	set fx [makeFile {} ttmp]
	tiff::writeImage $image $fx
	image delete $image
	foreach k [lsort [::tiff::entries $fx]] {
	    lappend res [tiff::getEntry $fx $k]







|







360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
    catch {::tiff::writeImage foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::writeImage} {image file ?entry?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-32.$n "writeImage, [file tail $f]" {tk unkownFormat} {
	set image [tiff::getImage $f]
	set fx [makeFile {} ttmp]
	tiff::writeImage $image $fx
	image delete $image
	foreach k [lsort [::tiff::entries $fx]] {
	    lappend res [tiff::getEntry $fx $k]
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
} [tcltest::tooManyArgs {::tiff::debug} {file}]

# -------------------------------------------------------------------------
# We do not try to actually run 'debug', because it prints its results
# to stdout. This may change when we can capture stdout as test result

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-41.$n "debug ok, [file tail $f]" donotrun {
	::tiff::debug $f
    } {}
    incr n
}

test tiff-42.0 "debug, fail, [file tail [info script]]" {
    list [catch {::tiff::debug [info script]} msg] $msg
} {1 {not a tiff file}}

# -------------------------------------------------------------------------
testsuiteCleanup







|












537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
} [tcltest::tooManyArgs {::tiff::debug} {file}]

# -------------------------------------------------------------------------
# We do not try to actually run 'debug', because it prints its results
# to stdout. This may change when we can capture stdout as test result

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-41.$n "debug ok, [file tail $f]" donotrun {
	::tiff::debug $f
    } {}
    incr n
}

test tiff-42.0 "debug, fail, [file tail [info script]]" {
    list [catch {::tiff::debug [info script]} msg] $msg
} {1 {not a tiff file}}

# -------------------------------------------------------------------------
testsuiteCleanup

Deleted modules/tool/build/build.tcl.

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
set srcdir [file dirname [file normalize [file join [pwd] [info script]]]]
set moddir [file dirname $srcdir]

set version 0.7
set module [file tail $moddir]

set fout [open [file join $moddir ${module}.tcl] w]
dict set map %module% $module
dict set map %version% $version

puts $fout [string map $map {###
# Amalgamated package for %module%
# Do not edit directly, tweak the source in src/ and rerun
# build.tcl
###
package provide %module% %version%
namespace eval ::%module% {}
}]
if {$module ne "tool"} {
  puts $fout [string map $map {::tool::module push %module%}]
}

# Track what files we have included so far
set loaded {}
lappend loaded build.tcl

# These files must be loaded in a particular order
foreach file {
  core.tcl
  uuid.tcl
  ensemble.tcl
  metaclass.tcl
  option.tcl
  event.tcl
  pipeline.tcl
} {
  lappend loaded $file
  set fin [open [file join $srcdir $file] r]
  puts $fout "###\n# START: [file tail $file]\n###"
  puts $fout [read $fin]
  close $fin
  puts $fout "###\n# END: [file tail $file]\n###"
}
# These files can be loaded in any order
foreach file [lsort -dictionary [glob [file join $srcdir *.tcl]]] {
  if {[file tail $file] in $loaded} continue
  lappend loaded $file
  set fin [open [file join $srcdir $file] r]
  puts $fout "###\n# START: [file tail $file]\n###"
  puts $fout [read $fin]
  close $fin
  puts $fout "###\n# END: [file tail $file]\n###"
}

# Provide some cleanup and our final package provide
puts $fout [string map $map {
namespace eval ::%module% {
  namespace export *
}
}]
close $fout

###
# Build our pkgIndex.tcl file
###
set fout [open [file join $moddir pkgIndex.tcl] w]
puts $fout [string map $map {# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded %module% %version% [list source [file join $dir %module%.tcl]]
}]
close $fout
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































Deleted modules/tool/build/core.tcl.

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
package require Tcl 8.6 ;# try in pipeline.tcl. Possibly other things.
package require dicttool
package require TclOO
package require sha1
#package require cron 2.0
package require oo::meta 0.5.1
package require oo::dialect

::oo::dialect::create ::tool
::namespace eval ::tool {}
set ::tool::trace 0

proc ::tool::script_path {} {
  set path [file dirname [file join [pwd] [info script]]]
  return $path
}

proc ::tool::module {cmd args} {
  ::variable moduleStack
  ::variable module

  switch $cmd {
    push {
      set module [lindex $args 0]
      lappend moduleStack $module
      return $module
    }
    pop {
      set priormodule      [lindex $moduleStack end]
      set moduleStack [lrange $moduleStack 0 end-1]
      set module [lindex $moduleStack end]
      return $priormodule
    }
    peek {
      set module      [lindex $moduleStack end]
      return $module
    }
    default {
      error "Invalid command \"$cmd\". Valid: peek, pop, push"
    }
  }
}
::tool::module push core

proc ::tool::pathload {path {order {}} {skip {}}} {
  ###
  # On windows while running under a VFS, the system sometimes
  # gets confused about the volume we are running under
  ###
  if {$::tcl_platform(platform) eq "windows"} {
    if {[string range $path 1 6] eq ":/zvfs"} {
      set path [string range $path 2 end]
    }
  }
  set loaded {pkgIndex.tcl index.tcl}
  foreach item $skip {
    lappend loaded [file tail $skip]
  }
  if {[file exists [file join $path metaclass.tcl]]} {
    lappend loaded metaclass.tcl
    uplevel #0 [list source [file join $path metaclass.tcl]]
  }
  if {[file exists [file join $path baseclass.tcl]]} {
    lappend loaded baseclass.tcl
    uplevel #0 [list source [file join $path baseclass.tcl]]
  }
  foreach file $order {
    set file [file tail $file]
    if {$file in $loaded} continue
    if {![file exists [file join $path $file]]} {
      puts "WARNING [file join $path $file] does not exist in [info script]"
    } else {
      uplevel #0 [list source [file join $path $file]]
    }
    lappend loaded $file
  }
  foreach file [lsort -dictionary [glob -nocomplain [file join $path *.tcl]]] {
    if {[file tail $file] in $loaded} continue
    uplevel #0 [list source $file]
    lappend loaded [file tail $file]
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































Deleted modules/tool/build/coroutine.tcl.

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
89
proc ::tool::define::coroutine {name corobody} {
  set class [current_class]
  ::oo::meta::info $class set method_ensemble ${name} _preamble: [list {} [string map [list %coroname% $name] {
    my variable coro_queue coro_lock
    set coro %coroname%
    set coroname [info object namespace [self]]::%coroname%
  }]]
  ::oo::meta::info $class set method_ensemble ${name} coroutine: {{} {
    return $coroutine
  }}
  ::oo::meta::info $class set method_ensemble ${name} restart: {{} {
    # Don't allow a coroutine to kill itself
    if {[info coroutine] eq $coroname} return
    if {[info commands $coroname] ne {}} {
      rename $coroname {}
    }
    set coro_lock($coroname) 0
    ::coroutine $coroname {*}[namespace code [list my $coro main]]
    ::cron::object_coroutine [self] $coroname
  }}
  ::oo::meta::info $class set method_ensemble ${name} kill: {{} {
    # Don't allow a coroutine to kill itself
    if {[info coroutine] eq $coroname} return
    if {[info commands $coroname] ne {}} {
      rename $coroname {}
    }
  }}

  ::oo::meta::info $class set method_ensemble ${name} main: [list {} $corobody]

  ::oo::meta::info $class set method_ensemble ${name} clear: {{} {
    set coro_queue($coroname) {}
  }}
  ::oo::meta::info $class set method_ensemble ${name} next: {{eventvar} {
    upvar 1 [lindex $args 0] event
    if {![info exists coro_queue($coroname)]} {
      return 1
    }
    if {[llength $coro_queue($coroname)] == 0} {
      return 1
    }
    set event [lindex $coro_queue($coroname) 0]
    set coro_queue($coroname) [lrange $coro_queue($coroname) 1 end]
    return 0
  }}
  
  ::oo::meta::info $class set method_ensemble ${name} peek: {{eventvar} {
    upvar 1 [lindex $args 0] event
    if {![info exists coro_queue($coroname)]} {
      return 1
    }
    if {[llength $coro_queue($coroname)] == 0} {
      return 1
    }
    set event [lindex $coro_queue($coroname) 0]
    return 0
  }}

  ::oo::meta::info $class set method_ensemble ${name} running: {{} {
    if {[info commands $coroname] eq {}} {
      return 0
    }
    if {[::cron::task exists $coroname]} {
      set info [::cron::task info $coroname]
      if {[dict exists $info running]} {
        return [dict get $info running]
      }
    }
    return 0
  }}
  
  ::oo::meta::info $class set method_ensemble ${name} send: {args {
    lappend coro_queue($coroname) $args
    if {[info coroutine] eq $coroname} {
      return
    }
    if {[info commands $coroname] eq {}} {
      ::coroutine $coroname {*}[namespace code [list my $coro main]]
      ::cron::object_coroutine [self] $coroname
    }
    if {[info coroutine] eq {}} {
      ::cron::do_one_event $coroname
    } else {
      yield
    }
  }}
  ::oo::meta::info $class set method_ensemble ${name} default: {args {my [self method] send $method {*}$args}}

}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































Deleted modules/tool/build/ensemble.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
::namespace eval ::tool::define {}

if {![info exists ::tool::dirty_classes]} {
  set ::tool::dirty_classes {}
}

###
# Monkey patch oometa's rebuild function to
# include a notifier to tool
###
proc ::oo::meta::rebuild args {
  foreach class $args {
    if {$class ni $::oo::meta::dirty_classes} {
      lappend ::oo::meta::dirty_classes $class
    }
    if {$class ni $::tool::dirty_classes} {
      lappend ::tool::dirty_classes $class
    }
  }
}

proc ::tool::ensemble_build_map args {
  set emap {}
  foreach thisclass $args {
    foreach {ensemble einfo} [::oo::meta::info $thisclass getnull method_ensemble] {
      foreach {submethod subinfo} $einfo {
        dict set emap $ensemble $submethod $subinfo
      }
    }
  }
  return $emap
}

proc ::tool::ensemble_methods emap {
  set result {}
  foreach {ensemble einfo} $emap {
    #set einfo [dict getnull $einfo method_ensemble $ensemble]
    set eswitch {}
    set default standard
    if {[dict exists $einfo default:]} {
      set emethodinfo [dict get $einfo default:]
      set arglist     [lindex $emethodinfo 0]
      set realbody    [lindex $emethodinfo 1]
      if {[llength $arglist]==1 && [lindex $arglist 0] in {{} args arglist}} {
        set body {}
      } else {
        set body "\n      ::tool::dynamic_arguments $ensemble \$method [list $arglist] {*}\$args"
      }
      append body "\n      " [string trim $realbody] "      \n"
      set default $body
      dict unset einfo default:
    }
    set methodlist {}
    foreach item [dict keys $einfo] {
      lappend methodlist [string trimright $item :]
    }
    set methodlist  [lsort -dictionary -unique $methodlist]
    foreach {submethod esubmethodinfo} [lsort -dictionary -stride 2 $einfo] {
      if {$submethod in {"_preamble:" "default:"}} continue
      set submethod [string trimright $submethod :]
      lassign $esubmethodinfo arglist realbody
      if {[string length [string trim $realbody]] eq {}} {
        dict set eswitch $submethod {}
      } else {
        if {[llength $arglist]==1 && [lindex $arglist 0] in {{} args arglist}} {
          set body {}
        } else {
          set body "\n      ::tool::dynamic_arguments $ensemble \$method [list $arglist] {*}\$args"
        }
        append body "\n      " [string trim $realbody] "      \n"
        dict set eswitch $submethod $body
      }
    }
    if {![dict exists $eswitch <list>]} {
      dict set eswitch <list> {return $methodlist}
    }
    if {$default=="standard"} {
      set default "error \"unknown method $ensemble \$method. Valid: \$methodlist\""
    }
    dict set eswitch default $default
    set mbody {}    
    if {[dict exists $einfo _preamble:]} {
      append mbody [lindex [dict get $einfo _preamble:] 1] \n
    }
    append mbody \n [list set methodlist $methodlist]
    append mbody \n "set code \[catch {switch -- \$method [list $eswitch]} result opts\]"
    append mbody \n {return -options $opts $result}
    append result \n [list method $ensemble {{method default} args} $mbody]    
  }
  return $result
}

###
# topic: fb8d74e9c08db81ee6f1275dad4d7d6f
###
proc ::tool::dynamic_object_ensembles {thisobject thisclass} {
  variable trace
  set ensembledict {}
  foreach dclass $::tool::dirty_classes {
    foreach {cclass cancestors} [array get ::oo::meta::cached_hierarchy] {
      if {$dclass in $cancestors} {
        unset -nocomplain ::tool::obj_ensemble_cache($cclass)
      }
    }
  }
  set ::tool::dirty_classes {}
  ###
  # Only go through the motions for classes that have a locally defined
  # ensemble method implementation
  ###
  foreach aclass [::oo::meta::ancestors $thisclass] {
    if {[info exists ::tool::obj_ensemble_cache($aclass)]} continue
    set emap [::tool::ensemble_build_map $aclass]
    set body [::tool::ensemble_methods $emap]
    oo::define $aclass $body
    # Define a property for this ensemble for introspection
    foreach {ensemble einfo} $emap {
      ::oo::meta::info $aclass set ensemble_methods $ensemble: [lsort -dictionary [dict keys $einfo]]
    }
    set ::tool::obj_ensemble_cache($aclass) 1
  }
}

###
# topic: ec9ca249b75e2667ad5bcb2f7cd8c568
# title: Define an ensemble method for this agent
###
::proc ::tool::define::method {rawmethod args} {
  set class [current_class]
  set mlist [split $rawmethod "::"]
  if {[llength $mlist]==1} {
    ###
    # Simple method, needs no parsing
    ###
    set method $rawmethod
    ::oo::define $class method $rawmethod {*}$args
    return
  }
  set ensemble [lindex $mlist 0]
  set method [join [lrange $mlist 2 end] "::"]
  switch [llength $args] {
    1 {
      ::oo::meta::info $class set method_ensemble $ensemble $method: [list dictargs [lindex $args 0]]
    }
    2 {
      ::oo::meta::info $class set method_ensemble $ensemble $method: $args
    }
    default {
      error "Usage: method NAME ARGLIST BODY"
    }
  }
}

###
# topic: 354490e9e9708425a6662239f2058401946e41a1
# description: Creates a method which exports access to an internal dict
###
proc ::tool::define::dictobj args {
  dict_ensemble {*}$args
}
proc ::tool::define::dict_ensemble {methodname varname {cases {}}} {
  set class [current_class]
  set CASES [string map [list %METHOD% $methodname %VARNAME% $varname] $cases]
  
  set methoddata [::oo::meta::info $class getnull method_ensemble $methodname]
  set initial [dict getnull $cases initialize]
  variable $varname $initial
  foreach {name body} $CASES {
    dict set methoddata $name: [list args $body]
  }
  set template [string map [list %CLASS% $class %INITIAL% $initial %METHOD% $methodname %VARNAME% $varname] {
    _preamble {} {
      my variable %VARNAME%
    }
    add args {
      set field [string trimright [lindex $args 0] :]
      set data [dict getnull $%VARNAME% $field]
      foreach item [lrange $args 1 end] {
        if {$item ni $data} {
          lappend data $item
        }
      }
      dict set %VARNAME% $field $data
    }
    remove args {
      set field [string trimright [lindex $args 0] :]
      set data [dict getnull $%VARNAME% $field]
      set result {}
      foreach item $data {
        if {$item in $args} continue
        lappend result $item
      }
      dict set %VARNAME% $field $result
    }
    initial {} {
      return [dict rmerge [my meta branchget %VARNAME%] {%INITIAL%}]
    }
    reset {} {
      set %VARNAME% [dict rmerge [my meta branchget %VARNAME%] {%INITIAL%}]
      return $%VARNAME%
    }
    dump {} {
      return $%VARNAME%
    }
    append args {
      return [dict $method %VARNAME% {*}$args]
    }
    incr args {
      return [dict $method %VARNAME% {*}$args]
    }
    lappend args {
      return [dict $method %VARNAME% {*}$args]
    }
    set args {
      return [dict $method %VARNAME% {*}$args]
    }
    unset args {
      return [dict $method %VARNAME% {*}$args]
    }
    update args {
      return [dict $method %VARNAME% {*}$args]
    }
    branchset args {
      foreach {field value} [lindex $args end] {
        dict set %VARNAME% {*}[lrange $args 0 end-1] [string trimright $field :]: $value
      }
    }
    rmerge args {
      set %VARNAME% [dict rmerge $%VARNAME% {*}$args]
      return $%VARNAME%  
    }
    merge args {
      set %VARNAME% [dict rmerge $%VARNAME% {*}$args]
      return $%VARNAME%
    }
    replace args {
      set %VARNAME% [dict rmerge $%VARNAME% {%INITIAL%} {*}$args]
    }
    default args {
      return [dict $method $%VARNAME% {*}$args]
    }
  }]
  foreach {name arglist body} $template {
    if {[dict exists $methoddata $name:]} continue
    dict set methoddata $name: [list $arglist $body]
  }
  ::oo::meta::info $class set method_ensemble $methodname $methoddata
}

proc ::tool::define::arrayobj args {
  array_ensemble {*}$args
}

###
# topic: 354490e9e9708425a6662239f2058401946e41a1
# description: Creates a method which exports access to an internal array
###
proc ::tool::define::array_ensemble {methodname varname {cases {}}} {
  set class [current_class]
  set CASES [string map [list %METHOD% $methodname %VARNAME% $varname] $cases]
  set initial [dict getnull $cases initialize]
  array $varname $initial

  set map [list %CLASS% $class %METHOD% $methodname %VARNAME% $varname %CASES% $CASES %INITIAL% $initial]

  ::oo::define $class method _${methodname}Get {field} [string map $map {
    my variable %VARNAME%
    if {[info exists %VARNAME%($field)]} {
      return $%VARNAME%($field)
    }
    return [my meta getnull %VARNAME% $field:]
  }]
  ::oo::define $class method _${methodname}Exists {field} [string map $map {
    my variable %VARNAME%
    if {[info exists %VARNAME%($field)]} {
      return 1
    }
    return [my meta exists %VARNAME% $field:]
  }]
  set methoddata [::oo::meta::info $class set array_ensemble $methodname: $varname]
  
  set methoddata [::oo::meta::info $class getnull method_ensemble $methodname]
  foreach {name body} $CASES {
    dict set methoddata $name: [list args $body]
  } 
  set template  [string map [list %CLASS% $class %INITIAL% $initial %METHOD% $methodname %VARNAME% $varname] {
    _preamble {} {
      my variable %VARNAME%
    }
    reset {} {
      ::array unset %VARNAME% *
      foreach {field value} [my meta getnull %VARNAME%] {
        set %VARNAME%([string trimright $field :]) $value
      }
      ::array set %VARNAME% {%INITIAL%}
      return [array get %VARNAME%]
    }
    ni value {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      return [expr {$value ni $data}]
    }
    in value {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      return [expr {$value in $data}]
    }
    add args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      foreach item [lrange $args 1 end] {
        if {$item ni $data} {
          lappend data $item
        }
      }
      set %VARNAME%($field) $data
    }
    remove args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      set result {}
      foreach item $data {
        if {$item in $args} continue
        lappend result $item
      }
      set %VARNAME%($field) $result
    }
    dump {} {
      set result {}
      foreach {var val} [my meta getnull %VARNAME%] {
        dict set result [string trimright $var :] $val
      }
      foreach {var val} [lsort -dictionary -stride 2 [array get %VARNAME%]] {
        dict set result [string trimright $var :] $val
      }
      return $result
    }
    exists args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Exists $field]
    }
    getnull args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]      
    }
    get field {
      set field [string trimright $field :]
      set data [my _%METHOD%Get $field]
    }
    set args {
      set field [string trimright [lindex $args 0] :]
      ::set %VARNAME%($field) {*}[lrange $args 1 end]        
    }
    append args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      ::append data {*}[lrange $args 1 end]
      set %VARNAME%($field) $data
    }
    incr args {
      set field [string trimright [lindex $args 0] :]
      ::incr %VARNAME%($field) {*}[lrange $args 1 end]
    }
    lappend args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      $method data {*}[lrange $args 1 end]
      set %VARNAME%($field) $data
    }
    branchset args {
      foreach {field value} [lindex $args end] {
        set %VARNAME%([string trimright $field :]) $value
      }
    }
    rmerge args {
      foreach arg $args {
        my %VARNAME% branchset $arg
      }
    }
    merge args {
      foreach arg $args {
        my %VARNAME% branchset $arg
      }
    }
    default args {
      return [array $method %VARNAME% {*}$args]
    }
  }]
  foreach {name arglist body} $template {
    if {[dict exists $methoddata $name:]} continue
    dict set methoddata $name: [list $arglist $body]
  }
  ::oo::meta::info $class set method_ensemble $methodname $methoddata
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/tool/build/event.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
###
# This file implements the Tool event manager
###

::namespace eval ::tool {}

::namespace eval ::tool::event {}

###
# topic: f2853d380a732845610e40375bcdbe0f
# description: Cancel a scheduled event
###
proc ::tool::event::cancel {self {task *}} {
  variable timer_event
  variable timer_script

  foreach {id event} [array get timer_event $self:$task] {
    ::after cancel $event
    set timer_event($id) {}
    set timer_script($id) {}
  }
}

###
# topic: 8ec32f6b6ba78eaf980524f8dec55b49
# description:
#    Generate an event
#    Adds a subscription mechanism for objects
#    to see who has recieved this event and prevent
#    spamming or infinite recursion
###
proc ::tool::event::generate {self event args} {
  set wholist [Notification_list $self $event]
  if {$wholist eq {}} return
  set dictargs [::oo::meta::args_to_options {*}$args]
  set info $dictargs
  set strict 0
  set debug 0
  set sender $self
  dict with dictargs {}
  dict set info id     [::tool::event::nextid]
  dict set info origin $self
  dict set info sender $sender
  dict set info rcpt   {}
  foreach who $wholist {
    catch {::tool::event::notify $who $self $event $info}
  }
}

###
# topic: 891289a24b8cc52b6c228f6edb169959
# title: Return a unique event handle
###
proc ::tool::event::nextid {} {
  return "event#[format %0.8x [incr ::tool::event_count]]"
}

###
# topic: 1e53e8405b4631aec17f98b3e8a5d6a4
# description:
#    Called recursively to produce a list of
#    who recieves notifications
###
proc ::tool::event::Notification_list {self event {stackvar {}}} {
  set notify_list {}
  foreach {obj patternlist} [array get ::tool::object_subscribe] {
    if {$obj eq $self} continue
    if {$obj in $notify_list} continue
    set match 0
    foreach {objpat eventlist} $patternlist {
      if {![string match $objpat $self]} continue
      foreach eventpat $eventlist {
        if {![string match $eventpat $event]} continue
        set match 1
        break
      }
      if {$match} {
        break
      }
    }
    if {$match} {
      lappend notify_list $obj
    }
  }
  return $notify_list
}

###
# topic: b4b12f6aed69f74529be10966afd81da
###
proc ::tool::event::notify {rcpt sender event eventinfo} {
  if {[info commands $rcpt] eq {}} return 
  if {$::tool::trace} {
    puts [list event notify rcpt $rcpt sender $sender event $event info $eventinfo]
  }
  $rcpt notify $event $sender $eventinfo
}

###
# topic: 829c89bda736aed1c16bb0c570037088
###
proc ::tool::event::process {self handle script} {
  variable timer_event
  variable timer_script

  array unset timer_event $self:$handle
  array unset timer_script $self:$handle

  set err [catch {uplevel #0 $script} result errdat]
  if $err {
    puts "BGError: $self $handle $script
ERR: $result
[dict get $errdat -errorinfo]
***"
  }
}

###
# topic: eba686cffe18cd141ac9b4accfc634bb
# description: Schedule an event to occur later
###
proc ::tool::event::schedule {self handle interval script} {
  variable timer_event
  variable timer_script
  if {$::tool::trace} {
    puts [list $self schedule $handle $interval]
  }
  if {[info exists timer_event($self:$handle)]} {
    if {$script eq $timer_script($self:$handle)} {
      return
    }
    ::after cancel $timer_event($self:$handle)
  }
  set timer_script($self:$handle) $script
  set timer_event($self:$handle) [::after $interval [list ::tool::event::process $self $handle $script]]
}

proc ::tool::event::sleep msec {
  ::cron::sleep $msec
}

###
# topic: e64cff024027ee93403edddd5dd9fdde
###
proc ::tool::event::subscribe {self who event} {
  upvar #0 ::tool::object_subscribe($self) subscriptions
  if {![info exists subscriptions]} {
    set subscriptions {}
  }
  set match 0
  foreach {objpat eventlist} $subscriptions {
    if {![string match $objpat $who]} continue      
    foreach eventpat $eventlist {
      if {[string match $eventpat $event]} {
        # This rule already exists
        return
      }
    }
  }
  dict lappend subscriptions $who $event
}

###
# topic: 5f74cfd01735fb1a90705a5f74f6cd8f
###
proc ::tool::event::unsubscribe {self args} {
  upvar #0 ::tool::object_subscribe($self) subscriptions
  if {![info exists subscriptions]} {
    return
  }  
  switch [llength $args] {
    1 {
      set event [lindex $args 0]
      if {$event eq "*"} {
        # Shortcut, if the 
        set subscriptions {}
      } else {
        set newlist {}
        foreach {objpat eventlist} $subscriptions {
          foreach eventpat $eventlist {
            if {[string match $event $eventpat]} continue
            dict lappend newlist $objpat $eventpat
          }
        }
        set subscriptions $newlist
      }
    }
    2 {
      set who [lindex $args 0]
      set event [lindex $args 1]
      if {$who eq "*" && $event eq "*"} {
        set subscriptions {}
      } else {
        set newlist {}
        foreach {objpat eventlist} $subscriptions {
          if {[string match $who $objpat]} {
            foreach eventpat $eventlist {
              if {[string match $event $eventpat]} continue
              dict lappend newlist $objpat $eventpat
            }
          }
        }
        set subscriptions $newlist
      }
    }
  }
}

::tool::define ::tool::object {
  ###
  # topic: 20b4a97617b2b969b96997e7b241a98a
  ###
  method event {submethod args} {
    ::tool::event::$submethod [self] {*}$args
  }
}

###
# topic: 37e7bd0be3ca7297996da2abdf5a85c7
# description: The event manager for Tool
###
namespace eval ::tool::event {
  variable nextevent {}
  variable nexteventtime 0
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































































































































































































































































































































Deleted modules/tool/build/metaclass.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
#-------------------------------------------------------------------------
# TITLE: 
#    tool.tcl
#
# PROJECT:
#    tool: TclOO Helper Library
#
# DESCRIPTION:
#    tool(n): Implementation File
#
#-------------------------------------------------------------------------

namespace eval ::tool {}

###
# New OO Keywords for TOOL
###
namespace eval ::tool::define {}
proc ::tool::define::array {name {values {}}} {
  set class [current_class]
  set name [string trimright $name :]:
  if {![::oo::meta::info $class exists array $name]} {
    ::oo::meta::info $class set array $name {}
  }
  foreach {var val} $values {
    ::oo::meta::info $class set array $name: $var $val
  }
}

###
# topic: 710a93168e4ba7a971d3dbb8a3e7bcbc
###
proc ::tool::define::component {name info} {
  set class [current_class]
  ::oo::meta::info $class branchset component $name $info
}

###
# topic: 2cfc44a49f067124fda228458f77f177
# title: Specify the constructor for a class
###
proc ::tool::define::constructor {arglist rawbody} {
  set body {
::tool::object_create [self] [info object class [self]]
# Initialize public variables and options
my InitializePublic
  }
  append body $rawbody
  append body {
# Run "initialize"
my initialize
  }
  set class [current_class]
  ::oo::define $class constructor $arglist $body
}

###
# topic: 7a5c7e04989704eef117ff3c9dd88823
# title: Specify the a method for the class object itself, instead of for objects of the class
###
proc ::tool::define::class_method {name arglist body} {
  set class [current_class]
  ::oo::meta::info $class set class_typemethod $name: [list $arglist $body]
}

###
# topic: 4cb3696bf06d1e372107795de7fe1545
# title: Specify the destructor for a class
###
proc ::tool::define::destructor rawbody {
  set body {
# Run the destructor once and only once
set self [self]
my variable DestroyEvent
if {$DestroyEvent} return
set DestroyEvent 1
::tool::object_destroy $self
}
  append body $rawbody
  ::oo::define [current_class] destructor $body
}

###
# topic: 8bcae430f1eda4ccdb96daedeeea3bd409c6bb7a
# description: Add properties and option handling
###
proc ::tool::define::property args {
  set class [current_class]
  switch [llength $args] {
    2 {
      set type const
      set property [string trimleft [lindex $args 0] :]
      set value [lindex $args 1]
      ::oo::meta::info $class set $type $property: $value
      return
    }
    3 {
      set type     [lindex $args 0]
      set property [string trimleft [lindex $args 1] :]
      set value    [lindex $args 2]
      ::oo::meta::info $class set $type $property: $value
      return
    }
    default {
      error "Usage:
property name type valuedict
OR property name value"
    }
  }
  ::oo::meta::info $class set {*}$args
}

###
# topic: 615b7c43b863b0d8d1f9107a8d126b21
# title: Specify a variable which should be initialized in the constructor
# description:
#    This keyword can also be expressed:
#    [example {property variable NAME {default DEFAULT}}]
#    [para]
#    Variables registered in the variable property are also initialized
#    (if missing) when the object changes class via the [emph morph] method.
###
proc ::tool::define::variable {name {default {}}} {
  set class [current_class]
  set name [string trimright $name :]
  ::oo::meta::info $class set variable $name: $default
  ::oo::define $class variable $name
}

###
# Utility Procedures
###

# topic: 643efabec4303b20b66b760a1ad279bf
###
proc ::tool::args_to_dict args {
  if {[llength $args]==1} {
    return [lindex $args 0]
  }
  return $args
}

###
# topic: b40970b0d9a2525990b9105ec8c96d3d
###
proc ::tool::args_to_options args {
  set result {}
  foreach {var val} [args_to_dict {*}$args] {
    lappend result [string trimright [string trimleft $var -] :] $val
  }
  return $result
}

###
# topic: a92cd258900010f656f4c6e7dbffae57
###
proc ::tool::dynamic_methods class {
  ::oo::meta::rebuild $class
  set metadata [::oo::meta::metadata $class]
  foreach command [info commands [namespace current]::dynamic_methods_*] {
    $command $class $metadata
  }
}

###
# topic: 4969d897a83d91a230a17f166dbcaede
###
proc ::tool::dynamic_arguments {ensemble method arglist args} {
  set idx 0
  set len [llength $args]
  if {$len > [llength $arglist]} {
    ###
    # Catch if the user supplies too many arguments
    ###
    set dargs 0
    if {[lindex $arglist end] ni {args dictargs}} {
      return -code error -level 2 "Usage: $ensemble $method [string trim [dynamic_wrongargs_message $arglist]]"
    }
  }
  foreach argdef $arglist {
    if {$argdef eq "args"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      break
    }
    if {$argdef eq "dictargs"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      ###
      # Perform args processing in the style of tool
      ###
      set dictargs [::tool::args_to_options {*}[lrange $args $idx end]]
      uplevel 1 [list set dictargs $dictargs]
      break
    }
    if {$idx > $len} {
      ###
      # Catch if the user supplies too few arguments
      ###
      if {[llength $argdef]==1} {
        return -code error -level 2 "Usage: $ensemble $method [string trim [dynamic_wrongargs_message $arglist]]"
      } else {
        uplevel 1 [list set [lindex $argdef 0] [lindex $argdef 1]]
      }
    } else {
      uplevel 1 [list set [lindex $argdef 0] [lindex $args $idx]]
    }
    incr idx
  }
}

###
# topic: b88add196bb63abccc44639db5e5eae1
###
proc ::tool::dynamic_methods_class {thisclass metadata} {
  foreach {method info} [dict getnull $metadata class_typemethod] {
    lassign $info arglist body
    set method [string trimright $method :]
    ::oo::objdefine $thisclass method $method $arglist $body
  }
}

###
# topic: 53ab28ac5c6ee601fe1fe07b073be88e
###
proc ::tool::dynamic_wrongargs_message {arglist} {
  set result ""
  set dargs 0
  foreach argdef $arglist {
    if {$argdef in {args dictargs}} {
      set dargs 1
      break
    }
    if {[llength $argdef]==1} {
      append result " $argdef"
    } else {
      append result " ?[lindex $argdef 0]?"
    }
  }
  if { $dargs } {
    append result " ?option value?..."
  }
  return $result
}

proc ::tool::object_create {objname {class {}}} {
  foreach varname {
    object_info
    object_signal
    object_subscribe
  } {
    variable $varname
    set ${varname}($objname) {}
  }
  if {$class eq {}} {
    set class [info object class $objname]
  }
   set object_info($objname) [list class $class]
  if {$class ne {}} {
    $objname graft class $class
    foreach command [info commands [namespace current]::dynamic_object_*] {
      $command $objname $class
    }
  }
}


proc ::tool::object_rename {object newname} {
  foreach varname {
    object_info
    object_signal
    object_subscribe
  } {
    variable $varname
    if {[info exists ${varname}($object)]} {
      set ${varname}($newname) [set ${varname}($object)]
      unset ${varname}($object)
    }
  }
  variable coroutine_object
  foreach {coro coro_objname} [array get coroutine_object] {
    if { $object eq $coro_objname } {
      set coroutine_object($coro) $newname
    }
  }
  rename $object ::[string trimleft $newname]
  ::tool::event::generate $object object_rename [list newname $newname]
}

proc ::tool::object_destroy objname {
  ::tool::event::generate $objname object_destroy [list objname $objname]
  ::tool::event::cancel $objname *
  ::cron::object_destroy $objname
  variable coroutine_object
  foreach varname {
    object_info
    object_signal
    object_subscribe
  } {
    variable $varname
    unset -nocomplain ${varname}($objname)
  }
}

#-------------------------------------------------------------------------
# Option Handling Mother of all Classes

# tool::object
#
# This class is inherited by all classes that have options.
#

::tool::define ::tool::object {
  # Put MOACish stuff in here
  variable signals_pending create
  variable organs {}
  variable mixins {}
  variable mixinmap {}
  variable DestroyEvent 0

  constructor args {
    my Config_merge [::tool::args_to_options {*}$args]
  }
  
  destructor {}
    
  method ancestors {{reverse 0}} {
    set result [::oo::meta::ancestors [info object class [self]]]
    if {$reverse} {
      return [lreverse $result]
    }
    return $result
  }
  
  method DestroyEvent {} {
    my variable DestroyEvent
    return $DestroyEvent
  }
  
  ###
  # title: Forward a method
  ###
  method forward {method args} {
    oo::objdefine [self] forward $method {*}$args
  }
  
  ###
  # title: Direct a series of sub-functions to a seperate object
  ###
  method graft args {
    my variable organs
    if {[llength $args] == 1} {
      error "Need two arguments"
    }
    set object {}
    foreach {stub object} $args {
      if {$stub eq "class"} {
        # Force class to always track the object's current class
        set obj [info object class [self]]
      }
      dict set organs $stub $object
      oo::objdefine [self] forward <${stub}> $object
      oo::objdefine [self] export <${stub}>
    }
    return $object
  }
  
  # Called after all options and public variables are initialized
  method initialize {} {}
  
  ###
  # topic: 3c4893b65a1c79b2549b9ee88f23c9e3
  # description:
  #    Provide a default value for all options and
  #    publically declared variables, and locks the
  #    pipeline mutex to prevent signal processing
  #    while the contructor is still running.
  #    Note, by default an odie object will ignore
  #    signals until a later call to <i>my lock remove pipeline</i>
  ###
  ###
  # topic: 3c4893b65a1c79b2549b9ee88f23c9e3
  # description:
  #    Provide a default value for all options and
  #    publically declared variables, and locks the
  #    pipeline mutex to prevent signal processing
  #    while the contructor is still running.
  #    Note, by default an odie object will ignore
  #    signals until a later call to <i>my lock remove pipeline</i>
  ###
  method InitializePublic {} {
    my variable config meta
    if {![info exists meta]} {
      set meta {}
    }
    if {![info exists config]} {
      set config {}
    }
    my ClassPublicApply {}
  }
  
  class_method info {which} {
    my variable cache
    if {![info exists cache($which)]} {
      set cache($which) {}
      switch $which {
        public {
          dict set cache(public) variable [my meta branchget variable]
          dict set cache(public) array [my meta branchget array]
          set optinfo [my meta getnull option]
          dict set cache(public) option_info $optinfo
          foreach {var info} [dict getnull $cache(public) option_info] {
            if {[dict exists $info aliases:]} {
              foreach alias [dict exists $info aliases:] {
                dict set cache(public) option_canonical $alias $var
              }
            }
            set getcmd [dict getnull $info default-command:]
            if {$getcmd ne {}} {
              dict set cache(public) option_default_command $var $getcmd
            } else {
              dict set cache(public) option_default_value $var [dict getnull $info default:]
            }
            dict set cache(public) option_canonical $var $var
          }
        }
      }
    }
    return $cache($which)
  }
  
  ###
  # Incorporate the class's variables, arrays, and options
  ###
  method ClassPublicApply class {
    my variable config
    set integrate 0
    if {$class eq {}} {
      set class [info object class [self]]      
    } else {
      set integrate 1
    }
    set public [$class info public]
    foreach {var value} [dict getnull $public variable] {
      if { $var in {meta config} } continue
      my variable $var
      if {![info exists $var]} {
        set $var $value
      }
    }
    foreach {var value} [dict getnull $public array] {
      if { $var eq {meta config} } continue
      my variable $var
      foreach {f v} $value {
        if {![array exists ${var}($f)]} {
          set ${var}($f) $v
        }
      }
    }
    set dat [dict getnull $public option_info]
    if {$integrate} {
      my meta rmerge [list option $dat]
    }
    my variable option_canonical
    array set option_canonical [dict getnull $public option_canonical]
    set dictargs {}
    foreach {var getcmd} [dict getnull $public option_default_command] {
      if {[dict getnull $dat $var class:] eq "organ"} {
        if {[my organ $var] ne {}} continue
      }
      if {[dict exists $config $var]} continue
      dict set dictargs $var [{*}[string map [list %field% $var %self% [namespace which my]] $getcmd]]
    }
    foreach {var value} [dict getnull $public option_default_value] {
      if {[dict getnull $dat $var class:] eq "organ"} {
        if {[my organ $var] ne {}} continue
      }
      if {[dict exists $config $var]} continue
      dict set dictargs $var $value
    }
    ###
    # Apply all inputs with special rules
    ###
    foreach {field val} $dictargs {
      if {[dict exists $config $field]} continue
      set script [dict getnull $dat $field set-command:]
      dict set config $field $val
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
  }
  
  ###
  # topic: 3c4893b65a1c79b2549b9ee88f23c9e3
  # description:
  #    Provide a default value for all options and
  #    publically declared variables, and locks the
  #    pipeline mutex to prevent signal processing
  #    while the contructor is still running.
  #    Note, by default an odie object will ignore
  #    signals until a later call to <i>my lock remove pipeline</i>
  ###
  method mixin args {
    ###
    # Mix in the class
    ###
    my variable mixins
    set prior $mixins

    set mixins $args
    ::oo::objdefine [self] mixin {*}$args
    ###
    # Build a compsite map of all ensembles defined by the object's current
    # class as well as all of the classes being mixed in
    ###
    set emap [::tool::ensemble_build_map [::info object class [self]] {*}[lreverse $args]]
    set body [::tool::ensemble_methods $emap]
    oo::objdefine [self] $body
    foreach class $args {
      if {$class ni $prior} {
        my meta mixin $class
      }
      my ClassPublicApply $class
    }
    foreach class $prior {
      if {$class ni $mixins } { 
        my meta mixout $class
      }
    }
  }

  method mixinmap args { 
    my variable mixinmap
    set priorlist {}
    foreach {slot classes} $args {
      if {[dict exists $mixinmap $slot]} {
        lappend priorlist {*}[dict get $mixinmap $slot]  
        foreach class [dict get $mixinmap $slot] {
          if {$class ni $classes && [$class meta exists mixin unmap-script:]} {
            if {[catch [$class meta get mixin unmap-script:] err errdat]} {
              puts stderr "[self] MIXIN ERROR POPPING $class:\n[dict get $errdat -errorinfo]"
            }
          }
        }
      }
      dict set mixinmap $slot $classes
    }
    my Recompute_Mixins
    foreach {slot classes} $args {
      foreach class $classes {
        if {$class ni $priorlist && [$class meta exists mixin map-script:]} {
          if {[catch [$class meta get mixin map-script:] err errdat]} {
            puts stderr "[self] MIXIN ERROR PUSHING $class:\n[dict get $errdat -errorinfo]"
          }
        }
      }
    }
    foreach {slot classes} $mixinmap {
      foreach class $classes {
        if {[$class meta exists mixin react-script:]} {
          if {[catch [$class meta get mixin react-script:] err errdat]} {
            puts stderr "[self] MIXIN ERROR REACTING $class:\n[dict get $errdat -errorinfo]"
          }
        }
      }
    }
  }

  method debug_mixinmap {} {
    my variable mixinmap
    return $mixinmap
  }

  method Recompute_Mixins {} {
    my variable mixinmap
    set classlist {}
    foreach {item class} $mixinmap {
      if {$class ne {}} {
        lappend classlist $class
      }
    }
    my mixin {*}$classlist
  }
  
  method morph newclass {
    if {$newclass eq {}} return
    set class [string trimleft [info object class [self]]]
    set newclass [string trimleft $newclass :]
    if {[info command ::$newclass] eq {}} {
      error "Class $newclass does not exist"
    }
    if { $class ne $newclass } {
      my Morph_leave
      my variable mixins
      oo::objdefine [self] class ::${newclass}
      my graft class ::${newclass}
      # Reapply mixins
      my mixin {*}$mixins
      my InitializePublic
      my Morph_enter
    }
  }

  ###
  # Commands to perform as this object transitions out of the present class
  ###
  method Morph_leave {} {}
  ###
  # Commands to perform as this object transitions into this class as a new class
  ###
  method Morph_enter {} {}
  
  ###
  # title: List which objects are forwarded as organs
  ###
  method organ {{stub all}} {
    my variable organs
    if {![info exists organs]} {
      return {}
    }
    if { $stub eq "all" } {
      return $organs
    }
    return [dict getnull $organs $stub]
  }
}


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Deleted modules/tool/build/option.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
###
# topic: 68aa446005235a0632a10e2a441c0777
# title: Define an option for the class
###
proc ::tool::define::option {name args} {
  set class [current_class]
  set dictargs {default: {}}
  foreach {var val} [::oo::meta::args_to_dict {*}$args] {
    dict set dictargs [string trimright [string trimleft $var -] :]: $val
  }
  set name [string trimleft $name -]

  ###
  # Option Class handling
  ###
  set optclass [dict getnull $dictargs class:]
  if {$optclass ne {}} {
    foreach {f v} [::oo::meta::info $class getnull option_class $optclass] {
      if {![dict exists $dictargs $f]} {
        dict set dictargs $f $v
      }
    }
    if {$optclass eq "variable"} {
      variable $name [dict getnull $dictargs default:]
    }
  }
  ::oo::meta::info $class branchset option $name $dictargs
}

###
# topic: 827a3a331a2e212a6e301f59c1eead59
# title: Define a class of options
# description:
#    Option classes are a template of properties that other
#    options can inherit.
###
proc ::tool::define::option_class {name args} {
  set class [current_class]
  set dictargs {default {}}
  foreach {var val} [::oo::meta::args_to_dict {*}$args] {
    dict set dictargs [string trimleft $var -] $val
  }
  set name [string trimleft $name -]
  ::oo::meta::info $class branchset option_class $name $dictargs
}

::tool::define ::tool::object {
  property options_strict 0
  variable organs {}

  option_class organ {
    widget label
    set-command {my graft %field% %value%}
    get-command {my organ %field%}
  }

  option_class variable {
    widget entry
    set-command {my variable %field% ; set %field% %value%}
    get-command {my variable %field% ; set %field%}
  }
  
  dict_ensemble config config {
    get {
      return [my Config_get {*}$args]
    }
    merge {
      return [my Config_merge {*}$args]
    }
    set {
      my Config_set {*}$args
    }
  }

  ###
  # topic: 86a1b968cea8d439df87585afdbdaadb
  ###
  method cget args {
    return [my Config_get {*}$args]
  }

  ###
  # topic: 73e2566466b836cc4535f1a437c391b0
  ###
  method configure args {
    # Will be removed at the end of "configurelist_triggers"
    set dictargs [::oo::meta::args_to_options {*}$args]
    if {[llength $dictargs] == 1} {
      return [my cget [lindex $dictargs 0]]
    }
    set dat [my Config_merge $dictargs]
    my Config_triggers $dat
  }

  method Config_get {field args} {
    my variable config option_canonical option_getcmd
    set field [string trimleft $field -]
    if {[info exists option_canonical($field)]} {
      set field $option_canonical($field)
    }
    if {[info exists option_getcmd($field)]} {
      return [eval $option_getcmd($field)]
    }
    if {[dict exists $config $field]} {
      return [dict get $config $field]
    }
    if {[llength $args]} {
      return [lindex $args 0]
    }
    return [my meta cget $field] 
  }
  
  ###
  # topic: dc9fba12ec23a3ad000c66aea17135a5
  ###
  method Config_merge dictargs {
    my variable config option_canonical
    set rawlist $dictargs
    set dictargs {}
    set dat [my meta getnull option]
    foreach {field val} $rawlist {
      set field [string trimleft $field -]
      set field [string trimright $field :]
      if {[info exists option_canonical($field)]} {
        set field $option_canonical($field)
      }
      dict set dictargs $field $val
    }
    ###
    # Validate all inputs
    ###
    foreach {field val} $dictargs {
      set script [dict getnull $dat $field validate-command:]
      if {$script ne {}} {
        dict set dictargs $field [eval [string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]]
      }
    }
    ###
    # Apply all inputs with special rules
    ###
    foreach {field val} $dictargs {
      set script [dict getnull $dat $field set-command:]
      dict set config $field $val
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
    return $dictargs
  }
  
  method Config_set args {
    set dictargs [::tool::args_to_options {*}$args]
    set dat [my Config_merge $dictargs]
    my Config_triggers $dat
  }
  
  ###
  # topic: 543c936485189593f0b9ed79b5d5f2c0
  ###
  method Config_triggers dictargs {
    set dat [my meta getnull option]
    foreach {field val} $dictargs {
      set script [dict getnull $dat $field post-command:]
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
  }

  method Option_Default field {
    set info [my meta getnull option $field]
    set getcmd [dict getnull $info default-command:]
    if {$getcmd ne {}} {
      return [{*}[string map [list %field% $field %self% [namespace which my]] $getcmd]]
    } else {
      return [dict getnull $info default:]
    }
  }
}

package provide tool::option 0.1
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































Deleted modules/tool/build/organ.tcl.

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
###
# A special class of objects that
# stores no meta data of its own
# Instead it vampires off of the master object
###
tool::class create ::tool::organelle {
  
  constructor {master} {
    my entangle $master
    set final_class [my select]
    if {[info commands $final_class] ne {}} {
      # Safe to switch class here, we haven't initialized anything
      oo::objdefine [self] class $final_class
    }
    my initialize
  }

  method entangle {master} {
    my graft master $master
    my forward meta $master meta
    foreach {stub organ} [$master organ] {
      my graft $stub $organ
    }
    foreach {methodname variable} [my meta branchget array_ensemble] {
      my forward $methodname $master $methodname
    }
  }
  
  method select {} {
    return {}
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































Deleted modules/tool/build/pipeline.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
::namespace eval ::tool::signal {}
::namespace eval ::tao {}

# Provide a backward compatible hook
proc ::tool::main {} {
  ::cron::main
}

proc ::tool::do_events {} {
  ::cron::do_events
}

proc ::tao::do_events {} {
  ::cron::do_events
}

proc ::tao::main {} {
  ::cron::main
}


package provide tool::pipeline 0.1

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































Deleted modules/tool/build/script.tcl.

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
###
# Add configure by script facilities to TOOL
###
::tool::define ::tool::object {

  ###
  # Allows for a constructor to accept a psuedo-code
  # initialization script which exercise the object's methods
  # sans "my" in front of every command
  ###
  method Eval_Script script {
    set buffer {}
    set thisline {}
    foreach line [split $script \n] {
      append thisline $line
      if {![info complete $thisline]} {
        append thisline \n
        continue
      }
      set thisline [string trim $thisline]
      if {[string index $thisline 0] eq "#"} continue
      if {[string length $thisline]==0} continue
      if {[lindex $thisline 0] eq "my"} {
        # Line already calls out "my", accept verbatim
        append buffer $thisline \n
      } elseif {[string range $thisline 0 2] eq "::"} {
        # Fully qualified commands accepted verbatim
        append buffer $thisline \n
      } elseif {
        append buffer "my $thisline" \n
      }
      set thisline {}
    }
    eval $buffer
  }
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








































































Deleted modules/tool/build/uuid.tcl.

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
::namespace eval ::tool {}

proc ::tool::is_null value {
  return [expr {$value in {{} NULL}}]
}


proc ::tool::uuid_seed args {
  if {[llength $args]==0 || ([llength $args]==1 && [is_null [lindex $args 0]])} {
    if {[info exists ::env(USERNAME)]} {
      set user $::env(USERNAME)
    } elseif {[info exists ::env(USER)]} {
      set user $::env(USER)
    } else {
      set user $::env(user)
    }
    incr ::tool::nextuuid $::tool::globaluuid
    set ::tool::UUID_Seed [list user@[info hostname] [clock format [clock seconds]]]
  } else {
    incr ::tool::globaluuid $::tool::nextuuid
    set ::tool::nextuuid 0
    set ::tool::UUID_Seed $args
  }
}

###
# topic: 0a19b0bfb98162a8a37c1d3bbfb8bc3d
# description:
#    Because the tcllib version of uuid generate requires
#    network port access (which can be slow), here's a fast
#    and dirty rendition
###
proc ::tool::uuid_generate args {
  if {![llength $args]} {
    set block [list [incr ::tool::nextuuid] {*}$::tool::UUID_Seed]
  } else {
    set block $args
  }
  return [::sha1::sha1 -hex [join $block ""]]
}

###
# topic: ee3ec43cc2cc2c7d6cf9a4ef1c345c19
###
proc ::tool::uuid_short args {
  if {![llength $args]} {
    set block [list [incr ::tool::nextuuid] {*}$::tool::UUID_Seed]
  } else {
    set block $args
  }
  return [string range [::sha1::sha1 -hex [join $block ""]] 0 16]
}

###
# topic: b14c505537274904578340ec1bc12af1
# description:
#    Implementation the uses a compiled in ::md5 implementation
#    commonly used by embedded application developers
###
namespace eval ::tool {
  namespace export *
}
###
# Cache the bits of the UUID seed that aren't likely to change
# once the software is loaded, but which can be expensive to
# generate
###
set ::tool::nextuuid 0
set ::tool::globaluuid 0
::tool::uuid_seed
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































Added modules/tool/ensemble.tcl.

























































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
::namespace eval ::tool::define {}

if {![info exists ::tool::dirty_classes]} {
  set ::tool::dirty_classes {}
}

###
# Monkey patch oometa's rebuild function to
# include a notifier to tool
###
proc ::oo::meta::rebuild args {
  foreach class $args {
    if {$class ni $::oo::meta::dirty_classes} {
      lappend ::oo::meta::dirty_classes $class
    }
    if {$class ni $::tool::dirty_classes} {
      lappend ::tool::dirty_classes $class
    }
  }
}

proc ::tool::ensemble_build_map args {
  set emap {}
  foreach thisclass $args {
    foreach {ensemble einfo} [::oo::meta::info $thisclass getnull method_ensemble] {
      foreach {submethod subinfo} $einfo {
        dict set emap $ensemble $submethod $subinfo
      }
    }
  }
  return $emap
}

proc ::tool::ensemble_methods emap {
  set result {}
  foreach {ensemble einfo} $emap {
    #set einfo [dict getnull $einfo method_ensemble $ensemble]
    set eswitch {}
    set default standard
    if {[dict exists $einfo default:]} {
      set emethodinfo [dict get $einfo default:]
      set arglist     [lindex $emethodinfo 0]
      set realbody    [lindex $emethodinfo 1]
      if {$arglist in {args {}}} {
        set body {}
      } else {
        set body "\n      ::tool::dynamic_arguments [list $arglist] {*}\$args"
      }
      append body "\n      " [string trim $realbody] "      \n"
      set default $body
      dict unset einfo default:
    }
    set methodlist {}
    foreach item [dict keys $einfo] {
      lappend methodlist [string trimright $item :]
    }
    set methodlist  [lsort -dictionary -unique $methodlist]
    foreach {submethod esubmethodinfo} [lsort -dictionary -stride 2 $einfo] {
      if {$submethod in {"_preamble:" "default:"}} continue
      set submethod [string trimright $submethod :]
      lassign $esubmethodinfo arglist realbody
      if {[string length [string trim $realbody]] eq {}} {
        dict set eswitch $submethod {}
      } else {
        if {$arglist in {args {}}} {
          set body {}
        } else {
          set body "\n      ::tool::dynamic_arguments [list $arglist] {*}\$args"
        }
        append body "\n      " [string trim $realbody] "      \n"
        dict set eswitch $submethod $body
      }
    }
    if {![dict exists $eswitch <list>]} {
      dict set eswitch <list> {return $methodlist}
    }
    if {$default=="standard"} {
      set default "error \"unknown method $ensemble \$method. Valid: \$methodlist\""
    }
    dict set eswitch default $default
    if {[dict exists $einfo _preamble:]} {
      set body [lindex [dict get $einfo _preamble:] 1]
    } else {
      set body {}
    }
    append body \n [list set methodlist $methodlist]
    append body \n "set code \[catch {switch -- \$method [list $eswitch]} result opts\]"
    append body \n {return -options $opts $result}
    append result \n [list method $ensemble {{method default} args} $body]    
  }
  return $result
}

###
# topic: fb8d74e9c08db81ee6f1275dad4d7d6f
###
proc ::tool::dynamic_object_ensembles {thisobject thisclass} {
  variable trace
  set ensembledict {}
  foreach dclass $::tool::dirty_classes {
    foreach {cclass cancestors} [array get ::oo::meta::cached_hierarchy] {
      if {$dclass in $cancestors} {
        unset -nocomplain ::tool::obj_ensemble_cache($cclass)
      }
    }
  }
  set ::tool::dirty_classes {}
  ###
  # Only go through the motions for classes that have a locally defined
  # ensemble method implementation
  ###
  foreach aclass [::oo::meta::ancestors $thisclass] {
    if {[info exists ::tool::obj_ensemble_cache($aclass)]} continue
    set emap [::tool::ensemble_build_map $aclass]
    set body [::tool::ensemble_methods $emap]
    oo::define $aclass $body
    # Define a property for this ensemble for introspection
    foreach {ensemble einfo} $emap {
      ::oo::meta::info $aclass set ensemble_methods $ensemble: [lsort -dictionary [dict keys $einfo]]
    }
    set ::tool::obj_ensemble_cache($aclass) 1
  }
}

###
# topic: ec9ca249b75e2667ad5bcb2f7cd8c568
# title: Define an ensemble method for this agent
###
::proc ::tool::define::method {rawmethod args} {
  set class [current_class]
  set mlist [split $rawmethod "::"]
  if {[llength $mlist]==1} {
    ###
    # Simple method, needs no parsing
    ###
    set method $rawmethod
    ::oo::define $class method $rawmethod {*}$args
    return
  }
  set ensemble [lindex $mlist 0]
  set method [join [lrange $mlist 2 end] "::"]
  switch [llength $args] {
    1 {
      ::oo::meta::info $class set method_ensemble $ensemble $method: [list dictargs [lindex $args 0]]
    }
    2 {
      ::oo::meta::info $class set method_ensemble $ensemble $method: $args
    }
    default {
      error "Usage: method NAME ARGLIST BODY"
    }
  }
}

###
# topic: 354490e9e9708425a6662239f2058401946e41a1
# description: Creates a method which exports access to an internal dict
###
proc ::tool::define::dictobj args {
  dict_ensemble {*}$args
}
proc ::tool::define::dict_ensemble {methodname varname {cases {}}} {
  set class [current_class]
  set CASES [string map [list %METHOD% $methodname %VARNAME% $varname] $cases]
  
  set methoddata [::oo::meta::info $class getnull method_ensemble $methodname]
  set initial [dict getnull $cases initialize]
  variable $varname $initial
  foreach {name body} $CASES {
    dict set methoddata $name: [list args $body]
  }
  set template [string map [list %CLASS% $class %INITIAL% $initial %METHOD% $methodname %VARNAME% $varname] {
    _preamble {} {
      my variable %VARNAME%
    }
    add args {
      set field [string trimright [lindex $args 0] :]
      set data [dict getnull $%VARNAME% $field]
      foreach item [lrange $args 1 end] {
        if {$item ni $data} {
          lappend data $item
        }
      }
      dict set %VARNAME% $field $data
    }
    remove args {
      set field [string trimright [lindex $args 0] :]
      set data [dict getnull $%VARNAME% $field]
      set result {}
      foreach item $data {
        if {$item in $args} continue
        lappend result $item
      }
      dict set %VARNAME% $field $result
    }
    initial {} {
      return [dict rmerge [my meta branchget %VARNAME%] {%INITIAL%}]
    }
    reset {} {
      set %VARNAME% [dict rmerge [my meta branchget %VARNAME%] {%INITIAL%}]
      return $%VARNAME%
    }
    dump {} {
      return $%VARNAME%
    }
    append args {
      return [dict $method %VARNAME% {*}$args]
    }
    incr args {
      return [dict $method %VARNAME% {*}$args]
    }
    lappend args {
      return [dict $method %VARNAME% {*}$args]
    }
    set args {
      return [dict $method %VARNAME% {*}$args]
    }
    unset args {
      return [dict $method %VARNAME% {*}$args]
    }
    update args {
      return [dict $method %VARNAME% {*}$args]
    }
    branchset args {
      foreach {field value} [lindex $args end] {
        dict set %VARNAME% {*}[lrange $args 0 end-1] [string trimright $field :]: $value
      }
    }
    rmerge args {
      set %VARNAME% [dict rmerge $%VARNAME% {*}$args]
      return $%VARNAME%  
    }
    merge args {
      set %VARNAME% [dict rmerge $%VARNAME% {*}$args]
      return $%VARNAME%
    }
    replace args {
      set %VARNAME% [dict rmerge $%VARNAME% {%INITIAL%} {*}$args]
    }
    default args {
      return [dict $method $%VARNAME% {*}$args]
    }
  }]
  foreach {name arglist body} $template {
    if {[dict exists $methoddata $name:]} continue
    dict set methoddata $name: [list $arglist $body]
  }
  ::oo::meta::info $class set method_ensemble $methodname $methoddata
}

proc ::tool::define::arrayobj args {
  array_ensemble {*}$args
}

###
# topic: 354490e9e9708425a6662239f2058401946e41a1
# description: Creates a method which exports access to an internal array
###
proc ::tool::define::array_ensemble {methodname varname {cases {}}} {
  set class [current_class]
  set CASES [string map [list %METHOD% $methodname %VARNAME% $varname] $cases]
  set initial [dict getnull $cases initialize]
  array $varname $initial

  set map [list %CLASS% $class %METHOD% $methodname %VARNAME% $varname %CASES% $CASES %INITIAL% $initial]

  ::oo::define $class method _${methodname}Get {field} [string map $map {
    my variable %VARNAME%
    if {[info exists %VARNAME%($field)]} {
      return $%VARNAME%($field)
    }
    return [my meta getnull %VARNAME% $field:]
  }]
  ::oo::define $class method _${methodname}Exists {field} [string map $map {
    my variable %VARNAME%
    if {[info exists %VARNAME%($field)]} {
      return 1
    }
    return [my meta exists %VARNAME% $field:]
  }]
  set methoddata [::oo::meta::info $class set array_ensemble $methodname: $varname]
  
  set methoddata [::oo::meta::info $class getnull method_ensemble $methodname]
  foreach {name body} $CASES {
    dict set methoddata $name: [list args $body]
  } 
  set template  [string map [list %CLASS% $class %INITIAL% $initial %METHOD% $methodname %VARNAME% $varname] {
    _preamble {} {
      my variable %VARNAME%
    }
    reset {} {
      ::array unset %VARNAME% *
      foreach {field value} [my meta getnull %VARNAME%] {
        set %VARNAME%([string trimright $field :]) $value
      }
      ::array set %VARNAME% {%INITIAL%}
      return [array get %VARNAME%]
    }
    ni value {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      return [expr {$value ni $data}]
    }
    in value {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      return [expr {$value in $data}]
    }
    add args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      foreach item [lrange $args 1 end] {
        if {$item ni $data} {
          lappend data $item
        }
      }
      set %VARNAME%($field) $data
    }
    remove args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      set result {}
      foreach item $data {
        if {$item in $args} continue
        lappend result $item
      }
      set %VARNAME%($field) $result
    }
    dump {} {
      set result {}
      foreach {var val} [my meta getnull %VARNAME%] {
        dict set result [string trimright $var :] $val
      }
      foreach {var val} [lsort -dictionary -stride 2 [array get %VARNAME%]] {
        dict set result [string trimright $var :] $val
      }
      return $result
    }
    exists args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Exists $field]
    }
    getnull args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]      
    }
    get field {
      set field [string trimright $field :]
      set data [my _%METHOD%Get $field]
    }
    set args {
      set field [string trimright [lindex $args 0] :]
      ::set %VARNAME%($field) {*}[lrange $args 1 end]        
    }
    append args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      ::append data {*}[lrange $args 1 end]
      set %VARNAME%($field) $data
    }
    incr args {
      set field [string trimright [lindex $args 0] :]
      ::incr %VARNAME%($field) {*}[lrange $args 1 end]
    }
    lappend args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      $method data {*}[lrange $args 1 end]
      set %VARNAME%($field) $data
    }
    branchset args {
      foreach {field value} [lindex $args end] {
        set %VARNAME%([string trimright $field :]) $value
      }
    }
    rmerge args {
      foreach arg $args {
        my %VARNAME% branchset $arg
      }
    }
    merge args {
      foreach arg $args {
        my %VARNAME% branchset $arg
      }
    }
    default args {
      return [array $method %VARNAME% {*}$args]
    }
  }]
  foreach {name arglist body} $template {
    if {[dict exists $methoddata $name:]} continue
    dict set methoddata $name: [list $arglist $body]
  }
  ::oo::meta::info $class set method_ensemble $methodname $methoddata
}

Added modules/tool/event.tcl.











































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
###
# This file implements the Tool event manager
###

::namespace eval ::tool {}

::namespace eval ::tool::event {}

###
# topic: f2853d380a732845610e40375bcdbe0f
# description: Cancel a scheduled event
###
proc ::tool::event::cancel {self {task *}} {
  variable timer_event
  foreach {id event} [array get timer_event $self:$task] {
    ::after cancel $event
    set timer_event($id) {}
  }
}

###
# topic: 8ec32f6b6ba78eaf980524f8dec55b49
# description:
#    Generate an event
#    Adds a subscription mechanism for objects
#    to see who has recieved this event and prevent
#    spamming or infinite recursion
###
proc ::tool::event::generate {self event args} {
  set wholist [Notification_list $self $event]
  if {$wholist eq {}} return
  set dictargs [::oo::meta::args_to_options {*}$args]
  set info $dictargs
  set strict 0
  set debug 0
  set sender $self
  dict with dictargs {}
  dict set info id     [::tool::event::nextid]
  dict set info origin $self
  dict set info sender $sender
  dict set info rcpt   {}
  foreach who $wholist {
    catch {::tool::event::notify $who $self $event $info}
  }
}

###
# topic: 891289a24b8cc52b6c228f6edb169959
# title: Return a unique event handle
###
proc ::tool::event::nextid {} {
  return "event#[format %0.8x [incr ::tool::event_count]]"
}

###
# topic: 1e53e8405b4631aec17f98b3e8a5d6a4
# description:
#    Called recursively to produce a list of
#    who recieves notifications
###
proc ::tool::event::Notification_list {self event {stackvar {}}} {
  set notify_list {}
  foreach {obj patternlist} [array get ::tool::object_subscribe] {
    if {$obj eq $self} continue
    if {$obj in $notify_list} continue
    set match 0
    foreach {objpat eventlist} $patternlist {
      if {![string match $objpat $self]} continue
      foreach eventpat $eventlist {
        if {![string match $eventpat $event]} continue
        set match 1
        break
      }
      if {$match} {
        break
      }
    }
    if {$match} {
      lappend notify_list $obj
    }
  }
  return $notify_list
}

###
# topic: b4b12f6aed69f74529be10966afd81da
###
proc ::tool::event::notify {rcpt sender event eventinfo} {
  if {[info commands $rcpt] eq {}} return 
  if {$::tool::trace} {
    puts [list event notify rcpt $rcpt sender $sender event $event info $eventinfo]
  }
  $rcpt notify $event $sender $eventinfo
}

###
# topic: 829c89bda736aed1c16bb0c570037088
###
proc ::tool::event::process {self handle script} {
  variable timer_event
  array unset timer_event $self:$handle
  set err [catch {uplevel #0 $script} result errdat]
  if $err {
    puts "BGError: $self $handle $script
ERR: $result
[dict get $errdat -errorinfo]
***"
  }
}

###
# topic: eba686cffe18cd141ac9b4accfc634bb
# description: Schedule an event to occur later
###
proc ::tool::event::schedule {self handle interval script} {
  variable timer_event
  if {$::tool::trace} {
    puts [list $self schedule $handle $interval]
  }
  if {[info exists timer_event($self:$handle)]} {
    ::after cancel $timer_event($self:$handle)
  }
  set timer_event($self:$handle) [::after $interval [list ::tool::event::process $self $handle $script]]
}

proc ::tool::event::sleep msec {
  if {[info coroutine] ne {}} {
    set coro [info coroutine]
    ::after $msec [string map [list %coro% $coro] {
if {[info commands %coro%] ne {}} {
  %coro% wake
}
}]
    return [yield]
  } else {
    variable sleeper_count
    incr sleeper_count
    set ::tool::event::sleeper($sleeper_count) 0
    after 1000 [list set ::tool::event::sleeper($sleeper_count) 1]
    vwait ::tool::event::sleeper($sleeper_count)
    unset ::tool::event::sleeper($sleeper_count)
  }
}

###
# topic: e64cff024027ee93403edddd5dd9fdde
###
proc ::tool::event::subscribe {self who event} {
  upvar #0 ::tool::object_subscribe($self) subscriptions
  if {![info exists subscriptions]} {
    set subscriptions {}
  }
  set match 0
  foreach {objpat eventlist} $subscriptions {
    if {![string match $objpat $who]} continue      
    foreach eventpat $eventlist {
      if {[string match $eventpat $event]} {
        # This rule already exists
        return
      }
    }
  }
  dict lappend subscriptions $who $event
}

###
# topic: 5f74cfd01735fb1a90705a5f74f6cd8f
###
proc ::tool::event::unsubscribe {self args} {
  upvar #0 ::tool::object_subscribe($self) subscriptions
  if {![info exists subscriptions]} {
    return
  }  
  switch [llength $args] {
    1 {
      set event [lindex $args 0]
      if {$event eq "*"} {
        # Shortcut, if the 
        set subscriptions {}
      } else {
        set newlist {}
        foreach {objpat eventlist} $subscriptions {
          foreach eventpat $eventlist {
            if {[string match $event $eventpat]} continue
            dict lappend newlist $objpat $eventpat
          }
        }
        set subscriptions $newlist
      }
    }
    2 {
      set who [lindex $args 0]
      set event [lindex $args 1]
      if {$who eq "*" && $event eq "*"} {
        set subscriptions {}
      } else {
        set newlist {}
        foreach {objpat eventlist} $subscriptions {
          if {[string match $who $objpat]} {
            foreach eventpat $eventlist {
              if {[string match $event $eventpat]} continue
              dict lappend newlist $objpat $eventpat
            }
          }
        }
        set subscriptions $newlist
      }
    }
  }
}

::tool::define ::tool::object {
  ###
  # topic: 20b4a97617b2b969b96997e7b241a98a
  ###
  method event {submethod args} {
    ::tool::event::$submethod [self] {*}$args
  }
}

###
# topic: 37e7bd0be3ca7297996da2abdf5a85c7
# description: The event manager for Tool
###
namespace eval ::tool::event {
  variable nextevent {}
  variable nexteventtime 0
}

Added modules/tool/index.tcl.

























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
package require Tcl 8.6 ;# try in pipeline.tcl. Possibly other things.
package require dicttool
package require TclOO
package require sha1
#package require cron 2.0
package require oo::meta 0.5.1
package require oo::dialect

::oo::dialect::create ::tool
::namespace eval ::tool {}
set ::tool::trace 0
###
# topic: 27196ce57a9fd09198a0b277aabdb0a96b432cb9
###
proc ::tool::pathload {path {order {}} {skip {}}} {
  ###
  # On windows while running under a VFS, the system sometimes
  # gets confused about the volume we are running under
  ###
  if {$::tcl_platform(platform) eq "windows"} {
    if {[string range $path 1 6] eq ":/zvfs"} {
      set path [string range $path 2 end]
    }
  }
  set loaded {pkgIndex.tcl index.tcl}
  foreach item $skip {
    lappend loaded [file tail $skip]
  }
  if {[file exists [file join $path metaclass.tcl]]} {
    lappend loaded metaclass.tcl
    uplevel #0 [list source [file join $path metaclass.tcl]]
  }
  if {[file exists [file join $path baseclass.tcl]]} {
    lappend loaded baseclass.tcl
    uplevel #0 [list source [file join $path baseclass.tcl]]
  }
  foreach file $order {
    set file [file tail $file]
    if {$file in $loaded} continue
    uplevel #0 [list source [file join $path $file]]
    lappend loaded $file
  }
  foreach file [lsort -dictionary [glob -nocomplain [file join $path *.tcl]]] {
    if {[file tail $file] in $loaded} continue
    uplevel #0 [list source $file]
    lappend loaded [file tail $file]
  }
}

set idxfile [file join [pwd] [info script]]
set cwd [file dirname $idxfile]
set ::tool::tool_root [file dirname $cwd]
::tool::pathload $cwd {
  uuid.tcl
  ensemble.tcl
  metaclass.tcl
  event.tcl
} $idxfile
package provide tool 0.6.1

Changes to modules/tool/meta.man.

157
158
159
160
161
162
163
164
165

[list_end]

[section AUTHORS]
Donal Fellows, Andreas Kupries

[vset CATEGORY oo::util]
[include ../common-text/feedback.inc]
[manpage_end]







|

157
158
159
160
161
162
163
164
165

[list_end]

[section AUTHORS]
Donal Fellows, Andreas Kupries

[vset CATEGORY oo::util]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Added modules/tool/metaclass.tcl.

































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
#-------------------------------------------------------------------------
# TITLE: 
#    tool.tcl
#
# PROJECT:
#    tool: TclOO Helper Library
#
# DESCRIPTION:
#    tool(n): Implementation File
#
#-------------------------------------------------------------------------

namespace eval ::tool {}

###
# New OO Keywords for TOOL
###
namespace eval ::tool::define {}
proc ::tool::define::array {name {values {}}} {
  set class [current_class]
  set name [string trimright $name :]:
  if {![::oo::meta::info $class exists array $name]} {
    ::oo::meta::info $class set array $name {}
  }
  foreach {var val} $values {
    ::oo::meta::info $class set array $name: $var $val
  }
}

###
# topic: 710a93168e4ba7a971d3dbb8a3e7bcbc
###
proc ::tool::define::component {name info} {
  set class [current_class]
  ::oo::meta::info $class branchset component $name $info
}

###
# topic: 2cfc44a49f067124fda228458f77f177
# title: Specify the constructor for a class
###
proc ::tool::define::constructor {arglist rawbody} {
  set body {
::tool::object_create [self] [info object class [self]]
# Initialize public variables and options
my InitializePublic
  }
  append body $rawbody
  append body {
# Run "initialize"
my initialize
  }
  set class [current_class]
  ::oo::define $class constructor $arglist $body
}

###
# topic: 7a5c7e04989704eef117ff3c9dd88823
# title: Specify the a method for the class object itself, instead of for objects of the class
###
proc ::tool::define::class_method {name arglist body} {
  set class [current_class]
  ::oo::meta::info $class set class_typemethod $name: [list $arglist $body]
}

###
# topic: 4cb3696bf06d1e372107795de7fe1545
# title: Specify the destructor for a class
###
proc ::tool::define::destructor rawbody {
  set body {
::tool::object_destroy [self]
  }
  append body $rawbody
  ::oo::define [current_class] destructor $body
}

###
# topic: 8bcae430f1eda4ccdb96daedeeea3bd409c6bb7a
# description: Add properties and option handling
###
proc ::tool::define::property args {
  set class [current_class]
  switch [llength $args] {
    2 {
      set type const
      set property [string trimleft [lindex $args 0] :]
      set value [lindex $args 1]
      ::oo::meta::info $class set $type $property: $value
      return
    }
    3 {
      set type     [lindex $args 0]
      set property [string trimleft [lindex $args 1] :]
      set value    [lindex $args 2]
      ::oo::meta::info $class set $type $property: $value
      return
    }
    default {
      error "Usage:
property name type valuedict
OR property name value"
    }
  }
  ::oo::meta::info $class set {*}$args
}

###
# topic: 615b7c43b863b0d8d1f9107a8d126b21
# title: Specify a variable which should be initialized in the constructor
# description:
#    This keyword can also be expressed:
#    [example {property variable NAME {default DEFAULT}}]
#    [para]
#    Variables registered in the variable property are also initialized
#    (if missing) when the object changes class via the [emph morph] method.
###
proc ::tool::define::variable {name {default {}}} {
  set class [current_class]
  set name [string trimright $name :]
  ::oo::meta::info $class set variable $name: $default
  ::oo::define $class variable $name
}

###
# Utility Procedures
###

# topic: 643efabec4303b20b66b760a1ad279bf
###
proc ::tool::args_to_dict args {
  if {[llength $args]==1} {
    return [lindex $args 0]
  }
  return $args
}

###
# topic: b40970b0d9a2525990b9105ec8c96d3d
###
proc ::tool::args_to_options args {
  set result {}
  foreach {var val} [args_to_dict {*}$args] {
    lappend result [string trimright [string trimleft $var -] :] $val
  }
  return $result
}

###
# topic: a92cd258900010f656f4c6e7dbffae57
###
proc ::tool::dynamic_methods class {
  ::oo::meta::rebuild $class
  set metadata [::oo::meta::metadata $class]
  foreach command [info commands [namespace current]::dynamic_methods_*] {
    $command $class $metadata
  }
}

###
# topic: 4969d897a83d91a230a17f166dbcaede
###
proc ::tool::dynamic_arguments {arglist args} {
  set idx 0
  set len [llength $args]
  if {$len > [llength $arglist]} {
    ###
    # Catch if the user supplies too many arguments
    ###
    set dargs 0
    if {[lindex $arglist end] ni {args dictargs}} {
      set string [dynamic_wrongargs_message $arglist]
      error $string
    }
  }
  foreach argdef $arglist {
    if {$argdef eq "args"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      break
    }
    if {$argdef eq "dictargs"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      ###
      # Perform args processing in the style of tool
      ###
      set dictargs [::tool::args_to_options {*}[lrange $args $idx end]]
      uplevel 1 [list set dictargs $dictargs]
      break
    }
    if {$idx > $len} {
      ###
      # Catch if the user supplies too few arguments
      ###
      if {[llength $argdef]==1} {
        set string [dynamic_wrongargs_message $arglist]
        error $string
      } else {
        uplevel 1 [list set [lindex $argdef 0] [lindex $argdef 1]]
      }
    } else {
      uplevel 1 [list set [lindex $argdef 0] [lindex $args $idx]]
    }
    incr idx
  }
}

###
# topic: b88add196bb63abccc44639db5e5eae1
###
proc ::tool::dynamic_methods_class {thisclass metadata} {
  foreach {method info} [dict getnull $metadata class_typemethod] {
    lassign $info arglist body
    set method [string trimright $method :]
    ::oo::objdefine $thisclass method $method $arglist $body
  }
}

###
# topic: 53ab28ac5c6ee601fe1fe07b073be88e
###
proc ::tool::dynamic_wrongargs_message arglist {
  set result "Wrong # args: should be:"
  set dargs 0
  foreach argdef $arglist {
    if {$argdef in {args dictargs}} {
      set dargs 1
      break
    }
    if {[llength $argdef]==1} {
      append result " $argdef"
    } else {
      append result " ?[lindex $argdef 0]?"
    }
  }
  if { $dargs } {
    append result " ?option value?..."
  }
  return $result
}

proc ::tool::object_create {objname {class {}}} {
  foreach varname {
    object_info
    object_signal
    object_subscribe
  } {
    variable $varname
    set ${varname}($objname) {}
  }
  if {$class eq {}} {
    set class [info object class $objname]
  }
   set object_info($objname) [list class $class]
  if {$class ne {}} {
    $objname graft class $class
    foreach command [info commands [namespace current]::dynamic_object_*] {
      $command $objname $class
    }
  }
}


proc ::tool::object_rename {object newname} {
  foreach varname {
    object_info
    object_signal
    object_subscribe
  } {
    variable $varname
    if {[info exists ${varname}($object)]} {
      set ${varname}($newname) [set ${varname}($object)]
      unset ${varname}($object)
    }
  }
  variable coroutine_object
  foreach {coro coro_objname} [array get coroutine_object] {
    if { $object eq $coro_objname } {
      set coroutine_object($coro) $newname
    }
  }
  rename $object ::[string trimleft $newname]
  ::tool::event::generate $object object_rename [list newname $newname]
}

proc ::tool::object_destroy objname {
  ::tool::event::generate $objname object_destroy [list objname $objname]
  ::tool::event::cancel $objname *
  ::cron::object_destroy $objname
  variable coroutine_object
  foreach varname {
    object_info
    object_signal
    object_subscribe
  } {
    variable $varname
    unset -nocomplain ${varname}($objname)
  }
}

#-------------------------------------------------------------------------
# Option Handling Mother of all Classes

# tool::object
#
# This class is inherited by all classes that have options.
#

::tool::define ::tool::object {
  # Put MOACish stuff in here
  variable signals_pending create
  variable organs {}
  variable mixins {}
  
  constructor args {
    my Config_merge [::tool::args_to_options {*}$args]
  }
  
  destructor {}
    
  method ancestors {{reverse 0}} {
    set result [::oo::meta::ancestors [info object class [self]]]
    if {$reverse} {
      return [lreverse $result]
    }
    return $result
  }
  
  ###
  # title: Forward a method
  ###
  method forward {method args} {
    oo::objdefine [self] forward $method {*}$args
  }
  
  ###
  # title: Direct a series of sub-functions to a seperate object
  ###
  method graft args {
    my variable organs
    if {[llength $args] == 1} {
      error "Need two arguments"
    }
    set object {}
    foreach {stub object} $args {
      if {$stub eq "class"} {
        # Force class to always track the object's current class
        set obj [info object class [self]]
      }
      dict set organs $stub $object
      oo::objdefine [self] forward <${stub}> $object
      oo::objdefine [self] export <${stub}>
    }
    return $object
  }
  
  # Called after all options and public variables are initialized
  method initialize {} {}
  
  ###
  # topic: 3c4893b65a1c79b2549b9ee88f23c9e3
  # description:
  #    Provide a default value for all options and
  #    publically declared variables, and locks the
  #    pipeline mutex to prevent signal processing
  #    while the contructor is still running.
  #    Note, by default an odie object will ignore
  #    signals until a later call to <i>my lock remove pipeline</i>
  ###
  ###
  # topic: 3c4893b65a1c79b2549b9ee88f23c9e3
  # description:
  #    Provide a default value for all options and
  #    publically declared variables, and locks the
  #    pipeline mutex to prevent signal processing
  #    while the contructor is still running.
  #    Note, by default an odie object will ignore
  #    signals until a later call to <i>my lock remove pipeline</i>
  ###
  method InitializePublic {} {
    my variable config meta
    if {![info exists meta]} {
      set meta {}
    }
    if {![info exists config]} {
      set config {}
    }
    my ClassPublicApply {}
  }
  
  class_method info {which} {
    my variable cache
    if {![info exists cache($which)]} {
      set cache($which) {}
      switch $which {
        public {
          dict set cache(public) variable [my meta branchget variable]
          dict set cache(public) array [my meta branchget array]
          set optinfo [my meta getnull option]
          dict set cache(public) option_info $optinfo
          foreach {var info} [dict getnull $cache(public) option_info] {
            if {[dict exists $info aliases:]} {
              foreach alias [dict exists $info aliases:] {
                dict set cache(public) option_canonical $alias $var
              }
            }
            set getcmd [dict getnull $info default-command:]
            if {$getcmd ne {}} {
              dict set cache(public) option_default_command $var $getcmd
            } else {
              dict set cache(public) option_default_value $var [dict getnull $info default:]
            }
            dict set cache(public) option_canonical $var $var
          }
        }
      }
    }
    return $cache($which)
  }
  
  ###
  # Incorporate the class's variables, arrays, and options
  ###
  method ClassPublicApply class {
    my variable config
    set integrate 0
    if {$class eq {}} {
      set class [info object class [self]]      
    } else {
      set integrate 1
    }
    set public [$class info public]
    foreach {var value} [dict getnull $public variable] {
      if { $var in {meta config} } continue
      my variable $var
      if {![info exists $var]} {
        set $var $value
      }
    }
    foreach {var value} [dict getnull $public array] {
      if { $var eq {meta config} } continue
      my variable $var
      foreach {f v} $value {
        if {![array exists ${var}($f)]} {
          set ${var}($f) $v
        }
      }
    }
    set dat [dict getnull $public option_info]
    if {$integrate} {
      my meta rmerge [list option $dat]
    }
    my variable option_canonical
    array set option_canonical [dict getnull $public option_canonical]
    set dictargs {}
    foreach {var getcmd} [dict getnull $public option_default_command] {
      if {[dict getnull $dat $var class:] eq "organ"} {
        if {[my organ $var] ne {}} continue
      }
      if {[dict exists $config $var]} continue
      dict set dictargs $var [{*}[string map [list %field% $var %self% [namespace which my]] $getcmd]]
    }
    foreach {var value} [dict getnull $public option_default_value] {
      if {[dict getnull $dat $var class:] eq "organ"} {
        if {[my organ $var] ne {}} continue
      }
      if {[dict exists $config $var]} continue
      dict set dictargs $var $value
    }
    ###
    # Apply all inputs with special rules
    ###
    foreach {field val} $dictargs {
      if {[dict exists $config $field]} continue
      set script [dict getnull $dat $field set-command:]
      dict set config $field $val
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
  }
  
  ###
  # topic: 3c4893b65a1c79b2549b9ee88f23c9e3
  # description:
  #    Provide a default value for all options and
  #    publically declared variables, and locks the
  #    pipeline mutex to prevent signal processing
  #    while the contructor is still running.
  #    Note, by default an odie object will ignore
  #    signals until a later call to <i>my lock remove pipeline</i>
  ###
  method mixin args {
    ###
    # Mix in the class
    ###
    my variable mixins
    set mixins $args
    ::oo::objdefine [self] mixin {*}$args
    ###
    # Build a compsite map of all ensembles defined by the object's current
    # class as well as all of the classes being mixed in
    ###
    set emap [::tool::ensemble_build_map [::info object class [self]] {*}[lreverse $args]]
    set body [::tool::ensemble_methods $emap]
    oo::objdefine [self] $body
    foreach class $args {
      my ClassPublicApply $class
    }
  }
  
  method morph newclass {
    if {$newclass eq {}} return
    set class [string trimleft [info object class [self]]]
    set newclass [string trimleft $newclass :]
    if {[info command ::$newclass] eq {}} {
      error "Class $newclass does not exist"
    }
    if { $class ne $newclass } {
      my Morph_leave
      my variable mixins
      oo::objdefine [self] class ::${newclass}
      my graft class ::${newclass}
      # Reapply mixins
      my mixin {*}$mixins
      my InitializePublic
      my Morph_enter
    }
  }

  ###
  # Commands to perform as this object transitions out of the present class
  ###
  method Morph_leave {} {}
  ###
  # Commands to perform as this object transitions into this class as a new class
  ###
  method Morph_enter {} {}
  
  ###
  # title: List which objects are forwarded as organs
  ###
  method organ {{stub all}} {
    my variable organs
    if {![info exists organs]} {
      return {}
    }
    if { $stub eq "all" } {
      return $organs
    }
    return [dict getnull $organs $stub]
  }
}


Changes to modules/tool/module.shed.

Added modules/tool/option.tcl.











































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
###
# topic: 68aa446005235a0632a10e2a441c0777
# title: Define an option for the class
###
proc ::tool::define::option {name args} {
  set class [current_class]
  set dictargs {default: {}}
  foreach {var val} [::oo::meta::args_to_dict {*}$args] {
    dict set dictargs [string trimright [string trimleft $var -] :]: $val
  }
  set name [string trimleft $name -]

  ###
  # Option Class handling
  ###
  set optclass [dict getnull $dictargs class:]
  if {$optclass ne {}} {
    foreach {f v} [::oo::meta::info $class getnull option_class $optclass] {
      if {![dict exists $dictargs $f]} {
        dict set dictargs $f $v
      }
    }
    if {$optclass eq "variable"} {
      variable $name [dict getnull $dictargs default:]
    }
  }
  ::oo::meta::info $class branchset option $name $dictargs
}

###
# topic: 827a3a331a2e212a6e301f59c1eead59
# title: Define a class of options
# description:
#    Option classes are a template of properties that other
#    options can inherit.
###
proc ::tool::define::option_class {name args} {
  set class [current_class]
  set dictargs {default {}}
  foreach {var val} [::oo::meta::args_to_dict {*}$args] {
    dict set dictargs [string trimleft $var -] $val
  }
  set name [string trimleft $name -]
  ::oo::meta::info $class branchset option_class $name $dictargs
}

::tool::define ::tool::object {
  property options_strict 0
  variable organs {}

  option_class organ {
    widget label
    set-command {my graft %field% %value%}
    get-command {my organ %field%}
  }

  option_class variable {
    widget entry
    set-command {my variable %field% ; set %field% %value%}
    get-command {my variable %field% ; set %field%}
  }
  
  dict_ensemble config config {
    get {
      return [my Config_get {*}$args]
    }
    merge {
      return [my Config_merge {*}$args]
    }
    set {
      my Config_set {*}$args
    }
  }

  ###
  # topic: 86a1b968cea8d439df87585afdbdaadb
  ###
  method cget args {
    return [my Config_get {*}$args]
  }

  ###
  # topic: 73e2566466b836cc4535f1a437c391b0
  ###
  method configure args {
    # Will be removed at the end of "configurelist_triggers"
    set dictargs [::oo::meta::args_to_options {*}$args]
    if {[llength $dictargs] == 1} {
      return [my cget [lindex $dictargs 0]]
    }
    set dat [my Config_merge $dictargs]
    my Config_triggers $dat
  }

  method Config_get {field args} {
    my variable config option_canonical option_getcmd
    set field [string trimleft $field -]
    if {[info exists option_canonical($field)]} {
      set field $option_canonical($field)
    }
    if {[info exists option_getcmd($field)]} {
      return [eval $option_getcmd($field)]
    }
    if {[dict exists $config $field]} {
      return [dict get $config $field]
    }
    if {[llength $args]} {
      return [lindex $args 0]
    }
    return [my meta cget $field] 
  }
  
  ###
  # topic: dc9fba12ec23a3ad000c66aea17135a5
  ###
  method Config_merge dictargs {
    my variable config option_canonical
    set rawlist $dictargs
    set dictargs {}
    set dat [my meta getnull option]
    foreach {field val} $rawlist {
      set field [string trimleft $field -]
      set field [string trimright $field :]
      if {[info exists option_canonical($field)]} {
        set field $option_canonical($field)
      }
      dict set dictargs $field $val
    }
    ###
    # Validate all inputs
    ###
    foreach {field val} $dictargs {
      set script [dict getnull $dat $field validate-command:]
      if {$script ne {}} {
        dict set dictargs $field [eval [string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]]
      }
    }
    ###
    # Apply all inputs with special rules
    ###
    foreach {field val} $dictargs {
      set script [dict getnull $dat $field set-command:]
      dict set config $field $val
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
    return $dictargs
  }
  
  method Config_set args {
    set dictargs [::tool::args_to_options {*}$args]
    set dat [my Config_merge $dictargs]
    my Config_triggers $dat
  }
  
  ###
  # topic: 543c936485189593f0b9ed79b5d5f2c0
  ###
  method Config_triggers dictargs {
    set dat [my meta getnull option]
    foreach {field val} $dictargs {
      set script [dict getnull $dat $field post-command:]
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
  }

  method Option_Default field {
    set info [my meta getnull option $field]
    set getcmd [dict getnull $info default-command:]
    if {$getcmd ne {}} {
      return [{*}[string map [list %field% $field %self% [namespace which my]] $getcmd]]
    } else {
      return [dict getnull $info default:]
    }
  }
}

package provide tool::option 0.1

Added modules/tool/organ.tcl.

































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
###
# A special class of objects that
# stores no meta data of its own
# Instead it vampires off of the master object
###
tool::class create ::tool::organelle {
  
  constructor {master} {
    my entangle $master
    set final_class [my select]
    if {[info commands $final_class] ne {}} {
      # Safe to switch class here, we haven't initialized anything
      oo::objdefine [self] class $final_class
    }
    my initialize
  }

  method entangle {master} {
    my graft master $master
    my forward meta $master meta
    foreach {stub organ} [$master organ] {
      my graft $stub $organ
    }
    foreach {methodname variable} [my meta branchget array_ensemble] {
      my forward $methodname $master $methodname
    }
  }
  
  method select {} {
    return {}
  }
}

Added modules/tool/pipeline.tcl.















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
::namespace eval ::tool::signal {}
::namespace eval ::tao {}

# Provide a backward compatible hook
proc ::tool::main {} {
  ::cron::main
}

proc ::tool::do_events {} {
  ::cron::do_events
}

proc ::tao::do_events {} {
  ::cron::do_events
}

proc ::tao::main {} {
  ::cron::main
}


package provide tool::pipeline 0.1

Changes to modules/tool/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded tool 0.7 [list source [file join $dir tool.tcl]]












|
<
1
2
3
4
5
6
7
8
9
10
11
12

# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.6]} {return}
package ifneeded tool 0.6.1 [list source [file join $dir index.tcl]]

Added modules/tool/script.tcl.









































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
###
# Add configure by script facilities to TOOL
###
::tool::define ::tool::object {

  ###
  # Allows for a constructor to accept a psuedo-code
  # initialization script which exercise the object's methods
  # sans "my" in front of every command
  ###
  method Eval_Script script {
    set buffer {}
    set thisline {}
    foreach line [split $script \n] {
      append thisline $line
      if {![info complete $thisline]} {
        append thisline \n
        continue
      }
      set thisline [string trim $thisline]
      if {[string index $thisline 0] eq "#"} continue
      if {[string length $thisline]==0} continue
      if {[lindex $thisline 0] eq "my"} {
        # Line already calls out "my", accept verbatim
        append buffer $thisline \n
      } elseif {[string range $thisline 0 2] eq "::"} {
        # Fully qualified commands accepted verbatim
        append buffer $thisline \n
      } elseif {
        append buffer "my $thisline" \n
      }
      set thisline {}
    }
    eval $buffer
  }
}

Changes to modules/tool/tool.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tool n 0.4.2]
[keywords TOOL]
[copyright {2015 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Standardized OO Framework for development}]
[titledesc {TclOO Library (TOOL) Framework}]
[category TclOO]
[keywords TclOO]
[keywords framework]
[require Tcl 8.6]
[require sha1]
[require dicttool]
[require oo::meta]
[require oo::dialect]
[description]
[para]





|
|

<







1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tool n 0.4.2]
[keywords TOOL]
[copyright {2015 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Standardized OO Framework for development}]
[titledesc {Dictionary Tools}]
[category Utility]
[keywords TclOO]

[require Tcl 8.6]
[require sha1]
[require dicttool]
[require oo::meta]
[require oo::dialect]
[description]
[para]
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

Declares a variable [arg name] which will be initialized with the value [arg value] for objects of this class, as well as any
objects for classes which are descendents of this class.

[list_end]

[section {Public Object Methods}]

The TOOL object mother of all classes defines several methods to enforces consistent
behavior throughout the framework.

[list_begin definitions]

[call [emph object] [cmd cget] [arg option]]








|







122
123
124
125
126
127
128
129
130
131
132
133
134
135
136

Declares a variable [arg name] which will be initialized with the value [arg value] for objects of this class, as well as any
objects for classes which are descendents of this class.

[list_end]

[section {Public Object Methods}]
 
The TOOL object mother of all classes defines several methods to enforces consistent
behavior throughout the framework.

[list_begin definitions]

[call [emph object] [cmd cget] [arg option]]

225
226
227
228
229
230
231
232
233
234
235
236
Computes the default value for an option. See [package tool::option_handling].

[list_end]

[section AUTHORS]
Sean Woods

[vset CATEGORY tcloo]
[include ../common-text/feedback.inc]
[manpage_end]









|
|



224
225
226
227
228
229
230
231
232
233
234
235
Computes the default value for an option. See [package tool::option_handling].

[list_end]

[section AUTHORS]
Sean Woods

[vset CATEGORY tool]
[include ../doctools2base/include/feedback.inc]
[manpage_end]


Changes to modules/tool/tool.md.

Deleted modules/tool/tool.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
###
# Amalgamated package for tool
# Do not edit directly, tweak the source in src/ and rerun
# build.tcl
###
package provide tool 0.7
namespace eval ::tool {}

###
# START: core.tcl
###
package require Tcl 8.6 ;# try in pipeline.tcl. Possibly other things.
package require dicttool
package require TclOO
package require sha1
#package require cron 2.0
package require oo::meta 0.5.1
package require oo::dialect

::oo::dialect::create ::tool
::namespace eval ::tool {}
set ::tool::trace 0

proc ::tool::script_path {} {
  set path [file dirname [file join [pwd] [info script]]]
  return $path
}

proc ::tool::module {cmd args} {
  ::variable moduleStack
  ::variable module

  switch $cmd {
    push {
      set module [lindex $args 0]
      lappend moduleStack $module
      return $module
    }
    pop {
      set priormodule      [lindex $moduleStack end]
      set moduleStack [lrange $moduleStack 0 end-1]
      set module [lindex $moduleStack end]
      return $priormodule
    }
    peek {
      set module      [lindex $moduleStack end]
      return $module
    }
    default {
      error "Invalid command \"$cmd\". Valid: peek, pop, push"
    }
  }
}
::tool::module push core

proc ::tool::pathload {path {order {}} {skip {}}} {
  ###
  # On windows while running under a VFS, the system sometimes
  # gets confused about the volume we are running under
  ###
  if {$::tcl_platform(platform) eq "windows"} {
    if {[string range $path 1 6] eq ":/zvfs"} {
      set path [string range $path 2 end]
    }
  }
  set loaded {pkgIndex.tcl index.tcl}
  foreach item $skip {
    lappend loaded [file tail $skip]
  }
  if {[file exists [file join $path metaclass.tcl]]} {
    lappend loaded metaclass.tcl
    uplevel #0 [list source [file join $path metaclass.tcl]]
  }
  if {[file exists [file join $path baseclass.tcl]]} {
    lappend loaded baseclass.tcl
    uplevel #0 [list source [file join $path baseclass.tcl]]
  }
  foreach file $order {
    set file [file tail $file]
    if {$file in $loaded} continue
    if {![file exists [file join $path $file]]} {
      puts "WARNING [file join $path $file] does not exist in [info script]"
    } else {
      uplevel #0 [list source [file join $path $file]]
    }
    lappend loaded $file
  }
  foreach file [lsort -dictionary [glob -nocomplain [file join $path *.tcl]]] {
    if {[file tail $file] in $loaded} continue
    uplevel #0 [list source $file]
    lappend loaded [file tail $file]
  }
}

###
# END: core.tcl
###
###
# START: uuid.tcl
###
::namespace eval ::tool {}

proc ::tool::is_null value {
  return [expr {$value in {{} NULL}}]
}


proc ::tool::uuid_seed args {
  if {[llength $args]==0 || ([llength $args]==1 && [is_null [lindex $args 0]])} {
    if {[info exists ::env(USERNAME)]} {
      set user $::env(USERNAME)
    } elseif {[info exists ::env(USER)]} {
      set user $::env(USER)
    } else {
      set user $::env(user)
    }
    incr ::tool::nextuuid $::tool::globaluuid
    set ::tool::UUID_Seed [list user@[info hostname] [clock format [clock seconds]]]
  } else {
    incr ::tool::globaluuid $::tool::nextuuid
    set ::tool::nextuuid 0
    set ::tool::UUID_Seed $args
  }
}

###
# topic: 0a19b0bfb98162a8a37c1d3bbfb8bc3d
# description:
#    Because the tcllib version of uuid generate requires
#    network port access (which can be slow), here's a fast
#    and dirty rendition
###
proc ::tool::uuid_generate args {
  if {![llength $args]} {
    set block [list [incr ::tool::nextuuid] {*}$::tool::UUID_Seed]
  } else {
    set block $args
  }
  return [::sha1::sha1 -hex [join $block ""]]
}

###
# topic: ee3ec43cc2cc2c7d6cf9a4ef1c345c19
###
proc ::tool::uuid_short args {
  if {![llength $args]} {
    set block [list [incr ::tool::nextuuid] {*}$::tool::UUID_Seed]
  } else {
    set block $args
  }
  return [string range [::sha1::sha1 -hex [join $block ""]] 0 16]
}

###
# topic: b14c505537274904578340ec1bc12af1
# description:
#    Implementation the uses a compiled in ::md5 implementation
#    commonly used by embedded application developers
###
namespace eval ::tool {
  namespace export *
}
###
# Cache the bits of the UUID seed that aren't likely to change
# once the software is loaded, but which can be expensive to
# generate
###
set ::tool::nextuuid 0
set ::tool::globaluuid 0
::tool::uuid_seed

###
# END: uuid.tcl
###
###
# START: ensemble.tcl
###
::namespace eval ::tool::define {}

if {![info exists ::tool::dirty_classes]} {
  set ::tool::dirty_classes {}
}

###
# Monkey patch oometa's rebuild function to
# include a notifier to tool
###
proc ::oo::meta::rebuild args {
  foreach class $args {
    if {$class ni $::oo::meta::dirty_classes} {
      lappend ::oo::meta::dirty_classes $class
    }
    if {$class ni $::tool::dirty_classes} {
      lappend ::tool::dirty_classes $class
    }
  }
}

proc ::tool::ensemble_build_map args {
  set emap {}
  foreach thisclass $args {
    foreach {ensemble einfo} [::oo::meta::info $thisclass getnull method_ensemble] {
      foreach {submethod subinfo} $einfo {
        dict set emap $ensemble $submethod $subinfo
      }
    }
  }
  return $emap
}

proc ::tool::ensemble_methods emap {
  set result {}
  foreach {ensemble einfo} $emap {
    #set einfo [dict getnull $einfo method_ensemble $ensemble]
    set eswitch {}
    set default standard
    if {[dict exists $einfo default:]} {
      set emethodinfo [dict get $einfo default:]
      set arglist     [lindex $emethodinfo 0]
      set realbody    [lindex $emethodinfo 1]
      if {[llength $arglist]==1 && [lindex $arglist 0] in {{} args arglist}} {
        set body {}
      } else {
        set body "\n      ::tool::dynamic_arguments $ensemble \$method [list $arglist] {*}\$args"
      }
      append body "\n      " [string trim $realbody] "      \n"
      set default $body
      dict unset einfo default:
    }
    set methodlist {}
    foreach item [dict keys $einfo] {
      lappend methodlist [string trimright $item :]
    }
    set methodlist  [lsort -dictionary -unique $methodlist]
    foreach {submethod esubmethodinfo} [lsort -dictionary -stride 2 $einfo] {
      if {$submethod in {"_preamble:" "default:"}} continue
      set submethod [string trimright $submethod :]
      lassign $esubmethodinfo arglist realbody
      if {[string length [string trim $realbody]] eq {}} {
        dict set eswitch $submethod {}
      } else {
        if {[llength $arglist]==1 && [lindex $arglist 0] in {{} args arglist}} {
          set body {}
        } else {
          set body "\n      ::tool::dynamic_arguments $ensemble \$method [list $arglist] {*}\$args"
        }
        append body "\n      " [string trim $realbody] "      \n"
        dict set eswitch $submethod $body
      }
    }
    if {![dict exists $eswitch <list>]} {
      dict set eswitch <list> {return $methodlist}
    }
    if {$default=="standard"} {
      set default "error \"unknown method $ensemble \$method. Valid: \$methodlist\""
    }
    dict set eswitch default $default
    set mbody {}    
    if {[dict exists $einfo _preamble:]} {
      append mbody [lindex [dict get $einfo _preamble:] 1] \n
    }
    append mbody \n [list set methodlist $methodlist]
    append mbody \n "set code \[catch {switch -- \$method [list $eswitch]} result opts\]"
    append mbody \n {return -options $opts $result}
    append result \n [list method $ensemble {{method default} args} $mbody]    
  }
  return $result
}

###
# topic: fb8d74e9c08db81ee6f1275dad4d7d6f
###
proc ::tool::dynamic_object_ensembles {thisobject thisclass} {
  variable trace
  set ensembledict {}
  foreach dclass $::tool::dirty_classes {
    foreach {cclass cancestors} [array get ::oo::meta::cached_hierarchy] {
      if {$dclass in $cancestors} {
        unset -nocomplain ::tool::obj_ensemble_cache($cclass)
      }
    }
  }
  set ::tool::dirty_classes {}
  ###
  # Only go through the motions for classes that have a locally defined
  # ensemble method implementation
  ###
  foreach aclass [::oo::meta::ancestors $thisclass] {
    if {[info exists ::tool::obj_ensemble_cache($aclass)]} continue
    set emap [::tool::ensemble_build_map $aclass]
    set body [::tool::ensemble_methods $emap]
    oo::define $aclass $body
    # Define a property for this ensemble for introspection
    foreach {ensemble einfo} $emap {
      ::oo::meta::info $aclass set ensemble_methods $ensemble: [lsort -dictionary [dict keys $einfo]]
    }
    set ::tool::obj_ensemble_cache($aclass) 1
  }
}

###
# topic: ec9ca249b75e2667ad5bcb2f7cd8c568
# title: Define an ensemble method for this agent
###
::proc ::tool::define::method {rawmethod args} {
  set class [current_class]
  set mlist [split $rawmethod "::"]
  if {[llength $mlist]==1} {
    ###
    # Simple method, needs no parsing
    ###
    set method $rawmethod
    ::oo::define $class method $rawmethod {*}$args
    return
  }
  set ensemble [lindex $mlist 0]
  set method [join [lrange $mlist 2 end] "::"]
  switch [llength $args] {
    1 {
      ::oo::meta::info $class set method_ensemble $ensemble $method: [list dictargs [lindex $args 0]]
    }
    2 {
      ::oo::meta::info $class set method_ensemble $ensemble $method: $args
    }
    default {
      error "Usage: method NAME ARGLIST BODY"
    }
  }
}

###
# topic: 354490e9e9708425a6662239f2058401946e41a1
# description: Creates a method which exports access to an internal dict
###
proc ::tool::define::dictobj args {
  dict_ensemble {*}$args
}
proc ::tool::define::dict_ensemble {methodname varname {cases {}}} {
  set class [current_class]
  set CASES [string map [list %METHOD% $methodname %VARNAME% $varname] $cases]
  
  set methoddata [::oo::meta::info $class getnull method_ensemble $methodname]
  set initial [dict getnull $cases initialize]
  variable $varname $initial
  foreach {name body} $CASES {
    dict set methoddata $name: [list args $body]
  }
  set template [string map [list %CLASS% $class %INITIAL% $initial %METHOD% $methodname %VARNAME% $varname] {
    _preamble {} {
      my variable %VARNAME%
    }
    add args {
      set field [string trimright [lindex $args 0] :]
      set data [dict getnull $%VARNAME% $field]
      foreach item [lrange $args 1 end] {
        if {$item ni $data} {
          lappend data $item
        }
      }
      dict set %VARNAME% $field $data
    }
    remove args {
      set field [string trimright [lindex $args 0] :]
      set data [dict getnull $%VARNAME% $field]
      set result {}
      foreach item $data {
        if {$item in $args} continue
        lappend result $item
      }
      dict set %VARNAME% $field $result
    }
    initial {} {
      return [dict rmerge [my meta branchget %VARNAME%] {%INITIAL%}]
    }
    reset {} {
      set %VARNAME% [dict rmerge [my meta branchget %VARNAME%] {%INITIAL%}]
      return $%VARNAME%
    }
    dump {} {
      return $%VARNAME%
    }
    append args {
      return [dict $method %VARNAME% {*}$args]
    }
    incr args {
      return [dict $method %VARNAME% {*}$args]
    }
    lappend args {
      return [dict $method %VARNAME% {*}$args]
    }
    set args {
      return [dict $method %VARNAME% {*}$args]
    }
    unset args {
      return [dict $method %VARNAME% {*}$args]
    }
    update args {
      return [dict $method %VARNAME% {*}$args]
    }
    branchset args {
      foreach {field value} [lindex $args end] {
        dict set %VARNAME% {*}[lrange $args 0 end-1] [string trimright $field :]: $value
      }
    }
    rmerge args {
      set %VARNAME% [dict rmerge $%VARNAME% {*}$args]
      return $%VARNAME%  
    }
    merge args {
      set %VARNAME% [dict rmerge $%VARNAME% {*}$args]
      return $%VARNAME%
    }
    replace args {
      set %VARNAME% [dict rmerge $%VARNAME% {%INITIAL%} {*}$args]
    }
    default args {
      return [dict $method $%VARNAME% {*}$args]
    }
  }]
  foreach {name arglist body} $template {
    if {[dict exists $methoddata $name:]} continue
    dict set methoddata $name: [list $arglist $body]
  }
  ::oo::meta::info $class set method_ensemble $methodname $methoddata
}

proc ::tool::define::arrayobj args {
  array_ensemble {*}$args
}

###
# topic: 354490e9e9708425a6662239f2058401946e41a1
# description: Creates a method which exports access to an internal array
###
proc ::tool::define::array_ensemble {methodname varname {cases {}}} {
  set class [current_class]
  set CASES [string map [list %METHOD% $methodname %VARNAME% $varname] $cases]
  set initial [dict getnull $cases initialize]
  array $varname $initial

  set map [list %CLASS% $class %METHOD% $methodname %VARNAME% $varname %CASES% $CASES %INITIAL% $initial]

  ::oo::define $class method _${methodname}Get {field} [string map $map {
    my variable %VARNAME%
    if {[info exists %VARNAME%($field)]} {
      return $%VARNAME%($field)
    }
    return [my meta getnull %VARNAME% $field:]
  }]
  ::oo::define $class method _${methodname}Exists {field} [string map $map {
    my variable %VARNAME%
    if {[info exists %VARNAME%($field)]} {
      return 1
    }
    return [my meta exists %VARNAME% $field:]
  }]
  set methoddata [::oo::meta::info $class set array_ensemble $methodname: $varname]
  
  set methoddata [::oo::meta::info $class getnull method_ensemble $methodname]
  foreach {name body} $CASES {
    dict set methoddata $name: [list args $body]
  } 
  set template  [string map [list %CLASS% $class %INITIAL% $initial %METHOD% $methodname %VARNAME% $varname] {
    _preamble {} {
      my variable %VARNAME%
    }
    reset {} {
      ::array unset %VARNAME% *
      foreach {field value} [my meta getnull %VARNAME%] {
        set %VARNAME%([string trimright $field :]) $value
      }
      ::array set %VARNAME% {%INITIAL%}
      return [array get %VARNAME%]
    }
    ni value {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      return [expr {$value ni $data}]
    }
    in value {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      return [expr {$value in $data}]
    }
    add args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      foreach item [lrange $args 1 end] {
        if {$item ni $data} {
          lappend data $item
        }
      }
      set %VARNAME%($field) $data
    }
    remove args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      set result {}
      foreach item $data {
        if {$item in $args} continue
        lappend result $item
      }
      set %VARNAME%($field) $result
    }
    dump {} {
      set result {}
      foreach {var val} [my meta getnull %VARNAME%] {
        dict set result [string trimright $var :] $val
      }
      foreach {var val} [lsort -dictionary -stride 2 [array get %VARNAME%]] {
        dict set result [string trimright $var :] $val
      }
      return $result
    }
    exists args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Exists $field]
    }
    getnull args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]      
    }
    get field {
      set field [string trimright $field :]
      set data [my _%METHOD%Get $field]
    }
    set args {
      set field [string trimright [lindex $args 0] :]
      ::set %VARNAME%($field) {*}[lrange $args 1 end]        
    }
    append args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      ::append data {*}[lrange $args 1 end]
      set %VARNAME%($field) $data
    }
    incr args {
      set field [string trimright [lindex $args 0] :]
      ::incr %VARNAME%($field) {*}[lrange $args 1 end]
    }
    lappend args {
      set field [string trimright [lindex $args 0] :]
      set data [my _%METHOD%Get $field]
      $method data {*}[lrange $args 1 end]
      set %VARNAME%($field) $data
    }
    branchset args {
      foreach {field value} [lindex $args end] {
        set %VARNAME%([string trimright $field :]) $value
      }
    }
    rmerge args {
      foreach arg $args {
        my %VARNAME% branchset $arg
      }
    }
    merge args {
      foreach arg $args {
        my %VARNAME% branchset $arg
      }
    }
    default args {
      return [array $method %VARNAME% {*}$args]
    }
  }]
  foreach {name arglist body} $template {
    if {[dict exists $methoddata $name:]} continue
    dict set methoddata $name: [list $arglist $body]
  }
  ::oo::meta::info $class set method_ensemble $methodname $methoddata
}


###
# END: ensemble.tcl
###
###
# START: metaclass.tcl
###
#-------------------------------------------------------------------------
# TITLE: 
#    tool.tcl
#
# PROJECT:
#    tool: TclOO Helper Library
#
# DESCRIPTION:
#    tool(n): Implementation File
#
#-------------------------------------------------------------------------

namespace eval ::tool {}

###
# New OO Keywords for TOOL
###
namespace eval ::tool::define {}
proc ::tool::define::array {name {values {}}} {
  set class [current_class]
  set name [string trimright $name :]:
  if {![::oo::meta::info $class exists array $name]} {
    ::oo::meta::info $class set array $name {}
  }
  foreach {var val} $values {
    ::oo::meta::info $class set array $name: $var $val
  }
}

###
# topic: 710a93168e4ba7a971d3dbb8a3e7bcbc
###
proc ::tool::define::component {name info} {
  set class [current_class]
  ::oo::meta::info $class branchset component $name $info
}

###
# topic: 2cfc44a49f067124fda228458f77f177
# title: Specify the constructor for a class
###
proc ::tool::define::constructor {arglist rawbody} {
  set body {
::tool::object_create [self] [info object class [self]]
# Initialize public variables and options
my InitializePublic
  }
  append body $rawbody
  append body {
# Run "initialize"
my initialize
  }
  set class [current_class]
  ::oo::define $class constructor $arglist $body
}

###
# topic: 7a5c7e04989704eef117ff3c9dd88823
# title: Specify the a method for the class object itself, instead of for objects of the class
###
proc ::tool::define::class_method {name arglist body} {
  set class [current_class]
  ::oo::meta::info $class set class_typemethod $name: [list $arglist $body]
}

###
# topic: 4cb3696bf06d1e372107795de7fe1545
# title: Specify the destructor for a class
###
proc ::tool::define::destructor rawbody {
  set body {
# Run the destructor once and only once
set self [self]
my variable DestroyEvent
if {$DestroyEvent} return
set DestroyEvent 1
::tool::object_destroy $self
}
  append body $rawbody
  ::oo::define [current_class] destructor $body
}

###
# topic: 8bcae430f1eda4ccdb96daedeeea3bd409c6bb7a
# description: Add properties and option handling
###
proc ::tool::define::property args {
  set class [current_class]
  switch [llength $args] {
    2 {
      set type const
      set property [string trimleft [lindex $args 0] :]
      set value [lindex $args 1]
      ::oo::meta::info $class set $type $property: $value
      return
    }
    3 {
      set type     [lindex $args 0]
      set property [string trimleft [lindex $args 1] :]
      set value    [lindex $args 2]
      ::oo::meta::info $class set $type $property: $value
      return
    }
    default {
      error "Usage:
property name type valuedict
OR property name value"
    }
  }
  ::oo::meta::info $class set {*}$args
}

###
# topic: 615b7c43b863b0d8d1f9107a8d126b21
# title: Specify a variable which should be initialized in the constructor
# description:
#    This keyword can also be expressed:
#    [example {property variable NAME {default DEFAULT}}]
#    [para]
#    Variables registered in the variable property are also initialized
#    (if missing) when the object changes class via the [emph morph] method.
###
proc ::tool::define::variable {name {default {}}} {
  set class [current_class]
  set name [string trimright $name :]
  ::oo::meta::info $class set variable $name: $default
  ::oo::define $class variable $name
}

###
# Utility Procedures
###

# topic: 643efabec4303b20b66b760a1ad279bf
###
proc ::tool::args_to_dict args {
  if {[llength $args]==1} {
    return [lindex $args 0]
  }
  return $args
}

###
# topic: b40970b0d9a2525990b9105ec8c96d3d
###
proc ::tool::args_to_options args {
  set result {}
  foreach {var val} [args_to_dict {*}$args] {
    lappend result [string trimright [string trimleft $var -] :] $val
  }
  return $result
}

###
# topic: a92cd258900010f656f4c6e7dbffae57
###
proc ::tool::dynamic_methods class {
  ::oo::meta::rebuild $class
  set metadata [::oo::meta::metadata $class]
  foreach command [info commands [namespace current]::dynamic_methods_*] {
    $command $class $metadata
  }
}

###
# topic: 4969d897a83d91a230a17f166dbcaede
###
proc ::tool::dynamic_arguments {ensemble method arglist args} {
  set idx 0
  set len [llength $args]
  if {$len > [llength $arglist]} {
    ###
    # Catch if the user supplies too many arguments
    ###
    set dargs 0
    if {[lindex $arglist end] ni {args dictargs}} {
      return -code error -level 2 "Usage: $ensemble $method [string trim [dynamic_wrongargs_message $arglist]]"
    }
  }
  foreach argdef $arglist {
    if {$argdef eq "args"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      break
    }
    if {$argdef eq "dictargs"} {
      ###
      # Perform args processing in the style of tcl
      ###
      uplevel 1 [list set args [lrange $args $idx end]]
      ###
      # Perform args processing in the style of tool
      ###
      set dictargs [::tool::args_to_options {*}[lrange $args $idx end]]
      uplevel 1 [list set dictargs $dictargs]
      break
    }
    if {$idx > $len} {
      ###
      # Catch if the user supplies too few arguments
      ###
      if {[llength $argdef]==1} {
        return -code error -level 2 "Usage: $ensemble $method [string trim [dynamic_wrongargs_message $arglist]]"
      } else {
        uplevel 1 [list set [lindex $argdef 0] [lindex $argdef 1]]
      }
    } else {
      uplevel 1 [list set [lindex $argdef 0] [lindex $args $idx]]
    }
    incr idx
  }
}

###
# topic: b88add196bb63abccc44639db5e5eae1
###
proc ::tool::dynamic_methods_class {thisclass metadata} {
  foreach {method info} [dict getnull $metadata class_typemethod] {
    lassign $info arglist body
    set method [string trimright $method :]
    ::oo::objdefine $thisclass method $method $arglist $body
  }
}

###
# topic: 53ab28ac5c6ee601fe1fe07b073be88e
###
proc ::tool::dynamic_wrongargs_message {arglist} {
  set result ""
  set dargs 0
  foreach argdef $arglist {
    if {$argdef in {args dictargs}} {
      set dargs 1
      break
    }
    if {[llength $argdef]==1} {
      append result " $argdef"
    } else {
      append result " ?[lindex $argdef 0]?"
    }
  }
  if { $dargs } {
    append result " ?option value?..."
  }
  return $result
}

proc ::tool::object_create {objname {class {}}} {
  foreach varname {
    object_info
    object_signal
    object_subscribe
  } {
    variable $varname
    set ${varname}($objname) {}
  }
  if {$class eq {}} {
    set class [info object class $objname]
  }
   set object_info($objname) [list class $class]
  if {$class ne {}} {
    $objname graft class $class
    foreach command [info commands [namespace current]::dynamic_object_*] {
      $command $objname $class
    }
  }
}


proc ::tool::object_rename {object newname} {
  foreach varname {
    object_info
    object_signal
    object_subscribe
  } {
    variable $varname
    if {[info exists ${varname}($object)]} {
      set ${varname}($newname) [set ${varname}($object)]
      unset ${varname}($object)
    }
  }
  variable coroutine_object
  foreach {coro coro_objname} [array get coroutine_object] {
    if { $object eq $coro_objname } {
      set coroutine_object($coro) $newname
    }
  }
  rename $object ::[string trimleft $newname]
  ::tool::event::generate $object object_rename [list newname $newname]
}

proc ::tool::object_destroy objname {
  ::tool::event::generate $objname object_destroy [list objname $objname]
  ::tool::event::cancel $objname *
  ::cron::object_destroy $objname
  variable coroutine_object
  foreach varname {
    object_info
    object_signal
    object_subscribe
  } {
    variable $varname
    unset -nocomplain ${varname}($objname)
  }
}

#-------------------------------------------------------------------------
# Option Handling Mother of all Classes

# tool::object
#
# This class is inherited by all classes that have options.
#

::tool::define ::tool::object {
  # Put MOACish stuff in here
  variable signals_pending create
  variable organs {}
  variable mixins {}
  variable mixinmap {}
  variable DestroyEvent 0

  constructor args {
    my Config_merge [::tool::args_to_options {*}$args]
  }
  
  destructor {}
    
  method ancestors {{reverse 0}} {
    set result [::oo::meta::ancestors [info object class [self]]]
    if {$reverse} {
      return [lreverse $result]
    }
    return $result
  }
  
  method DestroyEvent {} {
    my variable DestroyEvent
    return $DestroyEvent
  }
  
  ###
  # title: Forward a method
  ###
  method forward {method args} {
    oo::objdefine [self] forward $method {*}$args
  }
  
  ###
  # title: Direct a series of sub-functions to a seperate object
  ###
  method graft args {
    my variable organs
    if {[llength $args] == 1} {
      error "Need two arguments"
    }
    set object {}
    foreach {stub object} $args {
      if {$stub eq "class"} {
        # Force class to always track the object's current class
        set obj [info object class [self]]
      }
      dict set organs $stub $object
      oo::objdefine [self] forward <${stub}> $object
      oo::objdefine [self] export <${stub}>
    }
    return $object
  }
  
  # Called after all options and public variables are initialized
  method initialize {} {}
  
  ###
  # topic: 3c4893b65a1c79b2549b9ee88f23c9e3
  # description:
  #    Provide a default value for all options and
  #    publically declared variables, and locks the
  #    pipeline mutex to prevent signal processing
  #    while the contructor is still running.
  #    Note, by default an odie object will ignore
  #    signals until a later call to <i>my lock remove pipeline</i>
  ###
  ###
  # topic: 3c4893b65a1c79b2549b9ee88f23c9e3
  # description:
  #    Provide a default value for all options and
  #    publically declared variables, and locks the
  #    pipeline mutex to prevent signal processing
  #    while the contructor is still running.
  #    Note, by default an odie object will ignore
  #    signals until a later call to <i>my lock remove pipeline</i>
  ###
  method InitializePublic {} {
    my variable config meta
    if {![info exists meta]} {
      set meta {}
    }
    if {![info exists config]} {
      set config {}
    }
    my ClassPublicApply {}
  }
  
  class_method info {which} {
    my variable cache
    if {![info exists cache($which)]} {
      set cache($which) {}
      switch $which {
        public {
          dict set cache(public) variable [my meta branchget variable]
          dict set cache(public) array [my meta branchget array]
          set optinfo [my meta getnull option]
          dict set cache(public) option_info $optinfo
          foreach {var info} [dict getnull $cache(public) option_info] {
            if {[dict exists $info aliases:]} {
              foreach alias [dict exists $info aliases:] {
                dict set cache(public) option_canonical $alias $var
              }
            }
            set getcmd [dict getnull $info default-command:]
            if {$getcmd ne {}} {
              dict set cache(public) option_default_command $var $getcmd
            } else {
              dict set cache(public) option_default_value $var [dict getnull $info default:]
            }
            dict set cache(public) option_canonical $var $var
          }
        }
      }
    }
    return $cache($which)
  }
  
  ###
  # Incorporate the class's variables, arrays, and options
  ###
  method ClassPublicApply class {
    my variable config
    set integrate 0
    if {$class eq {}} {
      set class [info object class [self]]      
    } else {
      set integrate 1
    }
    set public [$class info public]
    foreach {var value} [dict getnull $public variable] {
      if { $var in {meta config} } continue
      my variable $var
      if {![info exists $var]} {
        set $var $value
      }
    }
    foreach {var value} [dict getnull $public array] {
      if { $var eq {meta config} } continue
      my variable $var
      foreach {f v} $value {
        if {![array exists ${var}($f)]} {
          set ${var}($f) $v
        }
      }
    }
    set dat [dict getnull $public option_info]
    if {$integrate} {
      my meta rmerge [list option $dat]
    }
    my variable option_canonical
    array set option_canonical [dict getnull $public option_canonical]
    set dictargs {}
    foreach {var getcmd} [dict getnull $public option_default_command] {
      if {[dict getnull $dat $var class:] eq "organ"} {
        if {[my organ $var] ne {}} continue
      }
      if {[dict exists $config $var]} continue
      dict set dictargs $var [{*}[string map [list %field% $var %self% [namespace which my]] $getcmd]]
    }
    foreach {var value} [dict getnull $public option_default_value] {
      if {[dict getnull $dat $var class:] eq "organ"} {
        if {[my organ $var] ne {}} continue
      }
      if {[dict exists $config $var]} continue
      dict set dictargs $var $value
    }
    ###
    # Apply all inputs with special rules
    ###
    foreach {field val} $dictargs {
      if {[dict exists $config $field]} continue
      set script [dict getnull $dat $field set-command:]
      dict set config $field $val
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
  }
  
  ###
  # topic: 3c4893b65a1c79b2549b9ee88f23c9e3
  # description:
  #    Provide a default value for all options and
  #    publically declared variables, and locks the
  #    pipeline mutex to prevent signal processing
  #    while the contructor is still running.
  #    Note, by default an odie object will ignore
  #    signals until a later call to <i>my lock remove pipeline</i>
  ###
  method mixin args {
    ###
    # Mix in the class
    ###
    my variable mixins
    set prior $mixins

    set mixins $args
    ::oo::objdefine [self] mixin {*}$args
    ###
    # Build a compsite map of all ensembles defined by the object's current
    # class as well as all of the classes being mixed in
    ###
    set emap [::tool::ensemble_build_map [::info object class [self]] {*}[lreverse $args]]
    set body [::tool::ensemble_methods $emap]
    oo::objdefine [self] $body
    foreach class $args {
      if {$class ni $prior} {
        my meta mixin $class
      }
      my ClassPublicApply $class
    }
    foreach class $prior {
      if {$class ni $mixins } { 
        my meta mixout $class
      }
    }
  }

  method mixinmap args { 
    my variable mixinmap
    set priorlist {}
    foreach {slot classes} $args {
      if {[dict exists $mixinmap $slot]} {
        lappend priorlist {*}[dict get $mixinmap $slot]  
        foreach class [dict get $mixinmap $slot] {
          if {$class ni $classes && [$class meta exists mixin unmap-script:]} {
            if {[catch [$class meta get mixin unmap-script:] err errdat]} {
              puts stderr "[self] MIXIN ERROR POPPING $class:\n[dict get $errdat -errorinfo]"
            }
          }
        }
      }
      dict set mixinmap $slot $classes
    }
    my Recompute_Mixins
    foreach {slot classes} $args {
      foreach class $classes {
        if {$class ni $priorlist && [$class meta exists mixin map-script:]} {
          if {[catch [$class meta get mixin map-script:] err errdat]} {
            puts stderr "[self] MIXIN ERROR PUSHING $class:\n[dict get $errdat -errorinfo]"
          }
        }
      }
    }
    foreach {slot classes} $mixinmap {
      foreach class $classes {
        if {[$class meta exists mixin react-script:]} {
          if {[catch [$class meta get mixin react-script:] err errdat]} {
            puts stderr "[self] MIXIN ERROR REACTING $class:\n[dict get $errdat -errorinfo]"
          }
        }
      }
    }
  }

  method debug_mixinmap {} {
    my variable mixinmap
    return $mixinmap
  }

  method Recompute_Mixins {} {
    my variable mixinmap
    set classlist {}
    foreach {item class} $mixinmap {
      if {$class ne {}} {
        lappend classlist $class
      }
    }
    my mixin {*}$classlist
  }
  
  method morph newclass {
    if {$newclass eq {}} return
    set class [string trimleft [info object class [self]]]
    set newclass [string trimleft $newclass :]
    if {[info command ::$newclass] eq {}} {
      error "Class $newclass does not exist"
    }
    if { $class ne $newclass } {
      my Morph_leave
      my variable mixins
      oo::objdefine [self] class ::${newclass}
      my graft class ::${newclass}
      # Reapply mixins
      my mixin {*}$mixins
      my InitializePublic
      my Morph_enter
    }
  }

  ###
  # Commands to perform as this object transitions out of the present class
  ###
  method Morph_leave {} {}
  ###
  # Commands to perform as this object transitions into this class as a new class
  ###
  method Morph_enter {} {}
  
  ###
  # title: List which objects are forwarded as organs
  ###
  method organ {{stub all}} {
    my variable organs
    if {![info exists organs]} {
      return {}
    }
    if { $stub eq "all" } {
      return $organs
    }
    return [dict getnull $organs $stub]
  }
}



###
# END: metaclass.tcl
###
###
# START: option.tcl
###
###
# topic: 68aa446005235a0632a10e2a441c0777
# title: Define an option for the class
###
proc ::tool::define::option {name args} {
  set class [current_class]
  set dictargs {default: {}}
  foreach {var val} [::oo::meta::args_to_dict {*}$args] {
    dict set dictargs [string trimright [string trimleft $var -] :]: $val
  }
  set name [string trimleft $name -]

  ###
  # Option Class handling
  ###
  set optclass [dict getnull $dictargs class:]
  if {$optclass ne {}} {
    foreach {f v} [::oo::meta::info $class getnull option_class $optclass] {
      if {![dict exists $dictargs $f]} {
        dict set dictargs $f $v
      }
    }
    if {$optclass eq "variable"} {
      variable $name [dict getnull $dictargs default:]
    }
  }
  ::oo::meta::info $class branchset option $name $dictargs
}

###
# topic: 827a3a331a2e212a6e301f59c1eead59
# title: Define a class of options
# description:
#    Option classes are a template of properties that other
#    options can inherit.
###
proc ::tool::define::option_class {name args} {
  set class [current_class]
  set dictargs {default {}}
  foreach {var val} [::oo::meta::args_to_dict {*}$args] {
    dict set dictargs [string trimleft $var -] $val
  }
  set name [string trimleft $name -]
  ::oo::meta::info $class branchset option_class $name $dictargs
}

::tool::define ::tool::object {
  property options_strict 0
  variable organs {}

  option_class organ {
    widget label
    set-command {my graft %field% %value%}
    get-command {my organ %field%}
  }

  option_class variable {
    widget entry
    set-command {my variable %field% ; set %field% %value%}
    get-command {my variable %field% ; set %field%}
  }
  
  dict_ensemble config config {
    get {
      return [my Config_get {*}$args]
    }
    merge {
      return [my Config_merge {*}$args]
    }
    set {
      my Config_set {*}$args
    }
  }

  ###
  # topic: 86a1b968cea8d439df87585afdbdaadb
  ###
  method cget args {
    return [my Config_get {*}$args]
  }

  ###
  # topic: 73e2566466b836cc4535f1a437c391b0
  ###
  method configure args {
    # Will be removed at the end of "configurelist_triggers"
    set dictargs [::oo::meta::args_to_options {*}$args]
    if {[llength $dictargs] == 1} {
      return [my cget [lindex $dictargs 0]]
    }
    set dat [my Config_merge $dictargs]
    my Config_triggers $dat
  }

  method Config_get {field args} {
    my variable config option_canonical option_getcmd
    set field [string trimleft $field -]
    if {[info exists option_canonical($field)]} {
      set field $option_canonical($field)
    }
    if {[info exists option_getcmd($field)]} {
      return [eval $option_getcmd($field)]
    }
    if {[dict exists $config $field]} {
      return [dict get $config $field]
    }
    if {[llength $args]} {
      return [lindex $args 0]
    }
    return [my meta cget $field] 
  }
  
  ###
  # topic: dc9fba12ec23a3ad000c66aea17135a5
  ###
  method Config_merge dictargs {
    my variable config option_canonical
    set rawlist $dictargs
    set dictargs {}
    set dat [my meta getnull option]
    foreach {field val} $rawlist {
      set field [string trimleft $field -]
      set field [string trimright $field :]
      if {[info exists option_canonical($field)]} {
        set field $option_canonical($field)
      }
      dict set dictargs $field $val
    }
    ###
    # Validate all inputs
    ###
    foreach {field val} $dictargs {
      set script [dict getnull $dat $field validate-command:]
      if {$script ne {}} {
        dict set dictargs $field [eval [string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]]
      }
    }
    ###
    # Apply all inputs with special rules
    ###
    foreach {field val} $dictargs {
      set script [dict getnull $dat $field set-command:]
      dict set config $field $val
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
    return $dictargs
  }
  
  method Config_set args {
    set dictargs [::tool::args_to_options {*}$args]
    set dat [my Config_merge $dictargs]
    my Config_triggers $dat
  }
  
  ###
  # topic: 543c936485189593f0b9ed79b5d5f2c0
  ###
  method Config_triggers dictargs {
    set dat [my meta getnull option]
    foreach {field val} $dictargs {
      set script [dict getnull $dat $field post-command:]
      if {$script ne {}} {
        {*}[string map [list %field% [list $field] %value% [list $val] %self% [namespace which my]] $script]
      }
    }
  }

  method Option_Default field {
    set info [my meta getnull option $field]
    set getcmd [dict getnull $info default-command:]
    if {$getcmd ne {}} {
      return [{*}[string map [list %field% $field %self% [namespace which my]] $getcmd]]
    } else {
      return [dict getnull $info default:]
    }
  }
}

package provide tool::option 0.1

###
# END: option.tcl
###
###
# START: event.tcl
###
###
# This file implements the Tool event manager
###

::namespace eval ::tool {}

::namespace eval ::tool::event {}

###
# topic: f2853d380a732845610e40375bcdbe0f
# description: Cancel a scheduled event
###
proc ::tool::event::cancel {self {task *}} {
  variable timer_event
  variable timer_script

  foreach {id event} [array get timer_event $self:$task] {
    ::after cancel $event
    set timer_event($id) {}
    set timer_script($id) {}
  }
}

###
# topic: 8ec32f6b6ba78eaf980524f8dec55b49
# description:
#    Generate an event
#    Adds a subscription mechanism for objects
#    to see who has recieved this event and prevent
#    spamming or infinite recursion
###
proc ::tool::event::generate {self event args} {
  set wholist [Notification_list $self $event]
  if {$wholist eq {}} return
  set dictargs [::oo::meta::args_to_options {*}$args]
  set info $dictargs
  set strict 0
  set debug 0
  set sender $self
  dict with dictargs {}
  dict set info id     [::tool::event::nextid]
  dict set info origin $self
  dict set info sender $sender
  dict set info rcpt   {}
  foreach who $wholist {
    catch {::tool::event::notify $who $self $event $info}
  }
}

###
# topic: 891289a24b8cc52b6c228f6edb169959
# title: Return a unique event handle
###
proc ::tool::event::nextid {} {
  return "event#[format %0.8x [incr ::tool::event_count]]"
}

###
# topic: 1e53e8405b4631aec17f98b3e8a5d6a4
# description:
#    Called recursively to produce a list of
#    who recieves notifications
###
proc ::tool::event::Notification_list {self event {stackvar {}}} {
  set notify_list {}
  foreach {obj patternlist} [array get ::tool::object_subscribe] {
    if {$obj eq $self} continue
    if {$obj in $notify_list} continue
    set match 0
    foreach {objpat eventlist} $patternlist {
      if {![string match $objpat $self]} continue
      foreach eventpat $eventlist {
        if {![string match $eventpat $event]} continue
        set match 1
        break
      }
      if {$match} {
        break
      }
    }
    if {$match} {
      lappend notify_list $obj
    }
  }
  return $notify_list
}

###
# topic: b4b12f6aed69f74529be10966afd81da
###
proc ::tool::event::notify {rcpt sender event eventinfo} {
  if {[info commands $rcpt] eq {}} return 
  if {$::tool::trace} {
    puts [list event notify rcpt $rcpt sender $sender event $event info $eventinfo]
  }
  $rcpt notify $event $sender $eventinfo
}

###
# topic: 829c89bda736aed1c16bb0c570037088
###
proc ::tool::event::process {self handle script} {
  variable timer_event
  variable timer_script

  array unset timer_event $self:$handle
  array unset timer_script $self:$handle

  set err [catch {uplevel #0 $script} result errdat]
  if $err {
    puts "BGError: $self $handle $script
ERR: $result
[dict get $errdat -errorinfo]
***"
  }
}

###
# topic: eba686cffe18cd141ac9b4accfc634bb
# description: Schedule an event to occur later
###
proc ::tool::event::schedule {self handle interval script} {
  variable timer_event
  variable timer_script
  if {$::tool::trace} {
    puts [list $self schedule $handle $interval]
  }
  if {[info exists timer_event($self:$handle)]} {
    if {$script eq $timer_script($self:$handle)} {
      return
    }
    ::after cancel $timer_event($self:$handle)
  }
  set timer_script($self:$handle) $script
  set timer_event($self:$handle) [::after $interval [list ::tool::event::process $self $handle $script]]
}

proc ::tool::event::sleep msec {
  ::cron::sleep $msec
}

###
# topic: e64cff024027ee93403edddd5dd9fdde
###
proc ::tool::event::subscribe {self who event} {
  upvar #0 ::tool::object_subscribe($self) subscriptions
  if {![info exists subscriptions]} {
    set subscriptions {}
  }
  set match 0
  foreach {objpat eventlist} $subscriptions {
    if {![string match $objpat $who]} continue      
    foreach eventpat $eventlist {
      if {[string match $eventpat $event]} {
        # This rule already exists
        return
      }
    }
  }
  dict lappend subscriptions $who $event
}

###
# topic: 5f74cfd01735fb1a90705a5f74f6cd8f
###
proc ::tool::event::unsubscribe {self args} {
  upvar #0 ::tool::object_subscribe($self) subscriptions
  if {![info exists subscriptions]} {
    return
  }  
  switch [llength $args] {
    1 {
      set event [lindex $args 0]
      if {$event eq "*"} {
        # Shortcut, if the 
        set subscriptions {}
      } else {
        set newlist {}
        foreach {objpat eventlist} $subscriptions {
          foreach eventpat $eventlist {
            if {[string match $event $eventpat]} continue
            dict lappend newlist $objpat $eventpat
          }
        }
        set subscriptions $newlist
      }
    }
    2 {
      set who [lindex $args 0]
      set event [lindex $args 1]
      if {$who eq "*" && $event eq "*"} {
        set subscriptions {}
      } else {
        set newlist {}
        foreach {objpat eventlist} $subscriptions {
          if {[string match $who $objpat]} {
            foreach eventpat $eventlist {
              if {[string match $event $eventpat]} continue
              dict lappend newlist $objpat $eventpat
            }
          }
        }
        set subscriptions $newlist
      }
    }
  }
}

::tool::define ::tool::object {
  ###
  # topic: 20b4a97617b2b969b96997e7b241a98a
  ###
  method event {submethod args} {
    ::tool::event::$submethod [self] {*}$args
  }
}

###
# topic: 37e7bd0be3ca7297996da2abdf5a85c7
# description: The event manager for Tool
###
namespace eval ::tool::event {
  variable nextevent {}
  variable nexteventtime 0
}


###
# END: event.tcl
###
###
# START: pipeline.tcl
###
::namespace eval ::tool::signal {}
::namespace eval ::tao {}

# Provide a backward compatible hook
proc ::tool::main {} {
  ::cron::main
}

proc ::tool::do_events {} {
  ::cron::do_events
}

proc ::tao::do_events {} {
  ::cron::do_events
}

proc ::tao::main {} {
  ::cron::main
}


package provide tool::pipeline 0.1


###
# END: pipeline.tcl
###
###
# START: coroutine.tcl
###
proc ::tool::define::coroutine {name corobody} {
  set class [current_class]
  ::oo::meta::info $class set method_ensemble ${name} _preamble: [list {} [string map [list %coroname% $name] {
    my variable coro_queue coro_lock
    set coro %coroname%
    set coroname [info object namespace [self]]::%coroname%
  }]]
  ::oo::meta::info $class set method_ensemble ${name} coroutine: {{} {
    return $coroutine
  }}
  ::oo::meta::info $class set method_ensemble ${name} restart: {{} {
    # Don't allow a coroutine to kill itself
    if {[info coroutine] eq $coroname} return
    if {[info commands $coroname] ne {}} {
      rename $coroname {}
    }
    set coro_lock($coroname) 0
    ::coroutine $coroname {*}[namespace code [list my $coro main]]
    ::cron::object_coroutine [self] $coroname
  }}
  ::oo::meta::info $class set method_ensemble ${name} kill: {{} {
    # Don't allow a coroutine to kill itself
    if {[info coroutine] eq $coroname} return
    if {[info commands $coroname] ne {}} {
      rename $coroname {}
    }
  }}

  ::oo::meta::info $class set method_ensemble ${name} main: [list {} $corobody]

  ::oo::meta::info $class set method_ensemble ${name} clear: {{} {
    set coro_queue($coroname) {}
  }}
  ::oo::meta::info $class set method_ensemble ${name} next: {{eventvar} {
    upvar 1 [lindex $args 0] event
    if {![info exists coro_queue($coroname)]} {
      return 1
    }
    if {[llength $coro_queue($coroname)] == 0} {
      return 1
    }
    set event [lindex $coro_queue($coroname) 0]
    set coro_queue($coroname) [lrange $coro_queue($coroname) 1 end]
    return 0
  }}
  
  ::oo::meta::info $class set method_ensemble ${name} peek: {{eventvar} {
    upvar 1 [lindex $args 0] event
    if {![info exists coro_queue($coroname)]} {
      return 1
    }
    if {[llength $coro_queue($coroname)] == 0} {
      return 1
    }
    set event [lindex $coro_queue($coroname) 0]
    return 0
  }}

  ::oo::meta::info $class set method_ensemble ${name} running: {{} {
    if {[info commands $coroname] eq {}} {
      return 0
    }
    if {[::cron::task exists $coroname]} {
      set info [::cron::task info $coroname]
      if {[dict exists $info running]} {
        return [dict get $info running]
      }
    }
    return 0
  }}
  
  ::oo::meta::info $class set method_ensemble ${name} send: {args {
    lappend coro_queue($coroname) $args
    if {[info coroutine] eq $coroname} {
      return
    }
    if {[info commands $coroname] eq {}} {
      ::coroutine $coroname {*}[namespace code [list my $coro main]]
      ::cron::object_coroutine [self] $coroname
    }
    if {[info coroutine] eq {}} {
      ::cron::do_one_event $coroname
    } else {
      yield
    }
  }}
  ::oo::meta::info $class set method_ensemble ${name} default: {args {my [self method] send $method {*}$args}}

}

###
# END: coroutine.tcl
###
###
# START: organ.tcl
###
###
# A special class of objects that
# stores no meta data of its own
# Instead it vampires off of the master object
###
tool::class create ::tool::organelle {
  
  constructor {master} {
    my entangle $master
    set final_class [my select]
    if {[info commands $final_class] ne {}} {
      # Safe to switch class here, we haven't initialized anything
      oo::objdefine [self] class $final_class
    }
    my initialize
  }

  method entangle {master} {
    my graft master $master
    my forward meta $master meta
    foreach {stub organ} [$master organ] {
      my graft $stub $organ
    }
    foreach {methodname variable} [my meta branchget array_ensemble] {
      my forward $methodname $master $methodname
    }
  }
  
  method select {} {
    return {}
  }
}

###
# END: organ.tcl
###
###
# START: script.tcl
###
###
# Add configure by script facilities to TOOL
###
::tool::define ::tool::object {

  ###
  # Allows for a constructor to accept a psuedo-code
  # initialization script which exercise the object's methods
  # sans "my" in front of every command
  ###
  method Eval_Script script {
    set buffer {}
    set thisline {}
    foreach line [split $script \n] {
      append thisline $line
      if {![info complete $thisline]} {
        append thisline \n
        continue
      }
      set thisline [string trim $thisline]
      if {[string index $thisline 0] eq "#"} continue
      if {[string length $thisline]==0} continue
      if {[lindex $thisline 0] eq "my"} {
        # Line already calls out "my", accept verbatim
        append buffer $thisline \n
      } elseif {[string range $thisline 0 2] eq "::"} {
        # Fully qualified commands accepted verbatim
        append buffer $thisline \n
      } elseif {
        append buffer "my $thisline" \n
      }
      set thisline {}
    }
    eval $buffer
  }
}
###
# END: script.tcl
###

namespace eval ::tool {
  namespace export *
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Changes to modules/tool/tool.test.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
    use oodialect/oodialect.tcl oo::dialect
    use dicttool/dicttool.tcl   dicttool
    use cron/cron.tcl           cron
    use oometa/oometa.tcl       oo::meta
    use sha1/sha1.tcl           sha1
}
testing {
    useLocal tool.tcl tool
}

# -------------------------------------------------------------------------

###
# Test the underlying components
###







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
    use oodialect/oodialect.tcl oo::dialect
    use dicttool/dicttool.tcl   dicttool
    use cron/cron.tcl           cron
    use oometa/oometa.tcl       oo::meta
    use sha1/sha1.tcl           sha1
}
testing {
    useLocal index.tcl tool
}

# -------------------------------------------------------------------------

###
# Test the underlying components
###
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
  NestedObjectE do somethingelse
} {D}

test tool-ensemble-005 {Test that ensembles follow the same rules for inheritance as methods} {
  NestedObjectF do somethingelse
} {C}

###
# Set of tests to exercise the mixinmap system
###
tool::define MixinMainClass {
  variable mainvar unchanged
  
  method test::which {} {
    my variable mainvar
    return $mainvar
  }
  
  method test::main args {
    puts [list this is main $method $args]
  }

}

tool::define MixinTool {
  variable toolvar unchanged.mixin
  meta set mixin unmap-script: {
my test untool $class
  }
  meta set mixin map-script: {
my test tool $class
  }
  meta set mixin name: {Generic Tool}
  
  method test::untool class { 
    my variable toolvar mainvar
    set mainvar {}
    set toolvar {} 
  }
  
  method test::tool class {
    my variable toolvar mainvar
    set mainvar [$class meta get mixin name:] 
    set toolvar [$class meta get mixin name:] 
  }
}

tool::define MixinToolA {
  superclass MixinTool
  meta set mixin name: {Tool A}
}

tool::define MixinToolB {
  superclass MixinTool
  meta set mixin name: {Tool B}

  method test_newfunc {} {
    return "B"
  }
}

MixinMainClass create mixintest

test tool-mixinmap-001 {Test object prior to mixins} {
  mixintest test which
} {unchanged}

mixintest mixinmap tool MixinToolA
test tool-mixinmap-002 {Test mixin map script ran} {
  mixintest test which
} {Tool A}

mixintest mixinmap tool MixinToolB
test tool-mixinmap-003 {Test mixin map script ran} {
  mixintest test which
} {Tool B}

test tool-mixinmap-003 {Test mixin map script ran} {
  mixintest test_newfunc
} {B}

mixintest mixinmap tool {}
test tool-mixinmap-001 {Test object prior to mixins} {
  mixintest test which
} {}

###
# Coroutine tests
###
tool::define coro_example {
  
  dict_ensemble coro_a_info coro_a_info {
    initialize {
      restart 0
      phase 0
      loop  0
      event 0
      idle  0
    }
  }
  
  coroutine coro_a {
    my coro_a_info merge {
      phase 0
      loop  0
      event 0
      idle  0
    }
    yield [info coroutine]
    while 1 {
      my coro_a_info incr phase
      my coro_a_info set  loop 0
      while 1 {
        if {[my $coro next event]} {
          my coro_a_info incr idle
          yield
          continue
        }
        my coro_a_info set last_event $event
        my coro_a_info incr loop
        my coro_a_info incr event
        switch [lindex $event 0] {
          phase {
            break
          }
          quit {
            return
          }
          b {
            my coro_b send [lrange $event 1 end]
          }
        }
      }
    }
  }
  
  dict_ensemble coro_b_info coro_b_info {
    initialize {
      restart 0
      phase 0
      loop  0
      event 0
      idle  0
    }
  }
  
  coroutine coro_b {
    my coro_b_info merge {
      phase 0
      loop  0
      event 0
      idle  0
    }
    yield [info coroutine]

    while 1 {
      my coro_b_info incr phase
      my coro_b_info set  loop 0
      while 1 {
        if {[my $coro next event]} {
          my coro_b_info incr idle
          yield
          continue
        }
        my coro_b_info incr loop
        my coro_b_info incr event
        switch [lindex $event 0] {
          phase break
          quit return
          a {
            my coro_a [lrange $event 1 end]
          }
        }
      }
    }
  }
  

  dict_ensemble coro_yodawg_info coro_yodawg_info {
    initialize {
      restart 0
      phase 0
      loop  0
      event 0
      idle  0
      yodawg  0
    }
  }
  
  coroutine coro_yodawg {
    my coro_yodawg_info merge {
      phase 0
      loop  0
      event 0
      idle  0
      yodawg  0
      iloop 0
    }
    yield [info coroutine]

    while 1 {
      my coro_yodawg_info incr phase
      my coro_yodawg_info set  loop 0
      while 1 {
        if {[my $coro next event]} {
          my coro_yodawg_info incr idle
          yield
          continue
        }
        my coro_yodawg_info set last_event $event
        my coro_yodawg_info incr loop
        my coro_yodawg_info incr event
        switch [lindex $event 0] {
          phase break
          quit {
            return
          }
          yodawg {
            my coro_yodawg_info incr yodawg
            if {[my coro_yodawg_info get yodawg] <32} {
              my coro_yodawg yodawg
              yield
            }
          }
          iloop {
            my coro_yodawg_info incr iloop
          }
        }
      }
    }
  }
}

set obj [coro_example new]
$obj coro_a none
test tool-coroutine-001-00 {Test coroutine } {
  $obj coro_a_info get restart
} 0
test tool-coroutine-001-01 {Test coroutine } {
  $obj coro_a_info get loop
} 1
$obj coro_a none
test tool-coroutine-001-02 {Test coroutine } {
  $obj coro_a_info get loop
} 2
$obj coro_a none
test tool-coroutine-001-03 {Test coroutine } {
  $obj coro_a_info get loop
} 3
$obj coro_a phase
test tool-coroutine-002-01 {Test coroutine } {
  $obj coro_a_info get loop
} 0
test tool-coroutine-002-02 {Test coroutine } {
  $obj coro_a_info get phase
} 2

###
# Start both coroutines over
$obj coro_a restart
$obj coro_b restart

test tool-coroutine-003-01-A {Test coroutine } {
  $obj coro_a_info get phase
} 0
test tool-coroutine-003-01-B {Test coroutine } {
  $obj coro_a_info get loop
} 0
test tool-coroutine-003-01-C {Test coroutine } {
  $obj coro_a_info get phase
} 0
test tool-coroutine-003-01-D {Test coroutine } {
  $obj coro_b_info get loop
} 0


$obj coro_a b
###
# Test coroutines calling coroutines
test tool-coroutine-003-02-A {Test coroutine } {
  $obj coro_a_info get loop
} 1
test tool-coroutine-003-02-B {Test coroutine } {
  $obj coro_b_info get loop
} 1

$obj coro_b a
###
# Test coroutines calling coroutines
# Note: Each call to each other coroutine can only happen
# once per "send"
###
test tool-coroutine-003-03-A {Test coroutine } {
  $obj coro_a_info get loop
} 1
test tool-coroutine-003-03-B {Test coroutine } {
  $obj coro_b_info get loop
} 2

###
# Rig the coroutine to call itself back from the other coroutine
###
$obj coro_b a b
###
# Test coroutines calling coroutines
test tool-coroutine-003-04-A {Test coroutine } {
  $obj coro_a_info get loop
} 2
test tool-coroutine-003-04-B {Test coroutine } {
  $obj coro_b_info get loop
} 3

# We should see A update in the background
$obj coro_b loop
test tool-coroutine-003-05-A {Test coroutine } {
  $obj coro_a_info get loop
} 3
test tool-coroutine-003-05-B {Test coroutine } {
  $obj coro_b_info get loop
} 5

# Now only B advances
$obj coro_b loop
test tool-coroutine-003-05-A {Test coroutine } {
  $obj coro_a_info get loop
} 3
test tool-coroutine-003-05-B {Test coroutine } {
  $obj coro_b_info get loop
} 6

# Now only A advances
$obj coro_a loop
test tool-coroutine-003-06-A {Test coroutine } {
  $obj coro_a_info get loop
} 4
test tool-coroutine-003-06-B {Test coroutine } {
  $obj coro_b_info get loop
} 6

###
# Test a malformed coroutine that calls itself
# The safety mechanism should allow the event to re-schedule itself
# but only once per call, and only execute once per call
###
test tool-coroutine-yodawg-00 {Test coroutine - yodawg } {
  $obj coro_yodawg running
} 0

$obj coro_yodawg yodawg
test tool-coroutine-yodawg-01 {Test coroutine - yodawg } {
  $obj coro_yodawg_info get yodawg
} 1
$obj coro_yodawg
test tool-coroutine-yodawg-02 {Test coroutine - yodawg } {
  $obj coro_yodawg_info get yodawg
} 2
$obj coro_yodawg yodawg
$obj coro_yodawg yodawg
test tool-coroutine-yodawg-03 {Test coroutine - yodawg } {
  $obj coro_yodawg_info get yodawg
} 4
for {set x 1} {$x < 32} {incr x} {
  $obj coro_yodawg iloop
  set a [$obj coro_yodawg_info get yodawg]
  set levent [$obj coro_yodawg_info get last_event]
  set iloop [$obj coro_yodawg_info get iloop]
  if {$a > 32} break
  test tool-coroutine-yodawg-03-yd-$x {Test coroutine - yodawg } {
    set a
  } [expr {4+$x}]
  test tool-coroutine-yodawg-03-le-$x {Test coroutine - yodawg } {
    set levent
  } yodawg
  # The iloop should *ALSO* be running side-by-side with the yodawg
  # However, not until the first three yodawg events are processed
  # in the queue
  if {$x > 3} {
    test tool-coroutine-yodawg-03-il-$x {Test coroutine - yodawg } {
      set iloop
    } [expr {$x-3}]
  }
}
###
# With the yodawgs resolved we should now
# be processing events in order once more
# Add one more event
#
# NOTE the lagging iloop events do catch up
###
$obj coro_yodawg end
test tool-coroutine-yodawg-03-iloop-count {Test coroutine - yodawg } {
  $obj coro_yodawg_info get iloop
} $x
test tool-coroutine-yodawg-03-endevent {Test coroutine - yodawg } {
  $obj coro_yodawg_info get last_event
} end

# -------------------------------------------------------------------------


testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









570
571
572
573
574
575
576






































































































































































































































































































































































































577
578
579
580
581
582
583
584
585
  NestedObjectE do somethingelse
} {D}

test tool-ensemble-005 {Test that ensembles follow the same rules for inheritance as methods} {
  NestedObjectF do somethingelse
} {C}







































































































































































































































































































































































































# -------------------------------------------------------------------------


testsuiteCleanup

# Local variables:
# mode: tcl
# indent-tabs-mode: nil
# End:

Changes to modules/tool/tool_dict_ensemble.man.

26
27
28
29
30
31
32
33
34

[list_end]

[section AUTHORS]
Sean Woods

[vset CATEGORY tool]
[include ../common-text/feedback.inc]
[manpage_end]







|

26
27
28
29
30
31
32
33
34

[list_end]

[section AUTHORS]
Sean Woods

[vset CATEGORY tool]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Added modules/tool/uuid.tcl.



































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
::namespace eval ::tool {}

proc ::tool::uuid_seed args {
  if {[llength $args]==0 || ([llength $args]==1 && [lindex $args 0] eq {})} {
    if {[info exists ::env(USERNAME)]} {
      set user $::env(USERNAME)
    } elseif {[info exists ::env(USER)]} {
      set user $::env(USER)
    } else {
      set user $::env(user)
    }
    incr ::tool::nextuuid $::tool::globaluuid
    set ::tool::UUID_Seed [list user@[info hostname] [clock format [clock seconds]]]
  } else {
    incr ::tool::globaluuid $::tool::nextuuid
    set ::tool::nextuuid 0
    set ::tool::UUID_Seed $args
  }
}

###
# topic: 0a19b0bfb98162a8a37c1d3bbfb8bc3d
# description:
#    Because the tcllib version of uuid generate requires
#    network port access (which can be slow), here's a fast
#    and dirty rendition
###
proc ::tool::uuid_generate args {
  if {![llength $args]} {
    set block [list [incr ::tool::nextuuid] {*}$::tool::UUID_Seed]
  } else {
    set block $args
  }
  return [::sha1::sha1 -hex [join $block ""]]
}

###
# topic: ee3ec43cc2cc2c7d6cf9a4ef1c345c19
###
proc ::tool::uuid_short args {
  if {![llength $args]} {
    set block [list [incr ::tool::nextuuid] {*}$::tool::UUID_Seed]
  } else {
    set block $args
  }
  return [string range [::sha1::sha1 -hex [join $block ""]] 0 16]
}

###
# topic: b14c505537274904578340ec1bc12af1
# description:
#    Implementation the uses a compiled in ::md5 implementation
#    commonly used by embedded application developers
###
namespace eval ::tool {
  namespace export *
}
###
# Cache the bits of the UUID seed that aren't likely to change
# once the software is loaded, but which can be expensive to
# generate
###
set ::tool::nextuuid 0
set ::tool::globaluuid 0
::tool::uuid_seed

Added modules/tool_datatype/datatype.tcl.





































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
###
# Tool Datatypes
###

::tool::define ::tool::datatype::string {
  method value::get value {
    return $value
  }

  method value::put value {
    return $value
  }
}

::tool::define ::tool::datatype::boolean {
  superclass ::tool::datatype::string

  ###
  # topic: efc05671edb5dba64be56c1c3d102e6f9cdf3287
  ###
  method value::get rawvalue {
    return [string is true -strict $rawvalue]
  }

  ###
  # topic: 1c75cc4d57d468fc594ecad49fc20a954158c18f
  ###
  method value::put rawvalue {
    return [string is true -strict $rawvalue]
  }
}

::tool::define ::tool::datatype::integer {
  superclass ::tool::datatype::string

  option format {default %d}
  
  ###
  # topic: efc05671edb5dba64be56c1c3d102e6f9cdf3287
  ###
  method value::get rawvalue {
    if { $rawvalue eq {} } {
      return {}
    }
    set format [my cget format]
    set c [scan $rawvalue $format newvalue]
    if {![info exists newvalue]} {
      error "Bad value $rawvalue"
    }
    return $newvalue
  }

  ###
  # topic: 1c75cc4d57d468fc594ecad49fc20a954158c18f
  ###
  method value::put rawvalue {
    if { $rawvalue eq {} } {
      return {}
    }
    set format [my cget format]
    set c [scan $rawvalue $format newvalue]
    if {![info exists newvalue]} {
      error "Bad value $rawvalue"
    }
    return $newvalue
  }
}

::tool::define ::tool::datatype::real {
  superclass ::tool::datatype::string

  option format {default %g}
  
  ###
  # topic: c32d30915be323dca1264c441d06a16ea6b62b68
  ###
  method value::get rawvalue {
    if { $rawvalue eq {} } {
      return {}
    }
    set format [my cget format]
    set c [scan $rawvalue $format newvalue]
    if {![info exists newvalue]} {
      error "Bad value $rawvalue"
    }
    return $newvalue
  }

  ###
  # topic: 27f11c0626223864f2602553471cc11d563b2eec
  ###
  method value::put rawvalue {
    if { $rawvalue eq {} } {
      return {}
    }
    set format [my cget format]
    set c [scan $rawvalue $format newvalue]
    if {![info exists newvalue]} {
      error "Bad value $rawvalue"
    }
    return $newvalue
  }
}

::tool::define ::tool::datatype::unixtime {
  superclass ::tool::datatype::string

  option gmt {widget boolean default 0}

  ###
  # topic: ba50b03e339a6f09b429871fc6a2ba3c54516aa2
  # title: Convert an internally encoded value to its externally encoded value
  # description:
  #    Used for widgets that display human-readable values. For example
  #    converting the human readable [emph {c131 - 01-141-L - Passage}]
  #    into an integer ([emph 131]) for encoding in a database field.
  ###
  method value::get value {
    if { $value eq {} } {
      return {}
    }
    set outtime [clock scan $value -gmt [my cget gmt]]
    return $outtime
  }

  ###
  # topic: ef8b8c1dbd3388c95a14de3e551e7c4a43ba7bbf
  # title: Convert an externally encoded value to its internally encoded value
  # description:
  #    Used for widgets that display human-readable values. For example
  #    converting an integer in the database ([emph 131]) to something
  #    mor intelligable to the user [emph {c131 - 01-141-L - Passage}]
  ###
  method value::put value {
    if { $value eq {} } {
      return {}
    }
    set realvalue $value
    return [clock format $realvalue -gmt [my cget gmt]]
  }
}

::tool::define ::tool::datatype::datetime {
  superclass ::tool::datatype::string

  option display_format {default {}}  
  option output_format  {default {}}
  option gmt {widget boolean default 0}

  ###
  # topic: 1e0804037f9558efac701766446ed26bb67b318f
  # title: Convert an internally encoded value to its externally encoded value
  # description:
  #    Used for widgets that display human-readable values. For example
  #    converting the human readable [emph {c131 - 01-141-L - Passage}]
  #    into an integer ([emph 131]) for encoding in a database field.
  ###
  method value::get value {
    if { $value eq {} } {
      return {}
    }
    set format [my cget display_format]
    if { $format ni { {} "unixtime" } } {
      set outtime [clock scan $value -format $format -gmt [my cget gmt]]
    } else {
      set outtime [clock scan $value]
    }
    set format [my cget output_format]
    if { $format ni { {} "unixtime" } } {
      return [clock format $outtime -format $format -gmt [my cget gmt]]
    } else {
      return $outtime
    }
  }

  ###
  # topic: fee644b1fa3dc4796d55a0429e0418171854b4d4
  # title: Convert an externally encoded value to its internally encoded value
  # description:
  #    Used for widgets that display human-readable values. For example
  #    converting an integer in the database ([emph 131]) to something
  #    mor intelligable to the user [emph {c131 - 01-141-L - Passage}]
  ###
  method value::put value {
    if { $value eq {} } {
      return {}
    }
    set format [my cget output_format]
    if { $format ni { {} "unixtime" } } {
      set realvalue [clock scan $value -format $format -gmt [my cget gmt]]
    } else {
      set realvalue $value
    }
    set format [my cget display_format]
    if { $format ni { {} "unixtime" } } {
      return [clock format $realvalue -format $format -gmt [my cget gmt]]
    } else {
      return [clock format $realvalue -gmt [my cget gmt]]
    }
  }
}

::tool::define ::tool::datatype::select {
  superclass ::tool::datatype::string

  option values {}
  
  option state {
    widget select
    values {normal readonly disabled}
    default readonly
  }

  ###
  # topic: 3339ac6fe57b0b23add1e8fb64336c567a7e3694
  ###
  method CalculateValues {} {
    return [my GetConfigValueList]
  }

  ###
  # topic: 6ee18ff095fc0ff746b0dcf0876daa6150adf42c
  ###
  method CalculateValueWidth values {
    set w 0
    set n 0
    foreach v $values {
      incr n
      set l [string length $v]
      incr bins($l)
      if {$l > $w} {
        set w $l
      }
    }
    if { $w > 30} {
      set w 30
    }
    return $w
  }

  ###
  # topic: 14e9b60d5636bca086ca44a90cf15dbefeaa1340
  ###
  method GetConfigValueList {} {
    my variable config
    set values {}
    if {[dict exists $config options_command]} {
      return [eval [dict get $config options_command]]
    }
    if {[dict exists $config values]} {
      return [dict get $config values]
    }
    if {[dict exists $config options]} {
      return [dict get $config options]
    }
    return {}
  }
}

::tool::define ::tool::datatype::select_keyvalue {
  superclass ::tool::datatype::select

  option state {
    widget select
    values {normal readonly disabled}
    default readonly
  }
  option accept_number {
    widget boolean
    default 1
  }

  ###
  # topic: 77bd2ab8551c40ecee13ffc38d6f9af819680de9
  ###
  method CalculateValues {} {
    set values [my GetConfigValueList]
    foreach {key value} $values {
      lappend result $key
    }
    return $result
  }

  ###
  # topic: 3e8bc6c0b4bdafca5b43b927e2c874432239fc4f
  ###
  method value::get rawvalue {
    set values [my GetConfigValueList]
    foreach {var val} $values {
      if {$rawvalue eq $val} {
        return $val
      }
      if {$rawvalue eq $var} {
        return $val
      }
    }
    return $rawvalue
  }

  ###
  # topic: 6a6e2567e1fa5cb769dc67cc402ff2a08cb55ecd
  ###
  method value::put rawvalue {
    set values [my GetConfigValueList]
    foreach {var val} $values {
      if {$rawvalue eq $val} {
        return $var
      }
      if {$rawvalue eq $var} {
        return $var
      }
    }
    if {[my cget accept_number]} {
      if {[string is double $rawvalue]} {
        return $rawvalue
      }
    }
    error "Invalid Value \"$rawvalue\". Valid: [join [dict keys $values] ,]"
  }
}

::tool::define ::tool::datatype::enumerated {
  superclass ::tool::datatype::select

  option state {
    widget select
    values {normal readonly disabled}
    default readonly
  }
  option enum {
    default {}
  }

  ###
  # topic: 5fa7461dcfec89fd52456af62f04aa28696d5974
  ###
  method CalculateValues {} {
    set values {}
    foreach {id code comment} [my GetConfigValueList] {
      lappend values "$id - $code"
    }
    return $values
  }

  ###
  # topic: b47b26deb7db53bbce74a78401302d103d805748
  ###
  method value::get value {
    set value [lindex $value 0]
    foreach {id code comment} [my GetConfigValueList] {
      if {$value == $id } {
        return $id
      }
    }
    return {}
  }

  ###
  # topic: 90776f5900f1bc28fbdf47c895e2d052e3fbaafd
  ###
  method value::put value {
    foreach {id code comment} [my GetConfigValueList] {
      if { [lindex $value 0] == $id } {
        return "$id - $code - $comment"
      }
    }
    return {}
  }
}

::tool::define ::tool::datatype::vector {
  superclass ::tool::datatype::string
  
  property vector_fields {
    x {format {%0.6g} widget entry width 10}
    y {format {%0.6g} widget entry width 10}
    z {format {%0.6g} widget entry width 10}
  }

  method Vector_Fields {} {
    return [my property vector_fields]
  }
  
  ###
  # topic: 6d9aec52f3c16e5248eee30bfacb9045917273aa
  ###
  method value::get newvalue {
    set result {}
    array set content $newvalue
    foreach {vfield info} [my Vector_Fields]  {
      set format [if_null [dict getnull $info format] %s]
      set newvalue [format $format $content($vfield)]
      lappend result $newvalue
    }
    return $result
  }

  ###
  # topic: 96480da6e97f6cfe3574475a7c3b132b39a9003c
  ###
  method value::put inputvalue {
    set idx -1
    foreach {vfield info} [my Vector_Fields] {
      incr idx
      set format [if_null [dict getnull $info format] %s]
      set value [lindex $inputvalue $idx]
      if {[dict exists $info default]} {
        if {$value eq {}} {
          set value [dict get $info default]
        }
      }
      if {$value eq {}} {
        set local_array($vfield) $value
      } elseif { $format in {"%d" int integer} } {
        if [catch {expr {int($value)}} nvalue] {
          puts "Err: $format $vfield. Raw: $value. Err: $nvalue"
          dict set result $vfield $value
        } else {
          dict set result $vfield $nvalue
        }
      } else {
        if [catch {format $format $value} nvalue] {
          puts "Err: $vfield. Raw: $value. Err: $nvalue"
          dict set result $vfield $value
        } else {
          dict set result $vfield $nvalue
        }
      }
    }
    return $result
  }
}

package provide tool::datatype 0.1

Added modules/tool_datatype/pkgIndex.tcl.





>
>
1
2

package ifneeded tool::datatype 0.1 [list source [file join $dir datatype.tcl]]

Changes to modules/transfer/connect.man.

160
161
162
163
164
165
166
167
168
[include include/connect_options.inc]
[list_end]

[vset OBJCREATE {transfer::connect C}]
[include include/secure.inc]

[vset CATEGORY transfer]
[include ../common-text/feedback.inc]
[manpage_end]







|

160
161
162
163
164
165
166
167
168
[include include/connect_options.inc]
[list_end]

[vset OBJCREATE {transfer::connect C}]
[include include/secure.inc]

[vset CATEGORY transfer]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/transfer/copyops.man.

155
156
157
158
159
160
161
162
163
these options are required, and they default to the settings of the
output channel if not specified.

[list_end][comment options]
[list_end][comment definitions/api]

[vset CATEGORY transfer]
[include ../common-text/feedback.inc]
[manpage_end]







|

155
156
157
158
159
160
161
162
163
these options are required, and they default to the settings of the
output channel if not specified.

[list_end][comment options]
[list_end][comment definitions/api]

[vset CATEGORY transfer]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/transfer/ddest.man.

114
115
116
117
118
119
120
121
122
configure the object.

[list_begin options]
[include include/ddest_options.inc]
[list_end]

[vset CATEGORY transfer]
[include ../common-text/feedback.inc]
[manpage_end]







|

114
115
116
117
118
119
120
121
122
configure the object.

[list_begin options]
[include include/ddest_options.inc]
[list_end]

[vset CATEGORY transfer]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/transfer/dsource.man.

146
147
148
149
150
151
152
153
154
actually configure the object.

[list_begin options]
[include include/dsource_options.inc]
[list_end]

[vset CATEGORY transfer]
[include ../common-text/feedback.inc]
[manpage_end]







|

146
147
148
149
150
151
152
153
154
actually configure the object.

[list_begin options]
[include include/dsource_options.inc]
[list_end]

[vset CATEGORY transfer]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/transfer/receiver.man.

174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
[include include/ddest_options.inc]
[list_end]

[vset OBJCREATE {transfer::receiver R}]
[include include/secure.inc]

[vset CATEGORY transfer]
[include ../common-text/feedback.inc]
[comment {

This option specifies the command to invoke when the transmission of
the information in the data source has been completed. The arguments
given to this command are the same as given to the completion callback
of method [cmd receive], see package
[package transfer::data::destination].

}]
[manpage_end]







|










174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
[include include/ddest_options.inc]
[list_end]

[vset OBJCREATE {transfer::receiver R}]
[include include/secure.inc]

[vset CATEGORY transfer]
[include ../doctools2base/include/feedback.inc]
[comment {

This option specifies the command to invoke when the transmission of
the information in the data source has been completed. The arguments
given to this command are the same as given to the completion callback
of method [cmd receive], see package
[package transfer::data::destination].

}]
[manpage_end]

Changes to modules/transfer/tqueue.man.

166
167
168
169
170
171
172
173
174

It should be noted that in this application the system also needs an
additional data structure which keeps track of outstanding results as
they may come back in a different order than the requests from the
client, and releases them to the actual queue in the proper order.

[vset CATEGORY transfer]
[include ../common-text/feedback.inc]
[manpage_end]







|

166
167
168
169
170
171
172
173
174

It should be noted that in this application the system also needs an
additional data structure which keeps track of outstanding results as
they may come back in a different order than the requests from the
client, and releases them to the actual queue in the proper order.

[vset CATEGORY transfer]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/transfer/transmitter.man.

176
177
178
179
180
181
182
183
184
[include include/dsource_options.inc]
[list_end]

[vset OBJCREATE {transfer::transmitter T}]
[include include/secure.inc]

[vset CATEGORY transfer]
[include ../common-text/feedback.inc]
[manpage_end]







|

176
177
178
179
180
181
182
183
184
[include include/dsource_options.inc]
[list_end]

[vset OBJCREATE {transfer::transmitter T}]
[include include/secure.inc]

[vset CATEGORY transfer]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/treeql/treeql.man.

811
812
813
814
815
816
817
818
819

[uri http://wiki.tcl.tk/treeql TreeQL] on the Tcler's Wiki. Discuss
this package there.

[list_end]

[vset CATEGORY treeql]
[include ../common-text/feedback.inc]
[manpage_end]







|

811
812
813
814
815
816
817
818
819

[uri http://wiki.tcl.tk/treeql TreeQL] on the Tcler's Wiki. Discuss
this package there.

[list_end]

[vset CATEGORY treeql]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/try/tcllib_throw.man.

32
33
34
35
36
37
38
39
40
[section EXAMPLES]

[para][example_begin]
[cmd throw] {MYERROR CODE} "My error message"
[example_end]

[vset CATEGORY try]
[include ../common-text/feedback.inc]
[manpage_end]







|

32
33
34
35
36
37
38
39
40
[section EXAMPLES]

[para][example_begin]
[cmd throw] {MYERROR CODE} "My error message"
[example_end]

[vset CATEGORY try]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/try/tcllib_try.man.

115
116
117
118
119
120
121
122
123
    puts "failed to open /some/file/name: it's a directory"
} [method trap] {POSIX ENOENT} {} {
    puts "failed to open /some/file/name: it doesn't exist"
}
[example_end]

[vset CATEGORY try]
[include ../common-text/feedback.inc]
[manpage_end]







|

115
116
117
118
119
120
121
122
123
    puts "failed to open /some/file/name: it's a directory"
} [method trap] {POSIX ENOENT} {} {
    puts "failed to open /some/file/name: it doesn't exist"
}
[example_end]

[vset CATEGORY try]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/udpcluster/pkgIndex.tcl.

1
2
3
4
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
# Backward compatible alias
package ifneeded nameserv::cluster 0.2.5  {package require udpcluster ; package provide nameserv::cluster 0.2.5}
package ifneeded udpcluster        0.3.3  [list source [file join $dir udpcluster.tcl]]

|
|
|
1
2
3
4
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
# Backward compadible alias
package ifneeded nameserv::cluster 0.2.5   {package require udpcluster ; package provide nameserv::cluster 0.2.5}
package ifneeded udpcluster 0.3.2  [list source [file join $dir udpcluster.tcl]]

Changes to modules/udpcluster/udpcluster.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[vset VERSION 0.3.3]
[manpage_begin udpcluster n [vset VERSION]]
[keywords {name service}]
[keywords server]
[copyright {2016-2018 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Lightweight UDP based tool for cluster node discovery}]
[titledesc {UDP Peer-to-Peer cluster}]
[category  Networking]
[require Tcl 8.5]
[require udpcluster [opt [vset VERSION]]]
[require ip]
[require nettool]
[require comm]
[require interp]
[require dicttool]
[require cron]
[description]
<
|


|




<








1
2
3
4
5
6
7
8

9
10
11
12
13
14
15

[manpage_begin udpcluster n 0.3]
[keywords {name service}]
[keywords server]
[copyright {2016 Sean Woods <yoda@etoyoc.com>}]
[moddesc   {Lightweight UDP based tool for cluster node discovery}]
[titledesc {UDP Peer-to-Peer cluster}]
[category  Networking]
[require Tcl 8.5]

[require ip]
[require nettool]
[require comm]
[require interp]
[require dicttool]
[require cron]
[description]
51
52
53
54
55
56
57
58
59
Results will
Historical Notes:
[para]
This tool was originally known as nns::cluster, but as development progressed, it was
clear that it wasn't interacting with any of the other facilities in NNS.

[vset CATEGORY nameserv]
[include ../common-text/feedback.inc]
[manpage_end]







|

49
50
51
52
53
54
55
56
57
Results will
Historical Notes:
[para]
This tool was originally known as nns::cluster, but as development progressed, it was
clear that it wasn't interacting with any of the other facilities in NNS.

[vset CATEGORY nameserv]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/udpcluster/udpcluster.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- tcl -*-
# ### ### ### ######### ######### #########
## Name Service - Cluster

# ### ### ### ######### ######### #########
## Requirements

package require Tcl 8.5
package require comm             ; # Generic message transport
package require interp           ; # Interpreter helpers.
package require logger           ; # Tracing internal activity
package require uuid
package require cron 2.0
package require nettool 0.5.2
package require udp
package require dicttool

namespace eval ::comm {}
::namespace eval ::cluster {}

###













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- tcl -*-
# ### ### ### ######### ######### #########
## Name Service - Cluster

# ### ### ### ######### ######### #########
## Requirements

package require Tcl 8.5
package require comm             ; # Generic message transport
package require interp           ; # Interpreter helpers.
package require logger           ; # Tracing internal activity
package require uuid
package require cron 2.0
package require nettool 0.5.1
package require udp
package require dicttool

namespace eval ::comm {}
::namespace eval ::cluster {}

###
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
###
proc ::cluster::listen {} {
  variable broadcast_sock
  if {$broadcast_sock != {}} {
    return $broadcast_sock
  }

  variable discovery_port
  # Open a local discovery port to catch non-IP traffic
  variable discovery_group
  set broadcast_sock [udp_open $discovery_port reuse]
  fconfigure $broadcast_sock -buffering none -blocking 0 \
    -broadcast 1 \
    -mcastadd $discovery_group \
    -remote [list $discovery_group $discovery_port]







|







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
###
proc ::cluster::listen {} {
  variable broadcast_sock
  if {$broadcast_sock != {}} {
    return $broadcast_sock
  }

  variable discovery_port   
  # Open a local discovery port to catch non-IP traffic
  variable discovery_group
  set broadcast_sock [udp_open $discovery_port reuse]
  fconfigure $broadcast_sock -buffering none -blocking 0 \
    -broadcast 1 \
    -mcastadd $discovery_group \
    -remote [list $discovery_group $discovery_port]
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188

proc ::cluster::TCPAccept {sock host port} {
  chan configure $sock -translation {crlf crlf} -buffering line -blocking 1
  set packet [chan gets $sock]
  if {![string is ascii $packet]} return
  if {![::info complete $packet]} return
  if {[catch {Directory {*}$packet} reply errdat]} {
    chan puts $sock [list $reply $errdat]
  } else {
    chan puts $sock [list $reply {}]
  }
  chan flush $sock
  chan close $sock
}
###







|







174
175
176
177
178
179
180
181
182
183
184
185
186
187
188

proc ::cluster::TCPAccept {sock host port} {
  chan configure $sock -translation {crlf crlf} -buffering line -blocking 1
  set packet [chan gets $sock]
  if {![string is ascii $packet]} return
  if {![::info complete $packet]} return
  if {[catch {Directory {*}$packet} reply errdat]} {
    chan puts $sock [list $reply $errdat]   
  } else {
    chan puts $sock [list $reply {}]
  }
  chan flush $sock
  chan close $sock
}
###
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
      set wmacid [lindex $messageinfo 0]
      if { $wmacid eq [::cluster::self] } {
        broadcast +WHOIS [::cluster::self]
      }
      return
    }
  }

  set now [clock seconds]
  set serviceurl  [lindex $packet 2]
  set serviceinfo [lindex $packet 3]
  set ::cluster::ping_recv($serviceurl) $now
  UDPPortInfo $serviceurl $messagetype $serviceinfo

  if {[dict exists $serviceinfo pid] && [dict get $serviceinfo pid] eq [pid] } {
    # Ignore attempts to overwrite locally managed services from the network
    return
  }
  # Always update the IP of the service info
  dict set ptpdata($serviceurl) ipaddr $ipaddr
  dict set ptpdata($serviceurl) updated $now
  dict set serviceinfo ipaddr [lindex $peer 0]
  dict set serviceinfo updated $now
  set messageinfo [lrange $packet 4 end]

  switch -- $messagetype {
    -SERVICE {
      if {![::info exists ptpdata($serviceurl)]} {
        set result $serviceinfo
      } else {
        set result [dict merge $ptpdata($serviceurl) $serviceinfo]
      }







|





|










|







219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
      set wmacid [lindex $messageinfo 0]
      if { $wmacid eq [::cluster::self] } {
        broadcast +WHOIS [::cluster::self]
      }
      return
    }
  }
  
  set now [clock seconds]
  set serviceurl  [lindex $packet 2]
  set serviceinfo [lindex $packet 3]
  set ::cluster::ping_recv($serviceurl) $now
  UDPPortInfo $serviceurl $messagetype $serviceinfo
  
  if {[dict exists $serviceinfo pid] && [dict get $serviceinfo pid] eq [pid] } {
    # Ignore attempts to overwrite locally managed services from the network
    return
  }
  # Always update the IP of the service info
  dict set ptpdata($serviceurl) ipaddr $ipaddr
  dict set ptpdata($serviceurl) updated $now
  dict set serviceinfo ipaddr [lindex $peer 0]
  dict set serviceinfo updated $now
  set messageinfo [lrange $packet 4 end]
  
  switch -- $messagetype {
    -SERVICE {
      if {![::info exists ptpdata($serviceurl)]} {
        set result $serviceinfo
      } else {
        set result [dict merge $ptpdata($serviceurl) $serviceinfo]
      }
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
  set local_data($url) [dict merge $infodict {ipaddr 127.0.0.1}]
  broadcast +SERVICE $url $infodict
}

proc ::cluster::heartbeat {} {
  variable ptpdata
  variable config

  _Winnow
  ###
  # Broadcast the status of our local services
  ###
  variable local_data
  foreach {url info} [array get local_data] {
    broadcast ~SERVICE $url $info







|







369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
  set local_data($url) [dict merge $infodict {ipaddr 127.0.0.1}]
  broadcast +SERVICE $url $infodict
}

proc ::cluster::heartbeat {} {
  variable ptpdata
  variable config
  
  _Winnow
  ###
  # Broadcast the status of our local services
  ###
  variable local_data
  foreach {url info} [array get local_data] {
    broadcast ~SERVICE $url $info
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
}

###
# topic: c8475e832c912e962f238c61580b669e
###
proc ::cluster::search pattern {
  _Winnow
  set result {}
  variable ptpdata
  foreach {service dat} [array get ptpdata $pattern] {
    foreach {field value} $dat {
      dict set result $service $field $value
    }
  }








|







533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
}

###
# topic: c8475e832c912e962f238c61580b669e
###
proc ::cluster::search pattern {
  _Winnow
  set result {}  
  variable ptpdata
  foreach {service dat} [array get ptpdata $pattern] {
    foreach {field value} $dat {
      dict set result $service $field $value
    }
  }

562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
  if {[array exists local_data [cname $pattern]]} {
    return 1
  }
  return 0
}

proc ::cluster::search_local pattern {
  set result {}
  variable local_data
  foreach {service dat} [array get local_data $pattern] {
    foreach {field value} $dat {
      dict set result $service $field $value
    }
  }
  return $result







|







562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
  if {[array exists local_data [cname $pattern]]} {
    return 1
  }
  return 0
}

proc ::cluster::search_local pattern {
  set result {}  
  variable local_data
  foreach {service dat} [array get local_data $pattern] {
    foreach {field value} $dat {
      dict set result $service $field $value
    }
  }
  return $result
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
# Performed immediately before searches
# and heartbeats
###
proc ::cluster::_Winnow {} {
  variable ptpdata
  variable config
  variable local_data

  set now [clock seconds]
  foreach {item info} [array get ptpdata] {
    set remove 0
    if {[dict exists $info closed] && [dict get $info closed]} {
      set remove 1
    }
    if {[dict exists $info updated] && ($now - [dict get $info updated])>$config(discovery_ttl)} {







|







597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
# Performed immediately before searches
# and heartbeats
###
proc ::cluster::_Winnow {} {
  variable ptpdata
  variable config
  variable local_data
  
  set now [clock seconds]
  foreach {item info} [array get ptpdata] {
    set remove 0
    if {[dict exists $info closed] && [dict get $info closed]} {
      set remove 1
    }
    if {[dict exists $info updated] && ($now - [dict get $info updated])>$config(discovery_ttl)} {
650
651
652
653
654
655
656
657
658
659
660
661
  variable directory_pid {}

  # Currently an unassigned group in the
  # Local Network Control Block (224.0.0/24)
  # See: RFC3692 and http://www.iana.org
  variable discovery_group 224.0.0.200
  variable local_port {}
  variable local_macid [lindex [lsort [::nettool::mac_list]] 0]
  variable local_pid   [::uuid::uuid generate]
}

package provide udpcluster 0.3.3







|



|
650
651
652
653
654
655
656
657
658
659
660
661
  variable directory_pid {}

  # Currently an unassigned group in the
  # Local Network Control Block (224.0.0/24)
  # See: RFC3692 and http://www.iana.org
  variable discovery_group 224.0.0.200
  variable local_port {}
  variable local_macid [lindex [::nettool::mac_list] 0]
  variable local_pid   [::uuid::uuid generate]
}

package provide udpcluster 0.3.2

Changes to modules/udpcluster/udpcluster.test.

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

set testutilsscript [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]
source $testutilsscript

package require tcltest
testsNeedTcl     8.6 ; # See coroutine (required by cron)
testsNeedTcltest 1.0
testsNeed        udp

set ::WHOAMI Main

support {
    use dicttool/dicttool.tcl   dicttool
    use snit/snit2.tcl          snit ;# Required by comm
    use comm/comm.tcl           comm
    use dns/ip.tcl              ip
    use nettool/nettool.tcl     nettool
    use coroutine/coroutine.tcl coroutine ;# Required by cron
    use cron/cron.tcl           cron
    use uuid/uuid.tcl           uuid
    use interp/interp.tcl       interp
    use log/logger.tcl          logger
    use md5/md5x.tcl            md5
}
testing {
    useLocal udpcluster.tcl udpcluster
}

###
# Create a server in a seperate interp
###
interp create server
interp eval server [list set testutilsscript $testutilsscript]
interp eval server {
    source $testutilsscript
    set ::WHOAMI Server

    package require  tcltest
    testsNeedTcl     8.6
    testsNeedTcltest 1.0
    testsNeed        udp
    
    support {
	use dicttool/dicttool.tcl   dicttool
	use snit/snit2.tcl          snit ;# Required by comm
	use comm/comm.tcl           comm
	use dns/ip.tcl              ip
	use nettool/nettool.tcl     nettool
	use coroutine/coroutine.tcl coroutine ;# Required by cron
	use cron/cron.tcl           cron
	use uuid/uuid.tcl           uuid
	use interp/interp.tcl       interp
	use log/logger.tcl          logger
	use md5/md5x.tcl            md5
    }
    testing {
	use udpcluster/udpcluster.tcl udpcluster
    }
    set ::cluster::local_pid SERVER
    #set ::cluster::config(debug) 1
    ::cluster::publish nns@[::cluster::macid] {}
    update
}

set ::cluster::local_pid MAIN
set macid [::cluster::macid]
set myport [::nettool::allocate_port 10000]

::cluster::ping nns@$macid
set data [::cluster::search *]

test cluster-comm-1.0 {Publish service - NNS} {
  dict exists $data nns@[::cluster::macid]
} {1}

test cluster-comm-1.1 {Check that non-existant service does not exist} {
  dict exists $data foo@bar
} {0}







|

<




|
<
|
|
|
<
|
|
|
|
|











|
|

|
|
|
<
|
|
|
<
|
|
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|

<






<







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

set testutilsscript [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]
source $testutilsscript

package require tcltest
testsNeedTcl     8.5
testsNeedTcltest 1.0


set ::WHOAMI Main

support {
      use dicttool/dicttool.tcl        dicttool

      use comm/comm.tcl       comm
      use dns/ip.tcl          ip
      use nettool/nettool.tcl nettool

      use cron/cron.tcl       cron
      use uuid/uuid.tcl       uuid
      use interp/interp.tcl   interp
      use log/logger.tcl      logger
      use md5/md5x.tcl        md5
}
testing {
    useLocal udpcluster.tcl udpcluster
}

###
# Create a server in a seperate interp
###
interp create server
interp eval server [list set testutilsscript $testutilsscript]
interp eval server {
  source $testutilsscript
  set ::WHOAMI Server

  package require tcltest
  testsNeedTcl     8.5
  testsNeedTcltest 1.0

  
  support {
      use dicttool/dicttool.tcl        dicttool

      use comm/comm.tcl       comm
      use dns/ip.tcl          ip
      use nettool/nettool.tcl nettool

      use cron/cron.tcl       cron
      use uuid/uuid.tcl       uuid
      use interp/interp.tcl   interp
      use log/logger.tcl      logger
      use md5/md5x.tcl        md5
  }
  testing {
      use udpcluster/udpcluster.tcl udpcluster
  }
  set ::cluster::local_pid SERVER
  #set ::cluster::config(debug) 1
  ::cluster::publish nns@[::cluster::macid] {}
  update
}

set ::cluster::local_pid MAIN
set macid [::cluster::macid]
set myport [::nettool::allocate_port 10000]

::cluster::ping nns@$macid
set data [::cluster::search *]

test cluster-comm-1.0 {Publish service - NNS} {
  dict exists $data nns@[::cluster::macid]
} {1}

test cluster-comm-1.1 {Check that non-existant service does not exist} {
  dict exists $data foo@bar
} {0}
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

###
# Create another client in a seperate interp
###
interp create otherclient
interp eval otherclient [list set testutilsscript $testutilsscript]
interp eval otherclient {
    source $testutilsscript
    set ::WHOAMI Other
  
    package require tcltest
    testsNeedTcl     8.6
    testsNeedTcltest 1.0
    testsNeed        udp
  
    support {
	use dicttool/dicttool.tcl   dicttool
	use snit/snit2.tcl          snit ;# Required by comm
	use comm/comm.tcl           comm
	use dns/ip.tcl              ip
	use nettool/nettool.tcl     nettool
	use coroutine/coroutine.tcl coroutine ;# Required by cron
	use cron/cron.tcl           cron
	use uuid/uuid.tcl           uuid
	use interp/interp.tcl       interp
	use log/logger.tcl          logger
	use md5/md5x.tcl            md5
    }
    testing {
	use udpcluster/udpcluster.tcl udpcluster
    }

    ###
    # Cheat and let this server know the server is local
    ###
    set macid [::cluster::macid]
    set myport [::nettool::allocate_port 10000]
    #set ::cluster::config(debug) 1
    set url other@$macid
    ::comm::comm new $url -port $myport -local 0 -listen 1
    ::cluster::publish $url [list port $myport protocol comm class comm]
}

#set ::cluster::config(debug) 1
::cluster::ping nns@$macid

set data [::cluster::search *]
test cluster-comm-3.0 {Publish service - NNS} {







|
|

|
|
|
<

|
|
<
|
|
|
<
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|







116
117
118
119
120
121
122
123
124
125
126
127
128

129
130
131

132
133
134

135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

###
# Create another client in a seperate interp
###
interp create otherclient
interp eval otherclient [list set testutilsscript $testutilsscript]
interp eval otherclient {
  source $testutilsscript
  set ::WHOAMI Other
  
  package require tcltest
  testsNeedTcl     8
  testsNeedTcltest 1.0

  
  support {
     use dicttool/dicttool.tcl        dicttool

      use comm/comm.tcl comm 
      use dns/ip.tcl          ip
      use nettool/nettool.tcl nettool

      use cron/cron.tcl cron
      use uuid/uuid.tcl uuid
      use interp/interp.tcl   interp
      use log/logger.tcl      logger
      use md5/md5x.tcl        md5
  }
  testing {
      use udpcluster/udpcluster.tcl udpcluster
  }

  ###
  # Cheat and let this server know the server is local
  ###
  set macid [::cluster::macid]
  set myport [::nettool::allocate_port 10000]
  #set ::cluster::config(debug) 1
  set url other@$macid
  ::comm::comm new $url -port $myport -local 0 -listen 1
  ::cluster::publish $url [list port $myport protocol comm class comm]
}

#set ::cluster::config(debug) 1
::cluster::ping nns@$macid

set data [::cluster::search *]
test cluster-comm-3.0 {Publish service - NNS} {

Changes to modules/uev/uevent.man.

188
189
190
191
192
193
194
195
196

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

[comment ============================================================]
[list_end]

[vset CATEGORY uevent]
[include ../common-text/feedback.inc]
[manpage_end]







|

188
189
190
191
192
193
194
195
196

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

[comment ============================================================]
[list_end]

[vset CATEGORY uevent]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/uev/uevent_onidle.man.

56
57
58
59
60
61
62
63
64
[section Examples]

Examples of this type of deferal are buried in the (C-level)
implementations all the Tk widgets, defering geometry calculations and
window redraw activity in this manner.

[vset CATEGORY uevent]
[include ../common-text/feedback.inc]
[manpage_end]







|

56
57
58
59
60
61
62
63
64
[section Examples]

Examples of this type of deferal are buried in the (C-level)
implementations all the Tk widgets, defering geometry calculations and
window redraw activity in this manner.

[vset CATEGORY uevent]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/units/units.man.

384
385
386
387
388
389
390
391
392
GNU Units program at [uri http://www.gnu.org/software/units/]

[section "AUTHORS"]

Robert W. Techentin

[vset CATEGORY units]
[include ../common-text/feedback.inc]
[manpage_end]







|

384
385
386
387
388
389
390
391
392
GNU Units program at [uri http://www.gnu.org/software/units/]

[section "AUTHORS"]

Robert W. Techentin

[vset CATEGORY units]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/uri/uri.man.

385
386
387
388
389
390
391
392
393
[para]

Original code (regular expressions) by Andreas Kupries.
Modularisation by Steve Ball, also the split/join/resolve
functionality. RFC 3986 conformance by Keith Nash.

[vset CATEGORY uri]
[include ../common-text/feedback.inc]
[manpage_end]







|

385
386
387
388
389
390
391
392
393
[para]

Original code (regular expressions) by Andreas Kupries.
Modularisation by Steve Ball, also the split/join/resolve
functionality. RFC 3986 conformance by Keith Nash.

[vset CATEGORY uri]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/uri/urn-scheme.man.

33
34
35
36
37
38
39
40
41
This commands performs the reverse of [cmd ::uri::urn::quote]. It
takes an [term urn] url, removes the quoting from all disallowed
characters, and returns the modified urls as its result.

[list_end]

[vset CATEGORY uri]
[include ../common-text/feedback.inc]
[manpage_end]







|

33
34
35
36
37
38
39
40
41
This commands performs the reverse of [cmd ::uri::urn::quote]. It
takes an [term urn] url, removes the quoting from all disallowed
characters, and returns the modified urls as its result.

[list_end]

[vset CATEGORY uri]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/uuid/pkgIndex.tcl.







1
2






if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded uuid 1.0.7 [list source [file join $dir uuid.tcl]]
>
>
>
>
>
>

|
1
2
3
4
5
6
7
8
# pkgIndex.tcl - 
#
# uuid package index file
#
# $Id: pkgIndex.tcl,v 1.3 2012/11/19 19:28:24 andreas_kupries Exp $

if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded uuid 1.0.5 [list source [file join $dir uuid.tcl]]

Changes to modules/uuid/uuid.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[vset VERSION 1.0.6]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin uuid n [vset VERSION]]
[keywords GUID]
[keywords UUID]
[moddesc {uuid}]
[copyright {2004, Pat Thoyts <patthoyts@users.sourceforge.net>}]
[titledesc {UUID generation and comparison}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.5]
[require uuid [opt [vset VERSION]]]
[description]
[para]

This package provides a generator of universally unique identifiers
(UUID) also known as globally unique identifiers (GUID). This
implementation follows the draft specification from (1) although this
is actually an expired draft document.
|
<
|







|







1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[vset UUID_VERSION 1.0.4]

[manpage_begin uuid n [vset UUID_VERSION]]
[keywords GUID]
[keywords UUID]
[moddesc {uuid}]
[copyright {2004, Pat Thoyts <patthoyts@users.sourceforge.net>}]
[titledesc {UUID generation and comparison}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.5]
[require uuid [opt [vset UUID_VERSION]]]
[description]
[para]

This package provides a generator of universally unique identifiers
(UUID) also known as globally unique identifiers (GUID). This
implementation follows the draft specification from (1) although this
is actually an expired draft document.
47
48
49
50
51
52
53
54
55
[enum]
    Paul J. Leach, "UUIDs and GUIDs", February 1998.
    ([uri http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt])

[list_end]

[vset CATEGORY uuid]
[include ../common-text/feedback.inc]
[manpage_end]







|

46
47
48
49
50
51
52
53
54
[enum]
    Paul J. Leach, "UUIDs and GUIDs", February 1998.
    ([uri http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt])

[list_end]

[vset CATEGORY uuid]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/uuid/uuid.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
129
    return $machinfo
  }
  lappend machinfo [clock seconds]; # timestamp
  lappend machinfo [clock clicks];  # system incrementing counter
  lappend machinfo [info hostname]; # spatial unique id (poor)
  lappend machinfo [pid];           # additional entropy
  lappend machinfo [array get ::tcl_platform]

  ###
  # If we have /dev/urandom just stream 128 bits from that
  ###
  if {[file exists /dev/urandom]} {
    set fin [open /dev/urandom r]
    binary scan [read $fin 128] H* machinfo
    close $fin
  } elseif {[catch {package require nettool}]} {
    # More spatial information -- better than hostname.
    # bug 1150714: opening a server socket may raise a warning messagebox
    #   with WinXP firewall, using ipconfig will return all IP addresses
    #   including ipv6 ones if available. ipconfig is OK on win98+
    if {[string equal $::tcl_platform(platform) "windows"]} {
      catch {exec ipconfig} config
      lappend machinfo $config
    } else {
      catch {
          set s [socket -server void -myaddr [info hostname] 0]
          K [fconfigure $s -sockname] [close $s]
      } r
      lappend machinfo $r
    }

    if {[package provide Tk] != {}} {
      lappend machinfo [winfo pointerxy .]
      lappend machinfo [winfo id .]
    }
  } else {
    ###
    # If the nettool package works on this platform
    # use the stream of hardware ids from it
    ###
    lappend machinfo {*}[::nettool::hwid_list]
  }
  return $machinfo
}

# Generates a binary UUID as per the draft spec. We generate a pseudo-random
# type uuid (type 4). See section 3.4
#
proc ::uuid::generate_tcl {} {
    package require md5 2
    variable uid

    set tok [md5::MD5Init]
    md5::MD5Update $tok [incr uid];      # package incrementing counter
    foreach string [generate_tcl_machinfo] {
      md5::MD5Update $tok $string
    }
    set r [md5::MD5Final $tok]
    binary scan $r c* r

    # 3.4: set uuid versioning fields
    lset r 8 [expr {([lindex $r 8] & 0x3F) | 0x80}]
    lset r 6 [expr {([lindex $r 6] & 0x0F) | 0x40}]

    return [binary format c* $r]
}

if {[string equal $tcl_platform(platform) "windows"]
        && [package provide critcl] != {}} {
    namespace eval uuid {
        critcl::ccode {
            #define WIN32_LEAN_AND_MEAN
            #define STRICT
            #include <windows.h>
            #include <ole2.h>
            typedef long (__stdcall *LPFNUUIDCREATE)(UUID *);
            typedef const unsigned char cu_char;
        }
        critcl::cproc generate_c {Tcl_Interp* interp} ok {
            HRESULT hr = S_OK;
            int r = TCL_OK;
            UUID uuid = {0};
            HMODULE hLib;
            LPFNUUIDCREATE lpfnUuidCreate = NULL;

            hLib = LoadLibraryA(("rpcrt4.dll"));
            if (hLib)
                lpfnUuidCreate = (LPFNUUIDCREATE)
                    GetProcAddress(hLib, "UuidCreate");
            if (lpfnUuidCreate) {
                Tcl_Obj *obj;
                lpfnUuidCreate(&uuid);
                obj = Tcl_NewByteArrayObj((cu_char *)&uuid, sizeof(uuid));







<
<
<
<
<
<
<
<
|














|




















|

|





|



|



|
















>
|







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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
    return $machinfo
  }
  lappend machinfo [clock seconds]; # timestamp
  lappend machinfo [clock clicks];  # system incrementing counter
  lappend machinfo [info hostname]; # spatial unique id (poor)
  lappend machinfo [pid];           # additional entropy
  lappend machinfo [array get ::tcl_platform]








  if {[catch {package require nettool}]} {
    # More spatial information -- better than hostname.
    # bug 1150714: opening a server socket may raise a warning messagebox
    #   with WinXP firewall, using ipconfig will return all IP addresses
    #   including ipv6 ones if available. ipconfig is OK on win98+
    if {[string equal $::tcl_platform(platform) "windows"]} {
      catch {exec ipconfig} config
      lappend machinfo $config
    } else {
      catch {
          set s [socket -server void -myaddr [info hostname] 0]
          K [fconfigure $s -sockname] [close $s]
      } r
      lappend machinfo $r
    }
  
    if {[package provide Tk] != {}} {
      lappend machinfo [winfo pointerxy .]
      lappend machinfo [winfo id .]
    }
  } else {
    ###
    # If the nettool package works on this platform
    # use the stream of hardware ids from it
    ###
    lappend machinfo {*}[::nettool::hwid_list]
  }
  return $machinfo
}

# Generates a binary UUID as per the draft spec. We generate a pseudo-random
# type uuid (type 4). See section 3.4
#
proc ::uuid::generate_tcl {} {
    package require md5 2
    variable uid
    
    set tok [md5::MD5Init]
    md5::MD5Update $tok [incr uid];      # package incrementing counter 
    foreach string [generate_tcl_machinfo] {
      md5::MD5Update $tok $string
    }
    set r [md5::MD5Final $tok]
    binary scan $r c* r
    
    # 3.4: set uuid versioning fields
    lset r 8 [expr {([lindex $r 8] & 0x3F) | 0x80}]
    lset r 6 [expr {([lindex $r 6] & 0x0F) | 0x40}]
    
    return [binary format c* $r]
}

if {[string equal $tcl_platform(platform) "windows"] 
        && [package provide critcl] != {}} {
    namespace eval uuid {
        critcl::ccode {
            #define WIN32_LEAN_AND_MEAN
            #define STRICT
            #include <windows.h>
            #include <ole2.h>
            typedef long (__stdcall *LPFNUUIDCREATE)(UUID *);
            typedef const unsigned char cu_char;
        }
        critcl::cproc generate_c {Tcl_Interp* interp} ok {
            HRESULT hr = S_OK;
            int r = TCL_OK;
            UUID uuid = {0};
            HMODULE hLib;
            LPFNUUIDCREATE lpfnUuidCreate = NULL;

            hLib = LoadLibrary(_T("rpcrt4.dll"));
            if (hLib)
                lpfnUuidCreate = (LPFNUUIDCREATE)
                    GetProcAddress(hLib, "UuidCreate");
            if (lpfnUuidCreate) {
                Tcl_Obj *obj;
                lpfnUuidCreate(&uuid);
                obj = Tcl_NewByteArrayObj((cu_char *)&uuid, sizeof(uuid));
232
233
234
235
236
237
238
239
240
241
242
243
244
245
    variable e {}
    foreach e {critcl} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide uuid 1.0.7

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






225
226
227
228
229
230
231
232
233
234
235
236
237
238
    variable e {}
    foreach e {critcl} {
        if {[LoadAccelerator $e]} break
    }
    unset e
}

package provide uuid 1.0.5

# -------------------------------------------------------------------------
# Local variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/uuid/uuid.test.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# uuid.test:  tests for the uuid package                       -*- tcl -*-
#
# $Id: uuid.test,v 1.6 2006/10/09 21:41:42 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0

testing {
    useLocal uuid.tcl uuid
}

# -------------------------------------------------------------------------
# Handle multiple implementation testing











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# uuid.test:  tests for the uuid package                       -*- tcl -*-
#
# $Id: uuid.test,v 1.6 2006/10/09 21:41:42 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 1.0

testing {
    useLocal uuid.tcl uuid
}

# -------------------------------------------------------------------------
# Handle multiple implementation testing
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
89
90
91
92
93
94
95
96

foreach impl [implementations] {
    select_implementation $impl

    test uuid-1.0-$impl "uuid requires args" {
        list [catch {uuid::uuid} msg]
    } {1}

    test uuid-1.1-$impl "uuid generate should create a 36 char string uuid" {
        list [catch {string length [uuid::uuid generate]} msg] $msg
    } {0 36}

    test uuid-1.2-$impl "uuid comparison of uuid with self should be true" {
        list [catch {
            set a [uuid::uuid generate]
            uuid::uuid equal $a $a
        } msg] $msg
    } {0 1}

    test uuid-1.3-$impl "uuid comparison of two different\
        uuids should be false" {
        list [catch {
            set a [uuid::uuid generate]
            set b [uuid::uuid generate]
            uuid::uuid equal $a $b
        } msg] $msg
    } {0 0}

    reset_implementation
}

# -------------------------------------------------------------------------

testsuiteCleanup

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|



|






|








|












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
89
90
91
92
93
94
95
96

foreach impl [implementations] {
    select_implementation $impl

    test uuid-1.0-$impl "uuid requires args" {
        list [catch {uuid::uuid} msg]
    } {1}
    
    test uuid-1.1-$impl "uuid generate should create a 36 char string uuid" {
        list [catch {string length [uuid::uuid generate]} msg] $msg
    } {0 36}
    
    test uuid-1.2-$impl "uuid comparison of uuid with self should be true" {
        list [catch {
            set a [uuid::uuid generate]
            uuid::uuid equal $a $a
        } msg] $msg
    } {0 1}
    
    test uuid-1.3-$impl "uuid comparison of two different\
        uuids should be false" {
        list [catch {
            set a [uuid::uuid generate]
            set b [uuid::uuid generate]
            uuid::uuid equal $a $b
        } msg] $msg
    } {0 0}
    
    reset_implementation
}

# -------------------------------------------------------------------------

testsuiteCleanup

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:

Changes to modules/valtype/iban.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[comment {-*- tcl -*- --- doctools ---}]
[vset PACKAGE iban]
[vset VERSION 1.7]
[vset A an]
[vset NAME IBAN]
[vset NAMEX {International Bank Account Number}]
[vset CODE IBAN]
[vset OK  ....]
[vset BAD ....]
[vset KEYWORDS k_iban]
[vset REQUIRE null]
[vset METHODS null]
[vset CODES null]
[include include/vtype.inc]


|











1
2
3
4
5
6
7
8
9
10
11
12
13
14
[comment {-*- tcl -*- --- doctools ---}]
[vset PACKAGE iban]
[vset VERSION 1.6]
[vset A an]
[vset NAME IBAN]
[vset NAMEX {International Bank Account Number}]
[vset CODE IBAN]
[vset OK  ....]
[vset BAD ....]
[vset KEYWORDS k_iban]
[vset REQUIRE null]
[vset METHODS null]
[vset CODES null]
[include include/vtype.inc]

Changes to modules/valtype/iban.tcl.

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

snit::type ::valtype::iban {
    #-------------------------------------------------------------------
    # Type Methods

    typevariable cclen -array {
	AL 28 AD 24 AT 20 BH 22 BE 16 BA 20 BG 22 BR 29 CR 21 HR 21 CY 28 CZ 24 DK 18 FO 18 GL 18 DO 28 EE 20 FI 18
	FR 27 GF 27 GP 27 MQ 27 RE 27 PF 27 TF 27 YT 27 NC 27 PM 27 WF 27 GE 22 DE 22 GI 23 GR 27 HU 28 SV 28
	IS 26 IE 22 IL 23 IT 27 KZ 20 KW 30 LV 21 LB 28 LI 21 LT 20 LU 20 MK 19 MT 31 MR 27 MU 30 MC 27
	ME 22 NL 18 NO 15 PL 28 PS 29 PT 25 RO 24 SM 27 SA 24 RS 22 SK 24 SI 19 ST 25 ES 24 SE 24 CH 21 TN 24 TR 26
	AE 23 GB 22 AZ 28 MD 24 PK 24 VG 24 GT 28 QA 29 JO 30 TL 23 XK 20 UA 29 SC 31 LC 32 BY 28 IQ 23
    }

    typevariable charmap {
	A 10 B 11 C 12 D 13 E 14 F 15 G 16 H 17 I 18 J 19 K 20 L 21 M 22
	N 23 O 24 P 25 Q 26 R 27 S 28 T 29 U 30 V 31 W 32 X 33 Y 34 Z 35
    }








|


|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

snit::type ::valtype::iban {
    #-------------------------------------------------------------------
    # Type Methods

    typevariable cclen -array {
	AL 28 AD 24 AT 20 BH 22 BE 16 BA 20 BG 22 BR 29 CR 21 HR 21 CY 28 CZ 24 DK 18 FO 18 GL 18 DO 28 EE 20 FI 18
	FR 27 GF 27 GP 27 MQ 27 RE 27 PF 27 TF 27 YT 27 NC 27 PM 27 WF 27 GE 22 DE 22 GI 23 GR 27 HU 28
	IS 26 IE 22 IL 23 IT 27 KZ 20 KW 30 LV 21 LB 28 LI 21 LT 20 LU 20 MK 19 MT 31 MR 27 MU 30 MC 27
	ME 22 NL 18 NO 15 PL 28 PS 29 PT 25 RO 24 SM 27 SA 24 RS 22 SK 24 SI 19 ST 25 ES 24 SE 24 CH 21 TN 24 TR 26
	AE 23 GB 22 AZ 28 MD 24 PK 24 VG 24 GT 28 QA 29 JO 30 TL 23 XK 20 UA 29 SC 31 LC 32
    }

    typevariable charmap {
	A 10 B 11 C 12 D 13 E 14 F 15 G 16 H 17 I 18 J 19 K 20 L 21 M 22
	N 23 O 24 P 25 Q 26 R 27 S 28 T 29 U 30 V 31 W 32 X 33 Y 34 Z 35
    }

84
85
86
87
88
89
90
91
        $type validate $value
    }
}

# # ## ### ##### ######## ############# ######################
## Ready

package provide valtype::iban 1.7







|
84
85
86
87
88
89
90
91
        $type validate $value
    }
}

# # ## ### ##### ######## ############# ######################
## Ready

package provide valtype::iban 1.6

Changes to modules/valtype/iban.test.

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
    AZ21NABZ00000000137010001944
    BA391290079401028494
    BE68539007547034
    BG80BNBG96611020345678
    BH67BMAG00001299123456
    BR9700360305000010009795493P1
    BR1800000000141455123924100C2
    BY13NBRB3600900000002Z00AB00
    CH9300762011623852957
    CY17002001280000001200527600
    CZ6508000000192000145399
    DE89370400440532013000
    DK5000400440116243
    DO28BAGR00000001212453611324
    EE382200221020145685







<







42
43
44
45
46
47
48

49
50
51
52
53
54
55
    AZ21NABZ00000000137010001944
    BA391290079401028494
    BE68539007547034
    BG80BNBG96611020345678
    BH67BMAG00001299123456
    BR9700360305000010009795493P1
    BR1800000000141455123924100C2

    CH9300762011623852957
    CY17002001280000001200527600
    CZ6508000000192000145399
    DE89370400440532013000
    DK5000400440116243
    DO28BAGR00000001212453611324
    EE382200221020145685
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    GT82TRAJ01020000001210029690
    HR1210010051863000160
    HU42117730161111101800000000
    IE29AIBK93115212345678
    IL620108000000099999999
    IS140159260076545510730339
    IT60X0542811101000000123456
    IQ98NBIQ850123456789012
    JO94CBJO0010000000000131000302
    KW81CBKU0000000000001234560101
    KZ86125KZT5004100100
    LB62099900000001001901229114
    LC55HEMM000100010012001200023015
    LI21088100002324013AA
    LT121000011101001000







<







65
66
67
68
69
70
71

72
73
74
75
76
77
78
    GT82TRAJ01020000001210029690
    HR1210010051863000160
    HU42117730161111101800000000
    IE29AIBK93115212345678
    IL620108000000099999999
    IS140159260076545510730339
    IT60X0542811101000000123456

    JO94CBJO0010000000000131000302
    KW81CBKU0000000000001234560101
    KZ86125KZT5004100100
    LB62099900000001001901229114
    LC55HEMM000100010012001200023015
    LI21088100002324013AA
    LT121000011101001000
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    SA0380000000608010167519
    SC18SSCB11010000000000001497USD
    SE4550000000058398257466
    SI56191000000123438
    SK3112000000198742637541
    SM86U0322509800000000270100
    ST68000100010051845310112
    SV62CENR00000000000000700025
    TL380080012345678910157
    TN5914207207100707129648
    TR330006100519786457841326
    VG96VPVG0000012345678901
    PL26105014451000002276470461
    PL67114020040000310200082366
    QA58DOHB00001234567890ABCDEFG







<







96
97
98
99
100
101
102

103
104
105
106
107
108
109
    SA0380000000608010167519
    SC18SSCB11010000000000001497USD
    SE4550000000058398257466
    SI56191000000123438
    SK3112000000198742637541
    SM86U0322509800000000270100
    ST68000100010051845310112

    TL380080012345678910157
    TN5914207207100707129648
    TR330006100519786457841326
    VG96VPVG0000012345678901
    PL26105014451000002276470461
    PL67114020040000310200082366
    QA58DOHB00001234567890ABCDEFG

Changes to modules/valtype/include/vtype.inc.

94
95
96
97
98
99
100
101
102
th input may be an outright fake too.


[include [vset CODES].inc]
[list_end]

[vset CATEGORY valtype]
[include ../../common-text/feedback.inc]
[manpage_end]







|

94
95
96
97
98
99
100
101
102
th input may be an outright fake too.


[include [vset CODES].inc]
[list_end]

[vset CATEGORY valtype]
[include ../../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/valtype/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
package ifneeded valtype::common                 1 [list source [file join $dir valtype.tcl]]
package ifneeded valtype::creditcard::amex       1 [list source [file join $dir cc_amex.tcl]]
package ifneeded valtype::creditcard::discover   1 [list source [file join $dir cc_discover.tcl]]
package ifneeded valtype::creditcard::mastercard 1 [list source [file join $dir cc_mastercard.tcl]]
package ifneeded valtype::creditcard::visa       1 [list source [file join $dir cc_visa.tcl]]
package ifneeded valtype::gs1::ean13             1 [list source [file join $dir ean13.tcl]]
package ifneeded valtype::imei                   1 [list source [file join $dir imei.tcl]]
package ifneeded valtype::isbn                   1 [list source [file join $dir isbn.tcl]]
package ifneeded valtype::luhn                   1 [list source [file join $dir luhn.tcl]]
package ifneeded valtype::luhn5                  1 [list source [file join $dir luhn5.tcl]]
package ifneeded valtype::usnpi                  1 [list source [file join $dir usnpi.tcl]]
package ifneeded valtype::verhoeff               1 [list source [file join $dir verhoeff.tcl]]
package ifneeded valtype::iban                 1.7 [list source [file join $dir iban.tcl]]












|
1
2
3
4
5
6
7
8
9
10
11
12
13
package ifneeded valtype::common                 1 [list source [file join $dir valtype.tcl]]
package ifneeded valtype::creditcard::amex       1 [list source [file join $dir cc_amex.tcl]]
package ifneeded valtype::creditcard::discover   1 [list source [file join $dir cc_discover.tcl]]
package ifneeded valtype::creditcard::mastercard 1 [list source [file join $dir cc_mastercard.tcl]]
package ifneeded valtype::creditcard::visa       1 [list source [file join $dir cc_visa.tcl]]
package ifneeded valtype::gs1::ean13             1 [list source [file join $dir ean13.tcl]]
package ifneeded valtype::imei                   1 [list source [file join $dir imei.tcl]]
package ifneeded valtype::isbn                   1 [list source [file join $dir isbn.tcl]]
package ifneeded valtype::luhn                   1 [list source [file join $dir luhn.tcl]]
package ifneeded valtype::luhn5                  1 [list source [file join $dir luhn5.tcl]]
package ifneeded valtype::usnpi                  1 [list source [file join $dir usnpi.tcl]]
package ifneeded valtype::verhoeff               1 [list source [file join $dir verhoeff.tcl]]
package ifneeded valtype::iban                 1.5 [list source [file join $dir iban.tcl]]

Changes to modules/valtype/valtype_common.man.

102
103
104
105
106
107
108
109
110
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.

[include include/c_lenpfx.inc]
[list_end]

[vset CATEGORY valtype]
[include ../common-text/feedback.inc]
[manpage_end]







|

102
103
104
105
106
107
108
109
110
data-entry error, with digits transposed, forgotten, etc. Of course,
th input may be an outright fake too.

[include include/c_lenpfx.inc]
[list_end]

[vset CATEGORY valtype]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/ChangeLog.

1
2
3
4
5
6
7
8
9
10
11
2019-03-12  Aldo Buratti

    * cat.tcl - BUGFIX in event-handling . Version bumped to 1.0.3
    * 
2013-12-17  Andreas Kupries  <andreask@activestate.com>

	* randseed.man: Fixed package name.

2013-11-22  Andreas Kupries  <andreask@activestate.com>

	* memchan.tcl (Events): Ticket [864a0c83e3]. Do not suppress
<
<
<
<











1
2
3
4
5
6
7




2013-12-17  Andreas Kupries  <andreask@activestate.com>

	* randseed.man: Fixed package name.

2013-11-22  Andreas Kupries  <andreask@activestate.com>

	* memchan.tcl (Events): Ticket [864a0c83e3]. Do not suppress

Changes to modules/virtchannel_base/cat.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[comment {-*- tcl -*- doctools manpage}]
[vset Version 1.0.3]
[manpage_begin tcl::chan::cat n [vset Version]]
[keywords {concatenation channel}]
[keywords {reflected channel}]
[keywords {tip 219}]
[keywords {virtual channel}]
[copyright {2011 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Reflected/virtual channel support}]
[category  Channels]
[titledesc {Concatenation channel}]
[require Tcl 8.5]
[require TclOO]
[require tcl::chan::core [opt 1]]
[require tcl::chan::cat [opt [vset Version]]]
[description]
[para]

The [package tcl::chan::cat] package provides a command creating
concatenation channels. These are non-seekable channels owning a list
of subordinate channels whose contents they return in order, until all
are exhausted. In this manner the channel is the concatentation of the

<
|











|







1

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[comment {-*- tcl -*- doctools manpage}]

[manpage_begin tcl::chan::cat n 1]
[keywords {concatenation channel}]
[keywords {reflected channel}]
[keywords {tip 219}]
[keywords {virtual channel}]
[copyright {2011 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Reflected/virtual channel support}]
[category  Channels]
[titledesc {Concatenation channel}]
[require Tcl 8.5]
[require TclOO]
[require tcl::chan::core [opt 1]]
[require tcl::chan::cat [opt 1]]
[description]
[para]

The [package tcl::chan::cat] package provides a command creating
concatenation channels. These are non-seekable channels owning a list
of subordinate channels whose contents they return in order, until all
are exhausted. In this manner the channel is the concatentation of the
40
41
42
43
44
45
46
47
48

This command creates the concatenation channel using all the provided
channels, and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

39
40
41
42
43
44
45
46
47

This command creates the concatenation channel using all the provided
channels, and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/cat.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# # ## ### ##### ######## #############
# (C) 2011,2019 Andreas Kupries

# Facade concatenating the contents of the channels it was constructed
# with. Owns the sub-ordinate channels and closes them on exhaustion and/or
# when closed itself.

# @@ Meta Begin
# Package tcl::chan::cat 1.0.3
# Meta as::author {Andreas Kupries}
# Meta as::copyright 2011
# Meta as::license BSD
# Meta description Facade concatenating the contents of the channels it
# Meta description was constructed with. Owns the sub-ordinate channels
# Meta description and closes them on exhaustion and/or when closed itself.
# Meta platform tcl


|






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# # ## ### ##### ######## #############
# (C) 2011 Andreas Kupries

# Facade concatenating the contents of the channels it was constructed
# with. Owns the sub-ordinate channels and closes them on exhaustion and/or
# when closed itself.

# @@ Meta Begin
# Package tcl::chan::cat 1.0.1
# Meta as::author {Andreas Kupries}
# Meta as::copyright 2011
# Meta as::license BSD
# Meta description Facade concatenating the contents of the channels it
# Meta description was constructed with. Owns the sub-ordinate channels
# Meta description and closes them on exhaustion and/or when closed itself.
# Meta platform tcl
39
40
41
42
43
44
45
46
47
48

49
50
51
52
53
54
55

    # We are not using the standard event handling class, because here
    # it will not be timer-driven. We propagate anything related to
    # events to catin and catout instead and let them handle things.

    constructor {args} {
	set channels $args
	# Disable translation (and hence encoding) in the wrapped channels.
	# This will happen in our generic layer instead.
	foreach c $channels {

	    fconfigure $c -translation binary
	}
	set delay 10
	set watching 0
	return
    }








|


>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

    # We are not using the standard event handling class, because here
    # it will not be timer-driven. We propagate anything related to
    # events to catin and catout instead and let them handle things.

    constructor {args} {
	set channels $args
	# Disable encoding and translation processing in the wrapped channels.
	# This will happen in our generic layer instead.
	foreach c $channels {
	    fconfigure $c -translation binary
	    fconfigure $c -translation binary
	}
	set delay 10
	set watching 0
	return
    }

65
66
67
68
69
70
71
72

73

74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

122
123
124
125
126
127

128
129
130
131
132
133
134
135
    method watch {c requestmask} {
	if {"read" in $requestmask} {
	    # Activate event handling.  Either drive an eof home via
	    # timers, or activate things in the foremost sub-ordinate.

	    set watching 1
	    if {![llength $channels]} {
		set timer [after $delay [namespace code [list my Post $c]]]

	    } else {

		chan event [lindex $channels 0] readable [list chan postevent $c read]
	    }
	} else {
	    # Stop events. Either kill timer, or disable in the
	    # foremost sub-ordinate.

	    set watching 0
	    if {![llength $channels]} {
		catch { after cancel $timer }
	    } else {
		chan event [lindex $channels 0] readable {}
	    }
	}
	return
    }

    method read {c n} {
	if {![llength $channels]} {
	    # This signals EOF higher up.
	    return {}
	}

	set buf {}
	while {([string length $buf] < $n) &&
	       [llength $channels]} {

	    set in     [lindex $channels 0]
	    set toread [expr {$n - [string length $buf]}]
	    append buf [::read $in $toread]

	    if {[eof $in]} {
		close $in
		set channels [lrange $channels 1 end]

		# The close of the exhausted subordinate killed any
		# fileevent handling we may have had attached to this
		# channel. Update the settings (i.e. move to the next
		# subordinate, or to timer-based, to drive the eof
		# home).

		if {$watching} {
		    my watch $c read
		}
	    }
	}

	# When `buf` is empty, all channels have been exhausted and
	# closed, therefore returning this empty string will cause an

	# EOF higher up.
	return $buf
    }

    method Post {c} {
	set timer [after $delay [namespace code [list my Post $c]]]

	chan postevent $c read
	return
    }
}

# # ## ### ##### ######## #############
package provide tcl::chan::cat 1.0.3
return







|
>

>
|


|
|





|







|















|
|
|
|
<







|
|
>
|




|
>






|

66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
    method watch {c requestmask} {
	if {"read" in $requestmask} {
	    # Activate event handling.  Either drive an eof home via
	    # timers, or activate things in the foremost sub-ordinate.

	    set watching 1
	    if {![llength $channels]} {
		set timer [after $delay \
			       [namespace code [list my Post $c]]]
	    } else {
		set c [lindex $channels 0]
		fileevent readable $c [list chan postevent $c read]
	    }
	} else {
	    # Stop events. Kill timer, or disable in the foremost
	    # sub-ordinate.

	    set watching 0
	    if {![llength $channels]} {
		catch { after cancel $timer }
	    } else {
		fileevent readable [lindex $channels 0] {}
	    }
	}
	return
    }

    method read {c n} {
	if {![llength $channels]} {
	    # Actually should be EOF signal.
	    return {}
	}

	set buf {}
	while {([string length $buf] < $n) &&
	       [llength $channels]} {

	    set in     [lindex $channels 0]
	    set toread [expr {$n - [string length $buf]}]
	    append buf [::read $in $toread]

	    if {[eof $in]} {
		close $in
		set channels [lrange $channels 1 end]

		# The close above also killed any fileevent handling
		# we might have attached to this channel. We may have
		# to update the settings (i.e. move to next channel,
		# or to timer-based, to drive the eof home).


		if {$watching} {
		    my watch $c read
		}
	    }
	}

	if {$buf eq {}} {
	    return -code error EAGAIN
	}

	return $buf
    }

    method Post {c} {
	set timer [after $delay \
		       [namespace code [list my Post $c]]]
	chan postevent $c read
	return
    }
}

# # ## ### ##### ######## #############
package provide tcl::chan::cat 1.0.2
return

Deleted modules/virtchannel_base/cat.test.

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
#- - -- --- ----- -------- ------------- ---------------------
# cat.test -*- tcl -*-
# (C) 2019 Andreas Kupries. BSD licensed.
#- - -- --- ----- -------- ------------- ---------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0
testsNeed        TclOO 1

support {
    use virtchannel_core/core.tcl   tcl::chan::core
    use virtchannel_core/events.tcl tcl::chan::events
    useLocal string.tcl tcl::chan::string
}
testing {
    useLocal cat.tcl tcl::chan::cat
}

#- - -- --- ----- -------- ------------- ---------------------
## No wrong#args, allowed to zero and up

#- - -- --- ----- -------- ------------- ---------------------

test tcl-chan-cat-2.0 {tell, nothing} -setup {
    set c [tcl::chan::cat]
} -body {
    tell $c
} -cleanup {
    close $c
    unset c
} -result -1

test tcl-chan-cat-2.1 {ticket 1975182bdd - file events} -setup {
    # setup a cat'enated channel
    set fa [tcl::chan::string "ABCDE..XYZ"]
    set fb [tcl::chan::string "0123456789"]
    set ch [tcl::chan::cat $fa $fb]
} -body {
    set r {}
    chan event $ch readable {
        if { [eof $ch] } {
            set done .
        } else {
            lappend r [read $ch 4]
        }
    }    
    vwait done
    set r
} -cleanup {
    close $ch
    unset ch fa fb r
} -result {ABCD E..X YZ01 2345 6789 {}}

#- - -- --- ----- -------- ------------- ---------------------
# Explicit cleanup of loaded support classes.

rename tcl::chan::events {}
rename tcl::chan::core   {}
testsuiteCleanup
return

# Local Variables:
#  mode: tcl
#  indent-tabs-mode: nil
# End:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































Changes to modules/virtchannel_base/facade.man.

65
66
67
68
69
70
71
72
73

This command creates the facade channel around the provided
channel [arg chan], and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

65
66
67
68
69
70
71
72
73

This command creates the facade channel around the provided
channel [arg chan], and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/fifo2.tcl.

70
71
72
73
74
75
76
77
78
79

80
81
82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
    }

    method closeda {c} {
	set a {}
	if {$b ne {}} {
	    close $b
	    set b {}
	} else {
	    my destroy
	}

	return
    }

    method closedb {c} {
	set b {}
	if {$a ne {}} {
	    close $a
	    set a {}
	} else {
	    my destroy
	}

	return
    }

    method froma {c bytes} {
	$hb put $bytes
	return
    }







<
<

>








<
<

>







70
71
72
73
74
75
76


77
78
79
80
81
82
83
84
85
86


87
88
89
90
91
92
93
94
95
    }

    method closeda {c} {
	set a {}
	if {$b ne {}} {
	    close $b
	    set b {}


	}
	my destroy
	return
    }

    method closedb {c} {
	set b {}
	if {$a ne {}} {
	    close $a
	    set a {}


	}
	my destroy
	return
    }

    method froma {c bytes} {
	$hb put $bytes
	return
    }

Deleted modules/virtchannel_base/fifo2.test.

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
# -------------------------------------------------------------------------
# fifo2.test -*- tcl -*-
# (C) 2019 Andreas Kupries. BSD licensed.
# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0
testsNeed        TclOO 1

support {
    use virtchannel_core/core.tcl   tcl::chan::core
    use virtchannel_core/events.tcl tcl::chan::events
}
testing {
    useLocal halfpipe.tcl tcl::chan::halfpipe
    useLocal fifo2.tcl    tcl::chan::fifo2
}

# -------------------------------------------------------------------------

test tcl-chan-fifo2-1.1 {constructor wrong\#args} -body {
    tcl::chan::fifo2 X
} -returnCodes error \
    -result {wrong # args: should be "tcl::chan::fifo2"}

test tcl-chan-fifo2-1.2 {destructor kills both sides and coordinator} -setup {
    lassign [tcl::chan::fifo2] a b
} -match glob -body {
    lappend r [lsort -dict [file channels]]
    lappend r [info class instances ::tcl::chan::fifo2::implementation]
    close $a
    lappend r [lsort -dict [file channels]]
    lappend r [info class instances ::tcl::chan::fifo2::implementation]
} -cleanup {
    unset a b r
} -result {{rc4 rc5 stderr stdin stdout} ::oo::Obj* {stderr stdin stdout} {}}

# -------------------------------------------------------------------------

test tcl-chan-fifo2-2.0 {tell, initial, empty} -setup {
    lassign [tcl::chan::fifo2] a b
} -body {
    list [tell $a] [tell $b]
} -cleanup {
    close $a
    unset a b
} -result {-1 -1}

# -------------------------------------------------------------------------

test tcl-chan-fifo2-tkt-3f48fd6ea2 {fixed misindexing} -setup {
    lassign [tcl::chan::fifo2] a b
    chan configure $a -buffersize 1
    chan configure $b -buffering none
    chan puts -nonewline $b foobar ;# push 6 chars
    chan read $a 2	     	   ;# read 2
    chan read $a 4		   ;# read 4, fifo has nothing left
    chan puts -nonewline $b baz	   ;# push 3 more
} -body {
    chan read $a 1	;# read 1, the `b`
} -cleanup {
    close $a
    unset a b
} -result b

# -------------------------------------------------------------------------
# Explicit cleanup of loaded (support) classes.
rename tcl::chan::events   {}
rename tcl::chan::core     {}
rename tcl::chan::halfpipe {}
rename tcl::chan::fifo2    {}
testsuiteCleanup
return

# Local Variables:
#  mode: tcl
#  indent-tabs-mode: nil
# End:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




































































































































































Changes to modules/virtchannel_base/halfpipe.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

18
19
20
21
22
23
24
[vset VERSION 1.0.1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcl::chan::halfpipe n [vset VERSION]]
[keywords callbacks]
[keywords fifo]
[keywords {in-memory channel}]
[keywords {reflected channel}]
[keywords {tip 219}]
[keywords {virtual channel}]
[copyright {2009, 2019 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Reflected/virtual channel support}]
[category  Channels]
[titledesc {In-memory channel, half of a fifo2}]
[require Tcl 8.5]
[require TclOO]
[require tcl::chan::events [opt 1]]
[require tcl::chan::halfpipe [opt [vset VERSION]]]

[description]
[para]

The [package tcl::chan::halfpipe] package provides a command creating
one half of a [package tcl::chan::fifo2] pair. Writing into such a
channel invokes a set of callbacks which then handle the data. This is
similar to a channel handler, except having a much simpler API.
<

|






|






|
>








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcl::chan::halfpipe n 1]
[keywords callbacks]
[keywords fifo]
[keywords {in-memory channel}]
[keywords {reflected channel}]
[keywords {tip 219}]
[keywords {virtual channel}]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Reflected/virtual channel support}]
[category  Channels]
[titledesc {In-memory channel, half of a fifo2}]
[require Tcl 8.5]
[require TclOO]
[require tcl::chan::events [opt 1]]
[require tcl::chan::halfpipe [opt 1]]
[require tcl::chan::halfpipe [opt 1]]
[description]
[para]

The [package tcl::chan::halfpipe] package provides a command creating
one half of a [package tcl::chan::fifo2] pair. Writing into such a
channel invokes a set of callbacks which then handle the data. This is
similar to a channel handler, except having a much simpler API.
73
74
75
76
77
78
79
80
81

This callback is invoked when the channel has run out of data to read.
A single argument is supplied, the handle of the channel.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

73
74
75
76
77
78
79
80
81

This callback is invoked when the channel has run out of data to read.
A single argument is supplied, the handle of the channel.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/halfpipe.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- tcl -*-
# # ## ### ##### ######## #############
# (C) 2009, 2019 Andreas Kupries

# @@ Meta Begin
# Package tcl::chan::halfpipe 1
# Meta as::author {Andreas Kupries}
# Meta as::copyright 2009,2019
# Meta as::license BSD
# Meta description Implementation of one half of a pipe
# Meta description channel. Based on Tcl 8.5's channel
# Meta description reflection support. Exports a single
# Meta description command for the creation of new
# Meta description channels. Option arguments. Result is the
# Meta description handle of the new channel, and the object


|




|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- tcl -*-
# # ## ### ##### ######## #############
# (C) 2009 Andreas Kupries

# @@ Meta Begin
# Package tcl::chan::halfpipe 1
# Meta as::author {Andreas Kupries}
# Meta as::copyright 2009
# Meta as::license BSD
# Meta description Implementation of one half of a pipe
# Meta description channel. Based on Tcl 8.5's channel
# Meta description reflection support. Exports a single
# Meta description command for the creation of new
# Meta description channels. Option arguments. Result is the
# Meta description handle of the new channel, and the object
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
89
90
	next $c
    }

    method read {c n} {
	set max  [string length $read]
	set last [expr {$at + $n - 1}]
	set result {}
	
	#    last+1 <= max
	# <=> at+n <= max
	# <=> n <= max-at

	if {$n <= ($max - $at)} {
	    # The request is less than what we have left in the read
	    # buffer, we take it, and move the read pointer forward.

	    append result [string range $read $at $last]
	    incr at $n
	    incr $size -$n
	} else {
	    # We need the whole remaining read buffer, and more. For
	    # the latter we make the write buffer the new read buffer,
	    # and then read from it again.

	    append result [string range $read $at end]
	    incr n -[string length $result]

	    set at    0
            set last  [expr {$n - 1}]
	    set read  $write
	    set write {}
	    set size  [string length $read]
	    set max   $size

	    # at == 0 simplifies expressions
	    if {$n <= $max} {
		# The request is less than what we have in the new
		# read buffer, we take it, and move the read pointer
		# forward.

		append result [string range $read 0 $last]
		set at $n
		incr $size -$n
	    } else {







|













|
|





<





|

|







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
89
	next $c
    }

    method read {c n} {
	set max  [string length $read]
	set last [expr {$at + $n - 1}]
	set result {}

	#    last+1 <= max
	# <=> at+n <= max
	# <=> n <= max-at

	if {$n <= ($max - $at)} {
	    # The request is less than what we have left in the read
	    # buffer, we take it, and move the read pointer forward.

	    append result [string range $read $at $last]
	    incr at $n
	    incr $size -$n
	} else {
	    # We need the whole remaining read buffer, and more. For
	    # the latter we shift the write buffer contents over into
	    # the read buffer, and then read from the latter again.

	    append result [string range $read $at end]
	    incr n -[string length $result]

	    set at    0

	    set read  $write
	    set write {}
	    set size  [string length $read]
	    set max   $size

	    # at == 0
	    if {$n <= $max} {
		# The request is less than what we have in the updated
		# read buffer, we take it, and move the read pointer
		# forward.

		append result [string range $read 0 $last]
		set at $n
		incr $size -$n
	    } else {
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
	my Readable
	return $n
    }

    # # ## ### ##### ######## #############

    variable at read write size options
    # at      : first location in read buffer not yet read
    # read    : read buffer
    # write   : buffer for received data, i.e.
    #           written into the halfpipe from
    #           the other side.
    # size    : combined length of receive and read buffers
    #           == amount of stored data
    # options : configuration array

    # The halpipe uses a pointer (`at`) into the data buffer to
    # extract the characters read by the user, while not shifting the
    # data down in memory. Doing such a shift would cause a large
    # performance hit (O(n**2) operation vs O(n)). This however comes
    # with the danger of the buffer growing out of bounds as ever more
    # data is appended by the receiver while the reader is not
    # catching up, preventing a release. The solution to this in turn
    # is to split the buffer into two. An append-only receive buffer
    # (`write`) for incoming data, and a `read` buffer with the
    # pointer. When the current read buffer is entirely consumed the
    # current receive buffer becomes the new read buffer and a new
    # empty receive buffer is started.
    
    # # ## ### ##### ######## #############

    constructor {args} {
	array set options {
	    -write-command {}
	    -empty-command {}
	    -close-command {}







<
<
<
<
<
<
<
<

<
<
<
<
<
<
<
<
<
<
<
<
<







122
123
124
125
126
127
128








129













130
131
132
133
134
135
136
	my Readable
	return $n
    }

    # # ## ### ##### ######## #############

    variable at read write size options






















    # # ## ### ##### ######## #############

    constructor {args} {
	array set options {
	    -write-command {}
	    -empty-command {}
	    -close-command {}
182
183
184
185
186
187
188
189
190
	if {![llength $options($o)]} return
	uplevel \#0 [list {*}$options($o) {*}$args]
	return
    }
}

# # ## ### ##### ######## #############
package provide tcl::chan::halfpipe 1.0.1
return







|

160
161
162
163
164
165
166
167
168
	if {![llength $options($o)]} return
	uplevel \#0 [list {*}$options($o) {*}$args]
	return
    }
}

# # ## ### ##### ######## #############
package provide tcl::chan::halfpipe 1
return

Changes to modules/virtchannel_base/memchan.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# # ## ### ##### ######## #############
# (C) 2009 Andreas Kupries

# Variable string channel (in-memory r/w file, internal variable).
# Seekable beyond the end of the data, implies appending of 0x00
# bytes.

# @@ Meta Begin
# Package tcl::chan::memchan 1.0.4
# Meta as::author {Andreas Kupries}
# Meta as::copyright 2009
# Meta as::license BSD
# Meta description Re-implementation of Memchan's memchan
# Meta description channel. Based on Tcl 8.5's channel
# Meta description reflection support. Exports a single
# Meta description command for the creation of new









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# # ## ### ##### ######## #############
# (C) 2009 Andreas Kupries

# Variable string channel (in-memory r/w file, internal variable).
# Seekable beyond the end of the data, implies appending of 0x00
# bytes.

# @@ Meta Begin
# Package tcl::chan::memchan 1.0.2
# Meta as::author {Andreas Kupries}
# Meta as::copyright 2009
# Meta as::license BSD
# Meta description Re-implementation of Memchan's memchan
# Meta description channel. Based on Tcl 8.5's channel
# Meta description reflection support. Exports a single
# Meta description command for the creation of new
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
	}

	# Compute the new location per the arguments.

	set max [string length $content]
	switch -exact -- $base {
	    start   { set newloc $offset}
	    current { set newloc [expr {$at  + $offset }] }
	    end     { set newloc [expr {$max + $offset }] }
	}

	# Check if the new location is beyond the range given by the
	# content.

	if {$newloc < 0} {
	    return -code error "Cannot seek before the start of the channel"
	} elseif {$newloc > $max} {
	    # We can seek beyond the end of the current contents, add
	    # a block of zeros.
	    #puts XXX.PAD.[expr {$newloc - $max}]
	    append content [binary format @[expr {$newloc - $max}]]
	}

	# Commit to new location, switch readable events, and report.
	set at $newloc

	my Events







|
|







|


<







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

146
147
148
149
150
151
152
	}

	# Compute the new location per the arguments.

	set max [string length $content]
	switch -exact -- $base {
	    start   { set newloc $offset}
	    current { set newloc [expr {$at  + $offset    }] }
	    end     { set newloc [expr {$max + $offset - 1}] }
	}

	# Check if the new location is beyond the range given by the
	# content.

	if {$newloc < 0} {
	    return -code error "Cannot seek before the start of the channel"
	} elseif {$newloc >= $max} {
	    # We can seek beyond the end of the current contents, add
	    # a block of zeros.

	    append content [binary format @[expr {$newloc - $max}]]
	}

	# Commit to new location, switch readable events, and report.
	set at $newloc

	my Events
161
162
163
164
165
166
167
168
169
	# properly processed by the event handler. Like for regular
	# files -- Ticket [864a0c83e3].
	my allow read
    }
}

# # ## ### ##### ######## #############
package provide tcl::chan::memchan 1.0.4
return







|

160
161
162
163
164
165
166
167
168
	# properly processed by the event handler. Like for regular
	# files -- Ticket [864a0c83e3].
	my allow read
    }
}

# # ## ### ##### ######## #############
package provide tcl::chan::memchan 1.0.3
return

Deleted modules/virtchannel_base/memchan.test.

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
89
90
91
92
# -------------------------------------------------------------------------
# memchan.test -*- tcl -*-
# (C) 2017 Andreas Kupries. BSD licensed.
# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0
testsNeed        TclOO 1

support {
    use virtchannel_core/core.tcl   tcl::chan::core
    use virtchannel_core/events.tcl tcl::chan::events
}
testing {
    useLocal memchan.tcl tcl::chan::memchan
}

# -------------------------------------------------------------------------

test tcl-chan-memchan-1.0 {constructor wrong\#args} -body {
    tcl::chan::memchan X
} -returnCodes error \
    -result {wrong # args: should be "tcl::chan::memchan"}

# -------------------------------------------------------------------------

test tcl-chan-memchan-2.0 {tell, initial, empty} -setup {
    set c [tcl::chan::memchan]
} -body {
    tell $c
} -cleanup {
    close $c
    unset c
} -result 0

test tcl-chan-memchan-2.1 {seek from start, expand, tell} -setup {
    set c [tcl::chan::memchan]
} -body {
    seek $c 10
    tell $c
} -cleanup {
    close $c
    unset c
} -result 10

test tcl-chan-memchan-2.2 {seek from end, eof, empty, tell} -setup {
    set c [tcl::chan::memchan]
} -body {
    seek $c 0 end
    tell $c
} -cleanup {
    close $c
    unset c
} -result 0

test tcl-chan-memchan-2.3 {seek from end, eof, non-empty, tell} -setup {
    set c [tcl::chan::memchan]
    puts $c Hello
} -body {
    seek $c 0 end
    tell $c
} -cleanup {
    close $c
    unset c
} -result 6

test tcl-chan-memchan-2.4 {seek from end, non-eof, non-empty, tell} -setup {
    set c [tcl::chan::memchan]
    puts $c Hello
} -body {
    seek $c -6 end
    tell $c
} -cleanup {
    close $c
    unset c
} -result 0

# -------------------------------------------------------------------------
# Explicit cleanup of loaded support classes.
rename tcl::chan::events {}
rename tcl::chan::core   {}
testsuiteCleanup
return

# Local Variables:
#  mode: tcl
#  indent-tabs-mode: nil
# End:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































Changes to modules/virtchannel_base/nullzero.man.

36
37
38
39
40
41
42
43
44
[call [cmd ::tcl::chan::nullzero]]

This command creates a new nullzero channel and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

36
37
38
39
40
41
42
43
44
[call [cmd ::tcl::chan::nullzero]]

This command creates a new nullzero channel and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if {![package vsatisfies [package provide Tcl] 8.5]} {return}

package ifneeded tcl::chan::cat 1.0.3      [list source [file join $dir cat.tcl]]
package ifneeded tcl::chan::facade 1.0.1   [list source [file join $dir facade.tcl]]
package ifneeded tcl::chan::fifo 1         [list source [file join $dir fifo.tcl]]
package ifneeded tcl::chan::fifo2 1        [list source [file join $dir fifo2.tcl]]
package ifneeded tcl::chan::halfpipe 1.0.1 [list source [file join $dir halfpipe.tcl]]
package ifneeded tcl::chan::memchan 1.0.4  [list source [file join $dir memchan.tcl]]
package ifneeded tcl::chan::null 1         [list source [file join $dir null.tcl]]
package ifneeded tcl::chan::nullzero 1     [list source [file join $dir nullzero.tcl]]
package ifneeded tcl::chan::random 1       [list source [file join $dir random.tcl]]
package ifneeded tcl::chan::std 1.0.1      [list source [file join $dir std.tcl]]
package ifneeded tcl::chan::string 1.0.3   [list source [file join $dir string.tcl]]
package ifneeded tcl::chan::textwindow 1   [list source [file join $dir textwindow.tcl]]
package ifneeded tcl::chan::variable 1.0.4 [list source [file join $dir variable.tcl]]
package ifneeded tcl::chan::zero 1         [list source [file join $dir zero.tcl]]
package ifneeded tcl::randomseed 1         [list source [file join $dir randseed.tcl]]


|



|
|




|

|


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if {![package vsatisfies [package provide Tcl] 8.5]} {return}

package ifneeded tcl::chan::cat 1.0.2      [list source [file join $dir cat.tcl]]
package ifneeded tcl::chan::facade 1.0.1   [list source [file join $dir facade.tcl]]
package ifneeded tcl::chan::fifo 1         [list source [file join $dir fifo.tcl]]
package ifneeded tcl::chan::fifo2 1        [list source [file join $dir fifo2.tcl]]
package ifneeded tcl::chan::halfpipe 1     [list source [file join $dir halfpipe.tcl]]
package ifneeded tcl::chan::memchan 1.0.3  [list source [file join $dir memchan.tcl]]
package ifneeded tcl::chan::null 1         [list source [file join $dir null.tcl]]
package ifneeded tcl::chan::nullzero 1     [list source [file join $dir nullzero.tcl]]
package ifneeded tcl::chan::random 1       [list source [file join $dir random.tcl]]
package ifneeded tcl::chan::std 1.0.1      [list source [file join $dir std.tcl]]
package ifneeded tcl::chan::string 1.0.2   [list source [file join $dir string.tcl]]
package ifneeded tcl::chan::textwindow 1   [list source [file join $dir textwindow.tcl]]
package ifneeded tcl::chan::variable 1.0.3 [list source [file join $dir variable.tcl]]
package ifneeded tcl::chan::zero 1         [list source [file join $dir zero.tcl]]
package ifneeded tcl::randomseed 1         [list source [file join $dir randseed.tcl]]

Changes to modules/virtchannel_base/randseed.man.

35
36
37
38
39
40
41
42
43
This command takes to seed lists and combines them into a single list
by XORing them elementwise, modulo 256. If the lists are not of equial
length the shorter of the two is padded with 0s before merging.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

35
36
37
38
39
40
41
42
43
This command takes to seed lists and combines them into a single list
by XORing them elementwise, modulo 256. If the lists are not of equial
length the shorter of the two is padded with 0s before merging.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/std.man.

35
36
37
38
39
40
41
42
43

[para] The channel is created only once, on the first call, and all
future calls simply return this handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

35
36
37
38
39
40
41
42
43

[para] The channel is created only once, on the first call, and all
future calls simply return this handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/string.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
# # ## ### ##### ######## #############
# (C) 2009 Andreas Kupries

# @@ Meta Begin
# Package tcl::chan::string 1.0.3
# Meta as::author {Andreas Kupries}
# Meta as::copyright 2009
# Meta as::license BSD
# Meta description Implementation of a channel representing
# Meta description an in-memory read-only random-access
# Meta description file. Based on using Tcl 8.5's channel
# Meta description reflection support. Exports a single





|







1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
# # ## ### ##### ######## #############
# (C) 2009 Andreas Kupries

# @@ Meta Begin
# Package tcl::chan::string 1
# Meta as::author {Andreas Kupries}
# Meta as::copyright 2009
# Meta as::license BSD
# Meta description Implementation of a channel representing
# Meta description an in-memory read-only random-access
# Meta description file. Based on using Tcl 8.5's channel
# Meta description reflection support. Exports a single
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
	}

	# Compute the new location per the arguments.

	set max [string length $content]
	switch -exact -- $base {
	    start   { set newloc $offset}
	    current { set newloc [expr {$at  + $offset }] }
	    end     { set newloc [expr {$max + $offset }] }
	}

	# Check if the new location is beyond the range given by the
	# content.

	if {$newloc < 0} {
	    return -code error "Cannot seek before the start of the channel"
	} elseif {$newloc > $max} {
	    return -code error "Cannot seek after the end of the channel"
	}

	# Commit to new location, switch readable events, and report.
	set at $newloc

	my Events







|
|







|







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
	}

	# Compute the new location per the arguments.

	set max [string length $content]
	switch -exact -- $base {
	    start   { set newloc $offset}
	    current { set newloc [expr {$at  + $offset    }] }
	    end     { set newloc [expr {$max + $offset - 1}] }
	}

	# Check if the new location is beyond the range given by the
	# content.

	if {$newloc < 0} {
	    return -code error "Cannot seek before the start of the channel"
	} elseif {$newloc >= $max} {
	    return -code error "Cannot seek after the end of the channel"
	}

	# Commit to new location, switch readable events, and report.
	set at $newloc

	my Events
116
117
118
119
120
121
122
123
124
	# properly processed by the event handler. Like for regular
	# files -- Ticket [864a0c83e3].
	my allow read
    }
}

# # ## ### ##### ######## #############
package provide tcl::chan::string 1.0.3
return







|

116
117
118
119
120
121
122
123
124
	# properly processed by the event handler. Like for regular
	# files -- Ticket [864a0c83e3].
	my allow read
    }
}

# # ## ### ##### ######## #############
package provide tcl::chan::string 1.0.2
return

Deleted modules/virtchannel_base/string.test.

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
89
90
91
92
93
94
# -------------------------------------------------------------------------
# string.test -*- tcl -*-
# (C) 2017 Andreas Kupries. BSD licensed.
# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0
testsNeed        TclOO 1

support {
    use virtchannel_core/core.tcl   tcl::chan::core
    use virtchannel_core/events.tcl tcl::chan::events
}
testing {
    useLocal string.tcl tcl::chan::string
}

# -------------------------------------------------------------------------

test tcl-chan-string-1.0 {constructor wrong\#args} -body {
    tcl::chan::string
} -returnCodes error \
    -result {wrong # args: should be "tcl::chan::string content"}

test tcl-chan-string-1.1 {constructor wrong\#args} -body {
    tcl::chan::string C X
} -returnCodes error \
    -result {wrong # args: should be "tcl::chan::string content"}

# -------------------------------------------------------------------------

test tcl-chan-string-2.0 {tell, initial, empty} -setup {
    set c [tcl::chan::string ""]
} -body {
    tell $c
} -cleanup {
    close $c
    unset c
} -result 0

test tcl-chan-string-2.1 {seek from start beyond eof is error} -setup {
    set c [tcl::chan::string ""]
} -body {
    seek $c 10
} -cleanup {
    close $c
    unset c
} -returnCodes error -result {Cannot seek after the end of the channel}

test tcl-chan-string-2.2 {seek from end, eof, empty, tell} -setup {
    set c [tcl::chan::string ""]
} -body {
    seek $c 0 end
    tell $c
} -cleanup {
    close $c
    unset c
} -result 0

test tcl-chan-string-2.3 {seek from end, eof, non-empty, tell} -setup {
    set c [tcl::chan::string Hello\n]
} -body {
    seek $c 0 end
    tell $c
} -cleanup {
    close $c
    unset c
} -result 6

test tcl-chan-string-2.4 {seek from end, non-eof, non-empty, tell} -setup {
    set c [tcl::chan::string Hello\n]
} -body {
    seek $c -6 end
    tell $c
} -cleanup {
    close $c
    unset c
} -result 0

# -------------------------------------------------------------------------
# Explicit cleanup of loaded support classes.
rename tcl::chan::events {}
rename tcl::chan::core   {}
testsuiteCleanup
return

# Local Variables:
#  mode: tcl
#  indent-tabs-mode: nil
# End:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




























































































































































































Changes to modules/virtchannel_base/tcllib_fifo.man.

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
[para]

The [package tcl::chan::fifo] package provides a command creating
channels which live purely in memory. Access is fifo-like, i.e. things
are read out of the channel in the order they were written to it.

This is equivalent to the fifo channels provided by the package
[package Memchan], except that this is written in pure Tcl, not C. On
the other hand, [package Memchan] is usable with Tcl 8.4 and before,
whereas this package requires Tcl 8.5 or higher, and [package TclOO].

[para] The internal [package TclOO] class implementing the channel
handler is a sub-class of the [package tcl::chan::events] framework.

[section API]

[list_begin definitions]

[call [cmd ::tcl::chan::fifo]]

This command creates a new fifo channel and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

















|

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
[para]

The [package tcl::chan::fifo] package provides a command creating
channels which live purely in memory. Access is fifo-like, i.e. things
are read out of the channel in the order they were written to it.

This is equivalent to the fifo channels provided by the package
[package Mmechan], except that this is written in pure Tcl, not C. On
the other hand, [package Memchan] is usable with Tcl 8.4 and before,
whereas this package requires Tcl 8.5 or higher, and [package TclOO].

[para] The internal [package TclOO] class implementing the channel
handler is a sub-class of the [package tcl::chan::events] framework.

[section API]

[list_begin definitions]

[call [cmd ::tcl::chan::fifo]]

This command creates a new fifo channel and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/tcllib_fifo2.man.

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
pairs of channels which live purely in memory and are connected to
each other in a fifo manner. What is written to one half of the pair
can be read from the other half, in the same order. One particular
application for this is communication between threads, with one half
of the pair moved to the thread to talk to.

This is equivalent to the fifo2 channels provided by the package
[package Memchan], except that this is written in pure Tcl, not C. On
the other hand, [package Memchan] is usable with Tcl 8.4 and before,
whereas this package requires Tcl 8.5 or higher, and [package TclOO].

[para] The internal [package TclOO] class implementing the channel
handler is a sub-class of the [package tcl::chan::events] framework.

[section API]

[list_begin definitions]

[call [cmd ::tcl::chan::fifo2]]

This command creates a new connected pair of fifo channels and returns
their handles, as a list containing two elements.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|


















|

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
pairs of channels which live purely in memory and are connected to
each other in a fifo manner. What is written to one half of the pair
can be read from the other half, in the same order. One particular
application for this is communication between threads, with one half
of the pair moved to the thread to talk to.

This is equivalent to the fifo2 channels provided by the package
[package Mmechan], except that this is written in pure Tcl, not C. On
the other hand, [package Memchan] is usable with Tcl 8.4 and before,
whereas this package requires Tcl 8.5 or higher, and [package TclOO].

[para] The internal [package TclOO] class implementing the channel
handler is a sub-class of the [package tcl::chan::events] framework.

[section API]

[list_begin definitions]

[call [cmd ::tcl::chan::fifo2]]

This command creates a new connected pair of fifo channels and returns
their handles, as a list containing two elements.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/tcllib_memchan.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[vset VERSION 1.0.4]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcl::chan::memchan n [vset VERSION]]
[keywords {in-memory channel}]
[keywords {reflected channel}]
[keywords {tip 219}]
[keywords {virtual channel}]
[copyright {2009-2017 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Reflected/virtual channel support}]
[category  Channels]
[titledesc {In-memory channel}]
[require Tcl 8.5]
[require TclOO]
[require tcl::chan::events [opt 1]]
[require tcl::chan::memchan [opt [vset VERSION]]]
[description]
[para]

The [package tcl::chan::memchan] package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable. This is equivalent to the memchan channels provided by
the package [package Memchan], except that this is written in pure Tcl,
<

|




|






|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcl::chan::memchan n 1]
[keywords {in-memory channel}]
[keywords {reflected channel}]
[keywords {tip 219}]
[keywords {virtual channel}]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Reflected/virtual channel support}]
[category  Channels]
[titledesc {In-memory channel}]
[require Tcl 8.5]
[require TclOO]
[require tcl::chan::events [opt 1]]
[require tcl::chan::memchan [opt 1]]
[description]
[para]

The [package tcl::chan::memchan] package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable. This is equivalent to the memchan channels provided by
the package [package Memchan], except that this is written in pure Tcl,
37
38
39
40
41
42
43
44
45
[call [cmd ::tcl::chan::memchan]]

This command creates a new memchan channel and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

36
37
38
39
40
41
42
43
44
[call [cmd ::tcl::chan::memchan]]

This command creates a new memchan channel and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/tcllib_null.man.

37
38
39
40
41
42
43
44
45
[call [cmd ::tcl::chan::null]]

This command creates a new null channel and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

37
38
39
40
41
42
43
44
45
[call [cmd ::tcl::chan::null]]

This command creates a new null channel and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/tcllib_random.man.

38
39
40
41
42
43
44
45
46

The seed is a list of integer numbers used to initialize the
internal feedback shift register of the generator.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

38
39
40
41
42
43
44
45
46

The seed is a list of integer numbers used to initialize the
internal feedback shift register of the generator.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/tcllib_string.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[vset VERSION 1.0.3]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcl::chan::string n [vset VERSION]]
[keywords {in-memory channel}]
[keywords {reflected channel}]
[keywords {tip 219}]
[keywords {virtual channel}]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Reflected/virtual channel support}]
[category  Channels]
[titledesc {Read-only in-memory channel}]
[require Tcl 8.5]
[require TclOO]
[require tcl::chan::events [opt 1]]
[require tcl::chan::string [opt [vset VERSION]]]
[description]
[para]

The [package tcl::chan::string] package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable.

<

|











|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcl::chan::string n 1]
[keywords {in-memory channel}]
[keywords {reflected channel}]
[keywords {tip 219}]
[keywords {virtual channel}]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Reflected/virtual channel support}]
[category  Channels]
[titledesc {Read-only in-memory channel}]
[require Tcl 8.5]
[require TclOO]
[require tcl::chan::events [opt 1]]
[require tcl::chan::string [opt 1]]
[description]
[para]

The [package tcl::chan::string] package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable.

38
39
40
41
42
43
44
45
46

This command creates a new string channel and returns its handle. The
channel provides random read-only access to the [arg content] string.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

37
38
39
40
41
42
43
44
45

This command creates a new string channel and returns its handle. The
channel provides random read-only access to the [arg content] string.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/tcllib_variable.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[vset VERSION 1.0.4]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcl::chan::variable n [vset VERSION]]
[keywords {in-memory channel}]
[keywords {reflected channel}]
[keywords {tip 219}]
[keywords {virtual channel}]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Reflected/virtual channel support}]
[category  Channels]
[titledesc {In-memory channel using variable for storage}]
[require Tcl 8.5]
[require TclOO]
[require tcl::chan::events [opt 1]]
[require tcl::chan::variable [opt [vset VERSION]]]
[description]
[para]

The [package tcl::chan::variable] package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable.

<

|











|








1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

[comment {-*- tcl -*- doctools manpage}]
[manpage_begin tcl::chan::variable n 1]
[keywords {in-memory channel}]
[keywords {reflected channel}]
[keywords {tip 219}]
[keywords {virtual channel}]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Reflected/virtual channel support}]
[category  Channels]
[titledesc {In-memory channel using variable for storage}]
[require Tcl 8.5]
[require TclOO]
[require tcl::chan::events [opt 1]]
[require tcl::chan::variable [opt 1]]
[description]
[para]

The [package tcl::chan::variable] package provides a command creating
channels which live purely in memory. They provide random-access,
i.e. are seekable.

39
40
41
42
43
44
45
46
47
This command creates a new variable channel and returns its handle.
The content of the channel is stored in the associated namespace
variable [arg varname].

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

38
39
40
41
42
43
44
45
46
This command creates a new variable channel and returns its handle.
The content of the channel is stored in the associated namespace
variable [arg varname].

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/tcllib_zero.man.

37
38
39
40
41
42
43
44
45
[call [cmd ::tcl::chan::zero]]

This command creates a new zero channel and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

37
38
39
40
41
42
43
44
45
[call [cmd ::tcl::chan::zero]]

This command creates a new zero channel and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/textwindow.man.

31
32
33
34
35
36
37
38
39

This command creates a new textwindow channel and returns its handle.
Data written to this channel will appear in the associated [arg widget].

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

31
32
33
34
35
36
37
38
39

This command creates a new textwindow channel and returns its handle.
Data written to this channel will appear in the associated [arg widget].

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_base/variable.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
# # ## ### ##### ######## #############
# (C) 2009 Andreas Kupries

# @@ Meta Begin
# Package tcl::chan::variable 1.0.4
# Meta as::author {Andreas Kupries}
# Meta as::copyright 2009
# Meta as::license BSD
# Meta description Implementation of a channel representing
# Meta description an in-memory read-write random-access
# Meta description file. Based on Tcl 8.5's channel reflection
# Meta description support. Exports a single command for the





|







1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
# # ## ### ##### ######## #############
# (C) 2009 Andreas Kupries

# @@ Meta Begin
# Package tcl::chan::variable 1.0.2
# Meta as::author {Andreas Kupries}
# Meta as::copyright 2009
# Meta as::license BSD
# Meta description Implementation of a channel representing
# Meta description an in-memory read-write random-access
# Meta description file. Based on Tcl 8.5's channel reflection
# Meta description support. Exports a single command for the
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
	upvar #0 $varname content

	# Compute the new location per the arguments.

	set max [string length $content]
	switch -exact -- $base {
	    start   { set newloc $offset}
	    current { set newloc [expr {$at  + $offset }] }
	    end     { set newloc [expr {$max + $offset }] }
	}

	# Check if the new location is beyond the range given by the
	# content.

	if {$newloc < 0} {
	    return -code error "Cannot seek before the start of the channel"
	} elseif {$newloc > $max} {
	    # We can seek beyond the end of the current contents, add
	    # a block of zeros.
	    append content [binary format @[expr {$newloc - $max}]]
	}

	# Commit to new location, switch readable events, and report.
	set at $newloc







|
|







|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
	upvar #0 $varname content

	# Compute the new location per the arguments.

	set max [string length $content]
	switch -exact -- $base {
	    start   { set newloc $offset}
	    current { set newloc [expr {$at  + $offset    }] }
	    end     { set newloc [expr {$max + $offset - 1}] }
	}

	# Check if the new location is beyond the range given by the
	# content.

	if {$newloc < 0} {
	    return -code error "Cannot seek before the start of the channel"
	} elseif {$newloc >= $max} {
	    # We can seek beyond the end of the current contents, add
	    # a block of zeros.
	    append content [binary format @[expr {$newloc - $max}]]
	}

	# Commit to new location, switch readable events, and report.
	set at $newloc
173
174
175
176
177
178
179
180
181
	# properly processed by the event handler. Like for regular
	# files -- Ticket [864a0c83e3].
	my allow read
    }
}

# # ## ### ##### ######## #############
package provide tcl::chan::variable 1.0.4
return







|

173
174
175
176
177
178
179
180
181
	# properly processed by the event handler. Like for regular
	# files -- Ticket [864a0c83e3].
	my allow read
    }
}

# # ## ### ##### ######## #############
package provide tcl::chan::variable 1.0.3
return

Deleted modules/virtchannel_base/variable.test.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# -------------------------------------------------------------------------
# variable.test -*- tcl -*-
# (C) 2017 Andreas Kupries. BSD licensed.
# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.5
testsNeedTcltest 2.0
testsNeed        TclOO 1

support {
    use virtchannel_core/core.tcl   tcl::chan::core
    use virtchannel_core/events.tcl tcl::chan::events
}
testing {
    useLocal variable.tcl tcl::chan::variable
}

# -------------------------------------------------------------------------

test tcl-chan-variable-1.0 {constructor wrong\#args} -body {
    tcl::chan::variable
} -returnCodes error \
    -result {wrong # args: should be "tcl::chan::variable varname"}

test tcl-chan-variable-1.1 {constructor wrong\#args} -body {
    tcl::chan::variable V X
} -returnCodes error \
    -result {wrong # args: should be "tcl::chan::variable varname"}

# -------------------------------------------------------------------------

test tcl-chan-variable-2.0 {tell, initial, empty} -setup {
    set content ""
    set c [tcl::chan::variable content]
} -body {
    tell $c
} -cleanup {
    close $c
    unset c content
} -result 0

test tcl-chan-variable-2.1 {seek from start, expand, tell} -setup {
    set content ""
    set c [tcl::chan::variable content]
} -body {
    seek $c 10
    tell $c
} -cleanup {
    close $c
    unset c content
} -result 10

test tcl-chan-variable-2.2 {seek from end, eof, empty, tell} -setup {
    set content ""
    set c [tcl::chan::variable content]
} -body {
    seek $c 0 end
    tell $c
} -cleanup {
    close $c
    unset c content
} -result 0

test tcl-chan-variable-2.3 {seek from end, eof, non-empty, tell} -setup {
    set content ""
    set c [tcl::chan::variable content]
    puts $c Hello
} -body {
    seek $c 0 end
    tell $c
} -cleanup {
    close $c
    unset c content
} -result 6

test tcl-chan-variable-2.4 {seek from end, non-eof, non-empty, tell} -setup {
    set content ""
    set c [tcl::chan::variable content]
    puts $c Hello
} -body {
    seek $c -6 end
    tell $c
} -cleanup {
    close $c
    unset c content
} -result 0

# -------------------------------------------------------------------------
# Explicit cleanup of loaded support classes.
rename tcl::chan::events {}
rename tcl::chan::core   {}
testsuiteCleanup
return

# Local Variables:
#  mode: tcl
#  indent-tabs-mode: nil
# End:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































































Changes to modules/virtchannel_core/core.man.

64
65
66
67
68
69
70
71
72
initialized for, see the method [method initialize]. When destroyed
from within a call of [method finalize] this does not happen, under
the assumption that the channel is being destroyed by Tcl.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

64
65
66
67
68
69
70
71
72
initialized for, see the method [method initialize]. When destroyed
from within a call of [method finalize] this does not happen, under
the assumption that the channel is being destroyed by Tcl.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_core/events.man.

71
72
73
74
75
76
77
78
79
system coming in through the [method watch] method the event core is
able to determine which events it should (not) generate and act
accordingly.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

71
72
73
74
75
76
77
78
79
system coming in through the [method watch] method the event core is
able to determine which events it should (not) generate and act
accordingly.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_core/transformcore.man.

64
65
66
67
68
69
70
71
72
it was initialized for, see the method [method initialize]. When destroyed
from within a call of [method finalize] this does not happen, under
the assumption that the channel and transform are being destroyed by Tcl.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

64
65
66
67
68
69
70
71
72
it was initialized for, see the method [method initialize]. When destroyed
from within a call of [method finalize] this does not happen, under
the assumption that the channel and transform are being destroyed by Tcl.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/adler32.man.

62
63
64
65
66
67
68
69
70
[para] If not specified, or the empty string, the checksum of the
write direction is not saved.

[list_end]
[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

62
63
64
65
66
67
68
69
70
[para] If not specified, or the empty string, the checksum of the
write direction is not saved.

[list_end]
[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/hex.man.

35
36
37
38
39
40
41
42
43

This command creates a hex transformation on top of the channel
[arg chan] and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

35
36
37
38
39
40
41
42
43

This command creates a hex transformation on top of the channel
[arg chan] and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/identity.man.

42
43
44
45
46
47
48
49
50

This command creates an identity transformation on top of the channel
[arg chan] and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

42
43
44
45
46
47
48
49
50

This command creates an identity transformation on top of the channel
[arg chan] and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/limitsize.man.

38
39
40
41
42
43
44
45
46
[para] [arg max] is the number of bytes which can be read from the
channel before EOF is signaled by the transformation. Note that
popping the transformation clears the EOF it generated as well.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

38
39
40
41
42
43
44
45
46
[para] [arg max] is the number of bytes which can be read from the
channel before EOF is signaled by the transformation. Note that
popping the transformation clears the EOF it generated as well.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/observe.man.

42
43
44
45
46
47
48
49
50
This command creates an observer transformation on top of the channel
[arg chan] and returns its handle. The channel handles [arg logr] and
[arg logw] are there the data is copied to.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

42
43
44
45
46
47
48
49
50
This command creates an observer transformation on top of the channel
[arg chan] and returns its handle. The channel handles [arg logr] and
[arg logw] are there the data is copied to.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/rot.man.

49
50
51
52
53
54
55
56
57
ASCII 65...90, and 97...122, i.e. the upper- and lower-case alphabetic
characters, i.e. "A...Z" and "a...z". All other bytes are passed
through unchanged.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

49
50
51
52
53
54
55
56
57
ASCII 65...90, and 97...122, i.e. the upper- and lower-case alphabetic
characters, i.e. "A...Z" and "a...z". All other bytes are passed
through unchanged.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/spacer.man.

37
38
39
40
41
42
43
44
45
bytes of data written, and on the read side the same is done in
reverse, removing the spacing. If [arg space] is not specified it
defaults to a single space character (ASCII 32).

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

37
38
39
40
41
42
43
44
45
bytes of data written, and on the read side the same is done in
reverse, removing the spacing. If [arg space] is not specified it
defaults to a single space character (ASCII 32).

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/tcllib_zlib.man.

38
39
40
41
42
43
44
45
46

[para] The [arg level] specifies how much effort is put into the
compression, from [const 0] to [const 9], and defaults to [const 4].

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

38
39
40
41
42
43
44
45
46

[para] The [arg level] specifies how much effort is put into the
compression, from [const 0] to [const 9], and defaults to [const 4].

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/vt_base64.man.

36
37
38
39
40
41
42
43
44

This command creates a base64 transformation on top of the channel
[arg chan] and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

36
37
38
39
40
41
42
43
44

This command creates a base64 transformation on top of the channel
[arg chan] and returns its handle.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/vt_counter.man.

60
61
62
63
64
65
66
67
68
[para] If not specified, or the empty string, the counter of the
write direction is not saved.

[list_end]
[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

60
61
62
63
64
65
66
67
68
[para] If not specified, or the empty string, the counter of the
write direction is not saved.

[list_end]
[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/vt_crc32.man.

62
63
64
65
66
67
68
69
70
[para] If not specified, or the empty string, the checksum of the
write direction is not saved.

[list_end]
[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

62
63
64
65
66
67
68
69
70
[para] If not specified, or the empty string, the checksum of the
write direction is not saved.

[list_end]
[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/virtchannel_transform/vt_otp.man.

45
46
47
48
49
50
51
52
53
one-time pads for the write and read directions, respectively. Their
contents are reads and xored with the bytes written to and read from
the channel.

[list_end]

[vset CATEGORY virtchannel]
[include ../common-text/feedback.inc]
[manpage_end]







|

45
46
47
48
49
50
51
52
53
one-time pads for the write and read directions, respectively. Their
contents are reads and xored with the bytes written to and read from
the channel.

[list_end]

[vset CATEGORY virtchannel]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/websocket/pkgIndex.tcl.

1
2
3
4
5
6
7
8
9
10
11
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

package ifneeded websocket 1.4.1 [list source [file join $dir websocket.tcl]]










|
1
2
3
4
5
6
7
8
9
10
11
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

package ifneeded websocket 1.4 [list source [file join $dir websocket.tcl]]

Changes to modules/websocket/websocket.man.

201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
identifier fo an HTTP server that is capable of doing WebSockets.
Paths onto which this server will listen for incoming connections
should be declared using [cmd ::websocket::live].

[call [cmd ::websocket::live] [arg sock] [arg path] [arg cb] [opt [arg proto]]]

This procedure registers callbacks that will be performed on a
WebSocket compliant server registered with [cmd ::websocket::server]
whenever a client connects to a matching path and protocol. 
[arg sock] is the listening socket of the websocket compliant server
declared using [cmd ::websocket::server].  [arg path] is a glob-style
path to match in client request, whenever this will occur.  [arg cb]
is the command to callback (see Callbacks).  [arg proto] is a
glob-style protocol name matcher.








|







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
identifier fo an HTTP server that is capable of doing WebSockets.
Paths onto which this server will listen for incoming connections
should be declared using [cmd ::websocket::live].

[call [cmd ::websocket::live] [arg sock] [arg path] [arg cb] [opt [arg proto]]]

This procedure registers callbacks that will be performed on a
WebSocket compliant server registered with [cmd ::websocket::server]]
whenever a client connects to a matching path and protocol. 
[arg sock] is the listening socket of the websocket compliant server
declared using [cmd ::websocket::server].  [arg path] is a glob-style
path to match in client request, whenever this will occur.  [arg cb]
is the command to callback (see Callbacks).  [arg proto] is a
glob-style protocol name matcher.

377
378
379
380
381
382
383
384
385
after 400 test $sock
vwait forever
[example_end]

[include ../common-text/tls-security-notes.inc]

[vset CATEGORY websocket]
[include ../common-text/feedback.inc]
[manpage_end]







|

377
378
379
380
381
382
383
384
385
after 400 test $sock
vwait forever
[example_end]

[include ../common-text/tls-security-notes.inc]

[vset CATEGORY websocket]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/websocket/websocket.tcl.

968
969
970
971
972
973
974





975




















976







977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
	set dst "server"
    }
    set type [Type $Connection(read:mode)]

    # If the FIN bit is set, process the frame.
    if { $header & 0x8000 } {
	${log}::debug "Received $len bytes long $type final fragment from $dst"


























    set msgToPush $Connection(read:msg)







	# Prepare for next frame.
	if { $opcode < 8 } {
	    # Reinitialise
	    set Connection(read:msg) ""
	    set Connection(read:mode) ""
	} else {
	    set Connection(read:msg) $oldmsg
	    if {$Connection(read:mode) eq $opcode} {
		# non-interjected control frame, clear mode
		set Connection(read:mode) ""
	    }
	}

    switch $opcode {
	    1 {
		# Text: decode and notify handler
		Push $sock text \
		    [encoding convertfrom utf-8 $msgToPush]
	    }
	    2 {
		# Binary: notify handler, no decoding
		Push $sock binary $msgToPush
	    }
	    8 {
		# Close: decode, notify handler and close frame.
		if { [string length $msgToPush] >= 2 } {
		    binary scan [string range $msgToPush) 0 1] Su \
			reason
		    set msg [encoding convertfrom utf-8 \
				 [string range $msgToPush 2 end]]
		    close $sock $reason $msg
		} else {
		    close $sock
		}
		return
	    }
	    9 {
		# Ping: send pong back and notify handler since this
		# might contain some data.
		send $sock 10 $msgToPush
		Push $sock ping $msgToPush
	    }
	    10 {
		Push $sock pong $msgToPush
	    }
	}

    } else {
	${log}::debug "Received $len long $type fragment from $dst"
    }
}


# ::websocket::New -- Create new websocket connection context







>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020



































1021
1022
1023
1024
1025
1026
1027
	set dst "server"
    }
    set type [Type $Connection(read:mode)]

    # If the FIN bit is set, process the frame.
    if { $header & 0x8000 } {
	${log}::debug "Received $len bytes long $type final fragment from $dst"
	switch $opcode {
	    1 {
		# Text: decode and notify handler
		Push $sock text \
		    [encoding convertfrom utf-8 $Connection(read:msg)]
	    }
	    2 {
		# Binary: notify handler, no decoding
		Push $sock binary $Connection(read:msg)
	    }
	    8 {
		# Close: decode, notify handler and close frame.
		if { [string length $Connection(read:msg)] >= 2 } {
		    binary scan [string range $Connection(read:msg) 0 1] Su \
			reason
		    set msg [encoding convertfrom utf-8 \
				 [string range $Connection(read:msg) 2 end]]
		    close $sock $reason $msg
		} else {
		    close $sock 
		}
		return
	    }
	    9 {
		# Ping: send pong back and notify handler since this
		# might contain some data.
		send $sock 10 $Connection(read:msg)
		Push $sock ping $Connection(read:msg)
	    }
	    10 {
		Push $sock pong $Connection(read:msg)
	    }
	}

	# Prepare for next frame.
	if { $opcode < 8 } {
	    # Reinitialise
	    set Connection(read:msg) ""
	    set Connection(read:mode) ""
	} else {
	    set Connection(read:msg) $oldmsg
	    if {$Connection(read:mode) eq $opcode} {
		# non-interjected control frame, clear mode
		set Connection(read:mode) ""
	    }
	}



































    } else {
	${log}::debug "Received $len long $type fragment from $dst"
    }
}


# ::websocket::New -- Create new websocket connection context
1750
1751
1752
1753
1754
1755
1756
1757
    return \
	-level 2 \
	-code error \
	-errorcode [list WEBSOCKET {*}$args] \
	$msg;
}

package provide websocket 1.4.1







|
1747
1748
1749
1750
1751
1752
1753
1754
    return \
	-level 2 \
	-code error \
	-errorcode [list WEBSOCKET {*}$args] \
	$msg;
}

package provide websocket 1.4

Changes to modules/wip/wip.man.

376
377
378
379
380
381
382
383
384
[list_end]

[section EXAMPLES]

No examples yet.

[vset CATEGORY wip]
[include ../common-text/feedback.inc]
[manpage_end]







|

376
377
378
379
380
381
382
383
384
[list_end]

[section EXAMPLES]

No examples yet.

[vset CATEGORY wip]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Added modules/yaml/06eef112da.data.















>
>
>
>
>
>
>
1
2
3
4
5
6
7
---
- &foo
- &bar
- alpha: 43
  beta:
    houston: [*foo]
    newyork:  [[*bar,[aaa]]]

Changes to modules/yaml/huddle.man.

1
2
3
4
5
6
7
8
[vset VERSION 0.3]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin huddle n [vset VERSION]]
[see_also yaml]
[keywords {data exchange}]
[keywords {exchange format}]
[keywords huddle]
[keywords json]
|







1
2
3
4
5
6
7
8
[vset VERSION 0.2]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin huddle n [vset VERSION]]
[see_also yaml]
[keywords {data exchange}]
[keywords {exchange format}]
[keywords huddle]
[keywords json]
550
551
552
553
554
555
556
557
558

[section LIMITATIONS]

[para]
now printing.

[vset CATEGORY huddle]
[include ../common-text/feedback.inc]
[manpage_end]







|

550
551
552
553
554
555
556
557
558

[section LIMITATIONS]

[para]
now printing.

[vset CATEGORY huddle]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/yaml/huddle.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# huddle.tcl (working title)
#
# huddle.tcl 0.1.5 2011-08-23 14:46:47 KATO Kanryu(kanryu6@users.sourceforge.net)
#
#   It is published with the terms of tcllib's BSD-style license.
#   See the file named license.terms.
#
# This library provide functions to differentinate string/list/dict in multi-ranks.
#
# Copyright (c) 2008-2011 KATO Kanryu <kanryu6@users.sourceforge.net>
# Copyright (c) 2015 Miguel Martínez López <aplicacionamedida@gmail.com>

package require Tcl 8.5
package provide huddle 0.3

namespace eval ::huddle {
    namespace export huddle wrap unwrap isHuddle strip_node are_equal_nodes argument_to_node get_src

    variable types

    # Some subcommands conflict with Tcl builtin commands. So, we make













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# huddle.tcl (working title)
#
# huddle.tcl 0.1.5 2011-08-23 14:46:47 KATO Kanryu(kanryu6@users.sourceforge.net)
#
#   It is published with the terms of tcllib's BSD-style license.
#   See the file named license.terms.
#
# This library provide functions to differentinate string/list/dict in multi-ranks.
#
# Copyright (c) 2008-2011 KATO Kanryu <kanryu6@users.sourceforge.net>
# Copyright (c) 2015 Miguel Martínez López <aplicacionamedida@gmail.com>

package require Tcl 8.5
package provide huddle 0.2

namespace eval ::huddle {
    namespace export huddle wrap unwrap isHuddle strip_node are_equal_nodes argument_to_node get_src

    variable types

    # Some subcommands conflict with Tcl builtin commands. So, we make
485
486
487
488
489
490
491
492

493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514

515
516
517
518
519
520
521
522
523
524

525
526

527
528
529
530
531
532
533
534
535
536

537
538
539
540
541
542
543
    set sp " "
    if {[string equal $offset ""]} {set sp ""}

    set type [huddle type $huddle_object]

    switch -- $type {
        boolean -
        number {

            return [huddle get_stripped $huddle_object]
        }
	null {
	    return null
	}
        string {
            set data [huddle get_stripped $huddle_object]

            # JSON permits only oneline string
            set data [string map {
                    \n \\n
                    \t \\t
                    \r \\r
                    \b \\b
                    \f \\f
                    \\ \\\\
                    \" \\\"
                    / \\/
                } $data
            ]
	    return "\"$data\""
        }

        list {
            set inner {}
            set len [huddle llength $huddle_object]
            for {set i 0} {$i < $len} {incr i} {
                set subobject [huddle get $huddle_object $i]
                lappend inner [jsondump $subobject $offset $newline $nextoff]
            }
            if {[llength $inner] == 1} {
                return "\[[lindex $inner 0]\]"
            }

            return "\[$nlof[join $inner ,$nlof]$newline$begin\]"
        }

        dict {
            set inner {}
            foreach {key} [huddle keys $huddle_object] {
                lappend inner [subst {"$key":$sp[jsondump [huddle get $huddle_object $key] $offset $newline $nextoff]}]
            }
            if {[llength $inner] == 1} {
                return $inner
            }
            return "\{$nlof[join $inner ,$nlof]$newline$begin\}"
        }

        default {
            return [$types(callback:$type) jsondump $data $offset $newline $nextoff]
        }
    }
}

# data is plain old tcl values







|
>


<
<
|















|

>










>


>










>







485
486
487
488
489
490
491
492
493
494
495


496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
    set sp " "
    if {[string equal $offset ""]} {set sp ""}

    set type [huddle type $huddle_object]

    switch -- $type {
        boolean -
        number -
        null {
            return [huddle get_stripped $huddle_object]
        }



        string {
            set data [huddle get_stripped $huddle_object]

            # JSON permits only oneline string
            set data [string map {
                    \n \\n
                    \t \\t
                    \r \\r
                    \b \\b
                    \f \\f
                    \\ \\\\
                    \" \\\"
                    / \\/
                } $data
            ]
        return "\"$data\""
        }
        
        list {
            set inner {}
            set len [huddle llength $huddle_object]
            for {set i 0} {$i < $len} {incr i} {
                set subobject [huddle get $huddle_object $i]
                lappend inner [jsondump $subobject $offset $newline $nextoff]
            }
            if {[llength $inner] == 1} {
                return "\[[lindex $inner 0]\]"
            }
            
            return "\[$nlof[join $inner ,$nlof]$newline$begin\]"
        }
        
        dict {
            set inner {}
            foreach {key} [huddle keys $huddle_object] {
                lappend inner [subst {"$key":$sp[jsondump [huddle get $huddle_object $key] $offset $newline $nextoff]}]
            }
            if {[llength $inner] == 1} {
                return $inner
            }
            return "\{$nlof[join $inner ,$nlof]$newline$begin\}"
        }
        
        default {
            return [$types(callback:$type) jsondump $data $offset $newline $nextoff]
        }
    }
}

# data is plain old tcl values

Changes to modules/yaml/huddle.test.

140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#                }
#                set val [eval huddle list $subs]
#            }
#            lappend result $key $val
#        }
#        return [eval huddle create $result]
#    }
#    set fd [open [asset layers.txt] r]
#    set json1 [read $fd]
#    close $fd
#
#    set data [json::json2dict $json1]
##    set data [huddle_build $data]
##
##    set json2 [huddle jsondump $data]







|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#                }
#                set val [eval huddle list $subs]
#            }
#            lappend result $key $val
#        }
#        return [eval huddle create $result]
#    }
#    set fd [open [file join [file dirname [info script]] layers.txt] r]
#    set json1 [read $fd]
#    close $fd
#
#    set data [json::json2dict $json1]
##    set data [huddle_build $data]
##
##    set json2 [huddle jsondump $data]
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
}}
    
    set data [json::json2dict $json1]
    set data [huddle compile {dict dd {dict * dict} ee {dict k number * string}}  $data]
    huddle equal $huddle1 $data
} -result {1}

test huddle-3.5 "test of huddle jsondump - null handling" -body {
    huddle jsondump {HUDDLE null}
} -result {null}

test huddle-3.6 "test of huddle jsondump - dict and null handling" -body {
    huddle jsondump {HUDDLE {D {a {s foo} b null}}}
} -result {{
  "a": "foo",
  "b": null
}}

# ... Tests of addStrings ...
#     (Requires introspection of parser state)

test huddle-4.1 "test of huddle set" -body {
    huddle set data_dict dd bb a baa
} -result {HUDDLE {D {dd {D {bb {D {a {s baa} c {s d}}} cc {D {e {s f} g {s h}}}}} ee {D {i {s j} k {s l}}}}}}








<
<
<
<
<
<
<
<
<
<
<







218
219
220
221
222
223
224











225
226
227
228
229
230
231
}}
    
    set data [json::json2dict $json1]
    set data [huddle compile {dict dd {dict * dict} ee {dict k number * string}}  $data]
    huddle equal $huddle1 $data
} -result {1}












# ... Tests of addStrings ...
#     (Requires introspection of parser state)

test huddle-4.1 "test of huddle set" -body {
    huddle set data_dict dd bb a baa
} -result {HUDDLE {D {dd {D {bb {D {a {s baa} c {s d}}} cc {D {e {s f} g {s h}}}}} ee {D {i {s j} k {s l}}}}}}

Added modules/yaml/layers.txt.

































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
{
  "filename": "022_05small.psd",
  "layers": [
    {
      "layer": "トンボ(必ãšè¡¨ç¤ºã•ã›ã‚‹",
      "visible": false,
      "haschild": false
    },
    {
      "layer": "アタリ線(最終的ã«æ¶ˆã™",
      "visible": false,
      "haschild": false
    },
    {
      "layer": "title",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "title 5.4",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "logos",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "niji_logo",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "+imoto+",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "レイヤー 2",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "nijiura 3",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "Here",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "nijiura 2.3",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "レイヤー 1",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "nijiura cap",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "nijiura 2.2",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "name",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "jal L",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "ana L_3",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "a380 L",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "rainbow flash",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "rainbow 7",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "rainbow 6",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "rainbow 5",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "hikari",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "kousen 6",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "kousen 5",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "kousen 4",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "kousen 3",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "kousen 2",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "kousen 1",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "ãƒãƒ£ãƒ³ãƒãƒ«ãƒŸã‚­ã‚µãƒ¼",
      "visible": true,
      "haschild": false
    },
    {
      "layer": "original",
      "visible": true,
      "haschild": false
    },
    {
      "layer": "ãƒãƒ£ãƒ³ãƒãƒ«ãƒŸã‚­ã‚µãƒ¼ 1",
      "visible": true,
      "haschild": false
    },
    {
      "layer": "original 2",
      "visible": true,
      "haschild": false
    },
    {
      "layer": "white light",
      "visible": false,
      "haschild": false
    },
    {
      "layer": "ushiro",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "色相・彩度1",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "sora 1",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "gurade",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "背景 ã®ã‚³ãƒ”ー 2",
      "visible": true,
      "haschild": false
    },
    {
      "layer": "用紙ゲージ",
      "visible": false,
      "haschild": false
    },
    {
      "layer": "背景",
      "visible": true,
      "haschild": false
    }
  ]
}

Changes to modules/yaml/pkgIndex.tcl.

1
2
3
4
5
6

if {![package vsatisfies [package provide Tcl] 8.5]} {return}

package ifneeded yaml         0.4.1 [list source [file join $dir yaml.tcl]]
package ifneeded huddle       0.3   [list source [file join $dir huddle.tcl]]
package ifneeded huddle::json 0.1   [list source [file join $dir json2huddle.tcl]]



|
|
|
1
2
3
4
5
6

if {![package vsatisfies [package provide Tcl] 8.5]} {return}

package ifneeded yaml         0.3.10 [list source [file join $dir yaml.tcl]]
package ifneeded huddle       0.2    [list source [file join $dir huddle.tcl]]
package ifneeded huddle::json 0.1    [list source [file join $dir json2huddle.tcl]]

Deleted modules/yaml/test-assets/06eef112da.data.

1
2
3
4
5
6
7
---
- &foo
- &bar
- alpha: 43
  beta:
    houston: [*foo]
    newyork:  [[*bar,[aaa]]]
<
<
<
<
<
<
<














Deleted modules/yaml/test-assets/layers.txt.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
{
  "filename": "022_05small.psd",
  "layers": [
    {
      "layer": "トンボ(必ãšè¡¨ç¤ºã•ã›ã‚‹",
      "visible": false,
      "haschild": false
    },
    {
      "layer": "アタリ線(最終的ã«æ¶ˆã™",
      "visible": false,
      "haschild": false
    },
    {
      "layer": "title",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "title 5.4",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "logos",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "niji_logo",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "+imoto+",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "レイヤー 2",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "nijiura 3",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "Here",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "nijiura 2.3",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "レイヤー 1",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "nijiura cap",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "nijiura 2.2",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "name",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "jal L",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "ana L_3",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "a380 L",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "rainbow flash",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "rainbow 7",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "rainbow 6",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "rainbow 5",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "hikari",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "kousen 6",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "kousen 5",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "kousen 4",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "kousen 3",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "kousen 2",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "kousen 1",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "ãƒãƒ£ãƒ³ãƒãƒ«ãƒŸã‚­ã‚µãƒ¼",
      "visible": true,
      "haschild": false
    },
    {
      "layer": "original",
      "visible": true,
      "haschild": false
    },
    {
      "layer": "ãƒãƒ£ãƒ³ãƒãƒ«ãƒŸã‚­ã‚µãƒ¼ 1",
      "visible": true,
      "haschild": false
    },
    {
      "layer": "original 2",
      "visible": true,
      "haschild": false
    },
    {
      "layer": "white light",
      "visible": false,
      "haschild": false
    },
    {
      "layer": "ushiro",
      "visible": false,
      "haschild": true,
      "layers": [
        {
          "layer": "色相・彩度1",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "sora 1",
          "visible": false,
          "haschild": false
        },
        {
          "layer": "gurade",
          "visible": false,
          "haschild": false
        }
      ]
    },
    {
      "layer": "背景 ã®ã‚³ãƒ”ー 2",
      "visible": true,
      "haschild": false
    },
    {
      "layer": "用紙ゲージ",
      "visible": false,
      "haschild": false
    },
    {
      "layer": "背景",
      "visible": true,
      "haschild": false
    }
  ]
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































































































































































































































































































































Changes to modules/yaml/yaml.man.

1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset YAML_VERSION 0.4.1]
[manpage_begin yaml n [vset YAML_VERSION]]
[see_also base64]
[see_also huddle]
[see_also json]
[keywords {data exchange}]
[keywords huddle]
[keywords parsing]

|







1
2
3
4
5
6
7
8
9
[comment {-*- tcl -*- doctools manpage}]
[vset YAML_VERSION 0.3.9]
[manpage_begin yaml n [vset YAML_VERSION]]
[see_also base64]
[see_also huddle]
[see_also json]
[keywords {data exchange}]
[keywords huddle]
[keywords parsing]
181
182
183
184
185
186
187
188
189
[para]
Too many braces, or too few braces.

[para]
Not enough character set of line feeds. Please use only "\n" as line breaks.

[vset CATEGORY yaml]
[include ../common-text/feedback.inc]
[manpage_end]







|

181
182
183
184
185
186
187
188
189
[para]
Too many braces, or too few braces.

[para]
Not enough character set of line feeds. Please use only "\n" as line breaks.

[vset CATEGORY yaml]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/yaml/yaml.tcl.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#   See the file named license.terms.
#
# It currently supports a very limited subsection of the YAML spec.
#
#

package require Tcl 8.5
package provide yaml 0.4.1
package require cmdline
package require huddle 0.1.7

namespace eval ::yaml {
    namespace export load setOptions dict2dump list2dump
    variable data
    array set data {}







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#   See the file named license.terms.
#
# It currently supports a very limited subsection of the YAML spec.
#
#

package require Tcl 8.5
package provide yaml 0.3.10
package require cmdline
package require huddle 0.1.7

namespace eval ::yaml {
    namespace export load setOptions dict2dump list2dump
    variable data
    array set data {}
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    variable defaults
    array set defaults {
        isfile   0
        validate 0
        types {timestamp int float null true false}
        composer {
            !!binary ::yaml::_composeBinary
	    !!float  ::yaml::_composeFloat
        }
        parsers {
            timestamp ::yaml::_parseTimestamp
        }
        shorthands {
            !! {tag:yaml.org,2002:}
        }







<







44
45
46
47
48
49
50

51
52
53
54
55
56
57
    variable defaults
    array set defaults {
        isfile   0
        validate 0
        types {timestamp int float null true false}
        composer {
            !!binary ::yaml::_composeBinary

        }
        parsers {
            timestamp ::yaml::_parseTimestamp
        }
        shorthands {
            !! {tag:yaml.org,2002:}
        }
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
}

####################
# Public APIs
####################

proc ::yaml::yaml2dict {args} {
    variable data
    _getOption $args

    set result [_parseBlockNode]

    set a [huddle get_stripped $result]

    if {$data(validate)} {
        set result [string map "{\n} {\\n}" $result]
    }

    return [huddle get_stripped $result]
}

proc ::yaml::yaml2huddle {args} {
    variable data
    _getOption $args

    set result [_parseBlockNode]
    if {$data(validate)} {
        set result [string map "{\n} {\\n}" $result]
    }
    return $result
}

proc ::yaml::setOptions {argv} {
    variable defaults







<






|







<



|







97
98
99
100
101
102
103

104
105
106
107
108
109
110
111
112
113
114
115
116
117

118
119
120
121
122
123
124
125
126
127
128
}

####################
# Public APIs
####################

proc ::yaml::yaml2dict {args} {

    _getOption $args

    set result [_parseBlockNode]

    set a [huddle get_stripped $result]

    if {$yaml::data(validate)} {
        set result [string map "{\n} {\\n}" $result]
    }

    return [huddle get_stripped $result]
}

proc ::yaml::yaml2huddle {args} {

    _getOption $args

    set result [_parseBlockNode]
    if {$yaml::data(validate)} {
        set result [string map "{\n} {\\n}" $result]
    }
    return $result
}

proc ::yaml::setOptions {argv} {
    variable defaults
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
    return [array get options]
}

#########################
# Scalar/Block Composers
#########################
proc ::yaml::_composeTags {tag value} {
    variable composer
    if {$tag eq ""} {return $value}
    set value [huddle get_stripped $value]
    if {$tag eq "!!str"} {
        set pair [list $tag $value]
    } elseif {[info exists composer($tag)]} {
        set pair [$composer($tag) $value]
    } else {
        error [_getErrorMessage TAG_NOT_FOUND $tag]
    }
    return  [huddle wrap $pair]
}

proc ::yaml::_composeFloat {value} {
    return [list !!float [expr {double($value)}]]
}

proc ::yaml::_composeBinary {value} {
    package require base64
    return [list !!binary [::base64::decode $value]]
}

proc ::yaml::_composePlain {value} {
    if {$value ne ""} {
        if {[huddle type $value] ne "plain"} {return $value}
        set value [huddle get_stripped $value]
    }
    set pair [_toType $value]
    return  [huddle wrap $pair]
}

proc ::yaml::_toType {value} {
    variable data
    variable parsers
    variable fixed
    if {$value eq ""} {return [list !!str ""]}

    set lowerval [string tolower $value]
    foreach {type} $data(types) {
        if {[info exists parsers($type)]} {
            set pair [$parsers($type) $value]
            if {$pair ne ""} {return $pair}
            continue
        }
        switch -- $type {
            int {
                # YAML 1.1
                if {[regexp {^-?\d[\d,]*\d$|^\d$} $value]} {
                    regsub -all "," $value "" integer
                    return [list !!int $integer]
                }
            }
            float {
                # don't run before "integer"
                regsub -all "," $value "" val
                if {[string is double $val]} {
                    return [list !!float $val]
                }
            }
            default {
                # !!null !!true !!false
                if {[info exists fixed($type:Group)] \
                 && [lsearch $fixed($type:Group) $lowerval] >= 0} {
                    set value $fixed($type:Value)
                    return [list !!$type $value]
                }
            }
        }
    }

    # the others







<




|
|






<
<
<
<















<
<
<



|
|
|




















|
|
|







231
232
233
234
235
236
237

238
239
240
241
242
243
244
245
246
247
248
249




250
251
252
253
254
255
256
257
258
259
260
261
262
263
264



265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
    return [array get options]
}

#########################
# Scalar/Block Composers
#########################
proc ::yaml::_composeTags {tag value} {

    if {$tag eq ""} {return $value}
    set value [huddle get_stripped $value]
    if {$tag eq "!!str"} {
        set pair [list $tag $value]
    } elseif {[info exists yaml::composer($tag)]} {
        set pair [$yaml::composer($tag) $value]
    } else {
        error [_getErrorMessage TAG_NOT_FOUND $tag]
    }
    return  [huddle wrap $pair]
}





proc ::yaml::_composeBinary {value} {
    package require base64
    return [list !!binary [::base64::decode $value]]
}

proc ::yaml::_composePlain {value} {
    if {$value ne ""} {
        if {[huddle type $value] ne "plain"} {return $value}
        set value [huddle get_stripped $value]
    }
    set pair [_toType $value]
    return  [huddle wrap $pair]
}

proc ::yaml::_toType {value} {



    if {$value eq ""} {return [list !!str ""]}

    set lowerval [string tolower $value]
    foreach {type} $yaml::data(types) {
        if {[info exists yaml::parsers($type)]} {
            set pair [$yaml::parsers($type) $value]
            if {$pair ne ""} {return $pair}
            continue
        }
        switch -- $type {
            int {
                # YAML 1.1
                if {[regexp {^-?\d[\d,]*\d$|^\d$} $value]} {
                    regsub -all "," $value "" integer
                    return [list !!int $integer]
                }
            }
            float {
                # don't run before "integer"
                regsub -all "," $value "" val
                if {[string is double $val]} {
                    return [list !!float $val]
                }
            }
            default {
                # !!null !!true !!false
                if {[info exists yaml::fixed($type:Group)] \
                 && [lsearch $yaml::fixed($type:Group) $lowerval] >= 0} {
                    set value $yaml::fixed($type:Value)
                    return [list !!$type $value]
                }
            }
        }
    }

    # the others
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
            if {"$type$cc" eq "---" && $current == 0} {
                set result {}
                continue
            } else {
                _ungetc 2

                # [Spec]
                # Since people perceive the "-" indicator as indentation,
                # nested block sequences may be indented by one less space
                # to compensate, except, of course,
                # if nested inside another block sequence.
                incr current
            }
        }
        if {$type eq "."} {
            set cc "[_getc][_getc]"
            if {"$type$cc" eq "..." && $current == 0} {
                set data(finished) 1
                break
            } else {
                _ungetc 2

#                 # [Spec]
#                 # Since people perceive the "-" indicator as indentation,
#                 # nested block sequences may be indented by one less space
#                 # to compensate, except, of course,
#                 # if nested inside another block sequence.
#                 incr current
            }
        }
        if {$type eq ""  || $current <= $indent} { ; # end document







|















|







323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
            if {"$type$cc" eq "---" && $current == 0} {
                set result {}
                continue
            } else {
                _ungetc 2

                # [Spec]
                # Since people perceive theg-hindicator as indentation,
                # nested block sequences may be indented by one less space
                # to compensate, except, of course,
                # if nested inside another block sequence.
                incr current
            }
        }
        if {$type eq "."} {
            set cc "[_getc][_getc]"
            if {"$type$cc" eq "..." && $current == 0} {
                set data(finished) 1
                break
            } else {
                _ungetc 2

#                 # [Spec]
#                 # Since people perceive theg-hindicator as indentation,
#                 # nested block sequences may be indented by one less space
#                 # to compensate, except, of course,
#                 # if nested inside another block sequence.
#                 incr current
            }
        }
        if {$type eq ""  || $current <= $indent} { ; # end document
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
                }
            }
            "&" { ; # node's anchor property
                set anchor [_getToken]
            }
            "*" { ; # alias node
                set alias [_getToken]
                if {$data(validate)} {
                    set status "ALIAS"
                    set value *$alias
                } else {
                    set value [_getAnchor $alias]
                }
            }
            "!" { ; # node's tag







|







389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
                }
            }
            "&" { ; # node's anchor property
                set anchor [_getToken]
            }
            "*" { ; # alias node
                set alias [_getToken]
                if {$yaml::data(validate)} {
                    set status "ALIAS"
                    set value *$alias
                } else {
                    set value [_getAnchor $alias]
                }
            }
            "!" { ; # node's tag
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646

            if {$line ne "" && [string index $line 0] ne "#"} {
                break
            }
            append lb "\n"
        }
        set lb [string range $lb 1 end]
        if {!$data(finished)} {
            _setpos $fpos
        }
        if {$start == $data(start)} {
            return $result
        }
        if {$base <= $indent} {
            if {$lb eq ""} {







|







621
622
623
624
625
626
627
628
629
630
631
632
633
634
635

            if {$line ne "" && [string index $line 0] ne "#"} {
                break
            }
            append lb "\n"
        }
        set lb [string range $lb 1 end]
        if {!$yaml::data(finished)} {
            _setpos $fpos
        }
        if {$start == $data(start)} {
            return $result
        }
        if {$base <= $indent} {
            if {$lb eq ""} {
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
proc ::yaml::_getAnchor {anchor} {
    variable data
    if {![info exists data(anchor:$anchor)]} {error [_getErrorMessage ANCHOR_NOT_FOUND]}
    return  $data(anchor:$anchor)
}

proc ::yaml::_getErrorMessage {ID {p1 ""}} {
    variable errors
    set num [_getLineNum]
    if {$p1 != ""} {
        return "line($num): [subst -nobackslashes -nocommands $errors($ID)]"
    } else {
        return "line($num): $errors($ID)"
    }
}

# Finds and returns the indentation of a YAML line
proc ::yaml::_getIndent {line} {
    set match [regexp -inline -- {^\s{1,}} " $line"]
    return [expr {[string length $match] - 3}]
}


################
## Dumpers    ##
################

proc ::yaml::_imp_huddle2yaml {data {offset ""}} {
    variable _dumpIndent
    set nextoff "$offset[string repeat { } $_dumpIndent]"
    switch -- [huddle type $data] {
        "string" {
            set data [huddle get_stripped $data]
            return [_dumpScalar $data $offset]
        }
        "list" {
            set inner {}







<


|

|















<
|







1091
1092
1093
1094
1095
1096
1097

1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117

1118
1119
1120
1121
1122
1123
1124
1125
proc ::yaml::_getAnchor {anchor} {
    variable data
    if {![info exists data(anchor:$anchor)]} {error [_getErrorMessage ANCHOR_NOT_FOUND]}
    return  $data(anchor:$anchor)
}

proc ::yaml::_getErrorMessage {ID {p1 ""}} {

    set num [_getLineNum]
    if {$p1 != ""} {
        return "line($num): [subst -nobackslashes -nocommands $yaml::errors($ID)]"
    } else {
        return "line($num): $yaml::errors($ID)"
    }
}

# Finds and returns the indentation of a YAML line
proc ::yaml::_getIndent {line} {
    set match [regexp -inline -- {^\s{1,}} " $line"]
    return [expr {[string length $match] - 3}]
}


################
## Dumpers    ##
################

proc ::yaml::_imp_huddle2yaml {data {offset ""}} {

    set nextoff "$offset[string repeat { } $yaml::_dumpIndent]"
    switch -- [huddle type $data] {
        "string" {
            set data [huddle get_stripped $data]
            return [_dumpScalar $data $offset]
        }
        "list" {
            set inner {}

Changes to modules/yaml/yaml.test.

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
    }
    error
}

# ------------

test yaml-21.0.06eef112da {ticket 06eef112da} -body {
    yaml::yaml2dict -file [asset 06eef112da.data]
} -result {{} {} {alpha 43 beta {houston {{}} newyork {{{} aaa}}}}}

# ------------
# error  .....

test yaml-1.1 "error" -body {
    set error1 {
---
- [name        , \{hr: avg \[\hr: avg\} \] ]
}
    set code [catch {yaml::yaml2dict $error1} msg]
    concat $code $msg
} -result [concat 1 line(3): $::yaml::errors(MAPEND_NOT_IN_MAP)]

test yaml-1.2 "error" -body {
    set error2 {
---
- [name        , \[hr: avg \{\hr: avg\] \} ]
}
    set code [catch {yaml::yaml2dict $error2} msg]
    concat $code $msg
} -result [concat 1 line(3): $::yaml::errors(SEQEND_NOT_IN_SEQ)]

test yaml-1.3 "error" -body {
    set error3 {
---
- Clark 
- @Brian 
}
    set code [catch {yaml::yaml2dict $error3} msg]
    concat $code $msg
} -result [concat 1 line(4): $::yaml::errors(AT_IN_PLAIN)]

test yaml-1.4 "error" -body {
    set error4 {
---
- Clark 
- `Brian 
}
    set code [catch {yaml::yaml2dict $error4} msg]
    concat $code $msg
} -result [concat 1 line(4): $::yaml::errors(BT_IN_PLAIN)]

test yaml-1.5 "error" -body {
    set error5 {
---
- Clark 
- 	Brian 
}
    set code [catch {yaml::yaml2dict $error5} msg]
    concat $code $msg
} -result [concat 1 line(4): $::yaml::errors(TAB_IN_PLAIN)]

test yaml-1.6 "error" -body {
    set error6 {
---
- *a
- Brian 
- @a Geoge
}
    set code [catch {yaml::yaml2dict $error6} msg]
    concat $code $msg
} -result [concat 1 line(4): $::yaml::errors(ANCHOR_NOT_FOUND)]

test yaml-1.7 "error" -body {
    set error7 {
---
- "Clark 
- Brian 
}
    set code [catch {yaml::yaml2dict $error7} msg]
    concat $code $msg
} -result [concat 1 line(3): $::yaml::errors(MALFORM_D_QUOTE)]

test yaml-1.8 "error" -body {
    set error8 {
---
- 'Clark 
- Brian 
}
    set code [catch {yaml::yaml2dict $error8} msg]
    concat $code $msg
} -result [concat 1 line(3): $::yaml::errors(MALFORM_S_QUOTE)]

test yaml-1.9 "error" -body {
    set error9 {
---
- !!invalidtag Clark 
- Brian 
}
    set code [catch {yaml::yaml2dict $error9} msg]
    concat $code $msg
} -result [concat 1 {line(4): The "!!invalidtag" handle wasn't declared.}]

test yaml-1.10 "error" -body {
    set error10 {
---
- Clark 
<<
  - Brian 
}
    set code [catch {yaml::yaml2dict $error10} msg]
    concat $code $msg
} -result [concat 1 line(5): $::yaml::errors(INVALID_MERGE_KEY)]



# -----------
# flow  .....









|












|








|









|









|









|










|









|









|




















|







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
    }
    error
}

# ------------

test yaml-21.0.06eef112da {ticket 06eef112da} -body {
    yaml::yaml2dict -file [localPath 06eef112da.data]
} -result {{} {} {alpha 43 beta {houston {{}} newyork {{{} aaa}}}}}

# ------------
# error  .....

test yaml-1.1 "error" -body {
    set error1 {
---
- [name        , \{hr: avg \[\hr: avg\} \] ]
}
    set code [catch {yaml::yaml2dict $error1} msg]
    concat $code $msg
} -result [concat 1 line(3): $yaml::errors(MAPEND_NOT_IN_MAP)]

test yaml-1.2 "error" -body {
    set error2 {
---
- [name        , \[hr: avg \{\hr: avg\] \} ]
}
    set code [catch {yaml::yaml2dict $error2} msg]
    concat $code $msg
} -result [concat 1 line(3): $yaml::errors(SEQEND_NOT_IN_SEQ)]

test yaml-1.3 "error" -body {
    set error3 {
---
- Clark 
- @Brian 
}
    set code [catch {yaml::yaml2dict $error3} msg]
    concat $code $msg
} -result [concat 1 line(4): $yaml::errors(AT_IN_PLAIN)]

test yaml-1.4 "error" -body {
    set error4 {
---
- Clark 
- `Brian 
}
    set code [catch {yaml::yaml2dict $error4} msg]
    concat $code $msg
} -result [concat 1 line(4): $yaml::errors(BT_IN_PLAIN)]

test yaml-1.5 "error" -body {
    set error5 {
---
- Clark 
- 	Brian 
}
    set code [catch {yaml::yaml2dict $error5} msg]
    concat $code $msg
} -result [concat 1 line(4): $yaml::errors(TAB_IN_PLAIN)]

test yaml-1.6 "error" -body {
    set error6 {
---
- *a
- Brian 
- @a Geoge
}
    set code [catch {yaml::yaml2dict $error6} msg]
    concat $code $msg
} -result [concat 1 line(4): $yaml::errors(ANCHOR_NOT_FOUND)]

test yaml-1.7 "error" -body {
    set error7 {
---
- "Clark 
- Brian 
}
    set code [catch {yaml::yaml2dict $error7} msg]
    concat $code $msg
} -result [concat 1 line(3): $yaml::errors(MALFORM_D_QUOTE)]

test yaml-1.8 "error" -body {
    set error8 {
---
- 'Clark 
- Brian 
}
    set code [catch {yaml::yaml2dict $error8} msg]
    concat $code $msg
} -result [concat 1 line(3): $yaml::errors(MALFORM_S_QUOTE)]

test yaml-1.9 "error" -body {
    set error9 {
---
- !!invalidtag Clark 
- Brian 
}
    set code [catch {yaml::yaml2dict $error9} msg]
    concat $code $msg
} -result [concat 1 {line(4): The "!!invalidtag" handle wasn't declared.}]

test yaml-1.10 "error" -body {
    set error10 {
---
- Clark 
<<
  - Brian 
}
    set code [catch {yaml::yaml2dict $error10} msg]
    concat $code $msg
} -result [concat 1 line(5): $yaml::errors(INVALID_MERGE_KEY)]



# -----------
# flow  .....


758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
- |-
  tklib: A library of all-Tcl routines for Tk
  tclapps: A set of little apps for Tcl or Tk, to be used as examples, or just for fun
  tclbench: A benchmarking suite for Tcl and Tk
}


test yaml-21.1 "explicit_tags float" -body {
    set y {!!float 123}
    yaml::yaml2dict $y
} -result {123.0}

test yaml-21.2 "explicit_tags float" -body {
    set y {!!float 123.0}
    yaml::yaml2dict $y
} -result {123.0}

test yaml-21.2 "explicit_tags float" -body {
    set y {!!float 123_0}
    yaml::yaml2dict $y
} -returnCodes error -result {expected floating-point number but got "123_0"}


# ... Tests of addStrings ...
#     (Requires introspection of parser state)


if [info exists selfrun] {
    tcltest::cleanupTests
} else {
    testsuiteCleanup
}








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<











758
759
760
761
762
763
764















765
766
767
768
769
770
771
772
773
774
775
- |-
  tklib: A library of all-Tcl routines for Tk
  tclapps: A set of little apps for Tcl or Tk, to be used as examples, or just for fun
  tclbench: A benchmarking suite for Tcl and Tk
}


















# ... Tests of addStrings ...
#     (Requires introspection of parser state)


if [info exists selfrun] {
    tcltest::cleanupTests
} else {
    testsuiteCleanup
}

Changes to modules/zip/decode.man.

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
[vset ZIP_DECODE_VERSION 0.7.1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin zipfile::decode n [vset ZIP_DECODE_VERSION]]
[keywords decompression zip]
[copyright {2008-2016 Andreas Kupries}]
[moddesc {Zip archive handling}]
[titledesc {Access to zip archives}]
[category  File]
[require Tcl 8.4]

[require fileutil::decode 0.2.1]
[require Trf]
[require zlibtcl]
[require zipfile::decode [opt [vset ZIP_DECODE_VERSION]]]
[description]
[para]

Note: packages Trf and zlibtcl are not required if TCL 8.6 is available.

This package provides commands to decompress and access the contents
of zip archives.

[section API]

[list_begin definitions]
[comment ---------------------------------------------------------------------]









>







<
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17


18
19
20
21
22
23
24
[vset ZIP_DECODE_VERSION 0.7.1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin zipfile::decode n [vset ZIP_DECODE_VERSION]]
[keywords decompression zip]
[copyright {2008-2016 Andreas Kupries}]
[moddesc {Zip archive handling}]
[titledesc {Access to zip archives}]
[category  File]
[require Tcl 8.4]
[require fileutil::magic::mimetype]
[require fileutil::decode 0.2.1]
[require Trf]
[require zlibtcl]
[require zipfile::decode [opt [vset ZIP_DECODE_VERSION]]]
[description]
[para]



This package provides commands to decompress and access the contents
of zip archives.

[section API]

[list_begin definitions]
[comment ---------------------------------------------------------------------]
128
129
130
131
132
133
134
135
136
[arg archive] file in the given destination directory [arg dstdir].

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

[list_end]

[vset CATEGORY zipfile]
[include ../common-text/feedback.inc]
[manpage_end]







|

127
128
129
130
131
132
133
134
135
[arg archive] file in the given destination directory [arg dstdir].

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

[list_end]

[vset CATEGORY zipfile]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/zip/decode.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- tcl -*-
# ### ### ### ######### ######### #########
## Copyright (c) 2008-2012 ActiveState Software Inc., Andreas Kupries
##                    2016 Andreas Kupries
## BSD License
##
# Package providing commands for the decoding of basic zip-file
# structures.

package require Tcl 8.4
# HaO 2020-11-24 I don't see why this is helpful, so commented out
# package require fileutil::magic::filetype ; # Tcllib. File type determination via magic constants
package require fileutil::decode 0.2.1    ; # Framework for easy decoding of files.
namespace eval ::zipfile::decode {}
if {[package vcompare $tcl_patchLevel "8.6"] < 0} {
  # Only needed pre-8.6
  package require Trf                       ; # Wrapper to zlib
  package require zlibtcl                   ; # Zlib usage. No commands, access through Trf
  set ::zipfile::decode::native_zip_functs 0










<
|







1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18
# -*- tcl -*-
# ### ### ### ######### ######### #########
## Copyright (c) 2008-2012 ActiveState Software Inc., Andreas Kupries
##                    2016 Andreas Kupries
## BSD License
##
# Package providing commands for the decoding of basic zip-file
# structures.

package require Tcl 8.4

package require fileutil::magic::filetype ; # Tcllib. File type determination via magic constants
package require fileutil::decode 0.2.1    ; # Framework for easy decoding of files.
namespace eval ::zipfile::decode {}
if {[package vcompare $tcl_patchLevel "8.6"] < 0} {
  # Only needed pre-8.6
  package require Trf                       ; # Wrapper to zlib
  package require zlibtcl                   ; # Zlib usage. No commands, access through Trf
  set ::zipfile::decode::native_zip_functs 0
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109

proc ::zipfile::decode::files {zdict} {
    array set _ $zdict
    array set f $_(files)
    return [array names f]
}


proc ::zipfile::decode::filelocations zdict {
    set res {}
    foreach {fname finfo} [dict get $zdict files] {
	set start [dict get $finfo fileloc]
	set size [dict get $finfo csize]
	lappend res $start $size $fname
    }
    set res [lsort -stride 3 -index 0 -integer $res[set res {}]]
    return $res
}

proc ::zipfile::decode::hasfile {zdict fname} {
    array set _ $zdict
    array set f $_(files)
    return [info exists f($fname)]
}

proc ::zipfile::decode::copyfile {zdict src dst} {







<
<
<
<
<
<
<
<
<
<
<
<







83
84
85
86
87
88
89












90
91
92
93
94
95
96

proc ::zipfile::decode::files {zdict} {
    array set _ $zdict
    array set f $_(files)
    return [array names f]
}













proc ::zipfile::decode::hasfile {zdict fname} {
    array set _ $zdict
    array set f $_(files)
    return [info exists f($fname)]
}

proc ::zipfile::decode::copyfile {zdict src dst} {
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
    if {![info exists f($src)]} {
	Error "File \"$src\" not known" BAD PATH
    }

    array set fd $f($src)
    return [GetFile $src fd]
}


proc ::zipfile::decode::unzip {zdict dst} {
    array set _ $zdict
    array set f $_(files)

    foreach src [array names f] {
	array set     fd $f($src)







<







113
114
115
116
117
118
119

120
121
122
123
124
125
126
    if {![info exists f($src)]} {
	Error "File \"$src\" not known" BAD PATH
    }

    array set fd $f($src)
    return [GetFile $src fd]
}


proc ::zipfile::decode::unzip {zdict dst} {
    array set _ $zdict
    array set f $_(files)

    foreach src [array names f] {
	array set     fd $f($src)
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
	    go     $fd(fileloc)
	    nbytes $fd(csize)
	    return [getval]
	}
	deflate {
	    go     $fd(fileloc)
	    nbytes $fd(csize)
	    if {$::zipfile::decode::native_zip_functs} {
		return [zlib inflate [getval]]
	    } else {
		return [zip -mode decompress -nowrap 1 -- [getval]]
	    }
	}
	default {
	    Error "Unable to handle file \"$src\" compressed with method \"$fd(cm)\"" \
		BAD COMPRESSION
	}
    }








<
<
<
|
<







227
228
229
230
231
232
233



234

235
236
237
238
239
240
241
	    go     $fd(fileloc)
	    nbytes $fd(csize)
	    return [getval]
	}
	deflate {
	    go     $fd(fileloc)
	    nbytes $fd(csize)



	    return [zip -mode decompress -nowrap 1 -- [getval]]

	}
	default {
	    Error "Unable to handle file \"$src\" compressed with method \"$fd(cm)\"" \
		BAD COMPRESSION
	}
    }

711
712
713
714
715
716
717
718
719
    #--------------
    ::close $fd
    return [array get cb]
}

# ### ### ### ######### ######### #########
## Ready
package provide zipfile::decode 0.7.3
return







|

693
694
695
696
697
698
699
700
701
    #--------------
    ::close $fd
    return [array get cb]
}

# ### ### ### ######### ######### #########
## Ready
package provide zipfile::decode 0.7.1
return

Changes to modules/zip/encode.man.

84
85
86
87
88
89
90
91
92
specific order was documented. It was lexicographically sorted. The
change was made to support [cmd zip]-based file formats which require
a specific order of files in the archive, for example [file .epub].

[list_end]

[vset CATEGORY zipfile]
[include ../common-text/feedback.inc]
[manpage_end]







|

84
85
86
87
88
89
90
91
92
specific order was documented. It was lexicographically sorted. The
change was made to support [cmd zip]-based file formats which require
a specific order of files in the archive, for example [file .epub].

[list_end]

[vset CATEGORY zipfile]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/zip/mkzip.man.

1
2
3
4
5
6
7
8
[vset ZIP_mkzip_VERSION 1.2.1]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin zipfile::mkzip n [vset ZIP_mkzip_VERSION]]
[keywords decompression zip]
[copyright {2009 Pat Thoyts}]
[moddesc {Zip archive creation}]
[titledesc {Build a zip archive}]
[category  File]
|







1
2
3
4
5
6
7
8
[vset ZIP_mkzip_VERSION 1.2]
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin zipfile::mkzip n [vset ZIP_mkzip_VERSION]]
[keywords decompression zip]
[copyright {2009 Pat Thoyts}]
[moddesc {Zip archive creation}]
[titledesc {Build a zip archive}]
[category  File]
96
97
98
99
100
101
102
103
104
is specified.

[list_end]

[list_end]

[vset CATEGORY zipfile]
[include ../common-text/feedback.inc]
[manpage_end]







|

96
97
98
99
100
101
102
103
104
is specified.

[list_end]

[list_end]

[vset CATEGORY zipfile]
[include ../doctools2base/include/feedback.inc]
[manpage_end]

Changes to modules/zip/mkzip.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- tcl -*-
# mkzip.tcl -- Copyright (C) 2009 Pat Thoyts <patthoyts@users.sourceforge.net>
#
#        Create ZIP archives in Tcl.
#
# Create a zipkit using mkzip filename.zkit -zipkit -directory xyz.vfs
# or a zipfile using mkzip filename.zip -directory dirname -exclude "*~"
#
## BSD License
##
# Package providing commands for the generation of a zip archive.
# version 1.2.1

package require Tcl 8.6

namespace eval ::zipfile {}
namespace eval ::zipfile::decode {}
namespace eval ::zipfile::encode {}
namespace eval ::zipfile::mkzip {}











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- tcl -*-
# mkzip.tcl -- Copyright (C) 2009 Pat Thoyts <patthoyts@users.sourceforge.net>
#
#        Create ZIP archives in Tcl.
#
# Create a zipkit using mkzip filename.zkit -zipkit -directory xyz.vfs
# or a zipfile using mkzip filename.zip -directory dirname -exclude "*~"
#
## BSD License
##
# Package providing commands for the generation of a zip archive.
# version 1.2

package require Tcl 8.6

namespace eval ::zipfile {}
namespace eval ::zipfile::decode {}
namespace eval ::zipfile::encode {}
namespace eval ::zipfile::mkzip {}
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
#        a set of glob expressions to match against files and to avoid.
#        The match arg is internal.
#        eg: walk library {CVS/* *~ .#*} to exclude CVS and emacs cruft.
#
proc ::zipfile::mkzip::walk {base {excludes ""} {match *} {path {}}} {
    set result {}
    set imatch [file join $path $match]
    set files [glob -nocomplain -tails -types f -directory $base -- $imatch]
    foreach file $files {
        set excluded 0
        foreach glob $excludes {
            if {[string match $glob $file]} {
                set excluded 1
                break
            }
        }
        if {!$excluded} {lappend result $file}
    }
    foreach dir [glob -nocomplain -tails -types d -directory $base -- $imatch] {
        set subdir [walk $base $excludes $match $dir]
        if {[llength $subdir]>0} {
            set result [concat $result [list $dir] $subdir]
        }
    }
    return $result
}







|










|







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
#        a set of glob expressions to match against files and to avoid.
#        The match arg is internal.
#        eg: walk library {CVS/* *~ .#*} to exclude CVS and emacs cruft.
#
proc ::zipfile::mkzip::walk {base {excludes ""} {match *} {path {}}} {
    set result {}
    set imatch [file join $path $match]
    set files [glob -nocomplain -tails -types f -directory $base $imatch]
    foreach file $files {
        set excluded 0
        foreach glob $excludes {
            if {[string match $glob $file]} {
                set excluded 1
                break
            }
        }
        if {!$excluded} {lappend result $file}
    }
    foreach dir [glob -nocomplain -tails -types d -directory $base $imatch] {
        set subdir [walk $base $excludes $match $dir]
        if {[llength $subdir]>0} {
            set result [concat $result [list $dir] $subdir]
        }
    }
    return $result
}
275
276
277
278
279
280
281
282
  close $zf

  return
}

# ### ### ### ######### ######### #########
## Ready
package provide zipfile::mkzip 1.2.1







|
275
276
277
278
279
280
281
282
  close $zf

  return
}

# ### ### ### ######### ######### #########
## Ready
package provide zipfile::mkzip 1.2

Deleted modules/zip/mkzip.test.

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
# mkzip.test - Copyright (C) 2019 Andreas Kupries <andreas_kupriess@users.sf.net>

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.6
testsNeedTcltest 2

testing {
    useLocal mkzip.tcl zipfile::mkzip
}

# -------------------------------------------------------------------------

test zipfile-mkzip-mkzip-1.0 {mkzip, wrong args, not enough} -body {
    zipfile::mkzip::mkzip
} -returnCodes error -result {wrong # args: should be "zipfile::mkzip::mkzip filename ?arg ...?"}

test zipfile-mkzip-mkzip-2.0 {mkzip, tkt b9725d990b} -setup {
    tcltest::makeDirectory foo
    tcltest::makeDirectory foo/-1
} -cleanup {
    tcltest::removeDirectory foo
    file delete foo.zip
} -body {
    zipfile::mkzip::mkzip foo.zip -directory foo
} -result {}

# -------------------------------------------------------------------------

testsuiteCleanup

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















































































Changes to modules/zip/pkgIndex.tcl.

1
2
3
4
5
6
7
8
if {![package vsatisfies [package provide Tcl] 8.4]} {return}

package ifneeded zipfile::decode 0.7.3 [list source [file join $dir decode.tcl]]
package ifneeded zipfile::encode 0.4   [list source [file join $dir encode.tcl]]

if {![package vsatisfies [package provide Tcl] 8.6]} {return}

package ifneeded zipfile::mkzip 1.2.1 [list source [file join $dir mkzip.tcl]]


|




|
1
2
3
4
5
6
7
8
if {![package vsatisfies [package provide Tcl] 8.4]} {return}

package ifneeded zipfile::decode 0.7.1 [list source [file join $dir decode.tcl]]
package ifneeded zipfile::encode 0.4   [list source [file join $dir encode.tcl]]

if {![package vsatisfies [package provide Tcl] 8.6]} {return}

package ifneeded zipfile::mkzip 1.2 [list source [file join $dir mkzip.tcl]]

Changes to sak.tcl.

439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
        }

        set bzip [auto_execok bzip2]
        if {$bzip != {}} {
            puts "    Bzipped tarball (${package_nv}.tar.bz2)..."
            exec tar cf - ${package_nv} | bzip2 > ${package_nv}.tar.bz2
        }

	set xz [auto_execok xz]
        if {$xz != {}} {
            puts "    Xzipped tarball (${package_nv}.tar.xz)..."
            exec tar cf - ${package_nv} | xz > ${package_nv}.tar.xz
        }
    }

    set zip [auto_execok zip]
    if {$zip != {}} {
        puts "    Zip archive     (${package_nv}.zip)..."
        catch {
            exec $zip -r ${package_nv}.zip ${package_nv}







<
<
<
<
<
<







439
440
441
442
443
444
445






446
447
448
449
450
451
452
        }

        set bzip [auto_execok bzip2]
        if {$bzip != {}} {
            puts "    Bzipped tarball (${package_nv}.tar.bz2)..."
            exec tar cf - ${package_nv} | bzip2 > ${package_nv}.tar.bz2
        }






    }

    set zip [auto_execok zip]
    if {$zip != {}} {
        puts "    Zip archive     (${package_nv}.zip)..."
        catch {
            exec $zip -r ${package_nv}.zip ${package_nv}

Changes to support/devel/all.tcl.

192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
	set ::auto_path [pSet ::auto_path]

	namespace import ::tcltest::*
	set ::tcltest::testSingleFile false
	set ::tcltest::testsDirectory [pSet ::tcltest::testsDirectory]

	# configure not present in tcltest 1.x
	if {[catch {::tcltest::configure -verbose {
	    body skip start error pass usec line
	}}]} {
	    # ^ body skip start error pass usec line
	    set ::tcltest::verbose psb ;# pass skip body
	}
    }

    interp alias \
	    $c ::tcltest::cleanupTestsHook \
	    {} ::tcltest::cleanupTestsHook $c








|
<
<
<
|







192
193
194
195
196
197
198
199



200
201
202
203
204
205
206
207
	set ::auto_path [pSet ::auto_path]

	namespace import ::tcltest::*
	set ::tcltest::testSingleFile false
	set ::tcltest::testsDirectory [pSet ::tcltest::testsDirectory]

	# configure not present in tcltest 1.x
	if {[catch {::tcltest::configure -verbose bstep}]} {



	    set ::tcltest::verbose psb
	}
    }

    interp alias \
	    $c ::tcltest::cleanupTestsHook \
	    {} ::tcltest::cleanupTestsHook $c

Changes to support/devel/sak/doc/doc_auto.tcl.

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
    upvar 1 $kv kwic $nv name
    # kwic: keyword -> list (files)
    # name: file    -> label

    TagsBegin
    Tag+ index_begin [list {Keyword Index} {}]

    # For a good display we sort keywords in dictionary order.
    # We ignore their leading non-alphanumeric characters.
    set kwlist {}
    foreach kw [array names kwic] {
	set kwx [string trim [regsub -all {^[^a-zA-Z0-9]+} $kw {}]]
	lappend kwlist [list $kwx $kw]
    }
    foreach item [lsort -index 0 -dict $kwlist] {
	foreach {_ kw} $item break
	set tmp [Sortable $kwic($kw) name max _]

	Tag+ key [list $kw]
	foreach item [lsort -dict -index 0 $tmp] {
	    foreach {label file} $item break
	    Tag+ manpage [FmtR max $file] [list $label]
	}







|
<
<
|
<
<
<
<
<







87
88
89
90
91
92
93
94


95





96
97
98
99
100
101
102
    upvar 1 $kv kwic $nv name
    # kwic: keyword -> list (files)
    # name: file    -> label

    TagsBegin
    Tag+ index_begin [list {Keyword Index} {}]

    # Handle the keywords in dictionary order for nice display.


    foreach kw [lsort -dict [array names kwic]] {





	set tmp [Sortable $kwic($kw) name max _]

	Tag+ key [list $kw]
	foreach item [lsort -dict -index 0 $tmp] {
	    foreach {label file} $item break
	    Tag+ manpage [FmtR max $file] [list $label]
	}

Changes to support/devel/sak/doc/kwic.txt.

1















2
3
4
5
6
7
8
[index_begin {Keyword Index} {}]















[key 3DES]
[manpage modules/des/des.man      des]
[manpage modules/des/tcldes.man   tclDES]
[manpage modules/des/tcldesjr.man tclDESjr]
[key {abstract syntax tree}]
[manpage modules/grammar_me/me_util.man grammar::me::util]
[manpage modules/grammar_me/me_ast.man  grammar::me_ast]

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[index_begin {Keyword Index} {}]
[key .ddt]
[manpage modules/docstrip/docstrip_util.man docstrip_util]
[key .dtx]
[manpage modules/docstrip/docstrip.man      docstrip]
[manpage modules/docstrip/docstrip_util.man docstrip_util]
[manpage apps/tcldocstrip.man               tcldocstrip]
[key /dev/null]
[manpage modules/virtchannel_base/tcllib_null.man tcl::chan::null]
[manpage modules/virtchannel_base/nullzero.man    tcl::chan::nullzero]
[key /dev/random]
[manpage modules/virtchannel_base/tcllib_random.man tcl::chan::random]
[manpage modules/virtchannel_base/randseed.man      tcl::randomseed]
[key /dev/zero]
[manpage modules/virtchannel_base/nullzero.man    tcl::chan::nullzero]
[manpage modules/virtchannel_base/tcllib_zero.man tcl::chan::zero]
[key 3DES]
[manpage modules/des/des.man      des]
[manpage modules/des/tcldes.man   tclDES]
[manpage modules/des/tcldesjr.man tclDESjr]
[key {abstract syntax tree}]
[manpage modules/grammar_me/me_util.man grammar::me::util]
[manpage modules/grammar_me/me_ast.man  grammar::me_ast]
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
[key {class methods}]
[manpage modules/ooutil/ooutil.man oo::util]
[manpage modules/tool/meta.man     oo::util]
[key {class variables}]
[manpage modules/ooutil/ooutil.man oo::util]
[manpage modules/tool/meta.man     oo::util]
[key cleanup]
[manpage modules/defer/defer.man    defer]
[manpage modules/try/tcllib_try.man try]
[key client]
[manpage modules/nns/nns_client.man nameserv]
[manpage modules/nns/nns_auto.man   nameserv::auto]
[manpage modules/nns/nns_common.man nameserv::common]
[manpage apps/nns.man               nns]
[manpage modules/nns/nns_intro.man  nns_intro]







<







351
352
353
354
355
356
357

358
359
360
361
362
363
364
[key {class methods}]
[manpage modules/ooutil/ooutil.man oo::util]
[manpage modules/tool/meta.man     oo::util]
[key {class variables}]
[manpage modules/ooutil/ooutil.man oo::util]
[manpage modules/tool/meta.man     oo::util]
[key cleanup]

[manpage modules/try/tcllib_try.man try]
[key client]
[manpage modules/nns/nns_client.man nameserv]
[manpage modules/nns/nns_auto.man   nameserv::auto]
[manpage modules/nns/nns_common.man nameserv::common]
[manpage apps/nns.man               nns]
[manpage modules/nns/nns_intro.man  nns_intro]
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
[manpage modules/pt/pt_from_api.man              pt_import_api]
[manpage modules/pt/pt_introduction.man          pt_introduction]
[manpage modules/pt/pt_parse_peg.man             pt_parse_peg]
[manpage modules/pt/pt_parser_api.man            pt_parser_api]
[manpage modules/pt/pt_peg_op.man                pt_peg_op]
[key control]
[manpage modules/control/control.man   control]
[manpage modules/math/changepoint.man  math::changepoint]
[manpage modules/term/term.man         term]
[manpage modules/term/ansi_code.man    term::ansi::code]
[manpage modules/term/ansi_cattr.man   term::ansi::code::attr]
[manpage modules/term/ansi_cctrl.man   term::ansi::code::ctrl]
[manpage modules/term/ansi_cmacros.man term::ansi::code::macros]
[manpage modules/term/ansi_ctrlu.man   term::ansi::ctrl::unix]
[manpage modules/term/ansi_send.man    term::ansi::send]







<







472
473
474
475
476
477
478

479
480
481
482
483
484
485
[manpage modules/pt/pt_from_api.man              pt_import_api]
[manpage modules/pt/pt_introduction.man          pt_introduction]
[manpage modules/pt/pt_parse_peg.man             pt_parse_peg]
[manpage modules/pt/pt_parser_api.man            pt_parser_api]
[manpage modules/pt/pt_peg_op.man                pt_peg_op]
[key control]
[manpage modules/control/control.man   control]

[manpage modules/term/term.man         term]
[manpage modules/term/ansi_code.man    term::ansi::code]
[manpage modules/term/ansi_cattr.man   term::ansi::code::attr]
[manpage modules/term/ansi_cctrl.man   term::ansi::code::ctrl]
[manpage modules/term/ansi_cmacros.man term::ansi::code::macros]
[manpage modules/term/ansi_ctrlu.man   term::ansi::ctrl::unix]
[manpage modules/term/ansi_send.man    term::ansi::send]
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
[key {data structures}]
[manpage modules/struct/record.man struct::record]
[key database]
[manpage modules/tie/tie.man     tie]
[manpage modules/tie/tie_std.man tie]
[key dataflow]
[manpage modules/page/page_util_flow.man page_util_flow]
[key .ddt]
[manpage modules/docstrip/docstrip_util.man docstrip_util]
[key DE]
[manpage modules/doctools2idx/idx_msgcat_de.man doctools::msgcat::idx::de]
[manpage modules/doctools2toc/toc_msgcat_de.man doctools::msgcat::toc::de]
[key debug]
[manpage modules/debug/debug.man           debug]
[manpage modules/debug/debug_caller.man    debug::caller]
[manpage modules/debug/debug_heartbeat.man debug::heartbeat]







<
<







617
618
619
620
621
622
623


624
625
626
627
628
629
630
[key {data structures}]
[manpage modules/struct/record.man struct::record]
[key database]
[manpage modules/tie/tie.man     tie]
[manpage modules/tie/tie_std.man tie]
[key dataflow]
[manpage modules/page/page_util_flow.man page_util_flow]


[key DE]
[manpage modules/doctools2idx/idx_msgcat_de.man doctools::msgcat::idx::de]
[manpage modules/doctools2toc/toc_msgcat_de.man doctools::msgcat::toc::de]
[key debug]
[manpage modules/debug/debug.man           debug]
[manpage modules/debug/debug_caller.man    debug::caller]
[manpage modules/debug/debug_heartbeat.man debug::heartbeat]
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
[key deserialization]
[manpage modules/doctools2idx/import_docidx.man   doctools::idx::import::docidx]
[manpage modules/doctools2idx/idx_import_json.man doctools::idx::import::json]
[manpage modules/doctools2idx/idx_structure.man   doctools::idx::structure]
[manpage modules/doctools2toc/import_doctoc.man   doctools::toc::import::doctoc]
[manpage modules/doctools2toc/toc_import_json.man doctools::toc::import::json]
[manpage modules/doctools2toc/toc_structure.man   doctools::toc::structure]
[key /dev/null]
[manpage modules/virtchannel_base/tcllib_null.man tcl::chan::null]
[manpage modules/virtchannel_base/nullzero.man    tcl::chan::nullzero]
[key /dev/random]
[manpage modules/virtchannel_base/tcllib_random.man tcl::chan::random]
[manpage modules/virtchannel_base/randseed.man      tcl::randomseed]
[key /dev/zero]
[manpage modules/virtchannel_base/nullzero.man    tcl::chan::nullzero]
[manpage modules/virtchannel_base/tcllib_zero.man tcl::chan::zero]
[key diameter]
[manpage modules/struct/graphops.man struct::graph::op]
[key dict]
[manpage modules/dicttool/dicttool.man dicttool]
[key diff]
[manpage modules/docstrip/docstrip_util.man docstrip_util]
[manpage modules/struct/struct_list.man     struct::list]
[key {diff -n format}]
[manpage modules/rcs/rcs.man rcs]
[key {diff -ruN}]
[manpage modules/textutil/patch.man textutil::patch]
[key {diff, unified format}]
[manpage modules/textutil/patch.man textutil::patch]
[key difference]
[manpage modules/struct/struct_set.man struct::set]
[key differential]
[manpage modules/struct/struct_list.man struct::list]
[key {differential equations}]
[manpage modules/math/calculus.man math::calculus]
[key digital]
[manpage modules/math/filtergen.man math::filters]
[key dijkstra]
[manpage modules/struct/graphops.man struct::graph::op]
[key {directory access}]
[manpage modules/ldap/ldap.man  ldap]
[manpage modules/ldap/ldapx.man ldapx]
[key {directory traversal}]
[manpage modules/fileutil/traverse.man fileutil_traverse]







<
<
<
<
<
<
<
<
<









<
<
<
<






<
<







665
666
667
668
669
670
671









672
673
674
675
676
677
678
679
680




681
682
683
684
685
686


687
688
689
690
691
692
693
[key deserialization]
[manpage modules/doctools2idx/import_docidx.man   doctools::idx::import::docidx]
[manpage modules/doctools2idx/idx_import_json.man doctools::idx::import::json]
[manpage modules/doctools2idx/idx_structure.man   doctools::idx::structure]
[manpage modules/doctools2toc/import_doctoc.man   doctools::toc::import::doctoc]
[manpage modules/doctools2toc/toc_import_json.man doctools::toc::import::json]
[manpage modules/doctools2toc/toc_structure.man   doctools::toc::structure]









[key diameter]
[manpage modules/struct/graphops.man struct::graph::op]
[key dict]
[manpage modules/dicttool/dicttool.man dicttool]
[key diff]
[manpage modules/docstrip/docstrip_util.man docstrip_util]
[manpage modules/struct/struct_list.man     struct::list]
[key {diff -n format}]
[manpage modules/rcs/rcs.man rcs]




[key difference]
[manpage modules/struct/struct_set.man struct::set]
[key differential]
[manpage modules/struct/struct_list.man struct::list]
[key {differential equations}]
[manpage modules/math/calculus.man math::calculus]


[key dijkstra]
[manpage modules/struct/graphops.man struct::graph::op]
[key {directory access}]
[manpage modules/ldap/ldap.man  ldap]
[manpage modules/ldap/ldapx.man ldapx]
[key {directory traversal}]
[manpage modules/fileutil/traverse.man fileutil_traverse]
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
[manpage modules/tepam/tepam_doc_gen.man        tepam::doc_gen]
[key DOM]
[manpage modules/treeql/treeql.man treeql]
[key dom]
[manpage modules/amazon-s3/xsxp.man xsxp]
[key {domain name service}]
[manpage modules/dns/tcllib_dns.man dns]
[key .dtx]
[manpage modules/docstrip/docstrip.man      docstrip]
[manpage modules/docstrip/docstrip_util.man docstrip_util]
[manpage apps/tcldocstrip.man               tcldocstrip]
[key e]
[manpage modules/math/constants.man math::constants]
[key EAN]
[manpage modules/valtype/ean13.man valtype::gs1::ean13]
[manpage modules/valtype/isbn.man  valtype::isbn]
[key EAN13]
[manpage modules/valtype/ean13.man valtype::gs1::ean13]







<
<
<
<







855
856
857
858
859
860
861




862
863
864
865
866
867
868
[manpage modules/tepam/tepam_doc_gen.man        tepam::doc_gen]
[key DOM]
[manpage modules/treeql/treeql.man treeql]
[key dom]
[manpage modules/amazon-s3/xsxp.man xsxp]
[key {domain name service}]
[manpage modules/dns/tcllib_dns.man dns]




[key e]
[manpage modules/math/constants.man math::constants]
[key EAN]
[manpage modules/valtype/ean13.man valtype::gs1::ean13]
[manpage modules/valtype/isbn.man  valtype::isbn]
[key EAN13]
[manpage modules/valtype/ean13.man valtype::gs1::ean13]
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
[manpage modules/fileutil/multi.man    fileutil::multi]
[manpage modules/fileutil/multiop.man  fileutil::multi::op]
[key filesystem]
[manpage modules/map/map_slippy_cache.man map::slippy::cache]
[key filter]
[manpage modules/generator/generator.man generator]
[manpage modules/struct/struct_list.man  struct::list]
[key filtering]
[manpage modules/math/filtergen.man math::filters]
[key final]
[manpage modules/try/tcllib_try.man try]
[key finance]
[manpage modules/valtype/cc_amex.man       valtype::creditcard::amex]
[manpage modules/valtype/cc_discover.man   valtype::creditcard::discover]
[manpage modules/valtype/cc_mastercard.man valtype::creditcard::mastercard]
[manpage modules/valtype/cc_visa.man       valtype::creditcard::visa]







<
<







1097
1098
1099
1100
1101
1102
1103


1104
1105
1106
1107
1108
1109
1110
[manpage modules/fileutil/multi.man    fileutil::multi]
[manpage modules/fileutil/multiop.man  fileutil::multi::op]
[key filesystem]
[manpage modules/map/map_slippy_cache.man map::slippy::cache]
[key filter]
[manpage modules/generator/generator.man generator]
[manpage modules/struct/struct_list.man  struct::list]


[key final]
[manpage modules/try/tcllib_try.man try]
[key finance]
[manpage modules/valtype/cc_amex.man       valtype::creditcard::amex]
[manpage modules/valtype/cc_discover.man   valtype::creditcard::discover]
[manpage modules/valtype/cc_mastercard.man valtype::creditcard::mastercard]
[manpage modules/valtype/cc_visa.man       valtype::creditcard::visa]
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
[manpage modules/textutil/adjust.man               textutil::adjust]
[manpage modules/textutil/textutil_string.man      textutil::string]
[manpage modules/textutil/tabify.man               textutil::tabify]
[key {formatting engine}]
[manpage modules/doctools/docidx_plugin_apiref.man   docidx_plugin_apiref]
[manpage modules/doctools/doctoc_plugin_apiref.man   doctoc_plugin_apiref]
[manpage modules/doctools/doctools_plugin_apiref.man doctools_plugin_apiref]
[key fossil]
[manpage modules/textutil/patch.man textutil::patch]
[key {Fourier transform}]
[manpage modules/math/fourier.man math::fourier]
[key FR]
[manpage modules/doctools2idx/idx_msgcat_fr.man doctools::msgcat::idx::fr]
[manpage modules/doctools2toc/toc_msgcat_fr.man doctools::msgcat::toc::fr]
[key frame]
[manpage modules/term/ansi_cmacros.man term::ansi::code::macros]
[key framework]
[manpage modules/tool/tool.man tool]
[key ftp]
[manpage modules/ftp/ftp.man        ftp]
[manpage modules/ftp/ftp_geturl.man ftp::geturl]
[manpage modules/ftpd/ftpd.man      ftpd]
[manpage modules/uri/uri.man        uri]
[key ftpd]
[manpage modules/ftpd/ftpd.man ftpd]







<
<







<
<







1170
1171
1172
1173
1174
1175
1176


1177
1178
1179
1180
1181
1182
1183


1184
1185
1186
1187
1188
1189
1190
[manpage modules/textutil/adjust.man               textutil::adjust]
[manpage modules/textutil/textutil_string.man      textutil::string]
[manpage modules/textutil/tabify.man               textutil::tabify]
[key {formatting engine}]
[manpage modules/doctools/docidx_plugin_apiref.man   docidx_plugin_apiref]
[manpage modules/doctools/doctoc_plugin_apiref.man   doctoc_plugin_apiref]
[manpage modules/doctools/doctools_plugin_apiref.man doctools_plugin_apiref]


[key {Fourier transform}]
[manpage modules/math/fourier.man math::fourier]
[key FR]
[manpage modules/doctools2idx/idx_msgcat_fr.man doctools::msgcat::idx::fr]
[manpage modules/doctools2toc/toc_msgcat_fr.man doctools::msgcat::toc::fr]
[key frame]
[manpage modules/term/ansi_cmacros.man term::ansi::code::macros]


[key ftp]
[manpage modules/ftp/ftp.man        ftp]
[manpage modules/ftp/ftp_geturl.man ftp::geturl]
[manpage modules/ftpd/ftpd.man      ftpd]
[manpage modules/uri/uri.man        uri]
[key ftpd]
[manpage modules/ftpd/ftpd.man ftpd]
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
[key geography]
[manpage modules/map/map_slippy.man map::slippy]
[key {get character}]
[manpage modules/term/receive.man term::receive]
[key gets]
[manpage modules/coroutine/tcllib_coroutine.man coroutine]
[manpage modules/coroutine/coro_auto.man        coroutine::auto]
[key git]
[manpage modules/textutil/patch.man textutil::patch]
[key global]
[manpage modules/coroutine/tcllib_coroutine.man coroutine]
[manpage modules/coroutine/coro_auto.man        coroutine::auto]
[key golang]
[manpage modules/defer/defer.man defer]
[key gopher]
[manpage modules/uri/uri.man uri]
[key gps]
[manpage modules/gpx/gpx.man   gpx]
[manpage modules/nmea/nmea.man nmea]
[key gpx]
[manpage modules/gpx/gpx.man gpx]







<
<



<
<







1211
1212
1213
1214
1215
1216
1217


1218
1219
1220


1221
1222
1223
1224
1225
1226
1227
[key geography]
[manpage modules/map/map_slippy.man map::slippy]
[key {get character}]
[manpage modules/term/receive.man term::receive]
[key gets]
[manpage modules/coroutine/tcllib_coroutine.man coroutine]
[manpage modules/coroutine/coro_auto.man        coroutine::auto]


[key global]
[manpage modules/coroutine/tcllib_coroutine.man coroutine]
[manpage modules/coroutine/coro_auto.man        coroutine::auto]


[key gopher]
[manpage modules/uri/uri.man uri]
[key gps]
[manpage modules/gpx/gpx.man   gpx]
[manpage modules/nmea/nmea.man nmea]
[key gpx]
[manpage modules/gpx/gpx.man gpx]
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
[key html]
[manpage modules/html/html.man             html]
[manpage modules/htmlparse/htmlparse.man   htmlparse]
[manpage modules/javascript/javascript.man javascript]
[manpage modules/ncgi/ncgi.man             ncgi]
[key http]
[manpage modules/http/autoproxy.man            autoproxy]
[manpage modules/httpd/httpd.man               httpd]
[manpage modules/map/map_geocode_nominatim.man map::geocode::nominatim]
[manpage modules/map/map_slippy_fetcher.man    map::slippy::fetcher]
[manpage modules/uri/uri.man                   uri]
[manpage modules/websocket/websocket.man       websocket]
[key httpd]
[manpage modules/httpd/httpd.man httpd]
[key https]
[manpage modules/uri/uri.man uri]
[key httpserver]
[manpage modules/httpd/httpd.man httpd]
[key huddle]
[manpage modules/yaml/huddle.man huddle]
[manpage modules/yaml/yaml.man   yaml]
[key {human readable}]
[manpage modules/bench/bench_read.man  bench::in]
[manpage modules/bench/bench_wtext.man bench::out::text]
[key hyphenation]







<




<
<
<
<
<
<







1341
1342
1343
1344
1345
1346
1347

1348
1349
1350
1351






1352
1353
1354
1355
1356
1357
1358
[key html]
[manpage modules/html/html.man             html]
[manpage modules/htmlparse/htmlparse.man   htmlparse]
[manpage modules/javascript/javascript.man javascript]
[manpage modules/ncgi/ncgi.man             ncgi]
[key http]
[manpage modules/http/autoproxy.man            autoproxy]

[manpage modules/map/map_geocode_nominatim.man map::geocode::nominatim]
[manpage modules/map/map_slippy_fetcher.man    map::slippy::fetcher]
[manpage modules/uri/uri.man                   uri]
[manpage modules/websocket/websocket.man       websocket]






[key huddle]
[manpage modules/yaml/huddle.man huddle]
[manpage modules/yaml/yaml.man   yaml]
[key {human readable}]
[manpage modules/bench/bench_read.man  bench::in]
[manpage modules/bench/bench_wtext.man bench::out::text]
[key hyphenation]
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
[manpage modules/generator/generator.man       generator]
[manpage modules/map/map_geocode_nominatim.man map::geocode::nominatim]
[manpage modules/map/map_slippy.man            map::slippy]
[manpage modules/map/map_slippy_cache.man      map::slippy::cache]
[manpage modules/map/map_slippy_fetcher.man    map::slippy::fetcher]
[manpage modules/mapproj/mapproj.man           mapproj]
[manpage modules/struct/struct_list.man        struct::list]
[key markdown]
[manpage modules/doctools/doctools.man doctools]
[manpage modules/doctools/docidx.man   doctools::idx]
[manpage modules/doctools/doctoc.man   doctools::toc]
[key markup]
[manpage modules/doctools/docidx_intro.man           docidx_intro]
[manpage modules/doctools/docidx_lang_cmdref.man     docidx_lang_cmdref]
[manpage modules/doctools/docidx_lang_faq.man        docidx_lang_faq]
[manpage modules/doctools/docidx_lang_intro.man      docidx_lang_intro]
[manpage modules/doctools/docidx_lang_syntax.man     docidx_lang_syntax]
[manpage modules/doctools/docidx_plugin_apiref.man   docidx_plugin_apiref]







<
<
<
<







1751
1752
1753
1754
1755
1756
1757




1758
1759
1760
1761
1762
1763
1764
[manpage modules/generator/generator.man       generator]
[manpage modules/map/map_geocode_nominatim.man map::geocode::nominatim]
[manpage modules/map/map_slippy.man            map::slippy]
[manpage modules/map/map_slippy_cache.man      map::slippy::cache]
[manpage modules/map/map_slippy_fetcher.man    map::slippy::fetcher]
[manpage modules/mapproj/mapproj.man           mapproj]
[manpage modules/struct/struct_list.man        struct::list]




[key markup]
[manpage modules/doctools/docidx_intro.man           docidx_intro]
[manpage modules/doctools/docidx_lang_cmdref.man     docidx_lang_cmdref]
[manpage modules/doctools/docidx_lang_faq.man        docidx_lang_faq]
[manpage modules/doctools/docidx_lang_intro.man      docidx_lang_intro]
[manpage modules/doctools/docidx_lang_syntax.man     docidx_lang_syntax]
[manpage modules/doctools/docidx_plugin_apiref.man   docidx_plugin_apiref]
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
[manpage modules/math/constants.man               math::constants]
[manpage modules/math/decimal.man                 math::decimal]
[manpage modules/math/fuzzy.man                   math::fuzzy]
[manpage modules/math/math_geometry.man           math::geometry]
[manpage modules/math/interpolate.man             math::interpolate]
[manpage modules/math/linalg.man                  math::linearalgebra]
[manpage modules/math/optimize.man                math::optimize]
[manpage modules/math/pca.man                     math::PCA]
[manpage modules/math/polynomials.man             math::polynomials]
[manpage modules/math/rational_funcs.man          math::rationalfunctions]
[manpage modules/math/special.man                 math::special]
[manpage modules/math/trig.man                    math::trig]
[manpage modules/simulation/annealing.man         simulation::annealing]
[manpage modules/simulation/montecarlo.man        simulation::montecarlo]
[manpage modules/simulation/simulation_random.man simulation::random]
[key mathematics]
[manpage modules/math/fourier.man     math::fourier]
[manpage modules/math/probopt.man     math::probopt]
[manpage modules/math/quasirandom.man math::quasirandom]
[manpage modules/math/statistics.man  math::statistics]
[key matrices]
[manpage modules/math/linalg.man math::linearalgebra]
[key matrix]
[manpage modules/csv/csv.man        csv]
[manpage modules/math/linalg.man    math::linearalgebra]
[manpage modules/report/report.man  report]
[manpage modules/struct/matrix.man  struct::matrix]







<



<




|
<
<
|







1847
1848
1849
1850
1851
1852
1853

1854
1855
1856

1857
1858
1859
1860
1861


1862
1863
1864
1865
1866
1867
1868
1869
[manpage modules/math/constants.man               math::constants]
[manpage modules/math/decimal.man                 math::decimal]
[manpage modules/math/fuzzy.man                   math::fuzzy]
[manpage modules/math/math_geometry.man           math::geometry]
[manpage modules/math/interpolate.man             math::interpolate]
[manpage modules/math/linalg.man                  math::linearalgebra]
[manpage modules/math/optimize.man                math::optimize]

[manpage modules/math/polynomials.man             math::polynomials]
[manpage modules/math/rational_funcs.man          math::rationalfunctions]
[manpage modules/math/special.man                 math::special]

[manpage modules/simulation/annealing.man         simulation::annealing]
[manpage modules/simulation/montecarlo.man        simulation::montecarlo]
[manpage modules/simulation/simulation_random.man simulation::random]
[key mathematics]
[manpage modules/math/fourier.man    math::fourier]


[manpage modules/math/statistics.man math::statistics]
[key matrices]
[manpage modules/math/linalg.man math::linearalgebra]
[key matrix]
[manpage modules/csv/csv.man        csv]
[manpage modules/math/linalg.man    math::linearalgebra]
[manpage modules/report/report.man  report]
[manpage modules/struct/matrix.man  struct::matrix]
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
[manpage modules/cron/cron.man             cron]
[manpage modules/nettool/nettool.man       nettool]
[manpage modules/processman/processman.man processman]
[key on-idle]
[manpage modules/uev/uevent_onidle.man uevent::onidle]
[key {one time pad}]
[manpage modules/virtchannel_transform/vt_otp.man tcl::transform::otp]
[key oo]
[manpage modules/clay/clay.man clay]
[key optimisation]
[manpage modules/math/probopt.man math::probopt]
[key optimization]
[manpage modules/math/optimize.man        math::optimize]
[manpage modules/simulation/annealing.man simulation::annealing]
[key {ordered list}]
[manpage modules/struct/prioqueue.man struct::prioqueue]
[key otp]
[manpage modules/virtchannel_transform/vt_otp.man tcl::transform::otp]







<
<
<
<







2088
2089
2090
2091
2092
2093
2094




2095
2096
2097
2098
2099
2100
2101
[manpage modules/cron/cron.man             cron]
[manpage modules/nettool/nettool.man       nettool]
[manpage modules/processman/processman.man processman]
[key on-idle]
[manpage modules/uev/uevent_onidle.man uevent::onidle]
[key {one time pad}]
[manpage modules/virtchannel_transform/vt_otp.man tcl::transform::otp]




[key optimization]
[manpage modules/math/optimize.man        math::optimize]
[manpage modules/simulation/annealing.man simulation::annealing]
[key {ordered list}]
[manpage modules/struct/prioqueue.man struct::prioqueue]
[key otp]
[manpage modules/virtchannel_transform/vt_otp.man tcl::transform::otp]
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
[manpage modules/struct/disjointset.man struct::disjointset]
[key passive]
[manpage modules/transfer/connect.man transfer::connect]
[key password]
[manpage modules/otp/otp.man otp]
[key patch]
[manpage modules/docstrip/docstrip_util.man docstrip_util]
[manpage modules/textutil/patch.man         textutil::patch]
[key patching]
[manpage modules/rcs/rcs.man rcs]
[key PCA]
[manpage modules/math/pca.man math::PCA]
[key PEG]
[manpage modules/grammar_me/me_intro.man         grammar::me_intro]
[manpage modules/page/page_util_norm_peg.man     page_util_norm_peg]
[manpage modules/page/page_util_peg.man          page_util_peg]
[manpage apps/pt.man                             pt]
[manpage modules/pt/pt_astree.man                pt::ast]
[manpage modules/pt/pt_cparam_config_critcl.man  pt::cparam::configuration::critcl]







<


<
<







2309
2310
2311
2312
2313
2314
2315

2316
2317


2318
2319
2320
2321
2322
2323
2324
[manpage modules/struct/disjointset.man struct::disjointset]
[key passive]
[manpage modules/transfer/connect.man transfer::connect]
[key password]
[manpage modules/otp/otp.man otp]
[key patch]
[manpage modules/docstrip/docstrip_util.man docstrip_util]

[key patching]
[manpage modules/rcs/rcs.man rcs]


[key PEG]
[manpage modules/grammar_me/me_intro.man         grammar::me_intro]
[manpage modules/page/page_util_norm_peg.man     page_util_norm_peg]
[manpage modules/page/page_util_peg.man          page_util_peg]
[manpage apps/pt.man                             pt]
[manpage modules/pt/pt_astree.man                pt::ast]
[manpage modules/pt/pt_cparam_config_critcl.man  pt::cparam::configuration::critcl]
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
[key prime]
[manpage modules/math/numtheory.man math::numtheory]
[key prioqueue]
[manpage modules/struct/prioqueue.man struct::prioqueue]
[manpage modules/struct/queue.man     struct::queue]
[key {priority queue}]
[manpage modules/struct/prioqueue.man struct::prioqueue]
[key {probabilistic calculations}]
[manpage modules/math/probopt.man math::probopt]
[key proc]
[manpage modules/lambda/lambda.man lambda]
[key procedure]
[manpage modules/interp/deleg_proc.man        deleg_proc]
[manpage modules/tepam/tepam_introduction.man tepam]
[manpage modules/tepam/tepam_procedure.man    tepam::procedure]
[key {procedure documentation}]







<
<







2435
2436
2437
2438
2439
2440
2441


2442
2443
2444
2445
2446
2447
2448
[key prime]
[manpage modules/math/numtheory.man math::numtheory]
[key prioqueue]
[manpage modules/struct/prioqueue.man struct::prioqueue]
[manpage modules/struct/queue.man     struct::queue]
[key {priority queue}]
[manpage modules/struct/prioqueue.man struct::prioqueue]


[key proc]
[manpage modules/lambda/lambda.man lambda]
[key procedure]
[manpage modules/interp/deleg_proc.man        deleg_proc]
[manpage modules/tepam/tepam_introduction.man tepam]
[manpage modules/tepam/tepam_procedure.man    tepam::procedure]
[key {procedure documentation}]
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
[manpage modules/pt/pt_util.man                  pt::util]
[manpage modules/pt/pt_to_api.man                pt_export_api]
[manpage modules/pt/pt_from_api.man              pt_import_api]
[manpage modules/pt/pt_introduction.man          pt_introduction]
[manpage modules/pt/pt_parse_peg.man             pt_parse_peg]
[manpage modules/pt/pt_parser_api.man            pt_parser_api]
[manpage modules/pt/pt_peg_op.man                pt_peg_op]
[key quasi-random]
[manpage modules/math/quasirandom.man math::quasirandom]
[key queue]
[manpage modules/csv/csv.man             csv]
[manpage modules/htmlparse/htmlparse.man htmlparse]
[manpage modules/struct/stack.man        struct::stack]
[manpage modules/transfer/tqueue.man     transfer::copy::queue]
[key quoting]
[manpage modules/page/page_util_quote.man page_util_quote]







<
<







2514
2515
2516
2517
2518
2519
2520


2521
2522
2523
2524
2525
2526
2527
[manpage modules/pt/pt_util.man                  pt::util]
[manpage modules/pt/pt_to_api.man                pt_export_api]
[manpage modules/pt/pt_from_api.man              pt_import_api]
[manpage modules/pt/pt_introduction.man          pt_introduction]
[manpage modules/pt/pt_parse_peg.man             pt_parse_peg]
[manpage modules/pt/pt_parser_api.man            pt_parser_api]
[manpage modules/pt/pt_peg_op.man                pt_peg_op]


[key queue]
[manpage modules/csv/csv.man             csv]
[manpage modules/htmlparse/htmlparse.man htmlparse]
[manpage modules/struct/stack.man        struct::stack]
[manpage modules/transfer/tqueue.man     transfer::copy::queue]
[key quoting]
[manpage modules/page/page_util_quote.man page_util_quote]
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
[key {rfc 1321}]
[manpage modules/md4/md4.man          md4]
[manpage modules/md5/md5.man          md5]
[manpage modules/ripemd/ripemd128.man ripemd128]
[manpage modules/ripemd/ripemd160.man ripemd160]
[key {rfc 1413}]
[manpage modules/ident/ident.man ident]
[key {rfc 1630}]
[manpage modules/uri/uri.man uri]
[key {rfc 1886}]
[manpage modules/dns/tcllib_dns.man dns]
[key {rfc 1939}]
[manpage modules/pop3/pop3.man   pop3]
[manpage modules/pop3d/pop3d.man pop3d]
[key {rfc 2030}]
[manpage modules/ntp/ntp_time.man ntp_time]







<
<







2729
2730
2731
2732
2733
2734
2735


2736
2737
2738
2739
2740
2741
2742
[key {rfc 1321}]
[manpage modules/md4/md4.man          md4]
[manpage modules/md5/md5.man          md5]
[manpage modules/ripemd/ripemd128.man ripemd128]
[manpage modules/ripemd/ripemd160.man ripemd160]
[key {rfc 1413}]
[manpage modules/ident/ident.man ident]


[key {rfc 1886}]
[manpage modules/dns/tcllib_dns.man dns]
[key {rfc 1939}]
[manpage modules/pop3/pop3.man   pop3]
[manpage modules/pop3d/pop3d.man pop3d]
[key {rfc 2030}]
[manpage modules/ntp/ntp_time.man ntp_time]
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
[manpage modules/smtpd/smtpd.man smtpd]
[key {rfc 2849}]
[manpage modules/ldap/ldapx.man ldapx]
[key {rfc 3207}]
[manpage modules/mime/smtp.man smtp]
[key {rfc 3513}]
[manpage modules/dns/tcllib_ip.man tcllib_ip]
[key {rfc 3986}]
[manpage modules/uri/uri.man uri]
[key {rfc 4511}]
[manpage modules/ldap/ldap.man ldap]
[key {RFC 5849}]
[manpage modules/oauth/oauth.man oauth]
[key {rfc 6455}]
[manpage modules/websocket/websocket.man websocket]
[key {rfc 7858}]
[manpage modules/dns/tcllib_dns.man dns]
[key rfc3501]
[manpage modules/imap4/imap4.man imap4]
[key rfc3548]
[manpage modules/base32/base32.man    base32]
[manpage modules/base32/base32hex.man base32::hex]
[key {right outer join}]
[manpage modules/struct/struct_list.man struct::list]







<
<






<
<







2773
2774
2775
2776
2777
2778
2779


2780
2781
2782
2783
2784
2785


2786
2787
2788
2789
2790
2791
2792
[manpage modules/smtpd/smtpd.man smtpd]
[key {rfc 2849}]
[manpage modules/ldap/ldapx.man ldapx]
[key {rfc 3207}]
[manpage modules/mime/smtp.man smtp]
[key {rfc 3513}]
[manpage modules/dns/tcllib_ip.man tcllib_ip]


[key {rfc 4511}]
[manpage modules/ldap/ldap.man ldap]
[key {RFC 5849}]
[manpage modules/oauth/oauth.man oauth]
[key {rfc 6455}]
[manpage modules/websocket/websocket.man websocket]


[key rfc3501]
[manpage modules/imap4/imap4.man imap4]
[key rfc3548]
[manpage modules/base32/base32.man    base32]
[manpage modules/base32/base32hex.man base32::hex]
[key {right outer join}]
[manpage modules/struct/struct_list.man struct::list]
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
[manpage modules/nns/nns_intro.man             nns_intro]
[manpage apps/nnsd.man                         nnsd]
[manpage modules/udpcluster/udpcluster.man     udpcluster]
[key service]
[manpage modules/log/logger.man logger]
[key services]
[manpage modules/ftpd/ftpd.man   ftpd]
[manpage modules/httpd/httpd.man httpd]
[manpage modules/smtpd/smtpd.man smtpd]
[key set]
[manpage modules/struct/queue.man      struct::queue]
[manpage modules/struct/struct_set.man struct::set]
[key sha1]
[manpage modules/sha1/sha1.man sha1]
[key sha256]







<







2918
2919
2920
2921
2922
2923
2924

2925
2926
2927
2928
2929
2930
2931
[manpage modules/nns/nns_intro.man             nns_intro]
[manpage apps/nnsd.man                         nnsd]
[manpage modules/udpcluster/udpcluster.man     udpcluster]
[key service]
[manpage modules/log/logger.man logger]
[key services]
[manpage modules/ftpd/ftpd.man   ftpd]

[manpage modules/smtpd/smtpd.man smtpd]
[key set]
[manpage modules/struct/queue.man      struct::queue]
[manpage modules/struct/struct_set.man struct::set]
[key sha1]
[manpage modules/sha1/sha1.man sha1]
[key sha256]
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
[manpage modules/pt/pt_parser_api.man            pt_parser_api]
[manpage modules/pt/pt_peg_op.man                pt_peg_op]
[key {state (de)serialization}]
[manpage modules/namespacex/namespacex.man namespacex]
[key {statistical distribution}]
[manpage modules/simulation/simulation_random.man simulation::random]
[key statistics]
[manpage modules/counter/counter.man  counter]
[manpage modules/math/math.man        math]
[manpage modules/math/changepoint.man math::changepoint]
[manpage modules/math/pca.man         math::PCA]
[manpage modules/math/statistics.man  math::statistics]
[key stdin]
[manpage modules/virtchannel_base/std.man tcl::chan::std]
[key stdout]
[manpage modules/virtchannel_base/std.man tcl::chan::std]
[key {stochastic modelling}]
[manpage modules/simulation/montecarlo.man simulation::montecarlo]
[key {stream cipher}]







|
|
<
<
|







3052
3053
3054
3055
3056
3057
3058
3059
3060


3061
3062
3063
3064
3065
3066
3067
3068
[manpage modules/pt/pt_parser_api.man            pt_parser_api]
[manpage modules/pt/pt_peg_op.man                pt_peg_op]
[key {state (de)serialization}]
[manpage modules/namespacex/namespacex.man namespacex]
[key {statistical distribution}]
[manpage modules/simulation/simulation_random.man simulation::random]
[key statistics]
[manpage modules/counter/counter.man counter]
[manpage modules/math/math.man       math]


[manpage modules/math/statistics.man math::statistics]
[key stdin]
[manpage modules/virtchannel_base/std.man tcl::chan::std]
[key stdout]
[manpage modules/virtchannel_base/std.man tcl::chan::std]
[key {stochastic modelling}]
[manpage modules/simulation/montecarlo.man simulation::montecarlo]
[key {stream cipher}]
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
[manpage modules/tar/tar.man tar]
[key tar]
[manpage modules/tar/tar.man tar]
[key tcl]
[manpage modules/math/bigfloat.man math::bigfloat]
[manpage modules/math/bignum.man   math::bignum]
[manpage modules/math/decimal.man  math::decimal]
[manpage modules/math/pca.man      math::PCA]
[key {Tcl module}]
[manpage modules/docstrip/docstrip_util.man docstrip_util]
[key {Tcl syntax}]
[manpage modules/doctools2base/tcl_parse.man doctools::tcl::parse]
[key {tcler's wiki}]
[manpage modules/doctools2idx/idx_container.man doctools::idx]
[manpage modules/doctools2idx/idx_export.man    doctools::idx::export]
[manpage modules/doctools2toc/toc_container.man doctools::toc]
[manpage modules/doctools2toc/toc_export.man    doctools::toc::export]
[key tcllib]
[manpage modules/csv/csv.man csv]
[key TclOO]
[manpage modules/clay/clay.man               clay]
[manpage modules/httpd/httpd.man             httpd]
[manpage modules/ooutil/ooutil.man           oo::util]
[manpage modules/tool/meta.man               oo::util]
[manpage modules/oometa/oometa.man           oometa]
[manpage modules/tool/tool.man               tool]
[manpage modules/tool/tool_dict_ensemble.man tool::dict_ensemble]
[key TCLPARAM]
[manpage modules/pt/pt_peg_to_tclparam.man pt::peg::to::tclparam]
[key TDPL]
[manpage modules/grammar_peg/peg.man             grammar::peg]
[manpage modules/grammar_peg/peg_interp.man      grammar::peg::interp]







<












<
<


<







3151
3152
3153
3154
3155
3156
3157

3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169


3170
3171

3172
3173
3174
3175
3176
3177
3178
[manpage modules/tar/tar.man tar]
[key tar]
[manpage modules/tar/tar.man tar]
[key tcl]
[manpage modules/math/bigfloat.man math::bigfloat]
[manpage modules/math/bignum.man   math::bignum]
[manpage modules/math/decimal.man  math::decimal]

[key {Tcl module}]
[manpage modules/docstrip/docstrip_util.man docstrip_util]
[key {Tcl syntax}]
[manpage modules/doctools2base/tcl_parse.man doctools::tcl::parse]
[key {tcler's wiki}]
[manpage modules/doctools2idx/idx_container.man doctools::idx]
[manpage modules/doctools2idx/idx_export.man    doctools::idx::export]
[manpage modules/doctools2toc/toc_container.man doctools::toc]
[manpage modules/doctools2toc/toc_export.man    doctools::toc::export]
[key tcllib]
[manpage modules/csv/csv.man csv]
[key TclOO]


[manpage modules/ooutil/ooutil.man           oo::util]
[manpage modules/tool/meta.man               oo::util]

[manpage modules/tool/tool.man               tool]
[manpage modules/tool/tool_dict_ensemble.man tool::dict_ensemble]
[key TCLPARAM]
[manpage modules/pt/pt_peg_to_tclparam.man pt::peg::to::tclparam]
[key TDPL]
[manpage modules/grammar_peg/peg.man             grammar::peg]
[manpage modules/grammar_peg/peg_interp.man      grammar::peg::interp]
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
[manpage modules/doctools2toc/toc_import_json.man  doctools::toc::import::json]
[key {toc formatter}]
[manpage modules/doctools/doctoc_plugin_apiref.man doctoc_plugin_apiref]
[key tokenization]
[manpage modules/string/token.man       string::token]
[manpage modules/string/token_shell.man string::token::shell]
[key TOOL]
[manpage modules/oometa/oometa.man           oometa]
[manpage modules/tool/tool.man               tool]
[manpage modules/tool/tool_dict_ensemble.man tool::dict_ensemble]
[key {top-down parsing languages}]
[manpage modules/grammar_me/me_intro.man         grammar::me_intro]
[manpage modules/grammar_peg/peg.man             grammar::peg]
[manpage modules/grammar_peg/peg_interp.man      grammar::peg::interp]
[manpage apps/pt.man                             pt]







<







3390
3391
3392
3393
3394
3395
3396

3397
3398
3399
3400
3401
3402
3403
[manpage modules/doctools2toc/toc_import_json.man  doctools::toc::import::json]
[key {toc formatter}]
[manpage modules/doctools/doctoc_plugin_apiref.man doctoc_plugin_apiref]
[key tokenization]
[manpage modules/string/token.man       string::token]
[manpage modules/string/token_shell.man string::token::shell]
[key TOOL]

[manpage modules/tool/tool.man               tool]
[manpage modules/tool/tool_dict_ensemble.man tool::dict_ensemble]
[key {top-down parsing languages}]
[manpage modules/grammar_me/me_intro.man         grammar::me_intro]
[manpage modules/grammar_peg/peg.man             grammar::peg]
[manpage modules/grammar_peg/peg_interp.man      grammar::peg::interp]
[manpage apps/pt.man                             pt]
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
[manpage modules/treeql/treeql.man treeql]
[key {tree walking}]
[manpage modules/page/page_util_flow.man       page_util_flow]
[manpage modules/page/page_util_norm_lemon.man page_util_norm_lemon]
[manpage modules/page/page_util_norm_peg.man   page_util_norm_peg]
[key TreeQL]
[manpage modules/treeql/treeql.man treeql]
[key trigonometry]
[manpage modules/math/trig.man math::trig]
[key trimming]
[manpage modules/textutil/textutil.man textutil]
[manpage modules/textutil/trim.man     textutil::trim]
[key twitter]
[manpage modules/oauth/oauth.man oauth]
[key type]
[manpage modules/fileutil/fileutil.man fileutil]







<
<







3547
3548
3549
3550
3551
3552
3553


3554
3555
3556
3557
3558
3559
3560
[manpage modules/treeql/treeql.man treeql]
[key {tree walking}]
[manpage modules/page/page_util_flow.man       page_util_flow]
[manpage modules/page/page_util_norm_lemon.man page_util_norm_lemon]
[manpage modules/page/page_util_norm_peg.man   page_util_norm_peg]
[key TreeQL]
[manpage modules/treeql/treeql.man treeql]


[key trimming]
[manpage modules/textutil/textutil.man textutil]
[manpage modules/textutil/trim.man     textutil::trim]
[key twitter]
[manpage modules/oauth/oauth.man oauth]
[key type]
[manpage modules/fileutil/fileutil.man fileutil]
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
[key undenting]
[manpage modules/textutil/adjust.man textutil::adjust]
[key unicode]
[manpage modules/stringprep/stringprep.man      stringprep]
[manpage modules/stringprep/stringprep_data.man stringprep::data]
[manpage modules/stringprep/unicode.man         unicode]
[manpage modules/stringprep/unicode_data.man    unicode::data]
[key {unified format diff}]
[manpage modules/textutil/patch.man textutil::patch]
[key union]
[manpage modules/struct/disjointset.man struct::disjointset]
[manpage modules/struct/struct_set.man  struct::set]
[key unit]
[manpage modules/units/units.man units]
[key {unknown hooking}]
[manpage modules/namespacex/namespacex.man namespacex]







<
<







3586
3587
3588
3589
3590
3591
3592


3593
3594
3595
3596
3597
3598
3599
[key undenting]
[manpage modules/textutil/adjust.man textutil::adjust]
[key unicode]
[manpage modules/stringprep/stringprep.man      stringprep]
[manpage modules/stringprep/stringprep_data.man stringprep::data]
[manpage modules/stringprep/unicode.man         unicode]
[manpage modules/stringprep/unicode_data.man    unicode::data]


[key union]
[manpage modules/struct/disjointset.man struct::disjointset]
[manpage modules/struct/struct_set.man  struct::set]
[key unit]
[manpage modules/units/units.man units]
[key {unknown hooking}]
[manpage modules/namespacex/namespacex.man namespacex]
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
[manpage modules/doctools2toc/toc_container.man   doctools::toc]
[manpage modules/doctools/doctoc.man              doctools::toc]
[manpage modules/doctools2toc/toc_export.man      doctools::toc::export]
[manpage modules/doctools2toc/toc_export_wiki.man doctools::toc::export::wiki]
[key word]
[manpage modules/doctools2base/tcl_parse.man doctools::tcl::parse]
[manpage modules/wip/wip.man                 wip]
[key WWW]
[manpage modules/httpd/httpd.man httpd]
[key www]
[manpage modules/uri/uri.man uri]
[key x.208]
[manpage modules/asn/asn.man asn]
[key x.209]
[manpage modules/asn/asn.man asn]
[key x.500]







<
<







3725
3726
3727
3728
3729
3730
3731


3732
3733
3734
3735
3736
3737
3738
[manpage modules/doctools2toc/toc_container.man   doctools::toc]
[manpage modules/doctools/doctoc.man              doctools::toc]
[manpage modules/doctools2toc/toc_export.man      doctools::toc::export]
[manpage modules/doctools2toc/toc_export_wiki.man doctools::toc::export::wiki]
[key word]
[manpage modules/doctools2base/tcl_parse.man doctools::tcl::parse]
[manpage modules/wip/wip.man                 wip]


[key www]
[manpage modules/uri/uri.man uri]
[key x.208]
[manpage modules/asn/asn.man asn]
[key x.209]
[manpage modules/asn/asn.man asn]
[key x.500]

Changes to support/devel/sak/doc/manpages.txt.

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
modules/bench/bench_lang_spec.man
modules/bench/bench_read.man
modules/bench/bench_wcsv.man
modules/bench/bench_wtext.man
modules/bibtex/bibtex.man
modules/blowfish/blowfish.man
modules/cache/async.man
modules/clay/clay.man
modules/clock/iso8601.man
modules/clock/rfc2822.man
modules/cmdline/cmdline.man
modules/comm/comm.man
modules/comm/comm_wire.man
modules/control/control.man
modules/coroutine/coro_auto.man
modules/coroutine/tcllib_coroutine.man
modules/counter/counter.man
modules/crc/cksum.man
modules/crc/crc16.man
modules/crc/crc32.man
modules/crc/sum.man
modules/cron/cron.man
modules/csv/csv.man
modules/debug/debug.man
modules/debug/debug_caller.man
modules/debug/debug_heartbeat.man
modules/debug/debug_timestamp.man
modules/defer/defer.man
modules/des/des.man
modules/des/tcldes.man
modules/des/tcldesjr.man
modules/dicttool/dicttool.man
modules/dns/tcllib_dns.man
modules/dns/tcllib_ip.man
modules/docstrip/docstrip.man







<



















<







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
modules/bench/bench_lang_spec.man
modules/bench/bench_read.man
modules/bench/bench_wcsv.man
modules/bench/bench_wtext.man
modules/bibtex/bibtex.man
modules/blowfish/blowfish.man
modules/cache/async.man

modules/clock/iso8601.man
modules/clock/rfc2822.man
modules/cmdline/cmdline.man
modules/comm/comm.man
modules/comm/comm_wire.man
modules/control/control.man
modules/coroutine/coro_auto.man
modules/coroutine/tcllib_coroutine.man
modules/counter/counter.man
modules/crc/cksum.man
modules/crc/crc16.man
modules/crc/crc32.man
modules/crc/sum.man
modules/cron/cron.man
modules/csv/csv.man
modules/debug/debug.man
modules/debug/debug_caller.man
modules/debug/debug_heartbeat.man
modules/debug/debug_timestamp.man

modules/des/des.man
modules/des/tcldes.man
modules/des/tcldesjr.man
modules/dicttool/dicttool.man
modules/dns/tcllib_dns.man
modules/dns/tcllib_ip.man
modules/docstrip/docstrip.man
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
modules/doctools2toc/toc_msgcat_fr.man
modules/doctools2toc/toc_parse.man
modules/doctools2toc/toc_structure.man
modules/dtplite/pkg_dtplite.man
modules/fileutil/fileutil.man
modules/fileutil/multi.man
modules/fileutil/multiop.man
modules/fileutil/paths.man
modules/fileutil/traverse.man
modules/ftp/ftp.man
modules/ftp/ftp_geturl.man
modules/ftpd/ftpd.man
modules/fumagic/cfront.man
modules/fumagic/cgen.man
modules/fumagic/filetypes.man







<







118
119
120
121
122
123
124

125
126
127
128
129
130
131
modules/doctools2toc/toc_msgcat_fr.man
modules/doctools2toc/toc_parse.man
modules/doctools2toc/toc_structure.man
modules/dtplite/pkg_dtplite.man
modules/fileutil/fileutil.man
modules/fileutil/multi.man
modules/fileutil/multiop.man

modules/fileutil/traverse.man
modules/ftp/ftp.man
modules/ftp/ftp_geturl.man
modules/ftpd/ftpd.man
modules/fumagic/cfront.man
modules/fumagic/cgen.man
modules/fumagic/filetypes.man
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
modules/grammar_me/me_vm.man
modules/grammar_peg/peg.man
modules/grammar_peg/peg_interp.man
modules/hook/hook.man
modules/html/html.man
modules/htmlparse/htmlparse.man
modules/http/autoproxy.man
modules/httpd/httpd.man
modules/ident/ident.man
modules/imap4/imap4.man
modules/inifile/ini.man
modules/interp/deleg_method.man
modules/interp/deleg_proc.man
modules/interp/tcllib_interp.man
modules/irc/irc.man
modules/irc/picoirc.man
modules/javascript/javascript.man
modules/jpeg/jpeg.man
modules/json/json.man
modules/json/json_write.man
modules/lambda/lambda.man
modules/lazyset/lazyset.man
modules/ldap/ldap.man
modules/ldap/ldapx.man
modules/log/log.man
modules/log/logger.man
modules/log/loggerAppender.man
modules/log/loggerUtils.man
modules/map/map_geocode_nominatim.man
modules/map/map_slippy.man
modules/map/map_slippy_cache.man
modules/map/map_slippy_fetcher.man
modules/mapproj/mapproj.man
modules/markdown/markdown.man
modules/math/bigfloat.man
modules/math/bignum.man
modules/math/calculus.man
modules/math/changepoint.man
modules/math/combinatorics.man
modules/math/constants.man
modules/math/decimal.man
modules/math/exact.man
modules/math/filtergen.man
modules/math/fourier.man
modules/math/fuzzy.man
modules/math/interpolate.man
modules/math/linalg.man
modules/math/machineparameters.man
modules/math/math.man
modules/math/math_geometry.man
modules/math/numtheory.man
modules/math/optimize.man
modules/math/pca.man
modules/math/polynomials.man
modules/math/probopt.man
modules/math/qcomplex.man
modules/math/quasirandom.man
modules/math/rational_funcs.man
modules/math/roman.man
modules/math/romberg.man
modules/math/special.man
modules/math/statistics.man
modules/math/symdiff.man
modules/math/trig.man
modules/md4/md4.man
modules/md5/md5.man
modules/md5crypt/md5crypt.man
modules/mime/mime.man
modules/mime/smtp.man
modules/multiplexer/multiplexer.man
modules/namespacex/namespacex.man
modules/ncgi/ncgi.man
modules/nettool/nettool.man
modules/nmea/nmea.man
modules/nns/nns_auto.man
modules/nns/nns_client.man
modules/nns/nns_common.man
modules/nns/nns_intro.man
modules/nns/nns_protocol.man
modules/nns/nns_server.man
modules/nntp/nntp.man
modules/ntp/ntp_time.man
modules/oauth/oauth.man
modules/oometa/oometa.man
modules/ooutil/ooutil.man
modules/otp/otp.man
modules/page/page_intro.man
modules/page/page_pluginmgr.man
modules/page/page_util_flow.man
modules/page/page_util_norm_lemon.man
modules/page/page_util_norm_peg.man







<













<















<




<









<

<

<






<



















<







147
148
149
150
151
152
153

154
155
156
157
158
159
160
161
162
163
164
165
166

167
168
169
170
171
172
173
174
175
176
177
178
179
180
181

182
183
184
185

186
187
188
189
190
191
192
193
194

195

196

197
198
199
200
201
202

203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

222
223
224
225
226
227
228
modules/grammar_me/me_vm.man
modules/grammar_peg/peg.man
modules/grammar_peg/peg_interp.man
modules/hook/hook.man
modules/html/html.man
modules/htmlparse/htmlparse.man
modules/http/autoproxy.man

modules/ident/ident.man
modules/imap4/imap4.man
modules/inifile/ini.man
modules/interp/deleg_method.man
modules/interp/deleg_proc.man
modules/interp/tcllib_interp.man
modules/irc/irc.man
modules/irc/picoirc.man
modules/javascript/javascript.man
modules/jpeg/jpeg.man
modules/json/json.man
modules/json/json_write.man
modules/lambda/lambda.man

modules/ldap/ldap.man
modules/ldap/ldapx.man
modules/log/log.man
modules/log/logger.man
modules/log/loggerAppender.man
modules/log/loggerUtils.man
modules/map/map_geocode_nominatim.man
modules/map/map_slippy.man
modules/map/map_slippy_cache.man
modules/map/map_slippy_fetcher.man
modules/mapproj/mapproj.man
modules/markdown/markdown.man
modules/math/bigfloat.man
modules/math/bignum.man
modules/math/calculus.man

modules/math/combinatorics.man
modules/math/constants.man
modules/math/decimal.man
modules/math/exact.man

modules/math/fourier.man
modules/math/fuzzy.man
modules/math/interpolate.man
modules/math/linalg.man
modules/math/machineparameters.man
modules/math/math.man
modules/math/math_geometry.man
modules/math/numtheory.man
modules/math/optimize.man

modules/math/polynomials.man

modules/math/qcomplex.man

modules/math/rational_funcs.man
modules/math/roman.man
modules/math/romberg.man
modules/math/special.man
modules/math/statistics.man
modules/math/symdiff.man

modules/md4/md4.man
modules/md5/md5.man
modules/md5crypt/md5crypt.man
modules/mime/mime.man
modules/mime/smtp.man
modules/multiplexer/multiplexer.man
modules/namespacex/namespacex.man
modules/ncgi/ncgi.man
modules/nettool/nettool.man
modules/nmea/nmea.man
modules/nns/nns_auto.man
modules/nns/nns_client.man
modules/nns/nns_common.man
modules/nns/nns_intro.man
modules/nns/nns_protocol.man
modules/nns/nns_server.man
modules/nntp/nntp.man
modules/ntp/ntp_time.man
modules/oauth/oauth.man

modules/ooutil/ooutil.man
modules/otp/otp.man
modules/page/page_intro.man
modules/page/page_pluginmgr.man
modules/page/page_util_flow.man
modules/page/page_util_norm_lemon.man
modules/page/page_util_norm_peg.man
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
modules/struct/pool.man
modules/struct/prioqueue.man
modules/struct/queue.man
modules/struct/record.man
modules/struct/skiplist.man
modules/struct/stack.man
modules/struct/struct_list.man
modules/struct/struct_map.man
modules/struct/struct_set.man
modules/struct/struct_tree.man
modules/struct/struct_tree1.man
modules/tar/tar.man
modules/tepam/tepam_argument_dialogbox.man
modules/tepam/tepam_doc_gen.man
modules/tepam/tepam_introduction.man







<







316
317
318
319
320
321
322

323
324
325
326
327
328
329
modules/struct/pool.man
modules/struct/prioqueue.man
modules/struct/queue.man
modules/struct/record.man
modules/struct/skiplist.man
modules/struct/stack.man
modules/struct/struct_list.man

modules/struct/struct_set.man
modules/struct/struct_tree.man
modules/struct/struct_tree1.man
modules/tar/tar.man
modules/tepam/tepam_argument_dialogbox.man
modules/tepam/tepam_doc_gen.man
modules/tepam/tepam_introduction.man
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
modules/term/ipager.man
modules/term/receive.man
modules/term/term.man
modules/term/term_bind.man
modules/term/term_send.man
modules/textutil/adjust.man
modules/textutil/expander.man
modules/textutil/patch.man
modules/textutil/repeat.man
modules/textutil/tabify.man
modules/textutil/textutil.man
modules/textutil/textutil_split.man
modules/textutil/textutil_string.man
modules/textutil/trim.man
modules/tie/tie.man







<







338
339
340
341
342
343
344

345
346
347
348
349
350
351
modules/term/ipager.man
modules/term/receive.man
modules/term/term.man
modules/term/term_bind.man
modules/term/term_send.man
modules/textutil/adjust.man
modules/textutil/expander.man

modules/textutil/repeat.man
modules/textutil/tabify.man
modules/textutil/textutil.man
modules/textutil/textutil_split.man
modules/textutil/textutil_string.man
modules/textutil/trim.man
modules/tie/tie.man

Changes to support/devel/sak/doc/toc.txt.

193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
[division_end]
[division_start Mathematics]
[item modules/math/math.man                    math                    {Tcl Math Library}]
[item modules/math/bigfloat.man                math::bigfloat          {Arbitrary precision floating-point numbers}]
[item modules/math/bignum.man                  math::bignum            {Arbitrary precision integer numbers}]
[item modules/math/calculus.man                math::calculus          {Integration and ordinary differential equations}]
[item modules/math/romberg.man                 math::calculus::romberg {Romberg integration}]
[item modules/math/changepoint.man             math::changepoint       {Change point detection methods}]
[item modules/math/combinatorics.man           math::combinatorics     {Combinatorial functions in the Tcl Math Library}]
[item modules/math/qcomplex.man                math::complexnumbers    {Straightforward complex number package}]
[item modules/math/constants.man               math::constants         {Mathematical and numerical constants}]
[item modules/math/decimal.man                 math::decimal           {General decimal arithmetic}]
[item modules/math/exact.man                   math::exact             {Exact Real Arithmetic}]
[item modules/math/filtergen.man               math::filters           {Digital filters}]
[item modules/math/fourier.man                 math::fourier           {Discrete and fast fourier transforms}]
[item modules/math/fuzzy.man                   math::fuzzy             {Fuzzy comparison of floating-point numbers}]
[item modules/math/math_geometry.man           math::geometry          {Geometrical computations}]
[item modules/math/interpolate.man             math::interpolate       {Interpolation routines}]
[item modules/math/linalg.man                  math::linearalgebra     {Linear Algebra}]
[item modules/math/numtheory.man               math::numtheory         {Number Theory}]
[item modules/math/optimize.man                math::optimize          {Optimisation routines}]
[item modules/math/pca.man                     math::PCA               {Package for Principal Component Analysis}]
[item modules/math/polynomials.man             math::polynomials       {Polynomial functions}]
[item modules/math/probopt.man                 math::probopt           {Probabilistic optimisation methods}]
[item modules/math/quasirandom.man             math::quasirandom       {Quasi-random points for integration and Monte Carlo type methods}]
[item modules/math/rational_funcs.man          math::rationalfunctions {Polynomial functions}]
[item modules/math/roman.man                   math::roman             {Tools for creating and manipulating roman numerals}]
[item modules/math/special.man                 math::special           {Special mathematical functions}]
[item modules/math/statistics.man              math::statistics        {Basic statistical functions and procedures}]
[item modules/math/trig.man                    math::trig              {Trigonometric anf hyperbolic functions}]
[item modules/simulation/annealing.man         simulation::annealing   {Simulated annealing}]
[item modules/simulation/montecarlo.man        simulation::montecarlo  {Monte Carlo simulations}]
[item modules/simulation/simulation_random.man simulation::random      {Pseudo-random number generators}]
[division_end]
[division_start Networking]
[item modules/asn/asn.man               asn                {ASN.1 BER encoder/decoder}]
[item modules/http/autoproxy.man        autoproxy          {Automatic HTTP proxy usage and authentication}]
[item modules/bee/bee.man               bee                {BitTorrent Serialization Format Encoder/Decoder}]
[item modules/dns/tcllib_dns.man        dns                {Tcl Domain Name Service Client}]
[item modules/ftp/ftp.man               ftp                {Client-side tcl implementation of the ftp protocol}]
[item modules/ftp/ftp_geturl.man        ftp::geturl        {Uri handler for ftp urls}]
[item modules/ftpd/ftpd.man             ftpd               {Tcl FTP server implementation}]
[item modules/httpd/httpd.man           httpd              {A TclOO and coroutine based web server}]
[item modules/ident/ident.man           ident              {Ident protocol client}]
[item modules/imap4/imap4.man           imap4              {imap client-side tcl implementation of imap protocol}]
[item modules/irc/irc.man               irc                {Create IRC connection and interface.}]
[item modules/ldap/ldap.man             ldap               {LDAP client}]
[item modules/ldap/ldapx.man            ldapx              {LDAP extended object interface}]
[item modules/nns/nns_client.man        nameserv           {Name service facility, Client}]
[item modules/nns/nns_auto.man          nameserv::auto     {Name service facility, Client Extension}]
[item modules/nns/nns_common.man        nameserv::common   {Name service facility, shared definitions}]
[item modules/nns/nns_protocol.man      nameserv::protocol {Name service facility, client/server protocol}]







<





<







<

<
<




<












<

<







193
194
195
196
197
198
199

200
201
202
203
204

205
206
207
208
209
210
211

212


213
214
215
216

217
218
219
220
221
222
223
224
225
226
227
228

229

230
231
232
233
234
235
236
[division_end]
[division_start Mathematics]
[item modules/math/math.man                    math                    {Tcl Math Library}]
[item modules/math/bigfloat.man                math::bigfloat          {Arbitrary precision floating-point numbers}]
[item modules/math/bignum.man                  math::bignum            {Arbitrary precision integer numbers}]
[item modules/math/calculus.man                math::calculus          {Integration and ordinary differential equations}]
[item modules/math/romberg.man                 math::calculus::romberg {Romberg integration}]

[item modules/math/combinatorics.man           math::combinatorics     {Combinatorial functions in the Tcl Math Library}]
[item modules/math/qcomplex.man                math::complexnumbers    {Straightforward complex number package}]
[item modules/math/constants.man               math::constants         {Mathematical and numerical constants}]
[item modules/math/decimal.man                 math::decimal           {General decimal arithmetic}]
[item modules/math/exact.man                   math::exact             {Exact Real Arithmetic}]

[item modules/math/fourier.man                 math::fourier           {Discrete and fast fourier transforms}]
[item modules/math/fuzzy.man                   math::fuzzy             {Fuzzy comparison of floating-point numbers}]
[item modules/math/math_geometry.man           math::geometry          {Geometrical computations}]
[item modules/math/interpolate.man             math::interpolate       {Interpolation routines}]
[item modules/math/linalg.man                  math::linearalgebra     {Linear Algebra}]
[item modules/math/numtheory.man               math::numtheory         {Number Theory}]
[item modules/math/optimize.man                math::optimize          {Optimisation routines}]

[item modules/math/polynomials.man             math::polynomials       {Polynomial functions}]


[item modules/math/rational_funcs.man          math::rationalfunctions {Polynomial functions}]
[item modules/math/roman.man                   math::roman             {Tools for creating and manipulating roman numerals}]
[item modules/math/special.man                 math::special           {Special mathematical functions}]
[item modules/math/statistics.man              math::statistics        {Basic statistical functions and procedures}]

[item modules/simulation/annealing.man         simulation::annealing   {Simulated annealing}]
[item modules/simulation/montecarlo.man        simulation::montecarlo  {Monte Carlo simulations}]
[item modules/simulation/simulation_random.man simulation::random      {Pseudo-random number generators}]
[division_end]
[division_start Networking]
[item modules/asn/asn.man               asn                {ASN.1 BER encoder/decoder}]
[item modules/http/autoproxy.man        autoproxy          {Automatic HTTP proxy usage and authentication}]
[item modules/bee/bee.man               bee                {BitTorrent Serialization Format Encoder/Decoder}]
[item modules/dns/tcllib_dns.man        dns                {Tcl Domain Name Service Client}]
[item modules/ftp/ftp.man               ftp                {Client-side tcl implementation of the ftp protocol}]
[item modules/ftp/ftp_geturl.man        ftp::geturl        {Uri handler for ftp urls}]
[item modules/ftpd/ftpd.man             ftpd               {Tcl FTP server implementation}]

[item modules/ident/ident.man           ident              {Ident protocol client}]

[item modules/irc/irc.man               irc                {Create IRC connection and interface.}]
[item modules/ldap/ldap.man             ldap               {LDAP client}]
[item modules/ldap/ldapx.man            ldapx              {LDAP extended object interface}]
[item modules/nns/nns_client.man        nameserv           {Name service facility, Client}]
[item modules/nns/nns_auto.man          nameserv::auto     {Name service facility, Client Extension}]
[item modules/nns/nns_common.man        nameserv::common   {Name service facility, shared definitions}]
[item modules/nns/nns_protocol.man      nameserv::protocol {Name service facility, client/server protocol}]
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
[item modules/pt/pt_peg_op.man                pt_peg_op                          {Parser Tools PE Grammar Utility Operations}]
[division_end]
[division_start {Procedures, arguments, parameters, options}]
[item modules/tepam/tepam_introduction.man tepam            {An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager}]
[item modules/tepam/tepam_procedure.man    tepam::procedure {TEPAM procedure, reference manual}]
[division_end]
[division_start {Programming tools}]
[item modules/clay/clay.man               clay                      {A minimalist framework for large scale OO Projects}]
[item modules/cmdline/cmdline.man         cmdline                   {Procedures to process command lines and options.}]
[item modules/comm/comm.man               comm                      {A remote communication facility for Tcl (8.3 and later)}]
[item modules/comm/comm_wire.man          comm_wire                 {The comm wire protocol}]
[item modules/control/control.man         control                   {Procedures for control flow structures.}]
[item modules/interp/deleg_method.man     deleg_method              {Creation of comm delegates (snit methods)}]
[item modules/interp/deleg_proc.man       deleg_proc                {Creation of comm delegates (procedures)}]
[item modules/fileutil/fileutil.man       fileutil                  {Procedures implementing some file utilities}]







<







317
318
319
320
321
322
323

324
325
326
327
328
329
330
[item modules/pt/pt_peg_op.man                pt_peg_op                          {Parser Tools PE Grammar Utility Operations}]
[division_end]
[division_start {Procedures, arguments, parameters, options}]
[item modules/tepam/tepam_introduction.man tepam            {An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager}]
[item modules/tepam/tepam_procedure.man    tepam::procedure {TEPAM procedure, reference manual}]
[division_end]
[division_start {Programming tools}]

[item modules/cmdline/cmdline.man         cmdline                   {Procedures to process command lines and options.}]
[item modules/comm/comm.man               comm                      {A remote communication facility for Tcl (8.3 and later)}]
[item modules/comm/comm_wire.man          comm_wire                 {The comm wire protocol}]
[item modules/control/control.man         control                   {Procedures for control flow structures.}]
[item modules/interp/deleg_method.man     deleg_method              {Creation of comm delegates (snit methods)}]
[item modules/interp/deleg_proc.man       deleg_proc                {Creation of comm delegates (procedures)}]
[item modules/fileutil/fileutil.man       fileutil                  {Procedures implementing some file utilities}]
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
[division_end]
[division_start System]
[item modules/cron/cron.man             cron       {Tool for automating the period callback of commands}]
[item modules/nettool/nettool.man       nettool    {Tools for networked applications}]
[item modules/processman/processman.man processman {Tool for automating the period callback of commands}]
[division_end]
[division_start TclOO]
[item modules/oometa/oometa.man   oometa  {oo::meta A data registry for classess}]
[item modules/practcl/practcl.man practcl {The Practcl Module}]
[item modules/tool/tool.man       tool    {TclOO Library (TOOL) Framework}]
[division_end]
[division_start {Terminal control}]
[item modules/term/term.man         term                     {General terminal control}]
[item modules/term/ansi_code.man    term::ansi::code         {Helper for control sequences}]
[item modules/term/ansi_cattr.man   term::ansi::code::attr   {ANSI attribute sequences}]
[item modules/term/ansi_cctrl.man   term::ansi::code::ctrl   {ANSI control sequences}]
[item modules/term/ansi_cmacros.man term::ansi::code::macros {Macro sequences}]







<

<







355
356
357
358
359
360
361

362

363
364
365
366
367
368
369
[division_end]
[division_start System]
[item modules/cron/cron.man             cron       {Tool for automating the period callback of commands}]
[item modules/nettool/nettool.man       nettool    {Tools for networked applications}]
[item modules/processman/processman.man processman {Tool for automating the period callback of commands}]
[division_end]
[division_start TclOO]

[item modules/practcl/practcl.man practcl {The Practcl Module}]

[division_end]
[division_start {Terminal control}]
[item modules/term/term.man         term                     {General terminal control}]
[item modules/term/ansi_code.man    term::ansi::code         {Helper for control sequences}]
[item modules/term/ansi_cattr.man   term::ansi::code::attr   {ANSI attribute sequences}]
[item modules/term/ansi_cctrl.man   term::ansi::code::ctrl   {ANSI control sequences}]
[item modules/term/ansi_cmacros.man term::ansi::code::macros {Macro sequences}]
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449

450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477

478
479
480
481
482
483
484
[item modules/base64/ascii85.man           ascii85              {ascii85-encode/decode binary data}]
[item modules/base32/base32.man            base32               {base32 standard encoding}]
[item modules/base32/base32core.man        base32::core         {Expanding basic base32 maps}]
[item modules/base32/base32hex.man         base32::hex          {base32 extended hex encoding}]
[item modules/base64/base64.man            base64               {base64-encode/decode binary data}]
[item modules/bibtex/bibtex.man            bibtex               {Parse bibtex files}]
[item modules/clock/iso8601.man            clock_iso8601        {Parsing ISO 8601 dates/times}]
[item modules/clock/rfc2822.man            clock_rfc2822        {Parsing RFC 2822 dates/times}]
[item modules/csv/csv.man                  csv                  {Procedures to handle CSV data.}]
[item modules/htmlparse/htmlparse.man      htmlparse            {Procedures to parse HTML strings}]
[item modules/inifile/ini.man              inifile              {Parsing of Windows INI files}]
[item modules/markdown/markdown.man        markdown             {Converts Markdown text to HTML}]
[item modules/mime/mime.man                mime                 {Manipulation of MIME body parts}]
[item modules/rcs/rcs.man                  rcs                  {RCS low level utilities}]
[item modules/string/token.man             string::token        {Regex based iterative lexing}]
[item modules/string/token_shell.man       string::token::shell {Parsing of shell command line}]
[item modules/textutil/textutil.man        textutil             {Procedures to manipulate texts and strings.}]
[item modules/textutil/adjust.man          textutil::adjust     {Procedures to adjust, indent, and undent paragraphs}]
[item modules/textutil/patch.man           textutil::patch      {Application of uni-diff patches to directory trees}]
[item modules/textutil/repeat.man          textutil::repeat     {Procedures to repeat strings.}]
[item modules/textutil/textutil_split.man  textutil::split      {Procedures to split texts}]
[item modules/textutil/textutil_string.man textutil::string     {Procedures to manipulate texts and strings.}]
[item modules/textutil/tabify.man          textutil::tabify     {Procedures to (un)tabify strings}]
[item modules/textutil/trim.man            textutil::trim       {Procedures to trim strings}]
[item modules/base64/uuencode.man          uuencode             {UU-encode/decode binary data}]
[item modules/amazon-s3/xsxp.man           xsxp                 {eXtremely Simple Xml Parser}]
[item modules/base64/yencode.man           yencode              {Y-encode/decode binary data}]
[division_end]
[division_start {Transfer module}]
[item modules/transfer/connect.man     transfer::connect           {Connection setup}]
[item modules/transfer/copyops.man     transfer::copy              {Data transfer foundation}]
[item modules/transfer/tqueue.man      transfer::copy::queue       {Queued transfers}]
[item modules/transfer/ddest.man       transfer::data::destination {Data destination}]
[item modules/transfer/dsource.man     transfer::data::source      {Data source}]
[item modules/transfer/receiver.man    transfer::receiver          {Data source}]
[item modules/transfer/transmitter.man transfer::transmitter       {Data source}]
[division_end]
[division_start Unfiled]
[item modules/cache/async.man                cache::async            {Asynchronous in-memory cache}]
[item modules/fileutil/paths.man             fileutil::paths         {Manage search path pools}]
[item modules/generator/generator.man        generator               {Procedures for creating and using generators.}]
[item modules/yaml/huddle.man                huddle                  {Create and manipulate huddle object}]

[item modules/map/map_geocode_nominatim.man  map::geocode::nominatim {Resolving geographical names with a Nominatim service}]
[item modules/map/map_slippy.man             map::slippy             {Common code for slippy based map packages}]
[item modules/map/map_slippy_cache.man       map::slippy::cache      {Management of a tile cache in the local filesystem}]
[item modules/map/map_slippy_fetcher.man     map::slippy::fetcher    {Accessing a server providing tiles for slippy-based maps}]
[item modules/mapproj/mapproj.man            mapproj                 {Map projection routines}]
[item modules/math/symdiff.man               math::calculus::symdiff {Symbolic differentiation for Tcl}]
[item modules/math/machineparameters.man     math::machineparameters {Compute double precision machine parameters.}]
[item modules/namespacex/namespacex.man      namespacex              {Namespace utility commands}]
[item modules/rest/rest.man                  rest                    {define REST web APIs and call them inline or asychronously}]
[item modules/stringprep/stringprep.man      stringprep              {Implementation of stringprep}]
[item modules/stringprep/stringprep_data.man stringprep::data        {stringprep data tables, generated, internal}]
[item modules/struct/struct_map.man          struct::map             {Manage key/value maps}]
[item modules/uev/uevent_onidle.man          uevent::onidle          {Request merging and deferal to idle time}]
[item modules/stringprep/unicode.man         unicode                 {Implementation of Unicode normalization}]
[item modules/stringprep/unicode_data.man    unicode::data           {unicode data tables, generated, internal}]
[item modules/units/units.man                units                   {unit conversion}]
[item modules/yaml/yaml.man                  yaml                    {YAML Format Encoder/Decoder}]
[division_end]
[division_start Utilities]
[item modules/dicttool/dicttool.man dicttool {Dictionary Tools}]
[division_end]
[division_start Utility]
[item modules/defer/defer.man             defer               {Defered execution}]
[item modules/lambda/lambda.man           lambda              {Utility commands for anonymous procedures}]
[item modules/lazyset/lazyset.man         lazyset             {Lazy evaluation}]
[item modules/ooutil/ooutil.man           oo::util            {Utility commands for TclOO}]
[item modules/tool/meta.man               oo::util            {Utility commands for TclOO}]
[item modules/try/tcllib_throw.man        throw               {throw - Throw an error exception with a message}]

[item modules/tool/tool_dict_ensemble.man tool::dict_ensemble {Dictionary Tools}]
[item modules/try/tcllib_try.man          try                 {try - Trap and process errors and exceptions}]
[division_end]
[division_start {Validation, Type checking}]
[item modules/valtype/valtype_common.man valtype::common                 {Validation, common code}]
[item modules/valtype/cc_amex.man        valtype::creditcard::amex       {Validation for AMEX creditcard number}]
[item modules/valtype/cc_discover.man    valtype::creditcard::discover   {Validation for Discover creditcard number}]







|










<



















|
<
|
|
>
|
|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|

|



<

<



>







397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414

415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434

435
436
437
438
439
440
441
442
443

444
445
446
447
448
449
450
451
452
453
454
455
456
457
458

459

460
461
462
463
464
465
466
467
468
469
470
[item modules/base64/ascii85.man           ascii85              {ascii85-encode/decode binary data}]
[item modules/base32/base32.man            base32               {base32 standard encoding}]
[item modules/base32/base32core.man        base32::core         {Expanding basic base32 maps}]
[item modules/base32/base32hex.man         base32::hex          {base32 extended hex encoding}]
[item modules/base64/base64.man            base64               {base64-encode/decode binary data}]
[item modules/bibtex/bibtex.man            bibtex               {Parse bibtex files}]
[item modules/clock/iso8601.man            clock_iso8601        {Parsing ISO 8601 dates/times}]
[item modules/clock/rfc2822.man            clock_rfc2822        {Parsing ISO 8601 dates/times}]
[item modules/csv/csv.man                  csv                  {Procedures to handle CSV data.}]
[item modules/htmlparse/htmlparse.man      htmlparse            {Procedures to parse HTML strings}]
[item modules/inifile/ini.man              inifile              {Parsing of Windows INI files}]
[item modules/markdown/markdown.man        markdown             {Converts Markdown text to HTML}]
[item modules/mime/mime.man                mime                 {Manipulation of MIME body parts}]
[item modules/rcs/rcs.man                  rcs                  {RCS low level utilities}]
[item modules/string/token.man             string::token        {Regex based iterative lexing}]
[item modules/string/token_shell.man       string::token::shell {Parsing of shell command line}]
[item modules/textutil/textutil.man        textutil             {Procedures to manipulate texts and strings.}]
[item modules/textutil/adjust.man          textutil::adjust     {Procedures to adjust, indent, and undent paragraphs}]

[item modules/textutil/repeat.man          textutil::repeat     {Procedures to repeat strings.}]
[item modules/textutil/textutil_split.man  textutil::split      {Procedures to split texts}]
[item modules/textutil/textutil_string.man textutil::string     {Procedures to manipulate texts and strings.}]
[item modules/textutil/tabify.man          textutil::tabify     {Procedures to (un)tabify strings}]
[item modules/textutil/trim.man            textutil::trim       {Procedures to trim strings}]
[item modules/base64/uuencode.man          uuencode             {UU-encode/decode binary data}]
[item modules/amazon-s3/xsxp.man           xsxp                 {eXtremely Simple Xml Parser}]
[item modules/base64/yencode.man           yencode              {Y-encode/decode binary data}]
[division_end]
[division_start {Transfer module}]
[item modules/transfer/connect.man     transfer::connect           {Connection setup}]
[item modules/transfer/copyops.man     transfer::copy              {Data transfer foundation}]
[item modules/transfer/tqueue.man      transfer::copy::queue       {Queued transfers}]
[item modules/transfer/ddest.man       transfer::data::destination {Data destination}]
[item modules/transfer/dsource.man     transfer::data::source      {Data source}]
[item modules/transfer/receiver.man    transfer::receiver          {Data source}]
[item modules/transfer/transmitter.man transfer::transmitter       {Data source}]
[division_end]
[division_start Unfiled]
[item modules/cache/async.man                cache::async             {Asynchronous in-memory cache}]

[item modules/generator/generator.man        generator                {Procedures for creating and using generators.}]
[item modules/yaml/huddle.man                huddle                   {Create and manipulate huddle object}]
[item modules/imap4/imap4.man                imap4                    {imap client-side tcl implementation of imap protocol}]
[item modules/map/map_geocode_nominatim.man  map::geocode::nominatim  {Resolving geographical names with a Nominatim service}]
[item modules/map/map_slippy.man             map::slippy              {Common code for slippy based map packages}]
[item modules/map/map_slippy_cache.man       map::slippy::cache       {Management of a tile cache in the local filesystem}]
[item modules/map/map_slippy_fetcher.man     map::slippy::fetcher     {Accessing a server providing tiles for slippy-based maps}]
[item modules/mapproj/mapproj.man            mapproj                  {Map projection routines}]
[item modules/math/symdiff.man               math::calculus::symdiff  {Symbolic differentiation for Tcl}]

[item modules/namespacex/namespacex.man      namespacex               {Namespace utility commands}]
[item modules/rest/rest.man                  rest                     {define REST web APIs and call them inline or asychronously}]
[item modules/stringprep/stringprep.man      stringprep               {Implementation of stringprep}]
[item modules/stringprep/stringprep_data.man stringprep::data         {stringprep data tables, generated, internal}]
[item modules/math/machineparameters.man     tclrep/machineparameters {Compute double precision machine parameters.}]
[item modules/uev/uevent_onidle.man          uevent::onidle           {Request merging and deferal to idle time}]
[item modules/stringprep/unicode.man         unicode                  {Implementation of Unicode normalization}]
[item modules/stringprep/unicode_data.man    unicode::data            {unicode data tables, generated, internal}]
[item modules/units/units.man                units                    {unit conversion}]
[item modules/yaml/yaml.man                  yaml                     {YAML Format Encoder/Decoder}]
[division_end]
[division_start Utilites]
[item modules/dicttool/dicttool.man dicttool {Dictionary Tools}]
[division_end]
[division_start Utility]

[item modules/lambda/lambda.man           lambda              {Utility commands for anonymous procedures}]

[item modules/ooutil/ooutil.man           oo::util            {Utility commands for TclOO}]
[item modules/tool/meta.man               oo::util            {Utility commands for TclOO}]
[item modules/try/tcllib_throw.man        throw               {throw - Throw an error exception with a message}]
[item modules/tool/tool.man               tool                {Dictionary Tools}]
[item modules/tool/tool_dict_ensemble.man tool::dict_ensemble {Dictionary Tools}]
[item modules/try/tcllib_try.man          try                 {try - Trap and process errors and exceptions}]
[division_end]
[division_start {Validation, Type checking}]
[item modules/valtype/valtype_common.man valtype::common                 {Validation, common code}]
[item modules/valtype/cc_amex.man        valtype::creditcard::amex       {Validation for AMEX creditcard number}]
[item modules/valtype/cc_discover.man    valtype::creditcard::discover   {Validation for Discover creditcard number}]
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
[division_end]
[division_start blowfish]
[item modules/blowfish/blowfish.man blowfish {Implementation of the Blowfish block cipher}]
[division_end]
[division_start cache]
[item modules/cache/async.man cache::async {Asynchronous in-memory cache}]
[division_end]
[division_start clay]
[item modules/clay/clay.man clay {A minimalist framework for large scale OO Projects}]
[division_end]
[division_start clock]
[item modules/clock/iso8601.man clock_iso8601 {Parsing ISO 8601 dates/times}]
[item modules/clock/rfc2822.man clock_rfc2822 {Parsing RFC 2822 dates/times}]
[division_end]
[division_start cmdline]
[item modules/cmdline/cmdline.man cmdline {Procedures to process command lines and options.}]
[division_end]
[division_start comm]
[item modules/comm/comm.man      comm      {A remote communication facility for Tcl (8.3 and later)}]
[item modules/comm/comm_wire.man comm_wire {The comm wire protocol}]







<
<
<


|







529
530
531
532
533
534
535



536
537
538
539
540
541
542
543
544
545
[division_end]
[division_start blowfish]
[item modules/blowfish/blowfish.man blowfish {Implementation of the Blowfish block cipher}]
[division_end]
[division_start cache]
[item modules/cache/async.man cache::async {Asynchronous in-memory cache}]
[division_end]



[division_start clock]
[item modules/clock/iso8601.man clock_iso8601 {Parsing ISO 8601 dates/times}]
[item modules/clock/rfc2822.man clock_rfc2822 {Parsing ISO 8601 dates/times}]
[division_end]
[division_start cmdline]
[item modules/cmdline/cmdline.man cmdline {Procedures to process command lines and options.}]
[division_end]
[division_start comm]
[item modules/comm/comm.man      comm      {A remote communication facility for Tcl (8.3 and later)}]
[item modules/comm/comm_wire.man comm_wire {The comm wire protocol}]
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
[division_end]
[division_start debug]
[item modules/debug/debug.man           debug            {debug narrative - core}]
[item modules/debug/debug_caller.man    debug::caller    {debug narrative - caller}]
[item modules/debug/debug_heartbeat.man debug::heartbeat {debug narrative - heartbeat}]
[item modules/debug/debug_timestamp.man debug::timestamp {debug narrative - timestamping}]
[division_end]
[division_start defer]
[item modules/defer/defer.man defer {Defered execution}]
[division_end]
[division_start des]
[item modules/des/des.man      des      {Implementation of the DES and triple-DES ciphers}]
[item modules/des/tcldes.man   tclDES   {Implementation of the DES and triple-DES ciphers}]
[item modules/des/tcldesjr.man tclDESjr {Implementation of the DES and triple-DES ciphers}]
[division_end]
[division_start dicttool]
[item modules/dicttool/dicttool.man dicttool {Dictionary Tools}]







<
<
<







568
569
570
571
572
573
574



575
576
577
578
579
580
581
[division_end]
[division_start debug]
[item modules/debug/debug.man           debug            {debug narrative - core}]
[item modules/debug/debug_caller.man    debug::caller    {debug narrative - caller}]
[item modules/debug/debug_heartbeat.man debug::heartbeat {debug narrative - heartbeat}]
[item modules/debug/debug_timestamp.man debug::timestamp {debug narrative - timestamping}]
[division_end]



[division_start des]
[item modules/des/des.man      des      {Implementation of the DES and triple-DES ciphers}]
[item modules/des/tcldes.man   tclDES   {Implementation of the DES and triple-DES ciphers}]
[item modules/des/tcldesjr.man tclDESjr {Implementation of the DES and triple-DES ciphers}]
[division_end]
[division_start dicttool]
[item modules/dicttool/dicttool.man dicttool {Dictionary Tools}]
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
[division_start dtplite]
[item modules/dtplite/pkg_dtplite.man dtplite {Lightweight DocTools Markup Processor}]
[division_end]
[division_start fileutil]
[item modules/fileutil/fileutil.man fileutil            {Procedures implementing some file utilities}]
[item modules/fileutil/multi.man    fileutil::multi     {Multi-file operation, scatter/gather, standard object}]
[item modules/fileutil/multiop.man  fileutil::multi::op {Multi-file operation, scatter/gather}]
[item modules/fileutil/paths.man    fileutil::paths     {Manage search path pools}]
[item modules/fileutil/traverse.man fileutil_traverse   {Iterative directory traversal}]
[division_end]
[division_start ftp]
[item modules/ftp/ftp.man        ftp         {Client-side tcl implementation of the ftp protocol}]
[item modules/ftp/ftp_geturl.man ftp::geturl {Uri handler for ftp urls}]
[division_end]
[division_start ftpd]







<







663
664
665
666
667
668
669

670
671
672
673
674
675
676
[division_start dtplite]
[item modules/dtplite/pkg_dtplite.man dtplite {Lightweight DocTools Markup Processor}]
[division_end]
[division_start fileutil]
[item modules/fileutil/fileutil.man fileutil            {Procedures implementing some file utilities}]
[item modules/fileutil/multi.man    fileutil::multi     {Multi-file operation, scatter/gather, standard object}]
[item modules/fileutil/multiop.man  fileutil::multi::op {Multi-file operation, scatter/gather}]

[item modules/fileutil/traverse.man fileutil_traverse   {Iterative directory traversal}]
[division_end]
[division_start ftp]
[item modules/ftp/ftp.man        ftp         {Client-side tcl implementation of the ftp protocol}]
[item modules/ftp/ftp_geturl.man ftp::geturl {Uri handler for ftp urls}]
[division_end]
[division_start ftpd]
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
[division_end]
[division_start htmlparse]
[item modules/htmlparse/htmlparse.man htmlparse {Procedures to parse HTML strings}]
[division_end]
[division_start http]
[item modules/http/autoproxy.man autoproxy {Automatic HTTP proxy usage and authentication}]
[division_end]
[division_start httpd]
[item modules/httpd/httpd.man httpd {A TclOO and coroutine based web server}]
[division_end]
[division_start ident]
[item modules/ident/ident.man ident {Ident protocol client}]
[division_end]
[division_start imap4]
[item modules/imap4/imap4.man imap4 {imap client-side tcl implementation of imap protocol}]
[division_end]
[division_start inifile]







<
<
<







719
720
721
722
723
724
725



726
727
728
729
730
731
732
[division_end]
[division_start htmlparse]
[item modules/htmlparse/htmlparse.man htmlparse {Procedures to parse HTML strings}]
[division_end]
[division_start http]
[item modules/http/autoproxy.man autoproxy {Automatic HTTP proxy usage and authentication}]
[division_end]



[division_start ident]
[item modules/ident/ident.man ident {Ident protocol client}]
[division_end]
[division_start imap4]
[item modules/imap4/imap4.man imap4 {imap client-side tcl implementation of imap protocol}]
[division_end]
[division_start inifile]
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
[division_start json]
[item modules/json/json.man       json        {JSON parser}]
[item modules/json/json_write.man json::write {JSON generation}]
[division_end]
[division_start lambda]
[item modules/lambda/lambda.man lambda {Utility commands for anonymous procedures}]
[division_end]
[division_start lazyset]
[item modules/lazyset/lazyset.man lazyset {Lazy evaluation}]
[division_end]
[division_start ldap]
[item modules/ldap/ldap.man  ldap  {LDAP client}]
[item modules/ldap/ldapx.man ldapx {LDAP extended object interface}]
[division_end]
[division_start log]
[item modules/log/log.man            log              {Procedures to log messages of libraries and applications.}]
[item modules/log/logger.man         logger           {System to control logging of events.}]







<
<
<







750
751
752
753
754
755
756



757
758
759
760
761
762
763
[division_start json]
[item modules/json/json.man       json        {JSON parser}]
[item modules/json/json_write.man json::write {JSON generation}]
[division_end]
[division_start lambda]
[item modules/lambda/lambda.man lambda {Utility commands for anonymous procedures}]
[division_end]



[division_start ldap]
[item modules/ldap/ldap.man  ldap  {LDAP client}]
[item modules/ldap/ldapx.man ldapx {LDAP extended object interface}]
[division_end]
[division_start log]
[item modules/log/log.man            log              {Procedures to log messages of libraries and applications.}]
[item modules/log/logger.man         logger           {System to control logging of events.}]
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
[division_start mapproj]
[item modules/mapproj/mapproj.man mapproj {Map projection routines}]
[division_end]
[division_start markdown]
[item modules/markdown/markdown.man markdown {Converts Markdown text to HTML}]
[division_end]
[division_start math]
[item modules/math/math.man              math                    {Tcl Math Library}]
[item modules/math/bigfloat.man          math::bigfloat          {Arbitrary precision floating-point numbers}]
[item modules/math/bignum.man            math::bignum            {Arbitrary precision integer numbers}]
[item modules/math/calculus.man          math::calculus          {Integration and ordinary differential equations}]
[item modules/math/romberg.man           math::calculus::romberg {Romberg integration}]
[item modules/math/symdiff.man           math::calculus::symdiff {Symbolic differentiation for Tcl}]
[item modules/math/changepoint.man       math::changepoint       {Change point detection methods}]
[item modules/math/combinatorics.man     math::combinatorics     {Combinatorial functions in the Tcl Math Library}]
[item modules/math/qcomplex.man          math::complexnumbers    {Straightforward complex number package}]
[item modules/math/constants.man         math::constants         {Mathematical and numerical constants}]
[item modules/math/decimal.man           math::decimal           {General decimal arithmetic}]
[item modules/math/exact.man             math::exact             {Exact Real Arithmetic}]
[item modules/math/filtergen.man         math::filters           {Digital filters}]
[item modules/math/fourier.man           math::fourier           {Discrete and fast fourier transforms}]
[item modules/math/fuzzy.man             math::fuzzy             {Fuzzy comparison of floating-point numbers}]
[item modules/math/math_geometry.man     math::geometry          {Geometrical computations}]
[item modules/math/interpolate.man       math::interpolate       {Interpolation routines}]
[item modules/math/linalg.man            math::linearalgebra     {Linear Algebra}]
[item modules/math/machineparameters.man math::machineparameters {Compute double precision machine parameters.}]
[item modules/math/numtheory.man         math::numtheory         {Number Theory}]
[item modules/math/optimize.man          math::optimize          {Optimisation routines}]
[item modules/math/pca.man               math::PCA               {Package for Principal Component Analysis}]
[item modules/math/polynomials.man       math::polynomials       {Polynomial functions}]
[item modules/math/probopt.man           math::probopt           {Probabilistic optimisation methods}]
[item modules/math/quasirandom.man       math::quasirandom       {Quasi-random points for integration and Monte Carlo type methods}]
[item modules/math/rational_funcs.man    math::rationalfunctions {Polynomial functions}]
[item modules/math/roman.man             math::roman             {Tools for creating and manipulating roman numerals}]
[item modules/math/special.man           math::special           {Special mathematical functions}]
[item modules/math/statistics.man        math::statistics        {Basic statistical functions and procedures}]
[item modules/math/trig.man              math::trig              {Trigonometric anf hyperbolic functions}]
[division_end]
[division_start md4]
[item modules/md4/md4.man md4 {MD4 Message-Digest Algorithm}]
[division_end]
[division_start md5]
[item modules/md5/md5.man md5 {MD5 Message-Digest Algorithm}]
[division_end]







|
|
|
|
|
|
<
|
|
|
|
|
<
|
|
|
|
|
<
|
|
<
|
<
<
|
|
|
|
|







773
774
775
776
777
778
779
780
781
782
783
784
785

786
787
788
789
790

791
792
793
794
795

796
797

798


799
800
801
802
803
804
805
806
807
808
809
810
[division_start mapproj]
[item modules/mapproj/mapproj.man mapproj {Map projection routines}]
[division_end]
[division_start markdown]
[item modules/markdown/markdown.man markdown {Converts Markdown text to HTML}]
[division_end]
[division_start math]
[item modules/math/math.man              math                     {Tcl Math Library}]
[item modules/math/bigfloat.man          math::bigfloat           {Arbitrary precision floating-point numbers}]
[item modules/math/bignum.man            math::bignum             {Arbitrary precision integer numbers}]
[item modules/math/calculus.man          math::calculus           {Integration and ordinary differential equations}]
[item modules/math/romberg.man           math::calculus::romberg  {Romberg integration}]
[item modules/math/symdiff.man           math::calculus::symdiff  {Symbolic differentiation for Tcl}]

[item modules/math/combinatorics.man     math::combinatorics      {Combinatorial functions in the Tcl Math Library}]
[item modules/math/qcomplex.man          math::complexnumbers     {Straightforward complex number package}]
[item modules/math/constants.man         math::constants          {Mathematical and numerical constants}]
[item modules/math/decimal.man           math::decimal            {General decimal arithmetic}]
[item modules/math/exact.man             math::exact              {Exact Real Arithmetic}]

[item modules/math/fourier.man           math::fourier            {Discrete and fast fourier transforms}]
[item modules/math/fuzzy.man             math::fuzzy              {Fuzzy comparison of floating-point numbers}]
[item modules/math/math_geometry.man     math::geometry           {Geometrical computations}]
[item modules/math/interpolate.man       math::interpolate        {Interpolation routines}]
[item modules/math/linalg.man            math::linearalgebra      {Linear Algebra}]

[item modules/math/numtheory.man         math::numtheory          {Number Theory}]
[item modules/math/optimize.man          math::optimize           {Optimisation routines}]

[item modules/math/polynomials.man       math::polynomials        {Polynomial functions}]


[item modules/math/rational_funcs.man    math::rationalfunctions  {Polynomial functions}]
[item modules/math/roman.man             math::roman              {Tools for creating and manipulating roman numerals}]
[item modules/math/special.man           math::special            {Special mathematical functions}]
[item modules/math/statistics.man        math::statistics         {Basic statistical functions and procedures}]
[item modules/math/machineparameters.man tclrep/machineparameters {Compute double precision machine parameters.}]
[division_end]
[division_start md4]
[item modules/md4/md4.man md4 {MD4 Message-Digest Algorithm}]
[division_end]
[division_start md5]
[item modules/md5/md5.man md5 {MD5 Message-Digest Algorithm}]
[division_end]
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
[division_end]
[division_start ntp]
[item modules/ntp/ntp_time.man ntp_time {Tcl Time Service Client}]
[division_end]
[division_start oauth]
[item modules/oauth/oauth.man oauth {oauth API base signature}]
[division_end]
[division_start oometa]
[item modules/oometa/oometa.man oometa {oo::meta A data registry for classess}]
[division_end]
[division_start ooutil]
[item modules/ooutil/ooutil.man oo::util {Utility commands for TclOO}]
[division_end]
[division_start otp]
[item modules/otp/otp.man otp {One-Time Passwords}]
[division_end]
[division_start page]







<
<
<







843
844
845
846
847
848
849



850
851
852
853
854
855
856
[division_end]
[division_start ntp]
[item modules/ntp/ntp_time.man ntp_time {Tcl Time Service Client}]
[division_end]
[division_start oauth]
[item modules/oauth/oauth.man oauth {oauth API base signature}]
[division_end]



[division_start ooutil]
[item modules/ooutil/ooutil.man oo::util {Utility commands for TclOO}]
[division_end]
[division_start otp]
[item modules/otp/otp.man otp {One-Time Passwords}]
[division_end]
[division_start page]
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
[division_end]
[division_start struct]
[item modules/struct/disjointset.man  struct::disjointset {Disjoint set data structure}]
[item modules/struct/graph.man        struct::graph       {Create and manipulate directed graph objects}]
[item modules/struct/graphops.man     struct::graph::op   {Operation for (un)directed graph objects}]
[item modules/struct/graph1.man       struct::graph_v1    {Create and manipulate directed graph objects}]
[item modules/struct/struct_list.man  struct::list        {Procedures for manipulating lists}]
[item modules/struct/struct_map.man   struct::map         {Manage key/value maps}]
[item modules/struct/matrix.man       struct::matrix      {Create and manipulate matrix objects}]
[item modules/struct/matrix1.man      struct::matrix_v1   {Create and manipulate matrix objects}]
[item modules/struct/pool.man         struct::pool        {Create and manipulate pool objects (of discrete items)}]
[item modules/struct/prioqueue.man    struct::prioqueue   {Create and manipulate prioqueue objects}]
[item modules/struct/queue.man        struct::queue       {Create and manipulate queue objects}]
[item modules/struct/record.man       struct::record      {Define and create records (similar to 'C' structures)}]
[item modules/struct/struct_set.man   struct::set         {Procedures for manipulating sets}]







<







989
990
991
992
993
994
995

996
997
998
999
1000
1001
1002
[division_end]
[division_start struct]
[item modules/struct/disjointset.man  struct::disjointset {Disjoint set data structure}]
[item modules/struct/graph.man        struct::graph       {Create and manipulate directed graph objects}]
[item modules/struct/graphops.man     struct::graph::op   {Operation for (un)directed graph objects}]
[item modules/struct/graph1.man       struct::graph_v1    {Create and manipulate directed graph objects}]
[item modules/struct/struct_list.man  struct::list        {Procedures for manipulating lists}]

[item modules/struct/matrix.man       struct::matrix      {Create and manipulate matrix objects}]
[item modules/struct/matrix1.man      struct::matrix_v1   {Create and manipulate matrix objects}]
[item modules/struct/pool.man         struct::pool        {Create and manipulate pool objects (of discrete items)}]
[item modules/struct/prioqueue.man    struct::prioqueue   {Create and manipulate prioqueue objects}]
[item modules/struct/queue.man        struct::queue       {Create and manipulate queue objects}]
[item modules/struct/record.man       struct::record      {Define and create records (similar to 'C' structures)}]
[item modules/struct/struct_set.man   struct::set         {Procedures for manipulating sets}]
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
[item modules/term/term_bind.man    term::receive::bind      {Keyboard dispatch from terminals}]
[item modules/term/term_send.man    term::send               {General output to terminals}]
[division_end]
[division_start textutil]
[item modules/textutil/textutil.man        textutil           {Procedures to manipulate texts and strings.}]
[item modules/textutil/adjust.man          textutil::adjust   {Procedures to adjust, indent, and undent paragraphs}]
[item modules/textutil/expander.man        textutil::expander {Procedures to process templates and expand text.}]
[item modules/textutil/patch.man           textutil::patch    {Application of uni-diff patches to directory trees}]
[item modules/textutil/repeat.man          textutil::repeat   {Procedures to repeat strings.}]
[item modules/textutil/textutil_split.man  textutil::split    {Procedures to split texts}]
[item modules/textutil/textutil_string.man textutil::string   {Procedures to manipulate texts and strings.}]
[item modules/textutil/tabify.man          textutil::tabify   {Procedures to (un)tabify strings}]
[item modules/textutil/trim.man            textutil::trim     {Procedures to trim strings}]
[division_end]
[division_start tie]
[item modules/tie/tie.man     tie {Array persistence}]
[item modules/tie/tie_std.man tie {Array persistence, standard data sources}]
[division_end]
[division_start tiff]
[item modules/tiff/tiff.man tiff {TIFF reading, writing, and querying and manipulation of meta data}]
[division_end]
[division_start tool]
[item modules/tool/meta.man               oo::util            {Utility commands for TclOO}]
[item modules/tool/tool.man               tool                {TclOO Library (TOOL) Framework}]
[item modules/tool/tool_dict_ensemble.man tool::dict_ensemble {Dictionary Tools}]
[division_end]
[division_start transfer]
[item modules/transfer/connect.man     transfer::connect           {Connection setup}]
[item modules/transfer/copyops.man     transfer::copy              {Data transfer foundation}]
[item modules/transfer/tqueue.man      transfer::copy::queue       {Queued transfers}]
[item modules/transfer/ddest.man       transfer::data::destination {Data destination}]







<















|







1028
1029
1030
1031
1032
1033
1034

1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
[item modules/term/term_bind.man    term::receive::bind      {Keyboard dispatch from terminals}]
[item modules/term/term_send.man    term::send               {General output to terminals}]
[division_end]
[division_start textutil]
[item modules/textutil/textutil.man        textutil           {Procedures to manipulate texts and strings.}]
[item modules/textutil/adjust.man          textutil::adjust   {Procedures to adjust, indent, and undent paragraphs}]
[item modules/textutil/expander.man        textutil::expander {Procedures to process templates and expand text.}]

[item modules/textutil/repeat.man          textutil::repeat   {Procedures to repeat strings.}]
[item modules/textutil/textutil_split.man  textutil::split    {Procedures to split texts}]
[item modules/textutil/textutil_string.man textutil::string   {Procedures to manipulate texts and strings.}]
[item modules/textutil/tabify.man          textutil::tabify   {Procedures to (un)tabify strings}]
[item modules/textutil/trim.man            textutil::trim     {Procedures to trim strings}]
[division_end]
[division_start tie]
[item modules/tie/tie.man     tie {Array persistence}]
[item modules/tie/tie_std.man tie {Array persistence, standard data sources}]
[division_end]
[division_start tiff]
[item modules/tiff/tiff.man tiff {TIFF reading, writing, and querying and manipulation of meta data}]
[division_end]
[division_start tool]
[item modules/tool/meta.man               oo::util            {Utility commands for TclOO}]
[item modules/tool/tool.man               tool                {Dictionary Tools}]
[item modules/tool/tool_dict_ensemble.man tool::dict_ensemble {Dictionary Tools}]
[division_end]
[division_start transfer]
[item modules/transfer/connect.man     transfer::connect           {Connection setup}]
[item modules/transfer/copyops.man     transfer::copy              {Data transfer foundation}]
[item modules/transfer/tqueue.man      transfer::copy::queue       {Queued transfers}]
[item modules/transfer/ddest.man       transfer::data::destination {Data destination}]

Changes to support/devel/sak/doc/toc_cats.txt.

193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
[division_end]
[division_start Mathematics]
[item modules/math/math.man                    math                    {Tcl Math Library}]
[item modules/math/bigfloat.man                math::bigfloat          {Arbitrary precision floating-point numbers}]
[item modules/math/bignum.man                  math::bignum            {Arbitrary precision integer numbers}]
[item modules/math/calculus.man                math::calculus          {Integration and ordinary differential equations}]
[item modules/math/romberg.man                 math::calculus::romberg {Romberg integration}]
[item modules/math/changepoint.man             math::changepoint       {Change point detection methods}]
[item modules/math/combinatorics.man           math::combinatorics     {Combinatorial functions in the Tcl Math Library}]
[item modules/math/qcomplex.man                math::complexnumbers    {Straightforward complex number package}]
[item modules/math/constants.man               math::constants         {Mathematical and numerical constants}]
[item modules/math/decimal.man                 math::decimal           {General decimal arithmetic}]
[item modules/math/exact.man                   math::exact             {Exact Real Arithmetic}]
[item modules/math/filtergen.man               math::filters           {Digital filters}]
[item modules/math/fourier.man                 math::fourier           {Discrete and fast fourier transforms}]
[item modules/math/fuzzy.man                   math::fuzzy             {Fuzzy comparison of floating-point numbers}]
[item modules/math/math_geometry.man           math::geometry          {Geometrical computations}]
[item modules/math/interpolate.man             math::interpolate       {Interpolation routines}]
[item modules/math/linalg.man                  math::linearalgebra     {Linear Algebra}]
[item modules/math/numtheory.man               math::numtheory         {Number Theory}]
[item modules/math/optimize.man                math::optimize          {Optimisation routines}]
[item modules/math/pca.man                     math::PCA               {Package for Principal Component Analysis}]
[item modules/math/polynomials.man             math::polynomials       {Polynomial functions}]
[item modules/math/probopt.man                 math::probopt           {Probabilistic optimisation methods}]
[item modules/math/quasirandom.man             math::quasirandom       {Quasi-random points for integration and Monte Carlo type methods}]
[item modules/math/rational_funcs.man          math::rationalfunctions {Polynomial functions}]
[item modules/math/roman.man                   math::roman             {Tools for creating and manipulating roman numerals}]
[item modules/math/special.man                 math::special           {Special mathematical functions}]
[item modules/math/statistics.man              math::statistics        {Basic statistical functions and procedures}]
[item modules/math/trig.man                    math::trig              {Trigonometric anf hyperbolic functions}]
[item modules/simulation/annealing.man         simulation::annealing   {Simulated annealing}]
[item modules/simulation/montecarlo.man        simulation::montecarlo  {Monte Carlo simulations}]
[item modules/simulation/simulation_random.man simulation::random      {Pseudo-random number generators}]
[division_end]
[division_start Networking]
[item modules/asn/asn.man               asn                {ASN.1 BER encoder/decoder}]
[item modules/http/autoproxy.man        autoproxy          {Automatic HTTP proxy usage and authentication}]
[item modules/bee/bee.man               bee                {BitTorrent Serialization Format Encoder/Decoder}]
[item modules/dns/tcllib_dns.man        dns                {Tcl Domain Name Service Client}]
[item modules/ftp/ftp.man               ftp                {Client-side tcl implementation of the ftp protocol}]
[item modules/ftp/ftp_geturl.man        ftp::geturl        {Uri handler for ftp urls}]
[item modules/ftpd/ftpd.man             ftpd               {Tcl FTP server implementation}]
[item modules/httpd/httpd.man           httpd              {A TclOO and coroutine based web server}]
[item modules/ident/ident.man           ident              {Ident protocol client}]
[item modules/imap4/imap4.man           imap4              {imap client-side tcl implementation of imap protocol}]
[item modules/irc/irc.man               irc                {Create IRC connection and interface.}]
[item modules/ldap/ldap.man             ldap               {LDAP client}]
[item modules/ldap/ldapx.man            ldapx              {LDAP extended object interface}]
[item modules/nns/nns_client.man        nameserv           {Name service facility, Client}]
[item modules/nns/nns_auto.man          nameserv::auto     {Name service facility, Client Extension}]
[item modules/nns/nns_common.man        nameserv::common   {Name service facility, shared definitions}]
[item modules/nns/nns_protocol.man      nameserv::protocol {Name service facility, client/server protocol}]







<





<







<

<
<




<












<

<







193
194
195
196
197
198
199

200
201
202
203
204

205
206
207
208
209
210
211

212


213
214
215
216

217
218
219
220
221
222
223
224
225
226
227
228

229

230
231
232
233
234
235
236
[division_end]
[division_start Mathematics]
[item modules/math/math.man                    math                    {Tcl Math Library}]
[item modules/math/bigfloat.man                math::bigfloat          {Arbitrary precision floating-point numbers}]
[item modules/math/bignum.man                  math::bignum            {Arbitrary precision integer numbers}]
[item modules/math/calculus.man                math::calculus          {Integration and ordinary differential equations}]
[item modules/math/romberg.man                 math::calculus::romberg {Romberg integration}]

[item modules/math/combinatorics.man           math::combinatorics     {Combinatorial functions in the Tcl Math Library}]
[item modules/math/qcomplex.man                math::complexnumbers    {Straightforward complex number package}]
[item modules/math/constants.man               math::constants         {Mathematical and numerical constants}]
[item modules/math/decimal.man                 math::decimal           {General decimal arithmetic}]
[item modules/math/exact.man                   math::exact             {Exact Real Arithmetic}]

[item modules/math/fourier.man                 math::fourier           {Discrete and fast fourier transforms}]
[item modules/math/fuzzy.man                   math::fuzzy             {Fuzzy comparison of floating-point numbers}]
[item modules/math/math_geometry.man           math::geometry          {Geometrical computations}]
[item modules/math/interpolate.man             math::interpolate       {Interpolation routines}]
[item modules/math/linalg.man                  math::linearalgebra     {Linear Algebra}]
[item modules/math/numtheory.man               math::numtheory         {Number Theory}]
[item modules/math/optimize.man                math::optimize          {Optimisation routines}]

[item modules/math/polynomials.man             math::polynomials       {Polynomial functions}]


[item modules/math/rational_funcs.man          math::rationalfunctions {Polynomial functions}]
[item modules/math/roman.man                   math::roman             {Tools for creating and manipulating roman numerals}]
[item modules/math/special.man                 math::special           {Special mathematical functions}]
[item modules/math/statistics.man              math::statistics        {Basic statistical functions and procedures}]

[item modules/simulation/annealing.man         simulation::annealing   {Simulated annealing}]
[item modules/simulation/montecarlo.man        simulation::montecarlo  {Monte Carlo simulations}]
[item modules/simulation/simulation_random.man simulation::random      {Pseudo-random number generators}]
[division_end]
[division_start Networking]
[item modules/asn/asn.man               asn                {ASN.1 BER encoder/decoder}]
[item modules/http/autoproxy.man        autoproxy          {Automatic HTTP proxy usage and authentication}]
[item modules/bee/bee.man               bee                {BitTorrent Serialization Format Encoder/Decoder}]
[item modules/dns/tcllib_dns.man        dns                {Tcl Domain Name Service Client}]
[item modules/ftp/ftp.man               ftp                {Client-side tcl implementation of the ftp protocol}]
[item modules/ftp/ftp_geturl.man        ftp::geturl        {Uri handler for ftp urls}]
[item modules/ftpd/ftpd.man             ftpd               {Tcl FTP server implementation}]

[item modules/ident/ident.man           ident              {Ident protocol client}]

[item modules/irc/irc.man               irc                {Create IRC connection and interface.}]
[item modules/ldap/ldap.man             ldap               {LDAP client}]
[item modules/ldap/ldapx.man            ldapx              {LDAP extended object interface}]
[item modules/nns/nns_client.man        nameserv           {Name service facility, Client}]
[item modules/nns/nns_auto.man          nameserv::auto     {Name service facility, Client Extension}]
[item modules/nns/nns_common.man        nameserv::common   {Name service facility, shared definitions}]
[item modules/nns/nns_protocol.man      nameserv::protocol {Name service facility, client/server protocol}]
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
[item modules/pt/pt_peg_op.man                pt_peg_op                          {Parser Tools PE Grammar Utility Operations}]
[division_end]
[division_start {Procedures, arguments, parameters, options}]
[item modules/tepam/tepam_introduction.man tepam            {An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager}]
[item modules/tepam/tepam_procedure.man    tepam::procedure {TEPAM procedure, reference manual}]
[division_end]
[division_start {Programming tools}]
[item modules/clay/clay.man               clay                      {A minimalist framework for large scale OO Projects}]
[item modules/cmdline/cmdline.man         cmdline                   {Procedures to process command lines and options.}]
[item modules/comm/comm.man               comm                      {A remote communication facility for Tcl (8.3 and later)}]
[item modules/comm/comm_wire.man          comm_wire                 {The comm wire protocol}]
[item modules/control/control.man         control                   {Procedures for control flow structures.}]
[item modules/interp/deleg_method.man     deleg_method              {Creation of comm delegates (snit methods)}]
[item modules/interp/deleg_proc.man       deleg_proc                {Creation of comm delegates (procedures)}]
[item modules/fileutil/fileutil.man       fileutil                  {Procedures implementing some file utilities}]







<







317
318
319
320
321
322
323

324
325
326
327
328
329
330
[item modules/pt/pt_peg_op.man                pt_peg_op                          {Parser Tools PE Grammar Utility Operations}]
[division_end]
[division_start {Procedures, arguments, parameters, options}]
[item modules/tepam/tepam_introduction.man tepam            {An introduction into TEPAM, Tcl's Enhanced Procedure and Argument Manager}]
[item modules/tepam/tepam_procedure.man    tepam::procedure {TEPAM procedure, reference manual}]
[division_end]
[division_start {Programming tools}]

[item modules/cmdline/cmdline.man         cmdline                   {Procedures to process command lines and options.}]
[item modules/comm/comm.man               comm                      {A remote communication facility for Tcl (8.3 and later)}]
[item modules/comm/comm_wire.man          comm_wire                 {The comm wire protocol}]
[item modules/control/control.man         control                   {Procedures for control flow structures.}]
[item modules/interp/deleg_method.man     deleg_method              {Creation of comm delegates (snit methods)}]
[item modules/interp/deleg_proc.man       deleg_proc                {Creation of comm delegates (procedures)}]
[item modules/fileutil/fileutil.man       fileutil                  {Procedures implementing some file utilities}]
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
[division_end]
[division_start System]
[item modules/cron/cron.man             cron       {Tool for automating the period callback of commands}]
[item modules/nettool/nettool.man       nettool    {Tools for networked applications}]
[item modules/processman/processman.man processman {Tool for automating the period callback of commands}]
[division_end]
[division_start TclOO]
[item modules/oometa/oometa.man   oometa  {oo::meta A data registry for classess}]
[item modules/practcl/practcl.man practcl {The Practcl Module}]
[item modules/tool/tool.man       tool    {TclOO Library (TOOL) Framework}]
[division_end]
[division_start {Terminal control}]
[item modules/term/term.man         term                     {General terminal control}]
[item modules/term/ansi_code.man    term::ansi::code         {Helper for control sequences}]
[item modules/term/ansi_cattr.man   term::ansi::code::attr   {ANSI attribute sequences}]
[item modules/term/ansi_cctrl.man   term::ansi::code::ctrl   {ANSI control sequences}]
[item modules/term/ansi_cmacros.man term::ansi::code::macros {Macro sequences}]







<

<







355
356
357
358
359
360
361

362

363
364
365
366
367
368
369
[division_end]
[division_start System]
[item modules/cron/cron.man             cron       {Tool for automating the period callback of commands}]
[item modules/nettool/nettool.man       nettool    {Tools for networked applications}]
[item modules/processman/processman.man processman {Tool for automating the period callback of commands}]
[division_end]
[division_start TclOO]

[item modules/practcl/practcl.man practcl {The Practcl Module}]

[division_end]
[division_start {Terminal control}]
[item modules/term/term.man         term                     {General terminal control}]
[item modules/term/ansi_code.man    term::ansi::code         {Helper for control sequences}]
[item modules/term/ansi_cattr.man   term::ansi::code::attr   {ANSI attribute sequences}]
[item modules/term/ansi_cctrl.man   term::ansi::code::ctrl   {ANSI control sequences}]
[item modules/term/ansi_cmacros.man term::ansi::code::macros {Macro sequences}]
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449

450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477

478
479
480
481
482
483
484
[item modules/base64/ascii85.man           ascii85              {ascii85-encode/decode binary data}]
[item modules/base32/base32.man            base32               {base32 standard encoding}]
[item modules/base32/base32core.man        base32::core         {Expanding basic base32 maps}]
[item modules/base32/base32hex.man         base32::hex          {base32 extended hex encoding}]
[item modules/base64/base64.man            base64               {base64-encode/decode binary data}]
[item modules/bibtex/bibtex.man            bibtex               {Parse bibtex files}]
[item modules/clock/iso8601.man            clock_iso8601        {Parsing ISO 8601 dates/times}]
[item modules/clock/rfc2822.man            clock_rfc2822        {Parsing RFC 2822 dates/times}]
[item modules/csv/csv.man                  csv                  {Procedures to handle CSV data.}]
[item modules/htmlparse/htmlparse.man      htmlparse            {Procedures to parse HTML strings}]
[item modules/inifile/ini.man              inifile              {Parsing of Windows INI files}]
[item modules/markdown/markdown.man        markdown             {Converts Markdown text to HTML}]
[item modules/mime/mime.man                mime                 {Manipulation of MIME body parts}]
[item modules/rcs/rcs.man                  rcs                  {RCS low level utilities}]
[item modules/string/token.man             string::token        {Regex based iterative lexing}]
[item modules/string/token_shell.man       string::token::shell {Parsing of shell command line}]
[item modules/textutil/textutil.man        textutil             {Procedures to manipulate texts and strings.}]
[item modules/textutil/adjust.man          textutil::adjust     {Procedures to adjust, indent, and undent paragraphs}]
[item modules/textutil/patch.man           textutil::patch      {Application of uni-diff patches to directory trees}]
[item modules/textutil/repeat.man          textutil::repeat     {Procedures to repeat strings.}]
[item modules/textutil/textutil_split.man  textutil::split      {Procedures to split texts}]
[item modules/textutil/textutil_string.man textutil::string     {Procedures to manipulate texts and strings.}]
[item modules/textutil/tabify.man          textutil::tabify     {Procedures to (un)tabify strings}]
[item modules/textutil/trim.man            textutil::trim       {Procedures to trim strings}]
[item modules/base64/uuencode.man          uuencode             {UU-encode/decode binary data}]
[item modules/amazon-s3/xsxp.man           xsxp                 {eXtremely Simple Xml Parser}]
[item modules/base64/yencode.man           yencode              {Y-encode/decode binary data}]
[division_end]
[division_start {Transfer module}]
[item modules/transfer/connect.man     transfer::connect           {Connection setup}]
[item modules/transfer/copyops.man     transfer::copy              {Data transfer foundation}]
[item modules/transfer/tqueue.man      transfer::copy::queue       {Queued transfers}]
[item modules/transfer/ddest.man       transfer::data::destination {Data destination}]
[item modules/transfer/dsource.man     transfer::data::source      {Data source}]
[item modules/transfer/receiver.man    transfer::receiver          {Data source}]
[item modules/transfer/transmitter.man transfer::transmitter       {Data source}]
[division_end]
[division_start Unfiled]
[item modules/cache/async.man                cache::async            {Asynchronous in-memory cache}]
[item modules/fileutil/paths.man             fileutil::paths         {Manage search path pools}]
[item modules/generator/generator.man        generator               {Procedures for creating and using generators.}]
[item modules/yaml/huddle.man                huddle                  {Create and manipulate huddle object}]

[item modules/map/map_geocode_nominatim.man  map::geocode::nominatim {Resolving geographical names with a Nominatim service}]
[item modules/map/map_slippy.man             map::slippy             {Common code for slippy based map packages}]
[item modules/map/map_slippy_cache.man       map::slippy::cache      {Management of a tile cache in the local filesystem}]
[item modules/map/map_slippy_fetcher.man     map::slippy::fetcher    {Accessing a server providing tiles for slippy-based maps}]
[item modules/mapproj/mapproj.man            mapproj                 {Map projection routines}]
[item modules/math/symdiff.man               math::calculus::symdiff {Symbolic differentiation for Tcl}]
[item modules/math/machineparameters.man     math::machineparameters {Compute double precision machine parameters.}]
[item modules/namespacex/namespacex.man      namespacex              {Namespace utility commands}]
[item modules/rest/rest.man                  rest                    {define REST web APIs and call them inline or asychronously}]
[item modules/stringprep/stringprep.man      stringprep              {Implementation of stringprep}]
[item modules/stringprep/stringprep_data.man stringprep::data        {stringprep data tables, generated, internal}]
[item modules/struct/struct_map.man          struct::map             {Manage key/value maps}]
[item modules/uev/uevent_onidle.man          uevent::onidle          {Request merging and deferal to idle time}]
[item modules/stringprep/unicode.man         unicode                 {Implementation of Unicode normalization}]
[item modules/stringprep/unicode_data.man    unicode::data           {unicode data tables, generated, internal}]
[item modules/units/units.man                units                   {unit conversion}]
[item modules/yaml/yaml.man                  yaml                    {YAML Format Encoder/Decoder}]
[division_end]
[division_start Utilities]
[item modules/dicttool/dicttool.man dicttool {Dictionary Tools}]
[division_end]
[division_start Utility]
[item modules/defer/defer.man             defer               {Defered execution}]
[item modules/lambda/lambda.man           lambda              {Utility commands for anonymous procedures}]
[item modules/lazyset/lazyset.man         lazyset             {Lazy evaluation}]
[item modules/ooutil/ooutil.man           oo::util            {Utility commands for TclOO}]
[item modules/tool/meta.man               oo::util            {Utility commands for TclOO}]
[item modules/try/tcllib_throw.man        throw               {throw - Throw an error exception with a message}]

[item modules/tool/tool_dict_ensemble.man tool::dict_ensemble {Dictionary Tools}]
[item modules/try/tcllib_try.man          try                 {try - Trap and process errors and exceptions}]
[division_end]
[division_start {Validation, Type checking}]
[item modules/valtype/valtype_common.man valtype::common                 {Validation, common code}]
[item modules/valtype/cc_amex.man        valtype::creditcard::amex       {Validation for AMEX creditcard number}]
[item modules/valtype/cc_discover.man    valtype::creditcard::discover   {Validation for Discover creditcard number}]







|










<



















|
<
|
|
>
|
|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|

|



<

<



>







397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414

415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434

435
436
437
438
439
440
441
442
443

444
445
446
447
448
449
450
451
452
453
454
455
456
457
458

459

460
461
462
463
464
465
466
467
468
469
470
[item modules/base64/ascii85.man           ascii85              {ascii85-encode/decode binary data}]
[item modules/base32/base32.man            base32               {base32 standard encoding}]
[item modules/base32/base32core.man        base32::core         {Expanding basic base32 maps}]
[item modules/base32/base32hex.man         base32::hex          {base32 extended hex encoding}]
[item modules/base64/base64.man            base64               {base64-encode/decode binary data}]
[item modules/bibtex/bibtex.man            bibtex               {Parse bibtex files}]
[item modules/clock/iso8601.man            clock_iso8601        {Parsing ISO 8601 dates/times}]
[item modules/clock/rfc2822.man            clock_rfc2822        {Parsing ISO 8601 dates/times}]
[item modules/csv/csv.man                  csv                  {Procedures to handle CSV data.}]
[item modules/htmlparse/htmlparse.man      htmlparse            {Procedures to parse HTML strings}]
[item modules/inifile/ini.man              inifile              {Parsing of Windows INI files}]
[item modules/markdown/markdown.man        markdown             {Converts Markdown text to HTML}]
[item modules/mime/mime.man                mime                 {Manipulation of MIME body parts}]
[item modules/rcs/rcs.man                  rcs                  {RCS low level utilities}]
[item modules/string/token.man             string::token        {Regex based iterative lexing}]
[item modules/string/token_shell.man       string::token::shell {Parsing of shell command line}]
[item modules/textutil/textutil.man        textutil             {Procedures to manipulate texts and strings.}]
[item modules/textutil/adjust.man          textutil::adjust     {Procedures to adjust, indent, and undent paragraphs}]

[item modules/textutil/repeat.man          textutil::repeat     {Procedures to repeat strings.}]
[item modules/textutil/textutil_split.man  textutil::split      {Procedures to split texts}]
[item modules/textutil/textutil_string.man textutil::string     {Procedures to manipulate texts and strings.}]
[item modules/textutil/tabify.man          textutil::tabify     {Procedures to (un)tabify strings}]
[item modules/textutil/trim.man            textutil::trim       {Procedures to trim strings}]
[item modules/base64/uuencode.man          uuencode             {UU-encode/decode binary data}]
[item modules/amazon-s3/xsxp.man           xsxp                 {eXtremely Simple Xml Parser}]
[item modules/base64/yencode.man           yencode              {Y-encode/decode binary data}]
[division_end]
[division_start {Transfer module}]
[item modules/transfer/connect.man     transfer::connect           {Connection setup}]
[item modules/transfer/copyops.man     transfer::copy              {Data transfer foundation}]
[item modules/transfer/tqueue.man      transfer::copy::queue       {Queued transfers}]
[item modules/transfer/ddest.man       transfer::data::destination {Data destination}]
[item modules/transfer/dsource.man     transfer::data::source      {Data source}]
[item modules/transfer/receiver.man    transfer::receiver          {Data source}]
[item modules/transfer/transmitter.man transfer::transmitter       {Data source}]
[division_end]
[division_start Unfiled]
[item modules/cache/async.man                cache::async             {Asynchronous in-memory cache}]

[item modules/generator/generator.man        generator                {Procedures for creating and using generators.}]
[item modules/yaml/huddle.man                huddle                   {Create and manipulate huddle object}]
[item modules/imap4/imap4.man                imap4                    {imap client-side tcl implementation of imap protocol}]
[item modules/map/map_geocode_nominatim.man  map::geocode::nominatim  {Resolving geographical names with a Nominatim service}]
[item modules/map/map_slippy.man             map::slippy              {Common code for slippy based map packages}]
[item modules/map/map_slippy_cache.man       map::slippy::cache       {Management of a tile cache in the local filesystem}]
[item modules/map/map_slippy_fetcher.man     map::slippy::fetcher     {Accessing a server providing tiles for slippy-based maps}]
[item modules/mapproj/mapproj.man            mapproj                  {Map projection routines}]
[item modules/math/symdiff.man               math::calculus::symdiff  {Symbolic differentiation for Tcl}]

[item modules/namespacex/namespacex.man      namespacex               {Namespace utility commands}]
[item modules/rest/rest.man                  rest                     {define REST web APIs and call them inline or asychronously}]
[item modules/stringprep/stringprep.man      stringprep               {Implementation of stringprep}]
[item modules/stringprep/stringprep_data.man stringprep::data         {stringprep data tables, generated, internal}]
[item modules/math/machineparameters.man     tclrep/machineparameters {Compute double precision machine parameters.}]
[item modules/uev/uevent_onidle.man          uevent::onidle           {Request merging and deferal to idle time}]
[item modules/stringprep/unicode.man         unicode                  {Implementation of Unicode normalization}]
[item modules/stringprep/unicode_data.man    unicode::data            {unicode data tables, generated, internal}]
[item modules/units/units.man                units                    {unit conversion}]
[item modules/yaml/yaml.man                  yaml                     {YAML Format Encoder/Decoder}]
[division_end]
[division_start Utilites]
[item modules/dicttool/dicttool.man dicttool {Dictionary Tools}]
[division_end]
[division_start Utility]

[item modules/lambda/lambda.man           lambda              {Utility commands for anonymous procedures}]

[item modules/ooutil/ooutil.man           oo::util            {Utility commands for TclOO}]
[item modules/tool/meta.man               oo::util            {Utility commands for TclOO}]
[item modules/try/tcllib_throw.man        throw               {throw - Throw an error exception with a message}]
[item modules/tool/tool.man               tool                {Dictionary Tools}]
[item modules/tool/tool_dict_ensemble.man tool::dict_ensemble {Dictionary Tools}]
[item modules/try/tcllib_try.man          try                 {try - Trap and process errors and exceptions}]
[division_end]
[division_start {Validation, Type checking}]
[item modules/valtype/valtype_common.man valtype::common                 {Validation, common code}]
[item modules/valtype/cc_amex.man        valtype::creditcard::amex       {Validation for AMEX creditcard number}]
[item modules/valtype/cc_discover.man    valtype::creditcard::discover   {Validation for Discover creditcard number}]

Changes to support/devel/sak/doc/toc_mods.txt.

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
[division_end]
[division_start blowfish]
[item modules/blowfish/blowfish.man blowfish {Implementation of the Blowfish block cipher}]
[division_end]
[division_start cache]
[item modules/cache/async.man cache::async {Asynchronous in-memory cache}]
[division_end]
[division_start clay]
[item modules/clay/clay.man clay {A minimalist framework for large scale OO Projects}]
[division_end]
[division_start clock]
[item modules/clock/iso8601.man clock_iso8601 {Parsing ISO 8601 dates/times}]
[item modules/clock/rfc2822.man clock_rfc2822 {Parsing RFC 2822 dates/times}]
[division_end]
[division_start cmdline]
[item modules/cmdline/cmdline.man cmdline {Procedures to process command lines and options.}]
[division_end]
[division_start comm]
[item modules/comm/comm.man      comm      {A remote communication facility for Tcl (8.3 and later)}]
[item modules/comm/comm_wire.man comm_wire {The comm wire protocol}]







<
<
<


|







38
39
40
41
42
43
44



45
46
47
48
49
50
51
52
53
54
[division_end]
[division_start blowfish]
[item modules/blowfish/blowfish.man blowfish {Implementation of the Blowfish block cipher}]
[division_end]
[division_start cache]
[item modules/cache/async.man cache::async {Asynchronous in-memory cache}]
[division_end]



[division_start clock]
[item modules/clock/iso8601.man clock_iso8601 {Parsing ISO 8601 dates/times}]
[item modules/clock/rfc2822.man clock_rfc2822 {Parsing ISO 8601 dates/times}]
[division_end]
[division_start cmdline]
[item modules/cmdline/cmdline.man cmdline {Procedures to process command lines and options.}]
[division_end]
[division_start comm]
[item modules/comm/comm.man      comm      {A remote communication facility for Tcl (8.3 and later)}]
[item modules/comm/comm_wire.man comm_wire {The comm wire protocol}]
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[division_end]
[division_start debug]
[item modules/debug/debug.man           debug            {debug narrative - core}]
[item modules/debug/debug_caller.man    debug::caller    {debug narrative - caller}]
[item modules/debug/debug_heartbeat.man debug::heartbeat {debug narrative - heartbeat}]
[item modules/debug/debug_timestamp.man debug::timestamp {debug narrative - timestamping}]
[division_end]
[division_start defer]
[item modules/defer/defer.man defer {Defered execution}]
[division_end]
[division_start des]
[item modules/des/des.man      des      {Implementation of the DES and triple-DES ciphers}]
[item modules/des/tcldes.man   tclDES   {Implementation of the DES and triple-DES ciphers}]
[item modules/des/tcldesjr.man tclDESjr {Implementation of the DES and triple-DES ciphers}]
[division_end]
[division_start dicttool]
[item modules/dicttool/dicttool.man dicttool {Dictionary Tools}]







<
<
<







77
78
79
80
81
82
83



84
85
86
87
88
89
90
[division_end]
[division_start debug]
[item modules/debug/debug.man           debug            {debug narrative - core}]
[item modules/debug/debug_caller.man    debug::caller    {debug narrative - caller}]
[item modules/debug/debug_heartbeat.man debug::heartbeat {debug narrative - heartbeat}]
[item modules/debug/debug_timestamp.man debug::timestamp {debug narrative - timestamping}]
[division_end]



[division_start des]
[item modules/des/des.man      des      {Implementation of the DES and triple-DES ciphers}]
[item modules/des/tcldes.man   tclDES   {Implementation of the DES and triple-DES ciphers}]
[item modules/des/tcldesjr.man tclDESjr {Implementation of the DES and triple-DES ciphers}]
[division_end]
[division_start dicttool]
[item modules/dicttool/dicttool.man dicttool {Dictionary Tools}]
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
[division_start dtplite]
[item modules/dtplite/pkg_dtplite.man dtplite {Lightweight DocTools Markup Processor}]
[division_end]
[division_start fileutil]
[item modules/fileutil/fileutil.man fileutil            {Procedures implementing some file utilities}]
[item modules/fileutil/multi.man    fileutil::multi     {Multi-file operation, scatter/gather, standard object}]
[item modules/fileutil/multiop.man  fileutil::multi::op {Multi-file operation, scatter/gather}]
[item modules/fileutil/paths.man    fileutil::paths     {Manage search path pools}]
[item modules/fileutil/traverse.man fileutil_traverse   {Iterative directory traversal}]
[division_end]
[division_start ftp]
[item modules/ftp/ftp.man        ftp         {Client-side tcl implementation of the ftp protocol}]
[item modules/ftp/ftp_geturl.man ftp::geturl {Uri handler for ftp urls}]
[division_end]
[division_start ftpd]







<







172
173
174
175
176
177
178

179
180
181
182
183
184
185
[division_start dtplite]
[item modules/dtplite/pkg_dtplite.man dtplite {Lightweight DocTools Markup Processor}]
[division_end]
[division_start fileutil]
[item modules/fileutil/fileutil.man fileutil            {Procedures implementing some file utilities}]
[item modules/fileutil/multi.man    fileutil::multi     {Multi-file operation, scatter/gather, standard object}]
[item modules/fileutil/multiop.man  fileutil::multi::op {Multi-file operation, scatter/gather}]

[item modules/fileutil/traverse.man fileutil_traverse   {Iterative directory traversal}]
[division_end]
[division_start ftp]
[item modules/ftp/ftp.man        ftp         {Client-side tcl implementation of the ftp protocol}]
[item modules/ftp/ftp_geturl.man ftp::geturl {Uri handler for ftp urls}]
[division_end]
[division_start ftpd]
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
[division_end]
[division_start htmlparse]
[item modules/htmlparse/htmlparse.man htmlparse {Procedures to parse HTML strings}]
[division_end]
[division_start http]
[item modules/http/autoproxy.man autoproxy {Automatic HTTP proxy usage and authentication}]
[division_end]
[division_start httpd]
[item modules/httpd/httpd.man httpd {A TclOO and coroutine based web server}]
[division_end]
[division_start ident]
[item modules/ident/ident.man ident {Ident protocol client}]
[division_end]
[division_start imap4]
[item modules/imap4/imap4.man imap4 {imap client-side tcl implementation of imap protocol}]
[division_end]
[division_start inifile]







<
<
<







228
229
230
231
232
233
234



235
236
237
238
239
240
241
[division_end]
[division_start htmlparse]
[item modules/htmlparse/htmlparse.man htmlparse {Procedures to parse HTML strings}]
[division_end]
[division_start http]
[item modules/http/autoproxy.man autoproxy {Automatic HTTP proxy usage and authentication}]
[division_end]



[division_start ident]
[item modules/ident/ident.man ident {Ident protocol client}]
[division_end]
[division_start imap4]
[item modules/imap4/imap4.man imap4 {imap client-side tcl implementation of imap protocol}]
[division_end]
[division_start inifile]
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
[division_start json]
[item modules/json/json.man       json        {JSON parser}]
[item modules/json/json_write.man json::write {JSON generation}]
[division_end]
[division_start lambda]
[item modules/lambda/lambda.man lambda {Utility commands for anonymous procedures}]
[division_end]
[division_start lazyset]
[item modules/lazyset/lazyset.man lazyset {Lazy evaluation}]
[division_end]
[division_start ldap]
[item modules/ldap/ldap.man  ldap  {LDAP client}]
[item modules/ldap/ldapx.man ldapx {LDAP extended object interface}]
[division_end]
[division_start log]
[item modules/log/log.man            log              {Procedures to log messages of libraries and applications.}]
[item modules/log/logger.man         logger           {System to control logging of events.}]







<
<
<







259
260
261
262
263
264
265



266
267
268
269
270
271
272
[division_start json]
[item modules/json/json.man       json        {JSON parser}]
[item modules/json/json_write.man json::write {JSON generation}]
[division_end]
[division_start lambda]
[item modules/lambda/lambda.man lambda {Utility commands for anonymous procedures}]
[division_end]



[division_start ldap]
[item modules/ldap/ldap.man  ldap  {LDAP client}]
[item modules/ldap/ldapx.man ldapx {LDAP extended object interface}]
[division_end]
[division_start log]
[item modules/log/log.man            log              {Procedures to log messages of libraries and applications.}]
[item modules/log/logger.man         logger           {System to control logging of events.}]
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
[division_start mapproj]
[item modules/mapproj/mapproj.man mapproj {Map projection routines}]
[division_end]
[division_start markdown]
[item modules/markdown/markdown.man markdown {Converts Markdown text to HTML}]
[division_end]
[division_start math]
[item modules/math/math.man              math                    {Tcl Math Library}]
[item modules/math/bigfloat.man          math::bigfloat          {Arbitrary precision floating-point numbers}]
[item modules/math/bignum.man            math::bignum            {Arbitrary precision integer numbers}]
[item modules/math/calculus.man          math::calculus          {Integration and ordinary differential equations}]
[item modules/math/romberg.man           math::calculus::romberg {Romberg integration}]
[item modules/math/symdiff.man           math::calculus::symdiff {Symbolic differentiation for Tcl}]
[item modules/math/changepoint.man       math::changepoint       {Change point detection methods}]
[item modules/math/combinatorics.man     math::combinatorics     {Combinatorial functions in the Tcl Math Library}]
[item modules/math/qcomplex.man          math::complexnumbers    {Straightforward complex number package}]
[item modules/math/constants.man         math::constants         {Mathematical and numerical constants}]
[item modules/math/decimal.man           math::decimal           {General decimal arithmetic}]
[item modules/math/exact.man             math::exact             {Exact Real Arithmetic}]
[item modules/math/filtergen.man         math::filters           {Digital filters}]
[item modules/math/fourier.man           math::fourier           {Discrete and fast fourier transforms}]
[item modules/math/fuzzy.man             math::fuzzy             {Fuzzy comparison of floating-point numbers}]
[item modules/math/math_geometry.man     math::geometry          {Geometrical computations}]
[item modules/math/interpolate.man       math::interpolate       {Interpolation routines}]
[item modules/math/linalg.man            math::linearalgebra     {Linear Algebra}]
[item modules/math/machineparameters.man math::machineparameters {Compute double precision machine parameters.}]
[item modules/math/numtheory.man         math::numtheory         {Number Theory}]
[item modules/math/optimize.man          math::optimize          {Optimisation routines}]
[item modules/math/pca.man               math::PCA               {Package for Principal Component Analysis}]
[item modules/math/polynomials.man       math::polynomials       {Polynomial functions}]
[item modules/math/probopt.man           math::probopt           {Probabilistic optimisation methods}]
[item modules/math/quasirandom.man       math::quasirandom       {Quasi-random points for integration and Monte Carlo type methods}]
[item modules/math/rational_funcs.man    math::rationalfunctions {Polynomial functions}]
[item modules/math/roman.man             math::roman             {Tools for creating and manipulating roman numerals}]
[item modules/math/special.man           math::special           {Special mathematical functions}]
[item modules/math/statistics.man        math::statistics        {Basic statistical functions and procedures}]
[item modules/math/trig.man              math::trig              {Trigonometric anf hyperbolic functions}]
[division_end]
[division_start md4]
[item modules/md4/md4.man md4 {MD4 Message-Digest Algorithm}]
[division_end]
[division_start md5]
[item modules/md5/md5.man md5 {MD5 Message-Digest Algorithm}]
[division_end]







|
|
|
|
|
|
<
|
|
|
|
|
<
|
|
|
|
|
<
|
|
<
|
<
<
|
|
|
|
|







282
283
284
285
286
287
288
289
290
291
292
293
294

295
296
297
298
299

300
301
302
303
304

305
306

307


308
309
310
311
312
313
314
315
316
317
318
319
[division_start mapproj]
[item modules/mapproj/mapproj.man mapproj {Map projection routines}]
[division_end]
[division_start markdown]
[item modules/markdown/markdown.man markdown {Converts Markdown text to HTML}]
[division_end]
[division_start math]
[item modules/math/math.man              math                     {Tcl Math Library}]
[item modules/math/bigfloat.man          math::bigfloat           {Arbitrary precision floating-point numbers}]
[item modules/math/bignum.man            math::bignum             {Arbitrary precision integer numbers}]
[item modules/math/calculus.man          math::calculus           {Integration and ordinary differential equations}]
[item modules/math/romberg.man           math::calculus::romberg  {Romberg integration}]
[item modules/math/symdiff.man           math::calculus::symdiff  {Symbolic differentiation for Tcl}]

[item modules/math/combinatorics.man     math::combinatorics      {Combinatorial functions in the Tcl Math Library}]
[item modules/math/qcomplex.man          math::complexnumbers     {Straightforward complex number package}]
[item modules/math/constants.man         math::constants          {Mathematical and numerical constants}]
[item modules/math/decimal.man           math::decimal            {General decimal arithmetic}]
[item modules/math/exact.man             math::exact              {Exact Real Arithmetic}]

[item modules/math/fourier.man           math::fourier            {Discrete and fast fourier transforms}]
[item modules/math/fuzzy.man             math::fuzzy              {Fuzzy comparison of floating-point numbers}]
[item modules/math/math_geometry.man     math::geometry           {Geometrical computations}]
[item modules/math/interpolate.man       math::interpolate        {Interpolation routines}]
[item modules/math/linalg.man            math::linearalgebra      {Linear Algebra}]

[item modules/math/numtheory.man         math::numtheory          {Number Theory}]
[item modules/math/optimize.man          math::optimize           {Optimisation routines}]

[item modules/math/polynomials.man       math::polynomials        {Polynomial functions}]


[item modules/math/rational_funcs.man    math::rationalfunctions  {Polynomial functions}]
[item modules/math/roman.man             math::roman              {Tools for creating and manipulating roman numerals}]
[item modules/math/special.man           math::special            {Special mathematical functions}]
[item modules/math/statistics.man        math::statistics         {Basic statistical functions and procedures}]
[item modules/math/machineparameters.man tclrep/machineparameters {Compute double precision machine parameters.}]
[division_end]
[division_start md4]
[item modules/md4/md4.man md4 {MD4 Message-Digest Algorithm}]
[division_end]
[division_start md5]
[item modules/md5/md5.man md5 {MD5 Message-Digest Algorithm}]
[division_end]
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
[division_end]
[division_start ntp]
[item modules/ntp/ntp_time.man ntp_time {Tcl Time Service Client}]
[division_end]
[division_start oauth]
[item modules/oauth/oauth.man oauth {oauth API base signature}]
[division_end]
[division_start oometa]
[item modules/oometa/oometa.man oometa {oo::meta A data registry for classess}]
[division_end]
[division_start ooutil]
[item modules/ooutil/ooutil.man oo::util {Utility commands for TclOO}]
[division_end]
[division_start otp]
[item modules/otp/otp.man otp {One-Time Passwords}]
[division_end]
[division_start page]







<
<
<







352
353
354
355
356
357
358



359
360
361
362
363
364
365
[division_end]
[division_start ntp]
[item modules/ntp/ntp_time.man ntp_time {Tcl Time Service Client}]
[division_end]
[division_start oauth]
[item modules/oauth/oauth.man oauth {oauth API base signature}]
[division_end]



[division_start ooutil]
[item modules/ooutil/ooutil.man oo::util {Utility commands for TclOO}]
[division_end]
[division_start otp]
[item modules/otp/otp.man otp {One-Time Passwords}]
[division_end]
[division_start page]
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
[division_end]
[division_start struct]
[item modules/struct/disjointset.man  struct::disjointset {Disjoint set data structure}]
[item modules/struct/graph.man        struct::graph       {Create and manipulate directed graph objects}]
[item modules/struct/graphops.man     struct::graph::op   {Operation for (un)directed graph objects}]
[item modules/struct/graph1.man       struct::graph_v1    {Create and manipulate directed graph objects}]
[item modules/struct/struct_list.man  struct::list        {Procedures for manipulating lists}]
[item modules/struct/struct_map.man   struct::map         {Manage key/value maps}]
[item modules/struct/matrix.man       struct::matrix      {Create and manipulate matrix objects}]
[item modules/struct/matrix1.man      struct::matrix_v1   {Create and manipulate matrix objects}]
[item modules/struct/pool.man         struct::pool        {Create and manipulate pool objects (of discrete items)}]
[item modules/struct/prioqueue.man    struct::prioqueue   {Create and manipulate prioqueue objects}]
[item modules/struct/queue.man        struct::queue       {Create and manipulate queue objects}]
[item modules/struct/record.man       struct::record      {Define and create records (similar to 'C' structures)}]
[item modules/struct/struct_set.man   struct::set         {Procedures for manipulating sets}]







<







498
499
500
501
502
503
504

505
506
507
508
509
510
511
[division_end]
[division_start struct]
[item modules/struct/disjointset.man  struct::disjointset {Disjoint set data structure}]
[item modules/struct/graph.man        struct::graph       {Create and manipulate directed graph objects}]
[item modules/struct/graphops.man     struct::graph::op   {Operation for (un)directed graph objects}]
[item modules/struct/graph1.man       struct::graph_v1    {Create and manipulate directed graph objects}]
[item modules/struct/struct_list.man  struct::list        {Procedures for manipulating lists}]

[item modules/struct/matrix.man       struct::matrix      {Create and manipulate matrix objects}]
[item modules/struct/matrix1.man      struct::matrix_v1   {Create and manipulate matrix objects}]
[item modules/struct/pool.man         struct::pool        {Create and manipulate pool objects (of discrete items)}]
[item modules/struct/prioqueue.man    struct::prioqueue   {Create and manipulate prioqueue objects}]
[item modules/struct/queue.man        struct::queue       {Create and manipulate queue objects}]
[item modules/struct/record.man       struct::record      {Define and create records (similar to 'C' structures)}]
[item modules/struct/struct_set.man   struct::set         {Procedures for manipulating sets}]
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
[item modules/term/term_bind.man    term::receive::bind      {Keyboard dispatch from terminals}]
[item modules/term/term_send.man    term::send               {General output to terminals}]
[division_end]
[division_start textutil]
[item modules/textutil/textutil.man        textutil           {Procedures to manipulate texts and strings.}]
[item modules/textutil/adjust.man          textutil::adjust   {Procedures to adjust, indent, and undent paragraphs}]
[item modules/textutil/expander.man        textutil::expander {Procedures to process templates and expand text.}]
[item modules/textutil/patch.man           textutil::patch    {Application of uni-diff patches to directory trees}]
[item modules/textutil/repeat.man          textutil::repeat   {Procedures to repeat strings.}]
[item modules/textutil/textutil_split.man  textutil::split    {Procedures to split texts}]
[item modules/textutil/textutil_string.man textutil::string   {Procedures to manipulate texts and strings.}]
[item modules/textutil/tabify.man          textutil::tabify   {Procedures to (un)tabify strings}]
[item modules/textutil/trim.man            textutil::trim     {Procedures to trim strings}]
[division_end]
[division_start tie]
[item modules/tie/tie.man     tie {Array persistence}]
[item modules/tie/tie_std.man tie {Array persistence, standard data sources}]
[division_end]
[division_start tiff]
[item modules/tiff/tiff.man tiff {TIFF reading, writing, and querying and manipulation of meta data}]
[division_end]
[division_start tool]
[item modules/tool/meta.man               oo::util            {Utility commands for TclOO}]
[item modules/tool/tool.man               tool                {TclOO Library (TOOL) Framework}]
[item modules/tool/tool_dict_ensemble.man tool::dict_ensemble {Dictionary Tools}]
[division_end]
[division_start transfer]
[item modules/transfer/connect.man     transfer::connect           {Connection setup}]
[item modules/transfer/copyops.man     transfer::copy              {Data transfer foundation}]
[item modules/transfer/tqueue.man      transfer::copy::queue       {Queued transfers}]
[item modules/transfer/ddest.man       transfer::data::destination {Data destination}]







<















|







537
538
539
540
541
542
543

544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
[item modules/term/term_bind.man    term::receive::bind      {Keyboard dispatch from terminals}]
[item modules/term/term_send.man    term::send               {General output to terminals}]
[division_end]
[division_start textutil]
[item modules/textutil/textutil.man        textutil           {Procedures to manipulate texts and strings.}]
[item modules/textutil/adjust.man          textutil::adjust   {Procedures to adjust, indent, and undent paragraphs}]
[item modules/textutil/expander.man        textutil::expander {Procedures to process templates and expand text.}]

[item modules/textutil/repeat.man          textutil::repeat   {Procedures to repeat strings.}]
[item modules/textutil/textutil_split.man  textutil::split    {Procedures to split texts}]
[item modules/textutil/textutil_string.man textutil::string   {Procedures to manipulate texts and strings.}]
[item modules/textutil/tabify.man          textutil::tabify   {Procedures to (un)tabify strings}]
[item modules/textutil/trim.man            textutil::trim     {Procedures to trim strings}]
[division_end]
[division_start tie]
[item modules/tie/tie.man     tie {Array persistence}]
[item modules/tie/tie_std.man tie {Array persistence, standard data sources}]
[division_end]
[division_start tiff]
[item modules/tiff/tiff.man tiff {TIFF reading, writing, and querying and manipulation of meta data}]
[division_end]
[division_start tool]
[item modules/tool/meta.man               oo::util            {Utility commands for TclOO}]
[item modules/tool/tool.man               tool                {Dictionary Tools}]
[item modules/tool/tool_dict_ensemble.man tool::dict_ensemble {Dictionary Tools}]
[division_end]
[division_start transfer]
[item modules/transfer/connect.man     transfer::connect           {Connection setup}]
[item modules/transfer/copyops.man     transfer::copy              {Data transfer foundation}]
[item modules/transfer/tqueue.man      transfer::copy::queue       {Queued transfers}]
[item modules/transfer/ddest.man       transfer::data::destination {Data destination}]

Changes to support/devel/sak/localdoc/localdoc.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139

140

141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
    getpackage doctools         doctools/doctools.tcl
    getpackage doctools::toc    doctools/doctoc.tcl
    getpackage doctools::idx    doctools/docidx.tcl
    getpackage dtplite          dtplite/dtplite.tcl

    # Read installation information. Need the list of excluded
    # modules to suppress them here in the doc generation as well.
    global excluded modules apps guide distribution
    set distribution [pwd]
    source support/installation/modules.tcl

    lappend baseconfig -module tcllib
    foreach e $excluded {
	puts "Excluding $e ..."
	lappend baseconfig -exclude */modules/$e/*
    }

    set nav ../../../../home

    puts "Reindex the documentation..."
    sak::doc::imake __dummy__ $excluded
    sak::doc::index __dummy__ $excluded

    puts "Removing old documentation..."
    # Keep the main index around however, manually created, edited,
    # not to be touched
    # TODO: catch errors and restore automatically
    file rename embedded/index.md e_index.md

    file delete -force embedded
    file mkdir embedded/md

    # Put the saved main page back into place, early.
    file rename e_index.md embedded/index.md






    run-idoc-man $baseconfig








    # Note: Might be better to run them separately.
    # Note @: Or we shuffle the results a bit more in the post processing stage.

    set map  {
	.man     .html
	modules/ tcllib/files/modules/
	apps/    tcllib/files/apps/
    }

    set toc  [string map $map [fileutil::cat support/devel/sak/doc/toc.txt]]
    set apps [string map $map [fileutil::cat support/devel/sak/doc/toc_apps.txt]]
    set mods [string map $map [fileutil::cat support/devel/sak/doc/toc_mods.txt]]
    set cats [string map $map [fileutil::cat support/devel/sak/doc/toc_cats.txt]]

    run-idoc-www $baseconfig $toc $nav $cats $mods $apps

    set map  {
	.man     .md
	modules/ tcllib/files/modules/
	apps/    tcllib/files/apps/
    }

    set toc  [string map $map [fileutil::cat support/devel/sak/doc/toc.txt]]
    set apps [string map $map [fileutil::cat support/devel/sak/doc/toc_apps.txt]]
    set mods [string map $map [fileutil::cat support/devel/sak/doc/toc_mods.txt]]
    set cats [string map $map [fileutil::cat support/devel/sak/doc/toc_cats.txt]]

    run-embedded $baseconfig $toc $cats $mods $apps
    return
}

proc ::sak::localdoc::run-idoc-man {baseconfig} {
    file delete -force idoc
    file mkdir idoc/man
    file mkdir idoc/www

    puts "Generating manpages (installation)..."
    set     config $baseconfig
    lappend config -exclude {*/doctools/tests/*}
    lappend config -exclude {*/support/*}
    lappend config -ext n
    lappend config -o idoc/man
    lappend config nroff .

    dtplite::do $config
    return
}

proc ::sak::localdoc::run-idoc-www {baseconfig toc nav cats mods apps} {
    puts "Generating HTML (installation)... Pass 1, draft..."
    set     config $baseconfig
    lappend config -exclude  {*/doctools/tests/*}
    lappend config -exclude  {*/support/*}
    lappend config -toc      $toc
    lappend config -nav      {Tcllib Home} $nav
    lappend config -post+toc Categories    $cats
    lappend config -post+toc Modules       $mods
    lappend config -post+toc Applications  $apps
    lappend config -merge
    lappend config -o idoc/www
    lappend config html .

    dtplite::do $config

    puts "Generating HTML (installation)... Pass 2, resolving cross-references..."
    dtplite::do $config
    return
}

proc ::sak::localdoc::run-embedded {baseconfig toc cats mods apps} {
    puts "Generating Markdown (online)... Pass 1, draft..."
    set     config $baseconfig
    lappend config -exclude  {*/doctools/tests/*}
    lappend config -exclude  {*/support/*}
    lappend config -ext md ;# must be known before nav options
    lappend config -toc      $toc
    lappend config -post+toc Categories    $cats
    lappend config -post+toc Modules       $mods
    lappend config -post+toc Applications  $apps
    lappend config -merge

    lappend config -o embedded/md

    lappend config markdown .

    dtplite::do $config

    puts "Generating Markdown (online)... Pass 2, resolving cross-references..."
    dtplite::do $config
    return
}

# ### ### ### ######### ######### #########

package provide sak::localdoc 1.0

##
# ###







|
<















|
<

|
>

|


|

>
>
>
>
>
|
>
>
>
>
>
>
>















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|
|

|
|
|
|
|







<
|
<
<
|

|
|
<

|
|
|
|
>
|
>
|



|










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
89
90
91
92
93
94
95
96
97
98
99
100
101

102


103
104
105
106

107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
    getpackage doctools         doctools/doctools.tcl
    getpackage doctools::toc    doctools/doctoc.tcl
    getpackage doctools::idx    doctools/docidx.tcl
    getpackage dtplite          dtplite/dtplite.tcl

    # Read installation information. Need the list of excluded
    # modules to suppress them here in the doc generation as well.
    global excluded modules apps guide

    source support/installation/modules.tcl

    lappend baseconfig -module tcllib
    foreach e $excluded {
	puts "Excluding $e ..."
	lappend baseconfig -exclude */modules/$e/*
    }

    set nav ../../../../home

    puts "Reindex the documentation..."
    sak::doc::imake __dummy__ $excluded
    sak::doc::index __dummy__ $excluded

    puts "Removing old documentation..."
    # but keep the main index around, manually created, edited, not to be touched

    # TODO: catch errors and restore automatically
    file rename embedded/index.html e_index.html
    
    file delete -force embedded
    file mkdir embedded/www

    # Put the saved main page back into place, early.
    file rename e_index.html embedded/index.html

    file delete -force idoc
    file mkdir idoc/man
    file mkdir idoc/www

    puts "Generating manpages (installation)..."
    set     config $baseconfig
    lappend config -exclude {*/doctools/tests/*}
    lappend config -exclude {*/support/*}
    lappend config -ext n
    lappend config -o idoc/man
    lappend config nroff .

    dtplite::do $config

    # Note: Might be better to run them separately.
    # Note @: Or we shuffle the results a bit more in the post processing stage.

    set map  {
	.man     .html
	modules/ tcllib/files/modules/
	apps/    tcllib/files/apps/
    }

    set toc  [string map $map [fileutil::cat support/devel/sak/doc/toc.txt]]
    set apps [string map $map [fileutil::cat support/devel/sak/doc/toc_apps.txt]]
    set mods [string map $map [fileutil::cat support/devel/sak/doc/toc_mods.txt]]
    set cats [string map $map [fileutil::cat support/devel/sak/doc/toc_cats.txt]]




































    puts "Generating HTML (installation)... Pass 1, draft..."
    set     config $baseconfig
    lappend config -exclude  {*/doctools/tests/*} 
    lappend config -exclude  {*/support/*} 
    lappend config -toc      $toc
    lappend config -nav      {Tcllib Home} $nav 
    lappend config -post+toc Categories    $cats 
    lappend config -post+toc Modules       $mods 
    lappend config -post+toc Applications  $apps 
    lappend config -merge 
    lappend config -o idoc/www
    lappend config html .

    dtplite::do $config

    puts "Generating HTML (installation)... Pass 2, resolving cross-references..."
    dtplite::do $config




    puts "Generating HTML (online)... Pass 1, draft..."
    set     config $baseconfig
    lappend config -exclude  {*/doctools/tests/*} 
    lappend config -exclude  {*/support/*} 

    lappend config -toc      $toc
    lappend config -post+toc Categories    $cats 
    lappend config -post+toc Modules       $mods 
    lappend config -post+toc Applications  $apps 
    lappend config -merge 
    lappend config -raw 
    lappend config -o embedded/www
    lappend config -header support/fossil-nav-integration.html
    lappend config html .

    dtplite::do $config

    puts "Generating HTML (online)... Pass 2, resolving cross-references..."
    dtplite::do $config
    return
}

# ### ### ### ######### ######### #########

package provide sak::localdoc 1.0

##
# ###

Changes to support/devel/sak/readme/cmd.tcl.

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
package require sak::util
package require sak::readme

set raw  0
set log  0
set stem {}
set tclv {}
set format txt

while {[llength $argv]} {
    switch -exact -- [set o [lindex $argv 0]] {
	-md {
	    set argv [lrange $argv 1 end]
	    set format md
	}
	default {
	    sak::readme::usage
	}
    }
}

if {[llength $argv]} {
    sak::readme::usage
}

sak::readme::run $format

##
# ###







<
<
<
<
<
<
<
<
<
<
<
<
<





|



10
11
12
13
14
15
16













17
18
19
20
21
22
23
24
25
package require sak::util
package require sak::readme

set raw  0
set log  0
set stem {}
set tclv {}














if {[llength $argv]} {
    sak::readme::usage
}

sak::readme::run

##
# ###

Changes to support/devel/sak/readme/help.txt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14

    readme -- Generate a readme listing changes to modules and packages.

    sak readme ?-md?

    	This command compares the current state of the modules and
    	packages and against information from the last release
    	(support/releases/PACKAGES) and generates a README.txt listing
    	the relevant changes (new modules/packages, package version
    	changes, unchanged packages).

	The generated README is written to stdout.

	This is a support command for the release manager.



|










1
2
3
4
5
6
7
8
9
10
11
12
13
14

    readme -- Generate a readme listing changes to modules and packages.

    sak readme

    	This command compares the current state of the modules and
    	packages and against information from the last release
    	(support/releases/PACKAGES) and generates a README.txt listing
    	the relevant changes (new modules/packages, package version
    	changes, unchanged packages).

	The generated README is written to stdout.

	This is a support command for the release manager.

Changes to support/devel/sak/readme/readme.tcl.

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

proc ::sak::readme::usage {} {
    package require sak::help
    puts stdout \n[sak::help::on readme]
    exit 1
}

proc ::sak::readme::run {theformat} {
    global package_name package_version

    set pname [string totitle $package_name]

    getpackage struct::set      struct/sets.tcl
    getpackage struct::matrix   struct/matrix.tcl
    getpackage textutil::adjust textutil/adjust.tcl

    # Future: Consolidate with ... review ...
    # Determine which packages are potentially changed, from the set
    # of modules touched since the last release, as per the fossil
    # repository's commit log.

    foreach {trunk   tuid} [sak::review::Leaf          trunk]   break ;# rid + uuid
    foreach {release ruid} [sak::review::YoungestOfTag release] break ;# datetime+uuid

    sak::review::AllParentsAfter $trunk $tuid $release $ruid -> rid uuid numparents {
	if {$numparents < 2} {
	    sak::review::FileSet $rid -> path action {
		lappend modifiedm [lindex [file split $path] 1]
	    }
	}
    }
    set modifiedm [lsort -unique $modifiedm]

    set issues {}

    # package -> list(version)







|


<
<












|
<
|
|
<







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

proc ::sak::readme::usage {} {
    package require sak::help
    puts stdout \n[sak::help::on readme]
    exit 1
}

proc ::sak::readme::run {} {
    global package_name package_version



    getpackage struct::set      struct/sets.tcl
    getpackage struct::matrix   struct/matrix.tcl
    getpackage textutil::adjust textutil/adjust.tcl

    # Future: Consolidate with ... review ...
    # Determine which packages are potentially changed, from the set
    # of modules touched since the last release, as per the fossil
    # repository's commit log.

    foreach {trunk   tuid} [sak::review::Leaf          trunk]   break ;# rid + uuid
    foreach {release ruid} [sak::review::YoungestOfTag release] break ;# datetime+uuid

    sak::review::AllParentsAfter $trunk $tuid $release $ruid -> rid uuid {

	sak::review::FileSet $rid -> path action {
	    lappend modifiedm [lindex [file split $path] 1]

	}
    }
    set modifiedm [lsort -unique $modifiedm]

    set issues {}

    # package -> list(version)
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
89
90
91

    LoadNotes

    # Containers for results
    struct::matrix NEW ; NEW add columns 4 ; # module, package, version, notes
    struct::matrix CHG ; CHG add columns 5 ; # module, package, old/new version, notes
    struct::matrix ICH ; ICH add columns 5 ; # module, package, old/new version, notes
    struct::matrix CNT ; CNT add columns 5 ; # overview, counters
    struct::matrix LEG ; LEG add columns 3 ; # legend, fixed

    LEG add row {Change Details Comments}
    LEG add row {Major API {__incompatible__ API changes}}
    LEG add row {Minor EF  {Extended functionality, API}}
    LEG add row {{}    I   {Major rewrite, but no API change}}
    LEG add row {Patch B   {Bug fixes}}
    LEG add row {{}    EX  {New examples}}
    LEG add row {{}    P   {Performance enhancement}}
    LEG add row {None  T   {Testsuite changes}}
    LEG add row {{}    D   {Documentation updates}}
    
    set UCH {}

    NEW add row {Module Package {New Version} Comments}
    CHG add row [list Module Package "From $old_version" "To $package_version" Comments]


    ICH add row [list Module Package "From $old_version" "To $package_version" Comments]



    set newp {} ; set chgp {} ; set ichp {}
    set newm {} ; set chgm {} ; set ichm {} ; set uchm {}
    set nm 0
    set np 0

    # Process all packages in all modules ...







|
<
<
<
<
<
<
<
<
<
<
<
<



|
>
>
|
>
>







56
57
58
59
60
61
62
63












64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

    LoadNotes

    # Containers for results
    struct::matrix NEW ; NEW add columns 4 ; # module, package, version, notes
    struct::matrix CHG ; CHG add columns 5 ; # module, package, old/new version, notes
    struct::matrix ICH ; ICH add columns 5 ; # module, package, old/new version, notes
    struct::matrix CNT ; CNT add columns 5;












    set UCH {}

    NEW add row {Module Package {New Version} Comments}

    CHG add row [list {} {} "$package_name $old_version" "$package_name $package_version" {}]
    CHG add row {Module Package {Old Version} {New Version} Comments}

    ICH add row [list {} {} "$package_name $old_version" "$package_name $package_version" {}]
    ICH add row {Module Package {Old Version} {New Version} Comments}

    set newp {} ; set chgp {} ; set ichp {}
    set newm {} ; set chgm {} ; set ichm {} ; set uchm {}
    set nm 0
    set np 0

    # Process all packages in all modules ...
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
	    lappend chgm $m
	    lappend chgp $name
	}
    }

    # .... process the matrices and others results, make them presentable ...

    CNT add row {{} {} {} {} {}}
    
    set newp [llength [lsort -uniq $newp]]
    set newm [llength [lsort -uniq $newm]]
    if {$newp} {
	CNT add row [list $newp {new packages} in $newm modules]
    }

    set chgp [llength [lsort -uniq $chgp]]







<
<







176
177
178
179
180
181
182


183
184
185
186
187
188
189
	    lappend chgm $m
	    lappend chgp $name
	}
    }

    # .... process the matrices and others results, make them presentable ...



    set newp [llength [lsort -uniq $newp]]
    set newm [llength [lsort -uniq $newm]]
    if {$newp} {
	CNT add row [list $newp {new packages} in $newm modules]
    }

    set chgp [llength [lsort -uniq $chgp]]
216
217
218
219
220
221
222
223
224
225

226
227
228
229
230
231
232

233

234
235
236
237

238

239

240
241
242
243

244

245

246
247
248
249
250
251
252
253
254
255



256
257
258
259
260
261
262
    set uchm [llength [lsort -uniq $uchm]]
    if {$uchp} {
	CNT add row [list $uchp {unchanged packages} in $uchm modules]
    }

    CNT add row [list $np {packages, total} in $nm {modules, total}]

    Table CNT Overview {
	CNT delete row 0 ; # strip title row
    } {}

    
    Table LEG Legend {
	Sep LEG - 1
    } {
    }

    Table NEW "New in $pname $package_version" {

	Sep NEW - [Clean NEW 1 0]

    } {
	SepMD NEW {} [lrange [Clean NEW 1 0] 1 end-1]
    }


    Table CHG "Changes from $pname $old_version to $package_version" {

	Sep CHG - [Clean CHG 1 0]

    } {
	SepMD CHG {} [lrange [Clean CHG 1 0] 1 end-1]
    }


    Table ICH "Invisible changes (documentation, testsuites)" {

	Sep ICH - [Clean ICH 1 0]

    } {
	SepMD ICH {} [lrange [Clean ICH 1 0] 1 end-1]
    }

    if {[llength $UCH]} {
	Header Unchanged
	puts ""
	puts [Indent "    " [textutil::adjust::adjust \
				 [join [lsort -dict $UCH] {, }] -length 64]]
    }




    if {![llength $issues]} return

    puts stderr [=red "Issues found ([llength $issues])"]
    puts stderr "  Please run \"./sak.tcl review\" to resolve,"
    puts stderr "  then run \"./sak.tcl readme\" again."
    puts stderr Details:







|
|
|
>
|
<
<
|
|
|
|
>

>
|
<


>
|
>
|
>
|
<


>
|
>
|
>
|
<








>
>
>







202
203
204
205
206
207
208
209
210
211
212
213


214
215
216
217
218
219
220
221

222
223
224
225
226
227
228
229

230
231
232
233
234
235
236
237

238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
    set uchm [llength [lsort -uniq $uchm]]
    if {$uchp} {
	CNT add row [list $uchp {unchanged packages} in $uchm modules]
    }

    CNT add row [list $np {packages, total} in $nm {modules, total}]

    Header Overview
    puts ""
    if {[CNT rows] > 0} {
	puts [Indent "    " [Detrail [CNT format 2string]]]
    }


    puts ""

    if {[NEW rows] > 1} {
	Header "New in $package_name $package_version"
	puts ""
	Sep NEW - [Clean NEW 1 0]
	puts [Indent "    " [Detrail [NEW format 2string]]]
	puts ""

    }

    if {[CHG rows] > 2} {
	Header "Changes from $package_name $old_version to $package_version"
	puts ""
	Sep CHG - [Clean CHG 2 0]
	puts [Indent "    " [Detrail [CHG format 2string]]]
	puts ""

    }

    if {[ICH rows] > 2} {
	Header "Invisible changes (documentation, testsuites)"
	puts ""
	Sep ICH - [Clean ICH 2 0]
	puts [Indent "    " [Detrail [ICH format 2string]]]
	puts ""

    }

    if {[llength $UCH]} {
	Header Unchanged
	puts ""
	puts [Indent "    " [textutil::adjust::adjust \
				 [join [lsort -dict $UCH] {, }] -length 64]]
    }

    variable legend
    puts $legend

    if {![llength $issues]} return

    puts stderr [=red "Issues found ([llength $issues])"]
    puts stderr "  Please run \"./sak.tcl review\" to resolve,"
    puts stderr "  then run \"./sak.tcl readme\" again."
    puts stderr Details:
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316

    puts stderr [=red "Issues found ([llength $issues])"]
    puts stderr "  Please run \"./sak.tcl review\" to resolve,"
    puts stderr "  then run \"./sak.tcl readme\" again."
    return
}

proc ::sak::readme::Table {obj title {pretxt {}} {premd {}}} {
    upvar 1 theformat theformat
    if {[$obj rows] < 2} return
    Header $title

    puts ""
    switch -exact -- $theformat {
	txt {
	    uplevel 1 $pretxt
	    puts [Indent "    " [Detrail [$obj format 2string]]]
	}
	md {
	    uplevel 1 $premd
	    # Header row, then separator, then the remainder.
	    puts |[join [$obj get row 0] |]|
	    puts |[join [lrepeat [$obj columns] ---] |]|
	    set n [$obj rows]
	    for {set i 1} {$i < $n} {incr i} {
		puts |[join [$obj get row $i] |]|
	    }
	}
	default {
	    error "Bad format"
	    exit 1
	}
    }
    puts ""
    return
}

proc ::sak::readme::Header {s {sep =}} {
    puts $s
    puts [string repeat $sep [string length $s]]
    return
}

proc ::sak::readme::Enter {m name note {mat CHG}} {







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







266
267
268
269
270
271
272






























273
274
275
276
277
278
279

    puts stderr [=red "Issues found ([llength $issues])"]
    puts stderr "  Please run \"./sak.tcl review\" to resolve,"
    puts stderr "  then run \"./sak.tcl readme\" again."
    return
}































proc ::sak::readme::Header {s {sep =}} {
    puts $s
    puts [string repeat $sep [string length $s]]
    return
}

proc ::sak::readme::Enter {m name note {mat CHG}} {
374
375
376
377
378
379
380

381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
	    }
	}
    }
    return [lsort -uniq -increasing -integer $marks]
}

proc ::sak::readme::Sep {m char marks} {

    #puts stderr "$m = $marks"

    set n [$m columns]
    set sep {}
    for {set i 0} {$i < $n} {incr i} {
	lappend sep [string repeat $char [expr {2+[$m columnwidth $i]}]]
    }

    foreach k [linsert [lsort -decreasing -integer -uniq $marks] 0 end] {
	$m insert row $k $sep
    }
    return
}

proc ::sak::readme::SepMD {m char marks} {
    #puts stderr "$m = $marks"

    set n [$m columns]
    set sep [lreplace [lrepeat $n {}] end end $char]

    foreach k [linsert [lsort -decreasing -integer -uniq $marks] 0 end] {
	$m insert row $k $sep
    }
    return
}

proc ::sak::readme::Indent {pfx text} {







>








<
<
<
<
<
<
<
<
<
<
<
<







337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352












353
354
355
356
357
358
359
	    }
	}
    }
    return [lsort -uniq -increasing -integer $marks]
}

proc ::sak::readme::Sep {m char marks} {

    #puts stderr "$m = $marks"

    set n [$m columns]
    set sep {}
    for {set i 0} {$i < $n} {incr i} {
	lappend sep [string repeat $char [expr {2+[$m columnwidth $i]}]]
    }













    foreach k [linsert [lsort -decreasing -integer -uniq $marks] 0 end] {
	$m insert row $k $sep
    }
    return
}

proc ::sak::readme::Indent {pfx text} {
470
471
472
473
474
475
476
















477
478
479
480
    return -code error {Version not found}
}

##
# ###

namespace eval ::sak::readme {
















    variable review {}
}

package provide sak::readme 1.0







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
    return -code error {Version not found}
}

##
# ###

namespace eval ::sak::readme {
    variable legend {
Legend  Change  Details Comments
        ------  ------- ---------
        Major   API:    ** incompatible ** API changes.

        Minor   EF :    Extended functionality, API.
                I  :    Major rewrite, but no API change

        Patch   B  :    Bug fixes.
                EX :    New examples.
                P  :    Performance enhancement.

        None    T  :    Testsuite changes.
                D  :    Documentation updates.
    }

    variable review {}
}

package provide sak::readme 1.0

Changes to support/devel/sak/review/review.tcl.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
    # module -> list(path)

    # rm: module -> list (revs); rev = uuid+desc+files (string)
    array set rm {}

    foreach {trunk   tuid} [Leaf          trunk]   break ;# rid + uuid
    foreach {release ruid} [YoungestOfTag release] break ;# datetime + uuid
    AllParentsAfter $trunk $tuid $release $ruid -> rid uuid numparents {
	Next ; Progress " $rid"

	if {$numparents > 1} {
	    Progress " SKIP"
	} else {
	    # Consider only commits with one parent, i.e. non-merges,
	    # as possible contributors to modules and packages.
	    
	    set d [Description $rid]
	    Progress " D"

	    # Determine file set, split by modules, then generate a package of
	    # uuid, description and filtered files per modules touched.

	    array set fs {}

	    FileSet $rid -> path action {
		Progress .

		set px [file split $path]
		set themodule [lindex $px 1]
		lappend modifiedm $themodule
		lappend cm($themodule) $d

		# ignore files in modules/
		if {[llength $px] < 3} continue

		#puts $themodule||$rid||$action|$px|

		lappend fs($themodule) [file join {*}[lrange $px 2 end]]
		lappend pt($themodule) [file join {*}[lrange $px 2 end]]
	    }

	    foreach {m files} [array get fs] {
		set str \[htts://core.tcl.tk/tcllib/info/$uuid\]\n$d\n\n[join [lsort -dict $files] \n]
		lappend rm($m) $str
	    }
	    unset fs
	}
    }

    Next

    # cleanup module list, may have duplicates
    set modifiedm [lsort -unique $modifiedm]








|


<
<
<
<
<
<
|
|

|
|

|

|
|

|
|
|
|

|
|

|

|
|
|

|
|
|
|
|
<







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
89
90
91
92
93
94
95

96
97
98
99
100
101
102
    # module -> list(path)

    # rm: module -> list (revs); rev = uuid+desc+files (string)
    array set rm {}

    foreach {trunk   tuid} [Leaf          trunk]   break ;# rid + uuid
    foreach {release ruid} [YoungestOfTag release] break ;# datetime + uuid
    AllParentsAfter $trunk $tuid $release $ruid -> rid uuid {
	Next ; Progress " $rid"







	set d [Description $rid]
	Progress " D"

	# Determine file set, split by modules, then generate a package of
	# uuid, description and filtered files per modules touched.

	array set fs {}

	FileSet $rid -> path action {
	    Progress .

	    set px [file split $path]
	    set themodule [lindex $px 1]
	    lappend modifiedm $themodule
	    lappend cm($themodule) $d

	    # ignore files in modules/
	    if {[llength $px] < 3} continue

	    #puts $themodule||$rid||$action|$px|

	    lappend fs($themodule) [file join {*}[lrange $px 2 end]]
	    lappend pt($themodule) [file join {*}[lrange $px 2 end]]
	}

	foreach {m files} [array get fs] {
	    set str \[$uuid\]\n$d\n\n[join [lsort -dict $files] \n]
	    lappend rm($m) $str
	}
	unset fs

    }

    Next

    # cleanup module list, may have duplicates
    set modifiedm [lsort -unique $modifiedm]

328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
	SELECT coalesce(event.ecomment,event.comment)
	FROM   event
	WHERE  event.objid = @rid@
	;
    }]]
}

proc ::sak::review::AllParentsAfter {rid ruid cut cutuid _ rv uv nv script} {
    upvar 1 $rv therev $uv theuid $nv thenump

    array set rev {}
    set rev($rid) .
    lappend front $rid

    # Initial run, for the starting revision.
    set thenump [llength [AllParents $rid]]
    set therev $rid
    set theuid $ruid
    uplevel 1 $script

    # Standard iterative incremental transitive-closure. We have a
    # front of revisions whose parents we take, which become the new
    # front to follow, until no parents are delivered anymore due to







|
|






<







321
322
323
324
325
326
327
328
329
330
331
332
333
334
335

336
337
338
339
340
341
342
	SELECT coalesce(event.ecomment,event.comment)
	FROM   event
	WHERE  event.objid = @rid@
	;
    }]]
}

proc ::sak::review::AllParentsAfter {rid ruid cut cutuid _ rv uv script} {
    upvar 1 $rv therev $uv theuid

    array set rev {}
    set rev($rid) .
    lappend front $rid

    # Initial run, for the starting revision.

    set therev $rid
    set theuid $ruid
    uplevel 1 $script

    # Standard iterative incremental transitive-closure. We have a
    # front of revisions whose parents we take, which become the new
    # front to follow, until no parents are delivered anymore due to
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
	# record new parents, and make them the new starting points
	set front {}
	foreach {pid mtime uuid} $new {
	    if {[info exists rev($pid)]} continue
	    set rev($pid) .
	    lappend front $pid

	    set thenump [llength [AllParents $pid]]
	    set therev $pid
	    set theuid $uuid
	    uplevel 1 $script
	}
    }
}

proc ::sak::review::Parents {rid cut} {
    lappend map @rid@    $rid
    lappend map @cutoff@ $cut
    split [F [string map $map {
	SELECT pid, blob.uuid, event.mtime, datetime(event.mtime)
	FROM  plink, blob, event
	WHERE plink.cid   = @rid@
	AND   plink.pid = blob.rid
	AND   plink.pid = event.objid
	AND   event.mtime > @cutoff@
	;
    }]] \n
}

proc ::sak::review::AllParents {rid} {
    lappend map @rid@    $rid
    split [F [string map $map {
	SELECT pid, blob.uuid, event.mtime, datetime(event.mtime)
	FROM  plink, blob, event
	WHERE plink.cid   = @rid@
	AND   plink.pid = blob.rid
	AND   plink.pid = event.objid
	;
    }]] \n
}

proc ::sak::review::YoungestOfTag {tag} {
    lappend map @tag@ $tag
    puts stderr "last $tag = [F [string map $map {
	SELECT datetime (event.mtime)







<


















<
<
<
<
<
<
<
<
<
<
<
<







361
362
363
364
365
366
367

368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385












386
387
388
389
390
391
392
	# record new parents, and make them the new starting points
	set front {}
	foreach {pid mtime uuid} $new {
	    if {[info exists rev($pid)]} continue
	    set rev($pid) .
	    lappend front $pid


	    set therev $pid
	    set theuid $uuid
	    uplevel 1 $script
	}
    }
}

proc ::sak::review::Parents {rid cut} {
    lappend map @rid@    $rid
    lappend map @cutoff@ $cut
    split [F [string map $map {
	SELECT pid, blob.uuid, event.mtime, datetime(event.mtime)
	FROM  plink, blob, event
	WHERE plink.cid   = @rid@
	AND   plink.pid = blob.rid
	AND   plink.pid = event.objid
	AND   event.mtime > @cutoff@
	;












    }]] \n
}

proc ::sak::review::YoungestOfTag {tag} {
    lappend map @tag@ $tag
    puts stderr "last $tag = [F [string map $map {
	SELECT datetime (event.mtime)

Changes to support/devel/sak/test/run.tcl.

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# ###

proc ::sak::test::run::Do {cv modules} {
    upvar 1 $cv config
    variable valgrind
    variable araw     $config(raw)
    variable alog     $config(log)
    variable xttimes {}
    # alog => !araw

    set shells $config(shells)
    if {![llength $shells]} {
	catch {set shells [sak::test::shell::list]}
    }
    if {![llength $shells]} {
	set shells [list [info nameofexecutable]]
    }

    if {$alog} {
	variable logext [open $config(stem).log         w]
	variable logsum [open $config(stem).summary     w]
	variable logfai [open $config(stem).failures    w]
	variable logski [open $config(stem).skipped     w]
	variable lognon [open $config(stem).none        w]
	variable logerd [open $config(stem).errdetails  w]
	variable logfad [open $config(stem).faildetails w]
	# Timings per testsuite (sec), average test timings (usec)
	variable logtim [open $config(stem).timings     w]
	variable logtmt [open $config(stem).timetable   w]
	# Timings per test (usec)
	variable logtti [open $config(stem).t-timings   w]
	variable logtmi [open $config(stem).t-timetable w]
    } else {
	variable logext stdout
    }

    # Preprocessing of module names and shell versions to allows
    # better formatting of the progress output, i.e. vertically
    # aligned columns







<


















<

<
<
<
<







69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

94




95
96
97
98
99
100
101
# ###

proc ::sak::test::run::Do {cv modules} {
    upvar 1 $cv config
    variable valgrind
    variable araw     $config(raw)
    variable alog     $config(log)

    # alog => !araw

    set shells $config(shells)
    if {![llength $shells]} {
	catch {set shells [sak::test::shell::list]}
    }
    if {![llength $shells]} {
	set shells [list [info nameofexecutable]]
    }

    if {$alog} {
	variable logext [open $config(stem).log         w]
	variable logsum [open $config(stem).summary     w]
	variable logfai [open $config(stem).failures    w]
	variable logski [open $config(stem).skipped     w]
	variable lognon [open $config(stem).none        w]
	variable logerd [open $config(stem).errdetails  w]
	variable logfad [open $config(stem).faildetails w]

	variable logtim [open $config(stem).timings     w]




    } else {
	variable logext stdout
    }

    # Preprocessing of module names and shell versions to allows
    # better formatting of the progress output, i.e. vertically
    # aligned columns
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
    }
    if {$err} {
	puts $logext "#Errors [mag][format %6d $err][rst]"
    } else {
	puts $logext "#Errors [format %6d $err]"
    }

    flush $logext

    =| "... Done"
    
    if {$alog} {
	# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	# Timings per testsuite
	=| "... Postprocessing per-testsuite timings ..."
	
	variable xtimes


	struct::matrix M
	M add columns 6

	M add row {Shell Module Testsuite Tests Seconds uSec/Test}
	M add row {===== ====== ========= ===== ======= =========}

	foreach item [lsort -decreasing -int -index 3 [lsort -dict -index 0 $xtimes]] {
	    foreach {k testnum delta score} $item break
	    M add row [linsert $k end $testnum $delta $score]
	}

	M add row {===== ====== ========= ===== ======= =========}

	puts $logtmt "\nTiming Table..."
	puts $logtmt [M format 2string]

	# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	# Timings per testcase.
	=| "... Postprocessing per-test timings ..."
	
	variable xttimes
	struct::matrix MX
	MX add columns 5

	MX add row {Shell Module Testsuite Test uSec}
	MX add row {===== ====== ========= ==== ====}

	foreach item [lsort -index 1 -integer -decreasing [lsort -index 0 -dict $xttimes]] {
	    foreach {k usec} $item break
	    MX add row [linsert $k end $usec]
	}

	MX add row {===== ====== ========= ==== ====}

	puts $logtmi "\nTiming Table..."
	puts $logtmi [MX format 2string]

	# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	=| "... Postprocessing Done"
    }

    exit [expr {($err || $fail) ? 1 : 0}]
    return
}

# ###







<
<
<
<

<
<
<
<

>



|
<
<
|
<
|


|
<

<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
|

|
|
<
<
<







154
155
156
157
158
159
160




161




162
163
164
165
166
167


168

169
170
171
172

173











174
175






176
177
178
179



180
181
182
183
184
185
186
    }
    if {$err} {
	puts $logext "#Errors [mag][format %6d $err][rst]"
    } else {
	puts $logext "#Errors [format %6d $err]"
    }





    if {$alog} {




	variable xtimes
	array set times $xtimes

	struct::matrix M
	M add columns 6
	foreach k [lsort -dict [array names times]] {


	    #foreach {shell module testfile} $k break

	    foreach {testnum delta score} $times($k) break
	    M add row [linsert $k end $testnum $delta $score]
	}
	M sort rows -decreasing 5













	M insert row 0 {Shell Module Testsuite Tests Seconds uSec/Test}
	M insert row 1 {===== ====== ========= ===== ======= =========}






	M add    row   {===== ====== ========= ===== ======= =========}

	puts $logsum \nTimings...
	puts $logsum [M format 2string]



    }

    exit [expr {($err || $fail) ? 1 : 0}]
    return
}

# ###
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
	CaptureFailureCollectActual   ; # xcollect 3 => 4
	CaptureFailureCollectExpected ; # xcollect 4 => 0
	CaptureFailureCollectError    ; # xcollect 5 => 0
	CaptureStackStart
	CaptureStack

	TestStart
	TestTook
	TestSkipped
	TestPassed
	TestFailed                    ; # xcollect => 1

	SetupError
	Aborted
	AbortCause







<







288
289
290
291
292
293
294

295
296
297
298
299
300
301
	CaptureFailureCollectActual   ; # xcollect 3 => 4
	CaptureFailureCollectExpected ; # xcollect 4 => 0
	CaptureFailureCollectError    ; # xcollect 5 => 0
	CaptureStackStart
	CaptureStack

	TestStart

	TestSkipped
	TestPassed
	TestFailed                    ; # xcollect => 1

	SetupError
	Aborted
	AbortCause
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
proc ::sak::test::run::EndFile {} {
    upvar 1 line line
    if {![regexp "^@@ EndFile (.*)$" $line -> end]} return
    variable xfile
    variable xstartfile
    variable xtimes
    variable xtestnum
    variable xduration

    set k [lreplace $xfile 0 3]
    set k [lreplace $k 2 2 [file tail [lindex $k 2]]]
    set delta [expr {$end - $xstartfile}]
    incr xduration $delta

    if {$xtestnum == 0} {
	set score $delta
    } else {
	# average number of microseconds per test.
	set score [expr {int(($delta/double($xtestnum))*1000000)}]
	#set score [expr {$delta/double($xtestnum)}]
    }

    lappend xtimes [list $k $xtestnum $delta $score]

    variable alog
    if {$alog} {
	variable logtim
	puts $logtim [linsert [linsert $k end $xtestnum $delta $score] 0 TIME]
    }

    #sak::registry::local set $xshell End $end
    return -code continue
}

proc ::sak::test::run::Module {} {
    upvar 1 line line ; variable xmodule
    if {![regexp "^@@ Module (.*)$" $line -> xmodule]} return
    variable xshell
    variable xstatus ok
    variable maxml
    variable xduration 0
    += ${xmodule}[blank [expr {$maxml - [string length $xmodule]}]]
    set xmodule [linsert $xshell end $xmodule]
    #sak::registry::local set $xmodule
    return -code continue
}

proc ::sak::test::run::Testsuite {} {







<




<









|

















<







402
403
404
405
406
407
408

409
410
411
412

413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439

440
441
442
443
444
445
446
proc ::sak::test::run::EndFile {} {
    upvar 1 line line
    if {![regexp "^@@ EndFile (.*)$" $line -> end]} return
    variable xfile
    variable xstartfile
    variable xtimes
    variable xtestnum


    set k [lreplace $xfile 0 3]
    set k [lreplace $k 2 2 [file tail [lindex $k 2]]]
    set delta [expr {$end - $xstartfile}]


    if {$xtestnum == 0} {
	set score $delta
    } else {
	# average number of microseconds per test.
	set score [expr {int(($delta/double($xtestnum))*1000000)}]
	#set score [expr {$delta/double($xtestnum)}]
    }

    lappend xtimes $k [list $xtestnum $delta $score]

    variable alog
    if {$alog} {
	variable logtim
	puts $logtim [linsert [linsert $k end $xtestnum $delta $score] 0 TIME]
    }

    #sak::registry::local set $xshell End $end
    return -code continue
}

proc ::sak::test::run::Module {} {
    upvar 1 line line ; variable xmodule
    if {![regexp "^@@ Module (.*)$" $line -> xmodule]} return
    variable xshell
    variable xstatus ok
    variable maxml

    += ${xmodule}[blank [expr {$maxml - [string length $xmodule]}]]
    set xmodule [linsert $xshell end $xmodule]
    #sak::registry::local set $xmodule
    return -code continue
}

proc ::sak::test::run::Testsuite {} {
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585

586


587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663

proc ::sak::test::run::Summary {} {
    upvar 1 line line
    if {![regexp "^all\\.tcl:(.*)$" $line -> line]} return
    variable xmodule
    variable xstatus
    variable xvstatus
    
    foreach {_ t _ p _ s _ f} [split [string trim $line]] break
    #sak::registry::local set $xmodule Total   $t ; set t [format %5d $t]
    #sak::registry::local set $xmodule Passed  $p ; set p [format %5d $p]
    #sak::registry::local set $xmodule Skipped $s ; set s [format %5d $s]
    #sak::registry::local set $xmodule Failed  $f ; set f [format %5d $f]

    upvar 2 total _total ; incr _total $t
    upvar 2 pass  _pass  ; incr _pass  $p
    upvar 2 skip  _skip  ; incr _skip  $s
    upvar 2 fail  _fail  ; incr _fail  $f
    upvar 2 err   _err

    set t [format %5d $t]
    set p [format %5d $p]
    set s [format %5d $s]
    set f [format %5d $f]

    if {$xstatus == "ok" && $t == 0} {
	set xstatus none
	set spent ""
    } else {
	# Time spent on all the files in the module.
	variable xduration
	#set sec $xduration
	#set min [expr {$sec / 60}]
	#set sec [expr {$sec % 60}]
	#set hor [expr {$min / 60}]
	#set min [expr {$min % 60}]
	#set spent " :[format %02d $hor]h[format %02d $min]m[format %02d $sec]s"
	set spent " @${xduration}s"
    }

    set st $xvstatus($xstatus)

    if {$xstatus == "ok"} {
	# Quick return for ok suite.
	=| "~~ $st T $t P $p S $s F $f$spent"
	return -code continue
    }

    # Clean out progress display using a non-highlighted
    # string. Prevents the char count from being off. This is
    # followed by construction and display of the highlighted version.

    = "   $st T $t P $p S $s F $f$spent"
    switch -exact -- $xstatus {
	none    {=| "~~ [yel]$st T $t[rst] P $p S $s F $f"}
	aborted {=| "~~ [whi]$st[rst] T $t P $p S $s F $f$spent"}

	error   {=| "~~ [mag]$st[rst] T $t P $p S $s F $f$spent" ; incr _err }


	fail    {=| "~~ [red]$st[rst] T $t P $p S $s [red]F $f[rst]$spent"}
    }
    return -code continue
}

proc ::sak::test::run::TestStart {} {
    upvar 1 line line
    if {![string match {---- * start} $line]} return
    set testname [string range $line 5 end-6]
    = "---- $testname"
    variable xfile
    variable xtesttime -1
    variable xtest [linsert $xfile end $testname]
    variable xtestnum
    incr     xtestnum
    return -code continue
}

proc ::sak::test::run::TestTook {} {
    upvar 1 line line
    if {![string match {++++ * took *} $line]} return
    # Dynamic search for the marker because the name of the test may
    # contain spaces, causing the field position to vary.
    set  pos [lsearch -exact $line took]
    incr pos
    set usec [lindex $line $pos]
    variable xtesttime $usec
    return -code continue
}

proc ::sak::test::run::TestSkipped {} {
    upvar 1 line line
    if {![string match {++++ * SKIPPED:*} $line]} return
    regexp {^[^ ]* (.*)SKIPPED:.*$} $line -> testname
    set              testname [string trim $testname]
    variable xtest
    = "SKIP $testname"
    if {$xtest == {}} {
	variable xfile
	set xtest [linsert $xfile end $testname]
    }
    #sak::registry::local set $xtest Status Skip
    set xtest {}
    return -code continue
}

proc ::sak::test::run::TestPassed {} {
    upvar 1 line line
    if {![string match {++++ * PASSED} $line]} return
    set             testname [string range $line 5 end-7]
    variable xtesttime
    variable xtest
    if {$xtesttime < 0} { set xtesttime "" }
    = [string trimright "PASS $testname $xtesttime"]
    if {$xtest == {}} {
	variable xfile
	set xtest [linsert $xfile end $testname]
    }
    #sak::registry::local set $xtest Status Pass
    variable alog
    if {$alog && ($xtesttime ne {})} {
	variable xttimes
	variable logtti
	set k [lreplace $xtest 0 3]
	set k [lreplace $k 2 2 [file tail [lindex $k 2]]]
	# k = shell module testfile testname
	puts $logtti [linsert [linsert $k 0 TIME] end $xtesttime]

	lappend xttimes [list $k $xtesttime]
    }
    set xtest {}
    return -code continue
}

proc ::sak::test::run::TestFailed {} {
    upvar 1 line line
    if {![string match {==== * FAILED} $line]} return







<



















<
<
<
<
<
<
<
<
<
<
<






|




|


|


|
>
|
>
>
|










<






<
<
<
<
<
<
<
<
<
<
<
<




















<

<
|





<
<
<
<
<
<
<
<
<
<
<







489
490
491
492
493
494
495

496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514











515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547

548
549
550
551
552
553












554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573

574

575
576
577
578
579
580











581
582
583
584
585
586
587

proc ::sak::test::run::Summary {} {
    upvar 1 line line
    if {![regexp "^all\\.tcl:(.*)$" $line -> line]} return
    variable xmodule
    variable xstatus
    variable xvstatus

    foreach {_ t _ p _ s _ f} [split [string trim $line]] break
    #sak::registry::local set $xmodule Total   $t ; set t [format %5d $t]
    #sak::registry::local set $xmodule Passed  $p ; set p [format %5d $p]
    #sak::registry::local set $xmodule Skipped $s ; set s [format %5d $s]
    #sak::registry::local set $xmodule Failed  $f ; set f [format %5d $f]

    upvar 2 total _total ; incr _total $t
    upvar 2 pass  _pass  ; incr _pass  $p
    upvar 2 skip  _skip  ; incr _skip  $s
    upvar 2 fail  _fail  ; incr _fail  $f
    upvar 2 err   _err

    set t [format %5d $t]
    set p [format %5d $p]
    set s [format %5d $s]
    set f [format %5d $f]

    if {$xstatus == "ok" && $t == 0} {
	set xstatus none











    }

    set st $xvstatus($xstatus)

    if {$xstatus == "ok"} {
	# Quick return for ok suite.
	=| "~~ $st T $t P $p S $s F $f"
	return -code continue
    }

    # Clean out progress display using a non-highlighted
    # string. Prevents the char couint from being off. This is
    # followed by construction and display of the highlighted version.

    = "   $st T $t P $p S $s F $f"
    switch -exact -- $xstatus {
	none    {=| "~~ [yel]$st T $t[rst] P $p S $s F $f"}
	aborted {=| "~~ [whi]$st[rst] T $t P $p S $s F $f"}
	error   {
	    =| "~~ [mag]$st[rst] T $t P $p S $s F $f"
	    incr _err
	}
	fail    {=| "~~ [red]$st[rst] T $t P $p S $s [red]F $f[rst]"}
    }
    return -code continue
}

proc ::sak::test::run::TestStart {} {
    upvar 1 line line
    if {![string match {---- * start} $line]} return
    set testname [string range $line 5 end-6]
    = "---- $testname"
    variable xfile

    variable xtest [linsert $xfile end $testname]
    variable xtestnum
    incr     xtestnum
    return -code continue
}













proc ::sak::test::run::TestSkipped {} {
    upvar 1 line line
    if {![string match {++++ * SKIPPED:*} $line]} return
    regexp {^[^ ]* (.*)SKIPPED:.*$} $line -> testname
    set              testname [string trim $testname]
    variable xtest
    = "SKIP $testname"
    if {$xtest == {}} {
	variable xfile
	set xtest [linsert $xfile end $testname]
    }
    #sak::registry::local set $xtest Status Skip
    set xtest {}
    return -code continue
}

proc ::sak::test::run::TestPassed {} {
    upvar 1 line line
    if {![string match {++++ * PASSED} $line]} return
    set             testname [string range $line 5 end-7]

    variable xtest

    = "PASS $testname"
    if {$xtest == {}} {
	variable xfile
	set xtest [linsert $xfile end $testname]
    }
    #sak::registry::local set $xtest Status Pass











    set xtest {}
    return -code continue
}

proc ::sak::test::run::TestFailed {} {
    upvar 1 line line
    if {![string match {==== * FAILED} $line]} return

Added support/fossil-nav-integration.html.























































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
89
90
91
<div class='fossil-doc' data-title='@TITLE@'>
<style>
    HTML {
	background: 	#FFFFFF;
	color: 		black;
    }
    BODY {
	background: 	#FFFFFF;
	color:	 	black;
    }
    DIV.doctools {
	margin-left:	10%;
	margin-right:	10%;
    }
    DIV.doctools H1,DIV.doctools H2 {
	margin-left:	-5%;
    }
    H1, H2, H3, H4 {
	margin-top: 	1em;
	font-family:	sans-serif;
	font-size:	large;
	color:		#005A9C;
	background: 	transparent;
	text-align:		left;
    }
    H1.doctools_title {
	text-align: center;
    }
    UL,OL {
	margin-right: 0em;
	margin-top: 3pt;
	margin-bottom: 3pt;
    }
    UL LI {
	list-style: disc;
    }
    OL LI {
	list-style: decimal;
    }
    DT {
	padding-top: 	1ex;
    }
    UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
	font:		normal 12pt/14pt sans-serif;
	list-style:	none;
    }
    LI.doctools_section, LI.doctools_subsection {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding: 	0em;
    }
    PRE {
	display: 	block;
	font-family:	monospace;
	white-space:	pre;
	margin:		0%;
	padding-top:	0.5ex;
	padding-bottom:	0.5ex;
	padding-left:	1ex;
	padding-right:	1ex;
	width:		100%;
    }
    PRE.doctools_example {
	color: 		black;
	background: 	#f5dcb3;
	border:		1px solid black;
    }
    UL.doctools_requirements LI, UL.doctools_syntax LI {
	list-style: 	none;
	margin-left: 	0em;
	text-indent:	0em;
	padding:	0em;
    }
    DIV.doctools_synopsis {
	color: 		black;
	background: 	#80ffff;
	border:		1px solid black;
	font-family:	serif;
	margin-top: 	1em;
	margin-bottom: 	1em;
    }
    UL.doctools_syntax {
	margin-top: 	1em;
	border-top:	1px solid black;
    }
    UL.doctools_requirements {
	margin-bottom: 	1em;
	border-bottom:	1px solid black;
    }
</style>

Changes to support/installation/actions.tcl.

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
# -*- tcl -*-

# This file holds the commands determining the files to install. They
# are used by the installer to actually perform the installation, and
# by 'sak' to get the per-module lists of relevant files. The
# different purposes are handled through the redefinition of the
# commands [xcopy] and [xcopyf] used by the commands here.

proc _null {args} {}

proc _all {module libdir} {
    global distribution
    xcopy \
	    [file join $distribution modules $module] \
	    [file join $libdir $module] \
	    1
    return
}

proc _cfh {module libdir} {
	global distribution
    _tcl $module $libdir
	set moddir [file join $distribution modules $module ]
	xcopy $moddir [file join $libdir $module] 0 *.c
	xcopy $moddir [file join $libdir $module] 0 *.h
	return
}


proc _tcl {module libdir} {
    global distribution
    xcopy \
	    [file join $distribution modules $module] \
	    [file join $libdir $module] \
	    0 *.tcl









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7
8
9



















10
11
12
13
14
15
16
# -*- tcl -*-

# This file holds the commands determining the files to install. They
# are used by the installer to actually perform the installation, and
# by 'sak' to get the per-module lists of relevant files. The
# different purposes are handled through the redefinition of the
# commands [xcopy] and [xcopyf] used by the commands here.

proc _null {args} {}




















proc _tcl {module libdir} {
    global distribution
    xcopy \
	    [file join $distribution modules $module] \
	    [file join $libdir $module] \
	    0 *.tcl
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
    _tcl $module $libdir
    xcopy \
	    [file join $distribution modules $module msgs] \
	    [file join $libdir $module msgs] \
	    1
    return
}


proc _tex {module libdir} {
    global distribution

    _tcl $module $libdir
    xcopy \
	    [file join $distribution modules $module] \







<







54
55
56
57
58
59
60

61
62
63
64
65
66
67
    _tcl $module $libdir
    xcopy \
	    [file join $distribution modules $module msgs] \
	    [file join $libdir $module msgs] \
	    1
    return
}


proc _tex {module libdir} {
    global distribution

    _tcl $module $libdir
    xcopy \
	    [file join $distribution modules $module] \

Changes to support/installation/modules.tcl.

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

# --------------------------------------------------------------
# @@ Registration START

Exclude calendar
Exclude exif

if {[file exists [file join $distribution modules tcllibc]]} {
    #       name         pkg   doc   example
    Module  tcllibc      _all  _null  _null
}

#       name           pkg   doc   example
Module  0compatibility _tcl  _null  _null
# Wrapper packages redirecting deprecated/moved packages to their old
# implementations. See pkgIndex.tcl for more notes.

#       name         pkg   doc   example
Module  aes         _tcl  _man  _null
Module  amazon-s3   _tcl  _man  _null
Module  asn         _tcl  _man  _null
Module  base32      _tcl  _man  _null
Module  base64      _tcl  _man  _null
Module  bee         _tcl  _man  _null
Module  bench       _tcl _null  _null
Module  bibtex      _tcl  _man  _exa
Module  blowfish    _tcl  _man  _null
Module  cache       _tcl  _man  _null
Module  calendar     _tci _man  _null
Module  clay        _tcl  _man _null
Module  clock       _tcl  _man _null
Module  cmdline     _tcl  _man  _null
Module  comm        _tcl  _man  _null
Module  control      _tci _man  _null
Module  coroutine   _tcl _null  _null
Module  counter     _tcl  _man  _null
Module  crc         _tcl  _man  _null
Module  cron        _tcl  _man  _null
Module  csv         _tcl  _man _exa
Module  debug       _tcl _null  _null
Module  defer       _tcl  _man  _null
Module  des         _tcl  _man  _null
Module  dicttool    _tcl  _man  _null
Module  dns          _msg _man _exa
Module  docstrip    _tcl  _man  _null
Module  doctools     _doc _man _exa
Module  doctools2base _tcl _man _null
Module  doctools2idx  _tcl _man _null







<
<
<
<
<
<
<
<
<
<












<










<







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

# --------------------------------------------------------------
# @@ Registration START

Exclude calendar
Exclude exif











#       name         pkg   doc   example
Module  aes         _tcl  _man  _null
Module  amazon-s3   _tcl  _man  _null
Module  asn         _tcl  _man  _null
Module  base32      _tcl  _man  _null
Module  base64      _tcl  _man  _null
Module  bee         _tcl  _man  _null
Module  bench       _tcl _null  _null
Module  bibtex      _tcl  _man  _exa
Module  blowfish    _tcl  _man  _null
Module  cache       _tcl  _man  _null
Module  calendar     _tci _man  _null

Module  clock       _tcl  _man _null
Module  cmdline     _tcl  _man  _null
Module  comm        _tcl  _man  _null
Module  control      _tci _man  _null
Module  coroutine   _tcl _null  _null
Module  counter     _tcl  _man  _null
Module  crc         _tcl  _man  _null
Module  cron        _tcl  _man  _null
Module  csv         _tcl  _man _exa
Module  debug       _tcl _null  _null

Module  des         _tcl  _man  _null
Module  dicttool    _tcl  _man  _null
Module  dns          _msg _man _exa
Module  docstrip    _tcl  _man  _null
Module  doctools     _doc _man _exa
Module  doctools2base _tcl _man _null
Module  doctools2idx  _tcl _man _null
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Module  inifile     _tcl  _man  _null
Module  interp      _tcl  _man  _null
Module  irc         _tcl  _man _exa
Module  javascript  _tcl  _man  _null
Module  jpeg        _tcl  _man  _null
Module  json        _tcl  _man  _null
Module  lambda      _tcl  _man  _null
Module  lazyset     _tcl  _man  _null
Module  ldap        _tcl  _man _exa
Module  log          _msg _man  {_exax logger}
Module  markdown     _tcl  _man  _null
Module  map         _tcl  _man  _null
Module  mapproj     _tcl  _man _exa
Module  math         _tci _man _exa
Module  md4         _tcl  _man  _null







<







86
87
88
89
90
91
92

93
94
95
96
97
98
99
Module  inifile     _tcl  _man  _null
Module  interp      _tcl  _man  _null
Module  irc         _tcl  _man _exa
Module  javascript  _tcl  _man  _null
Module  jpeg        _tcl  _man  _null
Module  json        _tcl  _man  _null
Module  lambda      _tcl  _man  _null

Module  ldap        _tcl  _man _exa
Module  log          _msg _man  {_exax logger}
Module  markdown     _tcl  _man  _null
Module  map         _tcl  _man  _null
Module  mapproj     _tcl  _man _exa
Module  math         _tci _man _exa
Module  md4         _tcl  _man  _null
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160

161
162
163
164
165
166
167
Module  pt           _rde _man  _null
Module  rc4         _tcl  _man  _null
Module  rcs         _tcl  _man  _null
Module  report      _tcl  _man  _null
Module  rest        _tcl  _man  _null
Module  ripemd      _tcl  _man  _null
Module  sasl        _tcl  _man  _exa
Module  sha1        _cfh  _man  _null
Module  simulation  _tcl  _man  _null
Module  smtpd       _tcl  _man _exa
Module  snit        _tcl  _man  _null
Module  soundex     _tcl  _man  _null
Module  stooop      _tcl  _man  _null
Module  string      _tcl  _man  _null
Module  stringprep  _tcl  _man  _null
Module  struct      _tcl  _man _exa
Module  tar         _tcl  _man  _null
Module  tepam       _tcl  _man  _exa
Module  term         _tcr _man _exa
Module  textutil     _tex _man  _null
Module  tie         _tcl  _man  _exa
Module  tiff        _tcl  _man  _null
Module  tool        _tcl  _man  _null

Module  transfer    _tcl  _man  _null
Module  treeql      _tcl  _man  _null
Module  try         _tcl  _man  _null
Module  udpcluster  _tcl  _man  _null
Module  uev         _tcl  _man  _null
Module  units       _tcl  _man  _null
Module  uri         _tcl  _man  _null







|















>







125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
Module  pt           _rde _man  _null
Module  rc4         _tcl  _man  _null
Module  rcs         _tcl  _man  _null
Module  report      _tcl  _man  _null
Module  rest        _tcl  _man  _null
Module  ripemd      _tcl  _man  _null
Module  sasl        _tcl  _man  _exa
Module  sha1        _tcl  _man  _null
Module  simulation  _tcl  _man  _null
Module  smtpd       _tcl  _man _exa
Module  snit        _tcl  _man  _null
Module  soundex     _tcl  _man  _null
Module  stooop      _tcl  _man  _null
Module  string      _tcl  _man  _null
Module  stringprep  _tcl  _man  _null
Module  struct      _tcl  _man _exa
Module  tar         _tcl  _man  _null
Module  tepam       _tcl  _man  _exa
Module  term         _tcr _man _exa
Module  textutil     _tex _man  _null
Module  tie         _tcl  _man  _exa
Module  tiff        _tcl  _man  _null
Module  tool        _tcl  _man  _null
Module  tool_datatype        _tcl  _man  _null
Module  transfer    _tcl  _man  _null
Module  treeql      _tcl  _man  _null
Module  try         _tcl  _man  _null
Module  udpcluster  _tcl  _man  _null
Module  uev         _tcl  _man  _null
Module  units       _tcl  _man  _null
Module  uri         _tcl  _man  _null

Changes to support/installation/version.tcl.

1
2
3
4
5
6
7
8
package_version 1.20
package_name    tcllib

dist_exclude    config
dist_exclude    modules/ftp/example
dist_exclude    modules/ftpd/examples
dist_exclude    modules/stats
dist_exclude    modules/fileinput
|







1
2
3
4
5
6
7
8
package_version 1.18
package_name    tcllib

dist_exclude    config
dist_exclude    modules/ftp/example
dist_exclude    modules/ftpd/examples
dist_exclude    modules/stats
dist_exclude    modules/fileinput

Changes to support/releases/PACKAGES.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
@@ RELEASE 1.20

Markdown                           1.1.1
S3                                 1.0.3
SASL                               1.3.3
SASL::NTLM                         1.1.2
SASL::SCRAM                        0.1
SASL::XGoogleToken                 1.0.1
aes                                1.2.1
ascii85                            1.0
asn                                0.8.4
autoproxy                          1.7
base32                             0.1
base32::core                       0.1
base32::hex                        0.1
base64                             2.4.2
bee                                0.1
bench                              0.4
bench::in                          0.1
bench::out::csv                    0.1.2
bench::out::text                   0.1.2
bibtex                             0.6
blowfish                           1.0.5
cache::async                       0.3.1
calendar                           0.2
char                               1.0.1
cksum                              1.1.4
clay                               0.8.6
clock::iso8601                     0.1
clock::rfc2822                     0.1
cmdline                            1.5
comm                               4.6.3.1
configuration                      1
control                            0.1.3
coroutine                          1.2
coroutine::auto                    1.1.3
counter                            2.0.4
crc16                              1.1.3
crc32                              1.3.2
cron                               2.1
csv                                0.8.1
debug                              1.0.6
debug::caller                      1.1
debug::heartbeat                   1.0.1
debug::timestamp                   1
defer                              1
des                                1.1.0
dicttool                           1.1
dns                                1.4.1
docstrip                           1.2
docstrip::util                     1.3.1
doctools                           1.5.6
doctools::changelog                1.1
doctools::config                   0.1
doctools::cvs                      1
doctools::html                     0.1
doctools::html::cssdefaults        0.1
doctools::idx                      1.1
doctools::idx                      2
doctools::idx::export              0.2.1
doctools::idx::export::docidx      0.1
doctools::idx::export::html        0.2
doctools::idx::export::json        0.1
doctools::idx::export::nroff       0.3
doctools::idx::export::text        0.2
doctools::idx::export::wiki        0.2
doctools::idx::import              0.2.1
doctools::idx::import::docidx      0.1
doctools::idx::import::json        0.1
doctools::idx::parse               0.1
doctools::idx::structure           0.1
doctools::msgcat                   0.1
doctools::msgcat::idx::c           0.1
doctools::msgcat::idx::de          0.1
doctools::msgcat::idx::en          0.1
doctools::msgcat::idx::fr          0.1
doctools::msgcat::toc::c           0.1
doctools::msgcat::toc::de          0.1
doctools::msgcat::toc::en          0.1
doctools::msgcat::toc::fr          0.1
doctools::nroff::man_macros        0.1
doctools::paths                    0.1
doctools::tcl::parse               0.1
doctools::text                     0.1
doctools::toc                      1.2
doctools::toc                      2
doctools::toc::export              0.2.1
doctools::toc::export::doctoc      0.1
doctools::toc::export::html        0.1
doctools::toc::export::json        0.1
doctools::toc::export::nroff       0.2
doctools::toc::export::text        0.1
doctools::toc::export::wiki        0.1
doctools::toc::import              0.2.1
doctools::toc::import::doctoc      0.1
doctools::toc::import::json        0.1
doctools::toc::parse               0.1
doctools::toc::structure           0.1
dtplite                            1.3.1
exif                               1.1.2
fileutil                           1.16
fileutil::decode                   0.2.1
fileutil::magic::cfront            1.2.0
fileutil::magic::cgen              1.2.0
fileutil::magic::filetype          2.0

fileutil::magic::rt                2.0
fileutil::multi                    0.1
fileutil::multi::op                0.5.3
fileutil::paths                    1
fileutil::traverse                 0.6
ftp                                2.4.13
ftp::geturl                        0.2.2
ftpd                               1.3
generator                          0.1
gpx                                1
grammar::aycock                    1.0
grammar::aycock::debug             1.0
grammar::aycock::runtime           1.0
grammar::fa                        0.5
grammar::fa::dacceptor             0.1.1
grammar::fa::dexec                 0.2
grammar::fa::op                    0.4.1
grammar::me::cpu                   0.2
grammar::me::cpu::core             0.2
grammar::me::cpu::gasm             0.1
grammar::me::tcl                   0.1
grammar::me::util                  0.1
grammar::peg                       0.2
grammar::peg::interp               0.1.1
hook                               0.1
html                               1.5
htmlparse                          1.2.2
http::wget                         0.1
httpd                              4.3.4
huddle                             0.3
huddle::json                       0.1
ident                              0.42
imap4                              0.5.3
inifile                            0.3.1
interp                             0.1.2
interp::delegate::method           0.2
interp::delegate::proc             0.2
ip                                 1.4
irc                                0.6.2
javascript                         1.0.2
jpeg                               0.5
json                               1.3.4
json::write                        1.0.3
lambda                             1
lazyset                            1
ldap                               1.9.2
ldapx                              1.1
log                                1.4
logger                             0.9.4
logger::appender                   1.3
logger::utils                      1.3.1
map::geocode::nominatim            0.1
map::slippy                        0.5
map::slippy::cache                 0.2
map::slippy::fetcher               0.4
mapproj                            1.0
math                               1.2.5
math::PCA                          1.0
math::bigfloat                     1.2.2
math::bigfloat                     2.0.2
math::bignum                       3.1.1
math::calculus                     0.8.2
math::calculus::symdiff            1.0.1
math::complexnumbers               1.0.2
math::constants                    1.0.2
math::decimal                      1.0.3
math::exact                        1.0.1
math::fourier                      1.0.2
math::fuzzy                        0.2.1
math::geometry                     1.3.1
math::interpolate                  1.1.2
math::linearalgebra                1.1.6
math::machineparameters            0.1
math::numtheory                    1.1.1
math::optimize                     1.0.1
math::polynomials                  1.0.1
math::quasirandom                  1.0
math::rationalfunctions            1.0.1
math::roman                        1.0
math::special                      0.4.0
math::statistics                   1.5.0
math::trig                         1.0
md4                                1.0.7
md5                                1.4.4
md5                                2.0.7
md5crypt                           1.1.0
mime                               1.6.2
multiplexer                        0.2
nameserv                           0.4.2
nameserv::auto                     0.3
nameserv::cluster                  0.2.5
nameserv::common                   0.1
nameserv::server                   0.3.2
namespacex                         0.2
ncgi                               1.4.4
nettool                            0.5.2
nettool::available_ports           0.1
nmea                               1.0.0
nntp                               0.2.1
oauth                              1.0.3
odie::processman                   0.5
oo::dialect                        0.3.3
oo::meta                           0.7.1
oo::option                         0.3.1
oo::util                           1.2.2
otp                                1.0.0
page::analysis::peg::emodes        0.1
page::analysis::peg::minimize      0.1
page::analysis::peg::reachable     0.1
page::analysis::peg::realizable    0.1
page::compiler::peg::mecpu         0.1.1
page::config::peg                  0.1
|

<








|










|
|



<






|


|

|
|
|
|
|

<

<
|

|
|





|

|






|

















|

|






|




|

|
|
|
|
|
>
|


<
|

|
|

















|
|
<
<
|
<

|
|



|
|


|


<
|
|
|


|



|


<



|
|

|

<


|
|
|

|


<


|
|
<
|



|



<


|
|
|
<


|
|
<
<
<
|







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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128


129

130
131
132
133
134
135
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150
151
152
153
154

155
156
157
158
159
160
161
162

163
164
165
166
167
168
169
170
171

172
173
174
175

176
177
178
179
180
181
182
183

184
185
186
187
188

189
190
191
192



193
194
195
196
197
198
199
200
@@ RELEASE 1.17


S3                                 1.0.3
SASL                               1.3.3
SASL::NTLM                         1.1.2
SASL::SCRAM                        0.1
SASL::XGoogleToken                 1.0.1
aes                                1.2.1
ascii85                            1.0
asn                                0.8.4
autoproxy                          1.5.3
base32                             0.1
base32::core                       0.1
base32::hex                        0.1
base64                             2.4.2
bee                                0.1
bench                              0.4
bench::in                          0.1
bench::out::csv                    0.1.2
bench::out::text                   0.1.2
bibtex                             0.6
blowfish                           1.0.4
cache::async                       0.3
calendar                           0.2
char                               1.0.1
cksum                              1.1.4

clock::iso8601                     0.1
clock::rfc2822                     0.1
cmdline                            1.5
comm                               4.6.3.1
configuration                      1
control                            0.1.3
coroutine                          1.1.3
coroutine::auto                    1.1.3
counter                            2.0.4
crc16                              1.1.2
crc32                              1.3.2
cron                               1.1
csv                                0.8
debug                              1.0.5
debug::caller                      1
debug::heartbeat                   1
debug::timestamp                   1

des                                1.1.0

dns                                1.3.5
docstrip                           1.2
docstrip::util                     1.3
doctools                           1.4.19
doctools::changelog                1.1
doctools::config                   0.1
doctools::cvs                      1
doctools::html                     0.1
doctools::html::cssdefaults        0.1
doctools::idx                      1.0.5
doctools::idx                      2
doctools::idx::export              0.1
doctools::idx::export::docidx      0.1
doctools::idx::export::html        0.2
doctools::idx::export::json        0.1
doctools::idx::export::nroff       0.3
doctools::idx::export::text        0.2
doctools::idx::export::wiki        0.2
doctools::idx::import              0.1
doctools::idx::import::docidx      0.1
doctools::idx::import::json        0.1
doctools::idx::parse               0.1
doctools::idx::structure           0.1
doctools::msgcat                   0.1
doctools::msgcat::idx::c           0.1
doctools::msgcat::idx::de          0.1
doctools::msgcat::idx::en          0.1
doctools::msgcat::idx::fr          0.1
doctools::msgcat::toc::c           0.1
doctools::msgcat::toc::de          0.1
doctools::msgcat::toc::en          0.1
doctools::msgcat::toc::fr          0.1
doctools::nroff::man_macros        0.1
doctools::paths                    0.1
doctools::tcl::parse               0.1
doctools::text                     0.1
doctools::toc                      1.1.4
doctools::toc                      2
doctools::toc::export              0.1
doctools::toc::export::doctoc      0.1
doctools::toc::export::html        0.1
doctools::toc::export::json        0.1
doctools::toc::export::nroff       0.2
doctools::toc::export::text        0.1
doctools::toc::export::wiki        0.1
doctools::toc::import              0.1
doctools::toc::import::doctoc      0.1
doctools::toc::import::json        0.1
doctools::toc::parse               0.1
doctools::toc::structure           0.1
dtplite                            1.2
exif                               1.1.2
fileutil                           1.14.10
fileutil::decode                   0.2
fileutil::magic::cfront            1.0
fileutil::magic::cgen              1.0
fileutil::magic::filetype          1.0.2
fileutil::magic::mimetype          1.0.2
fileutil::magic::rt                1.0
fileutil::multi                    0.1
fileutil::multi::op                0.5.3

fileutil::traverse                 0.5
ftp                                2.4.13
ftp::geturl                        0.2.1
ftpd                               1.2.6
generator                          0.1
gpx                                1
grammar::aycock                    1.0
grammar::aycock::debug             1.0
grammar::aycock::runtime           1.0
grammar::fa                        0.5
grammar::fa::dacceptor             0.1.1
grammar::fa::dexec                 0.2
grammar::fa::op                    0.4.1
grammar::me::cpu                   0.2
grammar::me::cpu::core             0.2
grammar::me::cpu::gasm             0.1
grammar::me::tcl                   0.1
grammar::me::util                  0.1
grammar::peg                       0.2
grammar::peg::interp               0.1.1
hook                               0.1
html                               1.4.4
htmlparse                          1.2.1


huddle                             0.1.5

ident                              0.42
imap4                              0.5.2
inifile                            0.3
interp                             0.1.2
interp::delegate::method           0.2
interp::delegate::proc             0.2
ip                                 1.3
irc                                0.6.1
javascript                         1.0.2
jpeg                               0.5
json                               1.3.3
json::write                        1.0.3
lambda                             1

ldap                               1.8
ldapx                              1.0
log                                1.3
logger                             0.9.4
logger::appender                   1.3
logger::utils                      1.3
map::geocode::nominatim            0.1
map::slippy                        0.5
map::slippy::cache                 0.2
map::slippy::fetcher               0.3
mapproj                            1.0
math                               1.2.5

math::bigfloat                     1.2.2
math::bigfloat                     2.0.2
math::bignum                       3.1.1
math::calculus                     0.8.1
math::calculus::symdiff            1.0
math::complexnumbers               1.0.2
math::constants                    1.0.1
math::decimal                      1.0.3

math::fourier                      1.0.2
math::fuzzy                        0.2.1
math::geometry                     1.1.3
math::interpolate                  1.1
math::linearalgebra                1.1.5
math::machineparameters            0.1
math::numtheory                    1.0
math::optimize                     1.0.1
math::polynomials                  1.0.1

math::rationalfunctions            1.0.1
math::roman                        1.0
math::special                      0.3.0
math::statistics                   0.9.3

md4                                1.0.6
md5                                1.4.4
md5                                2.0.7
md5crypt                           1.1.0
mime                               1.6
multiplexer                        0.2
nameserv                           0.4.2
nameserv::auto                     0.3

nameserv::common                   0.1
nameserv::server                   0.3.2
namespacex                         0.1
ncgi                               1.4.3
nettool                            0.4

nmea                               1.0.0
nntp                               0.2.1
oauth                              1
odie::processman                   0.3



oo::util                           1.2.1
otp                                1.0.0
page::analysis::peg::emodes        0.1
page::analysis::peg::minimize      0.1
page::analysis::peg::reachable     0.1
page::analysis::peg::realizable    0.1
page::compiler::peg::mecpu         0.1.1
page::config::peg                  0.1
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
page::writer::mecpu                0.1.1
page::writer::null                 0.1
page::writer::peg                  0.1
page::writer::ser                  0.1
page::writer::tpc                  0.1
page::writer::tree                 0.1
paths                              1
picoirc                            0.5.2
pki                                0.10
pluginmgr                          0.3
png                                0.3
pop3                               1.9
pop3d                              1.1.0
pop3d::dbox                        1.0.2
pop3d::udb                         1.1
practcl                            0.16.4
processman                         0.5
profiler                           0.4
pt::ast                            1.1
pt::cparam::configuration::critcl  1.0.2
pt::cparam::configuration::tea     0.1
pt::parse::peg                     1.0.1
pt::pe                             1.0.2
pt::pe::op                         1.0.1
pt::peg                            1
pt::peg::container                 1
pt::peg::container::peg            1
pt::peg::export                    1.0.1
pt::peg::export::container         1
pt::peg::export::json              1
pt::peg::export::peg               1
pt::peg::from::json                1
pt::peg::from::peg                 1.0.3
pt::peg::import                    1.0.1
pt::peg::import::json              1
pt::peg::import::peg               1
pt::peg::interp                    1.0.1
pt::peg::op                        1.1.0
pt::peg::to::container             1
pt::peg::to::cparam                1.1.3
pt::peg::to::json                  1
pt::peg::to::param                 1.0.1
pt::peg::to::peg                   1.0.2
pt::peg::to::tclparam              1.0.3
pt::pgen                           1.1
pt::rde                            1.1
pt::rde::nx                        1.1.1.1
pt::rde::oo                        1.1
pt::tclparam::configuration::nx    1.0.1
pt::tclparam::configuration::snit  1.0.2
pt::tclparam::configuration::tcloo 1.0.4
pt::util                           1.1
rc4                                1.1.0
rcs                                0.1
report                             0.3.2
resolv                             1.0.3
rest                               1.3.1
ripemd128                          1.0.5
ripemd160                          1.0.5
sha1                               1.1.1
sha1                               2.0.4
sha256                             1.0.4
simulation::annealing              0.2
simulation::montecarlo             0.1
simulation::random                 0.4.0
smtp                               1.5
smtpd                              1.5
snit                               1.4.2
snit                               2.3.2
soundex                            1.0
spf                                1.1.1
stooop                             4.4.1
string::token                      1
string::token::shell               1.2
stringprep                         1.0.1
stringprep::data                   1.0.1
struct                             1.4
struct                             2.1
struct::disjointset                1.1
struct::graph                      1.2.1
struct::graph                      2.4.3
struct::graph::op                  0.11.3
struct::list                       1.8.4
struct::map                        1
struct::matrix                     1.2.2
struct::matrix                     2.0.4
struct::pool                       1.2.3
struct::prioqueue                  1.4
struct::queue                      1.4.5
struct::record                     1.2.2
struct::set                        2.2.3
struct::skiplist                   1.3
struct::stack                      1.5.3
struct::tree                       1.2.2
struct::tree                       2.1.2
sum                                1.1.2
switched                           2.2.1
tar                                0.11
tcl::chan::cat                     1.0.3
tcl::chan::core                    1
tcl::chan::events                  1
tcl::chan::facade                  1.0.1
tcl::chan::fifo                    1
tcl::chan::fifo2                   1
tcl::chan::halfpipe                1.0.1
tcl::chan::memchan                 1.0.4
tcl::chan::null                    1
tcl::chan::nullzero                1
tcl::chan::random                  1
tcl::chan::std                     1.0.1
tcl::chan::string                  1.0.3
tcl::chan::textwindow              1
tcl::chan::variable                1.0.4
tcl::chan::zero                    1
tcl::randomseed                    1
tcl::transform::adler32            1
tcl::transform::base64             1
tcl::transform::core               1
tcl::transform::counter            1
tcl::transform::crc32              1
tcl::transform::hex                1
tcl::transform::identity           1
tcl::transform::limitsize          1
tcl::transform::observe            1
tcl::transform::otp                1
tcl::transform::rot                1
tcl::transform::spacer             1
tcl::transform::zlib               1.0.1
tclDES                             1.0.0
tclDESjr                           1.0.0
tepam                              0.5.2
tepam::doc_gen                     0.1.1
term                               0.1
term::ansi::code                   0.2
term::ansi::code::attr             0.1
term::ansi::code::ctrl             0.2
term::ansi::code::macros           0.1
term::ansi::ctrl::unix             0.1.1
term::ansi::send                   0.2
term::interact::menu               0.1
term::interact::pager              0.1
term::receive                      0.1
term::receive::bind                0.1
term::send                         0.1
text::write                        1
textutil                           0.9
textutil::adjust                   0.7.3
textutil::expander                 1.3.1
textutil::patch                    0.1
textutil::repeat                   0.7
textutil::split                    0.8
textutil::string                   0.8
textutil::tabify                   0.7
textutil::trim                     0.7
textutil::wcswidth                 35.1
throw                              1
tie                                1.1
tie::std::array                    1.0
tie::std::dsource                  1.0
tie::std::file                     1.0.4
tie::std::growfile                 1.0
tie::std::log                      1.0
tie::std::rarray                   1.0.1
tiff                               0.2.1
time                               1.2.1
tool                               0.7
transfer::connect                  0.2
transfer::copy                     0.3
transfer::copy::queue              0.1
transfer::data::destination        0.2
transfer::data::source             0.2
transfer::receiver                 0.2
transfer::transmitter              0.2
treeql                             1.3.1
try                                1
udpcluster                         0.3.3
uevent                             0.3.1
uevent::onidle                     0.1
unicode                            1.0.0
unicode::data                      1.0.0
units                              2.2.1
uri                                1.2.7
uri::urn                           1.0.3
uuencode                           1.1.5
uuid                               1.0.7
valtype::common                    1
valtype::creditcard::amex          1
valtype::creditcard::discover      1
valtype::creditcard::mastercard    1
valtype::creditcard::visa          1
valtype::gs1::ean13                1
valtype::iban                      1.7
valtype::imei                      1
valtype::isbn                      1
valtype::luhn                      1
valtype::luhn5                     1
valtype::usnpi                     1
valtype::verhoeff                  1
websocket                          1.4.1
wip                                1.2
wip                                2.2
xsxp                               1.0
yaml                               0.4.1
yencode                            1.1.3
zipfile::decode                    0.7.1
zipfile::encode                    0.4
zipfile::mkzip                     1.2.1







|
|

|




<
<
|





|



|





|



|





|
|
|
<
|
<


|




|



|
|


|
|












|

|

|
<
|
|



|







|
|





|
|




|

|

















|














|


<

|



<
<






|


<









<




|
|


|






|






|



|

|
|
<
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243


244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272

273

274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307

308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371

372
373
374
375
376


377
378
379
380
381
382
383
384
385

386
387
388
389
390
391
392
393
394

395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424

page::writer::mecpu                0.1.1
page::writer::null                 0.1
page::writer::peg                  0.1
page::writer::ser                  0.1
page::writer::tpc                  0.1
page::writer::tree                 0.1
paths                              1
picoirc                            0.5.1
pki                                0.6
pluginmgr                          0.3
png                                0.2
pop3                               1.9
pop3d                              1.1.0
pop3d::dbox                        1.0.2
pop3d::udb                         1.1


profiler                           0.3
pt::ast                            1.1
pt::cparam::configuration::critcl  1.0.2
pt::cparam::configuration::tea     0.1
pt::parse::peg                     1.0.1
pt::pe                             1.0.2
pt::pe::op                         1
pt::peg                            1
pt::peg::container                 1
pt::peg::container::peg            1
pt::peg::export                    1
pt::peg::export::container         1
pt::peg::export::json              1
pt::peg::export::peg               1
pt::peg::from::json                1
pt::peg::from::peg                 1.0.3
pt::peg::import                    1
pt::peg::import::json              1
pt::peg::import::peg               1
pt::peg::interp                    1.0.1
pt::peg::op                        1.0.1
pt::peg::to::container             1
pt::peg::to::cparam                1.1.3
pt::peg::to::json                  1
pt::peg::to::param                 1.0.1
pt::peg::to::peg                   1.0.2
pt::peg::to::tclparam              1.0.2
pt::pgen                           1.0.3
pt::rde                            1.0.3

pt::rde::oo                        1.0.3

pt::tclparam::configuration::snit  1.0.2
pt::tclparam::configuration::tcloo 1.0.4
pt::util                           1
rc4                                1.1.0
rcs                                0.1
report                             0.3.2
resolv                             1.0.3
rest                               1.0.1
ripemd128                          1.0.5
ripemd160                          1.0.5
sha1                               1.1.1
sha1                               2.0.3
sha256                             1.0.3
simulation::annealing              0.2
simulation::montecarlo             0.1
simulation::random                 0.3.1
smtp                               1.4.5
smtpd                              1.5
snit                               1.4.2
snit                               2.3.2
soundex                            1.0
spf                                1.1.1
stooop                             4.4.1
string::token                      1
string::token::shell               1.2
stringprep                         1.0.1
stringprep::data                   1.0.1
struct                             1.4
struct                             2.1
struct::disjointset                1.0
struct::graph                      1.2.1
struct::graph                      2.4
struct::graph::op                  0.11.3
struct::list                       1.8.3

struct::matrix                     1.2.1
struct::matrix                     2.0.3
struct::pool                       1.2.3
struct::prioqueue                  1.4
struct::queue                      1.4.5
struct::record                     1.2.1
struct::set                        2.2.3
struct::skiplist                   1.3
struct::stack                      1.5.3
struct::tree                       1.2.2
struct::tree                       2.1.2
sum                                1.1.2
switched                           2.2.1
tar                                0.10
tcl::chan::cat                     1.0.2
tcl::chan::core                    1
tcl::chan::events                  1
tcl::chan::facade                  1.0.1
tcl::chan::fifo                    1
tcl::chan::fifo2                   1
tcl::chan::halfpipe                1
tcl::chan::memchan                 1.0.3
tcl::chan::null                    1
tcl::chan::nullzero                1
tcl::chan::random                  1
tcl::chan::std                     1.0.1
tcl::chan::string                  1.0.2
tcl::chan::textwindow              1
tcl::chan::variable                1.0.3
tcl::chan::zero                    1
tcl::randomseed                    1
tcl::transform::adler32            1
tcl::transform::base64             1
tcl::transform::core               1
tcl::transform::counter            1
tcl::transform::crc32              1
tcl::transform::hex                1
tcl::transform::identity           1
tcl::transform::limitsize          1
tcl::transform::observe            1
tcl::transform::otp                1
tcl::transform::rot                1
tcl::transform::spacer             1
tcl::transform::zlib               1.0.1
tclDES                             1.0.0
tclDESjr                           1.0.0
tepam                              0.5
tepam::doc_gen                     0.1.1
term                               0.1
term::ansi::code                   0.2
term::ansi::code::attr             0.1
term::ansi::code::ctrl             0.2
term::ansi::code::macros           0.1
term::ansi::ctrl::unix             0.1.1
term::ansi::send                   0.2
term::interact::menu               0.1
term::interact::pager              0.1
term::receive                      0.1
term::receive::bind                0.1
term::send                         0.1
text::write                        1
textutil                           0.8
textutil::adjust                   0.7.3
textutil::expander                 1.3.1

textutil::repeat                   0.7
textutil::split                    0.7
textutil::string                   0.8
textutil::tabify                   0.7
textutil::trim                     0.7


tie                                1.1
tie::std::array                    1.0
tie::std::dsource                  1.0
tie::std::file                     1.0.4
tie::std::growfile                 1.0
tie::std::log                      1.0
tie::std::rarray                   1.0
tiff                               0.2.1
time                               1.2.1

transfer::connect                  0.2
transfer::copy                     0.3
transfer::copy::queue              0.1
transfer::data::destination        0.2
transfer::data::source             0.2
transfer::receiver                 0.2
transfer::transmitter              0.2
treeql                             1.3.1
try                                1

uevent                             0.3.1
uevent::onidle                     0.1
unicode                            1.0.0
unicode::data                      1.0.0
units                              2.1.1
uri                                1.2.5
uri::urn                           1.0.3
uuencode                           1.1.5
uuid                               1.0.4
valtype::common                    1
valtype::creditcard::amex          1
valtype::creditcard::discover      1
valtype::creditcard::mastercard    1
valtype::creditcard::visa          1
valtype::gs1::ean13                1
valtype::iban                      1.5
valtype::imei                      1
valtype::isbn                      1
valtype::luhn                      1
valtype::luhn5                     1
valtype::usnpi                     1
valtype::verhoeff                  1
websocket                          1.4
wip                                1.2
wip                                2.2
xsxp                               1.0
yaml                               0.3.7
yencode                            1.1.3
zipfile::decode                    0.6.1
zipfile::encode                    0.3

Deleted support/releases/history/README-1.19.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
Overview
========

||||||
|---|---|---|---|---|
|7|new packages|in|6|modules|
|52|changed packages|in|35|modules|
|15|internally changed packages|in|10|modules|
|359|unchanged packages|in|105|modules|
|443|packages, total|in|130|modules, total|

Legend
======

|Change|Details|Comments|
|---|---|---|
|Major|API|__incompatible__ API changes|
|Minor|EF|Extended functionality, API|
||I|Major rewrite, but no API change|
|Patch|B|Bug fixes|
||EX|New examples|
||P|Performance enhancement|
|None|T|Testsuite changes|
||D|Documentation updates|

New in Tcllib 1.19
==================

|Module|Package|New Version|Comments|
|---|---|---|---|
|defer|defer|1||
|math|math::PCA|1.0||
|practcl|practcl|0.11||
|||||
|pt|pt::rde::nx|1.1.1.1||
||pt::tclparam::configuration::nx|1.0.1||
|||||
|tool-ui|tool-ui|0.2.1||
|udpcluster|udpcluster|0.3.3||

Changes from Tcllib 1.18 to 1.19
================================

|Module|Package|From 1.18|To 1.19|Comments|
|---|---|---|---|---|
|coroutine|coroutine|1.1.3|1.2|B D EF|
|crc|crc16|1.1.2|1.1.3|B D|
|cron|cron|1.2.1|2.1|API B D EF T|
|dicttool|dicttool|1.0|1.1|D EF|
||||||
|dns|dns|1.3.5|1.4.0|D EF T|
||ip|1.3|1.4|B D T|
||||||
|doctools|doctools|1.4.19|1.4.21|B D T|
||doctools::idx|1.0.5|1.0.7|B D T|
||doctools::toc|1.1.4|1.1.6|B D T|
||||||
|doctools2idx|doctools::idx::export|0.1|0.2|B|
||doctools::idx::import|0.1|0.2|B|
||||||
|doctools2toc|doctools::toc::export|0.1|0.2|B|
||doctools::toc::import|0.1|0.2|B|
||||||
|fileutil|fileutil|1.15|1.16|B T|
||fileutil::decode|0.2|0.2.1|B|
||||||
|fumagic|fileutil::magic::cfront|1.0|1.2.0|B D EF T|
||fileutil::magic::cgen|1.0|1.2.0|D EF T|
||fileutil::magic::filetype|1.0.2|2.0|API D EF T|
||fileutil::magic::rt|1.0|2.0|API D EF T|
||||||
|http|autoproxy|1.5.3|1.6|D EF T|
||||||
|httpd|httpd|4.0|4.1.1|B EF I T|
||httpd::content|4.0||Removed|
||scgi::app|0.1||Removed|
||||||
|inifile|ini|0.3|0.3.1|B D|
|json|json|1.3.3|1.3.4|B D T|
||||||
|ldap|ldap|1.8|1.9.2|B D T|
||ldapx|1.0|1.1|B D T|
||||||
|markdown|Markdown|1.0|1.1|D EF T|
||||||
|math|math::calculus|0.8.1|0.8.2|B T|
||math::exact|1.0|1.0.1|B D T|
||math::geometry|1.1.3|1.2.3|B D EF I T|
||math::interpolate|1.1|1.1.1|B T|
||math::linearalgebra|1.1.5|1.1.6|B T|
||math::numtheory|1.0|1.1|D EF T|
||math::statistics|1.0|1.1.1|B D EF T|
||||||
|md4|md4|1.0.6|1.0.7|B D|
|nettool|nettool|0.5.1|0.5.2|B I|
|oauth|oauth|1|1.0.1|B D|
|oodialect|oo::dialect|0.3|0.3.3|B I T|
||||||
|oometa|oo::meta|0.4.1|0.7.1|B EF T|
||oo::option|0.3|0.3.1|B|
||||||
|pki|pki|0.6|0.10|B D EF T|
||||||
|processman|odie::processman|0.3|0.5|EF|
||processman|0.3|0.5|B EF|
||||||
|pt|pt::pgen|1.0.3|1.1|EF|
|rest|rest|1.0.2|1.3.1|D EF I|
||||||
|struct|struct::graph|1.2.1|1.2.1|B D T|
||struct::graph|2.4|2.4.1|B D T|
||||||
|tar|tar|0.10|0.11|B D T|
|tepam|tepam|0.5|0.5.2|B D T|
|textutil|textutil::split|0.7|0.8|B D T|
|tool|tool|0.5|0.7|B D EF T|
|units|units|2.1.1|2.2.1|B EF T|
|uri|uri|1.2.6|1.2.7|B D T|
|uuid|uuid|1.0.5|1.0.6|B|
|valtype|valtype::iban|1.5|1.7|D EF T|
||||||
|virtchannel_base|tcl::chan::memchan|1.0.3|1.0.4|B D T|
||tcl::chan::string|1.0.2|1.0.3|B D T|
||tcl::chan::variable|1.0.3|1.0.4|B D T|
||||||
|websocket|websocket|1.4|1.4.1|B|
||||||
|yaml|huddle|0.2|0.3|B D T|
||yaml|0.3.9|0.4.1|B D EF T|
|zip|zipfile::decode|0.7|0.7.1|D T|

Invisible changes (documentation, testsuites)
=============================================

|Module|Package|From 1.18|To 1.19|Comments|
|---|---|---|---|---|
|bee|bee|0.1|0.1|D|
|comm|comm|4.6.3.1|4.6.3.1|T|
||||||
|des|tclDES|1.0.0|1.0.0|D|
||tclDESjr|1.0.0|1.0.0|D|
||||||
|docstrip|docstrip::util|1.3.1|1.3.1|D|
|doctools2idx|doctools::idx|2|2|---|
|doctools2toc|doctools::toc|2|2|---|
||||||
|math|math::bigfloat|1.2.2|1.2.2|T|
||math::bigfloat|2.0.2|2.0.2|T|
||math::decimal|1.0.3|1.0.3|D T|
||math::special|0.3.0|0.3.0|T|
||||||
|md5|md5|1.4.4|1.4.4|T|
||md5|2.0.7|2.0.7|T|
||||||
|pop3|pop3|1.9|1.9|T|
|pt|pt::rde::oo|1.1|1.1|I|
||||||
|try|throw|1|1|D|
||try|1|1|D|
|virtchannel_base|tcl::chan::fifo|1|1|D|
||tcl::chan::fifo2|1|1|D|

Unchanged
=========

    aes, ascii85, asn, base32, base32::core, base32::hex, base64,
    bench, bench::in, bench::out::csv, bench::out::text, bibtex,
    blowfish, cache::async, calendar, char, cksum, clock::iso8601,
    clock::rfc2822, cmdline, configuration, control,
    coroutine::auto, counter, crc32, csv, debug, debug::caller,
    debug::heartbeat, debug::timestamp, des, docstrip,
    doctools::changelog, doctools::config, doctools::cvs,
    doctools::html, doctools::html::cssdefaults,
    doctools::idx::export::docidx,
    doctools::idx::export::html, doctools::idx::export::json,
    doctools::idx::export::nroff, doctools::idx::export::text,
    doctools::idx::export::wiki, 
    doctools::idx::import::docidx, doctools::idx::import::json,
    doctools::idx::parse, doctools::idx::structure,
    doctools::msgcat, doctools::msgcat::idx::c,
    doctools::msgcat::idx::de, doctools::msgcat::idx::en,
    doctools::msgcat::idx::fr, doctools::msgcat::toc::c,
    doctools::msgcat::toc::de, doctools::msgcat::toc::en,
    doctools::msgcat::toc::fr, doctools::nroff::man_macros,
    doctools::paths, doctools::tcl::parse, doctools::text,
    doctools::toc::export::doctoc,
    doctools::toc::export::html, doctools::toc::export::json,
    doctools::toc::export::nroff, doctools::toc::export::text,
    doctools::toc::export::wiki, 
    doctools::toc::import::doctoc, doctools::toc::import::json,
    doctools::toc::parse, doctools::toc::structure, dtplite, exif,
    fileutil::multi, fileutil::multi::op, fileutil::traverse, ftp,
    ftp::geturl, ftpd, generator, gpx, grammar::aycock,
    grammar::aycock::debug, grammar::aycock::runtime, grammar::fa,
    grammar::fa::dacceptor, grammar::fa::dexec, grammar::fa::op,
    grammar::me::cpu, grammar::me::cpu::core,
    grammar::me::cpu::gasm, grammar::me::tcl, grammar::me::util,
    grammar::peg, grammar::peg::interp, hook, html, htmlparse,
    http::wget, http::wget, huddle::json, ident, imap4,
    interp, interp::delegate::method, interp::delegate::proc, irc,
    javascript, jpeg, json::write, lambda, log, logger,
    logger::appender, logger::utils, map::geocode::nominatim,
    map::slippy, map::slippy::cache, map::slippy::fetcher, mapproj,
    math, math::bignum, math::calculus::symdiff,
    math::complexnumbers, math::constants,
    math::fourier, math::fuzzy, math::machineparameters,
    math::optimize, math::polynomials, math::rationalfunctions,
    math::roman, md5crypt, mime, multiplexer, nameserv,
    nameserv::auto, nameserv::common, nameserv::server, namespacex,
    ncgi, nmea, nntp, oo::util, otp,
    page::analysis::peg::emodes, page::analysis::peg::minimize,
    page::analysis::peg::reachable, page::analysis::peg::realizable,
    page::compiler::peg::mecpu, page::config::peg,
    page::gen::peg::canon, page::gen::peg::cpkg, page::gen::peg::hb,
    page::gen::peg::me, page::gen::peg::mecpu, page::gen::peg::ser,
    page::gen::tree::text, page::parse::lemon, page::parse::peg,
    page::parse::peghb, page::parse::pegser, page::pluginmgr,
    page::reader::hb, page::reader::lemon, page::reader::peg,
    page::reader::ser, page::reader::treeser,
    page::transform::mecpu, page::transform::reachable,
    page::transform::realizable, page::util::flow,
    page::util::norm::lemon, page::util::norm::peg, page::util::peg,
    page::util::quote, page::writer::hb, page::writer::identity,
    page::writer::me, page::writer::mecpu, page::writer::null,
    page::writer::peg, page::writer::ser, page::writer::tpc,
    page::writer::tree, paths, picoirc, pluginmgr, png, pop3d,
    pop3d::dbox, pop3d::udb, profiler, pt::ast,
    pt::cparam::configuration::critcl,
    pt::cparam::configuration::tea, pt::parse::peg, pt::pe,
    pt::pe::op, pt::peg, pt::peg::container,
    pt::peg::container::peg, pt::peg::export,
    pt::peg::export::container, pt::peg::export::json,
    pt::peg::export::peg, pt::peg::from::json, pt::peg::from::peg,
    pt::peg::import, pt::peg::import::json, pt::peg::import::peg,
    pt::peg::interp, pt::peg::op, pt::peg::to::container,
    pt::peg::to::cparam, pt::peg::to::json, pt::peg::to::param,
    pt::peg::to::peg, pt::peg::to::tclparam, pt::rde,
    pt::tclparam::configuration::snit,
    pt::tclparam::configuration::tcloo, pt::util, rc4, rcs, report,
    resolv, ripemd128, ripemd160, S3, SASL, SASL::NTLM, SASL::SCRAM,
    SASL::XGoogleToken, sha1, sha256, simulation::annealing,
    simulation::montecarlo, simulation::random, smtp, smtpd, snit,
    soundex, spf, stooop, string::token, string::token::shell,
    stringprep, stringprep::data, struct, struct::disjointset,
    struct::graph::op, struct::list, struct::matrix, struct::pool,
    struct::prioqueue, struct::queue, struct::record, struct::set,
    struct::skiplist, struct::stack, struct::tree, sum, switched,
    tcl::chan::cat, tcl::chan::core, tcl::chan::events,
    tcl::chan::facade, tcl::chan::halfpipe, tcl::chan::null,
    tcl::chan::nullzero, tcl::chan::random, tcl::chan::std,
    tcl::chan::textwindow, tcl::chan::zero, tcl::randomseed,
    tcl::transform::adler32, tcl::transform::base64,
    tcl::transform::core, tcl::transform::counter,
    tcl::transform::crc32, tcl::transform::hex,
    tcl::transform::identity, tcl::transform::limitsize,
    tcl::transform::observe, tcl::transform::otp,
    tcl::transform::rot, tcl::transform::spacer,
    tcl::transform::zlib, tepam::doc_gen, term, term::ansi::code,
    term::ansi::code::attr, term::ansi::code::ctrl,
    term::ansi::code::macros, term::ansi::ctrl::unix,
    term::ansi::send, term::interact::menu, term::interact::pager,
    term::receive, term::receive::bind, term::send, text::write,
    textutil, textutil::adjust, textutil::expander,
    textutil::repeat, textutil::string, textutil::tabify,
    textutil::trim, tie, tie::std::array, tie::std::dsource,
    tie::std::file, tie::std::growfile, tie::std::log,
    tie::std::rarray, tiff, time, tool::datatype, transfer::connect,
    transfer::copy, transfer::copy::queue,
    transfer::data::destination, transfer::data::source,
    transfer::receiver, transfer::transmitter, treeql, uevent,
    uevent::onidle, unicode, unicode::data, uri::urn, uuencode,
    valtype::common, valtype::creditcard::amex,
    valtype::creditcard::discover, valtype::creditcard::mastercard,
    valtype::creditcard::visa, valtype::gs1::ean13, valtype::imei,
    valtype::isbn, valtype::luhn, valtype::luhn5, valtype::usnpi,
    valtype::verhoeff, wip, xsxp, yencode, zipfile::encode,
    zipfile::mkzip
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<










































































































































































































































































































































































































































































































































































Deleted support/releases/history/README-1.19.txt.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
Overview
========

    7   new packages                in 6   modules
    52  changed packages            in 35  modules
    15  internally changed packages in 10  modules
    359 unchanged packages          in 105 modules
    443 packages, total             in 130 modules, total

Legend
======

    Change   Details   Comments
    -------- --------- ----------------------------------
    Major    API       __incompatible__ API changes
    Minor    EF        Extended functionality, API
             I         Major rewrite, but no API change
    Patch    B         Bug fixes
             EX        New examples
             P         Performance enhancement
    None     T         Testsuite changes
             D         Documentation updates
    -------- --------- ----------------------------------

New in Tcllib 1.19
==================

    Module       Package                           New Version   Comments
    ------------ --------------------------------- ------------- ----------
    defer        defer                             1
    math         math::PCA                         1.0
    practcl      practcl                           0.11
    ------------ --------------------------------- ------------- ----------
    pt           pt::rde::nx                       1.1.1.1
                 pt::tclparam::configuration::nx   1.0.1
    ------------ --------------------------------- ------------- ----------
    tool-ui      tool-ui                           0.2.1
    udpcluster   udpcluster                        0.3.3
    ------------ --------------------------------- ------------- ----------

Changes from Tcllib 1.18 to 1.19
================================

    Module             Package                     From 1.18   To 1.19   Comments
    ------------------ --------------------------- ----------- --------- --------------
    coroutine          coroutine                   1.1.3       1.2       B D EF
    crc                crc16                       1.1.2       1.1.3     B D
    cron               cron                        1.2.1       2.1       API B D EF T
    dicttool           dicttool                    1.0         1.1       D EF
    ------------------ --------------------------- ----------- --------- --------------
    dns                dns                         1.3.5       1.4.0     D EF T
                       ip                          1.3         1.4       B D T
    ------------------ --------------------------- ----------- --------- --------------
    doctools           doctools                    1.4.19      1.4.21    B D T
                       doctools::idx               1.0.5       1.0.7     B D T
                       doctools::toc               1.1.4       1.1.6     B D T
    ------------------ --------------------------- ----------- --------- --------------
    doctools2idx       doctools::idx::export       0.1         0.2       B
                       doctools::idx::import       0.1         0.2       B
    ------------------ --------------------------- ----------- --------- --------------
    doctools2toc       doctools::toc::export       0.1         0.2       B
                       doctools::toc::import       0.1         0.2       B
    ------------------ --------------------------- ----------- --------- --------------
    fileutil           fileutil                    1.15        1.16      B T
                       fileutil::decode            0.2         0.2.1     B
    ------------------ --------------------------- ----------- --------- --------------
    fumagic            fileutil::magic::cfront     1.0         1.2.0     B D EF T
                       fileutil::magic::cgen       1.0         1.2.0     D EF T
                       fileutil::magic::filetype   1.0.2       2.0       API D EF T
                       fileutil::magic::rt         1.0         2.0       API D EF T
    ------------------ --------------------------- ----------- --------- --------------
    http               autoproxy                   1.5.3       1.6       D EF T
    ------------------ --------------------------- ----------- --------- --------------
    httpd              httpd                       4.0         4.1.1     B EF I T
                       httpd::content              4.0                   Removed
                       scgi::app                   0.1                   Removed
    ------------------ --------------------------- ----------- --------- --------------
    inifile            ini                         0.3         0.3.1     B D
    json               json                        1.3.3       1.3.4     B D T
    ------------------ --------------------------- ----------- --------- --------------
    ldap               ldap                        1.8         1.9.2     B D T
                       ldapx                       1.0         1.1       B D T
    ------------------ --------------------------- ----------- --------- --------------
    markdown           Markdown                    1.0         1.1       D EF T
    ------------------ --------------------------- ----------- --------- --------------
    math               math::calculus              0.8.1       0.8.2     B T
                       math::exact                 1.0         1.0.1     B D T
                       math::geometry              1.1.3       1.2.3     B D EF I T
                       math::interpolate           1.1         1.1.1     B T
                       math::linearalgebra         1.1.5       1.1.6     B T
                       math::numtheory             1.0         1.1       D EF T
                       math::statistics            1.0         1.1.1     B D EF T
    ------------------ --------------------------- ----------- --------- --------------
    md4                md4                         1.0.6       1.0.7     B D
    nettool            nettool                     0.5.1       0.5.2     B I
    oauth              oauth                       1           1.0.1     B D
    oodialect          oo::dialect                 0.3         0.3.3     B I T
    ------------------ --------------------------- ----------- --------- --------------
    oometa             oo::meta                    0.4.1       0.7.1     B EF T
                       oo::option                  0.3         0.3.1     B
    ------------------ --------------------------- ----------- --------- --------------
    pki                pki                         0.6         0.10      B D EF T
    ------------------ --------------------------- ----------- --------- --------------
    processman         odie::processman            0.3         0.5       EF
                       processman                  0.3         0.5       B EF
    ------------------ --------------------------- ----------- --------- --------------
    pt                 pt::pgen                    1.0.3       1.1       EF
    rest               rest                        1.0.2       1.3.1     D EF I
    ------------------ --------------------------- ----------- --------- --------------
    struct             struct::graph               1.2.1       1.2.1     B D T
                       struct::graph               2.4         2.4.1     B D T
    ------------------ --------------------------- ----------- --------- --------------
    tar                tar                         0.10        0.11      B D T
    tepam              tepam                       0.5         0.5.2     B D T
    textutil           textutil::split             0.7         0.8       B D T
    tool               tool                        0.5         0.7       B D EF T
    units              units                       2.1.1       2.2.1     B EF T
    uri                uri                         1.2.6       1.2.7     B D T
    uuid               uuid                        1.0.5       1.0.6     B
    valtype            valtype::iban               1.5         1.7       D EF T
    ------------------ --------------------------- ----------- --------- --------------
    virtchannel_base   tcl::chan::memchan          1.0.3       1.0.4     B D T
                       tcl::chan::string           1.0.2       1.0.3     B D T
                       tcl::chan::variable         1.0.3       1.0.4     B D T
    ------------------ --------------------------- ----------- --------- --------------
    websocket          websocket                   1.4         1.4.1     B
    ------------------ --------------------------- ----------- --------- --------------
    yaml               huddle                      0.2         0.3       B D T
                       yaml                        0.3.9       0.4.1     B D EF T
    ------------------ --------------------------- ----------- --------- --------------
    zip                zipfile::decode             0.7         0.7.1     D T
    ------------------ --------------------------- ----------- --------- --------------

Invisible changes (documentation, testsuites)
=============================================

    Module             Package            From 1.18   To 1.19   Comments
    ------------------ ------------------ ----------- --------- ----------
    bee                bee                0.1         0.1       D
    comm               comm               4.6.3.1     4.6.3.1   T
    ------------------ ------------------ ----------- --------- ----------
    des                tclDES             1.0.0       1.0.0     D
                       tclDESjr           1.0.0       1.0.0     D
    ------------------ ------------------ ----------- --------- ----------
    docstrip           docstrip::util     1.3.1       1.3.1     D
    doctools2idx       doctools::idx      2           2         ---
    doctools2toc       doctools::toc      2           2         ---
    ------------------ ------------------ ----------- --------- ----------
    math               math::bigfloat     1.2.2       1.2.2     T
                       math::bigfloat     2.0.2       2.0.2     T
                       math::decimal      1.0.3       1.0.3     D T
                       math::special      0.3.0       0.3.0     T
    ------------------ ------------------ ----------- --------- ----------
    md5                md5                1.4.4       1.4.4     T
                       md5                2.0.7       2.0.7     T
    ------------------ ------------------ ----------- --------- ----------
    pop3               pop3               1.9         1.9       T
    pt                 pt::rde::oo        1.1         1.1       I
    ------------------ ------------------ ----------- --------- ----------
    try                throw              1           1         D
                       try                1           1         D
    ------------------ ------------------ ----------- --------- ----------
    virtchannel_base   tcl::chan::fifo    1           1         D
                       tcl::chan::fifo2   1           1         D
    ------------------ ------------------ ----------- --------- ----------

Unchanged
=========

    aes, ascii85, asn, base32, base32::core, base32::hex, base64,
    bench, bench::in, bench::out::csv, bench::out::text, bibtex,
    blowfish, cache::async, calendar, char, cksum, clock::iso8601,
    clock::rfc2822, cmdline, configuration, control,
    coroutine::auto, counter, crc32, csv, debug, debug::caller,
    debug::heartbeat, debug::timestamp, des, docstrip,
    doctools::changelog, doctools::config, doctools::cvs,
    doctools::html, doctools::html::cssdefaults,
    doctools::idx::export::docidx,
    doctools::idx::export::html, doctools::idx::export::json,
    doctools::idx::export::nroff, doctools::idx::export::text,
    doctools::idx::export::wiki, 
    doctools::idx::import::docidx, doctools::idx::import::json,
    doctools::idx::parse, doctools::idx::structure,
    doctools::msgcat, doctools::msgcat::idx::c,
    doctools::msgcat::idx::de, doctools::msgcat::idx::en,
    doctools::msgcat::idx::fr, doctools::msgcat::toc::c,
    doctools::msgcat::toc::de, doctools::msgcat::toc::en,
    doctools::msgcat::toc::fr, doctools::nroff::man_macros,
    doctools::paths, doctools::tcl::parse, doctools::text,
    doctools::toc::export::doctoc,
    doctools::toc::export::html, doctools::toc::export::json,
    doctools::toc::export::nroff, doctools::toc::export::text,
    doctools::toc::export::wiki, 
    doctools::toc::import::doctoc, doctools::toc::import::json,
    doctools::toc::parse, doctools::toc::structure, dtplite, exif,
    fileutil::multi, fileutil::multi::op, fileutil::traverse, ftp,
    ftp::geturl, ftpd, generator, gpx, grammar::aycock,
    grammar::aycock::debug, grammar::aycock::runtime, grammar::fa,
    grammar::fa::dacceptor, grammar::fa::dexec, grammar::fa::op,
    grammar::me::cpu, grammar::me::cpu::core,
    grammar::me::cpu::gasm, grammar::me::tcl, grammar::me::util,
    grammar::peg, grammar::peg::interp, hook, html, htmlparse,
    http::wget, http::wget, huddle::json, ident, imap4,
    interp, interp::delegate::method, interp::delegate::proc, irc,
    javascript, jpeg, json::write, lambda, log, logger,
    logger::appender, logger::utils, map::geocode::nominatim,
    map::slippy, map::slippy::cache, map::slippy::fetcher, mapproj,
    math, math::bignum, math::calculus::symdiff,
    math::complexnumbers, math::constants,
    math::fourier, math::fuzzy, math::machineparameters,
    math::optimize, math::polynomials, math::rationalfunctions,
    math::roman, md5crypt, mime, multiplexer, nameserv,
    nameserv::auto, nameserv::common, nameserv::server, namespacex,
    ncgi, nmea, nntp, oo::util, otp,
    page::analysis::peg::emodes, page::analysis::peg::minimize,
    page::analysis::peg::reachable, page::analysis::peg::realizable,
    page::compiler::peg::mecpu, page::config::peg,
    page::gen::peg::canon, page::gen::peg::cpkg, page::gen::peg::hb,
    page::gen::peg::me, page::gen::peg::mecpu, page::gen::peg::ser,
    page::gen::tree::text, page::parse::lemon, page::parse::peg,
    page::parse::peghb, page::parse::pegser, page::pluginmgr,
    page::reader::hb, page::reader::lemon, page::reader::peg,
    page::reader::ser, page::reader::treeser,
    page::transform::mecpu, page::transform::reachable,
    page::transform::realizable, page::util::flow,
    page::util::norm::lemon, page::util::norm::peg, page::util::peg,
    page::util::quote, page::writer::hb, page::writer::identity,
    page::writer::me, page::writer::mecpu, page::writer::null,
    page::writer::peg, page::writer::ser, page::writer::tpc,
    page::writer::tree, paths, picoirc, pluginmgr, png, pop3d,
    pop3d::dbox, pop3d::udb, profiler, pt::ast,
    pt::cparam::configuration::critcl,
    pt::cparam::configuration::tea, pt::parse::peg, pt::pe,
    pt::pe::op, pt::peg, pt::peg::container,
    pt::peg::container::peg, pt::peg::export,
    pt::peg::export::container, pt::peg::export::json,
    pt::peg::export::peg, pt::peg::from::json, pt::peg::from::peg,
    pt::peg::import, pt::peg::import::json, pt::peg::import::peg,
    pt::peg::interp, pt::peg::op, pt::peg::to::container,
    pt::peg::to::cparam, pt::peg::to::json, pt::peg::to::param,
    pt::peg::to::peg, pt::peg::to::tclparam, pt::rde
    pt::tclparam::configuration::snit,
    pt::tclparam::configuration::tcloo, pt::util, rc4, rcs, report,
    resolv, ripemd128, ripemd160, S3, SASL, SASL::NTLM, SASL::SCRAM,
    SASL::XGoogleToken, sha1, sha256, simulation::annealing,
    simulation::montecarlo, simulation::random, smtp, smtpd, snit,
    soundex, spf, stooop, string::token, string::token::shell,
    stringprep, stringprep::data, struct, struct::disjointset,
    struct::graph::op, struct::list, struct::matrix, struct::pool,
    struct::prioqueue, struct::queue, struct::record, struct::set,
    struct::skiplist, struct::stack, struct::tree, sum, switched,
    tcl::chan::cat, tcl::chan::core, tcl::chan::events,
    tcl::chan::facade, tcl::chan::halfpipe, tcl::chan::null,
    tcl::chan::nullzero, tcl::chan::random, tcl::chan::std,
    tcl::chan::textwindow, tcl::chan::zero, tcl::randomseed,
    tcl::transform::adler32, tcl::transform::base64,
    tcl::transform::core, tcl::transform::counter,
    tcl::transform::crc32, tcl::transform::hex,
    tcl::transform::identity, tcl::transform::limitsize,
    tcl::transform::observe, tcl::transform::otp,
    tcl::transform::rot, tcl::transform::spacer,
    tcl::transform::zlib, tepam::doc_gen, term, term::ansi::code,
    term::ansi::code::attr, term::ansi::code::ctrl,
    term::ansi::code::macros, term::ansi::ctrl::unix,
    term::ansi::send, term::interact::menu, term::interact::pager,
    term::receive, term::receive::bind, term::send, text::write,
    textutil, textutil::adjust, textutil::expander,
    textutil::repeat, textutil::string, textutil::tabify,
    textutil::trim, tie, tie::std::array, tie::std::dsource,
    tie::std::file, tie::std::growfile, tie::std::log,
    tie::std::rarray, tiff, time, tool::datatype, transfer::connect,
    transfer::copy, transfer::copy::queue,
    transfer::data::destination, transfer::data::source,
    transfer::receiver, transfer::transmitter, treeql, uevent,
    uevent::onidle, unicode, unicode::data, uri::urn, uuencode,
    valtype::common, valtype::creditcard::amex,
    valtype::creditcard::discover, valtype::creditcard::mastercard,
    valtype::creditcard::visa, valtype::gs1::ean13, valtype::imei,
    valtype::isbn, valtype::luhn, valtype::luhn5, valtype::usnpi,
    valtype::verhoeff, wip, xsxp, yencode, zipfile::encode,
    zipfile::mkzip
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































Deleted support/releases/history/README-1.20.md.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
Overview
========

||||||
|---|---|---|---|---|
|8|new packages|in|7|modules|
|47|changed packages|in|30|modules|
|389|unchanged packages|in|115|modules|
|446|packages, total|in|131|modules, total|

Legend
======

|Change|Details|Comments|
|---|---|---|
|Major|API|__incompatible__ API changes|
|Minor|EF|Extended functionality, API|
||I|Major rewrite, but no API change|
|Patch|B|Bug fixes|
||EX|New examples|
||P|Performance enhancement|
|None|T|Testsuite changes|
||D|Documentation updates|

New in Tcllib 1.20
==================

|Module|Package|Version|Comments|
|---|---|---|---|
|clay|clay|0.8.6||
|fileutil|fileutil::paths|1|Replaces: `doctools::paths`, (pt) `paths`.|
|lazyset|lazyset|1||
|||||
|math|math::quasirandom|1.0||
||math::trig|1.0||
|||||
|practcl|practcl|0.16.3||
|struct|struct::map|1|Replaces: `doctools::config`, (pt) `configuration`.|
|textutil|textutil::patch|0.1||
||textutil::wcswidth|35.1||
|||||

Deprecations in Tcllib 1.20
===========================

Four packages are stage 1 deprecated in favor of two replacements.
All internal users of the deprecated packages have been rewritten to
use their replacements.

|Module|Package|Replacement|Deprecation stage|
|---|---|---|---|
|doctools|doctools::paths|fileutil::paths|(D1) Redirected to replacements|
|doctools|doctools::config|struct::map|(D1) Redirected to replacements|
|pt|paths|fileutil::paths|(D1) Redirected to replacements|
|pt|configuration|struct::map|(D1) Redirected to replacements|

Stage 1 (__D1__) means that:

  - The deprecated packages still exist.
  - Their implementations have changed and become wrappers around their replacements.

Future progress:

  - In the release after 1.20 the stage 1 deprecated packages will be
    moved to stage 2 (__D2__). In that stage the implementations of the
    deprecated packages will stop redirecting to their replacements,
    and throw errors instead. IOW starting with stage 2 use of the
    deprecated packages will be more strictly blocked.

  - In the release after that all stage 2 deprecated package will be
    moved to stage 3 (__D3__). In that stage the packages will be
    removed from Tcllib, causing `package require` to fail.


Changes from Tcllib 1.19 to 1.20
================================

|Module|Package|From 1.19|To 1.20|Comments|
|---|---|---|---|---|
|blowfish|blowfish|1.0.4|1.0.5|B, D, T|
|cache|cache::async|0.3|0.3.1|B, D, T|
|dns|dns|1.4|1.4.1|B, D, T|
||||||
|doctools|doctools|1.4.21|1.5.6|B|
||doctools::idx|1.0.7|1.1|EF, D, T|
||doctools::toc|1.1.6|1.2|EF, B, D, T|
||||||
|doctools2idx|doctools::idx::export|0.2|0.2.1|I, D, T|
||doctools::idx::import|0.2|0.2.1|I, D, T|
||||||
|doctools2toc|doctools::toc::export|0.2|0.2.1|I, D, T|
||doctools::toc::import|0.2|0.2.1|I, D, T|
||||||
|dtplite|dtplite|1.3|1.3.1|B, D|
|html|html|1.4.4|1.4.5|EF, B, D, T|
|http|autoproxy __(1)__|1.6|1.7|EF, B, D, T|
|httpd|httpd|4.1.0|4.3.4|I, B, D, T|
||||||
|log|log|1.3|1.4|EF, D, T|
||logger::utils|1.3|1.3.1|B, D, T|
||||||
|markdown|Markdown|1.1|1.1.1|B, T|
||||||
|math|math::calculus|0.8.2|0.8.2|D|
||math::interpolate|1.1.1|1.1.2|B|
||math::special __(1)__|0.3|0.4|EF, D, T|
||math::geometry|1.2.3|1.3.1|EF, D, T|
||math::numtheory|1.1|1.1.1|EF, D, T|
||math::statistics __(1)__|1.1.1|1.5|EF, D, T|
||||||
|mime|mime|1.6|1.6.2|B, D, T|
||smtp|1.4.5|1.5|EF, D, T|
||||||
|namespacex|namespacex|0.1|0.2|EF, I, B, D, T|
|ncgi|ncgi|1.4.3|1.4.4|B, D, T|
|oauth|oauth|1.0.1|1.0.3|B, D|
|png|png|0.2|0.3|EF, D, T|
|practcl|practcl __(2)__|0.11|0.16.3|EF, I, D|
|profiler|profiler|0.3|0.5|B, D, T|
||||||
|pt|pt::peg::export|1|1.0.1|I, D, T|
||pt::peg::import|1|1.0.1|I, D, T|
||pt::peg::op|1.0.1|1.1.0|B, I, D|
||||||
|sha1|sha1|2.0.3|2.0.4|B, D|
||sha256|1.0.3|1.0.4|B, D|
||||||
|simulation|simulation::random|0.3.1|0.4.0|EF, D, T|
||||||
|struct|struct::disjointset __(2)__|1.0|1.1|EF, I, D, T|
||struct::graph|2.4.1|2.4.3|B, D, T|
||struct::list|1.8.3|1.8.4|B, D, T|
||struct::matrix|2.0.3|2.0.4|B, D, T
||struct::record|1.2.1|1.2.2|B, D ,T|
||||||
|textutil|textutil|0.8|0.9|EF, D, T|
|uuid|uuid|1.0.5|1.0.7|B, D, T|
||||||
|virtchannel_base|tcl::chan::cat|1.0.2|1.0.3|B, D|
||tcl::chan::halfpipe|1|1.0.1|B, T|
||||||
|zip|zipfile::mkzip|1.2|1.2.1|B, D|
||||||

Notes

  1. Now requires Tcl 8.5+
  2. Now requires Tcl 8.6+

Unchanged
=========

    aes, ascii85, asn, base32, base32::core, base32::hex, base64,
    bee, bench, bench::in, bench::out::csv, bench::out::text,
    bibtex, calendar, char, cksum, clock::iso8601,
    clock::rfc2822, cmdline, comm, control,
    coroutine, coroutine::auto, counter, crc16, crc32, cron, csv,
    debug, debug::caller, debug::heartbeat, debug::timestamp, defer,
    des, dicttool, docstrip, docstrip::util, doctools::toc (v2),
    doctools::changelog, doctools::cvs, doctools::idx (v2),
    doctools::html, doctools::html::cssdefaults,
    doctools::idx::export::docidx, doctools::idx::export::html,
    doctools::idx::export::json, doctools::idx::export::nroff,
    doctools::idx::export::text, doctools::idx::export::wiki,
    doctools::idx::import::docidx, doctools::idx::import::json,
    doctools::idx::parse, doctools::idx::structure,
    doctools::msgcat, doctools::msgcat::idx::c,
    doctools::msgcat::idx::de, doctools::msgcat::idx::en,
    doctools::msgcat::idx::fr, doctools::msgcat::toc::c,
    doctools::msgcat::toc::de, doctools::msgcat::toc::en,
    doctools::msgcat::toc::fr, doctools::nroff::man_macros,
    doctools::tcl::parse, doctools::text,
    doctools::toc::export::doctoc, doctools::toc::export::html,
    doctools::toc::export::json, doctools::toc::export::nroff,
    doctools::toc::export::text, doctools::toc::export::wiki,
    doctools::toc::import::doctoc, doctools::toc::import::json,
    doctools::toc::parse, doctools::toc::structure, exif, fileutil,
    fileutil::decode, fileutil::magic::cfront,
    fileutil::magic::cgen, fileutil::magic::filetype,
    fileutil::magic::rt, fileutil::multi, fileutil::multi::op,
    fileutil::traverse, ftp, ftp::geturl, ftpd, generator, gpx,
    grammar::aycock, grammar::aycock::debug,
    grammar::aycock::runtime, grammar::fa, grammar::fa::dacceptor,
    grammar::fa::dexec, grammar::fa::op, grammar::me::cpu,
    grammar::me::cpu::core, grammar::me::cpu::gasm,
    grammar::me::tcl, grammar::me::util, grammar::peg,
    grammar::peg::interp, hook, htmlparse, http::wget, huddle,
    huddle::json, ident, imap4, inifile, interp,
    interp::delegate::method, interp::delegate::proc, ip, irc,
    javascript, jpeg, json, json::write, lambda, ldap, ldapx,
    logger, logger::appender, map::geocode::nominatim, map::slippy,
    map::slippy::cache, map::slippy::fetcher, mapproj,
    math, math::bigfloat, math::bignum, math::calculus::symdiff,
    math::complexnumbers, math::constants, math::decimal,
    math::exact, math::fourier, math::fuzzy,
    math::linearalgebra, math::machineparameters, math::optimize,
    math::PCA, math::polynomials, math::rationalfunctions,
    math::roman, md4, md5, md5crypt, multiplexer,
    nameserv, nameserv::auto, nameserv::common, nameserv::server,
    nettool, nmea, nntp, odie::processman, oo::dialect, oo::meta,
    oo::option, oo::util, otp, page::analysis::peg::emodes,
    page::analysis::peg::minimize, page::analysis::peg::reachable,
    page::analysis::peg::realizable, page::compiler::peg::mecpu,
    page::config::peg, page::gen::peg::canon, page::gen::peg::cpkg,
    page::gen::peg::hb, page::gen::peg::me, page::gen::peg::mecpu,
    page::gen::peg::ser, page::gen::tree::text, page::parse::lemon,
    page::parse::peg, page::parse::peghb, page::parse::pegser,
    page::pluginmgr, page::reader::hb, page::reader::lemon,
    page::reader::peg, page::reader::ser, page::reader::treeser,
    page::transform::mecpu, page::transform::reachable,
    page::transform::realizable, page::util::flow,
    page::util::norm::lemon, page::util::norm::peg, page::util::peg,
    page::util::quote, page::writer::hb, page::writer::identity,
    page::writer::me, page::writer::mecpu, page::writer::null,
    page::writer::peg, page::writer::ser, page::writer::tpc,
    page::writer::tree, picoirc, pki, pluginmgr, pop3, pop3d,
    pop3d::dbox, pop3d::udb, processman, pt::ast,
    pt::cparam::configuration::critcl,
    pt::cparam::configuration::tea, pt::parse::peg, pt::pe,
    pt::pe::op, pt::peg, pt::peg::container,
    pt::peg::container::peg, pt::peg::export::container,
    pt::peg::export::json, pt::peg::export::peg,
    pt::peg::from::json, pt::peg::from::peg, pt::peg::import::json,
    pt::peg::import::peg, pt::peg::interp, pt::peg::to::container,
    pt::peg::to::cparam, pt::peg::to::json, pt::peg::to::param,
    pt::peg::to::peg, pt::peg::to::tclparam, pt::pgen, pt::rde,
    pt::rde::nx, pt::rde::oo, pt::tclparam::configuration::nx,
    pt::tclparam::configuration::snit,
    pt::tclparam::configuration::tcloo, pt::util, rc4, rcs, report,
    resolv, rest, ripemd128, ripemd160, S3, SASL, SASL::NTLM,
    SASL::SCRAM, SASL::XGoogleToken, simulation::annealing,
    simulation::montecarlo, smtpd, snit, soundex, spf, stooop,
    string::token, string::token::shell, stringprep, sha1 (v1),
    stringprep::data, struct, struct::graph::op,
    struct::pool, struct::prioqueue, struct::queue, struct::set,
    struct::skiplist, struct::stack, struct::tree, sum, switched,
    tar, tcl::chan::core, tcl::chan::events, tcl::chan::facade,
    tcl::chan::fifo, tcl::chan::fifo2,
    tcl::chan::memchan, tcl::chan::null, tcl::chan::nullzero,
    tcl::chan::random, tcl::chan::std, tcl::chan::string,
    tcl::chan::textwindow, tcl::chan::variable, tcl::chan::zero,
    tcl::randomseed, tcl::transform::adler32,
    tcl::transform::base64, tcl::transform::core,
    tcl::transform::counter, tcl::transform::crc32,
    tcl::transform::hex, tcl::transform::identity,
    tcl::transform::limitsize, tcl::transform::observe,
    tcl::transform::otp, tcl::transform::rot,
    tcl::transform::spacer, tcl::transform::zlib, tclDES, tclDESjr,
    tepam, tepam::doc_gen, term, term::ansi::code,
    term::ansi::code::attr, term::ansi::code::ctrl,
    term::ansi::code::macros, term::ansi::ctrl::unix,
    term::ansi::send, term::interact::menu, term::interact::pager,
    term::receive, term::receive::bind, term::send, text::write,
    textutil::adjust, textutil::expander, textutil::repeat,
    textutil::split, textutil::string, textutil::tabify,
    textutil::trim, throw, tie, tie::std::array, tie::std::dsource,
    tie::std::file, tie::std::growfile, tie::std::log,
    tie::std::rarray, tiff, time, tool, transfer::connect,
    transfer::copy, transfer::copy::queue,
    transfer::data::destination, transfer::data::source,
    transfer::receiver, transfer::transmitter, treeql, try,
    udpcluster, uevent, uevent::onidle, unicode, unicode::data,
    units, uri, uri::urn, uuencode, valtype::common,
    valtype::creditcard::amex, valtype::creditcard::discover,
    valtype::creditcard::mastercard, valtype::creditcard::visa,
    valtype::gs1::ean13, valtype::iban, valtype::imei,
    valtype::isbn, valtype::luhn, valtype::luhn5, valtype::usnpi,
    valtype::verhoeff, websocket, wip, xsxp, yaml, yencode,
    zipfile::decode, zipfile::encode
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


























































































































































































































































































































































































































































































































































Deleted support/releases/history/README-1.20.txt.

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
Overview
========

    8   new packages       in 7   modules
    47  changed packages   in 30  modules
    389 unchanged packages in 115 modules
    446 packages, total    in 131 modules, total

Legend
======

    Change   Details   Comments
    -------- --------- ----------------------------------
    Major    API       __incompatible__ API changes
    Minor    EF        Extended functionality, API
             I         Major rewrite, but no API change
    Patch    B         Bug fixes
             EX        New examples
             P         Performance enhancement
    None     T         Testsuite changes
             D         Documentation updates
    -------- --------- ----------------------------------

New in Tcllib 1.20
==================

    Module     Package              Version       Comments
    ---------- -------------------- ------------- ----------
    clay       clay                 0.8.6
    fileutil   fileutil::paths      1             Replaces: doctools::paths, (pt) paths.
    lazyset    lazyset              1
    ---------- -------------------- ------------- ----------
    math       math::quasirandom    1.0
               math::trig           1.0
    ---------- -------------------- ------------- ----------
    practcl    practcl              0.16.3
    struct     struct::map          1             Replaces: doctools::config, (pt) configuration.
    ---------- -------------------- ------------- ----------
    textutil   textutil::patch      0.1
               textutil::wcswidth   35.1
    ---------- -------------------- ------------- ----------

Deprecations in Tcllib 1.20
===========================

Four packages are stage 1 deprecated in favor of two replacements.
All internal users of the deprecated packages have been rewritten to
use their replacements.

    Module             Package           Replacement      Deprecation stage
    ------------------ ----------------- ---------------- --------------------------------
    doctools           doctools::paths   fileutil::paths  (D1) Redirected to replacements
    doctools           doctools::config  struct::map      (D1) Redirected to replacements
    pt                 paths             fileutil::paths  (D1) Redirected to replacements
    pt                 configuration     struct::map      (D1) Redirected to replacements
    ------------------ ----------------- ---------------- --------------------------------

Stage 1 (D1) means that:

  - The deprecated packages still exist.
  - Their implementations have changed and become wrappers around their replacements.

Future progress:

  - In the release after 1.20 the stage 1 deprecated packages will be
    moved to stage 2 (D2). In that stage the implementations of the
    deprecated packages will stop redirecting to their replacements,
    and throw errors instead. IOW starting with stage 2 use of the
    deprecated packages will be more strictly blocked.

  - In the release after that all stage 2 deprecated package will be
    moved to stage 3 (D3). In that stage the packages will be removed
    from Tcllib, causing `package require` to fail.

Changes from Tcllib 1.19 to 1.20
================================

    Module             Package                 From 1.19   To 1.20   Comments
    ------------------ ----------------------- ----------- --------- ----------
    blowfish	       blowfish		       1.0.4	   1.0.5     B, D, T
    cache              cache::async            0.3         0.3.1     B, D, T
    dns		       dns		       1.4	   1.4.1     B, D, T
    ------------------ ----------------------- ----------- --------- ----------
    doctools           doctools                1.4.21      1.5.6     B
                       doctools::idx           1.0.7       1.1       EF, D, T
                       doctools::toc           1.1.6       1.2       EF, B, D, T
    ------------------ ----------------------- ----------- --------- ----------
    doctools2idx       doctools::idx::export   0.2         0.2.1     I, D, T
                       doctools::idx::import   0.2         0.2.1     I, D, T
    ------------------ ----------------------- ----------- --------- ----------
    doctools2toc       doctools::toc::export   0.2         0.2.1     I, D, T
                       doctools::toc::import   0.2         0.2.1     I, D, T
    ------------------ ----------------------- ----------- --------- ----------
    dtplite            dtplite                 1.3         1.3.1     B, D
    html               html                    1.4.4       1.4.5     EF, B, D, T
    http               autoproxy (1)           1.6         1.7       EF, B, D, T
    httpd              httpd                   4.1.0       4.3.4     I, B, D, T
    ------------------ ----------------------- ----------- --------- ----------
    log                log                     1.3         1.4       EF, D, T
                       logger::utils           1.3         1.3.1     B, D, T
    ------------------ ----------------------- ----------- --------- ----------
    markdown	       Markdown		       1.1	   1.1.1     B, T
    ------------------ ----------------------- ----------- --------- ----------
    math               math::calculus          0.8.2       0.8.2     D
                       math::interpolate       1.1.1       1.1.2     B
                       math::special (1)       0.3         0.4       EF, D, T
                       math::geometry          1.2.3       1.3.1     EF, D, T, B
                       math::numtheory         1.1         1.1.1     EF, D, T
                       math::statistics (1)    1.1.1       1.5       EF, D, T
    ------------------ ----------------------- ----------- --------- ----------
    mime               mime                    1.6         1.6.2     B, D, T
                       smtp                    1.4.5       1.5       EF, D, T
    ------------------ ----------------------- ----------- --------- ----------
    namespacex         namespacex              0.1         0.2       EF, I, B, D, T
    ncgi               ncgi                    1.4.3       1.4.4     B, D, T
    oauth              oauth                   1.0.1       1.0.3     B, D
    png                png                     0.2         0.3       EF, D, T
    practcl            practcl (2)             0.11        0.16.3    EF, I, D
    profiler           profiler                0.3         0.5       B, D, T
    ------------------ ----------------------- ----------- --------- ----------
    pt                 pt::peg::export         1           1.0.1     I, D, T
                       pt::peg::import         1           1.0.1     I, D, T
                       pt::peg::op             1.0.1       1.1.0     B, I, D
    ------------------ ----------------------- ----------- --------- ----------
    sha1               sha1                    2.0.3       2.0.4     B, D
                       sha256                  1.0.3       1.0.4     B, D
    ------------------ ----------------------- ----------- --------- ----------
    simulation         simulation::random      0.3.1       0.4.0     EF, D, T
    ------------------ ----------------------- ----------- --------- ----------
    struct             struct::disjointset (2) 1.0         1.1       EF, I, D, T
                       struct::graph           2.4.1       2.4.3     B, D, T
                       struct::list            1.8.3       1.8.4     B, D, T
		       struct::matrix	       2.0.3	   2.0.4     B, D, T
                       struct::record          1.2.1       1.2.2     B, D, T
    ------------------ ----------------------- ----------- --------- ----------
    textutil           textutil                0.8         0.9       EF, D, T
    uuid               uuid                    1.0.5       1.0.7     B, D, T
    ------------------ ----------------------- ----------- --------- ----------
    virtchannel_base   tcl::chan::cat          1.0.2       1.0.3     B, D
    		       tcl::chan::halfpipe     1	   1.0.1     B, T
    ------------------ ----------------------- ----------- --------- ----------
    zip                zipfile::mkzip          1.2         1.2.1     B, D
    ------------------ ----------------------- ----------- --------- ----------

Notes
(1) Now requires Tcl 8.5+
(2) Now requires Tcl 8.6+

Unchanged
=========

    aes, ascii85, asn, base32, base32::core, base32::hex, base64,
    bee, bench, bench::in, bench::out::csv, bench::out::text,
    bibtex, calendar, char, cksum, clock::iso8601,
    clock::rfc2822, cmdline, comm, control,
    coroutine, coroutine::auto, counter, crc16, crc32, cron, csv,
    debug, debug::caller, debug::heartbeat, debug::timestamp, defer,
    des, dicttool, docstrip, docstrip::util, doctools::toc (v2),
    doctools::changelog, doctools::cvs, doctools::idx (v2),
    doctools::html, doctools::html::cssdefaults,
    doctools::idx::export::docidx, doctools::idx::export::html,
    doctools::idx::export::json, doctools::idx::export::nroff,
    doctools::idx::export::text, doctools::idx::export::wiki,
    doctools::idx::import::docidx, doctools::idx::import::json,
    doctools::idx::parse, doctools::idx::structure,
    doctools::msgcat, doctools::msgcat::idx::c,
    doctools::msgcat::idx::de, doctools::msgcat::idx::en,
    doctools::msgcat::idx::fr, doctools::msgcat::toc::c,
    doctools::msgcat::toc::de, doctools::msgcat::toc::en,
    doctools::msgcat::toc::fr, doctools::nroff::man_macros,
    doctools::tcl::parse, doctools::text,
    doctools::toc::export::doctoc, doctools::toc::export::html,
    doctools::toc::export::json, doctools::toc::export::nroff,
    doctools::toc::export::text, doctools::toc::export::wiki,
    doctools::toc::import::doctoc, doctools::toc::import::json,
    doctools::toc::parse, doctools::toc::structure, exif, fileutil,
    fileutil::decode, fileutil::magic::cfront,
    fileutil::magic::cgen, fileutil::magic::filetype,
    fileutil::magic::rt, fileutil::multi, fileutil::multi::op,
    fileutil::traverse, ftp, ftp::geturl, ftpd, generator, gpx,
    grammar::aycock, grammar::aycock::debug,
    grammar::aycock::runtime, grammar::fa, grammar::fa::dacceptor,
    grammar::fa::dexec, grammar::fa::op, grammar::me::cpu,
    grammar::me::cpu::core, grammar::me::cpu::gasm,
    grammar::me::tcl, grammar::me::util, grammar::peg,
    grammar::peg::interp, hook, htmlparse, http::wget, huddle,
    huddle::json, ident, imap4, inifile, interp,
    interp::delegate::method, interp::delegate::proc, ip, irc,
    javascript, jpeg, json, json::write, lambda, ldap, ldapx,
    logger, logger::appender, map::geocode::nominatim, map::slippy,
    map::slippy::cache, map::slippy::fetcher, mapproj,
    math, math::bigfloat, math::bignum, math::calculus::symdiff,
    math::complexnumbers, math::constants, math::decimal,
    math::exact, math::fourier, math::fuzzy,
    math::linearalgebra, math::machineparameters, math::optimize,
    math::PCA, math::polynomials, math::rationalfunctions,
    math::roman, md4, md5, md5crypt, multiplexer,
    nameserv, nameserv::auto, nameserv::common, nameserv::server,
    nettool, nmea, nntp, odie::processman, oo::dialect, oo::meta,
    oo::option, oo::util, otp, page::analysis::peg::emodes,
    page::analysis::peg::minimize, page::analysis::peg::reachable,
    page::analysis::peg::realizable, page::compiler::peg::mecpu,
    page::config::peg, page::gen::peg::canon, page::gen::peg::cpkg,
    page::gen::peg::hb, page::gen::peg::me, page::gen::peg::mecpu,
    page::gen::peg::ser, page::gen::tree::text, page::parse::lemon,
    page::parse::peg, page::parse::peghb, page::parse::pegser,
    page::pluginmgr, page::reader::hb, page::reader::lemon,
    page::reader::peg, page::reader::ser, page::reader::treeser,
    page::transform::mecpu, page::transform::reachable,
    page::transform::realizable, page::util::flow,
    page::util::norm::lemon, page::util::norm::peg, page::util::peg,
    page::util::quote, page::writer::hb, page::writer::identity,
    page::writer::me, page::writer::mecpu, page::writer::null,
    page::writer::peg, page::writer::ser, page::writer::tpc,
    page::writer::tree, picoirc, pki, pluginmgr, pop3, pop3d,
    pop3d::dbox, pop3d::udb, processman, pt::ast,
    pt::cparam::configuration::critcl,
    pt::cparam::configuration::tea, pt::parse::peg, pt::pe,
    pt::pe::op, pt::peg, pt::peg::container,
    pt::peg::container::peg, pt::peg::export::container,
    pt::peg::export::json, pt::peg::export::peg,
    pt::peg::from::json, pt::peg::from::peg, pt::peg::import::json,
    pt::peg::import::peg, pt::peg::interp, pt::peg::to::container,
    pt::peg::to::cparam, pt::peg::to::json, pt::peg::to::param,
    pt::peg::to::peg, pt::peg::to::tclparam, pt::pgen, pt::rde,
    pt::rde::nx, pt::rde::oo, pt::tclparam::configuration::nx,
    pt::tclparam::configuration::snit,
    pt::tclparam::configuration::tcloo, pt::util, rc4, rcs, report,
    resolv, rest, ripemd128, ripemd160, S3, SASL, SASL::NTLM,
    SASL::SCRAM, SASL::XGoogleToken, simulation::annealing,
    simulation::montecarlo, smtpd, snit, soundex, spf, stooop,
    string::token, string::token::shell, stringprep, sha1 (v1),
    stringprep::data, struct, struct::graph::op,
    struct::pool, struct::prioqueue, struct::queue, struct::set,
    struct::skiplist, struct::stack, struct::tree, sum, switched,
    tar, tcl::chan::core, tcl::chan::events, tcl::chan::facade,
    tcl::chan::fifo, tcl::chan::fifo2,
    tcl::chan::memchan, tcl::chan::null, tcl::chan::nullzero,
    tcl::chan::random, tcl::chan::std, tcl::chan::string,
    tcl::chan::textwindow, tcl::chan::variable, tcl::chan::zero,
    tcl::randomseed, tcl::transform::adler32,
    tcl::transform::base64, tcl::transform::core,
    tcl::transform::counter, tcl::transform::crc32,
    tcl::transform::hex, tcl::transform::identity,
    tcl::transform::limitsize, tcl::transform::observe,
    tcl::transform::otp, tcl::transform::rot,
    tcl::transform::spacer, tcl::transform::zlib, tclDES, tclDESjr,
    tepam, tepam::doc_gen, term, term::ansi::code,
    term::ansi::code::attr, term::ansi::code::ctrl,
    term::ansi::code::macros, term::ansi::ctrl::unix,
    term::ansi::send, term::interact::menu, term::interact::pager,
    term::receive, term::receive::bind, term::send, text::write,
    textutil::adjust, textutil::expander, textutil::repeat,
    textutil::split, textutil::string, textutil::tabify,
    textutil::trim, throw, tie, tie::std::array, tie::std::dsource,
    tie::std::file, tie::std::growfile, tie::std::log,
    tie::std::rarray, tiff, time, tool, transfer::connect,
    transfer::copy, transfer::copy::queue,
    transfer::data::destination, transfer::data::source,
    transfer::receiver, transfer::transmitter, treeql, try,
    udpcluster, uevent, uevent::onidle, unicode, unicode::data,
    units, uri, uri::urn, uuencode, valtype::common,
    valtype::creditcard::amex, valtype::creditcard::discover,
    valtype::creditcard::mastercard, valtype::creditcard::visa,
    valtype::gs1::ean13, valtype::iban, valtype::imei,
    valtype::isbn, valtype::luhn, valtype::luhn5, valtype::usnpi,
    valtype::verhoeff, websocket, wip, xsxp, yaml, yencode,
    zipfile::decode, zipfile::encode
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































































































































































































































































































































































































































































































Changes to tcllib.spec.

1
2
3
4
5
6
7
8
9
10
# $Id: package_rpm.txt,v 1.1 2006/07/01 03:16:57 andreas_kupries Exp $

%define version 1.20
%define directory /usr

Summary: The standard Tcl library
Name: tcllib
Version: %{version}
Release: 2
Copyright: BSD


|







1
2
3
4
5
6
7
8
9
10
# $Id: package_rpm.txt,v 1.1 2006/07/01 03:16:57 andreas_kupries Exp $

%define version 1.18
%define directory /usr

Summary: The standard Tcl library
Name: tcllib
Version: %{version}
Release: 2
Copyright: BSD

Changes to tcllib.tap.

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
format  {TclDevKit Project File}
fmtver  2.0
fmttool {TclDevKit TclApp PackageDefinition} 2.5

##  Saved at : Sun Dec 01 14:04:43 PST 2019
##  By       : aku
##
##  Generated by "sak.tcl tap"
##  of tcllib 1.20

########
#####
###
##
#

# ###############
# Complete bundle

Package {tcllib 1.20}
Base     @TAP_DIR@
Platform *
Desc     {Tcllib: Bundle of all packages}
Path     pkgIndex.tcl
Path     0compatibility
Path     aes
Path     amazon-s3
Path     asn
Path     base32
Path     base64
Path     bee
Path     bench
Path     bibtex
Path     blowfish
Path     cache
Path     calendar
Path     clay
Path     clock
Path     cmdline
Path     comm
Path     control
Path     coroutine
Path     counter
Path     crc
Path     cron
Path     csv
Path     debug
Path     defer
Path     des
Path     dicttool
Path     dns
Path     docstrip
Path     doctools
Path     doctools2base
Path     doctools2idx




|



|










|




<











<










<







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
format  {TclDevKit Project File}
fmtver  2.0
fmttool {TclDevKit TclApp PackageDefinition} 2.5

##  Saved at : Wed Feb 03 21:17:53 PST 2016
##  By       : aku
##
##  Generated by "sak.tcl tap"
##  of tcllib 1.18

########
#####
###
##
#

# ###############
# Complete bundle

Package {tcllib 1.18}
Base     @TAP_DIR@
Platform *
Desc     {Tcllib: Bundle of all packages}
Path     pkgIndex.tcl

Path     aes
Path     amazon-s3
Path     asn
Path     base32
Path     base64
Path     bee
Path     bench
Path     bibtex
Path     blowfish
Path     cache
Path     calendar

Path     clock
Path     cmdline
Path     comm
Path     control
Path     coroutine
Path     counter
Path     crc
Path     cron
Path     csv
Path     debug

Path     des
Path     dicttool
Path     dns
Path     docstrip
Path     doctools
Path     doctools2base
Path     doctools2idx
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Path     inifile
Path     interp
Path     irc
Path     javascript
Path     jpeg
Path     json
Path     lambda
Path     lazyset
Path     ldap
Path     log
Path     markdown
Path     map
Path     mapproj
Path     math
Path     md4







<







74
75
76
77
78
79
80

81
82
83
84
85
86
87
Path     inifile
Path     interp
Path     irc
Path     javascript
Path     jpeg
Path     json
Path     lambda

Path     ldap
Path     log
Path     markdown
Path     map
Path     mapproj
Path     math
Path     md4
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Path     otp
Path     page
Path     pki
Path     pluginmgr
Path     png
Path     pop3
Path     pop3d
Path     practcl
Path     processman
Path     profiler
Path     pt
Path     rc4
Path     rcs
Path     report
Path     rest







<







103
104
105
106
107
108
109

110
111
112
113
114
115
116
Path     otp
Path     page
Path     pki
Path     pluginmgr
Path     png
Path     pop3
Path     pop3d

Path     processman
Path     profiler
Path     pt
Path     rc4
Path     rcs
Path     report
Path     rest
133
134
135
136
137
138
139

140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
Path     tar
Path     tepam
Path     term
Path     textutil
Path     tie
Path     tiff
Path     tool

Path     transfer
Path     treeql
Path     try
Path     udpcluster
Path     uev
Path     units
Path     uri
Path     uuid
Path     valtype
Path     virtchannel_base
Path     virtchannel_core
Path     virtchannel_transform
Path     websocket
Path     wip
Path     yaml
Path     zip

# #######################
# Module "0compatibility"
# [1]    | "configuration" (1)
# [2]    | "paths" (1)
# [3]    | "doctools::config" (0.1)
# [4]    | "doctools::paths" (0.1)
# -------+

Package {__0compatibility 0.0}
Platform *
Desc     {Tcllib module}
Hidden
Base     @TAP_DIR@/0compatibility
Path     d_config.tcl
Path     d_paths.tcl
Path     p_config.tcl
Path     p_paths.tcl
Path     pkgIndex.tcl

Package {configuration 1}
See   __0compatibility
Platform *
Desc     {Tcllib package}

Package {paths 1}
See   __0compatibility
Platform *
Desc     {Tcllib package}

Package {doctools::config 0.1}
See   __0compatibility
Platform *
Desc     {Tcllib package}

Package {doctools::paths 0.1}
See   __0compatibility
Platform *
Desc     {Tcllib package}

#
# #######################

# ############
# Module "aes"
# [1]    | "aes" (1.2.1)
# -------+

Package {aes 1.2.1}
Platform *







>



<













<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







128
129
130
131
132
133
134
135
136
137
138

139
140
141
142
143
144
145
146
147
148
149
150
151










































152
153
154
155
156
157
158
Path     tar
Path     tepam
Path     term
Path     textutil
Path     tie
Path     tiff
Path     tool
Path     tool_datatype
Path     transfer
Path     treeql
Path     try

Path     uev
Path     units
Path     uri
Path     uuid
Path     valtype
Path     virtchannel_base
Path     virtchannel_core
Path     virtchannel_transform
Path     websocket
Path     wip
Path     yaml
Path     zip











































# ############
# Module "aes"
# [1]    | "aes" (1.2.1)
# -------+

Package {aes 1.2.1}
Platform *
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
Path     pkgIndex.tcl

#
# ###############

# #################
# Module "blowfish"
# [1]    | "blowfish" (1.0.5)
# -------+

Package {blowfish 1.0.5}
Platform *
Desc     {Implementation of the Blowfish block cipher}
Base     @TAP_DIR@/blowfish
Path     blowfish.tcl
Path     pkgIndex.tcl

#
# #################

# ##############
# Module "cache"
# [1]    | "cache::async" (0.3.1)
# -------+

Package {cache::async 0.3.1}
Platform *
Desc     {Asynchronous in-memory cache}
Base     @TAP_DIR@/cache
Path     async.tcl
Path     pkgIndex.tcl

#







|


|











|


|







360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
Path     pkgIndex.tcl

#
# ###############

# #################
# Module "blowfish"
# [1]    | "blowfish" (1.0.4)
# -------+

Package {blowfish 1.0.4}
Platform *
Desc     {Implementation of the Blowfish block cipher}
Base     @TAP_DIR@/blowfish
Path     blowfish.tcl
Path     pkgIndex.tcl

#
# #################

# ##############
# Module "cache"
# [1]    | "cache::async" (0.3)
# -------+

Package {cache::async 0.3}
Platform *
Desc     {Asynchronous in-memory cache}
Base     @TAP_DIR@/cache
Path     async.tcl
Path     pkgIndex.tcl

#
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
Path     gregorian.tcl
Path     pkgIndex.tcl
Path     tclIndex

#
# #################

# #############
# Module "clay"
# [1]    | "clay" (0.8.6)
# -------+

Package {clay 0.8.6}
Platform *
Desc     {A TclOO and coroutine based web server}
Base     @TAP_DIR@/clay
Path     clay.tcl
Path     pkgIndex.tcl

#
# #############

# ##############
# Module "clock"
# [1]    | "clock::rfc2822" (0.1)
# [2]    | "clock::iso8601" (0.1)
# -------+

Package {__clock 0.0}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







405
406
407
408
409
410
411















412
413
414
415
416
417
418
Path     gregorian.tcl
Path     pkgIndex.tcl
Path     tclIndex

#
# #################
















# ##############
# Module "clock"
# [1]    | "clock::rfc2822" (0.1)
# [2]    | "clock::iso8601" (0.1)
# -------+

Package {__clock 0.0}
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
Path     tclIndex

#
# ################

# ##################
# Module "coroutine"
# [1]    | "coroutine" (1.2)
# [2]    | "coroutine::auto" (1.1.3)
# -------+

Package {__coroutine 0.0}
Platform *
Desc     {Coroutine utilities, Tcl Web Server}
Hidden
Base     @TAP_DIR@/coroutine
Path     coro_auto.tcl
Path     coroutine.tcl
Path     pkgIndex.tcl

Package {coroutine 1.2}
See   __coroutine
Platform *
Desc     {A TclOO and coroutine based web server}

Package {coroutine::auto 1.1.3}
See   __coroutine
Platform *
Desc     {Automatic event and IO coroutine awareness}

#







|





|






|


|







485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
Path     tclIndex

#
# ################

# ##################
# Module "coroutine"
# [1]    | "coroutine" (1.1.3)
# [2]    | "coroutine::auto" (1.1.3)
# -------+

Package {__coroutine 0.0}
Platform *
Desc     {Coroutine utilities}
Hidden
Base     @TAP_DIR@/coroutine
Path     coro_auto.tcl
Path     coroutine.tcl
Path     pkgIndex.tcl

Package {coroutine 1.1.3}
See   __coroutine
Platform *
Desc     {Coroutine based event and IO handling}

Package {coroutine::auto 1.1.3}
See   __coroutine
Platform *
Desc     {Automatic event and IO coroutine awareness}

#
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
#
# ################

# ############
# Module "crc"
# [1]    | "crc32" (1.3.2)
# [2]    | "sum" (1.1.2)
# [3]    | "crc16" (1.1.3)
# [4]    | "cksum" (1.1.4)
# -------+

Package {__crc 0.0}
Platform *
Desc     {Cyclic Redundancy Checks}
Hidden







|







530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
#
# ################

# ############
# Module "crc"
# [1]    | "crc32" (1.3.2)
# [2]    | "sum" (1.1.2)
# [3]    | "crc16" (1.1.2)
# [4]    | "cksum" (1.1.4)
# -------+

Package {__crc 0.0}
Platform *
Desc     {Cyclic Redundancy Checks}
Hidden
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
Desc     {Perform a 32bit Cyclic Redundancy Check}

Package {sum 1.1.2}
See   __crc
Platform *
Desc     {Calculate a sum(1) compatible checksum}

Package {crc16 1.1.3}
See   __crc
Platform *
Desc     {Perform a 16bit Cyclic Redundancy Check}

Package {cksum 1.1.4}
See   __crc
Platform *
Desc     {Calculate a cksum(1) compatible checksum}

#
# ############

# #############
# Module "cron"
# [1]    | "cron" (2.1)
# -------+

Package {cron 2.1}
Platform *
Desc     {Tool for automating the period callback of commands}
Base     @TAP_DIR@/cron
Path     cron.tcl
Path     pkgIndex.tcl

#







|














|


|







556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
Desc     {Perform a 32bit Cyclic Redundancy Check}

Package {sum 1.1.2}
See   __crc
Platform *
Desc     {Calculate a sum(1) compatible checksum}

Package {crc16 1.1.2}
See   __crc
Platform *
Desc     {Perform a 16bit Cyclic Redundancy Check}

Package {cksum 1.1.4}
See   __crc
Platform *
Desc     {Calculate a cksum(1) compatible checksum}

#
# ############

# #############
# Module "cron"
# [1]    | "cron" (1.2.1)
# -------+

Package {cron 1.2.1}
Platform *
Desc     {Tool for automating the period callback of commands}
Base     @TAP_DIR@/cron
Path     cron.tcl
Path     pkgIndex.tcl

#
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
#
# ############

# ##############
# Module "debug"
# [1]    | "debug::caller" (1.1)
# [2]    | "debug" (1.0.6)
# [3]    | "debug::heartbeat" (1.0.1)
# [4]    | "debug::timestamp" (1)
# -------+

Package {__debug 0.0}
Platform *
Desc     {debug narrative}
Hidden







|







603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
#
# ############

# ##############
# Module "debug"
# [1]    | "debug::caller" (1.1)
# [2]    | "debug" (1.0.6)
# [3]    | "debug::heartbeat" (1)
# [4]    | "debug::timestamp" (1)
# -------+

Package {__debug 0.0}
Platform *
Desc     {debug narrative}
Hidden
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
Desc     {debug narrative - caller}

Package {debug 1.0.6}
See   __debug
Platform *
Desc     {debug narrative - core}

Package {debug::heartbeat 1.0.1}
See   __debug
Platform *
Desc     {debug narrative - heartbeat}

Package {debug::timestamp 1}
See   __debug
Platform *
Desc     {debug narrative - timestamping}

#
# ##############

# ##############
# Module "defer"
# [1]    | "defer" (1)
# -------+

Package {defer 1}
Platform *
Desc     {Defered execution}
Base     @TAP_DIR@/defer
Path     defer.tcl
Path     pkgIndex.tcl

#
# ##############

# ############
# Module "des"
# [1]    | "des" (1.1.0)
# [2]    | "tclDES" (1.0.0)







|









<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644















645
646
647
648
649
650
651
Desc     {debug narrative - caller}

Package {debug 1.0.6}
See   __debug
Platform *
Desc     {debug narrative - core}

Package {debug::heartbeat 1}
See   __debug
Platform *
Desc     {debug narrative - heartbeat}

Package {debug::timestamp 1}
See   __debug
Platform *
Desc     {debug narrative - timestamping}
















#
# ##############

# ############
# Module "des"
# [1]    | "des" (1.1.0)
# [2]    | "tclDES" (1.0.0)
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
Desc     {Implementation of the DES and triple-DES ciphers}

#
# ############

# #################
# Module "dicttool"
# [1]    | "dicttool" (1.1)
# -------+

Package {dicttool 1.1}
Platform *
Desc     {Dictionary Tools}
Base     @TAP_DIR@/dicttool
Path     dicttool.tcl
Path     pkgIndex.tcl

#
# #################

# ############
# Module "dns"
# [1]    | "spf" (1.1.1)
# [2]    | "dns" (1.4.1)
# [3]    | "ip" (1.4)
# [4]    | "resolv" (1.0.3)
# -------+

Package {__dns 0.0}
Platform *
Desc     {Domain Name Service}
Hidden







|


|












|
|







678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
Desc     {Implementation of the DES and triple-DES ciphers}

#
# ############

# #################
# Module "dicttool"
# [1]    | "dicttool" (1.0)
# -------+

Package {dicttool 1.0}
Platform *
Desc     {Dictionary Tools}
Base     @TAP_DIR@/dicttool
Path     dicttool.tcl
Path     pkgIndex.tcl

#
# #################

# ############
# Module "dns"
# [1]    | "spf" (1.1.1)
# [2]    | "dns" (1.3.5)
# [3]    | "ip" (1.3)
# [4]    | "resolv" (1.0.3)
# -------+

Package {__dns 0.0}
Platform *
Desc     {Domain Name Service}
Hidden
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
Path     spf.tcl

Package {spf 1.1.1}
See   __dns
Platform *
Desc     {Tcllib package}

Package {dns 1.4.1}
See   __dns
Platform *
Desc     {Tcl Domain Name Service Client}

Package {ip 1.4}
See   __dns
Platform *
Desc     {IPv4 and IPv6 address manipulation}

Package {resolv 1.0.3}
See   __dns
Platform *







|




|







718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
Path     spf.tcl

Package {spf 1.1.1}
See   __dns
Platform *
Desc     {Tcllib package}

Package {dns 1.3.5}
See   __dns
Platform *
Desc     {Tcl Domain Name Service Client}

Package {ip 1.3}
See   __dns
Platform *
Desc     {IPv4 and IPv6 address manipulation}

Package {resolv 1.0.3}
See   __dns
Platform *
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
Desc     {Docstrip-related utilities}

#
# #################

# #################
# Module "doctools"
# [1]    | "doctools::idx" (1.1)
# [2]    | "doctools::toc" (1.2)
# [3]    | "doctools::changelog" (1.1)
# [4]    | "doctools::cvs" (1)
# [5]    | "doctools" (1.5.6)
# -------+

Package {__doctools 0.0}
Platform *
Desc     {Documentation tools}
Hidden
Base     @TAP_DIR@/doctools







|
|


|







766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
Desc     {Docstrip-related utilities}

#
# #################

# #################
# Module "doctools"
# [1]    | "doctools::idx" (1.0.5)
# [2]    | "doctools::toc" (1.1.4)
# [3]    | "doctools::changelog" (1.1)
# [4]    | "doctools::cvs" (1)
# [5]    | "doctools" (1.4.19)
# -------+

Package {__doctools 0.0}
Platform *
Desc     {Documentation tools}
Hidden
Base     @TAP_DIR@/doctools
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954

955

956
957
958
959
960
961
962

963
964
965
966

967
968
969
970
971
972
973
Path     cvs.tcl
Path     docidx.tcl
Path     doctoc.tcl
Path     doctools.tcl
Path     mpformats/_common.tcl
Path     mpformats/_html.tcl
Path     mpformats/_idx_common.tcl
Path     mpformats/_markdown.tcl
Path     mpformats/_nroff.tcl
Path     mpformats/_text.tcl
Path     mpformats/_text_bullets.tcl
Path     mpformats/_text_ccore.tcl
Path     mpformats/_text_cstack.tcl
Path     mpformats/_text_dlist.tcl
Path     mpformats/_text_margin.tcl
Path     mpformats/_text_para.tcl
Path     mpformats/_text_state.tcl
Path     mpformats/_text_utils.tcl
Path     mpformats/_toc_common.tcl
Path     mpformats/_xml.tcl
Path     mpformats/_xref.tcl
Path     mpformats/c.msg
Path     mpformats/de.msg
Path     mpformats/en.msg
Path     mpformats/fmt.desc
Path     mpformats/fmt.html
Path     mpformats/fmt.latex
Path     mpformats/fmt.list
Path     mpformats/fmt.markdown
Path     mpformats/fmt.nroff
Path     mpformats/fmt.null
Path     mpformats/fmt.text
Path     mpformats/fmt.tmml
Path     mpformats/fmt.wiki
Path     mpformats/fr.msg
Path     mpformats/idx.html
Path     mpformats/idx.markdown
Path     mpformats/idx.nroff
Path     mpformats/idx.null
Path     mpformats/idx.text
Path     mpformats/idx.wiki
Path     mpformats/man.macros
Path     mpformats/toc.html
Path     mpformats/toc.markdown
Path     mpformats/toc.nroff
Path     mpformats/toc.null
Path     mpformats/toc.text
Path     mpformats/toc.tmml
Path     mpformats/toc.wiki
Path     pkgIndex.tcl

Package {doctools::idx 1.1}
See   __doctools
Platform *
Desc     {docidx - Processing indices}

Package {doctools::toc 1.2}
See   __doctools
Platform *
Desc     {doctoc - Processing tables of contents}

Package {doctools::changelog 1.1}
See   __doctools
Platform *
Desc     {Processing text in Emacs ChangeLog format}

Package {doctools::cvs 1}
See   __doctools
Platform *
Desc     {Processing text in 'cvs log' format}

Package {doctools 1.5.6}
See   __doctools
Platform *
Desc     {doctools - Processing documents}

#
# #################

# ######################
# Module "doctools2base"
# [1]    | "doctools::text" (0.1)
# [2]    | "doctools::html" (0.1)
# [3]    | "doctools::html::cssdefaults" (0.1)
# [4]    | "doctools::tcl::parse" (0.1)
# [5]    | "doctools::msgcat" (0.1)

# [6]    | "doctools::nroff::man_macros" (0.1)

# -------+

Package {__doctools2base 0.0}
Platform *
Desc     {Documentation tools}
Hidden
Base     @TAP_DIR@/doctools2base

Path     html.tcl
Path     html_cssdefaults.tcl
Path     msgcat.tcl
Path     nroff_manmacros.tcl

Path     pkgIndex.tcl
Path     tcl_parse.tcl
Path     text.tcl

Package {doctools::text 0.1}
See   __doctools2base
Platform *







<


<
<
<
<
<
<
<
<


<







<







<






<







|




|














|













|
>
|
>







>




>







792
793
794
795
796
797
798

799
800








801
802

803
804
805
806
807
808
809

810
811
812
813
814
815
816

817
818
819
820
821
822

823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
Path     cvs.tcl
Path     docidx.tcl
Path     doctoc.tcl
Path     doctools.tcl
Path     mpformats/_common.tcl
Path     mpformats/_html.tcl
Path     mpformats/_idx_common.tcl

Path     mpformats/_nroff.tcl
Path     mpformats/_text.tcl








Path     mpformats/_toc_common.tcl
Path     mpformats/_xml.tcl

Path     mpformats/c.msg
Path     mpformats/de.msg
Path     mpformats/en.msg
Path     mpformats/fmt.desc
Path     mpformats/fmt.html
Path     mpformats/fmt.latex
Path     mpformats/fmt.list

Path     mpformats/fmt.nroff
Path     mpformats/fmt.null
Path     mpformats/fmt.text
Path     mpformats/fmt.tmml
Path     mpformats/fmt.wiki
Path     mpformats/fr.msg
Path     mpformats/idx.html

Path     mpformats/idx.nroff
Path     mpformats/idx.null
Path     mpformats/idx.text
Path     mpformats/idx.wiki
Path     mpformats/man.macros
Path     mpformats/toc.html

Path     mpformats/toc.nroff
Path     mpformats/toc.null
Path     mpformats/toc.text
Path     mpformats/toc.tmml
Path     mpformats/toc.wiki
Path     pkgIndex.tcl

Package {doctools::idx 1.0.5}
See   __doctools
Platform *
Desc     {docidx - Processing indices}

Package {doctools::toc 1.1.4}
See   __doctools
Platform *
Desc     {doctoc - Processing tables of contents}

Package {doctools::changelog 1.1}
See   __doctools
Platform *
Desc     {Processing text in Emacs ChangeLog format}

Package {doctools::cvs 1}
See   __doctools
Platform *
Desc     {Processing text in 'cvs log' format}

Package {doctools 1.4.19}
See   __doctools
Platform *
Desc     {doctools - Processing documents}

#
# #################

# ######################
# Module "doctools2base"
# [1]    | "doctools::text" (0.1)
# [2]    | "doctools::html" (0.1)
# [3]    | "doctools::html::cssdefaults" (0.1)
# [4]    | "doctools::tcl::parse" (0.1)
# [5]    | "doctools::config" (0.1)
# [6]    | "doctools::msgcat" (0.1)
# [7]    | "doctools::nroff::man_macros" (0.1)
# [8]    | "doctools::paths" (0.1)
# -------+

Package {__doctools2base 0.0}
Platform *
Desc     {Documentation tools}
Hidden
Base     @TAP_DIR@/doctools2base
Path     config.tcl
Path     html.tcl
Path     html_cssdefaults.tcl
Path     msgcat.tcl
Path     nroff_manmacros.tcl
Path     paths.tcl
Path     pkgIndex.tcl
Path     tcl_parse.tcl
Path     text.tcl

Package {doctools::text 0.1}
See   __doctools2base
Platform *
983
984
985
986
987
988
989





990
991
992
993
994
995
996
997
998
999
1000





1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
Platform *
Desc     {Default CSS style for HTML export plugins}

Package {doctools::tcl::parse 0.1}
See   __doctools2base
Platform *
Desc     {Processing text in 'subst -novariables' format}






Package {doctools::msgcat 0.1}
See   __doctools2base
Platform *
Desc     {Message catalog management for the various document parsers}

Package {doctools::nroff::man_macros 0.1}
See   __doctools2base
Platform *
Desc     {Default CSS style for NROFF export plugins}






#
# ######################

# #####################
# Module "doctools2idx"
# [1]    | "doctools::idx::import::json" (0.1)
# [2]    | "doctools::idx::structure" (0.1)
# [3]    | "doctools::idx::export::nroff" (0.3)
# [4]    | "doctools::idx::import::docidx" (0.1)
# [5]    | "doctools::idx::export" (0.2.1)
# [6]    | "doctools::idx::export::html" (0.2)
# [7]    | "doctools::msgcat::idx::fr" (0.1)
# [8]    | "doctools::idx::parse" (0.1)
# [9]    | "doctools::msgcat::idx::de" (0.1)
# [10]    | "doctools::idx" (2)
# [11]    | "doctools::msgcat::idx::c" (0.1)
# [12]    | "doctools::msgcat::idx::en" (0.1)
# [13]    | "doctools::idx::export::json" (0.1)
# [14]    | "doctools::idx::export::docidx" (0.1)
# [15]    | "doctools::idx::export::wiki" (0.2)
# [16]    | "doctools::idx::export::text" (0.2)
# [17]    | "doctools::idx::import" (0.2.1)
# -------+

Package {__doctools2idx 0.0}
Platform *
Desc     {Documentation tools}
Hidden
Base     @TAP_DIR@/doctools2idx







>
>
>
>
>











>
>
>
>
>









|











|







897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
Platform *
Desc     {Default CSS style for HTML export plugins}

Package {doctools::tcl::parse 0.1}
See   __doctools2base
Platform *
Desc     {Processing text in 'subst -novariables' format}

Package {doctools::config 0.1}
See   __doctools2base
Platform *
Desc     {Tcllib package}

Package {doctools::msgcat 0.1}
See   __doctools2base
Platform *
Desc     {Message catalog management for the various document parsers}

Package {doctools::nroff::man_macros 0.1}
See   __doctools2base
Platform *
Desc     {Default CSS style for NROFF export plugins}

Package {doctools::paths 0.1}
See   __doctools2base
Platform *
Desc     {Tcllib package}

#
# ######################

# #####################
# Module "doctools2idx"
# [1]    | "doctools::idx::import::json" (0.1)
# [2]    | "doctools::idx::structure" (0.1)
# [3]    | "doctools::idx::export::nroff" (0.3)
# [4]    | "doctools::idx::import::docidx" (0.1)
# [5]    | "doctools::idx::export" (0.1)
# [6]    | "doctools::idx::export::html" (0.2)
# [7]    | "doctools::msgcat::idx::fr" (0.1)
# [8]    | "doctools::idx::parse" (0.1)
# [9]    | "doctools::msgcat::idx::de" (0.1)
# [10]    | "doctools::idx" (2)
# [11]    | "doctools::msgcat::idx::c" (0.1)
# [12]    | "doctools::msgcat::idx::en" (0.1)
# [13]    | "doctools::idx::export::json" (0.1)
# [14]    | "doctools::idx::export::docidx" (0.1)
# [15]    | "doctools::idx::export::wiki" (0.2)
# [16]    | "doctools::idx::export::text" (0.2)
# [17]    | "doctools::idx::import" (0.1)
# -------+

Package {__doctools2idx 0.0}
Platform *
Desc     {Documentation tools}
Hidden
Base     @TAP_DIR@/doctools2idx
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
Desc     {nroff export plugin}

Package {doctools::idx::import::docidx 0.1}
See   __doctools2idx
Platform *
Desc     {docidx import plugin}

Package {doctools::idx::export 0.2.1}
See   __doctools2idx
Platform *
Desc     {Exporting keyword indices}

Package {doctools::idx::export::html 0.2}
See   __doctools2idx
Platform *







|







986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Desc     {nroff export plugin}

Package {doctools::idx::import::docidx 0.1}
See   __doctools2idx
Platform *
Desc     {docidx import plugin}

Package {doctools::idx::export 0.1}
See   __doctools2idx
Platform *
Desc     {Exporting keyword indices}

Package {doctools::idx::export::html 0.2}
See   __doctools2idx
Platform *
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
Desc     {wiki export plugin}

Package {doctools::idx::export::text 0.2}
See   __doctools2idx
Platform *
Desc     {plain text export plugin}

Package {doctools::idx::import 0.2.1}
See   __doctools2idx
Platform *
Desc     {Importing keyword indices}

#
# #####################

# #####################
# Module "doctools2toc"
# [1]    | "doctools::toc::export::html" (0.1)
# [2]    | "doctools::msgcat::toc::fr" (0.1)
# [3]    | "doctools::msgcat::toc::de" (0.1)
# [4]    | "doctools::toc" (2)
# [5]    | "doctools::msgcat::toc::en" (0.1)
# [6]    | "doctools::toc::export::json" (0.1)
# [7]    | "doctools::toc::structure" (0.1)
# [8]    | "doctools::toc::export::nroff" (0.2)
# [9]    | "doctools::toc::export::wiki" (0.1)
# [10]    | "doctools::toc::import::doctoc" (0.1)
# [11]    | "doctools::toc::export::text" (0.1)
# [12]    | "doctools::toc::import" (0.2.1)
# [13]    | "doctools::toc::parse" (0.1)
# [14]    | "doctools::msgcat::toc::c" (0.1)
# [15]    | "dict" (1)
# [16]    | "doctools::toc::import::json" (0.1)
# [17]    | "doctools::toc::export" (0.2.1)
# [18]    | "doctools::toc::export::doctoc" (0.1)
# -------+

Package {__doctools2toc 0.0}
Platform *
Desc     {Documentation tools}
Hidden







|




















|




|







1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
Desc     {wiki export plugin}

Package {doctools::idx::export::text 0.2}
See   __doctools2idx
Platform *
Desc     {plain text export plugin}

Package {doctools::idx::import 0.1}
See   __doctools2idx
Platform *
Desc     {Importing keyword indices}

#
# #####################

# #####################
# Module "doctools2toc"
# [1]    | "doctools::toc::export::html" (0.1)
# [2]    | "doctools::msgcat::toc::fr" (0.1)
# [3]    | "doctools::msgcat::toc::de" (0.1)
# [4]    | "doctools::toc" (2)
# [5]    | "doctools::msgcat::toc::en" (0.1)
# [6]    | "doctools::toc::export::json" (0.1)
# [7]    | "doctools::toc::structure" (0.1)
# [8]    | "doctools::toc::export::nroff" (0.2)
# [9]    | "doctools::toc::export::wiki" (0.1)
# [10]    | "doctools::toc::import::doctoc" (0.1)
# [11]    | "doctools::toc::export::text" (0.1)
# [12]    | "doctools::toc::import" (0.1)
# [13]    | "doctools::toc::parse" (0.1)
# [14]    | "doctools::msgcat::toc::c" (0.1)
# [15]    | "dict" (1)
# [16]    | "doctools::toc::import::json" (0.1)
# [17]    | "doctools::toc::export" (0.1)
# [18]    | "doctools::toc::export::doctoc" (0.1)
# -------+

Package {__doctools2toc 0.0}
Platform *
Desc     {Documentation tools}
Hidden
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
Desc     {doctoc import plugin}

Package {doctools::toc::export::text 0.1}
See   __doctools2toc
Platform *
Desc     {plain text export plugin}

Package {doctools::toc::import 0.2.1}
See   __doctools2toc
Platform *
Desc     {Importing keyword indices}

Package {doctools::toc::parse 0.1}
See   __doctools2toc
Platform *







|







1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
Desc     {doctoc import plugin}

Package {doctools::toc::export::text 0.1}
See   __doctools2toc
Platform *
Desc     {plain text export plugin}

Package {doctools::toc::import 0.1}
See   __doctools2toc
Platform *
Desc     {Importing keyword indices}

Package {doctools::toc::parse 0.1}
See   __doctools2toc
Platform *
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
Desc     {Tcllib package}

Package {doctools::toc::import::json 0.1}
See   __doctools2toc
Platform *
Desc     {JSON import plugin}

Package {doctools::toc::export 0.2.1}
See   __doctools2toc
Platform *
Desc     {Exporting tables of contents}

Package {doctools::toc::export::doctoc 0.1}
See   __doctools2toc
Platform *
Desc     {doctoc export plugin}

#
# #####################

# ################
# Module "dtplite"
# [1]    | "dtplite" (1.3.1)
# -------+

Package {dtplite 1.3.1}
Platform *
Desc     {Lightweight DocTools Markup Processor}
Base     @TAP_DIR@/dtplite
Path     dtplite.tcl
Path     pkgIndex.tcl

#







|














|


|







1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
Desc     {Tcllib package}

Package {doctools::toc::import::json 0.1}
See   __doctools2toc
Platform *
Desc     {JSON import plugin}

Package {doctools::toc::export 0.1}
See   __doctools2toc
Platform *
Desc     {Exporting tables of contents}

Package {doctools::toc::export::doctoc 0.1}
See   __doctools2toc
Platform *
Desc     {doctoc export plugin}

#
# #####################

# ################
# Module "dtplite"
# [1]    | "dtplite" (1.3)
# -------+

Package {dtplite 1.3}
Platform *
Desc     {Lightweight DocTools Markup Processor}
Base     @TAP_DIR@/dtplite
Path     dtplite.tcl
Path     pkgIndex.tcl

#
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
#
# #############

# #################
# Module "fileutil"
# [1]    | "fileutil::multi::op" (0.5.3)
# [2]    | "fileutil::multi" (0.1)
# [3]    | "fileutil::paths" (1)
# [4]    | "fileutil::decode" (0.2.1)
# [5]    | "fileutil" (1.16)
# [6]    | "fileutil::traverse" (0.6)
# -------+

Package {__fileutil 0.0}
Platform *
Desc     {file utilities, Parser generator tools}
Hidden
Base     @TAP_DIR@/fileutil
Path     decode.tcl
Path     fileutil.tcl
Path     multi.tcl
Path     multiop.tcl
Path     paths.tcl
Path     pkgIndex.tcl
Path     traverse.tcl

Package {fileutil::multi::op 0.5.3}
See   __fileutil
Platform *
Desc     {Multi-file operation, scatter/gather}

Package {fileutil::multi 0.1}
See   __fileutil
Platform *
Desc     {Multi-file operation, scatter/gather, standard object}

Package {fileutil::paths 1}
See   __fileutil
Platform *
Desc     {Manage search path pools}

Package {fileutil::decode 0.2.1}
See   __fileutil
Platform *
Desc     {Tcllib package}

Package {fileutil 1.16}
See   __fileutil
Platform *
Desc     {page plugin manager}

Package {fileutil::traverse 0.6}
See   __fileutil
Platform *







|
|
|
<











<













|
<
<
<
<
<




|







1227
1228
1229
1230
1231
1232
1233
1234
1235
1236

1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247

1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261





1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
#
# #############

# #################
# Module "fileutil"
# [1]    | "fileutil::multi::op" (0.5.3)
# [2]    | "fileutil::multi" (0.1)
# [3]    | "fileutil::decode" (0.2)
# [4]    | "fileutil" (1.15)
# [5]    | "fileutil::traverse" (0.6)

# -------+

Package {__fileutil 0.0}
Platform *
Desc     {file utilities, Parser generator tools}
Hidden
Base     @TAP_DIR@/fileutil
Path     decode.tcl
Path     fileutil.tcl
Path     multi.tcl
Path     multiop.tcl

Path     pkgIndex.tcl
Path     traverse.tcl

Package {fileutil::multi::op 0.5.3}
See   __fileutil
Platform *
Desc     {Multi-file operation, scatter/gather}

Package {fileutil::multi 0.1}
See   __fileutil
Platform *
Desc     {Multi-file operation, scatter/gather, standard object}

Package {fileutil::decode 0.2}





See   __fileutil
Platform *
Desc     {Tcllib package}

Package {fileutil 1.15}
See   __fileutil
Platform *
Desc     {page plugin manager}

Package {fileutil::traverse 0.6}
See   __fileutil
Platform *
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410

1411
1412
1413
1414
1415
1416
1417
1418
1419
1420

1421
1422
1423
1424
1425
1426
1427
1428
1429





1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
Path     pkgIndex.tcl

#
# #############

# ################
# Module "fumagic"
# [1]    | "fileutil::magic::cgen" (1.2.0)
# [2]    | "fileutil::magic::rt" (2.0)
# [3]    | "fileutil::magic::filetype" (2.0)
# [4]    | "fileutil::magic::cfront" (1.2.0)

# -------+

Package {__fumagic 0.0}
Platform *
Desc     {Tcl Web Server, file utilities}
Hidden
Base     @TAP_DIR@/fumagic
Path     cfront.tcl
Path     cgen.tcl
Path     filetypes.tcl

Path     pkgIndex.tcl
Path     rtcore.tcl

Package {fileutil::magic::cgen 1.2.0}
See   __fumagic
Platform *
Desc     {Generator core for compiler of magic(5) files}

Package {fileutil::magic::rt 2.0}





See   __fumagic
Platform *
Desc     {Runtime core for file type recognition engines written in pure Tcl}

Package {fileutil::magic::filetype 2.0}
See   __fumagic
Platform *
Desc     {A TclOO and coroutine based web server}

Package {fileutil::magic::cfront 1.2.0}
See   __fumagic
Platform *
Desc     {Generator core for compiler of magic(5) files}

#
# ################








|
|
|
|
>




|





>



|




|
>
>
>
>
>




|


|

|







1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
Path     pkgIndex.tcl

#
# #############

# ################
# Module "fumagic"
# [1]    | "fileutil::magic::cgen" (1.0)
# [2]    | "fileutil::magic::mimetype" (1.0.2)
# [3]    | "fileutil::magic::rt" (1.0)
# [4]    | "fileutil::magic::filetype" (1.0.2)
# [5]    | "fileutil::magic::cfront" (1.0)
# -------+

Package {__fumagic 0.0}
Platform *
Desc     {file utilities}
Hidden
Base     @TAP_DIR@/fumagic
Path     cfront.tcl
Path     cgen.tcl
Path     filetypes.tcl
Path     mimetypes.tcl
Path     pkgIndex.tcl
Path     rtcore.tcl

Package {fileutil::magic::cgen 1.0}
See   __fumagic
Platform *
Desc     {Generator core for compiler of magic(5) files}

Package {fileutil::magic::mimetype 1.0.2}
See   __fumagic
Platform *
Desc     {Procedures implementing mime-type recognition}

Package {fileutil::magic::rt 1.0}
See   __fumagic
Platform *
Desc     {Runtime core for file type recognition engines written in pure Tcl}

Package {fileutil::magic::filetype 1.0.2}
See   __fumagic
Platform *
Desc     {Procedures implementing file-type recognition}

Package {fileutil::magic::cfront 1.0}
See   __fumagic
Platform *
Desc     {Generator core for compiler of magic(5) files}

#
# ################

1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663



1664
1665
1666
1667
1668

1669


1670
1671





















1672
1673
1674
1675
1676
1677
1678
Path     pkgIndex.tcl

#
# #############

# #############
# Module "http"
# [1]    | "autoproxy" (1.7)
# -------+

Package {autoproxy 1.7}
Platform *
Desc     {Automatic HTTP proxy usage and authentication}
Base     @TAP_DIR@/http
Path     autoproxy.tcl
Path     pkgIndex.tcl

#
# #############

# ##############
# Module "httpd"
# [1]    | "httpd" (4.3.4)



# -------+

Package {httpd 4.3.4}
Platform *
Desc     {Tcllib package}

Base     @TAP_DIR@/httpd


Path     httpd.tcl
Path     pkgIndex.tcl






















#
# ##############

# #################
# Module "httpwget"
# [1]    | "http::wget" (0.1)







|


|











|
>
>
>


|

|
>

>
>


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
Path     pkgIndex.tcl

#
# #############

# #############
# Module "http"
# [1]    | "autoproxy" (1.5.3)
# -------+

Package {autoproxy 1.5.3}
Platform *
Desc     {Automatic HTTP proxy usage and authentication}
Base     @TAP_DIR@/http
Path     autoproxy.tcl
Path     pkgIndex.tcl

#
# #############

# ##############
# Module "httpd"
# [1]    | "httpd" (4.0)
# [2]    | "httpd::dispatch" (4.0)
# [3]    | "httpd::content" (4.0)
# [4]    | "scgi::app" (0.1)
# -------+

Package {__httpd 0.0}
Platform *
Desc     {Tcllib module}
Hidden
Base     @TAP_DIR@/httpd
Path     content.tcl
Path     dispatch.tcl
Path     httpd.tcl
Path     pkgIndex.tcl
Path     scgi-app.tcl

Package {httpd 4.0}
See   __httpd
Platform *
Desc     {Tcllib package}

Package {httpd::dispatch 4.0}
See   __httpd
Platform *
Desc     {Tcllib package}

Package {httpd::content 4.0}
See   __httpd
Platform *
Desc     {Tcllib package}

Package {scgi::app 0.1}
See   __httpd
Platform *
Desc     {Tcllib package}

#
# ##############

# #################
# Module "httpwget"
# [1]    | "http::wget" (0.1)
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
Path     wget.tcl

#
# #################

# #############
# Module "html"
# [1]    | "html" (1.5)
# -------+

Package {html 1.5}
Platform *
Desc     {Procedures to generate HTML structures}
Base     @TAP_DIR@/html
Path     html.tcl
Path     pkgIndex.tcl

#







|


|







1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
Path     wget.tcl

#
# #################

# #############
# Module "html"
# [1]    | "html" (1.4.4)
# -------+

Package {html 1.4.4}
Platform *
Desc     {Procedures to generate HTML structures}
Base     @TAP_DIR@/html
Path     html.tcl
Path     pkgIndex.tcl

#
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
Path     pkgIndex.tcl

#
# ##############

# ################
# Module "inifile"
# [1]    | "inifile" (0.3.1)
# -------+

Package {inifile 0.3.1}
Platform *
Desc     {Parsing of Windows INI files}
Base     @TAP_DIR@/inifile
Path     ini.tcl
Path     pkgIndex.tcl

#







|


|







1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
Path     pkgIndex.tcl

#
# ##############

# ################
# Module "inifile"
# [1]    | "inifile" (0.3)
# -------+

Package {inifile 0.3}
Platform *
Desc     {Parsing of Windows INI files}
Base     @TAP_DIR@/inifile
Path     ini.tcl
Path     pkgIndex.tcl

#
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828

#
# ###############

# ############
# Module "irc"
# [1]    | "picoirc" (0.5.2)
# [2]    | "irc" (0.6.2)
# -------+

Package {__irc 0.0}
Platform *
Desc     {Low Level Tcl IRC Interface, Simple embeddable IRC interface}
Hidden
Base     @TAP_DIR@/irc
Path     irc.tcl
Path     picoirc.tcl
Path     pkgIndex.tcl

Package {picoirc 0.5.2}
See   __irc
Platform *
Desc     {Small and simple embeddable IRC client.}

Package {irc 0.6.2}
See   __irc
Platform *
Desc     {Create IRC connection and interface.}

#
# ############








|
















|







1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779

#
# ###############

# ############
# Module "irc"
# [1]    | "picoirc" (0.5.2)
# [2]    | "irc" (0.6.1)
# -------+

Package {__irc 0.0}
Platform *
Desc     {Low Level Tcl IRC Interface, Simple embeddable IRC interface}
Hidden
Base     @TAP_DIR@/irc
Path     irc.tcl
Path     picoirc.tcl
Path     pkgIndex.tcl

Package {picoirc 0.5.2}
See   __irc
Platform *
Desc     {Small and simple embeddable IRC client.}

Package {irc 0.6.1}
See   __irc
Platform *
Desc     {Create IRC connection and interface.}

#
# ############

1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888

#
# #############

# #############
# Module "json"
# [1]    | "json::write" (1.0.3)
# [2]    | "json" (1.3.4)
# -------+

Package {__json 0.0}
Platform *
Desc     {JSON}
Hidden
Base     @TAP_DIR@/json
Path     json.tcl
Path     json_tcl.tcl
Path     json_write.tcl
Path     jsonc.tcl
Path     pkgIndex.tcl

Package {json::write 1.0.3}
See   __json
Platform *
Desc     {JSON generation}

Package {json 1.3.4}
See   __json
Platform *
Desc     {JSON parser}

#
# #############








|


















|







1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839

#
# #############

# #############
# Module "json"
# [1]    | "json::write" (1.0.3)
# [2]    | "json" (1.3.3)
# -------+

Package {__json 0.0}
Platform *
Desc     {JSON}
Hidden
Base     @TAP_DIR@/json
Path     json.tcl
Path     json_tcl.tcl
Path     json_write.tcl
Path     jsonc.tcl
Path     pkgIndex.tcl

Package {json::write 1.0.3}
See   __json
Platform *
Desc     {JSON generation}

Package {json 1.3.3}
See   __json
Platform *
Desc     {JSON parser}

#
# #############

1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
Base     @TAP_DIR@/lambda
Path     lambda.tcl
Path     pkgIndex.tcl

#
# ###############

# ################
# Module "lazyset"
# [1]    | "lazyset" (1)
# -------+

Package {lazyset 1}
Platform *
Desc     {Lazy evaluation}
Base     @TAP_DIR@/lazyset
Path     lazyset.tcl
Path     pkgIndex.tcl

#
# ################

# #############
# Module "ldap"
# [1]    | "ldapx" (1.1)
# [2]    | "ldap" (1.9.2)
# -------+

Package {__ldap 0.0}
Platform *
Desc     {LDAP client, LDAP extended object interface}
Hidden
Base     @TAP_DIR@/ldap
Path     ldap.tcl
Path     ldapx.tcl
Path     pkgIndex.tcl

Package {ldapx 1.1}
See   __ldap
Platform *
Desc     {LDAP extended object interface}

Package {ldap 1.9.2}
See   __ldap
Platform *
Desc     {LDAP client}

#
# #############

# ############
# Module "log"
# [1]    | "logger" (0.9.4)
# [2]    | "logger::utils" (1.3.1)
# [3]    | "log" (1.4)
# [4]    | "logger::appender" (1.3)
# -------+

Package {__log 0.0}
Platform *
Desc     {Logging facility, Object Oriented logging facility}
Hidden
Base     @TAP_DIR@/log
Path     log.tcl
Path     logger.tcl
Path     loggerAppender.tcl
Path     loggerUtils.tcl
Path     msgs/en.msg
Path     pkgIndex.tcl

Package {logger 0.9.4}
See   __log
Platform *
Desc     {System to control logging of events.}

Package {logger::utils 1.3.1}
See   __log
Platform *
Desc     {Utilities for logger}

Package {log 1.4}
See   __log
Platform *
Desc     {Procedures to log messages of libraries and applications.}

Package {logger::appender 1.3}
See   __log
Platform *
Desc     {Collection of predefined appenders for logger}

#
# ############

# #################
# Module "markdown"
# [1]    | "Markdown" (1.1.1)
# -------+

Package {Markdown 1.1.1}
Platform *
Desc     {A TclOO and coroutine based web server}
Base     @TAP_DIR@/markdown
Path     markdown.tcl
Path     pkgIndex.tcl

#
# #################








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|
|











|




|










|
|




















|




|














|


|

|







1848
1849
1850
1851
1852
1853
1854















1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
Base     @TAP_DIR@/lambda
Path     lambda.tcl
Path     pkgIndex.tcl

#
# ###############
















# #############
# Module "ldap"
# [1]    | "ldapx" (1.0)
# [2]    | "ldap" (1.8)
# -------+

Package {__ldap 0.0}
Platform *
Desc     {LDAP client, LDAP extended object interface}
Hidden
Base     @TAP_DIR@/ldap
Path     ldap.tcl
Path     ldapx.tcl
Path     pkgIndex.tcl

Package {ldapx 1.0}
See   __ldap
Platform *
Desc     {LDAP extended object interface}

Package {ldap 1.8}
See   __ldap
Platform *
Desc     {LDAP client}

#
# #############

# ############
# Module "log"
# [1]    | "logger" (0.9.4)
# [2]    | "logger::utils" (1.3)
# [3]    | "log" (1.3)
# [4]    | "logger::appender" (1.3)
# -------+

Package {__log 0.0}
Platform *
Desc     {Logging facility, Object Oriented logging facility}
Hidden
Base     @TAP_DIR@/log
Path     log.tcl
Path     logger.tcl
Path     loggerAppender.tcl
Path     loggerUtils.tcl
Path     msgs/en.msg
Path     pkgIndex.tcl

Package {logger 0.9.4}
See   __log
Platform *
Desc     {System to control logging of events.}

Package {logger::utils 1.3}
See   __log
Platform *
Desc     {Utilities for logger}

Package {log 1.3}
See   __log
Platform *
Desc     {Procedures to log messages of libraries and applications.}

Package {logger::appender 1.3}
See   __log
Platform *
Desc     {Collection of predefined appenders for logger}

#
# ############

# #################
# Module "markdown"
# [1]    | "Markdown" (1.0)
# -------+

Package {Markdown 1.0}
Platform *
Desc     {Tcllib package}
Base     @TAP_DIR@/markdown
Path     markdown.tcl
Path     pkgIndex.tcl

#
# #################

2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
Path     pkgIndex.tcl

#
# ################

# #############
# Module "math"
# [1]    | "math::numtheory" (1.1.1)
# [2]    | "math::statistics" (1.5.0)
# [3]    | "math::rationalfunctions" (1.0.1)
# [4]    | "math::quasirandom" (1.0)
# [5]    | "math::fourier" (1.0.2)
# [6]    | "math::PCA" (1.0)
# [7]    | "math" (1.2.5)
# [8]    | "math::complexnumbers" (1.0.2)
# [9]    | "math::roman" (1.0)
# [10]    | "math::exact" (1.0.1)
# [11]    | "math::trig" (1.0)
# [12]    | "math::interpolate" (1.1.2)
# [13]    | "math::fuzzy" (0.2.1)
# [14]    | "math::linearalgebra" (1.1.6)
# [15]    | "math::optimize" (1.0.1)
# [16]    | "math::special" (0.4.0)
# [17]    | "math::calculus::symdiff" (1.0.1)
# [18]    | "math::bignum" (3.1.1)
# [19]    | "math::calculus" (0.8.2)
# [20]    | "math::geometry" (1.3.1)
# [21]    | "math::constants" (1.0.2)
# [22]    | "math::polynomials" (1.0.1)
# [23]    | "math::decimal" (1.0.3)
# [24]    | "math::bigfloat" (1.2.2)
# [25]    | "math::bigfloat" (2.0.2)
# [26]    | "math::machineparameters" (0.1)
# -------+

Package {__math 0.0}
Platform *
Desc     {Principal Components Analysis, Tcl Decimal Arithmetic Library, tclrep, Math, Tcl Math Library, Symbolic differentiation for Tcl}
Hidden
Base     @TAP_DIR@/math
Path     bessel.tcl
Path     bigfloat.tcl
Path     bigfloat2.tcl
Path     bignum.tcl
Path     calculus.tcl
Path     classic_polyns.tcl
Path     combinatorics.tcl
Path     constants.tcl
Path     decimal.tcl
Path     elliptic.tcl
Path     exact.tcl
Path     exponential.tcl
Path     fourier.tcl
Path     fuzzy.tcl
Path     geometry.tcl
Path     geometry_circle.tcl
Path     interpolate.tcl
Path     kruskal.tcl
Path     linalg.tcl
Path     liststat.tcl
Path     machineparameters.tcl
Path     math.tcl
Path     misc.tcl
Path     mvlinreg.tcl
Path     numtheory.tcl
Path     optimize.tcl
Path     pca.tcl
Path     pdf_stat.tcl
Path     pkgIndex.tcl
Path     plotstat.tcl
Path     polynomials.tcl
Path     primes.tcl
Path     qcomplex.tcl
Path     quasirandom.tcl
Path     rational_funcs.tcl
Path     romannumerals.tcl
Path     special.tcl
Path     stat_kernel.tcl
Path     stat_logit.tcl
Path     stat_wasserstein.tcl
Path     statistics.tcl
Path     symdiff.tcl
Path     tclIndex
Path     trig.tcl
Path     wilcoxon.tcl

Package {math::numtheory 1.1.1}
See   __math
Platform *
Desc     {Number Theory}

Package {math::statistics 1.5.0}
See   __math
Platform *
Desc     {Basic statistical functions and procedures}

Package {math::rationalfunctions 1.0.1}
See   __math
Platform *
Desc     {Polynomial functions}

Package {math::quasirandom 1.0}
See   __math
Platform *
Desc     {Quasi-random points for integration and Monte Carlo type methods}

Package {math::fourier 1.0.2}
See   __math
Platform *
Desc     {Discrete and fast fourier transforms}

Package {math::PCA 1.0}
See   __math
Platform *
Desc     {Tcllib package}

Package {math 1.2.5}
See   __math
Platform *
Desc     {Combinatorial functions in the Tcl Math Library}

Package {math::complexnumbers 1.0.2}
See   __math
Platform *
Desc     {Straightforward complex number package}

Package {math::roman 1.0}
See   __math
Platform *
Desc     {Tools for creating and manipulating roman numerals}

Package {math::exact 1.0.1}
See   __math
Platform *
Desc     {Exact Real Arithmetic}

Package {math::trig 1.0}
See   __math
Platform *
Desc     {Trigonometric anf hyperbolic functions}

Package {math::interpolate 1.1.2}
See   __math
Platform *
Desc     {Interpolation routines}

Package {math::fuzzy 0.2.1}
See   __math
Platform *
Desc     {Fuzzy comparison of floating-point numbers}

Package {math::linearalgebra 1.1.6}
See   __math
Platform *
Desc     {Package for Principal Component Analysis}

Package {math::optimize 1.0.1}
See   __math
Platform *
Desc     {Optimisation routines}

Package {math::special 0.4.0}
See   __math
Platform *
Desc     {Special mathematical functions}

Package {math::calculus::symdiff 1.0.1}
See   __math
Platform *
Desc     {Symbolic differentiation for Tcl}

Package {math::bignum 3.1.1}
See   __math
Platform *
Desc     {Arbitrary precision integer numbers}

Package {math::calculus 0.8.2}
See   __math
Platform *
Desc     {Romberg integration}

Package {math::geometry 1.3.1}
See   __math
Platform *
Desc     {Geometrical computations}

Package {math::constants 1.0.2}
See   __math
Platform *







|
|

<
|
<
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|




|

















<










<




<

<




<
<



<


|




|









<
<
<
<
<





<
<
<
<
<















|




<
<
<
<
<
|









|


|






|














|




|







1993
1994
1995
1996
1997
1998
1999
2000
2001
2002

2003

2004
2005
2006
2007

2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044

2045
2046
2047
2048
2049
2050
2051
2052
2053
2054

2055
2056
2057
2058

2059

2060
2061
2062
2063


2064
2065
2066

2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083





2084
2085
2086
2087
2088





2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108





2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
Path     pkgIndex.tcl

#
# ################

# #############
# Module "math"
# [1]    | "math::numtheory" (1.0)
# [2]    | "math::statistics" (1.0)
# [3]    | "math::rationalfunctions" (1.0.1)

# [4]    | "math::fourier" (1.0.2)

# [5]    | "math" (1.2.5)
# [6]    | "math::complexnumbers" (1.0.2)
# [7]    | "math::roman" (1.0)
# [8]    | "math::exact" (1.0)

# [9]    | "math::interpolate" (1.1)
# [10]    | "math::fuzzy" (0.2.1)
# [11]    | "math::linearalgebra" (1.1.5)
# [12]    | "math::optimize" (1.0.1)
# [13]    | "math::special" (0.3.0)
# [14]    | "math::calculus::symdiff" (1.0.1)
# [15]    | "math::bignum" (3.1.1)
# [16]    | "math::calculus" (0.8.1)
# [17]    | "math::geometry" (1.1.3)
# [18]    | "math::constants" (1.0.2)
# [19]    | "math::polynomials" (1.0.1)
# [20]    | "math::decimal" (1.0.3)
# [21]    | "math::bigfloat" (1.2.2)
# [22]    | "math::bigfloat" (2.0.2)
# [23]    | "math::machineparameters" (0.1)
# -------+

Package {__math 0.0}
Platform *
Desc     {Tcl Decimal Arithmetic Library, tclrep, Math, Tcl Math Library, Symbolic differentiation for Tcl}
Hidden
Base     @TAP_DIR@/math
Path     bessel.tcl
Path     bigfloat.tcl
Path     bigfloat2.tcl
Path     bignum.tcl
Path     calculus.tcl
Path     classic_polyns.tcl
Path     combinatorics.tcl
Path     constants.tcl
Path     decimal.tcl
Path     elliptic.tcl
Path     exact.tcl
Path     exponential.tcl
Path     fourier.tcl
Path     fuzzy.tcl
Path     geometry.tcl

Path     interpolate.tcl
Path     kruskal.tcl
Path     linalg.tcl
Path     liststat.tcl
Path     machineparameters.tcl
Path     math.tcl
Path     misc.tcl
Path     mvlinreg.tcl
Path     numtheory.tcl
Path     optimize.tcl

Path     pdf_stat.tcl
Path     pkgIndex.tcl
Path     plotstat.tcl
Path     polynomials.tcl

Path     qcomplex.tcl

Path     rational_funcs.tcl
Path     romannumerals.tcl
Path     special.tcl
Path     stat_kernel.tcl


Path     statistics.tcl
Path     symdiff.tcl
Path     tclIndex

Path     wilcoxon.tcl

Package {math::numtheory 1.0}
See   __math
Platform *
Desc     {Number Theory}

Package {math::statistics 1.0}
See   __math
Platform *
Desc     {Basic statistical functions and procedures}

Package {math::rationalfunctions 1.0.1}
See   __math
Platform *
Desc     {Polynomial functions}






Package {math::fourier 1.0.2}
See   __math
Platform *
Desc     {Discrete and fast fourier transforms}






Package {math 1.2.5}
See   __math
Platform *
Desc     {Combinatorial functions in the Tcl Math Library}

Package {math::complexnumbers 1.0.2}
See   __math
Platform *
Desc     {Straightforward complex number package}

Package {math::roman 1.0}
See   __math
Platform *
Desc     {Tools for creating and manipulating roman numerals}

Package {math::exact 1.0}
See   __math
Platform *
Desc     {Exact Real Arithmetic}






Package {math::interpolate 1.1}
See   __math
Platform *
Desc     {Interpolation routines}

Package {math::fuzzy 0.2.1}
See   __math
Platform *
Desc     {Fuzzy comparison of floating-point numbers}

Package {math::linearalgebra 1.1.5}
See   __math
Platform *
Desc     {Linear Algebra}

Package {math::optimize 1.0.1}
See   __math
Platform *
Desc     {Optimisation routines}

Package {math::special 0.3.0}
See   __math
Platform *
Desc     {Special mathematical functions}

Package {math::calculus::symdiff 1.0.1}
See   __math
Platform *
Desc     {Symbolic differentiation for Tcl}

Package {math::bignum 3.1.1}
See   __math
Platform *
Desc     {Arbitrary precision integer numbers}

Package {math::calculus 0.8.1}
See   __math
Platform *
Desc     {Romberg integration}

Package {math::geometry 1.1.3}
See   __math
Platform *
Desc     {Geometrical computations}

Package {math::constants 1.0.2}
See   __math
Platform *
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
Desc     {Compute double precision machine parameters.}

#
# #############

# ############
# Module "md4"
# [1]    | "md4" (1.0.7)
# -------+

Package {md4 1.0.7}
Platform *
Desc     {MD4 Message-Digest Algorithm}
Base     @TAP_DIR@/md4
Path     md4.tcl
Path     md4c.tcl
Path     pkgIndex.tcl








|


|







2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
Desc     {Compute double precision machine parameters.}

#
# #############

# ############
# Module "md4"
# [1]    | "md4" (1.0.6)
# -------+

Package {md4 1.0.6}
Platform *
Desc     {MD4 Message-Digest Algorithm}
Base     @TAP_DIR@/md4
Path     md4.tcl
Path     md4c.tcl
Path     pkgIndex.tcl

2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
Path     pkgIndex.tcl

#
# #################

# #############
# Module "mime"
# [1]    | "smtp" (1.5)
# [2]    | "mime" (1.6.2)
# -------+

Package {__mime 0.0}
Platform *
Desc     {Tcl Web Server, smtp client}
Hidden
Base     @TAP_DIR@/mime
Path     mime.tcl
Path     pkgIndex.tcl
Path     smtp.tcl

Package {smtp 1.5}
See   __mime
Platform *
Desc     {Client-side tcl implementation of the smtp protocol}

Package {mime 1.6.2}
See   __mime
Platform *
Desc     {A TclOO and coroutine based web server}

#
# #############

# ####################
# Module "multiplexer"
# [1]    | "multiplexer" (0.2)







|
|




|






|




|


|







2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
Path     pkgIndex.tcl

#
# #################

# #############
# Module "mime"
# [1]    | "smtp" (1.4.5)
# [2]    | "mime" (1.6)
# -------+

Package {__mime 0.0}
Platform *
Desc     {Mime, smtp client}
Hidden
Base     @TAP_DIR@/mime
Path     mime.tcl
Path     pkgIndex.tcl
Path     smtp.tcl

Package {smtp 1.4.5}
See   __mime
Platform *
Desc     {Client-side tcl implementation of the smtp protocol}

Package {mime 1.6}
See   __mime
Platform *
Desc     {Manipulation of MIME body parts}

#
# #############

# ####################
# Module "multiplexer"
# [1]    | "multiplexer" (0.2)
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412

2413
2414
2415
2416
2417

2418



2419
2420














2421
2422
2423
2424
2425
2426
2427
Path     pkgIndex.tcl

#
# ####################

# ###################
# Module "namespacex"
# [1]    | "namespacex" (0.2)
# -------+

Package {namespacex 0.2}
Platform *
Desc     {Namespace utility commands}
Base     @TAP_DIR@/namespacex
Path     namespacex.tcl
Path     pkgIndex.tcl

#
# ###################

# #############
# Module "ncgi"
# [1]    | "ncgi" (1.4.4)
# -------+

Package {ncgi 1.4.4}
Platform *
Desc     {Procedures to manipulate CGI values.}
Base     @TAP_DIR@/ncgi
Path     ncgi.tcl
Path     pkgIndex.tcl

#
# #############

# ################
# Module "nettool"
# [1]    | "nettool" (0.5.2)

# -------+

Package {nettool 0.5.2}
Platform *
Desc     {Tools for networked applications}

Base     @TAP_DIR@/nettool



Path     nettool.tcl
Path     pkgIndex.tcl















#
# ################

# #############
# Module "nmea"
# [1]    | "nmea" (1.0.0)







|


|











|


|











|
>


|

|
>

>
>
>


>
>
>
>
>
>
>
>
>
>
>
>
>
>







2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
Path     pkgIndex.tcl

#
# ####################

# ###################
# Module "namespacex"
# [1]    | "namespacex" (0.1)
# -------+

Package {namespacex 0.1}
Platform *
Desc     {Namespace utility commands}
Base     @TAP_DIR@/namespacex
Path     namespacex.tcl
Path     pkgIndex.tcl

#
# ###################

# #############
# Module "ncgi"
# [1]    | "ncgi" (1.4.3)
# -------+

Package {ncgi 1.4.3}
Platform *
Desc     {Procedures to manipulate CGI values.}
Base     @TAP_DIR@/ncgi
Path     ncgi.tcl
Path     pkgIndex.tcl

#
# #############

# ################
# Module "nettool"
# [1]    | "nettool" (0.5.1)
# [2]    | "nettool::platform::windows" (0.2)
# -------+

Package {__nettool 0.0}
Platform *
Desc     {nettool}
Hidden
Base     @TAP_DIR@/nettool
Path     available_ports.tcl
Path     generic.tcl
Path     locateport.tcl
Path     nettool.tcl
Path     pkgIndex.tcl
Path     platform_unix.tcl
Path     platform_unix_linux.tcl
Path     platform_unix_macosx.tcl
Path     platform_windows.tcl

Package {nettool 0.5.1}
See   __nettool
Platform *
Desc     {Tools for networked applications}

Package {nettool::platform::windows 0.2}
See   __nettool
Platform *
Desc     {Tcllib package}

#
# ################

# #############
# Module "nmea"
# [1]    | "nmea" (1.0.0)
2439
2440
2441
2442
2443
2444
2445

2446
2447
2448
2449
2450
2451
2452
2453
2454
2455

2456
2457
2458
2459
2460
2461
2462

# ############
# Module "nns"
# [1]    | "nameserv::server" (0.3.2)
# [2]    | "nameserv" (0.4.2)
# [3]    | "nameserv::auto" (0.3)
# [4]    | "nameserv::common" (0.1)

# -------+

Package {__nns 0.0}
Platform *
Desc     {Name service facility}
Hidden
Base     @TAP_DIR@/nns
Path     common.tcl
Path     nns.tcl
Path     nns_auto.tcl

Path     pkgIndex.tcl
Path     server.tcl

Package {nameserv::server 0.3.2}
See   __nns
Platform *
Desc     {Name service facility, Server}







>










>







2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394

# ############
# Module "nns"
# [1]    | "nameserv::server" (0.3.2)
# [2]    | "nameserv" (0.4.2)
# [3]    | "nameserv::auto" (0.3)
# [4]    | "nameserv::common" (0.1)
# [5]    | "nameserv::cluster" (0.2.3)
# -------+

Package {__nns 0.0}
Platform *
Desc     {Name service facility}
Hidden
Base     @TAP_DIR@/nns
Path     common.tcl
Path     nns.tcl
Path     nns_auto.tcl
Path     nns_cluster.tcl
Path     pkgIndex.tcl
Path     server.tcl

Package {nameserv::server 0.3.2}
See   __nns
Platform *
Desc     {Name service facility, Server}
2471
2472
2473
2474
2475
2476
2477





2478
2479
2480
2481
2482
2483
2484
Platform *
Desc     {Name service facility, Client Extension}

Package {nameserv::common 0.1}
See   __nns
Platform *
Desc     {Name service facility, shared definitions}






#
# ############

# #############
# Module "nntp"
# [1]    | "nntp" (0.2.1)







>
>
>
>
>







2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
Platform *
Desc     {Name service facility, Client Extension}

Package {nameserv::common 0.1}
See   __nns
Platform *
Desc     {Name service facility, shared definitions}

Package {nameserv::cluster 0.2.3}
See   __nns
Platform *
Desc     {Tcllib package}

#
# ############

# #############
# Module "nntp"
# [1]    | "nntp" (0.2.1)
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
Path     time.tcl

#
# ############

# ##############
# Module "oauth"
# [1]    | "oauth" (1.0.3)
# -------+

Package {oauth 1.0.3}
Platform *
Desc     {oauth API base signature}
Base     @TAP_DIR@/oauth
Path     oauth.tcl
Path     pkgIndex.tcl

#
# ##############

# ##################
# Module "oodialect"
# [1]    | "oo::dialect" (0.3.3)
# -------+

Package {oo::dialect 0.3.3}
Platform *
Desc     {A minimalist framework for large scale OO Projects}
Base     @TAP_DIR@/oodialect
Path     oodialect.tcl
Path     pkgIndex.tcl

#
# ##################

# ###############
# Module "oometa"
# [1]    | "oo::meta" (0.7.1)
# [2]    | "oo::option" (0.3.1)
# -------+

Package {__oometa 0.0}
Platform *
Desc     {Standardized OO Framework for development}
Hidden
Base     @TAP_DIR@/oometa
Path     oometa.tcl
Path     oooption.tcl
Path     pkgIndex.tcl

Package {oo::meta 0.7.1}
See   __oometa
Platform *
Desc     {TclOO Library (TOOL) Framework}

Package {oo::option 0.3.1}
See   __oometa
Platform *
Desc     {Tcllib package}

#
# ###############








|


|











|


|

|









|
|











|


|

|







2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
Path     time.tcl

#
# ############

# ##############
# Module "oauth"
# [1]    | "oauth" (1)
# -------+

Package {oauth 1}
Platform *
Desc     {oauth API base signature}
Base     @TAP_DIR@/oauth
Path     oauth.tcl
Path     pkgIndex.tcl

#
# ##############

# ##################
# Module "oodialect"
# [1]    | "oo::dialect" (0.3)
# -------+

Package {oo::dialect 0.3}
Platform *
Desc     {Dictionary Tools}
Base     @TAP_DIR@/oodialect
Path     oodialect.tcl
Path     pkgIndex.tcl

#
# ##################

# ###############
# Module "oometa"
# [1]    | "oo::meta" (0.4.1)
# [2]    | "oo::option" (0.3)
# -------+

Package {__oometa 0.0}
Platform *
Desc     {Standardized OO Framework for development}
Hidden
Base     @TAP_DIR@/oometa
Path     oometa.tcl
Path     oooption.tcl
Path     pkgIndex.tcl

Package {oo::meta 0.4.1}
See   __oometa
Platform *
Desc     {Dictionary Tools}

Package {oo::option 0.3}
See   __oometa
Platform *
Desc     {Tcllib package}

#
# ###############

2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
Desc     {Tcllib package}

#
# #############

# ############
# Module "pki"
# [1]    | "pki" (0.10)
# -------+

Package {pki 0.10}
Platform *
Desc     {Implementation of the public key cipher}
Base     @TAP_DIR@/pki
Path     pkgIndex.tcl
Path     pki.tcl

#







|


|







2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
Desc     {Tcllib package}

#
# #############

# ############
# Module "pki"
# [1]    | "pki" (0.6)
# -------+

Package {pki 0.6}
Platform *
Desc     {Implementation of the public key cipher}
Base     @TAP_DIR@/pki
Path     pkgIndex.tcl
Path     pki.tcl

#
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
Path     pluginmgr.tcl

#
# ##################

# ############
# Module "png"
# [1]    | "png" (0.3)
# -------+

Package {png 0.3}
Platform *
Desc     {PNG querying and manipulation of meta data}
Base     @TAP_DIR@/png
Path     pkgIndex.tcl
Path     png.tcl

#







|


|







2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
Path     pluginmgr.tcl

#
# ##################

# ############
# Module "png"
# [1]    | "png" (0.2)
# -------+

Package {png 0.2}
Platform *
Desc     {PNG querying and manipulation of meta data}
Base     @TAP_DIR@/png
Path     pkgIndex.tcl
Path     png.tcl

#
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071

3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087

3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115


3116
3117
3118
3119
3120
3121
3122
See   __pop3d
Platform *
Desc     {Simple mailbox database for pop3d}

#
# ##############

# ################
# Module "practcl"
# [1]    | "clay" (0.8.6)
# [2]    | "practcl" (0.16.4)
# -------+

Package {__practcl 0.0}
Platform *
Desc     {Tcl Web Server}
Hidden
Base     @TAP_DIR@/practcl
Path     pkgIndex.tcl
Path     practcl.tcl

Package {clay 0.8.6}
See   __practcl
Platform *
Desc     {A TclOO and coroutine based web server}

Package {practcl 0.16.4}
See   __practcl
Platform *
Desc     {Tcllib package}

#
# ################

# ###################
# Module "processman"
# [1]    | "odie::processman" (0.5)
# [2]    | "processman" (0.5)
# -------+

Package {__processman 0.0}
Platform *
Desc     {processman}
Hidden
Base     @TAP_DIR@/processman
Path     pkgIndex.tcl
Path     processman.tcl

Package {odie::processman 0.5}
See   __processman
Platform *
Desc     {Tcllib package}

Package {processman 0.5}
See   __processman
Platform *
Desc     {Tool for automating the period callback of commands}

#
# ###################

# #################
# Module "profiler"
# [1]    | "profiler" (0.5)
# -------+

Package {profiler 0.5}
Platform *
Desc     {Tcl source code profiler}
Base     @TAP_DIR@/profiler
Path     pkgIndex.tcl
Path     profiler.tcl

#
# #################

# ###########
# Module "pt"
# [1]    | "pt::rde::critcl" (1.3.4)
# [2]    | "pt::peg::to::param" (1.0.1)

# [3]    | "pt::peg::export::json" (1)
# [4]    | "pt::tclparam::configuration::snit" (1.0.2)
# [5]    | "pt::peg::from::json" (1)
# [6]    | "pt::peg::export::peg" (1)
# [7]    | "pt::peg::to::cparam" (1.1.3)
# [8]    | "pt::peg::import" (1.0.1)
# [9]    | "pt::peg::to::peg" (1.0.2)
# [10]    | "pt::parse::peg" (1.0.1)
# [11]    | "pt::peg::import::peg" (1)
# [12]    | "pt::rde" (1.1)
# [13]    | "pt::peg::from::peg" (1.0.3)
# [14]    | "pt::cparam::configuration::critcl" (1.0.2)
# [15]    | "pt::tclparam::configuration::tcloo" (1.0.4)
# [16]    | "pt::parse::peg_tcl" (1.0.1)
# [17]    | "pt::util" (1.1)
# [18]    | "pt::peg::op" (1.1.0)

# [19]    | "pt::ast" (1.1)
# [20]    | "pt::pe::op" (1.0.1)
# [21]    | "pt::peg::import::json" (1)
# [22]    | "pt::peg::to::json" (1)
# [23]    | "pt::peg::export::container" (1)
# [24]    | "pt::peg::export" (1.0.1)
# [25]    | "pt::peg::to::container" (1)
# [26]    | "pt::pgen" (1.1)
# [27]    | "pt::tclparam::configuration::nx" (1.0.1)
# [28]    | "pt::peg::interp" (1.0.1)
# [29]    | "pt::peg::container" (1)
# [30]    | "pt::peg::container::peg" (1)
# [31]    | "pt::peg::to::tclparam" (1.0.3)
# [32]    | "text::write" (1)
# [33]    | "pt::peg" (1)
# [34]    | "pt::rde::nx" (.1.1)
# [35]    | "pt::rde::oo" (1.1)
# [36]    | "pt::pe" (1.0.2)
# [37]    | "char" (1.0.1)
# [38]    | "pt::cparam::configuration::tea" (0.1)
# -------+

Package {__pt 0.0}
Platform *
Desc     {Parser Tools}
Hidden
Base     @TAP_DIR@/pt
Path     char.tcl


Path     pkgIndex.tcl
Path     pt_astree.tcl
Path     pt_cparam_config_critcl.tcl
Path     pt_cparam_config_tea.tcl
Path     pt_parse_peg.tcl
Path     pt_parse_peg_c.tcl
Path     pt_parse_peg_tcl.tcl







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|
|










|




|









|


|













>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<
|
|
|
|
|
<
|












>
>







2929
2930
2931
2932
2933
2934
2935



























2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007

3008
3009
3010
3011
3012

3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
See   __pop3d
Platform *
Desc     {Simple mailbox database for pop3d}

#
# ##############




























# ###################
# Module "processman"
# [1]    | "odie::processman" (0.3)
# [2]    | "processman" (0.3)
# -------+

Package {__processman 0.0}
Platform *
Desc     {processman}
Hidden
Base     @TAP_DIR@/processman
Path     pkgIndex.tcl
Path     processman.tcl

Package {odie::processman 0.3}
See   __processman
Platform *
Desc     {Tcllib package}

Package {processman 0.3}
See   __processman
Platform *
Desc     {Tool for automating the period callback of commands}

#
# ###################

# #################
# Module "profiler"
# [1]    | "profiler" (0.3)
# -------+

Package {profiler 0.3}
Platform *
Desc     {Tcl source code profiler}
Base     @TAP_DIR@/profiler
Path     pkgIndex.tcl
Path     profiler.tcl

#
# #################

# ###########
# Module "pt"
# [1]    | "pt::rde::critcl" (1.3.4)
# [2]    | "pt::peg::to::param" (1.0.1)
# [3]    | "configuration" (1)
# [4]    | "pt::peg::export::json" (1)
# [5]    | "pt::tclparam::configuration::snit" (1.0.2)
# [6]    | "pt::peg::from::json" (1)
# [7]    | "pt::peg::export::peg" (1)
# [8]    | "pt::peg::to::cparam" (1.1.3)
# [9]    | "pt::peg::import" (1)
# [10]    | "pt::peg::to::peg" (1.0.2)
# [11]    | "pt::parse::peg" (1.0.1)
# [12]    | "pt::peg::import::peg" (1)
# [13]    | "pt::rde" (1.1)
# [14]    | "pt::peg::from::peg" (1.0.3)
# [15]    | "pt::cparam::configuration::critcl" (1.0.2)
# [16]    | "pt::tclparam::configuration::tcloo" (1.0.4)
# [17]    | "pt::parse::peg_tcl" (1.0.1)
# [18]    | "pt::util" (1.1)
# [19]    | "pt::peg::op" (1.0.1)
# [20]    | "paths" (1)
# [21]    | "pt::ast" (1.1)
# [22]    | "pt::pe::op" (1.0.1)
# [23]    | "pt::peg::import::json" (1)
# [24]    | "pt::peg::to::json" (1)
# [25]    | "pt::peg::export::container" (1)
# [26]    | "pt::peg::export" (1)
# [27]    | "pt::peg::to::container" (1)
# [28]    | "pt::pgen" (1.0.3)

# [29]    | "pt::peg::interp" (1.0.1)
# [30]    | "pt::peg::container" (1)
# [31]    | "pt::peg::container::peg" (1)
# [32]    | "pt::peg::to::tclparam" (1.0.3)
# [33]    | "text::write" (1)

# [34]    | "pt::peg" (1)
# [35]    | "pt::rde::oo" (1.1)
# [36]    | "pt::pe" (1.0.2)
# [37]    | "char" (1.0.1)
# [38]    | "pt::cparam::configuration::tea" (0.1)
# -------+

Package {__pt 0.0}
Platform *
Desc     {Parser Tools}
Hidden
Base     @TAP_DIR@/pt
Path     char.tcl
Path     configuration.tcl
Path     paths.tcl
Path     pkgIndex.tcl
Path     pt_astree.tcl
Path     pt_cparam_config_critcl.tcl
Path     pt_cparam_config_tea.tcl
Path     pt_parse_peg.tcl
Path     pt_parse_peg_c.tcl
Path     pt_parse_peg_tcl.tcl
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
Path     pt_peg_to_tclparam.tcl
Path     pt_pegrammar.tcl
Path     pt_pexpr_op.tcl
Path     pt_pexpression.tcl
Path     pt_pgen.tcl
Path     pt_rdengine.tcl
Path     pt_rdengine_c.tcl
Path     pt_rdengine_nx.tcl
Path     pt_rdengine_oo.tcl
Path     pt_rdengine_tcl.tcl
Path     pt_tclparam_config_nx.tcl
Path     pt_tclparam_config_snit.tcl
Path     pt_tclparam_config_tcloo.tcl
Path     pt_util.tcl
Path     rde_critcl/m.c
Path     rde_critcl/m.h
Path     rde_critcl/ms.c
Path     rde_critcl/ms.h







<


<







3053
3054
3055
3056
3057
3058
3059

3060
3061

3062
3063
3064
3065
3066
3067
3068
Path     pt_peg_to_tclparam.tcl
Path     pt_pegrammar.tcl
Path     pt_pexpr_op.tcl
Path     pt_pexpression.tcl
Path     pt_pgen.tcl
Path     pt_rdengine.tcl
Path     pt_rdengine_c.tcl

Path     pt_rdengine_oo.tcl
Path     pt_rdengine_tcl.tcl

Path     pt_tclparam_config_snit.tcl
Path     pt_tclparam_config_tcloo.tcl
Path     pt_util.tcl
Path     rde_critcl/m.c
Path     rde_critcl/m.h
Path     rde_critcl/ms.c
Path     rde_critcl/ms.h
3176
3177
3178
3179
3180
3181
3182





3183
3184
3185
3186
3187
3188
3189
Platform *
Desc     {Tcllib package}

Package {pt::peg::to::param 1.0.1}
See   __pt
Platform *
Desc     {PEG Conversion. Write PARAM format}






Package {pt::peg::export::json 1}
See   __pt
Platform *
Desc     {PEG Export Plugin. Write JSON format}

Package {pt::tclparam::configuration::snit 1.0.2}







>
>
>
>
>







3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
Platform *
Desc     {Tcllib package}

Package {pt::peg::to::param 1.0.1}
See   __pt
Platform *
Desc     {PEG Conversion. Write PARAM format}

Package {configuration 1}
See   __pt
Platform *
Desc     {Tcllib package}

Package {pt::peg::export::json 1}
See   __pt
Platform *
Desc     {PEG Export Plugin. Write JSON format}

Package {pt::tclparam::configuration::snit 1.0.2}
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
Desc     {PEG Export Plugin. Write PEG format}

Package {pt::peg::to::cparam 1.1.3}
See   __pt
Platform *
Desc     {PEG Conversion. Write CPARAM format}

Package {pt::peg::import 1.0.1}
See   __pt
Platform *
Desc     {PEG Import}

Package {pt::peg::to::peg 1.0.2}
See   __pt
Platform *







|







3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
Desc     {PEG Export Plugin. Write PEG format}

Package {pt::peg::to::cparam 1.1.3}
See   __pt
Platform *
Desc     {PEG Conversion. Write CPARAM format}

Package {pt::peg::import 1}
See   __pt
Platform *
Desc     {PEG Import}

Package {pt::peg::to::peg 1.0.2}
See   __pt
Platform *
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263





3264
3265
3266
3267
3268
3269
3270
Desc     {Tcllib package}

Package {pt::util 1.1}
See   __pt
Platform *
Desc     {Tcllib package}

Package {pt::peg::op 1.1.0}
See   __pt
Platform *
Desc     {Parser Tools PE Grammar Utility Operations}






Package {pt::ast 1.1}
See   __pt
Platform *
Desc     {General utilities}

Package {pt::pe::op 1.0.1}
See   __pt







|




>
>
>
>
>







3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
Desc     {Tcllib package}

Package {pt::util 1.1}
See   __pt
Platform *
Desc     {Tcllib package}

Package {pt::peg::op 1.0.1}
See   __pt
Platform *
Desc     {Parser Tools PE Grammar Utility Operations}

Package {paths 1}
See   __pt
Platform *
Desc     {Tcllib package}

Package {pt::ast 1.1}
See   __pt
Platform *
Desc     {General utilities}

Package {pt::pe::op 1.0.1}
See   __pt
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
Desc     {PEG Conversion. Write JSON format}

Package {pt::peg::export::container 1}
See   __pt
Platform *
Desc     {PEG Export Plugin. Write CONTAINER format}

Package {pt::peg::export 1.0.1}
See   __pt
Platform *
Desc     {PEG Export}

Package {pt::peg::to::container 1}
See   __pt
Platform *
Desc     {PEG Conversion. Write CONTAINER format}

Package {pt::pgen 1.1}
See   __pt
Platform *
Desc     {Parser Generator}

Package {pt::tclparam::configuration::nx 1.0.1}
See   __pt
Platform *
Desc     {Tcl/PARAM, Canned configuration, NX}

Package {pt::peg::interp 1.0.1}
See   __pt
Platform *
Desc     {Interpreter for parsing expression grammars}

Package {pt::peg::container 1}
See   __pt







|









|




<
<
<
<
<







3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223





3224
3225
3226
3227
3228
3229
3230
Desc     {PEG Conversion. Write JSON format}

Package {pt::peg::export::container 1}
See   __pt
Platform *
Desc     {PEG Export Plugin. Write CONTAINER format}

Package {pt::peg::export 1}
See   __pt
Platform *
Desc     {PEG Export}

Package {pt::peg::to::container 1}
See   __pt
Platform *
Desc     {PEG Conversion. Write CONTAINER format}

Package {pt::pgen 1.0.3}
See   __pt
Platform *
Desc     {Parser Generator}






Package {pt::peg::interp 1.0.1}
See   __pt
Platform *
Desc     {Interpreter for parsing expression grammars}

Package {pt::peg::container 1}
See   __pt
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
Desc     {Tcllib package}

Package {pt::peg 1}
See   __pt
Platform *
Desc     {Parsing Expression Grammar Serialization}

Package {pt::rde::nx .1.1}
See   __pt
Platform *
Desc     {Tcllib package}

Package {pt::rde::oo 1.1}
See   __pt
Platform *
Desc     {Tcllib package}

Package {pt::pe 1.0.2}
See   __pt







<
<
<
<
<







3247
3248
3249
3250
3251
3252
3253





3254
3255
3256
3257
3258
3259
3260
Desc     {Tcllib package}

Package {pt::peg 1}
See   __pt
Platform *
Desc     {Parsing Expression Grammar Serialization}






Package {pt::rde::oo 1.1}
See   __pt
Platform *
Desc     {Tcllib package}

Package {pt::pe 1.0.2}
See   __pt
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
Path     report.tcl

#
# ###############

# #############
# Module "rest"
# [1]    | "rest" (1.3.1)
# -------+

Package {rest 1.3.1}
Platform *
Desc     {define REST web APIs and call them inline or asychronously}
Base     @TAP_DIR@/rest
Path     pkgIndex.tcl
Path     rest.tcl

#







|


|







3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
Path     report.tcl

#
# ###############

# #############
# Module "rest"
# [1]    | "rest" (1.0.2)
# -------+

Package {rest 1.0.2}
Platform *
Desc     {define REST web APIs and call them inline or asychronously}
Base     @TAP_DIR@/rest
Path     pkgIndex.tcl
Path     rest.tcl

#
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546

#
# #############

# #############
# Module "sha1"
# [1]    | "sha1" (1.1.1)
# [2]    | "sha1" (2.0.4)
# [3]    | "sha256" (1.0.4)
# -------+

Package {__sha1 0.0}
Platform *
Desc     {SHA-x Message-Digest Algorithm}
Hidden
Base     @TAP_DIR@/sha1
Path     pkgIndex.tcl
Path     sha1.tcl
Path     sha1c.tcl
Path     sha1v1.tcl
Path     sha256.tcl
Path     sha256c.tcl

Package {sha1 1.1.1}
See   __sha1
Platform *
Desc     {SHA1 Message-Digest Algorithm}

Package {sha1 2.0.4}
See   __sha1
Platform *
Desc     {SHA1 Message-Digest Algorithm}

Package {sha256 1.0.4}
See   __sha1
Platform *
Desc     {SHA256 Message-Digest Algorithm}

#
# #############

# ###################
# Module "simulation"
# [1]    | "simulation::montecarlo" (0.1)
# [2]    | "simulation::annealing" (0.2)
# [3]    | "simulation::random" (0.4.0)
# -------+

Package {__simulation 0.0}
Platform *
Desc     {Tcl Simulation Tools}
Hidden
Base     @TAP_DIR@/simulation







|
|



















|




|











|







3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456

#
# #############

# #############
# Module "sha1"
# [1]    | "sha1" (1.1.1)
# [2]    | "sha1" (2.0.3)
# [3]    | "sha256" (1.0.3)
# -------+

Package {__sha1 0.0}
Platform *
Desc     {SHA-x Message-Digest Algorithm}
Hidden
Base     @TAP_DIR@/sha1
Path     pkgIndex.tcl
Path     sha1.tcl
Path     sha1c.tcl
Path     sha1v1.tcl
Path     sha256.tcl
Path     sha256c.tcl

Package {sha1 1.1.1}
See   __sha1
Platform *
Desc     {SHA1 Message-Digest Algorithm}

Package {sha1 2.0.3}
See   __sha1
Platform *
Desc     {SHA1 Message-Digest Algorithm}

Package {sha256 1.0.3}
See   __sha1
Platform *
Desc     {SHA256 Message-Digest Algorithm}

#
# #############

# ###################
# Module "simulation"
# [1]    | "simulation::montecarlo" (0.1)
# [2]    | "simulation::annealing" (0.2)
# [3]    | "simulation::random" (0.3.1)
# -------+

Package {__simulation 0.0}
Platform *
Desc     {Tcl Simulation Tools}
Hidden
Base     @TAP_DIR@/simulation
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
Desc     {Monte Carlo simulations}

Package {simulation::annealing 0.2}
See   __simulation
Platform *
Desc     {Simulated annealing}

Package {simulation::random 0.4.0}
See   __simulation
Platform *
Desc     {Pseudo-random number generators}

#
# ###################








|







3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
Desc     {Monte Carlo simulations}

Package {simulation::annealing 0.2}
See   __simulation
Platform *
Desc     {Simulated annealing}

Package {simulation::random 0.3.1}
See   __simulation
Platform *
Desc     {Pseudo-random number generators}

#
# ###################

3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
Desc     {Implementation of Unicode normalization}

#
# ###################

# ###############
# Module "struct"
# [1]    | "struct::record" (1.2.2)
# [2]    | "struct::tree" (1.2.2)
# [3]    | "struct::tree" (2.1.2)
# [4]    | "struct::graph" (1.2.1)
# [5]    | "struct::graph" (2.4.3)
# [6]    | "struct::skiplist" (1.3)
# [7]    | "struct" (1.4)
# [8]    | "struct" (2.1)
# [9]    | "struct::set" (2.2.3)
# [10]    | "struct::queue" (1.4.5)
# [11]    | "struct::map" (1)
# [12]    | "struct::prioqueue" (1.4)
# [13]    | "struct::disjointset" (1.1)
# [14]    | "struct::pool" (1.2.3)
# [15]    | "struct::list" (1.8.4)
# [16]    | "struct::graph::op" (0.11.3)
# [17]    | "struct::matrix" (1.2.2)
# [18]    | "struct::matrix" (2.0.4)
# [19]    | "struct::stack" (1.5.3)
# -------+

Package {__struct 0.0}
Platform *
Desc     {Tcl Data Structures}
Hidden
Base     @TAP_DIR@/struct
Path     disjointset.tcl
Path     graph.tcl
Path     graph1.tcl
Path     graph_c.tcl
Path     graph_tcl.tcl
Path     graphops.tcl
Path     list.tcl
Path     map.tcl
Path     matrix.tcl
Path     matrix1.tcl
Path     pkgIndex.tcl
Path     pool.tcl
Path     prioqueue.tcl
Path     queue.tcl
Path     queue_c.tcl







|



|





|
|
|
|
|
|
|
|
<














<







3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662

3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676

3677
3678
3679
3680
3681
3682
3683
Desc     {Implementation of Unicode normalization}

#
# ###################

# ###############
# Module "struct"
# [1]    | "struct::record" (1.2.1)
# [2]    | "struct::tree" (1.2.2)
# [3]    | "struct::tree" (2.1.2)
# [4]    | "struct::graph" (1.2.1)
# [5]    | "struct::graph" (2.4)
# [6]    | "struct::skiplist" (1.3)
# [7]    | "struct" (1.4)
# [8]    | "struct" (2.1)
# [9]    | "struct::set" (2.2.3)
# [10]    | "struct::queue" (1.4.5)
# [11]    | "struct::prioqueue" (1.4)
# [12]    | "struct::disjointset" (1.0)
# [13]    | "struct::pool" (1.2.3)
# [14]    | "struct::list" (1.8.3)
# [15]    | "struct::graph::op" (0.11.3)
# [16]    | "struct::matrix" (1.2.1)
# [17]    | "struct::matrix" (2.0.3)
# [18]    | "struct::stack" (1.5.3)

# -------+

Package {__struct 0.0}
Platform *
Desc     {Tcl Data Structures}
Hidden
Base     @TAP_DIR@/struct
Path     disjointset.tcl
Path     graph.tcl
Path     graph1.tcl
Path     graph_c.tcl
Path     graph_tcl.tcl
Path     graphops.tcl
Path     list.tcl

Path     matrix.tcl
Path     matrix1.tcl
Path     pkgIndex.tcl
Path     pool.tcl
Path     prioqueue.tcl
Path     queue.tcl
Path     queue_c.tcl
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
Path     struct.tcl
Path     struct1.tcl
Path     tree.tcl
Path     tree1.tcl
Path     tree_c.tcl
Path     tree_tcl.tcl

Package {struct::record 1.2.2}
See   __struct
Platform *
Desc     {Define and create records (similar to 'C' structures)}

Package {struct::tree 1.2.2}
See   __struct
Platform *
Desc     {Create and manipulate tree objects}

Package {struct::tree 2.1.2}
See   __struct
Platform *
Desc     {Create and manipulate tree objects}

Package {struct::graph 1.2.1}
See   __struct
Platform *
Desc     {Create and manipulate directed graph objects}

Package {struct::graph 2.4.3}
See   __struct
Platform *
Desc     {Create and manipulate directed graph objects}

Package {struct::skiplist 1.3}
See   __struct
Platform *







|



















|







3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
Path     struct.tcl
Path     struct1.tcl
Path     tree.tcl
Path     tree1.tcl
Path     tree_c.tcl
Path     tree_tcl.tcl

Package {struct::record 1.2.1}
See   __struct
Platform *
Desc     {Define and create records (similar to 'C' structures)}

Package {struct::tree 1.2.2}
See   __struct
Platform *
Desc     {Create and manipulate tree objects}

Package {struct::tree 2.1.2}
See   __struct
Platform *
Desc     {Create and manipulate tree objects}

Package {struct::graph 1.2.1}
See   __struct
Platform *
Desc     {Create and manipulate directed graph objects}

Package {struct::graph 2.4}
See   __struct
Platform *
Desc     {Create and manipulate directed graph objects}

Package {struct::skiplist 1.3}
See   __struct
Platform *
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
Desc     {Procedures for manipulating sets}

Package {struct::queue 1.4.5}
See   __struct
Platform *
Desc     {Create and manipulate queue objects}

Package {struct::map 1}
See   __struct
Platform *
Desc     {Manage key/value maps}

Package {struct::prioqueue 1.4}
See   __struct
Platform *
Desc     {Create and manipulate prioqueue objects}

Package {struct::disjointset 1.1}
See   __struct
Platform *
Desc     {Disjoint set data structure}

Package {struct::pool 1.2.3}
See   __struct
Platform *
Desc     {Create and manipulate pool objects (of discrete items)}

Package {struct::list 1.8.4}
See   __struct
Platform *
Desc     {Procedures for manipulating lists}

Package {struct::graph::op 0.11.3}
See   __struct
Platform *
Desc     {Operation for (un)directed graph objects}

Package {struct::matrix 1.2.2}
See   __struct
Platform *
Desc     {Create and manipulate matrix objects}

Package {struct::matrix 2.0.4}
See   __struct
Platform *
Desc     {Create and manipulate matrix objects}

Package {struct::stack 1.5.3}
See   __struct
Platform *
Desc     {Create and manipulate stack objects}

#
# ###############

# ############
# Module "tar"
# [1]    | "tar" (0.11)
# -------+

Package {tar 0.11}
Platform *
Desc     {Tar file creation, extraction & manipulation}
Base     @TAP_DIR@/tar
Path     pkgIndex.tcl
Path     tar.tcl

#
# ############

# ##############
# Module "tepam"
# [1]    | "tepam::doc_gen" (0.1.1)
# [2]    | "tepam" (0.5.2)
# -------+

Package {__tepam 0.0}
Platform *
Desc     {Tcl's Enhanced Procedure and Argument Manager}
Hidden
Base     @TAP_DIR@/tepam
Path     pkgIndex.tcl
Path     tepam.tcl
Path     tepam_doc_gen.tcl

Package {tepam::doc_gen 0.1.1}
See   __tepam
Platform *
Desc     {TEPAM DOC Generation, reference manual}

Package {tepam 0.5.2}
See   __tepam
Platform *
Desc     {TEPAM procedure, reference manual}

#
# ##############








<
<
<
<
<





|









|









|




|














|


|












|
















|







3745
3746
3747
3748
3749
3750
3751





3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
Desc     {Procedures for manipulating sets}

Package {struct::queue 1.4.5}
See   __struct
Platform *
Desc     {Create and manipulate queue objects}






Package {struct::prioqueue 1.4}
See   __struct
Platform *
Desc     {Create and manipulate prioqueue objects}

Package {struct::disjointset 1.0}
See   __struct
Platform *
Desc     {Disjoint set data structure}

Package {struct::pool 1.2.3}
See   __struct
Platform *
Desc     {Create and manipulate pool objects (of discrete items)}

Package {struct::list 1.8.3}
See   __struct
Platform *
Desc     {Procedures for manipulating lists}

Package {struct::graph::op 0.11.3}
See   __struct
Platform *
Desc     {Operation for (un)directed graph objects}

Package {struct::matrix 1.2.1}
See   __struct
Platform *
Desc     {Create and manipulate matrix objects}

Package {struct::matrix 2.0.3}
See   __struct
Platform *
Desc     {Create and manipulate matrix objects}

Package {struct::stack 1.5.3}
See   __struct
Platform *
Desc     {Create and manipulate stack objects}

#
# ###############

# ############
# Module "tar"
# [1]    | "tar" (0.10)
# -------+

Package {tar 0.10}
Platform *
Desc     {Tar file creation, extraction & manipulation}
Base     @TAP_DIR@/tar
Path     pkgIndex.tcl
Path     tar.tcl

#
# ############

# ##############
# Module "tepam"
# [1]    | "tepam::doc_gen" (0.1.1)
# [2]    | "tepam" (0.5)
# -------+

Package {__tepam 0.0}
Platform *
Desc     {Tcl's Enhanced Procedure and Argument Manager}
Hidden
Base     @TAP_DIR@/tepam
Path     pkgIndex.tcl
Path     tepam.tcl
Path     tepam_doc_gen.tcl

Package {tepam::doc_gen 0.1.1}
See   __tepam
Platform *
Desc     {TEPAM DOC Generation, reference manual}

Package {tepam 0.5}
See   __tepam
Platform *
Desc     {TEPAM procedure, reference manual}

#
# ##############

4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083

#
# #############

# #################
# Module "textutil"
# [1]    | "textutil::repeat" (0.7)
# [2]    | "textutil::wcswidth" (35.1)
# [3]    | "textutil::expander" (1.3.1)
# [4]    | "textutil::tabify" (0.7)
# [5]    | "textutil::string" (0.8)
# [6]    | "textutil::adjust" (0.7.3)
# [7]    | "textutil::trim" (0.7)
# [8]    | "textutil" (0.9)
# [9]    | "textutil::split" (0.8)
# [10]    | "textutil::patch" (0.1)
# -------+

Package {__textutil 0.0}
Platform *
Desc     {Text and string utilities, macro processing, Text and string utilities, Markdown to HTML Converter}
Hidden
Base     @TAP_DIR@/textutil
Path     adjust.tcl
Path     dehypht.tex
Path     eshyph_vo.tex
Path     expander.tcl
Path     ithyph.tex
Path     patch.tcl
Path     pkgIndex.tcl
Path     repeat.tcl
Path     split.tcl
Path     string.tcl
Path     tabify.tcl
Path     textutil.tcl
Path     trim.tcl
Path     wcswidth.tcl

Package {textutil::repeat 0.7}
See   __textutil
Platform *
Desc     {Procedures to repeat strings.}

Package {textutil::wcswidth 35.1}
See   __textutil
Platform *
Desc     {Tcllib package}

Package {textutil::expander 1.3.1}
See   __textutil
Platform *
Desc     {Procedures to process templates and expand text.}

Package {textutil::tabify 0.7}
See   __textutil







|
|
|
|
|
|
|
<
<




|







<







<






<
<
<
<
<







3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945


3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957

3958
3959
3960
3961
3962
3963
3964

3965
3966
3967
3968
3969
3970





3971
3972
3973
3974
3975
3976
3977

#
# #############

# #################
# Module "textutil"
# [1]    | "textutil::repeat" (0.7)
# [2]    | "textutil::expander" (1.3.1)
# [3]    | "textutil::tabify" (0.7)
# [4]    | "textutil::string" (0.8)
# [5]    | "textutil::adjust" (0.7.3)
# [6]    | "textutil::trim" (0.7)
# [7]    | "textutil" (0.8)
# [8]    | "textutil::split" (0.7)


# -------+

Package {__textutil 0.0}
Platform *
Desc     {Text and string utilities, macro processing}
Hidden
Base     @TAP_DIR@/textutil
Path     adjust.tcl
Path     dehypht.tex
Path     eshyph_vo.tex
Path     expander.tcl
Path     ithyph.tex

Path     pkgIndex.tcl
Path     repeat.tcl
Path     split.tcl
Path     string.tcl
Path     tabify.tcl
Path     textutil.tcl
Path     trim.tcl


Package {textutil::repeat 0.7}
See   __textutil
Platform *
Desc     {Procedures to repeat strings.}






Package {textutil::expander 1.3.1}
See   __textutil
Platform *
Desc     {Procedures to process templates and expand text.}

Package {textutil::tabify 0.7}
See   __textutil
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
Desc     {Procedures to adjust, indent, and undent paragraphs}

Package {textutil::trim 0.7}
See   __textutil
Platform *
Desc     {Procedures to trim strings}

Package {textutil 0.9}
See   __textutil
Platform *
Desc     {Converts Markdown text to HTML}

Package {textutil::split 0.8}
See   __textutil
Platform *
Desc     {Procedures to split texts}

Package {textutil::patch 0.1}
See   __textutil
Platform *
Desc     {Application of uni-diff patches to directory trees}

#
# #################

# ############
# Module "tie"
# [1]    | "tie::std::growfile" (1.0)
# [2]    | "tie::std::array" (1.0)







|


|

|




<
<
<
<
<







3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005





4006
4007
4008
4009
4010
4011
4012
Desc     {Procedures to adjust, indent, and undent paragraphs}

Package {textutil::trim 0.7}
See   __textutil
Platform *
Desc     {Procedures to trim strings}

Package {textutil 0.8}
See   __textutil
Platform *
Desc     {Procedures to manipulate texts and strings.}

Package {textutil::split 0.7}
See   __textutil
Platform *
Desc     {Procedures to split texts}






#
# #################

# ############
# Module "tie"
# [1]    | "tie::std::growfile" (1.0)
# [2]    | "tie::std::array" (1.0)
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209







4210

4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229















4230
4231
4232
4233
4234
4235
4236

#
# #############

# #############
# Module "tool"
# [1]    | "tool::pipeline" (0.1)
# [2]    | "tool" (0.7)
# [3]    | "tool::option" (0.1)
# -------+

Package {__tool 0.0}
Platform *
Desc     {Standardized OO Framework for development}
Hidden
Base     @TAP_DIR@/tool







Path     pkgIndex.tcl

Path     tool.tcl

Package {tool::pipeline 0.1}
See   __tool
Platform *
Desc     {Tcllib package}

Package {tool 0.7}
See   __tool
Platform *
Desc     {Dictionary Tools}

Package {tool::option 0.1}
See   __tool
Platform *
Desc     {Tcllib package}

#
# #############
















# #################
# Module "transfer"
# [1]    | "transfer::data::source" (0.2)
# [2]    | "transfer::copy" (0.3)
# [3]    | "transfer::data::destination" (0.2)
# [4]    | "transfer::copy::queue" (0.1)







|








>
>
>
>
>
>
>

>
|






|











>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148

#
# #############

# #############
# Module "tool"
# [1]    | "tool::pipeline" (0.1)
# [2]    | "tool" (0.5)
# [3]    | "tool::option" (0.1)
# -------+

Package {__tool 0.0}
Platform *
Desc     {Standardized OO Framework for development}
Hidden
Base     @TAP_DIR@/tool
Path     ensemble.tcl
Path     event.tcl
Path     index.tcl
Path     metaclass.tcl
Path     option.tcl
Path     organ.tcl
Path     pipeline.tcl
Path     pkgIndex.tcl
Path     script.tcl
Path     uuid.tcl

Package {tool::pipeline 0.1}
See   __tool
Platform *
Desc     {Tcllib package}

Package {tool 0.5}
See   __tool
Platform *
Desc     {Dictionary Tools}

Package {tool::option 0.1}
See   __tool
Platform *
Desc     {Tcllib package}

#
# #############

# ######################
# Module "tool_datatype"
# [1]    | "tool::datatype" (0.1)
# -------+

Package {tool::datatype 0.1}
Platform *
Desc     {Tcllib package}
Base     @TAP_DIR@/tool_datatype
Path     datatype.tcl
Path     pkgIndex.tcl

#
# ######################

# #################
# Module "transfer"
# [1]    | "transfer::data::source" (0.2)
# [2]    | "transfer::copy" (0.3)
# [3]    | "transfer::data::destination" (0.2)
# [4]    | "transfer::copy::queue" (0.1)
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
See   __try
Platform *
Desc     {try - Trap and process errors and exceptions}

#
# ############

# ###################
# Module "udpcluster"
# [1]    | "udpcluster" (0.3.3)
# -------+

Package {udpcluster 0.3.3}
Platform *
Desc     {UDP Peer-to-Peer cluster}
Base     @TAP_DIR@/udpcluster
Path     pkgIndex.tcl
Path     udpcluster.tcl

#
# ###################

# ############
# Module "uev"
# [1]    | "uevent::onidle" (0.1)
# [2]    | "uevent" (0.3.1)
# -------+

Package {__uev 0.0}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







4244
4245
4246
4247
4248
4249
4250















4251
4252
4253
4254
4255
4256
4257
See   __try
Platform *
Desc     {try - Trap and process errors and exceptions}

#
# ############
















# ############
# Module "uev"
# [1]    | "uevent::onidle" (0.1)
# [2]    | "uevent" (0.3.1)
# -------+

Package {__uev 0.0}
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
Desc     {User events}

#
# ############

# ##############
# Module "units"
# [1]    | "units" (2.2.1)
# -------+

Package {units 2.2.1}
Platform *
Desc     {unit conversion}
Base     @TAP_DIR@/units
Path     pkgIndex.tcl
Path     units.tcl

#
# ##############

# ############
# Module "uri"
# [1]    | "uri" (1.2.7)
# [2]    | "uri::urn" (1.0.3)
# -------+

Package {__uri 0.0}
Platform *
Desc     {Tcl Web Server, Tcl Uniform Resource Identifier Management}
Hidden
Base     @TAP_DIR@/uri
Path     pkgIndex.tcl
Path     uri.tcl
Path     urn-scheme.tcl

Package {uri 1.2.7}
See   __uri
Platform *
Desc     {A TclOO and coroutine based web server}

Package {uri::urn 1.0.3}
See   __uri
Platform *
Desc     {URI utilities, URN scheme}

#
# ############

# #############
# Module "uuid"
# [1]    | "uuid" (1.0.7)
# -------+

Package {uuid 1.0.7}
Platform *
Desc     {A minimalist framework for large scale OO Projects}
Base     @TAP_DIR@/uuid
Path     pkgIndex.tcl
Path     uuid.tcl

#
# #############

# ################
# Module "valtype"
# [1]    | "valtype::creditcard::mastercard" (1)
# [2]    | "valtype::usnpi" (1)
# [3]    | "valtype::creditcard::discover" (1)
# [4]    | "valtype::common" (1)
# [5]    | "valtype::imei" (1)
# [6]    | "valtype::isbn" (1)
# [7]    | "valtype::creditcard::visa" (1)
# [8]    | "valtype::creditcard::amex" (1)
# [9]    | "valtype::luhn" (1)
# [10]    | "valtype::gs1::ean13" (1)
# [11]    | "valtype::iban" (1.7)
# [12]    | "valtype::luhn5" (1)
# [13]    | "valtype::verhoeff" (1)
# -------+

Package {__valtype 0.0}
Platform *
Desc     {Validation types}







|


|











|





|






|


|











|


|

|



















|







4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
Desc     {User events}

#
# ############

# ##############
# Module "units"
# [1]    | "units" (2.1.1)
# -------+

Package {units 2.1.1}
Platform *
Desc     {unit conversion}
Base     @TAP_DIR@/units
Path     pkgIndex.tcl
Path     units.tcl

#
# ##############

# ############
# Module "uri"
# [1]    | "uri" (1.2.6)
# [2]    | "uri::urn" (1.0.3)
# -------+

Package {__uri 0.0}
Platform *
Desc     {Tcl Uniform Resource Identifier Management}
Hidden
Base     @TAP_DIR@/uri
Path     pkgIndex.tcl
Path     uri.tcl
Path     urn-scheme.tcl

Package {uri 1.2.6}
See   __uri
Platform *
Desc     {URI utilities}

Package {uri::urn 1.0.3}
See   __uri
Platform *
Desc     {URI utilities, URN scheme}

#
# ############

# #############
# Module "uuid"
# [1]    | "uuid" (1.0.5)
# -------+

Package {uuid 1.0.5}
Platform *
Desc     {UUID generation and comparison}
Base     @TAP_DIR@/uuid
Path     pkgIndex.tcl
Path     uuid.tcl

#
# #############

# ################
# Module "valtype"
# [1]    | "valtype::creditcard::mastercard" (1)
# [2]    | "valtype::usnpi" (1)
# [3]    | "valtype::creditcard::discover" (1)
# [4]    | "valtype::common" (1)
# [5]    | "valtype::imei" (1)
# [6]    | "valtype::isbn" (1)
# [7]    | "valtype::creditcard::visa" (1)
# [8]    | "valtype::creditcard::amex" (1)
# [9]    | "valtype::luhn" (1)
# [10]    | "valtype::gs1::ean13" (1)
# [11]    | "valtype::iban" (1.5)
# [12]    | "valtype::luhn5" (1)
# [13]    | "valtype::verhoeff" (1)
# -------+

Package {__valtype 0.0}
Platform *
Desc     {Validation types}
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
Desc     {Validation for plain number with a LUHN checkdigit}

Package {valtype::gs1::ean13 1}
See   __valtype
Platform *
Desc     {Validation for EAN13}

Package {valtype::iban 1.7}
See   __valtype
Platform *
Desc     {Validation for IBAN}

Package {valtype::luhn5 1}
See   __valtype
Platform *







|







4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
Desc     {Validation for plain number with a LUHN checkdigit}

Package {valtype::gs1::ean13 1}
See   __valtype
Platform *
Desc     {Validation for EAN13}

Package {valtype::iban 1.5}
See   __valtype
Platform *
Desc     {Validation for IBAN}

Package {valtype::luhn5 1}
See   __valtype
Platform *
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
#
# ################

# #########################
# Module "virtchannel_base"
# [1]    | "tcl::chan::std" (1.0.1)
# [2]    | "tcl::chan::fifo" (1)
# [3]    | "tcl::chan::cat" (1.0.3)
# [4]    | "tcl::chan::halfpipe" (1.0.1)
# [5]    | "tcl::chan::random" (1)
# [6]    | "tcl::chan::memchan" (1.0.4)
# [7]    | "tcl::chan::null" (1)
# [8]    | "tcl::chan::nullzero" (1)
# [9]    | "tcl::chan::facade" (1.0.1)
# [10]    | "tcl::randomseed" (1)
# [11]    | "tcl::chan::textwindow" (1)
# [12]    | "tcl::chan::fifo2" (1)
# [13]    | "tcl::chan::variable" (1.0.4)
# [14]    | "tcl::chan::string" (1.0.3)
# [15]    | "tcl::chan::zero" (1)
# -------+

Package {__virtchannel_base 0.0}
Platform *
Desc     {Reflected/virtual channel support}
Hidden







|
|

|






|
|







4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
#
# ################

# #########################
# Module "virtchannel_base"
# [1]    | "tcl::chan::std" (1.0.1)
# [2]    | "tcl::chan::fifo" (1)
# [3]    | "tcl::chan::cat" (1.0.2)
# [4]    | "tcl::chan::halfpipe" (1)
# [5]    | "tcl::chan::random" (1)
# [6]    | "tcl::chan::memchan" (1.0.3)
# [7]    | "tcl::chan::null" (1)
# [8]    | "tcl::chan::nullzero" (1)
# [9]    | "tcl::chan::facade" (1.0.1)
# [10]    | "tcl::randomseed" (1)
# [11]    | "tcl::chan::textwindow" (1)
# [12]    | "tcl::chan::fifo2" (1)
# [13]    | "tcl::chan::variable" (1.0.3)
# [14]    | "tcl::chan::string" (1.0.2)
# [15]    | "tcl::chan::zero" (1)
# -------+

Package {__virtchannel_base 0.0}
Platform *
Desc     {Reflected/virtual channel support}
Hidden
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
Desc     {Standard I/O, unification of stdin and stdout}

Package {tcl::chan::fifo 1}
See   __virtchannel_base
Platform *
Desc     {In-memory fifo channel}

Package {tcl::chan::cat 1.0.3}
See   __virtchannel_base
Platform *
Desc     {Concatenation channel}

Package {tcl::chan::halfpipe 1.0.1}
See   __virtchannel_base
Platform *
Desc     {In-memory channel, half of a fifo2}

Package {tcl::chan::random 1}
See   __virtchannel_base
Platform *
Desc     {Random channel}

Package {tcl::chan::memchan 1.0.4}
See   __virtchannel_base
Platform *
Desc     {In-memory channel}

Package {tcl::chan::null 1}
See   __virtchannel_base
Platform *







|




|









|







4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
Desc     {Standard I/O, unification of stdin and stdout}

Package {tcl::chan::fifo 1}
See   __virtchannel_base
Platform *
Desc     {In-memory fifo channel}

Package {tcl::chan::cat 1.0.2}
See   __virtchannel_base
Platform *
Desc     {Concatenation channel}

Package {tcl::chan::halfpipe 1}
See   __virtchannel_base
Platform *
Desc     {In-memory channel, half of a fifo2}

Package {tcl::chan::random 1}
See   __virtchannel_base
Platform *
Desc     {Random channel}

Package {tcl::chan::memchan 1.0.3}
See   __virtchannel_base
Platform *
Desc     {In-memory channel}

Package {tcl::chan::null 1}
See   __virtchannel_base
Platform *
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
Desc     {Textwindow channel}

Package {tcl::chan::fifo2 1}
See   __virtchannel_base
Platform *
Desc     {In-memory interconnected fifo channels}

Package {tcl::chan::variable 1.0.4}
See   __virtchannel_base
Platform *
Desc     {In-memory channel using variable for storage}

Package {tcl::chan::string 1.0.3}
See   __virtchannel_base
Platform *
Desc     {Read-only in-memory channel}

Package {tcl::chan::zero 1}
See   __virtchannel_base
Platform *







|




|







4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
Desc     {Textwindow channel}

Package {tcl::chan::fifo2 1}
See   __virtchannel_base
Platform *
Desc     {In-memory interconnected fifo channels}

Package {tcl::chan::variable 1.0.3}
See   __virtchannel_base
Platform *
Desc     {In-memory channel using variable for storage}

Package {tcl::chan::string 1.0.2}
See   __virtchannel_base
Platform *
Desc     {Read-only in-memory channel}

Package {tcl::chan::zero 1}
See   __virtchannel_base
Platform *
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
Desc     {Counter transformation}

#
# ##############################

# ##################
# Module "websocket"
# [1]    | "websocket" (1.4.1)
# -------+

Package {websocket 1.4.1}
Platform *
Desc     {A TclOO and coroutine based web server}
Base     @TAP_DIR@/websocket
Path     pkgIndex.tcl
Path     websocket.tcl

#
# ##################








|


|

|







4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
Desc     {Counter transformation}

#
# ##############################

# ##################
# Module "websocket"
# [1]    | "websocket" (1.4)
# -------+

Package {websocket 1.4}
Platform *
Desc     {Tcl implementation of the websocket protocol}
Base     @TAP_DIR@/websocket
Path     pkgIndex.tcl
Path     websocket.tcl

#
# ##################

4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915

#
# ############

# #############
# Module "yaml"
# [1]    | "huddle::json" (0.1)
# [2]    | "huddle" (0.3)
# [3]    | "yaml" (0.4.1)
# -------+

Package {__yaml 0.0}
Platform *
Desc     {YAML processing, HUDDLE}
Hidden
Base     @TAP_DIR@/yaml
Path     huddle.tcl
Path     huddle_types.tcl
Path     json2huddle.tcl
Path     pkgIndex.tcl
Path     yaml.tcl

Package {huddle::json 0.1}
See   __yaml
Platform *
Desc     {Tcllib package}

Package {huddle 0.3}
See   __yaml
Platform *
Desc     {Create and manipulate huddle object}

Package {yaml 0.4.1}
See   __yaml
Platform *
Desc     {YAML Format Encoder/Decoder}

#
# #############

# ############
# Module "zip"
# [1]    | "zipfile::encode" (0.4)
# [2]    | "zipfile::mkzip" (1.2.1)
# [3]    | "zipfile::decode" (0.7.1)
# -------+

Package {__zip 0.0}
Platform *
Desc     {Zip archive creation, Zip archive handling}
Hidden
Base     @TAP_DIR@/zip
Path     decode.tcl
Path     encode.tcl
Path     mkzip.tcl
Path     pkgIndex.tcl

Package {zipfile::encode 0.4}
See   __zip
Platform *
Desc     {Generation of zip archives}

Package {zipfile::mkzip 1.2.1}
See   __zip
Platform *
Desc     {Build a zip archive}

Package {zipfile::decode 0.7.1}
See   __zip
Platform *
Desc     {Access to zip archives}

#
# ############

#
##
###
#####
########







|
|


















|




|










|
|

















|




|












4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812

#
# ############

# #############
# Module "yaml"
# [1]    | "huddle::json" (0.1)
# [2]    | "huddle" (0.2)
# [3]    | "yaml" (0.3.9)
# -------+

Package {__yaml 0.0}
Platform *
Desc     {YAML processing, HUDDLE}
Hidden
Base     @TAP_DIR@/yaml
Path     huddle.tcl
Path     huddle_types.tcl
Path     json2huddle.tcl
Path     pkgIndex.tcl
Path     yaml.tcl

Package {huddle::json 0.1}
See   __yaml
Platform *
Desc     {Tcllib package}

Package {huddle 0.2}
See   __yaml
Platform *
Desc     {Create and manipulate huddle object}

Package {yaml 0.3.9}
See   __yaml
Platform *
Desc     {YAML Format Encoder/Decoder}

#
# #############

# ############
# Module "zip"
# [1]    | "zipfile::encode" (0.4)
# [2]    | "zipfile::mkzip" (1.2)
# [3]    | "zipfile::decode" (0.7)
# -------+

Package {__zip 0.0}
Platform *
Desc     {Zip archive creation, Zip archive handling}
Hidden
Base     @TAP_DIR@/zip
Path     decode.tcl
Path     encode.tcl
Path     mkzip.tcl
Path     pkgIndex.tcl

Package {zipfile::encode 0.4}
See   __zip
Platform *
Desc     {Generation of zip archives}

Package {zipfile::mkzip 1.2}
See   __zip
Platform *
Desc     {Build a zip archive}

Package {zipfile::decode 0.7}
See   __zip
Platform *
Desc     {Access to zip archives}

#
# ############

#
##
###
#####
########

Changes to tcllib.yml.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
dist_id: tcllib
version: 1.20
language: tcl
description: |
   This package is intended to be a collection of Tcl packages that provide
   utility functions useful to a large collection of Tcl programmers.

   The home web site for this code is http://core.tcl.tk/tcllib/.
   At this web site, you will find mailing lists, web forums, databases
   for bug reports and feature requests, the CVS repository (browsable
   on the web, or read-only accessible via CVS ), and more.

categories: 
  - Library/Utility
  - Library/Mail
  - Library/Cryptography
  - Library/Math
license: BSD
owner_id: AndreasKupries
wrapped_content: tcllib-1.20/

|

















|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
dist_id: tcllib
version: 1.18
language: tcl
description: |
   This package is intended to be a collection of Tcl packages that provide
   utility functions useful to a large collection of Tcl programmers.

   The home web site for this code is http://core.tcl.tk/tcllib/.
   At this web site, you will find mailing lists, web forums, databases
   for bug reports and feature requests, the CVS repository (browsable
   on the web, or read-only accessible via CVS ), and more.

categories: 
  - Library/Utility
  - Library/Mail
  - Library/Cryptography
  - Library/Math
license: BSD
owner_id: AndreasKupries
wrapped_content: tcllib-1.18/